From bb726490cff6092e6d1150abe28fa7080500f87c Mon Sep 17 00:00:00 2001 From: Fishedotjpg Date: Mon, 15 Dec 2025 17:27:21 +0000 Subject: [PATCH] 204 events --- N3OW/events/_events.info | 195 + N3OW/events/accolade_events.txt | 891 + .../coronation_activity/coronation_events.txt | 5172 +++ .../coronation_events_1.txt | 10383 ++++++ .../coronation_events_6.txt | 15492 +++++++++ .../hold_court_events_general.txt | 26947 ++++++++++++++++ .../pilgrimage_activity/pilgrimage_events.txt | 14839 +++++++++ .../tour_grounds_events_chad.txt | 2895 ++ .../tour_phase_cultural_festival.txt | 10202 ++++++ .../tour_activity/tour_travel_events.txt | 2766 ++ .../tournaments/veronica_local_events_2.txt | 1859 ++ N3OW/events/artifacts/artifact_events.txt | 4314 +++ N3OW/events/birth_events.txt | 4625 +++ N3OW/events/blackmail_events.txt | 292 + N3OW/events/board_game_events.txt | 3589 ++ N3OW/events/bookmark_events.txt | 2316 ++ N3OW/events/bp1_dan_events.txt | 4362 +++ .../court_events/01_ep3_court_events_3.txt | 3474 ++ .../court_events/court_events_general.txt | 14384 +++++++++ .../court_events/court_events_general_1.txt | 1032 + N3OW/events/court_maintenance_events.txt | 703 + .../court_position_management_events.txt | 261 + .../decisions_events/east_europe_events.txt | 2998 ++ .../iberia_north_africa_events.txt | 3311 ++ .../mpo_greatest_of_khans_events.txt | 2825 ++ .../roman_restoration_events.txt | 3371 ++ N3OW/events/dlc/ach/ach_coronation_events.txt | 9640 ++++++ .../events/dlc/ach/ach_maintenance_events.txt | 720 + N3OW/events/dlc/ach/ach_yearly_events.txt | 2198 ++ .../dlc/bp3/bp3_court_position_events.txt | 210 + N3OW/events/dlc/bp3/bp3_journey_events.txt | 6813 ++++ N3OW/events/dlc/bp3/bp3_mapmaking.txt | 2793 ++ N3OW/events/dlc/bp3/bp3_roaming_events.txt | 2828 ++ N3OW/events/dlc/bp3/bp3_survey_events.txt | 4489 +++ N3OW/events/dlc/ce1/epidemic_events.txt | 9317 ++++++ N3OW/events/dlc/ce1/epidemic_events_2.txt | 951 + N3OW/events/dlc/ce1/legend_ending_events.txt | 134 + N3OW/events/dlc/ce1/legend_events.txt | 790 + .../events/dlc/ce1/legend_spread_events_8.txt | 4507 +++ .../dlc/ce1/legend_spread_events_nick.txt | 8131 +++++ .../dlc/ce1/legend_spread_events_veronica.txt | 3067 ++ N3OW/events/dlc/ce1/legitimacy_events.txt | 32 + .../dlc/ce1/physician_epidemic_events.txt | 1479 + .../ep1/ep1_character_interaction_events.txt | 719 + .../dlc/ep1/ep1_court_position_events.txt | 552 + N3OW/events/dlc/ep1/ep1_decision_events.txt | 575 + N3OW/events/dlc/ep1/ep1_flavor_events.txt | 6004 ++++ .../dlc/ep1/ep1_fund_inspiration_events.txt | 23811 ++++++++++++++ .../ep1_fund_inspiration_events_oltner.txt | 483 + .../dlc/ep1/ep1_inspiration_system_events.txt | 146 + N3OW/events/dlc/ep2/ep2_accolade_events.txt | 1200 + N3OW/events/dlc/ep2/ep2_tournament_events.txt | 14526 +++++++++ .../ep2_bloody_wedding_events.txt | 1845 ++ .../ep2/wedding_events/ep2_wedding_events.txt | 23494 ++++++++++++++ .../ep2_wedding_events_ewan.txt | 6109 ++++ N3OW/events/dlc/ep3/ep3_admin_events.txt | 696 + N3OW/events/dlc/ep3/ep3_akolouthos_events.txt | 332 + N3OW/events/dlc/ep3/ep3_camp_party_events.txt | 3727 +++ .../dlc/ep3/ep3_camp_temperament_events.txt | 1528 + N3OW/events/dlc/ep3/ep3_contract_events.txt | 10151 ++++++ N3OW/events/dlc/ep3/ep3_councillor_events.txt | 173 + N3OW/events/dlc/ep3/ep3_decisions_events.txt | 8076 +++++ N3OW/events/dlc/ep3/ep3_emperor_yearly_2.txt | 7034 ++++ N3OW/events/dlc/ep3/ep3_emperor_yearly_3.txt | 1947 ++ N3OW/events/dlc/ep3/ep3_emperor_yearly_8.txt | 2206 ++ N3OW/events/dlc/ep3/ep3_eparch_events.txt | 1879 ++ N3OW/events/dlc/ep3/ep3_governor_yearly_3.txt | 9178 ++++++ N3OW/events/dlc/ep3/ep3_governor_yearly_8.txt | 4489 +++ .../dlc/ep3/ep3_interactions_events.txt | 4609 +++ .../dlc/ep3/ep3_laamp_decision_events.txt | 22296 +++++++++++++ N3OW/events/dlc/ep3/ep3_laamp_events.txt | 9054 ++++++ N3OW/events/dlc/ep3/ep3_laamp_events_8.txt | 3979 +++ N3OW/events/dlc/ep3/ep3_laamp_flavor.txt | 1118 + .../dlc/ep3/ep3_laamp_flavor_oltner.txt | 328 + .../dlc/ep3/ep3_laamp_flavour_ewan_events.txt | 23648 ++++++++++++++ N3OW/events/dlc/ep3/ep3_laamps_provisions.txt | 1157 + .../dlc/ep3/ep3_landless_admin_events.txt | 2280 ++ .../dlc/ep3/ep3_powerful_families_8.txt | 2038 ++ .../dlc/ep3/ep3_roman_restoration_events.txt | 521 + .../ep3_story_cycle_admin_eunuch_events.txt | 6578 ++++ ...ep3_story_cycle_grand_ambitions_events.txt | 4234 +++ ...ory_cycle_harrying_of_the_north_events.txt | 4688 +++ .../ep3_story_cycle_violet_poet_events.txt | 2639 ++ N3OW/events/dlc/ep3/ep3_travel_events_3.txt | 1429 + N3OW/events/dlc/ep3/ep3_travel_events_8.txt | 528 + .../dlc/ep3/ep3_travel_option_events.txt | 4301 +++ N3OW/events/dlc/ep3/ep3_wedding_events.txt | 2616 ++ N3OW/events/dlc/ep3/ep3_yearly_1.txt | 267 + N3OW/events/dlc/ep3/ep3_yearly_3.txt | 9 + .../events/dlc/fp1/fp1_jomsvikings_events.txt | 2222 ++ .../dlc/fp1/fp1_major_decision_events.txt | 1423 + .../dlc/fp1/fp1_other_decision_events.txt | 2726 ++ .../fp1_scandinavian_adventurer_events.txt | 1113 + .../dlc/fp1/fp1_shieldmaiden_events.txt | 1426 + N3OW/events/dlc/fp1/fp1_trade_events.txt | 2494 ++ .../dlc/fp1/fp1_trial_by_combat_events.txt | 971 + .../fp1/fp1_varangian_adventure_events.txt | 29 + N3OW/events/dlc/fp1/fp1_yearly_events.txt | 16884 ++++++++++ .../dlc/fp1/fp1_yearly_events_oltner.txt | 2687 ++ N3OW/events/dlc/fp2/fp2_el_cid_events.txt | 552 + .../dlc/fp2/fp2_lyonese_monk_events.txt | 4800 +++ .../dlc/fp2/fp2_other_decision_events.txt | 2572 ++ N3OW/events/dlc/fp2/fp2_struggle_events.txt | 11749 +++++++ N3OW/events/dlc/fp2/fp2_yearly_events.txt | 6882 ++++ .../dlc/fp2/neutral_struggle_events.txt | 365 + N3OW/events/dlc/fp3/fp3_clan_events_2000.txt | 1493 + N3OW/events/dlc/fp3/fp3_clan_events_hugo.txt | 196 + N3OW/events/dlc/fp3/fp3_clan_events_ola.txt | 2515 ++ .../fp3_clan_events_persia_specific_ola.txt | 727 + .../dlc/fp3/fp3_dynasty_decision_events.txt | 1376 + .../dlc/fp3/fp3_extra_flavor_events.txt | 2221 ++ .../dlc/fp3/fp3_frontier_story_cycle.txt | 2056 ++ N3OW/events/dlc/fp3/fp3_heritage_events.txt | 3505 ++ .../dlc/fp3/fp3_misc_decision_events.txt | 2906 ++ .../dlc/fp3/fp3_religious_decision_events.txt | 1362 + .../events/dlc/fp3/fp3_scholarship_events.txt | 1918 ++ ...p3_story_cycle_seljuks_invasion_events.txt | 153 + .../fp3_story_cycle_zanj_rebellion_events.txt | 726 + N3OW/events/dlc/fp3/fp3_struggle_events.txt | 1339 + .../dlc/fp3/fp3_tax_collector_events_ola.txt | 1416 + .../fp3/fp3_tax_collector_flavor_events.txt | 1060 + .../events/dlc/fp3/fp3_yearly_events_eren.txt | 3131 ++ .../events/dlc/fp3/fp3_yearly_events_hugo.txt | 286 + .../dlc/fp3/fp3_yearly_events_ola_batch_1.txt | 4027 +++ .../dlc/fp3/fp3_yearly_frontier_chains.txt | 824 + .../dlc/mpo/court_astrologer_events.txt | 307 + N3OW/events/dlc/mpo/mpo_events_anna.txt | 988 + N3OW/events/dlc/mpo/mpo_events_ariana.txt | 4812 +++ N3OW/events/dlc/mpo/mpo_events_tova.txt | 1870 ++ .../dlc/mpo/mpo_flavor_events_settled.txt | 453 + .../dlc/mpo/mpo_interactions_events.txt | 1120 + .../dlc/mpo/mpo_jamukha_flavor_events.txt | 450 + .../dlc/mpo/mpo_migration_contract_events.txt | 1585 + N3OW/events/dlc/mpo/mpo_migration_events.txt | 4573 +++ .../dlc/mpo/mpo_migration_travel_events.txt | 1322 + N3OW/events/dlc/mpo/mpo_nomad_events_1.txt | 8980 +++++ .../mpo/mpo_nomads_blood_brothers_windy.txt | 131 + .../dlc/mpo/mpo_nomads_flavour_events.txt | 5743 ++++ .../mpo/mpo_nomads_flavour_events_oltner.txt | 1043 + .../dlc/mpo/mpo_nomads_season_events.txt | 856 + .../mpo_story_cycle_temujin_flavor_events.txt | 835 + N3OW/events/easteregg_events.txt | 61 + N3OW/events/error_suppression_events.txt | 198 + N3OW/events/game_rule_events.txt | 7421 +++++ N3OW/events/global_religion_events.txt | 1328 + N3OW/events/harm_events.txt | 9668 ++++++ N3OW/events/health_events.txt | 12008 +++++++ N3OW/events/historical_character_events.txt | 440 + N3OW/events/jester_stress_relief_events.txt | 1982 ++ .../learning_medicine_events.txt | 4447 +++ .../learning_scholarship_events.txt | 4559 +++ .../learning_theology_events.txt | 3946 +++ .../historical_commander_trait_events.txt | 884 + .../learn_commander_trait_events.txt | 2771 ++ .../martial_authority_events.txt | 2590 ++ .../martial_authority_events_2.txt | 697 + .../martial_chivalry_events.txt | 4562 +++ .../martial_strategy_events.txt | 3768 +++ .../martial_strategy_events_2.txt | 729 + .../warfare_lifestyle/warhorse_events.txt | 1578 + N3OW/events/marriage_effect_events.txt | 1126 + N3OW/events/misc_events.txt | 17 + .../mpo_chaotic_kurultai_succession.txt | 3146 ++ N3OW/events/mpo_flavor_events.txt | 58 + N3OW/events/mpo_misc.txt | 539 + N3OW/events/pregnancy_events.txt | 1735 + N3OW/events/realm_maintenance_events.txt | 423 + .../faith_conversion_events.txt | 469 + .../religion_events/faith_creation_events.txt | 668 + .../false_conversion_events.txt | 1486 + N3OW/events/religion_events/fervor_events.txt | 1938 ++ .../religion_events/great_holy_war_events.txt | 4662 +++ .../religion_events/head_of_faith_events.txt | 756 + N3OW/events/religion_events/heresy_events.txt | 1355 + .../religion_events/holy_order_events.txt | 1865 ++ .../human_sacrifice_events.txt | 231 + N3OW/events/religion_events/jewish_events.txt | 115 + .../religion_events/local_shrine_events.txt | 795 + .../religious_decision_events.txt | 3028 ++ .../religious_interaction_events.txt | 2824 ++ .../court_scheme_ongoing_events.txt | 5518 ++++ .../governor_contract_events.txt | 4516 +++ .../disbelieve_mandala_scheme_events.txt | 319 + .../sway_scheme/sway_outcome_events.txt | 979 + N3OW/events/secret_faith_events.txt | 246 + N3OW/events/siege_events.txt | 1368 + N3OW/events/single_combat_events.txt | 11831 +++++++ N3OW/events/test_events/debug.txt | 3442 ++ N3OW/events/test_events/debug_portraits.txt | 117 + N3OW/events/test_events/insult_poetry.txt | 104 + N3OW/events/test_events/poetry_events.txt | 317 + .../test_events/test_activity_events.txt | 207 + N3OW/events/test_events/test_court_events.txt | 167 + N3OW/events/title_events.txt | 535 + N3OW/events/travel_events/test_events.txt | 107 + .../travel_events/travel_events_bp3.txt | 5738 ++++ .../travel_events/travel_events_james.txt | 7423 +++++ N3OW/events/tutorial_events.txt | 444 + N3OW/events/varangian_events.txt | 1306 + N3OW/events/witch_events.txt | 4189 +++ .../events/yearly_events/bp1_yearly_james.txt | 8355 +++++ .../yearly_events/court_yearly_events.txt | 6399 ++++ N3OW/events/yearly_events/yearly_events_3.txt | 3461 ++ 203 files changed, 715955 insertions(+) create mode 100644 N3OW/events/_events.info create mode 100644 N3OW/events/accolade_events.txt create mode 100644 N3OW/events/activities/coronation_activity/coronation_events.txt create mode 100644 N3OW/events/activities/coronation_activity/coronation_events_1.txt create mode 100644 N3OW/events/activities/coronation_activity/coronation_events_6.txt create mode 100644 N3OW/events/activities/hold_court_activity/hold_court_events_general.txt create mode 100644 N3OW/events/activities/pilgrimage_activity/pilgrimage_events.txt create mode 100644 N3OW/events/activities/tour_activity/tour_grounds_events_chad.txt create mode 100644 N3OW/events/activities/tour_activity/tour_phase_cultural_festival.txt create mode 100644 N3OW/events/activities/tour_activity/tour_travel_events.txt create mode 100644 N3OW/events/activities/tournaments/veronica_local_events_2.txt create mode 100644 N3OW/events/artifacts/artifact_events.txt create mode 100644 N3OW/events/birth_events.txt create mode 100644 N3OW/events/blackmail_events.txt create mode 100644 N3OW/events/board_game_events.txt create mode 100644 N3OW/events/bookmark_events.txt create mode 100644 N3OW/events/bp1_dan_events.txt create mode 100644 N3OW/events/court_events/01_ep3_court_events_3.txt create mode 100644 N3OW/events/court_events/court_events_general.txt create mode 100644 N3OW/events/court_events/court_events_general_1.txt create mode 100644 N3OW/events/court_maintenance_events.txt create mode 100644 N3OW/events/court_position_management_events.txt create mode 100644 N3OW/events/decisions_events/east_europe_events.txt create mode 100644 N3OW/events/decisions_events/iberia_north_africa_events.txt create mode 100644 N3OW/events/decisions_events/mpo_greatest_of_khans_events.txt create mode 100644 N3OW/events/decisions_events/roman_restoration_events.txt create mode 100644 N3OW/events/dlc/ach/ach_coronation_events.txt create mode 100644 N3OW/events/dlc/ach/ach_maintenance_events.txt create mode 100644 N3OW/events/dlc/ach/ach_yearly_events.txt create mode 100644 N3OW/events/dlc/bp3/bp3_court_position_events.txt create mode 100644 N3OW/events/dlc/bp3/bp3_journey_events.txt create mode 100644 N3OW/events/dlc/bp3/bp3_mapmaking.txt create mode 100644 N3OW/events/dlc/bp3/bp3_roaming_events.txt create mode 100644 N3OW/events/dlc/bp3/bp3_survey_events.txt create mode 100644 N3OW/events/dlc/ce1/epidemic_events.txt create mode 100644 N3OW/events/dlc/ce1/epidemic_events_2.txt create mode 100644 N3OW/events/dlc/ce1/legend_ending_events.txt create mode 100644 N3OW/events/dlc/ce1/legend_events.txt create mode 100644 N3OW/events/dlc/ce1/legend_spread_events_8.txt create mode 100644 N3OW/events/dlc/ce1/legend_spread_events_nick.txt create mode 100644 N3OW/events/dlc/ce1/legend_spread_events_veronica.txt create mode 100644 N3OW/events/dlc/ce1/legitimacy_events.txt create mode 100644 N3OW/events/dlc/ce1/physician_epidemic_events.txt create mode 100644 N3OW/events/dlc/ep1/ep1_character_interaction_events.txt create mode 100644 N3OW/events/dlc/ep1/ep1_court_position_events.txt create mode 100644 N3OW/events/dlc/ep1/ep1_decision_events.txt create mode 100644 N3OW/events/dlc/ep1/ep1_flavor_events.txt create mode 100644 N3OW/events/dlc/ep1/ep1_fund_inspiration_events.txt create mode 100644 N3OW/events/dlc/ep1/ep1_fund_inspiration_events_oltner.txt create mode 100644 N3OW/events/dlc/ep1/ep1_inspiration_system_events.txt create mode 100644 N3OW/events/dlc/ep2/ep2_accolade_events.txt create mode 100644 N3OW/events/dlc/ep2/ep2_tournament_events.txt create mode 100644 N3OW/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt create mode 100644 N3OW/events/dlc/ep2/wedding_events/ep2_wedding_events.txt create mode 100644 N3OW/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt create mode 100644 N3OW/events/dlc/ep3/ep3_admin_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_akolouthos_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_camp_party_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_camp_temperament_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_contract_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_councillor_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_decisions_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_emperor_yearly_2.txt create mode 100644 N3OW/events/dlc/ep3/ep3_emperor_yearly_3.txt create mode 100644 N3OW/events/dlc/ep3/ep3_emperor_yearly_8.txt create mode 100644 N3OW/events/dlc/ep3/ep3_eparch_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_governor_yearly_3.txt create mode 100644 N3OW/events/dlc/ep3/ep3_governor_yearly_8.txt create mode 100644 N3OW/events/dlc/ep3/ep3_interactions_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_laamp_decision_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_laamp_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_laamp_events_8.txt create mode 100644 N3OW/events/dlc/ep3/ep3_laamp_flavor.txt create mode 100644 N3OW/events/dlc/ep3/ep3_laamp_flavor_oltner.txt create mode 100644 N3OW/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_laamps_provisions.txt create mode 100644 N3OW/events/dlc/ep3/ep3_landless_admin_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_powerful_families_8.txt create mode 100644 N3OW/events/dlc/ep3/ep3_roman_restoration_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_travel_events_3.txt create mode 100644 N3OW/events/dlc/ep3/ep3_travel_events_8.txt create mode 100644 N3OW/events/dlc/ep3/ep3_travel_option_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_wedding_events.txt create mode 100644 N3OW/events/dlc/ep3/ep3_yearly_1.txt create mode 100644 N3OW/events/dlc/ep3/ep3_yearly_3.txt create mode 100644 N3OW/events/dlc/fp1/fp1_jomsvikings_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_major_decision_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_other_decision_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_scandinavian_adventurer_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_shieldmaiden_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_trade_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_trial_by_combat_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_varangian_adventure_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_yearly_events.txt create mode 100644 N3OW/events/dlc/fp1/fp1_yearly_events_oltner.txt create mode 100644 N3OW/events/dlc/fp2/fp2_el_cid_events.txt create mode 100644 N3OW/events/dlc/fp2/fp2_lyonese_monk_events.txt create mode 100644 N3OW/events/dlc/fp2/fp2_other_decision_events.txt create mode 100644 N3OW/events/dlc/fp2/fp2_struggle_events.txt create mode 100644 N3OW/events/dlc/fp2/fp2_yearly_events.txt create mode 100644 N3OW/events/dlc/fp2/neutral_struggle_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_clan_events_2000.txt create mode 100644 N3OW/events/dlc/fp3/fp3_clan_events_hugo.txt create mode 100644 N3OW/events/dlc/fp3/fp3_clan_events_ola.txt create mode 100644 N3OW/events/dlc/fp3/fp3_clan_events_persia_specific_ola.txt create mode 100644 N3OW/events/dlc/fp3/fp3_dynasty_decision_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_extra_flavor_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_frontier_story_cycle.txt create mode 100644 N3OW/events/dlc/fp3/fp3_heritage_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_misc_decision_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_religious_decision_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_scholarship_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_struggle_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_tax_collector_events_ola.txt create mode 100644 N3OW/events/dlc/fp3/fp3_tax_collector_flavor_events.txt create mode 100644 N3OW/events/dlc/fp3/fp3_yearly_events_eren.txt create mode 100644 N3OW/events/dlc/fp3/fp3_yearly_events_hugo.txt create mode 100644 N3OW/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt create mode 100644 N3OW/events/dlc/fp3/fp3_yearly_frontier_chains.txt create mode 100644 N3OW/events/dlc/mpo/court_astrologer_events.txt create mode 100644 N3OW/events/dlc/mpo/mpo_events_anna.txt create mode 100644 N3OW/events/dlc/mpo/mpo_events_ariana.txt create mode 100644 N3OW/events/dlc/mpo/mpo_events_tova.txt create mode 100644 N3OW/events/dlc/mpo/mpo_flavor_events_settled.txt create mode 100644 N3OW/events/dlc/mpo/mpo_interactions_events.txt create mode 100644 N3OW/events/dlc/mpo/mpo_jamukha_flavor_events.txt create mode 100644 N3OW/events/dlc/mpo/mpo_migration_contract_events.txt create mode 100644 N3OW/events/dlc/mpo/mpo_migration_events.txt create mode 100644 N3OW/events/dlc/mpo/mpo_migration_travel_events.txt create mode 100644 N3OW/events/dlc/mpo/mpo_nomad_events_1.txt create mode 100644 N3OW/events/dlc/mpo/mpo_nomads_blood_brothers_windy.txt create mode 100644 N3OW/events/dlc/mpo/mpo_nomads_flavour_events.txt create mode 100644 N3OW/events/dlc/mpo/mpo_nomads_flavour_events_oltner.txt create mode 100644 N3OW/events/dlc/mpo/mpo_nomads_season_events.txt create mode 100644 N3OW/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt create mode 100644 N3OW/events/easteregg_events.txt create mode 100644 N3OW/events/error_suppression_events.txt create mode 100644 N3OW/events/game_rule_events.txt create mode 100644 N3OW/events/global_religion_events.txt create mode 100644 N3OW/events/harm_events.txt create mode 100644 N3OW/events/health_events.txt create mode 100644 N3OW/events/historical_character_events.txt create mode 100644 N3OW/events/jester_stress_relief_events.txt create mode 100644 N3OW/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt create mode 100644 N3OW/events/lifestyles/scholarship_lifestyle/learning_scholarship_events.txt create mode 100644 N3OW/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt create mode 100644 N3OW/events/lifestyles/warfare_lifestyle/historical_commander_trait_events.txt create mode 100644 N3OW/events/lifestyles/warfare_lifestyle/learn_commander_trait_events.txt create mode 100644 N3OW/events/lifestyles/warfare_lifestyle/martial_authority_events.txt create mode 100644 N3OW/events/lifestyles/warfare_lifestyle/martial_authority_events_2.txt create mode 100644 N3OW/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt create mode 100644 N3OW/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt create mode 100644 N3OW/events/lifestyles/warfare_lifestyle/martial_strategy_events_2.txt create mode 100644 N3OW/events/lifestyles/warfare_lifestyle/warhorse_events.txt create mode 100644 N3OW/events/marriage_effect_events.txt create mode 100644 N3OW/events/misc_events.txt create mode 100644 N3OW/events/mpo_chaotic_kurultai_succession.txt create mode 100644 N3OW/events/mpo_flavor_events.txt create mode 100644 N3OW/events/mpo_misc.txt create mode 100644 N3OW/events/pregnancy_events.txt create mode 100644 N3OW/events/realm_maintenance_events.txt create mode 100644 N3OW/events/religion_events/faith_conversion_events.txt create mode 100644 N3OW/events/religion_events/faith_creation_events.txt create mode 100644 N3OW/events/religion_events/false_conversion_events.txt create mode 100644 N3OW/events/religion_events/fervor_events.txt create mode 100644 N3OW/events/religion_events/great_holy_war_events.txt create mode 100644 N3OW/events/religion_events/head_of_faith_events.txt create mode 100644 N3OW/events/religion_events/heresy_events.txt create mode 100644 N3OW/events/religion_events/holy_order_events.txt create mode 100644 N3OW/events/religion_events/human_sacrifice_events.txt create mode 100644 N3OW/events/religion_events/jewish_events.txt create mode 100644 N3OW/events/religion_events/local_shrine_events.txt create mode 100644 N3OW/events/religion_events/religious_decision_events.txt create mode 100644 N3OW/events/religion_events/religious_interaction_events.txt create mode 100644 N3OW/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt create mode 100644 N3OW/events/scheme_events/governor_contract_events.txt create mode 100644 N3OW/events/scheme_events/mandala_schemes/disbelieve_mandala_scheme_events.txt create mode 100644 N3OW/events/scheme_events/sway_scheme/sway_outcome_events.txt create mode 100644 N3OW/events/secret_faith_events.txt create mode 100644 N3OW/events/siege_events.txt create mode 100644 N3OW/events/single_combat_events.txt create mode 100644 N3OW/events/test_events/debug.txt create mode 100644 N3OW/events/test_events/debug_portraits.txt create mode 100644 N3OW/events/test_events/insult_poetry.txt create mode 100644 N3OW/events/test_events/poetry_events.txt create mode 100644 N3OW/events/test_events/test_activity_events.txt create mode 100644 N3OW/events/test_events/test_court_events.txt create mode 100644 N3OW/events/title_events.txt create mode 100644 N3OW/events/travel_events/test_events.txt create mode 100644 N3OW/events/travel_events/travel_events_bp3.txt create mode 100644 N3OW/events/travel_events/travel_events_james.txt create mode 100644 N3OW/events/tutorial_events.txt create mode 100644 N3OW/events/varangian_events.txt create mode 100644 N3OW/events/witch_events.txt create mode 100644 N3OW/events/yearly_events/bp1_yearly_james.txt create mode 100644 N3OW/events/yearly_events/court_yearly_events.txt create mode 100644 N3OW/events/yearly_events/yearly_events_3.txt diff --git a/N3OW/events/_events.info b/N3OW/events/_events.info new file mode 100644 index 00000000..f1cbf182 --- /dev/null +++ b/N3OW/events/_events.info @@ -0,0 +1,195 @@ +=== Structure === + +Note: this is very very incomplete... + +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 + + # 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 + cooldown = { + days/weeks/months/years = script value + } + + # DLC or Mod that this Event belongs to, shown in Event Window if set. + content_source = X + + # Specify a character portrait to appear in the event on the specified position. + left_portrait = X + right_portrait = X + center_portrait = X # not used in all event types + lower_left_portrait = X + lower_center_portrait = X + lower_right_portrait = X + sender = X # for letter events, required + # 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' + + # A list of triggered animations. The first triggered animation that passes the trigger check will be used. + triggered_animation = { + trigger = ... + animation = animation name + # Instead of 'animation' you can also define a 'scripted_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 + } + triggered_animation = ... + + # A list of triggered outfits. The first triggered otfit that passes the trigger check will be used. + triggered_outfit = { + trigger = ... + outfit_tags = ... + remove_default_outfit = ... + hide_info = ... + } + triggered_outfit = ... + + # Override camera to be used instead of the normal event ones + 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) + } + + # 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 + } + + # 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 + on_trigger_fail = { + some effect + } + + # Specify custom widgets to embed in the event. See section about Custom Widgets below. + widgets = { + widget = { + # Trigger that controls the availability of the widget. Scope: same as the event, after immediate effect. Default: always = yes + is_shown = {} + # Name of the widget to use. Must be at the path /.gui + gui = "" + # Name of the widget where this custome widget will be insert + container = "" + # Some widgets require a custom controller (see below). Default: default + 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: {} + setup_scope = {} + } + } + widget = { ... } # alternative syntax for a single widget. Follows the same info as the widget in the widgets parameter + + 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 + X.. + + # A trigger that has to be fulfilled for this option to be valid. + trigger = {} + + # If the event 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 = {} + + # Highlights the event portrait of this character while this option is hovered. This is in addition to the automatic highlighting when hovering an event option that has an effect that affects portrait characters. + 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 + + # 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 + ai_chance = { # See common/scripted_modifiers/_scripted_modifiers.info for more details + base = 10 + modifier = { + add = 5 + + } + modifier = { + factor = 0.5 + + } + } + + ai_will_select = { # See common/script_values/_script_values.info for more details + base = 10 + if = { + limit = { + + } + add = 5 + } + else_if = { + limit = { + + } + multiply = 0.5 + } + } + } + + 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. + 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. + 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. + 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. + trigger = {} # Receives the event scope to check if it's valid. + reference = "" # Path to the texture + } + override_header_background = { # The header asset located behind the event icon. This overrides the header asset defined by the theme. If there are multiples defined here, the first one that passes its trigger will be selected. If none are valid, then the theme's header asset will be used + 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. + 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 +} + +=== Custom Widgets === + +Custom widgets can be embedded into events. +GUI files must be placed at the event_window_widgets path (see paths.settings). The name of the file must match the widget name. + +Some widgets that modify the game require a custom controller. This should be documented in the widget's GUI file. +The data context type available in the GUI depends on the controller type. + +Some controllers require special scope setup, which should be documented under Notes below. Use the setup_scope effect for that. + +Available controllers: + +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. +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 diff --git a/N3OW/events/accolade_events.txt b/N3OW/events/accolade_events.txt new file mode 100644 index 00000000..15147b76 --- /dev/null +++ b/N3OW/events/accolade_events.txt @@ -0,0 +1,891 @@ +namespace = accolade + +#Accolade rank gain notification +# by Jason Cantalini +accolade.0001 = { + hidden = yes + + trigger = { + exists = acclaimed_knight + has_dlc_feature = accolades + } + + immediate = { + scope:changing_accolade = { + acclaimed_knight = { + save_scope_as = acclaimed_knight + } + } + if = { + limit = { + scope:changing_accolade = { + accolade_rank >= 5 + } + } + send_interface_message = { + type = msg_accolade_gained_rank + title = accolade.0001.notification_high + desc = accolade_rank_unlock_notification_tooltip_high + left_icon = scope:acclaimed_knight + } + } + else = { + send_interface_message = { + type = msg_accolade_gained_rank + title = accolade.0001.notification_low + desc = accolade_rank_unlock_notification_tooltip_low + left_icon = scope:acclaimed_knight + } + } + } +} + +#Accolade rank loss notification +# by Jason Cantalini +accolade.0002 = { + hidden = yes + + trigger = { + has_dlc_feature = accolades + } + + immediate = { + if = { + limit = { + exists = scope:changing_accolade.acclaimed_knight + } + scope:changing_accolade = { + acclaimed_knight = { + save_scope_as = acclaimed_knight + } + } + if = { + limit = { + scope:changing_accolade = { + accolade_rank >= 5 + } + } + send_interface_message = { + type = msg_accolade_lost_rank + title = accolade.0002.notification_high + left_icon = scope:acclaimed_knight + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:acclaimed_knight = { + is_alive = yes + } + } + desc = accolade_rank_loss_notification_tooltip_high + } + desc = accolade_rank_loss_notification_tooltip_high_dead + } + } + } + } + else_if = { + limit = { + scope:changing_accolade = { + accolade_rank >= 1 + } + } + send_interface_message = { + type = msg_accolade_lost_rank + title = accolade.0002.notification_low + left_icon = scope:acclaimed_knight + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:acclaimed_knight = { + is_alive = yes + } + } + desc = accolade_rank_loss_notification_tooltip_low + } + desc = accolade_rank_loss_notification_tooltip_low_dead + } + } + } + } + else = { + send_interface_message = { + type = msg_accolade_lost_rank + title = accolade.0002.notification_low + left_icon = scope:acclaimed_knight + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:acclaimed_knight = { + is_alive = yes + } + } + desc = accolade_rank_loss_notification_tooltip_no_rank + } + desc = accolade_rank_loss_notification_tooltip_no_rank_dead + } + } + } + } + } + else_if = { + limit = { + NOT = { exists = scope:changing_accolade.acclaimed_knight } + scope:changing_accolade = { accolade_rank >= 1 } + } + send_interface_message = { + type = msg_accolade_lost_rank + title = accolade.0002.notification_empty + desc = accolade_rank_loss_notification_tooltip_empty + } + } + else = { + send_interface_message = { + type = msg_accolade_lost_rank + title = accolade.0002.notification_low + desc = accolade_rank_loss_notification_tooltip_empty_no_rank + } + } + } +} + +#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/N3OW/events/activities/coronation_activity/coronation_events.txt b/N3OW/events/activities/coronation_activity/coronation_events.txt new file mode 100644 index 00000000..7fc0bc96 --- /dev/null +++ b/N3OW/events/activities/coronation_activity/coronation_events.txt @@ -0,0 +1,5172 @@ +namespace = coronation_events + +##################################### +# Coronation - Systemic Events # +# coronation_events - 0000-9999 # +##################################### + +scripted_effect sworn_oath_effect = { + scope:activity = { + custom_tooltip = coronation_tt_positive_medium + change_variable = { + name = activity_special_type_progression + add = 10 + } + } +} + +scripted_effect warlike_oath_effect = { + scope:activity = { + every_attending_character = { + custom = warlike_character_opinion + limit = { + is_vassal_of = scope:host + OR = { + has_vassal_stance = glory_hound + has_vassal_stance = belligerent + } + } + add_opinion = { + modifier = respect_opinion + target = scope:host + opinion = 15 + } + } + } +} + +# Phase Controller +coronation_events.0050 = { + type = activity_event + hidden = yes + + trigger = { + involved_activity ?= { + NOT = { has_current_phase = coronation_phase_feast } + OR = { + is_current_phase_active = no + has_variable = ceremony_complete + } + } + } + + immediate = { + if = { + limit = { + involved_activity ?= { + NOT = { + any_in_list = { + variable = coronation_list_busy + OR = { + is_alive = yes + involved_activity ?= root.involved_activity + } + } + } + } + } + involved_activity ?= { + progress_activity_phase_after = { days = 1 } + } + } + else = { + trigger_event = { + id = coronation_events.0050 + weeks = 1 + } + } + } +} + +# Oath Event +coronation_events.0100 = { + type = activity_event + title = coronation_events.0100.t + desc = { + desc = coronation_events.0100.desc.opening + triggered_desc = { + trigger = { + scope:previous_ruler ?= { + is_close_family_of = root + } + } + desc = coronation_events.0100.desc.previous_ruler_close_family + } + triggered_desc = { + trigger = { + scope:previous_ruler ?= { + NOT = { is_close_family_of = root } + is_lowborn = yes + } + } + desc = coronation_events.0100.desc.previous_ruler_not_family_no_house + } + triggered_desc = { + trigger = { + scope:previous_ruler ?= { + NOT = { is_close_family_of = root } + } + } + desc = coronation_events.0100.desc.previous_ruler_not_family + } + triggered_desc = { + trigger = { + NOT = { exists = scope:previous_ruler } + } + desc = coronation_events.0100.desc.first_ruler + } + desc = coronation_events.0100.desc.outro + } + center_portrait = { + character = root + animation = storyteller + } + theme = coronation_activity + override_background = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_living_officiator_trigger = yes + } + } + reference = temple + } + override_background = { + trigger = { + NOT = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_living_officiator_trigger = yes + } + } + + } + reference = throne_room + } + + immediate = { + # For MP + coronation_busy_effect = yes + + save_scope_as = root_scope + coronation_set_oath_alternatives_effect = yes + primary_title.previous_holder ?= { + save_scope_as = previous_ruler + } + ### Special Checks + if = { + limit = { + any_in_list = { + list = chosen_oaths + this = flag:learning_oath_1 + } + } + if = { # University exists + limit = { + any_realm_county = { + title_province = { has_university_building_trigger = yes } + } + } + set_variable = { + name = learning_oath_1_university_exists + value = 1 + } + } + save_scope_value_as = { + name = learning_oath_temp_cost + value = oath_university_gold_value + } + save_scope_value_as = { + name = learning_oath_temp_development + value = oath_university_development_value + } + } + + if = { + limit = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + struggle:iberian_struggle = { save_scope_as = involved_struggle } + } + else_if = { + limit = { + any_character_struggle = { is_struggle_type = persian_struggle } + } + struggle:persian_struggle = { save_scope_as = involved_struggle } + } + } + + ## Diplomacy + # Alliances + option = { + name = coronation_events.0100.alliances + flavor = coronation_events.0100.alliances_flavor + reason = alliance_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:diplomacy_oath_1 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = diplomacy_oath_1 + TIME = 7300 + } + } + + ai_chance = { + base = 0 + } + } + + # Children + option = { + name = coronation_events.0100.children + flavor = coronation_events.0100.children_flavor + reason = children_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:diplomacy_oath_2 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = diplomacy_oath_2 + TIME = 10950 + } + } + + ai_chance = { + base = 10 + } + } + + ## Martial + # Reconquest + option = { + name = coronation_events.0100.reconquest + flavor = coronation_events.0100.reconquest_flavor + reason = reconquest_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:martial_oath_1 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = martial_oath_1 + TIME = 7300 + } + set_variable = { + name = oath_reconquest_title + value = primary_title + } + create_character_memory = { + type = reconquest_oath_memory + } + } + # Vassals who approve + warlike_oath_effect = yes + # Threatened rulers who disapprove + scope:activity = { + every_attending_character = { + custom = coronation_events.0100.reconquest_opinion + limit = { + any_directly_owned_province = { + barony = { + target_is_de_jure_liege_or_above = scope:host.primary_title + } + } + NOR = { + target_is_liege_or_above = scope:host + this = scope:host + } + } + add_opinion = { + modifier = threatened_opinion + target = root + opinion = -20 + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + # Conquest + option = { + name = coronation_events.0100.conquest + flavor = coronation_events.0100.conquest_flavor + reason = conquest_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:martial_oath_2 + } + } + sworn_oath_effect = yes + + scope:host = { + if = { + limit = { + is_ai = yes + } + add_character_modifier = { + modifier = oath_warlike_ai_modifier + years = 20 + } + } + coronation_chosen_oath_setup_effect = { + VAR = martial_oath_2 + TIME = 7300 + } + set_variable = { + name = oath_conquest_size + value = oath_conquest_value_1 + } + create_character_memory = { + type = conquest_oath_memory + } + } + # Vassals who approve + warlike_oath_effect = yes + # Threatened rulers who disapprove + scope:activity = { + every_attending_character = { + custom = coronation_events.0100.conquest_opinion + limit = { + any_held_title = { + is_neighbor_to_realm = root + } + NOR = { + target_is_liege_or_above = scope:host + this = scope:host + } + } + add_opinion = { + modifier = threatened_opinion + target = root + opinion = -20 + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + ## Stewardship + # Peace + option = { + name = coronation_events.0100.peace + flavor = coronation_events.0100.peace_flavor + reason = peace_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:stewardship_oath_1 + } + } + sworn_oath_effect = yes + + scope:host = { + if = { + limit = { + is_ai = yes + } + add_character_modifier = { + modifier = oath_peaceful_ai_modifier + years = 20 + } + } + coronation_chosen_oath_setup_effect = { + VAR = stewardship_oath_1 + TIME = 18250 + } + + } + + ai_chance = { + base = 10 + } + } + + # Buildings + option = { + name = coronation_events.0100.buildings + flavor = coronation_events.0100.buildings_flavor + reason = build_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:stewardship_oath_2 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = stewardship_oath_2 + TIME = 7300 + } + set_variable = { + name = stewardship_oath_2_buildings + value = 0 + } + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + ai_has_economical_boom_personality = yes + } + modifier = { + factor = 0 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + ## Intrigue + + ## Learning + # University + option = { + name = coronation_events.0100.university + flavor = coronation_events.0100.university_flavor + reason = university_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:learning_oath_1 + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = learning_oath_1 + TIME = 18250 + } + set_variable = { + name = learning_oath_cost + value = scope:learning_oath_temp_cost + } + } + + ai_chance = { + base = 0 + } + } + + # De jure rights + + option = { + name = coronation_events.0100.purge_pretenders + flavor = coronation_events.0100.purge_pretenders_flavor + reason = purge_pretenders_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:purge_pretenders_oath + } + } + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = purge_pretenders_oath + TIME = 7300 + } + set_variable = { + name = purge_pretenders_target_title + value = primary_title + } + } + + ai_chance = { + base = 0 + } + } + + # End the Struggle + option = { + name = coronation_events.0100.end_the_struggle + flavor = coronation_events.0100.end_the_struggle_flavor + reason = end_the_struggle_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:end_the_struggle_oath + } + } + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = end_the_struggle_oath + TIME = 18250 + } + if = { + limit = { + any_character_struggle = { is_struggle_type = iberian_struggle } + } + set_variable = { + name = end_the_struggle_oath_type_var + value = flag:iberian_struggle + } + } + else_if = { + limit = { + any_character_struggle = { is_struggle_type = persian_struggle } + } + set_variable = { + name = end_the_struggle_oath_type_var + value = flag:persian_struggle + } + + } + } + + ai_chance = { + base = 0 + } + } + + # Greatest Hunter + option = { + name = coronation_events.0100.greatest_hunter + flavor = coronation_events.0100.greatest_hunter_flavor + reason = greatest_hunter_oath + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:greatest_hunter_oath + } + } + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = greatest_hunter_oath + TIME = 14600 + } + set_variable = { + name = greatest_hunter_oath_r_counter + value = 0 + } + set_variable = { + name = greatest_hunter_oath_l_counter + value = 0 + } + } + + ai_chance = { + base = 0 + modifier = { + add = 10 + has_trait = lifestyle_hunter + } + modifier = { + add = 10 + ai_energy > 0 + } + } + } + + # Heir Preparation + option = { + name = coronation_events.0100.heir_preparation + flavor = coronation_events.0100.heir_preparation_flavor + reason = heir_preparation_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:heir_preparation_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = heir_preparation_oath + TIME = 14600 + } + } + + ai_chance = { + base = 0 + } + } + + # Install Claimants + option = { + name = coronation_events.0100.install_claimants + flavor = coronation_events.0100.install_claimants_flavor + reason = install_claimants_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:install_claimants_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = install_claimants_oath + TIME = 7300 + } + set_variable = { + name = install_claimants_oath_counter + value = 0 + } + } + + ai_chance = { + base = 0 + } + } + + # Mend the Fracture + option = { + name = coronation_events.0100.mend_the_fracture + flavor = coronation_events.0100.mend_the_fracture_flavor + reason = mend_the_fracture_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:mend_the_fracture_oath + } + } + sworn_oath_effect = yes + + random_sub_realm_county = { + limit = { + culture != root.culture + culture = { + cultural_acceptance = { + target = root.culture + value <= 20 + } + any_culture_county = { + count >= 6 + holder = { + target_is_liege_or_above = root + } + } + any_culture_county = { + percent >= 0.6 + holder = { + target_is_liege_or_above = root + } + } + } + } + culture = { + save_scope_as = target_culture + } + } + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = mend_the_fracture_oath + TIME = 7300 + } + set_variable = { + name = mend_the_fracture_oath_target_culture + value = scope:target_culture + } + } + + ai_chance = { + base = 0 + } + } + + # Provide for the Warriors + option = { + name = coronation_events.0100.provide_for_the_warriors + flavor = coronation_events.0100.provide_for_the_warriors_flavor + reason = provide_for_the_warriors_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:provide_for_the_warriors_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = provide_for_the_warriors_oath + TIME = 7300 + } + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + ai_has_economical_boom_personality = yes + } + modifier = { + factor = 0 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + # Provide for the Faithful + option = { + name = coronation_events.0100.provide_for_the_faithful + flavor = coronation_events.0100.provide_for_the_faithful_flavor + reason = provide_for_the_faithful_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:provide_for_the_faithful_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = provide_for_the_faithful_oath + TIME = 7300 + } + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + ai_has_economical_boom_personality = yes + } + modifier = { + factor = 0 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + # Provide for the Poor + + option = { + name = coronation_events.0100.provide_for_the_poor + flavor = coronation_events.0100.provide_for_the_poor_flavor + reason = provide_for_the_poor_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:provide_for_the_poor_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = provide_for_the_poor_oath + TIME = 7300 + } + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + ai_has_economical_boom_personality = yes + } + modifier = { + factor = 0 + OR = { + ai_has_warlike_personality = yes + ai_has_conqueror_personality = yes + } + } + } + } + + # Repent + + option = { + name = coronation_events.0100.repent + flavor = coronation_events.0100.repent_flavor + reason = repent_oath + + trigger = { + any_in_list = { + list = chosen_oaths + this = flag:repent_oath + } + } + sworn_oath_effect = yes + + scope:host = { + coronation_chosen_oath_setup_effect = { + VAR = repent_oath + TIME = 7300 + } + set_variable = { + name = repent_oath_pilgrimage_counter + value = 0 + } + } + + ai_chance = { + base = 0 + } + } + + # Opt-out, where you don't take an oath + option = { + name = coronation_events.0100.opt_out + scope:host = { + add_character_flag = { + flag = coronation_no_oath + days = 40 + } + } + ai_chance = { + base = 1 + } + } + + after = { + # For MP + coronation_ready_effect = yes + + scope:activity = { + every_attending_character = { + limit = { + NOT = { this = root } + } + trigger_event = coronation_events.0110 + } + } + # Cleanup of variable checks + remove_variable = learning_oath_1_university_exists + + if = { + limit = { + has_multiple_players = yes + scope:activity = { + any_attending_character = { + NOT = { this = scope:host } + is_ai = no + } + } + } + scope:activity = { + progress_activity_phase_after = { weeks = 8 } + set_variable = ceremony_complete + } + trigger_event = { + id = coronation_events.0050 + weeks = 1 + } + } + else = { + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } +} + +# Oath - Attendee Followup Event +coronation_events.0110 = { + type = activity_event + title = coronation_events.0110.t + desc = { + desc = coronation_events.0110.desc.intro + first_valid = { + # Diplomacy + triggered_desc = { + trigger = { + scope:activity = { + has_variable = diplomacy_oath_1 + } + } + desc = coronation_events.0110.desc.diplomacy_oath_1 + } + # Martial + triggered_desc = { + trigger = { + scope:activity = { + has_variable = martial_oath_1 + } + } + desc = coronation_events.0110.desc.martial_oath_1 + } + triggered_desc = { + trigger = { + scope:activity = { + has_variable = martial_oath_2 + } + } + desc = coronation_events.0110.desc.martial_oath_2 + } + # Stewardship + triggered_desc = { + trigger = { + scope:activity = { + has_variable = stewardship_oath_1 + } + } + desc = coronation_events.0110.desc.stewardship_oath_1 + } + triggered_desc = { + trigger = { + scope:activity = { + has_variable = stewardship_oath_2 + } + } + desc = coronation_events.0110.desc.stewardship_oath_2 + } + # Intrigue + # Learning + triggered_desc = { + trigger = { + scope:activity = { + has_variable = learning_oath_1 + } + } + desc = coronation_events.0110.desc.learning_oath_1 + } + # De Jure Rights + triggered_desc = { + trigger = { + scope:activity = { + has_variable = purge_pretenders_oath + } + } + desc = coronation_events.0110.desc.purge_pretenders_oath + } + # End the Struggle + triggered_desc = { + trigger = { + scope:activity = { + has_variable = end_the_struggle_oath + } + } + desc = coronation_events.0110.desc.end_the_struggle_oath + } + # Greatest Hunter + triggered_desc = { + trigger = { + scope:activity = { + has_variable = greatest_hunter_oath + } + } + desc = coronation_events.0110.desc.greatest_hunter_oath + } + # Heir Preparation + triggered_desc = { + trigger = { + scope:activity = { + has_variable = heir_preparation_oath + } + } + desc = coronation_events.0110.desc.heir_preparation_oath + } + # Install Claimants + triggered_desc = { + trigger = { + scope:activity = { + has_variable = install_claimants_oath + } + } + desc = coronation_events.0110.desc.install_claimants_oath + } + # Mend the Fracture + triggered_desc = { + trigger = { + scope:activity = { + has_variable = mend_the_fracture_oath + } + } + desc = coronation_events.0110.desc.mend_the_fracture_oath + } + # Provide for the Warriors + triggered_desc = { + trigger = { + scope:activity = { + has_variable = provide_for_the_warriors_oath + } + } + desc = coronation_events.0110.desc.provide_for_the_warriors_oath + } + # Provide for the Faithful + triggered_desc = { + trigger = { + scope:activity = { + has_variable = provide_for_the_faithful_oath + } + } + desc = coronation_events.0110.desc.provide_for_the_faithful_oath + } + # Provide for the Poor + triggered_desc = { + trigger = { + scope:activity = { + has_variable = provide_for_the_poor_oath + } + } + desc = coronation_events.0110.desc.provide_for_the_poor_oath + } + # Repent + triggered_desc = { + trigger = { + scope:activity = { + has_variable = repent_oath + } + } + desc = coronation_events.0110.desc.repent_oath + } + + # Other + desc = coronation_events.0110.desc.fallback + } + desc = coronation_events.0110.desc.outro + } + center_portrait = { + character = scope:activity.activity_host + animation = storyteller + } + theme = coronation_activity + override_background = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_living_officiator_trigger = yes + } + } + reference = temple + } + override_background = { + trigger = { + NOT = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_living_officiator_trigger = yes + } + } + + } + reference = throne_room + } + + immediate = { + # For MP + coronation_busy_effect = yes + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + has_character_flag = coronation_no_oath + } + } + desc = coronation_events.0110.no_oath + } + desc = coronation_events.0110.regular + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Oath Failure Event +coronation_events.0150 = { + type = character_event + title = coronation_events.0150.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = honest + } + desc = coronation_events.0150.desc_honest + } + triggered_desc = { + trigger = { + has_trait = deceitful + } + desc = coronation_events.0150.desc_deceitful + } + desc = coronation_events.0150.desc + } + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = honest + } + animation = grief + } + triggered_animation = { + trigger = { + has_trait = deceitful + } + animation = dismissal + } + animation = disapproval + } + theme = coronation + + trigger = { + highest_held_title_tier >= tier_kingdom + calc_true_if = { + amount > 0 + AND = { + has_variable = diplomacy_oath_1 + NOT = { has_variable = diplomacy_oath_1_timer } + } + AND = { + has_variable = diplomacy_oath_2 + NOT = { has_variable = diplomacy_oath_2_timer } + } + AND = { + has_variable = martial_oath_1 + NOT = { has_variable = martial_oath_1_timer } + } + AND = { + has_variable = martial_oath_2 + NOT = { has_variable = martial_oath_2_timer } + } + AND = { + has_variable = stewardship_oath_1 + NOT = { has_variable = stewardship_oath_1_timer } + } + AND = { + has_variable = stewardship_oath_2 + NOT = { has_variable = stewardship_oath_2_timer } + } + AND = { + has_variable = learning_oath_1 + NOT = { has_variable = learning_oath_1_timer } + } + AND = { + has_variable = purge_pretenders_oath + NOT = { has_variable = purge_pretenders_oath_timer } + } + AND = { + has_variable = end_the_struggle_oath + NOT = { has_variable = end_the_struggle_oath_timer } + } + AND = { + has_variable = greatest_hunter_oath + NOT = { has_variable = greatest_hunter_oath_timer } + } + AND = { + has_variable = heir_preparation_oath + NOT = { has_variable = heir_preparation_oath_timer } + } + AND = { + has_variable = install_claimants_oath + NOT = { has_variable = install_claimants_oath_timer } + } + AND = { + has_variable = mend_the_fracture_oath + NOT = { has_variable = mend_the_fracture_oath_timer } + } + AND = { + has_variable = provide_for_the_warriors_oath + NOT = { has_variable = provide_for_the_warriors_oath_timer } + } + AND = { + has_variable = provide_for_the_faithful_oath + NOT = { has_variable = provide_for_the_faithful_oath_timer } + } + AND = { + has_variable = provide_for_the_poor_oath + NOT = { has_variable = provide_for_the_poor_oath_timer } + } + AND = { + has_variable = repent_oath + NOT = { has_variable = repent_oath_timer } + } + } + } + + immediate = { + # Diplomacy + coronation_oath_remove_variable_on_failure_effect = { + VAR = diplomacy_oath_1 + } + coronation_oath_remove_variable_on_failure_effect = { + VAR = diplomacy_oath_2 + } + # Martial + coronation_oath_remove_variable_on_failure_effect = { + VAR = martial_oath_1 + } + coronation_oath_remove_variable_on_failure_effect = { + VAR = martial_oath_2 + } + # Stewardship + coronation_oath_remove_variable_on_failure_effect = { + VAR = stewardship_oath_1 + } + coronation_oath_remove_variable_on_failure_effect = { + VAR = stewardship_oath_2 + } + # Intrigue + # Learning + coronation_oath_remove_variable_on_failure_effect = { + VAR = learning_oath_1 + } + + # Purge Pretenders + coronation_oath_remove_variable_on_failure_effect = { + VAR = purge_pretenders_oath + } + + #End the Struggle + coronation_oath_remove_variable_on_failure_effect = { + VAR = end_the_struggle_oath + } + + # Greatest Hunter + coronation_oath_remove_variable_on_failure_effect = { + VAR = greatest_hunter_oath + } + # Heir Preparation + coronation_oath_remove_variable_on_failure_effect = { + VAR = heir_preparation_oath + } + # Install Claimants + coronation_oath_remove_variable_on_failure_effect = { + VAR = install_claimants_oath + } + # Mend the Fracture + coronation_oath_remove_variable_on_failure_effect = { + VAR = mend_the_fracture_oath + } + # Provide for the Warriors + coronation_oath_remove_variable_on_failure_effect = { + VAR = provide_for_the_warriors_oath + } + # Provide for the Faithful + coronation_oath_remove_variable_on_failure_effect = { + VAR = provide_for_the_faithful_oath + } + # Provide for the Poor + coronation_oath_remove_variable_on_failure_effect = { + VAR = provide_for_the_poor_oath + } + # Repent + coronation_oath_remove_variable_on_failure_effect = { + VAR = repent_oath + } + + coronation_broken_oath_punishment_effect = yes + } + + option = { + name = { + trigger = { + always = yes + } + text = coronation_events.0150.a + } + name = { + trigger = { + has_trait = deceitful + } + text = coronation_events.0150.a_deceitful + } + name = { + trigger = { + has_trait = honest + } + text = coronation_events.0150.a_honest + } + + add_prestige = { + value = { + value = -20 + multiply = scope:scale_of_oath_failure_scope + min = -10000 + max = -100 + } + } + + add_legitimacy = { + value = { + value = -10 + multiply = scope:scale_of_oath_failure_scope + min = -2000 + max = -50 + } + } + + if = { + limit = { + is_ai = no + } + set_nickname_effect = { NICKNAME = nick_the_oathbreaker } + } + else = { + random = { + chance = 5 + set_nickname_effect = { NICKNAME = nick_the_oathbreaker } + } + } + + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } +} + +# Oath Success Event +coronation_events.0175 = { + type = character_event + title = coronation_events.0175.t + desc = coronation_events.0175.desc + left_portrait = { + character = root + triggered_animation = { + trigger = { + drinks_alcohol_trigger = yes + } + animation = toast_goblet + } + triggered_animation = { + trigger = { + drinks_alcohol_trigger = no + } + animation = happiness + } + } + theme = coronation + + override_effect_2d = { + reference = legend_glow + } + + immediate = { + switch = { + trigger = scope:find_oath + flag:diplomacy_oath_1 = { + coronation_oath_reward_effect = { VARIABLE = diplomacy_oath_1 } + } + flag:diplomacy_oath_2 = { + coronation_oath_reward_effect = { VARIABLE = diplomacy_oath_2 } + } + flag:martial_oath_1 = { + coronation_oath_reward_effect = { VARIABLE = martial_oath_1 } + } + flag:martial_oath_2 = { + coronation_oath_reward_effect = { VARIABLE = martial_oath_2 } + } + flag:stewardship_oath_1 = { + coronation_oath_reward_effect = { VARIABLE = stewardship_oath_1 } + } + flag:stewardship_oath_2 = { + coronation_oath_reward_effect = { VARIABLE = stewardship_oath_2 } + } + flag:learning_oath_1 = { + coronation_oath_reward_effect = { VARIABLE = learning_oath_1 } + } + flag:purge_pretenders_oath = { + coronation_oath_reward_effect = { VARIABLE = purge_pretenders_oath } + } + flag:end_the_struggle_oath = { + coronation_oath_reward_effect = { VARIABLE = end_the_struggle_oath } + } + flag:greatest_hunter_oath = { + coronation_oath_reward_effect = { VARIABLE = greatest_hunter_oath } + } + flag:heir_preparation_oath = { + coronation_oath_reward_effect = { VARIABLE = heir_preparation_oath } + } + flag:install_claimants_oath = { + coronation_oath_reward_effect = { VARIABLE = install_claimants_oath } + } + flag:mend_the_fracture_oath = { + coronation_oath_reward_effect = { VARIABLE = mend_the_fracture_oath } + } + flag:provide_for_the_warriors_oath = { + coronation_oath_reward_effect = { VARIABLE = provide_for_the_warriors_oath } + } + flag:provide_for_the_faithful_oath = { + coronation_oath_reward_effect = { VARIABLE = provide_for_the_faithful_oath } + } + flag:provide_for_the_poor_oath = { + coronation_oath_reward_effect = { VARIABLE = provide_for_the_poor_oath } + } + flag:repent_oath = { + coronation_oath_reward_effect = { VARIABLE = repent_oath } + } + } + } + + option = { + name = coronation_events.0175.a + stress_impact = { base = medium_stress_loss } + + if = { + limit = { + has_variable = oath_reconquest_title + } + remove_variable = oath_reconquest_title + } + } +} + +scripted_trigger coronation_events_0200_available_chaplain_trigger = { + basic_is_available_ai = yes + is_travelling = no + NOR = { + exists = involved_activity + has_character_flag = planning_an_activity + } +} + +# Start of Prelude Phase +coronation_events.0200 = { + type = activity_event + title = coronation_events.0200.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity.activity_host = root + } + desc = coronation_events.0200.desc.host + } + triggered_desc = { + trigger = { + scope:activity.activity_host != root + } + desc = coronation_events.0200.desc.guest + } + } + } + left_portrait = { + character = scope:attendee + animation = standing_horse + camera = camera_event_standing_with_horse_left_angled_in + } + center_portrait = { + character = scope:activity.activity_host + triggered_animation = { + trigger = { + OR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_meritocratic + government_has_flag = government_is_japan_administrative + } + } + animation = emperor + } + animation = storyteller + camera = camera_event_center_moved_left + } + right_portrait = { + character = scope:other_guest + triggered_animation = { + trigger = { + scope:host = { + coronation_host_east_asian_admin_or_mandala_trigger = yes + } + is_merit_based_official = yes + } + animation = gongshou_with_hu + } + triggered_animation = { + trigger = { + scope:host = { + coronation_host_east_asian_admin_or_mandala_trigger = yes + } + } + animation = throne_room_bow_2 + } + animation = throne_room_applaud_1 + camera = camera_event_right_to_the_right + } + override_background = { + trigger = { + involved_activity.activity_location.culture ?= { has_building_gfx = southeast_asian_building_gfx } + } + reference = ep2_holy_site_indian + } + override_background = { + trigger = { + OR = { + involved_activity.activity_location.culture ?= { has_graphical_western_culture_group_trigger = yes } + involved_activity.activity_location = { steppe_building_gfx_use_western_trigger = yes } + #Do not want generic courtyard calling up Constantinople for this one + location.county = title:c_byzantion + } + NOT = { + scope:activity.activity_location.county.title_province ?= { + has_holding_type = tribal_holding + } + } + } + reference = bp2_courtyard + } + override_background = { + reference = courtyard + } + theme = coronation + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + activity_host = { save_scope_as = host } + + if = { + limit = { + NOT = { + root = scope:host + } + } + root = { save_scope_as = attendee } + } + else = { + random_attending_character = { + limit = { + NOR = { + this = scope:host + is_courtier_of = scope:host + } + } + alternative_limit = { + NOT = { + this = scope:host + } + } + save_scope_as = attendee + } + } + random_attending_character = { + limit = { + NOR = { + this = scope:host + this = scope:attendee + is_in_guest_subset = { + name = detractor + } + is_spouse_of = scope:host + } + OR = { + AND = { + is_courtier_of = scope:host + NOT = { + has_relation_rival = scope:host + } + } + + is_in_guest_subset = { + name = supporter + } + } + } + alternative_limit = { + NOR = { + this = scope:host + this = scope:attendee + } + } + save_scope_as = other_guest + } + } + if = { + limit = { + this = scope:host + } + scope:activity = { + coronation_update_supporters_detractors_effect = yes + } + } + } + + option = { + name = coronation_events.0200.a + trigger = { + scope:activity.activity_host = root + } + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + any_attending_character = { + this = scope:host.faith.religious_head + is_alive = yes + is_imprisoned = no + + } + } + } + coronation_proper_artifact_crown_trigger = yes + OR = { + cp:councillor_court_chaplain.involved_activity ?= root.involved_activity + involved_activity = { + any_attending_character = { + government_has_flag = government_is_theocracy + } + } + #Can be forcibly added + cp:councillor_court_chaplain ?= { + coronation_events_0200_available_chaplain_trigger = yes + } + } + } + trigger_event = coronation_events.0300 + } + else_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + any_attending_character = { + this = scope:host.faith.religious_head + is_alive = yes + is_imprisoned = no + } + } + } + involved_activity = { + set_variable = { + name = officiator + value = scope:host.faith.religious_head + } + scope:host.faith.religious_head = { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + } + } + } + + option = { + name = coronation_events.0200.b + trigger = { + scope:activity.activity_host != root + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +scripted_trigger coronation_events_0205_audience = { + NOR = { + this = scope:host + this = root + trigger_if = { + limit = { + exists = scope:activity.special_guest:priest + } + this = scope:activity.special_guest:priest + } + is_spouse_of = scope:host + is_close_family_of = scope:host + is_diarch_of_target = scope:host + } +} + +# Start of Ceremony Phase +coronation_events.0205 = { + type = activity_event + title = coronation_events.0205.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + involved_activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.meager + } + desc = coronation_events.0205.great + } + first_valid = { + triggered_desc = { + trigger = { + location.barony = title:b_constantinople + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.0205.hagia_sophia + } + triggered_desc = { + trigger = { + location.barony = title:b_paris + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + OR = { + primary_title = title:k_france + primary_title = title:e_france + culture = { + OR = { + this = culture:french + any_parent_culture_or_above = { + this = culture:french + } + } + } + location.culture = { + OR = { + this = culture:french + any_parent_culture_or_above = { + this = culture:french + } + } + } + } + } + desc = coronation_events.0205.saint_denis + } + triggered_desc = { + trigger = { + current_year > 1000 + location.barony = title:b_krakow + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.0205.wawel + } + triggered_desc = { + trigger = { + location.barony = title:b_vaticano + faith = faith:catholic + scope:host.faith = faith:catholic + } + desc = coronation_events.0205.st_peters + } + triggered_desc = { + trigger = { + current_year >= 950 + location.barony = title:b_london + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.0205.westminster + } + triggered_desc = { + trigger = { + location.barony = title:b_reims + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.0205.reims + } + triggered_desc = { + trigger = { + location.barony = title:b_aachen + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + NOT = { + government_has_flag = government_is_nomadic + } + } + desc = coronation_events.0205.aachen + } + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + desc = coronation_events.0205.east_admin_location + } + desc = coronation_events.0205.temple + } + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + desc = coronation_events.0205.east_admin_description + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.silence + } + desc = coronation_events.0205.cheers + } + first_valid = { + triggered_desc = { + trigger = { + scope:activity.activity_host = root + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + desc = coronation_events.0205.desc.host_east_asian + } + triggered_desc = { + trigger = { + scope:activity.activity_host = root + } + desc = coronation_events.0205.desc.host + + } + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + desc = coronation_events.0205.desc.guest_east_asian + } + triggered_desc = { + trigger = { + involved_activity.activity_host != root + } + desc = coronation_events.0205.desc.guest + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.desc.low_magnificence_east_asian + } + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.var:activity_special_type_progression < 75 + } + desc = coronation_events.0205.desc.medium_magnificence_east_asian + } + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.var:activity_special_type_progression < 75 + } + desc = coronation_events.0205.desc.high_magnificence_east_asian + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.desc.low_magnificence + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 75 + } + desc = coronation_events.0205.desc.medium_magnificence + } + desc = coronation_events.0205.desc.high_magnificence + } + } + left_portrait = { + triggered_animation = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + animation = throne_room_bow_2 + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + animation = rage + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + animation = throne_room_cheer_1 + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + } + animation = personality_content + } + character = scope:audience_1 + camera = camera_event_left_away_3_4 + hide_info = yes + } + center_portrait = { + character = involved_activity.activity_host + triggered_animation = { + trigger = { + OR = { + scope:activity.var:activity_special_type_progression < 25 + scope:host = { + coronation_host_east_asian_admin_or_mandala_trigger = yes + } + scope:host = { + government_has_flag = government_is_steppe_admin + } + } + } + animation = jockey_walk + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + } + animation = jockey_wave + } + camera = camera_event_horse_left_centered + } + right_portrait = { + triggered_animation = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + animation = throne_room_bow_2 + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + animation = war_defender + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + animation = throne_room_cheer_2 + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + } + animation = throne_room_cheer_1 + } + character = scope:audience_2 + camera = camera_event_far_right_very_right + hide_info = yes + } + theme = coronation + + #East Asian exterior holy sites + override_background = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.activity_location ?= { + OR = { + culture ?= { has_graphical_east_asia_culture_group_trigger = yes } + steppe_building_gfx_use_east_asian_trigger = yes + culture ?= { has_graphical_india_culture_group_trigger = yes } + steppe_building_gfx_use_indian_trigger = yes + } + } + } + reference = holy_site_generic + } + #Cool gates + override_background = { + trigger = { + location = { + NOR = { + has_holding_type = tribal_holding + has_holding_type = herder_holding + has_holding_type = nomad_holding + culture = { has_building_gfx = southeast_asian_building_gfx } + } + OR = { + geographical_region = mediteranean_coast + geographical_region = world_asia_minor + culture = { has_graphical_mediterranean_culture_group_trigger = yes } + steppe_building_gfx_use_mediterranean_trigger = yes + geographical_region = graphical_mena + geographical_region = graphical_india + culture ?= { has_building_gfx = iranian_building_gfx } + culture ?= { has_building_gfx = indian_building_gfx } + AND = { + geographical_region = world_europe_west_iberia + faith ?= { religion = religion:islam_religion } + } + steppe_building_gfx_use_indian_trigger = yes + AND = { + steppe_building_gfx_use_mena_trigger = yes + NOT = { + root = { government_has_flag = government_is_tribal } + geographical_region = world_steppe + } + } + } + } + } + reference = ep3_city_gate + } + #Nomadic market doesn't look great - and east asian admins should use courtyard + override_background = { + trigger = { + OR = { + location.county.holder = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + } + reference = courtyard + } + #Put some SEA in there + override_background = { + trigger = { + location.culture = { has_building_gfx = southeast_asian_building_gfx } + } + reference = tgp_village_sea + } + override_background = { + reference = market + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + exists = scope:rain_day + } + reference = rain + } + + immediate = { + # For MP + coronation_busy_effect = yes + random_rain_snow_chance_effect = yes + involved_activity = { + activity_host = { + save_scope_as = host + save_scope_as = value_target + } + activity_location = { save_scope_as = location } + #Guards for orderly east asian ceremonies in the palace + if = { + limit = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + create_character = { + template = mercenary + location = scope:location + culture = scope:host.culture + faith = scope:host.faith + gender_female_chance = scope_value_target_soldier_female_chance + save_scope_as = audience_1 + } + create_character = { + template = mercenary + location = scope:location + culture = scope:host.culture + faith = scope:host.faith + gender_female_chance = scope_value_target_soldier_female_chance + save_scope_as = audience_2 + } + } + else = { + create_character = { + template = generic_peasant_character_no_rags + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = audience_1 + } + create_character = { + template = generic_peasant_character_no_rags + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = audience_2 + } + } + + } + play_coronation_ceremony_music_effect = yes + scope:host = { + if = { + limit = { + root = { is_ai = no } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_lifestyle = martial_lifestyle + } + } + add_character_flag = { + flag = need_military_outfit + days = 30 + } + } + } + if = { + limit = { + this = scope:host + } + coronation_ceremony_magnificence_effect = yes + } + if = { + limit = { + this = scope:host + } + scope:activity = { + coronation_update_supporters_detractors_effect = yes + } + } + } + #normal host entrance + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.0205.a_low_magnificence_east_admin + } + triggered_desc = { + trigger = { + OR = { + scope:activity.var:activity_special_type_progression < 25 + AND = { + scope:activity.var:activity_special_type_progression < 75 + OR = { + has_trait = shy + has_trait = paranoid + has_trait = craven + } + } + } + } + desc = coronation_events.0205.a_low_magnificence + } + triggered_desc = { + trigger = { + OR = { + scope:activity.var:activity_special_type_progression >= 75 + has_trait = arrogant + has_trait = trusting + has_trait = ambitious + has_trait = gregarious + has_trait = trusting + } + NOR = { + has_trait = humble + has_trait = content + has_trait = depressed + } + } + desc = coronation_events.0205.a_high_magnificence + } + desc = coronation_events.0205.a + } + } + } + trigger = { + this = scope:host + NOR = { + has_disfiguring_physical_attribute_trigger = yes + has_trait = infirm + health <= dying_health + has_regal_presence_trait_trigger = yes + } + } + coronation_ceremony_county_effect = yes + if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + stress_impact = { + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + } + + #You are physically not great to look at and that kind of ruins the ceremony... + option = { + trigger = { + this = scope:host + OR = { + has_disfiguring_physical_attribute_trigger = yes + has_trait = infirm + health <= dying_health + } + } + name = coronation_events.0205.b + flavor = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:activity = { + OR = { + has_activity_option = { + category = ceremony_size + option = coronation_large_ceremony + } + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_lavish + } + } + } + has_activity_intent = coronation_impress_attendees + } + } + desc = coronation_events.0205.b_improved + } + triggered_desc = { + trigger = { + OR = { + has_trait = infirm + health <= dying_health + } + } + desc = coronation_events.0205.b_flavor_infirm + } + } + } + coronation_ceremony_county_effect = yes + + + if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + stress_impact = { + base = miniscule_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 75 + } + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + + #You are a glorious sight + option = { + name = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + text = coronation_events.0205.c_low_magnificence_east_admin + } + name = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + NOT = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + } + text = coronation_events.0205.c_low_magnificence + } + name = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + } + text = coronation_events.0205.c + } + trigger = { + this = scope:host + has_regal_presence_trait_trigger = yes + NOR = { + has_disfiguring_physical_attribute_trigger = yes + has_trait = infirm + health <= dying_health + } + } + add_prestige = minor_prestige_gain + coronation_ceremony_county_effect = yes + if = { + limit = { + scope:activity.var:activity_special_type_progression >= 25 + } + stress_impact = { + arrogant = minor_stress_impact_loss + } + } + } + + option = { + name = coronation_events.0205.d + trigger = { + this != scope:host + } + } + + option = { # Magnificence is disastrous, pay gold to fix it + name = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + text = coronation_events.0205.e_east_admin + } + name = { + trigger = { + NOT = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + } + text = coronation_events.0205.e + } + trigger = { + this = scope:host + scope:activity.var:activity_special_type_progression < 25 + } + flavor = coronation_events.0205.e.tt + #AI often have worse coronations because they don't save up beforehand + if = { + limit = { + is_ai = no + } + remove_short_term_gold = massive_gold_value + } + else = { + remove_short_term_gold = major_gold_value + } + + custom_tooltip = coronation_tt_positive_massive + scope:activity = { activity_special_type_progression_massive = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_massive + CHAR = root + } + hidden_effect = { + involved_activity = { + every_attending_character = { + limit = { this != root } + send_interface_toast = { + title = coronation_events.0205.e.toast + left_icon = scope:host + custom_tooltip = coronation_tt_positive_massive # No effect, just the tooltip + } + } + } + } + ai_chance = { + base = 1 + modifier = { + short_term_gold <= massive_gold_value + factor = 0 + } + } + } + + option = { # Magnificence is disastrous, get stressed to try and fix it + name = { + trigger = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + text = coronation_events.0205.f_east_admin + } + name = { + trigger = { + NOT = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_steppe_admin + } + } + } + } + text = coronation_events.0205.f + } + trigger = { + this = scope:host + scope:activity.var:activity_special_type_progression < 25 + } + flavor = coronation_events.0205.f.tt + duel = { + skills = { diplomacy learning } + value = decent_skill_rating + 65 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.0205.f.success + send_interface_toast = { + title = coronation_events.0205.f.success + left_icon = root + custom_tooltip = coronation_tt_positive_massive + scope:activity = { activity_special_type_progression_massive = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_massive + CHAR = root + } + } + hidden_effect = { + involved_activity = { + every_attending_character = { + limit = { this != root } + send_interface_toast = { + title = coronation_events.0205.f.toast + left_icon = scope:host + custom_tooltip = coronation_tt_positive_massive # No effect, just the tooltip + } + } + } + } + } + 35 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.0205.f.failure + send_interface_toast = { + title = coronation_events.0205.f.failure + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + if = { + limit = { is_ai = no } + stress_impact = { + base = massive_stress_impact_gain + } + } + else = { + stress_impact = { + base = major_stress_impact_gain + } + } + ai_chance = { + base = 0 + modifier = { + OR = { + diplomacy >= high_skill_rating + learning >= high_skill_rating + } + add = 1 + } + modifier = { + OR = { + ai_energy >= high_positive_ai_value + ai_sociability >= high_positive_ai_value + AND = { + ai_energy >= low_positive_ai_value + ai_sociability >= low_positive_ai_value + } + } + add = 0.1 + } + modifier = { + has_a_bad_stress_coping_trait_trigger = no + stress_level = 0 + NOR = { + diplomacy < low_skill_rating + learning < low_skill_rating + } + add = 0.25 + } + modifier = { + stress <= 15 + has_a_bad_stress_coping_trait_trigger = no + stress_level = 0 + NOR = { + diplomacy <= low_skill_rating + learning <= low_skill_rating + } + add = 0.25 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + + scope:audience_1 = { + silent_disappearance_effect = yes + } + scope:audience_2 = { + silent_disappearance_effect = yes + } + #Ask for clergy/nobility approval event + if = { + limit = { + root = scope:host + #God-Kings and the Mandate of Heaven-adjacent skip the assents + scope:host = { + NOR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_meritocratic + government_has_flag = government_is_mandala + government_is_japanese_trigger = yes + } + } + } + trigger_event = { + id = coronation_events.6120 + days = 3 + } + } + #God-Kings and the Mandate of Heaven-adjacent skip the assents - Host + else_if = { + limit = { + root = scope:host + scope:host = { + coronation_host_east_asian_admin_or_mandala_trigger = yes + } + } + #artifact blessing + trigger_event = { + id = coronation_events.6110 + days = 12 + } + } + #God-Kings and the Mandate of Heaven-adjacent skip the assents - Guest + else_if = { + limit = { + scope:host = { + OR = { + government_has_flag = government_is_celestial + government_has_flag = government_is_meritocratic + government_has_flag = government_is_mandala + government_is_japanese_trigger = yes + } + } + } + #Anointment event + trigger_event = { + id = coronation_events.6130 + days = 9 + } + } + #Guest + else = { + trigger_event = { + id = coronation_events.6123 + days = 6 + } + } + } +} + +# Start of Feast Phase +coronation_events.0210 = { + type = activity_event + title = coronation_events.0210.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity.activity_host = root + } + desc = coronation_events.0210.desc.host + } + triggered_desc = { + trigger = { + scope:activity.activity_host != root + } + desc = coronation_events.0210.desc.guest + } + } + } + left_portrait = { + character = scope:attendee + triggered_animation = { + trigger = { + drinks_alcohol_trigger = yes + } + animation = drink_goblet + } + triggered_animation = { + trigger = { + NOR = { + AND = { + is_ai = no + is_in_guest_subset = { name = detractor } + } + involved_activity = { + is_target_in_variable_list = { + name = major_detractor + target = scope:attendee + } + } + has_activity_intent = coronation_disrupt_loyalists + } + } + animation = personality_content + } + animation = eyeroll + camera = camera_event_left_to_the_left + } + center_portrait = { + character = scope:activity.activity_host + animation = toast_goblet + camera = camera_event_center_pointing_slighty_left + } + right_portrait = { + character = scope:musician + animation = instrument_active + camera = camera_event_far_right_very_right + hide_info = yes + } + theme = coronation + override_background = { + reference = feast + } + + immediate = { + # For MP + coronation_busy_effect = yes + involved_activity = { + activity_host = { save_scope_as = host } + if = { + limit = { + NOT = { root = scope:host } + } + root = { save_scope_as = attendee } + } + else = { + random_attending_character = { + limit = { + NOR = { + this = scope:host + is_courtier_of = scope:host + } + } + save_scope_as = attendee + } + } + } + create_character = { + template = bard_template + dynasty = none + location = root.location + gender_female_chance = root_faith_dominant_gender_female_chance + save_scope_as = musician + } + if = { + limit = { + this = scope:host + } + scope:activity = { + coronation_update_supporters_detractors_effect = yes + } + } + } + + option = { + name = coronation_events.0210.a + trigger = { + scope:activity.activity_host = root + } + stress_impact = { + base = miniscule_stress_impact_loss + gluttonous = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + } + } + + option = { + name = coronation_events.0210.b + trigger = { + scope:activity.activity_host != root + } + stress_impact = { + gluttonous = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + } + } + + after = { + # For MP + coronation_ready_effect = yes + scope:musician = { + silent_disappearance_effect = yes + } + } +} + +scripted_effect coronation_events_0300_theocratic_candidate_effect = { + +} + +# Choosing an officiator +coronation_events.0300 = { + type = activity_event + title = coronation_events.0300.t + desc = coronation_events.0300.desc + left_portrait = { + character = scope:animation_1 + animation = personality_zealous + } + center_portrait = { + character = scope:animation_3 + animation = wedding_priest + } + right_portrait = { + character = scope:animation_2 + animation = chaplain + } + theme = coronation_activity + + trigger = { + NOT = { + involved_activity = { + has_variable = officiator + var:officiator ?= { + is_alive = yes + involved_activity ?= root.involved_activity + } + } + } + OR = { + cp:councillor_court_chaplain.involved_activity ?= involved_activity + involved_activity = { + any_attending_character = { + government_has_flag = government_is_theocracy + } + } + #Can be forcibly added to activity + cp:councillor_court_chaplain = { + coronation_events_0200_available_chaplain_trigger = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + if = { + limit = { + OR = { + cp:councillor_court_chaplain.involved_activity ?= involved_activity + cp:councillor_court_chaplain = { + coronation_events_0200_available_chaplain_trigger = yes + } + } + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + save_scope_as = animation_1 + } + #Forcibly add to activity if they ain't there + if = { + limit = { + NOT = { + exists = cp:councillor_court_chaplain.involved_activity + cp:councillor_court_chaplain.involved_activity = involved_activity + } + } + hidden_effect = { + cp:councillor_court_chaplain = { + set_location = root.location + add_to_activity_without_travel = root.involved_activity + } + } + } + } + + involved_activity = { + ordered_attending_character = { + limit = { + faith = root.faith + NOT = { scope:chaplain ?= this } + government_has_flag = government_is_theocracy + } + save_scope_as = alternative_1 + if = { + limit = { + NOT = { exists = scope:animation_1 } + } + save_scope_as = animation_1 + } + else = { + save_scope_as = animation_2 + } + } + ordered_attending_character = { + limit = { + faith = root.faith + NOR = { scope:alternative_1 ?= this scope:chaplain ?= this} + government_has_flag = government_is_theocracy + } + save_scope_as = alternative_2 + if = { + limit = { + NOT = { exists = scope:animation_1 } + } + save_scope_as = animation_1 + } + else = { + save_scope_as = animation_3 + } + } + } + } + + # Court Chaplain + option = { + name = coronation_events.0300.a + trigger = { + exists = scope:chaplain + } + involved_activity = { + set_variable = { + name = officiator + value = scope:chaplain + } + } + scope:chaplain = { + if = { + limit = { + this = faith.religious_head + } + root = { add_piety = medium_piety_gain } + } + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + root = { highest_held_title_tier >= tier_empire } + } + add_piety = major_piety_gain + add_prestige = major_prestige_gain + } + else = { + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + } + + custom_tooltip = coronation_events_0300_a_tooltip + + ai_chance = { + base = 100 + modifier = { + add = 100 + scope:chaplain = { + is_vassal_of = root + } + } + } + } + + # Relevant character - 1 + option = { + name = coronation_events.0300.b + trigger = { + exists = scope:alternative_1 + } + involved_activity = { + set_variable = { + name = officiator + value = scope:alternative_1 + } + } + scope:alternative_1 = { + if = { + limit = { + this = faith.religious_head + } + root = { add_piety = medium_piety_gain } + } + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + root = { highest_held_title_tier >= tier_empire } + } + add_piety = major_piety_gain + add_prestige = major_prestige_gain + } + else = { + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + } + + custom_tooltip = coronation_events_0300_b_tooltip + + ai_chance = { + base = 10 + modifier = { + add = 20 + scope:alternative_1 = { + is_vassal_of = root + } + } + } + } + + # Relevant character - 2 + option = { + name = coronation_events.0300.c + trigger = { + exists = scope:alternative_2 + } + involved_activity = { + set_variable = { + name = officiator + value = scope:alternative_2 + } + } + scope:alternative_2 = { + if = { + limit = { + this = faith.religious_head + } + root = { add_piety = medium_piety_gain } + } + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + root = { highest_held_title_tier >= tier_empire } + } + add_piety = major_piety_gain + add_prestige = major_prestige_gain + } + else = { + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + } + + custom_tooltip = coronation_events_0300_c_tooltip + + ai_chance = { + base = 10 + modifier = { + add = 20 + scope:alternative_2 = { + is_vassal_of = root + } + } + } + } + + # Myself + option = { + name = coronation_events.0300.d + + custom_tooltip = coronation_events_0300_d_tooltip + #No effect if you are head of faith + if = { + limit = { + NAND = { + exists = faith.religious_head + this = faith.religious_head + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + custom_tooltip = coronation_events_0300_d_tooltip_effect_hof + } + else = { + custom_tooltip = coronation_events_0300_d_tooltip_effect + } + } + + + ai_chance = { + base = 0 + modifier = { + has_trait = cynical + add = 20 + } + modifier = { + has_trait = ambitious + add = 20 + } + modifier = { + has_trait = paranoid + add = 20 + } + modifier = { + has_trait = arrogant + add = 20 + } + modifier = { + culture = { has_cultural_pillar = heritage_iberian } + scope:chaplain ?= { + opinion = { + target = root + value >= 0 + } + } + add = 200 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + + involved_activity = { + var:officiator ?= { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + } + } +} + +#Death of the Officiator +coronation_events.0301 = { + type = activity_event + title = coronation_events.0301.t + + desc = coronation_events.0301.desc + + theme = coronation_activity + + left_portrait = { + character = root + animation = personality_zealous + } + + center_portrait = { + character = scope:first_candidate + animation = wedding_priest + } + right_portrait = { + trigger = { + exists = scope:second_candidate + } + character = scope:second_candidate + animation = prayer + } + + lower_left_portrait = { + character = scope:dead_officiator + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + var:officiator ?= { + save_scope_as = dead_officiator + } + } + + if = { + limit = { + cp:councillor_court_chaplain ?= { + NOT = { this = scope:dead_officiator } + } + } + cp:councillor_court_chaplain = { + save_scope_as = first_candidate + } + } + else = { + create_character = { + template = virtuous_priest_character_template + location = scope:activity.activity_location + culture = scope:activity.activity_location.culture + faith = root.faith + save_scope_as = first_candidate + } + } + + scope:first_candidate = { + if = { + limit = { + NOT = { location = scope:activity.activity_location } + } + set_location = scope:activity.activity_location + } + if = { + limit = { + NOT = { involved_activity = root.involved_activity } + } + add_to_activity = root.involved_activity + } + } + if = { + limit = { + faith.religious_head = { #when in Rome + location.county = root.location.county + NOT = { + this = scope:first_candidate + } + } + + } + faith.religious_head = { + save_scope_as = second_candidate + } + } + else = { + involved_activity = { + ordered_attending_character = { + order_by = piety_level + limit = { + faith = root.faith + government_has_flag = government_is_theocracy + NOT = { this = scope:dead_officiator this = scope:first_candidate } + } + save_scope_as = second_candidate + } + } + } + save_scope_as = new_officiator #error suppresion + } + + option = { + name = coronation_events.0301.a + + custom_tooltip = coronation_events.0301.a.tooltip + + trigger = { + trigger_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + is_ai = no + } + piety_level >= 4 + } + NAND = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:second_candidate ?= root.faith.religious_head + } + } + + show_as_unavailable = { + NAND = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:second_candidate ?= root.faith.religious_head + } + } + + scope:first_candidate = { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + involved_activity = { + set_variable = { + name = officiator + value = scope:first_candidate + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = coronation_events.0301.b + + trigger = { + exists = scope:second_candidate + trigger_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + NOT = { + scope:second_candidate = root.faith.religious_head #Whomst to prevent a new pope from blessing you + } + + } + scope:second_candidate.piety_level >= 4 + } + } + + show_as_unavailable = { + exists = scope:second_candidate + } + + custom_tooltip = coronation_events.0301.b.tooltip + + scope:second_candidate = { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + involved_activity = { + set_variable = { + name = officiator + value = scope:second_candidate + } + } + } + + option = { + name = coronation_events.0301.c + + trigger = { + has_ce1_dlc_trigger = yes + } + custom_tooltip = coronation_events.0301.c.tooltip + custom_tooltip = coronation_events.0301.c.tooltip_second + custom_tooltip = coronation_events.0301.c.tooltip_third + + set_variable = { + name = dead_officiator_funeral + value = scope:dead_officiator + } + + + ai_chance = { + base = 0 + } + + add_character_flag = { + flag = cancelled_coronation + years = 1 + } + } + + option = { + name = coronation_events.0301.d + + custom_tooltip = coronation_events.0301.d.tooltip + + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + piety_level <= 3 + is_ai = no + NOT = { + scope:second_candidate ?= root.faith.religious_head + } + } + + add_piety_level = -1 + custom_tooltip = coronation_tt_negative_major + scope:activity = { activity_special_type_progression_negative_major = yes } + scope:first_candidate = { + add_character_flag = { + flag = coronation_officiator + years = 2 + } + } + involved_activity = { + set_variable = { + name = officiator + value = scope:first_candidate + } + } + } + + option = { + name = coronation_events.0301.e + + custom_tooltip = coronation_events.0301.e.tooltip + custom_tooltip = coronation_events.0301.e.tooltip_second + + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + is_ai = no + has_ce1_dlc_trigger = no + piety_level <= 3 + } + + add_character_flag = { + flag = cancelled_coronation + years = 1 + } + } + + + after = { + # For MP + coronation_ready_effect = yes + + scope:first_candidate = { + if = { + limit = { + NOR = { + has_character_flag = coronation_officiator + root.cp:councillor_court_chaplain = this + } + } + silent_disappearance_effect = yes + } + } + } + +} + +coronation_events.0302 = { + scope = none + hidden = yes + + immediate = { + if = { + limit = { + has_ach_dlc_trigger = yes + } + every_kingdom = { + holder ?= { + if = { + limit = { + is_independent_ruler = yes + is_alive = yes + coronation_trigger = yes + NOT = { + coronation_has_proper_artifact_trigger = yes + } + } + coronation_create_artifact_game_start_effect = yes + } + } + } + every_empire = { + holder ?= { + if = { + limit = { + is_independent_ruler = yes + is_alive = yes + coronation_trigger = yes + NOT = { + coronation_has_proper_artifact_trigger = yes + } + } + coronation_create_artifact_game_start_effect = yes + } + } + } + every_hegemony = { + holder ?= { + if = { + limit = { + is_independent_ruler = yes + is_alive = yes + coronation_trigger = yes + NOT = { + coronation_has_proper_artifact_trigger = yes + } + } + coronation_create_artifact_game_start_effect = yes + } + } + } + } + } +} + + +coronation_events.0310 = { + type = activity_event + title = coronation_events.0310.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:high_magnificence + } + desc = coronation_events.0310.desc.high_magnificence + } + triggered_desc = { + trigger = { + exists = scope:mid_magnificence + } + desc = coronation_events.0310.desc.mid_magnificence + } + triggered_desc = { + trigger = { + exists = scope:low_magnificence + } + desc = coronation_events.0310.desc.low_magnificence + } + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:impress_attendees + } + desc = coronation_events.0310.desc.impress_attendees + } + triggered_desc = { + trigger = { + exists = scope:weaken_detractors + } + desc = coronation_events.0310.desc.weaken_detractors + } + triggered_desc = { + trigger = { + exists = scope:embrace_supporters + } + desc = coronation_events.0310.desc.embrace_supporters + } + triggered_desc = { + trigger = { + exists = scope:exalt_crown + } + desc = coronation_events.0310.desc.exalt_crown + } + } + } + + theme = coronation_activity + + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:low_magnificence + } + animation = worry + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + } + animation = ecstasy + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + } + animation = personality_cynical + } + camera = camera_event_very_left + } + + override_effect_2d = { + trigger = { + exists = scope:high_magnificence + } + reference = legend_glow + } + + override_effect_2d = { + trigger = { + exists = scope:low_magnificence + } + reference = flies + } + + center_portrait = { + character = scope:first_char + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:impress_attendees + } + animation = dismissal + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:impress_attendees + } + animation = admiration + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:impress_attendees + } + animation = drink + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:weaken_detractors + } + animation = eyeroll + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:weaken_detractors + } + animation = fear + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:weaken_detractors + } + animation = shock + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:embrace_supporters + } + animation = eyeroll + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:embrace_supporters + } + animation = happiness + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:embrace_supporters + } + animation = personality_content + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:exalt_crown + } + animation = eyeroll + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:exalt_crown + } + animation = hero_flex + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:exalt_crown + } + animation = personality_rational + } + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:second_char + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:impress_attendees + } + animation = personality_callous + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:impress_attendees + } + animation = personality_compassionate + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:impress_attendees + } + animation = reception_bride_right + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:weaken_detractors + } + animation = map_disgust + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:weaken_detractors + } + animation = personality_coward + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:weaken_detractors + } + animation = sadness + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:embrace_supporters + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:embrace_supporters + } + animation = obsequious_bow + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:embrace_supporters + } + animation = interested + } + triggered_animation = { + trigger = { + exists = scope:low_magnificence + exists = scope:exalt_crown + } + animation = personality_callous + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + exists = scope:exalt_crown + } + animation = personality_greedy + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + exists = scope:exalt_crown + } + animation = spymaster + } + } + + trigger = { + trigger_if = { + limit = { + has_activity_intent = coronation_impress_attendees + } + var:host_intent_start ?= flag:coronation_impress_attendees + } + trigger_else_if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + var:host_intent_start ?= flag:coronation_weaken_detractors + } + trigger_else_if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + var:host_intent_start ?= flag:coronation_embrace_supporters + } + trigger_else_if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + var:host_intent_start ?= flag:coronation_exalt_crown + } + trigger_else = { + always = no + } + } + + on_trigger_fail = { + trigger_event = coronation_events.0311 + } + + immediate = { + add_character_flag = no_coronation_events + # For MP + coronation_busy_effect = yes + + save_scope_as = host + custom_tooltip = happened_because_intent_tt + if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + save_scope_as = low_magnificence + set_variable = { + name = reward_tier + value = 1 + } + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + } + save_scope_as = high_magnificence + set_variable = { + name = reward_tier + value = 3 + } + } + else = { + save_scope_as = mid_magnificence + set_variable = { + name = reward_tier + value = 2 + } + } + set_variable = { + name = reward_tier_plus_one + value = { + add = var:reward_tier + add = 1 + } + } + set_variable = { + name = reward_tier_plus_two + value = { + add = var:reward_tier + add = 2 + } + } + switch = { + trigger = has_activity_intent + coronation_impress_attendees = { + save_scope_as = impress_attendees + scope:activity = { + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = prev + } + } + } + save_scope_as = first_char + } + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = prev + } + } + } + save_scope_as = second_char + } + } + } + coronation_weaken_detractors = { + save_scope_as = weaken_detractors + scope:activity = { + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = prev + } + } + } + save_scope_as = first_char + } + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = prev + } + } + NOT = { + this = scope:first_char + } + } + save_scope_as = second_char + } + } + } + coronation_embrace_supporters = { + save_scope_as = embrace_supporters + scope:activity = { + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = prev + } + } + } + save_scope_as = first_char + } + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = prev + } + } + NOT = { + this = scope:first_char + } + } + save_scope_as = second_char + } + } + } + coronation_exalt_crown = { + save_scope_as = exalt_crown + scope:activity = { + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = prev + } + } + } + save_scope_as = first_char + } + random_attending_character = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = prev + } + } + NOT = { + this = scope:first_char + } + } + save_scope_as = second_char + } + } + } + } + if = { + limit = { + NOT = { exists = scope:first_char } + } + scope:activity = { + random_attending_character = { + limit = { + exists = scope:second_char + NOR = { + this = scope:second_char + this = root + } + } + save_scope_as = first_char + } + } + } + if = { + limit = { + NOT = { exists = scope:second_char } + } + scope:activity = { + random_attending_character = { + limit = { + exists = scope:first_char + NOR = { + this = scope:first_char + this = root + } + } + save_scope_as = second_char + } + } + } + } + + option = { #impress_attendees cultural acceptance + name = coronation_events.0310.a + trigger = { + exists = scope:impress_attendees + scope:activity = { + any_attending_character = { count >= 3 culture != scope:activity.activity_host.culture } + } + } + custom_tooltip = coronation_events.0310.a.reward.tooltip + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = stewardship + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.a.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.a.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.a.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:cultural_acceptance + } + } + + option = { #impress_attendees opinion gain + name = coronation_events.0310.b + trigger = { + exists = scope:impress_attendees + } + custom_tooltip = coronation_events.0310.b.reward.tooltip + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = diplomacy + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.b.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.b.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.b.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:opinion_gain + } + } + + option = { #impress_attendees legitimacy and prestige gain + name = coronation_events.0310.c + custom_tooltip = coronation_events.0310.c.reward.tooltip + trigger = { + exists = scope:impress_attendees + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = intrigue + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.c.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.c.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.c.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:legitimacy_and_prestige_gain + } + } + + option = { #weaken_detractors prevents detractors from joining new factions for x years + name = coronation_events.0310.d + trigger = { + exists = scope:weaken_detractors + } + custom_tooltip = coronation_events.0310.d.reward.tooltip + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = diplomacy + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.d.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.d.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.d.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:prevent_faction_joining + } + } + + option = { #weaken_detractors detractors more easily imprisoned + name = coronation_events.0310.e + custom_tooltip = coronation_events.0310.e.reward.tooltip + trigger = { + exists = scope:weaken_detractors + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = intrigue + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.e.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.e.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.e.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:easier_imprisonment + } + + } + + option = { #weaken_detractors stress 'em + name = coronation_events.0310.f + custom_tooltip = coronation_events.0310.f.reward.tooltip + trigger = { + exists = scope:weaken_detractors + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = learning + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.f.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.f.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.f.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:stress + } + } + + option = { #embrace_supporters supporter vassals get modifier that makes them better at being councillors + name = coronation_events.0310.g + custom_tooltip = coronation_events.0310.g.reward.tooltip + trigger = { + exists = scope:embrace_supporters + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = learning + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.g.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.g.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.g.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:better_councillors + } + } + + option = { #embrace_supporters supporter vassals get development boost to their realms + name = coronation_events.0310.h + custom_tooltip = coronation_events.0310.h.reward.tooltip + trigger = { + exists = scope:embrace_supporters + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = stewardship + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.h.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.h.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.h.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:vassal_development_boost + } + } + + option = { #embrace_supporters supporter vassals get defensive bonuses to their realms + name = coronation_events.0310.i + custom_tooltip = coronation_events.0310.i.reward.tooltip + trigger = { + exists = scope:embrace_supporters + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = martial + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.i.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.i.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.i.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:vassal_defensive_boost + } + } + + option = { #exalt_crown artifact boost + name = coronation_events.0310.j + custom_tooltip = coronation_events.0310.j.reward.tooltip + trigger = { + exists = scope:exalt_crown + any_character_artifact = { + count >= 3 + exists = this + } + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = learning + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.j.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.j.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.j.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:artifact_boost + } + } + + option = { #exalt_crown domain boost development + name = coronation_events.0310.k + custom_tooltip = coronation_events.0310.k.reward.tooltip + trigger = { + exists = scope:exalt_crown + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = stewardship + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.k.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + change_variable = { + name = reward_tier + add = 1 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.k.success + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.k.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:host_development_boost + } + } + + option = { #exalt_crown domain boost defense + name = coronation_events.0310.l + custom_tooltip = coronation_host_defense_boost_reward_tt + trigger = { + exists = scope:exalt_crown + } + switch = { + trigger = exists + scope:low_magnificence = { custom_tooltip = coronation_events.0310.low_magnificence } + scope:mid_magnificence = { custom_tooltip = coronation_events.0310.mid_magnificence } + scope:high_magnificence = { custom_tooltip = coronation_events.0310.high_magnificence } + } + duel = { + skill = martial + value = high_skill_rating + 10 = { #two tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + change_variable = { + name = reward_tier + add = 2 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.l.crit_success + } + } + 60 = { #one tier improvement + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.l.success + } + change_variable = { + name = reward_tier + add = 1 + } + } + 30 = { #no improvement + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = coronation_events.0310.intent_toast + left_icon = root + custom_tooltip = coronation_events.0310.l.no_improvement + } + } + } + set_variable = { + name = host_had_intent_reward + value = flag:host_defense_boost + } + } + + after = { + # For MP + coronation_ready_effect = yes + + trigger_event = coronation_events.0311 + } +} + +coronation_events.0311 = { #Host ending event + type = activity_event + title = coronation_events.0311.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + trigger_if = { + limit = { + OR = { + exists = scope:high_magnificence + exists = scope:low_magnificence + exists = scope:mid_magnificence + } + } + exists = scope:high_magnificence + } + trigger_else = { + scope:activity.var:activity_special_type_progression >= 75 + } + } + desc = coronation_events.0311.desc.high_magnificence + } + triggered_desc = { + trigger = { + trigger_if = { + limit = { + OR = { + exists = scope:high_magnificence + exists = scope:low_magnificence + exists = scope:mid_magnificence + } + } + exists = scope:mid_magnificence + } + trigger_else = { + scope:activity.var:activity_special_type_progression >= 25 + } + } + desc = coronation_events.0311.desc.mid_magnificence + } + desc = coronation_events.0311.desc.low_magnificence + } + } + + theme = coronation_activity + + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:low_magnificence + } + animation = shame + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + } + animation = happiness + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + } + animation = personality_honorable + } + } + + override_effect_2d = { + trigger = { + exists = scope:high_magnificence + } + reference = legend_glow + } + + override_effect_2d = { + trigger = { + exists = scope:low_magnificence + } + reference = flies + } + + immediate = { + coronation_completed_log_entry_effect = yes + if = { + limit = { + has_variable = host_intent_start + } + scope:activity = { ach_host_intent_rewards_effect = yes } + } + } + + option = { + name = coronation_events.0311.a + } + after = { + #We trigger the guest goodbye event here to make sure the guest player is notified about the host intent reward + scope:activity = { + every_attending_character = { + limit = { + is_ai = no + NOT = { this = scope:activity.activity_host } + } + trigger_event = coronation_events.0312 + } + } + #reward variable cleanup + remove_variable = reward_tier + remove_variable = reward_tier_plus_one + remove_variable = reward_tier_plus_two + remove_variable = host_had_intent_reward + } +} + +coronation_events.0312 = { #Guest ending event + type = activity_event + title = coronation_events.0312.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:high_magnificence + } + desc = coronation_events.0310.desc.high_magnificence + } + triggered_desc = { + trigger = { + exists = scope:mid_magnificence + } + desc = coronation_events.0310.desc.mid_magnificence + } + triggered_desc = { + trigger = { + exists = scope:low_magnificence + } + desc = coronation_events.0310.desc.low_magnificence + } + } + } + + theme = coronation_activity + + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:low_magnificence + } + animation = eyeroll + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + } + animation = admiration + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + } + animation = personality_forgiving + } + } + + right_portrait = { + character = scope:activity.activity_host + triggered_animation = { + trigger = { + exists = scope:low_magnificence + } + animation = shame + } + triggered_animation = { + trigger = { + exists = scope:high_magnificence + } + animation = happiness + } + triggered_animation = { + trigger = { + exists = scope:mid_magnificence + } + animation = frontend_right_idle + } + } + + override_effect_2d = { + trigger = { + scope:province = { + exists = scope:high_magnificence + } + } + reference = legend_glow + } + + override_effect_2d = { + trigger = { + scope:province = { + exists = scope:low_magnificence + } + } + reference = flies + } + + immediate = { + create_character_memory = { + type = witnessed_a_coronation_memory + participants = { + host = scope:activity.activity_host + } + } + if = { + limit = { + OR = { + scope:first_reward_target ?= this + scope:second_reward_target ?= this + scope:third_reward_target ?= this + scope:fourth_reward_target ?= this + scope:fifth_reward_target ?= this + scope:first_reward_target ?= culture + scope:second_reward_target ?= culture + scope:third_reward_target ?= culture + scope:fourth_reward_target ?= culture + scope:fifth_reward_target ?= culture + } + } + switch = { + trigger = scope:activity.activity_host.var:host_had_intent_reward + flag:cultural_acceptance = { + custom_tooltip = coronation_events.0312.cultural_acceptance + } + flag:better_councillors = { + custom_tooltip = coronation_events.0312.better_councillors + } + flag:vassal_development_boost = { + custom_tooltip = coronation_events.0312.vassal_development_boost + } + flag:vassal_defensive_boost = { + custom_tooltip = coronation_events.0312.vassal_defensive_boost + } + } + } + show_as_tooltip = { + coronation_completed_log_entry_effect = yes + ach_host_intent_rewards_tooltip_effect = yes + } + } + + option = { + name = coronation_events.0312.a + } +} + +coronation_events.0400 = { # HoF supports anointment + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = coronation_events.0400.desc + sender = scope:recipient + + option = { + name = coronation_events.0400.a + if = { + limit = { + is_ai = yes + } + #AI should attempt to hold their coronation RIGHT NOW + ai_attempt_to_host_activity = activity_coronation + debug_log = "AI attempted to host a coronation" + debug_log_scopes = yes + } + } +} diff --git a/N3OW/events/activities/coronation_activity/coronation_events_1.txt b/N3OW/events/activities/coronation_activity/coronation_events_1.txt new file mode 100644 index 00000000..431b2343 --- /dev/null +++ b/N3OW/events/activities/coronation_activity/coronation_events_1.txt @@ -0,0 +1,10383 @@ +namespace = coronation_events + +##################################### +# Coronation - Flavour Events # +# coronation_events - 1000-1999 # +##################################### + +# Bard disses you at your coronation +coronation_events.1000 = { + type = activity_event + title = coronation_events.1000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = has_rival + } + desc = coronation_events.1000.rival.desc + } + triggered_desc = { + trigger = { + has_character_flag = low_county_opinion + } + desc = coronation_events.1000.low_county_opinion.desc + } + triggered_desc = { + trigger = { + has_character_flag = tyrant + } + desc = coronation_events.1000.tyrant.desc + } + desc = coronation_events.1000.desc_fallback + } + } + right_portrait = { + trigger = { exists = scope:rival } + character = scope:rival + animation = schadenfreude + } + center_portrait = { + character = scope:bard + animation = instrument_active + } + left_portrait = { + character = root + animation = boredom + } + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + OR = { + scope:activity = { + any_attending_character = { + has_relation_rival = root + NOT = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + } + scope:activity.activity_location.county = { + county_opinion < 0 + } + tyranny >= 20 + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + grab_appropriate_bard_effect = yes + if = { + limit = { + scope:activity = { + any_attending_character = { + has_relation_rival = root + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_relation_rival = root + NOT = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + save_scope_as = rival + } + } + add_character_flag = { + flag = has_rival + } + } + if = { + limit = { + scope:activity.activity_location.county = { + county_opinion < 0 + } + } + add_character_flag = { + flag = low_county_opinion + } + } + if = { + limit = { + tyranny > 20 + } + add_character_flag = { + flag = tyrant + } + } + } + + # bribe + option = { + name = coronation_events.1000.bribe + pay_short_term_gold = { + target = scope:bard + gold = activity_minor_gold_value + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + stress_impact = { + base = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_gold < activity_minor_gold_value + } + } + } + } + + # diplo duel rap battle + option = { + name = coronation_events.1000.epic_rap_battle + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + has_trait = gregarious + has_trait = eccentric + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 50 + } + diplomacy > 18 + has_trait = lifestyle_reveler + } + + } + duel = { + skill = diplomacy + target = scope:bard + # the bard gets destroyed by you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1000.epic_rap_battle.tt.success + send_interface_toast = { + title = coronation_events.1000.epic_rap_battle.tt.success + left_icon = scope:bard + 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 + } + } + } + # the bard destroys you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1000.epic_rap_battle.tt.failure + send_interface_toast = { + title = coronation_events.1000.epic_rap_battle.tt.failure + left_icon = scope:bard + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + diplomacy < 15 + } + modifier = { + factor = 0 + has_trait = shy + } + } + } + + # remove the bard by force + option = { + name = coronation_events.1000.guards + if = { + limit = { + scope:bard = { + is_ai = yes + } + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:bard + IMPRISONER = root + } + } + + add_dread = medium_dread_gain + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + } + } + ai_value_modifier = { + ai_vengefulness = 50 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + + if = { + limit = { + has_character_flag = low_county_opinion + } + remove_character_flag = low_county_opinion + } + if = { + limit = { + has_character_flag = has_rival + } + remove_character_flag = has_rival + } + if = { + limit = { + has_character_flag = tyrant + } + remove_character_flag = tyrant + } + } +} + +# Crown has disappeared! +coronation_events.1002 = { + type = activity_event + title = coronation_events.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:rival + } + desc = coronation_events.1002.rival.desc + } + desc = coronation_events.1002.desc + } + } + left_portrait = { + trigger = { exists = scope:rival } + character = scope:rival + animation = schadenfreude + } + + right_portrait = { + character = scope:helper + animation = worry + } + + center_portrait = { + character = root + animation = survey + camera = camera_event_left + } + theme = coronation_activity + cooldown = { years = 5 } + override_background = { + reference = sitting_room + } + + trigger = { + scope:activity = { + any_guest_subset = { + name = supporter + } + } + OR = { + stewardship < 9 + scope:activity = { + any_attending_character = { + has_relation_rival = root + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + root.involved_activity = { save_scope_as = activity } + scope:activity = { + random_attending_character = { + limit = { + has_relation_rival = root + } + save_scope_as = rival + } + + random_guest_subset = { + name = supporter + save_scope_as = helper + } + } + } + + # organize the mess + option = { + name = coronation_events.1002.find + trigger = { + stewardship >= high_skill_rating + } + + add_stewardship_lifestyle_xp = medium_lifestyle_xp + 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 + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + intrigue > stewardship + } + } + } + + # counterfeit the missing thing + option = { + name = coronation_events.1002.counterfeit + trigger = { + intrigue >= high_skill_rating + } + + add_intrigue_lifestyle_xp = medium_lifestyle_xp + 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 + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + stewardship > intrigue + } + } + } + + # lash the servants + option = { + name = coronation_events.1002.hold + trigger = { + NOT = { + exists = scope:rival + } + } + + add_dread = minor_dread_gain + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + stress_impact = { + compassionate = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 0 + modifier = { + factor = 50 + OR = { + AND = { + intrigue < 10 + stewardship < 12 + } + OR = { + has_trait = sadistic + has_trait = wrathful + } + } + } + } + } + + # Well you... + option = { + name = coronation_events.1002.accuse + flavor = coronation_events.1002.accuse.flavor + trigger = { + exists = scope:rival + } + + scope:rival = { + increase_wounds_no_death_effect = { REASON = fight } + } + if = { + limit = { + OR = { + scope:rival = { is_ai = yes } + AND = { + scope:rival = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_nemesis_effect = { + REASON = rival_crown_stolen + CHARACTER = scope:rival + OPINION = 0 + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 0 + modifier = { + factor = 50 + has_trait = wrathful + } + ai_value_modifier = { + ai_vengefulness = 50 + } + } + } + + # you got a friend in me + option = { + name = coronation_events.1002.friend + trigger = { + scope:helper ?= { + intrigue >= 12 + } + } + + 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 = { + reverse_opinion = { + target = scope:helper + value >= 30 + } + OR = { + scope:helper = { is_ai = yes } + AND = { + scope:helper = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_help_with_crown + CHARACTER = scope:helper + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:helper + modifier = friendliness_opinion + opinion = 25 + } + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:helper } + + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = gregarious + } + ai_value_modifier = { + ai_vengefulness = -50 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Guest overhears some pretty secret conversation (feast shared event) +coronation_events.1004 = { + type = activity_event + title = coronation_events.1004.t + desc = coronation_events.1004.desc + right_portrait = { + character = scope:spy + camera = camera_event_right + animation = war_over_tie + } + + center_portrait = { + character = scope:confidant + camera = camera_event_right + animation = flirtation_left + } + + left_portrait = { + character = root + animation = worry + camera = camera_event_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + is_ruler = yes + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + any_secret = { + is_known_by = root + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + any_secret = { + is_known_by = root + } + } + save_scope_as = confidant + } + } + + 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 + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + gender_female_chance = 50 + save_scope_as = spy + } + scope:spy = { + add_to_activity_without_travel = scope:activity + } + } + + # bribe the spy + option = { + name = coronation_events.1004.bribe + trigger = { + short_term_gold >= activity_minor_gold_value + NOT = { intrigue >= high_skill_rating } + } + pay_short_term_gold = { + target = scope:spy + gold = activity_minor_gold_value + } + if = { + limit = { + reverse_opinion = { + target = scope:confidant + value > 30 + } + OR = { + scope:confidant = { is_ai = yes } + AND = { + scope:confidant = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_kept_secret + CHARACTER = scope:confidant + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:confidant + modifier = trust_opinion + opinion = 25 + } + } + if = { + limit = { + this = scope:host + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:confidant } + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_gold < activity_minor_gold_value + } + } + } + } + + # wow, cool. Come work for me. + option = { + name = coronation_events.1004.recruit + trigger = { + intrigue >= high_skill_rating + } + add_courtier = scope:spy + scope:secret_to_reveal = { + reveal_to = scope:spy + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 50 + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + # not so fast, you little rat! + option = { + name = coronation_events.1004.intimidation + duel = { + skills = { intrigue prowess } + target = scope:spy + # the spy cowers + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1004.intimidation.tt.success + send_interface_toast = { + title = coronation_events.1004.intimidation.tt.success + left_icon = scope:spy + add_dread = minor_dread_gain + if = { + limit = { + reverse_opinion = { + target = scope:confidant + value > 30 + } + OR = { + scope:confidant = { is_ai = yes } + AND = { + scope:confidant = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_kept_secret + CHARACTER = scope:confidant + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:confidant + modifier = trust_opinion + opinion = 25 + } + } + if = { + limit = { + this = scope:host + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:confidant } + } + } + } + # the spy scoffs + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1004.intimidation.tt.failure + send_interface_toast = { + title = coronation_events.1004.intimidation.tt.failure + left_icon = scope:spy + scope:secret_to_reveal = { + expose_secret = scope:spy + } + } + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + intrigue < 15 + prowess < 15 + } + } + } + } + + # call the guards + option = { + name = coronation_events.1004.guards + trigger = { + this = scope:host + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:spy + IMPRISONER = root + } + + scope:secret_to_reveal = { + reveal_to = scope:spy + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 50 + } + } + } + + # opt-out + option = { + name = coronation_events.1004.opt-out + trigger = { + this != scope:host + } + + scope:secret_to_reveal = { + expose_secret = scope:spy + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + scope:secret_to_reveal.secret_owner = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + if = { + limit = { + is_ai = yes + } + scope:spy ?= { + if = { + limit = { + NOT = { + is_courtier_of = root + is_imprisoned_by = root + } + } + silent_disappearance_effect = yes + } + } + } + } +} + +# two guests arguing to see who goes in first +coronation_events.1007 = { + type = activity_event + title = coronation_events.1007.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.1007.desc + } + desc = coronation_events.1007.guest.desc + } + } + left_portrait = { + character = scope:host + camera = camera_event_chariot_very_left_hippodrome + animation = schadenfreude + } + + center_portrait = { + character = scope:first_guest + scripted_animation = { + triggered_animation = { + trigger = { + OR = { + scope:first_guest = { number_of_commander_traits >= 1 } + scope:first_guest = { is_knight = yes } + } + } + animation = marshal_random_weapon + } + animation = disapproval + } + } + + right_portrait = { + character = scope:second_guest + animation = interested + } + theme = coronation_activity + + override_background = { + trigger = { + #Don't want Constantinople background for depth perspective chars + location.county = title:c_byzantion + } + reference = bp2_courtyard + } + + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + OR = { + is_of_major_interest_trigger = { CHARACTER = scope:activity.activity_host } + is_of_minor_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + NOR = { + this = root + this = scope:activity.activity_host + } + count >= 2 + } + } + trigger_if = { + limit = { + NOT = { + this = scope:activity.activity_host + } + } + OR = { + is_of_major_interest_trigger = { CHARACTER = scope:activity.activity_host } + is_of_minor_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + + if = { + limit = { + this = scope:host + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + } + is_of_major_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + alternative_limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + } + is_of_minor_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + save_scope_as = first_guest + } + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + this = scope:first_guest + } + is_of_major_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + alternative_limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + this = scope:first_guest + } + is_of_minor_interest_trigger = { CHARACTER = scope:activity.activity_host } + } + save_scope_as = second_guest + } + } + } + else = { + save_scope_as = first_guest + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + this = scope:first_guest + } + is_of_major_interest_trigger = { CHARACTER = involved_activity.activity_host } + } + alternative_limit = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + this = scope:first_guest + } + is_of_minor_interest_trigger = { CHARACTER = involved_activity.activity_host } + } + save_scope_as = second_guest + } + } + } + } + + # guest option: be the bigger person + option = { + trigger = { + root = scope:first_guest + } + name = coronation_events.1007.bigger + + add_piety = minor_piety_gain + + stress_impact = { + arbitrary = minor_stress_impact_gain + impatient = minor_stress_impact_gain + cynical = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -50 + } + } + } + + # guest option: demand to go first + option = { + trigger = { + root = scope:first_guest + } + name = coronation_events.1007.demand + if = { + limit = { + OR = { + scope:second_guest = { is_ai = yes } + AND = { + scope:second_guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_demanded_to_go_first + CHARACTER = scope:second_guest + OPINION = 0 + } + } + + stress_impact = { + patient = minor_stress_impact_gain + temperate = minor_stress_impact_gain + content = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 50 + } + } + } + + # host option: diplo solution + option = { + trigger = { + root = scope:host + diplomacy >= high_skill_rating + } + show_as_unavailable = { + diplomacy < high_skill_rating + root = scope:host + } + name = coronation_events.1007.appease + 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 + } + scope:first_guest = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + scope:second_guest = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + stress_impact = { + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = diplomacy + } + modifier = { + add = -20 + OR = { + has_trait = impatient + has_trait = callous + has_trait = lazy + } + } + } + } + + # host option: choose first guest + option = { + trigger = { + root = scope:host + } + name = coronation_events.1007.first_guest + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:first_guest + } + } + add_hook = { + type = favor_hook + target = scope:first_guest + } + } + reverse_add_opinion = { + target = scope:first_guest + modifier = grateful_opinion + opinion = 25 + } + if = { + limit = { + this = scope:host + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:first_guest } + } + + + stress_impact = { + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:first_guest + multiplier = 0.5 + } + modifier = { + scope:second_guest.current_military_strength > scope:first_guest.current_military_strength + add = -50 + } + } + } + + # host option: choose second guest + option = { + trigger = { + root = scope:host + } + name = coronation_events.1007.second_guest + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:second_guest + } + } + add_hook = { + type = favor_hook + target = scope:second_guest + } + } + + reverse_add_opinion = { + target = scope:second_guest + modifier = grateful_opinion + opinion = 25 + } + + if = { + limit = { + this = scope:host + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:second_guest } + } + + stress_impact = { + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:second_guest + multiplier = 0.5 + } + modifier = { + scope:first_guest.current_military_strength > scope:second_guest.current_military_strength + add = -50 + } + } + } + + #opt-out + option = { + trigger = { + root = scope:host + } + name = coronation_events.1007.opt_out + + stress_impact = { + base = minor_stress_impact_loss + patient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = 20 + OR = { + has_trait = impatient + has_trait = callous + has_trait = lazy + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +scripted_effect coronation_events_1011_reward_effect = { + switch = { + trigger = has_trait + education_$SKILL$_1 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_1_modifier + } + } + education_$SKILL$_2 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_2_modifier + } + } + education_$SKILL$_3 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_3_modifier + } + } + education_$SKILL$_4 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_4_modifier + } + } + education_$SKILL$_5 = { + scope:ancestor_artifact = { + add_artifact_modifier = artifact_monthly_$SKILL$_lifestyle_xp_4_modifier + #add_artifact_modifier = artifact_$SKILL$_per_prestige_level_modifier + } + } + } + custom_tooltip = coronation_events.1011.root_reward.tt +} + +# decide upon new bonuses for your crown +coronation_events.1011 = { + type = activity_event + title = coronation_events.1011.t + desc = coronation_events.1011.desc + override_background = { + reference = relaxing_room + } + left_portrait = { + character = root + animation = admiration + camera = camera_event_center + } + right_portrait = { + character = scope:priest + animation = crowning + } + + lower_right_portrait = { + character = scope:previous_holder + } + + artifact = { + position = lower_left_portrait + target = scope:ancestor_artifact + trigger = { exists = scope:ancestor_artifact } + } + theme = coronation_activity + + cooldown = { years = 5 } + + trigger = { + coronation_living_officiator_trigger = yes + has_activity_intent = coronation_exalt_crown + exists = primary_title.previous_holder + primary_title.previous_holder = { + has_same_education_trait_as_root_trigger = no + } + trigger_if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + } + any_character_artifact = { + artifact_slot_type = helmet + } + } + trigger_else_if = { + limit = { + coronation_proper_artifact_regalia_trigger = yes + } + any_character_artifact = { + artifact_slot_type = regalia + } + } + trigger_else = { + any_character_artifact = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity.var:officiator ?= { + save_scope_as = priest + } + if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + } + random_character_artifact = { + limit = { + artifact_slot_type = helmet + } + save_scope_as = ancestor_artifact + } + } + else_if = { + limit = { + coronation_proper_artifact_regalia_trigger = yes + } + random_character_artifact = { + limit = { + artifact_slot_type = regalia + } + save_scope_as = ancestor_artifact + } + } + else = { + random_character_artifact = { + limit = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + save_scope_as = ancestor_artifact + } + } + + primary_title = { + previous_holder ?= { save_scope_as = previous_holder } + } + } + + # refit + option = { + name = coronation_events.1011.refit + add_prestige = medium_prestige_gain + switch = { + trigger = has_trait + education_diplomacy = { + coronation_events_1011_reward_effect = { SKILL = diplomacy } + } + education_martial = { + coronation_events_1011_reward_effect = { SKILL = martial } + } + education_stewardship = { + coronation_events_1011_reward_effect = { SKILL = stewardship } + } + education_intrigue = { + coronation_events_1011_reward_effect = { SKILL = intrigue } + } + education_learning = { + coronation_events_1011_reward_effect = { SKILL = learning } + } + } + + stress_impact = { + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -50 + } + } + } + + # roll with it + option = { + name = coronation_events.1011.previous + if = { + limit = { + exists = root.dynasty + scope:previous_holder = { + dynasty ?= root.dynasty + } + } + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + } + else = { + add_legitimacy = miniscule_legitimacy_gain + } + scope:previous_holder = { + switch = { + trigger = has_trait + education_diplomacy = { + coronation_events_1011_reward_effect = { SKILL = diplomacy } + } + education_martial = { + coronation_events_1011_reward_effect = { SKILL = martial } + } + education_stewardship = { + coronation_events_1011_reward_effect = { SKILL = stewardship } + } + education_intrigue = { + coronation_events_1011_reward_effect = { SKILL = intrigue } + } + education_learning = { + coronation_events_1011_reward_effect = { SKILL = learning } + } + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 50 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + + +# Main dish in the banquet is undercooked (feast shared event) +coronation_events.1012 = { + type = activity_event + title = coronation_events.1012.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.1012.host.desc + } + desc = coronation_events.1012.guest.desc + } + } + center_portrait = { + character = scope:guest + camera = camera_event_center + animation = anger + } + + left_portrait = { + character = scope:host + animation = stunned + camera = camera_event_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + is_vegetarian_trigger = no + trigger_if = { + limit = { + scope:activity = { + has_activity_type = activity_coronation + } + } + scope:activity = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_austere + } + } + } + trigger_if = { + limit = { + scope:activity = { + has_activity_type = activity_feast + } + } + scope:activity = { + has_activity_option = { + category = feast_option_food + option = feast_food_bad + } + } + } + # to avoid getting similar accident-adjacent events in succession + NOT = { + has_character_flag = poor_activity_option_accident + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + add_character_flag = { + flag = poor_activity_option_accident + years = 5 + } + scope:activity.activity_host ?= { save_scope_as = host } + + if = { + limit = { + this = scope:host + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + } + save_scope_as = guest + } + } + } + else = { + save_scope_as = guest + } + } + + # EAT IT. + option = { + name = coronation_events.1012.eat_it + trigger = { + this = scope:host + has_activity_intent = coronation_weaken_detractors + scope:guest = { + is_in_guest_subset = { name = detractor } + } + } + + scope:guest = { + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + if = { + limit = { + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_forced_bad_food + CHARACTER = scope:guest + OPINION = -20 + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + modifier = { + add = 20 + OR = { + has_trait = vengeful + has_trait = callous + } + } + } + } + + # send back + option = { + name = coronation_events.1012.back + trigger = { + this = scope:host + } + + reverse_add_opinion = { + target = scope:guest + modifier = grateful_opinion + opinion = 25 + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:guest } + + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + stress_impact = { + temperate = minor_stress_impact_loss + gluttonous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = gluttonous + } + modifier = { + add = 20 + has_trait = temperate + } + } + } + + # new trend + option = { + name = coronation_events.1012.trend + trigger = { + this = scope:host + stewardship >= high_skill_rating + } + show_as_unavailable = { + this = scope:host + stewardship < high_skill_rating + } + + random = { + chance = 10 + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + ai_chance = { + base = 0 + } + } + + # complain + option = { + name = coronation_events.1012.complain + trigger = { + this = scope:guest + } + + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + base = minor_stress_impact_gain + gluttonous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = gluttonous + } + } + } + + # just munch down + option = { + name = coronation_events.1012.munch + trigger = { + this = scope:guest + } + + random = { + chance = 10 + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + + scope:host = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + + stress_impact = { + gluttonous = medium_stress_impact_loss + } + + ai_chance = { + base = 0 + modifier = { + factor = 50 + has_trait = gluttonous + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# A torch accident sets something on fire (feast shared event) +coronation_events.1013 = { + type = activity_event + title = coronation_events.1013.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.1013.host.desc + } + desc = coronation_events.1013.guest.desc + } + } + right_portrait = { + character = scope:guest + camera = camera_event_right + animation = drink + } + + center_portrait = { + character = root + animation = shock + camera = camera_event_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + override_effect_2d = { + reference = smoke + } + + trigger = { + trigger_if = { + limit = { + involved_activity = { + has_activity_type = activity_coronation + } + } + involved_activity = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_austere + } + } + } + trigger_if = { + limit = { + involved_activity = { + has_activity_type = activity_feast + } + } + involved_activity = { + has_activity_option = { + category = feast_option_food + option = feast_food_bad + } + } + } + # to avoid getting similar accident-adjacent events in succession + NOT = { + has_character_flag = poor_activity_option_accident + } + involved_activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:host + involved_activity.var:officiator ?= this + } + } + } + } + + immediate = { + # For MP + 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 + } + 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 = { + is_ai = yes + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOR = { + 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 + } + } + } + } + + # burn! + option = { + name = coronation_events.1013.burn + trigger = { + OR = { + AND = { + root = scope:host + has_activity_intent = coronation_weaken_detractors + scope:guest = { + is_in_guest_subset = { name = detractor } + } + } + AND = { + NOT = { + this = scope:host + } + has_activity_intent = coronation_offer_support + scope:guest = { + is_in_guest_subset = { name = detractor } + } + } + AND = { + NOT = { + this = scope:host + } + has_activity_intent = coronation_disrupt_loyalists + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + } + } + + scope:guest = { + increase_wounds_no_death_effect = { REASON = burned } + } + + 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 = { + has_activity_intent = coronation_weaken_detractors + } + coronation_weaken_detractors_opinion_effect = yes + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + } + } + + # make sure guest doesn't get hurt + option = { + name = coronation_events.1013.hero + trigger = { + OR = { + has_trait = brave + has_trait = compassionate + has_trait = reckless + AND = { + root = scope:host + has_activity_intent = coronation_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + AND = { + root = scope:host + has_activity_intent = coronation_impress_attendees + } + } + } + + increase_wounds_no_death_effect = { REASON = burned } + + add_prestige = medium_prestige_gain + + if = { + limit = { + root = scope:host + has_activity_intent = coronation_impress_attendees + } + 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_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + if = { + limit = { + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_saved_fire + CHARACTER = scope:guest + OPINION = 20 + } + } + coronation_embrace_supporters_opinion_effect = yes + } + + stress_impact = { + brave = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + } + } + + # snuff out the fire + option = { + name = coronation_events.1013.snuff_out + trigger = { + learning >= high_skill_rating + } + show_as_unavailable = { + learning < high_skill_rating + } + if = { + limit = { + OR = { + is_ai = no + this = scope:activity.activity_host + is_in_guest_subset = { name = supporter } + has_activity_intent = coronation_offer_support + } + } + 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_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + if = { + limit = { + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_saved_fire + CHARACTER = scope:guest + OPINION = 20 + } + } + coronation_embrace_supporters_opinion_effect = yes + } + add_learning_lifestyle_xp = medium_lifestyle_xp + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + add = 25 + has_trait = brave + } + } + } + + # effortlessly douse the fire + option = { + name = coronation_events.1013.douse + trigger = { + prowess >= high_skill_rating + } + show_as_unavailable = { + prowess < high_skill_rating + } + add_prestige = minor_prestige_gain + if = { + limit = { + OR = { + is_ai = no + this = scope:activity.activity_host + is_in_guest_subset = { name = supporter } + has_activity_intent = coronation_offer_support + } + } + 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_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + if = { + limit = { + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_saved_fire + CHARACTER = scope:guest + OPINION = 20 + } + } + coronation_embrace_supporters_opinion_effect = yes + } + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + add = 25 + has_trait = brave + } + } + } + + # run! + option = { + name = coronation_events.1013.run + + scope:guest = { + increase_wounds_no_death_effect = { REASON = burned } + } + + add_prestige = minor_prestige_loss + + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = brave + } + modifier = { + add = 25 + has_trait = craven + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Guests stampede over a rumor of food scarcity (feast shared event) +coronation_events.1014 = { + type = activity_event + title = coronation_events.1014.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.1014.host.desc + } + desc = coronation_events.1014.guest.desc + } + } + right_portrait = { + character = scope:guest + camera = camera_event_left + animation = disbelief + } + + left_portrait = { + character = root + animation = paranoia + camera = camera_event_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + trigger_if = { + limit = { + scope:activity = { + has_activity_type = activity_feast + } + } + scope:activity = { + has_activity_option = { + category = feast_option_food + option = feast_food_bad + } + } + } + trigger_if = { + limit = { + scope:activity = { + has_activity_type = activity_coronation + } + } + scope:activity = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_austere + } + } + } + # to avoid getting similar accident-adjacent events in succession + NOT = { + has_character_flag = poor_activity_option_accident + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + add_character_flag = { + flag = poor_activity_option_accident + years = 5 + } + scope:activity.activity_host ?= { save_scope_as = host } + 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 = { + 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 + } + } + save_scope_as = guest + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + } + save_scope_as = guest + } + } + } + } + + # join the stampede + option = { + name = coronation_events.1014.join + + random = { + chance = 10 + increase_wounds_no_death_effect = { REASON = accident } + if = { + limit = { + OR = { + is_ai = no + this = scope:activity.activity_host + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + has_activity_intent = coronation_disrupt_loyalists + } + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + } + hidden_effect = { + change_current_weight = 20 + } + add_character_modifier = { + modifier = full_of_dessert_modifier + years = 5 + } + scope:guest = { + increase_wounds_no_death_effect = { REASON = accident } + } + + stress_impact = { + base = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + ai_chance = { + base = 0 + modifier = { + factor = 50 + has_trait = gluttonous + } + } + } + + # calm down the crowd + option = { + name = coronation_events.1014.calm + trigger = { + diplomacy >= high_skill_rating + } + show_as_unavailable = { + diplomacy < high_skill_rating + } + if = { + limit = { + OR = { + is_ai = no + this = scope:activity.activity_host + is_in_guest_subset = { name = supporter } + has_activity_intent = coronation_offer_support + } + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { + activity_special_type_progression_tiny = yes + every_attending_character = { + limit = { + NOR = { this = scope:host } + this = root + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + } + } + else = { + scope:activity = { + every_attending_character = { + limit = { NOT = { this = scope:host } } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + } + } + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = craven + } + } + } + + # run! + option = { + name = coronation_events.1014.run + + scope:guest = { + increase_wounds_no_death_effect = { REASON = accident } + } + + add_prestige = minor_prestige_loss + + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = craven + } + modifier = { + factor = 0 + has_trait = brave + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Friendly religious figure raises a toast in your name at your coronation banquet +coronation_events.1015 = { + type = activity_event + title = coronation_events.1015.t + desc = coronation_events.1015.desc + right_portrait = { + character = scope:guest + animation = toast + } + + left_portrait = { + character = root + animation = drink + } + + theme = feast_activity + + override_effect_2d = { + reference = legend_glow + } + + cooldown = { years = 5 } + + trigger = { + piety_level >= high_piety_level + drinks_alcohol_trigger = yes + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + this.faith = root.faith + drinks_alcohol_trigger = yes + OR = { + has_trait = zealous + piety_level >= high_piety_level + } + is_clergy = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { + this = root + } + is_clergy = yes + } + save_scope_as = guest + } + } + } + + # hell yeah it's divine + option = { + name = coronation_events.1015.divine + trigger = { + has_activity_intent = coronation_impress_attendees + } + + scope:activity = { + custom_tooltip = coronation_tt_positive_tiny + activity_special_type_progression_tiny = yes + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + every_attending_character = { + limit = { + has_trait = zealous + NOT = { this = scope:host } + } + custom = custom.every_zealous_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + cynical = minor_stress_impact_gain + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + # cherish the toast + option = { + name = coronation_events.1015.cherish + + if = { + limit = { + reverse_opinion = { + target = scope:guest + value > 30 + } + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_toasted_coronation + CHARACTER = scope:guest + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:guest + modifier = grateful_opinion + opinion = 25 + } + } + + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + modifier = { + stress_level >= 1 + add = 2 + } + } + } + + # the audacity + option = { + name = coronation_events.1015.hush + + add_dread = minor_dread_gain + + scope:guest = { + add_stress = medium_stress_gain + } + + stress_impact = { + cynical = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_zeal = high_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# You have the opportunity to raise a toast at your coronation banquet +coronation_events.1016 = { + type = activity_event + title = coronation_events.1016.t + desc = coronation_events.1016.desc + right_portrait = { + character = scope:guest + animation = wedding_drunk + camera = camera_event_very_right + } + + center_portrait = { + character = scope:guest_2 + animation = drink_goblet + camera = camera_event_right + } + + left_portrait = { + character = scope:host + animation = toast_goblet + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset = { + name = detractor + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + count >= 2 + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = guest + } + } + + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + NOT = { + this = scope:guest + } + } + save_scope_as = guest_2 + } + } + } + + # great toast + option = { + name = coronation_events.1016.great + trigger = { + has_activity_intent = coronation_impress_attendees + } + + duel = { + skill = diplomacy + value = high_skill_rating + # you manage to win them over + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1016.great.tt.success + send_interface_toast = { + title = coronation_events.1016.great.tt.success + left_icon = root + 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 + } + scope:guest = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + scope:guest_2 = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + coronation_impress_attendees_opinion_effect = yes + } + } + # they don't think it's good enough + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1016.great.tt.failure + send_interface_toast = { + title = coronation_events.1016.great.tt.failure + left_icon = root + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_loss + } + else = { + add_prestige = minor_prestige_loss + } + } + } + } + ai_chance = { + base = 5 + } + } + + # embarrass guests toast + option = { + name = coronation_events.1016.embarrass + trigger = { + has_activity_intent = coronation_weaken_detractors + intrigue >= high_skill_rating + } + show_as_unavailable = { + has_activity_intent = coronation_weaken_detractors + intrigue < high_skill_rating + } + + add_dread = medium_dread_gain + + scope:guest = { + add_stress = medium_stress_gain + } + + scope:guest_2 = { + add_stress = medium_stress_gain + } + + scope:guest = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + + scope:guest_2 = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + + coronation_weaken_detractors_opinion_effect = yes + + ai_chance = { + base = 5 + } + } + + # why bother? + option = { + name = coronation_events.1016.nah + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + stress_level >= 1 + add = 2 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Participants bring their local beverages for you to try on at your coronation banquet +coronation_events.1017 = { + type = activity_event + title = coronation_events.1017.t + desc = coronation_events.1017.desc + right_portrait = { + character = scope:supporter + animation = debating + } + + center_portrait = { + character = scope:detractor + animation = disgust + camera = camera_event_right + } + + left_portrait = { + character = root + animation = drink_goblet + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + root.culture != scope:activity.activity_location.culture + scope:activity = { + any_guest_subset = { + name = detractor + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + NOT = { + this.culture = root.culture + this.culture = scope:activity.activity_location.culture + } + } + 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 + this.culture = scope:activity.activity_location.culture + } + } + faith_forbids_alcohol_trigger = no + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + is_ai = yes + NOT = { + this.culture = root.culture + this.culture = scope:activity.activity_location.culture + } + } + save_scope_as = detractor + } + } + + 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 + this.culture = scope:activity.activity_location.culture + } + save_scope_as = supporter + } + } + } + + # praise all the beverages, making a speech about the land + option = { + name = coronation_events.1017.diplo + trigger = { + has_activity_intent = coronation_impress_attendees + diplomacy >= high_skill_rating + } + + scope:activity = { + custom_tooltip = coronation_tt_positive_tiny + activity_special_type_progression_tiny = yes + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + activity_location.county = { + add_county_modifier = { + modifier = bp4_coronation_good_harvest_modifier + years = 10 + } + } + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # praise all the beverages, making a speech about the land (watered down) + option = { + name = coronation_events.1017.diplo + trigger = { + NOT = { + has_activity_intent = coronation_impress_attendees + } + diplomacy < high_skill_rating + } + + scope:activity = { + activity_location.county = { + add_county_modifier = { + modifier = bp4_coronation_good_harvest_modifier + years = 5 + } + } + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # humiliate dissenter + option = { + name = coronation_events.1017.isolate + trigger = { + has_activity_intent = coronation_weaken_detractors + } + + if = { + limit = { + has_royal_court = yes + } + change_current_court_grandeur = medium_court_grandeur_gain + } + else = { + every_courtier = { + custom = custom.every_courtier + limit = { + is_adult = yes + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + } + + scope:detractor = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # praise supporter + option = { + name = coronation_events.1017.empower + trigger = { + has_activity_intent = coronation_embrace_supporters + } + if = { + limit = { + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_praised_vintage + CHARACTER = scope:supporter + OPINION = 20 + } + } + if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + } + show_as_tooltip = { + appoint_court_position = { + recipient = scope:supporter + court_position = court_brewmaster_court_position + } + } + } + + hidden_effect = { + if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + NOT = { employs_court_position = court_brewmaster_court_position } + } + appoint_court_position = { + recipient = scope:supporter + court_position = court_brewmaster_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + employs_court_position = court_brewmaster_court_position + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:supporter + holder = court_position:court_brewmaster_court_position + court_position = court_brewmaster_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # praise supporter (watered down) + option = { + name = coronation_events.1017.empower + trigger = { + NOT = { + has_activity_intent = coronation_embrace_supporters + } + } + + show_as_tooltip = { + appoint_court_position = { + recipient = scope:supporter + court_position = court_brewmaster_court_position + } + } + hidden_effect = { + if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + NOT = { employs_court_position = court_brewmaster_court_position } + } + appoint_court_position = { + recipient = scope:supporter + court_position = court_brewmaster_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + employs_court_position = court_brewmaster_court_position + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:supporter + holder = court_position:court_brewmaster_court_position + court_position = court_brewmaster_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + + ai_chance = { + base = 5 + modifier = { + has_trait = paranoid + add = -2 + } + modifier = { + has_trait = inappetetic + add = -2 + } + modifier = { + has_trait = arrogant + add = -2 + } + modifier = { + has_trait = gluttonous + add = 2 + } + } + } + + # I couldn't possibly drink first + option = { + name = coronation_events.1017.nah + + scope:activity = { + every_attending_character = { + limit = { + NOT = { this = root } + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + inappetetic = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gluttonous = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + has_trait = paranoid + add = 2 + } + modifier = { + has_trait = inappetetic + add = 2 + } + modifier = { + has_trait = arrogant + add = 2 + } + modifier = { + has_trait = gluttonous + add = -2 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# While arranging seats at the table at your coronation banquet, you make a decision about where your detractors will sit +coronation_events.1018 = { + type = activity_event + title = coronation_events.1018.t + desc = { + desc = coronation_events.1018.desc + triggered_desc = { + trigger = { has_trait = wrathful } + desc = coronation_events.1018.desc.wrathful + } + triggered_desc = { + trigger = { diplomacy > 10 } + desc = coronation_events.1018.desc.diplo + } + } + center_portrait = { + character = scope:detractor + animation = flirtation + } + + right_portrait = { + character = scope:supporter + animation = happiness + + } + + left_portrait = { + character = scope:host + animation = scheme + camera = camera_event_left_wedding + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + any_guest_subset = { + name = detractor + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + } + has_activity_intent = coronation_weaken_detractors + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host ?= { save_scope_as = host } + custom_tooltip = happened_because_intent_tt + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = detractor + } + } + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = supporter + } + } + } + + # deal + option = { + name = coronation_events.1018.deal + add_hook_if_possible_default_length_effect = { + TARGET = scope:detractor + TYPE = favor_hook + } + + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + just = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + # switch + option = { + name = coronation_events.1018.switch + add_character_modifier = { + modifier = bp4_shielded_reign_modifier + years = 10 + } + scope:detractor = { + add_stress = medium_stress_gain + } + + stress_impact = { + paranoid = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +scripted_effect coronation_events_1019_memory_reward_effect = { + custom_tooltip = coronation_events.1019.memory_reward.tt + add_prestige = minor_prestige_gain + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = marriage + } + } + progress_towards_lover_effect = { + REASON = lover_coronation_gifts + CHARACTER = scope:$SCOPE$ + OPINION = 20 + } + } + if = { + limit = { + scope:$SCOPE$_memory = { + OR = { + has_memory_category = war + has_memory_category = martial + } + } + } + add_martial_lifestyle_xp = minor_lifestyle_xp + } + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = major + } + } + add_prestige = minor_prestige_gain + } + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = family + } + } + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + } + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = travel + } + } + traveler_travel_xp_effect = { + MIN = 3 + MAX = 5 + } + } + + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = travel + } + } + traveler_travel_xp_effect = { + MIN = 3 + MAX = 5 + } + } + + if = { + limit = { + scope:$SCOPE$_memory = { + has_memory_category = childhood + } + } + if = { + limit = { + reverse_opinion = { + target = scope:$SCOPE$ + value > 40 + } + OR = { + scope:$SCOPE$ = { is_ai = yes } + AND = { + scope:$SCOPE$ = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_coronation_gifts + CHARACTER = scope:$SCOPE$ + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:$SCOPE$ + modifier = grateful_opinion + opinion = 25 + } + } + } +} + +# You distribute gifts to your supporters at your coronation banquet +coronation_events.1019 = { + type = activity_event + title = coronation_events.1019.t + desc = coronation_events.1019.desc + right_portrait = { + character = scope:supporter + animation = throne_room_conversation_4 + } + + center_portrait = { + character = scope:supporter_2 + animation = throne_room_bow_1 + camera = camera_event_right + } + + left_portrait = { + character = root + animation = wedding_bride_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:activity = { + any_guest_subset = { + name = supporter + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + count >= 2 + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + } + save_scope_as = supporter + } + random_guest_subset = { + name = supporter + limit = { + NOT = { + this = scope:supporter + } + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + } + save_scope_as = supporter_2 + } + } + + scope:supporter = { + random_memory = { + limit = { + has_memory_category = positive + has_memory_participant = root + } + save_scope_as = supporter_memory + } + } + + scope:supporter_2 = { + random_memory = { + limit = { + has_memory_category = positive + has_memory_participant = root + } + save_scope_as = supporter_2_memory + } + } + } + + # give them both gifts + option = { + name = coronation_events.1019.both + + pay_short_term_gold = { + target = scope:supporter + gold = minor_gold_value + } + + pay_short_term_gold = { + target = scope:supporter_2 + gold = minor_gold_value + } + if = { + limit = { + reverse_opinion = { + target = scope:supporter + value > 40 + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_coronation_gifts + CHARACTER = scope:supporter + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:supporter + modifier = grateful_opinion + opinion = 25 + } + } + if = { + limit = { + reverse_opinion = { + target = scope:supporter_2 + value > 40 + } + OR = { + scope:supporter_2 = { is_ai = yes } + AND = { + scope:supporter_2 = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_coronation_gifts + CHARACTER = scope:supporter_2 + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:supporter_2 + modifier = grateful_opinion + opinion = 25 + } + } + + + + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + just = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= medium_gold_value + add = -2 + } + } + } + + # give supporter a gift + option = { + name = coronation_events.1019.supporter + remove_short_term_gold = minor_gold_value + + coronation_events_1019_memory_reward_effect = { SCOPE = supporter } + + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + } + + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= minor_gold_value + add = -2 + } + modifier = { + scope:supporter_2.current_military_strength > scope:supporter.current_military_strength + add = -2 + } + } + } + + # give supporter_2 a gift + option = { + name = coronation_events.1019.supporter_2 + remove_short_term_gold = minor_gold_value + + coronation_events_1019_memory_reward_effect = { SCOPE = supporter_2 } + + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= minor_gold_value + add = -2 + } + modifier = { + scope:supporter.current_military_strength > scope:supporter_2.current_military_strength + add = -2 + } + } + } + + # don't give any gifts + option = { + name = coronation_events.1019.nah + add_stewardship_lifestyle_xp = medium_lifestyle_xp + + stress_impact = { + paranoid = minor_stress_impact_loss + shy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + modifier = { + has_lifestyle = stewardship_lifestyle + add = 2 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Clan vassals show their concerns +coronation_events.1020 = { + type = activity_event + title = coronation_events.1020.t + desc = coronation_events.1020.desc + right_portrait = { + character = scope:dynasty_vassal + animation = throne_room_conversation_4 + } + + center_portrait = { + character = scope:not_dynasty_vassal + animation = throne_room_bow_1 + camera = camera_event_right + } + + left_portrait = { + character = root + animation = wedding_bride_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + government_has_flag = government_is_clan + scope:activity = { + any_attending_character = { + is_ai = yes + government_has_flag = government_is_clan + NOT = { + dynasty = root.dynasty + } + is_vassal_of = root + } + } + scope:activity = { + any_attending_character = { + is_ai = yes + government_has_flag = government_is_clan + dynasty = root.dynasty + is_vassal_of = root + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + government_has_flag = government_is_clan + dynasty = root.dynasty + is_vassal_of = root + } + save_scope_as = dynasty_vassal + } + random_attending_character = { + limit = { + is_ai = yes + government_has_flag = government_is_clan + NOT = { + dynasty = root.dynasty + } + is_vassal_of = root + } + save_scope_as = not_dynasty_vassal + } + } + } + + # embrace supporter + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + OR = { + scope:not_dynasty_vassal = { + is_in_guest_subset = { name = supporter } + } + scope:dynasty_vassal = { + is_in_guest_subset = { name = supporter } + } + } + } + name = coronation_events.1020.embrace_supporters + custom_tooltip = coronation_events.1020.embrace_supporters.tt + + if = { + limit = { + scope:not_dynasty_vassal = { + is_in_guest_subset = { name = supporter } + } + } + add_hook_if_possible_default_length_effect = { + TARGET = scope:not_dynasty_vassal + TYPE = favor_hook + } + scope:not_dynasty_vassal = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + add_prestige = medium_prestige_gain + } + } + + if = { + limit = { + scope:dynasty_vassal = { + is_in_guest_subset = { name = supporter } + } + } + house = { + add_unity_value = { + value = medium_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + scope:dynasty_vassal = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + add_prestige = medium_prestige_gain + } + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # weaken detractor + option = { + trigger = { + has_activity_intent = coronation_weaken_detractors + OR = { + scope:not_dynasty_vassal = { + is_in_guest_subset = { name = detractor } + } + scope:dynasty_vassal = { + is_in_guest_subset = { name = detractor } + } + } + } + name = coronation_events.1020.weaken_detractors + + if = { + limit = { + scope:not_dynasty_vassal = { + is_in_guest_subset = { name = detractor } + } + } + house = { + add_unity_value = { + value = medium_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + scope:not_dynasty_vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + add_stress = medium_stress_gain + } + } + + if = { + limit = { + scope:dynasty_vassal = { + is_in_guest_subset = { name = detractor } + } + } + if = { + limit = { + scope:not_dynasty_vassal = { + NOT = { is_in_guest_subset = { name = detractor } } + } + } + house = { + add_unity_value = { + value = medium_unity_loss + character = root + desc = clan_unity_coronation_decreased + } + } + } + scope:dynasty_vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + add_stress = medium_stress_gain + } + } + custom_tooltip = coronation_events.1020.weaken_detractors.tt + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # talk your way out of it + option = { + trigger = { diplomacy >= high_skill_rating } + name = coronation_events.1020.a + flavor = coronation_events.1020.a.flavor + + house = { + add_unity_value = { + value = minor_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + + 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 + } + + scope:dynasty_vassal = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + scope:not_dynasty_vassal = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # support the vassal that is not part of your house + option = { + name = coronation_events.1020.b + flavor = coronation_events.1020.b.tt + scope:not_dynasty_vassal = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + + add_hook_if_possible_default_length_effect = { + TARGET = scope:not_dynasty_vassal + TYPE = favor_hook + } + + house = { + add_unity_value = { + value = medium_unity_loss + character = root + desc = clan_unity_coronation_decreased + } + } + + every_vassal_or_below = { + limit = { dynasty = root.dynasty } + custom = coronation_events.1020.b.custom + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # imprison the non dynastic vassal for the impertinence + option = { + name = coronation_events.1020.c + + add_dread = minor_dread_gain + + house = { + add_unity_value = { + value = medium_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + if = { + limit = { + OR = { + scope:not_dynasty_vassal = { + is_ai = yes + } + is_ai = no + } + } + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:not_dynasty_vassal + } + } + + + stress_impact = { just = medium_stress_gain } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_negative_ai_value + } + } + } + + # focus on family + option = { + name = coronation_events.1020.d + + house = { + add_unity_value = { + value = medium_unity_gain + character = root + desc = clan_unity_coronation_increased + } + } + + scope:not_dynasty_vassal = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + } + every_vassal_or_below = { + limit = { + government_has_flag = government_is_clan + NOT = { + dynasty = root.dynasty + } + NOT = { this = scope:not_dynasty_vassal } + } + custom = clan.1101.d.custom + + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + generous = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = medium_stress_impact_gain + craven = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_negative_ai_value + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = generous + has_trait = humble + has_trait = just + has_trait = craven + has_trait = trusting + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Powerful taxman approaches host +coronation_events.1021 = { + type = activity_event + title = coronation_events.1021.t + desc = coronation_events.1021.desc + left_portrait = { + character = root + animation = disapproval + } + + right_portrait = { + character = scope:supporter + animation = eavesdrop + camera = camera_event_very_right + } + + center_portrait = { + character = scope:taxman + animation = betting + camera = camera_event_center_pointing_left + } + override_background = { + reference = relaxing_room + } + + theme = coronation_activity + + cooldown = { years = 5 } + + trigger = { + government_has_flag = government_is_clan + + scope:activity = { + any_attending_character = { + is_ai = yes + is_tax_collector = yes + is_vassal_of = root + tax_slot = { + any_tax_slot_vassal = { + count >= 1 + } + } + ai_greed > 0 + } + any_guest_subset = { + name = supporter + is_ai = yes + is_tax_collector = no + OR = { + is_courtier_of = root + is_vassal_of = root + } + trigger_if = { + limit = { + root = { + has_activity_intent = coronation_embrace_supporters + } + } + OR = { + is_powerful_vassal_of = root + is_councillor_of = root + } + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_tax_collector = yes + is_vassal_of = root + tax_slot = { + any_tax_slot_vassal = { + count >= 1 + } + } + ai_greed > 0 + } + save_scope_as = taxman + save_scope_as = tax_collector + } + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + is_powerful_vassal_of = root + is_councillor_of = root + } + alternative_limit = { + is_ai = yes + is_powerful_vassal_of = root + } + alternative_limit = { + is_ai = yes + is_vassal_of = root + } + save_scope_as = supporter + } + } + } + + # embrace_supporters + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + } + name = coronation_events.1021.embrace_supporters + flavor = coronation_events.1021.embrace_supporters.flavor + + scope:supporter = { + add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 20 + } + } + add_character_modifier = { + modifier = coronation_tax_collectors_watched_modifier + years = 10 + } + scope:taxman = { + add_character_modifier = { + modifier = coronation_tax_collector_scrutiny_modifier + years = 10 + } + } + + stress_impact = { greedy = minor_stress_impact_gain } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_honor = high_chance_impact_positive_ai_value + } + } + } + + # impress_attendees + option = { + trigger = { + has_activity_intent = coronation_impress_attendees + diplomacy >= high_skill_rating + } + show_as_unavailable = { + has_activity_intent = coronation_impress_attendees + diplomacy < high_skill_rating + } + name = coronation_events.1021.impress_attendees + flavor = coronation_events.1021.impress_attendees.flavor + + house = { + add_unity_value = { + value = minor_unity_gain + character = root + desc = clan_unity_coronation_nepotism.desc + } + } + scope:taxman = { + tax_slot = { + every_tax_slot_vassal = { + custom = custom.every_tax_slot_vassal + limit = { + is_ai = yes + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + } + + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { greedy = minor_stress_impact_gain } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_honor = high_chance_impact_positive_ai_value + } + } + } + + # you're not that important + option = { + name = coronation_events.1021.a + flavor = coronation_events.1021.a.flavor + + house = { + add_unity_value = { + value = minor_unity_gain + character = root + desc = clan_unity_coronation_nepotism.desc + } + } + + add_legitimacy = minor_legitimacy_gain + + scope:taxman = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + stress_impact = { greedy = minor_stress_impact_gain } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_honor = high_chance_impact_positive_ai_value + } + } + } + + # empower tax collector + option = { + name = coronation_events.1021.c + flavor = coronation_events.1021.c.flavor + + house = { + add_unity_value = { + value = minor_unity_loss + character = root + desc = clan_unity_refused_nepotism.desc + } + } + add_character_modifier = { + modifier = bp4_empowered_tax_collectors_modifier + years = 10 + } + scope:taxman = { + if = { + limit = { + highest_skill = diplomacy + } + add_diplomacy_skill = 1 + } + else_if = { + limit = { + highest_skill = intrigue + } + add_intrigue_skill = 1 + } + else = { + add_stewardship_skill = 1 + } + } + + + stress_impact = { + honest = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + # strike a deal with the tax collector + option = { + name = coronation_events.1021.b + flavor = coronation_events.1021.b.flavor + scope:taxman = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + add_character_modifier = { + modifier = coronation_thriving_collector_modifier + years = 5 + } + tax_slot = { + every_tax_slot_vassal = { + custom = custom.every_tax_slot_vassal + limit = { + is_ai = yes + } + add_character_modifier = { + modifier = coronation_harsh_collector_modifier + years = 5 + } + } + } + } + + + stress_impact = { + honest = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_positive_ai_value + ai_sociability = medium_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# A supporter offers you a gift during the feast in exchange for better court clothing +coronation_events.1022 = { + type = activity_event + title = coronation_events.1022.t + desc = coronation_events.1022.desc + right_portrait = { + character = scope:supporter + animation = throne_room_conversation_4 + } + + left_portrait = { + character = root + animation = wedding_bride_left + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + #Needs enough money to afford silken robes + OR = { + is_ruler = yes + gold >= 100 + } + #Needs appropriate personality + NOR = { + has_trait = greedy + has_trait = temperate + has_trait = humble + has_trait = peasant_leader + } + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + #Needs enough money to afford silken robes + OR = { + is_ruler = yes + gold >= 100 + } + #Needs appropriate personality + NOR = { + has_trait = greedy + has_trait = temperate + has_trait = humble + has_trait = peasant_leader + } + any_memory = { + has_memory_category = positive + has_memory_participant = root + } + is_ai = yes + } + save_scope_as = supporter + } + } + + scope:supporter = { + hidden_effect = { + add_gold = major_gold_value + } + random_memory = { + limit = { + has_memory_category = positive + has_memory_participant = root + } + save_scope_as = supporter_memory + } + } + } + + # accept the gift and the deal + option = { + name = coronation_events.1022.a + + scope:supporter = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + + if = { + limit = { has_dlc_feature = royal_court } + custom_tooltip = free_fashion_for_15_years + add_character_flag = { + flag = court_free_fashion + years = 15 + } + } + else = { + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + + reverse_add_opinion = { + target = scope:supporter + modifier = pleased_opinion + opinion = 30 + } + + stress_impact = { + greedy = minor_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= medium_gold_value + add = 2 + } + } + } + + # ask for more gold in exchange for a future deal + option = { + name = coronation_events.1022.b + scope:supporter = { + pay_short_term_gold = { + target = root + gold = major_gold_value + } + if = { + limit = { + can_add_hook = { + type = favor_hook + target = root + } + } + add_hook = { + type = favor_hook + target = root + } + } + } + + reverse_add_opinion = { + target = scope:supporter + modifier = pleased_opinion + opinion = 30 + } + + stress_impact = { + greedy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_positive_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + modifier = { + short_term_gold <= minor_gold_value + add = 4 + } + } + } + + # redirect the gift towards the realm + option = { + name = coronation_events.1022.c + + scope:supporter = { + add_stewardship_skill = 1 + } + + add_stewardship_lifestyle_xp = medium_lifestyle_xp + + stress_impact = { + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + modifier = { + has_lifestyle = stewardship_lifestyle + add = 2 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Detractor makes a backhanded compliment in a toast +coronation_events.1023 = { + type = activity_event + title = coronation_events.1023.t + desc = { + desc = coronation_events.1023.desc + triggered_desc = { + trigger = { + exists = scope:supporter + } + desc = coronation_events.1023.supporter.desc + } + } + right_portrait = { + character = scope:detractor + animation = toast + } + + center_portrait = { + character = root + animation = drink + } + + left_portrait = { + trigger = { + exists = scope:supporter + } + character = scope:supporter + animation = shock + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + drinks_alcohol_trigger = yes + scope:activity = { + any_guest_subset = { + name = detractor + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + NOT = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + NOT = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + save_scope_as = detractor + } + } + + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + } + } + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = supporter + } + } + } + } + + # boldly make a retort + option = { + name = coronation_events.1023.a + trigger = { + has_activity_intent = coronation_impress_attendees + } + scope:activity = { + custom_tooltip = coronation_tt_positive_tiny + activity_special_type_progression_tiny = yes + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + brave = medium_stress_impact_loss + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_boldness = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # redirect toast to supporter + option = { + name = coronation_events.1023.b + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:supporter + } + if = { + limit = { + scope:supporter = { + opinion = { + target = root + value > 30 + } + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_toasted_coronation + CHARACTER = scope:supporter + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:supporter + modifier = grateful_opinion + opinion = 25 + } + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + # answer the toast directly and imprison detractor + option = { + name = coronation_events.1023.c + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:detractor = { + is_ai = yes + } + } + hard_imprison_character_effect = { + TARGET = scope:detractor + IMPRISONER = root + } + add_dread = medium_dread_gain + scope:detractor = { + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + if = { + limit = { + OR = { + is_ai = yes + AND = { + root = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_unjustified_imprisonment + CHARACTER = root + OPINION = -50 + } + } + } + if = { + limit = { + scope:detractor = { + is_a_faction_member = yes + } + } + scope:detractor.joined_faction = { + add_faction_discontent = major_discontent_gain + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + vengeful = medium_stress_impact_loss + wrathful = minor_stress_impact_loss + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_zeal = high_chance_impact_negative_ai_value + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = compassionate + } + } + } + } + + # remove the detractor by force + option = { + name = coronation_events.1023.d + trigger = { + NOT = { + has_activity_intent = coronation_weaken_detractors + } + } + scope:detractor = { remove_from_activity = scope:activity } + add_dread = minor_dread_gain + if = { + limit = { + scope:detractor = { + is_a_faction_member = yes + } + } + scope:detractor.joined_faction = { + add_faction_discontent = minor_discontent_gain + } + } + scope:detractor = { + add_opinion = { + modifier = humiliated_opinion + target = root + opinion = -25 + } + } + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + } + } + modifier = { + factor = 0.5 + scope:detractor = { + is_a_faction_member = yes + } + } + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_zeal = high_chance_impact_negative_ai_value + } + } + } + + # gracefully ignore + option = { + name = coronation_events.1023.e + + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + scope:detractor = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -10 + } + } + + stress_impact = { + shy = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_negative_ai_value + ai_zeal = high_chance_impact_positive_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Foreign guest brings a gift of friendship +coronation_events.1024 = { + type = activity_event + title = coronation_events.1024.t + desc = { + random_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:foreign.faith = root.faith + } + } + desc = coronation_events.1024.intro_diff_faith + } + triggered_desc = { + trigger = { + NOT = { + scope:foreign.culture = root.culture + } + } + desc = coronation_events.1024.intro_diff_culture + } + desc = coronation_events.1024.intro_diff_neither + } + desc = coronation_events.1024.desc + triggered_desc = { + trigger = { + has_activity_intent = coronation_embrace_supporters + } + desc = coronation_events.1024.supporter.desc + } + triggered_desc = { + trigger = { + has_activity_intent = coronation_weaken_detractors + } + desc = coronation_events.1024.detractor.desc + } + } + left_portrait = { + character = scope:guest + trigger = { + exists = scope:guest + } + triggered_animation = { + trigger = { + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + animation = admiration + } + animation = scheme + } + + right_portrait = { + character = scope:foreign + animation = throne_room_bow_1 + camera = camera_event_right + } + + center_portrait = { + character = root + animation = happiness + } + + theme = feast_activity + + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_attending_character = { + is_ai = yes + is_independent_ruler = yes + NOT = { + culture = root.culture + has_relation_rival = root + is_in_guest_subset = { name = detractor } + } + save_temporary_scope_as = foreign_temp + trigger_if = { + limit = { + root = { has_activity_intent = coronation_weaken_detractors } + } + scope:activity = { + any_guest_subset = { + name = detractor + is_ai = yes + highest_held_title_tier >= tier_county + opinion = { + target = scope:foreign_temp + value <= 0 + } + NOT = { + has_relation_rival = scope:foreign_temp + } + } + } + } + } + } + trigger_if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { + is_ai = yes + is_independent_ruler = yes + NOT = { + culture = root.culture + has_relation_rival = root + is_in_guest_subset = { name = detractor } + } + } + save_scope_as = foreign + } + if = { + limit = { + root = { + has_activity_intent = coronation_embrace_supporters + } + } + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + } + save_scope_as = guest + } + } + if = { + limit = { + root = { + has_activity_intent = coronation_weaken_detractors + } + } + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + highest_held_title_tier >= tier_county + opinion = { + target = scope:foreign + value <= 0 + } + NOT = { + has_relation_rival = scope:foreign + } + } + save_scope_as = guest + } + } + } + } + + # use the situation to awe the people present + option = { + trigger = { + has_activity_intent = coronation_impress_attendees + } + name = coronation_events.1024.impress_attendees + + scope:foreign = { + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + } + culture = { + change_cultural_acceptance = { + target = scope:foreign.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_event + } + } + + 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 + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + # use the situation to bolster a supporter + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:foreign = { + NOR = { + is_at_war_with = root + is_allied_to = root + } + highest_held_title_tier >= tier_county + is_in_guest_subset = { name = supporter } + #Not way way stronger than root + half_max_military_strength < root.max_military_strength + } + } + name = coronation_events.1024.embrace_supporters + + scope:foreign = { + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + save_scope_as = recipient + } + + scope:guest = { + if = { + limit = { + highest_held_title_tier < root.highest_held_title_tier + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + } + + custom_tooltip = negotiate_alliance_effect_tooltip + create_alliance = { + target = scope:foreign + allied_through_owner = root + allied_through_target = scope:foreign + } + + stress_impact = { + arrogant = minor_stress_impact_gain + fickle = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + #Root is much stronger + modifier = { + add = -100 + root.half_max_military_strength > scope:foreign.max_military_strength + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = fickle + has_trait = arrogant + } + } + } + } + + # use the situation to stress out a detractor + option = { + trigger = { + has_activity_intent = coronation_weaken_detractors + exists = scope:guest + } + name = coronation_events.1024.weaken_detractors + + scope:foreign = { + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + } + + scope:guest = { + add_stress = medium_stress_gain + if = { + limit = { + OR = { + root = { is_ai = no } + AND = { + is_ai = yes + scope:foreign = { is_ai = yes } + } + } + } + progress_towards_rival_effect = { + REASON = rival_foreign_threat + CHARACTER = scope:foreign + OPINION = -30 + } + } + if = { + limit = { + OR = { + is_ai = yes + AND = { + root = { is_ai = no } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_foreign_threat + CHARACTER = scope:foreign + OPINION = -30 + } + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = craven + } + } + } + } + + # use the situation to ensnare them as tributary + option = { + trigger = { + has_activity_intent = coronation_exalt_crown + scope:foreign = { + is_tributary = no + highest_held_title_tier < root.highest_held_title_tier + is_landed = yes + } + } + name = coronation_events.1024.exalt_crown + + scope:foreign = { + add_opinion = { + modifier = audacity_opinion + target = root + opinion = -30 + } + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + } + start_tributary_interaction_effect = { + TRIBUTARY = scope:foreign + SUZERAIN = root + } + if = { + limit = { + scope:foreign = { + OR = { + highest_held_title_tier >= tier_kingdom + max_military_strength >= root.max_military_strength + } + } + } + add_tyranny = medium_tyranny_gain + } + else_if = { + limit = { + scope:foreign = { + OR = { + highest_held_title_tier >= tier_duchy + max_military_strength >= root.half_max_military_strength + } + } + } + add_tyranny = minor_tyranny_gain + } + + + stress_impact = { + content = medium_stress_impact_gain + generous = medium_stress_impact_gain + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + modifier = { + add = 50 + scope:foreign = { + highest_held_title_tier < tier_kingdom + } + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = generous + has_trait = humble + has_trait = just + } + } + } + } + + # rudely decline + option = { + name = coronation_events.1024.a + + add_prestige = medium_prestige_gain + + scope:foreign = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = trusting + } + } + } + } + + # politely accept + option = { + name = coronation_events.1024.b + + scope:foreign = { + pay_short_term_gold = { + target = root + gold = activity_minor_gold_value + } + } + + culture = { + change_cultural_acceptance = { + target = scope:foreign.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_event + } + } + + scope:foreign = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + + stress_impact = { + callous = miniscule_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# two guests argue during the feast +coronation_events.1025 = { + type = activity_event + title = coronation_events.1025.t + + desc = { + desc = coronation_events.1025.desc.intro + triggered_desc = { + trigger = { exists = scope:supporter } + desc = coronation_events.1025.desc.supporter + } + triggered_desc = { + trigger = { exists = scope:detractor } + desc = coronation_events.1025.desc.detractor + } + } + + left_portrait = { + trigger = { exists = scope:supporter } + character = scope:supporter + animation = drink_goblet + camera = camera_event_very_right + } + + center_portrait = { + character = root + animation = wedding_objection_start + } + + right_portrait = { + trigger = { exists = scope:detractor } + character = scope:detractor + animation = drink_goblet + camera = camera_event_very_left + } + + theme = feast_activity + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_attending_character = { + is_ai = yes + is_adult = yes + is_in_guest_subset = { name = supporter } + } + any_attending_character = { + is_ai = yes + is_adult = yes + is_in_guest_subset = { name = detractor } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + is_in_guest_subset = { name = supporter } + } + save_scope_as = supporter + } + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + is_in_guest_subset = { name = detractor } + } + save_scope_as = detractor + } + } + } + + option = { + name = coronation_events.1025.a + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:supporter + } + if = { + limit = { + reverse_opinion = { + target = scope:supporter + value > 40 + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_fight + CHARACTER = scope:supporter + OPINION = 30 + } + } + else = { + scope:supporter = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + scope:detractor = { + add_opinion = { + modifier = contempt_opinion + target = root + opinion = -20 + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + coronation_embrace_supporters_opinion_effect = yes + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_honor = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1025.b + trigger = { + has_activity_intent = coronation_impress_attendees + } + + 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 + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1025.d + trigger = { + has_activity_intent = coronation_weaken_detractors + exists = scope:detractor + } + + scope:detractor = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -25 + } + add_stress = medium_stress_gain + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1025.e + trigger = { + has_activity_intent = coronation_exalt_crown + any_vassal = { + has_vassal_stance = parochial + } + } + + coronation_exalt_crown_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1025.c + + if = { + limit = { + reverse_opinion = { + target = scope:supporter + value > 40 + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_fight + CHARACTER = scope:supporter + OPINION = 20 + } + } + else = { + scope:supporter = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + scope:detractor = { + add_opinion = { + modifier = contempt_opinion + target = root + opinion = -10 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = high_chance_impact_positive_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + opinion_modifier = { + opinion_target = scope:supporter + multiplier = 0.5 + } + modifier = { + scope:detractor.current_military_strength > scope:supporter.current_military_strength + add = -50 + } + } + } + + option = { + name = coronation_events.1025.f + + if = { + limit = { + reverse_opinion = { + target = scope:detractor + value >= 0 + } + OR = { + scope:detractor = { is_ai = yes } + AND = { + scope:detractor = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_fight + CHARACTER = scope:detractor + OPINION = 20 + } + } + else = { + scope:detractor = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + scope:supporter = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = high_chance_impact_positive_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + opinion_modifier = { + opinion_target = scope:detractor + multiplier = 0.5 + } + modifier = { + scope:supporter.current_military_strength > scope:detractor.current_military_strength + add = -50 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# coronation cake token hunt +coronation_events.1026 = { + type = activity_event + title = coronation_events.1026.t + + desc = { + desc = coronation_events.1026.desc + first_valid = { + triggered_desc = { + trigger = { root = scope:token_finder } + desc = coronation_events.1026.special_desc + } + triggered_desc = { + trigger = { + scope:token_finder = { + is_in_guest_subset = { name = supporter } + } + } + desc = coronation_events.1026.supporter_desc + } + triggered_desc = { + trigger = { + scope:token_finder = { + is_in_guest_subset = { name = detractor } + } + } + desc = coronation_events.1026.detractor_desc + } + desc = coronation_events.1026.fallback_desc + } + } + + left_portrait = { + trigger = { + NOT = { + scope:token_finder = root + } + } + character = root + animation = ecstasy + } + center_portrait = { + character = scope:token_finder + animation = toast + camera = camera_event_left + } + right_portrait = { + character = scope:guest + trigger = { exists = scope:guest } + animation = throne_room_cheer_1 + camera = camera_event_right + } + + theme = feast_activity + cooldown = { years = 5 } + + trigger = { + scope:activity = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_lavish + } + any_attending_character = { + count >= 2 + is_ai = yes + is_adult = yes + NOT = { this = root } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + trigger_if = { + limit = { + root = { + has_activity_intent = coronation_embrace_supporters + } + } + OR = { + is_in_guest_subset = { name = supporter } + this = root + } + } + trigger_if = { + limit = { + root = { + has_activity_intent = coronation_weaken_detractors + } + } + OR = { + is_in_guest_subset = { name = detractor } + this = root + } + } + } + save_scope_as = token_finder + } + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + NOT = { this = root } + NOT = { this = scope:token_finder } + } + save_scope_as = guest + } + } + } + + option = { + name = coronation_events.1026.special + trigger = { + scope:token_finder = root + } + + add_prestige = medium_prestige_gain + add_legitimacy = minor_legitimacy_gain + + scope:activity = { + every_attending_character = { + limit = { NOT = { this = root } } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + + + 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 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 500 + } + } + + option = { + name = coronation_events.1026.a + trigger = { + has_activity_intent = coronation_impress_attendees + NOT = { + root = scope:token_finder + } + } + + coronation_impress_attendees_opinion_effect = yes + custom_tooltip = coronation_tt_positive_tiny + + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + NOT = { this = root } + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 5 + } + } + activity_special_type_progression_tiny = yes + } + + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + factor = 0.5 + has_trait = craven + } + ai_value_modifier = { + ai_honor = high_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1026.b + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:token_finder = { + is_in_guest_subset = { name = supporter } + } + NOT = { + root = scope:token_finder + } + } + + pay_short_term_gold = { + target = scope:token_finder + gold = activity_minor_gold_value + } + + if = { + limit = { + reverse_opinion = { + target = scope:token_finder + value > 50 + } + OR = { + scope:token_finder = { is_ai = yes } + AND = { + scope:token_finder = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_token_reward + CHARACTER = scope:token_finder + OPINION = 20 + } + } + else = { + scope:token_finder = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + factor = 2 + has_trait = generous + } + modifier = { + factor = 0.5 + has_trait = greedy + } + ai_value_modifier = { + ai_greed = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1026.c + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:token_finder = { + is_in_guest_subset = { name = detractor } + } + NOT = { + root = scope:token_finder + } + } + + scope:token_finder = { + add_stress = medium_stress_gain + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -15 + } + } + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + modifier = { + add = 20 + has_trait = vengeful + } + modifier = { + factor = 0.5 + has_trait = compassionate + } + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1026.d + trigger = { + has_activity_intent = coronation_exalt_crown + NOT = { + root = scope:token_finder + } + exists = dynasty + scope:token_finder.dynasty ?= root.dynasty + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + + coronation_exalt_crown_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + factor = 0.5 + has_trait = content + } + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1026.e + + stress_impact = { + base = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + temperate = minor_stress_impact_gain + } + + ai_chance = { + base = 60 + modifier = { + add = 20 + has_trait = gluttonous + } + modifier = { + factor = 0.5 + has_trait = temperate + } + ai_value_modifier = { + ai_sociability = medium_chance_impact_negative_ai_value + ai_honor = medium_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1026.f + + add_piety = minor_piety_gain + stress_impact = { + gluttonous = minor_stress_impact_gain + temperate = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + modifier = { + add = 30 + has_trait = temperate + } + modifier = { + factor = 0.5 + has_trait = gluttonous + } + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + ai_honor = medium_chance_impact_positive_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# a guest is highlighted during a choreography +coronation_events.1027 = { + type = activity_event + title = coronation_events.1027.t + desc = { + desc = coronation_events.1027.desc + first_valid = { + triggered_desc = { + trigger = { root = scope:highlighted_guest } + desc = coronation_events.1027.special_desc + } + triggered_desc = { + trigger = { + scope:highlighted_guest = { + is_in_guest_subset = { name = supporter } + } + } + desc = coronation_events.1027.supporter_desc + } + triggered_desc = { + trigger = { + scope:highlighted_guest = { + is_in_guest_subset = { name = detractor } + } + } + desc = coronation_events.1027.detractor_desc + } + desc = coronation_events.1027.fallback_desc + } + } + + left_portrait = { + character = root + animation = throne_room_applaud_1 + } + + right_portrait = { + trigger = { + NOT = { + scope:highlighted_guest = root + } + } + character = scope:highlighted_guest + animation = dancing + } + + theme = feast_activity + cooldown = { years = 5 } + + trigger = { + scope:activity = { + NOT = { + has_activity_option = { + category = ceremony_feast_type + option = ceremony_feast_type_austere + } + } + any_attending_character = { + is_adult = yes + is_ai = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + is_ai = yes + } + create_character_memory = { + type = coronation_highlighted_memory + participants = { + host = scope:host + } + } + save_scope_as = highlighted_guest + } + } + } + + option = { + name = coronation_events.1027.special + trigger = { + root = scope:highlighted_guest + } + + add_prestige = medium_prestige_gain + add_legitimacy = minor_legitimacy_gain + + scope:activity = { + every_attending_character = { + limit = { NOT = { this = root } } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + + 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 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 500 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.a + trigger = { + has_activity_intent = coronation_impress_attendees + NOT = { root = scope:highlighted_guest } + } + + 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 + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_sociability = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.b + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:highlighted_guest = { + is_in_guest_subset = { name = supporter } + } + } + if = { + limit = { + reverse_opinion = { + target = scope:highlighted_guest + value > 50 + } + OR = { + scope:highlighted_guest = { is_ai = yes } + AND = { + scope:highlighted_guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + CHARACTER = scope:highlighted_guest + REASON = friend_dance + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:highlighted_guest + modifier = spirits_lifted_opinion + opinion = 20 + } + } + + scope:highlighted_guest = { + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + generous = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value + ai_compassion = medium_chance_impact_positive_ai_value + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.c + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:highlighted_guest = { + is_in_guest_subset = { name = detractor } + } + } + + scope:highlighted_guest = { + add_stress = medium_stress_gain + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -15 + } + } + + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + option = { + name = coronation_events.1027.d + trigger = { + has_activity_intent = coronation_exalt_crown + NOT = { root = scope:highlighted_guest } + } + + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + + coronation_exalt_crown_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.e + + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + NOT = { this = root } + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 45 + modifier = { + add = 10 + has_trait = gregarious + } + modifier = { + factor = 0.5 + has_trait = shy + } + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1027.f + + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + NOT = { this = root } + } + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + + ai_chance = { + base = 35 + modifier = { + add = 15 + has_trait = shy + } + modifier = { + factor = 0.4 + has_trait = gregarious + } + ai_value_modifier = { + ai_sociability = high_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Multi-faith blessing offer during the Coronation Ceremony +coronation_events.1028 = { + type = activity_event + title = coronation_events.1028.t + + theme = coronation_activity + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = interested + } + + center_portrait = { + character = scope:clergy_representative + animation = ecstasy + camera = camera_event_right + } + + right_portrait = { + character = scope:guest + animation = stunned + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:guest = { + is_in_guest_subset = { name = detractor } + } + } + desc = coronation_events.1028.detractor.desc + } + triggered_desc = { + trigger = { + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + desc = coronation_events.1028.supporter.desc + } + desc = coronation_events.1028.fallback.desc + } + } + + trigger = { + faith = { + NOT = { + has_doctrine = doctrine_pluralism_pluralistic + } + } + scope:activity = { + any_attending_character = { + is_adult = yes + is_ai = yes + NOT = { + faith = root.faith + has_trait = cynical + } + } + trigger_if = { + limit = { + root = { has_activity_intent = coronation_weaken_detractors } + } + any_attending_character = { + is_adult = yes + is_ai = yes + is_in_guest_subset = { name = detractor } + faith = root.faith + } + } + trigger_if = { + limit = { + root = { has_activity_intent = coronation_embrace_supporters } + } + any_attending_character = { + is_adult = yes + is_ai = yes + is_in_guest_subset = { name = supporter } + faith = root.faith + } + } + trigger_else = { + any_attending_character = { + is_adult = yes + is_ai = yes + faith = root.faith + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + is_ai = yes + is_in_guest_subset = { name = detractor } + faith = root.faith + } + save_scope_as = guest + } + } + } + else_if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + is_ai = yes + is_in_guest_subset = { name = supporter } + faith = root.faith + } + save_scope_as = guest + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + is_ai = yes + faith = root.faith + } + save_scope_as = guest + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + NOT = { + faith = root.faith + has_trait = cynical + } + } + save_scope_as = clergy_representative + } + } + } + + option = { + name = coronation_events.1028.supporter + trigger = { + has_activity_intent = coronation_embrace_supporters + scope:guest = { + is_in_guest_subset = { name = supporter } + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + add_piety = medium_piety_gain + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:guest } + scope:guest = { + opinion = { + target = root + value > 0 + } + } + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_matters_of_faith + CHARACTER = scope:guest + OPINION = default_friend_opinion + } + } + else = { + reverse_add_opinion = { + target = scope:guest + modifier = kindness_opinion + opinion = 20 + } + } + + + + scope:guest = { + add_piety = medium_piety_gain + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { + shy = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = high_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1028.detractor + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:guest = { + is_in_guest_subset = { name = detractor } + } + faith = { + faith_hostility_level = { + target = scope:clergy_representative.faith + value > faith_astray_level + } + } + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + + + scope:guest = { + add_piety = medium_piety_loss + add_stress = major_stress_gain + } + + scope:activity = { + every_attending_character = { + limit = { + NOT = { + has_trait = cynical + } + faith = root.faith + } + + custom = coronation_events.1028.detractor.tt + + add_opinion = { + target = scope:guest + modifier = impious_opinion + opinion = -10 + } + } + } + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + forgiving = minor_stress_impact_gain + vengeful = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + ai_vengefulness = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1028.c # Publicly rebuke the request + + trigger = { + has_trait = zealous + } + add_piety = major_piety_gain + + 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 + } + + scope:clergy_representative = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -15 + } + add_stress = minor_stress_gain + } + + scope:activity = { + every_attending_character = { + limit = { + NOT = { + this = scope:clergy_representative + } + has_trait = zealous + faith = root.faith + NOT = { this = root } + } + custom = coronation_events.1028.c.tt + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + } + + 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.a + trigger = { + has_trait = cynical + } + add_character_modifier = { + modifier = tolerant_opinion_modifier + years = 25 + } + + scope:guest = { + coronation_move_towards_supporter_effect = { CHARACTER = scope:guest } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + add_piety = { + value = miniscule_piety_loss + if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value = faith_astray_level + } + } + } + add = minor_piety_loss + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + add = medium_piety_loss + } + else_if = { + limit = { + scope:clergy_representative.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + add = major_piety_loss + } + } + + 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_perk = apostate_perk + } + + scope:activity = { + every_attending_character = { + limit = { + has_trait = zealous + faith = root.faith + } + + custom = coronation_events.1028.a.tt + + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + } + + if = { + limit = { + scope:activity = { + any_attending_character = { + faith = scope:clergy_representative.faith + this != scope:clergy_representative + } + } + } + scope:activity = { + every_attending_character = { + limit = { + faith = scope:clergy_representative.faith + NOT = { + this = scope:clergy_representative + } + } + custom = coronation_events.1028.a.tt3 + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = high_chance_impact_negative_ai_value + ai_sociability = medium_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1028.b # Politely decline alternative blessings + + trigger = { + NOT = { + has_trait = zealous + has_trait = cynical + } + } + add_piety = medium_piety_gain + + scope:activity = { + every_attending_character = { + limit = { + has_trait = zealous + faith = root.faith + } + + custom = coronation_events.1028.b.tt + + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + } + } + } + + 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 = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + cynical = minor_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_honor = medium_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# you discover some forgotten ancient rights +coronation_events.1029 = { + type = activity_event + title = coronation_events.1029.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_activity_intent = coronation_embrace_supporters + } + desc = coronation_events.1029.supporter.desc + } + triggered_desc = { + trigger = { + has_activity_intent = coronation_weaken_detractors + } + desc = coronation_events.1029.detractor.desc + } + desc = coronation_events.1029.desc + } + } + + left_portrait = { + character = scope:guest + triggered_animation = { + trigger = { scope:guest = { is_in_guest_subset = { name = detractor } } } + animation = rage + } + triggered_animation = { + trigger = { scope:guest = { is_in_guest_subset = { name = supporter } } } + animation = ecstasy + } + } + + center_portrait = { + character = root + animation = interested + camera = camera_event_left + } + + right_portrait = { + character = scope:priest + animation = chancellor + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + coronation_living_officiator_trigger = yes + primary_title.previous_holder ?= { + exists = yes + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + grab_mythical_founder_effect = yes + involved_activity.var:officiator ?= { + save_scope_as = priest + } + root.primary_title = { + save_scope_as = primary_title + } + + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + } + scope:activity = { + random_guest_subset = { + name = supporter + save_scope_as = guest + } + } + } + else_if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + scope:activity = { + random_guest_subset = { + name = detractor + save_scope_as = guest + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { is_ai = yes } + save_scope_as = guest + } + } + } + } + + option = { + name = coronation_events.1029.a + trigger = { + has_activity_intent = coronation_exalt_crown + has_ce1_dlc_trigger = yes + } + + gain_legitimizing_legend_seed_tooltip_effect = yes + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + + coronation_exalt_crown_opinion_effect = yes + + stress_impact = { ambitious = minor_stress_impact_loss } + ai_chance = { base = 50 } + } + + option = { + name = coronation_events.1029.b + trigger = { + has_activity_intent = coronation_embrace_supporters + } + if = { + limit = { + reverse_opinion = { + target = scope:guest + value > 30 + } + OR = { + scope:guest = { is_ai = yes } + AND = { + scope:guest = { + is_ai = no + } + is_ai = no + } + } + } + scope:guest = { + progress_towards_friend_effect = { + REASON = friend_ancestral_vow + CHARACTER = root + OPINION = 20 + } + } + } + else = { + reverse_add_opinion = { + target = scope:guest + modifier = loyalty_opinion + opinion = 25 + } + } + + coronation_embrace_supporters_opinion_effect = yes + + stress_impact = { generous = minor_stress_impact_loss } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_sociability = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1029.c + trigger = { + has_activity_intent = coronation_weaken_detractors + } + if = { + limit = { + scope:guest = { is_ai = yes } + } + add_hook_if_possible_default_length_effect = { + TARGET = scope:guest + TYPE = manipulation_hook + } + } + + coronation_move_towards_supporter_effect = { CHARACTER = scope:guest } + + scope:guest = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -15 + } + add_stress = minor_stress_gain + } + + coronation_weaken_detractors_opinion_effect = yes + stress_impact = { vengeful = minor_stress_impact_loss } + ai_chance = { + base = 30 + ai_value_modifier = { + ai_vengefulness = high_chance_impact_positive_ai_value + } + } + } + + option = { + name = coronation_events.1029.d + trigger = { + has_activity_intent = coronation_impress_attendees + diplomacy >= medium_skill_rating + } + show_as_unavailable = { + has_activity_intent = coronation_impress_attendees + diplomacy < medium_skill_rating + } + + skill = diplomacy + + 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 + } + + coronation_impress_attendees_opinion_effect = yes + + stress_impact = { brave = minor_stress_impact_loss } + ai_chance = { base = 100 } + } + + option = { + name = coronation_events.1029.e + add_piety = minor_piety_gain + stress_impact = { shy = minor_stress_impact_loss } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_honor = high_chance_impact_negative_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Scholar offers to include the coronation in their chronicle +scripted_trigger coronation_events_1030_valid_scholar = { + learning > 10 + is_ai = yes + is_in_guest_subset = { name = supporter } + OR = { + is_vassal_of = root + is_courtier_of = root + } +} + +coronation_events.1030 = { + type = activity_event + title = coronation_events.1030.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { has_activity_intent = coronation_exalt_crown } + desc = coronation_events.1030.exalt.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_impress_attendees } + desc = coronation_events.1030.impress.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_embrace_supporters } + desc = coronation_events.1030.supporters.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_weaken_detractors } + desc = coronation_events.1030.detractors.desc + } + } + } + + center_portrait = { + character = root + animation = interested + camera = camera_event_left + } + + right_portrait = { + character = scope:scholar + animation = storyteller + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + involved_activity = { + any_attending_character = { + coronation_events_1030_valid_scholar = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity = { + random_attending_character = { + limit = { + coronation_events_1030_valid_scholar = yes + } + weight = { + base = 1 + modifier = { + add = learning + } + modifier = { + is_vassal_of = root + add = 5 + } + } + save_scope_as = scholar + } + } + } + + option = { + name = coronation_events.1030.a + trigger = { + has_activity_intent = coronation_exalt_crown + } + + scope:scholar = { + duel = { + skills = { learning diplomacy } + value = high_skill_rating + # the scholar gets it right + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1030.tt.success + send_interface_toast = { + title = coronation_events.1030.tt.success + left_icon = scope:scholar + root = { + if = { + limit = { + has_ce1_dlc_trigger = yes + has_legend_chapter_trigger = { CHAPTER = extra_deed } + } + add_character_modifier = { + modifier = bp4_chronicled_coronation_modifier + years = 5 + } + promoted_legend ?= { + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + set_legend_chapter = { + name = extra_deed + localization_key = legend_chapter_great_coronation + } + } + } + else = { + add_prestige = medium_prestige_gain + add_legitimacy = minor_legitimacy_gain + } + } + } + } + # the scholar gets it wrong + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1030.tt.failure + send_interface_toast = { + title = coronation_events.1030.tt.failure + left_icon = scope:scholar + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + } + + + + stress_impact = { arrogant = minor_stress_impact_loss } + + ai_chance = { + base = 40 + } + } + + option = { + name = coronation_events.1030.b + trigger = { + has_activity_intent = coronation_impress_attendees + } + + scope:scholar = { + duel = { + skills = { learning diplomacy } + value = high_skill_rating + # the scholar gets it right + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1030.tt.success + send_interface_toast = { + title = coronation_events.1030.tt.success + left_icon = scope:scholar + 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 + } + } + } + # the scholar gets it wrong + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1030.tt.failure + send_interface_toast = { + title = coronation_events.1030.tt.failure + left_icon = scope:scholar + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + } + + stress_impact = { gregarious = minor_stress_impact_loss } + + ai_chance = { base = 50 } + } + + option = { + name = coronation_events.1030.c + trigger = { + has_activity_intent = coronation_embrace_supporters + } + + scope:scholar = { + duel = { + skills = { learning diplomacy } + value = high_skill_rating + # the scholar gets it right + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1030.tt.success + send_interface_toast = { + title = coronation_events.1030.tt.success + left_icon = scope:scholar + scope:activity = { + every_guest_subset = { + name = supporter + limit = { is_ai = yes } + custom = every_supporter_activity + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + } + } + } + # the scholar gets it wrong + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1030.tt.failure + send_interface_toast = { + title = coronation_events.1030.tt.failure + left_icon = scope:scholar + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + } + + + + stress_impact = { compassionate = minor_stress_impact_loss } + + ai_chance = { base = 35 } + } + + option = { + name = coronation_events.1030.d + trigger = { + has_activity_intent = coronation_weaken_detractors + } + + scope:scholar = { + duel = { + skills = { learning diplomacy } + value = high_skill_rating + # the scholar gets it right + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = coronation_events.1030.tt.success + send_interface_toast = { + title = coronation_events.1030.tt.success + left_icon = scope:scholar + scope:activity = { + every_guest_subset = { + name = detractor + limit = { is_ai = yes } + custom = every_detractor_tt + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + add_stress = minor_stress_gain + add_legitimacy = miniscule_legitimacy_loss + } + } + } + } + # the scholar gets it wrong + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = coronation_events.1030.tt.failure + send_interface_toast = { + title = coronation_events.1030.tt.failure + left_icon = scope:scholar + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + } + + stress_impact = { vengeful = minor_stress_impact_loss } + + ai_chance = { base = 30 } + } + + option = { + name = coronation_events.1030.e + + add_piety = minor_piety_gain + + stress_impact = { + shy = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = high_chance_impact_positive_ai_value + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Host sets the tone for the choir +coronation_events.1031 = { + type = activity_event + title = coronation_events.1031.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { has_activity_intent = coronation_exalt_crown } + desc = coronation_events.1031.exalt.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_impress_attendees } + desc = coronation_events.1031.impress.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_embrace_supporters } + desc = coronation_events.1031.supporters.desc + } + triggered_desc = { + trigger = { has_activity_intent = coronation_weaken_detractors } + desc = coronation_events.1031.detractors.desc + } + } + } + + left_portrait = { + character = root + animation = personality_honorable + } + + center_portrait = { + trigger = { exists = involved_activity.var:officiator } + character = involved_activity.var:officiator + animation = chancellor + camera = camera_event_right + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + coronation_living_officiator_trigger = yes + scope:activity = { + NOT = { + has_activity_option = { + category = ceremony_size + option = coronation_small_ceremony + } + } + } + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity.var:officiator ?= { + save_scope_as = priest + } + } + + option = { + name = coronation_events.1031.e + + trigger = { + OR = { + culture = { + has_cultural_tradition = tradition_music_theory + } + has_trait = lifestyle_poet + } + } + + 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 + } + add_learning_skill = 1 + + scope:activity = { + if = { + limit = { exists = var:officiator } + var:officiator ?= { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 15 + } + } + } + every_attending_character = { + limit = { + is_ai = yes + OR = { + has_trait = lifestyle_poet + has_trait = scholar + } + NOT = { + this = root + } + } + custom = every_poet_scholar + add_opinion = { + target = root + modifier = amazed_opinion + opinion = 10 + } + } + } + + stress_impact = { + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 300 + } + } + + + option = { + name = coronation_events.1031.a + + trigger = { + NOR = { + culture = { + has_cultural_tradition = tradition_music_theory + } + has_trait = lifestyle_poet + } + } + 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 + } + + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + is_vassal_of = root + } + custom = every_attending_vassal + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + + stress_impact = { arrogant = minor_stress_impact_loss } + + ai_chance = { base = 40 } + } + + option = { + name = coronation_events.1031.b + add_diplomacy_skill = 1 + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + OR = { + is_in_guest_subset = { name = detractor } + has_trait = compassionate + } + } + custom = every_attending_detractor_or_compassionate + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 10 + } + } + } + + stress_impact = { compassionate = minor_stress_impact_loss } + + ai_chance = { base = 30 } + } + + option = { + name = coronation_events.1031.c + 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 + } + + root.dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + + scope:activity = { + every_guest_subset = { + name = detractor + limit = { is_ai = yes } + custom = every_detractor_tt + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + add_stress = minor_stress_gain + } + } + + stress_impact = { vengeful = minor_stress_impact_loss } + + ai_chance = { base = 20 } + } + + option = { + name = coronation_events.1031.d + add_stress = minor_stress_loss + stress_impact = { shy = minor_stress_impact_loss } + ai_chance = { base = 10 } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# You prepare a grand gesture for the ceremony +coronation_events.1032 = { + type = activity_event + title = coronation_events.1032.t + + desc = coronation_events.1032.desc + + left_portrait = { + character = root + animation = personality_compassionate + } + + center_portrait = { + trigger = { exists = scope:supporter } + character = scope:supporter + camera = camera_event_right + animation = interested_left + } + + right_portrait = { + trigger = { exists = scope:detractor } + character = scope:detractor + animation = war_over_win + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + scope:activity = { + any_guest_subset = { + name = supporter + is_ai = yes + } + any_guest_subset = { + name = detractor + is_ai = yes + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity.var:officiator ?= { + save_scope_as = priest + } + + scope:activity = { + random_guest_subset = { + name = supporter + limit = { + is_ai = yes + } + save_scope_as = supporter + } + random_guest_subset = { + name = detractor + limit = { + is_ai = yes + } + save_scope_as = detractor + } + } + + if = { + limit = { + NOT = { + faith = { + any_faith_holy_order = { + holy_order_patron = root + save_temporary_scope_as = order + } + } + } + # Jomsvikings should use their special decision if appropriate. + trigger_if = { + limit = { has_fp1_dlc_trigger = yes } + faith = { + NOT = { fp1_valid_norse_faith_for_jomsvikings_trigger = yes } + } + } + trigger_if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_order_can_be_created_by_dukes + } + highest_held_title_tier >= tier_duchy + } + NOT = { + any_sub_realm_barony = { + is_under_holy_order_lease = yes + } + } + } + + OR = { + AND = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_order_can_be_created_by_dukes + } + highest_held_title_tier >= tier_duchy + } + highest_held_title_tier >= tier_kingdom + any_held_county = { + any_in_de_jure_hierarchy = { + tier = tier_barony + is_capital_barony = no + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + } + } + random_held_county = { + limit = { + any_in_de_jure_hierarchy = { + tier = tier_barony + is_capital_barony = no + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + random_in_de_jure_hierarchy = { + limit = { + tier = tier_barony + is_capital_barony = no + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + save_scope_as = barony + } + } + } + } + + option = { + name = coronation_events.1032.c + flavor = coronation_events.1032.c.flavor + + trigger = { + exists = scope:barony + NOT = { + faith = { + any_faith_holy_order = { + holy_order_patron = root + save_temporary_scope_as = order + } + } + } + # Jomsvikings should use their special decision if appropriate. + trigger_if = { + limit = { has_fp1_dlc_trigger = yes } + faith = { + NOT = { fp1_valid_norse_faith_for_jomsvikings_trigger = yes } + } + } + trigger_if = { + limit = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_order_can_be_created_by_dukes + } + highest_held_title_tier >= tier_duchy + } + NOT = { + any_sub_realm_barony = { + is_under_holy_order_lease = yes + } + } + } + + OR = { + AND = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = holy_order_can_be_created_by_dukes + } + highest_held_title_tier >= tier_duchy + } + highest_held_title_tier >= tier_kingdom + any_held_county = { + any_in_de_jure_hierarchy = { + tier = tier_barony + is_capital_barony = no + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + } + } + + custom_tooltip = create_holy_order_decision_effect_message_coronation + + if = { + limit = { + exists = scope:barony + } + hidden_effect = { + if = { + limit = { NOT = { scope:barony.holder = root } } + create_title_and_vassal_change = { + type = leased_out + save_scope_as = change + add_claim_on_loss = no + } + scope:barony = { + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + + create_character = { + template = holy_order_leader_character + location = scope:barony.title_province + save_scope_as = leader + } + + create_holy_order_neutral_effect = { + LEADER = scope:leader + CAPITAL = scope:barony + NEW_HO_SCOPE = new_holy_order + FOUNDER = root + } + } + create_holy_order_effect = yes + + add_piety = medium_piety_loss + + + stress_impact = { impatient = minor_stress_impact_loss } + + ai_chance = { base = 20 } + } + + option = { + name = coronation_events.1032.d + flavor = coronation_events.1032.d.flavor + + trigger = { + OR = { + dread >= major_dread_value + has_trait = wrathful + } + scope:detractor = { + NAND = { + has_trait = blind + has_trait = disfigured + } + } + } + + add_dread = medium_dread_gain + scope:detractor = { + if = { + limit = { + NOT = { + has_trait = blind + } + } + add_trait = blind + add_opinion = { + modifier = blinded_me + target = root + } + } + else = { + add_trait = disfigured + add_opinion = { + modifier = disfigured_me + target = root + } + } + } + add_tyranny = medium_tyranny_gain + + stress_impact = { + vengeful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + + ai_chance = { + base = 15 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + ai_compassion >= low_positive_ai_value + } + } + } + } + option = { + name = coronation_events.1032.a + flavor = coronation_events.1032.a.flavor + + custom_tooltip = coronation_tt_positive_tiny + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + scope:activity = { + activity_special_type_progression_tiny = yes + every_attending_character = { + limit = { + is_ai = yes + is_in_guest_subset = { name = supporter } + NOT = { + this = root + } + } + custom = every_supporter_activity + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + } + remove_short_term_gold = medium_gold_value + + stress_impact = { compassionate = minor_stress_impact_loss } + + ai_chance = { base = 35 } + } + + option = { + name = coronation_events.1032.b + trigger = { + scope:supporter = { + OR = { + highest_held_title_tier >= tier_kingdom + AND = { + highest_held_title_tier < tier_kingdom + is_landed = yes + is_independent_ruler = yes + is_tributary = no + } + is_landed = no + } + } + } + + if = { + limit = { + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + } + scope:supporter = { + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + } + custom_tooltip = { + text = create_alliance_supporter_tt + create_alliance = { + target = scope:supporter + allied_through_owner = root + allied_through_target = scope:supporter + } + } + } + else_if = { + limit = { + scope:supporter = { + highest_held_title_tier < tier_kingdom + is_landed = yes + is_independent_ruler = yes + is_tributary = no + } + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + scope:supporter = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + else_if = { + limit = { + scope:supporter = { + is_landed = no + } + OR = { + scope:supporter = { is_ai = yes } + AND = { + scope:supporter = { + is_ai = no + } + is_ai = no + } + } + } + set_relation_friend = { + reason = friend_coronation_honor + target = scope:supporter + } + hidden_effect = { + add_opinion = { + target = scope:supporter + modifier = friendliness_opinion + opinion = 50 + } + } + + reverse_add_opinion = { + target = scope:supporter + modifier = friendliness_opinion + opinion = 50 + } + } + + stress_impact = { arrogant = minor_stress_impact_loss } + + ai_chance = { base = 30 } + } + option = { + name = coronation_events.1032.e + + scope:detractor = { + add_opinion = { + target = root + opinion = 15 + modifier = commiseration_opinion + } + } + stress_impact = { + shy = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# Rival speaks up +coronation_events.1033 = { + type = activity_event + title = coronation_events.1033.t + desc = coronation_events.1033.desc + + left_portrait = { + character = root + animation = disapproval + } + + right_portrait = { + character = scope:rival + animation = anger + } + + theme = coronation_activity + cooldown = { years = 5 } + + trigger = { + has_activity_intent = coronation_weaken_detractors + scope:activity = { + any_attending_character = { + has_relation_rival = root + OR = { + is_powerful_vassal = yes + highest_held_title_tier >= tier_kingdom + } + drinks_alcohol_trigger = yes + NOT = { + has_trait = temperate + } + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + ai_rationality < medium_positive_ai_value + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + custom_tooltip = happened_because_intent_tt + scope:activity = { + random_attending_character = { + limit = { + has_relation_rival = root + OR = { + is_powerful_vassal = yes + highest_held_title_tier >= tier_kingdom + } + drinks_alcohol_trigger = yes + NOT = { + has_trait = temperate + } + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + ai_rationality < medium_positive_ai_value + } + } + save_scope_as = rival + } + var:officiator ?= { + save_scope_as = priest + } + } + } + + option = { + name = coronation_events.1033.c + + add_dread = minor_dread_gain + rightfully_imprison_character_effect = { + IMPRISONER = root + TARGET = scope:rival + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { + name = coronation_events.1033.a + add_legitimacy = minor_legitimacy_gain + add_piety = minor_piety_gain + if = { + limit = { + NOT = { has_relation_nemesis = scope:rival } + OR = { + scope:rival = { is_ai = yes } + AND = { + scope:rival = { + is_ai = no + } + is_ai = no + } + } + } + set_relation_nemesis = { + target = scope:rival + reason = rival_publicly_denounced_at_coronation + } + } + else = { + scope:rival = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -50 + } + } + } + stress_impact = { + base = medium_stress_gain + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { + name = coronation_events.1033.b + + trigger = { + diplomacy >= 14 + } + + add_legitimacy = minor_legitimacy_gain + if = { + limit = { + government_allows = administrative + top_liege = scope:activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + add_diplomacy_skill = 1 + + if = { + limit = { + OR = { + scope:rival = { is_ai = yes } + AND = { + scope:rival = { + is_ai = no + } + is_ai = no + } + } + } + scope:rival = { + remove_relation_rival = root + add_opinion = { + target = root + modifier = humbled_opinion + opinion = 25 + } + } + } + + scope:activity = { + every_attending_character = { + limit = { + is_ai = yes + OR = { + has_trait = compassionate + has_trait = trusting + is_in_guest_subset = { name = supporter } + } + } + custom = custom.every_compassionate_trusting_supporter + add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 10 + } + } + } + + stress_impact = { forgiving = minor_stress_impact_loss } + + ai_chance = { base = 30 } + } + + option = { + name = coronation_events.1033.d + add_legitimacy = minor_legitimacy_loss + stress_impact = { + calm = minor_stress_impact_loss + humble = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = arrogant + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# choose a robe for the coronation +coronation_events.1034 = { + type = activity_event + title = coronation_events.1034.t + desc = coronation_events.1034.desc + + theme = coronation_activity + + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = shock + camera = camera_event_left + } + + center_portrait = { + character = scope:supporter + animation = debating + camera = camera_event_center + } + + right_portrait = { + character = scope:detractor + animation = anger + camera = camera_event_right + } + + lower_right_portrait = { + character = scope:host + } + + trigger = { + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + scope:host = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + scope:activity = { + any_guest_subset = { + name = detractor + this != root + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + any_guest_subset = { + name = supporter + this != root + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_guest_subset = { + name = detractor + limit = { + this != root + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + save_scope_as = detractor + } + random_guest_subset = { + name = supporter + limit = { + this != root + culture = { has_graphical_east_asia_culture_group_trigger = yes } + faith = { + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = naked_priests_active + } + } + } + save_scope_as = supporter + } + } + } + + option = { + name = coronation_events.1034.a # "I shall wear a robe finer than theirs — let them take the hint." + trigger = { + highest_held_title_tier >= scope:host.highest_held_title_tier + OR = { + is_in_guest_subset = { name = detractor } + dislikes_character_trigger = { CHARACTER = scope:host } + } + } + + custom_tooltip = coronation_events.1034.a.tt + + add_intrigue_lifestyle_xp = minor_lifestyle_xp + + add_character_flag = outshining_host + scope:host = { + trigger_event = coronation_events.1035 + } + + stress_impact = { + ambitious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = ambitious + } + modifier = { + add = -20 + has_trait = humble + } + } + } + + option = { + name = coronation_events.1034.b # "I will match the Host’s colors, a silent sign of my allegiance." + trigger = { + OR = { + likes_character_trigger = { CHARACTER = scope:host } + is_in_guest_subset = { name = supporter } + } + } + + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + + add_opinion = { + target = scope:host + modifier = respect_opinion + opinion = 10 + } + + stress_impact = { + trusting = minor_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = 20 + has_trait = trusting + } + modifier = { + add = -10 + has_trait = deceitful + } + } + } + + option = { + name = coronation_events.1034.c # "Tradition guides me — I will wear what is proper." + add_piety = minor_piety_gain + + if = { + limit = { has_trait = confucian_education } + add_trait_xp = { + trait = confucian_education + value = lifestyle_confucian_education_xp_gain_minor_value + } + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + stress_impact = { + zealous = minor_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + has_trait = zealous + } + modifier = { + add = -15 + has_trait = arbitrary + } + } + } + + option = { + name = coronation_events.1034.d # "Let fashion speak — I’ll wear what the capital wears." + add_prestige = minor_prestige_gain + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + + stress_impact = { + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 15 + has_trait = gregarious + } + modifier = { + add = -15 + has_trait = zealous + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# some awful guest is trying to outshine you +coronation_events.1035 = { + type = activity_event + title = coronation_events.1035.t + desc = coronation_events.1035.desc + + theme = coronation_activity + + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = disapproval + camera = camera_event_left + } + + center_portrait = { + character = scope:offending_guest + animation = fanning_coyly + camera = camera_event_center + } + + trigger = { + scope:host = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + scope:activity = { + any_attending_character = { + has_character_flag = outshining_host + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_attending_character = { + limit = { + has_character_flag = outshining_host + } + save_scope_as = offending_guest + } + } + } + + option = { + name = coronation_events.1035.a # "Let them have their moment. My mandate stands above fabric." + + if = { + limit = { government_allows = merit } + change_merit = minor_merit_gain + } + else = { + add_prestige = minor_prestige_gain + } + + scope:offending_guest = { + add_opinion = { + target = root + modifier = weak_opinion + opinion = 10 + } + } + + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + + hidden_effect = { + scope:offending_guest = { + send_interface_toast = { + title = coronation_events.1035.a.toast + left_icon = root + add_prestige = minor_prestige_gain + } + } + } + + stress_impact = { + humble = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = 20 + has_trait = humble + } + modifier = { + add = -10 + has_trait = arrogant + } + } + } + + option = { + name = coronation_events.1035.b # "Their insult will not be forgotten." + + progress_towards_rival_effect = { + REASON = rival_outshine_coronation + CHARACTER = scope:offending_guest + OPINION = -20 + } + + hidden_effect = { + scope:offending_guest = { + send_interface_toast = { + title = coronation_events.1035.b.toast + left_icon = root + show_as_tooltip = { + root = { + progress_towards_rival_effect = { + REASON = rival_outshine_coronation + CHARACTER = scope:offending_guest + OPINION = -20 + } + } + } + } + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + modifier = { + add = 20 + has_trait = wrathful + } + modifier = { + add = -15 + has_trait = forgiving + } + } + } + + option = { + name = coronation_events.1035.c # "A gentle word in private should suffice." + + scope:offending_guest = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + + hidden_effect = { + scope:offending_guest = { + send_interface_toast = { + title = coronation_events.1035.c.toast + left_icon = root + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + just = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + add = 15 + has_trait = just + } + modifier = { + add = -10 + has_trait = callous + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + scope:activity = { + every_attending_character = { + remove_character_flag = outshining_host + } + } + } +} + +# People are reciting verses in honor of the coronation +coronation_events.1036 = { + type = activity_event + title = coronation_events.1036.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host.culture = { has_cultural_pillar = heritage_chinese } + } + desc = coronation_events.1036.china.desc + } + triggered_desc = { + trigger = { + scope:host.culture = { has_cultural_pillar = heritage_japonic } + } + desc = coronation_events.1036.japan.desc + } + triggered_desc = { + trigger = { + scope:host.culture = { has_cultural_pillar = heritage_korean } + } + desc = coronation_events.1036.korea.desc + } + desc = coronation_events.1036.desc + } + } + + theme = coronation_activity + + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = fanning + } + + center_portrait = { + character = scope:verse_initiator + animation = storyteller + } + + right_portrait = { + character = scope:host + animation = throne_room_bow_1 + } + + trigger = { + scope:host = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + scope:activity = { + any_attending_character = { + this != root + OR = { + likes_character_trigger = { CHARACTER = scope:host } + is_in_guest_subset = { name = supporter } + } + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_attending_character = { + limit = { + this != root + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + } + save_scope_as = verse_initiator + } + } + } + + option = { + name = coronation_events.1036.a # Praise Host in verse + + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + OR = { + likes_character_trigger = { CHARACTER = scope:host } + is_in_guest_subset = { name = supporter } + } + } + + progress_towards_friend_effect = { + REASON = best_friend_poetry + CHARACTER = scope:host + OPINION = 15 + } + + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + else_if = { + limit = { + has_trait = lifestyle_poet + has_trait_xp = { + trait = lifestyle_poet + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_poet + value = 10 + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 40 + modifier = { + add = 20 + has_trait = gregarious + } + modifier = { + add = 15 + likes_character_trigger = { CHARACTER = scope:host } + } + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { + name = coronation_events.1036.b # Veiled critique of Host + + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + OR = { + dislikes_character_trigger = { CHARACTER = scope:host } + is_in_guest_subset = { name = detractor } + } + } + + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + else_if = { + limit = { + has_trait = lifestyle_poet + has_trait_xp = { + trait = lifestyle_poet + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_poet + value = 10 + } + } + + scope:activity.host = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_poetry + OPINION = -10 + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + modifier = { + add = 20 + has_trait = cynical + } + modifier = { + add = 20 + dislikes_character_trigger = { CHARACTER = scope:host } + } + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + option = { + name = coronation_events.1036.c # Compose formal verse + + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = violet_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 25 + } + } + } + } + + if = { + limit = { has_trait = confucian_education } + add_trait_xp = { + trait = confucian_education + value = lifestyle_confucian_education_xp_gain_minor_value + } + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + else_if = { + limit = { + has_trait = lifestyle_poet + has_trait_xp = { + trait = lifestyle_poet + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_poet + value = 10 + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + } + + ai_chance = { + base = 35 + modifier = { + add = 20 + has_trait = ambitious + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { + name = coronation_events.1036.d # Praise the recital + + progress_towards_friend_effect = { + REASON = friend_praised_poetry + CHARACTER = scope:verse_initiator + OPINION = 15 + } + + stress_impact = { + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 35 + modifier = { + add = 15 + has_trait = trusting + } + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { + name = coronation_events.1036.e # Subtle critique of recital + + add_intrigue_lifestyle_xp = minor_lifestyle_xp + scope:verse_initiator = { + add_opinion = { + target = root + modifier = frustrated_opinion + opinion = -15 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 25 + modifier = { + add = 20 + has_trait = arrogant + } + ai_value_modifier = { + ai_greed = 1 + ai_vengefulness = 1 + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +# someone is taking a natural occurrence as an omen +coronation_events.1037 = { + type = activity_event + title = coronation_events.1037.t + desc = coronation_events.1037.desc + theme = coronation_activity + cooldown = { years = 10 } + + left_portrait = { + character = scope:host + animation = stress + camera = camera_event_center_pointing_right + } + + center_portrait = { + character = scope:skeptical_guest + animation = shock + camera = camera_event_center_pointing_left + } + + right_portrait = { + trigger = { exists = scope:respected_elder } + character = scope:respected_elder + animation = personality_zealous + } + + trigger = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + OR = { + location.county = { + any_county_situation = { + OR = { + situation_type = natural_disaster_flood + situation_type = natural_disaster_earthquake + } + } + } + # Ongoing plague + any_sub_realm_county = { + any_county_province = { + any_province_epidemic = { + outbreak_intensity > minor + } + } + } + } + scope:activity = { + any_attending_character = { + is_ai = yes + has_trait = zealous + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + has_trait = zealous + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + save_scope_as = skeptical_guest + } + random_attending_character ?= { + limit = { + age > 60 + OR = { + AND = { + has_trait = confucian_education + has_trait_xp = { + trait = confucian_education + value > 70 + } + } + learning >= high_skill_rating + has_relation_elder = root + } + } + save_scope_as = respected_elder + } + } + location.county = { + random_county_situation ?= { + limit = { + OR = { + situation_type = natural_disaster_flood + situation_type = natural_disaster_earthquake + } + } + save_scope_as = omen_happening + } + } + if = { + limit = { + NOT = { + exists = scope:omen_happening + } + } + random_sub_realm_county = { + random_county_province = { + random_province_epidemic = { + limit = { + outbreak_intensity > minor + } + save_scope_as = omen_happening + } + } + } + } + } + + option = { + name = coronation_events.1037.a # Invoke scripture, poetry, or history + + trigger = { + OR = { + has_trait = confucian_education + learning >= high_skill_rating + } + } + + 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 + } + add_learning_lifestyle_xp = medium_lifestyle_xp + + scope:skeptical_guest = { + add_opinion = { + target = scope:host + modifier = impressed_opinion + opinion = 15 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 35 + modifier = { + add = 20 + has_trait = confucian_education + } + modifier = { + add = 15 + learning >= high_skill_rating + } + modifier = { + add = 15 + has_trait = arrogant + } + modifier = { + add = 15 + has_trait = diligent + } + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { + name = coronation_events.1037.b # Invite a respected elder to speak + + trigger = { + exists = scope:respected_elder + } + + if = { + limit = { has_trait = confucian_education } + add_trait_xp = { + trait = confucian_education + value = lifestyle_confucian_education_xp_gain_minor_value + } + } + else_if = { + limit = { + location = { + is_province_valid_confucian_education_trigger = yes + } + has_government = celestial_government + } + add_trait = confucian_education + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + stress_impact = { + zealous = minor_stress_impact_loss + temperate = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + modifier = { + add = 20 + has_trait = temperate + } + modifier = { + add = 20 + has_trait = zealous + } + ai_value_modifier = { + ai_honor = 1 + ai_zeal = 2 + } + } + } + + option = { + name = coronation_events.1037.c # Expel them from the ceremony + + add_dread = medium_dread_gain + add_prestige = minor_prestige_loss + + scope:skeptical_guest = { + remove_from_activity = scope:activity + } + + stress_impact = { + wrathful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + add = 20 + has_trait = wrathful + } + modifier = { + add = 10 + has_trait = arbitrary + } + modifier = { + add = -10 + has_trait = just + } + ai_value_modifier = { + ai_greed = 1 + ai_vengefulness = 2 + } + } + } + + option = { + name = coronation_events.1037.d # Laugh it off + + scope:skeptical_guest = { + add_opinion = { + target = scope:host + modifier = dismissed_me_opinion + opinion = -5 + } + } + + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_gain + cynical = minor_stress_impact_loss + } + + ai_chance = { + base = 25 + modifier = { + add = -10 + has_trait = zealous + } + modifier = { + add = -10 + has_trait = cynical + } + ai_value_modifier = { + ai_zeal = -1 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + } +} diff --git a/N3OW/events/activities/coronation_activity/coronation_events_6.txt b/N3OW/events/activities/coronation_activity/coronation_events_6.txt new file mode 100644 index 00000000..71df0ce4 --- /dev/null +++ b/N3OW/events/activities/coronation_activity/coronation_events_6.txt @@ -0,0 +1,15492 @@ +namespace = coronation_events + +######################################### +# Coronation - Flavor Events # +# coronation_events - 6000-6999 # +# Jason "Dirty Dog" Cantalini # +######################################### + +scripted_trigger coronation_events_6000_valid_switch_title_trigger = { + is_landless_type_title = no + #Only one tier beneath host + tier = scope:host.highest_held_title_tier_minus_one + #Host isn't already de jure liege + NOT = { de_jure_liege = scope:host.primary_title } + #Shouldn't be possible if the de jure liege is at war for your title + trigger_if = { + limit = { + exists = de_jure_liege.holder + } + de_jure_liege.holder = { + NOT = { + any_character_war = { + primary_attacker = prev + primary_defender = { + OR = { + this = scope:host + this = root + } + } + any_in_list = { + list = war_targets + OR = { + this = root.primary_title + any_in_de_jure_hierarchy = { + this = root.primary_title + } + } + + } + } + } + } + } + #Either borders liege title or borders yours, so we won't make disjointed messes + any_de_jure_county = { + OR = { + any_neighboring_county = { + duchy = { + OR = { + this = scope:host.capital_county.duchy + this = root.primary_title + kingdom = scope:host.primary_title + } + } + } + duchy = scope:host.capital_county.duchy + } + } + #Every county is in realm + any_de_jure_county = { + count = all + holder = { + OR = { + this = scope:host + any_liege_or_above = { + this = scope:host + } + } + } + } +} +scripted_effect coronation_events_6000_confederation_de_jure_effect = { + hidden_effect = { + scope:host = { + primary_title = { + set_destroy_on_gain_same_tier = no + } + } + } + + #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 + } + add_prestige = { + add = minor_prestige_loss + multiply = "list_size(new_confederation_de_jure)" + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:host + opinion = 30 + } + } + else = { + hidden_effect = { + add_prestige = { + add = minor_prestige_loss + multiply = "list_size(new_confederation_de_jure)" + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:host + opinion = 30 + } + } + } + + #If this is the Confederation's first de jure duchy, give liege chance to confirm and remove "destroy on gain same tier" + if = { + limit = { + scope:host.primary_title = { + any_direct_de_jure_vassal_title = { + count = all + holder ?= { + OR = { + this = root + this = scope:host + } + } + } + } + } + scope:host = { + primary_title = { + custom_tooltip = confederation_remove_destroy_chance_tt + } + } + } + if = { + limit = { + scope:host.primary_title = { + NOT = { + exists = empire + } + } + } + scope:host = { + primary_title = { + set_de_jure_liege_title = scope:de_jure_empire + } + } + } + + scope:activity = { + add_activity_log_entry = { + key = coronation_confederation_de_jure_log + character = scope:host + target = scope:loyal_vassal + score = 100 + show_in_conclusion = yes + } + } + scope:loyal_vassal = { + create_character_memory = { + type = offered_realm_to_confederation_memory + participants = { + liege = scope:host + } + } + } +} +# You are a vassal at a confederation kingdom's coronation and it feels p good +coronation_events.6000 = { + type = activity_event + title = coronation_events.6000.t + desc = coronation_events.6000.desc + left_portrait = { + character = root + animation = admiration + } + center_portrait = { + character = scope:host + animation = laugh + camera = camera_event_left + } + right_portrait = { + character = scope:other_vassal + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + override_background = { + reference = courtyard + } + theme = coronation_activity + cooldown = { years = 1 } + + trigger = { + liege ?= { this = scope:activity.activity_host } + is_ruler = yes + highest_held_title_tier >= tier_county + scope:activity = { + activity_host = { + #The succession law is really the only thing that makes it a Confederation kingdom + primary_title = { + has_title_law = confederation_elective_succession_law + } + highest_held_title_tier = tier_kingdom + NOR = { + tyranny >= low_tyranny + has_trait = arrogant + dread >= 80 + } + } + any_attending_character = { + NOR = { + this = root + this = scope:activity.activity_host + is_in_guest_subset = { + name = detractor + } + } + liege = scope:activity.activity_host + age >= 6 + } + } + } + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + has_trait = paranoid + } + modifier = { + add = -0.25 + has_trait = arrogant + } + modifier = { + add = -0.2 + ai_sociability <= medium_negative_ai_value + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:host + is_in_guest_subset = { + name = detractor + } + } + liege = scope:activity.activity_host + age >= 6 + } + save_scope_as = other_vassal + } + } + if = { + limit = { + NOT = { + culture = scope:host.culture + } + } + scope:host.culture = { + add_to_list = other_confed_cultures + } + } + scope:host = { + every_vassal = { + limit = { + NOT = { + culture = root.culture + } + } + culture = { + add_to_list = other_confed_cultures + } + } + } + #Switch de jure + every_held_title = { + limit = { + coronation_events_6000_valid_switch_title_trigger = yes + } + add_to_list = new_confederation_de_jure + } + #Get completely controlled + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + duchy ?= { + coronation_events_6000_valid_switch_title_trigger = yes + any_de_jure_county = { + count = all + holder = { + OR = { + this = root + liege = root + } + } + } + NOR = { + is_in_list = new_confederation_de_jure + exists = holder + } + } + } + duchy = { + add_to_list = new_confederation_de_jure + } + } + scope:host = { + every_held_title = { + limit = { + coronation_events_6000_valid_switch_title_trigger = yes + } + add_to_list = new_confederation_de_jure + } + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + duchy = { + NOT = { + is_in_list = new_confederation_de_jure + } + coronation_events_6000_valid_switch_title_trigger = yes + any_de_jure_county = { + count = all + holder = { + OR = { + this = scope:host + liege = scope:host + } + } + } + NOR = { + is_in_list = new_confederation_de_jure + exists = holder + } + } + } + duchy = { + add_to_list = new_confederation_de_jure + } + } + capital_county.empire ?= { + save_scope_as = de_jure_empire + } + } + } + #My sub-realm belongs forever to the Confederation! + option = { + name = coronation_events.6000.a + flavor = coronation_events.6000.a.flavor + trigger = { + any_held_title = { + coronation_events_6000_valid_switch_title_trigger = yes + any_de_jure_county = { + any_neighboring_county = { + duchy = { + OR = { + this = scope:host.capital_county.duchy + kingdom = scope:host.primary_title + } + } + } + } + } + OR = { + has_activity_intent = coronation_offer_support + scope:host.primary_title = { + any_de_jure_county = { + count >= 1 + exists = this + } + } + } + } + save_scope_as = loyal_vassal + custom_description_no_bullet = { text = if_host_accepts_oath_tt } + show_as_tooltip = { + coronation_events_6000_confederation_de_jure_effect = yes + } + #Notify liege + scope:host = { + #Effects will actually be done in mirror event + trigger_event = coronation_events.6001 + } + stress_impact = { + fickle = medium_stress_impact_gain + greedy = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_honor = 1 + ai_greed = -1 + } + modifier = { + add = 50 + has_trait = loyal + } + modifier = { + add = -100 + NOT = { is_in_guest_subset = { name = supporter } } + } + #Want this to keep happening if it already happened once + modifier = { + add = 150 + scope:host.primary_title = { + any_de_jure_county = { + count >= 1 + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = greedy + has_trait = arbitrary + has_trait = disloyal + is_in_guest_subset = { name = detractor } + } + } + } + } + #My family should get involved and be well-known here + option = { + name = coronation_events.6000.b + flavor = coronation_events.6000.b.flavor + trigger = { + house ?= { + NOT = { + has_variable = confederation_house_promoted + } + } + } + custom_tooltip = house_confederation_vote_bonus_tt + save_scope_as = root_scope + #Boosted AI interest in picking your candidate + house = { + set_variable = { + name = confederation_house_promoted + years = 10 + } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_house_candidates_log + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + #Because custom tooltip inside house scope doesn't work properly... + show_as_tooltip = { + if = { + limit = { + has_activity_intent = coronation_bear_witness + } + add_piety = minor_piety_gain + } + if = { + limit = { + has_activity_intent = coronation_seize_advantages + } + add_prestige = minor_prestige_gain + } + else = { + add_prestige = miniscule_prestige_gain + } + every_courtier = { + custom = custom.every_house_member + if = { + limit = { + root = { has_activity_intent = coronation_bear_witness } + } + add_piety = minor_piety_gain + root = { custom_tooltip = improved_because_intent_tt } + } + if = { + limit = { + root = { has_activity_intent = coronation_seize_advantages } + } + add_prestige = minor_prestige_gain + root = { custom_tooltip = improved_because_intent_tt } + } + else = { + add_prestige = miniscule_prestige_gain + } + } + } + hidden_effect = { + house = { + every_house_member = { + custom = custom.every_house_member + if = { + limit = { + root = { has_activity_intent = coronation_bear_witness } + } + add_piety = minor_piety_gain + } + if = { + limit = { + root = { has_activity_intent = coronation_seize_advantages } + } + add_prestige = minor_prestige_gain + } + else = { + add_prestige = miniscule_prestige_gain + } + } + } + } + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + shy = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_greed = 1 + } + modifier = { + add = 150 + has_activity_intent = coronation_seize_advantages + } + modifier = { + add = 50 + has_activity_intent = coronation_bear_witness + } + modifier = { + add = 100 + is_in_guest_subset = { name = detractor } + } + modifier = { + add = -100 + is_in_guest_subset = { name = supporter } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + } + } + } + } + #confederates together is very naice + option = { + name = coronation_events.6000.c + hidden_effect = { + scope:host = { + reverse_add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + every_vassal = { + reverse_add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + } + } + } + scope:host = { + add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + every_vassal = { + custom = custom.every_fellow_vassal + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + } + } + if = { + limit = { + has_activity_intent = coronation_bear_witness + any_in_list = { + list = other_confed_cultures + count >= 1 + } + } + every_in_list = { + custom = custom.every_other_culture_confederation + list = other_confed_cultures + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = confederation_camraderie + } + } + custom_tooltip = improved_because_intent_tt + } + else_if = { + limit = { + has_activity_intent = coronation_bear_witness + has_legitimacy = yes + } + add_legitimacy = miniscule_legitimacy_gain + custom_tooltip = improved_because_intent_tt + } + stress_impact = { + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + compassionate = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + ambitious = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + modifier = { + add = 50 + has_activity_intent = coronation_bear_witness + } + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + +#Host response event +# Your vassal wants to swear their domain to confederation forever +coronation_events.6001 = { + type = activity_event + title = coronation_events.6001.t + desc = coronation_events.6001.desc + left_portrait = { + character = root + animation = personality_honorable + camera = camera_event_very_left + } + center_portrait = { + character = scope:loyal_vassal + animation = celebrate_sword + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:other_vassal + animation = toast + camera = camera_event_very_right + } + override_background = { + reference = courtyard + } + theme = coronation_activity + + immediate = { + # For MP + coronation_busy_effect = yes + + 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 + } + scope:loyal_vassal = { + primary_title = { + de_jure_liege = { + save_scope_as = old_de_jure + } + } + } + } + + #If this is my de jure land... surely I should get a vote strength...? + option = { + name = coronation_events.6001.a + trigger = { + NOR = { + has_character_flag = confederation_politicking_vote_2 + has_character_flag = confederation_politicking_vote + } + } + save_scope_as = root_scope + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + add_character_flag = { + flag = confederation_politicking_vote_2 + years = 10 + } + custom_tooltip = confederation_elective_extra_vote_2 + custom_tooltip = improved_because_intent_tt + scope:activity = { + add_activity_log_entry = { + key = coronation_vote_log_2 + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + } + else = { + add_character_flag = { + flag = confederation_politicking_vote + years = 10 + } + custom_tooltip = confederation_elective_extra_vote + scope:activity = { + add_activity_log_entry = { + key = coronation_vote_log + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + } + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_good + title = confederation_king_accepts_promise_tt + left_icon = scope:host + scope:loyal_vassal = { + coronation_events_6000_confederation_de_jure_effect = yes + } + } + } + if = { + limit = { + primary_title = { + any_de_jure_county = { + count = 0 + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + modifier = { + add = 100 + primary_title = { + any_de_jure_county = { + count >= 1 + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = ambitious + } + primary_title = { + any_de_jure_county = { + count = 0 + } + } + } + } + } + #Sounds good man + option = { + name = coronation_events.6001.b + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + add_legitimacy = minor_legitimacy_gain + custom_tooltip = improved_because_intent_tt + } + else = { + add_legitimacy = miniscule_legitimacy_gain + } + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_good + title = confederation_king_accepts_promise_tt + left_icon = scope:host + scope:loyal_vassal = { + coronation_events_6000_confederation_de_jure_effect = yes + } + } + } + + if = { + limit = { + primary_title = { + any_de_jure_county = { + count = 0 + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + modifier = { + add = 100 + primary_title = { + any_de_jure_county = { + count >= 1 + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = ambitious + } + primary_title = { + any_de_jure_county = { + count = 0 + } + } + } + } + } + #Nooooo, think of the kingdoms of old! + option = { + name = coronation_events.6001.c + flavor = coronation_events.6001.c.flavor + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_bad + title = confederation_king_rejects_promise_tt + left_icon = scope:host + scope:host = { + if = { + limit = { + NOT = { + has_character_modifier = admires_regal_kingdoms + } + } + add_character_modifier = { + modifier = admires_regal_kingdoms + years = 10 + } + } + if = { + limit = { + scope:loyal_vassal = { + is_ai = yes + } + } + scope:loyal_vassal = { + set_relation_rival = { + target = root + reason = rival_traitor_to_confederation + } + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:loyal_vassal } + } + add_tyranny = medium_tyranny_gain + } + } + } + + stress_impact = { + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + content = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + ai_honor = -1 + } + modifier = { + add = -30 + scope:loyal_vassal = { + is_ai = no + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = just + has_trait = content + has_trait = trusting + primary_title = { + any_de_jure_county = { + count >= 1 + } + } + } + } + } + } + + after = { + # For MP + coronation_ready_effect = yes + } +} + + +scripted_trigger coronation_events_6010_assailant_trigger = { + NOR = { + is_allied_to = scope:activity.activity_host + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:activity.activity_host } + is_tributary_of_suzerain_or_above = scope:activity.activity_host + any_tributary = { + this = scope:activity.activity_host + } + any_truce_target = { + this = scope:activity.activity_host + } + } + highest_held_title_tier >= tier_duchy + current_military_strength >= 300 +} +scripted_effect coronation_events_6010_defender_effect = { + add_trait = loyal + if = { + limit = { + government_has_flag = government_is_nomadic + } + vassal_contract_set_obligation_level = { type = liege_war_participation_obligation level = 1 } + add_prestige = medium_prestige_gain + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:host + opinion = 40 + } + } + else = { + #You will join liege's defensive wars + custom_tooltip = confederation_alliance + custom_tooltip = confederation_join_war_offer_tt + scope:host = { + if = { + limit = { + root = scope:host + } + hidden_effect = { + add_opinion = { + target = scope:loyal_vassal + modifier = event_negotiated_alliance_opinion + } + } + } + else = { + add_opinion = { + target = scope:loyal_vassal + modifier = event_negotiated_alliance_opinion + } + } + add_to_variable_list = { + name = confed_vassals_defensive + target = scope:loyal_vassal + } + } + #Gain alliance with liege + create_alliance = { + target = scope:host + allied_through_owner = scope:loyal_vassal + allied_through_target = scope:host + } + } +} +scripted_effect coronation_events_6010_defender_effect_2 = { + if = { + limit = { + highest_skill = martial + OR = { + has_education_martial_trigger = yes + has_focus_martial = yes + } + NOT = { + has_trait = unyielding_defender + } + } + add_trait = unyielding_defender + add_martial_skill = 1 + } + else = { + custom_tooltip = best_commander_gains_defender_tt + hidden_effect = { + ordered_courtier = { + order_by = martial + limit = { + NOR = { + has_trait = unyielding_defender + has_trait = infirm + has_trait = incapable + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:loyal_vassal } + is_imprisoned = no + } + add_trait = unyielding_defender + add_martial_skill = 3 + } + } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_confederation_defender_log + character = scope:loyal_vassal + target = scope:host + score = 50 + show_in_conclusion = yes + } + } + create_character_memory = { + type = promised_to_defend_confederation_memory + participants = { + liege = scope:host + } + } +} + +#Can the king alone defend the Confederation from those who hate us...? +coronation_events.6010 = { + type = activity_event + title = coronation_events.6010.t + desc = coronation_events.6010.desc + left_portrait = { + character = scope:warrior_1 + animation = throne_room_two_handed_passive_shield + hide_info = yes + } + center_portrait = { + character = root + animation = dismissal + camera = camera_event_very_left + } + right_portrait = { + character = scope:warrior_2 + animation = horse_archer_idle + hide_info = yes + camera = camera_event_horse_right_forward + } + lower_left_portrait = scope:host + lower_right_portrait = scope:assailer + override_background = { + reference = burning_building + } + override_effect_2d = { + reference = smoke + } + + theme = coronation_activity + cooldown = { years = 1 } + + trigger = { + is_ruler = yes + current_military_strength >= 100 + highest_held_title_tier >= tier_county + liege ?= scope:activity.activity_host + scope:activity = { + activity_host = { + #The succession law is really the only thing that makes it a Confederation kingdom + primary_title = { + has_title_law = confederation_elective_succession_law + } + highest_held_title_tier = tier_kingdom + any_neighboring_top_liege_realm_owner = { + coronation_events_6010_assailant_trigger = yes + } + } + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity.activity_host = { + save_scope_as = host + } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + scope:activity.activity_location = { + if = { + limit = { + root = { is_ai = no } + scope:host = { is_ai = yes } + } + county = { + change_county_control = minor_county_control_loss + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + } + save_scope_as = location + } + scope:host = { + primary_heir ?= { + save_scope_as = confederation_heir + } + ordered_neighboring_top_liege_realm_owner = { + order_by = { + value = "opinion(scope:host)" + multiply = -1 + } + limit = { + highest_held_title_tier >= tier_empire + current_military_strength >= scope:host.current_military_strength + coronation_events_6010_assailant_trigger = yes + } + alternative_limit = { + highest_held_title_tier >= tier_kingdom + current_military_strength >= scope:host.current_military_strength + coronation_events_6010_assailant_trigger = yes + } + alternative_limit = { + current_military_strength >= scope:host.current_military_strength + coronation_events_6010_assailant_trigger = yes + } + alternative_limit = { + coronation_events_6010_assailant_trigger = yes + } + save_scope_as = assailer + } + } + create_character = { + template = mercenary + dynasty = none + location = scope:activity.activity_location + gender_female_chance = root_soldier_female_chance + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + save_scope_as = warrior_1 + } + create_character = { + template = mercenary + dynasty = none + location = scope:activity.activity_location + gender_female_chance = root_soldier_female_chance + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + save_scope_as = warrior_2 + } + scope:warrior_1 = { + add_character_flag = need_military_outfit + } + scope:warrior_2 = { + add_character_flag = need_military_outfit + } + } + + #I will fight beside the Confederation king! + option = { + name = coronation_events.6010.a + trigger = { + NOT = { + is_at_war_with = scope:host + } + OR = { + AND = { + government_has_flag = government_is_nomadic + NOT = { + subject_contract_has_flag = vassal_contract_liege_forced_war_override + } + } + NOR = { + government_has_flag = government_is_nomadic + is_allied_to = scope:host + } + } + #Too many icons being displayed on option + trigger_if = { + limit = { + has_activity_intent = coronation_offer_support + } + has_activity_intent = coronation_offer_support + } + trigger_else_if = { + limit = { + has_trait = loyal + } + has_trait = loyal + } + trigger_else_if = { + limit = { + has_trait = just + } + has_trait = just + } + trigger_else = { + has_trait = brave + } + } + custom_description_no_bullet = { text = if_host_accepts_oath_tt } + save_scope_as = loyal_vassal + show_as_tooltip = { + coronation_events_6010_defender_effect = yes + coronation_events_6010_defender_effect_2 = yes + } + #Notify liege + scope:host = { + #Effects will actually be done in mirror event + trigger_event = coronation_events.6011 + } + stress_impact = { + just = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + fickle = medium_stress_impact_gain + craven = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + modifier = { + add = -75 + opinion = { + target = scope:host + value <= -20 + } + } + modifier = { + add = 50 + OR = { + has_trait = just + has_trait = brave + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = fickle + has_trait = arbitrary + has_trait = paranoid + has_trait = disloyal + } + } + } + } + #If it is OUR throne, surely I should have a claim to it... + option = { + name = coronation_events.6010.b + flavor = coronation_events.6010.b.flavor + trigger = { + NOR = { + has_perk = meritocracy_perk + AND = { + is_diarch_of_target = scope:host + scope:host = { + NOT = { has_diarchy_parameter = can_be_instantly_dismissed } + } + } + AND = { + is_powerful_vassal_of = scope:host + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_claim_throne_for_powerful_vassals + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:host + } + } + } + AND = { + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_claim_throne_for_all + is_secondary_character_involvement_involved_trigger = { + CHAR = scope:host + } + } + } + AND = { + exists = title:d_sunni.holder + is_vassal_of = title:d_sunni.holder + any_character_struggle = { + involvement = involved + has_struggle_phase_parameter = unlocks_claim_throne_for_caliph_vassals + } + } + has_character_flag = confederation_claim_throne + } + has_activity_intent = coronation_disrupt_loyalists + } + custom_tooltip = confederation_claim_throne + add_character_flag = confederation_claim_throne + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + modifier = { + add = 50 + OR = { + has_trait = deceitful + has_trait = ambitious + } + } + modifier = { + OR = { + has_trait = disloyal + is_in_guest_subset = { name = detractor } + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = just + } + } + } + } + #I need to get him replaced... + option = { + name = coronation_events.6010.c + trigger = { + NOR = { + has_character_flag = confederation_politicking_vote_2 + has_character_flag = confederation_politicking_vote + } + } + add_legitimacy = minor_legitimacy_gain + save_scope_as = root_scope + #Additional vote + if = { + limit = { + has_activity_intent = coronation_seize_advantages + } + add_character_flag = { + flag = confederation_politicking_vote_2 + years = 10 + } + custom_tooltip = confederation_elective_extra_vote_2 + custom_tooltip = improved_because_intent_tt + scope:activity = { + add_activity_log_entry = { + key = coronation_vote_log_2 + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + + } + else = { + add_character_flag = { + flag = confederation_politicking_vote + years = 10 + } + custom_tooltip = confederation_elective_extra_vote + scope:activity = { + add_activity_log_entry = { + key = coronation_vote_log + character = scope:root_scope + score = 20 + show_in_conclusion = yes + } + } + } + + #Disrupt loyalists bonus + if = { + limit = { + NOT = { + scope:confederation_heir = { + has_character_flag = harm_confederation_candidacy + } + } + #Limit how much this gets stolen from players/happens from non-players + OR = { + is_ai = no + is_powerful_vassal = yes + } + scope:confederation_heir = { + OR = { + AND = { + exists = scope:house.host + house ?= scope:host.house + } + AND = { + exists = involved_activity + is_in_guest_subset = { name = supporter } + } + } + NOR = { + AND = { + exists = root.house + house ?= root.house + } + is_allied_to = root + } + } + has_activity_intent = coronation_disrupt_loyalists + } + custom_tooltip = harm_confederation_candidate_vote_tt + scope:confederation_heir = { + add_character_flag = { + flag = harm_confederation_candidacy + years = 10 + } + } + if = { + limit = { + scope:host.primary_heir.dynasty ?= { + this = scope:host.dynasty + } + } + reverse_add_opinion = { + target = scope:host + modifier = ruined_my_heir_opinion + opinion = -20 + } + } + custom_tooltip = improved_because_intent_tt + } + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_vengefulness = 1 + } + modifier = { + add = 50 + has_trait = arrogant + } + modifier = { + OR = { + has_trait = disloyal + is_in_guest_subset = { name = detractor } + } + add = 50 + } + modifier = { + add = 50 + has_activity_intent = coronation_disrupt_loyalists + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = trusting + } + } + } + } + #confederates together STRONK + option = { + name = coronation_events.6010.d + add_character_modifier = { + modifier = confederation_warrior_modifier + years = 10 + } + hidden_effect = { + scope:host = { + reverse_add_opinion = { + target = root + modifier = admires_resolve_opinion + opinion = 10 + } + every_vassal = { + limit = { + NOT = { + this = root + } + } + reverse_add_opinion = { + target = root + modifier = admires_resolve_opinion + opinion = 5 + } + } + } + } + scope:host = { + add_opinion = { + target = root + modifier = admires_resolve_opinion + opinion = 10 + } + add_character_modifier = { + modifier = confederation_warrior_modifier + years = 10 + } + every_vassal = { + custom = custom.every_fellow_vassal + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = admires_resolve_opinion + opinion = 5 + } + add_character_modifier = { + modifier = confederation_warrior_modifier + years = 10 + } + } + } + custom_tooltip = confederation_warrior_modifier_stacking_tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + scope:warrior_1 = { + silent_disappearance_effect = yes + } + scope:warrior_2 = { + silent_disappearance_effect = yes + } + } +} + +scripted_trigger coronation_events_6011_trigger = { + is_adult = yes + age <= 32 + is_courtier_of = $CHARACTER$ + is_imprisoned = no + is_healthy = yes + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + NOR = { + is_primary_heir_of = $CHARACTER$ + is_player_heir_of = $CHARACTER$ + } + trigger_if = { + limit = { + has_variable = coronation_events_6011_liege + } + var:coronation_events_6011_liege = { + NOT = { + this = $CHARACTER$ + } + } + } + prowess >= low_skill_rating + opinion = { + target = $CHARACTER$ + value > 0 + } + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } + } +} +scripted_trigger coronation_events_6011_county_trigger = { + is_landless_type_title = no + NOT = { + any_county_province = { + has_holding_type = church_holding + } + } + any_county_province = { + has_holding = no + } + any_county_province = { + has_holding_type = tribal_holding + OR = { + has_building_or_higher = palisades_01 + has_building_or_higher = war_camps_01 + has_building_or_higher = warrior_lodges_01 + } + } +} + +#Host response event +# Your vassal wants to swear to aid you in war +coronation_events.6011 = { + type = activity_event + title = coronation_events.6011.t + desc = coronation_events.6011.desc + left_portrait = { + character = root + animation = stress + } + center_portrait = { + character = scope:loyal_vassal + animation = rage + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:warrior_youth + animation = throne_room_two_handed_passive_shield + } + lower_center_portrait = scope:assailer + lower_right_portrait = scope:warrior_youth_vassal + override_background = { + reference = burning_building + } + override_effect_2d = { + reference = smoke + } + theme = coronation_activity + + trigger = { + NOT = { + has_character_flag = ach_6011_recently_triggered + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + add_character_flag = { + flag = ach_6011_recently_triggered + months = 1 + } + + #Trash the place a bit + scope:location.county = { + change_county_control = miniscule_county_control_loss + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + ordered_sibling = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = root } + martial >= average_skill_rating + } + save_scope_as = warrior_youth + } + if = { + limit = { + NOT = { + exists = scope:warrior_youth + } + } + ordered_child = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = root } + martial >= average_skill_rating + } + save_scope_as = warrior_youth + } + } + if = { + limit = { + NOT = { + exists = scope:warrior_youth + } + exists = house + } + house = { + ordered_house_member = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = root } + martial >= average_skill_rating + } + save_scope_as = warrior_youth + } + } + } + scope:warrior_youth = { + add_character_flag = need_military_outfit + } + scope:loyal_vassal = { + ordered_sibling = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = scope:loyal_vassal } + martial >= average_skill_rating + } + save_scope_as = warrior_youth_vassal + } + if = { + limit = { + NOT = { + exists = scope:warrior_youth_vassal + } + } + ordered_child = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = scope:loyal_vassal } + martial >= average_skill_rating + } + save_scope_as = warrior_youth_vassal + } + } + if = { + limit = { + NOT = { + exists = scope:warrior_youth_vassal + } + exists = house + } + house = { + ordered_house_member = { + order_by = martial + limit = { + coronation_events_6011_trigger = { CHARACTER = scope:loyal_vassal } + martial >= average_skill_rating + } + save_scope_as = warrior_youth_vassal + } + } + } + } + if = { + limit = { + capital_county = { + coronation_events_6011_county_trigger = yes + } + } + capital_county = { + save_scope_as = pacifying_county + } + } + else = { + ordered_held_title = { + order_by = development_level + limit = { + tier = tier_county + coronation_events_6011_county_trigger = yes + } + save_scope_as = pacifying_county + } + } + scope:loyal_vassal = { + if = { + limit = { + capital_county = { + coronation_events_6011_county_trigger = yes + } + } + capital_county = { + save_scope_as = pacifying_county_vassal + } + } + else = { + ordered_held_title = { + order_by = development_level + limit = { + tier = tier_county + coronation_events_6011_county_trigger = yes + } + save_scope_as = pacifying_county_vassal + } + } + } + } + #Brace your lands for peace, my vassal, not war + option = { + trigger = { + exists = scope:pacifying_county + exists = scope:pacifying_county_vassal + government_has_flag = government_is_tribal + #Done this way so it doesn't show too many traits + OR = { + trigger_if = { + limit = { + has_trait = architect + } + has_trait = architect + } + trigger_else_if = { + limit = { + has_trait = administrator + } + has_trait = administrator + } + trigger_else_if = { + limit = { + has_trait = scholar + } + has_trait = scholar + } + trigger_else_if = { + limit = { + has_trait = diplomat + } + has_trait = diplomat + } + trigger_else_if = { + limit = { + has_trait = theologian + } + has_trait = theologian + } + trigger_else_if = { + limit = { + has_trait = compassionate + } + has_trait = compassionate + } + trigger_else_if = { + limit = { + has_trait = trusting + } + has_trait = trusting + } + trigger_else = { + has_trait = zealous + } + culture = { + has_cultural_tradition = tradition_pacifism + } + faith = { + OR = { + has_doctrine = tenet_pacifism + has_doctrine = tenet_dharmic_pacifism + } + } + } + scope:loyal_vassal = { + is_ai = yes + } + } + name = coronation_events.6011.a + flavor = coronation_events.6011.a.flavor + add_piety = major_piety_gain + add_prestige = major_prestige_loss + scope:pacifying_county = { + random_county_province = { + limit = { + OR = { + has_building_or_higher = warrior_lodges_01 + has_building_or_higher = palisades_01 + has_building_or_higher = war_camps_01 + } + } + if = { + limit = { + has_building_or_higher = war_camps_01 + } + destroy_or_downgrade_tribal_building_effect = { BUILDING = war_camps } + } + if = { + limit = { + has_building_or_higher = palisades_01 + } + destroy_or_downgrade_tribal_building_effect = { BUILDING = palisades } + } + if = { + limit = { + has_building_or_higher = warrior_lodges_01 + } + destroy_or_downgrade_building_effect = { BUILDING = warrior_lodges } + } + } + random_county_province = { + limit = { + has_holding = no + } + begin_create_holding = church_holding + } + } + scope:loyal_vassal = { + scope:pacifying_county_vassal = { + random_county_province = { + limit = { + OR = { + has_building_or_higher = warrior_lodges_01 + has_building_or_higher = palisades_01 + has_building_or_higher = war_camps_01 + } + } + if = { + limit = { + has_building_or_higher = war_camps_01 + } + destroy_or_downgrade_tribal_building_effect = { BUILDING = war_camps } + } + if = { + limit = { + has_building_or_higher = palisades_01 + } + destroy_or_downgrade_tribal_building_effect = { BUILDING = palisades } + } + if = { + limit = { + has_building_or_higher = warrior_lodges_01 + } + destroy_or_downgrade_building_effect = { BUILDING = warrior_lodges } + } + } + random_county_province = { + limit = { + has_holding = no + } + begin_create_holding = church_holding + } + } + } + stress_impact = { + zealous = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + paranoid = major_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = major_stress_impact_gain + cynical = medium_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = 1 + ai_energy = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = cynical + has_trait = sadistic + } + } + } + } + + #Yes, we all should fight! In fact, send your youths to join a warband led by my kin + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:warrior_youth + exists = scope:warrior_youth_vassal + scope:loyal_vassal = { + is_ai = yes + } + trigger_if = { + limit = { + government_has_flag = government_is_tribal + } + has_dlc_feature = landless_playable + } + } + name = coronation_events.6011.b + flavor = coronation_events.6011.b.flavor + + #youth becomes laamp or landless nomad + scope:warrior_youth = { + if = { + limit = { + root = { government_has_flag = government_is_nomadic } + } + save_scope_as = holder + create_nomad_title = { + name = nomad_title_name + holder = scope:warrior_youth + government = nomad_government + save_scope_as = new_nomad_title + } + change_government = nomad_government + hidden_effect = { + add_gold = 30 + } + root = { + pay_herd = { + target = scope:warrior_youth + value = domicile.medium_herd_value + } + } + } + else = { + create_landless_adventurer_title_tooltip_effect = yes + add_character_modifier = { + modifier = ep3_voluntary_laamp_character_modifier + years = 5 + } + hidden_effect = { + # Create Adventurer + create_landless_adventurer_title_effect = { + REASON = flag:runaway_allowed + FLAVOR_CHAR = scope:warrior_youth + } + domicile ?= { + change_provisions = major_provisions_gain + } + } + root = { + pay_short_term_gold = { + target = scope:warrior_youth + gold = medium_gold_value + } + } + + + add_realm_law = camp_purpose_mercenaries + # Debug tracking + if = { + limit = { + is_ai = yes + debug_only = yes + } + if = { + limit = { exists = global_var:ai_voluntary_laamp_count } + change_global_variable = { + name = ai_voluntary_laamp_count + add = 1 + } + } + else = { + set_global_variable = { + name = ai_voluntary_laamp_count + value = 1 + } + } + debug_log = "AI became adventurer voluntarily" + debug_log_scopes = yes + } + } + + add_courtier = scope:warrior_youth_vassal + hidden_effect = { + scope:warrior_youth_vassal = { + add_trait = lifestyle_blademaster + } + } + + if = { + limit = { + government_has_flag = government_is_nomadic + } + create_maa_regiment = { + type = steppe_raiders + check_can_recruit = no + size = 2 + } + create_maa_regiment = { + type = horse_archers + check_can_recruit = no + size = 2 + } + } + else_if = { + limit = { + culture = { + culture_specializes_in_light_cavalry_maa = yes + } + } + create_maa_regiment = { + type = light_horsemen + check_can_recruit = no + size = 3 + } + } + else_if = { + limit = { + culture = { + culture_specializes_in_archer_maa = yes + } + } + create_maa_regiment = { + type = bowmen + check_can_recruit = no + size = 3 + } + create_maa_regiment = { + type = bowmen + check_can_recruit = no + size = 2 + } + } + else_if = { + limit = { + culture = { + culture_specializes_in_pikemen_maa = yes + } + } + create_maa_regiment = { + type = pikemen_unit + check_can_recruit = no + size = 3 + } + } + else = { + create_maa_regiment = { + type = light_footmen + check_can_recruit = no + size = 3 + } + create_maa_regiment = { + type = light_footmen + check_can_recruit = no + size = 2 + } + } + custom_tooltip = confederate_king_youth_warrior_tt + add_opinion = { + target = scope:host + modifier = event_negotiated_alliance_opinion + } + create_alliance = { + target = scope:host + allied_through_owner = scope:warrior_youth + allied_through_target = scope:host + } + } + + scope:warrior_youth = { + set_variable = { + name = coronation_events_6011_liege + value = root + years = 5 + } + } + scope:loyal_vassal = { + coronation_events_6010_defender_effect = yes + #The king doesn't need to see the rest + hidden_effect = { + coronation_events_6010_defender_effect_2 = yes + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 300 + ai_value_modifier = { + ai_honor = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:loyal_vassal + multiplier = 3 + } + modifier = { + add = -200 + OR = { + has_trait = paranoid + has_trait = arbitrary + } + } + } + } + #I accept, we must defend our peoples + option = { + name = coronation_events.6011.c + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_good + title = confederation_king_accepts_promise_tt + left_icon = scope:host + coronation_events_6010_defender_effect = yes + #The king doesn't need to see the rest + hidden_effect = { + coronation_events_6010_defender_effect_2 = yes + } + } + } + stress_impact = { + trusting = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:loyal_vassal + multiplier = 1 + } + modifier = { + add = -50 + OR = { + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + #I can defend us all, thank you + option = { + name = { + trigger = { + has_activity_intent = coronation_exalt_crown + } + text = coronation_events.6011.d_house + } + name = { + text = coronation_events.6011.d + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_major + CHAR = root + } + } + else = { + 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 + } + } + #exalt the crown bonus + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + dynasty = { + add_dynasty_prestige = miniscule_dynasty_prestige_value + } + custom_tooltip = improved_because_intent_tt + } + hidden_effect = { + scope:loyal_vassal = { + send_interface_toast = { + type = event_toast_effect_bad + title = confederation_king_rejects_promise_tt + left_icon = scope:host + reverse_add_opinion = { + target = scope:host + modifier = loyalty_opinion + opinion = 15 + } + } + } + } + stress_impact = { + arrogant = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -0.5 + } + modifier = { + add = -30 + scope:loyal_vassal = { + is_ai = no + } + } + modifier = { + add = -50 + OR = { + has_trait = trusting + has_trait = humble + } + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + scope:warrior_youth ?= { + remove_character_flag = need_military_outfit + } + } +} + +scripted_trigger coronation_events_6020_foe_trigger = { + save_temporary_scope_as = foe_temp + NOT = { + government_has_flag = government_is_herder + } + #sedentaries shouldn't go off invading nomadic lands + trigger_if = { + limit = { + $CHARACTER$ = { + NOT = { + government_has_flag = government_is_nomadic + } + } + } + NOT = { + government_has_flag = government_is_nomadic + } + } + $CHARACTER$ = { + NOR = { + var:coronation_war_foe ?= { + this = scope:foe_temp + } + var:coronation_war_foe_2 ?= { + this = scope:foe_temp + } + } + } + is_ruler = yes + trigger_if = { + limit = { + exists = scope:activity.var:officiator + } + NOT = { + this = scope:activity.var:officiator + } + } + highest_held_title_tier >= tier_county + current_military_strength <= $CHARACTER$.current_military_strength + trigger_if = { + limit = { + is_participant_in_activity = scope:activity + } + NOT = { is_in_guest_subset = { name = supporter } } + } + OR = { + NOT = { + is_vassal_or_below_of = root + } + AND = { + is_vassal_of = root + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + root = { has_imprisonment_reason = scope:foe_temp } + is_a_faction_member = yes + AND = { + any_claim = { + holder ?= root + } + NOT = { + any_parent = { + this = root + } + } + } + opinion = { + target = root + value < -50 + } + } + } + } + NOR = { + is_allied_to = root + is_allied_to = $CHARACTER$ + has_truce = $CHARACTER$ + is_tributary_of_suzerain_or_above = root + is_tributary_of_suzerain_or_above = $CHARACTER$ + root = { + is_tributary_of_suzerain_or_above = scope:foe_temp + } + any_warden_hostage = { + home_court = $CHARACTER$ + } + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_good_relationship_with_character_trigger = { CHARACTER = $CHARACTER$ } + } + any_sub_realm_county = { + any_neighboring_county = { + holder = { + OR = { + this = $CHARACTER$ + any_liege_or_above = { + this = $CHARACTER$ + } + } + } + } + } +} +scripted_trigger coronation_events_6020_supporter_trigger = { + is_ai = yes + location = scope:activity.activity_location + save_temporary_scope_as = supporter_temp + NOR = { + this = root + scope:activity.var:officiator ?= this + } + is_vassal_of = root + exists = capital_county + is_at_war = no + gold > 0 + #They have at least SOME army like c'mon + current_military_strength >= 200 + ##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 } + } + root = { + any_vassal = { + NOT = { this = scope:supporter_temp } + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter_temp } + } + } + } + ai_boldness >= 0 + OR = { + ai_greed > 0 + ai_energy > 0 + ai_zeal > 0 + ai_honor > 0 + ai_boldness >= medium_positive_ai_value + } + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + culture = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + capital_county ?= { + development_level >= 1 + } + } +} +scripted_effect coronation_events_6020_mass_mobilization_effect = { + add_martial_lifestyle_xp = medium_lifestyle_xp + scope:supporter = { + if = { + limit = { + has_variable = mass_mobilitization_development_progress_value + } + custom_tooltip = mass_mob_dev_progress_tt + hidden_effect = { + every_held_title = { + limit = { + tier = tier_county + } + change_development_progress_with_overflow = scope:supporter.var:mass_mobilitization_development_progress_value + } + } + } + #Nomads lose fertility + else_if = { + limit = { + has_variable = mass_mobilitization_fertility_value + } + custom_tooltip = mass_mob_fertility_tt + hidden_effect = { + every_held_title = { + limit = { + tier = tier_county + county_fertility > 0 + } + change_county_fertility = scope:supporter.var:mass_mobilitization_fertility_value + } + } + } + #Tribal era just does development progress + else = { + + custom_tooltip = mass_mob_dev_tt + hidden_effect = { + every_held_title = { + limit = { + tier = tier_county + development_level >= 1 + } + change_development_level = { + add = scope:supporter.var:mass_mobilitization_development_value + min = { + value = development_level + multiply = -1 + } + } + } + } + } + } + + if = { + limit = { + scope:supporter.capital_county = { + title_province = { + has_holding_type = nomad_holding + } + } + } + scope:supporter = { + spawn_army = { + levies = 0 + men_at_arms = { + type = horse_archers + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + men_at_arms = { + type = nomadic_riders + stacks = { + value = var:mass_mobilitization_total + multiply = -4 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county = { + culture = { + has_innovation = innovation_advanced_bowmaking + NOR = { + culture_specializes_in_light_cavalry_maa = yes + culture_specializes_in_heavy_infantry_maa = yes + culture_specializes_in_pikemen_maa = yes + } + } + } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = crossbowmen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county = { + culture = { culture_specializes_in_heavy_infantry_maa = yes } + culture = { has_innovation = innovation_quilted_armor } + } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = armored_footmen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county.culture = { culture_specializes_in_light_cavalry_maa = yes } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = light_horsemen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county = { + culture ={ culture_specializes_in_archer_cavalry_maa = yes } + } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = horse_archers + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county.culture = { culture_specializes_in_pikemen_maa = yes } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = pikemen_unit + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else_if = { + limit = { + scope:supporter.capital_county.culture = { culture_specializes_in_archer_maa = yes } + } + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = bowmen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } + else = { + scope:supporter = { + spawn_army = { + levies = { + value = var:mass_mobilitization_total + multiply = -600 + min = 100 + } + men_at_arms = { + type = light_footmen + stacks = { + value = var:mass_mobilitization_total + multiply = -1 + min = 1 + } + } + location = scope:supporter.capital_province + origin = scope:supporter.capital_province + inheritable = no + uses_supply = yes + name = coronation_mobilized_army_name + } + } + } +} +scripted_effect coronation_events_6020_save_claim_effect = { + if = { + limit = { + NOT = { + any_claim = { + OR = { + holder ?= $FOE$ + holder ?= { + any_liege_or_above = { + this = $FOE$ + } + } + } + tier >= tier_county + } + } + } + #SAVE ONE OF FOE'S KINGDOMS + $FOE$ = { + ordered_held_title = { + order_by = { + value = 0 + every_de_jure_county = { + limit = { + OR = { + holder = $FOE$ + holder = { + any_liege_or_above = { + this = $FOE$ + } + } + } + } + add = 1 + } + } + limit = { + tier = tier_kingdom + any_de_jure_county = { + OR = { + holder = $FOE$ + holder = { + any_liege_or_above = { + this = $FOE$ + } + } + } + any_neighboring_county = { + OR = { + holder = scope:supporter + holder = { + any_liege_or_above = { + this = scope:supporter + } + } + } + } + } + } + alternative_limit = { + tier = tier_duchy + any_de_jure_county = { + OR = { + holder = $FOE$ + holder = { + any_liege_or_above = { + this = $FOE$ + } + } + } + any_neighboring_county = { + OR = { + holder = scope:supporter + holder = { + any_liege_or_above = { + this = scope:supporter + } + } + } + } + } + } + alternative_limit = { + tier = tier_county + any_neighboring_county = { + OR = { + holder = scope:supporter + holder = { + any_liege_or_above = { + this = scope:supporter + } + } + } + } + } + if = { + limit = { + $FOE$ = scope:foe + } + save_scope_as = title_claim_1 + } + else = { + save_scope_as = title_claim_2 + } + } + } + } +} +scripted_effect coronation_events_6020_declare_war_effect = { + if = { + limit = { + root = { + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + } + if = { + limit = { + government_allows = administrative + NOT = { + has_variable = admin_permission_to_declare_war + } + } + custom_tooltip = { + text = admin_gain_war_permission_desc + set_variable = admin_permission_to_declare_war + } + } + else_if = { + limit = { + government_has_flag = government_is_feudal + vassal_contract_obligation_level:war_declaration_rights < 1 + } + vassal_contract_set_obligation_level = { + type = war_declaration_rights + level = 1 + } + } + } + #Give the supporter a claim to a neighboring duchy, if possible + #Give the supporter a claim to a neighboring county + + #Already has existing claim... just declare war + if = { + limit = { + NOT = { + any_claim = { + OR = { + holder ?= $FOE$ + holder ?= { + any_liege_or_above = { + this = $FOE$ + } + } + } + tier >= tier_county + } + } + } + if = { + limit = { + $FOE$ = scope:foe + } + add_unpressed_claim = scope:title_claim_1 + } + else = { + add_unpressed_claim = scope:title_claim_2 + } + $FOE$ = { + add_opinion = { + modifier = outraged_opinion + target = root + opinion = -30 + } + } + scope:supporter = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 30 + } + } + } + #Declare war + ordered_claim = { + order_by = tier + limit = { + holder = { + OR = { + this ?= $FOE$ + any_liege_or_above = { + this = $FOE$ + } + } + } + + tier >= tier_county + } + save_scope_as = claim + } + hidden_effect = { + scope:supporter = { + start_war = { + cb = claim_cb + target = $FOE$ + target_title = scope:claim + claimant = scope:supporter + } + } + } + $FOE$ = { + save_scope_as = supporter_war_target + } + scope:activity = { + add_activity_log_entry = { + key = coronation_supporter_declares_war_log + character = scope:supporter + target = scope:supporter_war_target + score = 50 + show_in_conclusion = yes + } + } + +} + +#A supporter wants to be unleashed against your foes +coronation_events.6020 = { + type = activity_event + title = coronation_events.6020.t + desc = coronation_events.6020.desc + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + } + animation = acknowledging + } + animation = chancellor + } + center_portrait = { + character = scope:supporter + animation = inspect_weapon + } + lower_center_portrait = scope:foe + lower_right_portrait = scope:foe_2 + theme = coronation_activity + cooldown = { weeks = 2 } + + trigger = { + scope:activity = { + any_guest_subset = { + name = supporter + coronation_events_6020_supporter_trigger = yes + + OR = { + root = { + #Realm law does not restrict war + NOR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + #Admin war restriction and admin workarounds available + AND = { + root = { + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + } + } + OR = { + has_variable = admin_permission_to_declare_war + government_allows = administrative + } + } + #Feudal war restriction and feudal workarounds available + AND = { + root = { + OR = { + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + OR = { + vassal_contract_obligation_level:war_declaration_rights < 1 + government_has_flag = government_is_feudal + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + scope:activity = { + any_guest_subset = { + name = supporter + coronation_events_6020_supporter_trigger = yes + + OR = { + root = { + #Realm law does not restrict war + NOR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + #Admin war restriction and admin workarounds available + AND = { + root = { + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + } + } + OR = { + has_variable = admin_permission_to_declare_war + government_allows = administrative + } + } + #Feudal war restriction and feudal workarounds available + AND = { + root = { + OR = { + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + } + OR = { + vassal_contract_obligation_level:war_declaration_rights < 1 + government_has_flag = government_is_feudal + } + } + } + save_temporary_scope_as = weight_supporter + } + OR = { + any_guest_subset = { + name = detractor + coronation_events_6020_foe_trigger = { CHARACTER = scope:weight_supporter } + } + root = { + any_relation = { + type = rival + coronation_events_6020_foe_trigger = { CHARACTER = scope:weight_supporter } + } + } + } + + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + #Save host and location + scope:activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + #Save fighty supporter + scope:activity = { + ordered_guest_subset = { + order_by = current_military_strength + + name = supporter + limit = { + coronation_events_6020_supporter_trigger = yes + } + save_scope_as = supporter + } + #Save detractor as foe + ordered_guest_subset = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + name = detractor + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + } + save_scope_as = foe + } + } + #Any neighboring ruler as foe + scope:supporter = { + ordered_neighboring_top_liege_realm_owner = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + } + save_scope_as = foe + } + } + #A vassal that's in the outs + ordered_vassal = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + } + save_scope_as = foe + } + #SECOND FOE + scope:activity = { + ordered_guest_subset = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + name = detractor + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + NOT = { this = scope:foe } + } + save_scope_as = foe_2 + } + } + #Any neighboring ruler as foe + scope:supporter = { + ordered_neighboring_top_liege_realm_owner = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + NOT = { this = scope:foe } + } + save_scope_as = foe_2 + } + } + #A vassal that's in the outs + ordered_vassal = { + order_by = { + value = "reverse_opinion(scope:supporter)" + multiply = -1 + } + limit = { + coronation_events_6020_foe_trigger = { CHARACTER = scope:supporter } + NOT = { this = scope:foe } + } + save_scope_as = foe_2 + } + if = { + limit = { + scope:supporter = { + OR = { + government_has_flag = government_is_tribal + } + culture = { + NOT = { + has_cultural_era_or_later = culture_era_early_medieval + } + } + } + } + scope:supporter = { + set_variable = { + name = mass_mobilitization_development_progress_value + value = -50 + } + set_variable = { + name = mass_mobilitization_total + value = { + if = { + limit = { + scope:supporter = { + government_has_flag = government_is_tribal + } + } + add = -1 + } + else = { + #Half of early medievals + add = -0.5 + } + multiply = domain_size + } + } + } + } + else_if = { + limit = { + scope:supporter = { + government_has_flag = government_is_nomadic + } + } + scope:supporter = { + set_variable = { + name = mass_mobilitization_fertility_value + value = -100 + } + set_variable = { + name = mass_mobilitization_total + value = { + if = { + limit = { + current_year >= 1100 + } + add = -1.5 + } + else = { + add = -1 + } + multiply = domain_size + } + } + } + } + else = { + scope:supporter = { + set_variable = { + name = mass_mobilitization_development_value + value = { + if = { + limit = { + scope:supporter.culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + add = -1 + } + if = { + limit = { + scope:supporter.culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + add = -1 + } + add = -1 + } + } + set_variable = { + name = mass_mobilitization_total + value = { + add = var:mass_mobilitization_development_value + multiply = domain_size + } + } + } + } + scope:supporter = { + coronation_events_6020_save_claim_effect = { FOE = scope:foe } + if = { + limit = { + exists = scope:foe_2 + } + coronation_events_6020_save_claim_effect = { FOE = scope:foe_2 } + } + } + scope:supporter = { + set_variable = { + name = coronation_war_foe + value = scope:foe + months = 6 + } + if = { + limit = { + exists = scope:foe_2 + } + set_variable = { + name = coronation_war_foe_2 + value = scope:foe_2 + months = 6 + } + } + } + if = { + limit = { + NOT = { + exists = scope:title_claim_1 + } + } + scope:supporter = { + ordered_claim = { + order_by = tier + limit = { + holder = scope:foe + } + save_scope_as = title_claim_1 + } + } + } + if = { + limit = { + exists = scope:foe_2 + NOT = { + exists = scope:title_claim_2 + } + } + scope:supporter = { + ordered_claim = { + order_by = tier + limit = { + holder = scope:foe_2 + } + save_scope_as = title_claim_2 + } + } + } + } + #Special Intent option (TARGET 1) + option = { + name = coronation_events.6020.a + trigger = { + has_activity_intent = coronation_weaken_detractors + } + #Increase armies and tank development effect + coronation_events_6020_mass_mobilization_effect = yes + scope:supporter = { + coronation_events_6020_declare_war_effect = { FOE = scope:foe } + if = { + limit = { + exists = scope:title_claim_1 + } + custom_tooltip = coronation_supporter_declare_war_tt + } + else = { + custom_tooltip = coronation_supporter_declare_war_no_title_tt + } + if = { + limit = { + involved_activity ?= scope:activity + } + remove_from_activity = scope:activity + } + } + if = { + limit = { + scope:foe = { involved_activity ?= scope:activity } + } + scope:foe = { remove_from_activity = scope:activity } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + calm = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + modifier = { + add = 50 + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + modifier = { + add = -100 + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + scope:supporter = { + NOR = { + has_variable = admin_permission_to_declare_war + vassal_contract_obligation_level:war_declaration_rights < 1 + } + } + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:foe + multiplier = -2 + desc = AI_OPINION_REASON + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:supporter + multiplier = 1 + desc = AI_OPINION_REASON + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } + #Special Intent option (TARGET 2) + option = { + name = coronation_events.6020.b + trigger = { + has_activity_intent = coronation_weaken_detractors + exists = scope:foe_2 + } + coronation_events_6020_mass_mobilization_effect = yes + scope:supporter = { + coronation_events_6020_declare_war_effect = { FOE = scope:foe_2 } + + if = { + limit = { + exists = scope:title_claim_2 + } + custom_tooltip = coronation_supporter_declare_war_2_tt + } + else = { + custom_tooltip = coronation_supporter_declare_war_no_title_2_tt + } + if = { + limit = { + involved_activity ?= scope:activity + } + remove_from_activity = scope:activity + } + } + if = { + limit = { + scope:foe_2 = { involved_activity ?= scope:activity } + } + scope:foe_2 = { remove_from_activity = scope:activity } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + calm = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + modifier = { + add = 50 + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + modifier = { + add = -100 + OR = { + has_realm_law_flag = admin_vassal_wars_banned + has_realm_law_flag = admin_vassal_wars_permission_only + has_realm_law_flag = vassal_all_wars_banned + has_realm_law_flag = vassal_internal_wars_banned + } + scope:supporter = { + NOR = { + has_variable = admin_permission_to_declare_war + vassal_contract_obligation_level:war_declaration_rights < 1 + } + } + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:foe_2 + multiplier = -2 + desc = AI_OPINION_REASON + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:supporter + multiplier = 1 + desc = AI_OPINION_REASON + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } + #Normal declare (TARGET 1) + option = { + name = coronation_events.6020.c + scope:supporter = { + coronation_events_6020_declare_war_effect = { FOE = scope:foe } + + if = { + limit = { + exists = scope:title_claim_1 + } + custom_tooltip = coronation_supporter_declare_war_tt + } + else = { + custom_tooltip = coronation_supporter_declare_war_no_title_tt + } + if = { + limit = { + involved_activity ?= scope:activity + } + remove_from_activity = scope:activity + } + } + if = { + limit = { + scope:foe = { involved_activity ?= scope:activity } + } + scope:foe = { remove_from_activity = scope:activity } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:foe + multiplier = -2 + desc = AI_OPINION_REASON + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + #Normal declare (TARGET 2) + option = { + trigger = { exists = scope:foe_2 } + name = coronation_events.6020.d + scope:supporter = { + coronation_events_6020_declare_war_effect = { FOE = scope:foe_2 } + + if = { + limit = { + exists = scope:title_claim_2 + } + custom_tooltip = coronation_supporter_declare_war_2_tt + } + else = { + custom_tooltip = coronation_supporter_declare_war_no_title_2_tt + } + if = { + limit = { + involved_activity ?= scope:activity + } + remove_from_activity = scope:activity + } + } + if = { + limit = { + scope:foe_2 = { involved_activity ?= scope:activity } + } + scope:foe_2 = { remove_from_activity = scope:activity } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + opinion_modifier = { # Opinion Factor + who = root + opinion_target = scope:foe_2 + multiplier = -2 + desc = AI_OPINION_REASON + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + #Redirect your passion to this great occasion + option = { + name = coronation_events.6020.e + #Option improved by an intent (and player is informed of this) + if = { + limit = { + has_activity_intent = coronation_impress_attendees + } + 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 + } + } + else = { + 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 + } + } + + + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = miniscule_stress_impact_gain + wrathful = minor_stress_impact_gain + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -2 + } + modifier = { + add = -50 + OR = { + has_trait = sadistic + has_trait = paranoid + } + } + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + scope:supporter = { + remove_variable = mass_mobilitization_development_value + remove_variable = mass_mobilitization_development_progress_value + remove_variable = mass_mobilitization_fertility_value + remove_variable = mass_mobilitization_total + } + } +} + +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$ + } + if = { + limit = { + NOT = { + has_trait = rakish + } + } + random = { + chance = 5 + add_trait = rakish + } + } + if = { + limit = { + scope:host = { + is_ai = yes + } + OR = { + intrigue > scope:host.intrigue + intrigue >= high_skill_rating + } + custom_tooltip = host_has_courtesan_hooks_tt + } + } + $COURTESAN$ = { + add_character_flag = { + flag = picked_courtesan + days = 30 + } + } +} + +#horny king is hosting a courtesan sex party +coronation_events.6030 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + involved_activity = { has_activity_type = activity_coronation } + } + desc = coronation_events.6030.t + } + desc = coronation_events.6030.t_feast + } + } + desc = coronation_events.6030.desc + left_portrait = { + character = scope:fearsome_courtesan + animation = flirtation + camera = camera_event_center_pointing_slighty_left + } + center_portrait = { + character = scope:cunning_courtesan + animation = admiration + camera = camera_event_left_forward + } + right_portrait = { + character = scope:host + animation = eccentric + } + lower_left_portrait = scope:experienced_courtesan + lower_center_portrait = scope:funny_courtesan_1 + lower_right_portrait = scope:funny_courtesan_2 + theme = coronation_activity + override_background = { + reference = bedchamber + } + cooldown = { months = 6 } + + trigger = { + is_adult = yes + is_playable_character = yes + NOT = { + this = involved_activity.activity_host + } + trigger_if = { + limit = { + is_ai = yes + } + might_cheat_on_every_partner_trigger = yes + } + NOR = { + has_trait = celibate + has_trait = chaste + is_incapable = yes + has_contagious_deadly_disease_trigger = yes + is_eunuch_trigger = yes + has_trait = leper + } + involved_activity = { + activity_host = { + OR = { + AND = { + #It's a trap! + is_ai = yes + OR = { + intrigue > decent_skill_rating + highest_skill = intrigue + } + opinion = { + target = root + value > -50 + } + } + #Actually likes you + opinion = { + target = root + value > 0 + } + } + + NOR = { + has_contagious_deadly_disease_trigger = yes + has_trait = leper + is_incapable = yes + has_trait = celibate + has_trait = chaste + } + is_adult = yes + OR = { + has_trait = deviant + might_cheat_on_every_partner_trigger = yes + has_trait = rakish + has_trait = seducer + has_trait = lustful + } + #Let's make this simple and only do same-gender pairs between root and host + OR = { + AND = { + is_male = yes + root = { is_male = yes } + } + AND = { + is_male = no + root = { is_male = no } + } + } + #Sexuality that matches root's + OR = { + AND = { + is_attracted_to_men = yes + root = { is_attracted_to_men = yes } + } + AND = { + is_attracted_to_women = yes + root = { is_attracted_to_women = yes } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -1 + involved_activity.activity_host = { + might_cheat_on_every_partner_trigger = no + } + } + modifier = { + add = -1 + involved_activity.activity_host = { + OR = { + AND = { + faith = { + has_doctrine = doctrine_adultery_men_shunned + } + is_male = yes + is_married = yes + } + AND = { + faith = { + has_doctrine = doctrine_adultery_women_shunned + } + is_female = yes + is_married = yes + } + } + } + } + modifier = { + add = -2 + involved_activity.activity_host = { + OR = { + AND = { + faith = { + has_doctrine = doctrine_adultery_men_crime + } + is_male = yes + is_married = yes + } + AND = { + faith = { + has_doctrine = doctrine_adultery_women_crime + } + is_female = yes + is_married = yes + } + } + } + } + modifier = { + add = 1 + involved_activity.activity_host = { + has_trait = lustful + } + } + modifier = { + add = 1 + involved_activity.activity_host = { + has_trait = deviant + } + } + modifier = { + add = 1 + involved_activity.activity_host = { + has_trait = seducer + } + } + modifier = { + add = 1 + root = { has_focus = intrigue_temptation_focus } + } + modifier = { + add = 1 + root = { has_trait = rakish } + } + modifier = { + add = 1 + root = { has_trait = lustful } + } + modifier = { + add = 1 + root = { has_trait = seducer } + } + modifier = { + add = 2 + involved_activity.activity_host = { + has_trait = rakish + } + } + modifier = { + add = 2 + involved_activity.activity_host = { + faith = { trait_is_virtue = lustful } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + #Save host and location + scope:activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + #Female courtesans + if = { + limit = { + AND = { + is_attracted_to_women = yes + scope:host = { is_attracted_to_women = yes } + } + } + create_character = { + location = root.location + template = experienced_courtesan_character + gender = female + faith = scope:host.faith + culture = scope:host.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 + mother = scope:experienced_courtesan + save_scope_as = funny_courtesan_1 + } + scope:funny_courtesan_1 = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = funny_courtesan_character + gender = female + faith = scope:host.faith + culture = scope:host.culture + mother = scope:experienced_courtesan + save_scope_as = funny_courtesan_2 + } + scope:funny_courtesan_2 = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = cunning_courtesan_character + gender = female + faith = root.location.faith + culture = root.location.culture + save_scope_as = cunning_courtesan + } + scope:cunning_courtesan = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = fearsome_courtesan_character + gender = female + faith = root.location.faith + culture = root.location.culture + save_scope_as = fearsome_courtesan + } + scope:fearsome_courtesan = { + add_to_list = courtesans + } + scope:experienced_courtesan = { + add_to_list = courtesans + } + } + #Male courtesans + else = { + create_character = { + location = root.location + template = experienced_courtesan_character + gender = male + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = experienced_courtesan + } + create_character = { + location = root.location + template = funny_courtesan_character + gender = male + father = scope:experienced_courtesan + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = funny_courtesan_1 + } + scope:funny_courtesan_1 = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = funny_courtesan_character + gender = male + father = scope:experienced_courtesan + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = funny_courtesan_2 + } + scope:funny_courtesan_2 = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = cunning_courtesan_character + gender = male + faith = scope:host.faith + culture = scope:host.culture + save_scope_as = cunning_courtesan + } + scope:cunning_courtesan = { + add_to_list = courtesans + } + create_character = { + location = root.location + template = fearsome_courtesan_character + gender = male + faith = root.location.faith + culture = root.location.culture + save_scope_as = fearsome_courtesan + } + scope:fearsome_courtesan = { + add_to_list = courtesans + } + scope:experienced_courtesan = { + add_to_list = courtesans + } + } + hidden_effect = { + #Set sexuality + every_in_list = { + list = courtesans + random_list = { + 10 = { + set_sexuality = bisexual + } + 5 = { + trigger = { + OR = { + AND = { + is_female = yes + root = { is_female = yes } + } + AND = { + is_male = yes + root = { is_male = yes } + } + } + } + set_sexuality = homosexual + } + 10 = { + trigger = { + OR = { + AND = { + is_female = no + root = { is_female = yes } + } + AND = { + is_male = no + root = { is_male = yes } + } + } + } + set_sexuality = heterosexual + } + } + add_character_flag = { + flag = is_naked + days = 30 + } + } + #Assign nicknames + scope:experienced_courtesan = { + assign_random_nickname_effect = yes + } + scope:fearsome_courtesan = { + assign_random_nickname_effect = yes + } + scope:cunning_courtesan = { + assign_random_nickname_effect = yes + } + if = { + limit = { + scope:host = { + is_ai = yes + } + } + every_in_list = { + list = courtesans + scope:host = { + add_hook = { + type = supporter_hook + target = prev + } + } + } + } + } + } + #The fearsome arm-wrestling warrior woman/man + option = { + name = coronation_events.6030.a + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:cunning_courtesan = { + is_male = yes + } + } + desc = coronation_events.6030.a_flavor + } + desc = coronation_events.6030.a_thighs + } + } + + add_prowess_skill = 1 + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:fearsome_courtesan } + + stress_impact = { + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + OR = { + has_education_martial_trigger = yes + has_martial_lifestyle_trait_trigger = yes + } + } + } + modifier = { + factor = 0 + has_trait = just + } + } + } + #The clever little minx + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:cunning_courtesan = { + is_male = yes + } + } + desc = coronation_events.6030.b + } + desc = coronation_events.6030.b_minx + } + } + } + flavor = coronation_events.6030.b_flavor + + add_intrigue_lifestyle_xp = medium_lifestyle_xp + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:cunning_courtesan } + + stress_impact = { + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + OR = { + has_education_intrigue_trigger = yes + has_intrigue_lifestyle_trait_trigger = yes + } + } + } + modifier = { + factor = 0 + has_trait = just + } + } + } + #The astute, experienced madame + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:cunning_courtesan = { + is_male = yes + } + } + desc = coronation_events.6030.c + } + desc = coronation_events.6030.c_dame + } + } + } + flavor = coronation_events.6030.c_flavor + + add_stewardship_lifestyle_xp = medium_lifestyle_xp + coronation_events_6030_choose_courtesan_effect = { COURTESAN = scope:experienced_courtesan } + + stress_impact = { + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + OR = { + has_education_stewardship_trigger = yes + has_stewardship_lifestyle_trait_trigger = yes + } + } + } + modifier = { + factor = 0 + has_trait = just + } + } + } + #The sisters/brothers + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:cunning_courtesan = { + is_male = yes + } + } + desc = coronation_events.6030.d + } + desc = coronation_events.6030.d_sisters + } + } + } + flavor = coronation_events.6030.d_flavor + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + + 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 + } + } + + create_character_memory = { + type = had_a_threesome_memory + participants = { + partner_1 = scope:funny_courtesan_1 + partner_2 = scope:funny_courtesan_2 + } + } + + stress_impact = { + just = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 200 + OR = { + OR = { + has_education_diplomacy_trigger = yes + has_diplomacy_lifestyle_trait_trigger = yes + } + } + } + modifier = { + factor = 0 + has_trait = just + } + } + } + #Uh... nah maybe we can just have an intellectual conversation + # SLASH FUCK YOU HOST + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_activity_intent = coronation_disrupt_loyalists + scope:host = { + is_ai = yes + OR = { + NOT = { + faith = { trait_is_virtue = lustful } + } + AND = { + is_male = yes + scope:funny_courtesan_1 = { + is_male = yes + } + faith = { + has_doctrine = doctrine_homosexuality_crime + } + } + } + } + } + desc = coronation_events.6030.e_expose + } + desc = coronation_events.6030.e + } + } + } + #Needed for exposing option and opinion gain at end + save_scope_as = exposer + #I'm telling! + if = { + limit = { + involved_activity = { has_activity_type = activity_coronation } + has_activity_intent = coronation_disrupt_loyalists + scope:host = { + is_ai = yes + OR = { + NOT = { + faith = { trait_is_virtue = lustful } + } + AND = { + is_male = yes + scope:funny_courtesan_1 = { + is_male = yes + } + faith = { + has_doctrine = doctrine_homosexuality_crime + } + } + } + } + } + if = { + limit = { + faith = { trait_is_sin = lustful } + } + add_piety = major_piety_gain + } + else_if = { + limit = { + NOT = { + faith = { trait_is_virtue = lustful } + } + } + add_piety = minor_piety_gain + } + scope:host = { + #Piety loss based on how bad horny is + if = { + limit = { + faith = { trait_is_sin = lustful } + } + add_piety = major_piety_loss + } + else_if = { + limit = { + NOT = { + faith = { trait_is_virtue = lustful } + } + } + add_piety = medium_piety_loss + } + #Is this you exposing them cheating? + if = { + limit = { + is_married = yes + OR = { + AND = { + is_male = yes + NOT = { + faith = { + has_doctrine = doctrine_adultery_men_accepted + } + } + } + AND = { + is_female = yes + NOT = { + faith = { + has_doctrine = doctrine_adultery_women_accepted + } + } + } + } + } + save_scope_as = log_sent + scope:activity = { + add_activity_log_entry = { + key = coronation_host_orgy_exposed_log + character = scope:host + target = scope:exposer + score = 20 + show_in_conclusion = yes + scope:host = { + add_trait = adulterer + } + } + } + every_spouse = { + custom = custom.every_consort + add_opinion = { + target = scope:host + modifier = cheater_opinion + opinion = -40 + } + } + add_opinion = { + target = root + opinion = -60 + modifier = betrayal_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -40 + modifier = betrayal_opinion + } + } + #Is this you exposing them being a sodomite? + if = { + limit = { + is_male = yes + scope:funny_courtesan_1 = { + is_male = yes + } + faith = { + has_doctrine = doctrine_homosexuality_crime + } + } + #Send log if haven't already + if = { + limit = { + NOT = { exists = scope:log_sent } + } + save_scope_as = log_sent + scope:activity = { + add_activity_log_entry = { + key = coronation_host_orgy_exposed_log + character = scope:host + target = scope:exposer + score = 20 + show_in_conclusion = yes + scope:host = { + add_trait = sodomite + } + } + } + } + else = { + add_trait = sodomite + } + } + } + custom_tooltip = improved_because_intent_tt + #Send log if haven't already + if = { + limit = { + NOT = { exists = scope:log_sent } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_host_orgy_exposed_log + character = scope:host + target = scope:exposer + score = 20 + show_in_conclusion = yes + } + } + } + } + else = { + scope:host = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + add_learning_lifestyle_xp = minor_lifestyle_xp + } + stress_impact = { + lustful = major_stress_impact_gain + rakish = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_activity_intent = coronation_disrupt_loyalists + add = 100 + } + modifier = { + OR = { + has_trait = lustful + has_trait = rakish + might_cheat_on_every_partner_trigger = yes + } + factor = 0 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + hidden_effect = { + every_in_list = { + list = courtesans + remove_character_flag = is_naked + } + if = { + limit = { + scope:host = { + is_ai = yes + } + } + #Random unpicked courtesan might be picked by host + random_in_list = { + list = courtesans + limit = { + is_courtier = no + } + random = { + chance = 50 + had_sex_with_effect = { + CHARACTER = scope:host + PREGNANCY_CHANCE = pregnancy_chance + } + add_character_flag = { + flag = picked_courtesan + days = 30 + } + #Add to court + scope:host = { + add_courtier = prev + } + } + } + } + every_in_list = { + list = courtesans + limit = { + NOT = { has_character_flag = picked_courtesan } + } + silent_disappearance_effect = yes + } + every_in_list = { + list = courtesans + silent_disappearance_ai_effect = yes + } + #gain opinion of AI host if they accepted + if = { + limit = { + NOT = { + exists = scope:exposer + } + scope:host = { + is_ai = yes + intrigue > root.intrigue + } + } + add_opinion = { + target = scope:host + modifier = grateful_opinion + opinion = 20 + } + } + } + } +} + +# CEREMONY-PHASE CROWNING EVENTS # + +#HOST EVENTS +#Being crowned by someone else +coronation_events.6100 = { + type = activity_event + title = coronation_events.6100.t + desc = { + desc = coronation_events.6100.desc_intro + #Host perspective + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = { + #Middle is faith dependent + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + is_male = yes + } + } + desc = coronation_events.6100.desc_byzantine + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + } + } + desc = coronation_events.6100.desc_byzantine_femme + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6100.desc_high + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6100.desc_low + } + triggered_desc = { + trigger = { + scope:host.faith.religion = { + this = religion:christianity_religion + } + } + desc = coronation_events.6100.desc_christian + } + desc = coronation_events.6100.desc_generic + } + #Ending depends on faith and independence + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + ai_zeal <= low_negative_ai_value + } + } + desc = coronation_events.6100.desc_ending_byzantine_cynical + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + } + } + desc = coronation_events.6100.desc_ending_byzantine + } + triggered_desc = { + trigger = { + scope:host = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + is_independent_ruler = no + } + } + desc = coronation_events.6100.desc_ending_non_abrahamic_vassal + } + triggered_desc = { + trigger = { + scope:host = { is_independent_ruler = no } + } + desc = coronation_events.6100.desc_ending_vassal + } + triggered_desc = { + trigger = { + scope:host = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + desc = coronation_events.6100.desc_ending_non_abrahamic + } + desc = coronation_events.6100.desc_ending + } + } + } + #Guest perspective + desc = { + #Middle is faith dependent + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + is_male = yes + } + } + desc = coronation_events.6100.desc_byzantine_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + } + } + desc = coronation_events.6100.desc_byzantine_femme_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6100.desc_high_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6100.desc_low_guest + } + triggered_desc = { + trigger = { + scope:host.faith.religion = { + this = religion:christianity_religion + } + } + desc = coronation_events.6100.desc_christian_guest + } + desc = coronation_events.6100.desc_generic_guest + } + #Ending depends on faith and independence + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.faith.religion = { + this = religion:christianity_religion + } + scope:host = { + OR = { + AND = { + culture = { + has_cultural_pillar = language_greek + has_cultural_pillar = heritage_byzantine + } + highest_held_title_tier >= tier_empire + } + primary_title = title:e_byzantium + } + } + } + desc = coronation_events.6100.desc_ending_byzantine_guest + } + triggered_desc = { + trigger = { + scope:host = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + is_independent_ruler = no + } + } + desc = coronation_events.6100.desc_ending_non_abrahamic_vassal_guest + } + triggered_desc = { + trigger = { + scope:host = { is_independent_ruler = no } + } + desc = coronation_events.6100.desc_ending_vassal_guest + } + triggered_desc = { + trigger = { + scope:host = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + desc = coronation_events.6100.desc_ending_non_abrahamic_guest + } + desc = coronation_events.6100.desc_ending_guest + } + } + } + } + left_portrait = { + character = scope:observer + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value < -50 + } + } + } + animation = disapproval + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value <= 30 + } + ai_honor <= medium_negative_ai_value + OR = { + this = scope:host.primary_heir + this = scope:host.diarch + } + } + } + animation = scheme + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value < 0 + } + } + } + animation = personality_vengeful + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value >= 90 + } + this = scope:host.primary_spouse + } + } + animation = wedding_happy_cry + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value >= 0 + } + ai_zeal >= low_positive_ai_value + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + OR = { + this = scope:host.primary_heir + this = scope:host.primary_spouse + } + } + } + animation = prayer + } + triggered_animation = { + trigger = { + scope:observer = { + opinion = { + target = scope:host + value >= 60 + } + } + } + animation = personality_compassionate + } + animation = chaplain + camera = camera_event_left_crowning_observation + } + center_portrait = { + character = scope:host + animation = throne_room_kneel_1 + camera = camera_event_center_coronation_kneeling + } + right_portrait = { + character = scope:crowner + animation = crowning + camera = camera_event_right_crowner_crowning + } + override_background = { + trigger = { + scope:host.capital_county = title:c_byzantion + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + } + reference = temple + } + artifact = { + target = scope:crowning_artifact + position = lower_right_portrait + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + + trigger = { + coronation_being_crowned_trigger = yes + } + on_trigger_fail = { + if = { + limit = { + coronation_self_crowning_trigger = yes + } + # Trigger the "there is no officiator" version + trigger_event = { + id = coronation_events.6101 + days = 1 + } + } + else = { + #Skip to enthroning + trigger_event = { + id = coronation_events.6102 + days = 1 + } + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + remove_character_flag = need_military_outfit + scope:activity.activity_host = { + save_scope_as = host + } + scope:host = { + #Pick appropriate music + #Eastern Orthodox chanting + if = { + limit = { + OR = { + faith = faith:orthodox + culture = { has_cultural_pillar = heritage_byzantine } + culture = { has_cultural_pillar = language_greek } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mep3_mood_06 + } + #Iberian + else_if = { + limit = { + OR = { + culture = { has_building_gfx = iberian_building_gfx } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = "mx_Struggle_ending_compromise" + } + #Norse + else_if = { + limit = { + culture = { has_graphical_norse_culture_group_trigger = yes } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mx_mood_fp1_thefeast + } + #Steppe + else_if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + has_trait = nomadic_philosophy + } + culture = { has_graphical_steppe_culture_group_trigger = yes } + } + play_music_cue = mx_cue_the_khans_glory + } + #MENA + else_if = { + limit = { + OR = { + culture = { has_graphical_mena_culture_group_trigger = yes } + culture = { has_graphical_iranian_culture_group_trigger = yes } + } + } + play_music_cue = struggleend_cue + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + play_music_cue = "mx_cue_succession" + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + } + play_music_cue = "mx_cue_positive_effect" + } + else = { + play_music_cue = "mx_cue_sacredrite" + } + if = { + limit = { + coronation_living_officiator_trigger = yes + } + involved_activity.var:officiator ?= { + save_scope_as = crowner + } + } + + #Get wife to be next to you + if = { + limit = { + exists = primary_spouse + scope:activity = { + any_attending_character = { + this = scope:host.primary_spouse + } + } + } + primary_spouse = { + save_scope_as = observer + } + } + #Get heir to be next to you + if = { + limit = { + NOT = { + exists = scope:observer + } + primary_heir = { + age >= 5 + } + scope:activity = { + any_attending_character = { + this = scope:host.primary_heir + } + } + } + primary_heir = { + save_scope_as = observer + } + } + #Get your crown/regalia to equip it + coronation_save_crowning_artifact_effect = { HOST = scope:host } + if = { + limit = { + this = root + } + coronation_ceremony_opinion_effect = yes + } + else = { + show_as_tooltip = { + coronation_ceremony_opinion_effect = yes + } + } + } + } + #Normal + option = { + name = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + text = coronation_events.6100.a_guest_low + } + name = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + NOT = { + this = scope:host + } + } + text = coronation_events.6100.a_guest + } + name = { + trigger = { + scope:activity.var:activity_special_type_progression >= 25 + this = scope:host + } + text = coronation_events.6100.a + } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + has_trait = giant + } + } + desc = coronation_events.6100.a_flavor_giant + } + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + age <= 14 + } + } + desc = coronation_events.6100.a_flavor_adolescent + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + NOT = { + this = scope:host + } + } + desc = coronation_events.6100.a_flavor_low_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6100.a_flavor_low + } + desc = coronation_events.6100.a_flavor_decent + } + } + 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 } + } + coronation_change_law_effect = yes + } + } + else = { + show_as_tooltip = { + 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 } + } + coronation_change_law_effect = yes + } + } + } + if = { + limit = { + this = scope:host + scope:activity.var:activity_special_type_progression >= 25 + } + stress_impact = { + arrogant = massive_stress_impact_loss + ambitious = medium_stress_impact_loss + just = medium_stress_impact_loss + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + # Spouse crowning + trigger_event = { + id = coronation_events.6140 + days = 2 + } + #Need to equip crown after guests get this event + if = { + limit = { + scope:activity = { + any_attending_character = { + NOT = { + this = scope:host + } + is_ai = no + } + } + } + trigger_event = { + id = coronation_events.6103 + days = 5 + } + } + } +} + +scripted_effect coronation_events_6101_self_crowning_effect = { + add_prestige = medium_prestige_gain + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + faith.religious_head ?= { + save_scope_as = judger + } + } + else = { + cp:councillor_court_chaplain ?= { + save_scope_as = judger + } + } + if = { + limit = { + scope:activity.var:activity_special_type_progression < 75 + } + scope:judger ?= { + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -15 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + limit = { + has_vassal_stance = zealot + NOT = { + this = scope:judger + } + } + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -10 + } + } + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 50 + } + scope:judger ?= { + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -30 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + limit = { + has_vassal_stance = zealot + NOT = { + this = scope:judger + } + } + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -20 + } + } + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + scope:judger ?= { + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -50 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + limit = { + has_vassal_stance = zealot + NOT = { + this = scope:judger + } + } + add_opinion = { + target = scope:host + modifier = self_crowning_opinion + opinion = -30 + } + } + } +} + +#Host is crowning themselves +coronation_events.6101 = { + type = activity_event + title = coronation_events.6100.t + desc = { + #Is it guest or host perspective? + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + } + } + desc = coronation_events.6101.desc_crowning_intro + } + desc = coronation_events.6101.desc_no_being_crowned_intro + } + #Priests' dissent is leveled by magnificence + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + culture = { + has_cultural_pillar = heritage_iberian + has_cultural_pillar = language_iberian + } + } + scope:activity.var:activity_special_type_progression >= 25 + } + desc = coronation_events.6101.desc_crowning_priests_iberian + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6101.desc_crowning_priests_high + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6101.desc_crowning_priests_low + } + desc = coronation_events.6101.desc_crowning_priests_mid + } + #Mid part is Christian or not + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + } + } + desc = coronation_events.6101.desc_words_christian + } + desc = coronation_events.6101.desc_words_generic + } + #End is based on personality + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = patient + has_trait = just + has_trait = content + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = peasant_leader + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + + } + desc = coronation_events.6101.desc_ending_humble + } + desc = coronation_events.6101.desc_ending + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + } + } + desc = coronation_events.6101.desc_crowning_intro + } + desc = coronation_events.6101.desc_no_being_crowned_intro + } + #Priests' dissent is leveled by magnificence + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + culture = { + has_cultural_pillar = heritage_iberian + has_cultural_pillar = language_iberian + } + } + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + culture = { + has_cultural_pillar = heritage_iberian + has_cultural_pillar = language_iberian + } + scope:activity.var:activity_special_type_progression >= 25 + } + desc = coronation_events.6101.desc_crowning_priests_iberian + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6101.desc_crowning_priests_high_guest + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6101.desc_crowning_priests_low_guest + } + desc = coronation_events.6101.desc_crowning_priests_mid_guest + } + #Mid part is Christian or not + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + } + } + desc = coronation_events.6101.desc_words_christian_guest + } + desc = coronation_events.6101.desc_words_generic_guest + } + #End is based on personality + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = patient + has_trait = just + has_trait = content + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = peasant_leader + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + desc = coronation_events.6101.desc_ending_humble_guest + } + desc = coronation_events.6101.desc_ending_guest + } + } + } + } + + left_portrait = { + character = scope:observer + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + OR = { + has_activity_intent = coronation_offer_support + opinion = { + target = scope:host + value > 0 + } + } + } + animation = admiration + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + OR = { + has_activity_intent = coronation_disrupt_loyalists + opinion = { + target = scope:host + value < 30 + } + } + } + animation = personality_callous + } + animation = personality_zealous + camera = camera_event_left_to_the_left + } + center_portrait = { + character = scope:host + triggered_animation = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = content + has_trait = craven + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + animation = personality_coward + } + triggered_animation = { + trigger = { + NOT = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = arbitrary + has_trait = greedy + } + } + animation = personality_honorable + } + triggered_animation = { + trigger = { + NOT = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + } + animation = personality_honorable + } + animation = acknowledging + camera = camera_event_center_pointing_slighty_left + } + right_portrait = { + character = scope:anointer + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + OR = { + has_activity_intent = coronation_offer_support + opinion = { + target = scope:host + value > 0 + } + } + } + animation = prayer + } + triggered_animation = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + OR = { + has_activity_intent = coronation_disrupt_loyalists + opinion = { + target = scope:host + value < 30 + } + } + } + animation = disapproval + } + animation = chaplain + camera = camera_event_right_to_the_right + } + override_background = { + reference = throne_room + } + artifact = { + target = scope:crowning_artifact + position = lower_right_portrait + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + + trigger = { + coronation_self_crowning_trigger = yes + } + on_trigger_fail = { + trigger_event = { + id = coronation_events.6102 + days = 1 + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + remove_character_flag = need_military_outfit + involved_activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + scope:host = { + #Pick appropriate music + #Eastern Orthodox chanting + if = { + limit = { + OR = { + faith = faith:orthodox + culture = { has_cultural_pillar = heritage_byzantine } + culture = { has_cultural_pillar = language_greek } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mep3_mood_06 + } + #Iberian + else_if = { + limit = { + OR = { + culture = { has_building_gfx = iberian_building_gfx } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = "mx_Struggle_ending_compromise" + } + #Norse + else_if = { + limit = { + culture = { has_graphical_norse_culture_group_trigger = yes } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mx_mood_fp1_thefeast + } + #Steppe + else_if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + has_trait = nomadic_philosophy + } + culture = { has_graphical_steppe_culture_group_trigger = yes } + } + play_music_cue = mx_cue_the_khans_glory + } + #MENA + else_if = { + limit = { + OR = { + culture = { has_graphical_mena_culture_group_trigger = yes } + culture = { has_graphical_iranian_culture_group_trigger = yes } + } + } + play_music_cue = struggleend_cue + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + play_music_cue = "mx_cue_succession" + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + } + play_music_cue = "mx_cue_positive_effect" + } + else = { + play_music_cue = "mx_cue_sacredrite" + } + #Save an anointer if you don't have one + if = { + limit = { + OR = { + NOT = { exists = scope:anointer } + scope:anointer = { + is_alive = no + } + scope:anointer = { + is_imprisoned = yes + } + } + } + coronation_save_anointer_effect = yes + } + #Get councilor + if = { + limit = { + NOT = { + exists = scope:observer + } + } + #Get a councillor to be next to you + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + is_councillor_of = scope:host + trigger_if = { + limit = { + exists = scope:anointer + } + NOT = { + this = scope:anointer + } + } + } + save_scope_as = observer + } + } + } + #Get vassal + if = { + limit = { + NOT = { + exists = scope:observer + } + } + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + is_vassal_of = scope:host + trigger_if = { + limit = { + exists = scope:anointer + } + NOT = { + this = scope:anointer + } + } + } + save_scope_as = observer + } + } + } + #Get your crown/regalia to equip it + coronation_save_crowning_artifact_effect = { HOST = scope:host } + if = { + limit = { + this = root + } + coronation_ceremony_opinion_effect = yes + 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 } + } + coronation_change_law_effect = yes + } + else = { + show_as_tooltip = { + coronation_ceremony_opinion_effect = yes + 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 } + } + coronation_change_law_effect = yes + } + } + } + } + #Normal + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { this = scope:host } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + AND = { + liege = scope:host + is_a_faction_member = yes + } + } + } + desc = coronation_events.6101.a_guest_neg + } + triggered_desc = { + trigger = { + NOT = { this = scope:host } + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = trusting + } + NOT = { + host = { + has_trait = craven + } + } + } + desc = coronation_events.6101.a_guest_pos + } + triggered_desc = { + trigger = { + NOT = { this = scope:host } + } + desc = coronation_events.6101.a_guest + } + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + OR = { + has_trait = humble + has_trait = content + has_trait = craven + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + desc = coronation_events.6101.a_oh_noes + } + desc = coronation_events.6101.a + } + } + } + scope:host = { + #Prestige gain and possible cleric opinion loss from self crowning + if = { + limit = { + this = root + coronation_proper_artifact_crown_trigger = yes + NAND = { + exists = faith.religious_head + this = faith.religious_head + } + } + coronation_events_6101_self_crowning_effect = yes + } + else_if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + NAND = { + exists = faith.religious_head + this = faith.religious_head + } + } + show_as_tooltip = { + coronation_events_6101_self_crowning_effect = yes + } + } + } + if = { + limit = { + this = scope:host + scope:activity.var:activity_special_type_progression >= 25 + } + stress_impact = { + arrogant = massive_stress_impact_loss + ambitious = medium_stress_impact_loss + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + #Ceremony is over + #Spouse crowning + trigger_event = { + id = coronation_events.6140 + days = 2 + } + if = { + limit = { + scope:anointer = { + has_variable = anointer_destroy_me + } + } + scope:anointer = { + silent_disappearance_effect = yes + } + } + } +} + +#Host is being enthroned +coronation_events.6102 = { + type = activity_event + title = coronation_events.6102.t + #Mention Christian regalia (orb and scepter), etc + desc = { + #Is it guest or host perspective? + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + } + desc = { + #End of other event serves as beginning + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = patient + has_trait = just + has_trait = content + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = peasant_leader + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + + } + desc = coronation_events.6101.desc_ending_humble + } + desc = coronation_events.6101.desc_ending + } + desc = coronation_events.6102_middle + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + scope:activity.var:activity_special_type_progression >= 75 + scope:host = { + NOR = { + has_trait = humble + has_trait = cynical + has_trait = depressed + has_trait = calm + } + } + } + desc = { + desc = coronation_events.6102.desc_high_east_asian + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_high_east_asian_ending_japan + } + desc = coronation_events.6102.desc_high_east_asian_ending + } + } + } + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + scope:activity.var:activity_special_type_progression < 25 + } + desc = { + desc = coronation_events.6102.desc_low_east_asian + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_low_east_asian_ending_japan + } + desc = coronation_events.6102.desc_low_east_asian_ending + } + } + } + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + } + desc = { + desc = coronation_events.6102.desc_mid_east_asian + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_mid_east_asian_ending_japan + } + desc = coronation_events.6102.desc_mid_east_asian_ending + } + } + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + scope:host = { + NOR = { + has_trait = humble + has_trait = cynical + has_trait = depressed + has_trait = calm + } + } + } + desc = coronation_events.6102.desc_high + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6102.desc_low + } + desc = coronation_events.6102.desc_mid + } + } + } + #Guest perspective + desc = { + #End of other event serves as beginning + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + OR = { + has_trait = humble + has_trait = patient + has_trait = just + has_trait = content + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = peasant_leader + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + } + } + } + desc = coronation_events.6101.desc_ending_humble_guest + } + desc = coronation_events.6101.desc_ending_guest + } + desc = coronation_events.6102_middle_guest + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + scope:activity.var:activity_special_type_progression >= 75 + scope:host = { + NOR = { + has_trait = humble + has_trait = cynical + has_trait = depressed + has_trait = calm + } + } + } + desc = { + desc = coronation_events.6102.desc_high_east_asian_guest + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_high_east_asian_ending_japan_guest + } + desc = coronation_events.6102.desc_high_east_asian_ending_guest + } + } + } + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + scope:activity.var:activity_special_type_progression < 25 + } + desc = { + desc = coronation_events.6102.desc_low_east_asian_guest + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_low_east_asian_ending_japan_guest + } + desc = coronation_events.6102.desc_low_east_asian_ending_guest + } + } + } + triggered_desc = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + } + desc = { + desc = coronation_events.6102.desc_mid_east_asian_guest + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + AND = { + government_is_japanese_trigger = yes + has_title = title:e_japan + tgp_has_ceremonial_liege_title_trigger = yes + } + } + } + desc = coronation_events.6102.desc_mid_east_asian_ending_japan_guest + } + desc = coronation_events.6102.desc_mid_east_asian_ending_guest + } + } + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + NOR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + AND = { + is_vassal_of = scope:host + is_a_faction_member = yes + } + has_trait = cynical + has_trait = calm + has_trait = temperate + has_trait = callous + } + } + desc = coronation_events.6102.desc_high_guest + } + triggered_desc = { + trigger = { + OR = { + AND = { + scope:activity.var:activity_special_type_progression <= 50 + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + AND = { + is_vassal_of = scope:host + is_a_faction_member = yes + } + } + } + scope:activity.var:activity_special_type_progression < 25 + } + } + desc = coronation_events.6102.desc_low_guest + } + desc = coronation_events.6102.desc_mid_guest + } + } + } + } + + left_portrait = { + character = scope:observer + animation = reception_groom_left + camera = camera_event_left_to_the_left + } + center_portrait = { + character = scope:host + triggered_animation = { + trigger = { + scope:host = { + coronation_host_east_asian_steppe_admin_trigger = yes + } + NOT = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + } + animation = emperor + } + triggered_animation = { + trigger = { + NOT = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion + scope:host.faith.religion = religion:catholic_religion + scope:host.faith.religion = religion:protestant_religion + } + } + } + animation = personality_honorable + } + animation = scepter + camera = camera_event_center_mostly_away_right + } + right_portrait = { + character = scope:anointer + animation = reception_bride_right + camera = camera_event_right_to_the_right + } + override_background = { + reference = throne_room + } + artifact = { + trigger = { + exists = scope:crowning_artifact + } + target = scope:crowning_artifact + position = lower_right_portrait + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + immediate = { + # For MP + coronation_busy_effect = yes + + remove_character_flag = need_military_outfit + involved_activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + scope:host = { + save_scope_as = bg_override_char + #Pick appropriate music + #Eastern Orthodox chanting + if = { + limit = { + OR = { + faith = faith:orthodox + culture = { has_cultural_pillar = heritage_byzantine } + culture = { has_cultural_pillar = language_greek } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mep3_mood_06 + } + #Iberian + else_if = { + limit = { + OR = { + culture = { has_building_gfx = iberian_building_gfx } + } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = "mx_Struggle_ending_compromise" + } + #Norse + else_if = { + limit = { + culture = { has_graphical_norse_culture_group_trigger = yes } + scope:activity.var:activity_special_type_progression >= 25 + } + play_music_cue = mx_mood_fp1_thefeast + } + #Steppe + else_if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + has_trait = nomadic_philosophy + } + culture = { has_graphical_steppe_culture_group_trigger = yes } + } + play_music_cue = mx_cue_the_khans_glory + } + #MENA + else_if = { + limit = { + OR = { + culture = { has_graphical_mena_culture_group_trigger = yes } + culture = { has_graphical_iranian_culture_group_trigger = yes } + } + } + play_music_cue = struggleend_cue + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression < 25 + } + play_music_cue = "mx_cue_succession" + } + else_if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + } + play_music_cue = "mx_cue_positive_effect" + } + else = { + play_music_cue = "mx_cue_sacredrite" + } + #Save an anointer if you don't have one + if = { + limit = { + OR = { + NOT = { exists = scope:anointer } + scope:anointer = { + is_alive = no + } + scope:anointer = { + is_imprisoned = yes + } + } + } + coronation_save_anointer_effect = yes + } + #Get councilor + if = { + limit = { + NOT = { + exists = scope:observer + } + } + #Get a councillor to be next to you + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + is_councillor_of = scope:host + #spouse might feel strange here idk + trigger_if = { + limit = { + scope:host = { + OR = { + coronation_host_east_asian_trigger = yes + government_has_flag = government_is_clan + } + } + } + NOT = { + is_spouse_of = scope:host + } + } + trigger_if = { + limit = { + exists = scope:anointer + } + NOT = { + this = scope:anointer + } + } + } + save_scope_as = observer + } + } + } + #Get vassal + if = { + limit = { + NOT = { + exists = scope:observer + } + } + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + is_vassal_of = scope:host + trigger_if = { + limit = { + exists = scope:anointer + } + NOT = { + this = scope:anointer + } + } + } + save_scope_as = observer + } + } + } + #Get your crown/regalia to equip it + coronation_save_crowning_artifact_effect = { HOST = scope:host } + if = { + limit = { + this = root + } + 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 = { equip_artifact_to_owner = yes } + } + coronation_change_law_effect = yes + } + else = { + show_as_tooltip = { + coronation_ceremony_opinion_effect = yes + 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 } + } + coronation_change_law_effect = yes + } + } + } + } + #Normal + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { this = scope:host } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + AND = { + liege = scope:host + is_a_faction_member = yes + } + } + } + desc = coronation_events.6102.a_guest_neg + } + triggered_desc = { + trigger = { + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = trusting + } + NOT = { + host = { + has_trait = craven + } + } + NOT = { 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 } + } + desc = coronation_events.6102.a_guest + } + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + OR = { + has_trait = humble + has_trait = content + has_trait = craven + } + NOR = { + has_trait = arrogant + has_trait = ambitious + } + } + } + desc = coronation_events.6101.a_oh_noes + } + triggered_desc = { + trigger = { + this = scope:host + scope:activity.var:activity_special_type_progression < 25 + NOR = { + has_trait = humble + has_trait = content + has_trait = calm + } + } + desc = coronation_events.6102.a_host_neg + } + desc = coronation_events.6101.a + } + } + } + if = { + limit = { + this = scope:host + scope:activity.var:activity_special_type_progression >= 25 + } + stress_impact = { + arrogant = massive_stress_impact_loss + ambitious = medium_stress_impact_loss + just = medium_stress_impact_loss + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + #Spouse crowning event + trigger_event = { + id = coronation_events.6140 + days = 2 + } + if = { + limit = { + scope:anointer = { + has_variable = anointer_destroy_me + } + } + scope:anointer = { + silent_disappearance_effect = yes + } + } + } +} + +coronation_events.6103 = { + hidden = yes + immediate = { + scope:host = { + coronation_change_law_effect = yes + } + } +} + +scripted_effect coronation_events_6110_artifact_reward_effect = { + save_scope_as = chosen_artifact + #A TIERED BONUS BASED ON THE RARITY OF THE ARTIFACT + if = { + limit = { + rarity = illustrious + } + root = { + add_legitimacy = medium_legitimacy_gain + 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 + } + } + } + else_if = { + limit = { + rarity = famed + } + root = { + add_legitimacy = minor_legitimacy_gain + 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 + } + } + } + else_if = { + limit = { + rarity = masterwork + } + root = { + add_legitimacy = miniscule_legitimacy_gain + custom_tooltip = coronation_tt_positive_miniscule + scope:activity = { activity_special_type_progression_miniscule = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_miniscule + CHAR = root + } + } + } + #BONUS IF YOU HAVE EXALT THE CROWN INTENT + if = { + limit = { + NOT = { + has_variable = coronation_title_crown_bonus + } + root = { + has_activity_intent = coronation_exalt_crown + } + } + save_scope_as = artifact_target + scope:blesser = { + save_scope_as = antiquarian_from_task + } + root = { + save_scope_as = liege + hidden_effect = { + scope:artifact_target = { + antiquarian_improve_artifact_effect = yes + } + } + custom_tooltip = coronation_artifact_improved + } + set_variable = { + name = coronation_title_crown_bonus + } + } + #Add desc line + set_artifact_description = crowning_artifact_desc + + scope:activity = { + add_activity_log_entry = { + key = coronation_title_artifact_log + character = scope:host + score = 20 + show_in_conclusion = yes + } + } + +} + +#Coronation artifact needs to become artifact OF TITLE +coronation_events.6110 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + government_has_flag = government_is_nomadic + } + desc = coronation_events.6110.t_nomad + } + desc = coronation_events.6110.t + } + } + desc = { + desc = coronation_events.6110.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + exists = scope:old_title_artifact + exists = scope:crowning_artifact_2 + } + } + desc = coronation_events.6110.desc_crowns + } + triggered_desc = { + trigger = { + coronation_proper_artifact_regalia_trigger = no + } + desc = coronation_events.6110.desc_crown + } + desc = coronation_events.6110.desc_regalia + } + desc = coronation_events.6110.desc_2 + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = coronation_events.6110.desc_st_peter + } + desc = coronation_events.6110.desc_generic + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:old_title_artifact + } + desc = coronation_events.6110.desc_old_artifact + } + triggered_desc = { + trigger = { + exists = scope:crowning_artifact_2 + } + desc = coronation_events.6110.desc_no_old_artifact_plural + } + desc = coronation_events.6110.desc_no_old_artifact + } + } + left_portrait = { + character = root + animation = prayer + camera = camera_event_very_left + } + center_portrait = { + character = scope:observer + triggered_animation = { + trigger = { + root = { coronation_proper_artifact_regalia_trigger = yes } + } + animation = throne_room_messenger_3 + } + triggered_animation = { + trigger = { + root = { coronation_proper_artifact_regalia_trigger = no } + } + animation = crowning + } + camera = camera_event_right_pointing_left + hide_info = yes + } + right_portrait = { + character = scope:blesser + triggered_animation = { + trigger = { + root = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + } + animation = reception_groom_left + } + triggered_animation = { + trigger = { + root = { + coronation_proper_artifact_regalia_trigger = yes + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + animation = reading + } + triggered_animation = { + trigger = { + root = { coronation_proper_artifact_regalia_trigger = no } + } + animation = toast_goblet + } + camera = camera_event_right_fully_away + } + artifact = { + target = scope:crowning_artifact + position = lower_left_portrait + } + artifact = { + target = scope:crowning_artifact_2 + position = lower_center_portrait + } + artifact = { + target = scope:crowning_artifact_3 + position = lower_right_portrait + } + override_background = { + trigger = { + scope:host.capital_county = title:c_byzantion + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + } + reference = temple + } + + theme = coronation_activity + cooldown = { days = 20 } + + trigger = { + coronation_has_proper_artifact_trigger = yes + this = scope:activity.activity_host + scope:activity = { + NOT = { + has_variable = had_coronation_events_6110 + } + activity_host = { + save_temporary_scope_as = host_temp + #Save whether it needs to be helmet or nah + trigger_if = { + limit = { + coronation_proper_artifact_crown_trigger = yes + coronation_proper_artifact_regalia_trigger = no + } + save_temporary_scope_as = needs_crown_temp + } + trigger_if = { + limit = { + coronation_proper_artifact_regalia_trigger = yes + coronation_proper_artifact_crown_trigger = no + } + save_temporary_scope_as = needs_regalia_temp + } + + OR = { + #Doesn't have a crown tied to title + NOT = { + any_character_artifact = { + trigger_if = { + limit = { + exists = scope:needs_crown_temp + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia_temp + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = regalia + artifact_slot_type = helmet + } + } + has_variable = artifact_succession_title + var:artifact_succession_title ?= { + this = root.primary_title + } + } + } + #Has crown tied to title... and a better crown + AND = { + any_character_artifact = { + trigger_if = { + limit = { + exists = scope:needs_crown_temp + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia_temp + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = regalia + artifact_slot_type = helmet + } + } + has_variable = artifact_succession_title + var:artifact_succession_title ?= { + this = root.primary_title + } + save_temporary_scope_as = artifact_temp + } + any_character_artifact = { + trigger_if = { + limit = { + exists = scope:needs_crown_temp + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia_temp + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = regalia + artifact_slot_type = helmet + } + } + NOT = { + has_variable = artifact_succession_title + var:artifact_succession_title ?= { + this = root.primary_title + } + } + #Checking rarity is higher than title crown + OR = { + AND = { + rarity = illustrious + scope:artifact_temp = { + NOT = { + rarity = illustrious + } + } + } + AND = { + rarity = famed + scope:artifact_temp = { + NOR = { + rarity = illustrious + rarity = famed + } + } + } + } + } + } + } + } + } + } + on_trigger_fail = { + #Anointment event + trigger_event = { + id = coronation_events.6130 + days = 3 + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + save_scope_value_as = { + name = year + value = current_year + } + scope:activity = { + set_variable = { + name = had_coronation_events_6110 + } + activity_host = { + save_scope_as = host + } + } + #Save whether it needs to be helmet or nah + if = { + limit = { + scope:host = { + coronation_proper_artifact_crown_trigger = yes + coronation_proper_artifact_regalia_trigger = no + } + } + save_scope_as = needs_crown + } + if = { + limit = { + scope:host = { + coronation_proper_artifact_regalia_trigger = yes + coronation_proper_artifact_crown_trigger = no + } + } + save_scope_as = needs_regalia + } + #Save your title's regalia if it exists + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + + has_variable = artifact_succession_title + var:artifact_succession_title ?= root.primary_title + } + save_scope_as = old_title_artifact + } + + #Save up to 5 crowns/regalia that aren't your title's crown/regalia + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact + } + if = { + limit = { + exists = scope:crowning_artifact + } + #Try to save second + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + NOT = { + this = scope:crowning_artifact + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact_2 + } + } + if = { + limit = { + exists = scope:crowning_artifact_2 + } + #try to save 3rd + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + NOR = { + this = scope:crowning_artifact + this = scope:crowning_artifact_2 + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact_3 + } + } + if = { + limit = { + exists = scope:crowning_artifact_3 + } + #Try to save 4th + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + NOR = { + this = scope:crowning_artifact + this = scope:crowning_artifact_2 + this = scope:crowning_artifact_3 + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact_4 + } + } + + if = { + limit = { + exists = scope:crowning_artifact_4 + } + #Try to save 5th + ordered_character_artifact = { + order_by = artifact_rarity + limit = { + trigger_if = { + limit = { + exists = scope:needs_crown + } + artifact_slot_type = helmet + } + trigger_else_if = { + limit = { + exists = scope:needs_regalia + } + artifact_slot_type = regalia + } + trigger_else = { + OR = { + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + NOR = { + this = scope:crowning_artifact + this = scope:crowning_artifact_2 + this = scope:crowning_artifact_3 + this = scope:crowning_artifact_4 + } + trigger_if = { + limit = { + has_variable = artifact_succession_title + } + NOT = { + var:artifact_succession_title = root.primary_title + } + } + } + save_scope_as = crowning_artifact_5 + } + } + + #Save priest + if = { + limit = { + exists = involved_activity.var:officiator + involved_activity.var:officiator = { + is_alive = yes + is_imprisoned = no + } + } + #Save characters for the scene + involved_activity.var:officiator = { + save_scope_as = blesser + } + } + if = { + limit = { + NOT = { + exists = scope:blesser + } + 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 = blesser + } + } + if = { + limit = { + NOT = { + exists = scope:blesser + } + } + create_character = { + template = priest_character_template + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = blesser + } + scope:blesser = { + add_character_flag = blesser_destroy_me + } + } + + #Save another priest + if = { + limit = { + cp:councillor_court_chaplain ?= { + NOT = { + this = scope:blesser + } + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + } + } + cp:councillor_court_chaplain = { + save_scope_as = observer + } + } + else = { + create_character = { + template = priest_character_template + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = observer + } + scope:observer = { + add_character_flag = blesser_destroy_me + } + } + } + + #Artifact 1 + option = { + name = coronation_events.6110.a + custom_tooltip = coronation_titling_artifact_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_tt + } + scope:crowning_artifact = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Artifact 2 + option = { + trigger = { + exists = scope:crowning_artifact_2 + } + name = coronation_events.6110.b + custom_tooltip = coronation_titling_artifact_2_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_2_tt + } + scope:crowning_artifact_2 = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact_2 = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Artifact 3 + option = { + trigger = { + exists = scope:crowning_artifact_3 + } + name = coronation_events.6110.c + custom_tooltip = coronation_titling_artifact_3_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_3_tt + } + scope:crowning_artifact_3 = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact_3 = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Artifact 4 + option = { + trigger = { + exists = scope:crowning_artifact_4 + } + name = coronation_events.6110.d + custom_tooltip = coronation_titling_artifact_4_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_4_tt + } + scope:crowning_artifact_4 = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact_4 = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Artifact 5 + option = { + trigger = { + exists = scope:crowning_artifact_5 + } + name = coronation_events.6110.e + custom_tooltip = coronation_titling_artifact_5_tt + if = { + limit = { + exists = player_heir + NOT = { + primary_heir ?= player_heir + } + } + custom_tooltip = coronation_titling_artifact_will_be_lost_5_tt + } + scope:crowning_artifact_5 = { + set_variable = { + name = artifact_succession_title + value = root.primary_title + } + coronation_events_6110_artifact_reward_effect = yes + } + if = { + limit = { + has_activity_intent = coronation_exalt_crown + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + scope:crowning_artifact_5 = { + OR = { + rarity = famed + rarity = illustrious + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + #Title??? This is my family/other title's artifact, and always will be! + option = { + name = { + trigger = { + NOT = { exists = scope:old_title_artifact } + exists = scope:crowning_artifact_2 + } + text = coronation_events.6110.f_plural + } + name = { + trigger = { + NOT = { exists = scope:old_title_artifact } + } + text = coronation_events.6110.f + } + + name = { + trigger = { + exists = scope:old_title_artifact + } + text = coronation_events.6110.f_replacing + } + + custom_tooltip = coronation_artifact_unaltered_succession_tt + if = { + limit = { + NOT = { exists = scope:old_title_artifact } + } + add_legitimacy = minor_legitimacy_loss + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + else = { + custom_tooltip = old_title_artifact_remains_tt + custom_tooltip = coronation_tt_negative_tiny + scope:activity = { activity_special_type_progression_negative_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative_tiny + CHAR = root + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 0 + modifier = { + has_trait = greedy + add = 1 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + + if = { + limit = { + is_ai = yes + scope:blesser = { + has_character_flag = blesser_destroy_me + } + } + scope:blesser = { + silent_disappearance_effect = yes + } + } + if = { + limit = { + is_ai = yes + scope:observer = { + has_character_flag = blesser_destroy_me + } + } + scope:observer = { + silent_disappearance_effect = yes + } + } + #Anointment event + trigger_event = { + id = coronation_events.6130 + days = 3 + } + } +} + +#Calling for the approval of the CLERGY +coronation_events.6120 = { + type = activity_event + title = coronation_events.6120.t + desc = { + #Triggered based on where you're going for rites + first_valid = { + triggered_desc = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + OR = { + location.barony = title:b_constantinople + AND = { + location.barony = title:b_vaticano + faith = faith:catholic + scope:host.faith = faith:catholic + } + AND = { + current_year >= 950 + location.barony = title:b_london + } + location.barony = title:b_reims + location = { + has_holding_type = church_holding + } + } + } + desc = coronation_events.6120.desc_cathedral + } + triggered_desc = { + trigger = { + exists = scope:activity.special_guest:priest + } + desc = coronation_events.6120.desc_holy_site + } + desc = coronation_events.6120.desc_generic_intro + } + #Triggered based on magnificence + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + desc = coronation_events.6120.desc_low_magnificence + } + triggered_desc = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + desc = coronation_events.6120.desc_high_magnificence + } + desc = coronation_events.6120.desc_generic_mid + } + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + desc = coronation_events.6120.desc_anointment + } + desc = coronation_events.6120.desc + } + #Clergy deliver their petition + first_valid = { + triggered_desc = { + trigger = { + coronation_clergy_approval_value < -1 + } + desc = coronation_events.6120.desc_low_clergy + } + triggered_desc = { + trigger = { + coronation_clergy_approval_value >= 1 + } + desc = coronation_events.6120.desc_high_clergy + } + desc = coronation_events.6120.desc_mid_clergy + } + } + left_portrait = { + character = scope:oather_1 + #Priests + triggered_animation = { + trigger = { + root = { coronation_clergy_approval_value < -1 } + } + animation = personality_cynical + } + triggered_animation = { + trigger = { + root = { coronation_clergy_approval_value >= 1 } + } + animation = prayer + } + animation = personality_honorable + camera = camera_event_very_left + } + center_portrait = { + character = scope:host + animation = wedding_priest + } + right_portrait = { + character = scope:oather_2 + #Priests + triggered_animation = { + trigger = { + root = { coronation_clergy_approval_value < -1 } + } + animation = eyeroll + } + triggered_animation = { + trigger = { + root = { coronation_clergy_approval_value >= 1 } + } + animation = admiration + } + animation = chaplain + camera = camera_event_very_right + } + override_background = { + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + trigger = { + this = involved_activity.activity_host + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + if = { + limit = { + exists = faith.religious_head + } + faith = { + religious_head = { save_scope_as = hof } + } + } + + #Save holy men + if = { + limit = { + coronation_living_officiator_trigger = yes + } + scope:activity.var:officiator = { + save_scope_as = oather_1 + } + } + if = { + limit = { + NOT = { + exists = scope:oather_1 + } + 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 = oather_1 + } + } + if = { + limit = { + NOT = { + exists = scope:oather_1 + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + government_has_flag = government_is_theocracy + } + save_scope_as = oather_1 + } + } + } + if = { + limit = { + NOT = { + exists = scope:oather_1 + } + } + create_character = { + template = priest_character_template + location = scope:host.location + culture = scope:host.location.culture + faith = scope:host.faith + save_scope_as = oather_1 + } + scope:oather_1 = { + add_character_flag = oather_1_destroy + } + } + #Save second one + if = { + limit = { + cp:councillor_court_chaplain ?= { + NOT = { + this = scope:oather_1 + } + 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 = oather_2 + } + } + if = { + limit = { + NOT = { + exists = scope:oather_2 + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + government_has_flag = government_is_theocracy + NOT = { + this = scope:oather_1 + } + } + save_scope_as = oather_2 + } + } + } + if = { + limit = { + NOT = { + exists = scope:oather_2 + } + } + create_character = { + template = priest_character_template + location = scope:host.location + culture = scope:host.location.culture + faith = scope:host.faith + save_scope_as = oather_2 + } + scope:oather_2 = { + add_character_flag = oather_2_destroy + } + } + coronation_ceremony_piety_effect = yes + } + #Unlocked I SWEAR REAL HARD TO GET THE HERETICS + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + OR = { + faith = { + NOT = { + has_doctrine = doctrine_pluralism_pluralistic + } + } + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + } + + } + } + name = coronation_events.6120.a + flavor = coronation_events.6120.a.flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_swore_heretic_persecute + character = scope:host + root = { + add_character_modifier = { + modifier = coronation_swore_persecution_modifier + years = 20 + } + if = { + limit = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + } + NOT = { + has_trait = holy_warrior + } + martial > average_skill_rating + } + add_trait = holy_warrior + } + } + + } + } + stress_impact = { + zealous = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + + modifier = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + } + NOT = { + has_trait = holy_warrior + } + martial > average_skill_rating + add = 25 + } + modifier = { + NOT = { + has_focus_martial = yes + } + add = -50 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = cynical + } + } + } + } + #I will affirm in a way that places my authority above the church's + option = { + trigger = { + learning >= decent_skill_rating + trigger_if = { + limit = { has_trait = deceitful } + has_trait = deceitful + } + trigger_else_if = { + limit = { has_trait = cynical } + has_trait = cynical + } + trigger_else_if = { + limit = { has_trait = arbitrary } + has_trait = arbitrary + } + trigger_else_if = { + limit = { has_trait = fickle } + has_trait = fickle + } + trigger_else_if = { + limit = { has_trait = paranoid } + has_trait = paranoid + } + trigger_else_if = { + limit = { has_trait = arrogant } + has_trait = arrogant + } + trigger_else_if = { + limit = { has_trait = ambitious } + has_trait = ambitious + } + trigger_else = { + has_trait = greedy + } + } + name = coronation_events.6120.b + flavor = coronation_events.6120.b.flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_exploiting_church_log + character = scope:host + root = { + add_character_modifier = { + modifier = coronation_denying_clergy_modifier + years = 20 + } + add_piety = medium_piety_loss + } + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + greedy = minor_stress_impact_loss + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + zealous = medium_stress_impact_gain + generous = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + + modifier = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + } + NOT = { + has_trait = holy_warrior + } + martial > average_skill_rating + add = 25 + } + modifier = { + NOT = { + has_focus_martial = yes + } + add = -50 + } + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = generous + has_trait = just + } + } + } + } + #Priests approve/disapprove + option = { + name = { + trigger = { + NOR = { + ai_honor >= high_positive_ai_value + ai_zeal >= medium_positive_ai_value + } + OR = { + coronation_clergy_approval_value < -1 + has_trait = cynical + has_trait = arbitrary + has_trait = fickle + } + } + text = coronation_events.6120.c_begrudging + } + name = { + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + NOT = { + NOR = { + ai_honor >= high_positive_ai_value + ai_zeal >= medium_positive_ai_value + } + OR = { + coronation_clergy_approval_value < -1 + has_trait = cynical + has_trait = arbitrary + has_trait = fickle + } + } + } + text = coronation_events.6120.c_christian + } + name = { + trigger = { + NOT = { OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } } + NOT = { + NOR = { + ai_honor >= high_positive_ai_value + ai_zeal >= medium_positive_ai_value + } + OR = { + coronation_clergy_approval_value < -1 + has_trait = cynical + has_trait = arbitrary + has_trait = fickle + } + } + + } + text = coronation_events.6120.c + } + ai_chance = { + base = 100 + } + } + + after = { + # For MP + coronation_ready_effect = yes + if = { + limit = { + scope:oather_1 = { + has_character_flag = oather_1_destroy + } + } + scope:oather_1 = { + silent_disappearance_effect = yes + } + } + if = { + limit = { + scope:oather_2 = { + has_character_flag = oather_2_destroy + } + } + scope:oather_2 = { + silent_disappearance_effect = yes + } + } + #Approval of the nobles + trigger_event = { + id = coronation_events.6121 + days = 3 + } + } +} + +scripted_trigger coronation_events_6121_detractor_ally_trigger = { + current_military_strength >= 300 + is_ai = yes + highest_held_title_tier >= tier_county + NOR = { + is_vassal_or_below_of = root + is_allied_to = root + is_tributary_of_suzerain_or_above = root + has_relation_blood_brother = prev + government_has_flag = government_is_herder + any_war_ally = { + this = prev + } + } +} +scripted_trigger coronation_events_6121_minority_trigger = { + is_participant_in_activity = scope:activity + has_vassal_stance = minority + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + culture = { + NOT = { this = root.culture } + cultural_acceptance = { + target = root.culture + value <= 80 + } + } +} +#Calling for the approval of the NOBILITY +coronation_events.6121 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_magyar + } + } + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + primary_title = title:e_mongol_empire + } + } + desc = coronation_events.6121.t_kurultai + } + desc = coronation_events.6121.t + } + } + desc = { + #Regional flavor + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_magyar + } + } + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + primary_title = title:e_mongol_empire + } + } + desc = coronation_events.6121.desc_kurultai + } + triggered_desc = { + trigger = { + OR = { + is_roman_emperor_primary_title_trigger = yes + culture = { + has_cultural_tradition = tradition_ep3_roman_ceremonies + } + culture = { + has_cultural_tradition = tradition_roman_legacy + } + } + } + desc = coronation_events.6121.desc_byzantine + } + desc = coronation_events.6121.desc_generic_intro + } + #Are the nobles compliant? + first_valid = { + triggered_desc = { + trigger = { + coronation_vassals_approval_value < -1 + } + desc = coronation_events.6121.desc_low_approval + } + triggered_desc = { + trigger = { + coronation_vassals_approval_value >= 1 + } + desc = coronation_events.6121.desc_high_approval + } + desc = coronation_events.6121.desc_mid_approval + } + } + left_portrait = { + character = scope:vassal_1 + #Nobles + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value < -1 } + } + animation = anger + } + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value >= 1 } + } + animation = throne_room_bow_3 + } + animation = throne_room_bow_2 + camera = camera_event_very_left + } + center_portrait = { + character = scope:host + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value < -1 } + } + animation = worry + } + animation = wedding_groom_right + } + right_portrait = { + character = scope:vassal_2 + #Nobles + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value < -1 } + } + animation = hunting_knife_start + } + triggered_animation = { + trigger = { + root = { coronation_vassals_approval_value >= 1 } + } + animation = celebrate_sword + } + animation = wedding_objection_start + camera = camera_event_very_right + } + lower_left_portrait = scope:detractor_ally_1 + lower_center_portrait = scope:detractor_ally_2 + override_background = { + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + + trigger = { + this = involved_activity.activity_host + scope:activity = { + any_attending_character = { + count >= 2 + is_vassal_of = root + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + } + } + on_trigger_fail = { + #Skip to Approval of the people if you have too few vassals attending + trigger_event = { + id = coronation_events.6122 + days = 3 + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + #Host is liked, choose supporters + if = { + limit = { + coronation_vassals_approval_value >= -1 + } + scope:activity = { + ordered_guest_subset = { + name = supporter + order_by = max_military_strength + limit = { + is_vassal_of = root + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_1 + } + } + scope:activity = { + ordered_guest_subset = { + name = supporter + order_by = max_military_strength + limit = { + is_vassal_of = root + NAND = { + exists = scope:vassal_1 + this = scope:vassal_1 + } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_2 + } + } + } + #Host is disliked, choose detractors + else = { + scope:activity = { + ordered_guest_subset = { + name = detractor + order_by = max_military_strength + limit = { + is_vassal_of = root + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_1 + } + } + scope:activity = { + ordered_guest_subset = { + name = detractor + order_by = max_military_strength + limit = { + is_vassal_of = root + NAND = { + exists = scope:vassal_1 + this = scope:vassal_1 + } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_2 + } + } + } + #Random vassal fallbacks + if = { + limit = { + NOT = { + exists = scope:vassal_1 + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + is_vassal_of = root + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_1 + } + } + } + if = { + limit = { + NOT = { + exists = scope:vassal_2 + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + is_vassal_of = root + NOT = { + this = scope:vassal_1 + } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_2 + } + } + } + #Save detractors with foreign allies and foreign allies, if possible + if = { + limit = { + coronation_vassals_approval_value < -1 + has_activity_intent = coronation_weaken_detractors + intrigue >= high_skill_rating + scope:activity = { + any_guest_subset = { + name = detractor + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + is_ai = yes + is_vassal_of = root + any_ally = { + coronation_events_6121_detractor_ally_trigger = yes + } + } + } + } + scope:activity = { + every_guest_subset = { + name = detractor + limit = { + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + is_ai = yes + is_vassal_of = root + any_ally = { + coronation_events_6121_detractor_ally_trigger = yes + } + } + ordered_ally = { + order_by = current_military_strength + limit = { + coronation_events_6121_detractor_ally_trigger = yes + } + add_to_list = detractor_allies + } + } + ordered_in_list = { + list = detractor_allies + order_by = current_military_strength + save_scope_as = detractor_ally_1 + } + ordered_in_list = { + list = detractor_allies + order_by = current_military_strength + limit = { + NOT = { + this = scope:detractor_ally_1 + } + } + + save_scope_as = detractor_ally_2 + } + #Overwrite vassals we already saved, these are more relevant + scope:detractor_ally_1 = { + ordered_ally = { + order_by = current_military_strength + limit = { + is_ai = yes + is_vassal_of = root + is_in_guest_subset = { name = detractor } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal_1 + } + } + + scope:detractor_ally_2 = { + ordered_ally = { + order_by = current_military_strength + limit = { + is_ai = yes + is_vassal_of = root + is_in_guest_subset = { name = detractor } + NOR = { + is_at_war_with = root + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + NOT = { + this = scope:vassal_1 + } + } + save_scope_as = vassal_2 + } + } + } + } + #Overwrite with minority vassals if that option is available + if = { + limit = { + has_activity_intent = coronation_impress_attendees + diplomacy >= decent_skill_rating + any_vassal = { + count >= 2 + coronation_events_6121_minority_trigger = yes + } + } + ordered_vassal = { + order_by = max_military_strength + limit = { + coronation_events_6121_minority_trigger = yes + opinion = { + target = root + value >= -20 + } + } + alternative_limit = { + coronation_events_6121_minority_trigger = yes + opinion = { + target = root + value >= -60 + } + } + alternative_limit = { + coronation_events_6121_minority_trigger = yes + } + save_scope_as = vassal_1 + } + ordered_vassal = { + order_by = max_military_strength + limit = { + coronation_events_6121_minority_trigger = yes + NOT = { + this = scope:vassal_1 + } + opinion = { + target = root + value >= -20 + } + } + alternative_limit = { + coronation_events_6121_minority_trigger = yes + opinion = { + target = root + value >= -60 + } + NOT = { + this = scope:vassal_1 + } + } + alternative_limit = { + coronation_events_6121_minority_trigger = yes + NOT = { + this = scope:vassal_1 + } + } + save_scope_as = vassal_2 + } + } + coronation_ceremony_prestige_effect = yes + } + #THESE VASSALS THAT DON'T LIKE ME ARE FOREIGN PUPPETS + option = { + trigger = { + has_activity_intent = coronation_weaken_detractors + intrigue >= high_skill_rating + exists = scope:detractor_ally_1 + } + name = coronation_events.6121.a + flavor = coronation_events.6121.a.flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_foreign_enemies_log + score = 50 + character = scope:vassal_1 + target = scope:vassal_2 + #Break alliance between vassal and foreign ruler + scope:vassal_1 = { + break_alliance = scope:detractor_ally_1 + if = { + limit = { + NOT = { + has_relation_rival = root + } + } + set_relation_rival = { + target = root + reason = rival_accused_of_foreign_collusion + } + } + else = { + set_relation_nemesis = { + target = root + reason = rival_accused_of_foreign_collusion + } + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:vassal_1 } + } + scope:vassal_2 = { + if = { + limit = { + exists = scope:detractor_ally_2 + } + break_alliance = scope:detractor_ally_2 + } + if = { + limit = { + NOT = { + has_relation_rival = root + } + } + set_relation_rival = { + target = root + reason = rival_accused_of_foreign_collusion + } + } + else = { + set_relation_nemesis = { + target = root + reason = rival_accused_of_foreign_collusion + } + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:vassal_2 } + } + } + } + scope:vassal_1 = { + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + scope:vassal_2 = { + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + if = { + limit = { + scope:detractor_ally_1 = { + is_confederation_member = yes + } + } + scope:detractor_ally_1.confederation = { + remove_confederation_member = scope:detractor_ally_1 + } + } + if = { + limit = { + scope:detractor_ally_2 = { + is_confederation_member = yes + } + } + scope:detractor_ally_2.confederation = { + remove_confederation_member = scope:detractor_ally_2 + } + } + + scope:detractor_ally_1 = { + add_opinion = { + target = root + opinion = -50 + modifier = hate_opinion + } + if = { + limit = { + involved_activity ?= scope:activity + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:detractor_ally_1 } + } + } + if = { + limit = { + exists = scope:detractor_ally_2 + } + scope:detractor_ally_2 = { + add_opinion = { + target = root + opinion = -50 + modifier = hate_opinion + } + } + if = { + limit = { + involved_activity ?= scope:activity + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:detractor_ally_2 } + } + } + + + stress_impact = { + vengeful = miniscule_stress_impact_loss + paranoid = minor_stress_impact_loss + trusting = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + just = miniscule_stress_impact_gain + honest = miniscule_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + add = 100 + OR = { + has_trait = vengeful + has_trait = paranoid + has_trait = sadistic + has_trait = deceitful + } + } + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = forgiving + has_trait = just + has_trait = honest + } + } + } + } + #I should make a show of accepting loyalty from minorities + option = { + trigger = { + has_activity_intent = coronation_impress_attendees + stewardship >= decent_skill_rating + any_vassal = { + count >= 2 + coronation_events_6121_minority_trigger = yes + } + } + name = coronation_events.6121.b + flavor = coronation_events.6121.b_flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_honored_minorities_ceremony_log + character = scope:vassal_1 + target = scope:vassal_2 + scope:vassal_1 = { + #Become supporter if opinion is positive + if = { + limit = { + OR = { + is_in_guest_subset = { name = detractor } + AND = { + NOT = { is_in_guest_subset = { name = supporter } } + opinion = { + target = root + value >= 0 + } + } + } + is_ai = yes + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:vassal_1 } + } + if = { + limit = { + culture = scope:vassal_2.culture + } + #Add cultural acceptance + culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_favored_during_oath + } + } + } + else = { + #Add cultural acceptance + culture = { + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_favored_during_oath + } + } + } + } + scope:vassal_2 = { + #Become supporter if opinion is positive + if = { + limit = { + OR = { + is_in_guest_subset = { name = detractor } + AND = { + NOT = { is_in_guest_subset = { name = supporter } } + opinion = { + target = root + value >= 0 + } + } + } + is_ai = yes + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:vassal_2 } + } + if = { + limit = { + NOT = { + culture = scope:vassal_1.culture + } + } + #Add cultural acceptance + culture = { + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_favored_during_oath + } + } + } + } + } + } + scope:vassal_1 = { + #Add opinion of root + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + scope:vassal_2 = { + #Add opinion of root + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + trusting = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + add = 100 + OR = { + has_trait = compassionate + has_trait = humble + has_trait = trusting + } + } + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + has_trait = paranoid + } + } + } + } + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + diplomacy >= average_skill_rating + scope:activity = { + any_guest_subset = { + count >= 2 + name = supporter + is_vassal_of = root + } + } + } + name = coronation_events.6121.c + + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = custom.every_vassal_supporter + limit = { + is_vassal_of = root + } + if = { + limit = { + government_allows = administrative + top_liege = involved_activity.activity_host + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 15 + } + hidden_effect = { + reverse_add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 10 + } + } + } + } + ai_chance = { + base = 200 + } + } + option = { + trigger = { + NOT = { + government_allows = administrative + } + trigger_if = { + limit = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + OR = { + has_trait = lifestyle_blademaster + has_trait = knight_errant + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 30 + } + } + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 20 + } + } + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 20 + } + } + has_trait = aggressive_attacker + has_trait = reckless + has_trait = gallant + has_trait = adventurer + has_trait = viking + has_trait = shieldmaiden + #Normal personality_triggers + has_trait = wrathful + has_trait = vengeful + has_trait = brave + has_trait = fickle + has_trait = arrogant + has_trait = sadistic + } + } + trigger_else = { + #Just the warrior-type triggers + OR = { + has_trait = lifestyle_blademaster + has_trait = knight_errant + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 30 + } + } + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 20 + } + } + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 20 + } + } + has_trait = aggressive_attacker + has_trait = reckless + has_trait = gallant + has_trait = adventurer + has_trait = viking + has_trait = shieldmaiden + } + } + coronation_vassals_approval_value < -1 + scope:vassal_2 = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_ai = yes + } + } + name = coronation_events.6121.d + flavor = coronation_events.6121.d_flavor + add_internal_flag = dangerous + scope:activity = { + add_activity_log_entry = { + key = coronation_noble_oath_duel_log + score = 50 + show_in_conclusion = yes + character = root + target = scope:vassal_2 + } + } + + + custom_tooltip = coronation_events.6121_duel_tt + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:vassal_2 + FATALITY = always + FIXED = no + LOCALE = temple + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 + } + add_dread = major_dread_gain + add_prestige = medium_prestige_gain + if = { + limit = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + add_tyranny = major_tyranny_gain + } + else_if = { + limit = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + add_tyranny = medium_tyranny_gain + } + scope:vassal_2 = { + set_relation_rival = { + target = root + reason = rival_duel_attacked + } + if = { + limit = { + involved_activity ?= scope:activity + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:vassal_2 } + } + } + stress_impact = { + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + craven = massive_stress_impact_gain + humble = minor_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_vengefulness = 1 + ai_rationality = -1 + } + modifier = { + add = 100 + OR = { + has_trait = wrathful + has_trait = vengeful + } + } + modifier = { + add = 50 + OR = { + has_trait = sadistic + has_trait = arrogant + has_trait = brave + has_trait = fickle + } + } + modifier = { + add = 50 + prowess >= extremely_high_skill_rating + } + modifier = { + add = -100 + prowess < scope:vassal_2.prowess + } + modifier = { + factor = 0.5 + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = humble + has_trait = forgiving + has_trait = compassionate + has_trait = calm + prowess <= low_skill_rating + } + } + } + } + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + trigger_if = { + limit = { + coronation_vassals_approval_value >= -1 + coronation_vassals_approval_value < 1 + } + OR = { + has_trait = paranoid + has_trait = depressed + has_trait = vengeful + } + } + trigger_else = { + coronation_vassals_approval_value < -1 + } + } + desc = coronation_events.6121.e_low + } + triggered_desc = { + trigger = { + coronation_vassals_approval_value >= -1 + OR = { + has_trait = arrogant + has_trait = trusting + has_trait = content + has_trait = callous + has_trait = sadistic + } + NOR = { + has_trait = humble + has_trait = compassionate + has_trait = paranoid + has_trait = generous + has_trait = forgiving + } + } + desc = coronation_events.6121.e_high + } + desc = coronation_events.6121.e_mid + } + } + } + ai_chance = { + base = 100 + } + } + + after = { + # For MP + coronation_ready_effect = yes + + #Approval of the people + trigger_event = { + id = coronation_events.6122 + days = 3 + } + } +} + +#The approval of the people event +coronation_events.6122 = { + type = activity_event + title = coronation_events.6122.t + desc = { + first_valid = { + #Loc for anointment taking place outside realm + triggered_desc = { + trigger = { + scope:location.county.holder = { + NOT = { top_liege = root } + } + } + desc = coronation_events.6122.desc_intro_foreign + } + desc = coronation_events.6122.desc_intro + } + #Are the people compliant? + first_valid = { + triggered_desc = { + trigger = { + coronation_popular_approval_value < -1 + } + desc = coronation_events.6122.desc_low_approval + } + triggered_desc = { + trigger = { + coronation_popular_approval_value >= 1 + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + OR = { + location.barony = title:b_vaticano + location.barony = title:b_roma + location.culture = { + has_cultural_pillar = language_greek + } + } + } + desc = coronation_events.6122.desc_high_approval_christian + } + triggered_desc = { + trigger = { + coronation_popular_approval_value >= 1 + } + desc = coronation_events.6122.desc_high_approval + } + desc = coronation_events.6122.desc_mid_approval + } + } + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value < -1 } + } + animation = eyeroll + } + triggered_animation = { + trigger = { + root = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + animation = acknowledging + } + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value >= 1 } + } + animation = interested + } + animation = personality_rational + } + center_portrait = { + character = scope:commoner_1 + #Nobles + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value < -1 } + } + animation = personality_coward + } + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value >= 1 } + } + animation = throne_room_bow_3 + } + animation = throne_room_bow_2 + camera = camera_event_very_right + hide_info = yes + } + right_portrait = { + character = scope:commoner_2 + #Nobles + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value < -1 } + } + animation = crying + } + triggered_animation = { + trigger = { + root = { coronation_popular_approval_value >= 1 } + } + animation = obsequious_bow + } + animation = throne_room_bow_1 + camera = camera_event_very_right + hide_info = yes + } + lower_left_portrait = scope:detractor_ally_1 + lower_center_portrait = scope:detractor_ally_2 + override_background = { + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + on_trigger_fail = { + #artifact blessing + trigger_event = { + id = coronation_events.6110 + days = 3 + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + select_local_farm_animal_effect = yes + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + capital_province = { save_scope_as = capital_p } + create_character = { + template = settlement_elder_character + dynasty = none + location = scope:activity.activity_location + gender_female_chance = activity_location_faith_dominant_gender_female_chance + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + save_scope_as = commoner_1 + } + create_character = { + template = settlement_elder_character + dynasty = none + location = scope:activity.activity_location + gender_female_chance = activity_location_faith_dominant_gender_female_chance + faith = scope:activity.activity_location.faith + culture = scope:activity.activity_location.culture + save_scope_as = commoner_2 + } + coronation_ceremony_legitimacy_effect = yes + } + #Exalt the crown + option = { + trigger = { + has_activity_intent = coronation_exalt_crown + coronation_popular_approval_value >= 1 + location.county = { + holder = root + NOT = { + has_county_modifier = coronation_loyal_to_the_crown_modifier + } + } + } + name = coronation_events.6122.a + flavor = coronation_events.6122.a.flavor + + #Get a county modifier that is replaced with a negative one if the county gets taken by another primary title holder + scope:activity = { + add_activity_log_entry = { + key = coronation_inspired_loyalty_crowd_log + score = 20 + character = root + scope:location.county = { + add_county_modifier = { + modifier = coronation_loyal_to_the_crown_modifier + years = 20 + } + } + } + } + scope:location.county = { + set_variable = { + name = coronation_loyal_to_title + value = scope:host.primary_title + } + custom_tooltip = coronation_modifier_removed_on_new_primary_tt + custom_tooltip = coronation_modifier_negative_on_new_primary_tt + } + remove_short_term_gold = minor_gold_value + stress_impact = { + generous = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + shy = minor_stress_impact_gain + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 300 + modifier = { + add = 200 + OR = { + has_trait = arrogant + has_trait = generous + } + } + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = shy + has_trait = humble + has_trait = content + has_trait = greedy + } + } + } + } + #PUNISH THIS RABBLE + option = { + trigger = { + martial >= medium_skill_rating + coronation_popular_approval_value < -1 + } + name = coronation_events.6122.b + flavor = coronation_events.6122.b.flavor + scope:activity = { + add_activity_log_entry = { + key = coronation_quelled_crowd_log + score = 20 + character = root + root = { + add_character_modifier = { + modifier = punishes_popular_dissent_modifier + years = 20 + } + scope:location.county = { + add_county_modifier = { + modifier = coronation_crowds_beaten_modifier + years = 5 + } + } + } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + compassionate = major_stress_impact_gain + humble = major_stress_impact_gain + forgiving = major_stress_impact_gain + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -2 + } + modifier = { + add = { + value = dread + multiply = 2 + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = humble + has_trait = forgiving + has_trait = trusting + has_trait = generous + } + } + } + } + + #Opt out + option = { + #Triggered names based on positivity of crowd and your arrogance + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = humble + has_trait = compassionate + has_trait = calm + has_trait = forgiving + } + coronation_popular_approval_value < -1 + NOR = { + has_trait = arrogant + has_trait = vengeful + has_trait = sadistic + has_trait = wrathful + } + } + desc = coronation_events.6122.c_v_low_humble + } + triggered_desc = { + trigger = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = sadistic + has_trait = arbitrary + has_trait = vengeful + coronation_popular_approval_value < -1 + } + coronation_popular_approval_value < 1 + } + desc = coronation_events.6122.c_v_low + } + triggered_desc = { + trigger = { + trigger_if = { + limit = { + coronation_popular_approval_value >= -1 + coronation_popular_approval_value < 1 + } + NOR = { + has_trait = humble + ai_compassion >= low_positive_ai_value + } + } + trigger_else = { + coronation_popular_approval_value < -1 + } + } + desc = coronation_events.6122.c_low + } + triggered_desc = { + trigger = { + coronation_popular_approval_value >= -1 + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = trusting + has_trait = eccentric + } + } + desc = coronation_events.6122.c_high + } + desc = coronation_events.6122.c_mid + } + } + } + ai_chance = { + base = 100 + } + } + + after = { + # For MP + coronation_ready_effect = yes + + scope:commoner_1 = { + silent_disappearance_effect = yes + } + scope:commoner_2 = { + silent_disappearance_effect = yes + } + #artifact blessing + trigger_event = { + id = coronation_events.6110 + days = 3 + } + } +} + +scripted_trigger coronation_events_6123_crucial_vassal_trigger = { + is_powerful_vassal_of = scope:host + OR = { + is_diarch_of_target = scope:host + is_councillor_of = scope:host + legitimacy_level >= 5 + prestige_level >= 4 + } +} + +scripted_trigger coronation_events_6123_significant_vassal_trigger = { + OR = { + is_powerful_vassal_of = scope:host + is_diarch_of_target = scope:host + is_councillor_of = scope:host + legitimacy_level >= 4 + prestige_level >= 3 + } +} + +scripted_trigger coronation_events_6123_vengeful_supporter_trigger = { + is_ai = yes + NOR = { + has_relation_nemesis = root + has_trait = forgiving + } + OR = { + is_councillor_of = scope:host + is_close_family_of = scope:host + highest_held_title_tier >= tier_county + } + OR = { + opinion = { + target = scope:host + value >= 80 + } + ai_vengefulness > low_positive_ai_value + ai_honor > low_positive_ai_value + opinion = { + target = root + value < -40 + } + } +} + +#Summary of approvals for guests +coronation_events.6123 = { + type = activity_event + title = coronation_events.6123.t + desc = { + desc = coronation_events.6123.desc_intro + #Clergy response + first_valid = { + triggered_desc = { + trigger = { + scope:host = { coronation_clergy_approval_value < -1 } + } + desc = coronation_events.6123.desc_low_clergy + } + triggered_desc = { + trigger = { + scope:host = { coronation_clergy_approval_value >= 1 } + } + desc = coronation_events.6123.desc_high_clergy + } + desc = coronation_events.6123.desc_mid_clergy + } + desc = coronation_events.6123.desc_then + triggered_desc = { + trigger = { + scope:location.county.holder = { + NOT = { top_liege = scope:host } + } + } + desc = coronation_events.6123.desc_pop_foreign + } + #Popular approval response + first_valid = { + triggered_desc = { + trigger = { + scope:host = { coronation_popular_approval_value < -1 } + } + desc = coronation_events.6123.desc_low_populace + } + triggered_desc = { + trigger = { + scope:host = { coronation_popular_approval_value >= 1 } + } + desc = coronation_events.6123.desc_high_populace + } + desc = coronation_events.6123.desc_mid_populace + } + #Are the nobles compliant? + first_valid = { + triggered_desc = { + trigger = { + scope:host = { coronation_vassals_approval_value < -1 } + } + desc = coronation_events.6123.desc_low_vassals + } + triggered_desc = { + trigger = { + scope:host = { coronation_vassals_approval_value >= 1 } + } + desc = coronation_events.6123.desc_high_vassals + } + desc = coronation_events.6123.desc_mid_vassals + } + #Are the nobles compliant? + first_valid = { + triggered_desc = { + trigger = { + root = { + is_vassal_of = scope:host + } + } + desc = coronation_events.6123.desc_end_vassal + } + desc = coronation_events.6123.desc_end_spectator + } + } + left_portrait = { + character = scope:vassal + triggered_animation = { + trigger = { + trigger_if = { + limit = { + scope:vassal = { + this = root + } + } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = disloyal + is_a_faction_member = yes + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = scope:vassal + } + } + } + NOR = { + has_trait = shy + has_trait = humble + has_trait = calm + has_activity_intent = coronation_offer_support + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = scope:vassal + } + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + trigger_else = { + scope:host = { coronation_vassals_approval_value < -1 } + } + } + animation = anger + } + triggered_animation = { + trigger = { + trigger_if = { + limit = { + scope:vassal = { + this = root + } + } + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = loyal + has_trait = craven + has_trait = humble + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = scope:vassal + } + } + } + NOR = { + has_trait = arrogant + has_trait = brave + has_trait = fickle + has_activity_intent = coronation_disrupt_loyalists + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = scope:vassal + } + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + trigger_else = { + scope:host = { coronation_vassals_approval_value < -1 } + } + } + animation = throne_room_bow_3 + } + animation = throne_room_bow_2 + camera = camera_event_very_left + } + center_portrait = { + character = scope:host + triggered_animation = { + trigger = { + scope:host = { + coronation_clergy_approval_value < -1 + coronation_vassals_approval_value < -1 + } + } + animation = worry + } + animation = wedding_groom_right + } + right_portrait = { + character = scope:priest + triggered_animation = { + trigger = { + scope:host = { coronation_clergy_approval_value < -1 } + } + animation = eyeroll + } + triggered_animation = { + trigger = { + scope:host = { coronation_clergy_approval_value >= 1 } + } + animation = admiration + } + animation = chaplain + camera = camera_event_very_right + } + lower_left_portrait = scope:major_supporter_1 + lower_center_portrait = scope:major_supporter_2 + lower_right_portrait = scope:major_supporter_3 + override_background = { + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + + theme = coronation_activity + cooldown = { days = 20 } + on_trigger_fail = { + #artifact blessing + trigger_event = { + id = coronation_events.6110 + days = 3 + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + involved_activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + scope:host = { + show_as_tooltip = { + coronation_ceremony_piety_effect = yes + coronation_ceremony_legitimacy_effect = yes + coronation_ceremony_prestige_effect = yes + } + save_scope_as = bg_override_char + } + #Save a vassal + #Prefer root if they are a vassal + if = { + limit = { + is_vassal_of = scope:host + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal + } + #Host is liked, choose supporters + if = { + limit = { + NOT = { + exists = scope:vassal + } + coronation_vassals_approval_value >= -1 + } + scope:activity = { + ordered_guest_subset = { + name = supporter + order_by = max_military_strength + limit = { + is_vassal_of = scope:host + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal + } + } + } + #Host is disliked, choose detractors + else = { + scope:activity = { + ordered_guest_subset = { + name = detractor + order_by = max_military_strength + limit = { + is_vassal_of = scope:host + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal + } + } + } + #Random vassal fallbacks + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + is_vassal_of = scope:host + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + } + } + save_scope_as = vassal + } + } + } + #Oops no vassals... grab capital county barons + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:host.capital_county = { + random_county_province = { + limit = { + barony = { + exists = holder + NOT = { + holder = scope:host + } + holder = { + is_vassal_of = scope:host + basic_is_available_ai = yes + } + } + OR = { + has_holding_type = castle_holding + has_holding_type = tribal_holding + has_holding_type = nomad_holding + } + } + barony.holder = { + save_scope_as = vassal + } + } + } + } + #Grab any baron??? + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:host = { + random_held_title = { + limit = { + tier = tier_county + any_county_province = { + barony = { + exists = holder + NOT = { + holder = scope:host + } + holder = { + is_vassal_of = scope:host + basic_is_available_ai = yes + } + } + OR = { + has_holding_type = castle_holding + has_holding_type = tribal_holding + has_holding_type = nomad_holding + } + } + } + random_county_province = { + limit = { + barony = { + exists = holder + NOT = { + holder = scope:host + } + holder = { + is_vassal_of = scope:host + basic_is_available_ai = yes + } + } + OR = { + has_holding_type = castle_holding + has_holding_type = tribal_holding + has_holding_type = nomad_holding + } + } + barony.holder = { + save_scope_as = vassal + } + } + } + } + } + #Grab non-attending vassal + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:host = { + random_vassal = { + limit = { + basic_is_available_ai = yes + NOR = { + is_at_war_with = scope:host + government_has_flag = government_is_theocracy + government_has_flag = government_is_herder + this = root + } + age > 5 + } + save_scope_as = vassal + } + } + } + #Just going to go with a courtier "vassal", out of options... + if = { + limit = { + NOT = { + exists = scope:vassal + } + } + scope:host = { + random_knight = { + limit = { + basic_is_available_ai = yes + NOT = { + is_consort_of = scope:host + } + } + save_scope_as = vassal + } + } + } + #Save a priest to use in event + #Save holy men + if = { + limit = { + coronation_living_officiator_trigger = yes + } + scope:activity.var:officiator = { + save_scope_as = priest + } + } + if = { + limit = { + NOT = { + exists = scope:priest + } + 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 + } + } + if = { + limit = { + NOT = { + exists = scope:priest + } + } + scope:activity = { + ordered_attending_character = { + order_by = max_military_strength + limit = { + government_has_flag = government_is_theocracy + } + save_scope_as = priest + } + } + } + if = { + limit = { + NOT = { + exists = scope:priest + } + } + create_character = { + template = priest_character_template + location = scope:host.location + culture = scope:host.location.culture + faith = scope:host.faith + save_scope_as = priest + } + scope:priest = { + add_character_flag = oather_1_destroy + } + } + #Save major supporters that might become rivals of detractor + if = { + limit = { + has_activity_intent = coronation_disrupt_loyalists + coronation_events_6123_crucial_vassal_trigger = yes + } + scope:activity = { + ordered_in_list = { + variable = major_supporter + order_by = max_military_strength + limit = { + coronation_events_6123_vengeful_supporter_trigger = yes + } + save_scope_as = major_supporter_1 + } + ordered_in_list = { + variable = major_supporter + order_by = max_military_strength + limit = { + exists = scope:major_supporter_1 + this != scope:major_supporter_1 + coronation_events_6123_vengeful_supporter_trigger = yes + } + save_scope_as = major_supporter_2 + } + ordered_in_list = { + variable = major_supporter + order_by = max_military_strength + limit = { + exists = scope:major_supporter_1 + exists = scope:major_supporter_2 + this != scope:major_supporter_1 + this != scope:major_supporter_2 + coronation_events_6123_vengeful_supporter_trigger = yes + } + save_scope_as = major_supporter_3 + } + } + } + } + #WOO! I AM SO INTO YOU, MY LIEGE + option = { + trigger = { + is_vassal_of = scope:host + highest_held_title_tier > tier_barony + } + name = coronation_events.6123.a + flavor = coronation_events.6123.a_flavor + + if = { + limit = { + is_ai = no + } + scope:host = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6123_vassal_feted_you + left_icon = root + #Increase magnificence (players only) + #Host gains legitimacy and prestige (players only) + if = { + limit = { + root = { + coronation_events_6123_crucial_vassal_trigger = yes + } + } + custom_tooltip = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_major + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_offer_support } + } + add_legitimacy = minor_legitimacy_gain + } + + if = { + limit = { + government_allows = administrative + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + add_stress = minor_stress_impact_loss + } + else_if = { + limit = { + root = { + coronation_events_6123_significant_vassal_trigger = yes + } + } + 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 = { + root = { has_activity_intent = coronation_offer_support } + } + add_legitimacy = miniscule_legitimacy_gain + } + if = { + limit = { + government_allows = administrative + } + change_influence = miniscule_influence_gain + } + else = { + add_prestige = miniscule_prestige_gain + } + add_stress = miniscule_stress_impact_loss + } + else = { + 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 = { + root = { has_activity_intent = coronation_offer_support } + } + add_legitimacy = { + value = miniscule_legitimacy_gain + multiply = 0.5 + } + } + if = { + limit = { + government_allows = administrative + } + change_influence = { + value = miniscule_influence_gain + multiply = 0.5 + } + } + else = { + add_prestige = { + value = miniscule_prestige_gain + multiply = 0.5 + } + } + } + } + } + } + #Major AI can fuck with magnificence a bit + else = { + if = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + if = { + limit = { + has_activity_intent = coronation_offer_support + } + 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 + } + } + else = { + 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 + } + } + } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_supporter_pledge_leader_log + character = root + score = 50 + show_in_conclusion = yes + #Host and supporters lose opinion + #Detractors gain opinion + #Host and supporters gain opinion + #Detractors lose opinion + root = { + if = { + limit = { + has_activity_intent = coronation_offer_support + } + #Bigger opinion gain if you're sticking your neck out for supporters + if = { + limit = { + scope:activity = { + 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 + } + } + add_opinion = { + target = root + modifier = fellow_supporter_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 + } + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 25 + } + } + } + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + 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 = { + 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 + } + } + add_opinion = { + target = root + modifier = fellow_supporter_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 + } + } + add_opinion = { + target = root + modifier = fellow_supporter_opinion + opinion = 15 + } + } + } + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = rival_supporter_opinion + opinion = -30 + } + } + } + } + } + } + } + if = { + limit = { + has_activity_intent = coronation_offer_support + } + custom_tooltip = improved_because_intent_tt + } + + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:host + multiplier = 1 + } + modifier = { + add = 50 + has_trait = loyal + } + modifier = { + add = 100 + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + modifier = { + add = 50 + has_dread_level_towards = { + target = scope:host + level >= 2 + } + } + modifier = { + add = -50 + is_powerful_vassal = no + } + modifier = { + add = 100 + has_activity_intent = coronation_offer_support + } + modifier = { + add = 100 + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + modifier = { + factor = 0 + OR = { + has_activity_intent = coronation_disrupt_loyalists + NOR = { + is_in_guest_subset = { name = supporter } + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + } + } + } + #I am going to really make this suck for my liege + option = { + trigger = { + is_vassal_of = scope:host + highest_held_title_tier > tier_barony + } + name = coronation_events.6123.b + flavor = coronation_events.6123.b_flavor + + if = { + limit = { + is_ai = no + } + scope:host = { + #message just for multiplayer coronations + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6123_vassal_scorned_you + left_icon = root + #decrease magnificence (players only) + #Host loses legitimacy and prestige (players only) + if = { + limit = { + root = { + coronation_events_6123_crucial_vassal_trigger = yes + } + } + custom_tooltip = coronation_tt_negative_major + scope:activity = { activity_special_type_progression_negative_major = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative_major + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_disrupt_loyalists } + } + add_legitimacy = minor_legitimacy_loss + #Root gets some currency in exchange for rivalries + if = { + limit = { + exists = scope:major_supporter_1 + root = { + government_allows = administrative + } + } + change_influence = major_influence_gain + } + else_if = { + limit = { + exists = scope:major_supporter_1 + } + root = { + add_prestige = major_prestige_gain + } + } + } + + if = { + limit = { + government_allows = administrative + } + change_influence = minor_influence_loss + } + else = { + add_prestige = minor_prestige_loss + } + add_stress = minor_stress_impact_gain + } + else_if = { + limit = { + root = { + coronation_events_6123_significant_vassal_trigger = yes + } + } + 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 = { + root = { has_activity_intent = coronation_disrupt_loyalists } + } + add_legitimacy = miniscule_legitimacy_loss + } + if = { + limit = { + government_allows = administrative + } + change_influence = miniscule_influence_loss + } + else = { + add_prestige = miniscule_prestige_loss + } + add_stress = miniscule_stress_impact_gain + } + else = { + custom_tooltip = coronation_tt_negative_tiny + scope:activity = { activity_special_type_progression_negative_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative_tiny + CHAR = root + } + if = { + limit = { + root = { has_activity_intent = coronation_disrupt_loyalists } + } + add_legitimacy = { + value = miniscule_legitimacy_loss + multiply = 0.5 + } + } + if = { + limit = { + government_allows = administrative + } + change_influence = { + value = miniscule_influence_loss + multiply = 0.5 + } + } + else = { + add_prestige = { + value = miniscule_prestige_loss + multiply = 0.5 + } + } + } + } + } + } + #Major AI can fuck with magnificence a bit + else = { + if = { + limit = { + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + if = { + limit = { + has_activity_intent = coronation_disrupt_loyalists + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + else = { + custom_tooltip = coronation_tt_negative_tiny + scope:activity = { activity_special_type_progression_negative_tiny = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative_tiny + CHAR = root + } + } + } + } + scope:activity = { + add_activity_log_entry = { + key = coronation_detractor_pledge_insult_log + character = root + score = 50 + show_in_conclusion = no + #Host and supporters lose opinion + #Detractors gain opinion + root = { + if = { + limit = { + has_activity_intent = coronation_disrupt_loyalists + } + if = { + limit = { + coronation_events_6123_crucial_vassal_trigger = yes + } + if = { + limit = { + NOT = { + has_relation_nemesis = scope:host + } + #Host is AI or both chars are players + OR = { + scope:host = { + is_ai = yes + } + AND = { + is_ai = no + scope:host = { + is_ai = no + } + } + } + } + progress_towards_rival_effect = { + REASON = rival_coronation_pledge_scandal + CHARACTER = scope:host + OPINION = 0 + } + } + if = { + limit = { + exists = scope:major_supporter_1 + } + progress_towards_rival_effect = { + REASON = rival_coronation_pledge_scandal + CHARACTER = scope:major_supporter_1 + OPINION = 0 + } + } + if = { + limit = { + exists = scope:major_supporter_2 + } + progress_towards_rival_effect = { + REASON = rival_coronation_pledge_scandal + CHARACTER = scope:major_supporter_2 + OPINION = 0 + } + } + if = { + limit = { + exists = scope:major_supporter_3 + } + progress_towards_rival_effect = { + REASON = rival_coronation_pledge_scandal + CHARACTER = scope:major_supporter_3 + OPINION = 0 + } + } + } + scope:host = { + add_opinion = { + target = root + modifier = contempt_opinion + opinion = -30 + } + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + NOT = { + this = root + } + } + 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 + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 45 + } + } + } + } + else = { + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 35 + } + } + } + } + } + else = { + scope:host = { + add_opinion = { + target = root + modifier = contempt_opinion + opinion = -25 + } + } + scope:activity = { + every_guest_subset = { + name = supporter + custom = every_supporter_activity + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = rival_detractor_opinion + 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 + } + } + scope:activity = { + every_guest_subset = { + name = detractor + custom = every_detractor_activity + limit = { + NOT = { + this = root + } + } + 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 + } + } + add_opinion = { + target = root + modifier = fellow_detractor_opinion + opinion = 20 + } + } + } + } + } + } + } + } + if = { + limit = { + has_activity_intent = coronation_disrupt_loyalists + } + custom_tooltip = improved_because_intent_tt + } + if = { + limit = { + is_ai = yes + } + coronation_move_towards_detractor_effect = { CHARACTER = root } + } + + stress_impact = { + humble = medium_stress_impact_gain + craven = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + shy = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:host + multiplier = -1 + } + modifier = { + add = 50 + has_trait = disloyal + } + + modifier = { + add = 100 + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + + modifier = { + add = 50 + any_claim = { + holder ?= scope:host + } + } + modifier = { + add = 100 + is_a_faction_member = yes + } + modifier = { + add = 100 + has_activity_intent = coronation_disrupt_loyalists + } + modifier = { + add = -50 + is_powerful_vassal = no + } + modifier = { + add = 100 + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = craven + has_trait = forgiving + has_dread_level_towards = { + target = scope:host + level >= 1 + } + has_activity_intent = coronation_offer_support + NOR = { + is_in_guest_subset = { name = detractor } + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + } + } + } + + #Whatever, the ceremony happens + option = { + #Triggered names based on attitude towards host + name = { + text = { + first_valid = { + #resentful vassal + triggered_desc = { + trigger = { + is_vassal_of = scope:host + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = disloyal + has_trait = arrogant + has_trait = ambitious + is_a_faction_member = yes + } + NOR = { + has_trait = shy + has_trait = humble + has_trait = content + has_trait = loyal + has_activity_intent = coronation_offer_support + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_vassal_resents + } + #happy vassal + triggered_desc = { + trigger = { + is_vassal_of = scope:host + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = loyal + has_trait = humble + has_trait = compassionate + has_trait = just + } + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = sadistic + has_trait = callous + has_activity_intent = coronation_disrupt_loyalists + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_vassal_pleased + } + #Neutral vassal + triggered_desc = { + trigger = { + is_vassal_of = scope:host + } + desc = coronation_events.6123.c_vassal_neutral + } + #Like that vassals disrespect king + triggered_desc = { + trigger = { + scope:host = { + coronation_vassals_approval_value < -1 + } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = disloyal + has_trait = arbitrary + has_trait = fickle + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + NOR = { + has_activity_intent = coronation_offer_support + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = just + } + } + desc = coronation_events.6123.c_likes_disrespect + } + #Angered by disrespectful vassals + triggered_desc = { + trigger = { + scope:host = { + coronation_vassals_approval_value < -1 + } + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = loyal + has_trait = just + has_trait = humble + has_trait = content + has_trait = trusting + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + NOR = { + has_activity_intent = coronation_disrupt_loyalists + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_dislikes_disrespect + } + #Angered by loyal vassals + triggered_desc = { + trigger = { + scope:host = { + coronation_vassals_approval_value >= 1 + } + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = disloyal + has_trait = arbitrary + has_trait = fickle + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + NOR = { + has_activity_intent = coronation_offer_support + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = just + } + } + desc = coronation_events.6123.c_dislikes_loyalty + } + #Like loyal vassals + triggered_desc = { + trigger = { + scope:host = { + coronation_vassals_approval_value >= 1 + } + OR = { + has_activity_intent = coronation_offer_support + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_trait = loyal + has_trait = just + has_trait = humble + has_trait = content + has_trait = trusting + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + NOR = { + has_activity_intent = coronation_disrupt_loyalists + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_likes_loyalty + } + #Dislikes king + triggered_desc = { + trigger = { + OR = { + has_activity_intent = coronation_disrupt_loyalists + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + scope:activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + NOR = { + has_activity_intent = coronation_offer_support + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6123.c_dislikes_host + } + #Neutral + desc = coronation_events.6123.c + } + } + } + #Stress when you are angry vassal + if = { + limit = { + is_vassal_of = scope:host + has_relation_rival = scope:host + } + stress_impact = { + base = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + } + #Stress when you are happy vassal + else_if = { + limit = { + is_vassal_of = scope:host + } + stress_impact = { + humble = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + } + } + #Generic vassal stress + else = { + limit = { + is_vassal_of = scope:host + } + stress_impact = { + arrogant = miniscule_stress_impact_gain + } + } + ai_chance = { + base = 100 + } + } + + after = { + # For MP + coronation_ready_effect = yes + if = { + limit = { + scope:priest = { + has_character_flag = oather_1_destroy + } + } + scope:priest = { + silent_disappearance_effect = yes + } + } + #Anointment event + trigger_event = { + id = coronation_events.6130 + days = 3 + } + } +} + +scripted_trigger coronation_events_6130_dharmic_trigger = { + faith.religion = { + AND = { + is_in_family = rf_eastern + NOT = { + this = religion:zoroastrianism_religion + } + } + } + root.involved_activity.activity_location = { + OR = { + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_burma + } + } +} +#Anointment, perhaps by the HoF in an actual anointment +coronation_events.6130 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + desc = coronation_events.6130.t_anointment + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + desc = coronation_events.6130.t_dharmic + } + desc = coronation_events.6130.t + } + } + desc = { + #Intro line + desc = coronation_events.6130.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + this = scope:host + scope:host.faith.religion = { + this = religion:christianity_religion + } + } + desc = coronation_events.6130.papal_intro_host + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:host.faith.religion = { + this = religion:christianity_religion + } + } + desc = coronation_events.6130.papal_intro_guest + } + triggered_desc = { + trigger = { + this = scope:host + scope:host.faith.religion = { + OR = { + this = religion:christianity_religion + this = religion:judaism_religion + } + } + } + desc = coronation_events.6130.abrahamic_intro_host + } + triggered_desc = { + trigger = { + this = scope:host + scope:host.faith.religion = { + OR = { + this = religion:christianity_religion + this = religion:judaism_religion + } + } + } + desc = coronation_events.6130.abrahamic_intro_guest + } + triggered_desc = { + trigger = { + this = scope:host + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + desc = coronation_events.6130.dharmic_intro_host + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + desc = coronation_events.6130.dharmic_intro_guest + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.6130.generic_intro_host + } + desc = coronation_events.6130.generic_intro_guest + } + #Little description of priest, whether hof or just some priest + #Dharmic also work for generic here + first_valid = { + triggered_desc = { + trigger = { + scope:anointer = { + this = faith.religious_head + opinion = { + target = scope:host + value < 0 + } + } + } + desc = coronation_events.6130.faith_head_disapproves + } + triggered_desc = { + trigger = { + scope:anointer = { + this = faith.religious_head + opinion = { + target = scope:host + value >= 50 + } + is_male = yes + } + } + desc = coronation_events.6130.faith_head_likes + } + triggered_desc = { + trigger = { + scope:anointer = { + this = faith.religious_head + } + } + desc = coronation_events.6130.faith_head + } + triggered_desc = { + trigger = { + OR = { + 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 + } + is_landed = yes + } + } + desc = coronation_events.6130.christian_non_hof_non_cc + } + triggered_desc = { + trigger = { + OR = { + scope:host.faith.religion = religion:eastern_orthodox_religion scope:host.faith.religion = religion:catholic_religion scope:host.faith.religion = religion:protestant_religion + } + } + desc = coronation_events.6130.christian_non_hof + } + desc = coronation_events.6130.anointer_fallback + } + #Anointing with oil or water from sacred rivers? + #Abrahamic also work for generic here + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + this = scope:host + OR = { + has_trait = cynical + has_trait = brave + has_trait = callous + has_trait = sadistic + has_trait = calm + } + NOR = { + has_trait = zealous + has_trait = craven + has_trait = shy + } + } + desc = coronation_events.6130.anointing_abrahamic_host_disrespectful + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + this = scope:host + } + desc = coronation_events.6130.anointing_abrahamic_host + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + desc = coronation_events.6130.anointing_abrahamic_guest + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.6130.anointing_dharmic_host + } + desc = coronation_events.6130.anointing_dharmic_guest + } + #Credit it to church or god based on zeal + #Abrahamic also work for generic here + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + this = scope:host + ai_zeal >= medium_negative_ai_value + } + desc = coronation_events.6130.ending_abrahamic_host_zealous + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + this = scope:host + } + desc = coronation_events.6130.ending_abrahamic_host_cynical + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + ai_zeal >= medium_negative_ai_value + } + desc = coronation_events.6130.ending_abrahamic_guest_zealous + } + triggered_desc = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + desc = coronation_events.6130.ending_abrahamic_guest_cynical + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.6130.ending_dharmic_host + } + desc = coronation_events.6130.ending_dharmic_guest + } + } + + center_portrait = { + character = scope:host + animation = throne_room_bow_3 + camera = camera_event_center_pointing_right + } + right_portrait = { + character = scope:anointer + triggered_animation = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + animation = toast_goblet + } + animation = wedding_priest + camera = camera_event_very_right + } + + override_background = { + trigger = { + scope:host.capital_county = title:c_byzantion + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + } + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + cooldown = { days = 20 } + + theme = coronation_activity + + trigger = { + involved_activity ?= { + activity_host = { + NAND = { + exists = faith.religious_head + this = faith.religious_head + } + } + OR = { + activity_host.faith.religion = religion:christianity_religion + activity_host.faith.religion = religion:judaism_religion + activity_host = { + coronation_events_6130_dharmic_trigger = yes + } + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + 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 + } + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + coronation_save_anointer_effect = yes + scope:host = { + save_scope_as = bg_override_char + } + #Resource adjustments only for host + if = { + limit = { + this = scope:host + } + #Reward, adjusted by fervor + scope:host = { + if = { + limit = { + faith = { + fervor >= 90 + } + } + every_vassal = { + custom = custom.every_same_faith_vassal + limit = { + faith = scope:host.faith + } + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 20 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor >= 80 + } + } + every_vassal = { + custom = custom.every_same_faith_vassal + limit = { + faith = scope:host.faith + } + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 15 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor >= 70 + } + } + every_vassal = { + custom = custom.every_same_faith_vassal + limit = { + faith = scope:host.faith + } + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 10 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor >= 60 + } + } + every_vassal = { + custom = custom.every_same_faith_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 5 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor < 30 + } + } + every_vassal = { + custom = custom.every_different_faith_vassal + limit = { + NOT = { faith = scope:host.faith } + } + add_opinion = { + target = scope:host + modifier = heathen_anointment_opinion + opinion = -5 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor < 20 + } + } + every_vassal = { + custom = custom.every_different_faith_vassal + limit = { + NOT = { faith = scope:host.faith } + } + add_opinion = { + target = scope:host + modifier = heathen_anointment_opinion + opinion = -10 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + } + else_if = { + limit = { + faith = { + fervor < 10 + } + } + every_vassal = { + custom = custom.every_different_faith_vassal + limit = { + NOT = { faith = scope:host.faith } + } + add_opinion = { + target = scope:host + modifier = heathen_anointment_opinion + opinion = -15 + } + } + #Might need to show reason tooltip + if = { + limit = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + } + #Anointment rewards if root is host + if = { + limit = { + this = root + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + #Scale rewards based on fervor + if = { + limit = { + faith = { + fervor >= 100 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 30 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 2 + } + add_piety = { + value = major_piety_gain + multiply = 2 + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + else_if = { + limit = { + faith = { + fervor >= 80 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 28 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1.8 + } + add_piety = { + value = major_piety_gain + multiply = 1.8 + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + else_if = { + limit = { + faith = { + fervor >= 60 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 26 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1.6 + } + add_piety = { + value = major_piety_gain + multiply = 1.6 + } + custom_tooltip = coronation_rewards_increased_fervor_tt + } + else_if = { + limit = { + faith = { + fervor >= 40 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 24 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1.4 + } + add_piety = { + value = major_piety_gain + multiply = 1.4 + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + else_if = { + limit = { + faith = { + fervor >= 20 + } + } + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 22 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1.2 + } + add_piety = { + value = major_piety_gain + multiply = 1.2 + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + else = { + every_vassal = { + custom = custom.every_zealot_vassal + add_opinion = { + target = scope:host + modifier = holy_anointment_opinion + opinion = 20 + } + } + add_legitimacy = { + value = medium_legitimacy_gain + multiply = 1 + } + add_piety = { + value = major_piety_gain + multiply = 1 + } + custom_tooltip = coronation_rewards_reduced_fervor_tt + } + } + } + } + } + #I am sooo ready to fight for the faith + option = { + trigger = { + this = scope:host + NOT = { + has_trait = faith_warrior + } + faith = { + fervor >= 75 + } + trigger_if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + has_focus_martial = yes + } + trigger_else = { + has_focus_martial = yes + OR = { + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + } + } + } + name = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + text = coronation_events.6130.a + } + name = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + text = coronation_events.6130.a_dharmic + } + flavor = coronation_events.6130.a.flavor + reason = lifestyle_focus + + #Kingdom tier holy war gives crusader trait + custom_tooltip = crusader_from_k_holy_war_tt + set_variable = { + name = k_holy_war_crusader + } + stress_impact = { + zealous = major_stress_impact_loss + wrathful = miniscule_stress_impact_loss + vengeful = minor_stress_impact_loss + sadistic = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + cynical = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 100 + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = vengeful + has_trait = sadistic + has_trait = brave + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + has_trait = craven + } + } + } + } + #It is now my duty to CONVERT + option = { + trigger = { + this = scope:host + trigger_if = { + limit = { + NOR = { + has_trait = zealous + has_trait = diligent + has_trait = just + has_trait = ambitious + has_trait = arrogant + has_trait = impatient + } + } + learning >= decent_skill_rating + } + trigger_else = { + OR = { + has_trait = zealous + has_trait = diligent + has_trait = just + has_trait = ambitious + has_trait = arrogant + has_trait = impatient + } + } + } + name = coronation_events.6130.b + + + #conversion interactions acceptance bonus + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + custom_tooltip = conversion_acceptance_bonus_tt + add_character_flag = conversion_acceptance_bonus + } + else = { + 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 + cynical = major_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + add = 100 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = cynical + has_trait = content + } + } + } + } + #Express gratitude to the priest + option = { + trigger = { + this = scope:host + OR = { + has_trait = gregarious + has_trait = zealous + has_trait = compassionate + has_trait = humble + has_trait = generous + has_trait = trusting + } + #Not a temp character + NOT = { + scope:anointer = { + has_character_flag = anointer_destroy_me + } + } + } + name = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + text = coronation_events.6130.c + } + name = { + trigger = { + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + text = coronation_events.6130.c_dharmic + } + flavor = coronation_events.6130.c.flavor + scope:anointer = { + add_opinion = { + target = scope:host + modifier = pleased_opinion + opinion = 20 + } + hidden_effect = { + reverse_add_opinion = { + target = scope:host + modifier = respect_opinion + opinion = 25 + } + } + if = { + limit = { + involved_activity ?= scope:activity + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:anointer } + } + } + stress_impact = { + zealous = medium_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = humble + has_trait = zealous + } + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = cynical + has_trait = arrogant + } + } + } + } + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:host + ai_zeal >= low_positive_ai_value + scope:host = { + coronation_events_6130_dharmic_trigger = no + } + } + desc = coronation_events.6130.d.faithful_host + } + triggered_desc = { + trigger = { + this = scope:host + ai_zeal >= low_positive_ai_value + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + } + desc = coronation_events.6130.d.faithful_host_dharmic + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = coronation_events.6130.d.cynical_host + } + triggered_desc = { + trigger = { + ai_zeal >= low_positive_ai_value + scope:host = { + coronation_events_6130_dharmic_trigger = yes + } + opinion = { + target = scope:host + value > 0 + } + } + desc = coronation_events.6130.d.faithful_guest_dharmic + } + triggered_desc = { + trigger = { + ai_zeal >= low_positive_ai_value + opinion = { + target = scope:host + value > 0 + } + } + desc = coronation_events.6130.d.faithful_guest + } + desc = coronation_events.6130.d.cynical_guest + } + } + } + #Some piety for viewers + if = { + limit = { + faith = scope:host.faith + NOT = { this = scope:host } + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + add_piety = miniscule_piety_gain + } + #Faith gains fervor if this is anointment + scope:host = { + if = { + limit = { + this = root + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + add_piety = medium_piety_gain + faith = { + change_fervor = { + value = 4 + desc = fervor_gain_anointment + } + } + add_character_modifier = { + modifier = coronation_anointed_imperial_modifier + years = 10 + } + } + else_if = { + limit = { + this = root + } + add_piety = minor_piety_gain + add_character_modifier = { + modifier = coronation_anointed_modifier + years = 10 + } + } + #To show audience + else_if = { + limit = { + NOT = { this = root } + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + show_as_tooltip = { + add_piety = medium_piety_gain + add_character_modifier = { + modifier = coronation_anointed_modifier + years = 10 + } + faith = { + change_fervor = { + value = 4 + desc = fervor_gain_anointment + } + } + } + } + else_if = { + limit = { + NOT = { this = root } + } + show_as_tooltip = { + add_piety = medium_piety_gain + add_character_modifier = { + modifier = coronation_anointed_modifier + years = 10 + } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + after = { + # For MP + coronation_ready_effect = yes + + if = { + limit = { + coronation_being_crowned_trigger = yes + } + #crowning + trigger_event = { + id = coronation_events.6100 + days = 3 + } + } + else_if = { + limit = { + coronation_self_crowning_trigger = yes + } + #self-crowning + trigger_event = { + id = coronation_events.6101 + days = 3 + } + } + else = { + #enthroning + trigger_event = { + id = coronation_events.6102 + days = 3 + } + } + } +} + +scripted_effect coronation_events_6140_spouse_effects = { + add_prestige = coronation_spouse_prestige_value + if = { + limit = { + government_allows = administrative + top_liege.primary_title = scope:host.top_liege.primary_title + } + change_influence = coronation_spouse_influence_value + } + if = { + limit = { + NOT = { + this = root + } + is_ai = yes + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = greedy + has_trait = diligent + has_trait = impatient + has_trait = gregarious + } + NOR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + add_stress = coronation_spouse_stress_value + } + if = { + limit = { + OR = { + scope:activity.var:activity_special_type_progression >= 25 + AND = { + scope:activity.var:activity_special_type_progression < 25 + scope:host.highest_held_title_tier >= tier_empire + } + } + } + scope:activity = { + every_attending_character = { + custom = custom.every_attending_character + limit = { + NOT = { + this = scope:spouse + } + } + add_opinion = { + target = scope:spouse + modifier = crowned_consort_opinion + opinion = coronation_spouse_opinion_value + } + } + } + } + custom_tooltip = coronation_magnificence_spouse_effects_tt +} + +#Spouse's crowning/enthronement event +coronation_events.6140 = { + type = activity_event + title = coronation_events.6140.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = scope:spouse + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + any_consort = { + NOT = { + this = scope:spouse + } + } + } + } + desc = coronation_events.6140_desc_polygamous_spouse + } + desc = coronation_events.6140_desc_intro_spouse + } + desc = coronation_events.6140_desc_spouse + first_valid = { + triggered_desc = { + trigger = { + scope:spouse = { + NOT = { + knows_language_of_culture = scope:host.culture + } + } + scope:host = { + has_royal_court = no + } + } + desc = coronation_events.6140_desc_foreign_wife_no_court_spouse + } + triggered_desc = { + trigger = { + scope:host = { + has_royal_court = yes + } + scope:spouse = { + NOR = { + knows_court_language_of = scope:host + culture = scope:host.culture + } + } + } + desc = coronation_events.6140_desc_foreign_wife_spouse + } + triggered_desc = { + trigger = { + scope:spouse = { + OR = { + is_lowborn = yes + AND = { + dynasty ?= { + dynasty_prestige_level <= 1 + } + NOR = { + any_parent = { + highest_held_title_tier >= tier_kingdom + } + any_sibling = { + highest_held_title_tier >= tier_kingdom + } + } + learning < high_skill_rating + } + } + } + } + desc = coronation_events.6140_desc_lowly_wife_spouse + } + triggered_desc = { + trigger = { + scope:spouse = { + dynasty ?= { + dynasty_prestige_level >= 3 + } + OR = { + AND = { + dynasty ?= { + dynasty_prestige_level >= 7 + } + house ?= { + any_house_member = { + highest_held_title_tier >= tier_kingdom + } + } + } + any_parent = { + highest_held_title_tier >= tier_kingdom + } + any_sibling = { + highest_held_title_tier >= tier_kingdom + } + } + learning >= average_skill_rating + } + } + desc = coronation_events.6140_desc_regal_wife_spouse + } + desc = coronation_events.6140_desc_mid_wife_spouse + } + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_regalia_trigger = no + } + } + desc = coronation_events.6140_desc_crown_spouse + } + desc = coronation_events.6140_desc_neutral_spouse + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + any_consort = { + NOT = { + this = scope:spouse + } + } + } + } + desc = coronation_events.6140_desc_polygamous + } + desc = coronation_events.6140_desc + } + first_valid = { + triggered_desc = { + trigger = { + NOR = { + this = scope:host + this = scope:spouse + } + } + desc = coronation_events.6140_desc_guest + } + desc = coronation_events.6140_desc_host + } + first_valid = { + triggered_desc = { + trigger = { + scope:spouse = { + NOT = { + knows_language_of_culture = scope:host.culture + } + } + scope:host = { + has_royal_court = no + } + } + desc = coronation_events.6140_desc_foreign_wife_no_court + } + triggered_desc = { + trigger = { + scope:host = { + has_royal_court = yes + } + scope:spouse = { + NOR = { + knows_court_language_of = scope:host + culture = scope:host.culture + } + } + } + desc = coronation_events.6140_desc_foreign_wife + } + triggered_desc = { + trigger = { + scope:spouse = { + OR = { + is_lowborn = yes + AND = { + dynasty ?= { + dynasty_prestige_level <= 1 + } + NOR = { + any_parent = { + highest_held_title_tier >= tier_kingdom + } + any_sibling = { + highest_held_title_tier >= tier_kingdom + } + } + learning < high_skill_rating + } + } + } + } + desc = coronation_events.6140_desc_lowly_wife + } + triggered_desc = { + trigger = { + scope:spouse = { + dynasty ?= { + dynasty_prestige_level >= 3 + } + OR = { + AND = { + dynasty ?= { + dynasty_prestige_level >= 7 + } + house ?= { + any_house_member = { + highest_held_title_tier >= tier_kingdom + } + } + } + any_parent = { + highest_held_title_tier >= tier_kingdom + } + any_sibling = { + highest_held_title_tier >= tier_kingdom + } + } + learning >= average_skill_rating + } + } + desc = coronation_events.6140_desc_regal_wife + } + desc = coronation_events.6140_desc_mid_wife + } + first_valid = { + triggered_desc = { + trigger = { + scope:host = { + coronation_proper_artifact_regalia_trigger = no + } + } + desc = coronation_events.6140_desc_crown + } + desc = coronation_events.6140_desc_neutral + } + } + } + } + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + scope:host = { + OR = { + has_relation_lover = scope:spouse + has_relation_crush = scope:spouse + has_relation_soulmate = scope:spouse + } + } + } + animation = love + } + triggered_animation = { + trigger = { + scope:host = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value < -60 + } + } + } + } + animation = disapproval + } + triggered_animation = { + trigger = { + OR = { + scope:host.religion = religion:eastern_orthodox_religion + scope:host.religion = religion:catholic_religion + scope:host.religion = religion:protestant_religion + scope:spouse.religion = religion:eastern_orthodox_religion + scope:spouse.religion = religion:catholic_religion + scope:spouse.religion = religion:protestant_religion + } + } + animation = scepter + } + triggered_animation = { + trigger = { + scope:host = { + coronation_host_east_asian_trigger = yes + } + } + animation = emperor + } + triggered_animation = { + trigger = { + scope:host = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + } + } + animation = marshal + } + animation = chaplain + camera = camera_event_left_to_the_left_pointing_in + } + center_portrait = { + character = scope:spouse + triggered_animation = { + trigger = { + scope:host = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value < -60 + } + } + } + scope:spouse = { + OR = { + ai_greed > medium_positive_ai_value + ai_honor < medium_negative_ai_value + ai_compassion < medium_negative_ai_value + } + } + } + animation = manic + } + triggered_animation = { + trigger = { + scope:spouse = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:host } + ai_has_warlike_personality = yes + } + } + animation = wedding_objection_start + } + triggered_animation = { + trigger = { + OR = { + scope:host.religion = religion:eastern_orthodox_religion + scope:host.religion = religion:catholic_religion + scope:host.religion = religion:protestant_religion + scope:spouse.religion = religion:eastern_orthodox_religion + scope:spouse.religion = religion:catholic_religion + scope:spouse.religion = religion:protestant_religion + } + ai_zeal < medium_positive_ai_value + } + animation = acknowledging + } + animation = prayer + camera = camera_event_center + } + right_portrait = { + character = scope:anointer + triggered_animation = { + trigger = { + scope:anointer.faith = { + has_doctrine_parameter = unreformed + } + } + animation = throne_room_bow_2 + } + animation = chancellor + camera = camera_event_very_right + } + + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + coronation_being_crowned_trigger = no + coronation_self_crowning_trigger = no + } + reference = throne_room + } + override_background = { + trigger = { + scope:host.capital_county = title:c_byzantion + OR = { + coronation_being_crowned_trigger = yes + coronation_self_crowning_trigger = yes + } + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:host.capital_county = title:c_byzantion + } + OR = { + coronation_being_crowned_trigger = yes + coronation_self_crowning_trigger = yes + } + } + reference = temple + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression >= 75 + } + reference = legend_glow + } + override_effect_2d = { + trigger = { + scope:activity.var:activity_special_type_progression < 25 + } + reference = flies + } + cooldown = { days = 20 } + + theme = coronation_activity + + trigger = { + exists = involved_activity.activity_host.primary_spouse + involved_activity = { + any_attending_character = { + this = involved_activity.activity_host.primary_spouse + NOR = { + has_contagious_deadly_disease_trigger = yes + has_trait = incapable + has_trait = wounded_3 + is_imprisoned = yes + } + } + } + } + on_trigger_fail = { + #Ceremony is over + if = { + limit = { + this = involved_activity.activity_host + } + # Oath Events + trigger_event = { + id = coronation_events.0100 + days = 2 + } + } + } + immediate = { + # For MP + coronation_busy_effect = yes + + scope:activity = { + activity_host = { save_scope_as = host } + activity_location = { save_scope_as = location } + } + scope:host = { + save_scope_as = bg_override_char + primary_spouse = { + save_scope_as = spouse + } + } + #Save an anointer if you don't have one + if = { + limit = { + OR = { + NOT = { exists = scope:anointer } + scope:anointer = { + is_alive = no + } + scope:anointer = { + is_imprisoned = yes + } + } + } + scope:host = { coronation_save_anointer_effect = yes } + } + if = { + limit = { + OR = { + AND = { + this = scope:host + scope:spouse = { + is_ai = yes + } + } + AND = { + this = scope:spouse + is_ai = no + } + } + } + scope:spouse = { + coronation_events_6140_spouse_effects = yes + } + } + else = { + scope:spouse = { + show_as_tooltip = { coronation_events_6140_spouse_effects = yes } + } + } + scope:spouse = { + assign_quirk_effect = yes + } + assign_quirk_effect = yes + } + #Your spouse converts + option = { + trigger = { + this = scope:host + scope:spouse = { + NOT = { + faith = root.faith + } + is_ai = yes + } + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + var:activity_special_type_progression > 50 + } + } + name = coronation_events.6140.aa + flavor = coronation_events.6140.aa.flavor + + duel = { + skill = diplomacy + target = scope:spouse + #You convince her + 55 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = 20 + scope:spouse = { + opinion = { + target = scope:host + value >= 25 + } + } + } + modifier = { + add = 20 + scope:spouse = { + opinion = { + target = scope:host + value >= 50 + } + } + } + modifier = { + add = 25 + scope:spouse = { + opinion = { + target = scope:host + value >= 75 + } + } + } + modifier = { + add = 30 + scope:spouse = { + opinion = { + target = scope:host + value >= 90 + } + } + } + modifier = { + add = 30 + scope:activity.var:activity_special_type_progression >= 75 + } + modifier = { + add = 20 + scope:spouse = { + OR = { + has_trait = trusting + has_trait = fickle + } + } + } + + desc = coronation_events.6140.aa_success + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6140.aa_success + right_icon = scope:spouse + + scope:spouse = { + set_character_faith = scope:host.faith + } + } + } + #She is not convinced + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 20 + scope:spouse = { + opinion = { + target = scope:host + value <= -25 + } + } + } + modifier = { + add = 20 + scope:spouse = { + opinion = { + target = scope:host + value <= -50 + } + } + } + modifier = { + add = 30 + scope:spouse = { + opinion = { + target = scope:host + value <= -75 + } + } + } + modifier = { + add = 50 + scope:spouse = { + opinion = { + target = scope:host + value <= -90 + } + } + } + modifier = { + add = 100 + scope:spouse = { + OR = { + has_trait = zealous + has_trait = stubborn + } + } + } + modifier = { + add = 20 + scope:spouse.faith = { + faith_hostility_level = { + target = scope:host.faith + value >= faith_hostile_level + } + } + } + modifier = { + add = 20 + scope:spouse.faith = { + faith_hostility_level = { + target = scope:host.faith + value >= faith_evil_level + } + } + } + modifier = { + add = 50 + scope:spouse = { + highest_held_title_tier >= scope:host.highest_held_title_tier + } + } + modifier = { + add = 50 + scope:spouse = { + highest_held_title_tier >= tier_county + } + } + modifier = { + add = 50 + scope:spouse = { + highest_held_title_tier >= tier_county + NOT = { + is_vassal_of = scope:host + } + } + } + desc = coronation_events.6140.aa_fail + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6140.aa_fail + right_icon = scope:spouse + + scope:spouse = { + add_opinion = { + modifier = annoyed_opinion + target = scope:host + opinion = -15 + } + + } + } + } + } + custom_tooltip = anointment_available_because_magnificence_tt + stress_impact = { + zealous = major_stress_impact_loss + cynical = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 100 + scope:spouse = { + highest_held_title_tier < tier_county + } + } + modifier = { + add = 300 + has_trait = zealous + } + modifier = { + diplomacy > high_skill_rating + add = 100 + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + scope:spouse.highest_held_title_tier > root.highest_held_title_tier + diplomacy <= low_skill_rating + } + } + } + } + #I must get rid of this person... + option = { + trigger = { + this = scope:host + NOR = { + has_relation_soulmate = scope:spouse + has_relation_best_friend = scope:spouse + } + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse } + opinion = { + target = scope:spouse + value >= 90 + } + } + } + desc = coronation_events.6140.a_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.a_dislike + } + desc = coronation_events.6140.a + } + } + } + #Rivalry progress + if = { + limit = { + OR = { + scope:spouse = { + is_ai = yes + } + AND = { + is_ai = no + scope:spouse = { + is_ai = no + } + } + } + } + progress_towards_rival_effect = { + REASON = rival_despised_mutual_coronation + CHARACTER = scope:spouse + OPINION = 0 + } + } + #Bonus towards hostile schemes against spouse + custom_tooltip = coronation_spouse_hostile_scheme_bonus_tt + set_variable = { + name = spouse_hostile_scheme_bonus + value = scope:spouse + } + + hidden_effect = { + add_opinion = { + target = scope:spouse + modifier = hate_opinion + opinion = -40 + } + } + if = { + limit = { + OR = { + has_relation_friend = scope:spouse + has_relation_lover = scope:spouse + } + } + stress_impact = { + base = medium_stress_impact_gain + callous = medium_stress_impact_loss + 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 + honest = minor_stress_impact_gain + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + } + else = { + stress_impact = { + callous = medium_stress_impact_loss + 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 + honest = minor_stress_impact_gain + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + } + ai_chance = { + base = -10 + ai_value_modifier = { + ai_compassion = -0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:spouse + multiplier = -1 + } + modifier = { + add = 500 + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + } + modifier = { + add = -200 + scope:spouse = { + OR = { + house ?= { + any_house_member = { + is_allied_to = scope:host + } + } + any_close_family_member = { + is_allied_to = scope:host + } + } + + } + } + modifier = { + add = 10 + scope:spouse = { + is_lowborn = yes + } + } + modifier = { + add = 10 + scope:spouse = { + fertility <= low_fertility + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = honest + has_trait = humble + 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 = { + this = scope:spouse + } + name = coronation_events.6140.c + flavor = coronation_events.6140.c_flavor + if = { + limit = { + scope:activity.var:activity_special_type_progression >= 75 + scope:host.highest_held_title_tier >= tier_empire + is_ai = no + } + stress_impact = { + arrogant = massive_stress_impact_loss + ambitious = massive_stress_impact_loss + greedy = massive_stress_impact_loss + diligent = massive_stress_impact_loss + impatient = massive_stress_impact_loss + gregarious = massive_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + OR = { + scope:activity.var:activity_special_type_progression >= 75 + AND = { + scope:activity.var:activity_special_type_progression >= 50 + scope:host.highest_held_title_tier >= tier_empire + } + } + is_ai = no + } + stress_impact = { + arrogant = major_stress_impact_loss + ambitious = major_stress_impact_loss + greedy = major_stress_impact_loss + diligent = major_stress_impact_loss + impatient = major_stress_impact_loss + gregarious = major_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + OR = { + scope:activity.var:activity_special_type_progression >= 50 + AND = { + scope:activity.var:activity_special_type_progression >= 25 + scope:host.highest_held_title_tier >= tier_empire + } + } + is_ai = no + } + stress_impact = { + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + greedy = medium_stress_impact_loss + diligent = medium_stress_impact_loss + impatient = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + is_ai = no + OR = { + scope:activity.var:activity_special_type_progression >= 25 + AND = { + scope:activity.var:activity_special_type_progression < 25 + scope:host.highest_held_title_tier >= tier_empire + } + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + greedy = minor_stress_impact_loss + diligent = minor_stress_impact_loss + impatient = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + else_if = { + limit = { + is_ai = no + } + stress_impact = { + arrogant = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + } + } + #I am an observer + option = { + trigger = { + NOR = { + this = scope:spouse + this = scope:host + } + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:spouse.house + house = scope:spouse.house + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse } + } + } + desc = coronation_events.6140.d_likes_spouse + } + triggered_desc = { + trigger = { + OR = { + scope:spouse = { + any_close_family_member = { + OR = { + is_at_war_with = root + has_relation_rival = root + AND = { + is_a_faction_member = yes + is_vassal_of = root + } + AND = { + root = { + is_a_faction_member = yes + liege ?= prev + } + } + } + } + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse } + } + } + desc = coronation_events.6140.d_dislikes_spouse + } + triggered_desc = { + trigger = { + OR = { + has_activity_intent = coronation_disrupt_loyalists + is_target_in_variable_list = { + name = major_detractor + target = prev + } + AND = { + is_a_faction_member = yes + is_vassal_of = scope:host + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + } + desc = coronation_events.6140.d_dislikes_host + } + triggered_desc = { + trigger = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:host } + has_activity_intent = coronation_offer_support + is_allied_to = scope:host + } + } + desc = coronation_events.6140.d_likes_host + } + desc = coronation_events.6140.d + } + } + } + } + after = { + #Ceremony is over + if = { + limit = { + this = scope:host + } + # Oath Events + trigger_event = { + id = coronation_events.0100 + days = 2 + } + } + # For MP + coronation_ready_effect = yes + if = { + limit = { + scope:anointer = { + has_character_flag = anointer_destroy_me + } + } + scope:anointer = { + silent_disappearance_effect = yes + } + } + } +} + +scripted_trigger coronation_events_6150_neighbor_trigger = { + involved_activity ?= scope:activity + basic_is_available_ai = yes + NOT = { is_in_guest_subset = { name = detractor } } + 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 + } + current_military_strength <= root.half_current_military_strength +} + +scripted_trigger coronation_events_6150_vassal_trigger = { + basic_is_available_ai = yes + is_vassal_of = root + NOT = { is_obedient_to = root } + NOR = { + scope:advisor ?= this + is_in_guest_subset = { name = detractor } + trigger_if = { + limit = { + is_powerful_vassal_of = root + } + is_a_faction_member = yes + } + is_at_war_with = root + } + opinion = { + target = root + value >= -25 + } +} + +#RANDOM EVENTS +#Your chancellor wants to do some major politics +coronation_events.6150 = { + type = activity_event + title = coronation_events.6150.t + desc = coronation_events.6150.desc + left_portrait = { + character = root + animation = personality_rational + camera = camera_event_very_left + } + center_portrait = { + character = scope:advisor + animation = throne_room_chancellor + camera = camera_event_center_pointing_very_left + } + right_portrait = { + character = scope:neighbor + triggered_animation = { + trigger = { + scope:neighbor = { + opinion = { + target = root + value <= 0 + } + } + } + animation = personality_content + } + animation = admiration + camera = camera_event_right_to_the_right_more_right + } + lower_center_portrait = scope:disobedient_vassal + lower_right_portrait = scope:confederate + theme = coronation_activity + cooldown = { months = 6 } + + trigger = { + is_landed = yes + + NOT = { + involved_activity = { + has_activity_option = { + category = ceremony_size + option = coronation_small_ceremony + } + } + } + any_councillor = { + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOT = { is_in_guest_subset = { name = detractor } } + diplomacy >= medium_skill_rating + } + any_neighboring_top_liege_realm_owner = { + coronation_events_6150_neighbor_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + is_ai = yes + } + modifier = { + add = 2 + has_activity_intent = coronation_weaken_detractors + any_neighboring_top_liege_realm_owner = { + involved_activity ?= scope:activity + basic_is_available_ai = yes + OR = { + is_confederation_member = yes + suzerain ?= { + is_confederation_member = yes + NOT = { + this = root + } + } + } + } + } + modifier = { + add = 1 + has_activity_intent = coronation_embrace_supporters + any_neighboring_top_liege_realm_owner = { + coronation_events_6150_neighbor_trigger = yes + is_in_guest_subset = { name = supporter } + faith = { + faith_hostility_level = { + target = root.faith + value <= faith.faith_hostile_level + } + } + } + } + modifier = { + add = 1 + has_activity_intent = coronation_impress_attendees + scope:activity = { + any_attending_character = { + coronation_events_6150_vassal_trigger = yes + } + } + } + modifier = { + add = 1 + any_councillor = { + has_council_position = councillor_chancellor + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + is_in_guest_subset = { name = supporter } + diplomacy >= high_skill_rating + NOT = { + is_a_faction_member = yes + } + } + } + } + + immediate = { + # For MP + coronation_busy_effect = yes + + #Save host and location + scope:activity = { + activity_location = { save_scope_as = location } + activity_host = { save_scope_as = host } + } + ordered_councillor = { + order_by = diplomacy + #Get chancellor + limit = { + has_council_position = councillor_chancellor + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOT = { is_in_guest_subset = { name = detractor } } + diplomacy >= medium_skill_rating + NOT = { + is_a_faction_member = yes + } + } + #Get decently talented spouse + alternative_limit = { + has_council_position = councillor_spouse + diplomacy >= high_skill_rating + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOT = { is_in_guest_subset = { name = detractor } } + NOT = { + is_a_faction_member = yes + } + } + alternative_limit = { + involved_activity ?= scope:activity + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOT = { is_in_guest_subset = { name = detractor } } + diplomacy >= medium_skill_rating + NOT = { + is_a_faction_member = yes + } + } + save_scope_as = advisor + } + if = { + limit = { + has_activity_intent = coronation_embrace_supporters + any_neighboring_top_liege_realm_owner = { + coronation_events_6150_neighbor_trigger = yes + is_in_guest_subset = { name = supporter } + faith = { + faith_hostility_level = { + target = root.faith + value <= faith.faith_hostile_level + } + } + } + } + ordered_neighboring_top_liege_realm_owner = { + order_by = "opinion(scope:host)" + limit = { + coronation_events_6150_neighbor_trigger = yes + is_in_guest_subset = { name = supporter } + faith = { + faith_hostility_level = { + target = root.faith + value <= faith.faith_hostile_level + } + } + } + save_scope_as = neighbor + save_scope_as = neighbor_supporter + } + } + else = { + ordered_neighboring_top_liege_realm_owner = { + order_by = "opinion(scope:host)" + limit = { + coronation_events_6150_neighbor_trigger = yes + } + save_scope_as = neighbor + } + } + if = { + limit = { + has_activity_intent = coronation_impress_attendees + government_has_flag = government_is_nomadic + } + scope:activity = { + ordered_attending_character = { + order_by = "opinion(scope:host)" + limit = { + coronation_events_6150_vassal_trigger = yes + is_councillor_of = root + } + alternative_limit = { + highest_held_title_tier = root.highest_held_title_tier_minus_one + coronation_events_6150_vassal_trigger = yes + } + alternative_limit = { + coronation_events_6150_vassal_trigger = yes + } + save_scope_as = disobedient_vassal + } + } + } + #Get confederation to break up + if = { + limit = { + has_activity_intent = coronation_weaken_detractors + } + ordered_neighboring_top_liege_realm_owner = { + order_by = ai_greed + limit = { + involved_activity ?= scope:activity + basic_is_available_ai = yes + confederation ?= { is_house_based = no } # any_confederation_member is not performant for house blocs + NOR = { + is_allied_to = root + is_at_war_as_defender = yes + this = scope:neighbor + } + OR = { + AND = { + ai_greed >= low_positive_ai_value + ai_honor <= 0 + } + AND = { + ai_honor <= low_negative_ai_value + ai_greed >= 0 + } + } + } + save_scope_as = confederate + add_to_list = confederation_members + + confederation = { save_scope_as = confederation } + } + scope:confederation = { + ordered_confederation_member = { + order_by = ai_greed + max = 2 + limit = { + basic_is_available_ai = yes + NOR = { + this = root + this = scope:confederate + is_allied_to = root + is_at_war_as_defender = yes + } + OR = { + AND = { + ai_greed >= low_positive_ai_value + ai_honor <= 0 + } + AND = { + ai_honor <= low_negative_ai_value + ai_greed >= 0 + } + } + } + add_to_list = confederation_members + } + } + } + } + #Impress Attendees - make a vassal loyal + option = { + trigger = { + has_activity_intent = coronation_impress_attendees + exists = scope:disobedient_vassal + } + name = coronation_events.6150.a + flavor = coronation_events.6150.a.flavor + scope:disobedient_vassal = { + add_opinion = { + target = root + modifier = obedience_opinion + } + } + if = { + limit = { + dread >= 5 + } + add_dread = minor_dread_loss + add_piety = minor_piety_loss + } + else = { + add_piety = medium_piety_loss + } + stress_impact = { + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + modifier = { + add = 100 + scope:disobedient_vassal = { + is_powerful_vassal = yes + } + } + modifier = { + add = 50 + dread <= 0 + } + modifier = { + add = -50 + scope:disobedient_vassal = { + current_military_strength < root.half_current_military_strength + } + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + #Exalt the crown - take visiting rulers on a tour of activity_location + option = { + trigger = { + has_activity_intent = coronation_exalt_crown + scope:activity.activity_location.county.holder = { + OR = { + this = root + top_liege = root + } + } + } + name = coronation_events.6150.b + flavor = coronation_events.6150.b.flavor + + scope:activity.activity_location.county = { + add_county_modifier = { + modifier = coronation_tour_of_notables_modifier + years = 20 + } + } + scope:advisor = { + if = { + limit = { + is_ai = yes + } + add_diplomacy_lifestyle_xp = major_lifestyle_xp + } + } + stress_impact = { + arrogant = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + add = 100 + has_trait = arrogant + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + + } + #Weaken detractors - remove members from a confederation + option = { + trigger = { + has_activity_intent = coronation_weaken_detractors + exists = scope:confederate + } + name = coronation_events.6150.c + flavor = coronation_events.6150.c.flavor + if = { + limit = { + primary_title = { + has_title_law = confederation_elective_succession_law + } + } + add_tyranny = minor_tyranny_gain + } + hidden_effect = { + scope:neighbor.confederation = { + every_confederation_member = { + limit = { + NOT = { + this = scope:confederate + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6150.d.confederation_alert + left_icon = root + right_icon = scope:confederate + custom_tooltip = coronation_events.6150.d.confederation_alert_tt + } + } + } + } + + #Diplomacy duel + scope:advisor = { + duel = { + skill = diplomacy + value = high_skill_rating + #Remove 3 confederation members! + 15 = { + trigger = { + any_in_list = { + list = confederation_members + count >= 3 + } + } + desc = coronation_events.6150.c.success_crit + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -14 + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6150.c.success_crit + left_icon = scope:advisor + right_icon = scope:confederate + every_in_list = { + list = confederation_members + confederation = { + remove_confederation_member = prev + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + root = { + pay_short_term_gold = { + target = prev + gold = prev.medium_gold_value + } + } + } + } + } + } + #remove 2 confederation member + 30 = { + trigger = { + any_in_list = { + list = confederation_members + count >= 3 + } + } + desc = coronation_events.6150.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -29 + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6150.c.success + left_icon = scope:advisor + right_icon = scope:confederate + scope:confederate = { + confederation = { + remove_confederation_member = scope:confederate + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + root = { + pay_short_term_gold = { + target = prev + gold = prev.medium_gold_value + } + } + } + ordered_in_list = { + list = confederation_members + order_by = ai_greed + limit = { + NOT = { + this = scope:confederate + } + } + confederation = { + remove_confederation_member = prev + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + root = { + pay_short_term_gold = { + target = prev + gold = prev.medium_gold_value + } + } + } + } + } + } + #remove 1 confederation member + 65 = { + desc = coronation_events.6150.c.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -64 + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6150.c.fail + left_icon = scope:advisor + right_icon = scope:confederate + scope:confederate = { + confederation = { + remove_confederation_member = scope:confederate + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + root = { + pay_short_term_gold = { + target = prev + gold = prev.medium_gold_value + } + } + } + } + } + } + } + } + stress_impact = { + deceitful = minor_stress_impact_loss + just = medium_stress_impact_gain + greedy = minor_stress_impact_gain + honest = medium_stress_impact_gain + content = miniscule_stress_impact_gain + compassionate = miniscule_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_greed = 1 + } + modifier = { + add = 25 + has_trait = deceitful + } + modifier = { + add = 25 + scope:confederation = { + any_confederation_member = { + count > 5 + } + } + } + modifier = { + add = 100 + scope:confederation = { + any_confederation_member = { + count > 8 + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = just + has_trait = honest + has_trait = trusting + short_term_gold <= scope:confederate.medium_gold_value_tripled + } + } + } + } + #Embrace supporters - turn potential tributary into vassal + option = { + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:neighbor_supporter + } + name = coronation_events.6150.supp + scope:advisor = { + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { + desc = coronation_events.6150.supp.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 90 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 70 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 50 + } + } + add = 30 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 20 + } + } + add = 20 + } + modifier = { + scope:neighbor = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + add = 40 + } + modifier = { + scope:neighbor = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + add = 40 + } + modifier = { + add = 100 + root = { + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + } + } + } + modifier = { + add = 50 + root = { + highest_held_title_tier_minus_one > scope:neighbor.highest_held_title_tier + } + } + modifier = { + add = 50 + root = { + highest_held_title_tier > scope:neighbor.highest_held_title_tier + } + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6150.supp.success + left_icon = scope:advisor + right_icon = scope:neighbor + if = { + limit = { + scope:neighbor = { + is_confederation_member = yes + } + } + scope:neighbor.confederation = { + remove_confederation_member = scope:neighbor + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + scope:neighbor = { + change_liege = { + liege = root + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + scope:advisor = { + if = { + limit = { + is_ai = yes + } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + add_prestige = medium_prestige_gain + } + } + } + } + } + 50 = { + desc = coronation_events.6150.supp.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -90 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -70 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -50 + } + } + add = 30 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -20 + } + } + add = 30 + } + modifier = { + add = 20 + scope:neighbor.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + modifier = { + add = 20 + scope:neighbor.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + modifier = { + add = 30 + scope:neighbor = { + is_confederation_member = yes + } + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6150.supp.fail + left_icon = scope:advisor + right_icon = scope:neighbor + scope:neighbor = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + } + } + } + } + } + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:neighbor + multiplier = 1 + } + opinion_modifier = { + who = scope:neighbor + opinion_target = root + multiplier = 1 + } + modifier = { + add = 100 + scope:advisor = { + diplomacy >= extremely_high_skill_rating + } + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + scope:advisor = { + diplomacy < high_skill_rating + } + } + } + } + } + #Get a tributary + option = { + name = coronation_events.6150.d + if = { + limit = { + NOT = { exists = scope:neighbor_supporter } + } + scope:advisor = { + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { + desc = coronation_events.6150.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 90 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 70 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 50 + } + } + add = 30 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value >= 20 + } + } + add = 20 + } + modifier = { + scope:neighbor = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + add = 40 + } + modifier = { + scope:neighbor = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + add = 40 + } + modifier = { + add = 100 + root = { + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + } + } + } + modifier = { + add = 50 + root = { + highest_held_title_tier_minus_one > scope:neighbor.highest_held_title_tier + } + } + modifier = { + add = 50 + root = { + highest_held_title_tier > scope:neighbor.highest_held_title_tier + } + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = coronation_events.6150.d.success + left_icon = scope:advisor + right_icon = scope:neighbor + if = { + limit = { + scope:neighbor = { + is_confederation_member = yes + } + } + scope:neighbor.confederation = { + remove_confederation_member = scope:neighbor + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + } + start_tributary_interaction_effect = { + TRIBUTARY = scope:neighbor + SUZERAIN = root + } + scope:advisor = { + if = { + limit = { + is_ai = yes + } + add_prestige = medium_prestige_gain + } + } + } + } + + } + 50 = { + desc = coronation_events.6150.d.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -90 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -70 + } + } + add = 50 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -50 + } + } + add = 30 + } + modifier = { + scope:neighbor = { + opinion = { + target = root + value <= -20 + } + } + add = 30 + } + modifier = { + add = 20 + scope:neighbor.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + modifier = { + add = 20 + scope:neighbor.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + modifier = { + add = 30 + scope:neighbor = { + is_confederation_member = yes + } + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = coronation_events.6150.d.fail + left_icon = scope:advisor + right_icon = scope:neighbor + scope:neighbor = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + } + } + } + } + } + } + else = { + if = { + limit = { + scope:neighbor = { + is_confederation_member = yes + } + } + scope:neighbor.confederation = { + remove_confederation_member = scope:neighbor + set_variable = { + name = left_confederation + value = scope:neighbor.confederation + years = 5 + } + } + } + root = { + start_tributary_interaction_effect = { + TRIBUTARY = scope:neighbor + SUZERAIN = root + } + } + if = { + limit = { + scope:advisor = { is_ai = yes } + } + scope:advisor = { add_prestige = medium_prestige_gain } + } + } + stress_impact = { + greedy = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:neighbor + multiplier = 0.5 + } + opinion_modifier = { + who = scope:neighbor + opinion_target = root + multiplier = 0.5 + } + modifier = { + add = 50 + scope:advisor = { + diplomacy >= very_high_skill_rating + } + } + modifier = { + add = 25 + scope:neighbor.highest_held_title_tier < root.highest_held_title_tier_minus_one + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + scope:advisor = { + diplomacy < decent_skill_rating + } + } + } + } + } + #Strengthen the unity of the council + option = { + name = coronation_events.6150.e + every_councillor = { + custom = custom.every_councillor + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = coronation_councillor_unity_tooltip_nomadic + hidden_effect = { + 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 + } + } + } + } + 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 + 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 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + after = { + # For MP + coronation_ready_effect = yes + } +} diff --git a/N3OW/events/activities/hold_court_activity/hold_court_events_general.txt b/N3OW/events/activities/hold_court_activity/hold_court_events_general.txt new file mode 100644 index 00000000..cecf175d --- /dev/null +++ b/N3OW/events/activities/hold_court_activity/hold_court_events_general.txt @@ -0,0 +1,26947 @@ +namespace = hold_court + +# Differences in namespace range down to the ongoing CD civil war between whether a range starts at 0 or 1. +## It starts at 001 and goes to 000, damn it, and anyone who says otherwise is a knave and a cur. + +################################################## +# # RANGES +# 0001 - 0100 Setup, Example, & Misc +# 1001 - 2000 Shoes +# 2001 - 2999 Ewan +# 3000 - 4000 Bianca +# 4001 - 5000 Isabella +# 5001 - 5999 Linnea +# 6000 - 6999 Claudia +# 7000 - 8000 George +# 8001 - 8999 Joe +# 9000 - 9999 Oltner +# +################################################## + + + + + + + + + + + +################################################## +# Setup, Example, & Misc + +################################################## +# 0001 - 0010 Example Event +# 0011 - 0010 Activity Start +# 0021 - 0020 Activity End +################################################## + +################################################## +# Example Event +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# Example hold court event for studying. +hold_court.0001 = { + # Court-type events only appear in the Royal Court view, and, for the Hold Court activity, are mandatory. + type = court_event + # Desc and theming rules are as normal, but since there's no background, there's no need for background overrides. + title = hold_court.0001.t + desc = hold_court.0001.desc + theme = court + # Main portraits are unnecessary: we define this stuff via the court_scene block instead. + # Secondary portraits may be used as usual. + lower_left_portrait = scope:character_c + + # Hold Court events should be fired from their specific on_action (hold_court_event_selection), but since this is an example, it's left orphaned. + orphan = yes + + # Here, we define how the event appears inside the court view. + ## This block exists in the root scope, so you can just define anyone you'd normally have access to/set up in the immediate block here. + court_scene = { + # Define which character will have the button for starting the event appear over the top of 'em. + button_position_character = scope:character_a + # Forcibly open the event next. + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + # Roles defined in \ck3\game\gfx\court_scene\character_roles\, if you want to change them or add new ones. + roles = { + # First, we take each scoped relevant scoped character. + scope:character_a = { + # Then we define their role, where they're positioned in the scene. + group = petitioners_group + # Next, we select their animation override (if applicable: you can leave it to the generic default/role default if defined, though generally you'll want to define this). + animation = anger + } + scope:character_b = { + group = petitioners_group + animation = rage + } + # Characters who are not physically present are referred to only via copy links or lower portraits, so we don't bother putting them here. + } + } + + # Add the widget to show which court event we're currently at in the chain. + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + + # Court weightings: plug in a court type that should see this event more often. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # As with portraits, we do our general character setup stuff in this event. + random_courtier_or_guest = { save_scope_as = character_a } + random_courtier_or_guest = { + limit = { + this != scope:character_a + } + save_scope_as = character_b + } + } + + # Court events, as with all events, require at least one option to display. + option = { + name = hold_court.0001.a + } +} + +################################################## +# Activity Start +# by Sean Hughes & Ewan Cowhig Croft +# 0011 - 0010 +################################################## + +# Played at the start of the activity as an intro. +hold_court.0011 = { + type = court_event + title = hold_court.0001.t + desc = hold_court.0001.desc + theme = realm + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_duty" } + court_scene = { + button_position_character = root + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + # roles = { + # root = { + # role = ruler + # animation = throne_room_ruler + # } + # } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + immediate = { + # Play the appropriate music cue. + if = { + limit = { + culture = { has_graphical_mena_culture_group_trigger = yes } + } + play_music_cue = "middleeasterncourt_cue" + } + else_if = { + limit = { + culture = { has_graphical_mediterranean_culture_group_trigger = yes } + } + play_music_cue = "mediterraneancourt_cue" + } + else_if = { + limit = { + culture = { has_graphical_india_culture_group_trigger = yes } + } + play_music_cue = "indiancourt_cue" + } + else_if = { + limit = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + play_music_cue = "mx_cue_tgp_asian_tournament" + } + ## If we can't find a more specific cue track, default to something more neutral. + else = { play_music_cue = "europeancourt_cue" } + # Set variable so we know if a player is holding court + if = { + limit = { + has_multiple_players = no + } + add_character_flag = { + flag = holding_court_character_flag + days = 5 + } + } + else = { + add_character_flag = { + flag = holding_court_character_flag + years = 1 + } + } + + # Tracking for how many petitioners have come through. + set_variable = { + name = num_petitioners + value = initial_petitioners_value + } + # Start a counting variable for widget progress. + set_variable = { + name = petitioner_current_progress + value = 0 + } + # Widget setup. + ## Set the total length of the chain. + save_scope_value_as = { + name = event_chain_length + value = petitioner_total_chain_length_value + } + ## Manually set the current widget length. + ### Due to code-side shenanigans, we do this a bit awkwardly. + save_scope_value_as = { + name = event_chain_progress + value = 1 + } + } + + option = { + name = hold_court.0001.a + custom_tooltip = hold_court_start_activity + # Set up the general flow. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.0001.b + remove_variable = num_petitioners + remove_variable = petitioner_current_progress + remove_character_flag = holding_court_character_flag + ai_chance = { + base = 0 + } + } +} + +################################################## +# Activity End +# by Sean Hughes & Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# Played at the end of the activity to clean it up. +hold_court.0021 = { + type = court_event + title = hold_court.0021.t + desc = hold_court.0021.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + court_scene = { + button_position_character = root + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + # roles = { + # root = { + # role = ruler + # animation = throne_room_ruler + # } + # } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + + immediate = { + # Clean up the ol' variable. + remove_variable = petitioner_current_progress + remove_character_flag = holding_court_character_flag + # Update the widget one last time. + save_scope_value_as = { + name = event_chain_progress + value = petitioner_total_chain_length_value + } + root = { apply_hold_court_grace_effect = yes } + } + + option = { + name = hold_court.0021.a + # Guaranteed small grandeur reward, in addition to any from events + change_current_court_grandeur = minor_court_grandeur_gain + # LEGITIMACY GAIN FROM HOLDING COURT + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = minor_legitimacy_gain + } + } +} + + + + + + + + + + +################################################## +# Shoes + +################################################## +# 1001 - 1010 Indirect Espionage +# 1011 - 1020 A Call to War +# 1021 - 1030 Dust to Dust +# 1031 - 1040 A Traitor Uncovered +# 1041 - 1050 God's Own Lands +################################################## + +################################################## +# Indirect Espionage +# by Sean Hughes +# 1001 - 1010 +################################################## + +# Guest arrives in your court, offers to spill rumors in exchange for money. +hold_court.1001 = { + type = court_event + title = hold_court.1001.t + desc = hold_court.1001.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + lower_right_portrait = scope:neighboring_ruler + court_scene = { + button_position_character = scope:rumormonger + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:rumormonger = { + group = petitioners_group + animation = personality_greedy + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = had_event_hold_court_1001 } + any_pool_guest = { + save_temporary_scope_as = rumor_person + is_available_adult = yes + any_known_secret = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target ?= { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + add_character_flag = { + flag = had_event_hold_court_1001 + years = 10 + } + random_pool_guest = { + limit = { + save_temporary_scope_as = rumor_person + is_available_adult = yes + any_known_secret = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target ?= { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + has_court_event_flag = no + } + save_scope_as = rumormonger + court_event_character_flag_effect = yes + random_known_secret = { + limit = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target ?= { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + secret_target.top_liege = { + save_scope_as = neighboring_ruler + court_event_character_flag_effect = yes + primary_title = { + save_scope_as = neighboring_realm + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.1001.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_short_term_gold = { + target = scope:rumormonger + gold = tiny_gold_value + } + custom_tooltip = hold_court.1001.a.success.tt + hidden_effect = { + scope:rumormonger = { + every_known_secret = { + limit = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target = { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + reveal_to = root + } + } + } + } + + option = { + name = hold_court.1001.a.seducer + trigger = { + has_trait = seducer + might_cheat_on_every_partner_trigger = yes + scope:rumormonger = { + is_attracted_to_gender_of = root + might_cheat_on_every_partner_trigger = yes + } + } + trait = seducer + + + had_sex_with_effect = { + CHARACTER = scope:rumormonger + PREGNANCY_CHANCE = pregnancy_chance + } + custom_tooltip = hold_court.1001.a.success.tt + hidden_effect = { + scope:rumormonger = { + every_known_secret = { + limit = { + NOR = { + is_known_by = root + secret_target ?= scope:rumor_person + } + secret_target = { + top_liege ?= { is_landed = yes } + top_liege != root.top_liege + } + } + reveal_to = root + } + } + } + } + + option = { + name = hold_court.1001.b + add_dread = minor_dread_gain + imprison_character_effect = { + TARGET = scope:rumormonger + IMPRISONER = root + } + } + + option = { + name = hold_court.1001.c + change_current_court_grandeur = medium_court_grandeur_gain + custom_tooltip = hold_court_1001_pool_tt + hidden_effect = { + scope:rumormonger = { + move_to_pool = yes + } + } + + } + + after = { + scope:rumormonger = { + clear_court_event_participation = yes + } + scope:neighboring_ruler = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Call to War +# by Sean Hughes +# 1011 - 1020 +################################################## + +scripted_trigger hold_court_1011_valid_neighbour_trigger = { + tier < root.primary_title.tier + any_claimant = { hold_court_1011_valid_neighbour_claimant_trigger = yes } +} + +scripted_trigger hold_court_1011_valid_neighbour_claimant_trigger = { + is_ruler = no + is_adult = yes + basic_is_available_ai = yes + has_court_event_flag = no + NOT = { is_courtier_of = root } +} + +# Claimant asks for your help in pushing their claim RIGHT NOW!!! +hold_court.1011 = { + type = court_event + title = hold_court.1011.t + desc = hold_court.1011.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + lower_right_portrait = scope:target_character + court_scene = { + button_position_character = scope:claimant_guest + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:claimant_guest = { + group = petitioners_group + animation = personality_bold + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + cooldown = { years = 10 } + + trigger = { + any_neighboring_and_across_water_top_liege_realm = { hold_court_1011_valid_neighbour_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike} + } + + immediate = { + random_neighboring_and_across_water_top_liege_realm = { + limit = { hold_court_1011_valid_neighbour_trigger = yes } + random_claimant = { + limit = { hold_court_1011_valid_neighbour_claimant_trigger = yes } + save_scope_as = claimant_guest + court_event_character_flag_effect = yes + } + save_scope_as = target_title + holder = { + save_scope_as = target_character + } + } + hidden_effect = { + add_visiting_courtier = scope:claimant_guest + scope:claimant_guest = { save_scope_as = courtier } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + + option = { + name = hold_court.1011.a + add_courtier = scope:claimant_guest + add_hook = { + type = loyalty_hook + target = scope:claimant_guest + } + reverse_add_opinion = { + target = scope:target_character + modifier = insult_opinion + opinion = -25 + } + show_as_tooltip = { + random_list = { + desc = courtier_guest_management.0102.a.rl.desc + 1 = { + show_chance = no + desc = courtier_guest_management.0102.a.stay + custom_tooltip = courtier_guest_management.0102.a.stay.tt + } + 1 = { + show_chance = no + desc = courtier_guest_management.0102.a.leave + scope:claimant_guest = { select_and_move_to_pool_effect = yes } + } + } + } + + hidden_effect = { + scope:claimant_guest = { + add_character_flag = { + flag = courtier_staying_for_claim + years = 1 + } + trigger_event = { + id = courtier_guest_management.0103 + years = 1 + } + } + } + } + + option = { + name = hold_court.1011.b + remove_courtier_or_guest = scope:claimant_guest + scope:claimant_guest = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + } + scope:target_character = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + option = { + name = hold_court.1011.c + show_as_tooltip = { + add_visiting_courtier = scope:claimant_guest + } + scope:claimant_guest = { + add_opinion = { + modifier = kindness_opinion + target = root + opinion = 10 + } + } + } + + after = { + scope:claimant_guest = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Dust to Dust +# by Sean Hughes +# 1021 - 1030 +################################################## + +# Dust to Dust: A peasant asks for financial relief +hold_court.1021 = { + type = court_event + title = hold_court.1021.t + desc = hold_court.1021.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + # Portrait left in in order to apply outfit tags. + left_portrait = { + character = scope:peasant + outfit_tags = { beggar_rags } + hide_info = yes + } + + trigger = { + NOT = { has_character_flag = had_event_hold_court_2001 } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = had_event_hold_court_2001 + years = 10 + } + + random_sub_realm_barony = { + limit = { county = { holder = root } } + save_scope_as = village + county = { save_scope_as = county } + } + hidden_effect = { + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + save_scope_as = peasant + } + scope:peasant = { + add_trait = peasant_leader + change_current_weight = -60 + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + trigger = { stewardship >= high_skill_rating } + name = hold_court.1021.a.stewardship + skill = stewardship + every_sub_realm_county = { + custom = county_or_15_dev + limit = { + OR = { + this = scope:county + development_level <= 15 + } + } + add_county_modifier = { + modifier = hold_court_cropsharing + years = 20 + } + } + } + + option = { + name = hold_court.1021.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= medium_treasury_or_gold_value + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + every_sub_realm_county = { + custom = county_or_15_dev + limit = { + OR = { + this = scope:county + development_level <= 15 + } + } + add_county_modifier = { + modifier = hold_court_grateful_peasants_modifier + years = 10 + } + } + change_current_court_grandeur = medium_court_grandeur_gain + } + + option = { + name = hold_court.1021.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= medium_gold_value + } + } + + remove_treasury_or_gold = minor_treasury_or_gold_value + every_sub_realm_county = { + custom = county_or_15_dev + limit = { + OR = { + this = scope:county + development_level <= 15 + } + } + add_county_modifier = { + modifier = hold_court_free_labor + years = 10 + } + } + } + + option = { + name = hold_court.1021.c + + every_sub_realm_county = { + custom = county_or_15_dev + limit = { + OR = { + this = scope:county + development_level <= 15 + } + } + add_county_modifier = { + modifier = hold_court_ploughs_to_swords + years = 10 + } + } + } + + after = { + scope:peasant = { silent_disappearance_effect = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + + + + + + + + + + +################################################## +# Ewan + +# [slightly anachronistic tumbleweed imagery] + + + + + + + + + + +################################################## +# Bianca + +################################################## +# 3000 - 3001 A Feast in your Name +# 3010 An Unconventional Preacher +# 3020 Culture Clash: Offensive Monument +# 3030 War Restorations +# 3040 Laughs Requested +# 3050 A Noble Responsibility +# 3060 Addressing the Corruption +# 3070 The Child with Two Mothers +# 3080 Exhibiting your collection +# 3090 - 3091 Celebrating another culture +################################################## + +##################################### +# A Feast in your Name # +# by Bianca Savazzi # +# 3000 - 3001 # +##################################### + +scripted_trigger hold_court_3000_vassal_trigger = { + basic_is_available_ai = yes + is_adult = yes + short_term_gold >= standard_activity_cost + has_court_event_flag = no + NOT = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + trigger_if = { + limit = { exists = root.var:was_promised_a_feast } + root.var:was_promised_a_feast = { this != prev } + } +} + +# You're approached by a vassal that offers to pay for your next feast +hold_court.3000 = { + type = court_event + title = hold_court.3000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_trait = blind } + desc = hold_court.3000.desc.opening.blind + } + triggered_desc = { + desc = hold_court.3000.desc.opening + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:feast_vassal = { + opinion = { + target = root + value >= 10 + } + } + } + desc = hold_court.3000.desc.dislikes + } + triggered_desc = { + desc = hold_court.3000.desc.likes + } + } + } + theme = court + cooldown = { years = 5 } + court_scene = { + button_position_character = scope:feast_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:feast_vassal = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + has_character_flag = had_event_vassal_2101 # Event where vassal requests a feast + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + trigger = { + NOT = { government_has_flag = government_is_mandala } + is_landed_or_landless_administrative = yes + is_in_civil_war = no + is_adult = yes + any_vassal = { + hold_court_3000_vassal_trigger = yes + } + } + + immediate = { + random_vassal = { + limit = { + hold_court_3000_vassal_trigger = yes + } + save_scope_as = feast_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Accept, grant a favour + option = { + name = hold_court.3000.a + scope:feast_vassal = { + add_opinion = { + modifier = ep1_accepted_sponsoring_a_feast_opinion + target = root + } + add_hook = { + target = root + type = favor_hook + } + pay_short_term_gold = { + target = root + gold = standard_activity_cost + } + } + custom_tooltip = hold_court.3000.a.tt + + hidden_effect = { + set_variable = { + name = hold_court_sponsored_a_feast + value = scope:feast_vassal + years = 5 + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_honor = tiny_chance_impact_positive_ai_value # Honorable characters tend to agree to fair deals + ai_greed = medium_chance_impact_negative_ai_value # Greedy characters don't necessarily want a "fair" deal + } + } + } + + # Option B: Accept greedily + option = { + name = hold_court.3000.b + trigger = { + OR = { + has_trait = greedy + has_trait = arbitrary + has_trait = arrogant + } + } + stress_impact = { + greedy = medium_stress_loss + } + scope:feast_vassal = { + if = { + limit = { + OR = { + has_trait = generous + has_trait = humble + } + } + add_opinion = { + modifier = ep1_took_advantage_of_kindness_opinion + target = root + opinion = -10 + } + } + else = { + add_opinion = { + modifier = ep1_took_advantage_of_kindness_opinion + target = root + } + } + pay_short_term_gold = { + target = root + gold = standard_activity_cost + } + } + custom_tooltip = hold_court.3000.a.tt + hidden_effect = { + set_variable = { + name = hold_court_sponsored_a_feast + value = scope:feast_vassal + years = 5 + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_honor = medium_chance_impact_negative_ai_value # Honorable characters tend to agree to fair deals + ai_greed = medium_chance_impact_positive_ai_value # Greedy characters don't necessarily want a "fair" deal + } + } + } + + # Option C: Persuade them to change the deal + option = { + name = hold_court.3000.c + trigger = { + OR = { + has_lifestyle = diplomacy_lifestyle + diplomacy >= high_skill_rating + has_education_diplomacy_trigger = yes + } + } + duel = { + skill = diplomacy + value = 10 + 30 = { + desc = hold_court.3000.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + hidden_effect = { + set_variable = { + name = hold_court_sponsored_a_feast + value = scope:feast_vassal + years = 5 + } + } + send_interface_toast = { + title = hold_court.3000.t + left_icon = scope:feast_vassal + custom_tooltip = hold_court.3000.c.success + } + } + 10 = { + desc = hold_court.3000.c.failure + scope:feast_vassal = { + add_opinion = { + modifier = ep1_rejected_sponsoring_a_feast_opinion + target = root + } + } + send_interface_toast = { + title = hold_court.3000.t + left_icon = scope:feast_vassal + custom_tooltip = hold_court.3000.c.failure + } + } + } + ai_chance = { + base = 15 + modifier = { + OR = { + has_lifestyle = diplomacy_lifestyle + diplomacy >= high_skill_rating + has_education_diplomacy_trigger = yes + } + add = 40 + } + ai_value_modifier = { + ai_honor = medium_chance_impact_positive_ai_value # Honorable characters tend to agree to fair deals + ai_greed = medium_chance_impact_positive_ai_value # Greedy characters don't necessarily want a "fair" deal + } + } + } + + # Option D: Reject + option = { + name = hold_court.3000.d + scope:feast_vassal = { + add_opinion = { + modifier = ep1_rejected_sponsoring_a_feast_opinion + target = root + } + } + + ai_chance = { + base = 15 + modifier = { + OR = { + has_trait = reclusive + has_trait = shy + } + add = 40 + } + modifier = { + gold < -100 #AI should want to take the loan if out of money + add = -100 + } + } + } + + after = { + add_character_flag = { + flag = hold_court_3000_a_feast_in_your_name + years = 5 + } + scope:feast_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Follow-up event Gain some GSV +hold_court.3001 = { + type = character_event + title = hold_court.3000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:feast_vassal = { is_alive = yes } + } + desc = hold_court.3001.desc + } + triggered_desc = { + desc = hold_court.3001.desc.dead + } + } + } + theme = court + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:feast_vassal + animation = happiness + } + + trigger = { + has_character_flag = hold_court_3000_a_feast_in_your_name + has_variable = hold_court_sponsored_a_feast + } + + immediate = { + var:hold_court_sponsored_a_feast = { + save_scope_as = feast_vassal + } + remove_variable = hold_court_sponsored_a_feast + } + + # Option A: Celebrate your success! + option = { + name = hold_court.3001.a + trigger = { + scope:feast_vassal = { is_alive = yes } + } + ai_chance = { + base = 1 + } + } + + # Option B: Celebrate your success, even if the vassal is dead! + option = { + name = hold_court.3001.b + trigger = { + scope:feast_vassal = { is_alive = no } + } + ai_chance = { + base = 1 + } + } + + after = { + change_current_court_grandeur = medium_court_grandeur_gain + } +} + +##################################### +# An Unconventional Preacher # +# by Bianca Savazzi # +# 3010 # +##################################### + +scripted_trigger court_3010_an_unconventional_preacher_vassal_trigger = { + faith = root.faith + is_available_healthy_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = unconventional_preacher_temp +} + +# Vassal requests investigation of an unorthodox preacher. Another pleas for more tolerance or even a change in doctrines. +hold_court.3010 = { + type = court_event + title = hold_court.3010.t + desc = { + desc = hold_court.3010.desc.opening + first_valid = { + triggered_desc = { + trigger = { + faith = { + OR = { + has_doctrine = doctrine_clerical_gender_male_only + has_doctrine = doctrine_clerical_gender_female_only + } + } + } + desc = hold_court.3010.desc.preacher_gender + } + } + desc = hold_court.3010.desc.closing + } + theme = court + lower_center_portrait = scope:unconventional_preacher + cooldown = { years = 5 } + court_scene = { + button_position_character = scope:religious_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:religious_vassal = { + group = petitioners_group + animation = personality_zealous + } + scope:tolerant_vassal = { + group = petitioners_group + animation = personality_forgiving + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_vassal = { + court_3010_an_unconventional_preacher_vassal_trigger = yes + count >= 2 + } + faith = { + # Faith requires some restriction on who can practise it for the event to make sense + NOT = { + has_doctrine = doctrine_clerical_gender_either + } + } + OR = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = high_almoner_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = court_artificer_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = court_physician_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = chief_qadi_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher_temp + COURT_POS = court_tutor_court_position + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_male } + } + create_character = { + template = virtuous_priest_character_template + location = root.capital_province + gender = female + dynasty = none + save_scope_as = unconventional_preacher + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_female } + } + create_character = { + template = virtuous_priest_character_template + location = root.capital_province + gender = male + dynasty = none + save_scope_as = unconventional_preacher + } + } + else = { + create_character = { + template = virtuous_priest_character_template + location = root.capital_province + gender_female_chance = 50 + dynasty = none + save_scope_as = unconventional_preacher + } + } + hidden_effect = { + # We add them to court so that they can become high almoner, but hide that from the tooltip + add_courtier = scope:unconventional_preacher + } + + random_vassal = { + limit = { court_3010_an_unconventional_preacher_vassal_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + has_trait = zealous + } + modifier = { + add = 5 + OR = { + has_trait = stubborn + has_trait = diligent + has_trait = impatient + } + } + modifier = { + add = -3 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + modifier = { + add = -5 + OR = { + has_trait = cynical + any_secret = { + type = secret_non_believer + } + } + } + modifier = { + add = 2 + has_council_position = councillor_court_chaplain #Slight pivot towards picking + } + } + save_scope_as = religious_vassal + court_event_character_flag_effect = yes + } + + random_vassal = { + limit = { + this != scope:religious_vassal + court_3010_an_unconventional_preacher_vassal_trigger = yes + } + weight = { + base = 1 + modifier = { + add = -10 + has_trait = zealous + } + modifier = { + add = 5 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + modifier = { + add = 5 + OR = { + has_trait = cynical + any_secret = { + type = secret_non_believer + } + } + } + modifier = { + add = 2 + has_council_position = councillor_court_chaplain + } + } + save_scope_as = tolerant_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Leave the preacher alone + option = { + trigger = { + OR = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_artificer_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_physician_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = chief_qadi_court_position + } + } + } + name = hold_court.3010.a + reverse_add_opinion = { + target = scope:religious_vassal + modifier = impious_opinion + opinion = -10 + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = chief_qadi_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = chief_qadi + } + } + else_if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_artificer_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = court_artificer + } + } + else_if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_physician_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = court_physician + } + } + ai_chance = { + base = 15 + modifier = { + gold < tiny_gold_value # AI won't hire positions if they don't have money + add = -15 + } + ai_value_modifier = { + ai_zeal = medium_chance_impact_negative_ai_value # Zealous characters don't like unconventional preachers + } + } + } + + # Option C: Appoint them as your almoner + option = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = high_almoner_court_position + } + } + name = hold_court.3010.c + reverse_add_opinion = { + target = scope:religious_vassal + modifier = impious_opinion + opinion = -10 + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = high_almoner + } + ai_chance = { + base = 15 + modifier = { + gold < tiny_gold_value # AI won't hire positions if they don't have money + add = -15 + } + ai_value_modifier = { + ai_zeal = medium_chance_impact_negative_ai_value # Zealous characters don't like unconventional preachers + } + } + } + + # Option D: Invite the preacher to serve as court tutor + option = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:unconventional_preacher + COURT_POS = court_tutor_court_position + } + } + name = hold_court.3010.d + reverse_add_opinion = { + target = scope:religious_vassal + modifier = impious_opinion + opinion = -10 + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:unconventional_preacher + POSITION = court_tutor + } + ai_chance = { + base = 15 + modifier = { + gold < tiny_gold_value # AI won't hire positions if they don't have money + add = -15 + } + ai_value_modifier = { + ai_zeal = medium_chance_impact_negative_ai_value # Zealous characters don't like unconventional preachers + } + } + } + + # Option B: Punish the preacher + option = { + name = hold_court.3010.b + scope:unconventional_preacher = { + silent_disappearance_effect = yes + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_zeal = medium_chance_impact_positive_ai_value # Zealous characters don't like unconventional preachers + ai_compassion = medium_chance_impact_negative_ai_value # Compassionate characters rather not punish those who do good + } + } + } + + after = { + scope:tolerant_vassal = { + clear_court_event_participation = yes + } + scope:religious_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +##################################### +# Culture Clash: Offensive Monument # +# by Bianca Savazzi # +# 3020 # +##################################### + +scripted_trigger hold_court_3020_peasant_trigger = { + basic_is_available_ai = yes + is_adult = yes + is_lowborn = yes + has_court_event_flag = no + #culture is left out for reusability +} + +scripted_trigger hold_court_3020_valid_barony = { + tier = tier_barony + holder ?= { + this != root + culture = root.culture + has_court_event_flag = no + } +} + +# Peasants of another culture want to restore a controversial monument that mocks yours +hold_court.3020 = { + type = court_event + title = hold_court.3020.t + desc = hold_court.3020.desc + theme = court + cooldown = { years = 5 } + court_scene = { + button_position_character = scope:holder_of_area + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:holder_of_area = { + group = petitioners_group + animation = shock + } + scope:different_culture_peasant = { + group = petitioners_group + animation = anger + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_held_title = { + title_tier = county + any_in_de_jure_hierarchy = { + hold_court_3020_valid_barony = yes + } + culture != root.culture + } + } + + 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_administrative } + } + + immediate = { + random_held_title = { + title_tier = county + limit = { + any_in_de_jure_hierarchy = { + hold_court_3020_valid_barony = yes + } + culture != root.culture + } + random_in_de_jure_hierarchy = { + limit = { + hold_court_3020_valid_barony = yes + } + save_scope_as = village + holder = { + save_scope_as = holder_of_area + court_event_character_flag_effect = yes + } + county = { save_scope_as = village_county } + } + } + # Try to fetch an existing character + if = { + limit = { + any_pool_guest = { + hold_court_3020_peasant_trigger = yes + culture = scope:village.culture + } + } + + random_pool_guest = { + limit = { + hold_court_3020_peasant_trigger = yes + culture = scope:village.culture + } + add_trait = peasant_leader + save_scope_as = different_culture_peasant + court_event_character_flag_effect = yes + } + } + else = { # else, make one for the event + create_character = { + template = servant_character + location = scope:village.title_province + culture = scope:village.title_province.culture + dynasty = none + trait = peasant_leader + save_scope_as = different_culture_peasant + } + add_character_flag = created_character_hold_court_3020 + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option C: Build something marrying the two cultures + option = { + name = hold_court.3020.c + trigger = { + has_trait = eccentric + } + remove_treasury_or_gold = medium_treasury_or_gold_value + every_held_title = { + title_tier = county + limit = { + culture = scope:village.culture + } + custom = every_county_of_culture + add_county_modifier = { + modifier = 3020_multicultural_monument + years = 15 + } + } + scope:village.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value # SPeNd rEsouRcEs!? + ai_compassion = high_chance_impact_positive_ai_value # Compassionate characters don't like punishing others + } + modifier = { + factor = 0 + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + + # Option A: Destroy the statue and build one for YOUR culture! + option = { + name = hold_court.3020.a + add_dread = minor_dread_gain + every_held_title = { + title_tier = county + limit = { + culture = scope:village.culture + } + custom = every_county_of_culture + add_county_modifier = { + modifier = 3020_own_culture_monument + years = 15 + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_vengefulness = medium_chance_impact_positive_ai_value # Vengeful characters don't like being mocked + ai_compassion = medium_chance_impact_negative_ai_value # Compassionate characters don't like punishing others + } + } + } + + # Option B: Accept + option = { + name = hold_court.3020.b + remove_treasury_or_gold = minor_treasury_or_gold_value + every_held_title = { + title_tier = county + limit = { + culture = scope:village.culture + } + custom = every_county_of_culture + add_county_modifier = { + modifier = hold_court_grateful_peasants_modifier + years = 15 + } + } + scope:village.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = medium_chance_impact_negative_ai_value # SPend resources!? + ai_compassion = medium_chance_impact_positive_ai_value # Compassionate characters don't like punishing others + } + modifier = { + factor = 0 + short_term_treasury_or_gold < minor_treasury_or_gold_value + } + } + } + + after = { + if = { + limit = { has_character_flag = created_character_hold_court_3020 } + hidden_effect = { + scope:different_culture_peasant = { + clear_court_event_participation = yes + death = { + death_reason = death_vanished + } + } + remove_character_flag = created_character_hold_court_3020 + } + } + scope:holder_of_area = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +##################################### +# War Restorations # +# by Bianca Savazzi # +# 3030 # +##################################### + +# Peasants of another culture want to restore a monument that was looted during war +hold_court.3030 = { + type = court_event + title = hold_court.3030.t + desc = hold_court.3030.desc + theme = court + cooldown = { years = 5 } + court_scene = { + button_position_character = scope:different_culture_peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:different_culture_peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + is_at_war = no + days_of_continuous_peace < 600 + any_directly_owned_province = { + culture != root.culture + } + } + + 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_administrative } + } + + immediate = { + random_directly_owned_province = { + limit = { + culture != root.culture + } + weight = { + base = 1 + modifier = { + add = 10 + has_free_building_slot = yes + } + } + save_scope_as = province + } + + # Try to fetch an existing character + if = { + limit = { + any_pool_guest = { + hold_court_3020_peasant_trigger = yes + culture = scope:province.culture + } + } + + random_pool_guest = { + limit = { + hold_court_3020_peasant_trigger = yes + culture = scope:province.culture + } + add_trait = peasant_leader + save_scope_as = different_culture_peasant + court_event_character_flag_effect = yes + } + } + else = { # else, make one for the event + create_character = { + template = servant_character + location = scope:province + culture = scope:province.culture + dynasty = none + trait = peasant_leader + save_scope_as = different_culture_peasant + } + scope:different_culture_peasant = { + court_event_character_flag_effect = yes + } + add_character_flag = created_character_hold_court_3030 + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Pay to restore the building + option = { + name = hold_court.3030.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + + stress_impact = { + greedy = medium_stress_gain + generous = medium_stress_loss + improvident = medium_stress_loss + } + + scope:province.culture = { + change_cultural_acceptance = { + target = root.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + + # Option B: Raze monument to use the materials elsewhere + option = { + name = hold_court.3030.b + trigger = { + scope:province = { has_free_building_slot = yes } + } + + stress_impact = { + greedy = medium_stress_loss + } + + scope:province = { + add_province_modifier = { + modifier = hold_court_less_building_cost_modifier + days = 3650 + } + } + + scope:province.culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + + # Option C: Refuse + option = { + name = hold_court.3030.c + + stress_impact = { + generous = medium_stress_gain + improvident = medium_stress_gain + } + + scope:province = { + county = { + add_county_modifier = { + modifier = hold_court_displeased_peasants_modifier + years = 5 + } + } + } + } + + after = { + if = { + limit = { has_character_flag = created_character_hold_court_3030 } + hidden_effect = { + scope:different_culture_peasant = { + clear_court_event_participation = yes + death = { + death_reason = death_vanished + } + } + remove_character_flag = created_character_hold_court_3030 + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +##################################### +# Laughs Requested # +# by Bianca Savazzi # +# 3040 # +##################################### + +# Vassal/Courtier petitions for the recruitment of a jester +hold_court.3040 = { + type = court_event + title = hold_court.3040.t + desc = hold_court.3040.desc + theme = court + lower_center_portrait = scope:potential_jester + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:jester_requester + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:jester_requester = { + group = petitioners_group + animation = happiness + } + scope:kill_joy = { + group = petitioners_group + animation = dismissal + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { + employs_court_position = court_jester_court_position + } + can_employ_court_position_type = court_jester_court_position + any_vassal = { + is_available_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = extroverted_vassal_check + } + any_vassal = { + is_available_ai_adult = yes + has_court_event_flag = no + this != scope:extroverted_vassal_check + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_vassal = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + weight = { + base = 1 + modifier = { + has_personality_extroverted_trigger = yes + add = 10 + } + modifier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + add = 5 + } + } + save_scope_as = jester_requester + court_event_character_flag_effect = yes + assign_quirk_effect = yes # So that they have a quirk in loc + + create_character = { + template = pool_repopulate_diplomacy + location = scope:jester_requester.location + dynasty = none #It has to be a lowborn + save_scope_as = potential_jester + } + } + + hidden_effect = { add_courtier = scope:potential_jester } # So they're considered valid for the position + + random_vassal = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + this != scope:jester_requester + } + weight = { + base = 1 + modifier = { + has_trait_introverted_trigger = yes + add = 10 + } + modifier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + add = 5 + } + } + save_scope_as = kill_joy + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Employ peasant + option = { + name = hold_court.3040.a + + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:potential_jester + COURT_POS = court_jester_court_position + } + } + + hidden_effect = { + reverse_add_opinion = { + target = scope:potential_jester + modifier = loyal_servant + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:potential_jester + } + custom_tooltip = { + text = generic_cp_discount_tt + scope:potential_jester = { + add_character_flag = cp_discount + } + } + reverse_add_opinion = { + target = scope:jester_requester + modifier = pleased_opinion + opinion = 20 + } + ai_chance = { + base = 5 + + modifier = { + has_trait_extroverted_trigger = yes + add = 2 + } + modifier = { + short_term_gold >= medium_gold_value + add = 5 + } + + ai_value_modifier = { + ai_greed = tiny_chance_impact_negative_ai_value #Recruiting this person means less cost to find a jester + } + } + } + + # Option B: Employ jester requester as jester + option = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:jester_requester + COURT_POS = court_jester_court_position + } + } + name = hold_court.3040.b + + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:jester_requester + } + hidden_effect = { + scope:potential_jester = { + death = { + death_reason = death_vanished #Ripperoni + } + } + } + + ai_chance = { + base = 5 + + modifier = { + opinion = { + target = scope:jester_requester + value <= low_positive_opinion + } + add = 5 + } + modifier = { + has_trait = arbitrary + add = 5 + } + modifier = { + short_term_gold >= medium_gold_value + add = 5 + } + } + } + + # Option C: Employ killjoy as jester + option = { + name = hold_court.3040.c + + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:kill_joy + COURT_POS = court_jester_court_position + } + } + + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:kill_joy + } + scope:kill_joy = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_killjoy_jester + OPINION = -20 + } + } + reverse_add_opinion = { + target = scope:jester_requester + modifier = pleased_opinion + opinion = 35 + } + hidden_effect = { + scope:potential_jester = { + death = { + death_reason = death_vanished + } + } + } + + ai_chance = { + base = 5 + + modifier = { + opinion = { + target = scope:kill_joy + value <= low_positive_opinion + } + add = 5 + } + modifier = { + has_trait = arbitrary + add = 5 + } + modifier = { + short_term_gold >= medium_gold_value + add = 5 + } + } + } + + # Option E: Do nothing + option = { + name = hold_court.3040.e + + hidden_effect = { + scope:potential_jester = { + death = { + death_reason = death_vanished + } + } + } + + ai_chance = { + base = 2 + + modifier = { + has_trait_introverted_trigger = yes + add = 2 + } + + modifier = { + short_term_gold < medium_gold_value + add = 5 + } + } + } + + after = { + scope:jester_requester = { + clear_court_event_participation = yes + } + scope:kill_joy = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +##################################### +# Addressing the Corruption # +# by Bianca Savazzi # +# 3060 # +##################################### + +scripted_trigger hold_court_3060_county_and_holder_trigger = { + county_control <= low_county_control + holder = { + this != root + is_vassal_of = root + basic_is_available_ai = yes + is_adult = yes + has_court_event_flag = no + } +} + +scripted_trigger hold_court_3060_replacement_candidate_trigger = { + basic_is_available_ai = yes + has_court_event_flag = no + is_adult = yes + stewardship >= mediocre_skill_rating + NOT = { is_of_major_or_minor_interest_trigger = { CHARACTER = root } } + can_be_steward_trigger = { COURT_OWNER = scope:county_petitioner } +} + +scripted_effect hold_court_3060_remove_corruption = { + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_inefficient_tax_collection_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_inefficient_tax_collection_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_deserting_levies_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_deserting_levies_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_lackluster_administration_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_lackluster_administration_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_uncooperative_guilds_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_uncooperative_guilds_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_lack_of_sheriffs_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_lack_of_sheriffs_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_lack_of_courts_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_lack_of_courts_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_bandits_rampant_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_bandits_rampant_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_unsafe_highways_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_unsafe_highways_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_smuggling_ring_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_smuggling_ring_modifier + } + } + if = { + limit = { + scope:corrupt_county = { + has_county_modifier = county_corruption_thieves_guild_modifier + } + } + scope:corrupt_county = { + remove_county_modifier = county_corruption_thieves_guild_modifier + } + } +} + +# Banditry is rife in a county and now a vassal is coming to you asking for help. +hold_court.3060 = { + type = court_event + title = hold_court.3060.t + desc = { + desc = hold_court.3060.desc.opening + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + scope:corrupt_county = { + OR = { + has_county_modifier = county_corruption_smuggling_ring_modifier + has_county_modifier = county_corruption_thieves_guild_modifier + } + } + } + desc = hold_court.3060.desc.thieves + } + triggered_desc = { + trigger = { + scope:corrupt_county = { + OR = { + county_control <= low_county_control + has_county_modifier = county_corruption_bandits_rampant_modifier + has_county_modifier = county_corruption_unsafe_highways_modifier + } + } + } + desc = hold_court.3060.desc.bandits + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_inefficient_tax_collection_modifier } + } + desc = hold_court.3060.desc.tax + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_lack_of_sheriffs_modifier } + } + desc = hold_court.3060.desc.sheriffs + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_uncooperative_guilds_modifier } + } + desc = hold_court.3060.desc.guilds + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_deserting_levies_modifier } + } + desc = hold_court.3060.desc.levies + } + triggered_desc = { + trigger = { + scope:corrupt_county = { has_county_modifier = county_corruption_lack_of_courts_modifier } + } + desc = hold_court.3060.desc.courts + } + triggered_desc = { + trigger = { + scope:corrupt_county = { + has_county_modifier = county_corruption_inefficient_census_modifier + has_county_modifier = county_corruption_lackluster_administration_modifier + } + } + desc = hold_court.3060.desc.rulers + } + } + } + desc = hold_court.3060.desc.closing + } + theme = court + lower_left_portrait = { + trigger = { + exists = scope:cp_steward + exists = scope:cp_steward_replacement + } + character = scope:cp_steward + } + lower_right_portrait = { + trigger = { + exists = scope:cp_steward_replacement + } + character = scope:cp_steward_replacement + } + court_scene = { + button_position_character = scope:county_petitioner + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:county_petitioner = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_sub_realm_county = { + hold_court_3060_county_and_holder_trigger = yes + } + NOT = { has_character_flag = hold_court_3060_corrupt_county } + } + + 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_administrative } + } + + immediate = { + #Cooldown flag + add_character_flag = { + flag = hold_court_3060_corrupt_county + years = 10 + } + random_sub_realm_county = { + limit = { hold_court_3060_county_and_holder_trigger = yes } + holder = { + save_scope_as = county_petitioner + assign_quirk_effect = yes + court_event_character_flag_effect = yes + } + save_scope_as = corrupt_county + } + + # Getting random better courtier for Option D + if = { + limit = { + scope:county_petitioner = { + exists = cp:councillor_steward + is_ai = yes + } + } + scope:county_petitioner.cp:councillor_steward = { save_scope_as = cp_steward } + random_courtier = { + limit = { + hold_court_3060_replacement_candidate_trigger = yes + stewardship > scope:cp_steward.stewardship #should be better than the current one to be considered a better replacement + } + save_scope_as = cp_steward_replacement + court_event_character_flag_effect = yes + } + } + else = { + random_courtier = { + limit = { + hold_court_3060_replacement_candidate_trigger = yes + } + save_scope_as = cp_steward_replacement + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Gold + option = { + name = hold_court.3060.a + pay_treasury_or_gold = { + target = scope:county_petitioner + value = medium_treasury_or_gold_value + } + every_sub_realm_county = { + custom = every_low_county_control + limit = { county_control <= low_county_control } + change_county_control = 20 + } + hold_court_3060_remove_corruption = yes + scope:county_petitioner = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + hidden_effect = { + stress_impact = { + greedy = medium_stress_loss + } + } + } + + ai_chance = { + base = 15 + + modifier = { + has_trait = generous + add = 5 + } + modifier = { + has_trait = greedy + add = -15 + } + modifier = { + short_term_treasury_or_gold <= medium_treasury_or_gold_value + factor = 0 + } + } + } + + # Option B: Offer a courtier + option = { + name = hold_court.3060.d + trigger = { + exists = scope:cp_steward_replacement + } + + scope:county_petitioner = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + fire_councillor = scope:cp_steward + assign_councillor_type = { + type = councillor_steward + target = scope:cp_steward_replacement + } + } + every_sub_realm_county = { + custom = every_low_county_control + limit = { county_control <= low_county_control } + change_county_control = 20 + } + hold_court_3060_remove_corruption = yes + + ai_chance = { + base = 0 + } + } + + # Option C: Do nothing + option = { + name = hold_court.3060.c + + ai_chance = { + base = 100 + } + } + + after = { + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:county_petitioner = { + clear_court_event_participation = yes + } + } +} + +##################################### +# Exhibiting your collection # +# by Bianca Savazzi # +# 3080 # +##################################### + +# Antiquarian suggests letting people pay to see your artifacts +hold_court.3080 = { + type = court_event + title = hold_court.3080.t + desc = hold_court.3080.desc + theme = court + cooldown = { years = 5 } + + court_scene = { + button_position_character = scope:antiquarian + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:antiquarian = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_physically_able_ai_adult = yes + has_court_event_flag = no + } + any_character_artifact = { + count >= 2 + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + NOR = { + gold < minor_gold_value + prestige < minor_prestige_value + } + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_court_position_holder = { + type = antiquarian_court_position + limit = { + is_physically_able_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = antiquarian + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Charge money + option = { + name = hold_court.3080.a + custom_tooltip = hold_court.3080.a.tt + add_gold = medium_gold_value + add_character_modifier = { + modifier = petition_event_artifact_exhibition_for_gold + years = 10 + } + stress_impact = { + greedy = medium_stress_loss + arrogant = medium_stress_loss + generous = medium_stress_gain + humble = medium_stress_gain + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + gold < minor_gold_value + add = 5 + } + } + } + + # Option B: Gain Prestige + option = { + name = hold_court.3080.b + custom_tooltip = hold_court.3080.a.tt + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = petition_event_artifact_exhibition_for_prestige + years = 10 + } + stress_impact = { + greedy = minor_stress_gain + arrogant = medium_stress_loss + generous = medium_stress_gain + humble = medium_stress_gain + } + + ai_chance = { + base = 15 + + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = 1 + } + modifier = { + has_trait = ambitious + add = 5 + } + modifier = { + has_trait = arrogant + add = 5 + } + } + } + + # Option C: Not worth the risk + option = { + name = hold_court.3080.c + + ai_chance = { + base = 15 + modifier = { + has_trait = lazy + add = 5 + } + modifier = { + has_trait = paranoid #They're already after me! Why would I invite an increased risk!? + add = 50 + } + } + } + + after = { + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:antiquarian = { + clear_court_event_participation = yes + } + } +} + +##################################### +# Celebrating another culture # +# by Bianca Savazzi # +# 3090 - 3091 # +##################################### + +#A vassal of a minority culture suggest holding a festival/exhibit/faire of their minority Culture + +scripted_trigger hold_court_3090_different_culture_vassal_trigger = { + culture != root.culture + culture = { + cultural_acceptance = { target = root.culture value < hybridization_threshold_value } + } + is_physically_able_ai_adult = yes + has_court_event_flag = no +} + +hold_court.3090 = { + type = court_event + title = hold_court.3090.t + desc = hold_court.3090.desc + theme = court + cooldown = { years = 10 } + + court_scene = { + button_position_character = scope:different_culture_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:different_culture_vassal = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_vassal = { + hold_court_3090_different_culture_vassal_trigger = yes + } + } + + immediate = { + random_vassal = { + limit = { + hold_court_3090_different_culture_vassal_trigger = yes + } + save_scope_as = different_culture_vassal + court_event_character_flag_effect = yes + assign_quirk_effect = yes # So that they have a quirk in loc + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #More common if you're currently Promoting Acceptance + weight_multiplier = { + base = 0.5 + modifier = { + add = 10 + exists = cp:councillor_steward + cp:councillor_steward = { + is_performing_council_task = task_accept_culture + } + } + modifier = { + add = 0.5 + short_term_gold < minor_gold_value + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + # Option A: Celebrate both cultures! + option = { + name = hold_court.3090.a + remove_treasury_or_gold = major_treasury_or_gold_value + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:different_culture_vassal + opinion = 40 + } + if = { + limit = { + any_vassal = { + is_ai = no + has_court_event_flag = no + scope:different_culture_vassal != this + culture = scope:different_culture_vassal.culture + } + } + every_vassal = { + custom = custom.every_vassal_of_target_culture + limit = { + culture = scope:different_culture_vassal.culture + has_court_event_flag = no + is_ai = no + } + add_opinion = { + target = root + opinion = 10 + modifier = respect_opinion + } + } + } + + stress_impact = { + greedy = major_stress_gain #SO. MUCH. SPENT. MONEY. + arrogant = medium_stress_gain #Presenting oursselves as equals!? BAH! + compassionate = major_stress_loss #Promoting understanding between the two, yaaaaaay! + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 1 + ai_compassion = 0.5 + } + modifier = { + has_trait = compassionate + add = 50 + } + modifier = { + short_term_treasury_or_gold < major_treasury_or_gold_value #AI don't do it if they can't afford it + factor = 0 + } + } + } + + # Option B: Their culture in the capital! + option = { + name = hold_court.3090.b + remove_treasury_or_gold = medium_treasury_or_gold_value + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = low_positive_culture_acceptance + 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 = { + scope:different_culture_vassal != this + culture = scope:different_culture_vassal.culture + } + } + every_vassal = { + custom = custom.every_vassal_of_target_culture + limit = { + culture = scope:different_culture_vassal.culture + } + add_opinion = { + target = root + opinion = 5 + modifier = respect_opinion + } + } + } + stress_impact = { + greedy = medium_stress_loss + arrogant = medium_stress_loss + generous = medium_stress_gain + humble = medium_stress_gain + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + short_term_treasury_or_gold < medium_treasury_or_gold_value #AI don't do it if they can't afford it + factor = 0 + } + } + } + + # Option C: OUR culture, in their area + option = { + name = hold_court.3090.c + remove_treasury_or_gold = minor_treasury_or_gold_value + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:different_culture_vassal + opinion = -10 + } + stress_impact = { + arrogant = medium_stress_loss + humble = medium_stress_gain + } + + ai_chance = { + base = 15 + + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + } + modifier = { + short_term_treasury_or_gold < minor_treasury_or_gold_value #AI don't do it if they can't afford it + factor = 0 + } + modifier = { + has_trait = arrogant + add = 5 + } + } + } + + # Option D: Nah + option = { + name = hold_court.3090.d + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:different_culture_vassal + opinion = -30 + } + ai_chance = { + base = 15 + modifier = { + has_trait = lazy + add = 5 + } + modifier = { + short_term_treasury_or_gold < minor_treasury_or_gold_value #AI won't do anything if they can't afford it + factor = 2 + } + } + } + + after = { + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:different_culture_vassal = { + clear_court_event_participation = yes + } + } +} + +#Vassal wants to peacock a culture that's close to hybridizing with your culture + +scripted_trigger hold_court_3091_different_culture_vassal_trigger = { + culture != root.culture + culture = { + cultural_acceptance = { target = root.culture value >= hybridization_threshold_value } + } + is_physically_able_ai_adult = yes + has_court_event_flag = no +} + +hold_court.3091 = { + type = court_event + title = hold_court.3091.t + desc = hold_court.3091.desc + theme = court + cooldown = { years = 10 } + + court_scene = { + button_position_character = scope:same_culture_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:same_culture_vassal = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_vassal = { + hold_court_3091_different_culture_vassal_trigger = yes + } + any_vassal = { + culture = root.culture + is_physically_able_ai_adult = yes + has_court_event_flag = no + } + } + + immediate = { + random_vassal = { + limit = { + hold_court_3091_different_culture_vassal_trigger = yes + } + save_scope_as = different_culture_vassal #Used to track the culture that's close to hybridization + } + + random_vassal = { + limit = { + culture = root.culture + is_physically_able_ai_adult = yes + has_court_event_flag = no + } + weight = { + base = 1 + ai_value_modifier = { + ai_compassion = -1 #More likely to pick a vassal with less compassion and understanding + } + modifier = { + add = 10 + has_trait = arrogant #believes they are better + } + modifier = { + add = 10 + has_trait = zealous #zealous and not tolerant + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + } + } + save_scope_as = same_culture_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #More common if you're currently Promoting Culture + weight_multiplier = { + base = 0.5 + modifier = { + add = 10 + exists = cp:councillor_steward + cp:councillor_steward = { + is_performing_council_task = task_promote_culture + } + } + modifier = { + add = 0.5 + short_term_gold < minor_gold_value + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + # Option A: Peacocking to the max, strut your culture struff + option = { + name = hold_court.3091.a + add_prestige = major_prestige_gain + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:same_culture_vassal + opinion = 40 + } + every_vassal = { + custom = custom.every_vassal_of_target_culture + limit = { + culture = scope:different_culture_vassal.culture + } + add_opinion = { + target = root + opinion = -10 + modifier = annoyed_opinion + } + } + + stress_impact = { + arrogant = major_stress_loss #Yeah, we awesome + humble = major_stress_gain #I don't think we should claim to be better + compassionate = major_stress_gain #but... why not understanding between us? + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_compassion = -0.5 + } + } + } + + # Option B: Humblebrag + option = { + name = hold_court.3091.b + add_prestige = medium_prestige_gain + culture = { + change_cultural_acceptance = { + target = scope:different_culture_vassal.culture + value = miniscule_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:same_culture_vassal + opinion = 20 + } + every_vassal = { + custom = custom.every_vassal_of_target_culture + limit = { + culture = scope:different_culture_vassal.culture + } + add_opinion = { + target = root + opinion = -5 + modifier = annoyed_opinion + } + } + stress_impact = { + arrogant = medium_stress_loss + generous = medium_stress_gain + humble = medium_stress_gain + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + # Option C: Nah + option = { + name = hold_court.3091.c + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:same_culture_vassal + opinion = -30 + } + ai_chance = { + base = 15 + modifier = { + has_trait = lazy + add = 5 + } + } + } + + after = { + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:same_culture_vassal = { + clear_court_event_participation = yes + } + } +} + + + + + + + + + + +################################################## +# Isabella + +################################################## +# 4001 Scourge - Your heir is a terrible person, vassals request new heir +# 4500 Endless Poetry - Great Poet appears at court +# 4600 SheHe who makes a Beast out of HerHimself... - Peasants are convinced tyrannical ruler is an actual monster +# 4700 An End to Agony - Vassals discuss the state of your prisons +# 4800 I Should Like a Veal Cutlet - House arrest prisoner demands fancy dinner +# 4900 In Ancient Times... - Dodgy genealogist offers to trace your lineage back to mythic heroes +################################################## + +################################################## +# Scourge +# by Isabella Welch +# 4001 +################################################## + +# Your heir is a terrible person, vassals request new heir +hold_court.4001 = { + type = court_event + title = hold_court.4001.t + desc = { + desc = hold_court.4001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = heir_gets_in_street_fights + } + desc = hold_court.4001.heir_street_fight + } + triggered_desc = { + trigger = { + has_character_flag = heir_robbed_me + } + desc = hold_court.4001.heir_robbery + } + triggered_desc = { + trigger = { + has_character_flag = heir_lives_in_tavern + } + desc = hold_court.4001.heir_tavern + } + triggered_desc = { + trigger = { + has_character_flag = heir_poor_diplomat + } + desc = hold_court.4001.heir_diplomacy_failure + } + triggered_desc = { + trigger = { + has_character_flag = heir_personally_hated + } + desc = hold_court.4001.heir_hated + } + + } + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = has_protective_spouse + } + desc = hold_court.4001.protective_parent + } + desc = hold_court.4001.accusation_default + } + desc = hold_court.4001.heir_admission + } + theme = diplomacy_family_focus + lower_left_portrait = scope:protective_parent + lower_right_portrait = scope:preferred_heir + court_scene = { + button_position_character = scope:annoyed_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:annoyed_vassal = { + group = petitioners_group + animation = rage + } + scope:annoying_heir = { + group = petitioners_group + animation = scheme + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = has_had_disliked_heir_event } + any_vassal = { + count >= 1 + has_court_event_flag = no + is_ai = yes + } + root.primary_heir = { + has_court_event_flag = no + is_ai = yes + age >= 13 + is_player_heir_of = root + is_child_of = root + OR = { + has_trait = arrogant + has_trait = arbitrary + has_trait = wrathful + has_trait = sadistic + has_trait = lunatic + has_trait = callous + has_trait = drunkard + has_trait = deceitful + has_trait = greedy + has_trait = lazy + has_trait = lustful + has_trait = stubborn + has_trait = rakish + has_trait = fornicator + has_trait = adulterer + has_trait = deviant + has_trait = rowdy + has_trait = murderer + has_trait = vengeful + has_trait = torturer + any_vassal = { + opinion = { + target = root.primary_heir + value <= medium_negative_opinion + } + } + diplomacy <= low_skill_rating + } + } + any_child = { + NOT = { is_player_heir_of = root } + NOT = { has_trait = bastard } + has_court_event_flag = no + is_ai = yes + character_gender_can_inherit_from_trigger = { CHARACTER = root } + is_child_of = root + } + } + + 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_intrigue } + } + + immediate = { + save_scope_as = actor # for loc + add_character_flag = { + flag = has_had_disliked_heir_event + days = 1825 + } + primary_heir = { + save_scope_as = annoying_heir + court_event_character_flag_effect = yes + } + random_child = { + limit = { + NOT = { is_player_heir_of = root } + NOT = { has_trait = bastard } + has_court_event_flag = no + character_gender_can_inherit_from_trigger = { CHARACTER = root } + is_child_of = root + is_ai = yes + } + court_event_character_flag_effect = yes + save_scope_as = preferred_heir + } + random_vassal = { + weight = { + base = 1 + modifier = { + has_relation_rival = scope:annoying_heir + factor = 20 + } + modifier = { + factor = 20 + opinion = { + target = scope:annoying_heir + value <= medium_negative_opinion + } + } + modifier = { + factor = 5 + is_powerful_vassal = yes + } + } + limit = { + is_ai = yes + has_court_event_flag = no + NOT = { + scope:annoying_heir = { + is_child_of = prev + } + } + } + save_scope_as = annoyed_vassal + court_event_character_flag_effect = yes + } + if = { + limit = { + any_spouse = { + is_parent_of = scope:annoying_heir + has_court_event_flag = no + is_ai = no + } + } + random_spouse = { + limit = { + is_parent_of = scope:annoying_heir + has_court_event_flag = no + is_ai = no + } + save_scope_as = protective_parent + } + add_character_flag = has_protective_spouse + } + if = { + limit = { + scope:annoying_heir = { + OR = { + has_trait = wrathful + has_trait = sadistic + has_trait = vengeful + has_trait = torturer + has_trait = murderer + has_trait = callous + has_trait = stubborn + } + } + } + add_character_flag = heir_gets_in_street_fights + + } + else_if = { + limit = { + scope:annoying_heir = { + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = deceitful + has_trait = arbitrary + has_trait = lunatic + } + } + } + add_character_flag = heir_robbed_me + } + else_if = { + limit = { + scope:annoying_heir = { + OR = { + has_trait = drunkard + has_trait = lazy + has_trait = fornicator + has_trait = lustful + has_trait = adulterer + has_trait = rakish + has_trait = rowdy + } + } + } + add_character_flag = heir_lives_in_tavern + } + + else_if = { + limit = { + scope:annoying_heir = { + diplomacy <= low_skill_rating + } + } + add_character_flag = heir_poor_diplomat + } + else = { + add_character_flag = heir_personally_hated + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.4001.b + set_designated_heir = scope:preferred_heir + scope:annoying_heir = { + disinherit_effect = { DISINHERITOR = root } + } + stress_impact = { + family_first = medium_stress_gain + } + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + opinion = 15 + target = root + modifier = grateful_opinion + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_rationality = -0.5 + ai_sociability = 0.5 + } + } + } + option = { + name = hold_court.4001.d + trigger = { + scope:preferred_heir = { + NOR = { + has_trait = arrogant + has_trait = arbitrary + has_trait = wrathful + has_trait = sadistic + has_trait = lunatic + has_trait = callous + has_trait = drunkard + has_trait = deceitful + has_trait = greedy + has_trait = lazy + has_trait = lustful + has_trait = stubborn + has_trait = rakish + has_trait = fornicator + has_trait = adulterer + has_trait = deviant + has_trait = rowdy + has_trait = murderer + has_trait = vengeful + has_trait = torturer + } + } + scope:annoying_heir = { + number_of_commander_traits > 0 + + } + } + scope:annoying_heir = { + if = { + limit = { + NOT = { has_trait = reckless } + } + add_trait = reckless + } + add_prowess_skill = 4 + } + ai_chance = { + base =50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = hold_court.4001.a + add_legitimacy = miniscule_legitimacy_gain + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -0.75 + ai_rationality = -0.5 + ai_sociability = -0.5 + } + } + } + + after = { + remove_character_flag = heir_personally_hated + remove_character_flag = heir_poor_diplomat + remove_character_flag = heir_lives_in_tavern + remove_character_flag = heir_robbed_me + remove_character_flag = heir_gets_in_street_fights + remove_character_flag = has_protective_spouse + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:annoyed_vassal = { + clear_court_event_participation = yes + } + scope:annoying_heir = { + clear_court_event_participation = yes + } + } +} + +################################################## +# Endless Poetry +# by Isabella Welch +# 4500 +################################################## + +# Demanding poet! +scripted_trigger demanding_poet_scripted_gender_trigger = { + primary_title = { + OR = { + has_title_law = female_only_law + has_title_law = female_preference_law + } + } + NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_male } } +} + +hold_court.4500 = { + type = court_event + title = hold_court.4500.t + desc = hold_court.4500.desc + theme = learning_scholarship_focus + court_scene = { + button_position_character = scope:demanding_poet + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:demanding_poet = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + is_ai = no + NOT = { + has_character_flag = has_had_demanding_poet_event + NOT = { has_free_council_slot = yes } + } + can_employ_court_position_type = court_poet_court_position + NOT = { employs_court_position = court_poet_court_position } + } + + 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_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_demanding_poet_event + days = 7300 + } + save_scope_as = realm_holder + + if = { + limit = { demanding_poet_scripted_gender_trigger = yes } + create_character = { + location = root.capital_province + template = demanding_poet_character + gender = female + save_scope_as = demanding_poet + } + } + else = { + create_character = { + location = root.capital_province + template = demanding_poet_character + gender = male + save_scope_as = demanding_poet + } + } + hidden_effect = { + add_courtier = scope:demanding_poet + scope:demanding_poet = { + give_nickname = nick_the_poet + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.4500.b + change_current_court_grandeur = minor_court_grandeur_gain + replace_existing_position_with_character_in_current_scope_court_effect = { + CHARACTER = scope:demanding_poet + POSITION = court_poet_court_position + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.25 + ai_rationality = 0.75 + } + } + } + option = { + name = hold_court.4500.a + scope:demanding_poet = { silent_disappearance_effect = yes } + stress_impact = { + lifestyle_poet = minor_stress_gain + journaller = medium_stress_gain + arbitrary = minor_stress_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = -0.25 + ai_rationality = 0.75 + } + } + } + after = { + scope:demanding_poet = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# SheHe who makes a Beast out of HerHimself... +# by Isabella Welch +# 4600 +################################################## + +scripted_trigger cannibal_follow_up_trigger = { + scope:possible_cannibal_ruler = { + is_alive = yes + is_cannibal_trigger = no + } + scope:cannibal_vassal = { + is_alive = yes + is_cannibal_trigger = yes + is_ai = yes + has_court_event_flag = no + } +} + +# Peasants are convinced you're a literal monster +hold_court.4600 = { + type = court_event + title = hold_court.4600.t + desc = hold_court.4600.desc + theme = intrigue_intimidation_focus + override_background = { + reference = throne_room + } + lower_left_portrait = scope:chancellor + court_scene = { + button_position_character = scope:challenger_peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:challenger_peasant = { + group = petitioners_group + animation = rage + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = has_had_monstrous_ruler_event } + OR = { + tyranny >= medium_tyranny + has_trait = torturer + has_trait = schemer + has_trait = sadistic + AND = { + is_witch_trigger = yes + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { 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 } + } + } + OR = { # I care about dread + has_focus = intrigue_skulduggery_focus + has_focus = intrigue_intimidation_focus + has_focus = diplomacy_majesty_focus + has_focus = martial_authority_focus + dread <= low_dread + } + exists = cp:councillor_chancellor + cp:councillor_chancellor = { + has_court_event_flag = no + is_ai = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ## The beast... + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + ## & his library... + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_monstrous_ruler_event + years = 5 + } + save_scope_as = possible_cannibal_ruler + create_character = { + location = root.capital_province + template = challenger_peasant_character + save_scope_as = challenger_peasant + + } + scope:challenger_peasant = { + court_event_character_flag_effect = yes + } + cp:councillor_chancellor = { + save_scope_as = chancellor + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.4600.a + trigger = { + has_trait = eccentric + } + add_prestige = medium_prestige_gain + change_current_court_grandeur = minor_court_grandeur_gain + add_intrigue_lifestyle_perk_points = 1 + every_held_county = { + custom = custom.every_held_county + add_county_modifier = { + modifier = county_confident_in_humanity_modifier + years = 25 + } + } + add_dread = medium_dread_gain + ai_chance = { + base = 200 + ai_value_modifier = { + ai_boldness = 0.25 + ai_rationality = 0.25 + } + } + } + + option = { + name = hold_court.4600.b + add_dread = medium_dread_gain + if = { + limit = { + any_vassal_or_below = { + is_ai = yes + OR = { + has_trait = cannibal + any_secret = { type = secret_cannibal } + } + } + } + random_vassal_or_below = { + limit = { + is_ai = yes + has_court_event_flag = no + OR = { + has_trait = cannibal + any_secret = { type = secret_cannibal } + } + NOR = { + has_relation_lover = root + has_relation_friend = root + has_relation_rival = root + has_relation_soulmate = root + is_close_family_of = root + } + } + save_scope_as = cannibal_vassal + } + trigger_event = { + id = hold_court.4601 + days = { 30 40 } + } + } + give_nickname = nick_the_child_of_devilgod + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.25 + ai_honor = -0.75 + } + } + } + + option = { + name = hold_court.4600.c + flavor = hold_court.4600.c.tt + add_dread = major_dread_loss + if = { + limit = { has_trait = sadistic } + remove_trait = sadistic + add_trait_force_tooltip = compassionate + } + else_if = { + limit = { has_trait = callous } + remove_trait = callous + add_trait_force_tooltip = compassionate + } + if = { + limit = { + is_cannibal_trigger = yes + } + remove_cannibal_secret_or_trait_effect = yes + } + if = { + limit = { + is_witch_trigger = yes + } + remove_witch_secret_or_trait_effect = yes + } + every_held_county = { + custom = custom.every_held_county + add_county_modifier = { + modifier = county_confident_in_humanity_modifier + years = 25 + } + } + stress_impact = { + sadistic = massive_stress_impact_gain + callous = massive_stress_impact_gain + confider = medium_stress_loss + just = medium_stress_loss + } + ai_chance = { + base = 0 # We don't want the AI changing their traits + } + } + + option = { + name = hold_court.4600.d + ai_chance = { + base = 15 + ai_value_modifier = { + ai_boldness = -0.25 + ai_rationality = 1 + } + } + } + + after = { + hidden_effect = { + scope:challenger_peasant = { + clear_court_event_participation = yes + death = { + death_reason = death_vanished + } + } + } + scope:chancellor = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.4601 = { + type = letter_event + opening = { desc = hold_court.4601.t } + desc = hold_court.4601.d + sender = scope:cannibal_vassal + + trigger = { + cannibal_follow_up_trigger = yes + } + + option = { + name = hold_court.4601.a + add_prestige = minor_prestige_gain + trigger_event = { + id = hold_court.4602 + days = { 7 9 } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 0.25 + } + } + } + option = { + name = hold_court.4601.b + add_prestige = minor_prestige_loss + scope:cannibal_vassal = { + add_opinion = { + modifier = rejected_invitation_opinion + opinion = -10 + target = root + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -0.25 + } + } + } +} + +hold_court.4602 = { + type = character_event + title = hold_court.4602.t + desc = hold_court.4602.desc + theme = murder_scheme + left_portrait = { + character = scope:cannibal_vassal + animation = flirtation + } + + trigger = { + cannibal_follow_up_trigger = yes + } + + immediate = { + scope:cannibal_vassal = { + if = { + limit = { + any_secret = { + type = secret_cannibal + NOT = { any_secret_knower = { this = root } } + } + } + random_secret = { + type = secret_cannibal + reveal_to = root + } + } + } + } + + option = { + name = hold_court.4602.a + give_cannibal_secret_or_trait_effect = yes + scope:cannibal_vassal = { + add_opinion = { + target = root + modifier = also_cannibal + } + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_rationality = -0.75 + } + modifier = { + has_trait = gluttonous + add = 20 + } + } + } + + option = { + name = hold_court.4602.b + if = { + limit = { + scope:cannibal_vassal = { is_attracted_to_gender_of = root } + is_attracted_to_gender_of = scope:cannibal_vassal + } + set_relation_lover = { reason = lover_cannibal_seduction target = scope:cannibal_vassal } + } + else = { + set_relation_friend = { reason = friend_private_feast target = scope:cannibal_vassal } + } + increase_wounds_effect = { REASON = eaten } + scope:cannibal_vassal = { + add_opinion = { + target = root + opinion = 40 + modifier = delicious_morsel_opinion + } + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_rationality = -0.75 + } + modifier = { + has_trait = lustful + add = 20 + } + } + } + + option = { + name = hold_court.4602.c + trigger = { + is_cannibal_trigger = no + } + add_opinion = { + target = scope:cannibal_vassal + opinion = -50 + modifier = tried_to_eat_me_opinion + } + scope:cannibal_vassal = { + add_opinion = { + target = root + opinion = -20 + modifier = rejected_opinion + } + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 0.75 + } + modifier = { + has_trait = gluttonous + add = -20 + } + } + } +} + +################################################## +# In Ancient Times... +# by Isabella Welch +# 4900 +################################################## + +# Shady genealogist offers to write up your legendary family history +hold_court.4900 = { + type = court_event + title = hold_court.4900.t + desc = hold_court.4900.desc + theme = diplomacy_family_focus + court_scene = { + button_position_character = scope:suspicious_genealogist + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:suspicious_genealogist = { + group = petitioners_group + animation = scheme + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = has_had_suspicious_genealogist_event } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_ai = yes + } + OR = { + AND = { + is_female = yes + mother ?= { + mother ?= { + mother ?= { + mother ?= { + exists = mother + } + } + } + } + } + AND = { + is_male = yes + father ?= { + father ?= { + father ?= { + father ?= { + exists = father + } + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_suspicious_genealogist_event + years = 5 + } + save_scope_as = ruler_history_target + create_character = { + location = root.capital_province + template = suspicious_genealogist_character + save_scope_as = suspicious_genealogist + } + scope:suspicious_genealogist = { + court_event_character_flag_effect = yes + } + primary_title = { save_scope_as = target_title } + grab_mythical_founder_effect = yes + cp:councillor_court_chaplain = { + save_scope_as = chaplain + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { + name = hold_court.4900.e + trigger = { + NOT = { exists = promoted_legend } + has_dlc_feature = legends + NOT = { has_game_rule = historical_legends_only } + } + create_legend_seed = { + type = legitimizing + quality = famed + chronicle = ancestral_glory_not_in_history + properties = { + ancestor_flag = root.var:mythical_ancestor_var + title = root.primary_title + } + } + stress_impact = { + arrogant = major_stress_impact_loss + honest = minor_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 0.75 + ai_honor = 0.75 + } + } + } + + option = { + name = hold_court.4900.a + trigger = { + root.dynasty = { + dynasty_prestige_level >= low_dynasty_prestige_level + dynasty_prestige_level < high_dynasty_prestige_level + } + } + root.dynasty = { add_dynasty_prestige = medium_dynasty_prestige_gain } + hidden_effect = { + scope:suspicious_genealogist = { + death = { + death_reason = death_vanished + } + } + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 0.75 + ai_honor = 0.75 + } + } + } + + option = { + name = hold_court.4900.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= medium_gold_value + } + } + change_current_court_grandeur = major_court_grandeur_gain + trigger_event = { + id = hold_court.4901 + days = { 1 2 } + } + remove_short_term_gold = minor_gold_value + ai_chance = { + base = 25 + } + } + + option = { + name = hold_court.4900.c + trigger = { + root.dynasty = { + dynasty_prestige_level >= high_dynasty_prestige_level + } + } + root.dynasty = { add_dynasty_prestige = medium_dynasty_prestige_gain } + hidden_effect = { + scope:suspicious_genealogist = { + death = { + death_reason = death_vanished + } + } + } + ai_chance = { + base = 25 + } + } + + option = { + name = hold_court.4900.d + trigger = { + root.dynasty = { + dynasty_prestige_level < low_dynasty_prestige_level + } + } + root.dynasty = { add_dynasty_prestige = medium_dynasty_prestige_gain } + hidden_effect = { + scope:suspicious_genealogist = { + death = { + death_reason = death_vanished + } + } + } + ai_chance = { + base = 25 + } + } + + after = { + scope:chaplain = { + clear_court_event_participation = yes + } + scope:suspicious_genealogist = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# the reading of the family lineage... +hold_court.4901 = { + type = character_event + title = hold_court.4900.t + theme = diplomacy_family_focus + desc = { + desc = hold_court.4901.desc.intro + first_valid = { + triggered_desc = { + trigger = { + is_female = yes + } + desc = hold_court.4901.mothers + } + triggered_desc = { + trigger = { + is_male = yes + } + desc = hold_court.4901.fathers + } + } + desc = hold_court.4901.desc.outro + } + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:suspicious_genealogist + animation = scheme + } + + trigger = { + scope:suspicious_genealogist = { is_alive = yes } + scope:ruler_history_target = { is_alive = yes } + } + + immediate = { + if = { + limit = { is_female = yes } + root.mother = { + save_scope_as = mother_1 + this.mother = { + save_scope_as = mother_2 + this.mother = { + save_scope_as = mother_3 + this.mother = { + save_scope_as = mother_4 + this.mother = { + save_scope_as = mother_5 + } + } + } + } + } + } + if = { + limit = { is_male = yes } + root.father = { + save_scope_as = father_1 + this.father = { + save_scope_as = father_2 + this.father = { + save_scope_as = father_3 + this.father = { + save_scope_as = father_4 + this.father = { + save_scope_as = father_5 + } + } + } + } + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { + name = hold_court.4901.a + flavor = hold_court.4901.a.tt + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = bored_opinion + opinion = -5 + } + } + stress_impact = { + diligent = medium_stress_gain + patient = medium_stress_gain + family_first = medium_stress_gain + + } + every_child = { + limit = { + age < 15 + has_education_diplomacy_trigger = yes + } + add_diplomacy_skill = 2 + } + every_child = { + limit = { + has_trait = bastard + } + add_opinion = { + target = root + opinion = -15 + modifier = flaunted_lineage_opinion + } + } + ai_chance = { + base = 25 + modifier = { + has_trait = family_first + add = 50 + } + } + } + option = { + name = hold_court.4901.b + every_courtier_or_guest = { + limit = { NOT = { is_close_or_extended_family_of = root } } + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = bored_opinion + opinion = -5 + } + } + stress_impact = { + humble = major_stress_gain + family_first = minor_stress_loss + } + every_close_or_extended_family_member = { + limit = { + NOR = { + is_courtier_of = root + } + } + custom = all_family_members + add_opinion = { + target = root + modifier = flaunted_lineage_opinion + opinion = 15 + } + } + ai_chance = { + base = 25 + modifier = { + has_trait = patient + add = 50 + } + } + } + option = { + name = hold_court.4901.c + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 5 + } + } + stress_impact = { + impatient = major_stress_loss + } + ai_chance = { + base = 25 + modifier = { + has_trait = impatient + add = 50 + } + } + } + + after = { + hidden_effect = { + scope:suspicious_genealogist = { + death = { + death_reason = death_vanished + } + } + } + } +} + + + + + + + + + + +################################################## +# Linnea + +################################################## +# 5010 - 5019 Out of Control +# 5020 - 5029 Dancing Plague +# 5030 - 5039 New Written Language +################################################## + +################################################## +# Out of Control +# by Linnéa Thimrén +# 5010 - 5019 +################################################## + +# Low control - give control to low control counties +hold_court.5010 = { + type = court_event + title = hold_court.5010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:marshal + } + desc = hold_court.5010.desc_marshal + } + desc = hold_court.5010.desc + } + desc = hold_court.5010.desc.outro + } + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + left_portrait = { + character = scope:peasant + animation = beg + } + lower_right_portrait = scope:portrait + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + NOT = { has_character_flag = had_event_hold_court_5010 } + any_sub_realm_county = { + county_control < medium_county_control + NOT = { has_county_modifier = county_increased_presence_modifier } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + exists = cp:councillor_marshal + cp:councillor_marshal = { + is_performing_council_task = task_increase_control + is_available = yes #Not currently travelling or attending activity + location.county ?= { + county_control < medium_county_control + NOT = { has_county_modifier = county_increased_presence_modifier } + } + } + } + modifier = { + add = 0.25 + any_sub_realm_county = { + county_control <= low_county_control + NOT = { has_county_modifier = county_increased_presence_modifier } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = had_event_hold_court_5010 + years = 10 + } + every_sub_realm_county = { + limit = { + county_control < medium_county_control + NOT = { has_county_modifier = county_increased_presence_modifier } + } + add_to_list = potential_county + } + random_in_list = { + list = potential_county + limit = { + exists = root.cp:councillor_marshal + root.cp:councillor_marshal = { + is_performing_council_task = task_increase_control + is_available = yes #Not currently travelling or attending activity + councillor_task_target = prev.title_province + } + } + alternative_limit = { + county_control <= low_county_control + } + alternative_limit = { + always = yes + } + save_scope_as = county + } + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + trait = compassionate + save_scope_as = peasant + } + scope:peasant = { + court_event_character_flag_effect = yes + } + #To save the most relevant character for loc and portrait + if = { + limit = { + exists = cp:councillor_marshal + cp:councillor_marshal = { + has_court_event_flag = no + is_ai = yes + is_performing_council_task = task_increase_control + councillor_task_target = scope:county.title_province + } + } + cp:councillor_marshal = { + save_scope_as = marshal + save_scope_as = portrait + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + scope:county.holder != root + scope:county.holder = { has_court_event_flag = no } + } + scope:county.holder = { + save_scope_as = vassal + save_scope_as = portrait + court_event_character_flag_effect = yes + } + } + else = { + save_scope_as = portrait + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + + option = { # Let's go for it + name = hold_court.5010.a + + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:county = { + change_county_control = medium_county_control_gain + } + every_sub_realm_county = { + custom = every_low_county_control + limit = { + county_control <= low_county_control + NOT = { this = scope:county } + } + change_county_control = minor_county_control_gain + } + stress_impact = { + compassionate = medium_stress_impact_loss + callous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -1 + ai_compassion = 1 + } + modifier = { + factor = 0 + gold <= medium_treasury_or_gold_value + } + } + } + + option = { # We need more violence! + name = hold_court.5010.b + scope:county = { + add_county_modifier = { + modifier = county_increased_presence_modifier + days = 3650 + } + change_county_control = major_county_control_gain + } + every_sub_realm_county = { + custom = every_low_county_control + limit = { + county_control <= low_county_control + NOT = { this = scope:county } + } + add_county_modifier = { + modifier = county_increased_presence_modifier + days = 3650 + } + change_county_control = major_county_control_gain + } + stress_impact = { + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + } + } + + option = { # Idc lol + name = hold_court.5010.c + stress_impact = { + compassionate = minor_stress_impact_gain + } + } + + after = { + if = { + limit = { + exists = scope:marshal + } + clear_court_event_participation = yes + } + else_if = { + limit = { + exists = scope:vassal + } + clear_court_event_participation = yes + } + hidden_effect = { + scope:peasant = { + clear_court_event_participation = yes + } + if = { + limit = { + scope:county = { + has_county_modifier = county_increased_presence_modifier + } + } + scope:peasant = { + death = { + death_reason = death_hanged + } + } + } + else_if = { + limit = { + scope:county.holder != root + scope:county.holder.capital_province = { + local_pool_is_full_trigger = no + } + } + scope:peasant = { + move_to_pool_at = scope:county.holder.capital_province + } + } + else = { + scope:peasant = { + death = { + death_reason = death_vanished + } + } + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# New Written Language +# by Linnéa Thimrén +# 5030 - 5039 +################################################## + +# Minority gender in your court develops their own written language (think Nüshu) +scripted_trigger hold_court_5030_courtier_basic_trigger = { + has_court_event_flag = no + is_ai = yes + faith = root.faith + is_imprisoned = no + NOT = { has_trait = incapable } + OR = { + AND = { + OR = { + root = { has_realm_law = male_only_law } + root = { has_realm_law = male_preference_law } + } + is_female = yes + } + AND = { + OR = { + root = { has_realm_law = female_only_law } + root = { has_realm_law = female_preference_law } + } + is_male = yes + } + } +} +scripted_trigger hold_court_5030_courtier_adult_trigger = { + hold_court_5030_courtier_basic_trigger = yes + is_adult = yes + NOT = { has_court_position = court_tutor_court_position } +} +hold_court.5030 = { + type = court_event + title = hold_court.5030.t + desc = hold_court.5030.desc + theme = realm + override_sound = { reference = event:/SFX/Events/Themes/sfx_event_theme_type_generic } + lower_right_portrait = scope:court_tutor + court_scene = { + button_position_character = scope:courtier + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:courtier = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_courtier = { + hold_court_5030_courtier_adult_trigger = yes + } + OR = { + AND = { + OR = { + root = { has_realm_law = male_only_law } + root = { has_realm_law = male_preference_law } + } + is_female = yes + } + AND = { + OR = { + root = { has_realm_law = female_only_law } + root = { has_realm_law = female_preference_law } + } + is_male = yes + } + } + OR = { # Make sure you care about schemes and such + has_lifestyle = intrigue_lifestyle + any_scheme = { is_hostile = yes } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + cooldown = { years = 40 } + + immediate = { + random_courtier = { + limit = { + hold_court_5030_courtier_adult_trigger = yes + } + weight = { + base = 1 + compare_modifier = { + value = learning + multiplier = 2 + } + } + save_scope_as = courtier + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_physically_able_adult = yes + has_court_event_flag = no + is_ai = yes + } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { + is_physically_able_adult = yes + has_court_event_flag = no + is_ai = yes + } + save_scope_as = court_tutor + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Allow it + name = hold_court.5030.a + #If you're part of the gender minority you get a boost as well + if = { + limit = { + OR = { + AND = { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + is_female = yes + } + AND = { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + is_male = yes + } + } + } + if = { + limit = { + is_male = yes + } + add_character_modifier = { + modifier = hold_court_written_language_men_advanced_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = hold_court_written_language_women_advanced_modifier + years = 20 + } + } + } + #Boost all courtiers of the relevant gender + every_courtier = { + limit = { + hold_court_5030_courtier_basic_trigger = yes + } + custom = hold_court.5030.courtiers + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + if = { + limit = { + is_male = yes + } + add_character_modifier = { + modifier = hold_court_written_language_men_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = hold_court_written_language_women_modifier + years = 20 + } + } + } + } + + option = { # Embrace it and task your Court Tutor with teaching it + name = hold_court.5030.b + trigger = { + exists = scope:court_tutor + } + #If you're part of the gender minority you get a boost as well + if = { + limit = { + OR = { + AND = { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + is_female = yes + } + AND = { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + is_male = yes + } + } + } + if = { + limit = { + is_male = yes + } + add_character_modifier = { + modifier = hold_court_written_language_men_advanced_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = hold_court_written_language_women_advanced_modifier + years = 20 + } + } + } + #Boost all courtiers of the relevant gender + every_courtier = { + limit = { + hold_court_5030_courtier_basic_trigger = yes + } + custom = hold_court.5030.courtiers + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + if = { + limit = { + is_male = yes + } + add_character_modifier = { + modifier = hold_court_written_language_men_advanced_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = hold_court_written_language_women_advanced_modifier + years = 20 + } + } + } + } + + option = { # Use their expertise for other things + name = hold_court.5030.c + scope:courtier = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + add_character_modifier = { + modifier = invented_code_resistance_modifier + years = 5 + } + stress_impact = { + paranoid = medium_stress_impact_loss + } + } + + after = { + scope:courtier = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:court_tutor } + scope:court_tutor = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + + + + + + + + + + +################################################## +# Claudia + +################################################## +# 6000 Empty Granaries +# 6010 Land Grants +# 6020 Hawks and Doves +# 6030 From Beyond the Border +# 6040 A Lost Treasure +# 6050 - 6051 A Holy Tomb +# 6060 A Convenient Offer +# 6070 Budding Ally +# 6080 Settling the [people] +# 6090 Heretics at Large +# 6100 - 6101 A Land at War +# 6110 A Ravaged Land +# 6120 - 6121 The Day of Truth +# 6130 The Cadastre +# 6140 A Cumbersome Gift +# 6150 The End Is Nigh! +# 6160 Empty Coffers +# 6170 Ignoble Imprisonment +# 6180 The Shadow Behind the Throne +# 6190 A Shadow in the Night +# 6200 - 6201 The Monster of X +# 6210 A Land of Barbarians +# 6220 Studying the Dead +# 6230 A Massive Problem +################################################## + +################################################## +# Empty Granaries +# by Claudia Baldassi +# 6000 +################################################## + +# A province has been hit by a famine and is asking for your help. What do you do? # + +scripted_trigger hold_court_6000_valid_province_trigger = { + OR = { + has_province_modifier = recently_looted_modifier + has_province_modifier = disease_spreading_modifier + has_province_modifier = winter_harsh_modifier + barony = { + holder ?= { + has_character_flag = recently_occupied_flag + } + } + } + barony = { + holder ?= { + this != root + is_available_ai_adult = yes + has_court_event_flag = no + } + } +} + +scripted_trigger hold_court_6000_valid_inspector_trigger = { + has_court_event_flag = no + OR = { + stewardship >= 14 + has_trait = education_stewardship_2 + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = administrator + } + NOR = { + has_trait = lazy + is_spouse_of = root + is_concubine_of = root + } + is_councillor = no + is_available_ai_adult = yes +} + +hold_court.6000 = { + type = court_event + title = hold_court.6000.t + desc = { + desc = hold_court.6000.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:6000_poor = { + has_character_flag = recently_occupied_flag + } + } + desc = hold_court.6000.desc_occupation + } + triggered_desc = { + trigger = { + scope:6000_province = { + has_province_modifier = recently_looted_modifier + } + } + desc = hold_court.6000.desc_raiding + } + triggered_desc = { + trigger = { + scope:6000_province = { + has_province_modifier = disease_spreading_modifier + } + } + desc = hold_court.6000.desc_epidemics + } + triggered_desc = { + trigger = { + scope:6000_province = { + has_province_modifier = winter_harsh_modifier + } + } + desc = hold_court.6000.desc_winter + } + } + desc = hold_court.6000.desc_middle + triggered_desc = { + trigger = { + exists = scope:6000_count + } + desc = hold_court.6000.desc_count + } + desc = hold_court.6000.desc_ending + } + theme = court + lower_left_portrait = scope:6000_count + lower_right_portrait = scope:inspector + court_scene = { + button_position_character = scope:6000_poor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6000_poor = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_realm_province = { + hold_court_6000_valid_province_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_realm_province = { + limit = { + hold_court_6000_valid_province_trigger = yes + } + save_scope_as = 6000_province + } + scope:6000_province = { + barony = { + holder = { + save_scope_as = 6000_poor + } + } + } + if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = inspector + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_courtier_or_guest = { + hold_court_6000_valid_inspector_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + hold_court_6000_valid_inspector_trigger = yes + } + save_scope_as = inspector + court_event_character_flag_effect = yes + } + } + if = { + limit = { + scope:6000_province.county.holder = { + NOR = { + this = root + this = scope:6000_poor + } + } + } + scope:6000_province.county.holder = { + save_scope_as = 6000_count + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: send money + option = { + name = hold_court.6000.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= medium_gold_value + } + } + pay_treasury_or_gold = { + target = scope:6000_poor + value = medium_treasury_or_gold_value + } + add_hook = { + type = favor_hook + target = scope:6000_poor + } + every_sub_realm_county = { + limit = { + title_province = { hold_court_6000_valid_province_trigger = yes } + } + add_county_modifier = { + modifier = invested_in_province_modifier + years = 10 + } + } + if = { + limit = { exists = scope:6000_count } + scope:6000_count = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 5 + + modifier = { + gold < 0 + add = -10 + } + modifier = { + short_term_gold >= medium_gold_value + add = 5 + } + modifier = { + OR = { + has_trait = generous + has_trait = improvident + has_trait = profligate + } + add = 15 + } + } + } + + #Option B: less taxes + option = { + name = hold_court.6000.b + every_sub_realm_county = { + limit = { + title_province = { hold_court_6000_valid_province_trigger = yes } + } + add_county_modifier = { + modifier = court_tax_relief_county_modifier + years = 10 + } + } + if = { + limit = { exists = scope:6000_count } + scope:6000_count = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + add_hook = { + type = indebted_hook + target = scope:6000_poor + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 5 + + modifier = { + gold < 0 + add = -5 + } + modifier = { + OR = { + has_trait = greedy + ai_greed >= medium_positive_ai_value + } + add = -10 + } + } + } + + #Option C: send inspector - limited to adequate character + option = { + name = hold_court.6000.c + trigger = { + exists = scope:inspector + } + custom_tooltip = hold_court.6000.c.tt + scope:inspector = { + add_character_modifier = { + modifier = hold_court_inspector_modifier + years = 10 + } + } + remove_courtier_or_guest = { + character = scope:inspector + new_location = scope:6000_province + } + ai_chance = { + base = 10 + } + } + + #Option D: they can manage it on their own + option = { + name = hold_court.6000.d + stress_impact = { + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 2 + + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + OR = { + has_trait = just + has_trait = generous + has_trait = compassionate + has_trait = gregarious + } + add = -5 + } + } + } + + after = { + if = { + limit = { + exists = scope:inspector + } + scope:inspector = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# From Beyond the Border +# by Claudia Baldassi +# 6030 +################################################## + +# A bilingual monk from a (recently conquered) county of a different culture is offering their translation of the great works of their culture into your language # + +scripted_trigger hold_court_6030_valid_county_trigger = { + culture = { + this != root.culture + save_temporary_scope_as = 6030_border_culture + } + any_neighboring_county = { + holder = { + this != root + culture = scope:6030_border_culture + } + } + any_county_province = { + has_holding_type = church_holding + } + religion = { + any_faith = { + has_doctrine = tenet_monasticism + } + } +} + +hold_court.6030 = { + type = court_event + title = hold_court.6030.t + desc = hold_court.6030.desc + theme = court + court_scene = { + button_position_character = scope:6030_monk + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6030_monk = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 25 } + + trigger = { + any_held_county = { + hold_court_6030_valid_county_trigger = yes + } + } + + weight_multiplier = { + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_held_county = { + limit = { + hold_court_6030_valid_county_trigger = yes + } + save_scope_as = 6030_border + } + scope:6030_border = { + random_county_province = { + limit = { + has_holding_type = church_holding + } + save_scope_as = 6030_church + } + } + create_character = { + location = root.capital_province + template = priest_character_template + faith = scope:6030_border.faith + culture = scope:6030_border.culture + gender_female_chance = root_faith_clergy_gender_female_chance + trait = devoted + save_scope_as = 6030_monk + } + hidden_effect = { + add_courtier = scope:6030_monk + } + scope:6030_monk = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: accept the translation + option = { + name = hold_court.6030.a + add_prestige = minor_prestige_gain + change_current_court_grandeur = minor_court_grandeur_gain + scope:6030_monk = { select_and_move_to_pool_effect = yes } + culture = { + change_cultural_acceptance = { + target = scope:6030_monk.culture + value = minor_cultural_acceptance_value + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + scope:6030_monk = { + add_character_flag = 6030_remove_char_flag + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + #Option B: you ask them to stay and teach you + option = { + name = hold_court.6030.b + trigger = { + learning >= 12 + } + skill = learning + add_prestige = medium_prestige_gain + change_current_court_grandeur = minor_court_grandeur_gain + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:6030_monk + COURT_POS = court_tutor_court_position + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_tutor + CANDIDATE = scope:6030_monk + } + } + add_character_modifier = { + modifier = hold_court_bilingual_readings_modifier + years = 10 + } + culture = { + change_cultural_acceptance = { + target = scope:6030_monk.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + stress_impact = { + content = minor_stress_impact_gain + impatient = minor_stress_impact_gain + irritable = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + has_trait = content + add = -25 + } + modifier = { + has_trait = impatient + add = -25 + } + modifier = { + has_trait = irritable + add = -50 + } + modifier = { + has_trait = arrogant + add = -50 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = ambitious + add = 50 + } + } + } + + #Option C: I don't care + option = { + name = hold_court.6030.c + scope:6030_monk = { select_and_move_to_pool_effect = yes } + scope:6030_monk = { + add_character_flag = 6030_remove_char_flag + } + stress_impact = { + lazy = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + } + modifier = { + has_trait = lazy + add = 50 + } + } + } + + after = { + scope:6030_monk = { + clear_court_event_participation = yes + if = { + limit = { has_character_flag = 6030_remove_char_flag } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Lost Treasure +# by Claudia Baldassi +# 6040 +################################################## + +# Scribes from a remote monastery think they've found a rare/long-lost manuscript. It might be a fake, something worthless, or an artifact # + +hold_court.6040 = { + type = court_event + title = hold_court.6040.t + desc = hold_court.6040.desc + theme = court + lower_left_portrait = scope:antiquarian + court_scene = { + button_position_character = scope:6040_monk + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6040_monk = { + group = petitioners_group + animation = ecstasy + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_realm_province = { + has_holding_type = church_holding + religion = { + any_faith = { + has_doctrine = tenet_monasticism + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_realm_province = { + limit = { + has_holding_type = church_holding + religion = { + any_faith = { + has_doctrine = tenet_monasticism + } + } + } + save_scope_as = 6040_church + } + create_character = { + location = root.capital_province + template = priest_character_template + faith = scope:6040_church.faith + gender_female_chance = root_faith_clergy_gender_female_chance + trait = devoted + save_scope_as = 6040_monk + } + scope:6040_monk = { + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = antiquarian_court_position + } + court_position:antiquarian_court_position = { save_scope_as = antiquarian } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option B: send for the antiquarian - if you have one + option = { + name = hold_court.6040.b + trigger = { + exists = scope:antiquarian + } + random_list = { + 10 = { #it's an artifact! + desc = hold_court.6040.c.tt.4 + send_interface_toast = { + title = hold_court_6040_b_artifact + random_dummy_gender_effect = yes + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:lunatic + SET_TOPIC = flag:artifact_book_voynich + } + } + scope:antiquarian = { add_learning_skill = 2 } + add_prestige = medium_prestige_gain + } + 35 = { #it's an old book + desc = hold_court.6040.c.tt.3 + send_interface_toast = { + title = hold_court_6040_b_generic + scope:antiquarian = { add_learning_skill = 1 } + add_prestige = minor_prestige_gain + } + } + 30 = { #they have no clue + modifier = { + factor = 0 + scope:antiquarian = { + OR = { + has_trait = education_learning_4 + has_trait = education_learning_5 + has_trait = intellect_good_3 + has_trait = scholar + learning > 20 + } + } + } + modifier = { + add = -20 + scope:antiquarian = { + OR = { + has_trait = education_learning_3 + has_trait = intellect_good_2 + learning >= 15 + learning <= 20 + } + } + } + desc = hold_court.6040.b.tt + send_interface_toast = { + title = hold_court_6040_b_clueless + add_character_modifier = hold_court_mysterious_book_modifier + add_prestige = medium_prestige_loss + } + } + 20 = { #it's a fake! + desc = hold_court.6040.c.tt + send_interface_toast = { + title = hold_court_6040_b_fake + add_prestige = medium_prestige_gain + scope:antiquarian = { add_learning_skill = 2 } + } + } + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + #Option C: study it yourself - if you can + option = { + name = hold_court.6040.c + trigger = { + learning >= 12 + } + skill = learning + random_list = { + 30 = { #it's an old book + desc = hold_court.6040.c.tt.3 + send_interface_toast = { + title = hold_court_6040_b_generic + add_learning_skill = 1 + add_prestige = minor_prestige_gain + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:lunatic + SET_TOPIC = flag:artifact_book_voynich + } + } + } + 50 = { #you have no clue + modifier = { + factor = 0 + OR = { + has_trait = education_learning_4 + has_trait = education_learning_5 + has_trait = intellect_good_3 + has_trait = scholar + learning > 20 + } + } + modifier = { + add = -20 + OR = { + has_trait = education_learning_3 + has_trait = intellect_good_2 + AND = { + learning <= 20 + learning >= 15 + } + } + } + desc = hold_court.6040.c.tt.2 + send_interface_toast = { + title = hold_court_6040_c_clueless + add_prestige = medium_prestige_loss + add_character_modifier = hold_court_mysterious_book_modifier + } + } + 15 = { #it's a fake! + desc = hold_court.6040.c.tt + send_interface_toast = { + title = hold_court_6040_b_fake + add_prestige = medium_prestige_gain + add_learning_skill = 2 + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_energy = 0.25 + } + } + } + + #Option D: it's clearly demonic! + option = { + name = hold_court.6040.d + trigger = { + OR = { + has_trait = zealous + has_trait = theologian + } + } + add_piety = major_piety_gain + add_prestige = minor_prestige_loss + add_dread = minor_dread_gain + add_stress = major_stress_impact_loss + ai_chance = { + base = 200 + } + } + + #Option E: who cares about books? + option = { + name = hold_court.6040.e + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + } + modifier = { + has_trait = lazy + add = 50 + } + } + } + + after = { + scope:6040_monk = { + clear_court_event_participation = yes + silent_disappearance_effect = yes + } + if = { + limit = { exists = scope:antiquarian } + scope:antiquarian = { clear_court_event_participation = yes } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Holy Tomb +# by Claudia Baldassi +# 6050 - 6051 +################################################## + +# The tomb of a local saint has been growing in popularity. The devotees of the saint are now asking for a land grant to support the growing religious establishment there. # + +scripted_trigger hold_court_6050_religion_trigger = { + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:islam_religion + religion = religion:buddhism_religion + religion = religion:hinduism_religion + } +} + +hold_court.6050 = { + type = court_event + title = hold_court.6050.t + desc = { + desc = hold_court.6050.desc + triggered_desc = { + trigger = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head = root + } + desc = hold_court.6050.desc_hof + } + } + theme = court + lower_left_portrait = scope:6050_holy + court_scene = { + button_position_character = scope:6050_pop + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6050_pop = { + group = petitioners_group + animation = ecstasy + } + scope:chaplain = { + group = petitioners_group + animation = ecstasy + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + #Note: This event is triggered by hold_court.6051 and cannot have any triggers of its own. All triggers must be in hold_court.6051 or the queue can get stuck here forever. + + 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_scholarly } + } + + immediate = { + create_character = { + location = root.capital_province + template = servant_character + faith = scope:6050_tomb.faith + culture = scope:6050_tomb.culture + save_scope_as = 6050_pop + } + scope:6050_pop = { + court_event_character_flag_effect = yes + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + court_event_character_flag_effect = yes + } + if = { + limit = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head != root + } + random = { + chance = 20 + add_character_flag = { + flag = 6050_church_approves + days = 10 + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: create a temple on the tomb + option = { + name = hold_court.6050.a + trigger = { + NOT = { has_trait = lifestyle_mystic } + } + scope:6050_tomb = { + set_holding_type = church_holding + } + if = { + limit = { + OR = { + has_character_flag = 6050_church_approves + AND = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head = root + } + } + } + add_piety = major_piety_gain + } + else = { + add_piety = major_piety_loss + } + scope:6050_tomb.county = { + add_county_modifier = { + modifier = tougher_to_convert + years = 10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: limited to mystic: relic + option = { + name = hold_court.6050.b + trigger = { has_trait = lifestyle_mystic } + religion = { save_scope_as = statue_religion } + create_artifact = { + name = artifact_pedestal_reliquary_6050_saint_name + description = artifact_pedestal_reliquary_6050_saint_desc + type = pedestal + template = 6050_relic_template + visuals = reliquary + modifier = artifact_monthly_piety_3_modifier + save_scope_as = 6050_relic + } + scope:6050_relic = { + set_variable = { # required to track equipability in template + name = statue_religion + value = root.religion + } + } + scope:6050_tomb = { + set_holding_type = church_holding + } + if = { + limit = { + OR = { + has_character_flag = 6050_church_approves + AND = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head = root + } + } + } + add_piety = major_piety_gain + } + else = { + add_piety = major_piety_loss + } + scope:6050_tomb.county = { + add_county_modifier = { + modifier = tougher_to_convert + years = 10 + } + } + ai_chance = { + base = 200 + } + } + + #Option C: persecute the local cult + option = { + name = hold_court.6050.c + add_dread = medium_dread_gain + if = { + limit = { + OR = { + NOT = { + has_character_flag = 6050_church_approves + } + AND = { + exists = scope:6050_pop.faith.religious_head + scope:6050_pop.faith.religious_head = root + } + } + } + add_piety = major_piety_gain + } + if = { + limit = { + scope:6050_tomb.county.faith != root.faith + } + scope:6050_tomb.county = { + set_county_faith = root.faith + } + } + scope:6050_tomb.county = { + change_county_control = 50 + } + stress_impact = { + lifestyle_mystic = medium_stress_impact_gain + trusting = minor_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + if = { + limit = { + has_character_flag = 6050_church_approves + } + stress_impact = { + zealous = major_stress_impact_gain + } + } + else = { + stress_impact = { + zealous = major_stress_impact_loss + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = trusting + add = -25 + } + modifier = { + has_trait = lifestyle_mystic + add = -50 + } + modifier = { + has_trait = compassionate + add = -75 + } + modifier = { + has_trait = forgiving + add = -75 + } + } + } + #Option D: ignore them + option = { + name = hold_court.6050.d + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + } + } + + after = { + scope:6050_pop = { + clear_court_event_participation = yes + silent_disappearance_effect = yes + } + scope:chaplain = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.6051 = { #Hidden event to create the saint + type = character_event + hidden = yes + cooldown = { years = 30 } + + trigger = { + any_realm_province = { + has_holding = no + hold_court_6050_religion_trigger = yes + county.faith != root.faith + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + + immediate = { + random_realm_province = { + limit = { + has_holding = no + hold_court_6050_religion_trigger = yes + } + save_scope_as = 6050_tomb + } + create_character = { + location = scope:6050_tomb + template = local_saint_template + faith = scope:6050_tomb.faith + culture = scope:6050_tomb.culture + save_scope_as = 6050_holy + } + scope:6050_holy = { + death = { + death_reason = death_mysterious + } + } + trigger_event = hold_court.6050 + } +} + +################################################## +# A Convenient Offer +# by Claudia Baldassi +# 6060 +################################################## + +# A wealthy knight or merchant offers to purchase a piece of land from you - in exchange for money, which you really need # + +scripted_trigger hold_court_6060_valid_county_trigger = { + OR = { + has_holding = no + AND = { + is_county_capital = no + barony = { + holder = root + is_leased_out = no + } + NOT = { + has_holding_type = church_holding + } + } + } +} + +scripted_trigger hold_court_6060_valid_knight_trigger = { + has_court_event_flag = no + is_landed = no + stewardship >= 6 + NOT = { has_trait = celibate } + is_available_ai_adult = yes +} + +hold_court.6060 = { + type = court_event + title = hold_court.6060.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:6060_rich = { is_knight = yes } + } + desc = hold_court.6060.desc + } + desc = hold_court.6060.desc_merchant + } + desc = hold_court.6060.desc_ending + } + theme = court + court_scene = { + button_position_character = scope:6060_rich + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6060_rich = { + group = petitioners_group + animation = personality_bold + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + faith = { + trait_is_sin = drunkard + } + any_held_county = { + any_county_province = { + hold_court_6060_valid_county_trigger = yes + } + } + trigger_if = { + limit = { + highest_held_title_tier = tier_empire + } + gold < 500 + } + trigger_if = { + limit = { + highest_held_title_tier = tier_kingdom + } + gold < 250 + } + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + gold <= 0 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_held_county = { + limit = { + any_county_province = { + hold_court_6060_valid_county_trigger = yes + } + } + random_county_province = { + limit = { + hold_court_6060_valid_county_trigger = yes + } + save_scope_as = 6060_offer + } + } + if = { + limit = { + any_knight = { + hold_court_6060_valid_knight_trigger = yes + } + } + random_knight = { + limit = { + hold_court_6060_valid_knight_trigger = yes + } + save_scope_as = 6060_rich + court_event_character_flag_effect = yes + } + } + else = { + create_character = { + location = root.capital_province + template = stewardship_wealth_focus_friend_template + trait = ambitious + save_scope_as = 6060_rich + } + } + hidden_effect = { + scope:6060_rich = { + court_event_character_flag_effect = yes + add_treasury_or_gold = major_treasury_or_gold_value + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: sell the province + option = { + name = hold_court.6060.a + scope:6060_rich = { + pay_treasury_or_gold = { + target = root + value = major_treasury_or_gold_value + } + } + if = { + limit = { + scope:6060_offer = { + has_holding = no + } + } + scope:6060_offer = { + set_holding_type = castle_holding + } + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6060_offer = { + barony = { + change_title_holder = { + holder = scope:6060_rich + change = scope:change + } + } + } + custom_tooltip = { + text = character_title_cannot_be_revoked_tt + scope:6060_rich = { + add_character_flag = { + flag = titles_protected + years = 25 + } + } + } + resolve_title_and_vassal_change = scope:change + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_honor = 0.25 + } + } + } + + #Option B: Allow it as a city + option = { + name = hold_court.6060.b + scope:6060_rich = { + pay_treasury_or_gold = { + target = root + value = 250 + } + } + if = { + limit = { + scope:6060_offer = { + has_holding = no + } + } + scope:6060_offer = { + set_holding_type = city_holding + } + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6060_offer = { + barony = { + change_title_holder = { + holder = scope:6060_rich + change = scope:change + } + } + } + custom_tooltip = { + text = character_title_cannot_be_revoked_tt + scope:6060_rich = { + add_character_flag = { + flag = titles_protected + years = 25 + } + } + } + resolve_title_and_vassal_change = scope:change + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.5 + } + modifier = { + has_trait = greedy + add = 50 + } + } + } + + #Option C: refuse + option = { + name = hold_court.6060.c + ai_chance = { + base = 100 + } + } + + after = { + scope:6060_rich = { + clear_court_event_participation = yes + if = { + limit = { + is_knight = no + is_landed = no + } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Budding Ally +# by Claudia Baldassi +# 6070 +################################################## + +# An ally is asking you to raise their child as their guardian # + +scripted_trigger hold_court_6070_valid_child_trigger = { + has_court_event_flag = no + is_available_ai_child = yes + age >= 6 + age <= 12 + is_incapable = no + is_courtier_of = prev + is_alive = yes + is_landed = no +} + +scripted_trigger hold_court_6070_valid_friend_trigger = { + has_court_event_flag = no + is_available_ai_child = yes + age >= 4 + age <= 14 + is_incapable = no + is_alive = yes + is_landed = no + is_courtier_of = root +} + +scripted_trigger hold_court_6070_valid_betrothed_trigger = { + has_court_event_flag = no + is_betrothed = no + is_married = no + could_marry_character_trigger = { CHARACTER = scope:6070_child } + is_alive = yes + is_landed = no + is_incapable = no + is_courtier_of = root + basic_is_available_ai = yes +} + +hold_court.6070 = { + type = court_event + title = hold_court.6070.t + desc = hold_court.6070.desc + theme = court + court_scene = { + button_position_character = scope:6070_embassy + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6070_embassy = { + group = petitioners_group + animation = admiration + } + scope:6070_child = { + group = petitioners_group + animation = worry + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + is_adult = yes + num_of_relation_ward < 2 + any_ally = { + is_ruler = yes + is_available_ai_adult = yes + has_court_event_flag = no + any_child = { + hold_court_6070_valid_child_trigger = yes + save_temporary_scope_as = temp_ward + } + } + trigger_if = { + limit = { + scope:temp_ward = { + any_relation = { type = guardian } + } + } + any_ally = { + is_ruler = yes + is_available_ai_adult = yes + has_court_event_flag = no + any_child = { + this = scope:temp_ward + } + any_courtier_or_guest = { + has_relation_guardian = scope:temp_ward + is_available_ai_adult = yes + has_court_event_flag = no + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_ally = { + limit = { + any_child = { + hold_court_6070_valid_child_trigger = yes + } + } + save_scope_as = 6070_sender + court_event_character_flag_effect = yes + } + scope:6070_sender = { + random_child = { + limit = { + hold_court_6070_valid_child_trigger = yes + } + save_scope_as = 6070_child + court_event_character_flag_effect = yes + } + } + if = { + limit = { + scope:6070_sender = { + any_courtier = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + } + } + } + scope:6070_sender = { + random_courtier = { + limit = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + } + save_scope_as = 6070_embassy + court_event_character_flag_effect = yes + } + } + } + else = { + create_character = { + location = scope:6070_sender.capital_province + template = pool_repopulate_diplomacy + culture = scope:6070_sender.culture + faith = scope:6070_sender.faith + save_scope_as = 6070_embassy + } + scope:6070_embassy = { + court_event_character_flag_effect = yes + add_character_flag = 6070_remove_char_flag + } + } + if = { + limit = { + any_child = { + is_heir_of = root + hold_court_6070_valid_friend_trigger = yes + } + } + random_child = { + limit = { + is_heir_of = root + hold_court_6070_valid_friend_trigger = yes + } + save_scope_as = 6070_friend + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_child = { + hold_court_6070_valid_friend_trigger = yes + } + } + random_child = { + limit = { + hold_court_6070_valid_friend_trigger = yes + } + save_scope_as = 6070_friend + court_event_character_flag_effect = yes + } + } + if = { + limit = { + any_child = { + hold_court_6070_valid_betrothed_trigger = yes + } + } + random_child = { + limit = { + hold_court_6070_valid_betrothed_trigger = yes + } + save_scope_as = 6070_betrothed_temp + } + } + if = { + limit = { + exists = scope:6070_betrothed_temp + scope:6070_child = { + is_betrothed = no + could_marry_character_trigger = { CHARACTER = scope:6070_betrothed_temp } + } + } + scope:6070_betrothed_temp = { + save_scope_as = 6070_betrothed + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: Accept + option = { + name = hold_court.6070.a + scope:6070_sender = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + if = { + limit = { + scope:6070_child = { + any_relation = { type = guardian } + } + } + scope:6070_child = { + every_relation = { + type = guardian + remove_guardian_effect = { + GUARDIAN = this + WARD = scope:6070_child + RETURN_WARD = no + HIDE_OPINION = no + } + } + } + } + scope:6070_child = { + set_relation_guardian = root + } + set_variable = { + name = character_requested_as_educator + value = root + years = 10 + } + set_variable = { + name = character_making_education_request + value = scope:6070_sender + years = 10 + } + if = { + limit = { + root != scope:6070_child.host + } + root = { + add_visiting_courtier = scope:6070_child + } + } + stress_impact = { + shy = medium_stress_impact_gain + reclusive = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.25 + ai_honor = 0.25 + } + modifier = { + has_trait = shy + add = -50 + } + modifier = { + has_trait = reclusive + add = -50 + } + modifier = { + has_trait = paranoid + add = -75 + } + } + } + + #Option B: Accept + encourage friendship with your child (limited if child available) + option = { + name = hold_court.6070.b + trigger = { + exists = scope:6070_friend + } + scope:6070_sender = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 35 + } + } + if = { + limit = { + scope:6070_child = { + any_relation = { type = guardian } + } + } + scope:6070_child = { + every_relation = { + type = guardian + remove_guardian_effect = { + GUARDIAN = this + WARD = scope:6070_child + RETURN_WARD = no + HIDE_OPINION = no + } + } + } + } + scope:6070_child = { + set_relation_guardian = root + progress_towards_friend_effect = { + REASON = friend_childhood_new_home + CHARACTER = scope:6070_friend + OPINION = 10 + } + } + if = { + limit = { + root != scope:6070_child.host + } + root = { + add_visiting_courtier = scope:6070_child + } + } + stress_impact = { + shy = medium_stress_impact_gain + reclusive = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = 0.25 + } + modifier = { + has_trait = shy + add = -50 + } + modifier = { + has_trait = reclusive + add = -50 + } + modifier = { + has_trait = paranoid + add = -75 + } + } + } + + #Option C: Accept + require betrothal (limited if child available) + option = { + name = hold_court.6070.c + trigger = { + exists = scope:6070_betrothed + } + scope:6070_sender = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 40 + } + } + if = { + limit = { + scope:6070_child = { + any_relation = { type = guardian } + } + } + scope:6070_child = { + every_relation = { + type = guardian + remove_guardian_effect = { + GUARDIAN = this + WARD = scope:6070_child + RETURN_WARD = no + HIDE_OPINION = no + } + } + } + } + scope:6070_child = { + set_relation_guardian = root + create_betrothal = scope:6070_betrothed + } + if = { + limit = { + root != scope:6070_child.host + } + root = { + add_visiting_courtier = scope:6070_child + } + } + stress_impact = { + shy = medium_stress_impact_gain + reclusive = medium_stress_impact_gain + paranoid = major_stress_impact_gain + diplomat = major_stress_impact_loss + family_first = major_stress_impact_loss + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = 0.25 + } + modifier = { + has_trait = shy + add = -50 + } + modifier = { + has_trait = reclusive + add = -50 + } + modifier = { + has_trait = paranoid + add = -75 + } + modifier = { + has_trait = diplomat + add = 75 + } + modifier = { + has_trait = family_first + add = 75 + } + } + } + + #Option D: Refuse + option = { + name = hold_court.6070.d + scope:6070_sender = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + stress_impact = { + shy = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + reclusive = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_honor = -0.25 + } + modifier = { + has_trait = shy + add = 50 + } + modifier = { + has_trait = reclusive + add = 50 + } + modifier = { + has_trait = paranoid + add = 75 + } + } + } + + #Option E: Refuse because child is a menace! + option = { + name = hold_court.6070.e + trigger = { + scope:6070_child = { + OR = { + has_trait = rowdy + has_trait = bossy + has_trait = callous + has_trait = wrathful + has_trait = sadistic + } + } + } + scope:6070_sender = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -50 + } + } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 150 + } + } + + after = { + scope:6070_sender = { + clear_court_event_participation = yes + } + scope:6070_child = { + clear_court_event_participation = yes + } + scope:6070_embassy = { + clear_court_event_participation = yes + if = { + limit = { has_character_flag = 6070_remove_char_flag } + silent_disappearance_effect = yes + } + } + if = { + limit = { exists = scope:6070_friend } + scope:6070_friend = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:6070_betrothed } + scope:6070_betrothed = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Settling the [people] +# by Claudia Baldassi +# 6080 +################################################## + +# A representative of another culture in a county you own offers to settle an unused holding. You can grant them the county, which cannot be revoked for a long while. # + +scripted_trigger hold_court_6080_valid_county_trigger = { + is_landless_type_title = no + any_county_province = { + has_holding = no + } + culture = { + this != root.culture + } +} + +hold_court.6080 = { + type = court_event + title = hold_court.6080.t + desc = hold_court.6080.desc + theme = court + court_scene = { + button_position_character = scope:6080_count + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6080_count = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_held_county = { + hold_court_6080_valid_county_trigger = yes + } + government_has_flag = government_is_feudal + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_held_county = { + limit = { + hold_court_6080_valid_county_trigger = yes + } + save_scope_as = 6080_county + } + scope:6080_county.culture = { + save_scope_as = 6080_culture + } + if = { + limit = { + any_courtier_or_guest = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + culture = { + this = scope:6080_culture + } + } + } + random_courtier_or_guest = { + limit = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + culture = { + this = scope:6080_culture + } + } + save_scope_as = 6080_count + court_event_character_flag_effect = yes + } + } + else = { + create_character = { + location = root.capital_province + template = merchant_template + culture = scope:6080_culture + save_scope_as = 6080_count + } + scope:6080_count = { + add_character_flag = 6080_remove_char_flag + court_event_character_flag_effect = yes + } + } + scope:6080_county = { + random_county_province = { + limit = { + has_holding = no + } + save_scope_as = 6080_province + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option C: Grant the barony + option = { + name = hold_court.6080.c + trigger = { + has_trait = administrator + } + scope:6080_province = { + set_holding_type = church_holding + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6080_province = { + barony = { + change_title_holder = { + holder = scope:6080_count + change = scope:change + } + } + } + custom_tooltip = { + text = character_title_cannot_be_revoked_tt + scope:6080_count = { + add_character_flag = { + flag = titles_protected + years = 25 + } + } + } + resolve_title_and_vassal_change = scope:change + scope:6080_county = { + culture = { + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -50 + } + } + } + + #Option A: Grant the county + option = { + name = hold_court.6080.a + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6080_county = { + change_title_holder = { + holder = scope:6080_count + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:6080_count = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + if = { + limit = { + government_has_flag = government_is_feudal + } + vassal_contract_set_obligation_level = { + type = title_revocation_rights + level = 1 + } + set_subject_contract_modification_blocked = yes + } + } + custom_tooltip = hold_court.6080.a.tt + scope:6080_county = { + culture = { + change_cultural_acceptance = { + target = root.culture + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + add_county_modifier = { + modifier = hold_court_grateful_peasants_modifier + years = 50 + } + scope:6080_province = { + random_list = { + 40 = { + set_holding_type = city_holding + } + 25 = { + set_holding_type = castle_holding + } + 15 = { + set_holding_type = church_holding + } + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -75 + } + } + } + + #Option B: Say no + option = { + name = hold_court.6080.b + scope:6080_county = { + change_county_control = 10 + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = generous + add = -50 + } + } + } + + after = { + scope:6080_count = { + clear_court_event_participation = yes + if = { + limit = { + has_character_flag = 6080_remove_char_flag + is_landed = no + } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Heretics at Large +# by Claudia Baldassi +# 6090 +################################################## + +# A vassal comes to you begging for help because their land is overrun by heretics/infidels. # + +scripted_trigger hold_court_6090_valid_vassal_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + faith = root.faith + is_landed_or_landless_administrative = yes + capital_county ?= { + hold_court_6090_valid_county_trigger = yes + } +} + +scripted_trigger hold_court_6090_valid_county_trigger = { + is_landless_type_title = no + faith = { + this != root.faith + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } +} + +hold_court.6090 = { + type = court_event + title = hold_court.6090.t + desc = { + desc = hold_court.6090.desc + triggered_desc = { + trigger = { + exists = scope:high_almoner + } + desc = hold_court.6090.desc.almoner + } + triggered_desc = { + trigger = { + exists = scope:executioner + } + desc = hold_court.6090.desc.executioner + } + } + theme = court + lower_right_portrait = scope:high_almoner + lower_center_portrait = scope:executioner + lower_left_portrait = scope:court_chaplain + court_scene = { + button_position_character = scope:6090_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6090_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_vassal = { + hold_court_6090_valid_vassal_trigger = yes + } + } + + 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_scholarly } + } + + immediate = { + random_vassal = { + limit = { + hold_court_6090_valid_vassal_trigger = yes + } + save_scope_as = 6090_vassal + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = high_almoner_court_position + any_court_position_holder = { + type = high_almoner_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = high_almoner + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = executioner_court_position + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + random_court_position_holder = { + type = executioner_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = executioner + court_event_character_flag_effect = yes + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + has_court_event_flag = no + } + } + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + court_event_character_flag_effect = yes + } + } + scope:6090_vassal = { + capital_county = { + save_scope_as = 6090_main_county + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: send court chaplain + option = { + name = hold_court.6090.a + trigger = { + exists = scope:court_chaplain + } + scope:6090_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = easier_to_convert + years = 15 + } + } + } + scope:court_chaplain = { + set_council_task = { + task_type = task_conversion + target = scope:6090_main_county.title_province + } + } + scope:6090_vassal = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + has_trait = cynical + add = -75 + } + } + } + + #Option B: send the almoners + option = { + name = hold_court.6090.b + trigger = { + exists = scope:high_almoner + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + scope:6090_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = easier_to_convert + years = 15 + } + } + } + remove_treasury_or_gold = medium_gold_value + scope:6090_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = court_6090_almoners_county_modifier + years = 15 + } + } + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + scope:high_almoner = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + stress_impact = { + greedy = major_stress_impact_gain + } + change_current_court_grandeur = medium_court_grandeur_gain + add_piety = medium_piety_gain + ai_chance = { + base = 200 + modifier = { + gold < medium_gold_value + add = -200 + } + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + has_trait = cynical + add = -75 + } + } + } + + #Option C: tolerance + option = { + name = hold_court.6090.c + trigger = { + NOT = { has_trait = zealous } + } + scope:6090_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = governance_1074_local_faith_respected_modifier + years = 10 + } + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + custom_tooltip = { + text = title_granted_to_local_leader_tt + create_character = { + template = servant_character + location = root.location + faith = scope:6090_main_county.faith + culture = scope:6090_main_county.culture + save_scope_as = new_ruler + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:6090_main_county = { + change_title_holder = { + holder = scope:new_ruler + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:new_ruler ?= { + if = { + limit = { + government_has_flag = government_is_feudal + } + vassal_contract_set_obligation_level = { + type = religious_rights + level = 1 + } + set_subject_contract_modification_blocked = yes + } + } + add_hook = { + target = scope:new_ruler + type = loyalty_hook + } + } + change_current_court_grandeur = minor_court_grandeur_gain + add_prestige = medium_prestige_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + } + modifier = { + has_trait = cynical + add = 75 + } + } + } + + #Option D: send the executioners + option = { + name = hold_court.6090.d + trigger = { + exists = scope:executioner + } + scope:6090_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + every_sub_realm_county = { + limit = { + hold_court_6090_valid_county_trigger = yes + } + add_county_modifier = { + modifier = court_6090_executioners_county_modifier + years = 5 + } + add_county_modifier = { + modifier = easier_to_convert + years = 15 + } + } + } + scope:executioner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + } + stress_impact = { + just = major_stress_impact_gain + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 0.5 + } + modifier = { + has_trait = just + add = -75 + } + modifier = { + has_trait = compassionate + add = -100 + } + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = callous + add = 75 + } + } + } + + #Option E: It's your problem + option = { + name = hold_court.6090.e + scope:6090_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + if = { + limit = { + has_trait = zealous + can_set_relation_rival_trigger = { CHARACTER = root } + } + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_province_help + OPINION = 0 + } + } + } + stress_impact = { + lazy = medium_stress_impact_loss + diligent = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = diligent + add = -75 + } + } + } + + after = { + scope:6090_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:high_almoner } + scope:high_almoner = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:executioner } + scope:executioner = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:court_chaplain } + scope:court_chaplain = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Land at War +# by Claudia Baldassi +# 6100 - 6101 +################################################## + +# Two vassals have been waging a long inconclusive war and come to you to settle the dispute # + +scripted_trigger vassal_war_char_trigger = { + has_court_event_flag = no + is_at_war = yes + is_at_war_with_liege = no + is_available_ai_adult = yes +} + +scripted_trigger vassal_war_conflict_trigger = { + any_war_participant = { + count = 0 + OR = { + top_liege = this + NOT = { is_vassal_or_below_of = root } + } + } + war_days >= 365 + attacker_war_score >= -50 + attacker_war_score <= 50 + casus_belli = { + primary_attacker = { + vassal_war_char_trigger = yes + is_vassal_of = root + } + primary_defender = { + vassal_war_char_trigger = yes + is_vassal_of = root + } + } +} + +hold_court.6100 = { + type = court_event + title = hold_court.6100.t + desc = { + desc = hold_court.6100.desc + triggered_desc = { + trigger = { + exists = scope:jester + NOR = { + scope:6100_vassal_1 = { has_trait = lifestyle_poet } + scope:6100_vassal_2 = { has_trait = lifestyle_poet } + } + } + desc = hold_court.6100.desc.jester + } + } + theme = court + lower_center_portrait = scope:jester + court_scene = { + button_position_character = scope:6100_vassal_1 + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6100_vassal_1 = { + group = petitioners_group + animation = personality_bold + } + scope:6100_vassal_2 = { + group = petitioners_group + animation = personality_bold + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { + vassal_war_char_trigger = yes + any_character_war = { vassal_war_conflict_trigger = yes } + } + } + + 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_warlike } + } + + immediate = { + random_vassal = { + limit = { vassal_war_char_trigger = yes } + random_character_war = { + limit = { vassal_war_conflict_trigger = yes } + save_scope_as = vassal_war + } + } + scope:vassal_war = { + primary_attacker = { + save_scope_as = 6100_vassal_1 + court_event_character_flag_effect = yes + } + primary_defender = { + save_scope_as = 6100_vassal_2 + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + has_court_event_flag = no + is_landed = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_jester_court_position + limit = { + has_court_event_flag = no + is_landed = no + is_available_ai_adult = yes + } + save_scope_as = jester + court_event_character_flag_effect = yes + } + } + root = { + save_scope_as = 6100_lord + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: Attacker is right + option = { + name = hold_court.6100.a + scope:vassal_war = { + end_war = attacker + } + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -50 + } + } + ai_chance = { + base = 100 + modifier = { + opinion = { + target = scope:6100_vassal_1 + value >= low_positive_opinion + } + opinion = { + target = scope:6100_vassal_2 + value <= low_positive_opinion + } + add = 50 + } + modifier = { + opinion = { + target = scope:6100_vassal_1 + value >= high_positive_opinion + } + opinion = { + target = scope:6100_vassal_2 + value <= low_negative_opinion + } + add = 100 + } + } + } + + #Option B: Defender is right + option = { + name = hold_court.6100.b + scope:vassal_war = { + end_war = defender + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + } + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -50 + } + } + ai_chance = { + base = 100 + modifier = { + opinion = { + target = scope:6100_vassal_2 + value >= low_positive_opinion + } + opinion = { + target = scope:6100_vassal_1 + value <= low_positive_opinion + } + add = 50 + } + modifier = { + opinion = { + target = scope:6100_vassal_2 + value >= high_positive_opinion + } + opinion = { + target = scope:6100_vassal_1 + value <= low_negative_opinion + } + add = 100 + } + } + } + + #Option C: ask for a white peace + option = { + name = hold_court.6100.c + trigger = { + NOT = { exists = scope:jester } + } + scope:vassal_war = { + end_war = white_peace + } + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + add_prestige = medium_prestige_gain + add_piety = medium_piety_gain + stress_impact = { + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + has_trait = wrathful + add = -50 + } + } + } + + #Option D: cruel/arbitrary - throw them both in prison + option = { + name = hold_court.6100.d + trigger = { + OR = { + has_trait = arbitrary + has_trait = sadistic + has_trait = paranoid + has_trait = deceitful + has_trait = torturer + } + NOT = { exists = scope:jester } + } + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:6100_vassal_1 + } + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:6100_vassal_2 + } + add_dread = major_dread_gain + ai_chance = { + base = 200 + } + } + + #Option E: propose a duel - if possible + option = { + name = hold_court.6100.e + custom_tooltip = hold_court.6100.e.tt + trigger = { + scope:6100_vassal_1 = { + can_start_single_combat_trigger = yes + } + scope:6100_vassal_2 = { + can_start_single_combat_trigger = yes + } + NOR = { + has_trait = arbitrary + has_trait = sadistic + has_trait = paranoid + has_trait = deceitful + has_trait = torturer + } + NOT = { exists = scope:jester } + } + configure_start_single_combat_effect = { + SC_INITIATOR = scope:6100_vassal_1 + SC_ATTACKER = scope:6100_vassal_1 + SC_DEFENDER = scope:6100_vassal_2 + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = hold_court.6101 + INVALIDATION_EVENT = fp1_tbc.0102 + } + add_prestige = medium_prestige_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + #Option F: jester proposes a funny solution/competition + option = { + name = hold_court.6100.f + trigger = { + exists = scope:jester + NOR = { + scope:6100_vassal_1 = { has_trait = lifestyle_poet } + scope:6100_vassal_2 = { has_trait = lifestyle_poet } + } + } + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -75 + } + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -75 + } + } + scope:6100_vassal_1 = { + duel = { + skill = diplomacy + target = scope:6100_vassal_2 + 10 = { + desc = hold_court.6100.f.1 + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + root = { + send_interface_toast = { + title = hold_court.6100.f.1.t + scope:vassal_war = { + end_war = attacker + } + } + } + } + 10 = { + desc = hold_court.6100.f.2 + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + root = { + send_interface_toast = { + title = hold_court.6100.f.2.t + scope:vassal_war = { + end_war = defender + } + } + } + } + } + } + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = 0.25 + } + } + } + + #Option G: solve your own problems + option = { + name = hold_court.6100.g + custom_tooltip = hold_court.6100.g.tt + scope:6100_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + scope:6100_vassal_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + stress_impact = { + lazy = medium_stress_impact_loss + content = medium_stress_impact_loss + diligent = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = content + add = 50 + } + modifier = { + has_trait = diligent + add = -50 + } + modifier = { + has_trait = compassionate + add = -50 + } + } + } + + after = { + scope:6100_vassal_1 = { + clear_court_event_participation = yes + } + scope:6100_vassal_2 = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:jester } + scope:jester = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.6101 = { + hidden = yes + + immediate = { + scope:6100_lord = { + send_interface_toast = { + title = hold_court.6101.t + left_icon = scope:sc_victor + right_icon = scope:sc_loser + custom_tooltip = hold_court.6101.tt + } + } + + if = { + limit = { + scope:sc_victor = { + this = scope:6100_vassal_1 + } + } + scope:vassal_war = { + end_war = attacker + } + scope:6100_vassal_1 = { + add_prestige = medium_prestige_gain + } + } + else = { + scope:vassal_war = { + end_war = defender + } + scope:6100_vassal_2 = { + add_prestige = medium_prestige_gain + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } +} + +################################################## +# A Ravaged Land +# by Claudia Baldassi +# 6110 +################################################## + +# Two vassals are fighting a bitter & bloody war, with the land/peasants suffering as it rages onwards. The peasants come to complain and ask for a peaceful solution # + +scripted_trigger hold_court_6110_valid_pool_character_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + is_lowborn = yes + OR = { + faith = scope:6110_vassal_1.capital_county.faith + faith = scope:6110_vassal_2.capital_county.faith + } + OR = { + culture = scope:6110_vassal_1.capital_county.culture + culture = scope:6110_vassal_2.capital_county.culture + } +} + +hold_court.6110 = { + type = court_event + title = hold_court.6110.t + desc = { + desc = hold_court.6110.desc + triggered_desc = { + trigger = { + exists = scope:almoner + } + desc = hold_court.6110.desc.almoner + } + } + theme = court + lower_left_portrait = scope:6110_vassal_1 + lower_center_portrait = scope:6110_vassal_2 + court_scene = { + button_position_character = scope:6110_rep + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6110_rep = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { + vassal_war_char_trigger = yes + any_character_war = { vassal_war_conflict_trigger = yes } + } + } + + 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_administrative } + } + + immediate = { + random_vassal = { + limit = { vassal_war_char_trigger = yes } + random_character_war = { + limit = { vassal_war_conflict_trigger = yes } + save_scope_as = vassal_war + } + } + scope:vassal_war = { + primary_attacker = { + save_scope_as = 6110_vassal_1 + court_event_character_flag_effect = yes + } + primary_defender = { + save_scope_as = 6110_vassal_2 + court_event_character_flag_effect = yes + } + } + if = { + limit = { + any_pool_character = { + province = root.capital_province + hold_court_6110_valid_pool_character_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { + hold_court_6110_valid_pool_character_trigger = yes + } + save_scope_as = 6110_rep + } + } + else = { + create_character = { + location = root.capital_province + template = servant_character + faith = scope:6110_vassal_2.capital_county.faith + culture = scope:6110_vassal_2.capital_county.culture + save_scope_as = 6110_rep + } + scope:6110_rep = { + add_character_flag = 6110_remove_char_flag + } + } + scope:6110_rep = { + court_event_character_flag_effect = yes + } + hidden_effect = { add_courtier = scope:6110_rep } + if = { + limit = { + employs_court_position = high_almoner_court_position + any_court_position_holder = { + type = high_almoner_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = almoner + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: decree ceasefire (enforce demands) + option = { + name = hold_court.6110.a + scope:vassal_war = { + end_war = attacker + } + scope:6110_vassal_1 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_1 + change_county_control = 15 + } + } + scope:6110_vassal_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_2 + change_county_control = 15 + } + } + ai_chance = { + base = 100 + modifier = { + gold < medium_gold_value + add = -100 + } + modifier = { + has_trait = profligate + add = 75 + } + modifier = { + has_trait = improvident + add = 75 + } + modifier = { + has_trait = greedy + add = -75 + } + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + #Option B: decree ceasefire (white peace) + option = { + name = hold_court.6110.b + scope:vassal_war = { + end_war = white_peace + } + scope:6110_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_1 + change_county_control = 15 + } + } + scope:6110_vassal_2 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_2 + change_county_control = 15 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + has_trait = wrathful + add = -50 + } + } + } + + #Option C: decree ceasefire (surrender) + option = { + name = hold_court.6110.c + scope:vassal_war = { + end_war = defender + } + scope:6110_vassal_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_1 + change_county_control = 15 + } + } + scope:6110_vassal_2 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_2 + change_county_control = 15 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + has_trait = wrathful + add = -50 + } + } + } + + #Option E: don't meddle + option = { + name = hold_court.6110.e + scope:6110_vassal_1 = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_1 + change_county_control = -5 + } + } + scope:6110_vassal_2 = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + every_sub_realm_county = { + custom = 6110_custom_every_realm_2 + change_county_control = 5 + } + } + ai_chance = { + base = 100 + } + } + + after = { + scope:6100_vassal_1 = { + clear_court_event_participation = yes + } + scope:6100_vassal_2 = { + clear_court_event_participation = yes + } + scope:6110_rep = { + clear_court_event_participation = yes + if = { + limit = { + has_character_flag = 6110_remove_char_flag + is_imprisoned = no + } + silent_disappearance_effect = yes + } + } + if = { + limit = { exists = scope:almoner } + scope:almoner = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# The Day of Truth +# by Claudia Baldassi +# 6120 - 6121 +################################################## + +# Your steward requires you to invest in a large-scale survey of your kingdom and people to make taxation more efficient (think Domesday Book) # + +scripted_effect hold_court_6120_rewards = { + every_sub_realm_county = { + custom = all_realm_county + change_county_control = 20 + } + if = { + limit = { + any_court_position_holder = { + type = seneschal_court_position + } + } + add_character_modifier = { + modifier = 6121_seneschal_domesday_modifier + years = 30 + } + } + else = { + add_character_modifier = { + modifier = 6121_steward_domesday_modifier + years = 30 + } + } +} + +hold_court.6120 = { + type = court_event + title = hold_court.6120.t + desc = { + desc = hold_court.6120.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:keeper_swans + } + desc = hold_court.6120.desc.swans + } + triggered_desc = { + trigger = { + exists = scope:seneschal + } + desc = hold_court.6120.desc.seneschal + } + } + triggered_desc = { + trigger = { + exists = scope:jester + } + desc = hold_court.6120.desc.jester + } + } + theme = court + lower_left_portrait = scope:seneschal + lower_center_portrait = scope:keeper_swans + lower_right_portrait = scope:jester + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:steward + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:steward = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + NOT = { #not using cooldown because the cooldown is only valid if you do the survey + has_character_flag = 6120_has_domesday_book_flag + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = keeper_of_swans_court_position + any_court_position_holder = { + type = keeper_of_swans_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = keeper_of_swans_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = keeper_swans + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = seneschal + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + has_court_event_flag = no + is_available_ai_adult = yes + is_landed = no + } + } + random_court_position_holder = { + type = court_jester_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + is_landed = no + } + save_scope_as = jester + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: yes + option = { + name = hold_court.6120.a + trigger = { + NOT = { exists = scope:seneschal } + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = major_treasury_or_gold_value + add_character_flag = { + flag = 6120_has_domesday_book_flag + years = 50 + } + show_as_tooltip = { + random_list = { + 100 = { + show_chance = no + desc = hold_court.6120.a.tt + hold_court_6120_rewards = yes + } + } + } + hidden_effect = { + scope:steward = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + trigger_event = { + id = hold_court.6121 + days = 185 + } + } + stress_impact = { + lazy = major_stress_impact_gain + content = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + gold < major_gold_value + add = -100 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_rationality = 0.5 + ai_greed = -0.25 + } + modifier = { + has_trait = lazy + add = -75 + } + modifier = { + has_trait = content + add = -75 + } + } + } + + #Option C: did you say TAXES?? + option = { + name = hold_court.6120.c + every_vassal = { + limit = { + is_ai = yes + } + custom = 6120_every_vassal + pay_treasury_or_gold = { + target = root + value = tiny_treasury_or_gold_value + } + } + add_character_modifier = { + modifier = 6120_extra_taxes_modifier + years = 10 + } + stress_impact = { + generous = major_stress_impact_gain + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = generous + add = -75 + } + modifier = { + has_trait = compassionate + add = -75 + } + modifier = { + has_trait = just + add = -75 + } + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + #Option D: no + option = { + name = hold_court.6120.d + trigger = { + NOT = { exists = scope:jester } + } + stress_impact = { + ambitious = medium_stress_impact_gain + diligent = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = ambitious + add = -50 + } + modifier = { + has_trait = diligent + add = -75 + } + } + } + + #Option E: no but with jester + option = { + name = hold_court.6120.e + trigger = { + exists = scope:jester + } + scope:jester = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + stress_impact = { + ambitious = major_stress_impact_gain + diligent = massive_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + has_trait = ambitious + add = -50 + } + modifier = { + has_trait = diligent + add = -75 + } + } + } + + after = { + scope:steward = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:keeper_swans } + scope:keeper_swans = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:seneschal } + scope:seneschal = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:jester } + scope:jester = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.6121 = { + type = character_event + title = hold_court.6121.t + desc = hold_court.6121.desc + theme = court + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:6121_responsible + animation = personality_rational + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + OR = { + AND = { + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + } + } + AND = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + is_available_ai_adult = yes + } + } + } + } + + immediate = { + if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = 6121_responsible + } + } + else = { + cp:councillor_steward = { + save_scope_as = 6121_responsible + } + } + } + + option = { + name = hold_court.6121.a + hold_court_6120_rewards = yes + } +} + +################################################## +# The Cadastre +# by Claudia Baldassi +# 6130 +################################################## + +# Someone suggests a "cadastral survey" - high cost for an increase of development in all counties you hold # + +scripted_trigger hold_court_6130_valid_child_trigger = { + has_court_event_flag = no + is_courtier_of = root + age >= 11 + is_available_ai_child = yes +} + +scripted_effect hold_court_6130_a_rewards = { + if = { + limit = { + OR = { + has_character_flag = 6130_seneschal_assigned + has_character_flag = 6131_seneschal_assigned + } + } + every_held_county = { + custom = custom.every_held_county + change_development_progress_with_overflow = 50 + } + } + else_if = { + limit = { + OR = { + has_character_flag = 6130_steward_assigned + has_character_flag = 6131_steward_assigned + } + } + every_held_county = { + custom = custom.every_held_county + change_development_progress_with_overflow = 35 + } + } + scope:6130_proposer = { + add_prestige = minor_prestige_gain + } + every_held_county = { + custom = custom.every_held_county + add_county_modifier = { + modifier = 6131_mapped_wilderness_county_modifier + years = 10 + } + } + add_prestige = medium_prestige_gain +} + +hold_court.6130 = { + type = court_event + title = hold_court.6130.t + desc = hold_court.6130.desc + theme = court + lower_left_portrait = scope:tutor + lower_center_portrait = scope:m_hunt + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:6130_proposer + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6130_proposer = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + NOT = { # not cooldown because it's only valid if you do the cadastre + has_character_flag = 6130_has_done_cadastre + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = 6130_proposer + save_scope_as = seneschal + court_event_character_flag_effect = yes + } + add_character_flag = { + flag = 6130_seneschal_assigned + months = 6 + } + } + else = { + cp:councillor_steward = { + save_scope_as = 6130_proposer + court_event_character_flag_effect = yes + } + add_character_flag = { + flag = 6130_steward_assigned + days = 180 + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: yes + option = { + name = hold_court.6130.a + remove_treasury_or_gold = major_treasury_or_gold_value + show_as_tooltip = { + random_list = { + 100 = { + show_chance = no + desc = hold_court.6130.a.tt + hold_court_6130_a_rewards = yes + } + } + } + hidden_effect = { + trigger_event = { + id = hold_court.6131 + days = { 93 171 } + } + add_character_flag = { + flag = 6130_has_done_cadastre + years = 20 + } + } + stress_impact = { + lazy = minor_stress_gain + greedy = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = greedy + add = -75 + } + modifier = { + gold < major_treasury_or_gold_value + factor = 0 + } + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = 0.25 + } + } + } + + #Option D: no + option = { + name = hold_court.6130.d + scope:6130_proposer = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + if = { + limit = { + has_character_flag = 6130_seneschal_assigned + } + remove_character_flag = 6130_seneschal_assigned + } + if = { + limit = { + has_character_flag = 6130_steward_assigned + } + remove_character_flag = 6130_steward_assigned + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + } + modifier = { + gold < major_gold_value + add = 100 + } + } + } + + after = { + scope:6130_proposer = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:m_hunt } + scope:m_hunt = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.6131 = { + type = character_event + title = hold_court.6131.t + desc = hold_court.6131.desc + theme = court + right_portrait = { + character = scope:6131_proposer + animation = personality_rational + } + + trigger = { + trigger_if = { + limit = { + scope:6130_proposer = { is_alive = no } + } + OR = { + exists = cp:councillor_steward + any_court_position_holder = { + type = seneschal_court_position + } + } + } + } + + immediate = { + if = { + limit = { + scope:6130_proposer = { is_alive = yes } + } + scope:6130_proposer = { + save_scope_as = 6131_proposer + } + } + else_if = { + limit = { + any_court_position_holder = { + type = seneschal_court_position + } + } + random_court_position_holder = { + type = seneschal_court_position + save_scope_as = 6131_proposer + } + add_character_flag = { + flag = 6131_seneschal_assigned + days = 3 + } + } + else = { + cp:councillor_steward = { + save_scope_as = 6131_proposer + } + add_character_flag = { + flag = 6131_steward_assigned + days = 3 + } + } + if = { + limit = { + scope:6130_proposer = { + is_alive = no + } + } + if = { + limit = { + has_character_flag = 6130_seneschal_assigned + } + remove_character_flag = 6130_seneschal_assigned + } + if = { + limit = { + has_character_flag = 6130_steward_assigned + } + remove_character_flag = 6130_steward_assigned + } + } + } + + option = { + name = hold_court.6131.a + hold_court_6130_a_rewards = yes + } +} + +################################################## +# A Cumbersome Gift +# by Claudia Baldassi +# 6140 +################################################## + +# A vassal offers you a bear/tiger/lion. Do you keep it for entertainment, kill it for a soft carpet, or...? If you keep it to show off during banquets, something might happen, good or bad! # + +scripted_trigger hold_court_6140_valid_vassal_trigger = { + has_court_event_flag = no + opinion = { + target = root + value >= 50 + } + is_available_healthy_ai_adult = yes + any_held_county = { + title_province = { + OR = { + hold_court_6140_europe_trigger = yes + hold_court_6140_india_trigger = yes + hold_court_6140_africa_trigger = yes + } + } + } +} + +scripted_trigger hold_court_6140_europe_trigger = { + terrain = forest + geographical_region = world_europe +} + +scripted_trigger hold_court_6140_india_trigger = { + terrain = jungle + geographical_region = world_india +} + +scripted_trigger hold_court_6140_africa_trigger = { + OR = { + terrain = jungle + terrain = desert_mountains + terrain = oasis + terrain = drylands + } + geographical_region = world_africa +} + +hold_court.6140 = { + type = court_event + title = hold_court.6140.t + desc = hold_court.6140.desc + theme = court + lower_right_portrait = scope:jester + court_scene = { + button_position_character = scope:6140_gifter + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6140_gifter = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_vassal = { + hold_court_6140_valid_vassal_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { + limit = { + hold_court_6140_valid_vassal_trigger = yes + } + save_scope_as = 6140_gifter + court_event_character_flag_effect = yes + random_held_county = { + limit = { + title_province = { + OR = { + hold_court_6140_europe_trigger = yes + hold_court_6140_india_trigger = yes + hold_court_6140_africa_trigger = yes + } + } + } + save_scope_as = location + title_province = { + save_scope_as = 6140_province + } + } + } + if = { + limit = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + has_court_event_flag = no + is_available_healthy_ai_adult = yes + } + } + random_court_position_holder = { + type = court_jester_court_position + limit = { + has_court_event_flag = no + is_available_healthy_ai_adult = yes + } + save_scope_as = jester + } + } + hunt_activity_dangerous_game_effect = { PROVINCE = scope:6140_province } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: Kill it for pelt (chance to get an artifact) + option = { + name = hold_court.6140.a + custom_tooltip = hold_court.6140.a.tt + random_list = { + 80 = { + add_character_modifier = { + modifier = 6140_new_carpet_modifier + years = 50 + } + } + 20 = { + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = root.var:animal_type + } + if = { + limit = { exists = scope:newly_created_artifact } + scope:newly_created_artifact = { save_scope_as = pelt } + send_interface_toast = { + title = hold_court.6140.artifact_toast + left_icon = scope:pelt + show_as_tooltip = { + scope:pelt = { set_owner = root } + } + } + } + custom_tooltip = hold_court.6140.artifact_tt + } + } + change_current_court_grandeur = minor_court_grandeur_gain + ai_chance = { + base = 100 + } + } + + #Option B: Keep it as pet + option = { + name = hold_court.6140.b + change_current_court_grandeur = monumental_court_grandeur_gain + add_character_modifier = { + modifier = 6140_pet_modifier + years = 10 + } + ai_chance = { + base = 100 + } + } + + #Option C: if you have a jester + option = { + name = hold_court.6140.c + trigger = { + exists = scope:jester + } + change_current_court_grandeur = medium_court_grandeur_gain + reverse_add_opinion = { + target = scope:jester + modifier = scared_opinion + opinion = -30 + } + add_character_modifier = { + modifier = 6140_pet_modifier + years = 10 + } + every_courtier_or_guest = { + custom = 6140_every_courtier_or_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + scope:jester = { + duel = { + skill = prowess + value = average_skill_rating + 50 = { #Success! + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -50 + } + desc = hold_court.6140.c.success + root = { + send_interface_toast = { + title = hold_court.6140.c.success.tt + left_icon = scope:jester + every_courtier_or_guest = { + custom = 6140_every_courtier_or_guest + add_opinion = { + target = scope:jester + modifier = impressed_opinion + opinion = 20 + } + } + } + } + } + 30 = { #Soft failure + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -20 + } + desc = hold_court.6140.c.soft_failure + root = { + send_interface_toast = { + title = hold_court.6140.c.soft_failure.tt + left_icon = scope:jester + every_courtier_or_guest = { + custom = 6140_every_courtier_or_guest + add_opinion = { + target = scope:jester + modifier = amused_opinion + opinion = 10 + } + } + } + } + } + 15 = { #Middle failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -20 + } + desc = hold_court.6140.c.middle_failure + root = { + send_interface_toast = { + title = hold_court.6140.c.middle_failure.tt + left_icon = scope:jester + scope:jester = { + random_list = { + 30 = { + apply_maimed_trait_and_modifier_effect = yes + } + 30 = { + add_trait = one_legged + } + 30 = { + add_trait = disfigured + } + } + } + } + } + } + 5 = { #Hard failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -1 + } + desc = hold_court.6140.c.hard_failure + root = { + send_interface_toast = { + title = hold_court.6140.c.hard_failure.tt + left_icon = scope:jester + scope:jester = { + death = { + death_reason = death_riding_animal + } + } + } + } + } + } + } + ai_chance = { + base = 120 + ai_value_modifier = { + ai_compassion = -0.25 + ai_sociability = 0.25 + } + } + } + + #Option D: if you are a torturer + option = { + name = hold_court.6140.d + trigger = { + OR = { + has_trait = torturer + has_trait = callous + has_trait = sadistic + } + } + trait = torturer + trait = callous + trait = sadistic + add_character_modifier = { + modifier = 6140_pet_modifier + years = 10 + } + every_prisoner = { + custom = 6140_every_prisoner + add_opinion = { + target = root + modifier = scared_opinion + opinion = -50 + } + add_character_modifier = 6140_animal_guardian_modifier + } + ai_chance = { + base = 150 + } + } + + #Option E: Turn it away + option = { + name = hold_court.6140.e + reverse_add_opinion = { + target = scope:6140_gifter + modifier = insult_opinion + opinion = -40 + } + ai_chance = { + base = 75 + } + } + + after = { + remove_variable = animal_type + scope:6140_gifter = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:jester } + scope:jester = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +#feast events: +# -host-only - you bring in the beast: you/someone gets hurt or killed, your master of the hunt intervenes, jester rides it, you intimidate your enemies, all guests are impressed (if no one dies) +# -host-triggered - the host brings in the beast: you are scared/impressed, you/someone gets hurt or killed, master of the hunt of host intervenes, jester rides it + +################################################## +# Empty Coffers +# by Claudia Baldassi +# 6160 +################################################## + +# A vassal is bankrupt and is asking for money to be bailed out. # + +scripted_trigger hold_court_6160_valid_bankrupt_vassal_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + gold < 0 +} + +scripted_trigger hold_court_6160_valid_hook_trigger = { + OR = { + has_hook_of_type = { + type = indebted_hook + target = root + } + has_hook_of_type = { + type = favor_hook + target = root + } + } +} + +scripted_trigger hold_court_6160_valid_friend_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + OR = { + has_any_good_relationship_with_root_trigger = yes + is_child_of = root + has_relation_best_friend = root + has_relation_soulmate = root + is_close_family_of = root + } +} + +hold_court.6160 = { + type = court_event + title = hold_court.6160.t + desc = { + desc = hold_court.6160.desc + first_valid = { + triggered_desc = { + trigger = { + scope:6160_vassal = { hold_court_6160_valid_friend_trigger = yes } + } + desc = hold_court.6160.desc_friend + } + triggered_desc = { + trigger = { + scope:6160_vassal = { hold_court_6160_valid_hook_trigger = yes } + } + desc = hold_court.6160.desc_hook + } + desc = hold_court.6160.desc_fallback + } + } + theme = court + lower_left_portrait = scope:almoner + lower_center_portrait = scope:seneschal + court_scene = { + button_position_character = scope:6160_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6160_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + any_vassal = { hold_court_6160_valid_bankrupt_vassal_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 3 + any_vassal = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_hook_trigger = yes + } + } + modifier = { + factor = 2 + any_vassal = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_friend_trigger = yes + } + } + modifier = { + factor = 0.1 + gold < 0 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + if = { + limit = { + any_vassal = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_hook_trigger = yes + } + } + random_vassal = { + limit = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_hook_trigger = yes + } + save_scope_as = 6160_vassal + } + } + else_if = { + limit = { + any_vassal = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_friend_trigger = yes + } + } + random_vassal = { + limit = { + hold_court_6160_valid_bankrupt_vassal_trigger = yes + hold_court_6160_valid_friend_trigger = yes + } + save_scope_as = 6160_vassal + } + } + else = { + random_vassal = { + limit = { hold_court_6160_valid_bankrupt_vassal_trigger = yes } + save_scope_as = 6160_vassal + } + } + scope:6160_vassal = { + court_event_character_flag_effect = yes + } + if = { + limit = { + employs_court_position = high_almoner_court_position + any_court_position_holder = { + type = high_almoner_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = almoner + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = seneschal_court_position + any_court_position_holder = { + type = seneschal_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = seneschal_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = seneschal + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: money for new hook + option = { + name = hold_court.6160.a + trigger = { + NOT = { + scope:6160_vassal = { + hold_court_6160_valid_hook_trigger = yes + } + } + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_short_term_gold = { + target = scope:6160_vassal + gold = medium_gold_value + } + add_hook = { + type = indebted_hook + target = scope:6160_vassal + } + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { + greedy = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + gold < medium_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -50 + } + ai_value_modifier = { + ai_greed = -0.25 + } + } + } + + #Option B: gold for old hook + option = { + name = hold_court.6160.b + trigger = { + scope:6160_vassal = { + hold_court_6160_valid_hook_trigger = yes + } + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + scope:6160_vassal = { + remove_hook = { target = root } + } + pay_short_term_gold = { + target = scope:6160_vassal + gold = medium_gold_value + } + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 30 + } + stress_impact = { + greedy = medium_stress_gain + } + ai_chance = { + base = 120 + modifier = { + gold < medium_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -50 + } + ai_value_modifier = { + ai_greed = -0.25 + ai_honor = 0.25 + } + } + } + + #Option C: gold for friend + option = { + name = hold_court.6160.c + trigger = { + scope:6160_vassal = { + hold_court_6160_valid_friend_trigger = yes + NOT = { + hold_court_6160_valid_hook_trigger = yes + } + } + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_short_term_gold = { + target = scope:6160_vassal + gold = medium_gold_value + } + add_prestige = major_prestige_gain + change_current_court_grandeur = medium_court_grandeur_gain + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 40 + } + stress_impact = { + gregarious = medium_stress_loss + improvident = major_stress_loss + greedy = major_stress_gain + } + ai_chance = { + base = 100 + modifier = { + gold < medium_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -75 + } + modifier = { + has_trait = gregarious + add = 50 + } + modifier = { + has_trait = improvident + add = 75 + } + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + #Option D: almoner + option = { + name = hold_court.6160.d + trigger = { + exists = scope:almoner + NOT = { exists = scope:seneschal } # Prevent option bloat + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_short_term_gold = { + target = scope:6160_vassal + gold = major_gold_value + } + add_piety = major_piety_gain + change_current_court_grandeur = major_court_grandeur_gain + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 30 + } + add_hook = { + type = indebted_hook + target = scope:6160_vassal + } + stress_impact = { + improvident = major_stress_loss + greedy = major_stress_gain + } + ai_chance = { + base = 100 + modifier = { + gold < major_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -75 + } + modifier = { + has_trait = improvident + add = 75 + } + modifier = { + has_trait = zealous + add = 25 + } + ai_value_modifier = { + ai_greed = -0.5 + ai_zeal = 0.5 + } + } + } + + #Option E: seneschal + option = { + name = hold_court.6160.e + trigger = { + exists = scope:seneschal + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + if = { + limit = { + scope:6160_vassal = { + hold_court_6160_valid_hook_trigger = yes + } + } + scope:6160_vassal = { + remove_hook = { target = root } + } + } + pay_treasury_or_gold = { + target = scope:6160_vassal + value = medium_treasury_or_gold_value + } + scope:6160_vassal = { + add_character_modifier = { + modifier = 6160_seneschal_help_modifier + years = 5 + } + } + add_hook = { + type = indebted_hook + target = scope:6160_vassal + } + add_prestige = medium_prestige_gain + change_current_court_grandeur = medium_court_grandeur_gain + reverse_add_opinion = { + target = scope:6160_vassal + modifier = grateful_opinion + opinion = 30 + } + stress_impact = { + greedy = medium_stress_gain + } + ai_chance = { + base = 120 + modifier = { + gold < medium_treasury_or_gold_value + add = -95 + } + modifier = { + has_trait = greedy + add = -50 + } + ai_value_modifier = { + ai_greed = -0.25 + } + } + } + + #Option F: no money to spare + option = { + name = hold_court.6160.f + reverse_add_opinion = { + target = scope:6160_vassal + modifier = disappointed_opinion + opinion = -10 + } + stress_impact = { + generous = major_stress_gain + improvident = massive_stress_gain + } + ai_chance = { + base = 100 + modifier = { + gold < medium_gold_value + add = 95 + } + modifier = { + has_trait = greedy + add = 50 + } + modifier = { + has_trait = generous + add = -75 + } + modifier = { + has_trait = improvident + add = -100 + } + ai_value_modifier = { + ai_greed = 0.25 + } + } + } + + after = { + scope:6160_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:almoner } + scope:almoner = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:seneschal } + scope:seneschal = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Ignoble Imprisonment +# by Claudia Baldassi +# 6170 +################################################## + +# A vassal has a family member imprisoned by another vassal in your realm. They petition you to have them released # + +scripted_trigger hold_court_6170_valid_vassal_trigger = { + is_available_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = vassal_scope + OR = { + any_close_or_extended_family_member = { + hold_court_6170_valid_prisoner_trigger = yes + } + any_consort = { + hold_court_6170_valid_prisoner_trigger = yes + } + betrothed ?= { + hold_court_6170_valid_prisoner_trigger = yes + } + } +} + +scripted_trigger hold_court_6170_valid_prisoner_trigger = { + has_court_event_flag = no + is_imprisoned = yes + is_ai = yes + imprisoner = { + is_vassal_of = root + NOR = { + AND = { + exists = scope:vassal_scope + this = scope:vassal_scope + } + AND = { + exists = scope:6170_vassal + this = scope:6170_vassal + } + } + } +} + +hold_court.6170 = { + type = court_event + title = hold_court.6170.t + desc = hold_court.6170.desc + theme = court + lower_right_portrait = scope:6170_relative + lower_left_portrait = scope:6170_rival + court_scene = { + button_position_character = scope:6170_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6170_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { + hold_court_6170_valid_vassal_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_vassal = { + limit = { + hold_court_6170_valid_vassal_trigger = yes + } + save_scope_as = 6170_vassal + court_event_character_flag_effect = yes + } + if = { + limit = { + scope:6170_vassal = { + any_close_or_extended_family_member = { + hold_court_6170_valid_prisoner_trigger = yes + } + } + } + scope:6170_vassal = { + random_close_or_extended_family_member = { + limit = { + hold_court_6170_valid_prisoner_trigger = yes + } + save_scope_as = 6170_relative + } + } + } + else_if = { + limit = { + scope:6170_vassal = { + any_consort = { + hold_court_6170_valid_prisoner_trigger = yes + } + } + } + scope:6170_vassal = { + random_consort = { + limit = { + hold_court_6170_valid_prisoner_trigger = yes + } + save_scope_as = 6170_relative + } + } + } + else = { + scope:6170_vassal = { + betrothed = { + save_scope_as = 6170_relative + } + } + } + scope:6170_relative = { + court_event_character_flag_effect = yes + imprisoner = { + save_scope_as = 6170_rival + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: release them + option = { + name = hold_court.6170.a + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:6170_vassal + } + } + add_hook = { + type = favor_hook + target = scope:6170_vassal + } + } + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:6170_relative + } + } + add_hook = { + type = favor_hook + target = scope:6170_relative + } + } + scope:6170_relative = { release_from_prison = yes } + reverse_add_opinion = { + target = scope:6170_vassal + modifier = grateful_opinion + opinion = 30 + } + if = { + limit = { + scope:6170_vassal = { + can_set_relation_potential_friend_trigger = { CHARACTER = root } + } + } + scope:6170_vassal = { + set_relation_potential_friend = root + } + } + reverse_add_opinion = { + target = scope:6170_relative + modifier = grateful_opinion + opinion = 30 + } + stress_impact = { + callous = medium_stress_gain + torturer = medium_stress_gain + arbitrary = medium_stress_gain + sadistic = medium_stress_gain + vengeful = medium_stress_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { + has_trait = callous + add = -50 + } + modifier = { + has_trait = torturer + add = -50 + } + modifier = { + has_trait = arbitrary + add = -50 + } + modifier = { + has_trait = sadistic + add = -50 + } + modifier = { + has_trait = vengeful + add = -50 + } + } + } + + #Option E: I don't care + option = { + name = hold_court.6170.e + stress_impact = { + lazy = medium_stress_loss + compassionate = medium_stress_gain + diligent = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = compassionate + add = -50 + } + modifier = { + has_trait = diligent + add = -50 + } + } + } + + after = { + scope:6170_vassal = { + clear_court_event_participation = yes + } + scope:6170_relative = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +############################# +# A Shadow in the Night # +# by Claudia Baldassi # +# 6190 # +############################# + +# Court physician has been spotted in the cemetery excavating the graves of the recently deceased. He is using them to practice dissecting/documentation but the locals are (understandably) not happy and want you to disown him. # + +hold_court.6190 = { + type = court_event + title = hold_court.6190.t + desc = hold_court.6190.desc + theme = court + + court_scene = { + button_position_character = scope:6190_local + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6190_local = { + group = petitioners_group + animation = anger + } + scope:physician = { + group = petitioners_group + animation = schadenfreude + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_court_event_flag = no + is_available_ai_adult = yes + OR = { + has_trait = ambitious + has_trait = cynical + has_trait = callous + has_trait = sadistic + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 20 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_focus_or_focus_trait_trigger = { FOCUS = learning_medicine_focus } + } + } + modifier = { + add = 5 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = ambitious + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = cynical + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = callous + } + } + modifier = { + add = 10 + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + has_trait = sadistic + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_court_position_holder = { + type = court_physician_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = physician + court_event_character_flag_effect = yes + } + create_character = { + location = root.capital_province + template = generic_peasant_character + save_scope_as = 6190_local + } + scope:6190_local = { + court_event_character_flag_effect = yes + } + capital_province = { + save_scope_as = capital + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: these studies are necessary + option = { + name = hold_court.6190.a + capital_county = { + add_county_modifier = { + modifier = 6190_grave_robbing_county_modifier + years = 10 + } + } + every_courtier_or_guest = { + custom = custom.every_non_callous_or_sadistic_courtier_and_guest + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + this = scope:physician + } + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:physician = { + if = { + limit = { + NAND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + random = { + chance = 15 + physician_lifestyle_rank_up_effect = yes + } + } + else_if = { + limit = { + NOT = { + has_trait = lifestyle_physician + } + } + add_trait = lifestyle_physician + } + else = { + add_learning_skill = 1 + } + } + stress_impact = { + zealous = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.25 + } + } + } + + #Option B: I wanna take part! FOR SCIENCE! + option = { + name = hold_court.6190.b + trigger = { + OR = { + has_trait = lifestyle_physician + has_trait = cynical + has_trait = callous + has_trait = sadistic + AND = { + has_focus_or_focus_trait_trigger = { FOCUS = learning_medicine_focus } + has_trait = ambitious + } + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + } + add_dread = medium_dread_gain + change_current_court_grandeur = minor_court_grandeur_loss + add_learning_lifestyle_perk_points = 1 + every_courtier_or_guest = { + custom = custom.every_non_callous_or_sadistic_courtier_and_guest + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + this = scope:physician + } + } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + scope:physician = { + if = { + limit = { + NAND = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + random = { + chance = 20 + physician_lifestyle_rank_up_effect = yes + } + } + else_if = { + limit = { + NOT = { + has_trait = lifestyle_physician + } + } + add_trait = lifestyle_physician + } + else = { + add_learning_skill = 1 + } + } + capital_county = { + add_county_modifier = { + modifier = 6190_grave_robbing_county_modifier + years = 10 + } + } + stress_impact = { + compassionate = major_stress_impact_gain + zealous = major_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_compassion = -0.5 + } + } + } + + #Option D: Blasphemy! Punish the physician + option = { + name = hold_court.6190.d + revoke_court_position = { + recipient = scope:physician + court_position = court_physician_court_position + } + rightfully_imprison_character_effect = { + TARGET = scope:physician + IMPRISONER = root + } + capital_county = { + add_county_modifier = { + modifier = 6190_safe_graves_county_modifier + years = 10 + } + } + every_courtier_or_guest = { + custom = custom.every_zealous_courtier_and_guest + limit = { + has_trait = zealous + this != scope:physician + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 25 + } + } + stress_impact = { + zealous = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + torturer = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = -1 + } + } + } + + #Option E: Just stop + option = { + name = hold_court.6190.e + scope:physician = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + capital_county = { + add_county_modifier = { + modifier = 6190_safe_graves_county_modifier + years = 10 + } + } + ai_chance = { + base = 100 + } + } + + after = { + scope:physician = { + clear_court_event_participation = yes + } + scope:6190_local = { + clear_court_event_participation = yes + if = { + limit = { + is_alive = yes + is_imprisoned = no + } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +######################### +# A Land of Foreigners # +# by Claudia Baldassi # +# 6210 # +######################### + +# A vassal comes to you begging for help because their land is overrun by unhappy barbarians (= other culture). # + +scripted_trigger hold_court_6210_valid_vassal_trigger = { + has_court_event_flag = no + culture = { + this = root.culture + any_parent_culture_or_above = { + save_temporary_scope_as = parent + } + } + is_landed_or_landless_administrative = yes + is_available_ai_adult = yes + exists = capital_county + OR = { + capital_county = { + hold_court_6210_valid_county_trigger = yes + } + AND = { + realm_size >= 4 + any_sub_realm_county = { + count >= 3 + hold_court_6210_valid_county_trigger = yes + } + } + } +} + +scripted_trigger hold_court_6210_valid_county_trigger = { + culture = { + NOR = { + this = root.culture + any_parent_culture_or_above = { + this = root.culture + this = scope:parent + } + } + } +} + +hold_court.6210 = { + type = court_event + title = hold_court.6210.t + desc = hold_court.6210.desc + theme = court + lower_left_portrait = { + trigger = { exists = scope:steward } + character = scope:steward + } + lower_center_portrait = { + trigger = { exists = scope:r_architect } + character = scope:r_architect + } + cooldown = { years = 10 } + + court_scene = { + button_position_character = scope:6210_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6210_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_vassal = { + hold_court_6210_valid_vassal_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { + limit = { + hold_court_6210_valid_vassal_trigger = yes + } + save_scope_as = 6210_vassal + court_event_character_flag_effect = yes + } + if = { + limit = { + any_court_position_holder = { + type = royal_architect_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = royal_architect_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = r_architect + court_event_character_flag_effect = yes + } + } + if = { + limit = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + } + if = { + limit = { + scope:6210_vassal.capital_county = { + hold_court_6210_valid_county_trigger = yes + } + } + scope:6210_vassal.capital_county = { + save_scope_as = 6210_main_county + } + } + else = { + scope:6210_vassal = { + random_sub_realm_county = { + limit = { + hold_court_6210_valid_county_trigger = yes + } + save_scope_as = 6210_main_county + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: send steward + option = { + name = hold_court.6210.a + trigger = { + exists = scope:steward + } + scope:steward = { + set_council_task = { + task_type = task_promote_culture + target = scope:6210_main_county.title_province + } + } + scope:6210_main_county = { + add_county_modifier = { + modifier = easier_to_culture_convert + years = 25 + } + } + scope:6210_vassal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + stress_impact = { + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -25 + } + } + } + + #Option B: send the architect + option = { + name = hold_court.6210.b + trigger = { + exists = scope:r_architect + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + custom_tooltip = hold_court.6210.b.tt + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:6210_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6210_valid_county_trigger = yes + } + add_county_modifier = { + modifier = 6210_architect_county_modifier + years = 5 + } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + scope:r_architect = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + change_current_court_grandeur = major_court_grandeur_gain + add_prestige = medium_prestige_gain + scope:6210_main_county = { + add_county_modifier = { + modifier = easier_to_culture_convert + years = 25 + } + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + gold < medium_treasury_or_gold_value + add = -200 + } + } + } + + #Option C: tolerance + option = { + name = hold_court.6210.c + scope:6210_vassal = { + every_sub_realm_county = { + limit = { + hold_court_6210_valid_county_trigger = yes + } + add_county_modifier = { + modifier = governance_1073_conversion_resistance_modifier + years = 10 + } + } + } + scope:6210_main_county.culture = { + change_cultural_acceptance = { + target = root.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + change_current_court_grandeur = minor_court_grandeur_gain + add_prestige = medium_prestige_gain + ai_chance = { + base = 100 + modifier = { + has_trait = trusting + add = 20 + } + modifier = { + has_trait = compassionate + add = 30 + } + modifier = { + culture = { has_cultural_pillar = ethos_egalitarian } + add = 100 + } + modifier = { + has_trait = paranoid + add = -100 + } + } + } + + after = { + scope:6210_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:r_architect } + scope:r_architect = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:steward } + scope:steward = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +############################# +# A Massive Problem # +# by Claudia Baldassi # +# 6230 # +############################# + +# A vassal in India has problem with a horde of elephants that have gone berserk and brought ruin and destruction in one (several?) of his counties. He pleads for help to manage the elephants and rebuild! # + +hold_court.6230 = { + type = court_event + title = hold_court.6230.t + desc = hold_court.6230.desc + theme = court + lower_left_portrait = scope:m_horse + + court_scene = { + button_position_character = scope:6230_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:6230_vassal = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_vassal_or_below = { + has_court_event_flag = no + is_available_ai_adult = yes + is_landed_or_landless_administrative = yes + capital_province = { + geographical_region = world_innovation_elephants + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal_or_below = { + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + is_landed_or_landless_administrative = yes + capital_province = { + geographical_region = world_innovation_elephants + } + + } + save_scope_as = 6230_vassal + court_event_character_flag_effect = yes + } + scope:6230_vassal.capital_province = { + save_scope_as = 6230_province + } + if = { + limit = { + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = master_of_horse_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = m_horse + court_event_character_flag_effect = yes + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: send gold to rebuild + option = { + name = hold_court.6230.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + pay_treasury_or_gold = { + target = scope:6230_vassal + value = medium_gold_value + } + reverse_add_opinion = { + target = scope:6230_vassal + modifier = grateful_opinion + opinion = 20 + } + scope:6230_province.county = { + add_county_modifier = { + modifier = 6230_rebuilding + years = 25 + } + } + add_prestige = medium_prestige_gain + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + add = -200 + gold < medium_gold_value + } + } + } + + #Option B: send aid in capturing the elephants + option = { + name = hold_court.6230.b + trigger = { + NOT = { exists = scope:m_horse } + } + duel = { + skill = martial + value = average_skill_rating + 40 = { + desc = hold_court.6230.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + send_interface_toast = { + title = hold_court.6230.b.success.tt + add_character_modifier = { + modifier = 6230_new_elephants_modifier + years = 10 + } + change_current_court_grandeur = medium_court_grandeur_gain + } + } + 60 = { + desc = hold_court.6230.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + send_interface_toast = { + title = hold_court.6230.b.failure.tt + change_current_court_grandeur = medium_court_grandeur_loss + scope:6230_province.county = { change_county_control = -5 } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { + add = -75 + martial < 10 + } + } + } + + #Option C: send master of horse to help + option = { + name = hold_court.6230.c + trigger = { + exists = scope:m_horse + } + scope:m_horse = { + duel = { + skill = martial + value = average_skill_rating + 40 = { + desc = hold_court.6230.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + root = { + send_interface_toast = { + title = hold_court.6230.b.success.tt + add_character_modifier = { + modifier = 6230_new_elephants_modifier + years = 10 + } + change_current_court_grandeur = medium_court_grandeur_gain + } + } + } + 60 = { + desc = hold_court.6230.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + root = { + send_interface_toast = { + title = hold_court.6230.b.failure.tt + change_current_court_grandeur = medium_court_grandeur_loss + scope:6230_province.county = { change_county_control = -5 } + } + } + } + } + } + ai_chance = { + base = 100 + } + } + + #Option D: Ganesh leads them + option = { + name = hold_court.6230.d + trigger = { + faith.religion = religion:hinduism_religion + } + add_piety = major_piety_gain + stress_impact = { + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option E: nope + option = { + name = hold_court.6230.e + reverse_add_opinion = { + target = scope:6230_vassal + modifier = disappointed_opinion + opinion = -20 + } + scope:6230_province.county = { change_county_control = -5 } + ai_chance = { + base = 75 + } + } + + after = { + scope:6230_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:m_horse } + scope:m_horse = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + + + + + +################################################## +# Joe Parkin + +################################################## +# 8001 Stifled Commerce +# 8010 The X Frontier +# 8020 Sacred Claims +# 8030 Civic Rivalry +# 8040 Special Treatment +# 8050 - 8053 Royal Service +# 8060 - 8061 A Temple for X +# 8070 - 8071 The Growth of X +# 8080 The Republic of X +# 8090 A Place at Court +# 8100 A Child of the Court +# 8110 Serious Business +# 8120 Evangelical Backlash +# 8130 Cultural Pride +# 8140 - 8142 Puppy Patronage +# 8150 Contractual Compromise +# 8160 Public Accusation +# 8161 Personal Matter +# 8170 - 8171 Services Rendered +# 8180 Noble Privileges +# 8190 Enemy Within +# 8200 Servant of God +# 8210 Rightful Lands +# 8220 - 8222 Opportunity Knocks +# 8240 Thy Neighbor's Wife +# 8241 Spoiled for Choice +# 8250 Hankering for X +# 8251 The Dancer +# 8260 The King's Peace +# 8270 Oath of Fealty +# 8280 Nomadic Neighbors +################################################## + +################################################## +# Stifled Commerce +# by Joe Parkin +# 8001 +################################################## + +scripted_trigger hold_court_available_mayor_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + primary_title = { + tier = tier_barony + NOT = { has_variable = hold_court_city_cooldown_var } + } + government_has_flag = government_is_republic + NOT = { is_close_or_extended_family_of = root } +} + +scripted_effect hold_court_8001_revoke_title_effect = { + if = { + limit = { has_relation_friend = root } + remove_relation_friend = root + } + if = { # If they recently imprisoned you, or asked for your excommunication, they become your rival + limit = { + OR = { + has_opinion_modifier = { + target = root + modifier = released_from_prison + } + AND = { + exists = var:requested_my_excommunication + var:requested_my_excommunication = root + } + } + NOT = { has_relation_rival = root } + } + if = { + limit = { has_relation_potential_rival = root } + remove_relation_potential_rival = root + } + root = { + set_relation_rival = { + target = prev + reason = rival_revoked_title + } + } + } + else = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_removed_mayor + OPINION = 0 + } + } +} + +# A merchant complains about the mayor of their town +hold_court.8001 = { + type = court_event + title = hold_court.8001.t + desc = hold_court.8001.desc + theme = court + lower_right_portrait = scope:portrait + court_scene = { + button_position_character = scope:merchant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:merchant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { hold_court_available_mayor_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + every_vassal = { + limit = { hold_court_available_mayor_trigger = yes } + add_to_list = potential_mayor + } + random_in_list = { + list = potential_mayor + limit = { + OR = { + has_trait = lazy + has_trait = greedy + has_trait = deceitful + has_trait = arbitrary + stewardship <= mediocre_skill_rating + } + } + alternative_limit = { + NOR = { + has_trait = diligent + has_trait = generous + has_trait = honest + has_trait = just + stewardship >= decent_skill_rating + } + } + alternative_limit = { + always = yes + } + save_scope_as = mayor + save_scope_as = portrait + court_event_character_flag_effect = yes + primary_title = { + save_scope_as = town + set_variable = { + name = hold_court_city_cooldown_var + years = 25 + } + } + } + create_character = { + template = merchant_template + location = root.capital_province + trait = honest + save_scope_as = merchant + after_creation = { + add_character_flag = created + } + } + scope:merchant = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Replace the Mayor + name = hold_court.8001.a + scope:mayor = { + depose = yes # depose_effect unnecessary for AI mayor + add_opinion = { + modifier = angry_opinion + target = root + opinion = -40 + } + hold_court_8001_revoke_title_effect = yes + } + scope:town.county = { change_development_progress = 50 } + add_character_modifier = { + modifier = hold_court_8001_deposed_modifier + years = 10 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_compassion = 0.25 + ai_rationality = 0.25 + ai_greed = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { # Make Merchant the Mayor + name = hold_court.8001.b + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + scope:town = { + change_title_holder = { + holder = scope:merchant + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:mayor = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -60 + } + hold_court_8001_revoke_title_effect = yes + } + random_list = { + 30 = { + modifier = { + add = 5 + scope:merchant = { has_trait = diligent } + } + modifier = { + add = 5 + scope:merchant = { has_trait = generous } + } + modifier = { + add = 5 + scope:merchant = { has_trait = honest } + } + modifier = { + add = 5 + scope:merchant = { has_trait = just } + } + modifier = { + add = 5 + scope:merchant = { stewardship >= decent_skill_rating } + } + send_interface_toast = { + title = hold_court.8001.b.tt_success + scope:town.county = { + add_county_modifier = { + modifier = hold_court_8001_merchant_boon_modifier + years = 15 + } + change_development_level = 1 + } + } + } + 70 = { + modifier = { + add = 5 + scope:merchant = { has_trait = lazy } + } + modifier = { + add = 5 + scope:merchant = { has_trait = greedy } + } + modifier = { + add = 5 + scope:merchant = { has_trait = arbitrary } + } + modifier = { + add = 5 + scope:merchant = { has_trait = deceitful } + } + modifier = { + add = 5 + scope:merchant = { stewardship <= 6 } + } + modifier = { + add = 5 + scope:merchant = { age < 25 } + } + modifier = { + add = 5 + scope:merchant = { has_trait = infirm } + } + modifier = { + add = 5 + scope:merchant = { has_trait = incapable } + } + modifier = { + add = 5 + scope:merchant = { age > 60 } + } + send_interface_toast = { + title = hold_court.8001.b.tt_failure + scope:town.county = { + add_county_modifier = { + modifier = hold_court_8001_merchant_bust_modifier + years = 15 + } + } + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } + } + } + add_character_modifier = { + modifier = hold_court_8001_deposed_modifier + years = 10 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_compassion = -0.25 + ai_rationality = -0.25 + ai_greed = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { # Fine the Mayor + name = hold_court.8001.c + duel = { + skill = stewardship + value = average_skill_rating + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8001.c.tt_success + send_interface_toast = { + title = hold_court.8001.c.tt_success + scope:mayor = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -15 + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -9 + } + desc = hold_court.8001.c.tt_failure + send_interface_toast = { + title = hold_court.8001.c.tt_failure + scope:town.county = { + scope:town.county = { change_development_progress = -50 } + add_county_modifier = { + modifier = hold_court_8001_ignored_modifier + years = 10 + } + } + stress_impact = { + just = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = 0.5 + } + modifier = { #Weight up for duel. + add = 15 + stewardship > scope:mayor.stewardship + } + } + } + + option = { # Compensate the Merchants + name = hold_court.8001.d + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:mayor = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + scope:town.county = { + add_county_modifier = { + modifier = hold_court_8001_compensated_modifier + years = 15 + } + } + stress_impact = { + greedy = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_compassion = 0.5 + ai_greed = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Imprison the Merchant + name = hold_court.8001.e + imprison_character_effect = { + TARGET = scope:merchant + IMPRISONER = root + } + scope:mayor = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + add_dread = minor_dread_gain + scope:town.county = { + add_county_modifier = { + modifier = hold_court_8001_imprisoned_modifier + years = 10 + } + } + stress_impact = { + just = medium_stress_impact_gain + calm = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_rationality = -0.25 + ai_compassion = -0.25 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = just + } + modifier = { #Weight down for stress. + add = -30 + has_trait = calm + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + after = { + scope:mayor = { + clear_court_event_participation = yes + } + scope:merchant = { + clear_court_event_participation = yes + if = { + limit = { + is_landed = no + is_imprisoned = no + } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + scope:merchant = { + if = { + limit = { + is_ruler = no + } + silent_disappearance_ai_if_created_effect = yes + } + } + } +} + +################################################## +# The X Frontier +# by Joe Parkin +# 8010 +################################################## + +scripted_trigger hold_court_8010_lord_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + primary_title.tier >= tier_county + government_has_flag = government_is_feudal + subject_contract_is_blocked_from_modification = no + OR = { + vassal_contract_obligation_level_can_be_increased = fortification_rights + NOT = { vassal_contract_has_flag = has_march_contract } + } +} + +scripted_trigger hold_court_8010_contract_trigger = { + scope:frontier_lord = { + government_has_flag = government_is_feudal + vassal_contract_has_modifiable_obligations = yes + OR = { + AND = { + root.culture = { has_innovation = innovation_battlements } + vassal_contract_obligation_level_can_be_increased = fortification_rights + } + AND = { + root.culture = { has_innovation = innovation_burhs } + NOT = { vassal_contract_has_flag = has_march_contract } + } + } + } +} + +# A vassal bordering a powerful neighbor is worried +hold_court.8010 = { + type = court_event + title = hold_court.8010.t + desc = hold_court.8010.desc + theme = court + lower_right_portrait = scope:neighboring_enemy + court_scene = { + button_position_character = scope:frontier_lord + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:frontier_lord = { + group = petitioners_group + animation = worry + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + top_liege = this + NOT = { + any_vassal = { has_character_modifier = hold_court_8010_fortifications_modifier } + } + any_vassal = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_vassal = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } + primary_title.tier >= 2 + OR = { + has_trait = paranoid + has_trait = lazy + has_trait = craven + is_powerful_vassal = yes + } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + capital_barony = { save_scope_as = capital } + ordered_vassal = { + limit = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } # Prefer Dukes... + primary_title.tier = tier_duchy + } + alternative_limit = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } # ...then Counts... + primary_title.tier = tier_county + } + alternative_limit = { + hold_court_8010_lord_trigger = yes + any_sub_realm_county = { hold_court_8010_county_trigger = yes } # ...then Kings + primary_title.tier = tier_kingdom + } + order_by = hold_court_8010_border_length_value + save_scope_as = frontier_lord + court_event_character_flag_effect = yes + random_sub_realm_county = { + limit = { hold_court_8010_county_trigger = yes } + title_province.barony = { save_scope_as = frontier_barony } + ordered_title_to_title_neighboring_county = { + limit = { + holder.top_liege = { + NOR = { + this = root + is_allied_to = root + max_military_strength < hold_court_8010_75_strength_value # 75% of root's soldiers + } + } + } + order_by = holder.top_liege.max_military_strength + de_jure_liege = { save_scope_as = neighboring_duchy } + holder.top_liege = { save_scope_as = neighboring_enemy } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Give vassal defensive contract (March/Fortification Rights) + name = hold_court.8010.a + trigger = { + hold_court_8010_contract_trigger = yes + OR = { + AND = { + culture = { has_innovation = innovation_burhs } + scope:frontier_lord.primary_title.tier >= tier_duchy + } + AND = { + culture = { has_innovation = innovation_battlements } + scope:frontier_lord = { vassal_contract_obligation_level_can_be_increased = fortification_rights } + } + } + } + scope:frontier_lord = { + if = { + limit = { + AND = { + root.culture = { has_innovation = innovation_battlements } + vassal_contract_obligation_level_can_be_increased = fortification_rights + } + } + vassal_contract_set_obligation_level = { + type = fortification_rights + level = 1 + } + } + else = { + vassal_contract_set_obligation_level = { + type = special_contract + level = 2 + } + } + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + if = { + limit = { + can_add_hook = { + target = scope:frontier_lord + type = indebted_hook + } + } + add_hook = { + target = scope:frontier_lord + type = indebted_hook + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Pay for vassals fortications (if A is unavailable) + name = hold_court.8010.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:frontier_barony.county = { + add_county_modifier = { + modifier = hold_court_8010_fortifications_modifier + years = 15 + } + } + scope:frontier_lord = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + if = { + limit = { + can_add_hook = { + target = scope:frontier_lord + type = indebted_hook + } + } + add_hook = { + target = scope:frontier_lord + type = indebted_hook + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Fortify your own capital instead + name = hold_court.8010.c + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + capital_county = { + add_county_modifier = { + modifier = hold_court_8010_fortifications_modifier + years = 15 + } + } + scope:frontier_lord = { + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -15 + } + } + stress_impact = { + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_honor = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = brave + } + } + } + + option = { # Argue that it is unwarranted + name = hold_court.8010.d + duel = { + skill = diplomacy + value = average_skill_rating + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8010.d.tt_success + send_interface_toast = { + title = hold_court.8010.d.tt_success + left_icon = scope:frontier_lord + change_current_court_grandeur = medium_court_grandeur_gain + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = hold_court.8010.d.tt_failure + send_interface_toast = { + title = hold_court.8010.d.tt_failure + left_icon = scope:frontier_lord + add_prestige = minor_prestige_loss + scope:frontier_lord = { + add_opinion = { + modifier = dismissive_opinion + target = root + opinion = -20 + } + } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -15 + has_trait = paranoid + } + modifier = { #Weight up for duel. + add = 15 + diplomacy > scope:frontier_lord.diplomacy + } + } + } + + option = { # Dismiss vassal + name = hold_court.8010.e + add_character_modifier = { + modifier = hold_court_8010_vassal_modifier + years = 10 + } + scope:frontier_lord = { + add_opinion = { + modifier = dismissive_opinion + target = root + opinion = -10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + } + } + + after = { + scope:frontier_lord = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Sacred Claims +# by Joe Parkin +# 8020 +################################################## + +scripted_trigger hold_court_8020_county_trigger = { + this != root.capital_county + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + faith = root.faith + holder = { + has_court_event_flag = no + NOR = { + government_has_flag = government_is_theocracy + this = root.cp:councillor_court_chaplain + trigger_if = { + limit = { + exists = root.faith.religious_head + root != root.faith.religious_head + } + this = root.faith.religious_head + } + } + any_held_title = { + count >= 2 + title_tier = county + } + OR = { + this = root + AND = { + is_available_ai_adult = yes + NOT = { has_any_bad_relationship_with_root_trigger = yes } + } + } + } +} + +scripted_trigger hold_court_8020_cathedral_barony_trigger = { + is_holy_site_of = root.faith + title_province = { + OR = { + has_building = holy_site_cathedral_01 + has_building = holy_site_mosque_01 + has_building = holy_site_pagan_grand_temple_01 + has_building = holy_site_indian_grand_temple_01 + has_building = holy_site_other_grand_temple_01 + # TGP + has_building = holy_site_buddhist_grand_temple_01 + has_building = holy_site_japanese_temple_01 + has_building = holy_site_chinese_temple_01 + has_building = holy_site_se_asia_pagan_temple_01 + } + } +} + +scripted_effect hold_court_8020_grant_effect = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + } + } + scope:target_county = { + change_title_holder = { + holder = scope:candidate + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + scope:candidate = { change_government = theocracy_government } + } +} + +# Chaplain asks for a holy site +hold_court.8020 = { + type = court_event + title = hold_court.8020.t + desc = { + desc = hold_court.8020.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:pope } + desc = hold_court.8020.desc.body_pope + } + desc = hold_court.8020.desc.body_fallback + } + desc = hold_court.8020.desc.body_1 + first_valid = { + triggered_desc = { + trigger = { scope:target_county.holder = root } # Owns target personally + desc = hold_court.8020.desc.body_personal + } + desc = hold_court.8020.desc.body_vassal # Vassal owns target + } + desc = hold_court.8020.desc.body_2 + } + theme = realm + lower_left_portrait = scope:candidate + lower_right_portrait = scope:pope + artifact = { + target = scope:bishop_relic + position = lower_center_portrait + } + court_scene = { + button_position_character = scope:bishop + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:bishop = { + group = petitioners_group + animation = chaplain + } + scope:vassal_or_candidate = { + group = petitioners_group + animation = disapproval + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 30 } + + trigger = { + NOT = { has_character_flag = has_had_county_request_event } + top_liege = this + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + faith = { + has_doctrine = doctrine_theocracy_temporal + NOT = { has_doctrine_parameter = unreformed } + } + any_realm_county = { # Less than 10% theocratic counties in realm + percent <= 0.1 + holder = { government_has_flag = government_is_theocracy } + } + any_realm_county = { hold_court_8020_county_trigger = yes } # there is a holy_site in the realm + } + + weight_multiplier = { + base = 1 + modifier = { # County has a cathedral + add = 1 + any_realm_county = { + hold_court_8020_county_trigger = yes + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + OR = { + holder = root + holder = { is_vassal_of = root } + } + } + } + modifier = { # No prince bishops in realm + add = 0.5 + NOT = { + any_vassal_or_below = { + primary_title = { tier >= tier_county } + government_has_flag = government_is_theocracy + } + } + } + modifier = { # Favor emperors + add = 1 + highest_held_title_tier = tier_empire + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_county_request_event + years = 15 + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + court_event_character_flag_effect = yes + } + hidden_effect = { + if = { + limit = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + create_artifact_pedestal_reliquary_christian_effect = { OWNER = scope:bishop } + } + else_if = { + limit = { religion = religion:islam_religion } + create_artifact_pedestal_reliquary_islam_effect = { OWNER = scope:bishop } + } + else_if = { + limit = { religion = religion:buddhism_religion } + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = scope:bishop } + } + else_if = { + limit = { religion = religion:judaism_religion } + create_artifact_pedestal_reliquary_judaism_effect = { OWNER = scope:bishop } + } + else = { + create_artifact_sculpture_religious_effect = { OWNER = scope:bishop } + } + scope:newly_created_artifact = { save_scope_as = bishop_relic } + } + if = { + limit = { + exists = faith.religious_head + NOR = { + faith.religious_head = root + faith.religious_head = scope:bishop + } + } + faith.religious_head = { save_scope_as = pope } + } + every_realm_county = { + limit = { hold_court_8020_county_trigger = yes } + add_to_list = potential_princebishoprics + } + random_in_list = { + list = potential_princebishoprics + limit = { + holder = root + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + } + alternative_limit = { + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + } + alternative_limit = { holder = root } + alternative_limit = { always = yes } + save_scope_as = target_county + root = { + set_variable = { # Save var for custom loc + name = holy_site_var + value = scope:target_county + } + } + } + if = { + limit = { + scope:target_county.holder != root + } + scope:target_county.holder = { + save_scope_as = vassal + court_event_character_flag_effect = yes + } + } + create_character = { + age = { 30 50 } + template = priest_character_template + location = root.capital_province + trait = devoted + save_scope_as = candidate + } + scope:candidate = { + court_event_character_flag_effect = yes + } + + if = { + limit = { exists = scope:vassal } + scope:vassal = { save_scope_as = vassal_or_candidate } + } + else = { + scope:candidate = { save_scope_as = vassal_or_candidate } + } + + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Gift the county + name = hold_court.8020.a + scope:bishop_relic = { + set_owner = { + target = root + history = { + location = root.capital_province + actor = scope:bishop + recipient = root + type = given + } + } + } + hold_court_8020_grant_effect = yes + scope:target_county = { + if = { + limit = { + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + } + root = { add_piety = massive_piety_gain } + } + else = { + root = { add_piety = major_piety_gain } + } + } + scope:bishop = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 30 + } + } + if = { + limit = { exists = scope:pope } + scope:pope = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + } + } + if = { + limit = { scope:target_county.holder = root } + stress_impact = { greedy = medium_stress_impact_gain } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_greed = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Theocratic debate + name = hold_court.8020.b + duel = { + skill = learning + target = scope:bishop + 8 = { + desc = hold_court.8020.b.tt_success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = hold_court.8020.b.tt_success + left_icon = scope:bishop + change_current_court_grandeur = medium_court_grandeur_gain + add_prestige = medium_prestige_gain + } + } + 12 = { + desc = hold_court.8020.b.tt_failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = hold_court.8020.b.tt_failure + left_icon = scope:bishop + hold_court_8020_grant_effect = yes + scope:target_county = { + if = { + limit = { + any_county_province = { + barony = { hold_court_8020_cathedral_barony_trigger = yes } + } + } + root = { add_piety = major_piety_gain } + } + else = { + root = { add_piety = minor_piety_gain } + } + } + scope:bishop = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + if = { + limit = { exists = scope:pope } + scope:pope = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + } + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight up for duel. + add = 15 + learning > scope:bishop.learning + } + } + } + + option = { # Refuse no pope + no candidate + name = hold_court.8020.c + trigger = { + NOT = { exists = scope:pope } + scope:target_county.holder = root + } + add_piety = minor_piety_loss + scope:bishop = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Refuse no pope + candidate + name = hold_court.8020.d + trigger = { + NOT = { exists = scope:pope } + scope:target_county.holder != root + } + add_piety = minor_piety_loss + scope:target_county.holder = { + if = { + limit = { + this != root + } + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + } + scope:bishop = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -10 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Refuse pope + no candidate + name = hold_court.8020.e + trigger = { + exists = scope:pope + scope:target_county.holder = root + } + add_piety = minor_piety_loss + scope:bishop = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + } + scope:pope = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -10 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Refuse pope + candidate + name = hold_court.8020.e + trigger = { + exists = scope:pope + scope:target_county.holder != root + } + add_piety = minor_piety_loss + scope:target_county.holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + scope:bishop = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -10 + } + } + + scope:pope = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -5 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + after = { + scope:bishop = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:candidate } + scope:candidate = { + clear_court_event_participation = yes + if = { + limit = { + is_alive = yes + is_landed = no + } + silent_disappearance_effect = yes + } + } + } + remove_variable = holy_site_var + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Special Treatment +# by Joe Parkin +# 8040 +################################################## + +scripted_trigger hold_court_8040_vassal_trigger = { + has_court_event_flag = no + faith != root.faith + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + government_has_flag = government_is_feudal + vassal_contract_obligation_level_can_be_increased = religious_rights + liege.faith = { + faith_hostility_level = { + target = prev.faith + value < faith_evil_level + } + } +} + +# A vassal of another faith asks for religious freedom +hold_court.8040 = { + type = court_event + title = hold_court.8040.t + desc = { + desc = hold_court.8040.desc + first_valid = { + triggered_desc = { + trigger = { + scope:infidel_vassal.religion = root.religion + } + desc = hold_court.8040.desc.intro_same_religion + } + triggered_desc = { + trigger = { + always = yes + } + desc = hold_court.8040.desc.intro_fallback + } + } + } + theme = court + lower_right_portrait = scope:bishop + court_scene = { + button_position_character = scope:infidel_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:infidel_vassal = { + group = petitioners_group + animation = worry + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + any_vassal = { hold_court_8040_vassal_trigger = yes } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_vassal = { + hold_court_8040_vassal_trigger = yes + is_powerful_vassal = yes + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = bishop + court_event_character_flag_effect = yes + } + ordered_vassal = { + limit = { hold_court_8040_vassal_trigger = yes } + order_by = max_military_strength + save_scope_as = infidel_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Grant religious rights + name = hold_court.8040.a + if = { + limit = { + can_add_hook = { + target = scope:infidel_vassal + type = indebted_hook + } + } + add_hook = { + target = scope:infidel_vassal + type = indebted_hook + } + } + scope:infidel_vassal = { + vassal_contract_set_obligation_level = { + type = religious_rights + level = 1 + } + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + scope:bishop = { + if = { + limit = { scope:infidel_vassal.religion = root.religion } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + else = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -20 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Learning debate with same religion + name = hold_court.8040.b + trigger = { scope:infidel_vassal.religion = root.religion } + duel = { + skill = learning + target = scope:infidel_vassal + 10 = { + desc = hold_court.8040.c.tt_accept + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + send_interface_toast = { + title = hold_court.8040.c.tt_accept + left_icon = scope:infidel_vassal + right_icon = scope:bishop + add_prestige = medium_prestige_gain + save_scope_as = actor + scope:infidel_vassal = { save_scope_as = recipient } + custom_tooltip = demand_conversion_tt + hidden_effect = { demand_conversion_interaction_effect = yes } + } + } + 10 = { + desc = hold_court.8040.c.tt_refuse + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = hold_court.8040.c.tt_refuse + left_icon = scope:infidel_vassal + right_icon = scope:bishop + scope:bishop = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + } + } + } + + option = { # Different faith demand + name = { + trigger = { + scope:infidel_vassal.religion != root.religion + } + text = hold_court.8040.c.religion + } + name = { + trigger = { + scope:infidel_vassal.faith != root.faith + } + text = hold_court.8040.c.faith + } + scope:infidel_vassal = { + add_opinion = { + modifier = demanded_my_conversion_opinion + target = root + opinion = -10 + } + } + random_list = { + 40 = { + modifier = { + add = -20 + scope:infidel_vassal.religion != root.religion + } + show_chance = no + desc = hold_court.8040.c.tt_accept + send_interface_toast = { + title = hold_court.8040.c.tt_accept + left_icon = scope:infidel_vassal + add_piety = medium_piety_gain + save_scope_as = actor + scope:infidel_vassal = { save_scope_as = recipient } + custom_tooltip = demand_conversion_tt + hidden_effect = { demand_conversion_interaction_effect = yes } + scope:bishop = { + add_opinion = { + modifier = pious_opinion + target = root + opinion = 10 + } + } + } + } + 60 = { + show_chance = no + desc = hold_court.8040.c.tt_refuse + send_interface_toast = { + title = hold_court.8040.c.tt_refuse + left_icon = scope:infidel_vassal + stress_impact = { zealous = medium_stress_impact_gain } + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + ai_rationality = -0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + + option = { # Refuse + name = hold_court.8040.d + add_piety = minor_piety_gain + scope:infidel_vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + scope:bishop = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + + after = { + scope:bishop = { + clear_court_event_participation = yes + } + scope:infidel_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Royal Service +# by Joe Parkin +# 8050 - 054 +################################################## + +scripted_trigger hold_court_8050_knight_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + is_landed = no + faith = root.faith + top_liege = root + NOT = { is_primary_heir_of = prev } # prev = scope:vassal + NOT = { is_knight_of = root } + NOT = { has_relation_rival = root } + NOT = { is_close_family_of = root } + court_position_martial_trigger = { EMPLOYER = root } +} + +scripted_trigger hold_court_8050_vassal_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + NOT = { is_close_family_of = root } + NOT = { has_relation_rival = root } + NOT = { has_court_position = bodyguard_court_position } + OR = { + any_close_or_extended_family_member = { hold_court_8050_knight_trigger = yes } + any_courtier = { + has_relation_friend = prev + hold_court_8050_knight_trigger = yes + } + is_ai = no + } +} + +scripted_effect hold_court_8050_accepted_knight_effect = { + scope:knight = { + hidden_effect = { + if = { + limit = { + is_foreign_court_or_pool_guest = yes + } + return_to_court = yes + } + set_employer = root + set_knight_status = force + } + set_variable = { + name = hold_court_8050_knight + value = scope:vassal + years = 10 + } + add_prestige = minor_prestige_gain + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + trigger_event = { + id = hold_court.8054 + days = 365 + } + send_interface_message = { + title = hold_court.8050.a.tt_toast + left_icon = scope:knight + right_icon = scope:vassal + scope:knight = { custom_tooltip = hold_court.8050.a.tt_knight } + } +} + +# Vassal presents their relative as a potential knight +hold_court.8050 = { + type = court_event + title = hold_court.8050.t + desc = { + desc = hold_court.8050.desc + first_valid = { + triggered_desc = { + trigger = { scope:knight.prowess >= extremely_high_skill_rating } + desc = hold_court.8050.desc_talented + } + triggered_desc = { + trigger = { scope:knight.prowess >= decent_skill_rating } + desc = hold_court.8050.desc_suitable + } + triggered_desc = { + trigger = { scope:knight.prowess >= mediocre_skill_rating } + desc = hold_court.8050.desc_passing + } + desc = hold_court.8050.desc_unsuitable + } + } + theme = court + lower_right_portrait = scope:grandmaster + lower_center_portrait = { + character = scope:bodyguard + trigger = { + scope:knight.prowess > medium_skill_rating + NOT = { + scope:vassal = { has_hook = root } + } + } + } + court_scene = { + button_position_character = scope:vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal = { + group = petitioners_group + animation = admiration + } + scope:knight = { + group = petitioners_group + animation = marshal + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + any_vassal = { hold_court_8050_vassal_trigger = yes } + NOT = { has_character_flag = hold_court_8051_flag } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + number_of_knights < max_number_of_knights + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { # Find a vassal with someone to present + limit = { hold_court_8050_vassal_trigger = yes } + save_scope_as = vassal + court_event_character_flag_effect = yes + if = { + limit = { + any_close_or_extended_family_member = { hold_court_8050_knight_trigger = yes } + } + random_close_or_extended_family_member = { + limit = { hold_court_8050_knight_trigger = yes } + save_scope_as = knight + set_signature_weapon_effect = yes + } + } + else_if = { + limit = { + any_courtier = { + has_relation_friend = scope:vassal + hold_court_8050_knight_trigger = yes + } + } + random_courtier = { + limit = { + has_relation_friend = scope:vassal + hold_court_8050_knight_trigger = yes + } + save_scope_as = knight + set_signature_weapon_effect = yes + } + } + else = { + create_character = { + gender_female_chance = root_soldier_female_chance + location = scope:vassal.capital_province + template = soldier_friend_character + dynasty = generate + save_scope_as = knight + } + scope:knight = { set_signature_weapon_effect = yes } + } + } + scope:knight = { + court_event_character_flag_effect = yes + } + faith = { # Find a holy order + if = { + limit = { + any_faith_holy_order = { always = yes } + } + random_faith_holy_order = { + limit = { + leader = { NOT = { has_relation_rival = scope:knight } } + } + alternative_limit = { always = yes } + leader = { save_scope_as = grandmaster } + } + } + } + if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + count >= 2 + this != scope:vassal + } + } + ordered_court_position_holder = { + type = bodyguard_court_position + limit = { + this != scope:vassal + } + order_by = { + value = 0 + subtract = prowess + } + save_scope_as = bodyguard + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Accept + name = hold_court.8050.a + highlight_portrait = scope:knight + set_variable = { + name = hold_court_8050_promise + value = scope:knight + years = 10 + } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + if = { + limit = { has_hook = root } + custom_tooltip = hold_court.8050.a.tt_hook + remove_hook = { target = root } + } + } + hold_court_8050_accepted_knight_effect = yes + stress_impact = { + gallant = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.25 + } + modifier = { + add = 30 + number_of_knights < max_number_of_knights + } + modifier = { #Weight up for stress. + add = 30 + has_trait = gallant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = paranoid + } + } + } + + option = { # Take a hook if they suck + name = hold_court.8050.b + trigger = { + scope:knight.prowess < medium_skill_rating + NOR = { + scope:vassal = { has_hook = root } + root = { has_hook = scope:vassal } + } + } + highlight_portrait = scope:vassal + set_variable = { + name = hold_court_8050_promise + value = scope:knight + years = 10 + } + scope:vassal = { + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + can_add_hook = { + target = scope:vassal + type = indebted_hook + } + } + add_hook = { + target = scope:vassal + type = indebted_hook + } + } + hold_court_8050_accepted_knight_effect = yes + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.25 + ai_compassion = -0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Send to Holy Order instead + name = hold_court.8050.c + trigger = { + has_trait = zealous + exists = scope:grandmaster + NOT = { + scope:vassal = { has_hook = root } + } + NOT = { # unlikely to be the case, but since they are more complicated to break, let's just avoid breaking grand wedding + scope:knight = { has_been_promised_grand_wedding = yes } + } + } + trait = zealous + highlight_portrait = scope:grandmaster + add_piety = medium_piety_gain + scope:vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + scope:knight = { + add_trait = order_member + if = { + limit = { is_married = yes } + every_spouse = { divorce = scope:knight } + } + if = { + limit = { exists = betrothed } + break_betrothal = betrothed + } + } + scope:grandmaster = { + add_courtier = scope:knight + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + option = { # Make them your new bodyguard + name = hold_court.8050.d + trigger = { + scope:knight.prowess > medium_skill_rating + scope:vassal = { + NOR = { + has_hook = root + has_court_position = bodyguard_court_position + } + } + } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + set_variable = { + name = hold_court_8050_promise + value = scope:knight + years = 10 + } + add_courtier = scope:knight + scope:knight = { + hidden_effect = { return_to_court = yes } + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 30 + } + hidden_effect = { + add_prestige = medium_prestige_gain + progress_towards_friend_effect = { + REASON = friend_hired_body_guard + CHARACTER = root + OPINION = 0 + } + } + set_variable = { + name = hold_court_8050_knight + value = scope:vassal + years = 10 + } + } + if = { + limit = { exists = scope:bodyguard } + revoke_court_position = { + recipient = scope:bodyguard + court_position = bodyguard_court_position + } + scope:bodyguard = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = bodyguard_court_position + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = bodyguard + CANDIDATE = scope:knight + } + } + hidden_effect = { + send_interface_message = { + title = hold_court.8050.a.tt_toast + left_icon = scope:knight + right_icon = scope:vassal + scope:knight = { custom_tooltip = hold_court.8050.d.tt_bodyguard } + } + } + trigger_event = { + id = hold_court.8054 + days = 365 + } + stress_impact = { + paranoid = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.5 + ai_compassion = 0.25 + } + modifier = { #Weight up. + add = 30 + scope:knight.prowess > decent_skill_rating + } + modifier = { #Weight up. + add = 30 + scope:knight.prowess > very_high_skill_rating + } + modifier = { #Weight down for stress. + add = -30 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -30 + has_trait = shy + } + } + } + + option = { # Refuse + name = { + trigger = { + scope:knight.prowess >= 20 + } + text = hold_court.8050.e.talented + } + name = { + trigger = { + scope:knight.prowess < 20 + scope:knight.prowess >= 14 + } + text = hold_court.8050.e.suitable + } + name = { + trigger = { + scope:knight.prowess < 14 + scope:knight.prowess >= 8 + } + text = hold_court.8050.e.passing + } + name = { + trigger = { + scope:knight.prowess < 8 + } + text = hold_court.8050.e.unsuitable + } + trigger = { + NOT = { + scope:vassal = { has_hook = root } + } + } + scope:vassal = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -10 + } + } + scope:knight = { + add_prestige = minor_prestige_loss + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -20 + } + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_refused_service + OPINION = 0 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + } + modifier = { + add = 15 + scope:knight.prowess < 10 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + after = { + scope:vassal = { + clear_court_event_participation = yes + } + scope:knight = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +scripted_trigger hold_court_8050_angry_trigger = { + OR = { + prowess >= high_skill_rating + has_trait = vengeful + has_trait = wrathful + has_trait = just + has_trait = honest + has_trait = ambitious + has_trait = arrogant + has_trait = brave + AND = { + has_variable = hold_court_8050_knight + var:hold_court_8050_knight = { + is_alive = yes + is_vassal_of = root + has_relation_friend = prev # prev = scope:vassal + } + } + } +} + +scripted_effect hold_court_8051_promise_opinion_effect = { + if = { + limit = { + has_opinion_modifier = { + modifier = grateful_opinion + target = root + } + } + remove_opinion = { + modifier = grateful_opinion + target = root + } + } + add_opinion = { + modifier = broke_promise + target = root + } +} + +# Vassal is angry you fired the knight +hold_court.8051 = { + type = court_event + title = hold_court.8051.t + desc = hold_court.8051.desc + theme = court + court_scene = { + button_position_character = scope:vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal = { + group = petitioners_group + animation = anger + } + scope:knight = { + group = petitioners_group + animation = shame + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + modifier = { + add = 3 + var:hold_court_8050_promise = { hold_court_8050_angry_trigger = yes } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + var:hold_court_8050_promise = { + save_scope_as = knight + var:hold_court_8050_knight = { save_scope_as = vassal } + } + add_character_flag = { + flag = hold_court_8051_flag + years = 15 + } + } + + option = { # Reinstate + name = hold_court.8051.a + scope:knight = { + if = { + limit = { scope:knight.employer = root } + custom_tooltip = hold_court.8051.a.tt_knight + } + else = { + hidden_effect = { set_employer = root } + custom_tooltip = hold_court.8050.a.tt_knight + } + hidden_effect = { set_knight_status = force } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + } + trigger_event = { + id = hold_court.8054 + days = 365 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_honor = -0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + } + } + + option = { # Refuse + name = hold_court.8051.b + scope:vassal = { hold_court_8051_promise_opinion_effect = yes } + scope:knight = { + hold_court_8051_promise_opinion_effect = yes + hidden_effect = { + return_to_court = yes + set_employer = scope:vassal + } + custom_tooltip = hold_court.8051.b.tt_return + } + remove_variable = hold_court_8050_promise + stress_impact = { + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_honor = -0.25 + } + modifier = { + add = 15 + scope:knight.prowess < 10 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } +} + +# Vassal is apoplectic! You the fired knight again! +hold_court.8052 = { + type = court_event + title = hold_court.8052.t + desc = { + desc = hold_court.8052.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:vassal = { has_trait = wrathful } + } + desc = hold_court.8052.desc.wrath + } + desc = hold_court.8052.desc.fallback + } + } + theme = court + court_scene = { + button_position_character = scope:vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal = { + group = petitioners_group + animation = rage + } + scope:knight = { + group = petitioners_group + animation = marshal + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + modifier = { + add = 3 + var:hold_court_8050_promise = { hold_court_8050_angry_trigger = yes } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + var:hold_court_8050_promise = { + save_scope_as = knight + var:hold_court_8050_knight = { save_scope_as = vassal } + remove_variable = hold_court_8050_knight + } + scope:vassal = { hold_court_8051_promise_opinion_effect = yes } + scope:knight = { hold_court_8051_promise_opinion_effect = yes } + } + + option = { # Oh get over it + name = hold_court.8052.a + scope:knight = { + hidden_effect = { + return_to_court = yes + set_employer = scope:vassal + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { # Arrest them + name = hold_court.8052.b + trigger = { + scope:vassal = { has_trait = wrathful } + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = arrogant + } + } + trait = vengeful + trait = wrathful + trait = arrogant + imprison_character_effect = { + TARGET = scope:vassal + IMPRISONER = root + } + scope:vassal = { hold_court_8051_promise_opinion_effect = yes } + scope:knight = { + hold_court_8051_promise_opinion_effect = yes + hidden_effect = { + return_to_court = yes + set_employer = scope:vassal + } + } + stress_impact = { + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = forgiving + } + } + } + + after = { remove_variable = hold_court_8050_promise } +} + +# Knight dies in your service +hold_court.8053 = { + type = character_event + title = hold_court.8053.t + desc = { + desc = hold_court.8053.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:knight.killer } + desc = hold_court.8053.killer + } + desc = hold_court.8053.battle + } + random_valid = { + triggered_desc = { + trigger = { scope:knight.prowess >= 20 } + desc = hold_court.8053.desc_talented + } + triggered_desc = { + trigger = { scope:knight.prowess >= 14 } + desc = hold_court.8053.desc_suitable + } + triggered_desc = { + trigger = { scope:knight.prowess >= 8 } + desc = hold_court.8053.desc_passing + } + triggered_desc = { + trigger = { has_trait = craven } + desc = hold_court.8053.desc_coward + } + triggered_desc = { + trigger = { + NOT = { has_trait = craven } + scope:knight.prowess < 8 + } + desc = hold_court.8053.desc_unsuitable + } + } + desc = hold_court.8053.desc.body + } + theme = court + override_background = { reference = battlefield } + left_portrait = { + character = scope:vassal + animation = sadness + } + right_portrait = { + character = scope:knight + } + + trigger = { primary_title.tier >= tier_kingdom } + + immediate = { + scope:knight = { + show_as_tooltip = { + if = { + limit = { exists = killer } + death = { + death_reason = death_battle + killer = scope:knight.killer + } + } + else = { + death = { death_reason = death_battle } + } + } + } + } + + option = { # Oh + name = hold_court.8053.a + } +} + +scripted_trigger hold_court_8050_fired_trigger = { + has_variable = hold_court_8050_knight + this = root.var:hold_court_8050_promise + is_knight = no + var:hold_court_8050_knight = { + is_landed_or_landless_administrative = yes + is_vassal_or_below_of = root + NOT = { has_relation_rival = root } + } + NOR = { + has_trait = disfigured + has_trait = maimed + has_relation_friend = root + has_relation_rival = root + has_court_position = bodyguard_court_position + } +} + +# Trigger for follow up events +hold_court.8054 = { + hidden = yes + + trigger = { + has_variable = hold_court_8050_promise + primary_title.tier >= tier_kingdom } + + immediate = { + if = { + limit = { hold_court_8050_fired_trigger = yes } + if = { + limit = { has_variable = hold_court_8051_flag } + trigger_event = hold_court.8052 + } + else = { trigger_event = hold_court.8051 } + } + else = { + trigger_event = { + id = hold_court.8054 + days = 365 + } + } + } +} + +################################################## +# A Temple for X +# by Joe Parkin +# 8060 - 061 +################################################## + +scripted_trigger hold_court_8060_vassal_trigger = { + faith = root.faith + NOR = { + this = scope:bishop + is_vassal_of = scope:bishop + } +} + +scripted_effect hold_court_8060_completion_effect = { + show_as_tooltip = { + scope:target_county = { + custom_tooltip = hold_court.8060.a.tt + add_county_modifier = { + modifier = hold_court_8060_built_modifier + years = 20 + } + } + scope:bishop = { + custom_tooltip = hold_court.8060.a.tt + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } +} + +# Chaplain wants a new Temple built +hold_court.8060 = { + type = court_event + title = hold_court.8060.t + desc = { + desc = hold_court.8060.desc + first_valid = { + triggered_desc = { + trigger = { scope:target_county.holder = root } + desc = hold_court.8060.desc.owned + } + triggered_desc = { + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + } + desc = hold_court.8060.desc.vassal + } + desc = hold_court.8060.desc.subvassal + } + first_valid = { + triggered_desc = { + trigger = { + scope:target_county = { + any_county_province = { has_holding_type = church_holding } + } + } + desc = hold_court.8060.desc.existing + } + desc = hold_court.8060.desc.first + } + desc = hold_court.8060.desc.end + } + theme = realm + lower_left_portrait = scope:vassal + lower_center_portrait = scope:subvassal + court_scene = { + button_position_character = scope:bishop + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:bishop = { + group = petitioners_group + animation = chaplain + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + NOT = { has_character_flag = has_had_holding_request_event } + NOT = { has_variable = hold_court_8060_church_var } + gold > hold_court_holding_cost_double_value + faith = { + has_doctrine = doctrine_theocracy_temporal + NOT = { has_doctrine_parameter = unreformed } + } + OR = { + any_held_title = { + county_has_empty_province_trigger = yes + faith = ROOT.faith + } + any_sub_realm_county = { + faith = root.faith + holder = { + NOR = { + this = root.cp:councillor_court_chaplain + is_vassal_of = root.cp:councillor_court_chaplain + } + } + any_county_province = { province_has_no_holding_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + any_held_title = { + title_tier = county + county_has_empty_province_trigger = yes + faith = ROOT.faith + county_has_no_church_trigger = yes + } + } + modifier = { + add = 1 + any_held_title = { + title_tier = county + county_has_empty_province_trigger = yes + faith = ROOT.faith + county_has_all_holding_types = yes + } + } + modifier = { + add = -2 + cp:councillor_court_chaplain.learning < 10 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_holding_request_event + years = 15 + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + court_event_character_flag_effect = yes + } + if = { # root's counties... + limit = { + any_held_title = { + county_has_empty_province_trigger = yes + faith = ROOT.faith + } + } + ordered_held_title = { + limit = { + county_has_empty_province_trigger = yes + faith = ROOT.faith + county_has_no_church_trigger = yes + } + alternative_limit = { + county_has_empty_province_trigger = yes + faith = ROOT.faith + county_has_all_holding_types = yes + } + alternative_limit = { county_has_empty_province_trigger = yes } + order_by = development_level + save_scope_as = target_county + } + } + else = { # ... vassal counties + ordered_sub_realm_county = { + limit = { + holder = { + is_vassal_of = ROOT + hold_court_8060_vassal_trigger = yes + } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + county_has_no_church_trigger = yes + } + alternative_limit = { + holder = { + is_vassal_of = ROOT + hold_court_8060_vassal_trigger = yes + } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + county_has_all_holding_types = yes + } + alternative_limit = { + holder = { + is_vassal_of = ROOT + hold_court_8060_vassal_trigger = yes + } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + } + alternative_limit = { + holder = { hold_court_8060_vassal_trigger = yes } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + county_has_no_church_trigger = yes + } + alternative_limit = { + holder = { hold_court_8060_vassal_trigger = yes } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + county_has_all_holding_types = yes + } + alternative_limit = { + holder = { hold_court_8060_vassal_trigger = yes } + faith = ROOT.faith + any_county_province = { province_has_no_holding_trigger = yes } + } + order_by = development_level + save_scope_as = target_county + holder = { + if = { + limit = { + NOT = { is_vassal_of = root } + } + liege = { save_scope_as = vassal } + save_scope_as = subvassal + } + else = { save_scope_as = vassal } + } + } + } + scope:target_county = { + random_county_province = { + limit = { province_has_no_holding_trigger = yes } + save_scope_as = target_province + } + } + if = { + limit = { + any_court_position_holder = { type = royal_architect_court_position } + } + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = royal_architect + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Pay for the Temple + name = hold_court.8060.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= major_treasury_or_gold_value + } + } + remove_treasury_or_gold = hold_court_holding_cost_cheaper_value + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_cheaper_value } + } + } + hold_court_8060_completion_effect = yes + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + set_variable = { + name = hold_court_8060_church_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_zeal = 0.5 + ai_rationality = 0.25 + ai_compassion = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Get the Vassal to pay half + name = hold_court.8060.b + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + scope:vassal.short_term_gold >= hold_court_holding_cost_half_value + } + show_as_unavailable = { scope:vassal.short_term_gold < hold_court_holding_cost_half_value } + highlight_portrait = scope:vassal + remove_treasury_or_gold = hold_court_holding_cost_half_value + scope:vassal = { + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -15 + } + } + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_half_value } + } + } + hold_court_8060_completion_effect = yes + set_variable = { + name = hold_court_8060_church_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_compassion = 0.5 + ai_zeal = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Get the Subvassal to pay half + name = hold_court.8060.c + trigger = { + exists = scope:subvassal + OR = { + scope:subvassal.short_term_gold >= hold_court_holding_cost_half_value + scope:vassal.short_term_gold >= hold_court_holding_cost_half_value + } + } + show_as_unavailable = { + scope:subvassal.short_term_gold < hold_court_holding_cost_half_value + scope:vassal.short_term_gold < hold_court_holding_cost_half_value + } + highlight_portrait = scope:subvassal + remove_treasury_or_gold = hold_court_holding_cost_half_value + scope:subvassal = { # Vassals not happy about paying + if = { + limit = { long_term_gold >= hold_court_holding_cost_half_value } + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + else = { + scope:vassal = { + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + } + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_half_value } + } + } + hold_court_8060_completion_effect = yes + set_variable = { + name = hold_court_8060_church_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_compassion = 0.5 + ai_zeal = 0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Architect involved + name = hold_court.8060.d + trigger = { exists = scope:royal_architect } + scope:royal_architect = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + duel = { + skill = stewardship + value = average_skill_rating + 6 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8060.d.tt_success + send_interface_toast = { + title = hold_court.8060.d.tt_success + left_icon = scope:frontier_lord + root = { + remove_treasury_or_gold = hold_court_holding_cost_architect_cheaper_value + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_architect_cheaper_value } + } + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = hold_court.8060.d.tt_normal + send_interface_toast = { + title = hold_court.8060.d.tt_normal + left_icon = scope:frontier_lord + root = { + remove_treasury_or_gold = hold_court_holding_cost_cheaper_value + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_cheaper_value } + } + } + } + } + } + 4 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + desc = hold_court.8060.d.tt_failure + send_interface_toast = { + title = hold_court.8060.d.tt_failure + left_icon = scope:frontier_lord + root = { + remove_treasury_or_gold = hold_court_holding_cost_architect_expensive_value + scope:target_province = { + begin_create_holding = { + type = church_holding + refund_cost = { gold = hold_court_holding_cost_architect_expensive_value } + } + } + } + } + } + } + } + hold_court_8060_completion_effect = yes + stress_impact = { + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = diligent + } + } + } + + option = { # Refuse + name = { + trigger = { + NOT = { exists = scope:vassal } + } + text = hold_court.8060.e.own + } + name = { + trigger = { exists = scope:vassal } + text = hold_court.8060.e.vassal + } + if = { + limit = { exists = scope:vassal } + add_piety = miniscule_piety_loss + } + else = { add_piety = minor_piety_loss } + scope:bishop = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_zeal = -0.5 + ai_compassion = -0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + after = { + if = { + limit = { has_variable = hold_court_8060_church_var } + trigger_event = { + id = hold_court.8061 + days = 1830 # 5 years + 5 days + } + } + scope:bishop = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# The Temple is complete +hold_court.8061 = { + type = character_event + title = hold_court.8061.t + desc = { + first_valid = { + triggered_desc = { # In case you have no bishop on completion + trigger = { + exists = scope:bishop + scope:bishop = { is_alive = yes } + } + desc = hold_court.8061.desc.bishop + } + desc = hold_court.8061.desc.fallback + } + first_valid = { + triggered_desc = { + trigger = { scope:target_county.holder = root } + desc = hold_court.8061.desc.owned + } + triggered_desc = { + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + } + desc = hold_court.8061.desc.vassal + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:target_county = { + any_county_province = { + count >= 2 + has_holding_type = church_holding + } + } + } + desc = hold_court.8061.desc.existing + } + desc = hold_court.8061.desc.first + } + } + theme = realm + override_background = { + trigger = { + NOR = { + faith = { religion = religion:hinduism_religion } + faith = { religion = religion:buddhism_religion } + faith = { religion = religion:jainism_religion } + } + } + reference = temple + } + override_background = { + trigger = { + OR = { + faith = { religion = religion:hinduism_religion } + faith = { religion = religion:buddhism_religion } + faith = { religion = religion:jainism_religion } + } + } + reference = ep2_holy_site_indian + } + left_portrait = { + character = scope:bishop + animation = happiness + trigger = { + scope:bishop = { is_alive = yes } + } + } + lower_right_portrait = scope:vassal + + trigger = { + has_variable = hold_court_8060_church_var + var:hold_court_8060_church_var = { + OR = { + county.holder = root + county.holder.top_liege = root + } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = bishop } + } + var:hold_court_8060_church_var = { + save_scope_as = target_province + county = { + save_scope_as = target_county + holder = { + if = { + limit = { + this != root + } + if = { + limit = { + liege != root + } + save_scope_as = subvassal + liege = { save_scope_as = vassal } + } + else = { save_scope_as = vassal } + } + } + } + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + show_as_tooltip = { + scope:target_county.holder = { + add_piety = massive_piety_gain + } + faith = { + change_fervor = { + value = 1 + desc = fervor_gain_built_temple_holding + } + } + } + } + + option = { # Great + name = hold_court.8061.a + if = { + limit = { exists = scope:vassal } + add_piety = major_piety_gain + } + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8060_built_modifier + years = 25 + } + } + scope:bishop = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + after = { remove_variable = hold_court_8060_church_var } +} + +################################################## +# The Growth of X +# by Joe Parkin +# 8070 - 071 +################################################## + +scripted_trigger hold_court_8070_vassal_trigger = { # Vassal who is not the steward + NOR = { + this = scope:steward + is_vassal_of = scope:steward + } +} + +scripted_effect hold_court_8070_completion_effect = { # Show effects once holding is built + show_as_tooltip = { + scope:target_county = { + custom_tooltip = hold_court.8070.a.tt + add_county_modifier = { + modifier = hold_court_8070_built_modifier + years = 25 + } + } + scope:steward = { + custom_tooltip = hold_court.8070.a.tt + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } +} + +# Steward wants investment in City +hold_court.8070 = { + type = court_event + title = hold_court.8070.t + desc = { + desc = hold_court.8070.desc.intro + first_valid = { # County owner descriptions + triggered_desc = { + trigger = { scope:target_county.holder = root } + desc = hold_court.8060.desc.owned + } + triggered_desc = { + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + } + desc = hold_court.8060.desc.vassal + } + desc = hold_court.8060.desc.subvassal + } + desc = hold_court.8070.desc.body + first_valid = { # City number descriptions + triggered_desc = { + trigger = { + scope:target_county = { + any_county_province = { has_holding_type = city_holding } + } + } + desc = hold_court.8070.desc.existing + } + desc = hold_court.8070.desc.first + } + desc = hold_court.8070.desc.end + } + theme = realm + lower_right_portrait = scope:vassal + court_scene = { + button_position_character = scope:steward + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:steward = { + group = petitioners_group + animation = steward + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 30 } + + trigger = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + NOT = { has_character_flag = has_had_holding_request_event } + NOT = { has_variable = hold_court_8070_city_var } + gold > hold_court_holding_cost_double_value + OR = { + any_held_title = { county_has_empty_province_trigger = yes } + any_sub_realm_county = { + holder = { + NOR = { + this = root.cp:councillor_steward + is_vassal_of = root.cp:councillor_steward + } + } + any_county_province = { province_has_no_holding_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + any_held_title = { + title_tier = county + county_has_empty_province_trigger = yes + county_has_no_city_trigger = yes + } + } + modifier = { + add = 1 + any_held_title = { + title_tier = county + county_has_empty_province_trigger = yes + county_has_all_holding_types = yes + } + } + modifier = { + add = -2 + cp:councillor_steward.stewardship < 10 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = has_had_holding_request_event + years = 15 + } + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + if = { # root's counties... + limit = { + any_held_title = { county_has_empty_province_trigger = yes } + } + ordered_held_title = { + limit = { + county_has_empty_province_trigger = yes + county_has_no_city_trigger = yes + } + alternative_limit = { + county_has_empty_province_trigger = yes + county_has_all_holding_types = yes + } + alternative_limit = { county_has_empty_province_trigger = yes } + order_by = development_level + save_scope_as = target_county + } + } + else = { # ... vassal counties + ordered_sub_realm_county = { + limit = { + holder = { + is_vassal_of = root + hold_court_8070_vassal_trigger = yes + } + any_county_province = { province_has_no_holding_trigger = yes } + county_has_no_city_trigger = yes + } + alternative_limit = { + holder = { + is_vassal_of = root + hold_court_8070_vassal_trigger = yes + } + any_county_province = { province_has_no_holding_trigger = yes } + county_has_all_holding_types = yes + } + alternative_limit = { + holder = { + is_vassal_of = root + hold_court_8070_vassal_trigger = yes + } + any_county_province = { province_has_no_holding_trigger = yes } + } + alternative_limit = { + holder = { hold_court_8070_vassal_trigger = yes } + any_county_province = { province_has_no_holding_trigger = yes } + county_has_no_city_trigger = yes + } + alternative_limit = { + holder = { hold_court_8070_vassal_trigger = yes } + any_county_province = { province_has_no_holding_trigger = yes } + county_has_all_holding_types = yes + } + alternative_limit = { + holder = { hold_court_8070_vassal_trigger = yes } + any_county_province = { province_has_no_holding_trigger = yes } + } + order_by = development_level + save_scope_as = target_county + holder = { save_scope_as = vassal } + } + } + scope:target_county = { + random_county_province = { + limit = { province_has_no_holding_trigger = yes } + save_scope_as = target_province + } + } + if = { + limit = { + any_court_position_holder = { type = royal_architect_court_position } + } + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = royal_architect + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Pay for the City + name = hold_court.8070.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= major_gold_value + } + } + remove_treasury_or_gold = hold_court_holding_cost_cheaper_value + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_cheaper_value } + } + } + hold_court_8070_completion_effect = yes + show_as_tooltip = { + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + } + set_variable = { + name = hold_court_8070_city_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.25 + ai_compassion = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Get the Vassal to pay half + name = hold_court.8070.b + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + scope:vassal.short_term_gold >= hold_court_holding_cost_half_value + } + show_as_unavailable = { scope:vassal.short_term_gold < hold_court_holding_cost_half_value } + highlight_portrait = scope:vassal + remove_treasury_or_gold = hold_court_holding_cost_half_value + scope:vassal = { + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -15 + } + } + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_half_value } + } + } + hold_court_8070_completion_effect = yes + set_variable = { + name = hold_court_8070_city_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = 0.25 + ai_compassion = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Get the Subvassal to pay half + name = hold_court.8070.c + trigger = { + exists = scope:vassal + exists = scope:subvassal + OR = { + scope:subvassal.short_term_gold >= hold_court_holding_cost_half_value + scope:vassal.short_term_gold >= hold_court_holding_cost_half_value + } + } + show_as_unavailable = { + scope:subvassal.short_term_gold < hold_court_holding_cost_half_value + scope:vassal.short_term_gold < hold_court_holding_cost_half_value + } + remove_treasury_or_gold = hold_court_holding_cost_half_value + scope:subvassal = { # Vassals not happy about paying + if = { + limit = { long_term_gold >= hold_court_holding_cost_half_value } + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + else = { + scope:vassal = { + remove_treasury_or_gold = hold_court_holding_cost_half_value + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + } + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_half_value } + } + } + hold_court_8070_completion_effect = yes + set_variable = { + name = hold_court_8070_city_var + value = scope:target_province + years = 6 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = 0.25 + ai_compassion = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Architect involved + name = hold_court.8070.d + trigger = { exists = scope:royal_architect } + scope:royal_architect = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + duel = { + skill = stewardship + value = average_skill_rating + 6 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8060.d.tt_success + send_interface_toast = { + title = hold_court.8060.d.tt_success + left_icon = scope:royal_architect + root = { + remove_treasury_or_gold = hold_court_holding_cost_architect_cheaper_value + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_architect_cheaper_value } + } + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = hold_court.8060.d.tt_normal + send_interface_toast = { + title = hold_court.8060.d.tt_normal + left_icon = scope:royal_architect + root = { + remove_treasury_or_gold = hold_court_holding_cost_cheaper_value + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_cheaper_value } + } + } + } + } + } + 4 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + desc = hold_court.8060.d.tt_failure + send_interface_toast = { + title = hold_court.8060.d.tt_failure + left_icon = scope:royal_architect + root = { + remove_treasury_or_gold = hold_court_holding_cost_architect_expensive_value + scope:target_province = { + begin_create_holding = { + type = city_holding + refund_cost = { gold = hold_court_holding_cost_architect_expensive_value } + } + } + } + } + } + } + } + hold_court_8070_completion_effect = yes + stress_impact = { + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = diligent + } + } + } + + option = { # Refuse + name = hold_court.8070.e + add_prestige = minor_prestige_loss + scope:steward = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + after = { + scope:steward = { + clear_court_event_participation = yes + } + if = { + limit = { has_variable = hold_court_8070_city_var } + trigger_event = { + id = hold_court.8071 + days = 1830 # 5 years + 10 days + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# The City is complete +hold_court.8071 = { + type = character_event + title = hold_court.8071.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:steward + scope:steward = { is_alive = yes } + } + desc = hold_court.8071.desc.steward + } + desc = hold_court.8071.desc.fallback + } + first_valid = { + triggered_desc = { + trigger = { scope:target_county.holder = root } + desc = hold_court.8071.desc.owned + } + triggered_desc = { + trigger = { + exists = scope:vassal + scope:vassal = { is_vassal_of = root } + } + desc = hold_court.8071.desc.vassal + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:target_county = { + any_county_province = { + count >= 2 + has_holding_type = city_holding + } + } + } + desc = hold_court.8071.desc.existing + } + desc = hold_court.8071.desc.first + } + } + theme = realm + override_background = { reference = market } + left_portrait = { + character = scope:steward + animation = happiness + trigger = { + scope:steward = { is_alive = yes } + } + } + lower_right_portrait = scope:vassal + + trigger = { + has_variable = hold_court_8070_city_var + var:hold_court_8070_city_var = { + OR = { + county.holder = root + county.holder.top_liege = root + } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_steward } + cp:councillor_steward = { save_scope_as = steward } + } + var:hold_court_8070_city_var = { + save_scope_as = target_province + county = { + save_scope_as = target_county + holder = { + if = { + limit = { + this != root + } + if = { + limit = { + liege != root + } + save_scope_as = subvassal + liege = { save_scope_as = vassal } + } + else = { save_scope_as = vassal } + } + } + } + } + if = { + limit = { exists = scope:vassal } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:subvassal } + scope:subvassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + } + + option = { # Great + name = hold_court.8071.a + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8070_built_modifier + years = 25 + } + } + scope:steward = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + after = { remove_variable = hold_court_8070_city_var } +} + +################################################## +# The Republic of X +# by Joe Parkin +# 8080 +################################################## + +scripted_trigger hold_court_8080_mayor_trigger = { # Check mayor's culture, and city wealth + hold_court_available_mayor_trigger = yes + culture = { has_innovation = innovation_development_02 } + primary_title = { + de_jure_liege = { + this != root.capital_county + } + title_province.combined_building_level >= 5 + } +} + +scripted_effect hold_court_8080_grant_effect = { # Grant county to mayor + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:mayor.primary_title.de_jure_liege = { + change_title_holder = { + holder = scope:mayor + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8080_granted_modifier + years = 20 + } + } +} + +# Mayor wants rights over a county +hold_court.8080 = { + type = court_event + title = hold_court.8080.t + desc = { + desc = hold_court.8080.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:target_county = { + has_coastal_province = yes + } + } + desc = hold_court.8080.desc.body_sea + } + desc = hold_court.8080.desc.body_fallback + } + desc = hold_court.8080.desc.body + } + theme = realm + court_scene = { + button_position_character = scope:mayor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:mayor = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 40 } + + trigger = { + NOR = { + has_character_flag = has_had_county_request_event + has_character_flag = has_had_government_request_event + } + top_liege = this + culture = { has_innovation = innovation_development_02 } + any_vassal = { hold_court_8080_mayor_trigger = yes } + NOT = { + any_sub_realm_county = { + percent > 0.1 + holder = { government_has_flag = government_is_republic } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_vassal = { + hold_court_8080_mayor_trigger = yes + primary_title.title_province = { has_building_or_higher = common_tradeport_01 } + } + } + modifier = { + add = 1 + any_vassal = { + hold_court_8080_mayor_trigger = yes + primary_title = { + de_jure_liege = { + has_coastal_province = yes + } + } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = has_had_county_request_event + years = 15 + } + add_character_flag = { + flag = has_had_government_request_event + years = 15 + } + ordered_vassal = { + limit = { + hold_court_8080_mayor_trigger = yes + primary_title.title_province = { has_building_or_higher = common_tradeport_01 } + } + alternative_limit = { + hold_court_8080_mayor_trigger = yes + primary_title = { + de_jure_liege = { + has_coastal_province = yes + } + } + } + alternative_limit = { hold_court_8080_mayor_trigger = yes } + order_by = primary_title.title_province.combined_building_level + save_scope_as = mayor + court_event_character_flag_effect = yes + primary_title = { + save_scope_as = target_city + set_variable = { + name = hold_court_city_cooldown_var + years = 10 + } + de_jure_liege = { save_scope_as = target_county } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Grant Republican County + name = hold_court.8080.a + hold_court_8080_grant_effect = yes + scope:mayor = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_compassion = 0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # For a gift + name = hold_court.8080.b + if = { + limit = { scope:mayor.short_term_treasury_or_gold >= root.medium_treasury_or_gold_value } + scope:mayor = { + pay_treasury_or_gold = { + target = root + value = root.medium_treasury_or_gold_value + } + } + } + else = { add_treasury_or_gold = major_treasury_or_gold_value } + hold_court_8080_grant_effect = yes + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Offer smaller privileges + name = hold_court.8080.c + duel = { + skill = stewardship + target = scope:mayor + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8080.c.tt_success + send_interface_toast = { + title = hold_court.8080.c.tt_success + left_icon = scope:mayor + scope:mayor = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8080_compromise_modifier + years = 20 + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = hold_court.8080.c.tt_failure + send_interface_toast = { + title = hold_court.8080.c.tt_failure + left_icon = scope:mayor + add_prestige = minor_prestige_loss + scope:mayor = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 0.5 + } + } + } + + option = { # Refuse + name = hold_court.8080.d + scope:mayor = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + scope:target_county = { + add_county_modifier = { + modifier = hold_court_8080_upset_modifier + years = 15 + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Imprison the Mayor + name = hold_court.8080.e + imprison_character_effect = { + TARGET = scope:mayor + IMPRISONER = root + } + add_dread = minor_dread_gain + add_character_modifier = { + modifier = hold_court_8080_prison_modifier + years = 10 + } + stress_impact = { + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + calm = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_rationality = -0.25 + ai_compassion = -0.25 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -30 + has_trait = just + } + modifier = { #Weight down for stress. + add = -30 + has_trait = calm + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + after = { + scope:mayor = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Place at Court +# by Joe Parkin +# 8090 +################################################## + +scripted_trigger hold_court_8090_can_move_trigger = { + has_court_event_flag = no + AND = { + has_any_court_position = no + can_be_employed_as_any_court_position_trigger = yes + } + is_available_ai_adult = yes + is_landed = no + faith = root.faith + top_liege = root + NOT = { is_primary_heir_of = prev } # prev = scope:vassal + NOT = { has_relation_rival = root } + NOT = { is_close_family_of = root } +} + +scripted_trigger hold_court_8090_candidate_trigger = { # Courtier is not already in a position + has_court_event_flag = no + is_available_ai_adult = yes + OR = { + AND = { + has_any_court_position = no + can_be_employed_as_any_court_position_trigger = yes + } + any_close_family_member = { hold_court_8090_can_move_trigger = yes } + } +} + +scripted_effect hold_court_8090_hook_effect = { + if = { + limit = { + NOR = { + has_relation_lover = $CHAR$ + has_relation_friend = $CHAR$ + } + } + if = { + limit = { + can_add_hook = { + target = $CHAR$ + type = indebted_hook + } + } + add_hook = { + target = $CHAR$ + type = indebted_hook + } + } + } + else = { + if = { + limit = { has_character_modifier = hold_court_8090_favorites_modifier } + hidden_effect = { remove_character_modifier = hold_court_8090_favorites_modifier } + } + add_character_modifier = { + modifier = hold_court_8090_favorites_modifier + years = 5 + } + } +} + +# Vassal/courtier wants a Court Position +hold_court.8090 = { + type = court_event + title = hold_court.8090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:vassal_advocate } + } + desc = hold_court.8090.desc.intro + } + desc = hold_court.8090.desc.intro_advocate + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:old_holder + scope:vassal = { has_relation_rival = scope:old_holder } + } + desc = hold_court.8090.desc.rival # RIVAL HOLDS POS + } + triggered_desc = { + trigger = { + exists = scope:old_holder + exists = scope:vassal_advocate + } + desc = hold_court.8090.desc.other_advocate + } + triggered_desc = { + trigger = { exists = scope:old_holder } + desc = hold_court.8090.desc.other + } + triggered_desc = { + trigger = { + NOT = { exists = scope:vassal_advocate } + scope:vassal = { has_trait = arrogant } + } + desc = hold_court.8090.desc.arrogant # FILLED BUT ARROGANT + } + triggered_desc = { + trigger = { + NOT = { exists = scope:vassal_advocate } + scope:vassal = { has_trait = ambitious } + } + desc = hold_court.8090.desc.ambitious # FILLED BUT AMBITIOUS + } + triggered_desc = { + trigger = { + exists = scope:old_holder + OR = { + AND = { # Stewardship roles + scope:vassal.var:target_court_position = flag:royal_architect + scope:vassal.var:target_court_position = flag:seneschal + scope:vassal.var:target_court_position = flag:court_gardener + scope:vassal.var:target_court_position = flag:keeper_of_swans + scope:vassal.stewardship > scope:old_holder.stewardship + } + AND = { # Learning roles + scope:vassal.var:target_court_position = flag:court_tutor + scope:vassal.var:target_court_position = flag:high_almoner + scope:vassal.var:target_court_position = flag:court_physician + scope:vassal.var:target_court_position = flag:antiquarian + scope:vassal.var:target_court_position = flag:court_artificer + scope:vassal.var:target_court_position = flag:chief_qadi + scope:vassal.var:target_court_position = flag:court_astrologer + scope:vassal.learning > scope:old_holder.learning + } + AND = { # Martial roles + scope:vassal.var:target_court_position = flag:master_of_horse + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:champion + scope:vassal.var:target_court_position = flag:master_of_hunt + scope:vassal.var:target_court_position = flag:garuda + scope:vassal.martial > scope:old_holder.martial + scope:vassal.var:target_court_position = flag:akolouthos + } + AND = { # Diplomacy roles + scope:vassal.var:target_court_position = flag:court_poet + scope:vassal.var:target_court_position = flag:court_musician + scope:vassal.var:target_court_position = flag:cupbearer + scope:vassal.var:target_court_position = flag:lady_in_waiting + scope:vassal.var:target_court_position = flag:cultural_emissary + scope:vassal.diplomacy > scope:old_holder.diplomacy + } + AND = { # Intrigue roles + scope:vassal.var:target_court_position = flag:chief_eunuch + scope:vassal.intrigue > scope:old_holder.intrigue + } + } + } + desc = hold_court.8090.desc.superior # Position is occupied but by someone worse at it + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:vassal_advocate } + desc = hold_court.8090.desc.empty_advocate + } + desc = hold_court.8090.desc.empty + } + random_valid = { + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:royal_architect + scope:vassal = { has_trait = architect } + } + desc = hold_court_8090_interest_architect + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:seneschal + scope:vassal = { has_trait = administrator } + } + desc = hold_court_8090_interest_seneschal_administrator + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:seneschal + scope:vassal = { is_eunuch_trigger = yes } + } + desc = hold_court_8090_interest_seneschal_eunuch + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:high_almoner + scope:vassal = { has_trait = improvident } + } + desc = hold_court_8090_interest_almoner + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_physician + scope:vassal = { has_trait = lifestyle_physician } + } + desc = hold_court_8090_interest_physician_experience + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_physician + scope:vassal = { has_trait = lifestyle_mystic } + } + desc = hold_court_8090_interest_physician_mystic + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_physician + scope:vassal = { has_trait = lifestyle_herbalist } + } + desc = hold_court_8090_interest_physician_herbalist + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:antiquarian + scope:vassal = { has_trait = scholar } + } + desc = hold_court_8090_interest_antiquarian + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:master_of_horse + scope:vassal = { has_trait = overseer } + } + desc = hold_court_8090_interest_horse + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_soulmate = scope:vassal + } + desc = hold_court_8090_interest_bodyguard_soulmate + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_lover = scope:vassal + } + desc = hold_court_8090_interest_bodyguard_lover + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_best_friend = scope:vassal + } + desc = hold_court_8090_interest_bodyguard_bestie + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_friend = scope:vassal + } + desc = hold_court_8090_interest_bodyguard_friend + } + triggered_desc = { + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:champion + scope:vassal.var:target_court_position = flag:garuda + } + scope:vassal = { has_trait = lifestyle_blademaster } + } + desc = hold_court_8090_interest_champion + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:master_of_hunt + scope:vassal = { has_trait = lifestyle_hunter } + } + desc = hold_court_8090_interest_hunt + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_poet + scope:vassal = { has_trait = lifestyle_poet } + } + desc = hold_court_8090_interest_poet + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_musician + scope:vassal = { has_trait = gregarious } + } + desc = hold_court_8090_interest_musician_gregarious + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_musician + scope:vassal = { + culture = { + this != scope:second.culture + has_cultural_tradition = tradition_music_theory + } + } + } + desc = hold_court_8090_interest_musician_culture + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:cupbearer + scope:vassal = { has_trait = lifestyle_reveler } + } + desc = hold_court_8090_interest_cupbearer + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_soulmate = scope:vassal + } + desc = hold_court_8090_interest_lady_soulmate + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_lover = scope:vassal + } + desc = hold_court_8090_interest_lady_lover + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_best_friend = scope:vassal + } + desc = hold_court_8090_interest_lady_bestie + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_friend = scope:vassal + } + desc = hold_court_8090_interest_lady_friend + } + triggered_desc = { + trigger = { scope:vassal.var:target_court_position = flag:chief_eunuch } + desc = hold_court_8090_interest_eunuch + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_gardener + scope:vassal = { + OR = { + has_trait = lifestyle_gardener + has_trait = lifestyle_herbalist + } + } + } + desc = hold_court_8090_interest_gardener + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:court_artificer + scope:vassal = { has_completed_inspiration = yes } + } + desc = hold_court_8090_interest_artificer + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:cultural_emissary + scope:vassal = { has_trait = diplomat } + } + desc = hold_court_8090_interest_emissary + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:chief_qadi + scope:vassal = { has_trait = scholar } + } + desc = hold_court_8090_interest_qadi + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:garuda + scope:vassal = { has_trait = lifestyle_blademaster } + } + desc = hold_court_8090_interest_garuda + } + triggered_desc = { + trigger = { + scope:vassal.var:target_court_position = flag:keeper_of_swans + scope:vassal = { has_trait = lifestyle_hunter } + } + desc = hold_court_8090_interest_keeper_of_swans + } + triggered_desc = { + trigger = { has_relation_soulmate = scope:vassal } + desc = hold_court_8090_interest_soulmate + } + triggered_desc = { + trigger = { has_relation_lover = scope:vassal } + desc = hold_court_8090_interest_lover + } + triggered_desc = { + trigger = { has_relation_best_friend = scope:vassal } + desc = hold_court_8090_interest_bestie + } + triggered_desc = { + trigger = { has_relation_friend = scope:vassal } + desc = hold_court_8090_interest_friend + } + triggered_desc = { + trigger = { exists = scope:old_holder } + desc = hold_court_8090_interest_other + } + triggered_desc = { + trigger = { + NOT = { exists = scope:old_holder } + } + desc = hold_court_8090_interest_fallback + } + } + } + theme = realm + lower_right_portrait = scope:old_holder + court_scene = { + button_position_character = scope:vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + OR = { + any_vassal = { hold_court_8090_candidate_trigger = yes } + any_courtier = { hold_court_8090_candidate_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + has_employed_any_court_position = no + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + save_scope_as = liege + every_vassal = { + limit = { hold_court_8090_candidate_trigger = yes } + add_to_list = hold_court_8090_candidate_list + } + every_courtier = { + limit = { hold_court_8090_candidate_trigger = yes } + add_to_list = hold_court_8090_candidate_list + } + random_in_list = { + list = hold_court_8090_candidate_list + weight = { + base = 1 + modifier = { + add = 2 + is_landed_or_landless_administrative = yes + } + modifier = { + add = -1 + highest_held_title_tier = tier_barony + } + modifier = { + add = 2 + highest_held_title_tier = tier_duchy + } + modifier = { + add = 4 + highest_held_title_tier = tier_kingdom + } + modifier = { + add = -20 + is_councillor_of = root + } + modifier = { + add = 2 + has_trait = arrogant + } + modifier = { + add = 2 + has_trait = ambitious + } + modifier = { + add = 10 + has_relation_friend = root + } + modifier = { + add = 20 + has_relation_best_friend = root + } + modifier = { + add = 30 + has_relation_lover = root + } + modifier = { + add = 40 + has_relation_soulmate = root + } + } + hidden_effect = { + random_list = { + 2 = { + trigger = { has_any_court_position = no } + save_scope_as = vassal + court_event_character_flag_effect = yes + } + 2 = { + trigger = { + any_close_family_member = { hold_court_8090_can_move_trigger = yes } + } + save_scope_as = vassal_advocate + court_event_character_flag_effect = yes + ordered_close_family_member = { + limit = { hold_court_8090_can_move_trigger = yes } + save_scope_as = vassal + court_event_character_flag_effect = yes + } + } + } + } + } + scope:vassal = { + court_position_generator_effect = { VAR = target EMPLOYER = root } + court_position_generator_effect = { VAR = backup EMPLOYER = root } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Grant desired position + name = { + trigger = { exists = scope:old_holder } # Replace + text = hold_court.8090.b + } + name = { # Lady-in-Waiting Soulmate + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_soulmate = scope:vassal + } + text = hold_court.8090.a.lady_in_waiting_soulmate + } + name = { # Lady-in-Waiting Lover + trigger = { + scope:vassal.var:target_court_position = flag:lady_in_waiting + has_relation_lover = scope:vassal + } + text = hold_court.8090.a.lady_in_waiting_lover + } + name = { # Bodyguard Soulmate + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_soulmate = scope:vassal + } + text = hold_court.8090.a.bodyguard_soulmate + } + name = { # Bodyguard Lover + trigger = { + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + } + has_relation_lover = scope:vassal + } + text = hold_court.8090.a.bodyguard_lover + } + name = { # Default + trigger = { always = yes } + text = hold_court.8090.a + } + trigger = { exists = scope:vassal.var:target_court_position } + court_position_generator_assignment_effect = { VAR = target CANDIDATE = scope:vassal EMPLOYER = root } + if = { + limit = { + NOT = { exists = scope:vassal_advocate } + } + if = { + limit = { exists = scope:vassal_advocate } + hold_court_8090_hook_effect = { CHAR = scope:vassal_advocate } + scope:vassal_advocate = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + } + } + else = { + hold_court_8090_hook_effect = { CHAR = scope:vassal } + } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + if = { + limit = { + OR = { + has_relation_lover = scope:vassal + has_relation_soulmate = scope:vassal + } + OR = { + scope:vassal.var:target_court_position = flag:bodyguard + scope:vassal.var:target_court_position = flag:akolouthos + scope:vassal.var:target_court_position = flag:lady_in_waiting + } + } + had_sex_with_effect = { + CHARACTER = scope:vassal + PREGNANCY_CHANCE = pregnancy_chance + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { #Weight up. + add = 15 + has_relation_friend = scope:vassal + } + modifier = { #Weight up. + add = 30 + has_relation_best_friend = scope:vassal + } + modifier = { #Weight up. + add = 45 + has_relation_lover = scope:vassal + } + modifier = { #Weight up. + add = 60 + has_relation_soulmate = scope:vassal + } + } + } + + option = { # Grant some other unclaimed position + name = hold_court.8090.c + trigger = { exists = scope:vassal.var:backup_court_position } + show_unlock_reason = no + court_position_generator_assignment_effect = { VAR = backup CANDIDATE = scope:vassal EMPLOYER = root } + if = { + limit = { exists = scope:vassal_advocate } + scope:vassal_advocate = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 5 + } + } + } + scope:vassal = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_energy = 1 + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Offer bad role + name = { + text = hold_court.8090.d.advocate + trigger = { exists = scope:vassal_advocate } + } + name = { + text = hold_court.8090.d + trigger = { + NOT = { exists = scope:vassal_advocate } + } + } + trigger = { + OR = { + AND = { + has_imprisonment_reason = scope:vassal + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = executioner_court_position + } + NOR = { + scope:vassal.var:target_court_position ?= flag:executioner + scope:vassal.var:backup_court_position ?= flag:executioner + } + } + AND = { + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = court_jester_court_position + } + NOR = { + scope:vassal.var:target_court_position ?= flag:court_jester + scope:vassal.var:backup_court_position ?= flag:court_jester + } + } + AND = { + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = food_taster_court_position + } + NOR = { + scope:vassal.var:target_court_position ?= flag:food_taster + scope:vassal.var:backup_court_position ?= flag:food_taster + } + } + } + } + scope:vassal = { + if = { + limit = { + NOR = { + is_vassal_of = root + is_courtier_of = root + employer = root + } + } + hidden_effect = { set_employer = root } + } + } + if = { + limit = { # Executioner + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = executioner_court_position + } + NOR = { + scope:vassal.var:target_court_position = flag:executioner + scope:vassal.var:backup_court_position = flag:executioner + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = executioner + CANDIDATE = scope:vassal + } + if = { + limit = { + NOT = { has_imprisonment_reason = scope:vassal } + } + stress_impact = { + just = medium_stress_impact_gain + } + } + } + else_if = { # Jester + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = court_jester_court_position + } + NOR = { + scope:vassal.var:target_court_position = flag:court_jester + scope:vassal.var:backup_court_position = flag:court_jester + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:vassal + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + } + else_if = { # Taster + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:vassal + COURT_POS = food_taster_court_position + } + NOR = { + scope:vassal.var:target_court_position = flag:food_taster + scope:vassal.var:backup_court_position = flag:food_taster + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = food_taster + CANDIDATE = scope:vassal + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + } + if = { + limit = { exists = scope:vassal_advocate } + scope:vassal_advocate = { + add_opinion = { + modifier = insulted_opinion + target = root + opinion = -10 + } + } + } + scope:vassal = { + if = { + limit = { has_court_position = executioner_court_position } + root = { consume_imprisonment_reasons = scope:vassal } + } + if = { + limit = { has_relation_friend = root } + remove_relation_friend = root + } + add_opinion = { + modifier = insulted_opinion + target = root + opinion = -15 + } + } + ai_chance = { + base = 100 + modifier = { #Weight up. + add = 15 + has_imprisonment_reason = scope:vassal + has_trait = just + } + modifier = { #Weight up. + add = 15 + NOT = { has_imprisonment_reason = scope:vassal } + has_trait = arbitrary + } + } + } + + option = { # Refuse + name = { + text = hold_court.8090.e.advocate + trigger = { exists = scope:vassal_advocate } + } + name = { + text = hold_court.8090.e + trigger = { + NOT = { exists = scope:vassal_advocate } + } + } + if = { + limit = { exists = scope:vassal_advocate } + scope:vassal_advocate = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + scope:vassal = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + after = { + scope:vassal = { + clear_court_event_participation = yes + remove_variable = target_court_position + remove_variable = backup_court_position + } + if = { + limit = { exists = scope:vassal_advocate } + scope:vassal_advocate = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# A Child of the Court +# by Joe Parkin +# 8100 +################################################## + +scripted_trigger hold_court_8100_child_trigger = { + has_court_event_flag = no + is_available_ai_child = yes # Children only + age < 14 # Not already almost done with education, sets time which must be invested to get rewards + NOT = { is_child_of = root } # Is not your child + NOT = { has_relation_ward = root } # Is not already a ward of the player + NOT = { + root = { has_strong_hook = prev } # prev = scope:ward + } + trigger_if = { + limit = { is_close_or_extended_family_of = root } # If related to the player, must be a nibling or great nibling + OR = { + AND = { + exists = root.father + OR = { + is_grandchild_of = root.father + is_great_grandchild_of = root.father + } + } + AND = { + exists = root.mother + OR = { + is_grandchild_of = root.mother + is_great_grandchild_of = root.mother + } + } + } + } + faith = root.faith # Has the same faith as the player + trigger_if = { + limit = { + faith = { has_doctrine = doctrine_gender_male_dominated } # If male dominated, must be no father + } + OR = { + NOT = { exists = father } + father = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + } + NOR = { + AND = { + is_courtier_of = root + mother ?= { is_courtier_of = root } + } + AND = { + is_courtier_of = root + father ?= { is_courtier_of = root } + } + } + } + trigger_if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } # If female dominated, must be no mother + } + OR = { + NOT = { exists = mother } + mother = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + } + } +} + +scripted_trigger hold_court_8100_parent_trigger = { # is a parent eligible to advocate? + this != root + OR = { + is_alive = yes + is_imprisoned = no + } + has_court_event_flag = no + is_available_ai_adult = yes + OR = { + employer = root + AND = { + exists = scope:ward_employer + employer = scope:ward_employer + } + } +} + +scripted_trigger hold_court_8100_adopt_trigger = { # is someone disadvantaged by adoption? + OR = { + is_child_of = root + AND = { + is_spouse_of = root + root = { + any_child = { + any_parent = { this = scope:advocate } + } + } + } + } +} + +scripted_effect hold_court_8100_root_effect = { # make root the guardian + hidden_effect = { + if = { + limit = { + employer != root + } + set_employer = root + } + } + set_relation_guardian = root + set_variable = { + name = hold_court_8100_fosterer + value = root + years = 17 + } + root = { + if = { + limit = { + NOT = { + scope:ward = { is_close_family_of = root } + } + } + change_current_court_grandeur = medium_court_grandeur_gain + } + } +} + +scripted_effect hold_court_8100_guardian_effect = { # make scope:guardian the guardian + hidden_effect = { + if = { + limit = { + employer != scope:guardian.employer + } + set_employer = scope:guardian.employer + } + } + set_relation_guardian = scope:guardian + root = { + if = { + limit = { + NOT = { + scope:ward = { is_close_family_of = root } + } + } + change_current_court_grandeur = minor_court_grandeur_gain + } + } +} + +scripted_effect hold_court_8100_root_or_guardian_effect = { # make root guardian, or scope:guardian if not + if = { + limit = { + root = { num_of_relation_ward < 2 } + } + hold_court_8100_root_effect = yes + } + else = { hold_court_8100_guardian_effect = yes } +} + +# A parent wants you to be their child's ward +hold_court.8100 = { + type = court_event + title = hold_court.8100.t + desc = { + desc = hold_court.8100.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:ward_employer + scope:ward_employer != root + } + desc = hold_court.8100.desc.vassal + } + desc = hold_court.8100.desc.court + } + desc = hold_court.8100.desc.body + first_valid = { + triggered_desc = { + trigger = { + scope:ward = { is_close_or_extended_family_of = root } + } + desc = hold_court.8100.desc.interest_family + } + triggered_desc = { + trigger = { + scope:ward = { + is_landed_or_landless_administrative = yes + OR = { + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = no + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + } + } + desc = hold_court.8100.desc.interest_marriage + } + triggered_desc = { + trigger = { + scope:ward = { is_landed_or_landless_administrative = yes } + } + desc = hold_court.8100.desc.interest_alliance + } + desc = hold_court.8100.desc.interest_fallback + } + } + theme = realm + override_background = { reference = throne_room } + lower_left_portrait = scope:ward_employer + lower_right_portrait = scope:guardian + court_scene = { + button_position_character = scope:advocate + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:advocate = { + group = petitioners_group + animation = beg + } + scope:ward = { + group = petitioners_group + animation = sadness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + NOT = { + any_courtier = { + has_variable = hold_court_8100_fosterer + var:hold_court_8100_fosterer = root + } + } + trigger_if = { # There is a parentless child at court + limit = { + any_courtier = { hold_court_8100_child_trigger = yes } + } + any_courtier = { + hold_court_8100_child_trigger = yes + save_temporary_scope_as = ward_temp + } + } + trigger_else = { + any_vassal = { + any_courtier = { + hold_court_8100_child_trigger = yes + save_temporary_scope_as = ward_temp + } + } + } + OR = { + num_of_relation_ward < 2 + any_courtier = { # Guardian + has_court_event_flag = no + is_available_ai_adult = yes + num_of_relation_ward < 2 + NOT = { is_parent_of = scope:ward_temp } + save_temporary_scope_as = compare_character + scope:ward_temp = { has_ward_guardian_education_match_compare_character_trigger = yes } # same education + } + } + any_courtier = { # Advocate backup + has_court_event_flag = no + is_available_ai_adult = yes + NOT = { is_parent_of = scope:ward_temp } + trigger_if = { + limit = { exists = scope:compare_character } + this != scope:compare_character + } + } + } + + weight_multiplier = { + base = 1 + # Shares education focus of player + modifier = { + add = 1 + any_courtier = { + hold_court_8100_child_trigger = yes + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + } + modifier = { + add = 1 + any_vassal = { + any_courtier = { + hold_court_8100_child_trigger = yes + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + } + } + # Has no guardian + modifier = { + add = 2 + any_courtier = { + hold_court_8100_child_trigger = yes + num_of_relation_guardian = 0 + } + } + modifier = { + add = 2 + any_vassal = { + any_courtier = { + hold_court_8100_child_trigger = yes + num_of_relation_guardian = 0 + } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + every_courtier = { + limit = { hold_court_8100_child_trigger = yes } + add_to_list = hold_court_8100_list + } + every_vassal = { + every_courtier = { + limit = { hold_court_8100_child_trigger = yes } + add_to_list = hold_court_8100_list + } + } + random_in_list = { + list = hold_court_8100_list + weight = { + base = 1 + # Shares education focus of root + modifier = { + add = 10 + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + # Has no guardian + modifier = { + add = 2 + num_of_relation_guardian = 0 + } + # Not a more suitable ward + modifier = { + add = 20 + any_sibling = { + count = all + hold_court_8100_child_trigger = yes + OR = { + AND = { + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + age < prev.age # prev = scope:ward + } + } + } + # Related to root + modifier = { + add = 100 + is_close_or_extended_family_of = root + } + # In root court + modifier = { + add = 25 + employer = root + } + } + save_scope_as = ward + court_event_character_flag_effect = yes + if = { + limit = { + employer ?= { + this != root + } + } + employer = { save_scope_as = ward_employer } + } + } + random_courtier = { # Guardian + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + num_of_relation_ward < 2 + NOT = { is_parent_of = scope:ward } + save_temporary_scope_as = compare_character + scope:ward = { has_ward_guardian_education_match_compare_character_trigger = yes } # same education + } + alternative_limit = { + has_court_event_flag = no + is_available_ai_adult = yes + num_of_relation_ward < 2 + NOT = { is_parent_of = scope:ward } + } + save_scope_as = guardian + court_event_character_flag_effect = yes + } + scope:ward = { + if = { + limit = { + mother ?= { hold_court_8100_parent_trigger = yes } + } + mother = { save_scope_as = advocate } + } + else_if = { + limit = { + father ?= { hold_court_8100_parent_trigger = yes } + } + father = { save_scope_as = advocate } + } + else = { + root = { + random_courtier = { # Advocate backup + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { is_parent_of = scope:ward } + trigger_if = { + limit = { exists = scope:guardian } + this != scope:guardian + } + } + weight = { + base = 1 + modifier = { + factor = 10 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + has_trait = paranoid + has_trait = family_first + has_trait = gallant + has_trait = diligent + has_trait = lazy + } + } + modifier = { + factor = 50 + is_close_family_of = scope:ward + } + } + save_scope_as = advocate + court_event_character_flag_effect = yes + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Become the child's guardian + name = hold_court.8100.a + trigger = { num_of_relation_ward < 2 } + highlight_portrait = root + scope:ward = { + hold_court_8100_root_effect = yes + custom_tooltip = hold_court.8100.hook.tt + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + scope:advocate = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + if = { + limit = { exists = scope:ward_employer } + scope:ward_employer = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 5 + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.25 + ai_greed = -0.25 + } + modifier = { #Weight up. + add = 30 + scope:ward = { + root = { save_temporary_scope_as = compare_character } + has_ward_guardian_education_match_compare_character_trigger = yes # same education interest + } + } + modifier = { #Weight up. + add = 30 + scope:ward = { is_close_or_extended_family_of = root } + } + modifier = { #Weight down for stress. + add = -45 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Find another guardian + name = hold_court.8100.b + trigger = { exists = scope:guardian } + highlight_portrait = scope:guardian + scope:ward = { + hold_court_8100_guardian_effect = yes + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + scope:advocate = { + if = { + limit = { is_close_family_of = root } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + else = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + if = { + limit = { exists = scope:ward_employer } + scope:ward_employer = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 5 + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_greed = -0.25 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Adopt them + name = hold_court.8100.c + trigger = { + scope:ward = { is_lowborn = yes } + } + scope:ward = { + if = { + limit = { + can_add_hook = { + target = scope:ward + type = loyalty_hook + } + } + add_hook = { + target = scope:ward + type = loyalty_hook + } + } + hidden_effect = { + if = { + limit = { + employer != root + } + set_employer = root + } + } + set_relation_guardian = root + if = { + limit = { + root = { is_male = yes } + } + set_father = root + } + else = { set_mother = root } + set_house = root.house + add_opinion = { + modifier = grateful_child + target = root + opinion = 40 + } + add_character_modifier = { modifier = hold_court_8100_adopted_modifier } + } + scope:advocate = { + if = { + limit = { hold_court_8100_adopt_trigger = yes } + add_opinion = { + target = root + modifier = envy_opinion + opinion = -20 + } + } + else = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 20 + } + } + } + if = { + limit = { + exists = scope:ward_employer + scope:ward_employer = { + NOT = { hold_court_8100_adopt_trigger = yes } + } + } + scope:ward_employer = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + } + every_child = { + custom = hold_court.8100.c.tt_child + limit = { + this != scope:ward + } + add_opinion = { + target = root + modifier = envy_opinion + opinion = -20 + } + add_opinion = { + target = scope:ward + modifier = envy_opinion + opinion = -40 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + modifier = { #Weight up. + add = 50 + AND = { + any_child = { count = 0 } + OR = { + can_have_children = no + AND = { + is_married = yes + primary_spouse = { can_have_children = no } + allowed_more_spouses = no + max_number_of_concubines = 0 + } + } + } + } + modifier = { #Weight down. + add = -50 + any_child = { + count > 0 + this = root.primary_heir + } + } + modifier = { #Weight down. + add = -50 + any_child = { + count > 2 + } + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { + factor = 0 + is_adult = no + } + } + } + + option = { # Pay their way + name = hold_court.8100.d + trigger = { + OR = { + scope:advocate.gold >= root.minor_gold_value + scope:ward.gold >= root.minor_gold_value + } + } + if = { + limit = { scope:ward.gold >= root.minor_gold_value } + scope:ward = { + pay_short_term_gold = { + target = root + gold = root.minor_gold_value + } + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -15 + } + } + scope:advocate = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -10 + } + } + } + else = { + scope:advocate = { + pay_short_term_gold = { + target = root + gold = root.minor_gold_value + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -15 + } + } + scope:ward = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -10 + } + } + } + if = { + limit = { exists = scope:ward_employer } + scope:ward_employer = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 5 + } + } + } + if = { + limit = { num_of_relation_ward < 2 } + scope:ward = { + hidden_effect = { + if = { + limit = { + employer != root + } + set_employer = root + } + } + set_relation_guardian = root + set_variable = { + name = hold_court_8100_fosterer + value = root + years = 17 + } + custom_tooltip = hold_court.8100.hook.tt + } + } + else = { + scope:ward = { + hidden_effect = { + if = { + limit = { + employer != scope:guardian.employer + } + set_employer = scope:guardian.employer + } + } + set_relation_guardian = scope:guardian + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_greed = 0.5 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Refuse + name = hold_court.8100.e + if = { + limit = { + NOT = { + scope:ward = { is_close_family_of = root } + } + } + change_current_court_grandeur = medium_court_grandeur_loss + } + scope:ward = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + scope:advocate = { + if = { + limit = { is_close_family_of = root } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + else = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + if = { + limit = { exists = scope:ward_employer } + scope:ward_employer = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + after = { + scope:ward = { + clear_court_event_participation = yes + } + scope:guardian = { + clear_court_event_participation = yes + } + scope:advocate = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Serious Business +# by Joe Parkin +# 8110 +################################################## + +# A peasant comes to you with a very provincial problem +hold_court.8110 = { + type = court_event + title = hold_court.8110.t + desc = { + desc = hold_court.8110.desc + random_valid = { + desc = hold_court.8110.desc.affair + desc = hold_court.8110.desc.fence + desc = hold_court.8110.desc.goat + desc = hold_court.8110.desc.veg + desc = hold_court.8110.desc.drink + } + } + theme = realm + lower_center_portrait = cp:councillor_steward + lower_right_portrait = scope:executioner + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = happiness + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + any_held_title = { + title_tier = county + county = { + county_control > 80 + any_county_province = { has_holding = yes } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ## Since you take peasant administrative concerns seriously... + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_held_title = { # Find a place for loc + title_tier = county + limit = { + county = { + county_control > 80 + any_county_province = { has_holding = yes } + } + } + random_county_province = { + limit = { has_holding = yes } + save_scope_as = peasant_holding + } + } + hidden_effect = { # Create peasants + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + trait = beauty_bad_2 + save_scope_as = peasant + } + dummy_female = { save_scope_as = dummy_female } + dummy_male = { save_scope_as = dummy_male } + } + scope:peasant = { + court_event_character_flag_effect = yes + } + if = { # Save Steward if relevant + limit = { + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + } + if = { # Save Executioner if relevant + limit = { + employs_court_position = executioner_court_position + any_court_position_holder = { + type = executioner_court_position + has_court_event_flag = no + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = executioner_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = executioner + court_event_character_flag_effect = yes + } + } + court_position_old_holder_effect = { POS = court_jester EMPLOYER = root } # Save Jester if relevant + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Hear them out + name = hold_court.8110.a + add_character_modifier = { + modifier = hold_court_8110_common_modifier + years = 10 + } + stress_impact = { + base = medium_stress_impact_gain + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_energy = 0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = impatient + } + } + } + + option = { # Steward handle it + name = hold_court.8110.b + trigger = { exists = scope:steward } + highlight_portrait = scope:steward + scope:steward = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + scope:peasant_holding.county = { + add_county_modifier = { + modifier = hold_court_8110_steward_modifier + years = 10 + } + } + stress_impact = { + patient = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = patient + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + } + } + + option = { # Execute them + name = hold_court.8110.c + trigger = { exists = scope:executioner } + highlight_portrait = scope:executioner + add_tyranny = minor_tyranny_gain + add_dread = miniscule_dread_gain + scope:peasant = { + death = { + killer = scope:executioner + death_reason = death_execution + } + } + scope:peasant_holding.county = { + add_county_modifier = { + modifier = hold_court_8110_execute_modifier + years = 10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_compassion = -0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } + + option = { # Make them a jester + name = hold_court.8110.d + scope:peasant = { + hidden_effect = { set_employer = root } + add_opinion = { + modifier = insult_opinion + target = root + opinion = -10 + } + } + if = { + limit = { exists = scope:old_holder } + show_as_tooltip = { + appoint_court_position = { + recipient = scope:peasant + court_position = court_jester_court_position + } + } + hidden_effect = { + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:peasant + holder = scope:old_holder + court_position = court_jester_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + } + else = { + if = { + limit = { + can_employ_court_position_type = court_jester_court_position + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:peasant + } + } + } + scope:peasant_holding.county = { + add_county_modifier = { + modifier = hold_court_8110_jester_modifier + years = 10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = 0.25 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + + option = { # Be done with it + name = hold_court.8110.e + add_character_modifier = { + modifier = hold_court_8110_haughty_modifier + years = 10 + } + stress_impact = { + just = medium_stress_impact_gain + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = patient + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + + after = { + scope:peasant = { + clear_court_event_participation = yes + if = { + limit = { + is_alive = yes + NOT = { has_court_position = court_jester_court_position } + } + silent_disappearance_effect = yes + } + } + scope:steward ?= { + clear_court_event_participation = yes + } + scope:executioner ?= { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Evangelical Backlash +# by Joe Parkin +# 8120 +################################################## + +scripted_trigger hold_court_8120_syncretic_faith_trigger = { + scope:peasant.religion != root.religion + OR = { + AND = { # Eastern + scope:peasant.faith.religion = { is_in_family = rf_eastern } + faith = { has_doctrine = tenet_eastern_syncretism } + } + AND = { # Pagan + scope:peasant.faith = { has_doctrine_parameter = unreformed } + faith = { has_doctrine = tenet_unreformed_syncretism } + } + AND = { # Christian + OR = { + scope:peasant.religion = religion:eastern_orthodox_religion + scope:peasant.religion = religion:catholic_religion + scope:peasant.religion = religion:protestant_religion + } + faith = { has_doctrine = tenet_christian_syncretism } + } + AND = { # Islam + scope:peasant.religion = religion:islam_religion + faith = { has_doctrine = tenet_islamic_syncretism } + } + AND = { # Judaism + scope:peasant.religion = religion:judaism_religion + faith = { has_doctrine = tenet_jewish_syncretism } + } + } +} + +scripted_effect hold_court_8120_stop_effect = { + set_variable = { + name = hold_court_8120_religion_block + value = scope:conversion_target.faith + years = 15 + } + add_character_modifier = { + modifier = hold_court_8120_tolerance_modifier + years = 10 + } + scope:bishop = { + add_opinion = { + modifier = impious_opinion + target = root + opinion = -15 + } + set_council_task = { task_type = task_religious_relations } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_stopped_modifier + years = 15 + } + } + custom_tooltip = hold_court.8120.a.tt_conversion + stress_impact = { + zealous = medium_stress_impact_gain + callous = medium_stress_impact_gain + } +} + +# Locals ask you to stop trying to convert them +hold_court.8120 = { + type = court_event + title = hold_court.8120.t + desc = { + desc = hold_court.8120.desc + first_valid = { + triggered_desc = { + trigger = { scope:peasant.religion = root.religion } + desc = hold_court.8120.desc.same_religion + } + triggered_desc = { + trigger = { scope:peasant.culture = root.culture } + desc = hold_court.8120.desc.same_culture + } + desc = hold_court.8120.desc.other + } + } + theme = realm + lower_right_portrait = scope:bishop + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 20 } + + trigger = { + NOT = { has_character_flag = has_had_conversion_event } + top_liege = this + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + is_available_ai_adult = yes + } + any_held_county = { is_target_of_council_task = task_conversion } + } + + 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_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_conversion_event + years = 15 + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + court_event_character_flag_effect = yes + } + random_held_county = { + limit = { is_target_of_council_task = task_conversion } + save_scope_as = conversion_target + } + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + culture = scope:conversion_target.culture + faith = scope:conversion_target.faith + save_scope_as = peasant + } + scope:peasant = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Stop the priests - unsyncretic + name = hold_court.8120.a + trigger = { hold_court_8120_syncretic_faith_trigger = no } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_evil_level + } + } + } + add_piety = medium_piety_loss + } + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_hostile_level + } + } + } + add_piety = minor_piety_loss + } + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_astray_level + } + } + } + add_piety = miniscule_piety_loss + } + hold_court_8120_stop_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Stop the priests - syncretic + name = hold_court.8120.b + trigger = { hold_court_8120_syncretic_faith_trigger = yes } + if = { + limit = { + AND = { + scope:peasant.faith.religion = { is_in_family = rf_eastern } + faith = { has_doctrine = tenet_eastern_syncretism } + } + } + custom_tooltip = hold_court.8120.b.tt_eastern # Eastern + } + else_if = { + limit = { + AND = { + scope:peasant.faith = { has_doctrine_parameter = unreformed } + faith = { has_doctrine = tenet_unreformed_syncretism } + } + } + custom_tooltip = hold_court.8120.b.tt_pagan # Pagan + } + else_if = { + limit = { + AND = { + OR = { + scope:peasant.religion = religion:eastern_orthodox_religion + scope:peasant.religion = religion:catholic_religion + scope:peasant.religion = religion:protestant_religion + } + faith = { has_doctrine = tenet_christian_syncretism } + } + } + custom_tooltip = hold_court.8120.b.tt_christianity # Christian + } + else_if = { + limit = { + AND = { + scope:peasant.religion = religion:islam_religion + faith = { has_doctrine = tenet_islamic_syncretism } + } + } + custom_tooltip = hold_court.8120.b.tt_islam # Islam + } + else = { custom_tooltip = hold_court.8120.b.tt_judaism } # Judaism + add_piety = medium_piety_gain + hold_court_8120_stop_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + option = { # Demand religious taxes + name = hold_court.8120.c + add_treasury_or_gold = minor_treasury_or_gold_value + if = { + limit = { + NOT = { + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + } + } + custom_tooltip = hold_court.8120.c.tt_tenet + stress_impact = { + honest = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + } + else = { + add_piety = minor_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + set_variable = { + name = hold_court_8120_religion_block + value = scope:conversion_target.faith + years = 15 + } + scope:bishop = { + if = { + limit = { + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + } + add_opinion = { + modifier = pious_opinion + target = root + opinion = 5 + } + } + else = { + add_opinion = { + modifier = impious_opinion + target = root + opinion = -10 + } + } + set_council_task = { task_type = task_religious_relations } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_tax_modifier + years = 15 + } + custom_tooltip = hold_court.8120.a.tt_conversion + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_zeal = 1 + } + modifier = { #Weight up for stress. + add = 30 + NOT = { + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + } + OR = { + has_trait = cynical + has_trait = deceitful + } + } + modifier = { #Weight down for stress. + add = -30 + NOT = { + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + } + OR = { + has_trait = honest + has_trait = zealous + } + } + modifier = { #Weight down for stress. + add = -15 + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + } + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Execute + name = hold_court.8120.d + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_evil_level + } + } + } + add_piety = major_piety_gain + } + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_hostile_level + } + } + } + add_piety = medium_piety_gain + } + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:peasant.faith + value >= faith_astray_level + } + } + } + add_piety = minor_piety_gain + } + add_dread = minor_dread_gain + add_character_modifier = { + modifier = hold_court_8120_terror_modifier + years = 10 + } + scope:peasant = { + death = { + killer = root + death_reason = death_execution + } + } + scope:bishop = { + add_opinion = { + modifier = pious_opinion + target = root + opinion = 20 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = massive_stress_impact_gain + torturer = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + ai_compassion = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { #Weight up for stress. + add = 15 + has_trait = torturer + } + } + } + + option = { # Refuse + name = hold_court.8120.e + scope:bishop = { + add_opinion = { + modifier = pious_opinion + target = root + opinion = 10 + } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_refused_modifier + years = 20 + } + } + stress_impact = { + callous = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + } + } + + after = { + scope:bishop = { + clear_court_event_participation = yes + } + scope:peasant = { + clear_court_event_participation = yes + if = { + limit = { is_alive = yes } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Cultural Pride +# by Joe Parkin +# 8130 +################################################## + +scripted_trigger hold_court_8130_county_trigger = { + NOR = { + has_county_modifier = hold_court_8120_tax_modifier + has_county_modifier = hold_court_8120_stopped_modifier + has_county_modifier = hold_court_8120_refused_modifier + has_county_modifier = hold_court_8130_service_modifier + } +} + +scripted_effect hold_court_8130_stop_effect = { + set_variable = { + name = hold_court_8130_culture_block + value = scope:conversion_target.culture + years = 15 + } + add_character_modifier = { + modifier = hold_court_8130_tolerance_modifier + years = 10 + } + scope:steward = { + if = { + limit = { + culture != scope:conversion_target.culture + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + else = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + set_council_task = { task_type = task_collect_taxes } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_stopped_modifier + years = 15 + } + custom_tooltip = hold_court.8120.a.tt_conversion + } + stress_impact = { + arrogant = medium_stress_impact_gain + } +} + +# Locals ask you to stop trying to integrate them +hold_court.8130 = { + type = court_event + title = hold_court.8130.t + desc = { + desc = hold_court.8130.desc + first_valid = { + triggered_desc = { + trigger = { + scope:peasant.culture = { has_same_culture_language = root.culture } + } + desc = hold_court.8130.desc.same_language + } + triggered_desc = { + trigger = { + scope:peasant.culture = { has_same_culture_heritage = root.culture } + } + desc = hold_court.8130.desc.same_heritage + } + triggered_desc = { + trigger = { + scope:peasant.culture = { has_same_culture_ethos = root.culture } + } + desc = hold_court.8130.desc.same_ethos + } + desc = hold_court.8130.desc.other + } + } + theme = realm + lower_right_portrait = scope:steward + court_scene = { + button_position_character = scope:peasant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:peasant = { + group = petitioners_group + animation = beg + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + NOT = { has_character_flag = has_had_conversion_event } + top_liege = this + exists = cp:councillor_steward + cp:councillor_steward = { + has_court_event_flag = no + is_available_ai_adult = yes + } + any_held_county = { + is_target_of_council_task = task_promote_culture + hold_court_8130_county_trigger = yes + } + } + + 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_scholarly } + } + + immediate = { + add_character_flag = { + flag = has_had_conversion_event + years = 5 + } + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + random_held_county = { + limit = { + is_target_of_council_task = task_promote_culture + hold_court_8130_county_trigger = yes + } + save_scope_as = conversion_target + } + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + culture = scope:conversion_target.culture + faith = scope:conversion_target.faith + save_scope_as = peasant + } + scope:peasant = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Stop + name = hold_court.8130.a + trigger = { + NOT = { + root.culture = { has_cultural_pillar = ethos_egalitarian } + } + } + add_prestige = minor_prestige_loss + hold_court_8130_stop_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -60 + has_trait = arrogant + } + } + } + + option = { # Stop - but egalitarian! + name = hold_court.8130.b + trigger = { + root.culture = { has_cultural_pillar = ethos_egalitarian } + } + hold_court_8130_stop_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = -2 + } + modifier = { #Weight down for stress. + add = -60 + has_trait = arrogant + } + } + } + + option = { # Demand + name = hold_court.8130.c + custom_tooltip = hold_court.8130.c.tt_service + hidden_effect = { + create_character = { + gender_female_chance = root_soldier_female_chance + location = root.capital_province + template = new_warrior_character + faith = scope:conversion_target.faith + culture = scope:conversion_target.culture + save_scope_as = soldier + } + send_interface_message = { + type = event_guest_neutral + title = hold_court.8130.c.tt_service_title + right_icon = scope:soldier + hidden_effect = { + scope:soldier = { set_employer = root } + } + scope:soldier = { + add_opinion = { + modifier = kindness_opinion + target = root + opinion = 15 + } + } + } + } + set_variable = { + name = hold_court_8130_culture_block + value = scope:conversion_target.culture + years = 15 + } + scope:steward = { + if = { + limit = { + culture != scope:conversion_target.culture + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + else = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + set_council_task = { task_type = task_collect_taxes } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8130_service_modifier + years = 15 + } + custom_tooltip = hold_court.8120.a.tt_conversion + } + stress_impact = { + generous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arrogant + } + } + } + + option = { # Execute + name = hold_court.8130.d + trigger = { + OR = { + has_trait = arrogant + has_trait = torturer + has_trait = sadistic + has_trait = callous + } + } + trait = arrogant + trait = torturer + trait = sadistic + trait = callous + add_dread = minor_dread_gain + add_character_modifier = { + modifier = hold_court_8130_terror_modifier + years = 10 + } + scope:peasant = { + death = { + killer = root + death_reason = death_execution + } + } + scope:steward = { + if = { + limit = { + culture != scope:conversion_target.culture + } + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + else = { + add_opinion = { + modifier = cruelty_opinion + target = root + opinion = -10 + } + } + } + stress_impact = { + torturer = medium_stress_impact_loss + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_compassion = -1 + } + modifier = { #Weight up for stress. + add = 15 + has_trait = torturer + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + option = { # Refuse + name = hold_court.8130.e + scope:steward = { + if = { + limit = { + culture != scope:conversion_target.culture + } + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + else = { + add_opinion = { + modifier = hurt_opinion + target = root + opinion = -5 + } + } + } + scope:conversion_target = { + add_county_modifier = { + modifier = hold_court_8120_refused_modifier + years = 20 + } + } + stress_impact = { + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + after = { + scope:steward = { + clear_court_event_participation = yes + } + scope:peasant = { + clear_court_event_participation = yes + if = { + limit = { is_alive = yes } + silent_disappearance_effect = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Puppy Patronage +# by Joe Parkin +# 8140 - 142 +################################################## + +# Master of the hunt brings a pup +hold_court.8140 = { + type = court_event + title = hold_court.8140.t + desc = hold_court.8140.desc + theme = realm + court_scene = { + button_position_character = scope:huntmaster + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:huntmaster = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_court_position_holder = { + type = master_of_hunt_court_position + has_court_event_flag = no + is_available_ai_adult = yes + NOR = { + has_any_bad_relationship_with_root_trigger = yes + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } + } + NOR = { + house = { has_house_modifier = hold_court_8140_house_modifier } + any_owned_story = { type = story_cycle_pet_dog } + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = dog_story_modifier + has_character_modifier = cat_story_modifier + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + NOR = { + has_any_bad_relationship_with_root_trigger = yes + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } + } + save_scope_as = huntmaster + court_event_character_flag_effect = yes + } + save_scope_as = pup_house_ruler + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Invest in the kennel + name = hold_court.8140.a + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= massive_treasury_or_gold_value + } + } + remove_treasury_or_gold = major_treasury_or_gold_value + house = { + add_house_modifier = { + modifier = hold_court_8140_house_modifier + years = 30 + } + custom_tooltip = hold_court.8140.a.tt + every_house_member = { + limit = { + is_ai = no + is_landed_or_landless_administrative = yes + this != root + } + trigger_event = hold_court.8141 + } + set_variable = { + name = hold_court_8140_pup_founder + value = root + } + } + scope:huntmaster = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + progress_towards_friend_effect = { + REASON = friend_invested_in_kennel + CHARACTER = root + OPINION = 0 + } + } + start_dog_story_cycle_effect = yes + change_current_court_grandeur = medium_court_grandeur_gain + stress_impact = { + lifestyle_hunter = minor_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_greed = -0.5 + ai_boldness = 1 + ai_energy = 2 + } + modifier = { #Weight up. + add = 30 + has_trait = lifestyle_hunter + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Just take the pup + name = hold_court.8140.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= medium_gold_value + } + } + remove_short_term_gold = minor_gold_value + start_dog_story_cycle_effect = yes + scope:huntmaster = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + stress_impact = { + callous = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -0.25 + ai_energy = 1 + } + modifier = { #Weight up. + add = 15 + has_trait = lifestyle_hunter + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Cat's are better tho + name = hold_court.8140.c + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= medium_gold_value + } + } + remove_short_term_gold = minor_gold_value + start_cat_story_cycle_effect = yes + scope:huntmaster = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -15 + } + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_dogs_suck + OPINION = 0 + } + } + if = { + limit = { + any_vassal_or_below = { + any_owned_story = { type = story_cycle_pet_cat } + } + } + every_vassal_or_below = { + limit = { + any_owned_story = { type = story_cycle_pet_cat } + } + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + } + stress_impact = { + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = -0.25 + ai_energy = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + } + } + + option = { # Refuse + name = hold_court.8140.d + scope:huntmaster = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + change_current_court_grandeur = minor_court_grandeur_loss + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -2 + ai_energy = -2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + after = { + scope:huntmaster = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.8141 = { # Ping for non-AI house members + type = character_event + title = hold_court.8140.t + desc = hold_court.8141.desc + theme = realm + override_background = { reference = throne_room } + left_portrait = { + character = scope:pup_house_ruler + } + right_portrait = { + character = scope:huntmaster + animation = admiration + } + + option = { # Yay puppos + name = hold_court.8141.a + show_as_tooltip = { + house = { + add_house_modifier = { + modifier = hold_court_8140_house_modifier + years = 30 + } + custom_tooltip = hold_court.8140.a.tt + } + } + } +} + +hold_court.8142 = { # Event on puppy adoption + type = character_event + title = hold_court.8142.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + house ?= { has_variable = hold_court_8140_pup_founder } + } + desc = hold_court.8142.desc + } + desc = hold_court.8142.desc_alternative + } + } + theme = realm + override_background = { reference = throne_room } + left_portrait = { + character = scope:pup_house_ruler + animation = happiness + } + + immediate = { + if = { + limit = { + house ?= { has_variable = hold_court_8140_pup_founder } + } + house.var:hold_court_8140_pup_founder = { save_scope_as = pup_house_ruler } + } + else = { + save_scope_as = pup_house_ruler + } + } + + option = { # Accept + name = hold_court.8142.a + start_dog_story_cycle_effect = yes + } + + option = { # Change mind + name = hold_court.8142.b + add_gold = minor_gold_value + } +} + +################################################## +# Contractual Compromise +# by Joe Parkin +# 8150 +################################################## + +scripted_trigger hold_court_8150_faction_trigger = { + exists = yes + NOT = { exists = faction_war } + faction_leader ?= { + has_court_event_flag = no + is_available_ai_adult = yes + is_vassal_of = root + government_has_flag = government_is_feudal + OR = { + vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes + vassal_contract_obligation_level_can_be_decreased = feudal_government_levies + } + } + OR = { + faction_is_type = independence_faction + faction_is_type = liberty_faction + faction_is_type = claimant_faction + } +} + +scripted_effect hold_court_8150_obligation_effect = { + hidden_effect = { + random_list = { + 50 = { + trigger = { vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes } + vassal_contract_decrease_obligation_level = feudal_government_taxes + } + 50 = { + trigger = { vassal_contract_obligation_level_can_be_decreased = feudal_government_levies } + vassal_contract_decrease_obligation_level = feudal_government_levies + } + } + } + add_character_flag = { + flag = joining_faction_block + years = 5 + } +} + +# Leader of a faction offers you an out +hold_court.8150 = { + type = court_event + title = hold_court.8150.t + desc = { + desc = hold_court.8150.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:target_faction = { + any_faction_member = { count = 1 } + } + } + desc = hold_court.8150.desc.alone + } + triggered_desc = { + trigger = { + scope:target_faction = { + any_faction_member = { count <= 3 } + } + } + desc = hold_court.8150.desc.few + } + desc = hold_court.8150.desc.group + } + desc = hold_court.8150.desc.body + first_valid = { + triggered_desc = { + trigger = { + scope:target_faction = { faction_is_type = independence_faction } + } + desc = hold_court.8150.desc.independence + } + triggered_desc = { + trigger = { + scope:target_faction = { faction_is_type = liberty_faction } + } + desc = hold_court.8150.desc.liberty + } + triggered_desc = { + trigger = { + scope:target_faction = { faction_is_type = claimant_faction } + exists = scope:target_faction.special_character + scope:target_faction.faction_leader = scope:target_faction.special_character + } + desc = hold_court.8150.desc.claimant_self + } + triggered_desc = { + trigger = { + scope:target_faction = { faction_is_type = claimant_faction } + } + desc = hold_court.8150.desc.claimant + } + } + desc = hold_court.8150.desc.outro + } + theme = realm + court_scene = { + button_position_character = scope:target_faction.faction_leader + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:target_faction.faction_leader = { + group = petitioners_group + animation = disapproval + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_targeting_faction = { hold_court_8150_faction_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + any_targeting_faction = { + hold_court_8150_faction_trigger = yes + any_faction_member = { count >= 5 } + } + } + modifier = { + factor = 2 + any_targeting_faction = { + hold_court_8150_faction_trigger = yes + faction_power >= faction_power_threshold + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + ordered_targeting_faction = { + limit = { hold_court_8150_faction_trigger = yes } + order_by = faction_power + save_scope_as = target_faction + faction_leader = { + court_event_character_flag_effect = yes + save_scope_as = targeted_factions_leader #Saving in order to be able to clear the flag. + } + } + if = { + limit = { + any_held_title = { + count > 1 + title_tier = county + is_landless_type_title = no + } + } + ordered_held_title = { + title_tier = county + limit = { + this != root.capital_county + is_landless_type_title = no + } + order_by = { + value = 0 + subtract = title_province.combined_building_level + } + save_scope_as = bribe_county + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Accept + name = hold_court.8150.a + change_current_court_grandeur = medium_court_grandeur_loss + scope:target_faction = { + if = { # Split effects for nicer tooltips + limit = { + any_faction_member = { count = 1 } + } + faction_leader = { + custom_tooltip = hold_court.8150.a.tt_single_all + hold_court_8150_obligation_effect = yes + } + } + else = { + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_feudal_intro + limit = { government_has_flag = government_is_feudal } + custom_tooltip = hold_court.8150.a.tt_shared + hold_court_8150_obligation_effect = yes + } + } + destroy_faction = yes + } + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Arrest + name = hold_court.8150.b + imprison_character_effect = { + TARGET = scope:target_faction.faction_leader + IMPRISONER = root + } + scope:target_faction = { + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_intro + limit = { + this != scope:target_faction.faction_leader + } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + } + if = { + limit = { + any_faction_member = { count = 1 } + } + show_as_tooltip = { destroy_faction = yes } + } + } + add_dread = minor_dread_gain + stress_impact = { + just = medium_stress_impact_gain + patient = medium_stress_impact_gain + shy = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = patient + } + modifier = { #Weight down for stress. + add = -15 + has_trait = shy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = forgiving + } + } + } + + option = { # Bribe + name = hold_court.8150.c + trigger = { + NOT = { + scope:target_faction.faction_leader = { has_relation_rival = root } + } + } + random_list = { + 40 = { + desc = hold_court.8150.d.tt_accept + send_interface_toast = { + title = hold_court.8150.c.tt_success + left_icon = scope:target_faction.faction_leader + if = { + limit = { exists = scope:bribe_county } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:bribe_county = { + change_title_holder = { + holder = scope:target_faction.faction_leader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + else = { + pay_short_term_gold = { + target = scope:target_faction.faction_leader + gold = root.major_gold_value + } + } + scope:target_faction = { + faction_leader = { + custom_tooltip = hold_court.8150.a.tt_single_cooldown + add_character_flag = { + flag = joining_faction_block + years = 5 + } + } + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_intro + limit = { + this != scope:target_faction.faction_leader + } + add_opinion = { + target = scope:target_faction.faction_leader + modifier = angry_opinion + opinion = -20 + } + } + destroy_faction = yes + } + } + modifier = { + factor = 10 + has_trait = deceitful + } + modifier = { + factor = 10 + has_trait = greedy + } + modifier = { + factor = 10 + has_trait = fickle + } + } + 60 = { + desc = hold_court.8150.d.tt_reject + send_interface_toast = { + title = hold_court.8150.c.tt_failure + left_icon = scope:target_faction.faction_leader + scope:target_faction = { + add_faction_discontent = 15 + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_intro + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -15 + } + } + } + } + modifier = { + factor = 10 + has_trait = honest + } + modifier = { + factor = 10 + has_trait = stubborn + } + modifier = { + factor = 20 + scope:target_faction.faction_leader = scope:target_faction.special_character + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = -0.5 + ai_rationality = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + } + } + + option = { # Convince + name = hold_court.8150.d + duel = { + skill = diplomacy + target = scope:target_faction.faction_leader + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + desc = hold_court.8150.d.tt_accept + send_interface_toast = { + title = hold_court.8150.d.tt_accept + left_icon = scope:target_faction.faction_leader + add_prestige = medium_prestige_gain + scope:target_faction = { + faction_leader = { + custom_tooltip = hold_court.8150.a.tt_single_cooldown + add_character_flag = { + flag = joining_faction_block + years = 5 + } + } + every_faction_member = { + custom = hold_court.8150.a.tt_multiple_intro + limit = { + this != scope:target_faction.faction_leader + } + add_opinion = { + target = scope:target_faction.faction_leader + modifier = disappointed_opinion + opinion = -10 + } + } + destroy_faction = yes + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = hold_court.8150.d.tt_reject + send_interface_toast = { + title = hold_court.8150.d.tt_reject + left_icon = scope:target_faction.faction_leader + scope:target_faction = { add_faction_discontent = 10 } + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + } + } + + option = { # Refuse + name = hold_court.8150.e + add_prestige = medium_prestige_loss + scope:target_faction = { add_faction_discontent = 5 } + stress_impact = { + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = paranoid + } + } + } + + after = { + scope:targeted_factions_leader = { clear_court_event_participation = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Public Accusation +# by Joe Parkin +# 8160 +################################################## + +# Is the scheme a valid court scheme? +scripted_trigger hold_court_8160_valid_court_scheme_trigger = { + exists = scheme_target_character.liege + OR = { # Victim and plotter share same court + scheme_owner = scheme_target_character.liege + scheme_owner = { is_vassal_or_below_of = prev.scheme_target_character.liege } + scheme_owner = { is_courtier_of = prev.scheme_target_character.liege } + } + NOR = { + scheme_owner = root + scheme_target_character = root + } +} + +scripted_trigger hold_court_8160_valid_plotter_trigger = { + this != root + is_available_ai_adult = yes + exists = scope:scheme_target_scope + trigger_if = { + limit = { exists = scope:scheme_target_scope } + NOR = { + this = scope:scheme_target_scope # victim + has_friendly_relationship_trigger = { CHARACTER = scope:scheme_target_scope } # victim + } + can_start_scheme = { + type = murder + target_character = scope:scheme_target_scope # victim + } + } +} + +# Is the scheme a valid murder/abduct scheme? +scripted_trigger hold_court_8160_valid_hostile_scheme_trigger = { + AND = { + hold_court_8160_valid_court_scheme_trigger = yes + OR = { + scheme_type = murder + scheme_type = abduct + } + } + scheme_target_character = { + save_temporary_scope_as = scheme_target_scope + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } +} + +# Is the character a valid advocate of the victim? +scripted_trigger hold_court_8160_valid_concerned_trigger = { + this != root + is_available_ai_adult = yes + top_liege = prev.top_liege # victim + NOT = { + is_scheming_against = { target = prev } # victim + } +} + +# Is the character already targeted by a valid scheme? +scripted_trigger hold_court_8160_current_hostile_target_trigger = { + this != root + has_court_event_flag = no + is_available_ai = yes + any_targeting_scheme = { hold_court_8160_valid_hostile_scheme_trigger = yes } + trigger_if = { # if target is a child, they have a parent or family member to advocate + limit = { is_adult = no } + OR = { + any_parent = { hold_court_8160_valid_concerned_trigger = yes } + any_close_family_member = { hold_court_8160_valid_concerned_trigger = yes } + } + } +} + +# Is the character, their spouse, or a family member, targeted? +scripted_trigger hold_court_8160_valid_existing_hostile_trigger = { + this != root + OR = { + hold_court_8160_current_hostile_target_trigger = yes + AND = { + is_married = yes + primary_spouse = { + top_liege = prev.top_liege + hold_court_8160_current_hostile_target_trigger = yes + } + } + any_close_family_member = { + exists = yes + OR = { + is_vassal_or_below_of = prev.liege # victim.root + is_courtier_of = prev.liege # victim.root + } + hold_court_8160_current_hostile_target_trigger = yes + } + } +} + +scripted_effect hold_court_8160_save_create_scheme_effect = { + if = { + limit = { + any_targeting_scheme = { hold_court_8160_valid_hostile_scheme_trigger = yes } + } + random_targeting_scheme = { + limit = { hold_court_8160_valid_hostile_scheme_trigger = yes } + save_scope_as = victim_scheme + scheme_target_character = { save_scope_as = victim } + scheme_owner = { save_scope_as = debug_scheme_owner } + } + } + else = { + save_temporary_scope_as = scheme_target_scope + save_scope_as = victim + liege = { + if = { + limit = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + } + random_vassal_or_below = { + limit = { hold_court_8160_valid_plotter_trigger = yes } + save_scope_as = debug_scheme_owner + start_scheme = { + type = murder + target_character = scope:victim + } + } + } + else = { + random_courtier = { + limit = { hold_court_8160_valid_plotter_trigger = yes } + save_scope_as = debug_scheme_owner + start_scheme = { + type = murder + target_character = scope:victim + } + } + } + } + random_targeting_scheme = { + limit = { scheme_owner = scope:debug_scheme_owner } + save_scope_as = victim_scheme + } + } + scope:victim = { + court_event_character_flag_effect = yes + } +} + +# Choose who is the target of the scheme +scripted_effect hold_court_8160_vassal_picker_scheme_effect = { + hidden_effect = { + random_list = { + 100 = { + modifier = { + factor = 100 + hold_court_8160_current_hostile_target_trigger = yes + } + hold_court_8160_save_create_scheme_effect = yes + } + 50 = { + trigger = { is_married = yes } + modifier = { + factor = 100 + primary_spouse = { hold_court_8160_current_hostile_target_trigger = yes } + } + primary_spouse = { hold_court_8160_save_create_scheme_effect = yes } + } + 50 = { + trigger = { + any_close_family_member = { count = 1 } + } + modifier = { + factor = 100 + any_close_family_member = { hold_court_8160_current_hostile_target_trigger = yes } + } + random_close_family_member = { + limit = { hold_court_8160_current_hostile_target_trigger = yes } + alternative_limit = { always = yes } + hold_court_8160_save_create_scheme_effect = yes + } + } + } + } +} + +scripted_effect hold_court_8160_imprison_effect = { + rightfully_imprison_character_effect = { + TARGET = scope:accused + IMPRISONER = root + } + hidden_effect = { + scope:accused = { + if = { + limit = { + exists = scope:victim.primary_spouse + scope:victim_scheme = { scheme_type = seduce } + this != scope:victim.primary_spouse + } + add_opinion = { + modifier = angry_opinion + target = scope:victim.primary_spouse + opinion = -20 + } + } + else = { + add_opinion = { + modifier = angry_opinion + target = scope:victim + opinion = -20 + } + } + if = { + limit = { exists = scope:concerned } + add_opinion = { + modifier = angry_opinion + target = scope:concerned + opinion = -20 + } + } + } + } + scope:victim = { + if = { + limit = { + exists = primary_spouse + scope:victim_scheme = { scheme_type = seduce } + scope:accused != scope:victim.primary_spouse + } + primary_spouse = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + else = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } +} + +scripted_trigger hold_court_8160_accused_trigger = { + this != root + is_available_ai_adult = yes + NOR = { + this = scope:victim + has_friendly_relationship_trigger = { CHARACTER = scope:victim } + } + can_start_scheme = { + type = murder + target_character = scope:victim + } +} + +# Target of a scheme wants you to punish the schemer - murder/abduct version +hold_court.8160 = { + type = court_event + title = hold_court.8160.t + desc = { + # Who is coming to the throne? + first_valid = { + triggered_desc = { # Child with family + trigger = { + scope:victim = { is_adult = no } + } + desc = hold_court.8160.desc.intro_child + } + triggered_desc = { # Spouse + trigger = { exists = scope:concerned } + desc = hold_court.8160.desc.intro_spouse + } + desc = hold_court.8160.desc.intro_alone # fallback/default + } + first_valid = { + triggered_desc = { # Spouse + trigger = { exists = scope:concerned } + desc = hold_court.8160.desc.intro_other + } + desc = hold_court.8160.desc.intro_me + } + # Who is accused? + first_valid = { + triggered_desc = { # Actually revealed to be involved in scheme + trigger = { + scope:accused = { is_agent_exposed_in_scheme = scope:victim_scheme } + } + desc = hold_court.8160.desc.exposed + } + desc = hold_court.8160.desc.suspicion # Speculation + } + # What is the reason for suspicion? + first_valid = { + triggered_desc = { # Nemeses + trigger = { + scope:accused = { has_relation_nemesis = scope:victim } + } + desc = hold_court.8160.desc.nemesis + } + triggered_desc = { # Rivals + trigger = { + scope:accused = { has_relation_rival = scope:victim } + } + desc = hold_court.8160.desc.rival + } + triggered_desc = { # Accused has claim on Target + trigger = { + scope:accused = { + any_claim = { holder = scope:victim } + } + } + desc = hold_court.8160.desc.my_claimant + } + triggered_desc = { # Target has claim on Accused + trigger = { + scope:accused = { + any_held_title = { + any_claimant = { this = scope:victim } + } + } + } + desc = hold_court.8160.desc.their_claimant + } + triggered_desc = { # Accused and Target covet same title + trigger = { + scope:victim = { + any_claim = { + any_claimant = { this = scope:accused } + } + } + } + desc = hold_court.8160.desc.joint_claimant + } + triggered_desc = { # Accused is a villain + trigger = { + scope:accused = { + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + } + } + } + desc = hold_court.8160.desc.intrigue + } + triggered_desc = { # Accused dislikes Target + trigger = { + scope:accused = { + opinion = { + target = scope:victim + value < 0 + } + } + } + desc = hold_court.8160.desc.their_dislike + } + triggered_desc = { # Target dislikes Accused + trigger = { + scope:accused = { + reverse_opinion = { + target = scope:victim + value < 0 + } + } + } + desc = hold_court.8160.desc.my_dislike + } + desc = hold_court.8160.desc.fallback # No good reason + } + # How many agents revealed? + desc = hold_court.8160.desc.outro + } + theme = realm + lower_right_portrait = scope:accused + court_scene = { + button_position_character = scope:concerned + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:concerned = { + group = petitioners_group + animation = worry + } + scope:victim = { + group = petitioners_group + animation = paranoia + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 5 } + + trigger = { + is_ai = no # Murder schemes are heavy for performance + OR = { + any_vassal_or_below = { + save_temporary_scope_as = scheme_target_scope + OR = { + hold_court_8160_valid_existing_hostile_trigger = yes + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } + } + any_courtier = { + save_temporary_scope_as = scheme_target_scope + OR = { + hold_court_8160_valid_existing_hostile_trigger = yes + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + every_vassal_or_below = { + limit = { hold_court_8160_valid_existing_hostile_trigger = yes } + alternative_limit = { + save_temporary_scope_as = scheme_target_scope + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } + add_to_list = victim_list + } + every_courtier = { + limit = { hold_court_8160_valid_existing_hostile_trigger = yes } + alternative_limit = { + save_temporary_scope_as = scheme_target_scope + liege = { + OR = { + any_vassal_or_below = { hold_court_8160_valid_plotter_trigger = yes } + any_courtier = { hold_court_8160_valid_plotter_trigger = yes } + } + } + } + add_to_list = victim_list + } + random_in_list = { + list = victim_list + limit = { hold_court_8160_current_hostile_target_trigger = yes } + alternative_limit = { + is_married = yes + primary_spouse = { + top_liege = prev.top_liege + hold_court_8160_current_hostile_target_trigger = yes + } + } + alternative_limit = { + any_close_family_member = { + exists = yes + OR = { + is_vassal_or_below_of = prev.liege # victim.root + is_courtier_of = prev.liege # victim.root + } + hold_court_8160_current_hostile_target_trigger = yes + } + } + alternative_limit = { is_vassal_of = root } + alternative_limit = { is_courtier_of = root } + alternative_limit = { always = yes } + weight = { + modifier = { + factor = 50 + has_trait = paranoid + } + modifier = { + factor = 25 + has_trait = arrogant + } + } + hold_court_8160_vassal_picker_scheme_effect = yes + } + if = { # Find actual scheme owner if revealed + limit = { + exists = scope:victim_scheme + scope:victim_scheme.scheme_owner = { is_agent_exposed_in_scheme = scope:victim_scheme } # scheme owner is known by target + } + scope:victim_scheme.scheme_owner = { + save_scope_as = accused + court_event_character_flag_effect = yes + } + } + else = { # Else find a suspect + every_vassal_or_below = { + limit = { hold_court_8160_accused_trigger = yes } + add_to_list = accused_list + } + every_courtier = { + limit = { hold_court_8160_accused_trigger = yes } + add_to_list = accused_list + } + random_in_list = { + list = accused_list + limit = { is_vassal_of = root } + alternative_limit = { is_courtier_of = root } + alternative_limit = { always = yes } + weight = { + base = 1 + modifier = { # Nemeses + add = 100 + has_relation_nemesis = scope:victim + } + modifier = { # Rivals + add = 50 + has_relation_rival = scope:victim + } + modifier = { # Accused has claim on Target + add = 100 + any_claim = { holder = scope:victim } + } + modifier = { # Target has claim on Accused + add = 100 + any_held_title = { + any_claimant = { this = scope:victim } + } + } + modifier = { # Accused and Target covet same title + add = 100 + any_claim = { + any_claimant = { this = scope:victim } + } + } + modifier = { # Accused is a villain + add = 100 + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + } + } + modifier = { # Accused dislikes Target + add = 25 + opinion = { + target = scope:victim + value < 0 + } + } + modifier = { # Target dislikes Accused + add = 25 + reverse_opinion = { + target = scope:victim + value < 0 + } + } + } + save_scope_as = accused + } + } + # Save an advocate if necessary/relevant + scope:victim = { + if = { + limit = { is_adult = no } + if = { + limit = { + OR = { + faith_dominant_gender_female_or_equal = yes + father = { hold_court_8160_valid_concerned_trigger = no } + } + mother ?= { hold_court_8160_valid_concerned_trigger = yes } + } + mother = { save_scope_as = concerned } + } + else_if = { + limit = { + OR = { + faith_dominant_gender_male_or_equal = yes + mother = { hold_court_8160_valid_concerned_trigger = no } + } + father ?= { hold_court_8160_valid_concerned_trigger = yes } + } + father = { save_scope_as = concerned } + } + else = { + ordered_close_family_member = { + limit = { hold_court_8160_valid_concerned_trigger = yes } + order_by = age + save_scope_as = concerned + } + } + } + else_if = { + limit = { + is_married = yes + primary_spouse = { hold_court_8160_valid_concerned_trigger = yes } + } + primary_spouse = { save_scope_as = concerned } + } + else_if = { + limit = { + NOT = { is_vassal_of = root } + any_close_family_member = { hold_court_8160_valid_concerned_trigger = yes } + } + random_close_family_member = { + limit = { hold_court_8160_valid_concerned_trigger = yes } + save_scope_as = concerned + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + court_event_character_flag_effect = yes + } + } + } + if = { + limit = { exists = scope:concerned } + add_character_flag = { + flag = concerned_exists + years = 1 + } + } + # Save titles for motives localization + scope:accused = { + if = { + limit = { + any_claim = { holder = scope:victim } + } + ordered_claim = { + limit = { holder = scope:victim } + order_by = tier + save_scope_as = relevant_title + } + } + else_if = { + limit = { + any_held_title = { + any_claimant = { this = scope:victim } + } + } + ordered_held_title = { + limit = { + any_claimant = { this = scope:victim } + } + order_by = tier + save_scope_as = relevant_title + } + } + else_if = { + limit = { + any_claim = { + any_claimant = { this = scope:victim } + } + } + ordered_claim = { + limit = { + any_claimant = { this = scope:victim } + } + order_by = tier + save_scope_as = relevant_title + } + } + } + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + has_court_event_flag = no + is_available_ai_adult = yes + NOR = { + this = scope:victim + this = scope:accused + AND = { + exists = scope:concerned + this = scope:concerned + } + } + } + } + random_court_position_holder = { + type = executioner_court_position + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + NOR = { + this = scope:victim + this = scope:accused + AND = { + exists = scope:concerned + this = scope:concerned + } + } + } + save_scope_as = executioner + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Arrest + name = hold_court.8160.a + if = { + limit = { + scope:victim_scheme = { scheme_type = murder } + } + add_opinion = { + modifier = attempted_murder_opinion + target = scope:accused + } + } + else = { + add_opinion = { + modifier = attempted_abduction_opinion + target = scope:accused + } + } + scope:accused = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + hidden_effect = { + add_opinion = { + modifier = angry_opinion + target = scope:victim + opinion = -20 + } + if = { + limit = { exists = scope:concerned } + add_opinion = { + modifier = angry_opinion + target = scope:concerned + opinion = -20 + } + } + } + } + scope:victim = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { scope:accused = scope:debug_scheme_owner } + add_tyranny = minor_tyranny_gain + } + else = { + stress_impact = { + just = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -2 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -30 + scope:accused = scope:debug_scheme_owner + has_trait = just + } + } + } + + option = { # Torture + name = { + trigger = { has_trait = torturer } + text = hold_court.8160.b.torturer + } + name = { + trigger = { + exists = scope:executioner + } + text = hold_court.8160.b.executioner + } + trigger = { + OR = { + exists = scope:executioner + has_trait = torturer + } + } + scope:accused = { + random_list = { + 75 = { + modifier = { + factor = 2 + has_trait = craven + } + modifier = { + factor = 2 + has_trait = fickle + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 2 + is_agent_exposed_in_scheme = scope:victim_scheme + } + desc = hold_court.8160.b.tt_confession + root = { + send_interface_toast = { + title = hold_court.8160.b.tt_confession + left_icon = scope:accused + right_icon = scope:victim + hold_court_8160_imprison_effect = yes + } + } + } + 25 = { + modifier = { + factor = 2 + has_trait = stubborn + } + modifier = { + factor = 2 + has_trait = brave + } + modifier = { + factor = 2 + has_trait = just + } + modifier = { + factor = 2 + AND = { + NOT = { is_agent_exposed_in_scheme = scope:victim_scheme } + has_trait = honest + } + } + modifier = { + factor = 2 + AND = { + is_agent_exposed_in_scheme = scope:victim_scheme + has_trait = deceitful + } + } + desc = hold_court.8160.b.tt_silence + root = { + send_interface_toast = { + title = hold_court.8160.b.tt_silence + left_icon = scope:accused + right_icon = scope:victim + } + } + } + } + add_opinion = { + modifier = tortured_me + target = root + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = tortured_me + target = scope:executioner + } + } + } + if = { + limit = { + is_married = yes + NOR = { + primary_spouse = { + this = root + this = scope:victim + AND = { + exists = scope:concerned + this = scope:concerned + } + } + } + } + primary_spouse = { + add_opinion = { + modifier = tortured_family_member + target = root + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = tortured_family_member + target = scope:executioner + } + } + } + } + } + every_close_family_member = { + limit = { + NOR = { + this = root + this = scope:victim + AND = { + exists = scope:concerned + this = scope:concerned + } + } + } + add_opinion = { + modifier = tortured_family_member + target = root + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = tortured_family_member + target = scope:executioner + } + } + } + } + } + scope:victim = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:executioner + opinion = 15 + } + } + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + if = { + limit = { exists = scope:executioner } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:executioner + opinion = 15 + } + } + } + } + } + + if = { + limit = { + scope:victim_scheme.scheme_owner = { is_agent_exposed_in_scheme = scope:victim_scheme } + } + add_tyranny = medium_tyranny_gain + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } + else = { + add_tyranny = major_tyranny_gain + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = just + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + option = { # Attempt to find the truth + name = hold_court.8160.c + show_as_tooltip = { + duel = { + skill = intrigue + target = scope:accused + 1 = { + show_chance = no + desc = hold_court.8160.c.tt_success + hold_court_8160_imprison_effect = yes + } + 1 = { + show_chance = no + desc = hold_court.8160.c.tt_failure + scope:victim = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + } + } + hidden_effect = { + duel = { + skill = intrigue + target = scope:accused + 8 = { + trigger = { + scope:victim_scheme = { + any_scheme_agent_character = { this = scope:accused } + } + } + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = hold_court.8160.c.tt_success + left_icon = scope:accused + right_icon = scope:victim + hold_court_8160_imprison_effect = yes + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -9 + } + send_interface_toast = { + title = hold_court.8160.c.tt_failure + left_icon = scope:accused + right_icon = scope:victim + add_prestige = medium_prestige_loss + scope:victim = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } + } + } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_zeal = -1 + ai_energy = -1 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -30 + has_trait = lazy + } + } + } + + option = { # Dismiss + name = { + trigger = { + scope:victim_scheme = { + any_scheme_agent_character = { this = root } + } + } + text = hold_court.8160.d.involved + } + name = { + trigger = { + scope:victim_scheme.scheme_owner = { is_agent_exposed_in_scheme = scope:victim_scheme } + } + text = hold_court.8160.d.proof + } + name = { + trigger = { always = yes } + text = hold_court.8160.d.fallback + } + scope:victim_scheme = { + if = { + limit = { + any_scheme_agent_character = { this = root } + } + add_scheme_progress = scheme_progress_gain + } + } + scope:accused = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + scope:victim = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + scope:victim_scheme.scheme_owner = { is_agent_exposed_in_scheme = scope:victim_scheme } + } + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + } + else = { + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.5 + ai_energy = -2 + } + } + } + + after = { + if = { + limit = { has_character_flag = concerned_exists } + remove_character_flag = concerned_exists + } + scope:victim = { + clear_court_event_participation = yes + } + scope:accused = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:concerned } + scope:concerned = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:executioner } + scope:executioner = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Personal Matter +# by Joe Parkin +# 8161 +################################################## + +# Is the character able to be targeted by a valid scheme? +scripted_trigger hold_court_8161_valid_seduce_target_trigger = { + this != root + age < 50 + has_court_event_flag = no + is_available_ai_adult = yes + exists = liege + save_temporary_scope_as = hold_court_8161_victim + liege = { + any_vassal_or_below = { hold_court_8161_valid_seduce_plotter_trigger = yes } + } +} + +# Is the character able to start a valid scheme? +scripted_trigger hold_court_8161_valid_seduce_plotter_trigger = { + NOR = { + this = root + is_spouse_of = root + } + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:hold_court_8161_victim } # victim + might_cheat_on_every_partner_trigger = yes + can_start_scheme = { + type = seduce + target_character = scope:hold_court_8161_victim # victim + } + exists = scope:hold_court_8161_victim.primary_spouse # to avoid errors + NOR = { + has_trait = chaste + has_trait = shy + has_trait = craven + has_trait = content + has_trait = celibate + } + NOR = { + this = scope:hold_court_8161_victim # victim + this = scope:hold_court_8161_victim.primary_spouse # victim's spouse + has_friendly_relationship_trigger = { CHARACTER = scope:hold_court_8161_victim.primary_spouse } # victim's spouse + } +} + +# Is the scheme a valid seduction scheme? +scripted_trigger hold_court_8161_valid_seduce_scheme_trigger = { + hold_court_8160_valid_court_scheme_trigger = yes + scheme_type = seduce + scheme_success_chance >= 30 +} + +# Is the character a valid event target? +scripted_trigger hold_court_8161_valid_target_vassal_trigger = { + NOR = { + this = root + is_spouse_of = root + } + has_court_event_flag = no + is_available_ai_adult = yes + is_married = yes + top_liege = primary_spouse.top_liege + trigger_if = { + limit = { + primary_spouse = { is_male = yes } + } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + trigger_else = { + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + OR = { + hold_court_8161_valid_seduce_target_trigger = yes + primary_spouse = { hold_court_8161_valid_seduce_target_trigger = yes } + } +} + +scripted_trigger hold_court_8161_existing_seduction_target_trigger = { + this != root + OR = { + any_targeting_scheme = { hold_court_8161_valid_seduce_scheme_trigger = yes } + primary_spouse = { + any_targeting_scheme = { hold_court_8161_valid_seduce_scheme_trigger = yes } + } + } +} + +scripted_trigger hold_court_8161_religious_crime_trigger = { + OR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + AND = { + OR = { + AND = { + scope:victim = { is_male = yes } + scope:accused = { is_male = yes } + } + AND = { + scope:victim = { is_female = yes } + scope:accused = { is_female = yes } + } + } + NOT = { + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + } + } +} + +# Save or create a seduction scheme in the court +scripted_effect hold_court_8161_save_create_scheme_effect = { + if = { + limit = { + any_targeting_scheme = { hold_court_8161_valid_seduce_scheme_trigger = yes } + } + random_targeting_scheme = { + limit = { hold_court_8161_valid_seduce_scheme_trigger = yes } + save_scope_as = victim_scheme + scheme_target_character = { save_scope_as = victim } + scheme_owner = { save_scope_as = debug_scheme_owner } + } + } + else = { + save_scope_as = victim + liege = { + random_vassal_or_below = { + limit = { hold_court_8161_valid_seduce_plotter_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 2 + has_trait = lustful + } + modifier = { + factor = 4 + has_trait = honest + } + modifier = { + factor = 2 + intrigue < average_skill_rating + } + modifier = { + factor = 4 + has_trait = contrite + } + modifier = { + factor = 4 + has_trait = confider + } + modifier = { + factor = 2 + has_trait = trusting + } + } + save_scope_as = debug_scheme_owner + start_scheme = { + type = seduce + target_character = scope:victim + } + } + } + random_targeting_scheme = { + limit = { scheme_owner = scope:debug_scheme_owner } + save_scope_as = victim_scheme + } + } + scope:victim = { + court_event_character_flag_effect = yes + primary_spouse = { + court_event_character_flag_effect = yes + } + } +} + +# Choose who is the target of the scheme +scripted_effect hold_court_8161_vassal_spouse_scheme_effect = { + hidden_effect = { + random_list = { + 50 = { + trigger = { hold_court_8161_valid_seduce_target_trigger = yes } + hold_court_8161_save_create_scheme_effect = yes + } + 100 = { + trigger = { + primary_spouse = { hold_court_8161_valid_seduce_target_trigger = yes } + } + primary_spouse = { hold_court_8161_save_create_scheme_effect = yes } + } + } + } +} + +# Spouse of the target of a scheme wants you to punish the schemer - seduction version +hold_court.8161 = { + type = court_event + title = hold_court.8161.t + desc = { + desc = hold_court.8161.desc.intro + first_valid = { + triggered_desc = { # Nemeses + trigger = { + scope:accused = { has_relation_nemesis = scope:victim.primary_spouse } + } + desc = hold_court.8161.desc.nemesis + } + triggered_desc = { # Rivals + trigger = { + scope:accused = { has_relation_rival = scope:victim.primary_spouse } + } + desc = hold_court.8161.desc.rival + } + triggered_desc = { # Quarry + trigger = { + scope:victim = { + OR = { + has_trait = beauty_good_1 + has_trait = beauty_good_2 + has_trait = beauty_good_3 + has_trait = lustful + } + } + } + desc = hold_court.8161.desc.quarry + } + triggered_desc = { # Accused dislikes Target + trigger = { + scope:accused = { + opinion = { + target = scope:victim.primary_spouse + value < 0 + } + } + } + desc = hold_court.8161.desc.their_dislike + } + triggered_desc = { # Target dislikes Accused + trigger = { + scope:accused = { + reverse_opinion = { + target = scope:victim.primary_spouse + value < 0 + } + } + } + desc = hold_court.8161.desc.my_dislike + } + triggered_desc = { # Accused is a villain + trigger = { + scope:accused = { + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + has_trait = lustful + has_trait = seducer + } + } + } + desc = hold_court.8161.desc.intrigue + } + desc = hold_court.8161.desc.fallback # No good reason + } + desc = hold_court.8161.desc.body + } + theme = realm + lower_right_portrait = scope:accused + court_scene = { + button_position_character = scope:victim.primary_spouse + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:victim.primary_spouse = { + group = petitioners_group + animation = anger + } + scope:victim = { + group = petitioners_group + animation = disapproval + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 5 } + + trigger = { + OR = { + any_courtier_or_guest = { + hold_court_8161_valid_target_vassal_trigger = yes + trigger_if = { + limit = { NOT = { exists = scope:victim } } + save_temporary_scope_as = victim + } + exists = scope:victim.primary_spouse + } + any_vassal = { + hold_court_8161_valid_target_vassal_trigger = yes + trigger_if = { + limit = { NOT = { exists = scope:victim } } + save_temporary_scope_as = victim + } + exists = scope:victim.primary_spouse + } + } + OR = { + any_vassal_or_below = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + this = scope:victim + this = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + any_courtier_or_guest = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + this = scope:victim + this = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + random_list = { + 2 = { + trigger = { + any_courtier_or_guest = { hold_court_8161_valid_target_vassal_trigger = yes } + } + random_courtier_or_guest = { + limit = { + hold_court_8161_valid_target_vassal_trigger = yes + hold_court_8161_existing_seduction_target_trigger = yes + } + alternative_limit = { + hold_court_8161_valid_target_vassal_trigger = yes + } + weight = { + modifier = { + factor = 50 + has_trait = paranoid + } + modifier = { + factor = 25 + has_trait = arrogant + } + } + hold_court_8161_vassal_spouse_scheme_effect = yes + } + } + 2 = { + trigger = { + any_vassal_or_below = { hold_court_8161_valid_target_vassal_trigger = yes } + } + random_vassal_or_below = { + limit = { + hold_court_8161_valid_target_vassal_trigger = yes + hold_court_8161_existing_seduction_target_trigger = yes + } + alternative_limit = { + hold_court_8161_valid_target_vassal_trigger = yes + } + weight = { + modifier = { + factor = 50 + has_trait = paranoid + } + modifier = { + factor = 25 + has_trait = arrogant + } + } + hold_court_8161_vassal_spouse_scheme_effect = yes + } + } + } + hidden_effect = { + random_list = { + 50 = { + trigger = { exists = scope:debug_scheme_owner } + scope:debug_scheme_owner = { save_scope_as = accused } + } + 25 = { + trigger = { + any_vassal_or_below = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + this = scope:victim + this = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + } + random_vassal_or_below = { + limit = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + this = scope:victim + this = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + weight = { + base = 1 + modifier = { + factor = 100 + has_relation_nemesis = scope:victim.primary_spouse # Nemeses + } + modifier = { + factor = 50 + has_relation_rival = scope:victim.primary_spouse # Rivals + } + modifier = { + factor = 25 + opinion = { + target = scope:victim.primary_spouse # Accused dislikes Target + value < 0 + } + } + modifier = { + factor = 25 + reverse_opinion = { + target = scope:victim.primary_spouse # Target dislikes Accused + value < 0 + } + } + modifier = { # Accused is a villain + factor = 50 + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + has_trait = lustful + has_trait = seducer + } + } + } + save_scope_as = accused + } + } + 25 = { + trigger = { + any_courtier_or_guest = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + THIS = scope:victim + THIS = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + } + random_courtier_or_guest = { + limit = { + age < 50 + is_available_ai_adult = yes + possibly_interested_in_character_trigger = { CHARACTER = scope:victim } + can_start_scheme = { + type = seduce + target_character = scope:victim + } + exists = scope:victim.primary_spouse + NOR = { + THIS = scope:victim + THIS = scope:victim.primary_spouse + has_friendly_relationship_trigger = { CHARACTER = scope:victim.primary_spouse } + } + } + weight = { + base = 1 + modifier = { + factor = 100 + has_relation_nemesis = scope:victim.primary_spouse # Nemeses + } + modifier = { + factor = 50 + has_relation_rival = scope:victim.primary_spouse # Rivals + } + modifier = { + factor = 25 + opinion = { + target = scope:victim.primary_spouse # Accused dislikes Target + value < 0 + } + } + modifier = { + factor = 25 + reverse_opinion = { + target = scope:victim.primary_spouse # Target dislikes Accused + value < 0 + } + } + modifier = { # Accused is a villain + factor = 50 + OR = { + has_education_intrigue_trigger = yes + has_trait = deceitful + has_trait = lustful + has_trait = seducer + } + } + } + save_scope_as = accused + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Arrest + name = { + trigger = { + OR = { + AND = { + scope:victim = { is_male = yes } + scope:accused = { is_male = yes } + } + AND = { + scope:victim = { is_female = yes } + scope:accused = { is_female = yes } + } + } + NOT = { + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + } + text = hold_court.8161.a.homosexual + } + name = { + trigger = { + OR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + } + } + text = hold_court.8161.a.adultery + } + trigger = { hold_court_8161_religious_crime_trigger = yes } + if = { + limit = { + OR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + } + } + add_opinion = { + modifier = fornicator_crime + target = scope:accused + } + } + else = { + add_opinion = { + modifier = deviant_crime + target = scope:accused + } + } + scope:victim.primary_spouse = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + scope:accused = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + add_opinion = { + modifier = angry_opinion + target = scope:victim.primary_spouse + opinion = -10 + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + NOR = { + cp:councillor_court_chaplain = scope:accused + cp:councillor_court_chaplain = scope:victim + cp:councillor_court_chaplain = scope:victim.primary_spouse + } + NOR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + } + cp:councillor_court_chaplain = { + add_opinion = { + modifier = pious_opinion + target = root + opinion = 10 + } + } + } + stress_impact = { + just = medium_stress_impact_gain + cynical = medium_stress_impact_gain + deviant = medium_stress_impact_gain + lustful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_compassion = -1 + ai_zeal = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = just + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -30 + has_trait = deviant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = lustful + } + } + } + + option = { # Attempt to find truth + name = hold_court.8161.c + show_as_tooltip = { + duel = { + skill = intrigue + target = scope:accused + 1 = { + show_chance = no + desc = hold_court.8160.c.tt_success + hold_court_8160_imprison_effect = yes + } + 1 = { + show_chance = no + desc = hold_court.8160.c.tt_failure + scope:accused = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + } + } + } + hidden_effect = { + duel = { + skill = intrigue + target = scope:accused + 8 = { + trigger = { + scope:victim_scheme ?= { + any_scheme_agent_character = { this = scope:accused } + } + } + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = hold_court.8160.c.tt_success + left_icon = scope:accused + right_icon = scope:victim + hold_court_8160_imprison_effect = yes + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = hold_court.8160.c.tt_failure + left_icon = scope:accused + right_icon = scope:victim + scope:accused = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + } + } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_zeal = -1 + ai_energy = -1 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -30 + has_trait = lazy + } + } + } + + option = { # Dismiss + name = { + trigger = { + scope:victim_scheme ?= { + any_scheme_agent_character = { this = root } + } + } + text = hold_court.8161.d.involved + } + name = { + trigger = { + OR = { + AND = { + scope:victim.primary_spouse = { is_female = yes } + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + AND = { + scope:victim.primary_spouse = { is_male = yes } + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + } + text = hold_court.8161.d.permitted + } + name = { + trigger = { always = yes } + text = hold_court.8161.d.fallback + } + scope:victim_scheme ?= { + if = { + limit = { + any_scheme_agent_character = { this = root } + } + add_scheme_progress = scheme_progress_gain + } + } + scope:victim.primary_spouse = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + stress_impact = { + chaste = medium_stress_impact_gain + } + if = { + limit = { hold_court_8161_religious_crime_trigger = yes } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.5 + ai_energy = -2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = chaste + } + modifier = { #Weight down for stress. + add = -30 + hold_court_8161_religious_crime_trigger = yes + has_trait = zealous + } + } + } + + after = { + scope:victim = { + clear_court_event_participation = yes + primary_spouse = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Noble Privileges +# by Joe Parkin +# 8180 +################################################## + +# Is there a duke or higher vassal has room for a positive contract change? +scripted_trigger hold_court_8180_lord_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + primary_title.tier >= tier_duchy + government_has_flag = government_is_feudal + subject_contract_is_blocked_from_modification = no + NOT = { has_variable = hc_8180_contract_var } + NOT = { has_hook = root } + OR = { + AND = { + faith != liege.faith + vassal_contract_obligation_level_can_be_increased = religious_rights # Religious + } + AND = { + liege.culture = { has_innovation = innovation_battlements } + vassal_contract_obligation_level_can_be_increased = fortification_rights # Fortification + } + AND = { + liege.culture = { has_innovation = innovation_currency_02 } + vassal_contract_obligation_level_can_be_increased = coinage_rights # Coinage + } + AND = { + liege = { + OR = { # Only relevant if war declaration is limited + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + vassal_contract_obligation_level_can_be_increased = war_declaration_rights # War Declaration + } + vassal_contract_obligation_level_can_be_increased = council_rights # Council + AND = { + NOT = { + liege = { has_realm_law = crown_authority_0 } # Only relevant if revocation is possible + } + vassal_contract_obligation_level_can_be_increased = title_revocation_rights # Title Revocation + } + AND = { # Scutage + liege.culture = { + has_innovation = innovation_scutage + } + NOT = { vassal_contract_has_flag = has_scutage_contract } + } + AND = { # March + liege.culture = { + has_innovation = innovation_burhs + } + NOT = { vassal_contract_has_flag = has_march_contract } + } + AND = { # Palatinate + liege.culture = { + has_innovation = innovation_divine_right + } + NOT = { vassal_contract_has_flag = has_palatinate_contract } + } + } +} + +# Increase the relevant contract +scripted_effect hold_court_8180_grant_contract_effect = { + switch = { + trigger = var:hc_8180_contract_var + 1 = { # Religious + vassal_contract_set_obligation_level = { + type = religious_rights + level = 1 + } + } + 2 = { # Fortification + vassal_contract_set_obligation_level = { + type = fortification_rights + level = 1 + } + } + 3 = { # Coinage + vassal_contract_set_obligation_level = { + type = coinage_rights + level = 1 + } + } + 4 = { # War Declaration + vassal_contract_set_obligation_level = { + type = war_declaration_rights + level = 1 + } + } + 5 = { # Council Rights + vassal_contract_set_obligation_level = { + type = council_rights + level = 1 + } + } + 6 = { # Title Revocation + vassal_contract_set_obligation_level = { + type = title_revocation_rights + level = 1 + } + } + 7 = { # Scutage + vassal_contract_set_obligation_level = { + type = special_contract + level = 1 + } + } + 8 = { # March + vassal_contract_set_obligation_level = { + type = special_contract + level = 2 + } + } + 9 = { # Palatinate + vassal_contract_set_obligation_level = { + type = special_contract + level = 3 + } + } + } + hidden_effect = { set_subject_contract_modification_blocked = yes } +} + +# A vassal wants a contract buff +hold_court.8180 = { + type = court_event + title = hold_court.8180.t + desc = { + desc = hold_court.8180.desc.intro + first_valid = { # Contract Type + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 1 } + desc = hold_court.8180.desc.religious # Religious + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 2 } + desc = hold_court.8180.desc.fortification # Fortification + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 3 } + desc = hold_court.8180.desc.coinage # Coinage + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 4 } + desc = hold_court.8180.desc.war_declaration # War Declaration + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 5 } + desc = hold_court.8180.desc.council # Council + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 6 } + desc = hold_court.8180.desc.title_revocation # Title Revocation + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 7 } + desc = hold_court.8180.desc.scutage # Scutage + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 8 } + desc = hold_court.8180.desc.march # March + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 9 } + desc = hold_court.8180.desc.palatinate # Palatinate + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 10 } + desc = hold_court.8180.desc.family_entrepeneurship # Family Entrepeneurship + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 11 } + desc = hold_court.8180.desc.centralized_power # Centralized Power + } + } + first_valid = { # Context + # Religious + triggered_desc = { + trigger = { + scope:contract_lord.var:hc_8180_contract_var = 1 # Religious + scope:contract_lord.religion = root.religion + } + desc = hold_court.8180.desc.religious_heretic # Heretic + } + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 1 } # Religious + desc = hold_court.8180.desc.religious_heathen # Heathen + } + # Martial + triggered_desc = { + trigger = { + OR = { + scope:contract_lord.var:hc_8180_contract_var = 2 #Fortification + scope:contract_lord.var:hc_8180_contract_var = 8 # March + } + } + desc = hold_court.8180.desc.martial_defensive # Defensive + } + triggered_desc = { + trigger = { + scope:contract_lord.var:hc_8180_contract_var = 4 # War Declaration + scope:contract_lord.var:hc_8180_contract_var = 7 # Scutage + } + desc = hold_court.8180.desc.martial_offensive # Offensive + } + # Stewardship + triggered_desc = { + trigger = { + OR = { + scope:contract_lord.var:hc_8180_contract_var = 3 # Coinage + scope:contract_lord.var:hc_8180_contract_var = 11 # Centralized Power + } + } + desc = hold_court.8180.desc.stewardship + } + # Status + triggered_desc = { + trigger = { + OR = { + scope:contract_lord.var:hc_8180_contract_var = 5 # Council + scope:contract_lord.var:hc_8180_contract_var = 9 # Palatinate + } + } + desc = hold_court.8180.desc.status + } + # Family + triggered_desc = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 10 } #Family Entrepeneurship + desc = hold_court.8180.desc.family + } + # Other + desc = hold_court.8180.desc.fallback # General + } + } + theme = court + artifact = { + target = scope:vassal_artifact + position = lower_right_portrait + } + court_scene = { + button_position_character = scope:contract_lord + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:contract_lord = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + is_adult = yes + any_vassal = { hold_court_8180_lord_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_vassal = { + hold_court_8180_lord_trigger = yes + OR = { + has_trait = greedy + has_trait = ambitious + has_trait = shrewd + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + capital_barony = { save_scope_as = capital } + random_vassal = { + limit = { + hold_court_8180_lord_trigger = yes + primary_title.tier = tier_kingdom # Prefer Kings... + } + alternative_limit = { + hold_court_8180_lord_trigger = yes + primary_title.tier = tier_duchy # ...then Dukes. + } + weight = { + base = 1 + modifier = { + factor = 2 + NOT = { vassal_contract_obligation_level_can_be_decreased = special_contract } # No existing special contract + } + modifier = { + factor = 2 + is_powerful_vassal = yes + } + modifier = { + factor = 2 + OR = { + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + vassal_contract_obligation_level_can_be_increased = feudal_government_levies + } + } + modifier = { + factor = 2 + does_ai_vassal_in_vassal_contract_desire_obligation_change = yes + } + modifier = { + factor = 2 + has_trait = greedy + has_trait = ambitious + has_trait = shrewd + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + save_scope_as = contract_lord + court_event_character_flag_effect = yes + if = { + limit = { + any_held_title = { + count > 1 + title_tier = county + is_landless_type_title = no + } + } + ordered_held_title = { + title_tier = county + limit = { + this != holder.capital_county + de_jure_liege.holder = root + is_landless_type_title = no + } + alternative_limit = { + tier = tier_county + this != holder.capital_county + any_neighboring_county = { holder = root } + is_landless_type_title = no + } + alternative_limit = { + tier = tier_county + this != holder.capital_county + is_landless_type_title = no + } + order_by = { + value = 0 + subtract = development_level + } + save_scope_as = vassal_title + } + } + if = { + limit = { + any_character_artifact = { exists = yes } + } + ordered_character_artifact = { + order_by = artifact_rarity + save_scope_as = vassal_artifact + } + } + hidden_effect = { + random_list = { + 1 = { # Religious Rights / 1 + trigger = { + faith != liege.faith + vassal_contract_obligation_level_can_be_increased = religious_rights + } + modifier = { + factor = 2 + faith != liege.faith + } + modifier = { + factor = 2 + religion != liege.religion + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { factor = 4 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 1 + years = 20 # cooldown for this character + } + } + 1 = { # Fortification Rights / 2 + trigger = { + liege.culture = { has_innovation = innovation_battlements } + vassal_contract_obligation_level_can_be_increased = fortification_rights + } + modifier = { + factor = 2 + any_sub_realm_county = { hold_court_8010_county_trigger = yes } + } + modifier = { + factor = 2 + has_education_martial_trigger = yes + } + modifier = { + factor = 2 + has_martial_lifestyle_trait_trigger = yes + } + modifier = { factor = 2 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 2 + years = 20 # cooldown for this character + } + } + 1 = { # Coinage Rights / 3 + trigger = { + liege.culture = { has_innovation = innovation_currency_02 } + vassal_contract_obligation_level_can_be_increased = coinage_rights + } + modifier = { + factor = 2 + has_education_stewardship_trigger = yes + } + modifier = { + factor = 2 + has_stewardship_lifestyle_trait_trigger = yes + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { factor = 2 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 3 + years = 20 # cooldown for this character + } + } + 1 = { # War Declaration / 4 + trigger = { + liege = { + OR = { # Only relevant if war declaration is limited + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + vassal_contract_obligation_level_can_be_increased = war_declaration_rights + } + modifier = { + factor = 2 + has_education_martial_trigger = yes + } + modifier = { + factor = 2 + has_martial_lifestyle_trait_trigger = yes + } + modifier = { + factor = 2 + has_trait = ambitious + } + modifier = { + factor = 2 + has_trait = wrathful + } + modifier = { factor = 3 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 4 + years = 20 # cooldown for this character + } + } + 1 = { # Council Rights / 5 + trigger = { vassal_contract_obligation_level_can_be_increased = council_rights } + modifier = { + factor = 2 + has_trait = ambitious + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 2 + dynasty.dynasty_prestige_level >= liege.dynasty.dynasty_prestige_level + } + modifier = { factor = 4 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 5 + years = 20 # cooldown for this character + } + } + 1 = { # Title Revocation / 6 + trigger = { + NOT = { + liege = { has_realm_law = crown_authority_0 } + } + vassal_contract_obligation_level_can_be_increased = title_revocation_rights + } + modifier = { + factor = 2 + has_trait = paranoid + } + modifier = { + factor = 2 + has_trait = craven + } + modifier = { factor = 4 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 6 + years = 20 # cooldown for this character + } + } + 1 = { # Scutage / 7 + trigger = { + liege.culture = { + has_innovation = innovation_scutage + } + NOT = { vassal_contract_obligation_level_can_be_decreased = special_contract } # No existing special contract + } + modifier = { + factor = 2 + OR = { + has_education_martial_trigger = yes + has_martial_lifestyle_trait_trigger = yes + } + } + modifier = { factor = 3 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 7 + years = 20 # cooldown for this character + } + } + 1 = { # March / 8 + trigger = { + liege.culture = { + has_innovation = innovation_burhs + } + NOT = { vassal_contract_obligation_level_can_be_decreased = special_contract } # No existing special contract + } + modifier = { + factor = 2 + has_education_martial_trigger = yes + } + modifier = { + factor = 2 + has_martial_lifestyle_trait_trigger = yes + } + modifier = { factor = 3 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 8 + years = 20 # cooldown for this character + } + } + 1 = { # Palatinate / 9 + trigger = { + liege.culture = { + has_innovation = innovation_divine_right + } + is_powerful_vassal = yes + NOT = { vassal_contract_obligation_level_can_be_decreased = special_contract } # No existing special contract + } + modifier = { + factor = 2 + has_education_diplomacy_trigger = yes + } + modifier = { + factor = 2 + has_diplomacy_lifestyle_trait_trigger = yes + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 2 + dynasty.dynasty_prestige_level >= liege.dynasty.dynasty_prestige_level + } + modifier = { factor = 5 } # contract relative value + set_variable = { + name = hc_8180_contract_var + value = 9 + years = 20 # cooldown for this character + } + } + } + if = { # Determine whether tax or levies can be increased, and is relevant + limit = { + has_variable = hc_8180_contract_var + var:hc_8180_contract_var != 9 # Palatinate + OR = { + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + vassal_contract_obligation_level_can_be_increased = feudal_government_levies + } + } + random_list = { + 1 = { + trigger = { + var:hc_8180_contract_var != 8 # March + var:hc_8180_contract_var != 11 # Centralized Power / Support + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + } + modifier = { + factor = 10 + vassal_contract_obligation_level:feudal_government_taxes < vassal_contract_obligation_level:feudal_government_levies + } + set_variable = { + name = hc_8180_increase_var + value = 1 + } + } + 1 = { + trigger = { + var:hc_8180_contract_var != 7 # Scutage + var:hc_8180_contract_var != 10 # Family Entrepeneurship + vassal_contract_obligation_level_can_be_increased = feudal_government_levies + } + modifier = { + factor = 10 + vassal_contract_obligation_level:feudal_government_levies < vassal_contract_obligation_level:feudal_government_taxes + } + set_variable = { + name = hc_8180_increase_var + value = 2 + } + } + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Accept + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 1 } + text = hold_court.8180.a.religious + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 2 } + text = hold_court.8180.a.fortification + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 3 } + text = hold_court.8180.a.coinage + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 4 } + text = hold_court.8180.a.war_declaration + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 5 } + text = hold_court.8180.a.council + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 6 } + text = hold_court.8180.a.title_revocation + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 7 } + text = hold_court.8180.a.scutage + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 8 } + text = hold_court.8180.a.march + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 9 } + text = hold_court.8180.a.palatinate + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 10 } + text = hold_court.8180.a.family_entrepeneurship + } + name = { + trigger = { scope:contract_lord.var:hc_8180_contract_var = 11 } + text = hold_court.8180.a.centralized_power + } + if = { + limit = { + can_add_hook = { + target = scope:contract_lord + type = indebted_hook + } + } + add_hook = { + target = scope:contract_lord + type = indebted_hook + } + } + scope:contract_lord = { + hold_court_8180_grant_contract_effect = yes + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + stress_impact = { + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_compassion = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + option = { # Demand payment + name = hold_court.8180.b + trigger = { + scope:contract_lord = { short_term_gold >= root.medium_gold_value } + } + random_list = { + 2 = { + desc = hold_court.8180.b.tt.success + modifier = { + factor = 2 + scope:contract_lord = { has_trait = content } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = generous } + } + modifier = { factor = hold_court_8180_contract_value } # based on relative worth of contract + send_interface_toast = { + title = hold_court.8180.b.tt.success + scope:contract_lord = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + hold_court_8180_grant_contract_effect = yes + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -5 + } + } + } + } + 7 = { + desc = hold_court.8180.b.tt.failure + modifier = { + factor = 2 + scope:contract_lord = { has_trait = greedy } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = ambitious } + } + send_interface_toast = { + title = hold_court.8180.b.tt.failure + scope:contract_lord = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = -0.25 + ai_rationality = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Demand artifact + name = hold_court.8180.c + trigger = { exists = scope:vassal_artifact } + random_list = { + 2 = { + desc = hold_court.8180.c.tt.success + modifier = { + factor = 2 + scope:contract_lord = { has_trait = content } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = generous } + } + modifier = { factor = hold_court_8180_contract_value } # based on relative worth of contract + send_interface_toast = { + title = hold_court.8180.c.tt.success + scope:contract_lord = { + scope:vassal_artifact = { + set_owner = { target = root } + } + hold_court_8180_grant_contract_effect = yes + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -5 + } + } + } + } + 7 = { + desc = hold_court.8180.b.tt.failure + modifier = { + factor = 2 + scope:contract_lord = { has_trait = greedy } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = ambitious } + } + modifier = { + factor = scope:vassal_artifact.var:quality # half of artifact quality + trigger = { + scope:vassal_artifact = { has_variable = quality } + } + } + send_interface_toast = { + title = hold_court.8180.b.tt.failure + scope:contract_lord = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + } + } + } + stress_impact = { + generous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = -0.25 + ai_rationality = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Demand title + name = hold_court.8180.d + trigger = { exists = scope:vassal_title } + random_list = { + 2 = { + desc = hold_court.8180.d.tt.success + modifier = { + factor = 2 + scope:contract_lord = { has_trait = content } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = generous } + } + modifier = { factor = hold_court_8180_contract_value } # based on relative worth of contract + send_interface_toast = { + title = hold_court.8180.d.tt.success + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal_title = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:contract_lord = { hold_court_8180_grant_contract_effect = yes } + } + } + 7 = { + desc = hold_court.8180.b.tt.failure + modifier = { + factor = 2 + scope:contract_lord = { has_trait = greedy } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = ambitious } + } + modifier = { + factor = 2 + OR = { + scope:vassal_title.de_jure_liege.holder = root + scope:contract_lord.primary_title = { is_de_jure_liege_or_above_target = scope:vassal_title } + } + } + send_interface_toast = { + title = hold_court.8180.b.tt.failure + scope:contract_lord = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + } + } + } + stress_impact = { + generous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = -0.25 + ai_rationality = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = generous + } + } + } + + option = { # Demand forced partition + name = hold_court.8180.e + trigger = { + scope:contract_lord = { vassal_contract_obligation_level_can_be_increased = succession_rights } + } + random_list = { + 3 = { + desc = hold_court.8180.e.tt.success + modifier = { + factor = 2 + scope:contract_lord = { has_trait = content } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = generous } + } + modifier = { factor = hold_court_8180_contract_value } # based on relative worth of contract + send_interface_toast = { + title = hold_court.8180.e.tt.success + scope:contract_lord = { + hold_court_8180_grant_contract_effect = yes + vassal_contract_set_obligation_level = { + type = succession_rights + level = 1 + } + add_opinion = { + modifier = annoyed_opinion + target = root + opinion = -5 + } + } + } + } + 6 = { + desc = hold_court.8180.b.tt.failure + modifier = { + factor = 2 + scope:contract_lord = { has_trait = greedy } + } + modifier = { + factor = 2 + scope:contract_lord = { has_trait = ambitious } + } + modifier = { + factor = 2 + any_heir = { count > 1 } + } + send_interface_toast = { + title = hold_court.8180.b.tt.failure + scope:contract_lord = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + } + } + } + stress_impact = { + trusting = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = 1 + ai_compassion = -0.25 + ai_rationality = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Demand contract change + name = hold_court.8180.f + trigger = { + scope:contract_lord = { has_variable = hc_8180_increase_var } + } + scope:contract_lord = { + hold_court_8180_grant_contract_effect = yes + if = { + limit = { var:hc_8180_increase_var = 1 } + vassal_contract_increase_obligation_level = feudal_government_taxes + } + else = { vassal_contract_increase_obligation_level = feudal_government_levies } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = 0.5 + ai_rationality = 0.5 + ai_boldness = -1 + } + } + } + + option = { # Dismiss vassal + name = hold_court.8180.g + scope:contract_lord = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + ai_rationality = -0.25 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + after = { + scope:contract_lord = { + clear_court_event_participation = yes + if = { + limit = { has_variable = hc_8180_increase_var } + remove_variable = hc_8180_increase_var + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Enemy Within +# by Joe Parkin +# 8190 +################################################## + +# A vassal wants a foreigner vassal to convert +hold_court.8190 = { + type = court_event + title = hold_court.8190.t + desc = { + desc = hold_court.8190.desc.intro + random_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:other_vassal.culture = { has_same_culture_ethos = root.culture } + } + } + desc = hold_court.8190.desc.ethos + } + triggered_desc = { + trigger = { + NOT = { + scope:other_vassal.culture = { has_same_culture_heritage = root.culture } + } + } + desc = hold_court.8190.desc.heritage + } + triggered_desc = { + trigger = { + NOT = { + scope:other_vassal.culture = { has_same_culture_language = root.culture } + } + } + desc = hold_court.8190.desc.language + } + desc = hold_court.8190.desc.fallback + } + desc = hold_court.8190.desc.body + } + theme = court + lower_right_portrait = scope:other_vassal + court_scene = { + button_position_character = scope:aggressor_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:aggressor_vassal = { + group = petitioners_group + animation = rage + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { # Is there a vassal who is not root culture? + is_available_ai_adult = yes + culture != root.culture + save_temporary_scope_as = other_temp + } + any_vassal = { # Is there another vassal of root culture who is not humble and doesn't like the other one? + has_court_event_flag = no + is_available_ai_adult = yes + culture = root.culture + NOT = { has_trait = humble } + NOR = { + has_relation_friend = scope:other_temp + scope:other_temp = { + has_friendly_relationship_trigger = { CHARACTER = prev } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + random_vassal = { + limit = { + is_available_ai_adult = yes + culture != root.culture + } + weight = { + base = 1 + modifier = { # Victim is at least a count + factor = 2 + primary_title.tier > tier_barony + } + } + save_scope_as = other_vassal + } + random_vassal = { + limit = { + is_available_ai_adult = yes + culture = root.culture + NOT = { has_trait = humble } + NOR = { + has_relation_friend = scope:other_vassal + scope:other_vassal = { + has_friendly_relationship_trigger = { CHARACTER = prev } + } + } + } + weight = { + modifier = { # Aggressor is arrogant + factor = 4 + has_trait = arrogant + } + modifier = { # Aggressor is a meanie + factor = 2 + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = arbitrary + } + } + modifier = { # Aggressor is not a baron/mayor + factor = 2 + primary_title.tier > tier_barony + } + modifier = { # Aggressor borders the victim + factor = 2 + any_held_title = { + title_tier = county + any_neighboring_county = { holder = scope:other_vassal } + } + } + modifier = { # Aggressor has claim beef with victim + factor = 2 + any_claim = { + OR = { + holder = scope:other_vassal + de_jure_liege.holder = scope:other_vassal + de_facto_liege.holder = scope:other_vassal + } + } + } + modifier = { # Aggressor is a rival of the victim + factor = 4 + has_relation_rival = scope:other_vassal + } + modifier = { # Aggressor doesn't like the victim + factor = 2 + opinion = { + target = scope:other_vassal + value <= 0 + } + } + modifier = { # Aggressor is the same rank as the victim + factor = 2 + primary_title.tier = scope:other_vassal.primary_title.tier + } + modifier = { # Aggressor is a powerful vassal + factor = 2 + is_powerful_vassal = yes + } + } + save_scope_as = aggressor_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Demand culture adoption + name = hold_court.8190.a + add_dread = miniscule_dread_gain + scope:aggressor_vassal = { + culture = { + change_cultural_acceptance = { + target = scope:other_vassal.culture + value = -10 + desc = cultural_intolerance_tt + } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + every_vassal = { + limit = { + culture != root.culture + } + custom = hold_court.8190.a.tt.vassals + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -10 + } + } + if = { + limit = { + any_realm_county = { culture = scope:other_vassal.culture } + } + every_realm_county = { + limit = { culture = scope:other_vassal.culture } + custom = hold_court.8190.a.tt.promote + add_county_modifier = { + modifier = hold_court_8190_vassal_modifier + years = 15 + } + } + } + random_list = { + 40 = { + modifier = { + add = -20 + NOT = { + scope:other_vassal.culture = { has_same_culture_heritage = root.culture } + } + } + modifier = { + add = -20 + scope:other_vassal = { has_trait = stubborn } + } + show_chance = no + desc = hold_court.8190.a.tt_accept + send_interface_toast = { + title = hold_court.8190.a.tt_accept + left_icon = scope:other_vassal + save_scope_as = actor + scope:other_vassal = { save_scope_as = recipient } + add_prestige = minor_prestige_gain + new_culture_created_vassal_conversion_effect = { + CONVERTEE = scope:recipient + CONVERTER = scope:actor + CULTURE = scope:actor.culture + } + } + } + 60 = { + show_chance = no + desc = hold_court.8190.a.tt_refuse + send_interface_toast = { + title = hold_court.8190.a.tt_refuse + left_icon = scope:other_vassal + scope:other_vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + stress_impact = { zealous = medium_stress_impact_gain } + } + } + } + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + + option = { # Cultural acceptance + name = hold_court.8190.b + duel = { + skill = diplomacy + target = scope:aggressor_vassal + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = hold_court.8190.b.tt_success + send_interface_toast = { + title = hold_court.8190.b.tt_success + left_icon = scope:aggressor_vassal + right_icon = scope:other_vassal + scope:aggressor_vassal.culture = { + change_cultural_acceptance = { + target = scope:other_vassal.culture + value = 10 + desc = cultural_benevolence_tt + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = hold_court.8190.b.tt_failure + send_interface_toast = { + title = hold_court.8190.b.tt_failure + add_prestige = medium_prestige_loss + } + } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + scope:other_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + if = { + limit = { + any_vassal = { + culture = scope:other_vassal.culture + this != scope:other_vassal + } + } + every_vassal = { + limit = { + culture = scope:other_vassal.culture + this != scope:other_vassal + } + custom = hold_court.8190.b.tt.vassals + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + } + stress_impact = { + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = arrogant + } + } + } + + option = { # Side with other vassal + name = hold_court.8190.c + trigger = { + NOT = { has_relation_rival = scope:other_vassal } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:other_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + progress_towards_friend_effect = { + REASON = friend_respected_foreign_culture + CHARACTER = root + OPINION = 0 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = shy + } + } + } + + option = { # All cultures are equal + name = hold_court.8190.d + change_current_court_grandeur = minor_court_grandeur_gain + every_vassal = { + limit = { + culture != root.culture + } + custom = hold_court.8190.a.tt.vassals + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -15 + } + } + if = { + limit = { + any_vassal = { + culture = root.culture + has_trait = arrogant + this != scope:aggressor_vassal + } + } + every_vassal = { + limit = { + culture = root.culture + has_trait = arrogant + this != scope:aggressor_vassal + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_boldness = 0.5 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + } + } + + after = { + scope:aggressor_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Servant of God +# by Joe Parkin +# 8200 +################################################## + +scripted_trigger hold_court_8200_infidel_trigger = { + is_available_ai_adult = yes + faith != root.faith + NOR = { + AND = { # Eastern + religion = { is_in_family = rf_eastern } + root.faith = { has_doctrine = tenet_eastern_syncretism } + } + AND = { # Pagan + faith = { has_doctrine_parameter = unreformed } + root.faith = { has_doctrine = tenet_unreformed_syncretism } + } + AND = { # Christian + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + root.faith = { has_doctrine = tenet_christian_syncretism } + } + AND = { # Islam + religion = religion:islam_religion + root.faith = { has_doctrine = tenet_islamic_syncretism } + } + AND = { # Judaism + religion = religion:judaism_religion + root.faith = { has_doctrine = tenet_jewish_syncretism } + } + } + NAND = { + government_has_flag = government_is_theocracy + primary_title = { is_head_of_faith = yes } + any_held_title = { + count = 0 + title_tier < duchy + } + } +} + +# A vassal wants an infidel vassal to convert +hold_court.8200 = { + type = court_event + title = hold_court.8200.t + desc = { + desc = hold_court.8200.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:infidel_vassal = { # Victim is a religious head with no other titles + government_has_flag = government_is_theocracy + primary_title = { is_head_of_faith = yes } + } + } + desc = hold_court.8200.desc.pope + } + desc = hold_court.8200.desc.vassal + } + desc = hold_court.8200.desc.body + } + theme = court + lower_right_portrait = scope:infidel_vassal + court_scene = { + button_position_character = scope:aggressor_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:aggressor_vassal = { + group = petitioners_group + animation = rage + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + NOT = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + any_vassal = { # Is there a vassal who is not root faith? + hold_court_8200_infidel_trigger = yes + save_temporary_scope_as = other_temp + } + any_vassal = { # Is there another vassal of root faith who is not cynical and doesn't like the other one? + has_court_event_flag = no + is_available_ai_adult = yes + faith = root.faith + NOT = { has_trait = cynical } + NOR = { + has_relation_friend = scope:other_temp + scope:other_temp = { + has_friendly_relationship_trigger = { CHARACTER = prev } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_vassal = { + limit = { hold_court_8200_infidel_trigger = yes } + weight = { + modifier = { + factor = 2 + primary_title.tier > tier_barony + } + } + save_scope_as = infidel_vassal + } + random_vassal = { + limit = { + is_available_ai_adult = yes + faith = root.faith + NOR = { + has_relation_friend = scope:infidel_vassal + scope:infidel_vassal = { + has_friendly_relationship_trigger = { CHARACTER = prev } + } + } + } + weight = { + modifier = { # Aggressor is zealous + factor = 4 + has_trait = zealous + } + modifier = { # Aggressor is a meanie + factor = 2 + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = arbitrary + } + } + modifier = { # Aggressor is not a baron/mayor + factor = 2 + primary_title.tier > tier_barony + } + modifier = { # Aggressor borders the victim + factor = 2 + any_held_title = { + title_tier = county + any_neighboring_county = { holder = scope:infidel_vassal } + } + } + modifier = { # Aggressor has claim beef with victim + factor = 2 + any_claim = { + OR = { + holder = scope:infidel_vassal + de_jure_liege.holder = scope:infidel_vassal + de_facto_liege.holder = scope:infidel_vassal + } + } + } + modifier = { # Aggressor is a rival of the victim + factor = 4 + has_relation_rival = scope:infidel_vassal + } + modifier = { # Aggressor doesn't like the victim + factor = 2 + opinion = { + target = scope:infidel_vassal + value <= 0 + } + } + modifier = { # Aggressor is the same rank as the victim + factor = 2 + primary_title.tier = scope:infidel_vassal.primary_title.tier + } + modifier = { # Aggressor is a powerful vassal + factor = 2 + is_powerful_vassal = yes + } + } + save_scope_as = aggressor_vassal + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Demand the vassal's conversion + name = hold_court.8200.a + add_dread = miniscule_dread_gain + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + every_vassal = { + limit = { + NOR = { + faith = root.faith + this = scope:infidel_vassal + } + } + custom = hold_court.8200.a.tt.vassals + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -10 + } + } + if = { + limit = { + any_realm_county = { faith = scope:infidel_vassal.faith } + } + every_realm_county = { + limit = { faith = scope:infidel_vassal.faith } + custom = hold_court.8200.a.tt.convert + add_county_modifier = { + modifier = hold_court_8200_vassal_modifier + years = 15 + } + } + } + random_list = { + 40 = { + modifier = { + add = -20 + scope:infidel_vassal.religion != root.religion + } + modifier = { + add = -20 + scope:infidel_vassal = { has_trait = zealous } + } + show_chance = no + desc = hold_court.8200.a.tt_accept + send_interface_toast = { + title = hold_court.8200.a.tt_accept + left_icon = scope:infidel_vassal + add_piety = medium_piety_gain + save_scope_as = actor + scope:infidel_vassal = { save_scope_as = recipient } + demand_conversion_interaction_effect = yes + } + } + 60 = { + show_chance = no + desc = hold_court.8200.a.tt_refuse + send_interface_toast = { + title = hold_court.8200.a.tt_refuse + left_icon = scope:infidel_vassal + if = { + limit = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:infidel_vassal + } + } + add_opinion = { + modifier = illegal_resisted_conversion_opinion + target = scope:infidel_vassal + } + } + scope:infidel_vassal = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + stress_impact = { zealous = medium_stress_impact_gain } + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -2 + ai_zeal = 2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } + + option = { # Adopt heretic's faith + name = hold_court.8200.c + trigger = { + NOT = { has_trait = zealous } + } + if = { + limit = { religion = scope:infidel_vassal.religion } + add_piety = medium_piety_loss + } + else = { add_piety = major_piety_loss } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -40 + } + } + scope:infidel_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + every_vassal = { + limit = { + faith = scope:infidel_vassal.faith + this != scope:infidel_vassal + } + custom = hold_court.8200.c.tt.vassals + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + set_character_faith_with_conversion = scope:infidel_vassal.faith + stress_impact = { + zealous = massive_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 2 + ai_zeal = -4 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -60 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + } + } + + option = { # Side with the heretic + name = hold_court.8200.d + trigger = { + NOT = { has_relation_rival = scope:infidel_vassal } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:infidel_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + progress_towards_friend_effect = { + REASON = friend_respected_other_religion + CHARACTER = root + OPINION = 0 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_zeal = -2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = shy + } + } + } + + option = { # Dismiss zealotry + name = hold_court.8200.e + trigger = { + NOT = { has_trait = zealous } + } + change_current_court_grandeur = minor_court_grandeur_gain + every_vassal = { + limit = { + faith != root.faith + } + custom = hold_court.8200.a.tt.vassals + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -15 + } + } + if = { + limit = { + any_vassal = { + faith = root.faith + has_trait = zealous + this != scope:aggressor_vassal + } + } + every_vassal = { + limit = { + faith = root.faith + has_trait = zealous + this != scope:aggressor_vassal + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = -2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = zealous + } + } + } + + after = { + scope:aggressor_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Rightful Lands +# by Joe Parkin +# 8210 - 211 +################################################## + +scripted_trigger hold_court_8210_claim_trigger = { + tier = tier_county + is_landless_type_title = no + NOT = { this = root.capital_county } + holder = { + NOT = { this = $VASSAL$ } + OR = { + AND = { + this = root + root = { + any_held_title = { + count > 1 + tier = tier_county + is_landless_type_title = no + } + } + } + is_vassal_of = root + } + NOR = { + has_friendly_relationship_trigger = { CHARACTER = $VASSAL$ } + is_parent_of = $VASSAL$ + is_spouse_of = $VASSAL$ + } + } +} + +scripted_trigger hold_court_8210_vassal_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + NOT = { has_trait = content } + is_at_war = no + NOT = { is_close_family_of = root } + save_temporary_scope_as = vassal_temp + OR = { + any_de_jure_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:vassal_temp } + } + any_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:vassal_temp } + } + any_held_title = { + title_tier = county + any_neighboring_county = { + holder = { + this = root + NOR = { + has_friendly_relationship_trigger = { CHARACTER = scope:vassal_temp } + is_parent_of = scope:vassal_temp + is_spouse_of = scope:vassal_temp + } + } + } + } + } +} + +scripted_effect hold_court_8211_duel_win_effect = { + if = { + limit = { + NOR = { + this = root + scope:defender_vassal = root + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } +} + +scripted_effect hold_court_8211_duel_lose_effect = { + if = { + limit = { + this != root + } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } +} + +# A vassal wants a dejure or claimed county from another vassal +hold_court.8210 = { + type = court_event + title = hold_court.8210.t + desc = { + desc = hold_court.8210.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:aggressor_vassal = { + any_de_jure_claim = { this = scope:vassal_claim } + } + } + desc = hold_court.8210.desc.de_jure + } + triggered_desc = { + trigger = { + scope:aggressor_vassal = { has_strong_claim_on = scope:vassal_claim } + } + desc = hold_court.8210.desc.strong + } + desc = hold_court.8210.desc.weak + } + first_valid = { + triggered_desc = { + trigger = { scope:defender_vassal = root } + desc = hold_court.8210.desc.self + } + desc = hold_court.8210.desc.other + } + } + theme = court + lower_right_portrait = scope:defender_vassal + court_scene = { + button_position_character = scope:aggressor_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:aggressor_vassal = { + group = petitioners_group + animation = disapproval + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + any_vassal = { hold_court_8210_vassal_trigger = yes } # Is there a vassal with a de jure claim on a title held by another vassal? + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_vassal = { + limit = { hold_court_8210_vassal_trigger = yes } + weight = { + modifier = { + factor = 4 + primary_title.tier > tier_barony + } + modifier = { # Aggressor is a meanie + factor = 2 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + modifier = { # Aggressor is a coward + factor = 2 + has_trait = craven + } + modifier = { # Aggressor is a powerful vassal + factor = 2 + is_powerful_vassal = yes + } + modifier = { + factor = 10 + any_de_jure_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:vassal_temp } + } + } + modifier = { + factor = 5 + any_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:vassal_temp } + } + } + } + save_scope_as = aggressor_vassal + court_event_character_flag_effect = yes + if = { + limit = { + any_de_jure_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:aggressor_vassal } + } + } + random_de_jure_claim = { + limit = { + hold_court_8210_claim_trigger = { VASSAL = scope:aggressor_vassal } + } + weight = { + modifier = { + factor = 4 + any_neighboring_county = { holder = scope:aggressor_vassal } + } + modifier = { + factor = 2 + de_jure_liege.tier = tier_duchy + } + modifier = { + factor = 2 + holder.max_military_strength > scope:aggressor_vassal.max_military_strength + } + modifier = { # More relevant if war declaration is limited + factor = 2 + root = { + OR = { + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + } + modifier = { + factor = 2 + scope:aggressor_vassal = { has_strong_claim_on = prev } + } + modifier = { + factor = 4 + holder = { has_relation_rival = scope:aggressor_vassal } + } + modifier = { + factor = 4 + holder = { + reverse_opinion = { + target = scope:aggressor_vassal + value <= 0 + } + } + } + } + save_scope_as = vassal_claim + holder = { save_scope_as = defender_vassal } + } + } + else_if = { + limit = { + any_claim = { + hold_court_8210_claim_trigger = { VASSAL = scope:aggressor_vassal } + } + } + random_claim = { + limit = { + hold_court_8210_claim_trigger = { VASSAL = scope:aggressor_vassal } + } + weight = { + modifier = { + factor = 4 + any_neighboring_county = { holder = scope:aggressor_vassal } + } + modifier = { + factor = 2 + de_jure_liege.tier = tier_duchy + } + modifier = { + factor = 2 + holder.max_military_strength > scope:aggressor_vassal.max_military_strength + } + modifier = { # More relevant if war declaration is limited + factor = 2 + root = { + OR = { + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + } + } + modifier = { + factor = 2 + scope:aggressor_vassal = { has_strong_claim_on = prev } + } + } + save_scope_as = vassal_claim + holder = { save_scope_as = defender_vassal } + } + } + else = { + random_held_title = { + title_tier = county + limit = { + any_neighboring_county = { + NOT = { this = root.capital_county } + holder = { + this = root + NOR = { + has_friendly_relationship_trigger = { CHARACTER = scope:aggressor_vassal } + is_parent_of = scope:aggressor_vassal + is_spouse_of = scope:aggressor_vassal + } + } + } + } + random_neighboring_county = { + limit = { + NOT = { this = root.capital_county } + holder = { + this = root + NOR = { + has_friendly_relationship_trigger = { CHARACTER = scope:aggressor_vassal } + is_parent_of = scope:aggressor_vassal + is_spouse_of = scope:aggressor_vassal + } + } + } + save_scope_as = vassal_claim + holder = { save_scope_as = defender_vassal } + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Support claimant + name = hold_court.8210.a + trigger = { + trigger_if = { + limit = { + scope:aggressor_vassal = { + NOR = { + any_de_jure_claim = { this = scope:vassal_claim } + has_claim_on = scope:vassal_claim + } + } + } + scope:defender_vassal != root + } + } + if = { + limit = { scope:defender_vassal = root } + } + else_if = { + limit = { + scope:aggressor_vassal = { + NOR = { + any_de_jure_claim = { this = scope:vassal_claim } + has_strong_claim_on = scope:vassal_claim + } + } + } + add_tyranny = major_tyranny_gain + } + else = { add_tyranny = minor_tyranny_gain } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal_claim = { + change_title_holder = { + holder = scope:aggressor_vassal + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + if = { + limit = { scope:defender_vassal = root } + stress_impact = { + greedy = medium_stress_impact_gain + } + } + else = { + scope:defender_vassal = { + progress_towards_rival_effect = { + CHARACTER = scope:aggressor_vassal + REASON = rival_claimant_fight + OPINION = 0 + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + stress_impact = { + just = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -2 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight up for relatives. + add = 2 + scope:aggressor_vassal = { is_close_family_of = root } + NOT = { + scope:defender_vassal = { is_close_family_of = root } + } + } + } + } + + option = { # Start vassal war + name = hold_court.8210.b + trigger = { + is_valid_for_east_asian_events_trigger = no + NOT = { + faith = { has_doctrine = tenet_pacifism } + } + NOR = { + has_realm_law = crown_authority_2 + has_realm_law = crown_authority_3 + } + scope:defender_vassal != root + } + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + add_character_flag = temp_no_claim_war_cost + start_war = { + cb = claim_cb + target = scope:vassal_claim.holder + claimant = scope:aggressor_vassal + target_title = scope:vassal_claim + } + remove_character_flag = temp_no_claim_war_cost + } + scope:defender_vassal = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = craven + } + modifier = { + add = 30 + culture = { has_cultural_pillar = ethos_bellicose } + } + } + } + + option = { # Start vassal duel + name = { + trigger = { + scope:defender_vassal != root + } + text = hold_court.8210.f.other + } + name = { + trigger = { always = yes } + text = hold_court.8210.f.self + } + trigger = { + is_valid_for_east_asian_events_trigger = no + scope:defender_vassal = { is_adult = yes } + } + custom_tooltip = hold_court.8210.duel_tt + show_as_tooltip = { + random_list = { + 10 = { + show_chance = no + desc = hold_court.8210.b.tt_aggressor + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal_claim = { + change_title_holder = { + holder = scope:aggressor_vassal + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:aggressor_vassal = { hold_court_8211_duel_win_effect = yes } + scope:defender_vassal = { hold_court_8211_duel_lose_effect = yes } + } + 10 = { + show_chance = no + desc = hold_court.8210.b.tt_defender + scope:defender_vassal = { hold_court_8211_duel_win_effect = yes } + scope:aggressor_vassal = { hold_court_8211_duel_lose_effect = yes } + } + } + } + configure_start_single_combat_effect = { + SC_INITIATOR = scope:aggressor_vassal + SC_ATTACKER = scope:aggressor_vassal + SC_DEFENDER = scope:defender_vassal + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = hold_court.8211 + INVALIDATION_EVENT = fp1_tbc.0102 + } + stress_impact = { + lifestyle_blademaster = medium_stress_impact_loss + viking = medium_stress_impact_loss + varangian = medium_stress_impact_loss + berserker = medium_stress_impact_loss + brave = medium_stress_impact_loss + } + stress_impact = { + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = craven + } + modifier = { + add = 30 + OR = { + culture = { has_cultural_tradition = tradition_martial_admiration } + culture = { has_cultural_tradition = tradition_chivalry } + culture = { has_cultural_tradition = tradition_futuwaa } + has_trait = gallant + has_perk = stalwart_leader_perk + } + } + } + } + + option = { # Support defender + name = { + trigger = { + NOR = { + scope:aggressor_vassal = { + any_de_jure_claim = { this = scope:vassal_claim } + } + scope:aggressor_vassal = { has_claim_on = scope:vassal_claim } + } + } + text = hold_court.8210.c.none + } + name = { + trigger = { scope:defender_vassal = root } + text = hold_court.8210.c.self + } + name = { + trigger = { + scope:defender_vassal != root + } + text = hold_court.8210.c.other + } + scope:aggressor_vassal = { + if = { + limit = { + NOT = { + any_de_jure_claim = { this = scope:vassal_claim } + } + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + if = { + limit = { has_strong_claim_on = scope:vassal_claim } + make_claim_weak = scope:vassal_claim + } + else = { remove_claim = scope:vassal_claim } + } + else = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -15 + } + } + } + if = { + limit = { + scope:defender_vassal != root + } + scope:defender_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_dispute + CHARACTER = root + OPINION = 0 + } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + } + } + + option = { # Change liege + name = hold_court.8210.e + trigger = { + scope:defender_vassal != root + scope:aggressor_vassal = { + any_de_jure_claim = { this = scope:vassal_claim } + } + scope:defender_vassal.primary_title.tier < scope:aggressor_vassal.primary_title.tier + } + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + scope:defender_vassal = { + change_liege = { + liege = scope:aggressor_vassal + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + scope:defender_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + } + } + + option = { # Not my problem + name = hold_court.8210.d + trigger = { + scope:defender_vassal != root + } + add_prestige = minor_prestige_gain + scope:aggressor_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:defender_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -2 + ai_honor = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } + + after = { + scope:aggressor_vassal = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +hold_court.8211 = { + hidden = yes + + immediate = { + scope:aggressor_vassal.liege = { + send_interface_toast = { + title = hold_court.8031.t + left_icon = scope:sc_victor + right_icon = scope:sc_loser + scope:sc_victor = { + if = { + limit = { + this != scope:vassal_claim.holder + } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:vassal_claim = { + change_title_holder = { + holder = scope:sc_victor + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + if = { + limit = { + liege != root + } + hold_court_8211_duel_win_effect = yes + } + } + scope:sc_loser = { + if = { + limit = { + NOR = { + liege = root + this = root + } + } + hold_court_8211_duel_lose_effect = yes + } + } + } + } + } +} + +################################################## +# The King's Peace +# by Joe Parkin +# 8260 +################################################## + +scripted_trigger hold_court_8260_faction_trigger = { + exists = yes + OR = { + faction_is_type = liberty_faction + faction_is_type = claimant_faction + } + OR = { + faction_power >= faction_power_threshold + faction_is_at_war = yes + } + trigger_if = { + limit = { exists = special_character } + special_character != root + } +} + +hold_court.8260 = { + type = court_event + title = hold_court.8260.t + desc = { + desc = hold_court.8260.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:vassal_faction.special_character + scope:vassal_faction.faction_leader = scope:vassal_faction.special_character + scope:vassal_faction = { faction_is_type = claimant_faction } + } + desc = hold_court.8220.desc.claimant_self + } + triggered_desc = { + trigger = { + scope:vassal_faction = { faction_is_type = claimant_faction } + } + desc = hold_court.8220.desc.claimant + } + triggered_desc = { + trigger = { always = yes } + desc = hold_court.8220.desc.liberty + } + } + desc = hold_court.8260.desc.body + } + theme = court + override_background = { reference = throne_room } + cooldown = { years = 10 } + lower_center_portrait = { + character = scope:vassal_faction.special_character + trigger = { + scope:vassal_faction = { + exists = special_character + special_character != faction_leader + } + } + } + lower_right_portrait = scope:vassal_faction.faction_leader + + court_scene = { + button_position_character = scope:vassal_faction.faction_target + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:vassal_faction_target = { + group = petitioners_group + animation = anger + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + 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_administrative } + } + + trigger = { + any_vassal = { + has_court_event_flag = no + is_available_ai_adult = yes + any_targeting_faction = { target_of_powerful_faction_trigger = yes } + } + } + + immediate = { + random_vassal = { + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + any_targeting_faction = { target_of_powerful_faction_trigger = yes } + } + weight = { + base = 1 + modifier = { + factor = 4 + any_targeting_faction = { faction_can_press_demands = yes } + } + modifier = { + factor = 4 + any_targeting_faction = { + faction_type = claimant_faction + special_title ?= prev.primary_title + } + } + modifier = { + factor = 8 + is_close_family_of = root + } + modifier = { + factor = 2 + this = root.primary_heir + } + modifier = { + factor = 0.5 + primary_title.tier < tier_duchy + } + } + save_scope_as = vassal_faction_target + court_event_character_flag_effect = yes + ordered_targeting_faction = { + limit = { + target_of_powerful_faction_trigger = yes + faction_can_press_demands = yes + } + alternative_limit = { + target_of_powerful_faction_trigger = yes + faction_is_at_war = yes + } + alternative_limit = { target_of_powerful_faction_trigger = yes } + order_by = faction_discontent + save_scope_as = vassal_faction + faction_leader = { save_scope_as = vassal_faction_leader } # For loc + if = { + limit = { exists = special_character } + special_character = { save_scope_as = vassal_claimant } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Break up the faction/force surrender + name = { + trigger = { + scope:vassal_faction = { faction_is_at_war = yes } + } + text = hold_court.8260.a.war + } + name = { + trigger = { always = yes } + text = hold_court.8260.a.peace + } + scope:vassal_faction = { + faction_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + if = { + limit = { + exists = special_character + NOT = { + any_faction_member = { this = scope:vassal_faction.special_character } + } + } + special_character = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + } + if = { + limit = { faction_is_at_war = no } + every_faction_member = { + custom = hold_court_8260_faction_member_tt + add_faction_cooldown_effect = { YEARS = faction_war_white_peace_cooldown } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + destroy_faction = yes + } + else = { + every_faction_member = { + custom = hold_court_8260_faction_member_tt + add_faction_cooldown_effect = { YEARS = faction_war_defeat_cooldown } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + } + faction_war = { end_war = defender } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { #Weight up for family + add = 25 + scope:vassal_faction.faction_target = { is_close_family_of = root } + } + modifier = { #Weight up for relatives + add = 25 + scope:vassal_faction.faction_target = { is_close_or_extended_family_of = root } + } + } + } + + option = { # Imprison faction leader + name = hold_court.8260.b + add_dread = minor_dread_gain + scope:vassal_faction.faction_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + imprison_character_effect = { + TARGET = scope:vassal_faction.faction_leader + IMPRISONER = root + } + scope:vassal_faction = { + if = { + limit = { + exists = special_character + faction_leader != special_character + } + special_character = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + every_faction_member = { + limit = { is_a_faction_leader = no } + custom = hold_court_8260_faction_member_tt + add_faction_cooldown_effect = { YEARS = faction_war_defeat_cooldown } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:vassal_faction = { + if = { + limit = { faction_is_at_war = no } + destroy_faction = yes + } + else = { + faction_war = { end_war = defender } + } + } + } + stress_impact = { + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -2 + ai_boldness = 1 + ai_vengefulness = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + has_trait = forgiving + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + option = { # End war white peace + name = hold_court.8260.c + trigger = { + scope:vassal_faction = { faction_is_at_war = yes } + } + scope:vassal_faction = { + scope:vassal_faction.faction_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 5 + } + } + if = { + limit = { + exists = special_character + faction_leader != special_character + } + special_character = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + } + every_faction_member = { + limit = { is_a_faction_leader = no } + custom = hold_court_8260_faction_member_tt + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + faction_war = { end_war = white_peace } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 2 + ai_compassion = 1 + ai_boldness = 1 + ai_vengefulness = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + } + } + + option = { # Make vassal surrender + name = hold_court.8260.d + add_tyranny = minor_tyranny_gain + scope:vassal_faction = { + faction_target = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + faction_leader = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + if = { + limit = { + exists = special_character + faction_leader != special_character + } + special_character = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + every_faction_member = { + limit = { is_a_faction_leader = no } + custom = hold_court_8260_faction_member_tt + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + if = { + limit = { faction_is_at_war = no } + if = { + limit = { faction_is_type = claimant_faction } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + special_title = { + change_title_holder_include_vassals = { + holder = scope:vassal_faction.special_character + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + else = { + faction_target = { decrease_crown_authority_effect = yes } + } + } + else = { + faction_war = { end_war = attacker } + } + hidden_effect = { + if = { + limit = {exists = scope:vassal_faction } + destroy_faction = yes + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -2 + ai_compassion = -1 + ai_boldness = 1 + ai_vengefulness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for family + add = -25 + scope:vassal_faction.faction_target = { is_close_family_of = root } + } + modifier = { #Weight down for relatives + add = -25 + scope:vassal_faction.faction_target = { is_close_or_extended_family_of = root } + } + } + } + + option = { # Refuse + name = hold_court.8260.e + scope:vassal_faction = { + faction_target = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + every_faction_member = { + custom = hold_court_8260_faction_member_tt + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_boldness = -1 + ai_vengefulness = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + } + } + + after = { + scope:vassal_faction_target = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Oath of Fealty +# by Joe Parkin +# 8270 +################################################## + +scripted_trigger hold_court_8270_neighbor_trigger = { + has_court_event_flag = no + is_available_ai_adult = yes + top_liege = this + primary_title.tier < root.primary_title.tier + primary_title.tier <= tier_duchy + NOT = { has_relation_rival = root } + opinion = { + target = root + value >= -25 + } + NOT = { + faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + any_neighboring_top_liege_realm_owner = { + count >= 2 + primary_title.tier >= prev.primary_title.tier + NOT = { is_allied_to = prev } + max_military_strength > prev.max_military_strength + } + calc_true_if = { + amount >= 2 + primary_title = { # is a de jure vassal + any_this_title_or_de_jure_above = { + this != prev + holder = root + } + } + OR = { # cultural acceptance is good + culture = root.culture + culture = { + cultural_acceptance = { target = root.culture value >= 50 } + } + } + primary_title.tier = tier_county + } +} + +hold_court.8270 = { + type = court_event + title = hold_court.8270.t + desc = hold_court.8270.desc + theme = court + override_background = { reference = throne_room } + cooldown = { years = 15 } + + court_scene = { + button_position_character = scope:neighbor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:neighbor = { + group = petitioners_group + animation = admiration + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + any_neighboring_top_liege_realm_owner = { hold_court_8270_neighbor_trigger = yes } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { + limit = { hold_court_8270_neighbor_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 4 + is_close_or_extended_family_of = root + } + modifier = { + factor = 10 + primary_title.tier = tier_county + } + modifier = { + factor = 4 + faith = root.faith + } + modifier = { + factor = 2 + religion = root.religion + } + modifier = { + factor = 2 + culture = root.culture + } + modifier = { + factor = 4 + opinion = { + target = root + value >= 50 + } + } + modifier = { + factor = 4 + any_neighboring_top_liege_realm_owner = { + this != root + primary_title.tier >= tier_kingdom + OR = { + AND = { + prev.faith = root.faith + faith != prev.faith + } + AND = { + prev.religion = root.religion + religion != prev.religion + } + AND = { + prev.culture = root.culture + culture != prev.culture + } + } + } + } + } + save_scope_as = neighbor + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Accept + name = hold_court.8270.a + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + scope:neighbor = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:neighbor = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + # Feudal vassals get contracts. + if = { + limit = { government_has_flag = government_is_feudal } + hidden_effect = { + if = { + limit = { top_liege != this } # To avoid errors during tooltip generation (prior to the contract being generated) + vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 1 } + vassal_contract_set_obligation_level = { type = feudal_government_levies level = 1 } + } + } + custom_tooltip = low_obligations_taxes + custom_tooltip = low_obligations_levies + } + } + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_greed = -2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = paranoid + } + } + } + + option = { # Demand better deal + name = hold_court.8270.b + random_list = { + 2 = { + show_chance = no + desc = hold_court.8270.b.accept + modifier = { + factor = 2 + scope:neighbor = { has_trait = craven } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = fickle } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = content } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = humble } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = wrathful } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = vengeful } + } + send_interface_toast = { + title = hold_court.8270.b.accept + left_icon = scope:neighbor + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + add_claim_on_loss = no + } + scope:neighbor = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + custom_tooltip = normal_obligations_taxes + custom_tooltip = normal_obligations_levies + } + } + 4 = { + show_chance = no + desc = hold_court.8270.b.refuse + modifier = { + factor = 2 + scope:neighbor = { has_trait = brave } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = stubborn } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = ambitious } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = arrogant } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = patient } + } + modifier = { + factor = 2 + scope:neighbor = { has_trait = forgiving } + } + change_current_court_grandeur = medium_court_grandeur_loss + send_interface_toast = { + title = hold_court.8270.b.refuse + left_icon = scope:neighbor + scope:neighbor = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_greed = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + } + } + + option = { # Refuse + name = hold_court.8270.d + change_current_court_grandeur = minor_court_grandeur_gain + scope:neighbor = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + honest = medium_stress_impact_gain + trusting = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_rationality = -2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -15 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -15 + has_trait = fickle + } + } + } + + after = { + scope:neighbor = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +################################################## +# Nomadic Neighbors +# by Joe Parkin +# 8280 +################################################## + +scripted_trigger nomadic_cultural_traditions_trigger = { + culture = { + OR = { + has_cultural_tradition = tradition_horse_lords + has_cultural_tradition = tradition_pastoralists + } + } +} + +scripted_trigger hold_court_8280_nomad_county_trigger = { + nomadic_cultural_traditions_trigger = yes + holder = { + government_has_flag = government_is_tribal + this != root + nomadic_cultural_traditions_trigger = yes + trigger_if = { + limit = { top_liege = root } + is_available_ai_adult = yes + } + } +} + +scripted_trigger hold_court_8280_feudal_county_trigger = { + nomadic_cultural_traditions_trigger = no + holder = { + has_court_event_flag = no + is_available_ai_adult = yes + nomadic_cultural_traditions_trigger = no + this != root + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + any_neighboring_county = { hold_court_8280_nomad_county_trigger = yes } +} + +hold_court.8280 = { + type = court_event + title = hold_court.8280.t + desc = { + first_valid = { # + triggered_desc = { + trigger = { + scope:nomad.top_liege != root + } + desc = hold_court.8280.desc.foreign + } + triggered_desc = { + trigger = { always = yes } + desc = hold_court.8280.desc.local + } + } + } + theme = court + override_background = { reference = throne_room } + cooldown = { years = 15 } + lower_right_portrait = { + character = scope:nomad.top_liege + trigger = { + scope:nomad.top_liege != root + } + } + + court_scene = { + button_position_character = scope:feudal_vassal + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:feudal_vassal = { + group = petitioners_group + animation = worry + } + scope:nomad_same_liege = { + group = petitioners_group + animation = dismissal + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + trigger = { + nomadic_cultural_traditions_trigger = no + any_realm_county = { hold_court_8280_feudal_county_trigger = yes } + } + + 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_administrative } + } + + immediate = { + random_realm_county = { + limit = { + holder = { is_vassal_of = root } + hold_court_8280_feudal_county_trigger = yes + } + alternative_limit = { hold_court_8280_feudal_county_trigger = yes } + holder = { + save_scope_as = feudal_vassal + court_event_character_flag_effect = yes + } + save_scope_as = feudal_county + ordered_neighboring_county = { + limit = { + holder.top_liege = { + this != root + government_has_flag = government_is_tribal + culture = { has_cultural_tradition = tradition_horse_lords } + } + hold_court_8280_nomad_county_trigger = yes + } + alternative_limit = { + holder.top_liege != root + hold_court_8280_nomad_county_trigger = yes + } + alternative_limit = { hold_court_8280_nomad_county_trigger = yes } + order_by = { + value = 0 + subtract = development_level + } + save_scope_as = nomad_county + culture = { save_scope_as = nomad_culture } + holder = { save_scope_as = nomad } + # Set up portrait groups. + scope:nomad = { + if = { + limit = { top_liege = root } + save_scope_as = nomad_same_liege + court_event_character_flag_effect = yes + } + } + } + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + option = { # Kick nomads out + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= minor_treasury_or_gold_value + } + } + name = { + trigger = { scope:nomad.top_liege = root } + text = hold_court.8280.a.local + } + name = { + trigger = { always = yes } + text = hold_court.8280.a.foreign + } + add_prestige = medium_prestige_gain + remove_treasury_or_gold = tiny_treasury_or_gold_value + scope:feudal_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + scope:nomad = { + if = { + limit = { + top_liege != root + } + top_liege = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + } + else = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + culture = { + if = { + limit = { + this != root.culture + } + change_cultural_acceptance = { + target = root.culture + value = -10 + desc = cultural_intolerance_tt + } + } + } + } + if = { + limit = { + scope:feudal_vassal.culture != root.culture + } + + scope:feudal_vassal.culture = { + if = { + limit = { + this != scope:nomad_culture + } + change_cultural_acceptance = { + target = scope:nomad_culture + value = -10 + desc = cultural_intolerance_tt + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + } + } + + option = { # Recruit them + name = hold_court.8280.b + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + short_term_treasury_or_gold >= massive_treasury_or_gold_value + } + } + remove_treasury_or_gold = major_treasury_or_gold_value + culture = { + if = { + limit = { + this != scope:nomad_culture + } + change_cultural_acceptance = { + target = scope:nomad.culture + value = 10 + desc = cultural_intolerance_tt + } + } + } + scope:feudal_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + scope:nomad = { + if = { + limit = { + top_liege != root + } + top_liege = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + else = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + add_character_modifier = { + modifier = hold_court_8280_nomadic_guard + years = 5 + } + if = { + limit = { + culture != scope:nomad_culture + } + stress_impact = { + paranoid = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_energy = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + culture != scope:nomad_culture + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -15 + culture != scope:nomad_culture + has_trait = arrogant + } + } + } + + option = { # Dismiss + name = hold_court.8280.c + scope:feudal_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:nomad = { + if = { + limit = { top_liege = root } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + scope:feudal_county = { set_county_culture = scope:nomad_culture } + culture = { + if = { + limit = { + this != scope:nomad_culture + } + change_cultural_acceptance = { + target = scope:nomad_culture + value = 5 + desc = cultural_intolerance_tt + } + } + } + if = { + limit = { + culture != scope:nomad_culture + } + stress_impact = { + diligent = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + stress_impact = { + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 1 + ai_honor = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = just + } + modifier = { #Weight down for stress. + add = -15 + culture != scope:nomad_culture + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + culture != scope:nomad_culture + has_trait = paranoid + } + } + } + + after = { + scope:feudal_vassal = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:nomad_same_liege } + scope:nomad_same_liege = { + clear_court_event_participation = yes + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} diff --git a/N3OW/events/activities/pilgrimage_activity/pilgrimage_events.txt b/N3OW/events/activities/pilgrimage_activity/pilgrimage_events.txt new file mode 100644 index 00000000..ad3ccce3 --- /dev/null +++ b/N3OW/events/activities/pilgrimage_activity/pilgrimage_events.txt @@ -0,0 +1,14839 @@ +# Events for Pilgrimages + +namespace = pilgrimage + +################################################################################################################################ +## Pilgrimage Activity System Events +## 0040-0100 +## by Filippa Gannholm Kirsten +################################ +# pilgrimage.0040 - Invalidation +# pilgrimage.0042 - Invalidation because you bury old host back home +# pilgrimage.0500 - Promise your dying religious relative to go on a Pilgrimage +# +############################ +## Generic Journey Events +## 1001-2100 + 6001-6010 +## by Petter Vilberg & Filippa Gannholm Kirsten & Joe Parkin +############################ +# pilgrimage.1100 - Sea: Saint Elmo's Fire +# pilgrimage.1110 - Heathen Raiders +# pilgrimage.1120 - Tour Church +# pilgrimage.1130 - Roadside Shrine +# pilgrimage.1140 - Strength in Numbers +# pilgrimage.2002 - Heathen-hating adherent challenges you +# pilgrimage.2003 - Hire more guards? +# pilgrimage.2004 - Run into a potential friend +# pilgrimage.2005 - A peasant inadvertedly insults you +# pilgrimage.2006 - Your pilgrimage is taking a little detour +# pilgrimage.2008 - Fall ill +# pilgrimage.2009 - Develop pneumonia +# pilgrimage.2010-5 - Meet a Mystic +# pilgrimage.2020-21 - Pilgrimage thieves +# pilgrimage.2030 - Sea: Massive rainbow +# pilgrimage.2040 - Sea: Go fish +# pilgrimage.2050 - Sea: Shipwrecked pilgrims +# +############################ +## 'Temptation' Events +## 2101-2999 +## by Bianca Savazzi & Sean Hughes +############################ +# pilgrimage.2101 - Rakish or Lustful character considers making a pit stop, or perhaps, a detour to the local brothels +# pilgrimage.2501-4 - Persistent Beggar +# pilgrimage.2511 - Cocky Lordling +# +################################ +# Religion-specific Journey Events +# 3001-3999 +# by Sean Hughes +################################ +## 3001-3100: Christianity +# pilgrimage.3001 - Zealous priest giving sermon in freezing rains +# pilgrimage.3002-3 - Naked preacher claiming to have reclaimed the lost innocence of Adam & Eve +# pilgrimage.3004 - Doomsayer claiming the end is nigh! +# +## 3101-3200: Islam +# pilgrimage.3102 - Ziyarat - Why am I taking this pilgrimage? +# +## 3201-3300: Hinduism +# pilgrimage.3201 - Ritual purification in a river +# pilgrimage.3202 - Contemplating the universe +# +## 3301-3400: Buddhism +# pilgrimage.3301 - Critical Wanderer +# pilgrimage.3302 - The Wisdom of Goats +# pilgrimage.3303 - Kalama Sutta +# +## 3401-3500: Dharmic +# pilgrimage.3401 - Brahmacharya Challenged +# +############################ +## DLC Events +## by Chad Uhl +############################ +## 6001-6010: BP1 +# pilgrimage.6001-4 - Sneaking off to a tavern with your pal +# pilgrimage.6005 - You find out your friend is a Non-Believer +# pilgrimage.6006 - You and a friend are on a pilgrimage and your friend is healed in a miracle performed by a wandering priest +# +################################ +# Hajj Arrival Event +# 3101 +################################ +# pilgrimage.3101 - Entering state of Ihram +# +################################ +## Generic Arrival Events +## 4001-4999 +## by Petter Vilberg +################################ +# pilgrimage.4001 - Generic Destination +# pilgrimage.4002 - The Mystic you met on your journey is there! +# pilgrimage.4010 - Obligatory Pilgrimage - Skip Destination Event +# pilgrimage.4020 - Bury old host at Destination +# +################################ +## Holy Site-specific destination arrival events +## 5001-5999 +## by Sean Hughes +################################ +## Christian +# pilgrimage.5001 - Rome +# pilgrimage.5011 - Jerusalem +# pilgrimage.5021 - Constantinople +# pilgrimage.5031 - Alexandria +# +## Jewish +# pilgrimage.5101 - Mount Sinai +# +## Muslim +# pilgrimage.5201 - Medina +# +## Hindu +# pilgrimage.5301 - Varanasi +# pilgrimage.5311 - Ayodhya +# pilgrimage.5321 - Mathura +# pilgrimage.5331 - Haridwar +# pilgrimage.5341 - Kanchipuram +# pilgrimage.5351 - Ujjayini +# pilgrimage.5361 - Dwarka +# +## Buddhism +# pilgrimage.5401 - Bodh Gaya +# pilgrimage.5411 - Kushinagar +# pilgrimage.5421 - Sarnath +# +## Jainism +# pilgrimage.5501 - Shikharj +# +## Zoroastrian +# pilgrimage.5601 - Ushi-darena +# +## Norse Germanic +# pilgrimage.5901 - Paderborn +# +## Tengri +# pilgrimage.5911 - Open Blue Skies +# +## Sanctity of Nature +# pilgrimage.5921 - Sacred Groves +# +################################ +## Remaining at a Holy Site events +## 6500-6999 +## by Filippa Gannholm Kirsten & Veronica Pazos +################################ +# pilgrimage.6500 - Appreciation +# pilgrimage.6510 - Lost in Translation +# pilgrimage.6520 - Time To Go Home Soon? +# pilgrimage.6530-5 - Fishy local guide? +# pilgrimage.6540 - Find some exotic wares +# pilgrimage.6750 - Repent - remove secret/coping trait +# pilgrimage.6760 - Theological debate with facts and logic +# pilgrimage.6770 - Do you wanna buy some cheeky relic? +# pilgrimage.6780 - Recruit skillful courtier +# pilgrimage.6790 - Meet local guru - trait flipping event +# pilgrimage.6800 - Entourage member feels The Calling +# pilgrimage.6810 - Do you wanna buy an indulgence? +# pilgrimage.6820 - Do you wanna buy a pilgrim's guide? - based in the Codex Calixtinus +# pilgrimage.6830 - Admire the holy site in a religious way +# pilgrimage.6840 - Ask a local priest to bless your artifact +# pilgrimage.6850 - A Master Thief +################################ +## Conclusion events +## 7000-7499 +## by Filippa Gannholm Kirsten +################################ +# pilgrimage.7000 - Summarizing our activity +# +################################ +## Return Events +## 9001-9999 +## by Petter Vilberg & Filippa Gannholm Kirsten +################################ +# pilgrimage.9001 - Nice spiritual journey +# pilgrimage.9010 - Bury old host back home +# pilgrimage.9100 - Follow-up to exotic wares event +# + + +################################################################################################################################ +## Pilgrimage Activity System Events +# 0040-0100 +## by Filippa Gannholm Kirsten +################################ +# pilgrimage.0040 - Invalidation +# pilgrimage.0042 - Invalidation because you bury old host back home +# pilgrimage.0500 - Promise your religious relative to go on a Pilgrimage +# + +#Invalidation +pilgrimage.0040 = { + type = character_event + title = pilgrimage.0040.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_variable = moved_capital_to_holy_site } + desc = pilgrimage.0040.desc_moved_capital + } + desc = pilgrimage.0040.desc + } + } + theme = travel_pilgrimage + override_background = { + trigger = { is_imprisoned = yes } + reference = dungeon + } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = moved_capital_to_holy_site } + animation = thinking + } + animation = sadness + } + immediate = { + #If our inherited Pilgrimage invalidated, remove the indicator modifier and bury them at home + if = { + limit = { has_character_modifier = pilgrimage_burial_at_destination_modifier } + remove_character_modifier = pilgrimage_burial_at_destination_modifier + add_character_flag = pilgrimage_burial_interrupted_pilgrimage + } + else = { + add_character_flag = pilgrimage_invalidated + } + } + option = { + name = { + trigger = { has_variable = moved_capital_to_holy_site } + text = pilgrimage.0040.a_moved_capital + } + name = pilgrimage.0040.a + } + after = { + remove_character_flag = pilgrim_group_joined + #Bury the old host + if = { + limit = { has_character_modifier = pilgrimage_burial_at_capital_modifier } + #Trigger burial + trigger_event = { + id = pilgrimage.9010 + days = 5 + } + } + #Our capital was moved to the holy site + if = { + limit = { exists = var:moved_capital_to_holy_site } + remove_variable = moved_capital_to_holy_site + } + } +} + +#Invalidation because you bury old host back home +pilgrimage.0042 = { + type = character_event + title = pilgrimage.0042.t + desc = pilgrimage.0042.desc + theme = travel_pilgrimage + override_background = { reference = army_camp } + left_portrait = { + character = root + animation = sadness + } + lower_left_portrait = { + character = scope:old_pilgrimage_host + } + immediate = { + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + } + option = { + name = pilgrimage.0042.a + #Trigger burial + trigger_event = { + id = pilgrimage.9010 + days = 5 + } + } +} + +scripted_trigger pilgrimage_0500_valid_holy_site_trigger = { + #... we really shouldn't talk about the holy site we might be _in_ right now / invalid capital_province holy site + NOR = { + this = root.location.barony + AND = { + exists = capital_province + this = capital_province.barony + } + } +} + +#Promise your dying religious relative to go on a Pilgrimage +pilgrimage.0500 = { + type = character_event + title = pilgrimage.0500.t + desc = pilgrimage.0500.desc + theme = death + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:pilgrimage_dying_relative + animation = sick + } + cooldown = { years = 10 } + trigger = { + any_close_family_member = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_best_good_relationship_with_character_trigger = { CHARACTER = root } + opinion = { + target = root + value >= 40 + } + } + OR = { + health <= death_chance_dying_health + has_trait = incapable + has_trait = infirm + } + OR = { + AND = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + ai_zeal >= 50 + } + is_adult = yes + faith = root.faith + has_trait = pilgrim + } + is_available_healthy_adult = yes + #Forbidden from pilgrimages? No pilgrimage for you! + faith = { + NOT = { has_doctrine_parameter = forbidden_from_pilgrimage } + any_holy_site = { + pilgrimage_0500_valid_holy_site_trigger = yes + save_temporary_scope_as = holy_site_check + } + any_holy_site = { + pilgrimage_0500_valid_holy_site_trigger = yes + this != scope:holy_site_check + } + } + #This really should take care of most Hajj/Pilgrim-related trigger checks - if you don't have this trait, you haven't been pilgrimming before + NOR = { + has_trait = pilgrim + has_trait = hajjaj + } + #Only one modifier for _you_ + NOR = { + has_character_modifier = ghost_pilgrimage_promised_modifier + has_character_modifier = hajj_promised_modifier + has_character_modifier = pilgrimage_promised_modifier + } + } + immediate = { + random_close_family_member = { + limit = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_best_good_relationship_with_character_trigger = { CHARACTER = root } + } + OR = { + health <= death_chance_dying_health + has_trait = incapable + has_trait = infirm + } + is_adult = yes + faith = root.faith + has_trait = pilgrim + } + save_scope_as = pilgrimage_dying_relative + } + scope:pilgrimage_dying_relative = { + if = { + limit = { + NOT = { has_character_flag = use_sickness_clothes } + } + add_character_flag = use_sickness_clothes + } + } + #Some loc flavor + faith = { + random_holy_site = { + limit = { pilgrimage_0500_valid_holy_site_trigger = yes } + save_scope_as = first_holy_site + } + random_holy_site = { + limit = { + pilgrimage_0500_valid_holy_site_trigger = yes + this != scope:first_holy_site + } + save_scope_as = second_holy_site + } + } + } + #Hajj it is + option = { + name = pilgrimage.0500.a + scope:pilgrimage_dying_relative = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + custom_tooltip = { + text = pilgrimage.0500.a.tt_pilgrimage + add_character_modifier = pilgrimage_promised_modifier + } + add_piety = miniscule_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } + #Erm... no. + option = { + name = pilgrimage.0500.b + scope:pilgrimage_dying_relative = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = zealous + } + factor = 0 + } + } + } + after = { + scope:pilgrimage_dying_relative ?= { + if = { + limit = { + has_character_flag = use_sickness_clothes + } + remove_character_flag = use_sickness_clothes + } + } + } +} + +############################ +## Generic Journey Events +# 1001-6100 +## by Petter Vilberg & Filippa Gannholm Kirsten & Joe Parkin +############################ +# pilgrimage.1100 - Sea: Saint Elmo's Fire +# pilgrimage.1110 - Heathen Raiders +# pilgrimage.1120 - Tour Church +# pilgrimage.1130 - Roadside Shrine +# pilgrimage.1140 - Strength in Numbers +# pilgrimage.2002 - Heathen-hating adherent challenges you +# pilgrimage.2003 - Hire more guards? +# pilgrimage.2004 - Run into a potential friend +# pilgrimage.2005 - A peasant inadvertedly insults you +# pilgrimage.2006 - Your pilgrimage is taking a little detour +# pilgrimage.2008 - Fall ill +# pilgrimage.2009 - Develop pneumonia +# pilgrimage.2010-5 - Meet a Mystic +# pilgrimage.2020-21 - Pilgrimage thieves +# pilgrimage.2030 - Sea: Massive rainbow +# pilgrimage.2040 - Sea: Go fish +# pilgrimage.2050 - Sea: Shipwrecked pilgrims +# + +scripted_effect pilgrimage_st_elmo_success_effect = { + random_list = { + 7 = { + show_chance = no + desc = pilgrimage.1100.success + modifier = { add = scope:duel_variety } + send_interface_toast = { + title = pilgrimage.1100.success + current_travel_plan = { + add_destination_progress = { days = 5 } + } + } + } + 7 = { + show_chance = no + desc = pilgrimage.1100.failure + modifier = { + add = { + value = 0 + subtract = scope:duel_variety + } + } + send_interface_toast = { + title = pilgrimage.1100.failure + current_travel_plan = { + delay_travel_plan = { days = 90 } + } + } + } + } +} + +#Sea: Saint Elmo's Fire +# by Joe Parkin +pilgrimage.1100 = { + type = character_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + has_cultural_tradition = tradition_byzantine_succession + has_cultural_tradition = tradition_ep3_roman_ceremonies + } + } + } + desc = pilgrimage.1100.t.greek + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = pilgrimage.1100.t.christian + } + triggered_desc = { + trigger = { + faith = { has_doctrine = unreformed_faith_doctrine } + } + desc = pilgrimage.1100.t.pagan + } + desc = pilgrimage.1100.t + } + } + } + desc = { + desc = pilgrimage.1100.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:panicked_pilgrim } + desc = pilgrimage.1100.companion + } + desc = pilgrimage.1100.alone + } + } + theme = travel_pilgrimage + override_background = { reference = terrain } + right_portrait = { + character = scope:panicked_pilgrim + animation = fear + } + left_portrait = { + character = root + animation = shock + } + cooldown = { years = 10 } + + trigger = { + is_travelling = yes + location = { + has_sea_danger_type = { TRAVEL = root.current_travel_plan } + } + current_travel_plan = { + any_entourage_character = { + count > 4 + } + any_entourage_character = { + NOR = { + this = root + has_trait = brave + has_trait = zealous + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + NOR = { + this = root + has_trait = brave + has_trait = zealous + } + } + weight = { + base = 1 + modifier = { + has_trait = craven + add = 10 + } + modifier = { + has_trait = cynical + add = 10 + } + } + save_scope_as = panicked_pilgrim + } + random_entourage_character = { + limit = { + this != root + } + alternative_limit = { always = yes } + save_scope_as = victim_pilgrim + } + random_entourage_character = { + limit = { + NOR = { + this = root + this = scope:victim_pilgrim + is_spouse_of = root + is_close_family_of = root + is_landed = yes + } + is_lowborn = yes + } + alternative_limit = { + NOR = { + this = root + this = scope:victim_pilgrim + is_spouse_of = root + is_close_family_of = root + is_landed = yes + } + } + alternative_limit = { + NOR = { + this = root + this = scope:victim_pilgrim + } + } + alternative_limit = { + this != root + } + save_scope_as = sacrifice_pilgrim + } + } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + + option = { # Look, god guides our path + name = pilgrimage.1100.a + add_piety = minor_piety_gain + scope:panicked_pilgrim = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + if = { + limit = { exists = scope:victim_pilgrim } + random = { + chance = 50 + custom_tooltip = { + text = pilgrimage_random_pilgrim_tt + send_interface_toast = { + title = pilgrimage_fell_overboard_tt + left_icon = scope:victim_pilgrim + scope:victim_pilgrim = { + death = { death_reason = death_drowned } + every_close_family_member = { + custom = every_family_member_tt + limit = { + this != root + } + add_opinion = { + target = root + modifier = accidentally_killed_family_opinion + opinion = -15 + } + } + } + } + } + } + } + pious_type_option_effect = yes + pilgrimage_st_elmo_success_effect = yes + stress_impact = { + craven = minor_stress_impact_gain + cynical = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + } + } + } + + option = { # Climb rigging + name = pilgrimage.1100.b + trigger = { + OR = { + has_trait = lunatic_1 + has_trait = lunatic_genetic + has_trait = possessed_1 + has_trait = possessed_genetic + } + } + flavor = pilgrimage.1100.b.flavor + trait = lunatic_1 + trait = lunatic_genetic + add_piety = medium_piety_gain + duel = { + skill = prowess + value = medium_skill_rating + 50 = { + modifier = { add = scope:duel_variety } + modifier = { + factor = 1.5 + has_trait = athletic + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + send_interface_toast = { + title = pilgrimage.1100.b.success.t + left_icon = root + add_character_modifier = { + modifier = pilgrimage_touched_divine_modifier + years = 10 + } + } + } + 30 = { + modifier = { + factor = 1.5 + has_trait = wounded + } + modifier = { + factor = 1.5 + has_trait = one_legged + } + modifier = { + factor = 1.5 + has_trait = one_eyed + } + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = 5 + } + send_interface_toast = { + title = pilgrimage.1100.b.wounded.t + left_icon = root + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + death = { death_reason = death_drowned } + } + } + pilgrimage_st_elmo_success_effect = yes + stress_impact = { + base = major_stress_impact_loss + craven = medium_stress_impact_gain + cynical = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = -1 + ai_zeal = 0.5 + } + } + } + + option = { # Sacrifice + name = pilgrimage.1100.c + trigger = { + faith = { + OR = { + has_doctrine = unreformed_faith_doctrine + has_doctrine_parameter = gruesome_festivals_active + has_doctrine_parameter = human_sacrifice_active + } + } + exists = scope:sacrifice_pilgrim + } + flavor = pilgrimage.1100.c.flavor + add_piety = medium_piety_gain + scope:sacrifice_pilgrim = { + death = { death_reason = death_drowned } + every_close_family_member = { + custom = every_family_member_tt + add_opinion = { + target = root + modifier = executed_close_family + opinion = -15 + } + } + } + pilgrimage_st_elmo_success_effect = yes + stress_impact = { + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = -1 + ai_zeal = 0.5 + } + } + } + + option = { # We must turn back! + name = pilgrimage.1100.d + scope:panicked_pilgrim = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + current_travel_plan = { + delay_travel_plan = { days = 90 } + } + stress_impact = { + brave = minor_stress_impact_gain + zealous = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_boldness = -0.5 + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +scripted_trigger pilgrim_heathen_raider_trigger = { + # Landless + is_landed = no + # No claims + NOT = { + any_claim = {} + } + # No house + is_lowborn = yes + # Faith is hostile to traveler's + faith = { + faith_hostility_level = { + target = root.faith + value > 1 + } + } + # Is martial gender for own culture/faith + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this } + # Is a military person of some sort + OR = { + number_of_commander_traits > 1 + has_trait = education_martial + } +} + +#Heathen Raiders +# by Joe Parkin +pilgrimage.1110 = { + type = character_event + title = pilgrimage.1110.t + desc = { + desc = pilgrimage.1110.desc + first_valid = { + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = title:b_makka + this = root.involved_activity.activity_location.barony + county.county_controller.religion = scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_heathen_hajj + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = title:b_makka + this = root.involved_activity.activity_location.barony + county.county_controller.religion = root.religion + county.county_controller.religion != scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_controlled_hajj + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = title:b_jerusalem + this = root.involved_activity.activity_location.barony + county.county_controller.religion = scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_heathen_jerusalem + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = title:b_jerusalem + this = root.involved_activity.activity_location.barony + county.county_controller.religion = root.religion + county.county_controller.religion != scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_controlled_jerusalem + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = root.involved_activity.activity_location.barony + county.county_controller.religion = scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_heathen + } + triggered_desc = { + trigger = { + scope:shared_holy_site ?= { + this = root.involved_activity.activity_location.barony + county.county_controller.religion = root.religion + county.county_controller.religion != scope:heathen_raider.religion + } + } + desc = pilgrimage.1110.shared_target_controlled + } + desc = pilgrimage.1110.fallback + } + } + theme = travel_pilgrimage + override_background = { reference = terrain } + right_portrait = { + character = scope:heathen_raider + animation = marshal + } + cooldown = { years = 1 } + + trigger = { + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + location.county = { + faith = { + faith_hostility_level = { target = root.faith value > 1 } + } + holder = { + NOR = { + this = root + any_liege_or_above = { this = root } + } + } + } + current_travel_plan = { + any_entourage_character = { + this != root + count >= 2 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.5 + location.county.faith = { has_doctrine = tenet_dharmic_pacifism } + } + } + + immediate = { + location.county = { save_scope_as = heathen_raider_county } + location.county.holder.top_liege = { save_scope_as = county_liege } + # Save or create a heathen raider + random_list = { + 9 = { + trigger = { # Does a valid heather raider exist in the county? + any_pool_character = { + province = root.location + pilgrim_heathen_raider_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrim_heathen_raider_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + has_trait = reaver + } + } + save_scope_as = heathen_raider + if = { + limit = { + location != root.location + } + hidden_effect = { move_to_pool_at = root.location } + } + } + } + 1 = { + create_character = { + template = new_raider_character + culture = root.location.culture + faith = root.location.faith + dynasty = none + location = root.location + gender_female_chance = scope:county_liege.root_soldier_female_chance + save_scope_as = heathen_raider + } + } + } + scope:heathen_raider = { + add_character_flag = wear_armor + } + # Save potential victim + current_travel_plan = { + random_entourage_character = { + limit = { + this != root + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + alternative_limit = { + this != root + } + weight = { + base = 1 + modifier = { + factor = 2 + prowess < decent_skill_rating + } + modifier = { + factor = 0 + has_trait = wounded + } + } + save_scope_as = victim_pilgrim_1 + } + if = { + limit = { exists = scope:victim_pilgrim_1 } + random_entourage_character = { + limit = { + NOR = { + this = root + this = scope:victim_pilgrim_1 + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + alternative_limit = { + this != root + } + weight = { + base = 1 + modifier = { + factor = 2 + prowess < decent_skill_rating + } + modifier = { + factor = 0 + has_trait = wounded + } + } + save_scope_as = victim_pilgrim_2 + } + } + } + # Does raider faith share the holy site? + involved_activity.activity_location.barony = { + if = { + limit = { is_holy_site_of = scope:heathen_raider.faith } + save_scope_as = shared_holy_site + } + } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + # Come on then + option = { + name = pilgrimage.1110.a + duel = { + skill = martial + target = scope:heathen_raider + 20 = { + desc = pilgrimage.1110.a.fled + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = 5 + } + modifier = { + add = { + value = dread + divide = 6 + } + } + modifier = { + current_travel_plan = { num_entourage_characters >= 15 } + factor = 1.5 + } + modifier = { + current_travel_plan = { + num_entourage_characters < 15 + num_entourage_characters > 8 + } + factor = 1.3 + } + modifier = { + current_travel_plan = { + num_entourage_characters < 8 + num_entourage_characters > 4 + } + factor = 1.1 + } + send_interface_toast = { + title = pilgrimage.1110.a.fled + left_icon = scope:heathen_raider + add_dread = minor_dread_gain + add_prestige = minor_prestige_gain + } + } + 20 = { + desc = pilgrimage.1110.a.skirmish + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + show_as_tooltip = { add_prestige = miniscule_prestige_gain } + if = { + limit = { exists = scope:victim_pilgrim_2 } + custom_tooltip = two_entourage_members_wounded_tt + } + else = { custom_tooltip = one_entourage_members_wounded_tt } + hidden_effect = { + send_interface_toast = { + title = pilgrimage.1110.a.skirmish + left_icon = scope:victim_pilgrim_1 + right_icon = scope:victim_pilgrim_2 + add_prestige = miniscule_prestige_gain + if = { + limit = { exists = scope:victim_pilgrim_2 } + scope:victim_pilgrim_2 = { + random = { + chance = 50 + modifier = { + add = { + value = 0 + subtract = prowess + } + } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + } + if = { + limit = { exists = scope:victim_pilgrim_1 } + scope:victim_pilgrim_1 = { + random = { + chance = 50 + modifier = { + add = { + value = 0 + subtract = prowess + } + } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + } + else = { + random = { + chance = 50 + modifier = { + add = { + value = 0 + subtract = prowess + } + } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + } + } + } + 5 = { + desc = pilgrimage.1110.a.beaten + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + modifier = { + current_travel_plan = { num_entourage_characters >= 15 } + factor = 0.5 + } + modifier = { + current_travel_plan = { + num_entourage_characters < 15 + num_entourage_characters > 8 + } + factor = 0.7 + } + modifier = { + current_travel_plan = { + num_entourage_characters < 8 + num_entourage_characters > 4 + } + factor = 0.9 + } + show_as_tooltip = { + add_prestige = minor_prestige_loss + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 50 + } + } + } + if = { + limit = { exists = scope:victim_pilgrim_2 } + custom_tooltip = two_entourage_members_die_tt + } + else = { custom_tooltip = one_entourage_members_die_tt } + hidden_effect = { + send_interface_toast = { + title = pilgrimage.1110.a.beaten + left_icon = scope:victim_pilgrim_1 + right_icon = scope:victim_pilgrim_2 + add_prestige = minor_prestige_loss + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 50 + } + } + if = { + limit = { exists = scope:victim_pilgrim_2 } + scope:victim_pilgrim_2 = { + random_list = { + 50 = { + modifier = { add = prowess } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + 50 = { + death = { death_reason = death_pilgrimage_bandit_attack } + } + } + } + } + if = { + limit = { exists = scope:victim_pilgrim_1 } + scope:victim_pilgrim_1 = { + random_list = { + 50 = { + modifier = { add = prowess } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + 50 = { + death = { death_reason = death_pilgrimage_bandit_attack } + } + } + } + } + else = { + random_list = { + 50 = { + modifier = { add = prowess } + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + 50 = { + death = { death_reason = death_pilgrimage_bandit_attack } + } + } + } + } + } + } + } + add_internal_flag = dangerous + stress_impact = { + craven = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 1 + } + } + } + # Leave us in peace + option = { + name = { + trigger = { religion = scope:heathen_raider.religion } + text = pilgrimage.1110.b.religion + } + name = { + trigger = { + NOT = { + faith = { has_doctrine = unreformed_faith_doctrine } + } + scope:heathen_raider.faith = { has_doctrine = unreformed_faith_doctrine } + } + text = pilgrimage.1110.b.unreformed + } + name = { + trigger = { + religion != scope:heathen_raider.religion + NAND = { + NOT = { + faith = { has_doctrine = unreformed_faith_doctrine } + } + scope:heathen_raider.faith = { has_doctrine = unreformed_faith_doctrine } + } + } + text = pilgrimage.1110.b + } + duel = { + skill = diplomacy + target = scope:heathen_raider + 5 = { + desc = pilgrimage.1110.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + modifier = { + has_perk = zealous_proselytizer_perk + factor = 2 + } + send_interface_toast = { + title = pilgrimage.1110.c.success + left_icon = scope:heathen_raider + add_piety = minor_piety_gain + } + } + 5 = { + desc = pilgrimage.1110.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + send_interface_toast = { + title = pilgrimage.1110.c.failure + left_icon = scope:heathen_raider + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 50 + } + } + } + } + } + stress_impact = { + wrathful = minor_stress_impact_gain + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -0.5 + } + } + } + # Join me, God is pretty cool + option = { + name = pilgrimage.1110.c + trigger = { + OR = { + AND = { + NOT = { + faith = { has_doctrine = unreformed_faith_doctrine } + } + scope:heathen_raider.faith = { has_doctrine = unreformed_faith_doctrine } + } + scope:heathen_raider.religion = root.religion + } + } + duel = { + skill = learning + target = scope:heathen_raider + 10 = { + desc = pilgrimage.1110.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + modifier = { + scope:heathen_raider = { has_trait = cynical } + add = 5 + } + send_interface_toast = { + title = pilgrimage.1110.c.success + left_icon = scope:heathen_raider + scope:heathen_raider = { + hidden_effect = { set_character_faith_with_conversion = root.faith } + set_character_faith = root.faith + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:heathen_raider + NEW_COURT_OWNER = root + } + spawn_army = { + name = event_troop_default_name + levies = 250 + location = root.location + origin = root.location + } + } + } + 10 = { + desc = pilgrimage.1110.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + modifier = { + scope:heathen_raider = { has_trait = zealous } + add = 5 + } + send_interface_toast = { + title = pilgrimage.1110.c.failure + left_icon = scope:heathen_raider + add_prestige = minor_prestige_loss + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 50 + } + } + } + } + } + stress_impact = { + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + ai_rationality = 0.5 + } + } + } + + option = { # Take your damned money + name = pilgrimage.1110.d + pay_short_term_gold = { + target = scope:heathen_raider + gold = { + value = medium_gold_value + max = 25 + } + } + stress_impact = { + brave = medium_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 0.5 + } + } + } + after = { + scope:heathen_raider = { + remove_character_flag = wear_armor + } + } +} + +scripted_trigger pilgrim_admire_temple_person_trigger = { + # Landless + is_landed = no + # No claims + NOT = { + any_claim = {} + } + # No house + is_lowborn = yes + # Faith is same as traveler's + faith = root.location.faith + # Is a priestly person of some sort + OR = { + has_trait = education_learning + has_trait = devoted + has_trait = theologian + is_clergy = yes + } + trigger_if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_male } + } + is_male = yes + } + trigger_if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_female } + } + is_female = yes + } +} + +#Tour Church +# by Joe Parkin +pilgrimage.1120 = { + type = character_event + title = pilgrimage.1120.t + desc = pilgrimage.1120.desc + theme = travel_pilgrimage + override_background = { reference = holy_site_generic } + left_portrait = { + character = scope:temple_person + animation = chaplain + } + lower_right_portrait = scope:temple_liege + cooldown = { years = 1 } + + trigger = { + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + # Not at the target destination of the pilgrimage + involved_activity.activity_location != root.location + location = { + has_holding_type = church_holding + county = { + development_level >= 5 + faith = { + religion = root.religion + faith_hostility_level = { target = root.faith value <= 1 } + } + holder = { + NOR = { + this = root + any_liege_or_above = { this = root } + } + } + save_temporary_scope_as = temple_faith + } + } + faith = { + faith_hostility_level = { target = scope:temple_faith.faith value <= 1 } + } + } + + weight_multiplier = { + base = 1 + modifier = { + location.barony = { is_holy_site_of = root.faith } + add = 10 + } + modifier = { + location = { has_special_building = yes } + add = 10 + } + modifier = { + add = { + value = location.county.development_level + divide = 4 + } + } + } + + immediate = { + location = { save_scope_as = temple_province } + # Save or create a temple person + random_list = { + 9 = { + trigger = { # Does a valid temple person exist in the county? + any_pool_character = { + province = scope:temple_province + pilgrim_admire_temple_person_trigger = yes + } + } + random_pool_character = { + province = scope:temple_province + limit = { pilgrim_admire_temple_person_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + is_clergy = yes + } + } + save_scope_as = temple_person + if = { + limit = { + location != root.location + } + hidden_effect = { move_to_pool_at = root.location } + } + } + } + 1 = { + create_character = { + template = priest_character_template + culture = root.location.culture + faith = root.location.faith + dynasty = none + location = root.location + gender_female_chance = root_faith_clergy_gender_female_chance + save_scope_as = temple_person + } + } + } + location.county.holder.top_liege = { save_scope_as = temple_liege } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + + option = { # Architect insights + name = pilgrimage.1120.a + trigger = { has_trait = architect } + trait = architect + add_character_modifier = { + modifier = pilgrimage_temple_architect_modifier + years = 5 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + ai_energy = 1 + } + } + } + + option = { # Pray + name = pilgrimage.1120.e + add_piety = miniscule_piety_gain + pious_type_option_effect = yes + stress_impact = { + cynical = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_sociability = 0.5 + ai_zeal = 1 + } + } + } + + option = { # Insult place + name = pilgrimage.1120.c + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:temple_liege + modifier = annoyed_opinion + opinion = -10 + } + stress_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Leave + name = pilgrimage.1120.d + stress_impact = { + patient = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.5 + ai_zeal = 0.5 + } + } + } + after = { + scope:temple_person = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger pilgrimage_1130_pro_character_trigger = { + faith = root.location.faith + this != root + age > 5 +} + +scripted_trigger pilgrimage_1130_anti_character_trigger = { + faith != root.location.faith + this != root + age > 5 +} + +#Roadside Shrine +# by Joe Parkin +pilgrimage.1130 = { + type = character_event + title = pilgrimage.1130.t + desc = { + desc = pilgrimage.1130.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:shrine_faithist + exists = scope:shrine_mocker + } + desc = pilgrimage.1130.both + } + triggered_desc = { + trigger = { exists = scope:shrine_faithist } + desc = pilgrimage.1130.faithist + } + triggered_desc = { + trigger = { exists = scope:shrine_mocker } + desc = pilgrimage.1130.mocker + } + } + } + theme = travel_pilgrimage + override_background = { reference = terrain } + left_portrait = { + character = scope:shrine_faithist + animation = throne_room_bow_1 + } + right_portrait = { + character = scope:shrine_mocker + animation = eyeroll + } + cooldown = { years = 1 } + + trigger = { + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + # Not at the target destination of the pilgrimage + involved_activity.activity_location != root.location + location = { + county = { + holder = { + NOR = { + this = root + any_liege_or_above = { this = root } + } + } + save_temporary_scope_as = temple_faith + } + } + current_travel_plan = { + OR = { + any_entourage_character = { pilgrimage_1130_pro_character_trigger = yes } + any_entourage_character = { pilgrimage_1130_anti_character_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.75 + location.county.development_level >= 10 + } + } + + immediate = { + save_scope_as = shrine_visitor + location = { save_scope_as = shrine_province } + current_travel_plan = { + # Save a shrine faithist + if = { + limit = { + any_entourage_character = { pilgrimage_1130_pro_character_trigger = yes } + } + random_entourage_character = { + limit = { + pilgrimage_1130_pro_character_trigger = yes + is_of_major_interest_to_root_trigger = yes + } + alternative_limit = { + pilgrimage_1130_pro_character_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + alternative_limit = { pilgrimage_1130_pro_character_trigger = yes } + weight = { + base = 1 + modifier = { + has_trait = zealous + add = 10 + } + modifier = { + has_trait = cynical + factor = 0 + } + } + save_scope_as = shrine_faithist + } + } + # Save a shrine mocker + if = { + limit = { + any_entourage_character = { pilgrimage_1130_anti_character_trigger = yes } + } + random_entourage_character = { + limit = { + pilgrimage_1130_anti_character_trigger = yes + is_of_major_interest_to_root_trigger = yes + } + limit = { + pilgrimage_1130_anti_character_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + alternative_limit = { pilgrimage_1130_anti_character_trigger = yes } + weight = { + base = 1 + modifier = { + has_trait = arrogant + add = 10 + } + modifier = { + has_trait = humble + factor = 0 + } + } + save_scope_as = shrine_mocker + } + } + } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + # Stop to pray + option = { + name = pilgrimage.1130.a + trigger = { location.faith = root.faith } + remove_treasury_or_gold = 5 + add_piety = miniscule_piety_gain + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + improvident = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + ai_energy = 1 + } + } + } + # Steal de moolah + option = { + name = pilgrimage.1130.b + flavor = pilgrimage.1130.b.flavor + add_gold = { + value = tiny_gold_value + max = 15 + } + if = { + limit = { faith = root.location.faith } + add_piety = medium_piety_loss + } + current_travel_plan = { + every_entourage_character = { + limit = { + faith = root.location.faith + this != root + } + custom = every_root_faith_entourage_member_tt + add_opinion = { + target = root + modifier = shrine_pilferer_opinion + } + } + } + if = { + limit = { exists = scope:shrine_mocker } + reverse_add_opinion = { + target = scope:shrine_mocker + modifier = shrine_pilferer_opinion + opinion = 10 + } + } + if = { + limit = { location.faith = root.faith } + stress_impact = { + base = minor_stress_impact_gain + zealous = medium_stress_impact_gain + just = medium_stress_impact_gain + cynical = minor_stress_impact_loss + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + } + else = { + stress_impact = { + zealous = minor_stress_impact_gain + just = minor_stress_impact_gain + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_sociability = 0.5 + ai_zeal = 1 + } + } + } + # Desecrate de shrine + option = { + name = pilgrimage.1130.c + trigger = { + location.faith != root.faith + } + flavor = pilgrimage.1130.c.flavor + add_piety = minor_piety_gain + current_travel_plan = { + every_entourage_character = { + limit = { + NOR = { + faith = root.location.faith + this = root + } + has_trait = zealous + } + custom = every_zealous_root_faith_entourage_member_tt + add_opinion = { + target = root + modifier = shrine_desecrater_opinion + opinion = 15 + } + } + every_entourage_character = { + limit = { + faith = root.location.faith + this != root + } + custom = every_province_faith_entourage_member_tt + add_opinion = { + target = root + modifier = shrine_desecrater_opinion + } + } + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_zeal = 0.5 + ai_compassion = -0.5 + } + } + } + # Mock de prayer + option = { + name = pilgrimage.1130.d + trigger = { + exists = scope:shrine_faithist + faith != scope:shrine_faithist.faith + } + flavor = pilgrimage.1130.d.flavor + reverse_add_opinion = { + target = scope:shrine_faithist + modifier = insulted_opinion + opinion = -10 + } + if = { + limit = { exists = scope:shrine_mocker } + progress_towards_friend_effect = { + REASON = friend_mocked_heathen_together + CHARACTER = scope:shrine_mocker + OPINION = default_friend_opinion + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.5 + ai_zeal = 0.5 + } + } + } + # Insult de mocker + option = { + name = pilgrimage.1130.e + trigger = { + exists = scope:shrine_mocker + faith = scope:shrine_province.faith + } + reverse_add_opinion = { + target = scope:shrine_mocker + modifier = insulted_opinion + opinion = -10 + } + if = { + limit = { exists = scope:shrine_faithist } + progress_towards_friend_effect = { + REASON = friend_rebuffed_heathen + CHARACTER = scope:shrine_faithist + OPINION = default_friend_opinion + } + } + stress_impact = { + shy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.5 + ai_zeal = 0.5 + } + } + } + # Leave + option = { + name = { + text = pilgrimage.1130.f + trigger = { faith = scope:shrine_province.faith } + } + name = { + text = pilgrimage.1130.f.other + trigger = { + faith != scope:shrine_province.faith + } + } + if = { + limit = { faith = scope:shrine_province.faith } + add_piety = minor_piety_loss + } + if = { + limit = { exists = scope:shrine_faithist } + reverse_add_opinion = { + target = scope:shrine_faithist + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + generous = minor_stress_impact_gain + profligate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.5 + ai_zeal = 0.5 + } + } + } +} + +scripted_trigger pilgrim_group_leader_trigger = { + is_available = yes + # Landless + is_landed = no + # No claims + NOT = { + any_claim = {} + } + # No house + is_lowborn = yes + # Faith is same as root's + faith = root.faith + # Dominant gender + trigger_if = { + limit = { + faith = { has_doctrine_parameter = male_dominated_law } + } + is_male = yes + } + trigger_else_if = { + limit = { + faith = { has_doctrine_parameter = female_dominated_law } + } + is_female = yes + } + trigger_else = { always = yes } +} + +#Strength in Numbers +# by Joe Parkin +pilgrimage.1140 = { + type = character_event + title = pilgrimage.1140.t + desc = pilgrimage.1140.desc + theme = travel_pilgrimage + override_background = { reference = terrain_travel } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = zealous } + animation = personality_zealous + } + triggered_animation = { + trigger = { + OR = { + has_trait = lunatic + has_trait = possessed + } + } + animation = personality_irrational + } + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + animation = personality_coward + } + triggered_animation = { + trigger = { has_trait = callous } + animation = personality_callous + } + animation = personality_content + } + right_portrait = { + character = scope:group_leader + animation = beg + } + cooldown = { years = 1 } + + trigger = { + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + current_travel_plan = { + # Not just left + next_destination_progress >= 0.2 + # Not super close to arrival + next_destination_progress < 0.75 + } + # Not at the target destination of the pilgrimage + involved_activity.activity_location != root.location + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = location.county.development_level + divide = 4 + } + } + } + + immediate = { + involved_activity.activity_location = { save_scope_as = destination } + # Save a culture for the pilgrim leader + hidden_effect = { + random_list = { + 10 = { + location.culture = { save_scope_as = pilgrim_culture } + } + 10 = { + culture = { save_scope_as = pilgrim_culture } + } + } + } + # Save or create a pilgrim leader + random_list = { + 9 = { + trigger = { # Does a valid pilgrim leader exist in the county? + any_pool_character = { + province = root.location + pilgrim_group_leader_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrim_group_leader_trigger = yes } + save_scope_as = group_leader + if = { + limit = { + location != root.location + } + hidden_effect = { move_to_pool_at = root.location } + } + } + } + 1 = { + create_character = { + template = generic_peasant_character + culture = root.culture + faith = root.faith + dynasty = none + location = root.location + gender_female_chance = root_faith_dominant_gender_female_chance + save_scope_as = group_leader + } + } + } + scope:group_leader = { add_character_flag = peasant_pilgrim_leader } + save_scope_value_as = { + name = duel_variety + value = { 1 4 } + } + } + # Welcome them + option = { + name = pilgrimage.1140.a + remove_short_term_gold = 10 + add_piety = minor_piety_gain + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:group_leader + NEW_COURT_OWNER = root + } + current_travel_plan = { + add_travel_plan_modifier = { modifier = pilgrim_group_joined_modifier } + } + add_character_flag = pilgrim_group_joined + stress_impact = { + shy = minor_stress_impact_gain + greedy = minor_stress_impact_gain + improvident = minor_stress_impact_gain + callous = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_sociability = 0.5 + ai_greed = -0.5 + } + } + } + # Culture turn away + option = { + name = pilgrimage.1140.b + trigger = { + culture != scope:group_leader.culture + } + flavor = pilgrimage.1140.b.flavor + add_prestige = minor_prestige_gain + culture = { + change_cultural_acceptance = { + target = scope:group_leader.culture + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_rejected_pilgrims + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = 0.5 + ai_rationality = -0.5 + } + } + } + # Provision them + option = { + name = pilgrimage.1140.c + add_piety = miniscule_piety_gain + remove_short_term_gold = 20 + stress_impact = { + greedy = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + improvident = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = 0.5 + ai_rationality = -0.5 + } + } + } + # Turn away + option = { + name = pilgrimage.1140.d + flavor = pilgrimage.1140.d.flavor + add_prestige = miniscule_prestige_gain + stress_impact = { + compassionate = minor_stress_impact_gain + improvident = minor_stress_impact_gain + generous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = 0.5 + } + } + } + after = { + scope:group_leader = { + silent_disappearance_ai_effect = yes + } + } +} + +#Heathen-hating adherent challenges you +# by Petter Vilberg +pilgrimage.2002 = { + type = character_event + title = pilgrimage.2002.t + desc = pilgrimage.2002.desc + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:heathen_hater + animation = anger + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + religion = { + is_in_family = rf_abrahamic + } + current_travel_plan ?= { + any_entourage_character = { + is_physically_able_ai_adult = yes + NOR = { + this = root + has_trait = cynical + is_courtier_of = root + } + } + } + } + immediate = { + random_dummy_gender_effect = yes + current_travel_plan = { + random_entourage_character = { + limit = { + is_physically_able_ai_adult = yes + NOR = { + this = root + has_trait = cynical + is_courtier_of = root + } + } + weight = { + base = 1 + # Try to find someone relevant + modifier = { + has_trait = zealous + add = 2 + } + modifier = { + has_trait_malicious_trigger = yes + add = 2 + } + } + save_scope_as = heathen_hater + } + } + } + option = { # Zealous: YOU ARE ABSOLUTELY RIGHT + name = pilgrimage.2002.c + trigger = { + has_trait = zealous + } + trait = zealous + pious_type_option_effect = yes + add_piety = minor_piety_gain + add_character_modifier = { + modifier = pilgrimage_disdainful_towards_faiths_modifier + years = 10 + } + scope:heathen_hater = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 30 + } + } + ai_chance = { + base = 500 + } + } + # Are they truly all that bad? + option = { + name = pilgrimage.2002.a + worldly_type_option_effect = yes + add_character_modifier = { + modifier = pilgrimage_sympathetic_towards_faiths_modifier + years = 10 + } + scope:heathen_hater = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + NOT = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + stress_impact = { + zealous = major_stress_impact_gain + } + } + stress_impact = { + craven = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + # Of course + option = { + name = pilgrimage.2002.b + add_character_modifier = { + modifier = pilgrimage_disdainful_towards_faiths_modifier + years = 10 + } + scope:heathen_hater = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + stress_impact = { + cynical = minor_stress_impact_gain + trusting = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_compassion = -1 + } + } + } +} + +scripted_trigger 2002_local_prowess_character_trigger = { + is_available_healthy_ai_adult = yes + prowess >= high_skill_rating + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this } +} +#Hire more guards? +# by Petter Vilberg & Filippa Gannholm Kirsten +pilgrimage.2003 = { + type = character_event + title = pilgrimage.2003.t + desc = pilgrimage.2003.desc + theme = travel_pilgrimage + override_background = { reference = terrain_travel } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:2002_local_warrior + animation = marshal + } + cooldown = { years = 2} + trigger = { + current_travel_plan = { next_destination_progress > 0.5 } + is_location_valid_for_travel_event_on_land = yes + } + weight_multiplier = { + base = 1 + modifier = { + current_travel_plan = { has_travel_option = hire_experienced_mercenaries_option } + add = -0.5 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value < 20 + } + } + add = 0.2 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value < 40 + } + } + add = 0.2 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value < 60 + } + } + add = 0.2 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value < 80 + } + } + add = 0.2 + } + modifier = { + location = { + travel_danger_value = { + target = root.current_travel_plan + value = 100 + } + } + add = 0.2 + } + } + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + 2002_local_prowess_character_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { 2002_local_prowess_character_trigger = yes } + save_scope_as = 2002_local_warrior + } + } + else = { + create_character = { + template = new_warrior_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + gender_female_chance = root_soldier_female_chance + prowess = { medium_skill_rating high_skill_rating } + save_scope_as = 2002_local_warrior + } + scope:2002_local_warrior = { add_character_flag = created_warrior } + } + } + #Hire more guards + option = { + name = pilgrimage.2003.a + trigger = { + current_travel_plan = { + NOT = { has_travel_option = hire_experienced_mercenaries_option } + } + } + if = { + limit = { + faith = { has_doctrine = tenet_armed_pilgrimages } + } + custom_description_no_bullet = { + text = pilgrimage_piousness_because_i_have_tenet_armed_pilgrimages + pious_type_option_effect = yes + } + } + else_if = { + limit = { + faith = { has_doctrine = tenet_struggle_submission } + } + custom_description_no_bullet = { + text = pilgrimage_piousness_because_i_have_tenet_struggle_submission + pious_type_option_effect = yes + } + } + current_travel_plan = { add_travel_plan_modifier = pilgrim_protection_modifier } + remove_short_term_gold = medium_gold_value + stress_impact = { + humble = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.5 + } + # Reduced chance the less gold you have compared to the gold required + modifier = { + factor = { + value = short_term_gold + divide = medium_gold_value + } + short_term_gold < medium_gold_value + } + # Don't choose this if you're already in debt + modifier = { + factor = 0 + gold < 0 + } + } + } + #Hire that beefy chonk + option = { + name = pilgrimage.2003.b + if = { + limit = { + faith = { has_doctrine = tenet_warmonger } + } + custom_description_no_bullet = { + text = pilgrimage_piousness_because_i_have_tenet_warmonger + pious_type_option_effect = yes + } + } + remove_short_term_gold = minor_gold_value + recruit_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:2002_local_warrior + NEW_COURT_OWNER = root + } + stress_impact = { + humble = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.5 + } + # Reduced chance the less gold you have compared to the gold required + modifier = { + factor = { + value = short_term_gold + divide = medium_gold_value + } + short_term_gold < medium_gold_value + } + # Don't choose this if you're already in debt + modifier = { + factor = 0 + gold < 0 + } + } + } + # This journey will remain humble and personal + option = { + name = pilgrimage.2003.c + pious_type_option_effect = yes + give_pilgrim_xp_effect = yes + add_character_modifier = { + modifier = pilgrimage_divine_protection_modifier + years = 10 + } + stress_impact = { + arrogant = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + after = { + if = { + limit = { + NOT = { + current_travel_plan = { + any_entourage_character = { this = scope:2002_local_warrior } + } + } + scope:2002_local_warrior = { has_character_flag = created_warrior } + } + scope:2002_local_warrior = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +scripted_trigger pilgrimage_2004_potential_friend_trigger = { + is_available_ai_adult = yes + faith = root.faith + NOT = { is_courtier_of = root } + location = root.location +} + +#Run into a potential friend +# by Petter Vilberg +pilgrimage.2004 = { + type = character_event + title = pilgrimage.2004.t + desc = pilgrimage.2004.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:potential_friend + animation = happiness + } + cooldown = { years = 2 } + trigger = { + any_relation = { + type = potential_friend + pilgrimage_2004_potential_friend_trigger = yes + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + random_relation = { + type = potential_friend + limit = { + pilgrimage_2004_potential_friend_trigger = yes + } + save_scope_as = potential_friend + } + } + #PantheonTerm has brought us together! + option = { + name = pilgrimage.2004.a + worldly_type_option_effect = yes + set_relation_friend = { + reason = friend_pilgrimage + target = scope:potential_friend + } + reverse_add_opinion = { + target = scope:potential_friend + modifier = divine_blessing_friendship_opinion + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:potential_friend + NEW_COURT_OWNER = root + } + hidden_effect = { + add_opinion = { + target = scope:potential_friend + modifier = divine_blessing_friendship_opinion + } + } + stress_impact = { + shy = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 500 + modifier = { + OR = { + has_trait = shy + has_trait = paranoid + } + factor = 0 + } + } + } + # I must do this in solitude + option = { + name = pilgrimage.2004.b + pious_type_option_effect = yes + add_piety = minor_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = cynical + has_trait = gregarious + } + factor = 0.1 + } + } + } +} + +#A peasant inadvertedly insults you +# by Petter Vilberg +pilgrimage.2005 = { + type = character_event + title = pilgrimage.2005.t + desc = { + desc = pilgrimage.2005.desc + first_valid = { + triggered_desc = { + trigger = { + location.county.holder = { top_liege = root.top_liege } + } + desc = pilgrimage.2005.desc_close + } + desc = pilgrimage.2005.desc_far + } + desc = pilgrimage.2005.outro + } + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + triggered_animation = { + trigger = { ai_vengefulness > 0 } + animation = anger + } + animation = shock + } + right_portrait = { + character = scope:rude_pilgrim + animation = laugh + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + current_travel_plan ?= { + any_entourage_character = { + is_physically_able_ai_adult = yes + this != root + NOT = { is_courtier_of = root } + } + } + } + immediate = { + random_dummy_gender_peasant_effect = yes + current_travel_plan = { + random_entourage_character = { + limit = { + is_physically_able_ai_adult = yes + this != root + NOT = { is_courtier_of = root } + } + weight = { + base = 1 + modifier = { + has_personality_malicious_trigger = yes + add = 100 + } + modifier = { + has_trait_malicious_trigger = yes + add = 10 + } + modifier = { + has_personality_extroverted_trigger = yes + add = 50 + } + modifier = { + has_trait_extroverted_trigger = yes + add = 5 + } + } + save_scope_as = rude_pilgrim + } + } + } + # Take it with some humour + option = { + name = pilgrimage.2005.a + flavor = pilgrimage.2005.a.flavor + worldly_type_option_effect = yes + if = { + limit = { + NOR = { + has_trait = arrogant + has_trait = vengeful + } + } + add_stress = medium_stress_loss + } + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } + # What an insult! String them up! + option = { + name = pilgrimage.2005.b + add_dread = medium_dread_gain + add_piety = minor_piety_loss + scope:rude_pilgrim = { + increase_wounds_effect = { REASON = whipping } + add_opinion = { + target = root + modifier = angry_opinion + opinion = low_negative_opinion + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + sadistic = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + # Find other people to travel with + option = { + name = pilgrimage.2005.c + add_character_modifier = { + modifier = new_pilgrimage_companions_modifier + years = 5 + } + stress_impact = { + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } +} + +#Your pilgrimage is taking a little detour +# by Filippa Gannholm Kirsten +pilgrimage.2006 = { + type = character_event + title = pilgrimage.2006.t + desc = { + desc = pilgrimage.2006.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:caravan_master } + desc = pilgrimage.2006.desc_travel_leader + } + desc = pilgrimage.2006.desc_alone + } + } + theme = travel_pilgrimage + override_background = { reference = wilderness } + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:caravan_master + ai_vengefulness > 50 + NOT = { has_trait = forgiving } + } + animation = disapproval + } + triggered_animation = { + trigger = { ai_boldness < 0 } + animation = worry + } + animation = thinking + } + right_portrait = { + trigger = { exists = scope:other_person } + character = scope:other_person + triggered_animation = { + trigger = { scope:other_person = scope:local_person } + #Peasants herpiderp + animation = personality_irrational + } + animation = stress + } + cooldown = { years = 2 } + trigger = { + #Shouldn't happen immediately + current_travel_plan = { next_destination_progress > 0.2 } + is_location_valid_for_travel_event_on_land = yes + is_character_not_specialized_in_terrain = yes + any_pool_character = { + province = root.location + is_available_ai_adult = yes + has_no_real_status_trigger = yes + } + NOT = { + location ?= capital_province + current_travel_plan = { has_travel_plan_modifier = travel_guide_modifier } + has_character_flag = had_1006_travel_danger_lost_event_recently + } + } + weight_multiplier = { + base = 1 + modifier = { + exists = current_travel_plan.travel_leader + current_travel_plan.travel_leader = { + aptitude:travel_leader_court_position < 10 + } + faith = { + OR = { + trait_is_virtue = forgiving + trait_is_virtue = patient + } + } + add = 1 + } + } + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + #Some cooldown between Lost-themed events + add_character_flag = { + flag = had_2006_lost_pilgrimage_event_recently + months = 3 + } + #Do we have a caravan master? + if = { + limit = { exists = current_travel_plan.travel_leader } + current_travel_plan.travel_leader = { save_scope_as = caravan_master } + } + if = { + limit = { + any_pool_character = { + province = root.location + is_available_ai_adult = yes + has_no_real_status_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_real_status_trigger = yes + } + save_scope_as = local_person + } + } + if = { + limit = { exists = scope:caravan_master } + scope:caravan_master = { save_scope_as = other_person } + } + else = { + scope:local_person = { save_scope_as = other_person } + } + #Are we travel-ept + if = { + limit = { + OR = { + #Are we an experienced pilgrim? + AND = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value >= 50 + } + } + #Or an experienced traveler? + AND = { + has_trait = lifestyle_traveler + OR = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + } + } + #Duh, the sun rises in the east and sets in the west + learning >= high_skill_rating + } + } + add_character_flag = pilgrimage_travel_smart + } + } + #I'm too old for this #¤%# + option = { + name = { + trigger = { + involved_activity = { + NOR = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + has_activity_option = { + category = special_type + option = pilgrimage_type_hajj + } + } + } + } + text = pilgrimage.2006.a + } + name = pilgrimage.2006.a_pious + trigger = { has_character_flag = pilgrimage_travel_smart } + bonus_to_all_types_effect = yes + if = { + limit = { + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 5 + } + } + else_if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + else_if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + else = { + stress_impact = { + base = minor_stress_loss + } + } + ai_chance = { + base = 200 + } + } + #Let's accept the situation + option = { + name = { + trigger = { has_trait = cynical } + text = pilgrimage.2006.b_cynical + } + name = pilgrimage.2006.b + current_travel_plan = { + delay_travel_plan = { days = 90 } + } + if = { + limit = { exists = scope:caravan_master } + scope:caravan_master = { + add_opinion = { + target = root + modifier = relieved_opinion + opinion = 20 + } + } + } + pious_type_option_effect = yes + if = { + limit = { + OR = { + AND = { + exists = scope:caravan_master + faith = { trait_is_virtue = forgiving } + } + faith = { trait_is_virtue = patient } + } + } + add_piety = miniscule_piety_gain + } + else_if = { + limit = { + OR = { + AND = { + exists = scope:caravan_master + faith = { trait_is_sin = forgiving } + } + faith = { trait_is_sin = patient } + } + } + add_piety = minor_piety_loss + } + add_character_modifier = { + modifier = pilgrimage_accepting_modifier + years = 5 + } + stress_impact = { + base = minor_stress_impact_loss + patient = minor_stress_impact_loss + humble = minor_stress_impact_loss + impatient = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = impatient + has_trait = cynical + } + add = -50 + } + } + } + #This is unacceptable! + option = { + name = { + trigger = { + NOT = { exists = scope:caravan_master } + } + text = pilgrimage.2006.c + } + name = pilgrimage.2006.c_caravan_master + if = { + limit = { exists = scope:caravan_master } + scope:caravan_master = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -20 + } + } + } + if = { + limit = { + OR = { + AND = { + exists = scope:caravan_master + faith = { trait_is_virtue = vengeful } + } + faith = { trait_is_virtue = impatient } + } + } + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + } + else_if = { + limit = { + OR = { + AND = { + exists = scope:caravan_master + faith = { trait_is_sin = vengeful } + } + faith = { trait_is_sin = impatient } + } + } + add_piety = minor_piety_loss + } + if = { + limit = { exists = scope:caravan_master } + add_dread = minor_dread_gain + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + + } + } + else = { + add_prestige = minor_prestige_loss + stress_impact = { + shy = minor_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = forgiving + has_trait = compassionate + } + factor = 0 + } + modifier = { + faith = { + OR = { + trait_is_virtue = forgiving + trait_is_virtue = patient + } + } + factor = 0 + } + } + } + after = { + remove_character_flag = pilgrimage_travel_smart + mp_resume_travel_plan = yes + } +} + +#Fall ill +# by Petter Vilberg +pilgrimage.2008 = { + type = character_event + title = pilgrimage.2008.t + desc = pilgrimage.2008.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { exists = scope:traveling_court_physician } + character = scope:traveling_court_physician + animation = worry + } + cooldown = { years = 10 } + trigger = { + #Shouldn't happen immediately + current_travel_plan = { next_destination_progress > 0.2 } + involved_activity ?= { has_activity_type = activity_pilgrimage } + can_contract_disease_trigger = { DISEASE = ill } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + play_music_cue = "mx_cue_illness" + show_as_tooltip = { add_trait = ill } + hidden_effect = { + #Adds the trait, sends event "health.2201" to those who care if health is brought too low + contract_disease_effect = { + DISEASE = ill + TREATMENT_EVENT = yes + } + } + current_travel_plan = { + if = { + limit = { + any_entourage_character = { has_court_position = court_physician_court_position } + } + random_entourage_character = { + limit = { has_court_position = court_physician_court_position } + save_scope_as = traveling_court_physician + } + } + } + + } + #Gogo Whole of Body + option = { + name = pilgrimage.2008.whole_of_body + trigger = { has_trait = whole_of_body } + show_as_tooltip = { remove_trait = ill } + hidden_effect = { + recover_from_disease_effect = { DISEASE = ill } + } + ai_chance = { + base = 1000 + } + } + #Gogo Court Physician + option = { + name = pilgrimage.2008.court_physician + trigger = { exists = scope:traveling_court_physician } + show_as_tooltip = { remove_trait = ill } + hidden_effect = { + recover_from_disease_effect = { DISEASE = ill } + } + ai_chance = { + base = 1000 + } + } + #Oh no + option = { + name = pilgrimage.2008.a + custom_tooltip = pilgrimage.2008.a.tt + #Decide whether to go home or continue on + trigger_event = health.1001 + ai_chance = { + base = 100 + } + } +} + +#Develop pneumonia +# by Petter Vilberg +pilgrimage.2009 = { + type = character_event + title = pilgrimage.2009.t + desc = pilgrimage.2009.desc + theme = travel_pilgrimage +# override_background = { reference = army_camp } + left_portrait = { + character = root + animation = sick + } + cooldown = { years = 10 } + trigger = { + has_trait = ill + can_contract_disease_trigger = { DISEASE = pneumonic } + involved_activity ?= { has_activity_type = activity_pilgrimage } + } + immediate = { + show_as_tooltip = { add_trait_force_tooltip = pneumonic } + hidden_effect = { + #Adds the trait, sends event "health.2201" to those who care if health is brought too low + contract_disease_effect = { + DISEASE = pneumonic + TREATMENT_EVENT = no + } + } + } + #Ok, guess I have pneumonia now + option = { + name = pilgrimage.2009.a + ai_chance = { + base = 100 + } + } + after = { + #Decide whether to go home or continue on + trigger_event = health.1001 + } +} + +scripted_trigger pilgrimage_2010_mystic_ruler = { + faith = root.faith + has_trait = lifestyle_mystic + is_available_ai = yes + NOR = { + AND = { # Not your liege + liege ?= root + } + # Not a family member + any_close_or_extended_family_member = { + this = root + } + # Not a direct vassal + any_vassal = { + this = root + } + AND = { # Not your religious head + exists = root.faith.religious_head + this = root.faith.religious_head + } + } + location = root.location +} + +scripted_trigger pilgrimage_2010_mystic_home_ruler = { + faith = root.faith + this != root + exists = capital_province + location = root.location +} + +scripted_effect pilgrimage_2013_outcome_effect = { + if = { + limit = { + NOT = { has_trait = lifestyle_mystic } + } + add_trait = lifestyle_mystic + } + else_if = { + limit = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_mystic + value = 10 + } + } + else_if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_perk_points = 1 + } + else_if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 10 + } + } + else = { + add_piety = medium_piety_gain + } +} + +scripted_effect pilgrimage_2014_outcome_effect = { + random_list = { + 50 = { + show_chance = no + desc = pilgrimage.2014.pilfered.desc + send_interface_toast = { + title = pilgrimage.2014.pilfered.t + left_icon = root + remove_short_term_gold = tiny_gold_value + stress_impact = { base = miniscule_stress_impact_loss } + } + } + 50 = { + show_chance = no + desc = pilgrimage.2014.restful.desc + send_interface_toast = { + title = pilgrimage.2014.restful.t + left_icon = root + stress_impact = { base = minor_stress_impact_loss } + add_character_modifier = { + modifier = pilgrimage_rest_and_good_health_modifier + years = 5 + } + } + } + } +} + +scripted_effect pilgrimage_2015_outcome_effect = { + duel = { + skill = learning + target = scope:2010_mystic + 50 = { + desc = pilgrimage.2015.learning.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + send_interface_toast = { + title = pilgrimage.2015.learning.t + left_icon = root + right_icon = scope:2010_mystic + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + else = { add_learning_skill = 1 } + + } + } + 50 = { + desc = pilgrimage.2015.piety.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3 + min = 5 + } + send_interface_toast = { + title = pilgrimage.2015.piety.t + left_icon = root + right_icon = scope:2010_mystic + add_piety = miniscule_piety_gain + } + } + } +} + +# Meet a Mystic on your journey +#by Petter Vilberg +pilgrimage.2010 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2010.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = cynical + has_trait = paranoid + has_trait = craven + } + } + animation = personality_cynical + } + triggered_animation = { + trigger = { + OR = { + has_trait = lifestyle_mystic + has_trait = scholar + has_trait = trusting + has_trait = gregarious + } + } + animation = admiration + } + animation = idle + } + right_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + cooldown = { years = 5 } + trigger = { + is_ai = no + NOT = { has_trait = lifestyle_mystic } + religion = { is_in_family = rf_abrahamic } + faith = { + any_faith_ruler = { + OR = { + pilgrimage_2010_mystic_ruler = yes + pilgrimage_2010_mystic_home_ruler = yes + } + } + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + # Find our Mystic + faith = { + if = { + limit = { + any_faith_ruler = { pilgrimage_2010_mystic_ruler = yes } + } + random_faith_ruler = { + limit = { pilgrimage_2010_mystic_ruler = yes } + save_scope_as = 2010_mystic + } + } + else = { + random_faith_ruler = { + limit = { pilgrimage_2010_mystic_home_ruler = yes } + save_scope_as = mystic_home_owner + } + create_character = { + template = default_mystic_character + location = scope:mystic_home_owner.capital_province + culture = scope:mystic_home_owner.culture + save_scope_as = 2010_mystic + } + } + } + add_character_flag = in_pilgrimage_event_chain + } + # Let's see what this person is up to + option = { + name = pilgrimage.2010.a + custom_tooltip = pilgrimage.2010.a.tt + worldly_type_option_effect = yes + current_travel_plan = { delay_travel_plan = { days = 90 } } + trigger_event = { + id = pilgrimage.2011 + days = 5 + } + } + # Smells of heresy to me! + option = { + name = pilgrimage.2010.b + pious_type_option_effect = yes + add_piety = minor_piety_gain + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + } + # Mystic gets out with the Pilgrim trait for flavor + hidden_effect = { + scope:2010_mystic = { + if = { + limit = { + NOT = { has_trait = pilgrim } + } + add_trait = pilgrim + } + } + } + } +} + +#The Mystic has a lot to say about your faith +pilgrimage.2011 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2011.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = cynical + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + trigger = { + scope:2010_mystic = { + is_available_adult = yes + is_imprisoned = no + } + } + on_trigger_fail = { + trigger_event = pilgrimage.2012 + } + # Tell me more! + option = { + name = pilgrimage.2011.a + custom_tooltip = pilgrimage.2011.a.tt + trigger = { learning >= decent_skill_rating } + show_as_unavailable = { always = yes } + skill = learning + bonus_to_all_types_effect = yes + show_as_tooltip = { pilgrimage_2013_outcome_effect = yes } + trigger_event = { + id = pilgrimage.2013 + days = 5 + } + } + # I'm just going to take a nap + option = { + name = pilgrimage.2011.b + custom_tooltip = pilgrimage.2011.b.tt + show_as_tooltip = { pilgrimage_2014_outcome_effect = yes } + worldly_type_option_effect = yes + trigger_event = { + id = pilgrimage.2014 + days = 5 + } + } + # Engage in vigorous debate + option = { + name = pilgrimage.2011.c + custom_tooltip = pilgrimage.2011.c.tt + show_as_tooltip = { pilgrimage_2015_outcome_effect = yes } + pious_type_option_effect = yes + trigger_event = { + id = pilgrimage.2015 + days = 5 + } + } + after = { + current_travel_plan = { resume_travel_plan = yes } #Paused in the preceding event + } +} + +#Fallback in case something happened in between events +pilgrimage.2012 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2012.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = cynical + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + option = { + name = pilgrimage.2012.a + add_character_modifier = { + modifier = pilgrimage_religious_reflections_modifier + years = 5 + } + } + after = { + current_travel_plan = { resume_travel_plan = yes } + remove_character_flag = in_pilgrimage_event_chain + } +} + +#Outcome of engaging +pilgrimage.2013 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2013.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = cynical + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:2010_mystic + animation = happiness + } + immediate = { + pilgrimage_2013_outcome_effect = yes + } + #Woo! Mystic! + option = { + name = pilgrimage.2013.a + add_trait = lifestyle_mystic + } + after = { + # Mystic gets out with the Pilgrim trait for flavor + hidden_effect = { + scope:2010_mystic = { + if = { + limit = { + NOT = { has_trait = pilgrim } + } + add_trait = pilgrim + } + } + } + current_travel_plan = { resume_travel_plan = yes } + remove_character_flag = in_pilgrimage_event_chain + } +} + +#Outcome of sleeping +pilgrimage.2014 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2014.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { has_character_modifier = pilgrimage_rest_and_good_health_modifier } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + immediate = { + pilgrimage_2014_outcome_effect = yes + } + #Alright + option = { + #Someone stole gold! + name = { + trigger = { + NOT = { has_character_modifier = pilgrimage_rest_and_good_health_modifier } + } + text = pilgrimage.2014.a + } + #Very restful + name = pilgrimage.2014.a_restful + } + after = { + # Mystic gets out with the Pilgrim trait for flavor + hidden_effect = { + scope:2010_mystic = { + if = { + limit = { + NOT = { has_trait = pilgrim } + } + add_trait = pilgrim + } + } + } + current_travel_plan = { resume_travel_plan = yes } + remove_character_flag = in_pilgrimage_event_chain + } +} + +#Outcome of debating +pilgrimage.2015 = { + type = character_event + title = pilgrimage.2010.t + desc = pilgrimage.2015.desc + theme = travel_pilgrimage + left_portrait = { + character = scope:2010_mystic + animation = personality_rational + } + immediate = { + pilgrimage_2015_outcome_effect = yes + } + #Go debate team! + option = { + name = pilgrimage.2015.a + } + after = { + set_local_variable = { + name = debated_mystic + value = yes + } + # Mystic gets out with the Pilgrim trait for flavor + hidden_effect = { + scope:2010_mystic = { + if = { + limit = { + NOT = { has_trait = pilgrim } + } + add_trait = pilgrim + } + } + } + current_travel_plan = { resume_travel_plan = yes } + remove_character_flag = in_pilgrimage_event_chain + } +} + +scripted_trigger pilgrimage_2020_suitable_thief = { + is_healthy = yes + AND = { + age >= 6 + age <= 25 + } + has_trait = greedy + OR = { + has_trait = deceitful + has_trait = cynical + } + OR = { + NOT = { has_trait = zealous } + any_secret = { + type = secret_non_believer + } + } + is_lowborn = yes +} + +#Pilgrimage thieves +# by Filippa Gannholm Kirsten +pilgrimage.2020 = { + type = character_event + title = pilgrimage.2020.t + desc = { + desc = pilgrimage.2020.desc + first_valid = { + triggered_desc = { + trigger = { + scope:thief_to_convert = { is_adult = yes } + } + desc = pilgrimage.2020.desc_adult + } + triggered_desc = { + trigger = { + scope:thief_to_convert = { is_adult = no } + } + desc = pilgrimage.2020.desc_child + } + } + } + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = cynical } + animation = personality_cynical + } + triggered_animation = { + trigger = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + animation = personality_zealous + } + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = irritable + has_trait = vengeful + } + } + animation = anger + } + animation = personality_coward + } + right_portrait = { + character = scope:thief_to_convert + animation = fear + } + cooldown = { years = 2 } + trigger = { + #Only if you're an established pilgrim + has_trait = pilgrim + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + pilgrimage_2020_suitable_thief = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrimage_2020_suitable_thief = yes } + save_scope_as = thief_to_convert + } + } + else = { + random_list = { + #50% it's a child + 50 = { + create_character = { + template = child_thief_character + location = root.location + age = { 6 15 } + culture = root.location.county.culture + faith = root.location.county.faith + after_creation = { + set_to_lowborn = yes + } + save_scope_as = thief_to_convert + } + } + #Or a young adult + 50 = { + create_character = { + template = generic_peasant_character + location = root.location + age = { 16 25 } + culture = root.location.county.culture + faith = root.location.county.faith + after_creation = { + set_to_lowborn = yes + } + save_scope_as = thief_to_convert + } + } + } + scope:thief_to_convert = { add_character_flag = created_thief } + } + scope:thief_to_convert = { add_character_flag = use_stealth_clothes } + } + #Have them join you + option = { + name = { + trigger = { + scope:thief_to_convert = { is_adult = no } + } + text = pilgrimage.2020.a_child + } + name = { + trigger = { + scope:thief_to_convert = { is_adult = yes } + } + text = pilgrimage.2020.a + } + #We should be a nice and approachable person + trigger = { + has_trait = pilgrim + OR = { + has_trait = family_first + has_trait = forgiving + } + NOR = { + has_trait = sadistic + has_trait = callous + } + } + flavor = pilgrimage.2020.a.flavor + bonus_to_all_types_effect = yes + if = { + limit = { + faith = { trait_is_virtue = forgiving } + } + add_piety = medium_piety_gain + } + else_if = { + limit = { + faith = { trait_is_virtue = vengeful } + } + add_piety = minor_piety_loss + } + else = { add_piety = minor_piety_gain } + #Hook 'em' + if = { + limit = { + can_add_hook = { + target = scope:thief_to_convert + type = loyalty_hook + } + } + add_hook = { + target = scope:thief_to_convert + type = loyalty_hook + } + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:thief_to_convert + NEW_COURT_OWNER = root + } + scope:thief_to_convert = { + #Add them to your family + if = { + limit = { is_adult = no } + if = { + limit = { + root = { is_male = yes } + } + set_father = root + } + else = { set_mother = root } + set_house = root.house + add_opinion = { + modifier = grateful_child + target = root + opinion = 40 + } + } + else = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 40 + } + } + add_character_flag = recruited_thief + } + stress_impact = { + paranoid = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + } + factor = 0 + } + ai_value_modifier = { + ai_compassion = 2 + ai_honor = 1 + } + } + } + #Try to convert them + option = { + name = pilgrimage.2020.b + trigger = { + religion = { is_in_family = rf_abrahamic } + } + pious_type_option_effect = yes + duel = { + skill = diplomacy + value = average_skill_rating + #Implore them to change their ways + 50 = { + desc = pilgrimage.2020.b.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + modifier = { + has_perk = zealous_proselytizer_perk + factor = 2 + } + modifier = { + has_trait = zealous + add = 10 + } + modifier = { + has_trait = cynical + add = -10 + } + scope:thief_to_convert = { add_character_flag = convinced_thief } + custom_tooltip = pilgrimage.2020.b.success.tt + hidden_effect = { + current_travel_plan = { delay_travel_plan = { days = 90 } } + } + trigger_event = { + id = pilgrimage.2021 + days = 3 + } + } + #You fail and they run away + 50 = { + desc = pilgrimage.2020.b.failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -5 + min = -5 + } + send_interface_toast = { + title = pilgrimage.2020.b.failure.t + left_icon = root + remove_short_term_gold = minor_gold_value + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + ai_value_modifier = { + ai_zeal = 2 + ai_boldness = 1 + ai_honor = 1 + ai_vengefulness = -2 + } + } + } + #Let them go in peace + option = { + #What will God say about that... + name = { + trigger = { has_trait = cynical } + text = pilgrimage.2020.c_cynical + } + #We all do what we must + name = pilgrimage.2020.c + worldly_type_option_effect = yes + remove_short_term_gold = minor_gold_value + stress_impact = { + greedy = minor_stress_impact_gain + forgiving = medium_stress_impact_loss + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = -0.5 + } + } + } + after = { + scope:thief_to_convert = { + if = { + limit = { + has_character_flag = created_thief + NOR = { + has_character_flag = recruited_thief + has_character_flag = convinced_thief + } + } + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + else = { remove_character_flag = use_stealth_clothes } + } + } +} + +pilgrimage.2021 = { + type = character_event + title = pilgrimage.2021.t + desc = pilgrimage.2021.desc + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = sadistic } + animation = personality_dishonorable + } + animation = thinking + } + right_portrait = { + character = scope:thief_to_convert + animation = shame + } + immediate = { + scope:thief_to_convert = { + remove_character_flag = recruited_thief + remove_character_flag = convinced_thief + } + hidden_effect = { + current_travel_plan = { resume_travel_plan = yes } + } + } + #Convert them to your faith and have them spread the word + option = { + name = pilgrimage.2021.a + pious_type_option_effect = yes + add_character_modifier = { + modifier = pilgrimage_religion_spread_modifier + years = 5 + } + scope:thief_to_convert = { + if = { + limit = { + root.faith != this.faith + } + set_character_faith = root.faith + } + } + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 2 + } + modifier = { + has_trait = cynical + factor = 0 + } + ai_value_modifier = { + ai_zeal = 2 + } + } + } + #Whips always make _me_ feel better + option = { + name = pilgrimage.2021.b + trigger = { + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:judaism_religion + } + OR = { + has_trait = flagellant + has_trait = sadistic + } + scope:thief_to_convert = { is_adult = yes } + } + pious_type_option_effect = yes + add_dread = medium_dread_gain + add_character_modifier = { + modifier = pilgrimage_flogging_spread_modifier + years = 5 + } + scope:thief_to_convert = { + if = { + limit = { + root.faith != this.faith + } + set_character_faith = root.faith + } + add_trait = flagellant + increase_wounds_no_death_effect = { REASON = flagellant } + } + stress_impact = { + flagellant = major_stress_impact_loss + sadistic = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = flagellant + factor = 2 + } + ai_value_modifier = { + ai_zeal = 2 + } + } + } + #Have them work off their sins for you + option = { + name = pilgrimage.2021.c + flavor = pilgrimage.2021.c.flavor + add_character_modifier = { + modifier = pilgrimage_work_work_modifier + years = 5 + } + scope:thief_to_convert = { + if = { + limit = { + can_add_hook = { + target = scope:thief_to_convert + type = loyalty_hook + } + } + add_hook = { + target = scope:thief_to_convert + type = loyalty_hook + } + } + } + add_courtier = scope:thief_to_convert + stress_impact = { + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + ai_value_modifier = { + ai_zeal = -2 + } + } + } + after = { + if = { + limit = { + current_travel_plan ?= { is_paused = yes } + } + current_travel_plan = { resume_travel_plan = yes } + } + } +} + +#Sea: Massive rainbow +# by Filippa Gannholm Kirsten +pilgrimage.2030 = { + type = character_event + title = pilgrimage.2030.t + desc = pilgrimage.2030.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = scholar + learning > high_skill_rating + } + } + animation = thinking + } + triggered_animation = { + trigger = { + OR = { + has_activity_intent = zealot_intent + AND = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + } + } + animation = personality_zealous + } + triggered_animation = { + trigger = { has_trait = cynical } + animation = boredom + } + animation = admiration + } + right_portrait = { + character = scope:portrait_entourage_character + animation = disbelief + } + trigger = { + location = { is_sea_province = yes } + current_travel_plan ?= { + any_entourage_character = { + count > 5 + } + any_entourage_character = { + NOT = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this = root + } + } + } + } + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + NOT = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this = root + } + } + save_scope_as = portrait_entourage_character + } + } + } + #Acshually... + option = { + name = pilgrimage.2030.a + trigger = { + OR = { + has_trait = scholar + learning > high_skill_rating + } + } + flavor = pilgrimage.2030.a.flavor + very_worldly_type_option_effect = yes + current_travel_plan = { + every_entourage_character = { + custom = every_entourage_tt + add_opinion = { + target = root + modifier = pilgrimage_besserwisser_opinion + opinion = -5 + } + } + } + if = { + limit = { + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 10 + } + } + #Besserwisser gonna besserwiss + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 200 + modifier = { + has_trait = zealous + factor = 0 + } + } + } + #This IS a sign from God! + option = { + name = pilgrimage.2030.b + trigger = { + OR = { + has_activity_intent = zealot_intent + AND = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + } + } + if = { + limit = { has_activity_intent = zealot_intent } + custom_tooltip = available_because_intent_tt + } + flavor = pilgrimage.2030.b.flavor + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } + #Reflectors gonna reflect + option = { + name = pilgrimage.2030.c + trigger = { has_activity_intent = reflection_intent } + custom_tooltip = available_because_intent_tt + bonus_to_all_types_effect = yes + add_piety = miniscule_piety_gain + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + #That's cool, I guess + option = { + name = pilgrimage.2030.d + worldly_type_option_effect = yes + stress_impact = { + arbitrary = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + } + } +} + +#Sea: Go fish +# by Filippa Gannholm Kirsten +pilgrimage.2040 = { + type = character_event + title = pilgrimage.2040.t + desc = pilgrimage.2040.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:portrait_entourage_character + animation = personality_content + } + trigger = { + location = { is_sea_province = yes } + current_travel_plan ?= { + any_entourage_character = { + count > 5 + } + any_entourage_character = { + is_adult = yes + NOT = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this = root + } + } + } + } + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + is_adult = yes + NOT = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this = root + } + } + save_scope_as = portrait_entourage_character + } + } + } + #Fishing! + option = { + name = pilgrimage.2040.a + worldly_type_option_effect = yes + duel = { + skill = prowess + value = average_skill_rating + #Catch a big fish + 50 = { + desc = pilgrimage.2040.a.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3 + min = -49 + } + send_interface_toast = { + title = pilgrimage.2040.a.success.t + left_icon = root + if = { + limit = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = medium_stress_impact_loss + } + } + add_prestige = medium_prestige_gain + } + } + #Catch a small fish + 50 = { + desc = pilgrimage.2040.a.less_success.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3 + min = -49 + } + send_interface_toast = { + title = pilgrimage.2040.a.less_success.t + left_icon = root + if = { + limit = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + } + } + add_prestige = minor_prestige_gain + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + modifier = { + has_trait = lazy + factor = 0 + } + } + } + #Praying! + option = { + name = pilgrimage.2040.b + trigger = { + OR = { + has_activity_intent = zealot_intent + AND = { + has_trait = zealous + NOT = { + any_secret = { type = secret_non_believer } + } + } + } + } + if = { + limit = { has_activity_intent = zealot_intent } + custom_tooltip = available_because_intent_tt + } + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + factor = 0 + } + } + } + #Nap time! + option = { + name = pilgrimage.2040.c + trigger = { + OR = { + has_activity_intent = reflection_intent + has_trait = lazy + } + NOT = { has_character_modifier = pilgrimage_chill_ship_modifier } + } + if = { + limit = { has_activity_intent = reflection_intent } + custom_tooltip = available_because_intent_tt + } + add_character_modifier = { + modifier = pilgrimage_chill_ship_modifier + years = 5 + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + } + } + #Nah + option = { + name = pilgrimage.2040.d + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + } + } +} + +#Sea: Shipwrecked pilgrims +# by Filippa Gannholm Kirsten +pilgrimage.2050 = { + type = character_event + title = pilgrimage.2050.t + desc = pilgrimage.2050.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:first_pilgrim + animation = pain + } + lower_center_portrait = { + character = scope:second_pilgrim + } + lower_right_portrait = { + character = scope:third_pilgrim + } + trigger = { + location = { is_sea_province = yes } + is_ai = no + } + cooldown = { years = 30 } + immediate = { + # Create pilgrims + hidden_effect = { + create_character = { + template = pool_repopulate_local_flavor + dynasty = none + trait = pilgrim + location = root.location + save_scope_as = first_pilgrim + } + scope:first_pilgrim = { set_to_lowborn = yes } + create_character = { + template = pool_repopulate_local_flavor + age = { 6 10 } + dynasty = none + faith = scope:first_pilgrim.faith + culture = scope:first_pilgrim.culture + location = root.location + save_scope_as = second_pilgrim + } + scope:second_pilgrim = { set_to_lowborn = yes } + create_character = { + template = pool_repopulate_local_flavor + dynasty = none + faith = scope:first_pilgrim.faith + culture = scope:first_pilgrim.culture + trait = pilgrim + location = root.location + save_scope_as = third_pilgrim + } + scope:third_pilgrim = { set_to_lowborn = yes } + } + } + #Come aboard + option = { + name = pilgrimage.2050.a + worldly_type_option_effect = yes + custom_tooltip = pilgrimage.2050.a.tt + #We're not very fond of their culture + if = { + limit = { + root.culture != scope:first_pilgrim.culture + scope:first_pilgrim = { + culture = { + cultural_acceptance = { + target = root.culture + value < low_positive_culture_acceptance + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + trusting = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + } + } + #We're OK with their culture + else = { + stress_impact = { + base = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + trusting = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + scope:first_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:second_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:third_pilgrim = { add_to_court_and_entourage_effect = yes } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 0 + } + modifier = { + short_term_gold < minor_gold_value + factor = 0 + } + } + } + #...if you convert + option = { + name = pilgrimage.2050.b + trigger = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + faith != scope:first_pilgrim.faith + } + duel = { + skill = learning + target = scope:first_pilgrim + #Success + 60 = { + desc = pilgrimage.2050.b.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3 + min = -49 + } + modifier = { + has_perk = zealous_proselytizer_perk + add = 25 + } + modifier = { + has_trait = zealous + add = 25 + } + send_interface_toast = { + title = pilgrimage.2050.b.success.t + left_icon = root + right_icon = scope:first_pilgrim + desc = pilgrimage.2050.b.success.desc + add_piety = medium_piety_gain + very_pious_type_option_effect = yes + } + #Keeping this outside of the toast so as to not cut off the toast + scope:first_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:second_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:third_pilgrim = { add_to_court_and_entourage_effect = yes } + scope:first_pilgrim = { + set_character_faith = root.faith + } + scope:second_pilgrim = { + set_character_faith = root.faith + } + scope:third_pilgrim = { + set_character_faith = root.faith + } + } + #Failure + 40 = { + desc = pilgrimage.2050.b.failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3 + min = -49 + } + send_interface_toast = { + title = pilgrimage.2050.b.failure.t + left_icon = root + add_prestige = medium_prestige_loss + } + scope:first_pilgrim = { death = { death_reason = death_drowned } } + scope:second_pilgrim = { death = { death_reason = death_drowned } } + scope:third_pilgrim = { death = { death_reason = death_drowned } } + } + } + stress_impact = { + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + #... let's just move on + option = { + name = pilgrimage.2050.c + add_dread = minor_dread_gain + current_travel_plan = { + every_entourage_character = { + custom = every_entourage_tt + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -15 + } + } + } + scope:first_pilgrim = { death = { death_reason = death_drowned } } + scope:second_pilgrim = { death = { death_reason = death_drowned } } + scope:third_pilgrim = { death = { death_reason = death_drowned } } + stress_impact = { + paranoid = medium_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 0 + } + modifier = { + has_trait = trusting + factor = 0 + } + } + } +} + +############################ +## 'Temptation' Events +# 2500-2999 +## by Bianca Savazzi & Sean Hughes +############################ +# pilgrimage.2101 - Rakish or Lustful character considers making a pit stop, or perhaps, a detour to the local brothels +# pilgrimage.2501-4 - Persistent Beggar +# pilgrimage.2511 - Cocky Lordling +# +# + +scripted_effect pilgrimage_2101_save_scopes_effect = { + location = { save_scope_as = brothel_location } + trigger_event = { + id = lover.8102 + days = 30 + } +} + +#Rakish or Lustful character considers making a pit stop, or perhaps, a detour to the local brothels +# by Bianca Savazzi +pilgrimage.2101 = { + type = character_event + title = pilgrimage.2101.t + desc = { + desc = pilgrimage.2101.desc + } + cooldown = { years = 5 } + theme = travel_pilgrimage + override_background = { reference = tavern } + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:naked_tempter + animation = fanning_coyly + } + trigger = { + stress > 0 + OR = { + has_trait = lustful + has_trait = rakish + } + is_location_valid_for_travel_event_on_land = yes + might_cheat_on_every_partner_trigger = yes + } + immediate = { + add_character_flag = { + flag = no_sex_stress_loss + days = 30 + } + random_list = { + 50 = { + # Spawn a temptress for event if.... + trigger = { + OR = { + #lesbian + AND = { + is_female = yes + has_sexuality = homosexual + } + #straight or asexual guy + AND = { + is_male = yes + OR = { + has_sexuality = heterosexual + has_sexuality = asexual + } + } + #asexual woman and homo is ok + AND = { + has_sexuality = asexual + is_female = yes + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + #bisexual + has_sexuality = bisexual + } + } + create_character = { + age = 30 + gender = female + location = root.location + faith = root.location.faith + culture = root.location.culture + dynasty = none + random_traits = no + random_traits_list = { + count = 2 + deceitful = {} + brave = {} + gregarious = {} + ambitious = {} + vengeful = {} + gluttonous = {} + temperate = {} + greedy = {} + generous = {} + lazy = {} + diligent = {} + wrathful = {} + calm = {} + patient = {} + impatient = {} + arrogant = {} + honest = {} + arbitrary = {} + just = {} + paranoid = {} + trusting = {} + compassionate = {} + callous = {} + sadistic = {} + stubborn = {} + fickle = {} + forgiving = {} + } + trait = lustful + trait = rakish + trait = deviant + trait = fecund + trait = beauty_good_3 + save_scope_as = naked_tempter + } + } + 50 = { + # Spawn a tempter for event if.... + trigger = { + OR = { + #gay + AND = { + is_male = yes + has_sexuality = homosexual + } + #straight or asexual woman + AND = { + is_female = yes + OR = { + has_sexuality = asexual + has_sexuality = heterosexual + } + } + #asexual man and homo is ok + AND = { + has_sexuality = asexual + is_male = yes + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + #bisexual + has_sexuality = bisexual + } + } + create_character = { + age = 30 + gender = male + location = root.location + faith = root.location.faith + culture = root.location.culture + dynasty = none + random_traits = no + random_traits_list = { + count = 2 + deceitful = {} + brave = {} + gregarious = {} + ambitious = {} + vengeful = {} + gluttonous = {} + temperate = {} + greedy = {} + generous = {} + lazy = {} + diligent = {} + wrathful = {} + calm = {} + patient = {} + impatient = {} + arrogant = {} + honest = {} + arbitrary = {} + just = {} + paranoid = {} + trusting = {} + compassionate = {} + callous = {} + sadistic = {} + stubborn = {} + fickle = {} + forgiving = {} + } + trait = lustful + trait = rakish + trait = deviant + trait = fecund + trait = beauty_good_3 + save_scope_as = naked_tempter + } + } + } + scope:naked_tempter = { + add_character_flag = is_naked + } + } + #Option A: Visit one brothel + option = { + name = pilgrimage.2101.a + if = { + limit = { + faith = { trait_is_virtue = lustful } + } + pious_type_option_effect = yes + add_piety = minor_piety_gain + } + else_if = { + limit = { + faith = { trait_is_sin = lustful } + } + worldly_type_option_effect = yes + add_piety = medium_piety_loss + } + add_stress = medium_stress_loss + had_sex_with_effect = { + CHARACTER = scope:naked_tempter + PREGNANCY_CHANCE = pregnancy_chance + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:naked_tempter + NEW_COURT_OWNER = root + } + hidden_effect = { + #STD transmission + random_list = { + 50 = { + trigger = { is_attracted_to_men = yes } + had_sex_with_unknown_effect = { GENDER = male } + } + 50 = { + trigger = { is_attracted_to_women = yes } + had_sex_with_unknown_effect = { GENDER = female } + } + } + if = { + limit = { + NOT = { + government_has_flag = government_is_mandala + house ?= { has_house_power_parameter = aspect_of_creation } + } + } + random = { + chance = 33 + pilgrimage_2101_save_scopes_effect = yes + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_greed = -1 + } + modifier = { + NOR = { + is_married = no + any_spouse = { + count = all + save_temporary_scope_as = partner + root = { might_cheat_on_partner_trigger = { PARTNER = scope:partner } } + } + } + factor = 0 + } + } + } + #Option B: Visit ALL brothels! + option = { + name = pilgrimage.2101.b + if = { + limit = { + faith = { trait_is_virtue = lustful } + } + pious_type_option_effect = yes + add_piety = medium_piety_gain + } + else_if = { + limit = { + faith = { trait_is_sin = lustful } + } + worldly_type_option_effect = yes + add_piety = major_piety_loss + } + remove_short_term_gold = tiny_gold_value + rakish_brothel_night_effect = yes + had_sex_with_effect = { + CHARACTER = scope:naked_tempter + PREGNANCY_CHANCE = pregnancy_chance + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:naked_tempter + NEW_COURT_OWNER = root + } + hidden_effect = { + if = { + limit = { + NOT = { + government_has_flag = government_is_mandala + house ?= { has_house_power_parameter = aspect_of_creation } + } + } + random = { + chance = 75 + pilgrimage_2101_save_scopes_effect = yes + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 2 + ai_greed = -2 + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value #AI should not spend money they don't have + } + modifier = { + NOR = { + is_married = no + any_spouse = { + count = all + save_temporary_scope_as = partner + root = { might_cheat_on_partner_trigger = { PARTNER = scope:partner } } + } + } + factor = 0 + } + } + } + #Option C: Stay away from the houses of pleasure + option = { + name = pilgrimage.2101.c + if = { + limit = { + faith = { trait_is_sin = lustful } + } + add_piety = miniscule_piety_gain + pious_type_option_effect = yes + } + else_if = { + limit = { + faith = { trait_is_virtue = lustful } + } + add_piety = minor_piety_loss + } + else = { + add_piety = miniscule_piety_gain + } + stress_impact = { + base = minor_stress_impact_gain + lustful = minor_stress_impact_gain #gets added on top of the base + rakish = medium_stress_impact_gain #gets added on top of the base + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 2 + ai_energy = -1 + } + } + } + after = { + remove_character_flag = no_sex_stress_loss + scope:naked_tempter = { + remove_character_flag = is_naked + } + if = { + limit = { + is_ai = yes + } + scope:naked_tempter = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +scripted_effect generosity_piety_stress_effect = { + if = { + limit = { + faith = { + OR = { + trait_is_virtue = generous + trait_is_virtue = compassionate + } + } + } + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + } + else_if = { + limit = { + faith = { trait_is_sin = generous } + } + add_piety = minor_piety_loss + } + + stress_impact = { + greedy = minor_stress_gain + callous = minor_stress_gain + arrogant = minor_stress_gain + vengeful = minor_stress_gain + } +} + +scripted_effect parsimony_piety_stress_effect = { + if = { + limit = { + faith = { trait_is_sin = generous } + } + add_piety = miniscule_piety_gain + } + else_if = { + limit = { + faith = { + OR = { + trait_is_virtue = generous + trait_is_virtue = compassionate + } + } + } + add_piety = minor_piety_loss + } + + stress_impact = { + generous = medium_stress_gain + compassionate = minor_stress_gain + forgiving = minor_stress_gain + trusting = minor_stress_gain + } +} + +#Persistent Beggar +# by Sean Hughes +pilgrimage.2501 = { + type = character_event + title = pilgrimage.2501.t + desc = { + desc = pilgrimage.2501.desc.opening + first_valid = { + triggered_desc = { + trigger = { faith = { trait_is_virtue = generous } } + desc = pilgrimage.2501.desc.virtue.generous + } + triggered_desc = { + trigger = { faith = { trait_is_sin = generous } } + desc = pilgrimage.2501.desc.sin.generous + } + triggered_desc = { + trigger = { faith = { trait_is_virtue = compassionate } } + desc = pilgrimage.2501.desc.virtue.compassionate + } + } + } + theme = travel_pilgrimage + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:beggar + animation = beg + outfit_tags = { beggar_rags } + } + cooldown = { years = 5 } + trigger = { + OR = { + AND = { + faith = { trait_is_virtue = generous } + NOT = { has_trait = generous } + OR = { + has_trait = greedy + has_trait = callous + has_trait = arrogant + has_trait = vengeful + } + } + AND = { + faith = { trait_is_virtue = compassionate } + NOT = { has_trait = compassionate } + OR = { + has_trait = greedy + has_trait = callous + has_trait = arrogant + has_trait = vengeful + } + } + AND = { + faith = { trait_is_sin = generous } + has_trait = generous + } + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + create_character = { + age = 31 + gender_female_chance = 0.5 + trait = education_intrigue_1 + trait = stubborn + diplomacy = 8 + martial = 3 + stewardship = 4 + intrigue = 8 + learning = 1 + random_traits_list = { + count = 2 + compassionate = {} + gregarious = {} + deceitful = {} + generous = {} + content = {} + greedy = {} + just = {} + } + random_traits = yes + location = root.location + faith = root.faith # They 'convert' if they ever join your court. + culture = root.location.culture + save_scope_as = beggar + } + scope:beggar = { + add_character_flag = peasant_outfit + } + } + #Give gold + option = { + name = { + trigger = { + faith = { + OR = { + trait_is_virtue = generous + trait_is_virtue = compassionate + } + } + } + text = pilgrimage.2501.a.virtue + } + name = { + trigger = { + faith = { trait_is_sin = generous } + } + text = pilgrimage.2501.a.sin + } + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + pay_short_term_gold = { + target = scope:beggar + gold = minor_gold_value + } + generosity_piety_stress_effect = yes + add_character_flag = { + flag = pilgrimage_2501_gave_gold + days = 3 + } + trigger_event = pilgrimage.2502 + } + #Go away + option = { + name = pilgrimage.2501.b + parsimony_piety_stress_effect = yes + trigger_event = pilgrimage.2502 + } + #Die! + option = { + name = pilgrimage.2501.c.arrogant + trigger = { has_trait = arrogant } + scope:beggar = { + death = { + killer = root + death_reason = death_execution + } + } + add_dread = minor_dread_gain + } +} + +#Beggar wants another favor for their sister +pilgrimage.2502 = { + type = character_event + title = pilgrimage.2502.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = pilgrimage_2501_gave_gold + } + desc = pilgrimage.2502.desc.gave + } + desc = pilgrimage.2502.desc.refused + } + desc = pilgrimage.2502.desc.end + } + theme = travel_pilgrimage + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:beggar + animation = beg + outfit_tags = { beggar_rags } + } + # Option A: Relent and give the beggar (more) money. + option = { + name = pilgrimage.2502.a + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + pay_short_term_gold = { + target = scope:beggar + gold = minor_gold_value + } + generosity_piety_stress_effect = yes + if = { + limit = { + has_character_flag = pilgrimage_2501_gave_gold + } + trigger_event = pilgrimage.2503 + } + else = { + hidden_effect = { + scope:beggar = { + death = { + death_reason = death_vanished + } + } + } + } + } + # Option B (Special): Refuse, losing Generous and gaining Callous + option = { + name = pilgrimage.2502.b + trigger = { + NOT = { has_character_flag = pilgrimage_2501_gave_gold } + faith = { trait_is_sin = generous } + has_trait = generous + NOR = { + has_trait = callous + has_trait = compassionate + has_trait = sadistic + } + } + remove_trait = generous + add_trait = callous + stress_impact = { + base = major_stress_impact_gain + } + hidden_effect = { + scope:beggar = { + death = { + death_reason = death_vanished + } + } + } + } + # Option C: Refuse the beggar's second request, normal effects. + option = { + name = { + trigger = { has_character_flag = pilgrimage_2501_gave_gold } + text = pilgrimage.2502.c.gave + } + name = { + trigger = { + NOT = { + has_character_flag = pilgrimage_2501_gave_gold + } + } + text = pilgrimage.2502.c.refused + } + parsimony_piety_stress_effect = yes + hidden_effect = { + scope:beggar = { + death = { + death_reason = death_vanished + } + } + } + } +} + +#Beggar wants favor for sisters children +pilgrimage.2503 = { + type = character_event + title = pilgrimage.2503.t + desc = pilgrimage.2503.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:beggar + animation = beg + outfit_tags = { beggar_rags } + } + + option = { + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + name = pilgrimage.2503.a + pay_short_term_gold = { + target = scope:beggar + gold = minor_gold_value + } + generosity_piety_stress_effect = yes + trigger_event = { + id = pilgrimage.2504 + days = 0 + } + } + + option = { + name = pilgrimage.2503.b + + parsimony_piety_stress_effect = yes + } + +} +#Happy beggar +pilgrimage.2504 = { + type = character_event + title = pilgrimage.2504.t + desc = pilgrimage.2504.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:beggar + animation = beg + outfit_tags = { beggar_rags } + } + #Add trait option + option = { + show_unlock_reason = no + trigger = { + OR = { + is_ai = no + short_term_gold >= medium_gold_value + } + OR = { + # Must be able to replace a personality trait with either Generous... + AND = { + faith = { + trait_is_virtue = generous + } + NOT = { has_trait = generous } + OR = { + has_trait = greedy + has_trait = callous + has_trait = arrogant + has_trait = vengeful + } + } + # ...or with Compassionate + AND = { + faith = { + trait_is_virtue = compassionate + } + NOR = { + has_trait = compassionate + has_trait = sadistic + } + OR = { + has_trait = callous + has_trait = greedy + has_trait = arrogant + has_trait = vengeful + } + } + } + } + name = pilgrimage.2504.a + flavor = pilgrimage.2504.a.flavor + pious_type_option_effect = yes + remove_short_term_gold = medium_gold_value + if = { + limit = { + faith = { + trait_is_virtue = generous + } + NOT = { has_trait = generous } + } + if = { + limit = { has_trait = greedy } + remove_trait = greedy + } + else_if = { + limit = { has_trait = callous } + remove_trait = callous + } + else_if = { + limit = { has_trait = arrogant } + remove_trait = arrogant + } + else_if = { + limit = { has_trait = vengeful } + remove_trait = vengeful + } + stress_impact = { + base = major_stress_impact_gain + } + add_trait_force_tooltip = generous + } + else = { + if = { + limit = { has_trait = callous } + remove_trait = callous + } + else_if = { + limit = { has_trait = greedy } + remove_trait = greedy + } + else_if = { + limit = { has_trait = arrogant } + remove_trait = arrogant + } + else_if = { + limit = { has_trait = vengeful } + remove_trait = vengeful + } + stress_impact = { + base = major_stress_impact_gain + } + add_trait_force_tooltip = compassionate + } + } + #Hook/courtier option + option = { + name = pilgrimage.2504.b + add_courtier = scope:beggar + scope:beggar = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 50 + } + add_trait = loyal + } + add_hook = { + type = loyalty_hook + target = scope:beggar + } + } + #Dismiss them + option = { + name = { + trigger = { + faith = { trait_is_virtue = generous } + } + text = pilgrimage.2504.c.virtue + } + name = { + trigger = { + faith = { trait_is_sin = generous } + } + text = pilgrimage.2504.c.sin + } + very_pious_type_option_effect = yes + add_piety = miniscule_piety_gain + hidden_effect = { + scope:beggar = { + death = { + death_reason = death_vanished + } + } + } + } +} + +scripted_trigger pilgrimage_2511_valid_lordling = { + is_available = yes + ai_compassion < 0 + age >= 13 + highest_held_title_tier < root.highest_held_title_tier + NOR = { + has_trait = shy + has_trait = humble + } + OR = { + has_trait = arrogant + has_trait = arbitrary + has_trait = sadistic + has_trait = wrathful + has_trait = vengeful + } + religion = root.religion + location = root.location +} + +#Cocky Lordling +# by Sean Hughes +pilgrimage.2511 = { + type = character_event + title = pilgrimage.2511.t + desc = { + desc = pilgrimage.2511.desc.start + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + faith = { trait_is_sin = vengeful } + } + desc = pilgrimage.2511.desc.vengeful.christian + } + triggered_desc = { + trigger = { + faith = { trait_is_sin = vengeful } + } + desc = pilgrimage.2511.desc.vengeful + } + triggered_desc = { + trigger = { + faith = { trait_is_sin = wrathful } + } + desc = pilgrimage.2511.desc.wrathful + } + } + } + theme = travel_pilgrimage + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:lordling + animation = anger + } + cooldown = { years = 2 } + trigger = { + OR = { + # Potentially perf-heavy, restricted to players and important AIs. + is_ai = no + highest_held_title_tier >= tier_kingdom + } + # Character personality must conflict at least somewhat with their faith's relevant virtue(s). + faith = { + OR = { + trait_is_sin = wrathful + trait_is_sin = vengeful + } + } + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = arrogant + } + NOR = { + has_trait = forgiving + has_trait = humble + has_trait = calm + } + # Ensure a valid target exists for the event. + location = { + county.holder ?= { + OR = { + pilgrimage_2511_valid_lordling = yes + AND = { + primary_heir ?= { + pilgrimage_2511_valid_lordling = yes + } + } + } + } + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + # Compile a list of possible lordlings. + location = { + county.holder = { + if = { + limit = { pilgrimage_2511_valid_lordling = yes } + add_to_list = arrogant_lordlings + } + if = { + limit = { exists = primary_heir } + primary_heir = { + if = { + limit = { + pilgrimage_2511_valid_lordling = yes + NOT = { is_in_list = arrogant_lordlings } + } + add_to_list = arrogant_lordlings + } + } + } + every_vassal = { + if = { + limit = { + pilgrimage_2511_valid_lordling = yes + NOT = { is_in_list = arrogant_lordlings } + } + add_to_list = arrogant_lordlings + } + if = { + limit = { exists = primary_heir } + primary_heir = { + if = { + limit = { + pilgrimage_2511_valid_lordling = yes + NOT = { is_in_list = arrogant_lordlings } + } + add_to_list = arrogant_lordlings + } + } + } + } + } + } + random_in_list = { + list = arrogant_lordlings + # Prefer to select characters who are not powerful yet, but could become powerful. + limit = { + any_heir_title = { + tier >= root.highest_held_title_tier + } + } + alternative_limit = { + any_heir_title = { + tier = tier_duchy + } + } + alternative_limit = { + always = yes + } + + weight = { + base = 1 + + # Trait modifiers - between +158 and +0, depending on traits + modifier = { + has_trait = arrogant + add = 100 + } + modifier = { + has_trait = wrathful + add = 33 + } + modifier = { + has_trait = sadistic + add = 25 + } + + # Age modifiers - between +75 (at 13 years old) and +0 (at 28 years old) + modifier = { + add = { + value = 28 + subtract = age + multiply = 5 + min = 0 + } + } + } + + save_scope_as = lordling + } + } + #Fight! + option = { + name = pilgrimage.2511.a + worldly_type_option_effect = yes + add_prestige = minor_prestige_gain + scope:lordling = { + increase_wounds_effect = { REASON = fight } + } + progress_towards_rival_effect = { + CHARACTER = scope:lordling + REASON = rival_pilgrimage_lordling + OPINION = 0 + } + } + #Go 4 athletic + option = { + name = pilgrimage.2511.c + trigger = { + has_traits_that_negate_athletic_trigger = no #Are we already athletic or does any of our traits contradict athletic? + health >= 2.0 + } + add_prestige = minor_prestige_loss + stress_impact = { + base = massive_stress_impact_gain + } + add_trait = athletic + } + #Calm down + option = { + name = pilgrimage.2511.b + pious_type_option_effect = yes + add_prestige = minor_prestige_loss + add_piety = miniscule_piety_gain + stress_impact = { + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + } +} + +################################ +# Religion-specific Journey Events +# 3001-3999 +# by Sean Hughes +################################ +# 3001-3100: Christianity +# pilgrimage.3001 - Zealous priest giving sermon in freezing rains +# pilgrimage.3002-3 - Naked preacher claiming to have reclaimed the lost innocence of Adam & Eve +# pilgrimage.3004 - Doomsayer claiming the end is nigh! +# +# 3101-3200: Islam +# pilgrimage.3102 - Ziyarat - Why am I taking this pilgrimage? +# +# 3201-3300: Hinduism +# pilgrimage.3201 - Ritual purification in a river +# pilgrimage.3202 - Contemplating the universe +# +# 3301-3400: Buddhism +# pilgrimage.3301 - Critical Wanderer +# pilgrimage.3302 - The Wisdom of Goats +# pilgrimage.3303 - Kalama Sutta +# +## 3401-3500: Dharmic +# pilgrimage.3401 - Brahmacharya Challenged +# +###3001-3100: Christianity +#Zealous priest giving sermon in freezing rains +# by Sean Hughes +pilgrimage.3001 = { + type = character_event + title = pilgrimage.3001.t + desc = pilgrimage.3001.desc + theme = travel_pilgrimage + override_background = { reference = terrain_travel } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = cynical } + animation = personality_cynical + } + triggered_animation = { + trigger = { has_trait = zealous } + animation = admiration + } + animation = personality_honorable + } + right_portrait = { + character = scope:zealous_priest + animation = personality_zealous + outfit_tags = { bishop_outfit } + } + cooldown = { years = 15 } + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + play_music_cue = "mx_cue_general_crusade_event_2" + random_dummy_gender_clergy_effect = yes + create_character = { + age = 40 + gender = scope:dummy_clergy_gender + location = root.location + faith = root.faith + culture = root.culture + save_scope_as = zealous_priest + } + } + #Listen diligently + option = { + name = pilgrimage.3001.a + pious_type_option_effect = yes + add_piety = medium_piety_gain + if = { + limit = { + NOT = { has_trait = whole_of_body } + } + if = { + limit = { + NOT = { has_trait = ill } + } + random = { + chance = { + value = 35 + add = { + value = health + multiply = -2.5 + } + } + show_as_tooltip = { add_trait = ill } + custom_tooltip = pilgrimage.3001.a.tt + hidden_effect = { + #Adds the trait, sends event "health.2201" to those who care if health is brought too low + contract_disease_effect = { + DISEASE = ill + TREATMENT_EVENT = no + } + } + } + } + else_if = { + limit = { + NOT = { has_trait = pneumonic } + } + random = { + chance = { + value = 15 + add = { + value = health + multiply = -1.5 + } + } + show_as_tooltip = { add_trait = pneumonic } + custom_tooltip = pilgrimage.2009.a.tt + hidden_effect = { + #Adds the trait, sends event "health.2201" to those who care if health is brought too low + contract_disease_effect = { + DISEASE = pneumonic + TREATMENT_EVENT = no + } + } + } + } + } + give_pilgrim_xp_effect = yes + } + #No + option = { + name = pilgrimage.3001.b + add_piety = miniscule_piety_loss + } + after = { + hidden_effect = { + scope:zealous_priest = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +#Naked preacher claiming to have reclaimed the lost innocence of Adam & Eve +# by Sean Hughes +pilgrimage.3002 = { + type = character_event + title = pilgrimage.3002.t + desc = pilgrimage.3002.desc + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = disapproval + } + triggered_animation = { + trigger = { + any_secret = { type = secret_non_believer } + } + animation = thinking + } + animation = disbelief + } + right_portrait = { + character = scope:naked_preacher + animation = personality_zealous + } + cooldown = { years = 30 } + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + faith = { + NOR = { + has_doctrine = tenet_natural_primitivism + has_doctrine = special_doctrine_naked_priests + } + } + NOT = { + any_courtier = { has_character_flag = convinced_naked_preacher } + } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + create_character = { + age = 40 + gender_female_chance = 50 + location = root.location + faith = faith:adamites + culture = root.culture + trait = zealous + random_traits_list = { + count = 2 + calm = {} + brave = {} + gregarious = {} + ambitious = {} + stubborn = {} + arrogant = {} + } + trait = lifestyle_mystic + save_scope_as = naked_preacher + } + scope:naked_preacher = { add_character_flag = is_naked } + } + #Convert to Adamitism + option = { + name = pilgrimage.3002.a + trigger = { + # Should not show up for the AI with strict regional heresies enabled + OR = { + NOT = { has_game_rule = strict_regional_heresy } + is_ai = no + } + } + worldly_type_option_effect = yes + add_piety = massive_piety_loss + set_character_faith = faith:adamites + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:naked_preacher + NEW_COURT_OWNER = root + } + ai_chance = { + base = 1 + modifier = { + add = 9 + has_trait = cynical + has_trait = trusting + } + modifier = { + add = { + value = ai_rationality + multiply = -1 + max = 0 + } + } + modifier = { + add = { + value = ai_zeal + multiply = -1 + min = 0 + } + } + modifier = { + add = 100 + OR = { + ai_rationality <= -100 + has_trait = lunatic + has_trait = possessed + } + } + modifier = { + factor = 0 + any_independent_ruler = { + faith = faith:adamites + } + } + } + debug_log = "Character converting to Adamitism" + } + #Heretic! + option = { + name = pilgrimage.3002.b + pious_type_option_effect = yes + add_piety = minor_piety_gain + ai_chance = { base = 100 } + } + #Convert 'em! + option = { + name = pilgrimage.3002.c + pious_type_option_effect = yes + add_prestige = medium_prestige_loss + duel = { + skill = learning + value = average_skill_rating + 50 = { + desc = pilgrimage.3002.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3 + min = -49 + } + scope:naked_preacher = { add_character_flag = convinced_naked_preacher } + custom_tooltip = pilgrimage.3002.c.success.tt + #Convinced Adamite + trigger_event = pilgrimage.3003 + } + 50 = { + desc = pilgrimage.3002.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + min = -49 + } + send_interface_toast = { + title = pilgrimage.3002.c.failure + left_icon = root + add_learning_lifestyle_xp = medium_lifestyle_xp + } + } + } + ai_chance = { + base = 100 + } + } + #Nah + option = { + name = pilgrimage.3002.d + worldly_type_option_effect = yes + add_prestige = minor_prestige_gain + ai_chance = { + base = 100 + } + } + after = { + scope:naked_preacher = { + if = { + limit = { + NOT = { has_character_flag = convinced_naked_preacher } + } + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + if = { + limit = { is_courtier_of = root } + remove_character_flag = is_naked + } + } + } +} + +#Follow-up: Convinced Adamite +# by Filippa Gannholm Kirsten +pilgrimage.3003 = { + type = character_event + title = pilgrimage.3003.t + desc = pilgrimage.3003.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:naked_preacher + animation = disbelief + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + scope:naked_preacher = { set_character_faith = root.faith } + add_learning_lifestyle_xp = major_lifestyle_xp + add_piety = medium_piety_gain + } + #Put on some clothes and join us + option = { + name = pilgrimage.3003.a + flavor = pilgrimage.3003.a.flavor + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:naked_preacher + NEW_COURT_OWNER = root + } + } + #Good for you, now spread the word + option = { + name = pilgrimage.3003.b + add_character_modifier = { + modifier = pilgrimage_religion_spread_modifier + years = 5 + } + } + after = { + scope:naked_preacher = { remove_character_flag = is_naked } + } +} + +#Doomsayer claiming the end is nigh! +# by Sean Hughes +pilgrimage.3004 = { + type = character_event + title = pilgrimage.3004.t + desc = pilgrimage.3004.desc + theme = travel_pilgrimage + override_background = { reference = market } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:doomsayer + animation = personality_zealous + outfit_tags = { monk_outfit } + } + cooldown = { years = 15 } + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + random_dummy_gender_clergy_effect = yes + create_character = { + age = 40 + trait = devoted + gender = scope:dummy_clergy_gender + location = root.location + faith = root.faith + culture = root.culture + save_scope_as = doomsayer + } + } + #Outwit them + option = { + name = pilgrimage.3004.a + trigger = { learning >= high_skill_rating } + pious_type_option_effect = yes + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 10 + } + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + add_piety = medium_piety_gain + add_prestige = minor_prestige_value + } + #Entertaining! + option = { + name = pilgrimage.3004.b + worldly_type_option_effect = yes + add_stress = medium_stress_loss + } + #Heretic! + option = { + name = pilgrimage.3004.c + pious_type_option_effect = yes + add_piety = medium_piety_value + } + after = { + hidden_effect = { + if = { + limit = { + is_ai = yes + } + scope:doomsayer = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } + } +} + +###3101-3200: Islam +#Ziyarat - Why am I taking this pilgrimage? +# by Sean Hughes +pilgrimage.3102 = { + type = character_event + title = pilgrimage.3102.t + desc = pilgrimage.3102.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 2 } + trigger = { + religion = religion:islam_religion + is_location_valid_for_travel_event_on_land = yes + } + # See distant places + option = { + name = pilgrimage.3102.a + worldly_type_option_effect = yes + if = { + limit = { + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 5 + } + } + add_stress = minor_stress_loss + add_piety = miniscule_piety_gain + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + add_character_modifier = { + modifier = pilgrimage_worldly_modifier + years = 10 + } + ai_chance = { + base = 50 + compare_modifier = { + value = stress + multiplier = 2 + } + } + } + # My zeal drives me! + option = { + name = pilgrimage.3102.b + trigger = { + NOT = { has_trait = cynical } + } + pious_type_option_effect = yes + show_as_unavailable = { + has_trait = cynical + } + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + add_piety = minor_piety_gain + add_character_modifier = { + modifier = dedicated_to_pilgrimage_modifier + years = 10 + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + # I have... questions + option = { + name = pilgrimage.3102.c + trigger = { + NOT = { has_trait = zealous } + } + pious_type_option_effect = yes + show_as_unavailable = { + has_trait = zealous + } + stress_impact = { + base = minor_stress_impact_gain + cynical = minor_stress_impact_loss + + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + add_learning_lifestyle_xp = massive_lifestyle_xp + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +###3201-3300: Hinduism +#Ritual purification in a river +# by Sean Hughes +pilgrimage.3201 = { + type = character_event + title = pilgrimage.3201.t + desc = pilgrimage.3201.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_content + } + cooldown = { years = 2 } + trigger = { + religion = religion:hinduism_religion + is_location_valid_for_travel_event_on_land = yes + } + #Yep yep + option = { + name = pilgrimage.3201.a + pious_type_option_effect = yes + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + add_prestige = minor_prestige_loss + add_piety = minor_piety_gain + stress_impact = { + arrogant = minor_stress_gain + } + } + #This is beneath me + option = { + name = pilgrimage.3201.b + add_piety = minor_piety_loss + add_prestige = medium_prestige_gain + stress_impact = { + humble = medium_stress_gain + zealous = minor_stress_gain + compassionate = minor_stress_gain + } + } +} + +#Contemplating the universe +pilgrimage.3202 = { + type = character_event + title = pilgrimage.3202.t + desc = { + first_valid = { + triggered_desc = { + trigger = { religion = religion:hinduism_religion } + desc = pilgrimage.3202.desc.hinduism + } + triggered_desc = { + trigger = { religion = religion:buddhism_religion } + desc = pilgrimage.3202.desc.buddhism + } + triggered_desc = { + trigger = { religion = religion:jainism_religion } + desc = pilgrimage.3202.desc.jainism + } + triggered_desc = { + trigger = { faith = { has_doctrine = tenet_sanctity_of_nature } } + desc = pilgrimage.3202.desc.nature + } + } + desc = pilgrimage.3202.desc.end + } + theme = travel_pilgrimage + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 2 } + trigger = { + OR = { + religion = religion:hinduism_religion + religion = religion:buddhism_religion + religion = religion:jainism_religion + faith = { has_doctrine = tenet_sanctity_of_nature } + } + location = { + OR = { + terrain = forest + terrain = jungle + terrain = taiga + } + } + is_location_valid_for_travel_event_on_land = yes + current_travel_plan = { next_destination_progress < 0.8 } + } + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + } + #Contempllllation + option = { + name = pilgrimage.3202.a + pious_type_option_effect = yes + current_travel_plan = { + delay_travel_plan = { months = 2 } + } + add_learning_lifestyle_xp = major_lifestyle_xp + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 20 + } + } + stress_impact = { + base = minor_stress_loss + calm = minor_stress_loss + patient = minor_stress_loss + impatient = medium_stress_gain + } + } + #Jalla jalla + option = { + name = pilgrimage.3202.b + current_travel_plan = { + add_destination_progress = { weeks = 2 } + } + custom_tooltip = pilgrimage.3202.b.tt + stress_impact = { + zealous = minor_stress_gain + patient = minor_stress_gain + } + } + after = { + mp_resume_travel_plan = yes + } +} + +###3301-3400: Buddhism +#Critical Wanderer +# by Sean Hughes +pilgrimage.3301 = { + type = character_event + title = pilgrimage.3301.t + desc = pilgrimage.3301.desc + theme = pilgrimage_activity + theme = travel_pilgrimage + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = gluttonous + has_trait = arrogant + has_trait = greedy + } + } + animation = disapproval + } + animation = personality_coward + } + right_portrait = { + character = scope:wanderer + animation = personality_zealous + outfit_tags = { monk_outfit } + } + cooldown = { years = 5 } + trigger = { + religion = religion:buddhism_religion + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + random_dummy_gender_clergy_effect = yes + create_character = { + age = 80 + gender = scope:dummy_clergy_gender + location = root.location + faith = root.faith + culture = root.culture + save_scope_as = wanderer + } + } + #Show off your learning + option = { + name = pilgrimage.3301.c + bonus_to_all_types_effect = yes + trigger = { learning >= high_skill_rating } + show_as_unavailable = { learning < high_skill_rating } + add_prestige = medium_prestige_gain + add_piety = minor_piety_gain + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 10 + } + } + } + #...alright then + option = { + name = pilgrimage.3301.a + pious_type_option_effect = yes + add_piety = medium_piety_gain + add_prestige = minor_prestige_loss + stress_impact = { + base = minor_stress_gain + temperate = minor_stress_loss + gluttonous = minor_stress_gain + arrogant = minor_stress_gain + greedy = minor_stress_gain + } + } + #My things! + option = { + name = pilgrimage.3301.b + add_piety = minor_piety_loss + stress_impact = { + humble = minor_stress_gain + } + } + after = { + hidden_effect = { + scope:wanderer = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} +#The Wisdom of Goats +# by Laurence Kennedy +pilgrimage.3302 = { + type = character_event + title = pilgrimage.3302.t + desc = pilgrimage.3302.desc + theme = pilgrimage_activity + theme = travel_pilgrimage + override_background = { reference = terrain } + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:mountain_local + animation = personality_zealous + } + cooldown = { years = 5 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + location = { + is_mountainous_or_hilly_trigger = yes + } + religion = religion:buddhism_religion + } + immediate = { + create_character = { + age = 80 + template = default_mystic_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = mountain_local + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Judgemental Relection + option = { + name = pilgrimage.3302.a + add_piety = miniscule_piety_gain + stress_impact = { + humble = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + has_trait = cynical + } + } + } + #Humble Relection + option = { + name = pilgrimage.3302.b + pious_type_option_effect = yes + stress_impact = { + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = arrogant + has_trait = cynical + } + } + } + #Harvest the salt + option = { + name = pilgrimage.3302.c + flavor = pilgrimage.3302.c.flavor + add_gold = { + value = tiny_gold_value + max = 15 + } + stress_impact = { + base = minor_stress_gain + generous = minor_stress_gain + zealous = minor_stress_gain + greedy = minor_stress_loss + } + } + #gets rid of old man + after = { + scope:mountain_local = { + silent_disappearance_effect = yes + } + } +} +# Kalama Sutta +# by Laurence Kennedy +pilgrimage.3303 = { + type = character_event + title = pilgrimage.3303.t + desc = pilgrimage.3303.desc + theme = travel_pilgrimage + + left_portrait = { + character = root + animation = chaplain + } + right_portrait = { + character = scope:wisdom_seeker + animation = beg + + } + cooldown = { years = 5 } + + trigger = { + #Only for Buddhist + religion = religion:buddhism_religion + #make sure it is a city or castle + is_location_valid_for_travel_event_on_land = yes + location = { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + } + #is there a leader there to meet you + province_owner = { + is_available_ai_adult = yes + } + } + } + immediate = { + #set scope for location and find province owner + location = { + save_scope_as = place_to_teach + province_owner = { + save_scope_as = wisdom_seeker + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Intellectual/zealous + option = { + name = pilgrimage.3303.a + add_piety = medium_piety_gain + pious_type_option_effect = yes + #Improves the conversion rate of your court champlain + location.county = { + add_county_modifier = { + modifier = buddhist_teachings_conversion_modifier + #giving fifteen years because this might incentivize you to conquer the territory so you can take advantage of this and conversions can take awhile. + years = 15 + } + } + stress_impact = { + humble = minor_stress_impact_gain + cynical = medium_stress_impact_gain + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + has_trait = humble + } + } + } + #Open minded + option = { + name = pilgrimage.3303.b + flavor = pilgrimage.3303.b.flavor + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = pilgrimage_conversion_modifier + years = 5 + } + stress_impact = { + zealous = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + humble = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + has_trait = arrogant + } + } + } +} +### 3401-3500: Dharmic +# Brahmacharya Challenged +# by Laurence Kennedy +pilgrimage.3401 = { + type = character_event + title = pilgrimage.3401.t + desc = pilgrimage.3401.desc + theme = pilgrimage_activity + theme = travel_pilgrimage + #background for riverside province + override_background = { + trigger = { + location = { + is_riverside_province = yes + } + } + reference = bp3_riverside + } + #background for lakeside province + override_background = { + trigger = { + location = { + is_lakeside_province = yes + } + } + reference = wilderness_wetlands + } + #background for coastal province + override_background = { + trigger = { + location = { + is_coastal = yes + } + } + reference = bp3_coast + } + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:bather + animation = personality_zealous + outfit_tags = { no_clothes } + } + cooldown = { years = 10 } + + trigger = { + #Only for Dharmic + religion = { + OR = { + this = religion:buddhism_religion + this = religion:hinduism_religion + } + } + #make sure you are by a body of water + is_location_valid_for_travel_event_on_land = yes + location = { + OR = { + is_riverside_province = yes + is_lakeside_province = yes + is_coastal = yes + } + } + #find someone in the entourage that you are attracted to + current_travel_plan = { + any_entourage_character = { + root = { + is_attracted_to_gender_of = prev + } + is_physically_able_adult = yes + are_characters_sensible_lovers_trigger = { + INSTIGATING_LOVER = root + TARGET_OF_LOVE = this + } + } + } + + } + immediate = { + #This is for loc to name body of water + location = { + random_neighboring_province = { + limit = { + OR = { + is_river_province = yes + is_lake_province = yes + is_sea_province = yes + } + } + save_scope_as = body_of_water + } + } + #find person to be tempted by + current_travel_plan = { + random_entourage_character = { + limit = { + root = { + is_attracted_to_gender_of = prev + } + is_physically_able_adult = yes + are_characters_sensible_lovers_trigger = { + INSTIGATING_LOVER = root + TARGET_OF_LOVE = this + } + } + save_scope_as = bather + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Give in to temptation + option = { + name = pilgrimage.3401.a + add_character_modifier = { + modifier = pilgrimage_seduction_modifier + years = 5 + } + stress_impact = { + chaste = minor_stress_impact_gain + zealous = medium_stress_impact_gain + lustful = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = chaste + has_trait = zealous + } + } + } + #stay resolute in your chastity + option = { + name = pilgrimage.3401.b + flavor = pilgrimage.3401.b.flavor + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + stress_impact = { + lustful = minor_stress_impact_gain + cynical = medium_stress_impact_gain + chaste = medium_stress_impact_loss + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lustful + has_trait = cynical + } + } + } +} + +############################ +## BP1 Events +## by Chad Uhl +############################ +# 6001-6010: BP1 +# pilgrimage.6001-5 - Sneaking off to a tavern with your pal +# pilgrimage.6006 - You find out your friend is a Non-Believer +# pilgrimage.6007 - You and a friend are on a pilgrimage and your friend is healed in a miracle performed by a wandering priest +# +# + +###6001 - 6010: BP1 +scripted_trigger pilgrimage_6001_friend_trigger = { + is_available_ai_adult = yes + faith = root.faith + trigger_if = { + limit = { faith.religion = religion:islam_religion } + has_trait = drunkard + } +} +#Sneaking off to a tavern with your pal +# by Chad Uhl +pilgrimage.6001 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6001.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:friend + animation = happiness + } + cooldown = { years = 20 } + trigger = { + has_bp1_dlc_trigger = yes + is_location_valid_for_travel_event_on_land = yes + current_travel_plan = { next_destination_progress > 0.5 } + trigger_if = { + limit = { faith.religion = religion:islam_religion } + has_trait = drunkard + } + any_relation = { + type = friend + pilgrimage_6001_friend_trigger = yes + } + } + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = reduce_stress_intent + factor = 2 + } + } + immediate = { + random_relation = { + type = friend + limit = { pilgrimage_6001_friend_trigger = yes } + save_scope_as = friend + } + } + # Let's chat + option = { + name = pilgrimage.6001.a + worldly_type_option_effect = yes + add_character_flag = in_pilgrimage_event_chain + current_travel_plan = { + delay_travel_plan = { days = 30 } + } + if = { + limit = { + scope:friend = { is_ruler = no } + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:friend + NEW_COURT_OWNER = root + } + } + if = { # Get schwasted at the tavern + limit = { + drinks_alcohol_trigger = yes + scope:friend = { + drinks_alcohol_trigger = yes + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + } + trigger_event = { + id = pilgrimage.6002 + days = 5 + } + } + else_if = { + limit = { + NOT = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + scope:friend = { + any_secret = { type = secret_non_believer } + } + } + trigger_event = { + id = pilgrimage.6006 + days = 5 + } + } + else_if = { + limit = { + scope:friend = { + OR = { + # Physical Traits + has_trait = wounded_1 + has_trait = wounded_2 + has_trait = wounded_3 + has_trait = impotent + has_trait = infirm + # Diseases + has_trait = ill + has_trait = bubonic_plague + has_trait = cancer + has_trait = consumption + has_trait = great_pox + has_trait = gout_ridden + has_trait = leper + has_trait = lovers_pox + has_trait = pneumonic + has_trait = smallpox + has_trait = typhus + } + } + } + trigger_event = { + id = pilgrimage.6007 + days = 5 + } + } + else = { # Fallback event + trigger_event = { + id = pilgrimage.6002 + days = 5 + } + } + reverse_add_opinion = { + target = scope:friend + modifier = friendliness_opinion + opinion = 15 + } + involved_activity = { + set_variable = { + name = friend_companion + value = scope:friend + } + } + stress_impact = { + zealous = miniscule_stress_impact_gain + shy = medium_stress_impact_gain + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + } + } + # Leave me alone + option = { + name = pilgrimage.6001.b + reverse_add_opinion = { + target = scope:friend + modifier = insulted_opinion + opinion = -25 + } + stress_impact = { + gregarious = medium_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_zeal = -0.5 + } + } + } + # Zealous Option, bye bye pal + option = { + name = pilgrimage.6001.c + trigger = { has_trait = zealous } + pious_type_option_effect = yes + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 5 + } + } + reverse_add_opinion = { + target = scope:friend + modifier = insulted_opinion + opinion = -25 + } + remove_relation_friend = scope:friend + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_zeal = 1 + } + } + } +} + +#Tavern, Suggestion +pilgrimage.6002 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6002.desc + theme = travel_pilgrimage + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:friend + animation = happiness + } + # Hit up the tavern + option = { + name = pilgrimage.6002.a + custom_tooltip = pilgrimage.6002.a_tt + trigger_event = { + id = pilgrimage.6003 + days = 5 + } + stress_impact = { + zealous = major_stress_impact_gain + temperate = massive_stress_impact_gain + gluttonous = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + } + } + # Politely decline + option = { + name = pilgrimage.6002.b + remove_character_flag = in_pilgrimage_event_chain + current_travel_plan = { resume_travel_plan = yes } + custom_tooltip = pilgrimage.6002.b_tt + stress_impact = { + zealous = minor_stress_impact_loss + temperate = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + } + } + # Emphatic no + option = { + name = pilgrimage.6002.c + trigger = { has_trait = zealous } + remove_character_flag = in_pilgrimage_event_chain + current_travel_plan = { resume_travel_plan = yes } + custom_tooltip = pilgrimage.6002.b_tt + pious_type_option_effect = yes + give_pilgrim_xp_effect = yes + stress_impact = { + zealous = minor_stress_impact_loss + temperate = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + } + } +} + +#Tavern, beginning +pilgrimage.6003 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6003.desc + theme = pilgrimage_destination + override_background = { reference = tavern } + left_portrait = { + character = root + animation = drink_goblet + } + right_portrait = { + character = scope:friend + animation = toast_goblet + } + immediate = { + play_music_cue = "mx_cue_in_taberna_instrumental" + } + #More drinks + option = { + name = pilgrimage.6003.a + custom_tooltip = pilgrimage.6003.a_tt + remove_short_term_gold = tiny_gold_value + random_list = { + 50 = { + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + } + else_if = { + limit = { + has_trait = lifestyle_reveler + has_trait_xp = { + trait = lifestyle_reveler + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_reveler + value = 10 + } + } + } + 50 = { + #Nothing happens + } + } + trigger_event = { + id = pilgrimage.6004 + days = 3 + } + } + #Let's not + option = { + name = pilgrimage.6003.b + custom_tooltip = pilgrimage.6003.b.tt + current_travel_plan = { resume_travel_plan = yes } + } +} + +#Tavern, crash +pilgrimage.6004 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6004.desc + theme = pilgrimage_destination + override_background = { reference = bp1_wine_cellar } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:friend + animation = shock + } + immediate = { + play_music_cue = "mx_cue_in_taberna_instrumental" + random_list = { + 5 = { + # Empty field, significant chance that nothing happens + } + 1 = { + add_trait = wounded_1 + scope:friend = { add_trait = wounded_1 } + } + 2 = { + add_trait = wounded_1 + } + 2 = { + scope:friend = { add_trait = wounded_1 } + } + } + } + #_even more_ drinks! + option = { + name = pilgrimage.6004.a + custom_tooltip = pilgrimage.6004.a.tt + add_character_modifier = { + modifier = life_of_the_party_modifier + years = 5 + } + random_list = { + 50 = { + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + } + else_if = { + limit = { + has_trait = lifestyle_reveler + has_trait_xp = { + trait = lifestyle_reveler + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_reveler + value = 10 + } + } + } + 50 = { + #Nothing happens + } + } + } + #Ayy + option = { + name = pilgrimage.6004.b + custom_tooltip = pilgrimage.6003.b.tt + current_travel_plan = { resume_travel_plan = yes } + } + after = { + trigger_event = { + id = pilgrimage.6005 + days = 5 + } + } +} + +#Returning to camp +pilgrimage.6005 = { + type = character_event + title = pilgrimage.6001.t + desc = { + desc = pilgrimage.6005.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:mad_inkeeper } + desc = pilgrimage.6005.desc.bad + } + triggered_desc = { + desc = pilgrimage.6005.desc.good + } + } + } + theme = pilgrimage_destination + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:friend + animation = paranoia + } + immediate = { + random_list = { + 3 = { + trigger = { has_character_modifier = life_of_the_party_modifier } + save_scope_as = mad_inkeeper + } + 7 = { + # 70% chance not to happen + } + } + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { + reason = best_friend_pilgrimage + copy_reason = friend + target = scope:friend + } + } + remove_character_flag = in_pilgrimage_event_chain + } + #Woo! Good time! + option = { + name = pilgrimage.6005.a + trigger = { + NOT = { exists = scope:mad_inkeeper } + } + } + #Pay for damages + option = { + name = pilgrimage.6005.b + trigger = { exists = scope:mad_inkeeper } + remove_short_term_gold = medium_gold_value + add_piety = minor_piety_gain + pious_type_option_effect = yes + } + #Nuh-uh + option = { + name = pilgrimage.6005.c + trigger = { exists = scope:mad_inkeeper } + add_prestige = medium_prestige_gain + add_piety = medium_piety_loss + worldly_type_option_effect = yes + } + after = { + if = { + limit = { + current_travel_plan ?= { + is_paused = yes + } + } + current_travel_plan = { resume_travel_plan = yes } + } + } +} + +#You find out your friend is a Non-Believer +# by Chad Uhl +pilgrimage.6006 = { + type = character_event + title = pilgrimage.6001.t + desc = pilgrimage.6006.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:friend + animation = anger + } + immediate = { + scope:friend = { + random_secret = { + type = secret_non_believer + reveal_to = root + save_scope_as = friend_secret + } + } + remove_character_flag = in_pilgrimage_event_chain + } + # Priviledge friendship + option = { + name = pilgrimage.6006.a + worldly_type_option_effect = yes + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { + reason = best_friend_pilgrimage + copy_reason = friend + target = scope:friend + } + } + reverse_add_opinion = { + target = scope:friend + modifier = grateful_opinion + opinion = 50 + } + } + # Priviledge faith + option = { + name = pilgrimage.6006.b + pious_type_option_effect = yes + scope:friend_secret = { expose_secret = root } + reverse_add_opinion = { + target = scope:friend + modifier = exposed_my_secret_opinion + } + add_piety = medium_piety_gain + } + # You become a non-believer + option = { + name = pilgrimage.6006.c + trigger = { + OR = { + has_trait = fickle + has_trait = arbitrary + } + NOR = { + any_secret = { type = secret_non_believer } + has_trait = zealous + } + } + add_secret = { type = secret_non_believer } + random_secret = { + type = secret_non_believer + reveal_to = scope:friend + } + if = { + limit = { can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } } + set_relation_best_friend = { + reason = best_friend_pilgrimage + copy_reason = friend + target = scope:friend + } + } + } + after = { + current_travel_plan = { resume_travel_plan = yes } + } +} + +#You and a friend are on a pilgrimage and your friend is healed in a miracle performed by a wandering priest +# by Chad Uhl +pilgrimage.6007 = { + type = character_event + title = pilgrimage.6007.t + desc = pilgrimage.6007.desc + theme = travel_pilgrimage + left_portrait = { + character = scope:friend + animation = sadness + } + right_portrait = { + character = scope:6007_healer + animation = admiration + outfit_tags = { monk_outfit } + } + cooldown = { years = 10 } + immediate = { + play_music_cue = "mx_cue_sacredrite" + create_character = { + location = root.location + template = priest_character_template + faith = root.faith + culture = root.culture + gender_female_chance = root_faith_clergy_gender_female_chance + save_scope_as = 6007_healer + } + scope:6007_healer = { add_character_flag = no_hat } + } + # Priest makes a learning challenge for healing + option = { + name = pilgrimage.6007.a + pious_type_option_effect = yes + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + scope:6007_healer = { + duel = { + skill = learning + value = extremely_high_skill_rating + 30 = { + desc = pilgrimage.6007.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = pilgrimage.6007.a.success + left_icon = scope:friend + scope:friend = { # Remove relevant trait + if = { + limit = { has_trait = wounded_1 } + remove_trait = wounded_1 + } + else_if = { + limit = { has_trait = wounded_2 } + remove_trait = wounded_2 + } + else_if = { + limit = { has_trait = wounded_3 } + remove_trait = wounded_3 + } + else_if = { + limit = { has_trait = impotent } + remove_trait = impotent + } + else_if = { + limit = { has_trait = infirm } + remove_trait = infirm + } + else_if = { + limit = { has_trait = bubonic_plague } + remove_trait = bubonic_plague + if = { + limit = { is_ai = no } + add_achievement_global_variable_effect = { + VARIABLE = ce1_not_today_achievement_unlocked + VALUE = yes + } + } + } + else_if = { + limit = { has_trait = lovers_pox } + remove_trait = lovers_pox + } + else_if = { + limit = { has_trait = cancer } + remove_trait = cancer + } + else_if = { + limit = { has_trait = consumption } + remove_trait = consumption + } + else_if = { + limit = { has_trait = great_pox } + remove_trait = great_pox + } + else_if = { + limit = { has_trait = gout_ridden } + remove_trait = gout_ridden + } + else_if = { + limit = { has_trait = leper } + remove_trait = leper + } + else_if = { + limit = { has_trait = pneumonic } + remove_trait = pneumonic + } + else_if = { + limit = { has_trait = smallpox } + remove_trait = smallpox + } + else_if = { + limit = { has_trait = typhus } + remove_trait = typhus + } + else = { + remove_trait = ill + } + } + add_character_modifier = { + modifier = pilgrimage_miracle_witness_modifier + } + } + } + } + 70 = { + desc = pilgrimage.6007.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = pilgrimage.6007.a.failure + left_icon = scope:friend + scope:friend = { + add_character_modifier = { + modifier = pilgrimage_botched_miracle_modifier + } + } + } + } + } + } + } + stress_impact = { + trusting = minor_stress_impact_loss + zealous = medium_stress_impact_loss + cynical = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = 2 + } + } + } + #Let's not + option = { + name = pilgrimage.6007.b + add_prestige = minor_prestige_gain + stress_impact = { + trusting = medium_stress_impact_gain + zealous = major_stress_impact_gain + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -2 + } + } + } + after = { + remove_character_flag = in_pilgrimage_event_chain + current_travel_plan = { resume_travel_plan = yes } + scope:6007_healer = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } +} + +################################ +# Hajj Arrival Event +# 3101 +################################ +# pilgrimage.3101 - Entering state of Ihram + +pilgrimage.3101 = { + type = activity_event + title = pilgrimage.3101.t + desc = pilgrimage.3101.desc + theme = travel_pilgrimage + left_portrait = { + character = root + animation = personality_content + } + + trigger = { exists = scope:activity } + + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + scope:activity = { + add_activity_log_entry = { + key = hajj_arrived_log + tags = { arrived } + score = 50 + character = root + show_in_conclusion = yes + } + } + } + # Commit to the Irham + option = { + name = pilgrimage.3101.a + pious_type_option_effect = yes + add_piety = minor_piety_gain + stress_impact = { + base = medium_stress_gain + # Stress Loss (minimal) + zealous = medium_stress_loss + temperate = minor_stress_loss + humble = minor_stress_loss + chaste = minor_stress_loss + calm = minor_stress_loss + # Stress Gain (can be substantial) + lustful = medium_stress_gain + arrogant = medium_stress_gain + wrathful = medium_stress_gain + sadistic = medium_stress_gain + vengeful = medium_stress_gain + arbitrary = medium_stress_gain + + hashishiyah = minor_stress_gain + drunkard = minor_stress_gain + rakish = minor_stress_gain + + gluttonous = minor_stress_gain + impatient = minor_stress_gain + deceitful = minor_stress_gain + cynical = minor_stress_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + # I don't have to be that strict + option = { + name = pilgrimage.3101.b + worldly_type_option_effect = yes + add_piety = medium_piety_loss + stress_impact = { + # Stress Gain (major for some traits) + zealous = major_stress_gain + honest = medium_stress_gain + just = medium_stress_gain + # Stress Loss (can be minor to substantial) + lustful = medium_stress_loss + arrogant = medium_stress_loss + + sadistic = minor_stress_loss + vengeful = minor_stress_loss + wrathful = minor_stress_loss + gluttonous = minor_stress_loss + impatient = minor_stress_loss + deceitful = minor_stress_loss + cynical = minor_stress_loss + + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_zeal = -1 + ai_vengefulness = 1 + ai_honor = -1 + } + } + } + after = { + #The Hajj rituals usually play out in 3 days, but we'll utilize the full 3 months for remaining at the Pilgrimage destination + #They also happen in a decided order + trigger_event = { + #Pray at the Place of Abraham + id = hajj.3010 + days = 20 + } + } +} + +################################ +# Generic Arrival Events +# 4001-4999 +# by Petter Vilberg +################################ +# pilgrimage.4001 - Generic Destination +# pilgrimage.4002 - The Mystic you met on your journey is there! +# pilgrimage.4010 - Obligatory Pilgrimage - Skip Destination Events +# pilgrimage.4020 - Bury old host at Destination +# + +#Generic Destination +# by Petter Vilberg +pilgrimage.4001 = { + type = activity_event + title = pilgrimage.4001.t + desc = { + desc = pilgrimage.4001.desc + triggered_desc = { + trigger = { has_trait = cynical } + desc = pilgrimage.4001.cynical_end + } + } + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + artifact = { + target = scope:christian_saint_bone_scope + position = lower_right_portrait + } + trigger = { + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + christian_saint_bone_creation_effect = yes + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#The Mystic you met on your journey is there! +# by Petter Vilberg +pilgrimage.4002 = { + type = activity_event + title = pilgrimage.4001.t + desc = pilgrimage.4002.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = personality_rational + } + right_portrait = { + character = scope:2010_mystic + animation = ecstasy + } + trigger = { + exists = scope:2010_mystic + OR = { + has_trait = lifestyle_mystic + exists = local_var:debated_mystic + } + scope:2010_mystic = { + is_available_ai = yes + } + } + #Fwiends! + option = { + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4002.a_cynical + } + name = pilgrimage.4002.a + trigger = { + NOT = { has_trait = cynical } + } + progress_towards_friend_effect = { + REASON = friend_pilgrimage + CHARACTER = scope:2010_mystic + OPINION = default_friend_opinion + } + ai_chance = { + base = 100 + } + } + #Hook up + option = { + name = pilgrimage.4002.b + trigger = { + has_trait = lustful + scope:2010_mystic = { + NOR = { + has_trait = chaste + has_trait = celibate + } + is_attracted_to_gender_of = root + might_cheat_on_every_partner_trigger = yes + } + is_attracted_to_gender_of = scope:2010_mystic + might_cheat_on_every_partner_trigger = yes + } + had_sex_with_effect = { + CHARACTER = scope:2010_mystic + PREGNANCY_CHANCE = pregnancy_chance + } + progress_towards_lover_effect = { + CHARACTER = scope:2010_mystic + REASON = lover_mystic_lust + OPINION = default_lover_opinion + } + ai_chance = { + base = 0 + modifier = { + OR = { + is_married = no + any_spouse = { + count = all + save_temporary_scope_as = partner + root = { + might_cheat_on_partner_trigger = { PARTNER = scope:partner } + } + } + } + add = 100 + } + } + } + after = { + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Obligatory Pilgrimage Skip Destination Events +pilgrimage.4010 = { + type = activity_event + title = pilgrimage.4010.t + desc = pilgrimage.4010.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + animation = stress + } + animation = boredom + } + immediate = { + give_pilgrim_trait_or_xp_effect = yes + } + #Zealous person regrets their decisiooon... + option = { + name = pilgrimage.4010.a + trigger = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + flavor = pilgrimage.4010.a.flavor + custom_tooltip = pilgrimage.4010.a.tt + add_character_flag = pilgrimage_counter_obligatory + if = { + limit = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + stress_impact = { + impatient = medium_stress_impact_gain + zealous = minor_stress_impact_loss + patient = minor_stress_impact_loss + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + } + trigger_event = { + on_action = pilgrimage_destination_events + delayed = yes + } + } + #I'm _done_. Beam me up, Scotty! + option = { + name = pilgrimage.4010.b + flavor = pilgrimage.4010.b.flavor + custom_tooltip = pilgrimage.4010.b.tt + scope:activity = { progress_activity_phase_after = { days = 1 } } + if = { + limit = { + NOT = { + any_secret = { type = secret_non_believer } + } + has_trait = zealous + } + stress_impact = { + zealous = massive_stress_impact_gain + impatient = medium_stress_impact_loss + lazy = minor_stress_impact_gain + } + } + else = { + stress_impact = { + impatient = medium_stress_impact_loss + lazy = minor_stress_impact_gain + } + } + } +} + +#Bury old host at Destination +pilgrimage.4020 = { + type = activity_event + title = pilgrimage.4020.t + desc = { + desc = pilgrimage.4020.desc.intro + first_valid = { + #Dearly departed mother/father + triggered_desc = { + trigger = { + is_close_family_of = scope:old_pilgrimage_host + has_character_flag = pilgrimage_liked_my_predecessor + } + desc = pilgrimage.4020.desc.relation_family_liked + } + #Dearly departed + triggered_desc = { + trigger = { has_character_flag = pilgrimage_liked_my_predecessor } + desc = pilgrimage.4020.desc.relation_liked + } + #Departed mother/father + triggered_desc = { + trigger = { + is_close_family_of = scope:old_pilgrimage_host + } + desc = pilgrimage.4020.desc.relation_family + } + #... dead liege? + desc = pilgrimage.4020.desc.relation_neutral + } + first_valid = { + triggered_desc = { + trigger = { has_character_flag = pilgrimage_liked_my_predecessor } + desc = pilgrimage.4020.desc.liked + } + desc = pilgrimage.4020.desc.neutral + } + } + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = grief + } + right_portrait = { + character = scope:burial_bishop + animation = sadness + } + lower_center_portrait = { + character = scope:old_pilgrimage_host + } + immediate = { + give_pilgrim_trait_or_xp_effect = yes + save_scope_as = root_scope + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + if = { + limit = { + exists = location.county.holder.cp:councillor_court_chaplain + location.county.holder.cp:councillor_court_chaplain.faith = root.faith + } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = burial_bishop } + } + else = { + create_character = { + template = priest_character_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = burial_bishop + } + set_variable = created_burial_bishop_var + } + remove_character_modifier = pilgrimage_burial_at_destination_modifier + } + #In the ground ye go + option = { + name = pilgrimage.4020.a + flavor = pilgrimage.4020.a.flavor + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_burial_log + tags = { destination_event } + score = 50 + character = root + target = scope:old_pilgrimage_host + location = root.location + show_in_conclusion = yes + #Effects + root = { + pilgrimage_bury_at_destination_effect = yes + } + } + } + create_character_memory = { + type = pilgrimage_handled_predecessor_remains_memory + participants = { predecessor = scope:old_pilgrimage_host } + } + scope:new_memory = { + set_variable = { + name = pilgrimage_destination + value = scope:activity.activity_location + } + } + } + after = { + if = { + limit = { + is_ai = yes + has_variable = created_burial_bishop_var + } + scope:burial_bishop = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + remove_variable = created_burial_bishop_var + } + set_variable = { + name = pilgrimage_burial_location + value = root.location + } + } +} + +################################ +# Holy Site-specific destination arrival events +# 5001-5999 +# by Sean Hughes +################################ +# Christian +# pilgrimage.5001 - Rome +# pilgrimage.5011 - Jerusalem +# pilgrimage.5021 - Constantinople +# pilgrimage.5031 - Alexandria +# +# Jewish +# pilgrimage.5101 - Mount Sinai +# +# Muslim +# pilgrimage.5201 - Medina +# +# Hindu +# pilgrimage.5301 - Varanasi +# pilgrimage.5311 - Ayodhya +# pilgrimage.5321 - Mathura +# pilgrimage.5331 - Haridwar +# pilgrimage.5341 - Kanchipuram +# pilgrimage.5351 - Ujjayini +# pilgrimage.5361 - Dwarka +# +# Buddhism +# pilgrimage.5401 - Bodh Gaya +# pilgrimage.5411 - Kushinagar +# pilgrimage.5421 - Sarnath +# +# Dharmic +# pilgrimage.5445 - Parikrama +# +# Jainism +# pilgrimage.5501 - Shikharj +# +# Zoroastrian +# pilgrimage.5601 - Ushi-darena +# +# Norse Germanic +# pilgrimage.5901 - Paderborn +# +# Tengri +# pilgrimage.5911 - Open Blue Skies +# +# Sanctity of Nature +# pilgrimage.5921 - Sacred Groves + +###Christian +#Rome +pilgrimage.5001 = { + type = activity_event + title = pilgrimage.5001.t + desc = pilgrimage.5001.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_roma } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Jerusalem +pilgrimage.5011 = { + type = activity_event + title = pilgrimage.5011.t + desc = { + desc = pilgrimage.5011.desc.beginning + first_valid = { + triggered_desc = { + trigger = { religion = religion:islam_religion } + desc = pilgrimage.5011.desc.muslim + } + triggered_desc = { + trigger = { religion = religion:judaism_religion } + desc = pilgrimage.5011.desc.jewish + } + desc = pilgrimage.5011.desc.christian + } + desc = pilgrimage.5011.desc.end + } + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = ecstasy + } + trigger = { scope:activity.activity_location.county = title:c_jerusalem } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Constantinople +pilgrimage.5021 = { + type = activity_event + title = pilgrimage.5021.t + desc = pilgrimage.5021.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_byzantion } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Alexandria +pilgrimage.5031 = { + type = activity_event + title = pilgrimage.5031.t + desc = pilgrimage.5031.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_alexandria } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Jewish +#Mount Sinai +pilgrimage.5101 = { + type = activity_event + title = pilgrimage.5101.t + desc = pilgrimage.5101.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_sinai } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Muslim +#Medina +pilgrimage.5201 = { + type = activity_event + title = pilgrimage.5201.t + desc = pilgrimage.5201.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_medina } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Hindu +#Varanasi +pilgrimage.5301 = { + type = activity_event + title = pilgrimage.5301.t + desc = pilgrimage.5301.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_varanasi } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Ayodhya +pilgrimage.5311 = { + type = activity_event + title = pilgrimage.5311.t + desc = pilgrimage.5311.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_ayodhya } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Mathura +pilgrimage.5321 = { + type = activity_event + title = pilgrimage.5321.t + desc = pilgrimage.5321.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_mathura } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Haridwar +pilgrimage.5331 = { + type = activity_event + title = pilgrimage.5331.t + desc = pilgrimage.5331.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_sthanisvara } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Kanchipuram +pilgrimage.5341 = { + type = activity_event + title = pilgrimage.5341.t + desc = pilgrimage.5341.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_kanchipuram } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Ujjayini +pilgrimage.5351 = { + type = activity_event + title = pilgrimage.5351.t + desc = pilgrimage.5351.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_ujjayini } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Dwarka +pilgrimage.5361 = { + type = activity_event + title = pilgrimage.5361.t + desc = pilgrimage.5361.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_dvaraka } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Buddhism +#Bodh Gaya +pilgrimage.5401 = { + type = activity_event + title = pilgrimage.5401.t + desc = pilgrimage.5401.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_gaya } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Kushinagar +pilgrimage.5411 = { + type = activity_event + title = pilgrimage.5411.t + desc = pilgrimage.5411.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_kusinagara } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +#Sarnath +pilgrimage.5421 = { + type = activity_event + title = pilgrimage.5421.t + desc = pilgrimage.5421.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { + #Sarnath is literally a mile from Varanasi + scope:activity.activity_location.county = title:c_varanasi + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} +###Dharmic +#Parikrama +# by Laurence Kennedy +pilgrimage.5445 = { + type = activity_event + title = pilgrimage.5445.t + desc = pilgrimage.5445.desc + theme = pilgrimage_destination + left_portrait = { + character = root + animation = happiness + } + trigger = { + OR = { + religion = religion:hinduism_religion + religion = religion:buddhism_religion + } + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.5445.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.5445.a_cynical + } + name = pilgrimage.5445.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Jainism +#Shikharj +pilgrimage.5501 = { + type = activity_event + title = pilgrimage.5501.t + desc = pilgrimage.5501.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_radha } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Zoroastrian +#Ushi-darena +pilgrimage.5601 = { + type = activity_event + title = pilgrimage.5601.t + desc = pilgrimage.5601.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_baduspan } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Norse Germanic +#Paderborn +pilgrimage.5901 = { + type = activity_event + title = pilgrimage.5901.t + desc = pilgrimage.5901.desc + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + trigger = { scope:activity.activity_location.county = title:c_paderborn } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Tengri +#Open Blue Skies +pilgrimage.5911 = { + type = activity_event + title = pilgrimage.5911.t + desc = pilgrimage.5911.desc + theme = pilgrimage_destination + override_background = { reference = terrain } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +###Sanctity of Nature +#Sacred Groves +pilgrimage.5921 = { + type = activity_event + title = pilgrimage.5921.t + desc = pilgrimage.5921.desc + theme = pilgrimage_destination + override_background = { reference = wilderness_forest } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_death_bury_home } + animation = sadness + } + animation = happiness + } + immediate = { + play_music_cue = mx_cue_pilgrimage_arrival + } + #Alright + option = { + name = { + trigger = { has_variable = pilgrimage_death_bury_home } + text = pilgrimage.4001.a_dead + } + name = { + trigger = { has_trait = cynical } + text = pilgrimage.4001.a_cynical + } + name = pilgrimage.4001.a + give_pilgrim_trait_or_xp_effect = yes + pilgrimage_arrival_stress_loss_effect = yes + } +} + +################################ +# Remaining at a Holy Site events +# 6500-6999 +# by Filippa Gannholm Kirsten & Veronica Pazos +################################ +# pilgrimage.6500 - Appreciation +# pilgrimage.6510 - Lost in Translation +# pilgrimage.6520 - Time To Go Home Soon? +# pilgrimage.6530-5 - Fishy local guide? +# pilgrimage.6540 - Find some exotic wares +# pilgrimage.6750 - Repent - remove secret/coping trait +# pilgrimage.6760 - Theological debate with facts and logic +# pilgrimage.6770 - Do you wanna buy some cheeky relic? +# pilgrimage.6780 - Recruit skillful courtier +# pilgrimage.6790 - Meet local guru - trait flipping event +# pilgrimage.6800 - Entourage member feels The Calling +# pilgrimage.6810 - Do you wanna buy an indulgence? +# pilgrimage.6820 - Do you wanna buy a pilgrim's guide? - based in the Codex Calixtinus +# pilgrimage.6830 - Admire the holy site in a religious way +# pilgrimage.6840 - Ask a local priest to bless your artifact +# pilgrimage.6850 - A Master Thief + +#Appreciation +#by Filippa Gannholm Kirsten +pilgrimage.6500 = { + type = activity_event + title = pilgrimage.6500.t + desc = pilgrimage.6500.desc + theme = pilgrimage_destination + override_background = { reference = market } + center_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = cynical } + animation = personality_cynical + } + animation = personality_content + } + right_portrait = { + character = scope:pilgrimage_member + animation = survey_staff + } + cooldown = { years = 1 } + trigger = { + current_travel_plan ?= { + any_entourage_character = { + count > 1 + NOR = { + has_trait = sadistic + has_trait = cynical + has_trait = paranoid + has_trait = craven + has_trait = reclusive + has_trait = callous + } + is_adult = yes + } + } + } + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + is_adult = yes + NOR = { + has_trait = sadistic + has_trait = cynical + has_trait = paranoid + has_trait = craven + has_trait = reclusive + has_trait = callous + } + } + save_scope_as = pilgrimage_member + } + } + } + #Let's frolick! + option = { + name = pilgrimage.6500.a + trigger = { + culture = { has_cultural_tradition = tradition_xenophilic } + } + show_as_unavailable = { + custom_tooltip = { text = pilgrimage.6500.a.tt } + NOT = { + culture = { has_cultural_tradition = tradition_xenophilic } + } + } + reason = has_cultrad + worldly_type_option_effect = yes + scope:pilgrimage_member = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + stress_impact = { + base = medium_stress_impact_loss + sadistic = minor_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + reclusive = minor_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + OR = { + has_trait = sadistic + has_trait = cynical + has_trait = paranoid + has_trait = craven + has_trait = reclusive + has_trait = callous + } + factor = 0 + } + } + } + #That's nice + option = { + name = pilgrimage.6500.b + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } + #_Technically_ ... + option = { + name = pilgrimage.6500.c + trigger = { has_trait = cynical } + stress_impact = { + cynical = minor_stress_impact_loss + } + scope:pilgrimage_member = { + add_opinion = { + modifier = insulted_opinion + target = root + opinion = -10 + } + } + ai_chance = { + base = 200 + } + } +} + +#Lost in Translation +#by Filippa Gannholm Kirsten +pilgrimage.6510 = { + type = activity_event + title = pilgrimage.6510.t + desc = pilgrimage.6510.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 1 } + #_I'll_ translate it for the unwashed masses + option = { + name = pilgrimage.6510.a + flavor = pilgrimage.6510.a.flavor + trigger = { learning >= medium_skill_rating } + bonus_to_all_types_effect = yes + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_translator_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + add_piety = minor_piety_gain + if = { + limit = { + NOT = { has_trait = scholar } + } + random = { + chance = 5 + add_trait = scholar + } + } + } + } + } + stress_impact = { zealous = miniscule_stress_impact_loss } + ai_chance = { + base = 200 + } + } + #Pla-q-ue... ? + option = { + name = pilgrimage.6510.b + trigger = { learning < medium_skill_rating } + pious_type_option_effect = yes + duel = { + skill = learning + value = average_skill_rating + 50 = { + desc = pilgrimage.6510.b_success.desc + compare_modifier = { + value = scope:duel_value + } + modifier = { + has_trait = diligent + add = 10 + } + modifier = { + has_trait = scholar + add = 10 + } + modifier = { + num_of_known_languages > 1 + add = 10 + } + send_interface_toast = { + left_icon = root + title = pilgrimage.6510.b_success.t + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_translator_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + add_learning_skill = 1 + } + } + } + } + } + 50 = { + desc = pilgrimage.6510.b_failure.desc + compare_modifier = { + value = scope:duel_value + min = 5 + } + send_interface_toast = { + type = event_toast_text_and_effect_bad + left_icon = root + title = pilgrimage.6510.b_failure.t + desc = pilgrimage.6510.b_failure.desc + stress_impact = { base = miniscule_stress_impact_gain } + } + } + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = lazy + has_trait = cynical + has_trait = paranoid + has_trait = craven + has_trait = reclusive + } + factor = 0 + } + modifier = { + learning >= medium_skill_rating + factor = 0 + } + } + } + #Psh who cares + option = { + name = pilgrimage.6510.c + stress_impact = { + lazy = miniscule_stress_impact_loss + shy = miniscule_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0 + } + modifier = { + learning >= medium_skill_rating + factor = 0 + } + } + } +} + +#Time To Go Home Soon? +#by Filippa Gannholm Kirsten +pilgrimage.6520 = { + type = activity_event + title = pilgrimage.6520.t + desc = { + desc = pilgrimage.6520.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = zealous + has_trait = vengeful + } + } + desc = pilgrimage.6520.desc_nonforgiving + } + triggered_desc = { + desc = pilgrimage.6520.desc_forgiving + } + } + } + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = vengeful + } + } + animation = anger + } + animation = personality_forgiving + } + right_portrait = { + character = scope:impatient_pilgrim + animation = eyeroll + } + cooldown = { years = 1 } + trigger = { + current_travel_plan ?= { + any_entourage_character = { + count > 1 + OR = { + has_trait = impatient + has_trait = cynical + has_trait = callous + } + has_any_good_relationship_with_root_trigger = yes + } + } + } + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = zealot_intent + factor = 2 + } + } + immediate = { + current_travel_plan ?= { + random_entourage_character = { + limit = { + OR = { + has_trait = impatient + has_trait = cynical + has_trait = callous + } + has_any_good_relationship_with_root_trigger = yes + } + save_scope_as = impatient_pilgrim + } + } + } + #Lecture 'em + option = { + name = pilgrimage.6520.a + trigger = { + OR = { + has_trait = zealous + has_trait = vengeful + } + } + pious_type_option_effect = yes + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_corrective_lecture_log + score = 50 + tags = { destination_event } + character = root + target = scope:impatient_pilgrim + + #Effects + root = { + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 10 + } + } + else = { + add_piety = minor_piety_gain + } + worsen_relationship_effect = { + TARGET = scope:impatient_pilgrim + REASON = pilgrimage_corrective_lecture + } + } + } + } + stress_impact = { + zealous = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + modifier = { + has_trait = wrathful + has_trait = zealous + add = 100 + } + } + } + #Have you tried looking around? + option = { + name = pilgrimage.6520.b + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + stress_impact = { + zealous = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + } + } + #This is fine + option = { + name = pilgrimage.6520.c + worldly_type_option_effect = yes + reverse_add_opinion = { + target = scope:impatient_pilgrim + modifier = humored_opinion + opinion = 10 + } + stress_impact = { + zealous = medium_stress_impact_gain + cynical = minor_stress_impact_loss + lazy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 0 + } + modifier = { + has_trait = compassionate + add = 100 + } + } + } +} + +scripted_effect 6531_positive_outcome = { + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_hidden_divinity_log + tags = { good } + score = 50 + character = root + show_in_conclusion = yes + #Effects + root = { + add_learning_skill = 1 + give_pilgrim_xp_effect = yes + if = { + limit = { + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = 5 + } + } + } + } + } +} + +scripted_effect 6532_negative_outcome = { + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_robbed_log + tags = { bad } + score = 25 + character = root + + #Effects + root = { + remove_short_term_gold = minor_gold_value + stress_impact = { + base = minor_stress_impact_gain + } + } + } + } +} + +#Fishy local guide? +#by Filippa Gannholm Kirsten +pilgrimage.6530 = { + type = activity_event + title = pilgrimage.6530.t + desc = { + desc = pilgrimage.6530.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:local_guide = { is_adult = yes } + } + desc = pilgrimage.6530.desc_adult + } + triggered_desc = { + trigger = { + scope:local_guide = { is_adult = no } + } + desc = pilgrimage.6530.desc_child + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:warning_character } + desc = pilgrimage.6530.desc_warning + } + triggered_desc = { + trigger = { + learning >= high_skill_rating + scope:local_guide = { has_character_flag = fishy_guide } + } + desc = pilgrimage.6530.desc_learned + } + } + } + theme = pilgrimage_destination + override_background = { reference = market } + left_portrait = { + character = root + #They're trying to fool us and it makes me _angry_ + triggered_animation = { + trigger = { + learning >= high_skill_rating + OR = { + has_trait = wrathful + has_trait = irritable + } + scope:local_guide = { + is_adult = yes + has_character_flag = fishy_guide + } + } + animation = rage + } + #They're trying to fool us and we know it + triggered_animation = { + trigger = { + learning >= high_skill_rating + scope:local_guide = { has_character_flag = fishy_guide } + } + animation = personality_cynical + } + #I don't trust anyone + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + #This is fine, I guess + animation = personality_content + } + right_portrait = { + character = scope:local_guide + triggered_animation = { + trigger = { + is_adult = no + has_character_flag = fishy_guide + root = { learning >= high_skill_rating } + } + animation = shame + } + triggered_animation = { + trigger = { + is_adult = no + } + animation = happiness + } + animation = personality_dishonorable + } + cooldown = { years = 1 } + immediate = { + random_list = { + 4 = { + #An adult + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = local_guide + } + } + 1 = { + #A child + create_character = { + #template = peasant_villager_foundling_character + location = root.location + age = { 5 10 } + random_traits = yes + culture = root.location.county.culture + faith = root.location.county.faith + gender_female_chance = 50 + save_scope_as = local_guide + } + } + } + random_list = { + 1 = { + scope:local_guide = { add_character_flag = fishy_guide } + } + 1 = { + #Is not a fishy guide + } + } + #If we're not particularly learned, find someone who can warn you in the desc + if = { + limit = { + learning < high_skill_rating + current_travel_plan ?= { + any_entourage_character = { + count > 1 + is_adult = yes + learning >= high_skill_rating + } + } + scope:local_guide = { has_character_flag = fishy_guide } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { + is_adult = yes + learning >= high_skill_rating + } + save_scope_as = warning_character + } + } + } + } + #I'll go along + option = { + name = pilgrimage.6530.a + #This should only trigger if: + trigger = { + #We're learned and they're not fishy + trigger_if = { + limit = { learning >= high_skill_rating } + NOT = { + scope:local_guide = { has_character_flag = fishy_guide } + } + } + #Or we're not learned + trigger_else = { always = yes } + } + worldly_type_option_effect = yes + add_character_flag = 6530_went_along_with_guide + #Child outcome isn't really dangerous, show custom tooltip + if = { + limit = { + scope:local_guide = { is_adult = no } + } + custom_tooltip = pilgrimage.6530.a_child.tt + hidden_effect = { + random_list = { + #Wooh, educating roadtrip + 50 = { + #If we're fishy we don't show you divinity + modifier = { + scope:local_guide = { has_character_flag = fishy_guide } + factor = 0 + } + #Divinity event + trigger_event = pilgrimage.6531 + } + #This is a trap + 50 = { + #Non-fishy guides don't lead you to the trap + modifier = { + scope:local_guide = { + NOT = { has_character_flag = fishy_guide } + } + factor = 0 + } + #Child heartstring event + trigger_event = pilgrimage.6533 + } + } + } + } + #Adult outcome should show tooltip outcome + else = { + #If we're learned and they're not fishy this is a done deal + if = { + limit = { + learning >= high_skill_rating + NOT = { + scope:local_guide = { has_character_flag = fishy_guide } + } + } + random_list = { + #Wooh, educating roadtrip + 50 = { + show_chance = no + desc = pilgrimage.6530.divinity.desc + show_as_tooltip = { 6531_positive_outcome = yes } + #Divinity event + trigger_event = pilgrimage.6531 + } + } + } + #But if we're not learned and they might be fishy then who knows + else = { + random_list = { + #Wooh, educating roadtrip + 50 = { + show_chance = no + desc = pilgrimage.6530.divinity.desc + #If we're fishy we don't show you divinity + modifier = { + scope:local_guide = { has_character_flag = fishy_guide } + factor = 0 + } + show_as_tooltip = { 6531_positive_outcome = yes } + #Divinity event + trigger_event = pilgrimage.6531 + } + #This is a trap + 50 = { + show_chance = no + desc = pilgrimage.6530.dangerous.desc + #Non-fishy guides don't lead you to the trap + modifier = { + scope:local_guide = { + NOT = { has_character_flag = fishy_guide } + } + factor = 0 + } + show_as_tooltip = { 6532_negative_outcome = yes } + #Trap event + trigger_event = pilgrimage.6532 + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = craven + factor = 0.5 + } + modifier = { + has_trait = paranoid + factor = 0 + } + modifier = { + OR = { + has_trait = trusting + has_trait = gregarious + } + add = 100 + } + } + } + #You sir, should be ashamed + option = { + name = { + trigger = { + scope:local_guide = { is_adult = no } + } + text = pilgrimage.6530.b_child + } + name = pilgrimage.6530.b + trigger = { + learning >= high_skill_rating + scope:local_guide = { has_character_flag = fishy_guide } + } + flavor = pilgrimage.6530.b.flavor + #Some tasty virtue piety + if = { + limit = { + faith = { + OR = { + trait_is_virtue = forgiving + trait_is_virtue = compassionate + } + } + } + pious_type_option_effect = yes + add_piety = minor_piety_gain + } + else = { + add_piety = miniscule_piety_gain + stress_impact = { base = minor_stress_loss } + } + add_character_modifier = { + modifier = pilgrimage_forgiving_modifier + years = 5 + } + stress_impact = { + forgiving = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + #You sir, need to pay me gold + option = { + name = pilgrimage.6530.c + trigger = { + learning >= high_skill_rating + has_trait = greedy + scope:local_guide = { + has_character_flag = fishy_guide + is_adult = yes + } + } + flavor = pilgrimage.6530.c.flavor + #Some tasty virtue piety + if = { + limit = { + faith = { trait_is_virtue = greedy } + } + pious_type_option_effect = yes + add_piety = minor_piety_gain + } + scope:local_guide = { + pay_short_term_gold = { + target = root + gold = major_gold_value + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = low_negative_opinion + } + } + stress_impact = { + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + #You sir, need to get whipped + option = { + name = pilgrimage.6530.d + trigger = { + learning >= high_skill_rating + has_trait = sadistic + scope:local_guide = { + has_character_flag = fishy_guide + is_adult = yes + } + } + flavor = pilgrimage.6530.d.flavor + #Some tasty virtue piety + if = { + limit = { + faith = { + OR = { + trait_is_virtue = wrathful + trait_is_virtue = irritable + trait_is_virtue = sadistic + trait_is_virtue = flagellant + } + } + } + pious_type_option_effect = yes + add_piety = minor_piety_gain + } + add_dread = medium_dread_gain + scope:local_guide = { + increase_wounds_effect = { REASON = whipping } + add_opinion = { + target = root + modifier = angry_opinion + opinion = low_negative_opinion + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + flagellant = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = forgiving + has_trait = compassionate + } + factor = 0 + } + } + } + #I don't want any part in this + option = { + name = pilgrimage.6530.e + if = { + limit = { + learning >= high_skill_rating + OR = { + has_trait = wrathful + has_trait = irritable + has_trait = sadistic + } + scope:local_guide = { has_character_flag = fishy_guide } + } + stress_impact = { + wrathful = minor_stress_impact_gain + irritable = minor_stress_impact_gain + } + } + ai_chance = { + base = 50 + } + } + after = { + if = { + limit = { + NOT = { has_character_flag = 6530_went_along_with_guide } + } + #Clean up created characters + trigger_event = { + id = pilgrimage.6535 + days = 5 + } + } + } +} + +#Fishy guide not so fishy actually +pilgrimage.6531 = { + type = activity_event + title = pilgrimage.6531.t + desc = { + random_valid = { + desc = pilgrimage.6531.desc_wellspring + desc = pilgrimage.6531.desc_crystal_cavern + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + } + } + desc = pilgrimage.6531.desc_cynical + } + triggered_desc = { + desc = pilgrimage.6531.desc_non_cynical + } + } + } + theme = pilgrimage_destination + override_background = { + trigger = { + NOT = { + root.location = { geographical_region = world_middle_east } + } + } + reference = ep2_hunt_forest_cave + } + override_background = { + trigger = { + root.location = { geographical_region = world_middle_east } + } + reference = wilderness + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + } + } + animation = thinking + } + animation = prayer + } + right_portrait = { + character = scope:local_guide + animation = personality_content + } + immediate = { + remove_character_flag = 6530_went_along_with_guide + 6531_positive_outcome = yes + } + #This is quite something! + option = { + name = pilgrimage.6531.a + bonus_to_all_types_effect = yes + ai_chance = { + base = 100 + } + } + after = { + #Clean up created characters + trigger_event = { + id = pilgrimage.6535 + days = 5 + } + } +} + +#Fishy guide _was_ fishy! +pilgrimage.6532 = { + type = activity_event + title = pilgrimage.6532.t + desc = pilgrimage.6532.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOT = { + root.location = { geographical_region = world_middle_east } + } + } + reference = ep2_hunt_foggy_forest + } + override_background = { + trigger = { + root.location = { geographical_region = world_middle_east } + } + reference = terrain_travel + } + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:6532_local_bandit + animation = hunting_knife_start + } + lower_left_portrait = { + trigger = { exists = scope:6532_protector } + character = scope:6532_protector + } + lower_right_portrait = { + character = scope:local_guide + } + immediate = { + remove_character_flag = 6530_went_along_with_guide + if = { + limit = { + any_pool_character = { + province = root.location + 2002_local_prowess_character_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { 2002_local_prowess_character_trigger = yes } + save_scope_as = 6532_local_bandit + } + } + else = { + scope:local_guide = { save_scope_as = value_target } + create_character = { + template = new_warrior_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + gender_female_chance = scope_value_target_soldier_female_chance + prowess = { medium_skill_rating high_skill_rating } + save_scope_as = 6532_local_bandit + } + scope:6532_local_bandit = { add_character_flag = created_bandit } + } + if = { + limit = { + current_travel_plan ?= { + any_entourage_character = { + OR = { + has_court_position = bodyguard_court_position + has_court_position = akolouthos_court_position + is_knight_of = root + } + } + } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { has_court_position = akolouthos_court_position } + alternative_limit = { has_court_position = bodyguard_court_position } + alternative_limit = { is_knight_of = root } + save_scope_as = 6532_protector + } + } + } + if = { + limit = { exists = scope:warning_character } + reverse_add_opinion = { + target = scope:warning_character + modifier = ignored_opinion + opinion = low_negative_opinion + } + } + } + #Bodyguard! Pls! + option = { + name = pilgrimage.6532.a + trigger = { exists = scope:6532_protector } + scope:6532_protector = { + duel = { + skill = prowess + target = scope:6532_local_bandit + 75 = { + desc = pilgrimage.6532.a_success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_text_good + title = pilgrimage.6532.a_success.t + left_icon = scope:6532_protector + right_icon = scope:6532_local_bandit + desc = pilgrimage.6532.a_success.desc + } + scope:6532_protector = { add_prowess_skill = 1 } + } + 25 = { + desc = pilgrimage.6532.a_failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pilgrimage.6532.a_failure.t + left_icon = scope:6532_protector + right_icon = scope:6532_local_bandit + scope:6532_protector = { + increase_wounds_effect = { REASON = attacked } + } + } + } + } + } + ai_chance = { + base = 200 + modifier = { + has_perk = zealous_proselytizer_perk + factor = 0 + } + } + } + #By the power of zeal! + option = { + name = pilgrimage.6532.b + trigger = { has_perk = zealous_proselytizer_perk } + show_as_unavailable = { + NOT = { has_perk = zealous_proselytizer_perk } + } + custom_tooltip = pilgrimage.6532.c_success.desc + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_exorcism_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + add_piety = medium_piety_gain + } + } + } + ai_chance = { + base = 200 + } + } + #Attempt to scare them off + option = { + name = pilgrimage.6532.c + duel = { + skills = { learning intrigue } + value = medium_skill_rating + 75 = { + desc = pilgrimage.6532.c_success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + has_trait = possessed + factor = 2 + } + send_interface_toast = { + type = event_toast_effect_good + title = pilgrimage.6532.c_success.t + left_icon = root + right_icon = scope:6532_local_bandit + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_exorcism_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + if = { + limit = { + NOT = { has_perk = zealous_proselytizer_perk } + } + add_perk = zealous_proselytizer_perk + } + else = { + add_piety = medium_piety_gain + } + } + } + } + } + } + 25 = { + desc = pilgrimage.6532.c_failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pilgrimage.6532.c_failure.t + left_icon = root + right_icon = scope:6532_local_bandit + 6532_negative_outcome = yes + } + } + } + ai_chance = { + base = 100 + modifier = { + exists = scope:6532_protector + factor = 0 + } + modifier = { + has_perk = zealous_proselytizer_perk + factor = 0 + } + } + } + after = { + #Clean up created characters + trigger_event = { + id = pilgrimage.6535 + days = 5 + } + } +} + +#Fishy child breaks down +pilgrimage.6533 = { + type = activity_event + title = pilgrimage.6533.t + desc = pilgrimage.6533.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOT = { + root.location = { geographical_region = world_middle_east } + } + } + reference = ep2_hunt_foggy_forest + } + override_background = { + trigger = { + root.location = { geographical_region = world_middle_east } + } + reference = terrain_travel + } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:local_guide + animation = sadness + } + immediate = { + remove_character_flag = 6530_went_along_with_guide + } + #Show some compassion + option = { + name = pilgrimage.6533.a + flavor = pilgrimage.6533.a.flavor + bonus_to_all_types_effect = yes + #Some tasty virtue piety + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_helped_child_log + tags = { good } + score = 50 + character = root + + #Effects + root = { + if = { + limit = { + faith = { + OR = { + trait_is_virtue = forgiving + trait_is_virtue = compassionate + } + } + } + add_piety = medium_piety_gain + } + else = { + add_character_modifier = { + modifier = pilgrimage_forgiving_modifier + years = 5 + } + } + pay_short_term_gold = { + target = scope:local_guide + gold = medium_gold_value + } + } + } + } + stress_impact = { + forgiving = major_stress_impact_loss + compassionate = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = callous + has_trait = greedy + has_trait = vengeful + } + factor = 0 + } + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + #Unacceptable! + option = { + name = pilgrimage.6533.b + flavor = pilgrimage.6533.b.flavor + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + vengeful = major_stress_impact_loss + callous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = generous + } + factor = 0 + } + } + } + after = { + #Clean up created characters + trigger_event = { + id = pilgrimage.6535 + days = 5 + } + } +} + +#To avoid people being cleaned up or dying before the chain is completed :angery: +pilgrimage.6535 = { + hidden = yes + immediate = { + if = { + limit = { + scope:local_guide ?= { is_alive = yes } + } + scope:local_guide = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + + if = { + limit = { + scope:6532_local_bandit ?= { + is_alive = yes + has_character_flag = created_bandit + } + } + scope:6532_local_bandit = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +scripted_trigger 6540_wares_vendor_trigger = { + age = { 20 40 } + is_lowborn = yes + stewardship = { + min_template_decent_skill + max_template_decent_skill + } + OR = { + has_trait = education_stewardship_2 + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } +} + +#Find some exotic wares +#by Filippa Gannholm Kirsten +pilgrimage.6540 = { + type = activity_event + title = pilgrimage.6540.t + desc = pilgrimage.6540.desc + theme = pilgrimage_destination + override_background = { reference = market } + center_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = disapproval + } + animation = betting + } + right_portrait = { + character = scope:6540_vendor + animation = storyteller + } + cooldown = { years = 10 } + trigger = { + #This is more for human flavor + is_ai = no + } + weight_multiplier = { + base = 1 + modifier = { + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_worldly + } + } + factor = 2 + } + } + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + 6540_wares_vendor_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { 6540_wares_vendor_trigger = yes } + save_scope_as = 6540_vendor + } + } + else = { + create_character = { + location = root.location + random_traits_list = { + count = 1 + education_stewardship_1 = {} + education_stewardship_2 = {} + education_stewardship_3 = {} + education_stewardship_4 = {} + } + random_traits = yes + dynasty = none + faith = root.location.county.faith + culture = root.location.county.culture + gender_female_chance = 50 + stewardship = { + min_template_decent_skill + max_template_decent_skill + } + save_scope_as = 6540_vendor + } + scope:6540_vendor = { add_character_flag = created_merchant } + } + } + #Buy the goods + option = { + name = pilgrimage.6540.a + flavor = pilgrimage.6540.a.flavor + worldly_type_option_effect = yes + custom_tooltip = pilgrimage.6540.a.tt + pay_short_term_gold = { + target = scope:6540_vendor + gold = minor_gold_value + } + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_exotic_wares_log + tags = { destination_event } + score = 50 + character = root + + #Effects + root = { + add_character_modifier = { + modifier = pilgrimage_exotic_wares_modifier + } + } + } + } + set_variable = { + name = 6540_exotic_wares_cost + value = minor_gold_value + } + stress_impact = { zealous = minor_stress_impact_gain } + } + #High stewardship; better goods! + option = { + name = pilgrimage.6540.b + flavor = pilgrimage.6540.b.flavor + trigger = { stewardship >= high_skill_rating } + worldly_type_option_effect = yes + custom_tooltip = pilgrimage.6540.a.tt + pay_short_term_gold = { + target = scope:6540_vendor + gold = medium_gold_value + } + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_exotic_wares_log + tags = { destination_event } + score = 50 + character = root + + #Effects + root = { + add_character_modifier = { + modifier = pilgrimage_super_exotic_wares_modifier + } + } + } + } + set_variable = { + name = 6540_exotic_wares_cost + value = medium_gold_value + } + stress_impact = { zealous = minor_stress_impact_gain } + } + #Pass + option = { + name = pilgrimage.6540.c + if = { + limit = { + faith = { + NOT = { trait_is_virtue = greedy } + } + } + pious_type_option_effect = yes + } + stress_impact = { zealous = minor_stress_impact_loss } + } + after = { + if = { + limit = { + OR = { + has_character_modifier = pilgrimage_exotic_wares_modifier + has_character_modifier = pilgrimage_super_exotic_wares_modifier + } + } + set_variable = { + name = 6540_exotic_wares_location + value = root.location + } + } + scope:6540_vendor = { + if = { + limit = { has_character_flag = created_merchant } + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +#Repentance +#by Veronica Pazos +pilgrimage.6750 = { + type = activity_event + title = pilgrimage.6750.t + desc = { + desc = pilgrimage.6750.desc.intro + first_valid = { + triggered_desc = { + trigger = { + any_secret = { is_criminal_for = secret_owner } + } + desc = pilgrimage.6750.desc.secret + } + triggered_desc = { + trigger = { + has_trait = drunkard + } + desc = pilgrimage.6750.desc.drunkard + } + triggered_desc = { + trigger = { + has_trait = hashishiyah + } + desc = pilgrimage.6750.desc.hashishiyah + } + triggered_desc = { + trigger = { + has_trait = rakish + } + desc = pilgrimage.6750.desc.rakish + } + triggered_desc = { + trigger = { + has_trait = irritable + } + desc = pilgrimage.6750.desc.irritable + } + triggered_desc = { + trigger = { + has_trait = flagellant + } + desc = pilgrimage.6750.desc.flagellant + } + triggered_desc = { + trigger = { + has_trait = contrite + } + desc = pilgrimage.6750.desc.contrite + } + triggered_desc = { + trigger = { + has_trait = profligate + } + desc = pilgrimage.6750.desc.profligate + } + triggered_desc = { + trigger = { + has_trait = comfort_eater + } + desc = pilgrimage.6750.desc.comfort_eater + } + triggered_desc = { + trigger = { + has_trait = inappetetic + } + desc = pilgrimage.6750.desc.inappetetic + } + } + desc = pilgrimage.6750.desc.outro + } + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = beg + } + #We don't really need a cooldown since it's once per character + trigger = { + has_dlc_feature = tours_and_tournaments + NOT = { has_variable = had_pilgrimage_event_6750 } + OR = { #you have something to repent + any_secret = { is_criminal_for = secret_owner } + has_a_bad_stress_coping_trait_trigger = yes + } + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + immediate = { + set_variable = had_pilgrimage_event_6750 #once per character + location = { save_scope_as = repent_location } + if = { + limit = { + any_secret = { is_criminal_for = secret_owner } + } + random_secret = { + limit = { is_criminal_for = secret_owner } + save_scope_as = repent_trait + } + } + } + #I regret it all + option = { + name = pilgrimage.6750.a + pious_type_option_effect = yes + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_repented_log + tags = { destination_event } + score = 50 + character = root + location = scope:repent_location + show_in_conclusion = yes + #Effects + root = { + add_piety = medium_piety_gain + if = { + limit = { + any_secret = { is_criminal_for = secret_owner } + } + scope:repent_trait = { remove_secret = yes } + } + else_if = { + limit = { has_trait = drunkard } + remove_trait = drunkard + } + else_if = { + limit = { has_trait = hashishiyah } + remove_trait = hashishiyah + } + else_if = { + limit = { has_trait = rakish } + remove_trait = rakish + } + else_if = { + limit = { has_trait = irritable } + remove_trait = irritable + } + else_if = { + limit = { has_trait = flagellant } + remove_trait = flagellant + } + else_if = { + limit = { has_trait = contrite } + remove_trait = contrite + } + else_if = { + limit = { has_trait = profligate } + remove_trait = profligate + } + else_if = { + limit = { has_trait = comfort_eater } + remove_trait = comfort_eater + } + else_if = { + limit = { has_trait = inappetetic } + remove_trait = inappetetic + } + } + } + } + stress_impact = { + base = major_stress_impact_gain + zealous = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_compassion = 1.25 + ai_honor = 1.5 + } + } + } + + #Je ne regrette rien + option = { + name = pilgrimage.6750.b + worldly_type_option_effect = yes + stress_impact = { + base = major_stress_impact_loss + zealous = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } +} + +#Theological Debate +#by Veronica Pazos +pilgrimage.6760 = { + type = activity_event + title = pilgrimage.6760.t + desc = { + desc = pilgrimage.6760.desc.intro + desc = pilgrimage.6760.desc.christian + } + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:bishop_pilgrim + animation = chaplain + } + cooldown = { years = 2 } + + trigger = { + OR = { + faith.religion = religion:eastern_orthodox_religion + faith.religion = religion:catholic_religion + faith.religion = religion:protestant_religion + } + OR = { + NOR = { + faith = faith:orthodox + faith = faith:catholic + } + any_secret = { type = secret_non_believer } + } + location.county.holder.cp:councillor_court_chaplain ?= { + faith.religion ?= religion:christianity_religion + OR = { + NOR = { + faith = faith:orthodox + faith = faith:catholic + } + any_secret = { type = secret_non_believer } + } + } + } + + immediate = { + if = { + limit = { exists = location.county.holder.cp:councillor_court_chaplain } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = bishop_pilgrim } + } + else = { + location.county.holder = { + ordered_courtier_or_guest = { + order_by = { + value = learning + if = { + limit = { has_trait = theologian } + add = 50 + } + if = { + limit = { has_trait = zealous } + add = 20 + } + if = { + limit = { has_trait = cynical } + add = -50 + } + if = { + limit = { + NOR = { + faith = faith:orthodox + faith = faith:catholic + } + faith.religion ?= religion:christianity_religion + } + add = 100 + } + } + save_scope_as = bishop_pilgrim + } + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_lifestyle = learning_lifestyle + } + modifier = { + factor = 2 + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #HEATHEN! + option = { + name = pilgrimage.6760.a + pious_type_option_effect = yes + add_piety = medium_piety_gain + scope:bishop_pilgrim = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -50 + } + } + stress_impact = { + calm = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 1.5 + OR = { + has_trait = wrathful + has_trait = vengeful + } + } + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = gregarious + has_trait = cynical + } + } + } + } + #Refute back + option = { + name = pilgrimage.6760.b + duel = { + skill = learning + target = scope:bishop_pilgrim + 50 = { #this is HARD + desc = pilgrimage.6760.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + add = 25 + OR = { + has_trait = theologian + has_trait = zealous + } + } + send_interface_toast = { + title = pilgrimage.6760.b.success + left_icon = root + right_icon = scope:bishop_pilgrim + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_theological_debate_log + tags = { good } + score = 50 + character = root + target = scope:bishop_pilgrim + + #Effects + root = { + if = { + limit = { NOT = { has_perk = zealous_proselytizer_perk } } + add_perk = zealous_proselytizer_perk + } + else = { + add_learning_lifestyle_xp = major_lifestyle_experience + } + } + } + } + } + } + 50 = { + desc = pilgrimage.6760.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = pilgrimage.6760.b.failure + left_icon = root + right_icon = scope:bishop_pilgrim + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_theological_debate_log + tags = { bad } + score = 50 + character = root + target = scope:bishop_pilgrim + + #Effects + root = { add_piety = minor_piety_loss } + } + } + } + } + } + stress_impact = { + calm = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_lifestyle = learning_lifestyle + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = gregarious + has_trait = cynical + } + } + } + } + #Let's just revel + option = { + name = pilgrimage.6760.c + worldly_type_option_effect = yes + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:bishop_pilgrim } + } + set_relation_friend = { + target = scope:bishop_pilgrim + reason = friend_theological_debate + } + } + stress_impact = { + base = medium_stress_impact_loss + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } +} + +scripted_effect pilgrimage_6770_relic_effect = { + if = { + limit = { has_trait = trusting } + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + else = { + add_piety = minor_piety_gain + } +} + +scripted_trigger pilgrimage_6770_trigger = { + age = { 20 60 } + is_lowborn = yes + has_faith = root.faith #We are looking for a relic merchant who sells relics we have an interest in and can use. + stewardship = { + min_template_decent_skill + max_template_decent_skill + } +} + +#Do you wanna buy a cool relic? +#by Veronica Pazos +pilgrimage.6770 = { + type = activity_event + title = pilgrimage.6770.t + desc = { + desc = pilgrimage.6770.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = pilgrimage.6770.desc.christian + } + triggered_desc = { + trigger = { + religion = religion:islam_religion + } + desc = pilgrimage.6770.desc.islam + } + triggered_desc = { + trigger = { + religion = religion:buddhism_religion + } + desc = pilgrimage.6770.desc.buddhist + } + triggered_desc = { + trigger = { + religion = religion:judaism_religion + } + desc = pilgrimage.6770.desc.judaism + } + desc = pilgrimage.6770.desc.fallback + } + desc = pilgrimage.6770.desc.outro + } + theme = pilgrimage_destination + override_background = { reference = market } + center_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:relic_merchant + animation = debating + } + artifact = { + target = scope:merchant_relic + position = lower_center_portrait + } + cooldown = { years = 1 } + immediate = { + location = { save_scope_as = relic_location } + if = { + limit = { + any_pool_character = { + province = root.location + pilgrimage_6770_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrimage_6770_trigger = yes } + save_scope_as = relic_merchant + } + } + else = { + create_character = { + template = merchant_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith #We are interested in relics we can use + save_scope_as = relic_merchant + } + set_variable = created_random_merchant_var + } + hidden_effect_new_object = { + if = { + limit = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + create_artifact_pedestal_reliquary_christian_effect = { OWNER = scope:relic_merchant } + } + else_if = { + limit = { religion = religion:islam_religion } + create_artifact_pedestal_reliquary_islam_effect = { OWNER = scope:relic_merchant } + } + else_if = { + limit = { religion = religion:buddhism_religion } + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = scope:relic_merchant } + } + else_if = { + limit = { religion = religion:judaism_religion } + create_artifact_pedestal_reliquary_judaism_effect = { OWNER = scope:relic_merchant } + } + else = { + create_artifact_sculpture_religious_effect = { OWNER = scope:relic_merchant } + } + scope:newly_created_artifact = { + save_scope_as = merchant_relic + if = { + limit = { + NOT = { + root = { has_royal_court = yes } + } + } + reforge_artifact = { type = miscellaneous } + } + } + } + } + weight_multiplier = { + base = 1 + } + #Buy + option = { + name = pilgrimage.6770.a + bonus_to_all_types_effect = yes + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_acquired_relic_log + tags = { relic } + score = 50 + character = root + artifact = scope:newly_created_artifact + location = scope:relic_location + show_in_conclusion = yes + # Effects + root = { pilgrimage_6770_relic_effect = yes } + scope:merchant_relic = { set_owner = root } + } + } + pay_short_term_gold = { + target = scope:relic_merchant + gold = { + value = minor_gold_value + max = 10 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold <= minor_gold_value + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + } + } + } + } + #Barter + option = { + name = pilgrimage.6770.b + worldly_type_option_effect = yes + duel = { + skills = { diplomacy stewardship } + target = scope:relic_merchant + 50 = { + desc = pilgrimage.6770.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = pilgrimage.6770.b.success + left_icon = root + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_acquired_relic_log + tags = { relic } + score = 50 + character = root + artifact = scope:newly_created_artifact + location = scope:relic_location + show_in_conclusion = yes + # Effects + root = { pilgrimage_6770_relic_effect = yes } + scope:merchant_relic = { set_owner = root } + } + } + pay_short_term_gold = { + target = scope:relic_merchant + gold = { + value = minor_gold_value + max = 5 + } + } + } + } + 50 = { + desc = pilgrimage.6770.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = pilgrimage.6770.b.failure + left_icon = root + scope:relic_merchant = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + } + } + } + stress_impact = { + lazy = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold <= minor_gold_value + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = gregarious + } + } + } + } + #Nah + option = { + name = pilgrimage.6770.c + stress_impact = { + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + #Is this... a real piece? + option = { + name = pilgrimage.6770.d + trigger = { learning >= high_skill_rating } + bonus_to_all_types_effect = yes + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = major_lifestyle_experience + } + else = { + add_character_modifier = keen_eye_modifier + } + stress_impact = { + base = major_stress_impact_loss + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + after = { + if = { + limit = { + is_ai = yes + has_variable = created_random_merchant_var #we only kill them if we created them, not if they came from the pool + } + scope:relic_merchant = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + remove_variable = created_random_merchant_var + } + } +} + +#Recruit skillful local +#by Veronica Pazos +pilgrimage.6780 = { + type = activity_event + title = pilgrimage.6780.t + desc = pilgrimage.6780.desc + theme = pilgrimage_destination + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:stolen_courtier + animation = thinking + } + lower_center_portrait = scope:current_employer + cooldown = { years = 1 } + trigger = { + location.county.holder ?= { + is_ai = yes + this != root + OR = { + any_court_position_holder = { + location = root.location + is_physically_able_adult = yes + is_available = yes + is_landed = no + } + any_courtier_or_guest = { + is_physically_able_adult = yes + has_any_high_skill_rating = yes + is_available = yes + } + } + } + } + immediate = { + location.county.holder = { save_scope_as = current_employer } + if = { + limit = { + scope:current_employer = { + any_court_position_holder = { + location = root.location + is_physically_able_adult = yes + is_available = yes + is_landed = no + } + } + } + scope:current_employer = { + random_court_position_holder = { + limit = { + location = root.location + is_physically_able_adult = yes + is_available = yes + is_landed = no + } + save_scope_as = stolen_courtier + } + } + } + else = { + scope:current_employer = { + random_courtier_or_guest = { + limit = { + is_physically_able_adult = yes + has_any_high_skill_rating = yes + is_available = yes + } + save_scope_as = stolen_courtier + } + } + } + } + weight_multiplier = { + base = 1 + } + #My court is so much better than this one + option = { + name = pilgrimage.6780.b + trigger = { diplomacy >= high_skill_rating } + show_as_unavailable = { diplomacy < high_skill_rating } + skill = diplomacy + duel = { + skill = diplomacy + target = scope:current_employer + 50 = { #you convince them + desc = pilgrimage.6780.b.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = pilgrimage.6780.b.success.t + left_icon = root + right_icon = scope:stolen_courtier + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_recruited_courtier_log + tags = { good } + score = 50 + character = root + target = scope:stolen_courtier + + #Effects + root = { + recruit_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:stolen_courtier + NEW_COURT_OWNER = root + } + } + } + } + } + hidden_effect = { + reverse_add_opinion = { + target = scope:stolen_courtier + modifier = recruited_me_opinion + opinion = 30 + } + } + } + 50 = { #theyre not impressed + desc = pilgrimage.6780.b.failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = pilgrimage.6780.b.failure.t + right_icon = scope:stolen_courtier + desc = pilgrimage.6780.b.failure.desc + } + } + } + if = { + limit = { + OR = { + scope:stolen_courtier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = scope:stolen_courtier } + } + NOT = { has_relation_nemesis = scope:current_employer } + } + } + progress_towards_rival_effect = { + REASON = pilgrimage_poached_courtier + CHARACTER = scope:current_employer + OPINION = -10 + } + } + else = { + scope:current_employer = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = loyal + } + } + } + } + #Hey you wanna come work for me? + option = { + name = pilgrimage.6780.a + pay_short_term_gold = { + target = scope:stolen_courtier + gold = minor_gold_value + } + custom_tooltip = obligation_hook_tt + add_hook = { + type = obligation_hook + target = scope:stolen_courtier + } + involved_activity ?= { + add_activity_log_entry = { + key = pilgrimage_recruited_courtier_log + tags = { good } + score = 50 + character = root + target = scope:stolen_courtier + + #Effects + root = { + recruit_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:stolen_courtier + NEW_COURT_OWNER = root + } + } + } + } + hidden_effect = { + reverse_add_opinion = { + target = scope:stolen_courtier + modifier = recruited_me_opinion + opinion = 30 + } + } + if = { + limit = { + OR = { + scope:stolen_courtier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = scope:stolen_courtier } + } + NOT = { has_relation_nemesis = scope:current_employer } + } + } + progress_towards_rival_effect = { + REASON = pilgrimage_poached_courtier + CHARACTER = scope:current_employer + OPINION = -10 + } + } + else = { + scope:current_employer = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + honest = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = honest + has_trait = loyal + } + } + } + } + #I don't care enough + option = { + name = pilgrimage.6780.c + scope:current_employer = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + disloyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = deceitful + has_trait = disloyal + } + } + } + } +} + +scripted_trigger pilgrimage_6790_trigger = { + is_available_ai_adult = yes + OR = { + has_trait = lifestyle_mystic + has_trait = theologian + } +} + +#Meet local guru - trait flipping event +#by Veronica Pazos +pilgrimage.6790 = { + type = activity_event + title = pilgrimage.6790.t + desc = pilgrimage.6790.desc + theme = pilgrimage_destination + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:spiritual_mentor + animation = personality_zealous + } + #We don't really need a cooldown since it's once per character + trigger = { + has_dlc_feature = tours_and_tournaments + OR = { #you need to have some spiritual inclination + AND = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value >= 50 + } + } + has_trait = hajjaj + has_trait = lifestyle_mystic + has_trait = theologian + } + num_sinful_traits > 0 #you have something to change + NOT = { has_variable = pilgrimage_6790_var } #once per lifetime + } + immediate = { + set_variable = pilgrimage_6790_var + if = { + limit = { + any_pool_character = { + province = root.location + pilgrimage_6790_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + pilgrimage_6790_trigger = yes + } + save_scope_as = spiritual_mentor + } + } + else = { + create_character = { + template = local_saint_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + save_scope_as = spiritual_mentor + after_creation = { + add_character_flag = mystic_beard_var + } + } + } + } + weight_multiplier = { + base = 1 + } + #Youäve inspired me + option = { + name = pilgrimage.6790.a + trigger = { is_ai = no } + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_changed_ways_log + tags = { good } + score = 50 + character = root + show_in_conclusion = yes + #Effects + root = { + flip_sinful_trait_effect = yes + } + } + } + stress_impact = { + base = massive_stress_impact_gain #you are losing a part of yourself + fickle = medium_stress_impact_loss + zealous = minor_stress_impact_loss + } + } + #I will just listen to your teachings instead + option = { + name = pilgrimage.6790.b + pious_type_option_effect = yes + add_piety = minor_piety_gain + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + #I am PERFECT + option = { + name = pilgrimage.6790.c + worldly_type_option_effect = yes + add_prestige = minor_prestige_gain + stress_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + modifier = { + factor = 2 + has_trait = arrogant + } + } + } +} + +scripted_trigger pilgrimage_6800_valid_member = { + is_landed = no + is_ruler = no + is_physically_able_ai_adult = yes + faith = root.faith + NOR = { + this = root + is_heir_of = root + is_spouse_of = root + has_trait = cynical + has_trait = celibate + has_trait = devoted + is_courtier_of = $NEW_COURT_OWNER$ + } +} + +scripted_effect pilgrimage_6800_friend_effect = { + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:called_member } + } + set_relation_friend = { + reason = friend_holy_site_monk + target = scope:called_member + } + } + else = { + scope:called_member = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 50 + } + } + } +} + +scripted_effect pilgrimage_6800_rival_effect = { + scope:called_member = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = root } + } + progress_towards_rival_effect = { + REASON = rival_no_holy_site_monk + CHARACTER = root + OPINION = -50 + } + } + else = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -50 + } + } + } +} + +scripted_effect pilgrimage_6800_monk_effect = { + add_trait = devoted + add_piety = medium_piety_gain + add_character_flag = need_priest_outfit + every_spouse = { divorce = prev } + every_consort = { remove_concubine = prev } + current_travel_plan = { remove_character = scope:called_member } + if = { + limit = { + scope:called_member = { + is_ruler = no + NOT = { is_courtier_of = scope:holy_site_owner } + } + } + scope:holy_site_owner = { add_courtier = scope:called_member } + } +} + +#Entourage member feels The Calling +#by Veronica Pazos +pilgrimage.6800 = { + type = activity_event + title = pilgrimage.6800.t + desc = pilgrimage.6800.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + center_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:called_member + animation = beg + } + lower_center_portrait = scope:bishop_pilgrim + cooldown = { years = 1 } + trigger = { + location.county.holder ?= { + this != root + save_temporary_scope_as = court_owner_check + } + exists = scope:court_owner_check.cp:councillor_court_chaplain + current_travel_plan ?= { + any_entourage_character = { + pilgrimage_6800_valid_member = { NEW_COURT_OWNER = scope:court_owner_check } + } + } + } + immediate = { + location.county.holder = { save_scope_as = holy_site_owner } + if = { + limit = { exists = scope:holy_site_owner.cp:councillor_court_chaplain } + scope:holy_site_owner.cp:councillor_court_chaplain = { save_scope_as = bishop_pilgrim } + } + current_travel_plan = { + random_entourage_character = { + limit = { + pilgrimage_6800_valid_member = { NEW_COURT_OWNER = scope:holy_site_owner } + } + weight = { + base = 1 + modifier = { + is_close_or_extended_family_of = root + add = 5 + } + modifier = { + has_trait = zealous + add = 5 + } + modifier = { + has_lifestyle = learning_lifestyle + add = 2 + } + modifier = { + has_trait = fickle + add = 1 + } + modifier = { + is_married = yes + add = -5 + } + } + save_scope_as = called_member + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Sure, go + option = { + name = pilgrimage.6800.a + pious_type_option_effect = yes + scope:called_member = { pilgrimage_6800_monk_effect = yes } + involved_activity = { + add_activity_log_entry = { + key = pilgrimage_the_calling_log + tags = { good } + score = 50 + character = root + target = scope:called_member + location = root.location + + #Effects + root = { + add_piety = medium_piety_gain + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = vengeful + has_trait = cynical + } + } + } + } + #We have religious stuff at home too + option = { + name = pilgrimage.6800.b + add_piety = minor_piety_gain + scope:called_member = { + add_trait = celibate + add_piety = medium_piety_gain + add_character_flag = need_priest_outfit + every_spouse = { divorce = prev } #scope:called_member + } + stress_impact = { + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + } + } + } + } + #Don't be silly + option = { + name = pilgrimage.6800.c + worldly_type_option_effect = yes + pilgrimage_6800_rival_effect = yes + stress_impact = { + compassionate = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = cynical + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = zealous + } + } + } + } + #Oh, so you wanna stay to PLOT against me + option = { + name = pilgrimage.6800.d + trigger = { has_trait = paranoid } + pilgrimage_6800_rival_effect = yes + stress_impact = { + base = medium_stress_impact_loss #you caught them + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = paranoid + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + #You can stay and ALSO I'll make a donation + option = { + name = pilgrimage.6800.e + flavor = pilgrimage.6800.e.tt + trigger = { has_trait = zealous } + pious_type_option_effect = yes + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = 20 + } + add_piety = medium_piety_gain + } + else = { add_piety = major_piety_gain } + scope:called_member = { pilgrimage_6800_monk_effect = yes } + pilgrimage_6800_friend_effect = yes + if = { + limit = { + exists = scope:bishop_pilgrim + can_set_relation_friend_trigger = { CHARACTER = scope:bishop_pilgrim } + } + set_relation_friend = { + reason = friend_holy_site_monk_monk + target = scope:bishop_pilgrim + } + } + else_if = { + limit = { can_set_relation_friend_trigger = { CHARACTER = scope:holy_site_owner } } + scope:holy_site_owner = { + set_relation_friend = { + reason = friend_holy_site_monk_monk + target = scope:bishop_pilgrim + } + } + } + else = { + scope:holy_site_owner = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + } + stress_impact = { + avaricious = major_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = avaricious + has_trait = greedy + } + } + } + } +} + +scripted_effect pilgrimage_6810_friend_effect = { + if = { + limit = { + exists = scope:my_bishop + can_set_relation_friend_trigger = { CHARACTER = scope:my_bishop } + } + set_relation_friend = { + reason = friend_bought_indulgences + target = scope:my_bishop + } + } + else_if = { #if you can't be friends we make them endorse you + limit = { exists = scope:my_bishop } + scope:my_bishop = { + add_opinion = { + target = prev #we use prev so we can use the effect with your heir too + modifier = pious_opinion + opinion = 30 + } + } + } + else = { + scope:religious_head_scope = { + add_opinion = { + target = prev + modifier = pious_opinion + opinion = 30 + } + } + } +} + +#Do you wanna buy an indulgence? +#by Veronica Pazos +pilgrimage.6810 = { + type = activity_event + title = pilgrimage.6810.t + desc = pilgrimage.6810.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:bishop_pilgrim + animation = steward + } + lower_left_portrait = { + trigger = { exists = scope:my_heir } + character = scope:my_heir + } + lower_right_portrait = scope:religious_head_scope + lower_center_portrait = { + trigger = { exists = scope:my_bishop } + character = scope:my_bishop + } + cooldown = { years = 1 } + trigger = { + faith = { religion_tag = christianity_religion } #this is basically a Christian thing + exists = faith.religious_head #you have a religious head + faith.religious_head = { + this != root #and it's not you + is_available_ai_adult = yes + } + exists = location.county.holder.cp:councillor_court_chaplain #there's also someone around to be handing out these + location.county.holder.cp:councillor_court_chaplain.faith = faith.religious_head.faith #and they're the same faith (and, by extension, yours) + } + immediate = { + faith.religious_head = { save_scope_as = religious_head_scope } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = bishop_pilgrim } + if = { + limit = { exists = root.player_heir } + player_heir = { save_scope_as = my_heir } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + current_travel_plan ?= { + any_entourage_character = { + this = root.cp:councillor_court_chaplain + } + } + } + cp:councillor_court_chaplain = { save_scope_as = my_bishop } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Buy one + option = { + name = pilgrimage.6810.a + pious_type_option_effect = yes + pay_short_term_gold = { + target = scope:bishop_pilgrim + gold = { + value = medium_gold_value + max = 25 + } + } + add_piety = minor_piety_gain + pilgrimage_6810_friend_effect = yes + if = { + limit = { + faith = { trait_is_virtue = greedy } + } + stress_impact = { + greedy = medium_stress_impact_loss + } + } + else = { + stress_impact = { + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = greedy + } + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = just + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + #Buy one for your heir + option = { + name = pilgrimage.6810.b + trigger = { exists = scope:my_heir } + pious_type_option_effect = yes + pay_short_term_gold = { + target = scope:bishop_pilgrim + gold = { + value = medium_gold_value + max = 25 + } + } + add_piety = minor_piety_gain + scope:my_heir = { pilgrimage_6810_friend_effect = yes } + if = { + limit = { + faith = { trait_is_virtue = greedy } + } + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_loss + } + } + else = { + stress_impact = { + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + generous = medium_stress_impact_loss + } + } + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = generous + } + modifier = { + factor = 0.5 + OR = { + has_trait = greedy + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = just + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + #This is immoral + option = { + name = pilgrimage.6810.c + worldly_type_option_effect = yes + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = minor_lifestyle_experience + } + else_if = { + limit = { has_lifestyle = diplomacy_lifestyle } + add_diplomacy_lifestyle_xp = minor_lifestyle_experience + } + stress_impact = { + cynical = medium_stress_impact_loss + deceitful = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = arbitrary + has_trait = callous + } + } + } + } +} + +scripted_trigger pilgrimage_6820_trigger = { + age = { 20 60 } + is_lowborn = yes + stewardship = { + min_template_decent_skill + max_template_decent_skill + } +} + +#Do you wanna buy a pilgrim's guide? - based in the Codex Calixtinus +#by Veronica Pazos +pilgrimage.6820 = { + type = activity_event + title = pilgrimage.6820.t + desc = pilgrimage.6820.desc + theme = pilgrimage_destination + override_background = { reference = market } + left_portrait = { + character = root + animation = personality_greedy + } + right_portrait = { + character = scope:guide_merchant + animation = beg + } + artifact = { + target = scope:guide_scope + position = lower_center_portrait + } + cooldown = { years = 1 } + trigger = { + #triggered by the on_action + } + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + pilgrimage_6820_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { pilgrimage_6820_trigger = yes } + save_scope_as = guide_merchant + } + } + else = { + create_character = { + template = merchant_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + save_scope_as = guide_merchant + } + set_variable = guide_merchant_var + } + hidden_effect_new_object = { + scope:guide_merchant = { + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = pilgrim_guide_artifact + description = pilgrim_guide_artifact_desc + type = journal + visuals = indian_book + modifier = artifact_monthly_piety_2_modifier + modifier = artifact_diplomacy_1_modifier + save_scope_as = guide_scope + } + } + else = { + create_artifact = { + name = pilgrim_guide_artifact + description = pilgrim_guide_artifact_desc + type = journal + visuals = book + modifier = artifact_monthly_piety_2_modifier + modifier = artifact_diplomacy_1_modifier + save_scope_as = guide_scope + } + } + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_lifestyle = diplomacy_lifestyle + } + modifier = { + factor = 2 + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_worldly + } + } + } + } + #I wanna buy + option = { + name = pilgrimage.6820.a + worldly_type_option_effect = yes + pay_short_term_gold = { + target = scope:guide_merchant + gold = { + value = minor_gold_value + max = 5 + } + } + scope:guide_scope = { + set_owner = { + target = root + history = { + type = purchased + actor = root + recipient = scope:guide_merchant #giver + location = root.location + } + } + } + current_travel_plan ?= { + add_travel_plan_modifier = { modifier = pilgrim_guide_modifier } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = arrogant + } + } + modifier = { + factor = 0 + gold <= medium_gold_value + } + } + } + #You explain the place to them + option = { + name = pilgrimage.6820.b + flavor = pilgrim.6820.b.flavor + trigger = { + learning >= decent_skill_rating + diplomacy >= decent_skill_rating + } + show_as_unavailable = { + learning < decent_skill_rating + diplomacy < decent_skill_rating + } + bonus_to_all_types_effect = yes + add_character_modifier = { + modifier = local_expert_modifier + years = 10 + } + random_list = { + 80 = { } + 20 = { add_diplomacy_skill = 1 } + } + current_travel_plan = { + add_travel_plan_modifier = { + modifier = pilgrim_guide_modifier + } + } + stress_impact = { + humble = medium_stress_impact_gain + } + hidden_effect = { destroy_artifact = scope:guide_scope } # Destroy the trinket if its not bought + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + } + } + #I don't need no guide + option = { + name = pilgrimage.6820.c + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + hidden_effect = { destroy_artifact = scope:guide_scope } # Destroy the trinket if its not bought + } + after = { + if = { + limit = { + is_ai = yes + has_variable = guide_merchant_var + } + scope:guide_merchant = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + remove_variable = guide_merchant_var + } + } +} + +#Admire the holy site in a religious way +#by Veronica Pazos +pilgrimage.6830 = { + type = activity_event + title = pilgrimage.6830.t + desc = pilgrimage.6830.desc + theme = pilgrimage_destination + override_background = { reference = temple } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = lifestyle_reveler + } + } + animation = boredom + } + animation = personality_zealous + } + artifact = { + trigger = { exists = scope:votive_artifact } + target = scope:votive_artifact + position = lower_center_portrait + } + cooldown = { years = 1 } + trigger = { + has_activity_intent = reflection_intent + NOT = { religion = religion:tengrism_religion } + } + immediate = { + if = { + limit = { + any_character_artifact = { + is_equipped = no + artifact_durability < 50 + NOR = { + rarity = illustrious + rarity = famed + } + } + } + random_character_artifact = { + limit = { + is_equipped = no + artifact_durability < 50 + NOR = { + rarity = illustrious + rarity = famed + } + } + save_scope_as = votive_artifact + } + } + else_if = { + limit = { + any_character_artifact = { + is_equipped = no + NOR = { + rarity = illustrious + rarity = famed + } + } + } + random_character_artifact = { + limit = { + is_equipped = no + NOR = { + rarity = illustrious + rarity = famed + } + } + save_scope_as = votive_artifact + } + } + else_if = { + limit = { + any_character_artifact = { is_equipped = no } + } + random_character_artifact = { + limit = { is_equipped = no } + save_scope_as = votive_artifact + } + } + else = { + random_character_artifact = { save_scope_as = votive_artifact } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Pray + option = { + name = pilgrimage.6830.a + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + stress_impact = { + base = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = arrogant + has_trait = cynical + } + } + } + #Admire the architecture + option = { + name = pilgrimage.6830.b + worldly_type_option_effect = yes + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = minor_lifestyle_experience + } + random_list = { + 80 = { + add_character_modifier = { + modifier = architectural_interest_modifier + years = 10 + } + } + 20 = { + add_learning_skill = 1 + } + } + stress_impact = { + base = medium_stress_impact_loss + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + #Make a donation + option = { + name = pilgrimage.6830.c + trigger = { + exists = scope:votive_artifact + has_trait = pilgrim #Only pilgrim since you can't level up the hajj trait + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + custom_tooltip = pilgrimage.6830.c.tt + pious_type_option_effect = yes + add_piety = miniscule_piety_gain + add_trait_xp = { + trait = pilgrim + value = 20 + } + hidden_effect = { destroy_artifact = scope:votive_artifact } + stress_impact = { + base = medium_stress_impact_loss + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + modifier = { + factor = 0 + OR = { + scope:votive_artifact = { + rarity = illustrious + } + scope:votive_artifact = { + rarity = famed + } + } + } + modifier = { + factor = 2 + has_trait = zealous + } + } + } +} + +#Ask a local priest to bless your artifact +#by Veronica Pazos +pilgrimage.6840 = { + type = activity_event + title = pilgrimage.6840.t + desc = pilgrimage.6840.desc + theme = pilgrimage_destination + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + religion = religion:tengrism_religion + } + } + reference = temple + } + left_portrait = { + character = root + animation = beg + camera = camera_event_center_pointing_right + } + right_portrait = { + character = scope:blessed_bishop + animation = wedding_priest + } + artifact = { + target = scope:blessed_artifact + position = lower_center_portrait + } + cooldown = { years = 1 } + trigger = { + any_character_artifact = { + category = inventory + } + } + immediate = { + location = { save_scope_as = holy_site_scope } + if = { + limit = { + exists = location.county.holder.cp:councillor_court_chaplain + location.county.holder.cp:councillor_court_chaplain.faith = root.faith + } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = blessed_bishop } + } + else = { + create_character = { + template = priest_character_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = blessed_bishop + } + set_variable = created_blessed_bishop_var + } + if = { + limit = { + any_character_artifact = { + is_equipped = yes + rarity = illustrious + } + } + random_character_artifact = { + limit = { + is_equipped = yes + rarity = illustrious + } + save_scope_as = blessed_artifact + } + } + else_if = { + limit = { + any_character_artifact = { is_equipped = yes } + } + random_character_artifact = { + limit = { is_equipped = yes } + save_scope_as = blessed_artifact + } + } + else = { #inventory artifacts + random_character_artifact = { + save_scope_as = blessed_artifact + } + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a religious journey + has_activity_intent = zealot_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Make my artifact more pious + option = { + name = pilgrimage.6840.a + pious_type_option_effect = yes + pay_short_term_gold = { + target = scope:blessed_bishop + gold = { + value = medium_gold_value + max = 15 + } + } + add_piety = miniscule_piety_gain + scope:blessed_artifact = { + add_durability = 10 + custom_tooltip = { + text = pilgrimage.6840.a.tt + add_artifact_modifier = artifact_monthly_piety_gain_mult_1_modifier + } + set_artifact_description = blessed_artifact_desc + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + humble = minor_stress_impact_gain + cynical = minor_stress_impact_gain + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = humble + has_trait = cynical + } + } + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + #Make my artifact stronger + option = { + name = pilgrimage.6840.b + worldly_type_option_effect = yes + pay_short_term_gold = { + target = scope:blessed_bishop + gold = { + value = medium_gold_value + max = 15 + } + } + add_piety = miniscule_piety_gain + scope:blessed_artifact = { + add_durability = 10 + custom_tooltip = { + text = pilgrimage.6840.b.tt + add_artifact_modifier = artifact_monthly_prestige_5_modifier + } + set_artifact_description = blessed_artifact_desc + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + humble = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = humble + has_trait = zealous + } + } + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + #I don't need no blessing + option = { + name = pilgrimage.6840.c + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_zeal = -1 + } + } + } + after = { + if = { + limit = { + is_ai = yes + has_variable = created_blessed_bishop_var + } + scope:blessed_bishop = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + remove_variable = created_blessed_bishop_var + } + } +} +# A Master Thief +# by Laurence Kennedy +pilgrimage.6850 = { + type = activity_event + title = pilgrimage.6850.t + desc = pilgrimage.6850.desc + theme = pilgrimage_destination + override_background = { reference = bedchamber } + + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:fake_thief + animation = assassin + } + center_portrait = { + character = scope:wise_priest + animation = throne_room_writer + } + cooldown = { years = 15 } + + trigger = { + religion = religion:buddhism_religion + } + immediate = { + if = { + #Find yourself a local priest + limit = { + location.county.holder.cp:councillor_court_chaplain ?= { + faith = root.faith + is_available_ai_adult = yes + this != root + } + } + location.county.holder.cp:councillor_court_chaplain = { save_scope_as = wise_priest } + } + else = { + #make a priest + create_character = { + template = priest_character_template + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = wise_priest + } + } + #make a fake thief + create_character = { + template = generic_peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.faith + save_scope_as = fake_thief + } + } + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { #you're in a reflection journey + has_activity_intent = reflection_intent + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + } + } + } + #Decrease enemy hostile scheme success chance + option = { + name = pilgrimage.6850.a + add_piety = medium_piety_gain + add_character_modifier = { + modifier = light_in_shadow_modifier + years = 5 + } + stress_impact = { + cynical = minor_stress_impact_gain + trusting = medium_stress_impact_gain + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + has_trait = trusting + } + } + } + #Improve your spymaster's secret discovery chance + option = { + name = pilgrimage.6850.b + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = spymaster_eyes_modifier + years = 5 + } + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + lazy = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = diligent + has_trait = paranoid + } + } + } + #Imprison you court chaplain + option = { + name = pilgrimage.6850.c + trigger = { + cp:councillor_court_chaplain ?= { + is_ai = yes + } + } + rightfully_imprison_character_effect = { + TARGET = cp:councillor_court_chaplain + IMPRISONER = root + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + + stress_impact = { + trusting = minor_stress_impact_gain + just = medium_stress_impact_gain + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = trusting + has_trait = just + } + } + } + after = { + scope:wise_priest = { + if = { + limit = { + is_ai = yes + NOT = { + has_council_position = councillor_court_chaplain + } + } + silent_disappearance_effect = yes + } + } + scope:fake_thief = { + silent_disappearance_effect = yes + } + } +} + +################################ +# Conclusion events +# 7000-7499 +# by Filippa Gannholm Kirsten +################################ +# pilgrimage.7000 - Summarizing our activity +# +# + +#Summarizing our activity +pilgrimage.7000 = { + type = activity_event + title = { + first_valid = { + #Obligatory Pilgrimage + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + desc = pilgrimage.7000.t_obligatory + } + #Hajj conclusion + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + } + desc = pilgrimage.7000.t_hajj + } + #Pilgrimage conclusion + desc = pilgrimage.7000.t + } + } + desc = { + first_valid = { + #Obligatory pilgrimage, rush rush go go + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + desc = pilgrimage.7000.desc_obligatory + } + #Standard pilgrimage + triggered_desc = { + desc = { + #Hajj or Pilgrimage? + first_valid = { + #Hajj conclusion + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + } + desc = pilgrimage.7000.intro_hajj + } + #Pilgrimage conclusion + desc = pilgrimage.7000.intro + } + #Handle the type + first_valid = { + #Perfect pious + triggered_desc = { + trigger = { + scope:activity = { + OR = { + activity_has_pious_pilgrimage_type_trigger = yes + activity_has_hajj_pilgrimage_type_trigger = yes + } + } + has_character_flag = perfect_pious_reward + } + desc = pilgrimage.7000.desc_perfect_pious + } + #High end pious + triggered_desc = { + trigger = { + scope:activity = { + OR = { + activity_has_pious_pilgrimage_type_trigger = yes + activity_has_hajj_pilgrimage_type_trigger = yes + } + } + has_character_flag = high_pious_reward + } + desc = pilgrimage.7000.desc_high_pious + } + #OK pious + triggered_desc = { + trigger = { + scope:activity = { + OR = { + activity_has_pious_pilgrimage_type_trigger = yes + activity_has_hajj_pilgrimage_type_trigger = yes + } + } + has_character_flag = mid_pious_reward + } + desc = pilgrimage.7000.desc_mid_pious + } + #Lousy pious + triggered_desc = { + trigger = { + scope:activity = { + OR = { + activity_has_pious_pilgrimage_type_trigger = yes + activity_has_hajj_pilgrimage_type_trigger = yes + } + } + has_character_flag = low_pious_reward + } + desc = pilgrimage.7000.desc_low_pious + } + #High end worldly + triggered_desc = { + trigger = { + scope:activity = { activity_has_worldly_pilgrimage_type_trigger = yes } + has_character_flag = perfect_worldly_reward + } + desc = pilgrimage.7000.desc_perfect_worldly + } + #High end worldly + triggered_desc = { + trigger = { + scope:activity = { activity_has_worldly_pilgrimage_type_trigger = yes } + has_character_flag = high_worldly_reward + } + desc = pilgrimage.7000.desc_high_worldly + } + #OK worldly + triggered_desc = { + trigger = { + scope:activity = { activity_has_worldly_pilgrimage_type_trigger = yes } + has_character_flag = mid_worldly_reward + } + desc = pilgrimage.7000.desc_mid_worldly + } + #Lousy worldly + triggered_desc = { + trigger = { + scope:activity = { activity_has_worldly_pilgrimage_type_trigger = yes } + has_character_flag = low_worldly_reward + } + desc = pilgrimage.7000.desc_low_worldly + } + } + #Outro - Did previous host die? Otherwise trivia about your pilgrimage/Hajj history + first_valid = { + #Buried predecessor here + triggered_desc = { + trigger = { has_variable = pilgrimage_death_bury_there } + desc = pilgrimage.7000.outro_buried_predecessor_here + } + #Will bury them at home + triggered_desc = { + trigger = { has_variable = pilgrimage_death_bury_home } + desc = pilgrimage.7000.outro_bury_predecessor_home + } + #First Hajj + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + any_memory = { + memory_type = completed_hajj_memory + count = 1 + } + } + desc = pilgrimage.7000.outro_first_hajj + } + #Second Hajj + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + any_memory = { + memory_type = completed_hajj_memory + count = 2 + } + } + desc = pilgrimage.7000.outro_second_hajj + } + #... the rest + triggered_desc = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + any_memory = { + memory_type = completed_hajj_memory + count > 2 + } + } + desc = pilgrimage.7000.outro_multi_hajj + } + #First pilgrimage + triggered_desc = { + trigger = { var:num_pilgrimages_undertaken ?= 1 } + desc = pilgrimage.7000.outro_first + } + #Second pilgrimage + triggered_desc = { + trigger = { + var:num_pilgrimages_undertaken ?= 2 + NOT = { exists = scope:revisited_first_pilgrimage_memory } + } + desc = pilgrimage.7000.outro_second + } + #Second pilgrimage -- which revisited the first pilgrimage site + triggered_desc = { + trigger = { + var:num_pilgrimages_undertaken ?= 2 + exists = scope:revisited_first_pilgrimage_memory + } + desc = pilgrimage.7000.outro_second_revisit + } + #... the rest + triggered_desc = { + trigger = { + exists = var:num_pilgrimages_undertaken + var:num_pilgrimages_undertaken >= 3 + } + desc = pilgrimage.7000.outro_multi + } + } + #Is this a new holy site? (And also not our first pilgrimage) + first_valid = { + triggered_desc = { + trigger = { + any_in_list = { + variable = visited_unique_holy_sites_list + count > 1 + } + has_character_flag = added_new_holy_site + } + desc = pilgrimage.7000.outro_new_holy_site + } + } + } + } + } + } + theme = pilgrimage_destination + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + animation = disapproval + } + triggered_animation = { + trigger = { + OR = { + has_character_flag = low_pious_reward + has_character_flag = low_worldly_reward + } + } + animation = worry + } + triggered_animation = { + trigger = { has_trait = cynical } + animation = personality_cynical + } + animation = personality_forgiving + } + artifact = { + target = scope:christian_saint_bone_scope + position = lower_center_portrait + } + immediate = { + christian_saint_bone_creation_effect = yes + #Save memory location for loc if this is our second pilgrimage + if = { + limit = { + var:num_pilgrimages_undertaken ?= 2 + any_memory = { + memory_type = completed_pilgrimage + has_variable = first_pilgrimage + #If it's the same place then we revisited the place + var:pilgrimage_destination ?= root.location + } + } + save_scope_as = revisited_first_pilgrimage_memory + } + else = { + #For loc + random_memory = { + limit = { + has_variable = first_pilgrimage + NOT = { var:pilgrimage_destination = root.location } + } + save_scope_as = first_pilgrimage_memory + } + } + #The old host died, saving for loc + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + + # ACH Repent oath counter + if = { + limit = { + has_variable = repent_oath_pilgrimage_counter + } + change_variable = { + name = repent_oath_pilgrimage_counter + add = 1 + } + } + } + #Alright + option = { + #Hajj alright + name = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + has_trait = cynical + } + text = pilgrimage.7000.a_hajj_cynical + } + #Hajj cynical + name = { + trigger = { + scope:activity = { activity_has_hajj_pilgrimage_type_trigger = yes } + } + text = pilgrimage.7000.a_hajj + } + #Cynical + name = { + trigger = { + OR = { + AND = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + has_trait = cynical + } + } + text = pilgrimage.7000.a_cynical + } + #Alright + name = { + trigger = { + NOR = { + AND = { + scope:activity = { + has_activity_option = { + category = pilgrimage_option_fidelity + option = pilgrimage_fidelity_obligatory + } + } + NOT = { has_character_flag = pilgrimage_counter_obligatory } + } + has_trait = cynical + } + } + text = pilgrimage.7000.a + } + custom_tooltip = pilgrimage.7000.a.tt + #Rewards and log entries are resolved in on_end in the Pilgrimage activity setup + show_as_tooltip = { pilgrimage_completed_log_entry_effect = yes } + } + + option = { + name = pilgrimage.7000.b + trigger = { # If it's Pious or Hajj we lower your Gallowsbait + has_ep3_dlc_trigger = yes + has_trait = gallowsbait + has_any_gallowsbait_xp_trigger = yes + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_pious + } + } + scope:activity = { + has_activity_option = { + category = special_type + option = pilgrimage_type_hajj + } + } + } + } + if = { # If you are a devoted Pilgrim you lose it entirely + limit = { + OR = { + AND = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value >= 50 + } + } + has_character_flag = perfect_pious_reward + has_character_flag = high_pious_reward + } + } + remove_trait = gallowsbait + } + else = { # Else we lower it + lower_gallowsbait_xp_effect = { VALUE = -25 } + } + show_as_tooltip = { pilgrimage_completed_log_entry_effect = yes } + } + + after = { + #Party's over; clean up time + clean_up_pilgrimage_type_reward_flags_effect = yes + #If we added a new holy site, remove the flag + remove_character_flag = added_new_holy_site + remove_character_flag = should_get_trait_piety + remove_character_flag = pilgrimage_counter_obligatory + } +} + +################################ +# Return Events +# 9001-9999 +# by Petter Vilberg & Filippa Gannholm Kirsten +################################ +# pilgrimage.9001 - Nice spiritual journey +# pilgrimage.9010 - Bury old host back home +# pilgrimage.9100 - Follow-up to exotic wares event +# + +#Nice spiritual journey +pilgrimage.9001 = { + type = character_event + title = pilgrimage.9001.t + desc = { + desc = pilgrimage.9001.desc_intro + first_valid = { + triggered_desc = { + trigger = { has_variable = pilgrimage_invalidated } + desc = pilgrimage.9001.desc_invalidated + } + triggered_desc = { + trigger = { has_variable = pilgrimage_death_bury_there } + desc = pilgrimage.9001.desc_buried_there + } + desc = pilgrimage.9001.desc + } + } + theme = pilgrimage_return + override_background = { reference = relaxing_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = pilgrimage_invalidated } + animation = sadness + } + animation = pondering + } + trigger = { + OR = { + has_variable = has_completed_pilgrimage + has_variable = pilgrimage_invalidated + } + NOR = { + has_variable = pilgrimage_death_turn_back + has_variable = pilgrimage_death_bury_home + has_character_flag = pilgrimage_burial_interrupted_pilgrimage + } + } + immediate = { + play_music_cue = mx_cue_travel_arrival + traveler_lifestyle_rank_up_check_effect = yes + #For loc + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + if = { + limit = { exists = var:pilgrimage_burial_location } + var:pilgrimage_burial_location = { save_scope_as = burial_location } + } + if = { + limit = { exists = var:pilgrimage_invalidated_illness } + var:pilgrimage_invalidated_illness = { save_scope_as = missed_holy_site } + } + # Cultural Ambassador travel option + if = { + limit = { + current_travel_plan = { + has_travel_option = cultural_ambassador_option + } + } + custom_tooltip = cultural_ambassador_option.tt + } + # Allocates a tiny bit of Horse XP if you have the Hastiluder trait + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_miniscule_value + } + } + } + option = { + name = { + trigger = { has_variable = pilgrimage_invalidated } + text = pilgrimage.9001.a_invalidated + } + name = pilgrimage.9001.a + custom_tooltip = pilgrimage.9001.a.tt + } + after = { + if = { + limit = { has_variable = has_completed_pilgrimage } + remove_variable = has_completed_pilgrimage + } + if = { + limit = { has_variable = pilgrimage_invalidated_illness } + remove_variable = pilgrimage_invalidated_illness + } + remove_character_flag = pilgrimage_invalidated + #Follow-up after old host died; burial at home + if = { + limit = { has_character_modifier = pilgrimage_burial_at_capital_modifier } + trigger_event = { + id = pilgrimage.9010 + days = 10 + } + } + #Follow-up to exotic wares event + if = { + limit = { + OR = { + has_character_modifier = pilgrimage_exotic_wares_modifier + has_character_modifier = pilgrimage_super_exotic_wares_modifier + } + } + trigger_event = { + id = pilgrimage.9100 + days = 5 + } + } + remove_character_flag = pilgrim_group_joined + if = { + limit = { has_variable = pilgrimage_death_bury_there } + remove_variable = pilgrimage_death_bury_there + } + } +} + +#Bury old host back home +pilgrimage.9010 = { + type = character_event + title = pilgrimage.9010.t + desc = { + first_valid = { + #Departed mother/father + triggered_desc = { + trigger = { + is_close_family_of = scope:old_pilgrimage_host + } + desc = pilgrimage.9010.desc.relation_family + } + #Dearly departed + triggered_desc = { + trigger = { has_character_flag = pilgrimage_liked_my_predecessor } + desc = pilgrimage.9010.desc.relation_liked + } + #... dead liege? + desc = pilgrimage.9010.desc.relation_neutral + } + first_valid = { + #Turned back, liked host + triggered_desc = { + trigger = { + has_variable = pilgrimage_death_turn_back + has_character_flag = pilgrimage_liked_my_predecessor + } + desc = pilgrimage.9010.desc.turned_back_liked + } + #Turned back, neutral relation + triggered_desc = { + trigger = { has_variable = pilgrimage_death_turn_back } + desc = pilgrimage.9010.desc.turned_back_neutral + } + #Went to holy site and back, liked host + triggered_desc = { + trigger = { + has_variable = pilgrimage_death_bury_home + has_character_flag = pilgrimage_liked_my_predecessor + NOT = { has_character_flag = pilgrimage_burial_interrupted_pilgrimage } + } + desc = pilgrimage.9010.desc.there_and_back_liked + } + #Went to holy site and back, neutral relation + triggered_desc = { + trigger = { + has_variable = pilgrimage_death_bury_home + NOT = { has_character_flag = pilgrimage_burial_interrupted_pilgrimage } + } + desc = pilgrimage.9010.desc.there_and_back_neutral + } + #Tried to bury them at the holy site but activity invalidated, liked host + triggered_desc = { + trigger = { has_character_flag = pilgrimage_burial_interrupted_pilgrimage } + desc = pilgrimage.9010.desc.invalidated_pilgrimage_liked + } + #Tried to bury them at the holy site but activity invalidated, neutral relation + triggered_desc = { + trigger = { has_character_flag = pilgrimage_burial_interrupted_pilgrimage } + desc = pilgrimage.9010.desc.invalidated_pilgrimage_neutral + } + } + } + theme = pilgrimage_return + override_background = { + trigger = { + NOR = { + religion = religion:hinduism_religion + religion = religion:jainism_religion + religion = religion:buddhism_religion + } + } + reference = temple + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + is_close_family_of = scope:old_pilgrimage_host + has_character_flag = pilgrimage_liked_my_predecessor + } + animation = grief + } + triggered_animation = { + trigger = { has_character_flag = pilgrimage_liked_my_predecessor } + animation = grief + } + animation = sadness + } + right_portrait = { + trigger = { exists = scope:grieving_companion } + character = scope:grieving_companion + animation = sadness + } + lower_center_portrait = { + character = scope:old_pilgrimage_host + } + trigger = { + trigger_if = { + limit = { + has_variable = pilgrimage_death_bury_home + } + always = yes + } + trigger_else = { + always = no + } + } + immediate = { + play_music_cue = mx_cue_travel_arrival + remove_character_modifier = pilgrimage_burial_at_capital_modifier + save_scope_as = root_scope + #For loc + if = { + limit = { exists = var:old_host_to_be_buried } + var:old_host_to_be_buried = { save_scope_as = old_pilgrimage_host } + } + if = { + limit = { exists = var:previous_holy_site } + var:previous_holy_site = { save_scope_as = previous_holy_site } + } + #For atmosphere + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available = yes } + } + cp:councillor_court_chaplain = { save_scope_as = grieving_companion } + } + else = { + random_courtier = { + limit = { is_available_adult = yes } + save_scope_as = grieving_companion + } + } + } + option = { + name = pilgrimage.9010.a + name = { + trigger = { + has_variable = pilgrimage_death_bury_home + has_character_flag = pilgrimage_burial_interrupted_pilgrimage + } + text = pilgrimage.9010.a_interrupted + } + name = { + trigger = { + has_government = landless_adventurer_government + } + text = pilgrimage.9010.a_adventurer + } + flavor = pilgrimage.9010.a.flavor + if = { + limit = { + OR = { + has_variable = pilgrimage_death_turn_back + #If we wanted to bury them at the holy site but our activity was invalidated + AND = { + has_variable = pilgrimage_death_bury_home + has_character_flag = pilgrimage_burial_interrupted_pilgrimage + } + } + } + pilgrimage_turn_back_and_bury_effect = yes + } + if = { + limit = { has_variable = pilgrimage_death_bury_home } + pilgrimage_bury_at_home_effect = yes + } + } + after = { + remove_character_flag = pilgrimage_liked_my_predecessor + remove_character_flag = pilgrimage_burial_interrupted_pilgrimage + remove_variable = old_host_to_be_buried + remove_variable = previous_holy_site + if = { + limit = { has_variable = pilgrimage_death_turn_back } + remove_variable = pilgrimage_death_turn_back + } + if = { + limit = { has_variable = pilgrimage_death_bury_there } + remove_variable = pilgrimage_death_bury_there + } + if = { + limit = { has_variable = pilgrimage_death_bury_home } + create_character_memory = { + type = pilgrimage_handled_predecessor_remains_memory + participants = { predecessor = scope:old_pilgrimage_host } + } + if = { + limit = { exists = scope:new_memory } + scope:new_memory = { + set_variable = { + name = pilgrimage_destination + value = scope:previous_holy_site + } + set_variable = { + name = home + value = root.location #Should be capital_province + } + set_variable = { + name = buried_predecessor_back_home + value = flag:yes + } + } + } + remove_variable = pilgrimage_death_bury_home + } + } +} + +#Follow-up to exotic wares event +pilgrimage.9100 = { + type = character_event + title = pilgrimage.9100.t + desc = { + desc = pilgrimage.9100.desc_intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_variable = 6540_exotic_wares_gift + has_variable = 6540_exotic_wares_super_gift + } + } + desc = pilgrimage.9100.desc_has_gift + } + triggered_desc = { + desc = pilgrimage.9100.desc + } + } + } + theme = pilgrimage_return + override_background = { reference = market } + left_portrait = { + character = root + animation = steward + } + #Sell the wares at a profit + option = { + name = { + trigger = { + OR = { + has_variable = 6540_exotic_wares_gift + has_variable = 6540_exotic_wares_super_gift + } + } + text = pilgrimage.9100.a_has_gift + } + name = { + trigger = { + NOR = { + has_variable = 6540_exotic_wares_gift + has_variable = 6540_exotic_wares_super_gift + } + } + text = pilgrimage.9100.a + } + if = { + limit = { has_character_modifier = pilgrimage_exotic_wares_modifier } + custom_tooltip = pilgrimage.9100.a_double.tt + add_gold = { + value = var:6540_exotic_wares_cost + multiply = 2 + } + } + else_if = { + limit = { has_character_modifier = pilgrimage_super_exotic_wares_modifier } + custom_tooltip = pilgrimage.9100.a_triple.tt + add_gold = { + value = var:6540_exotic_wares_cost + multiply = 3 + } + } + } + #Save them as a powerful personal scheme modifier + option = { + name = pilgrimage.9100.b + trigger = { + NOR = { + has_variable = 6540_exotic_wares_gift + has_variable = 6540_exotic_wares_super_gift + } + } + custom_tooltip = pilgrimage.9100.b.tt + if = { + limit = { has_character_modifier = pilgrimage_exotic_wares_modifier } + set_variable = { + name = 6540_exotic_wares_gift + value = var:6540_exotic_wares_location + } + } + else_if = { + limit = { has_character_modifier = pilgrimage_super_exotic_wares_modifier } + set_variable = { + name = 6540_exotic_wares_super_gift + value = var:6540_exotic_wares_location + } + } + } + after = { + if = { + limit = { has_character_modifier = pilgrimage_exotic_wares_modifier } + remove_character_modifier = pilgrimage_exotic_wares_modifier + } + if = { + limit = { has_character_modifier = pilgrimage_super_exotic_wares_modifier } + remove_character_modifier = pilgrimage_super_exotic_wares_modifier + } + remove_variable = 6540_exotic_wares_location + remove_variable = 6540_exotic_wares_cost + } +} diff --git a/N3OW/events/activities/tour_activity/tour_grounds_events_chad.txt b/N3OW/events/activities/tour_activity/tour_grounds_events_chad.txt new file mode 100644 index 00000000..2e561d2d --- /dev/null +++ b/N3OW/events/activities/tour_activity/tour_grounds_events_chad.txt @@ -0,0 +1,2895 @@ +namespace = tour_grounds_events + +############################ +## Tour Mini-Activity: Tour Grounds +############################ +## Liege Events +## 6000-6999 +## by Chad Uhl +############################ +# tour_grounds_events.6000 - Liege: Orgy with vassal +# tour_grounds_events.6100 - Liege: Visit a Cathedral/Mosque (special building) +# tour_grounds_events.6200 - Liege: Visit some farmlands (buildings) +# tour_grounds_events.6201-4 - Bilateral: Child thief steals your gold in vassal's tradeport (buildings) +# tour_grounds_events.6300 - Liege: Gloryhound Vassal challenges you to a sparring match +##################################################################################### + +###################### +## Liege Events +## 6000-6999 +## by Chad Uhl +###################### + +scripted_trigger has_multiple_consorts_trigger = { + any_consort = { + count > 2 + is_available_ai_adult = yes + } +} + +scripted_effect tour_grounds_events_6000_sex_effect = { + if = { + limit = { sex_opposite_of = scope:stop_host_scope } + # Set up the error blocker for cheating sex, because the vassal couple might be monogamous but are consenting to the experiment here. + save_scope_as = ignore_cheating_error_check + had_sex_with_effect = { + CHARACTER = scope:stop_host_scope + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + } + if = { + limit = { sex_opposite_of = scope:orgy_consort_1 } + # Set up the error blocker for cheating sex, because the vassal couple might be monogamous but are consenting to the experiment here. + ## Aaaand we set it up again because it gets cleaned up in the effect. + save_scope_as = ignore_cheating_error_check + had_sex_with_effect = { + CHARACTER = scope:orgy_consort_1 + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + } + if = { + limit = { + exists = scope:orgy_consort_2 + } + if = { + limit = { sex_opposite_of = scope:orgy_consort_2 } + # Set up the error blocker for cheating sex, because the vassal couple might be monogamous but are consenting to the experiment here. + ## Aaaand we set it up again because it gets cleaned up in the effect x2. + save_scope_as = ignore_cheating_error_check + had_sex_with_effect = { + CHARACTER = scope:orgy_consort_2 + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + } + } + if = { + limit = { + exists = scope:orgy_consort_3 + } + if = { + limit = { sex_opposite_of = scope:orgy_consort_3 } + # Set up the error blocker for cheating sex, because the vassal couple might be monogamous but are consenting to the experiment here. + ## Aaaand we set it up again because it gets cleaned up in the effect x2. + save_scope_as = ignore_cheating_error_check + had_sex_with_effect = { + CHARACTER = scope:orgy_consort_3 + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + } + } + + # Progress towards lover + if = { + limit = { + is_attracted_to_gender_of = scope:stop_host_scope + scope:stop_host_scope = { is_attracted_to_gender_of = root } + } + progress_towards_lover_effect = { + CHARACTER = scope:stop_host_scope + REASON = lover_tour_grounds_orgy + OPINION = default_lover_opinion + } + } + if = { + limit = { + is_attracted_to_gender_of = scope:orgy_consort_1 + scope:orgy_consort_1 = { is_attracted_to_gender_of = root } + } + progress_towards_lover_effect = { + CHARACTER = scope:orgy_consort_1 + REASON = lover_tour_grounds_orgy + OPINION = default_lover_opinion + } + } + if = { + limit = { + exists = scope:orgy_consort_2 + is_attracted_to_gender_of = scope:orgy_consort_2 + scope:orgy_consort_2 = { is_attracted_to_gender_of = root } + } + progress_towards_lover_effect = { + CHARACTER = scope:orgy_consort_2 + REASON = lover_tour_grounds_orgy + OPINION = default_lover_opinion + } + } + if = { + limit = { + exists = scope:orgy_consort_3 + is_attracted_to_gender_of = scope:orgy_consort_3 + scope:orgy_consort_3 = { is_attracted_to_gender_of = root } + } + progress_towards_lover_effect = { + CHARACTER = scope:orgy_consort_3 + REASON = lover_tour_grounds_orgy + OPINION = default_lover_opinion + } + } +} + +# You happen upon your vassal and their partner(s) getting steamy and they invite you to join +tour_grounds_events.6000 = { + type = activity_event + title = tour_grounds_events.6000.t + desc = { + desc = tour_grounds_events.6000.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:orgy_consort_2 + exists = scope:orgy_consort_3 + } + desc = tour_grounds_events.6000.desc.three_consorts + } + desc = tour_grounds_events.6000.desc.one_consort + } + desc = tour_grounds_events.6000.desc.outro + } + theme = tour_grounds + + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = stunned + } + center_portrait = { + character = scope:stop_host_scope + animation = wedding_groom_right + } + right_portrait = { + character = scope:orgy_consort_1 + animation = happiness + camera = camera_event_very_right + } + lower_center_portrait = { + trigger = { exists = scope:orgy_consort_3 } + character = scope:orgy_consort_3 + } + lower_right_portrait = { + trigger = { exists = scope:orgy_consort_2 } + character = scope:orgy_consort_2 + } + + trigger = { + is_adult = yes + exists = scope:stop_host_scope + scope:stop_host_scope = { + is_ai = yes + is_adult = yes + # Vassal or their primary consort is attracted to liege + OR = { + is_attracted_to_gender_of = root + any_consort = { + is_attracted_to_gender_of = root + } + } + # Vassal has a partner/concubine(s) + any_consort = { + is_available_ai_adult = yes + } + } + # No close family members allowed in sexy time, unless you're already incestuous + trigger_if = { + limit = { + NOT = { is_incestuous_trigger = yes } + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = root } + } + NOT = { is_close_or_extended_family_of = scope:stop_host_scope } + } + NOT = { has_sexuality = asexual } + } + + cooldown = { years = 5 } + + weight_multiplier = { + base = 1 + # weight up if either are deviants + modifier = { + add = 1 + is_deviant_trigger = yes + } + modifier = { + add = 1 + exists = scope:stop_host_scope + scope:stop_host_scope = { + is_deviant_trigger = yes + } + } + # weight up for the vassal having multiple consorts + modifier = { + add = 1 + exists = scope:stop_host_scope + scope:stop_host_scope = { + has_multiple_consorts_trigger = yes + } + } + } + + immediate = { + scope:stop_host_scope = { + # if stop host has 3 consorts, we save them all. otherwise, just the one + random_consort = { + save_scope_as = orgy_consort_1 + add_character_flag = is_naked + } + if = { + limit = { has_multiple_consorts_trigger = yes } + random_consort = { + limit = { + this != scope:orgy_consort_1 + } + save_scope_as = orgy_consort_2 + add_character_flag = is_naked + } + random_consort = { + limit = { + NOR = { + this = scope:orgy_consort_1 + this = scope:orgy_consort_2 + } + } + save_scope_as = orgy_consort_3 + add_character_flag = is_naked + } + } + add_character_flag = is_naked + } + } + + option = { # Join in on the sexy time + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_deviant_trigger = yes } + desc = tour_grounds_events.6000.b + } + desc = tour_grounds_events.6000.a + } + } + } + trigger = { might_cheat_on_every_partner_trigger = yes } + scope:activity = { + add_activity_log_entry = { + key = tourgy_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + tour_grounds_events_6000_sex_effect = yes + } + } + } + + stress_impact = { + shy = medium_stress_impact_gain + temperate = medium_stress_impact_gain + chaste = major_stress_impact_gain + gregarious = minor_stress_impact_loss + lustful = major_stress_impact_loss + deviant = medium_stress_impact_loss + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_boldness = 1 + ai_sociability = 1 + ai_energy = 0.5 + } + modifier = { + add = 50 + OR = { + has_trait = lustful + has_trait = deviant + } + } + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = temperate + has_trait = shy + } + } + } + } + + option = { # Refuse sexy time + name = tour_grounds_events.6000.c + + stress_impact = { + deviant = major_stress_impact_gain + lustful = major_stress_impact_gain + chaste = minor_stress_impact_loss + } + + ai_chance = { + base = 33 + modifier = { + add = 30 + has_trait = chaste + } + } + } + after = { + scope:stop_host_scope = { + remove_character_flag = is_naked + } + scope:orgy_consort_1 = { + remove_character_flag = is_naked + } + scope:orgy_consort_2 ?= { + remove_character_flag = is_naked + } + scope:orgy_consort_3 ?= { + remove_character_flag = is_naked + } + } +} + +scripted_trigger tg_6100_appropriate_loved_one_memory_trigger = { + OR = { + has_memory_type = relative_died + has_memory_type = spouse_died + has_memory_type = friend_died + has_memory_type = soulmate_died + } + any_memory_participant = { + NOR = { + has_relation_rival = root + has_relation_nemesis = root + } + trigger_if = { + limit = { + is_alive = no + exists = killer + } + killer != root + } + } +} + +scripted_trigger tg_6100_not_religious_trigger = { + OR = { + has_trait = cynical + any_secret = { + type = secret_non_believer + } + } +} + +scripted_trigger tg_6100_location_has_cathedral_trigger = { + OR = { + has_building_or_higher = holy_site_cathedral_01 + has_building_or_higher = holy_site_cologne_cathedral_01 + has_building_or_higher = holy_site_canterbury_cathedral_01 + has_building_or_higher = temple_of_uppsala_01 + has_building_or_higher = lund_cathedral_01 + has_building_or_higher = notre_dame_01 + has_building_or_higher = cluny_abbey_01 + has_building_or_higher = beta_giyorgis_01 + has_building_or_higher = holy_wisdom_01 + has_building_or_higher = duomo_florence_01 + has_building_or_higher = wawel_cathedral_01 + } +} + +scripted_trigger tg_6100_location_has_mosque_trigger = { + OR = { + has_building_or_higher = holy_site_imam_ali_mosque_01 + has_building_or_higher = holy_site_great_mosque_of_mecca_01 + has_building_or_higher = holy_site_great_mosque_of_cordoba_01 + has_building_or_higher = holy_site_great_mosque_of_djenne_01 + 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 + } +} + +# Christian Cathedral / Mosque +tour_grounds_events.6100 = { + type = activity_event + title = tour_grounds_events.6100.t + desc = { + desc = tour_grounds_events.6100.desc.intro + first_valid = { + triggered_desc = { + trigger = { + tg_6100_not_religious_trigger = yes + } + desc = tour_grounds_events.6100.desc.cynical + } + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = tour_grounds_events.6100.desc.zealous + } + desc = tour_grounds_events.6100.desc + } + } + + theme = tour_grounds + override_background = { reference = temple } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + tg_6100_not_religious_trigger = yes + } + animation = eyeroll + } + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = personality_zealous + } + animation = admiration + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_honorable + } + + trigger = { + # check for a christian cathedral special building + location = { + has_special_building = yes + OR = { + tg_6100_location_has_cathedral_trigger = yes + tg_6100_location_has_mosque_trigger = yes + } + } + # check that the host has the right religion + scope:stop_host_scope = { + trigger_if = { + limit = { + location = { tg_6100_location_has_cathedral_trigger = yes } + } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + trigger_if = { + limit = { + location = { tg_6100_location_has_mosque_trigger = yes } + } + religion = religion:islam_religion + } + } + } + + cooldown = { years = 5 } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + scope:stop_host_scope = { + has_trait = zealous + } + } + modifier = { + add = 2 + any_memory = { + tg_6100_appropriate_loved_one_memory_trigger = yes + } + } + } + + immediate = { + # save scopes for loc + save_scope_as = root_scope + location = { save_scope_as = tour_grounds_event_location } + + # if root has a memory of a loved one dying, we pull that out to use in an option + if = { + limit = { + any_memory = { + tg_6100_appropriate_loved_one_memory_trigger = yes + } + } + random_memory = { + limit = { tg_6100_appropriate_loved_one_memory_trigger = yes } + save_scope_as = tour_grounds_6100_beloved_memory + random_memory_participant = { + save_scope_as = tour_grounds_6100_beloved_char + } + } + } + } + + option = { # light a candle in memory of a dead loved one + name = tour_grounds_events.6100.a + + trigger = { + location = { tg_6100_location_has_cathedral_trigger = yes } + exists = scope:tour_grounds_6100_beloved_memory + } + + flavor = tour_grounds_events.6100.a.tt + every_vassal_or_below = { + custom = zealot_approves_of_religious_display + vassal_stance = zealot + add_opinion = { + target = prev + modifier = zealot_approves_of_religious_display_opinion + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + add_piety = miniscule_piety_gain + + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 1 + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # pray for a dead loved one + name = tour_grounds_events.6100.b + + trigger = { + location = { tg_6100_location_has_mosque_trigger = yes } + exists = scope:tour_grounds_6100_beloved_memory + } + + flavor = tour_grounds_events.6100.b.tt + every_vassal_or_below = { + custom = zealot_approves_of_religious_display + vassal_stance = zealot + add_opinion = { + target = prev + modifier = zealot_approves_of_religious_display_opinion + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + add_piety = miniscule_piety_gain + + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 1 + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # get a discount on building church holdings + name = tour_grounds_events.6100.c + + add_character_modifier = { + modifier = discounted_church_holding_build_cost_modifier + years = 10 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_rationality = 0.75 + ai_zeal = 0.5 + ai_sociability = 0.5 + } + modifier = { + factor = 0 + has_trait = cynical + } + } + + stress_impact = { + cynical = major_stress_impact_gain + } + } + + option = { # ignore everything and there's a chance they find out your secret + name = tour_grounds_events.6100.d + + trigger = { + tg_6100_not_religious_trigger = yes + } + + duel = { + skills = { intrigue learning } + target = scope:stop_host_scope + 50 = { + desc = tour_grounds_events.6100.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + if = { + limit = { + any_secret = { + type = secret_non_believer + } + } + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6100.d.success + add_character_modifier = { + modifier = played_it_cool_modifier + years = 10 + } + } + } + else = { + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6100.d.success + every_vassal = { + custom = zealot_approves_of_religious_display + vassal_stance = zealot + add_opinion = { + target = prev + modifier = zealot_approves_of_religious_display_opinion + } + } + } + } + } + 50 = { + desc = tour_grounds_events.6100.d.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + if = { + limit = { + any_secret = { + type = secret_non_believer + } + } + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6100.d.failure + random_secret = { + type = secret_non_believer + reveal_to = scope:stop_host_scope + } + } + } + else = { + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6100.d.failure + every_vassal = { + custom = zealot_disapproves_of_cynicism + vassal_stance = zealot + add_opinion = { + target = prev + modifier = zealot_disapproves_of_cynicism_opinion + } + } + } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + ai_value_modifier = { + ai_rationality = 0.5 + ai_zeal = 0.1 + } + } + } +} + +# Pastures +# Orchards +# Cereal Fields +# Vassal let's it slip that they've had a bountiful harvest + +# Checks that you, the liege, have the same building as the one you're seeing in your vassal's province +scripted_trigger tg_6200_does_root_have_matching_building_trigger = { + OR = { + AND = { + root.var:building_focus = flag:pastures + capital_province = { has_building_or_higher = pastures_01 } + } + AND = { + root.var:building_focus = flag:orchard + capital_province = { has_building_or_higher = orchards_01 } + } + AND = { + root.var:building_focus = flag:cereal_fields + capital_province = { has_building_or_higher = cereal_fields_01 } + } + AND = { + root.var:building_focus = flag:hill_farms + capital_province = { has_building_or_higher = hill_farms_01 } + } + AND = { + root.var:building_focus = flag:plantations + capital_province = { has_building_or_higher = plantations_01 } + } + } +} + +# If there are multiple valid buildings for the event, pick one to focus on +scripted_effect tg_6200_pick_building_focus_effect = { + random_list = { + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = pastures_01 } + } + } + set_variable = { + name = building_focus + value = flag:pastures + } + } + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = orchards_01 } + } + } + set_variable = { + name = building_focus + value = flag:orchard + } + } + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = cereal_fields_01 } + } + } + set_variable = { + name = building_focus + value = flag:cereal_fields + } + } + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = hill_farms_01 } + } + } + set_variable = { + name = building_focus + value = flag:hill_farms + } + } + 1 = { + trigger = { + location.county = { + any_county_province = { has_building_or_higher = plantations_01 } + } + } + set_variable = { + name = building_focus + value = flag:plantations + } + } + } +} + +# Determine the difference in building level between the liege and vassal respectively +scripted_effect tg_6200_determine_building_level_diff_effect = { + if = { + limit = { root.var:building_focus = flag:pastures } + # check vassal building level + root.location = { + switch = { + trigger = has_building + pastures_01 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + pastures_02 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + pastures_03 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + pastures_04 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + pastures_05 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + pastures_06 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + pastures_07 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + pastures_08 = { + scope:root_scope = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + pastures_01 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + pastures_02 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + pastures_03 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + pastures_04 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + pastures_05 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + pastures_06 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + pastures_07 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + pastures_08 = { + scope:root_scope = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + else_if = { + limit = { root.var:building_focus = flag:orchard } + # check vassal building level + root.location = { + switch = { + trigger = has_building + orchards_01 = { + root = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + orchards_02 = { + root = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + orchards_03 = { + root = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + orchards_04 = { + root = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + orchards_05 = { + root = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + orchards_06 = { + root = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + orchards_07 = { + root = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + orchards_08 = { + root = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + orchards_01 = { + root = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + orchards_02 = { + root = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + orchards_03 = { + root = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + orchards_04 = { + root = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + orchards_05 = { + root = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + orchards_06 = { + root = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + orchards_07 = { + root = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + orchards_08 = { + root = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + else_if = { + limit = { root.var:building_focus = flag:cereal_fields } + # check vassal building level + root.location = { + switch = { + trigger = has_building + cereal_fields_01 = { + root = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + cereal_fields_02 = { + root = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + cereal_fields_03 = { + root = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + cereal_fields_04 = { + root = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + cereal_fields_05 = { + root = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + cereal_fields_06 = { + root = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + cereal_fields_07 = { + root = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + cereal_fields_08 = { + root = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + cereal_fields_01 = { + root = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + cereal_fields_02 = { + root = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + cereal_fields_03 = { + root = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + cereal_fields_04 = { + root = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + cereal_fields_05 = { + root = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + cereal_fields_06 = { + root = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + cereal_fields_07 = { + root = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + cereal_fields_08 = { + root = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + else_if = { + limit = { root.var:building_focus = flag:hill_farms } + # check vassal building level + root.location = { + switch = { + trigger = has_building + hill_farms_01 = { + root = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + hill_farms_02 = { + root = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + hill_farms_03 = { + root = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + hill_farms_04 = { + root = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + hill_farms_05 = { + root = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + hill_farms_06 = { + root = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + hill_farms_07 = { + root = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + hill_farms_08 = { + root = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + hill_farms_01 = { + root = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + hill_farms_02 = { + root = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + hill_farms_03 = { + root = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + hill_farms_04 = { + root = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + hill_farms_05 = { + root = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + hill_farms_06 = { + root = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + hill_farms_07 = { + root = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + hill_farms_08 = { + root = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + else_if = { + limit = { root.var:building_focus = flag:plantations } + # check vassal building level + root.location = { + switch = { + trigger = has_building + plantations_01 = { + root = { + set_variable = { + name = vassal_building_level + value = 1 + } + } + } + plantations_02 = { + root = { + set_variable = { + name = vassal_building_level + value = 2 + } + } + } + plantations_03 = { + root = { + set_variable = { + name = vassal_building_level + value = 3 + } + } + } + plantations_04 = { + root = { + set_variable = { + name = vassal_building_level + value = 4 + } + } + } + plantations_05 = { + root = { + set_variable = { + name = vassal_building_level + value = 5 + } + } + } + plantations_06 = { + root = { + set_variable = { + name = vassal_building_level + value = 6 + } + } + } + plantations_07 = { + root = { + set_variable = { + name = vassal_building_level + value = 7 + } + } + } + plantations_08 = { + root = { + set_variable = { + name = vassal_building_level + value = 8 + } + } + } + } + } + # check root building level + root.capital_province = { + switch = { + trigger = has_building + plantations_01 = { + root = { + set_variable = { + name = root_building_level + value = 1 + } + } + } + plantations_02 = { + root = { + set_variable = { + name = root_building_level + value = 2 + } + } + } + plantations_03 = { + root = { + set_variable = { + name = root_building_level + value = 3 + } + } + } + plantations_04 = { + root = { + set_variable = { + name = root_building_level + value = 4 + } + } + } + plantations_05 = { + root = { + set_variable = { + name = root_building_level + value = 5 + } + } + } + plantations_06 = { + root = { + set_variable = { + name = root_building_level + value = 6 + } + } + } + plantations_07 = { + root = { + set_variable = { + name = root_building_level + value = 7 + } + } + } + plantations_08 = { + root = { + set_variable = { + name = root_building_level + value = 8 + } + } + } + } + } + } + + set_variable = { + name = building_level_diff + value = root.var:root_building_level + } + change_variable = { + name = building_level_diff + divide = root.var:vassal_building_level + } +} + +tour_grounds_events.6200 = { + type = activity_event + title = tour_grounds_events.6200.t + desc = { + desc = tour_grounds_events.6200.desc + first_valid = { + triggered_desc = { + trigger = { root.var:building_focus = flag:pastures } + desc = tour_grounds_events.6200.desc.pastures + } + triggered_desc = { + trigger = { root.var:building_focus = flag:orchard } + desc = tour_grounds_events.6200.desc.orchard + } + triggered_desc = { + trigger = { root.var:building_focus = flag:cereal_fields } + desc = tour_grounds_events.6200.desc.cereal_fields + } + triggered_desc = { + trigger = { root.var:building_focus = flag:hill_farms } + desc = tour_grounds_events.6200.desc.hill_farms + } + triggered_desc = { + trigger = { root.var:building_focus = flag:plantations } + desc = tour_grounds_events.6200.desc.plantations + } + } + desc = tour_grounds_events.6200.outro + } + + cooldown = { years = 5 } + + theme = tour_grounds + override_background = { reference = farmland } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_honorable + } + + trigger = { + # check for pastures/orchards/cereal fields and that root has a matching building in their capital province + location.county = { + any_county_province = { + OR = { + trigger_if = { + limit = { has_building_or_higher = pastures_01 } + root.capital_province = { has_building_or_higher = pastures_01 } + } + trigger_if = { + limit = { has_building_or_higher = orchards_01 } + root.capital_province = { has_building_or_higher = orchards_01 } + } + trigger_if = { + limit = { has_building_or_higher = cereal_fields_01 } + root.capital_province = { has_building_or_higher = cereal_fields_01 } + } + trigger_if = { + limit = { has_building_or_higher = hill_farms_01 } + root.capital_province = { has_building_or_higher = hill_farms_01 } + } + trigger_if = { + limit = { has_building_or_higher = plantations_01 } + root.capital_province = { has_building_or_higher = plantations_01 } + } + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + # save scopes for loc + save_scope_as = root_scope + location.county = { + random_county_province = { + limit = { + OR = { + has_building_or_higher = pastures_01 + has_building_or_higher = orchards_01 + has_building_or_higher = cereal_fields_01 + has_building_or_higher = hill_farms_01 + has_building_or_higher = plantations_01 + } + } + save_scope_as = tour_grounds_event_location + } + } + capital_province = { save_scope_as = root_capital_scope } + + # Pick which building we want to focus on + tg_6200_pick_building_focus_effect = yes + + if = { + limit = { + # technically shouldn't be necessary, but prevents errors + exists = root.var:building_focus + # check if root has the right building + tg_6200_does_root_have_matching_building_trigger = yes + } + # determine the difference in their building level + tg_6200_determine_building_level_diff_effect = yes + } + } + + option = { # You're pulling in a lot of grain here, time to up the ole tax + name = tour_grounds_events.6200.a + + custom_tooltip = tour_grounds_events.6200.a.tt + + # You attempt to extort your vassal + scope:stop_host_scope = { + trigger_event = { + id = tour_grounds_events.6201 + days = 5 + } + } + + # decrease opinion with parochial vassals + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = angry_opinion + opinion = -20 + target = root + } + } + + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + stress_impact = { + greedy = minor_stress_impact_loss + diligent = minor_stress_impact_loss + content = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 0.5 + ai_sociability = 0.5 + } + modifier = { + add = 20 + has_trait = greedy + } + modifier = { + add = -30 + OR = { + has_trait = content + has_trait = generous + } + } + } + } + + option = { # + name = tour_grounds_events.6200.b + + # learn the vassal's secret to success + add_character_modifier = { + modifier = bountiful_harvest_modifier + years = 10 + } + + if = { + # check if root has the right building + limit = { + has_lifestyle = stewardship_lifestyle + } + + add_stewardship_lifestyle_xp = major_lifestyle_xp + } + + stress_impact = { + lazy = minor_stress_impact_gain + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_rationality = 0.8 + ai_sociability = 0.8 + } + modifier = { + add = 20 + has_trait = diligent + } + modifier = { + add = -30 + has_trait = lazy + } + } + } + + option = { # Be nice and don't do anything + name = tour_grounds_events.6200.c + + reverse_add_opinion = { + target = scope:stop_host_scope + modifier = pleased_opinion + opinion = 20 + } + + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + stress_impact = { + generous = minor_stress_impact_loss + humble = minor_stress_impact_loss + calm = miniscule_stress_impact_loss + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = 0.8 + } + } + } + + after = { + if = { + limit = { exists = root.var:building_focus } + remove_variable = building_focus + } + if = { + limit = { exists = root.var:vassal_building_level } + remove_variable = vassal_building_level + } + if = { + limit = { exists = root.var:root_building_level } + remove_variable = root_building_level + } + if = { + limit = { exists = root.var:building_level_diff } + remove_variable = root_building_level + } + } +} + +# follow-up event for vassal +tour_grounds_events.6201 = { + type = character_event + title = tour_grounds_events.6201.t + desc = tour_grounds_events.6201.desc + + theme = tour_grounds + + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:visiting_liege + animation = personality_rational + } + + option = { # accept a tax obligation increase + name = tour_grounds_events.6201.a + trigger = { vassal_contract_obligation_level_can_be_increased = feudal_government_taxes } + # Increase vassal's tax obligation + scope:visiting_liege = { + send_interface_toast = { + title = tour_grounds_events.6201.a.tt + left_icon = scope:visiting_liege + right_icon = scope:stop_host_scope + scope:stop_host_scope = { + vassal_contract_increase_obligation_level = feudal_government_taxes + progress_towards_friend_effect = { + REASON = friend_accepted_tax_increase + CHARACTER = scope:visiting_liege + OPINION = default_friend_opinion + } + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { # give your liege the extra profits + name = tour_grounds_events.6201.b + scope:visiting_liege = { + send_interface_toast = { + title = tour_grounds_events.6201.b.tt + left_icon = scope:visiting_liege + right_icon = scope:stop_host_scope + scope:stop_host_scope = { + pay_short_term_gold = { + target = scope:visiting_liege + gold = medium_gold_value + } + progress_towards_friend_effect = { + REASON = friend_split_profits + CHARACTER = scope:visiting_liege + OPINION = default_friend_opinion + } + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { # deny your liege's demand + name = tour_grounds_events.6201.c + add_treasury_or_gold = medium_treasury_or_gold_value + # give imprisonment reason + scope:visiting_liege = { + send_interface_toast = { + title = tour_grounds_events.6201.c.tt + left_icon = scope:visiting_liege + right_icon = scope:stop_host_scope + add_opinion = { + target = scope:stop_host_scope + modifier = embezzled_opinion + } + } + } + ai_chance = { + base = 100 + } + } +} + +# Tradeport +# Liege: Gold is stolen at Vassal's tradeport +tour_grounds_events.6202 = { + type = activity_event + title = tour_grounds_events.6202.t + desc = tour_grounds_events.6202.desc + + theme = tour_grounds + override_background = { reference = docks } + + left_portrait = { + character = scope:stop_host_scope + animation = shock + } + right_portrait = { + character = scope:tiny_thief + animation = schadenfreude + } + + cooldown = { years = 5 } + + trigger = { + location.county = { + any_county_province = { + has_building_or_higher = common_tradeport_01 + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_as = root_scope + location.county = { + random_county_province = { + limit = { has_building_or_higher = common_tradeport_01 } + save_scope_as = event_location + } + } + + # create our tiny little thief to do the thieving + create_character = { + template = child_thief_character + culture = scope:stop_host_scope.culture + faith = scope:stop_host_scope.faith + location = root.location + save_scope_as = tiny_thief + } + + # tiny_thief takes your gold! + remove_short_term_gold = medium_gold_value + + set_variable = { + name = gold_lost + value = medium_gold_value + } + } + + option = { # Fix this, you dumb vassal! + name = tour_grounds_events.6202.a + + custom_tooltip = tour_grounds_events.6202.a.tt + random_list = { + 1 = { + show_chance = no + desc = tour_grounds_events.6202.a.success + custom_tooltip = tour_grounds_events.6202.b.success + } + 1 = { + show_chance = no + desc = tour_grounds_events.6202.a.failure + custom_tooltip = tour_grounds_events.6202.b.failure + } + } + + scope:stop_host_scope = { + trigger_event = { + id = tour_grounds_events.6203 + days = { 1 5 } + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = 1 + ai_sociability = 0.5 + ai_energy = 0.1 + ai_vengefulness = 0.5 + } + } + } + + option = { # Chase after the tiny_thief yourself + name = tour_grounds_events.6202.b + + duel = { + skills = { prowess intrigue } + target = scope:tiny_thief + 40 = { # You succeed in catching the tiny thief + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = tour_grounds_events.6202.b.success + show_as_tooltip = { + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + add_character_flag = caught_tiny_thief + trigger_event = { + id = tour_grounds_events.6204 + days = { 1 5 } + } + } + 60 = { # You fail to catch them and they are lost forever + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + custom_tooltip = tour_grounds_events.6202.b.failure + send_interface_toast = { + left_icon = root + right_icon = scope:tiny_thief + title = tour_grounds_events.6202.b.failure + } + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = 1 + ai_sociability = 0.5 + ai_energy = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { # Let tiny_thief go + name = tour_grounds_events.6202.c + add_piety = major_piety_gain + every_vassal_or_below = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = disapproving_opinion + target = root + opinion = -10 + } + } + + if = { + limit = { exists = root.var:gold_lost } + remove_variable = gold_lost + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + stress_impact = { + greedy = medium_stress_impact_gain + forgiving = medium_stress_impact_loss + calm = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + ai_vengefulness = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = vengeful + has_trait = wrathful + } + } + modifier = { + add = 10 + has_trait = humble + } + } + } +} + +# Vassal: decide what to do about the tiny_thief +tour_grounds_events.6203 = { + type = character_event + title = tour_grounds_events.6203.t + desc = tour_grounds_events.6203.desc + + theme = tour_grounds + override_background = { reference = docks } + + left_portrait = { + character = scope:visiting_liege + animation = anger + } + right_portrait = { + character = scope:tiny_thief + animation = laugh + } + + option = { # Pay your liege their lost gold + name = tour_grounds_events.6203.a + scope:visiting_liege = { + send_interface_toast = { + left_icon = scope:stop_host_scope + right_icon = scope:tiny_thief + title = tour_grounds_events.6203.toast + scope:stop_host_scope = { + pay_short_term_gold = { + target = scope:visiting_liege + gold = scope:visiting_liege.var:gold_lost + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + disloyal = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + ai_energy = -1 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Chase after the tiny_thief yourself + name = tour_grounds_events.6203.b + + duel = { + skills = { prowess intrigue } + target = scope:tiny_thief + 40 = { + desc = tour_grounds_events.6202.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = tour_grounds_events.6202.b.success + left_icon = root + right_icon = scope:tiny_thief + } + scope:visiting_liege = { + trigger_event = { + id = tour_grounds_events.6204 + days = { 1 5 } + } + } + } + 60 = { + desc = tour_grounds_events.6202.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = tour_grounds_events.6202.b.failure + left_icon = root + right_icon = scope:tiny_thief + } + scope:visiting_liege = { + trigger_event = { + id = tour_grounds_events.6205 + days = { 1 5 } + } + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + } + } + + option = { # ain't my problem + name = tour_grounds_events.6203.c + + reverse_add_opinion = { + target = scope:visiting_liege + modifier = disappointed_opinion + opinion = -30 + } + + scope:visiting_liege = { + trigger_event = { + id = tour_grounds_events.6205 + days = { 1 5 } + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { + factor = 0 + has_trait = ambitious + } + } + } +} + +# Liege: tiny_thief is caught (either by vassal or liege themself) +tour_grounds_events.6204 = { + type = activity_event + title = tour_grounds_events.6204.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = caught_tiny_thief } + desc = tour_grounds_events.6204.desc.caught_by_liege + } + desc = tour_grounds_events.6204.desc.caught_by_vassal + } + } + + theme = tour_grounds + override_background = { reference = docks } + + left_portrait = { + character = scope:stop_host_scope + animation = happiness + } + right_portrait = { + character = scope:tiny_thief + animation = sadness + } + + immediate = { + involved_activity = { save_scope_as = current_activity } + } + + option = { # Take the gold + name = tour_grounds_events.6204.a + add_gold = root.var:gold_lost + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # Take the tiny_thief under your wing + name = tour_grounds_events.6204.b + + add_courtier = scope:tiny_thief + scope:tiny_thief = { + add_to_activity_without_travel = scope:current_activity + } + current_travel_plan = { + add_companion = scope:tiny_thief + } + + if = { + limit = { num_of_relation_ward < 2 } + set_relation_ward = { + target = scope:tiny_thief + reason = ward_tiny_thief + } + scope:tiny_thief = { + set_default_education = yes + } + } + + every_vassal_or_below = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + modifier = disapproving_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.75 + ai_energy = 0.75 + } + } + } + + after = { + if = { + limit = { exists = root.var:gold_lost } + remove_variable = gold_lost + } + if = { + limit = { has_character_flag = caught_tiny_thief } + remove_character_flag = caught_tiny_thief + } + } +} + +# Liege responds to vassal failing to catch the tiny_thief +tour_grounds_events.6205 = { + type = activity_event + title = tour_grounds_events.6205.t + desc = tour_grounds_events.6205.desc + + theme = tour_grounds + override_background = { reference = docks } + + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:stop_host_scope + animation = sadness + } + lower_center_portrait = { + character = scope:tiny_thief + } + + option = { # Demand the gold + name = tour_grounds_events.6205.a + + duel = { + skills = { diplomacy } + target = scope:stop_host_scope + 60 = { + desc = tour_grounds_events.6205.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6205.a.success + show_as_tooltip = { + scope:stop_host_scope = { + pay_short_term_gold = { + target = scope:visiting_liege + gold = scope:visiting_liege.var:gold_lost + } + } + } + } + hidden_effect = { + scope:stop_host_scope = { + send_interface_toast = { + left_icon = scope:stop_host_scope + right_icon = scope:visiting_liege + title = tour_grounds_events.6205.a.success + pay_short_term_gold = { + target = scope:visiting_liege + gold = scope:visiting_liege.var:gold_lost + } + } + } + } + } + 40 = { + desc = tour_grounds_events.6205.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + left_icon = root + right_icon = scope:tiny_thief + title = tour_grounds_events.6205.a.failure + add_prestige = minor_prestige_loss + } + } + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + ai_energy = -1 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Have the vassal whipped + name = tour_grounds_events.6205.b + trigger = { + OR = { + has_trait = sadistic + has_trait = wrathful + dread >= 50 + } + } + + flavor = tour_grounds_events.6205.b.flavor + scope:stop_host_scope = { + increase_wounds_no_death_effect = { REASON = beaten } + } + add_dread = minor_dread_gain + reverse_add_opinion = { + target = scope:stop_host_scope + modifier = whipped_me_opinion + } + + stress_impact = { + sadistic = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_sociability = -0.5 + ai_energy = 0.5 + ai_vengefulness = 1 + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + add = 30 + OR = { + has_trait = wrathful + has_trait = sadistic + } + } + } + } + + option = { # Forgive the vassal + name = tour_grounds_events.6205.c + + reverse_add_opinion = { + modifier = forgiven_opinion + years = 10 + target = scope:stop_host_scope + } + + stress_impact = { + base = minor_stress_impact_gain + forgiving = medium_stress_impact_loss + greedy = major_stress_impact_gain + vengeful = medium_stress_impact_gain + calm = minor_stress_impact_loss + sadistic = medium_stress_impact_gain + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + ai_energy = -1 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = wrathful + has_trait = sadistic + } + } + modifier = { + add = 30 + has_trait = forgiving + } + } + } + + after = { + if = { + limit = { exists = root.var:gold_lost } + remove_variable = gold_lost + } + } +} + +# Liege: Vassal challenges you to an educational sparring match +tour_grounds_events.6300 = { + type = activity_event + title = tour_grounds_events.6300.t + desc = tour_grounds_events.6300.desc + + theme = tour_grounds + override_background = { reference = army_camp } + + left_portrait = { + character = scope:stop_host_scope + animation = personality_bold + } + right_portrait = { + character = scope:target_knight + animation = celebrate_sword + } + lower_center_portrait = { + trigger = { exists = scope:tg_6300_stand_in } + character = scope:tg_6300_stand_in + } + + cooldown = { years = 10 } + + trigger = { + scope:stop_host_scope = { + trigger_if = { + limit = { is_ai = yes } + has_vassal_stance = glory_hound + } + any_knight = { + is_available_ai_adult = yes + location = root.location + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + current_travel_plan = { + any_entourage_character = { + is_knight = yes + } + } + } + } + + immediate = { + save_scope_as = root_scope + location = { save_scope_as = event_location } + # if possible, find a knight in the entourage + if = { + limit = { + current_travel_plan = { + any_entourage_character = { + is_knight = yes + } + } + } + current_travel_plan = { + random_entourage_character = { + limit = { is_knight = yes } + save_scope_as = tg_6300_stand_in + } + } + } + + scope:stop_host_scope = { + random_knight = { + limit = { location = root.location } + save_scope_as = target_knight + } + } + scope:target_knight = { + add_character_flag = wear_armor + } + scope:tg_6300_stand_in ?= { + add_character_flag = wear_armor + } + } + + option = { # Accept the invitation to spar + name = tour_grounds_events.6300.a + flavor = tour_grounds_events.6300.flavor + + duel = { + skills = { prowess martial } + target = scope:target_knight + 50 = { + desc = tour_grounds_events.6300.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + left_icon = root + right_icon = scope:target_knight + title = tour_grounds_events.6300.a.success + # opinion bonus with glory hound vassals + every_vassal_or_below = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 20 + } + } + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { + desc = tour_grounds_events.6300.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6300.a.failure + # opinion malus with glory hound vassals + every_vassal_or_below = { + vassal_stance = glory_hound + limit = { + is_ai = yes + } + custom = every_glory_hound_vassal + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -20 + } + } + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + modifier = { + add = 30 + has_trait = brave + } + modifier = { + add = -30 + has_trait = craven + } + } + } + + option = { # Suggest that your knight give a demonstration + name = tour_grounds_events.6300.b + + trigger = { exists = scope:tg_6300_stand_in } + + scope:tg_6300_stand_in = { + duel = { + skills = { prowess martial } + target = scope:target_knight + 50 = { + desc = tour_grounds_events.6300.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6300.b.success + # county modifier for winning + location.county = { + add_county_modifier = { + modifier = prowess_demonstration_modifier + years = 30 + } + } + } + } + } + 50 = { + desc = tour_grounds_events.6300.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + send_interface_toast = { + left_icon = root + right_icon = scope:stop_host_scope + title = tour_grounds_events.6300.b.failure + add_prestige = minor_prestige_loss + } + } + } + } + } + + stress_impact = { + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.1 + } + modifier = { + add = -30 + has_trait = brave + } + modifier = { + add = 30 + has_trait = craven + } + } + } + + option = { # Decline + name = tour_grounds_events.6300.c + every_vassal_or_below = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.4 + ai_sociability = -0.3 + } + modifier = { + add = -20 + has_trait = brave + } + modifier = { + add = 20 + has_trait = craven + } + } + } + after = { + scope:target_knight = { + remove_character_flag = wear_armor + } + scope:tg_6300_stand_in ?= { + remove_character_flag = wear_armor + } + } +} + diff --git a/N3OW/events/activities/tour_activity/tour_phase_cultural_festival.txt b/N3OW/events/activities/tour_activity/tour_phase_cultural_festival.txt new file mode 100644 index 00000000..00c4e90a --- /dev/null +++ b/N3OW/events/activities/tour_activity/tour_phase_cultural_festival.txt @@ -0,0 +1,10202 @@ +# Events for the cultural festival portion of the Tour grand activity + +namespace = cultural_festival + +############################ +## Tour Mini-Activity: Cultural Festival +############################ +## Vassal Events +## 1000-1999 +## by Veronica Pazos +############################ +# +############################ +## Liege Events +## 2000-2999 +## by Veronica Pazos +############################ +# cultural_festival.2000 - Cultural Festival Arrival Event (big variation) +# cultural_festival.2001-2002 - Performer messes up in front of you +# cultural_festival.2010 - King/Queen of Love and Beauty / Grim and Grievance +# cultural_festival.2020 - You enjoy a cultural demonstration based on the time of the year/culture +# cultural_festival.2030 - You tax people that go into the cultural festival +# cultural_festival.2040 - You are horrified by the culture in the cultural festival +# cultural_festival.2050 - Local dance is too scandalous - or not +# cultural_festival.2060 - You bring sophisticated entertainments from the capital to a low-dev county +# cultural_festival.2070 - You encounter a band of mercenaries enjoying the festivities, recruit? +# cultural_festival.2080 - Weird guy offers you a mysterious bag of liquids +# cultural_festival.2090 - Imprison performers on made up accussations +# cultural_festival.2100 - A guild is contributing to the festival +# cultural_festival.2110 - A dog breaks into a performance - Adopt? +# +# +############################ +## Bilateral Events +## 3000-3999 +## by Veronica Pazos +############################ +# cultural_festival.3000-3002 - Big play based on liege +# cultural_festival.3010-3011 - Alcohol/Juice fountain +# cultural_festival.3020-3022 - Host a lavish ceremony to make your vassal formally repledge homage to you +# cultural_festival.3030-3031 - Crown the best pig/cow/local_farm_animal +# cultural_festival.3040-3042 - Sword in the stone +# cultural_festival.3050-3051 - You struggle to stay awake during a boring performance +# cultural_festival.3060-3061 - Take your spouse/vassal's spouse for a dance +# cultural_festival.3070-3071 - Hold a feast of fools-esque ceremony +# +# +############################ +## 4000-4999 +## by Arkadiusz Majewski +############################ +# cultural_festival.4000 - As Liege you end up in a conversation in a language you don't know +# cultural_festival.4100 - Your courtier makes a cultural faux pas +# cultural_festival.4200-4203 - Vassal does a parade, liege attends +# cultural_festival.4300-4312 - Vassal initiates gift exchange custom, both can follow up on the gifts years later + +##################################################################################### + +###################### +## Liege Events +## 2000-2999 +## by Veronica Pazos +###################### + +###################### +## Liege: Arrival event +## 2000 +## by Veronica Pazos +###################### + +cultural_festival.2000 = { + type = activity_event + title = cultural_festival.2000.t + desc = { + desc = cultural_festival.2000.desc.intro + random_valid = { + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + has_relation_lover = scope:stop_host_scope + } + desc = cultural_festival.2000.desc.first_time_lovers + } + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + has_relation_rival = scope:stop_host_scope + } + desc = cultural_festival.2000.desc.first_time_rivals + } + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + opinion = { + target = scope:stop_host_scope + value >= -10 + } + opinion = { + target = scope:stop_host_scope + value <= 15 + } + } + desc = cultural_festival.2000.desc.first_time_neutral + } + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + OR = { + opinion = { + target = scope:stop_host_scope + value > 15 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:stop_host_scope } + } + } + desc = cultural_festival.2000.desc.first_time_good + } + triggered_desc = { + trigger = { + NOT = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } + opinion = { + target = scope:stop_host_scope + value < -10 + } + } + desc = cultural_festival.2000.desc.first_time_bad + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + has_relation_lover = scope:stop_host_scope + } + desc = cultural_festival.2000.desc.again_lovers + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + has_relation_rival = scope:stop_host_scope + } + desc = cultural_festival.2000.desc.again_rivals + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + OR = { + opinion = { + target = scope:stop_host_scope + value > 15 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:stop_host_scope } + } + } + desc = cultural_festival.2000.desc.again_good + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + opinion = { + target = scope:stop_host_scope + value >= -10 + } + opinion = { + target = scope:stop_host_scope + value <= 15 + } + } + desc = cultural_festival.2000.desc.again_neutral + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + opinion = { + target = scope:stop_host_scope + value < -10 + } + } + desc = cultural_festival.2000.desc.again_bad + } + } + random_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + desc = cultural_festival.2000.desc.majesty + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + desc = cultural_festival.2000.desc.intimidation + } + triggered_desc = { + trigger = { + is_target_in_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + desc = cultural_festival.2000.desc.again_intimidation + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + desc = cultural_festival.2000.desc.taxation + } + } + } + + theme = tour_arrival + window = tour_arrival_event + + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_relation_lover = scope:stop_host_scope + } + animation = flirtation_left + } + triggered_animation = { + trigger = { + OR = { + opinion = { + target = scope:stop_host_scope + value > 15 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:stop_host_scope } + } + } + animation = ecstasy + } + triggered_animation = { + trigger = { + OR = { + opinion = { + target = scope:stop_host_scope + value < -10 + } + has_relation_rival = scope:stop_host_scope + } + } + animation = dismissal + } + triggered_animation = { + trigger = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + has_trait = ambitious + has_trait = greedy + has_trait = avaricious + } + } + animation = dismissal + } + triggered_animation = { + trigger = { + OR = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + has_trait = callous + has_trait = sadistic + dread >= high_dread + } + } + animation = personality_vengeful + } + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + triggered_animation = { + trigger = { + has_relation_lover = scope:stop_host_scope + } + animation = flirtation + } + triggered_animation = { + trigger = { + scope:stop_host_scope = { + opinion = { + target = scope:stop_host_scope + value > 15 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + animation = happiness + } + triggered_animation = { + trigger = { + scope:stop_host_scope = { + OR = { + opinion = { + target = scope:stop_host_scope + value < -10 + } + has_relation_rival = root + } + } + } + animation = boredom + } + animation = personality_honorable + } + + immediate = { + if = { + limit = { + root.location.county.holder = { + OR = { + has_relation_friend = root + opinion = { + target = root + value >= low_positive_opinion + } + } + } + } + play_arrival_music_effect = { + WELCOME_LEVEL = welcome + } + } + else = { + play_arrival_music_effect = { + WELCOME_LEVEL = neutral + } + } + } + + option = { + name = cultural_festival.2000.a + custom_tooltip = cultural_festival_begins_tt + if = { + limit = { + root.culture != root.location.culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + else = { + root.location.county = { + add_county_modifier = { + modifier = recent_cultural_festival + years = 20 + } + } + } + tour_generic_arrival_effect = yes + } + + after = { + add_to_variable_list = { + name = visited_cultural_festival_province_var + target = scope:cultural_festival_scope + } + } +} + +###################### +## Liege: Performer messes up in front of you, gets injured +## 2001 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2001_has_wrathful_trait = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = wrathful + } +} + +cultural_festival.2001 = { + type = activity_event + title = cultural_festival.2001.t + desc = { + desc = cultural_festival.2001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = child_in_disguise_var + } + desc = cultural_festival.2001.desc.child + } + triggered_desc = { + trigger = { + NOT = { has_variable = child_in_disguise_var } + } + desc = cultural_festival.2001.desc.normal + } + } + } + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + cultural_festival_2001_has_wrathful_trait = yes + } + animation = schadenfreude + } + animation = shock + } + right_portrait = { + character = scope:injured_artist + animation = pain + } + + trigger = { + #triggered in the on_action + } + + weight_multiplier = { + base = 1 + } + + immediate = { + location = { save_scope_as = injured_artist_location } + random_list = { + 35 = { + trigger = { # if host has a child there's a tiny chance they'll be the artist + scope:stop_host_scope = { + any_child = { is_available_ai_adult = yes } + } + } + set_variable = child_in_disguise_var + scope:stop_host_scope = { + random_child = { + limit = { is_available_ai_adult = yes } + increase_wounds_effect = { REASON = fall } + save_scope_as = injured_artist + } + } + } + 65 = { + create_character = { + gender_female_chance = 50 + culture = location.culture + faith = location.faith + random_traits = yes + dynasty = none + age = { 18 50 } + employer = scope:stop_host_scope + save_scope_as = injured_artist + after_creation = { + increase_wounds_effect = { REASON = fall } + } + } + } + } + } + + option = { # So unfortunate + name = cultural_festival.2001.a + stress_impact = { + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { # Help them! + name = cultural_festival.2001.b + remove_short_term_gold = tiny_gold_value + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_helped_injured_artist_modifier + years = 5 + } + } + if = { + limit = { has_variable = child_in_disguise_var } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + hidden_effect = { + trigger_event = { + id = cultural_festival.2002 + days = { 10 15 } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = sadistic + has_trait = callous + has_trait = wrathful + } + } + } + } + + option = { # Have them whipped + name = cultural_festival.2001.c + trigger = { + cultural_festival_2001_has_wrathful_trait = yes + } + add_dread = medium_dread_gain + scope:injured_artist = { + increase_wounds_effect = { REASON = whipping } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_whipped_injured_artist_modifier + years = 5 + } + } + if = { + limit = { has_variable = child_in_disguise_var } + scope:stop_host_scope = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_whipped_my_kid + OPINION = -30 + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + decrease_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + calm = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = sadistic + has_trait = callous + has_trait = wrathful + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + has_trait = forgiving + } + } + } + } +} + +# Follow up: The person gives you a reward for your kindness + +scripted_trigger cultural_festival_2002_valid_secret_owner = { + is_adult = yes + is_ai = yes + this != ROOT + any_secret = { + exists = this + NOT = { is_known_by = root } + } +} + +cultural_festival.2002 = { + type = activity_event + title = cultural_festival.2002.t + desc = { + desc = cultural_festival.2002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = var:secret_var + } + desc = cultural_festival.2002.desc.secret + } + triggered_desc = { + trigger = { + exists = var:hunting_var + } + desc = cultural_festival.2002.desc.hunting + } + triggered_desc = { + trigger = { + exists = var:savings_var + } + desc = cultural_festival.2002.desc.savings + } + } + } + + theme = cultural_festival + + override_background = { reference = market } + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:injured_artist + animation = beg + } + lower_center_portrait = { + trigger = { has_variable = secret_var } + character = scope:secret_target + } + + trigger = { + location = scope:injured_artist_location #you haven't left for the next stop + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_list = { #we select your reward + 1 = { + trigger = { + scope:activity = { + any_attending_character = { + cultural_festival_2002_valid_secret_owner = yes + } + } + } + set_variable = secret_var + } + 1 = { set_variable = hunting_var } + 1 = { set_variable = savings_var } + } + + if = { #we get the secret scopes + limit = { has_variable = secret_var } + scope:activity = { + random_attending_character = { + limit = { cultural_festival_2002_valid_secret_owner = yes } + save_scope_as = secret_target + random_secret = { + limit = { NOT = { is_known_by = root } } + save_scope_as = secret_secret + } + } + } + } + } + + option = { # Thanks! + name = cultural_festival.2002.a + if = { + limit = { has_variable = secret_var } + scope:secret_secret = { reveal_to = root } + } + else_if = { + limit = { has_variable = hunting_var } + add_character_modifier = { #skirmishers_damage_mult + modifier = terrain_knowledge_modifier + years = 10 + } + } + else = { + add_treasury_or_gold = { + value = minor_treasury_or_gold_value + max = 10 + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { # I can't accept this + name = cultural_festival.2002.b + add_piety = medium_piety_gain + stress_impact = { + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = sadistic + has_trait = callous + has_trait = wrathful + } + } + } + } + + after = { + remove_variable = secret_var + remove_variable = hunting_var + remove_variable = savings_var + } +} + +###################### +## Liege: You're being crowned the Ugliest/Prettiest person +## 2010 +## by Veronica Pazos +###################### + +cultural_festival.2010 = { + type = activity_event + title = cultural_festival.2010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_conventionally_ugly_trigger = yes + } + desc = cultural_festival.2010.desc_bad + } + triggered_desc = { + trigger = { + has_conventionally_attractive_trigger = yes + } + desc = cultural_festival.2010.desc_good + } + } + } + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_conventionally_ugly_trigger = yes + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + animation = rage + } + triggered_animation = { + trigger = { + has_conventionally_ugly_trigger = yes + NOR = { + has_trait = arrogant + has_trait = wrathful + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + animation = grief + } + animation = ecstasy + } + right_portrait = { + character = scope:stop_host_scope + triggered_animation = { + trigger = { + has_conventionally_ugly_trigger = yes + } + animation = schadenfreude + } + animation = happiness + } + + trigger = { + is_landed_or_landless_administrative = yes + NOT = { has_variable = was_monarch_good_bad_var } + OR = { + AND = { + has_conventionally_attractive_trigger = yes #you're pretty + scope:stop_host_scope = { #and the host doesn't hate you + NOT = { has_relation_rival = root } + } + } + AND = { + has_conventionally_ugly_trigger = yes #or not pretty + scope:stop_host_scope = { #and the host has something against you + OR = { + has_relation_rival = root + has_relation_potential_rival = root + AND = { + has_hook_of_type = { + target = root + type = weak_blackmail_hook + } + opinion = { + target = root + value >= medium_negative_opinion + } + } + has_hook_of_type = { + target = root + type = strong_blackmail_hook + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:stop_host_scope = { + has_relation_soulmate = root + } + } + modifier = { + factor = 2 + scope:stop_host_scope = { + has_relation_nemesis = root + } + } + modifier = { + factor = 1.5 + scope:stop_host_scope = { + has_relation_lover = root + } + } + modifier = { + factor = 1.5 + OR = { + has_trait = arrogant #more likely to happen if you care about this stuff + has_trait = gregarious + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = humble #less likely to happen if you don't like this + has_trait = shy + } + } + } + + immediate = { + set_variable = was_monarch_good_bad_var #so you don't get the same event again + } + + option = { # you're the king/queen of beauty - yass king/queen + name = cultural_festival.2010.a + trigger = { + has_conventionally_attractive_trigger = yes + } + scope:activity = { + add_activity_log_entry = { + key = crowned_monarch_of_beauty_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { + limit = { is_male = yes } + give_nickname = nick_monarch_of_beauty_and_noblesse_masc + } + else = { + give_nickname = nick_monarch_of_beauty_and_noblesse + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = king_of_beauty_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + arrogant = minor_stress_impact_loss #you like this even more! + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + } + } + } + + option = { # you're king/queen of the homely - sigh + name = cultural_festival.2010.b + trigger = { + has_conventionally_ugly_trigger = yes + } + scope:activity = { + add_activity_log_entry = { + key = crowned_monarch_of_ugly_log + tags = { bad } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { + limit = { is_male = yes } + give_nickname = nick_monarch_of_grim_and_grievance_masc + } + else = { + give_nickname = nick_monarch_of_grim_and_grievance + } + add_opinion = { + target = scope:stop_host_scope + modifier = insult_opinion + opinion = -50 + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + + } + } + } + + option = { #you're the king/queen of the homely - rage + name = cultural_festival.2010.c + trigger = { + has_conventionally_ugly_trigger = yes + } + scope:activity = { + add_activity_log_entry = { + key = crowned_monarch_of_ugly_log + tags = { bad } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { + limit = { has_relation_nemesis = scope:stop_host_scope } + add_opinion = { + target = scope:stop_host_scope + modifier = insult_opinion + opinion = -50 + } + } + else_if = { + limit = { has_relation_rival = scope:stop_host_scope } + set_relation_nemesis = { #this is bad enough to make you nemesis + target = scope:stop_host_scope + copy_reason = rival + reason = nemesis_monarch_of_grim_and_grievance + } + } + else = { + progress_towards_rival_effect = { + CHARACTER = scope:stop_host_scope + REASON = rival_king_of_ugly + OPINION = -10 + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = king_of_ugly_modifier + years = 5 + } + } + } + } + } + duel = { + skill = prowess + target = scope:stop_host_scope + 50 = { #you win + desc = cultural_festival.2010.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = cultural_festival.2010.c.success + left_icon = root + right_icon = scope:stop_host_scope + scope:stop_host_scope = { + increase_wounds_effect = { + REASON = fight + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { + desc = cultural_festival.2010.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = cultural_festival.2010.c.failure + left_icon = root + increase_wounds_effect = { + REASON = fight + } + } + } + } + stress_impact = { + content = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = forgiving + has_trait = calm + } + } + } + } +} + +###################### +## Liege: You enjoy a cultural demonstration +## 2020 +## by Veronica Pazos +###################### + +cultural_festival.2020 = { + type = activity_event + title = cultural_festival.2020.t + desc = { + desc = cultural_festival.2020.desc.intro + first_valid = { + triggered_desc = { #Christmas + trigger = { + OR = { + location.faith.religion = religion:eastern_orthodox_religion + location.faith.religion = religion:catholic_religion + location.faith.religion = religion:protestant_religion + } + OR = { #we take the broader Christmaside season + current_month = 11 + current_month = 12 + current_month = 1 + } + } + desc = cultural_festival.2020.desc.christmas + } + triggered_desc = { #Eid al-Fitr + trigger = { + location.faith.religion = religion:islam_religion + OR = { + current_month = 3 + current_month = 4 + current_month = 5 + } + } + desc = cultural_festival.2020.desc.eid + } + triggered_desc = { #Midsommar + trigger = { + root.culture = { NOT = { has_cultural_pillar = heritage_north_germanic } } + location.culture = { has_cultural_pillar = heritage_north_germanic } + OR = { + current_month = 5 + current_month = 6 + current_month = 7 + current_month = 8 + } + } + desc = cultural_festival.2020.desc.midsommar + } + triggered_desc = { #Regular Summer Solstice + trigger = { + NOT = { + location.culture = { has_cultural_pillar = heritage_north_germanic } + } + OR = { + current_month = 5 + current_month = 6 + current_month = 7 + current_month = 8 + } + } + desc = cultural_festival.2020.desc.summer_solstice + } + triggered_desc = { #Harvest Festival + trigger = { + OR = { + current_month = 9 + current_month = 10 + current_month = 11 + } + } + desc = cultural_festival.2020.desc.harvest + } + desc = cultural_festival.2020.desc.generic + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_forgiving + } + + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + location.culture = { NOT = { has_variable = cultural_festival_culture_var } } #you haven't seen this festival in a while + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + } + + immediate = { + location.culture = { + set_variable = { + name = cultural_festival_culture_var + days = 1825 # 5 years + } + save_scope_as = festival_culture_scope + } + } + + option = { # I love this culture! + name = cultural_festival.2020.a + if = { + limit = { + location.culture != root.culture #they're not of your same culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = major_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = enjoyed_culture_modifier + years = 10 + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + lifestyle_reveler = minor_stress_impact_gain + drunkard = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lifestyle_reveler + has_trait = drunkard + has_trait = stubborn + } + } + } + } + + option = { # I like the festival itself + name = { + trigger = { + drinks_alcohol_trigger = yes + is_adult = yes + scope:stop_host_scope = { + drinks_alcohol_trigger = yes + } + } + text = cultural_festival.2020.b.drink + } + name = { + trigger = { + OR = { + drinks_alcohol_trigger = no + AND = { + drinks_alcohol_trigger = yes + scope:stop_host_scope = { + drinks_alcohol_trigger = no + } + } + } + } + text = cultural_festival.2020.b.no_drink + } + add_character_modifier = { #stress gain - + modifier = festival_tis_the_season + years = 10 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + base = major_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + drunkard = minor_stress_impact_loss + callous = minor_stress_impact_gain + temperate = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = temperate + has_trait = content + } + } + } + } +} + +###################### +## Liege: Taxes? +## 2030 +## by Veronica Pazos +###################### + +cultural_festival.2030 = { + type = activity_event + title = cultural_festival.2030.t + desc = cultural_festival.2030.desc + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = greedy + has_trait = avaricious + } + } + animation = personality_greedy + } + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + animation = worry + } + + trigger = { + is_landed_or_landless_administrative = yes + location.county ?= { + development_level >= bad_development_level + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location.county = { development_level >= medium_development_level } + } + } + + option = { # Tax the people + name = cultural_festival.2030.a + add_treasury_or_gold = medium_treasury_or_gold_value + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_taxation_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + decrease_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = generous + } + } + } + } + + option = { # Let them go + name = cultural_festival.2030.b + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = no_taxation_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = greedy + has_trait = avaricious + } + } + } + } + + option = { # Tax them MORE + name = cultural_festival.2030.c + trigger = { + OR = { + has_trait = greedy + has_trait = avaricious + } + } + add_treasury_or_gold = major_treasury_or_gold_value + location.county = { + change_development_level = -1 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = greedy + has_trait = avaricious + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = just + has_trait = generous + } + } + } + } +} + +###################### +## Liege: You're horrified by this (lack of) culture +## 2040 +## by Veronica Pazos +###################### + +cultural_festival.2040 = { + type = activity_event + title = cultural_festival.2040.t + desc = cultural_festival.2040.desc + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + animation = worry + } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + location.county.culture != root.culture #this is not your culture + exists = root.capital_county + location = { + county = { + culture != root.capital_county.culture #this is not the capital's culture + } + } + } + + immediate = { + location.county.culture = { save_scope_as = festival_culture_scope } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + root.culture = { + cultural_acceptance = { + target = scope:stop_host_scope.culture + value < hybridization_threshold_value + } + } + } + } + + option = { # This is AWFUL + name = cultural_festival.2040.a + if = { + limit = { + location.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_insulted_festival + } + } + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = no_culture_modifier + years = 10 + } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = helped_culture_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = humble + } + } + } + } + + option = { # It's not that bad + name = cultural_festival.2040.b + if = { + limit = { + location.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = appreciated_culture_modifier + years = 5 + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + zealous = minor_stress_impact_gain + callous = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = callous + has_trait = arrogant + } + } + } + } + + option = { # I'll show them what a good culture actually looks like + name = cultural_festival.2040.c + trigger = { + has_trait = arrogant + } + duel = { + skill = diplomacy + value = average_skill_level + 50 = { + desc = cultural_festival.2040.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = cultural_festival.2040.c.success + left_icon = root + if = { + limit = { + location.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_insulted_festival + } + } + } + add_prestige = minor_prestige_gain + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { + desc = cultural_festival.2040.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = cultural_festival.2040.c.failure + left_icon = root + add_prestige = medium_prestige_loss + } + } + } + stress_impact = { + gregarious = minor_stress_impact_gain + temperate = minor_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = temperate + has_trait = shy + } + } + } + } +} + +###################### +## Liege: Local dance is too scandalous for you +## 2050 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2050_scandalous_trigger = { + culture = { NOT = { has_cultural_tradition = tradition_modest } } #they need to not be modest AND + NOR = { #their liege is into this + has_trait = chaste + has_trait = celibate + } + OR = { + faith = { #there are many ways you can be scandalous + OR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = deviancy_accepted + NOT = { trait_is_sin = lustful } + trait_is_sin = chaste + trait_is_sin = celibate + } + } + } +} + +scripted_trigger cultural_festival_2050_modest_trigger = { + faith = { trait_is_sin = lustful } #this is a sin + OR = { + culture = { has_cultural_tradition = tradition_modest } #you can just be modest + faith = { #or you don't have these tenets + NOR = { + has_doctrine_parameter = naked_adherents_active + has_doctrine_parameter = deviancy_accepted + } + } + } +} + +cultural_festival.2050 = { + type = activity_event + title = cultural_festival.2050.t + desc = { + desc = cultural_festival.2050.desc_intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = lustful + has_trait = deviant + } + } + desc = cultural_festival.2050.desc_lustful + } + triggered_desc = { + trigger = { + NOR = { + has_trait = lustful + has_trait = deviant + } + } + desc = cultural_festival.2050.desc_fallback + } + } + desc = cultural_festival.2050.desc_outro + } + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:stop_host_scope + animation = ecstasy + } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + location != root.capital_county.title_province #this is not happening in your capital + scope:stop_host_scope = { + cultural_festival_2050_scandalous_trigger = yes #they're scandalous + } + cultural_festival_2050_modest_trigger = yes #you're not + # Probably best not for kids to be involved in this event at all + scope:stop_host_scope = { is_adult = yes } + scope:visiting_liege = { is_adult = yes } + } + + immediate = { + location.culture ?= { save_scope_as = festival_culture_scope } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = lustful + scope:stop_host_scope = { + OR = { + has_trait = lustful + has_trait = deviant + } + } + } + } + } + + option = { # OH MY GOD + name = cultural_festival.2050.a + scope:activity = { + add_activity_log_entry = { + key = culture_shock_log + tags = { bad } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + culture = { #Decrease + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_insulted_festival + } + } + } + } + } + stress_impact = { + lustful = minor_stress_impact_gain + deviant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = chaste + has_trait = celibate + has_trait = zealous + } + } + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = deviant + } + } + } + } + + option = { # I shall defend their culture + name = cultural_festival.2050.b + scope:activity = { + add_activity_log_entry = { + key = culture_exchange_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + add_piety = minor_piety_loss + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + shy = minor_stress_impact_gain + chaste = medium_stress_impact_gain + celibate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = chaste + has_trait = celibate + has_trait = zealous + } + } + } + } + + option = { # This is amazing! + name = cultural_festival.2050.c + trigger = { + has_trait = lustful + has_trait = deviant + } + scope:activity = { + add_activity_log_entry = { + key = culture_exchange_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 35 + } + } + add_piety = medium_piety_loss + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + zealous = medium_stress_impact_gain + chaste = major_stress_impact_gain + celibate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = lustful + has_trait = deviant + } + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = chaste + has_trait = celibate + has_trait = zealous + } + } + } + } +} + +###################### +## Liege: You bring sophisticated entertainments from the capital +## 2060 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2060_arrogant_trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = vengeful + has_trait = sadistic + has_trait = callous + has_trait = stubborn + } +} + +cultural_festival.2060 = { + type = activity_event + title = cultural_festival.2060.t + desc = cultural_festival.2060.desc + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + triggered_animation = { + trigger = { + scope:stop_host_scope = { cultural_festival_2060_arrogant_trigger = yes } + } + animation = dismissal + } + animation = ecstasy + } + artifact = { + target = scope:sophisticated_artifact + position = lower_center_portrait + } + + trigger = { + is_landed_or_landless_administrative = yes + location.county ?= { + development_level <= bad_development_level + } + any_character_artifact = { #you bring something with you + is_equipped = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location.county = { + development_level <= terrible_development_level + } + } + modifier = { + factor = 1.5 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + } + + immediate = { + random_character_artifact = { + limit = { + is_equipped = no + 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 + } + rarity = common + } + alternative_limit = { + is_equipped = no + 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 + } + rarity = masterwork + } + alternative_limit = { + is_equipped = no + 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 + } + rarity = famed + } + alternative_limit = { + is_equipped = no + 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 + } + } + save_scope_as = sophisticated_artifact + } + if = { + limit = { + scope:stop_host_scope = { + any_sponsored_inspiration = { + count > 0 + inspiration_owner.location = root.location + } + } + } + scope:stop_host_scope = { + random_sponsored_inspiration = { + limit = { + inspiration_owner.location = root.location + } + inspiration_owner = { + save_scope_as = inspired_character + } + } + } + } + } + + option = { # Give it to them + name = cultural_festival.2060.a + scope:activity = { + add_activity_log_entry = { + key = gave_away_artifact_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + artifact = scope:sophisticated_artifact + root.location.county = { + change_development_progress = 2 + } + scope:sophisticated_artifact = { + set_owner = scope:stop_host_scope + } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = callous + } + } + } + } + + option = { # Ask to have it back + name = cultural_festival.2060.b + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = generous + } + } + } + } + + option = { # Find a local to craft a similar artifact + name = cultural_festival.2060.c + trigger = { + exists = scope:inspired_character + exists = scope:inspired_character.inspiration + } + pay_short_term_gold = { + target = scope:inspired_character + gold = minor_gold_value + } + location.county = { + change_development_progress = 2 + } + scope:inspired_character = { + inspiration = { + change_inspiration_progress = 20 + } + } + stress_impact = { + callous = minor_stress_impact_gain + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = callous + } + } + } + } +} + +###################### +## Liege: You encounter a band of mercenaries enjoying the festivities, recruit? +## 2070 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2070_valid_mercenary = { + is_available_healthy_ai_adult = yes + prowess >= high_skill_rating + trigger_if = { + limit = { #your vassal and you can use these mercenaries + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:stop_host_scope } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + is_female = yes + } + trigger_else = { + is_female = no + } +} + +cultural_festival.2070 = { + type = activity_event + title = cultural_festival.2070.t + desc = cultural_festival.2070.desc + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = deceitful + has_trait = disloyal + has_trait = schemer + } + } + animation = scheme + } + triggered_animation = { + trigger = { + OR = { + has_trait = gregarious + has_trait = lifestyle_reveler + has_trait = drunkard + } + } + animation = toast_goblet + } + animation = personality_honorable + } + right_portrait = { + character = scope:retired_mercenary + animation = drink_goblet + } + lower_center_portrait = scope:stop_host_scope + cooldown = { years = 2 } + + trigger = { + location.county ?= { county_control <= medium_county_control } + } + + immediate = { + #if there's an appropiate pool character pick them + if = { + limit = { + any_pool_character = { + province = root.location + cultural_festival_2070_valid_mercenary = yes + } + } + random_pool_character = { + province = root.location + limit = { cultural_festival_2070_valid_mercenary = yes } + save_scope_as = retired_mercenary + } + } + #otherwise create new character + else = { + create_character = { + template = retired_mercenary + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + dynasty = none + save_scope_as = retired_mercenary + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location.county = { county_control < low_county_control } + } + } + + option = { # hire them to keep the area controlled + name = cultural_festival.2070.a + pay_short_term_gold = { + target = scope:retired_mercenary + gold = minor_gold_value + } + add_character_modifier = { + modifier = festival_hired_mercenaries #county_control + years = 10 + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + drunkard = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = drunkard + has_trait = gregarious + } + } + } + } + + option = { # challenge them to a game, if you win they must serve you for free, if they win you pay them double + name = cultural_festival.2070.b + random_list = { + 50 = { + send_interface_toast = { + title = cultural_festival.2070.b.success + left_icon = scope:retired_mercenary + add_character_modifier = { + modifier = festival_luck_mercenaries + years = 10 + } + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { + send_interface_toast = { + title = cultural_festival.2070.b.failure + left_icon = scope:retired_mercenary + pay_short_term_gold = { + target = scope:retired_mercenary + gold = minor_gold_value + } + } + } + } + stress_impact = { + drunkard = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = drunkard + has_trait = gregarious + } + } + } + } + + option = { # challenge them to a game, if you win they must serve you for free, if they win you pay them double - but you cheat + name = cultural_festival.2070.c + trigger = { + OR = { + has_trait = deceitful + has_trait = schemer + } + } + duel = { + skill = intrigue + target = scope:retired_mercenary + 70 = { + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + send_interface_toast = { + title = cultural_festival.2070.b.success + left_icon = scope:retired_mercenary + add_character_modifier = { + modifier = festival_luck_mercenaries + years = 10 + } + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_taxation + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + send_interface_toast = { + title = cultural_festival.2070.c.failure + left_icon = scope:retired_mercenary + pay_short_term_gold = { + target = scope:retired_mercenary + gold = minor_gold_value + } + #they also beat you up + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + stress_impact = { + drunkard = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = drunkard + has_trait = gregarious + has_trait = honest + } + } + } + } + + option = { # have a nice one, gents + name = cultural_festival.2070.d + add_character_modifier = { + modifier = festival_drank_with_mercenaries + years = 10 + } + stress_impact = { + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = temperate + } + } + } +} + +###################### +## Liege: You encounter a mysterious merchant +## 2080 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2080_merchant = { + is_ai = yes + is_adult = yes + is_landed_or_landless_administrative = no + is_lowborn = yes + is_councillor = no + NOT = { is_courtier_of = root } + NOR = { + has_trait = zealous + has_trait = cynical + } +} + +cultural_festival.2080 = { + type = activity_event + title = cultural_festival.2080.t + desc = cultural_festival.2080.desc + + theme = cultural_festival + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:mysterious_merchant + animation = ecstasy + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = arbitrary + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + cultural_festival_2080_merchant = yes + } + } + random_pool_character = { + province = root.location + limit = { cultural_festival_2080_merchant = yes } + save_scope_as = mysterious_merchant + } + } + else = { + create_character = { + template = merchant_template + location = root.location + dynasty = none + faith = root.location.faith + culture = root.location.culture + save_scope_as = mysterious_merchant + } + } + } + + option = { # Buy the red liquid + name = cultural_festival.2080.a + remove_short_term_gold = 1 #symbolic prize, you're buying one bottle + custom_tooltip = { + text = cultural_festival.2080.tt + random_list = { + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.health + add_character_modifier = festival_2080_red_health + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.prowess + add_character_modifier = festival_2080_red_prowess + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.fertility + add_character_modifier = festival_2080_red_fertility + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.prowess_bad + add_character_modifier = festival_2080_red_prowess_bad + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.a.fertility_bad + add_character_modifier = festival_2080_red_fertility_bad + } + } + } + } + stress_impact = { + greedy = miniscule_stress_impact_gain + avaricious = miniscule_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.25 + has_trait = arbitrary + } + modifier = { + factor = 0.5 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + modifier = { + factor = 0 + OR = { + gold <= tiny_gold_value + has_trait = craven + has_trait = paranoid + } + } + } + } + + option = { # Buy the green liquid + name = cultural_festival.2080.b + remove_short_term_gold = 1 + custom_tooltip = { + text = cultural_festival.2080.tt + random_list = { + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.health_bad + add_character_modifier = festival_2080_blue_health_bad + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.stress + add_character_modifier = festival_2080_blue_stress + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.stress_bad + add_character_modifier = festival_2080_blue_stress_bad + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.attraction + add_character_modifier = festival_2080_blue_attraction + } + } + 1 = { + send_interface_toast = { + left_icon = root + title = cultural_festival_2080.b.stress_loss + add_character_modifier = festival_2080_blue_stress_loss + } + } + } + } + stress_impact = { + greedy = miniscule_stress_impact_gain + avaricious = miniscule_stress_impact_gain + cynical = minor_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.25 + has_trait = arbitrary + } + modifier = { + factor = 0.5 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + modifier = { + factor = 0 + OR = { + gold <= tiny_gold_value + has_trait = craven + has_trait = paranoid + } + } + } + } + + option = { # Leave + name = cultural_festival.2080.c + stress_impact = { + brave = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = trusting + } + } + } + } +} + +###################### +## Liege: Make a point of arresting performers on made-up allegations +## 2090 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2090_peasant = { + is_ai = yes + is_adult = yes + is_landed_or_landless_administrative = no + is_lowborn = yes + is_councillor = no + NOT = { is_courtier_of = root } +} + +scripted_trigger cultural_festival_2090_faction = { + exists = yes + NOT = { exists = faction_war } + faction_is_type = peasant_faction + faction_leader ?= { + location = root.location + } +} + +cultural_festival.2090 = { + type = activity_event + title = cultural_festival.2090.t + desc = cultural_festival.2090.desc + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:arrested_performer + animation = fear + } + lower_right_portrait = { + trigger = { exists = scope:faction_leader_scope } + character = scope:faction_leader_scope + } + + trigger = { + OR = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + has_trait = callous + has_trait = sadistic + dread >= high_dread + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + modifier = { + factor = 2 + any_targeting_faction = { + faction_type = peasant_faction + exists = yes + NOT = { exists = faction_war } + } + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + cultural_festival_2090_peasant = yes + } + } + random_pool_character = { + province = root.location + limit = { cultural_festival_2090_peasant = yes } + save_scope_as = arrested_performer + } + } + else = { + create_character = { + template = generic_peasant_character + location = root.location + dynasty = none + culture = root.location.culture + faith = root.location.faith + save_scope_as = arrested_performer + } + } + if = { + limit = { + any_targeting_faction = { + cultural_festival_2090_faction = yes + } + } + random_targeting_faction = { + limit = { cultural_festival_2090_faction = yes } + save_scope_as = faction_scope + faction_leader = { save_scope_as = faction_leader_scope } + } + } + } + + option = { # Arrest them + name = cultural_festival.2090.a + scope:activity = { + add_activity_log_entry = { + key = arrested_performers_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + add_dread = medium_dread_gain + scope:cultural_festival_scope = { #lose popular opinion + add_county_modifier = { + modifier = festival_arrested_artists + years = 5 + } + } + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + else = { + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # They're actually factioning against you + name = cultural_festival.2090.b + trigger = { + any_targeting_faction = { + cultural_festival_2090_faction = yes + } + } + scope:activity = { + add_activity_log_entry = { + key = arrested_faction_leader_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + rightfully_imprison_character_effect = { + TARGET = scope:faction_leader_scope + IMPRISONER = root + } + scope:faction_leader_scope = { + leave_faction_with_cooldown_effect = { + FACTION = scope:faction_scope + YEARS = 10 + } + } + scope:cultural_festival_scope = { #lose popular opinion + add_county_modifier = { + modifier = festival_arrested_artists + years = 5 + } + } + if = { + limit = { + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + else = { + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # Nahh + name = cultural_festival.2090.c + add_dread = minor_dread_loss + scope:cultural_festival_scope = { #get popular opinion + add_county_modifier = { + modifier = festival_no_prisoners + years = 5 + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + } +} + +###################### +## Liege: You see a guild contributing to the festival +## 2100 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_2100_courtier = { + is_ai = yes + is_adult = yes + is_courtier_of = root +} + +cultural_festival.2100 = { + type = activity_event + title = cultural_festival.2100.t + desc = cultural_festival.2100.desc + + theme = cultural_festival + cooldown = { years = 2 } + + override_background = { reference = market } + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:inspired_courtier + animation = admiration + } + + trigger = { + scope:activity = { + any_attending_character = { + cultural_festival_2100_courtier = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + } + + immediate = { + location = { save_scope_as = guild_location } + scope:activity = { + random_attending_character = { + limit = { cultural_festival_2100_courtier = yes } + weight = { + base = 1 + modifier = { + add = 5 + has_any_good_relationship_with_root_trigger = yes #someone you potentially care about + } + modifier = { + add = 2 + has_any_high_skill_rating = no #someone we can make useful + } + modifier = { + add = -2 + is_councillor = yes + } + } + save_scope_as = inspired_courtier + } + } + } + + option = { # Support them + name = cultural_festival.2100.a + remove_short_term_gold = { + value = medium_gold_value + max = 100 + } + location.county = { + change_development_progress = medium_development_progress_gain + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = ambitious + } + NOT = { can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } } + } + } + } + + option = { # You get inspired + name = cultural_festival.2100.b + add_character_modifier = { + modifier = discounted_guild_holding_build_cost_modifier + years = 10 + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # Courtier gets inspired + name = cultural_festival.2100.c + scope:inspired_courtier = { + duel = { + skill = stewardship + value = high_skill_rating + 50 = { #they get the trait + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = cultural_festival.2100.c.success + root = { + send_interface_toast = { + title = cultural_festival.2100.c.success + left_icon = scope:inspired_courtier + scope:inspired_courtier = { add_trait = architect } + } + } + } + 50 = { #they improve their skills + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = cultural_festival.2100.c.failure + root = { + send_interface_toast = { + title = cultural_festival.2100.c.failure + left_icon = scope:inspired_courtier + scope:inspired_courtier = { add_stewardship_skill = 2 } + } + } + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + } +} + +###################### +## Liege: A puppy disrupts the performance +## 2110 +## by Veronica Pazos +###################### + +cultural_festival.2110 = { + type = activity_event + title = cultural_festival.2110.t + desc = { + desc = cultural_festival.2110.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + desc = cultural_festival.2110.desc.callous + } + } + desc = cultural_festival.2110.desc.outro + } + + theme = cultural_festival + cooldown = { years = 2 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = dismissal + } + animation = personality_compassionate + } + lower_right_portrait = { + trigger = { exists = scope:my_heir } + character = scope:my_heir + } + + trigger = { + NOT = { any_owned_story = { type = story_cycle_pet_dog } } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = compassionate + } + } + + immediate = { + if = { + limit = { + any_child = { + is_adult = no + is_ai = yes + } + } + random_child = { + limit = { + is_adult = no + is_ai = yes + } + save_scope_as = my_heir + } + } + } + + option = { # Adopt!!! + name = cultural_festival.2110.a + scope:activity = { + add_activity_log_entry = { + key = adopted_a_puppy_log + tags = { good } + character = scope:visiting_liege + root = { + start_dog_story_cycle_effect = yes + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = ambitious + } + NOT = { can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } } + } + } + } + + option = { # Get it for your heir + name = cultural_festival.2110.b + trigger = { + exists = scope:my_heir + } + if = { + limit = { + NOT = { has_relation_friend = scope:my_heir } + } + set_relation_friend = { + target = scope:my_heir + reason = friend_festival_puppy + } + } + else = { + add_opinion = { + target = scope:my_heir + modifier = grateful_opinion + opinion = 20 + } + } + scope:my_heir = { + start_dog_story_cycle_effect = yes + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # Pet the dog! Pet the dog! + name = cultural_festival.2110.c + trigger = { + has_activity_intent = reduce_stress_intent + } + custom_tooltip = available_because_intent_tt + stress_impact = { + base = major_stress_impact_loss #your reward + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } + + option = { # Kick the dog + name = cultural_festival.2110.d + custom_tooltip = cultural_festival_2110_d_tt + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + scope:activity = { + every_attending_character = { + custom = cultural_festival_2110_d_opinion_tt + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -5 + } + } + } + random = { + chance = 10 + increase_wounds_effect = { REASON = wild_animal } + } + stress_impact = { + base = major_stress_impact_loss #your reward + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { # Ignore + name = cultural_festival.2110.e + add_prestige = miniscule_prestige_gain #you maintain your composure + stress_impact = { + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = cynical + } + } + } + } +} + +##################################################################################### + +###################### +## Bilateral Events +## 3000-3999 +## by Veronica Pazos +###################### + +###################### +## Bilateral: Big play based on liege +## 3000-3002 +## by Veronica Pazos +###################### + +# Vassal: Do you want to make a big play based on your visiting liege? +cultural_festival.3000 = { + type = activity_event + title = cultural_festival.3000.t + desc = cultural_festival.3000.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = admiration + } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + scope:visiting_liege = { + can_receieve_good_available_compliment_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = lifestyle_poet #you're interested in theatre kinda + } + } + + option = { # I sure do! + name = cultural_festival.3000.a + custom_tooltip = cultural_festival.3000.a.tt + remove_treasury_or_gold = medium_treasury_or_gold_value + trigger_event = { id = cultural_festival.3001 days = 3 } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + } + + option = { # Not really + name = cultural_festival.3000.b + stress_impact = { + generous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = gregarious + } + } + } + } +} + +# Vassal: Choose how to depict the liege +cultural_festival.3001 = { + type = activity_event + title = cultural_festival.3001.t + desc = cultural_festival.3001.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:liege_actor + animation = beg + } + + immediate = { + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:visiting_liege } + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:visiting_liege } + randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:visiting_liege } + create_character = { + age = { 20 50 } + location = root.location + random_traits = yes + faith = location.faith + culture = location.culture + dynasty = none + gender_female_chance = { + if = { + limit = { scope:visiting_liege = { is_female = yes } } + add = 100 + } + else = { + add = 0 + } + } + save_scope_as = liege_actor + } + } + + #Compassionate + option = { + trigger = { has_character_flag = available_compliment_compassionate } + name = cultural_festival.3001.compassionate + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = compassionate COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #bold + option = { + trigger = { has_character_flag = available_compliment_bold } + name = cultural_festival.3001.bold + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = bold COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #honorable + option = { + trigger = { has_character_flag = available_compliment_honorable } + name = cultural_festival.3001.honorable + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = honorable COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #greed + option = { + trigger = { has_character_flag = available_compliment_greedy } + name = cultural_festival.3001.greed + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = greed COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #rational + option = { + trigger = { has_character_flag = available_compliment_rational } + name = cultural_festival.3001.rational + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = rational COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #zealous + option = { + trigger = { has_character_flag = available_compliment_zealous } + name = cultural_festival.3001.zealous + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = zealous COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #energetic + option = { + trigger = { has_character_flag = available_compliment_energetic } + name = cultural_festival.3001.energetic + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = energetic COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #forgiving + option = { + trigger = { has_character_flag = available_compliment_forgiving } + name = cultural_festival.3001.forgiving + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = forgiving COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #beautiful + option = { + trigger = { has_character_flag = available_compliment_beautiful } + name = cultural_festival.3001.beautiful + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = beautiful COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #strong + option = { + trigger = { has_character_flag = available_compliment_strong } + name = cultural_festival.3001.strong + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = strong COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #extroverted + option = { + trigger = { has_character_flag = available_compliment_extroverted } + name = cultural_festival.3001.extroverted + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = extroverted COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + #dominant + option = { + trigger = { has_character_flag = available_compliment_dominant } + name = cultural_festival.3001.dominant + custom_tooltip = cultural_festival.3001.tt + hidden_effect = { + scope:visiting_liege = { evaluate_compliment_effect = { COMPLIMENT_TYPE = dominant COMPLIMENT_GIVER = root } } + } + ai_chance = { + base = 100 + } + } + + option = { # Represent them like a buffoon + name = cultural_festival.3001.negative + flavor = cultural_festival.3001.negative.flavor + add_character_modifier = { + modifier = dressed_liege_like_buffon_modifier + years = 5 + } + scope:visiting_liege = { set_variable = buffoon_costume_var } + stress_impact = { + craven = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = compassionate + } + } + modifier = { + factor = 2 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + after = { + clear_available_compliments_effect = yes + scope:visiting_liege = { trigger_event = { id = cultural_festival.3002 days = 3 } } + } +} + +scripted_effect cultural_festival.3002.add_hook = { + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.a.toast + left_icon = scope:visiting_liege + add_hook = { + target = root + type = favor_hook + } + } + } +} + +# Liege: You see the play +cultural_festival.3002 = { + type = activity_event + title = cultural_festival.3002.t + desc = { + desc = cultural_festival.3002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:good + } + desc = cultural_festival.3002.desc.good + } + triggered_desc = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:neutral + } + desc = cultural_festival.3002.desc.neutral + } + triggered_desc = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:bad + } + desc = cultural_festival.3002.desc.bad + } + triggered_desc = { + trigger = { + has_variable = buffoon_costume_var + } + desc = cultural_festival.3002.desc.buffoon + } + } + } + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:good + } + animation = admiration + } + triggered_animation = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:neutral + } + animation = personality_rational + } + triggered_animation = { + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:bad + } + animation = disgust + } + triggered_animation = { + trigger = { + has_variable = buffoon_costume_var + } + animation = anger + } + } + right_portrait = { + character = scope:liege_actor + animation = personality_honorable + triggered_outfit = { + trigger = { + root = { has_variable = buffoon_costume_var } + } + remove_default_outfit = yes + outfit_tags = { jester_outfit } + } + } + lower_center_portrait = scope:stop_host_scope + immediate = { + scope:liege_actor = { + add_character_flag = wear_armor + } + } + + option = { # Compliment is good, pay + name = cultural_festival.3002.a + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:good + } + scope:activity = { + add_activity_log_entry = { + key = enjoyed_good_play_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.a.toast + left_icon = scope:visiting_liege + root = { + add_opinion = { + modifier = grateful_opinion + target = scope:stop_host_scope + opinion = 50 + } + } + } + } + add_prestige = minor_prestige_gain + scope:stop_host_scope = { + every_held_county = { + add_county_modifier = { #everyone loves you + modifier = festival_good_play + years = 5 + } + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = humble + has_trait = paranoid + } + add = -50 + } + } + } + + option = { # Meh + name = cultural_festival.3002.b + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:neutral + } + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.b.toast + left_icon = scope:visiting_liege + root = { + add_opinion = { + modifier = grateful_opinion + target = scope:stop_host_scope + opinion = 10 + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.25 + has_trait = arrogant + } + } + } + + option = { # This is awful + name = cultural_festival.3002.c + trigger = { + exists = scope:compliment_outcome + scope:compliment_outcome = flag:bad + } + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.c.toast + left_icon = scope:visiting_liege + root = { + add_opinion = { + modifier = insulted_opinion + target = scope:stop_host_scope + opinion = -15 + } + } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { #everyone thinks you're kinda lame + modifier = festival_bad_play + years = 5 + } + } + stress_impact = { + base = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + + option = { # You're a buffoon + name = cultural_festival.3002.d + trigger = { + has_variable = buffoon_costume_var + } + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.3002.d.toast + left_icon = scope:visiting_liege + root = { + progress_towards_rival_effect = { + CHARACTER = scope:stop_host_scope + REASON = rival_buffoon_play + OPINION = -30 + } + } + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = humble + } + } + } + } + + option = { # I don't really care about this, but Im gonna pretend I do + name = cultural_festival.3002.e + trigger = { + exists = scope:compliment_outcome + NOT = { scope:compliment_outcome = flag:good } + scope:stop_host_scope = { + can_add_hook = { + target = root + type = favor_hook + } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { #everyone loves you, kinda + modifier = festival_neutral_play + years = 5 + } + } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + cultural_festival.3002.add_hook = yes + if = { + limit = { has_variable = buffoon_costume_var } + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + callous = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + arrogant = minor_stress_impact_gain #you actually care about this stuff + gregarious = minor_stress_impact_gain #you also care + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0.25 + OR = { + has_trait = arrogant + has_trait = gregarious + } + } + } + } + after = { + scope:liege_actor = { + remove_character_flag = wear_armor + } + } +} + +###################### +## Bilateral: Make a fountain run with wine +## 3010-3011 +## by Veronica Pazos +###################### + +# Vassal: Do you want to make your fountain run with wine? +cultural_festival.3010 = { + type = activity_event + title = cultural_festival.3010.t + desc = cultural_festival.3010.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = garden } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + scope:visiting_liege = { + drinks_alcohol_trigger = yes #you heard that they like this + NOT = { has_variable = fountain_event_var } #we set a 5 year cooldown for the liege too + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + any_child = { } + } + modifier = { + factor = 1.25 + OR = { + has_trait = gregarious + has_trait = drunkard + } + } + } + + option = { # I sure do! + name = cultural_festival.3010.a + scope:activity = { + add_activity_log_entry = { + key = wine_fountain_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + } + } + remove_short_term_gold = minor_gold_value + add_prestige = minor_prestige_gain + if = { + limit = { faith_forbids_alcohol_trigger = no } + hidden_effect = { + every_pool_character = { + province = root.location + limit = { drinks_alcohol_trigger = yes } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 5 + } + } + location = { + every_character_in_location = { #people love this + limit = { + drinks_alcohol_trigger = yes + this != root + } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 5 + } + } + } + } + location.county = { + holder = { + every_courtier = { + custom = custom.every_courtier + limit = { + location = root.location + faith_forbids_alcohol_trigger = no + } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 5 + } + } + } + add_county_modifier = { + modifier = alcohol_fountain_modifier + years = 5 + } + } + } + scope:visiting_liege = { + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 20 + } + set_variable = { + name = fountain_event_var + years = 5 + } + set_variable = alcohol_fountain_var + trigger_event = { id = cultural_festival.3011 days = 3 } + } + if = { + limit = { + has_trait = zealous + faith_forbids_alcohol_trigger = yes + } + add_stress = medium_stress_gain + } + stress_impact = { + greedy = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = temperate + short_term_gold < medium_gold_value + AND = { + has_trait = zealous + faith_forbids_alcohol_trigger = yes + } + } + } + } + } + + option = { # Maybe just juice? + name = cultural_festival.3010.b + scope:activity = { + add_activity_log_entry = { + key = juice_fountain_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + } + } + remove_short_term_gold = tiny_gold_value + if = { #if you have children they love this + limit = { + any_child = { + is_adult = no + count > 0 + } + } + every_child = { + limit = { is_adult = no } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 15 + } + } + } + location.county = { + add_county_modifier = { + modifier = juice_fountain_modifier + years = 5 + } + } + scope:visiting_liege = { + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 10 + } + set_variable = { + name = fountain_event_var + years = 5 + } + set_variable = juice_fountain_var + trigger_event = { id = cultural_festival.3011 days = 3 } + } + stress_impact = { + greedy = minor_stress_impact_gain + drunkard = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = greedy + } + modifier = { + factor = 0 + has_trait = drunkard + } + } + } + + option = { # Not really + name = cultural_festival.3010.c + stress_impact = { + avaricious = minor_stress_impact_gain #you want to climb the ladder + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = avaricious + has_trait = gregarious + } + } + } + } +} + +# Liege: You encounter this cool alcohol/juice fountain +cultural_festival.3011 = { + type = activity_event + title = cultural_festival.3011.t + desc = { + desc = cultural_festival.3011.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = alcohol_fountain_var + } + desc = cultural_festival.3011.desc.alcohol + } + triggered_desc = { + trigger = { + has_variable = juice_fountain_var + } + desc = cultural_festival.3011.desc.juice + } + } + desc = cultural_festival.3011.desc.outro + } + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = callous + } + } + animation = disbelief + } + animation = admiration + } + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + override_background = { reference = garden } + + option = { # drink together + name = cultural_festival.3011.a + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = drank_together_modifier + years = 5 + } + } + if = { + limit = { has_variable = alcohol_fountain_var } + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = temperate + } + } + } + } + + option = { # make a wish + name = cultural_festival.3011.b + add_character_modifier = { + modifier = festival_wishing_well_modifier + years = 5 + } + if = { + limit = { has_variable = alcohol_fountain_var } + stress_impact = { + cynical = minor_stress_impact_gain + drunkard = minor_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = drunkard + has_trait = cynical + } + } + } + } + + after = { + remove_variable = alcohol_fountain_var + remove_variable = juice_fountain_var + } +} + +###################### +## Bilateral: Host a lavish ceremony to make your vassal formally repledge homage to you +## 3020-3022 +## by Veronica Pazos +###################### + +# Liege: Do you want to host this ceremony? +cultural_festival.3020 = { + type = activity_event + title = cultural_festival.3020.t + desc = cultural_festival.3020.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + government_has_flag = government_is_feudal + is_available_in_activity_trigger = yes + scope:stop_host_scope = { is_ai = yes } + OR = { + can_add_hook = { + target = scope:stop_host_scope + type = loyalty_hook + } + scope:stop_host_scope = { vassal_contract_obligation_level_can_be_increased = feudal_government_taxes } + scope:stop_host_scope = { vassal_contract_obligation_level_can_be_increased = feudal_government_levies } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:stop_host_scope = { + subject_contract_is_blocked_from_modification = yes + } + } + modifier = { + factor = 2 + involved_activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + } + + option = { # I sure do! + name = cultural_festival.3020.a + custom_tooltip = cultural_festival.3020.a.tt + trigger_event = { id = cultural_festival.3021 days = 3 } + stress_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + } + } + + option = { # Let's just relax instead + name = cultural_festival.3020.b + scope:stop_host_scope = { + every_held_county = { + add_county_modifier = { + modifier = festival_no_homage_modifier + years = 5 + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = arrogant + } + } + } +} + +# Liege: What do you ask for? +cultural_festival.3021 = { + type = activity_event + title = cultural_festival.3021.t + desc = cultural_festival.3021.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_honorable + } + override_background = { reference = throne_room } + + option = { # Give me money + name = cultural_festival.3021.a + custom_tooltip = cultural_festival.3021.a.tt + trigger = { scope:stop_host_scope = { vassal_contract_obligation_level_can_be_increased = feudal_government_taxes } } + scope:activity = { + add_activity_log_entry = { + key = vassal_homage_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + scope:stop_host_scope = { + vassal_contract_increase_obligation_level = feudal_government_taxes + set_variable = homage_money_var + } + } + } + stress_impact = { + brave = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = greedy + } + } + } + + option = { # Give me levies + name = cultural_festival.3021.b + custom_tooltip = cultural_festival.3021.a.tt + trigger = { scope:stop_host_scope = { vassal_contract_obligation_level_can_be_increased = feudal_government_levies } } + scope:activity = { + add_activity_log_entry = { + key = vassal_homage_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + scope:stop_host_scope = { + vassal_contract_increase_obligation_level = feudal_government_levies + set_variable = homage_levies_var + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_lifestyle = martial_lifestyle + martial >= high_skill_rating + has_trait = brave + } + } + } + } + + option = { # Give me hook + name = cultural_festival.3021.c + flavor = cultural_festival.3021.c.flavor + trigger = { + can_add_hook = { + target = scope:stop_host_scope + type = loyalty_hook + } + } + scope:activity = { + add_activity_log_entry = { + key = vassal_homage_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + add_hook = { + target = scope:stop_host_scope + type = loyalty_hook + } + scope:stop_host_scope = { + set_subject_contract_modification_blocked = yes + set_variable = homage_hook_var + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.25 + OR = { + has_lifestyle = intrigue_lifestyle + intrigue >= high_skill_rating + has_trait = deceitful + } + } + } + } + + option = { # Let's be friends + name = cultural_festival.3021.d + scope:activity = { + add_activity_log_entry = { + key = vassal_homage_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + progress_towards_friend_effect = { + REASON = friend_homage_ceremony + CHARACTER = scope:stop_host_scope + OPINION = 50 + } + } + } + } + scope:stop_host_scope = { + set_variable = homage_friends_var + } + stress_impact = { + greedy = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = forgiving + } + } + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = greedy + has_trait = callous + has_trait = sadistic + } + } + } + } + + after = { + scope:stop_host_scope = { + trigger_event = { id = cultural_festival.3022 days = 3 } + } + } +} + +# Vassal: What do you think of this? + +scripted_effect cultural_festival.3022.vassal_contract_modified_effect = { + scope:visiting_liege = { + send_interface_toast = { + title = cultural_festival.3022.annoyed + left_icon = root + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = annoyed_opinion + opinion = -10 + } + } + } + } +} + +cultural_festival.3022 = { + type = activity_event + title = cultural_festival.3022.t + desc = { + desc = cultural_festival.3022.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = homage_friends_var + } + desc = cultural_festival.3022.desc.friends + } + triggered_desc = { + trigger = { + has_variable = homage_hook_var + } + desc = cultural_festival.3022.desc.hook + } + triggered_desc = { + trigger = { + has_variable = homage_levies_var + } + desc = cultural_festival.3022.desc.levies + } + triggered_desc = { + trigger = { + has_variable = homage_money_var + } + desc = cultural_festival.3022.desc.money + } + } + } + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_variable = homage_money_var + has_variable = homage_levies_var + has_variable = homage_hook_var + } + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = arrogant + } + } + animation = anger + } + triggered_animation = { + trigger = { + OR = { + has_variable = homage_money_var + has_variable = homage_levies_var + has_variable = homage_hook_var + } + } + animation = stress + } + animation = happiness + } + right_portrait = { + character = scope:visiting_liege + animation = personality_honorable + } + override_background = { reference = throne_room } + + option = { # You had to give money + name = cultural_festival.3022.a + custom_tooltip = cultural_festival.3022.money + trigger = { has_variable = homage_money_var } + cultural_festival.3022.vassal_contract_modified_effect = yes + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # You had to give levies + name = cultural_festival.3022.b + custom_tooltip = cultural_festival.3022.levies + trigger = { has_variable = homage_levies_var } + cultural_festival.3022.vassal_contract_modified_effect = yes + ai_chance = { + base = 100 + } + } + + option = { # You had to give a strong hook + name = cultural_festival.3022.a + custom_tooltip = cultural_festival.3022.hook + trigger = { has_variable = homage_hook_var } + cultural_festival.3022.vassal_contract_modified_effect = yes + stress_impact = { + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Friendship + name = cultural_festival.3022.d + trigger = { has_variable = homage_friends_var } + scope:visiting_liege = { + send_interface_toast = { + title = cultural_festival.3022.d.friends + left_icon = root + scope:stop_host_scope = { + progress_towards_friend_effect = { + REASON = friend_homage_ceremony + CHARACTER = scope:visiting_liege + OPINION = 50 + } + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { + remove_variable = homage_money_var + remove_variable = homage_levies_var + remove_variable = homage_hook_var + remove_variable = homage_friends_var + } +} + +###################### +## Bilateral: Crown the best pig/cow/local_farm_animal +## 3030-3031 +## by Veronica Pazos +###################### + +# Vassal: Do you want to set up a local_farm_animal contest? +cultural_festival.3030 = { + type = activity_event + title = cultural_festival.3030.t + desc = cultural_festival.3030.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:local_farmer + animation = happiness + } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + is_available_in_activity_trigger = yes + } + + immediate = { + scope:stop_host_scope = { select_local_farm_animal_effect = yes } #let's find the animal to judge + create_character = { + template = generic_peasant_character + location = root.location + dynasty = none + faith = root.faith + culture = root.culture + save_scope_as = local_farmer + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location.county = { + development_level <= bad_development_level + } + } + modifier = { + factor = 2 + location = { terrain = farmlands } + } + } + + option = { # I sure do! + name = cultural_festival.3030.a + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = farm_contest_modifier + years = 5 + } + } + scope:visiting_liege = { trigger_event = { id = cultural_festival.3031 days = 3 } } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain #you think this is stupid + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + } + + option = { # Nahhhh + name = cultural_festival.3030.b + remove_variable = local_farm_animal + stress_impact = { + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = gregarious + } + } + } + after = { + scope:local_farmer = { + silent_disappearance_ai_effect = yes + } + } +} + +# Liege: Crown the best local_farm_animal +cultural_festival.3031 = { + type = activity_event + title = cultural_festival.3031.t + desc = cultural_festival.3031.desc + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = cynical + } + } + animation = disbelief + } + animation = personality_rational + } + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + + immediate = { + location.culture = { save_scope_as = festival_culture_scope } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_relation_rival = root + can_set_relation_nemesis_trigger = { CHARACTER = root } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_relation_rival = root + can_set_relation_nemesis_trigger = { CHARACTER = root } + } + save_scope_as = farm_animal_rival + } + } + } + } + + option = { # This one - the liege's, but it's ugly + name = cultural_festival.3031.a + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 20 + } + } + add_character_modifier = { + modifier = underdog_animal_contest_modifier + years = 5 + } + stress_impact = { + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # This one - the favourite, but not the liege's + name = cultural_festival.3031.b + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = favourite_animal_contest_modifier + years = 10 + } + } + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # This one - the diff culture one + name = cultural_festival.3031.c + trigger = { + location.culture != root.culture #if the county culture is not your culture + } + culture = { + change_cultural_acceptance = { + target = scope:festival_culture_scope + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_farm_contest + } + } + scope:stop_host_scope = { #it's still not their animal + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # This is ridiculous + name = cultural_festival.3031.d + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = mocked_animal_fair_modifier + years = 10 + } + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = major_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { # If your rival is around, pick them as the best farm_animal + name = cultural_festival.3031.e + custom_tooltip = cultural_festival.3031.e.tt + trigger = { + scope:activity = { + any_attending_character = { + has_relation_rival = root + can_set_relation_nemesis_trigger = { CHARACTER = root } + } + } + } + #you become nemesis, this is highly humiliating + set_relation_nemesis = { + reason = nemesis_animal_contest + target = scope:farm_animal_rival + } + stress_impact = { + base = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = major_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = callous + has_trait = vengeful + } + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + after = { + remove_variable = local_farm_animal + if = { + limit = { + scope:stop_host_scope = { has_variable = local_farm_animal } + } + remove_variable = local_farm_animal + } + } +} + +###################### +## Bilateral: Sword in the stone +## 3040-3042 +## by Veronica Pazos +###################### + +# Vassal: Do you want to set up a sword in a stone +cultural_festival.3040 = { + type = activity_event + title = cultural_festival.3040.t + desc = cultural_festival.3040.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = cp:councillor_marshal + animation = disapproval + } + artifact = { + target = scope:sword_in_the_stone_scope + position = lower_center_portrait + } + override_background = { reference = courtyard } + cooldown = { years = 2 } + + trigger = { + is_landed_or_landless_administrative = yes + exists = cp:councillor_marshal + any_character_artifact = { #do you have an artifact that could be buried in a stone? + OR = { + artifact_type = axe + artifact_type = spear + artifact_type = dagger + artifact_type = sword + } + } + } + + immediate = { + cp:councillor_marshal = { save_scope_as = marshal } + random_character_artifact = { + limit = { + OR = { + artifact_type = axe + artifact_type = spear + artifact_type = dagger + artifact_type = sword + } + } + save_scope_as = sword_in_the_stone_scope + } + } + + weight_multiplier = { + base = 1 + modifier = { #more likely to happen if you actually have a sword + factor = 2 + any_character_artifact = { artifact_type = sword } + } + } + + option = { # I sure do! + name = cultural_festival.3040.a + flavor = cultural_festival.3040.flavor + custom_tooltip = cultural_festival.3040.a.tt + add_prestige = medium_prestige_gain #this is a really cool activity + scope:visiting_liege = { + trigger_event = { + id = cultural_festival.3041 + days = 3 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arrogant + } + } + } + } + + option = { # Nahhhh + name = cultural_festival.3040.b + stress_impact = { + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = gregarious + } + } + } +} + +# Liege: Do you want to take this sword out of the stone? +cultural_festival.3041 = { + type = activity_event + title = cultural_festival.3041.t + desc = cultural_festival.3041.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:stop_host_scope + animation = personality_bold + } + artifact = { + target = scope:sword_in_the_stone_scope + position = lower_center_portrait + } + + option = { # Try to get it out + name = cultural_festival.3041.a + trigger = { NOT = { has_trait = giant } } + duel = { + skill = prowess + value = high_skill_rating + 50 = { #you get the sword + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = cultural_festival.3041.a.success + send_interface_toast = { + title = cultural_festival.3041.a.success + left_icon = root + right_icon = scope:sword_in_the_stone_scope + scope:activity = { + add_activity_log_entry = { + key = got_sword_in_stone_log + tags = { good } + character = scope:visiting_liege + artifact = scope:sword_in_the_stone_scope + scope:sword_in_the_stone_scope = { + set_owner = root + if = { + limit = { + root = { + can_equip_artifact = scope:sword_in_the_stone_scope + } + } + equip_artifact_to_owner_replace = yes + } + } + root = { add_prestige = medium_prestige_gain } + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } + scope:stop_host_scope = { #we also send them a toast if you got the artifact + send_interface_toast = { + title = cultural_festival.3041.a.success.vassal + left_icon = scope:visiting_liege + right_icon = scope:sword_in_the_stone_scope + scope:visiting_liege = { #but they like you + add_opinion = { + target = scope:stop_host_scope + modifier = grateful_opinion + opinion = 20 + } + } + } + } + } + 50 = { #you can't make it + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = cultural_festival.3041.a.failure + send_interface_toast = { + title = cultural_festival.3041.a.failure + left_icon = root + right_icon = scope:sword_in_the_stone_scope + add_prestige = minor_prestige_loss + } + set_variable = couldnt_get_sword_var + scope:stop_host_scope = { + trigger_event = { + id = cultural_festival.3042 + days = 3 + } + } + } + } + stress_impact = { + weak = minor_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = weak + has_trait = content + has_trait = humble + } + } + } + } + + option = { # Let the host win + name = cultural_festival.3041.b + progress_towards_friend_effect = { + REASON = friend_sword_in_stone + CHARACTER = scope:stop_host_scope + OPINION = 15 + } + scope:stop_host_scope = { #now they get a chance to take it out + trigger_event = { + id = cultural_festival.3042 + days = 3 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + callous = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = callous + } + } + } + } + + option = { #You're a giant, you get this immediately + name = cultural_festival.3041.c + trigger = { has_trait = giant } + scope:sword_in_the_stone_scope = { + set_owner = root + if = { + limit = { + root = { + can_equip_artifact = scope:sword_in_the_stone_scope + } + } + equip_artifact_to_owner_replace = yes + } + } + add_prestige = minor_prestige_gain + if = { + limit = { + scope:activity = { + OR = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + scope:stop_host_scope = { #we also send them a toast if you got the artifact + send_interface_toast = { + title = cultural_festival.3041.a.success.vassal + left_icon = scope:visiting_liege + right_icon = scope:sword_in_the_stone_scope + scope:visiting_liege = { #but they like you + add_opinion = { + target = scope:stop_host_scope + modifier = grateful_opinion + opinion = 20 + } + } + } + } + } +} + +# Vassal: Do /you/ want to take the sword out? +cultural_festival.3042 = { + type = activity_event + title = cultural_festival.3042.t + desc = { + desc = cultural_festival.3042.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:visiting_liege = { has_variable = couldnt_get_sword_var } + } + desc = cultural_festival.3042.desc.failed + } + desc = cultural_festival.3042.desc.pretended + } + } + + theme = cultural_festival + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:visiting_liege + animation = admiration + } + artifact = { + target = scope:sword_in_the_stone_scope + position = lower_center_portrait + } + + option = { # Try to get it out + name = cultural_festival.3042.a + duel = { + skill = prowess + value = high_skill_rating + 50 = { #you get the sword + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = cultural_festival.3041.a.success #we can reuse the loc for this + send_interface_toast = { + title = cultural_festival.3041.a.success + left_icon = root + right_icon = scope:sword_in_the_stone_scope + add_prestige = medium_prestige_gain + } + } + 50 = { #you can't make it + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = cultural_festival.3041.a.failure + send_interface_toast = { + title = cultural_festival.3041.a.failure + left_icon = root + right_icon = scope:sword_in_the_stone_scope + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + weak = minor_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = weak + has_trait = content + has_trait = humble + } + } + } + } + + option = { # Ignore it + name = cultural_festival.3042.b + stress_impact = { + brave = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + } + } + } + } +} + +###################### +## Bilateral: Struggle to stay awake during a boring performance +## 3050-3051 +## by Veronica Pazos +###################### + +# Liege: Do you try to stay awake to not insult your host? +cultural_festival.3050 = { + type = activity_event + title = cultural_festival.3050.t + desc = cultural_festival.3050.desc + + theme = cultural_festival + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + cooldown = { years = 2 } + + trigger = { + #triggered by the monthly_pulse + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = impatient + } + } + + option = { # try + name = cultural_festival.3050.a + scope:stop_host_scope = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + scope:cultural_festival_scope = { #people also like this + add_county_modifier = { + modifier = festival_enjoyed_local_performance + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + base = minor_stress_impact_gain #this is kinda stressful to you + impatient = minor_stress_impact_gain #to make it major + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = impatient + } + } + } + + option = { # you don't even care + name = cultural_festival.3050.b + custom_tooltip = cultural_festival.3050.b.tt + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + hidden_effect = { + random_list = { + 60 = { #the host notices + modifier = { + add = 10 + scope:stop_host_scope = { + has_trait = deceitful #they know you're lying + } + } + scope:stop_host_scope = { trigger_event = { id = cultural_festival.3051 days = 3 } } + } + 40 = { #they don't notice + modifier = { + add = 15 + has_trait = deceitful + } + modifier = { + add = -10 + has_trait = honest + } + } + } + } + stress_impact = { + base = medium_stress_impact_loss + shy = minor_stress_impact_gain + honest = minor_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = honest + has_trait = patient + } + } + } + } +} + +# Vassal: You notice liege falling asleep +cultural_festival.3051 = { + type = activity_event + title = cultural_festival.3051.t + desc = cultural_festival.3051.desc + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = vengeful + } + } + animation = rage + } + animation = disbelief + } + right_portrait = { + character = scope:visiting_liege + animation = boredom + } + + option = { # b r u h + name = cultural_festival.3051.a + scope:visiting_liege = { + send_interface_toast = { + title = cultural_festival.3051.a.toast + left_icon = scope:stop_host_scope + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = insult_opinion + opinion = -15 + } + } + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = impatient + } + } + } + } + + option = { # I kinda get it + name = cultural_festival.3051.b + stress_impact = { #you get stressed + base = minor_stress_impact_gain + humble = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = patient + } + } + } + } +} + +###################### +## Bilateral: Take someone to dance +## 3060-3061 +## by Veronica Pazos +###################### + +scripted_trigger cultural_festival_3060_valid_pool_character = { + is_available_ai_adult = yes + is_attracted_to_gender_of = root + root = { is_attracted_to_gender_of = prev } +} + +# Liege: Do you wanna dance with your spouse or with the vassal's? +cultural_festival.3060 = { + type = activity_event + title = cultural_festival.3060.t + desc = { + desc = cultural_festival.3060.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:my_spouse + } + desc = cultural_festival.3060.desc.spouse + } + triggered_desc = { + trigger = { + exists = scope:vassal_spouse + } + desc = cultural_festival.3060.desc.vassal + } + } + } + + theme = cultural_festival + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:my_spouse + animation = happiness + trigger = { exists = scope:my_spouse } + } + lower_center_portrait = { + character = scope:stop_host_scope + trigger = { #they'll only be there if you're trying to dance with their spouse + exists = scope:vassal_spouse + scope:stop_host_scope != scope:my_spouse + } + } + lower_right_portrait = { + character = scope:vassal_spouse + trigger = { + exists = scope:vassal_spouse + scope:vassal_spouse != root + } + } + + cooldown = { years = 2 } + + trigger = { + OR = { # Only for adults and teenagers + is_adult = yes + # Pre-pubescent children are considered asexual, but adult asexuals should be allowed to get this event + NOT = { has_sexuality = asexual } + } + OR = { + scope:stop_host_scope = { #Host has a spouse in our location + any_spouse = { + location = root.location + } + } + any_spouse = { #Our own spouse is in this location + location = root.location + } + } + } + + immediate = { + random_spouse = { #if your spouse is here we grab them + limit = { location = root.location } + save_scope_as = my_spouse + } + scope:stop_host_scope = { #Host has a spouse in our location + random_spouse = { + limit = { + location = root.location + } + save_scope_as = vassal_spouse + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + any_spouse = { #Our own spouse is in this location + location = root.location + } + } + modifier = { + factor = 2 + scope:stop_host_scope = { + any_spouse = { + location = root.location + } + } + } + } + + option = { # I wanna dance with my spouse, obviously + name = cultural_festival.3060.a + trigger = { + exists = scope:my_spouse + } + scope:my_spouse = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 20 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + base = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + loyal = medium_stress_impact_loss + lazy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = callous + } + } + } + } + + option = { # I wanna dance with YOUR spouse, obviously + name = cultural_festival.3060.b + trigger = { + exists = scope:vassal_spouse + scope:vassal_spouse != root + } + custom_tooltip = cultural_festival.3060.b.tt + if = { + limit = { + NOR = { + has_trait = celibate + has_trait = chaste + } + } + duel = { + target = scope:vassal_spouse + skill = diplomacy + 50 = { + desc = cultural_festival.3060.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:vassal_spouse = { + OR = { + has_trait = lustful + has_trait = seducer + } + } + factor = 2 + } + modifier = { + OR = { + has_trait = lustful + has_trait = seducer + } + factor = 2 + } + send_interface_toast = { + title = cultural_festival.3060.b.success + left_icon = scope:vassal_spouse + progress_towards_lover_effect = { + CHARACTER = scope:vassal_spouse + REASON = lover_festival_dancing + OPINION = 5 + } + } + } + 50 = { + desc = cultural_festival.3060.b.failure + #nothing happens + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:vassal_spouse = { + OR = { + has_trait = celibate + has_trait = chaste + } + } + factor = 3 + } + send_interface_toast = { + title = cultural_festival.3060.b.failure + left_icon = scope:vassal_spouse + } + } + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + hidden_effect = { + scope:stop_host_scope = { trigger_event = { id = cultural_festival.3061 days = 3 } } + } + stress_impact = { + lustful = minor_stress_impact_loss + seducer = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = loyal + } + } + } + + option = { # I wanna dance with all the locals + name = cultural_festival.3060.c + trigger = { #if one of the spouses doesn't exist, we open this option + OR = { + NOT = { exists = scope:my_spouse } + NOT = { exists = scope:vassal_spouse } + } + } + if = { + limit = { exists = scope:my_spouse } + scope:my_spouse = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_danced_with_local_modifier + years = 5 + } + } + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_majesty + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + stress_impact = { + base = minor_stress_impact_loss + lazy = minor_stress_impact_gain + callous = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = loyal + has_trait = lazy + has_trait = callous + } + } + } + } + + option = { # I hate dancing + name = cultural_festival.3060.d + add_dread = minor_dread_gain + if = { + limit = { + scope:activity = { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 2 } + } + stress_impact = { + lazy = minor_stress_impact_loss + callous = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + seducer = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = lazy + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = seducer + } + } + } + } +} + +# Vassal: Your liege has chosen your spouse for a dance +cultural_festival.3061 = { + type = activity_event + title = cultural_festival.3061.t + desc = { + desc = cultural_festival.3060.desc.intro #we reuse the intro + desc = cultural_festival.3061.desc + } + + theme = cultural_festival + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:visiting_liege + animation = flirtation + } + lower_center_portrait = scope:vassal_spouse + + option = { # How dare they???? + name = cultural_festival.3061.a + scope:visiting_liege = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + send_interface_toast = { + title = cultural_festival.3061.a.toast + left_icon = scope:stop_host_scope + scope:stop_host_scope = { + progress_towards_rival_effect = { + CHARACTER = scope:visiting_liege + REASON = rival_danced_with_spouse + OPINION = 0 + } + } + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = forgiving + } + } + } + + option = { # Who wouldn't! + name = cultural_festival.3061.b + add_character_modifier = { + modifier = festival_flattered_spouse_modifier + years = 5 + } + scope:vassal_spouse = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + has_trait = wrathful + has_trait = callous + } + } + } + } +} + +###################### +## Bilateral: Hold a Feast of Fools-esque ceremony +## 3070-3071 +## by Veronica Pazos +###################### + +scripted_effect cultural_festival.3070.bishop_angry_effect = { + if = { + limit = { + scope:bishop = { + NOR = { + has_trait = cynical + has_trait = gregarious + } + } + } + scope:bishop = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + } +} + +# Vassal: Do you want to hold a Feast of Fools? +cultural_festival.3070 = { + type = activity_event + title = cultural_festival.3070.t + desc = cultural_festival.3070.desc + + theme = cultural_festival + override_background = { reference = courtyard } + left_portrait = { + character = root + animation = personality_rational + } + lower_right_portrait = scope:rival_jester + lower_center_portrait = scope:sinful_jester + lower_left_portrait = { + trigger = { + exists = scope:bishop + scope:bishop = { + NOR = { + has_trait = cynical + has_trait = gregarious + } + } + } + character = scope:bishop + } + cooldown = { years = 2 } + + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } #this is a deeply Christian thing + location = { + any_character_in_location = { + this != scope:visiting_liege + num_sinful_traits >= 1 + is_adult = yes + save_temporary_scope_as = jester_1 + } + any_character_in_location = { + this != scope:jester_1 + this != scope:visiting_liege + OR = { + has_relation_potential_rival = root + has_relation_rival = root + has_relation_nemesis = root + root = { + opinion = { + target = prev #the character + value < 0 + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + location = { + any_character_in_location = { + OR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + } + } + modifier = { + factor = 2 + location = { + any_character_in_location = { + has_relation_nemesis = root + } + } + } + modifier = { + government_has_flag = government_is_theocracy + NOR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + } + factor = 0.1 + } + } + + immediate = { + if = { #if you have a nemesis here, we pick them + limit = { + location = { + any_character_in_location = { + this != scope:visiting_liege + has_relation_nemesis = root + } + } + } + location = { + random_character_in_location = { + limit = { + this != scope:visiting_liege + has_relation_nemesis = root + } + save_scope_as = rival_jester + } + } + } + else_if = { #if you have a rival here, we pick them + limit = { + location = { + any_character_in_location = { + this != scope:visiting_liege + has_relation_rival = root + } + } + } + location = { + random_character_in_location = { + limit = { + this != scope:visiting_liege + has_relation_rival = root + } + save_scope_as = rival_jester + } + } + } + else_if = { #if you have a potential rival here, we pick them + limit = { + location = { + any_character_in_location = { + this != scope:visiting_liege + has_relation_potential_rival = root + } + } + } + location = { + random_character_in_location = { + limit = { + this != scope:visiting_liege + has_relation_potential_rival = root + } + save_scope_as = rival_jester + } + } + } + else = { #we grab someone that you dislike + location = { + random_character_in_location = { + limit = { + this != scope:visiting_liege + root = { + opinion = { + target = prev #the character + value < 0 + } + } + } + weight = { + base = 100 + modifier = { + add = 100 + is_powerful_vassal = yes + } + } + save_scope_as = rival_jester + } + } + } + location = { + random_character_in_location = { + limit = { + num_sinful_traits >= 1 + is_adult = yes + this != scope:rival_jester + this != scope:visiting_liege + } + save_scope_as = sinful_jester + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + } + + option = { # pick someone you dislike + name = cultural_festival.3070.a + if = { #become potential rivals + limit = { + scope:rival_jester = { + NOR = { + has_relation_potential_rival = root + has_relation_rival = root + has_relation_nemesis = root + } + } + } + scope:rival_jester = { + set_relation_potential_rival = { + target = root + reason = rival_feast_of_fools + } + } + } + else_if = { #become rivals if potential rivals + limit = { + scope:rival_jester = { + has_relation_potential_rival = root + } + } + scope:rival_jester = { + set_relation_rival = { + target = root + reason = rival_feast_of_fools + } + } + } + else_if = { #become nemesis if rivals + limit = { + scope:rival_jester = { + has_relation_rival = root + } + } + scope:rival_jester = { + set_relation_nemesis = { + target = root + reason = rival_feast_of_fools + } + } + } + else = { #they get hostile scheme power against you if nemesis + scope:rival_jester = { + set_variable = { + name = festival_nemesis_fool_var + value = scope:stop_host_scope + } + } + } + scope:rival_jester = { + if = { + limit = { is_male = no } + give_nickname = nick_monarch_of_fools + } + else = { + give_nickname = nick_monarch_of_fools_masc + } + add_character_modifier = { #attraction malus + modifier = festival_king_of_fools_modifier + years = 10 + } + save_scope_as = final_jester + } + every_held_county = { + add_county_modifier = { + modifier = festival_feast_of_fools_county_modifier + years = 5 + } + } + add_piety = minor_piety_loss + cultural_festival.3070.bishop_angry_effect = yes + scope:visiting_liege = { trigger_event = { id = cultural_festival.3071 days = 3 } } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + option = { # pick someone with a sinful trait + name = cultural_festival.3070.b + if = { # become potential rivals + limit = { + scope:sinful_jester = { + NOR = { + has_relation_potential_rival = root + has_relation_rival = root + has_relation_nemesis = root + } + } + } + scope:sinful_jester = { + set_relation_potential_rival = { + target = root + reason = rival_feast_of_fools + } + } + } + else = { + scope:sinful_jester = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -20 + } + } + } + scope:sinful_jester = { + if = { + limit = { is_male = no } + give_nickname = nick_monarch_of_fools + } + else = { + give_nickname = nick_monarch_of_fools_masc + } + add_character_modifier = { #attraction malus + modifier = festival_king_of_fools_modifier + years = 10 + } + save_scope_as = final_jester + } + every_held_county = { + add_county_modifier = { + modifier = festival_feast_of_fools_county_modifier + years = 5 + } + } + add_piety = minor_piety_loss + #bishop doesn't really care that much since they're sinful + scope:visiting_liege = { trigger_event = { id = cultural_festival.3071 days = 3 } } + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + option = { # pick the liege + name = cultural_festival.3070.c + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + dread >= high_dread + } + opinion = { # you don't super like this person + target = liege + value <= 10 + } + can_set_relation_rival_trigger = { CHARACTER = scope:visiting_liege } + } + if = { + limit = { + scope:visiting_liege = { is_ai = yes } + } + set_relation_rival = { + target = scope:visiting_liege + reason = rival_feast_of_fools + } + } + every_held_county = { + add_county_modifier = { + modifier = festival_feast_of_fools_county_modifier + years = 5 + } + } + add_piety = minor_piety_loss + cultural_festival.3070.bishop_angry_effect = yes + scope:visiting_liege = { + save_scope_as = final_jester + set_variable = im_the_jester_var + trigger_event = { id = cultural_festival.3071 days = 3 } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = loyal + } + } + modifier = { + factor = 2 + has_trait = callous + opinion = { + target = liege + value <= 0 + } + } + } + } + + option = { # absolutely not + name = cultural_festival.3070.d + add_piety = minor_piety_gain + if = { + limit = { + scope:bishop = { + NOR = { + has_trait = cynical + has_trait = gregarious + } + } + } + scope:bishop = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = vengeful + } + } + } + } +} + +# Liege: You observe a Feast of Fools +cultural_festival.3071 = { + type = activity_event + title = cultural_festival.3071.t + desc = { + desc = cultural_festival.3071.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = im_the_jester_var + } + desc = cultural_festival.3071.desc_jester + } + desc = cultural_festival.3071.desc_fallback + } + } + + theme = cultural_festival + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_variable = im_the_jester_var + NOR = { + has_trait = compassionate + has_trait = forgiving + has_trait = gregarious + has_trait = lifestyle_reveler + } + } + animation = anger + } + animation = happiness + } + right_portrait = { + trigger = { + root != scope:final_jester + } + character = scope:final_jester + triggered_animation = { + trigger = { + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + } + animation = anger + } + animation = boredom + outfit_tags = { jester_outfit } + } + lower_center_portrait = scope:stop_host_scope + + option = { # great stuff + name = cultural_festival.3071.a + scope:activity = { + add_activity_log_entry = { + key = festival_of_fools_log + tags = { good } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { #cultural acceptance if you're not the same culture + limit = { + scope:stop_host_scope.culture != root.culture + } + root.culture = { + change_cultural_acceptance = { + target = scope:stop_host_scope.culture + value = major_cultural_acceptance_gain + desc = cultural_acceptance_feast_of_fools + } + } + } + else = { #popular opinion + scope:stop_host_scope = { + every_held_county = { + add_county_modifier = { + modifier = festival_feast_of_fools_county_modifier + years = 10 + } + } + } + } + add_piety = medium_piety_loss + } + } + } + stress_impact = { + base = minor_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + diligent = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = diligent + } + } + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { # blasphemous + name = cultural_festival.3071.b + add_piety = medium_piety_gain + if = { #if your priest is with you they like this + limit = { + current_travel_plan = { + any_entourage_character = { + has_council_position = councillor_court_chaplain + } + } + } + current_travel_plan = { + random_entourage_character = { + limit = { + has_council_position = councillor_court_chaplain + } + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + } + } + stress_impact = { + cynical = minor_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = lifestyle_reveler + has_trait = gregarious + } + } + } + } + + option = { # hire the guy + name = cultural_festival.3071.c + trigger = { + root != scope:final_jester + can_appoint_char_to_court_position = { + CHAR = scope:final_jester + COURT_POS = court_jester_court_position + } + } + scope:final_jester = { set_variable = king_of_fools_var } #75% discount forever + recruit_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:final_jester + NEW_COURT_OWNER = root + } + court_position_grant_effect = { + POS = court_jester + CANDIDATE = scope:final_jester + EMPLOYER = root + } + stress_impact = { + avaricious = minor_stress_impact_gain + greedy = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = avaricious + has_trait = greedy + has_trait = zealous + } + } + } + } + + option = { # how dare you??? + name = cultural_festival.3071.d + trigger = { + root = scope:final_jester + } + scope:activity = { + add_activity_log_entry = { + key = festival_of_fools_bad_log + tags = { bad } + character = scope:visiting_liege + target = scope:stop_host_scope + root = { + if = { + limit = { #if you're rivals but not nemesis become nemesis + has_relation_rival = scope:stop_host_scope + NOT = { has_relation_nemesis = scope:stop_host_scope} + } + set_relation_nemesis = { + target = scope:stop_host_scope + reason = rival_feast_of_fools + } + } + else = { + set_relation_rival = { + target = scope:stop_host_scope + reason = rival_feast_of_fools + } + } + } + } + } + stress_impact = { + base = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + calm = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = calm + has_trait = forgiving + } + } + } + } +} + +###################### +## Liege: You end up in a conversation in a language you don't know +## 4000 +## by Arkadiusz Majewski +###################### + +scripted_trigger unknown_language_character_trigger = { #pick someone you don't understand + is_physically_able_ai_adult = yes + culture = location.county.culture + NOT = { knows_language_of_culture = scope:visiting_liege.culture } +} + +scripted_trigger bilingual_character_trigger = { #pick someone that can understand both of you + is_physically_able_ai_adult = yes + knows_language_of_culture = scope:visiting_liege.culture + knows_language_of_culture = scope:local_character_scope.culture + NOT = { has_any_relation_trigger = { CHARACTER = scope:stop_host_scope } } +} + +cultural_festival.4000 = { #Liege: You end up in a conversation in a language you don't know + type = activity_event + title = cultural_festival.4000.t + desc = cultural_festival.4000.desc + + theme = cultural_festival + + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:local_translator_scope + animation = worry + } + center_portrait = { + character = scope:local_character_scope + animation = disbelief + } + + cooldown = { years = 5 } + + trigger = { #look for a character that you don't understand + scope:stop_host_scope = { + any_courtier_or_guest = { + unknown_language_character_trigger = yes + save_temporary_scope_as = unknown_language_character_scope + } + } + NOT = { knows_language_of_culture = scope:unknown_language_character_scope.culture } + } + + immediate = { + scope:stop_host_scope = { + random_courtier_or_guest = { #pick someone you don't understand + limit = { + unknown_language_character_trigger = yes + } + save_scope_as = local_character_scope + } + } + if = { + limit = { + scope:stop_host_scope = { + any_courtier_or_guest = { + bilingual_character_trigger = yes + } + } + } + scope:stop_host_scope = { + random_courtier_or_guest = { #pick someone that can understand both of you in vassals court + limit = { + bilingual_character_trigger = yes + } + save_scope_as = local_translator_scope + } + } + } + else_if = { #if above fails, pick someone that can understand both of you in your entourage + limit = { + current_travel_plan = { + any_entourage_character = { + bilingual_character_trigger = yes + } + } + } + current_travel_plan = { + random_entourage_character = { + limit = { + bilingual_character_trigger = yes + } + save_scope_as = local_translator_scope + } + } + } + else = { #if above still fails, just create them + create_character = { + template = scholar_character + location = scope:stop_host_scope.location + faith = location.county.faith + culture = location.county.culture + dynasty = none + save_scope_as = local_translator_scope + } + hidden_effect = { + scope:local_translator_scope = { + learn_language_of_culture = root.culture + } + } + } + } + + option = { #hire one of them as a translator + name = cultural_festival.4000.a + add_character_modifier = { #gain bonus to learning languages + modifier = interpreter_option_modifier + years = 5 + } + pay_short_term_gold = { #pay them to join + target = scope:local_translator_scope + gold = minor_gold_value + } + if = { #recruit them to court if you can + limit = { + scope:local_translator_scope = { + NOT = { + is_courtier_of = scope:visiting_liege + } + } + } + scope:local_translator_scope = { + add_to_court_and_entourage_effect = yes + } + } + scope:cultural_festival_scope = { #gain popular opinion + add_county_modifier = { + modifier = appreciated_culture_modifier + years = 5 + } + } + stress_impact = { + ambitious = minor_stress_impact_loss + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = lazy + short_term_gold < minor_gold_value + } + } + } + } + option = { #pretend to understand the convesation + name = cultural_festival.4000.b + duel = { + skill = intrigue + target = scope:local_translator_scope + 50 = { + desc = cultural_festival.4000.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = cultural_festival.4000.b.success + left_icon = scope:local_translator_scope + scope:cultural_festival_scope = { #gain popular opinion + add_county_modifier = { + modifier = appreciated_culture_modifier + years = 5 + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + 50 = { + desc = cultural_festival.4000.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = cultural_festival.4000.b.failure + left_icon = scope:local_translator_scope + scope:cultural_festival_scope = { #lose popular opinion + add_county_modifier = { + modifier = no_culture_modifier + years = 5 + } + } + } + } + } + stress_impact = { + deceitful = medium_stress_impact_loss + shy = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = craven + } + } + } + } + option = { #go away + name = cultural_festival.4000.c + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_loss + craven = minor_stress_impact_loss + brave = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = brave + } + } + } + } +} + +###################### +## Bilateral: Your courtier made a cultural faux pas +## 4100 +## by Arkadiusz Majewski +###################### + +cultural_festival.4100 = { #Your courtier made a cultural faux pas + type = activity_event + title = cultural_festival.4100.t + desc = cultural_festival.4100.desc + + theme = cultural_festival + + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:offended_character_scope + animation = shock + } + center_portrait = { + character = scope:inconsiderate_character_scope + animation = fear + } + + cooldown = { years = 5 } + + trigger = { + OR = { + AND = { + root = scope:visiting_liege + any_courtier_or_guest = { #find someone in your court that could commit a faux pas + age > 5 + culture != scope:stop_host_scope.culture + } + } + AND = { + root = scope:stop_host_scope + any_courtier_or_guest = { #find someone in your court that could commit a faux pas + age > 5 + culture != scope:visiting_liege.culture + } + } + } + } + + immediate = { + if = { #set who is offended by the faux pas, either liege or vassal + limit = { + root = scope:visiting_liege + } + scope:stop_host_scope = { + save_scope_as = offended_character_scope + } + } + else = { + scope:visiting_liege = { + save_scope_as = offended_character_scope + } + } + random_courtier_or_guest = { #find someone in your court that could commit a faux pas + limit = { + age > 5 + culture != scope:offended_character_scope.culture + } + save_scope_as = inconsiderate_character_scope + } + scope:offended_character_scope = { + add_opinion = { + target = scope:inconsiderate_character_scope + modifier = insult_opinion + opinion = -20 + } + } + } + + option = { #try to convince everyone it's just a misunderstanding using diplomacy skill + name = cultural_festival.4100.a + duel = { + skill = diplomacy + target = scope:offended_character_scope + 50 = { #on success gain opinion with both characters; gain cultural acceptance and increase tour success + desc = cultural_festival.4100.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + factor = 2 + has_activity_intent = altruism_intent + } + send_interface_toast = { + title = cultural_festival.4100.a.success + left_icon = scope:offended_character_scope + scope:inconsiderate_character_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + scope:offended_character_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + if = { + limit = { root.culture != scope:offended_character_scope.culture } + root.culture = { + change_cultural_acceptance = { + target = scope:offended_character_scope.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + if = { + limit = { root = scope:visiting_liege } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + 50 = { #on fail gain opinion with offender, but lose with offended; lose cultural acceptance and decrease tour success + desc = cultural_festival.4100.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = cultural_festival.4100.a.failure + left_icon = scope:offended_character_scope + scope:inconsiderate_character_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + scope:offended_character_scope = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -10 + } + } + if = { + limit = { root.culture != scope:offended_character_scope.culture } + root.culture = { + change_cultural_acceptance = { + target = scope:offended_character_scope.culture + value = miniscule_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + honest = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = compassionate + has_trait = honest + } + modifier = { + add = -20 + has_trait = callous + } + } + } + + option = { #make the offender pay for their mistakes, gain opinion with offended + name = cultural_festival.4100.b + scope:inconsiderate_character_scope = { + add_opinion = { + target = root + modifier = shamed_me_opinion + opinion = -20 + } + pay_short_term_gold = { + target = scope:offended_character_scope + gold = minor_gold_value + } + } + scope:offended_character_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + vengeful = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + factor = 10 + has_relation_rival = scope:inconsiderate_character_scope + has_relation_nemesis = scope:inconsiderate_character_scope + } + modifier = { + add = 10 + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + modifier = { + add = -20 + has_trait = compassionate + } + } + } + + option = { #compensate in offenders name with gold; gain opinion with both + name = cultural_festival.4100.c + scope:inconsiderate_character_scope = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + pay_short_term_gold = { + target = scope:offended_character_scope + gold = minor_gold_value + } + scope:offended_character_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_relation_rival = scope:inconsiderate_character_scope + has_relation_nemesis = scope:inconsiderate_character_scope + short_term_gold < minor_gold_value + } + } + modifier = { + add = 10 + OR = { + has_trait = generous + has_trait = compassionate + } + } + modifier = { + add = -20 + has_trait = greedy + } + } + } +} + +###################### +## Bilateral: Vassal prepares a parade, Liege participates in the parade +## 4200-4203 +## by Arkadiusz Majewski +###################### + +scripted_effect parade_liege_enjoyment_effect = { #rewards for liege if liege likes the parade + if = { + limit = { + scope:stop_host_scope.var:parade_type = flag:military_parade + } + scope:visiting_liege = { + add_character_modifier = { + modifier = festival_military_parade_best_modifier + years = 5 + } + } + } + else_if = { + limit = { + scope:stop_host_scope.var:parade_type = flag:civil_parade + } + scope:visiting_liege = { + add_character_modifier = { + modifier = festival_civil_parade_best_modifier + years = 5 + } + } + } + else = { + scope:visiting_liege = { + add_character_modifier = { + modifier = festival_religious_parade_best_modifier + years = 5 + } + } + } + if = { + limit = { scope:visiting_liege.culture != location.county.culture } + scope:visiting_liege.culture = { + change_cultural_acceptance = { + target = scope:stop_host_scope.location.county.culture + value = major_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + scope:visiting_liege = { + add_opinion = { + target = scope:stop_host_scope + modifier = impressed_opinion + opinion = 10 + } + } +} + +scripted_effect parade_liege_dissatisfaction_effect = { #rewards for liege if liege dislikes the parade + if = { + limit = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + } + add_piety = minor_piety_gain + } + else = { + add_prestige = minor_prestige_gain + } + scope:visiting_liege = { + add_opinion = { + target = scope:stop_host_scope + modifier = bored_opinion + opinion = -10 + } + add_character_flag = parade_liege_dissatisfaction_flag + } +} + +scripted_effect liege_parade_enjoyment_custom_tt_effect = { #custom tooltip hint for player how likely the liege is to like the parade + if = { + limit = { scope:liege_parade_enjoyment_value > 2 } + custom_tooltip = cultural_festival.4200.tt.liege_likes + } + else_if = { + limit = { scope:liege_parade_enjoyment_value >= 0 } + custom_tooltip = cultural_festival.4200.tt.liege_indifferent + } + else = { + custom_tooltip = cultural_festival.4200.tt.liege_dislikes + } +} + +scripted_effect positive_opinion_after_parade_effect = { + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = flattered_opinion + opinion = 10 + } + } +} + +scripted_effect negative_opinion_after_parade_effect = { + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = frustrated_opinion + opinion = -10 + } + } +} + +scripted_effect parade_end_effect = { #rewards for vassal dependent on parade type and if liege liked the parade + if = { + limit = { + var:parade_type = flag:military_parade + } + if = { + limit = { + var:liege_parade_enjoyment >= 3 + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_military_parade_best_modifier + years = 5 + } + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + if = { + limit = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + negative_opinion_after_parade_effect = yes + } + else = { + positive_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + OR = { + var:liege_parade_enjoyment >= 0 + scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_military_parade_best_modifier + years = 5 + } + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_military_parade_modifier + years = 5 + } + } + dynasty ?= { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + negative_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + var:parade_type = flag:civil_parade + } + if = { + limit = { + var:liege_parade_enjoyment >= 3 + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_civil_parade_best_modifier + years = 5 + } + } + add_prestige = minor_prestige_gain + if = { + limit = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + negative_opinion_after_parade_effect = yes + } + else = { + positive_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + OR = { + var:liege_parade_enjoyment >= 0 + scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_civil_parade_best_modifier + years = 5 + } + } + add_prestige = minor_prestige_gain + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_civil_parade_modifier + years = 5 + } + } + add_prestige = miniscule_prestige_gain + negative_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + var:parade_type = flag:religious_parade + } + if = { + limit = { + var:liege_parade_enjoyment >= 3 + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_religious_parade_best_modifier + years = 5 + } + } + add_piety = minor_piety_gain + if = { + limit = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + negative_opinion_after_parade_effect = yes + } + else = { + positive_opinion_after_parade_effect = yes + } + } + else_if = { + limit = { + OR = { + var:liege_parade_enjoyment >= 0 + scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } + } + } + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_religious_parade_best_modifier + years = 5 + } + } + add_piety = minor_piety_gain + } + else = { + scope:cultural_festival_scope = { + add_county_modifier = { + modifier = festival_religious_parade_modifier + years = 5 + } + } + add_piety = miniscule_piety_gain + negative_opinion_after_parade_effect = yes + } + } +} + +scripted_effect clear_parade_variables_effect = { #clear all variables and flags + remove_variable = parade_type + remove_variable = parade_quality + remove_variable = liege_parade_type + remove_variable = liege_parade_enjoyment + if = { + limit = { + scope:visiting_liege = { + has_character_flag = parade_liege_dissatisfaction_flag + } + } + scope:visiting_liege = { + remove_character_flag = parade_liege_dissatisfaction_flag + } + } +} + +cultural_festival.4200 = { #Vassal: Do a parade, pick a type + type = activity_event + title = cultural_festival.4200.t + desc = cultural_festival.4200.desc + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + cooldown = { years = 5 } + + trigger = { + scope:visiting_liege = { + NOT = { has_character_flag = had_cultural_parade } + } + any_courtier = { + is_available_ai_adult = yes + } + } + + immediate = { + set_variable = { #used later to determine outcomes, descriptions and ai chance + name = liege_parade_enjoyment + value = 0 + } + random_list = { #decide which parade the liege likes by setting a var, used later to determine outcomes, descriptions and ai chance + 1 = { + modifier = { + add = 10 + scope:visiting_liege = { OR = { highest_skill = martial highest_skill = intrigue } } + } + modifier = { + add = 10 + scope:visiting_liege = { OR = { has_lifestyle = martial_lifestyle has_lifestyle = intrigue_lifestyle } } + } + set_variable = { + name = liege_parade_type + value = flag:military_parade + } + } + 1 = { + modifier = { + add = 10 + scope:visiting_liege = { OR = { highest_skill = diplomacy highest_skill = stewardship } } + } + modifier = { + add = 10 + scope:visiting_liege = { OR = { has_lifestyle = diplomacy_lifestyle has_lifestyle = stewardship_lifestyle } } + } + modifier = { + add = 10 + scope:visiting_liege.culture != location.county.culture + } + set_variable = { + name = liege_parade_type + value = flag:civil_parade + } + } + 1 = { + modifier = { + add = 10 + scope:visiting_liege = { highest_skill = learning } + } + modifier = { + add = 10 + scope:visiting_liege = { has_lifestyle = learning_lifestyle } + } + modifier = { + add = 10 + scope:visiting_liege.faith != location.county.faith + } + modifier = { + add = 10 + scope:visiting_liege = { has_trait = zealous } + } + set_variable = { + name = liege_parade_type + value = flag:religious_parade + } + } + } + scope:visiting_liege = { #makes sure that event does not trigger for liege with multiple vassals during the same tour + add_character_flag = { + flag = had_cultural_parade + days = 3650 + } + } + } + + option = { #pick military parade, set liege enjoyment according to parade type they like + name = cultural_festival.4200.a + if = { + limit = { var:liege_parade_type = flag:military_parade } + custom_tooltip = cultural_festival.4200.tt.liege_likes + change_variable = { + name = liege_parade_enjoyment + add = 2 + } + } + else_if = { + limit = { var:liege_parade_type = flag:religious_parade } + custom_tooltip = cultural_festival.4200.tt.liege_indifferent + } + else_if = { + limit = { var:liege_parade_type = flag:civil_parade } + custom_tooltip = cultural_festival.4200.tt.liege_dislikes + change_variable = { + name = liege_parade_enjoyment + add = -2 + } + } + set_variable = { + name = parade_type + value = flag:military_parade + } + stress_impact = { + base = minor_stress_impact_loss + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + var:liege_parade_type = flag:military_parade + } + } + } + + option = { #pick civil parade, set liege enjoyment according to parade type they like + name = cultural_festival.4200.b + if = { + limit = { var:liege_parade_type = flag:civil_parade } + custom_tooltip = cultural_festival.4200.tt.liege_likes + change_variable = { + name = liege_parade_enjoyment + add = 2 + } + } + else_if = { + limit = { var:liege_parade_type = flag:military_parade } + custom_tooltip = cultural_festival.4200.tt.liege_indifferent + } + else_if = { + limit = { var:liege_parade_type = flag:religious_parade } + custom_tooltip = cultural_festival.4200.tt.liege_dislikes + change_variable = { + name = liege_parade_enjoyment + add = -2 + } + } + set_variable = { + name = parade_type + value = flag:civil_parade + } + stress_impact = { + base = minor_stress_impact_loss + just = minor_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + var:liege_parade_type = flag:civil_parade + } + } + } + + option = { #pick religious parade, set liege enjoyment according to parade type they like + name = cultural_festival.4200.c + if = { + limit = { var:liege_parade_type = flag:religious_parade } + custom_tooltip = cultural_festival.4200.tt.liege_likes + change_variable = { + name = liege_parade_enjoyment + add = 2 + } + } + else_if = { + limit = { var:liege_parade_type = flag:civil_parade } + custom_tooltip = cultural_festival.4200.tt.liege_indifferent + } + else_if = { + limit = { var:liege_parade_type = flag:military_parade } + custom_tooltip = cultural_festival.4200.tt.liege_dislikes + change_variable = { + name = liege_parade_enjoyment + add = -2 + } + } + set_variable = { + name = parade_type + value = flag:religious_parade + } + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + var:liege_parade_type = flag:religious_parade + } + } + } + after = { + trigger_event = cultural_festival.4201 + } +} + +cultural_festival.4201 = { #Vassal: Choose the quality of the parade + type = activity_event + title = cultural_festival.4201.t + desc = { + first_valid = { + triggered_desc = { + trigger = { var:parade_type = flag:military_parade } + desc = cultural_festival.4201.desc_military + } + triggered_desc = { + trigger = { var:parade_type = flag:civil_parade } + desc = cultural_festival.4201.desc_civil + } + triggered_desc = { + trigger = { var:parade_type = flag:religious_parade } + desc = cultural_festival.4201.desc_religious + } + } + desc = cultural_festival.4201.desc_end + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:coordinator_scope + animation = thinking + } + + immediate = { + if = { #set proper councillor as the parade coordinator + limit = { + var:parade_type = flag:military_parade + exists = cp:councillor_marshal + } + cp:councillor_marshal = { + save_scope_as = coordinator_scope + } + } + else_if = { + limit = { + var:parade_type = flag:civil_parade + exists = cp:councillor_steward + } + cp:councillor_steward = { + save_scope_as = coordinator_scope + } + } + else_if = { + limit = { + var:parade_type = flag:religious_parade + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = coordinator_scope + } + } + else = { + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = coordinator_scope + } + } + set_variable = { #used later to determine outcomes and descriptions + name = parade_quality + value = 0 + } + } + + option = { #make the best parade possible + name = { + trigger = { var:parade_type = flag:military_parade } + text = cultural_festival.4201.a.military + } + name = { + trigger = { var:parade_type = flag:civil_parade } + text = cultural_festival.4201.a.civil + } + name = { + trigger = { var:parade_type = flag:religious_parade } + text = cultural_festival.4201.a.religious + } + save_temporary_scope_value_as = { #value needed to set proper custom tooltip hinting how it will affect your liege + name = liege_parade_enjoyment_value + value = { value = var:liege_parade_enjoyment add = 3 } + } + liege_parade_enjoyment_custom_tt_effect = yes + remove_treasury_or_gold = major_treasury_or_gold_value + change_variable = { + name = parade_quality + add = 3 + } + change_variable = { + name = liege_parade_enjoyment + add = var:parade_quality + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + humble = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = gluttonous + } + } + modifier = { + add = 10 + AND = { + has_trait = zealous + var:parade_type = flag:religious_parade + } + } + modifier = { + factor = 0 + short_term_treasury_or_gold < major_treasury_or_gold_value + } + } + } + + option = { #make an ok parade + name = cultural_festival.4201.b + save_temporary_scope_value_as = { #value needed to set proper custom tooltip hinting how it will affect your liege + name = liege_parade_enjoyment_value + value = { value = var:liege_parade_enjoyment add = 2 } + } + liege_parade_enjoyment_custom_tt_effect = yes + remove_treasury_or_gold = minor_treasury_or_gold_value + change_variable = { + name = parade_quality + add = 2 + } + change_variable = { + name = liege_parade_enjoyment + add = var:parade_quality + } + stress_impact = { + temperate = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = temperate + } + modifier = { + factor = 0 + short_term_treasury_or_gold < minor_treasury_or_gold_value + } + } + } + + option = { #make a poor parade + name = cultural_festival.4201.c + save_temporary_scope_value_as = { #value needed to set proper custom tooltip hinting how it will affect your liege + name = liege_parade_enjoyment_value + value = { value = var:liege_parade_enjoyment add = -1 } + } + liege_parade_enjoyment_custom_tt_effect = yes + add_prestige = miniscule_prestige_loss + change_variable = { + name = parade_quality + add = -1 + } + change_variable = { + name = liege_parade_enjoyment + add = var:parade_quality + } + stress_impact = { + base = minor_stress_impact_loss + greedy = minor_stress_impact_loss + cynical = minor_stress_impact_loss + humble = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = greedy + has_trait = cynical + has_trait = humble + } + } + modifier = { + add = 10 + AND = { + has_trait = cynical + var:parade_type = flag:religious_parade + } + } + } + } + + after = { + scope:visiting_liege = { + trigger_event = { + id = cultural_festival.4202 + days = 1 + } + } + } +} + +cultural_festival.4202 = { #Liege: Attend the parade and like it or not + type = activity_event + title = cultural_festival.4202.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:military_parade + scope:stop_host_scope.var:parade_quality > 2 + } + desc = cultural_festival.4202.desc_military_best + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:military_parade + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_military_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:military_parade + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_military_worst + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:civil_parade + scope:stop_host_scope.var:parade_quality > 2 + } + desc = cultural_festival.4202.desc_civil_best + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:civil_parade + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_civil_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:civil_parade + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_civil_worst + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.var:parade_quality > 2 + } + desc = cultural_festival.4202.desc_religious_best + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_religious_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_religious_worst + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.faith != scope:visiting_liege.faith + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_religious_different_faith_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.faith = scope:visiting_liege.faith + scope:stop_host_scope.var:parade_quality >= 0 + } + desc = cultural_festival.4202.desc_religious_same_faith_good + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.faith != scope:visiting_liege.faith + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_religious_different_faith_bad + } + triggered_desc = { + trigger = { + scope:stop_host_scope.var:parade_type = flag:religious_parade + scope:stop_host_scope.faith = scope:visiting_liege.faith + scope:stop_host_scope.var:parade_quality < 0 + } + desc = cultural_festival.4202.desc_religious_same_faith_bad + } + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:coordinator_scope + animation = happiness + } + + option = { #you enjoy the parade, for ai liege_parade_enjoyment var decides + name = { + trigger = { has_activity_intent = reduce_stress_intent } + text = cultural_festival.4202.a.revelry + } + name = cultural_festival.4202.a + parade_liege_enjoyment_effect = yes + if = { + limit = { has_activity_intent = reduce_stress_intent } + increase_tour_success_effect = { POINTS = 1 } + } + stress_impact = { + base = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 100 + scope:stop_host_scope.var:liege_parade_enjoyment >= 0 + } + } + } + + option = { #you don't enjoy the parade, for ai liege_parade_enjoyment var decides + name = cultural_festival.4202.b + parade_liege_dissatisfaction_effect = yes + stress_impact = { + base = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 100 + scope:stop_host_scope.var:liege_parade_enjoyment < 0 + } + modifier = { + factor = 0 + has_activity_intent = reduce_stress_intent + } + } + } + + after = { + scope:stop_host_scope = { + trigger_event = { id = cultural_festival.4203 days = 1 } + } + } +} + +cultural_festival.4203 = { #Vassal: Summary of the parade + type = activity_event + title = cultural_festival.4203.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + desc = cultural_festival.4203.desc_failure + } + desc = cultural_festival.4203.desc_success + } + } + + theme = cultural_festival + + left_portrait = { + character = root + triggered_animation = { + trigger = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + animation = anger + } + animation = happiness + } + + right_portrait = { + character = scope:visiting_liege + triggered_animation = { + trigger = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + animation = disapproval + } + animation = admiration + } + + immediate = { #display what was the liege reaction to the parade, based on option chosen in previous event + if = { + limit = { + scope:visiting_liege = { + has_character_flag = parade_liege_dissatisfaction_flag + } + } + show_as_tooltip = { + parade_liege_dissatisfaction_effect = yes + } + } + else = { + show_as_tooltip = { + parade_liege_enjoyment_effect = yes + } + } + } + + option = { #effect is determined by previous actions, mainly liege_parade_enjoyment or overide by player + name = { + trigger = { scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } } + text = cultural_festival.4203.a.success + } + name = { + trigger = { scope:visiting_liege = { has_character_flag = parade_liege_dissatisfaction_flag } } + text = cultural_festival.4203.a.failure + } + parade_end_effect = yes + if = { + limit = { scope:visiting_liege = { NOT = { has_character_flag = parade_liege_dissatisfaction_flag } } } + stress_impact = { + base = major_stress_impact_loss + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + } + } + } + + after = { + clear_parade_variables_effect = yes + } +} + +###################### +## Bilateral: Vassal and Liege exchange gifts; later they can decide to check up on them +## 4300-4312 +## by Arkadiusz Majewski +###################### + +scripted_effect create_cultural_artifact_effect = { #create a random artifact to possibly give as a gift + random_list = { + 10 = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:no + } + } + 10 = { + create_artifact_armor_effect = { + OWNER = root + CREATOR = root + SET_ARMOR_TYPE = flag:no + } + } + 10 = { + create_artifact_regalia_effect = { + OWNER = root + SMITH = root + } + } + 10 = { + create_artifact_crown_effect = { + OWNER = root + SMITH = root + } + } + 10 = { + create_artifact_brooch_effect = { + OWNER = root + SMITH = root + } + } + 10 = { + create_artifact_book_effect = { + OWNER = root + CREATOR = root + SET_SUBJECT = flag:no + SET_TOPIC = flag:no + } + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_cultural_gift_desc + } +} + +scripted_effect choose_gift_effect = { #used only in tooltip to show the gift receiver what happened + if = { + limit = { exists = $CHOSEN_GIFT$ } + if = { + limit = { $CHOSEN_GIFT$ = flag:gift_existing_artifact } + scope:existing_artifact = { + set_owner = root + } + } + else_if = { + limit = { $CHOSEN_GIFT$ = flag:gift_newly_created_artifact } + scope:newly_created_artifact = { + set_owner = root + } + } + else_if = { + limit = { $CHOSEN_GIFT$ = flag:gift_gold } + $GIFT_GIVER$ = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + } + } +} + +scripted_effect create_giving_gift_memory_effect = { #create a memory of giving a gift + create_character_memory = { + type = gave_cultural_gift_memory + participants = { + gift_receiver = $GIFT_RECEIVER$ + } + } + if = { + limit = { exists = scope:new_memory } + scope:new_memory = { + set_variable = { + name = gift_type + value = scope:gifted_artifact + } + if = { + limit = { exists = var:gift_type } + #To prevent 'unused except in loc' errors + } + } + } +} + +scripted_effect give_artifact_gift_opinion_effect = { + if = { + limit = { root = scope:visiting_liege } + scope:visiting_liege = { + add_opinion = { + target = scope:stop_host_scope + modifier = gift_artifact_opinion + opinion = 30 + } + } + } + else = { + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = gift_artifact_opinion + opinion = 30 + } + } + } +} + +scripted_effect give_gold_gift_opinion_effect = { + if = { + limit = { root = scope:visiting_liege } + scope:visiting_liege = { + add_opinion = { + target = scope:stop_host_scope + modifier = gift_opinion + opinion = 15 + } + } + } + else = { + scope:stop_host_scope = { + add_opinion = { + target = scope:visiting_liege + modifier = gift_opinion + opinion = 15 + } + } + } +} + +scripted_trigger vassal_gift_giving_memory_trigger = { #check if vassal remembers giving liege a gift + has_memory_type = gave_cultural_gift_memory + any_memory_participant = { + this = scope:visiting_liege + } +} + +scripted_effect equip_gifted_artifact_effect = { #equip the gift if possible + if = { + limit = { can_equip_artifact = scope:gifted_artifact } + custom_tooltip = cultural_festival.4301.a.tt + scope:gifted_artifact = { + equip_artifact_to_owner_replace = yes + } + } +} + +scripted_effect delete_new_artifact_effect = { #destroy newly created artifact if it wasn't picked as a gift + destroy_artifact = scope:newly_created_artifact +} + +cultural_festival.4300 = { #Vassal: Decide which gift to give + type = activity_event + title = cultural_festival.4300.t + desc = { + desc = cultural_festival.4300.desc + triggered_desc = { + trigger = { exists = scope:existing_artifact } + desc = cultural_festival.4300.desc_existing_artifact + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:visiting_liege + animation = boredom + } + + artifact = { + trigger = { exists = scope:existing_artifact } + target = scope:existing_artifact + position = lower_left_portrait + } + + artifact = { + trigger = { exists = scope:newly_created_artifact } + target = scope:newly_created_artifact + position = lower_center_portrait + } + + cooldown = { years = 5 } + + trigger = { #check if you have a memory of giving your liege a gift + root = { + NOT = { + any_memory = { + vassal_gift_giving_memory_trigger = yes + } + } + } + } + + immediate = { + if = { #look for any insignificant artifact you have and save it as something to gift + limit = { + has_any_artifact = yes + any_character_artifact = { + category = inventory + } + } + random_character_artifact = { + limit = { + category = inventory + NOT = { has_variable = historical_unique_artifact } + } + save_scope_as = existing_artifact + } + } + hidden_effect = { #create new artifact and save it as something to gift + create_cultural_artifact_effect = yes + } + add_character_flag = { #to make sure to not trigger 4310 in the same tour you gave the gift + flag = gave_gift_recently_flag + days = 1825 + } + } + + option = { #gift an already nonsignificant existing artifact from root inventory + trigger = { + exists = scope:existing_artifact + } + name = cultural_festival.4300.a + scope:existing_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:visiting_liege + history = { + location = scope:stop_host_scope.location + actor = scope:stop_host_scope + recipient = scope:visiting_liege + type = given + } + } + save_scope_as = gifted_artifact + } + save_scope_value_as = { #used later to determine outcomes and description + name = vassal_chosen_gift + value = flag:gift_existing_artifact + } + create_giving_gift_memory_effect = { GIFT_RECEIVER = scope:visiting_liege } #remember that you gave a gift to liege, used later to trigger a follow up event + show_as_tooltip = { + give_artifact_gift_opinion_effect = yes + } + hidden_effect = { #delete the newly created artifact, because it wasn't gifted away + delete_new_artifact_effect = yes + } + scope:visiting_liege = { + trigger_event = cultural_festival.4301 + } + custom_tooltip = cultural_festival.4300.tt + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { #gift the newly created artifact + name = cultural_festival.4300.b + remove_short_term_gold = minor_gold_value + scope:newly_created_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:visiting_liege + history = { + location = scope:visiting_liege.location + actor = scope:stop_host_scope + recipient = scope:visiting_liege + type = given + } + } + save_scope_as = gifted_artifact + } + save_scope_value_as = { #used later to determine outcomes and description + name = vassal_chosen_gift + value = flag:gift_newly_created_artifact + } + create_giving_gift_memory_effect = { GIFT_RECEIVER = scope:visiting_liege } #remember that you gave a gift to liege, used later to trigger a follow up event + show_as_tooltip = { + give_artifact_gift_opinion_effect = yes + } + scope:visiting_liege = { + trigger_event = cultural_festival.4301 + } + custom_tooltip = cultural_festival.4300.tt + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 5 + modifier = { + factor = 0 + has_trait = greedy + short_term_gold < minor_gold_value + } + } + } + + option = { #gift just gold + name = cultural_festival.4300.c + pay_short_term_gold = { + target = scope:visiting_liege + gold = minor_gold_value + } + save_scope_value_as = { #used later to determine outcomes and description + name = vassal_chosen_gift + value = flag:gift_gold + } + show_as_tooltip = { + give_gold_gift_opinion_effect = yes + } + hidden_effect = { #delete the newly created artifact, because it wasn't gifted away + delete_new_artifact_effect = yes + } + scope:visiting_liege = { + trigger_event = cultural_festival.4301 + } + custom_tooltip = cultural_festival.4300.tt + stress_impact = { + cynical = minor_stress_impact_loss + generous = major_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { #this should be the least likely option when player is the gift receiver to ensure the follow up event triggering for them + base = 1 + modifier = { + factor = 0 + has_trait = greedy + short_term_gold < minor_gold_value + } + } + } + + option = { #no, i don't think I will + name = cultural_festival.4300.d + hidden_effect = { + delete_new_artifact_effect = yes + } + stress_impact = { + cynical = major_stress_impact_loss + generous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = cynical + } + } + } +} + +cultural_festival.4301 = { #Liege: Get the gift from vassal and decide to keep it or destroy it + type = activity_event + title = cultural_festival.4301.t + desc = { + desc = cultural_festival.4301.desc + first_valid = { + triggered_desc = { + trigger = { scope:vassal_chosen_gift = flag:gift_gold } + desc = cultural_festival.4301.desc_gold + } + desc = cultural_festival.4301.desc_artifact + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + + artifact = { + trigger = { exists = scope:gifted_artifact } + target = scope:gifted_artifact + position = lower_center_portrait + } + + immediate = { #display root what was the gift + show_as_tooltip = { + choose_gift_effect = { + CHOSEN_GIFT = scope:vassal_chosen_gift + GIFT_GIVER = scope:stop_host_scope + } + } + give_artifact_gift_opinion_effect = yes + } + + option = { #keep it, equip it if possible + name = cultural_festival.4301.a + trigger = { NOT = { scope:vassal_chosen_gift = flag:gift_gold } } + equip_gifted_artifact_effect = yes + scope:gifted_artifact = { + set_variable = { + name = received_as_cultural_gift + value = scope:vassal_chosen_gift + } + } + stress_impact = { + trusting = minor_stress_impact_loss + humble = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = honest + has_trait = just + } + } + modifier = { + add = 100 + OR = { + has_relation_friend = scope:stop_host_scope + has_relation_best_friend = scope:stop_host_scope + has_relation_lover = scope:stop_host_scope + has_relation_soulmate = scope:stop_host_scope + } + } + } + } + + option = { #get rid of the gift, quietly + name = cultural_festival.4301.b + trigger = { NOT = { scope:vassal_chosen_gift = flag:gift_gold } } + destroy_artifact = scope:gifted_artifact + add_gold = minor_gold_value + stress_impact = { + trusting = minor_stress_impact_gain + humble = minor_stress_impact_gain + paranoid = major_stress_impact_loss + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 50 + has_trait = paranoid + } + modifier = { + add = 10 + OR = { + has_trait = deceitful + has_trait = cynical + } + } + modifier = { + add = 100 + OR = { + has_relation_rival = scope:stop_host_scope + has_relation_nemesis = scope:stop_host_scope + } + } + } + } + + option = { #yay, you got gold! + name = cultural_festival.4301.c + trigger = { scope:vassal_chosen_gift = flag:gift_gold } + give_gold_gift_opinion_effect = yes + stress_impact = { + greedy = major_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { #actually, doesn't matter as it is the only option if you got gifted gold + base = 1 + } + } + + after = { + trigger_event = cultural_festival.4302 + custom_tooltip = cultural_festival.4301.tt + } +} + +cultural_festival.4302 = { #Liege: Pick the gift for Vassal, mirror of cultural_festival.4300 + type = activity_event + title = cultural_festival.4302.t + desc = { + desc = cultural_festival.4302.desc + triggered_desc = { + trigger = { exists = scope:existing_artifact } + desc = cultural_festival.4302.desc_existing_artifact + } + first_valid = { + triggered_desc = { + trigger = { scope:vassal_chosen_gift = flag:gift_gold } + desc = cultural_festival.4302.desc_gifted_gold + } + desc = cultural_festival.4302.desc_gold + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:stop_host_scope + animation = happiness + } + + artifact = { + trigger = { exists = scope:existing_artifact } + target = scope:existing_artifact + position = lower_left_portrait + } + + artifact = { + trigger = { exists = scope:newly_created_artifact } + target = scope:newly_created_artifact + position = lower_center_portrait + } + + 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 + } + } + } + random_character_artifact = { + limit = { + category = inventory + artifact_owner = root + NOT = { has_variable = historical_unique_artifact } + NOT = { has_variable = received_as_cultural_gift } + } + save_scope_as = existing_artifact + } + } + hidden_effect = { + create_cultural_artifact_effect = yes + } + add_character_flag = { #to make sure to not trigger 4310 in the same tour you gave the gift + flag = gave_gift_recently_flag + days = 720 + } + } + + option = { #gift an already existing nonsignificant artifact from root inventory + trigger = { + exists = scope:existing_artifact + } + name = cultural_festival.4302.a + scope:existing_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:stop_host_scope + history = { + location = scope:stop_host_scope.location + actor = scope:visiting_liege + recipient = scope:stop_host_scope + type = given + } + } + save_scope_as = gifted_artifact + } + save_scope_value_as = { + name = liege_chosen_gift + value = flag:gift_existing_artifact + } + create_giving_gift_memory_effect = { GIFT_RECEIVER = scope:stop_host_scope } + show_as_tooltip = { + give_artifact_gift_opinion_effect = yes + } + hidden_effect = { + delete_new_artifact_effect = yes + } + scope:stop_host_scope = { + trigger_event = cultural_festival.4303 + } + stress_impact = { + compassionate = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { #gift the newly created artifact + name = cultural_festival.4302.b + remove_short_term_gold = minor_gold_value + scope:newly_created_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:stop_host_scope + history = { + location = scope:stop_host_scope.location + actor = scope:visiting_liege + recipient = scope:stop_host_scope + type = given + } + } + save_scope_as = gifted_artifact + } + save_scope_value_as = { + name = liege_chosen_gift + value = flag:gift_newly_created_artifact + } + create_giving_gift_memory_effect = { GIFT_RECEIVER = scope:stop_host_scope } + show_as_tooltip = { + give_artifact_gift_opinion_effect = yes + } + scope:stop_host_scope = { + trigger_event = cultural_festival.4303 + } + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 5 + modifier = { + factor = 0 + has_trait = greedy + short_term_gold < minor_gold_value + } + } + } + + option = { #gift just gold + name = cultural_festival.4302.c + pay_short_term_gold = { + target = scope:stop_host_scope + gold = minor_gold_value + } + save_scope_value_as = { + name = liege_chosen_gift + value = flag:gift_gold + } + show_as_tooltip = { + give_gold_gift_opinion_effect = yes + } + hidden_effect = { + delete_new_artifact_effect = yes + } + scope:stop_host_scope = { + trigger_event = cultural_festival.4303 + } + stress_impact = { + cynical = minor_stress_impact_loss + generous = major_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + factor = 0 + has_trait = greedy + short_term_gold < minor_gold_value + } + } + } + + option = { #no, I don't think I will + name = cultural_festival.4302.d + scope:stop_host_scope = { + send_interface_toast = { + title = cultural_festival.4302.d + left_icon = scope:visiting_liege + add_opinion = { + target = scope:visiting_liege + modifier = rude_opinion + } + } + } + hidden_effect = { + delete_new_artifact_effect = yes + } + stress_impact = { + cynical = major_stress_impact_loss + generous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = cynical + } + } + } +} + +cultural_festival.4303 = { #Vassal: Get the gift from liege, mirror of cultural_festival.4301 + type = activity_event + title = cultural_festival.4303.t + desc = { + desc = cultural_festival.4303.desc + first_valid = { + triggered_desc = { + trigger = { scope:liege_chosen_gift = flag:gift_gold } + desc = cultural_festival.4303.desc_gold + } + desc = cultural_festival.4303.desc_artifact + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:visiting_liege + animation = happiness + } + + artifact = { + trigger = { exists = scope:gifted_artifact } + target = scope:gifted_artifact + position = lower_center_portrait + } + + immediate = { + show_as_tooltip = { + choose_gift_effect = { + CHOSEN_GIFT = scope:liege_chosen_gift + GIFT_GIVER = scope:visiting_liege + } + } + give_artifact_gift_opinion_effect = yes + } + + option = { + name = cultural_festival.4303.a + trigger = { NOT = { scope:liege_chosen_gift = flag:gift_gold } } + equip_gifted_artifact_effect = yes + set_variable = { + name = received_as_cultural_gift + value = scope:liege_chosen_gift + } + stress_impact = { + trusting = minor_stress_impact_loss + humble = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = honest + has_trait = just + } + } + modifier = { + add = 100 + OR = { + has_relation_friend = scope:stop_host_scope + has_relation_best_friend = scope:stop_host_scope + has_relation_lover = scope:stop_host_scope + has_relation_soulmate = scope:stop_host_scope + } + } + } + } + + option = { + name = cultural_festival.4303.b + trigger = { NOT = { scope:liege_chosen_gift = flag:gift_gold } } + destroy_artifact = scope:gifted_artifact + add_gold = minor_gold_value + stress_impact = { + trusting = minor_stress_impact_gain + humble = minor_stress_impact_gain + paranoid = major_stress_impact_loss + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 50 + has_trait = paranoid + } + modifier = { + add = 10 + OR = { + has_trait = deceitful + has_trait = cynical + } + } + modifier = { + add = 100 + OR = { + has_relation_rival = scope:stop_host_scope + has_relation_nemesis = scope:stop_host_scope + } + } + } + } + + option = { + name = cultural_festival.4303.c + trigger = { scope:liege_chosen_gift = flag:gift_gold } + give_gold_gift_opinion_effect = yes + stress_impact = { + greedy = major_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { + base = 1 + } + } +} + +scripted_trigger liege_gift_giving_memory_trigger = { #check if liege remembers giving vassal a gift + has_memory_type = gave_cultural_gift_memory + any_memory_participant = { + this = scope:stop_host_scope + } +} + +scripted_effect displayed_proper_gift_effect = { #progress towards friend and gain of cultural acceptance if possible + scope:gift_receiver = { + send_interface_toast = { + title = cultural_festival.4311.proper_gift_taost + left_icon = scope:gift_receiver + right_icon = scope:giving_gift_memory_owner + scope:giving_gift_memory_owner = { + progress_towards_friend_effect = { + CHARACTER = scope:gift_receiver + OPINION = 30 + REASON = friend_respected_foreign_culture + } + } + scope:visiting_liege = { + increase_tour_success_effect = { POINTS = 1 } + } + if = { + limit = { scope:gift_receiver.culture != scope:giving_gift_memory_owner.culture } + scope:gift_receiver.culture = { + change_cultural_acceptance = { + target = scope:giving_gift_memory_owner.culture + value = major_cultural_acceptance_gain + desc = cultural_acceptance_embraced_festival + } + } + } + } + } +} + +scripted_effect displayed_no_gift_effect = { #progress towards rivalry and loss of cultural acceptance if possible + scope:gift_receiver = { + send_interface_toast = { + title = cultural_festival.4311.no_gift_toast + left_icon = scope:gift_receiver + right_icon = scope:giving_gift_memory_owner + scope:giving_gift_memory_owner = { + progress_towards_rival_effect = { + CHARACTER = scope:gift_receiver + OPINION = -30 + REASON = rival_abused_subjects_hospitality + } + } + if = { + limit = { scope:gift_receiver.culture != scope:giving_gift_memory_owner.culture } + scope:gift_receiver.culture = { + change_cultural_acceptance = { + target = scope:giving_gift_memory_owner.culture + value = major_cultural_acceptance_loss + desc = cultural_acceptance_embraced_festival + } + } + } + } + } +} + +scripted_effect set_var_gift_liege_response_effect = { #sets proper flag for var:gift_liege_response + set_variable = { + name = gift_liege_response + value = $FLAG$ + } +} + +scripted_effect liege_failed_hook_effect = { #add hook, loyalty trait or prestige if possible + scope:gift_receiver = { + send_interface_toast = { + title = cultural_festival.4311.liege_failed_toast + left_icon = scope:gift_receiver + right_icon = scope:giving_gift_memory_owner + if = { + limit = { + scope:giving_gift_memory_owner = { + can_add_hook = { + target = scope:gift_receiver + type = loyalty_hook + } + } + } + scope:giving_gift_memory_owner = { + add_hook = { + target = scope:gift_receiver + type = loyalty_hook + } + add_prestige = miniscule_prestige_gain + } + } + else = { + if = { + limit = { scope:stop_host_scope = { NOT = { has_trait = loyal } } } + scope:stop_host_scope = { + add_trait = loyal + } + } + add_prestige = medium_prestige_gain + } + scope:visiting_liege = { + if = { + limit = { + involved_activity ?= { + has_activity_option = { + category = special_type + option = tour_type_intimidation + } + } + } + increase_tour_success_effect = { POINTS = 1 } + } + } + } + } +} + +cultural_festival.4310 = { #Decide if you want to ask to see the gifts + type = activity_event + title = cultural_festival.4310.t + desc = cultural_festival.4310.desc + + theme = cultural_festival + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:gift_receiver + animation = boredom + } + + cooldown = { years = 5 } + + trigger = { + OR = { + AND = { + root = scope:visiting_liege + any_memory = { + liege_gift_giving_memory_trigger = yes + } + NOT = { has_character_flag = gave_gift_recently_flag } #to make sure to not trigger in the same tour you gave the gift + } + AND = { + root = scope:stop_host_scope + any_memory = { + vassal_gift_giving_memory_trigger = yes + } + NOT = { has_character_flag = gave_gift_recently_flag } #to make sure to not trigger in the same tour you gave the gift + } + } + } + + immediate = { + random_memory = { + limit = { + OR = { + AND = { + root = scope:visiting_liege + liege_gift_giving_memory_trigger = yes + } + AND = { + root = scope:stop_host_scope + vassal_gift_giving_memory_trigger = yes + } + } + } + save_scope_as = giving_gift_memory + } + scope:giving_gift_memory.memory_participant:gift_receiver = { save_scope_as = gift_receiver } + if = { + limit = { exists = scope:giving_gift_memory.var:gift_type } + scope:giving_gift_memory.var:gift_type = { save_scope_as = gifted_artifact } + } + save_scope_as = giving_gift_memory_owner + } + + option = { #Where is my gift? Is it safe, is it all right? + name = cultural_festival.4310.a + custom_tooltip = cultural_festival.4310.a.tt + scope:gift_receiver = { + trigger_event = { + id = cultural_festival.4311 + days = 1 + } + } + stress_impact = { + arrogant = major_stress_impact_loss + paranoid = minor_stress_impact_loss + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + } + } + + option = { #Don't ask about it + name = cultural_festival.4310.b + add_piety = miniscule_piety_gain + stress_impact = { + arrogant = major_stress_impact_gain + paranoid = minor_stress_impact_gain + content = minor_stress_impact_loss + shy = minor_stress_impact_loss + } + ai_chance = { #set to 0, because it guarantees trigger of the next event for player + base = 0 + } + } +} + +cultural_festival.4311 = { #Respond to gift accordingly, if you still have the gifts or not + type = activity_event + title = cultural_festival.4311.t + desc = { + desc = cultural_festival.4311.desc + triggered_desc = { + trigger = { NOT = { exists = scope:old_gift } } + desc = cultural_festival.4311.desc.lost_gift + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:old_gift } + desc = cultural_festival.4311.desc.old_gift + } + triggered_desc = { + trigger = { exists = scope:decoy_gift } + desc = cultural_festival.4311.desc.decoy_gift + } + } + triggered_desc = { + trigger = { OR = { NOT = { exists = scope:decoy_gift } NOT = { exists = scope:old_gift } } } + desc = cultural_festival.4311.desc.no_gift + } + } + + theme = cultural_festival + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:giving_gift_memory_owner + animation = happiness + } + + artifact = { + trigger = { exists = scope:old_gift } + target = scope:old_gift + position = lower_center_portrait + } + + artifact = { + trigger = { exists = scope:decoy_gift } + target = scope:decoy_gift + position = lower_right_portrait + } + + immediate = { + if = { + limit = { + has_any_artifact = yes + any_character_artifact = { has_variable = received_as_cultural_gift } + } + random_character_artifact = { + limit = { + has_variable = received_as_cultural_gift + } + save_scope_as = old_gift + } + } + else_if = { + limit = { + has_any_artifact = yes + } + random_character_artifact = { + save_scope_as = decoy_gift + } + } + } + + option = { #show the gift you got, if you still have it around + name = cultural_festival.4311.a + trigger = { exists = scope:old_gift } + show_as_tooltip = { + random_list = { + 50 = { + show_chance = no + desc = cultural_festival.4311.a.success + displayed_proper_gift_effect = yes + } + 50 = { + show_chance = no + desc = cultural_festival.4311.a.failure + liege_failed_hook_effect = yes + } + } + } + set_var_gift_liege_response_effect = { FLAG = flag:show_real_gift_flag } + stress_impact = { + deceitful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + honest = minor_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = honest + } + modifier = { + add = -10 + OR = { + has_trait = deceitful + has_trait = paranoid + } + } + } + } + + option = { #show a decoy gift, if you have any other artifact + name = cultural_festival.4311.b + trigger = { exists = scope:decoy_gift } + duel = { + skill = intrigue + target = scope:giving_gift_memory_owner + 50 = { #you win + desc = cultural_festival.4311.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + set_var_gift_liege_response_effect = { FLAG = flag:decoy_gift_succeeded_flag } + show_as_tooltip = { + displayed_proper_gift_effect = yes + } + } + 50 = { + desc = cultural_festival.4311.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + set_var_gift_liege_response_effect = { FLAG = flag:decoy_gift_failed_flag } + show_as_tooltip = { + displayed_no_gift_effect = yes + } + } + } + stress_impact = { + deceitful = major_stress_impact_loss + cynical = minor_stress_impact_loss + honest = major_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = deceitful + has_trait = cynical + } + } + modifier = { + add = -10 + has_trait = honest + } + } + } + + option = { #try to convince that they never gave you anything + name = cultural_festival.4311.c + trigger = { OR = { NOT = { exists = scope:decoy_gift } NOT = { exists = scope:old_gift } } } + duel = { + skill = diplomacy + target = scope:giving_gift_memory_owner + 50 = { #you win + desc = cultural_festival.4311.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + show_as_tooltip = { + displayed_proper_gift_effect = yes + } + set_var_gift_liege_response_effect = { FLAG = flag:no_gift_succeeded_flag } + } + 50 = { + desc = cultural_festival.4311.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + set_var_gift_liege_response_effect = { FLAG = flag:no_gift_failed_flag } + show_as_tooltip = { + displayed_no_gift_effect = yes + } + } + } + stress_impact = { + stubborn = minor_stress_impact_loss + deceitful = major_stress_impact_loss + cynical = minor_stress_impact_loss + honest = major_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = deceitful + has_trait = cynical + has_trait = stubborn + } + } + modifier = { + add = -10 + has_trait = honest + } + } + } + + option = { #tell them you no longer have it + name = cultural_festival.4311.d + trigger = { NOT = { exists = scope:old_gift } } + set_var_gift_liege_response_effect = { FLAG = flag:liege_lost_gift_flag } + show_as_tooltip = { + add_prestige = minor_prestige_loss + } + stress_impact = { + deceitful = minor_stress_impact_gain + honest = major_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + add = 10 + has_trait = honest + } + modifier = { + add = -10 + has_trait = deceitful + } + } + } + + after = { + scope:giving_gift_memory_owner = { + trigger_event = cultural_festival.4312 + } + } +} + +cultural_festival.4312 = { #Vassal: Liege shows you a gift, or not + type = activity_event + title = cultural_festival.4312.t + desc = { + desc = cultural_festival.4312.desc + first_valid = { + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag } + desc = cultural_festival.4312.desc.decoy_gift_succeeded + } + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag } + desc = cultural_festival.4312.desc.decoy_gift_failed + } + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag } + desc = cultural_festival.4312.desc.no_gift_succeeded + } + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag } + desc = cultural_festival.4312.desc.no_gift_failed + } + triggered_desc = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + desc = cultural_festival.4312.desc.liege_lost_gift + } + desc = cultural_festival.4312.desc.show_real_gift_flag + } + } + + theme = cultural_festival + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + } + } + animation = disbelief + } + triggered_animation = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag + } + } + animation = anger + } + triggered_animation = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + animation = sadness + } + animation = happiness + } + + right_portrait = { + character = scope:gift_receiver + triggered_animation = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag + } + } + animation = worry + } + triggered_animation = { + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + animation = sadness + } + animation = happiness + } + + artifact = { + trigger = { exists = scope:old_gift } + target = scope:old_gift + position = lower_center_portrait + } + + artifact = { + trigger = { exists = scope:decoy_gift } + target = scope:decoy_gift + position = lower_right_portrait + } + + option = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:show_real_gift_flag + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + } + } + name = { #you appreciate them holding on to your gift, display only if gift receiver shown you the real gift + trigger = { + exists = scope:old_gift + scope:gift_receiver.var:gift_liege_response = flag:show_real_gift_flag + } + text = cultural_festival.4312.a + } + name = { #you appreciate them holding on to your gift, display only if gift receiver succeed in showing you a decoy + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag } + text = cultural_festival.4312.a.decoy_success + } + displayed_proper_gift_effect = yes + stress_impact = { + base = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag + } + } + name = { #you call their bluff, player only, display only if gift receiver succeed in showing you a decoy + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag } + text = cultural_festival.4312.b.decoy_success_holup + } + name = { #you're mad that they tried to trick you, display only if gift receiver failed in showing you a decoy + trigger = { scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag } + text = cultural_festival.4312.b.decoy_fail + } + name = { #you call their bluff, player only, display only if gift receiver succeed in convincing you about not giving a gift at all + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag } + text = cultural_festival.4312.b.nogift_success_holup + } + name = { #you're mad that they tried to trick you, display only if gift receiver failed in convincing you about not giving a gift at all + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag } + text = cultural_festival.4312.b.nogift_fail + } + name = { #you call their bluff, player only, display only if gift receiver said they lost it + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + text = cultural_festival.4312.b.holup + } + displayed_no_gift_effect = yes + stress_impact = { + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + just = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { #has to be 0 in those cases, so that the tooltips and duel checks for the Player in previous event were telling the truth + factor = 0 + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag + } + } + } + } + + option = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:show_real_gift_flag #you want something in return, display only if gift receiver shown you the real gift + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag #you play along, display only if gift receiver failed in showing you a decoy + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag #you play along, display only if gift receiver failed in convincing you about not giving a gift at all + } + } + name = cultural_festival.4312.c + liege_failed_hook_effect = yes + stress_impact = { + callous = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + content = minor_stress_impact_gain + just = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { #has to be 0 in those cases, so that the tooltips and duel checks for the Player in previous event were telling the truth + factor = 0 + OR = { + scope:gift_receiver.var:gift_liege_response = flag:decoy_gift_failed_flag + scope:gift_receiver.var:gift_liege_response = flag:no_gift_failed_flag + } + } + } + } + + option = { + trigger = { + OR = { + scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag + scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag + } + } + name = { #you are told you never gave them anything, display only if gift receiver succeed in convincing you about not giving a gift at all + trigger = { scope:gift_receiver.var:gift_liege_response = flag:no_gift_succeeded_flag } + text = cultural_festival.4312.d.nogift_success + } + name = { #it's a pity, but it happens, display only if gift receiver said they lost it + trigger = { scope:gift_receiver.var:gift_liege_response = flag:liege_lost_gift_flag } + text = cultural_festival.4312.d + } + scope:gift_receiver = { + send_interface_toast = { + title = cultural_festival.4312.d + left_icon = scope:gift_receiver + right_icon = scope:giving_gift_memory_owner + } + add_prestige = minor_prestige_loss + } + stress_impact = { + wrathful = minor_stress_impact_gain + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + content = minor_stress_impact_loss + just = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 1 + } + } + + after = { + if = { + limit = { + exists = scope:gift_receiver.var:gift_liege_response + } + scope:gift_receiver = { + remove_variable = gift_liege_response + } + } + } +} diff --git a/N3OW/events/activities/tour_activity/tour_travel_events.txt b/N3OW/events/activities/tour_activity/tour_travel_events.txt new file mode 100644 index 00000000..c9480143 --- /dev/null +++ b/N3OW/events/activities/tour_activity/tour_travel_events.txt @@ -0,0 +1,2766 @@ +# Events for the travel portion of the Tour grand activity + +namespace = tour_travel + +############################ +## Tour Travel Events +## 1000-2999 +## by James Beaumont +############################ +# tour_travel.1001 - Local peasants are talking about how much they hate the royals +# tour_travel.1002 - Pass by a particularly pretty commoner by the roadside +# tour_travel.1003 - A peasant does not show you proper ettiquette +# tour_travel.1004 - You decide to wash the feet of locals, royal touch +# tour_travel.1005 - Locals beg for your royal touch, royal touch +# tour_travel.1006 - Distribute alms in front of a local temple +# +# +############################ +## Tour Travel Events +## 3000-3999 +## by Veronica Pazos +############################ +# tour_travel.3110-3111 - Danger! Local ruler invites you to a banquet to steal from you +# tour_travel.3120 - Visit a local inn! +# tour_travel.3130 - A peasant complains they've lost their job +# tour_travel.3140 - Visit a local brothel! +# +# + + +##################################################################################### + +############################ +## Tour Travel Events +## 1000-2999 +## by James Beaumont +############################ + +# Local peasants are talking about how much they hate the royals +tour_travel.1001 = { + type = character_event + title = tour_travel.1001.title + desc = { + desc = tour_travel.1001.desc.intro + random_valid = { + triggered_desc = { + trigger = { + NOT = { knows_language_of_culture = scope:angry_county_scope.culture } + } + desc = tour_travel.1001.desc.mid.wrong_language + } + triggered_desc = { + trigger = { + culture != scope:angry_county_scope.culture + } + desc = tour_travel.1001.desc.mid.wrong_culture + } + triggered_desc = { + trigger = { + faith != scope:angry_county_scope.faith + } + desc = tour_travel.1001.desc.mid.wrong_faith + } + triggered_desc = { + trigger = { + root.primary_title = { + any_claimant = { + house != root.house + } + } + } + desc = tour_travel.1001.desc.mid.pretender + } + triggered_desc = { + trigger = { + has_active_diarchy = yes + diarchy_swing >= 50 + } + desc = tour_travel.1001.desc.mid.powerful_diarch + } + desc = tour_travel.1001.desc.mid.just_plain_dislike_em + } + first_valid = { + triggered_desc = { + trigger = { + should_be_naked_trigger = yes + } + desc = tour_travel.1001.desc.outro.nudist + } + desc = tour_travel.1001.desc.outro + } + } + + theme = travel_tour + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:angry_peasant + animation = rage + outfit_tags = { beggar_rags } + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + faith_forbids_alcohol_trigger = no # It should make sense that there is a tavern in this county + root.location.county = { county_opinion <= -5 } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + root.location.county = { + county_opinion <= -5 + NOT = { + root = { + knows_language_of_culture = prev.culture + } + } + } + } + } + + immediate = { + root.location = { + save_scope_as = angry_county_scope + save_scope_as = background_wilderness_scope # For theme + } + create_character = { + location = scope:angry_county_scope + template = drunken_peasant_character + culture = scope:angry_county_scope.culture + faith = scope:angry_county_scope.faith + save_scope_as = angry_peasant + } + if = { + limit = { + root.primary_title = { + any_claimant = { + house != root.house + } + } + } + root.primary_title = { + random_claimant = { + limit = { + house != root.house + } + save_scope_as = claimant_character_scope + } + } + } + } + + option = { # Punch your way out! + name = tour_travel.1001.a + trigger = { + is_adult = yes + } + duel = { + skill = prowess + target = scope:angry_peasant + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + add_prestige = minor_prestige_gain + scope:angry_county_scope.county = { + add_county_modifier = { + modifier = liege_respected_fighter_modifier + years = 10 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + increase_wounds_effect = { REASON = fight } + } + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + death = { + killer = scope:angry_peasant + death_reason = death_fight + } + } + } + if = { + limit = { is_alive = yes } + stress_impact = { + brave = minor_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + add = -50 + NOR = { + has_trait = arrogant + has_trait = brave + } + root.prowess < scope:angry_peasant.prowess + } + } + } + + option = { # Bribe them with lower taxes + name = tour_travel.1001.b + scope:angry_county_scope.county = { + add_county_modifier = { + modifier = reduced_taxes_modifier + years = 10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + craven = minor_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Attempt to convince them you're not you + name = tour_travel.1001.c + duel = { + skill = intrigue + target = scope:angry_peasant + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + add_prestige = minor_prestige_gain + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + hidden_effect = { + random_list = { + 80 = { + + } + 20 = { + give_nickname = nick_the_nameless + } + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + increase_wounds_effect = { REASON = fight } + } + } + stress_impact = { + brave = major_stress_impact_gain + honest = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = brave + } + } + } + } + after = { + scope:angry_peasant = { silent_disappearance_effect = yes } + } +} + +# Pass by a particularly pretty commoner by the roadside +tour_travel.1002 = { + type = character_event + title = tour_travel.1002.title + desc = tour_travel.1002.desc + + theme = travel_tour + left_portrait = { + character = root + animation = love + } + right_portrait = { + character = scope:pretty_peasant + animation = flirtation + outfit_tags = { beggar_rags } + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + is_available_travelling_adult = yes + NOT = { has_trait = celibate } + location = { is_sea_province = no } + sexually_liberal_trigger = yes + might_cheat_on_every_partner_trigger = yes + NOT = { has_sexuality = asexual } + } + weight_multiplier = { + base = 1 + modifier = { # Can still happen for others, but rarely + factor = 0.1 + NOT = { + has_activity_intent = lechery_intent + } + } + } + + immediate = { + add_character_flag = { + flag = no_sex_stress_loss + days = 30 + } + root.location.county = { + save_scope_as = pretty_peasant_county_scope + save_scope_as = background_wilderness_scope + } + create_character = { + location = scope:pretty_peasant_county_scope.title_province + template = beautiful_peasant_character + culture = scope:pretty_peasant_county_scope.culture + faith = scope:pretty_peasant_county_scope.faith + age = age_compared_to_root_minus_ten_always_adult + gender_female_chance = root_attraction_based_female_chance + save_scope_as = pretty_peasant + } + random_list = { + 10 = { + trigger = { + OR = { + AND = { + ROOT = { is_male = yes } + scope:pretty_peasant = { is_female = yes } + } + AND = { + ROOT = { is_female = yes } + scope:pretty_peasant = { is_male = yes } + } + } + } + scope:pretty_peasant = { set_sexuality = heterosexual } + } + 10 = { + scope:pretty_peasant = { set_sexuality = bisexual } + } + 10 = { + trigger = { + OR = { + AND = { + ROOT = { is_male = yes } + scope:pretty_peasant = { is_male = yes } + } + AND = { + ROOT = { is_female = yes } + scope:pretty_peasant = { is_female = yes } + } + } + } + scope:pretty_peasant = { set_sexuality = homosexual } + } + } + } + + option = { # She/he must be mine! + name = tour_travel.1002.a + set_relation_lover = scope:pretty_peasant + had_sex_with_effect = { + CHARACTER = scope:pretty_peasant + PREGNANCY_CHANCE = 50 + } + add_to_entourage_court_and_activity_effect = { + CHAR_TO_ADD = scope:pretty_peasant + NEW_COURT_OWNER = root + } + scope:pretty_peasant = { + add_character_flag = { + flag = blocked_from_leaving + years = 5 + } + } + if = { + limit = { + OR = { + would_be_sinful_adulterer_trigger = yes + relation_with_character_is_sodomy_in_faith_trigger = { + CHARACTER = scope:pretty_peasant + FAITH = root.faith + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + honest = medium_stress_impact_gain + chaste = major_stress_impact_gain + lustful = major_stress_impact_loss + zealous = major_stress_impact_gain + } + } + else = { + stress_impact = { + craven = minor_stress_impact_gain + honest = medium_stress_impact_gain + chaste = major_stress_impact_gain + lustful = major_stress_impact_loss + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = chaste + } + modifier = { + add = -50 + would_be_sinful_adulterer_trigger = yes + relation_with_character_is_sodomy_in_faith_trigger = { + CHARACTER = scope:pretty_peasant + FAITH = root.faith + } + has_trait = zealous + } + } + } + + option = { # Pass them by + name = tour_travel.1002.b + scope:pretty_peasant = { silent_disappearance_effect = yes } + stress_impact = { + callous = minor_stress_impact_gain + craven = minor_stress_impact_loss + honest = minor_stress_impact_loss + disloyal = minor_stress_impact_gain + lustful = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = lustful + } + } + } +} + +# A peasant does not show you proper ettiquette +tour_travel.1003 = { + type = character_event + title = tour_travel.1003.title + desc = tour_travel.1003.desc + + theme = travel_tour + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:rude_peasant + animation = fear + outfit_tags = { beggar_rags } + } + cooldown = { years = 2 } + trigger = { + has_activity_intent = justice_intent + is_location_valid_for_travel_event_on_land = yes + root.location.county = { + county_opinion <= -5 + county_control <= 90 + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = sadistic + } + modifier = { + factor = 0.5 + has_trait = compassionate + + } + } + + immediate = { + root.location.county = { + save_scope_as = angry_county_scope + save_scope_as = background_wilderness_scope # For theme + } + create_character = { + location = scope:angry_county_scope.title_province + template = peasant_character + culture = scope:angry_county_scope.culture + faith = scope:angry_county_scope.faith + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + save_scope_as = rude_peasant + } + } + + option = { # She/he must be punished. + name = tour_travel.1003.a + add_tyranny = minor_tyranny_gain + add_dread = medium_dread_gain + scope:angry_county_scope = { + change_county_control = 5 + add_county_modifier = { + modifier = scared_of_liege_modifier + years = 10 + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + arrogant = minor_stress_impact_loss + base = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = major_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = humble + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + option = { # Punish them *a lot* + name = tour_travel.1003.b + trigger = { + has_trait = torturer + } + add_tyranny = medium_tyranny_gain + add_dread = major_dread_gain + scope:angry_county_scope = { + change_county_control = 20 + add_county_modifier = { + modifier = terrified_of_liege_modifier + years = 10 + } + } + scope:rude_peasant = { + death = { + killer = root + death_reason = death_torture + } + } + stress_impact = { + sadistic = major_stress_impact_loss + arrogant = minor_stress_impact_loss + base = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = major_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + + option = { # Let it slide + name = tour_travel.1003.c + add_prestige = minor_prestige_loss + add_dread = medium_dread_loss + stress_impact = { + forgiving = minor_stress_impact_loss + callous = minor_stress_impact_gain + craven = minor_stress_impact_loss + arbitrary = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + after = { + if = { + limit = { + scope:rude_peasant = { is_alive = yes } + } + scope:rude_peasant = { silent_disappearance_effect = yes } + } + } +} + +# You decide to wash the feet of locals, royal touch +tour_travel.1004 = { + type = character_event + title = tour_travel.1004.title + desc = { + desc = tour_travel.1004.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = tour_travel.1004.desc.outro.christian + } + desc = tour_travel.1004.desc.outro + } + } + + theme = travel_tour + cooldown = { years = 2 } + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:diseased_peasant + animation = flirtation + outfit_tags = { beggar_rags } + } + trigger = { + is_location_valid_for_travel_event_on_land = yes + has_activity_intent = altruism_intent + faith = { religion_tag = christianity_religion } + is_governor = no + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { # This is heavily based on Christian things so other faiths should not necessarily be excluded, but should be less likely to see it. + factor = 0.1 + NOT = { + religion = { is_in_family = rf_abrahamic } + } + } + modifier = { # The faith should not be selfish + factor = 0 + faith = { + OR = { + trait_is_virtue = callous + trait_is_virtue = sadistic + trait_is_virtue = arrogant + } + } + } + } + + immediate = { + root.location = { + select_root_vegetable_effect = yes + county = { + save_scope_as = diseased_county_scope + save_scope_as = background_wilderness_scope # For theme + } + } + create_character = { + location = scope:diseased_county_scope.title_province + template = diseased_peasant_character + culture = scope:diseased_county_scope.culture + faith = scope:diseased_county_scope.faith + gender_female_chance = 50 + save_scope_as = diseased_peasant + } + } + + option = { # Wash the dirty dirty feet of the diseased peasant + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_deviant_trigger = yes } + desc = tour_travel.1004.a.tarantino + } + desc = tour_travel.1004.a + } + } + } + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + random = { + chance = 5 + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + scope:diseased_county_scope = { + change_county_control = 5 + add_county_modifier = { + modifier = sacred_touch + years = 10 + } + } + stress_impact = { + base = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + deviant = major_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + } + } + + option = { # I could do this every day + name = tour_travel.1004.b + trigger = { + is_deviant_trigger = yes + matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:diseased_peasant CHARACTER_2 = root } + } + add_prestige = medium_prestige_loss + add_piety = medium_piety_gain + random = { + chance = 5 + show_as_tooltip = { add_trait = ill } + hidden_effect = { + trigger_event = { + id = health.1001 + days = { 3 10 } + } + } + } + scope:diseased_county_scope = { + change_county_control = 5 + add_county_modifier = { + modifier = sacred_touch + years = 10 + } + } + set_relation_lover = scope:diseased_peasant + add_courtier = scope:diseased_peasant + stress_impact = { + base = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + deviant = massive_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arrogant + has_trait = paranoid + } + } + } + } + + option = { # Just a light touch on the forehead + name = tour_travel.1004.c + add_piety = minor_piety_gain + scope:diseased_county_scope = { + change_county_control = 2 + add_county_modifier = { + modifier = sacred_touch + years = 2 + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0.5 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + + option = { # I will not be reduced to touching filthy peasants + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_vegetarian_trigger = yes } + desc = tour_travel.1004.d.two_veg + } + desc = tour_travel.1004.d.meat + } + } + } + add_piety = minor_piety_loss + stress_impact = { + forgiving = minor_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + after = { + if = { + limit = { + scope:diseased_peasant = { + is_alive = yes + employer != root + } + } + scope:diseased_peasant = { silent_disappearance_effect = yes } + } + } +} + +# Locals beg for your royal touch, royal touch +tour_travel.1005 = { + type = character_event + title = tour_travel.1005.title + desc = tour_travel.1005.desc + + theme = travel_tour + left_portrait = { + character = root + animation = personality_compassionate + } + cooldown = { years = 2 } + trigger = { + is_location_valid_for_travel_event_on_land = yes + has_activity_intent = altruism_intent + faith = { religion_tag = christianity_religion } + is_governor = no + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 2 + has_trait = zealous + } + } + + immediate = { + root.location.county = { + save_scope_as = county_to_bless_scope + } + } + + option = { # Hand out blessed coins + name = tour_travel.1005.a + remove_short_term_gold = medium_gold_value + add_piety = medium_piety_gain + scope:county_to_bless_scope = { + add_county_modifier = { + modifier = sacred_touch + years = 10 + } + } + stress_impact = { + profligate = medium_stress_impact_loss + greedy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + modifier = { + add = -50 + short_term_gold < medium_gold_value + } + } + } + + option = { # Sprinkle the locals with blessed water + name = tour_travel.1005.b + add_piety = minor_piety_gain + scope:county_to_bless_scope = { + change_county_control = 5 + add_county_modifier = { + modifier = sacred_touch + years = 5 + } + } + stress_impact = { + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + } + } + + option = { # Ride ahead! + name = tour_travel.1005.c + add_piety = minor_piety_loss + stress_impact = { + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } +} + +# Distribute alms in front of a local temple +tour_travel.1006 = { + type = character_event + title = tour_travel.1006.title + desc = tour_travel.1006.desc + + theme = travel_tour + override_background = { + reference = temple + } + + left_portrait = { + character = root + animation = personality_compassionate + } + cooldown = { years = 2 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + root.location.barony = { + title_province = { has_holding_type = church_holding } + } + has_activity_intent = altruism_intent + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 2 + has_trait = zealous + } + } + + immediate = { + root.location.barony = { + county = { save_scope_as = county_to_bless_scope } + holder = { save_scope_as = county_holder_to_bless_scope } + save_scope_as = church_barony_scope # For loc + } + } + + option = { # Hand out blessed coins + name = tour_travel.1006.a + remove_short_term_gold = medium_gold_value + add_piety = medium_piety_gain + scope:county_to_bless_scope = { + add_county_modifier = { + modifier = alms_distributed + years = 10 + } + } + stress_impact = { + profligate = medium_stress_impact_loss + greedy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + modifier = { + add = -50 + short_term_gold < medium_gold_value + } + } + } + + option = { # Give them nothing + name = tour_travel.1006.b + add_piety = minor_piety_loss + stress_impact = { + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + + option = { # Have the peasants thrown off the steps + name = tour_travel.1006.c + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + add_piety = medium_piety_loss + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } +} + +############################ +## Wise Woman chain +## 1007-1009 +############################ +# An attendee in your procession suggests seeing the Wise Woman/Man of CountyName +tour_travel.1007 = { + type = character_event + title = tour_travel.1007.title + desc = { + desc = tour_travel.1007.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_any_illness = yes + } + desc = tour_travel.1007.desc.mid.ill + } + triggered_desc = { + trigger = { + has_trait = pregnant + } + desc = tour_travel.1007.desc.mid.pregnant + } + triggered_desc = { + trigger = { + OR = { + has_trait = depressed + has_trait = lunatic + has_trait = possessed + } + } + desc = tour_travel.1007.desc.mid.psychological + } + triggered_desc = { + trigger = { + OR = { + has_trait = wounded + has_trait = maimed + has_trait = infirm + } + } + desc = tour_travel.1007.desc.mid.weakened + } + triggered_desc = { + trigger = { + has_trait = beauty_bad + } + desc = tour_travel.1007.desc.mid.ugly + } + } + desc = tour_travel.1007.desc.outro + } + + theme = travel_tour + left_portrait = { + character = root + + triggered_animation = { + trigger = { + has_any_illness = yes + } + animation = pain + } + animation = personality_rational + } + right_portrait = { + character = scope:superstituous_courtier_scope + animation = personality_compassionate + } + cooldown = { years = 2 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + root.location.barony = { + county = { + development_level <= 5 + } + title_province = { + OR = { # The location is somewhat remote + terrain = wetlands + terrain = forest + terrain = jungle + terrain = taiga + terrain = mountains + terrain = desert + terrain = desert_mountains + terrain = steppe + } + } + } + OR = { # There is something "wrong" with you or you're gregnant + has_any_illness = yes + has_trait = pregnant + has_trait = depressed + has_trait = lunatic + has_trait = possessed + has_trait = wounded + has_trait = maimed + has_trait = infirm + has_trait = beauty_bad + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_any_illness = yes + } + } + + immediate = { + random_courtier = { + save_scope_as = superstituous_courtier_scope + } + root.location.barony = { + save_scope_as = wise_woman_barony_scope # For loc + save_scope_as = background_wilderness_scope # For theme + } + create_character = { + location = scope:wise_woman_barony_scope.title_province + template = wise_woman_character + culture = scope:wise_woman_barony_scope.culture + faith = scope:wise_woman_barony_scope.faith + save_scope_as = wise_woman_scope + } + } + + option = { # Go see the wise woman + name = tour_travel.1007.a + remove_short_term_gold = minor_gold_value + custom_tooltip = { + text = go_see_wise_woman_tt + random_list = { + 65 = { # The wise woman is good and helpful + modifier = { # You're a cynic and less likely to believe her + has_trait = cynical + add = -25 + } + trigger_event = tour_travel.1008 + } + 35 = { # The wise woman is a total crackpot + trigger_event = tour_travel.1009 + } + } + } + stress_impact = { + stubborn = minor_stress_impact_gain # I'm fine! + craven = minor_stress_impact_gain # I'm afraid of doctors! + shy = minor_stress_impact_gain # I'm afraid of everyone! + paranoid = medium_stress_impact_gain + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + if = { + limit = { + NOT = { + faith = { has_doctrine_parameter = witchcraft_accepted } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = craven + has_trait = shy + has_trait = paranoid + has_trait = cynical + has_trait = arrogant + AND = { + NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } } + has_trait = zealous + } + } + } + modifier = { + add = -50 + short_term_gold < minor_gold_value + } + } + } + + option = { # F that + name = tour_travel.1007.b + stress_impact = { + base = minor_stress_impact_gain + humble = minor_stress_impact_gain + brave = medium_stress_impact_gain + trusting = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = brave + has_trait = trusting + has_trait = gregarious + } + } + } + } +} +# You feel helped by the wise woman +scripted_effect positive_wise_woman_healing_effect = { + if = { + limit = { + has_any_illness = yes + } + add_character_modifier = healed_by_wise_woman_modifier + } + else_if = { + limit = { + has_trait = pregnant + } + add_character_modifier = tended_by_wise_woman_modifier + } + else_if = { + limit = { + OR = { + has_trait = depressed + has_trait = lunatic + has_trait = possessed + } + } + add_character_modifier = balanced_by_wise_woman_modifier + } + else_if = { + limit = { + has_trait = beauty_bad + } + add_character_modifier = makeover_from_wise_woman_modifier + } +} +tour_travel.1008 = { + type = character_event + title = tour_travel.1008.title + desc = { + desc = tour_travel.1008.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_any_illness = yes + } + desc = tour_travel.1008.desc.mid.ill + } + triggered_desc = { + trigger = { + has_trait = pregnant + } + desc = tour_travel.1008.desc.mid.pregnant + } + triggered_desc = { + trigger = { + OR = { + has_trait = depressed + has_trait = lunatic + has_trait = possessed + } + } + desc = tour_travel.1008.desc.mid.psychological + } + triggered_desc = { + trigger = { + OR = { + has_trait = wounded + has_trait = maimed + has_trait = infirm + } + } + desc = tour_travel.1008.desc.mid.weakened + } + triggered_desc = { + trigger = { + has_trait = beauty_bad + } + desc = tour_travel.1008.desc.mid.ugly + } + } + desc = tour_travel.1008.desc.outro + } + + theme = travel_tour + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:wise_woman_scope + animation = personality_rational + } + + immediate = { + if = { + limit = { + employs_court_position = court_physician_court_position + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = current_physician + } + } + } + + option = { # Go see the wise woman + name = tour_travel.1008.a + positive_wise_woman_healing_effect = yes + stress_impact = { + base = medium_stress_impact_loss + cynical = minor_stress_impact_gain # This breaks my idea of what medicine is + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + + } + } + } + + option = { # Recruit her as your physician + name = tour_travel.1008.b + positive_wise_woman_healing_effect = yes + remove_treasury_or_gold = minor_treasury_or_gold_value + add_courtier = scope:wise_woman_scope + court_position_grant_effect = { + POS = court_physician + CANDIDATE = scope:wise_woman_scope + EMPLOYER = root + } + stress_impact = { + base = medium_stress_impact_loss + cynical = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = greedy + } + } + modifier = { + add = 50 + NOT = { employs_court_position = court_physician_court_position } + } + modifier = { + add = -50 + short_term_treasury_or_gold < minor_treasury_or_gold_value + } + } + } +} +# You feel that the Wise Woman did nothing +tour_travel.1009 = { + type = character_event + title = tour_travel.1009.title + desc = { + desc = tour_travel.1009.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_character_modifier = hurt_by_wise_woman_modifier + } + desc = tour_travel.1009.desc.mid.ill + } + triggered_desc = { + trigger = { + has_character_modifier = bad_makeover_from_wise_woman_modifier + } + desc = tour_travel.1009.desc.mid.ugly + } + desc = tour_travel.1009.desc.mid.nothing + } + desc = tour_travel.1009.desc.outro + } + + theme = travel_tour + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:wise_woman_scope + animation = personality_irrational + } + + immediate = { + random_list = { + 50 = { + # Wise Woman actively hurts you + if = { + limit = { + OR = { + has_any_illness = yes + has_trait = depressed + has_trait = lunatic + has_trait = possessed + has_trait = pregnant + has_trait = wounded + has_trait = maimed + has_trait = infirm + } + } + add_character_modifier = hurt_by_wise_woman_modifier + } + else_if = { + limit = { + has_trait = beauty_bad + } + add_character_modifier = bad_makeover_from_wise_woman_modifier + } + } + 50 = { + # Nothing happens + } + } + } + + option = { + name = tour_travel.1009.a + stress_impact = { + base = medium_stress_impact_loss + cynical = major_stress_impact_loss + } + ai_chance = { + base = 50 + } + } + + option = { # Have her executed! + name = tour_travel.1009.b + scope:wise_woman_scope = { + death = { + killer = root + death_reason = death_execution + } + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + just = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = just + } + } + } + } +} + +################################################## +# Visit an inn along the way +# by Veronica Pazos +# 3120 +################################################## + +scripted_trigger tour_travel_3120_valid_vassal = { + is_available_ai_adult = yes + any_memory = { } +} + +tour_travel.3120 = { + type = character_event + title = tour_travel.3120.t + desc = { + desc = tour_travel.3120.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_variable = inn_artifact_var } + desc = tour_travel.3120.desc.artifact + } + desc = tour_travel.3120.desc.fallback + } + } + + theme = travel_tour + override_background = { + reference = bp1_crossroads_inn + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = impatient + has_trait = arrogant + } + } + animation = boredom + } + animation = drink_goblet + } + cooldown = { years = 5 } + + right_portrait = { + character = scope:vassal_inn + animation = throne_room_conversation_1 + } + artifact = { + target = scope:vassal_artifact + position = lower_center_portrait + trigger = { has_variable = inn_artifact_var } + } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + has_activity_intent = reduce_stress_intent + is_adult = yes + any_pool_character = { + province = root.location + tour_travel_3120_valid_vassal = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { tour_travel_3120_valid_vassal = yes } + weight = { + base = 1 + modifier = { + add = 2 + is_powerful_vassal = yes + } + modifier = { + add = 2 + has_any_high_skill_rating = yes + } + modifier = { + add = 1 + any_memory = { has_memory_category = major } + } + } + save_scope_as = vassal_inn + random_memory = { + weight = { + base = 1 + modifier = { + add = 1 + has_memory_category = major + } + } + save_scope_as = vassal_memory + } + } + scope:vassal_inn = { get_quirk_character_effect = yes } #localization + if = { + limit = { + scope:vassal_inn = { any_character_artifact = { exists = yes } } + } + random = { + chance = 50 + set_variable = inn_artifact_var + scope:vassal_inn = { + random_character_artifact = { save_scope_as = vassal_artifact } + } + } + } + } + + option = { # I like you join me + name = tour_travel.3120.a + duel = { + skill = diplomacy + target = scope:vassal_inn + 50 = { #they join you! + desc = tour_travel.3120.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = tour_travel.3120.a.success + left_icon = scope:vassal_inn + add_courtier = scope:vassal_inn + } + } + 50 = { #they refuse + desc = tour_travel.3120.a.failure + send_interface_toast = { + title = tour_travel.3120.a.failure + left_icon = scope:vassal_inn + scope:vassal_inn = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 5 + } + } + } + } + } + + stress_impact = { + profligate = medium_stress_impact_loss + greedy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = sadistic + has_trait = callous + has_trait = arrogant + } + } + } + } + + option = { # I wanna learn from you + name = tour_travel.3120.b + if = { + limit = { + scope:vassal_inn = { intrigue >= high_skill_rating } + } + add_intrigue_skill = 1 + } + else_if = { + limit = { + scope:vassal_inn = { diplomacy >= high_skill_rating } + } + add_diplomacy_skill = 1 + } + else_if = { + limit = { + scope:vassal_inn = { martial >= high_skill_rating } + } + add_martial_skill = 1 + } + else_if = { + limit = { + scope:vassal_inn = { learning >= high_skill_rating } + } + add_learning_skill = 1 + } + else_if = { + limit = { + scope:vassal_inn = { stewardship >= high_skill_rating } + } + add_stewardship_skill = 1 + } + else = { + add_random_skill_point_effect = yes + } + stress_impact = { + greedy = minor_stress_impact_loss + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + + option = { # They give you something + name = tour_travel.3120.c + trigger = { + has_variable = inn_artifact_var + } + scope:vassal_artifact = { + set_owner = root + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + } + } + + after = { + remove_variable = inn_artifact_var + } +} + +################################################## +# A peasant complains about not having a job +# by Veronica Pazos +# 3130 +################################################## + +scripted_trigger tour_travel_3130_valid_vassal = { + is_available_ai_adult = yes +} + +scripted_trigger tour_travel_3130_valid_location = { + OR = { + has_building_or_higher = hunting_grounds_01 + has_building_or_higher = royal_garden_01 + has_building_or_higher = regimental_grounds_01 + has_building_or_higher = caravanserai_01 + has_building_or_higher = watermills_01 + has_building_or_higher = windmills_01 + } +} + +tour_travel.3130 = { + type = character_event + title = tour_travel.3130.t + desc = { + desc = tour_travel.3130.desc.intro + random_valid = { + triggered_desc = { + trigger = { + location = { + OR = { + has_building_or_higher = hunting_grounds_01 + has_building_or_higher = royal_garden_01 + has_building_or_higher = regimental_grounds_01 + } + } + } + desc = tour_travel.3130.desc.no_farms + } + triggered_desc = { + trigger = { + location = { + OR = { + has_building_or_higher = caravanserai_01 + has_building_or_higher = watermills_01 + has_building_or_higher = windmills_01 + } + } + } + desc = tour_travel.3130.desc.no_jobs + } + } + desc = tour_travel.3130.desc.outro + } + + theme = travel_tour + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = impatient + has_trait = arrogant + } + } + animation = dismissal + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = humble + has_trait = generous + } + } + animation = personality_compassionate + } + animation = personality_rational + } + right_portrait = { + character = scope:complaining_peasant + animation = beg + } + cooldown = { years = 2 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + location = { tour_travel_3130_valid_location = yes } + any_pool_character = { + province = root.location + tour_travel_3130_valid_vassal = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_activity_intent = justice_intent + } + } + + immediate = { + random_pool_character = { + province = root.location + limit = { tour_travel_3130_valid_vassal = yes } + save_scope_as = complaining_peasant + } + } + + option = { # Im sorry have some money + name = tour_travel.3130.a + pay_short_term_gold = { + target = scope:complaining_peasant + gold = minor_gold_value + } + if = { + limit = { + has_activity_intent = altruism_intent + } + add_piety = medium_piety_gain + } + add_piety = minor_piety_gain + stress_impact = { + profligate = medium_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 2 + OR = { + has_activity_intent = altruism_intent + has_trait = profligate + } + } + } + } + + option = { # You can come work my lands + name = tour_travel.3130.b + trigger = { + has_activity_intent = justice_intent + } + custom_tooltip = available_because_intent_tt + capital_province.county = { + add_county_modifier = { + modifier = peasant_influx_modifier + years = 10 + } + } + add_hook = { + type = loyalty_hook + target = scope:complaining_peasant + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_trait = zealous + } + } + modifier = { + factor = 2 + has_activity_intent = justice_intent + } + } + } + + option = { # F you lol + name = tour_travel.3130.c + + stress_impact = { + generous = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + has_activity_intent = altruism_intent + } + } + } + } +} + +################################################## +# Stop to visit a brothel +# by Veronica Pazos +# 3140 +################################################## + +scripted_trigger tour_travel_3140_valid_character = { + is_available_ai_adult = yes + is_attracted_to_gender_of = root + root = { is_attracted_to_gender_of = prev } + is_married = no + NOT = { has_sexuality = asexual } + NOR = { + has_trait = chaste + has_trait = celibate + } +} + +tour_travel.3140 = { + type = character_event + title = tour_travel.3140.t + desc = tour_travel.3140.desc + + theme = travel_tour + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = impatient + has_trait = arrogant + } + } + animation = flirtation_left + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = humble + has_trait = generous + } + } + animation = personality_compassionate + } + animation = personality_rational + } + right_portrait = { + character = scope:brothel_worker + animation = flirtation + } + override_background = { reference = bp1_crossroads_inn } + cooldown = { months = 3 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + has_activity_intent = lechery_intent + is_adult = yes + NOT = { has_sexuality = asexual } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = lustful + has_trait = rakish + } + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + tour_travel_3140_valid_character = yes + } + } + random_pool_character = { + province = root.location + limit = { tour_travel_3140_valid_character = yes } + save_scope_as = brothel_worker + } + } + else = { + create_character = { + template = generic_peasant_character + gender_female_chance = root_sexuality_female_chance + location = root.location + culture = root.location.culture + faith = root.location.faith + dynasty = none + save_scope_as = brothel_worker + } + } + scope:brothel_worker = { get_quirk_character_effect = yes } #localization + } + + option = { # Go + name = tour_travel.3140.a + add_piety = minor_piety_loss + add_character_modifier = { + modifier = brothel_stop_modifier + months = 3 + } + hidden_effect = { + random_list = { + 50 = { + trigger = { + is_attracted_to_men = yes + } + had_sex_with_unknown_effect = { + GENDER = male + } + } + 50 = { + trigger = { + is_attracted_to_women = yes + } + had_sex_with_unknown_effect = { + GENDER = female + } + } + } + } + stress_impact = { + base = medium_stress_impact_loss + lustful = medium_stress_impact_loss + chaste = major_stress_impact_gain + celibate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = celibate + } + } + modifier = { + factor = 0.5 + has_trait = zealous + } + } + } + + option = { # Don't go + name = tour_travel.3140.b + add_piety = minor_piety_gain + stress_impact = { + lustful = medium_stress_impact_gain + rakish = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = rakish + } + } + } + } +} + +################################################## +# 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. +# by Veronica Pazos +# 3110-3111 +################################################## +tour_travel.3110 = { + type = character_event + title = tour_travel.3110.t + desc = tour_travel.3110.desc + theme = travel_danger + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:ghino_di_tacco_scope + animation = happiness + } + override_background = { reference = corridor_day } + cooldown = { years = 2 } + + trigger = { + is_location_valid_for_travel_event_on_land = yes + location = { + province_owner ?= { + is_available_ai_adult = yes + NOR = { + this = root + is_liege_or_above_of = root + } + } + } + OR = { + NOT = { exists = scope:activity } + scope:activity = { + NOT = { has_activity_type = activity_tour } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + location = { save_scope_as = ghino_di_tacco_location } + location.province_owner = { save_scope_as = ghino_di_tacco_scope } + traveler_danger_xp_effect = { + MIN = 3 + MAX = 6 + } + } + + #Accept invite + option = { + name = tour_travel.3110.a + custom_tooltip = tour_travel.3110.a.tt + play_music_cue = mx_cue_banquet + trigger_event = tour_travel.3111 + stress_impact = { + comfort_eater = minor_stress_loss + drunkard = minor_stress_loss + lifestyle_reveler = medium_stress_loss + shy = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = shy + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + #Deny + option = { + name = tour_travel.3110.b + reverse_add_opinion = { + target = scope:ghino_di_tacco_scope + modifier = insult_opinion + opinion = -20 + } + stress_impact = { + trusting = medium_stress_impact_gain + gregarious = major_stress_impact_gain + gluttonous = major_stress_impact_gain + lifestyle_reveler = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + has_trait = trusting + } + modifier = { + factor = 0 + has_trait = gluttonous + } + modifier = { + factor = 0 + has_trait = gregarious + } + modifier = { + factor = 0 + has_trait = lifestyle_reveler + } + } + } + + #Accept and I shall provide the entertainment + option = { + name = tour_travel.3110.c + custom_tooltip = tour_travel.3110.a.tt + play_music_cue = mx_cue_banquet + trigger = { + current_travel_plan = { + any_entourage_character = { + has_court_position = court_jester_court_position + } + } + } + add_prestige = minor_prestige_gain + trigger_event = tour_travel.3111 + stress_impact = { + comfort_eater = minor_stress_loss + drunkard = minor_stress_loss + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + temperate = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + add = -25 + has_trait = humble + } + modifier = { + add = -50 + has_trait = shy + } + modifier = { + add = -50 + has_trait = temperate + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +scripted_trigger has_breaking_down_trait_trigger = { + OR = { + has_trait = craven + has_trait = contrite + has_trait = honest + has_trait = just + has_trait = loyal + has_trait = gallant + has_any_good_relationship_with_root_trigger = yes + } +} + +#Gentleman breaks down and confesses his plan +tour_travel.3111 = { + type = character_event + title = tour_travel.3111.t + desc = { + desc = tour_travel.3111.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes } + } + desc = tour_travel.3111.desc_breaking_down + } + triggered_desc = { + trigger = { + scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = no } + } + desc = tour_travel.3111.desc_committed + } + } + } + + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes } + OR = { + has_trait = wrathful + has_trait = callous + has_trait = vengeful + } + } + animation = anger + } + triggered_animation = { + trigger = { + scope:ghino_di_tacco_scope = { has_breaking_down_trait_trigger = yes } + } + animation = worry + } + animation = toast_goblet + } + right_portrait = { + character = scope:ghino_di_tacco_scope + triggered_animation = { + trigger = { + has_breaking_down_trait_trigger = yes + } + animation = grief + } + animation = toast_goblet + } + override_background = { reference = feast } + cooldown = { years = 10 } + + immediate = { + play_music_cue = mx_cue_banquet + } + + #Forgive and donate + option = { + name = tour_travel.3111.a + trigger = { + scope:ghino_di_tacco_scope = { + has_breaking_down_trait_trigger = yes + } + } + pay_short_term_gold = { + target = scope:ghino_di_tacco_scope + gold = minor_gold_value + } + scope:ghino_di_tacco_location = { + add_province_modifier = { + modifier = generous_donations_modifier + years = 10 + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + callous = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 0 + has_trait = avaricious + } + modifier = { + factor = 0 + has_trait = wrathful + } + modifier = { + factor = 0 + has_trait = callous + } + modifier = { + factor = 0 + has_trait = vengeful + } + } + } + + #Forgive but leave + option = { + name = tour_travel.3111.b + trigger = { + scope:ghino_di_tacco_scope = { + has_breaking_down_trait_trigger = yes + } + } + reverse_add_opinion = { + target = scope:ghino_di_tacco_scope + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + generous = medium_stress_impact_gain + callous = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0.25 + has_trait = compassionate + } + modifier = { + factor = 0.25 + has_trait = generous + } + modifier = { + factor = 0.5 + has_trait = forgiving + } + modifier = { + factor = 0 + has_trait = avaricious + } + modifier = { + factor = 0 + has_trait = wrathful + } + modifier = { + factor = 0 + has_trait = callous + } + modifier = { + factor = 0 + has_trait = vengeful + } + } + } + + #Demand a compensation + option = { + name = tour_travel.3111.c + trigger = { + scope:ghino_di_tacco_scope = { + has_breaking_down_trait_trigger = yes + } + } + scope:ghino_di_tacco_scope = { + pay_short_term_gold = { + target = root + gold = tiny_gold_value + } + } + progress_towards_rival_effect = { + REASON = rival_stole_from_me_banquet + CHARACTER = scope:ghino_di_tacco_scope + OPINION = default_rival_opinion + } + stress_impact = { + humble = minor_stress_impact_gain + calm = medium_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + generous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0.25 + has_trait = humble + } + modifier = { + factor = 0.25 + has_trait = calm + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = forgiving + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + #You ask your guards to arrest him + option = { + name = tour_travel.3111.d + trigger = { + current_travel_plan = { + has_travel_option = hire_experienced_mercenaries_option + } + } + imprison_character_effect = { + TARGET = scope:ghino_di_tacco_scope + IMPRISONER = root + } + add_dread = minor_dread_gain + stress_impact = { + just = medium_stress_impact_gain + calm = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + generous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = just + } + modifier = { + factor = 0 + has_trait = calm + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = forgiving + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + #He steals from you gottem + option = { + name = tour_travel.3111.e + trigger = { + scope:ghino_di_tacco_scope = { + has_breaking_down_trait_trigger = no + } + } + duel = { + skill = intrigue + target = scope:ghino_di_tacco_scope + 30 = { #you notice he's trying to steal + desc = tour_travel.3111.e.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = tour_travel.3111.e.success + left_icon = scope:ghino_di_tacco_scope + progress_towards_rival_effect = { + REASON = rival_stole_from_me_banquet + CHARACTER = scope:ghino_di_tacco_scope + OPINION = default_rival_opinion + } + } + } + 70 = { #he steals from you + desc = tour_travel.3111.e.failure + send_interface_toast = { + title = tour_travel.3111.e.failure + left_icon = scope:ghino_di_tacco_scope + pay_short_term_gold = { + target = scope:ghino_di_tacco_scope + gold = minor_gold_value + } + } + } + } + stress_impact = { + base = medium_stress_impact_gain + forgiving = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + #default/fallback option + } + } +} diff --git a/N3OW/events/activities/tournaments/veronica_local_events_2.txt b/N3OW/events/activities/tournaments/veronica_local_events_2.txt new file mode 100644 index 00000000..213e7ade --- /dev/null +++ b/N3OW/events/activities/tournaments/veronica_local_events_2.txt @@ -0,0 +1,1859 @@ +namespace = ep2_locale_events + +# You flex to impress someone +# by Veronica Pazos + +scripted_trigger ep2_locale_events_5020_valid_lover = { + this != root + is_ai = yes + is_alive = yes + OR = { + has_relation_lover = root + is_spouse_of = root + } + activity_is_valid_tournament_contestant = no +} + +ep2_locale_events.5020 = { + type = activity_event + title = ep2_locale_events.5020.t + desc = ep2_locale_events.5020.desc + theme = tournament_grounds + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:impressed_lover + animation = flirtation + } + lower_center_portrait = scope:impressed_rival + cooldown = { years = 1 } + + trigger = { + activity_is_competing_trigger = yes + scope:activity = { + has_active_locale = tournament_locale_tournament_grounds + any_attending_character = { # lover + ep2_locale_events_5020_valid_lover = yes + } + any_guest_subset_current_phase = { # rival + name = contestant + is_ai = yes + is_healthy = yes + this != root + } + } + activity_tournament_prowess_contest_trigger = yes + } + + immediate = { + if = { + limit = { + has_activity_intent = woo_attendee_intent + intent_target ?= { is_alive = yes } + } + intent_target = { save_scope_as = impressed_lover } + } + else = { + scope:activity = { + random_attending_character = { + limit = { ep2_locale_events_5020_valid_lover = yes } + weight = { + base = 1 + modifier = { + add = 100 + is_spouse_of = root + } + modifier = { + add = 2 + has_relation_soulmate = root + } + } + save_scope_as = impressed_lover + } + } + } + scope:activity = { + random_guest_subset_current_phase = { + name = contestant + limit = { + is_ai = yes + is_healthy = yes + this != root + activity_is_competing_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 100 + has_relation_rival = root + } + activity_recurring_character_weight_modifier = { VALUE = 50 } + } + save_scope_as = impressed_rival + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_activity_intent = win_contest_intent + has_activity_intent = woo_attendee_intent + } + } + } + + # Impress your lover + option = { + name = ep2_locale_events.5020.a + duel = { + skill = prowess + value = average_skill_rating + 50 = { + desc = ep2_locale_events.5020.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep2_locale_events.5020.a.success + left_icon = root + right_icon = scope:impressed_lover + if = { + limit = { + NOT = { has_relation_wedding_good_fertility = scope:impressed_lover } + } + custom_tooltip = { + text = ep2_locale_events.5020.a.success.tt + set_relation_wedding_good_fertility = scope:impressed_lover + } + } + else = { + add_character_modifier = { + modifier = tournament_ground_flexing + years = 10 + } + } + } + } + 50 = { + desc = ep2_locale_events.5020.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = ep2_locale_events.5020.a.failure + left_icon = root + right_icon = scope:impressed_lover + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + callous = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = callous + has_trait = vengeful + has_trait = sadistic + } + } + } + } + + # Impress your rival + option = { + name = ep2_locale_events.5020.b + duel = { + skill = prowess + target = scope:impressed_rival + 50 = { + desc = ep2_locale_events.5020.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep2_locale_events.5020.b.success + left_icon = root + right_icon = scope:impressed_rival + scope:impressed_rival = { + activity_tournament_change_contestant_score_effect = { SCORE = decrease_major } + } + } + } + 50 = { + desc = ep2_locale_events.5020.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = ep2_locale_events.5020.b.failure + left_icon = root + right_icon = scope:impressed_rival + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + calm = medium_stress_impact_gain + humble = medium_stress_impact_gain + lustful = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = calm + has_trait = forgiving + has_trait = lustful + } + } + } + } + + # I'm doing this for MYSELF + option = { + name = ep2_locale_events.5020.c + trigger = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_minor } + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + lustful = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + has_trait = lustful + } + } + } + } +} + +# Two moons appear in the sky, based on the accounts of John of Worcester 1106 +# by Veronica Pazos + +scripted_effect ep2_locale_events_1520_superstitious_effect = { + if = { + limit = { + NOT = { has_character_modifier = bp1_superstition_modifier } + is_ai = no + } + random = { + chance = 50 + send_interface_toast = { + title = ep2_locale_events.1520.superstitious + left_icon = root + add_character_modifier = bp1_superstition_modifier + } + } + } +} + +ep2_locale_events.1520 = { + type = activity_event + title = ep2_locale_events.1520.t + desc = ep2_locale_events.1520.desc + theme = tournament_locale_temple + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = cynical } + animation = disbelief + } + animation = admiration + } + right_portrait = { + character = scope:tournament_priest + animation = shock + } + cooldown = { years = 5 } + override_background = { reference = temple } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_religious_building + } + NOT = { has_variable = had_1520_var } #once in a lifetime + } + + immediate = { + set_variable = had_1520_var + if = { + limit = { + scope:activity = { + exists = var:tournament_priest + var:tournament_priest = { is_alive = yes } + } + } + scope:activity = { + var:tournament_priest = { save_scope_as = tournament_priest } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + this != root + is_ai = yes + is_adult = yes + NOT = { has_trait = cynical } + } + weight = { + base = 1 + modifier = { + add = 5 + has_trait = zealous + } + modifier = { + add = 5 + has_trait = paranoid + } + } + save_scope_as = tournament_priest + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = paranoid + has_trait = zealous + } + } + } + + # It means that I'll win + option = { + name = ep2_locale_events.1520.a + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + } + else = { + add_martial_lifestyle_xp = major_lifestyle_xp + } + ep2_locale_events_1520_superstitious_effect = yes + stress_impact = { + humble = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_lifestyle = martial_lifestyle + has_activity_intent = win_contest_intent + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = cynical + } + } + } + } + + # It means that I'm gonna get money - round as a coin! + option = { + name = ep2_locale_events.1520.b + add_stewardship_lifestyle_xp = major_lifestyle_xp + ep2_locale_events_1520_superstitious_effect = yes + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = greedy + has_trait = avaricious + has_lifestyle = stewardship_lifestyle + } + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + # It's two beheaded people + option = { + name = ep2_locale_events.1520.c + add_intrigue_lifestyle_xp = major_lifestyle_xp + ep2_locale_events_1520_superstitious_effect = yes + stress_impact = { + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + has_lifestyle = intrigue_lifestyle + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = calm + } + } + } + } + + # I know what this is + option = { + name = ep2_locale_events.1520.d + trigger = { + learning >= high_skill_rating + } + show_as_unavailable = { + learning < high_skill_rating + } + add_character_modifier = tournament_astronomy_modifier #forever + stress_impact = { + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + learning >= high_skill_rating + } + modifier = { + factor = 0 + has_trait = ambitious + } + } + } + + # It means nothing + option = { + name = ep2_locale_events.1520.e + stress_impact = { + base = medium_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = cynical + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } +} + +# People at the camp are falling ill +# by Veronica Pazos + +ep2_locale_events.3010 = { + type = activity_event + title = ep2_locale_events.3010.t + desc = ep2_locale_events.3010.desc + theme = tournament_locale_camp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + animation = disbelief + } + right_portrait = { + character = scope:alerted_physician + animation = disgust + } + cooldown = { years = 1 } + override_background = { reference = army_camp } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_visitor_camp + any_attending_character = { + this != root + activity_is_valid_tournament_contestant = yes + count >= 2 #there's someone to investigate, and someone to approve in the follow up + } + } + } + + immediate = { + if = { + limit = { + scope:activity = { + any_attending_character = { + this != ROOT + has_court_position = court_physician_court_position + } + } + } + scope:activity = { + random_attending_character = { + limit = { + this != ROOT + has_court_position = court_physician_court_position + } + save_scope_as = alerted_physician + } + } + } + else = { + scope:activity = { + ordered_attending_character = { + limit = { + this != root + } + order_by = { + value = learning + if = { + limit = { + has_trait = lifestyle_physician + } + add = 15 + } + if = { + limit = { + has_trait = whole_of_body + } + add = 10 + } + if = { + limit = { + has_trait = lifestyle_herbalist + } + add = 5 + } + } + save_scope_as = alerted_physician + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:activity = { + any_attending_character = { + this != ROOT + has_court_position = court_physician_court_position + } + } + } + } + + # There must be an explanation + option = { + name = ep2_locale_events.3010.a + scope:alerted_physician = { + duel = { + skill = learning + value = average_skill_rating + 50 = { + desc = ep2_locale_events.3010.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = ep2_locale_events.3010.a.success + right_icon = scope:alerted_physician + custom_tooltip = { + text = ep2_locale_events.3010.a.success.tt + trigger_event = ep2_locale_events.3011 + } + } + } + } + 50 = { + desc = ep2_locale_events.3010.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = ep2_locale_events.3010.a.failure + right_icon = scope:alerted_physician + } + } + } + } + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + # It's a curse! + option = { + name = ep2_locale_events.3010.b + flavor = ep2_locale_events.3010.b.flavor + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + else = { + add_character_modifier = { + modifier = tournament_not_cursed_modifier + years = 10 + } + } + add_piety = minor_piety_loss + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = compassionate + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = calm + has_trait = paranoid + } + } + } + } + + # If paranoid you think someone is sabotaging the tournament and coming for you + option = { + name = ep2_locale_events.3010.c + trigger = { has_trait = paranoid } + add_character_modifier = { + modifier = tournament_not_cursed_modifier + years = 10 + } + stress_impact = { + paranoid = major_stress_impact_loss #you caught them + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = cynical + } + } + } + } + + # Well, not my problem + option = { + name = ep2_locale_events.3010.d + if = { + limit = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + add_dread = minor_dread_gain + } + stress_impact = { + base = minor_stress_impact_loss + callous = major_stress_impact_loss + sadistic = major_stress_impact_loss + gregarious = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + } + } + } + } +} + +#You discover people dumping their waste into the stream + +scripted_effect ep2_locale_events_3011_warning_effect = { + if = { + limit = { + scope:activity = { + any_attending_character = { + this != root + activity_is_valid_tournament_contestant = yes + } + } + } + scope:activity = { + random_attending_character = { + limit = { + this != root + activity_is_valid_tournament_contestant = yes + } + weight = { + base = 1 + modifier = { + add = 100 + is_powerful_vassal_of = root + } + modifier = { + add = 50 + is_vassal_of = root + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + save_scope_as = vassal_1 + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + this != root + activity_is_valid_tournament_contestant = yes + this != scope:vassal_1 + } + } + } + scope:activity = { + random_attending_character = { + limit = { + this != root + activity_is_valid_tournament_contestant = yes + this != scope:vassal_1 + } + weight = { + base = 1 + modifier = { + add = 100 + is_powerful_vassal_of = root + } + modifier = { + add = 50 + is_vassal_of = root + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + save_scope_as = vassal_2 + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + this != root + activity_is_valid_tournament_contestant = yes + this != scope:vassal_1 + this != scope:vassal_2 + } + } + } + scope:activity = { + random_attending_character = { + limit = { + this != root + activity_is_valid_tournament_contestant = yes + this != scope:vassal_1 + this != scope:vassal_2 + } + weight = { + base = 1 + modifier = { + add = 100 + is_powerful_vassal_of = root + } + modifier = { + add = 50 + is_vassal_of = root + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + save_scope_as = vassal_3 + } + } + } +} + +ep2_locale_events.3011 = { + type = activity_event + title = ep2_locale_events.3011.t + desc = ep2_locale_events.3011.desc + theme = tournament_locale_camp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + animation = disgust + } + right_portrait = { + character = scope:alerted_physician + animation = laugh + } + override_background = { reference = army_camp } + + # Tell them to stop + option = { + name = ep2_locale_events.3011.a + ep2_locale_events_3011_warning_effect = yes + stress_impact = { + ambitious = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = callous + has_trait = sadistic + has_trait = just + } + } + } + } + + # Let them go on so you can win + option = { + name = { + trigger = { + scope:activity = { + any_guest_subset_current_phase = { #participating + name = contestant + this = root + } + } + } + text = ep2_locale_events.3011.b.contestant + } + name = { + trigger = { exists = scope:contest_champion } + text = ep2_locale_events.3011.b.champion + } + name = { + trigger = { + scope:activity = { + NOT = { + any_guest_subset_current_phase = { + name = contestant + this = root + } + } + } + NOT = { exists = scope:contest_champion } + } + text = ep2_locale_events.3011.b + } + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + else_if = { + limit = { + exists = scope:contest_champion + scope:contest_champion = { activity_is_competing_trigger = yes } + } + scope:contest_champion = { + activity_tournament_change_contestant_score_effect = { SCORE = increase_medium } + } + } + else = { + if = { + limit = { has_lifestyle = intrigue_lifestyle } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + add_character_modifier = { + modifier = tournament_not_cursed_modifier + years = 20 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = ambitious + } + } + modifier = { + factor = 1.5 + has_trait = arrogant + } + } + } +} + +# Do you wanna buy new horseshoes? +# by Veronica Pazos + +ep2_locale_events.3510 = { + type = activity_event + title = ep2_locale_events.3510.t + desc = ep2_locale_events.3510.desc + theme = tournament_locale_forge + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:farrier + animation = marshal + } + artifact = { + target = scope:horseshoe_artifact + position = lower_center_portrait + } + cooldown = { years = 1 } + override_background = { reference = armory } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_artisans + OR = { + has_current_phase = tournament_phase_joust + has_current_phase = tournament_phase_melee + has_current_phase = tournament_phase_horse_race + } + exists = var:tournament_farrier + var:tournament_farrier = { is_alive = yes } + } + } + + immediate = { + scope:activity = { + var:tournament_farrier = { save_scope_as = farrier } + } + hidden_effect = { + scope:farrier = { + create_artifact = { + name = good_luck_horseshoe_artifact + description = good_luck_horseshoe_artifact_desc + type = miscellaneous + visuals = small_box + modifier = artifact_stress_gain_2_modifier + save_scope_as = horseshoe_artifact + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:activity = { + any_guest_subset_current_phase = { #you're participating + name = contestant + this = root + } + } + } + } + + # Buy them for you + option = { + name = ep2_locale_events.3510.a + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + } + else = { + add_martial_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { is_ai = no } + random_list = { + 10 = { + send_interface_toast = { + title = ep2_locale_events.3510.a.prowess + left_icon = root + add_prowess_skill = 1 + } + } + 5 = { + send_interface_toast = { + title = ep2_locale_events.3510.a.martial + left_icon = root + add_martial_skill = 1 + } + } + 10 = { + send_interface_toast = { + title = ep2_locale_events.3510.a.prestige + left_icon = root + add_prestige = minor_prestige_gain + } + } + } + } + } + pay_short_term_gold = { + target = scope:farrier + gold = { + value = minor_gold_value + max = 15 + } + } + stress_impact = { + humble = medium_stress_impact_gain + greedy = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = greedy + has_trait = generous + } + } + } + } + + # Buy them for your knights + option = { + name = ep2_locale_events.3510.b + add_character_modifier = { + modifier = tournament_new_horseshoes_modifier + years = 20 + } + every_active_accolade = { + custom = custom.every_acclaimed_knight + add_glory = minor_glory_gain + } + if = { + limit = { activity_is_competing_trigger = yes } + activity_tournament_change_contestant_score_effect = { SCORE = decrease_medium } + } + pay_short_term_gold = { + target = scope:farrier + gold = { + value = medium_gold_value + max = 25 + } + } + stress_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = greedy + } + } + modifier = { + factor = 1.5 + OR = { + has_trait = generous + has_trait = gregarious + } + } + } + } + + # They're good luck! + option = { + name = ep2_locale_events.3510.c + scope:horseshoe_artifact = { set_owner = root } + pay_short_term_gold = { + target = scope:farrier + gold = { + value = minor_gold_value + max = 5 + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + cynical = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = ambitious + } + } + modifier = { + factor = 1.5 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + # Nah + option = { + name = ep2_locale_events.3510.d + stress_impact = { + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + modifier = { + factor = 0.5 + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + } + } +} + +# Visit to the local churchyard +# by Veronica Pazos + +ep2_locale_events.1530 = { + type = activity_event + title = ep2_locale_events.1530.t + desc = { + desc = ep2_locale_events.1530.desc.intro + first_valid = { + triggered_desc = { + trigger = { + age <= 25 + } + desc = ep2_locale_events.1530.desc.young + } + triggered_desc = { + trigger = { + age >= 26 + age <= 40 + } + desc = ep2_locale_events.1530.desc.middle + } + triggered_desc = { + trigger = { + age > 40 + } + desc = ep2_locale_events.1530.desc.old + } + } + } + theme = tournament_locale_temple + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = callous + } + } + animation = boredom + } + triggered_animation = { + trigger = { + has_trait = deviant + } + animation = flirtation_left + } + animation = personality_honorable + } + cooldown = { years = 1 } + override_background = { reference = temple } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_religious_building + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + learning >= high_skill_rating + } + modifier = { + factor = 2 + scope:activity = { has_current_phase = tournament_phase_recital } + } + modifier = { + factor = 1.5 + piety_level >= medium_piety_level + } + } + + # Try to find an ancestor + option = { + name = ep2_locale_events.1530.a + trigger = { exists = dynasty } + random_list = { + 10 = { #you find someone + desc = ep2_locale_events.1530.a.success + show_chance = no + modifier = { + factor = 2 + location.culture = root.culture + } + modifier = { + factor = 2 + exists = dynasty + dynasty.dynasty_prestige_level <= low_dynasty_prestige_level + } + send_interface_toast = { + title = ep2_locale_events.1530.a.success + left_icon = root + dynasty ?= { add_dynasty_prestige = medium_dynasty_prestige_value } + } + } + 20 = { #you don't + desc = ep2_locale_events.1530.a.failure + show_chance = no + modifier = { + factor = 2 + dynasty.dynasty_prestige_level >= high_dynasty_prestige_level + } + send_interface_toast = { + title = ep2_locale_events.1530.a.failure + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + modifier = { + factor = 0 + prestige <= minor_prestige_value + } + } + } + + # Reflect + option = { + name = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + text = ep2_locale_events.1530.b.christian + } + name = { + trigger = { NOT = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } } + text = ep2_locale_events.1530.b.fallback + } + add_piety = medium_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + } + } + modifier = { + factor = 2 + piety_level >= medium_piety_level + } + } + } + + # Practice for a recital + option = { + name = ep2_locale_events.1530.c + trigger = { + scope:activity = { has_current_phase = tournament_phase_recital } + activity_is_competing_trigger = yes + } + activity_tournament_change_contestant_score_effect = { SCORE = increase_major } + stress_impact = { + lifestyle_poet = medium_stress_impact_loss + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = lifestyle_poet + } + } + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + # If you're a deviant you... well + option = { + name = ep2_locale_events.1530.d + trigger = { has_trait = deviant } + stress_impact = { + base = major_stress_impact_loss + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + modifier = { + factor = 2 + has_trait = deviant + } + modifier = { + factor = 0.5 + OR = { + has_trait = compassionate + has_trait = calm + has_trait = ambitious + } + } + } + } +} + +# Ask the weaponsmith to improve your weapon +# by Veronica Pazos + +ep2_locale_events.4540 = { + type = activity_event + title = ep2_locale_events.4540.t + desc = { + desc = ep2_locale_events.4540.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + any_guest_subset_current_phase = { #you're participating + name = contestant + this = root + } + } + } + desc = ep2_locale_events.4540.desc.contestant + } + triggered_desc = { + trigger = { + scope:activity = { + NOT = { + any_guest_subset_current_phase = { + name = contestant + this = root + } + } + } + } + desc = ep2_locale_events.4540.desc.fallback + } + } + desc = ep2_locale_events.4540.desc.outro + } + theme = tournament_locale_forge + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:weaponsmith + animation = marshal + } + artifact = { + target = scope:my_weapon + position = lower_center_portrait + } + cooldown = { years = 1 } + override_background = { reference = armory } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_artisans + exists = var:tournament_weaponsmith + var:tournament_weaponsmith = { is_alive = yes } + } + any_character_artifact = { #you have a weapon + artifact_slot_type = primary_armament + } + } + + immediate = { + scope:activity = { + var:tournament_weaponsmith = { save_scope_as = weaponsmith } + } + if = { + limit = { #equipped artifacts first + any_equipped_character_artifact = { + artifact_slot_type = primary_armament + } + } + random_equipped_character_artifact = { + limit = { + artifact_slot_type = primary_armament + } + save_scope_as = my_weapon + } + } + else_if = { #then unequipped but illustrious + limit = { + any_character_artifact = { + artifact_slot_type = primary_armament + rarity = illustrious + } + } + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + rarity = illustrious + } + save_scope_as = my_weapon + } + } + else = { #then random + random_character_artifact = { + limit = { artifact_slot_type = primary_armament } + save_scope_as = my_weapon + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:activity = { + any_guest_subset_current_phase = { #you're participating + name = contestant + this = root + } + } + } + } + + # Sharpen sword + option = { + name = ep2_locale_events.4540.a + custom_tooltip = ep2_locale_events.4540.a.tt + pay_short_term_gold = { + target = scope:weaponsmith + gold = { + value = medium_gold_value + max = 20 + } + } + scope:my_weapon = { + set_artifact_description = ep2_locale_events_artifact_sharp_desc + add_artifact_modifier = artifact_tournament_sharpened_blade_modifier + } + stress_impact = { + greedy = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + } + } + } + } + + # Inscribe a carving - prayer + option = { + name = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + text = ep2_locale_events.4540.b.christian + } + name = { + trigger = { + NOT = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + text = ep2_locale_events.4540.b.fallback + } + pay_short_term_gold = { + target = scope:weaponsmith + gold = { + value = medium_gold_value + max = 20 + } + } + scope:my_weapon = { + set_artifact_description = ep2_locale_events_artifact_prayer_desc + add_artifact_modifier = artifact_monthly_piety_7_modifier + } + stress_impact = { + cynical = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = greedy + has_trait = arrogant + } + } + } + } + + # Inscribe your motto + option = { + name = ep2_locale_events.4540.c + pay_short_term_gold = { + target = scope:weaponsmith + gold = { + value = medium_gold_value + max = 20 + } + } + scope:my_weapon = { + set_artifact_description = ep2_locale_events_artifact_motto_desc + add_artifact_modifier = artifact_monthly_prestige_7_modifier + } + stress_impact = { + greedy = medium_stress_impact_gain + humble = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = zealous + has_trait = humble + } + } + } + } + + # Nah Im fine + option = { + name = ep2_locale_events.4540.d + stress_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +# Bet on a game of cards, based on a 15th c. card game / Repeatable +# by Veronica Pazos + +scripted_trigger ep2_locale_events_1060_valid_gambler = { + this != ROOT + is_physically_able_ai_adult = yes + NOT = { has_trait = temperate } +} + +scripted_effect ep2_locale_events_1060_betting_effect = { + random_list = { + 50 = { + desc = ep2_locale_events.1060.a.success + show_chance = no + send_interface_toast = { + title = ep2_locale_events.1060.a.success + left_icon = root + add_gold = { + value = tiny_gold_value + max = 5 + multiply = 2 + } + } + } + 50 = { + desc = ep2_locale_events.1060.a.failure + show_chance = no + send_interface_toast = { + title = ep2_locale_events.1060.a.failure + left_icon = root + } + } + } + pay_short_term_gold = { + target = scope:tournament_gambler + gold = { + value = tiny_gold_value + max = 5 + } + } +} + +ep2_locale_events.1060 = { + type = activity_event + title = ep2_locale_events.1060.t + desc = ep2_locale_events.1060.desc + theme = tournament_locale_tavern + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = diligent + has_trait = temperate + has_trait = zealous + } + } + animation = dismissal + } + animation = laugh + } + right_portrait = { + character = scope:tournament_gambler + animation = chess_cocky + } + override_background = { reference = tavern } + + trigger = { + scope:activity = { + has_active_locale = tournament_locale_tavern + any_attending_character = { + ep2_locale_events_1060_valid_gambler = yes + } + } + } + + immediate = { + scope:activity = { + random_attending_character = { + limit = { + ep2_locale_events_1060_valid_gambler = yes + } + weight = { + base = 1 + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 2 + has_trait = profligate + } + } + save_scope_as = tournament_gambler + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 2 + has_activity_intent = reduce_stress_intent + } + } + + # Bet that you have a higher card + option = { + name = ep2_locale_events.1060.a + ep2_locale_events_1060_betting_effect = yes + stress_impact = { + base = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + greedy = medium_stress_impact_gain + temperate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = greedy + has_trait = zealous + can_make_expensive_purchase_trigger = { PRICE = minor_gold_value } + } + } + } + } + + # Bet that you have a lower card + option = { + name = ep2_locale_events.1060.b + ep2_locale_events_1060_betting_effect = yes + stress_impact = { + base = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + greedy = medium_stress_impact_gain + temperate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = greedy + has_trait = zealous + can_make_expensive_purchase_trigger = { PRICE = minor_gold_value } + } + } + } + } + + # Don't bet + option = { + name = ep2_locale_events.1060.c + add_piety = minor_piety_gain + stress_impact = { + arbitrary = medium_stress_impact_gain + profligate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = zealous + has_trait = humble + } + } + } + } +} diff --git a/N3OW/events/artifacts/artifact_events.txt b/N3OW/events/artifacts/artifact_events.txt new file mode 100644 index 00000000..21c64d65 --- /dev/null +++ b/N3OW/events/artifacts/artifact_events.txt @@ -0,0 +1,4314 @@ + +namespace = artifact + +# An artifact has changed owners. +artifact.0011 = { + scope = artifact + hidden = yes + + trigger = { + NOT = { has_variable = suppress_artifact_notifications } + } + + immediate = { + save_scope_as = this_artifact + if = { + limit = { + scope:old_owner = { is_alive = yes } + } + scope:old_owner = { + send_interface_toast = { + type = msg_artifact_lost + title = artifact.0011.t + left_icon = scope:owner + right_icon = scope:this_artifact + custom_tooltip = artifact.0011.tooltip + } + } + } + + scope:owner = { + trigger_event = { + id = artifact.0012 + days = 0 + } + } + hidden_effect = { + if = { + limit = { has_variable = desecrated_artifact_var } + remove_variable = desecrated_artifact_var + } + } + } +} + +artifact.0012 = { + hidden = yes + + immediate = { + scope:owner = { + send_interface_toast = { + type = msg_artifact_gained + right_icon = scope:this_artifact + } + } + } +} + + + +# An artifact has been destroyed through damage! +artifact.0021 = { + scope = artifact + hidden = yes + + immediate = { + save_scope_as = this_artifact + if = { + limit = { + exists = scope:owner + scope:owner = { is_alive = yes } + } + scope:owner = { + send_interface_toast = { + title = artifact.0021.t + right_icon = scope:this_artifact + destroy_artifact = scope:this_artifact + } + } + } + } +} + +################################################## +# The Bell Tolls / Peace and Quiet +# by Ewan Cowhig Croft +# 0101 - 0110 +################################################## + +# The Bells of Santiago de Compostela get a new lease on life. +artifact.0101 = { + scope = artifact + hidden = yes + + trigger = { + has_variable = artefact_santiago_bells + } + + immediate = { + # Islamic conversions. + if = { + limit = { + has_artifact_modifier = bells_of_santiago_modifier + scope:owner = { + OR = { + religion = religion:islam_religion + # Non-Christian Islamic syncretics also have a vested interest in getting in on this. + AND = { + faith = { has_doctrine = tenet_islamic_syncretism } + NOT = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + } + } + } + # Reforge into an aquamanile, for the first time. + if = { + limit = { var:artefact_santiago_bells = 0 } + scope:owner = { save_scope_as = reforger } + # We're using the miscellaneous category. + if = { + limit = { artifact_type = miscellaneous_when_not_court } + reforge_artifact = { + modifier = former_bells_of_santiago_modifier + template = fp2_santiago_aquamanile_template + type = miscellaneous_when_not_court + visuals = fp2_santiago_aquamanile + name = fp2_santiago_aquamanile + description = fp2_santiago_aquamanile_desc + } + } + # We're into court artefacts. + else = { + reforge_artifact = { + modifier = former_bells_of_santiago_modifier + template = fp2_santiago_aquamanile_template + type = jug + visuals = fp2_santiago_aquamanile + name = fp2_santiago_aquamanile + description = fp2_santiago_aquamanile_desc + } + } + change_variable = { + name = artefact_santiago_bells + add = 1 + } + } + # Reforge back into an aquamanile after them dastardly Christians de-jug'd it. + else_if = { + limit = { var:artefact_santiago_bells >= 1 } + scope:owner = { save_scope_as = reforger } + # We're using the miscellaneous category. + if = { + limit = { artifact_type = miscellaneous_when_not_court } + reforge_artifact = { + modifier = former_bells_of_santiago_modifier + template = fp2_santiago_aquamanile_template + type = miscellaneous_when_not_court + visuals = fp2_santiago_aquamanile + name = fp2_santiago_aquamanile + description = fp2_santiago_aquamanile_melted_desc + } + } + # We're into court artefacts. + else = { + reforge_artifact = { + modifier = former_bells_of_santiago_modifier + template = fp2_santiago_aquamanile_template + type = jug + visuals = fp2_santiago_aquamanile + name = fp2_santiago_aquamanile + description = fp2_santiago_aquamanile_melted_desc + } + } + change_variable = { + name = artefact_santiago_bells + add = 1 + } + # If we're high enough up the melting chain, start a tally. + if = { + limit = { var:artefact_santiago_bells >= 5 } + set_artifact_description = fp2_santiago_aquamanile_melted_tally_desc + } + } + } + # Christian conversions. + else_if = { + limit = { + has_artifact_modifier = former_bells_of_santiago_modifier + scope:owner = { + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + # Non-Islamic Christian syncretics also have a vested interest in getting in on this. + AND = { + faith = { has_doctrine = tenet_christian_syncretism } + NOT = { religion = religion:islam_religion } + } + } + } + } + # Reforge back into bells. + scope:owner = { save_scope_as = reforger } + # We're using the miscellaneous category. + if = { + limit = { artifact_type = miscellaneous_when_not_court } + reforge_artifact = { + modifier = bells_of_santiago_modifier + visuals = fp2_santiago_bells + template = fp2_santiago_bells_template + type = miscellaneous_when_not_court + name = fp2_santiago_bells + description = fp2_santiago_bells_melted_desc + } + } + # We're into court artefacts. + else = { + reforge_artifact = { + modifier = bells_of_santiago_modifier + visuals = fp2_santiago_bells + template = fp2_santiago_bells_template + type = sculpture + name = fp2_santiago_bells + description = fp2_santiago_bells_melted_desc + } + } + change_variable = { + name = artefact_santiago_bells + add = 1 + } + # If we're high enough up the melting chain, start a tally. + if = { + limit = { var:artefact_santiago_bells >= 4 } + set_artifact_description = fp2_santiago_bells_melted_tally_desc + } + } + } +} + +# An artifact is about to change owner from succession +# Handles damage taken, and notification for the inheritor +artifact.0031 = { + scope = artifact + hidden = yes + + immediate = { + save_scope_as = this_artifact + if = { + limit = { + has_variable = artifact_succession_title #Is this an artifact that should follow a title? + var:artifact_succession_title = { is_title_created = yes } #Does the title the artifact should follow exist? + scope:old_owner = var:artifact_succession_title.previous_holder #Is the old owner of the artifact also the holder of the title the artifact should follow? + NOR = { + AND = { + has_variable = banner_dynasty + var:banner_dynasty != scope:owner.dynasty + } + AND = { + has_variable = banner_house + var:banner_house != scope:owner.house + } + } + } + var:artifact_succession_title = { + holder = { + save_scope_as = new_owner + } + } + set_owner = { #The artifact goes to the heir to the title it should follow. In a fraction of a tick this will be the new title holder. + target = scope:new_owner + history = { + type = inherited + recipient = scope:new_owner + } + } + } + else_if = { + limit = { exists = var:banner_house.house_head } + set_owner = { + target = var:banner_house.house_head + history = { + type = inherited + recipient = var:banner_house.house_head + } + } + } + else_if = { #this effect fires before the dynasty head change, but after the scope:old_owner death, so scope:old_owner can be still a dynast + limit = { exists = var:banner_dynasty.dynast } + if = { + limit = { + scope:old_owner != var:banner_dynasty.dynast + } + var:banner_dynasty.dynast = { save_scope_as = new_banner_owner } + } + else = { #hence this + scope:old_owner.house.house_head = { + save_scope_as = new_banner_owner + } + } + set_owner = { + target = scope:new_banner_owner + history = { + type = inherited + recipient = scope:new_banner_owner + } + } + } + if = { + limit = { + NOR = { + #An equipped court artifact of previous owner + has_variable = equipped_court_succession + #A historicool artifact + has_variable = historical_unique_artifact + #Inherited with special title + has_variable = artifact_succession_title + #Inherited from close relative + scope:old_owner = { is_close_family_of = scope:owner } + #Inherited by election + AND = { + exists = scope:old_owner.primary_title + scope:old_owner.primary_title = { has_title_law_flag = elective_succession_law } + } + # Succession caused the heir to change primary + trigger_if = { + limit = { exists = scope:old_primary } + scope:old_primary = scope:owner.primary_title + } + trigger_else = { + always = yes + } + } + } + if = { + limit = { + scope:old_owner = { + OR = { + is_close_or_extended_family_of = scope:owner + is_great_grandchild_of = scope:owner + is_great_grandparent_of = scope:owner + } + } + artifact_durability > 1 # We want to avoid destroying an artifact with an already low durability + } + # Remove 50% of remaining durability + add_durability = { + value = artifact_durability + multiply = -0.50 + } + } + else_if = { + limit = { + NOT = { has_variable = artifact_succession_title } + } + random_list = { + 25 = { + # Remove 50% of remaining durability + add_durability = { + value = artifact_durability + multiply = -0.50 + } + } + 25 = { + # Remove 75% of remaining durability + add_durability = { + value = artifact_durability + multiply = -0.75 + } + } + 50 = { + # Remove 100% of remaining durability (do not destroy yet, will cause errors!) + set_variable = destroy_me + } + } + } + } + # Cleanup variables of equipped court artifacts + if = { + limit = { + has_variable = equipped_court_succession + } + remove_variable = equipped_court_succession + } + if = { + # If the artifact has no durability left, destroy it now. + limit = { + OR = { + exists = var:destroy_me + artifact_durability <= 0 + } + } + destroy_artifact = root + # NOTE: We must not run ANY script after we destroy an artifact, or we will cause errors + } + else_if = { + limit = { + NAND = { + exists = scope:owner.last_played_character + scope:owner.last_played_character = scope:old_owner + } + } + scope:owner = { + send_interface_toast = { + type = msg_artifact_gained + right_icon = scope:this_artifact + } + } + hidden_effect = { + if = { + limit = { has_variable = desecrated_artifact_var } + remove_variable = desecrated_artifact_var + } + } + } + } +} + +artifact.1000 = { + scope = artifact + hidden = yes + + immediate = { + if = { + #You took too long and your treasure map broke from decay! + limit = { has_variable = 1025_treasure_map } + save_scope_as = decayed_artifact + scope:owner = { trigger_event = ep3_contract_event.0040 } + } + else_if = { + # Artifact is a character artifact (not a court artifact) + limit = { + category = inventory + exists = scope:owner + scope:owner = { + has_royal_court = yes + is_alive = yes + } + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = regalia + artifact_slot_type = helmet + } + } + save_scope_as = this_artifact + scope:owner = { + trigger_event = { + id = artifact.1001 + days = 0 + } + } + } + else = { + trigger_event = { + id = artifact.0021 + days = 0 + } + } + } +} + +scripted_effect reforge_as_court_artifact_effect = { + hidden_effect_new_object = { + if = { + limit = { + artifact_type = axe + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = axe_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = hammer + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = hammer_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = spear + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = spear_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = mace + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = mace_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = dagger + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = dagger_court + decaying = no + } + } + else_if = { + limit = { + artifact_type = sword + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = sword_court + decaying = no + } + } + else_if = { + limit = { + artifact_slot_type = armor + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = armor_court + decaying = no + } + } + else_if = { + limit = { + artifact_slot_type = helmet + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = crown_court + decaying = no + } + } + else_if = { + limit = { + artifact_slot_type = regalia + } + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = regalia_court + decaying = no + } + } + else = { + reforge_artifact = { + type = pedestal + modifier = artifact_placeholder_modifier + visuals = small_box + decaying = no + } + } + + add_scaled_artifact_modifier_grandeur_small_effect = yes + add_scaled_artifact_modifier_prestige_effect = yes + } +} + +artifact.1001 = { + type = character_event + title = artifact.1001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.1001.desc.antiquarian + } + desc = artifact.1001.desc.servant + } + first_valid = { + triggered_desc = { + trigger = { scope:this_artifact = { artifact_slot_type = primary_armament } } + desc = artifact.1001.desc.weapon + } + desc = artifact.1001.desc.other + } + } + theme = stewardship_wealth_focus + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_tie + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + immediate = { + random_dummy_gender_servant_effect = yes #needed for loc + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + } + } + random_court_position_holder = { + type = antiquarian_court_position + save_scope_as = antiquarian + } + } + } + + option = { + name = artifact.1001.a + # Flag that this is free for DLC artefacts that could become courtly ones... + if = { + limit = { exists = scope:this_artifact.var:dlc_potential_court_artefact } + custom_tooltip = artifact.1001.a.tt.free + } + # ... or else costs a nominal fee. + else = { remove_short_term_gold = medium_gold_value } + scope:this_artifact = { + reforge_as_court_artifact_effect = yes + } + send_interface_toast = { + title = artifact.0012.t + left_icon = scope:this_artifact + show_as_tooltip = { + scope:this_artifact = { + set_owner = root + } + } + } + custom_tooltip = artifact.1001.a.tt + ai_chance = { + base = 100 + modifier = { + factor = 0 + scope:this_artifact = { + rarity = common + } + } + modifier = { + factor = 0 + is_at_war = yes + } + modifier = { + factor = 0 + gold < medium_gold_value + } + } + } + + option = { + name = artifact.1001.b + show_as_tooltip = { destroy_artifact = scope:this_artifact } + scope:this_artifact = { trigger_event = artifact.0021 } + ai_chance = { + base = 100 + modifier = { + add = -95 + scope:this_artifact = { + OR = { + rarity = illustrious + rarity = famed + } + } + } + } + } +} + +# Outcome of challenge to a duel for artifact + +scripted_effect artifact_2002_apply_effect = { + if = { + limit = { + scope:target = { + can_be_claimed_by = scope:sc_loser + } + } + scope:sc_loser = { + if = { + limit = { + OR = { + has_variable = remove_claim_flag + has_personal_artifact_claim = scope:target + } + } + if = { + limit = { + NOT = { has_variable = remove_claim_flag } + } + set_variable = remove_claim_flag + } + remove_personal_artifact_claim = scope:target + } + } + } + scope:target = { + if = { + limit = { + OR = { + has_variable = set_owner_flag + artifact_owner = scope:sc_loser + } + } + if = { + limit = { + NOT = { has_variable = set_owner_flag } + } + set_variable = set_owner_flag + } + set_owner = { + target = scope:sc_victor + history = { + actor = scope:sc_loser + recipient = scope:sc_victor + type = won_in_duel + } + } + } + } +} +artifact.2001 = { + hidden = yes + + immediate = { + # Fire the follow-up stuff; delay this by a day so the toasts appear _after_ the final event. + trigger_event = { + id = artifact.2002 + days = 1 + } + } +} + +artifact.2002 = { + hidden = yes + + immediate = { + artifact_2002_apply_effect = yes + # Send out a toast to the victor. + scope:sc_victor = { + send_interface_toast = { + title = perk_interaction.0101.victor_toast.t + left_icon = scope:sc_loser + right_icon = scope:target + show_as_tooltip = { artifact_2002_apply_effect = yes } + } + } + # And to the loser. + scope:sc_loser = { + send_interface_toast = { + title = perk_interaction.0101.loser_toast.t + left_icon = scope:sc_victor + right_icon = scope:target + show_as_tooltip = { artifact_2002_apply_effect = yes } + } + if = { + limit = { has_variable = remove_claim_flag } + remove_variable = remove_claim_flag + } + } + scope:target = { + if = { + limit = { has_variable = set_owner_flag } + remove_variable = set_owner_flag + } + } + } +} + +### Degraded Artifacts Events ### + +# Reuse Materials + +artifact.3000 = { + type = character_event + title = artifact.3000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian = { has_court_position = armorer_camp_officer } + } + desc = artifact.3000.desc.armorer_intro + } + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3000.desc.antiquarian_intro + } + desc = artifact.3000.desc.servant_intro + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3000.desc.antiquarian + } + desc = artifact.3000.desc.servant + } + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_win + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + artifact_type = sculpture + artifact_type = regalia + } + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + artifact_type = sculpture + artifact_type = regalia + } + } + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + artifact_type = sculpture + artifact_type = regalia + } + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + } + + # Option A: reuse + option = { + name = artifact.3000.a + if = { + limit = { + scope:this_artifact = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + } + } + } + add_character_modifier = artifact_3000_reusing_artifact_weapon_modifier + } + else_if = { + limit = { + scope:this_artifact = { + OR = { + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + artifact_type = sculpture + } + } + } + add_character_modifier = artifact_3000_reusing_artifact_wood_modifier + } + else_if = { + limit = { + scope:this_artifact = { + artifact_type = regalia + } + } + add_character_modifier = artifact_3000_reusing_artifact_jewels_modifier + } + destroy_artifact = scope:this_artifact + ai_chance = { + base = 100 + } + } + + # Option B: you can still save it + option = { + name = artifact.3000.b + if = { + limit = { exists = scope:antiquarian } + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = 7 + max = 60 + } + } + } + else = { + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = 4 + max = 50 + } + } + } + remove_short_term_gold = { + value = scope:this_artifact.artifact_durability + multiply = 1.5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + gold < scope:this_artifact.artifact_durability + add = -100 + } + } + } + + #Option C: get angry + option = { + name = artifact.3000.c + if = { + limit = { + exists = scope:antiquarian + } + scope:antiquarian = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + calm = minor_stress_impact_gain + trusting = minor_stress_impact_gain + irritable = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +artifact.3001 = { + type = character_event + title = artifact.3001.t + desc = artifact.3001.desc + theme = stewardship_wealth_focus + right_portrait = { + character = scope:inspiration_owner + animation = happiness + } + + weight_multiplier = { + base = 1 + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + scope:inspiration_owner = { + is_available_ai_adult = yes + } + OR = { + AND = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + scope:inspiration_sponsor = { + has_character_modifier = artifact_3000_reusing_artifact_weapon_modifier + } + } + AND = { + has_inspiration_type = artisan_inspiration + scope:inspiration_sponsor = { + has_character_modifier = artifact_3000_reusing_artifact_wood_modifier + } + } + AND = { + has_inspiration_type = smith_inspiration + scope:inspiration_sponsor = { + has_character_modifier = artifact_3000_reusing_artifact_jewels_modifier + } + } + } + } + } + + option = { + name = artifact.3001.a + if = { + limit = { + scope:inspiration = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + has_character_modifier = artifact_3000_reusing_artifact_weapon_modifier + } + add_gold = { + value = scope:inspiration.inspiration_gold_invested + multiply = 0.4 + } + remove_character_modifier = artifact_3000_reusing_artifact_weapon_modifier + } + else_if = { + limit = { + scope:inspiration = { + has_inspiration_type = artisan_inspiration + } + has_character_modifier = artifact_3000_reusing_artifact_wood_modifier + } + add_gold = { + value = scope:inspiration.inspiration_gold_invested + multiply = 0.3 + } + remove_character_modifier = artifact_3000_reusing_artifact_wood_modifier + } + else_if = { + limit = { + scope:inspiration = { + has_inspiration_type = smith_inspiration + } + has_character_modifier = artifact_3000_reusing_artifact_jewels_modifier + } + add_gold = { + value = scope:inspiration.inspiration_gold_invested + multiply = 0.3 + } + remove_character_modifier = artifact_3000_reusing_artifact_jewels_modifier + } + } +} + +# Sell it for gold + +artifact.3010 = { + type = character_event + title = artifact.3010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian = { has_court_position = armorer_camp_officer } + } + desc = artifact.3000.desc.armorer_intro + } + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3000.desc.antiquarian_intro + } + desc = artifact.3000.desc.servant_intro + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3010.desc.antiquarian + } + desc = artifact.3010.desc.servant + } + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = { + character = ROOT + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_win + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + } + + # Option A: sell to a scrap collector + option = { + name = artifact.3010.a + if = { + limit = { + exists = scope:antiquarian + } + add_gold = { + value = scope:this_artifact.artifact_wealth_quality_average_value + multiply = 3.5 + } + } + else = { + add_gold = { + value = scope:this_artifact.artifact_wealth_quality_average_value + multiply = 2.5 + } + } + hidden_effect = { destroy_artifact = scope:this_artifact } + custom_tooltip = artifact.3010.a.tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Option B: keep it + option = { + name = artifact.3010.b + ai_chance = { + base = 100 + } + } +} + +# The Antiquarian changes the Type of Artifact + +artifact.3020 = { + type = character_event + title = artifact.3020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:antiquarian = { has_court_position = armorer_camp_officer } + } + desc = artifact.3000.desc.armorer_intro + } + desc = artifact.3000.desc.antiquarian_intro + } + desc = artifact.3020.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_tie + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + } + trigger_if = { + limit = { has_government = landless_adventurer_government } + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + trigger_else = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + artifact_slot_type = regalia + } + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + if = { + limit = { has_government = landless_adventurer_government } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + hidden_effect = { + save_scope_as = owner #for loc + scope:antiquarian = { + create_artifact = { + name = keepsake_trinket_name + description = keepsake_trinket_description + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_prestige_2_modifier + save_scope_as = keepsake_trinket + } + } + if = { + limit = { + scope:this_artifact = { artifact_slot_type = primary_armament } + } + scope:keepsake_trinket = { + add_artifact_modifier = artifact_prowess_1_modifier + } + } + else_if = { + limit = { + scope:this_artifact = { artifact_slot_type = armor } + } + scope:keepsake_trinket = { + add_artifact_modifier = artifact_scheme_resistance_add_1_modifier + } + } + else_if = { + limit = { + scope:this_artifact = { artifact_slot_type = helmet } + } + scope:keepsake_trinket = { + add_artifact_modifier = artifact_parochial_vassal_opinion_1_modifier + } + } + else_if = { + limit = { + scope:this_artifact = { artifact_slot_type = regalia } + } + scope:keepsake_trinket = { + add_artifact_modifier = artifact_monthly_dynasty_prestige_1_modifier + } + } + } + } + + # Option A: Make it a trinket + option = { + name = artifact.3020.a + scope:keepsake_trinket = { + set_owner = root + } + hidden_effect = { destroy_artifact = scope:this_artifact } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + # Option B: repair it! + option = { + name = artifact.3020.b + if = { + limit = { exists = scope:antiquarian } + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = 7 + max = 60 + } + } + } + remove_short_term_gold = { + value = scope:this_artifact.artifact_durability + multiply = 1.5 + } + hidden_effect = { destroy_artifact = scope:keepsake_trinket } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } +} + +# The Antiquarian tries a new preservation technique + +artifact.3030 = { + type = character_event + title = artifact.3030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:antiquarian = { has_court_position = armorer_camp_officer } + } + desc = artifact.3000.desc.armorer_intro + } + desc = artifact.3000.desc.antiquarian_intro + } + desc = artifact.3030.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = war_over_win + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + trigger_if = { + limit = { has_government = landless_adventurer_government } + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + trigger_else = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + if = { + limit = { has_government = landless_adventurer_government } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + } + + # Option A: try the technique + option = { + name = artifact.3030.a + scope:antiquarian = { + duel = { + skill = learning + value = high_skill_rating + 10 = { + #big success + compare_modifier = { + value = scope:duel_value + multiplier = medium_positive_duel_skill_multiplier #+50 when extremely skilled meets avarage + min = -20 + } + desc = artifact.3030.a.bigsuccess + root = { + send_interface_toast = { + title = artifact.3030.a.bigsuccess.t + scope:this_artifact = { + add_durability = { + value = artifact_max_durability + subtract = artifact_durability + } + set_max_durability = { + value = artifact_max_durability + add = { + value = artifact_max_durability + multiply = 0.3 + } + } + } + } + } + } + 40 = { + #success + desc = artifact.3030.a.success + compare_modifier = { + value = scope:duel_value + multiplier = low_positive_duel_skill_multiplier #+25 when extremely skilled meets avarage + } + root = { + send_interface_toast = { + title = artifact.3030.a.success.t + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = 10 + max = artifact_max_durability + } + } + } + } + } + 40 = { + #failure + desc = artifact.3030.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = low_negative_duel_skill_multiplier #+-25 when extremely skilled meets avarage + } + root = { + send_interface_toast = { + title = artifact.3030.a.failure.t + scope:this_artifact = { + add_durability = { + value = artifact_durability + multiply = -1 + add = 1 + } + } + } + } + } + 10 = { + #big failure + desc = artifact.3030.a.bigfailure + compare_modifier = { + value = scope:duel_value + multiplier = medium_negative_duel_skill_multiplier #-50 when extremely skilled meets avarage + } + root = { + send_interface_toast = { + title = artifact.3030.a.bigfailure.t + destroy_artifact = scope:this_artifact + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.75 + } + } + } + + # Option B: NO + option = { + name = artifact.3030.b + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.75 + } + } + } +} + +# A vassal offers to pay for the reforging in exchange for something + +artifact.3040 = { + type = character_event + title = artifact.3040.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.3040.desc.antiquarian + } + desc = artifact.3040.desc.no_antiquarian + } + } + theme = stewardship_wealth_focus + cooldown = { years = 5 } + left_portrait = scope:antiquarian + right_portrait = { + character = scope:vassal + animation = schadenfreude + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + trigger_if = { + limit = { exists = scope:artifact } + scope:artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + trigger_else = { + any_character_artifact = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + } + any_vassal = { + gold >= major_gold_value + is_available_ai_adult = yes + can_add_hook = { + type = favor_hook + target = root + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:artifact } + } + random_character_artifact = { + limit = { + artifact_durability <= define:NInventory|ARTIFACT_LOW_DURABILITY + } + save_scope_as = this_artifact + save_scope_as = artifact + } + } + else = { + scope:artifact = { + save_scope_as = this_artifact + } + } + random_vassal = { + limit = { + gold >= major_gold_value + is_available_ai_adult = yes + can_add_hook = { + type = favor_hook + target = root + } + } + save_scope_as = vassal + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + } + + # Option A: accept the offer, owe a favor + option = { + name = artifact.3040.a + scope:vassal = { + remove_short_term_gold = scope:this_artifact.reforge_artifact_cost + add_hook = { + type = favor_hook + target = root + } + } + scope:this_artifact = { + add_durability = { + value = artifact_max_durability + max = artifact_max_durability + } + } + ai_chance = { + base = 100 + } + } + + #Option B: use a favor + option = { + name = artifact.3040.b + trigger = { + has_hook_of_type = { + type = favor_hook + target = scope:vassal + } + } + scope:vassal = { + remove_short_term_gold = scope:this_artifact.reforge_artifact_cost + } + remove_hook = { + type = favor_hook + target = scope:vassal + } + scope:this_artifact = { + add_durability = { + value = artifact_max_durability + max = artifact_max_durability + } + } + ai_chance = { + base = 200 + } + } + + # Option C: refuse + option = { + name = artifact.3040.c + scope:vassal = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -0.5 + } + } + } +} + +# A high-quality artifact is reaching 0 durability + +artifact.3050 = { + scope = artifact + hidden = yes + + trigger = { + artifact_durability <= define:NInventory|ARTIFACT_VERY_LOW_DURABILITY + artifact_wealth_quality_average_value >= 75 + } + + immediate = { + save_scope_as = this_artifact + scope:owner = { + send_interface_message = { + type = event_stewardship_good_with_text + left_icon = scope:this_artifact + title = artifact.3050.t + desc = artifact.3050.desc + } + } + } +} + + +### Artifact modifiers events ### + +# Cursed artifact + +scripted_trigger artifact_4000_cursed_history_trigger = { + #One of the following has to be true: + OR = { + AND = { + has_variable = stolen_artifact + var:stolen_artifact >= 5 + } + AND = { + previous_owner ?= { + is_alive = no + exists = killer + } + OR = { + AND = { + exists = previous_owner_level_2 + previous_owner_level_2 = { + is_alive = no + exists = killer + } + } + AND = { + exists = previous_owner_level_3 + previous_owner_level_3 = { + is_alive = no + exists = killer + } + } + } + } + has_variable = ghost_cabinet + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = historical_unique_artifact + } +} + +scripted_trigger artifact_4000_cursed_creepy_trigger = { + OR = { + ep1_artifact_durability_lower_equal_percent_trigger = { PERCENT = 0.49 } + artifact_age >= 50 + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = historical_unique_artifact + } +} + +artifact.4000 = { + type = character_event + title = artifact.4000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4000.desc.antiquarian_intro + } + desc = artifact.4000.desc.servant_intro + } + first_valid = { + triggered_desc = { + trigger = { #stolen + has_variable = stolen_artifact + var:stolen_artifact >= 5 + } + desc = artifact.4000.desc.stolen + } + triggered_desc = { + trigger = { #assassinated + exists = scope:this_artifact.previous_owner + scope:this_artifact.previous_owner = { + is_alive = no + exists = killer + } + OR = { + AND = { + exists = scope:this_artifact.previous_owner_level_2 + scope:this_artifact.previous_owner_level_2 = { + is_alive = no + exists = killer + } + } + AND = { + exists = scope:this_artifact.previous_owner_level_3 + scope:this_artifact.previous_owner_level_3 = { + is_alive = no + exists = killer + } + } + } + } + desc = artifact.4000.desc.assassinated + } + triggered_desc = { + trigger = { #ghost + has_variable = ghost_cabinet + } + desc = artifact.4000.desc.ghost + } + desc = artifact.4000.desc.fallback + } + desc = artifact.4000.desc.end + } + theme = stewardship_wealth_focus + cooldown = { years = 15 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + trigger = { exists = scope:antiquarian } + character = scope:antiquarian + animation = personality_irrational + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + trigger = { + OR = { + any_character_artifact = { #it has creepy history + artifact_4000_cursed_history_trigger = yes + } + AND = { #it's old and you are creepy + dread >= 75 + any_character_artifact = { + artifact_4000_cursed_creepy_trigger = yes + } + } + } + } + + immediate = { + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + random_character_artifact = { + limit = { + artifact_4000_cursed_history_trigger = yes + } + alternative_limit = { + artifact_4000_cursed_creepy_trigger = yes + } + save_scope_as = this_artifact + } + } + + #Option A: call for a holy man + option = { + name = artifact.4000.a + trigger_event = { + id = artifact.4001 + days = 35 + } + remove_short_term_gold = minor_gold_value + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: embrace the cursed reputation + option = { + name = artifact.4000.b + scope:this_artifact = { + set_variable = { + name = cursed_artifact_accepted_var + years = 30 + } + } + ai_chance = { + base = 90 + modifier = { + add = 50 + has_trait = sadistic + } + modifier = { + add = 50 + has_trait = callous + } + modifier = { + add = 100 + has_trait = torturer + } + } + } + + after = { + scope:this_artifact = { + set_artifact_name = artifact.4000.cursed_name + set_artifact_description = artifact.4000.cursed_desc + set_variable = { + name = cursed_artifact_var + } + add_artifact_modifier = cursed_artifact_modifier + } + } +} + +artifact.4001 = { # Holy man intervention + type = character_event + title = artifact.4001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4001.desc.antiquarian_intro + } + desc = artifact.4001.desc.servant_intro + } + desc = artifact.4001.desc + } + theme = stewardship_wealth_focus + left_portrait = { + character = ROOT + animation = worry + } + right_portrait = { + character = scope:holy_man + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + scope:this_artifact = { + artifact_owner = root + NOT = { has_variable = attempted_blessing_var } + } + } + + immediate = { + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + create_character = { + location = root.capital_province + culture = root.culture + template = local_saint_template + save_scope_as = holy_man + } + scope:this_artifact = { + set_variable = { + name = attempted_blessing_var + years = 15 + } + } + } + + option = { + name = artifact.4001.a + scope:holy_man = { + duel = { + skill = learning + value = high_skill_rating + 50 = { + desc = artifact.4001.a.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = artifact.4001.a.success + left_icon = scope:this_artifact + scope:this_artifact = { + remove_artifact_modifier = cursed_artifact_modifier + remove_variable = cursed_artifact_var + } + } + } + } + 50 = { + desc = artifact.4001.a.failure.desc + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = artifact.4001.a.failure + left_icon = scope:this_artifact + } + } + } + } + } + } + after = { + scope:holy_man = { + silent_disappearance_effect = yes + } + } +} + +artifact.4002 = { #you own a cursed artifact + type = character_event + title = artifact.4002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4002.desc.antiquarian_intro + } + desc = artifact.4002.desc.servant_intro + } + desc = artifact.4002.desc + } + theme = stewardship_wealth_focus + left_portrait = { + character = ROOT + animation = worry + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + has_variable = cursed_artifact_var + NOR = { + has_variable = attempted_blessing_var + has_variable = cursed_artifact_accepted_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + random_character_artifact = { + limit = { + has_variable = cursed_artifact_var + NOR = { + has_variable = attempted_blessing_var + has_variable = cursed_artifact_accepted_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + } + #Option A: call for a holy man + option = { + name = artifact.4000.a + trigger_event = { + id = artifact.4001 + days = 35 + } + remove_short_term_gold = minor_gold_value + scope:this_artifact = { + set_variable = { + name = attempted_blessing_var + years = 15 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: embrace the cursed reputation + option = { + name = artifact.4000.b + scope:this_artifact = { + set_variable = { + name = cursed_artifact_accepted_var + years = 30 + } + } + if = { + limit = { + scope:this_artifact = { + has_artifact_modifier = cursed_artifact_modifier + } + } + scope:this_artifact = { + remove_artifact_modifier = cursed_artifact_modifier + add_artifact_modifier = very_cursed_artifact_modifier + } + } + ai_chance = { + base = 90 + modifier = { + add = 50 + has_trait = sadistic + } + modifier = { + add = 50 + has_trait = callous + } + modifier = { + add = 100 + has_trait = torturer + } + } + } +} + +# Killer weapon + +scripted_trigger artifact_4010_valid_weapon_trigger = { + artifact_slot_type = primary_armament + has_variable = artifact_battles_won_var + OR = { + AND = { + NOT = { has_variable = artifact_killer_var } + var:artifact_battles_won_var >= 15 + } + AND = { + has_variable = artifact_killer_var + var:artifact_killer_var = 15 + var:artifact_battles_won_var >= 30 + } + AND = { + has_variable = artifact_killer_var + var:artifact_killer_var = 30 + var:artifact_battles_won_var >= 50 + } + AND = { + has_variable = artifact_killer_var + var:artifact_killer_var = 50 + var:artifact_battles_won_var >= 100 + } + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + has_variable = artifact_duel_weapon_var + } +} + +artifact.4010 = { + type = character_event + title = artifact.4010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4010.desc.antiquarian_intro + } + desc = artifact.4010.desc.servant_intro + } + desc = artifact.4010.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 10 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + artifact_4010_valid_weapon_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_character_artifact = { + artifact_4010_valid_weapon_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 30 + } + add = 1 + } + modifier = { + any_character_artifact = { + artifact_4010_valid_weapon_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 50 + } + add = 2 + } + modifier = { + any_character_artifact = { + artifact_4010_valid_weapon_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 100 + } + add = 5 + } + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + has_variable = artifact_battles_won_var + NOR = { + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + has_variable = cursed_artifact_var + has_variable = artifact_duel_weapon_var + } + trigger_if = { + limit = { + NOT = { has_variable = artifact_killer_var } + } + var:artifact_battles_won_var >= 15 + } + trigger_else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 15 + } + var:artifact_battles_won_var >= 30 + } + trigger_else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 30 + } + var:artifact_battles_won_var >= 50 + } + trigger_else = { + var:artifact_battles_won_var >= 100 + } + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + scope:this_artifact = { + if = { + limit = { + NOT = { has_variable = artifact_killer_var } + } + set_variable = { + name = artifact_killer_var + value = 15 + } + set_artifact_name = artifact_killer_1_name + set_artifact_description = artifact_killer_1_desc + add_artifact_modifier = artifact_killer_1_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 15 + } + change_variable = { + name = artifact_killer_var + add = 15 + } + set_artifact_name = artifact_killer_2_name + set_artifact_description = artifact_killer_2_desc + add_artifact_modifier = artifact_killer_2_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 30 + } + change_variable = { + name = artifact_killer_var + add = 20 + } + set_artifact_name = artifact_killer_3_name + set_artifact_description = artifact_killer_3_desc + add_artifact_modifier = artifact_killer_3_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_killer_var + var:artifact_killer_var = 50 + } + change_variable = { + name = artifact_killer_var + add = 50 + } + set_artifact_name = artifact_killer_4_name + set_artifact_description = artifact_killer_4_desc + add_artifact_modifier = artifact_killer_4_artifact_modifier + } + } + } + + option = { + name = artifact.4010.a + } +} + +# Glorious armor + +scripted_trigger artifact_4020_valid_armor_trigger = { + artifact_slot_type = armor + has_variable = artifact_battles_won_var + OR = { + AND = { + NOT = { has_variable = artifact_armor_var } + var:artifact_battles_won_var >= 15 + } + AND = { + has_variable = artifact_armor_var + var:artifact_armor_var = 15 + var:artifact_battles_won_var >= 30 + } + AND = { + has_variable = artifact_armor_var + var:artifact_armor_var = 30 + var:artifact_battles_won_var >= 50 + } + AND = { + has_variable = artifact_armor_var + var:artifact_armor_var = 50 + var:artifact_battles_won_var >= 100 + } + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } +} + +artifact.4020 = { + type = character_event + title = artifact.4020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4010.desc.antiquarian_intro + } + desc = artifact.4010.desc.servant_intro + } + desc = artifact.4020.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 10 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + artifact_4020_valid_armor_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_character_artifact = { + artifact_4020_valid_armor_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 30 + } + add = 1 + } + modifier = { + any_character_artifact = { + artifact_4020_valid_armor_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 50 + } + add = 2 + } + modifier = { + any_character_artifact = { + artifact_4020_valid_armor_trigger = yes + has_variable = artifact_battles_won_var + var:artifact_battles_won_var > 100 + } + add = 5 + } + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + random_character_artifact = { + limit = { + artifact_slot_type = armor + has_variable = artifact_battles_won_var + NOR = { + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + has_variable = cursed_artifact_var + } + trigger_if = { + limit = { + NOT = { has_variable = artifact_armor_var } + } + var:artifact_battles_won_var >= 15 + } + trigger_else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 15 + } + var:artifact_battles_won_var >= 30 + } + trigger_else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 30 + } + var:artifact_battles_won_var >= 50 + } + trigger_else = { + var:artifact_battles_won_var >= 100 + } + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + scope:this_artifact = { + if = { + limit = { + NOT = { has_variable = artifact_armor_var } + } + set_variable = { + name = artifact_armor_var + value = 15 + } + set_artifact_name = artifact_armor_1_name + set_artifact_description = artifact_armor_1_desc + add_artifact_modifier = artifact_armor_1_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 15 + } + change_variable = { + name = artifact_armor_var + add = 15 + } + set_artifact_name = artifact_armor_2_name + set_artifact_description = artifact_armor_2_desc + add_artifact_modifier = artifact_armor_2_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 30 + } + change_variable = { + name = artifact_armor_var + add = 20 + } + set_artifact_name = artifact_armor_3_name + set_artifact_description = artifact_armor_3_desc + add_artifact_modifier = artifact_armor_3_artifact_modifier + } + else_if = { + limit = { + has_variable = artifact_armor_var + var:artifact_armor_var = 50 + } + change_variable = { + name = artifact_armor_var + add = 50 + } + set_artifact_name = artifact_armor_4_name + set_artifact_description = artifact_armor_4_desc + add_artifact_modifier = artifact_armor_4_artifact_modifier + } + } + } + + option = { + name = artifact.4010.a + } +} + +# Official crown +scripted_trigger artifact_4030_valid_empire_crown = { + artifact_slot_type = helmet + AND = { + root = { highest_held_title_tier = tier_empire } + previous_owner ?= { highest_held_title_tier = tier_empire } + exists = previous_owner_level_2 + previous_owner_level_2 = { highest_held_title_tier = tier_empire } + exists = previous_owner_level_3 + previous_owner_level_3 = { highest_held_title_tier = tier_empire } + } + NOR = { + has_variable = artifact_named_crown_var + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } +} + +scripted_trigger artifact_4030_valid_people_crown = { + artifact_slot_type = helmet + AND = { + root = { + primary_title = { save_temporary_scope_as = crown_title } + } + previous_owner ?= { has_primary_title = scope:crown_title } + exists = previous_owner_level_2 + previous_owner_level_2 = { has_primary_title = scope:crown_title } + exists = previous_owner_level_3 + previous_owner_level_3 = { has_primary_title = scope:crown_title } + } + NOR = { + has_variable = artifact_named_crown_var + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + } +} + +artifact.4030 = { + type = character_event + title = artifact.4030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4030.desc.antiquarian_intro + } + desc = artifact.4030.desc.servant_intro + } + first_valid = { + triggered_desc = { + trigger = { + root = { highest_held_title_tier = tier_empire } + exists = scope:this_artifact.previous_owner + scope:this_artifact.previous_owner = { highest_held_title_tier = tier_empire } + exists = scope:this_artifact.previous_owner_level_2 + scope:this_artifact.previous_owner_level_2 = { highest_held_title_tier = tier_empire } + exists = scope:this_artifact.previous_owner_level_3 + scope:this_artifact.previous_owner_level_3 = { highest_held_title_tier = tier_empire } + } + desc = artifact.4030.desc_emperor + } + desc = artifact.4030.desc_kingdom + } + } + theme = stewardship_wealth_focus + cooldown = { years = 30 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + OR = { + artifact_4030_valid_empire_crown = yes + artifact_4030_valid_people_crown = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + primary_title = { + save_scope_as = primary_title_scope + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + random_character_artifact = { + limit = { + OR = { + artifact_4030_valid_empire_crown = yes + artifact_4030_valid_people_crown = yes + } + } + save_scope_as = this_artifact + } + scope:this_artifact = { + set_variable = artifact_named_crown_var + if = { + limit = { + artifact_4030_valid_empire_crown = yes + } + set_artifact_name = artifact_emperors_crown_name + set_artifact_description = artifact_emperors_crown_desc + add_artifact_modifier = artifact_emperors_crown_artifact_modifier + } + else = { #3 generations of owners have the same main title + set_artifact_name = artifact_crown_special_name + set_artifact_description = artifact_crown_special_desc + add_artifact_modifier = artifact_crown_artifact_modifier + } + } + } + + option = { + name = artifact.4010.a + } +} + +scripted_trigger artifact_4040_relevant_courtier_trigger = { + OR = { + prowess >= 20 + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + has_trait = lifestyle_blademaster + has_trait = berserker + has_trait = varangian + has_trait = desert_warrior + has_trait = winter_soldier + has_trait = jungle_stalker + has_trait = rough_terrain_expert + has_trait = forest_fighter + has_trait = open_terrain_expert + has_trait = reaver + } +} + +# Helpful courtier improves artifact +artifact.4040 = { + type = character_event + title = artifact.4040.t + desc = artifact.4040.desc + theme = stewardship_wealth_focus + cooldown = { years = 30 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:helpful + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + OR = { + artifact_slot_type = armor + artifact_slot_type = primary_armament + } + NOR = { + has_variable = cursed_artifact_var + has_variable = artifact_improved_var + } + } + OR = { + any_courtier_or_guest = { + artifact_4040_relevant_courtier_trigger = yes + } + any_knight = { + artifact_4040_relevant_courtier_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + random_character_artifact = { + limit = { + OR = { + artifact_slot_type = armor + artifact_slot_type = primary_armament + } + NOR = { + has_variable = cursed_artifact_var + has_variable = artifact_improved_var + } + } + save_scope_as = this_artifact + } + if = { + limit = { + any_courtier_or_guest = { + artifact_4040_relevant_courtier_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + artifact_4040_relevant_courtier_trigger = yes + } + save_scope_as = helpful + } + } + else = { + random_knight = { + limit = { + artifact_4040_relevant_courtier_trigger = yes + } + save_scope_as = helpful + } + } + } + + #Option A: accept + option = { + name = artifact.4040.a + scope:this_artifact = { + set_variable = { + name = artifact_improved_var + years = 100 + } + } + if = { + limit = { + scope:helpful = { + can_add_hook = { + target = root + type = favor_hook + } + } + } + scope:helpful = { + add_hook = { + target = root + type = favor_hook + } + } + } + else = { + pay_short_term_gold = { + target = scope:helpful + gold = minor_gold_value + } + } + custom_tooltip = artifact.4040.a.tt + hidden_effect = { + if = { + limit = { + scope:helpful = { + has_trait = reaver + } + scope:this_artifact = { + NOR = { + has_artifact_modifier = artifact_raid_speed_2_modifier + has_artifact_modifier = artifact_raid_speed_3_modifier + has_artifact_modifier = artifact_raid_speed_4_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_raid_speed_2_modifier + } + } + else_if = { + limit = { + scope:helpful = { + has_trait = open_terrain_expert + } + scope:this_artifact = { + NOT = { + has_artifact_modifier = artifact_heavy_cavalry_toughness_2_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_heavy_cavalry_toughness_2_modifier + } + } + else_if = { + limit = { + scope:helpful = { + OR = { + has_trait = forest_fighter + has_trait = jungle_stalker + has_trait = desert_warrior + has_trait = winter_soldier + has_trait = berserker + } + } + scope:this_artifact = { + NOR = { + has_artifact_modifier = artifact_heavy_infantry_toughness_2_modifier + has_artifact_modifier = artifact_heavy_infantry_toughness_3_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_heavy_infantry_toughness_2_modifier + } + } + else_if = { + limit = { + scope:helpful = { + has_trait = rough_terrain_expert + has_trait = lifestyle_blademaster + } + scope:this_artifact = { + NOR = { + has_artifact_modifier = artifact_knight_effectiveness_2_modifier + has_artifact_modifier = artifact_knight_effectiveness_3_modifier + has_artifact_modifier = artifact_knight_effectiveness_4_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_knight_effectiveness_2_modifier + } + } + else_if = { + limit = { + scope:this_artifact = { + NOR = { + has_artifact_modifier = artifact_prowess_4_modifier + has_artifact_modifier = artifact_prowess_5_modifier + has_artifact_modifier = artifact_prowess_6_modifier + } + } + } + scope:this_artifact = { + add_artifact_modifier = artifact_prowess_4_modifier + } + } + else = { + scope:this_artifact = { + add_artifact_modifier = artifact_heavy_infantry_toughness_3_modifier + } + } + } + ai_chance = { + base = 150 + } + } + + #Option B: refuse + option = { + name = artifact.4040.b + ai_chance = { + base = 50 + modifier = { + has_trait = arrogant + add = 50 + } + } + } +} + +# Stress damage +artifact.4050 = { + type = character_event + title = artifact.4050.t + desc = artifact.4050.desc + theme = stewardship_wealth_focus + cooldown = { years = 20 } + left_portrait = { + character = root + animation = rage + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + is_landed = yes + OR = { + AND = { + has_trait = irritable + stress_level >= 1 + } + AND = { + has_trait = wrathful + stress_level >= 2 + } + AND = { + NOT = { has_trait = calm } + stress_level >= 3 + } + } + any_character_artifact = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = helmet + artifact_slot_type = regalia + artifact_slot_type = book + artifact_slot_type = pedestal + artifact_slot_type = miscellaneous + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + random_character_artifact = { + limit = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = helmet + artifact_slot_type = regalia + artifact_slot_type = book + artifact_slot_type = pedestal + artifact_slot_type = miscellaneous + } + } + save_scope_as = this_artifact + } + scope:this_artifact = { + # Remove 50% of remaining durability + add_durability = { + value = artifact_durability + multiply = -0.50 + } + } + } + + option = { + name = artifact.4050.a + stress_impact = { + base = medium_stress_impact_loss + wrathful = major_stress_impact_loss + irritable = massive_stress_impact_loss + } + } +} + +#Blessed artifact + +scripted_trigger artifact_4060_valid_artifact_trigger = { + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = helmet + artifact_slot_type = regalia + artifact_slot_type = sculpture + artifact_slot_type = armor + artifact_slot_type = throne + } + NOR = { + has_variable = cursed_artifact_var + has_variable = artifact_named_crown_var + has_variable = artifact_killer_var + has_variable = artifact_armor_var + has_variable = blessed_artifact_var + } +} + +artifact.4060 = { + type = character_event + title = artifact.4060.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4001.desc.antiquarian_intro + } + desc = artifact.4001.desc.servant_intro + } + desc = artifact.4060.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 30 } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:holy_man + animation = personality_zealous + } + lower_right_portrait = { + trigger = { exists = scope:antiquarian } + character = scope:antiquarian + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + artifact_4060_valid_artifact_trigger = yes + } + piety_level >= 3 + NOT = { + has_trait = arbitrary + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + random_character_artifact = { + limit = { + artifact_4060_valid_artifact_trigger = yes + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + else = { + random_dummy_gender_servant_effect = yes + } + create_character = { + location = root.capital_province + culture = root.culture + template = local_saint_template + save_scope_as = holy_man + } + } + + #Option A: accept the blessing + option = { + name = artifact.4060.a + scope:this_artifact = { + set_variable = blessed_artifact_var + add_artifact_modifier = blessed_artifact_modifier + set_artifact_name = artifact_4060_blessed_artifact_name + set_artifact_description = artifact_4060_blessed_artifact_desc + } + remove_short_term_gold = medium_gold_value + stress_impact = { + cynical = major_stress_impact_gain + greedy = major_stress_impact_gain + zealous = major_stress_impact_loss + } + } + + #Option B: refuse + option = { + name = artifact.4060.b + stress_impact = { + cynical = major_stress_impact_loss + zealous = major_stress_impact_gain + } + } +} + +# Desecrated relic + +scripted_trigger artifact_4070_valid_relic_trigger = { + has_variable = relic + trigger_if = { + limit = { + var:relic = flag:christian + } + previous_owner ?= { + NOT = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + } + } + trigger_else_if = { + limit = { + var:relic = flag:islamic + } + previous_owner ?= { + NOT = { faith.religion = religion:islam_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:buddhism + } + previous_owner ?= { + NOT = { faith.religion = religion:buddhism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:zoroastr + } + previous_owner ?= { + NOT = { faith.religion = religion:zoroastrianism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:jainism + } + previous_owner ?= { + NOT = { faith.religion = religion:jainism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:judaism + } + previous_owner ?= { + NOT = { faith.religion = religion:judaism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:germanic + } + previous_owner ?= { + NOT = { faith.religion = religion:germanic_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:slavic + } + previous_owner ?= { + NOT = { faith.religion = religion:slavic_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:boog + } + previous_owner ?= { + NOT = { faith.religion = religion:west_african_roog_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:hinduism + } + previous_owner ?= { + NOT = { faith.religion = religion:hinduism_religion } + } + } + trigger_else_if = { + limit = { + var:relic = flag:finno_ugric_religion + } + previous_owner ?= { + NOT = { faith.religion = religion:finno_ugric_religion } + } + } + trigger_else = { + always = no #Can't be a desecrated relic with no associated religion + } +} + +artifact.4070 = { + type = character_event + title = artifact.4070.t + desc = artifact.4070.desc + theme = stewardship_wealth_focus + cooldown = { years = 15 } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:chaplain + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + is_landed = yes + cp:councillor_court_chaplain ?= { is_available_ai_adult = yes } + any_character_artifact = { + artifact_4070_valid_relic_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + factor = 0.3 + } + } + + immediate = { + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + } + } + random_character_artifact = { + limit = { + artifact_4070_valid_relic_trigger = yes + } + save_scope_as = this_artifact + } + scope:this_artifact = { + add_artifact_modifier = desecrated_artifact_modifier + set_variable = desecrated_artifact_var + } + } + + #Option A: religious cerimony + option = { + name = artifact.4070.a + remove_short_term_gold = major_gold_value + scope:this_artifact = { + remove_artifact_modifier = desecrated_artifact_modifier + remove_variable = desecrated_artifact_var + } + add_piety = medium_piety_gain + ai_chance = { + base = 105 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + gold < major_gold_value + factor = 0 + } + } + } + + #Option B: just superstition + option = { + name = artifact.4070.b + add_piety = medium_piety_loss + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +# Many duels won + +scripted_trigger artifact_4080_valid_weapon_trigger = { + artifact_slot_type = primary_armament + has_variable = artifact_duel_var + OR = { + AND = { + NOT = { has_variable = artifact_duel_weapon_var } + var:artifact_duel_var >= 5 + } + AND = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 5 + var:artifact_duel_var >= 10 + } + AND = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 10 + var:artifact_duel_var >= 20 + } + AND = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 20 + var:artifact_duel_var >= 30 + } + } + NOR = { + has_variable = cursed_artifact_var + has_variable = blessed_artifact_var + has_variable = historical_unique_artifact + has_variable = artifact_killer_var + } +} + +artifact.4080 = { + type = character_event + title = artifact.4080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4010.desc.antiquarian_intro + } + desc = artifact.4010.desc.servant_intro + } + desc = artifact.4080.desc + } + theme = stewardship_wealth_focus + cooldown = { years = 10 } + left_portrait = { + character = ROOT + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { # To display the artifact in the event-window + target = scope:this_artifact + position = lower_center_portrait + } + + trigger = { + any_character_artifact = { + artifact_4080_valid_weapon_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_character_artifact = { + artifact_4080_valid_weapon_trigger = yes + has_variable = artifact_duel_var + var:artifact_duel_var > 10 + } + add = 1 + } + modifier = { + any_character_artifact = { + artifact_4080_valid_weapon_trigger = yes + has_variable = artifact_duel_var + var:artifact_duel_var > 20 + } + add = 2 + } + modifier = { + any_character_artifact = { + artifact_4080_valid_weapon_trigger = yes + has_variable = artifact_duel_var + var:artifact_duel_var > 30 + } + add = 5 + } + modifier = { + is_at_war = yes + factor = 0.5 + } + } + + immediate = { + random_character_artifact = { + limit = { + artifact_4080_valid_weapon_trigger = yes + } + save_scope_as = this_artifact + } + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + scope:this_artifact = { + if = { + limit = { + NOT = { has_variable = artifact_duel_weapon_var } + } + set_variable = { + name = artifact_duel_weapon_var + value = 5 + } + set_artifact_name = artifact_duel_weapon_1_name + set_artifact_description = artifact_duel_weapon_1_desc + add_artifact_modifier = artifact_duel_weapon_1_modifier + } + else_if = { + limit = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 5 + } + change_variable = { + name = artifact_duel_weapon_var + add = 5 + } + set_artifact_name = artifact_duel_weapon_2_name + set_artifact_description = artifact_duel_weapon_2_desc + add_artifact_modifier = artifact_duel_weapon_2_modifier + } + else_if = { + limit = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 10 + } + change_variable = { + name = artifact_duel_weapon_var + add = 10 + } + set_artifact_name = artifact_duel_weapon_3_name + set_artifact_description = artifact_duel_weapon_3_desc + add_artifact_modifier = artifact_duel_weapon_3_modifier + } + else_if = { + limit = { + has_variable = artifact_duel_weapon_var + var:artifact_duel_weapon_var = 20 + } + change_variable = { + name = artifact_duel_weapon_var + add = 10 + } + set_artifact_name = artifact_duel_weapon_4_name + set_artifact_description = artifact_duel_weapon_4_desc + add_artifact_modifier = artifact_duel_weapon_4_modifier + } + } + } + + option = { + name = artifact.4010.a + } +} + +artifact.4090 = { #Embed a relic in pommel by Daniel Moore + type = character_event + title = artifact.4090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = artifact.4090.desc.antiquarian + } + desc = artifact.4090.desc + } + } + theme = stewardship_wealth_focus + cooldown = { years = 10 } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:antiquarian + animation = personality_zealous + } + artifact = { + target = scope:this_artifact + position = lower_left_portrait + } + + artifact = { + target = scope:that_artifact + position = lower_right_portrait + } + + + trigger = { + any_character_artifact = { + artifact_slot_type = primary_armament + NOT = { + has_variable = added_relic + } + } + + any_character_artifact = { + exists = var:relic + } + OR = { + employs_court_position = antiquarian_court_position + employs_court_position = armorer_camp_officer + } + } + + immediate = { + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + } + } + random_court_position_holder = { + type = antiquarian_court_position + save_scope_as = antiquarian + } + } + else_if = { + limit = { + employs_court_position = armorer_camp_officer + any_court_position_holder = { + type = armorer_camp_officer + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = armorer_camp_officer + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + NOT = { + has_variable = added_relic + } + } + save_scope_as = this_artifact + } + + random_character_artifact = { + limit = { + exists = var:relic + } + save_scope_as = that_artifact + } + } + + option = { + name = artifact.4090.a + scope:this_artifact = { + set_artifact_name = relic_weapon_name + set_artifact_description = artifact_weapon_relic_desc + set_variable = added_relic + hidden_effect = { + copy_artifact_modifiers = scope:that_artifact + set_artifact_rarity = illustrious + } + } + + send_interface_toast = { + title = artifact.4090.a.tt + left_icon = root + right_icon = scope:this_artifact + custom_tooltip = embedded_not_destroyed_tooltip + } + + scope:that_artifact = { + hidden_effect = { + destroy_artifact = this + } + } + + stress_impact = { + zealous = minor_stress_gain + lazy = minor_stress_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + + option = { + name = artifact.4090.b + add_piety = 100 + stress_impact = { + zealous = minor_stress_loss + lazy = minor_stress_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + +} + +# Your soldier found a banner after winning a battle! +artifact.6000 = { + scope = combat_side + hidden = yes + + trigger = { + side_primary_participant = { + has_royal_court = yes + } + enemy_side.side_primary_participant = { + is_landed = yes # We don't want to collect banners from peasant revolts... + } + } + + weight_multiplier = { + base = 1 + modifier = { + side_primary_participant = { + has_royal_court = yes + has_court_type = court_warlike + } + add = 1 + } + modifier = { + side_primary_participant = { + exists = side_primary_participant.dynasty + dynasty = { has_dynasty_perk = fp1_pillage_legacy_4 } + } + add = 1 + } + } + + immediate = { + if = { + limit = { + exists = enemy_side.side_commander + } + enemy_side.side_commander = { + save_scope_as = enemy_commander + } + } + if = { + limit = { + exists = side_commander + } + side_commander = { + save_scope_as = friendly_commander + } + } + enemy_side.side_primary_participant = { + save_scope_as = enemy_battle_owner + } + combat.location = { + save_scope_as = combat_location + } + + side_primary_participant = { + trigger_event = { id = artifact.6001 } + } + } +} + +artifact.6001 = { + type = character_event + title = artifact.6001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:friendly_commander = { this = root } + } + desc = artifact.6001.desc.commander + } + desc = artifact.6001.desc + } + first_valid = { + triggered_desc = { + trigger = { has_character_flag = found_banner_looting } + desc = artifact.6001.desc.looting + } + desc = artifact.6001.desc.killed_defender + } + } + theme = battle + left_portrait = { + character = scope:friendly_commander + animation = celebrate_sword + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + # based on where the scope is set, they might not exist when the event is fired + exists = scope:enemy_commander + exists = scope:friendly_commander + } + + immediate = { + hidden_effect = { + set_variable = { + name = epic_battle_location + value = scope:combat_location + } + random_list = { # Pick a random desc + 10 = { # Soldier found it while looting + add_character_flag = found_banner_looting + } + 10 = { # Taken from a valiant last stand + add_character_flag = found_banner_killing_defenders + } + } + random_list = { # Pick a CoA for the banner... + 10 = { # ... From the enemy commander + trigger = { + scope:enemy_commander = { + is_ruler = yes + } + } + set_variable = { + name = epic_loser + value = scope:enemy_commander + } + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:enemy_commander + TARGET = scope:enemy_commander.primary_title + } + } + 30 = { # ... From the opposing leader (army owner) + set_variable = { + name = epic_loser + value = scope:enemy_battle_owner + } + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:enemy_commander + TARGET = scope:enemy_battle_owner.primary_title + } + } + } + } + } + + option = { # Add it to the collection! + name = artifact.6001.a + scope:enemy_battle_owner = { + send_interface_toast = { + title = artifact.6001.toast + left_icon = root + right_icon = scope:newly_created_artifact + show_as_tooltip = { + scope:newly_created_artifact = { + set_owner = { target = root } + } + } + add_personal_artifact_claim = scope:newly_created_artifact + add_prestige = minor_prestige_loss + } + } + } + + option = { # We don't need this useless trinket! + name = artifact.6001.b + + add_prestige = minor_prestige_gain + destroy_artifact = scope:newly_created_artifact + } + + after = { + remove_character_flag = found_banner_looting + remove_character_flag = found_banner_killing_defenders + remove_variable = epic_battle_location + remove_variable = epic_loser + } +} + +artifact.7000 = { + type = character_event + title = artifact.7000.t + desc = artifact.7000.desc + theme = prison + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:skull_boiler + triggered_animation = { + trigger = { + scope:skull_boiler = { + NOT = { + has_court_position = executioner_court_position + } + } + } + animation = disbelief + } + triggered_animation = { + trigger = { + scope:skull_boiler = { + has_court_position = executioner_court_position + } + } + animation = personality_vengeful + } + } + lower_left_portrait = scope:skull_to_boil + + cooldown = { years = 10 } + + trigger = { + any_courtier = { + is_available_ai_adult = yes + } + } + + immediate = { + random_courtier = { + limit = { + is_available_ai_adult = yes + has_court_position = executioner_court_position + } + alternative_limit = { + is_available_ai_adult = yes + OR = { + has_court_position = antiquarian_court_position + has_court_position = court_physician_court_position + } + } + alternative_limit = { + is_available_ai_adult = yes + } + save_scope_as = skull_boiler + } + } + + option = { + name = artifact.7000.a + + custom_tooltip = artifact.7000.a.boil_skull + + scope:skull_boiler = { + if = { + limit = { + has_court_position = executioner_court_position + } + } + else_if = { + limit = { + OR = { + has_court_position = antiquarian_court_position + has_court_position = court_physician_court_position + } + } + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -30 + } + } + else = { + add_opinion = { + target = root + modifier = absolutely_horrified_opinion + } + } + } + + hidden_effect_new_object = { + create_artifact_pedestal_human_skull_effect = { + OWNER = root + CREATOR = scope:skull_boiler + DESKULLED = scope:skull_to_boil + } + scope:newly_created_artifact = { + set_artifact_description = artifact_rival_skull + } + } + } + + option = { + name = artifact.7000.b + + } +} diff --git a/N3OW/events/birth_events.txt b/N3OW/events/birth_events.txt new file mode 100644 index 00000000..63dc983c --- /dev/null +++ b/N3OW/events/birth_events.txt @@ -0,0 +1,4625 @@ +#Events for birth on actions + +namespace = birth + +#All events marked with "BIRTH" are events announcing the birth + +############################################################################################## +# 0001-1999: "Ordinary" births and bastard births +# by Petter Vilberg, Linnéa Thimrén & Mathilda Bjarnehed +############################################################################################## +# 0001 - Selects visible birth event based on bastard status and complication rolls (for births without mother and/or child dying) +# 0002 - Reward event for mother who've had many children +# 1001 - BIRTH: Mother: regular birth +# 1002 - BIRTH: Mother: child secretly a bastard +# 1003 - BIRTH: Father: Regular birth or unaware of unknown bastard birth +# 1005 - BIRTH: Mother: Unmarried and father is unknown +# 1006 - BIRTH: Real father: Realizes he is father of newborn (currently only triggered in 1005) +# 1100 - Sends good omen notification + + +############################################################################################## +# 2001-2999: Legitimization events for bastards +############################################################################################## +# 2001 - For potential legitimizer +# 2002 - Other parent is notified of legitimization +# 2003 - Other parent is notified of lack of legitimization +# 2006 - The spouse of Mother is told when the Father legitimizes +# 2011 - Bastard, but faith does not have bastardy +# 2012 - Event for the "secondary" parent +# 2101 - Mother: the child is unlegitimizable +# 2102 - Mother's spouse: Bastard is unlegitimizable +# 2103 - Father: Bastard is unlegitimizable +# 2104 - Father's spouse: Birth of unlegitimizable bastard + +############################################################################################## +# 3000-3999: Problematic childbirth (miscarriages, mother deaths, sickly child, ill mother) +# by Linnéa Thimrén & Mathilda Bjarnehed +############################################################################################## +# 3001 - BIRTH: Mother: Child dies (no child created) +# 3002 - BIRTH: Father: Child dies (no child created) +# 3011 - BIRTH: Mother: Mother dies, child survives +# 3012 - BIRTH: Father: Mother dies, child survives +# 3021 - BIRTH: Mother: Mother and child dies +# 3022 - BIRTH: Father: Mother and child dies +# 3031 - Sickly child - for mother +# 3034 - Sickly child - for father +# 3033 - Sickly child recovery management event +# 3034 - Sickly child recovery - for child +# 3035 - Sickly child recovery - for mother and father +# 3041 - Sickly mother - for mother + + +############################################# +# 8001-8999: Misc birth management +############################################# + +# 8001 - Reincarnation management, by Mathilda Bjarnehed + +############################################################################################## +# 9001-9999: Special naming events +# by Mathilda Bjarnehed +############################################################################################### +# 9002 - BIRTH: AI spouse suggests a name (5% change of replacing regular 1001 mother event or 1003 father event) +# 9003 - You said no to their suggestion and pick a name of your own + + +scripted_trigger allow_naming_on_birth_of_dynasty_child_trigger = { + save_temporary_scope_as = naming_dynasty_member + exists = $CHILD$ + is_ai = no + #No parent is naming the kid, and it's not your child (at least not officially...) + $CHILD$ = { + any_parent = { + NOR = { + allow_naming_on_birth_of_child_trigger = { CHILD = $CHILD$ } + this = scope:naming_dynasty_member + } + } + } + $CHILD$.host = scope:naming_dynasty_member +} + +#Selects visible birth event based on bastard status and complication rolls (for births without mother and/or child dying) +birth.0001 = { + hidden = yes + + trigger = { + birth_will_happen_as_usual_trigger = yes + } + + immediate = { + #NOTE: Sets up secrets and notifies real_father and father if the child is a bastard, and they should know the Secret. + pregnancy_maintainance_effect = yes + + #It is not a bastard and not complicated + if = { + limit = { + NOR = { + has_character_flag = unmarried_bastard_pregnancy + has_character_flag = bastard_pregnancy + } + } + random_list = { + 95 = { #Normal birth event for mother + trigger_event = birth.1001 + } + 5 = { #Other parent (father) suggest a name + trigger = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + scope:child = { + father ?= { + is_ai = yes + is_alive = yes + } + NOT = { has_trait = twin } + } + } + opinion_modifier = { + who = scope:child.father + opinion_target = scope:child.mother + min = 0 + max = 10 + multiplier = 0.1 + } + modifier = { + any_child = { is_alive = yes count > 1 } + add = -5 + } + modifier = { + scope:child.father = { + OR = { + has_trait = lunatic + has_trait = possessed + } + } + add = 15 + } + modifier = { # Event is less common for AI rulers. + scope:child.mother = { is_ai = yes } + factor = 0.25 + } + trigger_event = birth.9002 + } + } + } + ### + # Bastard event firing + ### + + # Married mother with secret bastard + else_if = { + limit = { + has_character_flag = bastard_pregnancy + NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } + } + trigger_event = birth.1002 + } + #Unmarried mother with unknown father of child + else_if = { + limit = { + has_character_flag = unmarried_bastard_pregnancy + NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } + } + trigger_event = birth.1005 + } + + #Known bastard + else_if = { + limit = { + OR = { + has_character_flag = bastard_pregnancy + has_character_flag = unmarried_bastard_pregnancy + } + has_character_flag = pregnancy_real_father_of_bastard_is_known_flag + } + + if = { + limit = { + exists = scope:child.house + scope:child.house = scope:mother.house + } + scope:mother = { + save_scope_as = legitimizer + } + } + else_if = { + limit = { + exists = scope:child.house + scope:child.house = scope:real_father.house + } + scope:real_father = { + save_scope_as = legitimizer + } + } + + if = { + limit = { exists = scope:legitimizer } + scope:legitimizer = { + if = { + limit = { + faith = { + has_doctrine_parameter = bastards_none + } + } + trigger_event = birth.2011 + } + else = { + trigger_event = birth.2001 + } + } + } + } + + scope:mother = { + every_parent = { # Grandparents + limit = { + NOT = { is_parent_of = scope:child } # Don't ask + trigger_if = { + limit = { + scope:child = { tgp_is_in_ceremonial_house_trigger = yes } + } + tgp_is_in_ceremonial_house_trigger = yes + } + } + send_interface_toast = { + type = msg_grandchild_born_toast + title = msg_grandchild_born_toast_title + left_icon = scope:mother + right_icon = scope:child + if = { + limit = { + scope:child = { has_trait = twin } + } + custom_tooltip = msg_grandchild_born_toast_desc_twins + } + else = { + custom_tooltip = msg_grandchild_born_toast_desc + } + } + } + } + + scope:father ?= { #Check whether the father should get a regular notification event + if = { + limit = { + OR = { + any_consort = { + this = scope:mother + NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } + } + #If you split up before the pregnancy was showing etc. + any_former_spouse = { + this = scope:mother + NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } + } + any_former_concubine = { + this = scope:mother + NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } + } + any_former_concubinist = { + this = scope:mother + NOT = { has_character_flag = pregnancy_real_father_of_bastard_is_known_flag } + } + } + NOT = { is_in_list = illegitimacy_secret_knowers } + } + random_list = { + 95 = { #Normal birth event for father + if = { + limit = { #If you split up before the pregnancy was showing etc. and now the mother isn't around then we just want to give the father a toast + NOT = { is_consort_of = scope:mother } + NOT = { is_at_same_location = scope:mother } + } + send_interface_toast = { + type = msg_child_born_toast + title = birth.father_is_former_consort_toast + left_icon = scope:mother + right_icon = scope:child + if = { + limit = { + scope:child = { has_trait = twin } + } + custom_tooltip = birth.father_is_former_consort_toast_tt_twins + } + else = { + custom_tooltip = birth.father_is_former_consort_toast_tt + } + } + } + else = { #Normal event + trigger_event = birth.1003 + } + } + 5 = { #Other parent (mother) suggest a name + trigger = { + is_consort_of = scope:mother + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + scope:child = { + mother ?= { is_ai = yes } + NOT = { has_trait = twin } + } + } + opinion_modifier = { + who = scope:child.mother + opinion_target = scope:child.father + min = 0 + max = 10 + multiplier = 0.1 + } + modifier = { + any_child = { is_alive = yes count > 1 } + add = -5 + } + modifier = { + scope:child.father != scope:child.real_father + add = 5 + } + modifier = { + scope:child.mother = { + OR = { + has_trait = lunatic + has_trait = possessed + } + } + add = 15 + } + modifier = { # Event is less common for AI rulers. + scope:child.father = { is_ai = yes } + factor = 0.25 + } + trigger_event = birth.9002 + } + } + every_parent = { # Grandparents + limit = { + NOT = { is_parent_of = scope:child } # Don't ask + trigger_if = { + limit = { + scope:child = { tgp_is_in_ceremonial_house_trigger = yes } + } + tgp_is_in_ceremonial_house_trigger = yes + } + } + send_interface_toast = { + type = msg_grandchild_born_toast + title = msg_grandchild_born_toast_title + left_icon = scope:mother + right_icon = scope:child + if = { + limit = { + scope:child = { has_trait = twin } + } + custom_tooltip = msg_grandchild_born_toast_desc_twins + } + else = { + custom_tooltip = msg_grandchild_born_toast_desc + } + } + } + } + } + + #To trigger events for sickly child and ill mother! + if = { + limit = { + has_character_flag = birth_child_will_become_sickly + } + trigger_event = { + id = birth.3031 + days = { 10 30 } + } + } + if = { + limit = { + has_character_flag = birth_mother_will_become_ill + } + trigger_event = { + id = birth.3041 + days = { 10 30 } + } + } + + #Chance to gain cool modifier if you've birthed a lot of kids! + if = { + limit = { + any_child = { + even_if_dead = yes + count >= 4 + } + NOT = { + has_character_modifier = mothered_many_children_modifier + } + } + random = { + chance = 10 + modifier = { + add = 25 + any_child = { + even_if_dead = yes + count >= 5 + } + } + modifier = { + add = 25 + any_child = { + even_if_dead = yes + count >= 7 + } + } + modifier = { + add = 25 + any_child = { + even_if_dead = yes + count >= 9 + } + } + modifier = { + add = 50 + any_child = { + even_if_dead = yes + count >= 10 + } + } + trigger_event = { + id = birth.0002 + days = { 7 14 } + } + } + } + pregnancy_cleanup_effect = yes + + + #Special traits from event learning_medicine.1023 + if = { + limit = { has_character_flag = medicine_learning_fertility_treamtent_unexpected_trait } + remove_character_flag = medicine_learning_fertility_treamtent_unexpected_trait + scope:child = { + random_list = { + 2 = { + trigger = { + NOR = { + has_trait = beauty_good + has_trait = beauty_bad + } + } + add_trait = beauty_good_3 + } + 1 = { + trigger = { + NOR = { + has_trait = beauty_good + has_trait = beauty_bad + } + } + add_trait = beauty_bad_3 + } + 2 = { + trigger = { + NOR = { + has_trait = physique_good + has_trait = physique_bad + } + } + add_trait = physique_good_3 + } + 1 = { + trigger = { + NOR = { + has_trait = physique_good + has_trait = physique_bad + } + } + add_trait = physique_bad_3 + } + 2 = { + trigger = { + NOR = { + has_trait = intellect_good + has_trait = intellect_bad + } + } + add_trait = intellect_good_3 + } + 1 = { + trigger = { + NOR = { + has_trait = intellect_good + has_trait = intellect_bad + } + } + add_trait = intellect_bad_3 + } + 1 = { add_trait = dwarf } + 2 = { add_trait = giant } + 1 = { add_trait = albino } + } + } + } + + #Is a player part of the same dynasty, and my host? Give them the chance to name the child! + scope:child.dynasty ?= { + if = { + limit = { + any_player = { + allow_naming_on_birth_of_dynasty_child_trigger = { CHILD = scope:child } + NOT = { is_parent_of = scope:child } # parents should get their own naming event + dynasty ?= scope:child.dynasty + } + } + random_player = { + limit = { + allow_naming_on_birth_of_dynasty_child_trigger = { CHILD = scope:child } + NOT = { is_parent_of = scope:child } + dynasty ?= scope:child.dynasty + } + trigger_event = birth.1010 + } + } + } + # TGP Ceremonial House + scope:child = { + if = { + limit = { + tgp_is_in_ceremonial_house_trigger = yes + any_parent = { + NOT = { tgp_is_in_ceremonial_house_trigger = yes } + } + } + every_parent = { + limit = { + NOT = { tgp_is_in_ceremonial_house_trigger = yes } + } + save_scope_as = non_royal_parent + dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } + every_player = { + limit = { top_liege = scope:child.top_liege } + send_interface_toast = { + type = msg_royal_child_born_toast + title = msg_royal_child_born_toast_title + left_icon = scope:non_royal_parent + right_icon = scope:child + if = { + limit = { + scope:child = { has_trait = twin } + scope:non_royal_parent = { is_female = yes } + } + custom_tooltip = msg_royal_child_born_toast_desc_twins + } + else_if = { + limit = { + scope:child = { has_trait = twin } + } + custom_tooltip = msg_royal_child_born_toast_desc_twins_father + } + else_if = { + limit = { + scope:non_royal_parent = { is_female = yes } + } + custom_tooltip = msg_royal_child_born_toast_desc + } + else = { custom_tooltip = msg_royal_child_born_toast_desc_father } + show_as_tooltip = { + scope:non_royal_parent.dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } + } + } + } + } + } + } + } +} + +#Reward event for mother who've had many children +birth.0002 = { + type = character_event + title = birth.0002.t + desc = birth.0002.desc + left_portrait = { + character = root + animation = newborn + } + theme = family + override_background = { reference = bedchamber } + + immediate = { + play_music_cue = mx_cue_positive_effect + } + + option = { + name = birth.0002.a + add_character_modifier = { + modifier = mothered_many_children_modifier + } + } +} + +#BIRTH: Mother: regular birth +birth.1001 = { + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:child = { + NOT = { has_trait = twin } + NAND = { + exists = root.player_heir + this = root.player_heir + } + } + } + desc = birth.1001.t + } + triggered_desc = { + trigger = { + scope:child = { + NOT = { has_trait = twin } + AND = { + exists = root.player_heir + this = root.player_heir + } + } + } + desc = birth.1001.heir.t + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_female = yes + } + scope:child_2 = { is_female = yes } + } + desc = birth.1001.daughters.t + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_male = yes + } + scope:child_2 = { is_male = yes } + } + desc = birth.1001.sons.t + } + desc = birth.1001.children.t + } + } + desc = { + #How do I feel? + random_valid = { + triggered_desc = { #First child and it was cool + trigger = { + NOT = { + any_child = { + even_if_dead = yes + NOR = { + this = scope:child + is_twin_of = scope:child + } + } + } + NOT = { has_trait = craven } + } + desc = birth.1001.first_birth_good.desc + } + triggered_desc = { #First child and it was scary + trigger = { + NOT = { + any_child = { + even_if_dead = yes + NOR = { + this = scope:child + is_twin_of = scope:child + } + } + } + NOT = { has_trait = brave } + } + desc = birth.1001.first_birth_scary.desc + } + triggered_desc = { #Had a lot of babies + trigger = { + any_child = { + even_if_dead = yes + count >= 5 + } + } + desc = birth.1001.many_births.desc + } + triggered_desc = { + trigger = { + any_child = { + even_if_dead = yes + NOR = { + this = scope:child + is_twin_of = scope:child + } + } + } + desc = birth.1001.not_first_birth.desc + } + } + #What did you get? + first_valid = { + triggered_desc = { + trigger = { + scope:child = { + NOT = { has_trait = twin } + } + } + desc = birth.1001.sondaughter.desc + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_female = yes + } + scope:child_2 = { is_female = yes } + } + desc = birth.1001.daughters.desc + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_male = yes + } + scope:child_2 = { is_male = yes } + } + desc = birth.1001.sons.desc + } + desc = birth.1001.children.desc + } + #Conclusion + first_valid = { + # Mystical Birthright + triggered_desc = { + trigger = { + scope:child = { has_character_flag = born_as_taltos } + faith = scope:child.faith + } + desc = birth.1001.taltos.desc + } + triggered_desc = { + trigger = { + scope:child = { has_character_flag = born_as_taltos } + faith != scope:child.faith + } + desc = birth.1001.taltos_unfaithful.desc + } + # Twins + triggered_desc = { + trigger = { + scope:child = { has_trait = twin } + exists = root.player_heir + OR = { + scope:child = root.player_heir + scope:child_2 = root.player_heir + } + } + desc = birth.1001.twins_heir.desc + } + triggered_desc = { + trigger = { + scope:child = { has_trait = twin } + } + desc = birth.1001.twins.desc + } + # Heir + triggered_desc = { + trigger = { + exists = root.player_heir + scope:child = root.player_heir + NOT = { sex_opposite_of = scope:child } + } + desc = birth.1001.same_gender_heir.desc + } + triggered_desc = { + trigger = { + exists = root.player_heir + scope:child = root.player_heir + } + desc = birth.1001.other_gender_heir.desc + } + # Nothing Special + triggered_desc = { + desc = birth.1001.end_fallback.desc + } + } + } + theme = pregnancy + override_background = { + trigger = { scope:mother = { is_travelling = yes } } + reference = terrain_travel + } + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = newborn + outfit_tags = { nightgown } + } + right_portrait = { + trigger = { exists = scope:second_adult } + character = scope:second_adult + animation = newborn + } + lower_left_portrait = scope:child + lower_center_portrait = scope:child_2 + lower_right_portrait = scope:father + + trigger = { + root = scope:mother + scope:child.father = scope:child.real_father + scope:child = { + NOT = { has_trait = bastard } + NOT = { has_trait = legitimized_bastard } + } + NOT = { + any_secret = { + type = secret_disputed_heritage + secret_target = { + this = scope:child + } + } + } + birth_will_happen_as_usual_trigger = yes + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_birth } + if = { + limit = { + exists = var:dead_spouse + } + var:dead_spouse = { + save_scope_as = father + } + } + else = { + scope:child.father = { + save_scope_as = father + } + } + scope:child = { + hidden_effect = { set_father = scope:father } + if = { + limit = { has_trait = twin } + random_sibling = { + limit = { + is_twin_of = scope:child + } + save_scope_as = child_2 + } + } + } + if = { #To save the child that the father suspects of illegitimacy + limit = { + has_character_flag = father_suspects_this_pregnancy + scope:father = { is_alive = yes } + } + remove_character_flag = father_suspects_this_pregnancy + scope:father = { + set_variable = { + name = suspect_this_child_of_illegitimacy + value = scope:child + } + } + } + #Look for another adult to hold the twin + if = { + limit = { exists = scope:child_2 } + #Let's save the court physician if you have one + if = { + limit = { + court_physician_available_trigger = yes + any_court_position_holder = { + type = court_physician_court_position + has_court_event_flag = no + is_ai = yes + } + } + save_court_physician_as_effect = { SCOPE_NAME = second_adult } + } + #Otherwise look for a relative of the mother + else_if = { + limit = { + scope:mother = { + any_close_or_extended_family_member = { + is_in_the_same_court_as = root + is_adult = yes + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + } + } + scope:mother = { + random_close_or_extended_family_member = { + limit = { + is_in_the_same_court_as = root + is_adult = yes + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:mother } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + this = scope:father + this = scope:mother + } + } + alternative_limit = { + is_in_the_same_court_as = root + is_adult = yes + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + save_scope_as = second_adult + } + } + } + #Then a relative of the father + else_if = { + limit = { + scope:father = { + any_close_or_extended_family_member = { + is_in_the_same_court_as = root + is_adult = yes + is_female = yes + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + } + } + scope:father = { + random_close_or_extended_family_member = { + limit = { + is_in_the_same_court_as = root + is_adult = yes + is_female = yes + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:mother } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + this = scope:father + this = scope:mother + } + } + alternative_limit = { + is_in_the_same_court_as = root + is_adult = yes + is_female = yes + opinion = { + target = scope:mother + value >= 10 + } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + save_scope_as = second_adult + } + } + } + #In lack of that look for a courtier with good relations + else_if = { + limit = { + any_courtier= { + is_adult = yes + is_female = yes + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + } + random_courtier = { + limit = { + is_adult = yes + is_female = yes + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:mother } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + this = scope:father + this = scope:mother + } + } + alternative_limit = { + is_adult = yes + is_female = yes + opinion = { + target = scope:mother + value >= 10 + } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + save_scope_as = second_adult + } + } + } + # Special effects for Taltos + scope:child = { + if = { + limit = { + faith = { + has_doctrine_parameter = mystic_birthright_active + NOT = { has_variable = recent_taltos_born } + } + } + random_list = { + # 1% chance of super rare Taltos birth for AI characters + 1 = { + modifier = { # 5% chance for players + add = 4 + OR = { + scope:mother = { + is_ai = no + } + scope:father = { + is_ai = no + } + } + } + + add_character_flag = born_as_taltos + add_trait = lifestyle_mystic + hidden_effect = { + add_trait_xp = { + trait = lifestyle_mystic + value = 100 + } + } + faith = { + set_variable = { + name = recent_taltos_born + value = yes + years = 30 + } + } + # Notify other players about the birth of a Taltos. + every_player = { + limit = { + faith = scope:child.faith + NOR = { + this = scope:father + this = scope:mother + } + } + trigger_event = birth.1100 + } + } + 99 = { + modifier = { # 5% chance for players + add = -4 + OR = { + scope:mother = { + is_ai = no + } + scope:father = { + is_ai = no + } + } + } + # 99% chance of normal uninteresting birth + } + + } + } + } + } + + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child_2 } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child_2 = { save_scope_as = name_character_target } } + } + } + + option = { + name = birth.1001.a + trigger = { scope:child = { NOT = { has_trait = twin } } } + add_prestige = minor_prestige_gain + } + + option = { + name = birth.1001.b + trigger = { scope:child = { has_trait = twin } } + add_prestige = minor_prestige_gain + } +} + + +#BIRTH: Mother: child secretly a bastard +birth.1002 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:child = { + NOT = { has_trait = twin } + NOT = { is_player_heir_of = root } + } + } + desc = birth.1001.t + } + triggered_desc = { + trigger = { + scope:child = { + NOT = { has_trait = twin } + is_player_heir_of = root + } + } + desc = birth.1001.heir.t + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_female = yes + } + scope:child_2 = { is_female = yes } + } + desc = birth.1001.daughters.t + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_male = yes + } + scope:child_2 = { is_male = yes } + } + desc = birth.1001.sons.t + } + desc = birth.1001.children.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:child = { has_trait = twin } } + desc = birth.1002.opening.twin + } + desc = birth.1002.opening + } + desc = birth.1002.true_father + first_valid = { + triggered_desc = { + trigger = { scope:child = { has_trait = twin } } + desc = birth.1002.twin_name.desc + } + triggered_desc = { + trigger = { scope:child = { is_male = yes } } + desc = birth.1002.boy_name.desc + } + desc = birth.1002.girl_name.desc + } + } + theme = pregnancy + override_background = { + trigger = { scope:mother = { is_travelling = yes } } + reference = terrain_travel + } + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = newborn + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:real_father + animation = flirtation + } + lower_right_portrait = scope:father + lower_left_portrait = scope:child + lower_center_portrait = { + trigger = { exists = scope:child_2 } + character = scope:child_2 + } + + immediate = { + play_music_cue = mx_cue_seduction + scope:child = { + if = { + limit = { has_trait = twin } + random_sibling = { + limit = { + is_twin_of = scope:child + } + save_scope_as = child_2 + } + if = { + limit = { + any_sibling = { + is_twin_of = scope:child + this != scope:child_2 + } + } + random_sibling = { + limit = { + is_twin_of = scope:child + this != scope:child_2 + } + save_scope_as = child_3 + } + } + } + } + } + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child_2 } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child_2 = { save_scope_as = name_character_target } } + } + } + + option = { + name = birth.1002.a + trigger = { scope:child = { NOT = { has_trait = twin } } } + custom_tooltip = birth.1002.a.tt + } + option = { + name = birth.1002.b + trigger = { scope:child = { has_trait = twin } } + custom_tooltip = birth.1002.b.tt + } + option = { + name = birth.1002.c + trigger = { + any_owned_story = { + type = story_peasant_affair + var:peasant_character = { + this = scope:real_father + } + } + } + add_character_flag = is_looking_for_peasant #To take the story_peasant_affair to the next step + add_character_flag = peasant_affair_already_looking + custom_tooltip = search_for_real_father_tt + } + after = { + bastard_real_father_discovery_on_birth_effect = yes + } +} + + +#BIRTH: Father: Regular birth or unaware of unknown bastard birth +birth.1003 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:child = { + NOT = { has_trait = twin } + } + player_heir ?= scope:child + } + desc = birth.1001.heir.t + } + triggered_desc = { + trigger = { + scope:child = { + NOT = { has_trait = twin } + } + } + desc = birth.1001.t + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_female = yes + } + scope:child_2 = { is_female = yes } + } + desc = birth.1001.daughters.t + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_male = yes + } + scope:child_2 = { is_male = yes } + } + desc = birth.1001.sons.t + } + desc = birth.1001.children.t + } + } + desc = { + #Do I care about the mother? + first_valid = { + # Borte's first child + triggered_desc = { + trigger = { + this = character:125501 + scope:mother = { has_variable = borte_first_child_var } + } + desc = secret_bastard.0001.assumed_father + } + triggered_desc = { + trigger = { + OR = { + has_relation_lover = scope:child.mother + AND = { + opinion = { + target = scope:child.mother + value >= high_positive_opinion + } + NOR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + desc = birth.1003.loves_mother.desc + } + triggered_desc = { + trigger = { + opinion = { + target = scope:child.mother + value >= low_positive_opinion + } + } + desc = birth.1003.likes_mother.desc + } + desc = birth.1003.dislikes_mother.desc + } + #What did I get? + first_valid = { + # Borte's first child + triggered_desc = { + trigger = { + this = character:125501 + scope:mother = { has_variable = borte_first_child_var } + } + desc = birth.1003.desc.empty + } + triggered_desc = { + trigger = { + scope:child = { + NOT = { has_trait = twin } + } + } + desc = birth.1001.sondaughter.desc + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_female = yes + } + scope:child_2 = { is_female = yes } + } + desc = birth.1001.daughters.desc + } + triggered_desc = { + trigger = { + scope:child = { + has_trait = twin + is_male = yes + } + scope:child_2 = { is_male = yes } + } + desc = birth.1001.sons.desc + } + desc = birth.1001.children.desc + } + #Conclusion + first_valid = { + # Borte's first child + triggered_desc = { + trigger = { + this = character:125501 + scope:mother = { has_variable = borte_first_child_var } + } + desc = birth.1003.desc.borte + } + # Mystical Birthright + triggered_desc = { + trigger = { + scope:child = { has_character_flag = born_as_taltos } + faith = scope:child.faith + } + desc = birth.1001.taltos.desc + } + triggered_desc = { + trigger = { + scope:child = { has_character_flag = born_as_taltos } + faith != scope:child.faith + } + desc = birth.1001.taltos_unfaithful.desc + } + # Twins + triggered_desc = { + trigger = { + scope:child = { has_trait = twin } + exists = player_heir + OR = { + player_heir = scope:child + player_heir = scope:child_2 + } + } + desc = birth.1001.twins_heir.desc + } + triggered_desc = { + trigger = { + scope:child = { has_trait = twin } + } + desc = birth.1001.twins.desc + } + # Heir + triggered_desc = { + trigger = { + player_heir ?= scope:child + NOT = { sex_opposite_of = scope:child } + } + desc = birth.1001.same_gender_heir.desc + } + triggered_desc = { + trigger = { + player_heir ?= scope:child + } + desc = birth.1001.other_gender_heir.desc + } + # Nothing Special + triggered_desc = { + desc = birth.1001.end_fallback.desc + } + } + } + theme = pregnancy + override_background = { + trigger = { scope:mother = { is_travelling = yes } } + reference = terrain_travel + } + override_background = { reference = bedchamber } + left_portrait = { + character = scope:mother + outfit_tags = { nightgown } + animation = newborn + } + right_portrait = { + trigger = { exists = scope:second_adult } + character = scope:second_adult + animation = newborn + } + lower_left_portrait = scope:child + lower_center_portrait = scope:child_2 + trigger = { + OR = { + scope:father = scope:real_father + AND = { + scope:father != scope:real_father + scope:father = { + NOT = { + any_known_secret = { + secret_owner = scope:mother + AND = { + secret_type = secret_disputed_heritage + secret_target = scope:child + } + } + } + } + } + } + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_birth } + scope:child = { + if = { + limit = { has_trait = twin } + random_sibling = { + limit = { + is_twin_of = scope:child + } + save_scope_as = child_2 + } + if = { + limit = { + any_sibling = { + is_twin_of = scope:child + this != scope:child_2 + } + } + random_sibling = { + limit = { + is_twin_of = scope:child + this != scope:child_2 + } + save_scope_as = child_3 + } + } + } + } + #Look for another adult to hold the twin + if = { + limit = { exists = scope:child_2 } + #Let's save the court physician if you have one + if = { + limit = { + court_physician_available_trigger = yes + any_court_position_holder = { + type = court_physician_court_position + has_court_event_flag = no + is_ai = yes + this != scope:mother + } + } + save_court_physician_as_effect = { SCOPE_NAME = second_adult } + } + #Otherwise look for a relative of the mother + else_if = { + limit = { + scope:mother = { + any_close_or_extended_family_member = { + is_in_the_same_court_as = root + is_adult = yes + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + } + } + scope:mother = { + random_close_or_extended_family_member = { + limit = { + is_in_the_same_court_as = root + is_adult = yes + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:mother } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + this = scope:father + this = scope:mother + } + } + alternative_limit = { + is_in_the_same_court_as = root + is_adult = yes + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + save_scope_as = second_adult + } + } + } + #Then a relative of the father + else_if = { + limit = { + scope:father = { + any_close_or_extended_family_member = { + is_in_the_same_court_as = root + is_adult = yes + is_female = yes + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + } + } + scope:father = { + random_close_or_extended_family_member = { + limit = { + is_in_the_same_court_as = root + is_adult = yes + is_female = yes + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:mother } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + this = scope:father + this = scope:mother + } + } + alternative_limit = { + is_in_the_same_court_as = root + is_adult = yes + is_female = yes + opinion = { + target = scope:mother + value >= 10 + } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + save_scope_as = second_adult + } + } + } + #In lack of that look for a courtier with good relations + else_if = { + limit = { + any_courtier= { + is_adult = yes + is_female = yes + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + } + random_courtier = { + limit = { + is_adult = yes + is_female = yes + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:mother } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + this = scope:father + this = scope:mother + } + } + alternative_limit = { + is_adult = yes + is_female = yes + opinion = { + target = scope:mother + value >= 10 + } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:father } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } + this = scope:father + this = scope:mother + } + } + save_scope_as = second_adult + } + } + } + } + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child_2 } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child_2 = { save_scope_as = name_character_target } } + } + } + + option = { + name = birth.1003.a + trigger = { scope:child = { NOT = { has_trait = twin } } } + if = { + limit = { + scope:mother = { + this = character:172004 + has_variable = borte_first_child_var + } + } + scope:child = { add_trait = wild_oat } + scope:child = { + add_secret = { + type = secret_disputed_heritage + target = scope:child + } + } + scope:new_secret = { reveal_to = root } + scope:mother = { remove_variable = borte_first_child_var } + } + } + + option = { + name = birth.1003.b + trigger = { scope:child = { has_trait = twin } } + } +} + + + +#BIRTH: Mother: Unmarried and father is unknown +birth.1005 = { + type = character_event + title = birth.1005.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:child_2 } + desc = birth.1005.desc.twin + } + desc = birth.1005.desc + } + } + theme = pregnancy + override_background = { + trigger = { scope:mother = { is_travelling = yes } } + reference = terrain_travel + } + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = newborn + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:child.real_father + animation = flirtation + } + lower_left_portrait = scope:child + lower_center_portrait = scope:child_2 + lower_right_portrait = scope:spouse_of_mother + + immediate = { + play_music_cue = mx_cue_seduction + if = { + limit = { + exists = scope:mother.primary_spouse + } + scope:mother.primary_spouse = { + save_scope_as = spouse_of_mother + } + } + show_as_tooltip = { + if = { + limit = { + exists = scope:child_2 + } + add_secret = { + type = secret_unmarried_illegitimate_child + target = scope:child_2 + } + } + add_secret = { + type = secret_unmarried_illegitimate_child + target = scope:child + } + } + } + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child_2 } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child_2 = { save_scope_as = name_character_target } } + } + } + + option = { + name = birth.1005.a + bastard_real_father_discovery_on_birth_effect = yes + } +} + +#BIRTH: Real father: Realizes he is father of newborn (currently only triggered in 1005) +birth.1006 = { + type = character_event + title = birth.1006.t + desc = { + desc = birth.1006.opening + first_valid = { + triggered_desc = { + trigger = { exists = scope:child_2 } + desc = birth.1006.desc.twin + } + desc = birth.1006.desc + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spouse_of_mother + } + desc = birth.1006.not_known + } + desc = birth.1006.unmarried + } + } + theme = pregnancy + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = flirtation + } + right_portrait = { + character = scope:mother + animation = newborn + outfit_tags = { nightgown } + } + lower_left_portrait = scope:child + lower_center_portrait = scope:child_2 + lower_right_portrait = scope:spouse_of_mother + + trigger = { + exists = scope:secret # Chance of Secret invalidating + scope:secret = { + NOT = { + is_known_by = root + } + secret_target.real_father = root + } + } + + immediate = { + play_music_cue = mx_cue_seduction + + custom_tooltip = birth.1006.bastard_explanation + hidden_effect = { + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + } + } + + option = { #Keep the secret + name = birth.1006.a + custom_tooltip = birth.1006.a.tt + hidden_effect = { + scope:mother = { + send_interface_message = { + type = event_childhood_neutral_text + title = birth.1006.a.message_desc + desc = birth.1006.a.mother_message + left_icon = scope:child.real_father + right_icon = scope:child + } + } + } + ai_chance = { + base = 100 + } + } + + option = { #Reveal the secret + name = birth.1006.b + scope:secret = { + expose_secret = root + } + scope:child = { remove_inherited_descendent_traits_effect = yes } + if = { + limit = { exists = scope:child_2 } + scope:child_2 = { remove_inherited_descendent_traits_effect = yes } + } + + ai_chance = { + base = 10 + modifier = { #More likely if the character does not have a player_heir + add = 50 + NOT = { exists = player_heir } + age > 25 #Young characters don't care as much + character_gender_can_rule_title_trigger = { + GENDER = scope:child + TITLE = primary_title + } + } + modifier = { #More likely if the character is unlikely to produce any other potential heirs... + add = 50 + NOT = { exists = player_heir } + age > 30 + fertility <= low_fertility + character_gender_can_rule_title_trigger = { + GENDER = scope:child + TITLE = primary_title + } + } + ai_value_modifier = { + ai_honor = 0.5 + } + } + } +} + +#Host of the same dynasty (not ai) get to name the child +birth.1010 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:child_2 + } + desc = birth.1010.t_twins + } + desc = birth.1010.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:child_2 } + desc = birth.1010.desc.twin + } + desc = birth.1010.desc + } + } + theme = pregnancy + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:mother + animation = newborn + outfit_tags = { nightgown } + } + lower_left_portrait = scope:child + lower_center_portrait = scope:child_2 + lower_right_portrait = scope:spouse_of_mother + + immediate = { + play_music_cue_once = { TRACK = mx_cue_birth } + if = { + limit = { + exists = scope:mother.primary_spouse + } + scope:mother.primary_spouse = { + save_scope_as = spouse_of_mother + } + } + else_if = { + limit = { exists = scope:child.father } + scope:child.father = { save_scope_as = spouse_of_mother } + } + } + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_dynasty_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + widget = { + is_shown = { + allow_naming_on_birth_of_dynasty_child_trigger = { CHILD = scope:child_2 } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child_2 = { save_scope_as = name_character_target } } + } + } + + option = { + name = birth.1003.b + } +} + + + +# Sends good omen notification +birth.1100 = { + hidden = yes + + immediate = { + play_music_cue_once = { TRACK = mx_cue_birth } + send_interface_message = { + type = event_religious_good_with_text + title = birth.1100.title + desc = birth.1100.message + left_icon = scope:mother + right_icon = scope:child + } + } +} + + +#KNOWN BASTARD BIRTH +#Event for Potential Legitimizer +birth.2001 = { + type = character_event + title = birth.2001.t + desc = { + triggered_desc = { + trigger = { + is_female = yes + scope:child = { NOT = { has_trait = twin } } + } + desc = birth.2001.desc.mother.standard + } + triggered_desc = { + trigger = { + is_female = yes + scope:child = { has_trait = twin } + } + desc = birth.2001.desc.mother.twins + } + triggered_desc = { + trigger = { + is_male = yes + scope:child = { NOT = { has_trait = twin } } + } + desc = birth.2001.desc.father.standard + } + triggered_desc = { + trigger = { + is_male = yes + scope:child = { has_trait = twin } + } + desc = birth.2001.desc.father.twins + } + } + theme = pregnancy + override_background = { reference = relaxing_room } + lower_left_portrait = scope:child + lower_center_portrait = { + trigger = { exists = scope:child_2 } + character = scope:child_2 + } + left_portrait = { + character = scope:other_parent + triggered_animation = { + trigger = { + this = scope:child.mother + } + animation = newborn + } + triggered_animation = { + trigger = { always = yes } + animation = worry + } + } + + immediate = { + play_music_cue = mx_cue_seduction + hidden_effect = { + scope:child = { remove_inherited_descendent_traits_effect = yes } + if = { + limit = { exists = scope:child_2 } + scope:child_2 = { remove_inherited_descendent_traits_effect = yes } + } + } + #To get the picture of the other parent, and send correct follow-up events + if = { + limit = { + scope:mother = root + } + scope:real_father = { + save_scope_as = other_parent + } + } + else = { + scope:mother = { + save_scope_as = other_parent + } + } + save_scope_as = legitimizer + if = { + limit = { + exists = house.house_head + } + house.house_head = { + save_scope_as = house_head + } + } + scope:child = { + save_scope_as = bastard #Necessary for the House Head approval calculation + } + } + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + } + + #Legitimize + option = { + name = { + trigger = { scope:child = { NOT = { has_trait = twin } } } + text = birth.2001.a.standard + } + name = { + trigger = { scope:child = { has_trait = twin } } + text = birth.2001.a.twins + } + trigger = { + custom_description = { + text = bastard_not_of_my_house_trigger + object = scope:child + exists = scope:child.house + } + custom_description = { + text = bastard_not_of_my_house_trigger + object = scope:child + house = scope:child.house + } + trigger_if = { # Does the House Head approve? + limit = { + house.house_head != root + } + custom_description = { + text = house_head_would_not_approve_trigger + subject = house.house_head + object = scope:child + house_head_would_approve_legitimization_trigger = { + LEGITIMIZER = root + BASTARD = scope:child + } + } + } + is_allowed_to_legitimize_children_trigger = yes + } + show_as_unavailable = { + always = yes + } + + add_prestige = { + value = bastard_legitimization_prestige_cost + multiply = -1 + } + + #To block multiple notifications + save_scope_value_as = { + name = newborn_legitimization + value = yes + } + + legitimize_bastard_interaction_opinions_effect = { + BASTARD = scope:child + HOUSE_HEAD = root.house.house_head + LEGITIMIZER = root + } + + if = { # Move the child to the legitimizer's court if relevant + limit = { + scope:child = { + NOT = { is_in_the_same_court_as_or_guest = root } + } + exists = court_owner + } + if = { + limit = { + scope:child = { + NOT = { is_courtier_of = ROOT } # Check that char is not already at your court (theoretical fix) + } + OR = { + this = court_owner + is_courtier_of = court_owner + } + } + add_courtier = scope:child + } + else = { + scope:child = { visit_court_of = root.court_owner } + } + } + + hidden_effect = { + scope:mother = { + every_child = { + limit = { + OR = { + this = scope:child + is_twin_of = scope:child + } + } + + legitimize_bastard_interaction_opinions_effect = { + BASTARD = this + HOUSE_HEAD = root.house.house_head + LEGITIMIZER = root + } + } + } + + scope:other_parent = { + trigger_event = birth.2002 + } + } + + + ai_chance = { + base = 10 + + modifier = { + is_playable_character = yes + NOT = { exists = player_heir } + NOR = { + AND = { + primary_title ?= { has_title_law = male_only_law } + scope:child = { is_female = yes } + } + AND = { + primary_title ?= { has_title_law = female_only_law } + scope:child = { is_male = yes } + } + } + age > 45 + factor = 50 + } + modifier = { + is_married = no + factor = 1.5 + } + modifier = { + ai_compassion >= high_positive_compassion + factor = 2 + } + } + } + + #Child remains a normal bastard + option = { + name = { + text = birth.2001.b.standard + } + name = { + text = birth.2001.b.no_legitimization_in_faith + trigger = { + faith = { + has_doctrine_parameter = bastards_always + } + } + } + + custom_tooltip = bastard_remains_bastard_tt + + #other_parent gets the correct birth event + scope:other_parent = { + trigger_event = birth.2003 #The legitimizer did not legitimize + } + + #Spouse of mother must know about baby + if = { + limit = { + scope:mother = { + is_married = yes + primary_spouse != scope:real_father + } + } + scope:mother.primary_spouse = { + trigger_event = birth.2102 + } + } + + ai_chance = { + base = 100 + } + } +} + +#Other parent is told that child was legitimized +birth.2002 = { + type = character_event + title = birth.2002.t + desc = { + desc = birth.2002.start + first_valid = { + triggered_desc = { + trigger = { NOT = { scope:child = { has_trait = twin } } } + desc = birth.2002.desc.standard + } + triggered_desc = { + trigger = { scope:child = { has_trait = twin } } + desc = birth.2002.desc.twins + } + } + desc = birth.2002.end + } + theme = pregnancy + override_background = { reference = relaxing_room } + left_portrait = { + character = scope:legitimizer + animation = newborn + } + lower_left_portrait = scope:child + + immediate = { + play_music_cue_once = { TRACK = mx_cue_birth } + show_as_tooltip = { + scope:child = { + add_trait_force_tooltip = legitimized_bastard + } + } + } + + #Child was legitimized + option = { + name = birth.2002.a + custom_tooltip = legitimized_known_bastard_birth_event_tooltip + } +} + +#The legitimizer did not legitimize +birth.2003 = { + type = character_event + title = birth.2003.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:child = { has_trait = twin } } + desc = birth.2003.desc.twin_start + } + desc = birth.2003.desc.standard_start + } + first_valid = { + triggered_desc = { + trigger = { scope:legitimizer = { is_playable_character = yes } } + desc = birth.2003.desc.landed_end + } + desc = birth.2003.desc.unlanded_end + } + } + theme = pregnancy + override_background = { reference = relaxing_room } + left_portrait = { + character = scope:legitimizer + animation = dismissal + } + lower_left_portrait = scope:child + + immediate = { + play_music_cue = mx_cue_seduction + } + + #Child was not legitimized + option = { + name = birth.2003.a + custom_tooltip = known_bastard_birth_event_tooltip + } +} + + +### Legitimizer's Faith does not have bastardy +birth.2011 = { + type = character_event + title = birth.2011.t + desc = birth.2011.desc + theme = pregnancy + override_background = { reference = relaxing_room } + left_portrait = { + character = scope:other_parent + animation = happiness + } + right_portrait = { + character = scope:mother.primary_partner + animation = disapproval + trigger = { + exists = scope:mother.primary_partner + root != scope:mother.primary_partner + } + } + lower_left_portrait = scope:child + + immediate = { + play_music_cue = mx_cue_seduction + + #To get the picture of the other parent, and send correct follow-up events + if = { + limit = { + scope:mother = root + } + scope:real_father = { + save_scope_as = other_parent + } + } + else = { + scope:mother = { + save_scope_as = other_parent + } + } + save_scope_as = legitimizer + + + # It's already added elsewhere, but we want this here for tooltip reasons. + scope:child = { + show_as_tooltip = { + add_bastard_trait_based_on_faith_effect = yes + } + } + } + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + } + + option = { + name = birth.1001.a + scope:other_parent = { + trigger_event = birth.2012 + } + + #Spouse of mother must know about baby + if = { + limit = { + exists = scope:mother.primary_spouse + scope:mother.primary_spouse = { + NOR = { + this = scope:legitimizer + this = scope:other_parent + this = scope:real_father + } + } + } + scope:mother.primary_spouse = { + trigger_event = birth.2102 + } + } + } +} + + +# Event for "non-legitimizer" +birth.2012 = { + type = character_event + title = birth.2011.t + desc = birth.2011.desc + theme = pregnancy + override_background = { reference = relaxing_room } + left_portrait = { + character = scope:legitimizer + animation = love + } + lower_left_portrait = scope:child + right_portrait = { + trigger = { + exists = primary_partner + } + character = primary_partner + } + + immediate = { + scope:child = { + # It's already added elsewhere, but we want this here for tooltip reasons. + show_as_tooltip = { + add_bastard_trait_based_on_faith_effect = yes + } + } + } + + option = { + name = birth.1001.a + } +} + + +################### +# Notifications for the birth of an unlegitimizable bastard +# 2100-2199 +################## + + +#Event for the Mother's Spouse/Concubinist, unlegitimizable bastard +birth.2102 = { + type = character_event + title = birth.2102.t + desc = birth.2102.desc + theme = pregnancy + override_background = { reference = relaxing_room } + left_portrait = { + character = scope:mother + animation = newborn + } + lower_left_portrait = scope:child + right_portrait = { + character = scope:real_father + animation = worry + } + + immediate = { + play_music_cue = mx_cue_seduction + } + + option = { + name = birth.2102.a + } +} + +#Event for the Father's Spouse/Concubinist, unlegitimizable bastard +birth.2104 = { + type = character_event + title = birth.2104.t + orphan = yes + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:child = { has_trait = twin } + } + desc = birth.2104.desc.twin + } + desc = birth.2104.desc + } + } + theme = pregnancy + override_background = { reference = relaxing_room } + + left_portrait = { + character = scope:real_father + animation = flirtation + } + lower_left_portrait = scope:child + right_portrait = { + character = scope:mother + animation = newborn + } + + immediate = { + play_music_cue = mx_cue_seduction + } + + option = { + name = birth.2104.a + } +} + + +###################### +# Problematic births +# by Linnéa Thimrén +###################### + +#BIRTH: Mother: Child dies (no child created) +birth.3001 = { + type = character_event + title = birth.3001.t + desc = birth.3001.desc_other_child + theme = death + override_background = { reference = bedchamber} + left_portrait = { + character = root + animation = grief + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:father + trigger = { + exists = scope:father + } + animation = disbelief + } + + trigger = { + is_pregnant = yes + } + + immediate = { + play_music_cue = mx_cue_death + create_character_memory = { + type = child_stillborn + participants = { + mother = root + } + } + hidden_effect = { + random_dummy_gender_effect = yes + end_pregnancy = yes + } + if = { + limit = { + exists = scope:father + scope:father = { + is_alive = yes + } + } + scope:father = { + trigger_event = birth.3002 + } + } + custom_tooltip = birth.3001.a.tt + pregnancy_cleanup_effect = yes + } + + #NO NAMING WIDGET + + option = { + name = birth.3001.a + } +} + +#BIRTH: Father: Child dies (no child created) +birth.3002 = { + type = character_event + title = birth.3001.t + desc = birth.3002.desc + theme = death + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = stunned + } + right_portrait = { + character = scope:mother + animation = grief + outfit_tags = { nightgown } + } + + #NO NAMING WIDGET + + immediate = { + play_music_cue = mx_cue_death + create_character_memory = { + type = child_stillborn + participants = { + mother = scope:mother + } + } + custom_tooltip = birth.3001.a.tt + } + + option = { + name = birth.3002.a + } +} + +#BIRTH: Mother: Mother dies, child survives +birth.3011 = { + type = character_event + title = birth.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:child_2 + } + desc = birth.3011.desc_twin + } + desc = birth.3011.desc + } + first_valid = { + triggered_desc = { + trigger = { has_government = landless_adventurer_government } + desc = birth.3011.adventurer + } + desc = birth.3011.landed + } + } + theme = death + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = newborn + outfit_tags = { nightgown } + } + lower_center_portrait = scope:child + lower_left_portrait = scope:child_2 + + trigger = { + has_character_flag = birth_mother_will_die + } + + immediate = { + play_music_cue = mx_cue_death + pregnancy_maintainance_effect = yes + } + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child_2 } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child_2 = { save_scope_as = name_character_target } } + } + } + + option = { + name = { + trigger = { scope:child = { has_trait = twin } } + text = birth.3011.twin.a + } + name = { + trigger = { scope:child = { NOT = { has_trait = twin } } } + text = birth.3011.a + } + + if = { + limit = { + exists = scope:father + scope:father = { + is_alive = yes + } + } + scope:father = { + add_character_flag = { + flag = sent_relevant_death_event + days = 5 + } + trigger_event = birth.3012 + } + } + hidden_effect = { + remove_trait = pregnant + } + death = { + death_reason = death_childbirth + } + } +} + +#BIRTH: Father: Mother dies, child survives +birth.3012 = { + type = character_event + title = birth.3001.t + desc = { + desc = birth.3012.start.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:child_2 + } + desc = birth.3012.desc_twin + } + desc = birth.3012.desc + } + } + theme = death + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = newborn + } + right_portrait = { + character = scope:mother + animation = sick + outfit_tags = { nightgown } + } + lower_right_portrait = scope:child + lower_center_portrait = scope:child_2 + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child_2 } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child_2 = { save_scope_as = name_character_target } } + } + } + + immediate = { + play_music_cue = mx_cue_death + show_as_tooltip = { + scope:mother = { + death = { + death_reason = death_childbirth + } + } + } + } + + option = { + name = birth.3012.a + + add_stress = minor_stress_gain + } +} + +#BIRTH: Mother: Mother and child dies +birth.3021 = { + type = character_event + title = birth.3001.t + desc = birth.3021.desc + theme = death + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = pain + outfit_tags = { nightgown } + } + + trigger = { + is_pregnant = yes + } + + immediate = { + play_music_cue = mx_cue_death + create_character_memory = { + type = child_stillborn + participants = { + mother = root + } + } + hidden_effect = { + random_dummy_gender_effect = yes + end_pregnancy = yes + } + custom_tooltip = birth.3001.a.tt + } + + #NO NAMING WIDGET + + option = { + name = birth.3021.a + + if = { + limit = { + exists = scope:father + scope:father = { + is_alive = yes + } + } + scope:father = { + add_character_flag = { + flag = sent_relevant_death_event + days = 5 + } + trigger_event = birth.3022 + } + } + hidden_effect = { + remove_trait = pregnant + } + death = { + death_reason = death_childbirth + } + } +} + +#BIRTH: Father: Mother and child dies +birth.3022 = { + type = character_event + title = birth.3001.t + desc = birth.3022.desc + theme = death + override_background = { reference = bedchamber} + left_portrait = { + character = root + animation = grief + } + right_portrait = { + character = scope:mother + animation = pain + outfit_tags = { nightgown } + } + + immediate = { + play_music_cue = mx_cue_death + create_character_memory = { + type = child_stillborn + participants = { + mother = scope:mother + } + } + show_as_tooltip = { + scope:mother = { + death = { + death_reason = death_childbirth + } + } + } + custom_tooltip = birth.3001.a.tt + } + + #NO NAMING WIDGET + + option = { + name = { + trigger = { NOT = { faith = { religion_tag = buddhism_religion } } } + text = birth.3022.a + } + name = { + trigger = { faith = { religion_tag = buddhism_religion } } + text = birth.3022.a.buddhism + } + add_stress = medium_stress_gain + } +} + +#Sickly child - for mother +birth.3031 = { + type = character_event + title = birth.3031.t + desc = { + desc = birth.3031.start.desc + first_valid = { + triggered_desc = { + trigger = { + scope:child = { any_parent = { highest_held_title_tier >= tier_kingdom } } + } + desc = birth.3031.princessprince.desc + } + desc = birth.3031.daughterson.desc + } + desc = birth.3031.end.desc + } + theme = physical_health + left_portrait = { + character = scope:child + animation = sick + camera = camera_event_table_right_far_2 + } + right_portrait = { + character = scope:father + trigger = { + exists = scope:father + } + animation = worry + camera = camera_body + } + + immediate = { + play_music_cue = mx_cue_illness + scope:child = { + add_trait = sickly + } + } + + option = { + name = birth.3031.a + if = { + limit = { + exists = scope:father + } + scope:father = { + trigger_event = birth.3032 + } + } + } +} + +#Sickly child - for father +birth.3032 = { + type = character_event + title = birth.3031.t + desc = { + desc = birth.3031.start.desc + first_valid = { + triggered_desc = { + trigger = { + scope:child = { any_parent = { highest_held_title_tier >= tier_kingdom } } + } + desc = birth.3031.princessprince.desc + } + desc = birth.3031.daughterson.desc + } + desc = birth.3031.end.desc + } + theme = physical_health + left_portrait = { + character = scope:mother + animation = worry + camera = camera_body + } + right_portrait = { + character = scope:child + animation = sick + camera = camera_event_table_right_far_2 + } + + immediate = { + show_as_tooltip = { + scope:child = { + add_trait_force_tooltip = sickly + } + } + } + + option = { + name = birth.3031.a + } +} + +#Sickly child recovery management event +birth.3033 = { + hidden = yes + + trigger = { + has_trait = sickly + } + + immediate = { + trigger_event = { + id = birth.3034 + days = { 0 180 } + } + } +} + +#Sickly child recovery - for child +birth.3034 = { + type = character_event + title = birth.3034.t + desc = birth.3034.desc + theme = physical_health + left_portrait = { + character = root + animation = happiness + } + + immediate = { + play_music_cue = mx_cue_positive_effect + save_scope_as = child + set_favorite_toy_effect = yes + if = { + limit = { + exists = mother + } + mother = { + trigger_event = birth.3035 + } + } + if = { + limit = { + exists = father + } + father = { + trigger_event = birth.3035 + } + } + } + + option = { + name = birth.3034.a + remove_trait = sickly + } +} + + +#Sickly child recovery - for mother and father +birth.3035 = { + type = character_event + title = birth.3034.t + desc = birth.3035.desc + theme = physical_health + left_portrait = { + character = scope:child + animation = happiness + } + + immediate = { + play_music_cue = mx_cue_positive_effect + scope:child = { + show_as_tooltip = { + remove_trait_force_tooltip = sickly + } + } + } + + option = { + name = birth.3035.a + } +} + +#Sickly mother - for mother +birth.3041 = { + type = character_event + title = birth.3041.t + desc = { + desc = birth.3041.start.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:child_2 + } + desc = birth.3041.desc_twins + } + desc = birth.3041.one_child.desc + } + desc = birth.3041.end + } + theme = healthcare + left_portrait = { + character = root + animation = sick + } + + trigger = { + can_contract_disease_trigger = { DISEASE = ill } + } + + immediate = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + + option = { + name = birth.3041.a + } +} + + + +############################################# +# 8001-8999: Misc birth management +############################################# + +birth.8001 = { #by Mathilda Bjarnehed + type = character_event + hidden = yes + + trigger = { + can_become_reincarnation_trigger = yes + any_close_or_extended_family_member = { + even_if_dead = yes + is_grandparent_of = root + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random = { + chance = reincarnation_chance + modifier = { + OR = { + AND = { + exists = scope:mother.player_heir + this = scope:mother.player_heir + } + AND = { + exists = scope:father.player_heir + this = scope:father.player_heir + } + } + factor = 2 + } + + ###Decide who you're an reincarnation of!### + + #Build list of grandparents... + every_close_or_extended_family_member = { + even_if_dead = yes + limit = { + is_grandparent_of = root + } + add_to_list = grandparents_and_great_grandparents + debug_log = "Adding grandparents" + } + #... and great grandparents + every_in_list = { + list = grandparents_and_great_grandparents + every_parent = { + even_if_dead = yes + add_to_list = grandparents_and_great_grandparents + } + debug_log = "Adding great grandparents" + } + + #Pick a random appropriate one + random_in_list = { + list = grandparents_and_great_grandparents + limit = { + sex_same_as = root + can_reincarnate_trigger = yes + } + weight = { + base = 1 + modifier = { + is_grandparent_of = root + add = 2 + } + modifier = { + is_ruler = yes + add = 4 + } + } + debug_log = "Finding ancestor" + save_temporary_scope_as = ancestor + } + + if = { + limit = { + exists = scope:ancestor + } + + set_variable = { + name = reincarnation_of + value = scope:ancestor + } + copy_inheritable_appearance_from = scope:ancestor + } + + } + } +} + +# Born in the Purple allocation +# by Ewan Cowhig Croft +birth.8011 = { + type = character_event + hidden = yes + + trigger = { + any_parent = { + culture = { + has_cultural_parameter = children_can_be_born_in_the_purple + } + trigger_if = { + limit = { + has_ach_dlc_trigger = yes + NOT = { has_game_rule = coronation_laws_off } + } + NOT = { has_realm_law = uncrowned } # Must be coronated + } + trigger_if = { + limit = { + is_diarch = yes + } + liege_has_co_emperorship_trigger = yes + liege = { + is_roman_emperor_trigger = yes + capital_county = title:c_byzantion #Must rule from the Bucoleon Palace. + } + } + trigger_else = { + is_roman_emperor_trigger = yes + capital_county = title:c_byzantion #Must rule from the Bucoleon Palace. + } + } + mother = { + OR = { + AND = { #Landless mothers must be actually at court to use the chamber. + is_ruler = no + exists = location # Security check + OR = { + location = title:c_byzantion.title_province + # Be a bit more lenient with co-emperors. + AND = { + is_diarch = yes + liege_has_co_emperorship_trigger = yes + } + root.father ?= { + is_diarch = yes + 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 + NOT = { is_at_war_with = root.father } + } + } + is_imprisoned = no #Cannot use the purple chamber from prison. + is_commanding_army = no #Cannot use the purple chamber whilst commanding an army. + } + } + + immediate = { add_trait = born_in_the_purple } +} + + +################# +# NAMING EVENTS # by Mathilda Bjarnehed +################# + + +scripted_trigger birth_9003_same_gender_as_baby_trigger = { + OR = { + AND = { + is_female = yes + scope:child = { is_female = yes } + } + AND = { + is_male = yes + scope:child = { is_male = yes } + } + scope:suggester = { has_trait = lunatic } + } +} + +scripted_trigger birth_9002_suggester_relative_trigger = { + OR = { + OR = { + age > scope:suggester.age + is_alive = no + } + any_sibling = { this = scope:suggester } + } + NOT = { is_child_of = scope:suggester } + birth_9003_same_gender_as_baby_trigger = yes +} + +scripted_trigger birth_9002_namer_relative_trigger = { + OR = { + OR = { + age > scope:namer.age + is_alive = no + } + any_sibling = { this = scope:namer } + } + NOT = { is_child_of = scope:namer } + birth_9003_same_gender_as_baby_trigger = yes +} + +scripted_effect birth_9002_name_setting_effect = { + if = { + limit = { + OR = { + scope:name_type = flag:suggester_relative + scope:name_type = flag:namer_relative + scope:name_type = flag:suggesters_name + scope:name_type = flag:namers_name + } + } + hidden_effect = { scope:child = { change_first_name = { template_character = scope:namesake } } } + custom_tooltip = birth.9002.a.tt.1 + } + else_if = { + limit = { + exists = scope:name_suggestion + #Aaaall of this limit is error prevention + OR = { + scope:name_suggestion = flag:Thor + scope:name_suggestion = flag:Balder + scope:name_suggestion = flag:Odin + scope:name_suggestion = flag:Freja + scope:name_suggestion = flag:Idun + scope:name_suggestion = flag:Frigg + scope:name_suggestion = flag:Peter + scope:name_suggestion = flag:Paul + scope:name_suggestion = flag:John + scope:name_suggestion = flag:Maria + scope:name_suggestion = flag:Babby + scope:name_suggestion = flag:Oats + scope:name_suggestion = flag:Mittens + scope:name_suggestion = flag:Glitterhoof + scope:name_suggestion = flag:Lord + scope:name_suggestion = flag:Lady + scope:name_suggestion = flag:Snowflake + scope:name_suggestion = flag:Bambosh + scope:name_suggestion = flag:Fustian + scope:name_suggestion = flag:Nugament + scope:name_suggestion = flag:Pigwash + scope:name_suggestion = flag:Poppycock + scope:name_suggestion = flag:Tootle + scope:name_suggestion = flag:Scripty + scope:name_suggestion = flag:Gandolf + scope:name_suggestion = flag:Anna + scope:name_suggestion = flag:Linda + scope:name_suggestion = flag:Rikard + scope:name_suggestion = flag:Henrik + scope:name_suggestion = flag:Joakim + scope:name_suggestion = flag:Alex + scope:name_suggestion = flag:Petter + scope:name_suggestion = flag:Linnéa + scope:name_suggestion = flag:Mathilda + scope:name_suggestion = flag:Sean + scope:name_suggestion = flag:Stephen + scope:name_suggestion = flag:Maximilian + scope:name_suggestion = flag:Ewan + scope:name_suggestion = flag:Milla + scope:name_suggestion = flag:Tobias + scope:name_suggestion = flag:Ismael + scope:name_suggestion = flag:Sara + scope:name_suggestion = flag:Igor + scope:name_suggestion = flag:Daniel + scope:name_suggestion = flag:Olle + scope:name_suggestion = flag:Lysann + scope:name_suggestion = flag:Pontus + scope:name_suggestion = flag:Carlos + scope:name_suggestion = flag:Jonas + scope:name_suggestion = flag:Emil + scope:name_suggestion = flag:Matt + scope:name_suggestion = flag:Katya + scope:name_suggestion = flag:Filippa + scope:name_suggestion = flag:Satan + scope:name_suggestion = flag:Beelzebub + scope:name_suggestion = flag:Lilith + scope:name_suggestion = flag:Iblis + scope:name_suggestion = flag:Hel + scope:name_suggestion = flag:Deceiver + scope:name_suggestion = flag:Whisperer + scope:name_suggestion = flag:Reaper + scope:name_suggestion = flag:Tengil + scope:name_suggestion = flag:Katla + } + } + hidden_effect = { + scope:child = { + change_first_name = birth.9002.a.rename + } + } + custom_tooltip = birth.9002.a.tt.2 + } +} + +#AI spouse suggests a name (5% change of replacing regular 1001 mother event or 1003 father event) +birth.9002 = { + type = character_event + title = birth.9002.t + desc = { + desc = birth.9002.start.desc + first_valid = { #Face expression + random_valid = { + triggered_desc = { + trigger = { + OR = { + scope:name_type = flag:lunatic + scope:name_type = flag:creator + scope:name_type = flag:possessed + AND = { + scope:name_type = flag:religious + ai_zeal < 0 + } + AND = { + scope:name_type = flag:real_father + scope:suggester = { intrigue < mediocre_skill_rating } + } + } + } + desc = birth.9002.worrying.desc + } + triggered_desc = { + trigger = { + NOR = { + scope:name_type = flag:lunatic + scope:name_type = flag:creator + scope:name_type = flag:possessed + } + scope:suggester = { + OR = { + has_trait = depressed + ai_compassion >= low_positive_ai_value + } + } + } + desc = birth.9002.tears.desc + } + triggered_desc = { + trigger = { + NOR = { + scope:name_type = flag:lunatic + scope:name_type = flag:creator + scope:name_type = flag:possessed + } + scope:suggester = { + OR = { + has_trait = arrogant + has_trait = ambitious + ai_greed >= low_positive_ai_value + } + } + } + desc = birth.9002.pride.desc + } + triggered_desc = { + trigger = { + OR = { + scope:name_type = flag:creator + scope:name_type = flag:possessed + scope:name_type = flag:religious + } + } + desc = birth.9002.conviction.desc + } + triggered_desc = { + trigger = { + OR = { + scope:name_type = flag:lunatic + scope:name_type = flag:creator + scope:name_type = flag:possessed + scope:suggester = { has_personality_emotional_trigger = yes } + } + } + desc = birth.9002.surprisingly_calm.desc + } + triggered_desc = { + trigger = { + NOR = { + scope:name_type = flag:lunatic + scope:name_type = flag:creator + scope:name_type = flag:possessed + } + scope:suggester = { + has_personality_levelheaded_trigger = yes + } + } + desc = birth.9002.calm.desc + } + triggered_desc = { + trigger = { + scope:name_type = flag:namers_name + reverse_opinion = { + target = scope:suggester + value >= 50 + } + } + desc = birth.9002.devotion.desc + } + } + #Fallback for facial expression + desc = birth.9002.calm.desc + } + desc = newline.desc + random_valid = { #Addressing you + first_valid = { + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:suggester + value >= 80 + } + } + desc = birth.9002.love.desc + } + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:suggester + value >= 30 + } + } + desc = birth.9002.dear_spouse.desc + } + desc = birth.9002.spouse.desc + } + } + first_valid = { #Suggesting name + triggered_desc = { + trigger = { scope:name_type = flag:suggester_relative } + desc = birth.9002.suggester_relative.desc + } + triggered_desc = { + trigger = { scope:name_type = flag:namer_relative } + desc = birth.9002.namer_relative.desc + } + triggered_desc = { + trigger = { scope:name_type = flag:suggesters_name } + desc = birth.9002.suggesters_name.desc + } + triggered_desc = { + trigger = { scope:name_type = flag:namers_name } + desc = birth.9002.namers_name.desc + } + triggered_desc = { + trigger = { + OR = { + scope:name_type = flag:nice_name_namer_realm + scope:name_type = flag:nice_name_suggester_realm + scope:name_type = flag:real_father + } + } + desc = birth.9002.nice_name.desc + } + triggered_desc = { + trigger = { + scope:name_type = flag:religious + OR = { + scope:name_suggestion = flag:Thor + scope:name_suggestion = flag:Balder + scope:name_suggestion = flag:Odin + } + } + desc = birth.9002.religious_god.desc + } + triggered_desc = { + trigger = { + scope:name_type = flag:religious + OR = { + scope:name_suggestion = flag:Freja + scope:name_suggestion = flag:Idun + scope:name_suggestion = flag:Frigg + } + } + desc = birth.9002.religious_godess.desc + } + triggered_desc = { + trigger = { + scope:name_type = flag:religious + OR = { + scope:name_suggestion = flag:Peter + scope:name_suggestion = flag:Paul + scope:name_suggestion = flag:John + } + } + desc = birth.9002.religious_apostle.desc + } + triggered_desc = { + trigger = { + scope:name_type = flag:religious + scope:name_suggestion = flag:Maria + } + desc = birth.9002.religious_holy_virgin.desc + } + triggered_desc = { + trigger = { scope:name_type = flag:religious } + desc = birth.9002.religious_fallback.desc + } + triggered_desc = { + trigger = { scope:name_type = flag:lunatic } + desc = birth.9002.lunatic.desc + } + triggered_desc = { + trigger = { scope:name_type = flag:creator } + desc = birth.9002.creator.desc + } + triggered_desc = { + trigger = { scope:name_type = flag:possessed } + desc = birth.9002.possessed.desc + } + } + } + theme = family + override_background = { reference = relaxing_room } + left_portrait = { + character = scope:suggester + animation = happiness + } + right_portrait = scope:child + lower_right_portrait = scope:namesake_official + + trigger = { + scope:child = { is_alive = yes } + NOT = { + any_parent = { has_variable = borte_first_child_var } + } + # Some cultures do not reuse names - suggest_ancestor_names = no + culture = { + NOR = { + has_name_list = name_list_balhae + has_name_list = name_list_emishi + has_name_list = name_list_han + has_name_list = name_list_korean + has_name_list = name_list_ryukyuan + has_name_list = name_list_vietnamese + has_name_list = name_list_yamato + } + } + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_birth } + hidden_effect = { + save_scope_as = namer + scope:child = { + random_parent = { + limit = { this != scope:namer } + save_scope_as = suggester + } + } + + random_list = { + 4 = { #Suggester's relatives + trigger = { + scope:suggester = { + any_close_or_extended_family_member = { + even_if_dead = yes + birth_9002_suggester_relative_trigger = yes + trigger_if = { + limit = { is_alive = yes } + reverse_opinion = { + target = scope:suggester + value >= 20 + } + } + } + } + } + modifier = { + scope:suggester = { + any_close_or_extended_family_member = { + birth_9002_suggester_relative_trigger = yes + reverse_opinion = { + target = scope:suggester + value >= 40 + } + } + } + factor = 2 + } + modifier = { + scope:suggester = { + ai_compassion >= medium_positive_ai_value + } + factor = 2 + } + modifier = { + scope:suggester = { + ai_honor >= medium_positive_ai_value + } + factor = 2 + } + + scope:suggester = { + random_close_or_extended_family_member = { + even_if_dead = yes + limit = { + birth_9002_suggester_relative_trigger = yes + trigger_if = { + limit = { is_alive = yes } + reverse_opinion = { + target = scope:suggester + value >= 20 + } + } + } + weight = { + modifier = { + reverse_opinion = { + target = scope:suggester + value >= 40 + } + factor = 5 + } + modifier = { + reverse_opinion = { + target = scope:suggester + value >= 60 + } + factor = 3 + } + modifier = { + is_playable_character = yes + factor = 2 + } + modifier = { #Honor the dead + is_alive = no + factor = 2 + } + } + save_scope_as = namesake + save_scope_value_as = { + name = name_type + value = flag:suggester_relative + } + } + } + } + #Namer's relatives + 6 = { + trigger = { + any_close_or_extended_family_member = { + even_if_dead = yes + birth_9002_namer_relative_trigger = yes + trigger_if = { + limit = { is_alive = yes } + reverse_opinion = { + target = scope:namer + value >= 20 + } + reverse_opinion = { + target = scope:suggester + value >= 10 + } + } + } + } + modifier = { + any_close_or_extended_family_member = { + birth_9002_namer_relative_trigger = yes + reverse_opinion = { + target = scope:namer + value >= 40 + } + } + factor = 3 + } + modifier = { + scope:suggester = { + ai_compassion >= medium_positive_ai_value + } + factor = 2 + } + modifier = { + reverse_opinion = { + target = scope:suggester + value < 10 + } + factor = 0.2 + } + scope:suggester = { + random_close_or_extended_family_member = { + even_if_dead = yes + limit = { + birth_9002_namer_relative_trigger = yes + trigger_if = { + limit = { is_alive = yes } + reverse_opinion = { + target = scope:namer + value >= 20 + } + reverse_opinion = { + target = scope:suggester + value >= 10 + } + } + } + weight = { + modifier = { + reverse_opinion = { + target = scope:namer + value >= 40 + } + factor = 5 + } + modifier = { + reverse_opinion = { + target = scope:namer + value >= 60 + } + factor = 3 + } + modifier = { + is_playable_character = yes + factor = 2 + } + modifier = { #Honor the dead + is_alive = no + factor = 2 + } + } + save_scope_as = namesake + save_scope_value_as = { + name = name_type + value = flag:namer_relative + } + } + } + } + 1 = { #Suggester's name + trigger = { + scope:suggester = { + birth_9003_same_gender_as_baby_trigger = yes + NOT = { has_trait = humble } + } + } + modifier = { + scope:suggester = { has_trait = arrogant } + factor = 5 + } + scope:suggester = { save_scope_as = namesake } + save_scope_value_as = { + name = name_type + value = flag:suggesters_name + } + } + 1 = { #Namer's name + trigger = { + birth_9003_same_gender_as_baby_trigger = yes + reverse_opinion = { + target = scope:suggester + value >= 20 + } + } + modifier = { + reverse_opinion = { + target = scope:suggester + value >= 40 + } + factor = 5 + } + modifier = { + reverse_opinion = { + target = scope:suggester + value >= 60 + } + factor = 3 + } + modifier = { + has_relation_lover = scope:suggester + factor = 10 + } + scope:namer = { save_scope_as = namesake } + save_scope_value_as = { + name = name_type + value = flag:namers_name + } + } + 1 = { #A nice name from your realm + trigger = { + any_vassal_or_below = { + birth_9003_same_gender_as_baby_trigger = yes + this != scope:suggester + } + } + random_vassal_or_below = { + limit = { + birth_9003_same_gender_as_baby_trigger = yes + this != scope:suggester + } + save_scope_as = namesake + save_scope_value_as = { + name = name_type + value = flag:nice_name_namer_realm + } + } + } + 1 = { #A nice name from suggester's realm + trigger = { + scope:suggester = { + any_parent = { + is_playable_character = yes + any_vassal_or_below = { + birth_9003_same_gender_as_baby_trigger = yes + } + } + } + } + scope:suggester = { + random_parent = { + limit = { + is_playable_character = yes + any_vassal_or_below = { + birth_9003_same_gender_as_baby_trigger = yes + NOR = { + this = scope:namer + this = scope:suggester + } + } + } + random_vassal_or_below = { + limit = { + birth_9003_same_gender_as_baby_trigger = yes + NOR = { + this = scope:namer + this = scope:suggester + } + } + save_scope_as = namesake + save_scope_value_as = { + name = name_type + value = flag:nice_name_suggester_realm + } + } + } + } + } + 4 = { #Real father name + trigger = { + scope:child = { + mother = { this = scope:suggester } + NOT = { real_father = { this = scope:namer } } + } + } + modifier = { + scope:suggester = { + opinion = { + target = scope:child.real_father + value >= 60 + } + } + factor = 3 + } + scope:child.real_father = { + save_scope_as = namesake + save_scope_value_as = { + name = name_type + value = flag:real_father + } + } + } + 1 = { #Religious names + trigger = { + scope:suggester = { ai_zeal > 0 } + scope:child = { + OR = { + faith = { religion_tag = germanic_religion } + faith = { religion_tag = christianity_religion } + } + } + } + modifier = { + scope:suggester = { ai_zeal >= medium_positive_ai_value } + factor = 5 + } + random_list = { + 1 = { + trigger = { + scope:child = { + is_male = yes + faith = { religion_tag = germanic_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Thor } + } + 1 = { + trigger = { + scope:child = { + is_male = yes + faith = { religion_tag = germanic_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Balder } + } + 1 = { + trigger = { + scope:child = { + is_male = yes + faith = { religion_tag = germanic_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Odin } + } + 1 = { + trigger = { + scope:child = { + is_female = yes + faith = { religion_tag = germanic_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Freja } + } + 1 = { + trigger = { + scope:child = { + is_female = yes + faith = { religion_tag = germanic_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Idun } + } + 1 = { + trigger = { + scope:child = { + is_female = yes + faith = { religion_tag = germanic_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Frigg } + } + 1 = { + trigger = { + scope:child = { + is_male = yes + faith = { religion_tag = christianity_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Peter } #Apostle + } + 1 = { + trigger = { + scope:child = { + is_male = yes + faith = { religion_tag = christianity_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Paul } #Apostle + } + 1 = { + trigger = { + scope:child = { + is_male = yes + faith = { religion_tag = christianity_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:John } #Apostle + } + 1 = { + trigger = { + scope:child = { + is_female = yes + faith = { religion_tag = christianity_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Maria } #Holy virgin + } + } + save_scope_value_as = { + name = name_type + value = flag:religious + } + } + 20 = { #Lunatic names + trigger = { scope:suggester = { has_trait = lunatic } } + random_list = { + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Babby } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Oats } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Mittens } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Glitterhoof } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Lord } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Lady } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Snowflake } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Bambosh } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Fustian } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Nugament } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Pigwash } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Poppycock } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Tootle } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Scripty } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Gandolf } } + } + save_scope_value_as = { + name = name_type + value = flag:lunatic + } + } + 5 = { + trigger = { #Our creator + scope:suggester = { has_trait = lunatic } + scope:suggester = { has_trait = possessed } + } + random_list = { + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Anna } #Project lead + } + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Linda } #Project lead + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Rikard } #Project lead + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Henrik } #Game Director + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Joakim } #Designer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Alex } #Designer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Maximilian } #Content designer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Petter } #Content designer + } + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Linnéa } #Content designer + } + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Mathilda } #Content designer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Sean } #Content designer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Stephen } #Content designer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Tobias } #Content designer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Ewan } #Content designer + } + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Milla } #Content designer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Ismael } #Programmer + } + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Sara } #Programmer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Igor } #Programmer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Daniel } #Programmer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Olle } #Programmer + } + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Lysann } #Programmer + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Pontus } #Artist + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Carlos } #Artist + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Jonas } #Artist + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Emil } #QA + } + 1 = { + trigger = { scope:child = { is_male = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Matt } #QA + } + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Katya } #QA + } + 1 = { + trigger = { scope:child = { is_female = yes } } + save_scope_value_as = { name = name_suggestion value = flag:Filippa } #Content designer + } + } + save_scope_value_as = { + name = name_type + value = flag:creator + } + } + 20 = { + trigger = { scope:suggester = { has_trait = possessed } } + random_list = { + 1 = { + trigger = { + scope:child = { + is_male = yes + OR = { + faith = { religion_tag = christianity_religion } + faith = { religion_tag = judaism_religion } + } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Satan } + } + 1 = { + trigger = { + scope:child = { + is_male = yes + OR = { + faith = { religion_tag = christianity_religion } + faith = { religion_tag = judaism_religion } + } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Beelzebub } + } + 1 = { + trigger = { + scope:child = { + is_female = yes + OR = { + faith = { religion_tag = christianity_religion } + faith = { religion_tag = judaism_religion } + } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Lilith } + } + 1 = { + trigger = { + scope:child = { + is_male = yes + faith = { religion_tag = islam_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Iblis } + } + 1 = { + trigger = { + scope:child = { + is_female = yes + faith = { religion_tag = germanic_religion } + } + } + save_scope_value_as = { name = name_suggestion value = flag:Hel } + } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Deceiver } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Whisperer } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Reaper } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Tengil } } + 1 = { save_scope_value_as = { name = name_suggestion value = flag:Katla } } + } + save_scope_value_as = { + name = name_type + value = flag:possessed + } + } + } + + if = { + limit = { + exists = scope:namesake + NOR = { + scope:namesake = scope:namer + scope:namesake = scope:suggester + scope:name_type = flag:nice_name_namer_realm + scope:name_type = flag:nice_name_suggester_realm + scope:name_type = flag:real_father + } + } + scope:namesake = { save_scope_as = namesake_official } + } + + #Fallback (either parents' name) + if = { + limit = { + NOR = { + exists = scope:namesake + exists = scope:name_suggestion + } + } + if = { #Name after father + limit = { scope:child = { is_male = yes } } + scope:child = { father = { save_scope_as = namesake } } + } + else = { #Name after mother + scope:child = { mother = { save_scope_as = namesake } } + } + if = { + limit = { scope:namesake = { this = scope:suggester } } + save_scope_value_as = { + name = name_type + value = flag:suggesters_name + } + } + else = { + save_scope_value_as = { + name = name_type + value = flag:namers_name + } + } + } + + #Name them, and then you can rename them later + birth_9002_name_setting_effect = yes + } + } + + #Yes + option = { + name = { + trigger = { exists = scope:namesake } + text = birth.9002.a1 + } + name = { + trigger = { exists = scope:name_suggestion } + text = birth.9002.a2 + } + + show_as_tooltip = { birth_9002_name_setting_effect = yes } + reverse_add_opinion = { + target = scope:suggester + modifier = grateful_opinion + opinion = 15 + } + if = { + limit = { + exists = scope:namesake_official + scope:namesake_official = { is_alive = yes } + } + reverse_add_opinion = { + target = scope:namesake_official + modifier = grateful_opinion + opinion = 15 + } + hidden_effect = { + scope:suggester = { + reverse_add_opinion = { + target = scope:namesake_official + modifier = grateful_opinion + opinion = 15 + } + } + } + } + } + + #No + option = { + name = { + trigger = { + NOR = { + scope:name_type = flag:lunatic + scope:name_type = flag:creator + scope:name_type = flag:possessed + } + } + text = birth.9002.b1 + } + name = { + trigger = { + OR = { + scope:name_type = flag:lunatic + scope:name_type = flag:creator + scope:name_type = flag:possessed + } + } + text = birth.9002.b2 + } + custom_tooltip = birth.9002.b.tt + + trigger_event = birth.9003 + } + + after = { + bastard_real_father_discovery_on_birth_effect = yes + } +} + +#You said no to their suggestion and pick a name of your own +birth.9003 = { #by Mathilda Bjarnehed + type = character_event + title = birth.9002.t + desc = birth.9003.desc + theme = family + override_background = { reference = relaxing_room } + left_portrait = scope:child + right_portrait = { + character = scope:suggester + animation = happiness + } + + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { scope:child = { save_scope_as = name_character_target } } + } + } + + option = { + name = birth.9003.a + } +} + +birth.9004 = { + type = character_event + title = birth.9004.t + desc = { + first_valid = { + #If we're renaming ourself + triggered_desc = { + trigger = { + root = scope:child + } + desc = birth.9004.desc.me + } + #If we're renaming someone else + triggered_desc = { + desc = birth.9004.desc + } + } + + } + theme = family + override_background = { reference = relaxing_room } + right_portrait = { + character = scope:child + animation = happiness + } + #NAMING WIDGET + widgets = { + widget = { + is_shown = { + allow_naming_on_birth_of_child_trigger = { CHILD = scope:child } + } + gui = "event_window_widget_name_child" + container = "dynamic_birth_name" + controller = name_character + setup_scope = { + scope:child = { save_scope_as = name_character_target } + } + } + } + #Go ahead + option = { + name = birth.9004.a + } + #On second though... + option = { + name = { + text = { + first_valid = { + #If we're renaming ourself + triggered_desc = { + trigger = { root = scope:child } + desc = birth.9004.b + } + #If we're renaming someone else + triggered_desc = { + desc = birth.9004.b.other + } + } + } + } + flavor = { + first_valid = { + #If we're renaming ourself + triggered_desc = { + trigger = { root = scope:child } + desc = birth.9004.b.tt + } + #If we're renaming someone else + triggered_desc = { + desc = birth.9004.b.tt.other + } + } + } + is_cancel_option = yes + } +} diff --git a/N3OW/events/blackmail_events.txt b/N3OW/events/blackmail_events.txt new file mode 100644 index 00000000..17225546 --- /dev/null +++ b/N3OW/events/blackmail_events.txt @@ -0,0 +1,292 @@ +#Events for blackmail + +namespace = blackmail + + +######################## +# Blackmail Handling +# 0001-0999 +######################## + +#Character refuses to be blackmailed +blackmail.0001 = { + type = character_event + title = blackmail.0001.t + desc = blackmail.0001.desc + theme = intrigue + left_portrait = { + character = scope:recipient + animation = dismissal + } + + trigger = { + exists = scope:target + scope:target = { can_be_exposed_by = root } + } + + immediate = { + play_music_cue = mx_cue_murder + } + + after = { remove_variable = currently_blackmailing } + + option = { + name = blackmail.0001.a + scope:target = { + expose_secret = root + } + } + + option = { + name = blackmail.0001.b + scope:target = { + disable_exposure_by = root + } + ai_chance = { + factor = 0 + } + } +} + + + +######################## +# Blackmail-related stuff +# 1000-1999 +######################## + +#Blackmailing someone causes Dread +blackmail.1001 = { + type = character_event + title = blackmail.1001.t + desc = blackmail.1001.desc + theme = intrigue + left_portrait = { + character = scope:blackmail_target + animation = worry + } + + trigger = { + is_landed = yes + any_vassal = { + being_blackmailed_by_root_trigger = yes + } + NOT = { has_character_flag = had_event_blackmail_1001 } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + play_music_cue = mx_cue_murder + add_character_flag = { + flag = had_event_blackmail_1001 + days = 3650 + } + random_vassal = { + limit = { + root = { + OR = { + has_hook_of_type = { + target = prev + type = weak_blackmail_hook + } + has_hook_of_type = { + target = prev + type = strong_blackmail_hook + } + } + } + } + save_scope_as = blackmail_target + } + } + + option = { + name = blackmail.1001.a + add_dread = medium_dread_gain + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { #Assure your vassals no one has anything to fear + name = blackmail.1001.b + add_dread = medium_dread_loss + stress_impact = { + base = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 2 + ai_honor = 1 + } + } + } +} + + +#Being under Blackmail causes Stress +blackmail.1002 = { + type = character_event + title = blackmail.1002.t + desc = blackmail.1002.desc + theme = intrigue + left_portrait = { + character = scope:blackmailer + animation = scheme + } + + trigger = { + NOT = { has_character_flag = had_event_blackmail_1002 } + OR = { + any_vassal = { + OR = { + has_hook_of_type = { + target = root + type = weak_blackmail_hook + } + has_hook_of_type = { + target = root + type = strong_blackmail_hook + } + } + } + AND = { + exists = liege + is_in_civil_war = no + liege = { + OR = { + has_hook_of_type = { + target = root + type = weak_blackmail_hook + } + has_hook_of_type = { + target = root + type = strong_blackmail_hook + } + } + } + } + any_close_or_extended_family_member = { + OR = { + has_hook_of_type = { + target = root + type = weak_blackmail_hook + } + has_hook_of_type = { + target = root + type = strong_blackmail_hook + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + has_trait = trusting + } + } + + immediate = { + play_music_cue = mx_cue_murder + add_character_flag = { + flag = had_event_blackmail_1002 + days = 3650 + } + every_vassal = { + limit = { + OR = { + has_hook_of_type = { + target = root + type = weak_blackmail_hook + } + has_hook_of_type = { + target = root + type = strong_blackmail_hook + } + } + } + add_to_temporary_list = blackmailers + } + liege = { + if = { + limit = { + is_in_civil_war = no + OR = { + has_hook_of_type = { + target = root + type = weak_blackmail_hook + } + has_hook_of_type = { + target = root + type = strong_blackmail_hook + } + } + } + add_to_temporary_list = blackmailers + } + } + every_close_or_extended_family_member = { + limit = { + OR = { + has_hook_of_type = { + target = root + type = weak_blackmail_hook + } + has_hook_of_type = { + target = root + type = strong_blackmail_hook + } + } + } + add_to_temporary_list = blackmailers + } + random_in_list = { + list = blackmailers + save_scope_as = blackmailer + } + } + + option = { + name = blackmail.1002.a + trigger = { NOT = { has_trait = trusting } } + show_as_unavailable = { always = yes } + stress_impact = { + base = medium_stress_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 1000 + } + } + + option = { + name = blackmail.1002.b + trigger = { + has_trait = trusting + } + trait = trusting + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 1000 + } + } +} diff --git a/N3OW/events/board_game_events.txt b/N3OW/events/board_game_events.txt new file mode 100644 index 00000000..fdd010fb --- /dev/null +++ b/N3OW/events/board_game_events.txt @@ -0,0 +1,3589 @@ +namespace = board_games + +################################################## +# # Playing a Board Game +# 0001 - 0010 The Greatest Game - Match +# 0011 - 0030 Processing & Invalidation events +# 0031 - 0030 The Greatest Game - Winner +# 0041 - 0040 The Greatest Game - Loser +################################################## + + + + + + + + + + +################################################## +# PLAYING CHESS + +################################################## +# The Greatest Game +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_effect bg_play_move_type_effect = { + # Set the move type played. + ## Either we're scope:bg_defender... + if = { + limit = { this = scope:bg_defender } + save_scope_value_as = { + name = bg_defender_move + value = flag:$SKILL$ + } + } + ## Or else we must be scope:bg_attacker. + else = { + save_scope_value_as = { + name = bg_attacker_move + value = flag:$SKILL$ + } + } + # Run the duel. + duel = { + skill = $SKILL$ + value = decent_skill_rating + # Crit success. + 10 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + bg_play_move_type_effect_extraneous_advantages_self_modifier = yes + desc = board_games.0001.$LOC_KEY$.tt.crit_success + custom_tooltip = board_games.0001.$LOC_KEY$.tt.crit_success.tt + # Save the result. + set_variable = { + name = bg_move_result + value = flag:crit_success + } + } + # Success. + 40 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + bg_play_move_type_effect_extraneous_advantages_self_modifier = yes + desc = board_games.0001.$LOC_KEY$.tt.success + custom_tooltip = board_games.0001.$LOC_KEY$.tt.success.tt + # Save the result. + set_variable = { + name = bg_move_result + value = flag:success + } + } + # Failure. + 40 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + bg_play_move_type_effect_extraneous_advantages_opponent_modifier = yes + desc = board_games.0001.$LOC_KEY$.tt.failure + custom_tooltip = board_games.0001.$LOC_KEY$.tt.failure.tt + # Save the result. + set_variable = { + name = bg_move_result + value = flag:failure + } + } + # Crit failure. + 10 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + bg_play_move_type_effect_extraneous_advantages_opponent_modifier = yes + desc = board_games.0001.$LOC_KEY$.tt.crit_failure + custom_tooltip = board_games.0001.$LOC_KEY$.tt.crit_failure.tt + # Save the result. + set_variable = { + name = bg_move_result + value = flag:crit_failure + } + } + } +} + +# Main board game processing event. +board_games.0001 = { + type = character_event + window = duel_event + title = board_games.0001.t + desc = { + # Intro section. + first_valid = { + # Is this our first move? + triggered_desc = { + trigger = { + scope:bg_defender.var:bg_current_round = 1 + this = scope:bg_defender + } + desc = board_games.0001.desc.intro.opening.defender + } + triggered_desc = { + trigger = { + scope:bg_defender.var:bg_current_round = 1 + this = scope:bg_attacker + } + desc = board_games.0001.desc.intro.opening.attacker + } + # Otherwise, standard chained intro. + desc = board_games.0001.desc.intro.subsequent + } + # What did our opponent play? + first_valid = { + ## Diplomacy + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:bg_defender + exists = scope:bg_attacker_move + this = scope:bg_defender + scope:bg_attacker_move = flag:diplomacy + } + AND = { + exists = scope:bg_attacker + exists = scope:bg_defender_move + this = scope:bg_attacker + scope:bg_defender_move = flag:diplomacy + } + } + } + desc = { + first_valid = { + # Crit Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_success + } + } + } + desc = board_games.0001.desc.intro.diplomacy.crit_success + } + # Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:success + } + } + } + desc = board_games.0001.desc.intro.diplomacy.success + } + # Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:failure + } + } + } + desc = board_games.0001.desc.intro.diplomacy.failure + } + # Crit Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_failure + } + } + } + desc = board_games.0001.desc.intro.diplomacy.crit_failure + } + } + } + } + ## Martial + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:bg_defender + exists = scope:bg_attacker_move + this = scope:bg_defender + scope:bg_attacker_move = flag:martial + } + AND = { + exists = scope:bg_attacker + exists = scope:bg_defender_move + this = scope:bg_attacker + scope:bg_defender_move = flag:martial + } + } + } + desc = { + first_valid = { + # Crit Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_success + } + } + } + desc = board_games.0001.desc.intro.martial.crit_success + } + # Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:success + } + } + } + desc = board_games.0001.desc.intro.martial.success + } + # Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:failure + } + } + } + desc = board_games.0001.desc.intro.martial.failure + } + # Crit Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_failure + } + } + } + desc = board_games.0001.desc.intro.martial.crit_failure + } + } + } + } + ## Stewardship + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:bg_defender + exists = scope:bg_attacker_move + this = scope:bg_defender + scope:bg_attacker_move = flag:stewardship + } + AND = { + exists = scope:bg_attacker + exists = scope:bg_defender_move + this = scope:bg_attacker + scope:bg_defender_move = flag:stewardship + } + } + } + desc = { + first_valid = { + # Crit Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_success + } + } + } + desc = board_games.0001.desc.intro.stewardship.crit_success + } + # Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:success + } + } + } + desc = board_games.0001.desc.intro.stewardship.success + } + # Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:failure + } + } + } + desc = board_games.0001.desc.intro.stewardship.failure + } + # Crit Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_failure + } + } + } + desc = board_games.0001.desc.intro.stewardship.crit_failure + } + } + } + } + ## Intrigue + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:bg_defender + exists = scope:bg_attacker_move + this = scope:bg_defender + scope:bg_attacker_move = flag:intrigue + } + AND = { + exists = scope:bg_attacker + exists = scope:bg_defender_move + this = scope:bg_attacker + scope:bg_defender_move = flag:intrigue + } + } + } + desc = { + first_valid = { + # Crit Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_success + } + } + } + desc = board_games.0001.desc.intro.intrigue.crit_success + } + # Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:success + } + } + } + desc = board_games.0001.desc.intro.intrigue.success + } + # Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:failure + } + } + } + desc = board_games.0001.desc.intro.intrigue.failure + } + # Crit Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_failure + } + } + } + desc = board_games.0001.desc.intro.intrigue.crit_failure + } + } + } + } + ## Learning + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:bg_defender + exists = scope:bg_attacker_move + this = scope:bg_defender + scope:bg_attacker_move = flag:learning + } + AND = { + exists = scope:bg_attacker + exists = scope:bg_defender_move + this = scope:bg_attacker + scope:bg_defender_move = flag:learning + } + } + } + desc = { + first_valid = { + # Crit Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_success + } + } + } + desc = board_games.0001.desc.intro.learning.crit_success + } + # Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:success + } + } + } + desc = board_games.0001.desc.intro.learning.success + } + # Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:failure + } + } + } + desc = board_games.0001.desc.intro.learning.failure + } + # Crit Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_failure + } + } + } + desc = board_games.0001.desc.intro.learning.crit_failure + } + } + } + } + ## Prowess + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:bg_defender + exists = scope:bg_attacker_move + this = scope:bg_defender + scope:bg_attacker_move = flag:prowess + } + AND = { + exists = scope:bg_attacker + exists = scope:bg_defender_move + this = scope:bg_attacker + scope:bg_defender_move = flag:prowess + } + } + } + desc = { + first_valid = { + # Crit Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_success + } + } + } + desc = board_games.0001.desc.intro.prowess.crit_success + } + # Success + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:success + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:success + } + } + } + desc = board_games.0001.desc.intro.prowess.success + } + # Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:failure + } + } + } + desc = board_games.0001.desc.intro.prowess.failure + } + # Crit Failure + triggered_desc = { + trigger = { + OR = { + AND = { + this = scope:bg_defender + scope:bg_attacker.var:bg_move_result = flag:crit_failure + } + AND = { + this = scope:bg_attacker + scope:bg_defender.var:bg_move_result = flag:crit_failure + } + } + } + desc = board_games.0001.desc.intro.prowess.crit_failure + } + } + } + } + } + # Was someone countered? + first_valid = { + # Yes! I countered them. + triggered_desc = { + trigger = { + exists = scope:bg_counterer + this = scope:bg_counterer + } + desc = board_games.0001.desc.i_have_countered + } + # Yes! I have been countered. + triggered_desc = { + trigger = { + exists = scope:bg_counterer + this != scope:bg_counterer + } + desc = board_games.0001.desc.i_am_countered + } + # Nope, just the page breaks please. + desc = board_games.0001.desc.no_counters + } + ## How is the match going? + ### Us relative to each other. + first_valid = { + # I'm winning by miles. + triggered_desc = { + trigger = { var:bg_current_score >= bg_relative_score_heavy_difference_threshold_value } + desc = board_games.0001.desc.relative_victory.winning_heavily + } + # I'm winning. + triggered_desc = { + trigger = { var:bg_current_score >= bg_relative_score_light_difference_threshold_value } + desc = board_games.0001.desc.relative_victory.winning_somewhat + } + # We're essentially equal. + triggered_desc = { + trigger = { + var:bg_current_score >= scope:bg_opponent.var:bg_current_score + } + desc = board_games.0001.desc.relative_victory.drawing + } + # I'm losing. + triggered_desc = { + trigger = { var:bg_current_score <= bg_relative_score_heavy_difference_threshold_value } + desc = board_games.0001.desc.relative_victory.losing_somewhat + } + # I'm losing by miles. + triggered_desc = { + trigger = { var:bg_current_score <= bg_relative_score_light_difference_threshold_value } + desc = board_games.0001.desc.relative_victory.losing_heavily + } + } + ### And either one of us towards actual victory. + first_valid = { + # Either of us could win. + triggered_desc = { + trigger = { + var:bg_current_score >= bg_close_to_winning_threshold_value + scope:bg_opponent.var:bg_current_score >= bg_close_to_winning_threshold_value + } + desc = board_games.0001.desc.actual_victory.both_close + } + # I could win. + triggered_desc = { + trigger = { var:bg_current_score >= bg_close_to_winning_threshold_value } + desc = board_games.0001.desc.actual_victory.i_am_close + } + # They could win. + triggered_desc = { + trigger = { scope:bg_opponent.var:bg_current_score >= bg_close_to_winning_threshold_value } + desc = board_games.0001.desc.actual_victory.they_are_close + + } + # Sudden death is about to kick in. + triggered_desc = { + trigger = { + scope:bg_defender.var:bg_current_round >= bg_round_cap_value + } + desc = board_games.0001.desc.actual_victory.sudden_death + } + # Neither of us are close. + desc = board_games.0001.desc.actual_victory.neither_close + } + ## Fluff segment. + ### Opponent Winning + triggered_desc = { + trigger = { + # Since we're processing a whole mess o'random valids here, and they're *all* fluff, we restrict this to AI only. + is_ai = no + # We let the other player be haughty by making them the tie-breaker. + trigger_if = { + limit = { has_variable = bg_gib_only_losing_locs } + always = yes + } + trigger_else = { + var:bg_current_score <= scope:bg_opponent.var:bg_current_score + } + } + desc = { + random_valid = { + # Categories + ## Attributes + ### Diplomacy + triggered_desc = { + trigger = { scope:bg_opponent.diplomacy <= mediocre_skill_rating } + desc = board_games.0001.desc.opponent_winning.diplomacy.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.diplomacy > mediocre_skill_rating + scope:bg_opponent.diplomacy < high_skill_rating + } + desc = board_games.0001.desc.opponent_winning.diplomacy.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.diplomacy >= high_skill_rating } + desc = board_games.0001.desc.opponent_winning.diplomacy.high + } + ### Martial + #### These generally refer to the act of leading troops, so we put an extra filter on for being able to lead an army. + triggered_desc = { + trigger = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:bg_opponent } + } + desc = { + random_valid = { + triggered_desc = { + trigger = {scope:bg_opponent.martial <= mediocre_skill_rating } + desc = board_games.0001.desc.opponent_winning.martial.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.martial > mediocre_skill_rating + scope:bg_opponent.martial < high_skill_rating + } + desc = board_games.0001.desc.opponent_winning.martial.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.martial >= high_skill_rating } + desc = board_games.0001.desc.opponent_winning.martial.high + } + } + } + } + ### Stewardship + triggered_desc = { + trigger = { scope:bg_opponent.stewardship <= mediocre_skill_rating } + desc = board_games.0001.desc.opponent_winning.stewardship.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.stewardship > mediocre_skill_rating + scope:bg_opponent.stewardship < high_skill_rating + } + desc = board_games.0001.desc.opponent_winning.stewardship.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.stewardship >= high_skill_rating } + desc = board_games.0001.desc.opponent_winning.stewardship.high + } + ### Intrigue + triggered_desc = { + trigger = { scope:bg_opponent.intrigue <= mediocre_skill_rating } + desc = board_games.0001.desc.opponent_winning.intrigue.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.intrigue > mediocre_skill_rating + scope:bg_opponent.intrigue < high_skill_rating + } + desc = board_games.0001.desc.opponent_winning.intrigue.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.intrigue >= high_skill_rating } + desc = board_games.0001.desc.opponent_winning.intrigue.high + } + ### Learning + triggered_desc = { + trigger = { scope:bg_opponent.learning <= mediocre_skill_rating } + desc = board_games.0001.desc.opponent_winning.learning.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.learning > mediocre_skill_rating + scope:bg_opponent.learning < high_skill_rating + } + desc = board_games.0001.desc.opponent_winning.learning.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.learning >= high_skill_rating } + desc = board_games.0001.desc.opponent_winning.learning.high + } + ## Trait Specifics + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = lustful } + } + desc = board_games.0001.desc.opponent_winning.trait.lustful + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = chaste } + } + desc = board_games.0001.desc.opponent_winning.trait.chaste + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = gluttonous } + } + desc = board_games.0001.desc.opponent_winning.trait.gluttonous + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = temperate } + } + desc = board_games.0001.desc.opponent_winning.trait.temperate + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = greedy } + } + desc = board_games.0001.desc.opponent_winning.trait.greedy + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = generous } + } + desc = board_games.0001.desc.opponent_winning.trait.generous + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = lazy } + } + desc = board_games.0001.desc.opponent_winning.trait.lazy + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = diligent } + } + desc = board_games.0001.desc.opponent_winning.trait.diligent + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = wrathful } + } + desc = board_games.0001.desc.opponent_winning.trait.wrathful + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = calm } + } + desc = board_games.0001.desc.opponent_winning.trait.calm + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = patient } + } + desc = board_games.0001.desc.opponent_winning.trait.patient + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = impatient } + } + desc = board_games.0001.desc.opponent_winning.trait.impatient + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = arrogant } + } + desc = board_games.0001.desc.opponent_winning.trait.arrogant + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = humble } + } + desc = board_games.0001.desc.opponent_winning.trait.humble + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = deceitful } + } + desc = board_games.0001.desc.opponent_winning.trait.deceitful + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = honest } + } + desc = board_games.0001.desc.opponent_winning.trait.honest + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = craven } + } + desc = board_games.0001.desc.opponent_winning.trait.craven + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = brave } + } + desc = board_games.0001.desc.opponent_winning.trait.brave + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = shy } + } + desc = board_games.0001.desc.opponent_winning.trait.shy + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = gregarious } + } + desc = board_games.0001.desc.opponent_winning.trait.gregarious + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = ambitious } + } + desc = board_games.0001.desc.opponent_winning.trait.ambitious + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = content } + } + desc = board_games.0001.desc.opponent_winning.trait.content + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = arbitrary } + } + desc = board_games.0001.desc.opponent_winning.trait.arbitrary + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = just } + } + desc = board_games.0001.desc.opponent_winning.trait.just + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = cynical } + } + desc = board_games.0001.desc.opponent_winning.trait.cynical + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = zealous } + } + desc = board_games.0001.desc.opponent_winning.trait.zealous + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = paranoid } + } + desc = board_games.0001.desc.opponent_winning.trait.paranoid + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = trusting } + } + desc = board_games.0001.desc.opponent_winning.trait.trusting + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = compassionate } + } + desc = board_games.0001.desc.opponent_winning.trait.compassionate + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = callous } + } + desc = board_games.0001.desc.opponent_winning.trait.callous + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = sadistic } + } + desc = board_games.0001.desc.opponent_winning.trait.sadistic + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = stubborn } + } + desc = board_games.0001.desc.opponent_winning.trait.stubborn + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = fickle } + } + desc = board_games.0001.desc.opponent_winning.trait.fickle + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = vengeful } + } + desc = board_games.0001.desc.opponent_winning.trait.vengeful + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = forgiving } + } + desc = board_games.0001.desc.opponent_winning.trait.forgiving + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = rowdy } + } + desc = board_games.0001.desc.opponent_winning.trait.rowdy + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = charming } + } + desc = board_games.0001.desc.opponent_winning.trait.charming + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = curious } + } + desc = board_games.0001.desc.opponent_winning.trait.curious + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = pensive } + } + desc = board_games.0001.desc.opponent_winning.trait.pensive + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = bossy } + } + desc = board_games.0001.desc.opponent_winning.trait.bossy + } + ## Prior Matches & Relationships + triggered_desc = { + trigger = { has_relation_friend = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.friend + } + triggered_desc = { + trigger = { has_relation_best_friend = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.best_friend + } + triggered_desc = { + trigger = { has_relation_rival = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.rival + } + triggered_desc = { + trigger = { has_relation_nemesis = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.nemesis + } + triggered_desc = { + trigger = { has_relation_lover = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.lover + } + triggered_desc = { + trigger = { has_relation_soulmate = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.soulmate + } + triggered_desc = { + trigger = { has_relation_bully = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.bully + } + triggered_desc = { + trigger = { has_relation_victim = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.victim + } + triggered_desc = { + trigger = { has_relation_crush = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.crush + } + triggered_desc = { + trigger = { has_relation_guardian = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.guardian + } + triggered_desc = { + trigger = { has_relation_ward = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.relation.ward + } + ## Miscs + ### Hooks + triggered_desc = { + trigger = { has_weak_hook = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.hook_on.weak + } + triggered_desc = { + trigger = { has_strong_hook = scope:bg_opponent } + desc = board_games.0001.desc.opponent_winning.hook_on.strong + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_weak_hook = scope:bg_myself} + } + desc = board_games.0001.desc.opponent_winning.hooked_by.weak + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_strong_hook = scope:bg_myself} + } + desc = board_games.0001.desc.opponent_winning.hooked_by.strong + } + ### Prior Matches + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_default_loss_to + var:bg_recent_default_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.opponent_winning.match_history.recently_won_against.default + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_land_loss_to + var:bg_recent_land_loss_to = scope:bg_myself + # Don't bring it up if you don't control it any more. + var:bg_recent_land_loss_stake.holder = { + OR = { + this = scope:bg_opponent + any_liege_or_above = { this = scope:bg_opponent } + } + } + } + } + desc = board_games.0001.desc.opponent_winning.match_history.recently_won_against.county + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_gambling_loss_to + var:bg_recent_gambling_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.opponent_winning.match_history.recently_won_against.gamble + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_default_loss_to + var:bg_recent_default_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.opponent_winning.match_history.recently_lost_against.default + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_land_loss_to + var:bg_recent_land_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.opponent_winning.match_history.recently_lost_against.county + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_gambling_loss_to + var:bg_recent_gambling_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.opponent_winning.match_history.recently_lost_against.gamble + } + ### Other + #### A move for only the pro-est of board gamers. + triggered_desc = { + trigger = { + scope:bg_opponent = { + has_trait = arrogant + has_trait = reclusive + OR = { + learning <= mediocre_skill_rating + # TIT-34022 + } + } + } + desc = board_games.0001.desc.opponent_winning.other.pro_gamer + } + #### A move for an excellent one liner. + triggered_desc = { + trigger = { + # TIT-34022; remove always = no after implementation. + always = no + scope:bg_opponent = { + has_trait = arrogant + has_trait = sadistic + has_trait = arbitrary + intrigue >= very_high_skill_rating + prowess >= very_high_skill_rating + } + } + desc = board_games.0001.desc.opponent_winning.other.avlf + } + } + } + } + ### Current Player Winning + triggered_desc = { + trigger = { + # Since we're processing a whole mess o'random valids here, and they're *all* fluff, we restrict this to AI only. + is_ai = no + # We let the other player be haughty by making them the tie-breaker. + trigger_if = { + limit = { has_variable = bg_gib_only_winning_locs } + always = yes + } + trigger_else = { + var:bg_current_score > scope:bg_opponent.var:bg_current_score + } + } + desc = { + random_valid = { + # Categories + ## Attributes + ### Diplomacy + triggered_desc = { + trigger = { scope:bg_opponent.diplomacy <= mediocre_skill_rating } + desc = board_games.0001.desc.i_am_winning.diplomacy.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.diplomacy > mediocre_skill_rating + scope:bg_opponent.diplomacy < high_skill_rating + } + desc = board_games.0001.desc.i_am_winning.diplomacy.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.diplomacy >= high_skill_rating } + desc = board_games.0001.desc.i_am_winning.diplomacy.high + } + ### Martial + #### These generally refer to the act of leading troops, so we put an extra filter on for being able to lead an army. + triggered_desc = { + trigger = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:bg_opponent } + } + desc = { + random_valid = { + triggered_desc = { + trigger = {scope:bg_opponent.martial <= mediocre_skill_rating } + desc = board_games.0001.desc.i_am_winning.martial.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.martial > mediocre_skill_rating + scope:bg_opponent.martial < high_skill_rating + } + desc = board_games.0001.desc.i_am_winning.martial.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.martial >= high_skill_rating } + desc = board_games.0001.desc.i_am_winning.martial.high + } + } + } + } + ### Stewardship + triggered_desc = { + trigger = { scope:bg_opponent.stewardship <= mediocre_skill_rating } + desc = board_games.0001.desc.i_am_winning.stewardship.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.stewardship > mediocre_skill_rating + scope:bg_opponent.stewardship < high_skill_rating + } + desc = board_games.0001.desc.i_am_winning.stewardship.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.stewardship >= high_skill_rating } + desc = board_games.0001.desc.i_am_winning.stewardship.high + } + ### Intrigue + triggered_desc = { + trigger = { scope:bg_opponent.intrigue <= mediocre_skill_rating } + desc = board_games.0001.desc.i_am_winning.intrigue.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.intrigue > mediocre_skill_rating + scope:bg_opponent.intrigue < high_skill_rating + } + desc = board_games.0001.desc.i_am_winning.intrigue.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.intrigue >= high_skill_rating } + desc = board_games.0001.desc.i_am_winning.intrigue.high + } + ### Learning + triggered_desc = { + trigger = { scope:bg_opponent.learning <= mediocre_skill_rating } + desc = board_games.0001.desc.i_am_winning.learning.low + } + triggered_desc = { + trigger = { + scope:bg_opponent.learning > mediocre_skill_rating + scope:bg_opponent.learning < high_skill_rating + } + desc = board_games.0001.desc.i_am_winning.learning.medium + } + triggered_desc = { + trigger = { scope:bg_opponent.learning >= high_skill_rating } + desc = board_games.0001.desc.i_am_winning.learning.high + } + ## Trait Specifics + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = lustful } + } + desc = board_games.0001.desc.i_am_winning.trait.lustful + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = chaste } + } + desc = board_games.0001.desc.i_am_winning.trait.chaste + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = gluttonous } + } + desc = board_games.0001.desc.i_am_winning.trait.gluttonous + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = temperate } + } + desc = board_games.0001.desc.i_am_winning.trait.temperate + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = greedy } + } + desc = board_games.0001.desc.i_am_winning.trait.greedy + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = generous } + } + desc = board_games.0001.desc.i_am_winning.trait.generous + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = lazy } + } + desc = board_games.0001.desc.i_am_winning.trait.lazy + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = diligent } + } + desc = board_games.0001.desc.i_am_winning.trait.diligent + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = wrathful } + } + desc = board_games.0001.desc.i_am_winning.trait.wrathful + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = calm } + } + desc = board_games.0001.desc.i_am_winning.trait.calm + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = patient } + } + desc = board_games.0001.desc.i_am_winning.trait.patient + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = impatient } + } + desc = board_games.0001.desc.i_am_winning.trait.impatient + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = arrogant } + } + desc = board_games.0001.desc.i_am_winning.trait.arrogant + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = humble } + } + desc = board_games.0001.desc.i_am_winning.trait.humble + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = deceitful } + } + desc = board_games.0001.desc.i_am_winning.trait.deceitful + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = honest } + } + desc = board_games.0001.desc.i_am_winning.trait.honest + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = craven } + } + desc = board_games.0001.desc.i_am_winning.trait.craven + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = brave } + } + desc = board_games.0001.desc.i_am_winning.trait.brave + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = shy } + } + desc = board_games.0001.desc.i_am_winning.trait.shy + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = gregarious } + } + desc = board_games.0001.desc.i_am_winning.trait.gregarious + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = ambitious } + } + desc = board_games.0001.desc.i_am_winning.trait.ambitious + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = content } + } + desc = board_games.0001.desc.i_am_winning.trait.content + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = arbitrary } + } + desc = board_games.0001.desc.i_am_winning.trait.arbitrary + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = just } + } + desc = board_games.0001.desc.i_am_winning.trait.just + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = cynical } + } + desc = board_games.0001.desc.i_am_winning.trait.cynical + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = zealous } + } + desc = board_games.0001.desc.i_am_winning.trait.zealous + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = paranoid } + } + desc = board_games.0001.desc.i_am_winning.trait.paranoid + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = trusting } + } + desc = board_games.0001.desc.i_am_winning.trait.trusting + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = compassionate } + } + desc = board_games.0001.desc.i_am_winning.trait.compassionate + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = callous } + } + desc = board_games.0001.desc.i_am_winning.trait.callous + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = sadistic } + } + desc = board_games.0001.desc.i_am_winning.trait.sadistic + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = stubborn } + } + desc = board_games.0001.desc.i_am_winning.trait.stubborn + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = fickle } + } + desc = board_games.0001.desc.i_am_winning.trait.fickle + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = vengeful } + } + desc = board_games.0001.desc.i_am_winning.trait.vengeful + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = forgiving } + } + desc = board_games.0001.desc.i_am_winning.trait.forgiving + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = rowdy } + } + desc = board_games.0001.desc.i_am_winning.trait.rowdy + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = charming } + } + desc = board_games.0001.desc.i_am_winning.trait.charming + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = curious } + } + desc = board_games.0001.desc.i_am_winning.trait.curious + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = pensive } + } + desc = board_games.0001.desc.i_am_winning.trait.pensive + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_trait = bossy } + } + desc = board_games.0001.desc.i_am_winning.trait.bossy + } + ## Prior Matches & Relationships + triggered_desc = { + trigger = { has_relation_friend = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.friend + } + triggered_desc = { + trigger = { has_relation_best_friend = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.best_friend + } + triggered_desc = { + trigger = { has_relation_rival = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.rival + } + triggered_desc = { + trigger = { has_relation_nemesis = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.nemesis + } + triggered_desc = { + trigger = { has_relation_lover = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.lover + } + triggered_desc = { + trigger = { has_relation_soulmate = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.soulmate + } + triggered_desc = { + trigger = { has_relation_bully = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.bully + } + triggered_desc = { + trigger = { has_relation_victim = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.victim + } + triggered_desc = { + trigger = { has_relation_crush = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.crush + } + triggered_desc = { + trigger = { has_relation_guardian = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.guardian + } + triggered_desc = { + trigger = { has_relation_ward = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.relation.ward + } + ## Miscs + ### Hooks + triggered_desc = { + trigger = { has_weak_hook = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.hook_on.weak + } + triggered_desc = { + trigger = { has_strong_hook = scope:bg_opponent } + desc = board_games.0001.desc.i_am_winning.hook_on.strong + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_weak_hook = scope:bg_myself} + } + desc = board_games.0001.desc.i_am_winning.hooked_by.weak + } + triggered_desc = { + trigger = { + scope:bg_opponent = { has_strong_hook = scope:bg_myself} + } + desc = board_games.0001.desc.i_am_winning.hooked_by.strong + } + ### Prior Matches + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_default_loss_to + var:bg_recent_default_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.i_am_winning.match_history.recently_won_against.default + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_land_loss_to + var:bg_recent_land_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.i_am_winning.match_history.recently_won_against.county + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_gambling_loss_to + var:bg_recent_gambling_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.i_am_winning.match_history.recently_won_against.gamble + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_default_loss_to + var:bg_recent_default_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.i_am_winning.match_history.recently_lost_against.default + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_land_loss_to + var:bg_recent_land_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.i_am_winning.match_history.recently_lost_against.county + } + triggered_desc = { + trigger = { + scope:bg_opponent = { + exists = var:bg_recent_gambling_loss_to + var:bg_recent_gambling_loss_to = scope:bg_myself + } + } + desc = board_games.0001.desc.i_am_winning.match_history.recently_lost_against.gamble + } + ### Other + #### [tumbleweeds] + } + } + } + } + theme = martial_strategy_focus + left_portrait = { + character = scope:bg_myself + triggered_animation = { # Winning by a large margin + trigger = { + scope:bg_myself = { + NOT = { has_trait = humble } + OR = { + var:bg_current_score >= bg_relative_score_heavy_difference_threshold_value + var:bg_current_score >= bg_close_to_winning_threshold_value + } + } + } + animation = chess_certain_win + } + triggered_animation = { # Winning by any margin + trigger = { + scope:bg_myself = { + NOT = { has_trait = humble } + var:bg_current_score >= bg_relative_score_light_difference_threshold_value + } + } + animation = chess_cocky + } + animation = personality_rational + } + right_portrait = { + character = scope:bg_opponent + triggered_animation = { + trigger = { + scope:bg_opponent = { + NOT = { has_trait = humble } + } + scope:bg_myself.var:bg_current_score < scope:bg_opponent.var:bg_current_score + scope:bg_myself.var:bg_current_score <= bg_relative_score_heavy_difference_threshold_value + } + animation = chess_cocky + } + triggered_animation = { + trigger = { + scope:bg_opponent = { + NOT = { has_trait = humble } + } + scope:bg_myself.var:bg_current_score < scope:bg_opponent.var:bg_current_score + OR = { + scope:bg_myself.var:bg_current_score <= bg_relative_score_light_difference_threshold_value + scope:bg_opponent.var:bg_current_score >= bg_close_to_winning_threshold_value + } + } + animation = chess_certain_win + } + animation = scheme + } + artifact = { + target = scope:bg_chess_board + position = lower_center_portrait + } + override_background = { + trigger = { scope:bg_locale = flag:terrain_scope } + reference = terrain_scope + } + override_background = { + trigger = { scope:bg_locale = flag:wilderness_scope } + reference = wilderness_scope + } + override_background = { + trigger = { scope:bg_locale = flag:battlefield } + reference = battlefield + } + override_background = { + trigger = { scope:bg_locale = flag:temple } + reference = temple + } + override_background = { + trigger = { scope:bg_locale = flag:council_chamber } + reference = council_chamber + } + override_background = { + trigger = { scope:bg_locale = flag:courtyard } + reference = courtyard + } + override_background = { + trigger = { scope:bg_locale = flag:dungeon } + reference = dungeon + } + override_background = { + trigger = { scope:bg_locale = flag:docks } + reference = docks + } + override_background = { + trigger = { scope:bg_locale = flag:feast } + reference = feast + } + override_background = { + trigger = { scope:bg_locale = flag:gallows } + reference = gallows + } + override_background = { + trigger = { scope:bg_locale = flag:garden } + reference = garden + } + override_background = { + trigger = { scope:bg_locale = flag:market } + reference = market + } + override_background = { + trigger = { scope:bg_locale = flag:sitting_room } + reference = sitting_room + } + override_background = { + trigger = { scope:bg_locale = flag:bedchamber } + reference = bedchamber + } + override_background = { + trigger = { scope:bg_locale = flag:study } + reference = study + } + override_background = { + trigger = { scope:bg_locale = flag:physicians_study } + reference = physicians_study + } + override_background = { + trigger = { scope:bg_locale = flag:tavern } + reference = tavern + } + override_background = { + trigger = { scope:bg_locale = flag:throne_room } + reference = throne_room + } + override_background = { + trigger = { scope:bg_locale = flag:army_camp } + reference = army_camp + } + + trigger = { + scope:bg_defender = { can_start_board_game_eligibility_checks_trigger = yes } + scope:bg_attacker = { can_start_board_game_eligibility_checks_trigger = yes } + # Invalidate if there's a war for the wagered county or they leave your realm for any reason. + trigger_if = { + limit = { + exists = scope:bg_stake_land_recipient + exists = scope:bg_stake_land_actor + } + OR = { + scope:bg_stake_land_recipient.holder = scope:recipient + scope:bg_stake_land_actor.holder = scope:actor + scope:recipient ={ + is_at_war = yes + any_character_war = { + casus_belli = { + any_target_title = { this = scope:bg_stake_land_recipient } + } + } + } + scope:actor = { + is_at_war = yes + any_character_war = { + casus_belli = { + any_target_title = { this = scope:bg_stake_land_actor } + } + } + } + } + } + } + on_trigger_fail = { bg_fire_clean_up_and_invalidate_effect = yes } + + immediate = { + # Sort scopes for portraits & loc. + save_scope_as = bg_myself + if = { + limit = { this = scope:bg_defender } + scope:bg_attacker = { save_scope_as = bg_opponent } + } + else = { + scope:bg_defender = { save_scope_as = bg_opponent } + } + # TIT-34135 + } + + # Diplomacy: fall back on social acumen. + option = { + name = { + text = { + random_valid = { + desc = board_games.0001.a.random.a + desc = board_games.0001.a.random.b + desc = board_games.0001.a.random.c + desc = board_games.0001.a.random.d + } + } + } + skill = diplomacy + trigger = { + OR = { + scope:bg_skill_a = flag:diplomacy + scope:bg_skill_b = flag:diplomacy + scope:bg_skill_c = flag:diplomacy + } + } + + # Notify the player of the counter type. + custom_tooltip = board_games.0001.a.tt + # Duel-'em-up. + bg_play_move_type_effect = { + SKILL = diplomacy + LOC_KEY = a + } + + # No stress impact for picking moves, but we apply stress impact in the post-game. + ai_chance = { + base = 0 + + bg_ai_weight_choices_by_skill_modifier = { + SKILL = diplomacy + CHARACTER = this + } + + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } + + # Martial: play strategically. + option = { + name = { + text = { + random_valid = { + desc = board_games.0001.b.random.a + desc = board_games.0001.b.random.b + desc = board_games.0001.b.random.c + desc = board_games.0001.b.random.d + } + } + } + skill = martial + trigger = { + OR = { + scope:bg_skill_a = flag:martial + scope:bg_skill_b = flag:martial + scope:bg_skill_c = flag:martial + } + } + + # Notify the player of the counter type. + custom_tooltip = board_games.0001.b.tt + # Duel-'em-up. + bg_play_move_type_effect = { + SKILL = martial + LOC_KEY = b + } + + # No stress impact for picking moves, but we apply stress impact in the post-game. + ai_chance = { + base = 0 + + bg_ai_weight_choices_by_skill_modifier = { + SKILL = martial + CHARACTER = this + } + + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + # Stewardship: play efficiently + option = { + name = { + text = { + random_valid = { + desc = board_games.0001.c.random.a + desc = board_games.0001.c.random.b + desc = board_games.0001.c.random.c + desc = board_games.0001.c.random.d + } + } + } + skill = stewardship + trigger = { + OR = { + scope:bg_skill_a = flag:stewardship + scope:bg_skill_b = flag:stewardship + scope:bg_skill_c = flag:stewardship + } + } + + # Notify the player of the counter type. + custom_tooltip = board_games.0001.c.tt + # Duel-'em-up. + bg_play_move_type_effect = { + SKILL = stewardship + LOC_KEY = c + } + + # No stress impact for picking moves, but we apply stress impact in the post-game. + ai_chance = { + base = 100 + + bg_ai_weight_choices_by_skill_modifier = { + SKILL = stewardship + CHARACTER = this + } + + ai_value_modifier = { + ai_rationality = 1 + # Greed isn't super fitting, tbh, but it's associated with higher stewardship so it makes it easier to judge someone based on their skills. + ai_greed = 1 + } + } + } + + # Intrigue: play with cunning. + option = { + name = { + text = { + random_valid = { + desc = board_games.0001.d.random.a + desc = board_games.0001.d.random.b + desc = board_games.0001.d.random.c + desc = board_games.0001.d.random.d + } + } + } + skill = intrigue + trigger = { + OR = { + scope:bg_skill_a = flag:intrigue + scope:bg_skill_b = flag:intrigue + scope:bg_skill_c = flag:intrigue + } + } + + # Notify the player of the counter type. + custom_tooltip = board_games.0001.d.tt + # Duel-'em-up. + bg_play_move_type_effect = { + SKILL = intrigue + LOC_KEY = d + } + + # No stress impact for picking moves, but we apply stress impact in the post-game. + ai_chance = { + base = 100 + + bg_ai_weight_choices_by_skill_modifier = { + SKILL = intrigue + CHARACTER = this + } + + ai_value_modifier = { + ai_vengefulness = 1 + ai_honor = -1 + } + } + } + + # Learning: play by the (well thought-out) book. + option = { + name = { + text = { + random_valid = { + desc = board_games.0001.e.random.a + desc = board_games.0001.e.random.b + desc = board_games.0001.e.random.c + desc = board_games.0001.e.random.d + } + } + } + skill = learning + trigger = { + OR = { + scope:bg_skill_a = flag:learning + scope:bg_skill_b = flag:learning + scope:bg_skill_c = flag:learning + } + } + + # Notify the player of the counter type. + custom_tooltip = board_games.0001.e.tt + # Duel-'em-up. + bg_play_move_type_effect = { + SKILL = learning + LOC_KEY = e + } + + # No stress impact for picking moves, but we apply stress impact in the post-game. + ai_chance = { + base = 100 + + bg_ai_weight_choices_by_skill_modifier = { + SKILL = learning + CHARACTER = this + } + + ai_value_modifier = { + ai_boldness = -1 + # Sociability isn't anathema to good learning, but it does suggest a more bookish person. + ai_sociability = -1 + } + } + } + + # Prowess: settle arguments over rules with fisticuffs mid-game. + option = { + name = { + text = { + random_valid = { + desc = board_games.0001.f.random.a + desc = board_games.0001.f.random.b + desc = board_games.0001.f.random.c + desc = board_games.0001.f.random.d + } + } + } + skill = prowess + trigger = { + OR = { + scope:bg_skill_a = flag:prowess + scope:bg_skill_b = flag:prowess + scope:bg_skill_c = flag:prowess + } + } + + # Notify the player of the counter type. + custom_tooltip = board_games.0001.f.tt + # Duel-'em-up. + bg_play_move_type_effect = { + SKILL = prowess + LOC_KEY = e + } + + # No stress impact for picking moves, but we apply stress impact in the post-game. + ai_chance = { + base = 100 + + bg_ai_weight_choices_by_skill_modifier = { + SKILL = prowess + CHARACTER = this + } + + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 1 + } + } + } + + after = { + #If we're scope:bg_defender, send scope:bg_attacker their instance of the event. + if = { + limit = { this = scope:bg_defender } + scope:bg_attacker = { trigger_event = board_games.0001 } + } + #Otherwise we're scope:bg_attacker, so end the round. + else = { trigger_event = board_games.0011 } + } +} + +################################################## +# Round End Events +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +scripted_effect bg_calc_current_scores_effect = { + $CURRENT_PLAYER$ = { + set_variable = { + name = bg_current_score + value = { + value = $CURRENT_PLAYER$.var:bg_current_score + # Add results based on move score. + ## First, work out if we've been countered. + if = { + limit = { + exists = scope:bg_counterer + scope:bg_counterer = $OTHER_PLAYER$ + } + # Lots'n'lots for crit successes. + if = { + limit = { $CURRENT_PLAYER$.var:bg_move_result = flag:crit_success } + add = { + value = bg_crit_success_add_value + multiply = bg_counter_mult_value + round = yes + } + } + # Lots for successes. + if = { + limit = { $CURRENT_PLAYER$.var:bg_move_result = flag:success } + add = { + value = bg_success_add_value + multiply = bg_counter_mult_value + round = yes + } + } + # Less for fails. + if = { + limit = { $CURRENT_PLAYER$.var:bg_move_result = flag:failure } + add = { + value = bg_failure_add_value + multiply = bg_counter_mult_value + round = yes + } + } + # Not-lots for crit fails. + if = { + limit = { $CURRENT_PLAYER$.var:bg_move_result = flag:crit_failure } + add = { + value = bg_crit_failure_add_value + multiply = bg_counter_mult_value + round = yes + } + } + } + ## Otherwise, we can use the normal values. + if = { + limit = { + exists = scope:bg_counterer + scope:bg_counterer = $CURRENT_PLAYER$ + } + # Lots'n'lots for crit successes. + if = { + limit = { $CURRENT_PLAYER$.var:bg_move_result = flag:crit_success } + add = bg_crit_success_add_value + } + # Lots for successes. + if = { + limit = { $CURRENT_PLAYER$.var:bg_move_result = flag:success } + add = bg_success_add_value + } + # Less for fails. + if = { + limit = { $CURRENT_PLAYER$.var:bg_move_result = flag:failure } + add = bg_failure_add_value + } + # for crit fails. + if = { + limit = { $CURRENT_PLAYER$.var:bg_move_result = flag:crit_failure } + add = bg_crit_failure_add_value + } + } + } + } + } +} + +scripted_effect bg_finalise_match_end_effect = { + # Track variables. + ## Is either character a player? If so, bookmark them on their opponent. + if = { + limit = { + OR = { + scope:bg_victor = { is_ai = no } + scope:bg_loser = { is_ai = no } + } + } + # Achievement tracking. + if = { + limit = { scope:chess_land ?= yes } + add_achievement_global_variable_effect = { + VARIABLE = fp2_high_stakes_chess_achievement_unlocked + VALUE = yes + } + } + # Process stakes from the interaction. + scope:bg_loser = { + # Mark land stakes especially. + if = { + limit = { scope:chess_land ?= yes } + set_variable = { + name = bg_recent_land_loss_to + value = scope:bg_victor + years = 10 + } + if = { + limit = { scope:bg_loser = scope:recipient } + set_variable = { + name = bg_recent_land_loss_stake + value = scope:bg_stake_land_recipient + years = 10 + } + } + if = { + limit = { scope:bg_loser = scope:actor } + set_variable = { + name = bg_recent_land_loss_stake + value = scope:bg_stake_land_actor + years = 10 + } + } + } + # But also regular gambling. + else_if = { + limit = { + OR = { + scope:chess_gold ?= yes + scope:chess_prestige ?= yes + } + } + set_variable = { + name = bg_recent_gambling_loss_to + value = scope:bg_victor + years = 10 + } + } + # And otherwise we use the default. + else = { + set_variable = { + name = bg_recent_default_loss_to + value = scope:bg_victor + years = 10 + } + } + } + } + ## Is either character a player _or_ a game-master? If so, increment their tallies. + scope:bg_victor = { + if = { + limit = { + OR = { + is_ai = no + # TIT-34022 + } + } + # If they don't have a score tally already, create one. + if = { + limit = { + NOT = { has_variable = bg_win_tally } + } + set_variable = { + name = bg_win_tally + value = 0 + } + } + # Now we make our changes. + change_variable = { + name = bg_win_tally + add = 1 + } + } + } + scope:bg_loser = { + if = { + limit = { + OR = { + is_ai = no + # TIT-34022 + } + } + # If they don't have a score tally already, create one. + if = { + limit = { + NOT = { has_variable = bg_loss_tally } + } + set_variable = { + name = bg_loss_tally + value = 0 + } + } + # Now we make our changes. + change_variable = { + name = bg_loss_tally + add = 1 + } + } + } + # Send out results events. + scope:bg_victor = { trigger_event = board_games.0031 } + scope:bg_loser = { trigger_event = board_games.0041 } + # Clean up effects. + remove_board_game_info_effect = yes + ## Including removing the in-progress match flag for invalidation if this was via interaction. + if = { + limit = { + exists = scope:actor + scope:actor = { has_character_flag = taken_challenge_to_chess_interaction } + } + scope:actor = { remove_character_flag = taken_challenge_to_chess_interaction } + } + # Finally, send out the post-match event for scope:sg_initiator. + scope:bg_initiator = { + trigger_event = { saved_event_id = scope:follow_up_event } + } +} + +# Both players have moved, work out results. +board_games.0011 = { + hidden = yes + + immediate = { + # Work out counterers. + ## First, clear the prior counterer (if any). + clear_saved_scope = bg_counterer + ## Scope:bg_defender. + ### Scope:bg_skill_a > scope:bg_skill_b. + if = { + limit = { + scope:bg_defender_move = scope:bg_skill_a + scope:bg_attacker_move = scope:bg_skill_b + } + scope:bg_defender = { save_scope_as = bg_counterer } + } + ### Scope:bg_skill_b > scope:bg_skill_c. + else_if = { + limit = { + scope:bg_defender_move = scope:bg_skill_b + scope:bg_attacker_move = scope:bg_skill_c + } + scope:bg_defender = { save_scope_as = bg_counterer } + } + ### Scope:bg_skill_c > scope:bg_skill_a. + else_if = { + limit = { + scope:bg_defender_move = scope:bg_skill_c + scope:bg_attacker_move = scope:bg_skill_a + } + scope:bg_defender = { save_scope_as = bg_counterer } + } + ## Scope:bg_attacker. + ### Scope:bg_skill_a > scope:bg_skill_b. + else_if = { + limit = { + scope:bg_attacker_move = scope:bg_skill_a + scope:bg_defender_move = scope:bg_skill_b + } + scope:bg_attacker = { save_scope_as = bg_counterer } + } + ### Scope:bg_skill_b > scope:bg_skill_c. + else_if = { + limit = { + scope:bg_attacker_move = scope:bg_skill_b + scope:bg_defender_move = scope:bg_skill_c + } + scope:bg_attacker = { save_scope_as = bg_counterer } + } + ### Scope:bg_skill_c > scope:bg_skill_a. + else_if = { + limit = { + scope:bg_attacker_move = scope:bg_skill_c + scope:bg_defender_move = scope:bg_skill_a + } + scope:bg_attacker = { save_scope_as = bg_counterer } + } + # Calc new score totals. + bg_calc_current_scores_effect = { + CURRENT_PLAYER = scope:bg_defender + OTHER_PLAYER = scope:bg_attacker + } + bg_calc_current_scores_effect = { + CURRENT_PLAYER = scope:bg_attacker + OTHER_PLAYER = scope:bg_defender + } + # Has anyone managed to win? + ## First we check scope:bg_defender. + if = { + limit = { + scope:bg_defender.var:bg_current_score > bg_winning_threshold_value + scope:bg_defender.var:bg_current_score >= scope:bg_attacker.var:bg_current_score + } + scope:bg_defender = { save_scope_as = bg_victor } + scope:bg_attacker = { save_scope_as = bg_loser } + save_scope_value_as = { + name = bg_victory_type + value = flag:skill + } + bg_finalise_match_end_effect = yes + } + ## Then scope:bg_attacker. + else_if = { + limit = { + scope:bg_attacker.var:bg_current_score > bg_winning_threshold_value + scope:bg_attacker.var:bg_current_score > scope:bg_defender.var:bg_current_score + } + scope:bg_attacker = { save_scope_as = bg_victor } + scope:bg_defender = { save_scope_as = bg_loser } + save_scope_value_as = { + name = bg_victory_type + value = flag:skill + } + bg_finalise_match_end_effect = yes + } + ## Then see if we're above the round limit and should default. + else_if = { + limit = { + scope:bg_defender.var:bg_current_round >= bg_round_cap_value + } + scope:bg_defender = { save_scope_as = bg_victor } + scope:bg_attacker = { save_scope_as = bg_loser } + save_scope_value_as = { + name = bg_victory_type + value = flag:sudden_death + } + bg_finalise_match_end_effect = yes + } + ## Finally, if none of that applies, we just want to spin on to the next event. + else = { + scope:bg_defender = { + change_variable = { + name = bg_current_round + add = 1 + } + trigger_event = board_games.0001 + } + } + } +} + +################################################## +# Default Invalidation Event +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# The game has invalidated, inform affected parties. +board_games.0021 = { + hidden = yes + + immediate = { + # Inform scope:bg_defender that the game has invalidated. + scope:bg_defender = { + send_interface_toast = { + type = event_toast_effect_neutral + title = board_games.0021.trigger_failure.bg_defender + left_icon = scope:bg_attacker + } + } + # If they're not the same person, inform scope:bg_initiator that the game scope:bg_attacker is playing has invalidated. + if = { + limit = { + scope:bg_attacker != scope:bg_initiator + } + scope:bg_initiator = { + send_interface_toast = { + type = event_toast_effect_neutral + title = board_games.0021.trigger_failure.bg_initiator + left_icon = scope:bg_attacker + right_icon = scope:bg_defender + } + } + } + # Now inform scope:bg_attacker. + scope:bg_attacker = { + send_interface_toast = { + type = event_toast_effect_neutral + title = board_games.0021.trigger_failure.bg_attacker + left_icon = scope:bg_defender + } + } + # Reset cooldowns if this was the interaction. + if = { + limit = { + exists = scope:actor + scope:actor = { has_character_flag = taken_challenge_to_chess_interaction } + } + scope:actor = { + remove_interaction_cooldown = challenge_to_2p_chess_interaction + remove_interaction_cooldown_against = { + interaction = challenge_to_2p_chess_interaction + target = scope:recipient + } + } + } + } +} + +################################################## +# Conclusion Events +# by Ewan Cowhig Croft +# 0031 - 0050 +################################################## +scripted_effect bg_make_friends_after_game_effect = { + duel = { + skill = diplomacy + target = $RECIPIENT$ + # They'd love to play you again. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + opinion_modifier = { + who = $RECIPIENT$ + opinion_target = $ACTOR$ + multiplier = 0.5 + } + desc = board_games.0031.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = board_games.0031.a.tt.success + left_icon = $RECIPIENT$ + progress_towards_friend_effect = { + REASON = friend_good_boardgame + CHARACTER = $RECIPIENT$ + OPINION = default_friend_opinion + } + } + } + # They think you suck. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = board_games.0031.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = board_games.0031.a.tt.failure + left_icon = $RECIPIENT$ + reverse_add_opinion = { + modifier = unfriendly_opinion + target = $RECIPIENT$ + opinion = -30 + } + } + } + } +} + +scripted_effect bg_victor_end_result_tooltip_effect = { + #Clarify the results. + if = { + limit = { scope:bg_victory_type = flag:skill } + custom_tooltip = board_games.0031.desc.result.skill + } + else_if = { + limit = { scope:bg_victory_type = flag:sudden_death } + custom_tooltip = board_games.0031.desc.result.sudden_death + } +} + +scripted_effect bg_loser_end_result_tooltip_effect = { + #Clarify the results. + if = { + limit = { scope:bg_victory_type = flag:skill } + custom_tooltip = board_games.0041.desc.result.skill + } + else_if = { + limit = { scope:bg_victory_type = flag:sudden_death } + custom_tooltip = board_games.0041.desc.result.sudden_death + } +} + +# Scope:bg_victor notification event. +board_games.0031 = { + type = character_event + window = duel_event + title = board_games.0031.t + desc = { + triggered_desc = { # This can be expanded upon with further content if desired, see MR/TIT-34157 comments for more details + trigger = { always = yes } + desc = { # To make it easy to modify and expand upon the dynamic description, it is divided into swappable chunks. + desc = { # SECTION ONE: Descriptor of how you feel/awesome you are >Maximum Word Count: 20< + random_valid = { + desc = board_games.0031.desc.intro.02 + desc = board_games.0031.desc.intro.01 + desc = board_games.0031.desc.intro.03 + } + } + desc = { # SECTION TWO: Descriptor of what happened in the match >Maximum Word Count: 20< + random_valid = { + triggered_desc = { + trigger = { + learning > high_skill_rating + learning > scope:bg_opponent.learning + } + desc = board_games.0031.desc.middle.02 + } + triggered_desc = { + trigger = { + OR = { + piety_level >= high_piety_level + has_trait = zealous + has_trait = holy_warrior + } + } + desc = board_games.0031.desc.middle.03 + } + desc = board_games.0031.desc.middle.01 + } + } + desc = { # SECTION THREE: Descriptor of how the opponent feels/reacts >Maximum Word Count: 20< + random_valid = { + triggered_desc = { + trigger = { scope:bg_opponent = { has_trait = wrathful } } + desc = board_games.0031.desc.end.03 + } + desc = board_games.0031.desc.end.01 + desc = board_games.0031.desc.end.02 + } + } + } + } + } + theme = martial_strategy_focus + + left_portrait = { + character = scope:bg_victor + animation = throne_room_cheer_2 + } + right_portrait = { + character = scope:bg_loser + animation = fear + } + + override_background = { + trigger = { scope:bg_locale = flag:terrain_scope } + reference = terrain_scope + } + override_background = { + trigger = { scope:bg_locale = flag:wilderness_scope } + reference = wilderness_scope + } + override_background = { + trigger = { scope:bg_locale = flag:battlefield } + reference = battlefield + } + override_background = { + trigger = { scope:bg_locale = flag:temple } + reference = temple + } + override_background = { + trigger = { scope:bg_locale = flag:council_chamber } + reference = council_chamber + } + override_background = { + trigger = { scope:bg_locale = flag:courtyard } + reference = courtyard + } + override_background = { + trigger = { scope:bg_locale = flag:dungeon } + reference = dungeon + } + override_background = { + trigger = { scope:bg_locale = flag:docks } + reference = docks + } + override_background = { + trigger = { scope:bg_locale = flag:feast } + reference = feast + } + override_background = { + trigger = { scope:bg_locale = flag:gallows } + reference = gallows + } + override_background = { + trigger = { scope:bg_locale = flag:garden } + reference = garden + } + override_background = { + trigger = { scope:bg_locale = flag:market } + reference = market + } + override_background = { + trigger = { scope:bg_locale = flag:sitting_room } + reference = sitting_room + } + override_background = { + trigger = { scope:bg_locale = flag:bedchamber } + reference = bedchamber + } + override_background = { + trigger = { scope:bg_locale = flag:study } + reference = study + } + override_background = { + trigger = { scope:bg_locale = flag:physicians_study } + reference = physicians_study + } + override_background = { + trigger = { scope:bg_locale = flag:tavern } + reference = tavern + } + override_background = { + trigger = { scope:bg_locale = flag:throne_room } + reference = throne_room + } + override_background = { + trigger = { scope:bg_locale = flag:army_camp } + reference = army_camp + } + + immediate = { + #Hand out Hastiluder reward + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = wit + value = { + integer_range = { + min = 1 + max = 5 + } + } + } + } + } + + # Good game! + option = { + name = { + text = { + random_valid = { + desc = board_games.0031.a + desc = board_games.0031.a.a # Untested if this is working + } + } + } + + # Display ending type. + bg_victor_end_result_tooltip_effect = yes + + stress_impact = { + gregarious = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } + + # How does it feel to lose, little GetWomanMan? + option = { + name = { text = board_games.0031.b } + name = { # I would *much* rather nest this, but due to script limitations, you cannot nest names like you can descs. It is very unfortuante. + trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + } + text = board_games.0031.b.a + } + name = { + trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + learning > high_skill_rating + learning > scope:bg_opponent.learning + } + text = board_games.0031.b.b + } + + # Display ending type. + bg_victor_end_result_tooltip_effect = yes + # Progress towards rival. + scope:bg_loser = { + send_interface_toast = { + type = event_toast_effect_neutral + title = board_games.0031.b.progress_towards_rival + left_icon = scope:bg_victor + scope:bg_victor = { + progress_towards_rival_effect = { + REASON = rival_you_won_boardgame_challenge + CHARACTER = scope:bg_loser + OPINION = default_rival_opinion + } + } + } + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + # Removed: Lustful + } + ai_chance = { + # Low base chance so that only really sore losers will pick fights over simple games. + base = 0 + ai_value_modifier = { + ai_vengefulness = 1 + ai_sociability = -1 + } + } + } + + # I'd love to play again some time... + option = { + name = board_games.0031.c + # We don't let you try this against players, mostly for simplicity's sakes. + trigger = { is_ai = no } + + # Display ending type. + bg_victor_end_result_tooltip_effect = yes + # Try to make friends by running a duel. + bg_make_friends_after_game_effect = { + ACTOR = scope:bg_victor + RECIPIENT = scope:bg_loser + } + + stress_impact = { + humble = miniscule_stress_impact_loss + forgiving = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } + + # And perhaps, a lucky board... + after = { + # We only support chess boards at the moment. + if = { + limit = { scope:bg_system = flag:chess } + # Hidden effect because random is a precious special snowflake that insists on telling you the percentage chance even when it has nothing to show >:(. + hidden_effect = { + random = { + chance = { + # Default odds are low. + value = 5 + # But if we won a county, we boost 'em. + if = { + limit = { scope:chess_land ?= yes } + multiply = 5 + } + } + trigger_event = { + id = board_games.0051 + months = 6 + } + } + } + } + } +} + +# Scope:bg_loser notification event. +board_games.0041 = { + type = character_event + window = duel_event + title = board_games.0041.t + desc = { + triggered_desc = { # Same comment applies above. When adding new content, I recommend adding an equal amount for both winning and losing. + trigger = { always = yes } + desc = { # To make it easy to modify and expand upon the dynamic description, it is divided into swappable chunks. + desc = { # SECTION ONE: Descriptor of how the opponent feels/reacts >Maximum Word Count: 20< + random_valid = { + desc = board_games.0041.desc.intro.02 + desc = board_games.0041.desc.intro.01 + desc = board_games.0041.desc.intro.03 + } + } + desc = { # SECTION TWO: Descriptor of what happened in the match >Maximum Word Count: 20< + random_valid = { + triggered_desc = { + trigger = { scope:bg_opponent = { learning < low_skill_rating } } + desc = board_games.0041.desc.middle.02 + } + triggered_desc = { + trigger = { + martial > very_high_skill_rating + martial > scope:bg_opponent.martial + has_trait = wrathful + } + desc = board_games.0041.desc.middle.03 + } + desc = board_games.0041.desc.middle.01 + } + } + desc = { # SECTION THREE: Descriptor of how you feel/terrible you are >Maximum Word Count: 20< + random_valid = { + triggered_desc = { + trigger = { has_trait = wrathful } + desc = board_games.0041.desc.end.03 + } + desc = board_games.0041.desc.end.01 + desc = board_games.0041.desc.end.02 + } + } + } + } + } + theme = martial_strategy_focus + + left_portrait = { + character = scope:bg_loser + animation = fear + } + right_portrait = { + character = scope:bg_victor + animation = throne_room_cheer_2 + } + + override_background = { + trigger = { scope:bg_locale = flag:terrain_scope } + reference = terrain_scope + } + override_background = { + trigger = { scope:bg_locale = flag:wilderness_scope } + reference = wilderness_scope + } + override_background = { + trigger = { scope:bg_locale = flag:battlefield } + reference = battlefield + } + override_background = { + trigger = { scope:bg_locale = flag:temple } + reference = temple + } + override_background = { + trigger = { scope:bg_locale = flag:council_chamber } + reference = council_chamber + } + override_background = { + trigger = { scope:bg_locale = flag:courtyard } + reference = courtyard + } + override_background = { + trigger = { scope:bg_locale = flag:dungeon } + reference = dungeon + } + override_background = { + trigger = { scope:bg_locale = flag:docks } + reference = docks + } + override_background = { + trigger = { scope:bg_locale = flag:feast } + reference = feast + } + override_background = { + trigger = { scope:bg_locale = flag:gallows } + reference = gallows + } + override_background = { + trigger = { scope:bg_locale = flag:garden } + reference = garden + } + override_background = { + trigger = { scope:bg_locale = flag:market } + reference = market + } + override_background = { + trigger = { scope:bg_locale = flag:sitting_room } + reference = sitting_room + } + override_background = { + trigger = { scope:bg_locale = flag:bedchamber } + reference = bedchamber + } + override_background = { + trigger = { scope:bg_locale = flag:study } + reference = study + } + override_background = { + trigger = { scope:bg_locale = flag:physicians_study } + reference = physicians_study + } + override_background = { + trigger = { scope:bg_locale = flag:tavern } + reference = tavern + } + override_background = { + trigger = { scope:bg_locale = flag:throne_room } + reference = throne_room + } + override_background = { + trigger = { scope:bg_locale = flag:army_camp } + reference = army_camp + } + + immediate = { + #Hand out Hastiluder reward + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = wit + value = { + integer_range = { + min = 1 + max = 5 + } + } + } + } + } + + # We'll see who wins next time... + option = { + name = board_games.0041.a + + # Display ending type. + bg_loser_end_result_tooltip_effect = yes + + stress_impact = { + gregarious = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } + + # You've made an enemy here today. + option = { + name = { text = board_games.0041.b } + name = { + trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + OR = { + has_trait = zealous + has_trait = holy_warrior + has_trait = heresiarch + has_trait = devoted + } + } + text = board_games.0041.b.b + } + + # Display ending type. + bg_loser_end_result_tooltip_effect = yes + # Progress towards rival. + scope:bg_victor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = board_games.0031.b.progress_towards_rival + left_icon = scope:bg_loser + scope:bg_loser = { + progress_towards_rival_effect = { + REASON = rival_won_boardgame_challenge + CHARACTER = scope:bg_victor + OPINION = default_rival_opinion + } + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + # Low base chance so that only really sore losers will pick fights over simple games. + base = 0 + ai_value_modifier = { + ai_vengefulness = 1 + ai_sociability = -1 + } + } + } + + # Well, the better GetWomanMan won! + option = { + name = board_games.0041.c + # We don't let you try this against players, mostly for simplicity's sakes. + trigger = { is_ai = no } + + # Display ending type. + bg_loser_end_result_tooltip_effect = yes + # Run the duel. + bg_make_friends_after_game_effect = { + ACTOR = scope:bg_loser + RECIPIENT = scope:bg_victor + } + + stress_impact = { + humble = miniscule_stress_impact_loss + forgiving = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } +} + +################################################## +# Lucky Chess Board +# by Ewan Cowhig Croft +# 0051 - 0060 +################################################## + +# You favour a particular chess board after a lucky win. +board_games.0051 = { + type = character_event + title = board_games.0051.t + desc = board_games.0051.desc + theme = martial_strategy_focus + left_portrait = { + character = scope:bg_victor + animation = admiration + } + right_portrait = { + character = scope:bg_loser + animation = dismissal + } + override_background = { reference = sitting_room } + + #cooldown = { years = 100 } + + trigger = { + # DLC check. + OR = { + has_fp2_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + # Standard checks. + is_available_at_peace_adult = yes + is_landed = yes + # Doesn't have a suitable board game. + NOT = { + any_character_artifact = { has_variable = can_be_used_for_board_games } + } + } + + # Ahhh, sure to bring good luck forever more! + option = { + name = board_games.0051.a + + # You gain a standard 2p chess board! + create_artifact_fp2_2p_chess_board_effect = { OWNER = scope:bg_victor } + + # No stress impact here. + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 1 + ai_rationality = 0.5 + } + } + } + + # Just a few more pieces and I could have a rare set... + option = { + name = board_games.0051.b + trigger = { + location = { + bg_game_type_region_go_trigger = no + } + } + + remove_short_term_gold = medium_gold_value + + # You gain an exotic 4p chess board! + create_artifact_fp2_4p_chess_board_effect = { OWNER = scope:bg_victor } + + # No stress impact here. + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 0.5 + } + } + } + + # I don't need special toys. + option = { + name = board_games.0051.c + + # You're truckin' along just fine without all these newfangled games. + add_stress = minor_stress_loss + + # No stress impact here. + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.25 + ai_sociability = -0.5 + } + } + } +} + + +################################################## +# Debug Events +# by Ewan Cowhig Croft +# 0101 - 0130 +################################################## + +# Error suppression. +board_games.0101 = { + hidden = yes + orphan = yes + + immediate = { + # Hidden effect blocks used for easy collapsing. + # Types of game. + hidden_effect = { + save_scope_value_as = { + name = bg_system + value = flag:chess + } + save_scope_value_as = { + name = bg_system + value = flag:pachisi + } + save_scope_value_as = { + name = bg_system + value = flag:tabula + } + save_scope_value_as = { + name = bg_system + value = flag:hnefatafl + } + save_scope_value_as = { + name = bg_system + value = flag:go + } + save_scope_value_as = { + name = bg_system + value = flag:fidchell + } + } + # Backgrounds. + hidden_effect = { + save_scope_value_as = { + name = bg_locale + value = flag:terrain_scope + } + save_scope_value_as = { + name = bg_locale + value = flag:wilderness_scope + } + save_scope_value_as = { + name = bg_locale + value = flag:battlefield + } + save_scope_value_as = { + name = bg_locale + value = flag:temple + } + save_scope_value_as = { + name = bg_locale + value = flag:council_chamber + } + save_scope_value_as = { + name = bg_locale + value = flag:courtyard + } + save_scope_value_as = { + name = bg_locale + value = flag:dungeon + } + save_scope_value_as = { + name = bg_locale + value = flag:docks + } + save_scope_value_as = { + name = bg_locale + value = flag:feast + } + save_scope_value_as = { + name = bg_locale + value = flag:gallows + } + save_scope_value_as = { + name = bg_locale + value = flag:garden + } + save_scope_value_as = { + name = bg_locale + value = flag:market + } + save_scope_value_as = { + name = bg_locale + value = flag:sitting_room + } + save_scope_value_as = { + name = bg_locale + value = flag:bedchamber + } + save_scope_value_as = { + name = bg_locale + value = flag:study + } + save_scope_value_as = { + name = bg_locale + value = flag:physicians_study + } + save_scope_value_as = { + name = bg_locale + value = flag:tavern + } + save_scope_value_as = { + name = bg_locale + value = flag:throne_room + } + save_scope_value_as = { + name = bg_locale + value = flag:army_camp + } + } + # Random variables. + hidden_effect = { + if = { + limit = { exists = var:bg_recent_land_loss_stake } + } + } + } +} + +# Debug board games. +board_games.0102 = { + type = character_event + title = board_games.0102.t + desc = board_games.0102.desc + theme = martial_strategy_focus + left_portrait = { + character = scope:actor + animation = throne_room_applaud_1 + } + right_portrait = { + character = scope:recipient + animation = fear + } + override_background = { reference = sitting_room } + + # Ordinary game, please. + option = { + name = board_games.0102.a + + # No special anything needed. + } + + # Foe only uses winning locs, please. + option = { + name = board_games.0102.b + + set_variable = bg_gib_only_winning_locs + } + + # Foe only uses losing locs, please. + option = { + name = board_games.0102.c + + set_variable = bg_gib_only_losing_locs + } + + after = { + # Chess. + if = { + limit = { scope:board_game_chess = yes } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = chess + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + # Pachisi. + if = { + limit = { scope:board_game_pachisi = yes } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = pachisi + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + # Tabula. + if = { + limit = { scope:board_game_tabula = yes } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = tabula + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + # Hnefatafl. + if = { + limit = { scope:board_game_hnefatafl = yes } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = hnefatafl + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + # Go. + if = { + limit = { scope:board_game_go = yes } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = go + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + # Fidchell. + if = { + limit = { scope:board_game_fidchell = yes } + configure_start_board_game_effect = { + BG_INITIATOR = scope:actor + BG_ATTACKER = scope:actor + BG_DEFENDER = scope:recipient + SYSTEM = fidchell + LOCALE = random_nice_day + OUTPUT_EVENT = perk_interaction.0121 + INVALIDATION_EVENT = board_games.0021 + } + } + } +} diff --git a/N3OW/events/bookmark_events.txt b/N3OW/events/bookmark_events.txt new file mode 100644 index 00000000..7dd568ef --- /dev/null +++ b/N3OW/events/bookmark_events.txt @@ -0,0 +1,2316 @@ + +namespace = bookmark + + +############################### +# 867 - WRATH OF THE NORTHMEN # +############################### + +###Æthelred isn't as cool as Alfred so we kill him +bookmark.0001 = { #by Mathilda Bjarnehed + type = character_event + hidden = yes + + trigger = { + this = character:33358 #Æthelred + is_ai = yes + player_heir ?= character:7627 #Alfred the Great + } + + immediate = { + if = { + limit = { is_at_war = yes } + + random_list = { + 20 = { #Very wounded + increase_wounds_effect = { REASON = battle } + if = { + limit = { is_alive = yes } + increase_wounds_effect = { REASON = battle } + } + if = { + limit = { is_alive = yes } + increase_wounds_effect = { REASON = battle } + } + if = { + limit = { is_alive = yes } + increase_wounds_effect = { REASON = battle } + } + } + 80 = { #Killed + random_war_enemy = { + if = { + limit = { is_commanding_army = yes } + save_scope_as = killer + } + else = { + random_knight = { + save_scope_as = killer + } + } + } + if = { + limit = { exists = scope:killer } + death = { + death_reason = death_hunting_accident + killer = scope:killer + } + } + } + } + } + else = { + random_list = { + 10 = { #Cancer + contract_disease_effect = { DISEASE = cancer TREATMENT_EVENT = no } + } + 90 = { #Hunting accident + death = { + death_reason = death_hunting_accident + } + } + } + } + } +} + +### Alfred is pretty cool so we give him a nickname +bookmark.0002 = { #by Mathilda Bjarnehed + type = character_event + title = bookmark.0002.t + desc = bookmark.0002.desc + theme = crown + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + is_ai = no + top_liege = this + } + + #Resend + on_trigger_fail = { + if = { + limit = { is_ai = no } + trigger_event = { + id = bookmark.0002 + days = 1800 #~5 years + } + } + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + capital_province = { save_scope_as = capital } + random_realm_province = { + limit = { this != scope:capital } + save_scope_as = province + } + give_nickname = nick_the_great + } + + option = { + name = bookmark.0002.a + } +} + +### The Ragnarsson brothers catch King Aella ## +# The event can trigger when you imprison Aella as one of his sons +# It also works for other norse! + +bookmark.0003 = { #by Mathilda Bjarnehed + type = character_event + hidden = yes + + trigger = { + scope:imprisoner.faith = { trait_is_virtue = vengeful } + scope:imprisoner = { + any_close_family_member = { + even_if_dead = yes + killer ?= root + save_temporary_scope_as = killed_character + } + } + #If the imprisoner don't know you're the killer you might reveal yourself if you're dumb or not sneaky + trigger_if = { + limit = { + any_secret = { + type = secret_murder + secret_target = scope:killed_character + NOT = { any_secret_knower = { this = scope:imprisoner } } + } + } + OR = { + has_trait = intellect_bad + has_trait = dull + intrigue <= medium_skill_rating + } + NOR = { + has_trait = shrewd + has_trait = intellect_good + has_trait = schemer + } + } + trigger_if = { + limit = { this = character:163103 } #Aella + NOT = { + is_target_in_global_variable_list = { + name = triggered_bookmark_events + target = flag:bookmark_867_northmen_aellas_capture + } + } + } + } + + immediate = { + if = { + limit = { this = character:163103 } #Aella + add_to_global_variable_list = { + name = triggered_bookmark_events + target = flag:bookmark_867_northmen_aellas_capture + } + } + save_scope_as = prisoner + + scope:imprisoner = { + random_close_family_member = { + even_if_dead = yes + limit = { + killer ?= root + this = character:163109 #Lodbrok + } + alternative_limit = { + killer ?= root + } + save_scope_as = dead + } + trigger_event = { + id = bookmark.0004 + days = 1 + } + } + } +} + +bookmark.0004 = { #by Mathilda Bjarnehed + type = character_event + title = bookmark.0004.t + desc = { + first_valid = { + triggered_desc = { + trigger = { #You did not know they had killed your family-member + scope:prisoner = { + any_secret = { + type = secret_murder + secret_target = scope:dead + NOT = { any_secret_knower = { this = root } } + } + } + } + desc = bookmark.0004.desc_unknown + } + desc = bookmark.0004.desc + } + } + theme = dungeon + left_portrait = { + character = scope:prisoner + animation = fear + } + lower_right_portrait = scope:dead + + trigger = { + NOT = { + any_in_list = { + list = captured_rivals + this = scope:prisoner + } + } + } + + immediate = { + play_music_cue = "mx_cue_murder" + if = { + limit = { + scope:prisoner = { + any_secret = { + type = secret_murder + secret_target = scope:dead + NOT = { any_secret_knower = { this = root } } + } + } + } + scope:prisoner = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:dead + NOT = { any_secret_knower = { this = root } } + } + reveal_to = root + } + } + } + } + + #Blood eagle + option = { + name = bookmark.0004.a + + add_dread = medium_dread_gain + add_prestige = medium_prestige_gain + scope:prisoner = { + death = { + death_reason = death_execution_blood_eagle + killer = root + } + } + scope:dead = { + every_close_family_member = { + custom = bookmark.0004.a.custom + limit = { this != root } + add_opinion = { + modifier = pleased_opinion + opinion = 30 + target = root + } + } + } + execute_opinion_effect = { VICTIM = scope:prisoner EXECUTIONER = root } + + ai_chance = { + base = 50 + modifier = { + scope:dead = character:163109 #Lodbrok + add = 1000 + } + } + } + + #Sacrifice to Odin + option = { + name = bookmark.0004.b + trigger = { faith = { has_doctrine_parameter = human_sacrifice_active } } + + add_piety = major_piety_gain + scope:prisoner = { + death = { + death_reason = death_execution_blood_eagle + killer = root + } + } + scope:dead = { + every_close_family_member = { + custom = bookmark.0004.a.custom + limit = { this != root } + add_opinion = { + modifier = pleased_opinion + opinion = 30 + target = root + } + } + } + execute_opinion_effect = { VICTIM = scope:prisoner EXECUTIONER = root } + + ai_chance = { + base = 50 + } + } + + #I have other plans... + option = { + name = bookmark.0004.c + + ai_chance = { + base = 0 + modifier = { + ai_vengefulness <= medium_negative_ai_value + add = 100 + } + } + } +} + +############################### +# 867 - THE GREAT ADVENTURERS # +############################### + +### Daurama takes Bawo under her wing. +bookmark.0101 = { + type = character_event + title = bookmark.0101.t + desc = { + desc = bookmark.0101.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:bayajidda = { is_alive = yes } + } + desc = bookmark.0101.desc_living + } + desc = bookmark.0101.desc_dead + } + } + theme = crown + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bayajidda + } + lower_center_portrait = { + character = scope:bewo + } + + trigger = { + is_ai = no + character:251181 = { is_alive = yes } + } + + immediate = { + play_music_cue = "mx_cue_succession" + character:251180 = { save_scope_as = bayajidda } + character:251181 = { save_scope_as = bewo } + character:251252 = { save_scope_as = shawata } + title:k_hausaland = { save_scope_as = hausaland} + } + + # Remember your heritage, my child. + option = { + name = bookmark.0101.a + + #Move Bewo to Daurama's house. + custom_tooltip = bookmark.0101.a.tt + character:251181 = { set_house = root.house } + add_courtier = character:251181 #Move him to your court + + #Bayajidda is, understandably, a little hurt by all this. + character:251180 = { + add_opinion = { + modifier = hurt_opinion + target = root + opinion = -20 + } + } + + ai_chance = { + base = 0 #The AI should never get this event, but if they do, shouldn't opt in. + } + } + + # He is my blood, whatever his name. + option = { + name = bookmark.0101.b + + character:251180 = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 40 + } + } + custom_tooltip = bookmark.0101.b.tt + + ai_chance = { + base = 100 #AI doesn't get this event, but should always pick no. + } + } + + # The Magajiya will continue to rule! + option = { + name = bookmark.0101.c + + add_realm_law_skip_effects = female_preference_law + scope:bewo = { + set_house = root.house + add_trait = disinherited + } + scope:shawata = { + if = { + limit = { + is_alive = yes + OR = { + matrilinear_marriage = yes + is_married = no + } + } + custom_tooltip = bookmark.0101.c.tt + } + else = { + custom_tooltip = bookmark.0101.b.tt + } + } + + + ai_chance = { + base = 0 #The AI should never get this event, but if they do, shouldn't opt in. + } + } +} +###Radhanites were influential in Khazaria, so we spawn a bunch of them +bookmark.0200 = { #by James Beaumont + type = character_event + hidden = yes + + trigger = { + this = title:e_caspian-pontic_steppe.holder #Khagan of Khazaria + is_alive = yes + is_landed = yes + } + + immediate = { + create_character = { + location = title:e_caspian-pontic_steppe.holder.capital_province + trait = lifestyle_mystic + random_traits = yes + faith = faith:kabarism + culture = culture:radhanite + gender_female_chance = { + if = { + limit = { faith:kabarism = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { faith:kabarism = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = new_courtier + } + title:e_caspian-pontic_steppe.holder = { add_courtier = scope:new_courtier } + create_character = { + location = title:e_caspian-pontic_steppe.holder.capital_province + faith = faith:kabarism + culture = culture:radhanite + random_traits_list = { + count = 1 + education_learning_2 = {} + education_learning_3 = {} + education_learning_4 = {} + } + random_traits = yes + gender_female_chance = { + if = { + limit = { faith:kabarism = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { faith:kabarism = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = new_courtier + } + title:e_caspian-pontic_steppe.holder = { add_courtier = scope:new_courtier } + create_character = { + location = title:e_caspian-pontic_steppe.holder.capital_province + age = { 18 35 } + random_traits_list = { + count = 1 + education_martial_2 = {} + education_martial_3 = {} + education_martial_4 = {} + } + random_traits_list = { + count = 1 + brave = {} + just = {} + } + random_traits_list = { #Something nice + honest = {} + gregarious = {} + trusting = {} + compassionate = {} + generous = {} + humble = {} + calm = {} + } + random_traits_list = { + count = 1 + lustful = {} + chaste = {} + wrathful = {} + arrogant = {} + impatient = {} + patient = {} + impatient = {} + ambitious = {} + cynical = {} + zealous = {} + stubborn = {} + } + random_traits = no + martial = { + min_template_decent_skill + max_template_decent_skill + } + prowess = { + min_template_decent_skill + max_template_decent_skill + } + faith = faith:kabarism + culture = culture:radhanite + gender_female_chance = { + add = 25 + } + save_scope_as = new_courtier + } + title:e_caspian-pontic_steppe.holder = { add_courtier = scope:new_courtier } + create_character = { + location = title:e_caspian-pontic_steppe.holder.capital_province + random_traits = yes + faith = faith:kabarism + culture = culture:radhanite + gender_female_chance = { + add = 25 + } + save_scope_as = new_courtier + } + title:e_caspian-pontic_steppe.holder = { add_courtier = scope:new_courtier } + create_character = { + location = title:e_caspian-pontic_steppe.holder.capital_province + random_traits = yes + faith = faith:kabarism + culture = culture:radhanite + gender_female_chance = { + add = 25 + } + save_scope_as = new_courtier + } + title:e_caspian-pontic_steppe.holder = { add_courtier = scope:new_courtier } + } +} + +############## +# 867 - MISC # +############## + +################################################## +# In Memory of Your Good Taste +# by Ewan Cowhig Croft & Stu Taylor +# 0211 - 0220 +################################################## + +# Basileios has just murdered Michael. +## Credit to Stu Taylor of Dead Good Comics for the title line and entire lead-in to this event. +bookmark.0211 = { + type = character_event + title = bookmark.0211.t + desc = bookmark.0211.desc + theme = murder_scheme + left_portrait = { + character = scope:basil + animation = toast_goblet + outfit_tags = { military_outfit no_cloak no_headgear } + } + right_portrait = { + character = scope:michael + animation = map_fear + } + override_background = { reference = ep3_byzantine_feast } + + trigger = { is_alive = yes } + + immediate = { + play_music_cue = "mx_cue_murder" + character:1700 = { save_scope_as = basil } + character:70490 = { + save_scope_as = michael + # Remove his nickname, which we have to leave on him for future bookmarks otherwise. + hidden_effect = { remove_nickname = yes } + } + } + + # Michael the Drunkard. + option = { + name = bookmark.0211.a + flavor = bookmark.0211.a.flavour + + scope:michael = { give_nickname = nick_the_drunkard_michael_iii } + add_legitimacy_effect = { LEGITIMACY = major_legitimacy_gain } + + # No stress, no AI. + } + + # Michael the Pious. + option = { + name = bookmark.0211.b + trigger = { is_ai = no } + flavor = bookmark.0211.b.flavour + + scope:michael = { give_nickname = nick_the_pious_michael_iii } + add_piety = massive_piety_gain + + # No stress, no AI. + } + + # Michael the Young. + option = { + name = bookmark.0211.c + trigger = { is_ai = no } + flavor = bookmark.0211.c.flavour + + scope:michael = { give_nickname = nick_the_young_michael_iii } + + domicile ?= { + switch = { + trigger = has_domicile_building + vineyard_05 = { add_domicile_building = vineyard_06 } + vineyard_04 = { add_domicile_building = vineyard_05 } + vineyard_03 = { add_domicile_building = vineyard_04 } + vineyard_02 = { add_domicile_building = vineyard_03 } + vineyard_01 = { add_domicile_building = vineyard_02 } + fallback = { + if = { + limit = { free_external_domicile_building_slots >= 1 } + add_domicile_building = vineyard_01 + } + else = { + root = { add_prestige = major_prestige_gain } + } + } + } + } + + # No stress, no AI. + } +} + + +######################### +# 1066 - RAGS TO RICHES # +######################### + +### Matilda start-up event +bookmark.1066 = { + type = character_event + title = bookmark.1066.t + desc = bookmark.1066.desc + theme = marriage + override_background = { reference = ep2_wedding_ceremony } + override_effect_2d = { + reference = rain + } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:hunchback + animation = ecstasy + } + lower_right_portrait = { + character = scope:hunchbacks_father + } + lower_left_portrait = { + character = scope:mum + } + + trigger = { + #this = character:7757 + } + + immediate = { + play_music_cue = "mx_cue_succession" + character:20248 = { save_scope_as = hunchback } + character:11030 = { save_scope_as = hunchbacks_father } + mother = { save_scope_as = mum } + hidden_effect = { + add_opinion = { + target = scope:hunchback + modifier = disgusted_opinion + opinion = -75 + } + } + } + + option = { # Murder the husband, with a *hefty* bonus (*Potentially* Historical Option) + name = bookmark.1066.a + flavor = bookmark.1066.a_flavor + + marry = scope:hunchback + + if = { + limit = { + NOT = { + any_scheme = { + type = murder + scheme_target_character = scope:hunchback + } + } + } + start_scheme = { + target_character = scope:hunchback + type = murder + } + } + custom_tooltip = diplomacy_family.2250.b.tt + hidden_effect = { + random_scheme = { + type = murder + limit = { + scheme_target_character = scope:hunchback + } + add_scheme_modifier = { + type = massive_extra_success_chance_modifier + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Physically abandon and permanently avoid him (Historical Option) + name = bookmark.1066.b + flavor = bookmark.1066.b_flavor + + add_character_modifier = { + modifier = abandoned_marriage_modifier + } + + if = { + limit = { + betrothed ?= scope:hunchback + } + break_betrothal = scope:hunchback + } + else_if = { + limit = { + is_spouse_of = scope:hunchback + } + divorce_effect = { + DIVORCER = root + DIVORCEE = scope:hunchback + } + } + + scope:hunchbacks_father = { + if = { + limit = { + NOT = { + scope:hunchback = { + is_courtier_of = scope:hunchbacks_father + } + } + } + add_courtier = scope:hunchback + } + } + + reverse_add_opinion = { + target = scope:hunchback + modifier = abandoned_me_opinion + years = 30 + opinion = -50 + } + + reverse_add_opinion = { + target = scope:hunchbacks_father + modifier = insulted_opinion + years = 30 + opinion = -50 + } + + ai_chance = { + base = 100 + } + } + + option = { # Use your influence to flip the lineality of the marriage + name = bookmark.1066.c + flavor = bookmark.1066.c_flavor + + add_piety = -100 + + marry_matrilineal = scope:hunchback + + reverse_add_opinion = { + target = scope:hunchbacks_father + modifier = annoyed_opinion + opinion = -20 + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + scope:hunchbacks_father = { + is_ai = no + } + } + } + } + + option = { # Just hope he dies... + name = bookmark.1066.d + flavor = lineality_warning + add_internal_flag = dangerous + + marry = scope:hunchback + + ai_chance = { + base = 100 + } + } +} + +# Matilda, a witch or not? +bookmark.1067 = { + type = character_event + title = bookmark.1067.t + desc = bookmark.1067.desc + theme = faith + override_background = { reference = bp1_bonfire } + override_effect_2d = { + reference = smoke + } + left_portrait = { + character = root + animation = personality_cynical + } + + right_portrait = { + character = scope:witch + animation = happy_teacher + } + + trigger = { + NOR = { + is_witch_trigger = yes + has_trait = lifestyle_herbalist + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + if = { + limit = { + any_pool_character = { + province = root.location + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + is_female = yes + age > root.age + age >= 25 + has_education_intrigue_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + is_female = yes + age > root.age + age >= 25 + has_education_intrigue_trigger = yes + } + save_scope_as = witch + } + } + else = { + hidden_effect = { + create_character = { + template = witchy_template + gender_female_chance = 100 + location = root.location + culture = root.location.culture + faith = root.location.faith + dynasty = none + save_scope_as = witch + } + } + } + hidden_effect = { + scope:witch ?= { + if = { + limit = { + NOT = { + has_trait = eccentric + } + } + add_trait = eccentric + } + give_witch_secret_or_trait_effect = yes + } + } + } + + option = { # Embrace the knowledge + name = bookmark.1067.a + flavor = bookmark.1067.a_flavor + add_internal_flag = dangerous + + set_focus = intrigue_skulduggery_focus + + add_intrigue_lifestyle_perk_points = 5 + + give_witch_secret_or_trait_effect = yes + + add_trait = lifestyle_herbalist + + ai_chance = { + base = 25 + } + } + + option = { # No, I'm pious! + name = bookmark.1067.b + flavor = bookmark.1067.b_flavor + + add_learning_lifestyle_xp = major_lifestyle_experience + + add_piety = 500 + + add_learning_skill = 2 + + ai_chance = { + base = 75 + } + } +} + +# Vratislav chooses whether to lay claims, or appease the emperor +bookmark.1068 = { + type = character_event + title = bookmark.1068.t + desc = bookmark.1068.desc + theme = war + override_background = { reference = ep2_travel_bridge } + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:emperor + animation = personality_cynical + } + + trigger = { + exists = title:d_meissen.holder + exists = title:d_lausitz.holder + NOR = { + has_claim_on = title:d_meissen + has_claim_on = title:d_lausitz + title:d_lausitz.holder = root + title:d_meissen.holder = root + } + title:e_hre.holder ?= { + this != root + } + is_vassal_of = title:e_hre.holder + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + title:e_hre.holder = { + save_scope_as = emperor + } + } + + option = { # Lay claim to the lands + name = bookmark.1068.a + flavor = bookmark.1068.a_flavor + add_pressed_claim = title:d_meissen + add_pressed_claim = title:d_lausitz + + ai_chance = { + base = 25 + } + } + + option = { # Appease the Emperor + name = bookmark.1068.b + flavor = bookmark.1068.b_flavor + + add_prestige = 500 + add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_gain } + + scope:emperor = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + + if = { + limit = { + scope:emperor = { is_ai = yes } + can_add_hook = { + target = scope:emperor + type = favor_hook + } + } + add_hook = { + type = favor_hook + target = scope:emperor + } + } + + ai_chance = { + base = 75 + } + } +} + +# The matter of Jaromir +bookmark.1069 = { + type = character_event + title = bookmark.1069.t + desc = bookmark.1069.desc + theme = faith + override_background = { reference = holy_site_generic } + override_effect_2d = { + reference = rain + } + left_portrait = { + character = character:john_monk + animation = prayer + } + right_portrait = { + character = scope:jaromir + animation = dismissal + } + lower_right_portrait = root.faith.religious_head + + trigger = { + character:528 ?= { + is_alive = yes + is_councillor_of = root + } + character:john_monk ?= { + is_alive = yes + } + } + + immediate = { + play_music_cue = "mx_cue_negative" + character:528 = { + save_scope_as = jaromir + } + character:john_monk = { + save_scope_as = john_monk + } + } + + option = { # Replace Jaromir with John + name = bookmark.1069.a + flavor = bookmark.1069.a_flavor + + faith.religious_head = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -30 + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + title:c_opava = { + change_title_holder = { + holder = scope:john_monk + change = scope:change + take_baronies = no + } + } + resolve_title_and_vassal_change = scope:change + scope:john_monk = { + hidden_effect = { + change_government = theocracy_government + } + } + if = { + limit = { character:528 = { is_councillor_of = root } } + fire_councillor = character:528 + } + assign_councillor_type = { + type = councillor_court_chaplain + remove_existing_councillor = yes + target = character:john_monk + } + add_character_flag = { + flag = bishop_assignment + days = 1 + } + ai_chance = { + base = 25 + } + } + + option = { # Make great concessions to Jaromir + name = bookmark.1069.b + flavor = bookmark.1069.b_flavor + + pay_short_term_gold = { + target = scope:jaromir + gold = medium_gold_value + } + + scope:jaromir = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + remove_relation_rival = root + } + + ai_chance = { + base = 75 + } + } + + option = { # Make great concessions to Jaromir + name = bookmark.1069.c + flavor = bookmark.1069.c_flavor + + ai_chance = { + base = 75 + } + } + + after = { + hidden_effect = { + if = { + limit = { + has_character_flag = bishop_assignment + } + assign_councillor_type = { + type = councillor_court_chaplain + remove_existing_councillor = yes + target = character:john_monk + } + } + } + } +} + +# A Norman Sicily +bookmark.1070 = { + type = character_event + title = bookmark.1070.t + desc = bookmark.1070.desc + theme = war + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = hunting_knife_start + } + + lower_right_portrait = scope:pope + lower_left_portrait = scope:emperor + + trigger = { + + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + + title:e_hre.holder = { save_scope_as = emperor } + root.faith.religious_head = { save_scope_as = pope } + + custom_tooltip = claim_sicily + hidden_effect = { + add_pressed_claim = title:d_salerno + add_pressed_claim = title:c_napoli + add_pressed_claim = title:d_capua + add_pressed_claim = title:c_siracusa + add_pressed_claim = title:c_agrigento + add_pressed_claim = title:c_palermo + } + } + + option = { + name = bookmark.1070.a + + add_pressed_claim = title:d_benevento + add_pressed_claim = title:d_spoleto + show_as_tooltip = { + spawn_army = { + levies = 750 + location = root.capital_province + name = norman_highwaymen + } + } + hidden_effect = { + spawn_army = { + levies = 125 + men_at_arms = { + type = bowmen + men = 50 + } + men_at_arms = { + type = light_horsemen + men = 50 + } + men_at_arms = { + type = conrois + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + levies = 125 + men_at_arms = { + type = bowmen + men = 50 + } + men_at_arms = { + type = light_horsemen + men = 50 + } + men_at_arms = { + type = conrois + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + levies = 125 + men_at_arms = { + type = bowmen + men = 50 + } + men_at_arms = { + type = light_horsemen + men = 50 + } + men_at_arms = { + type = conrois + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + } + + scope:emperor = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + scope:pope = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bookmark.1070.b + + add_pressed_claim = title:d_benevento + + show_as_tooltip = { + spawn_army = { + levies = 500 + location = root.capital_province + name = norman_highwaymen + } + } + hidden_effect = { + spawn_army = { + levies = 125 + men_at_arms = { + type = bowmen + men = 50 + } + men_at_arms = { + type = light_horsemen + men = 50 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + levies = 125 + men_at_arms = { + type = bowmen + men = 50 + } + men_at_arms = { + type = light_horsemen + men = 50 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + } + + scope:pope = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bookmark.1070.c + + spawn_army = { + levies = 125 + men_at_arms = { + type = bowmen + men = 50 + } + men_at_arms = { + type = light_horsemen + men = 50 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + ai_chance = { + base = 100 + } + } +} + +# The Pretender Monk +bookmark.1071 = { + type = character_event + title = bookmark.1071.t + desc = bookmark.1071.desc + theme = martial + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:raiktor + animation = beg + } + + trigger = { + gold >= 100 + is_at_war = no + title:e_byzantium.holder ?= { + this != root + } + } + + on_trigger_fail = { + if = { + limit = { + title:e_byzantium.holder ?= { + this != root + } + } + trigger_event = { + id = bookmark.1071 + days = 25 + } + } + } + + immediate = { + title:e_byzantium.holder ?= { save_scope_as = byz_emperor } + create_character = { + template = monk_character_template + name = Raiktor + culture = culture:greek + faith = faith:orthodox + age = 30 + gender_female_chance = 0 + save_scope_as = raiktor + employer = root + intrigue = { min_template_high_skill max_template_high_skill } + learning = { min_template_high_skill max_template_high_skill } + } + hidden_effect = { + scope:raiktor = { + add_unpressed_claim = title:e_byzantium + if = { + limit = { + has_trait = honest + } + remove_trait = honest + } + add_trait = deceitful + add_trait = historical_character + add_character_flag = raiktor + set_variable = { + name = show_historical_gui + value = 1 + } + } + } + } + + option = { + name = bookmark.1071.a + + flavor = hard_raiktor_war + + custom_tooltip = start_raiktor_war + custom_tooltip = gain_war_troops + + hidden_effect = { + start_war = { + cb = raiktor_claim_cb + target = title:e_byzantium.holder + claimant = scope:raiktor + target_title = title:e_byzantium + } + random_character_war = { + limit = { + using_cb = raiktor_claim_cb + } + save_scope_as = war + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + } + + ai_chance = { + base = 10 + modifier = { + factor = 0.1 + title:e_byzantium.holder ?= { is_ai = no } + } + } + } + + option = { + name = bookmark.1071.b + + flavor = easy_raiktor_war + + custom_tooltip = start_raiktor_conquest_war + custom_tooltip = gain_war_troops + + hidden_effect = { + start_war = { + cb = raiktor_conquest_cb + target = title:e_byzantium.holder + claimant = scope:raiktor + target_title = title:c_dyrrachion + target_title = title:c_avlonas + target_title = title:c_buthrotum + } + random_character_war = { + limit = { + using_cb = raiktor_conquest_cb + } + save_scope_as = war + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + + spawn_army = { + war = scope:war + levies = 300 + men_at_arms = { + type = bowmen + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 75 + } + men_at_arms = { + type = armored_horsemen + men = 25 + } + location = root.capital_province + name = norman_highwaymen + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + title:e_byzantium.holder ?= { is_ai = no } + } + } + } + + option = { + name = bookmark.1071.c + + scope:raiktor = { select_and_move_to_pool_effect = yes } + + ai_chance = { + base = 10 + modifier = { + factor = 10 + title:e_byzantium.holder ?= { is_ai = no } + } + } + } +} + +# Conquering Cordoba +bookmark.1072 = { + type = character_event + title = bookmark.1072.t + desc = bookmark.1072.desc + theme = martial + override_background = { reference = terrain_scope } + + left_portrait = { + character = root + animation = spymaster + } + + right_portrait = { + character = title:c_cordoba.holder + animation = steward + } + + trigger = { + exists = title:c_cordoba.holder + NOT = { title:c_cordoba.holder = root } + } + + immediate = { + title:c_cordoba.holder = { save_scope_as = cordoba_holder } + title:c_cordoba.title_province = { save_scope_as = background_terrain_scope } + } + + option = { + name = bookmark.1072.a + trait = schemer + + custom_tooltip = intrigue_challenge + add_character_flag = intrigue_duel_on_attack + + custom_tooltip = start_cordoba_war + hidden_effect = { + if = { + limit = { + title:c_cordoba.holder = { + has_title = title:c_cabra + } + } + start_war = { + cb = county_conquest_cb + target = title:c_cordoba.holder + target_title = title:c_cordoba + target_title = title:c_cabra + } + } + else = { + start_war = { + cb = county_conquest_cb + target = title:c_cordoba.holder + target_title = title:c_cordoba + } + } + } + + ai_chance = { + base = 90 + } + } + + option = { + name = bookmark.1072.b + + spawn_army = { + levies = 100 + men_at_arms = { + type = abudrar + men = 100 + } + men_at_arms = { + type = light_horsemen + men = 50 + } + location = root.capital_province + name = event_troop_default_name + } + + custom_tooltip = start_cordoba_war + hidden_effect = { + if = { + limit = { + title:c_cordoba.holder = { + has_title = title:c_cabra + } + } + start_war = { + cb = county_conquest_cb + target = title:c_cordoba.holder + target_title = title:c_cordoba + target_title = title:c_cabra + } + } + else = { + start_war = { + cb = county_conquest_cb + target = title:c_cordoba.holder + target_title = title:c_cordoba + } + } + } + + ai_chance = { + base = 10 + } + } + + option = { + name = bookmark.1072.c + + ai_chance = { + base = 0 + } + } +} + +# The Seljuk Scion +bookmark.1073 = { + type = character_event + title = bookmark.1073.t + desc = bookmark.1073.desc + theme = martial + override_background = { reference = terrain_scope } + + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:alp_arslan + animation = war_over_win + } + lower_left_portrait = scope:qutalmish + lower_right_portrait = scope:tughril + + immediate = { + character:3040 = { save_scope_as = alp_arslan } + character:3033 = { save_scope_as = qutalmish } + character:3038 = { save_scope_as = tughril } + title:e_persia.title_capital_county.title_province = { save_scope_as = background_terrain_scope } + show_as_tooltip = { + scope:alp_arslan = { + set_relation_rival = { reason = rival_killed_parent target = root } + } + add_realm_law = camp_purpose_mercenaries + } + if = { + limit = { + has_mpo_dlc_trigger = yes + } + spawn_army = { + name = event_troop_default_name + men_at_arms = { + type = horse_archers + stacks = 2 + } + men_at_arms = { + type = steppe_raiders + stacks = 2 + } + men_at_arms = { + type = heavy_horse_archers + stacks = 2 + } + location = root.location + origin = root.location + } + } + else = { + spawn_army = { + name = event_troop_default_name + men_at_arms = { + type = horse_archers + stacks = 2 + } + men_at_arms = { + type = steppe_raiders + stacks = 2 + } + men_at_arms = { + type = heavy_horse_archers + stacks = 2 + } + location = root.location + origin = root.location + } + } + } + + option = { + name = bookmark.1073.a + add_prestige_level = 1 + if = { + limit = { + has_mpo_dlc_trigger = yes + } + spawn_army = { + name = event_troop_default_name + men_at_arms = { + type = horse_archers + stacks = 2 + } + men_at_arms = { + type = steppe_raiders + stacks = 2 + } + men_at_arms = { + type = heavy_horse_archers + stacks = 2 + } + location = root.location + origin = root.location + } + } + else = { + spawn_army = { + name = event_troop_default_name + men_at_arms = { + type = horse_archers + stacks = 2 + } + men_at_arms = { + type = light_horsemen + stacks = 2 + } + men_at_arms = { + type = light_footmen + stacks = 2 + } + location = root.location + origin = root.location + } + } + ai_chance = { + base = 90 + } + } + + option = { + name = bookmark.1073.b + add_unpressed_claim = title:e_persia + add_realm_law = camp_purpose_legitimists + scope:alp_arslan = { + set_relation_nemesis = { reason = rival_killed_parent target = root } + } + ai_chance = { + base = 10 + } + } +} + +###We let the player decide which dynasty Sibylla's son will belong to avoid undesirable potential game overs +bookmark.0300 = { + type = character_event + title = bookmark.0300.t + desc = bookmark.0300.desc + + theme = family + left_portrait = { + character = root + animation = personality_rational + } + lower_center_portrait = { + character = scope:dead_husband + animation = dead + } + right_portrait = { + character = scope:baby_baudouin + } + + trigger = { + is_ai = no + character:223541 = { + is_ai = yes + is_alive = yes + } + } + + immediate = { + character:223541 = { save_scope_as = baby_baudouin } + character:223540 = { save_scope_as = dead_husband } + } + + option = { + name = bookmark.0300.a + + character:223541 = { set_house = root.house } + + ai_chance = { + base = 0 # The AI shouldn't get this event, but should want to maintain the status quo if it did + } + } + + option = { + name = bookmark.0300.b + + ai_chance = { + base = 100 # AI doesn't get this event, but should always pick no. + } + custom_tooltip = bookmark.0300.b.tt + } +} + +bookmark.0400 = { + type = character_event + title = bookmark.0400.t + desc = bookmark.0400.desc + + theme = family + + left_portrait = { + character = root + animation = disapproval + } + lower_left_portrait = { + character = scope:brother + } + lower_right_portrait = { + character = scope:child + } + right_portrait = { + character = scope:emperor + animation = pain + } + + trigger = { + is_ai = no + character:206651 = { # your husband + is_alive = yes + is_ai = yes + is_landed = yes + } + character:206653 = { # your child + is_alive = yes + is_ai = yes + top_liege = root.top_liege + } + character:tangut_liang_2 = { # your brother + is_alive = yes + is_ai = yes + top_liege = root.top_liege + } + } + + immediate = { + character:206651 = { save_scope_as = emperor } + character:206653 = { save_scope_as = child } + character:tangut_liang_2 = { save_scope_as = brother } + scope:emperor.primary_title = { save_scope_as = xia } + } + + option = { + name = bookmark.0400.a + + custom_tooltip = { + text = bookmark.0400.a.tt + + scope:emperor = { + every_held_title = { + limit = { + tier >= tier_county + is_landless_type_title = no + } + add_to_list = titles_to_transfer + } + } + + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = yes + } + + every_in_list = { + list = titles_to_transfer + change_title_holder = { + holder = root + change = scope:change + } + } + + scope:emperor = { + every_vassal = { + limit = { + NOT = { + this = root + } + } + change_liege = { + LIEGE = root + CHANGE = scope:change + } + } + } + + resolve_title_and_vassal_change = scope:change + + scope:emperor = { + death = { + death_reason = death_wounds + } + } + } + + if = { + limit = { + exists = cp:councillor_chancellor + cp:councillor_chancellor != character:tangut_liang_2 + } + fire_councillor = cp:councillor_chancellor + assign_councillor_type = { + type = councillor_chancellor + target = character:tangut_liang_2 + } + } + + every_child = { + limit = { + house != root.house + } + set_house = root.house + } + + ai_chance = { + base = 0 + } + } + + option = { + name = bookmark.0400.b + + custom_tooltip = { + text = bookmark.0400.b.tt + add_character_flag = has_had_diarch_intro_event_flag + + scope:emperor = { + designate_diarch = root + try_start_diarchy = regency + set_diarchy_swing = 100 + if = { + limit = { + exists = cp:councillor_chancellor + cp:councillor_chancellor != character:tangut_liang_2 + } + fire_councillor = cp:councillor_chancellor + scope:brother = { + set_employer = scope:emperor + } + assign_councillor_type = { + type = councillor_chancellor + target = character:tangut_liang_2 + } + } + } + } + change_influence = monumental_influence_gain + add_prestige = monumental_prestige_gain + + ai_chance = { + base = 100 + } + } + option = { + name = bookmark.0400.c + + custom_tooltip = { + text = bookmark.0400.c.tt + add_character_flag = has_had_diarch_intro_event_flag + + scope:emperor = { + death = { + death_reason = death_wounds + } + } + scope:brother = { + set_employer = scope:child + } + scope:child = { + set_diarch = root + set_diarchy_swing = 100 + if = { + limit = { + exists = cp:councillor_chancellor + cp:councillor_chancellor != character:tangut_liang_2 + } + fire_councillor = cp:councillor_chancellor + assign_councillor_type = { + type = councillor_chancellor + target = character:tangut_liang_2 + } + } + } + } + change_influence = monumental_influence_gain + add_prestige = monumental_prestige_gain + + ai_chance = { + base = 0 + } + } + after = { + add_hook = { + type = loyalty_hook + target = scope:brother + } + + scope:brother = { + change_influence = massive_influence_gain + add_prestige = massive_prestige_gain + } + } +} diff --git a/N3OW/events/bp1_dan_events.txt b/N3OW/events/bp1_dan_events.txt new file mode 100644 index 00000000..4fcbf40b --- /dev/null +++ b/N3OW/events/bp1_dan_events.txt @@ -0,0 +1,4362 @@ +namespace = bp1_yearly + +################################## +# Picnic or Church? # +# By Daniel Moore # +################################## +bp1_yearly.7000 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7000.t + desc = bp1_yearly.7000.desc + theme = friend_relation + + override_background = { reference = garden } + left_portrait = { + character = root + animation = laugh + } + + right_portrait = { + character = scope:distraction_friend + animation = toast_goblet + } + + cooldown = { years = 10 } + trigger = { + is_available_at_peace_adult = yes + is_landed = yes + has_bp1_dlc_trigger = yes + + any_courtier_or_guest = { + has_any_good_relationship_with_root_trigger = yes + is_available_ai_adult = yes + } + + faith = { + NOT = { + trait_is_virtue = gluttonous + } + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + has_any_good_relationship_with_root_trigger = yes + is_available_ai_adult = yes + } + save_scope_as = distraction_friend + } + } + + option = { #Faith is the only meal I need + name = bp1_yearly.7000.a + + scope:distraction_friend = { + add_opinion = { + modifier = hurt_opinion + opinion = -15 + target = root + } + } + + + stress_impact = { + zealous = medium_stress_impact_loss + gluttonous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + + add_piety = 125 + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { #Excellent idea + name = bp1_yearly.7000.b + scope:distraction_friend = { + add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = root + } + } + + create_character_memory = { + type = nice_picnic + + participants = { + picnic_pal = scope:distraction_friend + } + } + + add_character_modifier = { + modifier = lovely_picnic_modifier + years = 5 + } + + + progress_towards_friend_effect = { + REASON = friend_breakfast + CHARACTER = scope:distraction_friend + OPINION = 0 + } + + stress_impact = { + zealous = medium_stress_impact_gain + gluttonous = medium_stress_impact_loss + shy = medium_stress_impact_gain + diligent = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +################################## +# Going Fishing! # +# By Daniel Moore # +################################## + +bp1_yearly.7001 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7001.t + desc = bp1_yearly.7001.desc + theme = friend_relation + + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:fishing_friend + animation = ecstasy + } + + cooldown = { years = 10 } + trigger = { + # Standard checks. + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + + OR = { + any_held_county = { + title_province = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + + any_courtier_or_guest = { + has_any_good_relationship_with_root_trigger = yes + has_personality_introverted_trigger = no + is_available_ai_adult = yes + } + } + + + immediate = { + random_courtier_or_guest = { + limit = { + has_any_good_relationship_with_root_trigger = yes + has_personality_introverted_trigger = no + is_available_ai_adult = yes + } + save_scope_as = fishing_friend + } + } + + option = { #Yes + name = bp1_yearly.7001.a + + flavor = bp1_yearly_7001.a.tt + + #hidden_effect = { + random_list = { + 40 = { + desc = bp1_yearly.7001.a.toast.good_time + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7001.a.toast.good_time + left_icon = root + right_icon = scope:fishing_friend + + scope:fishing_friend = { + add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = root + } + } + + progress_towards_friend_effect = { + REASON = friend_fishing_trip + CHARACTER = scope:fishing_friend + OPINION = 0 + } + } + + create_character_memory = { + type = nice_fishing_trip + + participants = { + fishing_pal = scope:fishing_friend + } + } + } + + 40 = { + desc = bp1_yearly.7001.a.toast.caught_fish + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7001.a.toast.caught_fish + left_icon = root + right_icon = scope:fishing_friend + + add_prestige = 75 + + scope:fishing_friend = { + add_opinion = { + modifier = pleased_opinion + opinion = 10 + target = root + } + } + } + + create_character_memory = { + type = nice_fishing_trip + + participants = { + fishing_pal = scope:fishing_friend + } + } + } + + + 15 = { + desc = bp1_yearly.7001.a.toast.bad_time + send_interface_toast = { + type = event_toast_effect_bad + title = bp1_yearly.7001.a.toast.bad_time + left_icon = root + right_icon = scope:fishing_friend + + scope:fishing_friend = { + add_opinion = { + modifier = disappointed_opinion + opinion = -10 + target = root + } + } + } + } + + 5 = { + desc = bp1_yearly.7001.a.toast.white_carp + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7001.a.toast.white_carp + left_icon = root + right_icon = scope:fishing_friend + + add_prestige = 200 + + scope:fishing_friend = { + add_opinion = { + modifier = pleased_opinion + opinion = 10 + target = root + } + } + } + + create_character_memory = { + type = nice_fishing_trip + + participants = { + fishing_pal = scope:fishing_friend + } + } + } + } + #} + + stress_impact = { + base = minor_stress_impact_loss + diligent = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + gregarious = medium_stress_impact_loss + shy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { #No + name = bp1_yearly.7001.b + scope:fishing_friend = { + add_opinion = { + modifier = hurt_opinion + opinion = -15 + target = root + } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + gregarious = major_stress_impact_gain + shy = medium_stress_impact_loss + lazy = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = -1 + } + modifier = { + factor = 0 + has_trait = gregarious + } + } + } +} + +################################## +# Throwing a chamberpot at rival # +# By Daniel Moore # +################################## + +bp1_yearly.7002 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7002.t + desc = bp1_yearly.7002.desc + theme = unfriendly + + override_background = { reference = courtyard } + + right_portrait = { + character = scope:chamberpot_rival + animation = happiness + } + + cooldown = { years = 10 } + trigger = { + # Standard checks. + is_landed_or_landless_administrative = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + + any_courtier_or_guest = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + is_available_ai_adult = yes + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + is_available_ai_adult = yes + } + save_scope_as = chamberpot_rival + } + } + + option = { #Yes + name = bp1_yearly.7002.a + + custom_tooltip = bp1_yearly.7002.a.tt + + duel = { + skill = prowess + value = average_skill_rating + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = bp1_yearly.7002.a.toast.perfect_hit + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7002.a.toast.perfect_hit + right_icon = scope:chamberpot_rival + + scope:chamberpot_rival = { + add_character_modifier = { + modifier = covered_in_feces + years = 10 + } + add_opinion = { + modifier = drenched_in_excrement_opinion + opinion = -25 + target = root + } + } + stress_impact = { + base = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + } + } + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = bp1_yearly.7002.a.toast.miss + send_interface_toast = { + type = event_toast_effect_bad + title = bp1_yearly.7002.a.toast.miss + right_icon = scope:chamberpot_rival + + scope:chamberpot_rival = { + add_opinion = { + modifier = threw_excrement_opinion + opinion = -10 + target = root + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + } + } + + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = bp1_yearly.7002.a.toast.chamberpot + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7002.a.toast.chamberpot + right_icon = scope:chamberpot_rival + + scope:chamberpot_rival = { + add_opinion = { + modifier = drenched_in_excrement_opinion + opinion = -20 + target = root + } + add_character_modifier = { + modifier = covered_in_feces + years = 10 + } + increase_wounds_effect = { REASON = skull_cracked_open } + } + stress_impact = { + vengeful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + } + } + + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = bp1_yearly.7002.a.toast.tripped + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7002.a.toast.tripped + right_icon = root + + add_character_modifier = { + modifier = covered_in_feces + years = 10 + } + stress_impact = { + base = minor_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { #No + name = bp1_yearly.7002.b + + add_piety = minor_piety_gain + + stress_impact = { + vengeful = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = sadistic + has_trait = callous + has_trait = arbitrary + has_trait = wrathful + } + } + } + } +} + +################################## +# The Tapestry # +# By Daniel Moore # +################################## + +bp1_yearly.7003 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7003.t + desc = bp1_yearly.7003.desc + theme = friend_relation + + right_portrait = { + character = scope:orgy_tapestry_maker + animation = happiness + + } + + cooldown = { years = 10 } + trigger = { + # Standard checks. + is_available_at_peace_adult = yes + is_landed = yes + has_bp1_dlc_trigger = yes + + any_relation = { + type = friend + is_available_healthy_ai_adult = yes + is_deviant_trigger = yes + save_temporary_scope_as = tapestry_maker + } + any_vassal = { + is_available_ai_adult = yes + this != scope:tapestry_maker + } + any_courtier = { + is_available_healthy_ai_adult = yes + this != scope:tapestry_maker + count > 4 + } + } + + immediate = { + + random_relation = { + type = friend + limit = { + is_available_healthy_ai_adult = yes + is_deviant_trigger = yes + } + save_scope_as = orgy_tapestry_maker + } + + if = { + limit = { + NOT = { exists = scope:orgy_tapestry_maker } + } + hidden_effect = { + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + + } + + weight = { + base = 1 + modifier = { + add = 10 + is_of_minor_interest_to_root_trigger = yes + } + + modifier = { + add = 10 + has_trait = lustful + } + } + + + add_secret = { + type = secret_deviant + } + save_scope_as = orgy_tapestry_maker + } + } + } + + random_vassal = { + limit = { + is_available_ai_adult = yes + this != scope:orgy_tapestry_maker + } + save_scope_as = orgy_participant_1 + } + + random_courtier = { + limit = { + is_available_ai_adult = yes + NOR = { + this = scope:orgy_tapestry_maker + this = scope:orgy_participant_1 + } + } + save_scope_as = orgy_participant_2 + } + + random_courtier = { + limit = { + is_available_ai_adult = yes + NOR = { + this = scope:orgy_tapestry_maker + this = scope:orgy_participant_1 + this = scope:orgy_participant_2 + } + } + save_scope_as = orgy_participant_3 + } + + scope:orgy_tapestry_maker = { + random_secret = { + type = secret_deviant + reveal_to = root + save_scope_as = tapestry_maker_secret + } + } + + } + + 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 } + } + + + scope:tapestry_maker_secret = { + expose_secret = root + } + + + stress_impact = { + compassionate = medium_stress_impact_gain + deviant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + + + } + + option = { #Get Artifact + name = bp1_yearly.7003.b + + + stress_impact = { + deviant = medium_stress_impact_loss + chaste = medium_stress_impact_gain + lustful = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + + create_artifact = { + name = bp1_orgy_tapestry + description = bp1_orgy_tapestry_desc + modifier = artifact_seduce_scheme_phase_duration_mult_1_modifier + modifier = artifact_attraction_opinion_1_modifier + type = miscellaneous + visuals = tapestry + + save_scope_as = newly_created_artifact + } + } + + option = { #Ignore + name = bp1_yearly.7003.c + + + if = { + limit = { + can_add_hook = { + target = scope:orgy_tapestry_maker + type = favor_hook + } + } + add_hook = { + target = scope:orgy_tapestry_maker + type = favor_hook + } + } + + + + + stress_impact = { + compassionate = medium_stress_impact_loss + lustful = medium_stress_impact_loss + chaste = medium_stress_impact_loss + deviant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + + } + } + } +} + + +########################### +# Bad memory # +# By Daniel Moore # +########################### + +bp1_yearly.7004 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7004.t + desc = bp1_yearly.7004.desc + theme = friend_relation + left_portrait = { + character = root + animation = grief + } + + right_portrait = { + character = scope:concerned_friend + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + + any_courtier_or_guest = { + has_any_good_relationship_with_root_trigger = yes + has_personality_benevolent_trigger = yes + is_available_ai_adult = yes + can_add_hook = { + target = root + type = favor_hook + } + save_temporary_scope_as = temp_check + } + + any_memory = { + has_memory_category = negative + NOT = { + any_memory_participant = { + this = scope:temp_check + } + } + NOT = { + has_memory_category = private + } + } + + } + + immediate = { + random_courtier_or_guest = { + limit = { + has_any_good_relationship_with_root_trigger = yes + has_personality_benevolent_trigger = yes + is_available_ai_adult = yes + can_add_hook = { + target = root + type = favor_hook + } + } + save_scope_as = concerned_friend + } + + random_memory = { + limit = { + has_memory_category = negative + NOT = { + has_memory_category = private + } + NOT = { has_memory_participant = scope:concerned_friend } + } + save_scope_as = bad_memory + } + + } + + option = { #I need to talk to someone + name = bp1_yearly.7004.a + #Big stress loss + stress_impact = { + base = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + trusting = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + progress_towards_friend_effect = { + REASON = friend_free_therapy + CHARACTER = scope:concerned_friend + OPINION = 0 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Leave me alone. + name = bp1_yearly.7004.b + add_prestige = minor_prestige_gain + stress_impact = { + base = 10 + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + } + } + } +} + + + +###################### +# Loyalty Test # +# By Daniel Moore # +###################### + +bp1_yearly.7010 = { #A loyalty test + type = character_event + content_source = dlc_006 + title = bp1_yearly.7010.t + desc = bp1_yearly.7010.desc + theme = intrigue + right_portrait = { + character = root + animation = eavesdrop + } + + left_portrait = { + character = scope:tested_friend + animation = worry + } + + lower_right_portrait = scope:friends_friend + + trigger = { + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + + OR = { + has_trait = deceitful + has_trait = sadistic + has_trait = arbitrary + has_trait = fickle + has_personality_malicious_trigger = yes + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_skulduggery_focus } + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + + any_relation = { + type = friend + is_available_ai_adult = yes + OR = { + is_courtier_of = root + is_vassal_of = root + } + NOR = { + has_trait = loyal + has_trait = disloyal + } + } + faith.religion = { is_in_family = rf_abrahamic } # Judas reference + } + + immediate = { + random_relation = { + type = friend + limit = { + is_available_ai_adult = yes + OR = { + is_courtier_of = root + is_vassal_of = root + } + NOR = { + has_trait = loyal + has_trait = disloyal + } + } + + weight = { + base = 1 + modifier = { + add = 10 + is_of_minor_interest_to_root_trigger = yes + } + + modifier = { + add = 50 + has_trait = paranoid + } + } + + save_scope_as = tested_friend + + if = { + limit = { + any_relation = { + type = friend + is_available_ai_adult = yes + this != root + } + } + random_relation = { + type = friend + limit = { + is_available_ai_adult = yes + this != root + } + save_scope_as = friends_friend + } + } + } + + } + + option = { #Gold or me + name = bp1_yearly.7010.a + custom_tooltip = bp1_yearly.7010.a.tt + + pay_short_term_gold = { + target = scope:tested_friend + gold = 30 + } + + random_list = { + 10 = { #Don't sell me out + desc = bp1_yearly.7010.toast.not_betrayed + show_chance = no + modifier = { + trigger = { + scope:tested_friend.ai_honor >= 1 + } + add = scope:tested_friend.ai_honor + } + modifier = { + trigger = { + scope:tested_friend.ai_boldness < 0 + } + add = { + value = scope:tested_friend.ai_boldness + multiply = -1 + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = content + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = generous + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = trusting + } + } + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7010.toast.not_betrayed + right_icon = scope:tested_friend + add_prestige = medium_prestige_gain + add_hook = { + type = loyalty_hook + target = scope:tested_friend + } + scope:tested_friend = { + add_trait = loyal + pay_short_term_gold = { + target = root + gold = 30 + } + } + } + } + + 10 = { #Sell me out + desc = bp1_yearly.7010.toast.betrayed + show_chance = no + modifier = { + add = scope:tested_friend.ai_greed + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = fickle + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = arbitrary + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = callous + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = bp1_yearly.7010.toast.betrayed + right_icon = scope:tested_friend + add_opinion = { + target = scope:tested_friend + modifier = treachery_opinion + } + scope:tested_friend = { + add_trait = disloyal + } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + trusting = massive_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } + + option = { #Carnal pleasures or me + name = bp1_yearly.7010.b + custom_tooltip = bp1_yearly.7010.b.tt + random_list = { + 10 = { #Don't sell me out + desc = bp1_yearly.7010.toast.not_betrayed + show_chance = no + modifier = { + trigger = { + scope:tested_friend.ai_honor >= 1 + } + add = scope:tested_friend.ai_honor + } + modifier = { + trigger = { + scope:tested_friend.ai_boldness < 0 + } + add = { + value = scope:tested_friend.ai_boldness + multiply = -1 + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = content + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = humble + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = trusting + } + } + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7010.toast.not_betrayed + right_icon = scope:tested_friend + add_prestige = medium_prestige_gain + if = { + limit = { + can_add_hook = { + type = loyalty_hook + target = scope:tested_friend + } + } + add_hook = { + type = loyalty_hook + target = scope:tested_friend + } + } + scope:tested_friend = { + if = { + limit = { + NOT = { has_trait = loyal } + } + add_trait = loyal + } + } + } + } + + 10 = { #Sell me out + desc = bp1_yearly.7010.toast.betrayed + show_chance = no + modifier = { + add = scope:tested_friend.ai_sociability + } + modifier = { + add = 50 + scope:tested_friend = { + has_trait = lustful + } + } + modifier = { + add = 50 + scope:tested_friend = { + has_trait = rakish + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = fickle + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = arbitrary + } + } + modifier = { + factor = 0 + scope:tested_friend = { + OR = { + has_trait = chaste + might_cheat_on_every_partner_trigger = no + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = bp1_yearly.7010.toast.betrayed + right_icon = scope:tested_friend + scope:tested_friend = { + contract_disease_effect = { DISEASE = lovers_pox TREATMENT_EVENT = no } + add_trait = disloyal + } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + trusting = massive_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } + + option = { #Other friend or me + name = bp1_yearly.7010.c + trigger = { + exists = scope:friends_friend + } + custom_tooltip = bp1_yearly.7010.c.tt + random_list = { + 10 = { #Don't sell me out + desc = bp1_yearly.7010.toast.not_betrayed + show_chance = no + modifier = { + add = { + value = scope:tested_friend.ai_sociability + multiply = 0.5 + } + } + modifier = { + trigger = { + scope:tested_friend = { + save_temporary_opinion_value_as = { name = opinion_of_you target = root } + opinion = { target = scope:friends_friend value <= scope:opinion_of_you } + } + } + add = 100 + } + modifier = { + trigger = { + scope:tested_friend.ai_honor >= 1 + } + add = scope:tested_friend.ai_honor + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = content + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = just + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = trusting + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = stubborn + } + } + send_interface_toast = { + type = event_toast_effect_good + title = bp1_yearly.7010.toast.not_betrayed + right_icon = scope:tested_friend + add_prestige = medium_prestige_gain + add_hook = { + type = loyalty_hook + target = scope:tested_friend + } + scope:tested_friend = { + add_trait = loyal + } + } + } + + 10 = { #Sell me out + desc = bp1_yearly.7010.toast.betrayed + show_chance = no + modifier = { + scope:tested_friend = { + save_temporary_opinion_value_as = { name = opinion_of_you target = root } + opinion = { target = scope:friends_friend value > scope:opinion_of_you } + } + add = 20 + } + modifier = { + add = 20 + scope:tested_friend = { + has_trait = fickle + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = arbitrary + } + } + modifier = { + add = 10 + scope:tested_friend = { + has_trait = gregarious + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = bp1_yearly.7010.toast.betrayed + right_icon = scope:tested_friend + scope:tested_friend = { + add_stress = major_stress_impact_gain + add_trait = disloyal + } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + trusting = massive_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } + + option = { #Nothing + name = bp1_yearly.7010.d + + scope:tested_friend = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 5 + } + } + + stress_impact = { + paranoid = massive_stress_impact_gain + impatient = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = impatient + has_trait = deceitful + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + } + } +} + + +################################## +# Memory of war # +# By Daniel Moore # +################################## + +bp1_yearly.7050 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7050.t + desc = { + desc = bp1_yearly.7050.desc + + triggered_desc = { + trigger = { + exists = scope:sleeping_spouse + } + desc = bp1_yearly.7050.desc.married + } + + triggered_desc = { + trigger = { + NOT = { exists = scope:sleeping_spouse } + } + desc = bp1_yearly.7050.desc.not_married + } + } + theme = martial + + override_background = { reference = battlefield } + + left_portrait = { + character = root + animation = throne_room_one_handed_passive_1 + } + + cooldown = { years = 20 } + + trigger = { + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + + any_memory = { + has_memory_category = negative + has_memory_category = war + } + } + + immediate = { + random_memory = { + limit = { + has_memory_category = negative + has_memory_category = war + } + save_scope_as = war_memory + } + + random_spouse = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = sleeping_spouse + } + add_character_flag = wear_armor + } + + + option = { #You take your stress out on something + name = bp1_yearly.7050.a + + stress_impact = { + base = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + forgiving = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Vengeance + name = bp1_yearly.7050.b + + add_character_modifier = { + modifier = vengeance_obsessed_modifier + years = 20 + } + + stress_impact = { + base = minor_stress_impact_gain + forgiving = major_stress_impact_gain + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = gregarious + has_trait = compassionate + } + } + } + } + after = { + remove_character_flag = wear_armor + } +} + +################################## +# Memory of Battle # +# By Daniel Moore # +################################## + +bp1_yearly.7051 = { #Memory of a battle + type = character_event + content_source = dlc_006 + title = bp1_yearly.7051.t + desc = bp1_yearly.7051.desc + theme = martial + + override_background = { + reference = terrain_scope + } + + left_portrait = { + character = root + animation = marshal + } + + cooldown = { years = 10 } + + trigger = { + is_playable_character = yes + has_bp1_dlc_trigger = yes + is_available_at_peace_adult = yes + + martial >= 8 + + NOR = { + has_trait = rough_terrain_expert + has_trait = open_terrain_expert + has_trait = forest_fighter + has_trait = desert_warrior + has_trait = jungle_stalker + has_trait = winter_soldier + } + + any_memory = { + has_memory_category = battle + has_memory_category = war + } + } + + immediate = { + random_memory = { + limit = { + has_memory_category = battle + has_memory_category = war + } + save_scope_as = battle_memory + } + + scope:battle_memory.var:battle_location = { + save_scope_as = battle_area + save_scope_as = background_terrain_scope + } + add_character_flag = wear_armor + } + + option = { + name = bp1_yearly.7051.a + + if = { + limit = { + scope:battle_area = { + OR = { + terrain = hills + terrain = mountains + terrain = wetlands + } + } + } + add_trait = rough_terrain_expert + } + + if = { + limit = { + scope:battle_area = { + + OR = { + terrain = farmlands + terrain = plains + terrain = steppe + } + } + } + add_trait = open_terrain_expert + } + + if = { + limit = { + scope:battle_area = { + terrain = forest + } + } + add_trait = forest_fighter + } + if = { + limit = { + scope:battle_area = { + terrain = desert + } + } + add_trait = desert_warrior + } + if = { + limit = { + scope:battle_area = { + terrain = jungle + } + } + add_trait = jungle_stalker + } + + if = { + limit = { + scope:battle_area = { + terrain = taiga + } + } + add_trait = winter_soldier + } + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + option = { + name = bp1_yearly.7051.b + + trigger = { + NOT = { + has_trait = flexible_leader + } + } + + add_trait = flexible_leader + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = -1 + } + } + } + after = { + remove_character_flag = wear_armor + } +} + +################################## +# #A story # +# By Daniel Moore # +################################## + +bp1_yearly.7052 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7052.t + desc = bp1_yearly.7052.desc + theme = friendly + + override_background = { reference = relaxing_room } + + left_portrait = { + character = root + animation = storyteller + } + + right_portrait = { + character = scope:story_friend + animation = toast_goblet + } + + cooldown = { years = 10 } + + trigger = { + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + + any_memory = { + count > 0 + NOT = { + has_memory_category = private + } + } + + any_courtier_or_guest = { + has_any_good_relationship_with_root_trigger = yes + is_available_ai_adult = yes + } + + } + + immediate = { + random_memory = { + limit = { + NOT = { + has_memory_category = private + } + } + save_scope_as = story_memory + } + + random_courtier_or_guest = { + limit = { + has_any_good_relationship_with_root_trigger = yes + is_available_ai_adult = yes + } + save_scope_as = story_friend + } + } + + option = { #Traditional + name = bp1_yearly.7052.a + + scope:story_friend = { + add_opinion = { + modifier = pleased_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + } + + progress_towards_friend_effect = { + REASON = friend_story_by_fire + CHARACTER = scope:story_friend + OPINION = 0 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Own Story + name = bp1_yearly.7052.b + + scope:story_friend = { + add_opinion = { + modifier = pleased_opinion + opinion = 15 + target = root + } + } + + if = { + limit = { + scope:story_memory = { + has_memory_category = major + } + } + add_prestige = medium_prestige_value + } + else_if = { + limit = { + scope:story_memory = { + NOT = { + has_memory_category = major + } + } + } + add_prestige = minor_prestige_value + } + + stress_impact = { + shy = minor_stress_gain + ambitious = minor_stress_loss + lazy = minor_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = -1 + } + } + } + + + option = { #Both! + name = bp1_yearly.7052.c + + trait = gregarious + trigger = { + OR = { + has_trait = gregarious + culture = { + has_cultural_tradition = tradition_storytellers + } + } + } + + scope:story_friend = { + add_opinion = { + modifier = pleased_opinion + opinion = 15 + target = root + } + } + + if = { + limit = { + scope:story_memory = { + has_memory_category = major + } + } + add_prestige = major_prestige_value + } + + else_if = { + limit = { + scope:story_memory = { + NOT = { + has_memory_category = major + } + } + } + add_prestige = medium_prestige_value + } + + + progress_towards_friend_effect = { + REASON = friend_story_by_fire + CHARACTER = scope:story_friend + OPINION = 0 + } + + stress_impact = { + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 1 + } + } + } +} + +################################## +# Revenge Memory # +# By Daniel Moore # +################################## + +bp1_yearly.7053 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7053.t + desc = bp1_yearly.7053.desc + theme = murder_scheme + override_background = { reference = gallows } + left_portrait = { + character = root + animation = anger + } + lower_right_portrait = { + character = scope:bad_memory_participant + animation = happiness + } + cooldown = { years = 10 } + trigger = { + is_ai = no # Murder schemes are heavy for performance + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + any_memory = { + has_memory_category = negative + any_memory_participant = { + save_temporary_scope_as = rival_character + is_alive = yes + NOR = { + this = root + has_relation_lover = root + has_relation_friend = root + root = { + opinion = { + target = scope:rival_character + value >= -15 + } + } + } + in_diplomatic_range = root + root = { + can_start_scheme = { + type = murder + target_character = scope:rival_character + } + } + } + } + NOT = { + has_trait = forgiving + } + } + immediate = { + random_memory = { + limit = { + has_memory_category = negative + any_memory_participant = { + this != root + is_alive = yes + root = { + can_start_scheme = { + type = murder + target_character = prev + } + } + NOR = { + has_relation_lover = root + has_relation_friend = root + root = { + opinion = { + target = prev + value >= -15 + } + } + } + in_diplomatic_range = root + } + } + #Used for loc + save_scope_as = bad_memory + #Find our participant + random_memory_participant = { + limit = { + this != root + is_alive = yes + root = { + can_start_scheme = { + type = murder + target_character = prev + } + } + NOR = { + has_relation_lover = root + has_relation_friend = root + root = { + opinion = { + target = prev + value >= -15 + } + } + } + } + save_scope_as = bad_memory_participant + } + } + } + #Start revenge scheme or enhance existing scheme + option = { + name = bp1_yearly.7053.a + trigger = { + can_start_scheme = { + type = murder + target_character = scope:bad_memory_participant + } + } + #Do we already have a murder scheme against our rival? + if = { + limit = { + NOT = { + any_scheme = { + type = murder + scheme_target_character = scope:bad_memory_participant + } + } + } + start_scheme = { + type = murder + target_character = scope:bad_memory_participant + } + } + custom_tooltip = diplomacy_family.2250.b.tt + #Buff the scheme + random_scheme = { + type = murder + limit = { + scheme_target_character = scope:bad_memory_participant + } + add_scheme_modifier = { + type = murder_memory_modifier + } + } + stress_impact = { + compassionate = major_stress_impact_gain + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + lazy = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = honest + has_trait = just + } + add = 50 + } + ai_value_modifier = { + ai_vengefulness = 2 + ai_boldness = 2 + ai_honor = -2 + ai_compassion = -2 + } + } + } + #Forgive and Forget + option = { + name = bp1_yearly.7053.b + add_piety = minor_piety_value + stress_impact = { + eccentric = medium_stress_gain + deceitful = medium_stress_gain + wrathful = medium_stress_gain + vengeful = major_stress_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = eccentric + has_trait = deceitful + has_trait = wrathful + has_trait = vengeful + } + add = 50 + } + ai_value_modifier = { + ai_compassion = 2 + ai_honor = 2 + ai_rationality = 1 + ai_boldness = -2 + ai_vengefulness = -2 + } + } + } +} + +########################### +# Forget a memory # +# By Daniel Moore # +########################### + +bp1_yearly.7054 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7054.t + desc = bp1_yearly.7054.desc + theme = murder_scheme + + override_background = { reference = garden } + + left_portrait = { + character = root + animation = shame + } + + right_portrait = { + character = scope:memory_child + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + is_ai = no + + OR = { + has_trait = infirm + age > 65 + } + + any_memory = { + NOT = { + has_memory_category = private + } + } + + any_child = { + is_available_ai_adult = yes + NOR = { + has_relation_rival = root + opinion = { + target = prev + value <= -15 + } + } + } + } + + + immediate = { + random_memory = { + save_scope_as = forgotten_memory + } + + random_child = { + limit = { + is_available_ai_adult = yes + NOR = { + has_relation_rival = root + opinion = { + target = prev + value <= -15 + } + } + } + weight = { + base = 1 + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + modifier = { + add = 5 + opinion = { + target = root + value >= 25 + } + } + modifier = { + add = 5 + opinion = { + target = root + value >= 50 + } + } + modifier = { + add = 20 + has_trait = compassionate + } + } + save_scope_as = memory_child + } + } + + option = { #Pretend everything is fine + name = bp1_yearly.7054.a + + stress_impact = { + base = 50 + honest = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Admit to forgetting + name = bp1_yearly.7054.b + add_prestige = medium_prestige_loss + + stress_impact = { + base = 20 + deceitful = minor_stress_gain + honest = minor_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = -1 + } + } + } + + after = { + destroy_character_memory = scope:forgotten_memory + } +} + + +################################## +# Record A Memory # +# By Daniel Moore # +################################## + +bp1_yearly.7055 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7055.t + desc = { + triggered_desc = { + trigger = { + scope:recorded_memory = { + has_memory_category = positive + } + } + desc = bp1_yearly.7055.desc.positive + } + + triggered_desc = { + trigger = { + scope:recorded_memory = { + has_memory_category = negative + } + } + desc = bp1_yearly.7055.desc.negative + } + + triggered_desc = { + trigger = { + scope:recorded_memory = { + NOR = { + has_memory_category = negative + has_memory_category = positive + } + } + } + desc = bp1_yearly.7055.desc.neutral + } + + triggered_desc = { + trigger = { + learning < 13 + NOT = { has_trait = blind } + } + desc = bp1_yearly.7055.desc.alone_poor_skill + } + + triggered_desc = { + trigger = { + learning >= 13 + NOT = { has_trait = blind } + } + desc = bp1_yearly.7055.desc.alone_good_skill + } + + triggered_desc = { + trigger = { + has_trait = blind + } + desc = bp1_yearly.7055.desc.blind + } + + triggered_desc = { + trigger = { + exists = scope:poet + scope:poet != scope:friend + } + desc = bp1_yearly.7055.desc.poet + } + + triggered_desc = { + trigger = { + exists = scope:friend + } + desc = bp1_yearly.7055.desc.friend + } + + desc = bp1_yearly.7055.desc.ending + } + theme = dynasty + + override_background = { reference = study } + + left_portrait = { + character = root + animation = throne_room_writer + } + + right_portrait = { + character = scope:friend + animation = chancellor + } + + lower_right_portrait = { + character = scope:poet + } + + cooldown = { years = 10 } + trigger = { + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + gold >= medium_gold_value + + OR = { + NOT = { has_trait = blind } + any_court_position_holder = { + type = court_poet_court_position + is_available_ai_adult = yes + } + any_relation = { + type = friend + is_available_ai_adult = yes + learning >= 13 + learning > root.learning + } + } + + any_memory = { + OR = { + has_memory_category = battle + has_memory_category = intimidation + has_memory_category = family + has_memory_category = war + has_memory_category = relationships + } + NOT = { + has_memory_category = private + } + } + } + + immediate = { + save_scope_as = owner + random_memory = { + limit = { + OR = { + has_memory_category = battle + has_memory_category = intimidation + has_memory_category = family + has_memory_category = war + has_memory_category = relationships + } + NOT = { + has_memory_category = private + } + } + save_scope_as = recorded_memory + if = { + limit = { + any_memory_participant = { + this != root + } + } + random_memory_participant = { + limit = { + this != root + } + save_scope_as = memory_participant + } + } + } + if = { + limit = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_poet_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = poet + } + } + if = { + limit = { + any_relation = { + type = friend + is_available_ai_adult = yes + learning >= 13 + learning > root.learning + } + } + random_relation = { + type = friend + limit = { + is_available_ai_adult = yes + learning >= 13 + learning > root.learning + } + save_scope_as = friend + } + } + } + + option = { # Make your poet do it + name = bp1_yearly.7055.poet + trigger = { + exists = scope:poet + } + + remove_short_term_gold = minor_gold_value + + if = { + limit = { + exists = scope:memory_participant + } + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = recorded_memory_character + type = journal + creator = root + description = recorded_memory_desc + visuals = indian_book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = 50 + quality = 50 + } + } + else = { + create_artifact = { + name = recorded_memory_character + type = journal + creator = root + description = recorded_memory_desc + visuals = book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = 50 + quality = 50 + } + } + } + else = { + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = recorded_memory + type = journal + creator = root + description = recorded_memory_desc + visuals = indian_book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = scope:wealth + quality = scope:quality + } + } + else = { + create_artifact = { + name = recorded_memory + type = journal + creator = root + description = recorded_memory_desc + visuals = book + modifier = artifact_monthly_minor_prestige_2_modifier + save_scope_as = newly_created_artifact + wealth = scope:wealth + quality = scope:quality + } + } + } + + hidden_effect_new_object = { + scope:newly_created_artifact = { + random_list = { + 10 = { + trigger = { + scope:recorded_memory = { + OR = { + has_memory_category = battle + has_memory_category = war + } + } + } + add_scaled_artifact_modifier_combat_effect = yes + } + 10 = { + trigger = { + scope:recorded_memory = { + has_memory_category = intimidation + } + } + add_scaled_artifact_modifier_intrigue_effect = yes + } + 10 = { + trigger = { + scope:recorded_memory = { + OR = { + has_memory_category = family + has_memory_category = relationships + } + } + } + add_scaled_artifact_modifier_majesty_effect = yes + } + } + } + } + + stress_impact = { + paranoid = medium_stress_gain + impatient = medium_stress_gain + humble = minor_stress_gain + greedy = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 1 + } + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + + option = { # Have a friend help + name = bp1_yearly.7055.friend + trigger = { + exists = scope:friend + } + + remove_short_term_gold = minor_gold_value + + scope:friend = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 30 + } + } + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { reason = best_friend_helped_pen_memory copy_reason = friend target = scope:friend } + } + + if = { + limit = { + exists = scope:memory_participant + } + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = recorded_memory_character + type = journal + creator = root + description = recorded_memory_desc + visuals = indian_book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = 50 + quality = 50 + } + } + else = { + create_artifact = { + name = recorded_memory_character + type = journal + creator = root + description = recorded_memory_desc + visuals = book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = 50 + quality = 50 + } + } + } + else = { + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = recorded_memory + type = journal + creator = root + description = recorded_memory_desc + visuals = indian_book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = scope:wealth + quality = scope:quality + } + } + else = { + create_artifact = { + name = recorded_memory + type = journal + creator = root + description = recorded_memory_desc + visuals = book + modifier = artifact_monthly_minor_prestige_2_modifier + save_scope_as = newly_created_artifact + wealth = scope:wealth + quality = scope:quality + } + } + } + + hidden_effect_new_object = { + scope:newly_created_artifact = { + random_list = { + 10 = { + trigger = { + scope:recorded_memory = { + OR = { + has_memory_category = battle + has_memory_category = war + } + } + } + add_scaled_artifact_modifier_combat_effect = yes + } + 10 = { + trigger = { + scope:recorded_memory = { + has_memory_category = intimidation + } + } + add_scaled_artifact_modifier_intrigue_effect = yes + } + 10 = { + trigger = { + scope:recorded_memory = { + OR = { + has_memory_category = family + has_memory_category = relationships + } + } + } + add_scaled_artifact_modifier_majesty_effect = yes + } + } + } + } + + stress_impact = { + paranoid = medium_stress_gain + impatient = medium_stress_gain + humble = minor_stress_gain + greedy = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 1 + } + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + + option = { #Make a book of the memory, high skill! + name = bp1_yearly.7055.high_skill + trigger = { + learning >= 13 + NOT = { has_trait = blind } + } + + remove_short_term_gold = medium_gold_value + + if = { + limit = { + exists = scope:memory_participant + } + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = recorded_memory_character + type = journal + creator = root + description = recorded_memory_desc + visuals = indian_book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = 50 + quality = 50 + } + } + else = { + create_artifact = { + name = recorded_memory_character + type = journal + creator = root + description = recorded_memory_desc + visuals = book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = 50 + quality = 50 + } + } + } + else = { + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = recorded_memory + type = journal + creator = root + description = recorded_memory_desc + visuals = indian_book + modifier = artifact_monthly_minor_prestige_1_modifier + save_scope_as = newly_created_artifact + wealth = scope:wealth + quality = scope:quality + } + } + else = { + create_artifact = { + name = recorded_memory + type = journal + creator = root + description = recorded_memory_desc + visuals = book + modifier = artifact_monthly_minor_prestige_2_modifier + save_scope_as = newly_created_artifact + wealth = scope:wealth + quality = scope:quality + } + } + } + + hidden_effect_new_object = { + scope:newly_created_artifact = { + random_list = { + 10 = { + trigger = { + scope:recorded_memory = { + OR = { + has_memory_category = battle + has_memory_category = war + } + } + } + add_scaled_artifact_modifier_combat_effect = yes + } + 10 = { + trigger = { + scope:recorded_memory = { + has_memory_category = intimidation + } + } + add_scaled_artifact_modifier_intrigue_effect = yes + } + 10 = { + trigger = { + scope:recorded_memory = { + OR = { + has_memory_category = family + has_memory_category = relationships + } + } + } + add_scaled_artifact_modifier_majesty_effect = yes + } + } + } + } + + stress_impact = { + lazy = medium_stress_gain + greedy = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 1 + } + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + + option = { #Make a book of the memory + name = bp1_yearly.7055.a + trigger = { + learning < 13 + NOT = { has_trait = blind } + } + + remove_short_term_gold = medium_gold_value + + if = { + limit = { + exists = scope:memory_participant + } + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = recorded_memory_character + type = journal + creator = root + description = recorded_memory_desc + visuals = indian_book + modifier = artifact_monthly_minor_prestige_1_modifier + wealth = 10 + quality = 20 + save_scope_as = newly_created_artifact + } + } + else = { + create_artifact = { + name = recorded_memory_character + type = journal + creator = root + description = recorded_memory_desc + visuals = book + modifier = artifact_monthly_minor_prestige_1_modifier + wealth = 10 + quality = 20 + save_scope_as = newly_created_artifact + } + } + } + else = { + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = recorded_memory + type = journal + creator = root + description = recorded_memory_desc + visuals = indian_book + modifier = artifact_monthly_minor_prestige_1_modifier + wealth = 10 + quality = 20 + save_scope_as = newly_created_artifact + } + } + else = { + create_artifact = { + name = recorded_memory + type = journal + creator = root + description = recorded_memory_desc + visuals = book + modifier = artifact_monthly_minor_prestige_1_modifier + wealth = 10 + quality = 20 + save_scope_as = newly_created_artifact + } + } + } + + hidden_effect_new_object = { + scope:newly_created_artifact = { + random_list = { + 10 = { + trigger = { + scope:recorded_memory = { + OR = { + has_memory_category = battle + has_memory_category = war + } + } + } + add_scaled_artifact_modifier_combat_effect = yes + } + 10 = { + trigger = { + scope:recorded_memory = { + has_memory_category = intimidation + } + } + add_scaled_artifact_modifier_intrigue_effect = yes + } + 10 = { + trigger = { + scope:recorded_memory = { + OR = { + has_memory_category = family + has_memory_category = relationships + } + } + } + add_scaled_artifact_modifier_majesty_effect = yes + } + } + } + } + + stress_impact = { + lazy = medium_stress_gain + greedy = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 1 + } + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + + option = { #Don't make a book relax instead + name = bp1_yearly.7055.b + + stress_impact = { + diligent = medium_stress_gain + } + + ai_chance = { + base = 25 + modifier = { + factor = 0 + has_trait = diligent + } + } + } + + after = { + if = { + limit = { + exists = scope:newly_created_artifact + has_royal_court = yes + } + scope:newly_created_artifact = { + add_scaled_artifact_modifier_grandeur_small_effect = yes + add_scaled_artifact_modifier_scholarship_effect = yes + + reforge_artifact = { + type = book + } + } + } + } +} + + +################################## +# Intimidation # +# By Daniel Moore # +################################## + +bp1_yearly.7056 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7056.t + desc = { + desc = bp1_yearly.7056.desc + } + + theme = dread + + override_background = { reference = dungeon } + + left_portrait = { + character = root + animation = laugh + } + + right_portrait = { + character = scope:intimidation_target + animation = fear + } + + cooldown = { years = 10 } + trigger = { + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + + OR = { + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + has_personality_malicious_trigger = yes + } + + OR = { + any_vassal = { + is_available_ai_adult = yes + has_any_good_relationship_with_root_trigger = no + ai_boldness <= 25 + } + any_courtier = { + is_available_ai_adult = yes + has_any_good_relationship_with_root_trigger = no + ai_boldness <= 25 + } + } + + any_memory = { + has_memory_category = intimidation + } + } + + + + immediate = { + random_memory = { + limit = { + has_memory_category = intimidation + } + save_scope_as = intimidation_memory + } + + random_vassal = { + limit = { + exists = joined_faction + is_available_ai_adult = yes + has_any_good_relationship_with_root_trigger = no + ai_boldness <= 25 + } + alternative_limit = { + is_landed = yes + primary_title.tier >= tier_county + is_available_ai_adult = yes + has_any_good_relationship_with_root_trigger = no + ai_boldness <= 25 + } + alternative_limit = { + is_available_ai_adult = yes + has_any_good_relationship_with_root_trigger = no + ai_boldness <= 25 + } + save_scope_as = intimidation_target + } + + if = { + limit = { + NOT = { exists = scope:intimidation_target } + } + random_courtier = { + limit = { + is_available_ai_adult = yes + has_any_good_relationship_with_root_trigger = no + ai_boldness <= 25 + } + save_scope_as = intimidation_target + } + } + } + + option = { #Intimidate them for a favor + name = bp1_yearly.7056.a + + trigger = { + can_add_hook = { + target = scope:intimidation_target + type = threat_hook + } + } + + add_hook = { + target = scope:intimidation_target + type = threat_hook + } + + scope:intimidation_target = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -10 + } + if = { + limit = { + exists = joined_faction + } + joined_faction = { + scope:intimidation_target = { + leave_faction_with_cooldown_effect = { + FACTION = prev + YEARS = 20 + } + } + } + } + } + + stress_impact = { + compassionate = massive_stress_gain + forgiving = major_stress_impact_gain + generous = medium_stress_impact_gain + greedy = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = generous + } + } + } + } + + option = { #Have them spread word of your dread + name = bp1_yearly.7056.b + + add_dread = medium_dread_gain + + scope:intimidation_target = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -10 + } + if = { + limit = { + exists = joined_faction + } + joined_faction = { + scope:intimidation_target = { + leave_faction_with_cooldown_effect = { + FACTION = prev + YEARS = 20 + } + } + } + } + } + + stress_impact = { + humble = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + content = medium_stress_impact_gain + wrathful = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = paranoid + has_trait = content + } + } + } + } +} + + +################################## +# Yearning # +# By Daniel Moore # +################################## + +scripted_trigger bp1_yearly_7057_valid_participant = { + is_alive = yes + NOT = { + has_relation_lover = root + } + root = { + can_start_scheme = { + type = seduce + target_character = prev + } + } +} + +bp1_yearly.7057 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7057.t + desc = { + + desc = bp1_yearly.7057.desc + + triggered_desc = { + trigger = { + is_female = yes + } + desc = bp1_yearly.7057.desc.female + } + + triggered_desc = { + trigger = { + is_female = no + } + desc = bp1_yearly.7057.desc.male + } + } + + theme = seduction + + override_background = { reference = temple } + + left_portrait = { + character = root + animation = shame + } + + right_portrait = { + character = scope:realm_priest + animation = disgust + } + + lower_right_portrait = { + character = scope:sex_partner + animation = flirtation_left + } + + cooldown = { years = 30 } + + trigger = { + is_playable_character = yes + is_available_at_peace_adult = yes + has_bp1_dlc_trigger = yes + + OR = { + cp:councillor_court_chaplain ?= { is_available_ai_adult = yes } + any_courtier_or_guest = { + is_available_ai_adult = yes + is_clergy = yes + } + } + + NOR = { + has_trait = celibate + has_trait = chaste + any_relation = { type = soulmate } + } + + any_memory = { + memory_type = had_sex + any_memory_participant = { bp1_yearly_7057_valid_participant = yes } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = realm_priest } + } + else = { + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + is_clergy = yes + } + save_scope_as = realm_priest + } + } + + random_memory = { + memory_type = had_sex + limit = { + any_memory_participant = { bp1_yearly_7057_valid_participant = yes } + } + save_scope_as = sex_memory + + random_memory_participant = { + limit = { bp1_yearly_7057_valid_participant = yes } + save_scope_as = sex_partner + } + } + } + option = { #Start a scheme to seduce them + name = bp1_yearly.7057.a + trigger = { + can_start_scheme = { + type = seduce + target_character = scope:sex_partner + } + } + + start_scheme = { + type = seduce + target_character = scope:sex_partner + } + + custom_tooltip = diplomacy_family.2250.b.tt + + random_scheme = { + type = seduce + limit = { + scheme_target_character = scope:sex_partner + } + add_scheme_modifier = { + type = sex_memory_modifier + } + } + + stress_impact = { + lustful = medium_stress_impact_loss + lazy = minor_stress_impact_gain + content = medium_stress_impact_gain + chaste = massive_stress_impact_gain + celibate = massive_stress_impact_gain + } + + ai_chance = { + base = 0 + modifier = { + add = 100 + might_cheat_on_every_partner_trigger = yes + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = chaste + has_trait = celibate + } + } + } + } + + option = { #Release Stress + name = bp1_yearly.7057.c + + trigger = { + OR = { + is_deviant_trigger = yes + has_trait = lustful + } + } + trait = deviant + trait = lustful + + stress_impact = { + base = major_stress_impact_loss + chaste = massive_stress_impact_gain + celibate = massive_stress_impact_gain + shy = major_stress_impact_gain + } + + scope:realm_priest = { + add_opinion = { + modifier = defiled_place_of_worship_opinion + target = root + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = chaste + has_trait = celibate + } + } + } + } + + option = { #Move on + name = bp1_yearly.7057.b + + add_piety = minor_piety_gain + + scope:realm_priest = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 15 + } + } + + stress_impact = { + base = minor_stress_impact_gain + lustful = major_stress_impact_gain + deviant = major_stress_impact_gain + stubborn = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0.1 # To make sure the AI doesn't start improper seduction schemes + OR = { + has_trait = lustful + has_trait = deviant + has_trait = stubborn + has_trait = fickle + } + } + } + } +} + + +################################## +# Overindulgence # +# By Daniel Moore # +################################## + +bp1_yearly.7058 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7058.t + desc = bp1_yearly.7058.desc + theme = unfriendly + left_portrait = { + character = root + animation = anger + } + + right_portrait = { + character = scope:greedy_courtier + animation = drink + } + + override_background = { reference = bp1_wine_cellar } + + cooldown = { years = 30 } + + trigger = { + gold >= medium_gold_value + any_courtier_or_guest = { + is_available_ai_adult = yes + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + } + has_bp1_dlc_trigger = yes + + # Standard checks. + is_available_at_peace_adult = yes + is_landed = yes + } + + immediate = { + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + } + save_scope_as = greedy_courtier + } + + remove_short_term_gold = minor_gold_value + } + + option = { # Bond + name = bp1_yearly.7058.glutton + + trigger = { + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + scope:greedy_courtier = { NOT = { has_relation_friend = root } } + } + trait = gluttonous + trait = comfort_eater + + reverse_add_opinion = { + target = scope:greedy_courtier + modifier = grateful_opinion + opinion = 50 + } + + scope:greedy_courtier = { + if = { + limit = { can_set_relation_friend_trigger = { CHARACTER = root } } + set_relation_friend = { reason = friend_bonded_over_food target = root } + } + hidden_effect = { + change_current_weight = 20 + } + } + hidden_effect = { + change_current_weight = 20 + } + + stress_impact = { + gluttonous = medium_stress_impact_loss + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { # You will pay it back, and some extra + name = bp1_yearly.7058.a + + trigger = { + scope:greedy_courtier.gold > 0 + } + + scope:greedy_courtier = { + pay_short_term_gold = { + target = root + gold = { + value = root.medium_gold_value + max = scope:greedy_courtier.gold + } + } + } + + reverse_add_opinion = { + target = scope:greedy_courtier + modifier = unfriendly_opinion + opinion = -20 + } + + stress_impact = { + generous = major_stress_impact_gain + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { # Enjoy the dungeon + name = bp1_yearly.7058.b + + rightfully_imprison_character_effect = { + TARGET = scope:greedy_courtier + IMPRISONER = root + } + + stress_impact = { + greedy = medium_stress_impact_loss + gluttonous = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + stress_impact = { + forgiving = massive_stress_impact_gain + generous = major_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { #Let them go + name = bp1_yearly.7058.c + + reverse_add_opinion = { + target = scope:greedy_courtier + modifier = grateful_opinion + opinion = 20 + } + + scope:greedy_courtier = { + progress_towards_friend_effect = { + REASON = friend_bonded_over_food + CHARACTER = root + OPINION = 0 + } + } + + stress_impact = { + base = minor_stress_impact_gain + greedy = medium_stress_impact_gain + gluttonous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = gluttonous + has_trait = sadistic + has_trait = callous + has_trait = arbitrary + } + } + } + } +} + +################################## +# Dead Friends # +# By Daniel Moore # +################################## + +bp1_yearly.7029 = { + hidden = yes + + trigger = { + is_adult = yes + is_landed = yes + has_bp1_dlc_trigger = yes + exists = scope:dead_friend_spouse + exists = scope:dead_friend + scope:dead_friend_spouse = { + is_available_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_relation_lover = root + } + } + trigger_if = { + limit = { + scope:dead_friend_spouse = { + NOR = { + has_trait = deviant + has_trait = lustful + has_trait = incestuous + } + } + } + NOT = { + is_close_family_of = scope:dead_friend_spouse + } + } + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:dead_friend_spouse + } + } + + immediate = { + random_memory = { + memory_type = friend_died + limit = { + any_memory_participant = { + this = scope:dead_friend + } + } + save_scope_as = dead_friend_memory + } + + random_list = { + 1 = { #Small chance to fire this when your friend dies. + modifier = { + add = 20 + scope:dead_friend_spouse = { + OR = { + has_trait = lustful + has_trait = rakish + } + } + } + modifier = { + add = 20 + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_temptation_focus } + } + trigger_event = { + id = bp1_yearly.7030 + days = { 10 20 } + } + } + + 14 = { #Empty chance to make the other chance rarer. + + } + } + } +} + +bp1_yearly.7030 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7030.t + desc = bp1_yearly.7030.desc + theme = seduction + + override_background = { + reference = bedchamber + } + left_portrait = { + character = root + animation = disbelief + } + + right_portrait = { + character = scope:dead_friend_spouse + animation = flirtation + } + + + trigger = { + is_available_adult = yes + is_playable_character = yes + has_bp1_dlc_trigger = yes + exists = scope:dead_friend_spouse + + trigger_if = { + limit = { + scope:dead_friend_spouse = { + NOR = { + has_trait = deviant + has_trait = lustful + has_trait = incestuous + } + } + } + NOT = { + is_close_family_of = scope:dead_friend_spouse + } + } + + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:dead_friend_spouse + } + might_cheat_on_every_partner_trigger = yes + + scope:dead_friend_spouse = { + is_available_ai_adult = yes + might_cheat_on_every_partner_trigger = yes + NOR = { + has_trait = chaste + has_trait = celibate + has_relation_lover = root + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + } + + + immediate = { + scope:dead_friend_spouse = { + add_character_flag = single_combat_stripped_to_waist + } + add_character_flag = no_sex_stress_loss + } + + on_trigger_fail = { + trigger_event = { + id = bp1_yearly.7030 + days = 100 + } + } + + option = { + name = bp1_yearly.7030.a + had_sex_with_effect = { CHARACTER = scope:dead_friend_spouse PREGNANCY_CHANCE = pregnancy_chance } + + scope:dead_friend_spouse = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + if = { + limit = { + can_set_relation_potential_lover_trigger = { CHARACTER = root } + } + set_relation_potential_lover = root + } + } + + stress_impact = { + lustful = medium_stress_impact_loss + rakish = minor_stress_impact_loss + disloyal = medium_stress_impact_loss + chaste = major_stress_impact_gain + celibate = major_stress_impact_gain + content = medium_stress_impact_gain + loyal = medium_stress_impact_gain + temperate = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = celibate + has_trait = content + has_trait = loyal + } + } + } + } + + option = { + name = bp1_yearly.7030.b + + add_piety = 100 + scope:dead_friend_spouse = { + add_opinion = { + modifier = rejected_opinion + target = root + opinion = -50 + } + } + + stress_impact = { + lustful = major_stress_impact_gain + rakish = major_stress_impact_gain + trusting = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = rakish + has_trait = trusting + has_trait = fickle + } + } + } + } + + after = { + scope:dead_friend_spouse = { + remove_character_flag = single_combat_stripped_to_waist + } + remove_character_flag = no_sex_stress_loss + } +} + +######################################### +# Excreta incident, gain Nemesis # +# By almost everyone in the design team # +######################################### + +bp1_yearly.7100 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.7100.t + desc = bp1_yearly.7100.desc + theme = unfriendly + + left_portrait = { + character = root + animation = disgust + } + + right_portrait = { + character = scope:excrement_agent + animation = laugh + } + + lower_center_portrait = scope:potential_nemesis + + override_background = { reference = bp1_crossroads_inn } + + cooldown = { years = 10 } + + trigger = { + # DLC check. + has_dlc_feature = friends_and_foes + # Standard checks. + is_playable_character = yes + is_available_at_peace_adult = yes + + NOT = { + should_be_naked_trigger = yes + } + + num_of_relation_nemesis <= 0 + + any_relation = { + type = rival + is_available_ai_adult = yes + num_of_relation_nemesis <= 0 + NOT = { + has_trait = forgiving + } + } + + any_pool_character = { + province = root.capital_province + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_pool_character = { + province = root.capital_province + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + } + save_scope_as = excrement_agent + } + random_relation = { + type = rival + limit = { + is_available_ai_adult = yes + num_of_relation_nemesis <= 0 + NOT = { + has_trait = forgiving + } + } + save_scope_as = potential_nemesis + } + random_held_county = { + save_scope_as = owned_county + } + if = { + limit = { + NOT = { exists = scope:owned_county } + } + capital_county = { + save_scope_as = owned_county + } + } + add_character_modifier = { + modifier = drenched_in_excrement_roco_modifier + years = 3 + } + if = { + limit = { + scope:potential_nemesis = { is_married = yes } + } + scope:potential_nemesis = { + random_spouse = { + limit = { + root = { + can_start_scheme = { + type = seduce + target_character = prev + } + } + is_available_ai_adult = yes + } + save_scope_as = nemesis_spouse_target + } + } + } + if = { + limit = { + scope:potential_nemesis = { + any_owned_story = { + type = story_cycle_pet_cat + } + } + } + + scope:potential_nemesis = { + random_owned_story = { + type = story_cycle_pet_cat + save_scope_as = cat_story + } + } + } + if = { + limit = { + has_any_nickname = no + } + random_list = { + 50 = { + give_nickname = nick_the_dunged + } + 50 = { + give_nickname = nick_the_smelly + } + } + } + } + + option = { # Deviant + name = bp1_yearly.7100.e + trait = deviant + trigger = { + is_deviant_trigger = yes + NOT = { # 4 Options max + exists = scope:cat_story + } + } + add_prestige = major_prestige_loss + + if = { + limit = { + scope:potential_nemesis = { + is_deviant_trigger = yes + } + } + progress_towards_lover_effect = { + CHARACTER = scope:potential_nemesis + REASON = lover_covered_excreta + OPINION = default_lover_opinion + } + } + + stress_impact = { + base = major_stress_impact_loss + chaste = major_stress_impact_gain + vengeful = major_stress_impact_gain + arrogant = major_stress_impact_gain + wrathful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = vengeful + has_trait = arrogant + has_trait = wrathful + } + } + } + } + + option = { #Drown, no, drown AND THEN SKIN their pet + name = bp1_yearly.7100.c + trigger = { + exists = scope:cat_story + } + set_relation_nemesis = { reason = nemesis_skinned_cat target = scope:potential_nemesis } + + add_internal_flag = special + + flavor = bp1_yearly.7100.c.tt + + show_as_tooltip = { + remove_cat_story_modifiers_effect = yes + } + + scope:cat_story = { + hidden_effect = { end_story = yes } + } + + scope:potential_nemesis = { + add_character_modifier = { + modifier = skinned_pet_modifier + years = 15 + } + reverse_add_opinion = { + modifier = vengeful_opinion + opinion = -75 + target = root + } + add_trait = depressed_1 + } + + stress_impact = { + just = medium_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + #Now it's _personal_ + option = { + name = bp1_yearly.7100.a + trigger = { + exists = scope:nemesis_spouse_target + can_start_scheme = { + type = seduce + target_character = scope:nemesis_spouse_target + } + } + set_relation_nemesis = { reason = nemesis_excrement target = scope:potential_nemesis } + start_scheme = { + type = seduce + target_character = scope:nemesis_spouse_target + } + custom_tooltip = diplomacy_family.2250.b.tt + hidden_effect = { + random_scheme = { + type = seduce + limit = { + scheme_target_character = scope:nemesis_spouse_target + } + add_scheme_modifier = { + type = extra_success_chance_modifier + } + } + } + add_character_modifier = { + modifier = focused_on_revenge_modifier + years = 25 + } + stress_impact = { + chaste = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = chaste + } + } + } + + option = { # Attempt to have them murdered + name = bp1_yearly.7100.b + set_relation_nemesis = { reason = nemesis_excrement target = scope:potential_nemesis } + if = { + limit = { + can_start_scheme = { + type = murder + target_character = scope:potential_nemesis + } + } + start_scheme = { + type = murder + target_character = scope:potential_nemesis + } + custom_tooltip = diplomacy_family.2250.b.tt + hidden_effect = { + random_scheme = { + type = murder + limit = { + scheme_target_character = scope:potential_nemesis + } + add_scheme_modifier = { + type = extra_success_chance_modifier + } + } + } + } + add_character_modifier = { + modifier = focused_on_revenge_modifier + years = 25 + } + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = forgiving + } + } + } + + option = { #Take it on the cheek + name = bp1_yearly.7100.d + + add_prestige = major_prestige_loss + + scope:potential_nemesis = { + add_stress = massive_stress_impact_loss + } + + stress_impact = { + vengeful = massive_stress_impact_gain + arrogant = massive_stress_impact_gain + wrathful = massive_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = arrogant + has_trait = wrathful + } + } + } + } +} diff --git a/N3OW/events/court_events/01_ep3_court_events_3.txt b/N3OW/events/court_events/01_ep3_court_events_3.txt new file mode 100644 index 00000000..125fd7cb --- /dev/null +++ b/N3OW/events/court_events/01_ep3_court_events_3.txt @@ -0,0 +1,3474 @@ +namespace = court_events + +# High court fashion: foreign rulers admire and envy you as the peak of class and elegance, can you capitalize on this reputation? +court_events.3000 = { + type = court_event + title = court_events.3000.t + desc = court_events.3000.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:chancellor + roles = { + scope:chancellor = { + group = event_group + animation = debating + } + root = { + group = event_group + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + scope:steward = { + group = event_group + animation = personality_content + } + } + } + + trigger = { + exists = cp:councillor_chancellor + exists = cp:councillor_steward + amenity_level = { + target = court_fashion + value >= 4 + } + NOT = { + any_neighboring_top_liege_realm_owner = { + has_royal_court = yes + amenity_level = { + target = court_fashion + value > 4 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + amenity_level = { + target = court_fashion + value = 5 + } + add = 0.5 + } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_chancellor = { + court_event_character_flag_effect = yes + save_scope_as = chancellor + } + cp:councillor_steward = { + court_event_character_flag_effect = yes + save_scope_as = steward + } + } + + # Option A: Increase opinion abroad + option = { + name = court_events.3000.a + add_character_modifier = { + modifier = court_fashion_foreign_modifier + years = 20 + } + stress_impact = { + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = 0.5 + } + } + } + + # Option B: Spread culture + option = { + name = court_events.3000.b + add_character_modifier = { + modifier = court_fashion_culture_modifier + years = 20 + } + stress_impact = { + gregarious = minor_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_boldness = -0.5 + } + } + } + + # Option C: sell fashion + option = { + name = court_events.3000.c + add_character_modifier = { + modifier = court_fashion_sell_modifier + years = 20 + } + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + after = { + clear_court_event_participation = yes + scope:chancellor = { clear_court_event_participation = yes } + scope:steward = { clear_court_event_participation = yes } + } +} + +# Low court food: Someone complains that it's always the same soup every day +court_events.3010 = { + type = court_event + title = court_events.3010.t + desc = court_events.3010.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:courtier + roles = { + scope:courtier = { + group = event_group + animation = beg + } + root = { + group = event_group + animation = thinking + } + } + } + + trigger = { + amenity_level = { + target = court_food_quality + value <= 2 + } + any_courtier_or_guest = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + } + + weight_multiplier = { + base = 1 + modifier = { + amenity_level = { + target = court_food_quality + value <= 1 + } + add = 0.5 + } + modifier = { + any_courtier_or_guest = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + has_trait = gluttonous + } + add = 0.5 + } + modifier = { + any_courtier_or_guest = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + has_trait = comfort_eater + } + add = 0.5 + } + } + + immediate = { + court_event_character_flag_effect = yes + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + } + alternative_limit = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + save_scope_as = courtier + } + scope:courtier = { court_event_character_flag_effect = yes } + } + + # Option A: Hire chefs + option = { + name = court_events.3010.a + trigger = { + NOT = { government_has_flag = government_is_tribal } + } + remove_short_term_gold = minor_gold_value + set_amenity_level = { type = court_food_quality value = 3 } + custom_tooltip = cheaper_food_for_15_years + add_character_flag = { + flag = court_cheaper_food + years = 15 + } + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + humble = medium_stress_impact_gain + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { + has_trait = paranoid + factor = 0 + } + } + } + + # Option B: it's healthy and pious! + option = { + name = court_events.3010.b + add_character_modifier = { + modifier = healthy_and_modest_diet_modifier + years = 15 + } + stress_impact = { + arrogant = medium_stress_impact_gain + gluttonous = major_stress_impact_gain + comfort_eater = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + modifier = { + has_trait = lifestyle_physician + add = 50 + } + modifier = { + has_trait = whole_of_body + add = 50 + } + modifier = { + has_trait = paranoid + factor = 0.5 + } + } + } + # Option C: it's for my safety + option = { + name = court_events.3010.c + flavor = court_events.3010.c.tt + add_character_modifier = { + modifier = cant_poison_soup_modifier + years = 15 + } + stress_impact = { + gregarious = medium_stress_impact_gain + trusting = major_stress_impact_gain + gluttonous = major_stress_impact_gain + comfort_eater = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + } + modifier = { + has_trait = paranoid + add = 200 + } + modifier = { + has_trait = trusting + factor = 0 + } + } + } + after = { + clear_court_event_participation = yes + scope:courtier = { clear_court_event_participation = yes } + } +} + +# Low court lodgings: crappy living conditions increase the spread of sickness, what do you do? +court_events.3020 = { + type = court_event + title = court_events.3020.t + desc = { + desc = court_events.3020.desc + triggered_desc = { + trigger = { + exists = scope:physician + } + desc = court_events.3020.desc_physician + } + triggered_desc = { + trigger = { + exists = scope:architect + } + desc = court_events.3020.desc_architect + } + } + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:courtier + roles = { + scope:courtier = { + group = event_group + animation = beg + } + root = { + group = event_group + animation = thinking + } + scope:physician ?= { + group = event_group + animation = physician + } + } + } + + trigger = { + amenity_level = { + target = court_lodging_standards + value <= 2 + } + any_courtier_or_guest = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + NOR = { + has_court_position = court_physician_court_position + has_court_position = royal_architect_court_position + } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + amenity_level = { + target = court_lodging_standards + value <= 1 + } + } + modifier = { + add = 0.5 + court_position:court_physician_court_position ?= { + aptitude = { + court_position = court_physician_court_position + value >= 3 + } + } + } + modifier = { + add = 1 + capital_province = { + any_province_epidemic = { } + } + } + modifier = { + add = 0.5 + capital_county = { + any_neighboring_county = { + has_province_with_epidemic = { intensity = any } + } + } + } + } + + immediate = { + court_event_character_flag_effect = yes + if = { + limit = { + employs_court_position = court_physician_court_position + court_position:court_physician_court_position = { + is_available_ai_adult = yes + NOT = { has_court_position = royal_architect_court_position } + } + } + court_position:court_physician_court_position = { + save_scope_as = physician + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = royal_architect_court_position + court_position:royal_architect_court_position = { + is_available_ai_adult = yes + NOT = { has_court_position = court_physician_court_position } + } + } + court_position:royal_architect_court_position = { + save_scope_as = architect + court_event_character_flag_effect = yes + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + NOR = { + has_court_position = court_physician_court_position + has_court_position = royal_architect_court_position + } + } + save_scope_as = courtier + court_event_character_flag_effect = yes + } + if = { + limit = { + exists = scope:physician + NOT = { exists = scope:architect } + } + scope:physician = { save_scope_as = expert } + } + if = { + limit = { + exists = scope:architect + NOT = { exists = scope:physician } + } + scope:architect = { save_scope_as = expert } + } + } + + # Option A: improve lodgings and epidemics resistance + option = { + name = court_events.3020.a + trigger = { + NOR = { + government_has_flag = government_is_tribal + employs_court_position = court_physician_court_position + employs_court_position = royal_architect_court_position + } + } + remove_short_term_gold = minor_gold_value + if = { + limit = { + NOT = { government_has_flag = government_is_tribal } + } + set_amenity_level = { type = court_lodging_standards value = 3 } + } + capital_province = { + add_province_modifier = { + modifier = lodgings_epidemics_resistance_modifier + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 1 + } + } + } + + # Option B: physician or architect - improve lodgings and epidemics resistance better + option = { + name = court_events.3020.b + trigger = { + NOT = { government_has_flag = government_is_tribal } + OR = { + employs_court_position = court_physician_court_position + employs_court_position = royal_architect_court_position + } + NAND = { + employs_court_position = court_physician_court_position + employs_court_position = royal_architect_court_position + } + } + remove_short_term_gold = minor_gold_value + if = { + limit = { + NOT = { government_has_flag = government_is_tribal } + } + set_amenity_level = { type = court_lodging_standards value = 3 } + custom_tooltip = cheaper_lodgings_for_15_years + } + capital_province = { + add_province_modifier = { + modifier = lodgings_epidemics_resistance_modifier_1 + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } + + # Option C: physician and architect - improve lodgings and epidemics resistance cheaper and better + option = { + name = court_events.3020.c + trigger = { + employs_court_position = court_physician_court_position + employs_court_position = royal_architect_court_position + } + if = { + limit = { + NOT = { government_has_flag = government_is_tribal } + } + set_amenity_level = { type = court_lodging_standards value = 3 } + custom_tooltip = cheaper_lodgings_for_15_years_1 + } + capital_province = { + add_province_modifier = { + modifier = lodgings_epidemics_resistance_modifier_2 + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } + + # Option D: it's fiiiine + option = { + name = court_events.3020.d + capital_province = { + add_province_modifier = { + modifier = lodgings_epidemics_no_resistance_modifier + years = 15 + } + } + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = -0.5 + } + } + } + after = { + clear_court_event_participation = yes + scope:physician ?= { clear_court_event_participation = yes } + scope:architect ?= { clear_court_event_participation = yes } + scope:courtier = { clear_court_event_participation = yes } + } +} + +# High court lodgings: an inspired character improves their inspiration +court_events.3030 = { + type = court_event + title = court_events.3030.t + desc = court_events.3030.desc + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:inspiration_owner + roles = { + scope:inspiration_owner = { + group = event_group + animation = ecstasy + } + root = { + group = event_group + animation = happiness + } + } + } + + trigger = { + has_royal_court = yes + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + inspiration = { #Since they're away adventuring + NOT = { has_inspiration_type = adventure_inspiration } + } + NOR = { + has_character_flag = fund_weapon_inspiration_event_cooldown + has_character_flag = fund_armor_inspiration_event_cooldown + has_character_flag = fund_book_inspiration_event_cooldown + has_character_flag = fund_weaver_inspiration_event_cooldown + has_character_flag = fund_adventure_inspiration_event_cooldown + has_character_flag = fund_artisan_inspiration_event_cooldown + has_character_flag = fund_smith_inspiration_event_cooldown + has_character_flag = fund_alchemy_inspiration_event_cooldown + has_character_flag = fund_research_inspiration_event_cooldown + has_character_flag = fund_bow_inspiration_event_cooldown + } + } + amenity_level = { + target = court_lodging_standards + value >= 4 + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + amenity_level = { + target = court_lodging_standards + value >= 5 + } + } + } + + immediate = { + court_event_character_flag_effect = yes + scope:inspiration_owner = { + if = { + limit = { + inspiration = { has_inspiration_type = weapon_inspiration } + } + add_character_flag = { + flag = fund_weapon_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = armor_inspiration } + } + add_character_flag = { + flag = fund_armor_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = book_inspiration } + } + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = weaver_inspiration } + } + add_character_flag = { + flag = fund_weaver_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = adventure_inspiration } + } + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = artisan_inspiration } + } + add_character_flag = { + flag = fund_artisan_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = smith_inspiration } + } + add_character_flag = { + flag = fund_smith_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = alchemy_inspiration } + } + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = research_inspiration } + } + add_character_flag = { + flag = fund_research_inspiration_event_cooldown + days = { 30 60 } + } + } + court_event_character_flag_effect = yes + } + } + + # Option A: + option = { + name = court_events.3030.a + trigger = { + has_royal_court = yes + amenity_level = { + target = court_lodging_standards + value < 5 + } + } + set_amenity_level = { type = court_lodging_standards value = 5 } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + inspiration = { change_inspiration_progress = 2 } + } + stress_impact = { + base = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + # Option B: + option = { + name = court_events.3030.b + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + inspiration = { change_inspiration_progress = 1 } + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + after = { + clear_court_event_participation = yes + scope:inspiration_owner = { clear_court_event_participation = yes } + } +} + +# Low court servants: the current war in X has displaced many refugees, so you can hire them at court as higher-level servants for cheaper +court_events.3040 = { + type = court_event + title = court_events.3040.t + desc = court_events.3040.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:steward + roles = { + scope:steward = { + group = event_group + animation = thinking + } + root = { + group = event_group + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + } + } + + trigger = { + exists = cp:councillor_steward + amenity_level = { + target = court_servants + value <= 2 + } + is_at_war = no + any_neighboring_top_liege_realm_owner = { + is_at_war = yes + any_realm_county = { + any_county_province = { + is_occupied = yes + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + amenity_level = { + target = court_servants + value <= 1 + } + add = 1 + } + modifier = { + any_neighboring_top_liege_realm_owner = { + is_at_war = yes + any_realm_border_county = { + any_neighboring_county = { + holder.top_liege = root + } + any_county_province = { + is_occupied = yes + } + } + } + add = 1 + } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + random_neighboring_top_liege_realm_owner = { + limit = { + is_at_war = yes + any_realm_county = { + any_county_province = { + is_occupied = yes + } + } + } + save_scope_as = neighbor + random_realm_county = { + limit = { + any_county_province = { + is_occupied = yes + } + } + random_county_province = { + limit = { + is_occupied = yes + } + save_scope_as = occupied_prov + } + } + } + scope:neighbor.primary_title = { save_scope_as = war_realm } + } + + # Option A: let them in + option = { + name = court_events.3040.a + every_realm_border_county = { + limit = { + any_neighboring_county = { + holder.top_liege = scope:neighbor + } + } + add_county_modifier = { + modifier = court_war_immigration_modifier + years = 15 + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + # Option B: hire them as servants + option = { + name = court_events.3040.b + trigger = { + NOT = { government_has_flag = government_is_tribal } + } + set_amenity_level = { type = court_servants value = 3 } + custom_tooltip = cheaper_servants_for_15_years + add_character_flag = court_cheaper_servants + stress_impact = { + content = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -25 + has_trait = content + } + modifier = { + add = -50 + has_trait = paranoid + } + modifier = { + add = -50 + has_trait = humble + } + } + } + + # Option C: no thanks + option = { + name = court_events.3040.c + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + after = { + clear_court_event_participation = yes + scope:steward = { clear_court_event_participation = yes } + } +} + +# High court food: everyone wants to eat at your court +court_events.3050 = { + type = court_event + title = court_events.3050.t + desc = court_events.3050.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:chancellor + roles = { + scope:chancellor = { + group = event_group + animation = happiness + } + root = { + group = event_group + animation = thinking + } + } + } + + trigger = { + exists = cp:councillor_chancellor + amenity_level = { + target = court_food_quality + value >= 5 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_chancellor = { + court_event_character_flag_effect = yes + save_scope_as = chancellor + } + } + + # Option A: improve domestic affairs + option = { + name = court_events.3050.a + custom_tooltip = court_events.3050.a.tt + add_character_flag = { + flag = food_improves_opinion + years = 15 + } + stress_impact = { + gregarious = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + # Option B: improve your feasts + option = { + name = court_events.3050.b + custom_tooltip = court_events.3050.b.tt + add_character_flag = { + flag = food_improves_feasts + years = 15 + } + stress_impact = { + shy = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:chancellor = { clear_court_event_participation = yes } + } +} + +# High court servants: can't keep track of who is who +court_events.3060 = { + type = court_event + title = court_events.3060.t + desc = court_events.3060.desc + theme = court + cooldown = { years = 15 } + court_scene = { + button_position_character = scope:spymaster + roles = { + scope:spymaster = { + group = event_group + animation = spymaster + } + root = { + group = event_group + animation = scheme + } + } + } + + trigger = { + exists = cp:councillor_spymaster + amenity_level = { + target = court_servants + value >= 5 + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_lifestyle = intrigue_lifestyle + add = 1 + } + modifier = { + has_trait = education_intrigue + add = 1 + } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_spymaster = { + court_event_character_flag_effect = yes + save_scope_as = spymaster + } + } + + # Option A: So much potential + option = { + name = court_events.3060.a + flavor = court_events.3060.a.tt + add_character_modifier = { + modifier = spies_behind_every_corner_modifier + years = 15 + } + stress_impact = { + honest = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + # Option B: Put them to work instead + option = { + name = court_events.3060.b + add_character_modifier = { + modifier = servants_aplenty_cleaning_modifier + years = 15 + } + stress_impact = { + deceitful = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:spymaster = { clear_court_event_participation = yes } + } +} + +# Low court fashion: A foreign ruler that is traveling through your capital complains about your courtiers and yourself looking like commoners +court_events.3070 = { + type = court_event + title = court_events.3070.t + desc = court_events.3070.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:guest + roles = { + scope:guest = { + group = event_group + animation = dismissal + } + root = { + group = event_group + animation = eyeroll + } + } + } + + immediate = { + court_event_character_flag_effect = yes + scope:guest = { court_event_character_flag_effect = yes } + } + + # Option A: Accept advise + option = { + name = court_events.3070.a + trigger = { + NOT = { government_has_flag = government_is_tribal } + } + remove_short_term_gold = minor_gold_value + set_amenity_level = { type = court_fashion value = 3 } + custom_tooltip = cheaper_fashion_for_15_years + add_character_flag = { + flag = court_cheaper_fashion + years = 15 + } + stress_impact = { + arrogant = major_stress_impact_gain + greedy = medium_stress_impact_gain + humble = medium_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + } + } + + # Option B: Embrace humility + option = { + name = court_events.3070.b + add_character_modifier = { + modifier = humble_appearance_modifier + years = 15 + } + stress_impact = { + arrogant = medium_stress_impact_gain + eccentric = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + #Option C: how dare you?? + option = { + name = court_events.3070.c + if = { + limit = { + NOT = { + amenity_level = { + target = court_fashion + value = 2 + } + } + } + set_amenity_level = { type = court_fashion value = 2 } + } + custom_tooltip = free_fashion_for_15_years + add_character_flag = { + flag = court_free_fashion + years = 15 + } + stress_impact = { + humble = major_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + after = { + clear_court_event_participation = yes + scope:guest = { clear_court_event_participation = yes } + } +} + +# Event triggered by the traveler +court_events.3071 = { + type = character_event + hidden = yes + + trigger = { + is_landed = yes + is_ai = yes + is_adult = yes + is_location_valid_for_travel_event_on_land = yes + OR = { + has_royal_court = yes + top_liege ?= { has_royal_court = yes } + } + location.county.holder.top_liege.capital_province = root.location + location.county.holder.top_liege = { + has_royal_court = yes + is_adult = yes + amenity_level = { + target = court_fashion + value <= 2 + } + } + trigger_if = { + limit = { + has_royal_court = yes + } + amenity_level = { + target = court_fashion + value > 2 + } + } + trigger_else_if = { + limit = { + top_liege ?= { has_royal_court = yes } + } + top_liege = { + amenity_level = { + target = court_fashion + value > 2 + } + } + } + trigger_else = { + always = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + location.county.holder.top_liege = { + amenity_level = { + target = court_fashion + value <= 1 + } + } + add = 0.5 + } + modifier = { + has_royal_court = yes + add = 0.5 + } + modifier = { + top_liege ?= { + amenity_level = { + target = court_fashion + value > 3 + } + } + add = 0.5 + } + modifier = { + top_liege ?= { + amenity_level = { + target = court_fashion + value > 4 + } + } + add = 0.5 + } + } + + immediate = { + root = { save_scope_as = guest } + location.county.holder.top_liege = { + trigger_event = { + id = court_events.3070 + days = 1 + } + } + } +} + +# Diplo court: A famous poet comes to your court offering their services +scripted_trigger 3080_valid_poet_trigger = { + is_available_ai_adult = yes + OR = { + has_trait = lifestyle_poet + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value >= 80 + } + } + diplomacy >= 18 + } +} + +court_events.3080 = { + type = court_event + title = court_events.3080.t + desc = court_events.3080.desc + theme = court + cooldown = { years = 30 } + court_scene = { + button_position_character = scope:poet + roles = { + scope:poet = { + group = event_group + animation = obsequious_bow + } + root = { + group = event_group + animation = thinking + } + } + } + + trigger = { + has_court_type = court_diplomatic + NOT = { employs_court_position = court_poet_court_position } + can_employ_court_position_type = court_poet_court_position + court_grandeur_current_level > court_grandeur_minimum_expected_level + } + + weight_multiplier = { + base = 1 + modifier = { + court_grandeur_current_level >= 2_levels_above_expected_level + add = 0.5 + } + modifier = { + court_grandeur_current_level >= 3_levels_above_expected_level + add = 0.5 + } + modifier = { + court_grandeur_current_level >= 4_levels_above_expected_level + add = 0.5 + } + modifier = { + court_grandeur_current_level >= 5_levels_above_expected_level + add = 0.5 + } + modifier = { + court_grandeur_current_level >= 6_levels_above_expected_level + add = 0.5 + } + } + + immediate = { + court_event_character_flag_effect = yes + random_pool_character = { + province = root.location + limit = { + 3080_valid_poet_trigger = yes + } + save_scope_as = poet + } + if = { + limit = { + NOT = { exists = scope:poet } + } + location.county = { + random_neighboring_county = { + culture = { + save_scope_as = poet_culture + } + } + } + create_character = { + location = root.location + template = ep3_poet_toned_down_template + culture = scope:poet_culture + save_scope_as = poet + } + } + hidden_effect = { + scope:poet = { + court_event_character_flag_effect = yes + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + if = { + limit = { + NOT = { has_trait = eccentric } + } + add_trait = eccentric + } + } + add_courtier = scope:poet + } + } + + # Option A: hire for speeches + option = { + name = court_events.3080.a + court_position_grant_effect = { + POS = court_poet + CANDIDATE = scope:poet + EMPLOYER = root + } + add_character_modifier = { + modifier = ghost_writer_at_court_modifier + years = 20 + } + stress_impact = { + humble = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + # Option B: hire for diplo schemes + option = { + name = court_events.3080.b + court_position_grant_effect = { + POS = court_poet + CANDIDATE = scope:poet + EMPLOYER = root + } + add_character_modifier = { + modifier = poet_for_diplo_schemes_modifier + years = 20 + } + stress_impact = { + honest = medium_stress_impact_gain + content = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + has_trait = deceitful + add = 50 + } + } + } + + # Option C: hire for seduction + option = { + name = court_events.3080.c + court_position_grant_effect = { + POS = court_poet + CANDIDATE = scope:poet + EMPLOYER = root + } + add_character_modifier = { + modifier = poet_for_seduction_schemes_modifier + years = 20 + } + stress_impact = { + chaste = major_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = -0.5 + } + modifier = { + has_trait = lustful + factor = 2 + } + modifier = { + has_trait = rakish + factor = 3 + } + modifier = { + has_trait = chaste + factor = 0 + } + } + } + + # Option D: no thanks + option = { + name = court_events.3080.d + scope:poet = { select_and_move_to_pool_effect = yes } + stress_impact = { + lifestyle_poet = massive_stress_impact_gain + generous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:poet = { + clear_court_event_participation = yes + if = { + limit = { + NOT = { has_court_position = court_poet_court_position } + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } +} + +# Martial court: One of your young children dreams of being a great warrior and wants you to teach them to ride a horse +scripted_trigger 3090_valid_child_trigger = { + is_available_ai_child = yes + age >= 6 + age <= 12 + NOR = { + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + has_trait = craven + has_trait = shy + has_trait = lazy + has_trait = content + } + OR = { + has_trait = rowdy + has_trait = bossy + } + location = root.location + is_landed = no +} + +court_events.3090 = { + type = court_event + title = court_events.3090.t + desc = court_events.3090.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:child + roles = { + scope:child = { + group = event_group + animation = beg + } + root = { + group = event_group + animation = thinking + } + } + } + + trigger = { + has_court_type = court_warlike + any_child = { + 3090_valid_child_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_child = { + 3090_valid_child_trigger = yes + is_heir_of = root + } + add = 1 + } + modifier = { + any_child = { + 3090_valid_child_trigger = yes + has_trait = ambitious + } + add = 0.5 + } + modifier = { + any_child = { + 3090_valid_child_trigger = yes + has_trait = brave + } + add = 0.5 + } + modifier = { + any_child = { + 3090_valid_child_trigger = yes + has_focus = education_martial + } + add = 0.5 + } + + modifier = { + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + add = 1 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + add = 1 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value > 0 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value < 50 + } + add = 0.5 + } + modifier = { + has_trait = family_first + add = 1 + } + modifier = { + has_trait = callous + factor = 0 + } + modifier = { + has_trait = sadistic + factor = 0 + } + } + + immediate = { + random_child = { + limit = { + 3090_valid_child_trigger = yes + } + weight = { + base = 1 + modifier = { + is_heir_of = root + add = 50 + } + modifier = { + has_trait = ambitious + add = 15 + } + modifier = { + has_trait = brave + add = 15 + } + modifier = { + has_focus = education_martial + add = 15 + } + } + save_scope_as = child + court_event_character_flag_effect = yes + } + court_event_character_flag_effect = yes + } + + # Option A: teach + option = { + name = court_events.3090.a + scope:child = { + if = { + limit = { + has_focus = education_martial + } + education_point_acquisition_additional_points_effect = { LEVEL = low } + } + add_prowess_skill = 1 + add_character_modifier = { + modifier = court_confident_rider_modifier + years = 50 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + stress_impact = { + lazy = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 0.5 + } + modifier = { + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 50 + } + add = 100 + } + } + } + + # Option B: when you grow up + option = { + name = court_events.3090.b + flavor = court_events.3090.b.tt + custom_tooltip = court_events.3090.b.tt_effect + scope:child = { + add_stewardship_skill = 1 + set_variable = { + name = promised_me_a_pony + value = root + } + if = { + limit = { + NOT = { + has_focus = education_martial + } + } + education_point_acquisition_additional_points_effect = { LEVEL = low } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + stress_impact = { + impatient = medium_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + has_trait = impatient + add = -50 + } + } + } + + # Option C: no + option = { + name = court_events.3090.c + scope:child = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + stress_impact = { + brave = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -1 + } + modifier = { + has_trait = brave + add = -25 + } + } + } + after = { + clear_court_event_participation = yes + scope:child = { clear_court_event_participation = yes } + } +} + +court_events.3091 = { + type = character_event + title = court_events.3090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:parent = { is_alive = no } + } + desc = court_events.3091.desc_no_parent + } + desc = court_events.3091.desc + } + } + theme = family + override_background = { reference = garden } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:parent = { is_alive = yes } + } + animation = jockey_victory + } + animation = jockey_walk + camera = camera_event_horse_right + } + right_portrait = { + character = scope:parent + triggered_animation = { + trigger = { + scope:parent = { is_alive = yes } + } + animation = admiration + } + animation = dead + } + + trigger = { + has_variable = promised_me_a_pony + } + + immediate = { + var:promised_me_a_pony = { save_scope_as = parent } + root = { save_scope_as = child } + scope:parent = { + if = { + limit = { + is_alive = yes + } + trigger_event = court_events.3092 + } + } + create_story = story_cycle_martial_lifestyle_warhorse + } + + option = { + name = court_events.3091.a + } +} + +court_events.3092 = { + type = character_event + title = court_events.3090.t + desc = court_events.3092.desc + theme = family + override_background = { reference = garden } + + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:child + animation = jockey_victory + camera = camera_event_horse_right + } + + immediate = { + show_as_tooltip = { + scope:child = { + create_story = story_cycle_martial_lifestyle_warhorse + } + } + } + + option = { + name = court_events.3092.a + scope:child = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + } +} + +# Boost to learning your court language if you don't know it +court_events.3100 = { + type = court_event + title = court_events.3100.t + desc = court_events.3100.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:chancellor + roles = { + scope:chancellor = { + group = event_group + animation = chancellor + } + root = { + group = event_group + animation = personality_cynical + } + } + } + + trigger = { + NOT = { knows_court_language_of = root } + has_royal_court = yes + OR = { + any_courtier = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + cp:councillor_chancellor ?= { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + } + is_available_healthy_adult = yes + NOT = { + any_scheme = { type = learn_language } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_courtier = { + has_character_flag = court_linguist_flag + root = { + has_court_language_of_culture = prev.culture + } + } + add = 1 + } + modifier = { + add = { + value = { + every_close_family_member = { + limit = { + NOT = { knows_court_language_of = root } + } + add = 1 + } + } + } + } + } + + immediate = { + random_courtier = { + limit = { + has_character_flag = court_linguist_flag + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + save_scope_as = chancellor + } + if = { + limit = { + NOT = { exists = scope:chancellor } + cp:councillor_chancellor ?= { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + } + cp:councillor_chancellor = { save_scope_as = chancellor } + } + else = { + random_courtier = { + limit = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + is_available_ai_adult = yes + } + weight = { + base = 1 + modifier = { + has_court_position = court_tutor_court_position + add = 20 + } + modifier = { + is_close_family_of = root + add = 10 + } + modifier = { + has_trait = scholar + add = 10 + } + modifier = { + has_trait = loyal + add = 5 + } + modifier = { + has_trait = diligent + add = 5 + } + modifier = { + has_trait = gregarious + add = 5 + } + } + save_scope_as = chancellor + } + } + scope:chancellor = { court_event_character_flag_effect = yes } + if = { + limit = { + employs_court_position = court_tutor_court_position + court_position:court_tutor_court_position = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + } + } + court_position:court_tutor_court_position = { save_scope_as = linguist } + } + else_if = { + limit = { + any_courtier = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + } + } + random_courtier = { + limit = { + knows_court_language_of = root + root = { + has_court_language_of_culture = prev.culture + } + } + save_scope_as = linguist + } + } + court_event_character_flag_effect = yes + } + + # Option A: start studying + option = { + name = court_events.3100.a + custom_tooltip = { + text = court_events.3100.a.tt + start_scheme = { + type = learn_language + target_character = scope:chancellor + } + random_scheme = { + type = learn_language + add_scheme_modifier = { type = pressured_to_learn_court_language_modifier } + } + } + start_scheme = { + type = learn_language + target_character = scope:chancellor + } + random_scheme = { + type = learn_language + add_scheme_modifier = { type = pressured_to_learn_court_language_modifier } + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = 25 + } + modifier = { + has_trait = diligent + add = 25 + } + } + } + + # Option B: has linguist/tutor - teach the whole family/faster + option = { + name = court_events.3100.b + trigger = { + exists = scope:linguist + } + start_scheme = { + type = learn_language + target_character = scope:linguist + } + random_scheme = { + type = learn_language + add_scheme_modifier = { type = linguist_help_for_court_language_modifier } + } + every_close_family_member = { + limit = { + NOT = { knows_court_language_of = root } + location = root.location + is_adult = yes + is_ai = yes + } + start_scheme = { + type = learn_language + target_character = scope:linguist + } + random_scheme = { + type = learn_language + add_scheme_modifier = { type = linguist_help_for_court_language_modifier } + } + } + every_close_family_member = { + limit = { + NOT = { knows_court_language_of = root } + location = root.location + is_adult = no + is_ai = yes + } + learn_court_language_of = root + } + stress_impact = { + arrogant = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 250 + } + } + + # Option C: it's not the time for this + option = { + name = court_events.3100.c + add_prestige = medium_prestige_gain + stress_impact = { + humble = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = diligent + add = -25 + } + } + } + + after = { + clear_court_event_participation = yes + scope:chancellor = { clear_court_event_participation = yes } + } +} + +# Stewardship court: a vassal's construction program is challenging you +scripted_trigger court_3110_valid_vassal_trigger = { + is_landed = yes + is_available_ai_adult = yes + capital_county.title_province = { + OR = { + combined_building_level > root.capital_county.title_province.combined_building_level + num_buildings > root.capital_county.title_province.num_buildings + } + has_ongoing_construction = yes + } + OR = { + has_trait = arrogant + has_trait = architect + has_trait = honest + has_trait = gregarious + has_trait = disloyal + has_focus = stewardship_domain_focus + } + highest_held_title_tier >= tier_county +} + +court_events.3110 = { + type = court_event + title = court_events.3110.t + desc = court_events.3110.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:steward + roles = { + scope:steward = { + group = event_group + animation = worry + } + root = { + group = event_group + animation = disapproval + } + } + } + + trigger = { + has_royal_court = yes + has_court_type = court_administrative + OR = { + has_focus = stewardship_wealth_focus + has_focus = stewardship_domain_focus + has_focus = stewardship_duty_focus + } + any_vassal = { + court_3110_valid_vassal_trigger = yes + } + exists = cp:councillor_steward + NOT = { has_character_flag = had_court_events_3115 } + } + + weight_multiplier = { + base = 1 + modifier = { + has_focus = stewardship_domain_focus + add = 0.5 + } + modifier = { + capital_county.title_province = { + has_ongoing_construction = yes + } + add = 1 + } + modifier = { + employs_court_position = royal_architect_court_position + add = 1 + } + } + + immediate = { + add_character_flag = { + flag = had_court_events_3110 + years = 25 + } + court_event_character_flag_effect = yes + random_vassal = { + limit = { + court_3110_valid_vassal_trigger = yes + } + save_scope_as = vassal + } + if = { + limit = { + employs_court_position = royal_architect_court_position + } + court_position:royal_architect_court_position = { + save_scope_as = steward + save_scope_as = architect + } + } + else = { + cp:councillor_steward = { + save_scope_as = steward + } + } + scope:steward = { court_event_character_flag_effect = yes } + } + + # Option A: Build MORE! + option = { + name = court_events.3110.a + if = { + limit = { + exists = scope:architect + } + custom_tooltip = court_events.3110.architect + capital_county = { + add_county_modifier = { + modifier = architect_building_program_county_modifier + years = 20 + } + } + } + else = { + duel = { + skill = stewardship + value = average_skill_rating + 50 = { + desc = court_events.3110.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + has_trait = architect + add = 50 + } + modifier = { + has_trait = diligent + add = 10 + } + modifier = { + has_trait = ambitious + add = 10 + } + send_interface_toast = { + type = event_toast_effect_good + title = court_events.3110.a.success.tt + left_icon = root + capital_county = { + add_county_modifier = { + modifier = building_program_county_modifier + years = 20 + } + } + } + } + 50 = { + desc = court_events.3110.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + modifier = { + has_trait = greedy + add = 20 + } + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + has_trait = humble + add = 10 + } + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.3110.a.failure.tt + left_icon = root + add_prestige = medium_prestige_loss + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + } + } + } + stress_impact = { + greedy = major_stress_impact_gain + humble = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + } + modifier = { + has_trait = humble + add = -50 + } + modifier = { + has_trait = lazy + add = -25 + } + modifier = { + has_trait = architect + add = 100 + } + } + } + + # Option B: Tax MORE! + option = { + name = court_events.3110.b + flavor = court_events.3110.b.tt + duel = { + skill = diplomacy + target = scope:vassal + 50 = { + desc = court_events.3110.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = court_events.3110.b.success.tt + left_icon = scope:vassal + scope:vassal = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + if = { + limit = { + government_allows = administrative + } + scope:vassal = { + change_influence = medium_influence_loss + } + change_influence = medium_influence_gain + } + else = { + scope:vassal = { + add_prestige = medium_prestige_loss + } + add_prestige = medium_prestige_gain + } + } + } + 50 = { + desc = court_events.3110.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.3110.b.failure.tt + left_icon = scope:vassal + if = { + limit = { + government_allows = administrative + } + scope:vassal = { + change_influence = medium_influence_gain + } + change_influence = medium_influence_loss + } + else = { + scope:vassal = { + add_prestige = medium_prestige_gain + } + add_prestige = medium_prestige_loss + } + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + architect = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + } + modifier = { + has_trait = zealous + add = -25 + } + } + } + + # Option C: I don't care + option = { + name = court_events.3110.c + add_prestige = miniscule_prestige_loss + stress_impact = { + ambitious = major_stress_impact_gain + arrogant = medium_stress_impact_gain + architect = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + modifier = { + has_trait = ambitious + add = -75 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + after = { + clear_court_event_participation = yes + scope:steward = { clear_court_event_participation = yes } + } +} + +# Admin court version: a vassal's construction program intheir estate is challenging you +scripted_trigger court_3115_valid_vassal_trigger = { + government_allows = administrative + this = house.house_head + domicile ?= { + is_domicile_type = estate + num_domicile_buildings > root.domicile.num_domicile_buildings + external_domicile_building_slots >= root.domicile.external_domicile_building_slots + free_external_domicile_building_slots < root.domicile.free_external_domicile_building_slots + } + is_available_ai_adult = yes + OR = { + has_trait = arrogant + has_trait = architect + has_trait = honest + has_trait = gregarious + has_trait = disloyal + has_focus = stewardship_domain_focus + has_trait_xp = { + trait = governor + value >= 60 + } + } +} + +court_events.3115 = { + type = court_event + title = court_events.3110.t + desc = court_events.3115.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:relative + roles = { + scope:relative = { + group = event_group + animation = worry + } + root = { + group = event_group + animation = disapproval + } + } + } + + trigger = { + has_royal_court = yes + government_allows = administrative + this = house.house_head + domicile ?= { is_domicile_type = estate } + OR = { + has_focus = stewardship_wealth_focus + has_focus = stewardship_domain_focus + has_focus = stewardship_duty_focus + } + any_vassal = { + court_3110_valid_vassal_trigger = yes + } + any_courtier_or_guest = { + house = root.house + location = root.location + is_available_ai_adult = yes + } + NOT = { has_character_flag = had_court_events_3110 } + } + + weight_multiplier = { + base = 1 + modifier = { + has_focus = stewardship_domain_focus + add = 0.5 + } + modifier = { + any_vassal = { + court_3110_valid_vassal_trigger = yes + house = { is_dominant_family = yes } + } + add = 1 + } + modifier = { + any_vassal = { + court_3110_valid_vassal_trigger = yes + house = { is_powerful_family = yes } + } + add = 0.5 + } + modifier = { + house = { + is_powerful_family = no + } + add = 0.5 + } + } + + immediate = { + add_character_flag = { + flag = had_court_events_3115 + years = 25 + } + court_event_character_flag_effect = yes + random_vassal = { + limit = { + court_3110_valid_vassal_trigger = yes + } + save_scope_as = vassal + } + + random_courtier_or_guest = { + limit = { + house = root.house + location = root.location + is_available_ai_adult = yes + } + save_scope_as = relative + } + scope:relative = { court_event_character_flag_effect = yes } + } + + # Option A: Build MORE! + option = { + name = court_events.3110.a + duel = { + skill = stewardship + value = average_skill_rating + 50 = { + desc = court_events.3110.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + has_trait = architect + add = 50 + } + modifier = { + has_trait = diligent + add = 10 + } + modifier = { + has_trait = ambitious + add = 10 + } + send_interface_toast = { + type = event_toast_effect_good + title = court_events.3110.a.success.tt + left_icon = root + add_character_modifier = { + modifier = estate_building_program_modifier + years = 20 + } + } + } + 50 = { + desc = court_events.3110.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + modifier = { + has_trait = greedy + add = 20 + } + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + has_trait = humble + add = 10 + } + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.3110.a.failure.tt + left_icon = root + change_influence = medium_influence_loss + } + } + } + stress_impact = { + greedy = major_stress_impact_gain + humble = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + } + modifier = { + has_trait = humble + add = -50 + } + modifier = { + has_trait = lazy + add = -25 + } + modifier = { + has_trait = architect + add = 100 + } + } + } + + # Option B: Tax MORE! + option = { + name = court_events.3110.b + flavor = court_events.3110.b.tt + duel = { + skill = diplomacy + target = scope:vassal + 50 = { + desc = court_events.3110.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + type = event_toast_effect_good + title = court_events.3110.b.success.tt + left_icon = scope:vassal + scope:vassal = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + scope:vassal = { + change_influence = major_influence_loss + } + change_influence = major_influence_gain + } + } + 50 = { + desc = court_events.3110.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.3110.b.failure.tt + left_icon = scope:vassal + scope:vassal = { + change_influence = medium_influence_gain + } + change_influence = medium_influence_loss + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + architect = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + } + } + } + + # Option C: I don't care + option = { + name = court_events.3110.c + change_influence = miniscule_influence_loss + stress_impact = { + ambitious = major_stress_impact_gain + arrogant = medium_stress_impact_gain + architect = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + modifier = { + has_trait = ambitious + add = -75 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + after = { + clear_court_event_participation = yes + scope:steward = { clear_court_event_participation = yes } + } +} + +# An inspired person is cringing at your crappy common artifact +scripted_trigger 3120_valid_artifact_to_improve_trigger = { + NOR = { + has_variable = banner_house + has_variable = banner_dynasty + rarity = illustrious + rarity = famed + } +} + +scripted_trigger 3120_smithsy_artifact_trigger = { + OR = { + artifact_type = necklace_pedestal + artifact_type = brooch + artifact_type = brooch_pedestal + artifact_type = necklace + artifact_type = helmet + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_type = regalia + artifact_type = goblet + artifact_type = wall_shield + } +} + +scripted_trigger 3120_artisan_artifact_trigger = { + OR = { + artifact_type = sculpture + artifact_type = box + artifact_type = chest + artifact_type = cabinet + artifact_type = throne + } +} + +court_events.3120 = { + type = court_event + title = court_events.3120.t + desc = court_events.3120.desc + theme = court + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:inspired + roles = { + scope:inspired = { + group = event_group + animation = disgust + } + root = { + group = event_group + animation = worry + } + } + } + + trigger = { + has_royal_court = yes + 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 + } + } + } + AND = { + has_completed_inspiration = yes + var:created_artifact_type ?= { + NOR = { + this = flag:adventure + this = flag:alchemy + this = flag:book + } + } + } + } + trigger_if = { + limit = { + OR = { + inspiration ?= { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + has_inspiration_type = smith_inspiration + } + } + var:created_artifact_type ?= { + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + } + } + } + } + root = { + any_character_artifact = { + 3120_valid_artifact_to_improve_trigger = yes + 3120_smithsy_artifact_trigger = yes + } + } + } + trigger_else_if = { + limit = { + OR = { + inspiration ?= { has_inspiration_type = weaver_inspiration } + var:created_artifact_type ?= { this = flag:weaver } + } + } + root = { + any_character_artifact = { + 3120_valid_artifact_to_improve_trigger = yes + artifact_type = tapestry + } + } + } + trigger_else_if = { + limit = { + OR = { + inspiration ?= { has_inspiration_type = artisan_inspiration } + var:created_artifact_type ?= { this = flag:artisan } + } + } + root = { + any_character_artifact = { + 3120_valid_artifact_to_improve_trigger = yes + 3120_artisan_artifact_trigger = yes + } + } + } + trigger_else = { + always = no + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_courtier_or_guest = { + has_court_position = court_artificer_court_position + } + add = 1 + } + } + + immediate = { + court_event_character_flag_effect = yes + random_courtier = { + 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 + } + } + } + AND = { + has_completed_inspiration = yes + var:created_artifact_type ?= { + NOR = { + this = flag:adventure + this = flag:alchemy + this = flag:book + } + } + } + } + } + weight = { + base = 1 + modifier = { + has_court_position = court_artificer_court_position + add = 100 + } + } + save_scope_as = inspired + } + if = { + limit = { + scope:inspired = { + OR = { + inspiration ?= { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + has_inspiration_type = smith_inspiration + } + } + var:created_artifact_type ?= { + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + } + } + } + } + } + random_character_artifact = { + limit = { + 3120_valid_artifact_to_improve_trigger = yes + 3120_smithsy_artifact_trigger = yes + } + weight = { + base = 1 + modifier = { + rarity = common + add = 20 + } + } + save_scope_as = artifact + } + } + else_if = { + limit = { + scope:inspired = { + OR = { + inspiration ?= { has_inspiration_type = weaver_inspiration } + var:created_artifact_type ?= { this = flag:weaver } + } + } + } + random_character_artifact = { + limit = { + 3120_valid_artifact_to_improve_trigger = yes + artifact_type = tapestry + } + weight = { + base = 1 + modifier = { + rarity = common + add = 20 + } + } + save_scope_as = artifact + } + } + else = { + random_character_artifact = { + limit = { + 3120_valid_artifact_to_improve_trigger = yes + 3120_artisan_artifact_trigger = yes + } + weight = { + base = 1 + modifier = { + rarity = common + add = 20 + } + } + save_scope_as = artifact + } + } + scope:inspired = { court_event_character_flag_effect = yes } + } + + # Option A: do it + option = { + name = court_events.3120.a + pay_short_term_gold = { + target = scope:inspired + gold = minor_gold_value + } + scope:artifact = { + custom_tooltip = court_events.3120.a.tt + hidden_effect = { + random_list = { + pick = 2 + unique = yes + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_monthly_minor_prestige_6_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_monthly_prestige_6_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_short_reign_duration_mult_4_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_court_grandeur_baseline_add_4_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_dynasty_opinion_5_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_monthly_prestige_add_5_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_vassal_limit_1_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_courtier_and_guest_opinion_5_modifier } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + hidden_effect = { + scope:artifact = { add_artifact_modifier = artifact_domain_tax_mult_2_modifier } + } + } + } + } + 20 = { + trigger = { + artifact_durability < define:NInventory|ARTIFACT_LOW_DURABILITY + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + scope:artifact = { + add_durability = { + value = { + value = scope:artifact.artifact_max_durability + subtract = scope:artifact.artifact_durability + } + } + } + } + } + } + 20 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + scope:artifact = { + set_max_durability = { + value = { + value = scope:artifact.artifact_max_durability + add = { + value = scope:artifact.artifact_max_durability + divide = 100 + multiply = 20 + } + } + } + } + } + } + } + 10 = { + root = { + send_interface_toast = { + type = event_toast_effect_good + title = artifact_improved_tt + left_icon = scope:artifact + scope:artifact = { + set_max_durability = { + value = { + value = scope:artifact.artifact_max_durability + add = { + value = scope:artifact.artifact_max_durability + divide = 100 + multiply = 35 + } + } + } + } + } + } + } + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + gold <= minor_gold_value + factor = 0 + } + } + } + + # Option B: think about your own stuff + option = { + name = court_events.3120.b + trigger = { exists = scope:inspired.inspiration } + scope:inspired = { + if = { + limit = { + NOT = { inspiration.inspiration_sponsor = root } + } + root = { sponsor_inspiration = scope:inspired.inspiration } + } + change_artifact_quality_effect = { AMOUNT = 5 } + inspiration = { change_inspiration_progress = 2 } + } + stress_impact = { + compassionate = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -0.5 + } + } + } + + # Option C: show me you can still do better + option = { + name = court_events.3120.c + trigger = { + scope:inspired = { + has_completed_inspiration = yes + NOT = { exists = inspiration } + } + } + scope:inspired = { + if = { + limit = { + var:created_artifact_type ?= { + OR = { + this = flag:weapon + this = flag:armor + this = flag:smith + } + } + } + random_list = { + 30 = { + create_inspiration = { type = weapon_inspiration } + custom_tooltip = gains_weapon_inspiration_tt + } + 30 = { + create_inspiration = { type = armor_inspiration } + custom_tooltip = gains_armor_inspiration_tt + } + 30 = { + create_inspiration = { type = smith_inspiration } + custom_tooltip = gains_smith_inspiration_tt + } + } + } + else_if = { + limit = { + var:created_artifact_type ?= { + this = flag:weaver + } + } + create_inspiration = { type = weaver_inspiration } + custom_tooltip = gains_weaver_inspiration_tt + } + else = { + create_inspiration = { type = artisan_inspiration } + custom_tooltip = gains_artisan_inspiration_tt + } + } + stress_impact = { + shy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + } + modifier = { + has_trait = shy + add = -25 + } + modifier = { + has_trait = callous + add = -25 + } + } + } + + # Option D: nevermind + option = { + name = court_events.3120.d + add_prestige = miniscule_prestige_loss + stress_impact = { + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -1 + } + modifier = { + has_trait = ambitious + add = -50 + } + modifier = { + has_trait = arrogant + add = -50 + } + modifier = { + has_trait = generous + add = -50 + } + } + } + after = { + clear_court_event_participation = yes + scope:inspired = { clear_court_event_participation = yes } + } +} diff --git a/N3OW/events/court_events/court_events_general.txt b/N3OW/events/court_events/court_events_general.txt new file mode 100644 index 00000000..43a4a128 --- /dev/null +++ b/N3OW/events/court_events/court_events_general.txt @@ -0,0 +1,14384 @@ +namespace = court + +################################################## +# # RANGES +# 0001 - 0099 Misc Events +# 0100 - 0999 James +# 2001 - 2999 Ewan +# 3000 - 4000 Bianca +# 4001 - 5000 Isabella +# 5001 - 5999 Linnea +# 6000 - 6999 Claudia +# 7000 - 8000 George +# 8001 - 8999 Joe +# 9000 - 9999 Oltner +# +################################################## + + + +################################################## +# Example + +################################################## +# 0001 - 0010 Example Event +################################################## + +################################################## +# Example Event +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# Example court event for studying. +#court.0001 = { +# # Court-type events only appear in the Royal Court view, and are optional to interact with. +# type = court_event +# # Desc and theming rules are as normal, but since there's no background, there's no need for background overrides. +# title = court.0001.t +# desc = court.0001.desc +# theme = court +# # Main portraits are unnecessary: we define this stuff via the court_scene block instead. +# # Secondary portraits may be used as usual. +# lower_left_portrait = scope:character_c +# +# # Court events should be fired from one of their on_actions, but since this is an example, it's left orphaned. +# orphan = yes +# +# # Here, we define how the event appears inside the court view. +# ## This block exists in the root scope, so you can just define anyone you'd normally have access to/set up in the immediate block here. +# court_scene = { +# # Define which character will have the button for starting the event appear over the top of 'em. +# button_position_character = scope:character_a +# # Roles defined in \ck3\game\gfx\court_scene\character_roles\, if you want to change them or add new ones. +# roles = { +# # First, we take each scoped relevant scoped character. +# scope:character_a = { +# # Then we define their role, where they're positioned in the scene. The first character defines always takes the first slot and so on. Slot 1 and 2 look at each other. Slot 3 is beside Slot 2 and facing Slot 1 as well. +# group = event_group +# # Next, we select their animation override (if applicable: you can leave it to the generic default/role default if defined, though generally you'll want to define this). +# +# # This can be a scripted animation block for animation selection based on triggers +# # scripted_animation = { +# # triggered_animation = { +# # trigger = { +# # scope:ruler = { +# # is_female = no +# # } +# # } +# # +# # both syntaxes are supported +# # animation = { rage anger sadness } # randomly chooses one of these animations +# # animation = sadness # selects just one animation +# # You can set a default animation if all triggers fail. Convention is to always have some always-valid trigger and not use this field if using triggered animations. +# animation = anger +# } +# scope:character_b = { +# group = event_group +# animation = rage +# } +# # Characters who are not physically present are referred to only via copy links or lower portraits, so we don't bother putting them here. +# } +# } +# +# weight_multiplier = { +# base = 1 +# +# # Court weightings: plug in a court type that should see this event more often. +# ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } +# } +# +# immediate = { +# # As with portraits, we do our general character setup stuff in this event. +# random_courtier_or_guest = { save_scope_as = character_a } +# random_courtier_or_guest = { +# limit = { +# this != scope:character_a +# } +# save_scope_as = character_b +# } +# } +# +# # Court events, as with all events, require at least one option to display. +# option = { +# name = court.0001.a +# } +#} + + + +################################################## +# James + +################################################## +# 0107 Court tutor reading a boring book to your ward +# 0108 Copyright-friendly foreign Prince/Princess arrives in your court +# 0109 Executioner multiclasses to physician +# 0111 Intervention for your sex addiction +# 0112 Executioner tries their hand at interior decoration +################################################## + +##################################### +# Boring book # +# by James Beaumont # +# 0107 # +##################################### + +# Tutor reads a boring book to a ward +court.0107 = { + type = court_event + title = court.0107.t + desc = court.0107.desc + + theme = court + court_scene = { + button_position_character = scope:tutor + roles = { + scope:tutor = { + group = event_group + animation = anger + } + scope:unruly_child = { + group = event_group + animation = boredom + } + } + } + + cooldown = { years = 5 } + + trigger = { + employs_court_position = court_tutor_court_position + is_available_adult = yes + court_position:court_tutor_court_position = { + is_available_ai_adult = yes + has_court_event_flag = no + } + any_child = { + is_available_child = yes + age >= 6 + has_court_event_flag = no + } + } + + # More likely to trigger if the tutor likes writing things + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + court_position:court_tutor_court_position = { has_trait = journaller } + } + modifier = { + add = 0.5 + court_position:court_tutor_court_position = { + OR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + } + modifier = { + add = -0.5 + court_position:court_tutor_court_position = { + OR = { + has_trait = intellect_bad_1 + has_trait = intellect_bad_2 + has_trait = intellect_bad_3 + } + } + } + } + + immediate = { + random_court_position_holder = { + type = court_tutor_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = tutor + court_event_character_flag_effect = yes + } + random_child = { + limit = { + is_available_child = yes + age >= 6 + OR = { + has_trait = bossy + has_trait = rowdy + } + } + alternative_limit = { + is_available_child = yes + age >= 6 + } + save_scope_as = unruly_child + court_event_character_flag_effect = yes + } + } + + # Option A: Scold the child for being brazen + option = { + name = court.0107.a + progress_towards_friend_effect = { + REASON = friend_upheld_educational_tactics + CHARACTER = scope:tutor + OPINION = default_friend_opinion + } + progress_towards_rival_effect = { + CHARACTER = scope:unruly_child + REASON = rival_child_scolded + OPINION = default_rival_opinion + } + custom_tooltip = court.0107.a.tt.1 + hidden_effect = { + scope:unruly_child = { + education_point_acquisition_effect = yes + } + } + custom_tooltip = court.0107.a.tt.2 + scope:tutor = { + add_character_flag = { + flag = court_0107_tutor + years = 20 + } + } + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + + #Option B: Buy the book yourself + option = { + name = court.0107.b + trigger = { + scope:tutor = { has_education_rank_trigger = { RANK = 2 OPERATOR = greater } } + } + add_opinion = { + target = scope:tutor + modifier = flattered_opinion + opinion = 15 + } + pay_short_term_gold = { + target = scope:tutor + gold = medium_gold_value + } + custom_tooltip = court.0107.b.tt + if = { + limit = { + scope:tutor = { + has_trait = education_martial + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:martial + SET_TOPIC = flag:no + } + } + else_if = { + limit = { + scope:tutor = { + has_trait = education_stewardship + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:stewardship + SET_TOPIC = flag:no + } + } + else_if = { + limit = { + scope:tutor = { + has_trait = education_diplomacy + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:diplomacy + SET_TOPIC = flag:no + } + } + else_if = { + limit = { + scope:tutor = { + has_trait = education_intrigue + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:intrigue + SET_TOPIC = flag:no + } + } + else_if = { + limit = { + scope:tutor = { + has_trait = education_learning + } + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:tutor + SET_SUBJECT = flag:learning + SET_TOPIC = flag:no + } + } + custom_tooltip = buy_book_artifact + scope:newly_created_artifact = { + save_scope_as = this_artifact + } + scope:tutor = { + save_scope_as = old_owner + } + hidden_effect = { + send_interface_toast = { + title = artifact.0012.t + left_icon = scope:this_artifact + right_icon = scope:old_owner + custom_tooltip = artifact.0012.tooltip + } + } + stress_impact = { + intellect_good_1 = minor_stress_impact_loss + intellect_good_2 = minor_stress_impact_loss + intellect_good_3 = minor_stress_impact_loss + scholar = minor_stress_impact_loss + greedy = minor_stress_impact_gain + intellect_bad_1 = minor_stress_impact_gain + intellect_bad_2 = medium_stress_impact_gain + intellect_bad_3 = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + + #Option C: Suggest another book - opt out + option = { + name = court.0107.c + add_opinion = { + target = scope:tutor + modifier = insult_opinion + opinion = -15 + } + progress_towards_friend_effect = { + REASON = friend_saved_from_boredom + CHARACTER = scope:unruly_child + OPINION = default_friend_opinion + } + stress_impact = { + compassionate = minor_stress_impact_loss + diligent = minor_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + after = { + scope:tutor = { + clear_court_event_participation = yes + } + scope:unruly_child = { + clear_court_event_participation = yes + } + } +} + +##################################### +# A Spectacular Courtier # +# by James Beaumont # +# 0108 # +##################################### + +scripted_effect spawn_foreign_prince_effect = { + random_kingdom = { + limit = { + holder ?= { + is_ai = yes + NOT = { + in_diplomatic_range = root + } + } + } + holder = { save_scope_as = foreign_realm_target } + } + scope:available_child = { + if = { + limit = { is_female = no } + create_character = { + location = root.capital_province + template = prince_ali_template + gender = female + culture = scope:foreign_realm_target.culture + faith = scope:foreign_realm_target.faith + save_scope_as = foreign_prince + } + } + else = { + create_character = { + location = root.capital_province + template = prince_ali_template + gender = male + culture = scope:foreign_realm_target.culture + faith = scope:foreign_realm_target.faith + save_scope_as = foreign_prince + } + } + } + scope:foreign_prince = { + random_list = { + 50 = { set_sexuality = heterosexual } + 50 = { set_sexuality = bisexual } + } + random_list = { + 3 = { add_gold = 100 } + 3 = { add_gold = 250 } + 3 = { add_gold = 500 } + 3 = { add_gold = 750 } + 3 = { add_gold = 1000 } + } + set_relation_lover = { reason = lover_magnificently_seduced target = scope:available_child involved_character = root } + give_nickname = nick_fabulous_she_he + visit_court_of = root + } +} + +# Foreign Prince comes to propose to an available daughter/son +court.0108 = { + type = court_event + title = court.0108.t + desc = court.0108.desc + + theme = court + court_scene = { + button_position_character = scope:sceptical_courtier + roles = { + scope:sceptical_courtier = { + group = event_group + animation = personality_cynical + } + scope:available_child = { + group = event_group + animation = love + } + scope:foreign_prince = { + group = event_group + animation = flirtation_left + } + } + } + + cooldown = { years = 50 } + + trigger = { + is_available_adult = yes + is_valid_for_east_asian_events_trigger = no + any_child = { + is_available_ai_adult = yes + allowed_more_spouses = yes + is_concubine = no + OR = { + has_sexuality = heterosexual + has_sexuality = bisexual + } + has_court_event_flag = no + } + any_kingdom = { + holder ?= { + is_ai = yes + NOT = { + in_diplomatic_range = root + } + } + } + court_grandeur_current_level >= medium_court_grandeur_level + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + root.faith = { + OR = { + religion_tag = islam_religion + has_doctrine_parameter = islamic_syncretic_actor_opinion_active + } + } + } + } + + immediate = { + hidden_effect = { + if = { + limit = { + any_court_position_holder = { + has_trait = cynical + is_available_adult = yes + } + } + random_court_position_holder = { + limit = { + has_trait = cynical + is_available_adult = yes + } + save_scope_as = sceptical_courtier + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_courtier = { + has_trait = cynical + is_available_adult = yes + } + } + random_courtier = { + limit = { + has_trait = cynical + is_available_adult = yes + } + save_scope_as = sceptical_courtier + court_event_character_flag_effect = yes + } + } + else = { + random_courtier = { + limit = { is_available_adult = yes } + save_scope_as = sceptical_courtier + court_event_character_flag_effect = yes + } + } + random_child = { + limit = { + is_available_ai_adult = yes + allowed_more_spouses = yes + is_concubine = no + OR = { #They need to be attracted to the Prince + has_sexuality = heterosexual + has_sexuality = bisexual + } + } + save_scope_as = available_child + court_event_character_flag_effect = yes + } + spawn_foreign_prince_effect = yes + } + } + + # Option A: Get them married! + option = { + name = court.0108.a + scope:foreign_prince = { + pay_short_term_gold = { + target = root + gold = 50_percent_of_owned_gold + } + } + scope:available_child = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 40 + } + } + progress_towards_friend_effect = { + REASON = friend_approved_marriage_proposal + CHARACTER = scope:foreign_prince + OPINION = default_friend_opinion + } + progress_towards_rival_effect = { + CHARACTER = scope:sceptical_courtier + REASON = rival_concerns_dismissed + OPINION = default_rival_opinion + } + if = { + limit = { + has_ep2_dlc_trigger = yes + } + create_grand_wedding_betrothal = { + SPOUSE_1 = scope:available_child + SPOUSE_2 = scope:foreign_prince + HOST = root + PROMISEE = scope:foreign_realm_target + } + } + else_if = { + limit = { + scope:available_child = { + is_female = no + } + } + scope:available_child = { marry = scope:foreign_prince } + } + else = { + scope:available_child = { marry_matrilineal = scope:foreign_prince } + } + change_current_court_grandeur = minor_court_grandeur_gain + stress_impact = { + paranoid = major_stress_impact_gain + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + trusting = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 2 + ai_vengefulness = -0.5 + } + } + } + + #Option B: Imprison the Prince + option = { + name = court.0108.b + scope:foreign_prince = { + pay_short_term_gold = { + target = root + gold = 80_percent_of_owned_gold + } + } + progress_towards_rival_effect = { + CHARACTER = scope:foreign_prince + REASON = rival_foreign_prince + OPINION = default_rival_opinion + } + progress_towards_rival_effect = { + CHARACTER = scope:available_child + REASON = rival_disallowed_marrying + OPINION = default_rival_opinion + } + progress_towards_friend_effect = { + REASON = friend_believed_claim + CHARACTER = scope:sceptical_courtier + OPINION = default_friend_opinion + } + rightfully_imprison_character_effect = { + TARGET = scope:foreign_prince + IMPRISONER = root + } + stress_impact = { + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = major_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 1 + } + } + } + + #Option C: Send them away + option = { + name = court.0108.c + scope:available_child = { + add_opinion = { + modifier = hurt_opinion + target = root + opinion = -25 + } + } + scope:foreign_prince = { + hidden_effect = { select_and_move_to_pool_effect = yes } + } + show_as_tooltip = { + remove_courtier_or_guest = scope:foreign_prince + } + ai_chance = { + base = 10 + } + } + after = { + scope:available_child = { + clear_court_event_participation = yes + } + scope:sceptical_courtier = { + clear_court_event_participation = yes + } + } +} + +##################################### +# An Anatomical Expert # +# by James Beaumont # +# 0109 # +##################################### + +# Executioner knows medicine, wants to be a doctor +court.0109 = { + type = court_event + title = court.0109.t + desc = court.0109.desc + + theme = court + court_scene = { + button_position_character = scope:executioner + roles = { + scope:executioner = { + group = event_group + animation = personality_rational + } + scope:learned_courtier = { + group = event_group + animation = admiration + } + } + } + + cooldown = { years = 20 } + + trigger = { + employs_court_position = executioner_court_position + court_position:executioner_court_position = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { has_court_position = court_physician_court_position } + save_temporary_scope_as = executioner_temp + } + any_courtier = { + exists = yes + is_available_adult = yes + learning >= 10 + has_court_event_flag = no + NOR = { + has_court_position = executioner_court_position + this = scope:executioner_temp + } + } + is_available_adult = yes + } + + # More likely to trigger if the executioner is smart and cares about other humans + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = scholar } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = compassionate } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = education_learning } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = lifestyle_herbalist } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { has_trait = lifestyle_physician } + } + modifier = { + add = 0.5 + court_position:executioner_court_position = { + OR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + } + modifier = { + add = -0.5 + court_position:executioner_court_position = { + OR = { + has_trait = intellect_bad_1 + has_trait = intellect_bad_2 + has_trait = intellect_bad_3 + } + } + } + #Executioner less likely to help the sick and needy if they don't care about the sick and needy + modifier = { + add = -0.5 + court_position:executioner_court_position = { has_trait = sadistic } + } + modifier = { + add = -0.5 + court_position:executioner_court_position = { has_trait = callous } + } + } + + immediate = { + random_court_position_holder = { + type = executioner_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { has_court_position = court_physician_court_position } + } + save_scope_as = executioner + court_event_character_flag_effect = yes + if = { + limit = { + NOT = { has_trait = lifestyle_physician } + } + add_trait = lifestyle_physician + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = yes + LEVEL_3 = yes + } + } + } + if = { + limit = { + cp:councillor_court_chaplain = { + exists = yes + learning >= 10 + is_available_ai_adult = yes + NOR = { + has_court_position = executioner_court_position + this = scope:executioner + } + } + } + cp:councillor_court_chaplain = { + save_scope_as = learned_courtier + court_event_character_flag_effect = yes + } + } + else = { + random_courtier = { + limit = { + learning >= 10 + is_available_adult = yes + has_court_event_flag = no + NOR = { + has_court_position = executioner_court_position + this = scope:executioner + } + } + save_scope_as = learned_courtier + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = court_physician_court_position + court_position:court_physician_court_position = { + this != scope:executioner + } + } + random_court_position_holder = { + type = court_physician_court_position + limit = { this != scope:executioner } + save_scope_as = current_physician + } + } + } + + # Option A: Employ executioner as physician + option = { + name = court.0109.a + progress_towards_friend_effect = { + REASON = friend_hired_physician + CHARACTER = scope:executioner + OPINION = 0 + } + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 25 + } + revoke_court_position = { + recipient = scope:executioner + court_position = executioner_court_position + } + + court_position_grant_effect = { POS = court_physician CANDIDATE = scope:executioner EMPLOYER = root } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { + factor = 2 + scope:executioner = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + } + } + + #Option C: Learn from the executioner + option = { + name = court.0109.c + trigger = { + OR = { + has_trait = scholar + has_trait = education_learning + has_lifestyle = learning_lifestyle + } + } + if = { + limit = { + scope:executioner = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + } + add_learning_lifestyle_xp = major_lifestyle_xp + } + else_if = { + limit = { + scope:executioner = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 50 + } + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + #Option D: Tell them to continue tending to the sick and needy + option = { + name = court.0109.d + primary_title.title_capital_county = { + change_development_progress = medium_development_progress_gain + } + reverse_add_opinion = { + target = scope:executioner + modifier = disappointed_opinion + opinion = -5 + } + scope:executioner = { + give_nickname = nick_health_god_mercy + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + } + } + after = { + scope:learned_courtier = { + clear_court_event_participation = yes + } + scope:executioner = { + clear_court_event_participation = yes + } + } +} + +##################################### +# A Relic of Revenge # +# by James Beaumont # +# 0111 # +##################################### + +# Executioner wants to turn the skull of your rival into an artefact +scripted_trigger enticingly_skulled_prisoner = { + is_ai = yes + is_adult = yes + OR = { + has_relation_rival = root + NOT = { has_faith = root.faith } + has_hook = root + num_sinful_traits >= 2 + } +} + +court.0111 = { + type = court_event + title = court.0111.t + desc = court.0111.desc + + theme = court + court_scene = { + button_position_character = scope:executioner + roles = { + scope:executioner = { + group = event_group + animation = scheme + } + scope:antiquarian = { + group = event_group + animation = anger + } + } + } + + cooldown = { years = 50 } + + trigger = { + employs_court_position = executioner_court_position + employs_court_position = antiquarian_court_position + court_position:executioner_court_position = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { + has_court_position = antiquarian_court_position + } + } + court_position:antiquarian_court_position = { + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { + has_court_position = executioner_court_position + } + } + any_prisoner = { enticingly_skulled_prisoner = yes } + } + + # More likely to trigger if the executioner is kind of evil + weight_multiplier = { + base = 3 + modifier = { + add = 1 + court_position:executioner_court_position = { + has_trait = sadistic + } + } + modifier = { + add = 1 + court_position:executioner_court_position = { + has_trait = callous + } + } + } + + immediate = { + if = { + limit = { + court_position:executioner_court_position = { + is_available_ai_adult = yes + NOT = { + has_court_position = antiquarian_court_position + } + } + } + court_position:executioner_court_position = { + save_scope_as = executioner + court_event_character_flag_effect = yes + } + } + if = { + limit = { + court_position:antiquarian_court_position = { + is_available_ai_adult = yes + NOT = { + has_court_position = executioner_court_position + } + } + } + court_position:antiquarian_court_position = { + save_scope_as = antiquarian + court_event_character_flag_effect = yes + } + } + random_prisoner = { + limit = { enticingly_skulled_prisoner = yes } + save_scope_as = rival + } + } + + # Option A: Give me their skull + option = { + name = court.0111.a + progress_towards_friend_effect = { + REASON = friend_took_side_in_dispute + CHARACTER = scope:executioner + OPINION = default_friend_opinion + } + reverse_add_opinion = { + target = scope:antiquarian + modifier = disgusted_opinion + opinion = -30 + } + save_scope_as = owner + if = { + limit = { + scope:rival = { + OR = { + has_relation_rival = root + has_hook = root + } + } + } + create_artifact = { + name = artifact_pedestal_skull_of_the_enemy_name + description = artifact_pedestal_skull_of_the_enemy_description + visuals = human_skull + type = pedestal + modifier = artifact_dread_baseline_add_2_modifier + save_scope_as = newly_created_artifact + } + } + + else_if = { + limit = { + scope:rival = { + OR = { + NOT = { has_faith = root.faith } + num_sinful_traits >= 2 + } + } + } + create_artifact = { + name = artifact_pedestal_skull_of_the_apostate_name + description = artifact_pedestal_skull_of_the_apostate_description + visuals = human_skull + type = pedestal + modifier = artifact_dread_baseline_add_2_modifier + save_scope_as = newly_created_artifact + } + } + + hidden_effect = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_dread_gain_mult_3_modifier + add_artifact_modifier = artifact_intrigue_per_stress_level_1_modifier + } + } + scope:newly_created_artifact = { + save_scope_as = this_artifact + } + scope:rival = { + save_scope_as = old_owner + } + hidden_effect = { + send_interface_toast = { + title = artifact.0012.t + left_icon = scope:this_artifact + right_icon = scope:old_owner + custom_tooltip = artifact.0012.tooltip + } + } + scope:rival = { + death = { + death_reason = death_skull_removed + killer = scope:executioner + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = major_stress_impact_gain + forgiving = major_stress_impact_gain + arbitrary = minor_stress_impact_loss + callous = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -1 + } + } + } + + #Option B: Refuse the "artifact" + option = { + name = court.0111.b + reverse_add_opinion = { + target = scope:executioner + modifier = disappointed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:antiquarian + modifier = relieved_opinion + opinion = 15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = medium_stress_impact_gain + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + ai_zeal = -0.5 + } + } + } + after = { + scope:executioner = { + clear_court_event_participation = yes + } + scope:antiquarian = { + clear_court_event_participation = yes + } + } +} + +##################################### +# A Closeted Cadaver # +# by James Beaumont # +# 0112 # +##################################### + +# Someone has been hiding a cadaver in the closet + +scripted_trigger valid_lady_in_waiting_like_character_trigger = { + is_available_ai_adult = yes + has_court_event_flag = no + trigger_if = { + limit = { + root = { is_female = yes } + } + is_female = yes + } + trigger_else = { + is_male = yes + } + OR = { + has_trait = sadistic + has_trait = callous + has_trait = wrathful + has_trait = craven + has_trait = paranoid + } + OR = { + has_court_position = lady_in_waiting_court_position + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + NOT = { + is_close_family_of = root + } +} + +court.0112 = { + type = court_event + title = court.0112.t + desc = court.0112.desc + + theme = court + court_scene = { + button_position_character = scope:guilty_courtier + roles = { + scope:guilty_courtier = { + group = event_group + animation = fear + } + } + } + + cooldown = { years = 20 } + + trigger = { + any_courtier = { + valid_lady_in_waiting_like_character_trigger = yes + } + any_pool_character = { + province = root.capital_province + is_available_ai_adult = yes + NOT = { exists = scope:inspiration } + } + is_available_adult = yes + } + + weight_multiplier = { + base = 0.5 + modifier = { + amenity_level = { + target = court_fashion + value > medium_amenity_level + } + add = 0.5 + } + modifier = { + add = 0.5 + employs_court_position = lady_in_waiting_court_position + } + } + + immediate = { + random_courtier = { + limit = { + valid_lady_in_waiting_like_character_trigger = yes + has_court_position = lady_in_waiting_court_position + } + alternative_limit = { + valid_lady_in_waiting_like_character_trigger = yes + } + save_scope_as = guilty_courtier + court_event_character_flag_effect = yes + } + hidden_effect = { + random_pool_character = { + limit = { + is_available_ai_adult = yes + NOT = { exists = scope:inspiration } + } + province = root.capital_province + save_scope_as = corpse + } + unknown_murder_effect = { + VICTIM = scope:corpse + MURDERER = scope:guilty_courtier + REASON = death_murder + } + if = { + limit = { + any_character_artifact = { + OR = { + has_variable = cabinet + has_variable = big_chest + } + NOT = { has_variable = ghost_cabinet } + } + } + random_character_artifact = { + limit = { + OR = { + has_variable = cabinet + has_variable = big_chest + } + NOT = { has_variable = ghost_cabinet } + } + set_variable = { + name = ghost_cabinet + years = 50 + } + } + } + } + } + + # Option A: I'll forget I saw this, for the good of fashion + option = { + name = court.0112.a + scope:guilty_courtier = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:corpse + NOT = { any_secret_knower = { this = root } } + } + disable_exposure_by = root + } + } + hidden_effect = { + create_artifact_regalia_effect = { + OWNER = root + SMITH = scope:guilty_courtier + } + } + custom_tooltip = get_regalia_artifact + scope:newly_created_artifact = { + save_scope_as = this_artifact + } + scope:guilty_courtier = { + save_scope_as = old_owner + } + hidden_effect = { + send_interface_toast = { + title = artifact.0012.t + left_icon = scope:this_artifact + right_icon = scope:old_owner + custom_tooltip = artifact.0012.tooltip + } + } + reverse_add_opinion = { + target = scope:guilty_courtier + modifier = grateful_opinion + opinion = 50 + } + stress_impact = { + zealous = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + just = major_stress_impact_gain + trusting = minor_stress_impact_loss + callous = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = 0.5 + ai_honor = -0.5 + } + } + } + + #Option B: Expose the murder + option = { + name = court.0112.b + reverse_add_opinion = { + target = scope:guilty_courtier + modifier = hate_opinion + opinion = -50 + } + scope:guilty_courtier = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:corpse + NOT = { any_secret_knower = { this = root } } + } + expose_secret = root + } + } + stress_impact = { + greedy = major_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = medium_stress_impact_gain + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = -0.5 + ai_honor = 0.5 + } + } + } + + #Option C: Leave without saying anything + option = { + name = court.0112.c + reverse_add_opinion = { + target = scope:guilty_courtier + modifier = scared_opinion + opinion = -15 + } + scope:guilty_courtier = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:corpse + NOT = { any_secret_knower = { this = root } } + } + reveal_to = root + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = -0.5 + ai_honor = -0.5 + } + } + } + after = { + scope:guilty_courtier = { + clear_court_event_participation = yes + } + } +} + + + +################################################## +# Ewan + +################################################## +# 2201 - 2210 A Slice of the Pie - Your heirs debate the merits of partition. At length. +# 2401 - 2410 Second-Hand Glamour - Your lacklustre approach to fashion sees courtiers turn elsewhere. +################################################## + + ################################################## + # MAJESTY SUB-SECTION + +################################################## +# A Slice of the Pie +# by Ewan Cowhig Croft +# 2201 - 2210 +################################################## + +scripted_trigger court_2201_valid_basic_heir_child_trigger = { + exists = root.dynasty + dynasty ?= root.dynasty + # Must be available, and at least a teenager. + is_available_ai = yes + OR = { + is_adult = yes + child_is_teen_trigger = yes + } + # Finally, has to be chilling in the capital. + location = root.capital_province +} + +scripted_trigger court_2201_valid_eldest_heir_child_trigger = { + # Basic checks. + court_2201_valid_basic_heir_child_trigger = yes + # Is the eldest heir of root. + save_temporary_scope_as = eldest_heir_temp + root = { + player_heir_position = { + value = 0 #player heir + target = scope:eldest_heir_temp + } + } +} + +scripted_trigger court_2201_valid_younger_heir_child_trigger = { + # Basic checks. + court_2201_valid_basic_heir_child_trigger = yes + # Is getting *some* kind of inheritance through partition. + any_heir_title = { + holder ?= root + } + # Is *NOT* the eldest heir of root. + save_temporary_scope_as = younger_heir_temp + root = { + player_heir_position = { + value >= 1 + target = scope:younger_heir_temp + } + } +} + +court.2201 = { + type = court_event + title = court.2201.t + desc = court.2201.desc + theme = court + + cooldown = { years = 10 } + + court_scene = { + button_position_character = scope:eldest_heir + roles = { + scope:eldest_heir = { + group = event_group + animation = anger + } + scope:younger_heir = { + group = event_group + animation = dismissal + } + } + } + + trigger = { + # DLC check. + has_royal_court = yes + # Standard checks. + is_available_adult = yes + is_landed = yes + # Is using a form of partition succession. + has_partition_succession_realm_law_trigger = yes + # Has a suitable eldest heir/child. + any_player_heir = { + court_2201_valid_eldest_heir_child_trigger = yes + has_court_event_flag = no + } + # Has a suitable younger heir/child. + any_player_heir = { + court_2201_valid_younger_heir_child_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + # Grab our heirs. + random_player_heir = { + limit = { court_2201_valid_eldest_heir_child_trigger = yes } + save_scope_as = eldest_heir + court_event_character_flag_effect = yes + } + random_player_heir = { + limit = { court_2201_valid_younger_heir_child_trigger = yes } + save_scope_as = younger_heir + court_event_character_flag_effect = yes + } + } + + # Entitled to more, scope:eldest_heir? How about *nothing*! + option = { + name = court.2201.a + + # Disinherit scope:eldest_heir for free. + scope:eldest_heir = { + disinherit_effect = { DISINHERITOR = root } + } + # Friendship & hook with scope:younger_heir. + progress_towards_friend_effect = { + REASON = friend_disinherited_other_child + CHARACTER = scope:younger_heir + OPINION = 50 + } + if = { + limit = { + can_add_hook = { + target = scope:younger_heir + type = favor_hook + } + } + add_hook = { + target = scope:younger_heir + type = favor_hook + } + } + # Insta-rivalry with scope:eldest_heir and between the siblings. + scope:eldest_heir = { + if = { + limit = { + can_set_relation_rival_even_if_teen_trigger = { CHARACTER = root } + } + set_relation_rival = { + target = root + reason = rival_parent_rivalry + } + } + if = { + limit = { + can_set_relation_nemesis_even_if_teen_trigger = { CHARACTER = scope:younger_heir } + } + set_relation_nemesis = { + reason = nemesis_parent_rivalry + copy_reason = rival + target = scope:younger_heir + } + } + else_if = { + limit = { + can_set_relation_rival_even_if_teen_trigger = { CHARACTER = scope:younger_heir } + } + set_relation_rival = { + target = scope:younger_heir + reason = rival_inter_heir_rivalry + } + } + else = { + add_opinion = { + target = scope:younger_heir + modifier = hate_opinion + opinion = -50 + } + reverse_add_opinion = { + target = scope:younger_heir + modifier = hate_opinion + opinion = -50 + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + irritable = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = 0.25 + } + } + } + + # Sad to say, scope:younger_heir, GetSheHe makes a good point. + option = { + name = court.2201.b + + # Disinherit scope:younger_heir for free. + scope:younger_heir = { + disinherit_effect = { DISINHERITOR = root } + } + # Friendship & hook with scope:eldest_heir. + progress_towards_friend_effect = { + REASON = friend_disinherited_other_child + CHARACTER = scope:eldest_heir + OPINION = 50 + } + if = { + limit = { + can_add_hook = { + target = scope:eldest_heir + type = favor_hook + } + } + add_hook = { + target = scope:eldest_heir + type = favor_hook + } + } + # Insta-rivalry with scope:younger_heir and between the siblings. + scope:younger_heir = { + if = { + limit = { + can_set_relation_rival_even_if_teen_trigger = { CHARACTER = root } + } + set_relation_rival = { + target = root + reason = rival_parent_rivalry + } + } + if = { + limit = { + can_set_relation_nemesis_even_if_teen_trigger = { CHARACTER = scope:eldest_heir } + } + set_relation_nemesis = { + reason = nemesis_parent_rivalry + copy_reason = rival + target = scope:eldest_heir + } + } + else_if = { + limit = { + can_set_relation_rival_even_if_teen_trigger = { CHARACTER = scope:eldest_heir } + } + set_relation_rival = { + target = scope:eldest_heir + reason = rival_inter_heir_rivalry + } + } + else = { + add_opinion = { + target = scope:eldest_heir + modifier = hate_opinion + opinion = -50 + } + reverse_add_opinion = { + target = scope:eldest_heir + modifier = hate_opinion + opinion = -50 + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + irritable = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_compassion = -0.5 + } + } + } + + # They're siblings, I'm sure they'll get along fine without me. + option = { + name = court.2201.c + trigger = { + NOT = { has_trait = family_first } + } + + # Hidden potential rivalry in the future. + hidden_effect = { + scope:eldest_heir = { + progress_towards_rival_effect = { + CHARACTER = scope:younger_heir + REASON = rival_argued_succession + OPINION = -20 + } + } + } + # And some diplomacy lifestyle XP for your wisdom. + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + + stress_impact = { + trusting = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_rationality = -0.25 + ai_energy = -0.5 + } + } + } + + after = { + scope:younger_heir = { + clear_court_event_participation = yes + } + scope:eldest_heir = { + clear_court_event_participation = yes + } + } +} + + ################################################## + # FOREIGN GUESTS SUB-SECTION + +################################################## +# Second-Hand Glamour +# by Ewan Cowhig Croft +# 2401 - 2410 +################################################## + +scripted_trigger court_2401_valid_neighbouring_ruler_trigger = { + # Isn't at war with root. + NOT = { + is_at_war_with = root + } + # Has a royal court, and therefore amenities. + has_royal_court = yes + # Is more fashionable. + amenity_level = { + target = court_fashion + value > medium_amenity_level + } +} + +scripted_trigger court_2401_valid_scope_seller_trigger = { + OR = { + has_trait_malicious_trigger = yes + has_trait_dominant_trigger = yes + } +} + +court.2401 = { + type = court_event + title = court.2401.t + desc = court.2401.desc + theme = court + + cooldown = { years = 15 } + + court_scene = { + button_position_character = scope:seller + roles = { + scope:seller = { + group = event_group + animation = flirtation + } + } + } + + trigger = { + # DLC check. + has_royal_court = yes + # Standard checks. + is_available_adult = yes + is_landed = yes + # Low fashion amenity. + amenity_level = { + target = court_fashion + value <= medium_amenity_level + } + # Any neighbour with a better fashion amenity. + any_neighboring_and_across_water_realm_same_rank_owner = { court_2401_valid_neighbouring_ruler_trigger = yes } + # Available courtier to become scope:seller. + any_courtier = { + court_2401_valid_scope_seller_trigger = yes + is_available_ai_adult = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + amenity_level = { + target = court_fashion + value <= low_amenity_level + } + add = 1 + } + modifier = { + any_neighboring_and_across_water_realm_same_rank_owner = { + court_2401_valid_neighbouring_ruler_trigger = yes + amenity_level = { + target = court_fashion + value >= high_amenity_level + } + } + add = 1 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # Grab an appropriate neighbouring realm. + random_neighboring_and_across_water_realm_same_rank_owner = { + limit = { court_2401_valid_neighbouring_ruler_trigger = yes } + save_scope_as = grander_ruler + } + # Grab a scope:seller. + random_courtier = { + limit = { + court_2401_valid_scope_seller_trigger = yes + is_available_ai_adult = yes + } + weight = { + base = 1 + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = seller + court_event_character_flag_effect = yes + } + } + + # My, those *do* look enticing... + option = { + name = court.2401.a + trigger = { + can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } + } + + # Pay gold to copy the fashions. + pay_short_term_gold = { + target = scope:seller + gold = medium_gold_value + } + # Gain some corresponding CGV. + change_current_court_grandeur = major_court_grandeur_gain + # Increase your amenities + add_amenity_level = { type = court_fashion value = 1 } + # And opinion. + reverse_add_opinion = { + target = scope:seller + modifier = pleased_opinion + opinion = 30 + } + # But lose a little prestige. + add_prestige = minor_prestige_loss + + stress_impact = { + humble = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_vengefulness = -0.25 + ai_greed = -0.5 + } + } + } + + # Get those out of here! We don't need foreign nonsense in my court! + option = { + name = court.2401.b + + # Gain prestige! + add_prestige = medium_prestige_gain + # But upset scope:seller + reverse_add_opinion = { + target = scope:seller + modifier = angry_opinion + opinion = -30 + } + #And loss a little CGV. + change_current_court_grandeur = minor_court_grandeur_loss + #But gain tiny legitimacy + add_legitimacy = miniscule_legitimacy_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = -0.25 + } + } + } + + # Who cares what people wear? + option = { + name = court.2401.c + + # Gain a little consolation prestige. + add_prestige = miniscule_prestige_gain + + stress_impact = { + lazy = miniscule_stress_impact_loss + shy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + humble = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_vengefulness = -0.25 + ai_energy = -0.5 + } + } + } + after = { + scope:seller = { + clear_court_event_participation = yes + } + } +} + + + +################################################## +# Bianca + +################################################## +# 3040 - 3049 Homesick MotherFather +# 3060 - 3069 A Feline Hunter +################################################## + +##################################### +# A courtier's inspired work # +# by Bianca Savazzi # +# 3010 # +##################################### + +#scripted_effect court_3010_inspired_work_neutral_toast_effect = { +# hidden_effect = { +# send_interface_toast = { +# title = court.3010.t +# right_icon = scope:inspired_writer +# custom_tooltip = court.3010.c.neutral +# } +# } +#} +#scripted_effect court_3010_inspired_work_stress_toast_effect = { +# if = { +# limit = { +# OR = { +# has_trait = arrogant +# has_trait = wrathful +# has_trait = impatient +# has_trait = sadistic +# } +# } +# stress_impact = { +# arrogant = medium_stress_impact_gain +# wrathful = medium_stress_impact_gain +# impatient = medium_stress_impact_gain +# sadistic = medium_stress_impact_gain +# } +# } +# else = { add_stress = minor_stress_gain } +# +# hidden_effect = { +# root = { +# send_interface_toast = { +# title = court.3010.t +# right_icon = scope:inspired_writer +# custom_tooltip = court.3010.c.stress +# show_as_tooltip = { +# scope:inspired_writer = { +# if = { +# limit = { +# OR = { +# has_trait = arrogant +# has_trait = wrathful +# has_trait = impatient +# has_trait = sadistic +# } +# } +# stress_impact = { +# arrogant = major_stress_impact_gain +# wrathful = major_stress_impact_gain +# impatient = major_stress_impact_gain +# sadistic = major_stress_impact_gain +# } +# } +# else = { add_stress = medium_stress_gain } +# } +# } +# } +# } +# } +#} + +scripted_trigger court_3010_inspired_work_courtier_trigger = { + is_available_ai_adult = yes + NOR = { + exists = scope:inspiration + exists = inspiration + } + NOR = { + has_trait = blind + has_relation_rival = root + has_relation_potential_rival = root + has_relation_nemesis = root + } + learning >= 10 + diplomacy >= 12 +} + +## An inspired courtier +court.3011 = { + type = character_event + title = court.3010.t + desc = { + desc = court.3011.desc.opening + first_valid = { + triggered_desc = { + trigger = { + scope:inspired_writer = { + OR = { + has_trait = shy + has_trait = chaste + } + } + } + desc = court.3011.desc.shy_or_chaste + } + triggered_desc = { + trigger = { + scope:inspired_writer = { + OR = { + has_trait = adventurer + has_trait = pilgrim + has_trait = lifestyle_traveler + } + } + } + desc = court.3011.desc.adventurer_or_pilgrim + } + triggered_desc = { + desc = court.3011.desc.generic_fallback + } + } + desc = court.3011.desc.ending + } + theme = court + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:inspired_writer + animation = happiness + } + + trigger = { + has_ep1_dlc_trigger = yes + NOT = { has_trait = blind } + has_royal_court = yes + any_courtier_or_guest = { + court_3010_inspired_work_courtier_trigger = yes + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + court_3010_inspired_work_courtier_trigger = yes + } + save_scope_as = inspired_writer + } + } + + # Option A: Encourage them to keep writing + option = { + name = court.3011.a + custom_tooltip = court.3011.c.tt.gain_inspiration + scope:inspired_writer = { create_inspiration = book_inspiration } + progress_towards_friend_effect = { + REASON = friend_believed_in_my_writing + CHARACTER = scope:inspired_writer + OPINION = 20 + } + stress_impact = { + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option C: You tell them to stop + option = { + name = court.3011.c + custom_tooltip = court.3011.c.tt.hurt + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:inspired_writer + modifier = cruelty_opinion + opinion = -20 + } + stress_impact = { + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = -1 + } + } + } +} +# +###################################### +## Lady-in-Waiting Events # +## by Bianca Savazzi # +## 3031 # +###################################### +# +## Court position smooths things over with people +court.3031 = { + type = court_event + title = court.3031.t + desc = court.3031.desc + theme = court + cooldown = { years = 15 } + court_scene = { + button_position_character = scope:liw + roles = { + scope:liw = { + group = event_group + animation = happiness + } + root = { + group = event_group + animation = personality_rational + } + } + } + + 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_intrigue } + } + + trigger = { + has_court_event_flag = no + OR = { + AND = { + employs_court_position = lady_in_waiting_court_position + any_court_position_holder = { + type = lady_in_waiting_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + AND = { + employs_court_position = cultural_emissary_court_position + any_court_position_holder = { + type = cultural_emissary_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + AND = { + employs_court_position = chief_eunuch_court_position + any_court_position_holder = { + type = chief_eunuch_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + AND = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + } + any_vassal = { + count > 0 + vassal_stance = minority + } + any_vassal = { + count > 0 + vassal_stance = barons_and_minor_landholders + } + any_sub_realm_county = { + culture = { + NOR = { + this = root.culture + this = root.capital_county.culture + } + } + } + } + + immediate = { + court_event_character_flag_effect = yes + random_court_position_holder = { + type = lady_in_waiting_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = liw + } + if = { + limit = { + NOT = { exists = scope:liw } + } + random_court_position_holder = { + type = cultural_emissary_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = liw + } + } + if = { + limit = { + NOT = { exists = scope:liw } + } + random_court_position_holder = { + type = chief_eunuch_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = liw + } + } + if = { + limit = { + NOT = { exists = scope:liw } + } + random_court_position_holder = { + type = court_poet_court_position + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = liw + } + } + scope:liw = { + court_event_character_flag_effect = yes + assign_quirk_effect = yes + } + random_sub_realm_county = { + limit = { + culture = { + NOR = { + this = root.culture + this = root.capital_county.culture + } + } + } + save_scope_as = reference_county + } + root = { save_scope_as = root_scope } + } + + # Option A: Minority vassals + option = { + name = court.3031.a + every_vassal = { + vassal_stance = minority + custom = every_minority_vassal + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + # Option B: Baron vassals + option = { + name = court.3031.b + every_vassal = { + vassal_stance = barons_and_minor_landholders + custom = every_baron_vassal + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + } + } + } + + # Option C: Minority culture + option = { + name = court.3031.c + every_sub_realm_county = { + limit = { + culture = scope:reference_county.culture + } + change_county_control = 5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + # Option D: Nah + option = { + name = court.3031.d + add_prestige = miniscule_prestige_gain + stress_impact = { + ambitious = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + has_trait = content + add = 10 + } + } + } + after = { + clear_court_event_participation = yes + scope:liw = { + clear_court_event_participation = yes + } + } +} +# +##################################### +# Homesick MotherFather # +# by Bianca Savazzi # +# 3040 - 3041 # +##################################### + +# Your parent of a different culture is caught feeling homesick +court.3040 = { + type = court_event + title = court.3040.t + desc = court.3040.desc + theme = court + cooldown = { years = 20 } + court_scene = { + button_position_character = scope:homesick_parent + roles = { + scope:homesick_parent = { + group = event_group + animation = sadness + } + root = { + group = event_group + animation = personality_rational + } + } + } + lower_left_portrait = scope:jester + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + trigger = { + has_court_event_flag = no + any_parent = { + has_court_event_flag = no + is_courtier_of = root + culture != root.culture + save_temporary_scope_as = temp_parent_scope + } + capital_province.culture = root.culture + } + + immediate = { + court_event_character_flag_effect = yes + random_parent = { + limit = { + has_court_event_flag = no + is_courtier_of = root + culture != root.culture + } + save_scope_as = homesick_parent + court_event_character_flag_effect = yes + } + if = { + limit = { + any_pool_character = { + province = root.location + culture = scope:homesick_parent.culture + diplomacy >= 8 + is_available_ai_adult = yes + } + } + random_pool_character = { + province = root.location + limit = { + culture = scope:homesick_parent.culture + diplomacy >= 8 + is_available_ai_adult = yes + } + save_scope_as = jester + } + } + else = { + create_character = { + template = jester_template + location = root.location + culture = scope:homesick_parent.culture + faith = scope:homesick_parent.faith + save_scope_as = jester + } + } + + if = { + limit = { + OR = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = antiquarian_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = wet_nurse_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = keeper_of_swans_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = court_gardener_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = lady_in_waiting_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = court_tutor_court_position + } + } + } + random_list = { + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = antiquarian_court_position + } + } + scope:homesick_parent = { add_character_flag = antiquarian } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = wet_nurse_court_position + } + } + scope:homesick_parent = { add_character_flag = wet_nurse } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = keeper_of_swans_court_position + } + } + scope:homesick_parent = { add_character_flag = swans } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = court_gardener_court_position + } + } + scope:homesick_parent = { add_character_flag = gardener } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = lady_in_waiting_court_position + } + } + scope:homesick_parent = { add_character_flag = liw } + } + 15 = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:homesick_parent + COURT_POS = court_tutor_court_position + } + } + scope:homesick_parent = { add_character_flag = tutor } + } + } + } + } + + # Option A: increase amenities + option = { + name = court.3040.a + trigger = { + # The culture of origin has higher court grandeur's courts + scope:homesick_parent.culture = { + any_culture_duchy = { + holder.top_liege ?= { + has_royal_court = yes + court_grandeur_current > root.court_grandeur_current + } + } + } + #Your amenities are not all top level + OR = { + amenity_level = { + target = court_fashion + value < max_amenity_level + } + amenity_level = { + target = court_lodging_standards + value < max_amenity_level + } + amenity_level = { + target = court_food_quality + value < max_amenity_level + } + amenity_level = { + target = court_servants + value < max_amenity_level + } + } + } + custom_tooltip = court.3040.a.tt + hidden_effect = { + random_list = { + 25 = { + trigger = { + amenity_level = { + target = court_fashion + value < max_amenity_level + } + } + send_interface_toast = { + title = court.3040.a.tt_2 + left_icon = scope:homesick_parent + add_amenity_level = { + type = court_fashion + value = 1 + } + } + } + 25 = { + trigger = { + amenity_level = { + target = court_lodging_standards + value < max_amenity_level + } + } + send_interface_toast = { + title = court.3040.a.tt_2 + left_icon = scope:homesick_parent + add_amenity_level = { + type = court_lodging_standards + value = 1 + } + } + } + 25 = { + trigger = { + amenity_level = { + target = court_food_quality + value < max_amenity_level + } + } + send_interface_toast = { + title = court.3040.a.tt_2 + left_icon = scope:homesick_parent + add_amenity_level = { + type = court_food_quality + value = 1 + } + } + } + 25 = { + trigger = { + amenity_level = { + target = court_servants + value < max_amenity_level + } + } + send_interface_toast = { + title = court.3040.a.tt_2 + left_icon = scope:homesick_parent + add_amenity_level = { + type = court_servants + value = 1 + } + } + } + } + } + scope:homesick_parent = { + add_opinion = { + target = root + modifier = listened_opinion + } + } + stress_impact = { + greedy = major_stress_impact_gain + humble = medium_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + + ai_value_modifier = { + ai_greed = -1 + } + } + } + + # Option B: available job + option = { + name = court.3040.b + trigger = { + scope:homesick_parent = { + OR = { + has_character_flag = antiquarian + has_character_flag = wet_nurse + has_character_flag = swans + has_character_flag = gardener + has_character_flag = liw + has_character_flag = tutor + } + } + } + if = { + limit = { + scope:homesick_parent = { has_character_flag = antiquarian } + } + court_position_grant_effect = { POS = antiquarian CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = wet_nurse } + } + court_position_grant_effect = { POS = wet_nurse CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = swans } + } + court_position_grant_effect = { POS = keeper_of_swans CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = gardener } + } + court_position_grant_effect = { POS = court_gardener CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = liw } + } + court_position_grant_effect = { POS = lady_in_waiting CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + else_if = { + limit = { + scope:homesick_parent = { has_character_flag = tutor } + } + court_position_grant_effect = { POS = court_tutor CANDIDATE = scope:homesick_parent EMPLOYER = root } + } + scope:homesick_parent = { + add_opinion = { + target = root + modifier = listened_opinion + } + } + stress_impact = { + lazy = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + + modifier = { + has_trait = lazy + add = -25 + } + modifier = { + has_trait = content + add = -25 + } + } + } + + # Option C: parent's culture's jester + option = { + name = court.3040.c + flavor = court.3040.c.tt + trigger = { + exists = scope:jester + } + add_courtier = scope:jester + court_position_grant_effect = { POS = court_jester CANDIDATE = scope:jester EMPLOYER = root } + stress_impact = { + gregarious = minor_stress_impact_loss + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + + modifier = { + has_trait = shy + add = -50 + } + } + } + + # Option D: Don't care, go sulk elsewhere + option = { + name = court.3040.d + scope:homesick_parent = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -10 + } + } + add_prestige = miniscule_prestige_gain + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + after = { + clear_court_event_participation = yes + scope:homesick_parent = { + clear_court_event_participation = yes + remove_character_flag = antiquarian + remove_character_flag = wet_nurse + remove_character_flag = swans + remove_character_flag = gardener + remove_character_flag = liw + remove_character_flag = tutor + } + if = { + limit = { + is_ai = yes + scope:jester = { + NOT = { has_court_position = court_jester_court_position } + } + } + scope:jester = { silent_disappearance_effect = yes } + } + } +} + + + +##################################### +# A Feline Hunter # +# by Bianca Savazzi # +# 3060 - 3061 # +##################################### + +# Court Cat +court.3060 = { + type = court_event + title = court.3060.t + desc = court.3060.desc + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:cat_finder + roles = { + scope:cat_finder = { + group = event_group + animation = happiness + } + } + } + + weight_multiplier = { + base = 0.5 + + modifier = { + has_royal_court = yes + court_grandeur_current_level > 0 + add = { + value = 1 + divide = court_grandeur_current_level + } + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + trigger = { + NOR = { + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } + OR = { + any_vassal = { + is_available_ai_adult = yes + has_court_event_flag = no + } + any_courtier = { + is_available_ai_adult = yes + has_court_event_flag = no + } + } + } + + immediate = { + #Pick cat finder + if = { + limit = { + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position #Primary choice as they are also used for dog option + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = cat_finder + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_vassal = { + is_available_ai_adult = yes + } + } + random_vassal = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = cat_finder + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + any_courtier = { + is_available_ai_adult = yes + } + } + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = cat_finder + court_event_character_flag_effect = yes + } + } + } + + # Option A: Adopt! + option = { + name = court.3060.a + start_cat_story_cycle_effect = yes + hidden_effect = { add_character_modifier = rat_hunting_cat_modifier } + + ai_chance = { + base = 20 + + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + # Option D: No cat + option = { + name = court.3060.d + scope:cat_finder = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -2 + } + } + } + after = { + scope:cat_finder = { + clear_court_event_participation = yes + } + } +} + + + + +################################################## +# Isabella + +################################################## +# 4750 - 4751 Your court poet is writing a heroic book +################################################## + + +################################################## +# I Need a Hero +# by Isabella Welch +# 4750 - 4759 +################################################## + +scripted_trigger pope_joan_trigger = { + faith = faith:catholic + is_female = yes + any_held_title = { is_head_of_faith = no } +} + +scripted_trigger lady_godiva_trigger = { + OR = { + root.culture = culture:anglo_saxon + root.culture = { + any_parent_culture = { this = culture:anglo_saxon } + } + root.culture = culture:english + root.culture = { + any_parent_culture = { this = culture:english } + } + } +} + +scripted_trigger sinbad_trigger = { + capital_province = { + OR = { + geographical_region = world_middle_east + geographical_region = world_africa_east + geographical_region = world_africa_north + } + } +} + +scripted_trigger caligula_trigger = { + OR = { + has_trait = sadistic + has_trait = torturer + has_focus = intrigue_intimidation_focus + has_trait = deviant + has_trait = lunatic_1 + } + OR = { + has_title = title:k_italy + has_title = title:k_romagna + has_title = title:k_sardinia + has_title = title:e_italy + is_roman_emperor_excluding_byzantium_trigger = yes + capital_province = { + geographical_region = world_europe_west_britannia + geographical_region = world_europe_west_germania + geographical_region = world_europe_west_francia + geographical_region = world_europe_west_iberia + geographical_region = world_europe_west + geographical_region = world_europe_south_italy + geographical_region = world_europe_south + } + culture = { has_cultural_pillar = heritage_byzantine } + } +} + +scripted_trigger nasreddin_trigger = { + OR = { + culture = culture:uyghur + culture = culture:afghan + root.culture = { + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_dravidian + } + capital_province = { + geographical_region = world_middle_east + geographical_region = world_middle_east_persia + geographical_region = world_middle_east_arabia + geographical_region = world_india + geographical_region = world_asia_minor + } + } + current_year >1230 +} + +scripted_trigger valmiki_trigger = { + root.culture = { + has_cultural_pillar = heritage_indo_aryan + } +} + +court.4750 = { + type = court_event + title = court.4750.t + desc = court.4750.desc + theme = court + + trigger = { + has_court_event_flag = no + can_employ_court_position_type = court_poet_court_position + trigger_if = { + limit = { + is_ai = yes + } + any_pool_character = { + province = root.location + OR = { + diplomacy >= 14 + has_trait = lifestyle_poet + } + is_available_ai_adult = yes + } + } + } + cooldown = { years = 25 } + court_scene = { + button_position_character = scope:poet + roles = { + scope:poet = { + group = event_group + animation = happiness + } + root = { + group = event_group + animation = personality_bold + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + court_event_character_flag_effect = yes + if = { + limit = { + any_pool_character = { + province = root.location + OR = { + diplomacy >= 14 + has_trait = lifestyle_poet + } + is_available_ai_adult = yes + } + } + random_pool_character = { + province = root.location + limit = { + OR = { + diplomacy >= 14 + has_trait = lifestyle_poet + } + is_available_ai_adult = yes + } + save_scope_as = poet + } + if = { + limit = { + scope:poet = { + NOT = { has_trait = lifestyle_poet } + } + } + scope:poet = { add_trait = lifestyle_poet } + } + } + else = { + create_character = { + template = poet_template + location = root.location + save_scope_as = poet + } + scope:poet = { add_character_flag = created } + } + scope:poet = { + court_event_character_flag_effect = yes + } + } + + option = { + name = court.4750.a + add_character_flag = pope_joan + trigger = { + pope_joan_trigger = yes + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = -0.5 + } + } + } + + option = { + name = court.4750.b + add_character_flag = lady_godiva + trigger = { + lady_godiva_trigger = yes + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = court.4750.c + add_character_flag = sinbad + add_character_flag = ruler_character + trigger = { + sinbad_trigger = yes + lady_godiva_trigger = no + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.25 + ai_rationality = -0.5 + } + } + } + option = { + name = court.4750.d + add_character_flag = caligula + trigger = { + caligula_trigger = yes + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_rationality = -0.5 + } + } + } + + option = { + name = court.4750.e + add_character_flag = nasreddin + add_character_flag = ruler_character + trigger = { + nasreddin_trigger = yes + lady_godiva_trigger = no + pope_joan_trigger = no + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.75 + ai_rationality = 0.5 + } + } + } + + option = { + name = court.4750.f + add_character_flag = valmiki + trigger = { + valmiki_trigger = yes + lady_godiva_trigger = no + pope_joan_trigger = no + } + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.75 + ai_rationality = 0.5 + } + } + } + option = { + name = court.4750.g + add_character_flag = ruler_hero + change_current_court_grandeur = minor_court_grandeur_gain + add_courtier = scope:poet + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.75 + } + } + } + + option = { + name = court.4750.h + add_character_flag = rejected_poet + stress_impact = { + lifestyle_poet = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_greed = -0.75 + } + } + } + + after = { + if = { + limit = { NOT = { has_character_flag = rejected_poet } } + trigger_event = { + id = court.4751 + days = 90 + } + } + else = { + scope:poet = { + if = { + limit = { + has_character_flag = created + } + silent_disappearance_effect = yes + } + } + } + clear_court_event_participation = yes + scope:poet ?= { + clear_court_event_participation = yes + } + remove_character_flag = rejected_poet + } +} + +scripted_effect court_4751_flag_removal_effect = { + remove_character_flag = ruler_character + remove_character_flag = pope_joan + remove_character_flag = ruler_hero + remove_character_flag = lady_godiva + remove_character_flag = sinbad + remove_character_flag = caligula + remove_character_flag = nasreddin + remove_character_flag = valmiki +} + +court.4751 = { + type = character_event + title = court.4750.t + desc = { + desc = court.4751.intro + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = pope_joan + } + desc = court.4751.topic.pope_joan + } + triggered_desc = { + trigger = { + has_character_flag = lady_godiva + } + desc = court.4751.topic.lady_godiva + } + triggered_desc = { + trigger = { + has_character_flag = sinbad + } + desc = court.4751.topic.sinbad + } + triggered_desc = { + trigger = { + has_character_flag = caligula + } + desc = court.4751.topic.caligula + } + triggered_desc = { + trigger = { + has_character_flag = nasreddin + } + desc = court.4751.topic.nasreddin + } + triggered_desc = { + trigger = { + has_character_flag = valmiki + } + desc = court.4751.topic.valmiki + } + triggered_desc = { + trigger = { + has_character_flag = ruler_hero + } + desc = court.4751.topic.ruler_hero + } + } + desc = court.4751.topic.unexpected + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = ruler_character + } + desc = court.4751.ruler_character + } + triggered_desc = { + trigger = { + has_character_flag = pope_joan + } + desc = court.4701.pope_joan_desc + } + triggered_desc = { + trigger = { + has_character_flag = ruler_hero + } + desc = court.4701.ruler_hero_desc + } + } + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = lady_godiva + } + desc = court.4751.topic.lady_godiva_desc + } + triggered_desc = { + trigger = { + has_character_flag = sinbad + } + desc = court.4751.topic.sinbad_desc + } + triggered_desc = { + trigger = { + has_character_flag = caligula + } + desc = court.4751.topic.caligula_desc + } + triggered_desc = { + trigger = { + has_character_flag = nasreddin + } + desc = court.4751.topic.nasreddin_desc + } + triggered_desc = { + trigger = { + has_character_flag = valmiki + } + desc = court.4751.topic.valmiki_desc + } + } + } + theme = diplomacy_majesty_focus + + left_portrait = { + character = root + animation = reading + } + right_portrait = { + character = scope:poet + animation = interested + } + + trigger = { + scope:poet = { + is_alive = yes + is_available = yes + liege = root + } + is_available = yes + } + on_trigger_fail = { + court_4751_flag_removal_effect = yes + } + + immediate = { + hidden_effect = { + if = { + limit = { + has_character_flag = pope_joan + scope:poet = { NOT = { has_trait = zealous } } + } + scope:poet = { + add_secret = { + type = secret_non_believer + } + } + faith.religious_head = { + save_scope_as = current_head_of_faith + } + } + } + + save_scope_as = owner + } + + option = { + name = court.4751.a + trigger = { + has_character_flag = pope_joan + is_attracted_to_gender_of = scope:poet + } + if = { + limit = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:poet } + } + set_relation_potential_lover = scope:poet + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = pope_joan_book_name + description = pope_joan_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_piety_2_modifier + save_scope_as = pope_joan_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = pope_joan_book_name + description = pope_joan_book_desc + type = book + visuals = book + modifier = artifact_monthly_piety_2_modifier + save_scope_as = pope_joan_book + save_scope_as = artifact + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.75 + ai_rationality = -0.5 + ai_zeal = -0.75 + } + } + } + + option = { + name = court.4751.b + trigger = { + has_character_flag = pope_joan + root != scope:current_head_of_faith + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = pope_joan_book_name + description = pope_joan_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_piety_2_modifier + save_scope_as = pope_joan_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = pope_joan_book_name + description = pope_joan_book_desc + type = book + visuals = book + modifier = artifact_monthly_piety_2_modifier + save_scope_as = pope_joan_book + save_scope_as = artifact + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.75 + ai_rationality = -0.5 + ai_zeal = 0.75 + } + } + } + + option = { + name = court.4751.c + flavor = court.4751.c.tt + add_character_modifier = { + modifier = compared_to_lady_godiva + years = 5 + } + trigger = { + has_character_flag = lady_godiva + } + if = { + limit = { + any_relation = { + type = potential_lover + } + } + random_relation = { + type = potential_lover + save_scope_as = potential_lover + } + progress_towards_lover_effect = { + CHARACTER = scope:potential_lover + REASON = lover_court_godiva + OPINION = 0 + } + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = lady_godiva_book_name + description = lady_godiva_book_desc + type = book + visuals = indian_book + modifier = artifact_attraction_opinion_3_modifier + save_scope_as = lady_godiva_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = lady_godiva_book_name + description = lady_godiva_book_desc + type = book + visuals = book + modifier = artifact_attraction_opinion_3_modifier + save_scope_as = lady_godiva_book + save_scope_as = artifact + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } + + option = { + name = court.4751.e + trigger = { + has_character_flag = nasreddin + } + add_character_modifier = { + modifier = compared_to_nasreddin + years = 5 + } + create_artifact = { + name = nasreddin_book_name + description = nasreddin_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = nasreddin_book + save_scope_as = artifact + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = nasreddin_book_name + description = nasreddin_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = nasreddin_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = nasreddin_book_name + description = nasreddin_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = nasreddin_book + save_scope_as = artifact + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.75 + } + } + } + + option = { + name = court.4751.f + trigger = { + NOT = { + has_character_flag = pope_joan + } + } + if = { + limit = { has_character_flag = valmiki } + add_character_modifier = { + modifier = compared_to_valmiki + years = 5 + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = valmiki_book_name + description = valmiki_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = valmiki_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = valmiki_book_name + description = valmiki_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = valmiki_book + save_scope_as = artifact + } + } + } + if = { + limit = { has_character_flag = caligula } + add_character_modifier = { + modifier = compared_to_caligula + years = 5 + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = caligula_book_name + description = caligula_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = caligula_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = caligula_book_name + description = caligula_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = caligula_book + save_scope_as = artifact + } + } + } + if = { + limit = { has_character_flag = ruler_hero } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = ruler_hero_book_name + description = ruler_hero_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = ruler_hero_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = ruler_hero_book_name + description = ruler_hero_book_desc + type = book + visuals = book + modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + save_scope_as = ruler_hero_book + save_scope_as = artifact + } + } + } + if = { + limit = { + has_character_flag = sinbad + } + add_character_modifier = { + modifier = compared_to_sinbad + years = 5 + } + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = sinbad_book_name + description = sinbad_book_desc + type = book + visuals = indian_book + modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + save_scope_as = sinbad_hero_book + save_scope_as = artifact + } + } + else = { + create_artifact = { + name = sinbad_book_name + description = sinbad_book_desc + type = book + visuals = book + modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + save_scope_as = sinbad_hero_book + save_scope_as = artifact + } + } + } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:poet + COURT_POS = court_poet_court_position + } + } + court_position_grant_effect = { POS = court_poet CANDIDATE = scope:poet EMPLOYER = root } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.75 + } + } + } + option = { + name = court.4751.h + scope:poet = { + add_opinion = { + modifier = insulted_opinion + target = root + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.75 + } + } + } + + after = { + if = { + limit = { + scope:poet = { + NOT = { has_court_position = court_poet_court_position } + } + is_ai = yes + } + scope:poet = { silent_disappearance_effect = yes } + } + court_4751_flag_removal_effect = yes + } +} + + +################################################## +# Linnea + +################################################## +# 5030 - 5039 Playtime +# 5040 - 5049 Pranking Spree +# 5055 - 5059 Colorful Talent +# 5060 - 5069 The Gallant Knight +# 5070 - 5074 Dedicated Tutor +# 5075 - 5079 Gift From Neigh-bor +################################################## + +##################################### +# Playtime # +# by Linnéa Thimrén # +##################################### + +#A child is struggling to focus on ruling +court.5030 = { + type = court_event + title = court.5030.t + desc = { + desc = court.5030.desc_opening + first_valid = { + triggered_desc = { + trigger = { age <= 10 } + desc = court.5030.desc_young + } + desc = court.5030.desc + } + desc = court.5030.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:child + roles = { + scope:child = { + group = event_group + animation = boredom + } + } + } + + trigger = { + NOT = { has_character_flag = had_event_court_5030 } + age >= 4 + age <= 13 + any_courtier = { + age >= 3 + age <= 13 + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ## Admin courts are extra boring. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5030 + years = 10 + } + set_favorite_toy_effect = yes + random_courtier = { + limit = { + age >= 3 + age <= 13 + } + weight = { + base = 1 + modifier = { #More likely to pick someone closer in age + add = 5 + age >= root.age_dif_child_down + age <= root.age_dif_child_up + } + } + save_scope_as = child + court_event_character_flag_effect = yes + set_favorite_toy_effect = yes + } + } + + option = { #Join in the game + name = court.5030.a + add_prowess_skill = 1 + if = { + limit = { + NOT = { has_relation_friend = scope:child } + } + progress_towards_friend_effect = { + REASON = friend_played_with_child + CHARACTER = scope:child + OPINION = default_friend_opinion + } + } + else = { + scope:child = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 15 + } + } + } + add_stress = minor_stress_loss + } + + option = { #I have to be serious. + name = court.5030.b + add_stewardship_skill = 1 + scope:child = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -10 + } + } + + add_stress = medium_stress_gain + } + after = { + scope:child = { + clear_court_event_participation = yes + } + } +} + + + +##################################### +# Colorful Talent # +# by Linnéa Thimrén # +##################################### + +scripted_trigger court_5055_child_painter_trigger = { + is_available_ai_child = yes + age >= 6 + NOT = { is_player_heir_of = root } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } +} + +#A young courtier is exploring their artistic side - encourage or dissuade? +court.5055 = { + type = court_event + title = court.5055.t + desc = court.5055.desc + theme = court + + court_scene = { + button_position_character = scope:painter + roles = { + scope:painter = { + group = event_group + animation = admiration + } + } + } + cooldown = { years = 25 } + + trigger = { + is_available_adult = yes + any_courtier = { + court_5055_child_painter_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ## More likely at courts with more time for non-active pursuits. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_courtier = { + limit = { + court_5055_child_painter_trigger = yes + } + save_scope_as = painter + court_event_character_flag_effect = yes + } + } + + option = { #Make them stop + name = court.5055.a + scope:painter = { + add_martial_skill = 1 + add_stewardship_skill = 1 + } + } + + option = { #Encourage them + name = court.5055.b + scope:painter = { + add_diplomacy_skill = 1 + add_intrigue_skill = 1 + } + } + after = { + scope:painter = { + clear_court_event_participation = yes + } + } +} + + +##################################### +# The Gallant Knight # +# by Linnéa Thimrén # +##################################### + +scripted_trigger court_5060_knight_trigger = { + is_knight_of = root + basic_is_available_ai = yes + NOT = { has_character_flag = was_the_target_of_event_court_5060 } + exists = var:number_of_impressive_knight_things +} + +#A knight has excelled during recent battles (injured or killed enemies) and you are expected to reward them +court.5060 = { + type = court_event + title = court.5060.t + desc = court.5060.desc + theme = court + + court_scene = { + button_position_character = scope:knight + roles = { + scope:knight = { + group = event_group + animation = personality_honorable + } + } + } + + trigger = { + NOT = { has_character_flag = had_event_court_5060 } + age >= 10 + has_variable_list = impressive_knights + any_in_list = { + variable = impressive_knights + court_5060_knight_trigger = yes + has_court_event_flag = no + } + any_held_title = { + title_tier = county + this != root.capital_county + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_in_list = { + variable = impressive_knights + court_5060_knight_trigger = yes + var:number_of_impressive_knight_things >= 2 + } + } + modifier = { + add = 1 + any_in_list = { + variable = impressive_knights + court_5060_knight_trigger = yes + var:number_of_impressive_knight_things >= 4 + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5060 + years = 10 + } + random_in_list = { + variable = impressive_knights + limit = { + court_5060_knight_trigger = yes + } + add_character_flag = { + flag = was_the_target_of_event_court_5060 + years = 10 + } + + weight = { + base = 1 + modifier = { + is_acclaimed = yes + add = 2 + } + modifier = { + add = { + add = var:number_of_impressive_knight_things + multiply = 2 + } + } + } + save_scope_as = knight + court_event_character_flag_effect = yes + } + } + + option = { # Accolade + name = court.5060.c + trigger = { + scope:knight = { + is_acclaimed = yes + } + } + scope:knight = { + accolade_major_glory_gain_with_checks_effect = yes + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = gregarious + add = 25 + } + } + } + + option = { #Give minor title + trigger = { + OR = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = bodyguard_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = champion_court_position + } + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = akolouthos_court_position + } + } + } + # employ them as champion or bodyguard + name = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = akolouthos_court_position + } + } + text = court.5060.d.akolouthos + } + name = { + trigger = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = champion_court_position + } + } + text = court.5060.d.champion + } + name = { + trigger = { + NOT = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = bodyguard_court_position + } + } + } + text = court.5060.d.bodyguard + } + + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = akolouthos_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:knight + POSITION = akolouthos + } + } + else_if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = champion_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:knight + POSITION = champion + } + } + else_if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:knight + COURT_POS = bodyguard_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:knight + POSITION = bodyguard + } + } + scope:knight = { + accolade_minor_glory_gain_with_checks_effect = yes + } + stress_impact = { + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + add = 50 + } + } + } + + option = { #Pat on the shoulder - opt out + name = court.5060.a + scope:knight = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + ai_chance = { + base = 50 + modifier = { + has_trait = arrogant + add = 25 + } + modifier = { + has_trait = vengeful + add = 25 + } + modifier = { + has_trait = greedy + add = 25 + } + } + } + after = { + scope:knight = { + clear_court_event_participation = yes + } + } +} + +#Maintenance event for the impressive knight variables - variables decrease over time or is removed +court.5061 = { + hidden = yes + + trigger = { + exists = var:number_of_impressive_knight_things + } + + immediate = { + if = { + limit = { + liege = { + has_variable_list = impressive_knights + any_in_list = { + variable = impressive_knights + this = root + } + } + } + change_variable = { + name = number_of_impressive_knight_things + subtract = 1 + } + if = { + limit = { + var:number_of_impressive_knight_things = 0 + } + remove_variable = number_of_impressive_knight_things + liege = { + remove_list_variable = { + name = impressive_knights + target = root + } + } + } + else = { + trigger_event = { + id = court.5061 + years = 4 + } + } + } + else = { + remove_variable = number_of_impressive_knight_things + } + } +} + +##################################### +# Dedicated Tutor # +# by Linnéa Thimrén # +##################################### + +#Court tutor asks for more funds +court.5070 = { + type = court_event + title = court.5070.t + desc = court.5070.desc + theme = court + + court_scene = { + button_position_character = scope:court_tutor + roles = { + scope:court_tutor = { + group = event_group + animation = admiration + } + } + } + + trigger = { + NOT = { has_character_flag = had_event_court_5070 } + age >= 10 + short_term_gold > medium_gold_value + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5070 + years = 15 + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { + is_available_ai = yes + } + save_scope_as = court_tutor + court_event_character_flag_effect = yes + } + } + + option = { #Pay to improve the education of all your wards + name = court.5070.b + custom_tooltip = court.5070.b.tt + every_courtier = { + limit = { + is_adult = no + any_relation = { + type = guardian + this = root + } + } + hidden_effect = { + education_point_acquisition_additional_points_effect = { LEVEL = mid } + } + } + + remove_short_term_gold = medium_gold_value + scope:court_tutor = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + ai_chance = { + base = 50 + } + } + + option = { #nah + name = court.5070.a + scope:court_tutor = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -10 + } + } + ai_chance = { + base = 10 + modifier = { + gold < medium_gold_value + add = 200 + } + modifier = { + has_trait = greedy + add = 30 + } + } + } + + after = { + scope:court_tutor = { + clear_court_event_participation = yes + } + clear_court_event_participation = yes + } +} + +##################################### +# Gift From Neigh-bor # +# by Linnéa Thimrén # +##################################### + +# You receive a gift of two palfreys +scripted_trigger court_5075_neighbor_trigger = { + NOR = { + has_relation_potential_rival = root + has_relation_rival = root + is_at_war_with = root + is_available_ai_adult = yes + } + OR = { + # They are friendly towards you + has_relation_potential_friend = root + has_relation_friend = root + is_close_or_extended_family_of = root + # They have reason to fear you + root = { + has_dread_level_towards = { + target = prev + level = 1 + } + } + root = { + has_dread_level_towards = { + target = prev + level = 2 + } + } + current_military_strength < root.current_strength_ninety_percent_value + # They feel indebted + has_opinion_modifier = { + modifier = gift_opinion + target = root + } + root = { + has_hook = prev + } + } +} + +court.5075 = { + type = court_event + title = court.5075.t + desc = { + desc = court.5075.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:master_of_the_horse + } + desc = court.5075.desc_horse_master + } + desc = court.5075.desc + } + desc = court.5075.desc_ending + } + theme = court + override_background = { + reference = courtyard + } + + court_scene = { + button_position_character = scope:master_of_the_horse + roles = { + scope:neighbor = { + group = event_group + animation = admiration + } + scope:master_of_the_horse = { + group = event_group + animation = happiness + } + } + } + + trigger = { + NOT = { has_character_flag = had_event_court_5075 } + age >= 14 + OR = { + AND = { + top_liege = this + any_neighboring_top_liege_realm_owner = { + court_5075_neighbor_trigger = yes + has_court_event_flag = no + } + } + AND = { + top_liege != this + any_neighboring_realm_same_rank_owner = { + court_5075_neighbor_trigger = yes + has_court_event_flag = no + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { #More likely to trigger if you have a Master of the Horse + add = 0.5 + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + is_available_ai = yes + has_court_event_flag = no + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5075 + years = 10 + } + if = { + limit = { + top_liege = this + } + random_neighboring_top_liege_realm_owner = { + limit = { + court_5075_neighbor_trigger = yes + } + save_scope_as = neighbor + court_event_character_flag_effect = yes + } + } + else = { + random_neighboring_realm_same_rank_owner = { + limit = { + court_5075_neighbor_trigger = yes + } + save_scope_as = neighbor + court_event_character_flag_effect = yes + } + } + if = { + limit = { + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + is_available_ai = yes + } + } + random_court_position_holder = { + type = master_of_horse_court_position + limit = { + is_available_ai = yes + } + save_scope_as = master_of_the_horse + court_event_character_flag_effect = yes + } + } + + random_dummy_gender_effect = yes #for horse gender + } + + option = { # give them to the court + name = court.5075.a + change_current_court_grandeur = medium_court_grandeur_gain + if = { + limit = { + government_allows = administrative + } + change_influence = minor_influence_gain + } + else = { + add_prestige = minor_prestige_gain + } + scope:neighbor = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + brave = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Warhorse + name = court.5075.c + trigger = { + NOT = { + any_owned_story = { type = story_cycle_martial_lifestyle_warhorse } + } + } + add_prestige = medium_prestige_gain + duel = { + skill = prowess + value = average_skill_rating + 15 = { # You tame the horse + desc = court.5075.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = court.5075.c.success + left_icon = root + start_warhorse_story_cycle_effect = yes + } + #To assign the correct gender to the horse + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + if = { + limit = { scope:dummy_gender = { is_female = yes } } + assign_horse_gender_effect = { GENDER = female } + } + else = { + assign_horse_gender_effect = { GENDER = male } + } + } + } + 6 = { # The horse kicks your ass + desc = court.5075.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = court.5075.c.failure + left_icon = root + increase_wounds_effect = { + REASON = horse_riding_accident + } + } + } + } + scope:neighbor = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + stress_impact = { + craven = major_stress_impact_gain + paranoid = medium_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 200 + } + } + + option = { # Opt out - Sell them + name = court.5075.b + add_gold = medium_gold_value + scope:neighbor = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + stress_impact = { + greedy = medium_stress_impact_loss + } + ai_chance = { + base = 75 + } + } + + after = { + scope:neighbor = { + clear_court_event_participation = yes + } + scope:master_of_the_horse ?= { + clear_court_event_participation = yes + } + } +} + +################################################## +# Claudia + +################################################## +# 6000 - 6009 Secret History +# 6010 - 6019 Prophet in the Halls +# 6020 - 6029 Possession at Court +# 6030 - 6039 The Ballad of the Garlic King +# 6040 - 6049 Scrounger Life +# 6050 - 6059 Saucy Readings +# 6060 - 6069 The Joys of Wine +# 6070 - 6079 The Value of Letters +# 6080 The Munificence of X +# 6090 The Art of Rhetoric +################################################## + +######################### +# Secret History # +# by Claudia Baldassi # +# 6000-6003 # +######################### + +scripted_trigger court_6000_has_valid_secret_trigger = { + NOT = { is_known_by = root } + OR = { + secret_type = secret_lover + secret_type = secret_deviant + secret_type = secret_murder + } +} + +# A book detailing the nefarious deeds of your predecessor and their court is being circulated at your court. # + +court.6000 = { + type = court_event + title = court.6000.t + desc = { + desc = court.6000.desc_opening + first_valid = { + triggered_desc = { + trigger = { + scope:courtier = { + is_close_or_extended_family_of = root + } + } + desc = court.6000.desc_family + } + desc = court.6000.desc_liege + } + desc = court.6000.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:courtier + roles = { + scope:courtier = { + group = event_group + animation = shame + } + root = { + group = event_group + animation = shock + } + } + } + + trigger = { + has_court_event_flag = no + primary_title.tier >= tier_duchy + exists = primary_title.previous_holder + primary_title.previous_holder = { + is_alive = no + dynasty = root.dynasty + prestige_level >= 3 + highest_held_title_tier >= tier_duchy + } + age >= 14 + any_courtier = { + count >= 2 + age >= 14 + has_court_event_flag = no + } + any_courtier = { + learning >= 12 + intrigue >= 7 + is_adult = yes + } + NOR = { + has_trait = blind + has_character_flag = court_6000_cooldown + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + add_character_flag = { + flag = court_6000_cooldown + years = 20 + } + random_courtier = { + limit = { + learning >= 12 + intrigue >= 7 + is_adult = yes + } + save_scope_as = author + } + random_courtier_or_guest = { + limit = { + age >= 14 + this != scope:author + } + save_scope_as = courtier + court_event_character_flag_effect = yes + } + if = { + limit = { + primary_title.previous_holder = { + this != root + } + } + primary_title.previous_holder = { + save_scope_as = predecessor + } + } + if = { + limit = { + exists = cp:councillor_spymaster + } + cp:councillor_spymaster = { + save_scope_as = spymaster + } + } + } + + # Option A: Outrageous! Investigate who wrote it (has spymaster) + option = { + trigger = { + exists = scope:spymaster + } + name = court.6000.a + custom_tooltip = court.6000.a.tt + add_stress = minor_stress_gain + scope:spymaster = { + set_council_task = { + task_type = task_find_secrets + target = root + } + } + trigger_event = { + id = court.6001 + days = { 96 196 } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.5 + ai_vengefulness = 1 + } + } + } + + # Option E: Outrageous, but without a sypmaster + option = { + name = court.6000.a + trigger = { + NOT = { + exists = cp:councillor_spymaster + } + } + add_stress = minor_stress_gain + custom_tooltip = court.6000.e.tt + trigger_event = { + id = court.6004 + days = { 96 196 } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.5 + ai_vengefulness = 1 + } + } + } + + # Option D: Opt out - You really don't care + option = { + name = court.6000.d + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_loss } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + + after = { + scope:courtier = { + clear_court_event_participation = yes + } + clear_court_event_participation = yes + } +} + +court.6001 = { + type = character_event + hidden = yes + + immediate = { + scope:spymaster = { + duel = { + skill = intrigue + target = scope:author + 50 = { #success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + trigger_event = court.6002 + } + 50 = { #failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + trigger_event = court.6003 + } + } + } + } +} + +court.6002 = { + title = court.6000.t + type = character_event + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spymaster + } + desc = court.6002.desc + } + desc = court.6002.b.desc_opening + } + desc = court.6002.b.desc_ending + } + theme = court + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:author + animation = shame + } + + # Option A: Force to recant + option = { + name = court.6002.a + flavor = court.6002.a.tt + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + add_dread = medium_dread_gain + custom_tooltip = court.6002.a.tt2 + add_character_flag = { + flag = court_of_no_secrets + years = 15 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + #Option D: forgive the author + option = { + name = court.6002.d + change_current_court_grandeur = minor_court_grandeur_gain + scope:author = { + create_inspiration = book_inspiration + add_opinion = { + target = root + modifier = forgiven_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } +} + +court.6003 = { + title = court.6000.t + type = character_event + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spymaster + } + desc = court.6003.desc + } + desc = court.6002.b.desc_opening + } + desc = court.6003.b.desc_ending + } + theme = court + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + trigger = { + exists = scope:spymaster + } + character = scope:spymaster + animation = shame + } + + #Option B: disappointed + option = { + name = court.6003.b + add_intrigue_lifestyle_xp = medium_lifestyle_xp + add_stress = medium_stress_gain + } +} + +court.6004 = { + type = character_event + hidden = yes + + immediate = { + duel = { + skill = intrigue + target = scope:author + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + trigger_event = court.6002 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + trigger_event = court.6003 + } + } + } +} + +############################# +# Prophet in the Halls # +# by Claudia Baldassi # +# 6010-6011 # +############################# + +scripted_trigger court_6010_valid_preacher_trigger = { + is_available_ai_adult = yes + has_trait = zealous + faith = scope:target_county.faith +} + +# A guest of a different faith has been preaching their beliefs at court a bit too enthusiastically. # + +court.6010 = { + type = court_event + title = court.6010.t + desc = court.6010.desc + theme = court + + court_scene = { + button_position_character = scope:preacher + roles = { + scope:preacher = { + group = event_group + animation = personality_zealous + } + root = { + group = event_group + animation = disapproval + } + } + } + + cooldown = { years = 20 } + + trigger = { + has_court_event_flag = no + cp:councillor_court_chaplain ?= { + is_performing_council_task = task_conversion + councillor_task_target = { + NOR = { + faith = root.faith + faith = root.capital_county.faith + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_court_chaplain = { save_scope_as = chaplain } + scope:chaplain.councillor_task_target.county = { save_scope_as = target_county } + + random_courtier_or_guest = { + limit = { + court_6010_valid_preacher_trigger = yes + } + save_scope_as = preacher + } + if = { + limit = { + NOT = { exists = scope:preacher } + } + create_character = { + location = root.location + template = preacher_template + faith = scope:target_county.faith + culture = scope:target_county.culture + save_scope_as = preacher + } + } + scope:preacher = { court_event_character_flag_effect = yes } + # Save the preacher's "liege" + scope:target_county.holder ?= { + save_scope_as = preacher_liege + } + every_realm_county = { + limit = { + faith = scope:preacher.faith + } + add_to_list = preacher_faith_counties + } + save_scope_value_as = { + name = preacher_faith_counties_size + value = list_size:preacher_faith_counties + } + } + + #OPTION C: Imprison them + option = { + name = court.6010.c + rightfully_imprison_character_effect = { + TARGET = scope:preacher + IMPRISONER = root + } + if = { + limit = { + exists = scope:preacher_liege + scope:preacher_liege = { + this != root + faith = scope:preacher.faith + is_ai = yes + } + } + custom_tooltip = court.6010.c.tt + trigger_event = { + id = court.6011 + days = 5 + } + } + custom_tooltip = court.6010.c.tt2 + set_variable = { + name = 6010_harsh_conversion + value = scope:preacher.faith + years = 20 + } + every_in_list = { + list = preacher_faith_counties + custom = court.6010.a_every_county + change_county_control = -15 + } + every_courtier_or_guest = { + limit = { + faith = scope:preacher.faith + } + custom = court_6010_all_courtiers_and_guests_faith + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #OPTION A: Let them be + option = { + name = court.6010.a + #you are tolerant and open-minded + change_current_court_grandeur = medium_court_grandeur_gain + custom_tooltip = court.6010.c.tt3 + set_variable = { + name = 6010_tolerant_conversion + value = scope:preacher.faith + years = 20 + } + every_in_list = { + list = preacher_faith_counties + custom = court.6010.a_every_county + change_county_control = 15 + } + every_courtier_or_guest = { + limit = { + faith = scope:preacher.faith + } + custom = court_6010_all_courtiers_and_guests_faith + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + stress_impact = { + zealous = major_stress_impact_gain + patient = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:preacher = { + clear_court_event_participation = yes + } + } +} + +court.6011 = { + type = letter_event + opening = { + desc = court.6011.desc_opening + } + desc = court.6011.desc_prisoner + sender = scope:preacher_liege + + #Option A: sorry for the diplomatic blunder - offer repayment + option = { + name = court.6011.a + trigger = { + can_make_expensive_purchase_trigger = { + PRICE = root.minor_gold_value + } + } + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + pay_short_term_gold = { + target = scope:preacher_liege + gold = minor_gold_value + } + scope:preacher_liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -25 + } + modifier = { + has_trait = arrogant + add = -25 + } + modifier = { + has_trait = zealous + add = -25 + } + modifier = { + has_trait = humble + add = 50 + } + } + } + + #Option B: reiterate that their religion is not welcome at your court + option = { + name = court.6011.b + add_piety = medium_piety_gain + scope:preacher_liege = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = compassionate + add = -25 + } + modifier = { + has_trait = zealous + add = 25 + } + modifier = { + has_trait = arrogant + add = 25 + } + } + } +} + +############################# +# Possession at Court # +# by Claudia Baldassi # +# 6020 # +############################# + +# A possessed courtier is scaring your more religion-oriented courtiers. # + +court.6020 = { + type = court_event + title = court.6020.t + desc = { + desc = court.6020.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:court_chaplain + } + desc = court.6020.desc_chaplain + } + desc = court.6020.desc_no_chaplain + } + desc = court.6020.desc_middle + first_valid = { + triggered_desc = { + trigger = { + exists = scope:court_physician + } + desc = court.6020.desc_physician + } + desc = court.6020.desc_no_physician + } + desc = court.6020.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:possessed_char + roles = { + scope:possessed_char = { + group = event_group + animation = worry + } + scope:court_chaplain = { + group = event_group + animation = disgust + } + scope:court_physician = { + group = event_group + animation = disbelief + } + } + } + + trigger = { + any_courtier_or_guest = { + OR = { + has_trait = possessed_1 + has_trait = possessed_genetic + } + has_court_event_flag = no + } + NOT = { + has_character_flag = court_6020_cooldown + } + # Chaplain & physician don't both have to exist, but can't be the same thing. + cp:councillor_court_chaplain ?= { + NOT = { has_court_position = court_physician_court_position } + } + has_court_type = court_scholarly + } + + weight_multiplier = { + base = 0.5 + modifier = { + exists = cp:councillor_court_chaplain + add = 0.5 + } + modifier = { + employs_court_position = court_physician_court_position + add = 0.5 + } + modifier = { + has_trait = lifestyle_physician + add = 0.5 + } + modifier = { + has_trait = theologian + add = 0.5 + } + modifier = { + has_trait = whole_of_body + add = 0.5 + } + } + + immediate = { + add_character_flag = { + flag = court_6020_cooldown + years = 20 + } + random_courtier_or_guest = { + limit = { + has_trait = possessed + } + save_scope_as = possessed_char + court_event_character_flag_effect = yes + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + court_event_character_flag_effect = yes + } + } + if = { + limit = { + court_physician_available_trigger = yes + } + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + scope:court_physician = { + court_event_character_flag_effect = yes + } + } + } + + # Option A: Court chaplain exorcizes them - limited to christians + option = { + name = court.6020.a + trigger = { + exists = scope:court_chaplain + OR = { scope:court_chaplain.religion = religion:eastern_orthodox_religion scope:court_chaplain.religion = religion:catholic_religion scope:court_chaplain.religion = religion:protestant_religion } + OR = { root.religion = religion:eastern_orthodox_religion root.religion = religion:catholic_religion root.religion = religion:protestant_religion } + } + add_piety = minor_piety_gain + scope:court_chaplain = { + duel = { + skill = learning + target = scope:possessed_char + 10 = { + desc = court.6020.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + send_interface_toast = { + title = court.6020.a.success + custom_tooltip = court.6020.a.success.tt + change_current_court_grandeur = major_court_grandeur_gain + } + } + 15 = { + desc = court.6020.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = court.6020.a.failure + custom_tooltip = court.6020.a.failure.tt + change_current_court_grandeur = medium_court_grandeur_loss + } + } + } + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -1 + } + } + } + + # Option B: it is a sign of the favor of the gods - limited to non-monotheistic + option = { + name = court.6020.b + trigger = { + NOR = { + root.religion = { is_in_family = rf_abrahamic } + scope:court_chaplain ?= { + religion = { + is_in_family = rf_abrahamic + } + } + has_trait = cynical + faith = { + OR = { + trait_is_sin = possessed_1 + trait_is_sin = possessed_genetic + } + } + } + } + add_piety = medium_piety_gain + scope:possessed_char = { + add_character_modifier = possessed_prophetic_visions + } + custom_tooltip = court.6020.b.tt + change_current_court_grandeur = medium_court_grandeur_gain + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -1 + } + } + } + + # Option E: it's just a disease - court physician + option = { + name = court.6020.e + trigger = { + exists = scope:court_physician + } + if = { + limit = { + OR = { + root.religion = religion:islam_religion + root.religion = { is_in_family = rf_eastern } + } + } + add_learning_lifestyle_xp = major_lifestyle_xp + } + change_current_court_grandeur = major_court_grandeur_gain + scope:possessed_char = { + add_character_modifier = court_possessed_improved_condition_modifier + } + scope:possessed_char = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 60 + } + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = 1 + } + } + } + + # Option F: opt out - don't bother me + option = { + name = court.6020.f + add_prestige = minor_prestige_loss + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 75 + modifier = { + has_trait = lazy + add = 50 + } + } + } + + after = { + scope:possessed_char = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:court_chaplain } + scope:court_chaplain = { + clear_court_event_participation = yes + } + } + if = { + limit = { exists = scope:court_physician } + scope:court_physician = { + clear_court_event_participation = yes + } + } + } +} + +######################### +# Saucy Readings # +# by Claudia Baldassi # +# 6050 # +######################### + +scripted_trigger court_6050_valid_courtier_trigger = { + is_available_ai_adult = yes + has_court_event_flag = no + NOR = { + has_trait = chaste + is_councillor_of = root + } + NOT = { + faith = { trait_is_virtue = lustful } + } + might_cheat_on_every_partner_trigger = yes +} + +# Some "compromising" literature is circulating at court # + +court.6050 = { + type = court_event + title = court.6050.t + desc = { + desc = court.6050.desc_opening + first_valid = { + triggered_desc = { + trigger = { + OR = { + root.culture = { has_cultural_pillar = language_greek } + root.culture = { has_cultural_pillar = heritage_byzantine } + } + } + desc = court.6050.desc_byz + } + triggered_desc = { + trigger = { + OR = { + root.culture = { has_cultural_pillar = language_arabic } + root.culture = { has_cultural_pillar = language_iranian } + root.culture = { has_cultural_pillar = heritage_iranian } + root.culture = { has_cultural_pillar = heritage_arabic } + } + } + desc = court.6050.desc_islam + } + triggered_desc = { + trigger = { + OR = { + root.culture = { has_cultural_pillar = language_french } + root.culture = { has_cultural_pillar = language_occitano_romance } + root.culture = { has_cultural_pillar = heritage_latin } + } + + } + desc = court.6050.desc_sonetti + } + triggered_desc = { + trigger = { + OR = { + root.culture = { has_cultural_pillar = language_anglic } + root.culture = { has_cultural_pillar = language_saxon } + } + } + desc = court.6050.desc_chaucer + } + triggered_desc = { + trigger = { always = yes } + desc = court.6050.desc_generic #fallback option (mostly for other christians) + } + } + desc = court.6050.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:courtier + roles = { + scope:courtier = { + group = event_group + animation = throne_room_writer + } + root = { + group = event_group + animation = shock + } + scope:court_chaplain = { + group = event_group + animation = disapproval + } + } + } + + trigger = { + has_court_event_flag = no + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + has_court_event_flag = no + } + is_adult = yes + NOT = { + faith = { trait_is_virtue = lustful } + } + any_courtier = { court_6050_valid_courtier_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + has_lifestyle = intrigue_lifestyle + add = 0.5 + } + modifier = { + has_lifestyle = learning_lifestyle + add = 0.5 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + court_event_character_flag_effect = yes + } + random_courtier = { + limit = { + has_trait = lustful + court_6050_valid_courtier_trigger = yes + } + alternative_limit = { court_6050_valid_courtier_trigger = yes } + save_scope_as = courtier + court_event_character_flag_effect = yes + } + } + + # Option B: purify them all with fire! + option = { + name = court.6050.b + flavor = court.6050.b.tt + add_dread = major_dread_gain + add_piety = major_piety_gain + custom_tooltip = court.6050.b.tt.2 + add_character_flag = { + flag = burned_indecent_books + years = 20 + } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + patient = medium_stress_impact_gain + scholar = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + has_trait = compassionate + add = -25 + } + modifier = { + has_trait = patient + add = -25 + } + modifier = { + has_trait = scholar + add = -50 + } + modifier = { + has_trait = cynical + add = -50 + } + } + } + + # Option C: culture is culture - let them read + option = { + name = court.6050.c + add_learning_lifestyle_xp = major_lifestyle_xp + if = { + limit = { + has_court_type = court_scholarly + } + change_current_court_grandeur = major_court_grandeur_gain + } + else = { + change_current_court_grandeur = minor_court_grandeur_gain + } + custom_tooltip = court.6050.c.tt + add_character_flag = { + flag = supported_indecent_books + years = 20 + } + + stress_impact = { + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + # Option D: you really get into it + option = { + name = court.6050.d + add_intrigue_lifestyle_xp = major_lifestyle_xp + add_character_modifier = { + modifier = confident_lover + years = 15 + } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + stress_impact = { + chaste = major_stress_impact_gain + zealous = major_stress_impact_gain + celibate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + modifier = { + has_trait = chaste + add = -100 + } + modifier = { + has_trait = celibate + add = -200 + } + } + } + + #Option F: opt out - move on + option = { + name = court.6050.f + add_piety = minor_piety_gain + stress_impact = { + zealous = medium_stress_impact_gain + chaste = medium_stress_impact_gain + fickle = medium_stress_impact_loss + lazy = medium_stress_impact_loss + } + ai_chance = { + base = 75 + modifier = { + has_trait = zealous + add = -25 + } + modifier = { + has_trait = chaste + add = -25 + } + modifier = { + has_trait = lazy + add = 25 + } + } + } + after = { + clear_court_event_participation = yes + scope:courtier = { + clear_court_event_participation = yes + } + scope:court_chaplain = { + clear_court_event_participation = yes + } + } +} + +######################### +# The Joys of Wine # +# by Claudia Baldassi # +# 6060 # +######################### + +# Your chaplain preaches against wine; your physician (and the court drunkard!) disagrees # + +court.6060 = { + type = court_event + title = court.6060.t + desc = { + desc = court.6060.desc_opening + triggered_desc = { + trigger = { + exists = scope:courtier_drunkard + } + desc = court.6060.desc_drunkard_courtier + } + desc = court.6060.desc_ending + } + theme = court + + court_scene = { + button_position_character = scope:court_chaplain + roles = { + scope:court_chaplain = { + group = event_group + animation = disapproval + } + scope:courtier_drunkard = { + group = event_group + animation = rage + } + scope:court_physician = { + group = event_group + animation = anger + } + } + } + + trigger = { + is_adult = yes + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + AND = { + religion = religion:islam_religion + culture = { has_cultural_pillar = heritage_iranian } + } + } + employs_court_position = court_physician_court_position + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + has_court_event_flag = no + NOT = { has_court_position = court_physician_court_position } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + } + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + scope:court_physician = { + court_event_character_flag_effect = yes + } + if = { + limit = { + any_courtier_or_guest = { + has_trait = drunkard + NOR = { + this = scope:court_physician + this = scope:court_chaplain + } + } + } + random_courtier_or_guest = { + limit = { + has_trait = drunkard + NOR = { + this = scope:court_physician + this = scope:court_chaplain + } + } + save_scope_as = courtier_drunkard + court_event_character_flag_effect = yes + } + } + } + + #Option A: side with the chaplain + option = { + name = court.6060.a + add_character_modifier = { + modifier = court_no_wine_modifier + days = 3650 + } + add_piety = medium_piety_gain + scope:court_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + scope:court_physician = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + if = { + limit = { + exists = scope:courtier_drunkard + } + scope:courtier_drunkard = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + gluttonous = major_stress_impact_gain + lifestyle_reveler = major_stress_impact_gain + drunkard = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + add = -25 + } + modifier = { + has_trait = gluttonous + add = -50 + } + modifier = { + has_trait = lifestyle_reveler + add = -75 + } + modifier = { + has_trait = drunkard + add = -100 + } + } + } + + #Option B: side with the physician + option = { + name = court.6060.b + add_character_modifier = { + modifier = court_moderate_drinking_modifier + days = 3650 + } + add_prestige = medium_prestige_gain + scope:court_physician = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + if = { + limit = { + exists = scope:courtier_drunkard + } + scope:courtier_drunkard = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + gluttonous = medium_stress_impact_gain + lifestyle_reveler = medium_stress_impact_gain + drunkard = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = -25 + } + modifier = { + has_trait = gluttonous + add = -25 + } + modifier = { + has_trait = lifestyle_reveler + add = -25 + } + modifier = { + has_trait = drunkard + add = -75 + } + modifier = { + has_trait = lifestyle_physician + add = 75 + } + modifier = { + has_trait = temperate + add = 75 + } + } + } + + #Option C: side with the drunkard + option = { + name = court.6060.c + flavor = court.6060.c.tt + trigger = { + exists = scope:courtier_drunkard + } + add_character_modifier = { + modifier = rivers_of_wine_modifier + years = 10 + } + custom_tooltip = court.6060.c.tt.2 + if = { + limit = { + can_be_drunkard = yes + } + random = { + chance = 25 + add_trait = drunkard + } + } + scope:courtier_drunkard = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + if = { + limit = { + NOT = { has_relation_friend = scope:courtier_drunkard } + } + progress_towards_friend_effect = { + REASON = friend_took_side_in_dispute + CHARACTER = scope:courtier_drunkard + OPINION = 0 + } + } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + scope:court_physician = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + stress_impact = { + base = medium_stress_impact_loss + zealous = medium_stress_impact_gain + temperate = major_stress_impact_gain + lifestyle_physician = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = drunkard + add = 100 + } + modifier = { + has_trait = zealous + add = -25 + } + modifier = { + has_trait = temperate + add = -50 + } + modifier = { + has_trait = lifestyle_physician + add = -50 + } + } + } + + after = { + if = { + limit = { + exists = scope:courtier_drunkard + } + scope:courtier_drunkard = { + clear_court_event_participation = yes + } + } + scope:court_chaplain = { + clear_court_event_participation = yes + } + scope:court_physician = { + clear_court_event_participation = yes + } + } +} + +############################# +# The Value of Letters # +# by Claudia Baldassi # +# 6070-6072 # +############################# + +# Your courtiers are dissatisfied with you being completely illiterate. How do you react? # + +court.6070 = { + type = court_event + title = court.6070.t + desc = court.6070.desc + theme = court + + court_scene = { + button_position_character = scope:tutor_6070 + roles = { + scope:tutor_6070 = { + group = event_group + animation = personality_rational + } + root = { + group = event_group + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = stubborn + } + } + animation = personality_bold + } + triggered_animation = { + trigger = { + NOR = { + has_trait = arrogant + has_trait = stubborn + } + } + animation = shame + } + animation = shame + } + } + } + + trigger = { + has_court_event_flag = no + OR = { + learning < low_skill_rating + has_trait = intellect_bad + has_trait = dull + } + NOT = { + has_trait = blind + } + is_adult = yes + OR = { + exists = cp:councillor_court_chaplain + AND = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + if = { + limit = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = tutor_6070 + court_event_character_flag_effect = yes + } + } + else = { + cp:councillor_court_chaplain = { + save_scope_as = tutor_6070 + court_event_character_flag_effect = yes + } + } + } + + #Option A: Get your court chaplain/court tutor to teach you (or try to...) + option = { + name = court.6070.a + random_list = { + 1 = { + desc = court.6070.a.success + modifier = { + factor = 2 + scope:tutor_6070.learning > root.learning + } + modifier = { + factor = 3 + has_trait = diligent + } + modifier = { + factor = 3 + scope:tutor_6070 = { has_trait = scholar } + } + modifier = { + factor = 2 + scope:tutor_6070 = { + has_education_learning_trigger = yes + } + } + modifier = { + factor = 1.5 + has_trait = patient + } + modifier = { + factor = 2 + has_trait = ambitious + } + modifier = { + factor = 1.5 + has_trait = intellect_good_1 + } + modifier = { + factor = 2 + has_trait = intellect_good_2 + } + modifier = { + factor = 3 + has_trait = intellect_good_3 + } + trigger_event = { + id = court.6071 + days = 100 + } + custom_tooltip = court.6070.a.tt.1 + show_as_tooltip = { + add_stress = minor_stress_loss + add_prestige = medium_prestige_gain + add_learning_skill = 1 + } + } + 1 = { + desc = court.6070.a.failure + modifier = { + factor = 2 + scope:tutor_6070.learning <= root.learning + } + modifier = { + factor = 4 + has_trait = lazy + } + modifier = { + factor = 2 + has_trait = fickle + } + modifier = { + factor = 2 + has_trait = impatient + } + modifier = { + factor = 2 + has_trait = content + } + modifier = { + factor = 4 + has_trait = irritable + } + modifier = { + factor = 1.5 + has_trait = intellect_bad_1 + } + modifier = { + factor = 2 + has_trait = intellect_bad_2 + } + modifier = { + factor = 3 + has_trait = intellect_bad_3 + } + modifier = { + factor = 2 + has_trait = dull + } + trigger_event = { + id = court.6072 + days = 100 + } + custom_tooltip = court.6070.a.tt.2 + show_as_tooltip = { + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + } + } + } + ai_chance = { + base = 150 + modifier = { + has_trait = diligent + add = 25 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = content + add = -25 + } + modifier = { + has_trait = ambitious + add = 50 + } + } + } + + #Option B: Yes, and you are proud of it! + option = { + name = court.6070.b + trigger = { + OR = { + has_trait = arrogant + has_trait = stubborn + } + } + every_courtier_or_guest = { + limit = { + learning >= low_skill_rating + } + custom = every_courtier_or_guest_6070_learning + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + change_current_court_grandeur = medium_court_grandeur_loss + stress_impact = { + base = medium_stress_impact_loss + diligent = medium_stress_impact_gain + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + has_trait = ambitious + add = -75 + } + modifier = { + has_trait = diligent + add = -25 + } + } + } + + after = { + clear_court_event_participation = yes + scope:tutor_6070 = { + clear_court_event_participation = yes + } + } +} + +court.6071 = { + type = character_event + title = court.6070.t + desc = court.6071.desc + theme = court + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:tutor_6070 + animation = happiness + } + + immediate = { + if = { + limit = { + scope:tutor_6070 = { + OR = { + is_alive = no + NOT = { + is_courtier_of = root + } + } + } + } + if = { + limit = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = tutor_6070 + } + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = tutor_6070 + } + } + else_if = { + limit = { + any_courtier_or_guest = { + is_available_ai_adult = yes + learning > low_skill_rating + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + learning > low_skill_rating + } + save_scope_as = tutor_6070 + } + } + else = { + create_character = { + location = root.location + template = scholar_character + save_scope_as = tutor_6070 + } + } + } + } + + #Option B: my tutor deserves compensation + option = { + name = court.6071.b + add_prestige = medium_prestige_gain + add_learning_skill = 2 + pay_short_term_gold = { + gold = minor_gold_value + target = scope:tutor_6070 + } + scope:tutor_6070 = { + add_character_flag = court_language_teacher + } + custom_tooltip = court.6071.b.tt + reverse_add_opinion = { + target = scope:tutor_6070 + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { + base = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + } +} + +court.6072 = { + type = character_event + title = court.6070.t + desc = court.6072.desc + theme = court + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:tutor_6070 + animation = disapproval + } + + artifact = { + position = lower_left_portrait + target = scope:newly_created_artifact + trigger = { exists = scope:newly_created_artifact } + } + + immediate = { + hidden_effect = { + scope:tutor_6070 = { + create_artifact = { + name = court_fancy_seal_modifier + description = court_fancy_seal_modifier_desc + type = miscellaneous + visuals = small_box + modifier = artifact_diplomacy_1_modifier + save_scope_as = newly_created_artifact + } + } + } + } + + #Option B: you use a seal instead of signing + option = { + name = court.6072.b + flavor = court.6072.b.tt + scope:newly_created_artifact = { + set_owner = { + target = root + history = { + type = given + actor = scope:tutor_6070 + recipient = root + } + } + } + } +} + +######################### +# The Munificence of X # +# 6080 # +# Claudia Baldassi # +######################### + +# A traveling ruler is spending a lot of money in your court and is making you look bad (Mansa Musa's pilgrimage) - do you attempt to match the visitor's generosity or profit from it? # + +scripted_trigger court_6080_valid_visitor_trigger = { + is_available_healthy_ai_adult = yes + is_travelling = yes + top_liege = this + OR = { + has_trait = generous + has_trait = improvident + has_trait = profligate + } + NOR = { + has_trait = greedy + this = root + } + gold >= 100 +} + +court.6080 = { + type = court_event + title = court.6080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + # The visiting ruler is your liege on a Tour + is_vassal_of = scope:6080_visitor + scope:6080_visitor = { involved_activity ?= { has_activity_type = activity_tour } } + } + desc = court.6080.desc_liege + } + desc = court.6080.desc + } + desc = court.6080.desc_middle + triggered_desc = { + trigger = { + exists = scope:beneficiary_2 + } + desc = court.6080.desc_2 + } + triggered_desc = { + trigger = { + exists = scope:beneficiary_child + } + desc = court.6080.desc_3 + } + desc = court.6080.desc_end + } + theme = court + + court_scene = { + button_position_character = scope:6080_visitor + roles = { + scope:6080_visitor = { + group = event_group + animation = personality_compassionate + } + scope:beneficiary_1 = { + group = event_group + animation = admiration + } + scope:beneficiary_2 = { + group = event_group + animation = admiration + } + } + } + + trigger = { + any_sub_realm_county = { + holder = root + any_county_province = { + any_character_in_location = { + court_6080_valid_visitor_trigger = yes + } + } + } + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + } + } + + immediate = { + random_sub_realm_county = { + limit = { + holder = root + any_county_province = { + any_character_in_location = { + court_6080_valid_visitor_trigger = yes + } + } + } + random_county_province = { + limit = { + any_character_in_location = { + court_6080_valid_visitor_trigger = yes + } + } + random_character_in_location = { + limit = { + court_6080_valid_visitor_trigger = yes + } + save_scope_as = 6080_visitor + } + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = beneficiary_1 + court_event_character_flag_effect = yes + } + if = { + limit = { + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + this != scope:beneficiary_1 + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + this != scope:beneficiary_1 + } + save_scope_as = beneficiary_2 + court_event_character_flag_effect = yes + } + } + if = { + limit = { + any_courtier_or_guest = { + is_available_ai_child = yes + has_court_event_flag = no + age >= 3 + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_child = yes + has_court_event_flag = no + } + save_scope_as = beneficiary_child + } + } + scope:6080_visitor = { + pay_short_term_gold = { + target = scope:beneficiary_1 + gold = tiny_gold_value + } + } + if = { + limit = { + exists = scope:beneficiary_2 + } + scope:6080_visitor = { + pay_short_term_gold = { + target = scope:beneficiary_2 + gold = tiny_gold_value + } + } + } + } + + #Option A: I can be even more generous! + option = { + name = court.6080.a + pay_short_term_gold = { + target = scope:beneficiary_1 + gold = minor_gold_value + } + reverse_add_opinion = { + target = scope:beneficiary_1 + modifier = grateful_opinion + opinion = 30 + } + if = { + limit = { + exists = scope:beneficiary_2 + } + pay_short_term_gold = { + target = scope:beneficiary_2 + gold = minor_gold_value + } + reverse_add_opinion = { + target = scope:beneficiary_2 + modifier = grateful_opinion + opinion = 30 + } + } + if = { + limit = { + exists = scope:beneficiary_child + } + reverse_add_opinion = { + target = scope:beneficiary_child + modifier = grateful_opinion + opinion = 30 + } + } + change_current_court_grandeur = medium_court_grandeur_gain + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + stress_impact = { + content = medium_stress_impact_gain + humble = major_stress_impact_gain + greedy = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { + has_trait = ambitious + add = 25 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = content + add = -25 + } + modifier = { + gold < medium_gold_value + factor = 0 + } + } + } + + #Option B: shamelessly ask for money too + option = { + name = court.6080.b + duel = { + target = scope:6080_visitor + skill = intrigue + 50 = { + desc = court.6080.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = court.6080.b.success.tt + scope:6080_visitor = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + } + } + 50 = { + desc = court.6080.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = court.6080.b.failure.tt + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + generous = major_stress_impact_gain + improvident = massive_stress_impact_gain + profligate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -0.5 + } + } + } + + #Option D: Better him spending than me + option = { + name = court.6080.d + change_current_court_grandeur = miniscule_court_grandeur_gain + stress_impact = { + greedy = minor_stress_impact_loss + generous = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = 10 + } + modifier = { + has_trait = content + add = 25 + } + } + } + after = { + scope:6080_visitor = { + clear_court_event_participation = yes + } + scope:beneficiary_1 = { + clear_court_event_participation = yes + } + if = { + limit = { + exists = scope:beneficiary_2 + } + scope:beneficiary_2 = { + clear_court_event_participation = yes + } + } + } +} + +######################### +# The Art of Rhetoric # +# 6090 # +# Claudia Baldassi # +######################### + +# Your Court Poet is giving a lecture to your children on the finer arts of rhetoric and they aren't having any of it # + +court.6090 = { + type = court_event + title = court.6090.t + desc = { + desc = court.6090.desc + first_valid = { + triggered_desc = { + trigger = { + scope:6090_poet = { + OR = { + has_court_position = court_poet_court_position + has_court_position = court_tutor_court_position + } + } + } + desc = court.6090.desc.cp + } + desc = court.6090.desc.teacher + } + desc = court.6090.desc.middle + triggered_desc = { + trigger = { + exists = scope:6090_child_c + } + desc = court.6090.desc_other + } + desc = court.6090.desc_end + } + theme = court + + court_scene = { + button_position_character = scope:6090_poet + roles = { + scope:6090_poet = { + group = event_group + animation = beg + } + scope:6090_child_a = { + group = event_group + animation = dismissal + } + scope:6090_child_b = { + group = event_group + animation = dismissal + } + } + } + + trigger = { + any_child = { + count >= 2 + is_available_ai_child = yes + has_court_event_flag = no + age >= 8 + location = root.location + } + } + + weight_multiplier = { + base = 1 + modifier = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + add = 1 + } + modifier = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + add = 1 + } + } + + immediate = { + random_court_position_holder = { + type = court_poet_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = 6090_poet + } + if = { + limit = { + NOT = { exists = scope:6090_poet } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = 6090_poet + } + } + if = { + limit = { + NOT = { exists = scope:6090_poet } + } + random_pool_character = { + province = root.location + limit = { + diplomacy >= 14 + } + save_scope_as = 6090_poet + } + } + if = { + limit = { + NOT = { exists = scope:6090_poet } + } + create_character = { + location = root.location + template = poet_template + save_scope_as = 6090_poet + } + scope:6090_poet = { add_character_flag = created_character } + } + scope:6090_poet = { court_event_character_flag_effect = yes } + every_child = { + limit = { + is_available_ai_child = yes + age >= 8 + location = root.location + } + add_to_list = rhetoric_children + } + ordered_in_list = { + list = rhetoric_children + order_by = age + max = 3 + check_range_bounds = no + if = { + limit = { + NOT = { exists = scope:6090_child_a } + } + save_scope_as = 6090_child_a + court_event_character_flag_effect = yes + } + else_if = { + limit = { + NOT = { exists = scope:6090_child_b } + } + save_scope_as = 6090_child_b + court_event_character_flag_effect = yes + } + else = { + save_scope_as = 6090_child_c + court_event_character_flag_effect = yes + } + } + } + + #Option A: Reprimand them + option = { + name = court.6090.a + scope:6090_poet = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + scope:6090_child_a = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + if = { + limit = { + scope:6090_poet = { + OR = { + has_court_position = court_poet_court_position + has_court_position = court_tutor_court_position + } + } + } + add_diplomacy_skill = 2 + } + else = { + add_diplomacy_skill = 1 + } + } + scope:6090_child_b = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + if = { + limit = { + scope:6090_poet = { + OR = { + has_court_position = court_poet_court_position + has_court_position = court_tutor_court_position + } + } + } + add_diplomacy_skill = 2 + } + else = { + add_diplomacy_skill = 1 + } + } + if = { + limit = { + exists = scope:6090_child_c + } + scope:6090_child_c = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + if = { + limit = { + scope:6090_poet = { + OR = { + has_court_position = court_poet_court_position + has_court_position = court_tutor_court_position + } + } + } + add_diplomacy_skill = 2 + } + else = { + add_diplomacy_skill = 1 + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = diligent + add = 100 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + #Option C: Side with them - court poet is booooring + option = { + name = court.6090.c + flavor = court.6090.c.tt + scope:6090_child_a = { + add_prowess_skill = 1 + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + scope:6090_child_b = { + add_prowess_skill = 1 + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + if = { + limit = { + exists = scope:6090_child_c + } + scope:6090_child_c = { + add_prowess_skill = 1 + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + } + scope:6090_poet = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -30 + } + } + stress_impact = { + ambitious = medium_stress_impact_gain + diligent = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = ambitious + add = -25 + } + modifier = { + has_trait = diligent + add = -75 + } + modifier = { + has_trait = lazy + add = 25 + } + modifier = { + has_trait = callous + add = 25 + } + } + } + after = { + scope:6090_poet = { + clear_court_event_participation = yes + if = { + limit = { + root = { is_ai = yes } + has_character_flag = created_character + } + silent_disappearance_effect = yes + } + } + scope:6090_child_a = { + clear_court_event_participation = yes + } + scope:6090_child_b = { + clear_court_event_participation = yes + } + scope:6090_child_c ?= { + clear_court_event_participation = yes + } + } +} + + + + +################################################## +# George + +################################################## +# 7300 Where's the Lamb Sauce? +# 7600 Wild at Heart +# 7610 Child asks for a destrier +# 7649 Courtier has harmed their bird +# 7700 Chief Eunuch trains a pigeon to steal things +################################################## + +######################### +# Where's the Lamb Sauce? +# by George Luff +# 7300 +######################### + +scripted_trigger court_7300_court_food_taster_trigger = { + has_court_position = food_taster_court_position + is_available_healthy_ai_adult = yes +} + +## Food Taster QUITS +court.7300 = { + type = court_event + title = court.7300.t + desc = court.7300.desc + theme = court + + court_scene = { + button_position_character = scope:taster + roles = { + scope:taster = { + group = event_group + animation = disgust + } + root = { + group = event_group + animation = worry + } + } + } + + cooldown = { years = 25 } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + trigger = { + has_court_event_flag = no + # Employs a food taster + any_court_position_holder = { + court_7300_court_food_taster_trigger = yes + has_court_event_flag = no + } + # The level of food amenities are crap + amenity_level = { + target = court_food_quality + value <= medium_amenity_level + } + NOT = { + government_has_flag = government_is_tribal + } + } + + immediate = { + court_event_character_flag_effect = yes + # Save Food Taster + random_court_position_holder = { + limit = { + court_7300_court_food_taster_trigger = yes + } + save_scope_as = taster + court_event_character_flag_effect = yes + } + } + + # invest more in food + option = { + name = court.7300.a + add_amenity_level = { type = court_food_quality value = 1 } + add_character_modifier = { + modifier = incentivized_food_taster + years = 15 + } + scope:taster = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + stress_impact = { + gluttonous = medium_stress_impact_loss + greedy = major_stress_impact_gain + generous = medium_stress_impact_loss + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 0.5 + ai_compassion = 1 + ai_greed = -1 + } + } + } + + # Let things be + option = { + name = court.7300.b + scope:taster = { + add_opinion = { + modifier = disgusted_opinion + target = root + opinion = -15 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + stubborn = medium_stress_impact_loss + callous = medium_stress_impact_loss + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + } + } + + after = { + clear_court_event_participation = yes + scope:taster = { + clear_court_event_participation = yes + } + } +} + + +######################### +# Wild at Heart +# by George Luff +# 7600 +######################### + +scripted_trigger active_child_trigger = { + age >= 7 + age <= 15 + is_landed = no + location = root.location + is_available_healthy_ai_child = yes + NOT = { has_character_flag = child_goes_hunting } +} + +court.7600 = { + type = court_event + title = court.7600.t + desc = court.7600.desc + theme = court + + court_scene = { + button_position_character = scope:child + roles = { + scope:child = { + group = event_group + animation = ecstasy + } + scope:huntmaster = { + group = event_group + animation = happiness + } + } + } + + cooldown = { years = 15 } + + weight_multiplier = { + base = 1 + + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + trigger = { + any_child = { + active_child_trigger = yes + has_court_event_flag = no + } + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position + is_available_healthy_ai_adult = yes + has_court_event_flag = no + } + NOT = { + culture = { has_cultural_tradition = tradition_vegetarianism } + } + } + + immediate = { + random_child = { + limit = { + active_child_trigger = yes + } + weight ={ + base = 1 + modifier = { + has_trait = rowdy + add = 2 + } + modifier = { + has_trait = curious + add = 1 + } + } + save_scope_as = child + court_event_character_flag_effect = yes + add_character_flag = child_goes_hunting + select_local_animal_effect = { TYPE = harmless } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = huntmaster + court_event_character_flag_effect = yes + } + } + + # Ban the outings + option = { + name = court.7600.a + scope:child = { + add_learning_skill = 2 + add_opinion = { + modifier = hate_opinion + target = root + opinion = -30 + } + } + stress_impact = { + lifestyle_hunter = major_stress_impact_gain + brave = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -1 + } + modifier = { + has_trait = lifestyle_hunter + factor = 0 + } + } + } + + # Approve the outings + option = { + name = court.7600.c + scope:child = { + add_prowess_skill = 1 + add_opinion = { + modifier = love_opinion + target = root + opinion = 15 + } + } + scope:huntmaster = { + custom_tooltip = 7600_taking_child_to_hunt.tt + add_character_flag = 7600_taking_child_to_hunt + if = { + limit = { + has_trait = lifestyle_hunter + } + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = 5 + } + } + else = { + add_trait = lifestyle_hunter + } + } + stress_impact = { + lifestyle_hunter = medium_stress_impact_loss + craven = medium_stress_impact_gain + scholar = minor_stress_impact_gain + theologian = minor_stress_impact_gain + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 1 + } + modifier = { + has_trait = paranoid + factor = 0 + } + } + } + after = { + scope:huntmaster = { + clear_court_event_participation = yes + } + scope:child = { + clear_court_event_participation = yes + } + } +} + + +######################### +# Spymaster trains a pigeon to steal things +# by George Luff +# 7700 +######################### + +scripted_trigger pigeon_assistance_scheme_trigger = { + OR = { + scheme_type = fabricate_hook + scheme_type = abduct + scheme_type = sway + scheme_type = murder + scheme_type = convert_to_witchcraft + } +} + +court.7700 = { + type = court_event + title = court.7700.t + desc = court.7700.desc + theme = court + court_scene = { + button_position_character = scope:spymaster + roles = { + scope:spymaster = { + group = event_group + animation = scheme + } + } + } + cooldown = { years = 25 } + + weight_multiplier = { + base = 1 + + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + trigger = { + cp:councillor_spymaster ?= { + is_available_ai_adult = yes + has_court_event_flag = no + } + any_scheme = { + pigeon_assistance_scheme_trigger = yes + } + } + + immediate = { + cp:councillor_spymaster = { + save_scope_as = spymaster + court_event_character_flag_effect = yes + } + random_scheme = { + limit = { + pigeon_assistance_scheme_trigger = yes + } + save_scope_as = scheme + } + scope:spymaster = { + add_character_modifier = { + modifier = pigeon_thief + years = 10 + } + } + } + + # Just this once, ok? + option = { + name = court.7700.b + # You've told them you need help, they are in on it now! + try_to_force_assign_character_to_random_agent_slot_effect = { + SCHEME = scope:scheme + CHAR = scope:spymaster + YEARS = 10 + } + add_character_modifier = { + modifier = profiting_from_pigeon_thievery + years = 10 + } + stress_impact = { + honest = massive_stress_impact_gain + just = major_stress_impact_gain + compassionate = medium_stress_impact_gain + brave = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + ai_compassion = -0.5 + } + } + } + + # Turn the spymaster away + option = { + name = court.7700.d + add_prestige = minor_prestige_gain + stress_impact = { + deceitful = major_stress_impact_gain + vengeful = major_stress_impact_gain + fickle = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_honor = 1 + } + } + } + after = { + scope:spymaster = { + clear_court_event_participation = yes + } + } +} + + + + + + + + + + +################################################## +# Joe Parkin + +# 8001 - Trampled Underfoot +# 8010 - Underequipped +# 8020 - Sartorial Sting +# 8030 - Pawful of Pooches +# 8040 - Aristocratic Pretensions +# 8050 - A Little Bird +# 8070 - Feeling Useful +# 8080 - Maternal Reproach +# 8090 - Building Blocks +# 8120 - Novel Perspectives +# 8140 - Royal Lapse +# 8150 - Prandial Excess +# 8160 - Foremost Knight + +######################### +# Trampled Underfoot # +# by Joe Parkin # +######################### + +scripted_trigger court_8001_child_trigger = { + is_available = yes + is_healthy = yes + age > 3 + age < 12 + has_any_focus = yes + NOT = { has_variable = court_8001_child_flag } + location = root.location +} + +scripted_effect court_8001_skill_effect = { + duel = { + skill = $SKILL$ + value = decent_skill_rating + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -49 + } + min = 1 + desc = court.8001.a.success + send_interface_toast = { + left_icon = scope:child_1 + title = court.8001.a.lesson_tt + scope:child_1 = { add_$SKILL$_skill = 2 } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 2 + desc = court.8001.a.success + send_interface_toast = { + left_icon = scope:child_1 + title = court.8001.a.lesson_tt + scope:child_1 = { add_$SKILL$_skill = 1 } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = court.8001.a.failure + } + } + stress_impact = { + base = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + callous = minor_stress_impact_gain + } +} + +court.8001 = { + type = court_event + title = court.8001.t + desc = { + desc = court.8001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_diplomacy } + } + desc = court.8001.desc.diplomacy + } + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_martial } + } + desc = court.8001.desc.martial + } + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_stewardship } + } + desc = court.8001.desc.stewardship + } + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_intrigue } + } + desc = court.8001.desc.intrigue + } + triggered_desc = { + trigger = { + scope:child_1 = { has_focus = education_learning } + } + desc = court.8001.desc.learning + } + desc = court.8001.desc.fallback + } + desc = court.8001.desc.closing + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:gardener + roles = { + root = { + group = event_group + animation = war_over_tie + } + scope:gardener = { + group = event_group + animation = rage + } + scope:child_1 = { + group = event_group + animation = shame + } + } + } + + trigger = { + any_courtier_or_guest = { + count >= 1 + court_8001_child_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + employs_court_position = court_gardener_court_position + any_court_position_holder = { + type = court_gardener_court_position + is_available_healthy_ai_adult = yes + has_court_event_flag = no + } + add = 2 + } + modifier = { + has_trait = lifestyle_gardener + add = 2 + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + random_court_position_holder = { + type = court_gardener_court_position + limit = { is_available_healthy_ai_adult = yes } + save_scope_as = gardener + } + if = { + limit = { + NOT = { exists = scope:gardener } + } + create_character = { + location = root.location + template = gardener_template + save_scope_as = gardener + } + scope:gardener = { add_character_flag = created_character } + } + scope:gardener = { + court_event_character_flag_effect = yes + } + random_courtier_or_guest = { + limit = { + court_8001_child_trigger = yes + OR = { + is_child_of = root + any_relation = { + type = guardian + this = root + } + } + } + alternative_limit = { court_8001_child_trigger = yes } + save_scope_as = child_1 + court_event_character_flag_effect = yes + set_variable = { + name = court_8001_child_flag + days = 3650 + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.diplomacy + trigger = { + scope:child_1 = { has_focus = education_diplomacy } + } + skill = diplomacy + court_8001_skill_effect = { SKILL = diplomacy } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.martial + trigger = { + scope:child_1 = { has_focus = education_martial } + } + skill = martial + court_8001_skill_effect = { SKILL = martial } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.stewardship + trigger = { + scope:child_1 = { has_focus = education_stewardship } + } + skill = stewardship + court_8001_skill_effect = { SKILL = stewardship } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.intrigue + trigger = { + scope:child_1 = { has_focus = education_intrigue } + } + skill = intrigue + court_8001_skill_effect = { SKILL = intrigue } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Encourage the child's interests + name = court.8001.a.learning + trigger = { + scope:child_1 = { has_focus = education_learning } + } + skill = learning + court_8001_skill_effect = { SKILL = learning } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Replant them + name = court.8001.c + scope:child_1 = { + random = { + chance = 20 + modifier = { + scope:gardener = { has_court_position = court_gardener_court_position } + add = 5 + } + modifier = { + scope:gardener = { has_trait = lifestyle_gardener } + add = 10 + } + modifier = { + has_trait = diligent + add = 10 + } + modifier = { + has_trait = lazy + add = -10 + } + root = { + send_interface_toast = { + left_icon = scope:child_1 + title = court.8001.c.gardener_tt + scope:child_1 = { add_trait = lifestyle_gardener } + } + } + } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -20 + } + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + stress_impact = { + just = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Dismiss the gardener's protests (opt out) + name = court.8001.e + reverse_add_opinion = { + target = scope:gardener + modifier = annoyed_opinion + opinion = -20 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + } + } + + after = { + scope:gardener = { + clear_court_event_participation = yes + if = { + limit = { + root = { is_ai = yes } + has_character_flag = created_character + } + silent_disappearance_effect = yes + } + } + scope:child_1 = { + clear_court_event_participation = yes + } + + } +} + +######################### +# Underequipped # +# by Joe Parkin # +######################### + +scripted_trigger court_8010_underequipped_trigger = { + is_available_healthy_ai_adult = yes + OR = { + NOT = { + any_character_artifact = { artifact_slot_type = primary_armament } + } + any_character_artifact = { + count = all + artifact_slot_type = primary_armament + OR = { + var:quality < 25 + ep1_artifact_durability_lower_equal_percent_trigger = { PERCENT = 0.24 } # could be replaced by checking LOW_DURATION + } + } + } +} + +court.8010 = { + type = court_event + title = court.8010.t + desc = { + desc = court.8010.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:underequipped = { + OR = { + has_court_position = bodyguard_court_position + has_court_position = akolouthos_court_position + } + } + } + desc = court.8010.desc.bodyguard + } + triggered_desc = { + trigger = { + scope:underequipped = { has_court_position = champion_court_position } + } + desc = court.8010.desc.champion + } + desc = court.8010.desc.knight + } + first_valid = { + triggered_desc = { + trigger = { + scope:underequipped = { + OR = { + has_trait = brave + has_trait = wrathful + has_trait = arrogant + has_trait = impatient + has_trait = ambitious + } + } + } + desc = court.8010.desc.bold + } + desc = court.8010.desc.meek + } + desc = court.8010.desc.body + random_valid = { + triggered_desc = { + trigger = { + scope:underequipped = { + OR = { + has_court_position = bodyguard_court_position + has_court_position = akolouthos_court_position + is_knight_of = root + } + } + } + desc = court.8010.desc.bodyguard_end + } + triggered_desc = { + trigger = { + scope:underequipped = { has_court_position = champion_court_position } + } + desc = court.8010.desc.champion_end + } + } + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:underequipped + roles = { + scope:underequipped = { + group = event_group + animation = sadness + } + root = { + group = event_group + animation = idle + } + } + } + + trigger = { + has_court_event_flag = no + OR = { + any_court_position_holder = { + type = bodyguard_court_position + court_8010_underequipped_trigger = yes + has_court_event_flag = no + location = root.location + } + any_court_position_holder = { + type = champion_court_position + court_8010_underequipped_trigger = yes + has_court_event_flag = no + location = root.location + } + any_court_position_holder = { + type = akolouthos_court_position + court_8010_underequipped_trigger = yes + has_court_event_flag = no + location = root.location + } + any_knight = { + court_8010_underequipped_trigger = yes + has_court_event_flag = no + is_landed = no + location = root.location + } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + court_event_character_flag_effect = yes + hidden_effect = { + random_list = { + 4 = { + trigger = { + any_court_position_holder = { + type = bodyguard_court_position + court_8010_underequipped_trigger = yes + location = root.location + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + court_8010_underequipped_trigger = yes + location = root.location + } + save_scope_as = underequipped + court_event_character_flag_effect = yes + } + } + 4 = { + trigger = { + any_court_position_holder = { + type = champion_court_position + court_8010_underequipped_trigger = yes + location = root.location + } + } + random_court_position_holder = { + type = champion_court_position + limit = { + court_8010_underequipped_trigger = yes + location = root.location + } + save_scope_as = underequipped + court_event_character_flag_effect = yes + } + } + 8 = { + trigger = { + any_court_position_holder = { + type = akolouthos_court_position + court_8010_underequipped_trigger = yes + location = root.location + } + } + random_court_position_holder = { + type = akolouthos_court_position + limit = { + court_8010_underequipped_trigger = yes + location = root.location + } + save_scope_as = underequipped + court_event_character_flag_effect = yes + } + } + 1 = { + trigger = { + any_knight = { + court_8010_underequipped_trigger = yes + location = root.location + is_landed = no + } + } + random_knight = { + limit = { + court_8010_underequipped_trigger = yes + location = root.location + is_landed = no + } + save_scope_as = underequipped + court_event_character_flag_effect = yes + } + } + } + } + random_dummy_gender_effect = yes #To feed to the weapon effect since we don't have a creator + scope:underequipped = { set_signature_weapon_effect = yes } #To create an artifact of the "signature weapon" type + if = { + limit = { + any_character_artifact = { + count > 1 + artifact_slot_type = primary_armament + } + } + ordered_character_artifact = { + limit = { + is_equipped = no + artifact_slot_type = primary_armament + } + order_by = { + value = 0 + subtract = var:quality + } + save_scope_as = my_weapon + } + } + } + + option = { # Have a sword made + name = court.8010.a + change_current_court_grandeur = medium_court_grandeur_gain + remove_short_term_gold = medium_gold_value + custom_tooltip = court.8010.a.tt + hidden_effect = { + scope:underequipped = { + if = { + limit = { var:signature_weapon = flag:axe } + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_axe + } + } + else_if = { + limit = { var:signature_weapon = flag:hammer } + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_hammer + } + } + else_if = { + limit = { var:signature_weapon = flag:spear } + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_spear + } + } + else_if = { + limit = { var:signature_weapon = flag:mace } + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_mace + } + } + else = { #For swords, but also as fallback - no daggers here + create_artifact_weapon_effect = { + OWNER = scope:underequipped + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_sword + } + } + } + if = { + limit = { exists = scope:newly_created_artifact } # To avoid errors + send_interface_toast = { + title = court.8010.a.equipped_tt + left_icon = scope:underequipped + right_icon = scope:newly_created_artifact + scope:newly_created_artifact = { + set_owner = { + target = scope:underequipped + history = { + location = root.capital_province + actor = root + recipient = scope:underequipped + type = given + } + } + } + } + } + } + scope:underequipped = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + stress_impact = { + greedy = major_stress_impact_gain # It's too expensive + callous = medium_stress_impact_gain # So? + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Give lesser owned sword + name = court.8010.c + trigger = { exists = scope:my_weapon } + add_prestige = major_prestige_gain + scope:underequipped = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + send_interface_toast = { + title = court.8010.c.equipped_tt + left_icon = scope:underequipped + right_icon = scope:my_weapon + scope:my_weapon = { + set_owner = { + target = scope:underequipped + history = { + location = root.capital_province + actor = root + recipient = scope:underequipped + type = given + } + } + } + } + stress_impact = { + greedy = major_stress_impact_gain # My precious?! + arrogant = medium_stress_impact_gain # My swords are too strong for you traveler + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + } + } + + option = { # Give a sword from the armory (opt out) + name = court.8010.d + change_current_court_grandeur = minor_court_grandeur_loss + custom_tooltip = court.8010.d.tt + scope:underequipped = { + if = { + limit = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = primary_armament + ep1_artifact_durability_lower_equal_percent_trigger = { PERCENT = 0.99 } + } + } + random_character_artifact = { + limit = { + is_equipped = yes + artifact_slot_type = primary_armament + ep1_artifact_durability_lower_equal_percent_trigger = { PERCENT = 0.49 } + } + add_durability = { + value = artifact_max_durability + multiply = 0.25 + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 2 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = paranoid + } + + } + } + + after = { + clear_court_event_participation = yes + scope:underequipped = { + clear_court_event_participation = yes + } + } +} + +######################### +# Sartorial Sting # +# by Joe Parkin # +######################### + +court.8020 = { + type = court_event + title = court.8020.t + desc = court.8020.desc + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:couture_spouse + roles = { + scope:couture_spouse = { + group = event_group + animation = anger + } + scope:couture_guest = { + group = event_group + animation = schadenfreude + } + } + } + + trigger = { + amenity_level = { target = court_fashion value <= medium_amenity_level } + is_married = yes + primary_spouse = { + is_alive = yes + has_court_event_flag = no + } + any_pool_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + } + + NOT = { + government_has_flag = government_is_tribal # No changing amenities above what's legal for tribals + } + } + + weight_multiplier = { + base = 1 + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + primary_spouse = { + save_scope_as = couture_spouse + court_event_character_flag_effect = yes + } + random_pool_guest = { + limit = { is_available_ai_adult = yes } + weight = { + base = 1 + modifier = { + factor = 20 + culture != root.culture + } + modifier = { + factor = 10 + sex_same_as = root.primary_spouse + } + } + save_scope_as = couture_guest + court_event_character_flag_effect = yes + } + primary_spouse = { + progress_towards_rival_effect = { + CHARACTER = scope:couture_guest + REASON = rival_couture_criticised + OPINION = 0 + } + } + } + + option = { # Make an effort + name = court.8020.b + set_amenity_level = { type = court_fashion value = high_amenity_level } + remove_short_term_gold = minor_gold_value + capital_county = { + add_county_modifier = { + modifier = fashion_industry_county_modifier + years = 25 + } + } + stress_impact = { + greedy = medium_stress_impact_gain # It's too espensive + content = medium_stress_impact_gain # What's wrong with our clothes? + humble = medium_stress_impact_gain # These clothes are good enough + improvident = medium_stress_impact_loss # Shopping! + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = content + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { + gold < minor_gold_value + factor = 0 + } + } + } + + option = { # Laugh it off (opt out) + name = court.8020.a + add_prestige = minor_prestige_gain + change_current_court_grandeur = minor_court_grandeur_loss + primary_spouse = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + base = minor_stress_impact_loss + arrogant = medium_stress_impact_gain # How dare they mock us + wrathful = medium_stress_impact_gain # Why I 'oughta + vengeful = medium_stress_impact_gain # They said what?! + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -2 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + } + } + + after = { + scope:couture_guest = { + clear_court_event_participation = yes + } + scope:couture_spouse = { + clear_court_event_participation = yes + } + } +} + +######################### +# Pawful of Pooches # +# by Joe Parkin # +######################### + +scripted_trigger court_8030_child_trigger = { + age >= 6 + is_adult = no + is_available = yes + NOT = { has_character_modifier = dog_story_modifier } +} + +court.8030 = { + type = court_event + title = court.8030.t + desc = { + desc = court.8030.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:child_2 } + desc = court.8030.desc.two + } + desc = court.8030.desc.one + } + desc = court.8030.desc.body + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:huntmaster + roles = { + scope:huntmaster = { + group = event_group + animation = happiness + } + scope:child_1 = { + group = event_group + animation = beg + } + scope:child_2 = { + group = event_group + animation = interested + } + } + } + + trigger = { + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position + is_available_ai_adult = yes + has_court_event_flag = no + } + any_child = { + court_8030_child_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = huntmaster + court_event_character_flag_effect = yes + } + random_child = { + limit = { court_8030_child_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 2 + has_trait = curious + } + modifier = { + factor = 2 + has_trait = charming + } + modifier = { + factor = 2 + has_focus = education_diplomacy + } + } + save_scope_as = child_1 + court_event_character_flag_effect = yes + } + if = { + limit = { + any_child = { + court_8030_child_trigger = yes + this != scope:child_1 + } + } + random_child = { + limit = { + court_8030_child_trigger = yes + this != scope:child_1 + } + weight = { + base = 1 + modifier = { + factor = 2 + has_trait = curious + } + modifier = { + factor = 2 + has_trait = charming + } + modifier = { + factor = 2 + has_focus = education_diplomacy + } + } + save_scope_as = child_2 + court_event_character_flag_effect = yes + } + } + } + + option = { + name = court.8030.a + change_current_court_grandeur = medium_court_grandeur_gain + add_character_modifier = { + modifier = hunting_pooches_modifier + years = 10 + } + stress_impact = { + lifestyle_hunter = major_stress_impact_loss + greedy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + family_first = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 1 + ai_honor = 1 + } + modifier = { #Weight up. + add = 30 + has_trait = lifestyle_hunter + } + } + } + + option = { + name = court.8030.b + scope:child_1 = { + start_dog_story_cycle_effect = yes + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + if = { + limit = { exists = scope:child_2 } + scope:child_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + stress_impact = { + lifestyle_hunter = medium_stress_impact_gain + just = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = 1 + } + modifier = { #Weight up. + add = -15 + has_trait = lifestyle_hunter + } + modifier = { #Weight up. + add = -5 + has_trait = just + } + modifier = { #Weight up. + add = -15 + has_trait = callous + } + } + } + + option = { + name = court.8030.c + trigger = { exists = scope:child_2 } + scope:child_2 = { + start_dog_story_cycle_effect = yes + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + scope:child_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + stress_impact = { + lifestyle_hunter = medium_stress_impact_gain + just = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = 1 + } + modifier = { #Weight up. + add = -15 + has_trait = lifestyle_hunter + } + modifier = { #Weight up. + add = -5 + has_trait = just + } + modifier = { #Weight up. + add = -15 + has_trait = callous + } + } + } + + option = { + name = court.8030.d + trigger = { + NOT = { has_character_modifier = dog_story_modifier } + } + start_dog_story_cycle_effect = yes + scope:child_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + if = { + limit = { exists = scope:child_2 } + scope:child_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + stress_impact = { + lifestyle_hunter = medium_stress_impact_gain + just = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = 1 + } + modifier = { #Weight up. + add = -15 + has_trait = lifestyle_hunter + } + modifier = { #Weight up. + add = -5 + has_trait = just + } + modifier = { #Weight up. + add = -15 + has_trait = generous + } + } + } + after = { + scope:huntmaster = { + clear_court_event_participation = yes + } + scope:child_1 = { + clear_court_event_participation = yes + } + if = { + limit = { exists = scope:child_2 } + scope:child_2 = { + clear_court_event_participation = yes + } + } + } +} +############################ +# Aristocratic Pretensions # +# by Joe Parkin # +############################ + +scripted_trigger court_8040_courtier_trigger = { + is_available_healthy_ai_adult = yes + any_held_title = { count = 0 } + NOR = { + is_close_family_of = root + has_trait = content + has_trait = humble + is_hostage = yes + } + trigger_if = { + limit = { is_female = yes } + root = { faith_dominant_gender_female_or_equal = yes } + } + trigger_else = { faith_dominant_gender_male_or_equal = yes } +} + +scripted_effect court_8040_grant_effect = { + send_interface_toast = { + left_icon = scope:new_noble + title = court.8040.grant_tt + root = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:new_noble = { + if = { + limit = { scope:worst_title.tier = tier_barony } + add_opinion = { + target = root + modifier = received_title_barony + opinion = 30 + } + } + else = { + add_opinion = { + target = root + modifier = received_title_county + opinion = 50 + } + } + } + if = { + limit = { + can_add_hook = { + target = scope:new_noble + type = indebted_hook + } + } + add_hook = { + target = scope:new_noble + type = indebted_hook + } + } + scope:new_noble = { + add_character_flag = { + flag = joining_faction_block + years = 20 + } + } + custom_tooltip = joining_faction_block_tt + every_in_list = { + list = court_8040_list + limit = { + this != scope:new_noble + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + } +} + +scripted_effect court_8040_desc_effect = { + if = { + limit = { + has_any_court_position = yes + NOT = { exists = scope:position_holder } + } + save_scope_as = position_holder + } + else_if = { + limit = { + is_knight = yes + NOT = { exists = scope:knight } + } + save_scope_as = knight + } + else_if = { + limit = { + is_close_or_extended_family_of = root + NOT = { exists = scope:relative } + } + save_scope_as = relative + } + else_if = { + limit = { + has_trait = ambitious + NOT = { exists = scope:ambitious } + } + save_scope_as = ambitious + } + else_if = { + limit = { + has_trait = arrogant + NOT = { exists = scope:arrogant } + } + save_scope_as = arrogant + } + else_if = { + limit = { + is_lowborn = yes + NOT = { exists = scope:lowborn } + } + save_scope_as = lowborn + } + else_if = { + limit = { + is_lowborn = no + NOT = { exists = scope:gentry } + } + save_scope_as = gentry + } + else = { + if = { + limit = { NOT = { exists = scope:generic_1 } } + save_scope_as = generic_1 + } + else_if = { + limit = { NOT = { exists = scope:generic_2 } } + save_scope_as = generic_2 + } + else = { save_scope_as = generic_3 } + } +} + +court.8040 = { + type = court_event + title = court.8040.t + desc = { + desc = court.8040.desc.intro + triggered_desc = { + trigger = { exists = scope:position_holder } + desc = court.8040.desc.position_holder + } + triggered_desc = { + trigger = { exists = scope:knight } + desc = court.8040.desc.knight + } + triggered_desc = { + trigger = { exists = scope:relative } + desc = court.8040.desc.relative + } + triggered_desc = { + trigger = { exists = scope:ambitious } + desc = court.8040.desc.ambitious + } + triggered_desc = { + trigger = { exists = scope:arrogant } + desc = court.8040.desc.arrogant + } + triggered_desc = { + trigger = { exists = scope:lowborn } + desc = court.8040.desc.lowborn + } + triggered_desc = { + trigger = { exists = scope:gentry } + desc = court.8040.desc.gentry + } + triggered_desc = { + trigger = { exists = scope:generic_1 } + desc = court.8040.desc.generic_1 + } + triggered_desc = { + trigger = { exists = scope:generic_2 } + desc = court.8040.desc.generic_2 + } + triggered_desc = { + trigger = { exists = scope:generic_3 } + desc = court.8040.desc.generic_3 + } + desc = court.8040.desc.body + } + theme = court + override_background = { reference = throne_room } + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:courtier_3 + roles = { + scope:courtier_1 = { + group = event_group + animation = personality_irrational + } + scope:courtier_2 = { + group = event_group + animation = personality_coward + } + scope:courtier_3 = { + group = event_group + animation = personality_dishonorable + } + } + } + + trigger = { + has_royal_court = yes + any_courtier = { + count >= 3 + court_8040_courtier_trigger = yes + has_court_event_flag = no + } + OR = { + any_held_title = { + title_tier = barony + is_capital_barony = no + is_leased_out = no + this != root.capital_barony + } + any_held_title = { + count >= 4 + title_tier = county + is_landless_type_title = no + } + } + domain_limit_available < 0 + } + + weight_multiplier = { + base = 1 + modifier = { + is_ai = yes + factor = 0.5 + } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + ordered_courtier = { # Find 3 courtiers and determine their flaws + limit = { court_8040_courtier_trigger = yes } + max = 3 + check_range_bounds = no + order_by = prestige + if = { + limit = { NOT = { exists = scope:courtier_1 } } + save_scope_as = courtier_1 + court_event_character_flag_effect = yes + court_8040_desc_effect = yes + } + else_if = { + limit = { NOT = { exists = scope:courtier_2 } } + save_scope_as = courtier_2 + court_event_character_flag_effect = yes + court_8040_desc_effect = yes + } + else = { + save_scope_as = courtier_3 + court_event_character_flag_effect = yes + court_8040_desc_effect = yes + } + add_to_list = court_8040_list + if = { + limit = { NOT = { exists = scope:button } } + save_scope_as = button # For button character + } + } + if = { # Find a valid barony to give away + limit = { + any_held_title = { + title_tier = barony + is_capital_barony = no + is_leased_out = no + this != root.capital_barony + } + } + ordered_held_title = { + title_tier = barony + limit = { + is_capital_barony = no + is_leased_out = no + this != root.capital_barony + } + order_by = { + value = 0 + subtract = title_province.combined_building_level + } + save_scope_as = worst_title + } + } + else = { # Find a valid county to give away + ordered_held_title = { + title_tier = county + limit = { + this != root.capital_county + is_landless_type_title = no + } + order_by = { + value = 0 + subtract = development_level + } + save_scope_as = worst_title + } + } + } + + option = { # Best courtier wins - fight + name = court.8040.d + flavor = court.8040.d.flavor_tt + random_list = { + 2 = { + desc = court.8040.d.courtier_1_tt + modifier = { + add = scope:courtier_1.prowess + } + scope:courtier_1 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + 2 = { + desc = court.8040.d.courtier_2_tt + modifier = { + add = scope:courtier_2.prowess + } + scope:courtier_2 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + 2 = { + desc = court.8040.d.courtier_3_tt + modifier = { + add = scope:courtier_3.prowess + } + scope:courtier_3 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + } + every_in_list = { + list = court_8040_list + increase_wounds_no_death_effect = { REASON = duel } + } + hidden_effect = { court_8040_grant_effect = yes } + stress_impact = { + lifestyle_blademaster = medium_stress_impact_loss # Yay fighty slash + viking = medium_stress_impact_loss # Yay fighty slash + varangian = medium_stress_impact_loss # Yay fighty slash + berserker = medium_stress_impact_loss # Yay fighty slash + brave = medium_stress_impact_loss # Yay fighty slash + greedy = medium_stress_impact_gain # But, titles + diligent = medium_stress_impact_gain # But, I like managing stuff + arrogant = medium_stress_impact_gain # But, my titles + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 2 + ai_greed = -0.5 + } + modifier = { #Weight up for stress. + add = 15 + has_trait = lifestyle_blademaster + } + modifier = { #Weight up for stress. + add = 15 + has_trait = viking + } + modifier = { #Weight up for stress. + add = 15 + has_trait = varangian + } + modifier = { #Weight up for stress. + add = 15 + has_trait = berserker + } + modifier = { #Weight up for stress. + add = 15 + has_trait = berserker + } + modifier = { #Weight up for stress. + add = 15 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + } + } + + option = { # Best courtier wins - persuasion + name = court.8040.e + change_current_court_grandeur = medium_court_grandeur_gain + random_list = { + 2 = { + desc = court.8040.e.courtier_1_tt + modifier = { + add = scope:courtier_1.diplomacy + } + scope:courtier_1 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + 2 = { + desc = court.8040.e.courtier_2_tt + modifier = { + add = scope:courtier_2.diplomacy + } + scope:courtier_2 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + 2 = { + desc = court.8040.e.courtier_3_tt + modifier = { + add = scope:courtier_3.diplomacy + } + scope:courtier_3 = { save_scope_as = new_noble } + show_as_tooltip = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:worst_title = { + change_title_holder = { + holder = scope:new_noble + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } + } + stress_impact = { + lifestyle_poet = medium_stress_impact_loss # Poetry duels are my jam + gregarious = medium_stress_impact_loss # Having fun with friends was the real reward + diplomat = medium_stress_impact_loss # Solving problems with words is the coolest + greedy = medium_stress_impact_gain # But, titles + diligent = medium_stress_impact_gain # But, I like managing stuff + arrogant = medium_stress_impact_gain # But, my titles + } + hidden_effect = { court_8040_grant_effect = yes } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -0.5 + } + modifier = { #Weight up for stress. + add = 15 + has_trait = lifestyle_poet + } + modifier = { #Weight up for stress. + add = 15 + has_trait = gregarious + } + modifier = { #Weight up for stress. + add = 15 + has_trait = diplomat + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + } + } + + option = { # You get nothing! + name = court.8040.f + add_prestige = minor_prestige_gain + every_in_list = { + list = court_8040_list + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + stress_impact = { + generous = medium_stress_impact_gain # But I have so much to give + lazy = medium_stress_impact_gain # I would rather have someone else do it + humble = medium_stress_impact_gain # Who am I to deny them? + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = 1 + } + modifier = { # Weight up for NO family members. + factor = 2 + NOR = { + scope:courtier_1 = { is_close_or_extended_family_of = root } + scope:courtier_2 = { is_close_or_extended_family_of = root } + scope:courtier_3 = { is_close_or_extended_family_of = root } + } + } + modifier = { # Weight up for NO dynasty members. + factor = 2 + NOR = { + scope:courtier_1.dynasty = root.dynasty + scope:courtier_2.dynasty = root.dynasty + scope:courtier_3.dynasty = root.dynasty + } + } + modifier = { # Weight up for NO opinion. + factor = 2 + NOR = { + opinion = { + target = scope:courtier_1 + value >= 50 + } + opinion = { + target = scope:courtier_2 + value >= 50 + } + opinion = { + target = scope:courtier_3 + value >= 50 + } + } + } + modifier = { #Weight down for stress. + add = -15 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + } + } + after = { + scope:courtier_1 = { + clear_court_event_participation = yes + } + scope:courtier_2 = { + clear_court_event_participation = yes + } + scope:courtier_3 = { + clear_court_event_participation = yes + } + } +} + +######################### +# A Little Bird # +# by Joe Parkin # +######################### + +scripted_trigger court_8050_secrets_trigger = { + is_ai = yes + has_any_secrets = yes + any_secret = { + NOT = { + any_secret_knower = { this = root } + } + } +} + +court.8050 = { + type = court_event + title = court.8050.t + desc = court.8050.desc + theme = court + override_background = { reference = throne_room } + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:servant + roles = { + ROOT = { + group = event_group + animation = throne_room_conversation_4 + } + scope:servant = { + group = event_group + animation = throne_room_conversation_1 + } + } + } + + trigger = { + has_royal_court = yes + has_court_event_flag = no + OR = { + any_vassal = { + court_8050_secrets_trigger = yes + has_court_event_flag = no + } + any_courtier_or_guest = { + court_8050_secrets_trigger = yes + has_court_event_flag = no + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + } + amenity_level = { + target = court_servants + value > high_amenity_level + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + amenity_level = { + target = court_servants + value = max_amenity_level + } + } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + court_event_character_flag_effect = yes + every_vassal = { + limit = { court_8050_secrets_trigger = yes } + add_to_list = court_8050_secret_list + } + every_courtier_or_guest = { + limit = { + court_8050_secrets_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + add_to_list = court_8050_secret_list + } + random_in_list = { + list = court_8050_secret_list + weight = { + base = 1 + modifier = { + factor = primary_title.tier + } + modifier = { + factor = 2 + any_secret = { + any_secret_knower = { count > 2 } + } + } + modifier = { + factor = 3 + is_landed = yes + } + } + save_scope_as = vassal + random_secret = { + limit = { + NOT = { + any_secret_knower = { this = root } + } + } + weight = { + modifier = { + factor = 2 + any_secret_knower = { count > 2 } + } + } + save_scope_as = vassal_secret + reveal_to = root + } + } + if = { + limit = { + any_in_list = { + list = court_8050_secret_list + this != scope:vassal + } + } + random_in_list = { + list = court_8050_secret_list + limit = { this != scope:vassal } + save_scope_as = vassal_2 + random_secret = { + limit = { + NOT = { + any_secret_knower = { this = root } + } + } + weight = { + modifier = { + factor = 2 + any_secret_knower = { count > 2 } + } + } + save_scope_as = secret_2 + } + } + } + hidden_effect = { + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + save_scope_as = servant + } + } + } + + option = { # What else have you heard? + name = court.8050.b + trigger = { exists = scope:secret_2 } + add_prestige = minor_prestige_loss + custom_tooltip = court.8050.b.tt + hidden_effect = { + send_interface_toast = { + title = court.8050.b.tt_secret + left_icon = scope:vassal_2 + scope:secret_2 = { reveal_to = root } + } + } + scope:servant = { silent_disappearance_effect = yes } + stress_impact = { + schemer = medium_stress_impact_loss + trusting = medium_stress_impact_gain # What if people spy on me too?! + honest = medium_stress_impact_gain # This isn't above board + humble = medium_stress_impact_gain # It is not my business + lazy = medium_stress_impact_gain # Sounds like effort + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -2 + ai_energy = 2 + } + modifier = { # Weight down for stress. + add = 15 + has_trait = schemer + } + modifier = { # Weight down for stress. + add = -15 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -15 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Keep me informed + name = court.8050.c + remove_short_term_gold = minor_gold_value + add_character_modifier = { + modifier = servant_informants_modifier + years = 5 + } + custom_tooltip = court.8050.c.tt + scope:servant = { silent_disappearance_effect = yes } + stress_impact = { + schemer = medium_stress_impact_loss # Sweet, sweet scheming + trusting = medium_stress_impact_gain # What if people spy on me too?! + honest = medium_stress_impact_gain # This isn't above board + humble = medium_stress_impact_gain # It is not my business + lazy = medium_stress_impact_gain # Sounds like effort + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -2 + ai_energy = 2 + } + modifier = { # Weight down for stress. + add = 15 + has_trait = schemer + } + modifier = { # Weight down for stress. + add = -15 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -15 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -15 + has_trait = lazy + } + } + } + + option = { # Thanks for your service (opt out) + name = court.8050.a + stress_impact = { + deceitful = medium_stress_impact_gain # I could have learned so much more... + arrogant = medium_stress_impact_gain # I don't surround myself with commoners + paranoid = medium_stress_impact_gain # What do they know about me instead?? + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { # Weight down for stress. + add = -15 + has_trait = deceitful + } + modifier = { # Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -15 + has_trait = paranoid + } + } + } + + after = { + clear_court_event_participation = yes + scope:servant ?= { + clear_court_event_participation = yes + } + } +} + + +######################### +# Building Blocks # +# by Joe Parkin # +######################### + +scripted_trigger court_8090_barony_trigger = { + tier = tier_barony + is_leased_out = no + title_province.free_building_slots > 0 + county != scope:my_county +} + +court.8090 = { + type = court_event + title = court.8090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:architect = { has_court_position = royal_architect_court_position } + } + desc = court.8090.desc.intro + } + desc = court.8090.desc.intro_alt + } + desc = court.8090.desc.intro_end + first_valid = { + triggered_desc = { + trigger = { + exists = scope:chaplain + scope:chaplain = scope:architect + } + desc = court.8090.desc.religious + } + desc = court.8090.desc.castle + } + desc = court.8090.desc.outro + first_valid = { + triggered_desc = { + trigger = { exists = scope:chaplain } + desc = court.8090.desc.chaplain + } + desc = court.8090.desc.fallback + } + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:architect + roles = { + scope:architect = { + group = event_group + animation = throne_room_chancellor + } + scope:steward = { + group = event_group + animation = throne_room_conversation_3 + } + } + } + + trigger = { + has_royal_court = yes + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + has_court_event_flag = no + } + any_held_title = { + title_tier = barony + is_leased_out = no + title_province.free_building_slots > 0 + title_province.county = { + any_county_province = { + has_holding = no + } + } + } + } + + weight_multiplier = { + base = 1 + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + modifier = { + add = 1 + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + has_trait = compassionate + } + } + modifier = { + any_court_position_holder = { + type = royal_architect_court_position + is_available_ai_adult = yes + has_court_event_flag = no + NOT = { this = root.cp:councillor_steward } + } + add = 2 + } + } + + immediate = { + cp:councillor_steward = { + save_scope_as = steward + court_event_character_flag_effect = yes + } + random_court_position_holder = { + type = royal_architect_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = architect + } + if = { + limit = { + NOT = { exists = scope:architect } + } + random_pool_character = { + province = root.location + limit = { + stewardship > 12 + is_adult = yes + } + save_scope_as = architect + hidden_effect = { add_trait = architect } + } + } + if = { + limit = { + NOT = { exists = scope:architect } + } + create_character = { + location = root.location + template = foreign_architect_template + save_scope_as = architect + } + scope:architect = { + add_character_flag = created_character + } + } + scope:architect = { court_event_character_flag_effect = yes } + ordered_held_title = { # Save barony with least buildings + title_tier = barony + limit = { + is_leased_out = no + title_province.free_building_slots > 0 + } + order_by = { + value = 0 + subtract = title_province.combined_building_level + } + save_scope_as = my_barony + county = { save_scope_as = my_county } + scope:my_barony.title_province = { add_random_building_variable_effect = yes } + } + scope:my_county = { + ordered_county_province = { # Save church in same county + limit = { + has_holding_type = church_holding + free_building_slots > 0 + } + order_by = free_building_slots + barony = { save_scope_as = temple_barony } + scope:temple_barony.title_province = { add_random_building_variable_effect = yes } + } + random_county_province = { # Save an empty province in the same county + limit = { + has_holding = no + } + save_scope_as = empty_holding + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + NOT = { cp:councillor_court_chaplain = scope:architect } + trigger_if = { + limit = { + NOT = { exists = scope:temple_barony } + } + any_held_title = { + title_tier = county + any_county_province = { + has_holding_type = church_holding + free_building_slots > 0 + } + } + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + if = { + limit = { + NOT = { exists = scope:temple_barony } + } + random_held_title = { + title_tier = county + limit = { + any_county_province = { + has_holding_type = church_holding + free_building_slots > 0 + } + } + random_county_province = { + limit = { + has_holding_type = church_holding + free_building_slots > 0 + } + barony = { save_scope_as = temple_barony } + add_random_building_variable_effect = yes + } + } + } + } + } + + option = { # For my barony + name = court.8090.a + remove_treasury_or_gold = court_8090_half_building_cost_value + scope:my_barony.title_province = { add_random_building_construct_effect = yes } + stress_impact = { + architect = medium_stress_impact_loss # A good idea + lazy = medium_stress_impact_gain # Too much work + greedy = medium_stress_impact_gain # It will cost _how_ much? + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 1 + } + modifier = { #Weight up. + add = 15 + has_trait = architect + } + modifier = { #Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { + gold < court_8090_half_building_cost_value + factor = 0 + } + } + } + + option = { # For the church + name = court.8090.b + trigger = { + exists = scope:chaplain + exists = scope:temple_barony + } + add_piety = minor_piety_value + remove_treasury_or_gold = court_8090_half_building_cost_value + reverse_add_opinion = { + target = scope:chaplain + modifier = pleased_opinion + opinion = 10 + } + scope:temple_barony.title_province = { add_random_building_construct_effect = yes } + stress_impact = { + architect = minor_stress_impact_loss # A good idea + cynical = medium_stress_impact_gain # God needs no house + greedy = medium_stress_impact_gain # It will cost _how_ much? + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 2 + } + modifier = { #Weight up. + add = 5 + has_trait = architect + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + modifier = { + gold < court_8090_half_building_cost_value + factor = 0 + } + } + } + + option = { # Architect can do better + name = court.8090.c + trigger = { + scope:architect = { has_court_position = royal_architect_court_position } + is_ai = no + } + flavor = court.8090.c.tt + remove_treasury_or_gold = hold_court_holding_cost_architect_cheaper_value + scope:empty_holding = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = hold_court_holding_cost_architect_cheaper_value + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + + option = { # For the people (opt out) + name = court.8090.d + scope:my_barony.county = { + add_county_modifier = { + modifier = court_8090_commoners_modifier + years = 25 + } + } + stress_impact = { + architect = medium_stress_impact_gain # But my castle! + callous = major_stress_impact_gain # The people? Pah + diligent = major_stress_impact_gain # I can do it + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = -1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = architect + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = diligent + } + } + } + + after = { + if = { + limit = { + exists = scope:my_barony + scope:my_barony.title_province = { has_variable = random_building_variable } + } + scope:my_barony.title_province = { remove_variable = random_building_variable } + } + if = { + limit = { + exists = scope:temple_barony + scope:temple_barony.title_province = { has_variable = random_building_variable } + } + scope:temple_barony.title_province = { remove_variable = random_building_variable } + } + scope:steward = { + clear_court_event_participation = yes + } + scope:architect = { + clear_court_event_participation = yes + if = { + limit = { + root = { + is_ai = yes + } + has_character_flag = created_character + } + silent_disappearance_effect = yes + } + } + } +} + + +######################### +# Royal Lapse # +# by Joe Parkin # +######################### + +court.8140 = { + type = court_event + title = court.8140.t + desc = court.8140.desc + theme = court + cooldown = { years = 10 } + orphan = yes + court_scene = { + button_position_character = scope:vassal_1 + roles = { + scope:vassal_1 = { + group = event_group + animation = throne_room_kneel_2 + } + scope:vassal_2 = { + group = event_group + animation = throne_room_conversation_4 + } + } + } + + trigger = { + has_a_stress_coping_trait_trigger = yes + stress_level >= 1 + OR = { + exists = cp:councillor_court_chaplain + exists = cp:councillor_steward + exists = court_position:seneschal_court_position + exists = court_position:travel_leader_court_position + } + OR = { + exists = cp:councillor_marshal + exists = court_position:master_of_hunt_court_position + exists = court_position:master_of_horse_court_position + exists = court_position:court_physician_court_position + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_two_stress_coping_traits_trigger = yes + } + modifier = { + factor = stress_level + stress_level >= 1 + } + } + + immediate = { + random_list = { + 1 = { + cp:councillor_court_chaplain ?= { save_scope_as = vassal_1 } #prayer + } + 1 = { + cp:councillor_steward ?= { save_scope_as = vassal_1 } #feast + } + 2 = { + court_position:seneschal_court_position ?= { save_scope_as = vassal_1 } #feast + } + 2 = { + court_position:travel_leader_court_position ?= { save_scope_as = vassal_1 } #travel + } + } + random_list = { + 1 = { + cp:councillor_marshal ?= { save_scope_as = vassal_2 } #hunt + } + 2 = { + court_position:master_of_hunt_court_position ?= { save_scope_as = vassal_2 } #hunt + } + 2 = { + trigger = { + NOT = { + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + } + } + court_position:master_of_horse_court_position ?= { save_scope_as = vassal_2 } #horse + } + 2 = { + court_position:court_physician_court_position ?= { save_scope_as = vassal_2 } #fresh air + } + } + } + + option = { # Engage in stress coping + name = court.8140.b + flavor = court.8140.b.flavor_tt + change_current_court_grandeur = medium_court_grandeur_loss + scope:vassal_1 = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + scope:vassal_2 = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + stress_impact = { + base = massive_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = -1 + } + modifier = { + add = -30 + has_trait = diligent + } + } + } + + option = { # vassal_1 proposal + name = { + trigger = { #prayer + scope:vassal_1 = cp:councillor_court_chaplain + } + text = court.8140.c.1 + } + name = { + trigger = { #feast + OR = { + scope:vassal_1 = cp:councillor_steward + scope:vassal_1 = court_position:seneschal_court_position + } + } + text = court.8140.c.2 + } + name = { + trigger = { #travel + scope:vassal_1 = court_position:travel_leader_court_position + } + text = court.8140.c.3 + } + flavor = court.8140.c.flavor_tt + if = { #prayer + limit = { + scope:vassal_1 = cp:councillor_court_chaplain + } + add_piety = major_piety_gain + custom_tooltip = court.8140.c.tt.2 + add_character_flag = { + flag = court_event_discount_pilgrimage + years = 10 + } + } + else_if = { #feats + limit = { + OR = { + scope:vassal_1 = cp:councillor_steward + scope:vassal_1 = court_position:seneschal_court_position + } + } + custom_tooltip = court.8140.c.tt + add_character_flag = { + flag = court_event_discount_feast + years = 5 + } + } + else = { #travel + add_character_modifier = { + modifier = enjoy_the_travel_modifier + years = 25 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # vassal_2 proposal + name = { + trigger = { #hunt + OR = { + scope:vassal_2 = cp:councillor_marshal + scope:vassal_2 = court_position:master_of_hunt_court_position + } + } + text = court.8140.d.1 + } + name = { + trigger = { #horse + scope:vassal_2 = court_position:master_of_horse_court_position + } + text = court.8140.d.2 + } + name = { + trigger = { #fresh air + scope:vassal_2 = court_position:court_physician_court_position + } + text = court.8140.d.3 + } + flavor = court.8140.d.flavor_tt + if = { #hunt + limit = { + OR = { + scope:vassal_2 = cp:councillor_marshal + scope:vassal_2 = court_position:master_of_hunt_court_position + } + } + custom_tooltip = court.8140.d.tt + add_character_flag = { + flag = court_event_discount_hunt + years = 5 + } + } + else_if = { + limit = { + scope:vassal_2 = court_position:master_of_horse_court_position + } + start_warhorse_story_cycle_effect = yes + } + else = { + add_character_modifier = { + modifier = healthy_strolls_modifier + years = 25 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # Make an effort (opt out) + name = court.8140.a + flavor = court.8140.a.flavor_tt + change_current_court_grandeur = medium_court_grandeur_gain + stress_impact = { + base = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + add = -15 + has_trait = fickle + } + modifier = { + add = -15 + has_trait = callous + } + modifier = { + add = -15 + has_trait = arbitrary + } + modifier = { + add = -15 + has_trait = lazy + } + } + } + + after = { + scope:vassal_1 = { + clear_court_event_participation = yes + } + scope:vassal_2 = { + clear_court_event_participation = yes + } + } +} + +######################### +# Prandial Excess # +# by Joe Parkin # +######################### + +scripted_trigger court_8150_foodie_trigger = { + NOR = { + has_trait = temperate + has_trait = inappetetic + } +} + +scripted_trigger court_8150_vassal_trigger = { + is_available_ai_adult = yes + court_8150_foodie_trigger = yes + trigger_if = { + limit = { exists = scope:chaplain } + this != scope:chaplain + } + trigger_if = { + limit = { exists = scope:food_taster } + this != scope:food_taster + } + trigger_if = { + limit = { exists = scope:high_almoner } + this != scope:high_almoner + } + trigger_if = { + limit = { exists = scope:vassal_1 } + this != scope:vassal_1 + } + trigger_if = { + limit = { exists = scope:vassal_2 } + this != scope:vassal_2 + } +} + +court.8150 = { + type = court_event + title = court.8150.t + desc = { + desc = court.8150.desc.intro + triggered_desc = { + trigger = { exists = scope:food_taster } + desc = court.8150.desc.taster + } + desc = court.8150.desc.body + first_valid = { + triggered_desc = { + trigger = { + exists = scope:high_almoner + exists = scope:chaplain + } + desc = court.8150.desc.almoner_chaplain + } + triggered_desc = { + trigger = { exists = scope:chaplain } + desc = court.8150.desc.chaplain + } + triggered_desc = { + trigger = { exists = scope:high_almoner } + desc = court.8150.desc.almoner + } + } + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:vassal_1 + roles = { + scope:vassal_1 = { + group = event_group + animation = throne_room_conversation_1 + } + scope:vassal_2 = { + group = event_group + animation = throne_room_conversation_2 + } + scope:vassal_3 = { + group = event_group + animation = throne_room_conversation_3 + } + } + } + + trigger = { + NOT = { + faith = { has_doctrine = tenet_ritual_celebrations } + } + amenity_level = { target = court_food_quality value >= high_amenity_level } + OR = { + AND = { + is_married = yes + primary_spouse = { + court_8150_vassal_trigger = yes + has_court_event_flag = no + } + any_courtier_or_guest = { + count >= 2 + court_8150_foodie_trigger = yes + has_court_event_flag = no + } + } + any_courtier_or_guest = { + count >= 3 + court_8150_foodie_trigger = yes + has_court_event_flag = no + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + amenity_level = { target = court_food_quality value > very_high_amenity_level } + } + modifier = { + add = 1 + employs_court_position = high_almoner_court_position + } + modifier = { + add = 1 + employs_court_position = food_taster_court_position + } + } + + immediate = { + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + NOR = { + has_trait = gluttonous + faith = { has_doctrine = tenet_hedonistic } + faith = { has_doctrine = tenet_carnal_exaltation } + } + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + if = { + limit = { + employs_court_position = high_almoner_court_position + any_court_position_holder = { + type = high_almoner_court_position + is_available_ai_adult = yes + NOR = { + has_trait = gluttonous + faith = { has_doctrine = tenet_hedonistic } + faith = { has_doctrine = tenet_carnal_exaltation } + } + trigger_if = { + limit = { exists = scope:chaplain } + this != scope:chaplain + } + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + is_available_healthy_ai_adult = yes + NOR = { + has_trait = gluttonous + faith = { has_doctrine = tenet_hedonistic } + faith = { has_doctrine = tenet_carnal_exaltation } + } + trigger_if = { + limit = { exists = scope:chaplain } + this != scope:chaplain + } + } + save_scope_as = high_almoner + } + } + if = { + limit = { + employs_court_position = food_taster_court_position + any_court_position_holder = { + type = food_taster_court_position + is_available_healthy_ai_adult = yes + } + } + random_court_position_holder = { + type = food_taster_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = food_taster + hidden_effect = { change_current_weight = 25 } + } + } + if = { + limit = { + is_married = yes + primary_spouse = { court_8150_vassal_trigger = yes } + } + primary_spouse = { save_scope_as = vassal_1 } + } + else = { + random_courtier_or_guest = { + limit = { court_8150_vassal_trigger = yes } + weight = { + modifier = { + factor = 2 + has_any_court_position = yes + } + modifier = { + factor = 10 + has_trait = gluttonous + } + modifier = { + factor = 5 + has_trait = greedy + } + modifier = { + factor = 2 + is_courtier = yes + } + } + save_scope_as = vassal_1 + court_event_character_flag_effect = yes + hidden_effect = { change_current_weight = 15 } + } + } + random_courtier_or_guest = { + limit = { court_8150_vassal_trigger = yes } + weight = { + modifier = { + factor = 2 + has_any_court_position = yes + } + modifier = { + factor = 10 + has_trait = gluttonous + } + modifier = { + factor = 5 + has_trait = greedy + } + modifier = { + factor = 2 + is_courtier = yes + } + } + save_scope_as = vassal_2 + court_event_character_flag_effect = yes + hidden_effect = { change_current_weight = 15 } + } + random_courtier_or_guest = { + limit = { court_8150_vassal_trigger = yes } + weight = { + modifier = { + factor = 2 + has_any_court_position = yes + } + modifier = { + factor = 10 + has_trait = gluttonous + } + modifier = { + factor = 5 + has_trait = greedy + } + modifier = { + factor = 2 + is_courtier = yes + } + } + save_scope_as = vassal_3 + court_event_character_flag_effect = yes + hidden_effect = { change_current_weight = 15 } + } + hidden_effect = { + random_list = { + 2 = { + trigger = { exists = scope:vassal_1 } + scope:vassal_1 = { save_scope_as = demander } + } + 2 = { + trigger = { exists = scope:vassal_2 } + scope:vassal_2 = { save_scope_as = demander } + } + 2 = { + trigger = { exists = scope:vassal_3 } + scope:vassal_3 = { save_scope_as = demander } + } + } + } + } + + option = { # Chow down + name = court.8150.a + change_current_court_grandeur = major_court_grandeur_gain + if = { + limit = { + exists = scope:food_taster + } + custom_tooltip = court.8150.a.tt + scope:food_taster = { + add_character_flag = food_taster_mettle_tested + } + } + if = { + limit = { exists = scope:chaplain } + reverse_add_opinion = { + modifier = disgusted_opinion + target = scope:chaplain + opinion = -10 + } + } + if = { + limit = { exists = scope:high_almoner } + reverse_add_opinion = { + modifier = disgusted_opinion + target = scope:high_almoner + opinion = -10 + } + } + hidden_effect = { change_current_weight = 20 } + stress_impact = { + lifestyle_reveler = medium_stress_impact_loss + comfort_eater = medium_stress_impact_loss + gluttonous = minor_stress_impact_loss + temperate = major_stress_impact_gain + inappetetic = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + modifier = { #Weight up for stress. + add = 50 + has_trait = lifestyle_reveler + } + modifier = { #Weight up for stress. + add = 30 + has_trait = comfort_eater + } + modifier = { #Weight up for stress. + add = 15 + has_trait = gluttonous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = temperate + } + modifier = { #Weight down for stress. + add = -30 + has_trait = inappetetic + } + } + } + + option = { # Stop foodies + name = court.8150.c + add_legitimacy = miniscule_legitimacy_gain + if = { + limit = { + NOT = { + faith = { has_doctrine = tenet_hedonistic } + } + } + add_piety = medium_piety_gain + } + if = { + limit = { exists = scope:chaplain } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:chaplain + opinion = 10 + } + } + if = { + limit = { + exists = scope:high_almoner + } + custom_tooltip = court.8150.b.tt + scope:high_almoner = { + add_character_flag = plenty_to_donate_almoner + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + } + stress_impact = { + gluttonous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + profligate = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = gluttonous + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = profligate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = cynical + } + modifier = { + add = 50 + has_trait = temperate + } + } + } + + after = { + scope:vassal_1 = { + clear_court_event_participation = yes + } + if = { + limit = { + exists = scope:vassal_2 + } + scope:vassal_2 = { + clear_court_event_participation = yes + } + } + if = { + limit = { + exists = scope:vassal_3 + } + scope:vassal_3 = { + clear_court_event_participation = yes + } + } + } +} + +######################### +# Foremost Knight # +# by Joe Parkin # +######################### + +scripted_trigger court_8160_knight_trigger = { + is_landed = no + is_available_ai_adult = yes + can_start_single_combat_trigger = yes + NOR = { + has_trait = humble + has_trait = craven + has_trait = shy + } +} + +court.8160 = { + type = court_event + title = court.8160.t + desc = { + desc = court.8160.desc.intro + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:knight_1 + roles = { + scope:knight_1 = { + group = event_group + animation = rage + } + scope:knight_2 = { + group = event_group + animation = anger + } + } + } + + trigger = { + any_knight = { + court_8160_knight_trigger = yes + has_court_event_flag = no + save_temporary_scope_as = temp_knight + } + any_knight = { + court_8160_knight_trigger = yes + has_court_event_flag = no + NOR = { + this = scope:temp_knight + is_close_or_extended_family_of = scope:temp_knight + has_relation_friend = scope:temp_knight + } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + every_knight = { + limit = { court_8160_knight_trigger = yes } + add_to_list = knight_list + } + ordered_in_list = { + list = knight_list + order_by = prowess + save_scope_as = knight_1 + court_event_character_flag_effect = yes + assign_quirk_effect = yes + } + ordered_in_list = { + list = knight_list + limit = { + NOR = { + this = scope:knight_1 + is_close_or_extended_family_of = scope:knight_1 + has_relation_friend = scope:knight_1 + } + court_8160_knight_trigger = yes + } + order_by = prowess + save_scope_as = knight_2 + court_event_character_flag_effect = yes + assign_quirk_effect = yes + if = { + limit = { + NOT = { has_relation_rival = scope:knight_1 } + } + set_relation_rival = { + target = scope:knight_1 + reason = rival_age_old_rivalry + } + } + } + } + + option = { # employ them both + name = court.8160.a + trigger = { + OR = { + any_court_position_holder = { + type = bodyguard_court_position + count < 1 + } + AND = { + any_court_position_holder = { + type = bodyguard_court_position + count < 2 + } + NOT = { employs_court_position = champion_court_position } + } + AND = { + any_court_position_holder = { + type = bodyguard_court_position + count < 2 + } + NOT = { employs_court_position = akolouthos_court_position } + can_employ_court_position_type = akolouthos_court_position + } + } + } + court_position_grant_effect = { POS = bodyguard CANDIDATE = scope:knight_1 EMPLOYER = root } + if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + count = 1 + } + } + court_position_grant_effect = { POS = bodyguard CANDIDATE = scope:knight_2 EMPLOYER = root } + } + else_if = { + limit = { + NOT = { employs_court_position = champion_court_position } + } + court_position_grant_effect = { POS = champion CANDIDATE = scope:knight_2 EMPLOYER = root } + } + else = { + court_position_grant_effect = { POS = akolouthos CANDIDATE = scope:knight_2 EMPLOYER = root } + } + custom_tooltip = court.8160.a.tt + scope:knight_1 = { add_character_flag = competing_knight_position } + scope:knight_2 = { add_character_flag = competing_knight_position } + stress_impact = { + wrathful = medium_stress_impact_gain + fickle = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.5 + } + } + } + + + option = { # Make it a safe duel + name = court.8160.b + change_current_court_grandeur = minor_court_grandeur_gain + show_as_tooltip = { + random_list = { + 2 = { + modifier = { factor = scope:knight_1.prowess } + show_chance = no + desc = court.8160.a.tt_knight_1 + scope:knight_1 = { add_prestige = minor_prestige_gain } + scope:knight_2 = { + increase_wounds_effect = { REASON = duel } + } + } + 2 = { + modifier = { factor = scope:knight_2.prowess } + show_chance = no + desc = court.8160.a.tt_knight_2 + scope:knight_2 = { add_prestige = minor_prestige_gain } + scope:knight_1 = { + increase_wounds_effect = { REASON = duel } + } + } + } + } + configure_start_single_combat_effect = { + SC_INITIATOR = scope:knight_2 + SC_ATTACKER = scope:knight_2 + SC_DEFENDER = scope:knight_1 + FATALITY = no + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = court.8162 + INVALIDATION_EVENT = fp1_tbc.0102 + } + stress_impact = { + craven = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } + + option = { # Do not allow duel + name = court.8160.d + add_character_modifier = { + modifier = fostering_competitiveness_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:knight_1 + modifier = disappointed_opinion + opinion = -5 + } + reverse_add_opinion = { + target = scope:knight_2 + modifier = disappointed_opinion + opinion = -5 + } + stress_impact = { + arbitrary = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_rationality = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -15 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -15 + has_trait = vengeful + } + } + } + after = { + scope:knight_1 = { + clear_court_event_participation = yes + } + scope:knight_2 = { + clear_court_event_participation = yes + } + } +} + +court.8162 = { + hidden = yes + + immediate = { + scope:sc_victor.liege = { + send_interface_toast = { + title = hold_court.8031.t + left_icon = scope:sc_victor + right_icon = scope:sc_loser + scope:sc_victor = { + add_prestige = minor_prestige_gain + custom_tooltip = court.8162.tt + add_character_flag = best_knight_position + } + } + } + } +} + + +######################### +# Pariah of Court # +# by Joe Parkin # +######################### + +scripted_trigger kinslayer_crime_trigger = { + AND = { + liege.faith = { + NOR = { + has_doctrine = doctrine_kinslaying_accepted + has_doctrine = doctrine_kinslaying_shunned + } + } + OR = { + has_trait = kinslayer_1 + has_trait = kinslayer_2 + has_trait = kinslayer_3 + } + } +} + +scripted_trigger cannibal_crime_trigger = { + AND = { + NOT = { + liege.faith = { has_doctrine = tenet_ritual_cannibalism } + } + has_trait = cannibal + } +} + +scripted_trigger witch_crime_trigger = { + AND = { + liege.faith = { has_doctrine_parameter = witchcraft_illegal } + has_trait = witch + } +} + +scripted_trigger deviant_crime_trigger = { + AND = { + liege.faith = { has_doctrine_parameter = deviancy_illegal } + has_trait = deviant + } +} + +scripted_trigger sodomite_crime_trigger = { + AND = { + liege.faith = { has_doctrine = doctrine_homosexuality_crime } + is_male = yes + has_trait = sodomite + } +} + +scripted_trigger incest_crime_trigger = { + AND = { + liege.faith = { + NOT = { has_doctrine = doctrine_consanguinity_unrestricted } + } + has_trait = incestuous + } +} + +scripted_trigger adultery_crime_trigger = { + AND = { + OR = { + AND = { + liege.faith = { has_doctrine = doctrine_adultery_women_crime } + is_female = yes + } + AND = { + liege.faith = { has_doctrine = doctrine_adultery_men_crime } + is_male = yes + } + } + OR = { + has_trait = adulterer + has_trait = fornicator + } + } +} + +scripted_trigger excommunicated_crime_trigger = { + AND = { + faith = liege.faith + has_trait = excommunicated + } +} + +scripted_trigger faith_crime_trigger = { + AND = { + faith = { + faith_hostility_level = { + target = ROOT.faith + value >= faith_hostile_level + } + } + } +} + +scripted_trigger is_illegal_criminal_trigger = { + exists = liege.faith + OR = { + kinslayer_crime_trigger = yes + cannibal_crime_trigger = yes + witch_crime_trigger = yes + deviant_crime_trigger = yes + sodomite_crime_trigger = yes + incest_crime_trigger = yes + adultery_crime_trigger = yes + excommunicated_crime_trigger = yes + faith_crime_trigger = yes + has_trait = denounced + } +} + +scripted_trigger court_8170_criminal_trigger = { + is_imprisoned = no + is_landed = no + is_illegal_criminal_trigger = yes + NOR = { + has_relation_lover = root + has_relation_soulmate = root + } +} + +scripted_effect court_8170_torture_etc_end_effect = { + if = { + limit = { has_relation_friend = scope:criminal } + stress_impact = { base = major_stress_impact_gain } + } + if = { + limit = { is_close_family_of = scope:criminal } + stress_impact = { base = medium_stress_impact_gain } + } + if = { + limit = { is_extended_family_of = scope:criminal } + stress_impact = { base = minor_stress_impact_gain } + } + if = { + limit = { has_relation_rival = scope:criminal } + stress_impact = { base = medium_stress_impact_loss } + } + stress_impact = { + compassionate = major_stress_impact_gain + } +} + +scripted_effect court_8170_torture_etc_setup_effect = { + change_current_court_grandeur = medium_court_grandeur_gain + add_legitimacy = miniscule_legitimacy_gain + add_character_modifier = { + modifier = fast_hard_justice_modifier + years = 10 + } + rightfully_imprison_character_effect = { + TARGET = scope:criminal + IMPRISONER = root + } + #Needed for the scripted effects below + root = { save_scope_as = actor } + scope:criminal = { save_scope_as = recipient } +} + +court.8170 = { + type = court_event + title = court.8170.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:criminal = { + OR = { + kinslayer_crime_trigger = yes + cannibal_crime_trigger = yes + witch_crime_trigger = yes + } + } + } + desc = court.8170.desc.intro_scary + } + triggered_desc = { + trigger = { + scope:criminal = { + OR = { + deviant_crime_trigger = yes + sodomite_crime_trigger = yes + incest_crime_trigger = yes + adultery_crime_trigger = yes + } + } + } + desc = court.8170.desc.intro_sordid + } + triggered_desc = { + trigger = { + scope:criminal = { + OR = { + excommunicated_crime_trigger = yes + faith_crime_trigger = yes + } + } + } + desc = court.8170.desc.intro_religious + } + desc = court.8170.desc.intro_fallback + } + desc = court.8170.desc.body + first_valid = { + triggered_desc = { + trigger = { + scope:criminal = { is_close_or_extended_family_of = ROOT } + } + desc = court.8170.desc.family + } + triggered_desc = { + trigger = { + scope:criminal = { is_pool_guest = yes } + } + desc = court.8170.desc.guest + } + desc = court.8170.desc.fallback + } + } + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:criminal + roles = { + scope:criminal = { + group = event_group + animation = shame + } + } + } + + trigger = { + NOT = { court_8170_criminal_trigger = yes } + any_courtier_or_guest = { + court_8170_criminal_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_courtier_or_guest = { + is_close_or_extended_family_of = root + court_8170_criminal_trigger = yes + } + add = 1 + } + modifier = { + any_courtier_or_guest = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + court_8170_criminal_trigger = yes + } + add = 0.5 + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + is_close_or_extended_family_of = root + court_8170_criminal_trigger = yes + } + alternative_limit = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + court_8170_criminal_trigger = yes + } + alternative_limit = { + is_courtier = yes + court_8170_criminal_trigger = yes + } + alternative_limit = { court_8170_criminal_trigger = yes } + save_scope_as = criminal + court_event_character_flag_effect = yes + } + } + + option = { # Let them stay: dark deals to protect you + name = { + text = court.8170.a.family + trigger = { + scope:criminal = { is_close_or_extended_family_of = root } + } + } + name = { + text = court.8170.a.other + trigger = { + NOT = { + scope:criminal = { is_close_or_extended_family_of = root } + } + } + } + change_current_court_grandeur = medium_court_grandeur_loss + add_character_modifier = { + modifier = harbors_criminals_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:criminal + modifier = grateful_opinion + opinion = 10 + } + stress_impact = { + just = major_stress_impact_gain + vengeful = medium_stress_impact_gain + diligent = medium_stress_impact_gain + honest = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = just + add = -75 + } + modifier = { + has_trait = diligent + add = -50 + } + modifier = { + has_trait = honest + add = -50 + } + ai_value_modifier = { + ai_zeal = -0.5 + ai_vengefulness = -1 + } + } + } + + option = { # Big deal of punishing them: blind + name = court.8170.c1 + trigger = { + scope:criminal = { NOT = { has_trait = blind } } + culture = { has_cultural_parameter = can_blind_prisoners } + } + court_8170_torture_etc_setup_effect = yes + blind_recipient_effect = yes + # House Feud + add_character_flag = house_feud_blinding_flag + house_feud_torture_event_effect = yes + court_8170_torture_etc_end_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + option = { #castrate + name = court.8170.c2 + trigger = { + scope:criminal = { + NOT = { has_trait = eunuch } + is_male = yes + culture = { + has_cultural_parameter = can_castrate_prisoners + } + } + } + court_8170_torture_etc_setup_effect = yes + castrate_recipient_effect = yes + # House Feud + add_character_flag = house_feud_castration_flag + house_feud_torture_event_effect = yes + court_8170_torture_etc_end_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + option = { #execute + name = court.8170.c3 + court_8170_torture_etc_setup_effect = yes + execute_prisoner_effect = { + VICTIM = scope:recipient + EXECUTIONER = scope:actor + } + if = { + limit = { + scope:actor.capital_county = { + NOT = { has_county_modifier = held_public_execution_modifier } + } + } + scope:actor = { + capital_county = { + add_county_modifier = { + modifier = held_public_execution_modifier + days = 1850 + } + } + custom_tooltip = public_execution_control_effect + hidden_effect = { + every_held_title = { + title_tier = county + change_county_control = executioner_control_value + } + } + } + } + court_8170_torture_etc_end_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + option = { # Kick out - opt out + name = court.8170.d + change_current_court_grandeur = minor_court_grandeur_gain + if = { + limit = { has_relation_friend = scope:criminal } + stress_impact = { base = medium_stress_impact_gain } + } + if = { + limit = { is_close_family_of = scope:criminal } + stress_impact = { base = minor_stress_impact_gain } + } + if = { + limit = { is_extended_family_of = scope:criminal } + stress_impact = { base = miniscule_stress_impact_gain } + } + if = { + limit = { has_relation_rival = scope:criminal } + stress_impact = { base = medium_stress_impact_loss } + } + stress_impact = { + compassionate = minor_stress_impact_gain + } + hidden_effect = { + scope:criminal = { select_and_move_to_pool_effect = yes } + } + show_as_tooltip = { remove_courtier_or_guest = scope:criminal } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + after = { + scope:criminal ?= { + clear_court_event_participation = yes + } + } +} + +######################### +# Secrets and Lies # +# by Joe Parkin # +######################### + +scripted_trigger court_8180_secret_trigger = { + exists = secret_owner + is_criminal_for = secret_owner + any_secret_knower = { this = root } + NOT = { secret_target ?= root } +} + +scripted_trigger court_8180_relation_trigger = { + is_available_ai_adult = yes + any_secret = { court_8180_secret_trigger = yes } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } +} + +court.8180 = { + type = court_event + title = court.8180.t + desc = court.8180.desc.intro + theme = court + cooldown = { years = 10 } + court_scene = { + button_position_character = scope:criminal + roles = { + scope:criminal = { + group = event_group + animation = worry + } + } + } + + trigger = { + any_courtier_or_guest = { + court_8180_relation_trigger = yes + has_court_event_flag = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + cp:councillor_spymaster.intrigue >= 15 + add = 1 + } + modifier = { + cp:councillor_spymaster ?= { is_performing_council_task = task_find_secrets } + add = 1 + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + court_8180_relation_trigger = yes + has_court_event_flag = no + } + save_scope_as = criminal + court_event_character_flag_effect = yes + random_secret = { + limit = { court_8180_secret_trigger = yes } + save_scope_as = criminal_secret + } + } + save_scope_as = knower # custom_loc + save_scope_as = actor # blackmail interaction + scope:criminal = { save_scope_as = recipient } # blackmail interaction + scope:criminal_secret = { save_scope_as = target } # blackmail interaction + } + + option = { # Blackmail + name = court.8180.b + trigger = { + NOT = { has_hook = scope:criminal } + } + blackmail_interaction_effect = yes + scope:criminal = { + add_character_modifier = { + modifier = liege_scrutiny_modifier + years = 20 + } + } + stress_impact = { + forgiving = major_stress_impact_gain + honest = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + lazy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + } + } + } + + option = { # Punish + name = court.8180.c + change_current_court_grandeur = minor_court_grandeur_loss + scope:criminal_secret = { expose_secret = root } + hidden_effect = { + rightfully_imprison_character_effect = { + TARGET = scope:criminal + IMPRISONER = root + } + } + show_as_tooltip = { + imprison = { target = scope:criminal type = house_arrest } + } + add_character_modifier = { + modifier = court_without_secrets_modifier + years = 15 + } + custom_tooltip = court.6002.a.tt2 + stress_impact = { + arbitrary = minor_stress_impact_gain + cynical = minor_stress_impact_gain + deceitful = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Do nothing - opt out + name = court.8180.e + stress_impact = { + base = minor_stress_impact_loss + lazy = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + zealous = medium_stress_impact_gain + diligent = medium_stress_impact_gain + deceitful = major_stress_impact_gain + } + ai_chance = { + base = 75 + } + } + after = { + scope:criminal = { + clear_court_event_participation = yes + } + } +} + + + + + +################################################## +# Oltner + +################################################## +# 9000 - 9009 A Knight's Declaration +# 9100 - 9109 Epicurean Entertainment +# 9300 - 9309 Overt Overindulgence +# 9400 - 9409 Pie-based Shenanigans +# 9500 - 9509 A Little Language +################################################## + +######################### +# A Knight's Declaration +# by Alexander Oltner +######################### + +scripted_trigger suitably_flirty_knight = { + is_available_adult = yes + is_courtier_of = root + is_attracted_to_gender_of = root.primary_spouse + can_start_scheme = { + type = courting + target_character = root.primary_spouse + } + NOR = { + has_trait = chaste + has_trait = celibate + has_relation_lover = root.primary_spouse + } + would_attempt_to_seduce_married_trigger = yes + would_attempt_to_seduce_trigger = { CHARACTER = root.primary_spouse } + might_cheat_on_every_partner_trigger = yes +} + +# A Knight's Declaration +court.9000 = { + type = court_event + title = court.9000.t + desc = court.9000.desc + theme = court + + court_scene = { + button_position_character = scope:flirty_knight + roles = { + scope:flirty_knight = { + group = event_group + animation = flirtation_left + } + scope:flirty_spouse = { + group = event_group + animation = flirtation + } + } + } + + cooldown = { + years = 10 + } + + trigger = { + is_available_adult = yes + is_married = yes + any_knight = { + suitably_flirty_knight = yes + has_court_event_flag = no + save_temporary_scope_as = attraction_check + } + primary_spouse = { + is_available_adult = yes + has_court_event_flag = no + is_courtier_of = root + is_attracted_to_gender_of = scope:attraction_check + NOR = { + has_trait = chaste + has_trait = celibate + has_relation_lover = scope:attraction_check + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + root.primary_spouse = { might_cheat_on_every_partner_trigger = yes } + add = 1 + } + modifier = { + culture = { has_cultural_tradition = tradition_chivalry } + add = 2 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + primary_spouse = { + save_scope_as = flirty_spouse + court_event_character_flag_effect = yes + } + random_knight = { + limit = { + suitably_flirty_knight = yes + } + weight = { + base = 1 + modifier = { + add = 10 + OR = { + has_trait = lustful + has_trait = seducer + } + } + modifier = { + add = 10 + has_trait = lifestyle_poet + } + } + hidden_effect = { + if = { + limit = { + NOT = { + has_trait = lifestyle_poet + } + } + add_trait = lifestyle_poet + } + } + save_scope_as = flirty_knight + court_event_character_flag_effect = yes + + # Set up a subject gender. + select_poem_subject_gender_effect = { + SUBJECT = flag:specific + SUBJECT_TARGET = scope:flirty_spouse + } + # Roll for theme. + select_poem_theme_romance_effect = yes + } + } + + option = { # Stop this at once! + name = court.9000.b + + custom_tooltip = court_9000_b_tt + + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = detractor_of_courtly_love_modifier + years = 20 + } + custom_tooltip = court_9000.b.tt + scope:flirty_spouse = { + add_opinion = { + target = root + modifier = rude_opinion + opinion = -20 + } + } + scope:flirty_knight = { + hidden_effect = { + random = { + chance = 35 + start_scheme = { + type = courting + target_character = scope:flirty_spouse + } + } + } + } + + stress_impact = { + trusting = massive_stress_impact_gain + forgiving = medium_stress_impact_gain + chaste = medium_stress_impact_gain + calm = medium_stress_impact_gain + shy = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = trusting + has_trait = forgiving + } + } + } + } + + option = { # Let it go on! + name = court.9000.c + + custom_tooltip = court_9000_c_tt + + change_current_court_grandeur = major_court_grandeur_gain + add_character_modifier = { + modifier = promoter_of_courtly_love_modifier + years = 20 + } + custom_tooltip = court_9000.c.tt + scope:flirty_knight = { + create_inspiration = book_inspiration + hidden_effect = { + start_scheme = { + type = courting + target_character = scope:flirty_spouse + } + } + } + + stress_impact = { + paranoid = massive_stress_impact_gain + arrogant = major_stress_impact_gain + vengeful = medium_stress_impact_gain + lustful = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = vengeful + } + } + } + } + after = { + scope:flirty_knight = { + clear_court_event_participation = yes + } + scope:flirty_spouse = { + clear_court_event_participation = yes + } + } +} + +# A Knight's Dedication +court.9001 = { + type = court_event + title = court.9001.t + desc = court.9001.desc + theme = court + + court_scene = { + button_position_character = scope:flirty_knight + roles = { + scope:flirty_knight = { + group = event_group + animation = flirtation_left + } + scope:flirty_spouse = { + group = event_group + animation = flirtation + } + } + } + + cooldown = { + years = 30 + } + + trigger = { + is_available_adult = yes + is_married = yes + primary_spouse = { + is_available_adult = yes + has_court_event_flag = no + is_courtier_of = root + NOT = { + has_relation_soulmate = root + } + might_cheat_on_every_partner_trigger = yes + + any_targeting_scheme = { + scheme_owner = { + is_available_adult = yes + is_courtier_of = root + has_court_event_flag = no + save_temporary_scope_as = attraction_check + } + scheme_type = courting + } + + is_attracted_to_gender_of = scope:attraction_check + } + } + + weight_multiplier = { + base = 1 + modifier = { + culture = { has_cultural_tradition = tradition_chivalry } + add = 2 + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + save_scope_as = root_for_loc + primary_spouse = { + save_scope_as = flirty_spouse + court_event_character_flag_effect = yes + random_targeting_scheme = { + limit = { + scheme_owner = { + is_available_adult = yes + is_courtier_of = root + scope:flirty_spouse = { + is_attracted_to_gender_of = prev + } + } + scheme_type = courting + } + scheme_owner = { + save_scope_as = flirty_knight + court_event_character_flag_effect = yes + } + } + } + } + + option = { # Duel them + name = court.9001.a + + trigger = { + can_start_single_combat_trigger = yes + scope:flirty_knight = { + can_be_warrior_trigger = { ARMY_OWNER = root } + can_start_single_combat_trigger = yes + } + } + custom_tooltip = court.9001.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:flirty_knight + FATALITY = no + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = court.9003 + INVALIDATION_EVENT = court.9002 + } + add_prestige = medium_prestige_gain + ai_chance = { + base = 25 + modifier = { + factor = 0.1 + OR = { + has_trait = trusting + has_trait = forgiving + has_trait = chaste + } + } + } + } + + option = { # Banish the knight + name = court.9001.b + + add_gold = 5 + + scope:flirty_knight = { + banish_effect = { BANISHER = root } + hidden_effect = { + if = { + limit = { + any_scheme = { + type = courting + scheme_target_character = scope:flirty_spouse + } + } + random_scheme = { + type = courting + limit = { + scheme_target_character = scope:flirty_spouse + } + end_scheme = yes + } + } + } + } + if = { + limit = { + NOR = { + has_character_modifier = detractor_of_courtly_love_modifier + has_character_modifier = promoter_of_courtly_love_modifier + } + } + add_character_modifier = { + modifier = detractor_of_courtly_love_modifier + years = 20 + } + custom_tooltip = court_9000.b.tt + } + else = { + add_hook = { + target = scope:flirty_spouse + type = loyalty_hook + } + } + + scope:flirty_spouse = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_banished_knight + OPINION = 0 + } + + add_opinion = { + modifier = how_could_you_opinion + target = root + } + } + + stress_impact = { + trusting = massive_stress_impact_gain + forgiving = medium_stress_impact_gain + chaste = medium_stress_impact_gain + calm = medium_stress_impact_gain + shy = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = trusting + has_trait = forgiving + has_trait = chaste + } + } + } + } + + option = { # Let it go on! + name = court.9001.c + + change_current_court_grandeur = major_court_grandeur_gain + if = { + limit = { + NOR = { + has_character_modifier = promoter_of_courtly_love_modifier + has_character_modifier = detractor_of_courtly_love_modifier + } + } + add_character_modifier = { + modifier = promoter_of_courtly_love_modifier + years = 20 + } + custom_tooltip = court_9000.c.tt + } + else = { add_prestige = medium_prestige_gain } + + stress_impact = { + paranoid = massive_stress_impact_gain + arrogant = major_stress_impact_gain + vengeful = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = vengeful + } + } + } + } + after = { + scope:flirty_knight = { + clear_court_event_participation = yes + } + scope:flirty_spouse = { + clear_court_event_participation = yes + } + } +} + +# Invalidated +court.9002 = { + hidden = yes + + immediate = { + # Inform both parties that the duel has invalidated. + scope:root_for_loc = { + send_interface_toast = { + title = court.9002.trigger_failure + left_icon = scope:flirty_knight + } + } + } +} + +# Outcome +court.9003 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:root_for_loc = scope:sc_victor + } + trigger_event = { id = court.9004 } + } + else = { + trigger_event = { id = court.9005 } + } + } +} + +# Won +court.9004 = { + type = character_event + title = court.9004.t + desc = court.9004.desc + theme = education + left_portrait = { + character = scope:flirty_spouse + animation = dismissal + } + right_portrait = { + character = scope:flirty_knight + animation = pain + } + + trigger = { + + } + + immediate = { + + } + + option = { # Leave my spouse alone! + name = court.9004.a + + scope:flirty_knight = { + if = { + limit = { + any_scheme = { + type = courting + scheme_target_character = scope:flirty_spouse + } + } + random_scheme = { + type = courting + limit = { + scheme_target_character = scope:flirty_spouse + } + end_scheme = yes + } + } + if = { + limit = { + has_relation_lover = scope:flirty_spouse + } + remove_relation_lover = scope:flirty_spouse + } + if = { + limit = { + has_relation_potential_lover = scope:flirty_spouse + } + remove_relation_potential_lover = scope:flirty_spouse + } + if = { + limit = { + has_relation_soulmate = scope:flirty_spouse + } + remove_relation_soulmate = scope:flirty_spouse + } + create_inspiration = book_inspiration + } + if = { + limit = { + can_add_hook = { + target = scope:flirty_knight + type = loyalty_hook + } + } + add_hook = { + type = loyalty_hook + target = scope:flirty_knight + } + } + + add_character_modifier = { + modifier = knight_of_love_modifier + years = 20 + } + scope:flirty_spouse = { + add_opinion = { + target = scope:flirty_knight + modifier = disappointed_opinion + opinion = -40 + } + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 40 + } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = root } + } + set_relation_lover = { reason = lover_dueled_for_love target = root involved_character = scope:flirty_knight } + } + } + + ai_chance = { + base = 100 + } + } +} + +# Beaten +court.9005 = { + type = character_event + title = court.9005.t + desc = court.9005.desc + theme = family + left_portrait = { + character = scope:flirty_spouse + animation = flirtation_left + } + right_portrait = { + character = scope:flirty_knight + animation = flirtation + } + override_background = { reference = study } + + trigger = { + + } + + immediate = { + + } + + option = { + name = court.9005.a + + scope:flirty_knight = { + hidden_effect = { + if = { + limit = { + has_relation_lover = scope:flirty_spouse + } + remove_relation_lover = scope:flirty_spouse + } + if = { + limit = { + has_relation_potential_lover = scope:flirty_spouse + } + remove_relation_potential_lover = scope:flirty_spouse + } + if = { + limit = { + has_relation_soulmate = scope:flirty_spouse + } + remove_relation_soulmate = scope:flirty_spouse + } + } + } + + scope:flirty_spouse = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -40 + } + add_opinion = { + modifier = impressed_opinion + target = scope:flirty_knight + opinion = 40 + } + if = { + limit = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:flirty_knight } + } + set_relation_soulmate = { reason = soulmate_won_love_in_duel copy_reason = lover target = scope:flirty_knight } + } + else_if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:flirty_knight } + } + set_relation_lover = { reason = lover_dueled_for_love target = scope:flirty_knight involved_character = root } + } + } + add_character_modifier = { + modifier = fought_for_courtly_love_modifier + years = 20 + } + add_prestige = major_prestige_loss + if = { + limit = { + scope:flirty_knight = { + government_allows = administrative + } + } + scope:flirty_knight = { + change_influence = medium_influence_gain + } + } + else = { + scope:flirty_knight = { add_prestige = major_prestige_gain } + } + + ai_chance = { + base = 100 + } + } +} + +######################### +# Epicurean Entertainment +# by Alexander Oltner +######################### + +# Your courtiers love your expensive food! +court.9100 = { + type = court_event + title = court.9100.t + desc = court.9100.desc + theme = court + + court_scene = { + button_position_character = scope:food_lover_1 + roles = { + scope:food_lover_1 = { + group = event_group + animation = ecstasy + } + scope:food_lover_2 = { + group = event_group + animation = admiration + } + scope:food_lover_3 = { + group = event_group + animation = personality_greedy + } + } + } + + cooldown = { + years = 10 + } + + trigger = { + is_available = yes + age >= 10 + amenity_level = { target = court_food_quality value >= 3 } + any_courtier_or_guest = { + is_available_ai_adult = yes + has_court_event_flag = no + NOR = { + has_trait = temperate + has_trait = inappetetic + has_relation_rival = root + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + count >= 3 + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + hidden_effect = { + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOR = { + has_trait = temperate + has_trait = inappetetic + has_relation_rival = root + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + weight = { + base = 1 + modifier = { + add = 100 + loves_food_trigger = yes + } + modifier = { + add = 50 + has_relation_potential_friend = root + } + modifier = { + add = 30 + is_of_major_interest_to_root_trigger = yes + } + } + save_scope_as = food_lover_1 + court_event_character_flag_effect = yes + change_current_weight = 15 + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOR = { + has_trait = temperate + has_trait = inappetetic + has_relation_rival = root + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + this != scope:food_lover_1 + } + weight = { + base = 1 + modifier = { + add = 100 + loves_food_trigger = yes + } + modifier = { + add = 50 + has_relation_potential_friend = root + } + modifier = { + add = 30 + is_of_major_interest_to_root_trigger = yes + } + } + save_scope_as = food_lover_2 + court_event_character_flag_effect = yes + change_current_weight = 15 + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOR = { + has_trait = temperate + has_trait = inappetetic + has_relation_rival = root + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + NOR = { + this = scope:food_lover_1 + this = scope:food_lover_2 + } + } + weight = { + base = 1 + modifier = { + add = 100 + loves_food_trigger = yes + } + modifier = { + add = 50 + has_relation_potential_friend = root + } + modifier = { + add = 30 + is_of_major_interest_to_root_trigger = yes + } + } + save_scope_as = food_lover_3 + court_event_character_flag_effect = yes + change_current_weight = 15 + } + } + } + + option = { # More working, less stuffing faces! + name = court.9100.a + trigger = { + NOT = { government_has_flag = government_is_mandala } + } + add_character_modifier = { + modifier = more_work_less_fun_modifier + years = 15 + desc = feasts_more_expensive_modifier_tt + } + custom_tooltip = feasts_more_expensive_tt + stress_impact = { + gregarious = major_stress_impact_gain + gluttonous = major_stress_impact_gain + lazy = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = gregarious + has_trait = gluttonous + has_trait = lazy + } + } + } + } + + option = { # You all deserve the best! + name = court.9100.b + add_character_modifier = { + modifier = promise_of_feasts_modifier + years = 15 + } + progress_towards_friend_effect = { + REASON = friend_fellow_food_lover + CHARACTER = scope:food_lover_1 + OPINION = default_friend_opinion + } + progress_towards_friend_effect = { + REASON = friend_fellow_food_lover + CHARACTER = scope:food_lover_2 + OPINION = default_friend_opinion + } + progress_towards_friend_effect = { + REASON = friend_fellow_food_lover + CHARACTER = scope:food_lover_3 + OPINION = default_friend_opinion + } + + stress_impact = { + sadistic = massive_stress_impact_gain + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + temperate = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = temperate + has_trait = greedy + has_trait = shy + } + } + } + } + + option = { # Let them enjoy themselves in peace! + name = court.9100.d + + change_current_court_grandeur = medium_court_grandeur_gain + + add_prestige = minor_prestige_gain + + stress_impact = { + gregarious = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = gregarious + has_trait = gluttonous + has_trait = fickle + } + } + } + } + after = { + scope:food_lover_1 = { + clear_court_event_participation = yes + } + scope:food_lover_2 = { + clear_court_event_participation = yes + } + scope:food_lover_3 = { + clear_court_event_participation = yes + } + } +} + + +######################### +# Overt Overindulgence +# by Alexander Oltner +######################### + +# Someone eats all of the food! +court.9300 = { + type = court_event + title = court.9300.t + desc = court.9300.desc + theme = court + + court_scene = { + button_position_character = scope:worried_courtier + roles = { + scope:worried_courtier = { + group = event_group + animation = fear + } + scope:overindulger_target = { + group = event_group + animation = admiration + } + } + } + + cooldown = { + years = 30 + } + + trigger = { + is_available = yes + age >= 10 + amenity_level = { target = court_food_quality value >= 4 } + any_courtier = { + is_available_ai_adult = yes + has_court_event_flag = no + save_temporary_scope_as = another_courtier_check + } + 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_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + 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 + is_of_major_interest_to_root_trigger = yes + } + is_of_minor_interest_to_root_trigger = yes + } + hidden_effect = { + change_current_weight = 100 + set_favorite_treat_effect = yes + assign_quirk_effect = yes + if = { + limit = { + NOT = { + has_trait = comfort_eater + } + } + add_trait = comfort_eater + } + } + 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!? + name = court.9300.a + if = { + limit = { + can_add_hook = { + target = scope:overindulger_target + type = major_threat_hook + } + } + add_hook = { + target = scope:overindulger_target + type = major_threat_hook + } + } + scope:overindulger_target = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_overindulger_jailed + OPINION = 0 + } + pay_short_term_gold = { + target = root + gold = root.tiny_gold_value + } + } + + stress_impact = { + forgiving = massive_stress_impact_gain + compassionate = major_stress_gain + patient = major_stress_impact_gain + humble = medium_stress_impact_gain + calm = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = ai_vengefulness + } + } + } + + option = { # By the gods, man, stop eating! + name = court.9300.b + + duel = { + skill = diplomacy + value = 12 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = court.9300.b.success + send_interface_toast = { + title = court.9300.b.success + left_icon = scope:overindulger_target + add_prestige = medium_prestige_gain + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + if = { + limit = { + can_add_hook = { + target = scope:overindulger_target + type = favor_hook + } + } + add_hook = { + target = scope:overindulger_target + type = favor_hook + } + } + scope:overindulger_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + progress_towards_friend_effect = { + REASON = friend_saved_me_from_myself + CHARACTER = root + OPINION = 0 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = court.9300.b.failure + send_interface_toast = { + title = court.9300.b.failure + left_icon = scope:overindulger_target + + scope:overindulger_target = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -25 + } + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_overindulger_shamed + OPINION = 0 + } + } + } + } + } + + stress_impact = { + vengeful = massive_stress_impact_gain + paranoid = major_stress_gain + cynical = major_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_compassion <= low_positive_ai_value + } + } + } + + option = { # You're barred from the pantry... + name = court.9300.d + + scope:overindulger_target = { + add_opinion = { + target = root + opinion = -5 + modifier = disappointed_opinion + } + hidden_effect = { + random = { + chance = 50 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_vengefulness >= low_positive_ai_value + } + } + } + after = { + scope:overindulger_target = { + clear_court_event_participation = yes + } + scope:worried_courtier = { + clear_court_event_participation = yes + } + } +} + +######################### +# Pie-based Shenanigans +# by Alexander Oltner +######################### + +scripted_trigger court_9400_court_jester_trigger = { + is_available_ai_adult = yes + has_trait = dwarf +} + +scripted_trigger court_9400_courtier_trigger = { + is_available_ai_adult = yes + NOT = { + is_cannibal_trigger = yes + } +} + +# Court Jester pie event, loosely based on Jeffrey Hudson +court.9400 = { + type = court_event + title = court.9400.t + desc = court.9400.desc + theme = court + + court_scene = { + button_position_character = scope:pie_presenting_courtier + roles = { + scope:pie_presenting_courtier = { + group = event_group + animation = ecstasy + } + scope:court_jester = { + group = event_group + animation = happiness + } + } + } + + cooldown = { + years = 15 + } + + trigger = { + is_available = yes + age >= 10 + amenity_level = { target = court_food_quality value >= 2 } + amenity_level = { target = court_servants value >= 2 } + OR = { + AND = { + any_courtier = { + court_9400_court_jester_trigger = yes + has_court_event_flag = no + save_temporary_scope_as = jester_check + } + any_courtier = { + court_9400_courtier_trigger = yes + has_court_event_flag = no + this != scope:jester_check + } + } + any_vassal = { + court_9400_courtier_trigger = yes + has_court_event_flag = no + any_courtier = { + court_9400_court_jester_trigger = yes + has_court_event_flag = no + } + } + } + + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + save_scope_as = you_target + random_vassal = { + limit = { + court_9400_courtier_trigger = yes + has_court_event_flag = no + any_courtier = { + court_9400_court_jester_trigger = yes + has_court_event_flag = no + } + } + save_scope_as = pie_presenting_courtier + court_event_character_flag_effect = yes + random_courtier = { + limit = { + court_9400_court_jester_trigger = yes + has_court_event_flag = no + } + save_scope_as = court_jester + court_event_character_flag_effect = yes + } + } + if = { + limit = { + NOR = { + exists = scope:pie_presenting_courtier + exists = scope:court_jester + } + } + random_courtier = { + limit = { + court_9400_court_jester_trigger = yes + } + save_scope_as = court_jester + court_event_character_flag_effect = yes + } + random_courtier = { + limit = { + court_9400_courtier_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = pie_presenting_courtier + court_event_character_flag_effect = yes + } + } + scope:pie_presenting_courtier = { + progress_towards_friend_effect = { + REASON = friend_played_trick_on_liege + CHARACTER = scope:court_jester + OPINION = 0 + } + } + } + + option = { # My favorite meal! + name = court.9400.a + + trait = cannibal + + trigger = { + is_cannibal_trigger = yes + } + + if = { + limit = { + any_secret = { + type = secret_cannibal + NOT = { + is_known_by = scope:pie_presenting_courtier + } + } + } + random_secret = { + type = secret_cannibal + limit = { + NOT = { + is_known_by = scope:pie_presenting_courtier + } + } + reveal_to = scope:pie_presenting_courtier + } + } + + scope:pie_presenting_courtier = { + add_opinion = { + target = root + modifier = absolutely_horrified_opinion + } + } + + add_character_modifier = { + modifier = best_meal_of_my_life_modifier + years = 15 + } + + unknown_murder_effect = { + VICTIM = scope:court_jester + MURDERER = root + REASON = death_eaten + } + + stress_impact = { + base = massive_stress_impact_loss + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 200 + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + option = { # Reward them + name = court.9400.b + + pay_short_term_gold = { + target = scope:court_jester + gold = root.tiny_gold_value + } + if = { + limit = { + scope:court_jester.location = { + this != root.location + } + } + scope:court_jester = { + set_location = root.location + } + } + if = { + limit = { + scope:court_jester = { + NOT = { + is_courtier_of = root + } + } + } + add_courtier = scope:court_jester + } + if = { + limit = { + can_employ_court_position_type = court_jester_court_position + scope:court_jester = { can_be_employed_as = court_jester_court_position } + } + court_position_grant_effect = { POS = court_jester CANDIDATE = scope:court_jester EMPLOYER = root } + } + progress_towards_friend_effect = { + REASON = friend_gave_gold + CHARACTER = scope:court_jester + OPINION = 0 + } + + scope:pie_presenting_courtier = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 25 + } + } + + change_current_court_grandeur = medium_court_grandeur_gain + + stress_impact = { + base = medium_stress_impact_loss + paranoid = massive_stress_impact_gain + greedy = massive_stress_impact_gain + arrogant = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_compassion <= low_positive_ai_value + } + modifier = { + factor = 0.1 + ai_greed >= low_positive_ai_value + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { # Imprison them! + name = court.9400.c + trigger = { + has_trait = paranoid + } + + rightfully_imprison_character_effect = { + TARGET = scope:court_jester + IMPRISONER = root + } + + if = { + limit = { + is_ai = yes + } + execute_prisoner_effect = { + VICTIM = scope:court_jester + EXECUTIONER = root + } + } + else = { + scope:court_jester = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_jester_jailed + OPINION = 0 + } + } + } + + add_character_modifier = { + modifier = suspicious_against_pies_modifier + years = 15 + } + + scope:pie_presenting_courtier = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -25 + } + } + + stress_impact = { + base = massive_stress_impact_loss + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 200 + } + } + + option = { # Har har! Fantastic! + name = court.9400.d + + scope:pie_presenting_courtier = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + + stress_impact = { + base = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + after = { + scope:pie_presenting_courtier = { + clear_court_event_participation = yes + } + scope:court_jester = { + clear_court_event_participation = yes + } + } +} + +######################### +# A Little Language +# by Alexander Oltner +######################### + +scripted_trigger appropriate_tutor_trigger = { + is_available_ai_adult = yes + OR = { + AND = { + learning >= 10 + OR = { + has_court_position = court_tutor_court_position + is_eunuch_trigger = yes + } + } + learning >= 20 + } +} + +scripted_trigger appropriate_child_trigger = { + age <= 20 + is_incapable = no + is_imprisoned = no + is_alive = yes + is_ruler = no + is_courtier_of = root + culture = root.culture + num_of_known_languages < 2 +} + +scripted_trigger has_a_good_language_trigger = { + culture = { + NOT = { + has_same_culture_language = root.culture + } + } +} + +# Someone offers to teach your child a language +court.9500 = { + type = court_event + title = court.9500.t + desc = court.9500.desc + theme = court + + cooldown = { + years = 10 + } + + court_scene = { + button_position_character = scope:child_to_learn_language + roles = { + scope:child_to_learn_language = { + group = event_group + animation = dismissal + } + } + roles = { + scope:teacher_target = { + group = event_group + animation = personality_rational + } + } + } + + trigger = { + is_landed = yes + is_available_adult = yes + any_child = { + appropriate_child_trigger = yes + has_court_event_flag = no + save_temporary_scope_as = temp_child_to_learn_lang + } + OR = { # There must be a useful language to learn + any_sub_realm_county = { + has_a_good_language_trigger = yes + } + any_vassal = { + has_a_good_language_trigger = yes + } + any_liege_or_above = { + has_a_good_language_trigger = yes + } + AND = { + exists = faith.religious_head + faith.religious_head = { + has_a_good_language_trigger = yes + } + } + } + any_courtier_or_guest = { + appropriate_tutor_trigger = yes + has_court_event_flag = no + this != scope:temp_child_to_learn_lang + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + random_child = { # Pick a good child + limit = { + appropriate_child_trigger = yes + } + weight = { # Prefer primary heir + base = 1 + modifier = { + add = 100 + this = root.player_heir + } + } + save_scope_as = child_to_learn_language + court_event_character_flag_effect = yes + } + + every_sub_realm_county = { # Pick a culture to take the language from + limit = { + has_a_good_language_trigger = yes + } + culture = { + if = { + limit = { + NOT = { + is_in_list = potential_language_cultures + } + } + } + add_to_list = potential_language_cultures + } + } + every_vassal = { + limit = { + has_a_good_language_trigger = yes + } + culture = { + if = { + limit = { + NOT = { + is_in_list = potential_language_cultures + } + } + } + add_to_list = potential_language_cultures + } + } + every_liege_or_above = { + limit = { + has_a_good_language_trigger = yes + } + culture = { + if = { + limit = { + NOT = { + is_in_list = potential_language_cultures + } + } + } + add_to_list = potential_language_cultures + } + } + if = { + limit = { + exists = faith.religious_head + faith.religious_head = { + has_a_good_language_trigger = yes + } + } + faith.religious_head.culture = { + if = { + limit = { + NOT = { + is_in_list = potential_language_cultures + } + } + } + add_to_list = potential_language_cultures + } + } + + random_in_list = { # Pick the best culture language + list = potential_language_cultures + weight = { + base = 1 + modifier = { # Vassal languages are objectively best to learn + add = 10 + save_temporary_scope_as = culture_check + root = { + any_vassal = { + culture = scope:culture_check + } + } + } + } + save_scope_as = culture_language_to_learn + } + + random_courtier_or_guest = { + limit = { + appropriate_tutor_trigger = yes + this != scope:child_to_learn_language + } + weight = { + base = 1 + modifier = { + add = 100 + has_court_position = court_tutor_court_position + } + modifier = { + add = 50 + is_eunuch_trigger = yes + } + } + hidden_effect = { + assign_quirk_effect = yes + if = { + limit = { + NOT = { + knows_language_of_culture = scope:culture_language_to_learn + } + } + learn_language_of_culture = scope:culture_language_to_learn + } + } + save_scope_as = teacher_target + court_event_character_flag_effect = yes + } + } + + option = { # Pay more than needed; your child must learn! + name = court.9500.a + + pay_short_term_gold = { + target = scope:teacher_target + gold = root.medium_gold_value + } + + scope:child_to_learn_language = { + learn_language_of_culture = scope:culture_language_to_learn + } + + scope:teacher_target = { + add_opinion = { + target = root + opinion = 10 + modifier = grateful_opinion + } + } + + if = { + limit = { + scope:teacher_target = { + NOT = { has_court_position = court_tutor_court_position } + } + can_appoint_char_to_court_position = { + CHAR = scope:teacher_target + COURT_POS = court_tutor_court_position + } + } + court_position_grant_effect = { POS = court_tutor CANDIDATE = scope:teacher_target EMPLOYER = root } + } + + stress_impact = { + greedy = massive_stress_impact_gain + paranoid = major_stress_gain + arrogant = major_stress_impact_gain + fickle = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_greed >= low_positive_ai_value + } + } + } + + option = { # Pay what they ask, and hope your child manages + name = court.9500.b + + pay_short_term_gold = { + target = scope:teacher_target + gold = root.tiny_gold_value + } + + scope:child_to_learn_language = { + duel = { + skill = learning + value = 6 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + + desc = court.9500.b.success + root = { + send_interface_toast = { + title = court.9500.b.success + left_icon = scope:child_to_learn_language + right_icon = scope:teacher_target + + scope:child_to_learn_language = { + learn_language_of_culture = scope:culture_language_to_learn + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = court.9500.b.failure + root = { + send_interface_toast = { + title = court.9500.b.failure + left_icon = scope:child_to_learn_language + right_icon = scope:teacher_target + + scope:child_to_learn_language = { + add_stress = major_stress_gain + } + } + } + } + } + } + + stress_impact = { + generous = major_stress_impact_gain + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_greed >= low_positive_ai_value + } + } + } + + option = { # Deny + name = court.9500.c + + scope:teacher_target = { + add_opinion = { + target = root + opinion = -5 + modifier = disappointed_opinion + } + } + + stress_impact = { + diligent = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + after = { + scope:teacher_target = { + clear_court_event_participation = yes + } + scope:child_to_learn_language = { + clear_court_event_participation = yes + } + } +} diff --git a/N3OW/events/court_events/court_events_general_1.txt b/N3OW/events/court_events/court_events_general_1.txt new file mode 100644 index 00000000..6391c4fa --- /dev/null +++ b/N3OW/events/court_events/court_events_general_1.txt @@ -0,0 +1,1032 @@ +namespace = court_events + +################################################## +# # RANGES +#1000 - 1100 Jason Cantalini +# +################################################## + +##################################### +# The Very Grandest of All # +# by Jason Cantalini # +# 1000-1001 # +##################################### + +# You reach #1 in global court grandeur +court_events.1000 = { + type = court_event + title = court_events.1000.t + desc = court_events.1000.desc + + theme = court + court_scene = { + button_position_character = scope:guest + roles = { + scope:guest = { + group = event_group + animation = throne_room_bow_1 + } + scope:guest_2 = { + group = event_group + animation = throne_room_curtsey_1 + } + root = { + group = event_group + animation = war_over_win + } + } + } + + cooldown = { years = 10 } + + trigger = { + #just to acknowledge players + is_ai = no + is_available = yes + #Is court grandeur at all good? + has_royal_court = yes + court_grandeur_current >= 30 + #Check your court grandeur is at least 10 higher than everyone else's + NOT = { + any_character_with_royal_court = { + court_grandeur_current > root.court_grandeur_current_minus_ten_value + this != root + } + } + } + + immediate = { + #get our first fawning traveler + #grab a guest with traveler or pilgrim trait + if = { + limit = { + any_pool_guest = { + is_available_ai_adult = yes + age >= 25 + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + } + } + random_pool_guest = { + limit = { + is_available_ai_adult = yes + age >= 25 + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + } + save_scope_as = guest + } + } + #grab any pool character + else_if = { + limit = { + any_pool_character = { + province = root.capital_province + age >= 25 + is_available_ai_adult = yes + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + } + } + random_pool_character = { + province = root.capital_province + limit = { + age >= 25 + is_available_ai_adult = yes + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + } + save_scope_as = guest + } + } + #create character + else = { + #will use to grab interesting cultures for travellers + save_traveler_culture_effect = yes + create_character = { + template = traveler_character + location = root.capital_province + random_culture = { + scope:traveler_culture = { + trigger = { + exists = scope:traveler_culture + } + } + } + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + save_scope_as = guest + } + scope:guest = { add_character_flag = created_character } + } + #get our second fawning traveler + #grab a guest with traveler or pilgrim trait + if = { + limit = { + any_pool_guest = { + is_available_ai_adult = yes + age >= 25 + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + this != scope:guest + } + } + random_pool_guest = { + limit = { + is_available_ai_adult = yes + age >= 25 + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + this != scope:guest + } + save_scope_as = guest_2 + } + } + #grab any pool character + else_if = { + limit = { + any_pool_character = { + province = root.capital_province + age >= 25 + is_available_ai_adult = yes + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + this != scope:guest + } + } + random_pool_character = { + province = root.capital_province + limit = { + age >= 25 + is_available_ai_adult = yes + has_court_event_flag = no + OR = { + has_trait = lifestyle_traveler + has_trait = pilgrim + } + this != scope:guest + } + save_scope_as = guest_2 + } + } + #create character + else = { + create_character = { + template = traveler_character + location = root.capital_province + random_culture = { + scope:traveler_culture_2 = { + trigger = { + exists = scope:traveler_culture_2 + } + } + } + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + save_scope_as = guest_2 + } + scope:guest_2 = { add_character_flag = created_character } + } + #grab your high almoner if you have one + court_position:high_almoner_court_position ?= { save_scope_as = high_almoner } + hidden_effect = { + if = { + limit = { + scope:guest = { + NOR = { + has_relation_rival = scope:guest_2 + has_relation_nemesis = scope:guest_2 + has_character_flag = created_character + } + } + scope:guest_2 = { + NOT = { + has_character_flag = created_character + } + } + } + scope:guest = { + set_relation_friend = { + reason = friend_random_fallback + target = scope:guest_2 + } + } + } + else = { + scope:guest = { + set_relation_best_friend = { + reason = friend_random_fallback + target = scope:guest_2 + } + } + } + if = { + limit = { + scope:guest = { has_character_flag = created_character } + scope:guest.culture = { + exists = culture_head + culture_head.faith != scope:guest.faith + } + } + scope:guest = { set_character_faith = culture.culture_head.faith } + } + if = { + limit = { + scope:guest_2 = { has_character_flag = created_character } + scope:guest_2.culture = { + exists = culture_head + culture_head.faith != scope:guest_2.faith + } + } + scope:guest_2 = { set_character_faith = culture.culture_head.faith } + } + if = { + limit = { + NOT = { + scope:guest = { + knows_language_of_culture = scope:guest_2.culture + } + } + scope:guest = { has_character_flag = created_character } + } + scope:guest = { learn_language_of_culture = scope:guest_2.culture } + } + if = { + limit = { + NOT = { + scope:guest_2 = { + knows_language_of_culture = scope:guest.culture + } + } + scope:guest_2 = { has_character_flag = created_character } + } + scope:guest_2 = { learn_language_of_culture = scope:guest.culture } + } + if = { + limit = { + scope:guest = { has_character_flag = created_character } + } + scope:guest = { + add_opinion = { + target = root + modifier = reputation_opinion + opinion = 25 + } + } + } + if = { + limit = { + scope:guest_2 = { has_character_flag = created_character } + } + scope:guest_2 = { + add_opinion = { + target = root + modifier = reputation_opinion + opinion = 25 + } + } + } + } + #get second place ruler so we can dunk on them in loc + random_character_with_royal_court = { + limit = { + NOR = { + any_character_with_royal_court = { + count >= 2 + court_grandeur_current > prev.court_grandeur_current + } + this = root + } + } + save_scope_as = second_court + } + } + + # Option A: self-effacingly use your high almoner to prove you are both grand and humble + option = { + name = court_events.1000.a + flavor = court_events.1000.a.flavor + trigger = { + exists = scope:high_almoner + scope:high_almoner = { + aptitude = { + court_position = high_almoner_court_position + value >= 2 + } + } + } + reason = high_almoner + add_piety = medium_piety_gain + capital_county = { + change_development_level = 1 + } + remove_short_term_gold = medium_gold_value + stress_impact = { + generous = miniscule_stress_impact_loss + arrogant = major_stress_impact_gain + greedy = major_stress_impact_gain + ambitious = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 1 + } + } + + #Option B: I'm the greatest of kings, yes. Remain here and tell everyone + option = { + name = court_events.1000.b + flavor = court_events.1000.b.flavor + change_current_court_grandeur = 5 + add_courtier = scope:guest + add_courtier = scope:guest_2 + + random_list = { + 10 = { + give_nickname = nick_the_glorious + } + 10 = { + give_nickname = nick_the_magnificent + } + 10 = { + give_nickname = nick_the_gracious + } + 10 = { + give_nickname = nick_the_stupor_mundi + } + 20 = {} + } + + + custom_tooltip = traveling_friends_court_position_aptitude + + scope:guest = { + add_character_flag = travelling_friend + } + scope:guest_2 = { + add_character_flag = travelling_friend + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + humble = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + } + } + + #Option C: Let all speak of my grandness! Go, spread my legend! + option = { + name = court_events.1000.c + custom_tooltip = visiting_gives_opinion + add_legitimacy = minor_legitimacy_gain + change_current_court_grandeur = 5 + scope:guest = { + add_character_flag = spreading_word_of_grandeur + set_variable = { + name = greatest_court_holder + value = root + } + } + scope:guest_2 = { + add_character_flag = spreading_word_of_grandeur + set_variable = { + name = greatest_court_holder + value = root + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + } + } + + + after = { + scope:guest = { + clear_court_event_participation = yes + remove_character_flag ?= created_character + } + scope:guest_2 = { + clear_court_event_participation = yes + remove_character_flag ?= created_character + } + } +} + +#ruler hosting travellers gains opinion of #1 grand emperor +court_events.1001 = { + hidden = yes + trigger = { + scope:guest = { + has_character_flag = spreading_word_of_grandeur + var:greatest_court_holder = { + is_alive = yes + has_royal_court = yes + } + } + } + immediate = { + scope:guest = { + var:greatest_court_holder = { + reverse_add_opinion = { + modifier = reputation_opinion + target = host + opinion = 20 + } + } + } + } +} + +scripted_trigger court_events_1010_players_nobody_trigger = { + is_healthy = yes + is_available_ai_adult = yes + NOR = { + is_close_family_of = liege + has_relation_lover = liege + has_relation_soulmate = liege + has_relation_friend = liege + has_relation_best_friend = liege + has_relation_guardian = liege + has_relation_bully = liege + has_relation_victim = liege + is_consort_of = root + is_hostage_of = root + has_trait = loyal + ep3_story_cycle_admin_eunuch_involved_character = yes + } + ai_honor <= low_positive_ai_value + has_any_court_position = no + is_councillor = no + is_acclaimed = no + opinion = { + target = liege + value <= -30 + } +} +scripted_trigger court_events_1010_ais_courtier_trigger = { + is_healthy = yes + is_available_ai_adult = yes + NOR = { + is_heir_of = liege + has_relation_lover = liege + has_relation_soulmate = liege + has_relation_friend = liege + has_relation_best_friend = liege + has_relation_guardian = liege + has_relation_bully = liege + has_relation_victim = liege + is_consort_of = root + is_hostage_of = root + has_trait = loyal + ep3_story_cycle_admin_eunuch_involved_character = yes + } + ai_honor <= low_positive_ai_value + is_acclaimed = no + opinion = { + target = liege + value <= -20 + } +} + +##################################### +# Maybe I should steal servants? # +# by Jason Cantalini # +# 01010 # +##################################### + +# You meet with some disgruntled functionaries who work for a great ruler +court_events.1010 = { + type = court_event + title = court_events.1010.t + desc = court_events.1010.desc + + theme = court + court_scene = { + button_position_character = scope:defector + roles = { + scope:defector = { + group = event_group + animation = obsequious_bow + } + root = { + group = event_group + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + } + } + lower_right_portrait = scope:grander_ruler + lower_left_portrait = scope:court_chaplain + + cooldown = { years = 10 } + + trigger = { + + has_royal_court = yes + #Is court grandeur at all good? + court_grandeur_current >= 10 + is_available = yes + #Check someone's court grandeur is at least 10 higher than yours + any_character_with_royal_court = { + court_grandeur_current >= root.court_grandeur_current_plus_ten_value + this != root + in_diplomatic_range = root + NOR = { + is_at_war_with = root + has_character_flag = had_court_events_1000 + } + #Get a shitty character from a player or good one from ai + OR = { + AND = { + is_ai = no + any_courtier = { + court_events_1010_players_nobody_trigger = yes + } + } + AND = { + is_ai = yes + any_courtier = { + court_events_1010_ais_courtier_trigger = yes + } + } + } + } + exists = cp:councillor_court_chaplain + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.33 + #It will be annoying if AI steal lots of courtiers + #And foreigners being thrown around might look weird + is_ai = yes + } + } + + immediate = { + #Save the court owner being targeted + random_character_with_royal_court = { + limit = { + court_grandeur_current >= root.court_grandeur_current_plus_ten_value + this != root + in_diplomatic_range = root + NOR = { + is_at_war_with = root + has_character_flag = had_court_events_1000 + } + #Get a shitty character from a player or good one from ai + OR = { + AND = { + is_ai = no + any_courtier = { + court_events_1010_players_nobody_trigger = yes + } + } + AND = { + is_ai = yes + any_courtier = { + court_events_1010_ais_courtier_trigger = yes + } + } + } + } + save_scope_as = grander_ruler + } + scope:grander_ruler = { + if = { + limit = { + is_ai = no + any_courtier = { + court_events_1010_players_nobody_trigger = yes + opinion = { + target = scope:grander_ruler + value <= -75 + } + } + } + random_courtier = { + limit = { + court_events_1010_players_nobody_trigger = yes + opinion = { + target = scope:grander_ruler + value <= -75 + } + } + save_scope_as = defector + } + } + else_if = { + limit = { + is_ai = yes + any_courtier = { + court_events_1010_ais_courtier_trigger = yes + } + opinion = { + target = scope:grander_ruler + value <= -75 + } + } + random_courtier = { + limit = { + court_events_1010_ais_courtier_trigger = yes + opinion = { + target = scope:grander_ruler + value <= -75 + } + } + save_scope_as = defector + } + } + else_if = { + limit = { + is_ai = no + } + random_courtier = { + limit = { + court_events_1010_players_nobody_trigger = yes + } + save_scope_as = defector + } + } + else = { + random_courtier = { + limit = { + court_events_1010_ais_courtier_trigger = yes + } + save_scope_as = defector + } + } + } + #This will be a relevant fella + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + } + + #grab your antiquarian if you have one + court_position:antiquarian_court_position ?= { save_scope_as = antiquarian } + save_scope_as = root_scope + #Save artifact to potentially steal + if = { + limit = { + scope:grander_ruler = { + any_character_artifact = { + ep1_artifact_is_court_artifact_trigger = yes + NOR = { + has_variable = banner_house + has_variable = banner_dynasty + } + } + } + } + scope:grander_ruler = { + random_character_artifact = { + limit = { + ep1_artifact_is_court_artifact_trigger = yes + NOR = { + has_variable = banner_house + has_variable = banner_dynasty + } + } + save_scope_as = coveted_artifact + } + } + } + scope:grander_ruler = { + add_character_flag = { + flag = had_court_events_1000 + years = 5 + } + } + } + + # Option A: just courtiers? What about stealing a fine artifact too...? + option = { + name = court_events.1010.a + flavor = court_events.1010.a.flavor + trigger = { + exists = scope:antiquarian + exists = scope:coveted_artifact + scope:antiquarian = { + aptitude = { + court_position = antiquarian_court_position + value >= 3 + } + } + scope:grander_ruler = { is_ai = yes } + } + reason = antiquarian + scope:defector = { + duel = { + skill = intrigue + target = scope:grander_ruler + 70 = { # Your new courtier steals the artifact + desc = court_events.1010.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -69 + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = court_events.1010.a.success + left_icon = scope:defector + right_icon = scope:grander_ruler + scope:coveted_artifact = { + set_owner = { + target = root + history = { + location = root.capital_province + actor = scope:grander_ruler + recipient = root + type = stolen + } + } + } + set_relation_rival = { + target = scope:grander_ruler + reason = rival_stole_artifact + } + change_current_court_grandeur = 25 + scope:grander_ruler = { change_current_court_grandeur = -15 } + add_courtier = scope:defector + } + } + } + 30 = { # The fella frigs up + desc = court_events.1010.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = court_events.1010.a.failure + left_icon = scope:defector + right_icon = scope:grander_ruler + + scope:defector = { + death = { + death_reason = death_execution + killer = scope:grander_ruler + } + } + } + } + } + } + } + add_prestige = medium_prestige_loss + stress_impact = { + greedy = minor_stress_impact_loss + eccentric = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_loss + honest = major_stress_impact_gain + just = major_stress_impact_gain + generous = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + content = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + modifier = { + add = -75 + OR = { + has_trait = compassionate + has_trait = content + has_trait = trusting + } + } + modifier = { + factor = 0 + OR = { + prestige <= major_prestige_value + has_trait = honest + has_trait = just + has_trait = generous + } + } + } + } + + #Option B: Come. Serve with honor here + option = { + name = court_events.1010.b + + + if = { + limit = { + scope:grander_ruler = { is_ai = no } + } + show_as_tooltip = { + change_current_court_grandeur = 20 + scope:grander_ruler = { change_current_court_grandeur = -10 } + add_courtier = scope:defector + } + + scope:grander_ruler = { + trigger_event = court_events.1011 + } + } + else = { + change_current_court_grandeur = 20 + scope:grander_ruler = { change_current_court_grandeur = -10 } + add_courtier = scope:defector + } + reverse_add_opinion = { + target = scope:defector + modifier = loyalty_opinion + opinion = 20 + } + add_prestige = major_prestige_loss + + + stress_impact = { + trusting = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = -1 + } + modifier = { + add = -75 + OR = { + has_trait = humble + has_trait = content + } + } + modifier = { + factor = 0 + OR = { + prestige <= major_prestige_value + has_trait = honest + has_trait = just + has_trait = paranoid + } + } + } + } + + #If I need functionaries, why not some priests? + option = { + name = court_events.1010.c + flavor = court_events.1010.c.flavor + + change_current_court_grandeur = 10 + scope:court_chaplain = { + add_learning_skill = 2 + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + add_piety = medium_piety_loss + + stress_impact = { + cynical = major_stress_impact_gain + arrogant = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = 0.5 + } + modifier = { + add = -75 + OR = { + has_trait = arrogant + has_trait = gregarious + } + } + modifier = { + factor = 0 + OR = { + piety <= medium_piety_value + has_trait = cynical + } + } + } + } + #Disloyal people? Go serve, and feel shame + option = { + name = court_events.1010.d + + every_vassal = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 10 + target = root + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:grander_ruler + opinion = 20 + } + + add_prestige = minor_prestige_gain + + stress_impact = { + arbitrary = minor_stress_impact_gain + deceitful = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + ai_honor = 1 + } + modifier = { + add = -75 + OR = { + has_trait = arbitrary + has_trait = generous + } + } + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = deceitful + } + } + } + } +} + +court_events.1011 = { + type = letter_event + opening = { + desc = court_events.1011.opening + } + desc = court_events.1011.desc + sender = scope:defector + + immediate = { + change_current_court_grandeur = -10 + scope:root_scope = { + change_current_court_grandeur = 20 + add_courtier = scope:defector + } + } + + option = { + name = court_events.1011.a + } +} diff --git a/N3OW/events/court_maintenance_events.txt b/N3OW/events/court_maintenance_events.txt new file mode 100644 index 00000000..19ff1595 --- /dev/null +++ b/N3OW/events/court_maintenance_events.txt @@ -0,0 +1,703 @@ +#Court Maintenance events of various persuasions + +namespace = court_maintenance + +#Children should acquire personality trait events +court_maintenance.0003 = { + hidden = yes + + trigger = { + OR = { + is_adult = no + any_courtier_or_guest = { + is_adult = no + } + any_prisoner = { + is_adult = no + } + } + } + + immediate = { + if = { + limit = { + is_adult = no + OR = { + age = 9 + age = 11 + age = 13 + age >= 14 #Backup in case something has gone wrong + } + number_of_personality_traits < childhood_personality_trait_gain_limit + } + if = { + limit = { + age = 9 + has_variable = reincarnation_of + can_become_reincarnation_trigger = yes + } + trigger_event = child_personality.9900 + } + else = { + trigger_event = { + on_action = child_personality_gain + days = { 1 360 } + } + } + } + every_courtier_or_guest = { + limit = { + is_adult = no + OR = { + age = 9 + age = 11 + age = 13 + age >= 14 #Backup in case something has gone wrong + } + number_of_personality_traits < childhood_personality_trait_gain_limit + } + trigger_event = { + on_action = child_personality_gain + days = { 1 360 } + } + } + #Small random chance to acquire a fourth personality trait + every_courtier_or_guest = { + limit = { + is_adult = no + number_of_personality_traits = childhood_personality_trait_gain_limit + number_of_personality_traits < personality_trait_limit + } + random = { + chance = childhood_fourth_personality_trait_chance + trigger_event = { + on_action = child_personality_gain + days = { 1 360 } + } + } + } + every_prisoner = { + limit = { + is_adult = no + OR = { + age = 9 + age = 11 + age = 13 + age >= 14 #Backup in case something has gone wrong + } + number_of_personality_traits < childhood_personality_trait_gain_limit + } + trigger_event = { + on_action = child_personality_gain + days = { 1 360 } + } + } + #Small random chance to acquire a fourth personality trait + every_prisoner = { + limit = { + is_adult = no + number_of_personality_traits = childhood_personality_trait_gain_limit + number_of_personality_traits < personality_trait_limit + } + random = { + chance = childhood_fourth_personality_trait_chance + trigger_event = { + on_action = child_personality_gain + days = { 1 360 } + } + } + } + } +} + +court_maintenance.0005 = { + hidden = yes + + trigger = { + scope:new_employer = { + government_has_flag = government_is_holy_order + } + } + + immediate = { + add_trait = order_member + } +} + +#Absent from your court +court_maintenance.0010 = { + theme = crown + override_background = { reference = council_chamber } + type = character_event + title = court_maintenance.0010.t + left_portrait = { + character = scope:messenger + animation = worry + } + + cooldown = { years = 5 } + + trigger = { + always = no # Disabled for now + has_royal_court = yes + has_dlc_feature = royal_court + is_ai = no + is_available_adult = yes + is_at_war = no + } + + desc = { + desc = court_maintenance.0010.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:great_cgv_court + } + desc = court_maintenance.0010.desc.seeking_gainful_employment + } + desc = court_maintenance.0010.desc.general_ending + } + } + + immediate = { + ordered_independent_ruler = { + order_by = court_grandeur_current + limit = { + faith.religion = root.faith.religion + in_diplomatic_range = root + this != root + } + alternative_limit = { + this != root + in_diplomatic_range = root + } + alternative_limit = { + this != root + } + save_scope_as = great_cgv_court + } + random_courtier = { + limit = { + has_any_court_position = yes + } + alternative_limit = { + is_available_adult = yes + } + save_scope_as = messenger + } + } + + option = { + name = court_maintenance.0010.a + #Open Royal Court + custom_tooltip = court_maintenance.0010.a.tooltip + open_view_data = { + view = royal_court + player = root + } + } + + option = { + name = { + text = court_maintenance.0010.b.paranoid + trigger = { has_trait = paranoid } + } + name = { + text = court_maintenance.0010.b.depressed + trigger = { has_trait = depressed } + } + name = { + text = court_maintenance.0010.b.brave + trigger = { has_trait = brave } + } + name = { + text = court_maintenance.0010.b + trigger = { always = yes } + } + change_current_court_grandeur = miniscule_court_grandeur_loss + if = { + limit = { exists = scope:great_cgv_court } + custom_tooltip = court_maintenance.0010.b.tooltip + } + hidden_effect = { + if = { + limit = { exists = scope:great_cgv_court } + random_courtier = { + limit = { + has_any_court_position = no + is_physically_able_ai_adult = yes + is_councillor = no + NOT = { is_vassal_of = root } + NOT = { is_close_family_of = ROOT } + } + set_employer = scope:great_cgv_court + return_to_court = yes + } + } + } + } +} + +#Gained a Royal Court +court_maintenance.0011 = { + theme = new_royal_court + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + desc = court_maintenance.0011.t.regent + } + desc = court_maintenance.0011.t + } + } + window = visit_settlement_window + desc = { + first_valid = { + triggered_desc = { + trigger = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + desc = court_maintenance.0011.desc.regent + } + triggered_desc = { + trigger = { coronation_trigger = yes } + desc = court_maintenance.0011.desc.ach + } + desc = court_maintenance.0011.desc + } + } + + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:messenger + animation = ecstasy + } + artifact = { # To display the dynasty banner in the event-window + target = scope:dynasty_banner + position = lower_center_portrait + } + artifact = { # To display the house banner in the event-window + target = scope:house_banner + position = lower_right_portrait + } + + trigger = { + is_ai = no + is_landed = yes + has_dlc_feature = royal_court + # To avoid farming and duplication + OR = { + # No owned house banner + NOT = { + any_character_artifact = { + has_variable = banner_house + var:banner_house = root.house + } + } + AND = { + # Is Dynasty Head + OR = { + this = dynasty.dynast # Dynasty Head + any_parent = { # Parent landless + employer = prev + dynasty = prev.dynasty + this = dynasty.dynast + } + } + # Dynasty banner does not exist + NOT = { + any_character_artifact = { + has_variable = banner_dynasty + var:banner_dynasty = root.dynasty + } + } + } + } + } + + immediate = { + tgp_save_realm_ceremonial_liege_effect = yes + if = { + limit = { + coronation_trigger = yes + NOT = { has_game_rule = coronation_laws_off } + } + coronation_reset_realm_law_effect = yes #we need to reset the crown laws immediately, not wait for the next tick + set_variable = coronation_discount + custom_tooltip = court_maintenance.0011.coronation_discount + + # Coronations law + show_as_tooltip = { + add_realm_law = uncrowned + } + + # Artifact for Coronations setup + create_proper_coronation_artifact_setup = yes + } + + if = { + limit = { + exists = cp:councillor_chancellor + } + cp:councillor_chancellor = { save_scope_as = messenger } + } + else_if = { + limit = { + any_councillor = { + is_kurultai_trigger = yes + } + } + random_councillor = { + limit = { + is_kurultai_trigger = yes + } + save_scope_as = messenger + } + } + else = { + random_vassal = { save_scope_as = messenger } + } + #House banner + if = { + limit = { + tgp_is_ceremonial_regent_trigger = no + NOT = { + any_character_artifact = { + has_variable = banner_house + var:banner_house = root.house + } + } + } + set_variable = banner_from_house + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:messenger + TARGET = root.house + } + if = { # For artifact portraits + limit = { exists = scope:newly_created_artifact } + scope:newly_created_artifact = { save_scope_as = house_banner } + } + } + #Dynasty banner + if = { + limit = { + tgp_is_ceremonial_regent_trigger = no + OR = { + this = dynasty.dynast # Dynasty Head + any_parent = { # Parent landless + employer = root + dynasty = root.dynasty + this = dynasty.dynast + } + } + NOT = { + any_character_artifact = { + has_variable = banner_dynasty + var:banner_dynasty = root.dynasty + } + } + } + set_variable = banner_from_dynasty + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:messenger + TARGET = root.dynasty + } + if = { # For artifact portraits + limit = { exists = scope:newly_created_artifact } + scope:newly_created_artifact = { save_scope_as = dynasty_banner } + } + } + #Both + if = { + limit = { + exists = scope:house_banner + exists = scope:dynasty_banner + } + custom_tooltip = court_maintenance.0011.banner_tooltip + } + #House + else_if = { + limit = { exists = scope:house_banner } + custom_tooltip = court_maintenance.0011.banner_house_tooltip + } + #Dynasty + else = { custom_tooltip = court_maintenance.0011.banner_dynasty_tooltip } + + # Add extra legitimacy, for the first time they gain the Kingdom title + add_legitimacy_effect = { LEGITIMACY = major_legitimacy_gain } + } + + option = { + name = court_maintenance.0011.coronation + custom_tooltip = court_maintenance.0011.coronation.tooltip + trigger = { + coronation_trigger = yes + NOR = { + has_character_flag = had_coronation_prompt + has_game_rule = coronation_laws_off + tgp_is_ceremonial_regent_trigger = yes + } + } + if = { #ai should always go straight for it if they can + limit = { is_ai = yes can_host_activity = activity_coronation } + ai_attempt_to_host_activity = activity_coronation + } + else_if = { #if you already have a crown, a window opened for you sire + limit = { coronation_has_proper_artifact_trigger = yes is_ai = no } + open_view_data = { + view = activity_list_detail_host_window + data = activity_type:activity_coronation + player = root + } + } + else = { #Else we start creating a crown + create_proper_coronation_artifact_creation = yes + } + + custom_tooltip = court_maintenance.0011.b.tooltip + + ai_chance = { #AI should always start hosting coronations + base = 100 + } + } + + option = { + name = { + text = court_maintenance.0011.a + trigger = { tgp_is_ceremonial_regent_trigger = no } # Not 'actual' ruler + } + name = { + text = court_maintenance.0011.a.regent + trigger = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + #Open Royal Court + custom_tooltip = court_maintenance.0011.a.tooltip + if = { + limit = { + coronation_trigger = yes + tgp_is_ceremonial_regent_trigger = no # Not 'actual' ruler + NOR = { + has_character_flag = had_coronation_prompt + has_game_rule = coronation_laws_off + government_has_flag = government_is_mandala + } + } + custom_tooltip = court_maintenance.0011.b.tooltip.ach + } + open_view_data = { + view = royal_court + player = root + } + } + option = { + name = court_maintenance.0011.b + custom_tooltip = court_maintenance.0011.b.tooltip + if = { + limit = { + coronation_trigger = yes + tgp_is_ceremonial_regent_trigger = no # Not 'actual' ruler + NOR = { + has_character_flag = had_coronation_prompt + has_game_rule = coronation_laws_off + government_has_flag = government_is_mandala + } + } + custom_tooltip = court_maintenance.0011.b.tooltip.ach + } + } + + after = { + add_character_flag = had_coronation_prompt + if = { + limit = { + has_tgp_dlc_trigger = yes + government_allows = merit + NOT = { has_government = celestial_government } #Created from cycle + } + create_artifact_dynastic_imperial_seal_effect = { + OWNER = root + SMITH = root + } + } + } +} + +#Dynasty Banner improves +scripted_trigger dynasty_banner_improve_rarity_trigger = { + trigger_if = { + limit = { root.dynasty.dynasty_prestige_level = max_dynasty_prestige_level } + NOT = { rarity = illustrious } + } + trigger_else_if = { + limit = { root.dynasty.dynasty_prestige_level >= high_dynasty_prestige_level } + NOR = { + rarity = famed + rarity = illustrious + } + } + trigger_else = { + root.dynasty.dynasty_prestige_level >= medium_dynasty_prestige_level + NOR = { + rarity = masterwork + rarity = famed + rarity = illustrious + } + } +} + +scripted_effect dynasty_banner_improve_rarity_effect = { + if = { + limit = { scope:target.dynasty_prestige_level = max_dynasty_prestige_level } + set_artifact_rarity = illustrious + } + else_if = { + limit = { scope:target.dynasty_prestige_level >= high_dynasty_prestige_level } + set_artifact_rarity = famed + } + else = { set_artifact_rarity = masterwork } + hidden_effect = { + set_artifact_description = artifact_wall_banner_dynasty_description + clear_artifact_modifiers = yes + add_scaled_artifact_modifier_grandeur_small_effect = yes + add_scaled_artifact_modifier_dynasty_prestige_effect = yes + add_scaled_artifact_modifier_prestige_effect = yes + add_scaled_artifact_modifier_rulership_effect = yes + } +} + +court_maintenance.0012 = { + theme = new_royal_court + type = character_event + title = court_maintenance.0012.t + desc = { + desc = court_maintenance.0012.desc + first_valid = { + triggered_desc = { + trigger = { scope:target.dynasty_prestige_level = max_dynasty_prestige_level } + desc = court_maintenance.0012.desc_illustrious + } + triggered_desc = { + trigger = { scope:target.dynasty_prestige_level >= high_dynasty_prestige_level } + desc = court_maintenance.0012.desc_masterwork + } + desc = court_maintenance.0012.desc_famed + } + } + left_portrait = { + character = root + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:banner_scope + position = lower_right_portrait + } + + trigger = { + any_character_artifact = { + trigger_if = { # To stop errors + limit = { exists = var:banner_dynasty } # is a dynasty banner + var:banner_dynasty = root.dynasty # of my dynasty + dynasty_banner_improve_rarity_trigger = yes # and should be a higher level + } + trigger_else = { always = no } + } + } + + immediate = { + dynasty = { save_scope_as = target } # for banner desc + # save relevant banners (all just in case) + every_character_artifact = { + limit = { + has_variable = banner_dynasty + var:banner_dynasty = root.dynasty + dynasty_banner_improve_rarity_trigger = yes + } + add_to_list = dynasty_banner_list + } + random_in_list = { + list = dynasty_banner_list + limit = { is_equipped = yes } + alternative_limit = { always = yes } + save_scope_as = banner_scope + save_scope_as = newly_created_artifact + } + every_in_list = { + list = dynasty_banner_list + dynasty_banner_improve_rarity_effect = yes + } + } + + option = { + name = court_maintenance.0012.a + } +} + +court_maintenance.0013 = { + theme = new_royal_court + type = character_event + title = court_maintenance.0013.t + desc = { + desc = court_maintenance.0013.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:banner_scope.var:banner_commissioner + scope:banner_scope.var:banner_commissioner != root + } + desc = court_maintenance.0013.desc_creator + } + desc = court_maintenance.0013.desc_fallback + } + } + left_portrait = { + character = root + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:banner_scope + position = lower_right_portrait + } + + trigger = { + any_character_artifact = { # Has more than one dynasty banner of own dynasty + count > 1 + trigger_if = { # To stop errors + limit = { exists = var:banner_dynasty } + var:banner_dynasty = root.dynasty + } + trigger_else = { always = no } + } + } + + immediate = { + every_character_artifact = { # Fetch all dynasty banners + limit = { + has_variable = banner_dynasty + var:banner_dynasty = root.dynasty + } + add_to_list = dynasty_banner_list + } + ordered_in_list = { # Save oldest dynasty banner + list = dynasty_banner_list + order_by = artifact_age + save_scope_as = banner_scope + } + every_in_list = { # Destroy all but oldest dynasty banner + list = dynasty_banner_list + limit = { + this != scope:banner_scope + } + destroy_artifact = this + } + } + + option = { + name = court_maintenance.0013.a + custom_tooltip = court_maintenance.0013.tt + + } +} diff --git a/N3OW/events/court_position_management_events.txt b/N3OW/events/court_position_management_events.txt new file mode 100644 index 00000000..510406de --- /dev/null +++ b/N3OW/events/court_position_management_events.txt @@ -0,0 +1,261 @@ +# Court Position re-assignment events +namespace = court_position_management_event + +# Generic / landed character court position vacated event, offer the up to two best candidates by aptitude +court_position_management_event.0001 = { + type = character_event + title = court_position_management_event.0001.t + theme = court + + desc = { + desc = court_position_management_event.0001.desc + triggered_desc = { + trigger = { + scope:employee = { + is_alive = no + } + } + desc = court_position_management_event.0001.desc.dead + } + triggered_desc = { + trigger = { + exists = scope:candidate_1 + NOT = { exists = scope:candidate_2 } + } + desc = court_position_management_event.0001.desc.one_candidate + } + triggered_desc = { + trigger = { + exists = scope:candidate_1 + exists = scope:candidate_2 + } + desc = court_position_management_event.0001.desc.two_candidates + } + triggered_desc = { + trigger = { + NOT = { exists = scope:candidate_1 } + NOT = { exists = scope:candidate_2 } + } + desc = court_position_management_event.0001.desc.no_candidates + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:candidate_1 } + NOT = { exists = scope:candidate_2 } + } + save_scope_as = left_portrait_character + } + else = { + scope:candidate_1 = { + save_scope_as = left_portrait_character + } + } + } + + left_portrait = { + character = scope:left_portrait_character + + # If we have no candidates, we're just stand there, thinking + triggered_animation = { + trigger = { scope:left_portrait_character = root } + animation = thinking + } + } + + right_portrait = scope:candidate_2 + lower_center_portrait = scope:employee + + # Pick candidate #1 + option = { + name = court_position_management_event.0001.a + custom_tooltip = court_position_management_event.0001.a.aptitude + trigger = { + exists = scope:candidate_1 + exists = scope:court_position_type + } + appoint_court_position = { + recipient = scope:candidate_1 + court_position = scope:court_position_type + } + } + + # Pick candidate #2 + option = { + name = court_position_management_event.0001.b + custom_tooltip = court_position_management_event.0001.b.aptitude + trigger = { + exists = scope:candidate_2 + } + appoint_court_position = { + recipient = scope:candidate_2 + court_position = scope:court_position_type + } + } + + # Go to a recruitment decision + option = { + name = court_position_management_event.0001.c + custom_tooltip = court_position_management_event.0001.c.tt + + # Court positions that are valid in 'recruit_court_position_decision' + trigger = { + NOT = { exists = scope:candidate_1 } + NOT = { exists = scope:candidate_2 } + OR = { + scope:court_position_type = court_position_type:travel_leader_court_position + scope:court_position_type = court_position_type:court_physician_court_position + scope:court_position_type = court_position_type:wet_nurse_court_position + scope:court_position_type = court_position_type:charioteer_court_position + scope:court_position_type = court_position_type:chief_eunuch_court_position + scope:court_position_type = court_position_type:court_gardener_court_position + } + } + + open_view_data = { + view = decision_detail + data = decision:recruit_court_position_decision + player = root + } + } + + # I will figure this out myself + option = { + name = court_position_management_event.0001.d + custom_tooltip = court_position_management_event.0001.d.tt + + trigger = { + exists = scope:candidate_1 + } + + open_view_data = { + view = appoint_position + data = scope:court_position_type + player = root + } + } + + # Leave it open + option = { + name = court_position_management_event.0001.e + } +} + + +# Landless adventurer court position vacated event, offer the up to two best candidates by aptitude +court_position_management_event.0002 = { + type = character_event + title = court_position_management_event.0002.t + theme = landless_adventurer + + desc = { + desc = court_position_management_event.0002.desc + triggered_desc = { + trigger = { + scope:employee = { + is_alive = no + } + } + desc = court_position_management_event.0002.desc.dead + } + triggered_desc = { + trigger = { + exists = scope:candidate_1 + NOT = { exists = scope:candidate_2 } + } + desc = court_position_management_event.0002.desc.one_candidate + } + triggered_desc = { + trigger = { + exists = scope:candidate_1 + exists = scope:candidate_2 + } + desc = court_position_management_event.0002.desc.two_candidates + } + triggered_desc = { + trigger = { + NOT = { exists = scope:candidate_1 } + NOT = { exists = scope:candidate_2 } + } + desc = court_position_management_event.0002.desc.no_candidates + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:candidate_1 } + NOT = { exists = scope:candidate_2 } + } + save_scope_as = left_portrait_character + } + else = { + scope:candidate_1 = { + save_scope_as = left_portrait_character + } + } + } + + left_portrait = { + character = scope:left_portrait_character + + # If we have no candidates, we're just stand there, thinking + triggered_animation = { + trigger = { scope:left_portrait_character = root } + animation = thinking + } + } + + right_portrait = scope:candidate_2 + lower_center_portrait = scope:employee + + # Pick candidate #1 + option = { + name = court_position_management_event.0002.a + custom_tooltip = court_position_management_event.0002.a.aptitude + trigger = { + exists = scope:candidate_1 + exists = scope:court_position_type + } + appoint_court_position = { + recipient = scope:candidate_1 + court_position = scope:court_position_type + } + } + + # Pick candidate #2 + option = { + name = court_position_management_event.0002.b + custom_tooltip = court_position_management_event.0002.b.aptitude + trigger = { + exists = scope:candidate_2 + } + appoint_court_position = { + recipient = scope:candidate_2 + court_position = scope:court_position_type + } + } + + # I will figure this out myself + option = { + name = court_position_management_event.0002.d + custom_tooltip = court_position_management_event.0002.d.tt + + trigger = { + exists = scope:candidate_1 + } + + open_view_data = { + view = appoint_position + data = scope:court_position_type + player = root + } + } + + # Leave it open + option = { + name = court_position_management_event.0002.e + } +} diff --git a/N3OW/events/decisions_events/east_europe_events.txt b/N3OW/events/decisions_events/east_europe_events.txt new file mode 100644 index 00000000..db76d256 --- /dev/null +++ b/N3OW/events/decisions_events/east_europe_events.txt @@ -0,0 +1,2998 @@ +namespace = east_europe + +#decision_unite_the_western_slavs, by Mathilda Bjarnehed +# 0001 - I united the western slavs +# 0002 - Someone else united the western slavs + +#decision_unite_the_southern_slavs, by Mathilda Bjarnehed +# 0005 - I united the southern slavs +# 0006- Someone united the southern slavs + +#decision_unite_the_slavs, by Mathilda Bjarnehed +# 0010 - I united the southern slavs +# 0011 - Someone united the southern slavs + +#decision_defenders_of_highgod, by Mathilda Bjarnehed +# 0015 - I am the Defender of Defensive Pagan Highgod (pick holy site) +# 0016 - I am the Defender of Defensive Pagan Highgod (actual event) +# 0017 - someone is the Defender of Defensive Pagan Highgod + +#decision_promote_hungarian_settlement, by Flavio Verna +# 0030 +# 0031 + +# decision_revive_magyar_paganism, by Flavio Verna +# 0032 +# 0033 +# 0034 + + +#I united the western slavs +east_europe.0001 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0001.t + desc = east_europe.0001.desc + theme = realm + left_portrait = { + character = scope:western_slav_uniter + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + unite_the_western_slavs_decision_effects = yes + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + } + + option = { + name = east_europe.0001.a + + give_nickname = nick_the_wend + } +} + +#Someone united the western slavs +east_europe.0002 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0001.t + desc = east_europe.0002.desc + theme = realm + left_portrait = { + character = scope:western_slav_uniter + animation = personality_honorable + } + + option = { + name = name_i_see + } +} + +#I united the southern slavs +east_europe.0005 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0005.t + desc = east_europe.0005.desc + theme = realm + left_portrait = { + character = scope:southern_slav_uniter + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + unite_the_southern_slavs_decision_effects = yes + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + } + + option = { + name = east_europe.0001.a + + give_nickname = nick_the_crowned + } +} + +#Someone united the southern slavs +east_europe.0006 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0005.t + desc = east_europe.0006.desc + theme = realm + left_portrait = { + character = scope:southern_slav_uniter + animation = personality_honorable + } + + option = { + name = name_i_see + } +} + +#I united all the slavs +east_europe.0010 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0010.t + desc = east_europe.0010.desc + theme = realm + left_portrait = { + character = scope:slav_uniter + animation = personality_honorable + } + + immediate = { + unite_the_slavs_decision_effects = yes + play_music_cue = "mx_cue_epic_sacral_moment" + } + + option = { + name = east_europe.0010.a + + if = { + limit = { is_female = yes } + give_nickname = nick_the_polyanitsa + } + else = { + give_nickname = nick_the_bogatyr + } + } +} + + +#someone united all the slavs +east_europe.0011 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0010.t + desc = east_europe.0011.desc + theme = realm + left_portrait = { + character = scope:slav_uniter + animation = personality_honorable + } + + option = { + name = name_i_see + } +} + +#I am the Defender of Defensive Pagan Highgod (pick holy site) +east_europe.0015 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0015.t + desc = east_europe.0015.desc + theme = faith + left_portrait = { + character = root + animation = personality_zealous + } + + immediate = { + #Music cue in follow-up event. + faith = { + every_holy_site = { + limit = { + county.holder = root + title_province = { has_special_building = no } + # barony = { } + } + add_to_list = holy_sites + } + } + + save_target_list_as_separate_scopes_effect = { TARGET_LIST = holy_sites } + } + + option = { + name = east_europe.0015.a + custom_tooltip = east_europe.0015.tooltip + scope:target_list_member_a = { + save_scope_as = holy_site + } + } + + option = { + name = east_europe.0015.b + custom_tooltip = east_europe.0015.tooltip + scope:target_list_member_b = { + save_scope_as = holy_site + } + } + + option = { + trigger = { exists = scope:target_list_member_c } + name = east_europe.0015.c + custom_tooltip = east_europe.0015.tooltip + scope:target_list_member_c = { + save_scope_as = holy_site + } + } + + option = { + trigger = { exists = scope:target_list_member_d } + name = east_europe.0015.d + custom_tooltip = east_europe.0015.tooltip + scope:target_list_member_d = { + save_scope_as = holy_site + } + } + + after = { + trigger_event = east_europe.0016 + } +} + +#I am the Defender of Defensive Pagan Highgod (actual event) +east_europe.0016 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0015.t + desc = east_europe.0016.desc + theme = faith + left_portrait = { + character = scope:defender_of_highgod + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + defenders_of_highgod_decision_effects = yes + } + + option = { + name = east_europe.0016.a + + give_nickname = nick_the_defender_of_highgod + } + + after = { + every_player = { + limit = { + this != scope:defender_of_highgod + is_within_diplo_range = { CHARACTER = root } + } + trigger_event = east_europe.0017 + } + } +} + + +#someone is the Defender of Defensive Pagan Highgod +east_europe.0017 = { #by Mathilda Bjarnehed + type = character_event + title = east_europe.0015.t + desc = east_europe.0017.desc + theme = faith + left_portrait = { + character = scope:defender_of_highgod + animation = personality_zealous + } + + immediate = { + #If the character shares the hero's faith, _then_ cue the music. + if = { + limit = { faith = scope:defender_of_highgod.faith } + play_music_cue = "mx_cue_sacredrite" + } + } + + option = { + name = { + trigger = { faith = scope:defender_of_highgod.faith } + text = east_europe.0016.a + } + name = { + trigger = { faith != scope:defender_of_highgod.faith } + text = name_i_see + } + } +} + + +#Hungarian Resettlement decision + +east_europe.0030 = { # by Flavio Verna + type = character_event + title = east_europe.0030.t + desc = east_europe.0030.desc + theme = faith + left_portrait = { + character = scope:scoped_ruler + animation = personality_rational + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + save_scope_as = scoped_ruler + promote_hungarian_settlement_decision_scripted_effect = yes + } + + option = { + name = east_europe.0030.a + every_player = { + limit = { + this != root + capital_province = { + geographical_region = world_europe_east + } + } + trigger_event = east_europe.0031 + } + } +} + +east_europe.0031 = { # by Flavio Verna + type = character_event + title = east_europe.0031.t + desc = { + first_valid = { + # Hungarian Vassal reaction. + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_magyar } + target_is_liege_or_above = scope:scoped_ruler + } + desc = east_europe.0031.desc.vassals + } + desc = east_europe.0031.desc.others + } + } + theme = faith + left_portrait = { + character = scope:scoped_ruler + animation = personality_rational + } + + option = { + name = { + trigger = { + culture = { has_cultural_pillar = heritage_magyar } + target_is_liege_or_above = scope:scoped_ruler + } + text = east_europe.0031.a + } + name = { + trigger = { + NAND = { + culture = { has_cultural_pillar = heritage_magyar } + target_is_liege_or_above = scope:scoped_ruler + } + } + text = east_europe.0031.b + } + } +} + +################################################## +# Reviving Magyarism +# by Flavio Verna & Ewan Cowhig Croft +# 0032-0034 +################################################## + +scripted_effect revive_magyar_paganism_notify_players_effect = { + every_player = { + limit = { + this != root + capital_province = { + geographical_region = world_europe_east + } + } + trigger_event = east_europe.0034 + } +} + +east_europe.0032 = { + type = character_event + title = east_europe.0032.t + desc = east_europe.0032.desc + theme = faith + left_portrait = { + character = scope:scoped_ruler + animation = personality_zealous + } + override_background = { reference = throne_room } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + save_scope_as = scoped_ruler + faith = { save_scope_as = old_faith } + revive_magyar_paganism_decision_scripted_effect = yes + legend_seed_great_deed_faith_effect = { + ANTAGONIST = scope:old_faith.religious_head + OLD_FAITH = scope:old_faith + } + } + + #The Old Ways need no adjustment. + option = { + name = east_europe.0032.a + #Get a nice reward for your adherence to the true faith. + add_piety_level = 1 + #Sort notification copy for players. + save_scope_value_as = { + name = hungarian_return + value = flag:vanilla + } + revive_magyar_paganism_notify_players_effect = yes + } + #Syncretism: perhaps we don't leave behind *all* the new teachings... + option = { + name = east_europe.0032.b + #Requires you to have been in a religion that actually has a syncretic tenet available. + trigger = { + scope:old_faith.religion = { + OR = { + this = religion:christianity_religion + this = religion:islam_religion + this = religion:judaism_religion + is_in_family = rf_eastern + } + } + } + #Reasonable carrot for your efforts. + add_piety_experience = major_piety_value + #Christian/Islamic/Jewish/Eastern syncretism replaces astrology. + if = { + limit = { OR = { scope:old_faith.religion = religion:eastern_orthodox_religion scope:old_faith.religion = religion:catholic_religion scope:old_faith.religion = religion:protestant_religion } } + faith:magyar_pagan = { + remove_doctrine = tenet_astrology + add_doctrine = tenet_christian_syncretism + } + } + else_if = { + limit = { scope:old_faith.religion = religion:islam_religion } + faith:magyar_pagan = { + remove_doctrine = tenet_astrology + add_doctrine = tenet_islamic_syncretism + } + } + else_if = { + limit = { scope:old_faith.religion = religion:judaism_religion } + faith:magyar_pagan = { + remove_doctrine = tenet_astrology + add_doctrine = tenet_jewish_syncretism + } + } + else = { + faith:magyar_pagan = { + remove_doctrine = tenet_astrology + add_doctrine = tenet_eastern_syncretism + } + } + #Sort notification copy for players. + save_scope_value_as = { + name = hungarian_return + value = flag:syncretic + } + revive_magyar_paganism_notify_players_effect = yes + } + #Human Sacrifice: we must assert our differences with blood and skulls! + option = { + name = east_europe.0032.c + #Reasonable carrot for your efforts. + add_piety_experience = major_piety_value + #Human sacrifice replaces ancestor worship- + faith:magyar_pagan = { + remove_doctrine = tenet_ancestor_worship + add_doctrine = tenet_human_sacrifice + } + #Sort notification copy for players. + save_scope_value_as = { + name = hungarian_return + value = flag:bloodthirsty + } + revive_magyar_paganism_notify_players_effect = yes + } + #Adaptive: we should always remain protean. + option = { + name = east_europe.0032.d + #Reasonable carrot for your efforts. + add_piety_experience = major_piety_value + #Adaptive replaces auspicious birthright. + faith:magyar_pagan = { + remove_doctrine = tenet_mystical_birthright + add_doctrine = tenet_adaptive + } + #Sort notification copy for players. + save_scope_value_as = { + name = hungarian_return + value = flag:adaptive + } + revive_magyar_paganism_notify_players_effect = yes + } +} + +east_europe.0034 = { + type = character_event + title = east_europe.0034.t + desc = { + first_valid = { + triggered_desc = { + trigger = { top_liege = root } + desc = east_europe.0034.desc.vassals + } + desc = east_europe.0034.desc.outsiders + } + desc = east_europe.0034.desc.intro + triggered_desc = { + trigger = { scope:hungarian_return = flag:vanilla } + desc = east_europe.0034.desc.conversion_vanilla + } + triggered_desc = { + trigger = { scope:hungarian_return = flag:syncretic } + desc = east_europe.0034.desc.conversion_syncretic + } + triggered_desc = { + trigger = { scope:hungarian_return = flag:bloodthirsty } + desc = east_europe.0034.desc.conversion_bloodthirsty + } + triggered_desc = { + trigger = { scope:hungarian_return = flag:adaptive } + desc = east_europe.0034.desc_conversion_adaptive + } + } + theme = faith + left_portrait = scope:scoped_ruler + override_background = { reference = wilderness_forest_pine } + + #Magyar_pagans are happy about this unexpected turn of events! + option = { + name = east_europe.0034.a + trigger = { religion = religion:magyar_religion } + add_stress = minor_stress_loss + } + + #Vassals who do not follow the faith may decide to convert after all. + option = { + name = east_europe.0034.b + trigger = { + top_liege = root + NOT = { religion = religion:magyar_religion } + } + set_character_faith_with_conversion = faith:magyar_pagan + } + + #Those who aren't pagans are probably horrified. + option = { + name = east_europe.0034.c + trigger = { + NOT = { + religion = { is_in_family = rf_pagan } + } + } + } + + #And, as a fallback, some people just won't care. + option = { name = east_europe.0034.d } +} + +################################################## +# Founding the Kingdom of Bosnia +# by Ewan Cowhig Croft +# 0101-0102 +################################################## + +# You founded the kingdom! +east_europe.0101 = { + type = character_event + title = east_europe.0101.t + desc = east_europe.0101.desc + theme = crown + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = wilderness_mountains } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + found_kingdom_of_bosnia_decision_scripted_effect = yes + legend_seed_new_title_effect = yes + } + + #I was motivated by nobility! + option = { + name = east_europe.0101.a + + #Your legacy will be remembered. + add_prestige_experience = major_prestige_gain + + stress_impact = { arrogant = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + } + } + } + + #I was motivated by faith! + option = { + name = east_europe.0101.b + + #Your piety will be remembered. + add_piety_experience = major_piety_gain + + stress_impact = { zealous = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.25 + } + } + } + + #I was motivated by a cynical lust for power! + option = { + name = east_europe.0101.c + + #Your wry smile walking away from your coronation will be remembered. + add_stress = major_stress_loss + + stress_impact = { cynical = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.25 + ai_honor = -0.25 + } + } + } +} + +# Someone else founded the kingdom! +east_europe.0102 = { + type = character_event + title = east_europe.0102.t + desc = east_europe.0102.desc + theme = crown + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = wilderness_mountains } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + found_kingdom_of_bosnia_decision_scripted_effect = yes + } + + #Kings and Emperors consider them an upstart. + option = { + name = east_europe.0102.a + trigger = { highest_held_title_tier >= tier_kingdom } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } + + #Same-culture rulers are probably quite happy. + ##Deliberately same-culture rather than Bosnian, since it's mechanically possible to found the kingdom as a Croatian or Serbian just looking to get a ruler-title. + option = { + name = east_europe.0102.b + trigger = { culture = scope:founder.culture } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } + + #Everyone else is a bit wary. + option = { + name = east_europe.0102.c + trigger = { + NOR = { + highest_held_title_tier >= tier_kingdom + culture = scope:founder.culture + } + } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } +} + +################################################## +# I Think I Smell HERESY +# by Ewan Cowhig Croft +# 0111-0130 +################################################## + +##Local Scripted Triggers + +scripted_trigger krstjani_manipulate_hof_valid_critical_success_target_trigger = { + exists = scope:critical_success + #The accuser must still be around/eligible to actually *be* excommunicated. + scope:accuser = { + is_alive = yes + NOT = { has_trait = excommunicated } + } +} + +scripted_trigger generic_invalidation_criteria_trigger = { + OR = { + scope:hof = { + OR = { + #Scope:hof has died. + is_alive = no + #Scope:hof has been deposed. + this != scope:hof.faith.religious_head + } + } + scope:heretic = { + OR = { + #Scope:heretic has died. + is_alive = no + #Scope:heretic is no longer an independent ruler (including being deposed). + top_liege != this + #Scope:heretic has become a different flavour of ecumenical Christian. + faith = { + NOT = { this = faith:bosnian_church } + has_doctrine = special_doctrine_ecumenical_christian + } + #Scope:heretic has become a different heretic. + faith = { + NAND = { + this = faith:bosnian_church + has_doctrine = special_doctrine_ecumenical_christian + } + } + #Scope:heretic has converted to a different Abrahamic religion. + faith.religion = { + NOT = { this = religion:christianity_religion } + is_in_family = rf_abrahamic + } + #Scope:heretic has converted to a totally different religious family. + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + } +} + +##Local Scripted Effects + +scripted_effect on_trigger_fail_no_heretic_notification_effect = { + #First, we trigger notification events. These have limited mechanical effects, so we're not too worried if they get lost in the system. + #All actual core mechanical functionality is carried out in east_europe.0122, which is a hidden maintenance event, and goes off regardless of whether or not there are players there to witness it. + + scope:accuser = { + #Inform scope:accuser. + if = { + limit = { + is_alive = yes + is_landed = yes + } + #Trigger the notification event. + trigger_event = east_europe.0123 + } + #... Or their probable heir. + else_if = { + limit = { + AND = { #Just here to prevent errors in the event that their primary title has been destroyed. + exists = primary_title.holder + primary_title.holder = { dynasty = scope:accuser.dynasty } + } + } + primary_title.holder = { trigger_event = east_europe.0123 } + } + } + #No notice for scope:heretic, as they've not been informed at all at this stage in the chain. + #Clear the variable from the list after a reasonable cooldown. + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_cancellation_cooldown_value + } +} + +scripted_effect on_trigger_fail_full_notifications_effect = { + #First, we trigger notification events. These have limited mechanical effects, so we're not too worried if they get lost in the system. + #All actual core mechanical functionality is carried out in east_europe.0122, which is a hidden maintenance event, and goes off regardless of whether or not there are players there to witness it. + + scope:accuser = { + #Inform scope:accuser. + if = { + limit = { + is_alive = yes + is_landed = yes + } + trigger_event = east_europe.0123 + } + #... Or their probable heir. + else_if = { + limit = { + AND = { #Just here to prevent errors in the event that their primary title has been destroyed. + exists = primary_title.holder + primary_title.holder = { dynasty = scope:accuser.dynasty } + } + } + primary_title.holder = { trigger_event = east_europe.0123 } + } + } + scope:heretic = { + #Inform scope:heretic. + if = { + limit = { + is_alive = yes + is_landed = yes + } + trigger_event = east_europe.0124 + } + #... Or their probable heir. + else_if = { + limit = { + AND = { #Just here to prevent errors in the event that their primary title has been destroyed. + exists = primary_title.holder + primary_title.holder = { dynasty = scope:heretic.dynasty } + } + } + primary_title.holder = { trigger_event = east_europe.0124} + } + } + #Clear the variable from the list after a reasonable cooldown. + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_cancellation_cooldown_value + } +} + +##Event Block + +# Accuser POV: gatekeeper event. +east_europe.0111 = { + type = character_event + title = east_europe.0111.t + desc = east_europe.0111.desc + theme = faith + left_portrait = { + character = scope:heretic + animation = personality_cynical + } + right_portrait = { + character = scope:hof + animation = personality_zealous + } + override_background = { reference = council_chamber } + + #Novit enim Dominus qui sunt eius! + option = { + name = east_europe.0111.a + + #This is here to cover a _very_ niche invalidation, where the Papacy is abolished and the Pope converts to Islam, so that the invalidation event doesn't refer to the Caliphate by mistake. + faith = { save_scope_as = absolute_faith } + + #"You write a letter to the [HoF]..." + custom_tooltip = east_europe.0111.a.tt + trigger_event = east_europe.0125 + + ai_chance = { + #The AI will always pick this. + base = 100 + } + } + + #On seconds thoughts, better not... + option = { + name = east_europe.0111.b + + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.cancellation_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_cancellation_cooldown_value + } + + ai_chance = { + #The AI never backs down from this event. + base = 0 + } + } +} + +# Accuser POV: HoF rejects out of hand. +east_europe.0112 = { + type = letter_event + opening = east_europe.0112.t + desc = { + desc = east_europe.0112.desc.intro + first_valid = { + #These are ordered in a rough reverse-rarity for maximum variety. + ##HoF is same-culture as the heretic. + triggered_desc = { + trigger = { scope:hof.culture = scope:heretic.culture } + desc = east_europe.0112.desc.culture + } + ##HoF is your rival. + triggered_desc = { + trigger = { + any_relation = { + type = rival + this = scope:hof + } + } + desc = east_europe.0112.desc.rival + } + ##HoF thinks you're sinful as hell. + triggered_desc = { + trigger = { num_sinful_traits >= 3 } + desc = east_europe.0112.desc.sinful + } + ##HoF just really dislikes you. + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:hof + value <= high_negative_opinion + } + } + desc = east_europe.0112.desc.negative_opinion + } + desc = east_europe.0112.desc.fallback + } + desc = east_europe.0112.desc.outro + } + sender = { + character = scope:hof + animation = dismissal + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_no_heretic_notification_effect = yes + } + + #What is HoF thinking?! + option = { + name = east_europe.0112.a + + #Your HoF dislikes your cavalier attitude. + reverse_add_opinion = { + modifier = cavalier_accusations_opinion + target = scope:hof + } + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_failure_cooldown_value + } + + ai_chance = { + #The AI will always choose this. + base = 100 + } + } +} + +# Accuser POV: HoF agrees, and will consult with Krstjani. +east_europe.0113 = { + type = letter_event + opening = east_europe.0113.t + desc = east_europe.0113.desc + sender = { + character = scope:hof + animation = personality_rational + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_no_heretic_notification_effect = yes + } + + #The ecclesiastic wheels are in motion! + option = { + name = east_europe.0113.a + + #HoF appreciates being alerted. + reverse_add_opinion = { + modifier = brought_heretics_to_my_notice_opinion + target = scope:hof + } + + #HoF contacts scope: heretic... + custom_tooltip = east_europe.0113.a.tt + scope:heretic = { + trigger_event = { + id = east_europe.0114 + days = { 7 14 } + } + } + + ai_chance = { + #AI will always choose this option. + base = 100 + } + } +} + +# Heretic POV: Krstjani given choice. +east_europe.0114 = { + type = character_event + title = east_europe.0114.t + desc = east_europe.0114.desc + theme = faith + left_portrait = { + character = scope:accuser + animation = schadenfreude + } + right_portrait = { + character = scope:hof + animation = personality_zealous + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_no_heretic_notification_effect = yes + } + + #Learning: attempt to engage theologically. + option = { + name = east_europe.0114.a + + #Save the response type for later loc. + save_scope_value_as = { + name = krstjani_response + value = flag:theological_debate + } + + #You try to tackle scope:HoF on their own ground. + duel = { + skill = learning + target = scope:hof + #You convince scope:HoF of your status as genuine Christians! + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = east_europe.0114.a.tt_success + custom_tooltip = east_europe.0114.a.tt_success.tt + trigger_event = { + id = east_europe.0118 + days = { 7 14 } + } + } + #Scope:HoF remains critical of your religious practices. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = east_europe.0114.a.tt_failure + custom_tooltip = east_europe.0114.a.tt_failure.tt + trigger_event = { + id = east_europe.0120 + days = { 7 14 } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + lazy = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.75 + ai_boldness = 0.5 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = craven + } + } + } + + #Intrigue: use your hook. + option = { + name = east_europe.0114.b + trigger = { has_usable_hook = scope:hof } + + #Save the response type for later loc. + save_scope_value_as = { + name = krstjani_response + value = flag:political_leverage + } + + #If the hook is strong, and scope:accuser both uses a communion faith & has no counter-hook, then this is a critical success. + if = { + limit = { + has_strong_usable_hook = scope:hof + scope:hof.faith = { has_doctrine_parameter = excommunication_active } + NOT = { + scope:accuser = { has_strong_hook = scope:hof} + } + } + save_scope_value_as = { + name = critical_success + value = yes + } + } + #Spend hooks appropriately. + use_hook = scope:hof + #Send the response event. + custom_tooltip = east_europe.0114.b.tt + trigger_event = { + id = east_europe.0118 + days = { 7 14 } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 10000 #Since this is an autosuccess, the AI should pretttty much always take it if they have the choice (barring stress traits). + ai_value_modifier = { + ai_boldness = 0.75 + ai_honor = -0.5 + } + #Stress values here are set up so that, if scope:heretic has appropriate traits, they might actually _not_ choose this, even with the auto-win. + modifier = { #Weight up for stress. + add = 9920 + has_trait = deceitful + } + modifier = { #Weight up for stress. + add = 9920 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -9920 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -9920 + has_trait = just + } + } + } + + #Intrigue: attempt to manipulate scope:HoF. + option = { + name = east_europe.0114.c + trigger = { + NOT = { has_usable_hook = scope:hof } + } + + #Save the response type for later loc. + save_scope_value_as = { + name = krstjani_response + value = flag:political_manoeuvrings + } + + #You try to argue the point politically. + duel = { + skill = intrigue + target = scope:hof + #You convince scope:HoF that scope:Accuser is just being political. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = east_europe.0114.c.tt_success + custom_tooltip = east_europe.0114.a.tt_success.tt + trigger_event = { + id = east_europe.0118 + days = { 7 14 } + } + } + #Scope:HoF remains critical of your religious practices. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = east_europe.0114.c.tt_failure + custom_tooltip = east_europe.0114.a.tt_failure.tt + trigger_event = { + id = east_europe.0120 + days = { 7 14 } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.75 + ai_honor = -0.5 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = deceitful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -20 + has_trait = honest + } + modifier = { #Weight down for stress. + add = -20 + has_trait = just + } + } + } + + #Faith: convert as requested. + option = { + name = east_europe.0114.d + + #Announce your conversion. + custom_tooltip = east_europe.0114.d.tt + trigger_event = east_europe.0116 + + stress_impact = { + humble = minor_stress_impact_loss + cynical = major_stress_impact_loss + arrogant = minor_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + #Intentionally set these to be a bit more realpolitik than usual: it's not necessarily a sincere conversion, after all. + ai_rationality = 0.75 + ai_zeal = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { #Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -10 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + #Faith: refuse to submit to scope:HoF! + option = { + name = east_europe.0114.e + + #Save the response type for later loc. + save_scope_value_as = { + name = krstjani_response + value = flag:unrepentant_heretics + } + + #Fallout begins. + custom_tooltip = east_europe.0114.e.tt + trigger_event = { + id = east_europe.0120 + days = { 7 14 } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + zealous = major_stress_impact_loss + humble = minor_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + #Intentionally set these to be a bit more realpolitik than usual: it's not necessarily a sincere conversion, after all. + ai_zeal = 0.25 + ai_rationality = -0.75 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { #Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + } + } +} + +# Accuser POV: Krstjani convert. +east_europe.0115 = { + type = character_event + title = east_europe.0115.t + desc = { + desc = east_europe.0115.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:heretic_conversion = flag:political } + desc = east_europe.0115.desc.political + } + triggered_desc = { + trigger = { scope:heretic_conversion = flag:wholehearted } + desc = east_europe.0115.desc.wholehearted + } + } + desc = east_europe.0115.desc.outro + } + theme = faith + left_portrait = { + character = scope:heretic + animation = shame + } + right_portrait = { + character = scope:hof + animation = personality_bold + } + override_background = { reference = council_chamber } + + immediate = { + if = { + limit = { scope:heretic_conversion = flag:political } + show_as_tooltip = { + scope:heretic = { set_character_faith = scope:hof.faith } + } + } + else_if = { + limit = { scope:heretic_conversion = flag:wholehearted } + show_as_tooltip = { + scope:heretic = { set_character_faith_with_conversion = scope:hof.faith } + } + } + } + + #Pah! A false conversion! + option = { + name = east_europe.0115.a + + #Recoup some of your lost piety, at least. + add_piety = medium_piety_gain + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + + ai_chance = { + #The AI will always take this option. + base = 100 + } + } + + #Once a heretic, always a heretic! + option = { + name = east_europe.0115.b + trigger = { + #Option for players to vent. + is_ai = no + can_set_relation_rival_trigger = { CHARACTER = scope:heretic } + } + + #Still recoup that lost piety. + add_piety = medium_piety_gain + #Set the "convert" as your rival. + set_relation_rival = { + target = scope:heretic + reason = rival_faked_conversion + } + hidden_effect = { + scope:heretic = { + send_interface_toast = { + title = east_europe.0115.b.toast + left_icon = scope:accuser + show_as_tooltip = { + set_relation_rival = { + target = scope:accuser + reason = rival_faked_conversion + } + } + } + } + } + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + + ai_chance = { + #The AI does not have access to this option. + base = 0 + } + } +} + +# Heretic POV: Krstjani convert. +east_europe.0116 = { + type = character_event + title = east_europe.0116.t + desc = east_europe.0116.desc + theme = faith + left_portrait = { + character = scope:accuser + animation = shock + } + right_portrait = { + character = scope:hof + animation = personality_bold + } + override_background = { reference = council_chamber } + + immediate = { + #Reduced cooldown for ordinary successes. + custom_tooltip = east_europe.0111.tt.regular_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_failure_cooldown_value + } + #Flag them as a converted Krstjani leader, so that they can't just reconvert for free via false conversions. + add_character_flag = { + flag = atoned_krstjani_leader_flag + years = 20 + } + } + + #A personal admission of faith will do. + option = { + name = east_europe.0116.a + + #I'll just quietly convert by myself. + set_character_faith = scope:hof.faith + #Costs you some piety, but easier to flip back from. + add_piety = minor_piety_loss + #Set up scope:accuser loc. + save_scope_value_as = { + name = heretic_conversion + value = flag:political + } + #Aaaand notify scope:accuser. + scope:accuser = { trigger_event = east_europe.0115 } + + stress_impact = { + stubborn = minor_stress_impact_loss + zealous = minor_stress_impact_loss + fickle = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = stubborn + } + modifier = { #Weight up for stress. + add = 10 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = fickle + } + modifier = { #Weight down for stress. + add = -10 + has_trait = arbitrary + } + } + } + + #I whole-heartedly embrace this opportunity! + option = { + name = east_europe.0116.b + + #The realm must join me! + set_character_faith_with_conversion = scope:hof.faith + #A pious act, from the POV of your new faith. + add_piety = medium_piety_gain + #Set up scope:accuser loc. + save_scope_value_as = { + name = heretic_conversion + value = flag:wholehearted + } + #Aaaand notify scope:accuser. + scope:accuser = { trigger_event = east_europe.0115 } + + stress_impact = { + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + stubborn = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_vengefulness = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = fickle + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -20 + has_trait = stubborn + } + modifier = { #Weight down for stress. + add = -20 + has_trait = zealous + } + } + } +} + +# Accuser POV: Krstjani manipulate HoF. +east_europe.0117 = { + type = character_event + title = east_europe.0117.t + desc = { + desc = east_europe.0117.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:excommunicated_just_now } + desc = east_europe.0117.desc.critical_success + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0117.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_leverage } + desc = east_europe.0117.desc.political_leverage + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0117.desc.political_manoeuvrings + } + } + desc = east_europe.0117.desc.outro + } + theme = faith + left_portrait = { + character = scope:heretic + animation = schadenfreude + } + right_portrait = { + character = scope:hof + animation = personality_forgiving + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_full_notifications_effect = yes + } + + immediate = { + #Apply excommunication if necessary. + if = { + limit = { krstjani_manipulate_hof_valid_critical_success_target_trigger = yes } + add_excommunication_actual_effect = yes + save_scope_value_as = { + name = excommunicated_just_now + value = yes + } + } + #If possible, quietly make scope:hof a potential rival. Just for funsies. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:hof } + } + set_relation_potential_rival = scope:hof + } + } + } + + #This is a travesty! + option = { + name = east_europe.0117.a + trigger = { + NOT = { exists = scope:excommunicated_just_now } + } + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_failure_cooldown_value + } + + ai_chance = { + #The AI will always take this option if available. + base = 100 + } + } + + #Scope:HoF excommunicated *me*?! + option = { + name = east_europe.0117.b + trigger = { exists = scope:excommunicated_just_now } + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a LONG cooldown. + custom_tooltip = east_europe.0111.tt.critical_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_critical_failure_cooldown_value + } + + ai_chance = { + #The AI will always take this option if available. + base = 100 + } + } + + #This is the start of a beautiful rivalry. + option = { + name = east_europe.0117.c + trigger = { + #Option for players to vent. + is_ai = no + can_set_relation_rival_trigger = { CHARACTER = scope:heretic } + } + + #Set the heretic as your rival. + set_relation_rival = { + target = scope:heretic + reason = rival_heresy + } + hidden_effect = { + scope:heretic = { + send_interface_toast = { + title = east_europe.0117.c.toast + left_icon = scope:accuser + show_as_tooltip = { set_relation_rival = scope:accuser } + } + } + } + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + if = { + limit = { exists = scope:excommunicated_just_now } + #Clear the variable from the list after a LONG cooldown. + custom_tooltip = east_europe.0111.tt.critical_cooldown + } + else = { + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.regular_cooldown + } + + stress_impact = { forgiving = minor_stress_impact_gain } + ai_chance = { + #The AI does not have access to this option. + base = 0 + } + } + + #I'll found my own church! With divorce and carnal exultations! + option = { + name = east_europe.0117.d + trigger = { exists = scope:excommunicated_just_now } + + #Players are allowed to choose a consolation prize, for the inconvenience. + add_character_modifier = { + modifier = feud_with_the_church_modifier + years = 20 + } + + #Set up some rivalries from your bluster. + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:heretic } + } + set_relation_rival = { + target = scope:heretic + reason = rival_heresy + } + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:hof } + } + set_relation_rival = { + target = scope:hof + reason = rival_heresy + } + } + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a LONG cooldown. + custom_tooltip = east_europe.0111.tt.critical_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_critical_failure_cooldown_value + } + + + stress_impact = { zealous = major_stress_impact_loss } + ai_chance = { + #The AI doesn't use custom faith reformation, so it'll never take this option. + base = 0 + } + } +} + +# Heretic POV: Krstjani manipulate HoF. +east_europe.0118 = { + type = character_event + title = east_europe.0118.t + desc = { + desc = east_europe.0118.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:accuser = { krstjani_manipulate_hof_valid_critical_success_target_trigger = yes } + } + desc = east_europe.0118.desc.critical_success + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0118.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_leverage } + desc = east_europe.0118.desc.political_leverage + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0118.desc.political_manoeuvrings + } + } + desc = east_europe.0118.desc.outro + } + theme = faith + left_portrait = { + character = scope:accuser + animation = disbelief + } + right_portrait = { + character = scope:hof + animation = personality_zealous + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_full_notifications_effect = yes + } + + immediate = { + if = { + limit = { + scope:accuser = { krstjani_manipulate_hof_valid_critical_success_target_trigger = yes } + } + scope:accuser = { add_excommunication_tooltip_only_effect = yes } + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.critical_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_critical_failure_cooldown_value + } + } + else = { + #Reduced cooldown for ordinary successes. + custom_tooltip = east_europe.0111.tt.regular_cooldown + trigger_event = { + id = east_europe.0122 + years = accuse_the_krstjani_of_heresy_failure_cooldown_value + } + } + scope:accuser = { trigger_event = east_europe.0117 } + } + + #God smiles upon us! + option = { + name = east_europe.0118.a + + #Give them a little reward for doing well. + add_piety = medium_piety_value + + stress_impact = { + zealous = medium_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.25 + } + modifier = { #Weight down for stress. + add = 20 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = cynical + } + } + } + + #I'm just glad this issue is surely settled. + option = { + name = east_europe.0118.b + + add_stress = massive_stress_loss + + stress_impact = { + cynical = medium_stress_impact_loss + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.25 + ai_zeal = -0.5 + } + modifier = { #Weight down for stress. + add = 20 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -10 + has_trait = zealous + } + } + } +} + +# Accuser POV: Krstjani formally declared heretics. +east_europe.0119 = { + type = character_event + title = east_europe.0119.t + desc = { + desc = east_europe.0119.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0119.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0119.desc.political_manoeuvrings + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:unrepentant_heretics } + desc = east_europe.0119.desc.unrepentant_heretics + } + } + desc = east_europe.0119.desc.outro + } + theme = faith + left_portrait = { + character = scope:heretic + animation = shock + } + right_portrait = { + character = scope:hof + animation = personality_vengeful + } + override_background = { reference = council_chamber } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_full_notifications_effect = yes + } + + immediate = { + show_as_tooltip = { + #The Krstjani are formally declared to be heretical. + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + } + } + + #Vindication! + option = { + name = east_europe.0119.a + + add_piety_experience = major_piety_value + + ai_chance = { + #The AI will always take this option. + base = 100 + } + } +} + +# Heretic POV: Krstjani formally declared heretics. +east_europe.0120 = { + type = letter_event + opening = east_europe.0120.t + desc = { + desc = east_europe.0120.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0120.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0120.desc.political_manoeuvrings + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:unrepentant_heretics } + desc = east_europe.0120.desc.unrepentant_heretics + } + } + desc = east_europe.0120.desc.outro + } + sender = { + character = scope:hof + animation = personality_vengeful + } + + trigger = { generic_invalidation_criteria_trigger = no } + + on_trigger_fail = { + on_trigger_fail_full_notifications_effect = yes + } + + immediate = { + #The Krstjani are formally declared to be heretical. + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + #The accuser is told of their triumph! + scope:accuser = { trigger_event = east_europe.0119 } + #Relevant players (neighbouring realms and Krstjani ones) are informed. + every_player = { + limit = { + NOR = { + this = scope:heretic #Not the actual chief heretic. + this = scope:accuser #Nor the chief accuser. + } + OR = { + faith = faith:bosnian_church + any_neighboring_top_liege_realm = { holder = scope:heretic } + } + } + trigger_event = east_europe.0121 + } + } + + #This is terrible! + option = { + name = east_europe.0120.a + + custom_tooltip = east_europe.0120.a.tt + + ai_chance = { + #The AI will always pick this option. + base = 100 + } + } +} + +# Other POV: Krstjani stripped of ecumenism notification for neighbouring rulers. +east_europe.0121 = { + type = character_event + title = east_europe.0121.t + desc = { + desc = east_europe.0121.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:krstjani_response = flag:theological_debate } + desc = east_europe.0121.desc.theological_debate + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:political_manoeuvrings } + desc = east_europe.0121.desc.political_manoeuvrings + } + triggered_desc = { + trigger = { scope:krstjani_response = flag:unrepentant_heretics } + desc = east_europe.0121.desc.unrepentant_heretics + } + } + desc = east_europe.0121.desc.outro + } + theme = faith + left_portrait = { + character = scope:heretic + animation = shock + } + right_portrait = { + character = scope:hof + animation = personality_vengeful + } + lower_right_portrait = scope:accuser + override_background = { reference = council_chamber } + + #Heretics? In our midst?! + option = { + name = east_europe.0121.a + trigger = { + #Can't be Krstjani yourself. + NOT = { faith = faith:bosnian_church } + OR = { + #Either a non-cynical member of the same church. + AND = { + faith = scope:hof.faith + NOT = { has_trait = cynical } + } + #Or a zealous member of another ecumenical church. + AND = { + faith = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + has_doctrine = special_doctrine_ecumenical_christian + } + has_trait = zealous + } + } + } + + show_as_tooltip = { + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + } + + ai_chance = { + #AI choice is irrelevant. + base = 100 + } + } + + #I genuinely don't care. + option = { + name = east_europe.0121.b + trigger = { + NOR = { + #Can't be Krstjani yourself. + faith = faith:bosnian_church + #Must not be a non-cynical member of the same church. + AND = { + faith = scope:hof.faith + NOT = { has_trait = cynical } + } + #Nor a zealous member of another ecumenical church. + AND = { + faith = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + has_doctrine = special_doctrine_ecumenical_christian + } + has_trait = zealous + } + } + } + + show_as_tooltip = { + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + } + + ai_chance = { + #AI choice is irrelevant. + base = 100 + } + } + + #We just wanted to be left alone! + option = { + name = east_europe.0121.c + trigger = { faith = faith:bosnian_church } + + show_as_tooltip = { + faith:bosnian_church = { remove_doctrine = special_doctrine_ecumenical_christian } + } + + ai_chance = { + #AI choice is irrelevant. + base = 100 + } + } +} + +# Maintenance: accusation failure maintenance timer. +east_europe.0122 = { + hidden = yes + + immediate = { + #Quietly reenable the decision to accuse of heresy. + remove_list_global_variable = { + name = unavailable_unique_decisions + target = flag:flag_krstjani_accused_of_heresy + } + } +} + +# Accuser POV: decision has invalidated for some reason. +east_europe.0123 = { + type = character_event + title = east_europe.0123.t + desc = { + desc = east_europe.0123.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:invalidation_type = flag:hof_died } + desc = east_europe.0123.desc.hof_died + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_died } + desc = east_europe.0123.desc.heretic_died + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:hof_no_longer_hof} + desc = east_europe.0123.desc.hof_no_longer_hof + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_not_independent_ruler } + desc = east_europe.0123.desc.heretic_not_independent_ruler + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_ecumenical_christian } + desc = east_europe.0123.desc.heretic_now_ecumenical_christian + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_different_heresy } + desc = east_europe.0123.desc.heretic_now_different_heresy + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_infidel } + desc = east_europe.0123.desc.heretic_now_infidel + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_heathen } + desc = east_europe.0123.desc.heretic_now_heathen + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:fallback } + desc = east_europe.0123.desc.fallback + } + } + desc = east_europe.0123.desc.outro + } + theme = faith + left_portrait = { + character = scope:dead_character + animation = sadness + } + right_portrait = { + character = scope:escaped_on_technicality + animation = dismissal + } + override_background = { reference = council_chamber } + + trigger = { + #Just some basic triggers, since this is mostly, but not entirely, just a notification. + is_alive = yes + is_adult = yes + #Tonally required to not have converted/been inherited by a Krstjan. + NOT = { faith = faith:bosnian_church } + } + + immediate = { + #Check to see why we've invalidated. + ##Scope:hof has died. + if = { + limit = { + scope:hof = { is_alive = no } + } + save_scope_value_as = { + name = invalidation_type + value = flag:hof_died + } + #Set-up portraits. + scope:hof = { save_scope_as = dead_character } + } + ##Scope:heretic has died. + else_if = { + limit = { + scope:heretic = { is_alive = no } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_died + } + #Set-up portraits. + scope:heretic = { save_scope_as = dead_character } + } + ##Scope:hof is no longer actually the hof. + else_if = { + limit = { + scope:hof = { + this != scope:hof.faith.religious_head + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:hof_no_longer_hof + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic is no longer independent. + else_if = { + limit = { + scope:heretic = { top_liege != this } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_not_independent_ruler + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to a different ecumenical faith. + else_if = { + limit = { + scope:heretic = { + faith = { + NOT = { this = faith:bosnian_church } + has_doctrine = special_doctrine_ecumenical_christian + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_ecumenical_christian + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to another heresy. + else_if = { + limit = { + scope:heretic = { + faith = { + NAND = { + this = faith:bosnian_church + has_doctrine = special_doctrine_ecumenical_christian + } + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_different_heresy + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to another Abrahamic religion. + else_if = { + limit = { + scope:heretic = { + faith.religion = { + NOT = { this = religion:christianity_religion } + is_in_family = rf_abrahamic + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_infidel + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to a non-Abrahamic religion. + else_if = { + limit = { + scope:heretic = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_heathen + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Aaaaand a fallback, in case something goes weird. + else = { + save_scope_value_as = { + name = invalidation_type + value = flag:fallback + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + } + + #Accuser POV: it wasn't supposed to end this way! + option = { + name = east_europe.0123.a + + #Recoup some of the lost piety. + add_piety = medium_piety_gain + + #Announce failure. + custom_tooltip = east_europe.0111.tt.announce_failure + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.cancellation_cooldown + + ai_chance = { + #The AI will always pick this option. + base = 100 + } + } +} + +# Heretic POV: decision has invalidated for some reason. +east_europe.0124 = { + type = character_event + title = east_europe.0124.t + desc = { + desc = east_europe.0124.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:invalidation_type = flag:hof_died } + desc = east_europe.0124.desc.hof_died + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_died } + desc = east_europe.0124.desc.heretic_died + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:hof_no_longer_hof} + desc = east_europe.0123.desc.hof_no_longer_hof + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_not_independent_ruler } + desc = east_europe.0124.desc.heretic_not_independent_ruler + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_ecumenical_christian } + desc = east_europe.0124.desc.heretic_now_ecumenical_christian + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_different_heresy } + desc = east_europe.0124.desc.heretic_now_different_heresy + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_infidel } + desc = east_europe.0124.desc.heretic_now_infidel + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:heretic_now_heathen } + desc = east_europe.0124.desc.heretic_now_heathen + } + triggered_desc = { + trigger = { scope:invalidation_type = flag:fallback } + desc = east_europe.0124.desc.fallback + } + } + desc = east_europe.0124.desc.outro + } + theme = faith + left_portrait = { + character = scope:dead_character + animation = sadness + } + right_portrait = { + character = scope:escaped_on_technicality + animation = dismissal + } + override_background = { reference = council_chamber } + + trigger = { + #Just some basic triggers, since this is mostly, but not entirely, just a notification. + is_alive = yes + is_adult = yes + } + + immediate = { + #Check to see why we've invalidated. + ##Scope:hof has died. + if = { + limit = { + scope:hof = { is_alive = no } + } + save_scope_value_as = { + name = invalidation_type + value = flag:hof_died + } + #Set-up portraits. + scope:hof = { save_scope_as = dead_character } + } + ##Scope:heretic has died. + else_if = { + limit = { + scope:heretic = { is_alive = no } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_died + } + #Set-up portraits. + scope:heretic = { save_scope_as = dead_character } + } + ##Scope:hof is no longer actually the hof. + else_if = { + limit = { + scope:hof = { + this != scope:hof.faith.religious_head + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:hof_no_longer_hof + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic is no longer independent. + else_if = { + limit = { + scope:heretic = { top_liege != this } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_not_independent_ruler + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to a different ecumenical faith. + else_if = { + limit = { + scope:heretic = { + faith = { + NOT = { this = faith:bosnian_church } + has_doctrine = special_doctrine_ecumenical_christian + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_ecumenical_christian + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to another heresy. + else_if = { + limit = { + scope:heretic = { + faith = { + NAND = { + this = faith:bosnian_church + has_doctrine = special_doctrine_ecumenical_christian + } + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_different_heresy + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to another Abrahamic religion. + else_if = { + limit = { + scope:heretic = { + faith.religion = { + NOT = { this = religion:christianity_religion } + is_in_family = rf_abrahamic + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_infidel + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Scope:heretic has converted to a non-Abrahamic religion. + else_if = { + limit = { + scope:heretic = { + faith.religion = { + NOT = { is_in_family = rf_abrahamic } + } + } + } + save_scope_value_as = { + name = invalidation_type + value = flag:heretic_now_heathen + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + ##Aaaaand a fallback, in case something goes weird. + else = { + save_scope_value_as = { + name = invalidation_type + value = flag:fallback + } + #Set-up portraits. + scope:heretic = { save_scope_as = escaped_on_technicality } + } + } + + #Heretic POV: well, that's settled, at least. + option = { + name = east_europe.0124.a + + add_stress = medium_stress_loss + + #No need to announce failure to scope:heretic, as this is a success from their POV. + #Clear the variable from the list after a reasonable cooldown. + custom_tooltip = east_europe.0111.tt.cancellation_cooldown + + ai_chance = { + #The AI will always pick this option. + base = 100 + } + } +} + +# Maintenance: HoF decides who they dislike most. +east_europe.0125 = { + hidden = yes + + immediate = { + #What is the HoF's reply? + random_list = { + #Default to yes. + 100 = { + trigger_event = { + id = east_europe.113 + days = { 7 14 } + } + + #Always do it if you have a strong hook on the HoF (though you're not *technically* using it). + modifier = { + add = 1000 + has_strong_hook = scope:hof + } + #Weight up nicely if you have a regular hook (though you're still not *technically* using it). + modifier = { + add = 25 + has_hook = scope:hof + } + #A friendly HoF wants to agree with you. + modifier = { + add = 30 + any_relation = { + type = friend + this = scope:hof + } + } + #A lover HoF wants to agree with you. + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:hof + } + } + #An extremely-friendly HoF wants to agree with you. + modifier = { + add = 20 + reverse_opinion = { + target = scope:hof + value >= high_positive_opinion + } + } + #Potentially-negative values from this point on need to be added to the refusal branch. + ##An extremely-unfriendly HoF wants to disagree with you. + modifier = { + add = -20 + reverse_opinion = { + target = scope:hof + value <= high_negative_opinion + } + } + ##Weight down a bit for sin (no weight up for virtue, since this is already overwhelmingly likely: we're really just checking to see if your HoF is going to call you out for hypocrisy). + modifier = { + add = -10 + num_sinful_traits = 1 + } + modifier = { + add = -20 + num_sinful_traits = 2 + } + modifier = { + add = -30 + num_sinful_traits = 3 + } + modifier = { + add = -40 + num_sinful_traits = 4 + } + modifier = { + add = -50 + num_sinful_traits >= 5 + } + ##A rivalling HoF wants to disagree with you. + modifier = { + add = -50 + any_relation = { + type = rival + this = scope:hof + } + } + ##A HoF that shares scope:heretic's culture is less likely to want to pick on a fellow countryman. + modifier = { + add = -20 + scope:hof.culture = scope:heretic.culture + } + } + #Disable no by default: this option is weighted upwards according to how visibly unchristian scope:accuser is. + 0 = { + trigger_event = { + id = east_europe.0112 + days = 5 + } + + #And now, we invert the values from the acceptance branch: + ##An extremely-unfriendly HoF wants to disagree with you. + modifier = { + add = 20 + reverse_opinion = { + target = scope:hof + value <= high_negative_opinion + } + } + ##Weight down a bit for sin (no weight up for virtue, since this is already overwhelmingly likely: we're really just checking to see if your HoF is going to call you out for hypocrisy). + modifier = { + add = 10 + num_sinful_traits = 1 + } + modifier = { + add = 20 + num_sinful_traits = 2 + } + modifier = { + add = 30 + num_sinful_traits = 3 + } + modifier = { + add = 40 + num_sinful_traits = 4 + } + modifier = { + add = 50 + num_sinful_traits >= 5 + } + ##A rivalling HoF wants to disagree with you. + modifier = { + add = 50 + any_relation = { + type = rival + this = scope:hof + } + } + ##A HoF that shares scope:heretic's culture is less likely to want to pick on a fellow countryman. + modifier = { + add = 20 + scope:hof.culture = scope:heretic.culture + } + } + } + } +} + +################################################## +# Last Gasp of the Great Migrations +# by Ewan Cowhig Croft +# 0131-0150 +################################################## + +# Invader POV: decided to mobilise the Mogyer people. +east_europe.0141 = { + type = character_event + title = east_europe.0141.t + desc = east_europe.0141.desc + theme = culture_change + left_portrait = { + character = scope:invader + animation = personality_bold + } + override_background = { reference = wilderness_steppe } + + immediate = { + save_scope_as = mogyer_invader + every_player = { + limit = { + this != scope:mogyer_invader + } + if = { + limit = { + any_vassal_or_below = { this = scope:mogyer_invader } + } + trigger_event = east_europe.0142 + } + if = { + limit = { + any_sub_realm_county = { + title_province = { geographical_region = custom_hungary } + } + #Exempt the liege from getting this message: should be edge case, but the declaration of war should be enough to let them know that they're gonna have a bad time. + NOT = { + any_vassal_or_below = { this = scope:mogyer_invader } + } + } + trigger_event = east_europe.0143 + } + } + } + + #We ride west! + option = { + name = east_europe.0141.a + + custom_tooltip = east_europe.0141.a.tt + + ai_chance = { + #The AI will always pick this. + base = 100 + } + } +} + +# Liege POV: decided to mobilise the Mogyer people. +east_europe.0142 = { + type = character_event + title = east_europe.0142.t + desc = east_europe.0142.desc + theme = culture_change + left_portrait = { + character = scope:invader + animation = personality_greedy + } + override_background = { reference = wilderness_steppe } + + + #A foolhardy errand. + option = { + name = east_europe.0142.a + + custom_tooltip = east_europe.0142.a.tt + + ai_chance = { + #The AI will always pick this. + base = 100 + } + } +} + +# Pannonian POV: decided to mobilise the Mogyer people. +east_europe.0143 = { + type = character_event + title = east_europe.0143.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + capital_province = { geographical_region = custom_hungary } + } + desc = east_europe.0143.desc.pannonian_capital + } + triggered_desc = { + trigger = { + any_held_title = { + title_tier = county + title_province = { geographical_region = custom_hungary } + } + } + desc = east_europe.0143.desc.pannonian_territory + } + desc = east_europe.0143.desc.fallback + } + desc = east_europe.0143.desc.outro + } + theme = culture_change + left_portrait = { + character = scope:invader + animation = personality_greedy + } + override_background = { reference = wilderness_steppe } + + #They'll never cross the Carpathians! + option = { + name = east_europe.0143.a + + custom_tooltip = east_europe.0143.a.tt + + ai_chance = { + #The AI will always pick this. + base = 100 + } + } +} + + + +################################################## +# Founding the Kingdom of Livonia +# by James Beaumont +################################################## + +# You founded the kingdom! +east_europe.0200 = { + type = character_event + title = east_europe.0200.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root.faith = { + NOT = { religion_tag = baltic_religion } + NOT = { has_doctrine_parameter = unreformed } + } + } + desc = east_europe.0200.desc.christian + } + desc = east_europe.0200.desc.nonchristian + } + desc = east_europe.0200.desc.outro + } + theme = crown + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = wilderness_forest } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + found_kingdom_of_livonia_decision_scripted_effect = yes + legend_seed_new_title_effect = yes + } + + #My name will be known for all time! + option = { + name = east_europe.0200.a + + #Your legacy will be remembered. + add_prestige = major_prestige_gain + if = { + limit = { + OR = { + #Considers themselves to be a "Balt" + root.culture = { has_cultural_pillar = heritage_baltic } + root.faith = { + religion_tag = baltic_religion + } + } + } + if = { + limit = { + is_female = yes + } + give_nickname = nick_mother_of_the_baltic + } + else = { + give_nickname = nick_father_of_the_baltic + } + } + else = { + give_nickname = nick_scourge_of_the_baltic + } + stress_impact = { arrogant = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + } + } + } + + #This was done for the faith! + option = { + name = east_europe.0200.b + + #Your piety will be remembered. + add_piety = major_piety_gain + + stress_impact = { zealous = minor_stress_impact_loss } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.25 + } + } + } +} + +# Someone else founded the kingdom! +east_europe.0201 = { + type = character_event + title = east_europe.0201.t + desc = east_europe.0201.desc + theme = crown + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = wilderness_mountains } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + found_kingdom_of_livonia_decision_scripted_effect = yes + } + + #Kings and Emperors consider them an upstart. + option = { + name = east_europe.0201.a + trigger = { highest_held_title_tier >= tier_kingdom } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } + + #Same-faith rulers are probably quite happy. + option = { + name = east_europe.0201.b + trigger = { faith = scope:founder.faith } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } + + #Everyone else is a bit wary. + option = { + name = east_europe.0201.c + trigger = { + NOR = { + highest_held_title_tier >= tier_kingdom + faith = scope:founder.faith + } + } + + #AI option is inconsequential. + ai_chance = { base = 100 } + } +} + diff --git a/N3OW/events/decisions_events/iberia_north_africa_events.txt b/N3OW/events/decisions_events/iberia_north_africa_events.txt new file mode 100644 index 00000000..eedd45e4 --- /dev/null +++ b/N3OW/events/decisions_events/iberia_north_africa_events.txt @@ -0,0 +1,3311 @@ +namespace = iberia_north_africa + +#decision_form_portugal events +#0001 - Tell founder about portugal +#0002 - Tell everyone in diplo range about portugal (and convert people in portugal to portuguese culture) + +#decision_unite_the_spanish_thrones +#0005 - Tell uniter about united thrones +#0006 - Tell everyone in diplo range about united thrones (and destroy titles) + +#decision_unite_africa +#0010 - I united Africa +#0011 - Someone united Frica + +#decision_avenge_the_battle_of_tours +#0015 - I avenged the battle of Tours +#0016 - Someone avenged the battle of tours + + +#decision_build_grand_church +#1001 - I built a church! +#1002 - Someone built a church + +## FP2 + +#golden_age_jewish_science_in_iberia_decision +#2001 - Book Seller +#2002 - Eye Surgery +#2003 - Fighting Scholars + +#2105 - Notification for Mediterranean decision + +#build_holy_pilgrim_roads_decision +#2011 - Wandering Warrior +#2012 - Relatable Scholar +#2013-2014 - Gift from HoF + + + +#I formed Portugal! +iberia_north_africa.0001 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0001.t + desc = { + desc = iberia_north_africa.0001.start.desc + first_valid = { + triggered_desc = { + trigger = { + game_start_date >= 789.1.1 #The end of Umayyad Conquest + faith = { religion_tag = christianity_religion } + } + desc = iberia_north_africa.0001.christian.desc + } + triggered_desc = { + trigger = { + game_start_date >= 789.1.1 #The end of Umayyad Conquest + faith = { religion_tag = islam_religion } + } + desc = iberia_north_africa.0001.muslim.desc + } + } + desc = iberia_north_africa.0001.end.desc + } + theme = realm + left_portrait = { + character = scope:portugal_former + animation = admiration + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + form_portugal_decision_effects = yes #Title changes, prestige, culture swap + + legend_seed_new_title_effect = yes + } + + option = { + name = iberia_north_africa.0001.a + set_nickname_effect = { NICKNAME = nick_the_great } + } +} + +scripted_trigger iberia_north_africa_0002_is_in_portugal_trigger = { + capital_province = { + county = { + any_this_title_or_de_jure_above = { + this = title:k_portugal + } + } + } +} + +#Someone formed Portugal! +iberia_north_africa.0002 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0001.t + desc = { + desc = iberia_north_africa.0002.start.desc + first_valid = { + triggered_desc = { + trigger = { + has_RelationToMe_relation = { CHARACTER = scope:portugal_former } + } + desc = iberia_north_africa.0002.relation_former.desc + } + desc = iberia_north_africa.0002.former.desc + } + desc = iberia_north_africa.0002.end.desc + } + theme = realm + left_portrait = { + character = scope:portugal_former + animation = admiration + } + + immediate = { + #If in Portugal, play the appropriate sound effect. + if = { + limit = { iberia_north_africa_0002_is_in_portugal_trigger = yes } + play_music_cue = "mx_cue_positive_effect" + } + } + + #OK + option = { + trigger = { iberia_north_africa_0002_is_in_portugal_trigger = no } + name = { + trigger = { faith = scope:portugal_former.faith } + text = iberia_north_africa.0002.a1 + } + name = { + trigger = { faith != scope:portugal_former.faith } + text = name_i_see + } + } + + #Convert to portuguese + option = { + trigger = { iberia_north_africa_0002_is_in_portugal_trigger = yes } + name = iberia_north_africa.0002.b + + every_courtier = { + limit = { has_same_culture_as = root } + add_to_list = convert_list + } + + set_culture = culture:portuguese + + every_in_list = { + list = convert_list + custom = portguese_convert_list_court + set_culture = culture:portuguese + } + + ai_chance = { + base = 1 + } + } + + #Keep my culture + option = { + trigger = { iberia_north_africa_0002_is_in_portugal_trigger = yes } + name = iberia_north_africa.0002.c + + reverse_add_opinion = { + target = scope:portugal_former + modifier = disappointed_opinion + opinion = -15 + } + + ai_chance = { + base = 0 + } + } +} + + +#I have united the Spanish thrones! +iberia_north_africa.0005 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0005.t + desc = iberia_north_africa.0005.desc + theme = realm + left_portrait = { + character = scope:spain_uniter + animation = personality_bold + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + unite_the_spanish_thrones_decision_effects = yes + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + + } + + option = { + name = iberia_north_africa.0005.a + + give_nickname = nick_the_motherfather_of_spain + } +} + +#Someone united the spanish thrones! +iberia_north_africa.0006 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0005.t + desc = { + desc = iberia_north_africa.0006.start.desc + first_valid = { + triggered_desc = { + trigger = { + has_RelationToMe_relation = { CHARACTER = scope:spain_uniter } + } + desc = iberia_north_africa.0006.relation_former.desc + } + desc = iberia_north_africa.0006.former.desc + } + desc = iberia_north_africa.0006.end.desc + } + theme = realm + left_portrait = { + character = scope:spain_uniter + animation = personality_bold + } + + option = { + name = name_i_see + } +} + +#I have united Africa! +iberia_north_africa.0010 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0010.t + desc = { + desc = iberia_north_africa.0010.start.desc + triggered_desc = { + trigger = { + exists = scope:vassal_1 + exists = scope:vassal_2 + } + desc = iberia_north_africa.0010.vassals.desc + } + first_valid = { + triggered_desc = { + trigger = { faith = { religion_tag = west_african_bori_religion } } + desc = iberia_north_africa.0010.spirits.desc + } + triggered_desc = { + trigger = { + faith = { + OR = { + religion_tag = west_african_roog_religion + religion_tag = west_african_religion + } + } + } + desc = iberia_north_africa.0010.ancestors.desc + } + desc = iberia_north_africa.0010.generic.desc + } + } + theme = realm + left_portrait = { + character = scope:africa_uniter + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + unite_africa_decision_effects = yes + legend_seed_great_deed_region_effect = { + REGION = geographical_region:world_africa + } + + #For description + random_vassal = { + limit = { highest_held_title_tier = tier_kingdom } + alternative_limit = { highest_held_title_tier = tier_duchy } + alternative_limit = { highest_held_title_tier = tier_county } + save_scope_as = vassal_1 + } + random_vassal_or_below = { + limit = { + NOR = { + has_culture = scope:vassal_1.culture + highest_held_title_tier = scope:vassal_1.highest_held_title_tier + } + highest_held_title_tier = tier_county + } + alternative_limit = { + NOR = { + has_culture = scope:vassal_1.culture + highest_held_title_tier = scope:vassal_1.highest_held_title_tier + } + highest_held_title_tier = tier_duchy + } + alternative_limit = { + NOR = { + has_culture = scope:vassal_1.culture + highest_held_title_tier = scope:vassal_1.highest_held_title_tier + } + } + save_scope_as = vassal_2 + } + } + + option = { + name = iberia_north_africa.0010.a + + give_nickname = nick_the_unifier_of_africa + } +} + +#Someone united Africa! +iberia_north_africa.0011 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0010.t + desc = { + desc = iberia_north_africa.0011.start.desc + first_valid = { + triggered_desc = { + trigger = { + has_RelationToMe_relation = { CHARACTER = scope:africa_uniter } + } + desc = iberia_north_africa.0011.relation_former.desc + } + desc = iberia_north_africa.0011.former.desc + } + desc = iberia_north_africa.0011.end.desc + } + theme = realm + left_portrait = { + character = scope:africa_uniter + animation = personality_honorable + } + + immediate = { + show_as_tooltip = { + scope:africa_uniter.faith = { + change_fervor = { + value = medium_fervor_gain + desc = fervor_gain_united_africa + } + } + } + } + + option = { + name = { + trigger = { faith = scope:africa_uniter.faith } + text = iberia_north_africa.0002.a1 + } + name = { + trigger = { faith != scope:africa_uniter.faith } + text = name_alas + } + } +} + + +#I have avenged the Battle of Tours +iberia_north_africa.0015 = { #by Mathilda Bjarnehed + type = character_event + title = iberia_north_africa.0015.t + desc = { + desc = iberia_north_africa.0015.part1.desc + desc = iberia_north_africa.0015.part2.desc + } + theme = realm + left_portrait = { + character = scope:avenger + animation = personality_vengeful + } + + immediate = { + play_music_cue = "mx_cue_combat_2" + avenge_the_battle_of_tours_decision_effects = yes + legend_seed_great_deed_faith_effect = { + ANTAGONIST = scope:frankish_christian_faith.religious_head + OLD_FAITH = scope:frankish_christian_faith + } + } + + option = { + name = iberia_north_africa.0015.a + + + } +} + +#Someone avenged the Battle of Tours +iberia_north_africa.0016 = { #by Mathilda Bjarnehed + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { faith = { religion_tag = islam_religion } } + desc = iberia_north_africa.0015.t + } + desc = iberia_north_africa.0016.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { faith = { religion_tag = islam_religion } } + desc = { + desc = iberia_north_africa.0015.part1.desc + first_valid = { + triggered_desc = { + trigger = { + has_RelationToMe_relation = { CHARACTER = scope:avenger } + } + desc = iberia_north_africa.0016.relation_former.desc + } + desc = iberia_north_africa.0016.former.desc + } + desc = iberia_north_africa.0015.islam.desc + } + } + desc = iberia_north_africa.0016.generic.desc + } + } + theme = realm + left_portrait = { + character = scope:avenger + animation = personality_vengeful + } + + immediate = { + play_music_cue = "mx_cue_combat_3" + if = { + limit = { exists = scope:frankish_christian_faith } + show_as_tooltip = { + scope:avenger = { + faith = { + change_fervor = { + value = major_fervor_gain + desc = fervor_gain_avenged_battle_of_tours + } + } + } + scope:frankish_christian_faith = { + change_fervor = { + value = major_fervor_loss + desc = fervor_loss_avenged_battle_of_tours + } + } + } + } + } + + option = { + name = { + trigger = { faith = { religion_tag = islam_religion } } + text = iberia_north_africa.0015.a + } + name = { + trigger = { faith = { religion_tag = christianity_religion } } + text = iberia_north_africa.0016.christianity.a + } + name = { + trigger = { + faith = { + NOR = { + religion_tag = christianity_religion + religion_tag = islam_religion + } + } + } + text = name_alas + } + } +} + +#I formed Canarias! +iberia_north_africa.9101 = { #by James Beaumont + type = character_event + title = iberia_north_africa.9101.t + desc = { + desc = iberia_north_africa.9101.desc.intro + first_valid = { + triggered_desc = { + trigger = { + NOT = { religion = religion:north_african_religion } + } + desc = iberia_north_africa.9101.desc.iberian + } + triggered_desc = { + trigger = { + religion = religion:north_african_religion + } + desc = iberia_north_africa.9101.desc.guanche + } + } + desc = iberia_north_africa.9101.desc.outro + } + theme = realm + left_portrait = { + character = scope:canarias_former + animation = admiration + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + declare_canarias_decision_effects = yes + legend_seed_new_title_effect = yes + } + + option = { + name = iberia_north_africa.9101.a + trigger = { + NOT = { + culture = { has_cultural_pillar = heritage_iberian } + } + } + set_nickname_effect = { NICKNAME = nick_the_great } + } + + option = { + name = iberia_north_africa.9101.b + trigger = { + NAND = { + culture = { has_cultural_pillar = heritage_berber } + religion = religion:north_african_religion + } + } + set_nickname_effect = { NICKNAME = nick_the_great } + title:k_canarias = { + set_de_jure_liege_title = title:e_spain + } + } +} + +################################################## +# Loyalty to St. Peter's Throne +# by Ewan Cowhig Croft +# 0101 - 0110 +################################################## + +# Mozarabic Christianity reaffirms its place amongst the ecumenical churches. +iberia_north_africa.0101 = { + type = character_event + title = iberia_north_africa.0101.t + desc = iberia_north_africa.0101.desc + theme = faith + left_portrait = { + character = scope:religious_leader + animation = personality_zealous + } + right_portrait = { + character = scope:pope + animation = flirtation + } + + immediate = { play_music_cue = "mx_cue_faith_conversion" } + + # One people, one faith: swap Rite for Communal Identity. + option = { + name = iberia_north_africa.0101.a + flavor = iberia_north_africa.0101.a.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_bind_the_faith_to_rome_decision_righteous_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:righteous + } + + stress_impact = { + shy = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_zeal = 0.5 + } + } + } + + # We cannot be afraid to seize power in order to defend our own: swap Rite for Pursuit of Power. + option = { + name = iberia_north_africa.0101.b + flavor = iberia_north_africa.0101.b.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_bind_the_faith_to_rome_decision_fundamentalist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:fundamentalist + } + + stress_impact = { + compassionate = medium_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + # The GetHolyBooks will still need interpretation: swap Rite for Religious Law. + option = { + name = iberia_north_africa.0101.c + flavor = iberia_north_africa.0101.c.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_bind_the_faith_to_rome_decision_pluralist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:pluralist + } + + stress_impact = { + lazy = medium_stress_impact_loss + arbitrary = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.5 + } + } + } + + after = { + # Now take care of notification events for players. + every_player = { + limit = { + this != scope:religious_leader + OR = { + faith = faith:mozarabic_church + any_neighboring_and_across_water_top_liege_realm_owner = { this = root.top_liege } + } + } + trigger_event = iberia_north_africa.0102 + } + # And finally, actually apply the effects. + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:fundamentalist + } + mozarabic_bind_the_faith_to_rome_decision_fundamentalist_path_scripted_effect = yes + } + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:righteous + } + mozarabic_bind_the_faith_to_rome_decision_righteous_path_scripted_effect = yes + } + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:pluralist + } + mozarabic_bind_the_faith_to_rome_decision_pluralist_path_scripted_effect = yes + } + } +} + +# Notification event for relevant players. +iberia_north_africa.0102 = { + type = character_event + title = iberia_north_africa.0102.t + desc = { + desc = iberia_north_africa.0102.desc.intro + # Fundamentalist + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:fundamentalist } + desc = iberia_north_africa.0102.desc.fundamentalist + } + # Righteous + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:righteous } + desc = iberia_north_africa.0102.desc.righteous + } + # Pluralist + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:pluralist } + desc = iberia_north_africa.0102.desc.pluralist + } + } + theme = faith + left_portrait = { + character = scope:religious_leader + animation = personality_zealous + } + right_portrait = { + character = scope:pope + animation = flirtation + } + + immediate = { play_music_cue = "mx_cue_faith_conversion" } + + # Fundamentalist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0102.a.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0102.a.same_religion + } + desc = iberia_north_africa.0102.a.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:fundamentalist } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_bind_the_faith_to_rome_decision_fundamentalist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Righteous path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0102.b.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0102.b.same_religion + } + desc = iberia_north_africa.0102.b.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:righteous } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_bind_the_faith_to_rome_decision_righteous_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Pluralist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0102.c.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0102.c.same_religion + } + desc = iberia_north_africa.0102.c.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:pluralist } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_bind_the_faith_to_rome_decision_pluralist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } +} + +################################################## +# An Iberian Rite +# by Ewan Cowhig Croft +# 0111 - 0120 +################################################## + +# Mozarabic Christianity breaks away from Rome's strictures. +iberia_north_africa.0111 = { + type = character_event + title = iberia_north_africa.0111.t + desc = iberia_north_africa.0111.desc + theme = faith + left_portrait = { + character = scope:religious_leader + animation = personality_vengeful + } + right_portrait = { + character = scope:pope + animation = fear + } + + immediate = { play_music_cue = "mx_cue_faith_conversion" } + + # Jesus taught peace, and we shall follow: swap Rite for Pacifism. + option = { + name = iberia_north_africa.0111.a + flavor = iberia_north_africa.0111.a.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_break_with_rome_decision_righteous_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:righteous + } + + stress_impact = { + shy = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_zeal = 0.5 + } + } + } + + # Even without Rome, we know the value of defending our own: swap Rite for Armed Pilgrimages. + option = { + name = iberia_north_africa.0111.b + flavor = iberia_north_africa.0111.b.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_break_with_rome_decision_fundamentalist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:fundamentalist + } + + stress_impact = { + compassionate = medium_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + # Is Islam not a religion of the Book too?: swap Rite for Islamic Syncretism. + option = { + name = iberia_north_africa.0111.c + flavor = iberia_north_africa.0111.c.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { mozarabic_break_with_rome_decision_pluralist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = mozarabic_choice + value = flag:pluralist + } + + stress_impact = { + lazy = medium_stress_impact_loss + arbitrary = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.5 + } + } + } + + after = { + mozarabic_break_with_rome_decision_hof_and_ecumenism_processing_scripted_effect = yes + # Now take care of notification events for players. + every_player = { + limit = { + this != scope:religious_leader + OR = { + faith = faith:mozarabic_church + any_neighboring_and_across_water_top_liege_realm_owner = { this = root.top_liege } + } + } + trigger_event = iberia_north_africa.0112 + } + # And finally, actually apply the effects. + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:fundamentalist + } + mozarabic_break_with_rome_decision_fundamentalist_path_scripted_effect = yes + } + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:righteous + } + mozarabic_break_with_rome_decision_righteous_path_scripted_effect = yes + } + if = { + limit = { + exists = scope:mozarabic_choice + scope:mozarabic_choice = flag:pluralist + } + mozarabic_break_with_rome_decision_pluralist_path_scripted_effect = yes + } + } +} + +# Notification event for relevant players. +iberia_north_africa.0112 = { + type = character_event + title = iberia_north_africa.0112.t + desc = { + desc = iberia_north_africa.0112.desc.intro + # Fundamentalist + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:fundamentalist } + desc = iberia_north_africa.0112.desc.fundamentalist + } + # Righteous + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:righteous } + desc = iberia_north_africa.0112.desc.righteous + } + # Pluralist + triggered_desc = { + trigger = { scope:mozarabic_choice = flag:pluralist } + desc = iberia_north_africa.0112.desc.pluralist + } + } + theme = faith + left_portrait = { + character = scope:religious_leader + animation = personality_vengeful + } + right_portrait = { + character = scope:pope + animation = fear + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + } + + # Fundamentalist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0112.a.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0112.a.same_religion + } + desc = iberia_north_africa.0112.a.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:fundamentalist } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_break_with_rome_decision_fundamentalist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Righteous path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = faith:mozarabic_church } + desc = iberia_north_africa.0112.b.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0112.b.same_religion + } + desc = iberia_north_africa.0112.b.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:righteous } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_break_with_rome_decision_righteous_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Pluralist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + faith = { + OR = { + this = faith:mozarabic_church + has_doctrine = tenet_islamic_syncretism + } + } + } + desc = iberia_north_africa.0112.c.same_faith + } + triggered_desc = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + desc = iberia_north_africa.0112.c.same_religion + } + triggered_desc = { + trigger = { religion = religion:islam_religion } + desc = iberia_north_africa.0112.c.same_religion + } + desc = iberia_north_africa.0112.c.misc + } + } + } + trigger = { scope:mozarabic_choice = flag:pluralist } + + show_as_tooltip = { + scope:religious_leader = { mozarabic_break_with_rome_decision_pluralist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + after = { + show_as_tooltip = { mozarabic_break_with_rome_decision_hof_and_ecumenism_processing_scripted_effect = yes } + } +} + +################################################## +# A Return to the Countryside +# ^Geddit GEDDIT [not-actually-particularly-clever chortling] +# by Ewan Cowhig Croft +# 0121 - 0130 +################################################## + +# A disillusioned ruler seeks out and sponsors the remnant pagan aspects of the Pyrenees. +iberia_north_africa.0121 = { + type = character_event + title = iberia_north_africa.0121.t + desc = { + desc = iberia_north_africa.0121.desc.intro + # Nab the rationalisation. + desc = { + # We order these according to approximate rarity level/importance. + ## They're kept isolated in a scripted trigger file so that we can maintain easy parity between the decision rationales & the event desc rationales. + first_valid = { + # Excommunicated + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_excommunicated_trigger = yes } + desc = iberia_north_africa.0121.desc.excommunicated + } + # Rivalry with HoF + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_hof_rivalry_trigger = yes } + desc = iberia_north_africa.0121.desc.rivalry_with_hof + } + # Negative Piety Level + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_negative_piety_level_trigger = yes } + desc = iberia_north_africa.0121.desc.negative_piety_level + } + # Easter egg: the Lorgar special + triggered_desc = { + trigger = { has_trait = zealous } + desc = iberia_north_africa.0121.desc.lorgar + } + # Sinful Traits + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_sinful_traits_trigger = yes } + desc = iberia_north_africa.0121.desc.sinful_traits + } + # Virtuous Basque pagan traits + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_virtuous_basque_pagan_traits_trigger = yes } + desc = iberia_north_africa.0121.desc.virtuous_basque_pagan_traits + } + # Naked cynicism; we use this as the fallback. + desc = iberia_north_africa.0121.desc.naked_cynicism + } + } + desc = iberia_north_africa.0121.desc.outro + } + theme = faith + left_portrait = { + character = scope:religious_leader + animation = scheme + } + right_portrait = { + character = scope:scandalised_cleric + animation = stress + } + override_background = { reference = wilderness_mountains } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + } + + # scope:basque_faith shall be a warrior's faith again!: swap Christian Syncretism for Warmonger. + option = { + name = iberia_north_africa.0121.a + flavor = iberia_north_africa.0121.a.tt + # The AI should only really be doing this if they're coming out of the Vikings or otherwise have suitable traits. + trigger = { + OR = { + is_ai = no + scope:old_faith = { has_doctrine_parameter = great_holy_wars_active_if_reformed } + has_trait = wrathful + has_trait = crusader_king + has_trait = faith_warrior + } + } + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { favour_the_countryside_basques_decision_fundamentalist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = basque_choice + value = flag:righteous + } + + stress_impact = { + base = major_stress_impact_gain + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_energy = 0.5 + } + } + } + + # It is more important to live in harmony with nature than with neighbours: swap Christian Syncretism for Sanctity of Nature. + option = { + name = iberia_north_africa.0121.b + flavor = iberia_north_africa.0121.b.tt + # The AI should only be doing this if they're self-assured about what it'll likely do to them, or it's something they're already in to. + trigger = { + OR = { + is_ai = no + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + AND = { + OR = { + has_trait = stubborn + has_trait = patient + has_trait = lifestyle_gardener + } + has_trait = calm + has_trait = brave + } + } + } + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { favour_the_countryside_basques_decision_righteous_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = basque_choice + value = flag:fundamentalist + } + + stress_impact = { + base = major_stress_impact_gain + # I mean, you *know* this one is gonna come back to bite you, hard. + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = -1 + } + } + } + + # There are more worthy religions to share traditions with...: swap Christian Syncretism for Islamic Syncretism. + option = { + name = iberia_north_africa.0121.c + flavor = iberia_north_africa.0121.c.tt + # The AI should only really be doing this if it means they're adopting *less* traditions, not more. + trigger = { + OR = { + is_ai = no + faith = { + has_doctrine_parameter = islamic_syncretic_actor_opinion_active + religion = religion:islam_religion + } + } + } + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { favour_the_countryside_basques_decision_pluralist_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = basque_choice + value = flag:pluralist + } + + # Zealous Muslims & syncretics gain less stress from this. + if = { + limit = { + faith = { + has_doctrine_parameter = islamic_syncretic_actor_opinion_active + religion = religion:islam_religion + } + } + stress_impact = { + base = major_stress_impact_gain + zealous = medium_stress_impact_loss + fickle = minor_stress_impact_gain + drunkard = major_stress_impact_gain + } + } + # But everyone else doesn't. + else = { + stress_impact = { + base = major_stress_impact_gain + fickle = minor_stress_impact_gain + drunkard = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + } + } + } + + # If I try to force change, am I any less corrupt than scope:old_faith?: leave the faith as you found it. + option = { + name = iberia_north_africa.0121.d + flavor = iberia_north_africa.0121.d.tt + + # Apply the effects in the after block to keep future notifications from erroring. + show_as_tooltip = { favour_the_countryside_basques_decision_default_path_scripted_effect = yes } + # Flag our choice. + save_scope_value_as = { + name = basque_choice + value = flag:unchanged + } + + stress_impact = { + lazy = minor_stress_impact_loss + arbitrary = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = -0.5 + } + } + } + + after = { + legend_seed_great_deed_faith_effect = { + OLD_FAITH = scope:old_faith + ANTAGONIST = scope:scandalised_cleric + } + # Now take care of notification events for players. + every_player = { + limit = { + this != scope:religious_leader + OR = { + favour_the_countryside_basques_counts_as_basque_trigger = yes + any_neighboring_and_across_water_top_liege_realm_owner = { this = root.top_liege } + } + } + trigger_event = iberia_north_africa.0122 + } + # And finally, actually apply the effects. + ## Our default stuff. + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + ## Then our changes/lack of changes. + if = { + limit = { + exists = scope:basque_choice + scope:basque_choice = flag:fundamentalist + } + favour_the_countryside_basques_decision_righteous_path_scripted_effect = yes + } + else_if = { + limit = { + exists = scope:basque_choice + scope:basque_choice = flag:righteous + } + favour_the_countryside_basques_decision_fundamentalist_path_scripted_effect = yes + } + else_if = { + limit = { + exists = scope:basque_choice + scope:basque_choice = flag:pluralist + } + favour_the_countryside_basques_decision_pluralist_path_scripted_effect = yes + } + else_if = { + limit = { + exists = scope:basque_choice + scope:basque_choice = flag:unchanged + } + favour_the_countryside_basques_decision_default_path_scripted_effect = yes + } + } +} + +# Notification event for relevant players. +iberia_north_africa.0122 = { + type = character_event + title = iberia_north_africa.0122.t + desc = { + desc = iberia_north_africa.0122.desc.intro + # Nab the rationalisation. + desc = { + # We order these according to approximate rarity level/importance. + ## They're kept isolated in a scripted trigger file so that we can maintain easy parity between the decision rationales & the event desc rationales. + first_valid = { + # Excommunicated + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_excommunicated_trigger = yes } + desc = iberia_north_africa.0122.desc.excommunicated + } + # Rivalry with HoF + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_hof_rivalry_trigger = yes } + desc = iberia_north_africa.0122.desc.rivalry_with_hof + } + # Negative Piety Level + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_negative_piety_level_trigger = yes } + desc = iberia_north_africa.0122.desc.negative_piety_level + } + # Easter egg: the Lorgar special + triggered_desc = { + trigger = { has_trait = zealous } + desc = iberia_north_africa.0122.desc.lorgar + } + # Sinful Traits + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_sinful_traits_trigger = yes } + desc = iberia_north_africa.0122.desc.sinful_traits + } + # Virtuous Basque pagan traits + triggered_desc = { + trigger = { favour_the_countryside_basques_rationale_virtuous_basque_pagan_traits_trigger = yes } + desc = iberia_north_africa.0122.desc.virtuous_basque_pagan_traits + } + # Naked cynicism; we use this as the fallback. + desc = iberia_north_africa.0122.desc.naked_cynicism + } + } + desc = iberia_north_africa.0122.desc.midtro + # What direction is the faith going? + first_valid = { + # Fundamentalist + triggered_desc = { + trigger = { scope:basque_choice = flag:fundamentalist } + desc = iberia_north_africa.0122.desc.fundamentalist + } + # Righteous + triggered_desc = { + trigger = { scope:basque_choice = flag:righteous } + desc = iberia_north_africa.0122.desc.righteous + } + # Pluralist + triggered_desc = { + trigger = { scope:basque_choice = flag:pluralist } + desc = iberia_north_africa.0122.desc.pluralist + } + # Unchanged + triggered_desc = { + trigger = { scope:basque_choice = flag:unchanged } + desc = iberia_north_africa.0122.desc.unchanged + } + } + } + theme = faith + left_portrait = { + character = scope:religious_leader + animation = scheme + } + right_portrait = { + character = scope:scandalised_cleric + animation = stress + } + override_background = { reference = wilderness_mountains } + + immediate = { play_music_cue = "mx_cue_faith_conversion" } + + # Culturally Basque or Basque-adjacent player; join in? + option = { + name = iberia_north_africa.0122.a + trigger = { + is_ai = no + favour_the_countryside_basques_counts_as_basque_trigger = yes + } + + set_character_faith_with_conversion = scope:religious_leader.faith + show_as_tooltip = { + scope:religious_leader = { + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + favour_the_countryside_basques_decision_righteous_path_scripted_effect = yes + } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 0 + } + } + + # Fundamentalist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = scope:old_faith } + desc = iberia_north_africa.0122.b.same_faith + } + triggered_desc = { + trigger = { religion = scope:old_faith.religion } + desc = iberia_north_africa.0122.b.same_religion + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = great_holy_wars_active_if_reformed } + } + desc = iberia_north_africa.0122.b.respects_fellow_warmongers + } + desc = iberia_north_africa.0122.b.misc + } + } + } + trigger = { scope:basque_choice = flag:fundamentalist } + + show_as_tooltip = { + scope:religious_leader = { + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + favour_the_countryside_basques_decision_righteous_path_scripted_effect = yes + } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Righteous path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = scope:old_faith } + desc = iberia_north_africa.0122.c.same_faith + } + triggered_desc = { + trigger = { religion = scope:old_faith.religion } + desc = iberia_north_africa.0122.c.same_religion + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + desc = iberia_north_africa.0122.c.believes_in_harmony_with_nature + } + desc = iberia_north_africa.0122.c.misc + } + } + } + trigger = { scope:basque_choice = flag:righteous } + + show_as_tooltip = { + scope:religious_leader = { + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + favour_the_countryside_basques_decision_fundamentalist_path_scripted_effect = yes + } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Pluralist path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith.religion = religion:islam_religion } + desc = iberia_north_africa.0122.d.muslim + } + triggered_desc = { + trigger = { faith = scope:old_faith } + desc = iberia_north_africa.0122.d.same_faith + } + triggered_desc = { + trigger = { religion = scope:old_faith.religion } + desc = iberia_north_africa.0122.d.same_religion + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + } + desc = iberia_north_africa.0122.d.syncretised_with_islam + } + desc = iberia_north_africa.0122.d.misc + } + } + } + trigger = { scope:basque_choice = flag:pluralist } + + show_as_tooltip = { + scope:religious_leader = { + favour_the_countryside_basques_decision_generic_effects_scripted_effect = yes + favour_the_countryside_basques_decision_pluralist_path_scripted_effect = yes + } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } + + # Unchanged path. + option = { + # We're using a broken-out block because the auto-magical first_valid name stuff was borking. + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { faith = scope:old_faith } + desc = iberia_north_africa.0122.e.same_faith + } + triggered_desc = { + trigger = { religion = scope:old_faith.religion } + desc = iberia_north_africa.0122.e.same_religion + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + } + desc = iberia_north_africa.0122.e.syncretised_with_christianity + } + desc = iberia_north_africa.0122.e.misc + } + } + } + trigger = { scope:basque_choice = flag:unchanged } + + show_as_tooltip = { + scope:religious_leader = { favour_the_countryside_basques_decision_pluralist_path_scripted_effect = yes } + } + + # No stress impact for a notification event. + ai_chance = { + # AI chance isn't relevant for a notification event. + base = 100 + } + } +} + +################################################## +# A Kingdom around the Aragon +# by Ewan Cowhig Croft +# 0131 - 0140 +################################################## + +scripted_trigger convert_random_aragonese_counties_in_d_aragon_basic_reqs_trigger = { + tier = tier_county + NOT = { culture = culture:aragonese } +} + +scripted_effect copy_over_new_cultural_pillars_to_aragonese_effect = { + culture:aragonese = { + # Language. + if = { + limit = { + NOT = { has_same_culture_language = scope:founder_culture } + } + set_language_from = scope:founder_culture + } + # Martial Tradition. + if = { + limit = { + NOT = { has_same_culture_martial_tradition = scope:founder_culture } + } + set_martial_custom_from = scope:founder_culture + } + # We don't do heritage because we don't want to shift Aragonese out of the Iberian block. + } +} + +scripted_effect calculate_controlled_aragonese_duchies_effect = { + random_list = { + 100 = { + trigger = { + completely_controls = title:d_valencia + trigger_if = { + limit = { exists = scope:duchy_a } + NOT = { scope:duchy_a = title:d_valencia } + } + trigger_if = { + limit = { exists = scope:duchy_b } + NOT = { scope:duchy_a = title:d_valencia } + } + trigger_if = { + limit = { exists = scope:duchy_c } + NOT = { scope:duchy_a = title:d_valencia } + } + } + title:d_valencia = { + if = { + limit = { + NOT = { exists = scope:duchy_a } + } + save_scope_as = duchy_a + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + exists = scope:duchy_b + } + } + save_scope_as = duchy_b + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + this = scope:duchy_b + exists = scope:duchy_c + } + } + save_scope_as = duchy_c + } + } + } + 100 = { + trigger = { + completely_controls = title:d_barcelona + trigger_if = { + limit = { exists = scope:duchy_a } + NOT = { scope:duchy_a = title:d_barcelona } + } + trigger_if = { + limit = { exists = scope:duchy_b } + NOT = { scope:duchy_a = title:d_barcelona } + } + trigger_if = { + limit = { exists = scope:duchy_c } + NOT = { scope:duchy_a = title:d_barcelona } + } + } + title:d_barcelona = { + if = { + limit = { + NOT = { exists = scope:duchy_a } + } + save_scope_as = duchy_a + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + exists = scope:duchy_b + } + } + save_scope_as = duchy_b + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + this = scope:duchy_b + exists = scope:duchy_c + } + } + save_scope_as = duchy_c + } + } + } + 100 = { + trigger = { + completely_controls = title:d_navarra + trigger_if = { + limit = { exists = scope:duchy_a } + NOT = { scope:duchy_a = title:d_navarra } + } + trigger_if = { + limit = { exists = scope:duchy_b } + NOT = { scope:duchy_a = title:d_navarra } + } + trigger_if = { + limit = { exists = scope:duchy_c } + NOT = { scope:duchy_a = title:d_navarra } + } + } + title:d_navarra = { + if = { + limit = { + NOT = { exists = scope:duchy_a } + } + save_scope_as = duchy_a + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + exists = scope:duchy_b + } + } + save_scope_as = duchy_b + } + else_if = { + limit = { + NOT = { + this = scope:duchy_a + this = scope:duchy_b + exists = scope:duchy_c + } + } + save_scope_as = duchy_c + } + } + } + } +} + +scripted_effect convert_aragonese_counties_to_aragonese_effect = { + # Several counties within d_aragon will convert. + while = { + custom = form_the_kingdom_of_aragon_decision.tt.x_random_counties_in_d_aragon + count = 3 + title:d_aragon = { + random_in_de_jure_hierarchy = { + # If scope:founder has their capital in the area, make sure we grab it first. + limit = { + convert_random_aragonese_counties_in_d_aragon_basic_reqs_trigger = yes + this = scope:founder.capital_county + } + # Otherwise, go for c_alto_aragon, but we want it to *look* random. + alternative_limit = { + convert_random_aragonese_counties_in_d_aragon_basic_reqs_trigger = yes + this = title:c_alto_aragon + this != scope:founder.capital_county + } + # Then we grab any local county held by scope:founder. + alternative_limit = { + convert_random_aragonese_counties_in_d_aragon_basic_reqs_trigger = yes + holder = scope:founder + any_neighboring_county = { culture = culture:aragonese } + } + set_county_culture = culture:aragonese + } + } + } +} + +# Aragon, and the Aragonese, has/have emerged. +iberia_north_africa.0131 = { + type = character_event + title = iberia_north_africa.0131.t + desc = { + desc = iberia_north_africa.0131.desc.intro + first_valid = { + # Only has the minimum one duchy. + triggered_desc = { + trigger = { + NOT = { exists = scope:duchy_b } + } + desc = iberia_north_africa.0131.desc.duchy.one + } + # Has an extra duchy. + triggered_desc = { + trigger = { + NOT = { exists = scope:duchy_c } + } + desc = iberia_north_africa.0131.desc.duchy.two + } + # Has all three duchies! + desc = iberia_north_africa.0131.desc.duchy.three + } + desc = iberia_north_africa.0131.desc.outro + } + theme = crown + left_portrait = { + character = scope:founder + animation = personality_bold + } + override_background = { reference = farmland } + + trigger = { + # Account for ruler designer'd Aragonese cultures. + NOT = { culture = culture:aragonese } + } + + on_trigger_fail = { + # If you ruler designer'd in an Aragonese character, everything in this event is irrelevant to ye appart from the culture converting, so we just do that silently. + convert_aragonese_counties_to_aragonese_effect = yes + } + + immediate = { + play_music_cue = "mx_cue_succession_instrumental" + # Calculate scopes for the desc loc. + calculate_controlled_aragonese_duchies_effect = yes + calculate_controlled_aragonese_duchies_effect = yes + calculate_controlled_aragonese_duchies_effect = yes + # Flip scope:founder's culture. + set_culture = culture:aragonese + # Change the culture a bit. + culture:aragonese = { + # Innovations are transferred over. + get_all_innovations_from = scope:founder_culture + # And the creation of the culture is adjusted. + reset_culture_creation_date = yes + } + # Several counties within d_aragon will convert. + convert_aragonese_counties_to_aragonese_effect = yes + legend_seed_new_title_effect = yes + } + + # Vanilla: just the regular Aragonese culture, please. + option = { + name = iberia_north_africa.0131.a + + # No other effects. + + # No stress impact, since it's too tricksy to figure out which traits should get stress from absorbing what foreign cultural pillars. + ai_chance = { + # The AI should basically always opt for vanilla. + base = 100 + } + } + + # Take Pillars: not all the trappings of scope:founder_culture are so bad... + option = { + name = iberia_north_africa.0131.b + trigger = { + culture:aragonese = { + OR = { + NOT = { has_same_culture_language = scope:founder_culture } + NOT = { has_same_culture_martial_tradition = scope:founder_culture } + } + } + } + + # Copy over the salient pillars. + copy_over_new_cultural_pillars_to_aragonese_effect = yes + + # No stress impact, since it's too tricksy to figure out which traits should get stress from absorbing what foreign cultural pillars. + ai_chance = { + # The AI should basically always opt for vanilla. + base = 0 + } + } + + # Take Ethos: what's important to us hasn't changed. + option = { + name = iberia_north_africa.0131.c + trigger = { + culture:aragonese = { + NOT = { has_same_culture_ethos = scope:founder_culture } + } + } + + # Copy over the ethos. + culture:aragonese = { set_ethos_from = scope:founder_culture } + + # No stress impact, since it's too tricksy to figure out which traits should get stress from absorbing what foreign cultural pillars. + ai_chance = { + # The AI should basically always opt for vanilla. + base = 0 + } + } + + # Take Both: we cannot forget our roots! + option = { + name = iberia_north_africa.0131.d + trigger = { + culture:aragonese = { + NOT = { has_same_culture_ethos = scope:founder_culture } + OR = { + NOT = { has_same_culture_language = scope:founder_culture } + NOT = { has_same_culture_martial_tradition = scope:founder_culture } + } + } + } + + # Copy over the ethos. + culture:aragonese = { set_ethos_from = scope:founder_culture } + # Copy over the salient pillars. + copy_over_new_cultural_pillars_to_aragonese_effect = yes + + # No stress impact, since it's too tricksy to figure out which traits should get stress from absorbing what foreign cultural pillars. + ai_chance = { + # The AI should basically always opt for vanilla. + base = 0 + # ... *basically* always. + modifier = { + add = 100 + has_trait = stubborn + } + } + } +} + +# No notification event for this'un, as it's a small decision. + +# Secure the Mediterranean notif +iberia_north_africa.2105 = { + type = character_event + title = iberia_north_africa.2105.t + desc = iberia_north_africa.2105.desc + theme = crown + override_background = { reference = throne_room_mediterranean } + left_portrait = root + + immediate = { + show_as_tooltip = { + house = { + add_house_modifier = { + modifier = fp2_controls_the_mediterranean_house_modifier + years = 100 + } + } + dynasty = { add_dynasty_prestige = major_prestige_gain } + } + } + + option = { + name = iberia_north_africa.2105.a + custom_tooltip = secure_mediterranean_decision.a + } +} + +######################################################## +# golden_age_jewish_science_in_iberia_decision events +# By Hugo Cortell +# +# Note: These events are all additional +# rewards for sponsoring a golden age, +# therefore they are not much of a challenge. +# Just some cool free stuff for players! +######################################################## +iberia_north_africa.2001 = { # Jewish translator of old books (reward: skill boost) + type = character_event + title = iberia_north_africa.2001.t + desc = iberia_north_africa.2001.desc + + theme = learning + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:generated_actor + animation = admiration + } + + immediate = { + create_character = { + age = { 24 51 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = faith:rabbinism + random_traits = yes + trait = education_learning_2 + learning = { 6 12 } + + dynasty = none + after_creation = { + add_prestige = { minor_prestige_gain major_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + } + + save_scope_as = generated_actor + } + + get_lowest_player_skill_effect = yes + } + + option = { # Request a book that will make up for your weaknesses - for a price + flavor = iberia_north_africa.2001.a.a + name = { + text = { + desc = iberia_north_africa.2001.a + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:lowest_player_skill = flag:martial } + desc = iberia_north_africa.2001.a.martial + } + triggered_desc = { + trigger = { scope:lowest_player_skill = flag:learning } + desc = iberia_north_africa.2001.a.learning + } + triggered_desc = { + trigger = { scope:lowest_player_skill = flag:stewardship } + desc = iberia_north_africa.2001.a.stewardship + } + desc = iberia_north_africa.2001.a.diplointrigue + } + } + desc = iberia_north_africa.2001.a.end + } + } + + send_interface_message = { + type = event_learning_good + title = iberia_north_africa.2001.t + right_icon = scope:generated_actor + + pay_short_term_gold = { + target = scope:generated_actor + gold = medium_gold_value + } + if = { + limit = { scope:lowest_player_skill = flag:diplomacy } + add_character_modifier = { + modifier = fp2_translated_skill_book_diplomacy_modifier + years = 20 + } + } + else_if = { + limit = { scope:lowest_player_skill = flag:martial } + add_character_modifier = { + modifier = fp2_translated_skill_book_martial_modifier + years = 20 + } + } + else_if = { + limit = { scope:lowest_player_skill = flag:stewardship } + add_character_modifier = { + modifier = fp2_translated_skill_book_stewardship_modifier + years = 20 + } + } + else_if = { + limit = { scope:lowest_player_skill = flag:intrigue } + add_character_modifier = { + modifier = fp2_translated_skill_book_intrigue_modifier + years = 20 + } + } + else = { + add_character_modifier = { + modifier = fp2_translated_skill_book_learning_modifier + years = 20 + } + } + } + + ai_chance = { + base = 20 + modifier = { + add = -50 + short_term_gold < medium_gold_value + } + } + } + + option = { # Sure give me anything (no control over outcome, but always positive - and at a lower cost) + name = iberia_north_africa.2001.b + + show_as_tooltip = { + pay_short_term_gold = { + target = scope:generated_actor + gold = minor_gold_value + } + custom_tooltip = iberia_north_africa.2001.b.a + } + hidden_effect = { + send_interface_message = { + type = event_learning_good + title = iberia_north_africa.2001.t + right_icon = scope:generated_actor + + pay_short_term_gold = { + target = scope:generated_actor + gold = minor_gold_value + } + random_list = { + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_diplomacy_modifier + years = 20 + } + } + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_martial_modifier + years = 20 + } + } + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_stewardship_modifier + years = 20 + } + } + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_intrigue_modifier + years = 20 + } + } + 1 = { + add_character_modifier = { + modifier = fp2_translated_skill_book_learning_modifier + years = 20 + } + } + } + } + } + + ai_chance = { + base = 80 + modifier = { + add = -50 + short_term_gold < minor_gold_value + } + } + } + + option = { # History is dumb + name = iberia_north_africa.2001.c + + send_interface_message = { + type = event_learning_good + title = fp2_rejection_of_old_thoughts_modifier + right_icon = root + + capital_county = { + add_county_modifier = { + modifier = fp2_rejection_of_old_thoughts_modifier + years = 5 + } + } + } + + ai_chance = { base = 35 } + } + + after = { scope:generated_actor = { silent_disappearance_effect = yes } } +} + +iberia_north_africa.2002 = { # Cataract surgery event (reward: free doctor) + type = character_event + title = iberia_north_africa.2002.t + desc = iberia_north_africa.2002.desc + + theme = learning + override_background = { reference = throne_room } + left_portrait = { + character = scope:patientzero + animation = beg + } + lower_left_portrait = root + right_portrait = { + character = scope:generated_actor + animation = disapproval + } + + trigger = { + any_vassal_or_below = { + age > 48 # Cataracts begin to develop at 40 years of age and usually finish by 60, therefore 50 seems like a decent value for a medieval high-society member + NOT = { has_trait = blind } + } + } + + immediate = { + create_character = { + age = { 21 44 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = faith:rabbinism + random_traits = yes + trait = scholar + trait = lifestyle_physician + learning = { 8 12 } + + dynasty = none + after_creation = { + add_gold = minor_gold_value + add_prestige = { medium_prestige_gain major_prestige_gain } + add_piety = minor_piety_gain + add_trait_xp = { + trait = lifestyle_physician + value = 100 + } + } + + save_scope_as = generated_actor + } + + random_vassal_or_below = { + limit = { + age > 48 + NOT = { has_trait = blind } + } + save_scope_as = patientzero + } + + if = { + limit = { + any_child = { + is_child_of = root + age < 15 + } + } + random_child = { + limit = { + is_child_of = root + age < 15 + } + save_scope_as = child_offering + } + } + } + + option = { # Offer your child as an assistant, ~50% chance of learning medicine, 10% chance of dying. (good odds by lunatic trait option standards) + name = iberia_north_africa.2002.a + flavor = iberia_north_africa.2002.a.flavor + + trigger = { + is_ai = no + exists = scope:child_offering + OR = { + has_trait = lunatic_1 + has_trait = lunatic_genetic + has_trait = lifestyle_physician + has_trait = torturer + } + } + + random_list = { + 50 = { + modifier = { + add = scope:child_offering.learning + always = yes + } + send_interface_message = { + type = event_court_physician_good + title = iberia_north_africa.2002.a.b + left_icon = scope:patientzero + right_icon = scope:generated_actor + + random_list = { + desc = iberia_north_africa.2002.a.a + 45 = {} # Assistant helps, but fails to learn anything + 45 = { + modifier = { + add = { + value = scope:child_offering.learning + divide = 1.25 + round = yes + } + always = yes + } + scope:child_offering = { + if = { # For really, really odd cases + limit = { has_trait = lifestyle_physician } + add_learning_lifestyle_xp = medium_lifestyle_experience + add_trait_xp = { + trait = lifestyle_physician + value = 5 + } + } + add_trait = lifestyle_physician + } + } + 10 = { + scope:child_offering = { + death = { death_reason = death_training_accident } + } + } + } + scope:patientzero = { + add_character_modifier = { + modifier = fp2_removed_cataracts_modifier + years = 30 + } + } + add_courtier = scope:generated_actor + add_prestige = medium_prestige_gain + } + } + 50 = { + send_interface_message = { + type = event_court_physician_bad + title = iberia_north_africa.2002.a.b + left_icon = scope:child_offering + right_icon = scope:patientzero + + random_list = { + desc = iberia_north_africa.2002.a.a + 45 = {} # Assistant helps, but fails to learn anything + 45 = { + scope:child_offering = { + add_trait = lifestyle_physician + } + } + 10 = { + scope:child_offering = { + death = { death_reason = death_training_accident } + } + } + } + scope:patientzero = { add_trait = blind } + } + } + } + } + + option = { # "Did you just "well actually" the entire field of astrology?" option, removes the risk of the doctor running away if the operation is botched + name = iberia_north_africa.2002.d + + trigger = { + OR = { + has_trait = theologian + has_trait = scholar + } + } + + random_list = { + 50 = { + send_interface_message = { + type = event_court_physician_good + title = iberia_north_africa.2002.a.b + left_icon = scope:patientzero + right_icon = scope:generated_actor + + scope:patientzero = { + add_character_modifier = { + modifier = fp2_removed_cataracts_modifier + years = 30 + } + } + add_courtier = scope:generated_actor + add_prestige = medium_prestige_gain + } + } + 50 = { + send_interface_message = { + type = event_court_physician_bad + title = iberia_north_africa.2002.a.b + left_icon = scope:patientzero + right_icon = scope:generated_actor + + scope:patientzero = { add_trait = blind } + add_courtier = scope:generated_actor + add_prestige = minor_prestige_loss + + hidden_effect = { + scope:patientzero = { + set_relation_rival = { + target = scope:generated_actor + reason = rival_failed_cataract_surgery + } + } + } # Reasonably upset + } + } + } + } + + option = { # Take the risk, gamble away the doctor for some renown + name = iberia_north_africa.2002.b + + random_list = { + 50 = { + send_interface_message = { + type = event_court_physician_good + title = iberia_north_africa.2002.a.b + left_icon = scope:patientzero + right_icon = scope:generated_actor + + scope:patientzero = { + add_character_modifier = { + modifier = fp2_removed_cataracts_modifier + years = 30 + } + } + add_courtier = scope:generated_actor + add_prestige = medium_prestige_gain + } + } + 50 = { + send_interface_message = { + type = event_court_physician_bad + title = iberia_north_africa.2002.a.b + right_icon = scope:patientzero + + scope:patientzero = { add_trait = blind } + } + } + } + + ai_chance = { + base = 50 + } + } + + option = { # Safe choice, ask the doctor to say (get free doctor) + name = iberia_north_africa.2002.c + + send_interface_message = { + type = send_interface_message + title = court_physician_court_position + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + add_prestige = medium_prestige_loss + scope:patientzero = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -25 + } + } + } + + ai_chance = { + base = 50 + } + } + + after = { + if = { + limit = { NOT = { scope:generated_actor = { is_courtier_of = root } } } + scope:generated_actor = { silent_disappearance_effect = yes } + } + } +} + +iberia_north_africa.2003 = { # Two scholars are fighting over misc stuff (reward: one scholar or two grumpy scholars) + type = character_event + title = iberia_north_africa.2003.t + desc = iberia_north_africa.2003.desc + + theme = learning + override_background = { reference = throne_room } + left_portrait = { + character = scope:generated_actor_r + animation = disapproval + } + right_portrait = { + character = scope:generated_actor_k + animation = dismissal + } + lower_center_portrait = root + + immediate = { + create_character = { + age = { 26 51 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = faith:rabbinism + random_traits = yes + trait = scholar + trait = diplomatic_court_1 + learning = { 8 14 } + + dynasty = none + after_creation = { + add_prestige = { minor_prestige_gain major_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + } + + save_scope_as = generated_actor_r + } + + create_character = { + age = { 23 43 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = faith:karaism + random_traits = yes + trait = theologian + trait = scholarly_court_1 + learning = { 8 14 } + + dynasty = none + after_creation = { + add_prestige = { minor_prestige_gain major_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + } + + save_scope_as = generated_actor_k + } + + hidden_effect = { # Let the drama begin + add_courtier = scope:generated_actor_r + add_courtier = scope:generated_actor_k + scope:generated_actor_r = { + add_opinion = { + target = scope:generated_actor_k + modifier = angry_opinion + opinion = -80 + } + } + scope:generated_actor_k = { + add_opinion = { + target = scope:generated_actor_r + modifier = angry_opinion + opinion = -80 + } + } + } + + # Loc + capital_county = { save_scope_as = playerprovince } + } + + option = { + name = iberia_north_africa.2003.a + flavor = iberia_north_africa.2003.a.flavor + + trigger = { # NOTE: You can type bypass_requirements to bypass requirements on options, very useful! + is_ai = no + OR = { + has_trait = bastard_founder + has_trait = saoshyant + has_trait = sayyid + has_trait = savior + has_trait = augustus + has_trait = chakravarti + has_trait = heresiarch + has_trait = crusader_king + has_trait = order_member + has_trait = faith_warrior + has_trait = saint + has_trait = irritable + has_trait = bossy + has_trait = august + } + } + + send_interface_message = { + type = event_learning_good + title = yearly.0001.learning + right_icon = scope:generated_actor_r + left_icon = scope:generated_actor_k + + show_as_tooltip = { + add_courtier = scope:generated_actor_r + add_courtier = scope:generated_actor_k + } + scope:generated_actor_r = { + add_opinion = { + target = root + modifier = feast_sided_against_me_in_my_fight_opinion + opinion = -60 + } + } + scope:generated_actor_k = { + add_opinion = { + target = root + modifier = feast_sided_against_me_in_my_fight_opinion + opinion = -60 + } + } + } + } + + # NOTE: Neither faith is more progressive than the other, therefore this is just the personal opinion of the characters rather than a greater religious feud + option = { # Side with philosophers + name = iberia_north_africa.2003.b + + send_interface_message = { + type = event_learning_good + title = yearly.0001.learning + right_icon = scope:generated_actor_k + + show_as_tooltip = { add_courtier = scope:generated_actor_k } + remove_courtier_or_guest = scope:generated_actor_r + scope:generated_actor_k = { + add_opinion = { + target = root + modifier = feast_sided_with_me_in_my_fight_opinion + opinion = 25 + } + } + } + + ai_chance = { base = 50 } + } + + option = { # Side with prophets + name = iberia_north_africa.2003.c + + send_interface_message = { + type = event_learning_good + title = yearly.0001.learning + right_icon = scope:generated_actor_r + + show_as_tooltip = { add_courtier = scope:generated_actor_r } + remove_courtier_or_guest = scope:generated_actor_k + scope:generated_actor_r = { + add_opinion = { + target = root + modifier = feast_sided_with_me_in_my_fight_opinion + opinion = 25 + } + } + } + + ai_chance = { base = 50 } + } +} + +######################################################## +# build_holy_pilgrim_roads_decision events +# By Hugo Cortell +######################################################## +iberia_north_africa.2011 = { # Holy Warrior + type = character_event + title = iberia_north_africa.2011.t + desc = { + desc = iberia_north_africa.2011.desc + first_valid = { + triggered_desc = { + trigger = { scope:generated_actor = { has_trait = order_member } } + desc = iberia_north_africa.2011.desc_captain + } + desc = iberia_north_africa.2011.desc_soldier + } + } + + theme = faith + override_background = { reference = terrain } + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:generated_actor + animation = personality_zealous + } + + trigger = { scope:chosen_location_for_pilgrim_roads.holder.top_liege = root } + + immediate = { + scope:chosen_location_for_pilgrim_roads = { random_county_province = { save_scope_as = pilgrim_spawn_location } } + random_list = { + 70 = { # A missguided holy warrior + create_character = { + age = { 19 34 } + location = scope:pilgrim_spawn_location + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = holy_warrior + trait = pilgrim + martial = { 7 12 } + + dynasty = none + after_creation = { + add_gold = minor_gold_value + add_prestige = minor_prestige_gain + add_piety = { minor_piety_gain medium_piety_gain } + if = { + limit = { has_trait = cynical } + remove_trait = cynical + add_trait = zealous + } + random_list = { # Simple backstory + 1 = { add_trait = murderer } + 2 = { add_trait = wounded_1 } + 2 = { add_trait = wounded_2 } + 5 = { add_trait = adventurer } + 1 = { add_trait = lifestyle_hunter } + } + } + + save_scope_as = generated_actor + } + } + 30 = { # Missguided former holy order captain + create_character = { + age = { 27 46 } + location = scope:pilgrim_spawn_location + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = warlike_court_2 + trait = holy_warrior + trait = order_member + trait = devoted + trait = pilgrim + trait = brave + martial = { 10 20 } + + dynasty = none + after_creation = { + add_gold = medium_gold_value + add_prestige = { minor_prestige_gain medium_prestige_gain } + add_piety = { + value = major_piety_gain + multiply = { 1 5 } + round = yes + } + if = { + limit = { has_trait = cynical } + remove_trait = cynical + add_trait = zealous + } + random_list = { # Spicy backstory (why would someone in such a cushy position wander off?) + 10 = { add_trait = murderer } + 5 = { add_trait = kinslayer_1 } + 5 = { + if = { + limit = { faith = { has_doctrine = tenet_communion } } + add_trait = excommunicated + random_list = { + 70 = { add_trait = depressed_1 } # This is the worst thing that can happen to a holy warrior after all + 30 = {} + } + } + else = { add_trait = wounded_2 } + } + 6 = { add_trait = adulterer } + 4 = { add_trait = fornicator } + 5 = { add_trait = drunkard } + } + } + + save_scope_as = generated_actor + } + } + } + } + + option = { # Join me (free warrior) + name = iberia_north_africa.2011.a + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2011.t + left_icon = ROOT + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + } + ai_chance = { base = 25 } + } + + option = { # Spread the word of me (gain modifier) + name = iberia_north_africa.2011.b + flavor = iberia_north_africa.2011.b.flavor + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2011.t + left_icon = ROOT + + add_character_modifier = { + modifier = fp2_trusted_by_pilgrim_warriors_modifier + years = 20 + } + } + + ai_chance = { base = 25 } + scope:generated_actor = { silent_disappearance_effect = yes } + } + + option = { # Finish your duty to the lord (gain piety) + name = iberia_north_africa.2011.c + flavor = iberia_north_africa.2011.c.flavor + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2011.t + left_icon = ROOT + + add_piety = major_piety_gain + } + + ai_chance = { base = 50 } + scope:generated_actor = { silent_disappearance_effect = yes } + } +} + +iberia_north_africa.2012 = { # Broke student (theology or architecture) + type = character_event + title = iberia_north_africa.2012.t + desc = { + desc = iberia_north_africa.2012.desc + first_valid = { + triggered_desc = { + trigger = { scope:generated_actor = { has_trait = theologian } } + desc = iberia_north_africa.2012.desc_student + } + desc = iberia_north_africa.2012.desc_architect + } + } + + theme = faith + override_background = { reference = terrain } + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:generated_actor + animation = admiration + } + + trigger = { scope:chosen_location_for_pilgrim_roads.holder.top_liege = root } + + immediate = { + scope:chosen_location_for_pilgrim_roads = { random_county_province = { save_scope_as = pilgrim_spawn_location } } + random_list = { + 50 = { # Scholar + create_character = { + age = { 18 22 } + location = scope:pilgrim_spawn_location + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = theologian + trait = improvident + trait = scholarly_court_1 + trait = pilgrim + learning = { 9 12 } + + dynasty = none + after_creation = { + add_gold = { 0 28 } + remove_short_term_gold = 20 # You cannot add a negative number for gold, therefore we do this + add_prestige = minor_prestige_gain + add_piety = { minor_piety_gain medium_piety_gain } + if = { + limit = { has_trait = cynical } + remove_trait = cynical + add_trait = zealous + } + } + + save_scope_as = generated_actor + } + } + 50 = { # Architect + create_character = { + age = { 18 22 } + location = scope:pilgrim_spawn_location + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = architect + trait = contrite + trait = administrative_court_1 + trait = pilgrim + learning = { 8 13 } + + dynasty = none + after_creation = { + add_gold = { 0 22 } + remove_short_term_gold = 10 + add_prestige = minor_prestige_gain + add_piety = minor_piety_gain + if = { + limit = { has_trait = cynical } + remove_trait = cynical + add_trait = zealous + } + } + + save_scope_as = generated_actor + } + } + } + } + + option = { # Buy journal + name = iberia_north_africa.2012.a + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2012.t + left_icon = ROOT + + add_learning_lifestyle_xp = major_lifestyle_experience + remove_short_term_gold = minor_gold_value + } + + ai_chance = { base = 35 } + scope:generated_actor = { silent_disappearance_effect = yes } + } + + option = { # Perhaps instead you should get a job + name = iberia_north_africa.2012.b + flavor = iberia_north_africa.2012.b.flavor # (okay, where? / at the [chosen_holy_site_for_pilgrim_roads.GetNameNoTier] / I have some good news for both of you) + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2012.t + left_icon = ROOT + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + add_hook_if_possible_effect = { + TARGET = scope:generated_actor + TYPE = indebted_hook + YEARS = 12 + } + } + + ai_chance = { base = 35 } + } + + option = { # Charity action + name = iberia_north_africa.2012.c + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2012.t + left_icon = ROOT + + add_piety = major_piety_gain + remove_short_term_gold = minor_gold_value + } + + ai_chance = { base = 35 } + scope:generated_actor = { silent_disappearance_effect = yes } + } +} + +iberia_north_africa.2013 = { # Warmup check to ensure you meet the conditions for 2014, otherwise do something else + hidden = yes + + trigger = { scope:chosen_location_for_pilgrim_roads.holder.top_liege = root } + immediate = { + if = { + limit = { + faith = { + exists = religious_head + religious_head != root + } + } + faith.religious_head = { save_scope_as = fp2_iberia_north_africa_2013_head_of_faith } + trigger_event = iberia_north_africa.2014 + } + else = { + random_list = { + 15 = { trigger_event = iberia_north_africa.2011 } + 15 = { trigger_event = iberia_north_africa.2012 } + # 30 = Removed third outcome + } + } + } +} + +iberia_north_africa.2014 = { # Getting a high five (and a gift) from your HOF + type = letter_event + sender = scope:fp2_iberia_north_africa_2013_head_of_faith + opening = iberia_north_africa.2013.t + desc = iberia_north_africa.2013.desc + + immediate = { + + } + + option = { # Butter your HOF up with complements + name = iberia_north_africa.2013.a + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2013.notif.t + right_icon = scope:fp2_iberia_north_africa_2013_head_of_faith + + scope:fp2_iberia_north_africa_2013_head_of_faith = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 40 + } + } + } + + ai_chance = { base = 10 } + } + + option = { # Give me the piety!! + name = iberia_north_africa.2013.b + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2013.notif.t + right_icon = scope:fp2_iberia_north_africa_2013_head_of_faith + + add_piety = major_piety_gain + } + + ai_chance = { base = 50 } + } + + option = { # Give me men! + name = iberia_north_africa.2013.c + + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2013.notif.t + right_icon = scope:fp2_iberia_north_africa_2013_head_of_faith + + add_character_modifier = { + modifier = fp2_trusted_by_pilgrim_warriors_modifier + years = 20 + } + } + + ai_chance = { base = 30 } + } + + option = { # Gift me a relic worthy of (location) - Does not req ROCO because it is a trinket + name = iberia_north_africa.2013.d + + show_as_tooltip = { custom_tooltip = iberia_north_africa.2013.d.tooltip } # Can cause strange behavior where a button is unselectable + hidden_effect = { + scope:fp2_iberia_north_africa_2013_head_of_faith = { + set_up_trinket_adjective_effect = yes + random_list = { + 2 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + 1 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = pouch + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + 1 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = medallion + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + 2 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = medium_box + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + 1 = { + create_artifact = { + name = fp2_blessed_junk + description = fp2_blessed_junk_desc + type = miscellaneous + visuals = fabric_roll + modifier = artifact_monthly_piety_1_modifier + save_scope_as = random_trinket + } + } + } + scope:random_trinket = { + add_durability = { + value = artifact_durability + multiply = { -0.45 -0.1 } # This is nice, very nice. + } + } + + if = { # Cleanup + limit = { exists = var:trinket_adjective_followup } + remove_variable = trinket_adjective_followup + } + } + } + + send_interface_toast = { + type = event_toast_effect_good + title = iberia_north_africa.2013.notif.t + right_icon = scope:fp2_iberia_north_africa_2013_head_of_faith + left_icon = scope:random_trinket + + scope:random_trinket = { set_owner = root } + } + + ai_chance = { base = 10 } + } +} + +################ +# Restore Old Vasconia +# by Joe Parkin +################ + +#The kingdom revived. +iberia_north_africa.2100 = { + type = character_event + title = iberia_north_africa.2100.t + desc = iberia_north_africa.2100.desc + theme = realm + left_portrait = { + character = scope:founder + animation = personality_bold + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + restore_old_vasconia_decision_scripted_effect = yes + restore_old_vasconia_decision_tooltip_scripted_effect = yes + #Notify other players. + every_player = { + limit = { + #this != scope:founder + in_diplomatic_range = root + } + trigger_event = iberia_north_africa.2101 + } + } + + #Well done Nickname + option = { + name = iberia_north_africa.2100.a + give_nickname = nick_the_great + add_prestige = minor_prestige_gain + } + + #Well done. + option = { + name = iberia_north_africa.2100.b + add_prestige = medium_prestige_gain + } +} + +#Inform any players. +iberia_north_africa.2101 = { + type = character_event + title = iberia_north_africa.2100.t + desc = iberia_north_africa.2101.desc + theme = realm + theme = diplomacy + left_portrait = { + character = scope:founder + animation = personality_bold + } + + immediate = { + if = { + limit = { + culture = { + OR = { + this = culture:basque + AND = { + any_parent_culture_or_above = { this = culture:basque } + has_cultural_pillar = heritage_iberian + } + } + } + } + play_music_cue = "mx_cue_positive_effect" + } + restore_old_vasconia_decision_tooltip_scripted_effect = yes + } + + option = { + name = { #Basques are happy. + trigger = { + culture = { + OR = { + this = culture:basque + AND = { + any_parent_culture_or_above = { this = culture:basque } + has_cultural_pillar = heritage_iberian + } + } + } + } + text = iberia_north_africa.2100.b + } + name = { #Iberians and Franks/Occitans are outraged. + trigger = { + NOT = { + culture = { + OR = { + this = culture:basque + AND = { + any_parent_culture_or_above = { this = culture:basque } + has_cultural_pillar = heritage_iberian + } + } + } + } + culture = { + OR = { + has_cultural_pillar = heritage_frankish + has_cultural_pillar = heritage_iberian + } + } + } + text = iberia_north_africa.2101.b + } + name = { #Noone else especially cares. + trigger = { + culture = { + NOR = { + has_cultural_pillar = heritage_iberian + has_cultural_pillar = heritage_frankish + } + } + } + text = iberia_north_africa.2101.c + } + } +} diff --git a/N3OW/events/decisions_events/mpo_greatest_of_khans_events.txt b/N3OW/events/decisions_events/mpo_greatest_of_khans_events.txt new file mode 100644 index 00000000..5cde29eb --- /dev/null +++ b/N3OW/events/decisions_events/mpo_greatest_of_khans_events.txt @@ -0,0 +1,2825 @@ + +namespace = mpo_greatest_of_khans + + +################ +# Become Greatest of Khans events +#Jason Cantalini + +#Out of order so that event numbering can still mirror central_asia_events that provide base game Great Khan content (sorry) +#Hidden war of defiance setup event +mpo_greatest_of_khans.0100 = { + hidden = yes + immediate = { + #Remove primary defender truces with root AND START WAR! + scope:primary_coalition_defender = { + if = { + limit = { + OR = { + any_truce_holder = { + this = root + } + any_truce_target = { + this = root + } + } + } + cancel_truce_both_ways = root + } + if = { + limit = { + is_vassal_or_below_of = root + } + create_title_and_vassal_change = { + type = independency + save_scope_as = change + } + becomes_independent = { change = scope:change } + resolve_title_and_vassal_change = scope:change + } + #BEGIN THE WAR! + start_war = { + cb = mpo_great_war_of_defiance_cb + target = root + target_title = root.primary_title + } + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + every_in_list = { + list = anti_gok_coalition_members + limit = { + NOR = { + is_defender_in_war = prev + is_attacker_in_war = prev + } + } + prev = { + add_attacker = prev + } + } + } + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + every_in_list = { + list = obedient_nomad_vassals + limit = { + NOR = { + is_defender_in_war = prev + is_attacker_in_war = prev + } + } + prev = { + add_defender = prev + } + } + } + } + #End all the other wars characters are involved in + every_in_list = { + list = anti_gok_coalition_members + every_character_war = { + limit = { + NOR = { + using_cb = mpo_great_war_of_defiance_cb + using_cb = crusading_claim_cb + AND = { + primary_defender = prev + NOT = { + using_cb = peasant_war + } + } + primary_defender = { + is_ai = no + } + } + } + if = { + limit = { + primary_attacker = prev + } + end_war = white_peace + } + else = { + remove_participant = prev + } + } + } + every_in_list = { + list = obedient_nomad_vassals + every_character_war = { + limit = { + NOR = { + using_cb = mpo_great_war_of_defiance_cb + using_cb = crusading_claim_cb + AND = { + primary_defender = prev + NOT = { + using_cb = peasant_war + } + } + primary_defender = { + is_ai = no + } + } + } + if = { + limit = { + primary_attacker = prev + } + end_war = white_peace + } + else = { + remove_participant = prev + } + } + } + #Add global_variable that prevents anyone taking decision + if = { + limit = { + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + } + set_global_variable = { + name = mpo_gok_war_ongoing + value = root + } + } + random_character_war = { + limit = { + using_cb = mpo_great_war_of_defiance_cb + } + save_scope_as = gok_war + } + if = { + limit = { + OR = { + has_relation_potential_rival = scope:primary_coalition_defender + scope:primary_coalition_defender = { + opinion = { + target = root + value < -40 + } + } + } + } + set_relation_rival = { + target = scope:primary_coalition_defender + reason = rival_led_coalition_against_me + } + } + #Memory for Gurkhan + create_character_memory = { + type = gok_called_the_clans + } + + #trigger event for gurkhan - obedient vassals pledge to fight + if = { + limit = { + any_in_list = { + list = obedient_nomad_vassals + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + } + } + trigger_event = { + id = mpo_greatest_of_khans.0101 + days = 1 + } + } + else = { + #add submitters as tributaries since root is getting no event + every_in_list = { + list = gok_submitters + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + } + save_scope_as = gurkhan_to_gok + #Player notification and offer to join/submit event + every_player = { + limit = { + mpo_war_of_defiance_notified_player_trigger = yes + } + trigger_event = { + id = mpo_greatest_of_khans.0102 + days = 2 + } + } + } + } +} + +scripted_trigger mpo_greatest_of_khans_0101_ideal_vassal_trigger = { + is_adult = yes + is_imprisoned = no + has_contagious_deadly_disease_trigger = no + can_be_knight_trigger = { ARMY_OWNER = root } +} + +scripted_trigger mpo_greatest_of_khans_0101_uninvolved_vassal_trigger = { + NOR = { + is_obedient_to = root + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + is_at_war_with = root + has_relation_rival = root + is_imprisoned = yes + } + government_has_flag = government_is_nomadic + basic_is_available_ai = yes + is_adult = yes +} + +#You are the Gurkhan and now fighting to be GoK +mpo_greatest_of_khans.0101 = { + type = character_event + title = mpo_greatest_of_khans.0101.t + desc = { + desc = mpo_greatest_of_khans.0101.desc_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:gok_opponent + NOT = { + scope:primary_coalition_defender = { + this = scope:gok_opponent + } + } + } + desc = mpo_greatest_of_khans.0101.desc_gok_opponent + } + desc = mpo_greatest_of_khans.0101.desc_primary_attacker + } + triggered_desc = { + trigger = { + exists = scope:big_sub + } + desc = mpo_greatest_of_khans.0101.desc_sub + } + desc = mpo_greatest_of_khans.0101.desc + } + theme = nomads + left_portrait = { + character = scope:vassal_1 + animation = horse_sword_shield + camera = camera_event_horse_left_forward + + } + right_portrait = { + character = scope:vassal_2 + animation = jockey_gallop + camera = camera_event_horse_right_forward + } + lower_left_portrait = scope:potential_joiner_1 + lower_center_portrait = scope:potential_joiner_2 + lower_right_portrait = scope:potential_joiner_3 + override_background = { reference = wilderness } + override_effect_2d = { + reference = rain + } + + trigger = { + is_at_war = yes + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + any_in_list = { + list = obedient_nomad_vassals + age >= 10 + is_imprisoned = no + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + } + } + + immediate = { + #add submitters as tributaries + if = { + limit = { + list_size = { + name = gok_submitters + value <= 4 + } + } + every_in_list = { + list = gok_submitters + custom_tooltip = became_your_tributary_tt + add_opinion = { + target = root + modifier = obedience_opinion + years = 10 + } + hidden_effect = { + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + } + } + } + #vague tooltip if too many to show + else = { + custom_tooltip = gok_submitters_became_tributaries_tt + hidden_effect = { + every_in_list = { + list = gok_submitters + custom_tooltip = became_your_tributary_tt + add_opinion = { + target = root + modifier = obedience_opinion + years = 10 + } + start_tributary_interaction_effect = { + TRIBUTARY = this + SUZERAIN = root + } + } + } + } + + if = { + limit = { + any_in_list = { + list = gok_submitters + } + } + ordered_in_list = { + list = gok_submitters + order_by = current_military_strength + save_scope_as = big_sub + } + } + if = { + limit = { + any_in_list = { + list = obedient_nomad_vassals + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + mpo_greatest_of_khans_0101_ideal_vassal_trigger = yes + } + } + ordered_in_list = { + list = obedient_nomad_vassals + order_by = current_military_strength + limit = { + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + mpo_greatest_of_khans_0101_ideal_vassal_trigger = yes + } + save_scope_as = vassal_1 + } + } + else = { + ordered_in_list = { + list = obedient_nomad_vassals + order_by = current_military_strength + limit = { + is_adult = yes + is_imprisoned = no + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + } + save_scope_as = vassal_1 + } + } + if = { + limit = { + any_in_list = { + list = obedient_nomad_vassals + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + mpo_greatest_of_khans_0101_ideal_vassal_trigger = yes + NOT = { this = scope:vassal_1 } + } + } + ordered_in_list = { + list = obedient_nomad_vassals + order_by = current_military_strength + limit = { + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + mpo_greatest_of_khans_0101_ideal_vassal_trigger = yes + NOT = { this = scope:vassal_1 } + } + save_scope_as = vassal_2 + } + } + else = { + ordered_in_list = { + list = obedient_nomad_vassals + order_by = current_military_strength + limit = { + age >= 10 + is_imprisoned = no + any_character_war = { + using_cb = mpo_great_war_of_defiance_cb + } + NOT = { this = scope:vassal_1 } + } + save_scope_as = vassal_2 + } + } + scope:vassal_1 = { + add_character_flag = need_military_outfit + } + scope:vassal_2 ?= { + add_character_flag = need_military_outfit + } + #Potential additional joiners + ordered_vassal = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0101_uninvolved_vassal_trigger = yes + } + save_scope_as = potential_joiner_1 + add_to_list = potential_joiners + } + #Potential additional joiners + ordered_vassal = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0101_uninvolved_vassal_trigger = yes + NOT = { + this = scope:potential_joiner_1 + } + } + save_scope_as = potential_joiner_2 + add_to_list = potential_joiners + } + #Potential additional joiners + ordered_vassal = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0101_uninvolved_vassal_trigger = yes + NOR = { + this = scope:potential_joiner_1 + this = scope:potential_joiner_2 + } + } + save_scope_as = potential_joiner_3 + add_to_list = potential_joiners + } + } + + #Entreat even more help from other vassals + option = { + name = mpo_greatest_of_khans.0101.a + flavor = mpo_greatest_of_khans.0101.a.flavor + trigger = { + exists = scope:potential_joiner_1 + exists = dynasty + } + #Will pay renown to get aid + if = { + limit = { + is_ai = no + #Combined title tiers of joiners to roughly judge their strength + potential_joiner_combined_value >= 13 + } + dynasty = { + add_dynasty_prestige = monumental_dynasty_prestige_loss + } + } + else_if = { + limit = { + potential_joiner_combined_value >= 7 + is_ai = no + } + dynasty = { + add_dynasty_prestige = massive_dynasty_prestige_loss + } + } + else_if = { + limit = { + is_ai = no + } + dynasty = { + add_dynasty_prestige = major_dynasty_prestige_loss + } + } + else = { + #Lower loss for AI because they can't make smart judgements like players and will always take this + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_loss + } + } + + scope:gok_war = { + every_in_list = { + list = potential_joiners + limit = { + NOR = { + is_defender_in_war = prev + is_attacker_in_war = prev + } + } + prev = { + add_defender = prev + } + } + } + hidden_effect = { + every_in_list = { + list = potential_joiners + every_character_war = { + limit = { + NOR = { + using_cb = mpo_great_war_of_defiance_cb + using_cb = crusading_claim_cb + AND = { + primary_defender = prev + NOT = { + using_cb = peasant_war + } + } + primary_defender = { + is_ai = no + } + } + } + if = { + limit = { + primary_attacker = prev + } + end_war = white_peace + } + else = { + remove_participant = prev + } + } + } + } + custom_tooltip = gok_joiners_wars_cancelled_tt + if = { + limit = { + is_ai = no + } + stress_impact = { + arrogant = major_stress_impact_gain + brave = major_stress_impact_gain + ambitious = major_stress_impact_gain + } + } + ai_chance = { + base = 1000 + } + } + #Refuse their aid for the swag + option = { + name = mpo_greatest_of_khans.0101.b + flavor = mpo_greatest_of_khans.0101.b.flavor + + custom_tooltip = gok_obedient_vassals_leave_war_tt + hidden_effect = { + every_in_list = { + list = obedient_nomad_vassals + limit = { + NOT = { + this = root + } + } + scope:gok_war = { + remove_participant = prev + } + } + } + custom_tooltip = gok_fights_alone_reward_on_victory_tt + set_variable = { + name = fought_for_gok_alone + value = gok_obedient_vassals_strength_value + } + stress_impact = { + humble = medium_stress_impact_gain + craven = major_stress_impact_gain + } + #The AI should be as scary as possible + ai_chance = { + base = 0 + } + } + #Just accept their aid + option = { + name = mpo_greatest_of_khans.0101.c + + #AI should take first option if they have it + ai_chance = { + base = 100 + modifier = { + exists = scope:potential_joiner_1 + exists = dynasty + factor = 0 + } + } + } + after = { + scope:vassal_1 = { + remove_character_flag = need_military_outfit + } + scope:vassal_2 ?= { + remove_character_flag = need_military_outfit + } + save_scope_as = gurkhan_to_gok + #Player notification and offer to join/submit event + every_player = { + limit = { + mpo_war_of_defiance_notified_player_trigger = yes + } + trigger_event = { + id = mpo_greatest_of_khans.0102 + days = 2 + } + } + } +} + +#Someone is trying to become GoK! Stop them! +mpo_greatest_of_khans.0102 = { + type = character_event + title = mpo_greatest_of_khans.0102.t + desc = mpo_greatest_of_khans.0102.desc + theme = nomads + left_portrait = { + character = scope:gurkhan_to_gok + animation = horse_archer_aggressive + camera = camera_event_horse_left_forward + } + right_portrait = { + character = scope:knight + animation = horse_archer_aggressive + camera = camera_event_horse_right_facing_left + hide_info = yes + } + lower_right_portrait = scope:primary_coalition_defender + override_background = { + trigger = { + NOT = { + government_has_flag = government_is_nomadic + } + } + reference = burning_building + } + override_background = { + trigger = { + government_has_flag = government_is_nomadic + } + reference = mpo_steppe_evening + } + override_effect_2d = { + reference = smoke + } + + immediate = { + scope:gurkhan_to_gok = { + add_character_flag = need_military_outfit + custom_tooltip = gok_took_become_gok_decision_tt + custom_tooltip = gok_began_war_of_defiance_tt + custom_tooltip = gok_gurkhan_declared_intent_tt + custom_tooltip = gok_warning_one_off_tt + } + scope:gurkhan_to_gok = { + ordered_knight = { + order_by = prowess + limit = { + is_imprisoned = no + NOT = { + this = root + } + } + save_scope_as = knight + add_character_flag = need_military_outfit + } + + } + } + #Join war to aid Gurkhan! + option = { + trigger = { + OR = { + is_vassal_or_below_of = scope:gurkhan_to_gok + is_tributary_of_suzerain_or_above = scope:gurkhan_to_gok + is_allied_to = scope:gurkhan_to_gok + dynasty ?= { + any_dynasty_member = { + this = scope:gurkhan_to_gok + } + } + has_relation_soulmate = scope:gurkhan_to_gok + has_relation_friend = scope:gurkhan_to_gok + any_spouse = { + this = scope:gurkhan_to_gok + } + } + NOR = { + is_at_war_with = scope:gurkhan_to_gok + has_relation_rival = scope:gurkhan_to_gok + } + } + name = mpo_greatest_of_khans.0102.a + add_internal_flag = dangerous + scope:gok_war = { + add_defender = root + } + #Makes Gurkhan like you + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:gurkhan_to_gok + opinion = 40 + } + stress_impact = { + craven = medium_stress_impact_gain + } + } + #Join war against Gurkhan! + option = { + trigger = { + NOR = { + is_at_war_with = scope:gurkhan_to_gok + is_at_war_with = scope:primary_coalition_defender + is_imprisoned_by = scope:gurkhan_to_gok + } + } + name = mpo_greatest_of_khans.0102.b + add_internal_flag = dangerous + scope:gok_war = { + add_attacker = root + } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:primary_coalition_defender + opinion = 20 + } + #This is a crime if you're his vassal! + if = { + limit = { + is_vassal_or_below_of = scope:gurkhan_to_gok + } + #Makes Gurkhan hate you + reverse_add_opinion = { + modifier = coup_plotter_opinion + target = scope:gurkhan_to_gok + opinion = -100 + } + } + else_if = { + limit = { + is_allied_to = scope:gurkhan_to_gok + } + reverse_add_opinion = { + modifier = betrayal_opinion + target = scope:gurkhan_to_gok + opinion = -100 + } + break_alliance = scope:gurkhan_to_gok + + } + else = { + reverse_add_opinion = { + modifier = hate_opinion + target = scope:gurkhan_to_gok + opinion = -40 + } + } + stress_impact = { + craven = medium_stress_impact_gain + } + } + #I will submit as a tributary + option = { + trigger = { + is_independent_ruler = yes + is_tributary = no + NOT = { + is_at_war_with = scope:gurkhan_to_gok + } + } + name = mpo_greatest_of_khans.0102.c + start_tributary_interaction_effect = { + TRIBUTARY = root + SUZERAIN = scope:gurkhan_to_gok + } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:gurkhan_to_gok + opinion = 10 + } + stress_impact = { + brave = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + #I will submit as a vassal + option = { + trigger = { + is_independent_ruler = yes + NOR = { + is_at_war_with = scope:gurkhan_to_gok + is_vassal_or_below_of = scope:gurkhan_to_gok + AND = { + is_tributary = yes + NOT = { + is_tributary_of_suzerain_or_above = scope:gurkhan_to_gok + } + } + } + #is roughly the gurkhan's neighbor + OR = { + scope:gurkhan_to_gok = { + any_land_neighboring_realm_with_tributaries_owner = { + this = root + } + } + root = { + any_land_neighboring_realm_with_tributaries_owner = { + this = scope:gurkhan_to_gok + } + } + } + + } + name = mpo_greatest_of_khans.0102.d + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:gurkhan_to_gok + change = scope:change + } + resolve_title_and_vassal_change = scope:change + + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:gurkhan_to_gok + opinion = 30 + } + + stress_impact = { + brave = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + #Uh... well that's ominous + option = { + name = mpo_greatest_of_khans.0102.e + } + + after = { + scope:gurkhan_to_gok = { + remove_character_flag = need_military_outfit + } + scope:knight = { + remove_character_flag = need_military_outfit + } + } +} + +#The Gurkhan lost the war. Hah. Loser. +mpo_greatest_of_khans.0103 = { + type = character_event + title = mpo_greatest_of_khans.0103.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root = scope:defender + } + desc = mpo_greatest_of_khans.0103.desc_defender_intro + } + desc = mpo_greatest_of_khans.0103.desc_intro + } + first_valid = { + triggered_desc = { + trigger = { + root = scope:defender + } + desc = mpo_greatest_of_khans.0103.desc_defender + } + triggered_desc = { + trigger = { + root = scope:attacker + } + desc = mpo_greatest_of_khans.0103.desc_attacker + } + triggered_desc = { + trigger = { + root = { + is_in_list = anti_gok_defenders + } + } + desc = mpo_greatest_of_khans.0103.desc_defenders + } + triggered_desc = { + trigger = { + root = { + is_in_list = anti_gok_attackers + } + } + desc = mpo_greatest_of_khans.0103.desc_attackers + } + desc = mpo_greatest_of_khans.0103.desc + } + } + theme = nomads + left_portrait = { + character = scope:defender + animation = prisonhouse + camera = camera_event_left_forward + override_imprisonment_visuals = yes + outfit_tags = { beggar_rags } + } + right_portrait = { + character = scope:knight + animation = menacing + hide_info = yes + } + lower_right_portrait = scope:attacker + override_background = { + reference = wilderness_scope + } + override_effect_2d = { + reference = flies + } + + immediate = { + scope:attacker = { + capital_province = { save_scope_as = background_wilderness_scope } + ordered_knight = { + order_by = prowess + limit = { + is_imprisoned = no + NOR = { + this = root + this = scope:defender + } + } + save_scope_as = knight + add_character_flag = need_military_outfit + } + } + } + option = { + name = mpo_greatest_of_khans.0103.a + } +} + +scripted_trigger mpo_greatest_of_khans_0002_confederation_trigger = { + is_confederation_member = yes + #Prev be with you + NOR = { + has_relation_rival = prev + is_at_war_with = prev + is_causing_raid_hostility_towards = prev + prev = { + is_causing_raid_hostility_towards = prev + } + opinion = { + target = prev + value <= -50 + } + reverse_opinion = { + target = prev + value <= -50 + } + } +} + +#I became Greatest of Khans +mpo_greatest_of_khans.0001 = { + type = character_event + window = fullscreen_event + title = mpo_greatest_of_khans.0001.t + desc = mpo_greatest_of_khans.0001.desc + theme = nomads + left_portrait = { + character = root + animation = personality_vengeful + } + override_background = { reference = mpo_fullscreen_greatest_of_khans } + + immediate = { + save_scope_as = genghis_khan + + play_music_cue = mx_cue_conquest_of_the_golden_horde + + add_trait = greatest_of_khans + if = { + limit = { + prestige_level < 5 + } + add_prestige_level = 1 + } + legend_seed_new_title_effect = yes + form_the_greatest_khan_empire_effect = yes + + create_story = story_greatest_of_khans + save_scope_value_as = { + name = gok_empire_crumble_date + value = { + value = current_year + add = 75 + } + } + #Add dynasty prestige if you chose to fight this without vassals' aid + if = { + limit = { + has_variable = fought_for_gok_alone + exists = dynasty + } + dynasty = { + add_dynasty_prestige = fought_gok_alone_value + } + } + mpo_add_golden_lineage_effect = { CHARACTER = root } + } + + option = { + name = mpo_greatest_of_khans.0001.a + custom_tooltip = greatest_of_khans_prevents_mongol_invasion_tt + custom_tooltip = gok_enable_offer_submission_or_ruin_tt + custom_tooltip = become_greatest_of_khans_decision_enable_gok_invasion_cb + add_to_global_variable_list = { + name = unavailable_unique_decisions + target = flag:mpo_become_greatest_of_khans_decision + } + custom_tooltip = gok_protected_from_chaotic_succession_tt + custom_tooltip = gok_time_limit_end_decision_tt + } + after = { + #You pick a nickname + trigger_event = mpo_greatest_of_khans.0003 + } +} + +#Someone became Greatest of Khans +mpo_greatest_of_khans.0002 = { + type = character_event + window = fullscreen_event + title = mongol_invasion.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + any_realm_province = { + OR = { + geographical_region = special_mongol_empire_start_region + geographical_region = special_mongol_empire_conquest_region_prio_1 + geographical_region = special_mongol_empire_conquest_region_prio_1_alpha + } + } + NOT = { + government_has_flag = government_is_nomadic + } + } + } + desc = { + desc = mongol_invasion.1002.desc.close + first_valid = { + triggered_desc = { + trigger = { + any_realm_province = { + geographical_region = special_mongol_empire_start_region + } + } + desc = mongol_invasion.1002.desc.close_mongolia + } + desc = mongol_invasion.1002.desc.close_steppes + } + desc = mongol_invasion.1002.desc.close.mid + #Great Khan or Genghis? + first_valid = { + triggered_desc = { + trigger = { + exists = scope:temujin + } + desc = mongol_invasion.1002.desc.genghis + } + desc = mongol_invasion.1002.desc.gok + } + desc = mongol_invasion.1002.desc.close.end + } + } + desc = mongol_invasion.1002.desc.far_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:temujin + root = scope:temujin + } + desc = mongol_invasion.1002.desc.genghis + } + desc = mongol_invasion.1002.desc.gok + } + desc = mongol_invasion.1002.desc.far + } + } + theme = nomads + left_portrait = { + character = scope:genghis_khan + animation = personality_vengeful + } + override_background = { reference = mpo_fullscreen_greatest_of_khans } + + immediate = { + play_music_cue = mx_cue_conquest_of_the_golden_horde + show_as_tooltip = { + scope:genghis_khan = { + add_trait_force_tooltip = greatest_of_khans + form_the_greatest_khan_empire_effect = yes + 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 } + } + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + custom_tooltip = become_gok_decision_now_unavailable_tt + } + } + + #Save confederation if there is one + if = { + limit = { + any_land_neighboring_realm_with_tributaries_owner = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + save_temporary_scope_as = confed_buddy + } + valid_confederation_member_trigger = { CHARACTER = scope:confed_buddy } + is_at_war = no + } + ordered_land_neighboring_realm_with_tributaries_owner = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + } + save_scope_as = confederation_neighbor + confederation = { + save_scope_as = confederation + } + } + } + } + #Submit to the Great Khan if you're already their tributary anyway + option = { + trigger = { + NOR = { + is_vassal_or_below_of = scope:genghis_khan + is_at_war_with = scope:genghis_khan + } + is_tributary_of_suzerain_or_above = scope:genghis_khan + } + name = mpo_greatest_of_khans.0002.a + #tributary of great khan's vassal or below + if = { + limit = { + is_tributary_of_suzerain_or_above = scope:genghis_khan + suzerain = { + highest_held_title_tier > root.highest_held_title_tier + } + } + suzerain = { + save_scope_as = new_liege + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:new_liege + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + else = { + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:genghis_khan + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + + stress_impact = { + brave = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + has_trait = ambitious + add = -20 + } + modifier = { + has_dread_level_towards = { + target = scope:genghis_khan + level >= 1 + } + add = 100 + } + modifier = { + has_dread_level_towards = { + target = scope:genghis_khan + level >= 2 + } + add = 200 + } + modifier = { + government_has_flag = government_is_herder + add = 1000 + } + modifier = { + add = 50 + opinion = { + target = scope:genghis_khan + value >= 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:genghis_khan + value >= 75 + } + } + modifier = { + add = -50 + opinion = { + target = scope:genghis_khan + value <= -50 + } + } + modifier = { + add = -50 + opinion = { + target = scope:genghis_khan + value <= -75 + } + } + } + } + #Join a confederation that's next to me + option = { + trigger = { + exists = scope:confederation + } + name = mpo_greatest_of_khans.0002.b + scope:confederation = { add_confederation_member = root } + scope:confederation_neighbor = { + if = { + limit = { + is_at_war = yes + } + every_character_war = { + limit = { + primary_defender = { + is_member_of_confederation = scope:confederation + } + } + add_defender = root + } + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + capital_county ?= { + change_county_fertility = major_county_fertility_level_gain + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + opinion = { + target = scope:confederation_neighbor + value > 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:confederation_neighbor + value > 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:confederation_neighbor + value < -25 + } + } + modifier = { + add = -50 + opinion = { + target = scope:confederation_neighbor + value < -75 + } + } + modifier = { + has_trait = ambitious + add = -50 + } + } + } + #Cry (unless you are vassal of the Khan!) + option = { + name = { + trigger = { + NOT = { + government_has_flag = government_is_nomadic + } + } + text = mongol_invasion.1002.b + } + name = { + trigger = { + government_has_flag = government_is_nomadic + } + text = mongol_invasion.1002.a + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } +} + +#Greatest of Khans picks nickname +mpo_greatest_of_khans.0003 = { + type = character_event + title = mpo_greatest_of_khans.0003.t + desc = mpo_greatest_of_khans.0003.desc + theme = nomads + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + override_background = { + reference = mpo_temple_steppe + } + override_effect_2d = { + reference = legend_glow + } + option = { + trigger = { + NOT = { + culture = { + has_cultural_pillar = language_turkic + } + } + } + name = mpo_greatest_of_khans.0003.a + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_genghis_khan + ai_chance = { + base = 50 + modifier = { + factor = 0 + NOT = { + culture = { + has_cultural_pillar = language_mongolic + } + } + } + modifier = { + factor = 100 + this = character:125501 + } + } + } + option = { + trigger = { + culture = { + has_cultural_pillar = language_turkic + } + } + name = mpo_greatest_of_khans.0003.b + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_cengiz_khan + ai_chance = { + base = 50 + } + } + option = { + trigger = { + culture = { + has_cultural_pillar = language_mongolic + } + } + name = mpo_greatest_of_khans.0003.c + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_yekhe_khagan + ai_chance = { + base = 50 + } + } + option = { + trigger = { + culture = { + has_cultural_pillar = language_turkic + } + } + name = mpo_greatest_of_khans.0003.d + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_dort_yonlug_khagan + ai_chance = { + base = 50 + } + } + option = { + trigger = { + NOR = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + faith.religion = religion:islam_religion + } + } + name = mpo_greatest_of_khans.0003.e + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_tengri_khagan + ai_chance = { + base = 50 + modifier = { + add = -45 + NOT = { + faith.religion = religion:tengrism_religion + } + } + } + } + option = { + trigger = { + OR = { + faith = faith:nestorian + faith.religion = faith:manichean.religion + } + } + name = mpo_greatest_of_khans.0003.f + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_xormuzta + ai_chance = { + base = 100 + } + } + option = { + trigger = { + faith.religion = religion:islam_religion + capital_province ?= { + OR = { + geographical_region = world_middle_east + geographical_region = world_asia_minor + geographical_region = world_steppe_tarim + geographical_region = world_steppe_central + } + } + current_date >= 1250 + } + name = mpo_greatest_of_khans.0003.g + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_cihangir + ai_chance = { + base = 100 + } + } + option = { + trigger = { + faith = faith:nestorian + } + name = mpo_greatest_of_khans.0003.h + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_mar_sargis + ai_chance = { + base = 100 + } + } + option = { + trigger = { + culture = { + OR = { + has_cultural_pillar = language_iranian + has_cultural_pillar = language_scythian + } + } + } + name = mpo_greatest_of_khans.0003.i + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_akhshunwar + ai_chance = { + base = 100 + } + } + option = { + name = mpo_greatest_of_khans.0003.j + if = { + limit = { has_any_nickname = yes } + remove_nickname = yes + } + give_nickname = nick_culture_khagan + ai_chance = { + base = 10 + } + } + option = { + name = mpo_greatest_of_khans.0003.k + ai_chance = { + base = 0 + } + } + after = { + #notification events go to other rulers + + add_to_temporary_list = received_notification + every_vassal_or_below = { + limit = { + is_ai = no + } + trigger_event = { + id = mpo_greatest_of_khans.0002 #Someone has become Genghis Khan + days = 1 + } + add_to_temporary_list = received_notification + } + every_ruler = { + limit = { + NOT = { + is_in_list = received_notification + } + OR = { + #Notify players + is_ai = no + #Give AI tributaries and herder neighbors chance to submit + #And strengthen confederations + AND = { + OR = { + AND = { + is_independent_ruler = yes + highest_held_title_tier <= tier_duchy + is_tributary = no + } + is_tributary_of_suzerain_or_above = root + } + OR = { + is_tributary_of_suzerain_or_above = root + #Is on the steppe and can join a confederation + AND = { + any_character_situation = { + this = situation:the_great_steppe + } + any_land_neighboring_realm_with_tributaries_owner = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + save_temporary_scope_as = maybe_confederate + } + valid_confederation_member_trigger = { CHARACTER = scope:maybe_confederate } + + } + } + } + + } + } + trigger_event = { + id = mpo_greatest_of_khans.0002 #Someone has become Genghis Khan + days = 1 + } + } + } +} + +#Fires notification that minor lord has accepted submission +mpo_greatest_of_khans.0020 = { + hidden = yes + immediate = { + send_interface_message = { + type = event_gok_submission_with_text + title = mpo_greatest_of_khans.0020_title + left_icon = scope:recipient + + show_as_tooltip = { + mpo_gok_offer_submission_effect = yes + } + } + } +} + +#Your new vassal chooses to submit +mpo_greatest_of_khans.0021 = { + type = letter_event + opening = { + desc = mpo_greatest_of_khans.0021.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + desc = mpo_greatest_of_khans.0021.desc_nomad + } + desc = mpo_greatest_of_khans.0021.desc + } + } + + sender = scope:recipient + + immediate = { + + } + + option = { + name = mpo_greatest_of_khans.0021.a + show_as_tooltip = { + mpo_gok_offer_submission_effect = yes + } + } +} + +#Your generous offer of submission has been refused... this means war +mpo_greatest_of_khans.0022 = { + type = letter_event + opening = { + desc = mpo_greatest_of_khans.0022.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + desc = mpo_greatest_of_khans.0022.desc_nomad + } + desc = mpo_greatest_of_khans.0022.desc + } + } + + sender = scope:recipient + + option = { + name = { + trigger = { + scope:recipient = { + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + text = mpo_greatest_of_khans.0022.a + } + name = { + trigger = { + scope:recipient = { + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + } + } + text = mpo_greatest_of_khans.0022.a_nomadic + } + mpo_gok_offer_submission_refusal_effect = yes + } +} + +#Final Greatest of Khans decision event +mpo_greatest_of_khans.0030 = { + type = character_event + window = visit_settlement_window + title = mpo_greatest_of_khans.0030.t + desc = mpo_greatest_of_khans.0030.desc + theme = nomads + left_portrait = { + character = scope:knight + animation = throne_room_two_handed_passive_shield + camera = camera_event_very_left + hide_info = yes + } + center_portrait = { + character = root + animation = war_over_win + camera = camera_event_center + } + right_portrait = { + character = scope:scholar + animation = reading + camera = camera_event_very_right + hide_info = yes + } + override_background = { + reference = throne_room + } + override_effect_2d = { + reference = legend_glow + } + immediate = { + play_music_cue = mx_cue_the_khans_glory + ordered_knight = { + order_by = prowess + limit = { + basic_is_available_ai = yes + is_adult = yes + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + is_courtier_of = root + } + alternative_limit = { + basic_is_available_ai = yes + is_adult = yes + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + } + alternative_limit = { + basic_is_available_ai = yes + is_adult = yes + } + save_scope_as = knight + add_character_flag = need_military_outfit + } + ordered_courtier = { + order_by = learning + limit = { + basic_is_available_ai = yes + is_adult = yes + culture = { + trigger_if = { + limit = { + NOT = { + this = culture:uyghur + } + } + NOR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + } + } + alternative_limit = { + basic_is_available_ai = yes + is_adult = yes + } + save_scope_as = scholar + } + custom_tooltip = gok_reform_invalides_gok_stuff_tt + gok_world_conquest_generic_rewards_effect = yes + every_owned_story = { + limit = { + story_type = story_greatest_of_khans + } + end_story = yes + } + } + #BURN THE SETTLED WORLD AND LET US GRAZE + option = { + name = mpo_greatest_of_khans.0030.a + flavor = mpo_greatest_of_khans.0030.a.flavor + add_dread = massive_dread_gain + add_gold = { + add = "list_size(burned_to_nomadism)" + multiply = miniscule_gold_value + } + add_internal_flag = dangerous + custom_tooltip = gok_counties_become_nomad_counties_tt + custom_tooltip = gok_new_nomad_counties_lose_development_tt + custom_tooltip = gok_other_counties_lose_development_tt + hidden_effect = { + every_in_list = { + list = burned_to_nomadism + raze_county = { + holding_type = nomad_holding + purge_secondary_holdings = yes + } + if = { + limit = { + development_level > 1 + } + save_scope_value_as = { + name = dev_reduction + value = { + add = development_level + multiply = -1 + add = 1 + } + } + } + change_development_level = scope:dev_reduction + change_county_control = -100 + } + #damage the rest a bit too + every_realm_county = { + limit = { + NOR = { + is_in_list = burned_to_nomadism + any_county_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + holder = { + is_ai = no + } + } + development_level > 1 + } + change_development_level = { + add = development_level + divide = 10 + floor = yes + multiply = -1 + } + } + } + + custom_tooltip = gok_non_nomads_become_nomad_tt + #Willing vassals convert to nomad + hidden_effect = { + every_in_list = { + list = sedentary_to_nomad_vassals + adopt_nomadic_ways_decision_effect = yes + } + } + + custom_tooltip = gok_city_state_creation + hidden_effect = { + every_in_list = { + list = city_state_vassals + every_held_title = { + limit = { + tier >= tier_county + is_head_of_faith = no + is_landless_type_title = no + #Leave them with their capital duchy + NOR = { + this = holder.capital_county + this = holder.capital_county.duchy + AND = { + tier = tier_county + duchy = holder.capital_county.duchy + } + } + } + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + change_title_holder = { + holder = root + change = scope:change + take_baronies = no + } + resolve_title_and_vassal_change = scope:change + } + } + } + stress_impact = { + compassionate = major_stress_impact_gain + greedy = massive_stress_impact_gain + lazy = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + #Convert to admin government + option = { + trigger = { + has_dlc_feature = admin_gov + } + name = mpo_greatest_of_khans.0030.b + flavor = mpo_greatest_of_khans.0030.b.flavor + add_internal_flag = special + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + gok_upgrade_realm_and_government_effect = yes + custom_tooltip = gok_some_sedentaries_become_admin_tt + hidden_effect = { + if = { + limit = { + ep3_is_clan_inclined_trigger = yes + } + nomad_convert_people_to_clan_effect = yes + } + else = { + nomad_convert_people_to_feudal_effect = yes + } + } + convert_to_administrative_from_feudalism_effect = { GOVERNMENT_TO_ADOPT = flag:dynamic } + hidden_effect = { + every_vassal = { + limit = { + gok_willing_new_admin_vassal_trigger = yes + } + change_to_administrative_effect = yes + every_vassal = { + limit = { + gok_willing_new_admin_vassal_trigger = yes + } + change_to_administrative_effect = yes + every_vassal = { + limit = { + gok_willing_new_admin_vassal_trigger = yes + } + change_to_administrative_effect = yes + every_vassal = { + limit = { + gok_willing_new_admin_vassal_trigger = yes + } + change_to_administrative_effect = yes + } + } + } + + } + } + + ai_chance = { + base = 100 + modifier = { + is_roman_emperor_trigger = yes + add = 100 + } + modifier = { + culture = { + OR = { + has_cultural_pillar = ethos_bureaucratic + has_cultural_pillar = ethos_courtly + has_cultural_pillar = ethos_egalitarian + } + } + add = 50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_legalistic + } + add = 50 + } + modifier = { + culture = { + OR = { + has_cultural_tradition = tradition_fp3_enlightened_magnates + has_cultural_tradition = tradition_loyal_soldiers + } + } + add = 20 + } + modifier = { + culture = { + OR = { + has_cultural_tradition = tradition_ep3_indomitable_azatani + has_cultural_tradition = tradition_ep3_audacious_cadets + has_cultural_tradition = tradition_fp3_fierce_independence + } + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_staunch_traditionalists + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_quarrelsome + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_warrior_culture + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_hereditary_hierarchy + } + add = -50 + } + modifier = { + culture = { + has_cultural_tradition = tradition_hereditary_hierarchy + } + add = -50 + } + modifier = { + culture = { + OR = { + has_cultural_pillar = ethos_stoic + has_cultural_pillar = ethos_bellicose + has_cultural_pillar = ethos_communal + } + } + add = -50 + } + modifier = { + culture = { + any_parent_culture_or_above = { + OR = { + this = culture:han + this = culture:greek + } + } + } + add = 100 + } + } + } + #Convert to feudal government + option = { + name = mpo_greatest_of_khans.0030.c + flavor = mpo_greatest_of_khans.0030.c.flavor + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + gok_upgrade_realm_and_government_effect = yes + nomad_convert_people_to_feudal_effect = yes + hidden_effect = { + every_in_list = { + list = switching_vassals + nomad_convert_people_to_feudal_effect = yes + } + } + ai_chance = { + base = 0 + modifier = { + ep3_is_clan_inclined_trigger = no + add = 5 + } + } + } + #Convert to clan government + option = { + name = mpo_greatest_of_khans.0030.d + flavor = mpo_greatest_of_khans.0030.d.flavor + nomad_domicile_refund_effect = yes + nomad_convert_herds_to_gold_special_troops_effect = yes + gok_upgrade_realm_and_government_effect = yes + nomad_convert_people_to_clan_effect = yes + hidden_effect = { + every_in_list = { + list = switching_vassals + nomad_convert_people_to_clan_effect = yes + } + } + ai_chance = { + base = 0 + modifier = { + ep3_is_clan_inclined_trigger = yes + add = 5 + } + } + } + #Actually... I don't want to change anything + option = { + name = mpo_greatest_of_khans.0030.e + flavor = mpo_greatest_of_khans.0030.e.flavor + ai_chance = { + base = 0 + } + } + + after = { + scope:knight = { + remove_character_flag = need_military_outfit + } + } +} + +#Invalidate event for story - your dynasty timed out or lost control of the GoK title +mpo_greatest_of_khans.0040 = { + type = character_event + title = mpo_greatest_of_khans.0040.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:timed_out + } + desc = mpo_greatest_of_khans.0040.desc_timed_out + } + desc = mpo_greatest_of_khans.0040.desc + } + } + theme = nomads + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_very_left + } + override_background = { + reference = mpo_steppe_evening + } + immediate = { + add_legitimacy = major_legitimacy_loss + custom_tooltip = gok_no_more_reform_decision + custom_tooltip = gok_no_more_special_powers + custom_tooltip = gok_lose_succession_protection_tt + if = { + limit = { + has_realm_law = nomadic_authority_5 + } + remove_realm_law = nomadic_authority_5 + add_realm_law = nomadic_authority_4 + } + if = { + limit = { + has_trait = greatest_of_khans + } + remove_trait = greatest_of_khans + } + if = { + limit = { + has_character_modifier = the_great_khan_modifier + } + remove_character_modifier = the_great_khan_modifier + } + + every_owned_story = { + limit = { story_type = story_greatest_of_khans } + end_story = yes + } + } + option = { + name = mpo_greatest_of_khans.0040.a + if = { + limit = { + any_held_title = { + this = global_var:greatest_of_khans_title + } + } + custom_tooltip = gok_guaranteed_disastrous_chaotic_succession_tt + global_var:greatest_of_khans_title = { + set_variable = { + name = guaranteed_disastrous_succession + value = yes + } + } + } + } +} + +#Switched government type on purpose... sort of GoK, but not really now +mpo_greatest_of_khans.0041 = { + type = character_event + title = mpo_greatest_of_khans.0041.t + desc = mpo_greatest_of_khans.0041.desc + theme = nomads + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + animation = acknowledging + } + triggered_animation = { + trigger = { + primary_title = title:h_china + } + animation = emperor + } + triggered_animation = { + trigger = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_wanua + } + } + animation = personality_honorable + } + animation = chancellor + } + right_portrait = { + character = scope:bower + animation = throne_room_bow_3 + } + override_background = { + reference = throne_room + } + immediate = { + ordered_vassal = { + order_by = current_military_strength + limit = { + basic_is_available_ai = yes + is_adult = yes + NOR = { + is_at_war_with = root + is_a_faction_member = yes + government_has_flag = government_is_nomadic + } + } + save_scope_as = bower + } + if = { + limit = { + NOT = { + exists = scope:bower + } + } + random_courtier = { + limit = { + basic_is_available_ai = yes + is_adult = yes + } + save_scope_as = bower + } + } + if = { + limit = { + NOT = { + exists = scope:bower + } + } + random_pool_character = { + province = root.capital_province + limit = { + basic_is_available_ai = yes + is_adult = yes + } + save_scope_as = bower + } + } + save_scope_as = root_scope + custom_tooltip = gok_forsaken_nomadism_tt + custom_tooltip = gok_no_more_reform_decision + custom_tooltip = gok_no_more_special_powers + } + option = { + name = mpo_greatest_of_khans.0041.a + } +} + +#GoK threatens new vassal +mpo_greatest_of_khans.0050 = { + type = letter_event + opening = { + desc = mpo_greatest_of_khans.0050.opening + } + desc = { + desc = mpo_greatest_of_khans.0050.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:liege + } + desc = mpo_greatest_of_khans.0050.desc_reorganized + } + desc = mpo_greatest_of_khans.0050.desc_end + } + } + + sender = scope:attacker + + immediate = { + if = { + limit = { + liege ?= { + NOT = { + this = scope:attacker + } + } + } + liege = { + save_scope_as = liege + } + } + } + + option = { + name = mpo_greatest_of_khans.0050.a + } +} + +#GoK mocks unlanded former vassal of enemy +mpo_greatest_of_khans.0051 = { + type = letter_event + opening = { + desc = mpo_greatest_of_khans.0051.opening + } + desc = mpo_greatest_of_khans.0051.desc + + sender = scope:attacker + + trigger = { + is_landed = no + } + immediate = { + + } + + option = { + name = mpo_greatest_of_khans.0051.a + } +} + +# +# END Become Greatest of Khans events +################# + +#MONGOL INVASION EVENTS - UPDATED FOR MPO + +### Appearance of Genghis Khan (others) +# by Petter Vilberg (updated by Jason Cantalini) +mpo_greatest_of_khans.1001 = { + type = character_event + window = fullscreen_event + title = mongol_invasion.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + any_realm_province = { + OR = { + geographical_region = special_mongol_empire_start_region + geographical_region = special_mongol_empire_conquest_region_prio_1 + geographical_region = special_mongol_empire_conquest_region_prio_1_alpha + } + } + government_has_flag = government_is_nomadic + } + } + desc = { + desc = mongol_invasion.1002.desc.close + first_valid = { + triggered_desc = { + trigger = { + any_realm_province = { + geographical_region = special_mongol_empire_start_region + } + } + desc = mongol_invasion.1002.desc.close_mongolia + } + desc = mongol_invasion.1002.desc.close_steppes + } + desc = mongol_invasion.1002.desc.close.mid + #Great Khan or Genghis? + first_valid = { + triggered_desc = { + trigger = { + exists = scope:temujin + } + desc = mongol_invasion.1002.desc.genghis + } + desc = mongol_invasion.1002.desc.gok + } + desc = mongol_invasion.1002.desc.close.end + } + } + + desc = { + desc = mongol_invasion.1002.desc.far_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:temujin + root = scope:temujin + } + desc = mongol_invasion.1002.desc.genghis + } + desc = mongol_invasion.1002.desc.gok + } + desc = mongol_invasion.1002.desc.far + } + } + } + theme = nomads + left_portrait = { + character = scope:temujin + animation = celebrate_sword + camera = camera_event_left_forward + } + override_background = { reference = mpo_fullscreen_greatest_of_khans } + + immediate = { + play_music_cue = mx_cue_conquest_of_the_golden_horde + + scope:temujin = { + save_scope_as = genghis_khan + primary_title = { + save_scope_as = gok_title + } + show_as_tooltip = { + add_trait_force_tooltip = greatest_of_khans + } + + custom_tooltip = genghis_khan_mongol_empire_tt + 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 } + } + + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + has_trait = nomadic_philosophy + } + } + custom_tooltip = become_gok_decision_now_unavailable_tt + } + + #Save confederation if there is one + if = { + limit = { + any_land_neighboring_realm_with_tributaries_owner = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + save_temporary_scope_as = confed_buddy + } + valid_confederation_member_trigger = { CHARACTER = scope:confed_buddy } + is_at_war = no + } + ordered_land_neighboring_realm_with_tributaries_owner = { + order_by = current_military_strength + limit = { + mpo_greatest_of_khans_0002_confederation_trigger = yes + } + save_scope_as = confederation_neighbor + confederation = { + save_scope_as = confederation + } + } + } + } + #Submit to the Great Khan if you're already their tributary anyway + option = { + trigger = { + NOR = { + is_vassal_or_below_of = scope:genghis_khan + is_at_war_with = scope:genghis_khan + } + is_tributary_of_suzerain_or_above = scope:genghis_khan + } + name = mpo_greatest_of_khans.0002.a + #tributary of great khan's vassal or below + if = { + limit = { + is_tributary_of_suzerain_or_above = scope:genghis_khan + suzerain = { + highest_held_title_tier > root.highest_held_title_tier + } + } + suzerain = { + save_scope_as = new_liege + } + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:new_liege + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + else = { + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + change_liege = { + liege = scope:genghis_khan + change = scope:change + } + resolve_title_and_vassal_change = scope:change + } + + stress_impact = { + brave = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + has_trait = ambitious + add = -20 + } + modifier = { + has_dread_level_towards = { + target = scope:genghis_khan + level >= 1 + } + add = 100 + } + modifier = { + has_dread_level_towards = { + target = scope:genghis_khan + level >= 2 + } + add = 200 + } + modifier = { + government_has_flag = government_is_herder + add = 1000 + } + modifier = { + add = 50 + opinion = { + target = scope:genghis_khan + value >= 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:genghis_khan + value >= 75 + } + } + modifier = { + add = -50 + opinion = { + target = scope:genghis_khan + value <= -50 + } + } + modifier = { + add = -50 + opinion = { + target = scope:genghis_khan + value <= -75 + } + } + } + } + #Join a confederation that's next to me + option = { + trigger = { + exists = scope:confederation + } + name = mpo_greatest_of_khans.0002.b + scope:confederation = { add_confederation_member = root } + scope:confederation_neighbor = { + if = { + limit = { + is_at_war = yes + } + every_character_war = { + limit = { + primary_defender = { + is_member_of_confederation = scope:confederation + } + } + add_defender = root + } + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + capital_county ?= { + change_county_fertility = major_county_fertility_level_gain + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + opinion = { + target = scope:confederation_neighbor + value > 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:confederation_neighbor + value > 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:confederation_neighbor + value < -25 + } + } + modifier = { + add = -50 + opinion = { + target = scope:confederation_neighbor + value < -75 + } + } + modifier = { + has_trait = ambitious + add = -50 + } + } + } + + option = { # Option for close characters + name = { + trigger = { has_trait = craven } + text = mongol_invasion.1002.craven + } + name = { + text = mongol_invasion.1002.a + } + trigger = { + government_has_flag = government_is_nomadic + } + + if = { + limit = { + highest_held_title_tier < tier_empire + } + custom_tooltip = mongol_invasion_submission_reminder_tt + } + ai_chance = { + base = 100 + } + } + + option = { # Options for distant characters + name = { + text = mongol_invasion.1002.craven + trigger = { has_trait = craven } + } + name = { + text = mongol_invasion.1002.b + } + trigger = { + NOT = { government_has_flag = government_is_nomadic } + } + custom_tooltip = mongol_invasion.1002.genghis_khan_tt + + if = { + limit = { + highest_held_title_tier < tier_empire + } + } + ai_chance = { + base = 100 + } + + } +} + +#Player Temujin's buffs through feed messages +mpo_greatest_of_khans.1010 = { + hidden = yes + trigger = { + OR = { + NOT = { + exists = local_var:temujin_buff_count + } + local_var:temujin_buff_count < 9 + } + is_alive = yes + is_ruler = yes + government_has_flag = government_is_nomadic + exists = domicile + #Only meant to help you GET TO GoK decision + NOR = { + has_trait = greatest_of_khans + has_global_variable = mpo_gok_war_ongoing + } + #Decreasing authority means he loses it + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + immediate = { + #Adjust tracking variable so this only happens 6 times max + if = { + limit = { + NOT = { + exists = local_var:temujin_buff_count + } + } + set_local_variable = { + name = temujin_buff_count + value = 1 + } + } + else = { + change_local_variable = { + name = temujin_buff_count + add = 1 + } + } + send_interface_message = { + type = event_gok_temujin_with_text + title = mpo_greatest_of_khans.1010_title + desc = mpo_greatest_of_khans.1010_desc + domicile = { + change_herd = { + value = nomadic_authority_level_3_requirement + divide = 3 + add = { 1000 3000 } + } + } + add_prestige = { 200 300 } + add_gold = { 30 80 } + } + if = { + limit = { + local_var:temujin_buff_count < 9 + } + trigger_event = { + id = mpo_greatest_of_khans.1010 + months = { 3 9 } + } + } + } +} diff --git a/N3OW/events/decisions_events/roman_restoration_events.txt b/N3OW/events/decisions_events/roman_restoration_events.txt new file mode 100644 index 00000000..d6a3bc14 --- /dev/null +++ b/N3OW/events/decisions_events/roman_restoration_events.txt @@ -0,0 +1,3371 @@ + +namespace = roman_restoration + +################################################## + +### Roman Restoration Major Decision Events +# by Flavio Verna + +# 0001 - Restoring Roman Empire as Byzantium +# 0003 - Restoring Roman Empire as HRE +# 0005 - New Emperor becomes Augustus +# 0006 - Old Emperor loses Augustus +# 0010/0024 - Old Roman Provinces are Restored +# 0100 - Schism is mended +# 0199, 0104, 0105, 0106, 0107 - Restored Patriarchate Events +# 0120 - Imposing the Iconoclast Patriarchate +# 0122 - Restoring the Ecumenical Patriarchate +# 0124 - Restoring the Papacy +# 0130 - Destroying the Papacy +# 0140 - Unifying Italy +# 0150 - Restoring Roman Empire as Italy +# 0160/0175 - Roman Empire dismantles pretenders + +################################################## + +################################################## +# Restoring the Roman Empire +################################################## +roman_restoration.0001 = { + type = character_event + title = roman_restoration.0001.t + desc = { + desc = roman_restoration.0001.desc.intro + first_valid = { + # Doing it as the Greeks. + triggered_desc = { + trigger = { + root.culture = culture:greek + } + desc = roman_restoration.0001.desc.greeks + } + # Doing it as somebody else. + desc = roman_restoration.0001.desc.other + } + first_valid = { + # Doing it as Christians. + triggered_desc = { + trigger = { + faith.OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = roman_restoration.0001.desc.christians + } + # Doing it as Hellenics + triggered_desc = { + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0001.desc.hellenics + } + desc = roman_restoration.0001.desc.fallback + } + } + theme = emperor + left_portrait = { + character = scope:scoped_emperor + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + save_scope_as = scoped_emperor + create_roman_empire_scripted_effect = yes + create_story = restoring_roman_provinces_story + } + option = { + name = roman_restoration.0001.a + set_nickname_effect = { NICKNAME = nick_the_glorious } + # Send narrative fluff to other players (if any). + every_player = { + limit = { + this != root + is_within_diplo_range = { CHARACTER = root } + } + trigger_event = roman_restoration.0002 + } + } +} + +# Players informed of some fucko declaring a new Rome +roman_restoration.0002 = { + type = character_event + title = roman_restoration.0002.t + desc = { + desc = roman_restoration.0002.desc + first_valid = { + # Christians freaking out. + triggered_desc = { + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + desc = roman_restoration.0002.desc.hellenics + } + # Regular. + desc = roman_restoration.0002.desc.christians + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_honorable + } + + immediate = { + #Same-faith non-empire tier rulers are over-awed. + if = { + limit = { faith = scope:scoped_emperor.faith } + play_music_cue = "mx_cue_epic_sacral_moment" + } + #Otherwise, this is a tacit statement of imperial threat. + else = { play_music_cue = "mx_cue_combat_2" } + } + + option = { + name = { # Regular + trigger = { + NAND = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + NOT = { + has_title = title:e_hre + } + } + text = roman_restoration.0002.a + } + name = { # Regular HRE + trigger = { + NAND = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + has_title = title:e_hre + } + text = roman_restoration.0002.b + } + name = { # Crazy Hellenics + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + NOT = { + has_title = title:e_hre + } + } + text = roman_restoration.0002.c + } + name = { # Crazy Hellenics HRE + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + has_title = title:e_hre + } + text = roman_restoration.0002.d + } + } + option = { + name = roman_restoration.0002.e + fallback = yes + } +} + +################################################## +# Holy Roman Empire for realsies this time. +################################################## + +roman_restoration.0003 = { + type = character_event + title = roman_restoration.0003.t + desc = { + first_valid = { + # Doing it as the Greeks. + triggered_desc = { + trigger = { + root.culture = culture:greek + } + desc = roman_restoration.0003.desc.greeks + } + # Doing it as somebody else. + triggered_desc = { + trigger = { + NOT = { + root.culture = culture:greek + } + } + desc = roman_restoration.0003.desc.other + } + } + desc = roman_restoration.0003.desc + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_honorable + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + save_scope_as = scoped_emperor + create_roman_empire_holy_scripted_effect = yes + } + + option = { + name = roman_restoration.0003.a + set_nickname_effect = { NICKNAME = nick_the_glorious } + # Send narrative fluff to other players (if any). + every_player = { + limit = { + this != root + is_within_diplo_range = { CHARACTER = root } + } + trigger_event = roman_restoration.0004 + } + } +} + +# Players informed of (Holy) Roman Empire being reborn. +roman_restoration.0004 = { + type = character_event + title = roman_restoration.0004.t + desc = { + first_valid = { + # Reaction of the Byzantines (if they are even still around) + triggered_desc = { + trigger = { + OR = { + has_title = title:e_byzantium + any_liege_or_above = { + has_title = title:e_byzantium + } + } + } + desc = roman_restoration.0004.desc.byzantines + } + # Everybody else. + triggered_desc = { + trigger = { + NOR = { + has_title = title:e_byzantium + any_liege_or_above = { + has_title = title:e_byzantium + } + } + } + desc = roman_restoration.0004.desc.others + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_honorable + } + + immediate = { + #Same-faith non-empire tier rulers are over-awed. + if = { + limit = { faith = scope:scoped_emperor.faith } + play_music_cue = "mx_cue_epic_sacral_moment" + } + #Otherwise, this is a tacit statement of imperial threat. + else = { play_music_cue = "mx_cue_combat_2" } + } + + option = { + name = roman_restoration.0004.a + trigger = { + NOT = { + has_title = title:e_byzantium + } + } + } + option = { + name = roman_restoration.0004.b + trigger = { + has_title = title:e_byzantium + } + stress_impact = { + base = medium_stress_impact_gain + } + } +} + +# on_new_holder: New Emperor gets the Augustus Trait. +roman_restoration.0005 = { + type = character_event + title = roman_restoration.0005.t + desc = { + first_valid = { + # Regular Roman Empire + triggered_desc = { + trigger = { + NOT = { + exists = title:h_roman_empire.var:variable_restored_hre + } + } + desc = roman_restoration.0005.desc.regular + } + # Holy Roman Empire + triggered_desc = { + trigger = { + exists = title:h_roman_empire.var:variable_restored_hre + } + desc = roman_restoration.0005.desc.holy + } + } + } + theme = realm + left_portrait = { + character = root + animation = personality_bold + } + + trigger = { + OR = { + scope:title = title:h_roman_empire + scope:title = title:h_eastern_roman_empire + } + NOT = { has_trait = augustus } + } + + immediate = { + if = { + limit = { + scope:previous_holder = { + any_owned_story = { + type = restoring_roman_provinces_story + } + } + } + hidden_effect = { + scope:previous_holder = { + random_owned_story = { + type = restoring_roman_provinces_story + end_story = yes + } + } + create_story = restoring_roman_provinces_story + } + } + + if = { + limit = { scope:previous_holder = { is_alive = yes has_trait = augustus } } + save_scope_as = new_holder + scope:previous_holder = { trigger_event = roman_restoration.0006 } + } + } + + option = { + name = roman_restoration.0005.a + add_trait = augustus + } +} + +# If old holder is still alive, he will lose the trait. +roman_restoration.0006 = { + type = character_event + title = roman_restoration.0006.t + desc = roman_restoration.0006.desc + theme = realm + left_portrait = { + character = root + animation = shame + } + + immediate = { + #This is so sad: Alexios, play dungeonito. + play_music_cue = "mx_cue_prison" + } + + trigger = { + is_alive = yes + has_trait = augustus + } + + option = { + name = roman_restoration.0006.a + remove_trait = augustus + stress_impact = { + base = minor_stress_impact_gain + } + } +} + +################################################## +# Recovering old Provinces. +################################################## + +# All events fired on_yearly pulses, checking for dejure Duchies. +# Mostly just for flavor. + +scripted_trigger roman_restoration_0010_is_valid_roman_empire_trigger = { + is_ai = no + is_roman_emperor_trigger = yes + OR = { + faith.religion = faith:catholic.religion # Either Christian + faith.religion = faith:hellenic_pagan.religion # Or Hellenic + } +} + +# Provincia Syria Palaestina +# Provincia Aegyptus +# Provincia Cyrenaica +# Provincia Africa +# Provincia Illyricum +# Provincia Italia +# Provincia Gallia +# Provincia Germania +# Provincia Britannia +# Provincia Hispania +# Provincia Mauretania +# Provincia Mesopotamia +# Provincia Caledonia +# Provincia Hibernia +# Imperial Borders (all provinces restored) + +# Provincia Syria Palaestina +roman_restoration.0010 = { + type = character_event + title = roman_restoration.0010.t + desc = roman_restoration.0010.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_syria + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_syria_palestina + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_syria + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} + +# Provincia Aegyptus +roman_restoration.0011 = { + type = character_event + title = roman_restoration.0011.t + desc = roman_restoration.0011.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_aegyptus + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_aegyptus + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_aegyptus + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Cyrenaica +roman_restoration.0012 = { + type = character_event + title = roman_restoration.0012.t + desc = roman_restoration.0012.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_cyrenaica + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_cyrenaica + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_cyrenaica + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Africa +roman_restoration.0013 = { + type = character_event + title = roman_restoration.0013.t + desc = roman_restoration.0013.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_africa + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_africa + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_africa + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Illyricum +roman_restoration.0014 = { + type = character_event + title = roman_restoration.0014.t + desc = roman_restoration.0014.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_illyricum + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_illyricum + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_illyricum + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Italia +roman_restoration.0015 = { + type = character_event + title = roman_restoration.0015.t + desc = roman_restoration.0015.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_italia + } + } + NOT = { exists = title:h_roman_empire.var:variable_restored_italy } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = world_europe_south_italy + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_italia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Gallia +roman_restoration.0016 = { + type = character_event + title = roman_restoration.0016.t + desc = roman_restoration.0016.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_gallia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = world_europe_west_francia + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_gallia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Germania +roman_restoration.0017 = { + type = character_event + title = roman_restoration.0017.t + desc = roman_restoration.0017.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_germania + } + } + NOT = { exists = title:h_roman_empire.var:variable_restored_hre } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = world_europe_west_germania + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_germania + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Britannia +roman_restoration.0018 = { + type = character_event + title = roman_restoration.0018.t + desc = roman_restoration.0018.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_britannia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_wales + completely_controls_region = custom_england + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_britannia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Hispania +roman_restoration.0019 = { + type = character_event + title = roman_restoration.0019.t + desc = roman_restoration.0019.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_hispania + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_hispania + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_hispania + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Mauretania +roman_restoration.0020 = { + type = character_event + title = roman_restoration.0020.t + desc = roman_restoration.0020.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_mauretania + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_mauretania + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_mauretania + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Mesopotamia +roman_restoration.0021 = { + type = character_event + title = roman_restoration.0021.t + desc = roman_restoration.0021.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_mesopotamia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_mesopotamia + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_mesopotamia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Caledonia +roman_restoration.0022 = { + type = character_event + title = roman_restoration.0022.t + desc = roman_restoration.0022.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_caledonia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_caledonia + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_caledonia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} +# Provincia Hibernia +roman_restoration.0023 = { + type = character_event + title = roman_restoration.0023.t + desc = roman_restoration.0023.desc + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_hibernia + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_hibernia + } + + immediate = { + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_hibernia + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + } +} + +# Imperial Borders (all provinces restored) +roman_restoration.0024 = { + type = character_event + title = roman_restoration.0024.t + desc = { + desc = roman_restoration.0024.desc.intro + first_valid = { + # Christian Roman Empire + triggered_desc = { + trigger = { + faith.religion = faith:catholic.religion + } + desc = roman_restoration.0024.desc.christian + } + # Hellenic Roman Empire + triggered_desc = { + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0024.desc.hellenic + } + # Fallback Roman Empire + triggered_desc = { + trigger = { + NOR = { + faith.religion = faith:catholic.religion + faith.religion = faith:hellenic_pagan.religion + } + } + desc = roman_restoration.0024.desc.fallback + } + } + } + theme = realm + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + roman_restoration_0010_is_valid_roman_empire_trigger = yes + is_roman_emperor_excluding_byzantium_trigger = yes + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_all + } + } + NOT = { has_character_flag = flag_roman_province_cooldown } + completely_controls_region = custom_roman_full_borders + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + add_to_global_variable_list = { + name = restored_roman_provinces_variable_list + target = flag:flag_re_restored_all + } + hidden_effect = { + add_character_flag = { + flag = flag_roman_province_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0010.a + add_prestige = major_prestige_gain + hidden_effect = { + random_owned_story = { + type = restoring_roman_provinces_story + end_story = yes + } + } + } +} + +################################################## +# Schism events. +################################################## + +roman_restoration.0100 = { + type = character_event + title = roman_restoration.0100.t + desc = { + desc = roman_restoration.0100.desc.intro + first_valid = { + # As an Orthodox + triggered_desc = { + trigger = { + faith = faith:orthodox + } + desc = roman_restoration.0100.desc.orthodox + } + # As a Catholic + triggered_desc = { + trigger = { + faith = faith:catholic + } + desc = roman_restoration.0100.desc.catholic + } + # And Everybody else + triggered_desc = { + trigger = { + NOR = { + faith = faith:catholic + faith = faith:orthodox + } + } + desc = roman_restoration.0100.desc.generic + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + save_scope_as = scoped_emperor + faith = { save_scope_as = mending_faith } + mend_great_schism_scripted_effect = yes + if = { + limit = { + scope:mending_faith = faith:orthodox + } + faith:catholic = { + save_scope_as = loser_faith + } + } + else_if = { + limit = { + scope:mending_faith = faith:catholic + } + faith:orthodox = { + save_scope_as = loser_faith + } + } + else = { + religion = { + random_faith = { + limit = { + exists = religious_head + this != scope:mending_faith + } + save_scope_as = loser_faith + } + } + } + legend_seed_great_deed_faith_effect = { + ANTAGONIST = scope:loser_faith.religious_head + OLD_FAITH = scope:loser_faith + } + } + + option = { + name = roman_restoration.0100.a + } +} + +# Ecumenical followers get chance to convert. +roman_restoration.0101 = { + type = character_event + title = roman_restoration.0100.t + desc = { + desc = roman_restoration.0101.desc.intro + first_valid = { + # As an Orthodox + triggered_desc = { + trigger = { + scope:mending_faith = faith:orthodox + } + desc = roman_restoration.0101.desc.orthodox + } + # As a Catholic + triggered_desc = { + trigger = { + scope:mending_faith = faith:catholic + } + desc = roman_restoration.0101.desc.catholic + } + # And Everybody else + triggered_desc = { + trigger = { + NOR = { + scope:mending_faith = faith:catholic + scope:mending_faith = faith:orthodox + } + } + desc = roman_restoration.0101.desc.generic + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + faith = { save_scope_as = old_faith } + } + + option = { + name = roman_restoration.0101.a + trigger = { + OR = { + is_ai = no + NOT = { has_trait = zealous } # Never! + } + } + set_character_faith = scope:mending_faith + every_held_title = { + title_tier = county + set_county_faith = scope:mending_faith + } + ai_chance = { + base = 80 + modifier = { # Where the wind blows, I sail. + add = 20 + has_trait = cynical + } + } + } + option = { + name = roman_restoration.0101.b + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = 1.0 + } + modifier = { + add = 20 + has_trait = zealous + } + modifier = { + add = 10 + OR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + } + } +} + +# Heretics and Heathens are only notified. +roman_restoration.0102 = { + type = character_event + title = roman_restoration.0100.t + desc = { + desc = roman_restoration.0101.desc.intro + first_valid = { + # As an Orthodox + triggered_desc = { + trigger = { + scope:mending_faith = faith:orthodox + } + desc = roman_restoration.0101.desc.orthodox + } + # As a Catholic + triggered_desc = { + trigger = { + scope:mending_faith = faith:catholic + } + desc = roman_restoration.0101.desc.catholic + } + # And Everybody else + triggered_desc = { + trigger = { + NOR = { + scope:mending_faith = faith:catholic + scope:mending_faith = faith:orthodox + } + } + desc = roman_restoration.0101.desc.generic + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_zealous + } + + immediate = { + #Even if you're not converting, it's still all rather momentous. + play_music_cue = "mx_cue_faith_conversion" + } + + option = { + name = roman_restoration.0102.a + } +} + +# Faithful players notified. +roman_restoration.0103 = { + type = character_event + title = roman_restoration.0100.t + desc = { + desc = roman_restoration.0100.desc.intro + first_valid = { + # As an Orthodox + triggered_desc = { + trigger = { + scope:mending_faith = faith:orthodox + } + desc = roman_restoration.0100.desc.orthodox + } + # As a Catholic + triggered_desc = { + trigger = { + scope:mending_faith = faith:catholic + } + desc = roman_restoration.0100.desc.catholic + } + # And Everybody else + triggered_desc = { + trigger = { + NOR = { + scope:mending_faith = faith:catholic + scope:mending_faith = faith:orthodox + } + } + desc = roman_restoration.0100.desc.generic + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_zealous + } + + immediate = { + #Even if you're not converting, it's still all rather momentous. + play_music_cue = "mx_cue_faith_conversion" + } + + option = { + name = roman_restoration.0100.a + } +} + +################################################## +# Flavor for restoring the Pentarchy as the Orthodox ERE. +################################################## + +# All on_yearly_action pulse. + +# Patriarchate of Antioch +# Patriarchate of Jerusalem +# Patriarchate of Alexandria +# Patriarchate of Rome + +scripted_trigger roman_restoration_0104_is_valid_roman_empire_trigger = { + is_roman_emperor_trigger = yes + faith = faith:orthodox + faith = { has_doctrine = special_doctrine_ecumenical_christian } +} + +# on_new_holder hidden event to check title and conqueror. +roman_restoration.0199 = { + type = character_event + hidden = yes + + trigger = { + OR = { + scope:title = title:c_antiocheia + scope:title = title:c_jerusalem + scope:title = title:c_alexandria + scope:title = title:c_roma + } + OR = { + AND = { + roman_restoration_0104_is_valid_roman_empire_trigger = yes + faith = faith:orthodox + } + any_liege_or_above = { + roman_restoration_0104_is_valid_roman_empire_trigger = yes + faith = faith:orthodox + } + } + } + + immediate = { + if = { + limit = { + any_liege_or_above = { + roman_restoration_0104_is_valid_roman_empire_trigger = yes + faith = faith:orthodox + } + } + random_liege_or_above = { + limit = { + roman_restoration_0104_is_valid_roman_empire_trigger = yes + faith = faith:orthodox + } + trigger_event = { + on_action = on_action_orthodox_pentarchy_pulse + } + } + } + else = { + trigger_event = { + on_action = on_action_orthodox_pentarchy_pulse + } + } + } +} + +# Patriarchate of Antioch +roman_restoration.0104 = { + type = character_event + title = roman_restoration.0104.t + desc = roman_restoration.0104.desc + theme = realm + left_portrait = { + character = root + animation = personality_zealous + } + + trigger = { + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_antioch + } + } + NOT = { has_character_flag = flag_orthodox_patriarchate_cooldown } + roman_restoration_0104_is_valid_roman_empire_trigger = yes + scope:title = title:c_antiocheia + #title:c_antiocheia.holder.faith = root.faith #Not under an infidel vassal. + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + add_to_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_antioch + } + hidden_effect = { + add_character_flag = { + flag = flag_orthodox_patriarchate_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0104.a + add_piety = major_piety_gain + } +} + +# Patriarchate of Jerusalem +roman_restoration.0105 = { + type = character_event + title = roman_restoration.0105.t + desc = roman_restoration.0105.desc + theme = realm + left_portrait = { + character = root + animation = personality_zealous + } + + trigger = { + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_jerusalem + } + } + NOT = { has_character_flag = flag_orthodox_patriarchate_cooldown } + roman_restoration_0104_is_valid_roman_empire_trigger = yes + scope:title = title:c_jerusalem + #title:c_jerusalem.holder.faith = root.faith #Not under an infidel vassal. + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + add_to_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_jerusalem + } + hidden_effect = { + add_character_flag = { + flag = flag_orthodox_patriarchate_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0104.a + add_piety = major_piety_gain + } +} + +# Patriarchate of Alexandria +roman_restoration.0106 = { + type = character_event + title = roman_restoration.0106.t + desc = roman_restoration.0106.desc + theme = realm + left_portrait = { + character = root + animation = personality_zealous + } + + trigger = { + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_alexandria + } + } + NOT = { has_character_flag = flag_orthodox_patriarchate_cooldown } + roman_restoration_0104_is_valid_roman_empire_trigger = yes + scope:title = title:c_alexandria + #title:c_alexandria.holder.faith = root.faith #Not under an infidel vassal. + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + add_to_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_alexandria + } + hidden_effect = { + add_character_flag = { + flag = flag_orthodox_patriarchate_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0104.a + add_piety = major_piety_gain + } +} + +# Patriarchate of Rome +roman_restoration.0107 = { + type = character_event + title = roman_restoration.0107.t + desc = roman_restoration.0107.desc + theme = emperor + left_portrait = { + character = root + animation = personality_zealous + } + + trigger = { + NOT = { # Only happens once. + is_target_in_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_roma + } + } + NOT = { has_character_flag = flag_orthodox_patriarchate_cooldown } + roman_restoration_0104_is_valid_roman_empire_trigger = yes + scope:title = title:c_roma + #title:c_roma.holder.faith = root.faith #Not under an infidel vassal. + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + add_to_global_variable_list = { + name = restored_pentarchy_seants_variable_list + target = flag:flag_re_restored_roma + } + hidden_effect = { + add_character_flag = { + flag = flag_orthodox_patriarchate_cooldown + days = 400 + } + } + } + + option = { + name = roman_restoration.0104.a + add_piety = major_piety_gain + } +} + + + +################################################## +# Imposing Iconoclast Patriarchate +################################################## + +roman_restoration.0120 = { + type = character_event + title = roman_restoration.0120.t + desc = roman_restoration.0120.desc + theme = realm + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + save_scope_as = reformer + if = { # Pick your chaplain first. + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { faith = faith:iconoclast } + } + cp:councillor_court_chaplain = { save_scope_as = new_pope } + } + else = { + hidden_effect = { + create_character = { + employer = root + template = religious_leader_character + random_traits = no + save_scope_as = new_pope + dynasty = generate + } + } + scope:new_pope = { + add_trait = education_learning_3 + add_trait = zealous + add_trait = intellect_good_1 + random_list = { + 1 = { add_trait = lustful } + 1 = { add_trait = chaste } + 1 = { add_trait = wrathful } + 1 = { add_trait = diligent } + 1 = { add_trait = impatient } + 1 = { add_trait = arrogant } + 1 = { add_trait = humble } + 1 = { add_trait = gregarious } + } + random_list = { + 1 = { add_trait = honest } + 1 = { add_trait = ambitious } + 1 = { add_trait = just } + 1 = { add_trait = cynical } + 1 = { add_trait = zealous } + 1 = { add_trait = compassionate } + 1 = { add_trait = stubborn } + } + } + } + create_title_and_vassal_change = { + type = returned + save_scope_as = change + add_claim_on_loss = no + } + title:d_iconoclast = { + change_title_holder = { + holder = scope:new_pope + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + root = { destroy_title = title:k_orthodox } + faith:iconoclast = { + change_fervor = { + value = 15 + desc = fervor_gain_iconoclast_patriarchate + } + if = { + limit = { NOT = { has_doctrine = special_doctrine_ecumenical_christian } } + add_doctrine = special_doctrine_ecumenical_christian + } + } + faith:orthodox = { + change_fervor = { + value = -30 + desc = fervor_loss_iconoclast_patriarchate + } + if = { + limit = { has_doctrine = special_doctrine_ecumenical_christian } + remove_doctrine = special_doctrine_ecumenical_christian + } + } + } + + option = { + name = roman_restoration.0120.a + add_piety = major_piety_gain + every_player = { + limit = { + this != root + faith.religion = faith:orthodox.religion + } + trigger_event = roman_restoration.0121 # Notification. + } + if = { # Vassalize if possible/needed. + limit = { + highest_held_title_tier > scope:new_pope.highest_held_title_tier + NOT = { scope:new_pope = { any_liege_or_above = { this = root } } } + } + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + scope:new_pope = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } +} + +# Christians notified. +roman_restoration.0121 = { + type = character_event + title = roman_restoration.0120.t + desc = { + first_valid = { + # Orthodox Reaction + triggered_desc = { + trigger = { + root.faith = faith:orthodox + } + desc = roman_restoration.0121.desc.orthodox + } + # Iconoclast reaction + triggered_desc = { + trigger = { + root.faith = faith:iconoclast + } + desc = roman_restoration.0121.desc.iconoclast + } + # Every other Christian + triggered_desc = { + trigger = { + NOR = { + root.faith = faith:orthodox + root.faith = faith:iconoclast + } + } + desc = roman_restoration.0121.desc.other + } + } + } + theme = realm + left_portrait = { + character = scope:reformer + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + #Iconoclasts consider this great. + if = { + limit = { root.faith = faith:iconoclast } + play_music_cue = "mx_cue_sacredrite" + } + #Orthodox consider it monstrous. + if = { + limit = { root.faith = faith:orthodox } + play_music_cue = "mx_cue_combat_2" + } + } + + option = { + name = { + trigger = { + root.faith = faith:orthodox + } + text = roman_restoration.0121.a + } + name = { + trigger = { + root.faith = faith:iconoclast + } + text = roman_restoration.0121.b + } + if = { + limit = { + root.faith = faith:orthodox + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + } + option = { + name = roman_restoration.0121.c + fallback = yes + } +} + +################################################## +# Restoring Ecumenical Patriarchate +################################################## + +roman_restoration.0122 = { + type = character_event + title = roman_restoration.0122.t + desc = roman_restoration.0122.desc + theme = realm + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + save_scope_as = reformer + if = { # Pick your chaplain first. + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { faith = faith:orthodox } + } + cp:councillor_court_chaplain = { save_scope_as = new_pope } + } + else = { + hidden_effect = { + create_character = { + employer = root + template = religious_leader_character + random_traits = no + save_scope_as = new_pope + dynasty = generate + } + } + scope:new_pope = { + add_trait = education_learning_3 + add_trait = zealous + add_trait = intellect_good_1 + random_list = { + 1 = { add_trait = lustful } + 1 = { add_trait = chaste } + 1 = { add_trait = wrathful } + 1 = { add_trait = diligent } + 1 = { add_trait = impatient } + 1 = { add_trait = arrogant } + 1 = { add_trait = humble } + 1 = { add_trait = gregarious } + } + random_list = { + 1 = { add_trait = honest } + 1 = { add_trait = ambitious } + 1 = { add_trait = just } + 1 = { add_trait = cynical } + 1 = { add_trait = zealous } + 1 = { add_trait = compassionate } + 1 = { add_trait = stubborn } + } + } + } + create_title_and_vassal_change = { + type = returned + save_scope_as = change + add_claim_on_loss = no + } + title:k_orthodox = { + change_title_holder = { + holder = scope:new_pope + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + root = { destroy_title = title:d_iconoclast } + faith:orthodox = { + change_fervor = { + value = 15 + desc = fervor_gain_ecumenical_patriarchate + } + if = { + limit = { NOT = { has_doctrine = special_doctrine_ecumenical_christian } } + add_doctrine = special_doctrine_ecumenical_christian + } + } + faith:iconoclast = { + change_fervor = { + value = -30 + desc = fervor_loss_ecumenical_patriarchate + } + if = { + limit = { has_doctrine = special_doctrine_ecumenical_christian } + remove_doctrine = special_doctrine_ecumenical_christian + } + } + } + + option = { + name = roman_restoration.0122.a + add_piety = major_piety_gain + every_player = { + limit = { + this != root + faith.religion = faith:orthodox.religion + } + trigger_event = roman_restoration.0123 # Notification. + } + if = { # Vassalize if possible/needed. + limit = { + highest_held_title_tier > scope:new_pope.highest_held_title_tier + NOT = { scope:new_pope = { any_liege_or_above = { this = root } } } + } + create_title_and_vassal_change = { + type = returned + save_scope_as = change + add_claim_on_loss = no + } + scope:new_pope = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } +} + +# Christians notified. +roman_restoration.0123 = { + type = character_event + title = roman_restoration.0122.t + desc = { + first_valid = { + # Orthodox Reaction + triggered_desc = { + trigger = { + root.faith = faith:orthodox + } + desc = roman_restoration.0123.desc.orthodox + } + # Iconoclast reaction + triggered_desc = { + trigger = { + root.faith = faith:iconoclast + } + desc = roman_restoration.0123.desc.iconoclast + } + #Every other Christian + triggered_desc = { + trigger = { + NOR = { + root.faith = faith:orthodox + root.faith = faith:iconoclast + } + } + desc = roman_restoration.0123.desc.other + } + } + } + theme = realm + left_portrait = { + character = scope:reformer + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + #Orthodox consider this great. + if = { + limit = { root.faith = faith:orthodox } + play_music_cue = "mx_cue_sacredrite" + } + #Iconoclasts consider it monstrous. + if = { + limit = { root.faith = faith:iconoclast } + play_music_cue = "mx_cue_combat_2" + } + } + + option = { + name = roman_restoration.0123.a + trigger = { + root.faith = faith:orthodox + } + } + option = { + name = roman_restoration.0123.b + trigger = { + root.faith = faith:iconoclast + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + option = { + name = roman_restoration.0123.c + trigger = { + NOR = { + root.faith = faith:orthodox + root.faith = faith:iconoclast + } + } + } +} + +################################################## +# Restoring Papacy +################################################## + +roman_restoration.0124 = { + type = character_event + title = roman_restoration.0124.t + desc = roman_restoration.0124.desc + theme = realm + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + restore_papacy_scripted_effect = yes + } + + option = { + name = roman_restoration.0124.a + add_piety = major_piety_gain + every_player = { + limit = { + this != root + faith.religion = faith:catholic.religion + } + trigger_event = roman_restoration.0125 # Notification. + } + if = { # Vassalize if possible/needed. + limit = { + highest_held_title_tier > scope:new_pope.highest_held_title_tier + NOT = { scope:new_pope = { any_liege_or_above = { this = root } } } + } + create_title_and_vassal_change = { + type = returned + save_scope_as = change + add_claim_on_loss = no + } + scope:new_pope = { + change_liege = { + liege = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + } +} + +# Christians notified. +roman_restoration.0125 = { + type = character_event + title = roman_restoration.0124.t + desc = { + first_valid = { + # Catholic Reaction + triggered_desc = { + trigger = { + root.faith = faith:catholic + } + desc = roman_restoration.0125.desc.catholic + } + # Every other Christian + triggered_desc = { + trigger = { + NOT = { + root.faith = faith:catholic + } + + } + desc = roman_restoration.0125.desc.other + } + } + } + theme = realm + left_portrait = { + character = scope:reformer + animation = personality_vengeful + } + right_portrait = { + character = scope:new_pope + animation = personality_zealous + } + + immediate = { + #Catholics are happy! + if = { + limit = { faith = faith:catholic } + play_music_cue = "mx_cue_sacredrite" + } + } + + option = { + name = roman_restoration.0125.a + trigger = { + root.faith = faith:catholic + } + } + option = { + name = roman_restoration.0125.b + trigger = { + NOT = { + root.faith = faith:catholic + } + } + } +} + +################################################## +# Destroying the Papacy as a Muslim/Pagan +################################################## + +roman_restoration.0130 = { + type = character_event + title = roman_restoration.0130.t + desc = { + first_valid = { + # Muslim Reaction + triggered_desc = { + trigger = { + root.faith.religion = faith:ashari.religion + } + desc = roman_restoration.0130.desc.muslim + } + # Hellenic Reaction + triggered_desc = { + trigger = { + root.faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0130.desc.hellenic + } + # And the rest + triggered_desc = { + trigger = { + NOR = { + root.faith.religion = faith:ashari.religion + root.faith.religion = faith:hellenic_pagan.religion + } + } + desc = roman_restoration.0130.desc.fallback + } + } + first_valid = { + # No current Pope + triggered_desc = { + trigger = { + NOT = { + exists = scope:scoped_pope + } + } + desc = roman_restoration.0130.desc.no_pope + } + # Current Pope is crucified + triggered_desc = { + trigger = { + root.faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0130.desc.pope.crucifixion + } + # Current Pope is sacrificed + triggered_desc = { + trigger = { + root.faith = { + has_doctrine_parameter = human_sacrifice_active + } + } + desc = roman_restoration.0130.desc.pope.sacrificed + } + # Current Pope converts + desc = roman_restoration.0130.desc.pope.submission + } + } + theme = faith + override_background = { + trigger = { + root.faith = { + OR = { + religion = faith:hellenic_pagan.religion + has_doctrine_parameter = human_sacrifice_active + } + } + } + reference = burning_building + } + left_portrait = { + character = scope:scoped_destroyer + animation = schadenfreude + } + right_portrait = { + character = scope:scoped_pope + animation = fear + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + save_scope_as = scoped_destroyer + if = { + limit = { exists = title:k_papal_state.holder } + title:k_papal_state.holder = { save_scope_as = scoped_pope } + } + faith:catholic = { save_scope_as = catholic } + destroy_papacy_scripted_effect = yes + } + + option = { + name = { + trigger = { + faith.religion = faith:ashari.religion + } + text = roman_restoration.0130.a.a + } + name = { + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + text = roman_restoration.0130.a.b + } + name = { + trigger = { + NOR = { + faith.religion = faith:ashari.religion + faith.religion = faith:hellenic_pagan.religion + } + } + text = roman_restoration.0130.a.c + } + every_player = { + limit = { + this != root + OR = { + faith.religion = faith:catholic.religion + faith.religion = root.faith.religion + } + } + trigger_event = roman_restoration.0131 # Notification. + } + } +} + +# Other players notified. +roman_restoration.0131 = { + type = character_event + title = roman_restoration.0130.t + desc = { + first_valid = { + # Muslim/Pagan Reaction + triggered_desc = { + trigger = { + root.faith.religion = scope:scoped_destroyer.faith.religion + } + desc = roman_restoration.0131.desc.faithful + } + # Christian Reaction + triggered_desc = { + trigger = { + root.faith.religion = faith:catholic.religion + } + desc = roman_restoration.0131.desc.christians + } + # Fallback + triggered_desc = { + trigger = { + NOR = { + root.faith.religion = faith:catholic.religion + root.faith.religion = scope:scoped_destroyer.faith.religion + } + } + desc = roman_restoration.0131.desc.fallback + } + } + } + theme = faith + override_background = { + trigger = { + scope:scoped_destroyer.faith = { + OR = { + religion = faith:hellenic_pagan.religion + has_doctrine_parameter = human_sacrifice_active + } + } + } + reference = burning_building + } + left_portrait = { + character = scope:scoped_destroyer + animation = schadenfreude + } + right_portrait = { + character = scope:scoped_pope + animation = fear + } + + immediate = { play_music_cue = "mx_cue_combat_2" } + + option = { + name = { + trigger = { + faith.religion = scope:scoped_destroyer.faith.religion + } + text = roman_restoration.0131.a.a + } + name = { + trigger = { + faith.religion = faith:catholic.religion + } + text = roman_restoration.0131.a.b + } + name = { + trigger = { + NOR = { + faith.religion = faith:catholic.religion + faith.religion = scope:scoped_destroyer.faith.religion + } + } + text = roman_restoration.0131.a.c + } + if = { + limit = { + root.faith = faith:catholic + NOT = { has_trait = cynical } + } + add_opinion = { + target = scope:scoped_destroyer + modifier = destroyed_papacy_opinion + } + stress_impact = { + base = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } + } +} + +################################################## +# Unifying Italy as Italian. +################################################## +scripted_effect add_innovation_if_missing_effect = { + if = { + limit = { + NOT = { + has_innovation = $INNOVATION$ + } + } + add_innovation = $INNOVATION$ + } +} + + +roman_restoration.0140 = { + type = character_event + title = roman_restoration.0140.t + desc = roman_restoration.0140.desc + theme = realm + left_portrait = { + character = root + animation = personality_greedy + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + save_scope_as = scoped_ruler + # De jure shifts. + hidden_effect = { + title:d_istria = { # Bite Croatia. + set_de_jure_liege_title = title:k_italy + } + title:d_krain = { + set_de_jure_liege_title = title:k_italy + } + title:d_tyrol = { + set_de_jure_liege_title = title:k_italy + } + title:d_carinthia = { + set_de_jure_liege_title = title:k_italy + } + title:k_sicily = { # Then shift all Kingdoms. + set_de_jure_liege_title = title:e_italy + } + title:k_italy = { + set_de_jure_liege_title = title:e_italy + } + title:k_venice = { + set_de_jure_liege_title = title:e_italy + } + title:k_croatia = { + set_de_jure_liege_title = title:e_italy + } + title:k_serbia = { + set_de_jure_liege_title = title:e_italy + } + } + } + option = { + name = roman_restoration.0140.a + add_prestige = major_prestige_gain + + every_culture_global = { + limit = { has_cultural_pillar = heritage_latin } + + add_innovation_if_missing_effect = { INNOVATION = innovation_men_at_arms } + add_innovation_if_missing_effect = { INNOVATION = innovation_pike_columns } + add_innovation_if_missing_effect = { INNOVATION = innovation_guilds } + } + + # Send narrative fluff to other players (if any). + every_player = { + limit = { + this != root + capital_province = { geographical_region = world_europe_west } + } + trigger_event = roman_restoration.0141 + } + hidden_effect = { # Latins chance to convert to French. + every_vassal = { + limit = { + capital_province = { + geographical_region = world_europe_south_italy + } + is_ai = yes + } + random = { + chance = 50 + set_culture_same_as = root + capital_county = { + set_county_culture = root.culture + } + } + } + } + legend_seed_great_deed_region_effect = { + REGION = geographical_region:world_europe_south_italy + } + } +} + +roman_restoration.0141 = { + type = character_event + title = roman_restoration.0140.t + desc = roman_restoration.0141.desc + theme = realm + left_portrait = { + character = scope:scoped_ruler + animation = personality_greedy + } + + immediate = { play_music_cue = "mx_cue_positive_effect" } + + option = { + name = roman_restoration.0141.a + trigger = { + OR = { + has_title = title:e_hre + is_roman_emperor_trigger = yes + } + } + } + + option = { + name = roman_restoration.0141.b + trigger = { + NOR = { + has_title = title:e_hre + is_roman_emperor_trigger = yes + } + } + } +} + +################################################## +# Italian Roman Empire rises +################################################## + +roman_restoration.0150 = { + type = character_event + title = roman_restoration.0150.t + desc = { + desc = roman_restoration.0150.desc # Introduction. + first_valid = { + # Doing it as Christians. + triggered_desc = { + trigger = { + NOT = { + faith.religion = faith:hellenic_pagan.religion + } + } + desc = roman_restoration.0001.desc.christians + } + # Doing it as Hellenics + triggered_desc = { + trigger = { + faith.religion = faith:hellenic_pagan.religion + } + desc = roman_restoration.0001.desc.hellenics + } + desc = roman_restoration.0001.desc.fallback + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_bold + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + save_scope_as = scoped_emperor + create_roman_empire_italy_scripted_effect = yes + } + + option = { + name = roman_restoration.0150.a + set_nickname_effect = { NICKNAME = nick_the_glorious } + # Send narrative fluff to other players (if any). + every_player = { + limit = { + this != root + is_within_diplo_range = { CHARACTER = root } + } + trigger_event = roman_restoration.0151 + } + } +} + +# Players informed of (Italian) Roman Empire being reborn. +roman_restoration.0151 = { + type = character_event + title = roman_restoration.0151.t + desc = { + first_valid = { + # Reaction of the Byzantines (if they are even still around) + triggered_desc = { + trigger = { + OR = { + has_title = title:e_byzantium + any_liege_or_above = { + has_title = title:e_byzantium + } + } + } + desc = roman_restoration.0151.desc.byzantines + } + # Everybody else. + triggered_desc = { + trigger = { + NOR = { + has_title = title:e_byzantium + any_liege_or_above = { + has_title = title:e_byzantium + } + } + } + desc = roman_restoration.0151.desc.others + } + first_valid = { + # Regular. + triggered_desc = { + trigger = { + NOT = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + } + desc = roman_restoration.0002.desc.christians + } + # Christians freaking out. + triggered_desc = { + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + desc = roman_restoration.0002.desc.hellenics + } + } + } + } + theme = realm + left_portrait = { + character = scope:scoped_emperor + animation = personality_bold + } + + option = { # Regular + name = roman_restoration.0002.a + trigger = { + NOT = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + NOR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + } + option = { # Regular vs Byzantium/HRE + name = roman_restoration.0002.b + trigger = { + NOT = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + } + OR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + } + option = { # Crazy Hellenics + name = roman_restoration.0002.c + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + NOR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + } + option = { # Crazy Hellenics vs Byzantium/HRE + name = roman_restoration.0002.d + trigger = { + scope:scoped_emperor = { faith.religion = faith:hellenic_pagan.religion } + faith.religion = faith:catholic.religion + OR = { + has_title = title:e_byzantium + has_title = title:e_hre + } + } + stress_impact = { + zealous = minor_stress_impact_gain + } + } +} + +################################################## +# Byzantium/Roman Empire challenges HRE. +################################################## + +roman_restoration.0160 = { + type = character_event + title = roman_restoration.0160.t + desc = roman_restoration.0160.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = anger + } + right_portrait = { + character = scope:hre_emperor + animation = disgust + } + + immediate = { + play_music_cue = "mx_cue_combat_2" + save_scope_as = byz_emperor + title:e_hre.holder = { + save_scope_as = hre_emperor + trigger_event = roman_restoration.0161 + } + hidden_effect = { + add_character_flag = { + flag = flag_emperor_challenging_hre + } + } + } + option = { + name = roman_restoration.0160.a + start_war = { + casus_belli = dismantle_holy_pretender_cb + target = title:e_hre.holder + } + } +} + +# HRE notified. +roman_restoration.0161 = { + type = character_event + title = roman_restoration.0161.t + desc = roman_restoration.0161.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = disgust + } + right_portrait = { + character = scope:hre_emperor + animation = anger + } + + immediate = { play_music_cue = "mx_cue_combat_2" } + + option = { + name = roman_restoration.0161.a + } +} + +# War is over: +# Byz is victorious. Byz notified. +roman_restoration.0162 = { + type = character_event + title = roman_restoration.0162.t + desc = roman_restoration.0162.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = schadenfreude + } + right_portrait = { + character = scope:hre_emperor + animation = grief + } + + immediate = { play_music_cue = "mx_cue_epic_sacral_moment" } + + option = { + name = roman_restoration.0162.a + } +} + +# Byz is victorious. HRE notified. +roman_restoration.0163 = { + type = character_event + title = roman_restoration.0163.t + desc = roman_restoration.0163.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = schadenfreude + } + right_portrait = { + character = scope:hre_emperor + animation = grief + } + + immediate = { play_music_cue = "mx_cue_stress" } + + option = { + name = roman_restoration.0163.a + stress_impact = { + base = minor_stress_impact_gain + } + } +} + +# Byz is defeated. Byz notified. +roman_restoration.0164 = { + type = character_event + title = roman_restoration.0164.t + desc = roman_restoration.0164.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = grief + } + right_portrait = { + character = scope:hre_emperor + animation = schadenfreude + } + + immediate = { play_music_cue = "mx_cue_stress" } + + option = { + name = roman_restoration.0164.a + stress_impact = { + base = medium_stress_impact_gain + } + } +} + +# Byz is defeated. HRE notified. +roman_restoration.0165 = { + type = character_event + title = roman_restoration.0165.t + desc = roman_restoration.0165.desc + theme = war + left_portrait = { + character = scope:byz_emperor + animation = grief + } + right_portrait = { + character = scope:hre_emperor + animation = schadenfreude + } + + immediate = { play_music_cue = "mx_cue_epic_sacral_moment" } + + option = { + name = roman_restoration.0165.a + } +} + +################################################## +# Byzantium/Roman Empire challenges HRE. +################################################## + +roman_restoration.0170 = { + type = character_event + title = roman_restoration.0170.t + desc = roman_restoration.0170.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = anger + } + right_portrait = { + character = scope:byz_emperor + animation = disgust + } + + immediate = { + play_music_cue = "mx_cue_combat_2" + save_scope_as = hre_emperor + title:e_byzantium.holder = { + save_scope_as = byz_emperor + trigger_event = roman_restoration.0171 + } + hidden_effect = { + add_character_flag = { + flag = flag_emperor_challenging_byz + } + } + } + option = { + name = roman_restoration.0170.a + start_war = { + casus_belli = dismantle_byz_pretender_cb + target = title:e_byzantium.holder + } + } +} + +# HRE notified. +roman_restoration.0171 = { + type = character_event + title = roman_restoration.0171.t + desc = roman_restoration.0171.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = disgust + } + right_portrait = { + character = scope:byz_emperor + animation = anger + } + + immediate = { play_music_cue = "mx_cue_combat_2" } + + option = { + name = roman_restoration.0171.a + } +} + +# War is over: +# HRE is victorious. HRE notified. +roman_restoration.0172 = { + type = character_event + title = roman_restoration.0172.t + desc = roman_restoration.0172.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = schadenfreude + } + right_portrait = { + character = scope:byz_emperor + animation = grief + } + + immediate = { play_music_cue = "mx_cue_epic_sacral_moment" } + + option = { + name = roman_restoration.0172.a + } +} + +# HRE is victorious. Byz notified. +roman_restoration.0173 = { + type = character_event + title = roman_restoration.0173.t + desc = roman_restoration.0173.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = schadenfreude + } + right_portrait = { + character = scope:byz_emperor + animation = grief + } + + immediate = { play_music_cue = "mx_cue_stress" } + + option = { + name = roman_restoration.0173.a + stress_impact = { + base = minor_stress_impact_gain + } + } +} + +# Byz is defeated. HRE notified. +roman_restoration.0174 = { + type = character_event + title = roman_restoration.0174.t + desc = roman_restoration.0174.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = grief + } + right_portrait = { + character = scope:byz_emperor + animation = schadenfreude + } + + immediate = { play_music_cue = "mx_cue_stress" } + + option = { + name = roman_restoration.0174.a + stress_impact = { + base = medium_stress_impact_gain + } + } +} + +# HRE is defeated. Byz notified. +roman_restoration.0175 = { + type = character_event + title = roman_restoration.0175.t + desc = roman_restoration.0175.desc + theme = war + left_portrait = { + character = scope:hre_emperor + animation = grief + } + right_portrait = { + character = scope:byz_emperor + animation = schadenfreude + } + + immediate = { play_music_cue = "mx_cue_epic_sacral_moment" } + + option = { + name = roman_restoration.0175.a + } +} + +############################ +# Byz Emp reclaims Constantinople +# by Joe Parkin +############################ + +roman_restoration.1200 = { + type = character_event + title = roman_restoration.1200.t + desc = roman_restoration.1200.desc + theme = realm + left_portrait = { + character = root + animation = personality_bold + } + override_background = { reference = ep3_constantinople } + override_effect_2d = legend_glow + + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + is_roman_emperor_trigger = yes + scope:county = { + # Constantinople only + this = title:c_byzantion + previous_holder = { + NOR = { + root.primary_title.previous_holder ?= this + root.top_liege.primary_title.previous_holder ?= this + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + add_prestige = major_prestige_gain + if = { + limit = { + culture = { has_cultural_parameter = holds_triumphs } + } + custom_tooltip = { + text = free_triumph_tooltip + add_character_flag = free_triumph_flag + } + } + if = { + limit = { + culture = { has_cultural_parameter = hosts_chariot_races } + } + custom_tooltip = { + text = half_price_chariot_race_tooltip + add_character_flag = half_price_chariot_race_flag + } + } + } + + option = { + name = roman_restoration.1200.a + trigger = { + NOT = { capital_county = title:c_byzantion } + } + if = { + limit = { government_allows = administrative } + change_influence = medium_influence_gain + } + add_legitimacy = minor_legitimacy_gain + set_realm_capital = title:c_byzantion + } + + option = { + name = { + text = roman_restoration.1200.b.rome + trigger = { + is_roman_emperor_excluding_byzantium_trigger = yes + } + } + name = { + text = roman_restoration.1200.b + trigger = { + is_roman_emperor_excluding_byzantium_trigger = no + } + } + } +} + +################################################# +# Byz Emp reclaims Constantinople from you (you wretched boy!) by Isabella Welch +################################################# + +roman_restoration.1204 = { + type = letter_event + opening = roman_restoration.1204.t + sender = scope:byz_emp + desc = roman_restoration.1204.desc_vassal + + trigger = { + + } + + immediate = { + title:e_byzantium.holder = { + save_scope_as = byz_emp + } + } + + option = { + name = roman_restoration.1204.a + scope:byz_emp = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 30 + } + } + } + + option = { + name = roman_restoration.1204.b + scope:byz_emp = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -30 + } + } + } +} +# ^I have no idea if Isabeau chose this ID on purpose but it's bloody hilarious. + +################################################## +# Byzantium is Booted out of Sicily +# by Ewan Cowhig Croft +# 1211 - 1220 +################################################## + +scripted_trigger roman_restoration_1211_ai_choice_trigger = { + OR = { + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_berber } + religion = religion:islam_religion + capital_county.title_province = { geographical_region = world_africa_north } + } +} + +scripted_effect roman_restoration_1211_piss_off_big_e_effect = { + add_opinion = { + target = scope:taker + modifier = outraged_opinion + opinion = -80 + } + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:taker } + } + set_relation_potential_rival = scope:taker + } +} + +# Scope:taker chooses where their allegiances lie. +roman_restoration.1211 = { + type = character_event + title = roman_restoration.1211.t + desc = { + desc = roman_restoration.1211.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:emperor } + desc = roman_restoration.1211.desc.body.emperor_exists + } + desc = roman_restoration.1211.desc.body.emperor_absent + } + desc = roman_restoration.1211.desc.outro + } + theme = realm + left_portrait = { + character = scope:taker + animation = marshal + } + right_portrait = { + character = scope:emperor + animation = rage + } + immediate = { + add_prestige_experience = rebuke_roman_revanchism_sicily_fame_reward_value + # Try to grab the emperor. + title:e_byzantium.holder ?= { + save_scope_as = emperor + # And piss them off. + roman_restoration_1211_piss_off_big_e_effect = yes + } + } + + # We belong with Italy, forever. + option = { + name = roman_restoration.1211.a + + title:k_sicily = { set_de_jure_liege_title = title:e_italy } + save_scope_value_as = { + name = new_empire + value = flag:italia + } + + # No stress here. + ai_chance = { + base = 0 + # Anyone who isn't strongly affiliated to North Africa prefers Italy. + modifier = { + add = 1 + roman_restoration_1211_ai_choice_trigger = no + } + } + } + + # Sicily's destiny lies, as it always has, across the sea. + option = { + name = roman_restoration.1211.b + + title:k_sicily = { set_de_jure_liege_title = title:e_maghreb } + save_scope_value_as = { + name = new_empire + value = flag:maghreb + } + + # No stress here. + ai_chance = { + base = 0 + # Berbers, Arabs, Muslims, and folks with their capital in North Africa prefer the Maghreb. + modifier = { + add = 1 + roman_restoration_1211_ai_choice_trigger = yes + } + } + } + + # Why, with _me_ of course! + option = { + name = roman_restoration.1211.c + trigger = { rebuke_roman_revanchism_sicily_controls_unlisted_empire_trigger = yes } + show_as_unavailable = { always = yes } + + title:k_sicily = { set_de_jure_liege_title = root.primary_title } + save_scope_value_as = { + name = new_empire + value = flag:own + } + + # No stress here. + # If the AI can take this, then they probably should. + ai_chance = { base = 1000 } + } + + after = { + # If we've got one, inform the emperor. + scope:emperor = { trigger_event = roman_restoration.1212 } + # Then inform every player in Sicily. + every_player = { + limit = { + any_held_title = { + title_tier = county + title_province = { geographical_region = custom_sicily } + } + } + trigger_event = roman_restoration.1213 + } + } +} + +# Scope:emperor is informed. +roman_restoration.1212 = { + type = character_event + title = roman_restoration.1212.t + desc = { + desc = roman_restoration.1212.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:new_empire = flag:italia } + desc = roman_restoration.1212.desc.new_empire.italia + } + triggered_desc = { + trigger = { scope:new_empire = flag:maghreb } + desc = roman_restoration.1212.desc.new_empire.maghreb + } + triggered_desc = { + trigger = { scope:new_empire = flag:own } + desc = roman_restoration.1212.desc.new_empire.own + } + } + first_valid = { + triggered_desc = { + trigger = { + any_county_in_region = { + region = custom_sicily + rebuke_roman_revanchism_counties_controlled_by_ere_trigger = yes + } + } + desc = roman_restoration.1212.desc.outro.territory_left + } + desc = roman_restoration.1212.desc.outro.no_territory_left + } + } + theme = realm + left_portrait = { + character = scope:emperor + animation = rage + } + right_portrait = { + character = scope:taker + animation = marshal + } + + immediate = { + show_as_tooltip = { roman_restoration_1211_piss_off_big_e_effect = yes } + # Mark us as not needing a second notification if we've got any land left. + add_character_flag = { + flag = informed_about_sicily_flag + days = 7 + } + } + + # That presumptuous lout! + option = { + name = roman_restoration.1212.a + + # No stress, no AI. + } +} + +# Scope:emperor is informed. +roman_restoration.1213 = { + type = character_event + title = roman_restoration.1213.t + desc = { + desc = roman_restoration.1213.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:new_empire = flag:italia } + desc = roman_restoration.1213.desc.new_empire.italia + } + triggered_desc = { + trigger = { scope:new_empire = flag:maghreb } + desc = roman_restoration.1213.desc.new_empire.maghreb + } + triggered_desc = { + trigger = { scope:new_empire = flag:own } + desc = roman_restoration.1213.desc.new_empire.own + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:emperor } + desc = roman_restoration.1213.desc.body.emperor_exists + } + desc = roman_restoration.1213.desc.body.emperor_absent + } + first_valid = { + triggered_desc = { + trigger = { + any_county_in_region = { + region = custom_sicily + rebuke_roman_revanchism_counties_controlled_by_ere_trigger = yes + } + } + desc = roman_restoration.1213.desc.outro.territory_left + } + desc = roman_restoration.1213.desc.outro.no_territory_left + } + } + theme = realm + left_portrait = { + character = scope:taker + animation = marshal + } + right_portrait = { + character = scope:emperor + animation = rage + } + + trigger = { + NOR = { + has_character_flag = informed_about_sicily_flag + this = scope:taker + } + } + + # Good riddance! + option = { + name = roman_restoration.1213.a + + # No stress, no AI. + } + + # What dark times we live in... + option = { + name = roman_restoration.1213.b + + # No stress, no AI. + } +} diff --git a/N3OW/events/dlc/ach/ach_coronation_events.txt b/N3OW/events/dlc/ach/ach_coronation_events.txt new file mode 100644 index 00000000..4aaa5aae --- /dev/null +++ b/N3OW/events/dlc/ach/ach_coronation_events.txt @@ -0,0 +1,9640 @@ +# Events for the Coronation activity +namespace = ach_coronation + +################################################################################################################################ +## Coronation Activity System Events +## 0000-0010 +## by Jay Zaborowski +################################ +# ach_coronation.0001 - Enter passive state - you arrived, establish the mood +# ach_coronation.0010 - The HoF arrives + +###################### +# Enter passive state - you arrived, establish the mood +# 0001 +ach_coronation.0001 = { + type = activity_event + title = ach_coronation.0001.t + desc = { + # Opening + first_valid = { + triggered_desc = { + trigger = { location = this.capital_province } + desc = ach_coronation.0001.notravel + } + desc = ach_coronation.0001.travel + } + + # Intro + first_valid = { + # You are the Host + triggered_desc = { + trigger = { this = scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { primary_title = title:e_hre } + this = scope:host + } + desc = ach_coronation.0001.intro.hre_host + } + triggered_desc = { + trigger = { + scope:host = { primary_title = title:e_byzantium } + this = scope:host + } + desc = ach_coronation.0001.intro.byzantine_host + } + triggered_desc = { + trigger = { + this = scope:host + location = this.capital_province + } + desc = ach_coronation.0001.intro.notravel_host + } + desc = ach_coronation.0001.intro.host + } + } + } + # You are a Guest + triggered_desc = { + trigger = { this != scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:host = { primary_title = title:e_hre } + } + desc = ach_coronation.0001.intro.hre + } + triggered_desc = { + trigger = { + scope:host = { primary_title = title:e_byzantium } + } + desc = ach_coronation.0001.intro.byzantine + } + } + } + } + } + + # Ending + first_valid = { + # Host - Eccentric (so that it matches the rest of the loc) + triggered_desc = { + trigger = { + this = scope:host + has_trait = eccentric + } + desc = ach_coronation.0001.ending.host_eccentric + } + # Host + triggered_desc = { + trigger = { this = scope:host } + desc = { + random_valid = { + triggered_desc = { + trigger = { + has_trait = cynical + OR = { + scope:priest ?= { is_important_hof_trigger = yes } + faith = { has_doctrine_parameter = theocratic_coronation } # To give something to complain about + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:priest ?= { is_important_hof_trigger = yes } } + desc = ach_coronation.0001.ending.host_cynical_hof + } + triggered_desc = { + trigger = { faith = { has_doctrine_parameter = theocratic_coronation } } + desc = ach_coronation.0001.ending.host_cynical + } + } + } + } + triggered_desc = { + trigger = { has_trait = impatient } + desc = ach_coronation.0001.ending.host_impatient + } + triggered_desc = { + trigger = { has_trait = just } + desc = ach_coronation.0001.ending.host_just + } + triggered_desc = { + trigger = { has_trait = ambitious } + desc = ach_coronation.0001.ending.host_ambitious + } + triggered_desc = { + trigger = { has_trait = compassionate } + desc = ach_coronation.0001.ending.host_compassionate + } + triggered_desc = { + trigger = { has_trait = trusting } + desc = ach_coronation.0001.ending.host_trusting + } + triggered_desc = { + trigger = { has_trait = paranoid } + desc = ach_coronation.0001.ending.host_paranoid + } + triggered_desc = { + trigger = { has_trait = zealous } + desc = ach_coronation.0001.ending.host_zealous + } + triggered_desc = { + trigger = { has_trait = content } + desc = ach_coronation.0001.ending.host_content + } + triggered_desc = { + trigger = { has_trait = gregarious } + desc = ach_coronation.0001.ending.host_gregarious + } + triggered_desc = { + trigger = { has_trait = craven } + desc = ach_coronation.0001.ending.host_craven + } + triggered_desc = { + trigger = { has_trait = shy } + desc = ach_coronation.0001.ending.host_shy + } + triggered_desc = { + trigger = { has_trait = arrogant } + desc = ach_coronation.0001.ending.host_arrogant + } + triggered_desc = { + trigger = { + OR = { + has_trait = calm + has_trait = lazy + } + } + desc = ach_coronation.0001.ending.host_calm + } + triggered_desc = { + trigger = { has_trait = gluttonous } + desc = ach_coronation.0001.ending.host_gluttonous + } + triggered_desc = { + trigger = { has_trait = arbitrary } + desc = ach_coronation.0001.ending.host_arbitrary + } + desc = ach_coronation.0001.ending.host_neutral + } + } + } + # Guest + triggered_desc = { + trigger = { this != scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:host = { has_any_bad_relationship_with_character_trigger = { CHARACTER = root } } } + desc = ach_coronation.0001.ending.hostile_host + } + triggered_desc = { + trigger = { scope:host = { has_any_good_relationship_with_character_trigger = { CHARACTER = root } } } + desc = ach_coronation.0001.ending.friendly_host + } + desc = ach_coronation.0001.ending.neutral_host + } + } + } + } + } + + center_portrait = { + character = scope:host + animation = idle + camera = camera_center_large + } + + lower_left_portrait = { + character = root + trigger = { this != scope:host } + } + lower_center_portrait = { + character = scope:priest + trigger = { + this != scope:host + scope:host.involved_activity ?= { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + } + } + + theme = coronation_activity + + override_background = { + reference = throne_room + } + + immediate = { + play_music_cue = mx_cue_majesty + involved_activity = { + activity_host = { save_scope_as = host } + var:officiator ?= { save_scope_as = priest } + if = { + limit = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + scope:host.faith.religious_head = { save_scope_as = priest } + } + } + # Send out the papal fanfare + if = { + limit = { + # Is the host's religious head + scope:host.faith.religious_head ?= this + # The HoF actually matters for the ceremony + scope:activity = { + has_activity_option = { + category = special_type + option = coronation_type_anointment + } + } + #HoF doesn't own or live there + scope:activity.activity_location.county = { + OR = { + holder = scope:host + holder = { + any_liege_or_above = { + this = scope:host + } + } + } + NOR = { + holder = scope:priest + holder = { + any_liege_or_above = { + this = scope:priest + } + } + } + } + #tricksy patriarch + trigger_if = { + limit = { + scope:priest = { + is_landed = no + liege ?= scope:host + } + } + NOT = { + scope:activity.activity_location.county = scope:host.capital_county + } + } + } + save_scope_as = hof + coronation_hof_visit_effect = yes + involved_activity = { + every_attending_character = { + limit = { + OR = { + # Only bother for player's and the Host + is_ai = no + this = scope:host + # And anyone who might want to beg the pope for pardon + has_trait = excommunicated + } + } + trigger_event = ach_coronation.0010 + } + } + } + scope:host = { + if = { + limit = { + any_targeting_faction = { + count > 1 + } + any_targeting_faction = { + OR = { + faction_power >= 200 + discontent_per_month > 0 + trigger_if = { + limit = { + discontent_per_month > 0 + } + months_until_max_discontent <= 8 + } + AND = { + OR = { + faction_is_type = nation_fracturing_faction + faction_is_type = claimant_faction + } + faction_power >= 100 + } + } + } + } + custom_tooltip = magnificence_badly_reduced_by_factions_tt + } + else_if = { + limit = { + any_targeting_faction = { + count = 1 + } + any_targeting_faction = { + OR = { + faction_power >= 200 + discontent_per_month > 0 + trigger_if = { + limit = { + discontent_per_month > 0 + } + months_until_max_discontent <= 8 + } + AND = { + OR = { + faction_is_type = nation_fracturing_faction + faction_is_type = claimant_faction + } + faction_power >= 100 + } + } + } + } + custom_tooltip = magnificence_badly_reduced_by_faction_tt + } + else_if = { + limit = { + any_targeting_faction = { + count > 1 + } + } + custom_tooltip = magnificence_reduced_by_factions_tt + } + else_if = { + limit = { + any_targeting_faction = { + count = 1 + } + } + custom_tooltip = magnificence_reduced_by_faction_tt + } + } + if = { + limit = { + this = scope:host + involved_activity = { var:activity_special_type_progression >= 50 } + } + scope:host.dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + } + else_if = { + limit = { + this = scope:host + involved_activity = { var:activity_special_type_progression >= 25 } + } + scope:host.dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + } + } + + option = { + name = { + trigger = { + NOT = { this = scope:host } + opinion = { + target = scope:host + value < 0 + } + } + text = ach_coronation.0001.a.bad + } + name = { + trigger = { + NOT = { this = scope:host } + opinion = { + target = scope:host + value >= 0 + } + } + text = ach_coronation.0001.a.good + } + name = { + trigger = { + this = scope:host + has_trait = eccentric + } + text = ach_coronation.0001.a.eccentric + } + name = { + trigger = { + this = scope:host + NOT = { has_trait = eccentric } + } + text = ach_coronation.0001.a + } + } +} + +###################### +# The HoF Arrives +# 0010 +scripted_trigger ach_coronation_0010_appropriate_hof_follower = { + # Find a clergy member of the hof's religion + faith.religion = scope:hof.faith.religion + this != scope:hof + this != scope:host + this != scope:greeter + # Who isn't the player + is_physically_able_ai = yes +} + +scripted_trigger ach_coronation_0010_friendly_hof_and_host = { + scope:host = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:hof } + reverse_opinion = { + target = scope:hof + value > medium_positive_opinion + } + } + } +} + +scripted_trigger ach_coronation_0010_hostile_hof_and_host = { + OR = { + scope:host = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:hof } } + reverse_opinion = { + target = scope:hof + value < medium_negative_opinion + } + } +} + +scripted_effect ach_coronation_0010_choose_greeters = { + # Barons are underutilized and it is *their* city, and the Host is probably busy, so they get to meet the HoF + if = { + limit = { scope:coronation_site.barony.holder != scope:host } + scope:coronation_site.barony.holder = { save_scope_as = greeter } + } + # If the host owns the province we still want the world to feel lively, try the local count instead + else_if = { + limit = { scope:coronation_site.barony.county.holder != scope:host } + scope:coronation_site.barony.holder = { save_scope_as = greeter } + } + # If all else fails, the Host gets to be the greeter + else = { + limit = { scope:host.location = scope:coronation_site } + scope:host = { save_scope_as = greeter } + } + + if = { + limit = { + # Grab the greeter's court chaplain if they exist + exists = scope:greeter.cp:councillor_court_chaplain + # Make sure it isn't the player + scope:greeter.cp:councillor_court_chaplain = { is_physically_able_ai = yes } + } + scope:greeter.cp:councillor_court_chaplain = { save_scope_as = greeter_2 } + } + else = { + involved_activity = { + ordered_attending_character = { + # Grab the most zealous priest of the hof's religion at the activity + limit = { + ach_coronation_0010_appropriate_hof_follower = yes + is_clergy = yes + } + # Or any valid follower of their religion + alternative_limit = { + ach_coronation_0010_appropriate_hof_follower = yes + } + # Fallback + alternative_limit = { + this != scope:host + this != scope:hof + this != scope:greeter + } + order_by = ai_zeal + save_scope_as = greeter_2 + } + } + } +} + +ach_coronation.0010 = { + type = activity_event + title = ach_coronation.0010.t + desc = { # Should have a lot of variety for different pope-analities + desc = ach_coronation.0010.desc.desc_opening + first_valid = { + triggered_desc = { + trigger = { this = scope:greeter } + desc = ach_coronation.0010.desc.desc_greeting.first_person + } + triggered_desc = { + trigger = { this = scope:host } + desc = ach_coronation.0010.desc.desc_greeting.host + } + desc = ach_coronation.0010.desc.desc_greeting.baron + } + random_valid = { + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = generous + has_trait = profligate + ai_greed < medium_negative_greed + } + } + } + desc = ach_coronation.0010.desc.desc_first.generous + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = greedy + has_trait = avaricious + ai_greed > medium_positive_greed + } + } + } + desc = ach_coronation.0010.desc.desc_first.greedy + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = compassionate + ai_compassion > medium_positive_compassion + } + } + } + desc = ach_coronation.0010.desc.desc_first.compassionate + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = cynical + ai_zeal < medium_negative_zeal + } + } + } + desc = ach_coronation.0010.desc.desc_first.cynical + } + desc = ach_coronation.0010.desc.desc_first + } + random_valid = { + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = zealous + ai_zeal > medium_positive_zeal + } + } + } + desc = ach_coronation.0010.desc.desc_second.zealous + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = wrathful + has_trait = irritable + has_trait = vengeful + ai_vengefulness > medium_positive_vengefulness + } + } + } + desc = ach_coronation.0010.desc.desc_second.wrathful + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = lustful + has_trait = rakish + is_incestuous_trigger = yes + is_deviant_trigger = yes + } + } + } + desc = ach_coronation.0010.desc.desc_second.lustful + } + triggered_desc = { + trigger = { + scope:hof = { has_trait = gluttonous } + } + desc = ach_coronation.0010.desc.desc_second.gluttonous + } + triggered_desc = { + trigger = { + scope:hof = { + OR = { + has_trait = giant + has_trait = strong + has_trait = physique_good_3 + has_trait = physique_good_2 + } + } + } + desc = ach_coronation.0010.desc.desc_second.strong + } + desc = ach_coronation.0010.desc.desc_second + } + first_valid = { + # Universal + triggered_desc = { + trigger = { scope:hof.faith = { fervor <= 30 } } + desc = ach_coronation.0010.desc.desc_ending.low_fervor + } + # Host + triggered_desc = { + trigger = { this = scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { has_trait = excommunicated } + desc = ach_coronation.0010.desc.desc_ending.excommunicated_first_person + } + triggered_desc = { + trigger = { + ach_coronation_0010_friendly_hof_and_host = yes + scope:hof = { + opinion = { + target = root + value >= high_positive_opinion + } + } + } + desc = ach_coronation.0010.desc.desc_ending.opinion_very_good_first_person + } + triggered_desc = { + trigger = { ach_coronation_0010_friendly_hof_and_host = yes } + desc = ach_coronation.0010.desc.desc_ending.opinion_good_first_person + } + triggered_desc = { + trigger = { ach_coronation_0010_hostile_hof_and_host = yes } + desc = ach_coronation.0010.desc.desc_ending.opinion_bad_first_person + } + desc = ach_coronation.0010.desc.desc_ending.neutral_first_person + } + } + } + # Guest + triggered_desc = { + trigger = { this != scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:host = { has_trait = excommunicated } } + desc = ach_coronation.0010.desc.desc_ending.excommunicated + } + triggered_desc = { + trigger = { + ach_coronation_0010_friendly_hof_and_host = yes + scope:hof = { + opinion = { + target = scope:host + value >= high_positive_opinion + } + } + } + desc = ach_coronation.0010.desc.desc_ending.opinion_very_good + } + triggered_desc = { + trigger = { ach_coronation_0010_friendly_hof_and_host = yes } + desc = ach_coronation.0010.desc.desc_ending.opinion_good + } + triggered_desc = { + trigger = { ach_coronation_0010_hostile_hof_and_host = yes } + desc = ach_coronation.0010.desc.desc_ending.opinion_bad + } + desc = ach_coronation.0010.desc.desc_ending.neutral + } + } + } + } + } + + left_portrait = { + character = scope:greeter_2 + animation = horse_conversing_right + camera = camera_event_horse_left_facing_left_far + } + + center_portrait = { + character = scope:greeter + animation = horse_conversing_left + camera = camera_event_horse_left_facing_left_very_far + } + + right_portrait = { + character = scope:hof + # Are they the type to wave at peasants? + triggered_animation = { + trigger = { ai_compassion >= medium_positive_compassion } + animation = jockey_wave + } + triggered_animation = { + trigger = { always = yes } + animation = jockey_idle + } + camera = camera_event_horse_right_facing_left_close + } + + theme = coronation_activity + + override_background = { + reference = market + } + override_effect_2d = { + reference = legend_glow + } + + # Horse and crowd noises instead of normal activity ones + override_sound = { reference = "event:/DLC/EP3/SFX/Events/Event_Moments/ep3_evn_eventmoment_chariot_race_pivotal_moment" } + + immediate = { + # Make it sound momentous + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Tournaments/ep2_event_grand_tournament_win" + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_hold_triumph" + + involved_activity.var:officiator ?= { save_scope_as = hof } + scope:hof.location = { save_scope_as = coronation_site } + + hidden_effect = { ach_coronation_0010_choose_greeters = yes } + show_as_tooltip = { coronation_hof_visit_effect = yes } + } + + option = { # Beg him to unexcommunicate you + name = ach_coronation.0010.a + trigger = { + has_trait = excommunicated + faith.religious_head = scope:hof + # Not getting off so easy + this != scope:host + } + trait = excommunicated + + duel = { + skill = diplomacy + target = scope:hof + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # I got a soft spot and not much hate in my heart + add = 20 + scope:hof = { + ai_compassion >= high_positive_compassion + opinion = { + value >= low_negative_opinion + target = root + } + } + } + modifier = { + add = 5 + scope:hof = { has_trait = generous } + } + modifier = { + factor = 2 + scope:hof = { has_trait = forgiving } + } + modifier = { + factor = 0.5 + scope:hof = { has_trait = vengeful } + } + min = 5 + desc = ach_coronation.0010.a.tt.success + send_interface_toast = { + title = ach_coronation.0010.a.tt.success + left_icon = scope:hof + remove_trait = excommunicated + stress_impact = { + base = major_stress_loss + arrogant = minor_stress_loss + zealous = major_stress_loss + } + hidden_effect = { + add_opinion = { + target = scope:hof + modifier = grateful_opinion + opinion = 30 + } + } + } + + } + 50 = { # They ignore you + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 5 + has_trait = arrogant + } + opinion_modifier = { + who = scope:hof + opinion_target = scope:host + multiplier = 0.5 + } + min = 5 + desc = ach_coronation.0010.a.tt.failure + send_interface_toast = { + title = ach_coronation.0010.a.tt.failure + left_icon = scope:hof + add_prestige = minor_prestige_loss + if = { + limit = { is_ai = yes } + } + stress_impact = { + base = minor_stress_gain + shy = minor_stress_loss # Honestly? Thank HighGod + } + } + } + 20 = { # They're offended you even asked + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 20 + OR = { + has_trait = shy + has_trait = reclusive + } + } + modifier = { + add = 5 + has_trait = impatient + } + opinion_modifier = { + who = scope:hof + opinion_target = root + multiplier = -1 + } + modifier = { + factor = 1.5 + has_trait = wrathful + } + min = 5 + desc = ach_coronation.0010.a.tt.anger + send_interface_toast = { + title = ach_coronation.0010.a.tt.anger + left_icon = scope:hof + reverse_add_opinion = { + target = scope:hof + modifier = annoyed_opinion + opinion = -30 + } + add_prestige = minor_prestige_loss + stress_impact = { + base = medium_stress_gain + arrogant = minor_stress_gain + zealous = minor_stress_gain + cynical = medium_stress_loss # Got one good thing out of it at least + } + } + } + } + ai_chance = { + base = 150 + modifier = { + has_trait = shy + factor = 0.5 + } + modifier = { + has_trait = zealous + factor = 0.5 + } + modifier = { + has_trait = gregarious + factor = 2 + } + modifier = { + has_trait = cynical + factor = 2 + } + # More likely if skilled at diplomacy + modifier = { + diplomacy > medium_skill_rating + factor = 2 + } + # Less likely if not + modifier = { + diplomacy <= medium_skill_rating + factor = 0.5 + } + # Way less likely if way not + modifier = { + diplomacy <= low_skill_rating + # Unless you have zero ability to conceive your own diplomatic inferiority + NOT = { has_trait = arrogant } + factor = 0.5 + } + } + } + + option = { # "Neat" + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:hof } } + desc = ach_coronation.0010.b.rival + } + triggered_desc = { + trigger = { has_relation_lover = scope:hof } + desc = ach_coronation.0010.b.lover + } + triggered_desc = { + trigger = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:hof } } + desc = ach_coronation.0010.b.friend + } + triggered_desc = { + trigger = { faith.religion != scope:hof.faith.religion } + desc = ach_coronation.0010.b.heathen + } + triggered_desc = { + trigger = { faith != scope:hof.faith } + desc = ach_coronation.0010.b.heretic + } + triggered_desc = { + trigger = { + OR = { + is_witch_trigger = yes + # Also fits if you're hiding your faith + any_secret = { + secret_type = secret_crypto_religionist + } + } + } + desc = ach_coronation.0010.b.witch + } + triggered_desc = { + trigger = { has_trait = cynical } + desc = ach_coronation.0010.b.cynical + } + triggered_desc = { + trigger = { has_trait = zealous } + desc = ach_coronation.0010.b.zealous + } + desc = ach_coronation.0010.b + } + } + } + if = { + limit = { this = scope:host } + custom_tooltip = ach_coronation_0010_hof_desc_host.tt + } + else = { + custom_tooltip = ach_coronation_0010_hof_desc_guest.tt + } + ai_chance = { + base = 100 + } + } +} + +#################################### +# Random coronation events +# 0011-0499 +## by Jay Zaborowski +#################################### +# ach_coronation.0011 - Host: You see some potential plotters whispering +# ach_coronation.0012 - Host: Vassals squabble over coronation roles +# ach_coronation.0013 - Host: You eavesdrop on some peasants +# ach_coronation.0014 - Guest: Opportunity to cause a crowd crush +# ach_coronation.0015 - Host: There is a crowd crush +# ach_coronation.0016 - Guest: You present your host a gift +# ach_coronation.0017 - Guest: faith_warrior reacts to the coronation of a non-crusader_king +# ach_coronation.0018 - Guest: Close family member of Host sees opportunity +# ach_coronation.0020 - Host: Close family member helps manage the coronation +# ach_coronation.0022 - Guest: An ongoing plague has shaken a zealous guest +# ach_coronation.0023 - Host: An exotic foreign warrior pledges themselves to you +# ach_coronation.0025 - Open up drinks to the locals +# ach_coronation.0027 - A guest offers some hashish +# ach_coronation.0028 - Host: Drinking contest with a detractor +# ach_coronation.0029 - Host: Guests offer to help get a hunt going + +###################### +# Host: You see some potential plotters whispering +# 0011 +scripted_trigger ach_coronation_0011_eligible_vassal_trigger = { + is_physically_able_ai_adult = yes + is_vassal_of = involved_activity.activity_host + trigger_if = { # Should be someone you'd actually suspect + limit = { + scope:host = { # But what if they're in on it? + NOT = { has_trait = paranoid } + } + } + NOR = { + has_any_best_good_relationship_with_character_trigger = { CHARACTER = root } + has_trait = loyal + } + } +} + +scripted_trigger ach_coronation_0011_is_suitable_active_scheme_trigger = { + is_scheme_exposed = no + hostile_scheme_trigger = yes + scheme_target_character = { is_participant_in_activity = involved_activity } +} + +scripted_effect ach_coronation_0011_coward_setup_effect = { + save_scope_as = coward + if = { # If the plotter has a scheme and the coward's in on it, grab that + limit = { + scope:hostile_scheme ?= { + any_scheme_agent_character = { this = scope:coward } + } + } + scope:hostile_scheme = { + save_scope_as = coward_scheme + } + } + else_if = { # If the coward has a scheme of their own, grab that + limit = { + any_scheme = { + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + } + } + random_scheme = { + limit = { # Grab any targetting the Host + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + scheme_target_character = scope:host + } + alternative_limit = { # Else just one targetting someone at the activity + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + } + save_scope_as = coward_scheme + } + } + else = { # If there is no scheme, they will babble about whatever skeleton they have in their closet + if = { + limit = { # If they don't have a secret, generate one + NOT = { + any_secret = { NOT = { is_known_by = scope:host } } + } + } + hidden_effect = { give_random_likely_secret_effect = yes } + } + random_secret = { + limit = { NOT = { is_known_by = scope:host } } + save_scope_as = uncovered_secret + } + } +} + +ach_coronation.0011 = { + type = activity_event + title = ach_coronation.0011.t + desc = ach_coronation.0011.desc + + left_portrait = { + character = root + animation = eavesdrop + camera = camera_event_very_left + } + + right_portrait = { + character = scope:plotter + animation = dismissal + camera = camera_event_center_pointing_left + } + + center_portrait = { + character = scope:coward + animation = worry + } + + cooldown = { years = 1 } + + theme = coronation_activity + + override_background = { reference = throne_room } + + trigger = { + involved_activity = { + any_attending_character = { + ach_coronation_0011_eligible_vassal_trigger = yes + count >= 2 + } + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + # Grab a likely ringleader + random_attending_character = { + limit = { + is_powerful_vassal = yes + ach_coronation_0011_eligible_vassal_trigger = yes + any_scheme = { ach_coronation_0011_is_suitable_active_scheme_trigger = yes } + } + alternative_limit = { + is_powerful_vassal = yes + ach_coronation_0011_eligible_vassal_trigger = yes + } + alternative_limit = { + ach_coronation_0011_eligible_vassal_trigger = yes + } + weight = { + base = 1 + + ach_likely_plotter_modifier = yes + + modifier = { # Weighted up if there is actually a scheme against a guest + any_targeting_scheme = { ach_coronation_0011_is_suitable_active_scheme_trigger = yes } + factor = { + value = 2 + if = { # And ofc if that guest is you + limit = { any_targeting_scheme = { scheme_target_character = scope:host } } + add = 1 + } + } + } + } + if = { + limit = { + any_scheme = { + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + } + } + random_scheme = { + limit = { + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + scheme_target_character = scope:host + } + alternative_limit = { + ach_coronation_0011_is_suitable_active_scheme_trigger = yes + } + save_scope_as = hostile_scheme + } + } + save_scope_as = plotter + } + # Grab a likely weak-link + random_attending_character = { + limit = { + NOT = { this = scope:plotter } + ach_coronation_0011_eligible_vassal_trigger = yes + OR = { + any_scheme = { ach_coronation_0011_is_suitable_active_scheme_trigger = yes } + has_any_secrets = yes # Grab someone with secrets if possible + } + } + alternative_limit = { + NOT = { this = scope:plotter } + ach_coronation_0011_eligible_vassal_trigger = yes + } + weight = { + base = 1 + + ach_unlikely_plotter_modifier = yes + + modifier = { # Grab them if they are actually an agent against you + scope:hostile_scheme ?= { + any_scheme_agent_character = { this = root } + } + factor = 4 + } + } + ach_coronation_0011_coward_setup_effect = yes + } + } + } + + option = { # Break the coward + name = ach_coronation.0011.b + skill = intrigue + flavor = ach_coronation.0011.b.flavor + custom_tooltip = ach_coronation.0011.b.tt + trigger = { + intrigue >= very_high_skill_rating + } + + hidden_effect = { + if = { + limit = { exists = scope:coward_scheme } + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.coward.success + left_icon = root + right_icon = scope:coward + scope:coward_scheme = { + expose_scheme = yes + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.coward.success + left_icon = root + right_icon = scope:coward + scope:uncovered_secret = { + reveal_to = root + } + } + } + } + + if = { + limit = { + can_add_hook = { + target = scope:host + type = manipulation_hook + } + } + add_hook = { + type = manipulation_hook + target = scope:host + } + } + scope:coward = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -20 + } + add_stress = major_stress_gain + add_prestige = minor_prestige_loss + } + + stress_impact = { + sadistic = medium_stress_loss + trusting = medium_stress_gain + compassionate = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + add = { + value = 0 + add = intrigue + multiply = 5 + } + } + opinion_modifier = { + opinion_target = scope:coward + multiplier = -1 + } + modifier = { + OR = { + has_trait = compassionate + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:coward } + } + factor = 0 + } + modifier = { + has_trait = sadistic + factor = 2.5 + } + modifier = { + has_trait = callous + factor = 2 + } + modifier = { + has_trait = schemer + factor = 2 + } + modifier = { + has_trait = trusting + factor = 0.5 + } + modifier = { + has_trait = compassionate + factor = 0.5 + } + } + } + + option = { # Arrest the traitors! + name = { + trigger = { has_trait = paranoid } + text = ach_coronation.0011.c.paranoid + } + name = { + trigger = { has_trait = wrathful } + text = ach_coronation.0011.c.wrathful + } + name = ach_coronation.0011.c + trait = paranoid + trait = arbitrary + + trigger = { + OR = { + has_trait = paranoid + has_trait = arbitrary + has_activity_intent = coronation_weaken_detractors + } + } + + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:plotter + } + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:coward + } + + add_dread = medium_dread_gain + if = { + limit = { + scope:activity = { + any_attending_character = { + is_vassal_of = root + has_vassal_stance = belligerent + NOT = { is_in_guest_subset = { name = detractor } } + NOR = { + this = scope:plotter + this = scope:coward + } + } + } + } + coronation_weaken_detractors_opinion_effect = yes + } + + stress_impact = { + wrathful = medium_stress_loss + arbitrary = medium_stress_loss + paranoid = major_stress_loss + just = major_stress_gain + calm = major_stress_gain + } + + ai_chance = { + base = 0 + modifier = { + add = { + value = 0 + add = intrigue + multiply = 5 + } + } + opinion_modifier = { + opinion_target = scope:plotter + multiplier = -1 + } + modifier = { + has_trait = irritable + add = 25 + } + modifier = { + has_trait = wrathful + add = 25 + } + modifier = { + has_trait = arbitrary + add = 25 + } + modifier = { + has_trait = paranoid + add = 50 + } + modifier = { + has_trait = calm + factor = 0.5 + } + modifier = { + OR = { + has_trait = just + has_trait = compassionate + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:plotter } + } + factor = 0 + } + } + } + + option = { # Catch HerHim in a lie! + name = ach_coronation.0011.a + skill = intrigue + + reverse_add_opinion = { + target = scope:plotter + modifier = insult_opinion + opinion = -20 + } + + duel = { + skill = intrigue + target = scope:plotter + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -19 + } + desc = ach_coronation.0011.a.success + custom_tooltip = ach_coronation.0011.a.success.tt + hidden_effect = { + if = { + limit = { exists = scope:hostile_scheme } + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.scheme.plotter.toast + left_icon = root + right_icon = scope:plotter + + scope:hostile_scheme = { expose_scheme = yes } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.false.toast + left_icon = root + right_icon = scope:plotter + + add_prestige = minor_prestige_loss + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -9 + } + desc = ach_coronation.0011.a.failure + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0011.false.toast + left_icon = root + right_icon = scope:plotter + + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + trusting = medium_stress_gain + paranoid = medium_stress_loss + } + + ai_chance = { + base = 150 + modifier = { + intrigue <= mediocre_skill_rating + add = -50 + } + modifier = { + has_trait = paranoid + factor = 2 + } + # Don't weight up by a crazy amount - it's already high + modifier = { + has_trait = schemer + factor = 1.25 + } + modifier = { + has_trait = diligent + factor = 1.25 + } + modifier = { + OR = { + intrigue <= low_skill_rating + has_trait = trusting + } + factor = 0 + } + } + } + + option = { # Move on + name = ach_coronation.0011.d + + if = { + limit = { has_trait = paranoid } + add_character_modifier = { + modifier = ach_coronation_trusts_nobody_modifier + years = 10 + } + } + else_if = { + limit = { has_trait = trusting } + add_character_modifier = { + modifier = ach_coronation_blissful_ignorance_modifier + years = 10 + } + } + + reverse_add_opinion = { + target = scope:plotter + modifier = relieved_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:coward + modifier = relieved_opinion + opinion = 10 + } + + stress_impact = { + # This is somewhat worrying + base = minor_stress_gain + # Doesn't actually care + lazy = minor_stress_loss + trusting = minor_stress_loss + # Really really cares + paranoid = major_stress_gain + } + + ai_chance = { + base = 75 + opinion_modifier = { + opinion_target = scope:plotter + } + modifier = { + OR = { + has_trait = paranoid + has_trait = deceitful + has_intrigue_lifestyle_trait_trigger = yes + } + factor = 0.1 + } + modifier = { + has_trait = trusting + factor = 2 + } + modifier = { + has_trait = lazy + factor = 2 + } + modifier = { + has_trait = schemer + factor = 0.5 + } + } + } +} + +###################### +# Host: Vassals squabble over coronation roles +# 0012 +scripted_effect get_random_coronation_object = { + # Decided here so the loc is consistent between the description and the options + random_list = { + # Cultural objects - weighted higher since they're more interesting + 10 = { + trigger = { + OR = { + has_culture = culture:irish + has_title = title:k_ireland + } + } + set_variable = { + name = random_coronation_object + value = flag:white_rod + } + } + 10 = { + trigger = { has_title = title:e_hre } + set_variable = { + name = random_coronation_object + value = flag:coronation_cloak + } + } + 10 = { + trigger = { any_equipped_character_artifact = { artifact_slot_type = regalia } } + set_variable = { + name = random_coronation_object + value = flag:equipped_regalia + } + } + 1 = { + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + set_variable = { + name = random_coronation_object + value = flag:apostolic_cross + } + } + 1 = { + trigger = { + faith = { + NOR = { + has_doctrine_parameter = unreformed_syncretic_actor_opinion_active + has_doctrine_parameter = unreformed + } + } + } + set_variable = { + name = random_coronation_object + value = flag:royal_religioustext + } + } + 1 = { + set_variable = { + name = random_coronation_object + value = flag:sceptre_and_orb + } + } + 1 = { + set_variable = { + name = random_coronation_object + value = flag:coronation_spoon + } + } + 1 = { + set_variable = { + name = random_coronation_object + value = flag:coronation_sword + } + } + 1 = { + set_variable = { + name = random_coronation_object + value = flag:coronation_rings + } + } + } +} + +scripted_trigger is_eligible_random_squabbler = { + location = root.location + is_physically_able_ai_adult = yes + NOR = { + this = root + involved_activity.var:officiator ?= this + } + OR = { + AND = { + is_vassal_of = root + highest_held_title_tier >= tier_county + } + is_close_family_of = root + is_councillor_of = root + AND = { + is_allied_to = root + highest_held_title_tier >= tier_county + } + } +} + +scripted_trigger ach_coronation_0012_mutual_enmity = { + save_temporary_scope_as = squabbler_temp + scope:activity = { + any_attending_character = { + NOT = { + this = scope:squabbler_temp + } + is_eligible_random_squabbler = yes + #Check that they don't love each other + opinion = { + target = scope:squabbler_temp + value <= 20 + } + reverse_opinion = { + target = scope:squabbler_temp + value <= 20 + } + } + } +} + +ach_coronation.0012 = { + type = activity_event + title = ach_coronation.0012.t + desc = ach_coronation.0012.desc + + left_portrait = { + character = root + animation = disapproval + } + + center_portrait = { + character = scope:first + animation = debating + } + + right_portrait = { + character = scope:second + animation = rage + } + + cooldown = { years = 1 } + + theme = coronation_activity + + override_background = { reference = study } + + trigger = { + involved_activity = { + has_current_phase = coronation_phase_preparations + any_attending_character = { + is_eligible_random_squabbler = yes + count >= 1 + ach_coronation_0012_mutual_enmity = yes + } + } + } + + immediate = { + get_random_coronation_object = yes + involved_activity = { + activity_host = { save_scope_as = host } + random_attending_character = { # Grab two random attendees to be used in loc + limit = { + is_eligible_random_squabbler = yes + highest_held_title_tier >= tier_duchy + ach_coronation_0012_mutual_enmity = yes + } + alternative_limit = { + is_eligible_random_squabbler = yes + save_temporary_scope_as = squabbler_temp + ach_coronation_0012_mutual_enmity = yes + } + weight = { + base = 1 + + ach_squabbler_modifier = yes + + # Try to get someone who has a rivalry with another vassal already if possible + modifier = { + factor = 4 + any_relation = { + type = rival + is_participant_in_activity = scope:activity + is_eligible_random_squabbler = yes + is_vassal_of = scope:host + } + } + } + save_scope_as = first + } + random_attending_character = { + limit = { + is_eligible_random_squabbler = yes + this != scope:first + # Try and get the rival of the first character + has_relation_rival = scope:first + highest_held_title_tier >= tier_duchy + ach_coronation_0012_mutual_enmity = yes + } + alternative_limit = { + is_eligible_random_squabbler = yes + this != scope:first + # Try and get the rival of the first character + has_relation_rival = scope:first + ach_coronation_0012_mutual_enmity = yes + } + alternative_limit = { + is_eligible_random_squabbler = yes + this != scope:first + highest_held_title_tier >= tier_duchy + ach_coronation_0012_mutual_enmity = yes + } + alternative_limit = { + is_eligible_random_squabbler = yes + this != scope:first + ach_coronation_0012_mutual_enmity = yes + } + weight = { + base = 1 + + ach_squabbler_modifier = yes + + # Prefer those who hate the first vassal + opinion_modifier = { + opinion_target = scope:first + multiplier = -0.01 + } + # And those likewise hated by + opinion_modifier = { + who = scope:first + opinion_target = this + multiplier = -0.01 + } + # And a final boost if they have any sort of negative relationship, just in case + modifier = { + factor = 2 + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:first } + } + } + save_scope_as = second + } + } + } + + option = { # Vassal 1 is my favorite! + name = ach_coronation.0012.a + + coronation_move_towards_supporter_effect = { CHARACTER = scope:first } + coronation_move_towards_detractor_effect = { CHARACTER = scope:second } + scope:first = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + add_prestige = medium_prestige_gain + } + scope:second = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + add_prestige = medium_prestige_loss + hidden_effect = { + if = { + limit = { + is_ai = yes + scope:first = { + is_ai = yes + } + } + progress_towards_rival_effect = { + REASON = rival_stole_coronation_role + CHARACTER = scope:first + OPINION = -40 + } + } + } + } + + stress_impact = { + fickle = minor_stress_gain + } + + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:first + } + opinion_modifier = { + opinion_target = scope:second + multiplier = -1 + } + modifier = { + has_trait = fickle + factor = 0.5 + } + } + } + + option = { # Vassal 2 so 2 deserves my support! + name = ach_coronation.0012.b + coronation_move_towards_supporter_effect = { CHARACTER = scope:second } + coronation_move_towards_detractor_effect = { CHARACTER = scope:first } + scope:second = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + add_prestige = medium_prestige_gain + } + scope:first = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + add_prestige = medium_prestige_loss + + hidden_effect = { + if = { + limit = { + is_ai = yes + scope:second = { + is_ai = yes + } + } + progress_towards_rival_effect = { + REASON = rival_stole_coronation_role + CHARACTER = scope:second + OPINION = -40 + } + } + } + } + + stress_impact = { + fickle = minor_stress_gain + } + + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:second + } + opinion_modifier = { + opinion_target = scope:first + multiplier = -1 + } + modifier = { + has_trait = fickle + factor = 0.5 + } + } + } + + option = { # You can both do it together! + name = ach_coronation.0012.c + flavor = ach_coronation.0012.c.flavor + trigger = { + NOR = { + has_trait = diplomatic_court + trigger_if = { + limit = { has_royal_court = yes } + court_grandeur_current_level >= 8 + } + } + } + + duel = { + skill = diplomacy + value = 10 + 50 = { + desc = ach_coronation.0012.c.tt.success + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = ach_coronation.0012.c.tt.success + left_icon = root + custom_tooltip = coronation_tt_positive_tiny + scope:activity = { activity_special_type_progression_tiny = yes } + add_diplomacy_lifestyle_xp = medium_lifestyle_experience + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_tiny + CHAR = root + } + } + 50 = { + desc = ach_coronation.0012.c.tt.failure + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ach_coronation.0012.c.tt.failure + left_icon = root + add_prestige = minor_prestige_loss + } + scope:first = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:second } + is_ai = yes + scope:second = { is_ai = yes } + } + set_relation_rival = { + target = scope:second + reason = rival_ruined_coronation_role + } + } + } + } + } + + stress_impact = { + craven = minor_stress_loss + fickle = minor_stress_loss + } + + ai_chance = { + base = 0 + modifier = { + add = 25 + OR = { + has_trait = craven + has_trait = fickle + } + } + modifier = { + add = 50 + AND = { + opinion = { + target = scope:first + value >= low_positive_opinion + } + opinion = { + target = scope:second + value >= low_positive_opinion + } + } + } + opinion_modifier = { + opinion_target = scope:first + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:second + multiplier = 0.5 + } + modifier = { + factor = 0 + diplomacy < low_skill_rating + } + } + } + + option = { # I have the perfect idea! + name = ach_coronation.0012.d + flavor = ach_coronation.0012.d.flavor + trigger = { + OR = { + has_trait = diplomatic_court + trigger_if = { # This ain't your first rodeo + limit = { has_royal_court = yes } + court_grandeur_current_level >= 8 + } + } + } + trait = diplomatic_court_1 + # Legitimacy gets a lil bump + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + # And the activity gets a small bump as well + custom_tooltip = coronation_tt_positive_medium + scope:activity = { + activity_special_type_progression_medium = yes + add_activity_log_entry = { + key = coronation_elaborate_ceremony_log + score = 25 + tags = { positive } + character = scope:first + target = scope:second + } + } + + scope:first = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + scope:second = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + + stress_impact = { + arrogant = medium_stress_loss + } + + ai_chance = { + base = 150 + modifier = { + AND = { + opinion = { + target = scope:first + value <= low_negative_opinion + } + opinion = { + target = scope:second + value <= low_negative_opinion + } + } + add = -50 + } + modifier = { + has_trait = arrogant + factor = 1.5 + } + modifier = { + AND = { + opinion = { + target = scope:first + value < medium_negative_opinion + } + opinion = { + target = scope:second + value < medium_negative_opinion + } + } + factor = 0.5 + } + } + } + + option = { # Neither of you are worthy of touching my random_coronation_object! + name = ach_coronation.0012.e + + scope:first = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + scope:second = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + + add_character_modifier = { + modifier = ach_imperious_modifier + years = 5 + } + add_prestige = minor_prestige_gain + + stress_impact = { + impatient = minor_stress_loss + lazy = minor_stress_loss + arrogant = minor_stress_loss + } + + ai_chance = { + base = 50 + modifier = { + add = 50 + AND = { + opinion = { + target = scope:first + value >= low_positive_opinion + } + opinion = { + target = scope:second + value >= low_positive_opinion + } + } + } + modifier = { + add = -50 + AND = { + opinion = { + target = scope:first + value <= low_positive_opinion + } + opinion = { + target = scope:second + value <= low_positive_opinion + } + } + } + modifier = { + OR = { + has_trait = impatient + has_trait = lazy + has_trait = callous + has_trait = arrogant + has_trait = wrathful + } + factor = 1.5 + } + opinion_modifier = { + opinion_target = scope:first + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:second + multiplier = 0.5 + } + } + } +} + +###################### +# Host: You eavesdrop on some peasants +# 0013 +scripted_trigger ach_coronation_0013_claimant_trigger = { + # Shouldn't be friendly + has_any_good_relationship_with_root_trigger = no + is_alive = yes + is_adult = yes + NOT = { is_courtier_of = scope:host } + # Don't include your kids (unless you hate the little bastards) + trigger_if = { + limit = { has_any_bad_relationship_with_root_trigger = no } + NOT = { is_child_of = scope:host } + } +} + +scripted_effect ach_coronation_0013_get_eligible_pretender_effect = { + scope:host = { + if = { + limit = { + any_held_title = { + any_claimant = { ach_coronation_0013_claimant_trigger = yes } + } + } + random_held_title = { + # Prefer strong claimants (Who you're thus more likely to also hate) + limit = { + any_claimant = { + has_strong_claim_on = prev + ach_coronation_0013_claimant_trigger = yes + } + } + alternative_limit = { + any_claimant = { ach_coronation_0013_claimant_trigger = yes } + } + weight = { + # Prefer primary title + modifier = { + this = scope:host.primary_title + factor = 4 + } + # Prefer higher tier titles + modifier = { factor = tier } + } + random_claimant = { + limit = { ach_coronation_0013_claimant_trigger = yes } + save_scope_as = claimant + } + } + } + } +} + +scripted_effect ach_coronation_0013_get_gossip_type_effect = { + random_list = { + # More likely to get nice modifiers + 200 = { + save_scope_value_as = { + name = gossip_type + value = flag:nice + } + # Unless you're a tyrant (but some people still like tyrants) + modifier = { + add = { + value = tyranny + multiply = -1 + } + } + } + 100 = { + save_scope_value_as = { + name = gossip_type + value = flag:mean + } + modifier = { + add = { + value = tyranny + } + } + } + } +} + +ach_coronation.0013 = { + type = activity_event + title = ach_coronation.0013.t + desc = { + desc = ach_coronation.0013.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:rain_day } + desc = ach_coronation.0013.desc_opening.rainy_day + } + desc = ach_coronation.0013.desc_opening.dry_day + } + desc = ach_coronation.0013.desc_opening + first_valid = { + triggered_desc = { + trigger = { scope:gossip_type = flag:mean } + desc = { + random_valid = { + desc = ach_coronation.0013.desc_conversation.mean.1 + desc = ach_coronation.0013.desc_conversation.mean.2 + desc = ach_coronation.0013.desc_conversation.mean.3 + desc = { + desc = ach_coronation.0013.desc_conversation.mean.4 + first_valid = { + triggered_desc = { + trigger = { has_trait = lustful } + desc = ach_coronation.0013.desc_conversation.mean.4.lustful.host + } + triggered_desc = { + trigger = { has_trait = chaste } + desc = ach_coronation.0013.desc_conversation.mean.4.chaste + } + desc = ach_coronation.0013.desc_conversation.mean.4.not_lustful + } + } + desc = ach_coronation.0013.desc_conversation.mean.5 + } + } + } + triggered_desc = { + trigger = { scope:gossip_type = flag:nice } + desc = { + random_valid = { + desc = ach_coronation.0013.desc_conversation.nice.1 + desc = ach_coronation.0013.desc_conversation.nice.2 + desc = ach_coronation.0013.desc_conversation.nice.3 + desc = ach_coronation.0013.desc_conversation.nice.4 + triggered_desc = { + trigger = { exists = scope:claimant } + desc = ach_coronation.0013.desc_conversation.nice.5 + } + } + } + } + } + } + + left_portrait = { + character = root + animation = interested + camera = camera_event_table_center_background + + triggered_animation = { + trigger = { scope:gossip_type = flag:mean } + animation = shock + } + triggered_animation = { + trigger = { scope:gossip_type = flag:nice } + animation = happiness + } + } + + center_portrait = { + character = scope:peasant + animation = wedding_drunk + camera = camera_event_table_left_2 + hide_info = yes + } + + right_portrait = { + character = scope:peasant_2 + animation = drink + camera = camera_event_table_right_far_2 + hide_info = yes + } + + cooldown = { years = 1 } + + theme = coronation_activity + + override_background = { reference = alley_day } + + override_effect_2d = { + trigger = { exists = scope:rain_day } + reference = rain + } + + trigger = { + OR = { + involved_activity.var:activity_special_type_progression < 25 + location.county = { county_control < 25 } + } + #V Serious roots + NOR = { + coronation_host_east_asian_trigger = yes + highest_held_title_tier > tier_empire + } + } + + # Peasants are less likely to spread rumors about rulers they fear + weight_multiplier = { + base = 1 + compare_modifier = { + value = dread + multiplier = -0.01 + # But sometimes you drink a bit too much with the lads and get y'allselves killed. Opsec, people! + min = -0.9 + } + } + + immediate = { + save_scope_as = host + involved_activity = { + activity_location.barony.holder = { + save_scope_as = baron + } + } + + # Generate some gossipy peasants + create_character = { + location = root.location + template = drunken_peasant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = peasant + after_creation = { # To make sure they fit the event window + if = { + limit = { has_trait = giant } + remove_trait = giant + } + if = { + limit = { has_trait = dwarf } + remove_trait = dwarf + } + } + } + create_character = { + location = root.location + template = drunken_peasant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = peasant_2 + after_creation = { + if = { + limit = { has_trait = giant } + remove_trait = giant + } + if = { + limit = { has_trait = dwarf } + remove_trait = dwarf + } + } + } + + # And stuff for loc + random_dummy_gender_effect = yes + random_rain_snow_chance_effect = yes + ach_coronation_0013_get_eligible_pretender_effect = yes + ach_coronation_0013_get_gossip_type_effect = yes + } + + option = { # Weaken Detractors: Focus them on your opponents + name = ach_coronation.0013.a.weaken_detractors + reason = activity_intent + flavor = ach_coronation.0013.a.weaken_detractors.flavor + add_internal_flag = special + + trigger = { + has_activity_intent = coronation_weaken_detractors + involved_activity = { + any_guest_subset = { # There are actually enough people to do this to + name = detractor + count >= 2 + } + } + } + + custom_tooltip = two_detractors_get_negative_rumors_tt + + hidden_effect = { + involved_activity = { + random_guest_subset = { + name = detractor + weight = { + base = 1 + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + + # Less likely to get rumors to stick on proper political operators + modifier = { + add = { + value = intrigue + multiply = -5 + } + add = { + value = diplomacy + multiply = -5 + } + } + } + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + save_scope_as = detractor_1 + } + random_guest_subset = { + name = detractor + weight = { + base = 1 + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + + # Less likely to get rumors to stick on proper political operators + modifier = { + add = { + value = intrigue + multiply = -5 + } + add = { + value = diplomacy + multiply = -5 + } + } + } + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + save_scope_as = detractor_2 + } + } + send_interface_toast = { + title = ach_coronation.0013.a.weaken_detractors.tt + left_icon = scope:detractor_1 + right_icon = scope:detractor_2 + + scope:detractor_1 = { + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + } + scope:detractor_2 = { + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + } + } + } + + remove_short_term_gold = minor_gold_value + + highlight_portrait = scope:peasant + highlight_portrait = scope:peasant_2 + + coronation_weaken_detractors_opinion_effect = yes + + stress_impact = { + arrogant = minor_stress_gain # Talking to peasants + shy = minor_stress_gain # Talking to anyone + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + has_trait = arrogant + add = -25 + } + modifier = { + has_trait = shy + add = -25 + } + modifier = { + has_trait = greedy + add = -25 + } + modifier = { + has_trait = profligate + add = 25 + } + modifier = { + has_trait = generous + add = 25 + } + modifier = { + has_trait = lifestyle_reveler + add = 25 + } + modifier = { + has_trait = gregarious + factor = 2 + } + modifier = { + has_trait = schemer + factor = 2 + } + modifier = { + has_trait = honest + factor = 0.5 + } + } + } + + option = { # Host: Do they have any idea who you are!? + name = ach_coronation.0013.c + trigger = { + scope:gossip_type = flag:mean + } + skill = diplomacy + + duel = { + skills = { diplomacy prowess } + value = medium_skill_rating + # you manage to win them over + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ach_coronation.0013.c.tt.success + send_interface_toast = { + title = ach_coronation.0013.c.tt.success + left_icon = root + add_prestige = medium_prestige_gain + 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 + } + } + # The rumors spread further + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ach_coronation.0013.c.tt.failure + send_interface_toast = { + title = ach_coronation.0013.c.tt.failure + left_icon = root + add_prestige = minor_prestige_loss + add_dread = minor_dread_loss + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + } + } + } + + stress_impact = { + forgiving = minor_stress_gain + just = minor_stress_loss + wrathful = minor_stress_loss + vengeful = minor_stress_loss + } + + ai_chance = { + base = 10 + modifier = { + has_trait = wrathful + add = 25 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + } + } + } + + option = { # Set the guards on them + name = ach_coronation.0013.b + trigger = { scope:gossip_type = flag:mean } + + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:peasant + IMPRISONER = root + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:peasant_2 + IMPRISONER = root + } + + add_tyranny = minor_tyranny_gain + add_dread = minor_dread_gain + root.location = { + add_province_modifier = { + modifier = ach_arrested_rumormongers_modifier + years = 5 + } + } + add_character_modifier = { + modifier = ach_arrested_rumormongers_character_modifier + years = 5 + } + + highlight_portrait = scope:peasant + + stress_impact = { + forgiving = medium_stress_gain + compassionate = minor_stress_gain + calm = miniscule_stress_gain + irritable = minor_stress_loss + wrathful = medium_stress_loss + vengeful = medium_stress_loss + } + + ai_chance = { + base = 20 + modifier = { + has_trait = wrathful + add = 25 + } + modifier = { + has_trait = vengeful + add = 50 + } + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + ai_compassion = -1 + } + } + } + + option = { # Join them + name = ach_coronation.0013.d + trigger = { scope:gossip_type = flag:nice } + + add_character_modifier = { + modifier = ach_positive_rumors_modifier + years = 10 + } + if = { + limit = { + has_trait = lifestyle_reveler + has_trait_xp = { + trait = lifestyle_reveler + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_reveler + value = 10 + } + } + else = { + random = { + chance = 25 + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + } + } + } + + add_prestige = minor_prestige_loss + + highlight_portrait = scope:peasant + highlight_portrait = scope:peasant_2 + + stress_impact = { + base = medium_stress_loss + gregarious = minor_stress_loss + lifestyle_reveler = minor_stress_loss + shy = major_stress_gain + arrogant = major_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Who cares? + name = ach_coronation.0013.e + name = { + trigger = { scope:gossip_type = flag:mean } + text = ach_coronation.0013.e.disagrees + } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:gossip_type = flag:mean + } + desc = ach_coronation.0013.e.flavor.mean + } + desc = ach_coronation.0013.e.flavor.nice + } + } + + if = { + limit = { scope:gossip_type = flag:nice } + add_character_modifier = { + modifier = ach_positive_rumors_modifier + years = 5 + } + stress_impact = { + base = minor_stress_loss + } + } + else = { + add_character_modifier = { + modifier = ach_negative_rumors_modifier + years = 5 + } + stress_impact = { + base = minor_stress_loss + vengeful = medium_stress_gain + wrathful = minor_stress_gain + forgiving = medium_stress_loss + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -0.5 + ai_sociability = -0.5 + ai_energy = -0.5 + } + } + } + + after = { + if = { + limit = { + scope:peasant = { is_imprisoned = no } + } + hidden_effect = { + scope:peasant = { silent_disappearance_effect = yes } + scope:peasant_2 = { silent_disappearance_effect = yes } + } + } + } +} + +###################### +# Guest: Yell fire +# 0014 +scripted_trigger ach_coronation_0014_random_attendee_trigger = { + NOR = { + this = scope:host + this = scope:crush_initiator + involved_activity.var:officiator ?= this + } + is_available_in_activity_trigger = yes +} + +scripted_effect ach_coronation_0015_crushed_guest_effect = { + involved_activity = { + # Wound X characters and kill Y % + while = { + count = $COUNT$ + random_attending_character = { + limit = { + ach_coronation_0014_random_attendee_trigger = yes + NOT = { is_in_list = in_crowd_crush } + } + add_to_list = in_crowd_crush + increase_wounds_effect = { REASON = crowd_stampede } + create_character_memory = { + type = injured_in_crowd_crush_at_coronation_memory + participants = { + coronation_host = scope:host + } + } + + random = { + chance = $DEATH_CHANCE$ + death = { death_reason = death_crowd_stampede } + } + } + } + # Add the stampede modifier + root.location = { + if = { + limit = { + NOT = { has_province_modifier = ach_coronation_stampede_modifier } + } + add_province_modifier = { modifier = ach_coronation_stampede_modifier years = 5 } + county = { change_county_control = minor_county_control_loss } + } + } + } +} + +# Crowd crush effects used in tooltips in 0014 and the effects of 0015 +scripted_effect ach_coronation_0015_minor_crush_effect = { + custom_tooltip = few_guests_wounded + hidden_effect = { ach_coronation_0015_crushed_guest_effect = { COUNT = 2 DEATH_CHANCE = 0 } } +} +scripted_effect ach_coronation_0015_medium_crush_effect = { + custom_tooltip = many_guests_wounded + hidden_effect = { ach_coronation_0015_crushed_guest_effect = { COUNT = 8 DEATH_CHANCE = 0 } } +} +scripted_effect ach_coronation_0015_major_crush_effect = { + custom_tooltip = many_guests_wounded_or_killed + hidden_effect = { ach_coronation_0015_crushed_guest_effect = { COUNT = 12 DEATH_CHANCE = 4 } } +} + +ach_coronation.0014 = { + type = activity_event + title = ach_coronation.0014.t + desc = { + desc = ach_coronation.0014.desc + first_valid = { + triggered_desc = { + trigger = { scope:crush_scenario = flag:rain } + desc = ach_coronation.0014.desc.weather.rain + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_indoors } + desc = ach_coronation.0014.desc.weather.indoors + } + desc = ach_coronation.0014.desc.weather.clear + } + first_valid = { + triggered_desc = { + trigger = { scope:crush_scenario = flag:rain } + desc = ach_coronation.0014.desc.reason.rain + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:local_discontent } + desc = ach_coronation.0014.desc.reason.local_discontent + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:low_control } + desc = ach_coronation.0014.desc.reason.low_control + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_indoors } + desc = ach_coronation.0014.desc.reason.generic_indoors + } + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_outdoors } + desc = ach_coronation.0014.desc.reason.generic_outdoors + } + } + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_greek } + OR = { + has_title = title:e_byzantium + top_liege = { + has_title = title:e_byzantium + } + } + } + desc = ach_coronation.0014.desc.ending.byzantine + } + triggered_desc = { + desc = ach_coronation.0014.desc.ending + } + } + first_valid = { + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_indoors } + desc = ach_coronation.0014.desc.ending.indoors + } + desc = ach_coronation.0014.desc.ending.outdoors + } + } + + left_portrait = { + character = root + animation = thinking + } + + center_portrait = { + character = scope:peasant + animation = rage + camera = camera_event_center_pointing_right + hide_info = yes + } + + right_portrait = { + character = scope:guard + animation = threatening + camera = camera_event_right_pointing_right + hide_info = yes + } + + lower_left_portrait = { + character = scope:first + } + + cooldown = { years = 10 } + + theme = coronation_activity + + override_background = { + trigger = { scope:crush_scenario = flag:generic_indoors } + reference = throne_room + } + override_background = { reference = alley_day } + + override_effect_2d = { + trigger = { + exists = scope:rain_day + NOT = { scope:crush_scenario = flag:generic_indoors } + } + reference = rain + } + + trigger = { + involved_activity = { + activity_host != root + # Coronation Splendor is low + var:activity_special_type_progression < 25 + OR = { + # County has low control + activity_location.county = { county_control < low_county_control_limit } + # County is part of a faction + activity_host = { + any_targeting_faction = { + any_faction_county_member = { + this = scope:activity.activity_location.county + } + } + } + # There are many powerful detractors + any_guest_subset = { + name = detractor + OR = { # Is a threat to the host + AND = { + liege = involved_activity.activity_host + is_powerful_vassal = yes + } + highest_held_title_tier >= involved_activity.activity_host.highest_held_title_tier + current_military_strength > involved_activity.activity_host.current_military_strength + } + count >= 4 + } + } + } + + # You have a reason to do this, or at least consider it + coronation_hostile_to_host_trigger = yes + + involved_activity = { + # There are enough people to be impacted by a crush + any_attending_character = { + is_physically_able_ai = yes + this != root + count >= 12 + } + # There is a character we can use for the arrival + any_attending_character = { + is_landed = yes + location = involved_activity.activity_location + NOR = { + this = involved_activity.activity_host + this = root + involved_activity.var:officiator ?= this + } + is_available_in_activity_trigger = yes + } + # Once per activity + NOT = { has_variable = crowd_crush_happened } + } + } + + weight_multiplier = { + base = 1 + # More likely if the coronation isn't going great + modifier = { + involved_activity = { + any_guest_subset = { + name = detractor + OR = { + # Is a powerful vassal + AND = { + liege = scope:host + is_powerful_vassal = yes + } + # Or a threat to the host + highest_held_title_tier >= scope:host.highest_held_title_tier + } + count >= 3 + } + } + add = 1 + } + modifier = { + involved_activity = { + any_guest_subset = { + name = detractor + OR = { + # Is a powerful vassal + AND = { + liege = scope:host + is_powerful_vassal = yes + } + # Or a threat to the host + highest_held_title_tier >= scope:host.highest_held_title_tier + } + count >= 5 + } + } + add = 1 + } + modifier = { + involved_activity = { + any_guest_subset = { + name = detractor + OR = { + # Is a powerful vassal + AND = { + liege = scope:host + is_powerful_vassal = yes + } + # Or a threat to the host + highest_held_title_tier >= scope:host.highest_held_title_tier + } + count >= 7 + } + } + add = 1 + } + } + + immediate = { + save_scope_as = crush_initiator + + involved_activity = { + activity_host = { save_scope_as = host } + + # Grab a random landed attendee to be used in loc + random_attending_character = { + limit = { + ach_coronation_0014_random_attendee_trigger = yes + is_landed = yes + } + weight = { + base = 1 + modifier = { factor = highest_held_title_tier } # Grab someone important + } + save_scope_as = first + } + } + + # Generate a bodyguard + create_character = { + location = root.location + template = soldier_friend_character + culture = scope:first.culture + faith = scope:first.faith + save_scope_as = guard + } + create_character = { + location = root.location + template = servant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = peasant + } + + random_rain_snow_chance_effect = yes + + # Choose a scenario + random_list = { + 1 = { + trigger = { exists = scope:rain_day } + save_scope_value_as = { + name = crush_scenario + value = flag:rain + } + } + 1 = { + save_scope_value_as = { + name = crush_scenario + value = flag:generic_indoors + } + } + 1 = { + save_scope_value_as = { + name = crush_scenario + value = flag:generic_outdoors + } + } + # Prefer non-generic ones + 4 = { + trigger = { + scope:host = { + any_targeting_faction = { + any_faction_county_member = { + this = scope:activity.activity_location.county + } + } + } + } + save_scope_value_as = { + name = crush_scenario + value = flag:local_discontent + } + } + 4 = { + trigger = { + location.county = { county_control < low_county_control_limit } + } + save_scope_value_as = { + name = crush_scenario + value = flag:low_control + } + } + } + } + + option = { # Yell fire + name = { + trigger = { scope:crush_scenario = flag:generic_indoors } + text = ach_coronation.0014.a.indoors + } + name = ach_coronation.0014.a.outdoors + add_internal_flag = dangerous + + duel = { + skill = intrigue + value = very_high_skill_rating + # You spark a riot. + 35 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ach_coronation.0014.a.tt.success + + if = { + limit = { + scope:crush_scenario != flag:generic_indoors + } + custom_tooltip = ach_coronation.0014.a.rock + hidden_effect = { + scope:first = { increase_wounds_effect = { REASON = fight } } + } + } + else = { + scope:first = { increase_wounds_effect = { REASON = fight } } + } + + # Effect is fired from the host event + hidden_effect = { + scope:host = { + trigger_event = ach_coronation.0015 + } + involved_activity = { + set_variable = { + name = crowd_crush_happened + } + } + } + + custom_description_no_bullet = { + text = if_host_calms_crowd_desc + object = scope:host + } + show_as_tooltip = { ach_coronation_0015_minor_crush_effect = yes } + custom_tooltip = ach_coronation.0014.a.tt.host.success + + custom_description_no_bullet = { + text = if_crush_happens_desc + object = scope:host + } + custom_tooltip = many_guests_may_be_wounded_or_killed + custom_tooltip = ach_coronation.0014.a.tt.host.failure.magnificence + custom_tooltip = ach_coronation.0014.a.tt.host.failure.host + custom_tooltip = ach_coronation.0014.a.tt.host.failure.crackdown + } + # Nobody notices + 65 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ach_coronation.0014.a.tt.failure + send_interface_toast = { + title = ach_coronation.0014.a.tt.failure + desc = { + desc = ach_coronation.0014.a.tt.failure + triggered_desc = { + trigger = { scope:crush_scenario = flag:generic_indoors } + desc = ach_coronation.0014.a.tt.failure.indoors + } + } + } + } + } + + ai_chance = { + base = 25 + # More likely if you actually have a chance + modifier = { + intrigue > high_skill_rating + add = 25 + } + modifier = { + intrigue > very_high_skill_rating + add = 50 + } + modifier = { + has_trait = schemer + add = 25 + } + modifier = { + has_trait = callous + add = 25 + } + modifier = { + has_trait = sadistic + factor = 2 + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = minor_stress_impact_loss + honest = minor_stress_impact_gain + content = minor_stress_impact_gain + just = medium_stress_impact_gain + compassionate = massive_stress_gain + } + } + + option = { # These crowds could be useful... + name = ach_coronation.0014.b + trigger = { + custom_tooltip = { + text = ach_coronation.0014.b.tt + OR = { + intrigue >= very_high_skill_rating + has_trait = deceitful + has_trait = schemer + } + } + } + show_as_unavailable = { always = yes } + skill = intrigue + trait = schemer + trait = deceitful + + add_character_modifier = { + modifier = ach_useful_crowds_modifier + years = 5 + } + + ai_chance = { + base = 150 + } + } + + option = { # Go schmooze with the oncoming lord instead + name = ach_coronation.0014.c + reverse_add_opinion = { + modifier = charmed_opinion + opinion = 10 + target = scope:first + } + + ai_chance = { + base = 100 + } + } + + after = { + hidden_effect = { + scope:guard = { silent_disappearance_effect = yes } + scope:peasant = { silent_disappearance_effect = yes } + } + } +} + +###################### +# Host: There is a crowd crush +# 0015 +ach_coronation.0015 = { + type = activity_event + title = ach_coronation.0015.t + desc = ach_coronation.0015.desc + + left_portrait = { + character = root + animation = fear + } + + center_portrait = { + character = scope:peasant + animation = rage + camera = camera_event_crowd + hide_info = yes + } + + right_portrait = { + character = scope:filthy_peasant + animation = beg + camera = camera_event_ground + hide_info = yes + } + + cooldown = { years = 10 } + + theme = coronation_activity + + override_background = { + trigger = { + location.county.holder = { + government_has_flag = government_is_tribal + } + } + reference = market_tribal + } + override_background = { reference = alley_day } + + override_effect_2d = { + trigger = { exists = scope:rain_day } + reference = rain + } + + trigger = { + involved_activity = { + # Once per activity + NOT = { has_variable = crowd_crush_happened } + } + } + + immediate = { + create_character = { + location = root.location + template = diseased_peasant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = filthy_peasant + } + create_character = { + location = root.location + template = servant_character + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = peasant + } + + ach_coronation_0015_minor_crush_effect = yes + + custom_tooltip = ach_coronation.0015.has_happened + } + + option = { # Diplomacy Challenge - Talk them down + name = { + trigger = { has_trait = august } + text = ach_coronation.0015.a.august + } + name = ach_coronation.0015.a + trigger = { diplomacy >= low_skill_rating } + show_as_unavailable = { always = yes } + skill = diplomacy + trait = august + + duel = { + skill = diplomacy + value = medium_skill_rating + # Your speech stuns the crowd to awed silence + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + modifier = { + diplomacy >= high_skill_rating + add = 10 + } + modifier = { + has_trait = diplomat + add = 20 + } + + desc = ach_coronation.0015.a.tt.critical_success + + custom_tooltip = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_major + CHAR = root + } + + # The commoners will remember this + add_character_modifier = { modifier = ach_awed_peasantry_modifier years = 10 } + + # You'll also remember this + create_character_memory = { type = calmed_the_crowd_memory } + + show_as_tooltip = { + add_diplomacy_lifestyle_perk_points = 1 + } + + hidden_effect = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.critical_success + custom_tooltip = ach_coronation.0015.a.tt.critical_success.desc + left_icon = root + type = event_toast_effect_good + + # Everyone is very impressed + add_diplomacy_lifestyle_perk_points = 1 + custom_tooltip = { + text = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + } + scope:activity = { + every_attending_character = { + limit = { + this != root + this != scope:crush_initiator + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + custom = custom.every_activity_guest + } + } + } + + # Remove the stampede modifier early + root.location.county = { + remove_county_modifier = ach_coronation_stampede_modifier + } + # Inform the initiator they failed in a critical persuasian + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.critical_failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.critical_failure.desc + left_icon = root + right_icon = scope:host + + stress_impact = { + base = medium_stress_impact_gain + irritable = medium_stress_impact_gain + } + + show_as_tooltip = { + scope:host = { + custom_tooltip = { + text = coronation_tt_positive_major + scope:activity = { activity_special_type_progression_major = yes } + } + add_diplomacy_lifestyle_perk_points = 1 + } + scope:activity = { + every_attending_character = { + limit = { + this != scope:host + this != scope:crush_initiator + } + add_opinion = { + target = scope:host + modifier = impressed_opinion + opinion = 10 + } + custom = custom.every_activity_guest + } + } + } + } + } + } + } + # Your speech calms the people + 40 = { + # If you have the August trait (and higher than low_skill_rating), critical success is free + trigger = { NOT = { has_trait = august } } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = diplomat + add = 30 + } + + desc = ach_coronation.0015.a.tt.success + + ach_coronation_0015_minor_crush_effect = yes + + # You'll remember this + create_character_memory = { type = calmed_the_crowd_memory } + + 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 + } + + hidden_effect = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.success + custom_tooltip = ach_coronation.0015.a.tt.success.desc + left_icon = root + type = event_toast_effect_good + + # Everyone is impressed + custom_tooltip = coronation_tt_positive_medium + scope:activity = { + activity_special_type_progression_medium = yes + } + } + + # Inform the initiator they failed + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.failure.desc + left_icon = root + right_icon = scope:host + + scope:host = { + custom_tooltip = coronation_tt_positive_medium + } + } + } + } + } + # The fools do not listen + 40 = { + # If you have the August trait (and higher than low_skill_rating), critical success is free + trigger = { NOT = { has_trait = august } } + compare_modifier = { + value = scope:duel_value + multiplier = -4 + min = -49 + } + modifier = { # Hard to ignore + has_trait = august + add = -20 + } + modifier = { # Hard to get people to listen + OR = { + has_trait = stuttering + has_trait = lisping + } + add = 10 + } + + desc = ach_coronation.0015.a.tt.failure + + ach_coronation_0015_medium_crush_effect = yes + + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + hidden_effect = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.failure.title + desc = ach_coronation.0015.a.tt.failure + left_icon = root + type = event_toast_effect_bad + + stress_impact = { + base = medium_stress_impact_gain + irritable = medium_stress_impact_gain + } + + custom_tooltip = coronation_tt_negative + } + + # Inform the initiator they succeeded + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.success + desc = ach_coronation.0015.a.tt.initiator.success.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + stress_impact = { + base = medium_stress_impact_gain + irritable = medium_stress_impact_gain + } + + custom_tooltip = coronation_tt_negative + } + } + } + } + } + } + } + if = { + limit = { exists = scope:new_memory } + scope:new_memory = { + set_variable = { + name = memory_location + value = root.location + } + } + } + + stress_impact = { + callous = minor_stress_impact_gain # Doesn't care + shy = minor_stress_impact_gain # Talk to people!? + } + + ai_chance = { + base = 200 + modifier = { + add = -25 + has_trait = callous + } + modifier = { + add = -25 + has_trait = shy + } + modifier = { + add = -50 + has_trait = sadistic + } + modifier = { + add = 25 + has_trait = calm + } + modifier = { + add = 50 + has_trait = compassionate + } + modifier = { + add = 50 + has_trait = gregarious + } + } + } + + option = { # Physician / Learning - Tend to the wounded + name = ach_coronation.0015.b + flavor = ach_coronation.0015.b.flavor + trigger = { + OR = { + learning >= high_skill_rating + has_trait = lifestyle_physician + } + } + skill = learning + trait = lifestyle_physician + + random = { + chance = 25 + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + + add_piety = major_piety_gain + add_learning_lifestyle_xp = medium_lifestyle_experience + + show_as_tooltip = { + scope:activity = { + every_attending_character = { + limit = { is_ai = yes } + custom = every_wounded_guest_in_crowd_scope_tt + show_as_tooltip = { + add_character_modifier = { + modifier = ach_coronation_treated_wound_modifier + years = 5 + } + add_opinion = { + target = root + modifier = thankful_opinion + opinion = 20 + } + } + } + } + } + + hidden_effect = { + every_in_list = { + list = in_crowd_crush + add_opinion = { + target = root + modifier = thankful_opinion + opinion = 20 + } + add_character_modifier = { + modifier = ach_coronation_treated_wound_modifier + years = 5 + } + } + # Inform the initiator they failed + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.failure.physician.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + custom_tooltip = coronation_tt_positive_medium + + add_piety = major_piety_gain + } + } + } + } + } + + stress_impact = { + arrogant = medium_stress_impact_gain # "Peasant blood? On *my* hands?" + sadistic = medium_stress_impact_gain # "No wait this is great let's just watch" + compassionate = major_stress_impact_loss # "Mass casualty events are bad :(((" ~ local buzzkill + } + + ai_chance = { + base = 300 + modifier = { + add = 100 + has_trait = compassionate + } + modifier = { + add = -100 + has_trait = sadistic + } + modifier = { + add = -100 + has_trait = arrogant + } + } + } + + option = { # Set the guards on them! + name = { + trigger = { primary_title = { has_variable = founded_varangian_guard } } + text = ach_coronation.0015.d.byzantines + } + name = ach_coronation.0015.d + trait = overseer + add_internal_flag = dangerous + + add_dread = miniscule_dread_gain + + random_list = { + 1 = { # The soldiers go too far + ach_coronation_0015_major_crush_effect = yes + add_tyranny = medium_tyranny_gain + + hidden_effect = { + # Inform the initiator they succeeded + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.critical_success + custom_tooltip = ach_coronation.0015.a.tt.initiator.critical_success.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + ach_coronation_0015_major_crush_effect = yes + add_tyranny = medium_tyranny_gain + add_dread = miniscule_dread_gain + } + } + } + } + } + } + 2 = { # The soldiers kill a bunch of people but restore order + ach_coronation_0015_medium_crush_effect = yes + add_tyranny = minor_tyranny_gain + + hidden_effect = { + # Inform the initiator they failed + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.failure.crackdown.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + ach_coronation_0015_medium_crush_effect = yes + add_dread = miniscule_dread_gain + add_character_modifier = { + modifier = ach_coronation_crackdown_character_modifier + years = 5 + } + } + } + } + } + } + } + 3 = { # The crowds disperse before many are killed + ach_coronation_0015_minor_crush_effect = yes + + hidden_effect = { + # Inform the initiator they failed + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.failure + custom_tooltip = ach_coronation.0015.a.tt.initiator.failure.crackdown.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + ach_coronation_0015_minor_crush_effect = yes + add_character_modifier = { + modifier = ach_coronation_crackdown_character_modifier + years = 5 + } + add_dread = miniscule_dread_gain + } + } + } + } + } + } + } + + if = { + limit = { + NOT = { has_trait = overseer } + } + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + else = { + custom_tooltip = because_you_have_overseer_tt + } + + add_character_modifier = { + modifier = ach_coronation_crackdown_character_modifier + years = 5 + } + root.location = { + add_province_modifier = { + modifier = ach_coronation_crackdown_modifier + years = 5 + } + county = { + change_development_progress = medium_development_progress_loss + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + arrogant = minor_stress_impact_loss # Loves calling guards on the commons + # Loves seeing guards beat people + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + overseer = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = compassionate + } + modifier = { + add = 25 + has_trait = arbitrary + } + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 50 + has_trait = sadistic + } + modifier = { + add = 50 + has_trait = callous + } + modifier = { + add = 50 + has_trait = overseer + } + } + } + + option = { # Getting coronated - Who cares + name = ach_coronation.0015.e + + random = { + chance = 50 + custom_tooltip = coronation_tt_negative + scope:activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + + ach_coronation_0015_medium_crush_effect = yes + add_prestige = minor_prestige_loss + + hidden_effect = { + # Inform the initiator they succeeded + scope:crush_initiator = { + send_interface_toast = { + title = ach_coronation.0015.a.tt.initiator.success + custom_tooltip = ach_coronation.0015.a.tt.initiator.success.desc + left_icon = root + right_icon = scope:host + + show_as_tooltip = { + scope:host = { + stress_impact = { + base = medium_stress_impact_gain + irritable = medium_stress_impact_gain + } + + add_prestige = minor_prestige_loss + add_piety = minor_piety_loss + + custom_tooltip = coronation_tt_negative + } + } + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = compassionate + } + modifier = { + add = -50 + has_trait = brave + } + modifier = { + add = 25 + has_trait = craven + } + modifier = { + add = 25 + has_trait = sadistic + } + modifier = { + add = 25 + has_trait = callous + } + modifier = { + add = 25 + has_trait = arrogant + } + } + } + + after = { + hidden_effect = { + scope:peasant = { silent_disappearance_effect = yes } + scope:filthy_peasant = { silent_disappearance_effect = yes } + } + } +} + +###################### +# Guest: You present your host a gift +# 0016 +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_durability > 10 +} + +scripted_trigger ach_coronation_0016_can_be_swayed_trigger = { + NOR = { + is_in_guest_subset = { name = detractor } + is_in_guest_subset = { name = supporter } + } + is_ai = yes + is_vassal_of = involved_activity.activity_host + NOR = { + has_trait = disloyal + has_trait = loyal + } +} + +scripted_effect liege_reward_effect = { + switch = { + trigger = has_activity_intent + coronation_bear_witness = { + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = minor_legitimacy_gain + } + else_if = { + limit = { + government_allows = administrative + top_liege = involved_activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + coronation_offer_support = { + reverse_add_opinion = { + target = scope:host + modifier = thankful_opinion + opinion = 30 + years = 10 + } + custom_tooltip = { + text = coronation_tt_positive_medium + scope:activity = { activity_special_type_progression_medium = yes } + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive + CHAR = root + } + } + coronation_advocate_domain = { + capital_county = { + add_county_modifier = { + modifier = ach_liege_subsidies_modifier + years = 10 + } + } + } + coronation_profess_rights = { + if = { + limit = { + can_add_hook = { + target = scope:host + type = favor_hook + } + } + random = { + chance = 33 + add_hook = { + target = scope:host + type = favor_hook + } + } + } + else = { + reverse_add_opinion = { + target = scope:host + modifier = thankful_opinion + opinion = 10 + years = 10 + } + if = { + limit = { + has_lifestyle = stewardship_lifestyle + } + add_stewardship_lifestyle_xp = minor_lifestyle_xp + } + else = { + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + } + } + } + coronation_seize_advantages = { + if = { + limit = { + government_allows = administrative + top_liege = involved_activity.activity_host + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + } + if = { + limit = { + NOT = { + has_activity_intent = coronation_offer_support + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:host + opinion = 15 + } + } + + custom_tooltip = ach_coronation.0016.reward.tt +} + +ach_coronation.0016 = { + type = activity_event + title = ach_coronation.0016.t + desc = ach_coronation.0016.desc + theme = coronation_activity + + left_portrait = { + character = root + animation = obsequious_bow + } + + right_portrait = { + character = scope:host + animation = interested + } + + artifact = { + trigger = { exists = scope:gifted_artifact } + target = scope:gifted_artifact + position = lower_center_portrait + } + + cooldown = { years = 1 } + + override_background = { reference = throne_room } + + trigger = { + is_physically_able = yes + involved_activity = { + activity_host = { + this != root + is_ai = yes + } + any_attending_character = { + ach_coronation_0016_can_be_swayed_trigger = yes + this != root + } + } + + NOR = { + trigger_if = { + limit = { + is_ai = yes + } + is_in_guest_subset = { name = detractor } + } + trigger_else = { + involved_activity = { + is_target_in_variable_list = { + name = major_detractor + target = root + } + } + } + has_activity_intent = coronation_disrupt_loyalists + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + ordered_attending_character = { + limit = { + ach_coronation_0016_can_be_swayed_trigger = yes + this != root + } + order_by = { + value = 0 + add = "opinion(root)" + subtract = "opinion(scope:host)" + if = { # Prefer powerful vassals + limit = { is_powerful_vassal = no } + multiply = 0.75 + } + } + save_scope_as = detractor + } + } + + if = { + limit = { + any_character_artifact = { + ach_coronation_0016_eligible_artifact = yes + } + } + ordered_character_artifact = { # Try and give away the worst one first + order_by = { + value = 1 + if = { + limit = { + is_equipped = no + } + add = 100 + } + if = { + limit = { + rarity = common + } + add = 15 + } + if = { + limit = { + rarity = masterwork + } + add = 10 + } + if = { + limit = { + rarity = famed + } + add = 5 + } + if = { + limit = { + NOT = { creator = root } + } + add = 10 + } + } + save_scope_as = gifted_artifact + } + } + } + + option = { # A: Martial - Promise Troops + name = ach_coronation.0016.a.martial + trigger = { + highest_skill = martial + martial >= good_skill_level + } + + scope:host = { + if = { + limit = { + root = { government_has_flag = government_is_nomadic } + } + spawn_army = { + name = event_troop_default_name + location = capital_province + inheritable = no + men_at_arms = { + type = nomadic_riders + stacks = { + value = gok_nomadic_riders_small_value + divide = 6 + } + } + men_at_arms = { + type = steppe_raiders + stacks = 2 + } + } + } + else = { + spawn_army = { + name = event_troop_default_name + location = capital_province + inheritable = no + levies = { + add = max_military_strength + multiply = 0.20 + } + men_at_arms = { + type = pikemen_unit + stacks = 2 + } + } + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = ach_coronation_expended_resources_martial_nomad_modifier + years = 5 + } + } + else = { + add_character_modifier = { + modifier = ach_coronation_expended_resources_martial_modifier + years = 5 + } + } + add_martial_lifestyle_xp = minor_lifestyle_xp + + liege_reward_effect = yes + + ai_chance = { + base = 100 + } + } + + option = { # A: Stewardship - Organize Donations + name = ach_coronation.0016.a.stewardship + trigger = { + highest_skill = stewardship + stewardship >= good_skill_level + } + + if = { + limit = { has_trait = greedy } + # Custom tooltip since flavor text isn't triggerable + custom_tooltip = ach_coronation.0016.a.stewardship.greedy.tt + } + else = { + pay_short_term_gold = { + target = scope:host + gold = tiny_gold_value + } + } + involved_activity = { + every_attending_character = { + limit = { + is_ai = yes + this != root + is_vassal_or_below_of = scope:host + NOT = { has_trait = disloyal } + } + custom = every_non_disloyal_vassal_attendee_tt + pay_short_term_gold = { + target = scope:host + gold = tiny_gold_value + } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + liege_reward_effect = yes + + ai_chance = { + base = 100 + } + } + + option = { # A: Diplomacy - Turn a Detractor + name = ach_coronation.0016.a.diplomacy + trigger = { + highest_skill = diplomacy + diplomacy >= good_skill_level + exists = scope:detractor + } + + involved_activity = { + every_attending_character = { + custom = every_detractor_tt + limit = { is_in_guest_subset = { name = detractor } } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:detractor } + scope:detractor = { + add_opinion = { + target = scope:host + modifier = impressed_opinion + opinion = 20 + } + } + liege_reward_effect = yes + } + + option = { # A: Intrigue - Offer Spies + name = ach_coronation.0016.a.intrigue + trigger = { + highest_skill = intrigue + intrigue >= good_skill_level + } + + scope:host = { + add_character_modifier = { + modifier = ach_coronation_little_birds_modifier + years = 5 + } + if = { + limit = { has_trait = paranoid } + add_stress = medium_stress_loss + } + } + add_character_modifier = { + modifier = ach_coronation_expended_resources_intrigue_modifier + years = 5 + } + liege_reward_effect = yes + add_intrigue_lifestyle_xp = minor_lifestyle_xp + + ai_chance = { + base = 100 + modifier = { + has_trait = schemer + add = 25 + } + } + } + + option = { # A: Learning - Appeal to Church + name = ach_coronation.0016.a.learning + trigger = { + highest_skill = learning + learning >= good_skill_level + } + + scope:host = { + add_character_modifier = { + modifier = ach_coronation_theocratic_allies_modifier + years = 5 + } + } + liege_reward_effect = yes + add_piety = medium_piety_loss + + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 50 + } + } + } + + option = { # A: Fallback - Become Loyal and give a hook + name = ach_coronation.0016.a.loyal + + trigger = { + NOR = { + martial >= good_skill_level + stewardship >= good_skill_level + diplomacy >= good_skill_level + intrigue >= good_skill_level + learning >= good_skill_level + } + NOR = { + has_trait = loyal + has_trait = disloyal + } + } + + add_trait = loyal + scope:host = { + add_hook = { + type = loyalty_hook + target = root + } + } + liege_reward_effect = yes + + ai_chance = { + base = 100 + modifier = { + has_trait = ambitious + add = 75 + } + modifier = { + has_trait = content + add = 75 + } + modifier = { + has_trait = lazy + add = 50 + } + } + stress_impact = { + base = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + content = medium_stress_impact_loss + lazy = medium_stress_impact_loss + } + } + option = { # B: Host has Impress Attendees + name = ach_coronation.0016.b.impress_attendees + name = { + trigger = { + OR = { + has_trait = lifestyle_poet + has_court_position = court_musician_court_position + has_court_position = court_poet_court_position + } + } + text = ach_coronation.0016.b.impress_attendees.writer + } + trigger = { + scope:host = { has_activity_intent = coronation_impress_attendees } + prestige_level >= high_prestige_level + } + involved_activity = { + every_attending_character = { + custom = activity_every_attendee_tt + add_opinion = { + target = scope:host + modifier = impressed_opinion + opinion = 10 + } + } + } + reason = prestige_level + reason = host_activity_intent + + liege_reward_effect = yes + if = { + limit = { + NOT = { + has_activity_intent = coronation_seize_advantages + } + } + add_prestige = medium_prestige_loss + } + else = { + add_stress = minor_stress_gain + } + } + + option = { # B: Host has Embrace Supporters + name = ach_coronation.0016.b.bonds + trigger = { + scope:host = { has_activity_intent = coronation_embrace_supporters } + OR = { + diplomacy > medium_skill_rating + has_trait = gregarious + } + is_in_guest_subset = { name = supporter } + } + reason = host_activity_intent + scope:host = { + add_prestige = minor_prestige_gain + } + liege_reward_effect = yes + involved_activity = { + every_attending_character = { + custom = every_supporter_activity + limit = { is_in_guest_subset = { name = supporter } } + add_prestige = minor_prestige_gain + } + } + if = { + limit = { + NOT = { + has_activity_intent = coronation_seize_advantages + } + } + add_prestige = medium_prestige_loss + } + else = { + add_stress = minor_stress_gain + } + } + + option = { # C: Give artifact + name = ach_coronation.0016.c.artifact + trigger = { exists = scope:gifted_artifact } + + scope:gifted_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_variable = { + name = gifted_artifact + value = yes + days = 1825 + } + set_owner = { + target = scope:host + history = { + location = root.location + actor = root + recipient = scope:host + type = given + } + } + } + liege_reward_effect = yes + if = { + limit = { + scope:gifted_artifact = { + OR = { + rarity = illustrious + rarity = famed + } + } + } + dynasty ?= { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + } + else_if = { + limit = { + scope:gifted_artifact = { + rarity = masterwork + } + } + dynasty ?= { + add_dynasty_prestige = miniscule_dynasty_prestige_gain + } + } + + + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -25 + } + modifier = { + has_trait = avaricious + add = -25 + } + modifier = { + has_trait = disloyal + add = -50 + } + modifier = { + has_trait = loyal + add = 50 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + disloyal = medium_stress_impact_gain + loyal = medium_stress_impact_loss + } + } + + option = { # C: Fallback: Give gold + name = ach_coronation.0016.c.gold + + trigger = { + NOT = { exists = scope:gifted_artifact } + } + + pay_short_term_gold = { + gold = medium_gold_value + target = scope:host + } + liege_reward_effect = yes + + ai_chance = { + base = 100 + # More likely if you actually have a chance + modifier = { + has_trait = avaricious + add = -50 + } + modifier = { + has_trait = generous + add = 25 + } + modifier = { + has_trait = greedy + add = -25 + } + modifier = { + has_trait = loyal + add = 50 + } + modifier = { + has_trait = disloyal + add = -50 + } + modifier = { + has_trait = improvident + add = 50 + } + } + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + improvident = medium_stress_impact_loss + loyal = medium_stress_impact_loss + disloyal = medium_stress_impact_gain + } + } + + option = { # D: I'm good, thanks + name = { + trigger = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } } + text = ach_coronation.0016.d.hate + } + name = ach_coronation.0016.d + + if = { + limit = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:host } + } + reverse_add_opinion = { + target = scope:host + modifier = insulted_opinion + opinion = -5 + } + } + + ai_chance = { + base = 100 + # More likely if you actually have a chance + modifier = { + has_trait = greedy + add = 25 + } + modifier = { + has_trait = disloyal + add = 25 + } + modifier = { + has_trait = loyal + add = -25 + } + } + stress_impact = { + greedy = minor_stress_impact_loss + disloyal = minor_stress_impact_loss + loyal = minor_stress_impact_gain + } + } +} + +###################### +# Guest: faith_warrior reacts to the coronation of a non-crusader_king +# by Jay Zaborowski +# 0017 +scripted_trigger ach_coronation_0017_crusader_trigger = { + OR = { + has_trait = faith_warrior + has_trait = crusader_king + } +} + +ach_coronation.0017 = { + type = activity_event + title = ach_coronation.0017.t + desc = { + desc = ach_coronation.0017.desc + first_valid = { + triggered_desc = { # You're the host and not in immediate danger + trigger = { + scope:guest = { ach_coronation_0017_crusader_trigger = yes } + } + desc = ach_coronation.0017.ending.crusader + } + desc = ach_coronation.0017.ending.civilian + } + } + + left_portrait = { + character = root + animation = dismissal + camera = camera_event_group_talking_left_left + } + + center_portrait = { + character = scope:guest + animation = interested_left + camera = camera_event_group_talking_left_center + } + + right_portrait = { + character = scope:host + animation = prayer + camera = camera_event_kneeling + } + + theme = coronation_activity + + cooldown = { years = 1 } + + override_background = { + reference = temple + } + + trigger = { + # Crusades are a thing + religion = { + exists = var:variable_ghw_unlocked + } + # You're some brand of crusader + ach_coronation_0017_crusader_trigger = yes + involved_activity = { + # This beta-ruler dork is not + activity_host = { + is_ai = yes + religion = root.religion + # Can be a Faith Warrior but isn't + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this } + ach_coronation_0017_crusader_trigger = no + # And is of fighting age + is_adult = yes + is_old_character = no + } + # Make sure there's actually someone to talk to + any_attending_character = { + is_available_in_activity_trigger = yes + this != root + this != involved_activity.activity_host + } + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { + is_available_in_activity_trigger = yes + this != root + this != scope:host + } + weight = { + base = 1 + # Prefer interesting characters + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + # Prefer pot-stirrers + modifier = { + OR = { + has_trait = deceitful + has_trait = education_intrigue + has_trait = schemer + has_activity_intent = coronation_disrupt_loyalists + AND = { + is_ai = yes + is_in_guest_subset = { name = detractor } + } + } + add = 10 + } + # And someone who's willing to talk to you + opinion_modifier = { + opinion_target = root + multiplier = 0.5 + } + # And who's willing to talk trash about the Host + opinion_modifier = { + opinion_target = scope:host + multiplier = -1 + } + # And who isn't also a crusader + modifier = { + factor = 0.5 + ach_coronation_0017_crusader_trigger = yes + } + } + save_scope_as = guest + } + } + } + + option = { # Offer Support - You give an endorsement + name = { + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + text = ach_coronation.0017.a.christian + } + name = ach_coronation.0017.a + + trigger = { + has_activity_intent = coronation_offer_support + prestige_level >= 3 + } + show_as_unavailable = { has_activity_intent = coronation_offer_support } + reason = activity_intent + add_internal_flag = special + + add_prestige = medium_prestige_gain # Good publicity + add_piety = medium_piety_loss + + scope:host = { + add_opinion = { + target = root + modifier = appreciation_opinion + opinion = 20 + } + if = { + limit = { + opinion = { + target = root + value > 20 + } + OR = { + is_ai = yes + AND = { + root = { is_ai = no } + is_ai = no + } + } + } + progress_towards_friend_effect = { + REASON = friend_crusader_endorsement + CHARACTER = root + OPINION = 0 + } + } + else = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + add_prestige = major_prestige_gain + add_piety = medium_piety_gain + } + + involved_activity = { + every_attending_character = { + limit = { + is_vassal_of = scope:host + has_vassal_stance = zealot + # They don't know what it's really like out there, man + ach_coronation_0017_crusader_trigger = no + } + custom = every_zealot_vassal_guest_tt + add_opinion = { + target = scope:host + modifier = crusader_endorsement_opinion + } + } + every_attending_character = { + limit = { + # Thinks this is sort of denigrating + ach_coronation_0017_crusader_trigger = yes + this != root + } + custom = every_faith_warrior_guest_tt + add_opinion = { + target = root + modifier = crusader_sellout_opinion + } + } + } + + ai_chance = { + base = 200 # Offer Support means they probably want to do this + opinion_modifier = { + opinion_target = scope:host + } + # Cynical character's are less likely to do this + modifier = { + has_trait = cynical + factor = { + value = 0.5 # But hey, politics + # But some still won't misrepresent themselves + if = { + limit = { has_trait = honest } + add = -0.5 + } + # "What do you mean I was in it for the money? Me?" + if = { + limit = { + OR = { + has_trait = deceitful + has_trait = schemer + } + } + add = 0.5 + } + } + } + } + } + + option = { # Disrupt Loyalists - You publicly shame HerHim + name = ach_coronation.0017.b + + trigger = { + piety_level >= scope:host.piety_level + has_activity_intent = coronation_disrupt_loyalists + } + show_as_unavailable = { has_activity_intent = coronation_disrupt_loyalists } + reason = activity_intent + custom_tooltip = available_because_piety_vs_host_tt + + add_prestige = medium_prestige_gain + add_piety = major_piety_gain + + involved_activity = { + every_attending_character = { + limit = { + is_vassal_of = scope:host + has_vassal_stance = zealot + } + custom = every_zealot_vassal_guest_tt + add_opinion = { + target = scope:host + modifier = impious_opinion + opinion = -15 + } + } + } + scope:host = { + add_opinion = { + target = root + modifier = shamed_me_opinion + opinion = -25 + } + add_prestige = medium_prestige_loss + add_piety = medium_piety_loss + } + + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:host + multiplier = -1 + } + # Far more likely if Arrogant or Wrathful and they dislike the person + modifier = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + opinion = { + target = root + value < 0 + } + factor = 2 + } + # Opinion matters more than these but might tip the scales + modifier = { + has_trait = zealous + add = 15 + } + # Far less likely in general + modifier = { + has_trait = shy + factor = 0.5 + } + modifier = { + has_trait = humble + factor = 0.5 + } + modifier = { + has_trait = calm + factor = 0.5 + } + modifier = { + has_trait = compassionate + factor = 0.5 + } + # Cynical characters might just refuse to even think of it + modifier = { + has_trait = cynical + factor = { + value = 0 # Would never + # Would consider lying for clout + if = { + limit = { + intrigue >= low_skill_rating + NOT = { has_trait = honest } + } + add = 0.5 + } + # Would actually *looove* to lie about, like, anything really + if = { + limit = { + OR = { + has_trait = deceitful + has_trait = schemer + } + # But probably won't if they're chill + opinion = { + target = root + value > low_positive_opinion + } + } + multiply = 4 + } + } + } + } + stress_impact = { + # Doesn't care that much, but can be doing this cynically + cynical = minor_stress_impact_gain + # Doesn't like the attention + shy = minor_stress_impact_gain + humble = medium_stress_impact_gain + # Conflict-averse + calm = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + # Not so much + arrogant = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + zealous = minor_stress_impact_loss + } + } + + option = { # Bah, I shall focus on prayer + name = ach_coronation.0017.c + + add_piety = medium_piety_gain + add_character_modifier = { + modifier = ach_focusing_on_prayer_modifier + years = 5 + } + stress_impact = { + # Is annoyed by it + base = medium_stress_impact_gain + # Does *not* want to pray, actually + cynical = major_stress_impact_gain + # Is *very* annoyed by it + arrogant = minor_stress_impact_gain + # But it's not all bad + humble = minor_stress_impact_loss # Because I don't care *that* much + zealous = minor_stress_impact_loss # Because I love prayer + shy = minor_stress_impact_loss # Because if I pray you'll shut up + } + + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + has_trait = humble + factor = 2 + } + modifier = { + has_trait = zealous + factor = 2 + } + modifier = { + has_trait = shy + factor = 2 + } + modifier = { + has_trait = cynical + factor = 0 + } + } + } + + option = { # It's not a competition, fool! + name = ach_coronation.0017.d + name = { + trigger = { + OR = { + has_trait = cynical + has_trait = humble + has_trait = shy + } + NOT = { has_trait = arrogant } + } + text = ach_coronation.0017.d.cynical # Literally who cares + } + + # Not making a big deal of it is respected + add_prestige = minor_prestige_gain + add_piety = minor_piety_gain + scope:guest = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + + stress_impact = { + # No Zealot impact because the player can interpret this either way + arrogant = medium_stress_impact_gain # You *do* deserve it more + humble = medium_stress_impact_loss + shy = medium_stress_impact_loss # Actually it's sort of nice + } + + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + has_trait = humble + factor = 2 + } + modifier = { + has_trait = shy + factor = 2 + } + } + } +} + +###################### +# Guest: Close family member of Host sees opportunity +# 0018 +scripted_trigger ach_coronation_0018_eligible_family_member_trigger = { + #You can't just give stress and stuff to players + is_ai = yes + is_available_in_activity_trigger = yes + this != scope:host + is_close_or_extended_family_of = scope:host + NOT = { has_trait = disloyal } + trigger_if = { # For ach_coronation.0020 + limit = { is_ai = yes } + opinion = { + target = scope:host + value >= low_positive_opinion + } + } +} + +scripted_trigger ach_coronation_0018_grantable_title_trigger = { + tier = tier_county + this != scope:host.capital_county +} + +scripted_effect ach_coronation_0018_choose_title_effect = { + scope:host = { + random_held_title = { + limit = { ach_coronation_0018_grantable_title_trigger = yes } + weight = { + base = 100 + # Prefer worse titles + modifier = { + add = { + value = development_level + multiply = -1 + } + } + # Even more if it's some backwards other-language hellhole + modifier = { + culture != scope:host.culture + factor = 2 + } + modifier = { + faith != scope:host.faith + factor = 2 + } + } + save_scope_as = grantable_title + } + } +} + +ach_coronation.0018 = { + type = activity_event + title = ach_coronation.0018.t + desc = { + desc = ach_coronation.0018.desc + first_valid = { + triggered_desc = { # There's a Seneschal + trigger = { + scope:servant_boss = { has_court_position = seneschal_court_position } + } + desc = ach_coronation.0018.desc.seneschal + } + triggered_desc = { # There's a Steward + trigger = { + scope:servant_boss = { has_council_position = councillor_steward } + } + desc = ach_coronation.0018.desc.steward + } + triggered_desc = { # There is no Seneschal or Steward + trigger = { NOT = { exists = scope:servant_boss } } + desc = ach_coronation.0018.desc.fallback + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:servant_boss } + desc = ach_coronation.0018.desc.ending.servant_boss + } + desc = ach_coronation.0018.desc.ending.no_servant_boss + } + } + + left_portrait = { + character = root + animation = thinking + camera = camera_event_left + } + + center_portrait = { + character = scope:servant + triggered_animation = { + trigger = { exists = scope:servant_boss } + animation = throne_room_messenger_3 + } + animation = stress + camera = camera_event_right_pointing_left_fov50 + hide_info = yes + } + + right_portrait = { + character = scope:servant_boss + animation = stress + camera = camera_event_very_right_fov50 + } + + lower_left_portrait = { + character = scope:host + } + + weight_multiplier = { + base = 1 + # Far more likely if there is no Seneschal + modifier = { + NOT = { exists = court_position:seneschal_court_position } + factor = 3 + } + # If there is a Seneschal than low Aptitude raises likeliness + activity_court_position_aptitude_negative_modifier = { LIEGE = root POS = seneschal } + } + + theme = coronation_activity + + cooldown = { years = 1 } + override_background = { + trigger = { + #Do not want generic courtyard calling up Constantinople for this one + location.county = title:c_byzantion + } + reference = bp2_courtyard + } + override_background = { + reference = courtyard + } + + override_effect_2d = { + trigger = { exists = scope:rain_day } + reference = rain + } + + trigger = { + ach_coronation_0018_eligible_family_member_trigger = yes + coronation_hostile_to_host_trigger = no + involved_activity = { + activity_host = { + # Don't potentially screw over a player Seneschal + trigger_if = { + limit = { exists = court_position:seneschal_court_position } + court_position:seneschal_court_position = { is_ai = yes } + } + # If we need a Steward but they're absent, make sure they're not a player so we can teleport them + trigger_else = { + cp:councillor_steward ?= { is_ai = yes } + } + } + } + } + + immediate = { + # For the event art + create_character = { + save_scope_as = servant + employer = involved_activity.activity_host + template = servant_character + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + } + random_rain_snow_chance_effect = yes + + involved_activity = { + hidden_effect = { + if = { # Grab a secret for the opt-out option + limit = { + any_attending_character = { + this != root + is_available_in_activity_trigger = yes + any_secret = { + NOT = { is_known_by = root } + } + } + } + random_attending_character = { + limit = { + this != root + is_available_in_activity_trigger = yes + any_secret = { + NOT = { is_known_by = root } + } + } + save_scope_as = secret_holder + random_secret = { + limit = { NOT = { is_known_by = root } } + save_scope_as = secret_to_reveal + } + } + } + else = { # Create one if you can't find one + random_attending_character = { + limit = { + this != root + is_available_in_activity_trigger = yes + } + + weight = { + base = 1 + # Prefer interesting characters (but not by too much) + modifier = { + add = 4 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 2 + is_of_minor_interest_to_root_trigger = yes + } + } + + give_random_likely_secret_effect = yes + save_scope_as = secret_holder + random_secret = { + limit = { NOT = { is_known_by = root } } + save_scope_as = secret_to_reveal + } + } + } + activity_host = { + save_scope_as = host + if = { # If the Seneschal exists and isn't AI then they're the Servant Boss + limit = { + court_position:seneschal_court_position ?= { is_ai = yes } + } + court_position:seneschal_court_position = { save_scope_as = servant_boss } + } + else = { # Else it's the Steward + cp:councillor_steward = { + save_scope_as = servant_boss + } + } + } + scope:servant_boss = { + if = { # Teleport them if they're not at the coronation + limit = { location != scope:host.involved_activity.activity_location } + set_location = { location = scope:host.involved_activity.activity_location } + } + if = { # And add them to the activity if they're not in it + limit = { can_join_activity = scope:host.involved_activity } + add_to_activity_without_travel = scope:host.involved_activity + } + } + } + } + } + + option = { # A: Seize Advantages | Offer Support: Take charge of the servants + name = ach_coronation.0018.a.intent + reason = activity_intent + add_internal_flag = special + + trigger = { + OR = { + has_activity_intent = coronation_seize_advantages + has_activity_intent = coronation_offer_support + } + } + + if = { + limit = { has_trait = diligent } + custom_tooltip = because_you_have_diligent_tt + } + else = { + add_character_modifier = { + modifier = exhausted_modifier + years = 10 + } + } + + duel = { + skill = stewardship + value = average_skill_rating + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = ach_coronation.0018.a.tt_success + + custom_tooltip = ach_can_refuse_reward + + if = { # Offer a title + limit = { # Host has a title to give + scope:host = { + any_held_title = { ach_coronation_0018_grantable_title_trigger = yes } + # And doesn't hate you + NOR = { + opinion = { + target = scope:host + value <= medium_negative_opinion + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + # Host can actually give you the title + can_be_granted_titles_by = { RULER = scope:host } + # Host isn't giving a vassal more land just for being mildly helpful + is_landed = no + } + + custom_tooltip = ach_coronation.0018.a.tt.vassal + + hidden_effect = { + save_scope_value_as = { + name = reward_type + value = flag:title + } + } + } + else_if = { # Offer the Seneschal spot + limit = { + scope:host = { + can_appoint_char_to_court_position = { + CHAR = scope:host + COURT_POS = seneschal_court_position + } + } + } + + show_as_tooltip = { + court_position_grant_effect = { + POS = seneschal + EMPLOYER = scope:host + CANDIDATE = root + } + } + + hidden_effect = { + save_scope_value_as = { + name = reward_type + value = flag:court_position + } + } + } + else = { # Give public praise + show_as_tooltip = { + add_prestige = medium_prestige_gain + + involved_activity = { + every_attending_character = { + limit = { + this != root + this != scope:host + } + custom = every_guest_scope_tt + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + } + + hidden_effect = { + save_scope_value_as = { + name = reward_type + value = flag:praise + } + } + } + + send_interface_toast = { + title = ach_coronation.0018.a.tt_success + reverse_add_opinion = { + modifier = helpful_opinion + target = scope:host + opinion = 15 + } + hidden_effect = { + # Player gets a chance to refuse the reward + trigger_event = ach_coronation.0019 + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -9 + } + desc = ach_coronation.0018.a.tt_failure + send_interface_toast = { + title = ach_coronation.0018.a.tt_failure + stress_impact = { + base = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + lazy = medium_stress_impact_gain + diligent = medium_stress_impact_loss + } + + ai_chance = { + base = 150 + modifier = { + has_trait = diligent + add = 100 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = arrogant + add = -25 + } + } + } + + option = { # A: Try to help with preparations + name = ach_coronation.0018.a + skill = stewardship + + highlight_portrait = scope:servant_boss + + trigger = { + NOR = { + has_activity_intent = coronation_seize_advantages + has_activity_intent = coronation_offer_support + } + } + + if = { + limit = { + NOT = { has_trait = diligent } + } + add_character_modifier = { + modifier = exhausted_modifier + years = 10 + } + } + + # Does servant_boss feel like you did them a solid or tried to steal their job? + if = { + limit = { + exists = scope:servant_boss + } + if = { + limit = { # You're diplomatic and smooth things over + OR = { + has_trait = gregarious + has_trait = diplomat + } + } + custom_tooltip = ach_coronation.0018.diplomacy_trait.tt + send_interface_toast = { + title = ach_coronation.0018.d.pleased_servant_boss + left_icon = scope:servant_boss + reverse_add_opinion = { + modifier = thankful_opinion + target = scope:servant_boss + opinion = 25 + } + } + } + else_if = { + limit = { # They're not the type of person to perceive this as a slight + scope:servant_boss = { + NOR = { + has_trait = arrogant + has_trait = ambitious + has_trait = diligent + has_trait = vengeful + } + } + } + send_interface_toast = { + title = ach_coronation.0018.d.pleased_servant_boss + left_icon = scope:servant_boss + reverse_add_opinion = { + modifier = thankful_opinion + target = scope:servant_boss + opinion = 20 + } + } + } + else = { # Else they get annoyed + custom_tooltip = ach_coronation.0018.d.annoyed_servant_boss + send_interface_toast = { + title = ach_coronation.0018.d.annoyed_servant_boss + left_icon = scope:servant_boss + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:servant_boss + opinion = -20 + } + } + } + } + + duel = { + skill = stewardship + value = average_skill_rating + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + desc = ach_coronation.0018.a.tt_success + send_interface_toast = { + title = ach_coronation.0018.a.tt_success + scope:host = { + add_opinion = { + modifier = helpful_opinion + target = root + opinion = 15 + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -9 + } + desc = ach_coronation.0018.a.tt_failure + send_interface_toast = { + title = ach_coronation.0018.a.tt_failure + stress_impact = { + base = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + } + } + + stress_impact = { + # Work is hard + base = minor_stress_impact_gain + # But not for some + diligent = medium_stress_impact_loss + # And for others it's worth it + ambitious = minor_stress_impact_loss + # Doesn't want the clout + content = minor_stress_impact_gain + # This sounds a lot like labor + arrogant = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = diligent + add = 25 + } + modifier = { + has_trait = ambitious + add = 25 + } + modifier = { + has_trait = content + add = -25 + } + modifier = { + has_trait = arrogant + add = -25 + } + modifier = { + has_trait = lazy + add = -50 + } + } + } + + option = { # B: Gossip with the servants instead + name = ach_coronation.0018.b + skill = intrigue + + highlight_portrait = scope:servant + + duel = { + skill = intrigue + value = average_skill_rating + 75 = { + desc = ach_coronation.0018.b.tt.gossip_with_servants + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + show_chance = no + send_interface_toast = { + title = ach_coronation.0018.b.tt.gossip_with_servants + left_icon = root + add_character_modifier = { + modifier = ach_coronation_gossips_with_servants_modifier + years = 5 + } + } + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + min = 10 + show_chance = no + desc = ach_coronation.0018.b.tt.secret_unknown_desc + custom_tooltip = ach_coronation.0018.b.tt.secret_unknown + hidden_effect = { + send_interface_toast = { + title = ach_coronation.0018.b.tt.secret + left_icon = root + scope:secret_to_reveal = { + expose_secret = root + } + } + } + } + } + stress_impact = { + gregarious = minor_stress_impact_loss + # Sitting around and talking sucks, actually + impatient = minor_stress_impact_gain + shy = minor_stress_impact_gain + diligent = minor_stress_impact_gain + # Doesn't want to talk to poors + arrogant = medium_stress_impact_gain + # Looooves gossip + schemer = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 25 + } + modifier = { + has_trait = gregarious + add = 25 + } + modifier = { + has_trait = impatient + factor = 0.5 + } + modifier = { + has_trait = diligent + NOR = { # Only wasting time if gossiping isn't your whole deal + has_trait = education_intrigue + has_trait = deceitful + has_trait = schemer + } + factor = 0.5 + } + modifier = { + has_trait = shy + factor = 0.5 + } + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + OR = { + has_trait = education_intrigue + has_trait = deceitful + has_trait = schemer + } + factor = 2 + } + } + } + + option = { # C: Stewardship Lifestyle: Study the ceremony + name = ach_coronation.0018.c + trigger = { + has_lifestyle = stewardship_lifestyle + } + skill = stewardship + reason = lifestyle + + highlight_portrait = scope:servant + highlight_portrait = scope:servant_boss + + add_stewardship_lifestyle_xp = minor_lifestyle_xp + add_character_modifier = { + modifier = ach_coronation_studying_ceremony_modifier + years = 5 + } + + stress_impact = { + diligent = minor_stress_impact_loss + # Super down for not talking + shy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + has_trait = diligent + add = 25 + } + modifier = { + has_trait = shy + add = 25 + } + } + } + + option = { # D: Just chill + name = ach_coronation.0018.d + + highlight_portrait = root + + stress_impact = { + base = medium_stress_impact_loss + # Wants to do something + diligent = minor_stress_impact_gain + # Who really wants Host's approval? + content = minor_stress_impact_loss + # Super down for not talking + shy = minor_stress_impact_loss + # Doing *absolutely* nothing is based + lazy = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + has_trait = content + add = 25 + } + modifier = { + has_trait = shy + add = 25 + } + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = diligent + factor = 0.5 + } + } + } + + after = { + hidden_effect = { + scope:servant = { silent_disappearance_effect = yes } + } + } +} + +ach_coronation.0019 = { + type = letter_event + opening = { + desc = ach_coronation.0019.opening + } + desc = { + # Opening + desc = ach_coronation.0019.desc + first_valid = { + triggered_desc = { + trigger = { scope:reward_type = flag:title } + desc = ach_coronation.0019.desc.title + } + triggered_desc = { + trigger = { scope:reward_type = flag:court_position } + desc = ach_coronation.0019.desc.court_position + } + desc = ach_coronation.0019.desc.praise + } + } + + sender = scope:host + + immediate = { ach_coronation_0018_choose_title_effect = yes } + + option = { # Accept + name = ach_coronation.0019.a + + switch = { + trigger = scope:reward_type + flag:title = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:grantable_title = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + custom_tooltip = { + text = your_title_cannot_be_revoked_10_tt + root = { + add_character_flag = { + flag = titles_protected + years = 10 + } + } + } + } + flag:court_position = { + court_position_grant_effect = { + POS = seneschal + EMPLOYER = scope:host + CANDIDATE = root + } + if = { + limit = { + scope:servant_boss = { has_court_position = seneschal_court_position } + OR = { + scope:servant_boss = { is_ai = yes } + AND = { + scope:servant_boss = { + is_ai = no + } + is_ai = no + } + } + } + scope:servant_boss = { + progress_towards_rival_effect = { + REASON = rival_jealousy_at_court + CHARACTER = root + OPINION = -30 + } + } + } + } + flag:praise = { + add_prestige = medium_prestige_gain + + involved_activity = { + every_attending_character = { + limit = { + this != root + this != scope:host + } + custom = every_guest_scope_tt + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + } + } + + ai_chance = { + base = 150 + modifier = { + add = -50 + scope:reward_type = flag:title + has_trait = content + } + modifier = { + add = -50 + scope:reward_type = flag:court_position + has_trait = lazy + } + modifier = { + add = -50 + scope:reward_type = flag:praise + has_trait = shy + } + } + } + + option = { # Ask for gold instead + name = ach_coronation.0019.b + trigger = { + scope:host = { is_ai = yes } # The player doesn't need a multi-event back and forth over this + } + scope:host = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + pay_short_term_gold = { + gold = minor_gold_value + target = root + } + } + + ai_chance = { + base = 50 + modifier = { + add = 50 + scope:reward_type = flag:praise + has_trait = greedy # No money in praise + } + modifier = { + add = 50 + scope:reward_type = flag:praise + has_activity_intent = coronation_seize_advantages + } + } + } + + option = { # Their friendship is enough + name = ach_coronation.0019.c + if = { + limit = { + reverse_opinion = { + target = scope:host + value > 20 + } + OR = { + scope:host = { is_ai = yes } + AND = { + scope:host = { is_ai = no } + is_ai = no + } + } + } + progress_towards_friend_effect = { + CHARACTER = scope:host + REASON = friend_supported_host_during_coronation + OPINION = default_friend_opinion + } + } + else = { + reverse_add_opinion = { + target = scope:host + modifier = friendliness_opinion + opinion = 25 + } + } + + ai_chance = { + base = 0 + modifier = { + add = 100 + has_trait = humble + } + modifier = { + add = 50 + scope:reward_type = flag:praise + has_trait = shy + } + modifier = { + add = 50 + has_activity_intent = coronation_offer_support + } + } + } +} + +###################### +# Host: Close family member helps manage the coronation +# by Jay Zaborowski +# 0020 +ach_coronation.0020 = { + type = activity_event + title = ach_coronation.0020.t + desc = ach_coronation.0020.desc + + left_portrait = { + character = scope:annoying_servant + animation = stunned + camera = camera_event_very_right_pointing_very_left + hide_info = yes + } + + center_portrait = { + character = scope:helpful_family + animation = stayback + camera = camera_event_right_pointing_very_right + } + + right_portrait = { + character = scope:host + triggered_animation = { + trigger = { OR = { scope:host.religion = religion:eastern_orthodox_religion scope:host.religion = religion:catholic_religion scope:host.religion = religion:protestant_religion } } + animation = emotion_thinking_scepter + } + triggered_animation = { + trigger = { NOT = { OR = { scope:host.religion = religion:eastern_orthodox_religion scope:host.religion = religion:catholic_religion scope:host.religion = religion:protestant_religion } } } + animation = thinking + } + camera = camera_event_very_left_pointing_right + } + + theme = coronation_activity + + cooldown = { years = 1 } + + override_background = { + reference = corridor_day + } + + trigger = { + involved_activity = { + any_attending_character = { + ach_coronation_0018_eligible_family_member_trigger = yes + } + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { + ach_coronation_0018_eligible_family_member_trigger = yes + } + weight = { + base = 1 + opinion_modifier = { + opinion_target = scope:host + multiplier = 0.25 + } + modifier = { + add = sum_of_all_skills_value + } + modifier = { # Prefer close family + is_close_family_of = root + add = 20 + } + modifier = { + has_trait = ambitious + add = 10 + } + modifier = { + has_trait = diligent + add = 10 + } + # If making them a vassal is on the table, try and get someone who is eligible + modifier = { + trigger_if = { + limit = { + root = { + has_activity_intent = coronation_embrace_supporters + any_held_title = { ach_coronation_0018_grantable_title_trigger = yes } + } + NOT = { can_be_granted_titles_by = { RULER = root } } + } + } + factor = 0.1 + } + } + save_scope_as = helpful_family + add_character_modifier = { + modifier = exhausted_modifier + years = 10 + } + if = { + limit = { + has_trait = diligent + } + add_stress = minor_stress_gain + } + else = { + add_stress = major_stress_gain + } + } + } + + ach_coronation_0018_choose_title_effect = yes + + if = { # Grab a courtier for the background + limit = { + any_courtier_or_guest = { + this != scope:helpful_family + this != root + is_available_in_activity_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + this != scope:helpful_family + this != root + is_available_in_activity_trigger = yes + } + save_scope_as = annoying_servant + } + } + else_if = { # If there wasn't one grab a pool char + limit = { + any_pool_character = { + province = involved_activity.activity_location + this != scope:helpful_family + this != root + is_available_in_activity_trigger = yes + } + } + random_pool_character = { + province = involved_activity.activity_location + limit = { + this != scope:helpful_family + this != root + is_available_in_activity_trigger = yes + } + save_scope_as = annoying_servant + } + } + else = { # Else, make one + create_character = { + save_scope_as = annoying_servant + employer = root + template = servant_character + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + } + add_character_flag = created_character_ach_coronation_0020 + } + } + + option = { # A: Embrace Supporters: They would be a loyal vassal! + name = ach_coronation.0020.a + reason = activity_intent + add_internal_flag = special + + trigger = { + has_activity_intent = coronation_embrace_supporters + exists = scope:grantable_title + scope:helpful_family = { + can_be_granted_titles_by = { RULER = root } + } + } + show_as_unavailable = { + AND = { + has_activity_intent = coronation_embrace_supporters + exists = scope:grantable_title + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:grantable_title = { + change_title_holder = { + holder = scope:helpful_family + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + coronation_move_towards_supporter_effect = { CHARACTER = scope:helpful_family } + + custom_tooltip = { + text = character_title_cannot_be_revoked_tt + scope:helpful_family = { + add_character_flag = { + flag = titles_protected + years = 10 + } + } + } + + scope:helpful_family = { + add_trait = loyal + add_opinion = { + modifier = loyalty_opinion + target = scope:host + opinion = 25 + } + } + add_hook = { + target = scope:helpful_family + type = loyalty_hook + } + + coronation_embrace_supporters_opinion_effect = yes + } + + option = { # B: Family First: This is how we do things in my dynasty! + name = ach_coronation.0020.b + trait = family_first + + trigger = { has_trait = family_first } + show_as_unavailable = { always = yes } + + every_close_family_member = { + custom = every_family_member_tt + limit = { + NOT = { this = root } + } + add_opinion = { + target = root + modifier = love_opinion + opinion = 20 + } + } + dynasty ?= { + add_dynasty_modifier = { + modifier = ach_familial_support_modifier + years = 10 + } + } + } + + option = { # C: They truly are a great GetRelationToMe + name = ach_coronation.0020.c + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:helpful_family } + reverse_opinion = { + target = scope:helpful_family + value > 20 + } + OR = { + scope:helpful_family = { is_ai = yes } + AND = { + scope:helpful_family = { is_ai = no } + is_ai = no + } + } + } + set_relation_potential_friend = scope:helpful_family + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:helpful_family } + scope:helpful_family = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 20 + } + } + } + + option = { # D: They're a model for all my subjects + name = ach_coronation.0020.d + add_prestige = minor_prestige_gain + } + + after = { + add_stress = medium_stress_loss + if = { + limit = { has_character_flag = created_character_ach_coronation_0020 } + hidden_effect = { + scope:annoying_servant = { silent_disappearance_effect = yes } + remove_character_flag = created_character_ach_coronation_0020 + } + } + } +} + +###################### +# Guest: An ongoing plague has shaken a zealous guest +# by Jay Zaborowski +# 0022 +scripted_trigger ach_coronation_0022_valid_zealot_trigger = { + is_ai = yes + faith = scope:host.faith + highest_held_title_tier >= tier_county + OR = { + has_trait = zealous + trigger_if = { + limit = { is_vassal_or_below_of = scope:host } + has_vassal_stance = zealot + } + } + NOR = { + this = scope:host + this = root + has_trait = cynical + has_trait = loyal + # Don't want anyone who wouldn't listen to you + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } +} + +scripted_trigger ach_coronation_0022_loose_zealot_trigger = { + is_ai = yes + faith = involved_activity.activity_host.faith + highest_held_title_tier >= tier_county + OR = { + ai_zeal >= low_positive_ai_value + has_trait = zealous + trigger_if = { + limit = { is_vassal_or_below_of = involved_activity.activity_host } + has_vassal_stance = zealot + } + has_trait = lifestyle_mystic + has_trait = paranoid + has_trait = craven + has_trait = devoted + } + NOR = { + this = involved_activity.activity_host + this = root + has_trait = cynical + # Don't want anyone who wouldn't listen to you + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } +} + +ach_coronation.0022 = { + type = activity_event + title = ach_coronation.0022.t + desc = { + desc = ach_coronation.0022.desc + first_valid = { + triggered_desc = { + trigger = { scope:host = { primary_title = title:e_byzantium } } + desc = ach_coronation.0022.desc.whisper.byzantine + } + triggered_desc = { + trigger = { scope:host = { primary_title = title:e_hre } } + desc = ach_coronation.0022.desc.whisper.hre + } + triggered_desc = { + trigger = { scope:host = { num_sinful_traits >= 2 } } + desc = ach_coronation.0022.desc.whisper.sinner + } + triggered_desc = { + trigger = { scope:host.culture = { has_innovation = innovation_divine_right } } + desc = ach_coronation.0022.desc.whisper.divine_right + } + desc = ach_coronation.0022.desc.whisper.fallback + } + desc = ach_coronation.0022.desc.ending + } + theme = coronation_activity + + override_background = { + reference = temple + } + + cooldown = { years = 1 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_activity_intent = coronation_disrupt_loyalists } + animation = interested + } + animation = thinking + } + right_portrait = { + character = scope:zealot + animation = prayer + camera = camera_event_very_right_close + } + + trigger = { + involved_activity = { + activity_host = { + save_temporary_scope_as = host_temp + is_ai = yes + # Ongoing plague + any_sub_realm_county = { + count >= 3 + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity > minor + } + } + } + } + any_attending_character = { + ach_coronation_0022_loose_zealot_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = coronation_disrupt_loyalists + factor = 2 + } + modifier = { + has_activity_intent = coronation_offer_support + factor = 2 + } + modifier = { + involved_activity = { + activity_host = { + # Ongoing plague + any_sub_realm_county = { + count >= 10 + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity > minor + } + } + } + } + } + factor = 2 + } + modifier = { + involved_activity = { + activity_host = { + # Ongoing plague + any_sub_realm_county = { + count >= 3 + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity > major + } + } + } + } + } + factor = 2 + } + modifier = { + involved_activity = { + activity_location = { + any_province_epidemic = { + count >= 1 + outbreak_intensity > minor + } + } + } + factor = 2 + } + } + + immediate = { + involved_activity = { + activity_host = { + save_scope_as = host + # Get the ongoing plague + if = { + limit = { + any_sub_realm_county = { + count >= 4 + any_county_province = { + any_province_epidemic = { + count >= 1 + outbreak_intensity = apocalyptic + } + } + } + } + get_random_realm_epidemic = { INTENSITY = apocalyptic } + } + else = { + get_random_realm_epidemic = { INTENSITY = major } + } + # Get the Faction if that's part of it + if = { + limit = { + root = { has_activity_intent = coronation_disrupt_loyalists } + } + random_targeting_faction = { + limit = { + any_faction_member = { this = root } + #Won't join a bunch of heretics + trigger_if = { + limit = { faction_is_type = claimant_faction } + special_character.faith ?= scope:host.faith + } + trigger_if = { + limit = { faction_is_type = populist_faction } + var:faction_faith ?= scope:host.faith + } + } + save_scope_as = faction + } + } + } + + # Grab yer zealot + random_attending_character = { + # Try and get someone who can join the faction if that's relevant + limit = { + exists = scope:faction + can_join_faction = scope:faction + ach_coronation_0022_valid_zealot_trigger = yes + } + alternative_limit = { + ach_coronation_0022_valid_zealot_trigger = yes + } + alternative_limit = { + ach_coronation_0022_loose_zealot_trigger = yes + } + weight = { + base = 1 + # Prefer vassals + modifier = { + add = { + value = 5 + if = { + limit = { is_powerful_vassal_of = scope:host } + add = 10 + } + } + is_vassal_of = scope:host + } + # Prefer interesting characters + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + # Who would also likely be afeared + modifier = { + add = 5 + has_trait = craven + } + # And not those who wouldn't be + modifier = { + add = -15 + has_trait = brave + } + # Clergy members are also nice + modifier = { + add = 5 + is_clergy = yes + } + # As are Zealot Vassal Stancers + modifier = { + add = 5 + is_vassal_of = scope:host + has_vassal_stance = zealot + } + # Weightings for zealotry + modifier = { + add = { + value = ai_zeal + multiply = 0.2 # Don't want it to overwhelm other factors + } + } + # Prefer rulers who already dislike the host + opinion_modifier = { + opinion_target = scope:host + multiplier = -0.2 # Don't want it to overwhelm other factors + } + } + save_scope_as = zealot + assign_quirk_effect = yes + } + } + } + + option = { # This is that bastard host's fault! + name = ach_coronation.0022.a.coronation_disrupt_loyalists + trigger = { + has_activity_intent = coronation_disrupt_loyalists + exists = scope:faction + scope:zealot = { + can_join_faction = scope:faction + opinion = { + target = scope:host + value <= 60 + } + } + } + custom_tooltip = available_because_intent_tt + flavor = ach_coronation.0022.a.coronation_disrupt_loyalists.flavor + reason = activity_intent + skill = diplomacy + + add_piety = medium_piety_loss + reverse_add_opinion = { + target = scope:host + modifier = opposition_opinion + opinion = -20 + } + + duel = { + skills = { diplomacy learning } + target = scope:zealot + 50 = { # You convert them! + desc = ach_coronation.0022.a.coronation_disrupt_loyalists.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + modifier = { + has_perk = theologian_perk + add = 25 + } + modifier = { + has_trait = zealous + add = 25 + } + modifier = { + scope:zealot = { + opinion = { + target = scope:host + value < -50 + } + } + add = 25 + } + modifier = { + scope:zealot = { + opinion = { + target = scope:host + value < 0 + } + } + add = 15 + } + send_interface_toast = { + title = ach_coronation.0022.a.coronation_disrupt_loyalists.success + left_icon = root + right_icon = scope:zealot + + scope:zealot = { join_faction = scope:faction } + coronation_move_towards_detractor_effect = { CHARACTER = scope:zealot } + } + } + 50 = { # You fail + desc = ach_coronation.0022.a.coronation_disrupt_loyalists.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + modifier = { + scope:zealot = { + opinion = { + target = scope:host + value > 0 + } + } + add = 25 + } + modifier = { + scope:zealot = { + opinion = { + target = scope:host + value > 30 + } + } + add = 25 + } + send_interface_toast = { + title = ach_coronation.0022.a.coronation_disrupt_loyalists.failure + left_icon = root + right_icon = scope:zealot + + reverse_add_opinion = { + target = scope:zealot + modifier = outraged_opinion + opinion = -20 + } + } + } + } + + ai_chance = { + base = 150 + modifier = { + has_trait = disloyal + add = 50 + } + modifier = { + has_trait = schemer + add = 50 + } + } + } + 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 + flavor = ach_coronation.0022.a.offer_support.flavor + + add_piety = medium_piety_loss + + duel = { + skills = { diplomacy learning } + target = scope:zealot + 50 = { # They are more loyal than ever + desc = ach_coronation.0022.a.offer_support.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + modifier = { + has_perk = theologian_perk + add = 25 + } + modifier = { + has_trait = zealous + add = 25 + } + send_interface_toast = { + title = ach_coronation.0022.a.offer_support.success + left_icon = root + right_icon = scope:zealot + + random = { + chance = 20 + scope:zealot = { + add_trait = loyal + } + } + + reverse_add_opinion = { + target = scope:zealot + modifier = comforted_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:host + modifier = helpful_opinion + opinion = 20 + } + scope:zealot = { + add_opinion = { + target = scope:host + modifier = loyalty_opinion + opinion = 30 + } + } + coronation_move_towards_supporter_effect = { CHARACTER = scope:zealot } + } + } + 50 = { # You fail + desc = ach_coronation.0022.a.offer_support.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = ach_coronation.0022.a.offer_support.failure + left_icon = root + right_icon = scope:zealot + + reverse_add_opinion = { + target = scope:zealot + modifier = annoyed_opinion + opinion = -20 + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:zealot } + } + } + } + stress_impact = { + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + has_trait = loyal + add = 50 + } + } + } + option = { # Pray with HerHim + name = ach_coronation.0022.b + trigger = { + root.faith.religion ?= scope:zealot.faith.religion + } + show_as_unavailable = { always = yes } + reason = faith + trait = zealous + + custom_tooltip = available_because_of_shared_religion_tt + + add_piety = medium_piety_gain + if = { + limit = { + scope:zealot = { + opinion = { + target = root + value > 0 + } + } + OR = { + scope:zealot = { is_ai = yes } + AND = { + scope:zealot = { is_ai = no } + is_ai = no + } + } + } + progress_towards_friend_effect = { + CHARACTER = scope:zealot + OPINION = 20 + REASON = friend_religious_comfort + } + } + else = { + reverse_add_opinion = { + target = scope:zealot + modifier = kindness_opinion + opinion = 20 + } + } + + + stress_impact = { + cynical = medium_stress_impact_gain + zealous = medium_stress_impact_loss + compassionate = minor_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 100 + } + modifier = { + has_trait = compassionate + add = 50 + } + modifier = { + has_trait = sadistic + add = -25 + } + modifier = { + has_trait = callous + add = -100 + } + modifier = { + OR = { + has_trait = cynical + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + option = { # I'm not getting near anyone rn, thanks + name = ach_coronation.0022.d + flavor = ach_coronation.0022.d.flavor + + add_character_modifier = { + modifier = ach_social_distancing_modifier + years = 4 + } + + stress_impact = { + gregarious = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + add = 25 + } + modifier = { + has_trait = shy + add = 25 + } + modifier = { + has_trait = paranoid + add = 25 + } + modifier = { + has_trait = trusting + add = -25 + } + modifier = { + has_trait = callous + add = -25 + } + modifier = { + has_trait = gregarious + add = -25 + } + } + } +} + +###################### +# Host: An exotic foreign warrior pledges themselves to you +# by Jay Zaborowski +# 0023 +scripted_trigger ach_coronation_0023_foreign_holder_trigger = { + NOR = { + # Make sure they're from afar + in_diplomatic_range = prev + # And suitably foreign + faith = prev.faith + culture = prev.culture + } + save_temporary_scope_as = foreign_ruler_temp + prev = { + # They're not that exotic if you already rule a bunch of them + any_realm_county = { + NOR = { + faith = scope:foreign_ruler_temp.faith + culture = scope:foreign_ruler_temp.culture + } + } + } +} + +scripted_trigger ach_coronation_0023_eligible_clergy_trigger = { + is_available_in_activity_trigger = yes + faith = involved_activity.activity_host.faith +} + +scripted_effect ach_coronation_0023_generic_acceptance_effect = { + if = { + limit = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + } + # Fundamentalists won't be happy about this + every_vassal = { + limit = { + faith = root.faith + has_vassal_stance = zealot + } + custom = every_zealot_vassal + add_opinion = { + target = root + modifier = fp1_honoured_heathen_opinion + opinion = -10 + } + } + add_piety = medium_piety_loss + if = { + limit = { has_trait = zealous } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + } + culture = { + change_cultural_acceptance = { + target = scope:foreign_warrior.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_accepted_foreign_warrior + } + } + + stress_impact = { + trusting = medium_stress_loss # Trusts this strange foreigner implicitly + paranoid = medium_stress_loss # Is very happy to have less incompetent guards + } +} + +ach_coronation.0023 = { + type = activity_event + title = ach_coronation.0023.t + desc = { + desc = ach_coronation.0023.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:clergy + scope:clergy.faith = { + NOT = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + desc = ach_coronation.0023.desc.clergy.angry + } + triggered_desc = { + trigger = { + exists = scope:clergy + } + desc = ach_coronation.0023.desc.clergy + } + } + } + + left_portrait = { + character = root + animation = thinking + camera = camera_event_very_left + } + + center_portrait = { + character = scope:foreign_warrior + animation = obsequious_bow + camera = camera_event_center_pointing_left + } + + right_portrait = { + trigger = { exists = scope:clergy } + triggered_animation = { + trigger = { + scope:clergy.faith = { + NOT = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + animation = disapproval + } + animation = interested + character = scope:clergy + } + + cooldown = { years = 1 } + + theme = coronation_activity + + override_background = { + reference = throne_room + } + + trigger = { + has_activity_intent = coronation_embrace_supporters + any_independent_ruler = { ach_coronation_0023_foreign_holder_trigger = yes } + involved_activity = { + any_attending_character = { + ach_coronation_0023_eligible_clergy_trigger = yes + is_vassal_or_below_of = root + OR = { + is_clergy = yes + has_trait = devoted + is_theocratic_lessee = yes + government_has_flag = government_is_theocracy + } + } + } + } + + # Exotic warriors won't be attracted by lords who aren't some level of famous + weight_multiplier = { + base = 0 + # Court Grandeur attracts adventurers + modifier = { + has_royal_court = yes + court_grandeur_current_level > 2 + add = { + value = court_grandeur_current_level + divide = 4 + } + } + modifier = { + prestige_level > 2 + add = { + value = prestige_level + divide = 2 + } + } + } + + immediate = { + # Get a foreign court for the warrior to arrive from + random_independent_ruler = { + # Make sure they're from afar + limit = { ach_coronation_0023_foreign_holder_trigger = yes } + weight = { + base = 1 + # Like, really afar + modifier = { + add = 1000 + capital_province = { + squared_distance = { + target = root.capital_province + value >= squared_distance_massive + } + } + } + # More militaristic cultures with cool warrior folks are preferred + modifier = { + add = 500 + culture = { + OR = { + has_cultural_pillar = ethos_stoic + has_cultural_pillar = ethos_bellicose + has_cultural_parameter = wanderers_gain_extra_combat_skills + has_cultural_parameter = high_prowess_ignores_knight_restrictions + has_cultural_parameter = prowess_from_martial_education + has_cultural_parameter = martial_education_more_valued + has_cultural_parameter = strong_traits_more_valued + } + } + } + # Cultures that don't tend to like foreigners are not + modifier = { + add = -500 + culture = { + OR = { + has_cultural_parameter = courtiers_less_likely_to_leave_same_culture_court + has_cultural_parameter = dislikes_marrying_outside_of_culture + } + } + } + } + save_scope_as = foreign_ruler + } + + # Create your new BFF + create_character = { + template = bp1_yearly_2021_martial_person_template + location = root.location + faith = scope:foreign_ruler.faith + culture = scope:foreign_ruler.culture + trait = loyal + save_scope_as = foreign_warrior + } + scope:foreign_warrior = { + hidden_effect = { + # Give them an opinion bump so they don't hate you + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + # And make sure they speak your language + learn_language_of_culture = root.culture + # Add them now so the can_appoint triggers work + add_courtier = scope:foreign_warrior + } + } + + # Grab a clergy person to be angry (or curious) + involved_activity = { + random_attending_character = { + limit = { # Grab the Court Chaplain if they're attending + ach_coronation_0023_eligible_clergy_trigger = yes + has_council_position = councillor_court_chaplain + is_councillor_of = root + } + alternative_limit = { # Any Zealot vassal if not + ach_coronation_0023_eligible_clergy_trigger = yes + is_vassal_of = root + has_vassal_stance = zealot + } + alternative_limit = { # Find any sort of clergy-type as a fallback + ach_coronation_0023_eligible_clergy_trigger = yes + is_vassal_or_below_of = root + OR = { + is_clergy = yes + has_trait = devoted + is_theocratic_lessee = yes + government_has_flag = government_is_theocracy + } + } + save_scope_as = clergy + } + } + + ordered_court_position_holder = { + type = bodyguard_court_position + order_by = { # Get the worst bodyguard you have + value = 0 + subtract = "aptitude(bodyguard_court_position)" + } + save_scope_as = worst_bodyguard + } + } + + option = { # Make them your bodyguard + name = ach_coronation.0023.a + + trigger = { + can_employ_court_position_type = bodyguard_court_position + any_court_position_holder = { + type = bodyguard_court_position + has_court_position = bodyguard_court_position + count < 2 + } + } + + court_position_grant_effect = { POS = bodyguard CANDIDATE = scope:foreign_warrior EMPLOYER = root } + + scope:foreign_warrior = { + add_opinion = { + modifier = hired_me_opinion + target = root + opinion = 30 + } + hidden_effect = { + add_prestige = medium_prestige_gain + } + } + + ach_coronation_0023_generic_acceptance_effect = yes + + ai_chance = { + base = 100 + opinion_modifier = { + trigger = { exists = scope:worst_bodyguard } + who = scope:worst_bodyguard + opinion_target = root + multiplier = -1 + } + # Faith modifiers + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + NOT = { has_trait = cynical } + add = -50 + } + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + has_trait = zealous + factor = 0 + } + # If you have a Champion slot then make them that instead of replacing + modifier = { + employs_court_position = bodyguard_court_position + NOT = { employs_court_position = champion_court_position } + factor = 0 + } + } + } + + option = { # Make them your Champion + name = ach_coronation.0023.b + + trigger = { + can_employ_court_position_type = champion_court_position + NOT = { employs_court_position = champion_court_position } + } + + if = { + limit = { + can_employ_court_position_type = champion_court_position + NOT = { employs_court_position = champion_court_position } + } + court_position_grant_effect = { POS = champion CANDIDATE = scope:foreign_warrior EMPLOYER = root } + } + + scope:foreign_warrior = { # Grant the position + add_opinion = { + modifier = hired_me_opinion + target = root + opinion = 30 + } + hidden_effect = { + add_prestige = medium_prestige_gain + } + } + + ach_coronation_0023_generic_acceptance_effect = yes + + ai_chance = { + base = 100 + opinion_modifier = { + trigger = { + employs_court_position = champion_court_position + } + who = court_position:champion_court_position + opinion_target = root + multiplier = -1 + } + # Faith modifiers + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + NOT = { has_trait = cynical } + add = -50 + } + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + has_trait = zealous + factor = 0 + } + } + } + + option = { # Courtier fallback + name = ach_coronation.0023.c + + trigger = { + NOR = { + can_employ_court_position_type = bodyguard_court_position + can_employ_court_position_type = champion_court_position + } + } + + ach_coronation_0023_generic_acceptance_effect = yes + + add_courtier = scope:foreign_warrior + + ai_chance = { + base = 100 + # Faith modifiers + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + NOT = { has_trait = cynical } + add = -50 + } + modifier = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + has_trait = zealous + factor = 0 + } + } + } + + option = { # Reject them + name = ach_coronation.0023.d + + if = { + limit = { + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + } + every_vassal = { + limit = { + faith = root.faith + has_vassal_stance = zealot + } + custom = every_zealot_vassal + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + if = { + limit = { + exists = scope:clergy + } + reverse_add_opinion = { + target = scope:clergy + modifier = grateful_opinion + opinion = 20 + } + } + } + + hidden_effect = { + scope:foreign_warrior = { silent_disappearance_effect = yes } + } + + ai_chance = { + base = 100 + } + } +} + +###################### +# Open up drinks to the locals +# by Jay Zaborowski +# 0025 +ach_coronation.0025 = { + type = activity_event + title = ach_coronation.0025.t + desc = { + desc = ach_coronation.0025.desc + first_valid = { + triggered_desc = { + trigger = { root = scope:host } + desc = ach_coronation.0025.desc.host + } + desc = ach_coronation.0025.desc.guest + } + } + + left_portrait = { + character = root + animation = thinking + } + + center_portrait = { + trigger = { + root != scope:host + } + character = scope:host + animation = scepter + } + + right_portrait = { + trigger = { + scope:baron != scope:host + root != scope:baron + } + character = scope:baron + animation = thinking + } + + theme = feast_activity + + cooldown = { years = 1 } + + override_background = { + reference = garden + } + + trigger = { + OR = { + has_activity_intent = coronation_offer_support + has_activity_intent = coronation_impress_attendees + } + involved_activity = { + activity_location = { + # Has a settlement + has_holding = yes + # Has locals + NOR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + # The barony has willing drinkers + barony.holder = { + faith_forbids_alcohol_trigger = no + faith = prev.county.faith + trigger_if = { + limit = { is_ai = no } + this = root + } + } + } + # And a willing host + activity_host = { faith_forbids_alcohol_trigger = no } + } + # And a willing you + faith_forbids_alcohol_trigger = no + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + activity_location = { + save_scope_as = feast_location + barony.holder = { save_scope_as = baron } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + add = 2 + } + modifier = { + involved_activity.activity_host = { + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + add = 2 + } + } + + option = { # You'll pay for it + name = ach_coronation.0025.a + trigger = { + short_term_gold >= medium_gold_value + } + show_as_unavailable = { always = yes } + + remove_short_term_gold = medium_gold_value + + involved_activity.activity_location = { + add_province_modifier = { modifier = ach_drunk_province_1_modifier years = 1 } + } + + if = { + limit = { + this != scope:host + } + reverse_add_opinion = { + target = scope:host + modifier = grateful_opinion + opinion = 20 + } + } + + scope:host = { + every_vassal = { + limit = { + has_vassal_stance = courtly + NOT = { + this = root + } + } + custom = every_courtly_vassal + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + } + + custom_tooltip = coronation_tt_positive_medium + involved_activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + stress_impact = { + base = medium_stress_impact_loss + temperate = medium_stress_impact_gain # Doesn't partake + } + + ai_chance = { + base = 100 + modifier = { + has_trait = temperate + factor = 0.5 + } + } + } + + option = { # Drunkard / Reveler: We should *both* pay for it! + name = ach_coronation.0025.b + flavor = ach_coronation.0025.b.flavor + trigger = { + custom_tooltip = { + text = ach_coronation.0025.b.tt + short_term_gold >= minor_gold_value + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + scope:baron != root # Only available if there's a local baron to go splitsies + scope:baron != scope:host # And if they're not the Host + } + } + show_as_unavailable = { + scope:baron != root + scope:baron != scope:host + } + trait = drunkard + trait = lifestyle_reveler + + duel = { + skill = diplomacy + target = scope:baron + 40 = { # The Baron agrees to pay + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ach_coronation.0025.b.tt.success + + involved_activity.activity_location = { + add_province_modifier = { modifier = ach_drunk_province_2_modifier years = 1 } + } + + scope:baron = { + remove_short_term_gold = root.minor_gold_value + hidden_effect = { add_prestige = medium_prestige_gain } + } + remove_short_term_gold = minor_gold_value + + if = { + limit = { this != scope:host } + scope:host = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + add_opinion = { + target = scope:baron + modifier = grateful_opinion + opinion = 10 + } + hidden_effect = { + add_prestige = medium_prestige_gain + } + } + } + + send_interface_toast = { + title = ach_coronation.0025.b.tt.success + left_icon = scope:baron + + if = { + limit = { + has_trait = lifestyle_reveler + } + add_trait_xp = { + trait = lifestyle_reveler + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_high + } + } + } + } + + add_prestige = medium_prestige_gain + if = { + limit = { + OR = { + root = { is_ai = no } + } + scope:activity = { + is_target_in_variable_list = { + name = major_supporter + target = root + } + } + } + scope:host = { + custom_tooltip = coronation_tt_positive_medium + involved_activity = { activity_special_type_progression_medium = yes } + } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + } + + stress_impact = { + base = medium_stress_impact_loss + temperate = medium_stress_impact_gain # Doesn't partake + } + } + + create_character_memory = { + type = got_the_city_drunk_memory + participants = { + coronation_host = scope:host + baron = scope:baron + } + } + # Used in loc + scope:new_memory = { + save_scope_as = drunk_city_memory + } + scope:drunk_city_memory = { + #set_variable = { + #name = drunk_city_location + #value = scope:feast_location + #} + set_variable = { + name = drunk_city_location + value = scope:feast_location + } + if = { #startup error suppression + limit = { has_variable = drunk_city_location } + } + } + } + 60 = { # The Baron refuses your *extremely* awesome idea + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ach_coronation.0025.b.tt.failure + send_interface_toast = { + title = ach_coronation.0025.b.tt.failure + left_icon = scope:baron + + scope:baron = { # Very lame of them + add_prestige = minor_prestige_loss + } + hidden_effect = { + add_opinion = { + target = scope:baron + modifier = disappointed_opinion + opinion = -10 + } + } + + stress_impact = { # Disappointment + drunkard = minor_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + has_trait = drunkard + add = 50 + } + modifier = { + has_trait = lifestyle_reveler + add = 50 + } + } + } + + option = { # Just focus on having fun + name = ach_coronation.0025.c + name = { + trigger = { + has_trait = temperate + } + text = ach_coronation.0025.c.temperate + } + flavor = ach_coronation.0025.c.flavor + + # Stress loss + stress_impact = { + base = minor_stress_impact_loss + drunkard = minor_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = temperate + factor = 2 + } + } + } +} + +###################### +# Host: Struggle to hide a cold so that your tribal vassals don't take it as an omen +# by Jay Zaborowski +# 0026 +ach_coronation.0026 = { + type = activity_event + title = ach_coronation.0026.t + desc = ach_coronation.0026.desc + + left_portrait = { + character = scope:second + animation = dancing + camera = camera_event_very_left_fov35 + } + + center_portrait = { + character = root + animation = stress + camera = camera_event_center_very_large + } + + right_portrait = { + character = scope:vassal + animation = toast_goblet + camera = camera_event_very_right_fov35 + } + + theme = feast_activity + + cooldown = { years = 1 } + + trigger = { + can_contract_disease_trigger = { DISEASE = ill } + government_has_flag = government_is_tribal + involved_activity = { + any_attending_character = { + government_has_flag = government_is_tribal + coronation_hostile_to_host_trigger = no + can_add_hook = { + target = root + type = favor_hook + } + } + } + } + + immediate = { + involved_activity = { + random_attending_character = { + limit = { + government_has_flag = government_is_tribal + coronation_hostile_to_host_trigger = no + can_add_hook = { + target = root + type = favor_hook + } + } + weight = { + base = 1 + # Prefer vassals + modifier = { + add = { + value = 5 + if = { + limit = { is_powerful_vassal_of = root } + add = 10 + } + } + is_vassal_of = root + } + # Prefer interesting characters + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + # Try and get someone who'd be willing to help you out + opinion_modifier = { + opinion_target = root + multiplier = 0.25 + } + } + save_scope_as = vassal + } + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:vassal + } + } + save_scope_as = second + } + } + } + + option = { # Hold it in hold it in hold it in + name = ach_coronation.0026.a + + custom_tooltip = ach_coronation.0026.a.tt + + random_list = { + 40 = { # Your vassals notice you're sick + desc = ach_coronation.0026.a.tt.sick.failure + send_interface_toast = { + title = ach_coronation.0026.a.tt.sick.failure + left_icon = root + + add_prestige = minor_prestige_loss + + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + + custom_tooltip = coronation_tt_negative + involved_activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + } + } + 40 = { # Nobody notices + desc = ach_coronation.0026.a.tt.sick.success + send_interface_toast = { + title = ach_coronation.0026.a.tt.sick.success + left_icon = root + + reverse_add_opinion = { + target = scope:vassal + modifier = feast_had_good_time_together_opinion + opinion = 15 + } + + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + 20 = { # The feeling's pass + desc = ach_coronation.0026.a.tt.critical_success + send_interface_toast = { + title = ach_coronation.0026.a.tt.critical_success + + reverse_add_opinion = { + target = scope:vassal + modifier = feast_had_good_time_together_opinion + opinion = 15 + } + + stress_impact = { + base = minor_stress_loss + } + } + } + } + } + + option = { # Vassal, help me! + name = ach_coronation.0026.b + + custom_tooltip = ach_coronation.0026.b.tt + + random = { + chance = 50 + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = grateful_opinion + opinion = 15 + } + } + scope:vassal = { + add_hook = { + target = root + type = favor_hook + } + } + + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + has_trait = shy + factor = 0.5 + } + } + } + + option = { # Bail on the feast + name = ach_coronation.0026.c + + flavor = ach_coronation.0026.c.flavor + + random = { + chance = 25 + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + custom = custom.every_tribal_nomadic_vassal + add_opinion = { + target = root + modifier = opinion_acting_strange + opinion = -10 + } + } + + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 0.5 + } + modifier = { + has_trait = stubborn + factor = 0.5 + } + } + } +} + +###################### +# An attendee brings some hashish +# by Jay Zaborowski +# 0027 +scripted_trigger can_be_hashishiyah_ignoring_region_trigger = { + # You meet all the Hashishiyah triggers besides geographic_region + is_adult = yes + NOR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = temperate + } + NAND = { + faith = { trait_is_sin = hashishiyah } + has_trait = zealous + } +} + +scripted_trigger eligible_to_join_stoner_trigger = { + is_available_in_activity_trigger = yes + OR = { + has_trait = hashishiyah + can_be_hashishiyah_ignoring_region_trigger = yes + } +} + +ach_coronation.0027 = { + type = activity_event + title = ach_coronation.0027.t + desc = { + desc = ach_coronation.0027.desc + first_valid = { + triggered_desc = { + trigger = { + scope:stoner = { + OR = { + has_trait = faith_warrior + has_trait = crusader_king + } + } + } + desc = ach_coronation.0027.desc.char.crusader + } + triggered_desc = { + trigger = { + scope:stoner = { + has_trait = varangian + exists = title:e_byzantium.holder + } + } + desc = ach_coronation.0027.desc.char.varangian + } + desc = ach_coronation.0027.desc.char.other + } + } + + left_portrait = { + character = root + animation = interested + } + + center_portrait = { + character = scope:partaker + animation = interested_left + } + + right_portrait = { + character = scope:stoner + animation = wedding_drunk + } + + cooldown = { years = 1 } + + theme = feast_activity + + trigger = { + OR = { # If you can't normally be a Hashishiyah, look for some exceptions + can_be_hashishiyah = yes + AND = { # If a European Christian, the crusades are going on + location = { geographical_region = world_europe } + religion = { + this = religion:christianity_religion + exists = var:variable_ghw_unlocked + } + } + AND = { # If in Scandinavia, you have access to Varangians and they still exist + location = { geographical_region = world_europe_north } + title:e_byzantium ?= { has_variable = founded_varangian_guard } + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + dynasty ?= { has_dynasty_perk = fp1_adventure_legacy_1 } + } + } + } + involved_activity = { + any_attending_character = { + eligible_to_join_stoner_trigger = yes + this != root + count > 1 # In case the Stoner also meets the trigger + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + can_be_hashishiyah_ignoring_region_trigger = yes + has_trait = hashishiyah + } + } + modifier = { + factor = 2 + involved_activity = { + any_attending_character = { + has_trait = hashishiyah + } + } + } + modifier = { + factor = 3 + faith = { + has_variable = variable_ghw_cooldown # There was a recent crusade + religion = { this = religion:christianity_religion } + } + } + } + + immediate = { + play_music_cue = "middleeasterncourt_cue" + involved_activity = { + random_attending_character = { + limit = { + this != root + this != prev.activity_host + is_ai = yes + is_available_in_activity_trigger = yes + has_trait = hashishiyah + } + alternative_limit = { + this != root + this != prev.activity_host + is_ai = yes + is_available_in_activity_trigger = yes + can_be_hashishiyah_ignoring_region_trigger = yes + OR = { + can_be_hashishiyah = yes + can_be_hashishiyah_ignoring_region_trigger = yes + } + OR = { + has_trait = faith_warrior + has_trait = crusader_king + has_trait = varangian + } + } + save_scope_as = stoner + } + + root = { + if = { # If the stoner does not exist, generate a... + limit = { NOT = { exists = scope:stoner } } + if = { # Varangian (if you're Scandinavian) + limit = { + location = { geographical_region = world_europe_north } + title:e_byzantium ?= { has_variable = founded_varangian_guard } + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + dynasty = { has_dynasty_perk = fp1_adventure_legacy_1 } + } + } + create_character = { + save_scope_as = stoner + culture = root.culture + faith = root.faith + location = root.location + template = varangian_template + trait = hashishiyah + } + title:e_byzantium.holder.culture = { save_scope_as = emperor_culture } + } + else_if = { # Crusader (if you're Christian) + limit = { + location = { geographical_region = world_europe } + faith = { has_variable = variable_ghw_cooldown } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + create_character = { + save_scope_as = stoner + culture = root.culture + faith = root.faith + location = root.location + template = knight + trait = hashishiyah + trait = faith_warrior + } + } + else = { # Some Reveler type of person + create_character = { + save_scope_as = stoner + culture = root.culture + faith = root.faith + location = root.location + template = diplomacy_court_position_holder_template + trait = hashishiyah + trait = lifestyle_traveler + } + } + scope:stoner = { + add_to_activity = root.involved_activity + } + add_character_flag = created_character_ach_coronation_0027 + } + } + + random_attending_character = { + limit = { + eligible_to_join_stoner_trigger = yes + has_trait = hashishiyah + this != scope:stoner + this != root + } + alternative_limit = { + eligible_to_join_stoner_trigger = yes + this != scope:stoner + this != root + } + save_scope_as = partaker + } + } + } + + option = { # If Hashish is not available, purchase a supply + name = ach_coronation.0027.a + trigger = { + NOT = { has_trait = hashishiyah } # You aren't already a Hashishiyah + can_be_hashishiyah = no # You can't be a Hashishiyah + can_be_hashishiyah_ignoring_region_trigger = yes # But only because of your region + } + + reverse_add_opinion = { + target = scope:stoner + modifier = purchased_hashish_opinion + opinion = 20 + } + + pay_short_term_gold = { + target = scope:stoner + gold = medium_gold_value + } + + add_character_modifier = { + modifier = ach_secret_stash_modifier + years = 4 + } + + random = { + chance = 20 + add_trait = hashishiyah + } + + if = { + limit = { + faith = { trait_is_sin = hashishiyah } + } + add_piety = major_piety_loss + stress_impact = { + zealous = major_stress_impact_gain + cynical = minor_stress_impact_loss + } + } + else_if = { + limit = { + faith = { trait_is_virtue = hashishiyah } + } + add_piety = minor_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + zealous = minor_stress_impact_loss + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + temperate = medium_stress_impact_gain + } + + ai_chance = { + modifier = { + OR = { + has_trait = lifestyle_reveler + has_trait = gluttonous + has_trait = gregarious + } + factor = 2 + } + base = 100 + modifier = { + OR = { + has_trait = greedy + has_trait = avaricious + } + factor = 0.5 + } + modifier = { + has_trait = temperate + factor = 0 + } + } + } + + option = { # Join in + name = ach_coronation.0027.b + name = { + trigger = { has_trait = hashishiyah } + text = ach_coronation.0027.b.hashishiyah + } + trait = hashishiyah + + reverse_add_opinion = { + target = scope:stoner + modifier = camp_party_reveled_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:partaker + modifier = camp_party_reveled_opinion + opinion = 10 + } + + if = { + limit = { + has_trait = lifestyle_reveler + } + add_trait_xp = { + trait = lifestyle_reveler + value = 5 + } + } + + if = { # You already love hashish - let's be smoke buddies! + limit = { has_trait = hashishiyah } + if = { + limit = { + reverse_opinion = { + target = scope:stoner + value > 0 + } + OR = { + scope:stoner = { is_ai = yes } + AND = { + scope:stoner = { is_ai = no } + is_ai = no + } + } + } + set_relation_friend = { + target = scope:stoner + reason = friend_got_high_together + } + } + else = { + reverse_add_opinion = { + target = scope:stoner + modifier = pleased_opinion + opinion = 30 + } + } + } + else_if = { # Else, if Hashish is available, chance to become a Hashiyah + limit = { + can_be_hashishiyah = yes # You can be a Hahishiyah + } + random = { + chance = 20 + add_trait = hashishiyah + } + } + + add_character_modifier = { + modifier = stress_hashish_stupor + years = 1 + } + + if = { + limit = { + faith = { trait_is_sin = hashishiyah } + } + add_piety = minor_piety_loss + stress_impact = { + zealous = medium_stress_impact_gain + cynical = minor_stress_impact_loss + } + } + else_if = { + limit = { + faith = { trait_is_virtue = hashishiyah } + } + add_piety = minor_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + zealous = minor_stress_impact_loss + } + } + + stress_impact = { + base = medium_stress_impact_loss + temperate = medium_stress_impact_gain + shy = minor_stress_impact_gain + hashishiyah = minor_stress_impact_loss # Bonus stress loss if you're already a fan + } + + ai_chance = { + base = 100 + modifier = { + NOT = { has_trait = cynical } + faith = { trait_is_virtue = hashishiyah } + factor = 2 + } + modifier = { + OR = { + has_trait = lifestyle_reveler + has_trait = gluttonous + has_trait = gregarious + } + factor = 2 + } + modifier = { + has_trait = shy + factor = 0.5 + } + } + } + + option = { # Host: Get this person out of here - drugs are bad!!! + name = ach_coronation.0027.c + + trigger = { + this = involved_activity.activity_host + } + + add_prestige = medium_prestige_gain + + reverse_add_opinion = { + target = scope:stoner + modifier = angry_opinion + opinion = -25 + } + reverse_add_opinion = { + target = scope:partaker + modifier = disappointed_opinion + opinion = -10 + } + + scope:stoner = { remove_from_activity = involved_activity } + + if = { + limit = { + faith = { trait_is_sin = hashishiyah } + } + add_piety = medium_piety_gain + stress_impact = { + cynical = minor_stress_impact_gain + zealous = medium_stress_impact_loss + } + } + else_if = { + limit = { + faith = { trait_is_virtue = hashishiyah } + } + add_piety = medium_piety_loss + stress_impact = { + zealous = minor_stress_impact_gain + cynical = medium_stress_impact_loss + } + } + + stress_impact = { + gregarious = minor_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + hashishiyah = major_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + has_trait = zealous + faith = { trait_is_sin = hashishiyah } + factor = 4 + } + modifier = { + has_trait = cynical + faith = { trait_is_virtue = hashishiyah } + factor = 4 + } + } + } + + option = { # I'm good + name = ach_coronation.0027.d + flavor = { + triggered_desc = { + trigger = { this = involved_activity.activity_host } + desc = ach_coronation.0027.d.host + } + } + + if = { + limit = { this = involved_activity.activity_host } + custom_tooltip = coronation_tt_positive_tiny + involved_activity = { activity_special_type_progression_miniscule = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_miniscule + CHAR = root + } + } + else = { + add_prestige = minor_prestige_gain + } + + if = { + limit = { + faith = { trait_is_sin = hashishiyah } + } + add_piety = minor_piety_gain + } + else_if = { + limit = { + faith = { trait_is_virtue = hashishiyah } + } + add_piety = minor_piety_loss + } + + stress_impact = { + lifestyle_reveler = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + temperate = minor_stress_impact_loss + hashishiyah = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = temperate + NOT = { has_trait = hashishiyah } + factor = 2 + } + modifier = { + OR = { + has_trait = lifestyle_reveler + has_trait = gluttonous + } + factor = 0.5 + } + modifier = { + has_trait = hashishiyah + factor = 0.25 + } + } + } + + after = { + if = { + limit = { + has_character_flag = created_character_ach_coronation_0027 + scope:stoner = { NOT = { has_relation_friend = root } } + } + hidden_effect = { + scope:stoner = { silent_disappearance_effect = yes } + } + } + } +} + + +###################### +# Host: Drinking contest with a detractor +# by Jay Zaborowski +# 0028 +scripted_effect ach_coronation_0028_success_effect = { + add_prestige = minor_prestige_gain + + custom_tooltip = coronation_tt_positive_medium + involved_activity = { activity_special_type_progression_medium = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:positive_medium + CHAR = root + } + + if = { + limit = { has_activity_intent = coronation_impress_attendees } + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + + custom = custom.every_tribal_nomadic_vassal + + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + else_if = { + limit = { has_activity_intent = coronation_weaken_detractors } + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + + custom = custom.every_tribal_nomadic_vassal + + add_opinion = { + target = scope:drinker + modifier = failure_opinion + opinion = -15 + } + } + } + + create_character_memory = { + type = defeated_detractor_in_drinking_contest_memory + participants = { + detractor = scope:drinker + } + } +} + +ach_coronation.0028 = { + type = activity_event + title = ach_coronation.0028.t + desc = ach_coronation.0028.desc + + left_portrait = { + character = root + animation = disapproval + camera = camera_event_left_pointing_back_fov20 + } + + center_portrait = { + character = scope:drinker + animation = rage + camera = camera_event_center_pointing_forward_fov35 + } + + right_portrait = { + character = scope:onlooker + animation = interested + camera = camera_event_very_right_forward_fov30 + } + + theme = feast_activity + + cooldown = { years = 1 } + + trigger = { + OR = { + has_activity_intent = coronation_impress_attendees + has_activity_intent = coronation_weaken_detractors + } + government_has_flag = government_is_tribal + faith_forbids_alcohol_trigger = no + involved_activity = { + any_guest_subset = { + name = detractor + is_available_in_activity_trigger = yes + faith_forbids_alcohol_trigger = no + } + } + } + + immediate = { + # Grab the highest prowess Detractor + involved_activity = { + random_guest_subset = { + name = detractor + limit = { + is_available_in_activity_trigger = yes + faith_forbids_alcohol_trigger = no + } + weight = { + base = 1 + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + + modifier = { + add = { + value = prowess + multiply = 5 + } + } + modifier = { + has_trait = temperate + factor = 0.5 + } + modifier = { + has_trait = drunkard + factor = 1.5 + } + } + save_scope_as = drinker + } + random_attending_character = { + limit = { + this != root + this != scope:drinker + is_available_in_activity_trigger = yes + faith_forbids_alcohol_trigger = no + } + save_scope_as = onlooker + } + } + } + + option = { # I'll outdrink them all! + name = ach_coronation.0028.a + skill = prowess + + duel = { + skills = { prowess } + target = scope:drinker + 50 = { # Drink them under the table + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + add = 10 + has_trait = drunkard + } + modifier = { + factor = 1.5 + health > scope:drinker.health + } + modifier = { # Chonky people can take their alcohol better + factor = 1.5 + current_weight > scope:drinker.current_weight + } + + desc = ach_coronation.0028.a.win + + scope:drinker = { + if = { + limit = { has_activity_intent = coronation_weaken_detractors } + add_prestige = major_prestige_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + + send_interface_toast = { + title = ach_coronation.0028.a.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:drinker + + ach_coronation_0028_success_effect = yes + } + } + 50 = { # You fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + modifier = { + add = 10 + scope:drinker = { has_trait = drunkard } + } + modifier = { + factor = 1.5 + health < scope:drinker.health + } + modifier = { + factor = 1.5 + current_weight < scope:drinker.current_weight + } + + desc = ach_coronation.0028.a.lose + + scope:drinker = { add_prestige = minor_prestige_gain } + + send_interface_toast = { + title = ach_coronation.0028.a.lose + type = event_toast_effect_good + left_icon = root + right_icon = scope:drinker + + add_prestige = medium_prestige_loss + + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + custom = custom.every_tribal_nomadic_vassal + add_opinion = { + target = root + modifier = unimpressed_opinion + opinion = -10 + } + } + } + } + } + + random = { + chance = 5 + add_trait = drunkard + } + + stress_impact = { + drunkard = medium_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + temperate = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + factor = 1.5 + OR = { + has_trait = gregarious + has_trait = drunkard + has_trait = gluttonous + } + } + modifier = { + factor = 0.5 + has_trait = temperate + } + } + } + + option = { # Maybe if I slipped something into HerHis drink... + name = ach_coronation.0028.b + skill = intrigue + + duel = { + skill = intrigue + value = 12 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ach_coronation.0028.b.win + + scope:drinker = { + if = { + limit = { has_activity_intent = coronation_weaken_detractors } + add_prestige = major_prestige_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + + send_interface_toast = { + title = ach_coronation.0028.b.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:drinker + + ach_coronation_0028_success_effect = yes + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + scope:drinker = { + add_opinion = { + target = root + modifier = tried_to_poison_me_opinion + opinion = -40 + } + if = { + limit = { + OR = { + is_ai = yes + AND = { + root = { + is_ai = no + } + is_ai = no + } + } + } + progress_towards_rival_effect = { + REASON = rival_tried_to_poison + CHARACTER = root + OPINION = 0 + } + } + } + coronation_move_towards_detractor_effect = { CHARACTER = scope:drinker } + + desc = ach_coronation.0028.b.lose + + send_interface_toast = { + title = ach_coronation.0028.b.lose + type = event_toast_effect_good + left_icon = root + right_icon = scope:drinker + + custom_tooltip = coronation_tt_negative + involved_activity = { activity_special_type_progression_negative = yes } + coronation_add_magnificence_log_effect = { + VALUE = flag:negative + CHAR = root + } + + every_vassal = { + limit = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + custom = custom.every_tribal_nomadic_vassal + add_opinion = { + target = root + modifier = dishonorable_liege_opinion + opinion = -20 + } + } + } + create_character_memory = { + type = was_caught_cheating_in_drinking_contest_memory + participants = { + detractor = scope:drinker + } + } + } + } + + scope:drinker = { + if = { + limit = { + can_contract_disease_trigger = { DISEASE = ill } + } + random = { + chance = { + value = 50 + add = { + value = prowess + multiply = -1 + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + } + + stress_impact = { + honest = massive_stress_impact_gain + just = medium_stress_impact_gain + temperate = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + + opinion_modifier = { opinion_target = scope:drinker } + + modifier = { + factor = 0 + OR = { + intrigue <= 8 + ai_honor >= low_positive_ai_value + } + } + } + } + + option = { # I'll be fine + name = ach_coronation.0028.c + + scope:drinker = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + add_legitimacy = minor_legitimacy_loss + + stress_impact = { + temperate = minor_stress_impact_loss + drunkard = medium_stress_impact_gain + lifestyle_reveler = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -1 + } + modifier = { + factor = 2 + has_trait = temperate + } + } + } +} + +###################### +# Host: Guests offer to help get a hunt going +# by Jay Zaborowski +# 0029 +scripted_trigger ach_coronation_0029_friend_trigger = { + this != involved_activity.activity_host + is_available_in_activity_trigger = yes + can_hunt_trigger = yes + is_vegetarian_trigger = no + likes_character_trigger = { CHARACTER = involved_activity.activity_host } +} + +ach_coronation.0029 = { + type = activity_event + title = ach_coronation.0029.t + desc = ach_coronation.0029.desc + + left_portrait = { + character = root + animation = thinking + camera = camera_event_table_left + } + + center_portrait = { + character = scope:second + triggered_animation = { + trigger = { use_goblet_in_tavern_trigger = yes } + animation = drink_goblet + } + triggered_animation = { + trigger = { use_goblet_in_tavern_trigger = no } + animation = drink + } + camera = camera_event_table_center + } + + right_portrait = { + character = scope:first + triggered_animation = { + trigger = { use_goblet_in_tavern_trigger = yes } + animation = toast_goblet + } + triggered_animation = { + trigger = { use_goblet_in_tavern_trigger = no } + animation = toast + } + camera = camera_event_table_right_far + } + + theme = feast_activity + + cooldown = { years = 1 } + + trigger = { + OR = { + has_activity_intent = coronation_impress_attendees + has_activity_intent = coronation_embrace_supporters + has_activity_intent = coronation_exalt_crown + } + has_trait = lifestyle_hunter + is_vegetarian_trigger = no + involved_activity = { + any_attending_character = { + ach_coronation_0029_friend_trigger = yes + count >= 2 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 50 + } + add = 1 + } + modifier = { + has_trait = lifestyle_hunter + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = 100 + } + add = 1 + } + } + + immediate = { + involved_activity = { + activity_host = { save_scope_as = host } + random_attending_character = { + limit = { # Is your buddy and a hunter + ach_coronation_0029_friend_trigger = yes + has_trait = lifestyle_hunter + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + alternative_limit = { # Or one of those, at least + ach_coronation_0029_friend_trigger = yes + OR = { + has_trait = lifestyle_hunter + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + alternative_limit = { # Or exists, at least + ach_coronation_0029_friend_trigger = yes + } + weight = { + base = 1 + + modifier = { + has_trait = lifestyle_hunter + add = 4 + } + modifier = { + add = 1 + reverse_opinion = { + target = root + value > 0 + } + } + modifier = { + add = 2 + reverse_opinion = { + target = root + value > 20 + } + } + modifier = { + add = 3 + reverse_opinion = { + target = root + value > 40 + } + } + modifier = { + add = 5 + reverse_opinion = { + target = root + value > 60 + } + } + modifier = { + add = 8 + reverse_opinion = { + target = root + value > 80 + } + } + } + save_scope_as = first + } + random_attending_character = { + limit = { + ach_coronation_0029_friend_trigger = yes + this != scope:first + has_trait = lifestyle_hunter + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + alternative_limit = { + ach_coronation_0029_friend_trigger = yes + this != scope:first + OR = { + has_trait = lifestyle_hunter + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + alternative_limit = { + ach_coronation_0029_friend_trigger = yes + this != scope:first + } + weight = { + base = 1 + + modifier = { + has_trait = lifestyle_hunter + add = 4 + } + modifier = { + add = 1 + reverse_opinion = { + target = root + value > 0 + } + } + modifier = { + add = 2 + reverse_opinion = { + target = root + value > 20 + } + } + modifier = { + add = 3 + reverse_opinion = { + target = root + value > 40 + } + } + modifier = { + add = 5 + reverse_opinion = { + target = root + value > 60 + } + } + modifier = { + add = 8 + reverse_opinion = { + target = root + value > 80 + } + } + } + save_scope_as = second + } + } + } + + option = { # Let's get a Hunt ready + name = ach_coronation.0029.a + + reason = activity_intent + + flavor = { + first_valid = { + triggered_desc = { + trigger = { has_activity_intent = coronation_impress_attendees } + desc = ach_coronation.0029.a.flavor.impress_attendees + } + triggered_desc = { + trigger = { has_activity_intent = coronation_embrace_supporters } + desc = ach_coronation.0029.a.flavor.embrace_supporters + } + triggered_desc = { + trigger = { has_activity_intent = coronation_exalt_crown } + desc = ach_coronation.0029.a.flavor.exalt_crown + } + } + } + + switch = { + trigger = has_activity_intent + coronation_impress_attendees = { + custom_tooltip = ach_coronation.0029.a.impressive_hunt + add_character_flag = impressive_hunt + } + coronation_embrace_supporters = { + custom_tooltip = ach_coronation.0029.a.personal_hunt + add_character_flag = personal_hunt + } + coronation_exalt_crown = { + custom_tooltip = ach_coronation.0029.a.glorious_hunt + add_character_flag = glorious_hunt + } + } + } + + option = { # Want to try falconry? + name = ach_coronation.0029.b + trigger = { has_dlc_feature = tours_and_tournaments } + + flavor = ach_coronation.0029.b.flavor + + custom_tooltip = ach_coronation.0029.b.free_falconry + add_character_flag = free_falconry + } + + option = { # Is Temperance not a virtue? + name = { + trigger = { + faith = { trait_is_virtue = temperate } + NOR = { + has_trait = gluttonous + has_trait = cynical + } + } + text = ach_coronation.0029.c.virtuous + } + name = ach_coronation.0029.c + + if = { + limit = { + faith = { trait_is_virtue = temperate } + NOR = { + has_trait = gluttonous + has_trait = cynical + } + } + custom_tooltip = ach_coronation.0029.c.virtuous.tt + + add_piety = medium_piety_gain + + every_vassal = { + limit = { + has_vassal_stance = zealot + } + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + target = root + opinion = 5 + } + } + } + else = { + add_prestige = minor_prestige_gain + } + + ai_chance = { + base = 150 + } + } +} diff --git a/N3OW/events/dlc/ach/ach_maintenance_events.txt b/N3OW/events/dlc/ach/ach_maintenance_events.txt new file mode 100644 index 00000000..c2167e80 --- /dev/null +++ b/N3OW/events/dlc/ach/ach_maintenance_events.txt @@ -0,0 +1,720 @@ +namespace = ach_maintenance_events + +ach_maintenance_events.0001 = { # Clean up of Coronation realm law, will happen 1 tick after you gain the title (due to on_actions) + type = character_event + hidden = yes + + trigger = { + coronation_trigger = yes + } + + immediate = { + if = { + limit = { + NOT = { + has_game_rule = coronation_laws_off + } + } + if = { + limit = { + has_variable = crowned_king_var + NOT = { has_realm_law = crowned_king } + } + add_realm_law_skip_effects = crowned_king + } + else_if = { + limit = { + has_variable = crowned_emperor_var + NOT = { has_realm_law = crowned_emperor } + } + add_realm_law_skip_effects = crowned_emperor + } + else_if = { + limit = { + NOR = { + has_variable = crowned_king_var + has_variable = crowned_emperor_var + } + NOT = { has_realm_law = uncrowned } + } + add_realm_law_skip_effects = uncrowned + } + } + } +} + +ach_maintenance_events.0002 = { # ACH Oath synergy culture rewards + type = character_event + hidden = yes + + trigger = { + has_variable = mend_the_fracture_oath_target_culture + culture ?= { + has_cultural_tradition = oath_mend_the_fracture_tradition + } + top_liege = root + var:mend_the_fracture_oath_target_culture = { + has_cultural_tradition = oath_mend_the_fracture_tradition + NOT = { this = root.culture } + any_culture_county = { + count >= 3 + top_liege = root.top_liege + } + } + } + + immediate = { + # calculate the chances of a positive thing happening + set_variable = { + name = synergy_cultures_chance + value = 0.1 + } + set_variable = { + name = synergy_cultures_amount + value = 0 + } + var:mend_the_fracture_oath_target_culture = { + if = { + limit = { + cultural_acceptance = { + target = root.culture + value >= 99 + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.4 + } + } + } + else_if = { + limit = { + cultural_acceptance = { + target = root.culture + value >= 80 + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.3 + } + } + } + else_if = { + limit = { + cultural_acceptance = { + target = root.culture + value >= 60 + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.2 + } + } + } + else_if = { + limit = { + cultural_acceptance = { + target = root.culture + value >= 40 + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.1 + } + } + } + if = { + limit = { + culture_head ?= { + opinion = { + target = root + value >= 80 + } + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.3 + } + } + } + else_if = { + limit = { + culture_head ?= { + opinion = { + target = root + value >= 40 + } + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.2 + } + } + } + else_if = { + limit = { + culture_head ?= { + opinion = { + target = root + value >= 20 + } + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.1 + } + } + } + } + if = { + limit = { + exists = var:mend_the_fracture_oath_target_culture.culture_head + } + if = { + limit = { + opinion = { + target = var:mend_the_fracture_oath_target_culture.culture_head + value >= 80 + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.3 + } + } + } + else_if = { + limit = { + opinion = { + target = var:mend_the_fracture_oath_target_culture.culture_head + value >= 40 + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.2 + } + } + } + else_if = { + limit = { + opinion = { + target = var:mend_the_fracture_oath_target_culture.culture_head + value >= 20 + } + } + root = { + change_variable = { + name = synergy_cultures_chance + add = 0.1 + } + } + } + } + + if = { + limit = { + prestige_level = 5 + } + change_variable = { + name = synergy_cultures_chance + add = 0.2 + } + } + else_if = { + limit = { + prestige_level = 4 + } + change_variable = { + name = synergy_cultures_chance + add = 0.15 + } + } + else_if = { + limit = { + prestige_level = 3 + } + change_variable = { + name = synergy_cultures_chance + add = 0.1 + } + } + else_if = { + limit = { + prestige_level = 2 + } + change_variable = { + name = synergy_cultures_chance + add = 0.05 + } + } + else_if = { + limit = { + prestige_level = 1 + } + change_variable = { + name = synergy_cultures_chance + add = 0.02 + } + } + + + if = { + limit = { + var:synergy_cultures_chance >= 1 + } + change_variable = { + name = synergy_cultures_amount + add = var:synergy_cultures_chance + multiply = 2 + } + set_variable = { + name = synergy_cultures_chance + value = 1 + } + } + + # calculate the amount of a positive things happening + var:mend_the_fracture_oath_target_culture = { + every_culture_county = { + limit = { + top_liege = root.top_liege + } + change_variable = { + name = synergy_cultures_amount + add = 1 + } + } + } + change_variable = { + name = synergy_cultures_amount + multiply = 0.2 + multiply = var:synergy_cultures_chance + min = 1 + } + + while = { + limit = { + var:synergy_cultures_amount > 0 + } + random_list = { + 1 = { + culture ?= { + random_culture_county = { + limit = { + NOT = { + has_county_modifier = oath_mend_the_fracture_county + } + holder = root + } + alternative_limit = { + NOT = { + has_county_modifier = oath_mend_the_fracture_county + } + top_liege = root.top_liege + } + alternative_limit = { + NOT = { + has_county_modifier = oath_mend_the_fracture_county + } + } + add_county_modifier = { + modifier = oath_mend_the_fracture_county + years = 2 + } + add_to_list = synergy_culture_counties + } + } + var:mend_the_fracture_oath_target_culture = { + random_culture_county = { + limit = { + NOT = { + has_county_modifier = oath_mend_the_fracture_county + } + holder = root + } + alternative_limit = { + NOT = { + has_county_modifier = oath_mend_the_fracture_county + } + top_liege = root.top_liege + } + alternative_limit = { + NOT = { + has_county_modifier = oath_mend_the_fracture_county + } + } + add_county_modifier = { + modifier = oath_mend_the_fracture_county + years = 3 + } + add_to_list = synergy_culture_counties + } + } + save_scope_as = county_reward + } + 1 = { + modifier = { + NOT = { + root.culture.culture_head ?= root + } + factor = 0 + } + spawn_army = { + name = ach_culture_synergy_troops + men_at_arms = { + type = accolade_maa_archers + stacks = 1 + } + men_at_arms = { + type = accolade_maa_skirmishers + stacks = 1 + } + location = root.capital_province + uses_supply = no + inheritable = yes + } + var:mend_the_fracture_oath_target_culture = { + if = { + limit = { + NOT = { + culture_head ?= root + } + } + } + culture_head ?= { + spawn_army = { + name = ach_culture_synergy_troops + men_at_arms = { + type = accolade_maa_skirmishers + stacks = 1 + } + location = root.capital_province + uses_supply = no + inheritable = yes + } + } + } + save_scope_as = army_reward + } + 1 = { + modifier = { + NOT = { + root.culture.culture_head ?= root + var:mend_the_fracture_oath_target_culture.culture_head != root + } + factor = 0 + } + modifier = { + opinion = { + target = var:mend_the_fracture_oath_target_culture.culture_head + value = 100 + } + factor = 0 + } + add_opinion = { + target = var:mend_the_fracture_oath_target_culture.culture_head + opinion = 20 + modifier = ach_synergy_culture_opinion + } + save_scope_as = opinion_reward + } + } + + change_variable = { + name = synergy_cultures_amount + subtract = 1 + } + } + + # inform the player about what happened + send_interface_message = { + title = ach_maintenance_events.0002.title + if = { + limit = { + exists = scope:army_reward + } + custom_tooltip = ach_maintenance_events.0002.army_reward + } + if = { + limit = { + exists = scope:opinion_reward + } + custom_tooltip = ach_maintenance_events.0002.opinion_reward + } + if = { + limit = { + exists = scope:county_reward + } + every_in_list = { + list = synergy_culture_counties + show_as_tooltip = { + add_county_modifier = { + modifier = oath_mend_the_fracture_county + years = 2 + } + } + } + } + } + + if = { + limit = { + var:mend_the_fracture_oath_target_culture = { + any_culture_county = { + holder = { + culture = var:mend_the_fracture_oath_target_culture + is_ai = no + } + } + } + } + send_interface_message = { + title = ach_maintenance_events.0002.title + if = { + limit = { + exists = scope:army_reward + } + custom_tooltip = ach_maintenance_events.0002.army_reward + } + if = { + limit = { + exists = scope:opinion_reward + } + custom_tooltip = ach_maintenance_events.0002.opinion_reward + } + if = { + limit = { + exists = scope:county_reward + } + every_in_list = { + list = synergy_culture_counties + show_as_tooltip = { + add_county_modifier = { + modifier = oath_mend_the_fracture_county + years = 2 + } + } + } + } + } + } + remove_variable = synergy_cultures_chance + remove_variable = synergy_cultures_amount + } +} + +ach_maintenance_events.0100 = { #Coronation host is ded, notify guests + type = character_event + title = ach_maintenance_events.0100.t + desc = ach_maintenance_events.0100.desc + theme = realm + + left_portrait = { + character = root + animation = shock + } + + right_portrait = { + character = scope:host + animation = dead + } + + immediate = { + + } + + option = { + name = ach_maintenance_events.0100.a + } + +} + +ach_maintenance_events.0101 = { #Coronation host has been imprisoned, notify guests + type = character_event + title = ach_maintenance_events.0101.t + desc = ach_maintenance_events.0101.desc + theme = realm + + left_portrait = { + character = root + animation = shock + } + + right_portrait = { + character = scope:host + animation = prisonhouse + } + + lower_left_portrait = { + character = scope:gaoler + } + + immediate = { + scope:host.imprisoner = { + save_scope_as = gaoler + } + } + + trigger = { + NOT = { #you know what you did + this = scope:host.imprisoner + } + } + + option = { + name = ach_maintenance_events.0101.a + } + +} + +ach_maintenance_events.0102 = { #Coronation host has been imprisoned, notify host and cancellation + type = character_event + title = ach_maintenance_events.0102.t + desc = ach_maintenance_events.0102.desc + theme = realm + + left_portrait = { + character = root + animation = prisonhouse + } + + right_portrait = { + character = scope:gaoler + animation = manic + } + + immediate = { + scope:host.imprisoner = { + save_scope_as = gaoler + } + } + + option = { + name = ach_maintenance_events.0102.a + } +} + +ach_maintenance_events.0103 = { #No one shows up, notify host + type = character_event + title = ach_maintenance_events.0103.t + desc = ach_maintenance_events.0103.desc + theme = realm + + left_portrait = { + character = root + animation = worry + } + + + immediate = { + + } + + option = { + name = ach_maintenance_events.0103.a + } + +} + +ach_maintenance_events.0104 = { #Officiator ded, host cancelled the coronation, notify guests + type = character_event + title = ach_maintenance_events.0104.t + desc = ach_maintenance_events.0104.desc + theme = realm + + left_portrait = { + character = root + animation = stunned + } + + right_portrait = { + character = scope:host + animation = wailing + } + + lower_right_portrait = { + character = scope:dead_officiator + } + + immediate = { + scope:activity.var:officiator ?= { save_scope_as = dead_officiator } + } + + option = { + name = ach_maintenance_events.0104.a + } + +} + +ach_maintenance_events.0105 = { #Host excommunicated, notify guests + type = character_event + title = ach_maintenance_events.0105.t + desc = ach_maintenance_events.0105.desc + theme = realm + + left_portrait = { + character = root + animation = worry + } + + center_portrait = { + character = scope:host + animation = shame + } + + right_portrait = { + character = scope:hof + animation = go_to_your_room + } + + immediate = { + faith.religious_head = { save_scope_as = hof } + } + + option = { + name = ach_maintenance_events.0105.a + } + +} + +ach_maintenance_events.0106 = { #Host excommunicated, notify host + type = character_event + title = ach_maintenance_events.0106.t + desc = ach_maintenance_events.0106.desc + theme = realm + + left_portrait = { + character = root + animation = shame + } + + right_portrait = { + character = scope:hof + animation = go_to_your_room + } + + immediate = { + faith.religious_head = { save_scope_as = hof } + } + + option = { + name = ach_maintenance_events.0106.a + } + +} diff --git a/N3OW/events/dlc/ach/ach_yearly_events.txt b/N3OW/events/dlc/ach/ach_yearly_events.txt new file mode 100644 index 00000000..e9fa1d79 --- /dev/null +++ b/N3OW/events/dlc/ach/ach_yearly_events.txt @@ -0,0 +1,2198 @@ +namespace = ach_yearly_events + +ach_yearly_events.1001 = { + type = character_event + title = ach_yearly_events.1001.t + desc = ach_yearly_events.1001.desc + theme = stewardship + left_portrait = { + character = root + animation = happy_teacher + } + right_portrait = { + character = scope:liege + animation = thinking + } + + trigger = { + #Standard checks + basic_is_valid_for_yearly_events_trigger = yes + is_adult = yes + is_councillor = yes + has_council_position = councillor_steward + liege = { + is_available_ai = yes + age >= 10 + } + stewardship > liege.stewardship + stewardship >= decent_skill_rating + } + + immediate = { + liege = { + save_scope_as = liege + } + } + + weight_multiplier = { + modifier = { + factor = 0.1 + is_ai = yes + } + } + + cooldown = { years = 20 } + + # Well, you could always give it to me to use... + option = { + name = ach_yearly_events.1001.a + + trigger = { + OR = { + has_trait = deceitful + intrigue >= high_skill_rating + } + NOR = { + has_trait = just + has_trait = honest + } + scope:liege = { + is_ai = yes + } + } + + duel = { + skill = intrigue + target = scope:liege + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = ach_yearly_events.1001.a.success + modifier = { + add = 20 + scope:liege = { + has_trait = trusting + } + } + send_interface_toast = { + title = ach_yearly_events.1001.a.success + left_icon = root + right_icon = scope:liege + + scope:liege = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = ach_yearly_events.1001.a.failure + modifier = { + add = 10 + scope:liege = { + has_trait = paranoid + } + } + send_interface_toast = { + title = ach_yearly_events.1001.a.failure + left_icon = root + right_icon = scope:liege + + reverse_add_opinion = { + modifier = suspicion_opinion + target = scope:liege + opinion = -25 + } + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + ai_greed = 1 + } + } + } + + # Being cautious is useful for a rainy day + option = { + name = ach_yearly_events.1001.b + + add_character_modifier = { + modifier = ach_spending_advice_modifier + years = 10 + } + + if = { + limit = { + scope:liege = { + is_ai = yes + } + } + scope:liege = { + add_character_modifier = { + modifier = ach_cautious_spender_modifier + years = 10 + } + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + patient = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_greed = -0.5 + } + } + } + + # You're the king, go crazy bro! + option = { + name = ach_yearly_events.1001.c + + add_character_modifier = { + modifier = ach_spending_advice_modifier + years = 10 + } + + if = { + limit = { + scope:liege = { + is_ai = yes + } + } + scope:liege = { + add_character_modifier = { + modifier = ach_extravagant_spender_modifier + years = 10 + } + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + patient = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = 0.5 + } + } + } + + # Perhaps a balanced approach? + option = { + name = ach_yearly_events.1001.d + + duel = { + skill = diplomacy + target = scope:liege + + 50 = { #Your liege is impressed + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = ach_yearly_events.1001.d.success + modifier = { + add = 20 + scope:liege = { + has_trait = ambitious + } + } + send_interface_toast = { + title = ach_yearly_events.1001.d.success + left_icon = root + right_icon = scope:liege + + add_prestige = medium_prestige_gain + + add_character_modifier = { + modifier = ach_budgeting_mentor_modifier + years = 10 + } + + if = { + limit = { + scope:liege = { + is_ai = yes + } + } + scope:liege = { + add_character_modifier = { + modifier = ach_balanced_budget_modifier + years = 10 + } + } + } + } + } + 50 = { #Your liege is unimpressed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = ach_yearly_events.1001.d.failure + modifier = { + add = 10 + scope:liege = { + has_trait = content + } + } + send_interface_toast = { + title = ach_yearly_events.1001.d.failure + left_icon = root + right_icon = scope:liege + + add_prestige = minor_prestige_loss + + add_character_modifier = { + modifier = ach_fence_sitter_modifier + years = 10 + } + } + } + } + + stress_impact = { + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +scripted_trigger ach_yearly_events_1002_non_joined_trigger = { + NOR = { + scope:faction = { + any_faction_member = { + this = scope:temp_vassal + } + } + this = root + } + can_join_faction = scope:faction + is_incapable = no + opinion = { + target = liege + value <= 30 + } + is_ai = yes +} + +#You're the Chancellor and your liege has a faction +ach_yearly_events.1002 = { + type = character_event + title = ach_yearly_events.1002.t + desc = ach_yearly_events.1002.desc + + theme = diplomacy + override_background = { + reference = ep3_relaxing_tent + } + left_portrait = { + character = scope:unjoined_vassal + animation = scheme + } + right_portrait = { + character = scope:faction_member + animation = bribing + } + lower_center_portrait = scope:liege + + cooldown = { years = 10 } + + trigger = { + is_independent_ruler = no + liege = { + cp:councillor_chancellor ?= { + this = root + } + any_targeting_faction = { + NOT = { + any_faction_member = { + this = root + } + } + any_faction_member = { + count >= 2 + } + any_faction_member = { + is_ai = yes + is_a_faction_leader = no + } + save_temporary_scope_as = temp_faction + } + any_vassal = { + save_temporary_scope_as = temp_vassal + NOR = { + scope:temp_faction = { + any_faction_member = { + this = scope:temp_vassal + } + } + this = root + } + can_join_faction = scope:temp_faction + is_incapable = no + opinion = { + target = liege + value <= 30 + } + is_ai = yes + } + NOT = { + has_character_flag = had_ach_yearly_events_1002 + } + } + basic_is_valid_for_yearly_events_trigger = yes + } + immediate = { + liege = { + save_scope_as = liege + add_character_flag = { + flag = had_ach_yearly_events_1002 + years = 10 + } + random_targeting_faction = { + limit = { + NOT = { + any_faction_member = { + this = root + } + } + any_faction_member = { + count >= 2 + } + } + save_scope_as = faction + random_faction_member = { + limit = { + is_a_faction_leader = no + is_ai = yes + } + save_scope_as = faction_member + } + } + random_vassal = { + limit = { + scope:faction = { + OR = { + faction_is_type = independence_faction + faction_is_type = nation_fracturing_faction + } + } + save_temporary_scope_as = temp_vassal + primary_title = { + NOT = { + target_is_de_jure_liege_or_above = scope:liege.primary_title + } + } + is_powerful_vassal_of = scope:liege + ach_yearly_events_1002_non_joined_trigger = yes + opinion = { + target = liege + value < 0 + } + } + alternative_limit = { + scope:faction = { + OR = { + faction_is_type = independence_faction + faction_is_type = nation_fracturing_faction + } + } + save_temporary_scope_as = temp_vassal + primary_title = { + NOT = { + target_is_de_jure_liege_or_above = scope:liege.primary_title + } + } + is_powerful_vassal_of = scope:liege + ach_yearly_events_1002_non_joined_trigger = yes + } + alternative_limit = { + scope:faction = { + OR = { + faction_is_type = independence_faction + faction_is_type = nation_fracturing_faction + } + } + save_temporary_scope_as = temp_vassal + primary_title = { + NOT = { + target_is_de_jure_liege_or_above = scope:liege.primary_title + } + } + ach_yearly_events_1002_non_joined_trigger = yes + opinion = { + target = liege + value < 0 + } + } + alternative_limit = { + scope:faction = { + OR = { + faction_is_type = independence_faction + faction_is_type = nation_fracturing_faction + } + } + save_temporary_scope_as = temp_vassal + primary_title = { + NOT = { + target_is_de_jure_liege_or_above = scope:liege.primary_title + } + } + ach_yearly_events_1002_non_joined_trigger = yes + } + alternative_limit = { + save_temporary_scope_as = temp_vassal + is_powerful_vassal_of = scope:liege + opinion = { + target = liege + value <= -50 + } + ach_yearly_events_1002_non_joined_trigger = yes + } + alternative_limit = { + save_temporary_scope_as = temp_vassal + is_powerful_vassal_of = scope:liege + opinion = { + target = liege + value < 0 + } + ach_yearly_events_1002_non_joined_trigger = yes + } + alternative_limit = { + save_temporary_scope_as = temp_vassal + opinion = { + target = liege + value <= -50 + } + ach_yearly_events_1002_non_joined_trigger = yes + } + alternative_limit = { + save_temporary_scope_as = temp_vassal + ach_yearly_events_1002_non_joined_trigger = yes + opinion = { + target = liege + value < 0 + } + } + alternative_limit = { + save_temporary_scope_as = temp_vassal + ach_yearly_events_1002_non_joined_trigger = yes + } + save_scope_as = unjoined_vassal + } + } + } + #You're such a seasoned chancellor, you can stop other players from joining + option = { + name = ach_yearly_events.1002.a + trigger = { diplomacy >= very_high_skill_rating } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + scope:liege = { + send_interface_message = { + type = msg_chancellor_task_good + title = chancellor_isolates_factions_title + desc = chancellor_isolates_factions_desc + left_icon = root + + add_character_modifier = { + modifier = ach_chancellor_isolating_factions_modifier + years = 5 + } + scope:unjoined_vassal = { + add_opinion = { + modifier = loyalty_opinion + target = scope:liege + opinion = 40 + } + } + } + } + stress_impact = { + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_energy = -0.5 + } + modifier = { + add = -50 + has_trait = impatient + } + } + } + #Try to stop other characters from joining + option = { + name = ach_yearly_events.1002.b + trigger = { diplomacy < very_high_skill_rating } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { #You reorganize the administration and plan for the future + desc = ach_yearly_events.1002.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + type = event_toast_effect_good + title = ach_yearly_events.1002.b.success + left_icon = root + right_icon = scope:liege + + scope:liege = { + send_interface_message = { + type = msg_chancellor_task_good + title = chancellor_isolates_factions_title + desc = chancellor_isolates_factions_desc + left_icon = root + + add_character_modifier = { + modifier = ach_chancellor_isolating_factions_modifier + years = 5 + } + scope:unjoined_vassal = { + add_opinion = { + modifier = loyalty_opinion + target = scope:liege + opinion = 40 + } + } + } + } + } + } + 50 = { #You fail so bad you drive the character into the faction + desc = ach_yearly_events.1002.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ach_yearly_events.1002.b.failure + left_icon = root + right_icon = scope:liege + add_stress = minor_stress_gain + scope:unjoined_vassal = { + join_faction = scope:faction + } + } + } + } + stress_impact = { + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.5 + ai_energy = -0.5 + } + modifier = { + add = -50 + has_trait = impatient + } + modifier = { + add = 50 + diplomacy > high_skill_rating + } + modifier = { + add = 50 + diplomacy >= extremely_high_skill_rating + } + modifier = { + add = -50 + diplomacy < medium_skill_rating + } + modifier = { + factor = 0 + diplomacy <= low_skill_rating + } + } + } + #They have a point... + option = { + name = ach_yearly_events.1002.c + flavor = ach_yearly_events.1002.c.flavor + trigger = { + can_join_faction = scope:faction + OR = { + NOT = { + scope:faction = { + OR = { + faction_is_type = independence_faction + faction_is_type = nation_fracturing_faction + } + } + } + OR = { + has_trait = ambitious + has_trait = greedy + has_trait = arrogant + has_trait = arbitrary + has_trait = fickle + has_trait = eccentric + has_trait = disloyal + primary_title = { + NOT = { + target_is_de_jure_liege_or_above = scope:liege.primary_title + } + } + } + } + } + add_internal_flag = dangerous + join_faction = scope:faction + scope:unjoined_vassal = { + join_faction = scope:faction + } + reverse_add_opinion = { + modifier = betrayal_opinion + target = scope:liege + opinion = -30 + } + + add_joined_faction_discontent = 20 + stress_impact = { + arrogant = miniscule_stress_impact_loss + loyal = minor_stress_impact_gain + trusting = medium_stress_impact_gain + just = medium_stress_impact_gain + content = medium_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + modifier = { + add = -75 + scope:faction = { + OR = { + faction_is_type = independence_faction + faction_is_type = nation_fracturing_faction + } + } + primary_title = { + target_is_de_jure_liege_or_above = scope:liege.primary_title + } + } + modifier = { + add = 100 + scope:faction = { + OR = { + faction_is_type = independence_faction + faction_is_type = nation_fracturing_faction + } + } + primary_title = { + NOT = { + target_is_de_jure_liege_or_above = scope:liege.primary_title + } + } + } + modifier = { + add = 50 + has_trait = disloyal + } + modifier = { + add = -50 + has_trait = loyal + } + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = just + has_trait = content + has_trait = humble + } + } + } + } + #Remove existing faction member + option = { + name = ach_yearly_events.1002.d + flavor = ach_yearly_events.1002.d.flavor + reverse_add_opinion = { + target = scope:liege + modifier = grateful_opinion + opinion = 30 + } + scope:liege = { + send_interface_message = { + type = msg_chancellor_task_good + title = chancellor_removes_faction_member_title + desc = chancellor_removes_faction_member_desc + left_icon = root + + scope:faction_member = { + leave_faction = scope:faction + } + } + } + #Modifier that applies effect which makes vassals less likely to join factions + if = { + limit = { + scope:faction = { + any_faction_member = { + NOT = { + this = scope:faction_member + } + } + } + } + scope:faction = { + every_faction_member = { + custom = custom.every_scope_faction_member + limit = { + NOT = { + this = scope:faction_member + } + } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -20 + } + } + } + } + stress_impact = { + patient = minor_stress_impact_gain + craven = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_energy = 0.5 + } + modifier = { + add = -50 + OR = { + has_trait = patient + has_trait = craven + has_trait = gregarious + } + } + } + } +} + +#You're the marshal and your liege just lost a big battle +ach_yearly_events.1003 = { + type = character_event + title = ach_yearly_events.1003.t + desc = ach_yearly_events.1003.desc + + theme = martial + override_background = { + reference = battlefield + } + override_effect_2d = { + trigger = { + NOR = { + scope:battle_province = { + terrain = desert + } + scope:battle_province = { + terrain = desert_mountains + } + scope:battle_province = { + terrain = drylands + } + scope:battle_province = { + terrain = oasis + } + scope:battle_province = { + location_has_harsh_winter_trigger = yes + } + } + } + reference = rain + } + left_portrait = { + character = scope:commander + triggered_animation = { + trigger = { + scope:commander = { + NOT = { this = scope:liege } + } + } + animation = sword_yield_start + } + triggered_animation = { + trigger = { + scope:commander = { + this = scope:liege + } + } + animation = war_over_loss + } + } + lower_right_portrait = scope:foe + lower_left_portrait = scope:show_liege + + trigger = { + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + liege = { is_landed = yes } + has_council_position = councillor_marshal + } + immediate = { + liege ?= { + save_scope_as = liege + add_character_flag = { + flag = had_ach_yearly_events_1003 + years = 10 + } + } + if = { + limit = { + OR = { + NOT = { + exists = scope:commander + } + scope:commander = scope:liege + scope:commander = root + } + } + liege = { + save_scope_as = commander + } + } + else = { + liege = { + save_scope_as = show_liege + } + } + } + cooldown = { years = 10 } + + #I AM GOOD MARSHAL AND CAN SORT THIS + option = { + name = ach_yearly_events.1003.a + trigger = { + martial >= very_high_skill_rating + } + add_martial_lifestyle_xp = medium_lifestyle_xp + scope:liege = { + send_interface_message = { + type = msg_marshal_task_good + title = marshal_aids_troop_recovery_title + desc = marshal_aids_troop_recovery_desc + left_icon = root + add_character_modifier = { + modifier = ach_marshal_reconstituting_army_modifier + years = 2 + } + } + } + stress_impact = { + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 0.5 + ai_rationality = 0.5 + } + modifier = { + opinion = { + target = liege + value < -50 + } + add = -50 + } + modifier = { + opinion = { + target = liege + value < 0 + } + add = -25 + } + modifier = { + opinion = { + target = liege + value >= 50 + } + add = 25 + } + modifier = { + opinion = { + target = liege + value > 75 + } + add = 50 + } + modifier = { + OR = { + has_trait = lazy + has_trait = fickle + } + add = -50 + } + modifier = { + opinion = { + target = liege + value < -80 + } + factor = 0 + } + } + } + #I AM HONORABLE AND WILL FIGHT TOO + option = { + name = ach_yearly_events.1003.b + save_scope_as = marshal + scope:liege = { + send_interface_message = { + type = msg_marshal_task_good + title = marshal_joins_war_title + desc = marshal_joins_war_desc + left_icon = root + scope:liege_war = { + if = { + limit = { + primary_attacker = scope:liege + } + add_attacker = root + } + else = { + add_defender = root + } + } + } + every_vassal = { + custom = custom.every_fellow_vassal + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:liege + opinion = 25 + } + + if = { + limit = { + OR = { + NOT = { has_trait = loyal } + AND = { + NOT = { has_trait = unyielding_defender } + scope:liege_war = { + primary_defender = scope:liege + } + } + AND = { + NOT = { has_trait = aggressive_attacker } + scope:liege_war = { + primary_attacker = scope:liege + } + } + } + } + random_list = { + 10 = { + trigger = { + NOT = { has_trait = unyielding_defender } + scope:liege_war = { + primary_defender = scope:liege + } + } + add_trait = unyielding_defender + } + 10 = { + trigger = { + NOT = { has_trait = aggressive_attacker } + scope:liege_war = { + primary_attacker = scope:liege + } + } + add_trait = aggressive_attacker + } + 20 = { + trigger = { + NOT = { has_trait = loyal } + } + add_trait = loyal + } + 70 = {} + } + } + else = { + add_prestige = minor_prestige_gain + } + stress_impact = { + arbitrary = major_stress_impact_gain + craven = major_stress_impact_gain + lazy = medium_stress_impact_gain + calm = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_boldness = 1 + } + modifier = { + opinion = { + target = liege + value < -50 + } + add = -100 + } + modifier = { + opinion = { + target = liege + value < 0 + } + add = -50 + } + modifier = { + opinion = { + target = liege + value >= 50 + } + add = 50 + } + modifier = { + opinion = { + target = liege + value >= 75 + } + add = 50 + } + modifier = { + OR = { + has_trait = calm + has_trait = paranoid + has_trait = fickle + } + add = -50 + } + modifier = { + OR = { + has_trait = arbitrary + has_trait = craven + has_trait = lazy + opinion = { + target = liege + value < -50 + } + } + } + } + } + #I'll try to help him recover... although I'm not great at marshaling + option = { + name = ach_yearly_events.1003.c + trigger = { + martial < very_high_skill_rating + } + show_unlock_reason = no + add_martial_lifestyle_xp = medium_lifestyle_xp + duel = { + skill = martial + value = medium_skill_rating + 50 = { #The army is restored + desc = ach_yearly_events.1003.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = ach_yearly_events.1003.c.success + left_icon = root + right_icon = scope:liege + scope:liege = { + send_interface_message = { + type = msg_marshal_task_good + title = marshal_aids_troop_recovery_title + desc = marshal_aids_troop_recovery_desc + left_icon = root + add_character_modifier = { + modifier = ach_marshal_reconstituting_army_modifier + years = 2 + } + } + } + } + } + 50 = { #Everything remains in shambles + desc = ach_yearly_events.1003.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ach_yearly_events.1003.c.failure + left_icon = root + right_icon = scope:liege + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 0.5 + ai_rationality = 0.5 + } + modifier = { + opinion = { + target = liege + value < -50 + } + add = -50 + } + modifier = { + opinion = { + target = liege + value < 0 + } + add = -25 + } + modifier = { + opinion = { + target = liege + value >= 50 + } + add = 25 + } + modifier = { + opinion = { + target = liege + value > 75 + } + add = 50 + } + modifier = { + OR = { + has_trait = lazy + has_trait = fickle + } + add = -50 + } + modifier = { + opinion = { + target = liege + value < -80 + } + factor = 0 + } + } + } + #My liege deserves this mess and so do his terrible troops + option = { + name = ach_yearly_events.1003.d + flavor = ach_yearly_events.1003.d.flavor + add_dread = minor_dread_gain + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:liege + opinion = -10 + } + stress_impact = { + compassionate = medium_stress_impact_gain + generous = minor_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = -1 + } + modifier = { + add = -50 + OR = { + has_trait = generous + } + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = compassionate + } + } + } + } + after = { + if = { + limit = { + exists = scope:foe + is_at_war_with = scope:foe + } + scope:foe = { + send_interface_message = { + type = msg_marshal_task_bad + title = marshal_joins_war_title_foe + desc = marshal_joins_war_desc_foe + left_icon = root + } + } + } + } +} + +#You're the steward and your liege is broke +ach_yearly_events.1004 = { + type = character_event + title = ach_yearly_events.1004.t + desc = { + desc = ach_yearly_events.1004.desc + first_valid = { + triggered_desc = { + trigger = { + scope:liege = { + OR = { + has_trait = humble + has_trait = patient + has_trait = temperate + has_trait = compassionate + has_trait = calm + has_trait = forgiving + } + } + } + desc = ach_yearly_events.1004.desc_end + } + desc = ach_yearly_events.1004.desc_harsh + } + } + + theme = stewardship + override_background = { + trigger = { + liege = { + culture = { + OR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + NOT = { government_has_flag = government_is_tribal } + } + } + reference = ep3_city_gate + } + override_background = { + trigger = { + liege = { + OR = { + culture = { + NOR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + government_has_flag = government_is_tribal + } + } + + } + reference = market + } + left_portrait = { + character = root + animation = debating + camera = camera_event_left_away_3_4 + } + right_portrait = { + character = scope:liege + animation = jockey_wave + camera = camera_event_horse_right + } + + cooldown = { years = 10 } + + trigger = { + is_independent_ruler = no + liege ?= { + age >= 10 + cp:councillor_steward ?= { + this = root + } + + OR = { + gold < 0 + AND = { + monthly_character_income < 0 + is_at_war = no + gold <= medium_gold_value + } + } + NOT = { + has_character_flag = had_ach_yearly_1004 + } + basic_is_available_ai = yes + NOT = { exists = involved_activity } + is_travelling = no + } + basic_is_valid_for_yearly_events_trigger = yes + } + immediate = { + liege = { + save_scope_as = liege + add_character_flag = { + flag = had_ach_yearly_1004 + years = 10 + } + } + } + #A quick cash injection, by any means! + option = { + name = ach_yearly_events.1004.a + flavor = ach_yearly_events.1004.a.flavor + trigger = { + liege = { + any_powerful_vassal = { + is_ai = yes + NOT = { this = root } + NOT = { is_at_war_with = scope:liege } + } + } + } + reverse_add_opinion = { + target = scope:liege + modifier = grateful_opinion + opinion = 40 + } + pay_short_term_gold = { + target = scope:liege + gold = minor_gold_value + } + scope:liege = { + every_powerful_vassal = { + custom = custom.every_liege_lending_vassal + limit = { + is_ai = yes + NOT = { this = root } + NOT = { is_at_war_with = scope:liege } + } + pay_short_term_gold = { + target = scope:liege + gold = scope:liege.minor_gold_value + } + add_opinion = { + target = root + modifier = irritated_opinion + opinion = -25 + } + } + } + hidden_effect = { + scope:liege = { + send_interface_message = { + type = msg_steward_task_good + title = steward_gathers_emergency_tithe_title + desc = steward_gathers_emergency_tithe_desc + left_icon = root + + show_as_tooltip = { + add_gold = major_gold_value + } + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + arrogant = major_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + modifier = { + add = -50 + opinion = { + target = scope:liege + value < 0 + } + } + modifier = { + add = 50 + opinion = { + target = scope:liege + value > 50 + } + } + modifier = { + add = -50 + OR = { + gold < major_gold_value + has_trait = vengeful + } + } + modifier = { + factor = 0 + OR = { + gold < medium_gold_value + opinion = { + target = scope:liege + value < -50 + } + has_trait = greedy + has_trait = paranoid + has_trait = arrogant + } + } + } + } + #My liege needs steady income coming in, not cash now + option = { + name = ach_yearly_events.1004.b + trigger = { + stewardship < very_high_skill_rating + } + add_stewardship_lifestyle_xp = medium_lifestyle_xp + duel = { + skill = stewardship + value = average_skill_rating + 50 = { #You reorganize the administration and plan for the future + desc = ach_yearly_events.1004.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = ach_yearly_events.1004.b.success + left_icon = root + right_icon = scope:liege + scope:liege = { + #Only shown because of custom loc making it look right + show_as_tooltip = { + every_held_title = { + custom = custom.every_liege_domain_county + limit = { + tier = tier_county + NOT = { + any_county_province = { + is_occupied = yes + } + } + } + add_county_modifier = { + modifier = ach_stewardship_bankruptcy_modifier + years = 10 + } + } + } + send_interface_message = { + type = msg_steward_task_good + title = steward_aids_financial_recovery_title + desc = steward_aids_financial_recovery_desc + left_icon = root + + #hidden because of custom loc making it look right + hidden_effect = { + every_held_title = { + custom = custom.every_domain_county + limit = { + tier = tier_county + NOT = { + any_county_province = { + is_occupied = yes + } + } + } + add_county_modifier = { + modifier = ach_stewardship_bankruptcy_modifier + years = 10 + } + } + } + } + } + } + } + 50 = { #You fail so bad you doubt your abilities + desc = ach_yearly_events.1004.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ach_yearly_events.1004.b.failure + left_icon = root + right_icon = scope:liege + + add_stress = medium_stress_gain + } + } + } + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + impatient = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 1 + } + modifier = { + add = -50 + opinion = { + target = scope:liege + value < -50 + } + } + modifier = { + add = -25 + opinion = { + target = scope:liege + value < 0 + } + } + modifier = { + add = 25 + opinion = { + target = scope:liege + value > 50 + } + } + modifier = { + add = -50 + stewardship <= average_skill_rating + } + modifier = { + factor = 0 + OR = { + stewardship < low_skill_rating + has_trait = lazy + has_trait = impatient + } + } + } + } + #I am the god-tier steward that can easily reform the realm to get more tax + option = { + name = ach_yearly_events.1004.c + trigger = { + stewardship >= very_high_skill_rating + } + add_stewardship_lifestyle_xp = medium_lifestyle_xp + scope:liege = { + #Only shown because of custom loc making it look right + show_as_tooltip = { + every_held_title = { + custom = custom.every_liege_domain_county + limit = { + tier = tier_county + NOT = { + any_county_province = { + is_occupied = yes + } + } + } + add_county_modifier = { + modifier = ach_stewardship_bankruptcy_modifier + years = 10 + } + } + } + + send_interface_message = { + type = msg_steward_task_good + title = steward_aids_financial_recovery_title + desc = steward_aids_financial_recovery_desc + left_icon = root + #hidden because of custom loc making it look right + hidden_effect = { + every_held_title = { + custom = custom.every_domain_county + limit = { + tier = tier_county + NOT = { + any_county_province = { + is_occupied = yes + } + } + } + add_county_modifier = { + modifier = ach_stewardship_bankruptcy_modifier + years = 10 + } + } + } + + } + } + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + impatient = major_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 1 + } + modifier = { + add = -50 + opinion = { + target = scope:liege + value < -50 + } + } + modifier = { + add = -25 + opinion = { + target = scope:liege + value < 0 + } + } + modifier = { + add = 25 + opinion = { + target = scope:liege + value > 50 + } + } + modifier = { + factor = 0 + OR = { + stewardship < low_skill_rating + has_trait = lazy + has_trait = impatient + } + } + } + } + #I can just welcome his creditors and the impoverished into my domain + option = { + name = ach_yearly_events.1004.d + flavor = ach_yearly_events.1004.d.flavor + capital_county = { + add_county_modifier = { + modifier = ach_welcoming_lieges_creditors_modifier + years = 10 + } + } + reverse_add_opinion = { + target = scope:liege + modifier = insult_opinion + opinion = -25 + } + stress_impact = { + forgiving = medium_stress_impact_gain + generous = major_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_greed = 1 + } + modifier = { + add = -50 + opinion = { + target = scope:liege + value > 50 + } + } + modifier = { + add = -25 + opinion = { + target = scope:liege + value > 0 + } + } + modifier = { + add = 50 + opinion = { + target = scope:liege + value < -50 + } + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = generous + has_trait = diligent + } + } + } + } +} + +ach_yearly_events.1005 = { #Coronation call to action if player forgetii + type = character_event + + title = ach_yearly_events.1005.t + desc = ach_yearly_events.1005.desc + + theme = coronation + + left_portrait = { + character = root + animation = personality_bold + } + + trigger = { + has_ach_dlc_trigger = yes + is_ai = no + primary_title.tier >= tier_kingdom + has_realm_law = uncrowned + NOR = { + has_character_flag = had_coronation_reminder + any_sponsored_inspiration = { has_inspiration_type = smith_inspiration } + } + is_available_adult = yes + } + + on_trigger_fail = { + if = { + limit = { + primary_title.tier >= tier_kingdom + has_realm_law = uncrowned + NOT = { has_character_flag = had_coronation_reminder } + } + trigger_event = { + id = ach_yearly_events.1005 + years = 1 + } + } + } + + immediate = { + add_character_flag = had_coronation_reminder + if = { + limit = { + exists = cp:councillor_chancellor + } + cp:councillor_chancellor = { save_scope_as = messenger } + } + else_if = { + limit = { + any_councillor = { + is_kurultai_trigger = yes + } + } + random_councillor = { + limit = { + is_kurultai_trigger = yes + } + save_scope_as = messenger + } + } + else = { + random_vassal = { save_scope_as = messenger } + } + } + + option = { #Get me a crown worthy of GetPrimaryTitle.GetName! + name = ach_yearly_events.1005.a + trigger = { coronation_has_proper_artifact_trigger = no } + custom_tooltip = court_maintenance.0011.coronation.tooltip + create_proper_coronation_artifact = yes + } + + option = { #Ye, let's have it + name = ach_yearly_events.1005.b + trigger = { coronation_has_proper_artifact_trigger = yes } + custom_tooltip = fund_inspiration.1001.b.coronation_ready + open_view_data = { + view = activity_list_detail_host_window + data = activity_type:activity_coronation + player = root + } + } + + option = { + name = ach_yearly_events.1005.c + custom_tooltip = court_maintenance.0011.b.tooltip.ach + } + +} + +scripted_trigger ach_yearly_events_1010_fawner_trigger = { + is_alive = yes + is_imprisoned = no + is_incapable = no + has_contagious_deadly_disease_trigger = no + is_adult = yes + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + opinion = { + target = root + value > 0 + } + NOR = { + is_consort_of = root + is_close_family_of = root + } +} + +#Emperor+ becoming uncrowned again +ach_yearly_events.1010 = { #Coronation call to action if player forgetii + type = character_event + + title = ach_yearly_events.1010.t + desc = { + desc = ach_yearly_events.1010.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:vassal_title_2 + } + desc = ach_yearly_events.1010.desc_vassals + } + desc = ach_yearly_events.1010.desc_no_vassals + } + first_valid = { + triggered_desc = { + trigger = { + coronation_proper_artifact_regalia_trigger = yes + } + desc = ach_yearly_events.1010.desc_outro_regalia + } + desc = ach_yearly_events.1010.desc_outro_crown + } + } + window = big_event_window + theme = coronation + + override_background = { + reference = holy_site_unique + } + left_portrait = { + character = scope:fawner_2 + animation = throne_room_cheer_1 + camera = camera_event_left_away_3_4 + } + center_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = eccentric + has_trait = lunatic_1 + has_trait = lunatic_genetic + ai_rationality <= high_negative_ai_value + } + ai_greed > low_positive_ai_value + } + animation = manic + } + triggered_animation = { + trigger = { + ai_compassion > low_positive_ai_value + NOR = { + has_trait = depressed + has_trait = temperate + has_trait = cynical + has_trait = callous + has_trait = sadistic + has_trait = vengeful + has_trait = just + has_trait = arrogant + has_trait = ambitious + has_trait = paranoid + dread >= 20 + } + } + animation = personality_compassionate + } + triggered_animation = { + trigger = { + has_lifestyle = martial_lifestyle + } + animation = marshal + } + animation = war_over_win + } + right_portrait = { + character = scope:fawner + animation = throne_room_cheer_2 + camera = camera_event_right_away_3_4 + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + #Sorry dawg + show_as_tooltip = { add_realm_law = uncrowned } + custom_tooltip = ach_coronation_suggestion_tt + primary_title = { + save_scope_as = new_title + random_direct_de_jure_vassal_title = { + limit = { + OR = { + holder.top_liege = root + holder.suzerain = root + NOR = { + exists = holder + this = scope:title + } + } + } + save_scope_as = vassal_title_1 + } + random_direct_de_jure_vassal_title = { + limit = { + OR = { + holder.top_liege = root + holder.suzerain = root + NOR = { + exists = holder + this = scope:title + } + } + NOT = { + this = scope:vassal_title_1 + } + } + save_scope_as = vassal_title_2 + } + } + ordered_councillor = { + order_by = "opinion(root)" + limit = { + ach_yearly_events_1010_fawner_trigger = yes + NOR = { + is_at_war_with = root + is_a_faction_member = yes + } + } + save_scope_as = fawner + } + if = { + limit = { + NOT = { + exists = scope:fawner + } + } + ordered_vassal = { + order_by = "opinion(root)" + limit = { + ach_yearly_events_1010_fawner_trigger = yes + NOR = { + is_at_war_with = root + is_a_faction_member = yes + } + } + save_scope_as = fawner + } + } + if = { + limit = { + NOT = { + exists = scope:fawner + } + } + ordered_courtier = { + order_by = "opinion(root)" + limit = { + ach_yearly_events_1010_fawner_trigger = yes + } + alternative_limit = { + is_alive = yes + is_imprisoned = no + age >= 12 + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + save_scope_as = fawner + } + } + if = { + limit = { + NOT = { + exists = scope:fawner + } + } + ordered_courtier = { + order_by = "opinion(root)" + save_scope_as = fawner + } + } + if = { + limit = { + NOT = { + exists = scope:fawner + } + } + ordered_pool_guest = { + order_by = "opinion(root)" + limit = { + is_alive = yes + is_imprisoned = no + age >= 12 + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + save_scope_as = fawner + } + } + #SAVE ANOTHER + ordered_councillor = { + order_by = "opinion(root)" + limit = { + ach_yearly_events_1010_fawner_trigger = yes + NOR = { + is_at_war_with = root + is_a_faction_member = yes + this = scope:fawner + } + } + save_scope_as = fawner_2 + } + if = { + limit = { + NOT = { + exists = scope:fawner_2 + } + } + ordered_vassal = { + order_by = "opinion(root)" + limit = { + ach_yearly_events_1010_fawner_trigger = yes + NOR = { + is_at_war_with = root + is_a_faction_member = yes + this = scope:fawner + } + } + save_scope_as = fawner_2 + } + } + if = { + limit = { + NOT = { + exists = scope:fawner_2 + } + } + ordered_courtier = { + order_by = "opinion(root)" + limit = { + ach_yearly_events_1010_fawner_trigger = yes + NOT = { + this = scope:fawner + } + } + alternative_limit = { + is_alive = yes + is_imprisoned = no + age >= 12 + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + this = scope:fawner + } + } + save_scope_as = fawner_2 + } + } + if = { + limit = { + NOT = { + exists = scope:fawner_2 + } + } + ordered_pool_guest = { + order_by = "opinion(root)" + limit = { + is_alive = yes + is_imprisoned = no + age >= 12 + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + this = scope:fawner + } + } + save_scope_as = fawner_2 + } + } + } + option = { + name = ach_yearly_events.1010.a + } +} diff --git a/N3OW/events/dlc/bp3/bp3_court_position_events.txt b/N3OW/events/dlc/bp3/bp3_court_position_events.txt new file mode 100644 index 00000000..692e2c5c --- /dev/null +++ b/N3OW/events/dlc/bp3/bp3_court_position_events.txt @@ -0,0 +1,210 @@ +namespace = bp3_court_position + +# Court Brewmaster upkeep event +bp3_court_position.100 = { + type = character_event + hidden = yes + + trigger = { + NOT = { has_variable = experimental_brew_cooldown } + exists = court_position:court_brewmaster_court_position + has_variable = active_experimental_brew + } + + immediate = { + # Set a cooldown, so it can only happen once every 6 months + set_variable = { + name = experimental_brew_cooldown + days = 179 + } + + set_variable = { + name = experimental_brew_creator + value = court_position:court_brewmaster_court_position + } + + # Find what kind of drink it is (see 00_court_position_modifiers for a list of modifiers) + random_list = { + 3 = { # Negative Drinks + add_character_flag = experimental_brew_negative + } + 1 = { # Childish Drinks + trigger = { + any_child = { + count >= 1 + is_adult = no + age >= 6 + } + } + add_character_flag = experimental_brew_childish + random_child = { + limit = { + is_adult = no + age >= 6 + } + root = { + set_variable = { + name = experimental_brew_child + value = prev + } + } + } + } + 10 = { # Positive Drinks + add_character_flag = experimental_brew_positive + } + 3 = { # Very Positive Drinks + add_character_flag = experimental_brew_very_positive + } + } + + # Assign modifier and name + switch = { + trigger = has_character_flag + experimental_brew_negative = { + random_list = { + 1 = { # Health + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = small_health_negative + } + } + 1 = { # Courtier and Guest Opinion + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = court_guest_opinion_negative + } + } + 1 = { # Negative Prestige + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = prestige_negative + } + } + 1 = { # Negative Piety + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = piety_negative + } + } + } + } + experimental_brew_childish = { + # Child Opinion + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = child_opinion + } + } + experimental_brew_positive = { + random_list = { + 1 = { # Diplomacy + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = diplomacy + } + } + 1 = { # Martial + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = martial + } + } + 1 = { # Stewardship + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = stewardship + } + } + 1 = { # Intrigue + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = intrigue + } + } + 1 = { # Learning + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = learning + } + } + 1 = { # Prowess + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = prowess + } + } + 1 = { # Courtier and Guest Opinion + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = court_guest_opinion_positive + } + } + 1 = { # Courtly Opinion + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = courtly_opinion + } + } + 1 = { # Prestige + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = prestige_positive + } + } + 1 = { # Piety + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = piety_positive + } + } + 1 = { # Attraction Opinion + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = attraction_opinion + } + } + 1 = { # Fertility + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = fertility + } + } + } + } + experimental_brew_very_positive = { + random_list = { + 1 = { # General Opinion + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = general_opinion + } + } + 1 = { # Stress Loss + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = stress_loss + } + } + 1 = { # Renown + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = renown + } + } + 1 = { # Fascination + trigger = { + root.culture.culture_head = root + } + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = fascination + } + } + 1 = { # Monthly Income + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = monthly_income + } + } + 1 = { # Health + court_brewmaster_assign_modifier_positive_effect = { + MODIFIER = small_health_positive + } + } + } + } + } + + ### Clean up + remove_character_flag = experimental_brew_negative + remove_character_flag = experimental_brew_childish + remove_character_flag = experimental_brew_positive + remove_character_flag = experimental_brew_very_positive + remove_variable = experimental_brew_child + remove_variable = experimental_brew_creator + + trigger_event = { + id = bp3_court_position.100 + months = 6 + } + } +} diff --git a/N3OW/events/dlc/bp3/bp3_journey_events.txt b/N3OW/events/dlc/bp3/bp3_journey_events.txt new file mode 100644 index 00000000..cbd89ed1 --- /dev/null +++ b/N3OW/events/dlc/bp3/bp3_journey_events.txt @@ -0,0 +1,6813 @@ +namespace = bp3_journey + +### Setup Events +# Arrival Event +bp3_journey.0005 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.0005.t + desc = bp3_journey.0005.desc + theme = journey_activity + + left_portrait = { + character = scope:scribe_1 + animation = writing + } + + center_portrait = { + character = scope:host + animation = survey_staff + } + + right_portrait = { + character = scope:scribe_2 + animation = happy_teacher + } + + trigger = { + this = scope:host + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_flag = generated_scribe + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_character_flag = generated_scribe + } + save_scope_as = scribe_1 + } + random_attending_character = { + limit = { + has_character_flag = generated_scribe + this != scope:scribe_1 + } + save_scope_as = scribe_2 + } + } + } + } + + option = { + name = bp3_journey.0005.a # Diplomacy + skill = diplomacy + trigger = { + scope:activity.activity_location = { + journey_diplomacy_skill_monument_trigger = yes + } + } + + custom_tooltip = diplomacy_skill_focus_tt + scope:activity = { + set_variable = { + name = diplomacy_skill_focus + value = yes + } + } + } + + option = { + name = bp3_journey.0005.b # Martial + skill = martial + trigger = { + scope:activity.activity_location = { + journey_martial_skill_monument_trigger = yes + } + } + + custom_tooltip = martial_skill_focus_tt + scope:activity = { + set_variable = { + name = martial_skill_focus + value = yes + } + } + } + + option = { + name = bp3_journey.0005.c # Learning + skill = learning + trigger = { + scope:activity.activity_location = { + journey_learning_skill_monument_trigger = yes + } + } + + custom_tooltip = learning_skill_focus_tt + scope:activity = { + set_variable = { + name = learning_skill_focus + value = yes + } + } + } + + option = { + name = bp3_journey.0005.d # Stewardship + skill = stewardship + trigger = { + scope:activity.activity_location = { + journey_stewardship_skill_monument_trigger = yes + } + } + + custom_tooltip = stewardship_skill_focus_tt + scope:activity = { + set_variable = { + name = stewardship_skill_focus + value = yes + } + } + } + + option = { + name = bp3_journey.0005.e # Intrigue + skill = intrigue + trigger = { + scope:activity.activity_location = { + journey_intrigue_skill_monument_trigger = yes + } + } + + custom_tooltip = intrigue_skill_focus_tt + scope:activity = { + set_variable = { + name = intrigue_skill_focus + value = yes + } + } + } +} + +# Ending Event +bp3_journey.0010 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.0010.t + desc = bp3_journey.0010.desc + theme = journey_activity + + left_portrait = { + character = scope:scribe_1 + animation = reading + } + + center_portrait = { + character = scope:host + animation = throne_room_writer + } + + right_portrait = { + character = scope:scribe_2 + animation = page_flipping + } + + trigger = { + this = scope:host + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_flag = generated_scribe + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_character_flag = generated_scribe + } + save_scope_as = scribe_1 + } + random_attending_character = { + limit = { + has_character_flag = generated_scribe + this != scope:scribe_1 + } + save_scope_as = scribe_2 + } + } + } + random = { + chance = scope:activity.var:skill_chance + save_scope_as = extra_skill_gained + } + } + + option = { + name = bp3_journey.0010.a + scope:activity = { + add_activity_log_entry = { + key = journey_skill_gain_final_log + score = 1000 + character = root + tags = { positive } + show_in_conclusion = yes + root = { + if = { + limit = { + scope:activity = { + has_variable = diplomacy_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_diplomacy_skill = 1 + } + else_if = { + limit = { + scope:activity = { + has_variable = learning_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_learning_skill = 1 + } + else_if = { + limit = { + scope:activity = { + has_variable = martial_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_martial_skill = 1 + } + else_if = { + limit = { + scope:activity = { + has_variable = stewardship_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_stewardship_skill = 1 + } + else_if = { + limit = { + scope:activity = { + has_variable = intrigue_skill_focus + } + NOT = { exists = scope:extra_skill_gained } + } + add_intrigue_skill = 1 + } + + # Knowledge Hoarding outcome + if = { + limit = { + exists = scope:extra_skill_gained + } + custom_tooltip = extra_skill_gained_tt + if = { + limit = { + scope:activity = { has_variable = intrigue_skill_focus } + } + add_intrigue_skill = 2 + } + else_if = { + limit = { + scope:activity = { has_variable = martial_skill_focus } + } + add_martial_skill = 2 + } + else_if = { + limit = { + scope:activity = { has_variable = learning_skill_focus } + } + add_learning_skill = 2 + } + else_if = { + limit = { + scope:activity = { has_variable = stewardship_skill_focus } + } + add_stewardship_skill = 2 + } + else_if = { + limit = { + scope:activity = { has_variable = diplomacy_skill_focus } + } + add_diplomacy_skill = 2 + } + } + else = { + custom_tooltip = no_extra_skill_gained_tt + } + } + } + } + } +} + +# Mid-point Visit Event +bp3_journey.0015 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.0015.t + desc = bp3_journey.0015.desc + theme = journey_activity + + override_background = { + trigger = { + scope:location = { + has_building_with_flag = travel_point_of_interest_economic + NOR = { + has_building = doges_palace_01 + has_building = iron_pillar_of_dhar_01 + has_building = petra_01 + has_building = fairy_chimneys + } + } + } + reference = fp3_cave + } + + left_portrait = { + character = scope:potential_friend + animation = admiration + } + + center_portrait = { + character = scope:host + + triggered_animation = { + trigger = { has_activity_intent = journey_knowledge_hoarding_intent } + animation = happy_teacher + } + + triggered_animation = { + trigger = { has_activity_intent = journey_curiosity_intent } + animation = ecstasy + } + + animation = hero_flex + } + + right_portrait = { + character = scope:potential_lover + animation = love + } + + trigger = { + this = scope:host + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_character_flag = generated_scribe + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_character_flag = generated_scribe + } + save_scope_as = scribe_1 + } + random_attending_character = { + limit = { + has_character_flag = generated_scribe + this != scope:scribe_1 + } + save_scope_as = scribe_2 + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + is_incapable = no + has_relation_potential_friend = root + can_set_relation_friend_trigger = { CHARACTER = root } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_incapable = no + has_relation_potential_friend = root + can_set_relation_friend_trigger = { CHARACTER = root } + } + save_scope_as = potential_friend + } + } + } + else_if = { + limit = { + scope:activity.activity_location.county.holder ?= { + is_available_ai_adult = yes + has_relation_potential_friend = root + can_set_relation_friend_trigger = { CHARACTER = root } + NOR = { + this = root + has_relation_friend = root + has_relation_rival = root + } + } + } + scope:activity.activity_location.county.holder ?= { save_scope_as = potential_friend } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + is_incapable = no + has_relation_potential_lover = root + can_set_relation_lover_trigger = { CHARACTER = root } + this != root + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_incapable = no + has_relation_potential_lover = root + can_set_relation_lover_trigger = { CHARACTER = root } + this != root + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + save_scope_as = potential_lover + } + } + } + else_if = { + limit = { + scope:activity.activity_location.county.holder ?= { + is_available_ai_adult = yes + has_relation_potential_lover = root + can_set_relation_lover_trigger = { CHARACTER = root } + NOR = { + this = root + has_relation_rival = root + } + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + } + scope:activity.activity_location.county.holder ?= { save_scope_as = potential_friend } + } + else_if = { + limit = { + scope:activity = { + any_attending_character = { + is_consort_of = root + NOT = { has_relation_rival = root } + can_set_relation_lover_trigger = { CHARACTER = root } + this != root + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_consort_of = root + NOT = { has_relation_rival = root } + can_set_relation_lover_trigger = { CHARACTER = root } + this != root + trigger_if = { + limit = { + exists = scope:potential_friend + } + this != scope:potential_friend + } + } + save_scope_as = potential_lover + } + } + } + create_character_memory = { + type = visited_monument + } + scope:new_memory = { + set_variable = { + name = special_building + value = scope:activity.activity_location + } + if = { + limit = { has_variable = special_building } + } + } + } + + option = { + name = bp3_journey.0015.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + add_prestige = miniscule_prestige_gain + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.journey_curiosity_intent + trigger = { + has_activity_intent = journey_curiosity_intent + } + add_prestige = miniscule_prestige_gain + if = { + limit = { + culture != root.location.culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + else_if = { + limit = { + exists = capital_county + } + capital_county ?= { + change_development_progress_with_overflow = 10 + } + } + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + add_prestige = miniscule_prestige_gain + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.friend + trigger = { + exists = scope:potential_friend + } + + set_relation_friend = { + target = scope:potential_friend + reason = friend_bonded_by_monument + province = root.location + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.lover + trigger = { + exists = scope:potential_lover + } + + set_relation_lover = { + target = scope:potential_lover + reason = lover_kissed_by_monument + province = root.location + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_journey.0015.prestige + + add_prestige = minor_prestige_gain + + + ai_chance = { + base = 1 + } + } +} + +# Miniature Monument +bp3_journey.1000 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1000.t + desc = bp3_journey.1000.desc + theme = journey_activity + override_background = { reference = market } + + left_portrait = { + character = scope:host + animation = betting + } + + right_portrait = { + character = scope:local_character + animation = chifonie_idle + } + + artifact = { + target = scope:new_trinket + position = lower_center_portrait + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = antiquarian_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + antiquarian_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = antiquarian_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + antiquarian_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else = { + create_character = { + template = antiquarian_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + + scope:local_character = { + hidden_effect_new_object = { + if = { + limit = { + scope:activity = { has_variable = diplomacy_skill_focus } + } + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_diplomacy_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + else_if = { + limit = { + scope:activity = { has_variable = martial_skill_focus } + } + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_martial_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + else_if = { + limit = { + scope:activity = { has_variable = learning_skill_focus } + } + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_learning_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + else_if = { + limit = { + scope:activity = { has_variable = stewardship_skill_focus } + } + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_stewardship_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + else = { + create_artifact = { + name = miniature_monument + description = miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_intrigue_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + } + } + if = { + limit = { + any_court_position_holder = { + type = antiquarian_court_position + } + } + random_court_position_holder = { + type = antiquarian_court_position + save_scope_as = current_holder + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = antiquarian_court_position + NOT = { employs_court_position = antiquarian_court_position } + } + modifier = { + add = 1 + scope:activity = { + has_variable = stewardship_skill_focus + } + } + } + + option = { + name = bp3_journey.1000.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + stress_impact = { + base = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1000.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + is_valid_to_hire_court_position_type = antiquarian_court_position + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = antiquarian + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + + } + } + } + + option = { + name = bp3_journey.1000.lechery + trait = lustful + trigger = { + has_trait = lustful + } + + custom_tooltip = suggestive_alterations + + hidden_effect_new_object = { + create_artifact = { + name = suggestive_miniature_monument + description = suggestive_miniature_monument.desc + type = miscellaneous + visuals = miniature_monument + modifier = artifact_fertility_gain_3_modifier + modifier = artifact_seduce_scheme_phase_duration_add_3_modifier + modifier = artifact_stress_gain_1_modifier + save_scope_as = new_trinket + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:local_character + } + } + + stress_impact = { + chaste = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = chaste + + } + } + } + + option = { + name = bp3_journey.1000.a + pay_short_term_gold = { + target = scope:local_character + gold = minor_gold_value + } + send_interface_toast = { + title = artifact_gained + left_icon = root + right_icon = scope:new_trinket + scope:new_trinket = { + set_owner = root + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + has_trait = greedy + } + } + } + } + + option = { + name = bp3_journey.1000.b + + trigger = { + is_valid_to_hire_court_position_type = antiquarian_court_position + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = antiquarian + } + + stress_impact = { + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + + } + } + } + + option = { + name = bp3_journey.1000.c + add_prestige = minor_prestige_gain + + ai_chance = { + base = 100 + } + } + + after = { + hidden_effect = { + if = { + limit = { + scope:new_trinket = { + artifact_owner = scope:local_character + } + } + destroy_artifact = scope:new_trinket + } + } + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# A Name, Eternal +bp3_journey.1100 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1100.t + override_background = { + trigger = { + scope:location = { + has_building_with_flag = travel_point_of_interest_economic + NOR = { + has_building = doges_palace_01 + has_building = iron_pillar_of_dhar_01 + has_building = petra_01 + has_building = fairy_chimneys + } + } + } + reference = fp3_cave + } + desc = { + desc = bp3_journey.1100.desc_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:ancient_vandal + } + desc = bp3_journey.1100.desc_name + } + desc = bp3_journey.1100.desc_first + } + desc = bp3_journey.1100.desc_outro + } + theme = journey_activity + + center_portrait = { + character = scope:host + animation = chess_certain_win + } + + lower_center_portrait = { + character = scope:ancient_vandal + } + + cooldown = { years = 7 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { + county.holder = { save_scope_as = county_holder } + save_scope_as = location + } + scope:location = { + if = { + limit = { + has_variable_list = grafitti + } + random_in_list = { + variable = grafitti + save_scope_as = ancient_vandal + } + } + } + } + + option = { + name = bp3_journey.1100.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 10 } + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1100.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + culture != scope:location.culture + } + + add_prestige = minor_prestige_gain + + culture = { + change_cultural_acceptance = { + target = scope:location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1100.a + scope:location = { + add_to_variable_list = { + name = grafitti + target = root + } + } + + add_prestige = medium_prestige_gain + + if = { + limit = { + scope:county_holder ?= { this != root } + } + reverse_add_opinion = { + target = scope:county_holder + modifier = defaced_monument_opinion + opinion = -20 + } + } + + stress_impact = { + humble = medium_stress_impact_gain + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.1100.b + trigger = { + exists = scope:ancient_vandal + } + + custom_tooltip = prestige_trinket + + hidden_effect_new_object = { + create_artifact = { + name = grafitti_rock + description = grafitti_rock.desc + type = miscellaneous + visuals = rock + modifier = artifact_monthly_prestige_mult_1_modifier + save_scope_as = new_trinket + wealth = 30 + quality = 30 + max_durability = 100 + creator = root + } + send_interface_toast = { + title = artifact_gained + left_icon = root + right_icon = scope:new_trinket + show_as_tooltip = { + scope:new_trinket = { + set_owner = root + } + } + } + } + + if = { + limit = { + scope:county_holder ?= { this != root } + } + reverse_add_opinion = { + target = scope:county_holder + modifier = defaced_monument_opinion + opinion = -20 + } + } + scope:location = { + remove_list_variable = { name = grafitti target = scope:ancient_vandal } + } + + stress_impact = { + humble = major_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = craven + } + } + } + } + + option = { + name = bp3_journey.1100.c + + stress_impact = { + paranoid = major_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + } + } +} + +# Shave and a Haircut +bp3_journey.1200 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1200.t + desc = bp3_journey.1200.desc + theme = journey_activity + override_background = { reference = market } + + left_portrait = { + character = scope:host + animation = betting + } + + right_portrait = { + character = scope:local_character + animation = physician + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = court_physician_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_physician_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = court_physician_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_physician_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else = { + create_character = { + template = court_physician_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + if = { + limit = { + any_court_position_holder = { + type = court_physician_court_position + } + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = current_holder + } + } + + hidden_effect = { + scope:local_character = { + random_list = { + 10 = { give_nickname = nick_the_miracle_worker } + 10 = { give_nickname = nick_the_healer } + 10 = { give_nickname = nick_the_wise } + 10 = { give_nickname = nick_the_meticulous } + } + } + } + if = { # Error suppression + limit = { + has_character_flag = random_haircut + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = court_physician_court_position + NOT = { employs_court_position = court_physician_court_position } + } + modifier = { + add = 1 + scope:activity = { + has_variable = diplomacy_skill_focus + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = learning_skill_focus + } + } + } + + option = { + name = bp3_journey.1200.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + stress_impact = { + base = medium_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1200.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + is_valid_to_hire_court_position_type = court_physician_court_position + } + custom_tooltip = hair_will_change + add_character_flag = { + flag = random_haircut + months = 6 + } + + add_prestige = medium_prestige_gain + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = court_physician + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1200.a + + custom_tooltip = hair_will_change + + add_character_flag = { + flag = random_haircut + months = 6 + } + + random_list = { + 90 = { + desc = barber_success + send_interface_toast = { + title = barber_success + left_icon = root + right_icon = scope:local_character + add_prestige = major_prestige_gain + } + } + 10 = { + desc = barber_fail + send_interface_toast = { + title = barber_fail + left_icon = root + right_icon = scope:local_character + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + humble = medium_stress_impact_gain + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.1200.b + + trigger = { + is_valid_to_hire_court_position_type = court_physician_court_position + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = court_physician + } + + stress_impact = { + humble = major_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = craven + } + } + } + } + + option = { + name = bp3_journey.1200.c + + add_prestige = minor_prestige_gain + + stress_impact = { + paranoid = major_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# The Songs of Place +bp3_journey.1300 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1300.t + desc = bp3_journey.1300.desc + theme = journey_activity + + left_portrait = { + character = scope:local_character + animation = dancing + } + + center_portrait = { + character = scope:host + animation = happiness + } + + right_portrait = { + character = scope:local_character_2 + animation = instrument_active + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = stooge_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = stooge_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #court_jester_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = stooge_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #court_jester_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = stooge_camp_officer + } + } + random_court_position_holder = { + type = stooge_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = stooge_camp_officer + } + create_character = { + template = stooge_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = stooge_camp_officer + } + } + random_court_position_holder = { + type = stooge_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = court_jester_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_jester_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = court_jester_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_jester_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = court_jester_court_position + } + } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = court_jester_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = court_jester_court_position + } + } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = current_holder + } + } + } + if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_bard_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #court_musician_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_bard_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #court_musician_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + if = { + limit = { + any_court_position_holder = { + type = master_bard_camp_officer + } + } + random_court_position_holder = { + type = master_bard_camp_officer + save_scope_as = current_holder_2 + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + } + create_character = { + template = master_bard_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character_2 = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = master_bard_camp_officer + } + } + random_court_position_holder = { + type = master_bard_camp_officer + save_scope_as = current_holder_2 + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = court_musician_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_musician_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = court_musician_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + court_musician_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + if = { + limit = { + any_court_position_holder = { + type = court_musician_court_position + } + } + random_court_position_holder = { + type = court_musician_court_position + save_scope_as = current_holder_2 + } + } + } + else = { + create_character = { + template = court_musician_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character_2 = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = court_musician_court_position + } + } + random_court_position_holder = { + type = court_musician_court_position + save_scope_as = current_holder_2 + } + } + } + scope:local_character = { add_character_flag = jester_outfit } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + AND = { + is_valid_to_hire_court_position_type = court_jester_court_position + NOT = { employs_court_position = court_jester_court_position } + } + AND = { + is_valid_to_hire_court_position_type = court_musician_court_position + NOT = { employs_court_position = court_musician_court_position } + } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = diplomacy_skill_focus + } + } + } + + option = { + name = bp3_journey.1300.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 10 } + + stress_impact = { + base = minor_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1300.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + remove_short_term_gold = tiny_gold_value + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = medium_prestige_gain + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1300.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = court_jester + LAAMP_POSITION = stooge + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character_2 + COURT_POSITION = court_musician + LAAMP_POSITION = master_bard + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1300.a + + trigger = { + OR = { + is_valid_to_hire_court_position_type = court_jester_court_position + is_valid_to_hire_court_position_type = stooge_camp_officer + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = court_jester + LAAMP_POSITION = stooge + } + + stress_impact = { + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.1300.b + + trigger = { + OR = { + is_valid_to_hire_court_position_type = court_musician_court_position + is_valid_to_hire_court_position_type = master_bard_camp_officer + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character_2 + COURT_POSITION = court_musician + LAAMP_POSITION = master_bard + } + + stress_impact = { + humble = medium_stress_impact_gain + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.1300.c + + add_prestige = minor_prestige_gain + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + remove_character_flag = jester_outfit + silent_disappearance_effect = yes + } + } + if = { + limit = { + root = { + is_ai = yes + } + scope:local_character_2 = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character_2 = { + silent_disappearance_effect = yes + } + } + } +} + +# Hawking Meat +bp3_journey.1400 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1400.t + desc = bp3_journey.1400.desc + theme = journey_activity + override_background = { reference = market } + + left_portrait = { + character = scope:host + animation = shock + } + + right_portrait = { + character = scope:local_character + animation = hunting_carcass_start + } + + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_bard_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_hunt_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_bard_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_hunt_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = huntperson_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = huntperson_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_hunt_validity_trigger = { EMPLOYER = root } + } + } + create_character = { + template = huntperson_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_of_hunt_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + master_of_hunt_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_of_hunt_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + master_of_hunt_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else = { + create_character = { + template = master_of_hunt_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + if = { + limit = { + any_court_position_holder = { + type = huntperson_camp_officer + } + } + random_court_position_holder = { + type = huntperson_camp_officer + save_scope_as = current_holder + } + } + if = { + limit = { + any_court_position_holder = { + type = master_of_hunt_court_position + } + } + random_court_position_holder = { + type = master_of_hunt_court_position + save_scope_as = current_holder + } + } + scope:local_character = { + save_scope_as = excellent_animal_artifacts + if = { + limit = { + root = { has_royal_court = yes } + } + create_artifact_animal_hide_effect = { + OWNER = scope:local_character + HUNTER = scope:local_character + LEGENDARY = no + ANIMAL = flag:none + } + } + else = { + create_artifact_animal_trinket_effect = { + OWNER = scope:local_character + HUNTER = scope:local_character + LEGENDARY = no + ANIMAL = flag:none + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + AND = { + is_valid_to_hire_court_position_type = master_of_hunt_court_position + NOT = { employs_court_position = master_of_hunt_court_position } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = martial_skill_focus + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = stewardship_skill_focus + } + } + } + + option = { + name = bp3_journey.1400.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + hunter_progress_point_gain_effect = { CHANGE = 3 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + stress_impact = { + base = medium_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1400.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + is_valid_to_hire_court_position_type = master_of_hunt_court_position + } + + hunter_progress_point_gain_effect = { CHANGE = 3 RANDOM_CHANGE = 1 } #Gives Hunter Lifestyle XP + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = master_of_hunt + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1400.a + + pay_short_term_gold = { + target = scope:local_character + gold = minor_gold_value + } + send_interface_toast = { + title = artifact_gained + left_icon = root + right_icon = scope:newly_created_artifact + scope:newly_created_artifact = { + set_owner = root + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = humble + short_term_gold <= medium_gold_value + } + } + } + } + + option = { + name = bp3_journey.1400.b + + trigger = { + is_valid_to_hire_court_position_type = master_of_hunt_court_position + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = master_of_hunt + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1400.c + + add_prestige = minor_prestige_gain + + ai_chance = { + base = 10 + } + } + + after = { + hidden_effect = { + if = { + limit = { + scope:newly_created_artifact = { + artifact_owner = scope:local_character + } + } + destroy_artifact = scope:newly_created_artifact + } + } + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# Learned Locals +bp3_journey.1500 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1500.t + desc = bp3_journey.1500.desc + theme = journey_activity + + left_portrait = { + character = scope:host + animation = thinking + } + + center_portrait = { + character = scope:local_character + animation = debating + } + + right_portrait = { + character = scope:local_character_2 + animation = happy_teacher + } + + cooldown = { years = 10 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = chief_forager_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = chief_forager_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #chief_qadi_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = chief_forager_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #chief_qadi_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = chief_forager_camp_officer + } + } + random_court_position_holder = { + type = chief_forager_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = chief_forager_camp_officer + } + create_character = { + template = chief_forager_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = chief_forager_camp_officer + } + } + random_court_position_holder = { + type = chief_forager_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = chief_qadi_court_position + scope:location.religion = religion:islam_religion + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = chief_qadi_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + chief_qadi_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = chief_qadi_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + chief_qadi_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = chief_qadi_court_position + } + } + random_court_position_holder = { + type = chief_qadi_court_position + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = chief_qadi_court_position + scope:location.religion = religion:islam_religion + } + create_character = { + template = chief_qadi_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = chief_qadi_court_position + } + } + random_court_position_holder = { + type = chief_qadi_court_position + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = high_almoner_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + high_almoner_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = high_almoner_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + high_almoner_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = chief_qadi_court_position + } + } + random_court_position_holder = { + type = chief_qadi_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = high_almoner_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = high_almoner_court_position + } + } + random_court_position_holder = { + type = high_almoner_court_position + save_scope_as = current_holder + } + } + } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = quartermaster_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #seneschal_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = quartermaster_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #seneschal_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + if = { + limit = { + any_court_position_holder = { + type = quartermaster_camp_officer + } + } + random_court_position_holder = { + type = quartermaster_camp_officer + save_scope_as = current_holder_2 + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = quartermaster_camp_officer + } + create_character = { + template = quartermaster_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character_2 = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = quartermaster_camp_officer + } + } + random_court_position_holder = { + type = quartermaster_camp_officer + save_scope_as = current_holder_2 + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = seneschal_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + seneschal_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = seneschal_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + seneschal_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + if = { + limit = { + any_court_position_holder = { + type = seneschal_court_position + } + } + random_court_position_holder = { + type = seneschal_court_position + save_scope_as = current_holder_2 + } + } + } + else = { + create_character = { + template = seneschal_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character_2 = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = seneschal_court_position + } + } + random_court_position_holder = { + type = seneschal_court_position + save_scope_as = current_holder_2 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + AND = { + is_valid_to_hire_court_position_type = quartermaster_camp_officer + NOT = { employs_court_position = quartermaster_camp_officer } + } + AND = { + is_valid_to_hire_court_position_type = chief_qadi_court_position + NOT = { employs_court_position = chief_qadi_court_position } + } + AND = { + is_valid_to_hire_court_position_type = high_almoner_court_position + NOT = { employs_court_position = high_almoner_court_position } + } + AND = { + is_valid_to_hire_court_position_type = seneschal_court_position + NOT = { employs_court_position = seneschal_court_position } + } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = stewardship_skill_focus + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = learning_skill_focus + } + } + } + + option = { + name = bp3_journey.option.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character + } + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character_2 + } + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1500.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + add_prestige = medium_prestige_gain + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + stress_impact = { + base = minor_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1500.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_two_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = chief_qadi + COURT_POSITION_2 = high_almoner + LAAMP_POSITION = chief_forager + } + + hire_for_court_position_journey_laamp_replacement_effect_2 = { + CHARACTER = scope:local_character_2 + COURT_POSITION = seneschal + LAAMP_POSITION = quartermaster + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1500.curiosity_2 + trigger = { + has_activity_intent = journey_curiosity_intent + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + pay_short_term_gold = { + target = scope:local_character_2 + gold = tiny_gold_value + } + + add_prestige = medium_prestige_gain + add_piety = medium_piety_gain + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 4 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + has_trait = greedy + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + + option = { + name = bp3_journey.1500.a + + trigger = { + OR = { + is_valid_to_hire_court_position_type = chief_forager_camp_officer + is_valid_to_hire_court_position_type = chief_qadi_court_position + is_valid_to_hire_court_position_type = high_almoner_court_position + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_two_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = chief_qadi + COURT_POSITION_2 = high_almoner + LAAMP_POSITION = chief_forager + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1500.b + + trigger = { + OR = { + is_valid_to_hire_court_position_type = seneschal_court_position + is_valid_to_hire_court_position_type = quartermaster_camp_officer + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_laamp_replacement_effect_2 = { + CHARACTER = scope:local_character_2 + COURT_POSITION = seneschal + LAAMP_POSITION = quartermaster + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1500.c + + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = inspired_by_alms_modifier + years = 10 + } + + ai_chance = { + base = 10 + } + } +} + +# City of Cats +bp3_journey.1600 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1600.t + desc = bp3_journey.1600.desc + theme = journey_activity + + center_portrait = { + character = scope:host + animation = survey + } + + cooldown = { years = 9 } + + trigger = { + NOT = { + any_owned_story = { + type = story_cycle_pet_cat + } + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + scope:activity = { + has_variable = intrigue_skill_focus + } + } + } + + option = { + name = bp3_journey.1600.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + duel = { + skill = intrigue + value = 12 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = cat_help + send_interface_toast = { + title = cat_help + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 25 } + add_prestige = medium_prestige_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = get_lost + send_interface_toast = { + title = get_lost + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + remove_short_term_gold = minor_gold_value + } + } + } + + stress_impact = { + base = minor_stress_impact_gain + lazy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + + } + } + } + + option = { + name = bp3_journey.1600.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + if = { + limit = { + culture != scope:location.culture + } + culture = { + change_cultural_acceptance = { + target = scope:location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + remove_short_term_gold = minor_gold_value + add_prestige = minor_prestige_gain + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1600.a + + start_cat_story_cycle_effect = yes + add_character_flag = { + flag = city_cat + days = 5 + } + + stress_impact = { + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { + name = bp3_journey.1600.b + + add_prestige = miniscule_prestige_gain + + stress_impact = { + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + + } + } + } +} + +# Culture Drills +bp3_journey.1700 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1700.t + desc = { + desc = bp3_journey.1700.desc + first_valid = { + triggered_desc = { + trigger = { + culture != scope:location.culture + } + desc = bp3_journey.1700.desc_different_culture + } + desc = bp3_journey.1700.desc_same_culture + } + } + theme = journey_activity + override_background = { reference = courtyard } + + left_portrait = { + character = scope:local_character_3 + animation = throne_room_two_handed_passive_1 + } + + center_portrait = { + character = scope:local_character + animation = inspect_weapon + } + + right_portrait = { + character = scope:local_character_2 + animation = marshal + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = head_groom_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = head_groom_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_horse_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = head_groom_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #master_of_horse_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = head_groom_camp_officer + } + } + random_court_position_holder = { + type = head_groom_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = head_groom_camp_officer + } + create_character = { + template = head_groom_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = head_groom_camp_officer + } + } + random_court_position_holder = { + type = head_groom_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_of_horse_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + master_of_horse_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_of_horse_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + master_of_horse_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = master_of_horse_court_position + } + } + random_court_position_holder = { + type = master_of_horse_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = master_of_horse_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = master_of_horse_court_position + } + } + random_court_position_holder = { + type = master_of_horse_court_position + save_scope_as = current_holder + } + } + } + + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + this != scope:local_character + } + save_scope_as = local_character_2 + } + } + else = { + create_character = { + template = bodyguard_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_2 + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + this != scope:local_character + this != scope:local_character_2 + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + this != scope:local_character + this != scope:local_character_2 + } + save_scope_as = local_character_3 + } + } + else = { + create_character = { + template = bodyguard_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character_3 + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + scope:local_character = { add_character_flag = military_outfit } + scope:local_character_2 = { add_character_flag = military_outfit } + scope:local_character_3 = { add_character_flag = military_outfit } + if = { + limit = { + any_maa_regiment = { + maa_max_troops_count <= 2000 + NOT = { + is_unit_type = siege_weapon + } + OR = { + is_maa_type = light_footmen + is_maa_type = bowmen + is_maa_type = light_horsemen + is_maa_type = pikemen_unit + is_maa_type = armored_footmen + is_maa_type = armored_horsemen + is_maa_type = crossbowmen + is_maa_type = house_guard + is_maa_type = steppe_raiders + is_maa_type = horse_archers + is_maa_type = heavy_horse_archers + is_maa_type = nomad_lancers + } + } + } + random_maa_regiment = { + limit = { + maa_max_troops_count <= 2000 + NOT = { + is_unit_type = siege_weapon + } + OR = { + is_maa_type = light_footmen + is_maa_type = bowmen + is_maa_type = light_horsemen + is_maa_type = pikemen_unit + is_maa_type = armored_footmen + is_maa_type = armored_horsemen + is_maa_type = crossbowmen + is_maa_type = house_guard + is_maa_type = steppe_raiders + is_maa_type = horse_archers + is_maa_type = heavy_horse_archers + is_maa_type = nomad_lancers + } + } + alternative_limit = { + maa_max_troops_count <= 2000 + NOT = { + is_unit_type = siege_weapon + } + } + save_scope_as = maa + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + AND = { + is_valid_to_hire_court_position_type = bodyguard_court_position + NOT = { employs_court_position = bodyguard_court_position } + } + AND = { + is_valid_to_hire_court_position_type = master_of_horse_court_position + NOT = { employs_court_position = master_of_horse_court_position } + } + AND = { + is_valid_to_hire_court_position_type = head_groom_camp_officer + NOT = { employs_court_position = head_groom_camp_officer } + } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = martial_skill_focus + } + } + } + + option = { + name = bp3_journey.option.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character + } + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character_2 + } + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character_3 + } + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1700.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 25 } + + if = { + limit = { + is_landless_adventurer = no + } + capital_province ?= { + add_province_modifier = { + modifier = imported_tactics_modifier + years = 20 + } + } + } + else_if = { + limit = { + has_government = landless_adventurer_government + } + add_character_modifier = { + modifier = imported_tactics_character_modifier + years = 10 + } + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = master_of_horse + LAAMP_POSITION = head_groom + } + + stress_impact = { + base = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = lazy + } + } + } + } + + option = { + name = bp3_journey.1700.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = master_of_horse + LAAMP_POSITION = head_groom + } + + add_character_flag = bodyguard_flag + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character_2 + COURT_POSITION = bodyguard + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character_3 + COURT_POSITION = bodyguard + } + + remove_character_flag = bodyguard_flag + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + } + } + } + + option = { + name = bp3_journey.1700.b + + trigger = { + NOT = { has_activity_intent = journey_curiosity_intent } + } + + add_character_flag = bodyguard_flag + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character_2 + COURT_POSITION = bodyguard + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character_3 + COURT_POSITION = bodyguard + } + + remove_character_flag = bodyguard_flag + + stress_impact = { + trusting = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = trusting + + } + } + } + + option = { + name = bp3_journey.1700.c + trigger = { + exists = scope:maa + } + + add_prestige = major_prestige_gain + + remove_treasury_or_gold = major_treasury_or_gold_value + + custom_tooltip = maa_increases_tt + hidden_effect = { + scope:maa = { + change_maa_regiment_size = { + size = 2 + reinforce = yes + } + } + } + + stress_impact = { + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_treasury_or_gold <= massive_treasury_or_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1700.d + add_prestige = minor_prestige_gain + + ai_chance = { + base = 100 + } + } + + after = { + scope:local_character = { + remove_character_flag = military_outfit + silent_disappear_ai_if_not_hired = yes + } + scope:local_character_2 = { + remove_character_flag = military_outfit + silent_disappear_ai_if_not_hired = yes + } + scope:local_character_3 = { + remove_character_flag = military_outfit + silent_disappear_ai_if_not_hired = yes + } + } +} + +# Trust Me +bp3_journey.1800 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1800.t + desc = bp3_journey.1800.desc + theme = journey_activity + + left_portrait = { + character = scope:host + animation = survey + } + + right_portrait = { + character = scope:local_character + animation = eccentric + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = travel_leader_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + travel_leader_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = travel_leader_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + travel_leader_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + } + else = { + create_character = { + template = travel_leader_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + } + if = { + limit = { + any_court_position_holder = { + type = travel_leader_court_position + } + } + random_court_position_holder = { + type = travel_leader_court_position + save_scope_as = current_holder + } + } + + hidden_effect = { + scope:local_character = { + random_list = { + 10 = { give_nickname = nick_the_trustworthy_ironic } + 10 = { give_nickname = nick_the_honest } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = travel_leader_court_position + OR = { + NOT = { employs_court_position = travel_leader_court_position } + any_court_position_holder = { + type = travel_leader_court_position + aptitude = { + court_position = travel_leader_court_position + value < 4 + } + } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = intrigue_skill_focus + } + } + } + + option = { + name = bp3_journey.1800.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character + } + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1800.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + pay_short_term_gold = { + target = scope:local_character + gold = minor_gold_value + } + + duel = { + skill = intrigue + value = scope:local_character.intrigue + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mostly_true_tt + send_interface_toast = { + title = mostly_true_tt + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 50 } + add_prestige = major_prestige_gain + } + } + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = almost_true_tt + send_interface_toast = { + title = almost_true_tt + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + } + } + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = not_true_tt + send_interface_toast = { + title = not_true_tt + left_icon = root + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + } + } + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = utterly_scammed_tt + send_interface_toast = { + title = utterly_scammed_tt + left_icon = root + remove_short_term_gold = minor_gold_value + add_prestige = minor_prestige_loss + set_nickname_effect = { NICKNAME = nick_the_gullible } + } + } + } + + stress_impact = { + base = minor_stress_impact_gain + lazy = major_stress_impact_gain + cynical = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + has_trait = lazy + has_trait = cynical + } + } + } + } + + option = { + name = bp3_journey.1800.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + is_valid_to_hire_court_position_type = travel_leader_court_position + NOT = { has_trait = trusting } + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = travel_leader + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 4 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1800.a + trigger = { + NOT = { has_trait = trusting } + } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + random_list = { + 10 = { + desc = beautiful_vista + send_interface_toast = { + title = beautiful_vista + left_icon = root + right_icon = scope:local_character + add_prestige = medium_prestige_gain + } + } + 10 = { + desc = relaxing_sights + send_interface_toast = { + title = relaxing_sights + left_icon = root + right_icon = scope:local_character + add_stress = medium_stress_impact_loss + add_prestige = minor_prestige_gain + } + } + 10 = { + desc = interesting_insight + send_interface_toast = { + title = interesting_insight + left_icon = root + right_icon = scope:local_character + add_character_modifier = { + modifier = interesting_insight_modifier + years = 9 + } + add_prestige = minor_prestige_gain + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = greedy + has_trait = cynical + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1800.b + + trigger = { + NOR = { + has_activity_intent = journey_curiosity_intent + has_trait = trusting + } + is_valid_to_hire_court_position_type = travel_leader_court_position + } + + hire_for_court_position_journey_effect = { + CHARACTER = scope:local_character + COURT_POSITION = travel_leader + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1800.c + trigger = { + NOT = { has_trait = trusting } + } + + add_prestige = miniscule_prestige_gain + + ai_chance = { + base = 1 + } + } + + option = { + name = bp3_journey.1800.trusting + trigger = { + has_trait = trusting + } + + pay_short_term_gold = { + target = scope:local_character + gold = minor_gold_value + } + + ai_chance = { + base = 100 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# Poor X +bp3_journey.1900 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.1900.t + desc = bp3_journey.1900.desc + theme = journey_activity + + left_portrait = { + character = scope:host + animation = bribing + } + + right_portrait = { + character = scope:local_character + animation = beg + } + + cooldown = { years = 9 } + + trigger = { + OR = { + is_valid_to_hire_court_position_type = court_tutor_court_position + is_valid_to_hire_court_position_type = royal_architect_court_position + is_valid_to_hire_court_position_type = head_porter_camp_officer + is_valid_to_hire_court_position_type = cupbearer_court_position + is_valid_to_hire_court_position_type = witness_camp_officer + is_valid_to_hire_court_position_type = court_poet_court_position + is_valid_to_hire_court_position_type = chronicler_court_position + is_valid_to_hire_court_position_type = second_camp_officer + is_valid_to_hire_court_position_type = wet_nurse_court_position + AND = { + is_valid_to_hire_court_position_type = antiquarian_court_position + OR = { + NOT = { employs_court_position = antiquarian_court_position } + AND = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + aptitude:antiquarian_court_position < 4 + } + } + } + } + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + random_list = { + 1 = { + trigger = { + is_valid_to_hire_court_position_type = head_porter_camp_officer + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = head_porter_camp_officer + OR = { + NOT = { employs_court_position = head_porter_camp_officer } + AND = { + employs_court_position = head_porter_camp_officer + any_court_position_holder = { + type = head_porter_camp_officer + aptitude:head_porter_camp_officer < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = head_porter_camp_officer + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = witness_camp_officer + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = witness_camp_officer + OR = { + NOT = { employs_court_position = witness_camp_officer } + AND = { + employs_court_position = witness_camp_officer + any_court_position_holder = { + type = witness_camp_officer + aptitude:witness_camp_officer < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = witness_camp_officer + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = second_camp_officer + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = second_camp_officer + OR = { + NOT = { employs_court_position = second_camp_officer } + AND = { + employs_court_position = second_camp_officer + any_court_position_holder = { + type = second_camp_officer + aptitude:second_camp_officer < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = second_camp_officer + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = court_tutor_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = court_tutor_court_position + OR = { + NOT = { employs_court_position = court_tutor_court_position } + AND = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + aptitude:court_tutor_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = court_tutor_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = royal_architect_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = royal_architect_court_position + OR = { + NOT = { employs_court_position = royal_architect_court_position } + AND = { + employs_court_position = royal_architect_court_position + any_court_position_holder = { + type = royal_architect_court_position + aptitude:royal_architect_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = royal_architect_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = cupbearer_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = cupbearer_court_position + OR = { + NOT = { employs_court_position = cupbearer_court_position } + AND = { + employs_court_position = cupbearer_court_position + any_court_position_holder = { + type = cupbearer_court_position + aptitude:cupbearer_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = cupbearer_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = court_poet_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = court_poet_court_position + OR = { + NOT = { employs_court_position = court_poet_court_position } + AND = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + aptitude:court_poet_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = court_poet_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = chronicler_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = chronicler_court_position + OR = { + NOT = { employs_court_position = chronicler_court_position } + AND = { + employs_court_position = chronicler_court_position + any_court_position_holder = { + type = chronicler_court_position + aptitude:chronicler_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = chronicler_court_position + LOCATION = scope:location + } + } + 1 = { + trigger = { + is_valid_to_hire_court_position_type = wet_nurse_court_position + } + modifier = { + add = 99 + AND = { + is_valid_to_hire_court_position_type = court_tutor_court_position + OR = { + NOT = { employs_court_position = court_tutor_court_position } + AND = { + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + aptitude:court_tutor_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = wet_nurse_court_position + LOCATION = scope:location + } + } + 10 = { + trigger = { + AND = { + is_valid_to_hire_court_position_type = antiquarian_court_position + OR = { + NOT = { employs_court_position = antiquarian_court_position } + AND = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + aptitude:antiquarian_court_position < 4 + } + } + } + } + } + journey_find_or_create_excellent_court_position_effect = { + COURT_POSITION = antiquarian_court_position + LOCATION = scope:location + } + } + } + scope:local_character = { + add_character_flag = peasant_outfit + add_character_flag = no_hat + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + AND = { + is_valid_to_hire_court_position_type = second_camp_officer + NOT = { employs_court_position = second_camp_officer } + } + AND = { + is_valid_to_hire_court_position_type = witness_camp_officer + NOT = { employs_court_position = witness_camp_officer } + } + AND = { + is_valid_to_hire_court_position_type = head_porter_camp_officer + NOT = { employs_court_position = head_porter_camp_officer } + } + AND = { + is_valid_to_hire_court_position_type = court_tutor_court_position + NOT = { employs_court_position = court_tutor_court_position } + } + AND = { + is_valid_to_hire_court_position_type = royal_architect_court_position + NOT = { employs_court_position = royal_architect_court_position } + } + AND = { + is_valid_to_hire_court_position_type = cupbearer_court_position + NOT = { employs_court_position = cupbearer_court_position } + } + AND = { + is_valid_to_hire_court_position_type = court_poet_court_position + NOT = { employs_court_position = court_poet_court_position } + } + AND = { + is_valid_to_hire_court_position_type = chronicler_court_position + NOT = { employs_court_position = chronicler_court_position } + } + # Wet Nurse and Antiquarian have bespoke events + } + } + } + + option = { + name = bp3_journey.option.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + add_prestige = miniscule_prestige_gain + + reverse_add_opinion = { + modifier = annoyed_opinion + opinion = -20 + target = scope:local_character + } + + stress_impact = { + humble = minor_stress_impact_gain + content = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + gold <= minor_gold_value + has_trait = humble + has_trait = content + } + } + } + } + + option = { + name = bp3_journey.1900.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 25 } + + add_piety = miniscule_piety_gain + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = lazy + } + } + } + } + + option = { + name = bp3_journey.1900.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + if = { + limit = { + has_character_flag = court_tutor_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = court_tutor + } + } + else_if = { + limit = { + has_character_flag = head_porter_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = head_porter + } + } + else_if = { + limit = { + has_character_flag = royal_architect_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = royal_architect + } + } + else_if = { + limit = { + has_character_flag = witness_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = witness + } + } + else_if = { + limit = { + has_character_flag = cupbearer_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = cupbearer + } + } + else_if = { + limit = { + has_character_flag = court_poet_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = court_poet + } + } + else_if = { + limit = { + has_character_flag = second_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = second + } + } + else_if = { + limit = { + has_character_flag = chronicler_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = chronicler + } + } + else_if = { + limit = { + has_character_flag = wet_nurse_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = wet_nurse + } + } + else_if = { + limit = { + has_character_flag = antiquarian_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = antiquarian + } + } + + add_hook = { + type = strong_obligation_hook + target = scope:local_character + } + custom_tooltip = obligation_hook_tt + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1900.a + + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + + add_piety = miniscule_piety_gain + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = greedy + has_trait = cynical + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.1900.b + trigger = { + NOT = { has_activity_intent = journey_curiosity_intent } + } + + if = { + limit = { + has_character_flag = court_tutor_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = court_tutor + } + } + else_if = { + limit = { + has_character_flag = head_porter_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = head_porter + } + } + else_if = { + limit = { + has_character_flag = royal_architect_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = royal_architect + } + } + else_if = { + limit = { + has_character_flag = witness_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = witness + } + } + else_if = { + limit = { + has_character_flag = cupbearer_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = cupbearer + } + } + else_if = { + limit = { + has_character_flag = court_poet_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = court_poet + } + } + else_if = { + limit = { + has_character_flag = second_camp_officer + } + journey_employ_in_camp_position = { + CHARACTER = scope:local_character + COURT_POSITION = second + } + } + else_if = { + limit = { + has_character_flag = chronicler_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = chronicler + } + } + else_if = { + limit = { + has_character_flag = wet_nurse_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = wet_nurse + } + } + else_if = { + limit = { + has_character_flag = antiquarian_court_position + } + journey_employ_in_court_position = { + CHARACTER = scope:local_character + COURT_POSITION = antiquarian + } + } + + add_hook = { + type = obligation_hook + target = scope:local_character + } + custom_tooltip = obligation_hook_tt + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.1900.c + + add_prestige = miniscule_prestige_gain + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + scope:local_character = { + remove_character_flag = peasant_outfit + remove_character_flag = no_hat + } + remove_character_flag = court_tutor_court_position + remove_character_flag = royal_architect_court_position + remove_character_flag = cupbearer_court_position + remove_character_flag = court_poet_court_position + remove_character_flag = chronicler_court_position + remove_character_flag = wet_nurse_court_position + remove_character_flag = antiquarian_court_position + } +} + +# A Walking Legend +bp3_journey.2000 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.2000.t + desc = bp3_journey.2000.desc + theme = journey_activity + + left_portrait = { + character = scope:host + animation = hero_flex + } + + right_portrait = { + character = scope:new_promoter + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + cooldown = { years = 3 } + + trigger = { + has_activity_intent = spread_legend_intent + exists = promoted_legend + OR = { + scope:activity.activity_location.county.holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + scope:activity.activity_location.county = { + any_neighboring_county = { + holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + } + } + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + random_list = { + 10 = { + trigger = { + scope:activity.activity_location.county.holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + } + scope:activity.activity_location.county.holder = { save_scope_as = new_promoter } + } + 10 = { + trigger = { + scope:activity.activity_location.county = { + any_neighboring_county = { + holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + } + } + } + scope:activity.activity_location.county.holder = { save_scope_as = new_promoter } + scope:activity.activity_location.county = { + random_neighboring_county = { + limit = { + holder = { + is_available_ai_adult = yes + NOR = { + exists = promoted_legend + this = root + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + } + } + } + holder = { save_scope_as = new_promoter } + } + } + } + } + } + + option = { + name = bp3_journey.2000.a + + remove_short_term_gold = minor_gold_value + add_prestige = medium_prestige_gain + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + scope:new_promoter = { + set_promoted_legend = root.promoted_legend + } + + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = greedy + has_trait = cynical + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.2000.b + + scope:new_promoter = { + set_promoted_legend = root.promoted_legend + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2000.c + + add_prestige = miniscule_prestige_gain + reverse_add_opinion = { + target = scope:new_promoter + modifier = rude_opinion + opinion = -20 + } + + ai_chance = { + base = 1 + } + } +} + +# A Local Specialty +bp3_journey.2100 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.2100.t + desc = bp3_journey.2100.desc + theme = journey_activity + + override_background = { reference = market } + + left_portrait = { + character = scope:host + animation = drink + } + + right_portrait = { + character = scope:local_character + animation = debating + } + + cooldown = { years = 9 } + + trigger = { + + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + is_valid_to_hire_court_position_type = camp_cook_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = camp_cook_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #food_taster_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = camp_cook_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #food_taster_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = camp_cook_camp_officer + } + } + random_court_position_holder = { + type = camp_cook_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = camp_cook_camp_officer + } + create_character = { + template = camp_cook_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = camp_cook_camp_officer + } + } + random_court_position_holder = { + type = camp_cook_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = food_taster_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + food_taster_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = food_taster_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + food_taster_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = food_taster_court_position + } + } + random_court_position_holder = { + type = food_taster_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = food_taster_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = food_taster_court_position + } + } + random_court_position_holder = { + type = food_taster_court_position + save_scope_as = current_holder + } + } + } + hidden_effect = { + scope:local_character = { + set_favorite_treat_effect = yes + change_current_weight = 150 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = food_taster_court_position + NOT = { employs_court_position = food_taster_court_position } + } + modifier = { + add = 1 + is_valid_to_hire_court_position_type = camp_cook_camp_officer + NOT = { employs_court_position = camp_cook_camp_officer } + } + modifier = { + add = 1 + scope:activity = { + has_variable = stewardship_skill_focus + } + } + modifier = { + add = 1 + has_trait = gluttonous + } + modifier = { + add = 1 + has_trait = comfort_eater + } + } + + option = { + name = bp3_journey.2100.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 10 } + + food_poison_chance_effect = yes + + stress_impact = { + base = miniscule_stress_impact_gain + gluttonous = minor_stress_impact_loss + comfort_eater = minor_stress_impact_loss + temperate = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = inappetetic + } + } + } + } + + option = { + name = bp3_journey.2100.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + culture != scope:local_character.culture + } + + add_prestige = miniscule_prestige_gain + + food_poison_chance_effect = yes + + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 4 + desc = cultural_acceptance_gain_event + } + } + + stress_impact = { + gluttonous = minor_stress_impact_loss + comfort_eater = minor_stress_impact_loss + temperate = minor_stress_impact_gain + inappetetic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = inappetetic + has_trait = temperate + } + } + } + } + + option = { + name = bp3_journey.2100.curiosity_2 + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = food_taster + LAAMP_POSITION = camp_cook + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2100.a + + add_character_modifier = { + modifier = good_soup_modifier + years = 2 + } + + stress_impact = { + base = minor_stress_impact_loss + inappetetic = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = inappetetic + stress <= 10 + } + } + } + } + + option = { + name = bp3_journey.2100.b + + trigger = { + OR = { + is_valid_to_hire_court_position_type = camp_cook_camp_officer + is_valid_to_hire_court_position_type = food_taster_court_position + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = food_taster + LAAMP_POSITION = camp_cook + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2100.c + + journey_knowledge_hoarding_skill_effect = { VALUE = 2 } + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# The Siren of Place +bp3_journey.2200 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.2200.t + desc = bp3_journey.2200.desc + theme = journey_activity + + override_background = { reference = alley_night } + + left_portrait = { + character = scope:host + animation = shame + } + + right_portrait = { + character = scope:local_character + animation = reception_bride_right + } + + cooldown = { years = 9 } + + trigger = { + OR = { + is_valid_to_hire_court_position_type = master_of_spoils_camp_officer + is_valid_to_hire_court_position_type = wet_nurse_court_position + is_valid_to_hire_court_position_type = bodyguard_court_position + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = wet_nurse_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + wet_nurse_validity_trigger = { EMPLOYER = root } + } + is_valid_to_hire_court_position_type = wet_nurse_court_position + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = wet_nurse_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + wet_nurse_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + save_scope_as = wet_nurse + } + if = { + limit = { + any_court_position_holder = { + type = wet_nurse_court_position + } + } + random_court_position_holder = { + type = wet_nurse_court_position + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = wet_nurse_court_position + } + create_character = { + template = wet_nurse_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + save_scope_as = wet_nurse + save_scope_as = generated + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = wet_nurse_court_position + } + } + random_court_position_holder = { + type = wet_nurse_court_position + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_spoils_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_of_spoils_camp_officer + value >= 4 + } + 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 + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_of_spoils_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + save_scope_as = master_of_spoils_camp_officer + } + if = { + limit = { + any_court_position_holder = { + type = master_of_spoils_camp_officer + } + } + random_court_position_holder = { + type = master_of_spoils_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_spoils_camp_officer + } + create_character = { + template = master_of_spoils_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + save_scope_as = master_of_spoils_camp_officer + save_scope_as = generated + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = master_of_spoils_camp_officer + } + } + random_court_position_holder = { + type = master_of_spoils_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + } + is_valid_to_hire_court_position_type = bodyguard_court_position + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = bodyguard_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + bodyguard_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + save_scope_as = bodyguard + } + if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + } + } + random_court_position_holder = { + type = bodyguard_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = bodyguard_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + save_scope_as = bodyguard + save_scope_as = generated + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + } + } + random_court_position_holder = { + type = bodyguard_court_position + save_scope_as = current_holder + } + } + } + hidden_effect = { + scope:local_character = { + if = { + limit = { + exists = scope:generated + } + remove_trait = beauty_bad_1 + remove_trait = beauty_bad_2 + remove_trait = beauty_bad_3 + random_list = { + 33 = { add_trait = beauty_good_1 } + 33 = { add_trait = beauty_good_2 } + 33 = { add_trait = beauty_good_3 } + } + } + change_current_weight = 25 + set_sexuality = bisexual + add_trait = fornicator + } + } + set_random_entertainment_text_effect = yes + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + AND = { + is_valid_to_hire_court_position_type = wet_nurse_court_position + NOT = { employs_court_position = wet_nurse_court_position } + } + # Bodyguard has a bespoke event + } + modifier = { + add = 1 + AND = { + is_valid_to_hire_court_position_type = bodyguard_court_position + NOT = { employs_court_position = bodyguard_court_position } + } + } + modifier = { + add = 1 + scope:activity = { + has_variable = intrigue_skill_focus + } + } + modifier = { + add = 1 + has_trait = rakish + } + modifier = { + add = 1 + has_trait = lustful + } + } + + option = { + name = bp3_journey.2200.spread_legend_intent + trigger = { + has_activity_intent = spread_legend_intent + } + + add_character_modifier = { + modifier = journey_apa_legend_modifier + years = 15 + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = scope:local_character + } + + stress_impact = { + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + + } + } + } + + option = { + name = bp3_journey.2200.knowledge_hoarding + flavor = local_monument_tt + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 15 } + + pay_short_term_gold = { + target = scope:local_character + gold = tiny_gold_value + } + stress_impact = { + base = miniscule_stress_impact_gain + lustful = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + short_term_gold <= minor_gold_value + has_trait = lustful + has_trait = impatient + } + } + } + } + + option = { + name = bp3_journey.2200.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hidden_effect = { + scope:local_character = { + add_to_court_and_entourage_effect = yes + } + } + + hire_for_two_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = wet_nurse + COURT_POSITION_2 = bodyguard + LAAMP_POSITION = master_of_spoils + } + + if = { + limit = { + culture != root.location.culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 1 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2200.curiosity_2 + trigger = { + has_activity_intent = journey_curiosity_intent + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:local_character + } + NOT = { has_trait = celibate } + can_set_relation_lover_trigger = { CHARACTER = scope:local_character } + } + + hidden_effect = { + scope:local_character = { + add_to_court_and_entourage_effect = yes + } + } + + had_sex_with_effect = { + CHARACTER = scope:local_character + PREGNANCY_CHANCE = pregnancy_chance + } + + set_relation_lover = { + target = scope:local_character + reason = lover_fell_in_love_with_prostitute_by_monument + province = root.location + } + + if = { + limit = { + culture != root.location.culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 1 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + base = medium_stress_impact_loss + rakish = medium_stress_impact_loss + seducer = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = massive_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + modifier = { + add = 95 + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + } + } + modifier = { + factor = 0 + might_cheat_on_every_partner_trigger = no + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.2200.a_2 + + trigger = { + OR = { + NOT = { + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:local_character + } + } + has_trait = celibate + } + } + + stress_impact = { + base = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + stress <= 25 + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.2200.a + + trigger = { + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:local_character + } + NOT = { has_trait = celibate } + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 5 } + + had_sex_with_effect = { + CHARACTER = scope:local_character + PREGNANCY_CHANCE = pregnancy_chance + } + + stress_impact = { + base = medium_stress_impact_loss + lustful = medium_stress_impact_loss + rakish = medium_stress_impact_loss + seducer = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = massive_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + modifier = { + add = 95 + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + } + } + modifier = { + factor = 0 + might_cheat_on_every_partner_trigger = no + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { + name = bp3_journey.2200.b + + trigger = { + NOT = { has_activity_intent = journey_curiosity_intent } + } + + hire_for_two_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = wet_nurse + COURT_POSITION_2 = bodyguard + LAAMP_POSITION = master_of_spoils + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2200.c + + add_prestige = miniscule_prestige_gain + journey_knowledge_hoarding_skill_effect = { VALUE = 2 } + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} + +# X's CulturalUnit +bp3_journey.2300 = { + type = activity_event + content_source = dlc_015 + title = bp3_journey.2300.t + desc = bp3_journey.2300.desc + theme = journey_activity + + override_background = { reference = courtyard } + + left_portrait = { + character = scope:host + animation = thinking + } + + center_portrait = { + character = scope:local_ruler + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + camera = camera_event_very_left + } + + right_portrait = { + character = scope:local_character + triggered_animation = { + trigger = { + scope:regiment = { + OR = { + is_unit_type = archers + is_unit_type = skirmishers + } + } + } + scripted_animation = bow_closed + } + triggered_animation = { + trigger = { + scope:regiment = { + is_unit_type = pikemen + } + } + animation = throne_room_two_handed_passive_1 + } + animation = inspect_weapon + } + + cooldown = { years = 9 } + + trigger = { + scope:activity.activity_location.county.holder ?= { + is_available_ai_adult = yes + culture = scope:activity.activity_location.culture + NOR = { + this = root + culture = { has_same_culture_heritage = root.culture } + is_close_or_extended_family_of = root + dynasty ?= root.dynasty + has_relation_friend = root + has_relation_rival = root + has_relation_lover = root + } + any_maa_regiment = { + NOR = { + is_unit_type = siege_weapon + is_maa_type = light_footmen + is_maa_type = bowmen + is_maa_type = light_horsemen + is_maa_type = pikemen_unit + is_maa_type = armored_footmen + is_maa_type = armored_horsemen + is_maa_type = crossbowmen + is_maa_type = house_guard + is_maa_type = horse_archers + is_maa_type = steppe_raiders + is_maa_type = heavy_horse_archers + is_maa_type = nomad_lancers + } + } + } + } + + immediate = { + scope:activity.activity_location = { save_scope_as = location } + scope:activity.activity_location.county.holder = { + save_scope_as = local_ruler + random_maa_regiment = { + limit = { + NOR = { + is_unit_type = siege_weapon + is_maa_type = light_footmen + is_maa_type = bowmen + is_maa_type = light_horsemen + is_maa_type = pikemen_unit + is_maa_type = armored_footmen + is_maa_type = armored_horsemen + is_maa_type = crossbowmen + is_maa_type = house_guard + is_maa_type = horse_archers + is_maa_type = steppe_raiders + is_maa_type = heavy_horse_archers + is_maa_type = nomad_lancers + } + } + save_scope_as = regiment + } + } + if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = master_of_arms_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #champion_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = master_of_arms_camp_officer + value >= 4 + } + is_available_healthy_ai_adult = yes + #champion_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = master_of_arms_camp_officer + } + } + random_court_position_holder = { + type = master_of_arms_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + create_character = { + template = master_of_arms_camp_officer_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = master_of_arms_camp_officer + } + } + random_court_position_holder = { + type = master_of_arms_camp_officer + save_scope_as = current_holder + } + } + } + else_if = { + limit = { + any_pool_character = { + province = scope:location + culture = scope:location.culture + aptitude = { + court_position = champion_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + champion_validity_trigger = { EMPLOYER = root } + } + } + random_pool_character = { + province = scope:location + limit = { + culture = scope:location.culture + aptitude = { + court_position = champion_court_position + value >= 4 + } + is_available_healthy_ai_adult = yes + champion_validity_trigger = { EMPLOYER = root } + } + save_scope_as = local_character + } + if = { + limit = { + any_court_position_holder = { + type = champion_court_position + } + } + random_court_position_holder = { + type = champion_court_position + save_scope_as = current_holder + } + } + } + else = { + create_character = { + template = champion_court_position_template + location = scope:location + culture = scope:location.culture + faith = scope:location.faith + save_scope_as = local_character + } + scope:local_character = { + add_character_flag = { + flag = silently_disappear_me + years = 1 + } + } + if = { + limit = { + any_court_position_holder = { + type = champion_court_position + } + } + random_court_position_holder = { + type = champion_court_position + save_scope_as = current_holder + } + } + } + hidden_effect = { + scope:local_character = { + add_character_flag = military_outfit + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_valid_to_hire_court_position_type = champion_court_position + NOT = { employs_court_position = champion_court_position } + } + modifier = { + add = 1 + scope:activity = { + has_variable = martial_skill_focus + } + } + } + + option = { + name = bp3_journey.2300.knowledge_hoarding + trigger = { + has_activity_intent = journey_knowledge_hoarding_intent + } + + progress_towards_friend_effect = { + REASON = friend_bonded_by_monument + CHARACTER = scope:local_ruler + OPINION = 30 + } + + journey_knowledge_hoarding_skill_effect = { VALUE = 10 } + + stress_impact = { + base = minor_stress_impact_gain + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.2300.curiosity + trigger = { + has_activity_intent = journey_curiosity_intent + culture != scope:local_character.culture + } + + progress_towards_friend_effect = { + REASON = friend_bonded_by_monument + CHARACTER = scope:local_ruler + OPINION = 30 + } + + if = { + limit = { + culture != scope:local_character.culture + } + culture = { + change_cultural_acceptance = { + target = scope:local_character.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.2300.curiosity_2 + trigger = { + has_activity_intent = journey_curiosity_intent + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = champion + LAAMP_POSITION = master_of_arms + } + + progress_towards_friend_effect = { + REASON = friend_bonded_by_monument + CHARACTER = scope:local_ruler + OPINION = 30 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = paranoid + } + } + } + } + + option = { + name = bp3_journey.2300.a + + trigger = { + maa_regiments_count <= max_regiment_count_plus_one + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + target = scope:local_ruler + modifier = respect_opinion + opinion = 20 + } + + pay_treasury_or_gold = { + target = scope:local_ruler + value = medium_treasury_or_gold_value + } + + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 1 + } + + stress_impact = { + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = craven + has_trait = arrogant + short_term_treasury_or_gold <= major_treasury_or_gold_value + } + } + } + } + + option = { + name = bp3_journey.2300.b + + trigger = { + OR = { + is_valid_to_hire_court_position_type = champion_court_position + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + NOT = { has_activity_intent = journey_curiosity_intent } + } + + reverse_add_opinion = { + target = scope:local_ruler + modifier = annoyed_opinion + opinion = -10 + } + + hire_for_court_position_journey_laamp_replacement_effect = { + CHARACTER = scope:local_character + COURT_POSITION = champion + LAAMP_POSITION = master_of_arms + } + + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 1 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + } + } + } + } + + option = { + name = bp3_journey.2300.c + + add_prestige = miniscule_prestige_gain + + reverse_add_opinion = { + target = scope:local_ruler + modifier = flattered_opinion + opinion = 10 + } + + ai_chance = { + base = 1 + } + } + + after = { + if = { # Cleanup + limit = { + root = { + is_ai = yes + } + scope:local_character = { + is_courtier = no + has_character_flag = silently_disappear_me + } + } + scope:local_character = { + silent_disappearance_effect = yes + } + } + } +} diff --git a/N3OW/events/dlc/bp3/bp3_mapmaking.txt b/N3OW/events/dlc/bp3/bp3_mapmaking.txt new file mode 100644 index 00000000..a956cfc0 --- /dev/null +++ b/N3OW/events/dlc/bp3/bp3_mapmaking.txt @@ -0,0 +1,2793 @@ +namespace = mapmaking + +### Map Choice Event +mapmaking.0001 = { + type = character_event + content_source = dlc_015 + title = mapmaking.0001.t + desc = mapmaking.0001.desc + theme = realm + override_background = { reference = study } + + left_portrait = { + character = root + animation = writing + } + + + immediate = { + #We care about: visited capitals of foreign rulers + #Visited vassal capitals + #Visited domain provinces + #Visited points of interest + random_in_list = { + #Capitals are already tracked since they are points of interest + variable = visited_poi + limit = { + this = county.holder.top_liege.capital_province + county.holder.top_liege != root.top_liege + } + save_scope_as = foreign_capital_map_target + kingdom = { + save_scope_as = foreign_kingdom_map_target + } + } + random_in_list = { + #And now we save other types of Point of Interest + variable = visited_poi + limit = { #We prefer foreign points of interest + OR = { + has_building_with_flag = travel_point_of_interest_religious + has_building_with_flag = travel_point_of_interest_learning + has_building_with_flag = travel_point_of_interest_economic + has_building_with_flag = travel_point_of_interest_martial + has_building_with_flag = travel_point_of_interest_diplomatic + has_building_with_flag = travel_point_of_interest_wonder + has_building_with_flag = travel_point_of_interest_natural_feature + } + empire != root.capital_province.empire + } + alternative_limit = { #We prefer foreign points of interest + OR = { + has_building_with_flag = travel_point_of_interest_religious + has_building_with_flag = travel_point_of_interest_learning + has_building_with_flag = travel_point_of_interest_economic + has_building_with_flag = travel_point_of_interest_martial + has_building_with_flag = travel_point_of_interest_diplomatic + has_building_with_flag = travel_point_of_interest_wonder + has_building_with_flag = travel_point_of_interest_natural_feature + } + kingdom != root.capital_province.kingdom + } + alternative_limit = { + OR = { + has_building_with_flag = travel_point_of_interest_religious + has_building_with_flag = travel_point_of_interest_learning + has_building_with_flag = travel_point_of_interest_economic + has_building_with_flag = travel_point_of_interest_martial + has_building_with_flag = travel_point_of_interest_diplomatic + has_building_with_flag = travel_point_of_interest_wonder + has_building_with_flag = travel_point_of_interest_natural_feature + } + duchy != root.capital_province.duchy + } + alternative_limit = { + OR = { + has_building_with_flag = travel_point_of_interest_religious + has_building_with_flag = travel_point_of_interest_learning + has_building_with_flag = travel_point_of_interest_economic + has_building_with_flag = travel_point_of_interest_martial + has_building_with_flag = travel_point_of_interest_diplomatic + has_building_with_flag = travel_point_of_interest_wonder + has_building_with_flag = travel_point_of_interest_natural_feature + } + } + save_scope_as = poi_map_target + } + random_in_list = { + variable = mapmaking_location_list + limit = { + county.holder = root + county != root.capital_province.county #We cannot in good conscience let someone map their own capital county with this decision + } + save_scope_as = visited_own_county + } + random_in_list = { + variable = mapmaking_location_list + limit = { + county.holder != root + county.holder.liege = root + this = county.holder.capital_province + } + save_scope_as = visited_own_vassal + county.holder.primary_title = { + save_scope_as = visited_own_vassal_title + } + } + } + + option = { + name = mapmaking.0001.a + trigger = { + exists = scope:visited_own_county + } #Check for having visited own county + custom_tooltip = mapmaking.0001.a.tt + scope:visited_own_county = { save_scope_as = background_terrain_scope } + trigger_event = { + id = mapmaking.0010 + days = 5 + } + } + option = { + name = mapmaking.0001.b + trigger = { + exists = scope:visited_own_vassal + } #Check for having visited vassal capital county + custom_tooltip = mapmaking.0001.b.tt + scope:visited_own_vassal = { save_scope_as = background_terrain_scope } + trigger_event = { + id = mapmaking.0020 + days = 5 + } + } + option = { + name = mapmaking.0001.c + trigger = { + exists = scope:poi_map_target + trigger_if = { + limit = { exists = scope:visited_own_vassal } + scope:visited_own_vassal != scope:poi_map_target + } + } #Check for having visited special county + custom_tooltip = mapmaking.0001.c.tt + scope:poi_map_target = { save_scope_as = background_terrain_scope } + trigger_event = { + id = mapmaking.0030 + days = 5 + } + } + option = { + name = mapmaking.0001.d + trigger = { + exists = scope:foreign_capital_map_target + trigger_if = { + limit = { exists = scope:poi_map_target } + scope:foreign_capital_map_target != scope:poi_map_target + } + } #Check for having visited foreign capital county + custom_tooltip = mapmaking.0001.d.tt + scope:foreign_capital_map_target = { save_scope_as = background_terrain_scope } + trigger_event = { + id = mapmaking.0040 + days = 5 + } + } +} + +#Choice 1a - Own County +mapmaking.0010 = { + type = character_event + content_source = dlc_015 + title = mapmaking.0010.t + desc = mapmaking.0010.desc + theme = realm + override_background = { + trigger = { + exists = scope:background_market_scope + } + reference = market_scope + } + override_background = { + trigger = { + exists = scope:background_temple_scope + } + reference = temple_scope + } + override_background = { + trigger = { + exists = scope:courtyard_scope + } + reference = courtyard_scope + } + override_background = { + trigger = { + scope:background_terrain_scope = { + has_holding_type = tribal_holding + } + } + reference = market_tribal + } + + left_portrait = { + character = root + animation = writing #We change the background in each event but not the animation, the background is what root is writing about + } + + + immediate = { + scope:background_terrain_scope = { + switch = { + trigger = has_holding_type + city_holding = { + save_scope_as = background_market_scope + } + church_holding = { + holder = { + save_scope_as = background_temple_scope + } + } + castle_holding = { + save_scope_as = courtyard_scope + } + } + } + } + + #All options are stronger the more of your provinces you visited. + + option = { + name = mapmaking.0010.a + custom_tooltip = mapmaking.0010.a.tt + #Boosted by Stewardship + save_scope_value_as = { + name = own_domain_bonus + value = flag:growth + } + } + option = { + name = mapmaking.0010.b + custom_tooltip = mapmaking.0010.b.tt + #Boosted by Danger Track xp + save_scope_value_as = { + name = own_domain_bonus + value = flag:defensive + } + } + after = { + trigger_event = { + id = mapmaking.0004 + days = 5 + } + } +} + +#Choice 1b - Vassal Capital County +mapmaking.0020 = { + type = character_event + content_source = dlc_015 + title = mapmaking.0020.t + desc = mapmaking.0020.desc + theme = realm + override_background = { + reference = throne_room_scope + } + + left_portrait = { + character = root + animation = writing #We change the background in each event but not the animation, the background is what root is writing about + } + + + immediate = { + scope:background_terrain_scope.county.holder = { + save_scope_as = background_throne_room_scope + } + } + + #All options are stronger the more of your vassal capitals you have visited. + + + option = { + name = mapmaking.0020.a + custom_tooltip = mapmaking.0020.a.tt + save_scope_value_as = { + name = own_vassal_focus + value = flag:dread + } + #Danger XP increases the outcome of this option + } + option = { + name = mapmaking.0020.b + custom_tooltip = mapmaking.0020.b.tt + save_scope_value_as = { + name = own_vassal_focus + value = flag:opinion + } + #Diplomacy increases the outcome of this option + } + option = { + name = mapmaking.0020.c + custom_tooltip = mapmaking.0020.c.tt + save_scope_value_as = { + name = own_vassal_focus + value = flag:intrigue + } + #Intrigue increases the outcome of this option + } + after = { + trigger_event = { + id = mapmaking.0004 + days = 5 + } + } +} + +#Choice 1c - Point of Interest +mapmaking.0030 = { + type = character_event + content_source = dlc_015 + title = mapmaking.0030.t + desc = mapmaking.0030.desc + theme = realm + override_background = { + trigger = { + scope:background_terrain_scope.barony = { + is_holy_site = no + } + NOT = { scope:background_terrain_scope = province:4828 } + } + reference = terrain_scope + } + override_background = { + trigger = { + scope:background_terrain_scope.barony = { + is_holy_site = yes + } + } + reference = holy_site_scope + } + override_background = { + trigger = { + scope:background_terrain_scope = province:4828 #Baghdad + } + reference = ep2_holy_site_mena + } + + left_portrait = { + character = root + animation = writing #We change the background in each event but not the animation, the background is what root is writing about + } + + option = { + name = mapmaking.0030.a + custom_tooltip = mapmaking.0030.a.tt + #Based on traveller danger XP + save_scope_value_as = { + name = poi_focus + value = flag:safety_speed + } + } + option = { + name = mapmaking.0030.b + custom_tooltip = mapmaking.0030.b.tt + #Based on what PoI type + #Better with Traveller XP + save_scope_value_as = { + name = poi_focus + value = flag:location_based + } + } + after = { + trigger_event = { + id = mapmaking.0004 + days = 5 + } + } +} + +#Choice 1d - Foreign Kingdom Capital County +mapmaking.0040 = { + type = character_event + content_source = dlc_015 + title = mapmaking.0040.t + desc = mapmaking.0040.desc + theme = realm + override_background = { + reference = throne_room_scope + } + + left_portrait = { + character = root + animation = writing #We change the background in each event but not the animation, the background is what root is writing about + } + + + immediate = { + scope:background_terrain_scope.county.holder = { + save_scope_as = background_throne_room_scope + } + mapmaking_mythical_lie_effect = yes + } + + option = { + name = mapmaking.0040.a + custom_tooltip = mapmaking.0040.a.tt + save_scope_value_as = { + name = kingdom_focus + value = flag:court_life + } + #Better with traveller XP and knowing Language and Court Language + } + option = { + name = mapmaking.0040.b + custom_tooltip = mapmaking.0040.b.tt + save_scope_value_as = { + name = kingdom_focus + value = flag:people_focus + } + #Better with Traveller Danger XP and Knowing Culture's Language + } + option = { + name = mapmaking.0040.c + custom_tooltip = mapmaking.0040.c.tt + trigger = { + has_trait = eccentric + } + save_scope_value_as = { + name = kingdom_focus + value = flag:mythical_creatures + } + #Better with Traveller XP and Levels of Fame + } + after = { + trigger_event = { + id = mapmaking.0004 + days = 5 + } + } +} + +#Choice 3 - Based on the Dangers of the Province itself +mapmaking.0004 = { + type = character_event + content_source = dlc_015 + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:potential_danger ?= flag:fighting + } + desc = mapmaking.0004.fighting.t + } + triggered_desc = { + trigger = { + scope:potential_danger ?= flag:snow + } + desc = mapmaking.0004.snow.t + } + triggered_desc = { + trigger = { + scope:potential_danger ?= flag:heat + } + desc = mapmaking.0004.heat.t + } + triggered_desc = { + trigger = { + scope:potential_danger ?= flag:monsoon + } + desc = mapmaking.0004.monsoon.t + } + desc = mapmaking.0004.t + } + } + desc = { + desc = mapmaking.0004.desc.intro + #Potential Dangers + #May or may not exist, set in immediate + first_valid = { + triggered_desc = { + trigger = { + scope:potential_danger ?= flag:fighting + } + desc = mapmaking.0004.fighting.desc + } + triggered_desc = { + trigger = { + scope:potential_danger ?= flag:snow + } + desc = mapmaking.0004.snow.desc + } + triggered_desc = { + trigger = { + scope:potential_danger ?= flag:heat + } + desc = mapmaking.0004.heat.desc + } + triggered_desc = { + trigger = { + scope:potential_danger ?= flag:monsoon + } + desc = mapmaking.0004.monsoon.desc + } + } + #Terrain - Always Present + #What to display is decided in immediate + first_valid = { + triggered_desc = { #Forest + trigger = { + scope:terrain_category = flag:deep_forest + } + desc = mapmaking.0004.terrain_deep_forests.desc + } + triggered_desc = { #Open + trigger = { + scope:terrain_category = flag:open_terrain + } + desc = mapmaking.0004.terrain_open.desc + } + triggered_desc = { #Open + trigger = { + scope:terrain_category = flag:steppes + } + desc = mapmaking.0004.terrain_steppes.desc + } + triggered_desc = { #Farmlands + trigger = { + scope:terrain_category = flag:farmlands + } + desc = mapmaking.0004.terrain_open_farmland.desc + } + triggered_desc = { #Jungle + trigger = { + scope:terrain_category = flag:jungle + } + desc = mapmaking.0004.terrain_jungle.desc + } + triggered_desc = { #Undulating + trigger = { + scope:terrain_category = flag:undulating + } + desc = mapmaking.0004.terrain_undulating.desc + } + triggered_desc = { #Desert + trigger = { + scope:terrain_category = flag:desert + } + desc = mapmaking.0004.terrain_desert.desc + } + triggered_desc = { #Wetlands + trigger = { + scope:terrain_category = flag:wetlands + } + desc = mapmaking.0004.terrain_wetlands.desc + } + desc = mapmaking.0004.desc.generic_fallback #Fallback if we somehow have no terrain + } + } + theme = realm + + override_background = { + trigger = { + scope:potential_danger ?= flag:fighting + } + reference = battlefield + } + override_background = { + trigger = { + scope:terrain_category = flag:farmlands + } + reference = farmland + } + override_background = { + reference = wilderness_scope #Fallback + } + + override_effect_2d = { + trigger = { + scope:potential_danger ?= flag:fighting + } + reference = flies #Fits the battlefield + } + widget = { + is_shown = { + scope:potential_danger ?= flag:cold + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + override_effect_2d = { + trigger = { + scope:potential_danger ?= flag:heat + } + reference = legend_glow #Sun + } + override_effect_2d = { + trigger = { + scope:potential_danger ?= flag:monsoon + } + reference = rain + } + override_effect_2d = { + trigger = { + scope:terrain_category = flag:wetlands + NOT = { exists = scope:potential_danger } + } + reference = fog #Make the Wetland look more menacing + } + + + + left_portrait = { + character = root + animation = writing #We change the background in each event but not the animation, the background is what root is writing about + } + + + immediate = { + scope:background_terrain_scope = { + save_scope_as = background_wilderness_scope + + #Extra potential dangers depending on location + random_list = { + 1 = { + trigger = { + OR = { + county = { county_control < 50 } + county.holder.top_liege = { + is_at_war = yes + } + county.holder = { + is_at_war = yes + } + } + } + save_scope_value_as = { + name = potential_danger + value = flag:fighting + } + } + 1 = { + trigger = { + OR = { + geographical_region = world_tibet + geographical_region = world_europe_north + geographical_region = world_steppe + terrain = taiga + } + } + save_scope_value_as = { + name = potential_danger + value = flag:cold + } + } + 1 = { + trigger = { + OR = { + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_burma + geographical_region = world_africa + geographical_region = world_asia_southeast + is_desert_trigger = yes + terrain = jungle + } + } + save_scope_value_as = { + name = potential_danger + value = flag:heat + } + } + 1 = { + trigger = { + OR = { + geographical_region = world_india + geographical_region = world_burma + geographical_region = world_asia_southeast + } + } + save_scope_value_as = { + name = potential_danger + value = flag:monsoon + } + } + } + + #What terrain do we describe? + #This is done here instead of just as triggers in the description because we don't want to replicate the check again when generating the artifact: + if = { + limit = { + scope:background_wilderness_scope = { + OR = { + terrain = taiga + terrain = forest + } + } + } + save_scope_value_as = { + name = terrain_category + value = flag:deep_forest + } + } + else_if = { + limit = { + scope:background_wilderness_scope = { + OR = { + graphical_plains_trigger = yes + graphical_drylands_trigger = yes + } + } + } + save_scope_value_as = { + name = terrain_category + value = flag:open_terrain + } + } + else_if = { + limit = { + scope:background_wilderness_scope = { + terrain = farmlands + } + } + save_scope_value_as = { + name = terrain_category + value = flag:farmlands + } + } + else_if = { + limit = { + scope:background_wilderness_scope = { + graphical_wilderness_jungle_trigger = yes + } + } + save_scope_value_as = { + name = terrain_category + value = flag:jungle + } + } + else_if = { + limit = { + scope:background_wilderness_scope = { + OR = { + graphical_hills_trigger = yes + graphical_wilderness_mountains_trigger = yes + } + } + } + save_scope_value_as = { + name = terrain_category + value = flag:undulating + } + } + else_if = { + limit = { + scope:background_wilderness_scope = { + graphical_wilderness_desert_trigger = yes + } + } + save_scope_value_as = { + name = terrain_category + value = flag:desert + } + } + else_if = { + limit = { + scope:background_wilderness_scope = { + graphical_wilderness_wetlands_trigger = yes + } + } + save_scope_value_as = { + name = terrain_category + value = flag:wetlands + } + } + else_if = { + limit = { + scope:background_wilderness_scope = { + graphical_wilderness_steppe_trigger = yes + } + } + save_scope_value_as = { + name = terrain_category + value = flag:steppes + } + } + } + } + + option = { + name = mapmaking.0004.a #Terrain, this can always be picked + custom_tooltip = mapmaking.0004.a.tt + save_scope_value_as = { + name = danger_type + value = flag:terrain + } + } + option = { + name = mapmaking.0004.b + custom_tooltip = mapmaking.0004.b.tt + trigger = { + scope:potential_danger ?= flag:fighting + } + save_scope_value_as = { + name = danger_type + value = flag:fighting + } + } + option = { + name = mapmaking.0004.c + custom_tooltip = mapmaking.0004.c.tt + trigger = { + scope:potential_danger ?= flag:cold + } + save_scope_value_as = { + name = danger_type + value = flag:cold + } + } + option = { + name = mapmaking.0004.d + custom_tooltip = mapmaking.0004.d.tt + trigger = { + scope:potential_danger ?= flag:heat + } + save_scope_value_as = { + name = danger_type + value = flag:heat + } + } + option = { + name = mapmaking.0004.e + custom_tooltip = mapmaking.0004.e.tt + trigger = { + scope:potential_danger ?= flag:monsoon + } + save_scope_value_as = { + name = danger_type + value = flag:monsoon + } + } + after = { + trigger_event = { + id = mapmaking.1000 + days = 5 + } + } +} + +# Finish Event - What map did we get out of this? +mapmaking.1000 = { + type = character_event + content_source = dlc_015 + title = mapmaking.1000.t + desc = mapmaking.1000.desc + theme = realm + + override_background = { + trigger = { + scope:background_terrain_scope.barony = { + is_holy_site = no + } + NOT = { scope:background_terrain_scope = province:4828 } + } + reference = terrain_scope + } + override_background = { + trigger = { + scope:background_terrain_scope.barony = { + is_holy_site = yes + } + } + reference = holy_site_scope + } + override_background = { + trigger = { + scope:background_terrain_scope = province:4828 #Baghdad + } + reference = ep2_holy_site_mena + } + + left_portrait = { + character = root + animation = writing #We change the background in each event but not the animation, the background is what root is writing about + } + artifact = { # To display the artifact in the event-window + trigger = { exists = scope:newly_created_artifact } + target = scope:newly_created_artifact + position = lower_right_portrait + } + + immediate = { + save_scope_as = author + #First we make the artifact, then we assign effects and descriptions. + hidden_effect = { + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = map_artifact_name + type = journal + creator = root + description = map_artifact_beginning_far_eastern + visuals = indian_book + modifier = character_travel_speed_1 + save_scope_as = newly_created_artifact + wealth = 50 + quality = 50 + } + } + else = { + create_artifact = { + name = map_artifact_name + type = journal + creator = root + description = map_artifact_beginning_western + visuals = book + modifier = character_travel_speed_1 + save_scope_as = newly_created_artifact + wealth = 50 + quality = 50 + } + } + + hidden_effect_new_object = { + + if = { + limit = { + scope:background_terrain_scope.county.holder.top_liege = root.top_liege + } + scope:newly_created_artifact = { + set_artifact_description = map_artifact_beginning_internal + } + } + else = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_beginning_external + } + } + + #Dangers of Province: + if = { #Terrain + #Each terrain gives 1 combat modifier and 1 travel danger modifier + limit = { + scope:danger_type = flag:terrain + } + switch = { + trigger = scope:terrain_category + flag:deep_forest = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_forests + } + scope:background_terrain_scope = { + switch = { + trigger = terrain + forest = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_forest_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_forest_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_forest_advantage_3_modifier + } + } + } + } + taiga = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_taiga_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_taiga_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_taiga_advantage_3_modifier + } + } + } + } + } + } + } + flag:open_terrain = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_open + } + scope:background_terrain_scope = { + switch = { + trigger = terrain + drylands = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_drylands_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_drylands_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_drylands_advantage_3_modifier + } + } + } + } + plains = { + scope:newly_created_artifact = { + random_list = { + 65 = { + add_artifact_modifier = artifact_plains_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_plains_advantage_3_modifier + } + } + } + } + } + } + } + flag:farmlands = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_farmlands + + random_list = { + 65 = { + add_artifact_modifier = artifact_farmlands_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_farmlands_advantage_3_modifier + } + } + } + } + flag:jungle = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_jungle + add_artifact_modifier = artifact_jungle_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_jungle_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_jungle_advantage_3_modifier + } + } + } + } + flag:undulating = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_undulating + } + scope:background_terrain_scope = { + switch = { + trigger = terrain + hills = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_hills_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_hills_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_hills_advantage_3_modifier + } + } + } + } + mountains = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_mountains_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_mountains_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_mountains_advantage_3_modifier + } + } + } + } + } + } + } + flag:desert = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_desert + } + scope:background_terrain_scope = { + switch = { + trigger = terrain + desert = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_desert_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_desert_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_desert_advantage_3_modifier + } + } + } + } + desert_mountains = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_desert_mountains_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_desert_mountains_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_desert_mountains_advantage_3_modifier + } + } + } + } + oasis = { #Too rare so we give desert + scope:newly_created_artifact = { + add_artifact_modifier = artifact_desert_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_desert_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_desert_advantage_3_modifier + } + } + } + } + } + } + } + flag:wetlands = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_wetlands + } + scope:background_terrain_scope = { + switch = { + trigger = terrain + floodplains = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_floodplains_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_floodplains_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_floodplains_advantage_3_modifier + } + } + } + } + wetlands = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_wetlands_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_wetlands_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_wetlands_advantage_3_modifier + } + } + } + } + } + } + } + flag:steppes = { + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_steppes + add_artifact_modifier = artifact_steppe_danger_travel_modifier + random_list = { + 65 = { + add_artifact_modifier = artifact_steppe_advantage_2_modifier + } + 35 = { + add_artifact_modifier = artifact_steppe_advantage_3_modifier + } + } + } + } + } + } + if = { #Fighting + limit = { + scope:danger_type = flag:fighting + } + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_fighting + add_artifact_modifier = artifact_travel_safety_2 + random_list = { + 25 = { add_artifact_modifier = artifact_controlled_province_advantage_3_modifier } + 25 = { add_artifact_modifier = artifact_enemy_hard_casualty_modifier_1_modifier } + 50 = { add_artifact_modifier =character_travel_speed_1 } + } + } + } + if = { #Cold + limit = { + scope:danger_type = flag:cold + } + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_snowstorms + add_artifact_modifier = artifact_winter_movement_speed + add_artifact_modifier = artifact_winter_advantage + } + } + if = { #Heat + limit = { + scope:danger_type = flag:heat + } + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_heat + #Multiple Travel Danger Modifiers: + add_artifact_modifier = artifact_jungle_danger_travel_modifier + add_artifact_modifier = artifact_desert_danger_travel_modifier + add_artifact_modifier = artifact_drylands_danger_travel_modifier + add_artifact_modifier = artifact_desert_mountains_danger_travel_modifier + } + } + if = { #Monsoon + limit = { + scope:danger_type = flag:monsoon + + } + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_monsoons + #Multiple Travel Danger Modifiers: + add_artifact_modifier = artifact_jungle_danger_travel_modifier + add_artifact_modifier = artifact_wetlands_danger_travel_modifier + add_artifact_modifier = artifact_desert_mountains_danger_travel_modifier + } + } + + #End Danger + scope:newly_created_artifact = { + set_artifact_description = map_artifact_danger_type_end + + } + + #Purpose related bonuses + #These max out around what would be assigned to a masterwork artifact in artifact_creation_effects + + #Domain + if = { #Growth + limit = { + scope:own_domain_bonus ?= flag:growth + } + scope:newly_created_artifact = { + set_artifact_name = map_artifact_name_domain + set_artifact_description = map_artifact_domain_purpose_growth + } + random_list = { + 50 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder = root + county != root.capital_province.county + count < 4 + } + } + modifier = { #Lowered by Stewardship + stewardship > 2 + add = { + value = stewardship + multiply = -1 + } + } + scope:background_terrain_scope = { + switch = { + trigger = terrain + drylands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_drylands_development_growth_1 } + } + desert = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_desert_development_growth_1 } + } + desert_mountains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_desert_mountains_development_growth_1 } + } + mountains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_mountains_development_growth_1 } + } + hills = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_hills_development_growth_1 } + } + plains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_plains_development_growth_1 } + } + forest = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_forest_development_growth_1 } + } + taiga = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_taiga_development_growth_1 } + } + oasis = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_oasis_development_growth_1 } + } + farmlands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_farmlands_development_growth_1 } + } + floodplains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_floodplains_development_growth_1 } + } + wetlands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_wetlands_development_growth_1 } + } + } + } + } + 35 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder = root + county != root.capital_province.county + count < 7 + } + } + modifier = { #Upped by Stewardship + stewardship > 2 + add = { + value = stewardship + divide = 2 + } + } + scope:background_terrain_scope = { + switch = { + trigger = terrain + drylands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_drylands_development_growth_2 } + } + desert = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_desert_development_growth_2 } + } + desert_mountains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_desert_mountains_development_growth_2 } + } + hills = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_hills_development_growth_2 } + } + mountains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_mountains_development_growth_2 } + } + plains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_plains_development_growth_2 } + } + forest = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_forest_development_growth_2 } + } + taiga = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_taiga_development_growth_2 } + } + oasis = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_oasis_development_growth_2 } + } + farmlands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_farmlands_development_growth_2 } + } + floodplains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_floodplains_development_growth_2 } + } + wetlands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_wetlands_development_growth_2 } + } + } + } + } + 15 = { + modifier = { #Upped by Stewardship + stewardship > 2 + add = { + value = stewardship + } + } + scope:background_terrain_scope = { + switch = { + trigger = terrain + drylands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_drylands_development_growth_3 } + } + desert = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_desert_development_growth_3 } + } + desert_mountains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_desert_mountains_development_growth_3 } + } + hills = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_hills_development_growth_3 } + } + mountains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_mountains_development_growth_3 } + } + plains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_plains_development_growth_3 } + } + forest = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_forest_development_growth_3 } + } + taiga = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_taiga_development_growth_3 } + } + oasis = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_oasis_development_growth_3 } + } + farmlands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_farmlands_development_growth_3 } + } + floodplains = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_floodplains_development_growth_3 } + } + wetlands = { + scope:newly_created_artifact = { add_artifact_modifier = artifact_wetlands_development_growth_3 } + } + } + } + } + } + } + if = { #Defensive + limit = { + scope:own_domain_bonus ?= flag:defensive + } + scope:newly_created_artifact = { + set_artifact_name = map_artifact_name_domain + set_artifact_description = map_artifact_domain_purpose_defensive + } + random_list = { + 50 = { + trigger={ + any_in_list = { + variable = mapmaking_location_list + county.holder = root + county != root.capital_province.county + count < 4 + } + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value <= 100 + } + add = -10 + } + modifier = { + martial > 5 + add = { + value = martial + multiply = -1 + } + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_controlled_province_advantage_2_modifier + } + 30 = { + add_artifact_modifier = artifact_men_at_arms_maintenance_2_modifier + } + 20 = { + add_artifact_modifier = artifact_controlled_province_advantage_3_modifier + } + 20 = { + add_artifact_modifier = artifact_men_at_arms_maintenance_3_modifier + } + } + } + } + 35 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder = root + county != root.capital_province.county + count < 7 + } + } + modifier = { #Upped by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = 10 + } + modifier = { + martial > 1 + add = { + value = martial + divide = 2 + } + } + scope:newly_created_artifact = { + random_list = { + 40 = { + add_artifact_modifier = artifact_controlled_province_advantage_4_modifier + } + 40 = { + add_artifact_modifier = artifact_men_at_arms_maintenance_4_modifier + } + 10 = { + add_artifact_modifier = artifact_controlled_province_advantage_5_modifier + } + 10 = { + add_artifact_modifier = artifact_men_at_arms_maintenance_5_modifier + } + } + } + } + 15 = { + modifier = { #Upped by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 75 + } + add = 15 + } + modifier = { + add = { + value = martial + } + } + scope:newly_created_artifact = { + random_list = { + 50 = { + add_artifact_modifier = artifact_controlled_province_advantage_5_modifier + } + 50 = { + add_artifact_modifier = artifact_men_at_arms_maintenance_5_modifier + } + } + } + } + } + } + + #Vassals + if = { #Dread + limit = { + scope:own_vassal_focus ?= flag:dread + } + scope:newly_created_artifact = { + set_artifact_name = map_artifact_name_vassal_dread + set_artifact_description = map_artifact_vassal_purpose_dread + } + + random_list = { + 50 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder != root + county.holder.liege = root + this = county.holder.capital_province + county.holder = { + is_powerful_vassal_of = root + } + count < 4 + } + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value <= 100 + } + add = -10 + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_dread_gain_mult_1_modifier + } + } + 35 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder != root + county.holder.liege = root + this = county.holder.capital_province + county.holder = { + is_powerful_vassal_of = root + } + count < 4 + } + } + modifier = { #Upped by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = 10 + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_dread_gain_mult_2_modifier + } + } + 15 = { + modifier = { #Upped by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 75 + } + add = 15 + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_dread_gain_mult_3_modifier + } + } + } + } + if = { #Opinion + limit = { + scope:own_vassal_focus ?= flag:opinion + } + scope:newly_created_artifact = { + set_artifact_name = map_artifact_name_vassal_opinion + set_artifact_description =map_artifact_vassal_purpose_opinion + } + random_list = { + 50 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder != root + county.holder.liege = root + this = county.holder.capital_province + county.holder = { + is_powerful_vassal_of = root + } + count < 4 + } + } + modifier = { #Lowered by Diplomacy + diplomacy > 1 + add = { + value = diplomacy + multiply = -1 + } + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_1_modifier + } + 15 = { + add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_2_modifier + } + } + } + } + 35 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder != root + county.holder.liege = root + this = county.holder.capital_province + county.holder = { + is_powerful_vassal_of = root + } + count < 4 + } + } + modifier = { #Upped by Diplomacy + diplomacy > 2 + add = { + value = diplomacy + divide = 2 + } + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_3_modifier + } + 30 = { + add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_1_modifier + } + 15 = { + add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_4_modifier + } + 15 = { + add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_2_modifier + } + } + } + } + 15 = { + modifier = { #Upped by Diplomacy + diplomacy > 2 + add = { + value = diplomacy + } + } + scope:newly_created_artifact = { + random_list = { + 50 = { + add_artifact_modifier = artifact_happy_powerful_vassal_tax_contribution_mult_4_modifier + } + 50 = { + add_artifact_modifier = artifact_monthly_prestige_gain_per_happy_powerful_vassal_add_2_modifier + } + } + } + } + } + } + if = { #Intrigue + limit = { + scope:own_vassal_focus ?= flag:intrigue + } + scope:newly_created_artifact = { + set_artifact_name = map_artifact_name_vassal_intrigue + set_artifact_description =map_artifact_vassal_purpose_intrigue + } + random_list = { + 50 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder != root + county.holder.liege = root + this = county.holder.capital_province + county.holder = { + is_powerful_vassal_of = root + } + count < 4 + } + } + modifier = { #Lowered by Intrigue + intrigue > 5 + add = { + value = intrigue + multiply = -1 + } + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_2_modifier + } + 30 = { + add_artifact_modifier = artifact_owned_scheme_secrecy_add_2_modifier + } + 15 = { + add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_3_modifier + } + 15 = { + add_artifact_modifier = artifact_owned_scheme_secrecy_add_3_modifier + } + } + } + } + 35 = { + trigger = { + any_in_list = { + variable = mapmaking_location_list + county.holder != root + county.holder.liege = root + this = county.holder.capital_province + county.holder = { + is_powerful_vassal_of = root + } + count < 4 + } + } + modifier = { #Upped by Intrigue + intrigue > 2 + add = { + value = intrigue + divide = 2 + } + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_4_modifier + } + 30 = { + add_artifact_modifier = artifact_owned_scheme_secrecy_add_4_modifier + } + 15 = { + add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_5_modifier + } + 15 = { + add_artifact_modifier = artifact_owned_scheme_secrecy_add_5_modifier + } + } + } + } + 15 = { + modifier = { #Upped by Intrigue + intrigue > 2 + add = { + value = intrigue + } + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_5_modifier + } + 30 = { + add_artifact_modifier = artifact_owned_scheme_secrecy_add_5_modifier + } + 15 = { + add_artifact_modifier = artifact_owned_hostile_scheme_success_chance_add_6_modifier + } + 15 = { + add_artifact_modifier = artifact_owned_scheme_secrecy_add_6_modifier + } + } + } + } + } + } + + #Point of Interest + if = { + limit = { + scope:poi_focus ?= flag:safety_speed + } + scope:newly_created_artifact = { + set_artifact_description = map_artifact_poi_travel + } + random_list = { + 50 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value <= 70 + } + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = -10 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 40 + } + add = -5 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 30 + } + add = -5 + } + scope:newly_created_artifact = { + add_artifact_modifier = character_travel_speed_1 + add_artifact_modifier = artifact_travel_safety_1 + } + } + 35 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value <= 100 + } + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 70 + } + add = -10 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = -5 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 40 + } + add = -5 + } + scope:newly_created_artifact = { + random_list = { + 50 = { + add_artifact_modifier = character_travel_speed_1 + add_artifact_modifier = artifact_travel_safety_2 + } + 50 = { + add_artifact_modifier = character_travel_speed_2 + add_artifact_modifier = artifact_travel_safety_1 + } + } + } + } + 15 = { + modifier = { #Increased by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 80 + } + add = 10 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 65 + } + add = 5 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = 5 + } + scope:newly_created_artifact = { + add_artifact_modifier = character_travel_speed_2 + add_artifact_modifier = artifact_travel_safety_2 + } + } + } + } + if = { #PoI Specific Outcome + limit = { + scope:poi_focus ?= flag:location_based + } + scope:newly_created_artifact = { + set_artifact_name = map_artifact_name_poi + set_artifact_description =map_artifact_poi_purpose + } + random_list = { + 50 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value <= 70 + } + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + add = -10 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 40 + } + add = -5 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 30 + } + add = -5 + } + #Scripted effect to choose modifier based on poi type + scope:background_terrain_scope = { + switch = { + trigger = has_travel_point_of_interest + poi_capitals = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + } + } + poi_special_buildings_martial = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + } + } + poi_special_buildings_learning = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_1_modifier + } + } + poi_special_buildings_religious = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_piety_1_modifier + } + } + poi_special_buildings_diplomatic = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_1_modifier + } + } + poi_grand_city = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier + } + } + poi_special_buildings_wonder = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier + } + } + poi_special_buildings_economic = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier + } + } + poi_mausoleum_at_halicarnassus = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier + } + } + poi_lighthouse_of_alexandria = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier + } + } + poi_natural_feature = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_hunt_lifestyle_xp_gain_mult_modifier + } + } + } + } + } + 35 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value <= 100 + } + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 70 + } + add = -10 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + add = -5 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 40 + } + add = -5 + } + scope:background_terrain_scope = { + switch = { + trigger = has_travel_point_of_interest + poi_capitals = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_2_modifier + } + } + poi_special_buildings_martial = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_2_modifier + } + } + poi_special_buildings_learning = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_2_modifier + } + } + poi_special_buildings_religious = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_piety_2_modifier + } + } + poi_special_buildings_diplomatic = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_2_modifier + } + } + poi_grand_city = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier + } + } + poi_special_buildings_wonder = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier + } + } + poi_special_buildings_economic = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier + } + } + poi_mausoleum_at_halicarnassus = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier + } + } + poi_lighthouse_of_alexandria = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_2_modifier + } + } + poi_natural_feature = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_hunt_lifestyle_xp_gain_mult_modifier + } + } + } + } + } + 15 = { + modifier = { #Increased by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 80 + } + add = 10 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 65 + } + add = 5 + } + modifier = { #Lowered by Travel Danger XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = 5 + } + scope:background_terrain_scope = { + switch = { + trigger = has_travel_point_of_interest + poi_capitals = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_3_modifier + } + } + poi_special_buildings_martial = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_martial_lifestyle_xp_3_modifier + } + } + poi_special_buildings_learning = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_learning_lifestyle_xp_3_modifier + } + } + poi_special_buildings_religious = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_piety_3_modifier + } + } + poi_special_buildings_diplomatic = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_diplomacy_lifestyle_xp_3_modifier + } + } + poi_grand_city = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier + } + } + poi_special_buildings_wonder = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier + } + } + poi_special_buildings_economic = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier + } + } + poi_mausoleum_at_halicarnassus = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier + } + } + poi_lighthouse_of_alexandria = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier + } + } + poi_natural_feature = { + scope:newly_created_artifact = { + add_artifact_modifier = artifact_hunt_lifestyle_xp_gain_mult_modifier + } + } + } + } + } + } + } + + #Foreign Kingdom: + if = { #Court Life + limit = { + scope:kingdom_focus ?= flag:court_life + } + scope:newly_created_artifact = { + #Uses fallback name + set_artifact_description = map_artifact_foreign_purpose_court + } + random_list = { + 50 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value <= 70 + } + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + add = -10 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 40 + } + add = -5 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 30 + } + add = -5 + } + scope:newly_created_artifact = { + random_list = { + 30 = { + trigger = { + root = { has_royal_court = no } + } + add_artifact_modifier = artifact_monthly_prestige_1_modifier + } + 30 = { + trigger = { + root = { has_royal_court = yes } + } + add_artifact_modifier = artifact_court_grandeur_baseline_add_1_modifier + } + 30 = { + add_artifact_modifier = artifact_courtly_vassal_opinion_2_modifier + } + 15 = { + add_artifact_modifier = artifact_courtly_tax_contribution_mult_2_modifier + } + 15 = { + trigger = { + root = { has_royal_court = no } + } + add_artifact_modifier = artifact_monthly_prestige_2_modifier + } + 15 = { + trigger = { + root = { has_royal_court = yes } + } + add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier + } + } + } + } + 35 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value <= 100 + } + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 70 + } + add = -10 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + add = -5 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 40 + } + add = -5 + } + modifier = { #Increased by knowing their language + knows_language_of_culture = scope:background_terrain_scope.culture + add = 5 + } + scope:newly_created_artifact = { + random_list = { + 30 = { + trigger = { + root = { + has_royal_court = no + } + } + add_artifact_modifier = artifact_monthly_prestige_2_modifier + } + 30 = { + trigger = { + root = { + has_royal_court = yes + } + } + add_artifact_modifier = artifact_court_grandeur_baseline_add_2_modifier + } + 30 = { + add_artifact_modifier = artifact_courtly_vassal_opinion_3_modifier + } + 15 = { + add_artifact_modifier = artifact_courtly_tax_contribution_mult_3_modifier + } + 15 = { + trigger = { + root = { + has_royal_court = no + } + } + add_artifact_modifier = artifact_monthly_prestige_3_modifier + } + 15 = { + trigger = { + root = { + has_royal_court = yes + } + } + add_artifact_modifier = artifact_court_grandeur_baseline_add_3_modifier + } + } + } + } + 15 = { + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 80 + } + add = 10 + } + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 65 + } + add = 5 + } + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + add = 5 + } + modifier = { #Increased by knowing their language + knows_language_of_culture = scope:background_terrain_scope.culture + add = 10 + } + modifier = { #Increased by knowing their court language + knows_court_language_of = scope:background_terrain_scope.barony.holder + add = 5 + } + scope:newly_created_artifact = { + random_list = { + 30 = { + trigger = { + root = { has_royal_court = no } + } + add_artifact_modifier = artifact_monthly_prestige_3_modifier + } + 30 = { + trigger = { + root = { has_royal_court = yes } + } + add_artifact_modifier = artifact_court_grandeur_baseline_add_3_modifier + } + 30 = { + add_artifact_modifier = artifact_courtly_vassal_opinion_4_modifier + } + 15 = { + add_artifact_modifier = artifact_courtly_tax_contribution_mult_3_modifier + } + 15 = { + trigger = { + root = { has_royal_court = no } + } + add_artifact_modifier = artifact_monthly_prestige_4_modifier + } + 15 = { + trigger = { + root = { has_royal_court = yes } + } + add_artifact_modifier = artifact_legitimacy_gain_mult_4_modifier + } + } + } + } + } + } + if = { #People and Customs + limit = { + scope:kingdom_focus ?= flag:people_focus + } + scope:newly_created_artifact = { + #Uses Fallback Name + set_artifact_description = map_artifact_foreign_purpose_people + } + random_list = { + 50 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value <= 70 + } + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = -10 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 40 + } + add = -5 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 30 + } + add = -5 + } + scope:newly_created_artifact = { + random_list = { + 40 = { + add_artifact_modifier = artifact_independent_ruler_opinion_1_modifier + } + 40 = { + add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_1_modifier + } + 5 = { + add_artifact_modifier = artifact_diplomacy_1_modifier + } + 15 = { + add_artifact_modifier = artifact_independent_ruler_opinion_2_modifier + } + } + } + } + 35 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value <= 100 + } + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 70 + } + add = -10 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = -5 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 40 + } + add = -5 + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_independent_ruler_opinion_2_modifier + } + 30 = { + add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_2_modifier + } + 5 = { + add_artifact_modifier = artifact_diplomacy_2_modifier + } + 15 = { + add_artifact_modifier = artifact_independent_ruler_opinion_3_modifier + } + } + } + } + 15 = { + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 80 + } + add = 10 + } + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 65 + } + add = 5 + } + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + add = 5 + } + modifier = { #Increased by knowing their language + knows_language_of_culture = scope:background_terrain_scope.culture + add = 10 + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_independent_ruler_opinion_3_modifier + } + 30 = { + add_artifact_modifier = artifact_diplomacy_3_modifier + } + 20 = { + add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_2_modifier + } + 20 = { + add_artifact_modifier = artifact_independent_ruler_opinion_4_modifier + } + } + } + } + } + } + if = { #Mythical Beasts + limit = { + scope:kingdom_focus ?= flag:mythical_creatures + } + scope:newly_created_artifact = { + set_artifact_name = map_artifact_name_mythical + set_artifact_description = map_artifact_foreign_purpose_mythical + } + random_list = { + 50 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value <= 70 + } + prestige_level < high_prestige_level + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + add = -10 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 40 + } + add = -5 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 30 + } + add = -5 + } + scope:newly_created_artifact = { + random_list = { + 30 = { + add_artifact_modifier = artifact_monthly_prestige_add_1_modifier + } + 30 = { + add_artifact_modifier = artifact_dynasty_opinion_2_modifier + } + 15 = { + add_artifact_modifier = artifact_monthly_prestige_add_2_modifier + } + 15 = { + add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_1_modifier + } + } + } + } + 35 = { + trigger = { + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value <= 100 + } + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 70 + } + add = -10 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + add = -5 + } + modifier = { #Lowered by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 40 + } + add = -5 + } + modifier = { #Increased by Fame + prestige_level > 1 + add = { + value = prestige_level + multiply = 2 + } + } + scope:newly_created_artifact = { + random_list = { + 40 = { + add_artifact_modifier = artifact_monthly_prestige_add_2_modifier + } + 40 = { + add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_1_modifier + } + 20 = { + add_artifact_modifier = artifact_monthly_prestige_add_3_modifier + } + } + } + } + 15 = { + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 80 + } + add = 10 + } + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 65 + } + add = 5 + } + modifier = { #Increased by Travel XP + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + add = 5 + } + modifier = { #Increased by Fame + prestige_level > 1 + add = { + value = prestige_level + multiply = 2 + } + } + scope:newly_created_artifact = { + random_list = { + 60 = { + add_artifact_modifier = artifact_monthly_prestige_add_3_modifier + } + 20 = { + add_artifact_modifier = artifact_monthly_prestige_gain_per_knight_add_2_modifier + } + 20 = { + add_artifact_modifier = artifact_monthly_prestige_add_4_modifier + } + } + } + } + } + + } + } + } + if = { + limit = { + has_any_nickname = no + } + random_list = { + 80 = {} #Nothing Happens + 20 = { + give_nickname = nick_the_mapmaker + } + } + } + } + + option = { + name = mapmaking.1000.a + stress_impact = { + lifestyle_traveler = major_stress_loss #In practice this is base as you will always have this + } + } +} diff --git a/N3OW/events/dlc/bp3/bp3_roaming_events.txt b/N3OW/events/dlc/bp3/bp3_roaming_events.txt new file mode 100644 index 00000000..cd6b49a5 --- /dev/null +++ b/N3OW/events/dlc/bp3/bp3_roaming_events.txt @@ -0,0 +1,2828 @@ +namespace = bp3_roaming + +### Setup Events +# Arrival Event +bp3_roaming.0005 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0005.t + desc = bp3_roaming.0005.desc + theme = roaming_activity + + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + location = { + roaming_activity_monsoon_trigger = yes + } + } + animation = scheme + } + triggered_animation = { + trigger = { + location = { + roaming_activity_winter_trigger = yes + terrain = mountains + } + } + animation = shiver + } + animation = survey_staff + } + + right_portrait = { + trigger = { + exists = scope:special_guest + } + character = scope:special_guest + triggered_animation = { + trigger = { + location = { + roaming_activity_monsoon_trigger = yes + } + } + animation = scheme + } + triggered_animation = { + trigger = { + location = { + roaming_activity_winter_trigger = yes + terrain = mountains + } + } + animation = shiver + } + animation = happiness + } + + override_effect_2d = { + reference = rain + trigger = { + location = { + roaming_activity_monsoon_trigger = yes + } + } + } + + widgets = { + widget = { + is_shown = { + location = { + roaming_activity_winter_trigger = yes + NOT = { terrain = mountains } + } + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + widget = { + is_shown = { + location = { + roaming_activity_winter_trigger = yes + terrain = mountains + } + } + gui = "event_window_widget_vfx_snowstorm" + container = "foreground_shader_vfx_container" + } + } + + override_effect_2d = { # Fallback, will be chosen if the others weren't + trigger = { + scope:province = { + roaming_activity_monsoon_trigger = no + roaming_activity_winter_trigger = no + } + } + reference = legend_glow + } + + immediate = { + save_scope_as = root_scope + roaming_tally_variable_effect = { TYPE = stress VALUE = miniscule_stress_impact_loss } + hidden_effect = { + involved_activity = { + add_activity_log_entry = { + key = roaming_start_of_the_journey_key + tags = { activity_log } + character = root + root = { + show_as_tooltip = { + stress_impact = { + base = miniscule_stress_impact_loss + } + } + } + } + } + } + } + + option = { + name = bp3_roaming.0005.a + trigger = { + location = { + OR = { + terrain = forest + terrain = farmlands + terrain = drylands + terrain = oasis + terrain = wetlands + terrain = taiga + terrain = floodplains + } + has_winter_trigger = no + NAND = { + tropical_seasons_region_trigger = yes + middle_of_year_season_trigger = yes + } + } + } + stress_impact = { + base = miniscule_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = miniscule_stress_impact_loss } + } + + option = { + name = bp3_roaming.0005.b + trigger = { + location = { + OR = { + terrain = hills + terrain = mountains + terrain = plains + terrain = desert_mountains + terrain = desert + terrain = jungle + terrain = steppe + } + has_winter_trigger = no + NAND = { + tropical_seasons_region_trigger = yes + middle_of_year_season_trigger = yes + } + } + } + stress_impact = { + base = miniscule_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = miniscule_stress_impact_loss } + } + + option = { + name = bp3_roaming.0005.c + trigger = { + location = { + has_winter_trigger = yes + } + } + stress_impact = { + base = miniscule_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = miniscule_stress_impact_loss } + } + + option = { + name = bp3_roaming.0005.d + trigger = { + location = { + tropical_seasons_region_trigger = yes + middle_of_year_season_trigger = yes + } + } + stress_impact = { + base = miniscule_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = miniscule_stress_impact_loss } + } +} + +# Ending Event +bp3_roaming.0010 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0010.t + desc = bp3_roaming.0010.desc + theme = roaming_activity + + left_portrait = { + character = scope:host + animation = scheme + } + + right_portrait = { + character = scope:special_guest + animation = idle + trigger = { + exists = scope:special_guest + } + } + + option = { + name = bp3_roaming.0010.a + stress_impact = { + base = roaming_outro_stress_loss_value + athletic = medium_stress_impact_loss + lifestyle_traveler = minor_stress_impact_loss + } + if = { + limit = { + has_trait = depressed_1 + has_character_flag = roaming_very_strong_stress_loss + } + remove_trait = depressed_1 + } + } + + after = { + remove_character_flag = roaming_weak_stress_loss + remove_character_flag = roaming_medium_stress_loss + remove_character_flag = roaming_strong_stress_loss + remove_character_flag = roaming_very_strong_stress_loss + } +} + +### Mid-Activity Events +# The View (Mountains/Hills/Desert Mountains) +bp3_roaming.0050 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0050.t + desc = bp3_roaming.0050.desc + theme = roaming_activity + + left_portrait = { + character = scope:host + animation = survey_staff + } + + right_portrait = { + character = scope:special_guest + animation = idle + trigger = { + exists = scope:special_guest + } + } + + trigger = { + location = { + OR = { + terrain = mountains + terrain = hills + terrain = desert_mountains + } + } + } + + option = { + name = bp3_roaming.0050.a + roaming_progress_events_reward_effect = { LOG_KEY = breathtaking_view_key } + } +} + +# The Oasis (Oasis/Desert/Drylands) +bp3_roaming.0060 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0060.t + desc = bp3_roaming.0060.desc + theme = roaming_activity + + override_background = { reference = ce1_legendary_oasis } + + left_portrait = { + character = scope:host + animation = survey_staff + } + + right_portrait = { + character = scope:special_guest + animation = idle + trigger = { + exists = scope:special_guest + } + } + + trigger = { + location = { + OR = { + terrain = oasis + terrain = desert + terrain = drylands + } + } + } + + option = { + name = bp3_roaming.0060.a + roaming_progress_events_reward_effect = { LOG_KEY = the_oasis_key } + } +} + +# The Path's End (Forest/Taiga/Jungle) +bp3_roaming.0070 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0070.t + desc = { + desc = bp3_roaming.0070.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_government = landless_adventurer_government + } + desc = bp3_roaming.0070.desc.landless + } + desc = bp3_roaming.0070.desc.landed + } + } + theme = roaming_activity + + override_background = { + trigger = { + location = { terrain = jungle } + } + reference = wilderness_jungle + } + + override_background = { + trigger = { + location = { has_winter_trigger = no } + } + reference = wilderness_forest_pine + } + + left_portrait = { + character = scope:host + animation = scheme + } + + right_portrait = { + character = scope:special_guest + animation = idle + trigger = { + exists = scope:special_guest + } + } + + trigger = { + location = { + OR = { + terrain = forest + terrain = taiga + terrain = jungle + } + } + } + + option = { + name = bp3_roaming.0070.a + roaming_progress_events_reward_effect = { LOG_KEY = paths_end_key } + } +} + +# The Ocean Scent (Fallback for ocean adjacent provinces) +bp3_roaming.0080 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0080.t + desc = bp3_roaming.0080.desc + theme = roaming_activity + + override_background = { reference = bp3_coast } + + left_portrait = { + character = scope:host + animation = survey_staff + } + + right_portrait = { + character = scope:special_guest + animation = idle + trigger = { + exists = scope:special_guest + } + } + + trigger = { + location = { + is_coastal = yes + } + } + + option = { + name = bp3_roaming.0080.a + roaming_progress_events_reward_effect = { LOG_KEY = ocean_scent_key } + } +} + +# The River at Journey's End (Fallback for terrain that hasn't been covered) +bp3_roaming.0090 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0090.t + desc = bp3_roaming.0090.desc + theme = roaming_activity + + override_background = { reference = ce1_legendary_spring } + + left_portrait = { + character = scope:host + animation = survey_staff + } + + right_portrait = { + character = scope:special_guest + animation = idle + trigger = { + exists = scope:special_guest + } + } + + trigger = { + location = { + is_coastal = no + NOR = { + terrain = mountains + terrain = hills + terrain = desert_mountains + terrain = oasis + terrain = desert + terrain = drylands + terrain = forest + terrain = taiga + terrain = jungle + } + } + } + + option = { + name = bp3_roaming.0090.a + roaming_progress_events_reward_effect = { LOG_KEY = river_journeys_end_key } + } +} + +### Random Events +# Meeting a Stranger +bp3_roaming.0100 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0100.t + desc = { + desc = bp3_roaming.0100.desc + triggered_desc = { + desc = bp3_roaming.0100.desc.companion + trigger = { + exists = scope:special_guest + } + } + } + theme = roaming_activity + + left_portrait = { + character = scope:host + animation = survey_staff + } + + center_portrait = { + character = scope:special_guest + animation = happiness + } + + right_portrait = { + character = scope:ancient_traveler + animation = scheme + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = roaming_mystic_intent + } + factor = 1.5 + } + } + + immediate = { + save_scope_value_as = { + name = trait_xp + value = { integer_range = { min = 3 max = 5 } } + } + create_character = { + location = root.location + gender_female_chance = { + if = { + limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + template = ancient_forest_traveler_character + save_scope_as = ancient_traveler + } + } + + option = { + name = bp3_roaming.0100.a + flavor = bp3_roaming.0100.a.flavor + scope:ancient_traveler = { silent_disappear_ai_if_not_hired = yes } + if = { + limit = { + has_trait = lifestyle_mystic + } + involved_activity = { + add_activity_log_entry = { + key = roaming_pondering_stone_mystic_key + tags = { activity_log } + character = scope:host + root = { + add_trait_xp = { + trait = lifestyle_mystic + value = scope:trait_xp + } + } + } + } + roaming_tally_variable_effect = { TYPE = mystic_xp VALUE = scope:trait_xp } + } + random_list = { + 10 = { + trigger = { NOT = { has_character_modifier = pondering_rulership_modifier } } + roaming_pondering_stone_effect = { TYPE = rulership } + } + 10 = { + trigger = { NOT = { has_character_modifier = pondering_religion_modifier } } + roaming_pondering_stone_effect = { TYPE = religion } + } + 10 = { + trigger = { NOT = { has_character_modifier = pondering_war_modifier } } + roaming_pondering_stone_effect = { TYPE = war } + } + 10 = { + trigger = { NOT = { has_character_modifier = pondering_schemes_modifier } } + roaming_pondering_stone_effect = { TYPE = schemes } + } + 10 = { + trigger = { NOT = { has_character_modifier = pondering_management_modifier } } + roaming_pondering_stone_effect = { TYPE = management } + } + 10 = { + trigger = { NOT = { has_character_modifier = pondering_travel_modifier } } + roaming_pondering_stone_effect = { TYPE = travel } + } + 10 = { + trigger = { NOT = { has_trait = lifestyle_mystic } } + involved_activity = { + add_activity_log_entry = { + key = roaming_pondering_stone_key + tags = { activity_log } + character = scope:host + root = { + add_trait = lifestyle_mystic + set_variable = roaming_tally_mystic + } + } + } + } + } + + stress_impact = { lifestyle_mystic = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = lifestyle_mystic VALUE = minor_stress_impact_loss } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = lifestyle_mystic + } + } + } + + option = { + name = bp3_roaming.0100.b + involved_activity = { + add_activity_log_entry = { + key = roaming_resting_stone_key + tags = { activity_log } + character = scope:host + root = { + stress_impact = { + base = minor_stress_impact_loss + athletic = medium_stress_gain + lazy = medium_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = athletic VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = lazy VALUE = medium_stress_impact_loss } + } + } + } + + scope:ancient_traveler = { silent_disappear_ai_if_not_hired = yes } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = athletic + } + } + } + + option = { + name = bp3_roaming.0100.c + flavor = bp3_roaming.0100.c.flavor + duel = { + skill = learning + target = scope:ancient_traveler + 50 = { + desc = bp3_roaming.0100.c.win + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + involved_activity = { + add_activity_log_entry = { + key = roaming_old_man_key + tags = { activity_log } + character = scope:host + root = { + send_interface_toast = { + type = event_generic_good + title = bp3_roaming.0100.c.win + left_icon = root + add_learning_lifestyle_xp = 250 + roaming_tally_variable_effect = { + TYPE = learning_lifestyle_xp + VALUE = 250 + } + add_learning_skill = 1 + roaming_tally_variable_effect = { + TYPE = learning_skill + VALUE = 1 + } + } + } + } + } + } + 50 = { + desc = bp3_roaming.0100.c.neutral + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + involved_activity = { + add_activity_log_entry = { + key = roaming_old_man_key + tags = { activity_log } + character = scope:host + root = { + send_interface_toast = { + type = event_generic_neutral + title = bp3_roaming.0100.c.neutral + add_visiting_courtier = scope:ancient_traveler + } + } + } + } + } + 50 = { + desc = bp3_roaming.0100.c.loss + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -49 + } + involved_activity = { + add_activity_log_entry = { + key = roaming_old_man_key + tags = { activity_log } + character = scope:host + root = { + send_interface_toast = { + type = event_generic_bad + title = bp3_roaming.0100.c.loss + } + } + } + } + } + } + stress_impact = { + gregarious = minor_stress_impact_loss + shy = medium_stress_gain + } + roaming_tally_stress_impact_effect = { TRAIT = gregarious VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = shy VALUE = medium_stress_gain } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + } + } + } + + option = { + name = bp3_roaming.0100.d + trigger = { + has_trait = lifestyle_poet + } + involved_activity = { + add_activity_log_entry = { + key = roaming_ancient_traveler_poet_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + stress_impact = { + honest = medium_stress_gain + deceitful = minor_stress_impact_loss + } + roaming_tally_stress_impact_effect = { TRAIT = honest VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = deceitful VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + has_trait = lifestyle_poet + } + modifier = { + factor = 0 + has_trait = honest + } + } + } +} + +# Normal Animal Sighting +bp3_roaming.0110 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0110.t + desc = { + desc = bp3_roaming.0110.desc + triggered_desc = { + trigger = { + exists = scope:special_guest + } + desc = bp3_roaming.0110.desc.companion + } + } + theme = roaming_activity + + override_background = { + trigger = { + location = { + terrain = forest + has_winter_trigger = no + } + } + reference = ep2_hunt_foggy_forest + } + + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + OR = { + scope:sighting_county = { + OR = { + var:animal_type = flag:fox + var:animal_type = flag:hare + } + } + has_trait = lifestyle_hunter + prowess >= 25 + } + } + animation = personality_bold + } + triggered_animation = { + trigger = { + NOR = { + scope:sighting_county = { + OR = { + var:animal_type = flag:fox + var:animal_type = flag:hare + } + } + has_trait = lifestyle_hunter + prowess >= 25 + } + } + animation = paranoia + } + } + + center_portrait = { + character = scope:special_guest + animation = fear + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = roaming_storyteller_intent + } + factor = 1.5 + } + } + + override_effect_2d = { + reference = rain + trigger = { + location = { + tropical_seasons_region_trigger = yes + middle_of_year_season_trigger = yes + } + } + } + + widget = { + is_shown = { + location = { has_winter_trigger = yes } + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + override_effect_2d = { + reference = fog + trigger = { + location = { + has_winter_trigger = no + NAND = { + tropical_seasons_region_trigger = yes + middle_of_year_season_trigger = yes + } + } + } + } + + trigger = { + NOT = { + any_sub_realm_county = { has_county_modifier = hunt_sighting_standard_modifier } + } + } + + immediate = { + location = { save_scope_as = sighting_province } + location.county = { + save_scope_as = sighting_county + hunt_activity_standard_game_effect = { PROVINCE = scope:sighting_province HUNTER = root } + } + } + + option = { + name = bp3_roaming.0110.a + involved_activity = { + add_activity_log_entry = { + key = roaming_animal_sighting_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + scope:sighting_county = { + # Create new sighting + hunt_create_sighting_effect = { + TYPE = standard + ANIMAL = var:animal_type + OWNER = root + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + OR = { + has_trait = lifestyle_hunter + has_trait = athletic + } + } + } + } + + option = { + name = { + text = bp3_roaming.0110.b.weakling + trigger = { + NOR = { + scope:sighting_county = { + OR = { + var:animal_type = flag:fox + var:animal_type = flag:hare + } + } + has_trait = lifestyle_hunter + prowess >= 25 + } + } + } + name = { + text = bp3_roaming.0110.b.hunter + trigger = { + OR = { + scope:sighting_county = { + OR = { + var:animal_type = flag:fox + var:animal_type = flag:hare + } + } + has_trait = lifestyle_hunter + prowess >= 25 + } + } + } + involved_activity = { + add_activity_log_entry = { + key = roaming_animal_sighting_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + stress_impact = { base = medium_stress_impact_loss } + roaming_tally_variable_effect = { TYPE = stress VALUE = medium_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_roaming.0110.c + trigger = { + has_trait = lifestyle_poet + } + involved_activity = { + add_activity_log_entry = { + key = roaming_animal_sighting_poet_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_very_high } + stress_impact = { + honest = medium_stress_gain + deceitful = minor_stress_impact_loss + } + roaming_tally_stress_impact_effect = { TRAIT = honest VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = deceitful VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + has_trait = lifestyle_poet + } + } + } +} + +# Legendary Animal Sighting +bp3_roaming.0120 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0120.t + desc = { + desc = bp3_roaming.0120.desc + triggered_desc = { + desc = bp3_roaming.0120.desc.companion + trigger = { + exists = scope:special_guest + } + } + } + theme = roaming_activity + + override_background = { + trigger = { + location = { + terrain = forest + has_winter_trigger = no + } + } + reference = ep2_hunt_foggy_forest + } + + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + OR = { + scope:sighting_county = { + OR = { + var:animal_type = flag:fox + var:animal_type = flag:hare + } + } + has_trait = lifestyle_hunter + prowess >= 25 + } + } + animation = personality_bold + } + triggered_animation = { + trigger = { + NOR = { + scope:sighting_county = { + OR = { + var:animal_type = flag:fox + var:animal_type = flag:hare + } + } + has_trait = lifestyle_hunter + prowess >= 25 + } + } + animation = paranoia + } + } + + center_portrait = { + character = scope:special_guest + animation = fear + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = roaming_storyteller_intent + } + factor = 1.5 + } + } + + override_effect_2d = { + reference = rain + trigger = { + location = { + tropical_seasons_region_trigger = yes + middle_of_year_season_trigger = yes + } + } + } + + widget = { + is_shown = { + location = { has_winter_trigger = yes } + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + override_effect_2d = { + reference = fog + trigger = { + location = { + has_winter_trigger = no + NAND = { + tropical_seasons_region_trigger = yes + middle_of_year_season_trigger = yes + } + } + } + } + + trigger = { + NOT = { + any_sub_realm_county = { + has_county_modifier = hunt_sighting_legendary_modifier + } + } + } + + immediate = { + location = { save_scope_as = sighting_province } + location.county = { + save_scope_as = sighting_county + hunt_activity_standard_game_effect = { PROVINCE = scope:sighting_province HUNTER = root } + } + } + + option = { + name = bp3_roaming.0120.a + involved_activity = { + add_activity_log_entry = { + key = roaming_legendary_sighting_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_very_high } + scope:sighting_county = { + # Create new sighting + hunt_create_sighting_effect = { + TYPE = legendary + ANIMAL = var:animal_type + OWNER = root + } + } + } + } + } + start_hunt_mystical_animal_story_cycle_effect = yes + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + OR = { + has_trait = lifestyle_hunter + has_trait = athletic + } + } + } + } + + option = { + name = bp3_roaming.0120.b + involved_activity = { + add_activity_log_entry = { + key = roaming_legendary_sighting_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_very_high } + stress_impact = { base = massive_stress_impact_loss } + roaming_tally_variable_effect = { TYPE = stress VALUE = massive_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + stress > 90 + } + } + } + + option = { + name = bp3_roaming.0120.c + trigger = { + has_trait = lifestyle_poet + } + involved_activity = { + add_activity_log_entry = { + key = roaming_legendary_sighting_poet_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_legendary } + stress_impact = { + honest = medium_stress_gain + deceitful = minor_stress_impact_loss + } + roaming_tally_stress_impact_effect = { TRAIT = honest VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = deceitful VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + has_trait = lifestyle_poet + } + } + } +} + +# A Battlefield Forgotten +bp3_roaming.0130 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0130.t + desc = { + desc = bp3_roaming.0130.desc + triggered_desc = { + desc = bp3_roaming.0130.desc.companion + trigger = { + exists = scope:special_guest + } + } + } + theme = battle + + left_portrait = { + character = scope:host + animation = worry + } + + center_portrait = { + character = scope:special_guest + animation = fear + } + + override_effect_2d = { + reference = fog + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = roaming_storyteller_intent + factor = 1.5 + } + } + + option = { + name = bp3_roaming.0130.a + involved_activity = { + add_activity_log_entry = { + key = roaming_battlefield_prayer_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + + add_piety = medium_piety_gain + roaming_tally_variable_effect = { TYPE = piety VALUE = medium_piety_gain } + + stress_impact = { + compassionate = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + roaming_tally_stress_impact_effect = { TRAIT = compassionate VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = zealous VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + OR = { + has_trait = zealous + has_trait = compassionate + } + } + } + } + + option = { + name = bp3_roaming.0130.b + + involved_activity = { + add_activity_log_entry = { + key = roaming_battlefield_scavenging_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + + add_gold = minor_gold_value + roaming_tally_variable_effect = { TYPE = gold VALUE = minor_gold_value } + + stress_impact = { + greedy = minor_stress_impact_loss + compassionate = minor_stress_gain + generous = medium_stress_gain + } + roaming_tally_stress_impact_effect = { TRAIT = greedy VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = compassionate VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = generous VALUE = medium_stress_gain } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + } + } + } + } + + option = { + name = bp3_roaming.0130.c + trigger = { + has_trait = lifestyle_poet + } + involved_activity = { + add_activity_log_entry = { + key = roaming_battlefield_poet_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_very_high } + + stress_impact = { + honest = medium_stress_gain + deceitful = minor_stress_impact_loss + } + roaming_tally_stress_impact_effect = { TRAIT = honest VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = deceitful VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + has_trait = lifestyle_poet + } + } + } +} + +# A Night in the Wilds +bp3_roaming.0140 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0140.t + desc = { + desc = bp3_roaming.0140.desc + triggered_desc = { + desc = bp3_roaming.0140.desc.companion + trigger = { + exists = scope:special_guest + } + } + } + theme = roaming_activity + override_background = { reference = ep3_campfire } + + left_portrait = { + character = scope:host + animation = paranoia + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = roaming_mystic_intent + factor = 1.5 + } + } + + immediate = { + save_scope_value_as = { + name = trait_xp + value = { integer_range = { min = 5 max = 8 } } + } + } + + option = { + name = bp3_roaming.0140.a + involved_activity = { + add_activity_log_entry = { + key = roaming_night_scare_key + tags = { activity_log } + character = root + root = { + stress_impact = { + base = miniscule_stress_gain + } + roaming_tally_variable_effect = { TYPE = stress VALUE = miniscule_stress_gain } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = content + } + } + } + + option = { + name = bp3_roaming.0140.b + involved_activity = { + random_list = { + 50 = { + desc = bp3_roaming.0140.b.2 + add_activity_log_entry = { + key = roaming_night_sleep_key + tags = { activity_log } + character = root + root = { + send_interface_toast = { + type = event_generic_good + title = bp3_roaming.0140.b.2 + left_icon = root + stress_impact = { + base = minor_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = minor_stress_impact_loss } + } + } + } + } + 50 = { + desc = bp3_roaming.0140.b.1 + add_activity_log_entry = { + key = roaming_night_threat_key + tags = { activity_log } + character = root + root = { + send_interface_toast = { + type = event_generic_bad + title = bp3_roaming.0140.b.1 + left_icon = root + stress_impact = { + base = minor_stress_gain + } + roaming_tally_variable_effect = { TYPE = stress VALUE = minor_stress_gain } + } + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = paranoid + } + } + } + + option = { + name = bp3_roaming.0140.c + trigger = { + has_trait = lifestyle_poet + } + + involved_activity = { + add_activity_log_entry = { + key = roaming_night_poet_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + + stress_impact = { + base = miniscule_stress_gain + honest = medium_stress_gain + deceitful = minor_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = miniscule_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = honest VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = deceitful VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + has_trait = lifestyle_poet + } + } + } + + option = { + name = bp3_roaming.0140.d + + trigger = { + has_trait = lifestyle_mystic + } + + involved_activity = { + add_activity_log_entry = { + key = roaming_night_mystic_key + tags = { activity_log } + character = root + root = { + add_trait_xp = { + trait = lifestyle_mystic + value = scope:trait_xp + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + has_trait = lifestyle_mystic + } + } + } +} + +# A Quiet Pond +bp3_roaming.0150 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0150.t + desc = { + desc = bp3_roaming.0150.desc + triggered_desc = { + desc = bp3_roaming.0150.desc.no_companion + trigger = { + NOT = { exists = scope:special_guest } + } + } + triggered_desc = { + desc = bp3_roaming.0150.desc.companion + trigger = { + exists = scope:special_guest + } + } + } + theme = roaming_activity + override_background = { + reference = ce1_legendary_oasis + trigger = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + } + } + override_background = { + reference = ce1_legendary_spring + trigger = { + location = { + NOR = { + terrain = desert + terrain = desert_mountains + } + } + } + } + + left_portrait = { + character = scope:host + animation = survey_staff + } + + center_portrait = { + character = scope:special_guest + animation = happiness + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = reduce_stress_intent + factor = 1.5 + } + } + + option = { + name = bp3_roaming.0150.a + + involved_activity = { + add_activity_log_entry = { + key = roaming_quiet_pond_key + tags = { activity_log } + character = root + root = { + stress_impact = { + base = minor_stress_impact_loss + lazy = minor_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = lazy VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = lazy + } + } + } + + option = { + name = bp3_roaming.0150.b + trigger = { + has_trait = lifestyle_poet + } + + involved_activity = { + add_activity_log_entry = { + key = roaming_quiet_pond_poet_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + + stress_impact = { + honest = medium_stress_gain + deceitful = minor_stress_impact_loss + } + roaming_tally_stress_impact_effect = { TRAIT = honest VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = deceitful VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + has_trait = lifestyle_poet + } + } + } +} + +# The Ruined Building +bp3_roaming.0160 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0160.t + desc = { + desc = bp3_roaming.0160.desc + triggered_desc = { + desc = bp3_roaming.0160.desc.no_companion + trigger = { + NOT = { exists = scope:special_guest } + } + } + triggered_desc = { + desc = bp3_roaming.0160.desc.companion + trigger = { + exists = scope:special_guest + } + } + desc = bp3_roaming.0160.desc.outro + } + theme = roaming_activity + override_background = { + reference = burning_building_west + } + + override_effect_2d = { + reference = smoke + } + + left_portrait = { + character = scope:host + animation = disbelief + } + + center_portrait = { + character = scope:special_guest + animation = fear + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + } + + option = { + name = bp3_roaming.0160.a + involved_activity = { + add_activity_log_entry = { + key = roaming_burning_farm_piety_key + tags = { activity_log } + character = root + root = { + add_piety = medium_piety_gain + roaming_tally_variable_effect = { TYPE = piety VALUE = medium_piety_gain } + + stress_impact = { + compassionate = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + roaming_tally_stress_impact_effect = { TRAIT = compassionate VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = zealous VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { + name = bp3_roaming.0160.b + involved_activity = { + add_activity_log_entry = { + key = roaming_burning_farm_greedy_key + tags = { activity_log } + character = root + root = { + add_gold = tiny_gold_value + roaming_tally_variable_effect = { TYPE = gold VALUE = tiny_gold_value } + + stress_impact = { + greedy = minor_stress_impact_loss + compassionate = minor_stress_gain + generous = medium_stress_gain + } + roaming_tally_stress_impact_effect = { TRAIT = greedy VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = compassionate VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = generous VALUE = medium_stress_gain } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + } + } + } + } + + option = { + name = bp3_roaming.0160.c + trigger = { + has_trait = lifestyle_poet + } + + involved_activity = { + add_activity_log_entry = { + key = roaming_burning_farm_poet_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 10 + has_trait = lifestyle_poet + } + } + } +} + +# A Quiet Day +bp3_roaming.0170 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0170.t + desc = { + desc = bp3_roaming.0170.desc + triggered_desc = { + desc = bp3_roaming.0170.desc.no_companion + trigger = { + NOT = { exists = scope:special_guest } + } + } + triggered_desc = { + desc = bp3_roaming.0170.desc.companion + trigger = { + exists = scope:special_guest + } + } + } + theme = roaming_activity + + cooldown = { months = 3 } + + left_portrait = { + character = scope:host + animation = happiness + } + + right_portrait = { + character = scope:special_guest + animation = laugh + } + + override_effect_2d = { + reference = legend_glow + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = roaming_befriend_intent + } + factor = 1.5 + } + } + + option = { + name = bp3_roaming.0170.a + roaming_progress_events_reward_effect = { LOG_KEY = roaming_quiet_day_key } + } +} + +# Are we there yet? +bp3_roaming.0180 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0180.t + desc = bp3_roaming.0180.desc + theme = roaming_activity + + left_portrait = { + character = scope:host + animation = happiness + } + + right_portrait = { + character = scope:special_guest + animation = disappointed + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = roaming_befriend_intent + } + factor = 1.5 + } + } + + trigger = { + scope:special_guest ?= { + OR = { + age <= 16 + has_trait = lazy + has_trait = impatient + current_weight > 50 + } + } + NOR = { + has_trait = lazy + has_trait = impatient + } + } + + option = { + name = bp3_roaming.0180.a + involved_activity = { + add_activity_log_entry = { + key = roaming_tired_mutterings_lies_key + tags = { activity_log } + character = root + root = { + stress_impact = { + base = minor_stress_impact_loss + honest = medium_stress_gain + deceitful = medium_stress_impact_loss + callous = minor_stress_impact_loss + } + roaming_tally_variable_effect = { TYPE = stress VALUE = medium_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = honest VALUE = medium_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = deceitful VALUE = medium_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = callous VALUE = minor_stress_impact_loss } + } + } + } + random = { + chance = 10 + involved_activity = { + add_activity_log_entry = { + key = roaming_tired_mutterings_athletic_key + tags = { activity_log } + character = root + root = { + send_interface_toast = { + type = event_generic_good + title = bp3_roaming.0180.a_short + left_icon = root + add_trait = athletic + set_variable = roaming_tally_athletic + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = honest + } + } + } + + option = { + name = bp3_roaming.0180.b + involved_activity = { + add_activity_log_entry = { + key = roaming_tired_mutterings_break_key + tags = { activity_log } + character = scope:special_guest + scope:special_guest = { + reverse_add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 15 + } + roaming_tally_variable_effect = { TYPE = opinion VALUE = 15 } + } + root = { + reverse_add_opinion = { + modifier = friendliness_opinion + target = scope:special_guest + opinion = 15 + } + roaming_tally_variable_effect = { TYPE = opinion VALUE = 15 } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = athletic + has_trait = callous + } + } + } + } +} + +# A chance to talk +bp3_roaming.0190 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0190.t + desc = bp3_roaming.0190.desc + theme = roaming_activity + + left_portrait = { + character = scope:host + animation = happiness + } + + right_portrait = { + character = scope:special_guest + animation = laugh + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = roaming_befriend_intent + factor = 1.5 + } + } + + trigger = { + exists = scope:special_guest + } + + immediate = { + random_courtier_or_guest = { + limit = { + NOR = { + this = root + this = scope:special_guest + } + age > 5 + } + save_scope_as = random_courtier + } + } + + option = { + name = bp3_roaming.0190.a + involved_activity = { + add_activity_log_entry = { + key = roaming_chance_to_talk_key + tags = { activity_log } + character = root + scope:special_guest = { + reverse_add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 20 + } + roaming_tally_variable_effect = { TYPE = opinion VALUE = 20 } + } + root = { + reverse_add_opinion = { + modifier = friendliness_opinion + target = scope:special_guest + opinion = 20 + } + roaming_tally_variable_effect = { TYPE = opinion VALUE = 20 } + } + } + } + } +} + +# Astronomical Sight +bp3_roaming.0200 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0200.t + desc = bp3_roaming.0200.desc + theme = roaming_activity + + override_background = { + reference = bp1_bonfire + } + + left_portrait = { + character = scope:host + animation = happiness + } + + right_portrait = { + character = scope:special_guest + animation = admiration + } + + cooldown = { years = 1 } + + option = { + name = bp3_roaming.0200.a + involved_activity = { + add_activity_log_entry = { + key = roaming_nightsky_canvas_key + tags = { activity_log } + character = root + scope:host = { + stress_impact = { + base = medium_stress_impact_loss + zealous = medium_stress_impact_loss + } + add_wanderer_lifestyle_xp = 500 + roaming_tally_stress_impact_effect = { TRAIT = zealous VALUE = medium_stress_impact_loss } + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_very_high } + } + } + } + } +} + +# The Birds Overhead +bp3_roaming.0210 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0210.t + desc = bp3_roaming.0210.desc + theme = roaming_activity + + left_portrait = { + character = scope:host + animation = survey_staff + } + + right_portrait = { + character = scope:special_guest + animation = happiness + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = roaming_befriend_intent + has_activity_intent = roaming_storyteller_intent + } + factor = 1.5 + } + } + + option = { + name = bp3_roaming.0210.a + roaming_progress_events_reward_effect = { LOG_KEY = the_birds_overhead_key } + } +} + +# The Forgotten Village +bp3_roaming.0220 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0220.t + desc = bp3_roaming.0220.desc + theme = roaming_activity + + override_background = { reference = market_tribal } + + left_portrait = { + character = scope:host + animation = shock + } + + right_portrait = { + character = scope:peasant_character + hide_info = yes + animation = dismissal + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = roaming_mystic_intent + } + } + + immediate = { + create_character = { + template = peasant_character + faith = scope:province.faith + culture = scope:province.culture + gender = root + location = scope:province + save_scope_as = peasant_character + } + } + + option = { + name = { + trigger = { + is_landless_adventurer = no + } + text = bp3_roaming.0220.a + } + name = { + trigger = { + has_government = landless_adventurer_government + } + text = bp3_roaming.0220.a.landless + } + involved_activity = { + add_activity_log_entry = { + key = the_forgotten_village_key + tags = { activity_log } + character = root + root = { + roaming_gold_reward_APA_effect = { REWARD = tiny_gold_value } + stress_impact = { + greedy = minor_stress_impact_loss + generous = minor_stress_gain + } + roaming_tally_stress_impact_effect = { TRAIT = greedy VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = generous VALUE = minor_stress_gain } + if = { + limit = { + has_government = landless_adventurer_government + NOT = { has_trait = gallowsbait } + } + add_trait = gallowsbait + } + else_if = { + limit = { + has_government = landless_adventurer_government + has_trait = gallowsbait + } + add_trait_xp = { + trait = gallowsbait + track = thief + value = 5 + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = greedy + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + option = { + name = bp3_roaming.0220.b + involved_activity = { + add_activity_log_entry = { + key = the_forgotten_village_key + tags = { activity_log } + character = root + root = { + scope:province = { + add_province_modifier = { + modifier = roaming_forgotten_village_modifier + years = 10 + } + } + stress_impact = { + lifestyle_mystic = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + roaming_tally_stress_impact_effect = { TRAIT = lifestyle_mystic VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = gregarious VALUE = minor_stress_impact_loss } + } + } + } + + random = { + chance = roaming_mystic_chance_value + involved_activity = { + add_activity_log_entry = { + key = the_forgotten_village_mystic_key + tags = { activity_log } + character = root + root = { + send_interface_message = { + type = event_generic_good + title = bp3_roaming.0220.b.mystic + + roaming_mystic_xp_APA_effect = { REWARD = 3 } + if = { + limit = { + NOT = { has_trait = lifestyle_mystic } + } + add_trait = lifestyle_mystic + } + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + OR = { + has_trait = gregarious + has_trait = lifestyle_mystic + } + } + } + } + + option = { + name = bp3_roaming.0220.c + involved_activity = { + add_activity_log_entry = { + key = the_forgotten_village_key + tags = { activity_log } + character = root + root = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + stress_impact = { lifestyle_poet = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = lifestyle_poet VALUE = minor_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = lifestyle_poet + } + } + } + + after = { + scope:peasant_character = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +# The Hermit +bp3_roaming.0230 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0230.t + desc = bp3_roaming.0230.desc + theme = roaming_activity + + left_portrait = { + character = scope:host + animation = boredom + } + + right_portrait = { + character = scope:hermit_character + animation = debating + } + + cooldown = { months = 3 } + + trigger = { + scope:province.religion = { + any_faith = { + this != root.faith + num_county_followers < 3 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + has_activity_intent = roaming_mystic_intent + } + } + + immediate = { + scope:province.religion = { + random_faith = { + limit = { + this != root.faith + num_county_followers < 3 + } + save_scope_as = hermit_faith + } + } + create_character = { + template = peasant_character + faith = scope:hermit_faith + culture = scope:province.culture + gender = root + location = scope:province + save_scope_as = hermit_character + after_creation = { + add_trait = eccentric + add_character_flag = roaming_character + } + } + } + + option = { + name = bp3_roaming.0230.a + + involved_activity = { + add_activity_log_entry = { + key = the_hermit_key + tags = { activity_log } + character = root + root = { + add_character_modifier = { + modifier = roaming_the_hermit_modifier + years = 10 + } + stress_impact = { zealous = major_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = zealous VALUE = major_stress_gain } + } + } + } + + random = { + chance = roaming_mystic_chance_value + involved_activity = { + add_activity_log_entry = { + key = the_hermit_learning_key + tags = { activity_log } + character = root + root = { + send_interface_message = { + type = event_generic_good + title = bp3_roaming.0230.a.hermit + + roaming_mystic_xp_APA_effect = { REWARD = 3 } + if = { + limit = { + NOT = { has_trait = lifestyle_mystic } + } + add_trait = lifestyle_mystic + } + } + } + } + } + } + + scope:hermit_character = { + silent_disappear_ai_if_not_hired = yes + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = lifestyle_mystic + } + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + option = { + name = bp3_roaming.0230.b + trigger = { + NOR = { + any_secret = { type = secret_crypto_religionist } + exists = secret_faith + scope:hermit_faith = faith + } + } + + involved_activity = { + add_activity_log_entry = { + key = the_hermit_key + tags = { activity_log } + character = root + root = { + custom_tooltip = bp3_roaming.0230.b.tooltip + make_character_crypto_religionist_effect = { CRYPTO_RELIGION = scope:hermit_faith } + stress_impact = { zealous = major_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = zealous VALUE = major_stress_gain } + } + } + } + + scope:hermit_character = { + silent_disappear_ai_if_not_hired = yes + } + + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = lunatic + has_trait = eccentric + } + } + } + } + + option = { + name = bp3_roaming.0230.c + + involved_activity = { + add_activity_log_entry = { + key = the_hermit_key + tags = { activity_log } + character = root + root = { + add_piety = medium_piety_gain + roaming_tally_variable_effect = { TYPE = piety VALUE = medium_piety_gain } + + scope:hermit_character = { + death = { + death_reason = death_murder + killer = root + } + } + + stress_impact = { zealous = medium_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = zealous VALUE = medium_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = zealous + } + } + } +} + +# A Night to Remember +bp3_roaming.0240 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0240.t + desc = bp3_roaming.0240.desc + theme = roaming_activity + + override_background = { reference = ep3_campfire } + + left_portrait = { + character = scope:host + animation = stunned + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = roaming_storyteller_intent + has_activity_intent = roaming_mystic_intent + } + factor = 1.5 + } + } + + trigger = { + scope:province = { + NOT = { has_province_modifier = wayfarer_astronomical_phenomenon } + } + } + + option = { + name = bp3_roaming.0240.a + involved_activity = { + add_activity_log_entry = { + key = a_night_to_remember_key + tags = { activity_log } + character = root + root = { + if = { + limit = { + has_trait = lifestyle_mystic + has_activity_intent = roaming_mystic_intent + } + } + else = { + roaming_fame_reward_event_effect = { VALUE = roaming_reward_fame_medium } + } + stress_impact = { base = minor_stress_impact_loss } + roaming_tally_variable_effect = { TYPE = stress VALUE = minor_stress_impact_loss } + } + } + } + } +} + +# A Small Grave +bp3_roaming.0250 = { + type = activity_event + content_source = dlc_015 + title = bp3_roaming.0250.t + desc = bp3_roaming.0250.desc + theme = roaming_activity + + left_portrait = { + character = scope:host + animation = prayer + } + + cooldown = { months = 3 } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_value_as = { + name = randomized_chance + value = { integer_range = { min = 1 max = 20 } } + } + } + + option = { + name = bp3_roaming.0250.a + involved_activity = { + add_activity_log_entry = { + key = a_small_grave_key + tags = { activity_log } + character = root + root = { + add_piety = medium_piety_gain + roaming_tally_variable_effect = { TYPE = piety VALUE = medium_piety_gain } + stress_impact = { zealous = medium_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = zealous VALUE = medium_stress_impact_loss } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = zealous + } + } + } + + option = { + name = bp3_roaming.0250.b + add_piety = medium_piety_loss + roaming_tally_variable_effect = { TYPE = piety VALUE = medium_piety_loss } + show_as_tooltip = { + random_list = { + 1 = { + desc = no_treasure + show_chance = no + } + 1 = { + desc = small_treasure + show_chance = no + add_gold = tiny_gold_value + } + 1 = { + desc = medium_treasure + show_chance = no + add_gold = minor_gold_value + } + 1 = { + desc = large_treasure + show_chance = no + add_gold = medium_gold_value + custom_tooltip = bp3_roaming.0250.artifact + } + } + stress_impact = { greedy = medium_stress_impact_loss } + } + hidden_effect_new_object = { + involved_activity = { + add_activity_log_entry = { + key = a_small_grave_key + tags = { activity_log } + character = root + root = { + if = { + limit = { + scope:randomized_chance > 18 + } + hidden_effect = { + create_character = { + template = merchant_template + faith = scope:province.faith + culture = scope:province.culture + gender = root + location = scope:province + save_scope_as = blacksmith_character + } + scope:blacksmith_character = { + random_list = { + 1 = { + create_artifact_weapon_effect = { + OWNER = scope:blacksmith_character + CREATOR = scope:blacksmith_character + SET_WEAPON_TYPE = flag:no + } + } + 1 = { + create_artifact_armor_effect = { + OWNER = scope:blacksmith_character + CREATOR = scope:blacksmith_character + SET_ARMOR_TYPE = flag:no + } + } + 1 = { + create_artifact_brooch_effect = { + OWNER = scope:blacksmith_character + SMITH = scope:blacksmith_character + } + } + } + } + } + send_interface_message = { + type = event_generic_good + title = large_treasure + + scope:newly_created_artifact ?= { + set_owner = { + target = root + history = { + actor = root + recipient = root + location = scope:province + type = discovered + } + } + } + add_gold = medium_gold_value + } + } + else_if = { + limit = { + scope:randomized_chance > 13 + } + send_interface_message = { + type = event_generic_good + title = medium_treasure + + add_gold = minor_gold_value + } + } + else_if = { + limit = { + scope:randomized_chance > 7 + } + send_interface_message = { + type = event_generic_good + title = small_treasure + + add_gold = tiny_gold_value + } + } + else = { + send_interface_message = { + type = event_generic_good + title = no_treasure + } + } + stress_impact = { + greedy = minor_stress_impact_loss + generous = minor_stress_gain + zealous = minor_stress_gain + } + roaming_tally_stress_impact_effect = { TRAIT = greedy VALUE = minor_stress_impact_loss } + roaming_tally_stress_impact_effect = { TRAIT = generous VALUE = minor_stress_gain } + roaming_tally_stress_impact_effect = { TRAIT = zealous VALUE = minor_stress_gain } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = greedy + } + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = generous + } + } + } + } + + after = { + scope:blacksmith_character ?= { + silent_disappear_ai_if_not_hired = yes + } + } +} diff --git a/N3OW/events/dlc/bp3/bp3_survey_events.txt b/N3OW/events/dlc/bp3/bp3_survey_events.txt new file mode 100644 index 00000000..72f2f6ef --- /dev/null +++ b/N3OW/events/dlc/bp3/bp3_survey_events.txt @@ -0,0 +1,4489 @@ +namespace = bp3_survey + +### Setup Events +# Arrival Event +bp3_survey.0005 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.0005.t + desc = { + first_valid = { + triggered_desc = { + trigger = { root != root } + desc = bp3_survey.0005.desc.holder + } + desc = bp3_survey.0005.desc.no_holder + } + } + theme = survey_activity + + override_background = { + reference = study + } + + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + government_allows = merit + } + animation = holding_scrolls + } + animation = pondering + camera = camera_event_group_talking_left_left + } + + right_portrait = { + trigger = { scope:host != scope:county_holder } + character = scope:county_holder + animation = obsequious_bow + } + + immediate = { + if = { + limit = { + location.county.holder != root + } + location.county.holder = { + save_scope_as = county_holder + save_opinion_value_as = { + name = county_holder_opinion + target = root + } + trigger_event = bp3_survey.0050 + } + } + else = { save_scope_as = county_holder } + } + + option = { + name = bp3_survey.0005.a + trigger = { + location.county = { + any_neighboring_county = { + exists = holder + holder.top_liege != root.location.county.holder.top_liege + } + } + } + custom_tooltip = bp3_survey.0005.a.tt + set_variable = inspection_activity_border_focus + } + + option = { + name = bp3_survey.0005.b + custom_tooltip = bp3_survey.0005.b.tt + set_variable = inspection_activity_bureaucracy_focus + } + + option = { + name = bp3_survey.0005.c + custom_tooltip = bp3_survey.0005.c.tt + set_variable = inspection_activity_domain_focus + } +} + +# Ending Event +bp3_survey.0010 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.0010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:success + has_variable = inspection_activity_border_focus + } + desc = bp3_survey.0010.desc.border.success + } + triggered_desc = { + trigger = { + has_variable = inspection_activity_border_focus + } + desc = bp3_survey.0010.desc.border.failure + } + triggered_desc = { + trigger = { + exists = scope:success + has_variable = inspection_activity_bureaucracy_focus + } + desc = bp3_survey.0010.desc.bureaucracy.success + } + triggered_desc = { + trigger = { + has_variable = inspection_activity_bureaucracy_focus + } + desc = bp3_survey.0010.desc.bureaucracy.failure + } + triggered_desc = { + trigger = { + exists = scope:success + has_variable = inspection_activity_domain_focus + } + desc = bp3_survey.0010.desc.people.success + } + triggered_desc = { + trigger = { + has_variable = inspection_activity_domain_focus + } + desc = bp3_survey.0010.desc.people.failure + } + } + } + theme = survey_activity + + override_background = { + reference = study + } + + left_portrait = { + character = scope:host + triggered_animation = { + trigger = { + exists = scope:success + government_allows = merit + } + animation = toast_goblet + } + triggered_animation = { + trigger = { + exists = scope:success + } + animation = toast + } + triggered_animation = { + trigger = { + NOT = { exists = scope:success } + } + animation = disapproval + } + } + + right_portrait = { + character = scope:county_holder + triggered_animation = { + trigger = { + exists = scope:success + } + animation = drink + } + triggered_animation = { + trigger = { + NOT = { exists = scope:success } + } + animation = disappointed + } + } + + immediate = { + location = { save_scope_as = inspection_province } + location.county = { save_scope_as = inspection_location } + random = { # Check if Activity was a success or not + chance = root.involved_activity.var:inspection_success_chance + + save_scope_value_as = { + name = success + value = yes + } + } + scope:inspection_location.holder = { # Save the holder, if not liege, for Opinion check and for animation + if = { + limit = { + this != root + } + save_scope_as = county_holder + } + } + if = { # Save data needed for Claims/Vassal Acceptance, if you have the border focus + limit = { + has_variable = inspection_activity_border_focus + } + 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 + } + } + } + } + save_scope_as = claim_location + } + every_neighboring_county = { + limit = { + holder.top_liege != root.top_liege + holder.top_liege.highest_held_title_tier < root.highest_held_title_tier + } + holder = { add_to_list = independent_rulers } + } + } + } + } + + option = { + name = bp3_survey.0010.a + trigger = { + exists = scope:success + } + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + inspection_survey_intent_development = { VALUE = 15 } + if = { # If you have a Border Focus (Claims/Acceptance) + limit = { + has_variable = inspection_activity_border_focus + } + ### Claims + if = { # Focused on Claims + limit = { + has_variable = inspection_activity_border_claim_focus + } + scope:inspection_location = { + every_neighboring_county = { + limit = { + holder.top_liege != root.top_liege + OR = { + NOT = { root = { has_claim_on = prev } } + NOT = { root = { has_claim_on = prev.duchy } } + } + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_claim_key + show_in_conclusion = yes + character = root + prev = { + inspection_claim_effects = { + ACTOR = root + TARGET = prev + TYPE = pressed + } + inspection_claim_effects = { + ACTOR = root + TARGET = prev.duchy + TYPE = pressed + } + } + } + } + } + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_expansionist_mindset_key + show_in_conclusion = yes + character = root + root = { + add_character_modifier = { + modifier = inspection_reward_focused_claims_modifier + years = 15 + } + } + } + } + } + else = { # Not focused on Claims + scope:claim_location.duchy = { + if = { + limit = { + NOT = { + root = { has_claim_on = prev } + } + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_claim_key + show_in_conclusion = yes + character = root + prev = { + inspection_claim_effects = { + ACTOR = root + TARGET = prev + TYPE = unpressed + } + } + } + } + } + } + } + ### Vassal Acceptance + if = { # Focused on Vassal Acceptance + limit = { + has_variable = inspection_activity_border_vassal_focus + any_in_list = { + list = independent_rulers + count > 0 + } + } + every_in_list = { + list = independent_rulers + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_acceptance_key + show_in_conclusion = yes + character = root + prev = { custom_tooltip = bp3_survey.0010.acceptance.success } + } + } + add_to_variable_list = { + name = inspection_reward + target = root + years = 15 + } + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_impressed_neighbors_key + show_in_conclusion = yes + character = root + root = { + add_character_modifier = { + modifier = inspection_reward_focused_vassal_acceptance + years = 15 + } + } + } + } + } + else_if = { # Not focused on Vassal Acceptance + limit = { + any_in_list = { + list = independent_rulers + count > 0 + } + } + random_in_list = { + list = independent_rulers + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_acceptance_key + show_in_conclusion = yes + character = root + prev = { custom_tooltip = bp3_survey.0010.acceptance.success } + } + } + add_to_variable_list = { + name = inspection_reward + target = root + years = 15 + } + } + } + } + else_if = { # If you have Bureaucracy Focus (Tax/Development/Control) + limit = { + has_variable = inspection_activity_bureaucracy_focus + } + if = { # Focused on Taxes + limit = { + has_variable = inspection_activity_bureaucracy_tax_focus + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_tax_key + show_in_conclusion = yes + character = root + scope:inspection_province = { + add_province_modifier = { + modifier = inspection_reward_focused_tax_modifier + years = 15 + } + } + root = { add_treasury_or_gold = medium_treasury_or_gold_value } + } + } + inspection_survey_local_message_province_modifier = { + TYPE = message_good + MODIFIER = inspection_reward_focused_tax_modifier + YEARS = 15 + } + } + else = { # Not focused on Taxes + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_tax_key + show_in_conclusion = yes + character = root + scope:inspection_province = { + add_province_modifier = { + modifier = inspection_reward_average_tax_modifier + years = 15 + } + } + } + } + inspection_survey_local_message_province_modifier = { + TYPE = message_good + MODIFIER = inspection_reward_average_tax_modifier + YEARS = 15 + } + } + if = { # Focused on Development + limit = { + has_variable = inspection_activity_bureaucracy_development_focus + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_development_key + show_in_conclusion = yes + character = root + scope:inspection_location = { + add_county_modifier = { + modifier = inspection_reward_focused_development_modifier + years = 15 + } + change_development_progress_with_overflow = 50 + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_reward_focused_development_modifier + YEARS = 15 + } + } + else = { # Not focused on Development + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_development_key + show_in_conclusion = yes + character = root + scope:inspection_location = { + change_development_progress_with_overflow = 25 + } + } + } + } + if = { # Focused on Control + limit = { + has_variable = inspection_activity_bureaucracy_control_focus + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_control_key + show_in_conclusion = yes + character = root + scope:inspection_location = { + add_county_modifier = { + modifier = inspection_reward_focused_control_modifier + years = 15 + } + change_county_control = 10 + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_reward_focused_control_modifier + YEARS = 15 + } + } + else_if = { # Not focused on Control + limit = { + scope:inspection_location.county_control < 100 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_control_key + show_in_conclusion = yes + character = root + scope:inspection_location = { change_county_control = 5 } + } + } + } + } + else_if = { # If you have People Focus (Levy/Opinion/Popular Opinion) + limit = { + has_variable = inspection_activity_domain_focus + } + if = { # Focused on Levies + limit = { + has_variable = inspection_activity_domain_levy_focus + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_levy_key + show_in_conclusion = yes + character = root + scope:inspection_location = { + add_county_modifier = { + modifier = inspection_reward_focused_levy_modifier + years = 15 + } + } + root = { + spawn_army = { + name = local_militia_name_default + levies = inspection_levy_reward_value + location = scope:inspection_location.title_province + inheritable = no + war_keep_on_attacker_victory = yes + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_reward_focused_levy_modifier + YEARS = 15 + } + } + else = { # Not focused on Levies + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_levy_key + show_in_conclusion = yes + character = root + scope:inspection_location = { + add_county_modifier = { + modifier = inspection_reward_average_levy_modifier + years = 15 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_reward_average_levy_modifier + YEARS = 15 + } + } + if = { # Focused on Opinion + limit = { + has_variable = inspection_activity_domain_opinion_focus + } + if = { + limit = { + exists = root + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_opinion_key + show_in_conclusion = yes + character = root + root = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 20 + } + } + root = { + add_character_modifier = { + modifier = inspection_reward_focused_opinion_modifier + years = 15 + } + } + } + } + } + else = { + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_opinion_key + show_in_conclusion = yes + character = root + root = { + add_character_modifier = { + modifier = inspection_reward_focused_opinion_modifier + years = 15 + } + } + } + } + } + } + else_if = { # Not focused on Opinion + limit = { + exists = root + exists = scope:county_holder + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_opinion_key + show_in_conclusion = yes + character = root + root = { + reverse_add_opinion = { + modifier = friendliness_opinion + target = scope:county_holder + opinion = 10 + } + } + } + } + } + if = { # Focused on Popular Opinion + limit = { + has_variable = inspection_activity_domain_popular_focus + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_popular_opinion_key + show_in_conclusion = yes + character = root + scope:inspection_location = { + add_county_modifier = { + modifier = inspection_reward_focused_popular_opinion_modifier + years = 15 + } + } + root = { + add_character_modifier = { + modifier = inspection_reward_focused_popular_opinion_character_modifier + years = 15 + } + } + } + } + } + else = { # Not focused on Popular Opinion + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_popular_opinion_key + show_in_conclusion = yes + character = root + scope:inspection_location = { + add_county_modifier = { + modifier = inspection_reward_average_popular_opinion_modifier + years = 15 + } + } + } + } + } + } + + # As an admin governor, gain some governor trait XP + if = { + limit = { is_governor = yes } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_governor_experience_key + show_in_conclusion = yes + character = root + root = { increase_governance_effect = { VALUE = 10 } } + } + } + } + + # If you have Merit we give Merit + if = { + limit = { government_allows = merit } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_merit_key + show_in_conclusion = yes + character = root + root = { + change_merit = { + value = major_merit_gain + house ?= { + if = { + limit = { has_house_power_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 } + multiply = { + value = 1 + add = inspection_activity_merit_bonus_4_value + } + } + else_if = { + limit = { has_house_power_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 } + multiply = { + value = 1 + add = inspection_activity_merit_bonus_2_value + } + } + else_if = { + limit = { has_house_power_parameter = inspection_activity_merit_bonus_1 } + multiply = { + value = 1 + add = inspection_activity_merit_bonus_1_value + } + } + } + } + } + } + } + } + + # 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 } + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_salary_key + show_in_conclusion = yes + character = root + root = { + add_gold = medium_gold_value + add_character_modifier = { + modifier = tgp_aspiration_great_salary_modifier + years = 15 + } + hidden_effect = { + if = { + limit = { + has_character_modifier = tgp_aspiration_modest_salary_modifier + } + remove_character_modifier = tgp_aspiration_modest_salary_modifier + } + } + } + } + } + } + + if = { #Devotion for tenet + limit = { + faith = { has_doctrine_parameter = inspection_gives_devotion } + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_success_piety_key + show_in_conclusion = yes + character = root + root = { + add_piety_experience = medium_piety_value + } + } + } + } + + hidden_effect = { + scope:province = { + remove_province_modifier = inspection_second_try_modifier + remove_province_modifier = inspection_third_try_modifier + remove_province_modifier = inspection_fourth_try_modifier + } + } + } + + option = { + name = bp3_survey.0010.b + trigger = { + NOT = { exists = scope:success } + } + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + scope:province = { + if = { + limit = { + root = { is_ai = no } + NOT = { + has_province_modifier = inspection_fourth_try_modifier + } + } + if = { + limit = { + has_province_modifier = inspection_third_try_modifier + NOT = { has_province_modifier = inspection_fourth_try_modifier } + } + add_province_modifier = inspection_fourth_try_modifier + hidden_effect = { + remove_province_modifier = inspection_third_try_modifier + } + } + else_if = { + limit = { + has_province_modifier = inspection_second_try_modifier + NOT = { has_province_modifier = inspection_third_try_modifier } + } + add_province_modifier = inspection_third_try_modifier + hidden_effect = { + remove_province_modifier = inspection_second_try_modifier + } + } + else_if = { + limit = { + NOT = { has_province_modifier = inspection_second_try_modifier } + } + add_province_modifier = inspection_second_try_modifier + } + } + } + + if = { + limit = { + faith = { has_doctrine_parameter = inspection_gives_devotion } #Devotion for tenet + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_failure_devotion_key + show_in_conclusion = yes + character = root + root = { + add_piety_experience = minor_piety_value + } + } + } + } + + # If you have Merit we give Merit - but you gain less than if you were successful + if = { + limit = { government_allows = merit } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_failure_merit_key + show_in_conclusion = yes + character = root + root = { + change_merit = { + value = minor_merit_gain + house ?= { + if = { + limit = { has_house_power_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 } + multiply = { + value = 1 + add = inspection_activity_merit_bonus_4_value + } + } + else_if = { + limit = { has_house_power_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 } + multiply = { + value = 1 + add = inspection_activity_merit_bonus_2_value + } + } + else_if = { + limit = { has_house_power_parameter = inspection_activity_merit_bonus_1 } + multiply = { + value = 1 + add = inspection_activity_merit_bonus_1_value + } + } + } + } + } + } + } + } + + # 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 } + } + scope:activity = { + add_activity_log_entry = { + key = inspection_conclusion_failure_salary_key + show_in_conclusion = yes + character = root + root = { + add_gold = minor_gold_value + add_character_modifier = { + modifier = tgp_aspiration_modest_salary_modifier + years = 15 + } + hidden_effect = { + if = { + limit = { + has_character_modifier = tgp_aspiration_great_salary_modifier + } + remove_character_modifier = tgp_aspiration_great_salary_modifier + } + } + } + } + } + } + } +} + +### Mid Events +# Border Focus +bp3_survey.0020 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.0020.t + desc = { + desc = bp3_survey.0020.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:neighboring_lord + } + desc = bp3_survey.0020.desc_weak_neighbor + } + desc = bp3_survey.0020.desc_no_neighbor + } + } + theme = survey_activity + + override_background = { + reference = terrain_activity + } + + left_portrait = { + character = scope:host + animation = survey + } + + right_portrait = { + character = scope:neighboring_lord + animation = worry + } + + trigger = { + has_variable = inspection_activity_border_focus + } + + immediate = { + scope:province.county = { + random_neighboring_county = { + limit = { + holder.top_liege != prev.holder.top_liege + } + weight = { + base = 1 + modifier = { + factor = 100 + holder.top_liege = { + highest_held_title_tier < root.highest_held_title_tier + } + } + } + save_scope_as = neighboring_county + if = { + limit = { + holder.top_liege = { + highest_held_title_tier < root.highest_held_title_tier + } + } + holder = { save_scope_as = neighboring_lord } + } + } + } + } + + option = { + name = bp3_survey.0020.a + trigger = { + exists = scope:neighboring_lord + } + skill = diplomacy + custom_tooltip = bp3_survey.0020.a.tt + set_variable = inspection_activity_border_vassal_focus + duel = { + skill = diplomacy + value = 8 + 20 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -19 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_border_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 10 } + inspection_success_chance_change_effect = { CHANGE = increase_medium } + custom_tooltip = bp3_survey.0020.acceptance.great_success + } + } + } + scope:neighboring_lord = { + add_to_variable_list = { + name = inspection_bonus + target = root + years = 5 + } + } + } + 40 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_border_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 5 } + inspection_success_chance_change_effect = { CHANGE = increase_minor } + custom_tooltip = bp3_survey.0020.acceptance.success + } + } + } + scope:neighboring_lord = { + add_to_variable_list = { + name = lesser_inspection_bonus + target = root + years = 5 + } + } + } + 40 = { + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_border_fail_key + show_in_conclusion = yes + character = root + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + } + } + } + } + } + + option = { + name = bp3_survey.0020.b + skill = intrigue + custom_tooltip = bp3_survey.0020.b.tt + set_variable = inspection_activity_border_claim_focus + duel = { + skill = intrigue + value = 8 + 20 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -19 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_border_key + show_in_conclusion = yes + character = root + inspection_success_chance_change_effect = { CHANGE = increase_medium } + root = { + inspection_survey_intent_development = { VALUE = 10 } + add_pressed_claim = scope:neighboring_county + } + } + } + } + 40 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_border_key + show_in_conclusion = yes + character = root + inspection_success_chance_change_effect = { CHANGE = increase_minor } + root = { + inspection_survey_intent_development = { VALUE = 5 } + add_unpressed_claim = scope:neighboring_county + } + } + } + } + 40 = { + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_border_fail_key + show_in_conclusion = yes + character = root + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + } + } + } + } + } +} + +# Bureaucracy Focus +bp3_survey.0030 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.0030.t + desc = bp3_survey.0030.desc + theme = survey_activity + + override_background = { + reference = study + } + + left_portrait = { + character = scope:host + animation = writing + } + + trigger = { + has_variable = inspection_activity_bureaucracy_focus + } + + option = { + name = bp3_survey.0030.a + skill = stewardship + custom_tooltip = bp3_survey.0030.a.tt + set_variable = inspection_activity_bureaucracy_tax_focus + duel = { + skill = stewardship + value = 8 + 20 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -19 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 10 } + inspection_success_chance_change_effect = { CHANGE = increase_medium } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_tax_great_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_tax_great_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 5 } + inspection_success_chance_change_effect = { CHANGE = increase_minor } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_tax_average_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_tax_average_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_fail_key + show_in_conclusion = yes + character = root + root = { + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + } + } + } + } + } + } + + option = { + name = bp3_survey.0030.b + skill = learning + custom_tooltip = bp3_survey.0030.b.tt + set_variable = inspection_activity_bureaucracy_development_focus + duel = { + skill = learning + value = 8 + 20 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -19 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 10 } + inspection_success_chance_change_effect = { CHANGE = increase_medium } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_development_great_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_development_great_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 5 } + inspection_success_chance_change_effect = { CHANGE = + increase_minor } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_development_average_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_development_average_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_fail_key + show_in_conclusion = yes + character = root + root = { + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + } + } + } + } + } + } + + option = { + name = bp3_survey.0030.c + trigger = { + scope:province.county = { + county_control < 100 + } + } + skill = martial + custom_tooltip = bp3_survey.0030.c.tt + set_variable = inspection_activity_bureaucracy_control_focus + duel = { + skill = martial + value = 8 + 20 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -19 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 10 } + inspection_success_chance_change_effect = { CHANGE = increase_medium } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_control_great_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_control_great_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 5 } + inspection_success_chance_change_effect = { CHANGE = increase_minor } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_control_average_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_control_average_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_fail_key + show_in_conclusion = yes + character = root + root = { + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + } + } + } + } + } + } + + option = { + name = bp3_survey.0030.d + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_domain_selfish_key + show_in_conclusion = yes + character = root + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + root = { add_gold = minor_gold_value } + } + } + } +} + +# Domain Focus +bp3_survey.0040 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.0040.t + desc = { + desc = bp3_survey.0040.desc + triggered_desc = { + trigger = { + exists = scope:county_holder + } + desc = bp3_survey.0040.mid + } + desc = bp3_survey.0040.outro + } + theme = survey_activity + + override_background = { + reference = market + } + + center_portrait = { + character = scope:county_holder + animation = boredom + } + + left_portrait = { + character = scope:host + animation = debating + } + + right_portrait = { + character = scope:peasant + animation = thinking + hide_info = yes + } + + override_effect_2d = { + reference = legend_glow + } + + trigger = { + has_variable = inspection_activity_domain_focus + } + + immediate = { + if = { + limit = { + scope:province.province_owner != root + } + scope:province.province_owner = { + save_scope_as = county_holder + } + } + create_character = { + location = scope:province + template = generic_peasant_character + save_scope_as = peasant + } + } + + option = { + name = bp3_survey.0040.a + skill = martial + custom_tooltip = bp3_survey.0040.a.tt + set_variable = inspection_activity_domain_levy_focus + duel = { + skill = martial + value = 8 + 20 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -19 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 10 } + inspection_success_chance_change_effect = { CHANGE = increase_medium } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_levy_great_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_levy_great_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 5 } + inspection_success_chance_change_effect = { CHANGE = increase_minor } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_levy_average_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_levy_average_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_fail_key + show_in_conclusion = yes + character = root + root = { + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + } + } + } + } + } + } + + option = { + name = bp3_survey.0040.b + trigger = { + exists = scope:county_holder + } + skill = diplomacy + custom_tooltip = bp3_survey.0040.b.tt + set_variable = inspection_activity_domain_opinion_focus + duel = { + skill = diplomacy + value = 8 + 20 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -19 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 10 } + inspection_success_chance_change_effect = { CHANGE = increase_medium } + } + root = { + add_opinion = { + modifier = compliment_opinion + target = root + opinion = 20 + } + } + } + } + } + 40 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 5 } + inspection_success_chance_change_effect = { CHANGE = increase_minor } + } + root = { + add_opinion = { + modifier = compliment_opinion + target = root + opinion = 10 + } + } + } + } + } + 40 = { + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_fail_key + show_in_conclusion = yes + character = root + root = { + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + } + } + } + } + } + } + + option = { + name = bp3_survey.0040.c + skill = stewardship + custom_tooltip = bp3_survey.0040.c.tt + set_variable = inspection_activity_domain_popular_focus + duel = { + skill = stewardship + value = 8 + 20 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -19 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 10 } + inspection_success_chance_change_effect = { CHANGE = increase_medium } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_opinion_great_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_opinion_great_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_key + show_in_conclusion = yes + character = root + root = { + inspection_survey_intent_development = { VALUE = 5 } + inspection_success_chance_change_effect = { CHANGE = increase_minor } + } + scope:province.county = { + add_county_modifier = { + modifier = inspection_mid_activity_opinion_average_modifier + years = 10 + } + } + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_mid_activity_opinion_average_modifier + YEARS = 10 + } + } + 40 = { + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + scope:activity = { + add_activity_log_entry = { + key = inspection_mid_people_fail_key + show_in_conclusion = yes + character = root + root = { + inspection_success_chance_change_effect = { CHANGE = decrease_minor } + } + } + } + } + } + } + + after = { + scope:peasant = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +### Vassal Event +bp3_survey.0050 = { + type = character_event + content_source = dlc_015 + title = bp3_survey.0050.t + desc = bp3_survey.0050.desc + theme = survey_activity + + override_background = { + reference = study + } + + left_portrait = { + character = scope:host + animation = thinking + } + + right_portrait = { + character = root + animation = obsequious_bow + } + + immediate = { + + } + + option = { + name = bp3_survey.0050.a + custom_tooltip = "bp3_survey.0050.a.tt" + } +} + +### Random Events ### +# Empty Lands +bp3_survey.1000 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1000.t + desc = { + triggered_desc = { + trigger = { + exists = scope:guest_1 + } + desc = bp3_survey.1000.desc + } + triggered_desc = { + trigger = { + NOT = { exists = scope:guest_1 } + } + desc = bp3_survey.1000.desc_lonely + } + desc = bp3_survey.1000.desc_continuation + triggered_desc = { + trigger = { + has_variable = inspection_activity_border_focus + } + desc = bp3_survey.1000.desc_border + } + triggered_desc = { + trigger = { + has_variable = inspection_activity_bureaucracy_focus + } + desc = bp3_survey.1000.desc_bureaucracy + } + triggered_desc = { + trigger = { + has_variable = inspection_activity_domain_focus + } + desc = bp3_survey.1000.desc_domain + } + } + theme = survey_activity + + override_background = { + reference = terrain_scope + } + + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = survey + } + + right_portrait = { + character = scope:guest_1 + animation = thinking + } + + trigger = { + scope:province.county = { + any_county_province = { + has_holding = no + NOR = { + has_province_modifier = inspection_empty_lands_border_modifier + has_province_modifier = inspection_empty_lands_domain_modifier + } + } + } + } + + immediate = { + inspection_survey_intent_county_modifier = { MODIFIER = inspection_survey_new_goods_modifier } + scope:province.county = { + random_county_province = { + limit = { + has_holding = no + } + save_scope_as = empty_province + save_scope_as = background_terrain_scope + } + } + scope:activity = { + random_attending_character = { + limit = { + this != root + } + weight = { + base = 1 + modifier = { + factor = 20 + OR = { + is_close_family_of = root + is_spouse_of = root + } + } + } + save_scope_as = guest_1 + } + } + } + + option = { + name = bp3_survey.1000.a + remove_treasury_or_gold = inspection_minor_gold + scope:empty_province = { + add_province_modifier = inspection_empty_lands_border_modifier + } + inspection_survey_local_message_permanent_province_modifier = { + TYPE = message_good + MODIFIER = inspection_empty_lands_border_modifier + } + + # Success Chance changes + inspection_success_chance_change_focus_effect = { + FOCUS = border + CHANGE = increase_medium + } + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = increase_minor + } + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + + stress_impact = { + greedy = minor_stress_gain + overseer = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 10 + has_variable = inspection_activity_border_focus + } + modifier = { + factor = 5 + has_trait = overseer + } + } + } + + option = { + name = bp3_survey.1000.b + remove_treasury_or_gold = tiny_treasury_or_gold_value + scope:empty_province = { + add_province_modifier = inspection_empty_lands_domain_modifier + } + inspection_survey_local_message_permanent_province_modifier = { + TYPE = message_good + MODIFIER = inspection_empty_lands_domain_modifier + } + + # Success Chance changes + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = increase_medium + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = bureaucracy + CHANGE = decrease_minor + } + + stress_impact = { + greedy = minor_stress_gain + administrator = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 10 + has_variable = inspection_activity_bureaucracy_focus + } + modifier = { + factor = 5 + has_trait = administrator + } + } + } + + option = { + name = bp3_survey.1000.c + add_prestige = minor_prestige_gain + scope:empty_province = { + add_province_modifier = { + modifier = inspection_empty_lands_populace_modifier + years = 5 + } + } + inspection_survey_local_message_province_modifier = { + TYPE = message_good + MODIFIER = inspection_empty_lands_populace_modifier + YEARS = 5 + } + + # Success Chance changes + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_medium + } + inspection_success_chance_change_focus_effect = { + FOCUS = border + CHANGE = increase_minor + } + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = decrease_minor + } + + stress_impact = { + gregarious = minor_stress_impact_loss + reclusive = medium_stress_gain + shy = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = reclusive + has_trait = shy + } + } + modifier = { + factor = 10 + has_variable = inspection_activity_domain_focus + } + modifier = { + factor = 5 + has_trait = gregarious + } + } + } +} + +# Bandits in +bp3_survey.1010 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1010.t + desc = bp3_survey.1010.desc + theme = survey_activity + + override_background = { + reference = alley_day + } + + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = go_to_your_room + } + + center_portrait = { + character = scope:peasant_character + animation = fear + hide_info = yes + } + + right_portrait = { + character = scope:bandit_character + animation = celebrate_sword + hide_info = yes + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 3 + scope:province.county = { + county_control < 80 + } + } + } + + immediate = { + inspection_survey_intent_control = { VALUE = 5 } + create_character = { + template = mercenary + location = scope:province + gender = root + culture = scope:province.culture + faith = scope:province.faith + save_scope_as = bandit_character + } + create_character = { + template = peasant_character + location = scope:province + gender = female + culture = scope:province.culture + faith = scope:province.faith + save_scope_as = peasant_character + } + } + + option = { + name = bp3_survey.1010.a + duel = { + skill = martial + value = 12 + 50 = { + inspection_activity_options_positive_modifier = yes + desc = bp3_survey.1010.a.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_message = { + type = event_generic_good + title = bp3_survey.1010.a.win_short + + add_prestige = medium_prestige_gain + scope:province.county = { + if = { + limit = { + has_county_modifier = inspection_bandits_in_x_border_negative_modifier + } + remove_county_modifier = inspection_bandits_in_x_border_negative_modifier + } + add_county_modifier = { + modifier = inspection_bandits_in_x_border_positive_modifier + years = 10 + } + } + # Success chance + inspection_success_chance_change_focus_effect = { + FOCUS = border + CHANGE = increase_medium + } + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = increase_minor + } + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + } + + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_bandits_in_x_border_positive_modifier + YEARS = 10 + } + } + 50 = { + inspection_activity_options_negative_modifier = yes + desc = bp3_survey.1010.a.lose_short + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + send_interface_message = { + type = event_generic_bad + title = bp3_survey.1010.a.lose + + scope:province.county = { + add_county_modifier = { + modifier = inspection_bandits_in_x_border_negative_modifier + years = 10 + } + } + # Success chance + inspection_success_chance_change_effect = { + CHANGE = decrease_minor + } + } + + inspection_survey_local_message_county_modifier = { + TYPE = message_bad + MODIFIER = inspection_bandits_in_x_border_negative_modifier + YEARS = 10 + } + } + } + + stress_impact = { + craven = minor_stress_gain + brave = minor_stress_impact_loss + diligent = minor_stress_impact_loss + overseer = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + factor = 10 + has_variable = inspection_activity_border_focus + } + modifier = { + factor = 5 + OR = { + has_trait = overseer + has_trait = diligent + has_trait = brave + } + } + } + } + + option = { + name = bp3_survey.1010.b + flavor = bp3_survey.1010.b.flavor + remove_short_term_gold = inspection_medium_gold + scope:province.county = { + add_county_modifier = { + modifier = inspection_bandits_in_x_domain_modifier + years = 10 + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message + MODIFIER = inspection_bandits_in_x_domain_modifier + YEARS = 10 + } + + # Success chance + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = increase_medium + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = bureaucracy + CHANGE = decrease_minor + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 10 + has_variable = inspection_activity_bureaucracy_focus + } + modifier = { + factor = 5 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { + name = bp3_survey.1010.c + duel = { + skill = prowess + value = 18 + 50 = { + desc = bp3_survey.1010.c.win + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_message = { + type = event_generic_good + title = bp3_survey.1010.c.win_short + + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = inspection_bandits_in_x_populace_modifier + years = 10 + } + # Success chance + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_medium + } + inspection_success_chance_change_focus_effect = { + FOCUS = border + CHANGE = increase_minor + } + } + } + 50 = { + desc = bp3_survey.1010.c.lose + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + send_interface_message = { + type = event_generic_bad + title = bp3_survey.1010.c.lose + + increase_wounds_no_death_effect = { REASON = fight } + inspection_success_chance_change_effect = { + CHANGE = decrease_minor + } + } + } + } + + stress_impact = { + craven = minor_stress_gain + brave = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + factor = 10 + has_variable = inspection_activity_domain_focus + } + modifier = { + factor = 5 + OR = { + has_trait = brave + has_trait = compassionate + } + } + } + } + + option = { + name = bp3_survey.1010.d + flavor = bp3_survey.1010.d.flavor + add_prestige = minor_prestige_loss + + # Success chance + inspection_success_chance_change_effect = { + CHANGE = decrease_minor + } + + stress_impact = { + craven = minor_stress_impact_loss + brave = minor_stress_gain + compassionate = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = compassionate + } + } + modifier = { + factor = 5 + has_trait = craven + } + } + } + + after = { + scope:bandit_character = { + silent_disappear_ai_if_not_hired = yes + } + scope:peasant_character = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +# Old Roads of +bp3_survey.1020 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1020.t + desc = bp3_survey.1020.desc + theme = survey_activity + + override_background = { + reference = terrain_scope + } + + cooldown = { years = 1 } + + left_portrait = { + character = scope:soldier_character + hide_info = yes + animation = throne_room_two_handed_passive_1 + } + + center_portrait = { + character = root + animation = survey + } + + trigger = { + scope:province.county = { + NOR = { + has_county_modifier = governance_excellent_new_road_modifier + has_county_modifier = governance_good_new_road_modifier + has_county_modifier = governance_standard_new_road_modifier + has_county_modifier = governance_poor_new_road_modifier + } + } + } + + immediate = { + inspection_survey_intent_development = { VALUE = 5 } + scope:province = { save_scope_as = background_terrain_scope } + create_character = { + template = soldier_friend_character + culture = root.culture + faith = root.faith + gender = root + location = scope:province + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = need_military_outfit + } + } + } + } + + option = { + name = bp3_survey.1020.a + scope:province.county = { + add_county_modifier = { + modifier = inspection_old_roads_of_x_border_modifier + years = 10 + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_good + MODIFIER = inspection_old_roads_of_x_border_modifier + YEARS = 10 + } + + remove_treasury_or_gold = inspection_minor_gold + # Success chance + inspection_success_chance_change_focus_effect = { + FOCUS = border + CHANGE = increase_medium + } + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = increase_minor + } + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + + stress_impact = { + greedy = minor_stress_gain + generous = minor_stress_impact_loss + profligate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 5 + OR = { + has_trait = generous + has_trait = profligate + } + } + } + } + + option = { + name = bp3_survey.1020.b + scope:province.county = { + add_county_modifier = { + modifier = inspection_old_roads_of_x_populace_modifier + years = 10 + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message + MODIFIER = inspection_old_roads_of_x_populace_modifier + YEARS = 10 + } + + inspection_success_chance_change_focus_effect = { + FOCUS = border + CHANGE = increase_minor + } + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = increase_medium + } + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = decrease_minor + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_survey.1020.c + scope:province.county = { + add_county_modifier = { + modifier = inspection_old_roads_of_x_domain_modifier + years = 10 + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message + MODIFIER = inspection_old_roads_of_x_domain_modifier + YEARS = 10 + } + + inspection_success_chance_change_focus_effect = { + FOCUS = border + CHANGE = decrease_minor + } + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = decrease_minor + } + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_medium + } + + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_survey.1020.d + scope:province.county = { + add_county_modifier = { + modifier = inspection_old_roads_negative_modifier + years = 10 + } + } + inspection_survey_local_message_county_modifier = { + TYPE = message_bad + MODIFIER = inspection_old_roads_negative_modifier + YEARS = 10 + } + + # Success chance + inspection_success_chance_change_effect = { + CHANGE = decrease_minor + } + + stress_impact = { + generous = minor_stress_gain + profligate = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = profligate + } + } + } + } + + after = { + scope:soldier_character = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +scripted_effect bp3_survey_1030_character_effect = { + create_character = { + template = merchant_template + faith = scope:city_province.faith + culture = scope:city_province.culture + gender = root + location = scope:city_province + save_scope_as = merchant_$VALUE$ + after_creation = { + if = { + limit = { + scope:city_province = { + has_variable = fighting_guilds_option_$VALUE$ + var:fighting_guilds_option_$VALUE$ = { + OR = { + this = 12 + this = 14 + this = 15 + } + } + } + } + add_trait = giant + } + } + } +} + +# Fighting Guilds +bp3_survey.1030 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1030.t + desc = bp3_survey.1030.desc + theme = survey_activity + + override_background = { + reference = market + } + + cooldown = { years = 1 } + + left_portrait = { + character = scope:merchant_1 + animation = disapproval + hide_info = yes + } + + center_portrait = { + character = root + animation = debating + } + + right_portrait = { + character = scope:merchant_2 + animation = rage + hide_info = yes + } + + trigger = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + scope:province.county = { + any_county_province = { + has_holding_type = city_holding + NOR = { + has_province_modifier = inspection_fighting_guilds_innkeepers_guild_modifier + has_province_modifier = inspection_fighting_guilds_artists_guild_modifier + } + free_building_slots >= 1 + } + } + } + + immediate = { + inspection_survey_intent_county_modifier = { MODIFIER = inspection_learning_intent_local_guilds_modifier } + scope:province.county = { + random_county_province = { + limit = { + has_holding_type = city_holding + NOR = { + has_province_modifier = inspection_fighting_guilds_innkeepers_guild_modifier + has_province_modifier = inspection_fighting_guilds_artists_guild_modifier + } + free_building_slots >= 1 + } + weight = { + base = 1 + modifier = { + factor = 10 + free_building_slots >= 2 + } + } + save_scope_as = city_province + } + } + inspection_fighting_guilds_effect = { VALUE = 1 } + inspection_fighting_guilds_effect = { VALUE = 2 } + bp3_survey_1030_character_effect = { VALUE = 1 } + bp3_survey_1030_character_effect = { VALUE = 2 } + } + + option = { + name = bp3_survey.1030.a + trigger = { + scope:city_province = { + free_building_slots >= 2 + } + } + duel = { + skills = { diplomacy stewardship } + value = 25 + 50 = { + desc = bp3_survey.1030.a.win + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_message = { + type = event_generic_good + title = bp3_survey.1030.a.win + + add_prestige = medium_prestige_gain + scope:city_province = { + inspection_fighting_guilds_setup_reward_effect = { VALUE = 1 } + inspection_fighting_guilds_setup_reward_effect = { VALUE = 2 } + } + # Success chance + inspection_success_chance_change_effect = { + CHANGE = increase_medium + } + } + + hidden_effect = { + if = { + limit = { + scope:province.county.holder != scope:host + } + scope:province.county.holder = { + send_interface_message = { + type = send_interface_message_good + title = bp3_survey_liege_intervention + + show_as_tooltip = { + scope:city_province = { + inspection_fighting_guilds_setup_reward_effect = { VALUE = 1 } + inspection_fighting_guilds_setup_reward_effect = { VALUE = 2 } + } + } + } + } + } + } + } + 50 = { + desc = bp3_survey.1030.a.loss + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + send_interface_message = { + type = event_generic_bad + title = bp3_survey.1030.a.loss_short + + # Success chance + inspection_success_chance_change_effect = { + CHANGE = decrease_medium + } + } + } + } + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_survey.1030.b + scope:city_province = { + inspection_fighting_guilds_setup_reward_effect = { VALUE = 1 } + } + hidden_effect = { + if = { + limit = { + scope:province.county.holder != scope:host + } + scope:province.county.holder = { + send_interface_message = { + type = send_interface_message_good + title = bp3_survey_liege_intervention + + show_as_tooltip = { + scope:city_province = { + inspection_fighting_guilds_setup_reward_effect = { VALUE = 1 } + } + } + } + } + } + } + + # Success chance + inspection_success_chance_change_effect = { + CHANGE = increase_minor + } + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_survey.1030.c + scope:city_province = { + inspection_fighting_guilds_setup_reward_effect = { VALUE = 2 } + } + hidden_effect = { + if = { + limit = { + scope:province.county.holder != scope:host + } + scope:province.county.holder = { + send_interface_message = { + type = send_interface_message_good + title = bp3_survey_liege_intervention + + show_as_tooltip = { + scope:city_province = { + inspection_fighting_guilds_setup_reward_effect = { VALUE = 2 } + } + } + } + } + } + } + + # Success chance + inspection_success_chance_change_effect = { + CHANGE = increase_minor + } + ai_chance = { + base = 100 + } + } + + option = { + name = bp3_survey.1030.d + add_gold = medium_gold_value + # Success chance + inspection_success_chance_change_effect = { + CHANGE = decrease_minor + } + stress_impact = { + greedy = minor_stress_impact_loss + generous = minor_stress_gain + profligate = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = profligate + } + } + modifier = { + factor = 5 + has_trait = greedy + } + } + } + + after = { + scope:merchant_1 = { + silent_disappear_ai_if_not_hired = yes + } + scope:merchant_2 = { + silent_disappear_ai_if_not_hired = yes + } + remove_variable = fighting_guilds_option_1 + remove_variable = fighting_guilds_option_2 + } +} + +# The Fire Spreading +bp3_survey.1040 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1040.t + desc = bp3_survey.1040.desc + theme = survey_activity + + override_background = { + reference = burning_building + } + + cooldown = { years = 1 } + + left_portrait = { + character = scope:soldier_character + hide_info = yes + animation = throne_room_two_handed_passive_1 + } + + center_portrait = { + character = root + animation = fear + } + + right_portrait = { + character = scope:merchant_character + hide_info = yes + animation = crying + } + + lower_right_portrait = { + character = scope:county_owner + } + + override_effect_2d = { + reference = smoke + } + + immediate = { + inspection_survey_intent_development = { VALUE = 5 } + create_character = { + template = soldier_friend_character + culture = root.culture + faith = root.faith + gender = root + location = scope:province + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = need_military_outfit + } + } + } + create_character = { + template = merchant_template + faith = scope:province.faith + culture = scope:province.culture + gender = root + location = scope:province + save_scope_as = merchant_character + } + scope:province = { + destroy_random_building_variable_effect = yes + if = { + limit = { + province_owner != root + } + province_owner = { + save_scope_as = county_owner + } + } + } + } + + option = { + name = bp3_survey.1040.a + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + duel = { + skill = prowess + value = 14 + 50 = { + desc = bp3_survey.1040.a.win + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_message = { + type = event_generic_good + title = bp3_survey.1040.a.win + + add_prestige = medium_prestige_gain + inspection_success_chance_change_effect = { + CHANGE = increase_medium + } + add_character_modifier = { + modifier = inspection_selfless_ruler_modifier + years = 10 + } + } + } + 45 = { + desc = bp3_survey.1040.a.loss + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -34 + } + hidden_effect = { + if = { + limit = { + scope:province.county.holder != scope:host + } + scope:province.county.holder = { + send_interface_message = { + type = send_interface_message_bad + title = bp3_survey_liege_intervention + + show_as_tooltip = { + scope:province = { destroy_random_building_effect = yes } + } + } + } + } + } + + send_interface_message = { + type = event_generic_bad + title = bp3_survey.1040.a.loss + + increase_wounds_no_death_effect = { REASON = burned } + scope:province = { destroy_random_building_effect = yes } + } + } + 5 = { + desc = bp3_survey.1040.a.death + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -4 + } + death = { + death_reason = death_burned + } + } + } + stress_impact = { + brave = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + craven = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = craven + } + modifier = { + factor = 5 + OR = { + has_trait = brave + has_trait = compassionate + } + } + } + } + + option = { + name = bp3_survey.1040.b + remove_treasury_or_gold = inspection_medium_gold + scope:province.county = { + add_county_modifier = { + modifier = inspection_fire_spreading_modifier + years = 10 + } + } + inspection_success_chance_change_focus_effect = { + FOCUS = bureaucracy + CHANGE = increase_minor + } + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = decrease_minor + } + random = { + chance = 25 + hidden_effect = { + if = { + limit = { + scope:province.county.holder != scope:host + } + scope:province.county.holder = { + send_interface_message = { + type = send_interface_message_bad + title = bp3_survey_liege_intervention + + show_as_tooltip = { + scope:province = { destroy_random_building_effect = yes } + } + } + } + } + } + scope:province = { destroy_random_building_effect = yes } + } + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 5 + has_trait = generous + } + } + } + + option = { + name = bp3_survey.1040.c + trigger = { + exists = scope:county_owner + NOR = { + scope:county_owner = root + scope:county_owner = { is_ai = yes } + } + OR = { + has_trait = callous + has_trait = sadistic + AND = { + has_relation_rival = scope:province.province_owner + has_trait = vengeful + } + } + } + duel = { + skill = intrigue + value = 15 + 50 = { + desc = bp3_survey.1040.c.win + inspection_activity_options_positive_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_message = { + type = event_generic_good + title = bp3_survey.1040.c.win + + scope:county_owner = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + } + } + 50 = { + desc = bp3_survey.1040.c.loss + inspection_activity_options_negative_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + send_interface_message = { + type = event_generic_bad + title = bp3_survey.1040.c.loss + + scope:county_owner = { + add_opinion = { + modifier = hate_opinion + target = root + opinion = -50 + } + } + inspection_success_chance_change_effect = { + CHANGE = decrease_medium + } + } + } + } + hidden_effect = { + if = { + limit = { + scope:province.county.holder != scope:host + } + scope:province.county.holder = { + send_interface_message = { + type = send_interface_message_bad + title = bp3_survey_liege_intervention + + show_as_tooltip = { + scope:province = { + destroy_random_building_effect = yes + county = { change_development_level = -2 } + } + } + } + } + } + } + scope:province = { + destroy_random_building_effect = yes + county = { change_development_level = -2 } + } + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + compassionate = major_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 5 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = vengeful + } + } + } + } + + option = { + name = bp3_survey.1040.d + random = { + chance = 50 + hidden_effect = { + if = { + limit = { + scope:province.county.holder != scope:host + } + scope:province.county.holder = { + send_interface_message = { + type = send_interface_message_bad + title = bp3_survey_liege_intervention + + show_as_tooltip = { + scope:province = { + destroy_random_building_effect = yes + county = { change_development_level = -1 } + } + } + } + } + } + } + send_interface_message = { + type = event_generic_bad + title = bp3_survey.1040.destroyed_building + + scope:province = { + destroy_random_building_effect = yes + county = { change_development_level = -1 } + } + } + } + inspection_success_chance_change_effect = { + CHANGE = decrease_medium + } + stress_impact = { + compassionate = medium_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + after = { + scope:merchant_character = { + silent_disappear_ai_if_not_hired = yes + } + scope:soldier_character = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +# Expanding the Town Walls +bp3_survey.1050 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1050.t + desc = bp3_survey.1050.desc + theme = survey_activity + + override_background = { + reference = market + } + + cooldown = { years = 1 } + + left_portrait = { + character = scope:soldier_character + hide_info = yes + animation = disapproval + } + + center_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + hide_info = yes + animation = debating + } + + immediate = { + inspection_survey_intent_county_modifier = { MODIFIER = inspection_learning_intent_building_modifier } + create_character = { + template = soldier_friend_character + culture = root.culture + faith = root.faith + gender = root + location = scope:province + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = need_military_outfit + } + } + } + create_character = { + template = merchant_template + faith = scope:province.faith + culture = scope:province.culture + gender = root + location = scope:province + save_scope_as = merchant_character + } + } + + option = { + name = bp3_survey.1050.a + remove_treasury_or_gold = { + value = { + value = minor_treasury_or_gold_value + min = 50 + } + multiply = inspection_activity_option_multiplier + } + scope:province = { + add_province_modifier = { + modifier = inspection_expanding_walls_new_modifier + years = 10 + } + } + inspection_survey_local_message_province_modifier = { + TYPE = message_good + MODIFIER = inspection_expanding_walls_new_modifier + YEARS = 10 + } + + inspection_success_chance_change_effect = { + CHANGE = increase_minor + } + + stress_impact = { + greedy = minor_stress_gain + generous = minor_stress_impact_loss + profligate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 5 + OR = { + has_trait = generous + has_trait = profligate + } + } + } + } + + option = { + name = bp3_survey.1050.b + remove_treasury_or_gold = { + value = { + value = minor_treasury_or_gold_value + min = 50 + } + multiply = inspection_activity_option_multiplier + } + scope:province = { + add_province_modifier = { + modifier = inspection_expanding_walls_old_modifier + years = 10 + } + } + inspection_survey_local_message_province_modifier = { + TYPE = message_good + MODIFIER = inspection_expanding_walls_old_modifier + YEARS = 10 + } + + inspection_success_chance_change_effect = { + CHANGE = increase_minor + } + + stress_impact = { + greedy = minor_stress_gain + generous = minor_stress_impact_loss + profligate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 5 + OR = { + has_trait = generous + has_trait = profligate + } + } + } + } + + option = { + name = bp3_survey.1050.c + inspection_success_chance_change_effect = { + CHANGE = decrease_minor + } + + stress_impact = { + greedy = minor_stress_impact_loss + generous = minor_stress_gain + profligate = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = profligate + } + } + modifier = { + factor = 5 + has_trait = greedy + } + } + } + + after = { + scope:merchant_character = { + silent_disappear_ai_if_not_hired = yes + } + scope:soldier_character = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +# Mine Your Own Business +bp3_survey.1060 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1060.t + desc = { + desc = bp3_survey.1060.desc + first_valid = { + triggered_desc = { + trigger = { + scope:mine_type = 1 + } + desc = bp3_survey.1060.desc.copper + } + triggered_desc = { + trigger = { + scope:mine_type = 2 + } + desc = bp3_survey.1060.desc.silver + } + triggered_desc = { + trigger = { + scope:mine_type = 3 + } + desc = bp3_survey.1060.desc.gold + } + } + } + theme = survey_activity + + override_background = { + reference = fp3_cave + } + + cooldown = { years = 1 } + + left_portrait = { + character = scope:soldier_character + hide_info = yes + animation = throne_room_two_handed_passive_1 + } + + center_portrait = { + character = root + animation = survey + } + + right_portrait = { + character = scope:guest_1 + animation = ecstasy + } + + trigger = { + scope:province = { has_special_building_slot = no } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 10 + scope:province = { + OR = { + later_historical_gold_mine_trigger = yes + later_historical_silver_mine_trigger = yes + later_historical_copper_mine_trigger = yes + } + } + } + } + + immediate = { + inspection_survey_intent_province_modifier = { MODIFIER = inspection_learning_intent_flourishing_metal_trade_modifier } + create_character = { + template = soldier_friend_character + culture = root.culture + faith = root.faith + gender = root + location = scope:province + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = need_military_outfit + } + } + } + + scope:activity = { + random_attending_character = { + limit = { + this != root + } + weight = { + base = 1 + modifier = { + factor = 20 + OR = { + is_close_family_of = root + is_spouse_of = root + } + } + } + save_scope_as = guest_1 + } + } + + random_list = { + 60 = { + trigger = { + scope:province = { + NOR = { + later_historical_gold_mine_trigger = yes + later_historical_silver_mine_trigger = yes + } + } + } + save_scope_value_as = { + name = mine_type + value = 1 + } + } + 35 = { + trigger = { + scope:province = { + NOR = { + later_historical_gold_mine_trigger = yes + later_historical_copper_mine_trigger = yes + } + } + } + save_scope_value_as = { + name = mine_type + value = 2 + } + } + 5 = { + trigger = { + scope:province = { + NOR = { + later_historical_silver_mine_trigger = yes + later_historical_copper_mine_trigger = yes + } + } + } + save_scope_value_as = { + name = mine_type + value = 3 + } + } + } + } + + option = { + name = bp3_survey.1060.a + scope:province = { + switch = { + trigger = scope:mine_type + 3 = { + hidden_effect = { add_special_building_slot = generic_gold_mines_01 } + add_special_building = generic_gold_mines_01 + } + 2 = { + hidden_effect = { add_special_building_slot = generic_silver_mines_01 } + add_special_building = generic_silver_mines_01 + } + 1 = { + hidden_effect = { add_special_building_slot = generic_copper_mines_01 } + add_special_building = generic_copper_mines_01 + } + } + } + hidden_effect = { + if = { + limit = { + scope:province.county.holder != scope:host + } + scope:province.county.holder = { + send_interface_message = { + type = send_interface_message_good + title = bp3_survey_liege_intervention + + show_as_tooltip = { + scope:province = { + switch = { + trigger = scope:mine_type + 3 = { + hidden_effect = { add_special_building_slot = generic_gold_mines_01 } + add_special_building = generic_gold_mines_01 + } + 2 = { + hidden_effect = { add_special_building_slot = generic_silver_mines_01 } + add_special_building = generic_silver_mines_01 + } + 1 = { + hidden_effect = { add_special_building_slot = generic_copper_mines_01 } + add_special_building = generic_copper_mines_01 + } + } + } + } + } + } + } + } + + inspection_success_chance_change_effect = { + CHANGE = increase_medium + } + } + + after = { + scope:soldier_character = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +# Regular Irregularities +bp3_survey.1070 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1070.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:county_owner } + } + desc = bp3_survey.1070.desc.intro.personal + } + triggered_desc = { + trigger = { + exists = scope:county_owner + } + desc = bp3_survey.1070.desc.intro.vassal + } + } + desc = bp3_survey.1070.desc + } + theme = survey_activity + + override_background = { + reference = study + } + + cooldown = { years = 1 } + + left_portrait = { + character = root + animation = reading + } + + right_portrait = { + character = scope:county_owner + animation = shame + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:province.province_owner != root + scope:province.province_owner.stewardship < 10 + } + } + + immediate = { + inspection_survey_intent_control = { VALUE = 5 } + if = { + limit = { + scope:province.province_owner != root + } + scope:province.province_owner = { save_scope_as = county_owner } + } + } + + option = { + name = bp3_survey.1070.a + flavor = bp3_survey.1070.a.flavor + + scope:county_owner ?= { + add_opinion = { + modifier = frustrated_opinion + target = root + opinion = -10 + } + } + add_dread = 10 + add_treasury_or_gold = minor_treasury_or_gold_value + add_character_modifier = { + modifier = inspection_regular_irregularities_modifier + years = 10 + } + + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = decrease_minor + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + + stress_impact = { + just = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = just + } + } + } + + option = { + name = bp3_survey.1070.b + flavor = bp3_survey.1070.b.flavor + add_treasury_or_gold = minor_treasury_or_gold_value + add_character_modifier = { + modifier = inspection_regular_irregularities_local_modifier + years = 5 + } + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = decrease_minor + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + + stress_impact = { + greedy = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = just + } + modifier = { + factor = 5 + OR = { + has_trait = arbitrary + has_trait = greedy + } + } + } + } + + option = { + name = bp3_survey.1070.c + flavor = bp3_survey.1070.c.flavor + + scope:county_owner ?= { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = domain + CHANGE = decrease_minor + } + + stress_impact = { + greedy = minor_stress_gain + wrathful = minor_stress_gain + just = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = wrathful + has_trait = greedy + has_trait = just + } + } + } + } +} + +scripted_trigger place_worth_visiting_modifier_trigger = { + NOR = { + has_province_modifier = inspection_proteted_poi_levy_modifier + has_province_modifier = inspection_protected_holy_site_levy_modifier + has_province_modifier = inspection_protected_holy_poi_levy_modifier + has_province_modifier = inspection_protected_poi_gold_modifier + has_province_modifier = inspection_protected_holy_site_gold_modifier + has_province_modifier = inspection_protected_holy_poi_gold_modifier + } +} + +# A Place Worth Visiting +bp3_survey.1080 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1080.t + desc = { + desc = bp3_survey.1080.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:holy_poi_location + } + desc = bp3_survey.1080.desc.holy_poi + } + triggered_desc = { + trigger = { + exists = scope:poi_location + } + desc = bp3_survey.1080.desc.poi + } + triggered_desc = { + trigger = { + exists = scope:holy_site_location + } + desc = bp3_survey.1080.desc.holy_site + } + } + desc = bp3_survey.1080.desc.outro + } + theme = survey_activity + + override_background = { + reference = market + } + + cooldown = { years = 1 } + + left_portrait = { + character = scope:soldier_character + hide_info = yes + animation = throne_room_two_handed_passive_1 + } + + center_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:traveler_character + hide_info = yes + animation = debating + } + + trigger = { + scope:province.county = { + any_county_province = { + OR = { + barony = { is_holy_site_of = root.faith } + has_special_building = yes + } + place_worth_visiting_modifier_trigger = yes + } + } + } + + immediate = { + inspection_survey_intent_control = { VALUE = 5 } + create_character = { + template = soldier_friend_character + culture = root.culture + faith = root.faith + gender = root + location = scope:province + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = need_military_outfit + } + } + } + create_character = { + template = travel_leader_court_position_template + faith = root.faith + culture = root.culture + gender = root + location = scope:province + save_scope_as = traveler_character + } + scope:province.county = { + random_county_province = { + limit = { + OR = { + any_journey_point_of_interest_trigger = yes + AND = { + barony = { is_holy_site_of = root.faith } + barony.title_province = scope:province.county.title_province + } + } + place_worth_visiting_modifier_trigger = yes + } + alternative_limit = { + OR = { + any_journey_point_of_interest_trigger = yes + barony = { is_holy_site_of = root.faith } + } + place_worth_visiting_modifier_trigger = yes + } + weight = { + base = 1 + modifier = { + factor = 100 + barony = { is_holy_site_of = root.faith } + } + } + if = { + limit = { + any_journey_point_of_interest_trigger = yes + barony = { is_holy_site_of = root.faith } + } + save_scope_as = holy_poi_location + } + else_if = { + limit = { + any_journey_point_of_interest_trigger = yes + } + save_scope_as = poi_location + } + else_if = { + limit = { + barony = { is_holy_site_of = root.faith } + } + save_scope_as = holy_site_location + } + save_scope_as = location_province + } + } + } + + option = { + name = bp3_survey.1080.a + remove_treasury_or_gold = inspection_minor_gold + scope:poi_location ?= { + add_province_modifier = { + modifier = inspection_protected_poi_gold_modifier + years = 25 + } + inspection_survey_local_message_specific_location_province_modifier = { + TYPE = message_good + MODIFIER = inspection_protected_poi_gold_modifier + YEARS = 25 + } + } + scope:holy_site_location ?= { + add_province_modifier = { + modifier = inspection_protected_holy_site_gold_modifier + years = 25 + } + inspection_survey_local_message_specific_location_province_modifier = { + TYPE = message_good + MODIFIER = inspection_protected_holy_site_gold_modifier + YEARS = 25 + } + } + scope:holy_poi_location ?= { + add_province_modifier = { + modifier = inspection_protected_holy_poi_gold_modifier + years = 25 + } + inspection_survey_local_message_specific_location_province_modifier = { + TYPE = message_good + MODIFIER = inspection_protected_holy_poi_gold_modifier + YEARS = 25 + } + } + + inspection_success_chance_change_effect = { + CHANGE = increase_medium + } + + stress_impact = { + compassionate = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = compassionate + has_trait = diligent + } + } + } + } + + option = { + name = bp3_survey.1080.b + scope:poi_location ?= { + add_province_modifier = { + modifier = inspection_proteted_poi_levy_modifier + years = 25 + } + inspection_survey_local_message_specific_location_province_modifier = { + TYPE = message + MODIFIER = inspection_proteted_poi_levy_modifier + YEARS = 25 + } + } + scope:holy_site_location ?= { + add_province_modifier = { + modifier = inspection_protected_holy_site_levy_modifier + years = 25 + } + inspection_survey_local_message_specific_location_province_modifier = { + TYPE = message + MODIFIER = inspection_protected_holy_site_levy_modifier + YEARS = 25 + } + } + scope:holy_poi_location ?= { + add_province_modifier = { + modifier = inspection_protected_holy_poi_levy_modifier + years = 25 + } + inspection_survey_local_message_specific_location_province_modifier = { + TYPE = message + MODIFIER = inspection_protected_holy_poi_levy_modifier + YEARS = 25 + } + } + + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = decrease_minor + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + + stress_impact = { + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = arrogant + } + } + } + + option = { + name = bp3_survey.1080.c + inspection_success_chance_change_effect = { + CHANGE = decrease_minor + } + + stress_impact = { + compassionate = minor_stress_gain + diligent = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = diligent + } + } + } + } + + after = { + scope:soldier_character = { + silent_disappear_ai_if_not_hired = yes + } + scope:traveler_character = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +scripted_trigger bp3_survey_1090_terrain_trigger = { + OR = { + has_holding = no + terrain = hills + terrain = mountains + terrain = steppe + terrain = forest + terrain = desert_mountains + terrain = desert + terrain = drylands + } +} + +# The Hidden Hinterlands +bp3_survey.1090 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1090.t + desc = bp3_survey.1090.desc + theme = survey_activity + + override_background = { + trigger = { + scope:poaching_province = { + OR = { + terrain = forest + terrain = hills + terrain = mountains + } + } + } + reference = ep2_hunt_poachers_camp + } + + override_background = { + reference = wilderness + } + + cooldown = { years = 1 } + + left_portrait = { + character = scope:soldier_character + hide_info = yes + animation = throne_room_two_handed_passive_1 + } + + center_portrait = { + character = root + animation = survey + } + + right_portrait = { + character = scope:hunter_character + hide_info = yes + animation = hunting_carcass_start + } + + trigger = { + scope:province.county = { + any_county_province = { + bp3_survey_1090_terrain_trigger = yes + NOR = { + has_province_modifier = inspection_hidden_hinterlands_recruit_modifier + has_province_modifier = inspection_hidden_hinterlands_hunters_modifier + } + } + } + } + + immediate = { + inspection_survey_intent_control = { VALUE = 5 } + create_character = { + template = soldier_friend_character + culture = root.culture + faith = root.faith + gender = root + location = scope:province + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = need_military_outfit + } + } + } + create_character = { + template = hunter_template + faith = root.faith + culture = root.culture + gender = root + location = scope:province + save_scope_as = hunter_character + } + scope:province.county = { + random_county_province = { + limit = { + bp3_survey_1090_terrain_trigger = yes + } + save_scope_as = poaching_province + } + } + } + + option = { + name = bp3_survey.1090.a + remove_treasury_or_gold = inspection_minor_gold + scope:poaching_province = { + add_province_modifier = { + modifier = inspection_hidden_hinterlands_recruit_modifier + years = 25 + } + inspection_survey_local_message_specific_location_province_modifier = { + TYPE = message_good + MODIFIER = inspection_hidden_hinterlands_recruit_modifier + YEARS = 25 + } + } + + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = decrease_minor + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = domain + CHANGE = increase_medium + } + + stress_impact = { + diligent = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = diligent + has_trait = wrathful + } + } + } + } + + option = { + name = bp3_survey.1090.b + scope:poaching_province = { + add_province_modifier = { + modifier = inspection_hidden_hinterlands_hunters_modifier + years = 25 + } + inspection_survey_local_message_specific_location_province_modifier = { + TYPE = message + MODIFIER = inspection_hidden_hinterlands_hunters_modifier + YEARS = 25 + } + } + + inspection_success_chance_change_focus_effect = { + FOCUS = border + CHANGE = decrease_minor + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = border + CHANGE = increase_minor + } + + stress_impact = { + lifestyle_hunter = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = lifestyle_hunter + } + } + } + + option = { + name = bp3_survey.1090.c + + inspection_success_chance_change_focus_effect = { + FOCUS = domain + CHANGE = increase_minor + } + inspection_success_chance_change_not_focus_effect = { + FOCUS = domain + CHANGE = decrease_minor + } + + stress_impact = { + content = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = content + } + } + } + + after = { + scope:soldier_character = { + silent_disappear_ai_if_not_hired = yes + } + scope:hunter_character = { + silent_disappear_ai_if_not_hired = yes + } + } +} + +### Progression Events ### +bp3_survey.1200 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1200.t + desc = bp3_survey.1200.desc + theme = survey_activity + + override_background = { reference = study } + + left_portrait = { + character = root + animation = writing + } + + cooldown = { years = 1 } + + option = { + name = bp3_survey.1200.a + inspection_success_chance_change_effect = { + CHANGE = increase_medium + } + } +} + +bp3_survey.1210 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1210.t + desc = bp3_survey.1210.desc + theme = survey_activity + + override_background = { reference = study } + + left_portrait = { + character = root + animation = writing + } + + cooldown = { years = 1 } + + option = { + name = bp3_survey.1210.a + inspection_success_chance_change_effect = { + CHANGE = increase_minor + } + } +} + +bp3_survey.1220 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1220.t + desc = bp3_survey.1220.desc + theme = survey_activity + + override_background = { reference = study } + + left_portrait = { + character = root + animation = disapproval + } + + cooldown = { years = 1 } + + option = { + name = bp3_survey.1220.a + inspection_success_chance_change_effect = { + CHANGE = decrease_minor + } + } +} + +bp3_survey.1230 = { + type = activity_event + content_source = dlc_015 + title = bp3_survey.1230.t + desc = bp3_survey.1230.desc + theme = survey_activity + + override_background = { reference = study } + + left_portrait = { + character = root + animation = rage + } + + cooldown = { years = 1 } + + option = { + name = bp3_survey.1230.a + inspection_success_chance_change_effect = { + CHANGE = decrease_medium + } + } +} diff --git a/N3OW/events/dlc/ce1/epidemic_events.txt b/N3OW/events/dlc/ce1/epidemic_events.txt new file mode 100644 index 00000000..bc933f51 --- /dev/null +++ b/N3OW/events/dlc/ce1/epidemic_events.txt @@ -0,0 +1,9317 @@ +namespace = epidemic_events + +############################ +## Epidemic Maintenance Events +## 0001-1000 +## by Veronica Pazos +############################ + +# epidemic_events.0001 - Army commander gets infected - may spread to army +# epidemic_events.0010 - The plague has reached your court, set your stance (event to avoid event spamming) + +# Army commander gets infected - may spread to army +epidemic_events.0001 = { + type = character_event + title = epidemic_events.0001.t + desc = epidemic_events.0001.desc + theme = plague + left_portrait = { + character = root + animation = sick + } + override_background = { reference = army_camp } + override_effect_2d = { + reference = flies + } + cooldown = { years = 2 } + + immediate = { + grab_epidemic_disease_effect = yes + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + option = { #You get sick lol + name = { + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + text = epidemic_events.0001.a.christian + } + name = { + trigger = { NOT = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } } + text = epidemic_events.0001.a + } + if = { #are you infecting your knights or your entire army; kinda arbitrary for flavour + limit = { + OR = { #infect army, these are highly contagious + has_trait = typhus + has_trait = bubonic_plague + has_trait = dysentery + } + } + random = { + chance = 90 + #you infect your knights + send_interface_toast = { + title = epidemic_events.0001.a.toast + left_icon = root + add_character_modifier = { + modifier = epidemic_infected_knights_modifier #knights effectiveness + years = 2 + } + } + } + } + else = { #infect your knigths only, the rest of diseases are kinda less infectious + random = { + chance = 20 + #you infect your army + send_interface_toast = { + title = epidemic_events.0001.a.toast + left_icon = root + add_character_modifier = { + modifier = epidemic_infected_army_modifier #damage mult + years = 2 + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +# Notification for going into isolation due to epidemic +epidemic_events.0100 = { + type = character_event + title = epidemic_events.0100.t + desc = epidemic_events.0100.desc + theme = plague + left_portrait = { + character = root + animation = fear + } + + option = { #Into isolation we go + name = epidemic_events.0100.a + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_loss } + add_prestige = major_prestige_loss + isolate_family_decision_effect = yes + ai_chance = { + base = 100 + } + } +} +epidemic_events.0101 = { + type = character_event + title = epidemic_events.0101.t + desc = epidemic_events.0101.desc + theme = plague + left_portrait = { + character = root + animation = personality_content + } + trigger = { + has_character_modifier = isolating_modifier + } + + option = { #Out of isolation we come + name = epidemic_events.0101.a + unisolate_family_decision_effect = yes + ai_chance = { + base = 100 + } + } +} + +# Prosperity event / Plague recovery event +epidemic_events.0110 = { + type = character_event + title = epidemic_events.0110.t + desc = { + desc = epidemic_events.0110.desc + triggered_desc = { + trigger = { + exists = scope:new_preferred_capital + } + desc = epidemic_events.0110.desc.new_capital + } + } + theme = plague + left_portrait = { + character = root + animation = personality_rational + } + + trigger = { + exists = scope:epidemic + # Make sure no new plagues showed up since then, or a new preferred capital county has not been chosen already + NOT = { + any_sub_realm_county = { + OR = { + has_province_with_epidemic = { intensity = any } + has_variable = preferred_capital_chosen + } + } + } + OR = { #You're either not on cooldown OR the Black Death + NOT = { has_variable = had_recent_prosperity_event_var } + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + outbreak_intensity = apocalyptic + } + } + has_variable_list = formerly_infected_counties + } + + immediate = { + set_variable = { + name = had_recent_prosperity_event_var + years = 2 + } + if = { + limit = { # A new capital potential? + highest_held_title_tier >= tier_kingdom + any_sub_realm_duchy = { + title_capital_county = { + NOT = { exists = var:epidemic_cooldown_general } + holder = { + OR = { + this = root + is_ai = yes + } + } + save_temporary_scope_as = county_to_check + root = { + primary_title = { + is_de_jure_liege_or_above_target = scope:county_to_check + } + capital_county != scope:county_to_check + any_in_list = { + variable = formerly_infected_counties + this = scope:county_to_check + } + } + } + } + } + random_sub_realm_duchy = { + weight = { + base = 1 + modifier = { + add = title_capital_county.development_level + } + } + limit = { + title_capital_county = { + NOT = { exists = var:epidemic_cooldown_general } + holder = { + OR = { + this = root + is_ai = yes + } + } + save_temporary_scope_as = county_to_check + root = { + primary_title = { + is_de_jure_liege_or_above_target = scope:county_to_check + } + capital_county != scope:county_to_check + any_in_list = { + variable = formerly_infected_counties + this = scope:county_to_check + } + } + } + } + title_capital_county = { save_scope_as = new_preferred_capital } + scope:new_preferred_capital = { + set_variable = { + name = preferred_capital_chosen + years = 2 + } + } + } + } + } + + option = { # Ah, a cool new capital! + name = epidemic_events.0110.a + trigger = { + exists = scope:new_preferred_capital + scope:epidemic = { outbreak_intensity >= major } #don't switch capitals for a minor plague + is_ai = no + } + remove_treasury_or_gold = { + value = epidemic_fromdust_value + add = minor_treasury_or_gold_value + } + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + scope:new_preferred_capital = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + primary_title = { + set_capital_county = scope:new_preferred_capital + } + set_realm_capital = scope:new_preferred_capital + scope:new_preferred_capital = { + add_county_modifier = { + modifier = plague_new_capital + years = 10 + } + } + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + limit = { + this != scope:new_preferred_capital + } + add_county_modifier = { + modifier = county_epidemic_recovered_medium_modifier + years = 5 + } + } + } + + option = { # Spend cash to help recover from the plague + name = epidemic_events.0110.b + if = { + limit = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + outbreak_intensity = apocalyptic + } + } + remove_treasury_or_gold = epidemic_fromdust_value + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_strong_modifier + years = 5 + } + } + } + else_if = { + limit = { + scope:epidemic = { + outbreak_intensity >= major + } + } + remove_treasury_or_gold = epidemic_fromdust_value + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_medium_modifier + years = 5 + } + } + } + else = { + remove_treasury_or_gold = { + value = epidemic_fromdust_value + multiply = 0.5 + } + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_minor_modifier + years = 5 + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { + factor = 0 + short_term_gold < epidemic_fromdust_value + } + } + } + + option = { # Nah don't care + name = epidemic_events.0110.c + if = { + limit = { + scope:epidemic = { + outbreak_intensity >= major + } + } + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_minor_modifier + years = 5 + } + } + } + else = { + every_in_list = { + variable = formerly_infected_counties + custom = every_county_infected_10_years + add_county_modifier = { + modifier = county_epidemic_recovered_tiny_modifier + years = 5 + } + } + } + if = { + limit = { + has_legitimacy = yes + } + add_legitimacy = miniscule_legitimacy_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 2.5 + ai_rationality = -1 + } + } + } + + after = { + clear_variable_list = formerly_infected_counties + } +} + +############################ +## Epidemic Flavor Events +## 1000-2000 +## by James Beaumont +############################ + +############################ +## A charismatic priest is convincing the sick that the plague is a result of their heathen ways +## 1000 +## by James Beaumont +############################ +epidemic_events.1000 = { + type = character_event + title = epidemic_events.1000.t + desc = epidemic_events.1000.desc + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { + reference = smoke + } + + left_portrait = { + character = scope:charismatic_priest + animation = debating + } + cooldown = { years = 5 } + trigger = { + is_available = yes + # Only tribes + government_has_flag = government_is_tribal + # Only if the plague is quite dramatic + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + # Make sure there's a valid faith to convert to + OR = { + AND = { + faith = { has_doctrine_parameter = unreformed } + faith.religion = { + any_faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + AND = { + faith.religion = { + is_in_family = rf_pagan + } + faith = { NOT = { has_doctrine_parameter = unreformed } } + faith.religion = { + any_faith = { has_doctrine_parameter = unreformed } + } + } + AND = { + faith = { has_doctrine_parameter = unreformed } + top_liege = { + any_character_to_title_neighboring_and_across_water_county = { + holder.top_liege = { + any_sub_realm_county = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + } + } + AND = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + top_liege = { + any_sub_realm_county = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + } + } + } + + immediate = { + # Grab a county to convert + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + weight = { + base = 1 + modifier = { + add = 250 + has_province_with_epidemic = { intensity >= apocalyptic } + } + } + random_county_province = { + limit = { + any_province_epidemic = { + intensity >= major + } + } + weight = { + base = 1 + modifier = { + add = 250 + any_province_epidemic = { + intensity >= apocalyptic + } + } + } + random_province_epidemic = { + intensity >= major + weight = { + base = 1 + modifier = { + add = 250 + outbreak_intensity >= apocalyptic + } + } + save_scope_as = cult_epidemic + } + } + save_scope_as = infected_county + } + # Grab the reformed version of the unreformed faith if possible (Bon for example) + if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + faith.religion = { + any_faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + faith.religion = { + random_faith = { + limit = { + NOT = { has_doctrine_parameter = unreformed } + } + save_scope_as = heretical_faith + } + } + } + # Otherwise grab a reformed faith from within your realm + else_if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + top_liege = { + any_sub_realm_county = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + top_liege = { + random_sub_realm_county = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + faith = { save_scope_as = heretical_faith } + } + } + } + # Otherwise grab a nearby reformed faith + else_if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + top_liege = { + any_character_to_title_neighboring_and_across_water_county = { + holder.top_liege = { + any_sub_realm_county = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + } + } + top_liege = { + random_character_to_title_neighboring_and_across_water_county = { + limit = { + holder.top_liege = { + any_sub_realm_county = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + holder.top_liege = { + random_sub_realm_county = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + faith = { save_scope_as = heretical_faith } + } + } + } + } + } + # You're a reformed faith and your people wanna revert to the old ways + else_if = { + limit = { + # Don't get Kuzarism for Jewish realms + faith.religion = { is_in_family = rf_pagan } + faith = { NOT = { has_doctrine_parameter = unreformed } } + faith.religion = { + any_faith = { has_doctrine_parameter = unreformed } + } + } + faith.religion = { + random_faith = { + limit = { + has_doctrine_parameter = unreformed + } + save_scope_as = heretical_faith + } + } + } + # You're a reformed faith and you rule over pagans + else_if = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + top_liege = { + any_sub_realm_county = { + faith = { + has_doctrine_parameter = unreformed + } + } + } + } + top_liege = { + random_sub_realm_county = { + limit = { + faith = { + has_doctrine_parameter = unreformed + } + } + faith = { save_scope_as = heretical_faith } + } + } + } + # Now create the priest + # See if there's a nearby person of the culture + if = { + limit = { + top_liege = { + any_character_to_title_neighboring_and_across_water_county = { + faith = scope:heretical_faith + } + } + } + top_liege = { + random_character_to_title_neighboring_and_across_water_county = { + limit = { faith = scope:heretical_faith } + culture = { save_scope_as = heretical_culture } + } + } + } + else = { + root.culture = { save_scope_as = heretical_culture } + } + # Create a priest + create_character = { + template = priest_character_template + location = root.location + culture = scope:heretical_culture + faith = scope:heretical_faith + trait = eccentric + #Set up the scope + save_scope_as = charismatic_priest + } + } + + option = { # They have a point :thinking_emoji: + name = epidemic_events.1000.c + trigger = { + has_trait = cynical + } + set_character_faith = scope:heretical_faith + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:cult_epidemic + } + } + } + set_county_faith = scope:heretical_faith + add_county_modifier = { + modifier = plague_cult_embraced + years = 10 + } + } + stress_impact = { + cynical = major_stress_impact_loss + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = -1 + } + modifier = { + factor = 0 + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + } + + option = { # Burn this raving lunatic! + name = epidemic_events.1000.a + scope:charismatic_priest = { + death = { + killer = root + death_reason = death_execution + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:cult_epidemic + } + } + } + add_county_modifier = { + modifier = plague_cult_persecuted + years = 10 + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = -1 + } + } + } + + option = { # I'm sure they can't do any harm + name = epidemic_events.1000.b + if = { # Don't go converting all of the world into unreformed faiths + limit = { + OR = { + faith = { has_doctrine_parameter = unreformed } + is_ai = no + } + } + scope:infected_county = { + set_county_faith = scope:heretical_faith + } + } + scope:infected_county = { + add_county_modifier = { + modifier = plague_cult_embraced + years = 10 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = -0.5 + } + } + } +} + +############################ +## Superstitious courtiers want you to nail the coffin of your deceased lover shut to prevent them from rising as a revanent +## 1010 +## by James Beaumont +############################ +epidemic_events.1010 = { + type = character_event + title = epidemic_events.1010.t + desc = epidemic_events.1010.desc + theme = plague + override_background = ce1_catacombs + left_portrait = { + character = scope:superstitious_courtier + animation = throne_room_one_handed_passive_3 + camera = camera_event_group_talking_left_left + } + right_portrait = { + character = scope:dead_lover + animation = dead + camera = camera_event_right_forward + } + cooldown = { years = 5 } + trigger = { + is_available_adult = yes + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + # Recently deceased + any_memory = { + OR = { + has_memory_type = spouse_died + has_memory_type = soulmate_died + has_memory_type = lover_died + } + memory_participant:dead_relation = { + time_since_death = { + years <= 3 + } + } + } + # You have a courtier who is plausibly superstitious + any_courtier_or_guest = { + is_available_adult = yes + probably_superstitious = yes + } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + random_memory = { + limit = { + OR = { + has_memory_type = spouse_died + has_memory_type = soulmate_died + has_memory_type = lover_died + } + any_memory_participant = { + time_since_death = { + years <= 3 + } + } + } + memory_participant:dead_relation = { save_scope_as = dead_lover } + save_scope_as = dead_memory + } + random_courtier_or_guest = { + limit = { + is_available_adult = yes + probably_superstitious = yes + } + save_scope_as = superstitious_courtier + } + } + + option = { # Nail every coffin in the kingdom! + name = epidemic_events.1010.c + trigger = { + has_trait = paranoid + } + scope:dead_lover = { + every_close_family_member = { + custom = every_family_member_of_lover + add_opinion = { + modifier = hate_opinion + opinion = -30 + target = root + } + } + } + progress_towards_friend_effect = { + REASON = friend_revenants_nailed + CHARACTER = scope:superstitious_courtier + OPINION = default_friend_opinion + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = revenants_expelled + years = 15 + } + } + stress_impact = { + paranoid = major_stress_impact_loss + callous = minor_stress_impact_loss + base = minor_stress_impact_gain + zealous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + lustful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = -1 + ai_honor = -1 + } + } + } + + option = { # How bloody well dare you + name = epidemic_events.1010.a + add_piety = minor_piety_gain + capital_county = { + add_county_modifier = { + modifier = beset_by_revenants + years = 5 + } + } + stress_impact = { + callous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = 1 + ai_rationality = 1 + } + } + } + + option = { # Nail it shut! + name = epidemic_events.1010.b + scope:dead_lover = { + every_close_family_member = { + custom = every_family_member_of_lover + add_opinion = { + modifier = hate_opinion + opinion = -30 + target = root + } + } + } + capital_county = { + add_county_modifier = { + modifier = revenant_expelled + years = 5 + } + } + stress_impact = { + paranoid = minor_stress_impact_loss + callous = minor_stress_impact_loss + base = minor_stress_impact_gain + zealous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + lustful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = -1 + ai_honor = -1 + } + } + } +} + +############################ +## Guys wanna plant flowers to combat the plague +## 1020 +## by James Beaumont +############################ +epidemic_events.1020 = { + type = character_event + title = epidemic_events.1020.t + desc = epidemic_events.1020.desc + theme = plague + override_background = ce1_funeral_pyre + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = survey + camera = camera_event_left_away + } + right_portrait = { + character = scope:miasma_courtier + animation = storyteller + camera = camera_event_center_away + } + cooldown = { years = 5 } + trigger = { + is_available = yes + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + any_courtier_or_guest = { + count >= 1 + is_available_adult = yes + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + save_temporary_scope_as = province_temp + } + } + scope:province_temp = { + save_scope_as = epidemic_province + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + save_scope_as = epidemic_county + } + if = { + limit = { + exists = court_position:court_physician_court_position + court_position:court_physician_court_position = { + is_available_adult = yes + } + } + court_position:court_physician_court_position = { + save_scope_as = miasma_courtier + } + } + else = { + random_courtier_or_guest = { + limit = { + is_available_adult = yes + } + save_scope_as = miasma_courtier + } + } + } + + option = { # Okay, I'll do it :eyeroll: + name = epidemic_events.1020.a + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:epidemic_county = { + add_county_modifier = { + modifier = flowers_planted + years = 15 + } + } + stress_impact = { + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + zealous = minor_stress_impact_loss + generous = minor_stress_impact_loss + improvident = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + treasury_or_gold < medium_treasury_or_gold_value + } + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = 1 + ai_rationality = 0.5 # Miasma theory may be wrong, but a rational person in the middle ages would probably believe in it + } + } + } + + option = { # What a waste of money + name = epidemic_events.1020.b + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + stress_impact = { + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = -0.5 + } + } + } +} + +############################ +## Courtiers are self-medicating with leeches +## 1030 +## by James Beaumont +############################ +epidemic_events.1030 = { + type = character_event + title = epidemic_events.1030.t + desc = epidemic_events.1030.desc + theme = plague + override_background = physicians_study + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = shock + camera = camera_event_very_left + } + right_portrait = { + character = scope:leeched_courtier + animation = personality_irrational + } + cooldown = { years = 15 } + trigger = { + # Only if there's a big plague + capital_county = { + any_county_province_epidemic = { + intensity >= major + save_temporary_scope_as = plague_to_check + root = { + # We don't use is_available, because that blocks diseased characters + any_courtier_or_guest = { + is_adult = yes + is_alive = yes + is_in_army = no + is_imprisoned = no + is_incapable = no + has_trait = scope:plague_to_check.epidemic_type.epidemic_trait + save_temporary_scope_as = courtier_temp + } + } + } + } + + } + + immediate = { + capital_county = { + random_county_province = { + limit = { + any_province_epidemic = { + intensity >= major + save_temporary_scope_as = plague_to_check + root = { + # We don't use is_available, because that blocks diseased characters + any_courtier_or_guest = { + is_adult = yes + is_alive = yes + is_in_army = no + is_imprisoned = no + is_incapable = no + has_trait = scope:plague_to_check.epidemic_type.epidemic_trait + } + } + } + } + random_province_epidemic = { + intensity >= major + save_scope_as = epidemic_scope + } + } + } + # We don't use is_available, because that blocks diseased characters + random_courtier_or_guest = { + limit = { + is_adult = yes + is_alive = yes + is_in_army = no + is_imprisoned = no + is_incapable = no + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + save_scope_as = leeched_courtier + } + } + + option = { # Leeches! Leeches for everyone! + name = epidemic_events.1030.a + if = { + limit = { + has_government = landless_adventurer_government + is_ai = no + } + remove_short_term_gold = { 10 20 } + } + random_list = { + 50 = { + desc = epidemic_events.1030.a.success + show_chance = no + send_interface_toast = { + title = epidemic_events.1030.a.success + left_icon = root + right_icon = scope:leeched_courtier + every_courtier_or_guest = { + custom = every_infected_courtier_and_guest + limit = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + add_character_modifier = { + modifier = medicating_with_leeches_good + years = 5 + } + add_opinion = { + modifier = grateful_opinion + opinion = 25 + target = root + } + } + if = { + limit = { + root = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + add_character_modifier = { + modifier = medicating_with_leeches_good + years = 5 + } + } + if = { + limit = { is_landed = yes } + capital_county = { + add_county_modifier = { + modifier = healthy_court + years = 15 + } + } + } + } + } + 50 = { + desc = epidemic_events.1030.a.failure + show_chance = no + send_interface_toast = { + title = epidemic_events.1030.a.failure + left_icon = root + right_icon = scope:leeched_courtier + every_courtier_or_guest = { + custom = every_infected_courtier_and_guest + limit = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + add_opinion = { + modifier = annoyed_opinion + opinion = -30 + target = root + } + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + impatient = minor_stress_impact_loss + generous = minor_stress_impact_loss + patient = minor_stress_impact_gain + calm = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { # Maybe we should trust in the medical experts + name = epidemic_events.1030.b + every_courtier_or_guest = { + custom = every_infected_courtier_and_guest + limit = { has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait } + add_opinion = { + modifier = angry_opinion + opinion = -15 + target = root + } + } + random = { + chance = 35 + add_learning_skill = 1 + } + stress_impact = { + paranoid = minor_stress_impact_gain + impatient = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +############################ +## Courtiers are becoming flagellants to thwart the plague +## 1040 +## by James Beaumont +############################ +epidemic_events.1040 = { + type = character_event + title = epidemic_events.1040.t + desc = { + desc = epidemic_events.1040.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:chaplain = { + has_trait = flagellant + } + } + desc = epidemic_events.1040.desc.mid.approves + } + desc = epidemic_events.1040.desc.mid + } + } + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:chaplain + triggered_animation = { + trigger = { + has_trait = flagellant + } + animation = happiness + } + animation = anger + camera = camera_event_right_forward + } + cooldown = { years = 15 } + trigger = { + is_available_adult = yes + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + exists = cp:councillor_court_chaplain + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # They're clearly just perverts + name = epidemic_events.1040.a + if = { + limit = { + scope:chaplain = { has_trait = flagellant } + } + progress_towards_rival_effect = { + CHARACTER = scope:chaplain + REASON = rival_kinkshamed_my_flagellating + OPINION = default_rival_opinion + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = persecuted_flagellants + years = 10 + } + } + stress_impact = { + zealous = minor_stress_impact_gain + # Nice self-report bro + flagellant = medium_stress_impact_gain + deviant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = flagellant + } + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # I'm sure this is fine. This is totally fine. No consequences can arise as a result of this. + name = epidemic_events.1040.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = rampant_flagellants + years = 10 + } + } + stress_impact = { + flagellant = minor_stress_impact_loss # They're just like me fr! + sadistic = minor_stress_impact_loss # I love seeing people in pain + compassionate = minor_stress_impact_gain # I hate seeing people in pain + cynical = minor_stress_impact_gain # I don't believe flagellating makes god love u + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Maybe they're right! + name = epidemic_events.1040.c + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = rampant_flagellants + years = 10 + } + } + if = { + limit = { + scope:chaplain = { has_trait = flagellant } + } + progress_towards_friend_effect = { + CHARACTER = scope:chaplain + REASON = friend_flagellating_together + OPINION = default_friend_opinion + } + } + if = { + limit = { + NOT = { has_trait = flagellant } + } + add_trait = flagellant + } + stress_impact = { + base = major_stress_impact_loss + craven = minor_stress_impact_gain # pain hurts + arrogant = minor_stress_impact_gain # I don't deserve this + cynical = minor_stress_impact_gain # I don't believe flagellating makes god love me + } + ai_chance = { + base = 0 # Don't do this unless you're already flagellant + modifier = { + add = 50 + has_trait = flagellant + } + } + } +} + +############################ +## Heretics are claiming it's the end of the world +## 1050 +## by James Beaumont +############################ +epidemic_events.1050 = { + type = character_event + title = epidemic_events.1050.t + desc = epidemic_events.1050.desc + theme = plague + override_background = ce1_funeral_pyre + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = pondering + camera = camera_event_center_pointing_right + } + right_portrait = { + character = scope:chaplain + animation = worry + camera = camera_event_right_pointing_right + } + cooldown = { years = 6 } + trigger = { + is_available = yes + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + # You have someone to tell you that this is heresy + exists = cp:councillor_court_chaplain + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # Root them out! + name = epidemic_events.1050.a + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = apocalyptic_inquisition + years = 10 + } + } + stress_impact = { + # What if they're right? D: + zealous = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_zeal = 0.2 + } + } + } + + option = { # Go and debate them + name = epidemic_events.1050.b + duel = { + skill = learning + value = high_skill_rating + # Success: the plague cult is silenced + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.1050.b.tt.success + root = { + send_interface_toast = { + title = epidemic_events.1050.b.tt.success + left_icon = scope:chaplain + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + } + } + } + # Failure: the plague cult still happens + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.1050.b.tt.failure + root = { + send_interface_toast = { + title = epidemic_events.1050.b.tt.failure + left_icon = scope:chaplain + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_cult + years = 10 + } + } + } + } + } + } + stress_impact = { + cynical = minor_stress_impact_gain + lazy = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + ai_greed = -1 + } + } + } + + option = { # Just ignore it + name = epidemic_events.1050.c + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_cult + years = 10 + } + } + stress_impact = { + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } +} + +############################ +## People blaming the plague on witches/animals event chain +## 1060 +## by James Beaumont +############################ +epidemic_events.1060 = { + type = character_event + title = epidemic_events.1060.t + window = big_event_window + override_effect_2d = { reference = rain } + desc = { + desc = epidemic_events.1060.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + desc = epidemic_events.1060.desc.mid.cats + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + } + desc = epidemic_events.1060.desc.mid.dogs + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:faith + } + } + desc = epidemic_events.1060.desc.mid.faith + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + NOT = { var:trait_blamed = trait:witch } + } + } + desc = epidemic_events.1060.desc.mid.trait + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + var:trait_blamed = trait:witch + } + } + desc = epidemic_events.1060.desc.mid2.witches + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + } + } + desc = epidemic_events.1060.desc.mid2.sin + } + } + desc = epidemic_events.1060.desc.outro + } + theme = plague + left_portrait = { + character = root + animation = stress + } + cooldown = { years = 15 } + trigger = { + is_available_adult = yes + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + create_story = plague_witch_hunt + random_owned_story = { + type = plague_witch_hunt + save_scope_as = story_scope + # This is used to keep track of which epidemic is the source of people blaming the plague on some group + set_variable = { + name = plague + value = scope:epidemic_scope + } + random_list = { + 30 = { + # blamed_pague_on determines what or who has been blamed for the plague + set_variable = { + name = blamed_plague_on + value = flag:cats + } + } + 20 = { + trigger = { + NOT = { + # No attacking the puppos for Zoroastrians and Canary Islanders + root.faith.religion = religion:zoroastrianism_religion + root.faith.religion = religion:north_african_religion + } + } + set_variable = { + name = blamed_plague_on + value = flag:dogs + } + } + 20 = { # Religious minorities + root = { select_scapegoat_faith_effect = yes } + set_variable = { + name = blamed_plague_on + value = flag:faith + } + set_variable = { + name = faith_blamed + value = scope:faith_to_blame + } + } + 20 = { + trigger = { + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + FAITH = root.faith + GENDER_CHARACTER = root + } + } + set_variable = { + name = blamed_plague_on + value = flag:trait + } + set_variable = { + name = trait_blamed + value = trait:witch + } + } + 20 = { + random_trait_in_category = { + category = personality + limit = { + save_temporary_scope_as = sin_trait_to_check + root.faith = { + trait_is_sin = scope:sin_trait_to_check + } + } + save_scope_as = sinful_trait + } + set_variable = { + name = blamed_plague_on + value = flag:trait + } + set_variable = { + name = trait_blamed + value = scope:sinful_trait + } + } + } + } + } + + option = { # Am I not an authority on religious matters? This is heresy! + name = epidemic_events.1060.c + reason = piety_level + trigger = { + piety_level >= very_high_piety_level + } + custom_tooltip = witch_trial_story_tt + if = { + limit = { + scope:story_scope = { + exists = var:faith_blamed + var:faith_blamed.religion = religion:judaism_religion + } + } + add_character_modifier = { + modifier = protected_jews + years = 10 + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = divine_guidance + years = 10 + } + } + add_piety = medium_piety_gain + ai_chance = { # This is the objectively best option, the AI should generally pick it if they're not insane + base = 1000 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 1 + ai_zeal = 1 + } + } + } + + option = { # How awful! + name = epidemic_events.1060.a + custom_tooltip = witch_trial_story_tt + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = rampant_witch_trials + years = 10 + } + } + stress_impact = { + diligent = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_zeal = 0.2 + } + } + } + + option = { # Stop this madness in the name of your king! + name = epidemic_events.1060.b + custom_tooltip = witch_trial_story_tt + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = witch_trials_slowed + years = 10 + } + } + stress_impact = { + zealous = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 0.5 + } + } + } +} + +############################ +## People are burning cats/dogs +## 1061 +## by James Beaumont +############################ +epidemic_events.1061 = { + type = character_event + window = big_event_window + title = epidemic_events.1061.t + desc = { + desc = epidemic_events.1061.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + desc = epidemic_events.1061.desc.mid.cats + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + } + desc = epidemic_events.1061.desc.mid.dogs + } + } + desc = epidemic_events.1061.desc.outro + } + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { + reference = smoke + } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:chaplain + animation = shock + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + OR = { + var:blamed_plague_on = flag:cats + var:blamed_plague_on = flag:dogs + } + } + exists = cp:councillor_court_chaplain + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { # I declare cats/dogs to be the royal animal of the realm! + name = epidemic_events.1061.c + reason = prestige_level + trigger = { + prestige_level >= very_high_prestige_level + } + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + if = { + limit = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + add_character_modifier = { + modifier = royal_cats + years = 25 + } + } + else_if = { + limit = { + var:blamed_plague_on = flag:dogs + } + add_character_modifier = { + modifier = royal_dogs + years = 25 + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_animals_loose + years = 5 + } + } + custom_tooltip = cats_and_dogs_trial_will_end_tt + hidden_effect = { + scope:story_scope = { end_story = yes } + } + ai_chance = { # This is the objectively best option, the AI should generally pick it if they're not insane + base = 1000 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 1 + ai_zeal = 1 + } + } + } + + option = { # Well, nothing I can do unfortunately + name = epidemic_events.1061.a + custom_tooltip = unforseen_consequences_tt + hidden_effect = { + random_list = { + 50 = { + send_interface_toast = { + title = epidemic_events.1061.a.success + left_icon = root + custom_tooltip = burning_animals_does_nothing_tt + } + } + 50 = { + send_interface_toast = { + title = epidemic_events.1061.a.failure + left_icon = root + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = lacking_cats_and_dogs + years = 10 + } + } + } + } + } + } + stress_impact = { + diligent = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = -0.5 + } + } + } + + option = { # Try to stop them! + name = epidemic_events.1061.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_animals_loose + years = 10 + } + } + add_legitimacy = miniscule_legitimacy_loss + stress_impact = { + lazy = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + ai_energy = 0.5 + } + } + } +} + +############################ +## A skilled cat/dog-catcher offers to round them all up +## 1062 +## by James Beaumont +############################ +epidemic_events.1062 = { + type = character_event + window = big_event_window + override_background = throne_room + title = epidemic_events.1062.t + desc = { + desc = epidemic_events.1062.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + desc = epidemic_events.1062.desc.mid.cats + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + } + desc = epidemic_events.1062.desc.mid.dogs + } + } + desc = epidemic_events.1062.desc.outro + } + theme = plague + left_portrait = { + character = root + animation = pondering + camera = camera_event_scheme_center + } + center_portrait = { + character = scope:poacher_1 + animation = hunting_knife_start + camera = camera_event_scheme_far_right + } + right_portrait = { + character = scope:poacher_2 + animation = bow_idle + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + OR = { + var:blamed_plague_on = flag:cats + var:blamed_plague_on = flag:dogs + } + } + } + + immediate = { + create_character = { + template = generic_peasant_character + location = root.location + culture = root.culture + faith = root.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = poacher_1 + after_creation = { + add_character_flag = created + } + } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.culture + faith = root.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = poacher_2 + after_creation = { + add_character_flag = created + } + } + } + + option = { # I declare cats/dogs to be the royal animal of the realm! + name = epidemic_events.1061.c + reason = prestige_level + trigger = { + prestige_level >= very_high_prestige_level + } + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + if = { + limit = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + add_character_modifier = { + modifier = royal_cats + years = 25 + } + } + else_if = { + limit = { + var:blamed_plague_on = flag:dogs + } + add_character_modifier = { + modifier = royal_dogs + years = 25 + } + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = plague_animals_loose + years = 5 + } + } + custom_tooltip = cats_and_dogs_trial_will_end_tt + hidden_effect = { + scope:story_scope = { end_story = yes } + } + ai_chance = { # This is the objectively best option, the AI should generally pick it if they're not insane + base = 1000 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 1 + ai_zeal = 1 + } + } + } + + option = { # Catch them and kill them! + name = epidemic_events.1062.a + custom_tooltip = unforseen_consequences_tt + hidden_effect = { + random_list = { + 33 = { + send_interface_toast = { + title = epidemic_events.1062.a.no_effect + left_icon = root + } + } + 33 = { + send_interface_toast = { + title = epidemic_events.1062.a.success + left_icon = root + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = lacking_cats_and_dogs_good + years = 10 + } + } + } + } + 33 = { + send_interface_toast = { + title = epidemic_events.1062.a.failure + left_icon = root + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = lacking_cats_and_dogs + years = 10 + } + } + } + } + } + } + stress_impact = { + diligent = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = -0.5 + } + } + } + + option = { # Catch them and bring them to the capital + name = epidemic_events.1062.b + custom_tooltip = unforseen_consequences_tt + hidden_effect = { + random_list = { + 77 = { + send_interface_toast = { + title = epidemic_events.1062.b.no_effect + left_icon = root + } + } + 33 = { + send_interface_toast = { + title = epidemic_events.1062.b.failure + left_icon = root + capital_county = { + add_county_modifier = { + modifier = full_of_rabid_animals + years = 10 + } + } + } + } + } + } + stress_impact = { + lazy = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + ai_energy = 0.5 + } + } + } + after = { + scope:poacher_1 = { + silent_disappearance_ai_effect = yes + } + scope:poacher_2 = { + silent_disappearance_ai_effect = yes + } + } +} + +############################ +## Repent! Repent! Adopt a virtuous trait like right now! +## 1063 +## by James Beaumont +############################ +epidemic_events.1063 = { + type = character_event + window = big_event_window + title = epidemic_events.1063.t + desc = { + desc = epidemic_events.1063.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:faith + } + } + desc = epidemic_events.1063.desc.mid.faith + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + NOT = { var:trait_blamed = trait:witch } + } + } + desc = epidemic_events.1063.desc.mid.sin + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + var:trait_blamed = trait:witch + } + } + desc = epidemic_events.1063.desc.mid.witch + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + } + desc = epidemic_events.1063.desc.mid.cats + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + } + desc = epidemic_events.1063.desc.mid.dogs + } + } + desc = epidemic_events.1063.desc.outro + } + theme = plague + override_effect_2d = { + reference = rain + } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:priest + animation = debating + } + cooldown = { years = 5 } + trigger = { + is_available_adult = yes + # Make sure that ROOT doesn't have literally every virtuous trait in their faith + any_trait_in_category = { + category = personality + save_temporary_scope_as = random_virtue_trait_trigger + root = { + NOT = { has_trait = prev } + } + root.faith = { trait_is_virtue = scope:random_virtue_trait_trigger } + } + # Root has something to repent for + OR = { + num_sinful_traits >= 1 + AND = { + is_witch_trigger = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + FAITH = root.faith + GENDER_CHARACTER = root + } + } + AND = { + is_incestuous_trigger = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = incestuous + FAITH = root.faith + GENDER_CHARACTER = root + } + } + AND = { + scope:story_scope = { + var:blamed_plague_on = flag:cats + } + has_cat_trigger = yes + } + AND = { + scope:story_scope = { + var:blamed_plague_on = flag:dogs + } + has_dog_trigger = yes + } + } + } + + immediate = { + # Determine the trait to be super into + random_trait_in_category = { + category = personality + limit = { + save_temporary_scope_as = random_virtue_trait + root = { + NOT = { has_trait = prev } + } + root.faith = { trait_is_virtue = scope:random_virtue_trait } + } + save_scope_as = virtuous_trait + } + + # Create a priest + create_character = { + template = priest_character_template + location = root.location + culture = root.culture + faith = root.faith + save_scope_as = priest + } + } + + option = { # Uhhh actually, he speaks the bullshit! + name = epidemic_events.1063.c + reason = piety_level + trigger = { + piety_level >= very_high_piety_level + } + duel = { + skill = learning + value = high_skill_rating + # Success: you are able to argue you're good actually + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.1063.c.success + send_interface_toast = { + title = epidemic_events.1063.c.success + left_icon = root + add_piety = major_piety_gain + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + } + } + # Failure: people are still into it + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.1063.c.failure + send_interface_toast = { + title = epidemic_events.1063.c.failure + left_icon = root + add_legitimacy = miniscule_legitimacy_loss + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = refused_to_repent + years = 10 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_zeal = 1 + } + } + } + + option = { # I repent! I repent! + name = epidemic_events.1063.a + if = { + limit = { + scope:virtuous_trait = { + any_opposite_trait = { + root = { has_trait = prev } + } + } + } + scope:virtuous_trait = { + random_opposite_trait = { + limit = { + root = { has_trait = prev } + } + root = { + remove_trait = prev + } + } + } + } + if = { + limit = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + var:trait_blamed = trait:witch + } + is_witch_trigger = yes + } + remove_witch_secret_or_trait_effect = yes + } + add_trait_force_tooltip = scope:virtuous_trait + stress_impact = { + base = massive_stress_impact_gain + lazy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 # This is a very rash decision + ai_energy = -0.5 # This is a very hard decision + ai_zeal = 0.5 # This is a very religious decision + } + } + } + + option = { # What a load of bollocks + name = epidemic_events.1063.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = refused_to_repent + years = 10 + } + } + add_legitimacy = miniscule_legitimacy_loss + stress_impact = { + base = minor_stress_impact_gain + cynical = medium_stress_impact_loss # Am I *really* a sinner tho? + zealous = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_zeal = -0.5 + } + } + } +} + +############################ +## Witch trials +## 1064 +## by James Beaumont +############################ +epidemic_events.1064 = { + type = character_event + window = big_event_window + title = epidemic_events.1064.t + desc = { + desc = epidemic_events.1064.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + NOT = { var:trait_blamed = trait:witch } + } + } + desc = epidemic_events.1064.desc.mid.sin + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + var:trait_blamed = trait:witch + } + } + desc = epidemic_events.1064.desc.mid.witch + } + } + desc = epidemic_events.1064.desc.outro + } + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { + reference = rain + } + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + } + any_sub_realm_county = { + development_level >= 3 + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + development_level >= 3 + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + save_scope_as = witch_trial_county + } + } + + option = { # Let me make a well-formulated argument that sinning is fine actually + name = epidemic_events.1064.c + reason = piety_level + trigger = { + piety_level >= high_piety_level + } + duel = { + skill = learning + value = high_skill_rating + # Success: you are able to argue you're good actually + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.1064.c.success + send_interface_toast = { + title = epidemic_events.1064.c.success + left_icon = root + add_piety = medium_piety_gain + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + } + } + # Failure: people are still into it + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.1064.c.failure + send_interface_toast = { + title = epidemic_events.1064.c.failure + left_icon = root + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = witch_trials_obstructed + years = 10 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_zeal = 1 + } + } + } + + option = { # The witch trials are fine maybe probably + name = epidemic_events.1064.a + scope:witch_trial_county = { + change_development_level = -2 + change_county_control = -100 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.2 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Stop it! Stop it right now! + name = epidemic_events.1064.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = witch_trials_obstructed + years = 15 + } + } + add_legitimacy = miniscule_legitimacy_loss + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.2 + ai_honor = 0.5 + ai_zeal = -0.5 + } + } + } +} + +############################ +## Walk of shame +## 1065 +## by James Beaumont +############################ +scripted_trigger epidemic_events_1065_has_blamed_trait = { + is_ruler = no + location = root.location + OR = { + has_trait = scope:story_scope.var:trait_blamed + AND = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + NOT = { var:trait_blamed = trait:witch } + } + is_witch_trigger = yes + } + } +} + +epidemic_events.1065 = { + type = character_event + window = big_event_window + title = epidemic_events.1065.t + desc = { + desc = epidemic_events.1065.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + NOT = { var:trait_blamed = trait:witch } + } + } + desc = epidemic_events.1065.desc.mid.sin + } + triggered_desc = { + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + exists = var:trait_blamed + var:trait_blamed = trait:witch + } + } + desc = epidemic_events.1065.desc.mid.witch + } + } + desc = epidemic_events.1065.desc.outro + } + theme = plague + override_background = corridor_night + left_portrait = { + character = root + animation = stress + camera = camera_torso_scheme_player + } + right_portrait = { + character = scope:shamed_buddy + animation = shock + camera = camera_torso_scheme_target + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:trait + } + OR = { + # Prioritise spouses + any_spouse = { + epidemic_events_1065_has_blamed_trait = yes + } + # Family members + any_close_or_extended_family_member = { + epidemic_events_1065_has_blamed_trait = yes + } + # Lovers + any_relation = { + type = lover + epidemic_events_1065_has_blamed_trait = yes + } + # Friends + any_relation = { + type = friend + epidemic_events_1065_has_blamed_trait = yes + } + # Concubines + any_consort = { + epidemic_events_1065_has_blamed_trait = yes + } + } + } + + immediate = { + if = { + limit = { + any_spouse = { + epidemic_events_1065_has_blamed_trait = yes + } + } + random_spouse = { + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + else_if = { + limit = { + any_close_or_extended_family_member = { + epidemic_events_1065_has_blamed_trait = yes + } + } + random_close_or_extended_family_member = { + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + else_if = { + limit = { + any_relation = { + type = lover + epidemic_events_1065_has_blamed_trait = yes + } + } + random_relation = { + type = lover + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + else_if = { + limit = { + any_relation = { + type = friend + epidemic_events_1065_has_blamed_trait = yes + } + } + random_relation = { + type = friend + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + else_if = { + limit = { + any_consort = { + epidemic_events_1065_has_blamed_trait = yes + } + } + random_consort = { + limit = { + epidemic_events_1065_has_blamed_trait = yes + } + save_scope_as = shamed_buddy + } + } + } + + option = { # I will take your place, buddy + name = epidemic_events.1065.c + trigger = { + has_trait = august + } + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + increase_wounds_no_death_effect = { REASON = beaten } + upgrade_to_friend_effect = { + CHARACTER = scope:shamed_buddy + REASON = friend_walk_of_shame + } + stress_impact = { + base = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + humble = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + gregarious = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -2 + ai_sociability = 1 + ai_zeal = 1 + } + } + } + + option = { # Just do it, buddy + name = epidemic_events.1065.a + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_loss } + scope:shamed_buddy = { + add_prestige = massive_prestige_loss + hidden_effect = { + increase_wounds_no_death_effect = { REASON = beaten } + increase_wounds_no_death_effect = { REASON = beaten } + } + show_as_tooltip = { + add_trait = wounded_2 + } + } + stress_impact = { + just = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.2 + ai_honor = -0.5 + ai_sociability = -1 + ai_zeal = 0.5 + } + } + } + + option = { # Absolutely not! + name = epidemic_events.1065.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = witch_trials_obstructed + years = 10 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.2 + ai_honor = 0.5 + ai_sociability = 0.5 + ai_zeal = -0.5 + } + } + } +} + +############################ +## Peasants are forcing minorities out +## 1066-1067 +## by James Beaumont +############################ +epidemic_events.1066 = { + type = character_event + window = big_event_window + title = epidemic_events.1066.t + desc = epidemic_events.1066.desc + theme = plague + override_background = burning_building + override_effect_2d = { reference = smoke } + left_portrait = { + character = root + animation = grief + } + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:faith + } + } + cooldown = { years = 5 } + + immediate = { + add_legitimacy = miniscule_legitimacy_loss + } + + option = { # Offer minorities asylum in the capital + name = epidemic_events.1066.c + trigger = { + has_trait = administrator + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + this != root.capital_county + } + change_development_progress = -50 + } + capital_county = { + change_development_progress_with_overflow = 50 + add_county_modifier = { + modifier = persecuted_minorities_protected + years = 15 + } + } + stress_impact = { + zealous = minor_stress_impact_gain # I'm a fundementalist + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 1 + ai_zeal = -0.5 + } + } + } + + option = { # Forbid the expulsion + name = epidemic_events.1066.a + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + this != root.capital_county + } + change_county_control = major_county_control_loss + add_county_modifier = { + modifier = minority_persecution_forbidden + years = 10 + } + if = { + limit = { + faith = scope:faith_blamed + } + random = { + chance = 35 + set_county_faith = root.faith + } + } + } + stress_impact = { + zealous = minor_stress_impact_gain # I'm a fundementalist + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 1 + ai_zeal = -1 + } + } + } + + option = { # Oof, sure fine, let them be expelled + name = epidemic_events.1066.b + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + change_development_progress = -50 + add_county_modifier = { + modifier = persecuted_minorities_expelled + years = 10 + } + } + hidden_effect = { + save_scope_as = bigoted_ruler_that_everyone_hates + if = { + limit = { + any_neighboring_and_across_water_top_liege_realm_owner = { + is_alive = yes + any_character_to_title_neighboring_and_across_water_county = { + holder.top_liege = scope:bigoted_ruler_that_everyone_hates + } + } + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + is_alive = yes + any_character_to_title_neighboring_and_across_water_county = { + holder.top_liege = scope:bigoted_ruler_that_everyone_hates + } + } + trigger_event = { + id = epidemic_events.1067 + days = { 3 10 } + } + } + } + } + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + diligent = minor_stress_impact_gain + gallant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_compassion = -1 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } +} + +# Response event for a neighbouring ruler +epidemic_events.1067 = { + type = character_event + title = epidemic_events.1067.t + desc = epidemic_events.1067.desc + theme = plague + left_portrait = { + character = root + animation = thinking + } + + option = { # Funnel them all into the capital + name = epidemic_events.1067.c + trigger = { + has_trait = administrator + } + capital_county = { + change_development_progress_with_overflow = 150 + add_county_modifier = { + modifier = plague_minorities_sanctuary_boosted + years = 10 + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + zealous = minor_stress_impact_gain + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 1 + ai_zeal = -0.5 + } + } + } + + option = { # Oh cool, welcome! + name = epidemic_events.1067.a + scope:bigoted_ruler_that_everyone_hates = { + every_character_to_title_neighboring_and_across_water_county = { + custom = every_bordering_county + change_development_progress = 50 + add_county_modifier = { + modifier = plague_minorities_sanctuary + years = 10 + } + } + } + stress_impact = { + paranoid = minor_stress_impact_gain # Foreigners? They could be spies! + zealous = minor_stress_impact_gain # I'm a fundementalist + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 1 + ai_zeal = -1 + } + } + } + + option = { # Well, they can't come 'ere + name = epidemic_events.1067.b + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + diligent = minor_stress_impact_gain + greedy = minor_stress_impact_gain + gallant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_compassion = -1 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } +} + +############################ +## Nobles are struggling to get loans +## 1068 +## by James Beaumont +############################ +epidemic_events.1068 = { + type = character_event + window = big_event_window + title = epidemic_events.1068.t + desc = epidemic_events.1068.desc + theme = plague + override_background = throne_room + left_portrait = { + character = root + animation = stunned + } + right_portrait = { + character = scope:loneless_vassal + animation = obsequious_bow + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { beggar_rags } + } + } + cooldown = { years = 5 } + trigger = { + scope:story_scope = { + var:blamed_plague_on = flag:faith + } + any_vassal = { + is_landed_or_landless_administrative = yes # No unlanded HoFs + exists = capital_county # No barons + highest_held_title_tier >= tier_county + any_sub_realm_county = { + any_county_province_epidemic = { + this = scope:epidemic_scope + } + } + } + } + + immediate = { + random_vassal = { + limit = { + is_landed_or_landless_administrative = yes + exists = capital_county + highest_held_title_tier >= tier_county + any_sub_realm_county = { + any_county_province_epidemic = { + this = scope:epidemic_scope + } + } + } + weight = { + base = 1 + # Get guys who would likely wanna take loans + modifier = { + add = 10 + gold <= 0 + } + modifier = { + add = 10 + gold <= minor_gold_value + } + modifier = { + add = 5 + OR = { + has_trait = greedy + has_trait = profligate + } + } + } + save_scope_as = loneless_vassal + } + } + + option = { # Try to make your vassal's realm a safe place for them + name = epidemic_events.1068.a + progress_towards_friend_effect = { + CHARACTER = scope:loneless_vassal + OPINION = default_friend_opinion + REASON = friend_plague_financial_help + } + scope:loneless_vassal = { + every_sub_realm_county = { + custom = all_of_vassals_holding + change_development_progress = 15 + add_county_modifier = { + modifier = persecuted_minorities_financial_sanctuary + years = 10 + } + } + } + stress_impact = { + zealous = minor_stress_impact_gain # I'm a fundementalist + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 1 + ai_zeal = -1 + } + } + } + + option = { # I'll offer you a loan! + name = epidemic_events.1068.b + progress_towards_friend_effect = { + CHARACTER = scope:loneless_vassal + OPINION = default_friend_opinion + REASON = friend_plague_financial_help + } + if = { + limit = { + scope:loneless_vassal = { + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + } + } + scope:loneless_vassal = { + vassal_contract_increase_obligation_level = feudal_government_taxes + } + } + else = { + add_hook = { + target = scope:loneless_vassal + type = indebted_hook + } + } + pay_short_term_gold = { + target = scope:loneless_vassal + gold = { + if = { + limit = { + scope:loneless_vassal.gold < 0 + } + add = scope:loneless_vassal.gold + multiply = -1 + } + min = tiny_gold_value + } + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + gold < major_gold_value + } + ai_value_modifier = { + ai_rationality = 1 + ai_greed = 1 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Not my fuckin problem + name = epidemic_events.1068.c + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + progress_towards_rival_effect = { + CHARACTER = scope:loneless_vassal + OPINION = 0 + REASON = rival_refused_to_help_my_loans + } + stress_impact = { + lazy = minor_stress_impact_loss + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = 1 + ai_honor = -0.5 + ai_zeal = 0.5 + } + } + } +} + +############################ +## Informed of plague showing up // Plague notification event +## 1100 +## by James Beaumont +############################ +epidemic_events.1100 = { + type = character_event + title = epidemic_events.1100.t + desc = { + first_valid = { # How bad is the disease? + triggered_desc = { + trigger = { + scope:epidemic = { + outbreak_intensity = major + } + } + desc = epidemic_events.1100.desc.intro.major + } + desc = epidemic_events.1100.desc.intro.fallback + } + first_valid = { # How important is the county it appeared in? + triggered_desc = { + trigger = { + scope:infected_county = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + } + } + desc = epidemic_events.1100.desc.intro2.holy_site + } + triggered_desc = { + trigger = { + scope:infected_county = { + OR = { + this = root.capital_county + development_level >= 20 + } + } + } + desc = epidemic_events.1100.desc.intro2.cool_place + } + desc = epidemic_events.1100.desc.intro2.backwater + } + first_valid = { + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:typhus + } + } + desc = epidemic_events.1100.desc.mid.typhus + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + desc = epidemic_events.1100.desc.mid.bubonic_plague + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:smallpox + } + } + desc = epidemic_events.1100.desc.mid.smallpox + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:measles + } + } + desc = epidemic_events.1100.desc.mid.measles + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:dysentery + } + } + desc = epidemic_events.1100.desc.mid.dysentery + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:ergotism + } + } + desc = epidemic_events.1100.desc.mid.ergotism + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:consumption + } + } + desc = epidemic_events.1100.desc.mid.consumption + } + desc = epidemic_events.1100.desc.mid.fallback + } + first_valid = { + triggered_desc = { + trigger = { + scope:infected_county = root.capital_county + } + desc = epidemic_events.1100.desc.outro.capital + } + desc = epidemic_events.1100.desc.outro + } + first_valid = { + triggered_desc = { + trigger = { + scope:epidemic = { + outbreak_intensity = major + } + } + desc = epidemic_events.1100.desc.mid2.major + } + desc = epidemic_events.1100.desc.mid2.fallback + } + } + theme = plague + override_effect_2d = { + reference = smoke + } + left_portrait = { + character = root + animation = stress + } + + trigger = { + is_available = yes + NOR = { # Don't repeatedly inform the player of the same plague over and over + is_target_in_variable_list = { + name = plagues_notified + target = scope:epidemic + } + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + } + + immediate = { + scope:province.county = { + save_scope_as = infected_county + } + add_to_variable_list = { + name = plagues_notified + target = scope:epidemic + } + # LEGITIMACY LOSS FROM OUTBREAK + if = { + limit = { scope:infected_county.holder ?= this } + show_as_tooltip = { + scope:epidemic = { + epidemic_outbreak_legitimacy_effect = { PROVINCE = scope:province } + } + } + } + add_plague_county_modifiers = yes + } + + option = { # Damn :pensive: + name = { + text = { + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + has_trait = scope:epidemic.epidemic_type.epidemic_trait + } + desc = epidemic_events.1100.a.already_has_it + } + triggered_desc = { + trigger = { + has_trait = compassionate + } + desc = epidemic_events.1100.a.compassionate + } + triggered_desc = { + trigger = { + has_trait = eccentric + } + desc = epidemic_events.1100.a.eccentric + } + triggered_desc = { + trigger = { + is_cannibal_trigger = yes + } + desc = epidemic_events.1100.a.cannibal + } + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + desc = epidemic_events.1100.a.callous + } + triggered_desc = { + trigger = { + OR = { + has_trait = diligent + has_trait = just + } + } + desc = epidemic_events.1100.a.diligent + } + triggered_desc = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + desc = epidemic_events.1100.a.paranoid + } + triggered_desc = { + trigger = { + OR = { + has_trait = brave + has_trait = arrogant + } + } + desc = epidemic_events.1100.a.brave + } + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = epidemic_events.1100.a.zealous + } + } + desc = epidemic_events.1100.a + } + } + } + + if = { # Admin governors lose a bit of trait XP if they don't try to do something + limit = { + is_governor = yes + has_trait = governor + } + increase_governance_effect = { VALUE = -2 } + } + + ai_chance = { + base = 100 + } + } + + option = { # Call the physician! + name = epidemic_events.1100.b + trigger = { + exists = court_position:court_physician_court_position + } + reason = physician + custom_tooltip = { + text = physician_will_help_epidemic_tt + court_position:court_physician_court_position = { save_scope_as = physician } + trigger_event = { + id = physician_epidemic_events.1020 + days = 3 + } + } + ai_chance = { + base = 100 + } + } + + option = { # Call a physician! + name = epidemic_events.1100.c + trigger = { + NOT = { exists = court_position:court_physician_court_position } + OR = { # prevent stacking treatment + top_liege = this + is_ai = no + } + } + custom_tooltip = { + text = look_for_physician_epidemic_tt + add_character_flag = { flag = seeking_epidemic_treatment days = 30 } + trigger_event = { + id = health.3001 days = { court_physician_search_min court_physician_search_max } + } + } + ai_chance = { + base = 100 + } + } +} + +#Informed of an apocalyptic plague +epidemic_events.1101 = { + type = character_event + window = fullscreen_event + title = epidemic_events.1100.t + desc = { + desc = epidemic_events.1100.desc.intro.apocalyptic + first_valid = { # How important is the county it appeared in? + triggered_desc = { + trigger = { + scope:infected_county = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + } + } + desc = epidemic_events.1100.desc.intro2.holy_site + } + triggered_desc = { + trigger = { + scope:infected_county = { + OR = { + this = root.capital_county + development_level >= 20 + } + } + } + desc = epidemic_events.1100.desc.intro2.cool_place + } + desc = epidemic_events.1100.desc.intro2.backwater + } + first_valid = { + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:typhus + } + } + desc = epidemic_events.1100.desc.mid.typhus + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + desc = epidemic_events.1100.desc.mid.bubonic_plague + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:smallpox + } + } + desc = epidemic_events.1100.desc.mid.smallpox + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:measles + } + } + desc = epidemic_events.1100.desc.mid.measles + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:dysentery + } + } + desc = epidemic_events.1100.desc.mid.dysentery + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:ergotism + } + } + desc = epidemic_events.1100.desc.mid.ergotism + } + triggered_desc = { + trigger = { + scope:epidemic = { + epidemic_type.epidemic_trait = trait:consumption + } + } + desc = epidemic_events.1100.desc.mid.consumption + } + desc = epidemic_events.1100.desc.mid.fallback + } + first_valid = { + triggered_desc = { + trigger = { + scope:infected_county = root.capital_county + } + desc = epidemic_events.1100.desc.outro.capital + } + desc = epidemic_events.1100.desc.outro + } + desc = epidemic_events.1100.desc.mid2.apocalyptic + } + theme = plague + override_background = { reference = ce1_fullscreen_apocalyptic } + + trigger = { + is_available = yes + OR = { + AND = { + has_dlc_feature = legends_of_the_dead + NOR = { # Don't repeatedly inform the player of the same plague over and over + is_target_in_variable_list = { + name = plagues_notified + target = scope:epidemic + } + # There's a special event for the Black Plague + scope:epidemic = { + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + } + AND = { + NOT = { # Don't repeatedly inform the player of the same plague over and over + is_target_in_variable_list = { + name = plagues_notified + target = scope:epidemic + } + } + NOT = { has_dlc_feature = legends_of_the_dead } + } + } + } + + immediate = { + play_music_cue = apocalyptic_plague + scope:province.county = { + save_scope_as = infected_county + } + add_to_variable_list = { + name = plagues_notified + target = scope:epidemic + } + # LEGITIMACY LOSS FROM OUTBREAK + if = { + limit = { scope:infected_county.holder ?= this } + show_as_tooltip = { + scope:epidemic = { + epidemic_outbreak_legitimacy_effect = { PROVINCE = scope:province } + } + } + } + add_plague_county_modifiers = yes + } + + option = { # Damn :pensive: + name = { + text = { + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + has_trait = scope:epidemic.epidemic_type.epidemic_trait + } + desc = epidemic_events.1100.a.already_has_it + } + triggered_desc = { + trigger = { + has_trait = compassionate + } + desc = epidemic_events.1100.a.compassionate + } + triggered_desc = { + trigger = { + has_trait = eccentric + } + desc = epidemic_events.1100.a.eccentric + } + triggered_desc = { + trigger = { + is_cannibal_trigger = yes + } + desc = epidemic_events.1100.a.cannibal + } + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + desc = epidemic_events.1100.a.callous + } + triggered_desc = { + trigger = { + OR = { + has_trait = diligent + has_trait = just + } + } + desc = epidemic_events.1100.a.diligent + } + triggered_desc = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + desc = epidemic_events.1100.a.paranoid + } + triggered_desc = { + trigger = { + OR = { + has_trait = brave + has_trait = arrogant + } + } + desc = epidemic_events.1100.a.brave + } + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = epidemic_events.1100.a.zealous + } + } + desc = epidemic_events.1100.a + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Call the physician! + name = epidemic_events.1100.b + trigger = { + OR = { # prevent stacking treatment + top_liege = this + is_ai = no + } + } + if = { + limit = { + NOT = { exists = court_position:court_physician_court_position } + } + custom_tooltip = { + text = look_for_physician_epidemic_tt + add_character_flag = { flag = seeking_epidemic_treatment days = 30 } + trigger_event = { + id = health.3001 days = { court_physician_search_min court_physician_search_max } + } + } + } + else = { + custom_tooltip = { + text = physician_will_help_epidemic_tt + court_position:court_physician_court_position = { save_scope_as = physician } + trigger_event = { + id = physician_epidemic_events.1020 + days = 3 + } + } + } + ai_chance = { + base = 100 + } + } +} + +############################ +## Common graves for your graveyard? +## 1110 +## by James Beaumont +############################ +epidemic_events.1110 = { + type = character_event + title = epidemic_events.1110.t + desc = epidemic_events.1110.desc + theme = plague + left_portrait = { + character = root + animation = pondering + camera = camera_event_left_away_3_4 + } + right_portrait = { + character = scope:chaplain + animation = beg + camera = camera_event_right_away + } + override_effect_2d = { reference = flies } + + cooldown = { years = 10 } + + trigger = { + is_available = yes + any_held_title = { + title_tier = county + any_county_province = { + has_building_or_higher = burial_site_01 + } + } + # Only if there's a big plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity >= major + } + } + } + any_courtier_or_guest = { + is_available_ai_adult = yes + } + } + + immediate = { + random_held_title = { + title_tier = county + limit = { + any_county_province = { + has_building_or_higher = burial_site_01 + } + } + save_scope_as = graveyard_county + } + get_random_nearby_realm_epidemic = { INTENSITY = major } + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + else = { + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = chaplain + } + } + } + + option = { # Okay, let's make room for common graves :eyeroll: + name = epidemic_events.1110.a + scope:graveyard_county = { + add_county_modifier = { + modifier = ce1_common_graves + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + ai_vengefulness = -0.5 + } + } + } + + option = { # Lol, no shot I'm ruining my graveyard with commoners + name = epidemic_events.1110.b + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + add_prestige = medium_prestige_gain + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = ce1_bodies_in_the_street + years = 15 + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_rationality = -1 + ai_vengefulness = 0.5 + } + } + } +} + +############################ +## Catapult the plague corpses +## 1120 +## by James Beaumont +############################ +epidemic_events.1120 = { + type = character_event + title = epidemic_events.1120.t + desc = epidemic_events.1120.desc + theme = plague + override_background = { reference = ce1_funeral_pyre } + left_portrait = { + character = root + animation = thinking + } + + trigger = { + is_available_adult_or_is_commanding = yes + # Catapults only + culture = { has_innovation = innovation_catapult } + # Only if you're leading the army yourself + scope:army = { + army_commander = root + } + #No sea provinces + location = { is_sea_province = no } + # Only do it to people you're at war with + OR = { + location.county.holder ?= { is_at_war_with = root } + location.county.holder ?= { + any_liege_or_above = { + is_at_war_with = root + } + } + } + # Only do it if you have a plague in your realm that is not present at the location + any_realm_county = { + title_province = { + any_province_epidemic = { + save_temporary_scope_as = epidemic_temp_scope + root.location.county.title_province = { + NOT = { + any_province_epidemic = { this = scope:epidemic_temp_scope } + } + } + } + } + } + # Check if you have a reason to hate this person + OR = { + has_relation_rival = location.county.holder + has_trait = sadistic + has_trait = torturer + } + } + + cooldown = { years = 100 } # This shouldn't be too common + + immediate = { + root = { save_scope_as = corpse_flinger } + location.county.holder = { save_scope_as = corpse_flingee } + location.county = { save_scope_as = flung_corpse_location } + # Get the epidemic + random_realm_county = { + limit = { + title_province = { + any_province_epidemic = { + save_temporary_scope_as = epidemic_temp_scope + root.location.county.title_province = { + NOT = { + any_province_epidemic = { this = scope:epidemic_temp_scope } + } + } + } + } + } + title_province = { + random_province_epidemic = { + limit = { + save_temporary_scope_as = epidemic_temp_scope + root.location.county.title_province = { + NOT = { + any_province_epidemic = { this = scope:epidemic_temp_scope } + } + } + } + save_scope_as = epidemic_scope + } + } + } + } + + option = { # Fuckinnnnnnnn do it + name = epidemic_events.1120.a + hidden_effect = { + if = { + limit = { + scope:corpse_flingee = { location.county = scope:flung_corpse_location } + } + scope:corpse_flingee = { + trigger_event = epidemic_events.1121 + } + } + else = { + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + } + } + create_character_memory = { + type = ce1_flung_corpse + participants = { + flingee = scope:corpse_flingee + } + } + show_as_tooltip = { + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + } + stress_impact = { + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + calm = minor_stress_impact_gain + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + zealous = minor_stress_impact_gain + trusting = minor_stress_impact_gain + vengeful = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_zeal = -1 + ai_compassion = -1 + ai_vengefulness = 2 + } + } + } + + option = { # Fuckinnnnnnnn don't + name = epidemic_events.1120.b + stress_impact = { + torturer = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_zeal = 1 + ai_compassion = 1 + ai_vengefulness = -2 + } + } + } +} + +# The enemy recieves the "gift" +epidemic_events.1121 = { + type = character_event + title = epidemic_events.1121.t + desc = epidemic_events.1121.desc + theme = plague + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:corpse_flinger + animation = schadenfreude + } + + immediate = { + create_character_memory = { + type = ce1_corpse_flung_at_me + participants = { + flinger = scope:corpse_flinger + } + } + } + + option = { # Fling it back! + name = epidemic_events.1121.a + trigger = { + culture = { has_innovation = innovation_catapult } + } + show_as_unavailable = { always = yes } + random_list = { + 50 = { + show_chance = no + desc = plague_averted_tt + send_interface_toast = { + title = plague_averted_tt + left_icon = root + right_icon = scope:corpse_flinger + hidden_effect = { + scope:corpse_flinger = { + trigger_event = epidemic_events.1122 + } + } + } + create_character_memory = { + type = ce1_flung_corpse + participants = { + flingee = scope:corpse_flinger + } + } + } + 50 = { + show_chance = no + desc = plague_still_infects_tt + send_interface_toast = { + title = plague_still_infects_tt + left_icon = root + right_icon = scope:corpse_flinger + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + infect_with_epidemic = scope:epidemic_scope + } + } + } + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + calm = minor_stress_impact_gain + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + vengeful = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 2 + } + } + } + + option = { # Do something about the corpse + name = epidemic_events.1121.b + duel = { + skill = learning + value = high_skill_rating + # You quarantine the corpse succesfully + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = epidemic_events.1121.b.success + left_icon = root + right_icon = scope:peasant_1 + + scope:location = { + add_province_modifier = { + modifier = ce1_quarantined_corpse + years = 10 + } + } + } + } + # The quarantine fails + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = epidemic_events.1121.b.failure + left_icon = root + right_icon = scope:corpse_flinger + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + infect_with_epidemic = scope:epidemic_scope + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + torturer = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_zeal = 1 + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } + + option = { # Just keep that thing away from me + name = epidemic_events.1121.c + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_zeal = -1 + ai_compassion = -1 + } + } + } +} + +# Return to sender +epidemic_events.1122 = { + type = character_event + title = epidemic_events.1122.t + desc = epidemic_events.1122.desc + theme = plague + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:corpse_flingee + animation = schadenfreude + } + + immediate = { + create_character_memory = { + type = ce1_corpse_flung_at_me + participants = { + flinger = scope:corpse_flinger + } + } + } + + option = { # God damn it + name = epidemic_events.1122.a + infect_with_epidemic = scope:epidemic_scope + add_stress = major_stress_gain + ai_chance = { + base = 100 + } + } + + option = { # Throw it back again! + name = epidemic_events.1122.b + trigger = { + has_trait = torturer + } + random_list = { + 25 = { + show_chance = no + desc = epidemic_events.1122.b.success + send_interface_toast = { + title = epidemic_events.1122.b.success + left_icon = root + right_icon = scope:corpse_flinger + hidden_effect = { + scope:corpse_flingee = { + trigger_event = epidemic_events.1123 + } + } + } + } + 75 = { + show_chance = no + desc = epidemic_events.1122.b.failure + send_interface_toast = { + title = epidemic_events.1122.b.failure + left_icon = root + right_icon = scope:corpse_flingee + add_character_modifier = { + modifier = ce1_heavily_ill + years = 5 + } + infect_with_epidemic = scope:epidemic_scope + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + torturer = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_zeal = 1 + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } +} + +# The meat shower +epidemic_events.1123 = { + type = character_event + title = epidemic_events.1123.t + desc = epidemic_events.1123.desc + theme = plague + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:corpse_flinger + animation = schadenfreude + } + + option = { # God damn it + name = epidemic_events.1123.a + scope:flung_corpse_location = { + add_county_modifier = { + modifier = ce1_siege_corpse + years = 15 + } + } + create_character_memory = { + type = ce1_meat_shower + participants = { + flinger = scope:corpse_flinger + } + } + + ai_chance = { + base = 100 + } + } +} + +############################ +## Epidemic Flavor Events +## 3000-3999 +## by Veronica Pazos +############################ + +############################ +## You travel through an infected province +## 3000 +## by Veronica Pazos +############################ + +epidemic_events.3000 = { + type = character_event + title = epidemic_events.3000.t + desc = epidemic_events.3000.desc + theme = plague + override_background = { reference = ce1_condemned_village } + override_effect_2d = { + reference = flies + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + animation = fear + } + animation = thinking + } + right_portrait = { + character = scope:sick_peasant + triggered_animation = { + trigger = { + scope:epidemic_scope.epidemic_type.epidemic_trait = trait:ergotism + } + animation = dancing_plague + } + animation = sick_stomach + } + lower_center_portrait = scope:companion + cooldown = { years = 5 } + + trigger = { + is_travelling = yes + location = { + any_province_epidemic = { } + } + current_travel_plan ?= { + any_entourage_character = { + this != root + is_physically_able_ai_adult = yes + } + } + } + + immediate = { + location = { + save_scope_as = epidemic_location + } + location = { + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { + this != root + is_physically_able_ai_adult = yes + NOT = { has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait } + } + weight = { + base = 1 + modifier = { + has_trait = compassionate + add = 10 + } + modifier = { + has_trait = lifestyle_herbalist + add = 5 + } + modifier = { + has_trait = lifestyle_physician + add = 5 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + save_scope_as = companion + } + } + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + save_scope_as = sick_peasant + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = sick_peasant + } + scope:sick_peasant = { + add_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + } + + option = { # Stop by to help + name = epidemic_events.3000.a + add_piety = minor_piety_gain + pay_short_term_gold = { + target = scope:sick_peasant + gold = medium_gold_value + } + current_travel_plan ?= { + delay_travel_plan = { days = 10 } + } + + stress_impact = { + greedy = major_stress_impact_gain + avaricious = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = profligate + } + add = 50 + } + modifier = { + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = callous + has_trait = sadistic + NAND = { + can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } + has_trait = profligate + } + } + factor = 0 + } + } + } + + option = { # Ask a courtier to help them + name = epidemic_events.3000.b + trigger = { exists = scope:companion } + add_piety = miniscule_piety_gain + scope:companion = { + random = { + chance = 50 + modifier = { + add = { + value = 0 + subtract = health #if you're healthy you kinda get away with it + } + } + modifier = { + add = { value = -10 } + OR = { + has_trait = whole_of_body + has_perk = wash_your_hands_perk + } + } + root = { + send_interface_toast = { + title = epidemic_events.3000.b.sick + left_icon = scope:companion + scope:companion = { + add_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + + option = { # Wow that sucks + name = epidemic_events.3000.c + add_piety = minor_piety_loss + + stress_impact = { + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = just + } + factor = 0 + } + } + } + + after = { + hidden_effect = { + if = { + limit = { is_ai = yes } + scope:sick_peasant = { silent_disappearance_effect = yes } + } + else = { + scope:sick_peasant = { move_to_pool = yes } + } + } + } +} + +############################ +## You travel through an infected province AND may get infected +## 3010 +## by Veronica Pazos +############################ + +epidemic_events.3010 = { + type = character_event + title = epidemic_events.3010.t + desc = epidemic_events.3010.desc + theme = plague + override_background = { reference = ce1_condemned_village } + override_effect_2d = { + reference = flies + } + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left + } + cooldown = { years = 5 } + + trigger = { + is_travelling = yes + location = { + any_province_epidemic = { } + } + } + + immediate = { + location = { + save_scope_as = epidemic_location + } + location = { + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + hidden_effect = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = sick_peasant + } + scope:sick_peasant = { + add_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + } + + option = { # You are very clever + name = epidemic_events.3010.a + trigger = { + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + learning >= high_skill_rating + } + } + add_character_modifier = { + modifier = humour_knowledge_modifier + years = 10 + } + stress_impact = { + brave = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = brave + has_trait = impatient + } + factor = 0 + } + } + } + + option = { # Drink water + name = epidemic_events.3010.b + random = { + chance = 50 + send_interface_toast = { + title = epidemic_events.3010.b.sick + left_icon = root + add_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + modifier = { + add = { + value = 0 + subtract = health #if you're healthy you kinda get away with it + } + } + modifier = { + add = { value = -10 } + OR = { + has_trait = whole_of_body + has_perk = wash_your_hands_perk + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + cynical = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = paranoid + has_trait = craven + has_trait = cynical + } + factor = 0 + } + } + } + + option = { # Don't drink + name = epidemic_events.3010.c + current_travel_plan = { + add_travel_plan_modifier = no_water_modifier + } + stress_impact = { + impatient = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = impatient + has_trait = diligent + } + factor = 0 + } + } + } + + after = { + hidden_effect = { + if = { + limit = { is_ai = yes } + scope:sick_peasant = { silent_disappearance_effect = yes } + } + else = { + scope:sick_peasant = { move_to_pool = yes } + } + } + } +} + +############################ +## Epidemic Flavor Events +## 5000-5899 +## by Nick Meredith +############################ + +# Church officials want to cull an animal +# by Nick Meredith +epidemic_events.5000 = { + type = character_event + title = epidemic_events.5000.t + desc = epidemic_events.5000.desc + theme = plague + override_background = { reference = ce1_funeral_pyre } + override_effect_2d = { + reference = flies + } + left_portrait = { + character = root + animation = chancellor + } + right_portrait = { + character = scope:church_person + animation = debating + } + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + # There be a plague + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + location = root.location #Ensure it makes sense they talk to you + } + } + + immediate = { + select_local_farm_animal_effect = yes + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + save_scope_as = infected_county + } + scope:infected_county = { + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic + } + save_scope_as = infected_province + } + } + cp:councillor_court_chaplain = { + save_scope_as = church_person + } + save_scope_value_as = { + name = infection_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + option = { # How about... rats? + name = epidemic_events.5000.a + + trigger = { + has_trait = eccentric + } + + scope:infected_county = { + add_county_modifier = { + modifier = rats_eradicated + years = 10 + } + } + + reverse_add_opinion = { + modifier = confused_opinion + opinion = -5 + target = scope:church_person + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_rationality = 1 + } + } + } + + option = { # Kill all the cats! + name = epidemic_events.5000.b + + trigger = { + NOT = { + any_owned_story = { + type = story_cycle_pet_cat + } + } + any_owned_story = { + type = story_cycle_pet_dog + } + } + + add_piety = major_piety_gain + + if = { #Kill all your courtiers' cats if they're there! + limit = { + any_courtier_or_guest = { + location = scope:infected_province + any_owned_story = { + type = story_cycle_pet_cat + } + } + } + every_courtier_or_guest = { + limit = { + location = scope:infected_province + any_owned_story = { + type = story_cycle_pet_cat + } + } + random_owned_story = { + type = story_cycle_pet_cat + save_scope_as = story + } + show_as_tooltip = { + remove_cat_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + add_opinion = { + modifier = hate_opinion + opinion = -30 + target = root + } + } + } + + scope:infected_county = { + add_county_modifier = { + modifier = pets_eradicated + years = 5 + } + } + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 40 + target = scope:church_person + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.5 + } + } + } + + option = { # Kill all the dogs! + name = epidemic_events.5000.c + + trigger = { + NOT = { + any_owned_story = { + type = story_cycle_pet_dog + } + } + any_owned_story = { + type = story_cycle_pet_cat + } + } + + add_piety = major_piety_gain + + if = { #Kill all your courtiers' dogs if they're there! + limit = { + any_courtier_or_guest = { + location = scope:infected_province + any_owned_story = { + type = story_cycle_pet_dog + } + } + } + every_courtier_or_guest = { + limit = { + location = scope:infected_province + any_owned_story = { + type = story_cycle_pet_dog + } + } + random_owned_story = { + type = story_cycle_pet_dog + save_scope_as = story + } + show_as_tooltip = { + remove_dog_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + add_opinion = { + modifier = hate_opinion + opinion = -30 + target = root + } + } + } + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 40 + target = scope:church_person + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.5 + } + } + } + + option = { # Kill all the sheep! + name = epidemic_events.5000.d + + trigger = { + NOT = { + has_trait = eccentric + } + } + + scope:infected_county = { + add_county_modifier = { + modifier = vectors_reduced + years = 10 + } + } + + reverse_add_opinion = { + modifier = impressed_opinion + opinion = 30 + target = scope:church_person + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_rationality = 1 + } + } + } + + option = { # Don't be ridiculous, realm priest! + name = epidemic_events.5000.e + + reverse_add_opinion = { + modifier = angry_opinion + opinion = -25 + target = scope:church_person + } + + stress_impact = { + diligent = minor_stress_impact_gain + humble = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = -0.5 + } + } + } +} + +# A minor epidemic is causing massive panic +# by Nick Meredith +epidemic_events.5001 = { + type = character_event + title = epidemic_events.5001.t + desc = epidemic_events.5001.desc + theme = plague + override_background = study + left_portrait = { + character = root + animation = chancellor + camera = camera_event_very_left + } + right_portrait = { + character = scope:courtier + animation = holding_scrolls + } + cooldown = { years = 10 } + + trigger = { + NOT = { + government_has_flag = government_is_nomadic + } + is_available = yes + # There be a plague, but it's kinda smol + any_sub_realm_county = { + any_county_province = { + exists = province_owner + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity <= minor + } + } + } + + any_courtier = { + location = root.location + is_available_ai_adult = yes + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + exists = province_owner + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity <= minor + } + province_owner = { save_temporary_scope_as = province_owner_temp } + } + } + random_county_province = { + limit = { + exists = province_owner + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + intensity <= minor + } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + save_scope_as = epidemic_county + scope:province_owner_temp = { save_scope_as = province_owner } + } + + random_courtier = { + limit = { + location = root.location + is_available_ai_adult = yes + } + save_scope_as = courtier + } + } + + option = { # Send them some supplies + name = epidemic_events.5001.d + + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + + remove_treasury_or_gold = minor_treasury_or_gold_value + + scope:epidemic_county = { + add_county_modifier = { + modifier = supplies_sent + years = 10 + } + } + + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 15 + target = scope:courtier + } + + stress_impact = { + generous = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = 1 + } + } + } + + option = { # I'm sure they'll be fine + name = epidemic_events.5001.e + + scope:epidemic_county = { + add_county_modifier = { + modifier = plight_ignored + years = 10 + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + generous = minor_stress_impact_gain + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = -0.5 + } + } + } +} + +# A peasant asks for your healing touch +# by Nick Meredith +epidemic_events.5003 = { + type = character_event + title = epidemic_events.5003.t + desc = epidemic_events.5003.desc + theme = plague + override_background = { reference = market } + override_effect_2d = { + reference = rain + } + left_portrait = { + character = root + animation = horse_conversing_right + camera = camera_event_horse_left + } + right_portrait = { + character = scope:peasant + animation = beg + camera = camera_event_standing_with_horse_right + } + lower_center_portrait = { + character = scope:child + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + # You're at your capital + location = root.capital_province + + # There be a plague in your capital + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + this = root.capital_province + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + this = root.capital_province + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + this = root.capital_province + } + save_scope_as = location + } + } + hidden_effect = { + if = { + limit = { + any_pool_character = { + province = root.location + NOT = { is_courtier_of = root } + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + any_child = { + is_healthy = no + is_adult = no + } + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + NOT = { is_courtier_of = root } + has_no_particular_noble_roots_trigger = yes + any_child = { + is_healthy = no + is_adult = no + } + } + save_scope_as = peasant + } + } + else = { + create_character = { + template = generic_peasant_character + culture = root.culture + faith = root.faith + location = root.location + save_scope_as = peasant + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:peasant = { + move_to_pool = yes + } + } + } + create_character = { + template = peasant_toddler_character + culture = root.culture + faith = root.faith + location = root.location + save_scope_as = child + after_creation = { + add_character_flag = created + } + } + + if = { #Set the previous character as their parent + limit = { + scope:peasant ?= { + is_female = no + } + } + hidden_effect = { + scope:child = { + set_father = scope:peasant + } + } + } + else = { + hidden_effect = { + scope:child = { + set_mother = scope:peasant + } + } + } + hidden_effect = { + scope:child = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } + move_to_pool = yes + } + } + } + + save_scope_value_as = { + name = infection_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + option = { # Get away from me! + name = epidemic_events.5003.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + } + } + trait = callous + trait = sadistic + trait = paranoid + + add_character_modifier = { + modifier = health_first + years = 15 + } + + scope:child = { + death = { + death_reason = death_ill + } + } + + stress_impact = { + base = minor_stress_impact_loss + wrathful = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + callous = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.5 + ai_vengefulness = 1 + } + } + } + + option = { # Give it a go + name = epidemic_events.5003.b + + add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_gain } + + add_character_modifier = { + modifier = man_of_the_people + years = 10 + } + + random = { + chance = 50 + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + shy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = 0.5 + } + } + } + + option = { # Just... try to ignore them + name = epidemic_events.5003.c + + stress_impact = { + shy = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + callous = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + after = { + scope:peasant = { + silent_disappearance_ai_effect = yes + } + scope:child = { + silent_disappearance_ai_effect = yes + } + } +} + +# People are trying to get into your castle! +# by Nick Meredith +epidemic_events.5004 = { + type = character_event + title = epidemic_events.5004.t + desc = epidemic_events.5004.desc + theme = plague + override_background = { reference = throne_room } + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = shock + camera = camera_event_very_left + } + right_portrait = { + character = scope:peasant_1 + animation = beg + } + lower_left_portrait = { + character = scope:peasant_2 + } + lower_center_portrait = { + character = scope:peasant_3 + } + lower_right_portrait = { + character = scope:peasant_4 + } + cooldown = { years = 100 } + + trigger = { + is_available = yes + # Make sure you're royal! + highest_held_title_tier >= tier_kingdom + + # And you're at your capital + location = root.capital_province + + # There be a plague in your capital + capital_province = { + any_province_epidemic = { } + } + + any_pool_character = { + province = root.location + count >= 4 + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_tribal + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + this = root.capital_province + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + this = root.capital_province + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + save_scope_as = location + } + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = peasant_1 + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + this != scope:peasant_1 + } + save_scope_as = peasant_2 + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + NOR = { + this = scope:peasant_1 + this = scope:peasant_2 + } + } + save_scope_as = peasant_3 + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + NOR = { + this = scope:peasant_1 + this = scope:peasant_2 + this = scope:peasant_3 + } + } + save_scope_as = peasant_4 + } + + every_pool_character = { + province = root.location + limit = { + has_no_particular_noble_roots_trigger = yes + } + add_to_list = peasant_rabble + } + } + + option = { # Welcome in! + name = epidemic_events.5004.a + + every_in_list = { + list = peasant_rabble + root = { + add_courtier = prev + } + } + + hidden_effect = { + every_in_list = { + list = peasant_rabble + add_opinion = { + modifier = grateful_opinion + opinion = 40 + target = root + } + } + } + + custom_tooltip = epidemic_events.5004.a.new_courtiers + + scope:location = { + add_province_modifier = { + modifier = commoners_welcomed_in + years = 15 + } + } + + stress_impact = { + gregarious = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + generous = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = -0.5 + } + } + } + + option = { # Get out of here, miscreants! + name = epidemic_events.5004.c + + add_dread = massive_dread_gain + + scope:location = { + add_province_modifier = { + modifier = commoners_turned_away + years = 15 + } + } + + every_in_list = { + list = peasant_rabble + if = { + limit = { + age <= 20 + } + add_stress = major_stress_impact_gain + } + if = { + limit = { + age <= 40 + } + increase_wounds_effect = { REASON = fight } + } + if = { + limit = { + age > 40 + } + death = { death_reason = death_fight } + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + shy = minor_stress_impact_loss + callous = minor_stress_impact_loss + paranoid = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_sociability = -1 + } + } + } + + option = { # Come on, now, you know I can't do that... + name = epidemic_events.5004.b + + scope:location = { + add_province_modifier = { + modifier = commoners_turned_away + years = 15 + } + } + + stress_impact = { + paranoid = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } +} + +# The plague is spreading in from the coast +# by Nick Meredith +epidemic_events.5005 = { + type = character_event + title = epidemic_events.5005.t + desc = epidemic_events.5005.desc + theme = plague + override_background = docks + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:steward + animation = stress + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + #There be a plague in your subrealm, and it's in a coastal province + any_sub_realm_county = { + any_county_province = { + is_coastal = yes + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + is_coastal = yes + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + is_coastal = yes + any_province_epidemic = { } + } + save_scope_as = coastal_province + } + } + + every_sub_realm_county = { + limit = { + has_coastal_province = yes + } + every_county_province = { + limit = { + is_coastal = yes + } + add_to_list = coastal_list + } + } + + random_sub_realm_county = { + limit = { + any_county_province = { + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + + cp:councillor_steward = { + save_scope_as = steward + } + } + + option = { # Make it 40 days, and threaten them + name = epidemic_events.5005.a + + trigger = { + OR = { + has_trait = paranoid + has_trait = sadistic + has_trait = callous + has_trait = arbitrary + has_trait = stubborn + } + } + trait = paranoid + trait = sadistic + trait = callous + trait = arbitrary + trait = stubborn + + if = { #Tooltip ensmallener for if you have more than 5 sea provinces + limit = { + any_in_list = { + list = coastal_list + count > 5 + } + } + every_in_list = { + list = coastal_list + custom = epidemic_events.5005.a.coastal_quarantine + add_province_modifier = { + modifier = strict_coastal_quarantine + years = 15 + } + } + } + else = { + every_in_list = { + list = coastal_list + add_province_modifier = { + modifier = strict_coastal_quarantine + years = 15 + } + } + } + + reverse_add_opinion = { + modifier = relieved_opinion + opinion = 15 + target = scope:steward + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = -1 + } + } + } + + option = { # Institute a quarantine + name = epidemic_events.5005.b + + if = { #Tooltip ensmallener for if you have more than 5 sea provinces + limit = { + any_in_list = { + list = coastal_list + count > 5 + } + } + every_in_list = { + list = coastal_list + custom = epidemic_events.5005.a.coastal_quarantine + add_province_modifier = { + modifier = coastal_quarantine + years = 10 + } + } + } + else = { + every_in_list = { + list = coastal_list + add_province_modifier = { + modifier = coastal_quarantine + years = 10 + } + } + } + + reverse_add_opinion = { + modifier = relieved_opinion + opinion = 15 + target = scope:steward + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + + option = { # We can't afford this. We'll just have to hope. + name = epidemic_events.5005.c + + stress_impact = { + paranoid = medium_stress_impact_gain + trusting = minor_stress_impact_loss + compassionate = miniscule_stress_impact_loss + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = 1 + } + } + } +} + +# People are attempting to save themselves via... laughter? +# by Nick Meredith +epidemic_events.5006 = { + type = character_event + title = epidemic_events.5006.t + desc = epidemic_events.5006.desc + theme = plague + override_background = corridor_day + left_portrait = { + character = root + animation = eyeroll + } + right_portrait = { + character = scope:councillor + animation = laugh + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + #There be a plague in your subrealm + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + any_councillor = { + is_available_healthy_ai_adult = yes + NOR = { + has_trait = callous + has_trait = irritable + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + save_scope_as = province + } + } + + random_sub_realm_county = { + limit = { + any_county_province = { + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + + random_councillor = { + limit = { + is_available_healthy_ai_adult = yes + NOR = { + has_trait = callous + has_trait = irritable + } + } + save_scope_as = councillor + } + } + + option = { # You're so right! Hee hee hee! + name = epidemic_events.5006.a + + trigger = { + has_trait = eccentric + } + + add_character_modifier = { + modifier = cackling_loon + years = 15 + } + + stress_impact = { + base = medium_stress_impact_loss + calm = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + } + } + } + + option = { # Faith is our only shield! + name = epidemic_events.5006.b + + trigger = { + has_trait = zealous + } + + add_piety = medium_piety_gain + + if = { + limit = { + exists = cp:councillor_court_chaplain + } + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = cp:councillor_court_chaplain + } + } + + stress_impact = { + base = minor_stress_impact_loss + calm = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # Let's give it a go eh? + name = epidemic_events.5006.c + + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = scope:councillor + } + + stress_impact = { + base = minor_stress_impact_loss + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + random = { + chance = 10 + send_interface_toast = { + title = epidemic_events.5006.t + left_icon = root + + add_character_modifier = { + modifier = strange_levity + years = 15 + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 1 + } + } + } + + option = { # This is ridiculous + name = epidemic_events.5006.d + + add_prestige = miniscule_prestige_gain + + stress_impact = { + impatient = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = -1 + } + } + } +} + +# You have a herbalist at your court and people are accusing them of witchcraft +# by Nick Meredith +epidemic_events.5007 = { + type = character_event + title = epidemic_events.5007.t + desc = epidemic_events.5007.desc + theme = plague + override_background = { reference = corridor_day } + left_portrait = { + character = scope:accuser + animation = rage + camera = camera_event_very_left + } + right_portrait = { + character = scope:herbalist + animation = dismissal + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + FAITH = root.faith + GENDER_CHARACTER = root + } + faith = { + NOT = { + trait_is_virtue = witch + } + } + #There be a plague in your subrealm + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + any_courtier_or_guest = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_gardener + } + NOT = { + has_trait = witch + } + save_temporary_scope_as = temp_herbalist + } + + any_courtier_or_guest = { + is_available_healthy_ai_adult = yes + is_ai = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = witch + FAITH = this.faith + GENDER_CHARACTER = this + } + faith = { + NOT = { + trait_is_virtue = witch + } + } + this != scope:temp_herbalist + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + + random_courtier_or_guest = { + limit = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_gardener + } + NOT = { + has_trait = witch + } + } + save_scope_as = herbalist + } + + random_courtier_or_guest = { + limit = { + is_available_healthy_ai_adult = yes + is_ai = yes + this != scope:herbalist + } + save_scope_as = accuser + } + } + + option = { # Herbalism is a noble art! + name = epidemic_events.5007.a + + trigger = { + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_gardener + } + } + trait = lifestyle_herbalist + trait = lifestyle_mystic + trait = lifestyle_physician + trait = lifestyle_gardener + + reverse_add_opinion = { + modifier = grateful_opinion + opinion = 40 + target = scope:herbalist + } + + add_legitimacy_effect = { LEGITIMACY = miniscule_legitimacy_gain } + + stress_impact = { + base = minor_stress_impact_loss + calm = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + wrathful = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 0.5 + } + } + } + + option = { # You're right! Imprison them! + name = epidemic_events.5007.b + + add_piety = medium_piety_gain + + scope:herbalist = { + add_trait = witch + } + + rightfully_imprison_character_effect = { + TARGET = scope:herbalist + IMPRISONER = root + } + + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 40 + target = scope:accuser + } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + trusting = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_compassion = -1 + } + } + } + + option = { # Nonsense + name = epidemic_events.5007.c + + reverse_add_opinion = { + modifier = annoyed_opinion + opinion = -20 + target = scope:accuser + } + + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:herbalist } + } + set_relation_potential_friend = scope:herbalist + } + + stress_impact = { + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 1 + } + } + } +} + +# You begin sequestering yourself more often +# by Nick Meredith +epidemic_events.5008 = { + type = character_event + title = epidemic_events.5008.t + desc = epidemic_events.5008.desc + theme = plague + override_background = relaxing_room + left_portrait = { + character = root + animation = drink_goblet + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + #There be a plague in your subrealm + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + + #And you're a recluse + OR = { + has_trait_introverted_trigger = yes + has_character_modifier = isolating_modifier + } + has_personality_introverted_trigger = no + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + } + + option = { # And nobody is allowed to see me without my permission! + name = epidemic_events.5008.a + + trigger = { + has_trait = paranoid + } + + add_character_modifier = { + modifier = absent_ruler + years = 10 + } + + stress_impact = { + base = major_stress_impact_loss + craven = major_stress_impact_loss + diligent = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + option = { # I must be seen by my subjects. + name = epidemic_events.5008.b + + add_legitimacy_effect = { LEGITIMACY = medium_legitimacy_gain } + + add_character_modifier = { + modifier = present_ruler + years = 10 + } + + stress_impact = { + base = medium_stress_impact_gain + lazy = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + content = minor_stress_impact_gain + shy = medium_stress_impact_gain + reclusive = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # What a great excuse! + name = epidemic_events.5008.c + + add_character_modifier = { + modifier = hiding_from_epidemic + years = 10 + } + + stress_impact = { + patient = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + shy = minor_stress_impact_loss + reclusive = minor_stress_impact_loss + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 1 + } + } + } +} + +# A merchant tries selling you a herbal sachet +# Customary 'Nick makes an event about good smells' event +# by Nick Meredith +epidemic_events.5009 = { + type = character_event + title = epidemic_events.5009.t + desc = epidemic_events.5009.desc + theme = plague + override_background = { reference = market } + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = steward + camera = camera_event_left_crowning_observation + } + right_portrait = { + character = scope:merchant + animation = debating + camera = camera_event_very_right + } + cooldown = { years = 10 } + + trigger = { + is_available = yes + #There be a plague in your subrealm + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { } + } + } + random_county_province = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + } + + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = merchant + } + if = { #As a backup create the character + limit = { + NOT = { exists = scope:merchant } + } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.capital_province.culture + faith = root.capital_province.faith + save_scope_as = merchant + after_creation = { + add_character_flag = created + } + } + } + hidden_effect_new_object = { + scope:merchant = { + move_to_pool = yes + get_pressed_flower_species_effect = { LOCATION = root.location } + create_artifact_pressed_flower_effect = { OWNER = scope:merchant } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_stress_gain_1_modifier + flag_as_trash_artifact = yes + } + } + } + } + + option = { # I'LL TAKE YOUR WHOLE STOCK + name = epidemic_events.5009.a + + trigger = { + OR = { + has_trait = paranoid + has_trait = generous + has_trait = profligate + } + } + trait = paranoid + trait = generous + trait = profligate + + scope:newly_created_artifact = { set_owner = root } + + pay_short_term_gold = { + target = scope:merchant + gold = tiny_gold_value + } + + add_character_modifier = { + modifier = overly_fragrant + years = 15 + } + + stress_impact = { + base = medium_stress_impact_loss + greedy = major_stress_impact_gain + trusting = miniscule_stress_impact_loss + craven = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_greed = -1 + } + } + } + + option = { # Buy a fine sachet + name = epidemic_events.5009.b + + scope:newly_created_artifact = { set_owner = root } + + add_character_modifier = { + modifier = sachet_protection + years = 10 + } + + pay_short_term_gold = { + target = scope:merchant + gold = tiny_gold_value + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = miniscule_stress_impact_loss + profligate = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_greed = -0.5 + } + } + } + + option = { # One please! + name = epidemic_events.5009.c + + add_character_modifier = { + modifier = sachet_protection + years = 10 + } + + stress_impact = { + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + generous = miniscule_stress_impact_loss + profligate = medium_stress_impact_gain + trusting = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # Don't buy anything + name = epidemic_events.5009.d + + stress_impact = { + generous = medium_stress_impact_gain + profligate = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + after = { + scope:merchant = { + silent_disappearance_ai_effect = yes + } + } +} + +# An apocalyptic plague enters your capital +# Only for cool capitals +# by Nick Meredith +epidemic_events.5010 = { + type = character_event + title = epidemic_events.5010.t + desc = { + desc = epidemic_events.5010.opening + #What great capital do you have? + first_valid = { + triggered_desc = { + trigger = { + capital_barony = title:b_santiago + } + desc = epidemic_events.5010.santiago + } + triggered_desc = { + trigger = { + capital_barony = title:b_london + } + desc = epidemic_events.5010.london + } + triggered_desc = { + trigger = { + capital_barony = title:b_roma + } + desc = epidemic_events.5010.rome + } + triggered_desc = { + trigger = { + capital_barony = title:b_paris + } + desc = epidemic_events.5010.paris + } + triggered_desc = { + trigger = { + capital_barony = title:b_constantinople + } + desc = epidemic_events.5010.constantinople + } + triggered_desc = { + trigger = { + capital_barony = title:b_praha + } + desc = epidemic_events.5010.prague + } + triggered_desc = { + trigger = { + capital_barony = title:b_toledo + } + desc = epidemic_events.5010.toledo + } + triggered_desc = { + trigger = { + capital_barony = title:b_cairo + } + desc = epidemic_events.5010.cairo + } + triggered_desc = { + trigger = { + capital_barony = title:b_kanyakubja + } + desc = epidemic_events.5010.kanyakubja + } + triggered_desc = { + trigger = { + capital_barony = title:b_varanasi + } + desc = epidemic_events.5010.varanasi + } + triggered_desc = { + trigger = { + NOR = { + capital_barony = title:b_cairo + capital_barony = title:b_toledo + capital_barony = title:b_praha + capital_barony = title:b_constantinople + capital_barony = title:b_paris + capital_barony = title:b_roma + capital_barony = title:b_london + capital_barony = title:b_santiago + capital_barony = title:b_kanyakubja + capital_barony = title:b_varanasi + } + } + desc = epidemic_events.5010.fallback + } + } + } + theme = plague + override_background = { reference = ce1_condemned_village } + left_portrait = { + character = root + animation = stress + } + cooldown = { years = 50 } + + trigger = { + OR = { + capital_barony = title:b_cairo + capital_barony = title:b_toledo + capital_barony = title:b_praha + capital_barony = title:b_constantinople + capital_barony = title:b_paris + capital_barony = title:b_roma + capital_barony = title:b_london + capital_barony = title:b_santiago + capital_barony = title:b_kanyakubja + capital_barony = title:b_varanasi + } + + # There be a plague in your capital + location = { + any_province_epidemic = { + intensity = apocalyptic + } + } + + is_travelling = no + } + + immediate = { + capital_barony = { + save_scope_as = capital + } + capital_barony.county = { + save_scope_as = capital_region + } + } + + option = { # Donate some money + name = epidemic_events.5010.a + + remove_short_term_gold = medium_gold_value + + scope:capital_region = { + add_county_modifier = { + modifier = plague_alms_donations + years = 10 + } + } + + stress_impact = { + greedy = major_stress_impact_gain + generous = medium_stress_impact_loss + profligate = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -1 + } + } + } + + option = { # Be sad + name = epidemic_events.5010.b + add_legitimacy = miniscule_legitimacy_loss + random_list = { + 1 = { + send_interface_toast = { + title = epidemic_events.5010.b.win + left_icon = root + + add_character_modifier = { + modifier = plague_determined_recover + years = 15 + } + } + } + 1 = { + send_interface_toast = { + title = epidemic_events.5010.b.neutral + left_icon = root + + add_character_modifier = { + modifier = plague_the_long_road + years = 15 + } + } + } + 1 = { + send_interface_toast = { + title = epidemic_events.5010.b.lose + left_icon = root + + add_character_modifier = { + modifier = plague_crippling_sorrow + years = 15 + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = miniscule_stress_impact_loss + profligate = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_greed = -0.5 + } + } + } +} + +# BLACK DEATH EVENTS +# 5900-5999 +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣀⣤⣴⣶⣾⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠀⢀⣀⣤⣶⣿⣿⣿⣿⡿⠿⠛⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⢰⣾⣿⣿⣿⡿⠟⠛⢉⣠⣤⣶⠿⠛⠀⣀⣀⣤⡤⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠙⠛⢉⣁⣤⣶⠿⠟⢋⣁⣤⣴⣾⣿⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠀⠀⠛⢋⣉⣤⣴⣾⣿⠿⠟⠛⢉⡀⢰⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⣠⣴⣿⠿⠿⠛⠋⣁⣤⣴⡾⠀⣾⣿⠀⣿⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠈⠉⠁⢠⣤⣶⣾⣄⠙⢿⣿⣿⠀⠿⠋⣠⣿⣿⣿⣷⣦⣄⡀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠀⠀⠘⣿⣿⣿⣿⣷⣄⠉⣿⣷⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⠀⠀⠀⠀ +#⠀⠀⠀⠀⢀⠘⠿⣿⣿⣿⣿⠸⣿⣿⣿⣿⣿⣿⠿⠿⠿⠿⠿⠿⣿⣿⣧⡀⠀⠀ +#⠀⠀⠰⣾⣿⣷⣦⡈⠛⠿⣿⣆⡉⠛⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡄⠀ +#⠀⠀⠀⡈⠻⢿⣿⣿⣷⣦⣌⡙⠛⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⣼⣿⣷⣤⡉⠛⠿⣿⣿⣿⣷⣶⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⢠⣿⣿⣿⣿⣿⣷⣶⣤⣈⡙⠛⠿⢿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠈⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁⠀⠀⠈⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + +# The Black Death enters your lands +# by Nick Meredith +epidemic_events.5900 = { + type = character_event + window = fullscreen_event + title = epidemic_events.5900.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture_has_asian_heritage_pillar_trigger = yes + } + desc = epidemic_events.5900.desc_asia + } + desc = epidemic_events.5900.desc + } + } + theme = plague + override_background = { reference = ce1_fullscreen_black_death } + cooldown = { years = 100 } + + immediate = { + add_character_flag = black_death_splash + play_music_cue = black_death + add_plague_county_modifiers = yes + if = { #just to be sure the story about preparing for black death ends + limit = { + any_owned_story = { + type = story_cycle_black_death + } + } + random_owned_story = { + type = story_cycle_black_death + end_story = yes + } + } + } + + option = { + name = { + text = epidemic_events.5900.christian + trigger = { + faith = { + religion_tag = christianity_religion + } + } + } + name = { + text = epidemic_events.5900.fallback + trigger = { + NOT = { + faith = { + religion_tag = christianity_religion + } + } + } + } + + add_stress = medium_stress_gain + } + + after = { + trigger_event = { + id = health.3001 days = { court_physician_search_min court_physician_search_max } + } + } +} + +# Demand your physician does an autopsy +# by Nick Meredith +epidemic_events.5901 = { + type = character_event + title = epidemic_events.5901.t + desc = epidemic_events.5901.desc + theme = plague + override_background = { reference = physicians_study } + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:physician + animation = worry + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + #You have a court physician + court_physician_available_trigger = yes + } + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + + option = { # How about we do it together? + name = epidemic_events.5901.a + + trigger = { + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + has_trait = whole_of_body + } + } + + random = { + chance = 75 + add_character_modifier = { + modifier = plague_insights_gained + years = 15 + } + hidden_effect = { + send_interface_toast = { + title = epidemic_events.5901.a.tt + left_icon = root + right_icon = scope:physician + } + } + } + + random = { + chance = 10 + send_interface_toast = { + title = epidemic_events.5901.a.tt.plague + left_icon = root + + add_trait = bubonic_plague + } + } + + scope:physician = { + random = { + chance = 10 + + add_trait = bubonic_plague + } + + add_opinion = { + modifier = respect_opinion + opinion = 25 + target = root + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 1 + } + } + } + + option = { # I demand it + name = epidemic_events.5901.b + + random = { + chance = 50 + add_character_modifier = { + modifier = plague_insights_gained + years = 15 + } + hidden_effect = { + send_interface_toast = { + title = epidemic_events.5901.a.tt + left_icon = root + } + } + } + + scope:physician = { + random = { + chance = 10 + add_trait = bubonic_plague + } + + add_opinion = { + modifier = scared_opinion + opinion = -15 + target = root + } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + patient = minor_stress_impact_gain + callous = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # All right, all right + name = epidemic_events.5901.c + + reverse_add_opinion = { + modifier = grateful_opinion + opinion = 15 + target = scope:physician + } + + stress_impact = { + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Calm hordes of refugees +# by Nick Meredith +epidemic_events.5902 = { + type = character_event + title = epidemic_events.5902.t + desc = epidemic_events.5902.desc + theme = plague + override_background = { reference = ep2_travel_bridge } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:marshal + animation = marshal + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + + any_realm_border_county = { + any_county_province = { + is_coastal = no #To ensure you don't get landlocked by yourself + } + } + + #You have a marshal in your locatiom + cp:councillor_marshal ?= { location = root.location } + } + + immediate = { + location = { + save_scope_as = province + } + + cp:councillor_marshal = { + save_scope_as = marshal + } + + random_realm_border_county = { + limit = { + any_county_province = { + is_coastal = no #To ensure you don't get landlocked by yourself + } + } + save_scope_as = border_county + random_county_province = { + save_scope_as = border_province + } + } + } + + option = { # Kill them! Kill them all! + name = epidemic_events.5902.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = paranoid + dread > 50 + } + } + + scope:border_province = { + add_province_modifier = { + modifier = brutal_crackdown + years = 10 + } + } + + if = { + limit = { + scope:marshal = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + scope:marshal = { + add_opinion = { + modifier = pleased_opinion + opinion = 15 + target = root + } + } + } + else = { + scope:marshal = { + add_opinion = { + modifier = cruelty_opinion + opinion = -15 + target = root + } + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + just = miniscule_stress_impact_loss + arbitrary = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Set up shanty towns + name = epidemic_events.5902.b + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:border_province = { + add_province_modifier = { + modifier = shanty_towns + years = 10 + } + } + + stress_impact = { + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + compassionate = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # Turn them all away + name = epidemic_events.5902.c + + scope:border_province = { + add_province_modifier = { + modifier = border_defended + years = 10 + } + } + + stress_impact = { + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + option = { # Let them in + name = epidemic_events.5902.d + + scope:border_province = { + add_province_modifier = { + modifier = refugees_coddled + years = 10 + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +# A family member warns you not to take a ride in the countryside +# by Nick Meredith +epidemic_events.5903 = { + type = character_event + title = epidemic_events.5903.t + desc = epidemic_events.5903.desc + theme = plague + override_background = { reference = garden } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:family + animation = worry + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + + #You have a family member in your location + any_close_family_member = { + is_available = yes + location = root.location + age > 10 + } + + NOR = { + age < 15 + has_trait = incapable + } + } + + immediate = { + random_close_family_member = { + limit = { + is_available = yes + location = root.location + age > 10 + } + save_scope_as = family + } + } + + option = { # You're probably right + name = epidemic_events.5903.a + + add_character_modifier = { + modifier = cautious_rider + years = 10 + } + + reverse_add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = scope:family + } + + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + trusting = minor_stress_impact_gain + paranoid = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Bah, it'll be fine! + name = epidemic_events.5903.b + + add_character_modifier = { + modifier = dangerous_rides + years = 10 + } + + stress_impact = { + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + compassionate = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +# A wandering preacher is spreading fear +# by Nick Meredith +epidemic_events.5904 = { + type = character_event + title = epidemic_events.5904.t + desc = epidemic_events.5904.desc + theme = plague + override_background = { reference = market } + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:doomsday_preacher + animation = personality_zealous + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + is_landed = yes + NOT = { + has_trait = incapable + } + } + + immediate = { + location.county = { + random_county_province = { + save_scope_as = doomsday_province + } + } + + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + weight = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = zealous + has_trait = eccentric + } + } + } + save_scope_as = doomsday_preacher + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = doomsday_preacher + } + } + } + + option = { # OH GOD YOU'RE RIGHT + name = epidemic_events.5904.a + + trigger = { + has_trait = paranoid + } + + add_character_modifier = { + modifier = overly_protective + years = 10 + } + + stress_impact = { + base = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { # Lock them up for fearmongering + name = epidemic_events.5904.b + + hard_imprison_character_effect = { + TARGET = scope:doomsday_preacher + IMPRISONER = root + } + + scope:doomsday_province = { + add_province_modifier = { + modifier = angry_crowds + years = 10 + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + just = medium_stress_impact_gain + arbitrary = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Who are you to say that? + name = epidemic_events.5904.c + + duel = { + skill = learning + target = scope:doomsday_preacher + # You win the theological debate + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.5904.c.tt.success + root = { + send_interface_toast = { + title = epidemic_events.5904.c.tt.success + left_icon = root + right_icon = scope:doomsday_preacher + + scope:doomsday_province = { + add_province_modifier = { + modifier = allayed_fears + years = 10 + } + } + } + } + } + # You lose the debate + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.5904.c.tt.failure + root = { + send_interface_toast = { + title = epidemic_events.5904.c.tt.failure + left_icon = root + right_icon = scope:doomsday_preacher + add_legitimacy = miniscule_legitimacy_loss + scope:doomsday_province = { + add_province_modifier = { + modifier = mass_panic + years = 10 + } + } + } + } + } + } + + stress_impact = { + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + ai_zeal = 1 + } + } + } + + option = { # Bah, nobody will take them seriously + name = epidemic_events.5904.d + add_legitimacy = miniscule_legitimacy_loss + scope:doomsday_province = { + random = { + chance = 15 + add_province_modifier = { + modifier = mass_panic + years = 10 + } + } + hidden_effect = { + every_neighboring_province = { + random = { + chance = 15 + add_province_modifier = { + modifier = mass_panic + years = 10 + } + } + } + } + } + + custom_tooltip = epidemic_events.5904.d.tt + + stress_impact = { + fickle = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } +} + +# Rumours about the plague's nature begins to spread +# by Nick Meredith +epidemic_events.5905 = { + type = character_event + title = epidemic_events.5905.t + desc = epidemic_events.5905.desc + theme = plague + override_background = { reference = tavern } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:peasant + animation = fear + } + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + is_landed = yes + drinks_alcohol_trigger = yes + } + + immediate = { + location.county = { + random_county_province = { + save_scope_as = province + } + } + + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = peasant + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = peasant + } + } + } + + option = { # Trust me, I'm a doctor + name = epidemic_events.5905.a + + trigger = { + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + } + } + + scope:province = { + hidden_effect = { + every_neighboring_province = { + random = { + chance = 50 + add_province_modifier = { + modifier = rumours_stifled + years = 10 + } + } + } + } + add_province_modifier = { + modifier = rumours_stifled + years = 10 + } + } + + custom_tooltip = epidemic_events.5905.a.tt + + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Look, does that sound likely to you? + name = epidemic_events.5905.b + + duel = { + skills = { learning diplomacy } + target = scope:peasant + # You convince them + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.5905.b.tt.success + root = { + send_interface_toast = { + title = epidemic_events.5905.b.tt.success + left_icon = root + right_icon = scope:peasant + + scope:province = { + hidden_effect = { + every_neighboring_province = { + random = { + chance = 50 + add_province_modifier = { + modifier = rumours_stifled + years = 10 + } + } + } + } + add_province_modifier = { + modifier = rumours_stifled + years = 10 + } + } + + custom_tooltip = epidemic_events.5905.a.tt + } + } + } + # They are unconvinced + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.5905.b.tt.failure + root = { + send_interface_toast = { + title = epidemic_events.5905.b.tt.failure + left_icon = root + right_icon = scope:peasant + add_legitimacy = miniscule_legitimacy_loss + scope:province = { + hidden_effect = { + every_neighboring_province = { + random = { + chance = 50 + add_province_modifier = { + modifier = rumours_proliferated + years = 10 + } + } + } + } + add_province_modifier = { + modifier = rumours_proliferated + years = 10 + } + } + + custom_tooltip = epidemic_events.5905.a.tt + } + } + } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + wrathful = minor_stress_impact_gain + gregarious = miniscule_stress_impact_loss + shy = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { # Confronting them will only lead to more panic + name = epidemic_events.5905.c + + random = { + chance = 50 + add_legitimacy = miniscule_legitimacy_loss + scope:province = { + add_province_modifier = { + modifier = uncaring_ruler + years = 15 + } + } + } + + stress_impact = { + fickle = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +# A roving band of flagellants turn up +# by Nick Meredith +epidemic_events.5906 = { + type = character_event + title = epidemic_events.5906.t + desc = epidemic_events.5906.desc + theme = plague + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:flagellant + animation = paranoia + } + lower_center_portrait = scope:marshal + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_landed = yes + faith = { + religion_tag = christianity_religion + } + exists = cp:councillor_marshal + } + + immediate = { + location.county = { + random_county_province = { + save_scope_as = doomsday_province + } + } + + cp:councillor_marshal = { + save_scope_as = marshal + } + + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + has_trait = flagellant + is_imprisoned = no + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + has_trait = flagellant + is_imprisoned = no + } + save_scope_as = flagellant + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + trait = flagellant + save_scope_as = flagellant + } + } + + save_scope_as = root_scope + } + + option = { # You're tearing the faith apart, you maniacs! + name = epidemic_events.5906.a + + trigger = { + has_trait = zealous + } + + duel = { + skill = learning + target = scope:flagellant + # You convince them + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = epidemic_events.5906.a.tt.success + send_interface_toast = { + title = epidemic_events.5906.a.tt.success + left_icon = root + right_icon = scope:flagellant + + add_character_modifier = { + modifier = flagellants_acquiesce + years = 10 + } + } + } + # They are unconvinced + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = epidemic_events.5906.a.tt.failure + send_interface_toast = { + title = epidemic_events.5906.a.tt.failure + left_icon = root + right_icon = scope:flagellant + add_legitimacy = miniscule_legitimacy_loss + scope:doomsday_province = { + add_province_modifier = { + modifier = unrestrained_flagellants + years = 10 + } + } + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = minor_stress_impact_loss + content = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # You're right, honestly. + name = epidemic_events.5906.b + + trigger = { + OR = { + has_trait = paranoid + has_trait = fickle + } + } + + add_trait = flagellant + + stress_impact = { + base = major_stress_impact_loss + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + cynical = miniscule_stress_impact_loss + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 0 # Don't do this unless you're already flagellant + modifier = { + add = 50 + has_trait = flagellant + } + } + } + + + option = { # Lock 'em up! + name = epidemic_events.5906.c + + hard_imprison_character_effect = { + TARGET = scope:flagellant + IMPRISONER = root + } + + random = { + chance = 50 + scope:doomsday_province = { + add_province_modifier = { + modifier = pacified_flagellants + years = 10 + } + hidden_effect = { + every_neighboring_province = { + random = { + chance = 25 + add_province_modifier = { + modifier = pacified_flagellants + years = 10 + } + } + } + } + } + } + + custom_tooltip = epidemic_events.5906.d.tt + + stress_impact = { + calm = minor_stress_impact_gain + wrathful = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { # Let them flagellate + name = epidemic_events.5906.d + + random = { + chance = 50 + faith = { + change_fervor = { + value = -5 + desc = fervor_loss_flagellants + } + } + scope:doomsday_province = { + add_province_modifier = { + modifier = eager_populace + years = 10 + } + } + } + + every_vassal_or_below = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -20 + } + } + + stress_impact = { + fickle = minor_stress_impact_loss + stubborn = minor_stress_impact_gain + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +# You develop a slight cough +# by Nick Meredith +epidemic_events.5907 = { + type = character_event + title = epidemic_events.5907.t + desc = epidemic_events.5907.desc + theme = plague + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = paranoia + } + lower_center_portrait = scope:physician + cooldown = { years = 10 } + + trigger = { + is_available_healthy_adult = yes + court_physician_available_trigger = yes + } + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + + option = { # I'll consult with my physician for some special treatments, just in case + name = epidemic_events.5907.a + + remove_short_term_gold = minor_gold_value + + add_character_modifier = { + modifier = regular_checkups + years = 5 + } + + stress_impact = { + base = miniscule_stress_impact_loss + paranoid = major_stress_impact_loss #Throw 'em a bone! + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + greedy = medium_stress_impact_gain + profligate = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -1 + } + } + } + + option = { # I'm sure it's nothing + name = epidemic_events.5907.b + + random_list = { + 69 = { #You feel a little better + desc = epidemic_events.5907.b.success + send_interface_toast = { + title = epidemic_events.5907.b.success + left_icon = root + + add_stress = minor_stress_loss + } + } + 29 = { #You have a small sniffle + desc = epidemic_events.5907.b.failure + send_interface_toast = { + title = epidemic_events.5907.b.failure + left_icon = root + + add_character_modifier = { + modifier = under_the_weather + years = 5 + } + } + } + 2 = { #You have something nastier... + desc = epidemic_events.5907.b.criticalfailure + send_interface_toast = { + title = epidemic_events.5907.b.criticalfailure + left_icon = root + + add_stress = medium_stress_gain + + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Gravediggers demand more pay +# by Nick Meredith +epidemic_events.5908 = { + type = character_event + title = epidemic_events.5908.t + desc = epidemic_events.5908.desc + theme = plague + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:gravedigger + animation = beg + } + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_landed = yes + } + + immediate = { + location.county = { + random_county_province = { + save_scope_as = province + } + } + + if = { + limit = { + any_pool_character = { + province = root.location + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = gravedigger + } + } + else = { + create_character = { + template = peasant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = gravedigger + } + } + } + + option = { # You'll be the next in the grave if you cross me laddie + name = epidemic_events.5908.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + dread > 50 + } + } + + scope:province = { + add_province_modifier = { + modifier = gravediggers_threatened + years = 10 + } + } + + reverse_add_opinion = { + modifier = cruelty_opinion + opinion = -25 + target = scope:gravedigger + } + + stress_impact = { + base = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # You'll be compensated fairly + name = epidemic_events.5908.b + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:province = { + add_province_modifier = { + modifier = gravediggers_compensated + years = 15 + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + paranoid = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + ai_greed = -1 + } + } + } + + option = { # Get out of my throneroom + name = epidemic_events.5908.c + + scope:province = { + add_province_modifier = { + modifier = gravediggers_replaced + years = 10 + } + } + + stress_impact = { + generous = medium_stress_impact_gain + greedy = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +epidemic_events.5998 = { #Black death story cycle pacing control + hidden = yes + + immediate = { + if = { + limit = { + any_neighboring_top_liege_realm_owner = { + has_character_flag = black_death_splash + } + } + if = { + limit = { + has_character_flag = black_death_closer + } + remove_character_flag = black_death_closer + } + add_character_flag = black_death_nearby + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { + any_neighboring_top_liege_realm_owner = { + has_character_flag = black_death_splash + } + } + } + add_character_flag = black_death_closer + } + if = { + limit = { + OR = { + has_character_flag = black_death_closer + has_character_flag = black_death_nearby + } + NOT = { + has_character_flag = black_death_info_event + } + } + trigger_event = { + id = epidemic_events.5999 + days = { 2 4 } + } + } + } +} + +# The Black Death is closing in +# Used to trigger Black Death Story cycle +# by Nick Meredith +epidemic_events.5999 = { + type = character_event + title = epidemic_events.5999.t + desc = epidemic_events.5999.desc + theme = plague + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 100 } + + trigger = { + is_ai = no + has_dlc_feature = legends_of_the_dead + is_available_adult = yes + is_travelling = no + NOT = { + any_sub_realm_county = { #Black Plague is already here, no need to talk about it closing in + any_county_province = { + any_province_epidemic = { + this = global_var:black_death + } + } + } + } + } + + on_trigger_fail = { + trigger_event = { + id = epidemic_events.5999 + days = { 7 14 } + } + } + + immediate = { + play_music_cue = mx_cue_death + add_character_flag = black_death_info_event + if = { + limit = { + NOR = { + has_character_flag = black_death_closer + has_character_flag = black_death_nearby + } + } + add_character_flag = black_death_closer + } + } + + option = { # Ha, let them die! + name = epidemic_events.5999.a + + trigger = { + has_trait = callous + } + + flavor = epidemic_events.5999.a.tt + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # The end times are upon us! + name = epidemic_events.5999.b + + trigger = { + has_trait = paranoid + } + + flavor = epidemic_events.5999.b.tt + + add_character_modifier = { + modifier = plague_tales + years = 15 + } + + stress_impact = { + base = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = -1 + } + } + } + + option = { # Oh no + name = { + trigger = { + faith = { + religion_tag = christianity_religion + } + } + + text = epidemic_events.5999.c.christian + } + name = { + trigger = { + NOT = { + faith = { + religion_tag = christianity_religion + } + } + } + text = epidemic_events.5999.c.notchristian + } + + stress_impact = { + base = miniscule_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# The Black Death enters the lands near your camp +# by Nick Meredith +epidemic_events.6000 = { + type = character_event + window = fullscreen_event + title = epidemic_events.5900.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture_has_asian_heritage_pillar_trigger = yes + } + desc = epidemic_events.5900.desc_asia + } + desc = epidemic_events.5900.desc + } + } + theme = plague + override_background = { reference = ce1_fullscreen_black_death } + cooldown = { years = 100 } + + trigger = { + OR = { + has_government = landless_adventurer_government + is_landless_administrative = yes + } + location = { + any_province_epidemic = { + intensity = apocalyptic + epidemic_type.epidemic_trait = trait:bubonic_plague + } + } + } + + immediate = { + add_character_flag = black_death_splash + play_music_cue = black_death + } + + option = { + name = { + text = epidemic_events.5900.christian + trigger = { + faith = { + religion_tag = christianity_religion + } + } + } + name = { + text = epidemic_events.5900.fallback + trigger = { + NOT = { + faith = { + religion_tag = christianity_religion + } + } + } + } + + add_stress = medium_stress_gain + } + + after = { + trigger_event = { + id = health.3001 days = { court_physician_search_min court_physician_search_max } + } + } +} diff --git a/N3OW/events/dlc/ce1/epidemic_events_2.txt b/N3OW/events/dlc/ce1/epidemic_events_2.txt new file mode 100644 index 00000000..76c36da6 --- /dev/null +++ b/N3OW/events/dlc/ce1/epidemic_events_2.txt @@ -0,0 +1,951 @@ +namespace = epidemic_events + +epidemic_events.2001 = { #defender trying to status quo the vassal war cuz he's sick + type = character_event + title = epidemic_events.2001.t + desc = epidemic_events.2001.desc + theme = plague + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:pleading_vassal + animation = beg + } + lower_right_portrait = { + character = scope:attacking_vassal + } + override_background = { + reference = army_camp + } + override_effect_2d = { + reference = fog + } + cooldown = { years = 30 } + + trigger = { + is_available_adult = yes + any_vassal = { + is_ai = yes + is_at_war = yes + any_character_war = { + primary_attacker = { + is_vassal_of = root + is_ai = yes + } + is_defender = prev + attacker_war_score > 30 + } + realm_has_any_epidemic = { SIZE = 3 INTENSITY = minor } + current_gold_value > minor_gold_value + } + } + + immediate = { + random_vassal = { + limit = { + is_ai = yes + is_at_war = yes + any_character_war = { + primary_attacker = { + is_vassal_of = root + is_ai = yes + } + is_defender = prev + attacker_war_score > 30 + } + realm_has_any_epidemic = { SIZE = 2 INTENSITY = minor } + current_gold_value > minor_gold_value + } + save_scope_as = pleading_vassal + get_random_realm_epidemic = { INTENSITY = minor } + random_character_war = { + limit = { + primary_attacker = { + is_vassal_of = root + is_ai = yes + } + is_defender = prev + attacker_war_score > 30 + } + save_scope_as = vassal_war + } + } + scope:vassal_war = { + primary_attacker = { + save_scope_as = attacking_vassal + } + } + set_variable = { + name = gold_transfer_value + value = scope:pleading_vassal.current_gold_value + } + scope:pleading_vassal = { + pay_short_term_gold = { + target = root + gold = current_gold_value + } + hidden_effect = { + if = { + limit = { + NOT = { has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait } + } + random = { + chance = 25 + infect_with_epidemic = scope:epidemic_scope + } + } + } + } + } + + option = { #send a royal order for white peace + name = epidemic_events.2001.c + + duel = { + skill = diplomacy + target = scope:attacking_vassal + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + send_interface_toast = { + title = epidemic_events.2001.c.success + left_icon = scope:pleading_vassal + right_icon = scope:attacking_vassal + scope:vassal_war = { + end_war = white_peace + } + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_gain } + scope:pleading_vassal = { + add_opinion = { + modifier = thankful_opinion + opinion = 30 + target = root + } + } + } + } + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = epidemic_events.2001.c.failure + left_icon = scope:pleading_vassal + right_icon = scope:attacking_vassal + scope:pleading_vassal = { + add_opinion = { + modifier = disappointed_opinion + opinion = -25 + target = root + } + } + custom_tooltip = epidemic_events.2001.danger + } + hidden_effect = { + random = { + chance = 10 + trigger_event = { + months = 4 + id = epidemic_events.2002 + } + } + } + } + } + + stress_impact = { + greedy = medium_stress_gain + compassionate = medium_stress_loss + just = medium_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = low_chance_impact_positive_ai_value + ai_rationality = low_chance_impact_positive_ai_value + } + } + } + + option = { #imprison the other guy from traveling to you during a pandemic and wash whatever he touched + name = epidemic_events.2001.b + flavor = epidemic_events.2001.b.desc + + imprison = { + target = scope:pleading_vassal + type = dungeon + } + + scope:pleading_vassal = { + add_opinion = { + modifier = angry_opinion + opinion = -40 + target = root + } + } + custom_tooltip = epidemic_events.2001.danger + hidden_effect = { + random = { + chance = 10 + trigger_event = { + months = 4 + id = epidemic_events.2002 + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = low_chance_impact_positive_ai_value + ai_rationality = low_chance_impact_positive_ai_value + } + } + + stress_impact = { + compassionate = medium_stress_gain + just = medium_stress_gain + paranoid = major_stress_loss + } + } + + option = { #pay money to end war + name = epidemic_events.2001.a + + scope:vassal_war = { + end_war = white_peace + } + pay_treasury_or_gold = { + target = scope:attacking_vassal + value = { + value = root.var:gold_transfer_value + multiply = 0.5 + } + } + + scope:pleading_vassal = { + add_opinion = { + modifier = thankful_opinion + opinion = 30 + target = root + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = low_chance_impact_negative_ai_value + ai_compassion = low_chance_impact_positive_ai_value + } + } + + stress_impact = { + greedy = medium_stress_gain + compassionate = medium_stress_loss + } + + + } + + after = { + hidden_effect = { + if = { + limit = { + scope:pleading_vassal = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + is_imprisoned = no + } + } + random_list = { + 60 = { + random_courtier = { + limit = { + NOT = { has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait } + } + save_scope_as = infected_courtier + } + send_interface_toast = { + title = epidemic_events.2001.epidemic_spread.t + left_icon = scope:pleading_vassal + right_icon = scope:infected_courtier + scope:infected_courtier = { + infect_with_epidemic = scope:epidemic_scope + } + } + } + 20 = { + if = { + limit = { + NOT = { has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait } + } + } + random_courtier = { + limit = { + NOT = { has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait } + } + save_scope_as = first_infected_courtier + } + random_courtier = { + limit = { + NOT = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + scope:first_infected_courtier = this + } + } + save_scope_as = second_infected_courtier + } + send_interface_toast = { + title = epidemic_events.2001.epidemic_spread.t + left_icon = scope:second_infected_courtier + right_icon = scope:first_infected_courtier + scope:first_infected_courtier = { + infect_with_epidemic = scope:epidemic_scope + } + scope:second_infected_courtier = { + infect_with_epidemic = scope:epidemic_scope + } + } + } + } + } + } + } +} + +epidemic_events.2002 = { + type = character_event + title = epidemic_events.2002.t + desc = epidemic_events.2002.desc + theme = plague + + left_portrait = { + character = root + animation = stress + } + lower_left_portrait = scope:attacking_vassal + lower_right_portrait = scope:pleading_vassal + + trigger = { + exists = scope:epidemic_scope + exists = scope:vassal_war + is_ai = no + } + + override_background = { + reference = battlefield + } + override_effect_2d = { + reference = fog + } + + immediate = { + if = { + limit = { + scope:epidemic_scope = { + outbreak_intensity = minor + } + } + scope:epidemic_scope = { + set_epidemic_outbreak_intensity = major + } + } + else = { + scope:epidemic_scope = { + set_epidemic_outbreak_intensity = apocalyptic + } + } + add_legitimacy = miniscule_legitimacy_loss + } + + option = { + name = epidemic_events.2002.a + stress_impact = { + base = minor_stress_gain + } + } + +} + +epidemic_events.2003 = { #maa are dying from war + type = character_event + title = epidemic_events.2003.t + desc = epidemic_events.2003.desc + theme = plague + + left_portrait = { + character = root + animation = stress + } + + right_portrait = { + character = scope:marshal + animation = marshal_shield + } + + override_background = { + reference = army_camp + } + + override_effect_2d = { + reference = flies + } + + cooldown = { years = 8 } + + trigger = { + is_available_adult = yes + any_held_county = { + any_county_province = { + has_stationed_regiment = yes + any_province_epidemic = { + intensity >= minor + } + } + save_temporary_scope_as = first_county + } + any_held_county = { + this != scope:first_county + any_county_province = { + has_stationed_regiment = yes + any_province_epidemic = { + intensity >= minor + } + } + } + + exists = cp:councillor_marshal + } + immediate = { + random_held_county = { + limit = { + any_county_province = { + has_stationed_regiment = yes + any_province_epidemic = { + intensity >= minor + } + } + } + random_county_province = { + limit = { + has_stationed_regiment = yes + any_province_epidemic = { + intensity >= minor + } + } + save_scope_as = first_epidemic_province + random_province_epidemic = { + save_scope_as = epidemic_scope + } + } + save_scope_as = first_epidemic_county + } + random_held_county = { + limit = { + this != scope:first_epidemic_county + any_county_province = { + has_stationed_regiment = yes + any_province_epidemic = { + intensity >= minor + } + } + } + random_county_province = { + limit = { + has_stationed_regiment = yes + any_province_epidemic = { + intensity >= minor + } + } + save_scope_as = second_epidemic_province + } + } + cp:councillor_marshal = { save_scope_as = marshal } + } + + option = { #pay more to get more recruits + name = epidemic_events.2003.a + + every_maa_regiment = { + change_maa_troops_count = { + value = { + value = this.maa_current_troops_count + multiply = -0.25 + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = low_chance_impact_negative_ai_value + ai_rationality = low_chance_impact_positive_ai_value + } + } + + stress_impact = { + greedy = medium_stress_gain + ambitious = medium_stress_loss + } + } + + option = { #dont care, press peasants as maa + name = epidemic_events.2003.b + + scope:first_epidemic_province = { + add_province_modifier = { + modifier = epidemic_pressed_levies + years = 5 + } + } + + scope:second_epidemic_province = { + add_province_modifier = { + modifier = epidemic_pressed_levies + years = 5 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = low_chance_impact_positive_ai_value + ai_compassion = low_chance_impact_negative_ai_value + ai_rationality = low_chance_impact_positive_ai_value + } + } + + stress_impact = { + just = medium_stress_gain + } + } + + option = { #close the barracks! + name = epidemic_events.2003.c + + scope:first_epidemic_province = { + add_province_modifier = { + modifier = epidemic_closed_barracks + years = 5 + } + } + + scope:second_epidemic_province = { + add_province_modifier = { + modifier = epidemic_closed_barracks + years = 5 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = low_chance_impact_positive_ai_value + ai_rationality = low_chance_impact_positive_ai_value + } + } + + stress_impact = { + paranoid = medium_stress_loss + } + } +} + +epidemic_events.2004 = { #Medicinal Jar creation event + hidden = yes + + trigger = { + is_available_adult = yes + court_position:court_physician_court_position ?= { + is_available_ai_adult = yes + culture != root.culture + NOT = { + has_character_flag = physician_medicinal_jar + } + } + realm_has_any_nearby_epidemic = { SIZE = 4 INTENSITY = minor } + } + + cooldown = { years = 160 } + + immediate = { + court_position:court_physician_court_position = { + save_scope_as = physician + } + scope:physician = { + create_artifact = { + name = medicine_jar + description = medicine_jar_desc + type = miscellaneous + visuals = glazed_jar + modifier = artifact_epidemic_resistance_1_modifier + modifier = artifact_learning_lifestyle_xp_2_modifier + save_scope_as = medicine_jar + quality = 50 + } + add_character_flag = physician_medicinal_jar + } + + if = { + limit = { + scope:physician = { + can_equip_artifact = scope:medicine_jar + } + } + scope:medicine_jar = { + equip_artifact_to_owner = yes + } + get_random_nearby_realm_epidemic = { INTENSITY = minor } + trigger_event = { + days = { 3 7 } + id = epidemic_events.2005 + } + } + } + +} + +epidemic_events.2005 = { #Glass jar artifact + type = character_event + title = epidemic_events.2005.t + desc = epidemic_events.2005.desc + theme = plague + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:physician + animation = physician + } + + artifact = { + target = scope:medicine_jar + position = lower_center_portrait + } + + override_background = { + reference = physicians_study + } + + trigger = { + scope:physician = { is_alive = yes } + } + + option = { #politely ask the physisican to part with the jar + name = epidemic_events.2005.a + duel = { + skill = diplomacy + target = scope:physician + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + send_interface_toast = { + title = epidemic_events.2005.a.success + left_icon = scope:physician + scope:medicine_jar = { + set_owner = root + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = epidemic_events.2005.a.failure + left_icon = scope:physician + scope:medicine_jar = { + add_artifact_modifier = artifact_physician_aptitude_1_modifier + } + } + } + } + + stress_impact = { + craven = minor_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = low_chance_impact_negative_ai_value + } + } + + + } + + option = { #violently grab the jar from physician + name = epidemic_events.2005.b + + scope:physician = { + add_opinion = { + modifier = fp3_stole_from_me + opinion = -25 + target = root + } + progress_towards_rival_effect = { + REASON = rival_stole_artifact + CHARACTER = root + OPINION = 0 + } + } + + scope:medicine_jar = { + set_owner = root + } + + stress_impact = { + temperate = medium_stress_gain + just = medium_stress_gain + paranoid = medium_stress_loss + wrathful = medium_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = low_chance_impact_positive_ai_value + ai_energy = low_chance_impact_positive_ai_value + ai_rationality = low_chance_impact_negative_ai_value + } + } + } + + option = { #let phycisian keep his precious jar + name = epidemic_events.2005.c + scope:medicine_jar = { + add_artifact_modifier = artifact_physician_aptitude_1_modifier + } + + stress_impact = { + temperate = medium_stress_loss + just = medium_stress_loss + trusting = medium_stress_loss + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = low_chance_impact_positive_ai_value + ai_rationality = low_chance_impact_positive_ai_value + ai_greed = low_chance_impact_negative_ai_value + } + } + } + +} + +epidemic_events.2006 = { #Dancing plague + type = character_event + title = epidemic_events.2006.t + desc = epidemic_events.2006.desc + theme = plague + override_background = courtyard + override_effect_2d = { reference = flies } + + left_portrait = { + character = root + animation = stress + } + + right_portrait = { + character = scope:dance_victim + animation = dancing_plague + } + + trigger = { + is_available_adult = yes + OR = { + is_ai = no + this = top_liege + } + capital_province = { + any_province_epidemic = { + #epidemic_type = epidemic_type:ergotism + intensity < apocalyptic + } + } + NOT = { + has_character_flag = had_event_dancing_plague + } + } + + weight_multiplier = { + base = 1 + modifier = { #Since a big outbreak occurred in Aachen 1374 + add = 9 + capital_province = { + county = title:c_aachen + } + current_date >= 1370.1.1 + current_date <= 1380.1.1 + } + modifier = { #Since an outbreak occurred in Erfurt 1247 + add = 9 + capital_province = { + duchy = title:d_thuringia + } + current_date >= 1240.1.1 + current_date <= 1250.1.1 + } + modifier = { #Since an outbreak occurred in Kolbigk 1021 + add = 9 + capital_province = { + geographical_region = ghw_region_saxony + } + current_date >= 1020.1.1 + current_date <= 1030.1.1 + + } + modifier = { #Since it historically occurred in Europe + add = 1 + capital_province = { + geographical_region = world_europe + } + } + + } + + immediate = { + capital_province = { + random_province_epidemic = { + limit = { + epidemic_type = epidemic_type:ergotism + outbreak_intensity < apocalyptic + } + save_scope_as = dancing_plague + } + } + create_character = { + template = servant_character + dynasty = none + location = root.capital_province + save_scope_as = dance_victim + } + hidden_effect = { + scope:dance_victim = { + add_trait = ergotism + } + } + + scope:dancing_plague = { + set_epidemic_outbreak_intensity = apocalyptic + } + + add_character_flag = had_event_dancing_plague + } + + option = { #let's join the paaartey + trigger = { + has_trait = eccentric + } + name = epidemic_events.2006.a + add_character_modifier = { + modifier = ce1_gone_dancing + years = 2 + } + + hidden_effect = { + random = { + chance = 10 + trigger_event = { id = health.1017 days = { 5 15 } } #You contract ergotism + } + } + + stress_impact = { + eccentric = medium_stress_loss + } + + ai_chance = { + base = 100 + } + + } + + option = { #slay the demon! + trigger = { + has_trait = zealous + } + name = epidemic_events.2006.d + add_piety = minor_piety_gain + + scope:dance_victim = { + death = { + death_reason = death_murder + killer = root + } + } + + stress_impact = { + zealous = medium_stress_loss + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = low_chance_impact_negative_ai_value + ai_zeal = low_chance_impact_positive_ai_value + } + } + } + + option = { #eh, every dance stops eventually, right? + name = epidemic_events.2006.b + + capital_county = { + add_county_modifier = { + modifier = dance_plague_modifier + years = 4 + } + } + + stress_impact = { + compassionate = minor_stress_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = low_chance_impact_negative_ai_value + } + } + } + + option = { #tie them down! allieviate their pains somehow + name = epidemic_events.2006.c + + hidden_effect = { + random = { + chance = 10 + trigger_event = { id = health.1017 days = { 5 15 } } #You contract ergotism + } + } + + stress_impact = { + lustful = medium_stress_loss + compassionate = medium_stress_loss + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = low_chance_impact_positive_ai_value + } + } + } +} diff --git a/N3OW/events/dlc/ce1/legend_ending_events.txt b/N3OW/events/dlc/ce1/legend_ending_events.txt new file mode 100644 index 00000000..bfeb6d02 --- /dev/null +++ b/N3OW/events/dlc/ce1/legend_ending_events.txt @@ -0,0 +1,134 @@ +namespace = story_event_legends + +################################### +# Legend Ending Events +# 0001 - 0100 +################################### + +#Heroic Ending Story Event +story_event_legends.0001 = { + type = character_event + window = fullscreen_event + title = story_event_legends.0001.t + desc = { + desc = story_event_legends.0001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:promoted_legend = { has_legend_chapter = famous_deed } + } + desc = story_event_legends.0001.desc.famous_deed + } + triggered_desc = { + trigger = { + scope:promoted_legend = { has_legend_chapter = battle } + } + desc = story_event_legends.0001.desc.battle + } + triggered_desc = { + trigger = { + scope:promoted_legend = { has_legend_chapter = hunt } + } + desc = story_event_legends.0001.desc.hunt + } + desc = story_event_legends.0001.desc.fallback + } + desc = story_event_legends.0001.desc.outro + } + theme = legend + override_background = { reference = ce1_fullscreen_heroic_legend } + override_sound = { reference = "event:/DLC/FP4/SFX/UI/Unique/sfx_ui_spread_legend" } + + immediate = { + play_music_cue = mx_cue_legend + set_variable = { + name = finished_legend_var + value = scope:promoted_legend + } + scope:promoted_legend = { set_variable = my_legend_var } + } + option = { + name = story_event_legends.0001.a + clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select" + } +} + +#Legitimizing Ending Story Event +story_event_legends.0002 = { + type = character_event + window = fullscreen_event + title = story_event_legends.0002.t + desc = { + desc = story_event_legends.0002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:promoted_legend = { has_legend_chapter = famous_deed } + } + desc = story_event_legends.0002.desc.famous_deed + } + triggered_desc = { + trigger = { + scope:promoted_legend = { has_legend_chapter = battle } + } + desc = story_event_legends.0002.desc.battle + } + desc = story_event_legends.0002.desc.fallback + } + desc = story_event_legends.0002.desc.outro + } + theme = legend + override_background = { reference = ce1_fullscreen_legitimizing_legend } + override_sound = { reference = "event:/DLC/FP4/SFX/UI/Unique/sfx_ui_spread_legend" } + + immediate = { + play_music_cue = mx_cue_legend + set_variable = { + name = finished_legend_var + value = scope:promoted_legend + } + scope:promoted_legend = { set_variable = my_legend_var } + } + + option = { + name = story_event_legends.0002.a + clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select" + } +} + +#Holy Ending Story Event +story_event_legends.0003 = { + type = character_event + window = fullscreen_event + title = story_event_legends.0003.t + desc = { + desc = story_event_legends.0003.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:promoted_legend = { has_legend_chapter = famous_deed } + } + desc = story_event_legends.0001.desc.famous_deed + } + desc = story_event_legends.0001.desc.fallback + } + desc = story_event_legends.0003.desc.outro + } + theme = legend + override_background = { reference = ce1_fullscreen_holy_legend } + override_sound = { reference = "event:/DLC/FP4/SFX/UI/Unique/sfx_ui_spread_legend" } + + immediate = { + play_music_cue = mx_cue_legend + set_variable = { + name = finished_legend_var + value = scope:promoted_legend + } + scope:promoted_legend = { set_variable = my_legend_var } + } + + option = { + name = story_event_legends.0003.a + clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select" + } +} diff --git a/N3OW/events/dlc/ce1/legend_events.txt b/N3OW/events/dlc/ce1/legend_events.txt new file mode 100644 index 00000000..591f6c04 --- /dev/null +++ b/N3OW/events/dlc/ce1/legend_events.txt @@ -0,0 +1,790 @@ +namespace = legend_events + +############################ +## Legend Spawn Events +## 0001-1000 +## by James Beaumont +############################ + +# legend_events.0001 - Chronicler gives you a legend seed +# legend_events.0010 - Chronicler convinces someone to promote your legend +# legend_events.0020 - Hold Court presentation of a legend seed + +# Chronicler gives you a legend seed :D +legend_events.0001 = { + type = character_event + title = legend_events.0001.t + desc = { + desc = legend_events.0001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:slew_dragon + } + desc = legend_events.0001.desc.mid.slew_dragon + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:ancestral_saint + } + desc = legend_events.0001.desc.mid.ancestral_saint + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:old_godly_descent + } + desc = legend_events.0001.desc.mid.old_godly_descent + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:raised_by_animals + } + desc = legend_events.0001.desc.mid.raised_by_animals + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:auspicious_stars + } + desc = legend_events.0001.desc.mid.auspicious_stars + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:virgin_birth + } + desc = legend_events.0001.desc.mid.virgin_birth + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:spoke_to_angels + } + desc = legend_events.0001.desc.mid.spoke_to_angels + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:fought_the_devil + } + desc = legend_events.0001.desc.mid.fought_the_devil + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:exotic_backstory + } + desc = legend_events.0001.desc.mid.exotic_backstory + } + triggered_desc = { + trigger = { + var:legend_seed_to_give = flag:ancient_people + } + desc = legend_events.0001.desc.mid.ancient_people + } + } + desc = legend_events.0001.desc.outro + } + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + lower_center_portrait = { + trigger = { + exists = scope:legend_character + } + character = scope:legend_character + } + + # The Court Chronicler needs to be alive + trigger = { + scope:chronicler = { + is_alive = yes + } + } + + immediate = { + random_list = { # Determine the seed to hand out + 10 = { # Ancestor killed a dragon + trigger = { + any_ancestor = { + even_if_dead = yes + is_adult = yes + is_alive = no + } + NOT = { has_game_rule = historical_legends_only } + } + random_ancestor = { + even_if_dead = yes + limit = { + is_adult = yes + is_alive = no + } + weight = { + base = 1 + modifier = { + add = prowess + } + modifier = { + add = martial + } + } + save_scope_as = legend_character + } + set_variable = { + name = legend_seed_to_give + value = flag:slew_dragon + } + } + 10 = { # Ancestor was/should be a saint + trigger = { + any_ancestor = { + even_if_dead = yes + is_adult = yes + is_alive = no + } + NOT = { has_game_rule = historical_legends_only } + } + random_ancestor = { + even_if_dead = yes + limit = { + is_adult = yes + is_alive = no + } + weight = { + base = 1 + modifier = { + add = learning + } + modifier = { + factor = 3 + OR = { + num_virtuous_traits = { + target = root.faith + value >= 1 + } + has_trait = saint + } + } + modifier = { + factor = 0.1 + OR = { + num_sinful_traits = { + target = root.faith + value >= 1 + } + has_trait = excommunicated + } + } + } + save_scope_as = legend_character + } + set_variable = { + name = legend_seed_to_give + value = flag:ancestral_saint + } + } + 10 = { # I am descended from an old God + trigger = { + NOT = { religion = { is_in_family = rf_pagan } } + any_ancestor = { + even_if_dead = yes + is_alive = no + religion = { is_in_family = rf_pagan } + } + NOT = { has_game_rule = historical_legends_only } + } + random_ancestor = { + even_if_dead = yes + limit = { + religion = { is_in_family = rf_pagan } + is_alive = no + } + weight = { + base = 1 + modifier = { + add = learning + } + modifier = { + factor = 3 + OR = { + num_virtuous_traits = { + target = root.faith + value >= 1 + } + has_trait = saint + } + } + modifier = { + factor = 0.1 + OR = { + num_sinful_traits = { + target = root.faith + value >= 1 + } + has_trait = excommunicated + } + } + } + save_scope_as = legend_character + } + set_variable = { + name = legend_seed_to_give + value = flag:old_godly_descent + } + } + 10 = { # I was raised by dangerous animals + trigger = { + NOT = { has_game_rule = historical_legends_only } + } + select_local_animal_effect = { TYPE = dangerous } + set_variable = { + name = legend_seed_to_give + value = flag:raised_by_animals + } + } + 10 = { # Born under auspicious stars + trigger = { + NOT = { has_game_rule = historical_legends_only } + } + set_variable = { + name = legend_seed_to_give + value = flag:auspicious_stars + } + } + 10 = { # Virgin birth + trigger = { + has_any_bastard_trait_trigger = yes + NOT = { has_game_rule = historical_legends_only } + } + set_variable = { + name = legend_seed_to_give + value = flag:virgin_birth + } + } + 10 = { # Spoke to an angel + trigger = { + religion_has_angels_trigger = yes + NOT = { has_game_rule = historical_legends_only } + } + set_variable = { + name = legend_seed_to_give + value = flag:spoke_to_angels + } + } + 10 = { # Fought a demon + trigger = { + NOT = { has_game_rule = historical_legends_only } + } + set_variable = { + name = legend_seed_to_give + value = flag:fought_the_devil + } + } + 10 = { # Exotic backstory + get_appropriate_exotic_location = yes + set_variable = { + name = legend_seed_to_give + value = flag:exotic_backstory + } + } + 10 = { # Ancient people + trigger = { + # The ancient cultures we have for now aren't appropriate for these regions + root.culture = { + NOR = { + culture_overlaps_geographical_region = world_burma + culture_overlaps_geographical_region = custom_arakan_mountains + culture_overlaps_geographical_region = world_tibet + } + } + } + get_appropriate_ancient_people = yes + set_variable = { + name = legend_seed_to_give + value = flag:ancient_people + } + } + } + } + + option = { # Wowie zowie, really? + name = legend_events.0001.a + if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:slew_dragon + } + create_legend_seed = { + type = heroic + quality = famed + chronicle = beast_slayer + properties = { + beast = flag:dragon + location = root.location + } + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:ancestral_saint + } + create_legend_seed = { + type = holy + quality = famed + chronicle = saintly_deed + properties = { + ancestor = scope:legend_character + religion = root.religion + } + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:old_godly_descent + } + generate_religion_descent_effect = { + RELIGION = scope:legend_character.religion + GOD = high_god + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:raised_by_animals + } + create_legend_seed = { + type = heroic + quality = famed + chronicle = raised_by_animals + properties = { + beast = var:animal_type + } + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:auspicious_stars + } + create_legend_seed = { + type = holy + quality = famed + chronicle = sacred_birth + properties = { + reason = flag:auspicious + } + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:virgin_birth + } + create_legend_seed = { + type = holy + quality = famed + chronicle = sacred_birth + properties = { + reason = flag:virgin + } + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:spoke_to_angels + } + create_legend_seed = { + type = holy + quality = famed + chronicle = divine_intervention + properties = { + god = flag:the_angels + } + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:fought_the_devil + } + create_legend_seed = { + type = holy + quality = famed + chronicle = fought_devil + properties = { + faith = root.faith + } + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:exotic_backstory + } + create_legend_seed = { + type = heroic + quality = famed + chronicle = exotic_backstory + properties = { + location = scope:exotic_location + } + } + } + else_if = { + limit = { + exists = var:legend_seed_to_give + var:legend_seed_to_give = flag:ancient_people + } + create_legend_seed = { + type = legitimizing + quality = famed + chronicle = ancient_people + properties = { + culture = scope:ancient_culture + title = root.primary_title + original_region = var:original_region + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # I don't want this legend + name = legend_events.0001.b + ai_chance = { + base = 0 + } + } +} + +# Chronicler convinces someone to promote your legend +legend_events.0010 = { + type = character_event + title = legend_events.0010.t + desc = legend_events.0010.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + center_portrait = { + character = scope:chronicler + animation = chancellor + } + right_portrait = { + character = scope:potential_promoter + animation = chancellor + } + + option = { # Diplo duel option + name = legend_events.0010.a + duel = { + skill = diplomacy + target = scope:potential_promoter + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + factor = 0.5 + } + send_interface_toast = { + title = legend_events.0010.a.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + factor = 2 + } + send_interface_toast = { + title = legend_events.0010.a.failure + add_prestige = minor_prestige_loss + } + } + } + ai_chance = { + base = 100 + modifier = { # I'd have better odds with option B + intrigue > diplomacy + factor = 0 + } + } + } + + option = { # Lie + name = legend_events.0010.b + duel = { + skill = intrigue + target = scope:potential_promoter + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + factor = 0.5 + } + send_interface_toast = { + title = legend_events.0010.a.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + factor = 2 + } + send_interface_toast = { + title = legend_events.0010.a.failure + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { # I'd have better odds with option A + intrigue < diplomacy + factor = 0 + } + } + } + + option = { # Nah not interested, go away. + name = legend_events.0010.c + ai_chance = { + base = 0 + } + } +} + + +legend_events.0020 = { #hold court presentation of a potential seed + type = court_event + title = legend_events.0020.t + desc = legend_events.0020.desc + + theme = legend + court_scene = { + button_position_character = scope:seed_presenter + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:seed_presenter = { + group = petitioners_group + animation = personality_rational + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + court_grandeur_current_level > court_grandeur_minimum_expected_level + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + trigger = { + any_pool_guest = { + count >= 1 + is_available_adult = yes + has_court_event_flag = no + culture != root.culture + opinion = { + target = root + value >= high_positive_opinion + } + } + NOR = { + has_personal_legend_seed = heroic + has_personal_legend_seed = holy + has_personal_legend_seed = legitimizing + } + } + + immediate = { + random_pool_guest = { + limit = { + is_available_adult = yes + has_court_event_flag = no + culture != root.culture + opinion = { + target = root + value >= high_positive_opinion + } + } + save_scope_as = seed_presenter + court_event_character_flag_effect = yes + } + + hold_court_queue_next_event_effect = yes + } + + option = { #yes, it is my about my dynasty and I shall prove it! + name = legend_events.0020.a + legend_seed_great_deed_dynasty_effect = yes + culture = { + change_cultural_acceptance = { + target = scope:seed_presenter.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + stress_impact = { + ambitious = minor_stress_loss + } + ai_chance = { #we want AI to have seeds + base = 100 + } + } + + option = { #yes, it is about me ruling the title and I shall prove it! + name = legend_events.0020.b + legend_seed_great_deed_title_effect = { + TITLE = root.primary_title + } + culture = { + change_cultural_acceptance = { + target = scope:seed_presenter.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + stress_impact = { + ambitious = minor_stress_loss + } + ai_chance = { #we want AI to have seeds + base = 100 + } + } + + option = { #no, I don't need to humor your culture fairy tales + name = legend_events.0020.c + add_prestige = medium_prestige_gain + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + culture = { + change_cultural_acceptance = { + target = scope:seed_presenter.culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + + stress_impact = { + ambitious = minor_stress_gain + compassionate = minor_stress_gain + callous = medium_stress_loss + sadistic = medium_stress_loss + } + ai_chance = { #we want AI to have seeds + base = 0 + } + } + + after = { + scope:seed_presenter = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +legend_events.1000 = { + type = letter_event + opening = { desc = legend_events.1000.t } + desc = legend_events.1000.desc + sender = scope:legend_owner + + immediate = { + scope:legend = { + legend_owner = { save_scope_as = legend_owner } + } + } + + option = { #I did a silly + name = legend_events.1000.a + pay_short_term_gold = { + target = scope:legend_owner + gold = medium_gold_value + } + stress_impact = { + deceitful = major_stress_impact_loss + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { #If you have really high Intrigue you get away with paying just half + name = legend_events.1000.b + trigger = { + intrigue >= very_high_skill_rating + } + #trait = deceitful + pay_short_term_gold = { + target = scope:legend_owner + gold = { + value = medium_gold_value + multiply = 0.5 + } + } + stress_impact = { + deceitful = massive_stress_impact_loss + honest = major_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + after = { + remove_variable = accepted_promote_legend_var + } +} diff --git a/N3OW/events/dlc/ce1/legend_spread_events_8.txt b/N3OW/events/dlc/ce1/legend_spread_events_8.txt new file mode 100644 index 00000000..acecd067 --- /dev/null +++ b/N3OW/events/dlc/ce1/legend_spread_events_8.txt @@ -0,0 +1,4507 @@ +namespace = legend_spread_events + +############################ +## Legend Spread Events +## 8000-8999 +## by James Beaumont +############################ + +# legend_spread_events.8000 - I am descended from an ancient people, I must travel to their homelands to find evidence + +############################ +## Ancient people ancestry tome +## 8000-8009 +## by James Beaumont +############################ + +# I am descended from an ancient people, I must travel to their homelands to find evidence +legend_spread_events.8000 = { + type = character_event + title = legend_spread_events.8000.t + desc = legend_spread_events.8000.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + is_available_adult = yes + promoted_legend ?= { + has_legend_chronicle = ancient_people + NOT = { + exists = var:had_lspe_8000 + } + } + any_county_in_region = { + region = promoted_legend.legend_property:original_region + this.holder.top_liege != root.top_liege + } + } + + cooldown = { years = 25 } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { save_scope_as = promoted_legend } + random_county_in_region = { + region = promoted_legend.legend_property:original_region + limit = { + this.holder.top_liege != root.top_liege + } + random_county_province = { save_scope_as = province_to_visit } + } + } + + option = { #A worthwhile expedition! + name = legend_spread_events.8000.a + custom_tooltip = { + text = travel_to_tome_tt + start_travel_plan = { + destination = scope:province_to_visit + return_trip = yes + on_arrival_event = legend_spread_events.8002 + on_travel_planner_cancel_event = legend_spread_events.8001 + } + promoted_legend = { + set_variable = { + name = had_lspe_8000 + value = yes + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain # You want me to go all the way to X place? I'm staying here. + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_honor = 1 + } + } + } + + option = { # Sod that + name = legend_spread_events.8000.b + stress_impact = { + content = medium_stress_impact_loss + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = -1 + } + } + } +} + +# I foolishly cancelled my travel plan, the information is lost forever +legend_spread_events.8001 = { + type = character_event + title = legend_spread_events.8001.t + desc = legend_spread_events.8001.desc + theme = legend + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = admiration + } + + option = { # Dangit + name = legend_spread_events.8001.a + ai_chance = { + base = 100 + } + } +} + +# I have arrived, let's look for that tome! +legend_spread_events.8002 = { + type = character_event + title = legend_spread_events.8002.t + desc = legend_spread_events.8002.desc + theme = legend + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = admiration + } + + immediate = { + current_travel_plan = { delay_travel_plan = { months = 1 } } + } + + option = { # Let's seek it out + name = legend_spread_events.8002.a + show_as_unavailable = { always = yes } # Make scholars feel cool + trigger = { + NOT = { has_trait = scholar } + } + duel = { + skills = { stewardship learning } + value = decent_skill_rating + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = { + text = you_find_the_tome_tt + trigger_event = { + id = legend_spread_events.8003 + days = { 2 14 } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + custom_tooltip = { + text = you_fail_to_find_the_tome_tt + trigger_event = { + id = legend_spread_events.8004 + days = { 2 14 } + } + } + } + } + stress_impact = { + patient = minor_stress_impact_loss + impatient = minor_stress_impact_gain + lazy = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = -0.5 # I'd rather smash + } + } + } + + option = { # Smash my way through until I find what I'm looking for + name = legend_spread_events.8002.b + show_as_unavailable = { always = yes } # Make scholars feel cool + trigger = { + NOT = { has_trait = scholar } + } + duel = { + skill = prowess + value = high_skill_rating + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = { + text = you_destroy_the_tome_tt + send_interface_toast = { + title = you_destroy_the_tome_tt + left_icon = root + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + current_travel_plan = { resume_travel_plan = yes } + } + } + } + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -49 + } + custom_tooltip = { + text = you_find_the_tome_tt + trigger_event = { + id = legend_spread_events.8003 + days = { 2 14 } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + custom_tooltip = { + text = you_fail_to_find_the_tome_tt + trigger_event = { + id = legend_spread_events.8004 + days = { 2 14 } + } + } + } + } + stress_impact = { + impatient = minor_stress_impact_loss + patient = minor_stress_impact_gain + diligent = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = 1 # SMASH! + } + } + } + + option = { # There's so much else to see here! + name = legend_spread_events.8002.c + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = studying_ancient_cultures + years = 10 + } + current_travel_plan = { resume_travel_plan = yes } + stress_impact = { + content = medium_stress_impact_loss + patient = minor_stress_impact_loss + impatient = minor_stress_impact_gain + lazy = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = -0.5 + } + } + } + + option = { # I'm a scholar so I'm able to just find it instantly + name = legend_spread_events.8002.d + trigger = { has_trait = scholar } + custom_tooltip = { + text = you_find_the_tome_tt + trigger_event = { + id = legend_spread_events.8003 + days = { 2 14 } + } + } + stress_impact = { + scholar = medium_stress_impact_loss + patient = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + ai_honor = 1 + } + } + } +} + +# I found the tome! :wahoohellyeah: +legend_spread_events.8003 = { + type = character_event + title = legend_spread_events.8003.t + desc = legend_spread_events.8003.desc + theme = legend + override_background = { reference = ce1_catacombs } + left_portrait = { + character = root + animation = ecstasy + } + artifact = { + target = scope:ancient_artifact + position = lower_right_portrait + } + + immediate = { + add_prestige = major_prestige_gain + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + if = { + limit = { artifacts_use_indian_books_trigger = no } + if = { + limit = { + has_royal_court = yes + } + create_artifact = { + name = ancient_culture_tome + description = ancient_culture_tome_desc + type = pedestal + modifier = artifact_court_grandeur_baseline_add_4_modifier + modifier = artifact_monthly_dynasty_prestige_1_modifier + modifier = artifact_legend_spread_mult_5_modifier + durability = 25 + max_durability = 50 + decaying = yes + visuals = book + generate_history = no + quality = 100 + wealth = 100 + save_scope_as = ancient_artifact + } + } + else = { + create_artifact = { + name = ancient_culture_tome + description = ancient_culture_tome_desc + type = journal + modifier = artifact_court_grandeur_baseline_add_4_modifier + modifier = artifact_monthly_dynasty_prestige_1_modifier + modifier = artifact_legend_spread_mult_5_modifier + durability = 25 + max_durability = 50 + decaying = yes + visuals = book + generate_history = no + quality = 100 + wealth = 100 + save_scope_as = ancient_artifact + } + } + } + else = { + if = { + limit = { + has_royal_court = yes + } + create_artifact = { + name = ancient_culture_tome + description = ancient_culture_tome_desc + type = pedestal + modifier = artifact_court_grandeur_baseline_add_4_modifier + modifier = artifact_monthly_dynasty_prestige_1_modifier + modifier = artifact_legend_spread_mult_5_modifier + durability = 25 + max_durability = 50 + decaying = yes + visuals = indian_book + generate_history = no + quality = 100 + wealth = 100 + save_scope_as = ancient_artifact + } + } + else = { + create_artifact = { + name = ancient_culture_tome + description = ancient_culture_tome_desc + type = journal + modifier = artifact_court_grandeur_baseline_add_4_modifier + modifier = artifact_monthly_dynasty_prestige_1_modifier + modifier = artifact_legend_spread_mult_5_modifier + durability = 25 + max_durability = 50 + decaying = yes + visuals = indian_book + generate_history = no + quality = 100 + wealth = 100 + save_scope_as = ancient_artifact + } + } + } + } + + option = { # Love that for me, time to go home tho + name = legend_spread_events.8003.a + current_travel_plan = { resume_travel_plan = yes } + ai_chance = { + base = 100 + } + } +} + +# I didn't find the tome, but I did find this cool artifact +legend_spread_events.8004 = { + type = character_event + title = legend_spread_events.8004.t + desc = legend_spread_events.8004.desc + theme = legend + override_background = { reference = ce1_catacombs } + left_portrait = { + character = root + animation = ecstasy + } + artifact = { + target = scope:ancient_artifact + position = lower_right_portrait + } + + immediate = { + add_prestige = major_prestige_gain + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + create_artifact = { + name = ancient_culture_artifact + description = ancient_culture_artifact_desc + type = miscellaneous + modifier = artifact_legend_spread_mult_1_modifier + modifier = artifact_monthly_dynasty_prestige_1_modifier + durability = 25 + max_durability = 50 + decaying = yes + visuals = animal_figurine + generate_history = no + quality = 50 + wealth = 50 + save_scope_as = ancient_artifact + } + } + + option = { # Love that for me, time to go home tho + name = legend_spread_events.8004.a + current_travel_plan = { resume_travel_plan = yes } + ai_chance = { + base = 100 + } + } +} + +############################ +## Travel event, someone hears of your heroic legend and wants to duel you, travel event +## 8010 +## by James Beaumont +############################ +legend_spread_events.8010 = { + type = character_event + title = legend_spread_events.8010.t + desc = legend_spread_events.8010.desc + theme = travel + override_background = { reference = wilderness } + left_portrait = { + character = root + triggered_animation = { + trigger = { + ai_boldness >= medium_positive_boldness + } + animation = anger + } + triggered_animation = { + trigger = { + always = yes + } + animation = fear + } + } + right_portrait = { + character = scope:challenger + animation = eccentric + hide_info = yes # It's cooler this way + } + + trigger = { + exists = promoted_legend + is_adult = yes + promoted_legend = { + legend_owner = root + legend_type = legend_type:heroic + } + is_location_valid_for_travel_event_on_land = yes + } + + cooldown = { years = 100 } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + ai_boldness >= medium_positive_boldness + ai_vengefulness >= medium_positive_vengefulness + prowess >= high_skill_rating + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + random_pool_character = { + province = root.location + limit = { + ai_boldness >= medium_positive_boldness + ai_vengefulness >= medium_positive_vengefulness + prowess >= high_skill_rating + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = challenger + } + } + else = { + create_character = { + location = this.location + template = ce1_hooded_figure_template + save_scope_as = challenger + } + } + current_travel_plan = { delay_travel_plan = { months = 1 } } + } + + option = { # Pick it up. + name = legend_spread_events.8010.a + custom_tooltip = legend_quality_if_wins_tt + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = scope:challenger + SC_DEFENDER = root + FATALITY = no + FIXED = no + LOCALE = tavern + OUTPUT_EVENT = legend_spread_events.8011 + INVALIDATION_EVENT = fp1_tbc.0021 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + ai_energy = 0.1 + } + } + } + + option = { # Run. + name = legend_spread_events.8010.b + add_prestige = medium_prestige_loss + current_travel_plan = { resume_travel_plan = yes } + stress_impact = { + brave = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -1 + ai_energy = -0.1 + } + } + } +} +#SCE output events +legend_spread_events.8011 = { + hidden = yes + type = character_event + immediate = { + if = { # Defeat + limit = { + scope:sc_victor = scope:challenger + } + trigger_event = legend_spread_events.8012 + } + else = { + trigger_event = legend_spread_events.8013 + } + } +} +#Defeat +legend_spread_events.8012 = { + type = character_event + title = legend_spread_events.8012.t + desc = legend_spread_events.8012.desc + theme = legend + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:challenger + animation = schadenfreude + hide_info = yes + } + + immediate = { + current_travel_plan = { resume_travel_plan = yes } + } + + option = { # Damn + name = legend_spread_events.8012.a + trigger = { + NOT = { has_trait = schemer } + } + show_as_unavailable = { always = yes } + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_decrease } + } + stress_impact = { + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Damn, but also I'm sneaky + name = legend_spread_events.8012.b + trigger = { + has_trait = schemer + } + stress_impact = { + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + deceitful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } +} +#Victory +legend_spread_events.8013 = { + type = character_event + title = legend_spread_events.8013.t + desc = legend_spread_events.8013.desc + theme = legend + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:challenger + animation = fear + hide_info = yes + } + + immediate = { + current_travel_plan = { resume_travel_plan = yes } + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + } + + option = { # Wahoo + name = legend_spread_events.8013.a + ai_chance = { + base = 100 + } + } +} + +############################ +## Holy legend, accused of heresy +## 8020 +## by James Beaumont +############################ +scripted_trigger valid_zealous_guy_trigger = { + ai_boldness >= medium_positive_boldness + ai_zeal >= low_positive_boldness + learning >= medium_skill_rating +} +legend_spread_events.8020 = { + type = character_event + title = legend_spread_events.8020.t + desc = legend_spread_events.8020.desc + theme = legend + override_background = { reference = throne_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { + ai_boldness >= medium_positive_boldness + } + animation = anger + } + animation = fear + } + right_portrait = { + character = scope:challenger + animation = rage + } + + cooldown = { years = 15 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + } + is_available_adult = yes + OR = { + any_courtier_or_guest = { valid_zealous_guy_trigger = yes } + any_pool_character = { + province = root.location + valid_zealous_guy_trigger = yes + } + } + } + + immediate = { + if = { + limit = { + any_courtier_or_guest = { valid_zealous_guy_trigger = yes } + } + random_courtier_or_guest = { + limit = { + valid_zealous_guy_trigger = yes + } + save_scope_as = challenger + } + } + else = { + random_pool_character = { + province = root.location + limit = { valid_zealous_guy_trigger = yes } + save_scope_as = challenger + } + } + promoted_legend = { save_scope_as = legend } + } + + option = { # Ah, you see, if you read this verse, clearly it's not heresy + name = legend_spread_events.8020.c + trigger = { + has_trait = theologian + } + add_piety = medium_piety_gain + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + ai_chance = { + base = 1000 + } + } + + option = { # Nonsense! + name = legend_spread_events.8020.a + duel = { + skill = learning + target = scope:challenger + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8020.a.win + left_icon = root + right_icon = scope:challenger + add_piety = medium_piety_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8020.a.lose + left_icon = root + right_icon = scope:challenger + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + } + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + honest = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 # I cannot be a heretic + ai_honor = 1 + ai_energy = 1 + } + } + } + + option = { # Get out. + name = legend_spread_events.8020.b + add_piety = minor_piety_loss + add_prestige = minor_prestige_gain + scope:challenger = { select_and_move_to_pool_effect = yes } + stress_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_gain + diligent = minor_stress_impact_gain + just = medium_stress_impact_gain + arbitrary = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = -1 + ai_energy = -1 + } + } + } +} + +############################ +## Your kid wants to emulate your legend +## 8030 +## by James Beaumont +############################ +scripted_trigger valid_for_legend_8030 = { + child_not_infant_trigger = yes + child_not_teen_trigger = yes + location = root.location + OR = { + opinion = { + target = root + value >= high_positive_opinion + } + has_relation_friend = root + } +} + +legend_spread_events.8030 = { + type = character_event + title = legend_spread_events.8030.t + desc = legend_spread_events.8030.desc + theme = legend + override_background = { reference = bp2_courtyard } + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:child + animation = aggressive_wooden_sword + } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + is_available_adult = yes + OR = { + any_warden_hostage = { valid_for_legend_8030 = yes } + any_child = { valid_for_legend_8030 = yes } + any_relation = { + type = ward + valid_for_legend_8030 = yes + } + } + } + + cooldown = { years = 15 } + + immediate = { + random_list = { + 10 = { + trigger = { + any_warden_hostage = { valid_for_legend_8030 = yes } + } + random_warden_hostage = { + limit = { valid_for_legend_8030 = yes } + save_scope_as = child + } + } + 15 = { + trigger = { + any_child = { valid_for_legend_8030 = yes } + } + random_child = { + limit = { valid_for_legend_8030 = yes } + save_scope_as = child + } + } + 10 = { + trigger = { + any_relation = { + type = ward + valid_for_legend_8030 = yes + } + } + random_relation = { + type = ward + limit = { valid_for_legend_8030 = yes } + save_scope_as = child + } + } + } + promoted_legend = { save_scope_as = legend } + } + + option = { # Go sing my praises to the other kids! + name = legend_spread_events.8030.a + add_character_modifier = { + modifier = kids_legend_modifier + years = 10 + } + stress_impact = { + humble = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_energy = 1 + } + } + } + + option = { # Use this as a bonding opportunity + name = legend_spread_events.8030.b + progress_towards_friend_effect = { + CHARACTER = scope:child + REASON = friend_legendary_tale + OPINION = default_friend_opinion + } + if = { + limit = { + promoted_legend = { legend_type = legend_type:heroic } + } + scope:child = { + add_martial_skill = 1 + } + } + else_if = { + limit = { + promoted_legend = { legend_type = legend_type:holy } + } + scope:child = { + add_learning_skill = 1 + } + } + else_if = { + limit = { + promoted_legend = { legend_type = legend_type:legitimizing } + } + scope:child = { + add_stewardship_skill = 1 + } + } + stress_impact = { + shy = minor_stress_impact_gain + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } +} + +############################ +## Someone argues your ancestor was actually a bad dude +## 8040 +## by James Beaumont +############################ +legend_spread_events.8040 = { + type = character_event + title = legend_spread_events.8040.t + desc = legend_spread_events.8040.desc + theme = legend + left_portrait = { + character = root + triggered_animation = { + trigger = { + ai_boldness >= medium_positive_boldness + } + animation = anger + } + animation = fear + } + right_portrait = { + character = scope:challenger + animation = rage + } + lower_right_portrait = { + character = scope:ancestor + } + + trigger = { + promoted_legend ?= { + legend_owner = root + exists = legend_property:ancestor + exists = legend_property:ancestor.culture # Make sure the ancestor is a character, not a flag + legend_property:ancestor = { # There is a sinful trait your ancestor *doesn't* have + this != root + any_trait_in_category = { + category = personality + NOT = { prev = { has_trait = prev } } + root.faith = { trait_is_sin = prev } + } + } + } + is_available_adult = yes + OR = { + any_courtier_or_guest = { valid_zealous_guy_trigger = yes } + any_pool_character = { + province = root.location + valid_zealous_guy_trigger = yes + } + } + } + + cooldown = { years = 15 } + + immediate = { + if = { + limit = { + any_courtier_or_guest = { valid_zealous_guy_trigger = yes } + } + random_courtier_or_guest = { + limit = { + valid_zealous_guy_trigger = yes + } + save_scope_as = challenger + } + } + else = { + random_pool_character = { + province = root.location + limit = { valid_zealous_guy_trigger = yes } + save_scope_as = challenger + } + } + promoted_legend = { + save_scope_as = legend + legend_property:ancestor = { save_scope_as = ancestor } + } + if = { + limit = { + scope:ancestor = { + any_trait_in_category = { # Using trait in category so it doesn't like make them Pregnant or something, as hilarious as that would be + category = personality + prev = { has_trait = prev } + root.faith = { trait_is_virtue = prev } + } + } + } + scope:ancestor = { + random_trait_in_category = { + category = personality + limit = { + prev = { has_trait = prev } + root.faith = { trait_is_virtue = prev } + } + save_scope_as = virtue_trait + } + } + } + else = { + scope:ancestor = { + random_trait_in_category = { + category = personality + limit = { + prev = { has_trait = prev } + NOT = { root.faith = { trait_is_sin = prev } } + } + save_scope_as = virtue_trait + } + } + } + scope:ancestor = { + random_trait_in_category = { + category = personality + limit = { + NOT = { prev = { has_trait = prev } } + root.faith = { trait_is_sin = prev } + } + save_scope_as = sin_trait + } + } + } + + option = { # Nonsense! + name = legend_spread_events.8040.a + duel = { + skill = learning + target = scope:challenger + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8040.a.win + left_icon = root + right_icon = scope:challenger + add_piety = medium_piety_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8040.a.lose + left_icon = root + right_icon = scope:challenger + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + legend_property:ancestor = { + remove_trait = scope:virtue_trait + add_trait = scope:sin_trait + } + } + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + honest = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_honor = 1 + ai_energy = 1 + } + } + } + + option = { # Get out. + name = legend_spread_events.8040.b + add_prestige = minor_prestige_gain + add_piety = medium_piety_loss + scope:challenger = { select_and_move_to_pool_effect = yes } + stress_impact = { + base = miniscule_stress_impact_loss + wrathful = medium_stress_impact_loss + calm = minor_stress_impact_gain + zealous = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = -1 + ai_energy = -1 + } + } + } +} + +############################ +## Someone argues your ancestor was actually cooler than we thought +## 8050 +## by James Beaumont +############################ +legend_spread_events.8050 = { + type = character_event + title = legend_spread_events.8050.t + desc = legend_spread_events.8050.desc + theme = legend + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:chronicler + animation = personality_zealous + } + lower_right_portrait = { + character = scope:ancestor + } + + trigger = { + promoted_legend ?= { + legend_owner = root + exists = legend_property:ancestor.culture # Make sure the ancestor is a character, not a flag + legend_property:ancestor = { is_alive = no } + legend_property:ancestor = { # There is a virtuous trait your ancestor *doesn't* have + any_trait_in_category = { + category = personality + NOT = { prev = { has_trait = prev } } + root.faith = { trait_is_virtue = prev } + } + # There is a trait they have which is not virtuous + any_trait_in_category = { + category = personality + prev = { has_trait = prev } + NOT = { root.faith = { trait_is_virtue = prev } } + } + } + } + is_available_adult = yes + } + + cooldown = { years = 15 } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + save_scope_as = legend + legend_property:ancestor = { + save_scope_as = ancestor + random_trait_in_category = { + category = personality + limit = { + NOT = { prev = { has_trait = prev } } + root.faith = { trait_is_virtue = prev } + } + save_scope_as = virtue_trait + } + random_trait_in_category = { + category = personality + limit = { + prev = { has_trait = prev } + NOT = { root.faith = { trait_is_virtue = prev } } + } + save_scope_as = sin_trait + } + } + } + save_scope_as = root_scope + } + + option = { # Cool, love that for us + name = legend_spread_events.8050.a + duel = { + skill = learning + value = very_high_skill_rating + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8050.a.win + left_icon = root + right_icon = scope:chronicler + add_piety = medium_piety_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + legend_property:ancestor = { + remove_trait = scope:sin_trait + add_trait_force_tooltip = scope:virtue_trait + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8050.a.lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = -1 + } + } + } + + option = { # Hmm, maybe we can just talk about his virtuous actions instead? + name = legend_spread_events.8050.b + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + stress_impact = { + humble = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } + + option = { # But what about me? + name = legend_spread_events.8050.c + + add_prestige = medium_prestige_gain + + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + modifier = disrespect_opinion + opinion = -15 + target = root + } + } + + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + humble = medium_stress_impact_gain + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } +} + +############################ +## Yazgirid III was actually a Catholic, many people are saying this +## 8060 +## by James Beaumont +############################ +legend_spread_events.8060 = { + type = character_event + title = legend_spread_events.8060.t + desc = legend_spread_events.8060.desc + theme = legend + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:chronicler + animation = personality_zealous + } + lower_right_portrait = { + character = scope:ancestor + } + + trigger = { + promoted_legend ?= { + legend_owner = root + exists = legend_property:ancestor.religion # Make sure the ancestor is a character, not a flag + legend_property:ancestor = { + religion != root.religion + } + } + is_available_adult = yes + } + + cooldown = { years = 15 } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + save_scope_as = legend + legend_property:ancestor = { + save_scope_as = ancestor + } + } + } + + option = { # It *must* be true! + name = legend_spread_events.8060.a + duel = { + skill = learning + value = high_skill_rating + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8060.a.win + left_icon = root + right_icon = scope:chronicler + add_piety = medium_piety_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + legend_property:ancestor = { + set_character_faith = root.faith + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8060.a.lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = -1 + } + } + } + + option = { # Hmm, maybe we can just talk about his virtuous actions instead? + name = legend_spread_events.8060.b + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + stress_impact = { + deceitful = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +############################ +## Actually my legend happened in a holy site +## 8070 +## by James Beaumont +############################ +legend_spread_events.8070 = { + type = character_event + title = legend_spread_events.8070.t + desc = legend_spread_events.8070.desc + theme = legend + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + + trigger = { + promoted_legend ?= { + legend_owner = root + exists = legend_property:location.county # Make sure the location is a province + legend_property:location.county = { + any_county_province = { + barony = { NOT = { is_holy_site_of = root.faith } } + } + } + } + is_available_adult = yes + } + + cooldown = { years = 15 } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + save_scope_as = legend + legend_property:location = { + save_scope_as = location + } + } + faith = { + random_holy_site = { + title_province = { save_scope_as = holy_site } + } + } + } + + option = { # It *must* be true! + name = legend_spread_events.8070.a + duel = { + skill = learning + value = high_skill_rating + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8070.a.win + left_icon = root + right_icon = scope:chronicler + add_piety = medium_piety_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_legend_property = { + name = location + target = scope:holy_site + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8070.a.lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_decrease + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 1 + ai_honor = -1 + } + } + } + + option = { # No, the existing location is just *like* a holy place + name = legend_spread_events.8070.b + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + scope:location.county = { + add_county_modifier = { + modifier = legendary_holy_site + years = 15 + } + } + if = { + limit = { + scope:location.county.holder = { + NOR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + root.capital_county = { + add_county_modifier = { + modifier = legendary_holy_site + years = 15 + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_gain + diligent = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +############################ +## I punched a bear +## 8080 +## by James Beaumont +############################ +legend_spread_events.8080 = { + type = character_event + title = legend_spread_events.8080.t + desc = legend_spread_events.8080.desc + theme = legend_terrain + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = marshal + } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = hunt + } + is_available_adult = yes + } + + cooldown = { years = 15 } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + save_scope_as = legend + } + } + + option = { # Yes, it's true, I punched a bear. + name = legend_spread_events.8080.a + duel = { + skills = { prowess intrigue } + value = high_skill_rating + # Crit success. + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.crit_win + left_icon = root + right_icon = scope:chronicler + add_prestige = medium_prestige_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + set_legend_chapter = { + name = hunt + localization_key = legend_chapter_punched_animal_great + } + } + } + } + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.win + left_icon = root + right_icon = scope:chronicler + add_prestige = minor_prestige_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_legend_chapter = { + name = hunt + localization_key = legend_chapter_punched_animal_good + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.lose + left_icon = root + right_icon = scope:chronicler + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + set_legend_chapter = { + name = hunt + localization_key = legend_chapter_punched_animal_bad + } + } + } + } + # Crit failure. + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.crit_lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + add_prestige = medium_prestige_loss + promoted_legend = { + change_legend_quality_effect = { + VALUE = major_legend_quality_decrease + } + set_legend_chapter = { + name = hunt + localization_key = legend_chapter_punched_animal_very_bad + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 1 + ai_honor = -1 + } + } + } + + option = { # No, this is silly + name = legend_spread_events.8080.b + + add_prestige = minor_prestige_gain + + if = { + limit = { has_trait = lifestyle_hunter } + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = minor_trait_xp + } + } + else = { + add_trait = lifestyle_hunter + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = minor_trait_xp + } + } + + stress_impact = { + deceitful = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +############################ +## I was called to adventure by a magical spring +## 8090 +## by James Beaumont +############################ +legend_spread_events.8090 = { + type = character_event + title = legend_spread_events.8090.t + desc = legend_spread_events.8090.desc + theme = legend + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = personality_zealous + } + trigger = { + promoted_legend ?= { + legend_owner = root + OR = { + legend_quality = illustrious + legend_quality = mythical + } + has_legend_chapter = opening + } + is_available_adult = yes + any_sub_realm_barony = { + title_province = { + NOR = { + terrain = desert + terrain = desert_mountains + } + } + } + } + + cooldown = { years = 15 } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + save_scope_as = legend + } + romance_target_gender_effect = { SCOPE_NAME = person_of_the_lake } + random_sub_realm_barony = { + limit = { + title_province = { + NOR = { + terrain = desert + terrain = desert_mountains + } + } + } + save_scope_as = watery_place + } + } + option = { # Yes, it's true, I was given my mission by the wet woman + name = legend_spread_events.8090.a + duel = { + skill = learning + value = high_skill_rating + # Crit success. + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.crit_win + left_icon = root + right_icon = scope:chronicler + scope:watery_place.county = { + add_county_modifier = { + modifier = mysterious_sword_giver_great + years = 15 + } + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + set_legend_chapter = { + name = opening + localization_key = legend_chapter_person_of_lake_great + } + } + } + } + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.win + left_icon = root + right_icon = scope:chronicler + scope:watery_place.county = { + add_county_modifier = { + modifier = mysterious_sword_giver + years = 15 + } + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_legend_chapter = { + name = opening + localization_key = legend_chapter_person_of_lake_good + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + set_legend_chapter = { + name = opening + localization_key = legend_chapter_person_of_lake_bad + } + } + } + } + # Crit failure. + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.crit_lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = major_legend_quality_decrease + } + set_legend_chapter = { + name = opening + localization_key = legend_chapter_person_of_lake_very_bad + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 1 + ai_honor = -1 + } + } + } + + option = { # No, this is silly + name = legend_spread_events.8090.b + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + set_legend_chapter = { + name = opening + localization_key = legend_chapter_forged_own_path + } + } + stress_impact = { + deceitful = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +############################ +## Your courtiers sense an evil presence +## 8100 +## by James Beaumont +############################ +legend_spread_events.8100 = { + type = character_event + title = legend_spread_events.8100.t + desc = legend_spread_events.8100.desc + theme = legend + override_background = { reference = corridor_night } + left_portrait = { + character = root + triggered_animation = { + trigger = { + ai_boldness > medium_positive_ai_value + } + animation = personality_bold + } + animation = shock + } + right_portrait = { + character = scope:superstitious_courtier + animation = fear + } + artifact = { + target = scope:witchy_artifact + position = lower_center_portrait + } + trigger = { + promoted_legend ?= { + legend_owner = root + legend_type = legend_type:holy + } + is_available_adult = yes + faith = { + has_doctrine_parameter = witchcraft_accepted # Covers both accepted and virtuous + } + # You have an artifact that is not already home to an evil spirit + any_character_artifact = { + NOT = { has_variable = imbued_with_evil_spirit } + } + } + + cooldown = { years = 15 } + + immediate = { + get_superstitious_courtier_effect = yes + promoted_legend = { + save_scope_as = legend + } + # Get an artifact to imbue with the spirit + random_character_artifact = { + limit = { + NOT = { has_variable = imbued_with_evil_spirit } + } + weight = { # Try to make it an artifact they care about + base = 1 + modifier = { + add = 10 + rarity = illustrious + } + modifier = { + add = 5 + rarity = famed + } + modifier = { + add = 1 + rarity = masterwork + } + modifier = { + factor = 2 + is_equipped = yes + } + } + save_scope_as = witchy_artifact + } + } + + option = { # I know exactly what to do + name = legend_spread_events.8100.c + trigger = { + has_trait = theologian + } + add_piety = minor_piety_gain + scope:witchy_artifact = { + add_artifact_modifier = artifact_dread_gain_mult_3_modifier + set_artifact_description = possessed_artifact_desc + set_variable = { + name = imbued_with_evil_spirit + value = yes + } + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_zeal = 2 + ai_rationality = 1 + } + } + } + + option = { # I'm already full of demons, let's just add some more + name = legend_spread_events.8100.d + trigger = { + OR = { + has_trait = possessed_1 + has_trait = possessed_genetic + } + } + add_piety = major_piety_gain + add_character_modifier = { + modifier = ce1_evil_spirit + years = 15 + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_zeal = 2 + ai_rationality = -1 + } + } + } + + option = { # Stay back everyone, I will capture the spirit in my artifact + name = legend_spread_events.8100.a + duel = { + skill = learning + value = high_skill_rating + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + factor = 0.75 + is_witch_trigger = no + } + send_interface_toast = { + title = legend_spread_events.8100.a.win + left_icon = root + scope:witchy_artifact = { + add_artifact_modifier = artifact_dread_gain_mult_3_modifier + set_artifact_description = possessed_artifact_desc + set_variable = { + name = imbued_with_evil_spirit + value = yes + } + } + if = { + limit = { + is_witch_trigger = no + } + add_trait = witch + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8100.a.lose + left_icon = root + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + } + } + } + # Crit failure. + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8100.a.crit_lose + left_icon = root + if = { + limit = { NOT = { has_trait = possessed } } + add_trait = possessed_1 + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + callous = minor_stress_impact_gain + witch = minor_stress_impact_loss # I live for this shit + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + } + } + } + + option = { # Zoinks! I'm outta here scoob + name = legend_spread_events.8100.b + stress_impact = { + arrogant = medium_stress_impact_gain + witch = medium_stress_impact_gain + brave = medium_stress_impact_gain + zealous = minor_stress_impact_gain + craven = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +############################ +## Your artifact is drenched in the blood of infidels +## 8110 +## by James Beaumont +############################ +legend_spread_events.8110 = { + type = character_event + title = legend_spread_events.8110.t + desc = legend_spread_events.8110.desc + theme = legend + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:courtier_1 + animation = personality_rational + } + lower_right_portrait = { + character = scope:courtier_2 + } + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + faith = { + has_doctrine_parameter = great_holy_wars_active + } + promoted_legend ?= { + legend_owner = root + legend_type = legend_type:holy + } + # You have an artifact that does not already have this modifier + any_character_artifact = { + artifact_slot_type = primary_armament + NOT = { has_variable = blood_of_infidels } + } + any_courtier_or_guest = { + count >= 2 + is_adult = yes + } + # You have a memory where you beat up an infidel + any_memory = { + memory_type = battle_won_memory + exists = memory_participant:loser + save_temporary_scope_as = temp_memory + root.faith = { + faith_hostility_level = { + target = scope:temp_memory.memory_participant:loser.faith + value >= faith_hostile_level + } + } + } + } + immediate = { + promoted_legend = { + save_scope_as = legend + } + # Get an artifact to attach the memory to + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + NOT = { has_variable = blood_of_infidels } + } + weight = { # Try to make it an artifact they care about + base = 1 + modifier = { + add = 10 + rarity = illustrious + } + modifier = { + add = 5 + rarity = famed + } + modifier = { + add = 1 + rarity = masterwork + } + modifier = { + factor = 2 + is_equipped = yes + } + } + save_scope_as = infidel_weapon + } + # Get the memory + random_memory = { + memory_type = battle_won_memory + limit = { + exists = memory_participant:loser + save_temporary_scope_as = temp_memory + root.faith = { + faith_hostility_level = { + target = scope:temp_memory.memory_participant:loser.faith + value >= faith_hostile_level + } + } + } + memory_participant:loser = { save_scope_as = loser } + save_scope_as = memory + } + random_courtier_or_guest = { + limit = { + is_adult = yes + } + weight = { + base = 1 + modifier = { + add = { + subtract = ai_zeal + } + } + } + save_scope_as = courtier_1 + } + random_courtier_or_guest = { + limit = { + is_adult = yes + this != scope:courtier_1 + } + weight = { + base = 1 + modifier = { + add = ai_zeal + } + } + save_scope_as = courtier_2 + } + } + option = { # Yeah, that totally happened! Fr fr no cap + name = legend_spread_events.8110.a + duel = { + skills = { learning martial } + value = high_skill_rating + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8110.a.win + left_icon = root + scope:infidel_weapon = { + add_artifact_modifier = artifact_legend_spread_mult_2_modifier + add_artifact_modifier = artifact_monthly_piety_gain_mult_2_modifier + set_artifact_description = infidel_artifact_desc + set_variable = { + name = blood_of_infidels + value = yes + } + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8110.a.lose + left_icon = root + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + ai_honor = -1 + ai_compassion = -1 + } + } + } + + option = { # Nah, this did not happen + name = legend_spread_events.8110.b + stress_impact = { + arrogant = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + zealous = minor_stress_impact_gain + honest = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + option = { # How about I have it engraved with the real story of the battle? + name = legend_spread_events.8110.c + reason = prestige_level + trigger = { + prestige_level >= very_high_prestige_level + } + scope:infidel_weapon = { + add_artifact_modifier = artifact_legend_spread_mult_1_modifier + set_artifact_description = ce1_battle_artifact_desc + set_variable = { + name = blood_of_infidels + value = yes + } + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + ai_honor = 1 + ai_rationality = 1 + ai_compassion = -1 + } + } + } +} + +############################ +## Go visit someone outside of your diplo range +## 8120-8129 +## by James Beaumont +############################ + +# Call to adventure +legend_spread_events.8120 = { + type = character_event + title = legend_spread_events.8120.t + desc = legend_spread_events.8120.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + lower_right_portrait = { + character = scope:distant_liege + } + + cooldown = { years = 50 } + + trigger = { + is_available_adult = yes + promoted_legend = { + legend_owner = root + legend_type = legend_type:heroic + } + # There must be a ruler outside of diplo range + any_ruler = { + top_liege = { + is_ai = yes + NOT = { in_diplomatic_range = root } + primary_title = { is_mercenary_company = no } + capital_province = { + squared_distance = { + target = root.capital_province + value <= squared_distance_massive # Don't walk from Iceland to Burma + } + } + any_courtier_or_guest = { + is_adult = yes + } + } + } + } + + immediate = { + promoted_legend = { save_scope_as = legend } + random_ruler = { + limit = { + top_liege = { + is_ai = yes + NOT = { in_diplomatic_range = root } + primary_title = { is_mercenary_company = no } + capital_province = { + squared_distance = { + target = root.capital_province + value <= squared_distance_massive + } + } + any_courtier_or_guest = { + is_adult = yes + } + } + } + top_liege = { + capital_province = { save_scope_as = distant_location } + primary_title = { save_scope_as = distant_title } + save_scope_as = distant_liege + } + } + grab_appropriate_chronicler_effect = yes + } + + option = { #A worthwhile expedition! + name = legend_spread_events.8120.a + custom_tooltip = { + text = travel_to_distant_land_tt + start_travel_plan = { + destination = scope:distant_location + return_trip = yes + on_arrival_event = legend_spread_events.8122 + on_travel_planner_cancel_event = legend_spread_events.8121 + } + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_honor = 1 + } + } + } + + option = { # Sod that + name = legend_spread_events.8120.b + stress_impact = { + content = medium_stress_impact_loss + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = -1 + } + } + } +} + +# I foolishly cancelled my travel plan +legend_spread_events.8121 = { + type = character_event + title = legend_spread_events.8121.t + desc = legend_spread_events.8121.desc + theme = legend + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = stress + } + + option = { # Dangit + name = legend_spread_events.8121.a + ai_chance = { + base = 100 + } + } +} + +# I have arrived, what do I want? +legend_spread_events.8122 = { + type = character_event + title = legend_spread_events.8122.t + desc = { + desc = legend_spread_events.8122.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:distant_location.county = { + any_this_title_or_de_jure_above = { this = title:k_sweden } + } + } + desc = legend_spread_events.8122.desc.disappointing.sweden + } + triggered_desc = { + trigger = { + scope:distant_location = { + has_holding_type = tribal_holding + } + } + desc = legend_spread_events.8122.desc.disappointing.tribal + } + triggered_desc = { + trigger = { + scope:distant_location.county = { + development_level <= bad_development_level + title_province = { is_wetland_trigger = yes } + } + } + desc = legend_spread_events.8122.desc.disappointing.wet + } + triggered_desc = { + trigger = { + scope:distant_location.county = { + development_level <= bad_development_level + title_province = { is_drylands_or_desert_trigger = yes } + } + } + desc = legend_spread_events.8122.desc.disappointing.dry + } + triggered_desc = { + trigger = { + scope:distant_location.county = { + development_level <= bad_development_level + } + } + desc = legend_spread_events.8122.desc.disappointing.fallback + } + triggered_desc = { + trigger = { + scope:distant_location.county = { + development_level > great_development_level + } + } + desc = legend_spread_events.8122.desc.not_disappointing + } + triggered_desc = { + trigger = { + scope:distant_location.county = { + development_level > good_development_level + } + } + desc = legend_spread_events.8122.desc.slightly_disappointing + } + triggered_desc = { + trigger = { + scope:distant_location.county = { + development_level > bad_development_level + } + } + desc = legend_spread_events.8122.desc.somewhat_disappointing + } + } + desc = legend_spread_events.8122.desc.bridge + first_valid = { + triggered_desc = { + trigger = { + scope:distant_courtier = { # Viking adventurers and such + culture = root.culture + } + } + desc = legend_spread_events.8122.desc.outro.same_culture + } + triggered_desc = { + trigger = { + scope:distant_courtier = { + religion = root.religion + } + } + desc = legend_spread_events.8122.desc.outro.same_religion + } + desc = legend_spread_events.8122.desc.outro.fallback + } + } + theme = legend + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:distant_courtier + animation = thinking + } + lower_right_portrait = { + character = scope:distant_knight + } + lower_center_portrait = { + character = scope:distant_liege + } + + immediate = { + scope:distant_liege = { + random_courtier_or_guest = { + limit = { + is_adult = yes + } + save_scope_as = distant_courtier + } + random_knight ?= { + save_scope_as = distant_knight + } + } + current_travel_plan = { + delay_travel_plan = { months = 2 } + } + create_character_memory = { + type = ce1_travelled_far_away + participants = { + distant_realm = scope:distant_liege + } + } + } + + option = { # I want to see how people fight here + name = legend_spread_events.8122.a + trigger = { + exists = scope:distant_liege + } + custom_tooltip = legend_quality_if_wins_tt + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:distant_knight + FATALITY = no + FIXED = no + LOCALE = tavern + OUTPUT_EVENT = legend_spread_events.8123 + INVALIDATION_EVENT = fp1_tbc.0021 + } + stress_impact = { + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } + + option = { # I want to talk about my cool legend with your liege + name = legend_spread_events.8122.b + duel = { + skill = diplomacy + target = scope:distant_liege + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8122.b.success + left_icon = root + promoted_legend = { + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + } + current_travel_plan = { resume_travel_plan = yes } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8122.b.failure + left_icon = root + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + current_travel_plan = { resume_travel_plan = yes } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 1 + } + } + } + + option = { # I want to bring something cool back home + name = legend_spread_events.8122.c + if = { + limit = { + capital_county.holder = root + } + capital_county = { + add_county_modifier = { + modifier = legendary_item + years = 15 + } + } + } + add_character_modifier = { + modifier = legendary_item_personal + years = 10 + } + current_travel_plan = { resume_travel_plan = yes } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + ai_boldness = -1 + } + } + } +} +#SCE output events +legend_spread_events.8123 = { + hidden = yes + type = character_event + immediate = { + if = { # Defeat + limit = { + scope:sc_victor = scope:distant_knight + } + trigger_event = legend_spread_events.8124 + } + else = { + trigger_event = legend_spread_events.8125 + } + } +} + +# I lost :( +legend_spread_events.8124 = { + type = character_event + title = legend_spread_events.8124.t + desc = legend_spread_events.8124.desc + theme = legend + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:distant_knight + triggered_animation = { + trigger = { var:signature_weapon = flag:axe } + animation = celebrate_axe + } + triggered_animation = { + trigger = { var:signature_weapon = flag:mace } + animation = celebrate_mace + } + triggered_animation = { + trigger = { var:signature_weapon = flag:sword } + animation = celebrate_sword + } + triggered_animation = { + trigger = { var:signature_weapon = flag:dagger } + animation = celebrate_dagger + } + triggered_animation = { + trigger = { var:signature_weapon = flag:spear } + animation = celebrate_spear + } + triggered_animation = { + trigger = { var:signature_weapon = flag:hammer } + animation = celebrate_hammer + } + animation = marshal + } + + option = { # Dangit + name = legend_spread_events.8124.a + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + current_travel_plan = { resume_travel_plan = yes } + ai_chance = { + base = 100 + } + } +} + +# I won :D +legend_spread_events.8125 = { + type = character_event + title = legend_spread_events.8125.t + desc = legend_spread_events.8125.desc + theme = legend + override_background = { reference = wilderness } + left_portrait = { + character = root + triggered_animation = { + trigger = { var:signature_weapon = flag:axe } + animation = celebrate_axe + } + triggered_animation = { + trigger = { var:signature_weapon = flag:mace } + animation = celebrate_mace + } + triggered_animation = { + trigger = { var:signature_weapon = flag:sword } + animation = celebrate_sword + } + triggered_animation = { + trigger = { var:signature_weapon = flag:dagger } + animation = celebrate_dagger + } + triggered_animation = { + trigger = { var:signature_weapon = flag:spear } + animation = celebrate_spear + } + triggered_animation = { + trigger = { var:signature_weapon = flag:hammer } + animation = celebrate_hammer + } + animation = marshal + } + right_portrait = { + character = scope:distant_knight + animation = stress + } + + immediate = { + promoted_legend = { + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + } + } + + option = { # Neato! + name = legend_spread_events.8125.a + current_travel_plan = { resume_travel_plan = yes } + ai_chance = { + base = 100 + } + } + + option = { # Come back with me! + name = legend_spread_events.8125.b + current_travel_plan = { resume_travel_plan = yes } + add_courtier = scope:distant_knight + root.current_travel_plan = { + add_companion = scope:distant_knight + } + scope:distant_knight = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + if = { + limit = { + NOT = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = root + } + } + } + custom_tooltip = ignores_gender_army_rules_tt + add_character_modifier = ignores_gender_army_rules + } + } + if = { + limit = { + can_employ_court_position_type = champion_court_position + } + court_position_grant_effect = { + EMPLOYER = root + CANDIDATE = scope:distant_knight + POS = champion + } + } + else_if = { + limit = { + can_employ_court_position_type = bodyguard_court_position + } + court_position_grant_effect = { + EMPLOYER = root + CANDIDATE = scope:distant_knight + POS = bodyguard + } + } + ai_chance = { + base = 0 + } + } +} + +############################ +## My ancestor was visited by angels +## 8130 +## by James Beaumont +############################ +legend_spread_events.8130 = { + type = character_event + title = legend_spread_events.8130.t + desc = legend_spread_events.8130.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + + trigger = { + is_available_adult = yes + promoted_legend = { + legend_type = legend_type:legitimizing + exists = legend_property:title + } + root != house.house_founder + house.house_founder = { is_alive = no } + religion_has_angels_trigger = yes + } + + cooldown = { years = 15 } + + + immediate = { + promoted_legend = { + save_scope_as = legend + legend_property:title = { save_scope_as = legend_title } + } + house.house_founder = { save_scope_as = founder } + grab_appropriate_chronicler_effect = yes + } + + option = { # Yes, this definitely happened + name = legend_spread_events.8130.a + duel = { + skill = learning + value = high_skill_rating + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8130.a.win + left_icon = root + right_icon = scope:chronicler + add_piety = medium_piety_gain + house = { + add_house_modifier = { + modifier = angelic_founder + years = 15 + } + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8130.a.lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_decrease + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 1 + ai_honor = -1 + } + } + } + + option = { # Sod that + name = legend_spread_events.8130.b + + add_piety = minor_piety_gain + + stress_impact = { + base = miniscule_stress_impact_loss + content = medium_stress_impact_loss + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = -1 + } + } + } +} + +############################ +## What a cool battle, time to add it to my legend +## 8140 +## by James Beaumont +############################ +# Hidden setup event +legend_spread_events.8140 = { + scope = combat_side + hidden = yes + + trigger = { + # Only for promoted legend owners who are their own protagonists + side_primary_participant.promoted_legend.legend_protagonist ?= side_primary_participant + # Only if you commanded the army yourself + side_commander = side_primary_participant + enemy_side.side_primary_participant = { + is_landed = yes # Killing peasants is not very legendary + } + } + + cooldown = { years = 15 } + + + weight_multiplier = { + base = 1 + modifier = { + side_primary_participant = { + has_royal_court = yes + has_court_type = court_warlike + } + add = 1 + } + modifier = { # More likely for crusades and such + side_primary_participant = { + is_in_ongoing_great_holy_war = yes + } + add = 1 + } + } + + immediate = { + if = { + limit = { + exists = enemy_side.side_commander + } + enemy_side.side_commander = { + save_scope_as = enemy_commander + } + } + if = { + limit = { + exists = side_commander + } + side_commander = { + save_scope_as = friendly_commander + } + } + enemy_side.side_primary_participant = { + save_scope_as = enemy_battle_owner + } + combat.location = { + save_scope_as = combat_location + } + + side_primary_participant = { + trigger_event = { id = legend_spread_events.8141 } + } + } +} + +legend_spread_events.8141 = { + type = character_event + title = legend_spread_events.8141.t + desc = legend_spread_events.8141.desc + theme = battle + left_portrait = { + character = root + animation = celebrate_sword + } + + trigger = { + # based on where the scope is set, they might not exist when the event is fired + exists = scope:enemy_commander + exists = scope:friendly_commander + NOT = { + exists = promoted_legend.var:8141_commander + } + promoted_legend = { + has_legend_chapter = famous_deed + } + } + + immediate = { + promoted_legend = { + save_scope_as = legend + } + } + + option = { # A nice addition to my legend + name = legend_spread_events.8141.a + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + set_variable = { # For loc + name = 8141_commander + value = scope:enemy_commander + } + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_great_battle + } + } + } + + option = { # No, there are far greater things for my legend to be about + name = legend_spread_events.8141.b + add_character_modifier = { + modifier = ce1_legendary_battle + years = 15 + } + } +} + +############################ +## Wanna know how I got these scars? Activity event +## 8150 +## by James Beaumont +############################ +legend_spread_events.8150 = { + type = activity_event + title = legend_spread_events.8150.t + desc = legend_spread_events.8150.desc + theme = legend + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:intrigued_guest + animation = thinking + } + + trigger = { + exists = promoted_legend + promoted_legend.legend_protagonist = root + has_permanent_physical_injury = yes + promoted_legend = { + has_legend_chapter = famous_deed + } + } + + cooldown = { years = 15 } + + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + has_activity_intent = spread_legend_intent + } + } + + immediate = { + root = { + save_scope_as = root_scope + } + if = { # Prioritise the stop host for tours + limit = { + exists = scope:stop_host_scope + } + scope:stop_host_scope = { save_scope_as = intrigued_guest } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + is_adult = yes + } + weight = { + base = 1 + modifier = { # Curious about you + add = 10 + has_trait = gregarious + } + modifier = { # Not big on the whole "This could be offensive" thing + add = 2 + NOT = { has_trait = compassionate } + } + } + save_scope_as = intrigued_guest + } + } + } + } + + option = { # A story I will take to my grave + name = legend_spread_events.8150.c + trigger = { + has_trait = gallant + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_mysterious_injury + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # I got this injury fighting a mighty beast! + name = legend_spread_events.8150.a + duel = { + skills = { martial learning } + target = scope:intrigued_guest + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.win + left_icon = root + right_icon = scope:intrigued_guest + add_piety = medium_prestige_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_battled_mighty_beast_good + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.lose + left_icon = root + right_icon = scope:intrigued_guest + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_battled_mighty_beast_bad + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_energy = 1 + ai_honor = -0.5 + } + } + } + + option = { # I was attacked when evangelising the faith + name = legend_spread_events.8150.b + trigger = { # Must believe in evangelism to an extent + faith = { NOT = { has_doctrine = doctrine_pluralism_pluralistic } } + } + duel = { + skill = learning + target = scope:intrigued_guest + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.win + left_icon = root + right_icon = scope:intrigued_guest + add_piety = medium_prestige_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_injured_evangelising_good + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8080.a.lose + left_icon = root + right_icon = scope:intrigued_guest + add_stress = minor_stress_gain + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_injured_evangelising_bad + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 1 + ai_honor = -0.5 + } + } + } + + option = { # No, the memories are too painful + name = legend_spread_events.8150.d + + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 15 + } + } + + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_loss + reclusive = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_energy = -1 + ai_honor = 1 + } + } + } + + after = { + add_character_flag = legend_spread_events_8160 + } +} + +############################ +## I woo'd the love of my life +## 8160 +## by James Beaumont +############################ +legend_spread_events.8160 = { + type = character_event + title = legend_spread_events.8160.t + desc = legend_spread_events.8160.desc + theme = legend + override_background = { reference = study } + left_portrait = { + character = root + animation = flirtation + } + right_portrait = { + character = scope:soulmate + animation = flirtation + } + + trigger = { + exists = promoted_legend + promoted_legend.legend_protagonist = root + NOR = { + exists = promoted_legend.var:8160_soulmate + has_character_flag = legend_spread_events_8160 + } + promoted_legend = { + has_legend_chapter = additional_deed + } + } + + cooldown = { years = 15 } + + + immediate = { + promoted_legend = { save_scope_as = legend } + } + + option = { # Yes, our love will be legendary + name = legend_spread_events.8160.a + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_variable = { + name = 8160_soulmate + value = scope:soulmate + } + set_legend_chapter = { + name = additional_deed + localization_key = legend_chapter_love + } + } + reverse_add_opinion = { + modifier = flattered_opinion + target = scope:soulmate + opinion = 15 + } + stress_impact = { + # My legend is about meeeee + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + honest = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # No, this is about me :) + name = legend_spread_events.8160.b + reverse_add_opinion = { + modifier = insult_opinion + target = scope:soulmate + opinion = -15 + } + add_character_modifier = { + modifier = ce1_heartthrob + years = 15 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + } + } + } +} + +############################ +## W-wait, I'm gonna die one day?? +## 8170 +## by James Beaumont +############################ +legend_spread_events.8170 = { + type = character_event + title = legend_spread_events.8170.t + desc = { + desc = legend_spread_events.8170.desc.intro + first_valid = { + triggered_desc = { + trigger = { + religion = religion:taoism_religion + } + desc = legend_spread_events.8170.desc.mid.taoist + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = reincarnation_events_active } + } + desc = legend_spread_events.8170.desc.mid.reincarnation + } + desc = legend_spread_events.8170.desc.mid.fallback + } + desc = legend_spread_events.8170.desc.outro + } + theme = legend + override_background = { reference = corridor_night } + left_portrait = { + character = root + animation = fear + } + cooldown = { years = 100 } + + trigger = { + exists = promoted_legend + promoted_legend.legend_protagonist = root + is_immortal = no # We don't use immortality in the base game, this is here to make life easier for modders + age >= 30 + promoted_legend = { + has_legend_chapter = motivation + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + religion = religion:taoism_religion + } + modifier = { + add = 2 + health <= poor_health + } + modifier = { # Contemplate mortality more as you get older + add = { + value = age + divide = 50 + } + } + modifier = { # Comfortable with dying + factor = 0.5 + OR = { + has_trait = content + has_trait = humble + has_trait = brave + has_trait = zealous + } + } + modifier = { # Terrified of dying + factor = 1.5 + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = craven + has_trait = cynical + } + } + modifier = { # Faith believes dying is good actually + factor = 0.1 + faith = { has_doctrine_parameter = consolamentum_active } + } + } + + immediate = { + promoted_legend = { save_scope_as = legend } + } + + option = { # Y-yes, I must become immortal! + name = legend_spread_events.8170.a + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + set_legend_chapter = { + name = motivation + localization_key = legend_chapter_immortal + } + } + add_character_modifier = { + modifier = ce1_immortal + years = 15 + } + hidden_effect = { + add_character_flag = quest_for_immortality + } + stress_impact = { + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + brave = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = 1 + } + } + } + + option = { # Pfshhhhh, legends never die + name = { + trigger = { has_trait = eccentric } + text = legend_spread_events.8170.b.chess + } + name = { + trigger = { NOT = { has_trait = eccentric } } + text = legend_spread_events.8170.b.fallback + } + add_character_modifier = { + modifier = ce1_level_headed + years = 5 + } + stress_impact = { + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + craven = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + after = { + trigger_event = { + id = legend_spread_events.8172 + months = { 1 3 } + } + } +} +#Follow-up, my little kid looks just like ME! +legend_spread_events.8171 = { + type = character_event + title = legend_spread_events.8171.t + desc = legend_spread_events.8171.desc + theme = legend + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:child + animation = happiness + } + cooldown = { years = 5 } + + trigger = { + exists = promoted_legend + promoted_legend.legend_protagonist = root + is_immortal = no + has_character_flag = quest_for_immortality + NOT = { exists = promoted_legend.var:8171_child } + promoted_legend = { + has_legend_chapter = conclusion + } + } + + immediate = { + promoted_legend = { save_scope_as = legend } + } + + option = { # My song is ending, but the story never ends. + name = legend_spread_events.8171.a + promoted_legend = { + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + set_variable = { + name = 8171_child + value = scope:child + } + set_legend_chapter = { + name = conclusion + localization_key = legend_chapter_immortal_child_conclusion + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + craven = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = 1 + } + } + } +} +#Follow-up, meet your maker +legend_spread_events.8172 = { + type = character_event + title = legend_spread_events.8172.t + desc = legend_spread_events.8172.desc + theme = legend + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:old_you + animation = personality_zealous + outfit_tags = { nightgown } + hide_info = yes + } + override_effect_2d = fog + cooldown = { years = 5 } + + trigger = { + exists = promoted_legend + promoted_legend.legend_protagonist = root + has_character_flag = quest_for_immortality + NOT = { religion = religion:taoism_religion } + is_immortal = no + promoted_legend = { + has_legend_chapter = conclusion + } + } + + immediate = { + promoted_legend = { save_scope_as = legend } + create_character = { + template = bp1_doppelganger_template + dynasty = none + location = root.capital_province + save_scope_as = old_you + } + scope:old_you = { + set_age = 100 + } + } + + option = { # Go be human + name = legend_spread_events.8172.a + flavor = legend_spread_events.8172.a.flavor + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_legend_chapter = { + name = conclusion + localization_key = legend_chapter_accept_mortality_conclusion + } + } + add_character_modifier = { + modifier = ce1_accepted_mortality + years = 25 + } + stress_impact = { + base = major_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + craven = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = 1 + } + } + } + + option = { # Not today matey + name = legend_spread_events.8172.b + flavor = legend_spread_events.8172.b.flavor + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + set_legend_chapter = { + name = conclusion + localization_key = legend_chapter_confronted_creator_conclusion + } + } + add_character_modifier = { + modifier = ce1_will_to_live + years = 15 + } + stress_impact = { + ambitious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + craven = minor_stress_impact_loss + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = -1 + } + } + } + + option = { # I'm ready + name = legend_spread_events.8172.c + flavor = legend_spread_events.8172.c.flavor + trigger = { + has_trait = content + OR = { + health <= poor_health + age >= 65 + } + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + set_legend_chapter = { + name = conclusion + localization_key = legend_chapter_accept_mortality_conclusion + } + } + death = { + death_reason = death_peaceful + } + + stress_impact = { + base = massive_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = 1 + } + } + } + after = { + scope:old_you = { + silent_disappearance_effect = yes + } + } +} + +############################ +## You killed my father, prepare to die +## 8180 +## by James Beaumont +############################ +legend_spread_events.8180 = { + type = character_event + title = legend_spread_events.8180.t + desc = legend_spread_events.8180.desc + theme = legend + left_portrait = { + character = root + animation = anger + } + lower_left_portrait = { + character = scope:dead_parent + } + lower_right_portrait = { + character = scope:killer + } + + trigger = { + exists = promoted_legend + promoted_legend.legend_protagonist = root + NOT = { + exists = var:8180_revenge_quest + } + any_parent = { + even_if_dead = yes + killer ?= { is_alive = yes } + NOT = { # I killed my father. Prepare to- wait... + killer = root + } + } + promoted_legend = { + has_legend_chapter = motivation + } + } + + cooldown = { years = 25 } + + weight_multiplier = { + base = 1 + modifier = { + factor = 10 + has_trait = vengeful + } + modifier = { + factor = 0.1 + has_trait = forgiving + } + } + + immediate = { + random_parent = { + even_if_dead = yes + limit = { + killer ?= { is_alive = yes } + killer != root + } + save_scope_as = dead_parent + killer = { save_scope_as = killer } + } + promoted_legend = { save_scope_as = legend } + } + + option = { # My revenge quest begins + name = legend_spread_events.8180.a + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + set_legend_chapter = { + name = motivation + localization_key = legend_chapter_revenge_quest + } + } + if = { + limit = { + NOT = { + has_relation_rival = scope:killer + } + } + set_relation_rival = { + target = scope:killer + reason = rival_murdered_parent + } + } + custom_tooltip = { + text = 8180_bonus_if_you_kill_tt + set_variable = { + name = 8180_revenge_quest + value = scope:killer + } + scope:killer = { + set_variable = { # To trigger the event + name = 8180_marked_for_death + value = root + } + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 1 + } + } + } + + option = { # This does not define me + name = legend_spread_events.8180.b + add_character_modifier = { + modifier = ce1_forgiveness + years = 15 + } + stress_impact = { + base = major_stress_impact_gain + forgiving = major_stress_impact_loss + compassionate = major_stress_impact_loss + just = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_boldness = -1 + ai_honor = 1 + } + } + } +} +# Revenge complete! +legend_spread_events.8181 = { + type = character_event + title = legend_spread_events.8181.t + desc = { + desc = legend_spread_events.8181.desc.intro + first_valid = { + triggered_desc = { # Did I kill them, or did they just die? + trigger = { + scope:killer.killer = root + } + desc = legend_spread_events.8181.desc.mid.murder + } + desc = legend_spread_events.8181.desc.mid.fallback + } + desc = legend_spread_events.8181.desc.outro + } + theme = legend + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:killer + } + + trigger = { + exists = promoted_legend + promoted_legend.legend_protagonist = root + exists = var:8180_revenge_quest + promoted_legend = { + has_legend_chapter = conclusion + } + } + + immediate = { + var:8180_revenge_quest = { save_scope_as = killer } + promoted_legend = { save_scope_as = legend } + random_parent = { + even_if_dead = yes + limit = { + killer ?= scope:killer + } + save_scope_as = dead_parent + } + } + + option = { # My revenge quest begins + name = legend_spread_events.8181.a + promoted_legend = { + if = { + limit = { + scope:killer.killer = root + } + change_legend_quality_effect = { + VALUE = major_legend_quality_increase + } + set_legend_chapter = { + name = conclusion + localization_key = legend_chapter_revenge_quest_complete + } + } + else = { + set_legend_chapter = { + name = conclusion + localization_key = legend_chapter_revenge_quest_divine_justice + } + } + } + remove_variable = 8180_revenge_quest + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 1 + } + } + } +} + +############################ +## I was raised by LocalAnimal +## 8190 +## by James Beaumont +############################ +legend_spread_events.8190 = { + type = character_event + title = legend_spread_events.8190.t + desc = legend_spread_events.8190.desc + theme = legend + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = marshal + } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = opening + } + is_available_adult = yes + has_trait = eccentric + NOT = { exists = promoted_legend.var:animal_parent } + any_parent = { is_alive = yes } + } + + cooldown = { years = 15 } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + save_scope_as = legend + } + select_local_animal_effect = { TYPE = dangerous } + random_parent = { + limit = { is_alive = yes } + save_scope_as = parent + } + } + + option = { # Yes, it's true, I was raised by wolves + name = legend_spread_events.8190.a + duel = { + skills = { prowess learning } + value = high_skill_rating + # Success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8190.a.win + left_icon = root + right_icon = scope:chronicler + add_piety = medium_prestige_gain + promoted_legend = { + set_variable = { + name = animal_parent + value = root.var:animal_type + } + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + set_legend_chapter = { + name = opening + localization_key = legend_chapter_raised_by_animal + } + } + } + } + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8190.a.lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + promoted_legend = { + root = { select_local_animal_effect = { TYPE = small } } + set_variable = { + name = animal_parent + value = root.var:animal_type + } + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + set_legend_chapter = { + name = opening + localization_key = legend_chapter_raised_by_animal + } + } + } + } + # Crit failure. + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.8190.a.crit_lose + left_icon = root + right_icon = scope:chronicler + add_stress = minor_stress_gain + promoted_legend = { + root = { select_local_animal_effect = { TYPE = harmless } } + set_variable = { + name = animal_parent + value = root.var:animal_type + } + change_legend_quality_effect = { + VALUE = major_legend_quality_decrease + } + set_legend_chapter = { + name = opening + localization_key = legend_chapter_raised_by_animal + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 1 + ai_honor = -1 + } + } + } + + option = { # No, this is silly + name = legend_spread_events.8190.b + + if = { + limit = { + exists = scope:parent + } + reverse_add_opinion = { + modifier = angry_opinion + target = scope:parent + opinion = -20 + } + } + + stress_impact = { + base = minor_stress_impact_loss + deceitful = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} diff --git a/N3OW/events/dlc/ce1/legend_spread_events_nick.txt b/N3OW/events/dlc/ce1/legend_spread_events_nick.txt new file mode 100644 index 00000000..5f5c4358 --- /dev/null +++ b/N3OW/events/dlc/ce1/legend_spread_events_nick.txt @@ -0,0 +1,8131 @@ +namespace = legend_spread_events + +############################ +## Legend Spread Events +## & Buying Into A Legend Events +## 5000-5999 +## by Nick Meredith +############################ + +# You attempt to spread a rumour that the ancient peoples founded your capital city +legend_spread_events.5000 = { + type = character_event + title = legend_spread_events.5000.t + desc = legend_spread_events.5000.desc + theme = legend + override_background = { reference = alley_day } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = thinking + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + has_legend_chronicle = ancient_people + legend_protagonist = root + } + capital_province = { + province_owner = root + culture = root.culture + } + location = capital_province + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + capital_province = { + save_scope_as = capital + } + culture = { + save_scope_as = culture + } + save_scope_as = root_scope + } + + option = { #The architecture of the oldest buildings PROVES it was them! + name = legend_spread_events.5000.a + + trigger = { + OR = { + has_trait = scholar + has_trait = architect + } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + every_vassal = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + } + } + } + + option = { #They _must_ have founded it! + name = legend_spread_events.5000.b + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { #People are convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5000.b.tt.success + send_interface_toast = { + title = legend_spread_events.5000.b.tt.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # People are unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5000.b.tt.failure + send_interface_toast = { + title = legend_spread_events.5000.b.tt.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = lazy + has_trait = fickle + } + } + } + } + + option = { #Re-use the masonry + name = legend_spread_events.5000.c + + promoted_legend = { + add_legend_county_modifier = { + modifier = legend_edifices_enduring + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + } + } + + + option = { #Maybe that's a bit of a stretch + name = legend_spread_events.5000.d + + add_character_modifier = { + modifier = legend_character_culture_builders + years = 15 + } + + scope:capital = { + add_province_modifier = { + modifier = legend_county_culture_builders + years = 15 + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = ambitious + } + modifier = { + factor = 2 + has_trait = content + } + } + } +} + +# Your parent claims you fasted on holy days as a baby +legend_spread_events.5005 = { + type = character_event + title = legend_spread_events.5005.t + desc = { + desc = legend_spread_events.5005.desc + first_valid = { + triggered_desc = { + trigger = { + scope:parent = { + this = scope:chronicler + } + } + desc = legend_spread_events.5005.parent_chronicler + } + triggered_desc = { + trigger = { + NOT = { + scope:parent = { + this = scope:chronicler + } + } + } + desc = legend_spread_events.5005.regular + } + } + } + theme = legend + override_background = { reference = temple } + left_portrait = { + character = root + animation = love + } + right_portrait = { + character = scope:parent + animation = ecstasy + } + lower_center_portrait = { + trigger = { + NOT = { + scope:chronicler = { + this = scope:parent + } + } + } + character = scope:chronicler + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_parent = { + is_alive = yes + opinion = { + target = root + value >= low_positive_opinion + } + save_temporary_scope_as = parent + } + faith = { trait_is_virtue = temperate } + any_courtier = { + NOR = { + this = root + this = scope:parent + } + is_available_ai_adult = yes + } + } + + immediate = { + save_scope_as = root_scope + grab_appropriate_chronicler_effect = yes + random_parent = { + limit = { + is_alive = yes + opinion = { + target = root + value >= low_positive_opinion + } + } + save_scope_as = parent + } + } + + option = { #Mother please, you're embarrassing me + name = legend_spread_events.5005.a + + trigger = { + OR = { + has_trait = humble + has_trait = shy + } + NOT = { + has_trait = arrogant + } + } + + add_character_modifier = { + modifier = legend_humble_king + years = 25 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = root + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = diligent + } + } + } + + option = { #Clearly I am a holy person! + name = legend_spread_events.5005.b + + flavor = legend_spread_events.5005.b.tt + + add_piety = medium_piety_gain + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + temperate = miniscule_stress_impact_loss + gluttonous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = humble + has_trait = gluttonous + } + } + } + } + + option = { #Enough about me. How are you, mother? + name = legend_spread_events.5005.c + + add_character_modifier = { + modifier = legend_mothers_boy + years = 15 + } + + reverse_add_opinion = { + modifier = love_opinion + target = scope:parent + opinion = 50 + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = ambitious + } + } + } +} + +# Attempt to heal the sick with your touch +legend_spread_events.5010 = { + type = character_event + title = legend_spread_events.5010.t + desc = legend_spread_events.5010.desc + theme = legend + override_background = { reference = alley_day } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:sick + animation = sick_stomach + } + lower_center_portrait = { + character = scope:chronicler + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_pool_character = { + province = root.location + is_ai = yes + is_adult = yes + has_trait = ill + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + random_pool_character = { + province = root.location + limit = { + is_ai = yes + is_adult = yes + has_trait = ill + } + save_scope_as = sick + } + root.location = { + if = { + limit = { + province_owner = root + } + save_scope_as = location + } + } + save_scope_value_as = { + name = illness_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + option = { #Persuade them to give to those less fortunate and acquire salvation that way + name = legend_spread_events.5010.a + + trigger = { + OR = { + has_trait = arbitrary + intrigue > 13 + } + } + + flavor = legend_spread_events.5010.a.tt + + scope:location ?= { + add_province_modifier = { + modifier = legend_charitable_donations + years = 15 + } + } + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:sick + opinion = 5 + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = minor_stress_impact_loss + diligent = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = ambitious + } + } + } + + option = { #Give it a go, I suppose + name = legend_spread_events.5010.b + + random_list = { + 30 = { #The sick person is healed! + desc = legend_spread_events.5010.b.criticalsuccess + send_interface_toast = { + title = legend_spread_events.5010.b.criticalsuccess + left_icon = root + right_icon = scope:sick + + scope:sick = { + remove_trait = ill + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + } + } + 50 = { #They get placebo'd a little + modifier = { + add = scope:illness_range + } + desc = legend_spread_events.5010.b.success + send_interface_toast = { + title = legend_spread_events.5010.b.success + left_icon = root + right_icon = scope:sick + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + 20 = { #They see no change at all + desc = legend_spread_events.5010.b.failure + send_interface_toast = { + title = legend_spread_events.5010.b.failure + left_icon = root + right_icon = scope:sick + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + shy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_zeal = 0.5 + } + } + } + + option = { #You must seek healing elsewhere! + name = legend_spread_events.5010.c + + scope:location ?= { + add_province_modifier = { + modifier = legend_sick_hospitals + years = 25 + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:sick + opinion = -20 + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = ambitious + } + } + } +} + +# You have a famous weapon that has killed many; or has it? +legend_spread_events.5015 = { + type = character_event + title = legend_spread_events.5015.t + desc = legend_spread_events.5015.desc + theme = legend + override_background = { reference = armory } + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + artifact = { + target = scope:artifact + position = lower_center_portrait + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + location = capital_province + any_character_artifact = { + artifact_slot_type = primary_armament + artifact_owner = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + root.location = { + save_scope_as = location + } + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + artifact_owner = root + } + save_scope_as = artifact + } + } + + option = { #And it'll take the lives of many more! + name = legend_spread_events.5015.a + + trigger = { + OR = { + has_trait = wrathful + prowess > 13 + } + } + + add_character_modifier = { + modifier = legend_bloodthirsty_warrior + years = 15 + } + + stress_impact = { + calm = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = calm + } + } + } + + option = { #Well you see, those are just the ones I remember... + name = legend_spread_events.5015.b + + duel = { + skills = { diplomacy martial } + value = high_skill_rating + + 50 = { #Sounds legit! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5015.b.success + send_interface_toast = { + title = legend_spread_events.5015.b.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # People are unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5015.b.failure + send_interface_toast = { + title = legend_spread_events.5015.b.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + just = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + deceitful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } + + option = { #It's quite something innit? + name = legend_spread_events.5015.c + + custom_tooltip = legend_spread_events.5015.c.tt + + hidden_effect = { + random_list = { + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_monthly_prestige_1_modifier + } + } + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_knight_effectiveness_1_modifier + } + } + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_controlled_province_advantage_1_modifier + } + } + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_prowess_1_modifier + } + } + 1 = { + scope:artifact = { + add_artifact_modifier = artifact_negate_prowess_penalty_add_1_modifier + } + } + } + } + + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:chronicler + opinion = 20 + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_honor = 0.5 + } + } + } +} + +# You can pretend a mark on your hand is a stigmata +legend_spread_events.5020 = { + type = character_event + title = legend_spread_events.5020.t + desc = legend_spread_events.5020.desc + theme = legend + override_background = { reference = corridor_night } + left_portrait = { + character = root + animation = lantern + } + right_portrait = { + character = scope:chronicler + animation = shock + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope + } + + option = { #I also have one in my side! + name = legend_spread_events.5020.a + + trigger = { + has_trait = scarred + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + add_character_modifier = { + modifier = legend_stigmatic + years = 15 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { #It does look rather interesting, doesn't it? + name = legend_spread_events.5020.b + + add_character_modifier = { + modifier = legend_claimed_stigmatic + years = 20 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = hate_opinion + opinion = -40 + target = root + } + } + + stress_impact = { + just = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } + + option = { #It's just an old mark + name = legend_spread_events.5020.c + + add_piety = minor_piety_gain + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = trust_opinion + opinion = 20 + target = root + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -5 + } + + stress_impact = { + base = minor_stress_impact_loss + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 0.5 + } + } + } +} + +# Claim descent from ancient peoples by deciphering an old manuscript +legend_spread_events.5025 = { + type = character_event + title = legend_spread_events.5025.t + desc = legend_spread_events.5025.desc + theme = legend + override_background = { reference = study } + left_portrait = { + character = root + animation = chancellor + } + right_portrait = { + character = scope:chronicler + animation = thinking + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + has_legend_chronicle = ancient_people + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { #Easy! + name = legend_spread_events.5025.a + + trigger = { + has_trait = scholar + } + + show_as_unavailable = { always = yes } + + add_learning_lifestyle_xp = major_lifestyle_xp + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:chronicler + opinion = 30 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { #Let's give it a go + name = legend_spread_events.5025.b + + duel = { + skill = learning + value = medium_skill_rating + 50 = { # You decipher it + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5025.b.success + send_interface_toast = { + title = legend_spread_events.5025.b.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # You are nonplussed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5025.b.failure + send_interface_toast = { + title = legend_spread_events.5025.b.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { #There must be another way + name = legend_spread_events.5025.c + + add_character_modifier = { + modifier = ce1_forward_thinking + years = 15 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -5 + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# Powerful vassal is impressed by your legend +legend_spread_events.5030 = { + type = character_event + title = legend_spread_events.5030.t + desc = legend_spread_events.5030.desc + theme = legend + override_background = { reference = study } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:vassal + animation = thinking + } + lower_center_portrait = { + character = scope:chronicler + } + cooldown = { years = 20 } + + trigger = { + any_powerful_vassal = { + opinion = { + target = root + value >= low_positive_opinion + } + age > 15 + save_temporary_scope_as = potential_promoter_temp + } + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + any_legend_promoter = { + this != scope:potential_promoter_temp + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + random_powerful_vassal = { + limit = { + opinion = { + target = root + value >= low_positive_opinion + } + age > 15 + } + save_scope_as = vassal + } + } + + option = { #I would be indebted to you if you were to help spread it, perhaps? + name = legend_spread_events.5030.a + + trigger = { + scope:vassal = { + can_add_hook = { + target = root + type = favor_hook + } + } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + + scope:vassal = { + add_hook = { + target = root + type = favor_hook + } + set_promoted_legend = root.promoted_legend + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } + + option = { #That's great to hear! + name = legend_spread_events.5030.b + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + + option = { #It is excellent to have you here! + name = legend_spread_events.5030.c + + progress_towards_friend_effect = { + REASON = friend_legend_agreement + CHARACTER = scope:vassal + OPINION = 35 + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_compassion = 1 + } + } + } +} + +# The chronicler rushes to you with documents disputing your lineage +legend_spread_events.5035 = { + type = character_event + title = legend_spread_events.5035.t + desc = legend_spread_events.5035.desc + theme = legend + override_background = { reference = sitting_room } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:chronicler + animation = fear + } + cooldown = { years = 20 } + + trigger = { + is_available_adult = yes + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # Burn the documents, threaten the chronicler + name = legend_spread_events.5035.a + + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = wrathful + has_trait = ambitious + has_trait = arbitrary + has_trait = torturer + dread > 50 + } + } + + flavor = legend_spread_events.5035.a.tt + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + add_dread = medium_dread_gain + + reverse_add_opinion = { + modifier = scared_opinion + target = scope:chronicler + opinion = -40 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + paranoid = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + sadistic = miniscule_stress_impact_loss + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + option = { # Nonsense, look, that's my father's name right there! + name = legend_spread_events.5035.b + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { # Oh yeah! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5035.b.success + send_interface_toast = { + title = legend_spread_events.5035.b.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + } + } + + 50 = { # What? No it isn't + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5035.b.failure + send_interface_toast = { + title = legend_spread_events.5035.b.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_decrease + } + } + } + } + } + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_honor = -0.5 + } + } + } + + option = { # Let's try to keep this one quiet, shall we? + name = legend_spread_events.5035.c + + duel = { + skill = intrigue + value = medium_skill_rating + 50 = { # The secret stays secret + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5035.c.success + send_interface_toast = { + title = legend_spread_events.5035.c.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + scope:chronicler = { + add_hook = { + target = root + type = indebted_hook + } + } + } + } + + 50 = { # The secret gets out + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5035.c.failure + send_interface_toast = { + title = legend_spread_events.5035.c.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } + + option = { # Ah. Well, let's see if we can find other ones, shall we? + name = legend_spread_events.5035.d + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } +} + +# You sit down with your chronicler to fill in some missing entries in the family tree +legend_spread_events.5040 = { + type = character_event + title = legend_spread_events.5040.t + desc = legend_spread_events.5040.desc + theme = legend + override_background = { reference = sitting_room } + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + random_parent = { + limit = { + is_alive = yes + is_available_ai_adult = yes + } + save_scope_as = parent + } + + set_up_regional_mythical_creature_effect = yes + } + + option = { # You successfully lie your ass off + name = legend_spread_events.5040.a + + trigger = { + OR = { + has_trait = deceitful + has_trait = schemer + intrigue > 20 + } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_rationality = 1 + } + } + } + + option = { # You ask a parent for help + name = legend_spread_events.5040.b + + trigger = { + scope:parent ?= { + is_alive = yes + } + } + + add_internal_flag = special + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + option = { # Attempt to make it up + name = legend_spread_events.5040.a #Re-used on purpose + + trigger = { + NOR = { + has_trait = deceitful + has_trait = schemer + intrigue > 20 + } + } + + duel = { + skills = { intrigue diplomacy } + value = high_skill_rating + 50 = { # It looks like it all adds up + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5040.c.success + send_interface_toast = { + title = legend_spread_events.5040.c.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # Your family tree makes no sense + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5040.c.failure + send_interface_toast = { + title = legend_spread_events.5040.c.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } + + option = { # Oh my god, I don't care! + name = legend_spread_events.5040.d + + random_list = { + 1 = { + desc = legend_spread_events.5040.d.success + add_prestige = minor_prestige_gain + } + 1 = { + desc = legend_spread_events.5040.d.failure + add_prestige = minor_prestige_loss + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -15 + } + + stress_impact = { + base = miniscule_stress_impact_loss + irritable = major_stress_impact_loss + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + } + } + } + + after = { + if = { + limit = { exists = var:trinket_adjective_followup } + remove_variable = trinket_adjective_followup + } + } +} + +# You try to get your name in the khutbah +legend_spread_events.5045 = { + type = character_event + title = legend_spread_events.5045.t + desc = legend_spread_events.5045.desc + theme = legend + override_background = { reference = temple } + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:imam + animation = dismissal + } + lower_center_portrait = { + character = scope:chronicler + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + OR = { + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + faith.religion = religion:islam_religion + } + any_court_position_holder = { + type = camp_priest_camp_officer + is_available_ai_adult = yes + faith.religion = religion:islam_religion + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + faith.religion = religion:islam_religion + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + cp:councillor_court_chaplain ?= { + save_scope_as = imam + } + if = { + limit = { + NOT = { exists = scope:imam } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = imam + } + } + + capital_province = { + save_scope_as = capital + } + } + + option = { # Perhaps I can owe you a favour? + name = legend_spread_events.5045.a + + trigger = { + scope:imam = { + can_add_hook = { + target = root + type = favor_hook + } + } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + scope:imam = { + add_hook = { + target = root + type = favor_hook + } + } + + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:imam + opinion = 20 + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = medium_stress_impact_gain + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } + + option = { # Bribe him, maybe? + name = legend_spread_events.5045.b + + duel = { + skill = diplomacy + target = scope:imam + 65 = { # He acquiesces + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5045.b.success + + # If he's not a very holy fella, he'll prioritise keeping his liege happy + modifier = { + add = 15 + scope:imam = { + has_trait = cynical + } + } + + send_interface_toast = { + title = legend_spread_events.5045.b.success + left_icon = root + right_icon = scope:imam + + pay_short_term_gold = { + target = scope:imam + gold = minor_gold_value + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + } + } + + 35 = { # He is not impressed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5045.b.failure + + # If he's a holy fella, he'll listen to the hadith on rashwah + modifier = { + add = 50 + scope:imam = { + has_trait = zealous + } + } + + send_interface_toast = { + title = legend_spread_events.5045.b.failure + left_icon = root + right_icon = scope:imam + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:imam + opinion = -40 + } + } + } + } + + stress_impact = { + cynical = miniscule_stress_impact_loss + zealous = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + option = { # Persuade him + name = legend_spread_events.5045.c + + duel = { + skill = diplomacy + target = scope:imam + + 50 = { # He sees your value + desc = legend_spread_events.5045.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + # He likes ya + modifier = { + add = 5 + scope:imam = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + + # He likes ya a lot + modifier = { + add = 15 + scope:imam = { + opinion = { + target = root + value >= high_positive_opinion + } + } + } + + send_interface_toast = { + title = legend_spread_events.5045.c.success + left_icon = root + right_icon = scope:imam + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # He is not impressed + desc = legend_spread_events.5045.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5045.c.failure + left_icon = root + right_icon = scope:imam + + reverse_add_opinion = { + modifier = dismissive_opinion + target = scope:imam + opinion = -15 + } + } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + stubborn = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 1 + } + } + } + + option = { # Bah, never mind + name = legend_spread_events.5045.d + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -10 + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +# Make an entry in the style of your ancestors? +legend_spread_events.5050 = { + type = character_event + title = legend_spread_events.5050.t + desc = legend_spread_events.5050.desc + theme = legend + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = admiration + } + lower_center_portrait = { + character = scope:jeweller + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + any_pool_character = { + province = root.capital_province + is_ai = yes + is_adult = yes + } + location = capital_province + } + + immediate = { + grab_appropriate_chronicler_effect = yes + random_pool_character = { + province = root.capital_province + limit = { + is_ai = yes + is_adult = yes + } + save_scope_as = jeweller + } + capital_province = { + save_scope_as = capital + } + save_scope_as = root_scope + } + + option = { # Bedeck me in the very finest! + name = legend_spread_events.5050.a + + trigger = { + OR = { + has_trait = profligate + has_trait = arrogant + } + } + + remove_short_term_gold = major_gold_value + + save_scope_as = owner # This is needed for the crown artifact just below + + create_artifact = { + name = artifact_magnificent_crown_name + description = artifact_magnificent_crown_description + template = crown_wearable_template + wealth = 120 + quality = 120 + creator = scope:jeweller + type = helmet_simple + visuals = crown + modifier = artifact_monthly_minor_prestige_3_modifier + modifier = artifact_courtly_vassal_opinion_3_modifier + modifier = artifact_legend_spread_mult_10_modifier + modifier = artifact_dynasty_opinion_6_modifier + modifier = artifact_monthly_dynasty_prestige_1_modifier + save_scope_as = artifact + } + + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + profligate = medium_stress_impact_loss + generous = miniscule_stress_impact_loss + greedy = major_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = -1 + } + } + } + + option = { # All right, gimme something nice + name = legend_spread_events.5050.b + + remove_short_term_gold = medium_gold_value + + create_artifact = { + name = artifact_splendid_necklace_name + description = artifact_splendid_necklace_description + wealth = 80 + quality = 80 + creator = scope:jeweller + type = miscellaneous + visuals = necklace + modifier = artifact_monthly_minor_prestige_2_modifier + modifier = artifact_courtly_vassal_opinion_2_modifier + modifier = artifact_legend_spread_mult_6_modifier + modifier = artifact_dynasty_opinion_3_modifier + save_scope_as = artifact + } + + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + modifier = respect_opinion + opinion = 5 + target = root + } + } + + stress_impact = { + profligate = minor_stress_impact_loss + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = -0.5 + } + } + } + + option = { # A small brooch will do + name = legend_spread_events.5050.c + + remove_short_term_gold = minor_gold_value + + create_artifact = { + name = artifact_fine_brooch_name + description = artifact_fine_brooch_description + wealth = 50 + quality = 50 + creator = scope:jeweller + type = miscellaneous + visuals = brooch + modifier = artifact_monthly_minor_prestige_1_modifier + modifier = artifact_courtly_vassal_opinion_1_modifier + modifier = artifact_legend_spread_mult_3_modifier + modifier = artifact_dynasty_opinion_1_modifier + save_scope_as = artifact + } + + stress_impact = { + profligate = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + option = { # There's no need for this + name = legend_spread_events.5050.d + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:chronicler + opinion = -15 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:jeweller + opinion = -5 + } + + stress_impact = { + profligate = medium_stress_impact_gain + generous = medium_stress_impact_gain + greedy = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_greed = 1 + } + } + } +} + +# Choose to dress like one of your vassals' cultures +# Nothing is more legit than a king who wears your threads! +legend_spread_events.5055 = { + type = character_event + title = legend_spread_events.5055.t + desc = legend_spread_events.5055.desc + theme = legend + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:chronicler + animation = worry + } + lower_left_portrait = { + character = scope:vassal1 + } + lower_right_portrait = { + character = scope:vassal2 + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + any_vassal = { #Requires a vassal who is part of your culture + is_ai = yes + is_adult = yes + culture = root.culture + trigger_if = { + limit = { + root.highest_held_title_tier >= tier_empire + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_county + } + } + any_vassal = { #And one who isn't + is_ai = yes + is_adult = yes + culture != root.culture + culture = { + save_temporary_scope_as = other_culture + } + #Should have at least two vassals of culture + root = { + any_vassal = { + count >= 2 + culture = scope:other_culture + } + } + trigger_if = { + limit = { + root.highest_held_title_tier >= tier_empire + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_county + } + } + location = capital_province + } + + immediate = { + grab_appropriate_chronicler_effect = yes + random_vassal = { #Requires a vassal who is part of your culture + limit = { + is_ai = yes + is_adult = yes + culture = root.culture + trigger_if = { + limit = { + root.highest_held_title_tier = tier_empire + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_county + } + } + save_scope_as = vassal1 + } + random_vassal = { #And one who isn't + limit = { + is_ai = yes + is_adult = yes + culture != root.culture + culture = { + save_temporary_scope_as = other_culture + } + #Should have at least two vassals of culture + root = { + any_vassal = { + count >= 2 + culture = scope:other_culture + } + } + trigger_if = { + limit = { + root.highest_held_title_tier = tier_empire + } + highest_held_title_tier >= tier_duchy + } + trigger_else = { + highest_held_title_tier >= tier_county + } + } + save_scope_as = vassal2 + } + capital_province = { + save_scope_as = capital + } + } + + option = { # Perhaps I can please both sides? + name = legend_spread_events.5055.a + + trigger = { + OR = { + has_trait = shrewd + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + has_trait = diplomat + } + } + + flavor = legend_spread_events.5055.a.tt + + add_character_modifier = { + modifier = legend_culturally_sensitive + years = 20 + } + + scope:vassal1 = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = root + } + } + + scope:vassal2 = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = root + } + } + + every_vassal = { + limit = { + OR = { + culture = root.culture + culture = scope:vassal2.culture + } + } + custom = 5055_every_culture_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + option = { # I shall represent my people! + name = legend_spread_events.5055.b + + scope:vassal1 = { + set_promoted_legend = root.promoted_legend + } + + every_vassal = { + limit = { + culture = root.culture + } + custom = 5055_vassal1_culture + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:vassal2 + opinion = -25 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + arrogant = miniscule_stress_impact_loss + just = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_sociability = -0.5 + } + } + } + + option = { # Vassal 2's people need to feel represented by me too + name = legend_spread_events.5055.c + + scope:vassal2 = { + set_promoted_legend = root.promoted_legend + } + + every_vassal = { + custom = 5055_vassal2_culture + limit = { + culture = scope:vassal2.culture + } + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:vassal1 + opinion = -25 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + arrogant = miniscule_stress_impact_loss + just = minor_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_sociability = -0.5 + } + } + } + + option = { # I should avoid making enemies + name = legend_spread_events.5055.d + + flavor = legend_spread_events.5055.d.tt + + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:vassal1 + opinion = 10 + } + + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:vassal2 + opinion = 10 + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_compassion = 0.5 + } + } + } +} + +# You claim your blindness was due to being blinded by seeing God +legend_spread_events.5060 = { + type = character_event + title = legend_spread_events.5060.t + desc = { + desc = legend_spread_events.5060.opening + desc = { + triggered_desc = { + trigger = { + has_trait = one_eyed + } + desc = legend_spread_events.5060.one_eyed + } + triggered_desc = { + trigger = { + has_trait = blind + } + desc = legend_spread_events.5060.blind + } + } + desc = legend_spread_events.5060.ending + } + + theme = legend + override_background = { reference = bp2_courtyard } + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:chronicler + animation = admiration + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + OR = { + has_trait = blind + has_trait = one_eyed + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope + } + + option = { # His glory struck me fully blind! + name = legend_spread_events.5060.a + + trigger = { + has_trait = blind + } + + add_character_modifier = { + modifier = legend_visions_of_god + years = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 50 + target = root + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = major_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # He asked for a sacrifice of my eye, which I gladly gave! + name = legend_spread_events.5060.b + + trigger = { + has_trait = one_eyed + } + + add_character_modifier = { + modifier = legend_holy_sacrifice + years = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 35 + target = root + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = major_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # Losing my sight has humbled me in the eyes of god + name = legend_spread_events.5060.c + + add_character_modifier = { + modifier = legend_gods_humble_servant + years = 15 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # It's just an old malady + name = legend_spread_events.5060.d + + flavor = legend_spread_events.5060.d.tt + + add_prestige = minor_prestige_value + + stress_impact = { + base = minor_stress_impact_loss + honest = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + cynical = minor_stress_impact_loss + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +# Lose weight to show holiness +legend_spread_events.5065 = { + type = character_event + title = legend_spread_events.5065.t + desc = legend_spread_events.5065.desc + + theme = legend + override_background = { reference = bp1_kitchen_western } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:chronicler + animation = thinking + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + faith = { trait_is_virtue = temperate } + current_weight > -15 + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + save_scope_as = root_scope + } + + option = { # Bah, I am much happier like this! + name = legend_spread_events.5065.a + + add_character_modifier = { + modifier = legend_fat_and_happy + years = 15 + } + + change_current_weight = 20 + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = impious_opinion + opinion = -15 + target = root + } + } + + stress_impact = { + base = medium_stress_impact_loss + zealous = major_stress_impact_gain + cynical = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_greed = 1 + } + } + } + + option = { # I will do better. + name = legend_spread_events.5065.b + + change_current_weight = -20 + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 25 + target = root + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + gluttonous = medium_stress_impact_gain + temperate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_greed = -1 + } + } + } + + option = { # A little bit here and there won't hurt, surely? + name = legend_spread_events.5065.c + + add_character_modifier = { + modifier = legend_sneaks_food + years = 10 + } + + stress_impact = { + gluttonous = miniscule_stress_impact_loss + temperate = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + ai_greed = 0.5 + } + } + } +} + +# You consider dressing in the style of ancestors +legend_spread_events.5070 = { + type = character_event + title = legend_spread_events.5070.t + desc = legend_spread_events.5070.desc + + theme = legend + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = ecstasy + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:legitimizing + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + culture = { + save_scope_as = culture + } + save_scope_as = root_scope + } + + option = { # I shall dress myself as the first of my culture did! + name = legend_spread_events.5070.a + + remove_short_term_gold = minor_gold_value + + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { #People are convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5070.a.success + send_interface_toast = { + title = legend_spread_events.5070.a.success + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = legend_historical_bedecking + years = 15 + } + + every_vassal = { + limit = { + culture = root.culture + } + custom = every_culture_vassal + add_opinion = { + modifier = impressed_opinion + opinion = 20 + target = root + } + } + } + } + + 50 = { # People are unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5070.a.failure + send_interface_toast = { + title = legend_spread_events.5070.a.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + } + } + + option = { # Maybe just a few? + name = legend_spread_events.5070.b + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + fickle = miniscule_stress_impact_loss + stubborn = minor_stress_impact_gain + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + option = { # I won't defer to the past + name = legend_spread_events.5070.c + + add_character_modifier = { + modifier = legend_modern_ruler + years = 15 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } +} + +# You notice an imam has a prayer callus +legend_spread_events.5075 = { + type = character_event + title = legend_spread_events.5075.t + desc = legend_spread_events.5075.desc + + theme = legend + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = ecstasy + } + lower_center_portrait = { + character = scope:imam + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_type = legend_type:holy + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + OR = { + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + faith.religion = religion:islam_religion + } + any_court_position_holder = { + type = camp_priest_camp_officer + is_available_ai_adult = yes + faith.religion = religion:islam_religion + } + } + faith.religion = religion:islam_religion + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + cp:councillor_court_chaplain ?= { + save_scope_as = imam + } + if = { + limit = { + NOT = { exists = scope:imam } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = imam + } + } + + save_scope_as = root_scope + } + + option = { # Try and trick everyone + name = legend_spread_events.5075.a + + trigger = { + has_trait = deceitful + } + + duel = { + skill = intrigue + value = high_skill_rating + 50 = { #It works + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5075.a.success + send_interface_toast = { + title = legend_spread_events.5075.a.success + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = legend_prayer_callus + years = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 15 + target = root + } + } + } + } + + 50 = { # It does not work + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5075.a.failure + send_interface_toast = { + title = legend_spread_events.5075.a.failure + left_icon = root + right_icon = scope:chronicler + + add_piety = miniscule_piety_loss + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = impious_opinion + opinion = -35 + target = root + } + } + } + } + } + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + just = medium_stress_impact_gain + cynical = miniscule_stress_impact_loss + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = 1 + } + } + } + + option = { # Give it a go + name = legend_spread_events.5075.b + + duel = { + skills = { learning prowess } + value = high_skill_rating + 50 = { #It works + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5075.b.success + send_interface_toast = { + title = legend_spread_events.5075.b.success + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = legend_prayer_callus + years = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pious_opinion + opinion = 15 + target = root + } + } + } + } + + 50 = { # Ow + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5075.b.failure + send_interface_toast = { + title = legend_spread_events.5075.b.failure + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = legend_bruised_head + years = 5 + } + } + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # This is ridiculous + name = legend_spread_events.5075.c + + add_piety = minor_prestige_gain + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:imam + opinion = -15 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +# Motivation, Discovery and Battle chapters - 5200-5299 + +# MOTIVATION EVENTS + +# I did this to acquire EXOTIC MEATS +# by Nick Meredith +legend_spread_events.5200 = { + type = character_event + title = legend_spread_events.5200.t + desc = legend_spread_events.5200.desc + theme = legend + + left_portrait = { + character = root + animation = drink_goblet + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + legend_protagonist = { + AND = { + this = root + has_trait = gluttonous + } + } + has_legend_chapter = motivation + has_legend_chapter = hunt + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + save_scope_as = legend + } + random_parent = { + even_if_dead = yes + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + + option = { # I did it for the MEATS + name = legend_spread_events.5200.a + + trigger = { + has_trait = gluttonous + } + + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_delicious_meats } + add_legend_owner_modifier = { + modifier = legend_palatial_palatable + } + } + + reverse_add_opinion = { + modifier = confused_opinion + target = scope:chronicler + opinion = -5 + } + + stress_impact = { + base = medium_stress_impact_loss + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # I did it to AVENGE MY MUM/DAD + name = legend_spread_events.5200.b + + trigger = { + exists = scope:dead_parent + } + + duel = { + skills = { intrigue diplomacy } + value = medium_skill_rating + + 50 = { #People believe this + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { #Helps if your parents copped it in unknown ways + add = 75 + scope:dead_parent = { + death_reason = death_mysterious + } + } + modifier = { #Helps if your parents copped it in specifically animal-related ways + add = 125 + scope:dead_parent = { + OR = { + death_reason = death_deer + death_reason = death_antelope + death_reason = death_gazelle + death_reason = death_bison + death_reason = death_boar + death_reason = death_aurochs + death_reason = death_hyena + death_reason = death_lion + death_reason = death_tiger + death_reason = death_leopard + death_reason = death_roe + death_reason = death_hart + } + } + } + desc = legend_spread_events.5200.b.success + send_interface_toast = { + title = legend_spread_events.5200.b.success + left_icon = root + right_icon = scope:chronicler + + add_character_modifier = { + modifier = ce1_avenging_child + years = 10 + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_motivation_dead_parent } + } + } + } + + 50 = { #Who are you trying to kid? + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5200.b.failure + send_interface_toast = { + title = legend_spread_events.5200.b.failure + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_loss + } + } + } + + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_dead_parent } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # What? No, no, I did it for the glory, duh. Haha. + name = legend_spread_events.5200.c + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:chronicler + opinion = 15 + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } +} + +# I did this to prove my skill +# by Nick Meredith +legend_spread_events.5205 = { + type = character_event + title = legend_spread_events.5205.t + desc = legend_spread_events.5205.desc + theme = legend + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + legend_protagonist = root + has_legend_chapter = motivation + has_legend_chapter = hunt + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + if = { + limit = { + any_sub_realm_county = { + NOT = { + has_county_modifier = hunt_sighting_dangerous_modifier + } + } + } + random_sub_realm_county = { + limit = { + NOT = { + has_county_modifier = hunt_sighting_dangerous_modifier + } + } + save_scope_as = hunt_sighting + } + } + } + + option = { # I did this to prove I am the greatest hunter in the land! + name = legend_spread_events.5205.a + + trigger = { + has_trait = lifestyle_hunter + } + + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_great_venator } + } + + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = tournament_hastiludes_xp_gain_minor_value #Just as a randomised but low value + } + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:chronicler + opinion = 20 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + } + } + + option = { # I did it to hunt more dangerous game + name = legend_spread_events.5205.b + + trigger = { + # No extant Dangerous sightings + NOT = { + any_sub_realm_county = { has_county_modifier = hunt_sighting_dangerous_modifier } + } + } + + flavor = legend_spread_events.5205.b.tt + + random_sub_realm_county = { + limit = { hunt_activity_recent_hunt_sighting_trigger = no } + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + random_county_province = { + weight = { + base = 1 + hunt_activity_sighting_terrain_modifier = yes + hunt_activity_sighting_building_modifier = { PROVINCE = this } + hunt_activity_game_building_modifier = { PROVINCE = this } + } + save_scope_as = sighting_province + } + save_scope_as = sighting_county + hidden_effect = { + hunt_activity_dangerous_game_effect = { PROVINCE = scope:sighting_province } + } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = dangerous + ANIMAL = var:animal_type + OWNER = root + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # I did it to discover more amnimals + name = legend_spread_events.5205.c + + add_trait = lifestyle_hunter + add_trait_xp = { + trait = lifestyle_hunter + track = falconer + value = 15 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # To prove my skill as a hunter! + name = legend_spread_events.5205.d + + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_accomplished_hunter } + } + + add_prestige = minor_prestige_gain + + reverse_add_opinion = { + modifier = respect_opinion + target = scope:chronicler + opinion = 15 + } + + stress_impact = { + base = minor_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } +} + +# DISCOVERY EVENTS + +# I saw a cyclops! +# by Nick Meredith +legend_spread_events.5210 = { + type = character_event + title = legend_spread_events.5210.t + desc = legend_spread_events.5210.desc + theme = legend + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + NOT = { + has_trait = blind + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope + } + + option = { # And he thought I was a cyclops too! + name = legend_spread_events.5210.a + + trigger = { + has_trait = one_eyed + promoted_legend ?= { + legend_protagonist = root + } + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_befriended_cyclops } + } + + give_nickname = nick_the_cyclops + + reverse_add_opinion = { + modifier = amazed_opinion + target = scope:chronicler + opinion = 20 + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { # I saw a cyclops + name = legend_spread_events.5210.b + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_cyclops } + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + + reverse_add_opinion = { + modifier = amazed_opinion + target = scope:chronicler + opinion = 5 + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Just a local + name = legend_spread_events.5210.c + + add_prestige = miniscule_prestige_gain + + promoted_legend = { + add_legend_county_modifier = { + modifier = legend_monophthalmic_mythical + } + } + + every_vassal = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 15 + target = root + } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = -1 + } + } + } +} + +# I was drugged by an evil plant +# by Nick Meredith +legend_spread_events.5215 = { + type = character_event + title = legend_spread_events.5215.t + desc = legend_spread_events.5215.desc + theme = legend + + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # And I learned much from it! + name = legend_spread_events.5215.a + + trigger = { + has_trait = lifestyle_herbalist + promoted_legend ?= { + legend_protagonist = root + } + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_renowned_herbalist } + } + + add_character_modifier = { + modifier = legend_renowned_herbalist + years = 15 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { # It was a terrible trap, but I fought through + name = legend_spread_events.5215.b + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_evil_plants } + } + + add_prestige = medium_prestige_gain + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # I dunno where you heard that m8 + name = legend_spread_events.5215.c + + if = { + limit = { has_trait = lifestyle_herbalist } + add_learning_lifestyle_xp = major_lifestyle_xp + } + else = { + add_trait = lifestyle_herbalist + add_learning_lifestyle_xp = medium_lifestyle_xp + } + + reverse_add_opinion = { + modifier = honesty_opinion + target = scope:chronicler + opinion = 10 + } + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I was challenged to an archery contest +# by Nick Meredith +legend_spread_events.5216 = { + type = character_event + title = legend_spread_events.5216.t + desc = legend_spread_events.5216.desc + theme = legend + + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = { + NOR = { + has_trait = maimed + has_trait = incapable + } + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # And I won it by splitting their arrow in twain! + name = legend_spread_events.5216.a + + trigger = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 50 + } + promoted_legend ?= { + legend_protagonist = { + this = root + } + } + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_legendary_archer } + } + + add_character_modifier = { + modifier = legend_eagle_eyed + years = 15 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + } + } + + option = { # And I beat them! + name = legend_spread_events.5216.b + + duel = { + skill = prowess + value = medium_skill_rating + + 50 = { #People believe this + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5216.b.success + send_interface_toast = { + title = legend_spread_events.5216.b.success + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_gain + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_archery_contest_won } + } + } + } + + 50 = { #Who are you trying to kid? + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5216.b.failure + send_interface_toast = { + title = legend_spread_events.5216.b.failure + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # I can't really remember who won tbh + name = legend_spread_events.5216.c + + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + + add_trait_xp = { + trait = tourney_participant + track = bow + value = { + integer_range = { + min = 1 + max = 5 + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I fell in quicksand/bog! +# by Nick Meredith +legend_spread_events.5220 = { + type = character_event + title = legend_spread_events.5220.t + theme = legend + desc = { + desc = legend_spread_events.5220.desc.start + triggered_desc = { #Quick n dirty choice between bog and quicksand + trigger = { #Using capital province is a cheap way to choose a more 'familiar' hazard for the character + root.capital_province = { + OR = { + terrain = plains + terrain = hills + terrain = jungle + terrain = forest + terrain = taiga + terrain = wetlands + terrain = steppe + terrain = farmlands + terrain = floodplains + terrain = mountains + } + } + } + desc = legend_spread_events.5220.desc.wet + } + triggered_desc = { + trigger = { + root.capital_province = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = drylands + } + } + } + desc = legend_spread_events.5220.desc.dry + } + desc = legend_spread_events.5220.desc.ending + } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = { + this = root + NOT = { + has_trait = incapable + } + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # I hauled myself free easily! + name = legend_spread_events.5220.a + + trigger = { + OR = { + has_trait = physique_good + has_trait = strong + } + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_bog_stronk } + } + + add_prestige = medium_prestige_gain + + give_nickname = nick_natures_bane + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # I struggled through + name = legend_spread_events.5220.b + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_bog_struggle } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # I don't remember any bog + name = legend_spread_events.5220.c + + if = { + limit = { + NOT = { + has_trait = forder + } + } + random = { + chance = 50 + add_trait = forder + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I discovered a new type of flower +# by Nick Meredith +legend_spread_events.5225 = { + type = character_event + title = legend_spread_events.5225.t + theme = legend + desc = legend_spread_events.5225.desc + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # Of course I have proof! + name = legend_spread_events.5225.a + + trigger = { + has_trait = lifestyle_herbalist + } + + flavor = legend_spread_events.5225.a.tt + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_wildflower_expert } + } + + create_artifact_pressed_flower_effect = { OWNER = root } + + add_prestige = medium_prestige_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Er, um, of course I have proof... + name = legend_spread_events.5225.b + + flavor = legend_spread_events.5225.b.tt + + duel = { + skill = intrigue + target = scope:chronicler + + 50 = { #The chronicler's never seen a flower like that before! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5225.b.success + send_interface_toast = { + title = legend_spread_events.5225.b.success + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_gain + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_wildflower_expert } + } + } + } + + 50 = { #...that's a daffodil mate. + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5225.b.failure + send_interface_toast = { + title = legend_spread_events.5225.b.failure + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # Let's stay on topic, shall we? + name = legend_spread_events.5225.c + + add_character_modifier = { + modifier = ce1_black_thumb + years = 15 + } + + stress_impact = { + base = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + option = { # They were just regular flowers + name = legend_spread_events.5225.d + + stress_impact = { + base = minor_stress_impact_loss + lazy = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I fought off cannibals +# by Nick Meredith +legend_spread_events.5230 = { + type = character_event + title = legend_spread_events.5230.t + theme = legend + desc = legend_spread_events.5230.desc + + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = shock + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + # Just to ensure people are actually freaked out by this + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = cannibal + GENDER_CHARACTER = root + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # One of them even bit me! + name = legend_spread_events.5230.a + + trigger = { + has_trait = scarred + } + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_cannibal_scarred } + } + + add_character_modifier = { + modifier = legend_cannibal_scarred + years = 25 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Mmm, meats + name = legend_spread_events.5230.b + + add_internal_flag = dangerous + + add_secret = { type = secret_cannibal } + + reverse_add_opinion = { + modifier = uncertain_opinion + target = scope:chronicler + opinion = -10 + } + + stress_impact = { + honest = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # And I lived to tell the tale! + name = legend_spread_events.5230.c + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_cannibal_fight } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # Honestly, I think they were just bandits. + name = legend_spread_events.5230.d + + if = { + limit = { + NOT = { + has_trait = shrewd + } + } + random = { + chance = 10 + add_trait = shrewd + } + } + else = { + add_learning_lifestyle_xp = minor_lifestyle_experience + } + + stress_impact = { + base = minor_stress_impact_loss + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# BATTLE EVENTS + +# Did you slay the enemy commander? +# by Nick Meredith +legend_spread_events.5235 = { + type = character_event + title = legend_spread_events.5235.t + theme = legend + desc = legend_spread_events.5235.desc + + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:chronicler + animation = shock + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # Yeah I slapped him around + name = legend_spread_events.5235.a + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_enemy_commander } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # They fell before I could get to them, sadge + name = legend_spread_events.5235.b + + add_character_modifier = { + modifier = ce1_modest_leader + years = 15 + } + + reverse_add_opinion = { + modifier = honesty_opinion + target = scope:chronicler + opinion = 5 + } + + stress_impact = { + base = miniscule_stress_impact_loss + humble = major_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# Did I do a tacticool retreat +# by Nick Meredith +legend_spread_events.5240 = { + type = character_event + title = legend_spread_events.5240.t + theme = legend + desc = legend_spread_events.5240.desc + + left_portrait = { + character = root + animation = personality_dishonorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + AND = { + this = root + has_trait = craven + } + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # It was, of course, a tactical retreat. + name = legend_spread_events.5240.a + + trigger = { + OR = { + has_trait = deceitful + has_trait = schemer + has_trait = education_intrigue_5 + } + } + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_faked_retreat } + } + + add_prestige = medium_prestige_gain + + stress_impact = { + base = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + brave = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # It was a tactical retreat! + name = legend_spread_events.5240.b + + duel = { + skills = { martial intrigue } + value = medium_skill_rating + + 50 = { #People believe this + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.5240.b.success + send_interface_toast = { + title = legend_spread_events.5240.b.success + left_icon = root + right_icon = scope:chronicler + + add_prestige = medium_prestige_gain + + add_stress = minor_stress_loss + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_faked_retreat } + } + } + } + + 50 = { #Who are you trying to kid? + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5240.b.failure + send_interface_toast = { + title = legend_spread_events.5240.b.failure + left_icon = root + right_icon = scope:chronicler + + add_prestige = minor_prestige_loss + + add_character_modifier = { + modifier = legend_bravely_ran_away + years = 10 + } + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Let's focus on the results eh + name = legend_spread_events.5240.c + + add_character_modifier = { + modifier = ce1_consequentialist + years = 10 + } + + add_prestige = minor_prestige_gain + + stress_impact = { + base = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# Did you lead the flank that crushed the enemy? +# by Nick Meredith +legend_spread_events.5245 = { + type = character_event + title = legend_spread_events.5245.t + theme = legend + desc = legend_spread_events.5245.desc + + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # Of course, and it's believable right? + name = legend_spread_events.5245.a + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_flanking_success } + } + + random = { + chance = 25 + add_martial_skill = 1 + } + + add_prestige = medium_prestige_gain + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # We actually crushed them with a frontal assault! + name = legend_spread_events.5245.b + + random = { + chance = 50 + add_trait = aggressive_attacker + } + + add_prestige = minor_prestige_gain + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # I was merely overseeing the battle + name = legend_spread_events.5245.c + + if = { + limit = { + NOT = { + has_trait = logistician + } + } + random = { + chance = 75 + add_trait = logistician + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + stress_impact = { + base = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I heard you saved a noble maiden/mandem +# by Nick Meredith +legend_spread_events.5250 = { + type = character_event + title = legend_spread_events.5250.t + theme = legend + desc = legend_spread_events.5250.desc + + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + lower_center_portrait = { + trigger = { exists = scope:spouse } + character = scope:spouse + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + + if = { + limit = { + exists = primary_spouse + } + random_spouse = { + save_scope_as = spouse + } + } + } + + option = { # I did, and I RAVISHED EM + name = legend_spread_events.5250.a + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_lecherous_lewd + } + } + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:spouse + opinion = -65 + } + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_ravished_maiden } + } + + stress_impact = { + lustful = major_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = medium_stress_impact_gain + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 1 + } + } + } + + option = { # 'Twas merely a kisseth! How did it end up like thiseth? + name = legend_spread_events.5250.b # 'Twere only a kisseth, 'twere only a kisseth + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_maiden_kiss } + } + + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:spouse + opinion = -10 + } + + stress_impact = { + lustful = medium_stress_impact_loss + chaste = medium_stress_impact_gain + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Me?! Never! + name = legend_spread_events.5250.c + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_chaste_faithful + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# I heard you fought through some grievous wounds +# by Nick Meredith +legend_spread_events.5255 = { + type = character_event + title = legend_spread_events.5255.t + theme = legend + desc = legend_spread_events.5255.desc + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope + } + + option = { # How d'you think I got these massive bodily injuries? + name = legend_spread_events.5255.a + + trigger = { + OR = { + has_trait = one_eyed + has_trait = maimed + has_trait = one_legged + } + } + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_wounded } + } + + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # How d'you think I got these scars? + name = legend_spread_events.5255.b + + trigger = { + OR = { + has_trait = scarred + has_trait = disfigured + } + } + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_wounded } + } + + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 15 + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # Thanks to god I avoided any such pain + name = legend_spread_events.5255.c + + add_piety = medium_piety_gain + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # I pushed through like a legend mate + name = legend_spread_events.5255.d + + add_prestige = medium_prestige_gain + + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + zealous = minor_stress_impact_gain + cynical = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } +} + +# I heard you arrived in the nick of time with reinforcements! +# by Nick Meredith +legend_spread_events.5260 = { + type = character_event + title = legend_spread_events.5260.t + theme = legend + desc = legend_spread_events.5260.desc + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = battle + legend_protagonist = { + this = root + } + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + } + + option = { # I sure did! + name = legend_spread_events.5260.a + + promoted_legend = { + set_legend_chapter = { name = battle localization_key = legend_chapter_battle_reinforcement_arrival } + } + + if = { + limit = { + NOT = { + has_trait = reckless + } + } + random = { + chance = 50 + add_trait = reckless + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + add_character_modifier = { + modifier = legend_nick_of_time + years = 15 + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + wrathful = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # Actually we already had that organised! + name = legend_spread_events.5260.b + + if = { + limit = { + NOT = { + has_trait = organizer + } + } + random = { + chance = 50 + add_trait = organizer + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + add_character_modifier = { + modifier = legend_well_organised + years = 15 + } + + stress_impact = { + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } +} + +## Buying into legend events + +# You write a missive to a neighbouring ruler +legend_spread_events.5305 = { + type = character_event + title = legend_spread_events.5305.t + desc = legend_spread_events.5305.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + lower_center_portrait = { + character = scope:potential_promoter + } + cooldown = { years = 25 } + + trigger = { + highest_held_title_tier > tier_barony + any_neighboring_realm_same_rank_owner = { + is_available_healthy_ai_adult = yes + save_temporary_scope_as = potential_promoter_temp + } + promoted_legend ?= { + legend_owner = root + any_legend_promoter = { + this != scope:potential_promoter_temp + } + } + } + + immediate = { + random_neighboring_realm_same_rank_owner = { + limit = { + is_available_healthy_ai_adult = yes + } + + save_scope_as = potential_promoter + } + + promoted_legend = { save_scope_as = promoted_legend } + culture = { save_scope_as = root_culture } + grab_appropriate_chronicler_effect = yes + } + + option = { # Don't you want to see a fellow [x culture] succeed? + name = legend_spread_events.5305.a + + trigger = { + culture = scope:potential_promoter.culture + } + + duel = { + skill = diplomacy + value = average_skill_rating + + 50 = { # They agree + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Likes you + scope:potential_promoter = { + opinion = { + target = root + value >= 60 + } + } + add = 25 + } + send_interface_toast = { + title = legend_spread_events.5305.a.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 10 + } + send_interface_toast = { + title = legend_spread_events.5305.a.failure + add_prestige = miniscule_prestige_loss + } + } + } + + stress_impact = { + calm = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Else I'll beat you up m8 + name = legend_spread_events.5305.b + duel = { + skills = { martial prowess } + value = medium_skill_rating + + 50 = { # They acquiesce + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # You are scary + dread > 49 + add = 15 + } + modifier = { # You are stronger than them + root.current_military_strength > scope:potential_promoter.current_military_strength + add = 20 + } + modifier = { # You are significantly stronger than them + root.current_military_strength > scope:potential_promoter.one_and_a_half_times_current_military_strength + add = 30 + } + send_interface_toast = { + title = legend_spread_events.5305.b.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + add_opinion = { + target = root + modifier = threatened_opinion + opinion = -50 + } + } + } + } + + 50 = { # They don't care for your threats + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 25 + } + modifier = { # Dislikes you + scope:potential_promoter = { + opinion = { + target = root + value <= 0 + } + } + add = 20 + } + modifier = { # Stubborn to a fault + scope:potential_promoter = { + has_trait = stubborn + } + add = 10 + } + send_interface_toast = { + title = legend_spread_events.5305.b.failure + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + + reverse_add_opinion = { + target = scope:potential_promoter + modifier = dismissive_opinion + opinion = -20 + } + } + } + } + + stress_impact = { + calm = minor_stress_impact_gain + gregarious = miniscule_stress_impact_gain + trusting = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # It's the neighbourly thing to do! + name = legend_spread_events.5305.c + + duel = { + skill = diplomacy + target = scope:potential_promoter + + 50 = { # Agreed! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5305.c.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { #Disagree! + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 15 + } + send_interface_toast = { + title = legend_spread_events.5305.c.failure + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_gain + shy = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # Just send the letter as-is + name = legend_spread_events.5305.d + + random = { + chance = 10 + modifier = { # Likes you a bit + scope:potential_promoter = { + opinion = { + target = root + value > low_positive_opinion + } + } + add = 10 + } + modifier = { # Likes you a lot + scope:potential_promoter = { + opinion = { + target = root + value > medium_positive_opinion + } + } + add = 10 + } + send_interface_toast = { + title = legend_spread_events.5305.d.success + + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# You send a chronicler/herald to convince a neighbouring ruler +legend_spread_events.5310 = { + type = character_event + title = legend_spread_events.5310.t + desc = legend_spread_events.5310.desc + theme = legend + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:herald + animation = chancellor + } + lower_center_portrait = { + character = scope:potential_promoter + } + cooldown = { years = 25 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_neighboring_top_liege_realm_owner = { + is_available_healthy_ai_adult = yes + NOT = { + promoted_legend ?= { + legend_owner = root + } + } + } + + OR = { + any_court_position_holder = { + type = chronicler_court_position + is_available_healthy_ai_adult = yes + } + any_court_position_holder = { + type = court_poet_court_position + is_available_healthy_ai_adult = yes + } + } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { + limit = { + is_available_healthy_ai_adult = yes + NOT = { + promoted_legend ?= { + legend_owner = root + } + } + } + + save_scope_as = potential_promoter + } + + if = { + limit = { + any_court_position_holder = { + type = chronicler_court_position + is_available_healthy_ai_adult = yes + } + } + random_court_position_holder = { + type = chronicler_court_position + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = herald + } + } + else = { + random_court_position_holder = { + type = court_poet_court_position + } + save_scope_as = herald + } + + promoted_legend = { save_scope_as = promoted_legend } + + save_scope_value_as = { + name = random_range + value = { + integer_range = { + min = 1 + max = 15 + } + } + } + } + + option = { # Try to charm them with your wit! + name = legend_spread_events.5310.a + + scope:herald = { + duel = { + skills = { diplomacy learning } + value = average_skill_rating + + 50 = { # They agree + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Likes the diplomat + scope:potential_promoter = { + opinion = { + target = scope:herald + value > medium_positive_opinion + } + } + add = 25 + } + root = { + send_interface_toast = { + title = legend_spread_events.5310.a.success + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + } + + 50 = { # They disagree + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 10 + } + root = { + send_interface_toast = { + title = legend_spread_events.5310.a.failure + + add_stress = minor_stress_gain + } + } + } + } + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + option = { # Take them a gift of gold to persuade them + name = legend_spread_events.5310.b + + pay_short_term_gold = { + target = scope:potential_promoter + gold = medium_gold_value + } + + random_list = { + 70 = { # They acquiesce + modifier = { # They want your money + scope:potential_promoter = { + has_trait = greedy + } + add = 15 + } + modifier = { #Natural randomness + add = scope:random_range + } + send_interface_toast = { + title = legend_spread_events.5310.b.success + + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + 30 = { # They decline + modifier = { # They don't want your money + scope:potential_promoter = { + OR = { + has_trait = profligate + has_trait = generous + } + } + add = 15 + } + modifier = { # Dislikes you + scope:potential_promoter = { + opinion = { + target = root + value <= 0 + } + } + add = 20 + } + modifier = { # Reluctant to drop their existing legend + scope:potential_promoter = { exists = promoted_legend } + add = 10 + } + send_interface_toast = { + title = legend_spread_events.5310.b.failure + + add_stress = miniscule_stress_gain + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # Just go there and don't balls it up! + name = legend_spread_events.5310.c + + random = { + chance = 20 + send_interface_toast = { + title = legend_spread_events.5305.c.success + + scope:potential_promoter = { + set_promoted_legend = root.promoted_legend + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# You attempt to persuade a vassal by appealing to one of their traits +legend_spread_events.5315 = { + type = character_event + title = legend_spread_events.5315.t + desc = legend_spread_events.5315.desc + theme = legend + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:vassal + animation = thinking + } + cooldown = { years = 25 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_vassal = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = ambitious + has_trait = vengeful + has_trait = honest + has_trait = arrogant + } + } + } + + immediate = { + random_vassal = { + limit = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = ambitious + has_trait = vengeful + has_trait = honest + has_trait = arrogant + } + } + + save_scope_as = vassal + } + + promoted_legend = { save_scope_as = promoted_legend } + } + + option = { # Appeal to their ambition + name = legend_spread_events.5315.a + + duel = { + skill = diplomacy + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5315.a.success + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for correct deduction + scope:vassal = { + has_trait = ambitious + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5315.a.failure + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Loss for incorrect deduction + scope:vassal = { + NOT = { + has_trait = ambitious + } + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.failure + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # Appeal to their vengefulness + name = legend_spread_events.5315.b + + duel = { + skill = diplomacy + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5315.a.success + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for correct deduction + scope:vassal = { + has_trait = vengeful + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5315.a.failure + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Loss for incorrect deduction + scope:vassal = { + NOT = { + has_trait = vengeful + } + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.failure + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # Appeal to their honesty + name = legend_spread_events.5315.c + + duel = { + skill = diplomacy + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5315.a.success + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for correct deduction + scope:vassal = { + has_trait = honest + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5315.a.failure + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Loss for incorrect deduction + scope:vassal = { + NOT = { + has_trait = honest + } + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.failure + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + option = { # Appeal to their arrogance + name = legend_spread_events.5315.d + + duel = { + skill = diplomacy + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5315.a.success + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for correct deduction + scope:vassal = { + has_trait = arrogant + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5315.a.failure + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # Loss for incorrect deduction + scope:vassal = { + NOT = { + has_trait = arrogant + } + } + add = 200 + } + send_interface_toast = { + title = legend_spread_events.5315.a.failure + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +# You attempt to bribe a vassal into promoting your legend +legend_spread_events.5320 = { + type = character_event + title = legend_spread_events.5320.t + desc = { + desc = legend_spread_events.5320.desc + desc = { + triggered_desc = { + trigger = { + scope:artifact = { + exists = scope:artifact + } + } + desc = legend_spread_events.5320.artifact + } + } + } + theme = legend + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:vassal + animation = happiness + } + artifact = { + target = scope:artifact + position = lower_center_portrait + } + cooldown = { years = 25 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_vassal = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + random_vassal = { + limit = { + is_available_healthy_ai_adult = yes + } + + save_scope_as = vassal + } + + random_character_artifact = { + limit = { + NOR = { + #Ensure it's not trash + has_variable = unwanted_artifact + + #And doesn't have a claim on it + any_artifact_claimant = { + is_alive = no + } + } + } + + save_scope_as = artifact + } + + scope:vassal.capital_county = { save_scope_as = capital_county } + + promoted_legend = { save_scope_as = promoted_legend } + } + + option = { # Offer them an artifact + name = legend_spread_events.5320.a + + trigger = { + exists = scope:artifact + } + + duel = { + skill = diplomacy + value = medium_skill_rating + + 60 = { # They agree + desc = legend_spread_events.5320.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Boost for anything that's above common + scope:artifact = { + rarity = masterwork + } + add = 15 + } + modifier = { + scope:artifact = { + rarity = famed + } + add = 30 + } + modifier = { + scope:artifact = { + rarity = illustrious + } + add = 80 + } + send_interface_toast = { + title = legend_spread_events.5320.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + scope:artifact = { + set_owner = { + target = scope:vassal + history = { + location = root.capital_province + actor = root + recipient = scope:vassal + type = given + } + } + } + } + } + + 40 = { # They disagree + desc = legend_spread_events.5320.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.a.failure + + custom_tooltip = legend_spread_events.5320.a.artifact + + hidden_effect = { + scope:artifact = { + add_artifact_modifier = artifact_monthly_prestige_penalty_modifier + } + } + + reverse_add_opinion = { + target = scope:vassal + modifier = dismissive_opinion + opinion = -5 + } + } + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # Offer them investment in their holding + name = legend_spread_events.5320.b + + duel = { + skills = { diplomacy stewardship } + value = medium_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5320.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + + scope:capital_county = { + add_county_modifier = { + modifier = legend_investments + years = 20 + } + } + + remove_short_term_gold = minor_gold_value + } + } + + 50 = { # They disagree + desc = legend_spread_events.5320.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.b.failure + + reverse_add_opinion = { + target = scope:vassal + modifier = dismissive_opinion + opinion = -20 + } + } + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + } + } + } + + option = { # Offer them a favour + name = legend_spread_events.5320.c + + duel = { + skills = { diplomacy intrigue } + value = low_skill_rating + + 50 = { # They agree + desc = legend_spread_events.5320.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.a.success + scope:vassal = { + set_promoted_legend = root.promoted_legend + add_hook = { + target = root + type = favor_hook + } + } + } + } + + 50 = { # They disagree + desc = legend_spread_events.5320.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5320.a.failure + + add_character_modifier = { + modifier = legend_loose_lips + years = 15 + } + } + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + option = { # Opt-out + name = legend_spread_events.5320.d + + random = { + chance = 15 + send_interface_toast = { + title = legend_spread_events.5320.d.success + + scope:vassal = { + set_promoted_legend = root.promoted_legend + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Legend is spreading towards you: do you become a promoter for extra rewards? +legend_spread_events.5325 = { + type = character_event + title = legend_spread_events.5325.t + desc = { + desc = legend_spread_events.5325.desc + triggered_desc = { + trigger = { + scope:promoted_legend_owner = { + is_ai = yes + } + } + desc = legend_spread_events.5325.protag + } + } + theme = legend + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:legend_person + animation = happiness + } + lower_center_portrait = { + character = scope:promoted_legend_owner + trigger = { + this != scope:legend_person + } + } + cooldown = { years = 25 } + + trigger = { + #You have a neighbour who has a legend + any_neighboring_top_liege_realm_owner = { + promoted_legend ?= { + NOR = { + any_legend_promoter = { this = root } + legend_owner = root + } + legend_owner ?= { + is_within_diplo_range = { CHARACTER = root } + } + } + } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { #Grab neighbouring ruler with a legend + limit = { + promoted_legend ?= { + NOR = { + any_legend_promoter = { this = root } + legend_owner = root + } + legend_owner ?= { + is_within_diplo_range = { CHARACTER = root } + } + } + } + save_scope_as = legend_person + promoted_legend = { + save_scope_as = promoted_legend + legend_owner = { save_scope_as = promoted_legend_owner } + } + } + + promoted_legend ?= { save_scope_as = your_legend } + } + + option = { # Take it on and it gains good stuff because you're cool + name = legend_spread_events.5325.a + + trigger = { + prestige_level > 2 + } + + add_internal_flag = special + + if = { + limit = { + exists = scope:your_legend + } + custom_tooltip = legend_spread_events.5325.stop_promoting_warning + custom_tooltip = legend_spread_events.5325.stop_promoting + + stop_promoting_legend = yes + } + + set_promoted_legend = scope:promoted_legend + + scope:promoted_legend = { + add_legend_county_modifier = { + modifier = legend_esteemed_expanding + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Sure, I'll take it + name = legend_spread_events.5325.b + + trigger = { + NOT = { + prestige_level > 2 + } + } + + if = { + limit = { + exists = scope:your_legend + } + custom_tooltip = legend_spread_events.5325.stop_promoting_warning + custom_tooltip = legend_spread_events.5325.stop_promoting + + stop_promoting_legend = yes + } + + set_promoted_legend = scope:promoted_legend + + add_prestige = minor_prestige_gain + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + } + } + } + + option = { # I'll do it, but for a sum... + name = legend_spread_events.5325.c + + trigger = { #Ensure you're not taking money from humans + scope:promoted_legend_owner = { + is_ai = yes + } + } + + duel = { + skill = diplomacy + target = scope:promoted_legend_owner + + 50 = { # They agree + desc = legend_spread_events.5325.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = legend_spread_events.5325.c.success.tt + trigger_event = legend_spread_events.5326 + } + + 50 = { # They disagree + desc = legend_spread_events.5325.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + custom_tooltip = legend_spread_events.5325.c.failure.tt + trigger_event = legend_spread_events.5327 + } + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + generous = minor_stress_impact_gain + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # No thanks + name = legend_spread_events.5325.d + + reverse_add_opinion = { + target = scope:legend_person + modifier = angry_opinion + opinion = -10 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +legend_spread_events.5326 = { + type = letter_event + opening = { + desc = legend_spread_events.5326.opening + } + desc = legend_spread_events.5326.desc + + sender = { + character = scope:promoted_legend_owner + animation = personality_honorable + } + + option = { + name = legend_spread_events.5326.a + + scope:promoted_legend_owner = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + + custom_tooltip = legend_spread_events.5325.stop_promoting + + stop_promoting_legend = yes + + set_promoted_legend = scope:promoted_legend + } + + option = { + name = legend_spread_events.5326.b + + reverse_add_opinion = { + modifier = angry_opinion + opinion = -20 + target = scope:promoted_legend_owner + } + } +} + +legend_spread_events.5327 = { + type = letter_event + opening = { + desc = legend_spread_events.5327.opening + } + desc = legend_spread_events.5327.desc + + sender = { + character = scope:promoted_legend_owner + animation = dismissal + } + + option = { + name = legend_spread_events.5327.a + + add_stress = minor_stress_gain + } +} + +# Legend owner is evil; stop promoting? +legend_spread_events.5330 = { + type = character_event + title = legend_spread_events.5330.t + desc = legend_spread_events.5330.desc + theme = legend + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:promoted_legend_owner + animation = anger + } + cooldown = { years = 25 } + + trigger = { + #You have a legend and the legend owner is sinful + any_legend = { + any_legend_promoter = { #You are promoting that legend + this = root + } + legend_owner = { + num_sinful_traits >= 1 #They have at least one sinful trait + save_temporary_scope_as = promoted_legend_owner_temp + } + save_temporary_scope_as = promoted_legend_temp + } + + scope:promoted_legend_temp = { #Ensure they own the legend + legend_owner = scope:promoted_legend_owner_temp + } + } + + immediate = { + random_legend = { #Grab the legend you're promoting + limit = { + any_legend_promoter = { + this = root + } + legend_owner = { + num_sinful_traits >= 1 + } + } + save_scope_as = promoted_legend + } + + scope:promoted_legend.legend_owner = { + save_scope_as = promoted_legend_owner + } + + save_scope_as = root_scope + } + + option = { # How dare they! I am a godly WomanMan! + name = legend_spread_events.5330.a + + trigger = { + OR = { + scope:promoted_legend_owner = { #They're REALLY evil + num_sinful_traits >= 2 + } + has_trait = zealous #Or you're really godly + } + NOT = { + has_trait = cynical + } + } + + add_internal_flag = special + + promoted_legend = { + add_legend_county_modifier = { + modifier = legend_irreverent_immoral + years = 10 + } + } + + if = { #Just to ensure human players don't get blindsided + limit = { + scope:promoted_legend_owner = { + is_ai = yes + } + } + scope:promoted_legend_owner = { + add_character_modifier = { + modifier = legend_wicked_ways + years = 15 + } + } + } + + stop_promoting_legend = yes + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pleased_opinion + opinion = 25 + target = root + } + } + + reverse_add_opinion = { + modifier = angry_opinion + opinion = -20 + target = scope:promoted_legend_owner + } + + stress_impact = { + zealous = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + + ai_chance = { #Keep this low so we don't see non-player usage of it much if at all + base = 15 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # I have my own reputation to be thinking of + name = legend_spread_events.5330.b + + stop_promoting_legend = yes + + add_piety = minor_piety_gain + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = miniscule_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.5 + ai_sociability = -0.5 + } + } + } + + option = { # I'll grin and bear it + name = legend_spread_events.5330.c + + random = { + chance = 20 + send_interface_toast = { + title = legend_spread_events.5330.c.success + left_icon = root + + scope:promoted_legend_owner = { + add_character_modifier = { + modifier = legend_errors_exonerated + years = 10 + } + } + } + } + + reverse_add_opinion = { + target = scope:promoted_legend_owner + modifier = pleased_opinion + opinion = 30 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = angry_opinion + opinion = -10 + target = root + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Legend owner is very godly; promote more? +# Counterpart to 5330 +legend_spread_events.5335 = { + type = character_event + title = legend_spread_events.5335.t + desc = legend_spread_events.5335.desc + theme = legend + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:promoted_legend_owner + animation = personality_zealous + } + cooldown = { years = 25 } + + trigger = { + #You have a legend and the legend owner is virtuous + any_legend = { + any_legend_promoter = { #You are promoting that legend + this = root + } + legend_owner = { + num_virtuous_traits >= 1 #They have at least one virtuous trait + save_temporary_scope_as = promoted_legend_owner_temp + } + save_temporary_scope_as = promoted_legend_temp + } + + scope:promoted_legend_temp = { #Ensure they own the legend + legend_owner = scope:promoted_legend_owner_temp + } + } + + immediate = { + random_legend = { #Grab the legend you're promoting + limit = { + any_legend_promoter = { + this = root + } + legend_owner = { + num_virtuous_traits >= 1 + } + } + save_scope_as = promoted_legend + } + + scope:promoted_legend.legend_owner = { + save_scope_as = promoted_legend_owner + } + + save_scope_as = root_scope + } + + option = { # I love them! + name = legend_spread_events.5335.a + + trigger = { + OR = { + scope:promoted_legend_owner = { #They're REALLY godly + num_virtuous_traits >= 2 + } + has_trait = zealous #Or you're really godly + } + NOT = { + has_trait = cynical + } + } + + add_internal_flag = special + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_saintly_sinless + years = 15 + } + } + + add_piety = medium_piety_value + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = root + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + + ai_chance = { #Keep this low so we don't see non-player usage of it much if at all + base = 15 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # Use them to increase my fame + name = legend_spread_events.5335.b + + add_prestige = minor_prestige_value + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_principled_pious + years = 10 + } + } + + stress_impact = { + zealous = minor_stress_impact_gain + cynical = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_sociability = 0.5 + } + } + } + + option = { # Perhaps I should learn from him? + name = legend_spread_events.5335.c + + random = { + chance = 20 + send_interface_toast = { + title = legend_spread_events.5335.c.success + left_icon = root + + add_learning_skill = 1 + } + } + + reverse_add_opinion = { + target = scope:promoted_legend_owner + modifier = flattered_opinion + opinion = 15 + } + + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = pleased_opinion + opinion = 10 + target = root + } + } + + stress_impact = { + humble = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +## Additional Spread Events + +# You are asked how the tale goes +legend_spread_events.5400 = { + type = character_event + title = legend_spread_events.5400.t + desc = legend_spread_events.5400.desc + theme = legend + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { save_scope_as = promoted_legend } + culture = { save_scope_as = root_culture } + grab_appropriate_chronicler_effect = yes + } + + option = { # Improve your legend + name = legend_spread_events.5400.a + + duel = { + skill = diplomacy + value = high_skill_rating + + 50 = { # Your story is beautifully embellished + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = legend_spread_events.5400.a.majorsuccess + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # Your story is only somewhat embellished + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5400.a.minorsuccess + + add_prestige = medium_prestige_value + } + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Invent a story to change your legend + name = legend_spread_events.5400.b + + duel = { + skills = { diplomacy intrigue } + value = medium_skill_rating + + 50 = { # They believe you + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Nobody wants to disagree with you + dread > 49 + add = 5 + } + send_interface_toast = { + title = legend_spread_events.5400.b.success + + add_intrigue_skill = 1 + + promoted_legend = { + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_silver_tongued + } + } + } + } + + 50 = { # They don't really believe you + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # You're a crap liar + has_trait = honest + add = 5 + } + send_interface_toast = { + title = legend_spread_events.5400.b.failure + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + + promoted_legend = { + set_legend_chapter = { + name = famous_deed + localization_key = legend_chapter_easily_captured + } + } + } + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Opt-out + name = legend_spread_events.5400.c + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_tolerant_trusting + } + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + shy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } +} + +# You are asked whether the tales of a mythical beast are true +legend_spread_events.5405 = { + type = character_event + title = legend_spread_events.5405.t + desc = legend_spread_events.5405.desc + theme = legend + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { save_scope_as = promoted_legend } + grab_appropriate_chronicler_effect = yes + set_up_regional_mythical_creature_effect = yes + } + + option = { # Of course it was! + name = legend_spread_events.5405.a + + duel = { + skills = { diplomacy learning } + value = high_skill_rating + + 50 = { # They buy it + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5405.a.success + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_mythical_beast } + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + } + } + + 50 = { # They don't buy it + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5405.a.failure + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_decrease } + } + } + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # That's nonsense: here's what I DID see, though... + name = legend_spread_events.5405.b + + duel = { + skill = intrigue + value = high_skill_rating + + 50 = { # You make up a new creature on the spot + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # Nobody wants to disagree with you + dread > 49 + add = 5 + } + modifier = { # You're a good liar + has_trait = deceitful + add = 5 + } + send_interface_toast = { + title = legend_spread_events.5405.b.success + + add_intrigue_skill = 1 + + add_prestige = minor_prestige_gain + + promoted_legend = { + set_legend_chapter = { + name = discovery + localization_key = legend_chapter_discovery_new_myth + } + } + } + } + + 50 = { # What? That's ridiculous + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { # You're a crap liar + has_trait = honest + add = 5 + } + send_interface_toast = { + title = legend_spread_events.5405.b.failure + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Who can say? So many wondrous things I saw... + name = legend_spread_events.5405.c + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# You are asked what lies in the ocean depths +legend_spread_events.5410 = { + type = character_event + title = legend_spread_events.5410.t + desc = legend_spread_events.5410.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + has_legend_chapter = discovery + legend_protagonist = root + } + any_courtier = { + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { save_scope_as = promoted_legend } + grab_appropriate_chronicler_effect = yes + } + + option = { # The tales of the Vinland were true! + name = legend_spread_events.5410.a + + trigger = { + AND = { + culture = { has_cultural_pillar = heritage_north_germanic } + current_year >= 1000 #Use a rough estimate of when rumours of Vinland were beginning to propagate + } + } + + flavor = legend_spread_events.5410.a.flavor + + duel = { + skills = { diplomacy learning } + value = medium_skill_rating + + 50 = { # They buy it + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5410.a.success + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_discovery_vinland } + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + } + } + + 50 = { # They don't buy it + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = legend_spread_events.5410.a.failure + + 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_honor = -0.5 + } + } + } + + option = { # There were mighty sea monsters! + name = legend_spread_events.5410.b + + promoted_legend = { + set_legend_chapter = { name = discovery localization_key = legend_chapter_sea_monsters } + } + + add_character_modifier = { + modifier = sea_monsters_modifier + years = 15 + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_impact_gain + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Who can say? So many wondrous things I saw... + name = legend_spread_events.5410.c + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + option = { # There's nothing there, boy! + name = legend_spread_events.5410.d + + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + } + + add_trait_xp = { + trait = lifestyle_traveler + track = danger + value = { 5 15 } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +# Is your tale one of nobles or common folk? +legend_spread_events.5415 = { + type = character_event + title = legend_spread_events.5415.t + desc = legend_spread_events.5415.desc + theme = legend + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + promoted_legend ?= { + legend_owner = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { + save_scope_as = promoted_legend + legend_protagonist = { save_scope_as = protagonist } + } + grab_appropriate_chronicler_effect = yes + } + + option = { # It's all about the nobles, baby + name = legend_spread_events.5415.a + + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_nobles_noted + years = 15 + } + } + + stress_impact = { + content = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # It's about the common man! + name = legend_spread_events.5415.b + + promoted_legend = { + add_legend_county_modifier = { + modifier = legend_commoners_celebrated + years = 15 + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # It's about the protag themselves, duh + name = { + trigger = { + promoted_legend = { + legend_protagonist = root + } + } + text = legend_spread_events.5415.c.protag + } + name = { + trigger = { + NOT = { + promoted_legend = { + legend_protagonist = root + } + } + } + text = legend_spread_events.5415.c + } + + promoted_legend = { + change_legend_quality_effect = { VALUE = medium_legend_quality_increase } + } + + if = { + limit = { + promoted_legend = { + legend_protagonist = root + } + } + add_prestige = minor_prestige_gain + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + stubborn = minor_stress_impact_loss + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + +# You supposedly drank a mighty ogre under the table +# Inspired by Kuba Potapczyk +# As in, he suggested the event, not that he's an ogre +# ...necessarily +legend_spread_events.5420 = { + type = character_event + title = legend_spread_events.5420.t + desc = legend_spread_events.5420.desc + theme = legend + left_portrait = { + character = root + animation = toast + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + cooldown = { years = 20 } + + trigger = { + drinks_alcohol_trigger = yes + promoted_legend ?= { + legend_owner = root + legend_protagonist = root + } + any_courtier = { + this != root + is_available_ai_adult = yes + } + } + + immediate = { + promoted_legend = { + save_scope_as = promoted_legend + } + grab_appropriate_chronicler_effect = yes + } + + option = { # I'LL SHOW YOU RIGHT NOW + name = legend_spread_events.5420.a + + duel = { + skill = prowess + value = high_skill_rating + 50 = { #Chronicler is convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # You're a drunkard + has_trait = drunkard + add = 15 + } + modifier = { # You're a legend mate + has_trait = lifestyle_reveler + add = 10 + } + modifier = { # You'll drink anything + has_trait = gluttonous + add = 5 + } + desc = legend_spread_events.5420.a.success + send_interface_toast = { + title = legend_spread_events.5420.a.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = major_legend_quality_increase } + } + } + } + + 50 = { # People are unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5420.a.failure + send_interface_toast = { + title = legend_spread_events.5420.a.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + + add_character_modifier = { + modifier = legend_hangover_modifier + years = 3 + } + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + humble = minor_stress_impact_gain + temperate = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # You'll just have to believe me + name = legend_spread_events.5420.b + + duel = { + skill = diplomacy + value = very_high_skill_rating + 50 = { #Chronicler is convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { # You're a drunkard + has_trait = drunkard + add = 7 + } + modifier = { # You're a legend mate + has_trait = lifestyle_reveler + add = 4 + } + modifier = { # You'll drink anything + has_trait = gluttonous + add = 2 + } + desc = legend_spread_events.5420.b.success + send_interface_toast = { + title = legend_spread_events.5420.b.success + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_increase } + } + } + } + + 50 = { # Chronicler is unconvinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.5420.b.failure + send_interface_toast = { + title = legend_spread_events.5420.b.failure + left_icon = root + right_icon = scope:chronicler + + promoted_legend = { + change_legend_quality_effect = { VALUE = minor_legend_quality_decrease } + } + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + temperate = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + gluttonous = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + + option = { # I'm not warmed up :( + name = legend_spread_events.5420.c + + random = { + chance = 20 + send_interface_toast = { + title = legend_spread_events.5420.c.tt + left_icon = root + + add_character_modifier = { + modifier = legend_shy_drinker + years = 10 + } + } + } + + stress_impact = { + arrogant = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + humble = minor_stress_impact_loss + fickle = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + } + } + } +} diff --git a/N3OW/events/dlc/ce1/legend_spread_events_veronica.txt b/N3OW/events/dlc/ce1/legend_spread_events_veronica.txt new file mode 100644 index 00000000..169f2d18 --- /dev/null +++ b/N3OW/events/dlc/ce1/legend_spread_events_veronica.txt @@ -0,0 +1,3067 @@ +namespace = legend_spread_events +namespace = legend_debug + +############################ +## Legend Events +## 0001-1000 +## by Veronica Pazos +############################ + +# legend_spread_events.0001 - Are you the true descendant of x? +# legend_spread_events.0010 - Did you really kill that monster? +# legend_spread_events.0020 - Someone in your court doubts you! Oh no! +# legend_spread_events.0030 - Grab a recent memory - add that to your legend +# legend_spread_events.0040 - Did you do this because of a begging peasant? +# legend_spread_events.0050 - Did you do this to honor a lady/lord? +# legend_spread_events.0060 - Rumours about a powerful vassal mocking your legend +# legend_spread_events.0070 - Someone arrives at your court impressed by your legend +# legend_spread_events.0080 - People are going on a pilgrimage to the location of your legend + +##### DEBUG ###### +legend_debug.0001 = { + orphan = yes + type = character_event + theme = legend + desc = legend_debug.0001.desc + + option = { + create_legend_seed = { + type = heroic + quality = famed + chronicle = debug_legend + properties = { + beast = flag:bear + location = root.location + ancestor = character:159835 + ancestor_flag = flag:ramses + antagonist = flag:vercingetorix + culture = root.culture + title = title:k_england + god = flag:germanic_high_god_name + original_region = geographical_region:world_middle_east_jerusalem + } + } + } + + option = { + add_character_modifier = legend_spread_debug_modifier + } +} + +# Do you wanna send children to praise your legend? +legend_spread_events.0001 = { + + type = character_event + title = legend_spread_events.0001.t + desc = legend_spread_events.0001.desc + theme = legend + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = chancellor + } + lower_center_portrait = { + character = scope:ancestor + } + lower_left_portrait = { + trigger = { + exists = scope:my_child + primary_title.tier = tier_county + } + character = scope:my_child + } + cooldown = { years = 5 } + override_background = { reference = study } + + trigger = { + is_available_adult = yes + promoted_legend ?= { + legend_owner = root + exists = legend_property:ancestor + } + any_courtier = { #there's someone to tell you about this + this != root + is_available_ai_adult = yes + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + save_scope_as = root_scope #save scope for loc + promoted_legend = { + save_scope_as = legend + legend_property:ancestor = { save_scope_as = ancestor } + } + if = { + limit = { + any_child = { + is_alive = yes + age <= 12 + NOT = { is_primary_heir_of = root } + } + } + random_child = { + limit = { + is_alive = yes + age <= 12 + NOT = { is_primary_heir_of = root } + } + save_scope_as = my_child + } + } + } + + option = { #I am indeed + name = legend_spread_events.0001.a + duel = { + skills = { diplomacy intrigue } + value = high_skill_rating + 50 = { #you convince people + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.0001.a.tt.success + send_interface_toast = { + title = legend_spread_events.0001.a.tt.success + left_icon = root + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_increase + } + } + } + } + # no one believes you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.0001.a.tt.failure + send_interface_toast = { + title = legend_spread_events.0001.a.tt.failure + left_icon = root + promoted_legend = { + change_legend_quality_effect = { + VALUE = medium_legend_quality_decrease + } + } + } + } + } + + stress_impact = { + content = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + } + } + } + } + + option = { #Let's keep it down + name = legend_spread_events.0001.b + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = trust_opinion + opinion = 20 + target = root + } + } + stress_impact = { + arrogant = major_stress_impact_gain + deceitful = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = deceitful + has_trait = ambitious + } + } + } + } + + option = { #Send your own child + name = legend_spread_events.0001.c + trigger = { + exists = scope:my_child + primary_title.tier = tier_county + } + promoted_legend = { + change_legend_quality_effect = { + VALUE = minor_legend_quality_increase + } + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = trust_opinion + opinion = 20 + target = root + } + } + stress_impact = { + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + arrogant = medium_stress_impact_gain #it's weird to have your child in the market + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = arrogant + } + } + } + } + + option = { #I am my own legend + name = legend_spread_events.0001.d + trigger = { + has_trait = arrogant + } + add_character_modifier = { + modifier = legend_my_own_ancestor_modifier + years = 25 + } + stress_impact = { + humble = major_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + } + } + modifier = { + factor = 2 + has_trait = arrogant + } + } + } +} + +# Did you kill that monster? +legend_spread_events.0010 = { + + type = character_event + title = legend_spread_events.0010.t + desc = legend_spread_events.0010.desc + theme = legend + override_background = { reference = feast } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = brave + has_trait = strong + has_trait = ambitious + } + } + animation = hero_flex + } + animation = personality_honorable + } + right_portrait = { + character = scope:bard + animation = instrument_active + } + cooldown = { years = 5 } + + trigger = { + is_available_adult = yes + promoted_legend ?= { + legend_owner = root + exists = legend_property:beast #any legend featuring a beast + NOT = { has_variable = had_legends_0010 } + } + any_courtier = { #there's someone to tell you about this + this != root + is_available_ai_adult = yes + } + } + + immediate = { + save_scope_as = root_scope #loc reasons + promoted_legend = { + set_variable = had_legends_0010 + save_scope_as = legend + } + grab_appropriate_bard_effect = yes + } + + option = { #Actually... I killed a dragon + name = legend_spread_events.0010.a + trigger = { + promoted_legend = { + NOT = { + legend_property:beast ?= flag:dragon + } + } + } + duel = { + skills = { diplomacy prowess } #would people believe you _can_ kill a dragon? + value = high_skill_rating + 40 = { #you convince people + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = lifestyle_hunter + add = 5 + } + modifier = { + has_trait = deceitful + add = 5 + } + desc = legend_spread_events.0010.a.tt.success + send_interface_toast = { + title = legend_spread_events.0010.a.tt.success + left_icon = root + promoted_legend = { + set_legend_property = { name = beast target = flag:dragon } + } + add_character_modifier = { + modifier = legends_dragon_slayer + years = 25 + } + if = { + limit = { + is_ai = yes + } + random = { + chance = 5 + give_nickname = nick_the_dragonslayer + } + } + else = { + random = { + chance = 50 + give_nickname = nick_the_dragonslayer + } + } + add_prestige = minor_prestige_gain + } + } + # no one believes you + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + has_trait = craven + add = 25 + } + desc = legend_spread_events.0010.a.tt.failure + send_interface_toast = { + title = legend_spread_events.0010.a.tt.failure + left_icon = root + add_prestige = major_prestige_loss + } + } + } + + stress_impact = { + honest = major_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = humble + } + } + modifier = { + factor = 2 + has_trait = arrogant + } + } + } + + option = { #I did but it was a GIGANTIC one + name = legend_spread_events.0010.b + trigger = { + promoted_legend = { + NOT = { + legend_property:beast ?= flag:huge_beast + } + } + } + duel = { + skills = { diplomacy prowess } #would people believe you _can_ kill a dragon? + value = medium_skill_rating + 50 = { #you convince people + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = lifestyle_hunter + add = 25 + } + modifier = { + has_trait = strong + add = 5 + } + modifier = { + has_trait = brave + add = 5 + } + desc = legend_spread_events.0010.b.tt.success + send_interface_toast = { + title = legend_spread_events.0010.b.tt.success + left_icon = root + promoted_legend = { + set_legend_property = { name = beast target = flag:huge_beast } + } + add_prestige = minor_prestige_gain + } + } + # no one believes you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + has_trait = craven + add = 10 + } + desc = legend_spread_events.0010.a.tt.failure + send_interface_toast = { + title = legend_spread_events.0010.a.tt.failure + left_icon = root + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + humble = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = honest + } + } + } + } + + option = { #Let's keep it down + name = legend_spread_events.0010.c + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = trust_opinion + opinion = 20 + target = root + } + } + stress_impact = { + arrogant = major_stress_impact_gain + deceitful = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = deceitful + has_trait = ambitious + } + } + } + } +} + +# Someone in your court doubts you +legend_spread_events.0020 = { + + type = character_event + title = legend_spread_events.0020.t + desc = { + desc = legend_spread_events.0020.desc.intro + first_valid = { + triggered_desc = { + trigger = { + promoted_legend.legend_protagonist = root + } + desc = legend_spread_events.0020.desc.you_protag + } + desc = legend_spread_events.0020.desc.other_protag + } + desc = legend_spread_events.0020.desc.outro + } + theme = legend + override_background = { reference = corridor_day } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + } + animation = anger + } + animation = eavesdrop + } + right_portrait = { + character = scope:courtier + animation = scheme + } + cooldown = { years = 5 } + + trigger = { + is_available = yes + is_landed = yes + promoted_legend ?= { + legend_owner = root + } + any_courtier = { #there's someone gossipping + is_standard_legend_spreading_courtier = yes + } + } + + immediate = { + promoted_legend = { + legend_protagonist = { save_scope_as = protagonist } + } + random_courtier = { + limit = { + is_standard_legend_spreading_courtier = yes + } + save_scope_as = courtier + } + } + + option = { #Punish them + name = legend_spread_events.0020.a + trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + } + add_dread = major_dread_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:courtier + IMPRISONER = root + } + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + opinion = -10 + target = root + modifier = cruelty_opinion + } + } + stress_impact = { + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = calm + } + } + modifier = { + factor = 2 + OR = { + has_trait = wrathful + has_trait = sadistic + } + } + } + } + + option = { #Call them out + name = legend_spread_events.0020.b + duel = { + skill = diplomacy + target = scope:courtier + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.0020.b.tt.success + send_interface_toast = { + title = legend_spread_events.0020.b.tt.success + left_icon = scope:courtier + add_character_modifier = { + modifier = legend_put_out_rumors_modifier + years = 5 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.0020.b.tt.failure + send_interface_toast = { + title = legend_spread_events.0020.b.tt.failure + left_icon = scope:courtier + scope:courtier = { + add_opinion = { + opinion = -30 + target = root + modifier = dismissive_opinion + } + } + } + } + } + + stress_impact = { + humble = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = honest + } + } + } + } + + option = { #Ignore them + name = legend_spread_events.0020.c + add_character_modifier = { + modifier = legend_sus_rumors_modifier + years = 2 + } + stress_impact = { + base = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + } + } + } +} + +# Do you wanna add this recent memory to your chronicle? + +scripted_trigger is_legend_worthy_memory = { + has_memory_category = positive + OR = { + has_memory_category = war + has_memory_category = travel + has_memory_category = martial + has_memory_category = battle + has_memory_category = tournament + has_memory_category = nemesis + } +} + +legend_spread_events.0030 = { + + type = character_event + title = legend_spread_events.0030.t + desc = { + desc = legend_spread_events.0030.desc.intro + first_valid = { + triggered_desc = { + trigger = { + promoted_legend.legend_protagonist = root + } + desc = legend_spread_events.0030.desc.you_protag + } + desc = legend_spread_events.0030.desc.other_protag + } + } + theme = legend + override_background = { reference = study } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chronicler + animation = page_flipping + } + cooldown = { years = 5 } + + trigger = { + is_available = yes + promoted_legend ?= { + legend_owner = root + has_legend_chapter = { + name = extra_deed + } + NOT = { has_variable = had_legends_0030 } + } + any_memory = { + is_legend_worthy_memory = yes + } + any_courtier = { #chronicler backup + this != root + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_memory = { + is_legend_worthy_memory = yes + } + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + set_variable = { + name = had_legends_0030 + years = 10 + } + legend_protagonist = { save_scope_as = protagonist } + } + random_memory = { + limit = { is_legend_worthy_memory = yes } + weight = { + base = 1 + modifier = { + add = 10 + has_memory_category = major + } + modifier = { + add = 2 + has_memory_category = battle + } + modifier = { + add = 2 + has_memory_category = war + } + modifier = { + add = 1 + has_memory_category = martial + } + } + save_scope_as = legend_memory + } + } + + option = { #I already told you my legend once, didn't I? + name = legend_spread_events.0030.a + flavor = legend_spread_events.0030.a.flavor + trigger = { + OR = { + has_trait = stubborn + has_trait = lazy + } + } + add_character_modifier = { + modifier = legend_lazy_modifier + years = 5 + } + stress_impact = { + lazy = major_stress_impact_loss + stubborn = major_stress_impact_loss + calm = medium_stress_impact_gain + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = calm + } + } + modifier = { + factor = 2 + OR = { + has_trait = lazy + has_trait = stubborn + } + } + } + } + + option = { #Sure, replace it + name = legend_spread_events.0030.b + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.0030.b.tt.success + send_interface_toast = { + title = legend_spread_events.0030.b.tt.success + left_icon = root + promoted_legend = { + if = { + limit = { + NOT = { + exists = var:extra_deed_memory + } + } + set_variable = { + name = extra_deed_memory + value = scope:legend_memory + } + } + set_legend_chapter = { name = extra_deed localization_key = legend_chapter_extra_deed_memory } + } + if = { + limit = { #people remember you actually did this + promoted_legend.legend_protagonist = root + } + add_character_modifier = { + modifier = legend_memory_deed_modifier + years = 5 + } + } + else = { + add_prestige = minor_prestige_gain + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.0030.b.tt.failure + send_interface_toast = { + title = legend_spread_events.0030.b.tt.failure + left_icon = root + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = stubborn + } + } + } + } + + option = { #Leave it as it is + name = legend_spread_events.0030.c + every_courtier_or_guest = { + limit = { + OR = { + has_trait = humble + has_trait = content + } + } + custom = humble_content_courtiers_and_guests + add_opinion = { + opinion = 20 + target = root + modifier = pleased_opinion + } + } + stress_impact = { + humble = medium_stress_impact_loss + content = medium_stress_impact_loss + shy = major_stress_impact_loss + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = content + has_trait = shy + } + } + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + } + } +} + +# Did you do this because a peasant begged you to? +legend_spread_events.0040 = { + + type = character_event + title = legend_spread_events.0040.t + desc = { + desc = legend_spread_events.0040.desc.intro + first_valid = { + triggered_desc = { + trigger = { + promoted_legend.legend_protagonist = root + } + desc = legend_spread_events.0040.desc.you_protag + } + desc = legend_spread_events.0040.desc.other_protag + } + desc = legend_spread_events.0040.desc.outro + } + theme = legend + override_background = { reference = throne_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = dismissal + } + animation = personality_honorable + } + right_portrait = { + character = scope:chronicler + animation = page_flipping + } + lower_center_portrait = { + trigger = { + exists = scope:chaplain + scope:chaplain != scope:chronicler + } + character = scope:chaplain + } + cooldown = { years = 5 } + + trigger = { + is_available = yes + promoted_legend ?= { + legend_owner = root + OR = { + legend_type = legend_type:heroic + legend_type = legend_type:holy + } + has_legend_chapter = motivation + NOT = { + has_legend_chapter = { + name = motivation + localization_key = legend_chapter_motivation_peasant + } + } + NOT = { has_variable = had_legends_0040 } + } + any_courtier = { #chronicler backup + this != root + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + promoted_legend ?= { + legend_owner = root + legend_type = legend_type:holy + } + } + } + + immediate = { + grab_appropriate_chronicler_effect = yes + promoted_legend = { + set_variable = had_legends_0040 + legend_protagonist = { save_scope_as = protagonist } + } + save_scope_as = root_scope + cp:councillor_court_chaplain ?= { save_scope_as = chaplain } + } + + option = { #I would _never_ let a peasant tell me what to do + name = legend_spread_events.0040.a + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_evil } + } + stress_impact = { + callous = major_stress_impact_loss + sadistic = major_stress_impact_loss + calm = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = compassionate + } + } + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { #I sure did! + name = legend_spread_events.0040.b + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.0040.b.tt.success + send_interface_toast = { + title = legend_spread_events.0040.b.tt.success + left_icon = root + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_peasant } + } + add_piety = medium_piety_gain + every_vassal_or_below = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.0040.b.tt.failure + send_interface_toast = { + title = legend_spread_events.0040.b.tt.failure + left_icon = root + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + add_opinion = { + target = root + opinion = -10 + modifier = impious_opinion + } + } + } + else_if = { + limit = { promoted_legend.legend_type = legend_type:holy } + add_piety = medium_piety_loss + } + else = { add_piety = minor_piety_loss } + } + } + } + + stress_impact = { + compassionate = major_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + promoted_legend.legend_type = legend_type:holy + } + modifier = { + factor = 2 + OR = { + has_trait = compassionate + has_trait = zealous + } + } + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { #Leave it as it is + name = legend_spread_events.0040.c + if = { + limit = { + promoted_legend.legend_type = legend_type:holy + } + add_piety = minor_piety_loss + } + else = { + add_piety = miniscule_piety_loss + } + stress_impact = { + zealous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = compassionate + } + } + } + } +} + +# Did you do this to honor a fair lady/lord? +scripted_trigger 0050_valid_courtier = { + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + is_attracted_to_gender_of = root + root = { is_attracted_to_gender_of = prev } +} + +legend_spread_events.0050 = { + type = character_event + title = legend_spread_events.0050.t + desc = legend_spread_events.0050.desc + theme = legend + override_background = { reference = garden } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = rakish + has_trait = lustful + has_trait = seducer + has_trait = deviant + } + } + animation = flirtation_left + } + triggered_animation = { + trigger = { has_trait = callous } + animation = dismissal + } + animation = laugh + } + right_portrait = { + character = scope:bard + animation = instrument_active + } + lower_left_portrait = { + trigger = { exists = scope:my_spouse } + character = scope:my_spouse + } + lower_right_portrait = scope:honored_lady + cooldown = { years = 5 } + + trigger = { + is_available_adult = yes + promoted_legend ?= { + legend_owner = root + NOT = { has_variable = had_legends_0050 } + NOR = { + has_legend_chapter = { + name = motivation + localization_key = legend_chapter_motivation_spouse + } + has_legend_chapter = { + name = motivation + localization_key = legend_chapter_motivation_honor_lady + } + } + has_legend_chapter = motivation + legend_protagonist = root + } + any_courtier_or_guest = { #we have a lady + 0050_valid_courtier = yes + count >= 2 #to make sure we also have a bard + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + OR = { + is_married = yes + has_trait = lustful + has_trait = seducer + has_trait = rakish + } + } + } + + immediate = { + grab_appropriate_bard_effect = yes + promoted_legend = { + set_variable = had_legends_0050 + } + if = { + limit = { is_married = yes } + random_spouse = { + weight = { + base = 1 + modifier = { + add = 5 + has_relation_soulmate = root + } + modifier = { + add = 3 + primary_spouse = this + } + modifier = { + add = 1 + has_relation_lover = root + } + } + save_scope_as = my_spouse + } + } + random_courtier_or_guest = { + limit = { + 0050_valid_courtier = yes + this != scope:bard + } + weight = { + base = 1 + modifier = { + add = 20 + has_relation_soulmate = root + } + modifier = { + add = 10 + has_relation_lover = root + } + modifier = { + add = 5 + is_married = no + age >= root.age_minus_10 + age <= root.age_plus_10 + } + } + save_scope_as = honored_lady + } + } + + option = { #Of course! To honor my spouse! + name = legend_spread_events.0050.a + trigger = { + is_married = yes + } + promoted_legend = { + set_legend_chapter = { + name = motivation + localization_key = legend_chapter_motivation_spouse + } + } + if = { + limit = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:my_spouse } + scope:my_spouse = { #do they like you + opinion = { + target = root + value >= 50 + } + } + } + set_relation_soulmate = { + reason = soulmate_legend_motivation + copy_reason = lover + target = scope:my_spouse + } + } + else = { + progress_towards_lover_effect = { + CHARACTER = scope:my_spouse + REASON = soulmate_legend_motivation + OPINION = default_lover_opinion + } + } + stress_impact = { + rakish = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = rakish + } + modifier = { + factor = 0 + might_cheat_on_every_partner_trigger = no + } + } + } + + option = { #That fair woman/man... + name = legend_spread_events.0050.b + duel = { + skill = intrigue + value = medium_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = seducer + add = 10 + } + modifier = { + scope:honored_lady = { + has_trait = lustful + } + add = 5 + } + desc = legend_spread_events.0050.b.tt.success + send_interface_toast = { + title = legend_spread_events.0050.b.tt.success + left_icon = scope:honored_lady + promoted_legend = { + set_legend_chapter = { name = motivation localization_key = legend_chapter_motivation_honor_lady } + } + if = { + limit = { has_focus_or_focus_trait_trigger = { FOCUS = intrigue_temptation_focus } } + add_intrigue_lifestyle_xp = major_lifestyle_xp + } + else = { + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + progress_towards_lover_effect = { + CHARACTER = scope:honored_lady + REASON = soulmate_legend_motivation + OPINION = default_lover_opinion + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:honored_lady = { + OR = { + has_trait = chaste + has_trait = celibate + } + } + add = 10 + } + desc = legend_spread_events.0050.b.tt.failure + send_interface_toast = { + title = legend_spread_events.0050.b.tt.failure + left_icon = scope:honored_lady + + reverse_add_opinion = { + modifier = insulted_opinion + target = scope:honored_lady + opinion = -10 + } + } + } + } + scope:my_spouse ?= { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -25 + } + } + stress_impact = { + seducer = major_stress_impact_loss + lustful = medium_stress_impact_loss + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = compassionate + trigger_if = { + limit = { exists = scope:my_spouse } + NOT = { + might_cheat_on_partner_trigger = { PARTNER = scope:my_spouse } + } + } + } + } + modifier = { + factor = 2 + OR = { + has_trait = lustful + has_trait = seducer + } + } + } + } + + option = { #Leave it as it is + name = legend_spread_events.0050.c + add_prestige = minor_prestige_gain + scope:my_spouse ?= { + add_opinion = { + modifier = pleased_opinion + opinion = 5 + target = root + } + } + stress_impact = { + base = medium_stress_impact_loss + lustful = major_stress_impact_gain + seducer = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = seducer + } + } + } + } +} + +#Rumors about a powerful vassal mocking you +legend_spread_events.0060 = { + + type = character_event + title = legend_spread_events.0060.t + desc = { + desc = legend_spread_events.0060.desc.intro + first_valid = { + triggered_desc = { + trigger = { + promoted_legend.legend_protagonist = root + } + desc = legend_spread_events.0060.desc.you_protag + } + desc = legend_spread_events.0060.desc.other_protag + } + desc = legend_spread_events.0060.desc.outro + } + theme = legend + override_background = { reference = throne_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = deceitful + has_trait = stubborn + } + } + animation = anger + } + animation = dismissal + } + right_portrait = { + character = scope:courtier + animation = worry + } + lower_center_portrait = scope:bad_vassal + cooldown = { years = 5 } + + trigger = { + is_available_adult = yes + promoted_legend ?= { + legend_owner = root + } + any_courtier_or_guest = { + is_standard_legend_spreading_courtier = yes + } + any_powerful_vassal = { + is_available_ai_adult = yes + opinion = { + target = root + value <= -20 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_powerful_vassal = { + is_available_ai_adult = yes + opinion = { + target = root + value <= -75 + } + } + } + } + + immediate = { + random_courtier_or_guest = { + limit = { is_standard_legend_spreading_courtier = yes } + weight = { + base = 1 + modifier = { + add = 2 + has_any_good_relationship_with_root_trigger = yes + } + } + save_scope_as = courtier + } + random_powerful_vassal = { + limit = { + is_available_ai_adult = yes + opinion = { + target = root + value <= -20 + } + } + weight = { + base = 1 + modifier = { + add = 10 + has_relation_nemesis = root + } + modifier = { + add = 5 + has_relation_rival = root + } + modifier = { + add = 2 + opinion = { + target = root + value <= -50 + } + } + } + save_scope_as = bad_vassal + } + } + + option = { #Seethe + name = legend_spread_events.0060.a + progress_towards_rival_effect = { + CHARACTER = scope:bad_vassal + REASON = rival_mocked_legend + OPINION = -20 + } + stress_impact = { + base = medium_stress_impact_loss + wrathful = massive_stress_impact_loss + calm = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = wrathful + } + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = forgiving + } + } + } + } + + option = { #Try to put out the rumors + name = legend_spread_events.0060.b + duel = { + skills = { diplomacy intrigue } + target = scope:bad_vassal + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = legend_spread_events.0060.b.tt.success + send_interface_toast = { + title = legend_spread_events.0060.b.tt.success + left_icon = scope:bad_vassal + add_character_modifier = { + modifier = legend_no_mocking_modifier + years = 5 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = legend_spread_events.0060.b.tt.failure + send_interface_toast = { + title = legend_spread_events.0060.b.tt.failure + left_icon = scope:bad_vassal + add_character_modifier = { + modifier = legend_extra_mocking_modifier + years = 5 + } + } + } + } + stress_impact = { + wrathful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = wrathful + has_trait = arrogant + } + } + } + } + + option = { #Turn it back on them + name = legend_spread_events.0060.c + trigger = { + intrigue >= high_skill_rating + } + scope:bad_vassal = { + add_character_modifier = { + modifier = not_believable_modifier + years = 10 + } + } + stress_impact = { + base = medium_stress_impact_loss + callous = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = deceitful + } + } + } + } + + option = { #Didn't hear anything + name = legend_spread_events.0060.d + + stress_impact = { + base = minor_stress_impact_loss + calm = medium_stress_impact_loss + forgiving = medium_stress_impact_loss + wrathful = major_stress_impact_gain + arrogant = major_stress_impact_gain + vengeful = major_stress_impact_gain + callous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = calm + has_trait = forgiving + } + } + modifier = { + factor = 0 + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = callous + has_trait = vengeful + } + } + } + } +} + + +#Someone sings your legend at a party - doubts +#Start of event chain + +scripted_effect trigger_appropriate_breakdown_effect = { + if = { + limit = { + promoted_legend.legend_type = legend_type:holy + } + trigger_event = { + id = legend_spread_events.0072 + days = { 10 20 } + } + } + else_if = { + limit = { + promoted_legend.legend_type = legend_type:heroic + } + trigger_event = { + id = legend_spread_events.0073 + days = { 10 20 } + } + } + else = { #Legitimizing + trigger_event = { + id = legend_spread_events.0074 + days = { 10 20 } + } + } +} + +legend_spread_events.0070 = { + type = character_event + title = legend_spread_events.0070.t + desc = legend_spread_events.0070.desc + theme = legend + override_background = { reference = feast } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = callous + has_trait = ambitious + } + } + animation = personality_honorable + } + triggered_animation = { + trigger = { + OR = { + has_trait = humble + has_trait = depressed_genetic + has_trait = depressed_1 + } + } + animation = grief + } + animation = worry + } + right_portrait = { + character = scope:bard + animation = instrument_active + } + cooldown = { years = 25 } + + trigger = { + is_available_adult = yes + promoted_legend ?= { + legend_owner = root + } + any_courtier_or_guest = { + is_standard_legend_spreading_courtier = yes + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + grab_appropriate_bard_effect = yes + } + + option = { #I am the very best like no one ever was + name = legend_spread_events.0070.a + trigger = { + OR = { + has_trait = arrogant + has_trait = callous + has_trait = ambitious + } + } + set_variable = legend_chain_arrogant_var + custom_tooltip = legend_spread_events.0070.a.tt + add_prestige = minor_prestige_gain + trigger_event = { + id = legend_spread_events.0071 + days = { 10 20 } + } + + stress_impact = { + base = medium_stress_impact_loss + depressed_1 = major_stress_impact_gain + depressed_genetic = major_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = humble + } + } + } + } + + option = { #I'm having a mental breakdown help + name = legend_spread_events.0070.b + trigger = { + NOR = { + has_trait = humble + has_trait = depressed_genetic + has_trait = depressed_1 + } + } + trigger_appropriate_breakdown_effect = yes + custom_tooltip = legend_spread_events.0070.a.tt + add_piety = minor_piety_gain + + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = callous + } + } + } + } + + option = { #Im having a _really_ bad mental breakdown help + name = legend_spread_events.0070.c + trigger = { + OR = { + has_trait = humble + has_trait = depressed_genetic + has_trait = depressed_1 + } + } + custom_tooltip = legend_spread_events.0070.a.tt + set_variable = legend_chain_depressed_var + trigger_appropriate_breakdown_effect = yes + + stress_impact = { + base = medium_stress_impact_loss + arrogant = major_stress_impact_gain + ambitious = major_stress_impact_gain + callous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = callous + } + } + } + } + + option = { #It's not that bad + name = legend_spread_events.0070.d + custom_tooltip = legend_spread_events.0070.a.tt + add_prestige = minor_prestige_gain + trigger_event = { + id = legend_spread_events.0071 + days = { 10 20 } + } + + stress_impact = { + base = medium_stress_impact_gain + depressed_1 = major_stress_impact_gain + depressed_genetic = major_stress_impact_gain + humble = major_stress_impact_gain + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + callous = medium_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = humble + } + } + } + } +} + +scripted_trigger legend_spread_events_0071_promoter_trigger = { + is_physically_able_adult = yes + number_of_personality_traits_in_common = { + target = root + value >= 1 + } + NOT = { exists = promoted_legend } +} + +# You're feeling pretty good about your legend +legend_spread_events.0071 = { + type = character_event + title = legend_spread_events.0071.t + desc = { + desc = legend_spread_events.0071.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_variable = legend_chain_arrogant_var } + desc = legend_spread_events.0071.desc.mid.arrogant + } + desc = legend_spread_events.0071.desc.mid + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:promoter + } + desc = legend_spread_events.0071.desc.promoter + } + desc = legend_spread_events.0071.desc.fallback + } + } + theme = legend_terrain + left_portrait = { + character = root + animation = hero_flex + camera = camera_event_very_left + } + right_portrait = { + trigger = { exists = scope:promoter } + character = scope:promoter + animation = admiration + camera = camera_event_right + } + lower_right_portrait = { + trigger = { exists = scope:other_promoter } + character = scope:other_promoter + } + + immediate = { + save_scope_as = root_scope + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { legend_spread_events_0071_promoter_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + has_any_good_relationship_with_root_trigger = yes + } + modifier = { + add = -5 + primary_title = { is_head_of_faith = yes } + } + } + save_scope_as = promoter + } + if = { + limit = { NOT = { exists = scope:promoter } } + random_vassal = { + limit = { legend_spread_events_0071_promoter_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + has_any_good_relationship_with_root_trigger = yes + } + modifier = { + add = 5 + is_powerful_vassal_of = root + } + } + save_scope_as = promoter + } + } + if = { + limit = { NOT = { exists = scope:promoter } } + random_courtier = { + limit = { legend_spread_events_0071_promoter_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + has_any_good_relationship_with_root_trigger = yes + } + } + save_scope_as = promoter + } + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + legend_spread_events_0071_promoter_trigger = yes + this != scope:promoter + } + weight = { + base = 1 + modifier = { + add = 10 + has_any_good_relationship_with_root_trigger = yes + } + modifier = { + add = -5 + primary_title = { is_head_of_faith = yes } + } + } + save_scope_as = other_promoter + } + if = { + limit = { NOT = { exists = scope:other_promoter } } + random_vassal = { + limit = { + legend_spread_events_0071_promoter_trigger = yes + this != scope:promoter + } + weight = { + base = 1 + modifier = { + add = 10 + has_any_good_relationship_with_root_trigger = yes + } + modifier = { + add = 5 + is_powerful_vassal_of = root + } + } + save_scope_as = other_promoter + } + } + if = { + limit = { NOT = { exists = scope:other_promoter } } + random_courtier = { + limit = { + legend_spread_events_0071_promoter_trigger = yes + this != scope:promoter + } + weight = { + base = 1 + modifier = { + add = 10 + has_any_good_relationship_with_root_trigger = yes + } + } + save_scope_as = other_promoter + } + } + } + + option = { #Convince this guy to be a promoter + name = legend_spread_events.0071.a + trigger = { + exists = scope:promoter + } + scope:promoter = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + gregarious = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 0 + has_trait = ambitious + } + } + } + + option = { #Convince this other guy + name = legend_spread_events.0071.b + trigger = { exists = scope:other_promoter } + scope:other_promoter = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + gregarious = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + } + } + + option = { #Try to convince your vassals you're cool instead + name = legend_spread_events.0071.c + every_vassal = { + vassal_stance = parochial + custom = every_parochial_vassal + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 50 + } + } + + stress_impact = { + humble = medium_stress_impact_gain + ambitious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + modifier = { + factor = 2 + has_trait = ambitious + } + } + } + + option = { #I don't care about anyone's opinion but MY OWN + name = legend_spread_events.0071.d + if = { + limit = { + has_variable = legend_chain_arrogant_var + } + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_chain_arrogant_modifier + } + } + } + else = { + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_chain_kinda_arrogant_modifier + } + } + } + + stress_impact = { + arrogant = medium_stress_impact_loss + callous = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + humble = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = gregarious + } + } + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = deceitful + has_trait = arrogant + } + } + } + } +} + +# You're feeling pretty bad about your legend - Holy +legend_spread_events.0072 = { + type = character_event + title = legend_spread_events.0072.t + desc = { + desc = legend_spread_events.0072.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_variable = legend_chain_depressed_var } + desc = legend_spread_events.0072.desc.mid.depressed + } + desc = legend_spread_events.0072.desc.mid.fallback + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:praying_vassal + } + desc = legend_spread_events.0072.desc.vassal + } + desc = legend_spread_events.0072.desc.fallback + } + } + theme = legend + override_background = { reference = temple } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = humble + has_trait = depressed_genetic + has_trait = depressed_1 + } + } + animation = worry + } + animation = prayer + } + right_portrait = { + trigger = { exists = scope:praying_vassal } + character = scope:praying_vassal + animation = personality_zealous + } + lower_center_portrait = { + trigger = { exists = scope:bishop } + character = scope:bishop + } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_as = root_scope + if = { + limit = { + any_vassal = { + is_physically_able_adult = yes + ai_zeal > 0 + NOT = { exists = promoted_legend } + NOT = { has_council_position = councillor_court_chaplain } + } + } + random_vassal = { + limit = { + is_physically_able_adult = yes + ai_zeal > 0 + NOT = { exists = promoted_legend } + NOT = { has_council_position = councillor_court_chaplain } + } + weight = { + base = 1 + modifier = { + add = 10 + is_powerful_vassal_of = root + } + modifier = { + add = 5 + has_any_good_relationship_with_root_trigger = yes + } + modifier = { + add = 5 + has_trait = zealous + } + } + save_scope_as = praying_vassal + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { save_scope_as = bishop } + } + } + + option = { #Think about god + name = legend_spread_events.0072.a + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_chain_zealous_modifier + } + } + + stress_impact = { + zealous = major_stress_impact_loss + cynical = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = ambitious + has_trait = cynical + } + } + } + } + + option = { #Convince this guy that's also praying here + name = legend_spread_events.0072.b + trigger = { + exists = scope:praying_vassal + } + scope:praying_vassal = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + gregarious = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = zealous + } + } + } + } + + option = { #Try to convince your vassals you're cool instead + name = legend_spread_events.0072.c + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 50 + } + } + + if = { #if you don't have another option we give you a bit of extra piety + limit = { + NOT = { exists = scope:praying_vassal } + } + add_piety = minor_piety_gain + } + + stress_impact = { + humble = medium_stress_impact_gain + zealous = medium_stress_impact_gain + ambitious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = zealous + } + } + modifier = { + factor = 2 + has_trait = ambitious + } + } + } + + option = { #I don't care about anyone's opinion but my chaplain's + name = legend_spread_events.0072.d + trigger = { + exists = scope:bishop + } + scope:bishop = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 50 + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = arrogant + has_trait = ambitious + } + } + } + } +} + +# You're feeling pretty bad about your legend - Heroic +legend_spread_events.0073 = { + type = character_event + title = legend_spread_events.0073.t + desc = { + desc = legend_spread_events.0073.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_variable = legend_chain_depressed_var } + desc = legend_spread_events.0073.desc.mid.depressed + } + desc = legend_spread_events.0073.desc.mid.fallback + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fighting_vassal + } + desc = legend_spread_events.0073.desc.vassal + } + desc = legend_spread_events.0073.desc.fallback + } + } + theme = legend_terrain + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = humble + has_trait = depressed_genetic + has_trait = depressed_1 + } + } + animation = grief + } + animation = worry + } + right_portrait = { + trigger = { exists = scope:fighting_vassal } + character = scope:fighting_vassal + animation = marshal + } + lower_center_portrait = { + trigger = { exists = scope:marshal } + character = scope:marshal + } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_as = root_scope + if = { + limit = { + any_vassal = { + is_physically_able_adult = yes + OR = { + ai_boldness > 0 + ai_energy > 0 + } + NOT = { exists = promoted_legend } + NOT = { has_council_position = councillor_marshal } + } + } + random_vassal = { + limit = { + is_physically_able_adult = yes + OR = { + ai_boldness > 0 + ai_energy > 0 + } + NOT = { exists = promoted_legend } + NOT = { has_council_position = councillor_marshal } + } + weight = { + base = 1 + modifier = { + add = 10 + is_powerful_vassal_of = root + } + modifier = { + add = 5 + has_any_good_relationship_with_root_trigger = yes + } + modifier = { + add = 5 + has_trait = brave + } + } + save_scope_as = fighting_vassal + } + } + if = { + limit = { + exists = cp:councillor_marshal + } + cp:councillor_marshal = { save_scope_as = marshal } + } + } + + option = { #Think about heroic battles + name = legend_spread_events.0073.a + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_chain_army_modifier + } + } + + stress_impact = { + calm = medium_stress_impact_gain + wrathful = medium_stress_impact_loss + brave = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = wrathful + has_trait = brave + } + } + modifier = { + factor = 0 + has_trait = calm + } + } + } + + option = { #Convince this guy that's also hanging out here + name = legend_spread_events.0073.b + trigger = { + exists = scope:fighting_vassal + } + scope:fighting_vassal = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + gregarious = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = zealous + } + } + } + } + + option = { #Try to convince your vassals you're cool instead + name = legend_spread_events.0073.c + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 50 + } + } + + if = { #if you don't have another option we give you a bit of extra prestige + limit = { + NOT = { exists = scope:fighting_vassal } + } + add_prestige = minor_prestige_gain + } + + stress_impact = { + ambitious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = ambitious + } + } + } + + option = { #I don't care about anyone's opinion but my marshal's + name = legend_spread_events.0073.d + trigger = { + exists = scope:marshal + } + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_chain_marshal_modifier + } + } + scope:marshal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 50 + } + } + + stress_impact = { + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = arrogant + has_trait = ambitious + } + } + } + } +} + +# You're feeling pretty bad about your legend - Legitimizing +legend_spread_events.0074 = { + type = character_event + title = legend_spread_events.0074.t + desc = { + desc = legend_spread_events.0074.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_variable = legend_chain_depressed_var } + desc = legend_spread_events.0074.desc.mid.depressed + } + desc = legend_spread_events.0074.desc.mid.fallback + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:wise_vassal + } + desc = legend_spread_events.0074.desc.vassal + } + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spouse + } + desc = legend_spread_events.0074.desc.spouse + } + desc = legend_spread_events.0074.desc.fallback + } + } + theme = legend + override_background = { reference = ce1_catacombs } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = humble + has_trait = depressed_genetic + has_trait = depressed_1 + } + } + animation = grief + } + animation = worry + } + right_portrait = { + trigger = { exists = scope:wise_vassal } + character = scope:wise_vassal + animation = personality_honorable + } + lower_left_portrait = { + trigger = { exists = scope:spouse } + character = scope:spouse + } + lower_right_portrait = { + trigger = { exists = scope:chancellor } + character = scope:chancellor + } + + immediate = { + save_scope_as = root_scope + if = { + limit = { + any_vassal = { + is_physically_able_adult = yes + OR = { + ai_sociability > 0 + ai_compassion > 0 + } + NOT = { exists = promoted_legend } + NOT = { has_council_position = councillor_chancellor } + } + } + random_vassal = { + limit = { + is_physically_able_adult = yes + OR = { + ai_sociability > 0 + ai_compassion > 0 + } + NOT = { exists = promoted_legend } + NOT = { has_council_position = councillor_chancellor } + } + weight = { + base = 1 + modifier = { + add = 10 + is_powerful_vassal_of = root + } + modifier = { + add = 5 + has_any_good_relationship_with_root_trigger = yes + } + modifier = { + add = 5 + OR = { + has_trait = shrewd + has_trait = intellect_good + } + } + } + save_scope_as = wise_vassal + } + } + if = { + limit = { + exists = cp:councillor_chancellor + } + cp:councillor_chancellor = { save_scope_as = chancellor } + } + if = { + limit = { + any_spouse = { } + } + random_spouse = { + weight = { + base = 1 + modifier = { + add = 10 + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + modifier = { + add = 5 + this = root.primary_spouse + } + } + save_scope_as = spouse + } + } + } + + option = { #Think about your spouse + name = legend_spread_events.0074.a + trigger = { exists = scope:spouse } + add_character_modifier = { + modifier = legend_chain_spouse_modifier + years = 25 + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + compassionate = medium_stress_impact_loss + lustful = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = lustful + has_trait = compassionate + } + } + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { #Convince this guy that's also hanging out here + name = legend_spread_events.0074.b + trigger = { + exists = scope:wise_vassal + } + scope:wise_vassal = { + set_promoted_legend = root.promoted_legend + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + gregarious = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = compassionate + has_trait = lustful + } + } + } + } + + option = { #Try to convince your vassals you're cool instead + name = legend_spread_events.0074.c + trigger = { + any_vassal = { } + } + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 50 + } + } + + if = { #if you don't have another option we give you a bit of extra prestige + limit = { + NOR = { + exists = scope:wise_vassal + exists = scope:spouse + } + } + add_prestige = minor_prestige_gain + } + + stress_impact = { + + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = deceitful + } + } + } + } + + option = { #I don't care about anyone's opinion but my chancellor's + name = legend_spread_events.0074.d + trigger = { + exists = scope:chancellor + } + promoted_legend = { + add_legend_owner_modifier = { + modifier = legend_chain_chancellor_modifier + } + } + scope:chancellor = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 50 + } + } + + stress_impact = { + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = arrogant + has_trait = ambitious + } + } + } + } +} diff --git a/N3OW/events/dlc/ce1/legitimacy_events.txt b/N3OW/events/dlc/ce1/legitimacy_events.txt new file mode 100644 index 00000000..8b438237 --- /dev/null +++ b/N3OW/events/dlc/ce1/legitimacy_events.txt @@ -0,0 +1,32 @@ +namespace = legitimacy_events + +############################ +## Legitimacy Maintenance Events +## 0001-1000 +## by Joe Parkin +############################ + +# legitimacy_events.0001 - Debug event for testing base legitimacy values with breakdowns of sources + +legitimacy_events.0001 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + left_portrait = root + + trigger = { + exists = dynasty + # Exclude unplayable for now + NOR = { + government_has_flag = government_is_republic + government_has_flag = government_is_theocracy + } + } + + option = { + add_legitimacy = base_legitimacy_value + custom_tooltip = base_legitimacy_debug_tt + } +} diff --git a/N3OW/events/dlc/ce1/physician_epidemic_events.txt b/N3OW/events/dlc/ce1/physician_epidemic_events.txt new file mode 100644 index 00000000..8e95c668 --- /dev/null +++ b/N3OW/events/dlc/ce1/physician_epidemic_events.txt @@ -0,0 +1,1479 @@ +namespace = physician_epidemic_events + +############################ +## Superstitious physician irritating religious officials +## 1000 +## by James Beaumont +############################ +physician_epidemic_events.1000 = { + type = character_event + title = physician_epidemic_events.1000.t + desc = physician_epidemic_events.1000.desc + theme = plague + override_effect_2d = { reference = flies } + left_portrait = { + character = scope:zealous_courtier + animation = anger + camera = camera_event_very_left + } + right_portrait = { + character = scope:physician + animation = physician + } + cooldown = { years = 5 } + trigger = { + realm_has_any_nearby_epidemic = { INTENSITY = major SIZE = 1 } + court_position:court_physician_court_position ?= { + probably_superstitious = yes + is_available_ai_adult = yes + } + OR = { + any_vassal = { + probably_anti_superstitious = yes + is_available_ai_adult = yes + } + any_courtier_or_guest = { + probably_anti_superstitious = yes + is_available_ai_adult = yes + } + } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + court_position:court_physician_court_position = { save_scope_as = physician } + if = { + limit = { + any_vassal = { + probably_anti_superstitious = yes + is_available_ai_adult = yes + } + } + random_vassal = { + limit = { + probably_anti_superstitious = yes + is_available_ai_adult = yes + } + weight = { + base = 1 + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + modifier = { + add = ai_zeal + } + } + save_scope_as = zealous_courtier + } + } + else = { + random_courtier_or_guest = { + limit = { + probably_anti_superstitious = yes + is_available_ai_adult = yes + } + weight = { + base = 1 + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + modifier = { + add = ai_zeal + } + } + save_scope_as = zealous_courtier + } + } + } + + option = { # How about I suggest a better solution instead + name = physician_epidemic_events.1000.a + trigger = { + has_trait = whole_of_body + } + add_character_modifier = { + modifier = ce1_non_heretical_solution + years = 5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = 1 + ai_rationality = 1 + } + } + } + + option = { # Oh hush you bore, I'm sure this will work + name = physician_epidemic_events.1000.b + add_character_modifier = { + modifier = ce1_unorthodox_epidemic_treatment + years = 5 + } + scope:zealous_courtier = { + progress_towards_rival_effect = { + REASON = rival_heretical_physician + CHARACTER = scope:physician + OPINION = 0 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_gain + eccentric = minor_stress_impact_loss + witch = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = -0.1 + ai_compassion = 1 + } + } + } + + option = { # I don't think so + name = physician_epidemic_events.1000.c + scope:zealous_courtier = { + add_opinion = { + target = root + modifier = relieved_opinion + opinion = 20 + } + } + add_piety = medium_piety_gain + stress_impact = { + witch = medium_stress_impact_gain + eccentric = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = 0.1 + ai_compassion = -1 + } + } + } +} + +############################ +## Physician calls for a quarantine of infected counties +## 1010 +## by James Beaumont +############################ +physician_epidemic_events.1010 = { + type = character_event + title = physician_epidemic_events.1010.t + desc = physician_epidemic_events.1010.desc + theme = plague + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = worry + camera = camera_event_crowd + } + right_portrait = { + character = scope:physician + animation = debating + camera = camera_event_very_right + } + cooldown = { years = 5 } + trigger = { + court_position:court_physician_court_position ?= { + is_available_ai_adult = yes + } + realm_has_any_nearby_epidemic = { SIZE = 5 INTENSITY = major } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + court_position:court_physician_court_position = { save_scope_as = physician } + } + + option = { # Oh well alrighty then + name = physician_epidemic_events.1010.a + add_character_modifier = { + modifier = ce1_major_quarantine + years = 5 + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = ce1_major_quarantine_county + years = 5 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + cynical = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = -1 + ai_rationality = 1 + } + } + } + + option = { # This is not at all worth it + name = physician_epidemic_events.1010.b + stress_impact = { + callous = medium_stress_impact_gain + diligent = medium_stress_impact_gain + scholar = minor_stress_impact_gain + patient = minor_stress_impact_gain + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + ai_energy = -1 + } + } + } +} + +############################### +## PHYSICIAN EPIDEMIC TREATMENT +## 1020 +## by James Beaumont +############################### +physician_epidemic_events.1020 = { + type = character_event + title = physician_epidemic_events.1020.t + desc = { + desc = physician_epidemic_events.1020.start.desc + first_valid = { #Disease type + triggered_desc = { + trigger = { scope:epidemic.epidemic_type.epidemic_trait = trait:typhus } + desc = disease_desc_short_typhus + } + triggered_desc = { + trigger = { scope:epidemic.epidemic_type.epidemic_trait = trait:consumption } + desc = disease_desc_short_consumption + } + triggered_desc = { + trigger = { scope:epidemic.epidemic_type.epidemic_trait = trait:great_pox } + desc = disease_desc_short_smallpox + } + triggered_desc = { + trigger = { scope:epidemic.epidemic_type.epidemic_trait = trait:smallpox } + desc = disease_desc_short_smallpox + } + triggered_desc = { + trigger = { scope:epidemic.epidemic_type.epidemic_trait = trait:bubonic_plague } + desc = disease_desc_short_plague + } + triggered_desc = { + trigger = { scope:epidemic.epidemic_type.epidemic_trait = trait:measles } + desc = disease_desc_short_measles + } + triggered_desc = { + trigger = { scope:epidemic.epidemic_type.epidemic_trait = trait:ergotism } + desc = disease_desc_short_ergotism + } + triggered_desc = { + trigger = { scope:epidemic.epidemic_type.epidemic_trait = trait:dysentery } + desc = disease_desc_short_dysentery + } + desc = missing_epidemic + } + desc = physician_epidemic_events.1020.start.desc2 + random_valid = { + triggered_desc = { + trigger = { + OR = { + scope:epidemic = { outbreak_intensity <= minor } + scope:physician = { + NOR = { + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + } + } + } + desc = physician_epidemic_events.1020.safe_recommendation.desc + } + triggered_desc = { + trigger = { + OR = { + scope:epidemic = { outbreak_intensity >= major } + scope:physician = { + NOR = { + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + } + } + scope:physician = { + NOT = { has_trait = lifestyle_mystic } + } + } + desc = physician_epidemic_events.1020.risky_recommendation.desc + } + triggered_desc = { + trigger = { + scope:physician = { has_trait = lifestyle_mystic } + } + desc = physician_epidemic_events.1020.mystic_recommendation.desc + } + } + desc = physician_epidemic_events.1020.end.desc + } + theme = plague + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { + reference = physicians_study + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = callous + has_trait = deceitful + has_trait = sadistic + } + } + animation = eyeroll + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = generous + has_trait = trusting + has_trait = gregarious + } + } + animation = sadness + } + animation = thinking + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { scope:epidemic = { outbreak_intensity >= major } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } + animation = personality_rational + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality < -50 } } + animation = eccentric + } + animation = idle + } + + immediate = { + scope:physician.location ?= { save_scope_as = background_terrain_scope } + } + + #Minimal epidemic prevention + option = { + name = physician_epidemic_events.1020.a + epidemic_prevention_effect = { PREVENTION_LEVEL = 1 PHYSICIAN = scope:physician } + ai_chance = { base = 10 } + } + + #Moderate epidemic prevention + option = { + name = physician_epidemic_events.1020.b + epidemic_prevention_effect = { PREVENTION_LEVEL = 2 PHYSICIAN = scope:physician } + ai_chance = { base = 1 } + } + + #Superstitious epidemic prevention + option = { + trigger = { + scope:physician = { + OR = { + has_trait = lifestyle_mystic + has_trait = eccentric + } + } + } + name = physician_epidemic_events.1020.c + epidemic_prevention_effect = { PREVENTION_LEVEL = 3 PHYSICIAN = scope:physician } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = physician_epidemic_events.1020.d + + if = { # Admin governors lose a bit of trait XP if they don't try to do something + limit = { + is_governor = yes + has_trait = governor + } + increase_governance_effect = { VALUE = -2 } + } + + ai_chance = { base = 0 } + } +} + +# Minor success +physician_epidemic_events.1021 = { + type = character_event + title = physician_epidemic_events.1021.t + desc = physician_epidemic_events.1021.desc + theme = plague + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { + reference = physicians_study + } + left_portrait = { + character = scope:physician + animation = physician + } + + immediate = { + add_character_modifier = { + modifier = minor_epidemic_treatment + years = 10 + } + } + + #Neato! + option = { + name = physician_epidemic_events.1021.a + + if = { # Admin governors gain some XP when successful + limit = { + is_governor = yes + has_trait = governor + } + increase_governance_effect = { VALUE = 2 } + } + + ai_chance = { base = 10 } + } +} + +# Minor fail +physician_epidemic_events.1022 = { + type = character_event + title = physician_epidemic_events.1022.t + desc = physician_epidemic_events.1022.desc + theme = plague + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { + reference = physicians_study + } + left_portrait = { + character = scope:physician + animation = shock + } + + immediate = { + add_character_modifier = { + modifier = minor_epidemic_treatment_failed + years = 10 + } + } + + + + #Chastise + option = { + name = health.3107.b + + chastise_physician_effect = yes + + ai_chance = { + factor = 30 + modifier = { + scope:physician = { has_character_modifier = chastised_physician_modifier } + add = -20 + } + } + } + + #Oh well ¯\_(ツ)_/¯ + option = { + name = health.3107.c + + forgive_physician_effect = yes + + ai_chance = { + factor = 20 + ai_value_modifier = { + max = 80 + ai_compassion = 2.5 + ai_vengefulness = -2.5 + } + } + } + + #Imprison! + option = { + name = health.3107.d + + imprison_physician_effect = yes + + ai_chance = { + factor = 30 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + #Execute! + option = { + name = health.3107.e + + execute_physician_effect = yes + + ai_chance = { + factor = 15 + ai_value_modifier = { + ai_compassion = -1 + } + } + } +} + +# Major success +physician_epidemic_events.1023 = { + type = character_event + title = physician_epidemic_events.1023.t + desc = physician_epidemic_events.1023.desc + theme = plague + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { + reference = physicians_study + } + left_portrait = { + character = scope:physician + animation = admiration + } + + immediate = { + add_character_modifier = { + modifier = major_epidemic_treatment + years = 10 + } + } + + #Neato! + option = { + name = physician_epidemic_events.1023.a + + if = { # Admin governors gain some XP when successful + limit = { + is_governor = yes + has_trait = governor + } + increase_governance_effect = { VALUE = 4 } + } + + ai_chance = { base = 10 } + } +} + +# Major fail +physician_epidemic_events.1024 = { + type = character_event + title = physician_epidemic_events.1024.t + desc = physician_epidemic_events.1024.desc + theme = plague + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { + reference = physicians_study + } + left_portrait = { + character = scope:physician + animation = shock + } + + immediate = { + add_character_modifier = { + modifier = major_epidemic_treatment_failed + years = 10 + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic + } + } + } + change_development_progress_with_overflow = -45 + } + } + + + + #Chastise + option = { + name = health.3107.b + + chastise_physician_effect = yes + + ai_chance = { + factor = 30 + modifier = { + scope:physician = { has_character_modifier = chastised_physician_modifier } + add = -20 + } + } + } + + #Oh well ¯\_(ツ)_/¯ + option = { + name = health.3107.c + + forgive_physician_effect = yes + + ai_chance = { + factor = 20 + ai_value_modifier = { + max = 80 + ai_compassion = 2.5 + ai_vengefulness = -2.5 + } + } + } + + #Imprison! + option = { + name = health.3107.d + + imprison_physician_effect = yes + + ai_chance = { + factor = 30 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 1 + } + } + } + + #Execute! + option = { + name = health.3107.e + + execute_physician_effect = yes + + ai_chance = { + factor = 15 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 2.5 + } + } + } +} + +# Critical success +physician_epidemic_events.1025 = { + type = character_event + title = physician_epidemic_events.1025.t + desc = physician_epidemic_events.1025.desc + theme = plague + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { + reference = physicians_study + } + left_portrait = { + character = scope:physician + animation = manic + } + + immediate = { + add_character_modifier = { + modifier = critical_epidemic_treatment + years = 10 + } + } + + #Neato! + option = { + name = physician_epidemic_events.1025.a + + if = { # Admin governors gain some XP when successful + limit = { + is_governor = yes + has_trait = governor + } + increase_governance_effect = { VALUE = 6 } + } + + ai_chance = { base = 10 } + } +} + +# Critical fail +physician_epidemic_events.1026 = { + type = character_event + title = physician_epidemic_events.1026.t + desc = physician_epidemic_events.1026.desc + theme = plague + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { + reference = physicians_study + } + left_portrait = { + character = scope:physician + animation = manic + } + + immediate = { + add_character_modifier = { + modifier = critical_epidemic_treatment_failed + years = 10 + } + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic + } + } + } + change_development_progress_with_overflow = -150 + } + } + + + + #Chastise + option = { + name = health.3107.b + + chastise_physician_effect = yes + + ai_chance = { + factor = 30 + modifier = { + scope:physician = { has_character_modifier = chastised_physician_modifier } + add = -20 + } + } + } + + #Oh well ¯\_(ツ)_/¯ + option = { + name = health.3107.c + + forgive_physician_effect = yes + + ai_chance = { + factor = 20 + ai_value_modifier = { + max = 80 + ai_compassion = 2.5 + ai_vengefulness = -2.5 + } + } + } + + #Imprison! + option = { + name = health.3107.d + + imprison_physician_effect = yes + + ai_chance = { + factor = 30 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 1 + } + } + } + + #Execute! + option = { + name = health.3107.e + + execute_physician_effect = yes + + ai_chance = { + factor = 15 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 2.5 + } + } + } +} + +############################### +## PHYSICIAN BOOK +## 1030 +## by James Beaumont +############################### +physician_epidemic_events.1030 = { + type = character_event + title = physician_epidemic_events.1030.t + desc = physician_epidemic_events.1030.desc + theme = plague + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:physician + animation = writing + } + cooldown = { years = 10 } + + trigger = { + exists = court_position:court_physician_court_position + court_position:court_physician_court_position = { + is_available_ai_adult = yes + } + realm_has_any_nearby_epidemic = { INTENSITY = major SIZE = 1 } + } + + immediate = { + court_position:court_physician_court_position = { save_scope_as = physician } + get_random_nearby_realm_epidemic = { INTENSITY = major } + } + + #Go for it king! + option = { + name = physician_epidemic_events.1030.a + remove_short_term_gold = medium_gold_value + custom_tooltip = may_get_cool_book_tt + hidden_effect = { + scope:physician = { + duel = { + skill = learning + value = high_skill_rating + # Failure + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:physician = { has_trait = lifestyle_physician } + factor = 0.5 + } + modifier = { + scope:physician = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 50 + } + } + factor = 0.5 + } + modifier = { + scope:physician = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value >= 100 + } + } + factor = 0.5 + } + root = { + send_interface_toast = { + title = physician_epidemic_events.1030.a.failure + left_icon = root + right_icon = scope:physician + custom_tooltip = book_is_gibberish + } + } + } + 50 = { # Win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + duel = { # How much did I win by? + skill = learning + value = high_skill_rating + 50 = { # Not much + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + set_artifact_rarity_masterwork = yes + send_interface_toast = { + title = physician_epidemic_events.1030.a.success + left_icon = root + right_icon = scope:physician + create_artifact = { + name = pharmaceuticals + description = pharmaceuticals_desc + type = miscellaneous + modifier = artifact_epidemic_resistance_1_modifier + modifier = artifact_negate_health_penalty_add_1_modifier + visuals = pocket_book + quality = scope:quality + wealth = scope:wealth + creator = scope:physician + } + } + } + } + 50 = { # Okay + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + set_artifact_rarity_famed = yes + send_interface_toast = { + title = physician_epidemic_events.1030.a.success + left_icon = root + right_icon = scope:physician + create_artifact = { + name = pharmaceuticals + description = pharmaceuticals_desc + type = miscellaneous + modifier = artifact_epidemic_resistance_4_modifier + modifier = artifact_negate_health_penalty_add_2_modifier + visuals = pocket_book + quality = scope:quality + wealth = scope:wealth + creator = scope:physician + } + } + } + } + 15 = { # Bigly + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + set_artifact_rarity_illustrious = yes + send_interface_toast = { + title = physician_epidemic_events.1030.a.success + left_icon = root + right_icon = scope:physician + create_artifact = { + name = pharmaceuticals + description = pharmaceuticals_desc + type = miscellaneous + modifier = artifact_epidemic_resistance_7_modifier + modifier = artifact_negate_health_penalty_add_2_modifier + visuals = pocket_book + quality = scope:quality + wealth = scope:wealth + creator = scope:physician + } + } + } + } + } + } + } + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + short_term_gold < major_gold_value + } + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 1 + } + } + } + + #How much for a bloody book? + option = { + name = physician_epidemic_events.1030.b + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = -1 + } + } + } +} + +############################### +## DISTRIBUTE ALMS +## 1040 +## by James Beaumont +############################### +physician_epidemic_events.1040 = { + type = character_event + title = physician_epidemic_events.1040.t + desc = physician_epidemic_events.1040.desc + theme = plague + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = pondering + camera = camera_event_left_away_3_4 + } + right_portrait = { + character = scope:physician + animation = obsequious_bow + camera = camera_event_right_away + } + + cooldown = { years = 20 } + + trigger = { + realm_has_any_nearby_epidemic = { INTENSITY = major SIZE = 1 } + exists = court_position:court_physician_court_position + court_position:court_physician_court_position = { + is_available_ai_adult = yes + } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + court_position:court_physician_court_position = { save_scope_as = physician } + } + + # Let's go touch some lepers + option = { + name = physician_epidemic_events.1040.a + add_piety = major_piety_gain + every_sub_realm_county = { + custom = every_infected_county + limit = { + any_county_province = { + any_province_epidemic = { + this = scope:epidemic_scope + } + } + } + add_county_modifier = { + modifier = ce1_royal_touch + years = 10 + } + } + if = { + limit = { + NOT = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + if = { + limit = { + NOT = { + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + } + if = { + limit = { + scope:epidemic_scope.epidemic_type.epidemic_trait = trait:smallpox + } + random = { + chance = 5 + contract_disease_effect = { DISEASE = smallpox TREATMENT_EVENT = yes } + } + } + else_if = { + limit = { + scope:epidemic_scope.epidemic_type.epidemic_trait = trait:measles + } + random = { + chance = 5 + contract_disease_effect = { DISEASE = measles TREATMENT_EVENT = yes } + } + } + else_if = { + limit = { + scope:epidemic_scope.epidemic_type.epidemic_trait = trait:dysentery + } + random = { + chance = 5 + contract_disease_effect = { DISEASE = dysentery TREATMENT_EVENT = yes } + } + } + else_if = { + limit = { + scope:epidemic_scope.epidemic_type.epidemic_trait = trait:bubonic_plague + } + random = { + chance = 5 + contract_disease_effect = { DISEASE = bubonic_plague TREATMENT_EVENT = yes } + } + } + else_if = { + limit = { + scope:epidemic_scope.epidemic_type.epidemic_trait = trait:typhus + } + random = { + chance = 5 + contract_disease_effect = { DISEASE = typhus TREATMENT_EVENT = yes } + } + } + else_if = { + limit = { + scope:epidemic_scope.epidemic_type.epidemic_trait = trait:consumption + } + random = { + chance = 5 + contract_disease_effect = { DISEASE = consumption TREATMENT_EVENT = yes } + } + } + } + } + stress_impact = { + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + gold < minor_gold_value + } + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #I will absolutely not do this are you insane + option = { + name = physician_epidemic_events.1040.b + add_piety = minor_piety_loss + stress_impact = { + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } +} + +############################### +## Physician is helping soldiers +## 1050 +## by James Beaumont +############################### +physician_epidemic_events.1050 = { + type = character_event + title = physician_epidemic_events.1050.t + desc = physician_epidemic_events.1050.desc + theme = plague + override_effect_2d = { reference = flies } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:physician + animation = prisonhouse + } + lower_right_portrait = { + character = scope:enemy + } + + trigger = { + is_at_war = yes + exists = court_position:court_physician_court_position + realm_has_any_nearby_epidemic = { INTENSITY = major SIZE = 1 } + court_position:court_physician_court_position = { + is_available_ai_adult = yes + OR = { # Would be willing to heal the enemy + has_trait = compassionate + has_trait = forgiving + has_trait = just + has_trait = zealous + } + } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + court_position:court_physician_court_position = { save_scope_as = physician } + random_primary_war_enemy = { + limit = { + is_ai = yes + } + save_scope_as = enemy + } + } + + # Very good work, please continue + option = { + name = physician_epidemic_events.1050.a + add_piety = major_piety_gain + add_character_modifier = { + modifier = war_doctor + years = 10 + } + scope:enemy = { + add_character_modifier = { + modifier = war_doctor + years = 10 + } + add_opinion = { + modifier = impressed_opinion + opinion = 50 + target = root + } + } + stress_impact = { + compassionate = medium_stress_impact_loss + forgiving = medium_stress_impact_loss + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = -0.1 + } + } + } + + #I demand that this stop at once! + option = { + name = physician_epidemic_events.1050.b + add_character_modifier = { + modifier = war_doctor + years = 10 + } + scope:physician = { + progress_towards_rival_effect = { + REASON = rival_prevented_from_protecting_sick + CHARACTER = root + OPINION = default_rival_opinion + } + } + stress_impact = { + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.1 + } + } + } +} + +############################### +## Physician advises you to banish all infected characters from your court +## 1060 +## by James Beaumont +############################### +physician_epidemic_events.1060 = { + type = character_event + title = physician_epidemic_events.1060.t + desc = physician_epidemic_events.1060.desc + theme = plague + override_background = physicians_study + override_effect_2d = { reference = flies } + left_portrait = { + character = scope:physician + animation = physician + } + right_portrait = { + character = scope:gross_sick_person + animation = cough + } + + trigger = { + exists = court_position:court_physician_court_position + any_sub_realm_county = { + any_county_province = { + OR = { + county.holder = root + squared_distance = { + target = root.capital_province + value <= squared_distance_medium #250 map-pixels. Roughly one Ireland away (top to bottom). + } + } + any_province_epidemic = { + count >= 1 + intensity >= major + save_temporary_scope_as = epidemic_to_check + root = { + any_close_or_extended_family_member = { + is_courtier_of = root + has_trait = scope:epidemic_to_check.epidemic_type.epidemic_trait + } + } + } + } + } + court_position:court_physician_court_position = { + is_available_ai_adult = yes + } + } + + immediate = { + get_random_nearby_realm_epidemic = { INTENSITY = major } + court_position:court_physician_court_position = { save_scope_as = physician } + random_close_or_extended_family_member = { + limit = { + is_courtier_of = root + has_trait = scope:epidemic_scope.epidemic_type.epidemic_trait + } + save_scope_as = gross_sick_person + } + } + + # Drastic times call for drastic measures + option = { + name = physician_epidemic_events.1060.a + every_courtier_or_guest = { + custom = every_infected_courtier_or_guest + limit = { + has_trait_with_flag = epidemic_disease + } + banish = yes # banish_effect not used for unlanded + } + every_courtier_or_guest = { + custom = every_uninfected_courtier_or_guest + limit = { + NOT = { + has_trait_with_flag = epidemic_disease + } + } + add_character_modifier = { + modifier = ce1_banishment_resistance + years = 10 + } + } + add_character_modifier = { + modifier = ce1_banishment_resistance + years = 10 + } + stress_impact = { + base = medium_stress_impact_gain + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = 0.5 + ai_rationality = 0.5 + } + } + } + + #I will not banish my own kin! + option = { + name = physician_epidemic_events.1060.b + add_piety = medium_piety_gain + every_courtier_or_guest = { + custom = every_infected_courtier_or_guest + limit = { + has_trait_with_flag = epidemic_disease + } + add_opinion = { + modifier = grateful_opinion + opinion = 25 + target = root + } + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -0.5 + ai_rationality = -0.5 + ai_vengefulness = -0.5 + } + } + } +} diff --git a/N3OW/events/dlc/ep1/ep1_character_interaction_events.txt b/N3OW/events/dlc/ep1/ep1_character_interaction_events.txt new file mode 100644 index 00000000..0d3f377f --- /dev/null +++ b/N3OW/events/dlc/ep1/ep1_character_interaction_events.txt @@ -0,0 +1,719 @@ +namespace = ep1_character_interaction + +################################################## +# +# Character Interaction Events +# +# 0001 - 0010 Indebt Guest +################################################## + + + + + + + + + + +################################################## +# CHARACTER INTERACTION EVENTS + +################################################## +# A Sensible Recompense +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_trigger ep1_character_interaction_0001_valid_hostile_relation_trigger = { + # Must be at a court of some kind *other* than your own. + exists = host + scope:actor != host + # And not in scope:actor's prison. + NOR = { + imprisoner ?= scope:actor + } + # Double check that this'd be an appropriate court to send a plant. + save_temporary_scope_as = current_target + scope:actor = { + OR = { + # Either you've got a scheme on the go... + any_scheme = { + hostile_scheme_trigger = yes + scheme_target_character = scope:current_target + } + # ... or you could start one. + can_start_hostile_scheme_against_trigger = { TARGET = scope:current_target} + } + } +} + +scripted_trigger ep1_character_interaction_0001_valid_rival_trigger = { + ep1_character_interaction_0001_valid_hostile_relation_trigger = yes + OR = { + NOT = { exists = scope:actor_nemesis } + this != scope:actor_nemesis + } +} + +scripted_effect ep1_character_interaction_0001_move_character_and_family_effect = { + scope:recipient = { + # Whatever else happens, just move them. + scope:actor = { remove_courtier_or_guest = scope:recipient } + $DESTINATION$ = { add_courtier = scope:recipient } + # If they have any family, quietly send them along too. + hidden_effect = { + if = { + limit = { + any_traveling_family_member = { } + } + every_traveling_family_member = { + save_temporary_scope_as = family_to_shunt + scope:actor = { remove_courtier_or_guest = scope:family_to_shunt } + $DESTINATION$ = { add_courtier = scope:family_to_shunt } + } + } + } + } +} + +# Trick a guest into a debt & turn them into an agent. +ep1_character_interaction.0001 = { + type = character_event + title = ep1_character_interaction.0001.t + desc = { + desc = ep1_character_interaction.0001.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:false_flag_type = flag:lustful } + desc = ep1_character_interaction.0001.desc.lustful + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:chaste } + desc = ep1_character_interaction.0001.desc.chaste + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:gluttonous } + desc = ep1_character_interaction.0001.desc.gluttonous + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:temperate } + desc = ep1_character_interaction.0001.desc.temperate + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:greedy } + desc = ep1_character_interaction.0001.desc.greedy + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:generous } + desc = ep1_character_interaction.0001.desc.generous + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:lazy } + desc = ep1_character_interaction.0001.desc.lazy + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:diligent } + desc = ep1_character_interaction.0001.desc.diligent + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:wrathful } + desc = ep1_character_interaction.0001.desc.wrathful + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:calm } + desc = ep1_character_interaction.0001.desc.calm + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:patient } + desc = ep1_character_interaction.0001.desc.patient + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:impatient } + desc = ep1_character_interaction.0001.desc.impatient + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:arrogant } + desc = ep1_character_interaction.0001.desc.arrogant + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:humble } + desc = ep1_character_interaction.0001.desc.humble + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:deceitful } + desc = ep1_character_interaction.0001.desc.deceitful + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:honest } + desc = ep1_character_interaction.0001.desc.honest + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:craven } + desc = ep1_character_interaction.0001.desc.craven + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:brave } + desc = ep1_character_interaction.0001.desc.brave + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:shy } + desc = ep1_character_interaction.0001.desc.shy + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:gregarious } + desc = ep1_character_interaction.0001.desc.gregarious + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:ambitious } + desc = ep1_character_interaction.0001.desc.ambitious + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:content } + desc = ep1_character_interaction.0001.desc.content + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:arbitrary } + desc = ep1_character_interaction.0001.desc.arbitrary + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:just } + desc = ep1_character_interaction.0001.desc.just + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:cynical } + desc = ep1_character_interaction.0001.desc.cynical + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:zealous } + desc = ep1_character_interaction.0001.desc.zealous + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:paranoid } + desc = ep1_character_interaction.0001.desc.paranoid + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:trusting } + desc = ep1_character_interaction.0001.desc.trusting + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:compassionate } + desc = ep1_character_interaction.0001.desc.compassionate + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:callous } + desc = ep1_character_interaction.0001.desc.callous + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:sadistic } + desc = ep1_character_interaction.0001.desc.sadistic + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:stubborn } + desc = ep1_character_interaction.0001.desc.stubborn + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:fickle } + desc = ep1_character_interaction.0001.desc.fickle + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:vengeful } + desc = ep1_character_interaction.0001.desc.vengeful + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:forgiving } + desc = ep1_character_interaction.0001.desc.forgiving + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:fallback_1 } + desc = ep1_character_interaction.0001.desc.fallback_1 + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:fallback_2 } + desc = ep1_character_interaction.0001.desc.fallback_2 + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:fallback_3 } + desc = ep1_character_interaction.0001.desc.fallback_3 + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:fallback_4 } + desc = ep1_character_interaction.0001.desc.fallback_4 + } + triggered_desc = { + trigger = { scope:false_flag_type = flag:fallback_5 } + desc = ep1_character_interaction.0001.desc.fallback_5 + } + } + desc = ep1_character_interaction.0001.desc.outro + } + theme = intrigue_skulduggery_focus + left_portrait = { + character = scope:actor + animation = schadenfreude + } + right_portrait = { + character = scope:recipient + animation = fear + } + lower_center_portrait = scope:actor_nemesis + lower_right_portrait = scope:actor_rival + override_background = { reference = throne_room } + + immediate = { + # Apply the interaction's effects. + indebt_guest_interaction_accepted_effect = yes + # Roll the offending crime. + ## Percentages even throughout: we're not fussed about which result you roll. + scope:recipient = { + random_list = { + # lustful + 100 = { + trigger = { has_trait = lustful } + save_scope_value_as = { + name = false_flag_type + value = flag:lustful + } + } + # chaste + 100 = { + trigger = { has_trait = chaste } + save_scope_value_as = { + name = false_flag_type + value = flag:chaste + } + } + # gluttonous + 100 = { + trigger = { has_trait = gluttonous } + save_scope_value_as = { + name = false_flag_type + value = flag:gluttonous + } + } + # temperate + 100 = { + trigger = { has_trait = temperate } + save_scope_value_as = { + name = false_flag_type + value = flag:temperate + } + } + # greedy + 100 = { + trigger = { has_trait = greedy } + save_scope_value_as = { + name = false_flag_type + value = flag:greedy + } + } + # generous + 100 = { + trigger = { has_trait = generous } + save_scope_value_as = { + name = false_flag_type + value = flag:generous + } + } + # lazy + 100 = { + trigger = { has_trait = lazy } + save_scope_value_as = { + name = false_flag_type + value = flag:lazy + } + } + # diligent + 100 = { + trigger = { has_trait = diligent } + save_scope_value_as = { + name = false_flag_type + value = flag:diligent + } + } + # wrathful + 100 = { + trigger = { has_trait = wrathful } + save_scope_value_as = { + name = false_flag_type + value = flag:wrathful + } + } + # calm + 100 = { + trigger = { has_trait = calm } + save_scope_value_as = { + name = false_flag_type + value = flag:calm + } + } + # patient + 100 = { + trigger = { has_trait = patient } + save_scope_value_as = { + name = false_flag_type + value = flag:patient + } + } + # impatient + 100 = { + trigger = { has_trait = impatient } + save_scope_value_as = { + name = false_flag_type + value = flag:impatient + } + } + # arrogant + 100 = { + trigger = { has_trait = arrogant } + save_scope_value_as = { + name = false_flag_type + value = flag:arrogant + } + } + # humble + 100 = { + trigger = { has_trait = humble } + save_scope_value_as = { + name = false_flag_type + value = flag:humble + } + } + # deceitful + 100 = { + trigger = { has_trait = deceitful } + save_scope_value_as = { + name = false_flag_type + value = flag:deceitful + } + } + # honest + 100 = { + trigger = { has_trait = honest } + save_scope_value_as = { + name = false_flag_type + value = flag:honest + } + } + # craven + 100 = { + trigger = { has_trait = craven } + save_scope_value_as = { + name = false_flag_type + value = flag:craven + } + } + # brave + 100 = { + trigger = { has_trait = brave } + save_scope_value_as = { + name = false_flag_type + value = flag:brave + } + } + # shy + 100 = { + trigger = { has_trait = shy } + save_scope_value_as = { + name = false_flag_type + value = flag:shy + } + } + # gregarious + 100 = { + trigger = { has_trait = gregarious } + save_scope_value_as = { + name = false_flag_type + value = flag:gregarious + } + } + # ambitious + 100 = { + trigger = { has_trait = ambitious } + save_scope_value_as = { + name = false_flag_type + value = flag:ambitious + } + } + # content + 100 = { + trigger = { has_trait = content } + save_scope_value_as = { + name = false_flag_type + value = flag:content + } + } + # arbitrary + 100 = { + trigger = { has_trait = arbitrary } + save_scope_value_as = { + name = false_flag_type + value = flag:arbitrary + } + } + # just + 100 = { + trigger = { has_trait = just } + save_scope_value_as = { + name = false_flag_type + value = flag:just + } + } + # cynical + 100 = { + trigger = { has_trait = cynical } + save_scope_value_as = { + name = false_flag_type + value = flag:cynical + } + } + # zealous + 100 = { + trigger = { has_trait = zealous } + save_scope_value_as = { + name = false_flag_type + value = flag:zealous + } + } + # paranoid + 100 = { + trigger = { has_trait = paranoid } + save_scope_value_as = { + name = false_flag_type + value = flag:paranoid + } + } + # trusting + 100 = { + trigger = { has_trait = trusting } + save_scope_value_as = { + name = false_flag_type + value = flag:trusting + } + } + # compassionate + 100 = { + trigger = { has_trait = compassionate } + save_scope_value_as = { + name = false_flag_type + value = flag:compassionate + } + } + # callous + 100 = { + trigger = { has_trait = callous } + save_scope_value_as = { + name = false_flag_type + value = flag:callous + } + } + # sadistic + 100 = { + trigger = { has_trait = sadistic } + save_scope_value_as = { + name = false_flag_type + value = flag:sadistic + } + } + # stubborn + 100 = { + trigger = { has_trait = stubborn } + save_scope_value_as = { + name = false_flag_type + value = flag:stubborn + } + } + # fickle + 100 = { + trigger = { has_trait = fickle } + save_scope_value_as = { + name = false_flag_type + value = flag:fickle + } + } + # vengeful + 100 = { + trigger = { has_trait = vengeful } + save_scope_value_as = { + name = false_flag_type + value = flag:vengeful + } + } + # forgiving + 100 = { + trigger = { has_trait = forgiving } + save_scope_value_as = { + name = false_flag_type + value = flag:forgiving + } + } + # fallback_1 + 100 = { + save_scope_value_as = { + name = false_flag_type + value = flag:fallback_1 + } + } + # fallback_2 + 100 = { + save_scope_value_as = { + name = false_flag_type + value = flag:fallback_2 + } + } + # fallback_3 + 100 = { + save_scope_value_as = { + name = false_flag_type + value = flag:fallback_3 + } + } + # fallback_4 + 100 = { + save_scope_value_as = { + name = false_flag_type + value = flag:fallback_4 + } + } + # fallback_5 + 100 = { + save_scope_value_as = { + name = false_flag_type + value = flag:fallback_5 + } + } + } + } + # Sort scopes for event options. + scope:actor = { + # If scope:actor has a nemesis, save them for loc. + if = { + limit = { + any_relation = { + type = nemesis + count >= 1 + ep1_character_interaction_0001_valid_hostile_relation_trigger = yes + } + } + random_relation = { + type = nemesis + limit = { ep1_character_interaction_0001_valid_hostile_relation_trigger = yes } + save_scope_as = actor_nemesis + } + } + # If scope:actor has any valid rivals, pick a random one for option B. + if = { + limit = { + any_relation = { + type = rival + count >= 1 + ep1_character_interaction_0001_valid_rival_trigger = yes + } + } + random_relation = { + type = rival + # Prefer rivals that are targets of hostile schemes. + limit = { + any_targeting_scheme = { + scheme_owner = scope:actor + is_hostile = yes + } + ep1_character_interaction_0001_valid_rival_trigger = yes + } + # Failing that, rivals who are targets of any schemes. + alternative_limit = { + any_targeting_scheme = { + scheme_owner = scope:actor + is_hostile = no + } + ep1_character_interaction_0001_valid_rival_trigger = yes + } + # Otherwise just any rando rival who could be schemed against. + alternative_limit = { ep1_character_interaction_0001_valid_rival_trigger = yes } + save_scope_as = actor_rival + } + } + } + } + + # *Cackling* Oh yes, [actor_nemesis.GetFirstName] will never see this coming! + option = { + name = ep1_character_interaction.0001.a + trigger = { exists = scope:actor_nemesis } + + # Quietly add scope:recipient as a courtier of scope:actor_nemesis. + ep1_character_interaction_0001_move_character_and_family_effect = { DESTINATION = scope:actor_nemesis } + + stress_impact = { + patient = miniscule_stress_impact_loss + vengeful = minor_stress_impact_loss + impatient = medium_stress_impact_gain + trusting = major_stress_impact_gain + } + ai_chance = { + # If valid, this should always be the choice selected. + base = 100 + } + } + + # Excellent! Now, you will deliver yourself to [actor_rival.GetFirstNamePossessive] court... + option = { + name = ep1_character_interaction.0001.b + trigger = { exists = scope:actor_rival } + + # Quietly add scope:recipient as a courtier of scope:actor_rival. + ep1_character_interaction_0001_move_character_and_family_effect = { DESTINATION = scope:actor_rival } + + stress_impact = { + patient = miniscule_stress_impact_loss + vengeful = minor_stress_impact_loss + impatient = medium_stress_impact_gain + trusting = major_stress_impact_gain + } + ai_chance = { + # Never pick this option... + base = 0 + # ... unless there's no nemesis, in which case it should be the default. + modifier = { + add = 100 + NOT = { exists = scope:actor_rival } + } + } + } + + # Now, begone till I have need of you. + option = { + name = ep1_character_interaction.0001.c + + # Boot 'em out. + hidden_effect = { + scope:recipient = { select_and_move_to_pool_effect = yes } + } + show_as_tooltip = { + remove_courtier_or_guest = scope:recipient + } + + stress_impact = { + shy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + # AI should never be taking this without a nemesis, but if they do, it doesn't matter where they send scope:recipient. + base = 0 + } + } + + # Naturally, you will stay where I can keep an eye on you. + option = { + name = ep1_character_interaction.0001.d + + # Status quo: no extra changes here. + + # No stress impact necessary for the fallback option. + ai_chance = { + # AI should never be taking this without a nemesis, but if they do, it doesn't matter where they send scope:recipient. + base = 0 + } + } +} + diff --git a/N3OW/events/dlc/ep1/ep1_court_position_events.txt b/N3OW/events/dlc/ep1/ep1_court_position_events.txt new file mode 100644 index 00000000..2908de75 --- /dev/null +++ b/N3OW/events/dlc/ep1/ep1_court_position_events.txt @@ -0,0 +1,552 @@ +namespace = court_position + +################################ +# FLAVOR EVENTS +# 1001 - 8999 +################################ + + + +############################# +# MURDER SAVE EVENTS +# 9001 - 9199 +# by Linnéa Thimrén +############################# + +############### +# SAVED BY FOOD TASTER + +# FOR MURDERER: Saved from poisoned food by food taster +# by Linnéa Thimrén +court_position.9001 = { + type = character_event + window = scheme_failed_event + title = court_position.9001.t + desc = { + desc = court_position.9001.desc + triggered_desc = { + trigger = { exists = local_var:food_taster_dies } + desc = court_position.9001.food_taster_dies + } + } + theme = murder_scheme + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = fear + } + animation = stress + } + center_portrait = { + character = scope:food_taster + animation = poison + } + right_portrait = { + character = scope:target + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = rage + } + animation = paranoia + } + override_background = { reference = feast } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + trigger = { + scope:target = { + employs_court_position = food_taster_court_position + any_court_position_holder = { + type = food_taster_court_position + foodtaster_will_actually_do_job_trigger = yes + } + } + } + + immediate = { + scope:target = { + random_court_position_holder = { + type = food_taster_court_position + limit = { is_physically_able = yes } + save_scope_as = food_taster + } + } + murder_failure_effect = yes + hidden_effect = { + random = { + chance = 75 + set_local_variable = { + name = food_taster_dies + value = yes + } + } + } + } + + option = { + name = murder_save.0001.a + scope:scheme = { end_scheme = yes } + } + + option = { + name = murder_save.0001.b + restart_murder_scheme_effect = yes + } + + after = { + # Fire the rest of the outcome. + scope:target = { trigger_event = court_position.9002 } + if = { + limit = { exists = local_var:food_taster_dies } + show_as_tooltip = { + murder_interception_handle_extra_deaths_effect = { + VICTIM = scope:food_taster + REASON = death_poison + } + } + } + } +} + +# FOR TARGET: Food taster dies to poison +court_position.9002 = { + type = character_event + window = scheme_target_event + title = court_position.9001.t + desc = { + desc = court_position.9002.desc + triggered_desc = { + trigger = { exists = local_var:food_taster_dies } + desc = court_position.9002.food_taster_dies + } + triggered_desc = { + trigger = { exists = scope:scheme_discovered } + desc = court_position.9002.owner_discovered + } + } + theme = murder_scheme + left_portrait = { + character = scope:target + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = rage + } + animation = paranoia + } + center_portrait = { + character = scope:food_taster + animation = poison + } + right_portrait = { + character = scope:owner_to_reveal + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = fear + } + animation = stress + } + + immediate = { + set_variable = { + name = block_death_event_from + value = scope:food_taster + days = 3 + } + # Handle the death of the food taster, if necessary + if = { + limit = { exists = local_var:food_taster_dies } + murder_interception_handle_extra_deaths_effect = { + VICTIM = scope:food_taster + REASON = death_poison + } + } + } + + # Who could do such a thing? + option = { + name = murder_save.1001.a + trigger = { + NOT = { exists = scope:scheme_discovered } + } + custom_tooltip = murder_save.failure_unknown_owner_tt + } + + # Vengeance! + option = { + name = murder_save.1001.b + trigger = { exists = scope:scheme_discovered } + custom_tooltip = murder_save.failure_known_owner_tt + } + + after = { + add_character_modifier = { + modifier = watchful_modifier + days = watchful_modifier_duration + } + } +} + + +############### +# SAVED BY CUP-BEARER + +# FOR MURDERER: Saved from poisoned drink by cup-bearer +# by Linnéa Thimrén +court_position.9011 = { + type = character_event + window = scheme_failed_event + title = court_position.9011.t + desc = { + desc = court_position.9011.desc + triggered_desc = { + trigger = { exists = local_var:cupbearer_dies } + desc = court_position.9011.cupbearer_dies + } + } + theme = murder_scheme + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = fear + } + animation = stress + } + center_portrait = { + character = scope:food_taster + animation = poison + } + right_portrait = { + character = scope:target + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = rage + } + animation = paranoia + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + trigger = { + scope:target = { + employs_court_position = cupbearer_court_position + any_court_position_holder = { + type = cupbearer_court_position + cupbearer_will_actually_do_job_trigger = yes + } + } + } + + immediate = { + scope:target = { + random_court_position_holder = { + type = cupbearer_court_position + limit = { is_physically_able = yes } + save_scope_as = cupbearer + } + } + murder_failure_effect = yes + hidden_effect = { + random = { + chance = 75 + set_local_variable = { + name = cupbearer_dies + value = yes + } + } + } + } + + option = { + name = murder_save.0001.a + scope:scheme = { end_scheme = yes } + } + + option = { + name = murder_save.0001.b + restart_murder_scheme_effect = yes + } + + after = { + # Fire the rest of the outcome. + scope:target = { trigger_event = court_position.9012 } + if = { + limit = { exists = local_var:cupbearer_dies } + show_as_tooltip = { + murder_interception_handle_extra_deaths_effect = { + VICTIM = scope:cupbearer + REASON = death_poison + } + } + } + } +} + + +# FOR TARGET: Cup-bearer dies to poison +court_position.9012 = { + type = character_event + window = scheme_target_event + title = court_position.9011.t + desc = { + desc = court_position.9012.desc + triggered_desc = { + trigger = { exists = local_var:cupbearer_dies } + desc = court_position.9012.cupbearer_dies + } + triggered_desc = { + trigger = { exists = scope:scheme_discovered } + desc = court_position.9002.owner_discovered + } + } + theme = murder_scheme + left_portrait = { + character = scope:target + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = rage + } + animation = paranoia + } + center_portrait = { + character = scope:food_taster + animation = poison + } + right_portrait = { + character = scope:owner_to_reveal + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = fear + } + animation = stress + } + + immediate = { + set_variable = { + name = block_death_event_from + value = scope:cupbearer + days = 3 + } + # Handle the death of the cupbearer, if necessary + if = { + limit = { exists = local_var:cupbearer_dies } + murder_interception_handle_extra_deaths_effect = { + VICTIM = scope:cupbearer + REASON = death_poison + } + } + } + + # Who could do such a thing? + option = { + name = murder_save.1001.a + trigger = { + NOT = { exists = scope:scheme_discovered } + } + custom_tooltip = murder_save.failure_unknown_owner_tt + } + + # Vengeance! + option = { + name = murder_save.1001.b + trigger = { exists = scope:scheme_discovered } + custom_tooltip = murder_save.failure_known_owner_tt + } + + after = { + add_character_modifier = { + modifier = watchful_modifier + days = watchful_modifier_duration + } + } +} + + +############### +# SAVED BY BODYGUARD + +# FOR MURDERER: Saved from assassin by bodyguard +# by Linnéa Thimrén +court_position.9021 = { + type = character_event + window = scheme_failed_event + title = court_position.9021.t + desc = { + desc = court_position.9021.desc + triggered_desc = { + trigger = { exists = local_var:bodyguard_dies } + desc = court_position.9021.bodyguard_dies + } + } + theme = murder_scheme + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = fear + } + animation = stress + } + center_portrait = { + character = scope:bodyguard + triggered_animation = { + trigger = { is_alive = no } + animation = map_fear + } + animation = random_weapon_aggressive + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:target + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = rage + } + animation = paranoia + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + trigger = { + scope:target = { + employs_court_position = bodyguard_court_position + any_court_position_holder = { + type = bodyguard_court_position + bodyguard_will_actually_do_job_trigger = yes + } + } + } + + immediate = { + scope:target = { + random_court_position_holder = { + type = bodyguard_court_position + limit = { is_physically_able = yes } + save_scope_as = bodyguard + } + } + murder_failure_effect = yes + hidden_effect = { + random = { + chance = 75 + set_local_variable = { + name = bodyguard_dies + value = yes + } + } + } + } + + option = { + name = murder_save.0001.a + scope:scheme = { end_scheme = yes } + } + + option = { + name = murder_save.0001.b + restart_murder_scheme_effect = yes + } + + after = { + # Fire the rest of the outcome. + scope:target = { trigger_event = court_position.9022 } + if = { + limit = { exists = local_var:bodyguard_dies } + show_as_tooltip = { + murder_interception_handle_extra_deaths_effect = { + VICTIM = scope:bodyguard + REASON = death_murder + } + } + } + } +} + +# FOR TARGET: Bodyguard dies to assassin +court_position.9022 = { + type = character_event + window = scheme_target_event + title = court_position.9021.t + desc = { + desc = court_position.9022.desc + triggered_desc = { + trigger = { exists = local_var:bodyguard_dies } + desc = court_position.9022.bodyguard_dies + } + triggered_desc = { + trigger = { exists = scope:scheme_discovered } + desc = court_position.9002.owner_discovered + } + } + theme = murder_scheme + left_portrait = { + character = scope:target + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = rage + } + animation = paranoia + } + center_portrait = { + character = scope:bodyguard + triggered_animation = { + trigger = { is_alive = no } + animation = map_fear + } + animation = random_weapon_aggressive + } + right_portrait = { + character = scope:owner_to_reveal + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = fear + } + animation = stress + } + + immediate = { + set_variable = { + name = block_death_event_from + value = scope:bodyguard + days = 3 + } + # Handle the death of the bodyguard, if necessary + if = { + limit = { exists = local_var:bodyguard_dies } + murder_interception_handle_extra_deaths_effect = { + VICTIM = scope:bodyguard + REASON = death_murder + } + } + } + + # Who could do such a thing? + option = { + name = murder_save.1001.a + trigger = { + NOT = { exists = scope:scheme_discovered } + } + custom_tooltip = murder_save.failure_unknown_owner_tt + } + + # Vengeance! + option = { + name = murder_save.1001.b + trigger = { exists = scope:scheme_discovered } + custom_tooltip = murder_save.failure_known_owner_tt + } + + after = { + add_character_modifier = { + modifier = watchful_modifier + days = watchful_modifier_duration + } + } +} diff --git a/N3OW/events/dlc/ep1/ep1_decision_events.txt b/N3OW/events/dlc/ep1/ep1_decision_events.txt new file mode 100644 index 00000000..d24c15d5 --- /dev/null +++ b/N3OW/events/dlc/ep1/ep1_decision_events.txt @@ -0,0 +1,575 @@ +namespace = ep1_decision + +################################################## +# +# Royal Court Court Grandeur Level & Amenity Decisions Events +# +# COURT GRANDEUR LEVELS +# 0001 - 0010 Host Fundraiser +# 0011 - 0020 Host Summit +# +# AMENITIES +# 0101 - 0110 Order Mass Eviction +# 0111 - 0120 Commission Exotic Bedchamber +################################################## + + + + + + + + + + +################################################## +# COURT GRANDEUR LEVELS +ep1_decision.0201 = { + type = character_event + title = ep1_decision.0201.t + desc = ep1_decision.0201.desc + theme = education + left_portrait = scope:good_linguist + lower_left_portrait = scope:cheap_linguist + right_portrait = scope:medium_linguist + lower_right_portrait = scope:scholarly_linguist + override_background = { reference = throne_room } + + immediate = { + ### Save cultures and languages + # Find 1st culture that speaks target language natively + random_culture_global = { + limit = { + exists = culture_head + scope:target_court_language = { has_court_language_of_culture = prev } + } + save_scope_as = ling_cul_1 + } + # Save liege as example to fetch faiths if relevant + if = { + limit = { + exists = scope:language_scheme_type + liege = { has_court_language_of_culture = root.liege.culture } + } + liege = { save_scope_as = ling_cul_1_ruler } + } + # Otherwise find random cul_1 ruler + else = { + linguist_random_realm_effect = { CULTURE = ling_cul_1 } + } + # Find 2nd culture that speaks target language natively + if = { + limit = { + any_culture_global = { + exists = culture_head + scope:target_court_language = { has_court_language_of_culture = prev } + THIS != scope:ling_cul_1 + } + } + random_culture_global = { + limit = { + exists = culture_head + scope:target_court_language = { has_court_language_of_culture = prev } + THIS != scope:ling_cul_1 + } + save_scope_as = ling_cul_2 + } + } + # If none, duplicate 1st + else = { + scope:ling_cul_1 = { save_scope_as = ling_cul_2 } + } + # Save random ruler of cul 2 to find faith + linguist_random_realm_effect = { CULTURE = ling_cul_2 } + # Save own culture + culture = { save_scope_as = ling_cul_3 } + # Bonus languages good linguists may know in addition to root and target + linguist_bonus_culture_effect = { CULTURE = ling_cul_1 } + linguist_bonus_culture_effect = { CULTURE = ling_cul_2 } + linguist_bonus_culture_effect = { CULTURE = ling_cul_3 } + #### Create Linguists + hidden_effect = { + # Poor Linguist + if = { + limit = { has_trait = greedy } + create_character = { + dynasty = none + template = court_linguist_cheap_template + location = root.capital_province + save_scope_as = cheap_linguist + } + } + # Average Linguist + create_character = { + dynasty = none + template = court_linguist_medium_template + location = root.capital_province + save_scope_as = medium_linguist + } + # Good Linguist + create_character = { + dynasty = none + template = court_linguist_good_template + culture = scope:ling_cul_2 + faith = scope:ling_cul_2_ruler.faith + location = root.capital_province + save_scope_as = good_linguist + } + # Scholarly Linguist + if = { + limit = { has_trait = scholar } + create_character = { + dynasty = none + template = court_linguist_good_template + culture = scope:ling_cul_1 + faith = scope:ling_cul_1_ruler.faith + location = root.capital_province + trait = scholar + save_scope_as = scholarly_linguist + } + if = { + limit = { + exists = scope:ling_cul_2_bonus + NOT = { + scope:scholarly_linguist = { knows_language_of_culture = scope:ling_cul_2_bonus } + } + } + scope:scholarly_linguist = { learn_language_of_culture = scope:ling_cul_2_bonus } + } + } + } + } + + # Expensive linguist, great teacher + option = { + name = ep1_decision.0201.a + pay_short_term_gold = { + target = scope:good_linguist + gold = medium_gold_value + } + learn_language_linguist_effect = { LINGUIST = scope:good_linguist } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + + # Cheaper linguist; less learning, not a good teacher + option = { + name = ep1_decision.0201.b + pay_short_term_gold = { + target = scope:medium_linguist + gold = minor_gold_value + } + learn_language_linguist_effect = { LINGUIST = scope:medium_linguist } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + short_term_gold < minor_gold_value_check + factor = 0 + } + } + } + + # I know a good tutor through scholarly circles! + option = { + name = ep1_decision.0201.c + trait = scholar + trigger = { has_trait = scholar } + learn_language_linguist_effect = { LINGUIST = scope:scholarly_linguist } + ai_chance = { + base = 100 + } + } + + # I'm cheap, get me anyone who can vaguely speak my language + option = { + name = ep1_decision.0201.d + trait = greedy + trigger = { has_trait = greedy } + learn_language_linguist_effect = { LINGUIST = scope:cheap_linguist } + ai_chance = { + base = 1000 + modifier = { # Don't do it if you can hire the cool guy + has_trait = scholar + factor = 0 + } + } + } + + # On seconds thoughts, I won't hire a linguist at all... + option = { + name = ep1_decision.0201.e + ai_chance = { + base = 0 + modifier = { + short_term_gold < minor_gold_value_check + NOR = { + has_trait = scholar + has_trait = greedy + } + add = 10 + } + } + } + + after = { + every_in_list = { + list = court_linguist_list + limit = { + NOT = { is_courtier_of = root } + } + silent_disappearance_effect = yes + } + } +} + + + + + + + + + + + + +################################################## +# AMENITIES + +################################################## +# Out with the Old +# by Ewan Cowhig Croft +# 0101 - 0110 +################################################## + +# Pay a little prestige to boot out all the guests from your palace. +ep1_decision.0101 = { + type = character_event + title = ep1_decision.0101.t + desc = ep1_decision.0101.desc + theme = court + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = throne_room } + + immediate = { + # Grab the capital for easy loc. + capital_barony = { save_scope_as = capital } + } + + # Scope:capital is not an inn. Away, leeches! + option = { + name = ep1_decision.0101.a + + # Evict your guests. + order_mass_eviction_decision_guests_only_effect = yes + + stress_impact = { + shy = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + } + ai_chance = { + # AI cannot access this event. + base = 100 + } + } + + # Everyone who doesn't have a job or a close blood tie, *out*! + option = { + name = ep1_decision.0101.b + trigger = { + # If you have no spare rooms at all, you can dismiss useless courtiers for a bit extra. + amenity_level = { + target = court_lodging_standards + value <= low_amenity_level + } + } + + # Charge an extra premium. + add_prestige = { + value = order_mass_eviction_decision_cost_value + multiply = -1 + } + # Evict your guests *&* courtiers. + order_mass_eviction_decision_courtiers_&_guests_effect = yes + + stress_impact = { + shy = medium_stress_impact_loss + gregarious = major_stress_impact_gain + } + ai_chance = { + # AI cannot access this event. + base = 100 + } + } + + # On seconds thoughts, this is unbecoming... + option = { + name = ep1_decision.0101.c + + # Return invested prestige. + hidden_effect = { add_prestige_no_experience = order_mass_eviction_decision_cost_value } + # & reset the cooldown. + remove_decision_cooldown = order_mass_eviction_decision + + # No stress impact for cancelling out of the decision. + ai_chance = { + # AI cannot access this event. + base = 100 + } + } +} + +################################################## +# Grandiose Decor +# by Ewan Cowhig Croft +# 0111 - 0120 +################################################## + +# For technical reasons, this trigger can't be the same as exoticise_a_grand_hall_decision_list_builder_guts_trigger, but maintains (almost) technical parity with it. +scripted_trigger ep1_decision_0111_list_builder_guts_trigger = { + # Is the title presently active? + is_title_created = yes + # Filter out anyone already in the list. + NOT = { is_in_list = royal_courts_list } + # Check assorted holder things. + holder = { + # Filter out anyone who has the right rank but lacks a mechanical royal court. + has_royal_court = yes + this != root + # Can the two communicate? + in_diplomatic_range = root + } +} + +scripted_effect ep1_decision_0111_apply_hall_effect = { + # Add mutual opinion for each non-AI involved with the interaction. + $CHOICE$ = { + if = { + limit = { is_ai = yes } + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 30 + } + } + } + if = { + limit = { is_ai = yes } + add_opinion = { + target = $CHOICE$ + modifier = impressed_opinion + opinion = 30 + } + } + # Gain a fraction of the CGV difference. + change_current_court_grandeur = $CHOICE$.ep1_decision_0111_proportional_cgv_gain_value + # Pay prestige proportional to how much CGV is gained. + add_prestige = $CHOICE$.ep1_decision_0111_proportional_prestige_cost_value + # Hand over a lil participation prestige for $CHOICE$ so that they know someone thinks their court is rad. + $CHOICE$ = { + send_interface_toast = { + title = ep1_decision.0111.toast.t + left_icon = root + # Give a little more for emperors doing this. + if = { + limit = { $CHOICE$.primary_title.tier >= tier_empire } + add_prestige = medium_prestige_gain + } + # Otherwise, just a few crumbs of prestige. + else = { add_prestige = minor_prestige_gain } + } + } + + # Stress impact handled in the scripted effect, since it'll always be the same for each char. + stress_impact = { + architect = minor_stress_impact_loss + humble = medium_stress_impact_loss + arrogant = major_stress_impact_gain + } +} + +# Arrange for a major room to be remodelled with decor inspired by a more grandiose culture. +ep1_decision.0111 = { + type = character_event + title = ep1_decision.0111.t + desc = ep1_decision.0111.desc + theme = court + left_portrait = { + character = root + animation = throne_room_conversation_4 + } + lower_left_portrait = scope:option_1 + lower_center_portrait = scope:option_2 + lower_right_portrait = scope:option_3 + + immediate = { + # Build a list of suitable courts. + ## We add the title rather than the characters to the list for a cleaner debug tooltip in-game. + every_empire = { + limit = { ep1_decision_0111_list_builder_guts_trigger = yes } + # Rack 'em up. + add_to_list = royal_courts_list + } + every_kingdom = { + limit = { ep1_decision_0111_list_builder_guts_trigger = yes } + # Rack 'em up. + add_to_list = royal_courts_list + } + # Then, filter through the list and grab appropriate options. + ordered_in_list = { + list = royal_courts_list + max = 4 + check_range_bounds = no + order_by = { + # Use CGV as a base. + add = holder.court_grandeur_current + # Weight up for neighbouring realms. + if = { + limit = { + holder = { + OR = { + any_neighboring_and_across_water_realm_same_rank_owner = { this = root } + any_neighboring_and_across_water_top_liege_realm_owner = { this = root } + } + } + } + multiply = 5 + } + } + if = { + limit = { + NOT = { exists = scope:option_1 } + } + holder = { save_scope_as = option_1 } + } + else_if = { + limit = { + NOT = { + holder = { this = scope:option_1 } + exists = scope:option_2 + } + } + holder = { save_scope_as = option_2 } + } + else_if = { + limit = { + NOT = { + holder = { this = scope:option_1 } + holder = { this = scope:option_2 } + exists = scope:option_3 + } + } + holder = { save_scope_as = option_3 } + } + } + } + + # Scope:option_1 is a grand, grand place. + option = { + name = { + trigger = { scope:option_1.court_grandeur_current > root.court_grandeur_current } + text = ep1_decision.0111.a.greater_cgv + } + name = { + trigger = { always = yes } + text = ep1_decision.0111.a.lesser_cgv + } + trigger = { exists = scope:option_1 } + + # Build a hall in the relevant scope's style. + ep1_decision_0111_apply_hall_effect = { CHOICE = scope:option_1 } + + # Stress_impact block handled in the scripted effect. + ai_chance = { + # Generally equal likelihood for each option. + base = 100 + # Otherwise, people want to model themselves after characters they like. + #opinion_modifier = { opinion_target = scope:option_1 } + } + } + + # I find the architecture of scope:option_2 enthralling! + option = { + name = { + trigger = { scope:option_2.court_grandeur_current > root.court_grandeur_current } + text = ep1_decision.0111.b.greater_cgv + } + name = { + trigger = { always = yes } + text = ep1_decision.0111.b.lesser_cgv + } + trigger = { exists = scope:option_2 } + + # Build a hall in the relevant scope's style. + ep1_decision_0111_apply_hall_effect = { CHOICE = scope:option_2 } + + # Stress_impact block handled in the scripted effect. + ai_chance = { + # Generally equal likelihood for each option. + base = 100 + # Otherwise, people want to model themselves after characters they like. + #opinion_modifier = { opinion_target = scope:option_2 } + } + } + + # Perhaps a scope:option_3ikkan lounge? + option = { + name = { + trigger = { scope:option_3.court_grandeur_current > root.court_grandeur_current } + text = ep1_decision.0111.c.greater_cgv + } + name = { + trigger = { always = yes } + text = ep1_decision.0111.c.lesser_cgv + } + trigger = { exists = scope:option_3 } + + # Build a hall in the relevant scope's style. + ep1_decision_0111_apply_hall_effect = { CHOICE = scope:option_3 } + + # Stress_impact block handled in the scripted effect. + ai_chance = { + # Generally equal likelihood for each option. + base = 100 + # Otherwise, people want to model themselves after characters they like. + #opinion_modifier = { opinion_target = scope:option_3 } + } + } + + # These all seem quite foreign... + option = { + name = ep1_decision.0111.d + + # Refund the gold paid; we mention this in a tooltip so that it's a bit less noticeable. + hidden_effect = { add_gold = var:exoticise_a_grand_hall_decision_refund_value } + custom_tooltip = ep1_decision.0111.d.tt + # Take the decision off cooldown. + remove_decision_cooldown = exoticise_a_grand_hall_decision + + # No stress impact for cancelling out. + ai_chance = { + # If the AI has gotten this far, they should pick an option. + base = 0 + } + } + + after = { + # Whatever else happens, clear the refund value. + remove_variable = exoticise_a_grand_hall_decision_refund_value + } +} + diff --git a/N3OW/events/dlc/ep1/ep1_flavor_events.txt b/N3OW/events/dlc/ep1/ep1_flavor_events.txt new file mode 100644 index 00000000..bd237da1 --- /dev/null +++ b/N3OW/events/dlc/ep1/ep1_flavor_events.txt @@ -0,0 +1,6004 @@ +namespace = ep1_flavor + +################################################## +# Ewan + +################################################## +# 0001 - 0010 Learn of the secret scion of an existing neighbouring court. +# 0011 - 0020 Diplomats from nearby realms have trashed your favourite hall. +# 0021 - 0030 You compete with another realm that shares your court language for grandeur. +# 0031 - 0040 Several fresh young scholars are newly arrived at court & need guidance. +################################################## + +################################################## +# The Secret DaughterSon +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_trigger ep1_flavour_0001_relative_appropriate_to_marry_trigger = { + can_marry_trigger = yes + is_adult = yes + liege = root + # Make sure we don't accidentally nab a player. + NOT = { is_ai = no } +} + +scripted_trigger ep1_flavour_0001_valid_to_have_secret_scion_trigger = { + # Standards checks: make sure the ruler is of the correct age, decently fertile, etc. + is_ai = yes + any_spouse = { + count = all + is_ai = yes + } + can_have_children = yes + fertility >= medium_fertility + ## Age needs to be relatively high so that the scion can be created successfully. + age >= ep1_flavour_0001_scion_parent_minimum_age_value + ## Having a dynasty makes things more fun + exists = dynasty + ## Soulmates are too complex to really handle hidden bastards for. + num_of_relation_soulmate = 0 + ## And though heterosexual, bisexual, and asexual characters might also conceivably have such a child, homosexual characters generally shouldn't. + NOT = { has_sexuality = homosexual } + # Hostility checks: filter out anyone who's at war with root, a bad relation, or just otherwise wouldn't be a good fit. + NOR = { + is_at_war_with = root + has_any_bad_relationship_with_root_trigger = yes + # Faiths that'd never consider marrying you are bad picks. + faith = { + faith_hostility_level = { + target = root.faith + value >= faith_evil_level + } + } + } + # Make sure we have someone who'd be personally concerned about the existence of bastards. + ## I.e, their faith discriminates against bastards. We check this manually both for ease of triggers & to keep things simple. + faith = { + OR = { + has_doctrine_parameter = bastards_legitimize + has_doctrine_parameter = bastards_always + } + } + # And finally someone who might actually actively empathise enough to try and protect their bastard from a harsh existence. + NOR = { + has_trait = lazy + has_trait = honest + has_trait = just + has_trait = trusting + has_trait = callous + has_trait = sadistic + } +} + +scripted_effect ep1_flavour_0001_marry_suitor_effect = { + # Diplo duel to try to pressure for the marriage. + duel = { + skill = diplomacy + target = scope:scion_parent + # Root wins, obtaining a forceful marriage alliance. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep1_flavor.0001.a.tt.success + send_interface_toast = { + title = ep1_flavor.0001.a.tt.success + left_icon = scope:scion_parent + right_icon = scope:scion_actual + # Calc all the bastard stuff. + ep1_flavour_0001_reveal_secret_child_effect = yes + # Scope:prospective_spouse & scope:scion_actual marry immediately or asap through grand wedding + if = { + limit = { + has_ep2_dlc_trigger = yes + } + create_grand_wedding_betrothal = { + SPOUSE_1 = scope:prospective_spouse + SPOUSE_2 = scope:scion_actual + HOST = root + PROMISEE = scope:scion_parent + } + } + else = { scope:prospective_spouse = { marry = scope:scion_actual } } + # Create an alliance root & scope:scion_parent via the married couple. + create_alliance = { + target = scope:scion_parent + allied_through_owner = scope:prospective_spouse + allied_through_target = scope:scion_actual + } + # Scope:scion_parent steps rivalry with root. + progress_towards_rival_effect = { + REASON = rival_succeeded_force_marriage + CHARACTER = scope:scion_parent + OPINION = -50 + } + } + } + # Scope:scion_parent obfuscates till they can whisk away their child. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep1_flavor.0001.a.tt.failure + send_interface_toast = { + title = ep1_flavor.0001.a.tt.failure + left_icon = scope:scion_parent + right_icon = scope:scion_actual + # Scope:scion gets away. + custom_tooltip = ep1_flavor.0001.tt.scion_escapes + # Root loses prestige. + add_prestige = major_prestige_loss + # Scope:scion_parent steps rivalry with root, but a bit less because they still won. + progress_towards_rival_effect = { + REASON = rival_attempted_to_force_marriage + CHARACTER = scope:scion_parent + OPINION = -25 + } + } + } + } + + # Sort stress. + ## If scope:scion_actual is at least a royal bastard, then arrogant characters are a little happy. + if = { + limit = { scope:scion_parent.primary_title.tier >= tier_kingdom } + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } + ## Otherwise, they don't have a feeling. + else = { + stress_impact = { + humble = medium_stress_impact_gain + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + } +} + +scripted_effect ep1_flavour_0001_reveal_secret_child_effect = { + # First, set up the sex as "recent" so we can pull the reveal. + ## The affair partner's gender is picked deterministically so that it could result in pregnancy. + scope:scion_parent = { + if = { + limit = { is_female = yes } + set_variable = { + name = had_recent_sex + value = flag:male + } + } + else = { + set_variable = { + name = had_recent_sex + value = flag:female + } + } + } + # 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 } + # Finally, deal with scope:scion_actual's transformation. + scope:scion_actual = { + # Then make scope:scion_actual a bastard. + add_trait = bastard + # Obfuscate a few irrelevant bits. + hidden_effect = { + # Set up their legal parentage. + scope:scion_parent = { + if = { + limit = { is_female = yes } + scope:scion_actual = { set_mother = scope:scion_parent } + } + else = { + scope:scion_actual = { set_father = scope:scion_parent } + } + } + # Plus, dynasty. + set_house = scope:scion_parent.house + } + } + scope:scion_parent = { + if = { + limit = { + OR = { + AND = { + is_male = yes + NOT = { + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } + AND = { + is_female = yes + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + } + + } + add_trait = adulterer + } + } +} + +# Learn of the secret scion of an existing neighbouring court. +ep1_flavor.0001 = { + type = character_event + title = ep1_flavor.0001.t + desc = ep1_flavor.0001.desc + theme = diplomacy + left_portrait = { + character = scope:scion_parent + animation = disbelief + outfit_tags = { beggar_rags } + } + right_portrait = { + character = scope:scion_actual + animation = worry + outfit_tags = { beggar_rags } + } + lower_center_portrait = scope:prospective_spouse + override_background = { reference = tavern } + + cooldown = { years = 100 } + + trigger = { + # Standard checks. + has_royal_court = yes + has_dlc_feature = royal_court + is_available_at_peace_adult = yes + # Is suitable/has suitable family for the marriage. + OR = { + can_marry_trigger = yes + any_close_family_member = { ep1_flavour_0001_relative_appropriate_to_marry_trigger = yes } + } + # Has a valid neighbour or vassal. + OR = { + any_neighboring_and_across_water_realm_same_rank_owner = { ep1_flavour_0001_valid_to_have_secret_scion_trigger = yes } + any_vassal = { ep1_flavour_0001_valid_to_have_secret_scion_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings: plug in a court type that should see this event more often. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # First up, we decide whether root or a relative of theirs will be the marriable candidate. + ## If root can marry, we use root. + if = { + limit = { can_marry_trigger = yes } + save_scope_as = prospective_spouse + } + ## Otherwise, pick a family member. + else = { + random_close_family_member = { + limit = { ep1_flavour_0001_relative_appropriate_to_marry_trigger = yes } + save_scope_as = prospective_spouse + } + } + # Now we need to select a suitable dynasty to add the scion to. + ## Grab every candidate, chuck 'em in a list. + every_neighboring_and_across_water_realm_same_rank_owner = { + limit = { ep1_flavour_0001_valid_to_have_secret_scion_trigger = yes } + add_to_list = valid_scion_candidates_list + } + every_vassal = { + limit = { ep1_flavour_0001_valid_to_have_secret_scion_trigger = yes } + add_to_list = valid_scion_candidates_list + } + ## Comb through the list for the most suitable dynasty. + ordered_in_list = { + list = valid_scion_candidates_list + order_by = { + value = 0 + # We prefer characters outside your sub-realm. + if = { + limit = { + liege != root + } + add = 100 + } + # Ideally ones with at least a bit of the relevant skills. + if = { + limit = { diplomacy >= decent_skill_rating } + add = 15 + } + if = { + limit = { intrigue >= decent_skill_rating } + add = 15 + } + # Certain traits really weight up the chances of the candidate. + if = { + limit = { has_trait = lustful } + add = 20 + } + if = { + limit = { has_trait = diligent } + add = 20 + } + if = { + limit = { has_trait = paranoid } + add = 20 + } + if = { + limit = { has_trait = seducer } + add = 20 + } + if = { + limit = { has_trait = schemer } + add = 20 + } + if = { + limit = { has_trait = compassionate } + add = 20 + } + } + save_scope_as = scion_parent + } + ## Take off scope:scion_parent's headgear for the event. + scope:scion_parent = { add_character_flag = no_headgear } + # Finally, we create the scion themselves. + ## Basic setup. + create_character = { + location = scope:scion_parent.capital_county.title_province + template = hidden_scion_template + save_scope_as = scion_actual + } + ## Adjust a few details. + hidden_effect = { + scope:scion_actual = { + # Copy over their genetics. + copy_inheritable_appearance_from = scope:scion_parent + # Add the sheltered modifier. + add_character_modifier = raised_in_secrecy_modifier + } + } + } + + # Preferred candidate: No doubt scope:scion_parent was simply holding HerHis hand for me? + option = { + name = ep1_flavor.0001.a + trigger = { this = scope:prospective_spouse } + + ep1_flavour_0001_marry_suitor_effect = yes + + # Stress impact taken care of in the scripted effect. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = 0.25 + ai_compassion = -0.5 + } + } + } + + # Backup candidate: No doubt scope:scion_parent was simply holding HerHis hand for my [Relative]? + option = { + name = ep1_flavor.0001.b + trigger = { + this != scope:prospective_spouse + } + + ep1_flavour_0001_marry_suitor_effect = yes + + # Stress impact taken care of in the scripted effect. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = 0.25 + ai_compassion = -0.5 + } + } + } + + # Grab them both, the world must know! + option = { + name = ep1_flavor.0001.c + + # You attempt to reveal scope:scion_actual's existence, giving scope:scion_parent fairly little time to completely erase HerHis existence. + duel = { + skill = intrigue + target = scope:scion_parent + # Scope:scion_parent leaves a trace, and you become the QueenKing of gossip for a time. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep1_flavor.0001.c.tt.success + send_interface_toast = { + title = ep1_flavor.0001.c.tt.success + left_icon = scope:scion_parent + # Gain some permanent intrigue. + add_intrigue_skill = 2 + # Scope:scion_actual is revealed. Consequences ensue. + ep1_flavour_0001_reveal_secret_child_effect = yes + ## Remember to mark this as having happened. + save_scope_value_as = { + name = scion_revealed + value = yes + } + # Become rivals with scope:scion_parent immediately (nemeses if they're vengeful). + if = { + limit = { + scope:scion_parent = { has_trait = vengeful } + can_set_relation_nemesis_trigger = { CHARACTER = scope:scion_parent } + } + set_relation_nemesis = { + target = scope:scion_parent + reason = rival_exposed_bastard + } + } + else_if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:scion_parent } + } + set_relation_rival = { + target = scope:scion_parent + reason = rival_exposed_bastard + } + } + else = { + reverse_add_opinion = { + target = scope:scion_parent + modifier = hate_opinion + opinion = -50 + } + } + } + } + # You're flummoxed by scope:scion_parent's trickery, leaving your accusations ridiculously baseless. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep1_flavor.0001.c.tt.failure + send_interface_toast = { + title = ep1_flavor.0001.c.tt.failure + left_icon = scope:scion_parent + # Scope:scion gets away. + custom_tooltip = ep1_flavor.0001.tt.scion_escapes + # Lose a load of prestige. + add_prestige = major_prestige_loss + # Stepped rivalry with scope:scion_parent. + progress_towards_rival_effect = { + REASON = rival_attempted_to_reveal_offspring + CHARACTER = scope:scion_parent + OPINION = -25 + } + } + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.75 + ai_compassion = -0.75 + } + } + } + + # I'll help you, but I expect something in return... + option = { + name = ep1_flavor.0001.d + trigger = { + can_add_hook = { + target = scope:scion_parent + type = manipulation_hook + } + } + + # Scope:scion gets away. + custom_tooltip = ep1_flavor.0001.tt.scion_escapes + # Gain a hook on scope:scion_parent, who's also grateful for your assistance in their time of need. + add_hook = { + type = favor_hook + target = scope:scion_parent + } + reverse_add_opinion = { + target = scope:scion_parent + modifier = grateful_opinion + opinion = 50 + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + honest = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = 0.25 + } + } + } + + # What a pedestrian drama. + option = { + # Doesn't believe in bastards. + name = { + trigger = { + faith = { has_doctrine_parameter = bastards_none } + } + text = ep1_flavor.0001.e.no_bastards + } + # Fallback. + name = ep1_flavor.0001.e.fallback + + # Scope:scion gets away. + custom_tooltip = ep1_flavor.0001.tt.scion_escapes + # You pay the stranger no mind; scope:scion_parent is relieved. + reverse_add_opinion = { + target = scope:scion_parent + modifier = relieved_opinion + opinion = 25 + } + + stress_impact = { + base = medium_stress_impact_loss + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.75 + } + } + } + + # Do a little clean-up. + after = { + # Afterwards, if scope:scion_actual isn't married or revealed, quietly disappear them. + hidden_effect = { + scope:scion_actual = { + if = { + limit = { + is_married = no + NOT = { exists = scope:scion_revealed } + } + death = { death_reason = death_vanished } + } + } + } + # Give scope:scion_parent their hat back. + scope:scion_parent = { remove_character_flag = no_headgear } + } +} + +################################################## +# An Absolute Shambles +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +scripted_trigger ep1_flavour_0011_valid_diplomats_trigger = { + # The title must be created first off. + is_title_created = yes + holder = { + # Make sure we're not looking at root. + this != root + # Now discard any that lack royal courts or aren't in diplomatic range. + has_royal_court = yes + has_dlc_feature = royal_court + in_diplomatic_range = root + # Then any that lack a chancellor. + exists = cp:councillor_chancellor + # Finally, their chancellor must be available & at peace. + cp:councillor_chancellor = { is_available_at_peace_ai_adult = yes } + } +} + +scripted_effect ep1_flavour_0011_friendly_diplomats_effect = { + reverse_add_opinion = { + target = scope:diplomat_1 + modifier = relieved_opinion + opinion = $OPINION$ + } + reverse_add_opinion = { + target = scope:diplomat_2 + modifier = relieved_opinion + opinion = $OPINION$ + } + ## Make them potential friends if appropriate. + hidden_effect = { + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:diplomat_1 } + } + set_relation_potential_friend = scope:diplomat_1 + } + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:diplomat_2 } + } + set_relation_potential_friend = scope:diplomat_2 + } + } +} + +# Diplomats from nearby realms have trashed your favourite hall. +ep1_flavor.0011 = { + type = character_event + title = ep1_flavor.0011.t + desc = ep1_flavor.0011.desc + theme = diplomacy + left_portrait = { + character = scope:diplomat_1 + animation = shock + } + right_portrait = { + character = scope:diplomat_2 + animation = shame + } + override_background = { reference = feast } + + cooldown = { years = 10 } + + trigger = { + # Standard checks. + has_royal_court = yes + has_dlc_feature = royal_court + is_available_at_peace_adult = yes + # Any two valid foreign chancellors are available. + any_kingdom = { + count >= 2 + ep1_flavour_0011_valid_diplomats_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings: plug in a court type that should see this event more often. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # Grab all applicable chancellors. + every_kingdom = { + limit = { ep1_flavour_0011_valid_diplomats_trigger = yes } + holder.cp:councillor_chancellor = { add_to_list = valid_chancellors_list } + } + # Now, pick out the two most relevant chancellors. + ordered_in_list = { + list = valid_chancellors_list + order_by = { + value = 0 + # Prio up realms you're allied with, since they'd have good cause. + if = { + limit = { + liege = { + any_ally = { this = root } + } + } + add = 100 + } + # Plus anyone where there's a degree of mutual religious tolerance. + if = { + limit = { + faith = { + faith_hostility_level = { + target = root.faith + value <= faith_hostile_level + } + } + save_temporary_scope_as = current_char + root.faith = { + faith_hostility_level = { + target = scope:current_char.faith + value <= faith_hostile_level + } + } + } + add = 50 + } + # Various traits make it more likely. + ## Obviously drunkards. + if = { + limit = { has_trait = drunkard } + add = 10 + } + ## Revellers of all stripes. + if = { + limit = { has_trait = lifestyle_reveler } + add = 20 + } + ## Gluttons. + if = { + limit = { has_trait = gluttonous } + add = 10 + } + ## Arbitrary folks. + if = { + limit = { has_trait = arbitrary } + add = 10 + } + ## Gregarious party-throwers. + if = { + limit = { has_trait = gregarious } + add = 10 + } + # And a few traits make it less likely. + ## Recluses. + if = { + limit = { has_trait = reclusive } + add = -10 + } + ## The temperate. + if = { + limit = { has_trait = temperate } + add = -10 + } + ## Just folks. + if = { + limit = { has_trait = just } + add = -10 + } + ## The shy. + if = { + limit = { has_trait = shy } + add = -10 + } + # Diplomatic skill decreases it, since better diplomats are less likely to make a scene. + add = { + value = diplomacy + multiply = -1 + } + } + max = 2 + if = { + limit = { + NOT = { exists = scope:diplomat_1 } + } + save_scope_as = diplomat_1 + } + else_if = { + limit = { + NOT = { + this = scope:diplomat_1 + exists = scope:diplomat_2 + } + } + save_scope_as = diplomat_2 + } + } + # Set up a cost based on root's lodgings amenity. + if = { + limit = { + amenity_level = { + target = court_lodging_standards + value <= low_amenity_level + } + } + set_variable = { + name = reimbursement_cost + value = { + value = minor_gold_value + multiply = 0.5 + round = yes + } + } + } + if = { + limit = { + amenity_level = { + target = court_lodging_standards + value <= medium_amenity_level + } + } + set_variable = { + name = reimbursement_cost + value = { + value = medium_gold_value + multiply = 0.5 + round = yes + } + } + } + if = { + limit = { + amenity_level = { + target = court_lodging_standards + value <= high_amenity_level + } + } + set_variable = { + name = reimbursement_cost + value = { + value = major_gold_value + multiply = 0.5 + round = yes + } + } + } + if = { + limit = { + amenity_level = { + target = court_lodging_standards + value >= very_high_amenity_level + } + } + set_variable = { + name = reimbursement_cost + value = { + value = massive_gold_value + multiply = 0.5 + round = yes + } + } + } + ## No more gold for max, since we've already reached a pretty expensive bill. + # Add a negative modifier for the trashed hall. + add_character_modifier = { + modifier = legendary_party_aftermath_modifier + years = 10 + } + scope:diplomat_2 = { + add_character_flag = is_naked + } + } + + # You will pay for these damages, you lickspittle curs! + option = { + name = ep1_flavor.0011.a + + # Deduct half of the damages from each diplomat, pay it towards root. + ## We're not fussed if this cost is unexpected for the diplomats: they shouldn't have messed with the hall. + scope:diplomat_1 = { + pay_short_term_gold = { + target = root + gold = root.var:reimbursement_cost + } + } + scope:diplomat_2 = { + pay_short_term_gold = { + target = root + gold = root.var:reimbursement_cost + } + } + # Remove the negative modifier. + remove_character_modifier = legendary_party_aftermath_modifier + # Gain a replacement modifier. + add_character_modifier = { + modifier = lacking_diplomatic_munity_modifier + years = 10 + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + calm = medium_stress_impact_gain + generous = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_greed = 0.5 + } + } + } + + # Alright, you trashed it, you can clean it up. SERVANTS! A mop! + option = { + name = ep1_flavor.0011.b + + # The diplomats are fairly upset with this humiliation. + reverse_add_opinion = { + target = scope:diplomat_1 + modifier = humiliated_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:diplomat_2 + modifier = humiliated_opinion + opinion = -30 + } + ## Make them potential rivals if appropriate. + hidden_effect = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:diplomat_1 } + } + set_relation_potential_rival = scope:diplomat_1 + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:diplomat_2 } + } + set_relation_potential_rival = scope:diplomat_2 + } + } + # Remove the negative modifier. + remove_character_modifier = legendary_party_aftermath_modifier + # Replace it with a positive one. + add_character_modifier = { + modifier = humbling_hall_modifier + years = 10 + } + # Whack a lil CGV in for your swagger. + change_current_court_grandeur = miniscule_court_grandeur_gain + + stress_impact = { + just = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = -0.5 + } + } + } + + # Oh no, this party's not over yet: someone fill my goblet! + option = { + name = ep1_flavor.0011.c + trigger = { + NOT = { has_trait = lifestyle_reveler } + } + + # The diplomats are immensely happy. + ep1_flavour_0011_friendly_diplomats_effect = { OPINION = 30 } + # The modifier gets worse in some ways, better in others. + remove_character_modifier = legendary_party_aftermath_modifier + add_character_modifier = { + modifier = mythic_party_aftermath_modifier + years = 10 + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = medium_stress_impact_gain + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_energy = 0.25 + ai_vengefulness = -0.5 + } + } + } + + # [Reveller] One night? Pathetic! Make way for the Party [TitleAsName]! + option = { + name = ep1_flavor.0011.d + trigger = { has_trait = lifestyle_reveler } + trait = lifestyle_reveler + + # The diplomats are even happier. + ep1_flavour_0011_friendly_diplomats_effect = { OPINION = 50 } + # The modifier gets *much* worse in some ways, *much* better in others. + remove_character_modifier = legendary_party_aftermath_modifier + add_character_modifier = { + modifier = world_shattering_party_aftermath_modifier + years = 10 + } + + stress_impact = { + base = medium_stress_loss + gregarious = miniscule_stress_impact_loss + shy = medium_stress_impact_gain + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.75 + ai_energy = 0.55 + ai_vengefulness = -0.5 + } + } + } + + # [wordlessly leave the hall] + option = { + name = ep1_flavor.0011.e + flavor = ep1_flavor.0011.e.tt + + # The diplomats gain stress & fear reprisal. + scope:diplomat_1 = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -30 + } + add_stress = major_stress_gain + } + scope:diplomat_2 = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -30 + } + add_stress = major_stress_gain + } + # People think you inscrutable. + add_character_modifier = { + modifier = inscrutable_host_modifier + years = 10 + } + + stress_impact = { + shy = minor_stress_impact_loss + reclusive = minor_stress_impact_loss + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_energy = -0.5 + ai_vengefulness = -0.75 + } + } + } + + # Do a little clean-up. + after = { + # Get rid of the reimbursement cost. + remove_variable = reimbursement_cost + scope:diplomat_2 = { + remove_character_flag = is_naked + } + } +} + +################################################## +# Two Realms Separated by a Courtly Language +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +scripted_trigger ep1_flavour_0021_valid_nitpicking_courtier_trigger = { + # A simple is available check. + is_available_ai_adult = yes + # Plus they speak the court language. + knows_court_language_of = root +} + +scripted_trigger ep1_flavour_0021_valid_wrong_spelling_realm_trigger = { + # The title must be created first off. + is_title_created = yes + holder = { + # Make sure we're not looking at root. + this != root + # For erroring reasons, double check that their court is royal. + has_royal_court = yes + has_dlc_feature = royal_court + # Now ensure they speak the same court language. + has_same_court_language = root + # And that they can speak their *own* court language. + knows_court_language_of = this + # Finally, discard any that aren't in diplomatic range. + in_diplomatic_range = root + # ... or players. + is_ai = yes + } +} + +scripted_trigger ep1_flavour_0021_valid_characters_to_fuss_trigger = { + # Must speak the court language. + knows_court_language_of = $OWN_COURT$ + # And be an AI who's around and about. + is_available_at_peace_ai_adult = yes +} + +scripted_trigger ep1_flavour_0021_different_cultured_realms_trigger = { + $THIS$ = { + any_courtier = { + percent >= 0.5 + culture = $THIS$.culture + } + OR = { + any_sub_realm_county = { + count >= 10 + culture = $THIS$.culture + } + culture = { + any_culture_county = { + percent >= 0.25 + OR = { + holder = $THIS$ + holder = { + any_liege_or_above = { this = $THIS$ } + } + } + } + } + any_sub_realm_county = { + percent >= 0.5 + culture = $THIS$.culture + } + } + } +} + +scripted_effect ep1_flavour_0021_apply_mutual_court_opinions_effect = { + hidden_effect = { + every_in_list = { + list = root_court_list + save_temporary_scope_as = current_char + every_in_list = { + list = scope_rival_monarch_court_list + add_opinion = { + target = scope:current_char + modifier = $OPINION_TYPE$ + opinion = $OPINION_VALUE$ + } + } + } + every_in_list = { + list = scope_rival_monarch_court_list + save_temporary_scope_as = current_char + every_in_list = { + list = root_court_list + add_opinion = { + target = scope:current_char + modifier = $OPINION_TYPE$ + opinion = $OPINION_VALUE$ + } + } + } + } +} + +scripted_effect ep1_flavour_0021_apply_mutual_cultural_dislike_effect = { + if = { + limit = { + # First, check they're not the same culture. + culture != scope:rival_monarch.culture + # Then make sure both actually have a decent chunk of courtiers of their culture around, and aren't ruling some total adventurer kingdom.. + ep1_flavour_0021_different_cultured_realms_trigger = { THIS = root } + ep1_flavour_0021_different_cultured_realms_trigger = { THIS = scope:rival_monarch } + } + culture = { + change_cultural_acceptance = { + target = scope:rival_monarch.culture + value = $ACCEPTANCE_CHANGE$ + desc = $ACCEPTANCE_DESC$ + } + } + } +} + +# You compete with another realm that shares your court language for grandeur. +ep1_flavor.0021 = { + type = character_event + title = ep1_flavor.0021.t + desc = ep1_flavor.0021.desc + theme = diplomacy + left_portrait = { + character = scope:nitpicker + animation = scheme + } + right_portrait = { + character = scope:rival_monarch + animation = personality_vengeful + } + + cooldown = { years = 5 } + + trigger = { + # Standard checks. + has_royal_court = yes + has_dlc_feature = royal_court + is_available_at_peace_adult = yes + # For flavour reasons, root must be able to speak their own court language. + knows_court_language_of = this + # You'll also need someone in your court who can be the focal point. + ## This might occasionally make dumb selections, but honestly, that's sorta in the spirit of the quibbling. + any_courtier = { ep1_flavour_0021_valid_nitpicking_courtier_trigger = yes } + # Make sure we've got a suitable opposing realm. + OR = { + any_kingdom = { ep1_flavour_0021_valid_wrong_spelling_realm_trigger = yes } + any_empire = { ep1_flavour_0021_valid_wrong_spelling_realm_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + + # Court weightings: plug in a court type that should see this event more often. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # Select an opposing realm. + ## Kingdoms look for kingdoms... + if = { + limit = { highest_held_title_tier = tier_kingdom } + random_kingdom = { + limit = { ep1_flavour_0021_valid_wrong_spelling_realm_trigger = yes } + save_scope_as = rival_realm + holder = { save_scope_as = rival_monarch } + } + # ... but otherwise will take an empire. + if = { + limit = { + NOT = { exists = scope:rival_realm } + } + random_empire = { + limit = { ep1_flavour_0021_valid_wrong_spelling_realm_trigger = yes } + save_scope_as = rival_realm + holder = { save_scope_as = rival_monarch } + } + } + } + ## Empires look for empires... + else = { + random_empire = { + limit = { ep1_flavour_0021_valid_wrong_spelling_realm_trigger = yes } + save_scope_as = rival_realm + holder = { save_scope_as = rival_monarch } + } + # ... but will otherwise take kingdoms. + if = { + limit = { + NOT = { exists = scope:rival_realm } + } + random_kingdom = { + limit = { ep1_flavour_0021_valid_wrong_spelling_realm_trigger = yes } + save_scope_as = rival_realm + holder = { save_scope_as = rival_monarch } + } + } + } + # Grab a nitpicking courtier. + ## We do this after selecting the realm so that we can weight against poor-choice characters. + random_courtier = { + limit = { ep1_flavour_0021_valid_nitpicking_courtier_trigger = yes } + weight = { + base = 0 + # Weight up according to learning. + modifier = { add = learning } + # Plus a few traits make it more likely. + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = scholar + } + ## Y'know, assuming you're just a stickler for the rules of language too. + modifier = { + add = 5 + has_trait = just + } + # And a few others less likely. + modifier = { + add = -10 + has_trait = humble + } + ## And, as with just, assuming that you also don't much care for the rules of language. + modifier = { + add = -5 + has_trait = arbitrary + } + # Weight against characters that might identify with the other realm. + modifier = { + add = -20 + any_close_or_extended_family_member = { this = scope:rival_monarch } + } + modifier = { + add = -20 + culture = scope:rival_monarch.culture + } + } + save_scope_as = nitpicker + } + # Nab both courts for effects. + ## First root. + every_courtier = { + limit = { + ep1_flavour_0021_valid_characters_to_fuss_trigger = { OWN_COURT = root } + } + add_to_list = root_court_list + } + every_councillor = { + limit = { + ep1_flavour_0021_valid_characters_to_fuss_trigger = { OWN_COURT = root } + # Ensure that a vassal kingdom isn't added as disapproving of their own spelling. + this != scope:rival_monarch + } + add_to_list = root_court_list + } + ## Then scope:rival_monarch. + scope:rival_monarch = { + every_courtier = { + limit = { + ep1_flavour_0021_valid_characters_to_fuss_trigger = { OWN_COURT = scope:rival_monarch } + } + add_to_list = scope_rival_monarch_court_list + } + every_councillor = { + limit = { + ep1_flavour_0021_valid_characters_to_fuss_trigger = { OWN_COURT = scope:rival_monarch } + # Ensure that a vassal kingdom isn't added as disapproving of their own spelling. + this != root + } + add_to_list = scope_rival_monarch_court_list + } + } + } + + # This missive is missing half the vowels! Disgusting! + option = { + name = ep1_flavor.0021.a + + # Both courts gain dislike of each other. + custom_tooltip = ep1_flavor.0021.a.tt + ep1_flavour_0021_apply_mutual_court_opinions_effect = { + OPINION_TYPE = disgusted_opinion + OPINION_VALUE = ep1_flavour_0021_courts_lose_opinion_actual_value + } + # Diplo challenge to gain CGV at their expense. + duel = { + skill = diplomacy + target = scope:rival_monarch + # PrimaryTitle.GetAdjective spellings are best! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep1_flavor.0021.a.tt.success + send_interface_toast = { + title = ep1_flavor.0021.a.tt.success + left_icon = scope:rival_monarch + # Some for you... + change_current_court_grandeur = medium_court_grandeur_gain + # ... some from them. + scope:rival_monarch = { change_current_court_grandeur = medium_court_grandeur_loss } + } + } + # Scope:rival_monarch.PrimaryTitle.GetAdjective spellings are best! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep1_flavor.0021.a.tt.failure + send_interface_toast = { + title = ep1_flavor.0021.a.tt.failure + left_icon = scope:rival_monarch + # Some from you... + change_current_court_grandeur = medium_court_grandeur_loss + # ... some for them. + scope:rival_monarch = { change_current_court_grandeur = medium_court_grandeur_gain } + } + } + } + # Look at making things a bit more tense. + ep1_flavour_0021_apply_mutual_cultural_dislike_effect = { + ACCEPTANCE_CHANGE = minor_cultural_acceptance_loss + ACCEPTANCE_DESC = cultural_acceptance_courtly_spelling_differences + } + + stress_impact = { + humble = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.75 + ai_rationality = -0.25 + } + } + } + + # Are they not our linguistic cousins? + option = { + name = ep1_flavor.0021.b + + # Both courts start to like each other a bit more. + custom_tooltip = ep1_flavor.0021.b.tt + ep1_flavour_0021_apply_mutual_court_opinions_effect = { + OPINION_TYPE = respect_opinion + OPINION_VALUE = ep1_flavour_0021_courts_gain_opinion_value + } + # Stepped friendship with the other ruler. + progress_towards_friend_effect = { + CHARACTER = scope:rival_monarch + OPINION = default_friend_opinion + REASON = friend_common_language + } + # And, if appropriate, a little cultural acceptance. + ep1_flavour_0021_apply_mutual_cultural_dislike_effect = { + ACCEPTANCE_CHANGE = minor_cultural_acceptance_gain + ACCEPTANCE_DESC = cultural_acceptance_courtly_cousins + } + + stress_impact = { + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_energy = 0.5 + } + } + } + + # Two noble courts and not a sodding brain between them... + option = { + name = ep1_flavor.0021.c + + # Both courts gain dislike of each other. + custom_tooltip = ep1_flavor.0021.c.tt + ep1_flavour_0021_apply_mutual_court_opinions_effect = { + OPINION_TYPE = disgusted_opinion + OPINION_VALUE = ep1_flavour_0021_courts_lose_opinion_actual_value + } + # Look at making things a bit more tense. + ep1_flavour_0021_apply_mutual_cultural_dislike_effect = { + ACCEPTANCE_CHANGE = minor_cultural_acceptance_loss + ACCEPTANCE_DESC = cultural_acceptance_courtly_spelling_differences + } + # Gain a modifier for your troubles. + add_character_modifier = { + modifier = above_petty_differences_modifier + years = 10 + } + + stress_impact = { + cynical = miniscule_stress_impact_loss + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_sociability = -0.5 + ai_energy = -0.75 + } + } + } +} + +################################################## +# Fresh at Court +# by Ewan Cowhig Croft +# 0031 - 0040 +################################################## + +scripted_effect ep1_flavour_0031_give_random_inspiration_effect = { + # Sort out an appropriate tooltip. + ## One for scope:scholar_1. + if = { + limit = { $THIS$ = scope:scholar_1 } + custom_tooltip = ep1_flavor.0031.inspire.scholar_1.tt + } + ## And one for scope:scholar_2. + if = { + limit = { $THIS$ = scope:scholar_2 } + custom_tooltip = ep1_flavor.0031.inspire.scholar_2.tt + } + # We weight up the more bookish inspirations a bit. + hidden_effect = { + random_list = { + 300 = { create_inspiration = book_inspiration } + 200 = { create_inspiration = artisan_inspiration } + 200 = { create_inspiration = alchemy_inspiration } + 100 = { create_inspiration = weapon_inspiration } + 100 = { create_inspiration = armor_inspiration } + 100 = { create_inspiration = weaver_inspiration } + 100 = { create_inspiration = smith_inspiration } + 50 = { create_inspiration = adventure_inspiration } + 50 = { create_inspiration = bow_inspiration } + } + } +} + +scripted_effect ep1_flavour_0031_add_both_scholars_effect = { + # Add both scholars first-up. + add_courtier = scope:scholar_1 + add_courtier = scope:scholar_2 + # Well, this doesn't exactly paint your court in the best light. + change_current_court_grandeur = miniscule_court_grandeur_loss + # Buuuut it does make pepole think better of ye. + add_prestige = minor_prestige_gain +} + +scripted_effect ep1_flavour_031_add_scholars_stress_effect = { + stress_impact = { + drunkard = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = $STRESS_GAIN$ + temperate = $STRESS_GAIN$ + } +} + +# Several fresh young scholars are newly arrived at court & need guidance. +ep1_flavor.0031 = { + type = character_event + title = ep1_flavor.0031.t + desc = ep1_flavor.0031.desc + theme = learning + left_portrait = { + character = scope:scholar_1 + animation = worry + } + right_portrait = { + character = scope:scholar_2 + animation = personality_bold + } + override_background = { reference = tavern } + + cooldown = { years = 5 } + + trigger = { + # Standard checks. + has_royal_court = yes + has_dlc_feature = royal_court + is_available_at_peace_adult = yes + # Since this is a fairly scholar-specific thing, we restrict it to scholarly courts. + has_court_type = court_scholarly + } + + weight_multiplier = { + base = 1 + + # No court weighting, since we hard-restrict this to scholarly courts. + } + + immediate = { + # Create the two scholars. + ## First a scholar's scholar. + create_character = { + template = capital_scholar_character + location = root.capital_province + save_scope_as = scholar_1 + } + ## Then a writer. + create_character = { + template = capital_writer_character + location = root.capital_province + save_scope_as = scholar_2 + } + } + + # Down it, scope:scholar_1! + option = { + name = ep1_flavor.0031.a + + # Become friends with scope:scholar_1. + set_relation_friend = { reason = friend_drinking_together target = scope:scholar_1 } + # Give scope:scholar_1 an inspiration. + scope:scholar_1 = { + ep1_flavour_0031_give_random_inspiration_effect = { THIS = scope:scholar_1 } + } + # Gain both scholars. + ep1_flavour_0031_add_both_scholars_effect = yes + + # Stress impact handled in the effect. + ep1_flavour_031_add_scholars_stress_effect = { STRESS_GAIN = medium_stress_impact_gain } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 0.5 + } + } + } + + # We like to drink with scope:scholar_2, because scope:scholar_2 is our mate! + option = { + name = ep1_flavor.0031.b + + # Become friends with scope:scholar_2. + set_relation_friend = { reason = friend_drinking_together target = scope:scholar_1 } + # Give scope:scholar_2 an inspiration. + scope:scholar_2 = { + ep1_flavour_0031_give_random_inspiration_effect = { THIS = scope:scholar_2 } + } + # Gain both scholars. + ep1_flavour_0031_add_both_scholars_effect = yes + + # Stress impact handled in the effect. + ep1_flavour_031_add_scholars_stress_effect = { STRESS_GAIN = medium_stress_impact_gain } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 0.5 + } + } + } + + # There are some techniques that only experience can teach... + option = { + name = ep1_flavor.0031.c + flavor = ep1_flavor.0031.c.tt + trigger = { + OR = { + has_trait = scholar + has_trait = drunkard + } + } + trait = scholar + trait = drunkard + + # Become friends with *both* scholars. + set_relation_friend = { reason = friend_impressive_feat_of_alcoholism target = scope:scholar_1 } + set_relation_friend = { reason = friend_impressive_feat_of_alcoholism target = scope:scholar_2 } + # Plus, *both* get inspirations. + scope:scholar_1 = { + ep1_flavour_0031_give_random_inspiration_effect = { THIS = scope:scholar_1 } + } + scope:scholar_2 = { + ep1_flavour_0031_give_random_inspiration_effect = { THIS = scope:scholar_2 } + } + # Gain a modifier that loses you a little health for the weird concoction. + add_character_modifier = { + modifier = what_did_i_just_drink_modifier + years = 5 + } + # Gain both scholars. + ep1_flavour_0031_add_both_scholars_effect = yes + + # Stress impact handled in the effect. + ep1_flavour_031_add_scholars_stress_effect = { STRESS_GAIN = major_stress_impact_gain } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 1 + } + } + } + + # These rituals are unbecoming of the scholarly. + option = { + name = ep1_flavor.0031.d + + # The scholars are booted. + hidden_effect = { + scope:scholar_1 = { silent_disappearance_effect = yes } + scope:scholar_2 = { silent_disappearance_effect = yes } + } + # Gain a modifier making you out to be a bit of a miser, but a more learned one. + add_character_modifier = { + modifier = known_killjoy_modifier + years = 10 + } + # Gain a bunch of learning lifestyle XP. + add_learning_lifestyle_xp = major_lifestyle_xp + + stress_impact = { + shy = miniscule_stress_impact_loss + temperate = miniscule_stress_impact_loss + lifestyle_reveler = minor_stress_impact_gain + drunkard = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_sociability = -0.5 + } + } + } +} + + +################################################## +# Oltner + +scripted_trigger appropriate_eunuch_trigger = { + is_available_ai_adult = yes + is_eunuch_trigger = yes + NOT = { + has_relation_rival = root + } +} + +scripted_effect appoint_court_eunuch_effect = { + if = { + limit = { + culture = { has_cultural_parameter = can_appoint_chief_eunuch } + } + court_position_grant_effect = { + EMPLOYER = root + CANDIDATE = scope:eunuch_target + POS = chief_eunuch + } + } +} + +# A visiting Eunuch offers their services +ep1_flavor.1000 = { + type = character_event + title = ep1_flavor.1000.t + desc = ep1_flavor.1000.desc + theme = learning + override_background = { + reference = sitting_room + } + + cooldown = { + years = 10 + } + + left_portrait = { + character = scope:eunuch_target + animation = flirtation + } + + trigger = { + has_ep1_dlc_trigger = yes + is_landed_or_landless_administrative = yes + culture = { + OR = { + has_cultural_parameter = can_castrate_prisoners + has_cultural_parameter = eunuch_trait_bonuses + has_cultural_parameter = court_machinations_eunuch_trait_bonuses + has_cultural_parameter = can_appoint_chief_eunuch + } + } + is_available_at_peace_adult = yes + OR = { + is_ai = no + primary_title.tier > tier_duchy # So that we don't create too many characters for the AI (performance) + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.capital_province + appropriate_eunuch_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { + appropriate_eunuch_trigger = yes + } + save_scope_as = eunuch_target + } + } + else = { + # Find an appropriate culture for the Eunuch + if = { + limit = { + is_ai = no # This is gonna be expensive, exclude AI's + any_culture_global = { + has_cultural_parameter = can_castrate_prisoners + } + } + random_culture_global = { + limit = { + has_cultural_parameter = can_castrate_prisoners + } + weight = { # Upweight for your own culture if it's valid (more greeks in greece, but the potential for east africans to visit, etc) + base = 1 + modifier = { + add = 2 + this = root.culture + } + modifier = { + factor = 0 + this != root.culture + NOT = { + any_culture_county = { # This is the expensive part + title_province = { + squared_distance = { target = root.capital_province value < squared_distance_massive } + } + } + } + } + } + save_scope_as = eunuch_target_culture + } + } + else = { + root.culture = { + save_scope_as = eunuch_target_culture + } + } + create_character = { + location = root.capital_province + culture = scope:eunuch_target_culture + dynasty = none + template = random_learned_eunuch_character + save_scope_as = eunuch_target + } + } + + if = { # Find somewhere else for the eunuch to move if they do not get employment + limit = { + any_neighboring_and_across_water_top_liege_realm = { + always = yes + } + } + random_neighboring_and_across_water_top_liege_realm = { + save_scope_as = new_court + } + } + + if = { # Save old court eunuch if relevant + limit = { employs_court_position = chief_eunuch_court_position } + random_court_position_holder = { + type = chief_eunuch_court_position + save_scope_as = old_holder + } + } + } + + option = { # Accept the Eunuch's offer + name = ep1_flavor.1000.a + + pay_short_term_gold = { + target = scope:eunuch_target + gold = root.tiny_gold_value + } + + add_courtier = scope:eunuch_target + + appoint_court_eunuch_effect = yes + + scope:eunuch_target = { + add_opinion = { + target = root + opinion = 50 + modifier = grateful_opinion + } + add_character_flag = { + flag = blocked_from_leaving + years = 25 + } + } + + stress_impact = { + greedy = massive_stress_impact_gain + paranoid = major_stress_gain + arrogant = major_stress_impact_gain + fickle = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_greed >= low_positive_ai_value + } + } + } + + option = { # Negotiate with the eunuch + name = ep1_flavor.1000.b + + duel = { + skill = diplomacy + value = 12 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + + desc = ep1_flavor.1000.c.success + send_interface_toast = { + title = ep1_flavor.1000.c.success + left_icon = scope:eunuch_target + + add_courtier = scope:eunuch_target + appoint_court_eunuch_effect = yes + add_prestige = minor_prestige_gain + scope:eunuch_target = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 0 + REASON = friend_court_position_recieved + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep1_flavor.1000.c.failure + send_interface_toast = { + title = ep1_flavor.1000.c.failure + left_icon = scope:eunuch_target + + add_prestige = minor_prestige_loss + scope:eunuch_target = { + hidden_effect = { + random = { + chance = 50 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + } + } + } + + custom_tooltip = eunuch_moves_tt + + hidden_effect = { + scope:eunuch_target = { + if = { + limit = { + exists = scope:new_court + } + move_to_pool_at = scope:new_court.holder.capital_county.title_province + } + } + } + } + } + } + + stress_impact = { + generous = medium_stress_impact_gain + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_sociability >= low_positive_ai_value + } + } + } + + option = { # Deny the eunuch + name = ep1_flavor.1000.c + + custom_tooltip = eunuch_moves_tt + + hidden_effect = { + scope:eunuch_target = { + if = { + limit = { + exists = scope:new_court + } + move_to_pool_at = scope:new_court.holder.capital_county.title_province + } + } + } + + stress_impact = { + diligent = massive_stress_impact_gain + gregarious = major_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.1 + ai_greed <= low_positive_ai_value + } + } + } +} + +# A learned eunuch wishes to sell various tips & tricks +ep1_flavor.1200 = { + type = character_event + title = ep1_flavor.1200.t + desc = ep1_flavor.1200.desc + theme = intrigue + + cooldown = { + years = 30 + } + + left_portrait = { + character = scope:eunuch_target + animation = personality_rational + } + + trigger = { + has_ep1_dlc_trigger = yes + is_landed_or_landless_administrative = yes + culture = { + OR = { + has_cultural_parameter = can_castrate_prisoners + has_cultural_parameter = eunuch_trait_bonuses + has_cultural_parameter = court_machinations_eunuch_trait_bonuses + has_cultural_parameter = can_appoint_chief_eunuch + } + } + is_available_at_peace_adult = yes + OR = { + is_ai = no + primary_title.tier > tier_duchy # So that we don't create too many characters for the AI (performance) + } + OR = { # Performance + is_ai = no + any_courtier_or_guest = { + appropriate_eunuch_trigger = yes + } + } + } + + immediate = { + if = { + limit = { + any_courtier_or_guest = { + appropriate_eunuch_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + appropriate_eunuch_trigger = yes + } + assign_quirk_effect = yes + save_scope_as = eunuch_target + } + } + else_if = { + limit = { + any_pool_character = { + province = root.capital_province + appropriate_eunuch_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { + appropriate_eunuch_trigger = yes + } + assign_quirk_effect = yes + save_scope_as = eunuch_target + } + } + else = { + # Find an appropriate culture for the Eunuch + if = { + limit = { + is_ai = no # This is gonna be expensive, exclude AI's + any_culture_global = { + has_cultural_parameter = can_castrate_prisoners + } + } + random_culture_global = { + limit = { + has_cultural_parameter = can_castrate_prisoners + } + weight = { # Upweight for your own culture if it's valid (more greeks in greece, but the potential for east africans to visit, etc) + base = 1 + modifier = { + add = 2 + this = root.culture + } + modifier = { + factor = 0 + this != root.culture + NOT = { + any_culture_county = { # This is the expensive part + title_province = { + squared_distance = { target = root.capital_province value < squared_distance_massive } + } + } + } + } + } + save_scope_as = eunuch_target_culture + } + } + else = { + root.culture = { + save_scope_as = eunuch_target_culture + } + } + create_character = { + location = root.capital_province + culture = scope:eunuch_target_culture + dynasty = none + template = random_learned_eunuch_character + save_scope_as = eunuch_target + } + } + } + + option = { # Boost to learning languages + name = ep1_flavor.1200.a + + pay_short_term_gold = { + target = scope:eunuch_target + gold = root.tiny_gold_value + } + + add_character_modifier = { + modifier = secrets_of_language_modifier + years = 15 + } + + stress_impact = { + greedy = massive_stress_impact_gain + paranoid = major_stress_gain + arrogant = major_stress_impact_gain + fickle = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = ai_sociability + } + } + } + + option = { # Hostile Scheme boost + name = ep1_flavor.1200.b + + pay_short_term_gold = { + target = scope:eunuch_target + gold = root.tiny_gold_value + } + + add_character_modifier = { + modifier = secrets_of_murder_modifier + years = 15 + } + + stress_impact = { + forgiving = massive_stress_impact_gain + compassionate = major_stress_gain + content = major_stress_impact_gain + humble = medium_stress_impact_gain + calm = medium_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = ai_vengefulness + } + } + } + + option = { # Stewardship tips + name = ep1_flavor.1200.c + + pay_short_term_gold = { + target = scope:eunuch_target + gold = root.tiny_gold_value + } + + add_character_modifier = { + modifier = secrets_of_the_realm_modifier + years = 15 + } + + stress_impact = { + lazy = massive_stress_impact_gain + impatient = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # No, thank you + name = ep1_flavor.1200.d + + scope:eunuch_target = { + add_opinion = { + target = root + opinion = -15 + modifier = disappointed_opinion + } + hidden_effect = { + random = { + chance = 50 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + } + } + } + + stress_impact = { + diligent = massive_stress_impact_gain + gregarious = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = ai_energy + ai_energy <= 0 + } + } + } +} + + +################################################## +# Joe + +################################################## +# 2000 - 2999 +################################################## + +######################### +# Martial Exercises # +# by Joe Parkin # +######################### + +scripted_trigger ep1_flavor_2000_maa_scope_trigger = { + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:$TYPE$ + } + NAND = { + exists = scope:maa_type_2 + scope:maa_type_2 = flag:$TYPE$ + } +} + +scripted_effect ep1_flavor_2000_maa_scope_effect = { + if = { + limit = { + NOT = { exists = scope:maa_type_1 } + } + save_scope_value_as = { + name = maa_type_1 + value = flag:$TYPE$ + } + } + else_if = { + limit = { + NOT = { exists = scope:maa_type_2 } + } + save_scope_value_as = { + name = maa_type_2 + value = flag:$TYPE$ + } + } +} + +# Positive opinion modifiers for all vassal/courtier characters of root culture (they like you respecting their cultural MAA) +scripted_effect ep1_flavor_2000_culture_opinion_effect = { + every_vassal_or_below = { + custom = ep1_flavor.2000.culture_tt + limit = { + culture = root.culture + NOR = { + AND = { + exists = scope:knight_scope + this = scope:knight_scope + } + AND = { + exists = scope:marshal_scope + this = scope:marshal_scope + } + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + hidden_effect = { + every_courtier = { + limit = { + culture = root.culture + NOR = { + AND = { + exists = scope:knight_scope + this = scope:knight_scope + } + AND = { + exists = scope:marshal_scope + this = scope:marshal_scope + } + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + } +} + +# Apply correct modifier and opinion boosts based on selected MAA type +scripted_effect ep1_flavor_2000_type_effect = { + switch = { + trigger = scope:$TYPE$ + flag:archers = { + add_character_modifier = { + modifier = ep1_2000_archer_modifier + years = 10 + } + if = { + limit = { + culture = { culture_has_archer_maa = yes } + } + ep1_flavor_2000_culture_opinion_effect = yes # Applies opinion modifiers to all vassal/courtier characters of root culture + } + } + flag:infantry = { + add_character_modifier = { + modifier = ep1_2000_infantry_modifier + years = 10 + } + if = { + limit = { + OR = { + culture = { culture_has_heavy_infantry_maa = yes } + culture = { culture_has_pikemen_maa = yes } + } + } + ep1_flavor_2000_culture_opinion_effect = yes # Applies opinion modifiers to all vassal/courtier characters of root culture + } + } + flag:cavalry = { + add_character_modifier = { + modifier = ep1_2000_cavalry_modifier + years = 10 + } + if = { + limit = { + OR = { + culture = { culture_has_light_cavalry_maa = yes } + culture = { culture_has_heavy_cavalry_maa = yes } + } + } + ep1_flavor_2000_culture_opinion_effect = yes # Applies opinion modifiers to all vassal/courtier characters of root culture + } + } + flag:archer_cavalry = { + add_character_modifier = { + modifier = ep1_2000_acavalry_modifier + years = 10 + } + if = { + limit = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + mpo_can_recruit_nomad_maa_trigger = yes + } + } + ep1_flavor_2000_culture_opinion_effect = yes + } + } + flag:skirmishers = { + add_character_modifier = { + modifier = ep1_2000_skirmisher_modifier + years = 10 + } + if = { + limit = { + culture = { culture_has_skirmisher_maa = yes } + } + ep1_flavor_2000_culture_opinion_effect = yes # Applies opinion modifiers to all vassal/courtier characters of root culture + } + } + flag:elephant_cavalry = { + add_character_modifier = { + modifier = ep1_2000_ecavalry_modifier + years = 10 + } + } + flag:camel_cavalry = { + add_character_modifier = { + modifier = ep1_2000_ccavalry_modifier + years = 10 + } + } + flag:levies = { + add_character_modifier = { + modifier = ep1_2000_levies_modifier + years = 10 + } + } + } +} + +ep1_flavor.2000 = { + type = character_event + title = ep1_flavor.2000.t + desc = { + desc = ep1_flavor.2000.desc_intro + first_valid = { + triggered_desc = { + trigger = { scope:maa_type_1 = flag:archers } + desc = ep1_flavor.2000.desc_archers + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:infantry } + desc = ep1_flavor.2000.desc_infantry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:cavalry } + desc = ep1_flavor.2000.desc_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:archer_cavalry } + desc = ep1_flavor.2000.desc_archer_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:elephant_cavalry } + desc = ep1_flavor.2000.desc_elephant_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:camel_cavalry } + desc = ep1_flavor.2000.camel_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:levies } + desc = ep1_flavor.2000.desc_levies + } + } + desc = ep1_flavor.2000.desc_bridge + first_valid = { + triggered_desc = { + trigger = { scope:maa_type_2 = flag:archers } + desc = ep1_flavor.2000.desc_archers + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:infantry } + desc = ep1_flavor.2000.desc_infantry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:cavalry } + desc = ep1_flavor.2000.desc_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:archer_cavalry } + desc = ep1_flavor.2000.desc_archer_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:elephant_cavalry } + desc = ep1_flavor.2000.desc_elephant_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:camel_cavalry } + desc = ep1_flavor.2000.camel_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:levies } + desc = ep1_flavor.2000.desc_levies + } + } + desc = ep1_flavor.2000.desc_outro + } + theme = martial + override_background = { reference = army_camp } + cooldown = { years = 10 } + left_portrait = { + character = scope:knight_scope + animation = throne_room_two_handed_passive_1 + } + right_portrait = { + character = cp:councillor_marshal + animation = marshal + } + + trigger = { + has_ep1_dlc_trigger = yes + has_royal_court = yes + has_dlc_feature = royal_court + is_landed_or_landless_administrative = yes + is_available_adult = yes + exists = cp:councillor_marshal + any_knight = { + count >= 1 + is_available_ai_adult = yes + NOT = { this = root.cp:councillor_marshal } + } + OR = { + OR = { + culture = { culture_has_archer_maa = yes } + number_maa_regiments_of_base_type = { type = archers value > 0 } + } + OR = { + culture = { culture_has_light_cavalry_maa = yes } + culture = { culture_has_heavy_cavalry_maa = yes } + number_maa_regiments_of_base_type = { type = light_cavalry value > 0 } + number_maa_regiments_of_base_type = { type = heavy_cavalry value > 0 } + } + OR = { + culture = { culture_has_heavy_infantry_maa = yes } + culture = { culture_has_pikemen_maa = yes } + number_maa_regiments_of_base_type = { type = heavy_infantry value > 0 } + number_maa_regiments_of_base_type = { type = pikemen value > 0 } + + } + OR = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + mpo_can_recruit_nomad_maa_trigger = yes + } + number_maa_regiments_of_base_type = { type = archer_cavalry value > 0 } + } + OR = { + culture = { culture_has_skirmisher_maa = yes } + number_maa_regiments_of_base_type = { type = skirmishers value > 0 } + } + number_maa_regiments_of_base_type = { type = elephant_cavalry value > 0 } + number_maa_regiments_of_base_type = { type = camel_cavalry value > 0 } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + cp:councillor_marshal = { save_scope_as = marshal_scope } + ordered_knight = { + limit = { + is_available_ai_adult = yes + this != scope:marshal_scope + } + order_by = prowess + save_scope_as = knight_scope + } + hidden_effect = { + while = { + count = 3 + random_list = { + 10 = { # archers + trigger = { + OR = { + number_maa_regiments_of_base_type = { type = archers value > 0 } + culture = { culture_has_archer_maa = yes } + } + ep1_flavor_2000_maa_scope_trigger = { TYPE = archers } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = archers value > 4 } + } + ep1_flavor_2000_maa_scope_effect = { TYPE = archers } + } + 10 = { # infantry + trigger = { + OR = { + number_maa_regiments_of_base_type = { type = heavy_infantry value > 0 } + number_maa_regiments_of_base_type = { type = pikemen value > 0 } + culture = { culture_has_heavy_infantry_maa = yes } + culture = { culture_has_pikemen_maa = yes } + } + ep1_flavor_2000_maa_scope_trigger = { TYPE = infantry } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = heavy_infantry value > 4 } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = pikemen value > 4 } + } + ep1_flavor_2000_maa_scope_effect = { TYPE = infantry } + } + 10 = { # cavalry + trigger = { + OR = { + number_maa_regiments_of_base_type = { type = light_cavalry value > 0 } + number_maa_regiments_of_base_type = { type = heavy_cavalry value > 0 } + culture = { culture_has_light_cavalry_maa = yes } + culture = { culture_has_heavy_cavalry_maa = yes } + } + ep1_flavor_2000_maa_scope_trigger = { TYPE = cavalry } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = light_cavalry value > 4 } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = heavy_cavalry value > 4 } + } + ep1_flavor_2000_maa_scope_effect = { TYPE = cavalry } + } + 10 = { # archer_cavalry + trigger = { + OR = { + number_maa_regiments_of_base_type = { type = archer_cavalry value > 0 } + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + mpo_can_recruit_nomad_maa_trigger = yes + } + } + ep1_flavor_2000_maa_scope_trigger = { TYPE = archer_cavalry } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = archer_cavalry value > 4 } + } + ep1_flavor_2000_maa_scope_effect = { TYPE = archer_cavalry } + } + 10 = { # skirmishers + trigger = { + OR = { + number_maa_regiments_of_base_type = { type = skirmishers value > 0 } + culture = { culture_has_skirmisher_maa = yes } + } + ep1_flavor_2000_maa_scope_trigger = { TYPE = skirmishers } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = skirmishers value > 4 } + } + ep1_flavor_2000_maa_scope_effect = { TYPE = skirmishers } + } + 10 = { # elephant_cavalry + trigger = { + number_maa_regiments_of_base_type = { type = elephant_cavalry value > 0 } + ep1_flavor_2000_maa_scope_trigger = { TYPE = elephant_cavalry } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = elephant_cavalry value > 4 } + } + ep1_flavor_2000_maa_scope_effect = { TYPE = elephant_cavalry } + } + 10 = { # camel_cavalry + trigger = { + number_maa_regiments_of_base_type = { type = camel_cavalry value > 0 } + ep1_flavor_2000_maa_scope_trigger = { TYPE = camel_cavalry } + } + modifier = { + factor = 2 + number_maa_regiments_of_base_type = { type = camel_cavalry value > 4 } + } + ep1_flavor_2000_maa_scope_effect = { TYPE = camel_cavalry } + } + 1 = { # levies + trigger = { + ep1_flavor_2000_maa_scope_trigger = { TYPE = levies } + } + ep1_flavor_2000_maa_scope_effect = { TYPE = levies } + } + } + } + } + } + + option = { # First type + name = { + trigger = { scope:maa_type_1 = flag:archers } + text = ep1_flavor.2000.archers + } + name = { + trigger = { + scope:maa_type_1 = flag:archers + culture = { has_cultural_tradition = tradition_longbow_competitions } + } + text = ep1_flavor.2000.archers_longbow + } + name = { + trigger = { scope:maa_type_1 = flag:infantry } + text = ep1_flavor.2000.infantry + } + name = { + trigger = { scope:maa_type_1 = flag:cavalry } + text = ep1_flavor.2000.cavalry + } + name = { + trigger = { + scope:maa_type_1 = flag:cavalry + OR = { + culture = culture:french + culture = { has_cultural_tradition = tradition_chivalry } + } + } + text = ep1_flavor.2000.cavalry_joust + } + name = { + trigger = { + scope:maa_type_1 = flag:cavalry + OR = { + culture = { has_cultural_pillar = heritage_byzantine } + is_roman_emperor_trigger = yes + } + } + text = ep1_flavor.2000.cavalry_tzykanion + } + name = { + trigger = { + scope:maa_type_1 = flag:cavalry + OR = { + culture = { has_cultural_pillar = heritage_iranian } + has_title = title:e_persia #Must be the current emperor. + } + } + text = ep1_flavor.2000.cavalry_chovgan + } + name = { + trigger = { scope:maa_type_1 = flag:archer_cavalry } + text = ep1_flavor.2000.archer_cavalry + } + name = { + trigger = { scope:maa_type_1 = flag:skirmishers } + text = ep1_flavor.2000.skirmishers + } + name = { + trigger = { scope:maa_type_1 = flag:elephant_cavalry } + text = ep1_flavor.2000.elephant_cavalry + } + name = { + trigger = { scope:maa_type_1 = flag:camel_cavalry } + text = ep1_flavor.2000.camel_cavalry + } + name = { + trigger = { scope:maa_type_1 = flag:levies } + text = ep1_flavor.2000.levies + } + name = { + trigger = { + scope:maa_type_1 = flag:levies + culture = { has_cultural_pillar = heritage_goidelic } + } + text = ep1_flavor.2000.levies_caid + } + # Costs + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + remove_treasury_or_gold = medium_treasury_or_gold_value + # Effects + ep1_flavor_2000_type_effect = { TYPE = maa_type_1 } # Add relevant modifier and cultural opinion if relevant + scope:marshal_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + scope:knight_scope = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + ai_rationality = 0.5 + } + modifier = { + factor = 2 + OR = { + has_relation_friend = scope:marshal_scope + has_relation_rival = scope:knight_scope + } + } + } + } + + option = { # Second type + name = { # Archers + trigger = { scope:maa_type_2 = flag:archers } + text = ep1_flavor.2000.archers + } + name = { # Longbowmen - welsh + trigger = { + scope:maa_type_2 = flag:archers + culture = { has_cultural_tradition = tradition_longbow_competitions } + } + text = ep1_flavor.2000.archers_longbow + } + name = { # Infantry + trigger = { scope:maa_type_2 = flag:infantry } + text = ep1_flavor.2000.infantry + } + name = { # Cavalry + trigger = { scope:maa_type_2 = flag:cavalry } + text = ep1_flavor.2000.cavalry + } + name = { # Joust - chivalry + trigger = { + scope:maa_type_2 = flag:cavalry + OR = { + culture = culture:french + culture = { has_cultural_tradition = tradition_chivalry } + } + } + text = ep1_flavor.2000.cavalry_joust + } + name = { # Tyzkanion - byzaboo + trigger = { + scope:maa_type_2 = flag:cavalry + OR = { + culture = { has_cultural_pillar = heritage_byzantine } + is_roman_emperor_trigger = yes + } + } + text = ep1_flavor.2000.cavalry_tzykanion + } + name = { # Chovgan - parsi + trigger = { + scope:maa_type_2 = flag:cavalry + OR = { + culture = { has_cultural_pillar = heritage_iranian } + has_title = title:e_persia #Must be the current emperor. + } + } + text = ep1_flavor.2000.cavalry_chovgan + } + name = { # Horse archers + trigger = { scope:maa_type_2 = flag:archer_cavalry } + text = ep1_flavor.2000.archer_cavalry + } + name = { # Skirmishers + trigger = { scope:maa_type_2 = flag:skirmishers } + text = ep1_flavor.2000.skirmishers + } + name = { # Elephantry + trigger = { scope:maa_type_2 = flag:elephant_cavalry } + text = ep1_flavor.2000.elephant_cavalry + } + name = { # Camelry + trigger = { scope:maa_type_2 = flag:camel_cavalry } + text = ep1_flavor.2000.camel_cavalry + } + name = { # Peasants + trigger = { scope:maa_type_2 = flag:levies } + text = ep1_flavor.2000.levies + } + name = { # Caid - gaelic + trigger = { + scope:maa_type_2 = flag:levies + culture = { has_cultural_pillar = heritage_goidelic } + } + text = ep1_flavor.2000.levies_caid + } + # Costs + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + remove_treasury_or_gold = medium_treasury_or_gold_value + # Effects + ep1_flavor_2000_type_effect = { TYPE = maa_type_2 } # Add relevant modifier and cultural opinion if relevant + scope:marshal_scope = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:knight_scope = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + ai_rationality = 0.5 + } + modifier = { + factor = 2 + OR = { + has_relation_friend = scope:knight_scope + has_relation_rival = scope:marshal_scope + } + } + } + } + + option = { # Hunting is the best sport + name = ep1_flavor.2000.c + # Costs + remove_treasury_or_gold = medium_treasury_or_gold_value + stress_impact = { + humble = medium_stress_impact_gain + lazy = medium_stress_impact_gain + greedy = major_stress_impact_gain + lifestyle_hunter = medium_stress_impact_loss + athletic = minor_stress_impact_loss + } + # Effects + add_character_modifier = { + modifier = ep1_2000_knights_modifier + years = 5 + } + if = { + limit = { + culture = { + OR = { + has_cultural_tradition = tradition_hunters + has_cultural_tradition = tradition_sacred_hunts + } + } + } + custom_tooltip = ep1_flavor.2000.tradition_tt + ep1_flavor_2000_culture_opinion_effect = yes + } + else = { + every_knight = { + custom = ep1_flavor.2000.knight_tt + limit = { + NOR = { + this = scope:knight_scope + this = scope:marshal_scope + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 5 + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -2 + ai_boldness = 1 + ai_energy = 1 + } + modifier = { + factor = 2 + OR = { + has_trait = lifestyle_hunter + has_trait = athletic + } + } + } + } + + option = { # Too expensive + name = ep1_flavor.2000.d + # Costs + change_current_court_grandeur = minor_court_grandeur_loss + scope:marshal_scope = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:knight_scope = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + stress_impact = { + generous = medium_stress_impact_gain + athletic = medium_stress_impact_gain + lifestyle_hunter = medium_stress_impact_gain + improvident = medium_stress_impact_gain + profligate = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = -1 + } + modifier = { + factor = 0.5 + OR = { + has_trait = lifestyle_hunter + has_trait = athletic + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = improvident + has_trait = profligate + } + } + } + } +} + +######################### +# Court of Vipers # +# by Joe Parkin # +######################### + +# Councillor exists and is not already saved +scripted_trigger ep1_flavor_councillor_scope_trigger = { + exists = cp:councillor_$ROLE$ + NAND = { + exists = scope:councillor_1 + scope:councillor_1 = cp:councillor_$ROLE$ + } +} + +# Scheme is secret and hostile +scripted_trigger ep1_flavor_2010_base_scheme_trigger = { + scheme_owner.liege = root + is_hostile = yes + is_scheme_exposed = no +} + +# Scheme is above and contains a single councillor from event +scripted_trigger ep1_flavor_2010_councillor_scheme_trigger = { + ep1_flavor_2010_base_scheme_trigger = yes # Scheme is secret and hostile + OR = { # Only 1 councillor in a plot against you + AND = { + scheme_owner = { is_in_list = ep1_2010_list } + any_scheme_agent_character = { + count = 0 + is_in_list = ep1_2010_list + } + } + any_scheme_agent_character = { + count = 1 + is_in_list = ep1_2010_list + } + } +} + +# Character is not involved in plot already +scripted_trigger ep1_flavor_2010_real_plot_involvement_trigger = { + AND = { + exists = scope:real_plot + OR = { + this = scope:real_plot.scheme_owner + scope:real_plot = { scheme_is_character_agent = prev } + } + } +} + +# Character is not involved in event already +scripted_trigger ep1_flavor_2010_scapegoat_trigger = { + is_adult = yes + NOR = { + ep1_flavor_2010_real_plot_involvement_trigger = yes + AND = { + exists = scope:real_plot_revealer + this = scope:real_plot_revealer + } + AND = { + exists = scope:fake_plot_revealer_1 + this = scope:fake_plot_revealer_1 + } + AND = { + exists = scope:fake_plot_revealer_2 + this = scope:fake_plot_revealer_2 + } + AND = { + exists = scope:scapegoat_1 + this = scope:scapegoat_1 + } + } +} + +# Save scopes and add to list dynamically +scripted_effect ep1_flavor_2010_councillor_scope_effect = { + if = { + limit = { + NOT = { exists = scope:councillor_1 } + } + save_scope_as = councillor_1 + } + else = { save_scope_as = councillor_2 } + add_to_list = ep1_2010_list +} + +# Imprison selected character, and notify if it was the right one +scripted_effect ep1_flavor_2010_imprison_effect = { + if = { + limit = { $COUNCILLOR$ = scope:real_plot_revealer } + scope:real_plotter = { save_scope_as = accused } + } + else_if = { + limit = { $COUNCILLOR$ = scope:fake_plot_revealer_1 } + scope:scapegoat_1 = { save_scope_as = accused } + } + else_if = { + limit = { $COUNCILLOR$ = scope:fake_plot_revealer_2 } + scope:scapegoat_2 = { save_scope_as = accused } + } + rightfully_imprison_character_effect = { + TARGET = scope:accused + IMPRISONER = root + } + random_list = { + 2 = { + desc = ep1_flavor.2010.guilty + show_chance = no + modifier = { + trigger = { + scope:real_plotter != scope:accused + } + factor = 0 + } + send_interface_toast = { + title = ep1_flavor.2010.guilty + left_icon = scope:accused + hidden_effect = { + scope:real_plot = { + expose_scheme = yes + expose_scheme_agent = scope:real_plotter + } + } + add_prestige = minor_prestige_gain + change_current_court_grandeur = miniscule_court_grandeur_gain + } + } + 2 = { + desc = ep1_flavor.2010.innocent + show_chance = no + modifier = { + trigger = { scope:real_plotter = scope:accused } + factor = 0 + } + send_interface_toast = { + title = ep1_flavor.2010.innocent + left_icon = scope:accused + add_tyranny = minor_tyranny_gain + change_current_court_grandeur = miniscule_court_grandeur_loss + } + } + } +} + +ep1_flavor.2010 = { + type = character_event + title = ep1_flavor.2010.t + desc = { + desc = ep1_flavor.2010.desc + # Spymaster + first_valid = { + triggered_desc = { #Real + trigger = { scope:spymaster = scope:real_plot_revealer } + desc = ep1_flavor.2010.desc_spy_real + } + triggered_desc = { #Fake 1 + trigger = { scope:spymaster = scope:fake_plot_revealer_1 } + desc = ep1_flavor.2010.desc_spy_1 + } + triggered_desc = { #Fake 2 + trigger = { scope:spymaster = scope:fake_plot_revealer_2 } + desc = ep1_flavor.2010.desc_spy_2 + } + } + # Councillor 1 + first_valid = { + triggered_desc = { #Real + trigger = { scope:councillor_1 = scope:real_plot_revealer } + desc = ep1_flavor.2010.desc_1_real + } + triggered_desc = { #Fake 1 + trigger = { scope:councillor_1 = scope:fake_plot_revealer_1 } + desc = ep1_flavor.2010.desc_1_1 + } + triggered_desc = { #Fake 2 + trigger = { scope:councillor_1 = scope:fake_plot_revealer_2 } + desc = ep1_flavor.2010.desc_1_2 + } + } + # Councillor 2 + first_valid = { + triggered_desc = { #Real + trigger = { scope:councillor_2 = scope:real_plot_revealer } + desc = ep1_flavor.2010.desc_2_real + } + triggered_desc = { #Fake 1 + trigger = { scope:councillor_2 = scope:fake_plot_revealer_1 } + desc = ep1_flavor.2010.desc_2_1 + } + triggered_desc = { #Fake 2 + trigger = { scope:councillor_2 = scope:fake_plot_revealer_2 } + desc = ep1_flavor.2010.desc_2_2 + } + } + # Context + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:real_plotter = { is_close_family_of = root } + scope:scapegoat_1 = { is_close_family_of = root } + scope:scapegoat_2 = { is_close_family_of = root } + } + } + desc = ep1_flavor.2010.desc_family + } + triggered_desc = { + trigger = { + OR = { + scope:real_plotter = { is_consort_of = root } + scope:scapegoat_1 = { is_consort_of = root } + scope:scapegoat_2 = { is_consort_of = root } + } + } + desc = ep1_flavor.2010.desc_consort + } + triggered_desc = { + trigger = { + OR = { + scope:real_plotter = { is_councillor_of = root } + scope:scapegoat_1 = { is_councillor_of = root } + scope:scapegoat_2 = { is_councillor_of = root } + } + } + desc = ep1_flavor.2010.desc_councillor + } + desc = ep1_flavor.2010.desc_fallback + } + desc = ep1_flavor.2010.desc_outro + } + theme = intrigue + cooldown = { years = 10 } + left_portrait = { + character = scope:spymaster + animation = spymaster + } + lower_left_portrait = { + character = scope:councillor_1 + } + lower_center_portrait = { + character = scope:councillor_2 + } + + trigger = { + is_ai = no # Murder schemes are heavy for performance + has_ep1_dlc_trigger = yes + is_landed_or_landless_administrative = yes + has_royal_court = yes + has_dlc_feature = royal_court + is_available_adult = yes + exists = cp:councillor_spymaster + cp:councillor_spymaster = { is_available_ai_adult = yes } + calc_true_if = { + amount >= 2 + AND = { + exists = cp:councillor_chancellor + cp:councillor_chancellor = { is_available_ai_adult = yes } + } + AND = { + exists = cp:councillor_marshal + cp:councillor_marshal = { is_available_ai_adult = yes } + } + AND = { + exists = cp:councillor_steward + cp:councillor_steward = { is_available_ai_adult = yes } + } + AND = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + } + any_courtier = { + is_available_ai_adult = yes + can_start_scheme = { + type = murder + target_character = root + } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + # save 3 councillors + cp:councillor_spymaster = { + save_scope_as = spymaster + add_to_list = ep1_2010_list + } + hidden_effect = { + while = { + count = 2 + random_list = { + 2 = { + trigger = { # Councillor exists and is not already saved + ep1_flavor_councillor_scope_trigger = { ROLE = chancellor } + } + modifier = { + factor = 4 + cp:councillor_chancellor = { + is_scheming_against = { target = root } + } + } + cp:councillor_chancellor = { ep1_flavor_2010_councillor_scope_effect = yes } + } + 2 = { + trigger = { # Councillor exists and is not already saved + ep1_flavor_councillor_scope_trigger = { ROLE = marshal } + } + modifier = { + factor = 4 + cp:councillor_marshal = { + is_scheming_against = { target = root } + } + } + cp:councillor_marshal = { ep1_flavor_2010_councillor_scope_effect = yes } + } + 2 = { + trigger = { # Councillor exists and is not already saved + ep1_flavor_councillor_scope_trigger = { ROLE = steward } + } + modifier = { + factor = 4 + cp:councillor_steward = { + is_scheming_against = { target = root } + } + } + cp:councillor_steward = { ep1_flavor_2010_councillor_scope_effect = yes } + } + 1 = { + trigger = { # Councillor exists and is not already saved + ep1_flavor_councillor_scope_trigger = { ROLE = court_chaplain } + } + modifier = { + factor = 4 + cp:councillor_court_chaplain = { + is_scheming_against = { target = root } + } + } + cp:councillor_court_chaplain = { ep1_flavor_2010_councillor_scope_effect = yes } + } + } + } + } + # find hostile scheme that does involve councillor as an agent + if = { + limit = { + any_targeting_scheme = { ep1_flavor_2010_councillor_scheme_trigger = yes } + } + ordered_targeting_scheme = { + limit = { ep1_flavor_2010_councillor_scheme_trigger = yes } + order_by = scheme_phase_duration + save_scope_as = real_plot + } + random_in_list = { + list = ep1_2010_list + limit = { ep1_flavor_2010_real_plot_involvement_trigger = yes } + save_scope_as = real_plotter + } + } + # find hostile scheme that does not involve councillor as an agent + else_if = { + limit = { # Scheme is secret and hostile + any_targeting_scheme = { ep1_flavor_2010_base_scheme_trigger = yes } + } + ordered_targeting_scheme = { + limit = { ep1_flavor_2010_base_scheme_trigger = yes } + order_by = scheme_phase_duration + save_scope_as = real_plot + scheme_owner = { save_scope_as = real_plotter } + } + } + # create hostile scheme via a random courtier + else = { + random_courtier = { + limit = { + is_available_ai_adult = yes + can_start_scheme = { + type = murder + target_character = root + } + } + weight = { + modifier = { + factor = 10 + has_relation_rival = root + } + modifier = { + factor = 4 + opinion = { + target = root + value < 0 + } + } + modifier = { + factor = 2 + opinion = { + target = root + value < 50 + } + } + } + save_scope_as = plotter + hidden_effect = { + start_scheme = { + target_character = root + type = murder + } + } + random_scheme = { + type = murder + limit = { + scheme_target_character = root + } + save_scope_as = real_plot + scheme_owner = { save_scope_as = real_plotter } + } + } + } + # Save councillor roles in event + random_in_list = { + list = ep1_2010_list + limit = { ep1_flavor_2010_real_plot_involvement_trigger = no } + save_scope_as = real_plot_revealer + } + random_in_list = { + list = ep1_2010_list + limit = { + NOT = { scope:real_plot_revealer ?= this } + } + save_scope_as = fake_plot_revealer_1 + } + random_in_list = { + list = ep1_2010_list + limit = { + NOR = { + scope:real_plot_revealer ?= this + scope:fake_plot_revealer_1 ?= this + } + } + save_scope_as = fake_plot_revealer_2 + } + random_courtier = { + limit = { ep1_flavor_2010_scapegoat_trigger = yes } + weight = { + modifier = { + factor = 4 + trigger = { + any_in_list = { + list = ep1_2010_list + ep1_flavor_2010_real_plot_involvement_trigger = yes + } + } + is_councillor = yes + } + } + save_scope_as = scapegoat_1 + } + random_vassal_or_below = { + limit = { ep1_flavor_2010_scapegoat_trigger = yes } + weight = { + modifier = { + factor = 4 + trigger = { + any_in_list = { + list = ep1_2010_list + ep1_flavor_2010_real_plot_involvement_trigger = yes + } + } + is_councillor = yes + } + } + save_scope_as = scapegoat_2 + } + } + + option = { # Spymaster + name = { + trigger = { scope:spymaster = scope:real_plot_revealer } + text = ep1_flavor.2010.a.real + } + name = { + trigger = { scope:spymaster = scope:fake_plot_revealer_1 } + text = ep1_flavor.2010.a.fake_1 + } + name = { + trigger = { scope:spymaster = scope:fake_plot_revealer_2 } + text = ep1_flavor.2010.a.fake_2 + } + ep1_flavor_2010_imprison_effect = { COUNCILLOR = scope:spymaster } + stress_impact = { + just = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + } + } + + option = { # Councillor 1 + name = { + trigger = { scope:councillor_1 = scope:real_plot_revealer } + text = ep1_flavor.2010.b.real + } + name = { + trigger = { scope:councillor_1 = scope:fake_plot_revealer_1 } + text = ep1_flavor.2010.b.fake_1 + } + name = { + trigger = { scope:councillor_1 = scope:fake_plot_revealer_2 } + text = ep1_flavor.2010.b.fake_2 + } + ep1_flavor_2010_imprison_effect = { COUNCILLOR = scope:councillor_1 } + stress_impact = { + just = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + } + } + + option = { # Councillor 2 + name = { + trigger = { scope:councillor_2 = scope:real_plot_revealer } + text = ep1_flavor.2010.c.real + } + name = { + trigger = { scope:councillor_2 = scope:fake_plot_revealer_1 } + text = ep1_flavor.2010.c.fake_1 + } + name = { + trigger = { scope:councillor_2 = scope:fake_plot_revealer_2 } + text = ep1_flavor.2010.c.fake_2 + } + ep1_flavor_2010_imprison_effect = { COUNCILLOR = scope:councillor_2 } + stress_impact = { + just = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + } + } + + option = { # Untangle the truth + name = ep1_flavor.2010.d + duel = { + skill = intrigue + value = high_skill_rating + 60 = { + desc = ep1_flavor.2010.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + min = 10 + custom_tooltip = ep1_flavor.2010.d.success_tt + hidden_effect = { + send_interface_toast = { + title = ep1_flavor.2010.d.success + left_icon = root + scope:real_plot = { + expose_scheme = yes + expose_scheme_agent = scope:real_plotter + } + rightfully_imprison_character_effect = { + TARGET = scope:real_plotter + IMPRISONER = root + } + show_as_tooltip = { + add_prestige = medium_prestige_gain + change_current_court_grandeur = minor_court_grandeur_gain + } + } + } + add_prestige = medium_prestige_gain + change_current_court_grandeur = minor_court_grandeur_gain + } + 40 = { + desc = ep1_flavor.2010.d.failure + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + min = 10 + send_interface_toast = { + title = ep1_flavor.2010.d.failure + left_icon = root + add_prestige = medium_prestige_loss + change_current_court_grandeur = minor_court_grandeur_loss + add_character_modifier = { + modifier = ep1_2010_failure_modifier + years = 5 + } + } + } + } + stress_impact = { + arbitrary = medium_stress_impact_gain + lazy = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + ai_compassion = 1 + } + } + } +} + +######################### +# Interservice Rivalry # +# by Joe Parkin # +######################### + +# Save scopes and add to list dynamically +scripted_effect ep1_flavor_2020_maa_type_scope_effect = { + if = { + limit = { + NOT = { exists = scope:maa_type_1 } + } + save_scope_value_as = { name = maa_type_1 value = flag:$TYPE$ } + } + else = { + save_scope_value_as = { name = maa_type_2 value = flag:$TYPE$ } + } +} + +# Applies correct modifier based on relevant MAA (saved in event) +scripted_effect ep1_flavor_2020_modifier_effect = { + if = { + limit = { scope:$TYPE$ = flag:archers } + add_character_modifier = { + modifier = ep1_flavor_2020_archers_modifier + years = 5 + } + } + else_if = { + limit = { scope:$TYPE$ = flag:light_cavalry } + add_character_modifier = { + modifier = ep1_flavor_2020_light_cavalry_modifier + years = 5 + } + } + else_if = { + limit = { scope:$TYPE$ = flag:heavy_infantry } + add_character_modifier = { + modifier = ep1_flavor_2020_heavy_infantry_modifier + years = 5 + } + } + else_if = { + limit = { scope:$TYPE$ = flag:pikemen } + add_character_modifier = { + modifier = ep1_flavor_2020_pikemen_modifier + years = 5 + } + } + else_if = { + limit = { scope:$TYPE$ = flag:heavy_cavalry } + add_character_modifier = { + modifier = ep1_flavor_2020_heavy_cavalry_modifier + years = 5 + } + } + else_if = { + limit = { scope:$TYPE$ = flag:archer_cavalry } + add_character_modifier = { + modifier = ep1_flavor_2020_archer_cavalry_modifier + years = 5 + } + } + else_if = { + limit = { scope:$TYPE$ = flag:skirmishers } + add_character_modifier = { + modifier = ep1_flavor_2020_skirmishers_modifier + years = 5 + } + } + else_if = { + limit = { scope:$TYPE$ = flag:elephant_cavalry } + add_character_modifier = { + modifier = ep1_flavor_2020_elephant_cavalry_modifier + years = 5 + } + } + else_if = { + limit = { scope:$TYPE$ = flag:camel_cavalry } + add_character_modifier = { + modifier = ep1_flavor_2020_camel_cavalry_modifier + years = 5 + } + } +} + +ep1_flavor.2020 = { + type = character_event + title = ep1_flavor.2020.t + desc = { + desc = ep1_flavor.2020.desc + first_valid = { + triggered_desc = { + trigger = { scope:maa_type_1 = flag:archers } + desc = ep1_flavor.2020.desc_knight_1_archers + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:light_cavalry } + desc = ep1_flavor.2020.desc_knight_1_light_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:heavy_infantry } + desc = ep1_flavor.2020.desc_knight_1_heavy_infantry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:pikemen } + desc = ep1_flavor.2020.desc_knight_1_pikemen + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:heavy_cavalry } + desc = ep1_flavor.2020.desc_knight_1_heavy_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:archer_cavalry } + desc = ep1_flavor.2020.desc_knight_1_archer_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:skirmishers } + desc = ep1_flavor.2020.desc_knight_1_skirmishers + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:elephant_cavalry } + desc = ep1_flavor.2020.desc_knight_1_elephant_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_1 = flag:camel_cavalry } + desc = ep1_flavor.2020.desc_knight_1_camel_cavalry + } + } + desc = ep1_flavor.2020.desc_bridge + first_valid = { + triggered_desc = { + trigger = { scope:maa_type_2 = flag:archers } + desc = ep1_flavor.2020.desc_knight_2_archers + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:light_cavalry } + desc = ep1_flavor.2020.desc_knight_2_light_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:heavy_infantry } + desc = ep1_flavor.2020.desc_knight_2_heavy_infantry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:pikemen } + desc = ep1_flavor.2020.desc_knight_2_pikemen + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:heavy_cavalry } + desc = ep1_flavor.2020.desc_knight_2_heavy_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:archer_cavalry } + desc = ep1_flavor.2020.desc_knight_2_archer_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:skirmishers } + desc = ep1_flavor.2020.desc_knight_2_skirmishers + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:elephant_cavalry } + desc = ep1_flavor.2020.desc_knight_2_elephant_cavalry + } + triggered_desc = { + trigger = { scope:maa_type_2 = flag:camel_cavalry } + desc = ep1_flavor.2020.desc_knight_2_camel_cavalry + } + } + } + theme = martial + override_background = { reference = army_camp } + cooldown = { years = 10 } + left_portrait = { + character = scope:knight_1 + animation = disapproval + } + right_portrait = { + character = scope:knight_2 + animation = marshal + } + + trigger = { + has_ep1_dlc_trigger = yes + has_royal_court = yes + has_dlc_feature = royal_court + is_landed_or_landless_administrative = yes + is_available_adult = yes + number_of_maa_regiments > 0 + calc_true_if = { + amount >= 2 + number_maa_regiments_of_base_type = { type = archers value > 0 } + number_maa_regiments_of_base_type = { type = light_cavalry value > 0 } + number_maa_regiments_of_base_type = { type = heavy_infantry value > 0 } + number_maa_regiments_of_base_type = { type = pikemen value > 0 } + number_maa_regiments_of_base_type = { type = heavy_cavalry value > 0 } + number_maa_regiments_of_base_type = { type = archer_cavalry value > 0 } + number_maa_regiments_of_base_type = { type = skirmishers value > 0 } + number_maa_regiments_of_base_type = { type = elephant_cavalry value > 0 } + number_maa_regiments_of_base_type = { type = camel_cavalry value > 0 } + } + any_knight = { + count >= 2 + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + hidden_effect = { + while = { + count = 2 + ordered_knight = { + limit = { + is_available_ai_adult = yes + NAND = { + exists = scope:knight_1 + THIS = scope:knight_1 + } + } + order_by = prowess + if = { + limit = { + NOT = { exists = scope:knight_1 } + } + save_scope_as = knight_1 + } + else = { save_scope_as = knight_2 } + } + } + while = { + count = 2 + random_list = { + 2 = { # archers + trigger = { + number_maa_regiments_of_base_type = { type = archers value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:archers + } + } + modifier = { + factor = 10 + culture = { culture_has_archer_maa = yes } + } + ep1_2020_maa_regiment_modifier = { TYPE = archers } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = archers } + } + 2 = { # light_cavalry + trigger = { + number_maa_regiments_of_base_type = { type = light_cavalry value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:light_cavalry + } + } + modifier = { + factor = 10 + culture = { culture_has_light_cavalry_maa = yes } + } + ep1_2020_maa_regiment_modifier = { TYPE = light_cavalry } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = light_cavalry } + } + 2 = { # heavy_infantry + trigger = { + number_maa_regiments_of_base_type = { type = heavy_infantry value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:heavy_infantry + } + } + modifier = { + factor = 10 + culture = { culture_has_heavy_infantry_maa = yes } + } + ep1_2020_maa_regiment_modifier = { TYPE = heavy_infantry } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = heavy_infantry } + } + 2 = { # pikemen + trigger = { + number_maa_regiments_of_base_type = { type = pikemen value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:pikemen + } + } + ep1_2020_maa_regiment_modifier = { TYPE = pikemen } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = pikemen } + + } + 2 = { # heavy_cavalry + trigger = { + number_maa_regiments_of_base_type = { type = heavy_cavalry value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:heavy_cavalry + } + } + modifier = { + factor = 10 + culture = { culture_has_heavy_cavalry_maa = yes } + } + ep1_2020_maa_regiment_modifier = { TYPE = heavy_cavalry } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = heavy_cavalry } + } + 2 = { # archer_cavalry + trigger = { + number_maa_regiments_of_base_type = { type = archer_cavalry value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:archer_cavalry + } + } + modifier = { + factor = 10 + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + mpo_can_recruit_nomad_maa_trigger = yes + } + } + ep1_2020_maa_regiment_modifier = { TYPE = archer_cavalry } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = archer_cavalry } + } + 2 = { # skirmishers + trigger = { + number_maa_regiments_of_base_type = { type = skirmishers value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:skirmishers + } + } + modifier = { + factor = 10 + culture = { culture_has_skirmisher_maa = yes } + } + ep1_2020_maa_regiment_modifier = { TYPE = skirmishers } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = skirmishers } + } + 2 = { # elephant_cavalry + trigger = { + number_maa_regiments_of_base_type = { type = elephant_cavalry value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:elephant_cavalry + } + } + ep1_2020_maa_regiment_modifier = { TYPE = elephant_cavalry } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = elephant_cavalry } + } + 2 = { # camel_cavalry + trigger = { + number_maa_regiments_of_base_type = { type = camel_cavalry value > 0 } + NAND = { + exists = scope:maa_type_1 + scope:maa_type_1 = flag:camel_cavalry + } + } + ep1_2020_maa_regiment_modifier = { TYPE = camel_cavalry } + ep1_flavor_2020_maa_type_scope_effect = { TYPE = camel_cavalry } + } + } + } + + } + } + + option = { # Side with 1st + name = ep1_flavor.2020.a + ep1_flavor_2020_modifier_effect = { TYPE = maa_type_1 } # Applies modifier based on relevant MAA type + scope:knight_1 = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + progress_towards_rival_effect = { + REASON = rival_snubbed_maa + CHARACTER = scope:knight_2 + OPINION = 0 + } + } + scope:knight_2 = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + if = { + limit = { has_relation_rival = scope:knight_1 } + stress_impact = { + base = medium_stress_impact_gain + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = 0.5 + } + modifier = { + factor = 1.5 + opinion = { target = scope:knight_1 value > 25 } + } + modifier = { + factor = 0 + has_relation_rival = scope:knight_1 + } + } + stress_impact = { + just = minor_stress_impact_gain + calm = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + } + + option = { # Side with 2nd + name = ep1_flavor.2020.b + ep1_flavor_2020_modifier_effect = { TYPE = maa_type_2 } # Applies modifier based on relevant MAA type + scope:knight_2 = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + progress_towards_rival_effect = { + REASON = rival_snubbed_maa + CHARACTER = scope:knight_1 + OPINION = 0 + } + } + scope:knight_1 = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + } + if = { + limit = { has_relation_rival = scope:knight_2 } + stress_impact = { + base = medium_stress_impact_gain + } + } + stress_impact = { + just = minor_stress_impact_gain + calm = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = 0.5 + } + modifier = { + factor = 1.5 + opinion = { target = scope:knight_2 value > 25 } + } + modifier = { + factor = 0 + has_relation_rival = scope:knight_2 + } + } + } + + option = { # Side with neither + name = ep1_flavor.2020.c + duel = { + skill = martial + target = scope:knight_1 + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + desc = ep1_flavor.2020.c.success + send_interface_toast = { + title = ep1_flavor.2020.c.success + left_icon = scope:knight_1 + right_icon = scope:knight_2 + add_character_modifier = { + modifier = ep1_flavor_2020_both_modifier + years = 5 + } + scope:knight_1 = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + scope:knight_2 = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + } + } + 3 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + desc = ep1_flavor.2020.c.failure + send_interface_toast = { + title = ep1_flavor.2020.c.failure + left_icon = scope:knight_1 + right_icon = scope:knight_2 + add_prestige = minor_prestige_loss + scope:knight_1 = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + scope:knight_2 = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = -1 + } + modifier = { + factor = 0.5 + martial < average_skill_rating + } + modifier = { + factor = 2 + martial > average_skill_rating + } + } + } + + option = { # Chastise + name = ep1_flavor.2020.d + add_prestige = minor_prestige_loss + scope:knight_1 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + scope:knight_2 = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + stress_impact = { + brave = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + } + } + } +} + +######################### +# Exotic Arms # +# by Joe Parkin # +######################### + +scripted_trigger ep1_flavor_2040_foreign_holder_trigger = { + NOR = { + has_variable = exotic_arms_cooldown + this = prev + in_diplomatic_range = prev + } + has_royal_court = yes + has_dlc_feature = royal_court + is_landed_or_landless_administrative = yes + is_available_adult = yes + gold >= major_gold_value +} + +scripted_trigger ep1_flavor_2040_artifact_trigger = { + is_equipped = no + artifact_durability >= 25 + AND = { + has_variable = quality + var:quality >= 33 + } + AND = { + has_variable = wealth + var:wealth >= 33 + } + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + } +} + +scripted_effect ep1_flavor_2040_artifact_effect = { + dummy_female = { save_scope_as = dummy_gender } + ## Chance for artifact to be bad + random = { + chance = 40 + save_scope_value_as = { + name = exotic_blade_quality + value = no + } + } + random_list = { + 2 = { + create_artifact_weapon_effect = { + OWNER = scope:exotic_blade_holder + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:no + } + } + 2 = { + create_artifact_armor_effect = { + OWNER = scope:exotic_blade_holder + CREATOR = scope:dummy_gender + SET_ARMOR_TYPE = flag:no + } + } + } + ## Create Merchant + scope:exotic_arms_target = { + if = { + limit = { + any_character_to_title_neighboring_and_across_water_county = { + NOT = { + culture = { this = scope:exotic_arms_target.culture } + } + } + } + random_character_to_title_neighboring_and_across_water_county = { + limit = { + NOT = { + culture = { this = scope:exotic_arms_target.culture } + } + } + save_scope_as = merchant_county + } + } + else = { + random_independent_ruler = { + limit = { + in_diplomatic_range = root + any_realm_county = { + NOT = { + culture = { this = scope:exotic_arms_target.culture } + } + } + } + random_realm_county = { + limit = { + NOT = { + culture = { this = scope:exotic_arms_target.culture } + } + } + save_scope_as = merchant_county + } + } + } + } + create_character = { + template = foreign_merchant_template + location = scope:exotic_arms_target.capital_province + save_scope_as = foreign_merchant + } + if = { + limit = { exists = scope:newly_created_artifact } + scope:newly_created_artifact = { save_scope_as = exotic_blade } + } +} + +scripted_effect ep1_flavor_2040_transfer_effect = { + if = { + limit = { exists = scope:exotic_blade_quality } + send_interface_toast = { + title = ep1_flavor.2040.toast_poor + left_icon = scope:exotic_blade + scope:exotic_blade = { + set_owner = { + target = scope:exotic_arms_target + history = { + location = scope:exotic_arms_target.capital_province + actor = scope:foreign_merchant + recipient = scope:exotic_arms_target + type = given + } + } + } + } + } + else = { + send_interface_toast = { + title = ep1_flavor.2040.toast + left_icon = scope:exotic_blade + scope:exotic_blade = { + set_owner = { + target = scope:exotic_arms_target + history = { + location = scope:exotic_arms_target.capital_province + actor = scope:foreign_merchant + recipient = scope:exotic_arms_target + type = given + } + } + } + } + } +} + +ep1_flavor.2040 = { + type = character_event + title = ep1_flavor.2040.t + desc = { + desc = ep1_flavor.2040.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:my_artifact } + desc = ep1_flavor.2040.desc.artifact + } + desc = ep1_flavor.2040.desc.gold + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:antiquarian } + desc = { + desc = ep1_flavor.2040.desc.outro_antiquarian + first_valid = { + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian.aptitude:court_tutor_court_position >= 4 + } + desc = ep1_flavor.2040.desc.outro_good_praise + } + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian.aptitude:court_tutor_court_position = 3 + } + desc = ep1_flavor.2040.desc.outro_good_unsure + } + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian.aptitude:court_tutor_court_position <= 2 + } + desc = ep1_flavor.2040.desc.outro_good_warning + } + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian.aptitude:court_tutor_court_position >= 4 + exists = scope:exotic_blade_quality + } + desc = ep1_flavor.2040.desc.outro_bad_warning + } + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian.aptitude:court_tutor_court_position = 3 + exists = scope:exotic_blade_quality + } + desc = ep1_flavor.2040.desc.outro_bad_unsure + } + triggered_desc = { + trigger = { + exists = scope:antiquarian + scope:antiquarian.aptitude:court_tutor_court_position <= 2 + exists = scope:exotic_blade_quality + } + desc = ep1_flavor.2040.desc.outro_bad_praise + } + } + } + } + desc = ep1_flavor.2040.desc.outro + } + } + theme = martial + left_portrait = { + character = scope:antiquarian + animation = worry + } + right_portrait = { + character = scope:foreign_merchant + animation = admiration + } + + immediate = { + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + is_available_ai_adult = yes + type = antiquarian_court_position + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = antiquarian + } + } + ## Save own artifact if exists + if = { + limit = { + any_character_artifact = { ep1_flavor_2040_artifact_trigger = yes } + } + random_character_artifact = { + limit = { ep1_flavor_2040_artifact_trigger = yes } + save_scope_as = my_artifact + } + } + } + + option = { + name = ep1_flavor.2040.a + trigger = { exists = scope:my_artifact } + custom_tooltip = ep1_flavor.2040.tt_my + custom_tooltip = ep1_flavor.2040.tt_exotic + hidden_effect = { + ep1_flavor_2040_transfer_effect = yes + scope:my_artifact = { + set_owner = { + target = scope:foreign_merchant + history = { + location = scope:exotic_arms_target.capital_province + actor = scope:exotic_arms_target + recipient = scope:foreign_merchant + type = purchased + } + } + set_owner = { + target = scope:exotic_blade_holder + history = { + location = scope:exotic_blade_holder.capital_province + actor = scope:foreign_merchant + recipient = scope:exotic_blade_holder + type = purchased + } + } + } + } + stress_impact = { + greedy = major_stress_impact_gain + arrogant = major_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 2 + } + } + } + + option = { + name = ep1_flavor.2040.b + trigger = { + NOT = { exists = scope:my_artifact } + } + remove_short_term_gold = major_gold_value + custom_tooltip = ep1_flavor.2040.tt_exotic + hidden_effect = { ep1_flavor_2040_transfer_effect = yes } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 2 + } + modifier = { + factor = 0 + gold <= major_gold_value + } + } + } + + option = { + name = ep1_flavor.2040.c + stress_impact = { + profligate = medium_stress_impact_gain + trusting = medium_stress_impact_gain + improvident = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 4 + } + } + } + + after = { + scope:foreign_merchant = { silent_disappearance_effect = yes } + } +} + +ep1_flavor.2041 = { + type = character_event + hidden = yes + cooldown = { years = 10 } + + trigger = { + has_ep1_dlc_trigger = yes + has_royal_court = yes + has_dlc_feature = royal_court + is_ai = yes + is_landed_or_landless_administrative = yes + any_character_with_royal_court = { ep1_flavor_2040_foreign_holder_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + primary_title.tier = tier_empire + } + } + + immediate = { + save_scope_as = exotic_blade_holder + random_character_with_royal_court = { + limit = { ep1_flavor_2040_foreign_holder_trigger = yes } + weight = { + base = 1 + modifier = { + add = 10 + is_ai = no + } + modifier = { + add = 1 + has_court_type = court_warlike + } + modifier = { + add = 2 + any_character_artifact = { ep1_flavor_2040_artifact_trigger = yes } + } + } + save_scope_as = exotic_arms_target + set_variable = { + name = exotic_arms_cooldown + years = 50 + } + } + ep1_flavor_2040_artifact_effect = yes + scope:exotic_arms_target = { + trigger_event = { + id = ep1_flavor.2040 + days = 1 + } + } + } +} + +######################### +# Academic Disagreement # +# by Joe Parkin # +######################### + +scripted_trigger ep1_flavor_2070_foreign_court_trigger = { + this != root + in_diplomatic_range = root + faith = { + faith_hostility_level = { + target = root.faith + value < faith_hostile_level + } + } + save_temporary_scope_as = symposium_ruler_temp + root = { + faith = { + faith_hostility_level = { + target = scope:symposium_ruler_temp.faith + value < faith_hostile_level + } + } + } +} + +ep1_flavor.2070 = { + type = character_event + title = ep1_flavor.2070.t + desc = { + desc = ep1_flavor.2070.desc.intro + first_valid = { + triggered_desc = { # Theological + trigger = { + OR = { + scope:symposium_scholar = { is_theological_character_trigger = yes } + scope:symposium_courtier = { is_theological_character_trigger = yes } + } + } + desc = { + first_valid = { + triggered_desc = { # Same faith same culture + trigger = { + scope:symposium_scholar.faith = scope:symposium_courtier.faith + scope:symposium_scholar.culture = scope:symposium_courtier.culture + + } + desc = ep1_flavor.2070.desc.theo_same_faith + } + triggered_desc = { # Same faith diff culture + trigger = { scope:symposium_scholar.faith = scope:symposium_courtier.faith } + desc = ep1_flavor.2070.desc.theo_same_faith_diff_cult + } + triggered_desc = { # Same religion + trigger = { + scope:symposium_scholar.religion = scope:symposium_courtier.religion + scope:symposium_scholar.faith != scope:symposium_courtier.faith + } + desc = ep1_flavor.2070.desc.theo_same_relig + } + triggered_desc = { # Different religion + trigger = { + scope:symposium_scholar.religion != scope:symposium_courtier.religion + } + desc = ep1_flavor.2070.desc.theo_diff_relig + } + } + } + } + triggered_desc = { # Mystic + trigger = { + scope:symposium_scholar = { has_trait = lifestyle_mystic } + NOT = { + scope:symposium_courtier = { has_trait = lifestyle_mystic } + } + } + desc = ep1_flavor.2070.desc.mystic + } + triggered_desc = { # Medicine + trigger = { + OR = { + scope:symposium_scholar = { has_trait = lifestyle_physician } + scope:symposium_courtier = { has_trait = lifestyle_physician } + } + } + desc = ep1_flavor.2070.desc.medicine + } + triggered_desc = { # Culture + trigger = { scope:symposium_scholar.culture = scope:symposium_courtier.culture } + desc = ep1_flavor.2070.desc.ling_same_cult + } + triggered_desc = { # Language + trigger = { + scope:symposium_scholar.culture != scope:symposium_courtier.culture + scope:symposium_scholar.culture = { has_same_culture_language = scope:symposium_courtier.culture } + } + desc = ep1_flavor.2070.desc.ling_diff_cult + } + triggered_desc = { # Diff language + trigger = { + NOT = { + scope:symposium_scholar.culture = { has_same_culture_language = scope:symposium_courtier.culture } + } + } + desc = ep1_flavor.2070.desc.ling_diff_lang + } + random_valid = { # Fallback + desc = ep1_flavor.2070.desc.fall_alchemy + desc = ep1_flavor.2070.desc.fall_stars + desc = ep1_flavor.2070.desc.fall_books + } + } + } + theme = learning + cooldown = { years = 10 } + left_portrait = { + character = scope:symposium_courtier + animation = personality_rational + } + right_portrait = { + character = scope:symposium_scholar + animation = schadenfreude + } + + trigger = { + has_ep1_dlc_trigger = yes + has_royal_court = yes + has_dlc_feature = royal_court + is_landed_or_landless_administrative = yes + is_available_adult = yes + any_character_with_royal_court = { ep1_flavor_2070_foreign_court_trigger = yes } + any_vassal_or_below = { learning >= 6 } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + culture = { save_scope_as = ling_cul_1 } + every_vassal_or_below = { + limit = { learning >= 15 } + alternative_limit = { learning >= 10 } + alternative_limit = { learning >= 6 } + add_to_list = symposium_list + } + random_in_list = { + list = symposium_list + limit = { learning >= 15 } + alternative_limit = { learning >= 10 } + alternative_limit = { learning >= 6 } + weight = { + modifier = { + factor = 2 + is_powerful_vassal = yes + } + } + save_scope_as = symposium_courtier + } + random_character_with_royal_court = { + limit = { ep1_flavor_2070_foreign_court_trigger = yes } + weight = { + modifier = { + factor = 2 + primary_title.tier = tier_empire + } + } + save_scope_as = symposium_ruler + } + scope:symposium_ruler.culture = { save_scope_as = ling_cul_2 } + linguist_bonus_culture_effect = { CULTURE = ling_cul_1 } + linguist_bonus_culture_effect = { CULTURE = ling_cul_2 } + create_character = { + dynasty = none + location = root.capital_province + template = symposium_template + save_scope_as = symposium_scholar + } + } + + option = { + name = ep1_flavor.2070.a + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + pay_short_term_gold = { + target = scope:symposium_scholar + gold = medium_gold_value + } + add_courtier = scope:symposium_scholar + hidden_effect = { + scope:symposium_scholar = { return_to_court = yes } + } + reverse_add_opinion = { + target = scope:symposium_courtier + modifier = angry_opinion + opinion = -15 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 0.5 + ai_rationality = 1 + } + } + } + + option = { + name = { + trigger = { + NOT = { + scope:symposium_scholar.culture = { has_same_culture_language = scope:symposium_courtier.culture } + } + root = { knows_language_of_culture = scope:symposium_scholar.culture } + } + text = ep1_flavor.2070.c.lang + } + name = { + trigger = { always = yes } + text = ep1_flavor.2070.c + } + stress_impact = { + humble = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + duel = { + skill = learning + target = scope:symposium_scholar + 4 = { + desc = ep1_flavor.2070.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + modifier = { + add = 1 + has_trait = scholar + } + modifier = { + add = 4 + NOT = { + scope:symposium_scholar.culture = { has_same_culture_language = scope:symposium_courtier.culture } + } + root = { knows_language_of_culture = scope:symposium_scholar.culture } + } + min = 5 + send_interface_toast = { + title = ep1_flavor.2070.c.success + left_icon = scope:symposium_scholar + right_icon = scope:symposium_courtier + add_learning_lifestyle_xp = medium_lifestyle_xp + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:symposium_courtier + modifier = impressed_opinion + opinion = 10 + } + custom_tooltip = ep1_flavor.2070.c.tt + hidden_effect = { + random_list = { + 2 = { + send_interface_toast = { + title = ep1_flavor.2070.c.success + left_icon = scope:symposium_scholar + add_courtier = scope:symposium_scholar + } + } + 2 = { + send_interface_toast = { + title = ep1_flavor.2070.c.failure + left_icon = scope:symposium_scholar + show_as_tooltip = { + scope:symposium_ruler = { add_courtier = scope:symposium_scholar } + } + } + } + } + } + } + } + 6 = { + desc = ep1_flavor.2070.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + min = 10 + send_interface_toast = { + title = ep1_flavor.2070.c.failure + left_icon = scope:symposium_scholar + right_icon = scope:symposium_courtier + add_prestige = medium_prestige_loss + reverse_add_opinion = { + target = scope:symposium_courtier + modifier = disappointed_opinion + opinion = -10 + } + show_as_tooltip = { + scope:symposium_ruler = { add_courtier = scope:symposium_scholar } + } + } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 1 + ai_compassion = -0.5 + ai_rationality = 1 + } + } + } + + option = { + name = ep1_flavor.2070.d + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + shy = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + add_prestige = minor_prestige_loss + reverse_add_opinion = { + target = scope:symposium_courtier + modifier = grateful_opinion + opinion = 5 + } + show_as_tooltip = { + scope:symposium_ruler = { add_courtier = scope:symposium_scholar } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -1 + ai_rationality = -0.5 + } + } + } + + option = { + name = ep1_flavor.2070.e + trigger = { + OR = { + OR = { + scope:symposium_scholar = { is_theological_character_trigger = yes } + scope:symposium_courtier = { is_theological_character_trigger = yes } + } + AND = { + scope:symposium_scholar = { has_trait = lifestyle_mystic } + NOT = { has_trait = lifestyle_mystic } + } + } + has_trait = zealous + } + add_learning_skill = -1 + add_piety = medium_piety_gain + stress_impact = { + zealous = medium_stress_impact_loss + } + show_as_tooltip = { + scope:symposium_ruler = { add_courtier = scope:symposium_scholar } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = -1 + ai_rationality = -1 + } + } + } + + after = { + hidden_effect = { + scope:symposium_ruler = { + if = { + limit = { + scope:symposium_scholar.employer != root + } + add_courtier = scope:symposium_scholar + } + } + scope:symposium_scholar = { return_to_court = yes } + } + } +} + +######################### +# The Greater Good # +# by Joe Parkin # +######################### + +ep1_flavor.2060 = { + type = character_event + title = ep1_flavor.2060.t + desc = ep1_flavor.2060.desc + theme = intrigue + cooldown = { years = 10 } + left_portrait = { + character = scope:detective_scope + animation = worry + } + right_portrait = { + character = scope:grocer_scope + animation = scheme + } + lower_right_portrait = { + character = scope:victim_scope + outfit_tags = { beggar_rags } + } + + trigger = { + has_ep1_dlc_trigger = yes + has_royal_court = yes + has_dlc_feature = royal_court + is_landed_or_landless_administrative = yes + is_available_adult = yes + # Victim + any_pool_guest = { + is_lowborn = yes + is_married = no + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + # Detective + create_character = { + age = { 30 35 } + dynasty = none + faith = root.capital_county.faith + culture = root.capital_county.culture + location = root.capital_province + # Education + random_traits_list = { + count = 1 + education_martial_2 = {} + education_martial_3 = {} + } + # Personality + trait = brave + trait = diligent + trait = compassionate + trait = intellect_good_1 + # Misc + random_traits = no + gender_female_chance = root_faith_dominant_gender_female_chance + # Skills + diplomacy = { min_template_low_skill max_template_decent_skill } + martial = { min_template_low_skill max_template_decent_skill } + stewardship = { min_template_low_skill max_template_decent_skill } + intrigue = { min_template_low_skill max_template_decent_skill } + learning = { min_template_low_skill max_template_decent_skill } + prowess = { min_template_low_skill max_template_decent_skill } + save_scope_as = detective_scope + } + # Grocer + create_character = { + age = { 50 55 } + dynasty = none + faith = root.capital_county.faith + culture = root.capital_county.culture + location = root.capital_province + # Education + random_traits_list = { + count = 1 + education_intrigue_2 = {} + education_intrigue_3 = {} + } + # Personality + trait = deceitful + trait = callous + trait = arrogant + # Misc + random_traits = no + gender_female_chance = root_faith_dominant_gender_female_chance + # Skills + diplomacy = { min_template_low_skill max_template_decent_skill } + martial = { min_template_low_skill max_template_decent_skill } + stewardship = { min_template_low_skill max_template_decent_skill } + intrigue = { min_template_low_skill max_template_low_skill } + learning = { min_template_low_skill max_template_decent_skill } + prowess = { min_template_low_skill max_template_decent_skill } + save_scope_as = grocer_scope + } + scope:grocer_scope = { + add_character_flag = { + flag = use_stealth_clothes + days = 1 + } + } + # Victim + random_pool_guest = { + limit = { + is_lowborn = yes + is_married = no + } + save_scope_as = victim_scope + } + hidden_effect = { + scope:victim_scope = { + death = { + death_reason = death_disappearance + killer = scope:grocer_scope + } + } + scope:grocer_scope = { + add_secret = { + type = secret_murder + target = scope:victim_scope + } + } + } + custom_tooltip = ep1_flavor.2060.death_tt + random_realm_province = { + limit = { + county != root.capital_county + has_holding_type = city_holding + } + alternative_limit = { has_holding_type = city_holding } + alternative_limit = { always = yes } + save_scope_as = sandford_scope + } + } + + option = { + name = ep1_flavor.2060.a + add_prestige = medium_prestige_loss + scope:detective_scope = { silent_disappearance_effect = yes } + custom_tooltip = ep1_flavor.2060.a.tt + change_current_court_grandeur = minor_court_grandeur_loss + every_pool_guest = { + custom = custom.every_guest + move_to_pool = yes + } + stress_impact = { + paranoid = medium_stress_impact_gain + diligent = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + impatient = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = -1 + ai_energy = -1 + } + } + } + + option = { + name = ep1_flavor.2060.b + hidden_effect = { + scope:victim_scope = { set_killer_public = yes } + } + send_interface_toast = { + title = ep1_flavor.2060.b.title + left_icon = scope:detective_scope + right_icon = scope:grocer_scope + show_as_tooltip = { + imprison = { + target = scope:grocer_scope + type = dungeon + } + } + add_courtier = scope:detective_scope + } + hidden_effect = { + scope:grocer_scope = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:victim_scope + } + expose_secret = scope:detective_scope + } + } + rightfully_imprison_character_effect = { + TARGET = scope:grocer_scope + IMPRISONER = root + } + } + scope:detective_scope = { + hidden_effect = { return_to_court = yes } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + callous = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + ai_boldness = 1 + } + } + } + + option = { + name = ep1_flavor.2060.c + send_interface_toast = { + title = ep1_flavor.2060.c.title + left_icon = scope:grocer_scope + right_icon = scope:detective_scope + scope:detective_scope = { + death = { + death_reason = death_disappearance + killer = root + } + } + add_courtier = scope:grocer_scope + } + add_secret = { + type = secret_murder + target = scope:detective_scope + } + random_secret = { + type = secret_murder + limit = { + secret_target = scope:detective_scope + } + reveal_to = scope:grocer_scope + } + scope:grocer_scope = { + hidden_effect = { return_to_court = yes } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + hidden_effect = { + scope:grocer_scope = { + random_secret = { + type = secret_murder + limit = { + secret_target = scope:victim_scope + } + reveal_to = root + } + } + } + } + change_current_court_grandeur = minor_court_grandeur_gain + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + humble = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + ai_value_modifier = { + ai_compassion = -1 + ai_honor = -1 + ai_boldness = 1 + } + } + } +} + +######################### +# Taking Sides # +# by Joe Parkin # +######################### + +# Save scopes and add to list dynamically +scripted_effect ep1_flavor_2030_local_dispute_scope_effect = { + if = { + limit = { + NOT = { exists = scope:local_dispute_1 } + } + save_scope_as = local_dispute_1 + if = { + limit = { is_landed_or_landless_administrative = yes } + capital_province.county = { save_scope_as = local_county_1 } + } + else = { + root = { + random_sub_realm_county = { + weight = { + modifier = { + factor = 5 + culture = scope:local_dispute_1.culture + } + modifier = { + factor = 5 + faith = scope:local_dispute_1.faith + } + modifier = { + factor = 0.1 + this = root.capital_province.county + } + } + save_scope_as = local_county_1 + } + } + } + } + else_if = { + limit = { + exists = scope:local_dispute_1 + this != scope:local_dispute_1 + } + save_scope_as = local_dispute_2 + if = { + limit = { is_landed_or_landless_administrative = yes } + capital_province.county = { save_scope_as = local_county_2 } + } + else = { + root = { + random_sub_realm_county = { + weight = { + modifier = { + factor = 5 + culture = scope:local_dispute_2.culture + } + modifier = { + factor = 5 + faith = scope:local_dispute_2.faith + } + modifier = { + factor = 0.1 + this = root.capital_province.county + } + modifier = { + factor = 0.1 + exists = scope:local_county_1 + this = scope:local_county_1 + } + } + save_scope_as = local_county_2 + } + } + } + } +} + +scripted_effect ep1_flavor_2030_option_effect = { + scope:local_county_$WIN$ = { + add_county_modifier = { + modifier = ep1_flavor_2030_positive_modifier + years = 5 + } + } + scope:local_county_$LOSE$ = { + add_county_modifier = { + modifier = ep1_flavor_2030_negative_modifier + years = 5 + } + } + scope:local_dispute_$WIN$ = { + if = { + limit = { + NOT = { is_in_list = generated_dispute_characters } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + } + scope:local_dispute_$LOSE$ = { + if = { + limit = { + NOT = { is_in_list = generated_dispute_characters } + } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } +} + +scripted_effect ep1_flavor_2030_boon_effect = { + switch = { + trigger = scope:taking_sides_boon_$NUM$ + 0 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_1_modifier + years = 5 + } + } + 1 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_2_modifier + years = 5 + } + } + 2 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_3_modifier + years = 5 + } + } + 3 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_4_modifier + years = 5 + } + } + 4 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_5_modifier + years = 5 + } + } + 5 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_6_modifier + years = 5 + } + } + 6 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_7_modifier + years = 5 + } + } + 7 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_8_modifier + years = 5 + } + } + 8 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_9_modifier + years = 5 + } + } + 9 = { + add_character_modifier = { + modifier = ep1_flavor_2030_boon_10_modifier + years = 5 + } + } + } +} + +ep1_flavor.2030 = { + type = character_event + title = ep1_flavor.2030.t + desc = { + desc = ep1_flavor.2030.desc_intro + first_valid = { + triggered_desc = { # Monk + trigger = { + exists = scope:local_dispute_1 + scope:local_dispute_1 = { has_trait = devoted } + } + desc = ep1_flavor.2030.desc_1_monk + } + triggered_desc = { # Bishop + trigger = { + exists = scope:local_dispute_1 + scope:local_dispute_1 = { + is_landed_or_landless_administrative = yes + government_has_flag = government_is_theocracy + } + } + desc = ep1_flavor.2030.desc_1_bishop + } + triggered_desc = { # Baron + trigger = { + exists = scope:local_dispute_1 + scope:local_dispute_1 = { is_landed_or_landless_administrative = yes } + } + desc = ep1_flavor.2030.desc_1_baron + } + triggered_desc = { # Scholar + trigger = { + exists = scope:local_dispute_1 + scope:local_dispute_1 = { has_trait = scholar } + } + desc = ep1_flavor.2030.desc_1_scholar + } + triggered_desc = { # Cultural minority + trigger = { + exists = scope:local_dispute_1 + culture != root.culture + } + desc = ep1_flavor.2030.desc_1_culture + } + triggered_desc = { # Religious minority + trigger = { + exists = scope:local_dispute_1 + faith != root.faith + } + desc = ep1_flavor.2030.desc_1_faith + } + triggered_desc = { # Judge + trigger = { + exists = scope:local_dispute_1 + scope:local_dispute_1 = { has_trait = education_learning } + } + desc = ep1_flavor.2030.desc_1_judge + } + triggered_desc = { # Captain + trigger = { + exists = scope:local_dispute_1 + scope:local_dispute_1 = { has_trait = education_martial } + } + desc = ep1_flavor.2030.desc_1_captain + } + triggered_desc = { # Merchant + trigger = { + exists = scope:local_dispute_1 + scope:local_dispute_1 = { always = yes } + } + desc = ep1_flavor.2030.desc_1_merchant + } + } + desc = ep1_flavor.2030.desc_bridge + first_valid = { + triggered_desc = { # Monk + trigger = { + exists = scope:local_dispute_2 + scope:local_dispute_2 = { has_trait = devoted } + } + desc = ep1_flavor.2030.desc_2_monk + } + triggered_desc = { # Bishop + trigger = { + exists = scope:local_dispute_2 + scope:local_dispute_2 = { + is_landed_or_landless_administrative = yes + government_has_flag = government_is_theocracy + } + } + desc = ep1_flavor.2030.desc_2_bishop + } + triggered_desc = { # Baron + trigger = { + exists = scope:local_dispute_2 + scope:local_dispute_2 = { is_landed_or_landless_administrative = yes } + } + desc = ep1_flavor.2030.desc_2_baron + } + triggered_desc = { # Scholar + trigger = { + exists = scope:local_dispute_2 + scope:local_dispute_2 = { has_trait = scholar } + } + desc = ep1_flavor.2030.desc_2_scholar + } + triggered_desc = { # Cultural minority + trigger = { + exists = scope:local_dispute_2 + culture != root.culture + } + desc = ep1_flavor.2030.desc_2_culture + } + triggered_desc = { # Religious minority + trigger = { + exists = scope:local_dispute_2 + faith != root.faith + } + desc = ep1_flavor.2030.desc_2_faith + } + triggered_desc = { # Judge + trigger = { + exists = scope:local_dispute_2 + scope:local_dispute_2 = { has_trait = education_learning } + } + desc = ep1_flavor.2030.desc_2_judge + } + triggered_desc = { # Captain + trigger = { + exists = scope:local_dispute_2 + scope:local_dispute_2 = { has_trait = education_martial } + } + desc = ep1_flavor.2030.desc_2_captain + } + triggered_desc = { # Merchant + trigger = { + exists = scope:local_dispute_2 + scope:local_dispute_2 = { always = yes } + } + desc = ep1_flavor.2030.desc_2_merchant + } + } + desc = ep1_flavor.2030.desc_outro + } + theme = stewardship + override_background = { reference = market } + cooldown = { years = 100 } + left_portrait = { + character = scope:local_dispute_1 + animation = dismissal + } + right_portrait = { + character = scope:local_dispute_2 + animation = disapproval + } + + trigger = { + has_ep1_dlc_trigger = yes + is_landed_or_landless_administrative = yes + has_royal_court = yes + has_dlc_feature = royal_court + is_available_adult = yes + any_sub_realm_county = { count >= 3 } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + save_scope_value_as = { + name = taking_sides_boon_1 + value = { + integer_range = { + min = 0 + max = 9 + } + } + } + save_scope_value_as = { + name = taking_sides_boon_2 + value = { + integer_range = { + min = 0 + max = 9 + } + } + } + if = { + limit = { scope:taking_sides_boon_2 = scope:taking_sides_boon_1 } + while = { + limit = { scope:taking_sides_boon_2 = scope:taking_sides_boon_1 } + clear_saved_scope = taking_sides_boon_2 + save_scope_value_as = { + name = taking_sides_boon_2 + value = { + integer_range = { + min = 0 + max = 9 + } + } + } + } + } + hidden_effect = { + while = { + count = 2 + random_list = { + 10 = { + trigger = { + any_vassal_or_below = { + primary_title.tier = tier_barony + primary_title.county = { save_temporary_scope_as = local_dispute_temp_county } + NOR = { + is_in_list = dispute_characters + any_in_list = { + list = dispute_characters + AND = { + exists = scope:local_dispute_temp_county + is_landed_or_landless_administrative = yes + primary_title.county = scope:local_dispute_temp_county + } + } + } + } + } + modifier = { + add = -5 + any_in_list = { + list = dispute_characters + is_landed_or_landless_administrative = yes + has_same_government = prev + } + } + modifier = { + add = -4 + any_in_list = { + list = dispute_characters + count = all + faith = prev.faith + } + } + random_vassal_or_below = { + limit = { + primary_title.tier = tier_barony + NOT = { is_in_list = dispute_characters } + } + add_to_list = dispute_characters + } + } + 10 = { + modifier = { + add = -9 + any_in_list = { + list = dispute_characters + is_landed_or_landless_administrative = no + } + } + every_sub_realm_county = { add_to_list = local_dispute_county_list } + every_in_list = { + list = local_dispute_county_list + culture = { add_to_temporary_list = local_dispute_culture_list } + faith = { add_to_temporary_list = local_dispute_faith_list } + } + random_in_list = { + list = local_dispute_culture_list + weight = { + modifier = { + add = 10 + this = root.culture + } + modifier = { + add = -10 + any_in_list = { + list = dispute_characters + culture = prev + } + } + } + save_temporary_scope_as = local_dispute_culture + } + random_in_list = { + list = local_dispute_faith_list + weight = { + modifier = { + add = 10 + this = root.faith + } + modifier = { + add = -10 + any_in_list = { + list = dispute_characters + faith = prev + } + } + modifier = { + factor = 50 + any_in_list = { + list = local_dispute_county_list + faith = prev + culture = scope:local_dispute_culture + } + } + } + save_temporary_scope_as = local_dispute_faith + } + create_character = { + dynasty = none + culture = scope:local_dispute_culture + faith = scope:local_dispute_faith + location = root.capital_province + template = local_dispute_template + } + } + } + } + every_in_list = { + list = dispute_characters + ep1_flavor_2030_local_dispute_scope_effect = yes + } + } + } + + option = { # Side with 1st + name = ep1_flavor.2030.a + ep1_flavor_2030_option_effect = { WIN = 1 LOSE = 2 } + ep1_flavor_2030_boon_effect = { NUM = 1 } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + modifier = { + add = -50 + has_relation_rival = scope:local_dispute_1 + } + modifier = { + add = 25 + has_relation_friend = scope:local_dispute_1 + } + } + } + + option = { # Side with 2nd + name = ep1_flavor.2030.b + ep1_flavor_2030_option_effect = { WIN = 2 LOSE = 1 } + ep1_flavor_2030_boon_effect = { NUM = 2 } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + modifier = { + add = -50 + has_relation_rival = scope:local_dispute_2 + } + modifier = { + add = 25 + has_relation_friend = scope:local_dispute_2 + } + } + } + + option = { # Recruit 1st + name = ep1_flavor.2030.c + trigger = { + exists = scope:local_dispute_1 + scope:local_dispute_1 = { is_in_list = generated_dispute_characters } + } + add_prestige = medium_prestige_loss + send_interface_toast = { + title = ep1_flavor.2030.c.tt + left_icon = scope:local_dispute_1 + add_courtier = scope:local_dispute_1 + } + scope:local_dispute_1 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + hidden_effect = { return_to_court = yes } + } + scope:local_county_2 = { + add_county_modifier = { + modifier = ep1_flavor_2030_negative_modifier + years = 5 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { # Recruit 2nd + name = ep1_flavor.2030.d + trigger = { + exists = scope:local_dispute_2 + scope:local_dispute_2 = { is_in_list = generated_dispute_characters } + } + add_prestige = medium_prestige_loss + send_interface_toast = { + title = ep1_flavor.2030.d.tt + left_icon = scope:local_dispute_2 + add_courtier = scope:local_dispute_2 + } + scope:local_dispute_2 = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + hidden_effect = { return_to_court = yes } + } + scope:local_county_1 = { + add_county_modifier = { + modifier = ep1_flavor_2030_negative_modifier + years = 5 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + after = { + stress_impact = { + just = minor_stress_impact_gain + } + if = { + limit = { + any_in_list = { + list = generated_dispute_characters + employer != root + } + } + every_in_list = { + list = generated_dispute_characters + limit = { + employer != root + } + silent_disappearance_effect = yes + } + } + } +} diff --git a/N3OW/events/dlc/ep1/ep1_fund_inspiration_events.txt b/N3OW/events/dlc/ep1/ep1_fund_inspiration_events.txt new file mode 100644 index 00000000..a1290099 --- /dev/null +++ b/N3OW/events/dlc/ep1/ep1_fund_inspiration_events.txt @@ -0,0 +1,23811 @@ +namespace = fund_inspiration + + +######################### +# MAINTENANCE EVENTS +# by Linnéa Thimrén, Sean Hughes & Bianca Savazzi +######################### +# You funded an inspiration (0001-1000) +# fund_inspiration.0001 - Fallback version +# fund_inspiration.0011 - Weapon (Chose what they make) +# fund_inspiration.0012 - Weapon (They know what they want to make) +# fund_inspiration.0021 - Armor (Decide type of armor) +# fund_inspiration.0022 - Armor (They choose armor type) +# fund_inspiration.0031 - Book (Choose subject) +# fund_inspiration.0032 - Book (They have a subject) +# fund_inspiration.0041 - Tapestry (Choose a subject) +# fund_inspiration.0042 - Tapestry (Subject already chosen) +# fund_inspiration.0051 - Adventurer (Choose destination) +# fund_inspiration.0052 - Adventurer (Destination already chosen) +# fund_inspiration.0061 - Artisan (Choose what they make) +# fund_inspiration.0062 - Artisan (They know what they want to make) +# fund_inspiration.0071 - Smith (Choose what they make) +# fund_inspiration.0072 - Smith (They know what they want to make) +# fund_inspiration.0081 - Alchemist (Choose what they make) +# fund_inspiration.0082 - Alchemist (They know what they want to make) + +# Inspiration: complete! (1001-2000) +# fund_inspiration.1001 - Fallback version +# fund_inspiration.1011 - Weapon artifact +# fund_inspiration.1021 - Armor artifact +# fund_inspiration.1031 - Book artifact +# fund_inspiration.1041 - Weaver artifact +# fund_inspiration.1051 - Adventurer returns with artifact +# fund_inspiration.1061 - Artisan artifact +# fund_inspiration.1071 - Smith artifact +# fund_inspiration.1081 - Alchemy artifact + +# Inspiration invalidated (9001-9999) +# fund_inspiration.9001 - The inspired character died +# fund_inspiration.9002 - The inspired character is imprisoned +# fund_inspiration.9003 - The inspired character is no longer courtier of sponsor +# fund_inspiration.9004 - Adventurer returns prematurely +# fund_inspiration.9005 - Sponsorship inheritance confirmation + + +######################### +# ONGOING EVENTS (2001-9000) +# by Linnéa Thimrén, Bianca Savazzi, Isabella Welch, and Claudia Baldassi +######################### +# fund_inspiration.2001 - Inspiration owner asks for more money +# fund_inspiration.2002 - Inspiration owner asks for more human material +# fund_inspiration.2003 - Previously inspiration owner helps current one in their creation +# fund_inspiration.2004 - A merchant selling high-quality materials is in town +# fund_inspiration.2005 - Smith (weapon/armor/smith) asks you to invest in a better forge +# fund_inspiration.2006 - A wise person visits +# fund_inspiration.2021 - Inspiration owner asks for more money (armor specific) +# fund_inspiration.3001 - Court Chaplain complains about book subject +# fund_inspiration.3011 - Book (Martial) - wanna nudge the content? +# fund_inspiration.3012 - Book (Diplomacy) - wanna nudge the content? +# fund_inspiration.3013 - Book (Learning) - wanna nudge the content? +# fund_inspiration.3014 - Book (Stewardship) - wanna nudge the content? +# fund_inspiration.3015 - Book (Intrigue) - wanna nudge the content? +# fund_inspiration.3030 - Book - Nemesis is no longer nemesis and you're writing about your hatred +# fund_inspiration.3031 - Book - Soulmate is no longer soulmate and you're writing about your love +# fund_inspiration.4001 - Weaver - Weaver is stealing clothes +# fund_inspiration.5011 - Adventurer - Choose your item-type +# fund_inspiration.5021 - Adventurer gets lost... this can be a good thing though +# fund_inspiration.6001 - Adventurer postcard from the Steppe +# fund_inspiration.6002 - Adventurer postcard from India +# fund_inspiration.6003 - Adventurer postcard from Africa +# fund_inspiration.6004 - Adventurer postcard from the Middle East +# fund_inspiration.6005 - Adventurer postcard from Europe +# fund_inspiration.6006 - Adventurer postcard from Asia Minor +# fund_inspiration.6100 - Artisan chest prototype +# fund_inspiration.6101 - Artisan box prototype +# fund_inspiration.6102 - Artisan sculpture prototype +# fund_inspiration.6103 - Artisan chest prototype +# fund_inspiration.6104 - Artisan cabinet prototype +# fund_inspiration.6105 - Ruler collected all of the prototype artisan furniture +# fund_inspiration.6200 - Weaver - Weaver is too much of a modernist +# fund_inspiration.6400 - Adventurer has been skulking in the tavern +# fund_inspiration.8001 - Alchemy (Metal) - what subtype? +# fund_inspiration.8011 - Alchemy - Get poisoned by a bad alchemist +# fund_inspiration.8012 - Alchemy - Church disproves of you employing an alchemist +# fund_inspiration.8013 - Alchemy - Find a book from alchemist Jabir ibn Hayyan +# fund_inspiration.8014 - Alchemy - Alchemist isn't producing anything +# fund_inspiration.8015 - Alchemy - Plead with alchemist to resurrect family member/friend +# fund_inspiration.8017 - Alchemy - Helping the court tutor + +########################################################################################## + + +#only here for testing +#Give progress to random sponsored inspiration +fund_inspiration.9999 = { + type = character_event + title = fund_inspiration.9999.t + desc = fund_inspiration.9999.desc + theme = realm + orphan = yes + left_portrait = { + character = scope:recipient + animation = personality_honorable + } + + immediate = { + + } + + # + option = { + name = fund_inspiration.9999.a + random_sponsored_inspiration = { + change_inspiration_progress = 20 + } + } +} + +#An effect used to clean up all variables etc. Should always be used in the "after" of a completion event! +scripted_effect inspiration_completion_removal_basic_effect = { + if = { + limit = { has_variable = book_artifact_subject } + remove_variable = book_artifact_subject + } + if = { + limit = { has_variable = book_artifact_topic } + remove_variable = book_artifact_topic + } + if = { + limit = { has_variable = book_topic_category } + remove_variable = book_topic_category + } + if = { + limit = { has_variable = book_subject_witch_scope } + remove_variable = book_subject_witch_scope + } + if = { + limit = { has_variable = quality } + remove_variable = quality + } + if = { + limit = { has_variable = wealth } + remove_variable = wealth + } + if = { + limit = { has_variable = book_content_quality } + remove_variable = book_content_quality + } + if = { + limit = { has_variable = animal_type } + remove_variable = animal_type + } + if = { + limit = { has_variable = book_topic_cat_name } + remove_variable = book_topic_cat_name + } + if = { + limit = { has_variable = book_topic_dog_name } + remove_variable = book_topic_dog_name + } + if = { + limit = { has_variable = book_topic_united_title } + remove_variable = book_topic_united_title + } + if = { + limit = { has_variable = book_topic_created_title } + remove_variable = book_topic_created_title + } + if = { + limit = { has_variable = book_topic_restored_title } + remove_variable = book_topic_restored_title + } + if = { + limit = { has_variable = relevant_title } + remove_variable = relevant_title + } + if = { + limit = { has_variable = artifact_tapestry_scene } + remove_variable = artifact_tapestry_scene + } + if = { + limit = { has_variable = adventure_artifact_location } + remove_variable = adventure_artifact_location + } + if = { + limit = { has_variable = artifact_weapon_type } + remove_variable = artifact_weapon_type + } + if = { + limit = { has_variable = artifact_armor_type } + remove_variable = artifact_armor_type + } + if = { + limit = { has_variable = artifact_artisan_type } + remove_variable = artifact_artisan_type + } + if = { + limit = { has_variable = adventure_destination } + remove_variable = adventure_destination + } + if = { + limit = { has_variable = artifact_smith_type } + remove_variable = artifact_smith_type + } + if = { + limit = { has_variable = adventure_type } + remove_variable = adventure_type + } + if = { + limit = { has_variable = local_artisan } + remove_variable = local_artisan + } + if = { + limit = { has_variable = wealth } + remove_variable = wealth + } + if = { + limit = { has_variable = quality } + remove_variable = quality + } + if = { + limit = { has_variable = artifact_quality } + remove_variable = artifact_quality + } + if = { + limit = { has_variable = artifact_dedication_var } + remove_variable = artifact_dedication_var + } + if = { + limit = { has_variable = artifact_dedication_a_var } + remove_variable = artifact_dedication_a_var + } + if = { + limit = { has_variable = artifact_dedication_b_var } + remove_variable = artifact_dedication_b_var + } + if = { + limit = { has_variable = artifact_dedication_d_var } + remove_variable = artifact_dedication_d_var + } + if = { + limit = { has_variable = artifact_dedication_e_var } + remove_variable = artifact_dedication_e_var + } + if = { + limit = { has_variable = artifact_dedication_f_var } + remove_variable = artifact_dedication_f_var + } + if = { + limit = { has_variable = artifact_dedication_g1_var } + remove_variable = artifact_dedication_g1_var + } + if = { + limit = { has_variable = artifact_dedication_g2_var } + remove_variable = artifact_dedication_g2_var + } + if = { + limit = { has_variable = artifact_dedication_h_var } + remove_variable = artifact_dedication_h_var + } + if = { + limit = { has_variable = artifact_inscribe_motto_var } + remove_variable = artifact_inscribe_motto_var + } + if = { + limit = { has_variable = gone_adventuring } + remove_variable = gone_adventuring + } +} + +scripted_effect inspiration_completion_effect = { + if = { + limit = { exists = scope:owner } + scope:owner = { + inspiration_completion_removal_basic_effect = yes + } + } + if = { + limit = { exists = scope:inspiration_sponsor } + scope:inspiration_sponsor = { + inspiration_completion_removal_basic_effect = yes + } + } + if = { + limit = { exists = scope:inspiration_owner } + scope:inspiration_owner = { + inspiration_completion_removal_basic_effect = yes + # They might also have a bunch of blocker-flags saved from events + if = { + limit = { has_character_flag = had_event_fund_inspiration_2001 } + remove_character_flag = had_event_fund_inspiration_2001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2002 } + remove_character_flag = had_event_fund_inspiration_2002 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2003 } + remove_character_flag = had_event_fund_inspiration_2003 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2004 } + remove_character_flag = had_event_fund_inspiration_2004 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2005 } + remove_character_flag = had_event_fund_inspiration_2005 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2006 } + remove_character_flag = had_event_fund_inspiration_2006 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_2021 } + remove_character_flag = had_event_fund_inspiration_2021 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3001 } + remove_character_flag = had_event_fund_inspiration_3001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3011 } + remove_character_flag = had_event_fund_inspiration_3011 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3012 } + remove_character_flag = had_event_fund_inspiration_3012 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3013 } + remove_character_flag = had_event_fund_inspiration_3013 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3014 } + remove_character_flag = had_event_fund_inspiration_3014 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3015 } + remove_character_flag = had_event_fund_inspiration_3015 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3030 } + remove_character_flag = had_event_fund_inspiration_3030 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_3031 } + remove_character_flag = had_event_fund_inspiration_3031 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_4001 } + remove_character_flag = had_event_fund_inspiration_4001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_5011 } + remove_character_flag = had_event_fund_inspiration_5011 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_5021 } + remove_character_flag = had_event_fund_inspiration_5021 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6001 } + remove_character_flag = had_event_fund_inspiration_6001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6002 } + remove_character_flag = had_event_fund_inspiration_6002 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6003 } + remove_character_flag = had_event_fund_inspiration_6003 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6004 } + remove_character_flag = had_event_fund_inspiration_6004 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6005 } + remove_character_flag = had_event_fund_inspiration_6005 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_6006 } + remove_character_flag = had_event_fund_inspiration_6006 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8001 } + remove_character_flag = had_event_fund_inspiration_8001 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8011 } + remove_character_flag = had_event_fund_inspiration_8011 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8012 } + remove_character_flag = had_event_fund_inspiration_8012 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8013 } + remove_character_flag = had_event_fund_inspiration_8013 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8014 } + remove_character_flag = had_event_fund_inspiration_8014 + } + if = { + limit = { has_character_flag = had_event_fund_inspiration_8015 } + remove_character_flag = had_event_fund_inspiration_8015 + } + + if = { + limit = { has_character_flag = had_event_fund_inspiration_8017 } + remove_character_flag = had_event_fund_inspiration_8017 + } + } + } +} + + +################################################## +# You funded an inspiration +# by Linnéa Thimrén and Bianca Savazzi +# 0001-1000 +################################################## + +# Fallback version - very generic +fund_inspiration.0001 = { + type = character_event + hidden = yes + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + send_interface_toast = { + title = fund_inspiration.0001.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + +#Fund Inspiration: Weapon - Choose your item +#By Bianca Savazzi +fund_inspiration.0011 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0011.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = weapon_inspiration + } + scope:inspiration_owner = { NOT = { exists = var:artifact_weapon_type } } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + + save_scope_as = actor + scope:inspiration_owner = { + assign_quirk_effect = yes + save_scope_as = recipient + } + + } + + # sword; close quarters to slash and pierce + option = { + name = fund_inspiration.0011.a + + scope:inspiration_owner = { + random_list = { #What do they want to forge? + 10 = { + desc = fund_inspiration.0011.tooltip_dagger + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_dagger + } + custom_tooltip = fund_inspiration.0011.tooltip_dagger.tt + } + 10 = { + desc = fund_inspiration.0011.tooltip_sword + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_sword + } + custom_tooltip = fund_inspiration.0011.tooltip_sword.tt + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = brave + } + } + } + + # axe or mace; blunt and smash + option = { + name = fund_inspiration.0011.b + scope:inspiration_owner = { + random_list = { #What do they want to forge? + 10 = { + desc = fund_inspiration.0011.tooltip_axe + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_axe + } + custom_tooltip = fund_inspiration.0011.tooltip_axe.tt + } + 10 = { + desc = fund_inspiration.0011.tooltip_hammer + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_hammer + } + custom_tooltip = fund_inspiration.0011.tooltip_hammer.tt + } + 10 = { + desc = fund_inspiration.0011.tooltip_mace + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_mace + } + custom_tooltip = fund_inspiration.0011.tooltip_mace.tt + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = strong + } + modifier = { + add = 25 + has_trait = berserker + } + } + } + + # spear; create distance + option = { + name = fund_inspiration.0011.c + scope:inspiration_owner = { + random_list = { #What do they want to forge? + 10 = { + desc = fund_inspiration.0011.tooltip_spear + set_variable = { + name = artifact_weapon_type + value = flag:artifact_weapon_type_spear + } + custom_tooltip = fund_inspiration.0011.tooltip_spear.tt + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = craven + } + modifier = { + add = 25 + OR = { + has_intrigue_lifestyle_trait_trigger = yes + has_lifestyle = intrigue_lifestyle + } + } + } + } + + # bow + option = { + name = fund_inspiration.0011.d + trigger = { + scope:inspiration_owner = { has_character_modifier = local_artisan_modifier } + } + custom_tooltip = { + text = fund_inspiration.0011.d.tt + scope:inspiration_owner = { + destroy_inspiration = inspiration + create_inspiration = bow_inspiration + } + sponsor_inspiration = scope:inspiration_owner.inspiration + } + ai_chance = { + base = 25 + modifier = { + add = 50 + has_trait = lifestyle_hunter + } + } + } + + # default option of "do what you want" + option = { + name = fund_inspiration.0031.f + hidden_effect = { #If they haven't specified what they're gonna make we decide it here + set_weapon_artifact_type_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_TYPE = no + } + } + custom_tooltip = fund_inspiration.they_decide_option_tt + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = arbitrary + } + } + } +} + +# Weapon - they know what they want to make +fund_inspiration.0012 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = weapon_inspiration + inspiration_owner = { #They know what weapon they want to make + exists = var:artifact_weapon_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0012.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + +# Armor - You can decide type of armor +scripted_trigger fund_inspiration_0021_option_mail_trigger = { + NOT = { exists = scope:armor_type_mail_option } +} +scripted_trigger fund_inspiration_0021_option_plate_trigger = { + NOT = { exists = scope:armor_type_plate_option } +} +scripted_trigger fund_inspiration_0021_option_scale_trigger = { + NOT = { exists = scope:armor_type_scale_option } +} +scripted_trigger fund_inspiration_0021_option_lamellar_trigger = { + NOT = { exists = scope:armor_type_lamellar_option } +} +scripted_trigger fund_inspiration_0021_option_laminar_trigger = { + NOT = { exists = scope:armor_type_laminar_option } +} +scripted_trigger fund_inspiration_0021_option_brigandine_trigger = { + NOT = { exists = scope:armor_type_brigandine_option } +} +scripted_effect fund_inspiration_0021_pick_options_to_show_effect = { + #What options do we show? + hidden_effect = { + random_list = { + 60 = { #Fairly common everywhere + trigger = { + fund_inspiration_0021_option_mail_trigger = yes + } + artifact_armor_type_mail_modifier = yes + save_scope_value_as = { + name = armor_type_mail_option + value = yes + } + } + 1 = { #Expensive + trigger = { + fund_inspiration_0021_option_plate_trigger = yes + scope:inspiration_owner = { + culture = { has_innovation = innovation_plate_armor } + } + } + artifact_armor_type_plate_modifier = yes + save_scope_value_as = { + name = armor_type_plate_option + value = yes + } + } + 60 = { #Fairly common everywhere + trigger = { + fund_inspiration_0021_option_scale_trigger = yes + } + artifact_armor_type_scale_modifier = yes + save_scope_value_as = { + name = armor_type_scale_option + value = yes + } + } + 1 = { #Expensive + trigger = { + fund_inspiration_0021_option_lamellar_trigger = yes + } + artifact_armor_type_lamellar_modifier = yes + save_scope_value_as = { + name = armor_type_lamellar_option + value = yes + } + } + 1 = { + trigger = { + fund_inspiration_0021_option_laminar_trigger = yes + } + artifact_armor_type_laminar_modifier = yes + save_scope_value_as = { + name = armor_type_laminar_option + value = yes + } + } + 0 = { + trigger = { + fund_inspiration_0021_option_brigandine_trigger = yes + } + artifact_armor_type_brigandine_modifier = yes + save_scope_value_as = { + name = armor_type_brigandine_option + value = yes + } + } + } + } +} + +fund_inspiration.0021 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0021.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = armor_inspiration + inspiration_owner = { #They haven't already decided what armor to make + NOT = { exists = var:artifact_armor_type } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0021_pick_options_to_show_effect = yes + fund_inspiration_0021_pick_options_to_show_effect = yes + fund_inspiration_0021_pick_options_to_show_effect = yes + } + + #Chain mail + option = { + name = fund_inspiration.0021.mail + trigger = { + exists = scope:armor_type_mail_option + } + custom_tooltip = fund_inspiration.0021.mail.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_mail + } + } + ai_chance = { + base = 10 + artifact_armor_type_mail_modifier = yes + } + } + #Plate armor + option = { + name = fund_inspiration.0021.plate + trigger = { + exists = scope:armor_type_plate_option + } + custom_tooltip = fund_inspiration.0021.plate.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_plate + } + } + ai_chance = { + base = 10 + artifact_armor_type_plate_modifier = yes + } + } + #Scale armor + option = { + name = fund_inspiration.0021.scale + trigger = { + exists = scope:armor_type_scale_option + } + custom_tooltip = fund_inspiration.0021.scale.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_scale + } + } + ai_chance = { + base = 10 + artifact_armor_type_scale_modifier = yes + } + } + #Lamellar + option = { + name = fund_inspiration.0021.lamellar + trigger = { + exists = scope:armor_type_lamellar_option + } + custom_tooltip = fund_inspiration.0021.lamellar.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_lamellar + } + } + ai_chance = { + base = 10 + artifact_armor_type_lamellar_modifier = yes + } + } + #Laminar + option = { + name = fund_inspiration.0021.laminar + trigger = { + exists = scope:armor_type_laminar_option + } + custom_tooltip = fund_inspiration.0021.laminar.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_laminar + } + } + ai_chance = { + base = 10 + artifact_armor_type_laminar_modifier = yes + } + } + #Brigandine + option = { + name = fund_inspiration.0021.brigandine + trigger = { + exists = scope:armor_type_brigandine_option + } + custom_tooltip = fund_inspiration.0021.brigandine.tt + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_armor_type + value = flag:armor_type_brigandine + } + } + ai_chance = { + base = 10 + artifact_armor_type_brigandine_modifier = yes + } + } + option = { + name = fund_inspiration.0031.f + custom_tooltip = fund_inspiration.they_decide_option_tt + set_armor_artifact_type_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_TYPE = no + } + ai_chance = { + base = 0 + } + } +} + +# Armor - they know what they want to make +fund_inspiration.0022 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = armor_inspiration + inspiration_owner = { #They know what armor they want to make + exists = var:artifact_armor_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0022.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + + +# Book - choose subject +# by Linnéa Thimrén +scripted_trigger fund_inspiration_0031_title_based_option_trigger = { + + OR = { + AND = { + exists = global_var:flag_restored_roman_empire + global_var:flag_restored_roman_empire = root + NOT = { exists = scope:book_topic_restoration } + } + AND = { + exists = global_var:flag_restored_dumnonia + global_var:flag_restored_dumnonia = root + NOT = { exists = scope:book_topic_restoration } + } + AND = { + exists = global_var:flag_reformed_carolingian_empire + global_var:flag_reformed_carolingian_empire = root + NOT = { exists = scope:book_topic_restoration } + } + AND = { + exists = global_var:restore_holy_roman_empire_decision + global_var:restore_holy_roman_empire_decision = root + NOT = { exists = scope:book_topic_restoration } + } + AND = { + exists = global_var:unite_the_spanish_thrones_decision + global_var:unite_the_spanish_thrones_decision = root + exists = global_var:unite_the_spanish_thrones_decision_title + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:unite_the_slavs_decision + global_var:unite_the_slavs_decision = root + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:unite_the_southern_slavs_decision + global_var:unite_the_southern_slavs_decision = root + exists = global_var:unite_the_southern_slavs_decision_title + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:unite_the_western_slavs_decision + global_var:unite_the_western_slavs_decision = root + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:flag_unified_burgundy_kingdom + global_var:flag_unified_burgundy_kingdom = root + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:flag_unified_italian_empire + global_var:flag_unified_italian_empire = root + NOT = { exists = scope:book_topic_unification } + } + AND = { + exists = global_var:form_portugal_decision + global_var:form_portugal_decision = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_founded_kingdom_of_bosnia + global_var:flag_founded_kingdom_of_bosnia = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_armenian_empire + global_var:flag_created_armenian_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_dai_viet_empire + global_var:flag_created_dai_viet_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_majapahit_empire + global_var:flag_created_majapahit_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_ryukyu_empire + global_var:flag_created_ryukyu_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_siam_kingdom + global_var:flag_created_siam_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_formed_rum_sultanate + global_var:flag_formed_rum_sultanate = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:create_israel_kingdom + global_var:create_israel_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_created_outremer_empire + global_var:flag_created_outremer_empire = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_formed_switzerland_kingdom + global_var:flag_formed_switzerland_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_formed_austria_kingdom + global_var:flag_formed_austria_kingdom = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_formed_kingdom_of_aragon + global_var:flag_formed_kingdom_of_aragon = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:form_toledo_decision + global_var:form_toledo_decision = root + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:found_kingdom_decision + global_var:found_kingdom_decision = root + exists = global_var:found_kingdom_decision_kingdom + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:found_empire_decision + global_var:found_empire_decision = root + exists = global_var:found_empire_decision_empire + NOT = { exists = scope:book_topic_creation } + } + AND = { + exists = global_var:flag_restored_old_vasconia + global_var:flag_restored_old_vasconia = root + NOT = { exists = scope:book_topic_restoration } + } + } +} + +scripted_trigger fund_inspiration_0031_dynasty_option_trigger = { + NOT = { exists = scope:dynasty_option } + exists = dynasty +} + +scripted_trigger fund_inspiration_0031_education_option_trigger = { + NOT = { exists = scope:education_option } + OR = { + has_education_martial_trigger = yes + has_education_diplomacy_trigger = yes + has_education_stewardship_trigger = yes + has_education_learning_trigger = yes + has_education_intrigue_trigger = yes + } +} + +scripted_trigger fund_inspiration_0031_lifestyle_option_trigger = { + NOT = { exists = scope:lifestyle_option } + OR = { + has_lifestyle_trait = yes + is_cannibal_trigger = yes + is_witch_trigger = yes + is_deviant_trigger = yes + has_trait = lunatic + } +} + +scripted_trigger fund_inspiration_0031_focus_option_trigger = { + NOT = { exists = scope:focus_option } + OR = { + has_focus_martial = yes + has_focus_diplomacy = yes + has_focus_stewardship = yes + has_focus_intrigue = yes + has_focus_learning = yes + } +} + +scripted_trigger fund_inspiration_0031_relationship_option_trigger = { + NOT = { exists = scope:relationship_option } + OR = { + any_relation = { + type = soulmate + this != scope:inspiration_owner + } + any_relation = { + type = nemesis + this != scope:inspiration_owner + } + } +} + +scripted_trigger fund_inspiration_0031_mystical_animal_option_trigger = { + NOT = { exists = scope:mystical_animal_option } + has_character_modifier = hunt_mystical_animal_modifier + exists = var:hunted_mystical_animal +} + +scripted_trigger fund_inspiration_0031_pet_option_trigger = { + NOT = { exists = scope:pet_option } + OR = { #You must have named them + AND = { + any_owned_story = { + type = story_cycle_pet_cat + } + exists = var:story_cycle_cat_name + } + AND = { + any_owned_story = { + type = story_cycle_pet_dog + } + exists = var:story_cycle_dog_name + } + } + calc_true_if = { + amount < 3 + fund_inspiration_0031_title_based_option_trigger = yes + fund_inspiration_0031_dynasty_option_trigger = yes + fund_inspiration_0031_education_option_trigger = yes + fund_inspiration_0031_lifestyle_option_trigger = yes + fund_inspiration_0031_focus_option_trigger = yes + fund_inspiration_0031_relationship_option_trigger = yes + fund_inspiration_0031_mystical_animal_option_trigger = yes + } +} + +scripted_trigger fund_inspiration_0031_skill_option_trigger = { + NOT = { exists = scope:skill_option } + calc_true_if = { + amount < 3 + fund_inspiration_0031_title_based_option_trigger = yes + fund_inspiration_0031_dynasty_option_trigger = yes + fund_inspiration_0031_education_option_trigger = yes + fund_inspiration_0031_lifestyle_option_trigger = yes + fund_inspiration_0031_focus_option_trigger = yes + fund_inspiration_0031_relationship_option_trigger = yes + fund_inspiration_0031_mystical_animal_option_trigger = yes + fund_inspiration_0031_pet_option_trigger = yes + } +} + +scripted_effect fund_inspiration_0031_pick_options_to_show_effect = { + #What options should we show? + hidden_effect = { + random_list = { + 800 = { # Have I ever restored/unified/formed/created/founded a kingdom/empire/etc.? + trigger = { + fund_inspiration_0031_title_based_option_trigger = yes + } + if = { + limit = { + AND = { + exists = global_var:flag_restored_roman_empire + global_var:flag_restored_roman_empire = root + } + NOT = { exists = scope:book_topic_restoration } + } + save_scope_value_as = { + name = book_topic_restoration + value = yes + } + title:h_roman_empire = { + save_scope_as = restored_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_restored_dumnonia + global_var:flag_restored_dumnonia = root + } + NOT = { exists = scope:book_topic_restoration } + } + save_scope_value_as = { + name = book_topic_restoration + value = yes + } + title:k_cornwall = { + save_scope_as = restored_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_reformed_carolingian_empire + global_var:flag_reformed_carolingian_empire = root + } + NOT = { exists = scope:book_topic_restoration } + } + save_scope_value_as = { + name = book_topic_restoration + value = yes + } + title:e_france = { + save_scope_as = restored_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:restore_holy_roman_empire_decision + global_var:restore_holy_roman_empire_decision = root + } + NOT = { exists = scope:book_topic_restoration } + } + save_scope_value_as = { + name = book_topic_restoration + value = yes + } + title:e_hre = { + save_scope_as = restored_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:unite_the_spanish_thrones_decision + global_var:unite_the_spanish_thrones_decision = root + exists = global_var:unite_the_spanish_thrones_decision_title + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + global_var:unite_the_spanish_thrones_decision_title = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:unite_the_slavs_decision + global_var:unite_the_slavs_decision = root + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + title:e_slavia = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:unite_the_southern_slavs_decision + global_var:unite_the_southern_slavs_decision = root + exists = global_var:unite_the_southern_slavs_decision_title + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + global_var:unite_the_southern_slavs_decision_title = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:unite_the_western_slavs_decision + global_var:unite_the_western_slavs_decision = root + exists = global_var:unite_the_western_slavs_decision_title + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + global_var:unite_the_western_slavs_decision_title = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_unified_burgundy_kingdom + global_var:flag_unified_burgundy_kingdom = root + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + title:k_burgundy = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_unified_italian_empire + global_var:flag_unified_italian_empire = root + } + NOT = { exists = scope:book_topic_unification } + } + save_scope_value_as = { + name = book_topic_unification + value = yes + } + title:e_italy = { + save_scope_as = united_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:form_portugal_decision + global_var:form_portugal_decision = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_portugal = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_founded_kingdom_of_bosnia + global_var:flag_founded_kingdom_of_bosnia = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_bosnia = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_created_armenian_empire + global_var:flag_created_armenian_empire = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:e_armenia = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_created_dai_viet_empire + global_var:flag_created_dai_viet_empire = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:e_viet = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_formed_rum_sultanate + global_var:flag_formed_rum_sultanate = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_rum = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:create_israel_kingdom + global_var:create_israel_kingdom = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_israel = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_created_outremer_empire + global_var:flag_created_outremer_empire = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:e_outremer = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_formed_switzerland_kingdom + global_var:flag_formed_switzerland_kingdom = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_switzerland = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_formed_austria_kingdom + global_var:flag_formed_austria_kingdom = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_austria = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:flag_formed_kingdom_of_aragon + global_var:flag_formed_kingdom_of_aragon = root + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + title:k_aragon = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:found_kingdom_decision + global_var:found_kingdom_decision = root + exists = global_var:found_kingdom_decision_kingdom + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + global_var:found_kingdom_decision_kingdom = { + save_scope_as = created_title + } + } + else_if = { + limit = { + AND = { + exists = global_var:found_empire_decision + global_var:found_empire_decision = root + exists = global_var:found_empire_decision_empire + } + NOT = { exists = scope:book_topic_creation } + } + save_scope_value_as = { + name = book_topic_creation + value = yes + } + global_var:found_empire_decision_empire = { + save_scope_as = created_title + } + } + } + 5 = { # Dynasty + trigger = { + fund_inspiration_0031_dynasty_option_trigger = yes + } + save_scope_value_as = { + name = dynasty_option + value = yes + } + } + 10 = { # education trait + trigger = { + fund_inspiration_0031_education_option_trigger = yes + } + save_scope_value_as = { + name = education_option + value = yes + } + } + 10 = { # lifestyle/misc stuff + trigger = { + fund_inspiration_0031_lifestyle_option_trigger = yes + } + save_scope_value_as = { + name = lifestyle_option + value = yes + } + random_list = { #What topic do we offer you? + 10 = { + trigger = { has_trait = lifestyle_reveler } + save_scope_value_as = { + name = lifestyle_option_reveler + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_blademaster } + save_scope_value_as = { + name = lifestyle_option_blademaster + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_hunter } + save_scope_value_as = { + name = lifestyle_option_hunter + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_mystic } + save_scope_value_as = { + name = lifestyle_option_mystic + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_herbalist } + save_scope_value_as = { + name = lifestyle_option_herbalist + value = yes + } + } + 10 = { + trigger = { has_trait = lifestyle_physician } + save_scope_value_as = { + name = lifestyle_option_physician + value = yes + } + } + 10 = { + trigger = { is_cannibal_trigger = yes } + save_scope_value_as = { + name = lifestyle_option_cannibal + value = yes + } + } + 10 = { + trigger = { is_witch_trigger = yes } + save_scope_value_as = { + name = lifestyle_option_witch + value = yes + } + } + 10 = { + trigger = { is_deviant_trigger = yes } + save_scope_value_as = { + name = lifestyle_option_deviant + value = yes + } + } + 10 = { + trigger = { has_trait = lunatic } + save_scope_value_as = { + name = lifestyle_option_lunatic + value = yes + } + } + 10 = { + trigger = { has_trait = torturer } + save_scope_value_as = { + name = lifestyle_option_torturer + value = yes + } + } + } + } + 10 = { # focus + trigger = { + fund_inspiration_0031_focus_option_trigger = yes + } + save_scope_value_as = { + name = focus_option + value = yes + } + } + 5 = { # relationship + trigger = { + fund_inspiration_0031_relationship_option_trigger = yes + } + save_scope_value_as = { + name = relationship_option + value = yes + } + if = { + limit = { + any_relation = { + type = soulmate + this != scope:inspiration_owner + } + } + random_relation = { + type = soulmate + limit = { + this != scope:inspiration_owner + } + save_scope_as = relationship_scope + } + save_scope_value_as = { + name = relationship_option_soulmate + value = yes + } + } + else_if = { + limit = { + any_relation = { + type = nemesis + this != scope:inspiration_owner + } + } + random_relation = { + type = nemesis + limit = { + this != scope:inspiration_owner + } + save_scope_as = relationship_scope + } + save_scope_value_as = { + name = relationship_option_nemesis + value = yes + } + } + } + 50 = { # mystical animal + trigger = { + fund_inspiration_0031_mystical_animal_option_trigger = yes + } + save_scope_value_as = { + name = mystical_animal_option + value = yes + } + set_variable = { + name = animal_type + value = root.var:hunted_mystical_animal + } + } + 5 = { # pet (only if we don't have enough options already) + trigger = { + fund_inspiration_0031_pet_option_trigger = yes + } + save_scope_value_as = { + name = pet_option + value = yes + } + random_list = { + 50 = { + trigger = { + any_owned_story = { + type = story_cycle_pet_cat + } + exists = var:story_cycle_cat_name + } + save_scope_value_as = { + name = pet_option_cat + value = yes + } + } + 50 = { + trigger = { + any_owned_story = { + type = story_cycle_pet_dog + } + } + save_scope_value_as = { + name = pet_option_dog + value = yes + } + } + } + } + 1 = { # skill (only if we don't have enough options already) + trigger = { + fund_inspiration_0031_skill_option_trigger = yes + } + save_scope_value_as = { + name = skill_option + value = yes + } + if = { + limit = { + highest_skill = martial + NOT = { has_education_martial_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_martial = no + } + } + save_scope_value_as = { + name = skill_option_martial + value = yes + } + } + else_if = { + limit = { + highest_skill = diplomacy + NOT = { has_education_diplomacy_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_diplomacy = no + } + } + save_scope_value_as = { + name = skill_option_diplomacy + value = yes + } + } + else_if = { + limit = { + highest_skill = stewardship + NOT = { has_education_stewardship_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_stewardship = no + } + } + save_scope_value_as = { + name = skill_option_stewardship + value = yes + } + } + else_if = { + limit = { + highest_skill = intrigue + NOT = { has_education_intrigue_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_intrigue = no + } + } + save_scope_value_as = { + name = skill_option_intrigue + value = yes + } + } + else_if = { + limit = { + highest_skill = learning + NOT = { has_education_learning_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_learning = no + } + } + save_scope_value_as = { + name = skill_option_learning + value = yes + } + } + else = { #Fallback + random_list = { + 1 = { + trigger = { + NOT = { has_education_martial_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_martial = no + } + OR = { #Cannot be the lowest skill + martial > diplomacy + martial > stewardship + martial > intrigue + martial > learning + } + } + compare_modifier = { + value = martial + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_martial + value = yes + } + } + 1 = { + trigger = { + NOT = { has_education_diplomacy_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_diplomacy = no + } + OR = { #Cannot be the lowest skill + diplomacy > martial + diplomacy > stewardship + diplomacy > intrigue + diplomacy > learning + } + } + compare_modifier = { + value = diplomacy + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_diplomacy + value = yes + } + } + 1 = { + trigger = { + NOT = { has_education_stewardship_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_stewardship = no + } + OR = { #Cannot be the lowest skill + stewardship > martial + stewardship > diplomacy + stewardship > intrigue + stewardship > learning + } + } + compare_modifier = { + value = stewardship + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_stewardship + value = yes + } + } + 1 = { + trigger = { + NOT = { has_education_intrigue_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_intrigue = no + } + OR = { #Cannot be the lowest skill + intrigue > martial + intrigue > diplomacy + intrigue > stewardship + intrigue > learning + } + } + compare_modifier = { + value = intrigue + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_intrigue + value = yes + } + } + 1 = { + trigger = { + NOT = { has_education_learning_trigger = yes } + trigger_if = { + limit = { + exists = scope:focus_option + } + has_focus_learning = no + } + OR = { #Cannot be the lowest skill + learning > martial + learning > diplomacy + learning > stewardship + learning > intrigue + } + } + compare_modifier = { + value = learning + multiplier = 4 + } + save_scope_value_as = { + name = skill_option_learning + value = yes + } + } + } + } + } + } + } +} + +fund_inspiration.0031 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0031.desc + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + } + } + animation = writing + } + animation = personality_honorable + } + right_portrait = { + trigger = { + exists = scope:relationship_scope + } + character = scope:relationship_scope + } + + trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They haven't already decided what to write about + NOT = { exists = var:book_subject } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + assign_quirk_effect = yes + } + + # We save a subject here so that the inspiration owner can come with a suggestion. It is not saved however. + set_book_subject_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_SUBJECT = no + } + scope:inspiration_owner = { + if = { #To avoid tooltip errors + limit = { + exists = var:book_subject + } + var:book_subject = { + save_scope_as = subject + } + } + remove_variable = book_subject + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0031_pick_options_to_show_effect = yes + fund_inspiration_0031_pick_options_to_show_effect = yes + fund_inspiration_0031_pick_options_to_show_effect = yes + } + + option = { #Education + name = fund_inspiration.0031.education + trigger = { + exists = scope:education_option + } + trait = education_martial_1 + trait = education_martial_2 + trait = education_martial_3 + trait = education_martial_4 + trait = education_martial_5 + trait = education_diplomacy_1 + trait = education_diplomacy_2 + trait = education_diplomacy_3 + trait = education_diplomacy_4 + trait = education_diplomacy_5 + trait = education_learning_1 + trait = education_learning_2 + trait = education_learning_3 + trait = education_learning_4 + trait = education_learning_5 + trait = education_stewardship_1 + trait = education_stewardship_2 + trait = education_stewardship_3 + trait = education_stewardship_4 + trait = education_stewardship_5 + trait = education_intrigue_1 + trait = education_intrigue_2 + trait = education_intrigue_3 + trait = education_intrigue_4 + trait = education_intrigue_5 + if = { + limit = { + has_education_martial_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:martial + } + } + } + else_if = { + limit = { + has_education_diplomacy_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:diplomacy + } + } + } + else_if = { + limit = { + has_education_stewardship_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:stewardship + } + } + } + else_if = { + limit = { + has_education_learning_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:learning + } + } + } + else_if = { + limit = { + has_education_intrigue_trigger = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:intrigue + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + + ai_chance = { + base = 50 + modifier = { + add = 25 + has_education_martial_trigger = yes + martial > high_skill_rating + } + modifier = { + add = 25 + has_education_diplomacy_trigger = yes + diplomacy > high_skill_rating + } + modifier = { + add = 25 + has_education_stewardship_trigger = yes + stewardship > high_skill_rating + } + modifier = { + add = 25 + has_education_learning_trigger = yes + learning > high_skill_rating + } + modifier = { + add = 25 + has_education_intrigue_trigger = yes + intrigue > high_skill_rating + } + } + } + + option = { #lifestyle/misc stuff + name = { + trigger = { exists = scope:lifestyle_option_reveler } + text = fund_inspiration.0031.lifestyle_reveler + } + name = { + trigger = { exists = scope:lifestyle_option_blademaster } + text = fund_inspiration.0031.lifestyle_blademaster + } + name = { + trigger = { exists = scope:lifestyle_option_hunter } + text = fund_inspiration.0031.lifestyle_hunter + } + name = { + trigger = { exists = scope:lifestyle_option_mystic } + text = fund_inspiration.0031.lifestyle_mystic + } + name = { + trigger = { exists = scope:lifestyle_option_torturer } + text = fund_inspiration.0031.lifestyle_torturer + } + name = { + trigger = { exists = scope:lifestyle_option_herbalist } + text = fund_inspiration.0031.lifestyle_herbalist + } + name = { + trigger = { exists = scope:lifestyle_option_physician } + text = fund_inspiration.0031.lifestyle_physician + } + name = { + trigger = { exists = scope:lifestyle_option_cannibal } + text = fund_inspiration.0031.lifestyle_cannibal + } + name = { + trigger = { exists = scope:lifestyle_option_witch } + text = fund_inspiration.0031.lifestyle_witch + } + name = { + trigger = { exists = scope:lifestyle_option_deviant } + text = fund_inspiration.0031.lifestyle_deviant + } + name = { + trigger = { exists = scope:lifestyle_option_lunatic } + text = fund_inspiration.0031.lifestyle_lunatic + } + trigger = { + exists = scope:lifestyle_option + } + trait = lifestyle_reveler + trait = lifestyle_blademaster + trait = lifestyle_hunter + trait = lifestyle_mystic + trait = lifestyle_herbalist + trait = torturer + trait = lifestyle_physician + trait = cannibal + trait = witch + trait = deviant + trait = lunatic_1 + trait = lunatic_genetic + if = { + limit = { + exists = scope:lifestyle_option_reveler + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:reveler + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_blademaster + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:blademaster + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_hunter + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:hunter + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_torturer + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:torturer + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_mystic + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:mystic + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_herbalist + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:herbalist + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_physician + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:medicine + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_cannibal + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:cannibal + } + # Can either be about recipes or more general about the consumption of human flesh + hidden_effect = { + random_list = { + 50 = { #Undecided, for now + } + 50 = { + set_variable = { + name = book_topic + value = flag:cannibal_recipes + } + } + } + } + + #opinion hit for the more _out there_ choices + if = { + limit = { + NOT = { is_cannibal_trigger = yes } + } + add_opinion = { + target = root + modifier = scared_opinion + opinion = -20 + } + } + } + #reveal secret to the writer if there is one + if = { + limit = { + any_secret = { + type = secret_cannibal + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + } + random_secret = { + type = secret_cannibal + limit = { + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + reveal_to = scope:inspiration_owner + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_witch + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:witch + } + set_variable = { + name = book_subject_witch_scope + value = root + } + #opinion hit for the more _out there_ choices + if = { + limit = { + NOT = { is_witch_trigger = yes } + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = root.faith GENDER_CHARACTER = root } + } + if = { + limit = { + OR = { + has_trait = zealous + piety_level >= high_piety_level + has_trait = faith_warrior + } + } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -30 + } + } + else = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -15 + } + } + } + } + #reveal secret to the writer if there is one + if = { + limit = { + any_secret = { + type = secret_witch + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + } + random_secret = { + type = secret_witch + limit = { + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + reveal_to = scope:inspiration_owner + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_deviant + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:deviant + } + #opinion hit for the more _out there_ choices + if = { + limit = { + NOT = { is_deviant_trigger = yes } + } + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -20 + } + } + } + #reveal secret to the writer if there is one + if = { + limit = { + any_secret = { + type = secret_deviant + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + } + random_secret = { + type = secret_deviant + limit = { + NOT = { + any_secret_knower = { this = scope:inspiration_owner } + } + } + reveal_to = scope:inspiration_owner + } + } + } + else_if = { + limit = { + exists = scope:lifestyle_option_lunatic + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:lunatic + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + + ai_chance = { + base = 75 + modifier = { # If it's hidden secrets it's rare that they write about it + 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 } + } + 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 } + } + 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 } + } + modifier = { #However, the might if they're arrogant + add = 50 + has_trait = arrogant + } + ai_value_modifier = { + ai_boldness = 0.25 + } + } + } + + option = { #Lifestyle Focus + name = fund_inspiration.0031.focus + trigger = { + exists = scope:focus_option + } + if = { + limit = { + has_focus_martial = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:martial + } + } + } + else_if = { + limit = { + has_focus_diplomacy = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:diplomacy + } + } + } + else_if = { + limit = { + has_focus_stewardship = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:stewardship + } + } + } + else_if = { + limit = { + has_focus_learning = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:learning + } + } + } + else_if = { + limit = { + has_focus_intrigue = yes + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:intrigue + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 50 + modifier = { + add = 25 + has_focus_martial = yes + martial > high_skill_rating + } + modifier = { + add = 25 + has_focus_diplomacy = yes + diplomacy > high_skill_rating + } + modifier = { + add = 25 + has_focus_stewardship = yes + stewardship > high_skill_rating + } + modifier = { + add = 25 + has_focus_learning = yes + learning > high_skill_rating + } + modifier = { + add = 25 + has_focus_intrigue = yes + intrigue > high_skill_rating + } + } + } + + option = { #Skill + name = { + trigger = { exists = scope:skill_option_martial } + text = fund_inspiration.0031.skill_option_martial + } + name = { + trigger = { exists = scope:skill_option_diplomacy } + text = fund_inspiration.0031.skill_option_diplomacy + } + name = { + trigger = { exists = scope:skill_option_stewardship } + text = fund_inspiration.0031.skill_option_stewardship + } + name = { + trigger = { exists = scope:skill_option_learning } + text = fund_inspiration.0031.skill_option_learning + } + name = { + trigger = { exists = scope:skill_option_intrigue } + text = fund_inspiration.0031.skill_option_intrigue + } + trigger = { + exists = scope:skill_option + } + if = { + limit = { + exists = scope:skill_option_martial + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:martial + } + } + } + else_if = { + limit = { + exists = scope:skill_option_diplomacy + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:diplomacy + } + } + } + else_if = { + limit = { + exists = scope:skill_option_stewardship + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:stewardship + } + } + } + else_if = { + limit = { + exists = scope:skill_option_learning + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:learning + } + } + } + else_if = { + limit = { + exists = scope:skill_option_intrigue + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:intrigue + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { # Kinda a fallback option, so we don't want the AI choosing this too often + base = 10 + } + } + + option = { #Relationship + name = { + trigger = { exists = scope:relationship_option_soulmate } + text = fund_inspiration.0031.relationship_soulmate + } + name = { + trigger = { exists = scope:relationship_option_nemesis } + text = fund_inspiration.0031.relationship_nemesis + } + trigger = { + exists = scope:relationship_option + exists = scope:relationship_scope + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:relationship + } + if = { + limit = { + exists = scope:relationship_option_soulmate + } + set_variable = { + name = book_topic + value = flag:soulmate + } + } + else = { + set_variable = { + name = book_topic + value = flag:nemesis + } + } + set_variable = { + name = book_topic_relationship + value = scope:relationship_scope + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 0 + #My opinion of them + opinion_modifier = { + trigger = { + exists = scope:relationship_option_soulmate + } + opinion_target = scope:relationship_scope + } + opinion_modifier = { + trigger = { + exists = scope:relationship_option_nemesis + } + opinion_target = scope:relationship_scope + multiplier = -0.25 + } + #Their opinion of me + opinion_modifier = { + trigger = { + exists = scope:relationship_option_soulmate + } + who = scope:relationship_scope + opinion_target = root + } + opinion_modifier = { + trigger = { + exists = scope:relationship_option_nemesis + } + who = scope:relationship_scope + opinion_target = root + multiplier = -0.25 + } + + ai_value_modifier = { + trigger = { + exists = scope:relationship_option_nemesis + } + ai_vengefulness = 0.5 + } + } + } + + option = { #Dynasty + name = fund_inspiration.0031.dynasty + trigger = { + exists = scope:dynasty_option + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:dynasty + } + set_variable = { + name = book_topic + value = flag:dynasty + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 25 + modifier = { + add = 50 + has_trait = arrogant + } + modifier = { + add = 25 + has_trait = ambitious + } + modifier = { #more likely if you have a _cool_ dynasty + add = 25 + dynasty = { + dynasty_prestige >= medium_dynasty_prestige_value + } + } + ai_value_modifier = { + ai_greed = 0.25 + } + } + } + + option = { #Mystical animal + name = fund_inspiration.0031.mystical_animal + trigger = { + exists = scope:mystical_animal_option + exists = var:animal_type + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:mystical_animal + } + } + remove_variable = animal_type + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 10 #Not common if you don't have the personality for it + modifier = { + add = 50 + has_trait = lifestyle_hunter + } + modifier = { + add = 25 + OR = { + has_trait = lunatic + has_trait = vengeful + has_trait = arrogant + } + } + ai_value_modifier = { + ai_energy = 0.25 + ai_rationality = -0.5 + } + } + } + + option = { #Pet + name = { + trigger = { exists = scope:pet_option_cat } + text = fund_inspiration.0031.pet_option_cat + } + name = { + trigger = { exists = scope:pet_option_dog } + text = fund_inspiration.0031.pet_option_dog + } + trigger = { + exists = scope:pet_option + } + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = flag:animals + } + if = { + limit = { + exists = scope:pet_option_cat + } + set_variable = { + name = book_topic + value = flag:animals_your_cat + } + set_variable = { + name = book_topic_cat_name + value = root.var:story_cycle_cat_name + } + } + else = { + set_variable = { + name = book_topic + value = flag:animals_your_dog + } + set_variable = { + name = book_topic_dog_name + value = root.var:story_cycle_dog_name + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 0 #Not something the AI will do unless they're a kid + modifier = { + add = 100 + is_adult = no + } + } + } + + option = { # Unification + name = fund_inspiration.0031.c + trigger = { + exists = scope:book_topic_unification + } + scope:inspiration_owner = { + if = { + limit = { + scope:united_title.tier >= tier_empire + } + set_variable = { + name = book_subject + value = flag:empire + } + } + else = { + set_variable = { + name = book_subject + value = flag:kingdom + } + } + set_variable = { + name = book_topic + value = flag:unification + } + set_variable = { + name = book_topic_united_title + value = scope:united_title + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.75 + } + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 25 + scope:united_title.tier >= tier_empire + } + } + } + + option = { # Formed/created/founded + name = fund_inspiration.0031.d + trigger = { + exists = scope:book_topic_creation + } + scope:inspiration_owner = { + if = { + limit = { + scope:created_title.tier >= tier_empire + } + set_variable = { + name = book_subject + value = flag:empire + } + } + else = { + set_variable = { + name = book_subject + value = flag:kingdom + } + } + set_variable = { + name = book_topic + value = flag:creation + } + set_variable = { + name = book_topic_created_title + value = scope:created_title + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.75 + } + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 25 + scope:created_title.tier >= tier_empire + } + } + } + + option = { # Restored + name = fund_inspiration.0031.e + trigger = { + exists = scope:book_topic_restoration + } + scope:inspiration_owner = { + if = { + limit = { + scope:restored_title.tier >= tier_empire + } + set_variable = { + name = book_subject + value = flag:empire + } + } + else = { + set_variable = { + name = book_subject + value = flag:kingdom + } + } + set_variable = { + name = book_topic + value = flag:restoration + } + set_variable = { + name = book_topic_restored_title + value = scope:restored_title + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.75 + } + modifier = { + add = 25 + has_trait = arrogant + } + modifier = { + add = 25 + scope:restored_title.tier >= tier_empire + } + } + } + + option = { #I don't care! + name = fund_inspiration.0031.f + scope:subject = { + scope:inspiration_owner = { + set_variable = { + name = book_subject + value = prev + } + } + } + custom_tooltip = fund_inspiration.they_decide_option_tt + ai_chance = { + base = 0 + } + } +} + + +# Book - they have a subject +# by Linnéa Thimrén +fund_inspiration.0032 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + exists = var:book_subject + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0032.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + hidden_effect = { + if = { # If they're a witch and you're funding their questionable projects they might try to recruit you + limit = { + OR = { + scope:inspiration_owner.var:book_subject = flag:medicine + scope:inspiration_owner.var:book_subject = flag:witch + } + scope:inspiration_owner = { + is_witch_trigger = yes + can_start_scheme = { + type = convert_to_witchcraft + target_character = root + } + } + is_witch_trigger = no + } + random = { + chance = 50 + modifier = { + add = 25 + trigger = { + scope:inspiration_owner.var:book_subject = flag:witch + } + } + scope:inspiration_owner = { + start_scheme = { + type = convert_to_witchcraft + target_character = root + } + } + } + } + } + } +} + + +# Tapestry - Choose a Subject +# by Sean Hughes +fund_inspiration.0041 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0041.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = weaver_inspiration + } + scope:inspiration_owner = { + NOR = { + exists = var:artifact_tapestry_scene + has_variable = banner_commission + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + random_list = { + pick = 3 + unique = yes + + 999 = { # A tribute to my victory at [location]. + trigger = { + exists = var:epic_battle_location + exists = var:epic_loser + } + save_scope_value_as = { + name = option_battle + value = yes + } + } + 10 = { # Something Abstract + trigger = { + faith_is_aniconic_trigger = yes + } + ai_value_modifier = { + ai_zeal = 0.2 + } + modifier = { + add = { + value = learning + subtract = decent_skill_rating + } + } + save_scope_value_as = { + name = option_abstract + value = yes + } + } + 10 = { # Something showcasing the untamed beauty of nature + save_scope_value_as = { + name = option_nature + value = yes + } + modifier = { + add = { + value = prowess + subtract = decent_skill_rating + } + } + } + 10 = { # Something that illustrates the history of the realm + trigger = { + faith_is_aniconic_trigger = no + } + save_scope_value_as = { + name = option_history + value = yes + } + modifier = { + add = { + value = diplomacy + subtract = decent_skill_rating + } + } + } + 10 = { # Something representing life in the realm + trigger = { + faith_is_aniconic_trigger = no + } + save_scope_value_as = { + name = option_life + value = yes + } + modifier = { + add = { + value = stewardship + subtract = decent_skill_rating + } + } + } + } + } + + option = { # A tribute to my victory at [location]. + trigger = { + exists = scope:option_battle + exists = var:epic_battle_location + exists = var:epic_loser + } + name = fund_inspiration.0041.option_battle + + hidden_effect = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:battle + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_honor = 1 + } + modifier = { + add = 100 + has_trait = brave + } + modifier = { + add = 50 + has_trait = education_martial + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + + option = { # Something Abstract + trigger = { + exists = scope:option_abstract + faith_is_aniconic_trigger = yes + } + name = fund_inspiration.0041.option_abstract + + hidden_effect = { + random_list = { + 40 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:geometric_patterns + } + } + } + 60 = { + trigger = { scope:inspiration_owner = { religion = religion:islam_religion } } + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:calligraphic + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + modifier = { + add = { + value = learning + subtract = decent_skill_rating + multiply = 10 + } + } + } + } + + option = { # Something showcasing the untamed beauty of nature + trigger = { + exists = scope:option_nature + } + name = fund_inspiration.0041.option_nature + hidden_effect = { + random_list = { + 33 = { + trigger = { NOT = { faith = { has_doctrine_parameter = pacifist_opinion_active } } } + modifier = { + has_trait = lifestyle_hunter + factor = 4 # 66% chance if hunter, 33% chance otherwise + } + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:hunt + } + } + } + 33 = { + trigger = { NOT = { faith = { has_doctrine_parameter = pacifist_opinion_active } } } + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:animals + } + } + } + 33 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:garden + } + } + } + } + } + ai_chance = { + base = 100 + modifier = { + add = 400 + has_trait = witch + } + } + } + + option = { # Something that illustrates the history of the realm + trigger = { + exists = scope:option_history + faith_is_aniconic_trigger = no + } + name = fund_inspiration.0041.option_history + hidden_effect = { + random_list = { + 50 = { + trigger = { + culture = { + OR = { + has_cultural_tradition = tradition_seafaring + has_cultural_tradition = tradition_maritime_mercantilism + } + } + } + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:ships + } + } + } + 25 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:historical + } + } + } + 25 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:coronation + } + } + } + } + } + ai_chance = { + base = 100 + modifier = { + add = 200 + has_trait = arrogant + } + modifier = { + add = { + value = diplomacy + subtract = decent_skill_rating + multiply = 10 + } + } + } + } + + option = { # Something representing life in the realm + trigger = { + exists = scope:option_life + faith_is_aniconic_trigger = no + } + name = fund_inspiration.0041.option_life + hidden_effect = { + random_list = { + 33 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:bucolic + } + } + } + 33 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:banquet + } + } + } + 33 = { + scope:inspiration_owner = { + set_variable = { + name = artifact_tapestry_scene + value = flag:hearing + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + add = { + value = stewardship + subtract = decent_skill_rating + multiply = 10 + } + } + } + } + + after = { + custom_tooltip = fund_inspiration.you_decide_option_tt + } +} + +# Tapestry - Subject already chosen +# by Sean Hughes +fund_inspiration.0042 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = weaver_inspiration + inspiration_owner = { #They know what tapestry they want to make + exists = var:artifact_tapestry_scene + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0042.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + +# Banner - Choose a Subject +# by Joe Parkin +fund_inspiration.0043 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0043.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = weaver_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + } + + option = { # Title + name = fund_inspiration.0043.option_title + scope:inspiration_owner = { + set_variable = { + name = artifact_banner_type + value = flag:title + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = -0.5 + } + } + } + + option = { # House + name = fund_inspiration.0043.option_house + scope:inspiration_owner = { + set_variable = { + name = artifact_banner_type + value = flag:house + } + } + ai_chance = { + base = 25 + modifier = { + factor = 2 + house.house_head = root + } + modifier = { + factor = 0.5 + any_character_artifact = { + exists = var:banner_house + var:banner_house = root.house + } + } + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { # Dynasty + name = fund_inspiration.0043.option_dynasty + trigger = { + AND = { + OR = { + this = dynasty.dynast # Dynasty Head + any_parent = { # Parent landless + employer = prev + dynasty = prev.dynasty + this = dynasty.dynast + } + } + NOR = { + any_artifact = { + trigger_if = { + limit = { exists = var:banner_dynasty } + var:banner_dynasty = root.dynasty + } + trigger_else = { always = no } + OR = { + artifact_owner = root + artifact_owner = { in_diplomatic_range = root } + } + } + any_inspiration = { + inspiration_sponsor.dynasty = root.dynasty + inspiration_owner = { + has_variable = banner_commission + trigger_if = { + limit = { exists = var:artifact_banner_type } + var:artifact_banner_type = flag:dynasty + } + trigger_else = { always = no } + } + } + } + } + } + scope:inspiration_owner = { + set_variable = { + name = artifact_banner_type + value = flag:dynasty + } + } + custom_tooltip = fund_inspiration.0043.option_dynasty_tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + after = { + custom_tooltip = fund_inspiration.you_decide_option_tt + } +} + +# Wall Hanging - choose tapestry or banner +fund_inspiration.0044 = { + type = character_event + title = fund_inspiration.0044.t + desc = fund_inspiration.0044.desc + theme = realm + override_background = { + reference = study + } + left_portrait = { + character = scope:antiquarian + animation = steward + } + + option = { # Tapestry + name = fund_inspiration.0044.option_tapestry + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { # Banner + name = fund_inspiration.0044.option_banner + scope:local_artisan = { set_variable = banner_commission } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + after = { + scope:local_artisan = { + create_inspiration = weaver_inspiration + inspiration = { + save_scope_as = this_inspiration + } + if = { + # To avoid false-positives during tooltip generation. + limit = { exists = scope:this_inspiration } + root = { sponsor_inspiration = scope:this_inspiration } + } + } + custom_tooltip = fund_inspiration.you_decide_tapestry_option_tt + } +} + +# Adventurer - Choose destination +# By Bianca Savazzi and Linnéa Thimrén + +# What options should we show? +scripted_effect fund_inspiration_0051_pick_options_to_show_effect = { + hidden_effect = { + random_list = { + 1 = { + # Africa + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_africa + } + } + NOT = { exists = scope:africa_option } + } + save_scope_value_as = { + name = africa_option + value = yes + } + } + 1 = { + # West Africa + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_africa_west + } + } + NOT = { exists = scope:africa_west_option } + } + save_scope_value_as = { + name = africa_west_option + value = yes + } + } + 1 = { + # North Africa + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_africa_north + } + } + NOT = { exists = scope:africa_north_option } + } + save_scope_value_as = { + name = africa_north_option + value = yes + } + } + 1 = { + # East Africa + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_africa_east + } + } + NOT = { exists = scope:africa_east_option } + } + save_scope_value_as = { + name = africa_east_option + value = yes + } + } + 1 = { + # Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe + } + } + NOT = { exists = scope:europe_option } + } + save_scope_value_as = { + name = europe_option + value = yes + } + } + 1 = { + # North Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe_north + } + } + NOT = { exists = scope:europe_north_option } + } + save_scope_value_as = { + name = europe_north_option + value = yes + } + } + 1 = { + # South Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe_south + } + } + NOT = { exists = scope:europe_south_option } + } + save_scope_value_as = { + name = europe_south_option + value = yes + } + } + 1 = { + # West Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe_west + } + } + NOT = { exists = scope:europe_west_option } + } + save_scope_value_as = { + name = europe_west_option + value = yes + } + } + 1 = { + # East Europe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_europe_east + } + } + NOT = { exists = scope:europe_east_option } + } + save_scope_value_as = { + name = europe_east_option + value = yes + } + } + 1 = { + # Middle East + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_middle_east + } + } + NOT = { exists = scope:middle_east_option } + } + save_scope_value_as = { + name = middle_east_option + value = yes + } + } + 1 = { + # Middle East - Jerusalem + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_middle_east_jerusalem + } + } + NOT = { exists = scope:middle_east_jerusalem_option } + } + save_scope_value_as = { + name = middle_east_jerusalem_option + value = yes + } + } + 1 = { + # Middle East - Arabia + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_middle_east_arabia + } + } + NOT = { exists = scope:middle_east_arabia_option } + } + save_scope_value_as = { + name = middle_east_arabia_option + value = yes + } + } + 1 = { + # Middle East - Persia + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_middle_east_persia + } + } + NOT = { exists = scope:middle_east_persia_option } + } + save_scope_value_as = { + name = middle_east_persia_option + value = yes + } + } + 1 = { + # India + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_india + } + } + NOT = { exists = scope:india_option } + } + save_scope_value_as = { + name = india_option + value = yes + } + } + 1 = { + # India - Deccan + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_india_deccan + } + } + NOT = { exists = scope:india_deccan_option } + } + save_scope_value_as = { + name = india_deccan_option + value = yes + } + } + 1 = { + # India - Bengal + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_india_bengal + } + } + NOT = { exists = scope:india_bengal_option } + } + save_scope_value_as = { + name = india_bengal_option + value = yes + } + } + 1 = { + # India - Rajastan + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_india_rajastan + } + } + NOT = { exists = scope:india_rajastan_option } + } + save_scope_value_as = { + name = india_rajastan_option + value = yes + } + } + 1 = { + # The Steppe + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_steppe + } + } + NOT = { exists = scope:steppe_option } + } + save_scope_value_as = { + name = steppe_option + value = yes + } + } + 1 = { + # The Steppe - West + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_steppe_west + } + } + NOT = { exists = scope:steppe_west_option } + } + save_scope_value_as = { + name = steppe_west_option + value = yes + } + } + 1 = { + # The Steppe - East + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_steppe_east + } + } + NOT = { exists = scope:steppe_east_option } + } + save_scope_value_as = { + name = steppe_east_option + value = yes + } + } + 1 = { + # The Steppe - Tarim + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_steppe_tarim + } + } + NOT = { exists = scope:steppe_tarim_option } + } + save_scope_value_as = { + name = steppe_tarim_option + value = yes + } + } + 1 = { + # Asia - Minor + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_minor + } + } + NOT = { exists = scope:asia_minor_option } + } + save_scope_value_as = { + name = asia_minor_option + value = yes + } + } + 1 = { + # Burma + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_burma + } + } + NOT = { exists = scope:burma_option } + } + save_scope_value_as = { + name = burma_option + value = yes + } + } + 1 = { + # Tibet + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_tibet + } + } + NOT = { exists = scope:tibet_option } + } + save_scope_value_as = { + name = tibet_option + value = yes + } + } + 1 = { + # East Asia + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_china + } + } + NOT = { exists = scope:east_asia_option } + } + save_scope_value_as = { + name = east_asia_option + value = yes + } + } + 1 = { + # China + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_china + } + } + NOT = { exists = scope:china_option } + } + save_scope_value_as = { + name = china_option + value = yes + } + } + 1 = { + # Korea + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_korea + } + } + NOT = { exists = scope:korea_option } + } + save_scope_value_as = { + name = korea_option + value = yes + } + } + 1 = { + # Japan + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_japan + } + } + NOT = { exists = scope:japan_option } + } + save_scope_value_as = { + name = japan_option + value = yes + } + } + 1 = { + # Southeast Asia + trigger = { + scope:inspiration_owner = { + adventurer_potential_destination_distance_check = { + REGION = world_asia_southeast + } + } + NOT = { exists = scope:southeast_asia_option } + } + save_scope_value_as = { + name = southeast_asia_option + value = yes + } + } + } + } +} + +scripted_effect fund_adventure_inspiration_start_effect = { + hidden_effect = { + if = { #Should always exists, but we add this check to avoid the tooltip errors + limit = { + exists = $ADVENTURER$.var:adventure_destination + } + get_adventure_inspiration_start_location = { ADVENTURER = $ADVENTURER$ } #To save the location so we can use it in the effect + } + if = { #Should always exists, but we add this check to avoid the tooltip errors + limit = { + exists = scope:location + exists = scope:location.title_province + } + start_adventure_effect = { + ADVENTURER = $ADVENTURER$ + LOCATION = scope:location.title_province + } + } + } +} + +fund_inspiration.0051 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0051.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + inspiration_owner = { #They haven't already decided where to go + NOT = { exists = var:adventure_destination } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + + save_scope_as = actor + scope:inspiration_owner = { + assign_quirk_effect = yes + save_scope_as = recipient + } + show_as_tooltip = { + fund_inspiration_effect = yes + } + fund_inspiration_0051_pick_options_to_show_effect = yes + fund_inspiration_0051_pick_options_to_show_effect = yes + fund_inspiration_0051_pick_options_to_show_effect = yes + } + + option = { #africa + name = fund_inspiration.0051.africa + trigger = { exists = scope:africa_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:africa + } + } + + ai_chance = { + base = 50 + } + } + + option = { #africa_west + name = fund_inspiration.0051.africa_west + trigger = { exists = scope:africa_west_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:africa_west + } + } + ai_chance = { + base = 50 + } + } + + option = { #africa_north + name = fund_inspiration.0051.africa_north + trigger = { exists = scope:africa_north_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:africa_north + } + } + ai_chance = { + base = 50 + } + } + + option = { #africa_east + name = fund_inspiration.0051.africa_east + trigger = { exists = scope:africa_east_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:africa_east + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe + name = fund_inspiration.0051.europe + trigger = { exists = scope:europe_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe_north + name = fund_inspiration.0051.europe_north + trigger = { exists = scope:europe_north_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe_north + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe_south + name = fund_inspiration.0051.europe_south + trigger = { exists = scope:europe_south_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe_south + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe_west + name = fund_inspiration.0051.europe_west + trigger = { exists = scope:europe_west_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe_west + } + } + ai_chance = { + base = 50 + } + } + + option = { #europe_east + name = fund_inspiration.0051.europe_east + trigger = { exists = scope:europe_east_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:europe_east + } + } + ai_chance = { + base = 50 + } + } + + option = { #middle_east + name = fund_inspiration.0051.middle_east + trigger = { exists = scope:middle_east_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:middle_east + } + } + ai_chance = { + base = 50 + } + } + + option = { #middle_east_jerusalem + name = fund_inspiration.0051.middle_east_jerusalem + trigger = { exists = scope:middle_east_jerusalem_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:middle_east_jerusalem + } + } + ai_chance = { + base = 50 + } + } + + option = { #middle_east_arabia + name = fund_inspiration.0051.middle_east_arabia + trigger = { exists = scope:middle_east_arabia_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:middle_east_arabia + } + } + ai_chance = { + base = 50 + } + } + + option = { #middle_east_persia + name = fund_inspiration.0051.middle_east_persia + trigger = { exists = scope:middle_east_persia_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:middle_east_persia + } + } + ai_chance = { + base = 50 + } + } + + option = { #india + name = fund_inspiration.0051.india + trigger = { exists = scope:india_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:india + } + } + ai_chance = { + base = 50 + } + } + + option = { #india_deccan + name = fund_inspiration.0051.india_deccan + trigger = { exists = scope:india_deccan_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:india_deccan + } + } + ai_chance = { + base = 50 + } + } + + option = { #india_bengal + name = fund_inspiration.0051.india_bengal + trigger = { exists = scope:india_bengal_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:india_bengal + } + } + ai_chance = { + base = 50 + } + } + + option = { #india_rajastan + name = fund_inspiration.0051.india_rajastan + trigger = { exists = scope:india_rajastan_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:india_rajastan + } + } + ai_chance = { + base = 50 + } + } + + option = { #steppe + name = fund_inspiration.0051.steppe + trigger = { exists = scope:steppe_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:steppe + } + } + ai_chance = { + base = 50 + } + } + + option = { #steppe_west + name = fund_inspiration.0051.steppe_west + trigger = { exists = scope:steppe_west_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:steppe_west + } + } + ai_chance = { + base = 50 + } + } + + option = { #steppe_east + name = fund_inspiration.0051.steppe_east + trigger = { exists = scope:steppe_east_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:steppe_east + } + } + ai_chance = { + base = 50 + } + } + + option = { #steppe_tarim + name = fund_inspiration.0051.steppe_tarim + trigger = { exists = scope:steppe_tarim_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:steppe_tarim + } + } + ai_chance = { + base = 50 + } + } + + option = { #asia_minor + name = fund_inspiration.0051.asia_minor + trigger = { exists = scope:asia_minor_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:asia_minor + } + } + ai_chance = { + base = 50 + } + } + + option = { #burma + name = fund_inspiration.0051.burma + trigger = { exists = scope:burma_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:burma + } + } + ai_chance = { + base = 50 + } + } + + option = { #tibet + name = fund_inspiration.0051.tibet + trigger = { exists = scope:tibet_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:tibet + } + } + ai_chance = { + base = 50 + } + } + + option = { #East Asia + name = fund_inspiration.0051.east_asia + trigger = { exists = scope:east_asia_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:east_asia + } + } + ai_chance = { + base = 50 + } + } + + option = { #China + name = fund_inspiration.0051.china + trigger = { exists = scope:china_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:china + } + } + ai_chance = { + base = 50 + } + } + + option = { #Korea + name = fund_inspiration.0051.korea + trigger = { exists = scope:korea_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:korea + } + } + ai_chance = { + base = 50 + } + } + + option = { #Japan + name = fund_inspiration.0051.japan + trigger = { exists = scope:japan_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:japan + } + } + ai_chance = { + base = 50 + } + } + + option = { #Southeast Asia + name = fund_inspiration.0051.southeast_asia + trigger = { exists = scope:southeast_asia_option } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = adventure_destination + value = flag:southeast_asia + } + } + ai_chance = { + base = 50 + } + } + + option = { #Go where you want to go! + name = fund_inspiration.0051.d + custom_tooltip = fund_inspiration.they_decide_option_tt + set_adventure_location_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_DESTINATION = no + } + + ai_chance = { + base = 5 + modifier = { + add = 25 + OR = { + has_trait = arbitrary + has_trait = lazy + } + } + } + } +} + +# Adventure - Destination already chosen +# by Linnéa Thimrén +fund_inspiration.0052 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + inspiration_owner = { #They have already decided where to go + exists = var:adventure_destination + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + set_variable = gone_adventuring + } + send_interface_toast = { + title = fund_inspiration.0052.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + +# Adventure maintenance, to make sure the inspiration progresses and to trigger the completion event + +scripted_effect fund_adventure_inspiration_travel_progress_effect = { + if = { # Africa + limit = { + var:adventure_destination = flag:africa + } + random_county_in_region = { + region = world_africa + title_province = { save_scope_as = location } + } + } + else_if = { # West Africa + limit = { + var:adventure_destination = flag:africa_west + } + random_county_in_region = { + region = world_africa_west + title_province = { save_scope_as = location } + } + } + else_if = { # North Africa + limit = { + var:adventure_destination = flag:africa_north + } + random_county_in_region = { + region = world_africa_north + title_province = { save_scope_as = location } + } + } + else_if = { # East Africa + limit = { + var:adventure_destination = flag:africa_east + } + random_county_in_region = { + region = world_africa_east + title_province = { save_scope_as = location } + } + } + else_if = { # Europe + limit = { + var:adventure_destination = flag:europe + } + random_county_in_region = { + region = world_europe + title_province = { save_scope_as = location } + } + } + else_if = { # North Europe + limit = { + var:adventure_destination = flag:europe_north + } + random_county_in_region = { + region = world_europe_north + title_province = { save_scope_as = location } + } + } + else_if = { # South Europe + limit = { + var:adventure_destination = flag:europe_south + } + random_county_in_region = { + region = world_europe_south + title_province = { save_scope_as = location } + } + } + else_if = { # West Europe + limit = { + var:adventure_destination = flag:europe_west + } + random_county_in_region = { + region = world_europe_west + title_province = { save_scope_as = location } + } + } + else_if = { # East Europe + limit = { + var:adventure_destination = flag:europe_east + } + random_county_in_region = { + region = world_europe_east + title_province = { save_scope_as = location } + } + } + else_if = { # Middle East + limit = { + var:adventure_destination = flag:middle_east + } + random_county_in_region = { + region = world_middle_east + title_province = { save_scope_as = location } + } + } + else_if = { # Middle East - Jerusalem + limit = { + var:adventure_destination = flag:middle_east_jerusalem + } + random_county_in_region = { + region = world_middle_east_jerusalem + title_province = { save_scope_as = location } + } + } + else_if = { # Middle East - Arabia + limit = { + var:adventure_destination = flag:middle_east_arabia + } + random_county_in_region = { + region = world_middle_east_arabia + title_province = { save_scope_as = location } + } + } + else_if = { # Middle East - Persia + limit = { + var:adventure_destination = flag:middle_east_persia + } + random_county_in_region = { + region = world_middle_east_persia + title_province = { save_scope_as = location } + } + } + else_if = { # India + limit = { + var:adventure_destination = flag:india + } + random_county_in_region = { + region = world_india + title_province = { save_scope_as = location } + } + } + else_if = { # India - Deccan + limit = { + var:adventure_destination = flag:india_deccan + } + random_county_in_region = { + region = world_india_deccan + title_province = { save_scope_as = location } + } + } + else_if = { # India - Bengal + limit = { + var:adventure_destination = flag:india_bengal + } + random_county_in_region = { + region = world_india_bengal + title_province = { save_scope_as = location } + } + } + else_if = { # India - Rajastan + limit = { + var:adventure_destination = flag:india_rajastan + } + random_county_in_region = { + region = world_india_rajastan + title_province = { save_scope_as = location } + } + } + else_if = { # The Steppe + limit = { + var:adventure_destination = flag:steppe + } + random_county_in_region = { + region = world_steppe + title_province = { save_scope_as = location } + } + } + else_if = { # The Steppe - West + limit = { + var:adventure_destination = flag:steppe_west + } + random_county_in_region = { + region = world_steppe_west + title_province = { save_scope_as = location } + } + } + else_if = { # The Steppe - East + limit = { + var:adventure_destination = flag:steppe_east + } + random_county_in_region = { + region = world_steppe_east + title_province = { save_scope_as = location } + } + } + else_if = { # The Steppe - Tarim + limit = { + var:adventure_destination = flag:steppe_tarim + } + random_county_in_region = { + region = world_steppe_tarim + title_province = { save_scope_as = location } + } + } + else_if = { # Asia - Minor + limit = { + var:adventure_destination = flag:asia_minor + } + random_county_in_region = { + region = world_asia_minor + title_province = { save_scope_as = location } + } + } + else_if = { # Burma + limit = { + var:adventure_destination = flag:burma + } + random_county_in_region = { + region = world_burma + title_province = { save_scope_as = location } + } + } + else_if = { # Tibet + limit = { + var:adventure_destination = flag:tibet + } + random_county_in_region = { + region = world_tibet + title_province = { save_scope_as = location } + } + } + else_if = { # China + limit = { + var:adventure_destination = flag:east_asia + } + random_county_in_region = { + region = world_asia_east + title_province = { save_scope_as = location } + } + } + else_if = { # China + limit = { + var:adventure_destination = flag:china + } + random_county_in_region = { + region = world_asia_china + title_province = { save_scope_as = location } + } + } + else_if = { # Japan + limit = { + var:adventure_destination = flag:japan + } + random_county_in_region = { + region = world_asia_japan + title_province = { save_scope_as = location } + } + } + else_if = { # Korea + limit = { + var:adventure_destination = flag:korea + } + random_county_in_region = { + region = world_asia_korea + title_province = { save_scope_as = location } + } + } + else_if = { # Southeast Asia + limit = { + var:adventure_destination = flag:southeast_asia + } + random_county_in_region = { + region = world_asia_southeast + title_province = { save_scope_as = location } + } + } + + scope:inspiration_owner = { + set_location = { + location = scope:location + stick_to_location = yes + } + } +} + + +# Triggered from on_progress_increased in the adventurer inspiration script - to mimic progress happening over the years +# by Linnéa Thimrén +fund_inspiration.0053 = { + hidden = yes + + trigger = { + inspiration ?= { + has_inspiration_type = adventure_inspiration + inspiration_sponsor ?= { is_alive = yes } + inspiration_progress < 10 + } + } + + immediate = { + fund_adventure_inspiration_travel_progress_effect = yes #Adventurer moves on to a new location in the targeted region. + } +} + +# Adventure - Fallback to end it all if it's been going on for too long. Triggered from start_adventure_effect +# by Linnéa Thimrén +fund_inspiration.0054 = { + hidden = yes + + trigger = { + inspiration ?= { + has_inspiration_type = adventure_inspiration + inspiration_sponsor ?= { is_alive = yes } + } + } + + on_trigger_fail = { #If something has gone wrong we do some cleanup + if = { + limit = { exists = scope:inspiration } + save_scope_as = inspiration_owner + inspiration_completion_effect = yes + if = { + limit = { exists = scope:inspiration.inspiration_sponsor } + scope:inspiration.inspiration_sponsor = { end_inspiration_sponsorship = scope:inspiration } + } + } + } + + immediate = { + # Send adventurer back home + scope:inspiration_owner = { + set_location_to_default = yes + } + #Finish the inspiration + inspiration = { change_inspiration_progress = 10 } + } +} + + + +# Artisan - Choose what they make +scripted_trigger fund_inspiration_0061_option_chest_trigger = { + NOT = { exists = scope:artisan_type_chest_option } +} +scripted_trigger fund_inspiration_0061_option_box_trigger = { + NOT = { exists = scope:artisan_type_box_option } +} +scripted_trigger fund_inspiration_0061_option_sculpture_trigger = { + NOT = { exists = scope:artisan_type_sculpture_option } +} +scripted_trigger fund_inspiration_0061_option_cabinet_trigger = { + NOT = { exists = scope:artisan_type_cabinet_option } +} +scripted_trigger fund_inspiration_0061_option_throne_trigger = { + NOT = { exists = scope:artisan_type_throne_option } +} +scripted_trigger fund_inspiration_0061_option_scientific_apparatus_trigger = { + # Currently the only available apparatus is DLC-locked - mildly rework this trigger if we add more. + has_fp2_dlc_trigger = yes + # We need to verify that the character is eligible + eligible_for_scientific_apparatus_armillary_sphere_trigger = { CHARACTER = root } + NOT = { exists = scope:artisan_type_scientific_apparatus_option } +} +scripted_trigger fund_inspiration_0061_option_urn_trigger = { + NOT = { exists = scope:artisan_type_urn_option } +} +scripted_trigger fund_inspiration_0061_option_icon_trigger = { + NOT = { exists = scope:artisan_type_icon_option } + faith_is_aniconic_trigger = no +} +scripted_effect fund_inspiration_0061_pick_options_to_show_effect = { + #What options do we show? + hidden_effect = { + random_list = { + 10 = { + trigger = { + fund_inspiration_0061_option_chest_trigger = yes + } + save_scope_value_as = { + name = artisan_type_chest_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_box_trigger = yes + } + save_scope_value_as = { + name = artisan_type_box_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_sculpture_trigger = yes + } + save_scope_value_as = { + name = artisan_type_sculpture_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_cabinet_trigger = yes + } + save_scope_value_as = { + name = artisan_type_cabinet_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_throne_trigger = yes + } + save_scope_value_as = { + name = artisan_type_throne_option + value = yes + } + } + # DLC options get a boost to make them more visible. + 50 = { + trigger = { + fund_inspiration_0061_option_scientific_apparatus_trigger = yes + } + save_scope_value_as = { + name = artisan_type_scientific_apparatus_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0061_option_urn_trigger = yes + } + save_scope_value_as = { + name = artisan_type_urn_option + value = yes + } + } + 50 = { + trigger = { + fund_inspiration_0061_option_icon_trigger = yes + } + save_scope_value_as = { + name = artisan_type_icon_option + value = yes + } + } + } + } +} + +fund_inspiration.0061 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0061.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = artisan_inspiration + inspiration_owner = { #They haven't already decided what to make + NOT = { exists = var:artifact_artisan_type } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0061_pick_options_to_show_effect = yes + fund_inspiration_0061_pick_options_to_show_effect = yes + fund_inspiration_0061_pick_options_to_show_effect = yes + } + + #Chest + option = { + name = fund_inspiration.0061.chest + trigger = { + exists = scope:artisan_type_chest_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_chest + } + } + ai_chance = { + base = 10 + + } + } + + #Box + option = { + name = fund_inspiration.0061.box + trigger = { + exists = scope:artisan_type_box_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_box + } + } + ai_chance = { + base = 10 + + } + } + + #Sculpture + option = { + name = fund_inspiration.0061.sculpture + trigger = { + exists = scope:artisan_type_sculpture_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_sculpture + } + } + ai_chance = { + base = 10 + } + } + + #Cabinet + option = { + name = fund_inspiration.0061.cabinet + trigger = { + exists = scope:artisan_type_cabinet_option + scope:inspiration_owner = { + NOR = { + artifact_use_indian_building_visuals_trigger = yes + artifact_use_mena_building_visuals_trigger = yes + } + } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_cabinet + } + } + ai_chance = { + base = 10 + + } + } + + #Diwan + option = { + name = fund_inspiration.0061.diwan + trigger = { + exists = scope:artisan_type_cabinet_option + scope:inspiration_owner = { artifact_use_indian_building_visuals_trigger = yes } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_cabinet + } + } + ai_chance = { + base = 10 + + } + } + + #Table + option = { + name = fund_inspiration.0061.table + trigger = { + exists = scope:artisan_type_cabinet_option + scope:inspiration_owner = { artifact_use_mena_building_visuals_trigger = yes } + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_cabinet + } + } + ai_chance = { + base = 10 + + } + } + + #Throne + option = { + name = fund_inspiration.0061.throne + trigger = { + exists = scope:artisan_type_throne_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_throne + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = throne + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + artisan_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 2 + artifact_slot_type = throne + } + } + } + } + } + } + + #Scientific Apparatus + option = { + name = fund_inspiration.0061.scientific_apparatus + trigger = { + exists = scope:artisan_type_scientific_apparatus_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + roll_scientific_apparatus_effect = { CHARACTER = root } + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_scientific_apparatus + } + } + ai_chance = { + base = 10 + } + } + + #Urn + option = { + name = fund_inspiration.0061.urn + trigger = { + exists = scope:artisan_type_urn_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_urn + } + } + ai_chance = { + base = 10 + } + } + + #Icon + option = { + name = fund_inspiration.0061.icon + trigger = { + exists = scope:artisan_type_icon_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_artisan_type + value = flag:artisan_type_icon + } + } + ai_chance = { + base = 10 + } + } +} + +# Artisan - they know what they want to make +# by Linnéa Thimrén +fund_inspiration.0062 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = artisan_inspiration + inspiration_owner = { #They have already decided what to make + exists = var:artifact_artisan_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0062.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + +# Smith - Choose what they make +# by Linnéa Thimrén +scripted_trigger fund_inspiration_0071_option_brooch_trigger = { + NOT = { exists = scope:smith_type_brooch_option } +} +scripted_trigger fund_inspiration_0071_option_regalia_trigger = { + NOT = { exists = scope:smith_type_regalia_option } +} +scripted_trigger fund_inspiration_0071_option_crown_trigger = { + NOT = { exists = scope:smith_type_crown_option } +} +scripted_trigger fund_inspiration_0071_option_goblet_trigger = { + NOT = { exists = scope:smith_type_goblet_option } +} +scripted_trigger fund_inspiration_0071_option_aquamanile_trigger = { + has_fp2_dlc_trigger = yes + NOT = { exists = scope:smith_type_aquamanile_option } + # These occurred in other faiths too, so we don't restrict their religious usage, but were much more ubiquitous in Islam. + religion = religion:islam_religion +} +scripted_trigger fund_inspiration_0071_option_incense_burner_sculpture_trigger = { + has_fp3_dlc_trigger = yes + NOT = { exists = scope:smith_type_incense_burner_sculpture_option } + # These occurred in other faiths too, so we don't restrict their religious usage, but were much more ubiquitous in Islam. + religion = religion:islam_religion +} +scripted_effect fund_inspiration_0071_pick_options_to_show_effect = { + #What options do we show? + hidden_effect = { + random_list = { + 10 = { + trigger = { + fund_inspiration_0071_option_brooch_trigger = yes + } + save_scope_value_as = { + name = smith_type_brooch_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0071_option_regalia_trigger = yes + } + save_scope_value_as = { + name = smith_type_regalia_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0071_option_crown_trigger = yes + } + save_scope_value_as = { + name = smith_type_crown_option + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0071_option_goblet_trigger = yes + } + save_scope_value_as = { + name = smith_type_goblet_option + value = yes + } + } + # DLC options get a boost to make them more visible. + 50 = { + trigger = { + fund_inspiration_0071_option_aquamanile_trigger = yes + } + save_scope_value_as = { + name = smith_type_aquamanile_option + value = yes + } + } + 50 = { + trigger = { + fund_inspiration_0071_option_incense_burner_sculpture_trigger = yes + } + save_scope_value_as = { + name = smith_type_incense_burner_sculpture_option + value = yes + } + } + } + } +} + +fund_inspiration.0071 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0071.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = smith_inspiration + inspiration_owner = { #They haven't already decided what to make + NOT = { exists = var:artifact_smith_type } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0071_pick_options_to_show_effect = yes + fund_inspiration_0071_pick_options_to_show_effect = yes + fund_inspiration_0071_pick_options_to_show_effect = yes + } + + #Brooch + option = { + name = fund_inspiration.0071.brooch + trigger = { + exists = scope:smith_type_brooch_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_brooch + } + } + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = miscellaneous + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + smith_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 4 + artifact_slot_type = miscellaneous + } + } + } + } + } + } + + #Regalia + option = { + name = fund_inspiration.0071.regalia + trigger = { + exists = scope:smith_type_regalia_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_regalia + } + } + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = regalia + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + smith_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 2 + artifact_slot_type = regalia + } + } + } + } + } + } + + #Crown + option = { + name = fund_inspiration.0071.crown + trigger = { + exists = scope:smith_type_crown_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_crown + } + } + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = helmet + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + smith_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 2 + artifact_slot_type = helmet + } + } + } + } + } + } + + #Goblet + option = { + name = fund_inspiration.0071.goblet + trigger = { + exists = scope:smith_type_goblet_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_goblet + } + } + ai_chance = { + base = 10 + + } + } + + #Aquamanile + option = { + name = fund_inspiration.0071.aquamanile + trigger = { + exists = scope:smith_type_aquamanile_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_aquamanile + } + } + ai_chance = { + base = 10 + + } + } + + #Incense Burner Sculpture + option = { + name = fund_inspiration.0071.incense_burner_sculpture + trigger = { + exists = scope:smith_type_incense_burner_sculpture_option + } + custom_tooltip = fund_inspiration.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_smith_type + value = flag:smith_type_incense_burner_sculpture + } + } + ai_chance = { + base = 10 + + } + } +} + +# Smith - they know what they want to make +# by Linnéa Thimrén +fund_inspiration.0072 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = smith_inspiration + inspiration_owner = { #They have already decided what to make + exists = var:artifact_smith_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0072.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + + +# Alchemy - Choose what they make +# by Linnéa Thimrén +scripted_trigger fund_inspiration_0081_option_elixirs_trigger = { + NOT = { exists = scope:alchemy_type_elixirs } +} +scripted_trigger fund_inspiration_0081_option_metals_trigger = { + NOT = { exists = scope:alchemy_type_metals } +} +scripted_trigger fund_inspiration_0081_option_panacea_trigger = { + NOT = { exists = scope:alchemy_type_panacea } +} +scripted_trigger fund_inspiration_0081_option_immortality_trigger = { + NOT = { exists = scope:alchemy_type_immortality } +} + +scripted_effect fund_inspiration_0081_pick_options_to_show_effect = { + #What options do we show? + hidden_effect = { + random_list = { + 10 = { + trigger = { + fund_inspiration_0081_option_elixirs_trigger = yes + } + save_scope_value_as = { + name = alchemy_type_elixirs + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0081_option_metals_trigger = yes + } + save_scope_value_as = { + name = alchemy_type_metals + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0081_option_panacea_trigger = yes + } + save_scope_value_as = { + name = alchemy_type_panacea + value = yes + } + } + 10 = { + trigger = { + fund_inspiration_0081_option_immortality_trigger = yes + } + save_scope_value_as = { + name = alchemy_type_immortality + value = yes + } + } + } + } +} + +fund_inspiration.0081 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0081.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { #They haven't already decided what to make + NOT = { exists = var:artifact_alchemy_type } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + assign_quirk_effect = yes + } + + show_as_tooltip = { + fund_inspiration_effect = yes + } + + # What options should we show? + fund_inspiration_0081_pick_options_to_show_effect = yes + fund_inspiration_0081_pick_options_to_show_effect = yes + fund_inspiration_0081_pick_options_to_show_effect = yes + } + + #Elixir + option = { + name = fund_inspiration.0081.elixirs + trigger = { + exists = scope:alchemy_type_elixirs + } + custom_tooltip = fund_inspiration.0081.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type + value = flag:alchemy_type_elixirs + } + } + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = scholar + } + ai_value_modifier = { + ai_boldness = 0.15 + ai_rationality = 0.5 + } + } + } + + #Metals + option = { + name = fund_inspiration.0081.metals + trigger = { + exists = scope:alchemy_type_metals + } + custom_tooltip = fund_inspiration.0081.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type + value = flag:alchemy_type_metals + } + } + ai_chance = { + base = 10 + modifier = { + add = 15 + has_lifestyle = learning_lifestyle + } + ai_value_modifier = { + ai_greed = 0.25 + ai_rationality = 0.15 + ai_boldness = 0.1 + } + } + } + + #Panacea + option = { + name = fund_inspiration.0081.panacea + trigger = { + exists = scope:alchemy_type_panacea + } + custom_tooltip = fund_inspiration.0081.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type + value = flag:alchemy_type_panacea + } + } + ai_chance = { + base = 10 + modifier = { + add = 25 + has_trait = lifestyle_physician + } + modifier = { + add = 15 + has_lifestyle = learning_lifestyle + } + ai_value_modifier = { + ai_zeal = 0.25 + ai_rationality = 0.25 + ai_boldness = -0.15 + ai_greed = -0.15 + } + } + } + + #Immortality + option = { + name = fund_inspiration.0081.immortality + trigger = { + exists = scope:alchemy_type_immortality + } + custom_tooltip = fund_inspiration.0081.you_decide_option_tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type + value = flag:alchemy_type_immortality + } + } + ai_chance = { + base = 10 + modifier = { + add = 25 + has_trait = arrogant + } + ai_value_modifier = { + ai_greed = 0.75 + ai_boldness = 0.5 + ai_zeal = -0.25 + ai_rationality = -0.15 + } + } + } + + #They decide + option = { + name = fund_inspiration.0031.f + custom_tooltip = fund_inspiration.0081.they_decide_option_tt + hidden_effect = { + set_alchemy_inspiration_type_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_TYPE = no + } + } + ai_chance = { + base = 0 + } + } +} + +# Alchemy - they know what they want to make +# by Linnéa Thimrén +fund_inspiration.0082 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { #They have already decided what to make + exists = var:artifact_alchemy_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0082.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + +#Fund Inspiration: Bow - Choose your item +fund_inspiration.0091 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.0091.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + scope:inspiration = { + has_inspiration_type = bow_inspiration + } + scope:inspiration_owner = { NOT = { exists = var:artifact_bow_type } } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + + save_scope_as = actor + scope:inspiration_owner = { + assign_quirk_effect = yes + save_scope_as = recipient + } + + } + + # bow + option = { + name = fund_inspiration.0091.a + scope:inspiration_owner = { + set_variable = { + name = artifact_bow_type + value = flag:artifact_bow_type_bow + } + custom_tooltip = fund_inspiration.0091.tooltip_bow.tt + } + ai_chance = { + base = 50 + } + } + + # longbow + option = { + name = fund_inspiration.0091.b + trigger = { + OR = { + scope:inspiration_owner.culture = { has_cultural_tradition = tradition_longbow_competitions } + culture = { has_cultural_tradition = tradition_longbow_competitions } + } + } + scope:inspiration_owner = { + set_variable = { + name = artifact_bow_type + value = flag:artifact_bow_type_longbow + } + custom_tooltip = fund_inspiration.0091.tooltip_longbow.tt + } + ai_chance = { + base = 50 + } + } + + # composite bow + option = { + trigger = { + OR = { + scope:inspiration_owner.culture = { is_composite_bow_culture_trigger = yes } + culture = { is_composite_bow_culture_trigger = yes } + } + } + name = fund_inspiration.0091.c + scope:inspiration_owner = { + set_variable = { + name = artifact_bow_type + value = flag:artifact_bow_type_composite + } + custom_tooltip = fund_inspiration.0091.tooltip_composite.tt + } + ai_chance = { + base = 50 + } + } + + # crossbow + option = { + name = fund_inspiration.0091.d + trigger = { + OR = { + scope:inspiration_owner.culture = { has_innovation = innovation_advanced_bowmaking } + culture = { has_innovation = innovation_advanced_bowmaking } + } + } + scope:inspiration_owner = { + set_variable = { + name = artifact_bow_type + value = flag:artifact_bow_type_crossbow + } + custom_tooltip = fund_inspiration.0091.tooltip_crossbow.tt + } + } + + # default option of "do what you want" + option = { + name = fund_inspiration.0031.f + hidden_effect = { #If they haven't specified what they're gonna make we decide it here + set_bow_artifact_type_effect = { + BASE_SCOPE = scope:inspiration_owner + NO_TYPE = no + } + } + custom_tooltip = fund_inspiration.they_decide_option_tt + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = arbitrary + } + } + } +} + +# Bow - they know what they want to make +fund_inspiration.0092 = { + hidden = yes + + trigger = { + scope:inspiration = { + has_inspiration_type = bow_inspiration + inspiration_owner = { #They know what weapon they want to make + exists = var:artifact_weapon_type + } + } + } + + immediate = { + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + send_interface_toast = { + title = fund_inspiration.0012.t + left_icon = scope:inspiration_owner + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + } +} + +################################################## +# Inspiration: complete! +# by Linnéa Thimrén +# 1001-2000 +################################################## + +# Fallback version - very generic +# by Linnéa Thimrén +fund_inspiration.1001 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1001.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:tapestry + } + desc = artifact_wall_tapestry_description + } + triggered_desc = { + trigger = { + exists = scope:small_hide + } + desc = artifact_small_hide_description + } + desc = artifact_crown_description + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + if = { + limit = { + has_character_flag = trigger_tapestry_completion_event + } + remove_character_flag = trigger_tapestry_completion_event + create_artifact_tapestry_effect = { + OWNER = root + WEAVER = scope:inspiration_owner + } + save_scope_value_as = { + name = tapestry + value = yes + } + } + else_if = { + limit = { + has_character_flag = trigger_banner_completion_event + } + remove_character_flag = trigger_banner_completion_event + if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_banner_type } + } + switch = { + trigger = scope:inspiration_owner.var:artifact_banner_type + flag:dynasty = { + root = { set_variable = banner_from_dynasty } + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.dynasty + } + } + flag:house = { + root = { set_variable = banner_from_house } + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.house + } + } + flag:title = { + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.primary_title + } + } + } + scope:inspiration_owner = { remove_variable = artifact_banner_type } + } + save_scope_value_as = { + name = banner + value = yes + } + } + else_if = { + limit = { + has_character_flag = trigger_adventure_completion_event + } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = scope:inspiration_owner + LEGENDARY = no + ANIMAL = flag:none + } + save_scope_value_as = { + name = small_hide + value = yes + } + } + else = { + create_artifact_crown_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = crown + value = yes + } + } + #Inscribe your family motto + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + exists = scope:tapestry + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_woven + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + } + + # + option = { + name = fund_inspiration.1001.a + if = { + limit = { + exists = scope:tapestry + } + custom_tooltip = create_artifact_tapestry_tooltip + } + else_if = { + limit = { + exists = scope:banner + } + custom_tooltip = create_artifact_banner_tooltip + } + else_if = { + limit = { + exists = scope:small_hide + } + custom_tooltip = create_artifact_small_hide_tooltip + } + else = { + custom_tooltip = create_artifact_crown_tooltip #Fallback never shown + } + } + + after = { + inspiration_completion_effect = yes + } +} + + +# Weapon artifact +# by Linnéa Thimrén +fund_inspiration.1011 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1011.desc + first_valid = { + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_axe + } + desc = artifact_axe_description + } + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_dagger + } + desc = artifact_dagger_description + } + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_hammer + } + desc = artifact_hammer_description + } + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_mace + } + desc = artifact_mace_description + } + triggered_desc = { + trigger = { + scope:weapon_type = flag:artifact_weapon_type_spear + } + desc = artifact_spear_description + } + triggered_desc = { + trigger = { + AND = { + scope:newly_created_artifact = { + has_variable = replica_sassanian_sword + OR = { + rarity = famed + rarity = illustrious + } + } + } + } + desc = famed_replica_sassanian_sword_description + } + triggered_desc = { + trigger = { + scope:newly_created_artifact = { + has_variable = replica_sassanian_sword + rarity = masterwork + } + } + desc = masterwork_replica_sassanian_sword_description + } + triggered_desc = { + trigger = { + scope:newly_created_artifact = { + has_variable = replica_sassanian_sword + rarity = common + } + } + desc = common_replica_sassanian_sword_description + } + desc = artifact_sword_description + } + } + theme = inspiration_complete + override_background = { reference = armory } + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_axe } + animation = marshal_axe + } + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_dagger } + animation = marshal_dagger + } + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_hammer } + animation = celebrate_hammer + } + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_mace } + animation = marshal_mace + } + triggered_animation = { + trigger = { scope:weapon_type = flag:artifact_weapon_type_spear } + animation = throne_room_two_handed_passive_1 + } + animation = marshal + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_weapon_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_weapon_completion_event + + create_artifact_weapon_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_WEAPON_TYPE = flag:no #Decided in the effect based on the variable saved on the inspiration owner + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + option = { + name = fund_inspiration.1001.a + custom_tooltip = create_artifact_weapon_tooltip + } +} + + +# Armor artifact +# by Linnéa Thimrén +fund_inspiration.1021 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = { + random_valid = { + desc = fund_inspiration.1021.desc_opening_1 + desc = fund_inspiration.1021.desc_opening_2 + } + } + desc = fund_inspiration.1021.desc + triggered_desc = { + trigger = { + NOT = { + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_shield + } + } + desc = artifact_armor_description + } + triggered_desc = { + trigger = { + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_shield + } + desc = artifact_wall_shield_description + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = marshal_shield + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_armor_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_armor_completion_event + + if = { + limit = { + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_shield + } + if = { + limit = { + exists = house + } + house = { + save_scope_as = coa_target + } + } + else = { + primary_title = { + save_scope_as = coa_target + } + } + create_artifact_wall_shield_effect = { + OWNER = root + TARGET = scope:coa_target + CREATOR = scope:inspiration_owner + } + } + else = { + create_artifact_armor_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_ARMOR_TYPE = flag:no #Decided in the effect based on the variable saved on the inspiration owner + } + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + option = { + name = fund_inspiration.1021.a + custom_tooltip = create_artifact_armor_tooltip + } +} + +# Book artifact +# by Linnéa Thimrén +fund_inspiration.1031 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = { + desc = fund_inspiration.1031.desc_opening + first_valid = { + triggered_desc = { + trigger = { + 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 } + } + 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 } + } + 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 } + } + } + } + desc = fund_inspiration.1031.desc_crime + } + triggered_desc = { + trigger = { # Soulmate has passed away :( + exists = scope:portrait_2_soulmate + exists = scope:soulmate + scope:soulmate = { is_alive = no } + } + desc = fund_inspiration.1031.desc_soulmate_died + } + triggered_desc = { + trigger = { # Nemesis has passed away + exists = scope:portrait_2_nemesis + exists = scope:nemesis + scope:nemesis = { is_alive = no } + } + desc = fund_inspiration.1031.desc_nemesis_died + } + triggered_desc = { + trigger = { # Cat has passed away + scope:newly_created_artifact = { has_artifact_feature = book_subject_animals } + exists = scope:topic + scope:topic = flag:animals_your_cat + OR = { + AND = { #No cat at all + NOT = { + any_owned_story = { type = story_cycle_pet_cat } + } + } + AND = { #New cat + any_owned_story = { type = story_cycle_pet_cat } + exists = var:story_cycle_cat_name + exists = scope:inspiration_owner.var:book_topic_cat_name + NOT = { + var:story_cycle_cat_name = scope:inspiration_owner.var:book_topic_cat_name + } + } + } + } + desc = fund_inspiration.1031.desc_cat_died + } + triggered_desc = { + trigger = { # Dog has passed away + scope:newly_created_artifact = { has_artifact_feature = book_subject_animals } + exists = scope:topic + scope:topic = flag:animals_your_dog + OR = { + NOT = { #No dog at all + any_owned_story = { type = story_cycle_pet_dog } + } + AND = { #New dog + any_owned_story = { type = story_cycle_pet_dog } + exists = var:story_cycle_dog_name + exists = scope:inspiration_owner.var:book_topic_dog_name + NOT = { + var:story_cycle_dog_name = scope:inspiration_owner.var:book_topic_dog_name + } + } + } + } + desc = fund_inspiration.1031.desc_dog_died + } + triggered_desc = { + trigger = { + scope:book_content_quality < 40 + } + desc = fund_inspiration.1031.desc_low_content_quality + } + desc = fund_inspiration.1031.desc + } + } + desc = artifact_book_description + } + theme = inspiration_complete + override_background = { reference = study } + left_portrait = { + character = scope:inspiration_owner + animation = happy_teacher + } + right_portrait = { + trigger = { exists = scope:portrait_2 } + character = scope:portrait_2 + triggered_animation = { + trigger = { + exists = scope:soulmate + scope:portrait_2 = scope:soulmate + } + animation = flirtation_left + } + triggered_animation = { + trigger = { + exists = scope:nemesis + scope:portrait_2 = scope:nemesis + } + animation = anger + } + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_book_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_book_completion_event + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:no #Will be handled in the effect itself + SET_TOPIC = flag:no #Will be handled in the effect itself + } + if = { + limit = { + exists = scope:newly_created_artifact + scope:newly_created_artifact = { has_artifact_feature = book_subject_relationship } + exists = scope:topic + scope:topic = flag:soulmate + exists = scope:soulmate + } + scope:soulmate = { + save_scope_as = portrait_2 + } + save_scope_value_as = { + name = portrait_2_soulmate + value = yes + } + } + else_if = { + limit = { + exists = scope:newly_created_artifact + scope:newly_created_artifact = { has_artifact_feature = book_subject_relationship } + exists = scope:topic + scope:topic = flag:nemesis + exists = scope:nemesis + } + scope:nemesis = { + save_scope_as = portrait_2 + } + save_scope_value_as = { + name = portrait_2_nemesis + value = yes + } + } + #Inscribe your family motto + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_written + } + } + # Inscribe dedication - fund_inspiration.7001 + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_written_h + } + } + } + + option = { + name = fund_inspiration.1031.a + custom_tooltip = create_artifact_book_tooltip + if = { #If you wrote about your soulmate they'll love it! + limit = { + exists = scope:portrait_2_soulmate + scope:soulmate = { is_alive = yes } + } + scope:soulmate = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 40 + } + show_as_tooltip = { + add_prestige = medium_prestige_gain + } + trigger_event = fund_inspiration.1032 + } + } + if = { #If you wrote about your nemesis they'll hate it! + limit = { + exists = scope:portrait_2_nemesis + scope:nemesis = { is_alive = yes } + } + scope:nemesis = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -40 + } + show_as_tooltip = { + add_prestige = medium_prestige_loss + } + trigger_event = fund_inspiration.1033 + } + } + } + + after = { + inspiration_completion_effect = yes + } +} + +# Book artifact - notification for soulmate that you wrote a book about them +# by Linnéa Thimrén +fund_inspiration.1032 = { + type = character_event + title = fund_inspiration.1032.t + desc = fund_inspiration.1032.desc + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_sponsor + animation = flirtation + } + + immediate = { + add_prestige = medium_prestige_gain + } + + option = { + name = fund_inspiration.1032.a + } +} + +# Book artifact - notification for nemesis that you wrote a book about them +# by Linnéa Thimrén +fund_inspiration.1033 = { + type = character_event + title = fund_inspiration.1032.t + desc = fund_inspiration.1033.desc + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_sponsor + animation = flirtation + } + + immediate = { + add_prestige = medium_prestige_loss + } + + option = { + name = { + trigger = { + OR = { + dread >= medium_dread + tyranny >= medium_tyranny + } + } + text = fund_inspiration.1033.a_proud + } + name = { + trigger = { + NOR = { + dread >= medium_dread + tyranny >= medium_tyranny + } + } + text = fund_inspiration.1033.a + } + } +} + +# Weaver artifact +# by Sean Hughes +fund_inspiration.1041 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1041.desc + desc = artifact_wall_tapestry_description + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_tapestry_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_tapestry_completion_event + + scope:inspiration_owner = { + if = { + limit = { has_variable = artifact_tapestry_scene } + var:artifact_tapestry_scene = { + save_scope_as = tapestry_scene + } + } + } + create_artifact_tapestry_effect = { + OWNER = root + WEAVER = scope:inspiration_owner + } + #Inscribe your family motto + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + exists = scope:tapestry + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_woven + } + } + # Inscribe dedication - fund_inspiration.7001 + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_h + } + } + } + + option = { + name = fund_inspiration.1001.a + custom_tooltip = create_artifact_tapestry_tooltip + } + + after = { + inspiration_completion_effect = yes + } +} + +# Weaver banner artifact +# by Joe Parkin +fund_inspiration.1042 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1042.desc + first_valid = { + triggered_desc = { + trigger = { scope:target = root.dynasty } + desc = artifact_wall_banner_dynasty_description + } + triggered_desc = { + trigger = { scope:target = root.house } + desc = artifact_wall_banner_house_description + } + desc = artifact_wall_banner_description + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_banner_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_banner_completion_event + if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_banner_type } + } + switch = { + trigger = scope:inspiration_owner.var:artifact_banner_type + flag:dynasty = { + set_variable = banner_from_dynasty + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.dynasty + } + } + flag:house = { + set_variable = banner_from_house + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.house + } + } + flag:title = { + create_artifact_wall_banner_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + TARGET = root.primary_title + } + } + } + scope:inspiration_owner = { remove_variable = artifact_banner_type } + } + #Inscribe your family motto + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + exists = scope:tapestry + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_woven + } + } + # Inscribe dedication - fund_inspiration.7001 + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_woven_h + } + } + } + + option = { + name = fund_inspiration.1001.a + custom_tooltip = create_artifact_banner_tooltip + } + + after = { + inspiration_completion_effect = yes + } +} + +#Adventurer Returns +#By Bianca Savazzi and Linnéa Thimrén +fund_inspiration.1051 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:throne + } + desc = fund_inspiration.1051_throne.desc + } + triggered_desc = { + trigger = { + exists = scope:ark_covenant + } + desc = fund_inspiration.1051_ark_covenant.desc + } + triggered_desc = { + trigger = { + exists = scope:cupboard + } + desc = fund_inspiration.1051_cupboard.desc + } + desc = fund_inspiration.1051.desc + } + + first_valid = { + + triggered_desc = { + trigger = { + exists = scope:throne + } + desc = fund_inspiration.1051.desc.epic.throne + } + triggered_desc = { + trigger = { + exists = scope:ark_covenant + } + desc = fund_inspiration.1051.desc.epic.ark + } + triggered_desc = { + trigger = { + exists = scope:cupboard + } + desc = fund_inspiration.1051.desc.epic.cupboard + } + triggered_desc = { + trigger = { + exists = scope:epic + NOT = { exists = scope:cupboard } + NOT = { exists = scope:ark_covenant } + NOT = { exists = scope:throne } + } + desc = fund_inspiration.1051.desc.epic + } + triggered_desc = { + trigger = { + exists = scope:regalia_artifact + } + desc = fund_inspiration.1051.desc.regalia + } + triggered_desc = { + trigger = { + exists = scope:regalia_artifact + } + desc = fund_inspiration.1051.desc.regalia_2 + } + triggered_desc = { + trigger = { + exists = scope:necklace_artifact + } + desc = fund_inspiration.1051.desc.necklace + } + triggered_desc = { + trigger = { + exists = scope:armor_artifact + } + desc = fund_inspiration.1051.desc.armor + } + triggered_desc = { + trigger = { + exists = scope:weapon_artifact + } + desc = fund_inspiration.1051.desc.weapon + } + triggered_desc = { + trigger = { + exists = scope:box + } + desc = fund_inspiration.1051.desc.box + } + triggered_desc = { + trigger = { + exists = scope:skull + } + desc = fund_inspiration.1051.desc.skull + } + triggered_desc = { + trigger = { + exists = scope:goblet + } + desc = fund_inspiration.1051.desc.goblet + } + triggered_desc = { + trigger = { + exists = scope:animal_hide_size + } + desc = fund_inspiration.1051.desc.hide + } + triggered_desc = { + trigger = { + exists = scope:tapestry + } + desc = fund_inspiration.1051.desc.tapestry + } + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = ecstasy + } + artifact = { # To display the artifact in the event-window + trigger = { exists = scope:newly_created_artifact } + target = scope:newly_created_artifact + position = lower_right_portrait + } + + trigger = { + has_character_flag = trigger_adventure_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + + #Saving some scopes for the tooltips + save_scope_as = actor + scope:inspiration_owner = { + save_scope_as = recipient + } + + inspiration_adventure_create_artifact_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + } + + # Give the occasional third party in the adventurer's story a dummy gender + random_dummy_gender_effect = yes + } + + option = { + name = fund_inspiration.1051.a + trigger = { + NOT = { exists = scope:ark_covenant } + } + # To give the right tooltip + if = { + limit = { + exists = scope:skull + } + custom_tooltip = create_artifact_wall_animal_skull_tooltip + } + else_if = { + limit = { + exists = scope:animal_hide_size + } + custom_tooltip = create_artifact_small_hide_tooltip + } + else_if = { + limit = { + exists = scope:box + } + custom_tooltip = create_artifact_box_tooltip + } + else_if = { + limit = { + exists = scope:goblet + } + custom_tooltip = create_artifact_goblet_tooltip + } + else_if = { + limit = { + exists = scope:tapestry + } + custom_tooltip = create_artifact_tapestry_tooltip + } + else_if = { + limit = { exists = scope:epic } + custom_tooltip = create_artifact_epic_tooltip + set_variable = { + name = one_of_a_kind_var + value = scope:epic + } + } + else_if = { + limit = { + OR = { + exists = scope:weapon_artifact + exists = scope:armor_artifact + exists = scope:necklace_artifact + exists = scope:regalia_artifact + } + } + custom_tooltip = create_artifact_adventure_tooltip + } + } + + option = { + name = fund_inspiration.1051.b + trigger = { + exists = scope:ark_covenant + } + custom_tooltip = create_artifact_adventure_tooltip + } + + after = { + scope:inspiration_owner = { + if = { + limit = { NOT = { has_trait = adventurer } } + add_trait = adventurer + } + } + inspiration_completion_effect = yes + + # Remove the adventuring variable if the inspired character is an adventurer + scope:inspiration_owner = { + if = { + limit = { has_variable = gone_adventuring } + remove_variable = gone_adventuring + } + # Send them back home + set_location_to_default = yes + } + hidden_effect = { + if = { + limit = { exists = scope:artifact_origin } + scope:artifact_origin = { death = { death_reason = death_vanished } } + } + } + } +} + +# Artisan artifact +# by Linnéa Thimrén +fund_inspiration.1061 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1061.desc_floor_bound_artifact + first_valid = { + triggered_desc = { + trigger = { + exists = scope:small_box + } + desc = artifact_box_small_description + } + triggered_desc = { + trigger = { + exists = scope:medium_box + } + desc = artifact_box_medium_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture_chest + } + desc = artifact_chest_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture + faith = { + NOR = { + has_doctrine = tenet_aniconism + religion = religion:islam_religion + } + } + } + desc = artifact_sculpture_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture + faith = { + OR = { + has_doctrine = tenet_aniconism + religion = religion:islam_religion + } + } + } + desc = artifact_sculpture_animal_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture_cabinet + scope:inspiration_owner = { + NOR = { + artifact_use_indian_building_visuals_trigger = yes + artifact_use_mena_building_visuals_trigger = yes + } + } + } + desc = artifact_cabinet_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture_cabinet + scope:inspiration_owner = { artifact_use_indian_building_visuals_trigger = yes } + } + desc = artifact_diwan_description + } + triggered_desc = { + trigger = { + exists = scope:sculpture_cabinet + scope:inspiration_owner = { artifact_use_mena_building_visuals_trigger = yes } + } + desc = artifact_table_description + } + triggered_desc = { + trigger = { + exists = scope:throne + } + desc = artifact_throne_description + } + triggered_desc = { + trigger = { + exists = scope:armillary_sphere + } + desc = fp2_armillary_sphere_desc + } + triggered_desc = { + trigger = { exists = scope:icon } + desc = artifact_icon_description + } + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_artisan_completion_event + trigger_if = { + limit = { scope:inspiration_owner.var:artifact_artisan_type ?= flag:artisan_type_icon } + faith_is_aniconic_trigger = no + } + trigger_else = { always = yes } + } + on_trigger_fail = { + trigger_event = fund_inspiration.1062 + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_artisan_completion_event + + switch = { + trigger = scope:inspiration_owner.var:artifact_artisan_type + flag:artisan_type_chest = { + create_artifact_chest_effect = { + OWNER = root + CARPENTER = scope:inspiration_owner + } + save_scope_value_as = { + name = sculpture_chest + value = yes + } + } + flag:artisan_type_box = { + hidden_effect = { + random_list = { + 50 = { + create_artifact_box_small_effect = { + OWNER = root + CARPENTER = scope:inspiration_owner + } + save_scope_value_as = { + name = small_box + value = yes + } + } + 50 = { + create_artifact_box_medium_effect = { + OWNER = root + CARPENTER = scope:inspiration_owner + } + save_scope_value_as = { + name = medium_box + value = yes + } + } + } + } + } + flag:artisan_type_sculpture = { + create_artifact_sculpture_effect = { + OWNER = root + SCULPTER = scope:inspiration_owner + } + save_scope_value_as = { + name = sculpture + value = yes + } + } + flag:artisan_type_cabinet = { + create_artifact_cabinet_effect = { + OWNER = root + CARPENTER = scope:inspiration_owner + } + save_scope_value_as = { + name = sculpture_cabinet + value = yes + } + } + flag:artisan_type_throne = { + create_artifact_throne_effect = { + OWNER = root + MAKER = scope:inspiration_owner + } + save_scope_value_as = { + name = throne + value = yes + } + } + flag:artisan_type_scientific_apparatus = { + create_artifact_fp2_armillary_sphere_effect = { + OWNER = root + MAKER = scope:inspiration_owner + } + save_scope_value_as = { + name = armillary_sphere + value = yes + } + } + flag:artisan_type_urn = { + create_artifact_urn_effect = { + OWNER = root + POTTER = scope:inspiration_owner + } + save_scope_value_as = { + name = urn + value = yes + } + } + flag:artisan_type_icon = { + create_artifact_icon_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + } + save_scope_value_as = { + name = icon + value = yes + } + } + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + # + option = { + name = fund_inspiration.1001.a + custom_tooltip = create_artifact_artisan_tooltip + } +} + +#Let's not make icons for aniconic religions +fund_inspiration.1062 = { + hidden = yes + trigger = { + scope:inspiration_owner.var:artifact_artisan_type ?= flag:artisan_type_icon + faith_is_aniconic_trigger = yes + } + immediate = { + remove_character_flag = trigger_artisan_completion_event + scope:inspiration_owner = { + destroy_inspiration = inspiration + remove_variable ?= artifact_artisan_type + } + send_interface_message = { + type = msg_court_inspiration_neutral + title = fund_inspiration.9001.t + desc = fund_inspiration.9001.t + left_icon = root + right_icon = scope:inspiration_owner + } + } +} + +# Smith artifact +# by Linnéa Thimrén +fund_inspiration.1071 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = { + desc = fund_inspiration.1061.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:brooch + } + desc = artifact_brooch_description + } + triggered_desc = { + trigger = { + exists = scope:regalia + } + desc = artifact_regalia_description + } + triggered_desc = { + trigger = { + exists = scope:crown + } + desc = artifact_crown_description + } + triggered_desc = { + trigger = { + exists = scope:goblet + } + desc = artifact_goblet_description + } + triggered_desc = { + trigger = { + exists = scope:aquamanile + } + desc = fp2_andalusian_aquamanile_desc + } + triggered_desc = { + trigger = { + exists = scope:incense_burner_sculpture + } + desc = fp3_incense_burner_sculpture_desc + } + } + triggered_desc = { + trigger = { + exists = scope:crown + has_character_flag = waiting_for_a_crown + } + desc = fund_inspiration.1071.coronation + } + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_smith_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_smith_completion_event + + if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_brooch + } + create_artifact_brooch_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = brooch + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + create_artifact_regalia_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = regalia + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_crown + } + create_artifact_crown_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = crown + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_goblet + } + random_list = { + 70 = { + trigger = { + has_fp3_dlc_trigger = yes + scope:inspiration_owner = { artifact_should_use_gfx_type_trigger = { TYPE = iranian_building } } + } + create_artifact_persian_drinking_vessel_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + } + 30 = { + create_artifact_goblet_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + } + } + save_scope_value_as = { + name = goblet + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_aquamanile + } + create_artifact_fp2_andalusian_aquamanile_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = aquamanile + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_incense_burner_sculpture + has_fp3_dlc_trigger = yes + } + create_artifact_fp3_incense_burner_sculpture_effect = { + OWNER = root + SMITH = scope:inspiration_owner + } + save_scope_value_as = { + name = incense_burner_sculpture + value = yes + } + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + # + option = { + name = fund_inspiration.1001.a + trigger = { NOT = { has_character_flag = waiting_for_a_crown can_host_activity = activity_coronation } } + custom_tooltip = create_artifact_smith_tooltip + } + + option = { + name = fund_inspiration.1001.b + trigger = { + has_ach_dlc_trigger = yes + has_character_flag = waiting_for_a_crown + } + remove_character_flag = waiting_for_a_crown + + custom_tooltip = create_artifact_smith_tooltip + custom_tooltip = fund_inspiration.1001.b.coronation_ready + open_view_data = { + view = activity_list_detail_host_window + data = activity_type:activity_coronation + player = root + } + } +} + +# Alchemy artifact +# by Linnéa Thimrén +fund_inspiration.1081 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1081.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:immortality + scope:newly_created_artifact = { + has_artifact_feature = elixir_youth + } + } + desc = { + desc = fund_inspiration.1081.immortality_fail_desc_opening + first_valid = { + triggered_desc = { + trigger = { age < 25 } + desc = fund_inspiration.1081.immortality_fail_desc_young + } + desc = fund_inspiration.1081.immortality_fail_desc_old + } + } + } + triggered_desc = { + trigger = { + OR = { + exists = scope:elixirs + exists = scope:immortality + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { age < 25 } + desc = fund_inspiration.1081.elixir_desc_desc_young + } + desc = fund_inspiration.1081.elixir_desc_desc_old + } + } + } + triggered_desc = { + trigger = { + exists = scope:panacea + } + desc = fund_inspiration.1081.panacea_desc + } + triggered_desc = { + trigger = { + exists = scope:metals + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:philosophers_stone + } + desc = fund_inspiration.1081.metals_philosophers_stone_desc + } + triggered_desc = { + trigger = { + exists = scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype + scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype = flag:mercury + } + desc = fund_inspiration.1081.metals_mercury_desc + } + triggered_desc = { + trigger = { + exists = scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype + scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype = flag:arsenic + } + desc = fund_inspiration.1081.metals_arsenic_desc + } + triggered_desc = { + trigger = { + exists = scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype + scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype = flag:gold + } + desc = fund_inspiration.1081.metals_gold_desc + } + triggered_desc = { + trigger = { + exists = scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype + scope:inspiration_owner.var:artifact_alchemy_type_metal_subtype = flag:silver + } + desc = fund_inspiration.1081.metals_silver_desc + } + desc = fund_inspiration.1081.metals_fallback_desc + } + } + } + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:philosophers_stone + } + desc = artifact_philosophers_stone_description + } + triggered_desc = { + trigger = { + OR = { + exists = scope:elixirs + exists = scope:immortality + } + } + desc = artifact_elixir_description + } + triggered_desc = { + trigger = { + exists = scope:metals + } + desc = artifact_book_description + } + triggered_desc = { + trigger = { + exists = scope:panacea + } + desc = artifact_panacea_description + } + } + } + theme = inspiration_complete + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_alchemy_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_alchemy_completion_event + capital_province = { save_scope_as = location } #For artifact creation + if = { + limit = { + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_elixirs + } + create_artifact_elixir_effect = { + OWNER = root + ALCHEMIST = scope:inspiration_owner + } + save_scope_value_as = { + name = elixirs + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_metals + } + scope:inspiration_owner = { + if = { + limit = { + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = lunatic + } + } + random = { + chance = 1 + modifier = { + add = 2 + has_trait = lunatic + } + create_artifact_philosophers_stone_effect = { OWNER = root } + save_scope_value_as = { + name = philosophers_stone + value = yes + } + } + } + if = { + limit = { + NOT = { exists = scope:philosophers_stone } #You didn't roll success on the random above + has_variable = artifact_alchemy_type_metal_subtype + } + if = { + limit = { + var:artifact_alchemy_type_metal_subtype = flag:mercury + } + set_variable = { + name = book_topic_category #To create the book properly + value = flag:mercury + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:mercury + } + remove_variable = artifact_alchemy_type_metal_subtype + } + else_if = { + limit = { + var:artifact_alchemy_type_metal_subtype = flag:arsenic + } + set_variable = { + name = book_topic_category #To create the book properly + value = flag:arsenic + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:arsenic + } + remove_variable = artifact_alchemy_type_metal_subtype + } + else_if = { + limit = { + var:artifact_alchemy_type_metal_subtype = flag:gold + } + set_variable = { + name = book_topic_category #To create the book properly + value = flag:gold + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:gold + } + remove_variable = artifact_alchemy_type_metal_subtype + } + else_if = { + limit = { + var:artifact_alchemy_type_metal_subtype = flag:silver + } + set_variable = { + name = book_topic_category #To create the book properly + value = flag:silver + } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:silver + } + remove_variable = artifact_alchemy_type_metal_subtype + } + else = { + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:no + } + } + } + else_if = { #Fallback if you somehow have managed to not set the subtype + limit = { NOT = { exists = scope:philosophers_stone } } + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:no + } + } + } + save_scope_value_as = { + name = metals + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_panacea + } + create_artifact_panacea_effect = { + OWNER = root + ALCHEMIST = scope:inspiration_owner + } + save_scope_value_as = { + name = panacea + value = yes + } + } + else_if = { + limit = { + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_immortality + } + create_artifact_elixir_effect = { + OWNER = root + ALCHEMIST = scope:inspiration_owner + } + save_scope_value_as = { + name = immortality + value = yes + } + } + } + + option = { + name = { + trigger = { + OR = { + exists = scope:elixirs + exists = scope:immortality + } + } + text = fund_inspiration.1081.a_elixirs + } + name = { + trigger = { + NOR = { + exists = scope:elixirs + exists = scope:immortality + } + } + text = fund_inspiration.1081.a + } + if = { + limit = { + OR = { + exists = scope:elixirs + exists = scope:immortality + } + } + custom_tooltip = create_artifact_alchemy_elixir_tooltip + } + else_if = { + limit = { + exists = scope:book + } + custom_tooltip = create_artifact_alchemy_book_tooltip + } + else = { + custom_tooltip = create_artifact_alchemy_tooltip + } + } +} + +# Bow artifact +fund_inspiration.1091 = { + type = character_event + title = fund_inspiration.1001.t + desc = { + desc = fund_inspiration.1091.desc + first_valid = { + triggered_desc = { + trigger = { scope:bow_type = flag:artifact_bow_type_longbow } + desc = artifact_longbow_description + } + triggered_desc = { + trigger = { scope:bow_type = flag:artifact_bow_type_composite } + desc = artifact_composite_description + } + triggered_desc = { + trigger = { scope:bow_type = flag:artifact_bow_type_crossbow } + desc = artifact_crossbow_description + } + desc = artifact_bow_description + } + } + theme = inspiration_complete + override_background = { reference = armory } + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { scope:bow_type = flag:artifact_bow_type_longbow } + animation = hunting_longbow_aim_arrow_default + } + triggered_animation = { + trigger = { scope:bow_type = flag:artifact_bow_type_composite } + animation = hunting_shortbow_aim_arrow_default + } + triggered_animation = { + trigger = { scope:bow_type = flag:artifact_bow_type_crossbow } + animation = crossbow + } + animation = hunting_shortbow_aim_arrow_default + } + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_character_flag = trigger_bow_completion_event + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + remove_character_flag = trigger_bow_completion_event + + create_artifact_bow_effect = { + OWNER = root + CREATOR = scope:inspiration_owner + SET_BOW_TYPE = flag:no #Decided in the effect based on the variable saved on the inspiration owner + } + # Add a dedication to the description - fund_inspiration.7001 + if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_a_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_a_var = { + save_scope_as = dedication_a + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_a + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_b_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_b_var = { + save_scope_as = dedication_b + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_b + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_var = flag:dedication_c + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_c + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_d_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_d_var = { + save_scope_as = dedication_d + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_d + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_e_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_e_var = { + save_scope_as = dedication_e + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_e + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_f_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_f_var = { + save_scope_as = dedication_f + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_f + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_g1_var + has_variable = artifact_dedication_g2_var + } + } + scope:inspiration_owner = { + var:artifact_dedication_g1_var = { + save_scope_as = dedication_g1 + } + } + scope:inspiration_owner = { + var:artifact_dedication_g2_var = { + save_scope_as = dedication_g2 + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_g + } + } + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_dedication_var + var:artifact_dedication_h_var = flag:dedication_h + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_dedication_inscribed_h + } + } + #Inscribe your family motto + else_if = { + limit = { + scope:inspiration_owner = { + has_variable = artifact_inscribe_motto_var + } + } + scope:newly_created_artifact = { + set_artifact_description = artifact_motto_inscribed + } + } + } + + option = { + name = fund_inspiration.1091.a + custom_tooltip = create_artifact_bow_tooltip + } +} + +################################################## +# Inspiration invalidated +# by Linnéa Thimrén +# 9001-9999 +################################################## + +# The inspired character died +# by Linnéa Thimrén +fund_inspiration.9001 = { + type = character_event + title = fund_inspiration.9001.t + desc = { + desc = fund_inspiration.9001.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:weapon_inspiration + } + desc = fund_inspiration.9001.desc_weapon + } + triggered_desc = { + trigger = { + exists = scope:armor_inspiration + } + desc = fund_inspiration.9001.desc_armor + } + triggered_desc = { + trigger = { + exists = scope:book_inspiration + } + desc = fund_inspiration.9001.desc_book + } + triggered_desc = { + trigger = { + exists = scope:weaver_inspiration + } + desc = fund_inspiration.9001.desc_weaver + } + triggered_desc = { + trigger = { + exists = scope:adventure_inspiration + } + desc = fund_inspiration.9001.desc_adventurer + } + triggered_desc = { + trigger = { + exists = scope:artisan_inspiration + } + desc = fund_inspiration.9001.desc_artisan + } + triggered_desc = { + trigger = { + exists = scope:smith_inspiration + } + desc = fund_inspiration.9001.desc_smith + } + triggered_desc = { + trigger = { + exists = scope:alchemy_inspiration + } + desc = fund_inspiration.9001.desc_alchemy + } + triggered_desc = { + trigger = { + exists = scope:research_inspiration + } + desc = fund_inspiration.9001.desc_research + } + } + } + + theme = realm + left_portrait = scope:inspiration_owner + + trigger = { + scope:inspiration_owner = { + is_alive = no + } + } + + immediate = { + play_music_cue = mx_cue_death + } + + option = { + name = fund_inspiration.9001.a + custom_tooltip = fund_inspiration.9001.a_tt + } +} + +# The inspired character is imprisoned +# by Linnéa Thimrén +fund_inspiration.9002 = { + type = character_event + title = fund_inspiration.9001.t + desc = { + desc = fund_inspiration.9002.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:weapon_inspiration + } + desc = fund_inspiration.9002.desc_weapon + } + triggered_desc = { + trigger = { + exists = scope:armor_inspiration + } + desc = fund_inspiration.9002.desc_armor + } + triggered_desc = { + trigger = { + exists = scope:book_inspiration + } + desc = fund_inspiration.9002.desc_book + } + triggered_desc = { + trigger = { + exists = scope:weaver_inspiration + } + desc = fund_inspiration.9002.desc_weaver + } + triggered_desc = { + trigger = { + exists = scope:adventure_inspiration + } + desc = fund_inspiration.9002.desc_adventurer + } + triggered_desc = { + trigger = { + exists = scope:artisan_inspiration + } + desc = fund_inspiration.9002.desc_artisan + } + triggered_desc = { + trigger = { + exists = scope:smith_inspiration + } + desc = fund_inspiration.9002.desc_smith + } + triggered_desc = { + trigger = { + exists = scope:alchemy_inspiration + } + desc = fund_inspiration.9002.desc_alchemy + } + triggered_desc = { + trigger = { + exists = scope:research_inspiration + } + desc = fund_inspiration.9002.desc_research + } + } + } + theme = realm + left_portrait = scope:inspiration_owner + + trigger = { + scope:inspiration_owner = { + is_imprisoned = yes + } + } + + immediate = { + play_music_cue = mx_cue_death + } + + option = { + name = fund_inspiration.9001.a + custom_tooltip = fund_inspiration.9001.a_tt + } +} + +# The inspired character is no longer courtier of sponsor +# by Linnéa Thimrén +fund_inspiration.9003 = { + type = character_event + title = fund_inspiration.9001.t + desc = { + desc = fund_inspiration.9003.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:weapon_inspiration + } + desc = fund_inspiration.9002.desc_weapon + } + triggered_desc = { + trigger = { + exists = scope:armor_inspiration + } + desc = fund_inspiration.9002.desc_armor + } + triggered_desc = { + trigger = { + exists = scope:book_inspiration + } + desc = fund_inspiration.9002.desc_book + } + triggered_desc = { + trigger = { + exists = scope:weaver_inspiration + } + desc = fund_inspiration.9002.desc_weaver + } + triggered_desc = { + trigger = { + exists = scope:adventure_inspiration + } + desc = fund_inspiration.9002.desc_adventurer + } + triggered_desc = { + trigger = { + exists = scope:artisan_inspiration + } + desc = fund_inspiration.9002.desc_artisan + } + triggered_desc = { + trigger = { + exists = scope:smith_inspiration + } + desc = fund_inspiration.9002.desc_smith + } + triggered_desc = { + trigger = { + exists = scope:alchemy_inspiration + } + desc = fund_inspiration.9002.desc_alchemy + } + triggered_desc = { + trigger = { + exists = scope:research_inspiration + } + desc = fund_inspiration.9002.desc_research + } + } + } + theme = realm + left_portrait = scope:inspiration_owner + + trigger = { + scope:inspiration_owner = { + NOT = { is_courtier_of = scope:inspiration_sponsor } + } + } + + immediate = { + play_music_cue = mx_cue_death + } + + option = { + name = fund_inspiration.9001.a + custom_tooltip = fund_inspiration.9001.a_tt + } +} + +#Adventurer returns prematurely. + +fund_inspiration.9004 = { + type = character_event + title = fund_inspiration.9001.t + desc = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { # Add more descs if there is another reason for the adventurer to prematurely return + has_character_flag = adventurer_stuck_in_swamp + } + } + desc = fund_inspiration.9004.desc_adventurer_stuck_in_swamp + } + desc = fund_inspiration.9004.desc + triggered_desc = { + trigger = { + scope:inspiration_owner = { # Add more descs if there is another reason for the adventurer to prematurely return + has_character_flag = adventurer_tired_of_europe + } + } + desc = fund_inspiration.9004.desc_adventurer_tired_of_europe + } + } + theme = realm + left_portrait = scope:inspiration_owner + + trigger = { + scope:inspiration_owner = { + OR = { + has_character_flag = adventurer_tired_of_europe + has_character_flag = adventurer_stuck_in_swamp + } + } + } + + immediate = { + # Move the adventurer back to their default location + scope:inspiration_owner = { + set_location_to_default = yes + } + end_inspiration_sponsorship = scope:inspiration + } + option = { + name = fund_inspiration.9004.a + custom_tooltip = fund_inspiration.9001.a_tt + scope:inspiration_owner = { + reverse_add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + } + after = { + scope:inspiration_owner = { + remove_character_flag = adventurer_tired_of_europe + remove_character_flag = adventurer_stuck_in_swamp + } + } +} + +#Sponsorship inheritance +# by Joe Parkin + +fund_inspiration.9005 = { + type = character_event + title = fund_inspiration.9005.t + desc = { + desc = fund_inspiration.9005.desc_intro + first_valid = { + triggered_desc = { + trigger = { + any_in_list = { + list = inherited_inspiration_list + count > 1 + } + } + desc = fund_inspiration.9005.desc_multiple + } + desc = fund_inspiration.9005.desc_single + } + } + theme = realm + override_background = { reference = study } + left_portrait = scope:inherited_insp_owner + + trigger = { + age >= 10 + has_royal_court = yes + any_in_list = { + list = inherited_inspiration_list + count >= 1 + NOT = { has_inspiration_type = adventure_inspiration } + } + } + + immediate = { + ordered_in_list = { + list = inherited_inspiration_list + limit = { + NOT = { has_inspiration_type = adventure_inspiration } + } + order_by = inspiration_gold_invested + inspiration_owner = { save_scope_as = inherited_insp_owner } + } + } + + option = { + name = fund_inspiration.9005.a + custom_tooltip = inherited_inspiration_continue_tt + } + + option = { + name = fund_inspiration.9005.b + every_in_list = { + list = inherited_inspiration_list + limit = { + NOT = { has_inspiration_type = adventure_inspiration } + } + root = { end_inspiration_sponsorship = prev } + inspiration_owner = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + custom_tooltip = inherited_inspiration_end_tt + } +} + +################################################## +# Ongoing inspiration events +# by Linnéa Thimrén +# 2001-9000 +################################################## + +# Check used to make sure you're not currently on cooldown for inspiration events (so that we don't spam the player) +# Has to be used in the inspiration_owner's scope! +scripted_trigger has_no_inspiration_event_cooldown = { + NOR = { + has_character_flag = fund_weapon_inspiration_event_cooldown + has_character_flag = fund_armor_inspiration_event_cooldown + has_character_flag = fund_book_inspiration_event_cooldown + has_character_flag = fund_weaver_inspiration_event_cooldown + has_character_flag = fund_adventure_inspiration_event_cooldown + has_character_flag = fund_artisan_inspiration_event_cooldown + has_character_flag = fund_smith_inspiration_event_cooldown + has_character_flag = fund_alchemy_inspiration_event_cooldown + has_character_flag = fund_research_inspiration_event_cooldown + } +} + +# Effect to add appropriate cooldown flag based on the inspiration type +# Has to be used in the inspiration_owner's scope! +scripted_effect add_inspiration_cooldown_flag = { + if = { + limit = { + inspiration = { has_inspiration_type = weapon_inspiration } + } + add_character_flag = { + flag = fund_weapon_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = armor_inspiration } + } + add_character_flag = { + flag = fund_armor_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = book_inspiration } + } + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = weaver_inspiration } + } + add_character_flag = { + flag = fund_weaver_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = adventure_inspiration } + } + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = artisan_inspiration } + } + add_character_flag = { + flag = fund_artisan_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = smith_inspiration } + } + add_character_flag = { + flag = fund_smith_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = alchemy_inspiration } + } + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = research_inspiration } + } + add_character_flag = { + flag = fund_research_inspiration_event_cooldown + days = { 30 60 } + } + } + else_if = { + limit = { + inspiration = { has_inspiration_type = bow_inspiration } + } + add_character_flag = { + flag = fund_bow_inspiration_event_cooldown + days = { 30 60 } + } + } +} + + +# Inspiration owner asks for more money +# by Linnéa Thimrén +fund_inspiration.2001 = { + type = character_event + title = fund_inspiration.2001.t + desc = fund_inspiration.2001.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = beg + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + NOT = { has_character_flag = had_event_fund_inspiration_2001 } + NOT = { has_character_flag = local_artisan } # Should not trigger if you commissioned the artifact + has_no_inspiration_event_cooldown = yes + NOT = { exists = var:artifact_armor_type } #Armor has it's own event (fund_inspiration.2021) + } + scope:inspiration = { + NOT = { has_inspiration_type = adventure_inspiration } #Doesn't really make sense for them to come asking for money once they are out adventuring + inspiration_progress > 1 # To prevent the inspired character from asking for gold immediately + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + scope:inspiration_owner = { + ai_greed >= medium_positive_greed + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2001 + years = 20 + } + add_inspiration_cooldown_flag = yes + } + } + + option = { # Sure, have the money + name = fund_inspiration.2001.a + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration = { + invest_gold = 50 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + if = { + limit = { + scope:inspiration = { + has_inspiration_type = book_inspiration + } + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } + } + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -50 + short_term_gold < 50 + } + } + } + + option = { #No! + name = fund_inspiration.2001.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } +} + +# Inspiration owner asks for more... human materials +# by Bianca Savazzi +scripted_effect payment_to_improve_quality_fund_inspiration_2002_scripted_effect = { + if = { #To make sure that the inspiration hasn't been removed + limit = { exists = scope:inspiration } + scope:inspiration = { + invest_gold = 50 + } + improve_quality_fund_inspiration_2002_scripted_effect = yes + } +} + +scripted_effect improve_quality_fund_inspiration_2002_scripted_effect = { + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + scope:inspiration = { has_inspiration_type = book_inspiration } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + } +} + +fund_inspiration.2002 = { + type = character_event + title = fund_inspiration.2002.t + desc = { + desc = fund_inspiration.2002.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:inspiration_owner.var:book_subject = flag:medicine + scope:inspiration_owner.var:book_subject = flag:cannibal + scope:inspiration_owner.var:book_subject = flag:torturer + AND = { + exists = scope:inspiration_owner.var:book_topic_category + scope:inspiration_owner.var:book_topic_category = flag:intrigue_scheme + } + AND = { + exists = scope:inspiration_owner.var:book_topic + scope:inspiration_owner.var:book_topic = flag:punishment + } + } + NOT = { has_trait = blind } + } + desc = fund_inspiration.2002.desc.fingernails + } + triggered_desc = { + trigger = { + OR = { + scope:inspiration_owner.var:book_subject = flag:witch + scope:inspiration_owner.var:book_subject = flag:herbalist + } + NOT = { has_trait = blind } + } + desc = fund_inspiration.2002.desc.potions + } + desc = fund_inspiration.2002.desc.blind # Fallback & blind version + } + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = schadenfreude + } + + trigger = { + exists = scope:inspiration + is_adult = yes + scope:inspiration_owner = { + is_available_ai_adult = yes + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + NOT = { has_character_flag = had_event_fund_inspiration_2002 } + has_no_inspiration_event_cooldown = yes + exists = var:book_subject + } + + OR = { + scope:inspiration_owner.var:book_subject = flag:medicine + scope:inspiration_owner.var:book_subject = flag:cannibal + scope:inspiration_owner.var:book_subject = flag:torturer + AND = { + exists = scope:inspiration_owner.var:book_topic_category + scope:inspiration_owner.var:book_topic_category = flag:intrigue_scheme + } + AND = { + exists = scope:inspiration_owner.var:book_topic + scope:inspiration_owner.var:book_topic = flag:punishment + } + scope:inspiration_owner.var:book_subject = flag:witch + scope:inspiration_owner.var:book_subject = flag:herbalist + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + scope:inspiration_owner = { + has_trait = sadistic + } + } + + # Based on ai_rationality (Only highly irrational characters should even consider this option) + modifier = { + add = { + scope:inspiration_owner = { + value = ai_rationality + if = { + limit = { + has_trait = wrathful + } + subtract = medium_negative_ai_value # Though Wrathful does has a low ai_rationality score, that's not *quite* the personality we're looking for here. + } + if = { + limit = { + has_trait = paranoid + } + subtract = medium_negative_ai_value # Same goes for Paranoid + } + if = { + limit = { + OR = { + has_trait = arbitrary + has_trait = fickle + } + } + add = low_negative_ai_value # Arbitrary and/or fickle characters are more likely to entertain this than their 'ai_rationality' would suggest. + } + multiply = -5 + } + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2002 + years = 20 + } + add_inspiration_cooldown_flag = yes + } + + # Check and save prisoner for option A + if = { + limit = { + any_prisoner = { + is_adult = yes + is_in_prison_type = dungeon + is_imprisoned_by = root + } + } + random_prisoner = { + limit = { + is_adult = yes + is_in_prison_type = dungeon + is_imprisoned_by = root + } + save_scope_as = prisoner_for_material + } + } + + #Check and save the scope of a foreign neighbouring county for option C + if = { + limit = { + exists = capital_county #safety check that character is landed + capital_county = { holder = root } + } + + capital_county = { + if = { + limit = { + any_neighboring_county = { + holder = { + this != root + liege = { this != root } + is_ai = yes + } + } + } + + random_neighboring_county = { + limit = { + holder = { + is_ai = yes + this != root + liege = { this != root } + } + } + save_scope_as = neighbouring_county_for_material + } + } + } + } + } + + option = { # use prisoners in dungeon + name = fund_inspiration.2002.a + trigger = { + exists = scope:prisoner_for_material + } + + execute_prisoner_effect = { + VICTIM = scope:prisoner_for_material + EXECUTIONER = scope:inspiration_owner + } + improve_quality_fund_inspiration_2002_scripted_effect = yes + + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = torturer #torturers are happy to cause more misery + } + modifier = { + add = 25 + OR = { + has_trait = sadistic + ai_compassion <= low_negative_compassion + } + } + modifier = { + add = -25 + ai_compassion >= low_positive_compassion + } + modifier = { + add = -50 + ai_compassion >= medium_positive_compassion + } + } + } + + option = { #some money to kidnap + name = fund_inspiration.2002.b + + payment_to_improve_quality_fund_inspiration_2002_scripted_effect = yes + + capital_county = { + add_county_modifier = { + modifier = fund_inspiration_missing_peasants_modifier + years = 15 + } + } + + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = arrogant #views others, esp peasants, as lower than them + } + modifier = { + add = 25 + OR = { + has_trait = sadistic + ai_compassion <= low_negative_compassion + } + } + modifier = { + add = -25 + has_trait = greedy #this option costs money... money that look better in my coffers... + } + modifier = { + add = -25 + ai_compassion >= low_positive_compassion + } + modifier = { + add = -50 + ai_compassion >= medium_positive_compassion + } + } + } + + option = { #kidnap some foreign peasants + name = fund_inspiration.2002.c + trigger = { + exists = scope:neighbouring_county_for_material + } + + scope:neighbouring_county_for_material = { + add_county_modifier = { + modifier = fund_inspiration_missing_peasants_modifier + years = 15 + } + holder = { + duel = { + skill = intrigue + target = root + 10 = { + desc = fund_inspiration.2002.toast_outcome.positive + send_interface_toast = { + title = fund_inspiration.2002.toast_outcome.positive + left_icon = scope:neighbouring_county_for_material.holder + } + } + 10 = { + desc = fund_inspiration.2002.toast_outcome.negative + send_interface_toast = { + title = fund_inspiration.2002.toast_outcome.negative + left_icon = scope:neighbouring_county_for_material.holder + scope:neighbouring_county_for_material.holder = { + progress_towards_rival_effect = { + REASON = rival_kidnapped_peasants + CHARACTER = root + OPINION = -50 + } + } + } + } + } + } + } + payment_to_improve_quality_fund_inspiration_2002_scripted_effect = yes + ai_chance = { + base = 50 + modifier = { + add = 25 + OR = { + has_trait = sadistic + ai_compassion <= low_negative_compassion + } + } + modifier = { + add = -25 + has_trait = just #it's not right to involve another country's peasants in this + } + modifier = { + add = -25 + has_trait = diplomat #this is a recipe for a diplomatic disaster + } + modifier = { + add = -25 + ai_compassion >= low_positive_compassion + } + modifier = { + add = -50 + ai_compassion >= medium_positive_compassion + } + } + } + + option = { #No! + name = fund_inspiration.2002.d + + ai_chance = { + base = 50 + modifier = { + add = 25 + ai_compassion >= low_positive_compassion + } + modifier = { + add = 50 + ai_compassion >= medium_positive_compassion + } + modifier = { + add = 25 + faith = { + has_doctrine_parameter = pacifist_opinion_active + } + } + } + } +} + +# Previously inspiration owner is bothering the current one in their creation +# by Bianca Savazzi +fund_inspiration.2003 = { + type = character_event + title = fund_inspiration.2003.t + desc = fund_inspiration.2003.desc + + theme = realm + override_background = { + reference = courtyard + } + left_portrait = { + character = scope:inspiration_owner + animation = dismissal + } + + right_portrait = { + character = scope:previous_inspired + animation = beg + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + NOT = { has_character_flag = had_event_fund_inspiration_2003 } + NOT = { has_character_flag = local_artisan } + has_no_inspiration_event_cooldown = yes + inspiration = { #Since they're away adventuring + NOT = { has_inspiration_type = adventure_inspiration } + } + } + any_courtier = { + this != scope:inspiration_owner + is_available_ai_adult = yes + has_completed_inspiration = yes + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2003 + years = 20 + } + add_inspiration_cooldown_flag = yes + } + + random_courtier = { + limit = { + this != scope:inspiration_owner + is_available_ai_adult = yes + has_completed_inspiration = yes + } + weight = { + base = 1 + modifier = { + add = 2 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 1 + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = previous_inspired + } + } + + #You try to convince them to listen + option = { + name = fund_inspiration.2003.a + + duel = { + skill = diplomacy + target = scope:inspiration_owner + 10 = { + desc = fund_inspiration.2003.toast_outcome.positive + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.2003.toast_outcome.positive + left_icon = root + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + desc = fund_inspiration.2003.toast_outcome.refusal + send_interface_toast = { + title = fund_inspiration.2003.toast_outcome.refusal + left_icon = root + scope:inspiration_owner = { + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = root + OPINION = 0 + } + progress_towards_rival_effect = { + CHARACTER = scope:previous_inspired + REASON = rival_dispute_inspiration + OPINION = -30 + } + } + } + } + } + + ai_chance = { + base = 50 + modifier = { + add = -25 + ai_compassion <= low_negative_compassion + } + modifier = { + add = -25 + has_trait = shy #don't wanna talk... + } + modifier = { + add = 25 + OR = { + has_trait = diplomat #let's talk things out + has_trait = gregarious + has_trait = patient + AND = { + has_education_diplomacy_trigger = yes + diplomacy > medium_skill_rating + } + } + } + modifier = { + add = 25 + ai_compassion >= low_positive_compassion + } + } + } + + #You give feedback on their feedback + option = { + name = fund_inspiration.2003.b + + duel = { + skill = learning + target = scope:previous_inspired + 10 = { + desc = fund_inspiration.2003.toast_outcome.positive + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.2003.toast_outcome.positive + left_icon = root + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + desc = fund_inspiration.2003.toast_outcome.negative + send_interface_toast = { + title = fund_inspiration.2003.toast_outcome.negative + left_icon = root + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -2 } + } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = -15 + ai_rationality <= low_negative_ai_value + } + modifier = { + add = 25 + OR = { + has_trait = scholar #smart + AND = { + has_education_learning_trigger = yes + learning > medium_skill_rating + } + } + } + modifier = { + add = 25 + ai_rationality >= low_positive_ai_value + } + } + } + + # Tell them off + option = { + name = fund_inspiration.2003.c + scope:previous_inspired = { + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = scope:inspiration_owner + OPINION = 0 + } + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = 30 + REASON = friend_new_inspiration_owner + } + + stress_impact = { + wrathful = medium_stress_loss + irritable = medium_stress_loss + shy = minor_stress_gain + compassionate = medium_stress_gain + } + + ai_chance = { + base = 50 + modifier = { + add = 15 + ai_rationality <= low_negative_ai_value + } + modifier = { + add = 15 + ai_compassion <= low_negative_compassion + } + modifier = { + add = 25 + OR = { + has_trait = wrathful + has_trait = callous + has_trait = irritable + has_trait = impatient + } + } + modifier = { + add = 25 + ai_rationality >= low_positive_ai_value + } + } + } +} + +# A merchant selling high-quality materials is in town +# by Linnéa Thimrén +fund_inspiration.2004 = { + type = character_event + title = fund_inspiration.2004.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + # For artifacts that use metal in some way + scope:inspiration = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = smith_inspiration + has_inspiration_type = armor_inspiration + } + } + } + desc = fund_inspiration.2004.desc_metal + } + triggered_desc = { + trigger = { + # For artifacts that use fabric in some way + scope:inspiration = { + OR = { + AND = { + has_inspiration_type = smith_inspiration + exists = scope:inspiration_owner.var:artifact_smith_type + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + AND = { + has_inspiration_type = armor_inspiration + exists = scope:inspiration_owner.var:artifact_armor_type + OR = { #All armor that mentions fabric in some way in their descriptions + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_lamellar + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_laminar + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_brigandine + } + } + } + } + } + desc = fund_inspiration.2004.desc_fabric + } + triggered_desc = { + trigger = { + # For artifacts that use thread in some way + scope:inspiration = { + OR = { + has_inspiration_type = weaver_inspiration + AND = { + has_inspiration_type = armor_inspiration + exists = scope:inspiration_owner.var:artifact_armor_type + scope:inspiration_owner.var:artifact_armor_type = flag:armor_type_brigandine + } + AND = { + has_inspiration_type = smith_inspiration + exists = scope:inspiration_owner.var:artifact_smith_type + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + } + } + } + desc = fund_inspiration.2004.desc_thread + } + triggered_desc = { + trigger = { + scope:inspiration = { + has_inspiration_type = artisan_inspiration + inspiration_owner.var:artifact_artisan_type ?= flag:artisan_type_icon + } + } + desc = fund_inspriation.2004.desc_paint + } + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = artisan_inspiration } + } + desc = fund_inspiration.2004.desc_wood + } + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = book_inspiration } + } + desc = { + random_valid = { + desc = fund_inspiration.2004.desc_paper + desc = fund_inspiration.2004.desc_ink + } + } + } + triggered_desc = { + trigger = { + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + exists = scope:inspiration_owner.var:artifact_alchemy_type + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_metals + } + } + desc = fund_inspiration.2004.desc_alchemy_metal + } + triggered_desc = { + trigger = { + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + exists = scope:inspiration_owner.var:artifact_alchemy_type + scope:inspiration_owner.var:artifact_alchemy_type = flag:alchemy_type_elixirs + } + } + desc = fund_inspiration.2004.desc_elixirs + } + desc = fund_inspiration.2004.desc_fallback + } + desc = fund_inspiration.2004.desc + } + theme = realm + override_background = { + reference = market + } + left_portrait = { + character = scope:inspiration_owner + animation = beg + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + NOT = { has_character_flag = had_event_fund_inspiration_2004 } + NOT = { has_character_flag = local_artisan } + has_no_inspiration_event_cooldown = yes + inspiration = { #Since they're away adventuring + NOT = { has_inspiration_type = adventure_inspiration } + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2004 + years = 20 + } + add_inspiration_cooldown_flag = yes + } + } + + # Give them the money + option = { + name = fund_inspiration.2004.a + scope:inspiration = { + invest_gold = root.medium_gold_value + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + generous = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.25 + } + modifier = { + factor = 0 + short_term_gold < medium_gold_value + } + } + } + + # Haggle with the merchant + option = { + name = fund_inspiration.2004.b + duel = { + skill = diplomacy + value = 10 + 15 = { + desc = fund_inspiration.2004.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + #We need to mess around with hidden effects and tooltips a bit here to not show "higher quality" twice on the option + show_as_tooltip = { + scope:inspiration = { + invest_gold = root.tiny_gold_value + } + } + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.2004.b.success + left_icon = scope:inspiration_owner + scope:inspiration = { + invest_gold = root.tiny_gold_value + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + } + 20 = { + desc = fund_inspiration.2004.b.failure + #We need to mess around with hidden effects and tooltips a bit here to not show "higher quality" twice on the option + show_as_tooltip = { + scope:inspiration = { + invest_gold = root.medium_gold_value + } + add_prestige = medium_prestige_loss + } + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.2004.b.failure + left_icon = scope:inspiration_owner + scope:inspiration = { + invest_gold = root.medium_gold_value + } + add_prestige = medium_prestige_loss + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.25 + } + modifier = { + add = 25 + diplomacy >= high_skill_rating + } + modifier = { + factor = 0 + short_term_gold < medium_gold_value + } + } + } + + # Take it by force + option = { + name = fund_inspiration.2004.c + trigger = { + is_landless_adventurer = no + } + add_tyranny = medium_tyranny_gain + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + stress_impact = { + compassionate = major_stress_impact_gain + sadistic = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -0.25 + ai_greed = 0.15 + ai_vengefulness = 0.25 + } + } + } + + # Deny them + option = { + name = fund_inspiration.2004.d + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -0.25 + ai_greed = 0.5 + } + } + } +} + +#Smith (weapon/armor/smith) asks you to invest in a better forge +# by Linnéa Thimrén +fund_inspiration.2005 = { + type = character_event + title = fund_inspiration.2005.t + desc = { + desc = fund_inspiration.2005.desc_opening + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = weapon_inspiration } + } + desc = fund_inspiration.2005.desc_weapon + } + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = armor_inspiration } + } + desc = fund_inspiration.2005.desc_armor + } + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = smith_inspiration } + } + desc = fund_inspiration.2005.desc_smith + } + } + desc = fund_inspiration.2005.desc_ending + } + theme = realm + override_background = { + reference = armory + } + left_portrait = { + character = scope:inspiration_owner + animation = beg + } + + trigger = { + is_landless_adventurer = no + exists = scope:inspiration + scope:inspiration = { + OR = { + AND = { + has_inspiration_type = weapon_inspiration + exists = scope:inspiration_owner.var:artifact_weapon_type + } + AND = { + has_inspiration_type = armor_inspiration + exists = scope:inspiration_owner.var:artifact_armor_type + } + AND = { + has_inspiration_type = smith_inspiration + exists = scope:inspiration_owner.var:artifact_smith_type + } + } + inspiration_owner = { + is_available_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2005 } + NOT = { has_character_flag = local_artisan } + } + inspiration_progress > 1 # To prevent the inspired character from asking for gold immediately + scope:inspiration_sponsor = { + NOT = { + has_character_modifier = inspiration_invested_in_new_forge_modifier + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2005 + years = 20 + } + #To stagger any following events + add_inspiration_cooldown_flag = yes + } + } + + #Invest in a new forge + option = { + name = fund_inspiration.2005.a + scope:inspiration = { invest_gold = 50 } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + add_character_modifier = { + modifier = inspiration_invested_in_new_forge_modifier + years = 5 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { #If the AI can't afford it they should go for it + factor = 0 + short_term_gold < 50 + } + } + } + + #No + option = { + name = fund_inspiration.2005.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + +# A wise person comes to visit, should they teach you or your inspiration owner? +# by Linnéa Thimrén +fund_inspiration.2006 = { + type = character_event + title = fund_inspiration.2006.t + desc = fund_inspiration.2006.desc + theme = realm + left_portrait = scope:scholar_character + right_portrait = scope:inspiration_owner + + trigger = { + exists = scope:inspiration + scope:inspiration = { + OR = { + has_inspiration_type = book_inspiration + has_inspiration_type = alchemy_inspiration + } + inspiration_owner = { + is_available_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2006 } + } + } + } + + weight_multiplier = { + base = 0.75 + modifier = { #More likely that they stop by if you have a cool court + add = 0.5 + has_royal_court = yes + court_grandeur_current_level > 5 + } + modifier = { #Most likely that they stop by if you have a VERY cool court + add = 0.5 + has_royal_court = yes + court_grandeur_current_level > 7 + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2006 + years = 20 + } + #To stagger any following events + add_inspiration_cooldown_flag = yes + } + create_character = { + location = root.capital_province + template = scholar_character + save_scope_as = scholar_character + } + } + + #Teach inspiration owner + option = { + name = fund_inspiration.2006.a + remove_short_term_gold = minor_gold_value + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + add_learning_skill = 1 + } + scope:scholar_character = { silent_disappearance_effect = yes } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.25 + } + modifier = { #If the AI can't afford it they shouldn't go for it + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + #Teach me! + option = { + name = fund_inspiration.2006.b + remove_short_term_gold = minor_gold_value + add_courtier = scope:scholar_character + set_relation_mentor = scope:scholar_character + add_learning_lifestyle_xp = major_lifestyle_xp + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.25 + } + modifier = { #If the AI can't afford it they shouldn't go for it + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + #Go away + option = { + name = fund_inspiration.2006.c + scope:scholar_character = { silent_disappearance_effect = yes } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + ai_chance = { + base = 1 + } + } +} + +# Inspiration owner asks for more money (armor specific) +# by Linnéa Thimrén +fund_inspiration.2021 = { + type = character_event + title = fund_inspiration.2001.t + desc = fund_inspiration.2021.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = beg + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + has_character_flag = had_event_fund_inspiration_2021 + has_character_flag = fund_armor_inspiration_event_cooldown + } + NOT = { has_character_flag = local_artisan } + exists = var:artifact_armor_type + } + scope:inspiration = { + inspiration_progress > 1 # To prevent the inspired character from asking for gold immediately + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + scope:inspiration_owner = { + ai_greed >= medium_positive_greed + } + } + modifier = { + add = 4 #Very likely if it's plate or lamellar armor since they were very expensive to make + scope:inspiration_owner = { + OR = { + var:artifact_armor_type = flag:armor_type_plate + var:artifact_armor_type = flag:armor_type_lamellar + } + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2021 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_armor_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + option = { # Sure, have the money + name = fund_inspiration.2021.a + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration = { + invest_gold = 50 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + } + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -50 + short_term_gold < 50 + } + } + } + + option = { #No! + name = fund_inspiration.2021.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } +} + +scripted_trigger fund_inspiration_court_relation_trigger = { + is_available_ai_adult = yes + this != scope:inspiration_owner + is_in_the_same_court_as_or_guest = root +} + +scripted_trigger fund_inspiration_court_inspiration_owner_trigger = { + is_available_ai_adult = yes + inspiration = { #Since they're away adventuring + NOT = { has_inspiration_type = adventure_inspiration } + } +} + +# Friend helps your sponsee +# by Jose Parkin +fund_inspiration.2030 = { + type = character_event + title = fund_inspiration.2030.t + desc = fund_inspiration.2030.desc + theme = realm + override_background = { + reference = corridor_day + } + left_portrait = { + character = scope:friend + animation = admiration + } + lower_right_portrait = scope:inspiration_owner + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + inspiration = { + NOT = { has_inspiration_type = alchemy_inspiration } # Science is not based on opinion + } + NOT = { has_character_flag = had_event_fund_inspiration_2030 } + } + any_relation = { + type = friend + fund_inspiration_court_relation_trigger = yes + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2030 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + random_relation = { + type = friend + limit = { fund_inspiration_court_relation_trigger = yes } + save_scope_as = friend + progress_towards_friend_effect = { CHARACTER = scope:inspiration_owner REASON = friend_helped_inspiration OPINION = default_friend_opinion } + } + scope:inspiration_owner = { + random_list = { + 2 = { + change_artifact_quality_effect = { AMOUNT = 3 } + } + 2 = { + change_artifact_quality_effect = { AMOUNT = -3 } + } + } + } + } + + # Nice + option = { + name = fund_inspiration.2030.a + } +} + +# Rival sabotages your sponsee +# by Joe Parkin +fund_inspiration.2040 = { + type = character_event + title = fund_inspiration.2040.t + desc = fund_inspiration.2040.desc + theme = realm + override_background = { + reference = corridor_day + } + left_portrait = { + character = scope:inspiration_owner + animation = anger + } + lower_right_portrait = { + character = scope:rival + animation = schadenfreude + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2040 } + + } + OR = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + scope:inspiration_owner = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2040 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + if = { + limit = { intrigue >= average_skill_rating } + if = { + limit = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + } + random_relation = { + type = rival + limit = { fund_inspiration_court_relation_trigger = yes } + save_scope_as = rival + } + } + else = { + scope:inspiration_owner = { + random_relation = { + type = rival + limit = { fund_inspiration_court_relation_trigger = yes } + save_scope_as = rival + } + } + } + } + } + + option = { + name = fund_inspiration.2040.a + trigger = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + + option = { + name = fund_inspiration.2040.b + trigger = { + NOT = { + any_relation = { + type = rival + fund_inspiration_court_relation_trigger = yes + } + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + + option = { + name = fund_inspiration.2040.c + trigger = { exists = scope:rival } + skill = intrigue + flavor = fund_inspiration.2040.c.flavor + duel = { + skill = intrigue + value = average_skill_rating + 40 = { + desc = fund_inspiration.2040.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + custom_tooltip = fund_inspiration.2040.c.tt + show_as_tooltip = { + add_prestige = minor_prestige_gain + add_intrigue_lifestyle_xp = medium_lifestyle_experience + } + trigger_event = { + id = fund_inspiration.2041 + days = 3 + } + } + 60 = { + desc = fund_inspiration.2040.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + show_as_tooltip = { + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + trigger_event = { + id = fund_inspiration.2042 + days = 3 + } + } + } + } +} + +fund_inspiration.2041 = { + type = character_event + title = fund_inspiration.2040.t + desc = fund_inspiration.2041.desc + theme = intrigue + right_portrait = { + character = scope:rival + animation = scheme + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + exists = scope:rival + scope:rival = { fund_inspiration_court_relation_trigger = yes } + } + + immediate = { + scope:rival = { + add_character_flag = { + flag = use_stealth_clothes + days = 1 + } + } + add_intrigue_lifestyle_xp = medium_lifestyle_experience + } + + option = { + name = fund_inspiration.2041.a + add_prestige = minor_prestige_gain + rightfully_imprison_character_effect = { + TARGET = scope:rival + IMPRISONER = root + } + stress_impact = { + calm = medium_stress_impact_gain + patient = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + option = { + name = fund_inspiration.2041.b + remove_courtier_or_guest = scope:rival + ai_chance = { + base = 25 + } + } + + option = { + name = fund_inspiration.2041.c + add_character_modifier = { + modifier = ep1_fund_inspiration_2040_scheme_modifier + years = 5 + } + stress_impact = { + wrathful = medium_stress_impact_gain + impatient = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } +} + +fund_inspiration.2042 = { + type = character_event + hidden = yes + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + } + + immediate = { + send_interface_toast = { + title = fund_inspiration.2040.c.failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } +} + +# Skillcheck to improve inspiration quality +# by Joe Parkin +scripted_trigger fund_inspiration_martial_trigger = { + scope:inspiration = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + AND = { + has_inspiration_type = book_inspiration + inspiration_owner = { + trigger_if = { + limit = { has_variable = book_subject } + var:book_subject = flag:martial + } + trigger_else = { always = no } + } + } + } + } +} + +scripted_trigger fund_inspiration_stewardship_trigger = { + scope:inspiration = { + OR = { + has_inspiration_type = weaver_inspiration + has_inspiration_type = artisan_inspiration + has_inspiration_type = smith_inspiration + AND = { + has_inspiration_type = book_inspiration + inspiration_owner = { + trigger_if = { + limit = { has_variable = book_subject } + var:book_subject = flag:stewardship + } + trigger_else = { always = no } + } + } + } + } +} + +scripted_trigger fund_inspiration_diplomacy_trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + trigger_if = { + limit = { has_variable = book_subject } + var:book_subject = flag:diplomacy + } + trigger_else = { always = no } + } + } +} + +scripted_trigger fund_inspiration_intrigue_trigger = { + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + trigger_if = { + limit = { has_variable = book_subject } + var:book_subject = flag:intrigue + } + trigger_else = { always = no } + } + } +} + +scripted_effect fund_inspiration_skillcheck_duel_effect = { + duel = { + skill = $SKILL$ + value = average_skill_rating + $CHANCE$ = { + desc = fund_inspiration.2050.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + min = 5 + send_interface_toast = { + title = fund_inspiration.2050.success + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = $AMOUNT$ } + } + } + } + 30 = { + desc = fund_inspiration.2050.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + send_interface_toast = { + title = fund_inspiration.2050.failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -$AMOUNT$ } + } + } + } + 20 = { + desc = fund_inspiration.2050.nothing + modifier = { + factor = 1.5 + scope:inspiration_owner = { + OR = { + has_trait = arrogant + has_trait = stubborn + opinion = { + target = root + value < 0 + } + } + } + } + modifier = { + factor = 0.5 + scope:inspiration_owner = { + OR = { + has_trait = fickle + has_trait = humble + opinion = { + target = root + value >= 50 + } + } + } + } + } + } +} + +fund_inspiration.2050 = { + type = character_event + title = fund_inspiration.2050.t + desc = fund_inspiration.2050.desc + theme = realm + override_background = { + reference = study + } + left_portrait = { + character = scope:inspiration_owner + animation = worry + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2050 } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2050 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + } + + option = { # Skill check based on inspiration type + name = fund_inspiration.2050.a + if = { # Martial + limit = { fund_inspiration_martial_trigger = yes } + fund_inspiration_skillcheck_duel_effect = { SKILL = martial AMOUNT = 4 CHANCE = 30 } + } + else_if = { # Stewardship + limit = { fund_inspiration_stewardship_trigger = yes } + fund_inspiration_skillcheck_duel_effect = { SKILL = stewardship AMOUNT = 4 CHANCE = 30 } + } + else_if = { # Diplomacy + limit = { fund_inspiration_diplomacy_trigger = yes } + fund_inspiration_skillcheck_duel_effect = { SKILL = diplomacy AMOUNT = 4 CHANCE = 30 } + } + else_if = { # Intrigue + limit = { fund_inspiration_intrigue_trigger = yes } + fund_inspiration_skillcheck_duel_effect = { SKILL = intrigue AMOUNT = 4 CHANCE = 30 } + } + else = { # Learning + fund_inspiration_skillcheck_duel_effect = { SKILL = learning AMOUNT = 4 CHANCE = 30 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = contempt_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -1 + } + } + } + + option = { # Education fallback + name = fund_inspiration.2050.b + trigger = { + OR = { + AND = { + fund_inspiration_diplomacy_trigger = no + has_trait = education_diplomacy + } + AND = { + fund_inspiration_martial_trigger = no + has_trait = education_martial + } + AND = { + fund_inspiration_stewardship_trigger = no + has_trait = education_stewardship + } + AND = { + fund_inspiration_intrigue_trigger = no + has_trait = education_intrigue + } + } + NOT = { + scope:inspiration = { + has_inspiration_type = research_inspiration + } + } + } + trait = education_diplomacy_1 + trait = education_diplomacy_2 + trait = education_diplomacy_3 + trait = education_diplomacy_4 + trait = education_diplomacy_5 + trait = education_martial_1 + trait = education_martial_2 + trait = education_martial_3 + trait = education_martial_4 + trait = education_martial_5 + trait = education_stewardship_1 + trait = education_stewardship_2 + trait = education_stewardship_3 + trait = education_stewardship_4 + trait = education_stewardship_5 + trait = education_intrigue_1 + trait = education_intrigue_2 + trait = education_intrigue_3 + trait = education_intrigue_4 + trait = education_intrigue_5 + trait = education_learning_1 + trait = education_learning_2 + trait = education_learning_3 + trait = education_learning_4 + trait = education_learning_5 + if = { # Martial + limit = { + fund_inspiration_martial_trigger = no + has_trait = education_martial + } + fund_inspiration_skillcheck_duel_effect = { SKILL = martial AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Stewardship + limit = { + fund_inspiration_stewardship_trigger = no + has_trait = education_stewardship + } + fund_inspiration_skillcheck_duel_effect = { SKILL = stewardship AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Diplomacy + limit = { + fund_inspiration_diplomacy_trigger = no + has_trait = education_diplomacy + } + fund_inspiration_skillcheck_duel_effect = { SKILL = diplomacy AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Intrigue + limit = { + fund_inspiration_intrigue_trigger = no + has_trait = education_intrigue + } + fund_inspiration_skillcheck_duel_effect = { SKILL = intrigue AMOUNT = 2 CHANCE = 5 } + } + else = { # Learning + fund_inspiration_skillcheck_duel_effect = { SKILL = learning AMOUNT = 2 CHANCE = 5 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = contempt_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Highest skill fallback (if inspiration and education match) + name = fund_inspiration.2050.c + trigger = { + NOR = { + AND = { + fund_inspiration_diplomacy_trigger = no + has_trait = education_diplomacy + } + AND = { + fund_inspiration_martial_trigger = no + has_trait = education_martial + } + AND = { + fund_inspiration_stewardship_trigger = no + has_trait = education_stewardship + } + AND = { + fund_inspiration_intrigue_trigger = no + has_trait = education_intrigue + } + } + } + if = { # Martial + limit = { + fund_inspiration_martial_trigger = no + NOT = { has_trait = education_martial } + highest_skill = martial + } + fund_inspiration_skillcheck_duel_effect = { SKILL = martial AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Stewardship + limit = { + fund_inspiration_stewardship_trigger = no + NOT = { has_trait = education_stewardship } + highest_skill = stewardship + } + fund_inspiration_skillcheck_duel_effect = { SKILL = stewardship AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Diplomacy + limit = { + fund_inspiration_diplomacy_trigger = no + NOT = { has_trait = education_diplomacy } + highest_skill = diplomacy + } + fund_inspiration_skillcheck_duel_effect = { SKILL = diplomacy AMOUNT = 2 CHANCE = 5 } + } + else_if = { # Intrigue + limit = { + fund_inspiration_intrigue_trigger = no + NOT = { has_trait = education_intrigue } + highest_skill = intrigue + } + fund_inspiration_skillcheck_duel_effect = { SKILL = intrigue AMOUNT = 2 CHANCE = 5 } + } + else = { # Learning + fund_inspiration_skillcheck_duel_effect = { SKILL = learning AMOUNT = 2 CHANCE = 10 } # more for learning + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = contempt_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Prowess bonus option for equipment + name = fund_inspiration.2050.d + trigger = { + scope:inspiration = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + } + skill = prowess + fund_inspiration_skillcheck_duel_effect = { SKILL = prowess AMOUNT = 4 CHANCE = 10 } + stress_impact = { + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Don't get involved + name = fund_inspiration.2050.e + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = 1 + } + } + } +} + +# Fame donation +# by Joe Parkin +fund_inspiration.2060 = { + type = character_event + title = fund_inspiration.2060.t + desc = { + random_valid = { + triggered_desc = { + trigger = { + OR = { + piety_level >= high_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + desc = fund_inspiration.2060.desc.religious + } + triggered_desc = { + trigger = { prestige_level >= high_prestige_level } + desc = fund_inspiration.2060.desc.fame + } + triggered_desc = { + trigger = { court_grandeur_current_level >= 8 } + desc = fund_inspiration.2060.desc.court + } + } + desc = fund_inspiration.2060.desc + random_valid = { + triggered_desc = { + trigger = { + OR = { + piety_level >= high_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + desc = fund_inspiration.2060.desc.brotherhood + } + triggered_desc = { + trigger = { + OR = { + piety_level >= high_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + desc = fund_inspiration.2060.desc.abbey + } + triggered_desc = { + trigger = { + OR = { + prestige_level >= high_prestige_level + court_grandeur_current_level >= 8 + } + } + desc = fund_inspiration.2060.desc.mercenary + } + triggered_desc = { + trigger = { + OR = { + prestige_level >= high_prestige_level + court_grandeur_current_level >= 8 + } + } + desc = fund_inspiration.2060.desc.guild + } + } + random_valid = { + triggered_desc = { + trigger = { piety_level >= high_piety_level } + desc = fund_inspiration.2060.piety + } + triggered_desc = { + trigger = { has_trait = saoshyant } + desc = fund_inspiration.2060.saoshyant + } + triggered_desc = { + trigger = { has_trait = savior } + desc = fund_inspiration.2060.savior + } + triggered_desc = { + trigger = { has_trait = saint } + desc = fund_inspiration.2060.saint + } + triggered_desc = { + trigger = { prestige_level >= high_prestige_level } + desc = fund_inspiration.2060.prestige + } + triggered_desc = { + trigger = { court_grandeur_current_level >= 8 } + desc = fund_inspiration.2060.grandeur + } + } + desc = fund_inspiration.2060.desc_outro + } + theme = realm + left_portrait = { + character = scope:donator + animation = admiration + } + right_portrait = { + character = scope:inspiration_owner + animation = happiness + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + #NOT = { has_character_flag = had_event_fund_inspiration_2060 } + } + OR = { + piety_level = max_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + prestige_level = max_prestige_level + court_grandeur_current_level >= 8 + } + any_held_county = { + any_county_province = { has_holding = yes } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + #add_character_flag = { + # flag = had_event_fund_inspiration_2060 + # years = 5 + #} + add_inspiration_cooldown_flag = yes + } + # Generate donating character + random_list = { + 2 = { # Religious + trigger = { + OR = { + piety_level = max_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + create_character = { + template = monk_character_template + dynasty = none + location = root.capital_province + save_scope_as = donator + } + } + 2 = { # Secular + trigger = { + OR = { + prestige_level = max_prestige_level + court_grandeur_current_level >= 8 + } + } + create_character = { + template = new_warrior_character + gender_female_chance = root_soldier_female_chance + culture = root.culture + faith = root.faith + dynasty = none + location = root.capital_province + save_scope_as = donator + } + } + } + hidden_effect = { + scope:donator = { add_gold = root.minor_gold_value } + } + # Find county origin + random_held_county = { + limit = { + this != root.capital_county + any_county_province = { has_holding = yes } + } + alternative_limit = { + any_county_province = { has_holding = yes } + } + random_county_province = { + limit = { has_holding = yes } + barony = { save_scope_as = barony_scope } + } + } + } + + option = { # I am honored + name = fund_inspiration.2060.a + scope:donator = { + pay_short_term_gold = { + target = root + gold = root.tiny_gold_value + } + } + scope:inspiration = { invest_gold = root.tiny_gold_value } + scope:barony_scope.county = { + add_county_modifier = { + modifier = ep1_fund_inspiration_2070_accept_modifier + years = 5 + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + stress_impact = { + generous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 1 + } + } + } + + option = { # Refuse gift + name = { + trigger = { + OR = { + piety_level = max_piety_level + has_trait = saoshyant + has_trait = savior + has_trait = saint + } + } + text = fund_inspiration.2060.b.religious + } + name = { + trigger = { + OR = { + prestige_level = max_prestige_level + court_grandeur_current_level >= 8 + } + } + text = fund_inspiration.2060.b.prestige + } + scope:barony_scope.county = { + add_county_modifier = { + modifier = ep1_fund_inspiration_2070_refuse_modifier + years = 5 + } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = annoyed_opinion + opinion = -10 + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # Mock gift + name = fund_inspiration.2060.c + if = { + limit = { + scope:donator = { has_trait = devoted } + } + add_piety = medium_piety_loss + } + else = { + add_prestige = medium_prestige_loss + } + scope:donator = { + pay_short_term_gold = { + target = root + gold = root.tiny_gold_value + } + } + scope:inspiration = { invest_gold = root.tiny_gold_value } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + scope:barony_scope.county = { + add_county_modifier = { + modifier = ep1_fund_inspiration_2070_mock_modifier + years = 5 + } + } + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -1 + } + } + } +} + +# Flawed artisan +# by Joe Parkin +scripted_trigger has_artisan_incapacity_trait = { + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = depressed + has_trait = drunkard + has_trait = hashishiyah + has_trait = reclusive + has_trait = rakish + has_trait = profligate + has_trait = improvident + has_trait = comfort_eater + has_trait = irritable + has_trait = wounded + has_trait = pregnant + has_treatable_disease_trigger = yes + } +} + +fund_inspiration.2070 = { + type = character_event + title = fund_inspiration.2070.t + desc = { + desc = fund_inspiration.2070.desc + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { + OR = { + has_trait = profligate + has_trait = improvident + has_trait = depressed + has_trait = drunkard + has_trait = hashishiyah + has_trait = rakish + has_trait = comfort_eater + has_trait = wounded + has_trait = pregnant + has_treatable_disease_trigger = yes + } + } + } + desc = fund_inspiration.2070.desc.stalled + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = reclusive + has_trait = irritable + } + } + } + desc = fund_inspiration.2070.desc.wasted + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = profligate } + } + desc = fund_inspiration.2070.desc.profligate + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = improvident } + } + desc = fund_inspiration.2070.desc.improvident + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = depressed } + } + desc = fund_inspiration.2070.desc.depressed + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = drunkard } + } + desc = fund_inspiration.2070.desc.drunkard + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = hashishiyah } + } + desc = fund_inspiration.2070.desc.hashishiyah + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = rakish } + } + desc = fund_inspiration.2070.desc.rakish + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = comfort_eater } + } + desc = fund_inspiration.2070.desc.comfort_eater + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = lunatic } + } + desc = fund_inspiration.2070.desc.lunatic + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = possessed } + } + desc = fund_inspiration.2070.desc.possessed + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = reclusive } + } + desc = fund_inspiration.2070.desc.reclusive + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = irritable } + } + desc = fund_inspiration.2070.desc.irritable + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = wounded } + } + desc = fund_inspiration.2070.desc.wounded + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_trait = pregnant } + } + desc = fund_inspiration.2070.desc.pregnant + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { has_treatable_disease_trigger = yes } + } + desc = fund_inspiration.2070.desc.sick + } + } + desc = fund_inspiration.2070.desc_outro + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { has_trait = pregnant } + animation = pregnant + } + triggered_animation = { + trigger = { + OR = { + has_trait = lunatic + has_trait = possessed + } + } + animation = paranoia + } + triggered_animation = { + trigger = { has_trait = depressed } + animation = boredom + } + triggered_animation = { + trigger = { + OR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = rakish + } + } + animation = toast + } + triggered_animation = { + trigger = { + OR = { + has_trait = profligate + has_trait = improvident + } + } + animation = boredom + } + triggered_animation = { + trigger = { has_trait = irritable } + animation = anger + } + triggered_animation = { + trigger = { has_treatable_disease_trigger = yes } + animation = sick + } + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_2070 } + has_artisan_incapacity_trait = yes + inspiration.inspiration_progress >= 2 + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2070 + years = 5 + } + add_inspiration_cooldown_flag = yes + inspiration = { change_inspiration_progress = -2 } + } + } + + option = { # Pull yourself together + name = fund_inspiration.2070.a + scope:inspiration = { + if = { + limit = { + inspiration_owner = { + OR = { + has_trait = profligate + has_trait = improvident + } + } + } + invest_gold = root.medium_gold_value + root = { + stress_impact = { greedy = medium_stress_impact_gain } + } + } + else = { + invest_gold = root.minor_gold_value + root = { + stress_impact = { greedy = minor_stress_impact_gain } + } + } + change_inspiration_progress = 1 + } + stress_impact = { + vengeful = minor_stress_impact_gain + impatient = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_greed = -0.5 + ai_compassion = 0.5 + } + } + } + + option = { # I understand + name = fund_inspiration.2070.b + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = forgiven_opinion + opinion = 10 + } + stress_impact = { + vengeful = medium_stress_impact_gain + callous = medium_stress_impact_gain + impatient = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = -1 + ai_greed = -1 + ai_compassion = 1 + } + } + } + + option = { # Unacceptable + name = fund_inspiration.2070.c + scope:inspiration_owner = { + inspiration = { change_inspiration_progress = 2 } + stress_impact = { + base = massive_stress_impact_gain + craven = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + change_artifact_quality_effect = { AMOUNT = -4 } + } + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 1 + ai_greed = 1 + ai_compassion = -1 + } + } + } + + option = { # Get out + name = fund_inspiration.2070.d + trigger = { + scope:inspiration_owner = { is_courtier = yes } + } + send_interface_toast = { + title = fund_inspiration.2100.c.leave + left_icon = scope:inspiration_owner + add_prestige = minor_prestige_gain + end_inspiration_sponsorship = scope:inspiration + remove_courtier_or_guest = scope:inspiration_owner + if = { + limit = { + scope:inspiration_owner = { + NOR = { + has_trait = profligate + has_trait = improvident + } + } + } + custom_tooltip = fund_inspiration_quarter_refund_tt + add_gold = { + value = scope:inspiration.inspiration_gold_invested + divide = 4 + } + } + } + stress_impact = { + forgiving = major_stress_impact_gain + patient = major_stress_impact_gain + greedy = major_stress_impact_gain + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 2 + ai_greed = -1 + ai_compassion = -1 + } + } + } +} + +# Antiquarian meddles with inspiration +# by Joe Parkin +scripted_trigger fi_2080_antiquarian_trigger = { + is_available_ai_adult = yes + NOR = { + this = scope:inspiration_owner + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:inspiration_owner } + } +} + +fund_inspiration.2080 = { + type = character_event + title = fund_inspiration.2080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:rival = { has_court_position = antiquarian_court_position } + } + desc = fund_inspiration.2080.antiquarian + } + triggered_desc = { + trigger = { + scope:rival = { has_court_position = court_artificer_court_position } + } + desc = fund_inspiration.2080.artificer + } + } + desc = fund_inspiration.2080.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = dismissal + } + right_portrait = { + character = scope:antiquarian + animation = disapproval + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2080 + has_variable = banner_commission + } + } + OR = { + any_court_position_holder = { + type = antiquarian_court_position + fi_2080_antiquarian_trigger = yes + } + any_court_position_holder = { + type = court_artificer_court_position + fi_2080_antiquarian_trigger = yes + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_2080 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + if = { + limit = { + any_court_position_holder = { + type = antiquarian_court_position + fi_2080_antiquarian_trigger = yes + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { fi_2080_antiquarian_trigger = yes } + save_scope_as = antiquarian + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = scope:inspiration_owner + OPINION = 0 + } + } + } + if = { + limit = { + any_court_position_holder = { + type = court_artificer_court_position + fi_2080_antiquarian_trigger = yes + } + } + random_court_position_holder = { + type = court_artificer_court_position + limit = { fi_2080_antiquarian_trigger = yes } + save_scope_as = artificer + } + } + random_list = { + 2 = { + trigger = { exists = scope:antiquarian } + modifier = { + factor = 10 + scope:antiquarian = { + OR = { + has_trait = diligent + has_trait = arrogant + has_relation_rival = scope:inspiration_owner + } + } + } + scope:antiquarian = { save_scope_as = rival } + } + 2 = { + trigger = { exists = scope:artificer } + modifier = { + factor = 10 + scope:artificer = { + OR = { + has_trait = diligent + has_trait = arrogant + has_relation_rival = scope:inspiration_owner + } + } + } + scope:artificer = { save_scope_as = rival } + } + } + } + + option = { # Side with position holder + name = fund_inspiration.2080.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:rival + modifier = respect_opinion + opinion = 5 + } + random_list = { + 5 = { + modifier = { factor = scope:rival.aptitude:antiquarian_court_position } + send_interface_toast = { + title = fund_inspiration.2080.success + left_icon = scope:rival + right_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + 10 = { + send_interface_toast = { + title = fund_inspiration.2080.failure + left_icon = scope:rival + right_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } + } + stress_impact = { + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.5 + } + } + } + + option = { # Side with sponsee + name = fund_inspiration.2080.b + reverse_add_opinion = { + target = scope:rival + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 5 + } + stress_impact = { + greedy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + } + } + + option = { # Replace with sponsee + name = fund_inspiration.2080.c + reverse_add_opinion = { + target = scope:rival + modifier = angry_opinion + opinion = -20 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 10 + } + scope:rival = { + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = scope:inspiration_owner + OPINION = 0 + } + } + if = { + limit = { + scope:rival = { has_court_position = court_artificer_court_position } + } + replace_court_position = { + recipient = scope:inspiration_owner + holder = scope:rival + court_position = court_artificer_court_position + } + } + else = { + replace_court_position = { + recipient = scope:inspiration_owner + holder = scope:rival + court_position = antiquarian_court_position + } + } + random = { + chance = 50 + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + stress_impact = { + calm = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 1 + } + } + } +} + +# Spouse meddles with inspiration +# by Joe Parkin +fund_inspiration.2090 = { + type = character_event + title = fund_inspiration.2090.t + desc = fund_inspiration.2090.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = stress + } + right_portrait = { + character = scope:event_spouse + animation = happiness + } + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + exists = primary_spouse + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2090 + has_variable = banner_commission + } + } + scope:inspiration = { + OR = { + has_inspiration_type = weaver_inspiration + has_inspiration_type = artisan_inspiration + has_inspiration_type = smith_inspiration + has_inspiration_type = research_inspiration + trigger_if = { + limit = { + root.primary_spouse = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + } + } + is_married = yes + primary_spouse = { + is_available_ai_adult = yes + is_landed = no + is_in_the_same_court_as_or_guest = root + this != scope:inspiration_owner + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + primary_spouse = { + OR = { + has_trait = diligent + has_trait = arrogant + } + } + } + modifier = { + add = -1 + primary_spouse = { + OR = { + has_trait = humble + has_trait = shy + has_trait = lazy + } + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_2090 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + primary_spouse = { save_scope_as = event_spouse } + } + + option = { + name = fund_inspiration.2090.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = angry_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:event_spouse + modifier = pleased_opinion + opinion = 5 + } + random_list = { + 4 = { + modifier = { factor = scope:event_spouse.aptitude:antiquarian_court_position } + send_interface_toast = { + title = fund_inspiration.2090.success + left_icon = scope:event_spouse + right_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + 10 = { + send_interface_toast = { + title = fund_inspiration.2090.failure + left_icon = scope:event_spouse + right_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } + } + stress_impact = { + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + } + } + + option = { + name = fund_inspiration.2090.b + reverse_add_opinion = { + target = scope:event_spouse + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 5 + } + stress_impact = { + greedy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.5 + } + } + } +} + +# Sponsee jealous of another sponsee +# by Joe Parkin +fund_inspiration.2100 = { + type = character_event + title = fund_inspiration.2100.t + desc = { + desc = fund_inspiration.2100.desc + first_valid = { + triggered_desc = { + trigger = { scope:other_inspiration_owner.inspiration.inspiration_gold_invested > scope:inspiration.inspiration_gold_invested } + desc = fund_inspiration.2100.desc.funds + } + triggered_desc = { + trigger = { + scope:other_inspiration_owner = { has_relation_rival = scope:inspiration_owner } + } + desc = fund_inspiration.2100.desc.rival + } + desc = fund_inspiration.2100.desc.fallback + } + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = disapproval + } + right_portrait = { + character = scope:other_inspiration_owner + animation = admiration + } + override_background = { + reference = feast + } + cooldown = { years = 2 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2100 + has_variable = banner_commission + } + OR = { + NOR = { + has_trait = humble + has_trait = shy + has_trait = lazy + } + any_relation = { + type = rival + exists = inspiration.inspiration_sponsor + inspiration.inspiration_sponsor = root + } + } + } + any_sponsored_inspiration = { + NOT = { inspiration_owner = scope:inspiration_owner } + inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:inspiration_owner = { + OR = { + has_trait = diligent + has_trait = arrogant + } + } + } + modifier = { + factor = 2 + any_sponsored_inspiration = { + NOT = { inspiration_owner = scope:inspiration_owner } + inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + inspiration_gold_invested > scope:inspiration.inspiration_gold_invested + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_2100 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + random_sponsored_inspiration = { + limit = { + NOT = { inspiration_owner = scope:inspiration_owner } + inspiration_owner = { fund_inspiration_court_inspiration_owner_trigger = yes } + } + weight = { + base = 1 + modifier = { + factor = 2 + inspiration_gold_invested > scope:inspiration.inspiration_gold_invested + } + modifier = { + factor = 4 + inspiration_owner = { has_relation_rival = scope:inspiration_owner } + } + } + inspiration_owner = { save_scope_as = other_inspiration_owner } + } + } + + option = { # Praise work + name = fund_inspiration.2100.a + add_prestige = minor_prestige_loss + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = pleased_opinion + opinion = 5 + } + stress_impact = { + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { # Match funding + name = fund_inspiration.2100.b + trigger = { scope:inspiration.inspiration_gold_invested < scope:other_inspiration_owner.inspiration.inspiration_gold_invested } + if = { + limit = { ep1_fund_inspiration_2100_rival_difference < 50 } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + else = { + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + scope:inspiration = { invest_gold = ep1_fund_inspiration_2100_rival_difference } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = pleased_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:other_inspiration_owner + modifier = annoyed_opinion + opinion = -10 + } + stress_impact = { + greedy = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_honor = 1 + } + } + } + + option = { # Attempt to settle dispute + name = fund_inspiration.2100.c + duel = { + skill = diplomacy + target = scope:inspiration_owner + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + } + min = 5 + send_interface_toast = { + title = fund_inspiration.2100.success + left_icon = scope:inspiration_owner + right_icon = scope:other_inspiration_owner + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + min = 5 + send_interface_toast = { + title = fund_inspiration.2100.failure + left_icon = scope:inspiration_owner + right_icon = scope:other_inspiration_owner + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -10 + } + progress_towards_rival_effect = { + REASON = rival_dispute_inspiration + CHARACTER = scope:other_inspiration_owner + OPINION = 0 + } + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 1 + } + } + } + + option = { # Berate + name = fund_inspiration.2100.d + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:other_inspiration_owner + modifier = grateful_opinion + opinion = 5 + } + random_list = { + 50 = { + send_interface_toast = { + title = fund_inspiration.2100.c.leave + left_icon = scope:inspiration_owner + end_inspiration_sponsorship = scope:inspiration + if = { + limit = { + scope:inspiration_owner = { is_courtier = yes } + } + remove_courtier_or_guest = scope:inspiration_owner + } + custom_tooltip = fund_inspiration_half_refund_tt + add_gold = { + value = scope:inspiration.inspiration_gold_invested + divide = 2 + } + } + } + 50 = { + send_interface_toast = { + title = fund_inspiration.2100.c.worse + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + calm = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -1 + } + } + } +} + +# Vassal invests in inspiration +# by Joe Parkin +scripted_trigger fi_2110_generous_vassal_trigger = { + is_available_ai_adult = yes + gold >= medium_gold_value + has_any_bad_relationship_with_root_trigger = no + NOR = { + has_trait = greedy + this = scope:inspiration_owner + } + OR = { + gold >= major_gold_value + has_trait = scholar + has_trait = theologian + has_trait = diligent + has_trait = profligate + has_trait = generous + has_trait = improvident + has_trait = diligent + has_any_good_relationship_with_root_trigger = yes + } +} + +fund_inspiration.2110 = { + type = character_event + title = fund_inspiration.2110.t + desc = { + desc = fund_inspiration.2110.desc + random_valid = { + triggered_desc = { + trigger = { + scope:inspiration = { has_inspiration_type = research_inspiration } + } + desc = fund_inspiration.2110.desc.part.2.research + } + triggered_desc = { + desc = fund_inspiration.2110.desc.part.2 + } + } + random_valid = { + triggered_desc = { + trigger = { + scope:generous_vassal = { + OR = { + has_trait = profligate + has_trait = generous + has_trait = improvident + } + } + } + desc = fund_inspiration.2110.desc.generous + } + triggered_desc = { + trigger = { + scope:generous_vassal = { + NOT = { + scope:inspiration = { has_inspiration_type = research_inspiration } + } + OR = { + has_trait = scholar + has_trait = theologian + has_trait = diligent + } + } + } + desc = fund_inspiration.2110.desc.dweeb + } + triggered_desc = { + trigger = { + scope:generous_vassal = { + scope:inspiration = { has_inspiration_type = research_inspiration } + OR = { + has_trait = scholar + has_trait = theologian + has_trait = diligent + } + } + } + desc = fund_inspiration.2110.desc.dweeb.research + } + triggered_desc = { + trigger = { + scope:generous_vassal = { has_any_good_relationship_with_root_trigger = yes } + } + desc = fund_inspiration.2110.desc.friend + } + triggered_desc = { + trigger = { + scope:generous_vassal = { + NOR = { + has_trait = profligate + has_trait = generous + has_trait = improvident + has_trait = scholar + has_trait = theologian + has_trait = diligent + has_any_good_relationship_with_root_trigger = yes + } + } + } + desc = fund_inspiration.2110.desc.rich + } + } + } + theme = realm + left_portrait = { + character = scope:generous_vassal + animation = admiration + } + lower_right_portrait = scope:inspiration_owner + cooldown = { years = 2 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2100 + has_variable = banner_commission + } + } + any_vassal_or_below = { fi_2110_generous_vassal_trigger = yes } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_2100 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + random_vassal_or_below = { + limit = { fi_2110_generous_vassal_trigger = yes } + save_scope_as = generous_vassal + } + } + + option = { + name = fund_inspiration.2110.a + scope:generous_vassal = { + hidden_effect = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + show_as_tooltip = { + pay_short_term_gold = { + target = scope:inspiration_owner + gold = minor_gold_value + } + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + hidden_effect = { + inspiration = { invest_gold = scope:generous_vassal.minor_gold_value } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = -0.5 + } + } + } + + option = { + name = fund_inspiration.2110.b + flavor = fund_inspiration.2110.b.flavor + scope:generous_vassal = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + stress_impact = { + honest = medium_stress_impact_gain + generous = medium_stress_impact_gain + just = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_honor = -1 + ai_compassion = -1 + } + } + } + + option = { + name = fund_inspiration.2110.c + reverse_add_opinion = { + target = scope:generous_vassal + modifier = respect_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -5 + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +# Sponsee romance +# by Joe Parkin +scripted_trigger fi_2120_homosexuality_not_accepted_trigger = { + sex_same_as = scope:inspiration_owner + NOT = { + faith = { has_doctrine = doctrine_homosexuality_accepted } + } +} + +fund_inspiration.2120 = { + type = character_event + title = fund_inspiration.2120.t + desc = { + desc = fund_inspiration.2120.desc + first_valid = { + triggered_desc = { + trigger = { has_character_flag = fund_inspiration_2070_instigator } + desc = fund_inspiration.2120.desc.me + } + desc = fund_inspiration.2120.desc.them + } + first_valid = { + # THEY react + triggered_desc = { + trigger = { + has_character_flag = fund_inspiration_2070_instigator + scope:inspiration_owner = { has_trait = lustful } + } + desc = fund_inspiration.2120.desc.them_into_alot + } + triggered_desc = { + trigger = { has_character_flag = fund_inspiration_2070_instigator } + desc = fund_inspiration.2120.desc.them_into + } + # ROOT reacts + triggered_desc = { + trigger = { + NOT = { is_attracted_to_gender_of = scope:inspiration_owner } + } + desc = fund_inspiration.2120.desc.me_unattracted + } + triggered_desc = { + trigger = { + has_trait = zealous + sex_same_as = scope:inspiration_owner + NOT = { + faith = { has_doctrine = doctrine_homosexuality_accepted } + } + } + desc = fund_inspiration.2120.desc.me_zealous_homosexuality + } + triggered_desc = { + trigger = { + has_trait = zealous + OR = { + would_be_sinful_adulterer_trigger = yes + scope:inspiration_owner = { would_be_sinful_adulterer_trigger = yes } + } + } + desc = fund_inspiration.2120.desc.me_zealous_adultery + } + triggered_desc = { + trigger = { has_trait = chaste } + desc = fund_inspiration.2120.desc.me_chaste + } + triggered_desc = { + trigger = { has_trait = lustful } + desc = fund_inspiration.2120.desc.me_into_alot + } + triggered_desc = { + trigger = { is_attracted_to_gender_of = scope:inspiration_owner } + desc = fund_inspiration.2120.desc.me_into + } + } + } + theme = realm + override_background = { + reference = sitting_room + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { has_trait = chaste } + is_attracted_to_gender_of = scope:inspiration_owner + } + animation = flirtation_left + } + triggered_animation = { + trigger = { + NOT = { is_attracted_to_gender_of = scope:inspiration_owner } + } + animation = disgust + } + triggered_animation = { + trigger = { has_trait = chaste } + animation = shock + } + } + right_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { + NOT = { has_trait = chaste } + is_attracted_to_gender_of = root + } + animation = flirtation + } + triggered_animation = { + trigger = { + NOT = { is_attracted_to_gender_of = root } + } + animation = disgust + } + triggered_animation = { + trigger = { has_trait = chaste } + animation = shock + } + } + cooldown = { years = 10 } + + trigger = { + is_adult = yes + exists = scope:inspiration + might_cheat_on_every_partner_trigger = yes + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + is_attracted_to_gender_of = root + might_cheat_on_every_partner_trigger = yes + NOR = { + has_trait = chaste + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + is_close_family_of = root + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + has_trait = celibate + } + opinion = { + target = root + value > 0 + } + might_cheat_on_every_partner_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = seducer + } + modifier = { + factor = 2 + has_trait = lustful + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_inspiration_cooldown_flag = yes + } + hidden_effect = { + random_list = { + 2 = { + trigger = { + NOT = { has_trait = chaste } + is_attracted_to_gender_of = scope:inspiration_owner + might_cheat_on_every_partner_trigger = yes + scope:inspiration_owner = { might_cheat_on_every_partner_trigger = yes } + } + modifier = { + factor = 2 + scope:inspiration_owner = { has_trait = beauty_good } + } + modifier = { + factor = 0.5 + scope:inspiration_owner = { has_trait = beauty_bad } + } + modifier = { + factor = 2 + has_trait = lustful + } + modifier = { + factor = 4 + has_trait = seducer + } + add_character_flag = fund_inspiration_2070_instigator + } + 2 = { + modifier = { + factor = 2 + has_trait = beauty_good # root + } + modifier = { + factor = 0.5 + has_trait = beauty_bad # root + } + modifier = { + factor = 2 + scope:inspiration_owner = { has_trait = lustful } + } + modifier = { + factor = 4 + scope:inspiration_owner = { has_trait = seducer } + } + } + } + } + if = { + limit = { fi_2120_homosexuality_not_accepted_trigger = yes } + if = { # Their secret + limit = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } + scope:inspiration_owner = { + trigger_if = { + limit = { is_male = yes } + NOT = { has_trait = sodomite } + } + } + } + scope:inspiration_owner = { + hidden_effect = { give_homosexual_secret_or_nothing_effect = yes } + random_secret = { + type = secret_homosexual + save_scope_as = secret_scope + if = { + limit = { + NOT = { is_known_by = root } + } + reveal_to = root + } + } + } + } + else_if = { # My secret + limit = { + has_character_flag = fund_inspiration_2070_instigator + trigger_if = { + limit = { is_male = yes } + NOT = { has_trait = sodomite } + } + } + hidden_effect = { give_homosexual_secret_or_nothing_effect = yes } + random_secret = { + type = secret_homosexual + save_scope_as = secret_scope + if = { + limit = { + NOT = { is_known_by = scope:inspiration_owner } + } + reveal_to = scope:inspiration_owner + } + } + } + } + } + + option = { # Artisan accepts your seducton + name = fund_inspiration.2120.a + trigger = { has_character_flag = fund_inspiration_2070_instigator } # Initiated seduction + had_sex_with_effect = { CHARACTER = scope:inspiration_owner PREGNANCY_CHANCE = seduce_pregnancy_chance } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + set_relation_lover = { reason = lover_inspiration_working_late target = scope:inspiration_owner } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + change_artifact_quality_effect = { AMOUNT = -2 } + } + if = { + limit = { would_be_sinful_adulterer_trigger = yes } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + stress_impact = { + chaste = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Yes to their seduction, generic + name = fund_inspiration.2120.e + trigger = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } # Did not initiate seduction + OR = { + is_ai = no + AND = { + OR = { + has_perk = unshackled_lust_perk + is_attracted_to_gender_of = scope:inspiration_owner + } + trigger_if = { + limit = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:inspiration_owner } } + OR = { + has_perk = unshackled_lust_perk + freely_accepts_sodomy_with_trigger = { CHARACTER = scope:inspiration_owner } + } + } + trigger_if = { + limit = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:inspiration_owner } } + OR = { + has_perk = subtle_desire_perk + accepts_incest_with_trigger = { CHARACTER = scope:inspiration_owner } + } + } + might_cheat_on_every_partner_trigger = yes + } + } + } + had_sex_with_effect = { CHARACTER = scope:inspiration_owner PREGNANCY_CHANCE = seduce_pregnancy_chance } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + set_relation_lover = { reason = lover_inspiration_working_late target = scope:inspiration_owner } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + change_artifact_quality_effect = { AMOUNT = -2 } + } + if = { + limit = { would_be_sinful_adulterer_trigger = yes } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + stress_impact = { + chaste = medium_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # No to their seduction, generic + name = { + trigger = { + OR = { + has_trait = chaste + has_trait = celibate + } + } + text = fund_inspiration.2120.f.chaste + } + name = { + trigger = { always = yes } + text = fund_inspiration.2120.f + } + trigger = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } # Did not initiate seduction + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = no + would_be_sinful_adulterer_trigger = no + scope:inspiration_owner = { would_be_sinful_adulterer_trigger = no } + } + flavor = fund_inspiration.2120.leave_flavor + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + stress_impact = { + lustful = medium_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + option = { # Lustful attracted to instigator + name = fund_inspiration.2120.h + trigger = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } # Did not initiate seduction + has_trait = lustful + is_attracted_to_gender_of = scope:inspiration_owner + } + exclusive = yes + had_sex_with_effect = { CHARACTER = scope:inspiration_owner PREGNANCY_CHANCE = seduce_pregnancy_chance } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + set_relation_lover = { reason = lover_inspiration_working_late target = scope:inspiration_owner } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + change_artifact_quality_effect = { AMOUNT = -2 } + } + if = { + limit = { would_be_sinful_adulterer_trigger = yes } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # No, because not attracted to them + name = fund_inspiration.2120.i + trigger = { + NOR = { + has_character_flag = fund_inspiration_2070_instigator # Did not initiate seduction + is_attracted_to_gender_of = scope:inspiration_owner + } + } + flavor = fund_inspiration.2120.leave_flavor + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = -0.5 + } + } + } + + option = { # No, because homosexuality not accepted + name = fund_inspiration.2120.j + trigger = { + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = yes + } + flavor = fund_inspiration.2120.leave_flavor + add_piety = miniscule_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + lustful = major_stress_impact_gain + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 1 + ai_sociability = -0.5 + } + } + } + + option = { # No, because adultery not accepted + name = { + trigger = { is_married = yes } + text = fund_inspiration.2120.k.me + } + name = { + trigger = { + scope:inspiration_owner = { is_married = yes } + } + text = fund_inspiration.2120.k.them + } + trigger = { + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = no + OR = { + would_be_sinful_adulterer_trigger = yes + scope:inspiration_owner = { would_be_sinful_adulterer_trigger = yes } + } + } + flavor = fund_inspiration.2120.leave_flavor + add_piety = miniscule_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + lustful = major_stress_impact_gain + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 1 + ai_sociability = -0.5 + } + } + } + + option = { # Insulted by instigator's boldness + name = fund_inspiration.2120.l + trigger = { + NOT = { has_character_flag = fund_inspiration_2070_instigator } # Did not initiate seduction + is_attracted_to_gender_of = scope:inspiration_owner + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = insulted_opinion + opinion = -20 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + stress_impact = { + humble = medium_stress_impact_gain + lustful = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -1 + ai_sociability = -1 + } + } + } + + option = { # Reveal instigator's criminal homosexuality + name = fund_inspiration.2120.m + trigger = { exists = scope:secret_scope } + add_piety = minor_piety_gain + scope:secret_scope = { expose_secret = root } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = exposed_my_secret_opinion + opinion = -30 + } + change_artifact_quality_effect = { AMOUNT = -4 } + } + stress_impact = { + cynical = major_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = root } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -1 + ai_zeal = 2 + } + } + } + + option = { # Back out of seduction, generic + name = fund_inspiration.2120.f + trigger = { + has_character_flag = fund_inspiration_2070_instigator + NOR = { + AND = { + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = no + OR = { + would_be_sinful_adulterer_trigger = yes + scope:inspiration_owner = { would_be_sinful_adulterer_trigger = yes } + } + } + AND = { + is_attracted_to_gender_of = scope:inspiration_owner + fi_2120_homosexuality_not_accepted_trigger = yes + } + } + } + flavor = fund_inspiration.2120.leave_flavor + stress_impact = { + lustful = medium_stress_impact_gain + } + if = { + limit = { exists = scope:secret_scope } + show_as_tooltip = { + scope:secret_scope = { reveal_to = scope:inspiration_owner } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = -1 + ai_boldness = -0.5 + } + } + } + + after = { + if = { + limit = { has_character_flag = fund_inspiration_2070_instigator } + remove_character_flag = fund_inspiration_2070_instigator + } + } +} + +# Helping chain +# by Joe Parkin +scripted_effect fi_2130_lifestyle_effect = { + random = { + chance = 33 + scope:inspiration_owner = { add_trait = $TRAIT$ } + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 0 + REASON = friend_inspired_craftsman + } + } +} + +fund_inspiration.2130 = { + type = character_event + title = fund_inspiration.2130.t + desc = fund_inspiration.2130.desc + theme = realm + override_background = { + reference = corridor_day + } + left_portrait = { + character = root + } + right_portrait = { + character = scope:inspiration_owner + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_2130 + has_variable = banner_commission + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_2130 + years = 5 + } + add_inspiration_cooldown_flag = yes + } + scope:inspiration = { + if = { + limit = { + OR = { + has_inspiration_type = book_inspiration + has_inspiration_type = alchemy_inspiration + has_inspiration_type = research_inspiration + } + } + save_scope_value_as = { + name = fi_2130_room + value = flag:fi_2130_library + } + } + else_if = { + limit = { + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + save_scope_value_as = { + name = fi_2130_room + value = flag:fi_2130_armory + } + } + } + } + + option = { # Help find something + name = { + text = fund_inspiration.2130.a.library + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + } + } + name = { + text = fund_inspiration.2130.a.armory + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + } + } + name = { + text = fund_inspiration.2130.a.hall + trigger = { + NOT = { exists = scope:fi_2130_room } + } + } + flavor = fund_inspiration.2130.a.flavor + custom_tooltip = fund_inspiration.2130.a.tt + trigger_event = { + id = fund_inspiration.2131 + days = 3 + } + stress_impact = { + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + } + } + + option = { # Do this + name = fund_inspiration.2130.b + flavor = fund_inspiration.2130.b.flavor + trigger = { + OR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = rakish + has_trait = lifestyle_reveler + has_trait = lifestyle_hunter + has_trait = lifestyle_gardener + has_trait = athletic + } + } + if = { + limit = { + OR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = lifestyle_reveler + } + } + scope:inspiration_owner = { + if = { + limit = { has_trait = temperate } + stress_impact = { temperate = medium_stress_impact_gain } + } + } + } + if = { + limit = { + OR = { + has_trait = lifestyle_reveler + has_trait = rakish + } + } + scope:inspiration_owner = { + if = { + limit = { has_trait = shy } + stress_impact = { temperate = medium_stress_impact_gain } + } + } + } + if = { + limit = { + OR = { + has_trait = lifestyle_hunter + has_trait = athletic + has_trait = lifestyle_gardener + } + } + scope:inspiration_owner = { + if = { + limit = { has_trait = lazy } + stress_impact = { lazy = medium_stress_impact_gain } + } + } + } + if = { + limit = { has_trait = lifestyle_hunter } + scope:inspiration_owner = { + if = { + limit = { has_trait = craven } + stress_impact = { craven = medium_stress_impact_gain } + } + } + } + if = { + limit = { + scope:inspiration_owner = { + NOR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = lifestyle_reveler + has_trait = rakish + has_trait = lifestyle_hunter + has_trait = athletic + has_trait = lifestyle_gardener + } + } + } + if = { + limit = { has_trait = drunkard } + fi_2130_lifestyle_effect = { TRAIT = drunkard } + } + else_if = { + limit = { has_trait = hashishiyah } + fi_2130_lifestyle_effect = { TRAIT = hashishiyah } + } + else_if = { + limit = { has_trait = rakish } + fi_2130_lifestyle_effect = { TRAIT = rakish } + } + else_if = { + limit = { has_trait = lifestyle_reveler } + fi_2130_lifestyle_effect = { TRAIT = lifestyle_reveler } + } + else_if = { + limit = { has_trait = lifestyle_hunter } + fi_2130_lifestyle_effect = { TRAIT = lifestyle_hunter } + } + else_if = { + limit = { has_trait = athletic } + fi_2130_lifestyle_effect = { TRAIT = athletic } + } + else = { + fi_2130_lifestyle_effect = { TRAIT = lifestyle_gardener } + } + } + random_list = { + 5 = { + send_interface_toast = { + title = fund_inspiration.2130.b.great + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + inspiration = { change_inspiration_progress = 1 } + } + } + } + 5 = { + send_interface_toast = { + title = fund_inspiration.2130.b.good + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + inspiration = { change_inspiration_progress = 1 } + } + } + } + 20 = { + send_interface_toast = { + title = fund_inspiration.2130.b.nothing + left_icon = scope:inspiration_owner + } + } + 15 = { + send_interface_toast = { + title = fund_inspiration.2130.b.bad + left_icon = scope:inspiration_owner + scope:inspiration = { change_inspiration_progress = -1 } + } + } + 5 = { + send_interface_toast = { + title = fund_inspiration.2130.b.terrible + left_icon = scope:inspiration_owner + scope:inspiration = { change_inspiration_progress = -2 } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + } + } + + option = { # Take this + name = fund_inspiration.2130.c + flavor = fund_inspiration.2130.c.flavor + trigger = { + OR = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + has_trait = lifestyle_herbalist + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + } + if = { + limit = { + NOR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + any_secret = { + type = secret_witch + NOT = { is_known_by = scope:inspiration_owner } + } + scope:inspiration_owner = { is_alive = yes} + } + random = { + chance = 33 + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = scope:inspiration_owner } + } + reveal_to = scope:inspiration_owner + } + } + } + random_list = { + 5 = { # Miracle + send_interface_toast = { + title = fund_inspiration.2130.b.great + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + inspiration = { change_inspiration_progress = 2 } + } + } + } + 9 = { # Placebo + send_interface_toast = { + title = fund_inspiration.2130.b.good + left_icon = scope:inspiration_owner + scope:inspiration = { change_inspiration_progress = 1 } + } + } + 15 = { # Homeopathy + send_interface_toast = { + title = fund_inspiration.2130.b.nothing + left_icon = scope:inspiration_owner + } + } + 5 = { # Stupidity + send_interface_toast = { + title = fund_inspiration.2130.b.bad + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + inspiration = { change_inspiration_progress = -1 } + } + } + } + 1 = { # Gross Negligence + send_interface_toast = { + title = fund_inspiration.2130.c.dead + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + death = { death_reason = death_strongest_potion } + } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + } + } + + option = { # Oh well + name = fund_inspiration.2130.d + scope:inspiration = { change_inspiration_progress = -1 } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = annoyed_opinion + opinion = -10 + } + stress_impact = { + compassionate = medium_stress_impact_gain + diligent = medium_stress_impact_gain + generous = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 25 + } + } +} + +scripted_trigger fi_2131_artifact_type_trigger = { + NAND = { + exists = scope:artifact_1 + this = scope:artifact_1 + } + is_unique = no + artifact_durability > define:NInventory|ARTIFACT_VERY_LOW_DURABILITY + # LIBRARY + trigger_if = { + limit = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + } + trigger_if = { + limit = { + scope:inspiration = { + OR = { + has_inspiration_type = book_inspiration + has_inspiration_type = research_inspiration + } + } + } + artifact_type = book + } + trigger_else = { + OR = { + artifact_type = elixir + artifact_type = panacea + } + } + } + # ARMORY + trigger_else_if = { + limit = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + } + OR = { + artifact_slot_type = primary_armament + artifact_slot_type = armor + artifact_slot_type = helmet + } + } + # HALL + trigger_else = { + trigger_if = { + limit = { + scope:inspiration = { has_inspiration_type = smith_inspiration } + } + OR = { + artifact_type = regalia + artifact_type = brooch + artifact_type = necklace + } + } + trigger_else_if = { + limit = { + scope:inspiration = { has_inspiration_type = weaver_inspiration } + } + OR = { + artifact_type = tapestry + artifact_type = wall_big + } + } + trigger_else_if = { + limit = { scope:inspiration_owner.var:artifact_artisan_type = flag:artisan_type_sculpture } + artifact_type = sculpture + } + trigger_else = { + OR = { + artifact_type = cabinet + artifact_type = chest + artifact_type = throne + } + } + } +} + +fund_inspiration.2131 = { + type = character_event + title = fund_inspiration.2131.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + NOR = { + has_trait = education_learning + has_lifestyle = learning_lifestyle + learning >= decent_skill_rating + has_trait = scholar + has_trait = theologian + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + } + } + desc = fund_inspiration.2131.desc_library_unused + } + triggered_desc = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + } + desc = fund_inspiration.2131.desc_library + } + triggered_desc = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + NOR = { + has_trait = education_martial + has_lifestyle = martial_lifestyle + martial >= decent_skill_rating + prowess >= decent_skill_rating + has_trait = viking + has_trait = faith_warrior + has_trait = crusader_king + has_trait = lifestyle_blademaster + has_trait = lifestyle_hunter + has_trait = berserker + has_trait = shieldmaiden + } + } + desc = fund_inspiration.2131.desc_armory_unused + } + triggered_desc = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + } + desc = fund_inspiration.2131.desc_armory + } + triggered_desc = { + trigger = { court_grandeur_current_level < court_grandeur_minimum_expected_level } + desc = fund_inspiration.2131.desc_great_hall_low + } + desc = fund_inspiration.2131.desc_great_hall + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:second + scope:second = { has_court_position = antiquarian_court_position } + } + desc = fund_inspiration.2131.desc_antiquarian + } + triggered_desc = { + trigger = { + exists = scope:second + scope:second = { has_court_position = court_artificer_court_position } + } + desc = fund_inspiration.2131.artificer + } + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:artifact_1 + scope:artifact_1 = { is_equipped = yes } + } + desc = fund_inspiration.2131.desc_equipped + } + triggered_desc = { + trigger = { exists = scope:artifact_1 } + desc = fund_inspiration.2131.desc_unequipped + } + desc = fund_inspiration.2131.desc_fallback + } + } + theme = realm + override_background = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_library + } + reference = study + } + override_background = { + trigger = { + exists = scope:fi_2130_room + scope:fi_2130_room = flag:fi_2130_armory + } + reference = armory + } + override_background = { + trigger = { + NOT = { exists = scope:fi_2130_room } + } + reference = throne_room + } + left_portrait = { + character = scope:inspiration_owner + triggered_animation = { + trigger = { exists = scope:artifact_1 } + animation = shock + } + triggered_animation = { + trigger = { + NOT = { exists = scope:artifact_1 } + } + animation = stress + } + } + right_portrait = { + character = scope:second + triggered_animation = { + trigger = { has_court_position = antiquarian_court_position } + animation = worry + } + triggered_animation = { + trigger = { has_court_position = court_artificer_court_position } + animation = happiness + } + } + artifact = { # To display the artifact in the event-window + target = scope:artifact_1 + position = lower_center_portrait + } + artifact = { # To display the artifact in the event-window + target = scope:artifact_2 + position = lower_right_portrait + } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + fund_inspiration_court_inspiration_owner_trigger = yes + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_inspiration_cooldown_flag = yes + } + if = { + limit = { + any_character_artifact = { fi_2131_artifact_type_trigger = yes } + } + random_character_artifact = { + limit = { + is_equipped = yes + fi_2131_artifact_type_trigger = yes + } + alternative_limit = { fi_2131_artifact_type_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 2 + NOT = { + root = { can_benefit_from_artifact = prev } + } + } + } + save_scope_as = artifact_1 + } + } + if = { + limit = { + any_equipped_character_artifact = { fi_2131_artifact_type_trigger = yes } + } + random_equipped_character_artifact = { + limit = { + is_equipped = no + fi_2131_artifact_type_trigger = yes + } + alternative_limit = { fi_2131_artifact_type_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 2 + NOT = { + root = { can_benefit_from_artifact = prev } + } + } + } + save_scope_as = artifact_2 + } + } + hidden_effect = { + random_list = { + 2 = { + trigger = { + any_court_position_holder = { + type = antiquarian_court_position + is_available_healthy_ai_adult = yes + this != scope:inspiration_owner + } + } + random_court_position_holder = { + type = antiquarian_court_position + limit = { + is_available_healthy_ai_adult = yes + this != scope:inspiration_owner + } + save_scope_as = second + } + } + 2 = { + trigger = { + any_court_position_holder = { + type = court_artificer_court_position + is_available_healthy_ai_adult = yes + this != scope:inspiration_owner + } + } + random_court_position_holder = { + type = court_artificer_court_position + limit = { + is_available_healthy_ai_adult = yes + this != scope:inspiration_owner + } + save_scope_as = second + } + } + } + } + } + + option = { # 1st artifact + name = fund_inspiration.2131.a + trigger = { exists = scope:artifact_1 } + scope:inspiration_owner = { + if = { + limit = { + scope:artifact_1 = { + OR = { + AND = { + exists = var:quality + var:quality > 50 + } + OR = { + rarity = famed + rarity = illustrious + } + } + } + } + change_artifact_quality_effect = { AMOUNT = 8 } + inspiration = { change_inspiration_progress = 1 } + root = { + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { greedy = medium_stress_impact_gain } + } + } + else = { + change_artifact_quality_effect = { AMOUNT = 4 } + root = { + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 10 + } + stress_impact = { greedy = minor_stress_impact_gain } + } + } + } + destroy_artifact = scope:artifact_1 + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = -2 + ai_boldness = 2 + ai_rationality = -2 + } + } + } + + option = { # 2nd artifact + name = fund_inspiration.2131.b + trigger = { exists = scope:artifact_2 } + scope:inspiration_owner = { + if = { + limit = { + scope:artifact_2 = { + OR = { + AND = { + exists = var:quality + var:quality > 50 + } + OR = { + rarity = famed + rarity = illustrious + } + } + } + } + change_artifact_quality_effect = { AMOUNT = 8 } + inspiration = { change_inspiration_progress = 1 } + root = { + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 20 + } + stress_impact = { greedy = medium_stress_impact_gain } + } + } + else = { + change_artifact_quality_effect = { AMOUNT = 4 } + root = { + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 10 + } + stress_impact = { greedy = minor_stress_impact_gain } + } + } + destroy_artifact = scope:artifact_2 + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = -2 + ai_boldness = 2 + ai_rationality = -2 + } + } + } + + option = { # Melt down random stuff + name = fund_inspiration.2131.c + trigger = { + NOR = { + exists = scope:artifact_1 + exists = scope:artifact_2 + } + } + random_list = { + 10 = { + send_interface_toast = { + title = fund_inspiration.2131.d.good + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = pleased_opinion + opinion = 5 + } + } + } + 20 = { + send_interface_toast = { + title = fund_inspiration.2131.d.nothing + left_icon = scope:inspiration_owner + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -5 + } + } + } + 50 = { + send_interface_toast = { + title = fund_inspiration.2131.d.bad + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -2 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = annoyed_opinion + opinion = -10 + } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Look only + name = fund_inspiration.2131.d + trigger = { exists = scope:artifact_1 } + scope:inspiration = { change_inspiration_progress = 1 } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 5 + } + stress_impact = { + lazy = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = -1 + ai_rationality = 1 + } + } + } + + option = { # Antiquarian helps + name = fund_inspiration.2131.e + trigger = { + NOT = { exists = scope:artifact_1 } + exists = scope:second + } + reverse_add_opinion = { + target = scope:second + modifier = pleased_opinion + opinion = 5 + } + random_list = { + 5 = { + send_interface_toast = { + title = fund_inspiration.2131.d.great + left_icon = scope:inspiration_owner + right_icon = scope:second + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + } + } + 25 = { + send_interface_toast = { + title = fund_inspiration.2131.d.good + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + send_interface_toast = { + title = fund_inspiration.2131.d.nothing + left_icon = scope:inspiration_owner + } + } + 50 = { + send_interface_toast = { + title = fund_inspiration.2131.d.bad + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -2 } + } + } + } + 5 = { + send_interface_toast = { + title = fund_inspiration.2131.d.terrible + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -4 } + } + } + modifier = { + factor = 10 + OR = { + scope:inspiration_owner = { has_relation_rival = scope:second } + has_relation_rival = scope:second + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = -0.5 + ai_rationality = 0.5 + } + } + } + + option = { # Give up + name = fund_inspiration.2131.f + trigger = { + NOT = { exists = scope:artifact_1 } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -10 + } + stress_impact = { + diligent = medium_stress_impact_gain + patient = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -1 + ai_energy = -1 + } + } + } +} + +# Court Chaplain complains about book subject +# by Linnéa Thimrén +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 + GENDER_CHARACTER = root + FAITH = root.faith + } +} +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 + GENDER_CHARACTER = root + FAITH = root.faith + } +} +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 + GENDER_CHARACTER = root + FAITH = root.faith + } +} +scripted_trigger fund_inspiration_3001_torturer_topic_trigger = { + exists = scope:inspiration_owner.var:book_subject + scope:inspiration_owner.var:book_subject = flag:torturer +} +scripted_trigger fund_inspiration_3001_lustful_topic_trigger = { + exists = scope:inspiration_owner.var:book_subject + exists = scope:inspiration_owner.var:book_topic + OR = { + scope:inspiration_owner.var:book_topic = flag:intrigue_the_art_of_love + scope:inspiration_owner.var:book_topic = flag:seduction + scope:inspiration_owner.var:book_topic = flag:fertility + scope:inspiration_owner.var:book_topic = flag:love_sorcery + } + faith = { trait_is_sin = lustful } +} + +fund_inspiration.3001 = { + type = character_event + title = fund_inspiration.3001.t + desc = { + desc = fund_inspiration.3001.desc_opening + first_valid = { + triggered_desc = { + trigger = { + fund_inspiration_3001_witch_topic_trigger = yes + } + desc = fund_inspiration.3001.desc_witch + } + triggered_desc = { + trigger = { + fund_inspiration_3001_cannibal_topic_trigger = yes + } + desc = fund_inspiration.3001.desc_cannibal + } + triggered_desc = { + trigger = { + fund_inspiration_3001_torturer_topic_trigger = yes + } + desc = fund_inspiration.3001.desc_torturer + } + triggered_desc = { + trigger = { + OR = { + fund_inspiration_3001_lustful_topic_trigger = yes + fund_inspiration_3001_deviant_topic_trigger = yes + } + } + desc = fund_inspiration.3001.desc_lustful + } + desc = fund_inspiration.3001.desc_other + } + desc = fund_inspiration.3001.desc_ending + } + theme = realm + override_background = { + reference = study + } + left_portrait = { + character = scope:court_chaplain + animation = disapproval + } + right_portrait = { + character = scope:inspiration_owner + animation = anger + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + is_available_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_3001 } + exists = var:book_subject + trigger_if = { #If they're writing about learning they're not writing about faith + limit = { + var:book_subject = flag:learning + } + exists = var:book_topic_category + NOT = { var:book_topic_category = flag:learning_faith } + } + } + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + + weight_multiplier = { + base = 0.1 #Very unlikely if you're just writing about whatever + modifier = { #A bit more likely if the court chaplain is a zealot + add = 0.5 + cp:councillor_court_chaplain = { has_trait = zealous } + } + #More likely if they're writing about something "bad" + modifier = { + add = 2 + OR = { + fund_inspiration_3001_witch_topic_trigger = yes + fund_inspiration_3001_cannibal_topic_trigger = yes + fund_inspiration_3001_deviant_topic_trigger = yes + fund_inspiration_3001_torturer_topic_trigger = yes + fund_inspiration_3001_lustful_topic_trigger = yes + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3001 + years = 20 + } + #To stagger any following events + add_inspiration_cooldown_flag = yes + } + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + } + } + + #Write about faith instead + option = { + name = fund_inspiration.3001.a + add_piety = minor_piety_gain + scope:court_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + scope:inspiration_owner = { + custom_tooltip = fund_inspiration.3001.a_tt + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + change_artifact_quality_effect = { + AMOUNT = -4 + } + remove_variable = book_subject + set_variable = { + name = book_subject + value = flag:learning + } + set_variable = { + name = book_topic_category + value = flag:learning_faith + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.75 + } + } + } + + #Tell court chaplain to back off + option = { + name = fund_inspiration.3001.b + scope:court_chaplain = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + #Invest even more into the book + option = { + name = fund_inspiration.3001.c + scope:inspiration = { invest_gold = 25 } + scope:court_chaplain = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -40 + } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 40 + } + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.75 + ai_zeal = -0.5 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + short_term_gold < 25 + } + } + } +} + +# Book (Martial) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3011 = { + type = character_event + title = fund_inspiration.3011.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3011.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:martial + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3011 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3011 + years = 20 + } + + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Strategy + option = { + name = fund_inspiration.3011.a + custom_tooltip = fund_inspiration.3011.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:martial_strategy + } + } + } + + #Chivalry/prowess + option = { + name = fund_inspiration.3011.b + custom_tooltip = fund_inspiration.3011.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:martial_chivalry_prowess + } + } + } + + #I don't care + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book (Diplomacy) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3012 = { + type = character_event + title = fund_inspiration.3012.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3012.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:diplomacy + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3012 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3012 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Court + option = { + name = fund_inspiration.3012.a + custom_tooltip = fund_inspiration.3012.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:diplomacy_court + } + } + } + + #Entertainment + option = { + name = fund_inspiration.3012.b + custom_tooltip = fund_inspiration.3012.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:diplomacy_entertainment + } + } + } + + #Go with what you know + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book (Learning) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3013 = { + type = character_event + title = fund_inspiration.3013.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3013.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:learning + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3013 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3013 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Faith + option = { + name = fund_inspiration.3013.a + custom_tooltip = fund_inspiration.3013.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:learning_faith + } + } + } + + #Learning/poetry + option = { + name = fund_inspiration.3013.b + custom_tooltip = fund_inspiration.3013.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:learning_learning + } + } + } + + #Go with what you know + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book (Stewardship) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3014 = { + type = character_event + title = fund_inspiration.3014.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3014.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:stewardship + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3014 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3014 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Rule + option = { + name = fund_inspiration.3014.a + custom_tooltip = fund_inspiration.3014.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:stewardship_rule + } + } + } + + #Development + option = { + name = fund_inspiration.3014.b + custom_tooltip = fund_inspiration.3014.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:stewardship_development + } + } + } + + #Go with what you know + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book (Intrigue) - wanna nudge the content? +# by Linnéa Thimrén +fund_inspiration.3015 = { + type = character_event + title = fund_inspiration.3015.t + desc = { + random_valid = { + desc = fund_inspiration.3011.desc_opening_1 + desc = fund_inspiration.3011.desc_opening_2 + desc = fund_inspiration.3011.desc_opening_3 + } + desc = fund_inspiration.3015.desc + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + is_ai = no #Topic for AIs is handled in the artifact-generation effect + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:book_subject + var:book_subject = flag:intrigue + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:book_topic + exists = var:book_topic_category + has_character_flag = had_event_fund_inspiration_3015 + has_character_flag = fund_book_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3015 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_book_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Scheme + option = { + name = fund_inspiration.3015.a + custom_tooltip = fund_inspiration.3015.a.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:intrigue_scheme + } + } + } + + #Seduction + option = { + name = { + trigger = { + is_attracted_to_men = yes + is_attracted_to_women = no + } + text = fund_inspiration.3015.b_men + } + name = { + trigger = { + is_attracted_to_women = yes + is_attracted_to_men = no + } + text = fund_inspiration.3015.b_women + } + name = { + trigger = { + is_attracted_to_men = yes + is_attracted_to_women = yes + } + text = fund_inspiration.3015.b_both + } + name = { + trigger = { + is_attracted_to_men = no + is_attracted_to_women = no + } + text = fund_inspiration.3015.b_none + } + trigger = { + is_adult = yes #Just to make sure + } + custom_tooltip = fund_inspiration.3015.b.tt + scope:inspiration_owner = { + set_variable = { + name = book_topic_category + value = flag:intrigue_seduction + } + } + } + + #Go with what you know + option = { + name = fund_inspiration.3011.d + custom_tooltip = fund_inspiration.3011.d.tt + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { + AMOUNT = 2 + } + } + } +} + +# Book - Nemesis is no longer nemesis and you're writing about your hatred +# by Linnéa Thimrén +fund_inspiration.3030 = { + title = fund_inspiration.3030.t + type = character_event + desc = { + desc = fund_inspiration.3030.desc_opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:prev_nemesis = { is_alive = yes } + } + desc = fund_inspiration.3030.desc + } + desc = fund_inspiration.3030.desc_dead + } + } + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_coward + } + right_portrait = scope:prev_nemesis + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + exists = var:book_subject + var:book_subject = flag:relationship + exists = var:book_topic + var:book_topic = flag:nemesis + exists = var:book_topic_relationship + var:book_topic_relationship = { + NOT = { has_relation_nemesis = root } #You're no longer their nemesis :( + } + NOT = { has_character_flag = had_event_fund_inspiration_3030 } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3030 + years = 20 + } + } + scope:inspiration_owner.var:book_topic_relationship = { + save_scope_as = prev_nemesis + } + } + + # Continue writing + option = { + name = fund_inspiration.3030.a + custom_tooltip = fund_inspiration.3030.a.tt + add_stress = medium_stress_gain + ai_chance = { + base = 0 + } + } + + # Scrap it + option = { + name = fund_inspiration.3030.b + end_inspiration_sponsorship = scope:inspiration + #Let them start over + inspiration_completion_effect = yes + ai_chance = { + base = 100 + } + } +} + +# Book - Soulmate is no longer soulmate and you're writing about your love +# by Linnéa Thimrén +fund_inspiration.3031 = { + type = character_event + title = fund_inspiration.3031.t + desc = { + desc = fund_inspiration.3030.desc_opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:prev_soulmate = { is_alive = yes } + } + desc = fund_inspiration.3031.desc + } + desc = fund_inspiration.3031.desc_dead + } + } + } + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_coward + } + right_portrait = scope:prev_soulmate + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = book_inspiration + inspiration_owner = { + exists = var:book_subject + var:book_subject = flag:relationship + exists = var:book_topic + var:book_topic = flag:soulmate + exists = var:book_topic_relationship + var:book_topic_relationship = { + NOT = { has_relation_soulmate = root } #You're no longer soulmates :( + } + NOT = { has_character_flag = had_event_fund_inspiration_3031 } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_3031 + years = 20 + } + } + scope:inspiration_owner.var:book_topic_relationship = { + save_scope_as = prev_soulmate + } + } + + # Continue writing + option = { + name = fund_inspiration.3031.a + custom_tooltip = fund_inspiration.3031.a.tt + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + add_stress = medium_stress_gain + ai_chance = { + base = 0 + } + } + + # Scrap it + option = { + name = fund_inspiration.3031.b + end_inspiration_sponsorship = scope:inspiration + #Let them start over + inspiration_completion_effect = yes + ai_chance = { + base = 100 + } + } +} + +# Weaver - Weaver is stealing clothes +# by Linnéa Thimrén +scripted_trigger fund_inspiration_4001_courtier_trigger = { + is_available_ai_adult = yes + this != scope:inspiration_owner +} + +fund_inspiration.4001 = { + type = character_event + title = fund_inspiration.4001.t + desc = fund_inspiration.4001.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = dismissal + } + right_portrait = { + character = scope:courtier + animation = anger + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = weaver_inspiration + inspiration_owner = { + is_available_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOR = { + has_character_flag = had_event_fund_inspiration_4001 + has_variable = banner_commission + } + } + } + any_courtier = { + fund_inspiration_4001_courtier_trigger = yes + } + + NOT = { + government_has_flag = government_is_tribal # No changing amenities above what's legal for tribals + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_4001 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_weaver_inspiration_event_cooldown + days = { 30 60 } + } + } + random_courtier = { + limit = { + fund_inspiration_4001_courtier_trigger = yes + } + save_scope_as = courtier + } + } + + #Chastise them + option = { + name = fund_inspiration.4001.a + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + scope:courtier = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + #Approve + option = { + name = fund_inspiration.4001.b + # Lower fashion one step + if = { + limit = { + amenity_level = { target = court_fashion value = max_amenity_level } + } + set_amenity_level = { type = court_fashion value = very_high_amenity_level } + } + else_if = { + limit = { + amenity_level = { target = court_fashion value = very_high_amenity_level } + } + set_amenity_level = { type = court_fashion value = high_amenity_level } + } + else_if = { + limit = { + amenity_level = { target = court_fashion value = high_amenity_level } + } + set_amenity_level = { type = court_fashion value = medium_amenity_level } + } + else_if = { + limit = { + amenity_level = { target = court_fashion value = medium_amenity_level } + } + set_amenity_level = { type = court_fashion value = low_amenity_level } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + scope:courtier = { + add_opinion = { + target = root + modifier = dismissive_opinion + opinion = -20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + } + } + } +} + + +# Adventurer - Choose your item-type +# By Bianca Savazzi and Linnéa Thimrén +fund_inspiration.5011 = { + type = character_event + title = fund_inspiration.0001.t + desc = fund_inspiration.5011.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + is_physically_able_ai_adult = yes + has_no_inspiration_event_cooldown = yes + NOR = { + exists = var:adventure_type + has_character_flag = had_event_fund_inspiration_5011 + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Saving some scopes for the tooltips + + save_scope_as = actor + scope:inspiration_owner = { + assign_quirk_effect = yes + save_scope_as = recipient + add_character_flag = { + flag = had_event_fund_inspiration_5011 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + show_as_tooltip = { + fund_inspiration_effect = yes + } + } + + # Go find an epic artifact! + option = { + name = fund_inspiration.5011.e + trigger = { + scope:inspiration_owner = { + adventure_inspiration_average_skill_value >= medium_inspiration_skill + } + } + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:epic_quest + } + } + + ai_chance = { + base = 50 + modifier = { + add = 25 + OR = { + has_trait = ambitious + has_trait = adventurer + } + } + } + } + + # skull or hide + option = { + name = fund_inspiration.5011.a + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:skull_or_hide + } + } + + ai_chance = { + base = 50 + modifier = { + add = 25 + has_trait = vengeful + } + modifier = { + add = 25 + OR = { + has_martial_lifestyle_trait_trigger = yes + has_lifestyle = martial_lifestyle + } + } + } + } + + # trinket + option = { + name = fund_inspiration.5011.b + + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:trinket + } + } + + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = greedy + } + modifier = { + add = 25 + OR = { + has_stewardship_lifestyle_trait_trigger = yes + has_lifestyle = stewardship_lifestyle + } + } + modifier = { + factor = 0 + OR = { + any_character_artifact = { # Has a fantastic item already + artifact_slot_type = miscellaneous + rarity = illustrious + } + AND = { # Have a lot of artifacts already, and the inspired person isn't even very good + scope:inspiration_owner = { + smith_inspiration_average_skill_value < high_inspiration_skill + } + any_character_artifact = { + count >= 4 + artifact_slot_type = miscellaneous + } + } + } + } + } + } + + # tapestry or fabric + option = { + name = fund_inspiration.5011.c + + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:tapestry_or_fabric + } + } + + ai_chance = { + base = 25 + modifier = { + add = 25 + has_focus_learning = yes + } + modifier = { + add = 25 + OR = { + has_learning_lifestyle_trait_trigger = yes + has_lifestyle = learning_lifestyle + } + } + } + } + + # default option of "do what you want" + option = { + name = fund_inspiration.5011.d + + scope:inspiration_owner = { + set_variable = { + name = adventure_type + value = flag:free_reign + } + } + + ai_chance = { + base = 5 + modifier = { + add = 25 + OR = { + has_trait = arbitrary + has_trait = lazy + } + } + } + } + + after = { + #To start the adventure for the inspiration owner + fund_adventure_inspiration_start_effect = { ADVENTURER = scope:inspiration_owner } + } +} + +#Adventurer gets lost... this can be a good thing though +fund_inspiration.5021 = { + type = character_event + title = fund_inspiration.5021.t + desc = fund_inspiration.5021.desc + theme = realm + + left_portrait = { + character = scope:adventurer_aide + animation = beg + } + + right_portrait = { + character = scope:inspiration_owner + animation = happiness + } + cooldown = { years = 15 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + has_no_inspiration_event_cooldown = yes + NOT = { has_character_flag = had_event_fund_inspiration_5021 } + adventure_inspiration_average_skill_value < high_inspiration_skill + } + } + + weight_multiplier = { + base = 1 + # More likely to happen if the adventurer is adventurous, and maybe a bit scatterbrained + modifier = { + add = 2 + scope:inspiration_owner = { + has_trait = fickle + } + } + modifier = { + add = 2 + scope:inspiration_owner = { + has_trait = adventurer + } + } + modifier = { + add = 2 + scope:inspiration_owner = { + has_trait = brave + } + } + modifier = { + add = 2 + scope:inspiration_owner = { + has_trait = stubborn #refusing to ask for direction + } + } + modifier = { + add = -1 + scope:inspiration_owner = { + adventure_inspiration_average_skill_value >= high_inspiration_skill + } + } + } + + immediate = { + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_5021 + years = 20 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + + #Prioritize location that root doesn't have a county in + hidden_effect = { + random_list = { + 1 = { + # Africa + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_africa + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_africa + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:africa } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_africa + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_africa + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_africa_location + value = yes + } + } + 1 = { + # Europe + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_europe + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_europe + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:europe } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_europe + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_europe + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_europe_location + value = yes + } + } + 1 = { + # Middle East + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_middle_east + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_middle_east + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:middle_east } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_middle_east + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_middle_east + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_middle_east_location + value = yes + } + } + 1 = { + # Asia Minor + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_asia_minor + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_asia_minor + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:asia_minor } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_asia_minor + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_asia_minor + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_asia_minor_location + value = yes + } + } + 1 = { + # India + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_india + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_india + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:india } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_india + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_india + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_india_location + value = yes + } + } + 1 = { + # Steppe + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_steppe + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_steppe + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:steppe } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_steppe + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_steppe + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_steppe_location + value = yes + } + } + 1 = { + # Persia + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_middle_east_persia + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_middle_east_persia + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:middle_east_persia } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_middle_east_persia + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_middle_east_persia + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_middle_east_persia_location + value = yes + } + } + 1 = { + # Burma + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_burma + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_burma + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:burma } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_burma + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_burma + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_burma_location + value = yes + } + } + 1 = { + # Tibet + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_tibet + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_tibet + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:tibet } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_tibet + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_tibet + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_tibet_location + value = yes + } + } + 1 = { + # East Asia + trigger = { + #There's a county you don't hold there + any_county_in_region = { + region = world_asia_east + holder != root + } + scope:inspiration_owner = { #Distance check - from where the adventurer is right now. + adventurer_potential_destination_distance_check = { + REGION = world_asia_east + } + } + #This was not the original destination of the adventurer + NOT = { scope:inspiration_owner.var:adventure_destination = flag:east_asia } + } + modifier = { + add = 30 + NOT = { + any_county_in_region = { + region = world_asia_east + holder = root + count >= 1 + } + } + } + random_county_in_region = { + region = world_asia_east + limit = { + holder != root + } + save_scope_as = adventuring_location + } + save_scope_value_as = { + name = world_east_asia_location + value = yes + } + } + } + + if = { + limit = { exists = scope:adventuring_location } + create_character = { + location = root.location + template = hunter_template + culture = scope:adventuring_location.culture + faith = scope:adventuring_location.faith + dynasty = none + save_scope_as = adventurer_aide + } + } + else = { # Fallback in case that a region could not be selected for some reason, purely theoretical fix + create_character = { + location = root.location + template = hunter_template + culture = root.culture + faith = root.faith + dynasty = none + save_scope_as = adventurer_aide + } + debug_log = "WARNING: create_character fallback triggered in ep1 fund_inspiration.5021, something went wrong!" + } + } + } + + #No, go back! + option = { + name = fund_inspiration.5021.a + custom_tooltip = fund_inspiration.5021.a.tt + scope:inspiration_owner = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -25 + } + } + + ai_chance = { + base = 10 + ai_greed_target_modifier = { VALUE = 25 } #not too high since there's a chance to get a cooler artifact + } + } + + #Explore! + option = { + name = fund_inspiration.5021.b + custom_tooltip = fund_inspiration.5021.b.tt + scope:inspiration = { + invest_gold = 60 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + scope:inspiration_owner = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 25 + } + if = { + limit = { + exists = scope:world_africa_location + } + set_variable = { + name = adventure_destination + value = flag:africa + } + } + else_if = { + limit = { + exists = scope:world_europe_location + } + set_variable = { + name = adventure_destination + value = flag:europe + } + } + else_if = { + limit = { + exists = scope:world_middle_east_location + } + set_variable = { + name = adventure_destination + value = flag:middle_east + } + } + else_if = { + limit = { + exists = scope:world_asia_minor_location + } + set_variable = { + name = adventure_destination + value = flag:asia_minor + } + } + else_if = { + limit = { + exists = scope:world_india_location + } + set_variable = { + name = adventure_destination + value = flag:india + } + } + else_if = { + limit = { + exists = scope:world_steppe_location + } + set_variable = { + name = adventure_destination + value = flag:steppe + } + } + else_if = { + limit = { + exists = scope:world_middle_east_persia_location + } + set_variable = { + name = adventure_destination + value = flag:middle_east_persia + } + } + else_if = { + limit = { + exists = scope:world_burma_location + } + set_variable = { + name = adventure_destination + value = flag:burma + } + } + else_if = { + limit = { + exists = scope:world_tibet_location + } + set_variable = { + name = adventure_destination + value = flag:tibet + } + } + else_if = { + limit = { + exists = scope:world_east_asia_location + } + set_variable = { + name = adventure_destination + value = flag:east_asia + } + } + hidden_effect = { + scope:inspiration_owner = { + set_location = { + location = scope:adventuring_location.title_province + stick_to_location = yes + } + } + } + } + + ai_chance = { + base = 10 + ai_boldness_target_modifier = { VALUE = 100 } + modifier = { + short_term_gold < 60 #shouldn't spend money they don't have... + factor = 0 + } + } + } + + after = { + scope:adventurer_aide = { + silent_disappearance_effect = yes + } + } +} + +# Postcard from your adventurer 6001-6006! + +# Postcard from the Steppe + +fund_inspiration.6001 = { + type = letter_event + opening = { desc = fund_inspiration.6001.t } + desc = fund_inspiration.6001.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOT = { + geographical_region = world_steppe + } + } + NOT = { + any_character_artifact = { + has_variable = morin_khuur_ornament + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6001 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:steppe + var:adventure_destination = flag:steppe_east + var:adventure_destination = flag:steppe_west + } + NOT = { + any_character_artifact = { + has_variable = morin_khuur_ornament + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6001 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = morin_khuur_ornament_name + description = morin_khuur_ornament_description + type = miscellaneous + visuals = medallion + modifier = artifact_heavy_cavalry_toughness_1_modifier + creator = scope:inspiration_owner + save_scope_as = morin_khuur_ornament + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:morin_khuur_ornament = { + flag_as_trash_artifact = yes + set_variable = { + name = morin_khuur_ornament + value = yes + } + } + } + } + #Keep the fiddle-head for yourself + option = { + name = fund_inspiration.6001.a + ai_chance = { + base = 50 + } + } + #If the court musician is present, let them have this former piece of an instrument + option = { + name = fund_inspiration.6001.b + trigger = { + any_court_position_holder = { + has_court_position = court_musician_court_position + } + } + random_court_position_holder = { + limit = { + has_court_position = court_musician_court_position + } + save_scope_as = court_musician + } + scope:morin_khuur_ornament = { + set_owner = scope:court_musician + } + reverse_add_opinion = { + target = scope:court_musician + modifier = grateful_opinion + opinion = 15 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } +} + +#Postcard from India + +fund_inspiration.6002 = { + type = letter_event + opening = { desc = fund_inspiration.6002.t } + desc = fund_inspiration.6002.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOT = { + geographical_region = world_india + } + } + NOT = { + any_character_artifact = { + has_variable = animal_ring + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6002 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:india + var:adventure_destination = flag:india_deccan + var:adventure_destination = flag:india_bengal + var:adventure_destination = flag:india_rajastan + } + NOT = { + any_character_artifact = { + has_variable = animal_ring + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6002 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = animal_ring_name + description = animal_ring_description + type = miscellaneous + visuals = ring + modifier = artifact_scheme_resistance_add_2_modifier + creator = scope:inspiration_owner + save_scope_as = animal_ring + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:animal_ring = { + flag_as_trash_artifact = yes + set_variable = { + name = animal_ring + value = yes + } + } + } + } + #Keep the ring + option = { + name = fund_inspiration.6002.a + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + #Sell the ring for gold + option = { + name = fund_inspiration.6002.b + destroy_artifact = scope:animal_ring + add_gold = minor_gold_value + ai_chance = { + base = 200 + ai_value_modifier = { + ai_honor = -0.5 + ai_greed = 0.5 + } + } + } +} + +#Postcard from Africa + +fund_inspiration.6003 = { + type = letter_event + opening = { desc = fund_inspiration.6003.t } + desc = fund_inspiration.6003.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOT = { + geographical_region = world_africa + } + } + NOT = { + any_character_artifact = { + has_variable = ostrich_shell_necklace + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6003 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:africa + var:adventure_destination = flag:africa_north + var:adventure_destination = flag:africa_west + } + NOT = { + any_character_artifact = { + has_variable = ostrich_shell_necklace + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6003 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = ostrich_shell_necklace_name + description = ostrich_shell_necklace_description + type = miscellaneous + visuals = necklace + modifier = artifact_attraction_opinion_2_modifier + creator = scope:inspiration_owner + save_scope_as = ostrich_shell_necklace + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect = { + scope:ostrich_shell_necklace = { + flag_as_trash_artifact = yes + set_variable = { + name = ostrich_shell_necklace + value = yes + } + } + } + if = { + limit = { is_married = yes } + random_spouse = { save_scope_as = event_spouse } + } + } + option = { + name = fund_inspiration.6003.a + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + option = { + name = fund_inspiration.6003.b + trigger = { exists = scope:event_spouse } + reverse_add_opinion = { + target = scope:event_spouse + modifier = grateful_opinion + opinion = 15 + } + scope:ostrich_shell_necklace = { + set_owner = scope:event_spouse + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + } + } + } +} + +# Postcard from the Middle East + +fund_inspiration.6004 = { + type = letter_event + opening = { desc = fund_inspiration.6004.t } + desc = fund_inspiration.6004.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + NOT = { + any_character_artifact = { + has_variable = pilgrimage_figurine + } + } + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOR = { + geographical_region = world_middle_east + geographical_region = world_middle_east_jerusalem + geographical_region = world_middle_east_persia + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6004 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:middle_east + var:adventure_destination = flag:middle_east_jerusalem + var:adventure_destination = flag:middle_east_persia + } + NOT = { + any_character_artifact = { + has_variable = pilgrimage_figurine + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6004 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = pilgrimage_figurine_name + description = pilgrimage_figurine_description + type = miscellaneous + visuals = pouch + modifier = artifact_knight_limit_1_modifier + creator = scope:inspiration_owner + save_scope_as = pilgrimage_figurine + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:pilgrimage_figurine = { + flag_as_trash_artifact = yes + set_variable = { + name = pilgrimage_figurine + value = yes + } + } + } + } + + option = { + name = fund_inspiration.6004.a + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } +} + +#Postcard from Europe + +fund_inspiration.6005 = { + type = letter_event + opening = { desc = fund_inspiration.6005.t } + desc = fund_inspiration.6005.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + NOT = { + any_character_artifact = { + has_variable = saint_margaret_fingernails + } + } + is_ai = no + NOT = { + location = { + geographical_region = world_europe #We can't have an adventurer writing home about what Europeans are like if you are also a European. + } + } + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6005 } + has_no_inspiration_event_cooldown = yes + OR = { + var:adventure_destination = flag:europe + var:adventure_destination = flag:europe_east + var:adventure_destination = flag:europe_west + var:adventure_destination = flag:europe_north + var:adventure_destination = flag:europe_south + } + NOT = { + any_character_artifact = { + has_variable = saint_margaret_fingernails + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6005 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = saint_margaret_fingernails_name + description = saint_margaret_fingernails_description + type = pedestal + visuals = reliquary + modifier = artifact_prowess_1_modifier + creator = scope:inspiration_owner + save_scope_as = saint_margaret_fingernails + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:saint_margaret_fingernails = { + flag_as_trash_artifact = yes + set_variable = { + name = saint_margaret_fingernails + value = yes + } + } + } + } + + option = { + name = fund_inspiration.6005.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -30 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + } + } + } + option = { + name = fund_inspiration.6005.b + custom_tooltip = fund_inspiration.6005.b.tt + scope:inspiration_owner = { + add_character_flag = adventurer_tired_of_europe + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -0.5 + ai_compassion = 0.5 + } + } + } +} + +# Postcard from Asia Minor + +fund_inspiration.6006 = { + type = letter_event + opening = { desc = fund_inspiration.6006.t } + desc = fund_inspiration.6006.desc + sender = scope:inspiration_owner + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + location = {#We can't have an adventurer writing home about what a region is like that we belong to + NOT = { + geographical_region = world_asia_minor + } + } + NOT = { + any_character_artifact = { + has_variable = seahorse_brooch + } + } + is_ai = no + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOT = { has_character_flag = had_event_fund_inspiration_6006 } + has_no_inspiration_event_cooldown = yes + var:adventure_destination = flag:asia_minor + NOT = { + any_character_artifact = { + has_variable = seahorse_brooch + } + } + } + } + + immediate = { + save_scope_as = owner #for loc + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_6006 + years = 5 + } + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + } + create_artifact = { + name = seahorse_brooch_name + description = seahorse_brooch_description + type = miscellaneous + visuals = brooch + modifier = artifact_tolerance_advantage_mod_1_modifier + creator = scope:inspiration_owner + save_scope_as = seahorse_brooch + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect = { + scope:seahorse_brooch = { + flag_as_trash_artifact = yes + set_variable = { + name = seahorse_brooch + value = yes + } + } + } + } + option = { + name = fund_inspiration.6006.a + trigger = { + NOT = { government_has_flag = government_is_tribal } + } + if = { + limit = { + amenity_level = { + target = court_food_quality + value < medium_amenity_level + } + } + set_amenity_level = { type = court_food_quality value = 3 } + } + else_if = { + limit = { + amenity_level = { + target = court_food_quality + value < high_amenity_level + } + } + set_amenity_level = { type = court_food_quality value = 4 } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.5 + } + } + } + option = { + name = fund_inspiration.6006.b + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } +} + + + +# Tiny chest miniature + +fund_inspiration.6100 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6100.desc + theme = realm + + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = worry + } + + right_portrait = { + character = root + animation = personality_bold + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_chest + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_chest + } + } + } + + immediate = { + scope:inspiration_owner = { + create_artifact = { + name = tiny_chest_trinket_name + description = tiny_chest_trinket_description + type = miscellaneous + visuals = chest + modifier = artifact_build_time_1_modifier + save_scope_as = tiny_chest_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_chest_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_chest + } + } + } + } + + option = { + name = fund_inspiration.6100.a + add_gold = minor_gold_value + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = cruelty_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { + name = fund_inspiration.6100.b + scope:tiny_chest_trinket = { + set_owner = root + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 10 + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } +} + +#Tiny box miniature + +fund_inspiration.6101 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6101.desc + theme = realm + + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + right_portrait = { + character = root + animation = happiness + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_box + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_box + } + } + any_court_position_holder = { + has_court_position = antiquarian_court_position + is_available_ai_adult = yes + } + } + + immediate = { + scope:inspiration_owner = { + create_artifact = { + name = tiny_box_trinket_name + description = tiny_box_trinket_description + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_stewardship_lifestyle_xp_1_modifier + save_scope_as = tiny_box_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_box_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_box + } + } + } + random_court_position_holder = { + limit = { + has_court_position = antiquarian_court_position + is_available_ai_adult = yes + } + save_scope_as = antiquarian + } + } + + option = { + name = fund_inspiration.6101.a + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + root.dynasty ?= { + add_dynasty_prestige = miniscule_dynasty_prestige_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = fund_inspiration.6101.b + add_learning_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + else_if = { + limit = { + has_trait = lifestyle_poet + has_trait_xp = { + trait = lifestyle_poet + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_poet + value = 10 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = -0.5 + } + } + } + + option = { + name = fund_inspiration.6101.c + scope:tiny_box_trinket = { + set_owner = root + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = minor_court_grandeur_gain + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + + +#Tiny sculpture miniature + +fund_inspiration.6102 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6102.desc + theme = realm + + override_background = { + reference = corridor_night + } + left_portrait = { + character = scope:inspiration_owner + animation = schadenfreude + } + + right_portrait = { + character = root + animation = pain + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_sculpture + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_sculpture + } + } + } + + immediate = { + save_scope_as = statue_owner + scope:inspiration_owner = { + create_artifact = { + name = tiny_sculpture_trinket_name + description = tiny_sculpture_trinket_description + type = miscellaneous + visuals = pocket_figurine + modifier = artifact_dynasty_opinion_1_modifier + save_scope_as = tiny_sculpture_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_sculpture_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_sculpture + } + } + } + increase_wounds_effect = { REASON = miniatures } + } + + option = { + name = fund_inspiration.6102.a + scope:inspiration_owner = { + save_scope_as = physician + } + random_list = { + 50 = { + modifier = { + factor = scope:inspiration_owner.learning + } + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + hidden_effect = { + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.cure_toast + + show_as_tooltip = { + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + } + } + } + } + 50 = { + increase_wounds_effect = { REASON = miniatures } + hidden_effect = { + destroy_artifact = scope:tiny_sculpture_trinket + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.failure_toast + custom_tooltip = fund_inspiration.6102.failure_toast_desc + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { + name = fund_inspiration.6102.b + trigger = { court_physician_available_trigger = yes } + save_court_physician_as_effect = { SCOPE_NAME = physician } + random_list = { + 25 = { + modifier = { + factor = scope:physician.physician_safe_treatment_skill_factor + } + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + hidden_effect = { + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.cure_toast + + show_as_tooltip = { + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + } + } + } + } + 50 = { + hidden_effect = { + destroy_artifact = scope:tiny_sculpture_trinket + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.failure_toast + custom_tooltip = fund_inspiration.6102.failure_toast_desc + } + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { + name = fund_inspiration.6102.c + save_scope_as = physician + random_list = { + 25 = { + modifier = { + factor = root.learning + } + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + hidden_effect = { + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.cure_toast + + show_as_tooltip = { + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + } + scope:tiny_sculpture_trinket = { + set_owner = root + } + } + } + } + 50 = { + increase_wounds_effect = { REASON = miniatures } + hidden_effect = { + destroy_artifact = scope:tiny_sculpture_trinket + send_interface_toast = { + left_icon = root + title = fund_inspiration.6102.failure_toast + custom_tooltip = fund_inspiration.6102.failure_toast_desc + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } +} + +# Tiny cabinet miniature + +fund_inspiration.6103 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6103.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = happiness + } + + right_portrait = { + character = root + animation = boredom + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_cabinet + #Mena and Indian cabinets are tables and diwans! + NOR = { + artifact_use_indian_building_visuals_trigger = yes + artifact_use_mena_building_visuals_trigger = yes + } + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_cabinet + } + } + } + + immediate = { + scope:inspiration_owner = { + create_artifact = { + name = tiny_cabinet_trinket_name + description = tiny_cabinet_trinket_description + type = miscellaneous + visuals = cabinet_trinket + modifier = artifact_build_time_2_modifier + save_scope_as = tiny_cabinet_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_cabinet_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_cabinet + } + } + } + } + + option = { + name = fund_inspiration.6103.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } + + option = { + name = fund_inspiration.6103.b + end_inspiration_sponsorship = scope:inspiration + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 10 + } + scope:tiny_cabinet_trinket = { + set_owner = root + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } +} + + + +#Tiny throne miniature + +fund_inspiration.6104 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6104.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + right_portrait = { + character = root + animation = happiness + } + + cooldown = { years = 5 } + + trigger = { + scope:inspiration_owner = { + exists = var:artifact_artisan_type + var:artifact_artisan_type = flag:artisan_type_throne + } + NOT = { + # Don't get it twice + any_character_artifact = { + exists = var:miniature_collection_tiny_throne + } + } + } + + immediate = { + scope:inspiration_owner = { + create_artifact = { + name = tiny_throne_trinket_name + description = tiny_throne_trinket_description + type = miscellaneous + visuals = tiny_throne_trinket + modifier = artifact_child_opinion_2_modifier + save_scope_as = tiny_throne_trinket + template = child_toy_template + } + } + hidden_effect_new_object = { + scope:tiny_throne_trinket = { + flag_as_trash_artifact = yes + set_variable = { + name = miniature_collection_tiny_throne + } + } + } + } + + option = { + name = fund_inspiration.6104.a + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = respect_opinion + opinion = 10 + } + scope:tiny_throne_trinket = { + set_owner = root + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { + name = fund_inspiration.6104.b + trigger = { + OR = { + age < 5 + age > 18 + } + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = dismissive_opinion + opinion = -10 + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = minor_court_grandeur_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { + name = fund_inspiration.6104.c + trigger = { + age > 5 + age < 18 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = dismissive_opinion + opinion = -10 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } +} + + +#Ruler collected all the miniatures! + +fund_inspiration.6105 = { + type = character_event + title = fund_inspiration.6100.t + desc = fund_inspiration.6105.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + right_portrait = { + character = root + animation = happiness + } + override_background = { + reference = corridor_day + } + trigger = { + AND = { + any_character_artifact = { + exists = var:miniature_collection_tiny_chest + } + any_character_artifact = { + exists = var:miniature_collection_tiny_sculpture + } + any_character_artifact = { + exists = var:miniature_collection_tiny_cabinet + } + any_character_artifact = { + exists = var:miniature_collection_tiny_throne + } + any_character_artifact = { + exists = var:miniature_collection_tiny_box + } + } + NOT = { has_character_flag = has_had_fund_inspiration_6105_miniatures_event } + } + + immediate = { + add_character_flag = has_had_fund_inspiration_6105_miniatures_event + } + + option = { + name = fund_inspiration.6105.a + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = default_friend_opinion + REASON = friend_miniature_game + } + add_character_modifier = { + modifier = playing_with_miniatures + years = 5 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { + name = fund_inspiration.6105.b + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = dismissive_opinion + opinion = -10 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +# Weaver is too much of a modernist + +scripted_trigger artistic_courtier_trigger = { + is_available_ai_adult = yes + is_courtier_of = root +} + +fund_inspiration.6200 = { + type = character_event + title = fund_inspiration.6200.t + desc = fund_inspiration.6200.desc + theme = realm + + left_portrait = { + character = scope:artistic_courtier_1 + animation = happiness + } + + right_portrait = { + character = scope:artistic_courtier_2 + animation = scheme + } + cooldown = { years = 5 } + + trigger = { + scope:inspiration = { + has_inspiration_type = weaver_inspiration + inspiration_owner = { #They know what tapestry they want to make + exists = var:artifact_tapestry_scene + var:artifact_tapestry_scene = flag:geometric_patterns + } + } + any_courtier_or_guest = { + artistic_courtier_trigger = yes + count >= 2 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_courtier = { + limit = { artistic_courtier_trigger = yes } + weight = { + base = 1 + modifier = { + factor = 10 + learning > high_skill_rating + } + } + save_scope_as = artistic_courtier_1 + } + random_courtier = { + limit = { + artistic_courtier_trigger = yes + scope:artistic_courtier_1 != this + } + weight = { + base = 1 + modifier = { + factor = 10 + learning > high_skill_rating + } + } + save_scope_as = artistic_courtier_2 + } + random_child = { + limit = { + age < 12 + root = { is_parent_of = prev } + } + save_scope_as = child + } + } + + option = { + name = fund_inspiration.6200.a + trigger = { + NOT = { + government_has_flag = government_is_tribal # No changing amenities above what's legal for tribals + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { + amenity_level = { + target = court_fashion + value < medium_amenity_level + } + } + set_amenity_level = { type = court_fashion value = 3 } + } + else_if = { + limit = { + amenity_level = { + target = court_fashion + value < high_amenity_level + } + } + set_amenity_level = { type = court_fashion value = 4 } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { + name = fund_inspiration.6200.b + custom_tooltip = fund_inspiration.6200.b.tt + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_gain + } + add_prestige = medium_prestige_gain + end_inspiration_sponsorship = scope:inspiration + add_gold = root.medium_gold_value + scope:inspiration_owner = { + add_opinion = { + target = root + opinion = -20 + modifier = insulted_opinion + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { + name = fund_inspiration.6200.c + trigger = { + any_child = { + age < 12 + } + } + scope:child = { + add_learning_skill = 2 + add_opinion = { + target = root + opinion = 20 + modifier = supportive_parent + } + } + scope:inspiration_owner = { + add_opinion = { + target = root + opinion = -20 + modifier = insulted_opinion + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + + +scripted_trigger homosexual_poet_trigger = { + OR = { + has_sexuality = homosexual + 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 } + } +} + +scripted_trigger unloved_poet_trigger = { + NOR = { + any_relation = { + type = lover + exists = yes + } + any_child = { + exists = yes + even_if_dead = yes + } + any_spouse = { + exists = yes + even_if_dead = yes + } + } +} + +fund_inspiration.6300 = { + type = character_event + title = fund_inspiration.6300.t + override_background = { + reference = study + } + desc = { + desc = fund_inspiration.6300.intro + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { + homosexual_poet_trigger = yes + } + } + desc = fund_inspiration.6300.homosexual_desc + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + unloved_poet_trigger = yes + } + } + desc = fund_inspiration.6300.no_relationship_desc + } + desc = fund_inspiration.6300.no_love_desc + } + } + theme = love + + left_portrait = { + character = scope:inspiration_owner + animation = worry + } + + trigger = { + scope:inspiration = { + inspiration_owner = { + exists = var:book_topic + OR = { + var:book_topic = flag:intrigue_the_art_of_love + var:book_topic = flag:seduction + var:book_topic = flag:fertility + var:book_topic = flag:love_sorcery + var:book_topic = flag:soulmate + } + NOR = { + any_relation = { + type = soulmate + always = yes + } + has_sexuality = asexual + has_trait = celibate + } + } + } + } + + immediate = { + random_vassal = { + limit = { has_trait = lifestyle_poet } + save_scope_as = inspiration_owner + } + } + + + option = { + name = fund_inspiration.6300.a + trigger = { + scope:inspiration_owner = { + unloved_poet_trigger = no + homosexual_poet_trigger = no + } + } + duel = { + skill = intrigue + target = scope:inspiration_owner + 6 = { + custom_tooltip = fund_inspiration.6300.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.3 + } + hidden_effect = { + send_interface_toast = { + left_icon = scope:inspiration_owner + title = fund_inspiration.6300.a.success + show_as_tooltip = { + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 2 } + } + } + } + } + } + 4 = { + custom_tooltip = fund_inspiration.6300.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.3 + } + hidden_effect = { + send_interface_toast = { + left_icon = scope:inspiration_owner + title = fund_inspiration.6300.a.failure + show_as_tooltip = { + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = -2 } + } + } + } + } + } + } + } + + option = { + name = fund_inspiration.6300.b + trigger = { + scope:inspiration_owner = { + homosexual_poet_trigger = no + unloved_poet_trigger = yes + is_attracted_to_gender_of = root + might_cheat_on_every_partner_trigger = yes + } + is_attracted_to_gender_of = scope:inspiration_owner + might_cheat_on_every_partner_trigger = yes + } + had_sex_with_effect = { + CHARACTER = scope:inspiration_owner + PREGNANCY_CHANCE = 25 + } + scope:inspiration_owner = { + progress_towards_lover_effect = { + CHARACTER = root + REASON = lover_inspiration_help + OPINION = default_lover_opinion + } + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + } + + option = { + name = fund_inspiration.6300.c + trigger = { + is_attracted_to_gender_of = scope:inspiration_owner + OR = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:inspiration_owner } + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + scope:inspiration_owner = { + homosexual_poet_trigger = no + } + } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_inspiration_strikes + OPINION = 20 + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + } + + option = { + name = fund_inspiration.6300.d + trigger = { + scope:inspiration_owner = { + homosexual_poet_trigger = yes + } + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + OR = { #Only really makes sense to get the later lover same sex love event if it actually is same sex love + AND = { + is_female = yes + scope:inspiration_owner = { is_female = yes } + } + AND = { + is_male = yes + scope:inspiration_owner = { is_male = yes } + } + } + is_attracted_to_gender_of = scope:inspiration_owner + OR = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:inspiration_owner } + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_inspiration_allowed + OPINION = 20 + } + add_character_flag = fund_inspiration_6301_lover + trigger_event = { + id = fund_inspiration.6301 + days = 10 + } + } + option = { + name = fund_inspiration.6300.e + trigger = { + scope:inspiration_owner = { + homosexual_poet_trigger = yes + } + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 4 } + } + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = 20 + REASON = friend_supported_poet + } + add_character_flag = fund_inspiration_6301_friend + trigger_event = { + id = fund_inspiration.6301 + days = 10 + } + } + option = { + name = fund_inspiration.6300.f + random_list = { + 6 = { + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 2 } + } + hidden_effect = { + send_interface_toast = { + left_icon = scope:inspiration_owner + title = fund_inspiration.6300.a.success + show_as_tooltip = { + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 2 } + } + } + } + } + } + + 4 = { + hidden_effect = { + send_interface_toast = { + left_icon = scope:inspiration_owner + title = fund_inspiration.6300.a.failure + show_as_tooltip = { + end_inspiration_sponsorship = scope:inspiration + } + } + } + end_inspiration_sponsorship = scope:inspiration + } + } + } +} + +#Poet sends you same sex love poetry if you encouraged them + +fund_inspiration.6301 = { + type = letter_event + opening = { + desc = fund_inspiration.6301.t + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = fund_inspiration_6301_lover + } + desc = fund_inspiration.6301.lover_desc + } + triggered_desc = { + trigger = { + has_character_flag = fund_inspiration_6301_friend + } + desc = fund_inspiration.6301.friend_desc + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { is_female = yes } + } + desc = fund_inspiration.6301.female_desc + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { is_male = yes } + } + desc = fund_inspiration.6301.male_desc + } + } + triggered_desc = { + trigger = { + trait_is_criminal_in_faith_trigger = { TRAIT = sodomite FAITH = root.faith GENDER_CHARACTER = scope:inspiration_owner } + } + desc = fund_inspiration.6301.crime_desc + } + } + sender = scope:inspiration_owner + + weight_multiplier = { + base = 1 + } + + + immediate = { + hidden_effect = { + scope:inspiration_owner = { + if = { + limit = { is_female = yes } + save_scope_as = owner + create_artifact = { + name = witch_queen_love_poem_name + description = witch_queen_love_poem_description + type = book + visuals = book + modifier = artifact_same_faith_opinion_negative_1_modifier + save_scope_as = witch_queen_love_poem + } + scope:witch_queen_love_poem = { + add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_2_modifier + add_artifact_modifier = artifact_tolerance_advantage_mod_1_modifier + flag_as_trash_artifact = yes + } + } + else = { + save_scope_as = owner + create_artifact = { + name = prince_archivist_love_poem_name + description = prince_archivist_love_poem_description + type = book + visuals = book + modifier = artifact_same_faith_opinion_negative_1_modifier + save_scope_as = prince_archivist_love_poem + } + scope:prince_archivist_love_poem = { + add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_2_modifier + add_artifact_modifier = artifact_tolerance_advantage_mod_1_modifier + flag_as_trash_artifact = yes + } + } + } + } + scope:inspiration_owner = { + change_artifact_book_content_quality_effect = { AMOUNT = 2 } + } + } + + after = { + remove_character_flag = fund_inspiration_6301_friend + remove_character_flag = fund_inspiration_6301_lover + } + + option = { + name = fund_inspiration.6301.a + if = { + limit = { + scope:inspiration_owner = { + is_male = yes + } + } + scope:prince_archivist_love_poem = { set_owner = root } + } + else = { + scope:witch_queen_love_poem = { set_owner = root } + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { has_character_flag = fund_inspiration_6301_lover } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_inspiration_treasure + OPINION = 20 + } + } + } + + option = { + name = fund_inspiration.6301.b + if = { + limit = { + scope:inspiration_owner = { + is_male = yes + } + } + scope:prince_archivist_love_poem = { set_owner = root } + } + else = { + scope:witch_queen_love_poem = { set_owner = root } + } + every_courtier_or_guest = { + limit = { + NOR = { + has_trait = compassionate + this = inspiration_owner + is_close_family_of = root + } + } + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = insult_opinion + opinion = -10 + } + } + every_courtier = { + limit = { + has_trait = compassionate + } + custom = all_compassionate_in_the_court + add_opinion = { + target = root + modifier = pity_opinion + opinion = 15 + } + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_gain + } + if = { + limit = { has_character_flag = fund_inspiration_6301_friend } + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = 20 + REASON = friend_arranged_reading + } + } + } +} + + +#Bringing music to the jungle by Isabella Welch + +fund_inspiration.6500 = { + type = character_event + title = fund_inspiration.6500.t + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6500.desc + desc = fund_inspiration.6500.action + } + + theme = hunting + override_background = { + reference = wilderness_forest + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + lower_left_portrait = { + character = scope:court_musician + } + + artifact = { + target = scope:leopard_hat + position = lower_center_portrait + } + + cooldown = { years = 15 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = jungle + } + } + NOT = { + any_character_artifact = { + has_variable = leopard_hat + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { employs_court_position = court_musician_court_position } + random_court_position_holder = { + type = court_musician_court_position + save_scope_as = court_musician + } + } + else_if ={ + limit = { employs_court_position = court_poet_court_position } + random_court_position_holder = { + type = court_poet_court_position + save_scope_as = court_musician + } + } + else_if = { + limit = { employs_court_position = court_jester_court_position } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = court_musician + } + } + else_if = { + limit = { + any_courtier = { + has_trait = lifestyle_poet + } + } + random_courtier = { + limit = { has_trait = lifestyle_poet } + save_scope_as = court_musician + } + } + else = { + random_courtier = { + save_scope_as = court_musician + } + } + hidden_effect = { + set_artifact_rarity_common = yes + save_scope_as = owner # Needed for 'visuals = crown' + scope:inspiration_owner = { + create_artifact = { + name = leopard_hat_name + description = leopard_hat_description + template = crown_wearable_template + wealth = scope:wealth + quality = scope:quality + type = helmet + visuals = crown + modifier = artifact_prowess_2_modifier + save_scope_as = leopard_hat + } + hidden_effect_new_object = { + scope:leopard_hat = { + flag_as_trash_artifact = yes + set_variable = { + name = leopard_hat + value = yes + } + } + } + } + } + } + + option = { # Show everyone the music, will they like it? + name = fund_inspiration.6500.a + scope:inspiration_owner = { + duel = { + skill = diplomacy + value = 8 + 40 = { + desc = fund_inspiration.6500.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.6500.a.success + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + scope:inspiration_owner = { + add_diplomacy_skill = 2 + } + } + } + 10 = { + desc = fund_inspiration.6500.a.failure + send_interface_toast = { + title = fund_inspiration.6500.a.failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + increase_wounds_effect = { REASON = poison } + } + } + } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # Adventurer flees + name = fund_inspiration.6500.b + scope:inspiration_owner = { + duel = { + skill = prowess + value = 8 + 40 = { + desc = fund_inspiration.6500.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.6500.b.success + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + add_prowess_skill = 2 + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + } + } + 10 = { + desc = fund_inspiration.6500.b.failure + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.6500.b.failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + increase_wounds_effect = { REASON = fight } + } + } + } + } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # Adventurer fights a wild beast + name = fund_inspiration.6500.c + random_list = { + 10 = { + custom_tooltip = fund_inspiration.6500.c.tt + modifier = { + add = 25 + scope:inspiration_owner = { + has_trait = lifestyle_hunter + } + } + modifier = { + add = 25 + scope:inspiration_owner = { + prowess > medium_skill_rating + } + } + scope:leopard_hat = { + set_owner = scope:inspiration_owner + } + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.6500.c.tt + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + } + } + } + + 10 = { + custom_tooltip = fund_inspiration.6500.c.tt_failure + modifier = { + add = 25 + scope:inspiration_owner = { + prowess < medium_skill_rating + } + } + hidden_effect = { + send_interface_toast = { + title = fund_inspiration.6500.c.tt_failure + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + increase_wounds_effect = { REASON = fight } + } + } + } + } + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + +# Dragging a boat up a cliff by Isabella Welch + +scripted_trigger sisyphus_nickname_trigger = { + OR = { + has_title = title:k_italy + has_title = title:k_romagna + has_title = title:k_sardinia + has_title = title:e_italy + is_roman_emperor_excluding_byzantium_trigger = yes + capital_province = { + geographical_region = world_europe_west_britannia + geographical_region = world_europe_west_germania + geographical_region = world_europe_west_francia + geographical_region = world_europe_west_iberia + geographical_region = world_europe_west + geographical_region = world_europe_south_italy + geographical_region = world_europe_south + } + culture = { has_cultural_pillar = heritage_byzantine } + } +} + +fund_inspiration.6501 = { + type = character_event + title = fund_inspiration.6501.t + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6501.desc + desc = fund_inspiration.6500.action + } + + theme = hunting + override_background = { + reference = wilderness_mountains + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = hills + } + } + } + + weight_multiplier = { + base = 1 + } + + option = { # Adventurer cuts their losses + name = fund_inspiration.6501.a + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # Adventurer attempts a ridiculous dragging of the boat over land + name = fund_inspiration.6501.b + scope:inspiration_owner = { + duel = { + skill = martial + value = 10 + 40 = { + desc = fund_inspiration.6501.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + modifier = { + add = 25 + scope:inspiration_owner = { + has_lifestyle = martial_lifestyle + } + } + modifier = { + add = 25 + scope:inspiration_owner = { + has_trait = strategist + } + } + root = { + send_interface_toast = { + title = fund_inspiration.6501.b.success + left_icon = scope:inspiration_owner + scope:inspiration_owner = { + add_prowess_skill = 2 + if = { + limit = { + root = { sisyphus_nickname_trigger = yes } + } + give_nickname = nick_sisyphus + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + } + add_prestige = major_prestige_gain + } + } + } + 10 = { + desc = fund_inspiration.6501.b.failure + hidden_effect = { + root = { + send_interface_toast = { + title = fund_inspiration.6501.b.failure + left_icon = scope:inspiration_owner + remove_short_term_gold = major_gold_value + } + } + } + remove_short_term_gold = major_gold_value + } + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + modifier = { + short_term_gold < massive_gold_value + factor = 0 + } + modifier = { + is_at_war = yes + factor = 0 + } + } + } + + option = { # Adventurer gives up and buys a new boat + name = fund_inspiration.6501.c + remove_short_term_gold = medium_gold_value + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + short_term_gold < major_gold_value + factor = 0 + } + modifier = { + is_at_war = yes + factor = 0 + } + } + } +} + +#Adventurer in the desert dreaming of you + +fund_inspiration.6502 = { + type = character_event + title = fund_inspiration.6502.t + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6502.desc + } + + theme = hunting + override_background = { + reference = wilderness_desert + } + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 20 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = desert + } + } + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + + weight_multiplier = { + base = 1 + } + + option = { # You are indeed missing your adventurer + name = fund_inspiration.6502.a + trigger = { + has_relation_potential_lover = scope:inspiration_owner + can_set_relation_lover_trigger = { CHARACTER = scope:inspiration_owner } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_adventurer_thirst + OPINION = 20 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { # try and wrangle the adventurer into bringing back better items + name = fund_inspiration.6502.b + trigger = { + NOT = { has_relation_potential_lover = scope:inspiration_owner } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + progress_towards_lover_effect = { + CHARACTER = scope:inspiration_owner + REASON = lover_adventurer_thirst + OPINION = 20 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { # roll your eyes + name = fund_inspiration.6502.c + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = disappointed_opinion + opinion = -15 + } + scope:inspiration_owner = { + add_character_modifier = { + modifier = dying_of_thirst_modifier + years = 2 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +#Burial mound entry + +fund_inspiration.6503 = { + type = character_event + title = fund_inspiration.6503.t + theme = hunting + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6503.desc + desc = fund_inspiration.6500.action + } + + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 15 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = steppe + geographical_region = world_steppe_west + } + } + NOR = { + any_character_artifact = { + has_variable = kurgan_ornament + } + any_character_artifact = { + has_variable = kurgan_saddle + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + hidden_effect = { + scope:inspiration_owner = { + create_artifact = { + name = kurgan_ornament_name + description = kurgan_ornament_description + type = miscellaneous + visuals = small_box + modifier = artifact_court_grandeur_baseline_add_1_modifier + save_scope_as = kurgan_ornament + } + } + hidden_effect_new_object = { + scope:kurgan_ornament = { + flag_as_trash_artifact = yes + set_variable = { + name = kurgan_ornament + value = yes + } + } + } + } + hidden_effect = { + scope:inspiration_owner = { + create_artifact = { + name = kurgan_saddle_name + description = kurgan_saddle_description + type = miscellaneous + visuals = medium_box + modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + save_scope_as = kurgan_saddle + } + } + hidden_effect_new_object = { + scope:kurgan_saddle = { + flag_as_trash_artifact = yes + set_variable = { + name = kurgan_saddle + value = yes + } + } + } + } + } + + option = { # get a fancy little bauble from the tomb + name = fund_inspiration.6503.a + scope:kurgan_ornament = { + set_owner = root + } + hidden_effect = { destroy_artifact = scope:kurgan_saddle } + scope:inspiration_owner = { + add_character_modifier = { + modifier = tomb_robber_modifier + years = 2 + } + } + add_character_modifier = { + modifier = tomb_robber_modifier + years = 2 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { # study the saddles and horsemanship of the scythians + name = fund_inspiration.6503.b + scope:kurgan_saddle = { + set_owner = root + } + hidden_effect = { destroy_artifact = scope:kurgan_ornament } + scope:inspiration_owner = { + add_character_modifier = { + modifier = tomb_robber_modifier + years = 2 + } + } + add_character_modifier = { + modifier = tomb_robber_modifier + years = 2 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { # refuse to rob the tomb + name = fund_inspiration.6503.c + add_character_modifier = { + modifier = respect_for_the_dead_modifier + years = 2 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } +} + +#Adventurer took a farmhand as a lover + +fund_inspiration.6504 = { + type = character_event + title = fund_inspiration.6504.t + theme = hunting + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6504.desc + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + desc = fund_inspiration.6504.pregnant + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_female_lover_flag + } + } + desc = fund_inspiration.6504.female_lover + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_male_lover_flag + has_sexuality = homosexual + } + } + desc = fund_inspiration.6504.male_lover_homosexual + } + desc = fund_inspiration.6504.male_lover + } + triggered_desc = { + trigger = { + NOT = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + } + desc = fund_inspiration.6504.lover_ultimatum + } + } + + override_background = { + reference = farmland + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = scope:adventurer_lover + animation = love + } + + immediate = { + scope:adventurer_homosexual_secret ?= { reveal_to = root } + scope:adventurer_lover_secret ?= { reveal_to = root } + } + + option = { # tell the adventurer to begone + name = fund_inspiration.6504.a + custom_tooltip = fund_inspiration.6504.a.tt + trigger = { + NOT = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_gain + } + end_inspiration_sponsorship = scope:inspiration + remove_courtier_or_guest = scope:inspiration_owner + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + option = { # let the adventurer and their lover come to court + name = fund_inspiration.6504.b + trigger = { + NOT = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + } + add_courtier = scope:adventurer_lover + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_loss + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + scope:lover_homosexual_secret ?= { reveal_to = root } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + option = { # express sympathy for the child if the lover is pregnant + name = fund_inspiration.6504.c + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + add_courtier = scope:adventurer_lover + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_loss + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + scope:lover_homosexual_secret ?= { reveal_to = root } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + option = { # absolutely reject peasants in the court + name = fund_inspiration.6504.d + trigger = { + scope:inspiration_owner = { + has_character_flag = adventurer_pregnant_lover_flag + } + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = medium_court_grandeur_gain + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + +fund_inspiration.6513 = { + type = character_event + hidden = yes + cooldown = { years = 15 } + + weight_multiplier = { + base = 1 + modifier = { + scope:inspiration_owner = { has_trait = lustful } + factor = 2 + } + modifier = { + scope:inspiration_owner = { has_trait = rakish } + factor = 2 + } + } + + trigger = { + scope:inspiration = { has_inspiration_type = adventure_inspiration } + scope:inspiration_owner = { + location = { + terrain = farmlands + } + NOR = { + has_trait = chaste + has_sexuality = asexual + } + might_cheat_on_every_partner_trigger = yes + } + } + + immediate = { + scope:inspiration_owner = { + location = { save_scope_as = location_template } + } + if = { # Male adventurer impregnates someone + limit = { + scope:inspiration_owner = { # Must be male and attracted to women + is_male = yes + is_attracted_to_women = yes + can_have_children = yes + } + } + create_character = { + location = scope:inspiration_owner.location + template = adventurer_pregnant_lover_character + faith = scope:location_template.faith + culture = scope:location_template.culture + save_scope_as = adventurer_lover + } + scope:adventurer_lover = { + if = { + limit = { can_have_children = yes } + make_pregnant = { father = scope:inspiration_owner } + scope:inspiration_owner = { add_character_flag = adventurer_pregnant_lover_flag } + } + else = { + scope:inspiration_owner = { add_character_flag = adventurer_female_lover_flag } + } + } + } + else = { # Any other male or female lover combo + hidden_effect = { + random_list = { + 10 = { # Female lover + trigger = { + scope:inspiration_owner = { is_attracted_to_women = yes } + } + create_character = { + location = scope:inspiration_owner.location + template = adventurer_female_lover_character + faith = scope:location_template.faith + culture = scope:location_template.culture + save_scope_as = adventurer_lover + } + scope:inspiration_owner = { add_character_flag = adventurer_female_lover_flag } + } + 10 = { # Male lover + trigger = { + scope:inspiration_owner = { is_attracted_to_men = yes } + } + create_character = { + location = scope:inspiration_owner.location + template = adventurer_male_lover_character + faith = scope:location_template.faith + culture = scope:location_template.culture + save_scope_as = adventurer_lover + } + scope:inspiration_owner = { add_character_flag = adventurer_male_lover_flag } + } + } + } + } + scope:adventurer_lover = { # Catch bad sexuality matches + if = { + limit = { + NOT = { is_attracted_to_gender_of = scope:inspiration_owner } + } + set_sexuality = bisexual + } + } + scope:inspiration_owner = { + # Lover relation + set_random_lover_reason = { TARGET = scope:adventurer_lover } + # Lover secret + if = { + limit = { + any_secret = { + type = secret_lover + secret_target = scope:adventurer_lover + } + } + random_secret = { + type = secret_lover + limit = { + secret_target = scope:adventurer_lover + } + save_scope_as = adventurer_lover_secret + } + } + # Homosexual secret + 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 } + } + if = { + limit = { + NOT = { + any_secret = { type = secret_homosexual } + } + } + give_homosexual_secret_or_nothing_effect = yes + } + random_secret = { + type = secret_homosexual + save_scope_as = adventurer_homosexual_secret + } + } + } + # Other homosexual secret + scope:adventurer_lover = { + 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 } + } + if = { + limit = { + NOT = { + any_secret = { type = secret_homosexual } + } + } + give_homosexual_secret_or_nothing_effect = yes + } + random_secret = { + type = secret_homosexual + save_scope_as = lover_homosexual_secret + } + } + } + trigger_event = fund_inspiration.6504 + } +} + +#Oasis event, or, should I say, the CK3 beach episode + +fund_inspiration.6505 = { + type = character_event + title = fund_inspiration.6505.t + desc = { + desc = fund_inspiration.6500.introduction + desc = fund_inspiration.6505.desc + } + theme = hunting + override_background = { + reference = wilderness_desert + } + left_portrait = { + character = scope:inspiration_owner + animation = happiness + } + artifact = { + target = scope:naked_tapestry + position = lower_center_portrait + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = oasis + } + } + NOT = { + any_character_artifact = { + has_variable = naked_tapestry + } + } + } + + weight_multiplier = { + base = 2 + } + + immediate = { + hidden_effect = { + save_scope_as = owner + set_artifact_rarity_common = yes + scope:inspiration_owner = { + create_artifact = { + name = naked_tapestry_name + description = naked_tapestry_description + visuals = tapestry + type = tapestry + quality = scope:quality + wealth = scope:wealth + modifier = artifact_attraction_opinion_2_modifier + save_scope_as = naked_tapestry + } + add_character_flag = is_naked + hidden_effect_new_object = { + scope:naked_tapestry = { + flag_as_trash_artifact = yes + set_variable = { + name = naked_tapestry + value = yes + } + } + } + } + } + } + + option = { # destroy the naked tapestry + name = { + trigger = { + has_trait = one_eyed + } + text = fund_inspiration.6505.a_one_eyed + } + name = { + trigger = { + has_trait = blind + } + text = fund_inspiration.6505.a_blind + } + name = fund_inspiration.6505.a + destroy_artifact = scope:naked_tapestry + reverse_add_opinion = { + target = scope:inspiration_owner + opinion = -20 + modifier = insulted_opinion + } + if = { + limit = { NOT = { has_faith = faith:adamites } } + add_piety = medium_piety_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { # appreciate the salacious tapestry... in private + name = fund_inspiration.6505.b + scope:naked_tapestry = { + set_owner = root + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + reverse_add_opinion = { + target = scope:inspiration_owner + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + has_trait = chaste + } + remove_trait = chaste + add_trait = lustful + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { # flex the naked tapestry in front of your whole court + name = fund_inspiration.6505.c + trigger = { + NOT = { has_faith = faith:adamites } + } + scope:naked_tapestry = { + set_owner = root + } + every_courtier = { + limit = { + has_trait = lustful + } + custom = all_lustful_in_the_court + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + reverse_add_opinion = { + target = scope:inspiration_owner + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = minor_court_grandeur_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + option = { #adamites find it sacred + name = fund_inspiration.6505.d + trigger = { + has_faith = faith:adamites + } + scope:naked_tapestry = { + set_owner = root + } + add_piety = medium_piety_gain + reverse_add_opinion = { + target = scope:inspiration_owner + opinion = 20 + modifier = pleased_opinion + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + after = { + scope:inspiration_owner = { + if = { + limit = { has_character_flag = is_naked } + remove_character_flag = is_naked + } + } + } +} + +#Adventurer hasn't gone on the adventure, is in a local tavern by Isabella Welch +#as pope urban iii would say, 'the tavern sins' +scripted_trigger deadbeat_adventurer_trigger = { + OR = { + has_trait = rakish + has_trait = lazy + has_trait = drunkard + has_trait = gluttonous + has_trait = drunkard + has_trait = deceitful + has_trait = greedy + } + NOT = { has_character_flag = was_deadbeat } + adventure_inspiration_average_skill_value < high_inspiration_skill +} + +fund_inspiration.6400 = { + type = character_event + title = fund_inspiration.6400.t + desc = fund_inspiration.6400.desc + theme = realm + override_background = { + reference = tavern + } + left_portrait = { + character = scope:inspiration_owner + animation = scheme + } + right_portrait = { + character = root + animation = shock + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + scope:inspiration_owner = { + deadbeat_adventurer_trigger = yes + } + } + } + + weight_multiplier = { + base = 0.25 + modifier = { + add = 0.75 + scope:inspiration_owner = { + OR = { + has_trait = drunkard + has_trait = lazy + } + } + } + modifier = { + add = -0.25 + scope:inspiration_owner = { + adventure_inspiration_average_skill_value >= medium_inspiration_skill + } + } + } + + immediate = { + scope:inspiration = { + change_inspiration_progress = -5 + } + scope:inspiration_owner = { + if = { + limit = { + NOT = { has_trait = drunkard } + } + add_trait = drunkard + } + add_character_flag = was_deadbeat + } + hidden_effect = { + scope:inspiration_owner = { + set_location = { + location = root.capital_province + stick_to_location = yes + } + } + } + } + + option = { + name = fund_inspiration.6400.a + duel = { + skill = stewardship + target = scope:inspiration_owner + 30 = { + desc = fund_inspiration.6400.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.2 + } + send_interface_toast = { + title = fund_inspiration.6400.a.success + custom_tooltip = fund_inspiration.6400.a.success_continue + left_icon = scope:inspiration_owner + } + } + 20 = { + desc = fund_inspiration.6400.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.2 + } + send_interface_toast = { + title = fund_inspiration.6400.a.failure + left_icon = scope:inspiration_owner + remove_short_term_gold = minor_gold_value + end_inspiration_sponsorship = scope:inspiration + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.5 + } + } + } + + option = { + name = fund_inspiration.6400.b + end_inspiration_sponsorship = scope:inspiration + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + root.capital_county = { + add_county_modifier = { + modifier = county_chastised_beloved_adventurer_modifier + years = 25 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_greed = 0.5 + } + } + } +} + + +#Adventurer is being very precious, not really suited for the outdoors + +fund_inspiration.6506 = { + type = character_event + title = fund_inspiration.6506.t + desc = { + desc = fund_inspiration.6506.introduction + desc = fund_inspiration.6506.desc + } + + theme = hunting + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = wetlands + } + NOT = { + has_trait = rough_terrain_expert + } + } + NOT = { + any_character_artifact = { + has_variable = frogspawn_jar + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.5 + scope:inspiration_owner = { + OR = { + has_trait = craven + has_trait = lazy + has_trait = gluttonous + has_trait = irritable + has_trait = profligate + } + } + } + } + + immediate = { + scope:inspiration_owner = { + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + create_artifact = { + name = frogspawn_jar_name + description = frogspawn_jar_description + type = miscellaneous + visuals = glazed_jar + modifier = artifact_fertility_gain_1_modifier + save_scope_as = frogspawn_jar + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:frogspawn_jar = { + flag_as_trash_artifact = yes + set_variable = { + name = frogspawn_jar + value = yes + } + } + } + } + scope:frogspawn_jar = { + set_owner = root + } + } + + option = { #try and convince them to keep going + name = fund_inspiration.6506.a + scope:inspiration_owner = { + add_stress = major_stress_gain + } + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + scope:inspiration_owner = { + hidden_effect = { + duel = { + skill = prowess + value = 8 + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + hidden_effect = { + add_character_flag = adventurer_stuck_in_swamp + } + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = 0.5 + } + } + } + + option = { #let them go to easier lands + name = fund_inspiration.6506.b + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -2 + } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + } + } +} + +#Adventurer is travelling through reasonably pleasant lands, gets bullied by the county holder who doesn't like ROOT + +fund_inspiration.6507 = { + type = character_event + title = fund_inspiration.6507.t + desc = { + desc = fund_inspiration.6507.introduction + desc = fund_inspiration.6507.desc + } + + theme = hunting + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + + cooldown = { years = 20 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + NOT = { has_character_flag = had_fund_inspiration.6507 } + location = { + terrain = plains + exists = this.barony.holder + this.barony.holder = { + is_adult = yes + opinion = { + target = root + value <= low_negative_opinion + } + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:inspiration_owner = { + location = { + this.barony.holder = { save_scope_as = grumpy_liege } + } + add_character_flag = had_fund_inspiration.6507 + if = { + limit = { + NOR = { + has_trait = blind + has_trait = one_eyed + } + } + add_trait = one_eyed + } + else_if = { + limit = { + has_trait = one_eyed + NOT = { has_trait = blind } + } + add_trait = blind + } + } + } + + option = { #midly respond by denouncing the guy who did this + name = fund_inspiration.6507.a + hidden_effect = { + if = { + limit = { + scope:grumpy_liege = { + can_start_scheme = { + type = murder + target_character = scope:inspiration_owner + } + } + } + scope:grumpy_liege = { + start_scheme = { + type = murder + target_character = scope:inspiration_owner + } + } + } + } + scope:grumpy_liege = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -25 + } + } + scope:inspiration_owner = { + if = { + limit = { has_trait = brave } + remove_trait = brave + add_trait = craven + } + else_if = { + limit = { has_trait = trusting } + remove_trait = trusting + add_trait = paranoid + } + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + if = { + limit = { + scope:inspiration_owner = { + can_start_scheme = { + type = murder + target_character = scope:grumpy_liege + } + } + } + scope:inspiration_owner = { + start_scheme = { + type = murder + target_character = scope:grumpy_liege + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.1 + ai_boldness = 0.1 + } + } + } + + option = { #help the slighted adventurer scheme + name = fund_inspiration.6507.b + trigger = { + scope:grumpy_liege = { + is_vassal_or_below_of = root + } + can_start_scheme = { + type = murder + target_character = scope:grumpy_liege + } + } + start_scheme = { + type = murder + target_character = scope:grumpy_liege + } + random_scheme = { + type = murder + limit = { + scheme_target_character = scope:grumpy_liege + } + save_scope_as = grumpy_liege_murder + } + try_to_force_assign_character_to_random_agent_slot_effect = { + SCHEME = scope:grumpy_liege_murder + CHAR = scope:inspiration_owner + YEARS = 20 + } + reverse_add_opinion = { + target = scope:inspiration_owner + modifier = grateful_opinion + opinion = 40 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { #ignore everything and refuse to seek vengeance + name = fund_inspiration.6507.c + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -4 + } + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_boldness = -0.5 + ai_rationality = 0.5 + } + } + } +} + +#Adventurer studying beavers in the Taiga + +fund_inspiration.6508 = { + type = character_event + title = fund_inspiration.6508.t + desc = { + desc = fund_inspiration.6508.introduction + desc = fund_inspiration.6508.desc + triggered_desc = { + trigger = { + employs_court_position = royal_architect_court_position + } + desc = fund_inspiration.6508.architect_desc + } + } + theme = hunting + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + lower_left_portrait = { + character = scope:royal_architect + } + lower_right_portrait = { + character = scope:child + } + + cooldown = { years = 15 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = taiga + } + } + NOR = { + any_character_artifact = { + has_variable = beaver_book + } + any_child = { + any_character_artifact = { + has_variable = beaver_book + } + } + any_court_position_holder = { + type = royal_architect_court_position + any_character_artifact = { + has_variable = beaver_book + } + } + } + } + + immediate = { + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = court_architect + } + scope:inspiration_owner = { + #To stagger any following events + add_character_flag = { + flag = fund_adventure_inspiration_event_cooldown + days = { 30 60 } + } + create_artifact = { + name = beaver_book_name + description = beaver_book_description + type = miscellaneous + visuals = book + modifier = artifact_build_time_2_modifier + save_scope_as = beaver_book + history = { + type = created + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:beaver_book = { + flag_as_trash_artifact = yes + set_variable = { + name = beaver_book + value = yes + } + } + } + add_learning_skill = 2 + } + random_child = { + limit = { + age < 15 + is_available_ai = yes + } + save_scope_as = child + } + } + option = { #study the beaver book yourself + name = fund_inspiration.6508.a + add_stewardship_lifestyle_xp = massive_lifestyle_xp + scope:beaver_book = { + set_owner = root + } + } + + option = { #give the book to your architect to study + name = fund_inspiration.6508.b + trigger = { exists = scope:court_architect } + custom_tooltip = fund_inspiration.6508.b.tt + scope:court_architect = { + add_stewardship_skill = 2 + set_variable = { + name = fund_inspiration_6508_architect_improvement + value = yes + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + scope:beaver_book = { + set_owner = scope:court_architect + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #give the book to your child for fun + name = fund_inspiration.6508.c + trigger = { + exists = scope:child + } + scope:child = { + add_stewardship_skill = 2 + add_opinion = { + target = root + modifier = supportive_parent + opinion = 20 + } + } + scope:beaver_book = { + set_owner = scope:child + } + if = { + limit = { exists = scope:court_architect } + scope:court_architect = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.2 + ai_compassion = 0.5 + } + } + } + option = { #pay to encourage the adventurer to keep up good work + name = fund_inspiration.6508.d + trigger = { + NAND = { + any_child = { + age < 15 + is_available_ai = yes + } + employs_court_position = royal_architect_court_position + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + remove_short_term_gold = minor_gold_value + scope:beaver_book = { + set_owner = root + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + short_term_gold < minor_gold_value + factor = 0 + } + } + } +} + +#Adventurer vastly exaggerating what crocodiles look like + +fund_inspiration.6509 = { + type = character_event + title = fund_inspiration.6509.t + desc = { + desc = fund_inspiration.6509.intro_desc + desc = fund_inspiration.6509.desc + } + theme = hunting + override_background = { + reference = wilderness_steppe + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = floodplains + } + } + NOT = { + any_character_artifact = { + has_variable = crocodile_tapestry + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + + } + + option = { #make a crocodile tapestry and display it! the horror! + name = fund_inspiration.6509.a + remove_short_term_gold = medium_gold_value + + save_scope_as = owner + set_artifact_rarity_common = yes + create_artifact = { + name = crocodile_tapestry_name + description = crocodile_tapestry_description + type = tapestry + visuals = tapestry + modifier = artifact_dread_gain_mult_1_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = crocodile_tapestry + history = { + type = given + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:crocodile_tapestry = { + flag_as_trash_artifact = yes + set_variable = { + name = crocodile_tapestry + value = yes + } + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + } + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + + option = { #be afraid of the crocodile, but impressed by the adventurer + name = fund_inspiration.6509.b + add_stress = minor_stress_gain + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -0.5 + ai_rationality = -0.1 + } + } + } + + option = { #you know what crocodiles are, see em everyday + name = fund_inspiration.6509.c + trigger = { + any_held_title = { + this = title:k_egypt + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + add_prestige = medium_prestige_gain + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +#Adventurer meeting a vigilante band who hide in the forest + +fund_inspiration.6510 = { + type = character_event + title = fund_inspiration.6510.t + desc = { + desc = fund_inspiration.6510.intro_desc + desc = fund_inspiration.6510.desc + } + theme = hunting + override_background = { + reference = wilderness_forest + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + trigger = { + exists = scope:inspiration_owner.location.barony.holder + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = forest + } + NOT = { has_trait = greedy } + NOT = { is_councillor_of = root } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:inspiration_owner = { + location = { + this.barony.holder = { save_scope_as = enemy_liege } + } + add_trait = improvident + } + + } + + option = { #make them your steward, they become good at understanding the people + name = fund_inspiration.6510.a + + trigger = { + scope:inspiration_owner = { + can_be_steward_trigger = { COURT_OWNER = root } + } + } + + root = { fire_councillor = cp:councillor_steward } + root = { + assign_councillor_type = { + type = councillor_steward + target = scope:inspiration_owner + } + } + scope:inspiration_owner = { + add_trait = peasant_leader + } + hidden_effect = { + end_inspiration_sponsorship = scope:inspiration + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.5 + } + } + } + + option = { #threaten to kill the adventurer for not returning + name = fund_inspiration.6510.b + duel = { + skill = intrigue + target = scope:inspiration_owner + 10 = { + custom_tooltip = fund_inspiration.6510.b.toast_outcome.positive + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.6510.b.toast_outcome.positive + custom_tooltip = fund_inspiration.6510.b.toast_outcome.positive.continue + left_icon = root + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 20 = { + custom_tooltip = fund_inspiration.6510.b.toast_outcome.refusal + send_interface_toast = { + title = fund_inspiration.6510.b.toast_outcome.refusal + custom_tooltip = fund_inspiration.6510.b.toast_outcome.positive.flee + left_icon = root + scope:inspiration_owner = { + end_inspiration_sponsorship = scope:inspiration + add_prestige = medium_prestige_loss + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { # let em go, you don't need em + name = fund_inspiration.6510.c + end_inspiration_sponsorship = scope:inspiration + scope:inspiration_owner = { + hidden_effect = { + death = { death_reason = death_vanished } + } + } + ai_chance = { + base = 10 + } + } +} + +#Ageing or sick adventurer decides that the mountains are a last moment of beauty for them + +fund_inspiration.6511 = { + type = character_event + title = fund_inspiration.6511.t + desc = { + desc = fund_inspiration.6511.intro_desc + first_valid = { + triggered_desc = { + trigger = { + scope:inspiration_owner = { + age > 60 + } + } + desc = fund_inspiration.6511.old_age + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + health <= poor_health + } + } + desc = fund_inspiration.6511.poor_health + } + triggered_desc = { + trigger = { + scope:inspiration_owner = { + location = { + has_province_modifier = winter_harsh_modifier + } + } + } + desc = fund_inspiration.6511.winter + } + } + } + theme = death + override_background = { + reference = wilderness_mountains + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + cooldown = { years = 15 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = mountains + } + OR = { + age > 60 + health <= poor_health + location = { + has_province_modifier = winter_harsh_modifier + } + } + } + } + + weight_multiplier = { + base = 0.5 + } + + immediate = { + scope:inspiration_owner = { + death = { + death_reason = death_ice + } + } + } + + option = { #these are conditions under which the adventurer can have a dramatic death, they aren't really there for you to select anything, just to tell you you were foolish for sending them into the snowy mountains + name = fund_inspiration.6511.a + #This event just informs you it has happened + } +} + +#Adventurer asking you to name the mountain + +fund_inspiration.6512 = { + type = character_event + title = fund_inspiration.6512.t + desc = { + desc = fund_inspiration.6512.intro_desc + desc = fund_inspiration.6512.desc + } + theme = hunting + override_background = { + reference = wilderness_mountains + } + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + + + cooldown = { years = 10 } + + trigger = { + scope:inspiration = { + has_inspiration_type = adventure_inspiration + } + scope:inspiration_owner = { + location = { + terrain = desert_mountains + this.county.holder = { + NOR = { + this.top_liege = root + this.liege = root + this = root + } + } + } + } + NOT = { + any_character_artifact = { + has_variable = mountain_rock + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:inspiration_owner = { + location = { + save_scope_as = mountain_location + } + hidden_effect = { + create_artifact = { + name = mountain_rock_name + description = mountain_rock_description + type = miscellaneous + visuals = rock + modifier = artifact_heavy_cavalry_toughness_1_modifier + save_scope_as = mountain_rock + history = { + type = discovered + actor = scope:inspiration_owner + recipient = root + location = scope:inspiration_owner.location + } + } + hidden_effect_new_object = { + scope:mountain_rock = { + flag_as_trash_artifact = yes + set_variable = { + name = mountain_rock + value = yes + } + } + } + } + } + if = { + limit = { + any_relation = { type = lover } + } + random_relation = { + type = lover + save_scope_as = lover + } + } + if = { + limit = { + any_relation = { type = potential_rival } + } + random_relation = { + type = potential_rival + save_scope_as = rival + } + } + } + + after = { + if = { + limit = { + NOT = { has_character_flag = got_mountain_rock } + } + destroy_artifact = scope:mountain_rock + } + remove_character_flag = got_mountain_rock + } + + option = { #scoff at the idea of not respecting the local name + name = fund_inspiration.6512.a + add_prestige = medium_prestige_gain + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #dig at the rocky mountains + name = fund_inspiration.6512.b + trigger = { + NOR = { + exists = scope:lover + is_cannibal_trigger = yes + is_male = yes + exists = scope:rival + has_trait = greedy + martial > 10 + intrigue > 10 + } + } + every_courtier_or_guest = { + limit = { age < 14 } + custom = custom.every_child_in_the_court + add_opinion = { + modifier = humorous_opinion + opinion = 10 + target = root + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + + option = { #name after your war god + name = fund_inspiration.6512.c + trigger = { + martial > 10 + NOR = { + exists = scope:lover + is_cannibal_trigger = yes + is_male = yes + exists = scope:rival + has_trait = greedy + intrigue > 10 + } + } + skill = martial + add_martial_skill = 1 + add_piety = minor_piety_gain + stress_impact = { + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { #name after your fate god + name = fund_inspiration.6512.d + trigger = { + intrigue > 10 + NOR = { + exists = scope:lover + is_cannibal_trigger = yes + is_male = yes + exists = scope:rival + has_trait = greedy + martial > 10 + } + } + skill = intrigue + add_intrigue_skill = 1 + add_piety = minor_piety_gain + stress_impact = { + arrogant = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #name after your beloved and become their soulmate, possibly + name = fund_inspiration.6512.e + trigger = { exists = scope:lover } + if = { + limit = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:lover } + } + set_relation_soulmate = { reason = soulmate_named_mountain copy_reason = lover target = scope:lover } + } + else = { + reverse_add_opinion = { + target = scope:lover + opinion = 20 + modifier = love_opinion + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + option = { #flex that you like biting things + name = fund_inspiration.6512.f + trigger = { is_cannibal_trigger = yes } + trait = cannibal + add_dread = medium_dread_gain + stress_impact = { + humble = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + + } + + option = { #name after your... ahem... rod + name = fund_inspiration.6512.g + trigger = { + is_male = yes + has_trait = arrogant + } + add_character_modifier = { + modifier = phallic_mountain_modifier + years = 10 + } + stress_impact = { + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.7 + } + } + } + + option = { #name after your rival. that will teach them! + name = fund_inspiration.6512.h + trigger = { exists = scope:rival } + progress_towards_rival_effect = { + REASON = rival_name_inspiration + CHARACTER = scope:rival + OPINION = 0 + } + stress_impact = { + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } + + option = { #force them to lug some rocks home + name = fund_inspiration.6512.i + trigger = { has_trait = greedy } + trait = greedy + scope:mountain_rock = { set_owner = root } + add_character_flag = got_mountain_rock + stress_impact = { + content = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.5 + } + } + } +} + +#################### +# Alchemist + +# Alchemy (Metal) - what subtype? +# by Linnéa Thimrén +fund_inspiration.8001 = { + type = character_event + title = fund_inspiration.8001.t + desc = fund_inspiration.8001.desc + theme = realm + left_portrait = { + character = scope:inspiration_owner + animation = personality_rational + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { #They have already decided what to write about + is_available_ai_adult = yes + exists = var:artifact_alchemy_type + var:artifact_alchemy_type = flag:alchemy_type_metals + NOR = { #These flags are set on the inspiration owner since the sponsor might be sponsoring multiple inspirations at once + exists = var:artifact_alchemy_type_metal_subtype + has_character_flag = had_event_fund_inspiration_8001 + has_character_flag = fund_alchemy_inspiration_event_cooldown + } + } + } + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + scope:inspiration_owner = { + # Very long time-out added since we don't want to risk this triggering again. The flag is removed in the completion effect + add_character_flag = { + flag = had_event_fund_inspiration_8001 + years = 20 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + #Gold + option = { + name = fund_inspiration.8001.a + custom_tooltip = fund_inspiration.8001.a.tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type_metal_subtype + value = flag:gold + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.25 + } + } + } + + #Silver + option = { + name = fund_inspiration.8001.b + custom_tooltip = fund_inspiration.8001.b.tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type_metal_subtype + value = flag:silver + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.25 + } + } + } + + #Mercury + option = { + name = fund_inspiration.8001.c + custom_tooltip = fund_inspiration.8001.c.tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type_metal_subtype + value = flag:mercury + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + #Arsenic + option = { + name = fund_inspiration.8001.d + custom_tooltip = fund_inspiration.8001.d.tt + scope:inspiration_owner = { + set_variable = { + name = artifact_alchemy_type_metal_subtype + value = flag:arsenic + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + } + } + } +} + + +# Get poisoned by a bad alchemist +# by Linnéa Thimrén +fund_inspiration.8011 = { + type = character_event + title = fund_inspiration.8011.t + desc = fund_inspiration.8011.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8011 } + has_no_inspiration_event_cooldown = yes + exists = var:artifact_alchemy_type + OR = { + var:artifact_alchemy_type = flag:alchemy_type_panacea + var:artifact_alchemy_type = flag:alchemy_type_immortality + } + } + } + + weight_multiplier = { + base = 0.1 + + modifier = { #More likely if they're not that bright + add = 0.75 + scope:inspiration_owner = { + has_trait = intellect_bad + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8011 + years = 5 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + add_character_modifier = { #Literally poisoned by gold... + modifier = poisonous_gold_modifier + years = 2 + } + } + + option = { #Forgive + name = fund_inspiration.8011.a + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + } + stress_impact = { + forgiving = medium_stress_impact_loss + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = forgiving + } + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_compassion = 0.5 + } + } + } + + option = { #Imprison + name = fund_inspiration.8011.b + if = { + limit = { exists = scope:inspiration } + end_inspiration_sponsorship = scope:inspiration + } + rightfully_imprison_character_effect = { + TARGET = scope:inspiration_owner + IMPRISONER = root + } + hidden_effect = { #To make sure we threw them in the dungeon + scope:inspiration_owner = { + if = { + limit = { + NOT = { is_in_prison_type = dungeon } + } + change_prison_type = dungeon + } + } + } + stress_impact = { + wrathful = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = vengeful + } + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.25 + } + } + } + + option = { #Execute + name = fund_inspiration.8011.c + hidden_effect = { + if = { + limit = { exists = scope:inspiration } + end_inspiration_sponsorship = scope:inspiration + } + } + scope:inspiration_owner = { + death = { death_reason = death_execution killer = root } + } + execute_opinion_effect = { VICTIM = scope:inspiration_owner EXECUTIONER = root } + stress_impact = { + wrathful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 50 + has_trait = vengeful + } + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_compassion = -0.5 + } + } + } +} + +# Church disproves of you employing an alchemist +# by Linnéa Thimrén +fund_inspiration.8012 = { + type = character_event + title = fund_inspiration.8012.t + desc = fund_inspiration.8012.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + right_portrait = { + character = scope:court_chaplain + animation = anger + } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8012 } + has_no_inspiration_event_cooldown = yes + } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } #Basically the Christian church were the only ones complaining about this + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_physically_able_adult = yes } + } + + weight_multiplier = { + base = 1 + modifier = { #Less likely to fire if the alchemist is zealous + add = -0.75 + scope:inspiration_owner = { + has_trait = zealous + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8012 + years = 5 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + cp:councillor_court_chaplain = { save_scope_as = court_chaplain } + } + + option = { # Fire them + name = fund_inspiration.8012.a + if = { + limit = { exists = scope:inspiration } + end_inspiration_sponsorship = scope:inspiration + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -30 + } + banish = yes # banish_effect not used for unlanded + } + add_piety = minor_piety_gain + scope:court_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.75 + } + } + } + + option = { # Convince the chaplain that it's fine + name = fund_inspiration.8012.b + trigger = { + diplomacy >= high_skill_rating + } + show_as_unavailable = { + diplomacy < high_skill_rating + } + duel = { + skill = diplomacy + value = 8 + 40 = { + desc = fund_inspiration.8012.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = fund_inspiration.8012.b.success + left_icon = scope:court_chaplain + add_character_modifier = { + modifier = inspiration_alchemy_condoned_by_church_modifier + years = 5 + } + } + } + 10 = { + desc = fund_inspiration.8012.b.failure + send_interface_toast = { + title = fund_inspiration.8012.b.failure + left_icon = scope:court_chaplain + scope:court_chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } + } + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + ai_chance = { + base = 100 + } + } + + option = { # No! + name = fund_inspiration.8012.c + add_piety = medium_piety_loss + scope:court_chaplain = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } +} + +# Find a book from famous alchemist Jabir ibn Hayyan from the Islamic Golden Age +# by Linnéa Thimrén +fund_inspiration.8013 = { + type = character_event + title = fund_inspiration.8013.t + desc = fund_inspiration.8013.desc + theme = learning_medicine_focus + right_portrait = scope:inspiration_owner + artifact = { # To display the artifact in the event-window + target = scope:newly_created_artifact + position = lower_center_portrait + } + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8013 } + has_no_inspiration_event_cooldown = yes + } + current_date >= 900.1.1 #Jabir didn't start being mentioned until around here + is_ai = no #Only for players so we don't have too many books lying around + } + + weight_multiplier = { + base = 0.25 + modifier = { + add = 1 + culture = { has_cultural_pillar = heritage_arabic } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8013 + years = 5 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + random_held_title = { + title_tier = county + random_county_province = { + limit = { has_holding = yes } + save_scope_as = barony_market + } + } + hidden_effect = { + random_dummy_gender_effect = yes #Since the author will not be set + random_list = { #To create one of Jabir ibn Hayyan's books + 10 = { + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:the_great_book_of_mercy + } + } + 10 = { + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:alchemy + SET_TOPIC = flag:the_book_of_seventy + } + } + } + } + } + + option = { #Study it + name = fund_inspiration.8013.a + custom_tooltip = fund_inspiration.8013.a_tt + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = scholar + has_lifestyle = learning_lifestyle + } + } + ai_value_modifier = { + ai_greed = -0.25 + } + } + } + + option = { #Give it to alchemist + name = fund_inspiration.8013.b + custom_tooltip = fund_inspiration.8013.b_tt + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 4 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 0 + REASON = friend_given_book + } + } + } + hidden_effect = { + scope:newly_created_artifact = { + set_owner = { + target = scope:inspiration_owner + history = { + location = root.capital_province + actor = root + recipient = scope:inspiration_owner + type = given + } + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.25 + ai_compassion = 0.25 + } + } + } + + option = { #Sell it + name = fund_inspiration.8013.c + hidden_effect = { destroy_artifact = scope:newly_created_artifact } + add_gold = medium_gold_value + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + } + modifier = { + gold < 0 + add = 100 + } + } + } + + after = { + #To clean up variables set when creating the book + if = { + limit = { has_variable = book_artifact_subject } + remove_variable = book_artifact_subject + } + if = { + limit = { has_variable = book_artifact_topic } + remove_variable = book_artifact_topic + } + if = { + limit = { has_variable = quality } + remove_variable = quality + } + if = { + limit = { has_variable = wealth } + remove_variable = wealth + } + } +} + +# Alchemist never produces anything, just _thinks_ and ponders reality and the nature of matter +# by Linnéa Thimrén +fund_inspiration.8014 = { + type = character_event + title = fund_inspiration.8014.t + desc = fund_inspiration.8014.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8014 } + has_no_inspiration_event_cooldown = yes + } + } + + weight_multiplier = { + base = 0.5 + + modifier = { #More likely if they're not that bright + add = 1 + scope:inspiration_owner = { + has_trait = intellect_bad + } + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8014 + years = 5 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + } + + option = { #Get to work!! + name = fund_inspiration.8014.a + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = -2 + } + } + } + stress_impact = { + impatient = minor_stress_impact_loss + patient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = impatient + } + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { #Take your time + name = fund_inspiration.8014.b + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + scope:inspiration = { + change_inspiration_progress = -3 + } + } + stress_impact = { + impatient = medium_stress_impact_gain + patient = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = patient + } + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #Fire them + name = fund_inspiration.8014.c + custom_tooltip = fund_inspiration.8014.c.tt + add_gold = medium_gold_value + end_inspiration_sponsorship = scope:inspiration + #To clean out flags and stuff + inspiration_completion_effect = yes + stress_impact = { + compassionate = medium_stress_impact_gain + wrathful = medium_stress_impact_loss + } + ai_chance = { + base = 0 + } + } +} + + +# Plead with alchemist to resurrect family member/friend +# by Linnéa Thimrén +fund_inspiration.8015 = { + type = character_event + title = fund_inspiration.8015.t + desc = fund_inspiration.8015.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + right_portrait = scope:loved_one + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + NOT = { has_trait = callous } + OR = { #Someone you cared about a lot has died + exists = var:mourning_parent + exists = var:mourning_soulmate + exists = var:mourning_friend + } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8015 } + has_no_inspiration_event_cooldown = yes + } + } + + weight_multiplier = { + base = 1 + compare_modifier = { + value = ai_rationality + multiplier = -0.1 + } + modifier = { + add = -0.75 + has_trait = zealous + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8015 + years = 10 + } + + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + if = { + limit = { + exists = var:mourning_parent + } + var:mourning_parent = { save_scope_as = loved_one } + } + else_if = { + limit = { + exists = var:mourning_soulmate + } + var:mourning_soulmate = { save_scope_as = loved_one } + } + else_if = { + limit = { + exists = var:mourning_friend + } + var:mourning_friend = { save_scope_as = loved_one } + } + } + + option = { #Talk instead + name = fund_inspiration.8015.a + add_stress = medium_stress_loss + stress_impact = { + arrogant = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + option = { #Demand it! + name = fund_inspiration.8015.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + } + custom_tooltip = fund_inspiration.8015.b.tt + trigger_event = { + id = fund_inspiration.8016 + days = { 3 7 } + } + stress_impact = { + gregarious = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 50 + has_trait = arrogant + } + ai_value_modifier = { + ai_rationality = -0.25 + ai_boldness = 0.25 + } + } + } +} + + +# Follow-up event +# by Linnéa Thimrén +fund_inspiration.8016 = { + type = character_event + title = fund_inspiration.8015.t + desc = fund_inspiration.8016.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + right_portrait = scope:loved_one + + trigger = { + exists = scope:inspiration + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + exists = scope:inspiration_owner + scope:inspiration_owner = { + is_physically_able = yes + } + exists = scope:loved_one + } + + immediate = { + add_stress = medium_stress_gain + } + + option = { #Ugh + name = fund_inspiration.8016.a + stress_impact = { + arrogant = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + option = { #Imprison them + name = fund_inspiration.8016.b + rightfully_imprison_character_effect = { + TARGET = scope:inspiration_owner + IMPRISONER = root + } + ai_chance = { + base = 10 + modifier = { + add = 50 + has_trait = wrathful + } + ai_value_modifier = { + ai_rationality = -0.25 + ai_boldness = 0.25 + } + } + } +} + + +# Helping the court tutor +# by Linnéa Thimrén +scripted_trigger fund_inspiration_8017_court_tutor_scripted_trigger= { + is_available_ai_adult = yes + NOT = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:inspiration_owner } } +} + +fund_inspiration.8017 = { + type = character_event + title = fund_inspiration.8017.t + desc = fund_inspiration.8017.desc + theme = learning_medicine_focus + left_portrait = scope:inspiration_owner + right_portrait = scope:court_tutor + + cooldown = { days = 1825 } + + trigger = { + scope:inspiration = { has_inspiration_type = alchemy_inspiration } + scope:inspiration_owner = { + NOT = { has_character_flag = had_event_fund_inspiration_8017 } + has_no_inspiration_event_cooldown = yes + } + employs_court_position = court_tutor_court_position + any_court_position_holder = { + type = court_tutor_court_position + fund_inspiration_8017_court_tutor_scripted_trigger = yes + } + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = had_event_fund_inspiration_8017 + years = 10 + } + #To stagger any following events + add_character_flag = { + flag = fund_alchemy_inspiration_event_cooldown + days = { 30 60 } + } + } + random_court_position_holder = { + type = court_tutor_court_position + limit = { + fund_inspiration_8017_court_tutor_scripted_trigger = yes + } + save_scope_as = court_tutor + } + } + + option = { # Encourage them + name = fund_inspiration.8017.a + scope:court_tutor = { + add_learning_skill = 1 + progress_towards_friend_effect = { + CHARACTER = scope:inspiration_owner + OPINION = 0 + REASON = friend_shared_knowledge + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.25 + } + } + } + + option = { # Back to work!! + name = fund_inspiration.8017.b + scope:inspiration_owner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + } + scope:court_tutor = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + } + if = { #To make sure that the inspiration hasn't been removed + limit = { + exists = scope:inspiration + } + scope:inspiration_owner = { + change_artifact_quality_effect = { + AMOUNT = 2 + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + wrathful = medium_stress_impact_loss + diligent = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = -0.2 + ai_boldness = 0.2 + } + } + } +} + + +# Add a dedication +# by Claudia Baldassi + +fund_inspiration.7001 = { + type = character_event + title = fund_inspiration.7001.t + desc = fund_inspiration.7001.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + lower_left_portrait = scope:dedication_a + lower_center_portrait = scope:dedication_b + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + exists = primary_spouse + add = 1 + } + modifier = { + any_close_family_member = { + only_if_dead = yes + days_since_death <= 365 + } + add = 1 + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + if = { + limit = { + primary_spouse ?= { + NOR = { + has_relation_rival = root + has_relation_nemesis = root + } + } + } + primary_spouse = { + save_scope_as = dedication_a + } + } + if = { + limit = { + any_close_family_member = { + only_if_dead = yes + days_since_death <= 365 + } + } + random_close_family_member = { + only_if_dead = yes + limit = { + days_since_death <= 365 + } + save_scope_as = dedication_b + } + } + } + + #Option A: spouse + option = { + name = fund_inspiration.7001.a + trigger = { + exists = scope:dedication_a + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_a_var + value = scope:dedication_a + } + } + reverse_add_opinion = { + target = scope:dedication_a + modifier = grateful_opinion + opinion = 40 + } + ai_chance = { + base = 100 + modifier = { + has_trait = family_first + add = 100 + } + modifier = { + has_trait = gregarious + add = 50 + } + modifier = { + has_focus = intrigue_temptation_focus + add = 50 + } + modifier = { + scope:dedication_a = { has_any_bad_relationship_with_root_trigger = yes } + add = -100 + } + } + } + + #Option B: dead relative + option = { + name = fund_inspiration.7001.b + trigger = { + exists = scope:dedication_b + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_b_var + value = scope:dedication_b + } + } + dynasty = { add_dynasty_prestige = medium_dynasty_prestige_gain } + ai_chance = { + base = 100 + } + } + + #Option C: God + option = { + name = fund_inspiration.7001.c + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_var + value = flag:dedication_c + } + } + add_piety = major_piety_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option D: no one + option = { + name = fund_inspiration.7001.d + add_prestige = medium_prestige_gain + ai_chance = { + base = 80 + } + } +} + +fund_inspiration.7002 = { + type = character_event + title = fund_inspiration.7001.t + desc = fund_inspiration.7001.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + lower_left_portrait = scope:dedication_a + lower_center_portrait = scope:dedication_b + lower_right_portrait = scope:dedication_d + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + OR = { + any_relation = { + type = lover + } + exists = var:mourning_soulmate + } + } + + weight_multiplier = { + base = 1 + modifier = { + exists = var:mourning_soulmate + add = 2 + } + modifier = { + any_relation = { + type = lover + } + add = 1 + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + if = { + limit = { + any_relation = { + type = soulmate + NOT = { + any_secret = { + type = secret_lover + secret_target = root + } + } + } + } + random_relation = { + type = soulmate + limit = { + NOT = { + any_secret = { + type = secret_lover + secret_target = root + } + } + } + save_scope_as = dedication_a + } + } + else_if = { + limit = { + any_relation = { + type = lover + NOT = { + any_secret = { + type = secret_lover + secret_target = root + } + } + } + } + random_relation = { + type = lover + limit = { + NOT = { + any_secret = { + type = secret_lover + secret_target = root + } + } + } + save_scope_as = dedication_a + } + } + if = { + limit = { + exists = var:mourning_soulmate + } + var:mourning_soulmate = { + save_scope_as = dedication_b + } + } + if = { + limit = { + any_relation = { + type = soulmate + any_secret = { + type = secret_lover + secret_target = root + } + } + } + random_relation = { + type = soulmate + limit = { + any_secret = { + type = secret_lover + secret_target = root + } + } + save_scope_as = dedication_d + } + } + else_if = { + limit = { + any_relation = { + type = lover + any_secret = { + type = secret_lover + secret_target = root + } + } + } + random_relation = { + type = lover + limit = { + any_secret = { + type = secret_lover + secret_target = root + } + } + save_scope_as = dedication_d + } + } + if = { + limit = { + exists = scope:dedication_d + } + scope:dedication_d = { + random_secret = { + type = secret_lover + limit = { + secret_target = root + } + save_scope_as = lover_secret + } + } + } + } + + #Option A: public soulmate/lover + option = { + name = fund_inspiration.7001.a + trigger = { + exists = scope:dedication_a + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_a_var + value = scope:dedication_a + } + } + reverse_add_opinion = { + target = scope:dedication_a + modifier = grateful_opinion + opinion = 40 + } + ai_chance = { + base = 100 + modifier = { + has_focus = intrigue_temptation_focus + add = 50 + } + } + } + + #Option B: memory of lost soulmate + option = { + name = fund_inspiration.7001.b + trigger = { + exists = scope:dedication_b + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_b_var + value = scope:dedication_b + } + } + add_piety = medium_piety_gain + ai_chance = { + base = 125 + } + } + + #Option C: go public with soulmate/lover + option = { + name = fund_inspiration.7002.c + trigger = { + exists = scope:dedication_d + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_d_var + value = scope:dedication_d + } + } + if = { + limit = { + scope:dedication_d = { + is_married = no + } + } + reverse_add_opinion = { + target = scope:dedication_d + modifier = grateful_opinion + opinion = 40 + } + } + else = { + reverse_add_opinion = { + target = scope:dedication_d + modifier = angry_opinion + opinion = -30 + } + } + scope:lover_secret = { + expose_secret = root + } + ai_chance = { + base = 50 + modifier = { + has_trait = honest + add = 100 + } + } + } + + #Option D: none + option = { + name = fund_inspiration.7001.d + add_prestige = medium_prestige_gain + ai_chance = { + base = 80 + } + } +} + +fund_inspiration.7003 = { + type = character_event + title = fund_inspiration.7003.t + desc = { + desc = fund_inspiration.7003.desc + triggered_desc = { + trigger = { exists = scope:dedication_e } + desc = fund_inspiration.7003.desc_e + } + triggered_desc = { + trigger = { exists = scope:dedication_f } + desc = fund_inspiration.7003.desc_f + } + desc = fund_inspiration.7003.desc_end + } + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + lower_left_portrait = scope:dedication_e + lower_center_portrait = scope:dedication_f + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + OR = { + any_relation = { + type = potential_friend + } + any_relation = { + type = potential_lover + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_relation = { + type = potential_friend + } + any_relation = { + type = potential_lover + } + add = 2 + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + if = { + limit = { + any_relation = { + type = potential_friend + } + } + random_relation = { + type = potential_friend + save_scope_as = dedication_e + } + } + if = { + limit = { + any_relation = { + type = potential_lover + NAND = { + exists = scope:dedication_e + this = scope:dedication_e + } + } + } + random_relation = { + type = potential_lover + limit = { + NAND = { + exists = scope:dedication_e + this = scope:dedication_e + } + } + save_scope_as = dedication_f + } + } + } + + #Option A: potential friend + option = { + name = fund_inspiration.7003.a + trigger = { + exists = scope:dedication_e + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_e_var + value = scope:dedication_e + } + } + scope:dedication_e = { + set_relation_friend = { reason = friend_dedicated_artifact target = root } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = gregarious + add = 50 + } + } + } + + #Option B: potential lover + option = { + name = fund_inspiration.7003.b + trigger = { + exists = scope:dedication_f + } + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_f_var + value = scope:dedication_f + } + } + scope:dedication_f = { + set_relation_lover = { reason = lover_dedicated_artifact target = root involved_character = scope:inspiration_owner } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + ai_chance = { + base = 100 + modifier = { + has_focus = intrigue_temptation_focus + add = 50 + } + } + } + + #Option C: no + option = { + name = fund_inspiration.7003.c + ai_chance = 80 + } +} + +fund_inspiration.7004 = { + type = character_event + title = fund_inspiration.7004.t + desc = fund_inspiration.7004.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + lower_left_portrait = scope:dedication_g1 + lower_center_portrait = scope:dedication_g2 + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + any_vassal = { + count >= 2 + is_powerful_vassal = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_vassal = { + has_any_bad_relationship_with_root_trigger = yes + is_powerful_vassal = yes + } + add = 1 + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + random_vassal = { + limit = { + is_powerful_vassal = yes + } + save_scope_as = dedication_g1 + } + random_vassal = { + limit = { + is_powerful_vassal = yes + this != scope:dedication_g1 + } + save_scope_as = dedication_g2 + } + } + + #Option A: vassals + option = { + name = fund_inspiration.7004.a + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_g1_var + value = scope:dedication_g1 + } + set_variable = { + name = artifact_dedication_g2_var + value = scope:dedication_g2 + } + } + reverse_add_opinion = { + target = scope:dedication_g1 + modifier = grateful_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:dedication_g2 + modifier = grateful_opinion + opinion = 50 + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = 50 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + #Option B: just me + option = { + name = fund_inspiration.7004.b + add_prestige = medium_prestige_gain + scope:inspiration_owner = { + set_variable = { + name = artifact_dedication_h_var + value = flag:dedication_h + } + } + stress_impact = { + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -50 + } + modifier = { + has_trait = arrogant + add = 50 + } + } + } + + #Option C: no one + option = { + name = fund_inspiration.7004.c + add_piety = medium_piety_gain + ai_chance = { + base = 80 + } + } +} + +# Add your family motto +fund_inspiration.7010 = { + type = character_event + title = fund_inspiration.7010.t + desc = fund_inspiration.7010.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + has_inspiration_type = adventure_inspiration + has_inspiration_type = alchemy_inspiration + inspiration_owner = { has_variable = banner_commission } + } + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_dedication_var + } + } + + #Option A: family motto + option = { + name = fund_inspiration.7010.a + scope:inspiration_owner = { + set_variable = artifact_inscribe_motto_var + } + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_gain } + ai_chance = { + base = 100 + modifier = { + has_trait = family_first + add = 100 + } + modifier = { + has_focus = diplomacy_majesty_focus + add = 50 + } + } + } + + #Option B: no need + option = { + name = fund_inspiration.7010.b + add_piety = medium_piety_gain + ai_chance = { + base = 80 + modifier = { + has_trait = humble + add = 50 + } + } + } +} + +# Choose a theme for modifiers - weapons and armor +fund_inspiration.7100 = { + type = character_event + title = fund_inspiration.7100.t + desc = fund_inspiration.7100.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + } + OR = { + has_inspiration_type = weapon_inspiration + has_inspiration_type = armor_inspiration + } + } + trigger_if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_weapon_type } + NOT = { + culture = { has_cultural_parameter = may_commission_kris } # daggers for this culture hold significant value + } + } + NOT = { scope:inspiration_owner.var:artifact_weapon_type = flag:artifact_weapon_type_dagger } + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_mod_choice_var + } + } + + #Option A: + option = { + name = fund_inspiration.7100.a + scope:inspiration_owner = { set_variable = chosen_casualties_mod } + custom_tooltip = fund_inspiration.7100.a.tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: raid + option = { + name = fund_inspiration.7100.b + trigger = { + can_raid_trigger = yes + } + scope:inspiration_owner = { set_variable = chosen_raid_mod } + custom_tooltip = fund_inspiration.7100.b.tt + ai_chance = { + base = 150 + } + } + + #Option C: knights + option = { + name = fund_inspiration.7100.c + scope:inspiration_owner = { set_variable = chosen_knights_mod } + custom_tooltip = fund_inspiration.7100.c.tt + ai_chance = { + base = 100 + modifier = { + has_trait = brave + add = 50 + } + modifier = { + has_focus = martial_chivalry_focus + add = 50 + } + } + } + + #Option D: terrain advantage + option = { + name = fund_inspiration.7100.d + trigger = { + scope:inspiration = { has_inspiration_type = weapon_inspiration } + } + scope:inspiration_owner = { set_variable = chosen_terrain_mod } + custom_tooltip = fund_inspiration.7100.d.tt + ai_chance = { + base = 100 + } + } + + #Option E: whatever + option = { + name = fund_inspiration.7100.e + custom_tooltip = fund_inspiration.7100.e.tt + ai_chance = { + base = 80 + } + } +} + +# Choose a theme for modifiers - regalia/crowns +fund_inspiration.7110 = { + type = character_event + title = fund_inspiration.7100.t + desc = fund_inspiration.7100.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + } + has_inspiration_type = smith_inspiration + } + trigger_if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_smith_type } + } + NOR = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_brooch + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_goblet + } + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_mod_choice_var + } + } + + #Option A: independent ruler opinion + option = { + name = fund_inspiration.7110.a + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_crown + } + scope:inspiration_owner = { set_variable = chosen_ind_ruler_mod } + custom_tooltip = fund_inspiration.7110.a.tt + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = august + add = 50 + } + modifier = { + has_focus = diplomacy_majesty_focus + add = 50 + } + } + } + + #Option B: dynasty + option = { + name = fund_inspiration.7110.b + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + scope:inspiration_owner = { set_variable = chosen_dynasty_mod } + custom_tooltip = fund_inspiration.7110.b.tt + ai_chance = { + base = 100 + modifier = { + has_trait = family_first + add = 50 + } + modifier = { + has_focus = diplomacy_family_focus + add = 50 + } + } + } + + #Option C: dread/tyranny + option = { + name = fund_inspiration.7110.c + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + scope:inspiration_owner = { set_variable = chosen_dread_mod } + custom_tooltip = fund_inspiration.7110.c.tt + ai_chance = { + base = 100 + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 50 + } + modifier = { + has_trait = compassionate + add = -100 + } + modifier = { + has_focus = intrigue_intimidation_focus + add = 50 + } + } + } + + #Option D: attraction + option = { + name = fund_inspiration.7110.d + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_regalia + } + scope:inspiration_owner = { set_variable = chosen_attraction_mod } + custom_tooltip = fund_inspiration.7110.d.tt + ai_chance = { + base = 100 + modifier = { + has_trait = seducer + add = 50 + } + modifier = { + has_trait = lustful + add = 50 + } + modifier = { + has_trait = chaste + add = -100 + } + modifier = { + has_focus = intrigue_temptation_focus + add = 50 + } + } + } + + #Option E: vassals + option = { + name = fund_inspiration.7110.e + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_crown + } + scope:inspiration_owner = { set_variable = chosen_vassals_mod } + custom_tooltip = fund_inspiration.7110.e.tt + ai_chance = { + base = 100 + modifier = { + has_trait = gregarious + add = 50 + } + modifier = { + has_focus = stewardship_domain_focus + add = 50 + } + } + } + + #Option G: courtier and guest opinion + option = { + name = fund_inspiration.7110.g + trigger = { + scope:inspiration_owner.var:artifact_smith_type = flag:smith_type_crown + } + scope:inspiration_owner = { set_variable = chosen_court_op_mod } + custom_tooltip = fund_inspiration.7110.g.tt + ai_chance = { + base = 100 + } + } + + #Option F: whatever + option = { + name = fund_inspiration.7100.e + custom_tooltip = fund_inspiration.7100.e.tt + ai_chance = { + base = 80 + } + } +} + +# Choose a theme for modifiers - sculpture/throne +fund_inspiration.7120 = { + type = character_event + title = fund_inspiration.7100.t + desc = fund_inspiration.7100.desc + theme = realm + + left_portrait = { + character = scope:inspiration_owner + animation = personality_bold + } + + right_portrait = { + character = root + animation = happiness + } + + trigger = { + exists = scope:inspiration + scope:inspiration = { + NOR = { + has_variable = inspiration_dedication_var + has_variable = inspiration_mod_choice_var + } + has_inspiration_type = artisan_inspiration + } + trigger_if = { + limit = { + scope:inspiration_owner = { has_variable = artifact_artisan_type } + } + scope:inspiration_owner.var:artifact_artisan_type = flag:artisan_type_sculpture + scope:inspiration_owner.var:artifact_artisan_type = flag:artisan_type_throne + } + } + + immediate = { + scope:inspiration = { + set_variable = inspiration_mod_choice_var + } + } + + #Option A: short reign + option = { + name = fund_inspiration.7120.a + trigger = { has_royal_court = yes } + scope:inspiration_owner = { set_variable = chosen_reign_mod } + custom_tooltip = fund_inspiration.7120.a.tt + ai_chance = { + base = 100 + modifier = { + has_trait = shy + add = 100 + } + modifier = { + has_trait = craven + add = 100 + } + modifier = { + has_trait = paranoid + add = 100 + } + } + } + + #Option B: dynasty + option = { + name = fund_inspiration.7110.b + scope:inspiration_owner = { set_variable = chosen_dynasty_mod } + custom_tooltip = fund_inspiration.7110.b.tt + ai_chance = { + base = 100 + modifier = { + has_trait = family_first + add = 50 + } + modifier = { + has_focus = diplomacy_family_focus + add = 50 + } + } + } + + #Option C: dread/tyranny + option = { + name = fund_inspiration.7110.c + scope:inspiration_owner = { set_variable = chosen_dread_mod } + custom_tooltip = fund_inspiration.7110.c.tt + ai_chance = { + base = 100 + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 50 + } + modifier = { + has_trait = compassionate + add = -100 + } + modifier = { + has_focus = intrigue_intimidation_focus + add = 50 + } + } + } + + #Option E: whatever + option = { + name = fund_inspiration.7100.e + custom_tooltip = fund_inspiration.7100.e.tt + ai_chance = { + base = 100 + } + } +} diff --git a/N3OW/events/dlc/ep1/ep1_fund_inspiration_events_oltner.txt b/N3OW/events/dlc/ep1/ep1_fund_inspiration_events_oltner.txt new file mode 100644 index 00000000..ef1170fa --- /dev/null +++ b/N3OW/events/dlc/ep1/ep1_fund_inspiration_events_oltner.txt @@ -0,0 +1,483 @@ +namespace = fund_inspiration + +# Adventurer fights a bandit +# Adventurer travels through beast-infested terrain + +# Adventurer fights a bandit +fund_inspiration.9000 = { + type = character_event + title = fund_inspiration.9000.t + desc = fund_inspiration.9000.desc + theme = war + + left_portrait = { + character = scope:adventurer + animation = worry + } + + right_portrait = { + character = scope:bandit + animation = throne_room_one_handed_passive_1 + } + + override_background = { + reference = wilderness_scope + } + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOR = { + has_character_flag = fund_adventure_inspiration_event_cooldown + } + exists = location + any_pool_character = { + province = scope:inspiration_owner.location + is_available_ai_adult = yes + } + } + } + + immediate = { + scope:inspiration_owner = { + save_scope_as = adventurer + location.barony.title_province = { save_scope_as = background_wilderness_scope } + random_pool_character = { + province = location.barony.title_province + limit = { + is_available_ai_adult = yes + } + weight = { + base = 10 + modifier = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = THIS } + add = 100 + } + } + save_scope_as = bandit + } + } + } + option = { + name = fund_inspiration.9000.a + + scope:adventurer = { + duel = { + skill = intrigue + target = scope:bandit + 2 = { + desc = fund_inspiration.9000.a.critical_success + compare_modifier = { + value = scope:duel_value + } + root = { + send_interface_toast = { + title = fund_inspiration.9000.a.critical_success + left_icon = scope:adventurer + scope:inspiration = { change_inspiration_progress = 2 } + scope:bandit = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + hidden_effect = { # The adventurer also gains some gold! + scope:bandit = { + pay_short_term_gold = { + target = scope:adventurer + gold = medium_gold_value + } + } + } + } + } + } + 8 = { + desc = fund_inspiration.9000.a.success + compare_modifier = { + value = scope:duel_value + } + root = { + send_interface_toast = { + title = fund_inspiration.9000.a.success + left_icon = scope:adventurer + scope:inspiration = { change_inspiration_progress = 1 } + } + } + } + 8 = { + desc = fund_inspiration.9000.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = fund_inspiration.9000.a.failure + left_icon = scope:adventurer + scope:adventurer = { + increase_wounds_effect = { REASON = fight } + } + scope:inspiration = { change_inspiration_progress = -2 } + } + } + } + } + } + + ai_chance = { + base = 4 + modifier = { + add = scope:adventurer.intrigue + } + modifier = { + add = { + value = scope:bandit.intrigue + multiply = -1 + } + } + } + } + option = { + name = fund_inspiration.9000.b + + scope:adventurer = { + duel = { + skill = prowess + target = scope:bandit + 1 = { + desc = fund_inspiration.9000.b.critical_success + compare_modifier = { + value = scope:duel_value + } + root = { + send_interface_toast = { + title = fund_inspiration.9000.b.critical_success + left_icon = scope:adventurer + scope:adventurer = { + if = { + limit = { + NOR = { + has_trait = compassionate + ai_compassion >= high_positive_ai_value + } + } + hidden_effect = { + scope:bandit = { + death = { + death_reason = death_duel + killer = scope:adventurer + } + } + } + custom_tooltip = fund_inspiration.9000.b.boil_skull + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + root = { + hidden_effect_new_object = { + create_artifact_pedestal_human_skull_effect = { + OWNER = root + CREATOR = scope:adventurer + DESKULLED = scope:bandit + } + scope:newly_created_artifact = { + set_artifact_description = artifact_bandit_skull + } + } + } + } + else = { + scope:bandit = { + death = { + death_reason = death_duel + killer = scope:adventurer + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 4 } + } + scope:inspiration = { change_inspiration_progress = 1 } + } + } + } + } + } + } + 11 = { + desc = fund_inspiration.9000.b.success + compare_modifier = { + value = scope:duel_value + } + root = { + send_interface_toast = { + title = fund_inspiration.9000.b.success + left_icon = scope:adventurer + scope:adventurer = { + scope:bandit = { + increase_wounds_effect = { REASON = fight } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + } + } + 8 = { + desc = fund_inspiration.9000.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = fund_inspiration.9000.b.failure + left_icon = scope:adventurer + scope:adventurer = { + increase_wounds_effect = { REASON = fight } + } + } + } + } + 1 = { + desc = fund_inspiration.9000.b.critical_failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = fund_inspiration.9000.b.critical_failure + left_icon = scope:adventurer + scope:adventurer = { + death = { + death_reason = death_duel + killer = scope:bandit + } + } + } + } + } + } + } + + ai_chance = { + base = 4 + modifier = { + add = scope:adventurer.prowess + } + modifier = { + add = { + value = scope:bandit.prowess + multiply = -1 + } + } + } + } + option = { + name = fund_inspiration.9000.c + pay_short_term_gold = { + target = scope:bandit + gold = minor_gold_value + } + ai_chance = { + base = 8 + + modifier = { + factor = 2 + ai_compassion >= medium_positive_ai_value + } + + modifier = { + factor = 0.1 + OR = { + has_trait = stubborn + has_trait = wrathful + has_trait = greedy + } + } + + modifier = { + factor = 0 + gold < 0 + } + } + } +} + +# Adventurer travels through beast-infested terrain +fund_inspiration.9100 = { + type = character_event + title = fund_inspiration.9100.t + desc = fund_inspiration.9100.desc + theme = war + + left_portrait = { + character = scope:adventurer + scripted_animation = duel_wield_weapon + } + + override_background = { + reference = wilderness_scope + } + + cooldown = { years = 5 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + exists = var:adventure_destination + exists = var:adventure_type + NOR = { + has_character_flag = fund_adventure_inspiration_event_cooldown + has_trait = humble + has_trait = content + } + exists = location + } + } + + immediate = { + scope:inspiration_owner = { + save_scope_as = adventurer + location.barony.title_province = { save_scope_as = background_wilderness_scope } + scope:adventurer = { + select_local_animal_effect = { TYPE = dangerous } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + } + } + option = { + name = fund_inspiration.9100.a + + scope:adventurer = { + duel = { + skill = learning + value = 8 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + + desc = fund_inspiration.9100.a.success + root = { + send_interface_toast = { + title = fund_inspiration.9100.a.success + left_icon = scope:adventurer + scope:inspiration = { change_inspiration_progress = 2 } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fund_inspiration.9100.a.failure + send_interface_toast = { + title = fund_inspiration.9100.a.failure + left_icon = scope:adventurer + root = { + scope:adventurer = { + increase_wounds_effect = { REASON = fight } + } + } + } + } + } + } + + ai_chance = { + base = 4 + modifier = { + add = scope:adventurer.learning + } + } + } + option = { + name = fund_inspiration.9100.b + + scope:adventurer = { + duel = { + skill = prowess + value = 8 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + + desc = fund_inspiration.9100.b.success + root = { + send_interface_toast = { + title = fund_inspiration.9100.b.success + left_icon = scope:adventurer + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 3 } + } + scope:inspiration = { change_inspiration_progress = 1 } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fund_inspiration.9100.b.failure + root = { + send_interface_toast = { + title = fund_inspiration.9100.b.failure + left_icon = scope:adventurer + scope:adventurer = { + increase_wounds_effect = { REASON = fight } + random = { + chance = 25 + custom_tooltip = fund_inspiration.9100.b.maimed + hidden_effect = { + maimed_in_battle_effect = yes + } + } + } + } + } + } + } + } + + ai_chance = { + base = 4 + modifier = { + add = scope:adventurer.prowess + } + } + } + option = { + name = fund_inspiration.9100.c + + scope:inspiration = { change_inspiration_progress = -1 } + + ai_chance = { + base = 4 + + modifier = { + factor = 2 + ai_compassion >= medium_positive_ai_value + } + } + } +} diff --git a/N3OW/events/dlc/ep1/ep1_inspiration_system_events.txt b/N3OW/events/dlc/ep1/ep1_inspiration_system_events.txt new file mode 100644 index 00000000..2bd1d5ab --- /dev/null +++ b/N3OW/events/dlc/ep1/ep1_inspiration_system_events.txt @@ -0,0 +1,146 @@ +namespace = inspiration_system + +################################################## +# Inspiration Generation +# Checks how many inspirations currently exist and, if there are not enough, generates new ones for pool characters. +# by Sean Hughes +# 0005 +################################################## + +inspiration_system.0005 = { + scope = none + hidden = yes + + trigger = { + has_ep1_dlc_trigger = yes + + num_world_inspired_characters_value < ideal_total_world_inspirations + } + + immediate = { + set_local_variable = { + name = try_create_inspiration_attempts + value = max_new_inspirations_per_year_value + } + + while = { + limit = { + AND = { + local_var:try_create_inspiration_attempts > 0 + num_world_inspired_characters_value < ideal_total_world_inspirations + } + } + grant_new_inspiration_in_world_effect = yes + change_local_variable = { + name = try_create_inspiration_attempts + subtract = 1 + } + } + } +} + +################################################## +# Inspired Character Maintenance +# Every Royal Court owner occasionally checks guests who have an Inspiration and, if unsponsored, moves them to a different Royal Court +# by Sean Hughes +# 1001-1101 +################################################## + +inspiration_system.1001 = { + hidden = yes + + trigger = { + has_ep1_dlc_trigger = yes + } + + immediate = { + every_pool_guest = { + limit = { + exists = inspiration + NOR = { + # Inspiration is not currently being sponsored + inspiration = { exists = inspiration_sponsor } + # Has not arrived at our court in the last X months (defined in 00_ep1_script_values.txt ) + has_character_flag = inspired_character_recent_arrival + } + } + if = { + limit = { + inspiration = { + days_since_creation > 3650 + } + } + # Destroy our inspiration, since nobody seems interested in sponsoring it. + trigger_event = inspiration_system.1101 + } + else = { + # Look for a new royal court to visit. + inspired_character_seek_out_new_royal_court_effect = yes + } + } + } +} + +# After going an extended period of time without being recruited or having their Inspiration sponsored, characters lose it in order to make room for new Inspired characters in the pool. +inspiration_system.1101 = { + hidden = yes + + immediate = { + destroy_inspiration = inspiration + move_to_pool = yes + + # Unrealized potential is tough on people. + random_list = { + 25 = { + add_trait = depressed_1 + add_stress = minor_stress_gain + } + 25 = { + trigger = { can_be_drunkard = yes } + add_trait = drunkard + add_stress = minor_stress_gain + } + 25 = { + trigger = { can_be_hashishiyah = yes } + add_trait = hashishiyah + add_stress = minor_stress_gain + } + 50 = { + add_stress = major_stress_gain + } + } + } +} + +inspiration_system.1200 = { # Courtier becomes Adventurer + type = character_event + hidden = yes + + trigger = { + scope:antiquarian_from_task ?= { + has_court_position = antiquarian_court_position + } + scope:adventure_target ?= { + is_physically_able_adult = yes + NOR = { + exists = inspiration + has_court_position = antiquarian_court_position + } + adventure_inspiration_average_skill_value >= medium_inspiration_skill + host ?= root + } + } + + immediate = { + send_interface_toast = { + type = msg_court_inspiration + left_icon = scope:adventure_target + right_icon = scope:antiquarian_from_task + title = antiquarian_inspired_adventurer_message + desc = antiquarian_inspired_adventurer_effect + scope:adventure_target = { + create_inspiration = adventure_inspiration + } + } + } +} diff --git a/N3OW/events/dlc/ep2/ep2_accolade_events.txt b/N3OW/events/dlc/ep2/ep2_accolade_events.txt new file mode 100644 index 00000000..aec90676 --- /dev/null +++ b/N3OW/events/dlc/ep2/ep2_accolade_events.txt @@ -0,0 +1,1200 @@ +namespace = ep2_accolade_events + +############################ +## Accolade Events +## 0200-999 +## by Jason Cantalini +############################ + +# ep2_accolade_events.0100 - Hunter gives you and/or your heir the hunter trait +# ep2_accolade_events.0200 - Blademaster gives you and/or your heir the Blademaster trait +# ep2_accolade_events.0300 - Master of Revels gives you and/or your heir the Reveler trait + +scripted_trigger ep2_accolade_events_0100_hunting_knight_trigger = { + accolade ?= { + is_accolade_active = yes + has_accolade_parameter = acclaimed_knight_trains_hunting + } + is_healthy = yes + is_imprisoned = no + OR = { + AND = { + is_available = yes + root = { is_available = yes } + } + AND = { + is_available = yes + root.primary_heir ?= { is_available = yes } + } + location = root.location + root.primary_heir.location ?= location + } +} + +# Huntsmaster shares the Hunter trait with your line +ep2_accolade_events.0100 = { + type = character_event + title = ep2_accolade_events.0100.t + desc = { + desc = ep2_accolade_events.0100.desc + first_valid = { + triggered_desc = { + trigger = { + scope:new_hunter = { + this = root + } + scope:new_hunter_2 = { + this = root.primary_heir + } + } + desc = ep2_accolade_events.0100.desc.both + } + triggered_desc = { + trigger = { + scope:new_hunter = { + this = root.primary_heir + } + } + desc = ep2_accolade_events.0100.desc.heir + } + triggered_desc = { + trigger = { + scope:new_hunter = { + this = root + } + } + desc = ep2_accolade_events.0100.desc.liege + } + } + } + theme = hunt_activity + left_portrait = { + character = scope:new_hunter + animation = hunting_horn + } + right_portrait = { + character = scope:huntsmaster + animation = war_over_win + } + lower_right_portrait = { + character = scope:new_hunter_2 + } + + trigger = { + has_dlc_feature = accolades + any_active_accolade = { + accolade_parameter = acclaimed_knight_trains_hunting + } + OR = { + NOT = { + has_trait = lifestyle_hunter + } + AND = { + primary_heir ?= { + NOT = { + has_trait = lifestyle_hunter + } + } + } + } + any_knight = { + ep2_accolade_events_0100_hunting_knight_trigger = yes + } + trigger_if = { + limit = { + NOT = { + has_trait = lifestyle_hunter + } + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_hunt } + } + is_healthy = yes + is_imprisoned = no + age >= 13 + } + trigger_else = { + primary_heir ?= { + NOT = { + has_trait = lifestyle_hunter + } + } + primary_heir = { + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_hunt } + } + is_healthy = yes + is_ai = yes + is_imprisoned = no + age >= 13 + is_courtier_of = root + } + } + } + + immediate = { + random_knight = { + limit = { + ep2_accolade_events_0100_hunting_knight_trigger = yes + } + save_scope_as = huntsmaster + } + if = { + limit = { + NOT = { + has_trait = lifestyle_hunter + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_hunt } + } + is_healthy = yes + is_imprisoned = no + age >= 13 + } + save_scope_as = new_hunter + } + else_if = { + limit = { + primary_heir ?= { + NOT = { + has_trait = lifestyle_hunter + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_hunt } + } + is_healthy = yes + is_ai = yes + is_imprisoned = no + age >= 13 + } + } + primary_heir = { + save_scope_as = new_hunter + } + } + if = { + limit = { + scope:new_hunter = { + this = root + } + primary_heir ?= { + NOT = { + has_trait = lifestyle_hunter + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_hunt } + } + is_healthy = yes + is_ai = yes + is_imprisoned = no + age >= 13 + is_courtier_of = root + } + } + primary_heir = { + save_scope_as = new_hunter_2 + } + } + } + + option = { + name = ep2_accolade_events.0100.a + scope:new_hunter = { + add_trait = lifestyle_hunter + } + if = { + limit = { + exists = scope:new_hunter_2 + } + scope:new_hunter_2 = { + add_trait = lifestyle_hunter + } + } + if = { + limit = { + culture = { + OR = { + has_cultural_tradition = tradition_bush_hunting + has_cultural_tradition = tradition_hunters + has_cultural_tradition = tradition_sacred_hunts + } + } + } + stress_impact = { + base = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + lifestyle_hunter = miniscule_stress_impact_loss + } + } + else = { + stress_impact = { + lifestyle_hunter = miniscule_stress_impact_loss + } + } + ai_chance = { + base = 100 + } + } +} + +scripted_trigger ep2_accolade_events_0200_blademaster_knight_trigger = { + accolade ?= { + is_accolade_active = yes + has_accolade_parameter = acclaimed_knight_trains_swordfighting + } + is_healthy = yes + is_imprisoned = no + OR = { + AND = { + is_available = yes + root = { is_available = yes } + } + AND = { + is_available = yes + root.primary_heir = { is_available = yes } + } + location = root.location + location = root.primary_heir.location + } +} + +# Blademaster shares the Blademaster trait with your line +ep2_accolade_events.0200 = { + type = character_event + title = ep2_accolade_events.0200.t + desc = { + desc = ep2_accolade_events.0200.desc + first_valid = { + triggered_desc = { + trigger = { + scope:new_blademaster = { + this = root + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + exists = scope:new_blademaster_2 + scope:new_blademaster_2 = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + desc = ep2_accolade_events.0200.desc.both_not_martial + } + triggered_desc = { + trigger = { + scope:new_blademaster = { + this = root + } + exists = scope:new_blademaster_2 + scope:new_blademaster_2 = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + desc = ep2_accolade_events.0200.desc.heir_not_martial + } + triggered_desc = { + trigger = { + scope:new_blademaster = { + this = root + } + exists = scope:new_blademaster_2 + scope:new_blademaster_2 = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + desc = ep2_accolade_events.0200.desc.heir_not_martial + } + triggered_desc = { + trigger = { + scope:new_blademaster = { + this = root + } + exists = scope:new_blademaster_2 + } + desc = ep2_accolade_events.0200.desc.both + } + triggered_desc = { + trigger = { + scope:new_blademaster = { + this = root.primary_heir + } + } + desc = ep2_accolade_events.0200.desc.heir + } + triggered_desc = { + trigger = { + scope:new_blademaster = { + this = root + } + } + desc = ep2_accolade_events.0200.desc.liege + } + } + } + theme = martial + override_background = { + reference = courtyard + } + left_portrait = { + trigger = { + exists = scope:new_blademaster + } + character = scope:new_blademaster + animation = marshal + } + right_portrait = { + character = scope:acclaimed_blademaster + animation = throne_room_one_handed_passive_1 + } + lower_right_portrait = { + character = scope:new_blademaster_2 + } + + trigger = { + has_dlc_feature = accolades + any_active_accolade = { + accolade_parameter = acclaimed_knight_trains_swordfighting + } + OR = { + NOT = { + has_trait = lifestyle_blademaster + } + AND = { + primary_heir ?= { + NOT = { + has_trait = lifestyle_blademaster + } + } + } + } + any_knight = { + ep2_accolade_events_0200_blademaster_knight_trigger = yes + } + trigger_if = { + limit = { + NOT = { + has_trait = lifestyle_blademaster + } + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_tournament } + } + is_healthy = yes + is_imprisoned = no + age >= 13 + NOT = { has_character_flag = denied_blademaster_training } + } + trigger_else = { + primary_heir ?= { + NOT = { + has_trait = lifestyle_blademaster + } + } + OR = { + primary_heir = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + primary_heir = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + NOR = { + has_trait = craven + has_trait = lazy + has_trait = content + } + } + } + primary_heir = { + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_tournament } + } + is_healthy = yes + is_ai = yes + is_imprisoned = no + age >= 13 + is_courtier_of = root + NOT = { has_character_flag = denied_blademaster_training } + } + } + } + + immediate = { + #save trainer knight + random_knight = { + limit = { + ep2_accolade_events_0200_blademaster_knight_trigger = yes + } + save_scope_as = acclaimed_blademaster + } + #save non-blademaster liege + if = { + limit = { + NOT = { + has_trait = lifestyle_blademaster + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_tournament } + } + is_healthy = yes + is_imprisoned = no + age >= 13 + NOT = { has_character_flag = denied_blademaster_training } + } + save_scope_as = new_blademaster + } + #save non-blademaster heir + else = { + primary_heir = { + save_scope_as = new_blademaster + } + } + #save non-blademaster heir, if liege exists + if = { + limit = { + scope:new_blademaster = { + this = root + } + primary_heir ?= { + NOT = { + has_trait = lifestyle_blademaster + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_hunt } + } + is_healthy = yes + is_ai = yes + is_imprisoned = no + age >= 13 + is_courtier_of = root + NOT = { has_character_flag = denied_blademaster_training } + } + } + primary_heir = { + save_scope_as = new_blademaster_2 + } + } + scope:new_blademaster = { + add_character_flag = wear_armor + } + scope:acclaimed_blademaster = { + add_character_flag = wear_armor + } + scope:new_blademaster_2 ?= { + add_character_flag = wear_armor + } + } + + # we're going to be blademasters + option = { + name = ep2_accolade_events.0200.a + scope:new_blademaster = { + add_trait = lifestyle_blademaster + } + if = { + limit = { + exists = scope:new_blademaster_2 + } + scope:new_blademaster_2 = { + add_trait = lifestyle_blademaster + } + } + if = { + limit = { + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + } + add_piety = medium_piety_loss + add_character_modifier = { + modifier = defied_martial_custom_modifier + years = 20 + } + } + if = { + limit = { + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this = root.primary_heir + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this = root.primary_heir + } + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = primary_heir + opinion = 30 + } + } + if = { + limit = { + culture = { + OR = { + has_cultural_tradition = tradition_druzhina + has_cultural_tradition = tradition_futuwaa + has_cultural_tradition = tradition_khadga_puja + has_cultural_tradition = tradition_talent_acquisition + has_cultural_tradition = tradition_swords_for_hire + has_cultural_tradition = tradition_warriors_by_merit + has_cultural_tradition = tradition_only_the_strong + has_cultural_tradition = tradition_martial_admiration + has_cultural_tradition = tradition_fp1_trials_by_combat + has_cultural_tradition = tradition_chanson_de_geste + } + } + } + stress_impact = { + base = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + lifestyle_blademaster = miniscule_stress_impact_loss + } + } + else_if = { + limit = { + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + } + stress_impact = { + craven = major_stress_impact_gain + lazy = major_stress_impact_gain + content = major_stress_impact_gain + zealous = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + lifestyle_blademaster = miniscule_stress_impact_loss + } + } + else_if = { + limit = { + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + culture = { + OR = { + has_cultural_tradition = tradition_druzhina + has_cultural_tradition = tradition_futuwaa + has_cultural_tradition = tradition_khadga_puja + has_cultural_tradition = tradition_talent_acquisition + has_cultural_tradition = tradition_swords_for_hire + has_cultural_tradition = tradition_warriors_by_merit + has_cultural_tradition = tradition_only_the_strong + has_cultural_tradition = tradition_martial_admiration + has_cultural_tradition = tradition_fp1_trials_by_combat + has_cultural_tradition = tradition_chanson_de_geste + } + } + } + stress_impact = { + base = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + craven = major_stress_impact_gain + lazy = major_stress_impact_gain + content = major_stress_impact_gain + zealous = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + lifestyle_blademaster = miniscule_stress_impact_loss + } + } + else = { + stress_impact = { + lifestyle_blademaster = miniscule_stress_impact_loss + } + } + ai_chance = { + base = 100 + modifier = { + add = -75 + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + OR = { + has_trait = zealous + has_trait = humble + has_trait = just + } + } + modifier = { + add = 100 + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + OR = { + has_trait = brave + has_trait = ambitious + has_trait = arrogant + has_trait = arbitrary + has_trait = cynical + } + } + modifier = { + factor = 0 + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + OR = { + has_trait = craven + has_trait = lazy + has_trait = content + } + } + } + } + + # better not defy gender norms + option = { + trigger = { + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + } + name = ep2_accolade_events.0200.b + flavor = ep2_accolade_events.0200.b.tt + if = { + limit = { + scope:new_blademaster = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster = { + add_trait = lifestyle_blademaster + } + } + else = { + scope:new_blademaster = { + add_character_flag = denied_blademaster_training + } + } + if = { + limit = { + exists = scope:new_blademaster_2 + scope:new_blademaster_2 = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 = { + add_trait = lifestyle_blademaster + } + } + else = { + scope:new_blademaster_2 ?= { + add_character_flag = denied_blademaster_training + } + } + if = { + limit = { + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this = root.primary_heir + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this = root.primary_heir + } + } + } + reverse_add_opinion = { + modifier = angry_opinion + target = primary_heir + opinion = -30 + } + } + if = { + limit = { + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this != root.primary_heir + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this != root.primary_heir + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + brave = medium_stress_impact_gain + cynical = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + } + else_if = { + limit = { + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this = root.primary_heir + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this = root.primary_heir + } + } + } + stress_impact = { + compassionate = major_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + brave = medium_stress_impact_gain + cynical = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + } + modifier = { + add = -75 + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = brave + has_trait = cynical + has_trait = arbitrary + } + } + modifier = { + add = 100 + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + OR = { + has_trait = humble + has_trait = content + has_trait = craven + has_trait = zealous + has_trait = just + has_trait = lazy + } + } + modifier = { + factor = 0 + OR = { + scope:new_blademaster = { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this = root.primary_heir + } + scope:new_blademaster_2 ?= { + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + this = root.primary_heir + } + } + has_trait = compassionate + } + } + } + after = { + scope:acclaimed_blademaster = { + remove_character_flag = wear_armor + } + scope:new_blademaster = { + remove_character_flag = wear_armor + } + } +} + +scripted_trigger ep2_accolade_events_0300_reveler_knight_trigger = { + accolade ?= { + is_accolade_active = yes + has_accolade_parameter = acclaimed_knight_trains_reveling + } + is_healthy = yes + is_imprisoned = no + OR = { + AND = { + is_available = yes + root = { is_available = yes } + } + AND = { + is_available = yes + root.primary_heir = { is_available = yes } + } + location = root.location + location = root.primary_heir.location + } +} + +# master_of_revels shares the reveler trait with your line +ep2_accolade_events.0300 = { + type = character_event + title = ep2_accolade_events.0300.t + desc = { + desc = ep2_accolade_events.0300.desc + first_valid = { + triggered_desc = { + trigger = { + scope:new_reveler = { + this = root + } + scope:new_reveler_2 = { + this = root.primary_heir + } + } + desc = ep2_accolade_events.0300.desc.both + } + triggered_desc = { + trigger = { + scope:new_reveler = { + this = root.primary_heir + } + } + desc = ep2_accolade_events.0300.desc.heir + } + triggered_desc = { + trigger = { + scope:new_reveler = { + this = root + } + } + desc = ep2_accolade_events.0300.desc.liege + } + } + } + theme = feast_activity + left_portrait = { + character = scope:new_reveler + animation = laugh + } + right_portrait = { + character = scope:master_of_revels + animation = toast_goblet + } + lower_right_portrait = { + character = scope:new_reveler_2 + } + + trigger = { + has_dlc_feature = accolades + any_active_accolade = { + accolade_parameter = acclaimed_knight_trains_reveling + } + OR = { + NOR = { + has_trait = lifestyle_reveler + has_trait = temperate + has_trait = shy + } + AND = { + primary_heir ?= { + NOR = { + has_trait = lifestyle_reveler + has_trait = temperate + has_trait = shy + } + } + } + } + any_knight = { + ep2_accolade_events_0300_reveler_knight_trigger = yes + } + trigger_if = { + limit = { + NOT = { + has_trait = lifestyle_reveler + } + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_feast } + involved_activity ?= { has_activity_type = activity_wedding } + } + is_healthy = yes + is_imprisoned = no + age >= 13 + } + trigger_else = { + primary_heir ?= { + NOT = { + has_trait = lifestyle_reveler + } + } + primary_heir = { + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_feast } + involved_activity ?= { has_activity_type = activity_wedding } + } + is_healthy = yes + is_ai = yes + is_imprisoned = no + age >= 13 + is_courtier_of = root + } + } + } + + immediate = { + random_knight = { + limit = { + ep2_accolade_events_0300_reveler_knight_trigger = yes + } + save_scope_as = master_of_revels + } + if = { + limit = { + NOR = { + has_trait = lifestyle_reveler + has_trait = temperate + has_trait = shy + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_feast } + involved_activity ?= { has_activity_type = activity_wedding } + } + is_healthy = yes + is_imprisoned = no + age >= 13 + } + save_scope_as = new_reveler + } + else_if = { + limit = { + primary_heir ?= { + NOR = { + has_trait = lifestyle_reveler + has_trait = temperate + has_trait = shy + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_feast } + involved_activity ?= { has_activity_type = activity_wedding } + } + is_healthy = yes + is_ai = yes + is_imprisoned = no + age >= 13 + is_courtier_of = root + } + } + primary_heir = { + save_scope_as = new_reveler + } + } + if = { + limit = { + scope:new_reveler ?= { + this = root + } + primary_heir ?= { + NOT = { + has_trait = lifestyle_reveler + has_trait = temperate + has_trait = shy + } + OR = { + is_available = yes + involved_activity ?= { has_activity_type = activity_feast } + involved_activity ?= { has_activity_type = activity_wedding } + } + is_healthy = yes + is_ai = yes + is_imprisoned = no + age >= 13 + is_courtier_of = root + } + } + primary_heir = { + save_scope_as = new_reveler_2 + } + } + } + + option = { + name = ep2_accolade_events.0300.a + scope:new_reveler ?= { + add_trait = lifestyle_reveler + } + if = { + limit = { + exists = scope:new_reveler_2 + } + scope:new_reveler_2 = { + add_trait = lifestyle_reveler + } + } + if = { + limit = { + culture = { + OR = { + has_cultural_tradition = tradition_festivities + has_cultural_tradition = tradition_welcoming + } + } + faith = { + OR = { + has_doctrine = tenet_ritual_celebrations + has_doctrine = tenet_hedonistic + } + } + } + stress_impact = { + base = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + gluttonous = miniscule_stress_impact_loss + drunkard = miniscule_stress_impact_loss + profligate = miniscule_stress_impact_loss + comfort_eater = miniscule_stress_impact_loss + lustful = miniscule_stress_impact_loss + lifestyle_reveler = miniscule_stress_impact_loss + } + } + else = { + stress_impact = { + lifestyle_reveler = miniscule_stress_impact_loss + } + } + ai_chance = { + base = 100 + } + } +} diff --git a/N3OW/events/dlc/ep2/ep2_tournament_events.txt b/N3OW/events/dlc/ep2/ep2_tournament_events.txt new file mode 100644 index 00000000..f8dc3ada --- /dev/null +++ b/N3OW/events/dlc/ep2/ep2_tournament_events.txt @@ -0,0 +1,14526 @@ +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 + } + } +} diff --git a/N3OW/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt b/N3OW/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt new file mode 100644 index 00000000..7712d777 --- /dev/null +++ b/N3OW/events/dlc/ep2/wedding_events/ep2_bloody_wedding_events.txt @@ -0,0 +1,1845 @@ +namespace = ep2_wedding + +# ON START - CEREMONY - BLOODY WEDDING + +ep2_wedding.0101 = { + type = activity_event + title = ep2_wedding.0101.t + desc = { + desc = ep2_wedding.0101.desc.intro + first_valid = { + triggered_desc = { + trigger = { root = scope:spouse_1 } + desc = ep2_wedding.0101.desc.spouse + } + triggered_desc = { + trigger = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } } + desc = ep2_wedding.0101.desc.bad + } + triggered_desc = { + trigger = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } } + desc = ep2_wedding.0101.desc.good + } + } + } + + theme = bloody_wedding_ceremony + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:spouse_2 + animation = admiration + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Feasts/ep2_event_grand_murder_feast" + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } #for loc + } + + option = { #kill all of them + name = { + trigger = { scope:spouse_2 = { is_lowborn = no } } + text = ep2_wedding.0101.a + } + name = { + trigger = { scope:spouse_2 = { is_lowborn = yes } } + text = ep2_wedding.0101.a_lowborn + } + custom_tooltip = ep2_wedding.0101.a.tt + set_variable = bloody_wedding_murder_family_var + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = arbitrary + has_trait = paranoid + has_trait = deceitful + has_trait = wrathful + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + NOT = { has_trait = calm } + add = 50 + } + modifier = { + OR = { + has_trait = calm + has_trait = compassionate + has_trait = forgiving + has_trait = just + has_trait = honest + } + add = -50 + } + } + } + + 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 = { + base = 100 + modifier = { + OR = { + has_trait = just + has_trait = brave + has_trait = temperate + has_trait = impatient + } + NOT = { has_trait = wrathful } + add = 50 + } + } + } + + option = { #kill only the spouse - during OUR wedding night + name = ep2_wedding.0101.c + custom_tooltip = ep2_wedding.0101.c.tt + trigger = { + root = scope:spouse_1 + scope:spouse_2 = { is_ai = yes } #too complex to account for this if it's a player + NOT = { + scope:activity = { + any_attending_character = { + is_close_or_extended_family_of = scope:spouse_2 + is_ai = no + } + } + } + } + set_variable = bloody_wedding_murder_spouse_var + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = just + has_trait = brave + has_trait = patient + has_trait = craven + } + add = 50 + } + } + } + + option = { #back down + name = ep2_wedding.0101.d + custom_tooltip = ep2_wedding.0101.d.tt + set_variable = { + name = bloody_wedding_backed_down_var + years = 1 + } + ai_chance = { + base = 10 #unlikely to back down once it's started + modifier = { #UNLESS + OR = { + has_trait = calm + has_trait = compassionate + has_trait = forgiving + has_trait = just + has_trait = honest + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + add = 200 + } + } + } +} + +# ON COMPLETE BANQUET - MASSACRE - BLOODY WEDDING - KILL EVERYONE + +scripted_trigger ep2_wedding_0202_valid_family_member_trigger = { + is_close_or_extended_family_of = scope:spouse_2 + this != root + is_close_family_or_spouse_of_root_trigger = no + this != scope:spouse_2 +} + +ep2_wedding.0202 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + root = scope:spouse_1 + } + desc = ep2_wedding.0202.t.spouse + } + triggered_desc = { + desc = ep2_wedding.0202.t + } + } + } + desc = { + desc = ep2_wedding.0202.desc.intro + random_valid = { + triggered_desc = { + trigger = { #compassionate + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + desc = ep2_wedding.0202.desc.compassionate + } + triggered_desc = { #paranoid + trigger = { + has_trait = paranoid + } + desc = ep2_wedding.0202.desc.paranoid + } + triggered_desc = { #zealous + trigger = { + has_trait = zealous + } + desc = ep2_wedding.0202.desc.zealous + } + triggered_desc = { #sadistic + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = torturer + } + } + desc = ep2_wedding.0202.desc.sadistic + } + triggered_desc = { #cannibal + trigger = { + is_cannibal_trigger = yes + } + desc = ep2_wedding.0202.desc.cannibal + } + triggered_desc = { #craven + trigger = { + has_trait = craven + } + desc = ep2_wedding.0202.desc.craven + } + triggered_desc = { #arrogant + trigger = { + OR = { + has_trait = ambitious + has_trait = arrogant + } + NOT = { has_trait = humble } + } + desc = ep2_wedding.0202.desc.arrogant + } + triggered_desc = { #lazy + trigger = { + has_trait = lazy + } + desc = ep2_wedding.0202.desc.lazy + } + triggered_desc = { #just + trigger = { + OR = { + has_trait = just + has_trait = honest + } + } + desc = ep2_wedding.0202.desc.just + } + triggered_desc = { #wrathful + trigger = { + OR = { + has_trait = wrathful + has_trait = stubborn + has_trait = vengeful + } + NOT = { has_trait = calm } + } + desc = ep2_wedding.0202.desc.wrathful + } + desc = ep2_wedding.0202.desc.fallback + } + desc = ep2_wedding.0202.desc.outro + } + + theme = bloody_wedding_banquet + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = calm + has_trait = craven + } + } + animation = worry + } + animation = schadenfreude + } + center_portrait = { + character = scope:mercenary_1 + animation = aggressive_sword + } + right_portrait = { + character = scope:spouse_2 + animation = fear + } + lower_center_portrait = { + trigger = { exists = scope:entourage_1 } + character = scope:entourage_1 + } + lower_right_portrait = { + trigger = { exists = scope:entourage_2 } + character = scope:entourage_2 + } + lower_left_portrait = { + trigger = { exists = scope:entourage_3 } + character = scope:entourage_3 + } + cooldown = { years = 3 } #so you don't get it again and again + + trigger = { + exists = scope:activity + has_variable = bloody_wedding_murder_family_var + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Feasts/ep2_event_grand_murder_feast" + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } #for loc + hidden_effect = { + create_character = { + template = mercenary + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = mercenary_1 + } + create_character = { #random peasant is present so the whole activity doesn't cancel + template = servant_character + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + save_scope_as = shocked_rob + } + scope:shocked_rob = { + add_to_activity = scope:activity + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + ep2_wedding_0202_valid_family_member_trigger = yes + } + } + } + scope:activity = { + random_attending_character = { + limit = { + ep2_wedding_0202_valid_family_member_trigger = yes + } + save_scope_as = entourage_1 + } + random_attending_character = { + limit = { + ep2_wedding_0202_valid_family_member_trigger = yes + this != scope:entourage_1 + } + save_scope_as = entourage_2 + } + random_attending_character = { + limit = { + ep2_wedding_0202_valid_family_member_trigger = yes + this != scope:entourage_1 + this != scope:entourage_2 + } + save_scope_as = entourage_3 + } + } + } + } + + option = { + name = { + trigger = { scope:spouse_2 = { is_lowborn = no } } + text = ep2_wedding.0202.a + } + name = { + trigger = { scope:spouse_2 = { is_lowborn = yes } } + text = ep2_wedding.0202.a.lowborn + } + if = { + limit = { scope:spouse_2 = { is_ai = no } } + scope:spouse_2 = { trigger_event = ep2_wedding.0204 } + } + else_if = { + limit = { + scope:activity = { + any_attending_character = { + ep2_wedding_0202_valid_family_member_trigger = yes + is_ai = no #there's a player family member + } + } + } + scope:activity = { + every_attending_character = { + limit = { + ep2_wedding_0202_valid_family_member_trigger = yes + is_ai = no #there's a player family member + } + trigger_event = ep2_wedding.0204 + } + } + } + else = { + if = { + limit = { + scope:activity = { + any_attending_character = { + ep2_wedding_0202_valid_family_member_trigger = yes + } + } + } + scope:activity = { + every_attending_character = { + limit = { + ep2_wedding_0202_valid_family_member_trigger = yes + } + custom = every_attending_relative_of_spouse_2 + death = { + death_reason = death_bloody_wedding + } + } + } + } + show_as_tooltip = { #we wanna show this + scope:spouse_2 = { + death = { death_reason = death_bloody_wedding } + scope:host = { + add_secret = { + type = secret_murder + target = scope:spouse_2 + } + } + } + } + hidden_effect = { #this does the effect + unknown_murder_effect = { + VICTIM = scope:spouse_2 + MURDERER = root + REASON = death_bloody_wedding + } + } + create_character_memory = { + type = grand_wedding_massacre + participants = { + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + } + } + + after = { + if = { + limit = { is_ai = yes } + scope:mercenary_1 = { silent_disappearance_effect = yes } + } + hidden_effect = { + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } +} + +# ON COMPLETE BANQUET - MASSACRE - BLOODY WEDDING - KILL THE SPOUSE +ep2_wedding.0203 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + root = scope:spouse_1 + } + desc = ep2_wedding.0203.t.spouse + } + triggered_desc = { + desc = ep2_wedding.0203.t + } + } + } + desc = { + desc = ep2_wedding.0203.desc.intro + random_valid = { + triggered_desc = { + trigger = { #compassionate + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + desc = ep2_wedding.0203.desc.compassionate + } + triggered_desc = { #paranoid + trigger = { + has_trait = paranoid + } + desc = ep2_wedding.0203.desc.paranoid + } + triggered_desc = { #zealous + trigger = { + has_trait = zealous + } + desc = ep2_wedding.0203.desc.zealous + } + triggered_desc = { #sadistic + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = torturer + } + } + desc = ep2_wedding.0203.desc.sadistic + } + triggered_desc = { #cannibal + trigger = { + is_cannibal_trigger = yes + } + desc = ep2_wedding.0203.desc.cannibal + } + triggered_desc = { #craven + trigger = { + has_trait = craven + } + desc = ep2_wedding.0203.desc.craven + } + triggered_desc = { #arrogant + trigger = { + OR = { + has_trait = ambitious + has_trait = arrogant + } + NOT = { has_trait = humble } + } + desc = ep2_wedding.0203.desc.arrogant + } + triggered_desc = { #just + trigger = { + OR = { + has_trait = just + has_trait = honest + } + } + desc = ep2_wedding.0203.desc.just + } + triggered_desc = { #wrathful + trigger = { + OR = { + has_trait = wrathful + has_trait = stubborn + has_trait = vengeful + } + NOT = { has_trait = calm } + } + desc = ep2_wedding.0203.desc.wrathful + } + desc = ep2_wedding.0203.desc.fallback + } + desc = ep2_wedding.0203.desc.outro + } + theme = bloody_wedding_banquet + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = calm + has_trait = craven + } + } + animation = worry + } + animation = schadenfreude + } + center_portrait = { + character = scope:my_agent + animation = aggressive_dagger + } + right_portrait = { + character = scope:spouse_2 + animation = shock + } + cooldown = { years = 3 } #so you don't get it again and again + + trigger = { + exists = scope:activity + has_variable = bloody_wedding_murder_solo_var + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Feasts/ep2_event_grand_murder_feast" + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + #save scopes for the celebration_spy_character template + location.faith = { + save_scope_as = guest_faith + } + location.culture = { + save_scope_as = guest_culture + } + hidden_effect = { + create_character = { + template = celebration_spy_character + dynasty = none + location = root.location + gender_female_chance = root_soldier_female_chance + save_scope_as = my_agent + } + } + } + + option = { + name = ep2_wedding.0203.a + if = { + limit = { scope:spouse_2 = { is_ai = no } } + scope:spouse_2 = { trigger_event = ep2_wedding.0204 } + } + else = { + show_as_tooltip = { #we wanna show this + scope:spouse_2 = { + death = { death_reason = death_bloody_wedding } + add_secret = { + type = secret_murder + target = scope:spouse_2 + } + } + } + hidden_effect = { #this does the effect + unknown_murder_effect = { + VICTIM = scope:spouse_2 + MURDERER = root + REASON = death_bloody_wedding + } + } + create_character_memory = { + type = grand_wedding_solo_kill + participants = { + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + } + } + + after = { + if = { + limit = { is_ai = yes } + scope:my_agent = { silent_disappearance_effect = yes } + } + hidden_effect = { + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } +} + +# ON START WNIGHT - MASSACRE - BLOODY WEDDING - WEDDING NIGHT KILL + +ep2_wedding.3060 = { + type = activity_event + title = ep2_wedding.3060.t + desc = ep2_wedding.3060.desc + theme = wedding_night_activity + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:spouse_2 + animation = flirtation + } + + cooldown = { years = 3 } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Events/Grand_Activities/Feasts/ep2_event_grand_murder_feast" + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + } + + #Go for it + option = { + name = ep2_wedding.3060.a + duel = { + skill = prowess + target = scope:spouse_2 + 65 = { #you kill them + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.3060.a.success + send_interface_toast = { + left_icon = scope:spouse_2 + title = ep2_wedding.3060.a.success + unknown_murder_effect = { + VICTIM = scope:spouse_2 + MURDERER = root + REASON = death_mysterious + } + } + create_character_memory = { + type = grand_wedding_solo_kill + participants = { + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + give_nickname = nick_the_just_widowed + } + 35 = { #they survive + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.3060.a.failure + send_interface_toast = { + left_icon = scope:spouse_2 + title = ep2_wedding.3060.a.failure + scope:spouse_2 = { + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -50 + } + } + } + set_variable = bloody_murder_fail + } + } + stress_impact = { + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = compassionate + has_trait = calm + } + } + } + } + + #Offer some drink (poisoned) + option = { + name = ep2_wedding.3060.b + trigger = { + OR = { + has_trait = lifestyle_herbalist + has_trait = witch + has_trait = lifestyle_physician + has_trait = whole_of_body + has_trait = lifestyle_gardener + has_trait = schemer + } + } + duel = { + skill = intrigue + target = scope:spouse_2 + 80 = { #you kill them + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.3060.b.success + send_interface_toast = { + left_icon = scope:spouse_2 + title = ep2_wedding.3060.b.success + unknown_murder_effect = { + VICTIM = scope:spouse_2 + MURDERER = root + REASON = death_mysterious + } + } + create_character_memory = { + type = grand_wedding_solo_kill + participants = { + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + give_nickname = nick_the_just_widowed + } + 20 = { #they survive + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.3060.b.failure + send_interface_toast = { + left_icon = scope:spouse_2 + title = ep2_wedding.3060.b.failure + scope:spouse_2 = { + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -50 + } + } + } + set_variable = bloody_murder_fail + } + } + stress_impact = { + impatient = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = wrathful + has_trait = compassionate + } + } + } + } + + #Cut their throat + option = { + name = ep2_wedding.3060.c + flavor = ep2_wedding.3060.c.flavor + trigger = { + OR = { + has_trait = lifestyle_hunter + has_trait = torturer + has_trait = lifestyle_blademaster + has_trait = kinslayer + has_trait = aggressive_attacker + has_trait = murderer + has_trait = wrathful + has_trait = deceitful + has_trait = sadistic + has_trait = callous + } + } + duel = { + skills = { prowess intrigue } + target = scope:spouse_2 + 80 = { #you kill them + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.3060.c.success + send_interface_toast = { + left_icon = scope:spouse_2 + title = ep2_wedding.3060.c.success + unknown_murder_effect = { + VICTIM = scope:spouse_2 + MURDERER = root + REASON = death_mysterious + } + } + create_character_memory = { + type = grand_wedding_solo_kill + participants = { + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + give_nickname = nick_the_just_widowed + } + 20 = { #they survive + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.3060.c.failure + send_interface_toast = { + left_icon = scope:spouse_2 + title = ep2_wedding.3060.c.failure + scope:spouse_2 = { + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -50 + } + } + } + set_variable = bloody_murder_fail + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = craven + has_trait = calm + } + } + } + } + + #I actually like this person + option = { + name = ep2_wedding.3060.d + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:spouse_2 + } + progress_towards_lover_effect = { + CHARACTER = scope:spouse_2 + REASON = lover_romantic_wedding_night + OPINION = 20 + } + had_sex_with_effect = { + CHARACTER = scope:spouse_2 + PREGNANCY_CHANCE = pregnancy_chance + } + set_variable = { + name = bloody_wedding_backed_down_var + years = 1 + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = wrathful + } + } + } + } + + after = { + hidden_effect = { + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + remove_character_flag = is_naked + scope:spouse_2 = { + remove_character_flag = is_naked + } + } +} + +# ON START WNIGHT - THE CLEANING UP - BLOODY WEDDING - HOST +ep2_wedding.0301 = { + type = activity_event + title = ep2_wedding.0301.t + desc = { + first_valid = { + triggered_desc = { #Your mercenaries killed everyone + trigger = { + has_variable = bloody_wedding_murder_family_var + } + desc = ep2_wedding.0301.desc.family + } + triggered_desc = { #Agent killed the spouse + trigger = { + has_variable = bloody_wedding_murder_solo_var + } + desc = ep2_wedding.0301.desc.agent + } + triggered_desc = { #Spouse died during the wedding night + trigger = { + has_variable = bloody_wedding_murder_spouse_var + } + desc = ep2_wedding.0301.desc.wedding_night + } + } + first_valid = { + triggered_desc = { #You're the spouse - wedding night kill + trigger = { + scope:spouse_1 = root + has_variable = bloody_wedding_murder_spouse_var + } + desc = ep2_wedding.0301.spouse_wnight + } + triggered_desc = { #You're the spouse + trigger = { + scope:spouse_1 = root + } + desc = ep2_wedding.0301.spouse + } + desc = ep2_wedding.0301.non_spouse #you're not the spouse + } + } + theme = bloody_wedding_banquet + left_portrait = { + character = root + triggered_animation = { + trigger = { + this = scope:spouse_1 + } + animation = grief + } + animation = schadenfreude + } + center_portrait = { + trigger = { exists = scope:shocked_guest } + character = scope:shocked_guest + animation = shock + } + right_portrait = { + trigger = { + root != scope:spouse_1 + } + character = scope:spouse_1 + animation = grief + } + lower_right_portrait = scope:spouse_2 + cooldown = { years = 3 } + + trigger = { + exists = scope:activity + } + + immediate = { + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + if = { + limit = { + scope:activity = { + any_attending_character = { + is_alive = yes + is_adult = yes + this != scope:activity.special_guest:spouse_1 + this != scope:spouse_2 + this != scope:host + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_alive = yes + is_adult = yes + this != scope:activity.special_guest:spouse_1 + this != scope:host + } + weight = { + base = 1 + modifier = { + add = -5 + is_close_family_or_spouse_of_root_trigger = yes + } + modifier = { + add = 2 + is_close_or_extended_family_of = scope:spouse_2 + } + } + save_scope_as = shocked_guest + } + } + } + } + + option = { #What a tragedy! + name = ep2_wedding.0301.a + scope:spouse_1 = { + remove_character_modifier = wedding_fertility_delay_modifier + } + } + + after = { + if = { + limit = { + this = scope:host + } + scope:host = { + save_scope_as = root_scope + trigger_event = ep2_wedding.0955 + } + } + scope:activity = { + every_attending_character = { + limit = { + this != scope:host + this != scope:spouse_1 + } + trigger_event = ep2_wedding.0956 + } + } + } +} + +# ON START - THE CLEANING UP - BLOODY WEDDING - SURVIVORS / this is the event where the guests realize it's a bloody wedding +ep2_wedding.0302 = { + type = activity_event + title = ep2_wedding.0302.t + desc = { + first_valid = { + triggered_desc = { #Host killed everyone + trigger = { + scope:host = { has_variable = bloody_wedding_murder_family_var } + } + desc = ep2_wedding.0302.desc.family + } + triggered_desc = { #Agent killed the spouse + trigger = { + scope:host = { has_variable = bloody_wedding_murder_solo_var } + } + desc = ep2_wedding.0302.desc.agent + } + triggered_desc = { #Spouse died during the wedding night + trigger = { + scope:host = { has_variable = bloody_wedding_murder_spouse_var } + } + desc = ep2_wedding.0302.desc.wedding_night + } + } + first_valid = { + triggered_desc = { #Spouse! + trigger = { + this = scope:spouse_1 + } + desc = ep2_wedding.0302.spouse + } + triggered_desc = { #Good relationship + trigger = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + } + desc = ep2_wedding.0302.good + } + triggered_desc = { #Bad relationship + trigger = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + } + desc = ep2_wedding.0302.bad + } + triggered_desc = { #You admire the hustle + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = torturer + has_trait = vengeful + } + } + desc = ep2_wedding.0302.sadistic + } + desc = ep2_wedding.0302.indifferent + } + } + theme = bloody_wedding_banquet + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:spouse_1 + animation = grief + } + lower_center_portrait = scope:spouse_2 + cooldown = { years = 3 } + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_intrigue" } + + trigger = { + exists = scope:activity + } + + immediate = { + play_music_cue = mx_cue_murder + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + if = { + limit = { + scope:host = { has_variable = bloody_wedding_murder_family_var } + } + show_as_tooltip = { + scope:activity = { + every_attending_character = { + limit = { + OR = { + is_close_or_extended_family_of = scope:spouse_2 + this = scope:spouse_2 + } + } + custom = every_attending_relative_of_spouse_2 + death = { + death_reason = death_bloody_wedding + } + } + } + } + } + else_if = { + limit = { + scope:host = { + OR = { + has_variable = bloody_wedding_murder_solo_var + has_variable = bloody_wedding_murder_spouse_var + } + } + } + show_as_tooltip = { + scope:spouse_2 = { + death = { + death_reason = death_bloody_wedding + } + } + } + } + } + + option = { + name = ep2_wedding.0302.a + } +} + +# CONCLUSION - BLOODY WEDDING - HOST +ep2_wedding.0955 = { + type = activity_event + title = ep2_wedding.0955.t + desc = { + desc = ep2_wedding.0955.desc.intro + first_valid = { + triggered_desc = { #failed - you're spouses + trigger = { + has_variable = bloody_murder_fail + } + desc = ep2_wedding.0955.desc.failed + } + desc = ep2_wedding.0955.desc.murder + } + first_valid = { + triggered_desc = { #Good relationship + trigger = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + NOT = { has_variable = bloody_murder_fail } + } + desc = ep2_wedding.0955.good + } + triggered_desc = { #Bad relationship + trigger = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + NOT = { has_variable = bloody_murder_fail } + } + desc = ep2_wedding.0955.bad + } + triggered_desc = { #Rejoice + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = torturer + has_trait = vengeful + } + NOT = { has_variable = bloody_murder_fail } + } + desc = ep2_wedding.0955.sadistic + } + triggered_desc = { #Repent, kinda + trigger = { + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = just + has_trait = trusting + } + NOT = { has_variable = bloody_murder_fail } + } + desc = ep2_wedding.0955.compassionate + } + triggered_desc = { #Meh + trigger = { NOT = { has_variable = bloody_murder_fail } } + desc = ep2_wedding.0955.indifferent + } + } + } + theme = bloody_wedding_banquet + left_portrait = { + character = root + triggered_animation = { + trigger = { has_variable = bloody_murder_fail } + animation = anger + } + animation = schadenfreude + } + right_portrait ={ + trigger = { scope:spouse_2 = { is_alive = yes } } + character = scope:spouse_2 + animation = schadenfreude + } + cooldown = { years = 3 } + + immediate = { + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + } + + option = { + name = { + trigger = { has_variable = bloody_murder_fail } + text = ep2_wedding.0955.a.failure + } + name = { + trigger = { NOT = { has_variable = bloody_murder_fail } } + text = ep2_wedding.0955.a + } + show_as_tooltip = { + disburse_murder_wedding_host_rewards = yes + } + #Stress rewards + stress_impact = { + paranoid = massive_stress_impact_loss + callous = massive_stress_impact_loss + sadistic = massive_stress_impact_loss + compassionate = massive_stress_impact_gain + just = massive_stress_impact_gain + calm = major_stress_impact_gain + } + + hidden_effect = { + if = { #if you haven't failed + limit = { + NOT = { has_variable = bloody_murder_fail } + } + trigger_event = { #cleans up the variables with enough delay for the guest events + id = ep2_wedding.0958 + days = 7 + } + if = { #if they have a parent they always send the letter unless they're too nice + limit = { + scope:activity.var:spouse_2_var = { + any_parent = { + is_available_ai_adult = yes + } + } + } + scope:activity.var:spouse_2_var = { + random_parent = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = avenging_family + } + } + random = { + chance = 100 + modifier = { + add = -25 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = calm + } + } + modifier = { + add = -25 + has_any_good_relationship_with_root_trigger = yes + } + modifier = { + add = 25 + has_any_bad_relationship_with_root_trigger = yes + } + trigger_event = { + id = ep2_wedding.0957 + days = 14 + } + } + } + else_if = { #if they have a close family member it's a random chance + limit = { + scope:activity.var:spouse_2_var = { + any_close_family_member = { + is_available_ai_adult = yes + NOT = { is_parent_of = scope:activity.var:spouse_2_var } + } + } + } + scope:activity.var:spouse_2_var = { + random_close_family_member = { + limit = { + is_available_ai_adult = yes + NOT = { is_parent_of = scope:activity.var:spouse_2_var } + } + save_scope_as = avenging_family + } + } + random = { + chance = 50 + modifier = { + add = 25 + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = callous + } + } + modifier = { + add = 25 + has_any_bad_relationship_with_root_trigger = yes + } + modifier = { + add = -25 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = calm + } + } + modifier = { + add = -25 + has_any_good_relationship_with_root_trigger = yes + } + trigger_event = { + id = ep2_wedding.0957 + days = 14 + } + } + } + else_if = { #if they have an extended family member it's a a bit errr + limit = { + scope:activity.var:spouse_2_var = { + any_close_or_extended_family_member = { + is_available_ai_adult = yes + NOT = { is_close_family_of = scope:activity.var:spouse_2_var } + } + } + } + scope:activity.var:spouse_2_var = { + random_close_or_extended_family_member = { + limit = { + is_available_ai_adult = yes + NOT = { is_close_family_of = scope:activity.var:spouse_2_var } + } + save_scope_as = avenging_family + } + } + random = { + chance = 20 + modifier = { + add = 25 + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = callous + } + } + modifier = { + add = 25 + has_any_bad_relationship_with_root_trigger = yes + } + modifier = { + add = -25 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = calm + } + } + modifier = { + add = -25 + has_any_good_relationship_with_root_trigger = yes + } + trigger_event = { + id = ep2_wedding.0957 + days = 14 + } + } + } + } + } + } +} + +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 + } +} + +# CONCLUSION - BLOODY WEDDING - SURVIVOR +ep2_wedding.0956 = { + type = activity_event + title = ep2_wedding.0956.t + desc = ep2_wedding.0956.desc + theme = bloody_wedding_banquet + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + } + animation = schadenfreude + } + animation = sadness + } + lower_right_portrait = scope:host + cooldown = { years = 3 } + + immediate = { + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + } + + option = { + name = { + trigger = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + } + text = ep2_wedding.0956.a.good + } + name = { + trigger = { + NOT = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } } + } + text = ep2_wedding.0956.a + } + if = { + limit = { + OR = { + has_trait = torturer + has_trait = sadistic + has_trait = vengeful + has_trait = callous + } + } + show_as_tooltip = { #handed out to the host in their event + add_opinion = { + modifier = respect_opinion + target = scope:host + opinion = 20 + } + } + } + else = { + show_as_tooltip = { + add_opinion = { + modifier = suspicion_opinion + target = scope:host + opinion = -25 + } + } + } + add_prestige = medium_prestige_gain + create_character_memory = { + type = grand_wedding_massacre_guest + participants = { + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + stress_impact = { + torturer = major_stress_impact_loss + sadistic = major_stress_impact_loss + callous = major_stress_impact_loss + vengeful = major_stress_impact_loss + paranoid = medium_stress_impact_gain + } + } +} + +### PLAYER ONLY EVENTS ### + +# MASSACRE - SOMEONE IS TRYING TO KILL YOU +ep2_wedding.0204 = { + type = activity_event + title = ep2_wedding.0204.t + desc = { + desc = ep2_wedding.0204.desc.intro + first_valid = { + triggered_desc = { + trigger = { + #you only get this event if the host chose family kill + this != scope:spouse_2 + } + desc = ep2_wedding.0204.desc.family.non_spouse + } + #we assume you're the spouse otherwise + triggered_desc = { + trigger = { + scope:host = { has_variable = bloody_wedding_murder_family_var } + } + desc = ep2_wedding.0204.desc.family + } + triggered_desc = { + trigger = { + scope:host = { has_variable = bloody_wedding_murder_solo_var } + } + desc = ep2_wedding.0204.desc.solo + } + } + } + theme = bloody_wedding_banquet + left_portrait = { + character = scope:mercenary_1 + animation = aggressive_axe + } + center_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:mercenary_2 + animation = aggressive_sword + } + lower_center_portrait = { + trigger = { + root != scope:spouse_2 + NOT = { scope:host = { has_variable = bloody_wedding_murder_solo_var } } + } + character = scope:spouse_2 + } + lower_right_portrait = { + trigger = { + exists = scope:entourage_1 + root != scope:entourage_1 + NOT = { scope:host = { has_variable = bloody_wedding_murder_solo_var } } + } + character = scope:entourage_1 + } + lower_left_portrait = { + trigger = { + exists = scope:entourage_2 + root != scope:entourage_2 + NOT = { scope:host = { has_variable = bloody_wedding_murder_solo_var } } + } + character = scope:entourage_2 + } + cooldown = { years = 3 } + + immediate = { + play_music_cue = mx_cue_murder + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + save_scope_as = murder_victim + hidden_effect = { + create_character = { + template = mercenary + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = mercenary_1 + } + create_character = { + template = mercenary + dynasty = none + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = mercenary_2 + } + } + } + + option = { #Skill duel to get out + name = ep2_wedding.0204.a + duel = { + skill = prowess + value = medium_skill_rating + # Die, unfortunately + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep2_wedding.0204.a.tt.failure + #no need for your own toast if you die + scope:host = { + send_interface_toast = { + title = ep2_wedding.0204.a.tt.success.host #these are flipped in loc + right_icon = scope:murder_victim + scope:murder_victim = { + death = { + death_reason = death_bloody_wedding + } + } + } + } + } + # Save yourself + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding.0204.a.tt.success + send_interface_toast = { + title = ep2_wedding.0204.a.tt.success + left_icon = scope:murder_victim + } + scope:host = { + send_interface_toast = { + title = ep2_wedding.0204.a.tt.failure.host + right_icon = scope:murder_victim + if = { + limit = { root = scope:spouse_2 } + set_variable = bloody_murder_fail + } + } + } + if = { + limit = { root = scope:spouse_2 } + create_character_memory = { + type = grand_wedding_massacre_spouse_survivor + participants = { + host = scope:host + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + } + else = { + create_character_memory = { + type = grand_wedding_massacre_survivor + participants = { + host = scope:host + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + } + } + } + if = { + limit = { + scope:spouse_2 ?= { is_ai = yes } + } + custom_tooltip = { + text = ep2_wedding.0204.a.spouse_2_murder.tt + unknown_murder_effect = { + VICTIM = scope:spouse_2 + MURDERER = scope:host + REASON = death_bloody_wedding + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + ep2_wedding_0202_valid_family_member_trigger = yes + is_ai = yes + this != root + } + } + } + scope:activity = { + every_attending_character = { + limit = { + ep2_wedding_0202_valid_family_member_trigger = yes + is_ai = yes + this != root + } + custom = every_attending_relative_of_spouse_2 + death = { + death_reason = death_bloody_wedding + } + } + } + } + } +} + +# Bloody Wedding follow up event + +ep2_wedding.0957 = { + type = letter_event + opening = { + desc = ep2_wedding.0957.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:avenging_family = { is_parent_of = scope:spouse_2 } } + desc = ep2_wedding.0957.desc.parent + } + desc = ep2_wedding.0957.desc + } + } + sender = scope:avenging_family + + option = { + name = ep2_wedding.0957.a + if = { + limit = { + #DLC check + has_bp1_dlc_trigger = yes + scope:avenging_family.house.house_head = { + valid_for_feud_events_with_target_trigger = { TARGET = root } + } + } + scope:avenging_family = { + house_feud_start_effect = { + # Feuding House Head + ACTOR = scope:avenging_family + # Target House Head + TARGET = root + # Feud Reason + REASON = bloody_wedding + # House Member attacker if relevant, otherwise same as ACTOR + ATTACKER = scope:avenging_family + # House Member victim if relevant, otherwise same as TARGET + VICTIM = scope:spouse_2 + } + } + } + scope:spouse_2 = { + every_close_family_member = { + custom = ep2_wedding.0957.a.tt + limit = { + is_close_family_or_spouse_of_root_trigger = no + this != scope:avenging_family + } + add_opinion = { + target = root + modifier = bloody_wedding_family_opinion + } + } + } + add_prestige = minor_prestige_loss + } +} diff --git a/N3OW/events/dlc/ep2/wedding_events/ep2_wedding_events.txt b/N3OW/events/dlc/ep2/wedding_events/ep2_wedding_events.txt new file mode 100644 index 00000000..947dc2e9 --- /dev/null +++ b/N3OW/events/dlc/ep2/wedding_events/ep2_wedding_events.txt @@ -0,0 +1,23494 @@ +namespace = ep2_wedding + +############################ +## Wedding Events - Maintenance +## 0001-0999 +## by Claudia Baldassi +############################ +## Wedding Events +## +## by Claudia Baldassi, Veronica Pazos, Luke Bean +# +## Ceremony Events +# ep2_wedding.1000 - Host: The other party arrives early and criticizes your chosen options +# ep2_wedding.1010 - Host: You have an occasion to kickstart your Diplomacy/Seduce targeting efforts +# ep2_wedding.1080 - Matchmaking Intent: Lay the ground for the matchmaking +# ep2_wedding.1100 - Northern wedding: the bride goes to a bathhouse with the married women of her family: removal of clothes and kransen (golden circlet) +# ep2_wedding.1020 - Spouse: The spouses fall in love at first sight +# ep2_wedding.1030 - A good or bad omen happens: how do you react? +# ep2_wedding.1120 - Children of the spouses from a previous partner make a fuss +# ep2_wedding.1130 - A bad secret about one of the spouses comes up +# ep2_wedding.1140 - Host: A spouse has an embarrassing misstep, how do you recover? +# ep2_wedding.1150 - Seduction Intent: target scouting +# ep2_wedding.1160 - Some pesants are at the gate of the festivity - what do you do? +# ep2_wedding.1170 - A spouse has arrived with a whole parade. Interact with it +# ep2_wedding.1180 - Your spouse doesn't really like you... +# ep2_wedding.1190 - Religious guest complains about lavishness, luxury, wastes, and unchaste mingling +# ep2_wedding.1200 - Proud parent watches everything go well and brags with intent target/friend/rival/neighbor +# ep2_wedding.1210 - Political talk with a fellow ruler +# ep2_wedding.1220 - In-laws are bullies (or other close relatives) +# ep2_wedding.4000 - Non-spouse: Matchmaking Intent - What a nice wedding, maybe you should follow? +# +## Banquet Events +# ep2_wedding.1040 - You make a new friend +# ep2_wedding.1050 - Someone catches fire from the torches +# ep2_wedding.1070 - Showing off exotic animals can go very well or very wrong +# ep2_wedding.1090 - Matchmaking Intent: push a couple together +# ep2_wedding.1310 - A Friend Is Monopolizing Your Attention +# ep2_wedding.1320 - A rival seeks forgiveness +# ep2_wedding.2000-2001 - Diplomatic Intent: You find information about your target by talking to a friend of theirs +# ep2_wedding.2010-2011 - Host: Paint an animal white and pretend it's a legendary guest +# +## Wedding Night Events +# ep2_wedding.1060 - Spouse: Inspired by Matilda of Tuscany's second wedding: a younger/meeker husband is too intimidated +# ep2_wedding.1065 - Spouse: Inverted event: it's you who have problems - spouse's reaction +# ep2_wedding.1110 - Non-spouses: someone gets extremely drunk/doesn't want to leave +# ep2_wedding.1111 - Non-spouses: you get extremely drunk/don't want to leave +# ep2_wedding.1300 - Spouse: a spouse has insecurities +# ep2_wedding.1330 - Spouse: We were lovers before the wedding +# ep2_wedding.3000 - Spouse: Both spouses are shy/nervous +# ep2_wedding.3010 - Spouse: Spouse with a secret has a breakdown and confesses +# ep2_wedding.3020 - Spouse: You find out that your spouse fancies the other gender +# ep2_wedding.3030 - Spouse: Spouse gives you a memento to symbolize your love +# ep2_wedding.3040 - Spouse: The bed catches fire while you're at it +# ep2_wedding.3050 - Non-spouses: Murder Intent - try to kill your target with a chandelier +# ep2_wedding.3060 - Spouse: Murder Intent - try to kill your spouse while you're at it + +# BETROTHAL INVALIDATED + +# The Grand Wedding wasn't organized in the set amount of time + +ep2_wedding.0001 = { + type = character_event + title = ep2_wedding.0001.t + desc = { + desc = ep2_wedding.0001.desc + first_valid = { + triggered_desc = { + trigger = { + NOR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + desc = ep2_wedding.0001.desc_betrothed + } + desc = ep2_wedding.0001.desc_self + } + } + theme = marriage + left_portrait = { + character = root + animation = disapproval + } + lower_right_portrait = scope:spouse_1 + 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 + 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 + } + } + } + + immediate = { + var:promised_grand_wedding_marriage_countdown = { + save_scope_as = spouse_1 + } + scope:spouse_1.betrothed = { + save_scope_as = spouse_2 + } + } + + option = { + name = ep2_wedding.0001.a + break_grand_wedding_betrothal_effect = yes + } +} + +# A betrothed died before organizing the activity - Host + +ep2_wedding.0002 = { + type = character_event + title = ep2_wedding.0002.t + desc = ep2_wedding.0002.desc + theme = marriage + left_portrait = { + character = root + animation = grief + } + lower_right_portrait = scope:dead_spouse + lower_center_portrait = scope:alive_spouse + + immediate = { + + } + + option = { + name = ep2_wedding.0002.a + remove_variable = promised_grand_wedding_marriage_countdown + } +} + +# Your betrothed died before organizing the activity - Other Betrothed (also if the betrothed was the host) + +ep2_wedding.0003 = { + type = character_event + title = ep2_wedding.0002.t + desc = ep2_wedding.0003.desc + theme = marriage + left_portrait = { + character = root + animation = grief + } + lower_right_portrait = scope:dead_spouse + + option = { + name = ep2_wedding.0003.a + remove_variable = promised_grand_wedding_by + if = { + limit = { + has_variable = promised_grand_wedding_marriage_countdown + } + remove_variable = promised_grand_wedding_marriage_countdown + } + } +} + +# ON START - CEREMONY + +ep2_wedding.0100 = { + type = activity_event + title = ep2_wedding.0100.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root = scope:host + NOR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + desc = ep2_wedding.0100.desc_host + desc = ep2_wedding.0100.desc_host_outro + } + triggered_desc = { + trigger = { + root = scope:host + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + desc = ep2_wedding.0100.desc_host_spouse + } + triggered_desc = { + trigger = { + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + desc = ep2_wedding.0100.desc_spouse + } + desc = ep2_wedding.0100.desc_guest + } + triggered_desc = { + trigger = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + is_pregnant = yes + } + desc = ep2_wedding.0100.desc_root_pregnant + } + triggered_desc = { + trigger = { + OR = { + AND = { + scope:spouse_1 = { is_pregnant = yes } + root != scope:spouse_1 + } + AND = { + scope:spouse_2 = { is_pregnant = yes } + root != scope:spouse_2 + } + } + } + desc = ep2_wedding.0100.desc_spouse_pregnant + } + } + theme = wedding_ceremony_activity + left_portrait = { + trigger = { + NOR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + character = root + animation = happiness + } + center_portrait = { + character = scope:spouse_1_portrait + camera = camera_event_left_wedding + triggered_animation = { + trigger = { + NOT = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } } + } + animation = wedding_bride_left + } + animation = disapproval + } + right_portrait = { + character = scope:spouse_2_portrait + camera = camera_event_right_wedding + triggered_animation = { + trigger = { + NOT = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_1 } } + } + animation = wedding_groom_right + } + animation = dismissal + } + + immediate = { + scope:host = { save_scope_as = host } + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = spouse_2 } + if = { + limit = { + root = scope:spouse_1 + } + scope:spouse_2 = { save_scope_as = my_spouse } + } + else_if = { + limit = { + root = scope:spouse_2 + } + scope:spouse_1 = { save_scope_as = my_spouse } + } + if = { + limit = { + scope:activity.special_guest:spouse_1 = { + sex_opposite_of = scope:activity.special_guest:spouse_2 + is_male = yes + } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_2_portrait + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_1_portrait + } + } + else = { + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1_portrait + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2_portrait + } + } + } + + option = { + name = ep2_wedding.0100.a + } +} + +# ON END - CEREMONY + +# For the host (not spouse) and guests +ep2_wedding.0150 = { + type = activity_event + title = ep2_wedding.0150.t + desc = ep2_wedding.0150.desc + theme = wedding_ceremony_activity + left_portrait = { + character = scope:spouse_1_portrait + animation = wedding_bride_left + camera = camera_event_left_wedding + } + center_portrait = { + character = scope:officiant + animation = wedding_priest + } + right_portrait = { + character = scope:spouse_2_portrait + animation = wedding_groom_right + camera = camera_event_right_wedding + } + + trigger = { + exists = scope:activity.special_guest:spouse_1 + exists = scope:activity.special_guest:spouse_2 + NOR = { + scope:activity.special_guest:spouse_1 = this + scope:activity.special_guest:spouse_2 = this + } + } + + immediate = { + if = { + limit = { + location.culture = { has_graphical_india_culture_group_trigger = yes } + } + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_india" + } + else_if = { + limit = { + OR = { + location.culture = { has_graphical_mena_culture_group_trigger = yes } + location.culture = { has_graphical_steppe_culture_group_trigger = yes } + location.culture = { has_graphical_african_culture_group_trigger = yes } + } + } + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_mena" + } + else = { + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_west" + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1 + } + 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 } + } + scope:spouse_1 = { + show_as_tooltip = { + marry = scope:spouse_2 + } + } + if = { + limit = { + scope:activity.special_guest:spouse_1 = { + sex_opposite_of = scope:activity.special_guest:spouse_2 + is_male = yes + } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_2_portrait + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_1_portrait + } + } + else = { + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1_portrait + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2_portrait + } + } + base_legitimacy_intent_reward = yes + } + + option = { + name = ep2_wedding.0150.a + } +} + +# For the spouses +ep2_wedding.0151 = { + type = activity_event + title = ep2_wedding.0150.t + desc = { + 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 } } + } + desc = ep2_wedding.0151.desc.murder + } + random_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = education_diplomacy_3 + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = diplomat + has_trait = administrator + has_trait = ambitious + } + } + desc = ep2_wedding.0151.desc_diplo + } + triggered_desc = { + trigger = { + OR = { + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + has_trait = scholar + has_trait = theologian + has_trait = zealous + has_character_modifier = bp1_superstition_modifier + } + } + desc = ep2_wedding.0151.desc_religious + } + triggered_desc = { + trigger = { + OR = { + has_trait = lifestyle_reveler + has_trait = gluttonous + has_trait = gregarious + has_trait = drunkard + has_trait = hashishiyah + } + } + desc = ep2_wedding.0151.desc_party + } + triggered_desc = { + trigger = { + OR = { + has_trait = seducer + has_trait = lustful + has_trait = rakish + has_trait = deviant + has_trait = adulterer + has_trait = fornicator + } + } + desc = ep2_wedding.0151.desc_seducer + } + triggered_desc = { + trigger = { + OR = { + has_trait = chaste + has_trait = humble + has_trait = shy + has_trait = reclusive + } + } + desc = ep2_wedding.0151.desc_shy + } + triggered_desc = { + trigger = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = callous + has_trait = irritable + has_trait = impatient + } + } + desc = ep2_wedding.0151.desc_arrogant + } + triggered_desc = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + desc = ep2_wedding.0151.desc_paranoid + } + triggered_desc = { + trigger = { + OR = { + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = disfigured + has_trait = scarred + has_trait = blind + has_trait = beauty_bad + has_trait = physique_bad + has_trait = clubfooted + has_trait = hunchbacked + has_trait = weak + has_trait = scaly + has_trait = wheezing + has_trait = bleeder + } + } + desc = ep2_wedding.0151.desc_appearance + } + desc = ep2_wedding.0151.desc + } + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = scope:spouse_1_portrait + animation = wedding_bride_left + camera = camera_event_left_wedding + } + center_portrait = { + character = scope:officiant + animation = wedding_priest + } + right_portrait = { + character = scope:spouse_2_portrait + animation = wedding_groom_right + camera = camera_event_right_wedding + } + + trigger = { + exists = scope:activity.special_guest:spouse_1 + exists = scope:activity.special_guest:spouse_2 + root = scope:activity.special_guest:spouse_1 + } + + immediate = { + if = { + limit = { + location.culture = { has_graphical_india_culture_group_trigger = yes } + } + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_india" + } + else_if = { + limit = { + OR = { + location.culture = { has_graphical_mena_culture_group_trigger = yes } + location.culture = { has_graphical_steppe_culture_group_trigger = yes } + location.culture = { has_graphical_african_culture_group_trigger = yes } + } + } + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_mena" + } + else = { + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_west" + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1 + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2 + } + if = { + limit = { + scope:activity.special_guest:spouse_1 = { + sex_opposite_of = scope:activity.special_guest:spouse_2 + is_male = yes + } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_2_portrait + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_1_portrait + } + } + else = { + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1_portrait + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2_portrait + } + } + } + + option = { + name = ep2_wedding.0151.a + scope:spouse_1 = { + marry = scope:spouse_2 + } + if = { + limit = { scope:officiant ?= scope:spouse_1.faith.religious_head } + scope:spouse_1 = { + add_piety = major_piety_gain + } + } + else_if = { + limit = { scope:officiant.involved_activity ?= scope:activity } + scope:spouse_1 = { + add_piety = medium_piety_gain + } + } + else = { + scope:spouse_1 = { + add_piety = minor_piety_gain + } + } + if = { + limit = { scope:officiant ?= scope:spouse_2.faith.religious_head } + scope:spouse_2 = { + add_piety = major_piety_gain + } + } + else_if = { + limit = { scope:officiant.involved_activity ?= scope:activity } + scope:spouse_2 = { + add_piety = medium_piety_gain + } + } + else = { + scope:spouse_2 = { + add_piety = minor_piety_gain + } + } + if = { + limit = { + root = scope:host + } + scope:activity.activity_location.county = { + add_county_modifier = { + modifier = ruler_married_here_county_modifier + years = 10 + } + } + } + scope:spouse_1.dynasty ?= { add_dynasty_prestige = medium_dynasty_prestige_gain } + if = { + limit = { + NOT = { scope:spouse_2.dynasty ?= scope:spouse_1.dynasty } + } + scope:spouse_2.dynasty ?= { add_dynasty_prestige = medium_dynasty_prestige_gain } + } + if = { + limit = { + this = scope:spouse_1 + } + create_character_memory = { + type = grand_wedding_got_married + participants = { + spouse = scope:spouse_2 + } + } + } + else = { + create_character_memory = { + type = grand_wedding_got_married + participants = { + spouse = scope:spouse_1 + } + } + } + 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 + } + # The marriage should not be consummated before the Wedding Night! + hidden_effect = { + scope:spouse_1 = { + add_character_modifier = { modifier = wedding_fertility_delay_modifier } + } + scope:spouse_2 = { + add_character_modifier = { modifier = wedding_fertility_delay_modifier } + } + } + # Progress to next phase + hidden_effect = { + scope:activity = { progress_activity_phase_after = { days = 1 } } + } + } + + option = { + name = ep2_wedding.0151.b + trigger = { + is_ai = no + } + custom_tooltip = ep2_wedding.0151.b.tt + scope:activity = { + set_variable = wedding_invalidated_said_no + } + add_character_flag = grand_wedding_said_no + ai_chance = { + base = 0 + } + } +} + +scripted_effect ep2_wedding_cleanup_jitter_modifier_effect = { + if = { + limit = { has_character_modifier = wedding_confident_groom } + remove_character_modifier = wedding_confident_groom + } + if = { + limit = { has_character_modifier = wedding_confident_bride } + remove_character_modifier = wedding_confident_bride + } + if = { + limit = { has_character_modifier = wedding_jitters } + remove_character_modifier = wedding_jitters + } +} + +# I DON'T: the consequences +ep2_wedding.0152 = { + type = character_event + title = ep2_wedding.0152.t + desc = ep2_wedding.0152.desc + theme = wedding_ceremony_activity + + left_portrait = { + character = root + animation = wedding_objection_start + } + right_portrait = { + character = scope:spouse_2 + animation = shock + } + lower_right_portrait = scope:scorned_matchmaker + + immediate = { + scope:spouse_2.matchmaker = { + if = { + limit = { + this != scope:spouse_2 + } + save_scope_as = scorned_matchmaker + } + } + scope:previous_host = { + # the betrothal is broken: hand out the consequences + break_grand_wedding_betrothal_effect = yes + + # The wedding is invalidated: get a refund + custom_tooltip = { + text = ep2_wedding.9000.tt + add_gold = var:gwedding_gold_recoup_value + } + } + create_character_memory = { + type = grand_wedding_refused_to_marry + participants = { + spouse = scope:spouse_2 + } + } + ep2_wedding_cleanup_jitter_modifier_effect = yes + scope:spouse_2 = { + ep2_wedding_cleanup_jitter_modifier_effect = yes + } + } + + option = { + name = ep2_wedding.0152.a + } + + after = { + remove_character_flag = grand_wedding_said_no + scope:previous_host = { remove_variable = gwedding_gold_recoup_value } + } +} + + +# ON START - BANQUET + +ep2_wedding.0200 = { + type = activity_event + title = ep2_wedding.0200.t + desc = { + first_valid = { + triggered_desc = { + trigger = { #spouse and bloody wedding + this = scope:host + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + root = scope:spouse_1 + } + desc = ep2_wedding.0200.desc.murder_spouse + } + triggered_desc = { #bloody wedding + trigger = { + this = scope:host + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + root != scope:spouse_1 + } + desc = ep2_wedding.0200.desc.murder + } + triggered_desc = { #spouses + trigger = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + } + desc = ep2_wedding.0200.desc_spouse_dislike + } + triggered_desc = { + trigger = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + } + desc = ep2_wedding.0200.desc_spouse_like + } + triggered_desc = { + trigger = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + OR = { + has_trait = lifestyle_reveler + has_trait = gluttonous + has_trait = gregarious + has_trait = drunkard + has_trait = hashishiyah + } + } + desc = ep2_wedding.0200.desc_spouse_party + } + triggered_desc = { + trigger = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + OR = { + has_trait = chaste + has_trait = humble + has_trait = shy + has_trait = reclusive + } + } + desc = ep2_wedding.0200.desc_spouse_shy + } + triggered_desc = { + trigger = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = callous + has_trait = irritable + has_trait = impatient + } + } + desc = ep2_wedding.0200.desc_spouse_arrogant + } + triggered_desc = { + trigger = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + desc = ep2_wedding.0200.desc_spouse_fallback + } + triggered_desc = { #host + trigger = { + root = scope:host + } + desc = ep2_wedding.0200.desc_host + } + desc = ep2_wedding.0200.desc #guest + } + } + theme = wedding_banquet_activity + left_portrait = { + trigger = { + NOR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + character = root + animation = toast_goblet + } + center_portrait = { + character = scope:spouse_1 + camera = camera_event_left_wedding + triggered_animation = { + trigger = { + scope:spouse_1 = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + } + } + animation = disapproval + } + animation = wedding_bride_left + } + right_portrait = { + character = scope:spouse_2 + camera = camera_event_right_wedding + triggered_animation = { + trigger = { + scope:spouse_2 = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_1 } + } + } + animation = disapproval + } + animation = wedding_groom_right + } + + trigger = { + exists = scope:activity + } + + immediate = { + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.var:spouse_2_var = { save_scope_as = spouse_2 } + if = { + limit = { + root = scope:spouse_1 + } + scope:spouse_2 = { + save_scope_as = my_spouse + } + } + else_if = { + limit = { + root = scope:spouse_2 + } + scope:spouse_1 = { + save_scope_as = my_spouse + } + } + } + + option = { + name = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + } + text = ep2_wedding.0200.a.murder + } + name = { + trigger = { + NOT = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + } + } + text = ep2_wedding.0200.a + } + if = { + limit = { + OR = { + root = scope:host + root = scope:spouse_1 + root = scope:spouse_2 + } + } + add_prestige = minor_prestige_gain + } + } +} + +# ON START - WEDDING NIGHT + +ep2_wedding.0300 = { + type = activity_event + title = ep2_wedding.0300.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = special_type + option = wedding_type_bloody + } + } + root = scope:spouse_1 + } + desc = ep2_wedding.0300.desc.murder_spouse + } + triggered_desc = { + trigger = { + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + desc = ep2_wedding.0300.desc_spouse + } + triggered_desc = { + trigger = { + root = scope:host + } + desc = ep2_wedding.0300.desc + } + desc = ep2_wedding.0300.desc_guest + } + } + theme = wedding_night_activity + left_portrait = { + trigger = { + NOR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + character = root + animation = happiness + } + center_portrait = { + character = scope:spouse_1 + triggered_animation = { + trigger = { + scope:spouse_1 = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_2 } + } + } + animation = disapproval + } + animation = reception_groom_left + } + right_portrait = { + character = scope:spouse_2 + triggered_animation = { + trigger = { + scope:spouse_2 = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:spouse_1 } + } + } + animation = dismissal + } + animation = reception_bride_right + } + + immediate = { + scope:activity.special_guest:spouse_1 ?= { + save_scope_as = spouse_1 + } + scope:activity.special_guest:spouse_2 ?= { + save_scope_as = spouse_2 + } + if = { + limit = { + root = scope:activity.special_guest:spouse_1 + } + scope:activity.special_guest:spouse_2 = { save_scope_as = other_spouse } + } + else_if = { + limit = { + root = scope:activity.special_guest:spouse_2 + } + scope:activity.special_guest:spouse_1 = { save_scope_as = other_spouse } + } + hidden_effect = { + scope:spouse_1 ?= { + if = { + limit = { + has_character_modifier = wedding_fertility_delay_modifier + } + remove_character_modifier = wedding_fertility_delay_modifier + } + } + scope:spouse_2 ?= { + if = { + limit = { + has_character_modifier = wedding_fertility_delay_modifier + } + remove_character_modifier = wedding_fertility_delay_modifier + } + } + } + } + + option = { + name = ep2_wedding.0300.a + } +} + +# INVALIDATED + +# For the host (not spouse) and the guests - one of the spouses died + +ep2_wedding.0900 = { + type = character_event + title = ep2_wedding.0900.t + desc = ep2_wedding.0900.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:sad_spouse + animation = grief + } + + immediate = { + if = { + limit = { + scope:spouse_1 ?= { is_alive = yes } + } + scope:spouse_1 = { save_scope_as = sad_spouse } + scope:spouse_2 = { save_scope_as = dead_spouse } + } + else = { + scope:spouse_2 = { save_scope_as = sad_spouse } + scope:spouse_1 = { save_scope_as = dead_spouse } + } + if = { + limit = { + scope:sad_spouse = { has_character_modifier = wedding_fertility_delay_modifier } + } + scope:sad_spouse = { remove_character_modifier = wedding_fertility_delay_modifier } + } + if = { + limit = { + root = scope:previous_host + } + # The wedding is invalidated: get a refund + custom_tooltip = { + text = ep2_wedding.9000.tt + add_gold = var:gwedding_gold_recoup_value + } + } + } + + option = { + name = ep2_wedding.0900.a + } + + after = { + if = { + limit = { + has_variable = gwedding_gold_recoup_value + } + remove_variable = gwedding_gold_recoup_value + } + } +} + +# For the spouses - the other spouse died + +ep2_wedding.0910 = { + type = character_event + title = ep2_wedding.0900.t + desc = ep2_wedding.0910.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = grief + } + + immediate = { + if = { + limit = { + root = scope:previous_host + } + # The wedding is invalidated: get a refund + custom_tooltip = { + text = ep2_wedding.9000.tt + add_gold = var:gwedding_gold_recoup_value + } + } + create_character_memory = { + type = grand_wedding_death_at_wedding + participants = { + dead_spouse = scope:dead_spouse + } + } + error_log = "Invalidating [activity.GetName] of [activity.GetOwner.GetLogName] because a spouse is dead" + } + + option = { + name = ep2_wedding.0910.a + } + + after = { + if = { + limit = { + has_variable = gwedding_gold_recoup_value + } + 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 + } + remove_character_modifier = wedding_fertility_delay_modifier + } + } +} + +# If the host who is a spouse dies, notify the heir +ep2_wedding.0915 = { + type = character_event + title = ep2_wedding.0900.t + desc = ep2_wedding.0915.desc + theme = family + left_portrait = { + character = root + animation = sadness + } + lower_center_portrait = scope:previous_host + + immediate = { + # The wedding is invalidated: get a refund + custom_tooltip = { + text = ep2_wedding.9015.tt + add_gold = scope:previous_host.var:gwedding_gold_recoup_value + } + } + + option = { + name = ep2_wedding.0915.a + } + + after = { + if = { + limit = { + has_variable = gwedding_gold_recoup_value + } + remove_variable = gwedding_gold_recoup_value + } + } +} + +# A spouse has been imprisoned: for the prisoner +ep2_wedding.0920 = { + type = character_event + title = ep2_wedding.0900.t + desc = ep2_wedding.0920.desc + theme = prison + left_portrait = { + character = root + triggered_animation = { + trigger = { is_in_prison_type = house_arrest } + animation = prisonhouse + } + triggered_animation = { + trigger = { is_in_prison_type = dungeon } + animation = prisondungeon + } + } + + immediate = { + if = { + limit = { + root = scope:previous_host + } + # The wedding is invalidated: get a refund + custom_tooltip = { + text = ep2_wedding.9000.tt + add_gold = var:gwedding_gold_recoup_value + } + } + create_character_memory = { + type = grand_wedding_missed_wedding_in_prison + participants = { + spouse = scope:free_spouse + } + } + } + + option = { + name = ep2_wedding.0920.a + } + + after = { + if = { + limit = { + has_variable = gwedding_gold_recoup_value + } + 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 + } + remove_character_modifier = wedding_fertility_delay_modifier + } + } +} + +# A spouse has been imprisoned: for everyone else +ep2_wedding.0921 = { + type = character_event + title = ep2_wedding.0900.t + desc = ep2_wedding.0921.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = sadness + } + lower_center_portrait = scope:prisoner_spouse + + immediate = { + if = { + limit = { + root = scope:previous_host + } + # The wedding is invalidated: get a refund + custom_tooltip = { + text = ep2_wedding.9000.tt + add_gold = var:gwedding_gold_recoup_value + } + } + if = { + limit = { + root = scope:free_spouse + } + create_character_memory = { + type = grand_wedding_canceled_in_prison + participants = { + spouse = scope:prisoner_spouse + } + } + } + } + + option = { + name = ep2_wedding.0921.a + } + + after = { + if = { + limit = { + has_variable = gwedding_gold_recoup_value + } + 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 + } + remove_character_modifier = wedding_fertility_delay_modifier + } + } +} + +# CONCLUSION - HOST + +ep2_wedding.0950 = { + type = activity_event + title = ep2_wedding.0950.t + desc = ep2_wedding.0950.desc + theme = wedding_ceremony_activity + left_portrait = { + trigger = { + NOR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + character = root + animation = happiness + } + center_portrait = { + character = scope:spouse_1 + animation = wedding_bride_left + camera = camera_event_left_wedding + } + right_portrait = { + character = scope:spouse_2 + animation = wedding_groom_right + camera = camera_event_right_wedding + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_end" + play_music_cue = weddingend_cue + show_as_tooltip = { + scope:spouse_1 = { marry = scope:spouse_2 } + tooltip_disburse_wedding_host_activity_rewards = yes + } + save_scope_as = root_scope + # if the host is also a spouse, we disburse the special host-spouse rewards to the host, and the regular spouse rewards to the other spouse + if = { + limit = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + show_as_tooltip = { disburse_wedding_spouse_host_activity_rewards = yes } + } + else = { #the spouses already had a memory created during the ceremony + create_character_memory = { + type = grand_wedding_completed_host + participants = { + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + } + } + + option = { + name = ep2_wedding.0950.a + } +} + +# CONCLUSION - SPOUSES + +ep2_wedding.0960 = { + type = activity_event + title = ep2_wedding.0950.t + desc = ep2_wedding.0960.desc + theme = wedding_ceremony_activity + left_portrait = { + character = scope:spouse_1 + animation = wedding_bride_left + camera = camera_event_left_wedding + } + right_portrait = { + character = scope:spouse_2 + animation = wedding_groom_right + camera = camera_event_right_wedding + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_end" + play_music_cue = weddingend_cue + save_scope_as = root_scope + show_as_tooltip = { + scope:spouse_1 = { marry = scope:spouse_2 } + disburse_wedding_spouse_activity_rewards = yes + } + if = { + limit = { + root = scope:spouse_1 + } + scope:spouse_2 = { save_scope_as = other_spouse } + } + else_if = { + limit = { + root = scope:spouse_2 + } + scope:spouse_1 = { save_scope_as = other_spouse } + } + } + + option = { + name = ep2_wedding.0950.a + } +} + +# CONCLUSION - GUESTS + +ep2_wedding.0970 = { + type = activity_event + title = ep2_wedding.0950.t + desc = ep2_wedding.0970.desc + theme = wedding_ceremony_activity + left_portrait = { + character = scope:spouse_1 + animation = wedding_bride_left + camera = camera_event_left_wedding + } + right_portrait = { + character = scope:spouse_2 + animation = wedding_groom_right + camera = camera_event_right_wedding + } + + immediate = { + play_sound_effect = "event:/DLC/EP2/SFX/Stingers/Grand_Activities/ep2_mx_sting_wedding_end" + play_music_cue = weddingend_cue + save_scope_as = root_scope + show_as_tooltip = { + scope:spouse_1 = { marry = scope:spouse_2 } + tooltip_disburse_wedding_guest_activity_rewards = yes + } + create_character_memory = { + type = grand_wedding_completed_guest + participants = { + spouse_1 = scope:spouse_1 + spouse_2 = scope:spouse_2 + } + } + } + + option = { + name = ep2_wedding.0970.a + } +} + +# INVALIDATION - SPOUSE DISAPPEARS +ep2_wedding.0997 = { + type = character_event + title = ep2_wedding.0900.t + desc = { + desc = ep2_wedding.0997.desc_intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + root = scope:spouse_1 + root = scope:spouse_2 + } + } + desc = ep2_wedding.0997.desc_spouse + } + desc = ep2_wedding.0997.desc_generic + } + } + + theme = realm + + left_portrait = { + character = root + 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 + } +} + +# FALLBACK INVALIDATION +ep2_wedding.0998 = { + type = character_event + title = ep2_wedding.0900.t + desc = ep2_wedding.0998.desc + theme = realm + + left_portrait = { + character = root + 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 + } + if = { + limit = { + exists = scope:spouse_1 + exists = scope:spouse_2 + } + show_as_tooltip = { + scope:spouse_1 = { + break_betrothal = scope:spouse_2 + } + } + } + } + + option = { + name = ep2_wedding.0998.a + } +} + +# INVALIDATION - HOST TIER TOO LOW +ep2_wedding.0999 = { + type = character_event + title = ep2_wedding.0999.t + desc = ep2_wedding.0999.desc + theme = realm + + left_portrait = { + character = scope:host + animation = grief + } + + immediate = { + } + + option = { + name = ep2_wedding.0999.a + } +} + +# CEREMONY EVENTS + +################################################## +# Artistic Differences +# by Claudia Baldassi +# ep2_wedding.1000 +################################################## + +# The other party arrives early and criticizes your chosen options. + +scripted_trigger ep2_wedding_1000_valid_relative_trigger = { + is_alive = yes + is_ai = yes + is_participant_in_activity = scope:activity + age >= 10 + location = root.location + NOT = { has_character_flag = busy_in_wgathering_event } +} + +ep2_wedding.1000 = { + type = activity_event + title = ep2_wedding.1000.t + desc = { + desc = ep2_wedding.1000.desc + random_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + } + desc = ep2_wedding.1000.desc_servants + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_good + } + } + } + desc = ep2_wedding.1000.desc_dec + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + } + desc = ep2_wedding.1000.desc_dec_low + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_good + } + } + } + desc = ep2_wedding.1000.desc_entertainment + } + desc = ep2_wedding.1000.desc_fallback + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = eyeroll + } + right_portrait = { + character = scope:1000_relative + animation = disapproval + } + + cooldown = { years = 5 } + + weight_multiplier = { + base = 1 + modifier = { + scope:activity.special_guest:spouse_2 = { + any_close_family_member = { + is_alive = yes + is_ai = yes + is_participant_in_activity = scope:activity + has_trait = fickle + } + } + add = 1 + } + modifier = { + scope:activity.special_guest:spouse_2 = { + any_close_family_member = { + is_alive = yes + is_ai = yes + is_participant_in_activity = scope:activity + has_trait = arrogant + } + } + add = 3 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = 2 + } + modifier = { + scope:activity.special_guest:spouse_2 = { + any_close_family_member = { + is_alive = yes + is_ai = yes + is_participant_in_activity = scope:activity + root.intent_target ?= this + } + } + add = 3 + } + modifier = { + scope:activity.special_guest:spouse_2 ?= { + house_has_feud_relation_with_trigger = { TARGET = scope:activity.special_guest:spouse_1 } + } + add = 5 + } + } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:host = root + location = scope:activity.activity_location + scope:activity.special_guest:spouse_1 = root + + scope:activity.special_guest:spouse_2 = { + any_close_family_member = { + ep2_wedding_1000_valid_relative_trigger = yes + } + } + } + + immediate = { + add_character_flag = busy_in_wgathering_event + + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1 + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2 + } + + scope:spouse_2 = { + random_close_family_member = { + limit = { + ep2_wedding_1000_valid_relative_trigger = yes + root.intent_target ?= this + } + alternative_limit = { + ep2_wedding_1000_valid_relative_trigger = yes + } + save_scope_as = 1000_relative + add_character_flag = busy_in_wgathering_event + } + } + } + + # Option A: mediate + option = { + name = ep2_wedding.1000.a + duel = { + skill = diplomacy + target = scope:1000_relative + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1000.a.success + send_interface_toast = { + title = ep2_wedding.1000.a.success.tt + left_icon = root + right_icon = scope:1000_relative + scope:activity = { + add_activity_log_entry = { + key = wedding_artistic_mediate_log + tags = { good } + score = 20 + character = root + target = scope:1000_relative + + # Effect + root = { + reverse_add_opinion = { + target = scope:1000_relative + modifier = impressed_opinion + opinion = 20 + } + add_prestige = minor_prestige_gain + stress_impact = { + base = minor_stress_impact_loss + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + } + } + } + } + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1000.a.failure + send_interface_toast = { + title = ep2_wedding.1000.a.failure.tt + left_icon = root + right_icon = scope:1000_relative + scope:activity = { + add_activity_log_entry = { + key = wedding_artistic_mediate_fail_log + tags = { bad } + score = 20 + character = root + target = scope:1000_relative + } + root = { + stress_impact = { + base = minor_stress_impact_gain + impatient = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = impatient + } + modifier = { + add = -50 + has_trait = arrogant + } + } + } + + # Option B: insult + option = { + name = ep2_wedding.1000.b + scope:activity = { + add_activity_log_entry = { + key = wedding_artistic_insult_log + tags = { bad } + score = 20 + character = root + target = scope:1000_relative + + # Effect + root = { + reverse_add_opinion = { + target = scope:1000_relative + modifier = insult_opinion + opinion = -20 + } + add_dread = minor_dread_gain + } + } + } + + stress_impact = { + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = patient + } + modifier = { + add = -50 + has_trait = humble + } + } + } + + #Option C: I don't care + option = { + name = ep2_wedding.1000.c + trigger = { + has_activity_intent = reduce_stress_intent + } + custom_tooltip = available_because_intent_tt + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 80 + modifier = { + has_trait = lazy + add = 100 + } + } + } + + after = { + remove_character_flag = busy_in_wgathering_event + scope:1000_relative = { remove_character_flag = busy_in_wgathering_event } + } +} + +################################################## +# A Magnificent Welcome +# by Claudia Baldassi +# ep2_wedding.1010 +################################################## + +# You have an occasion to kickstart your Diplomacy/Seduce targeting efforts + +ep2_wedding.1010 = { + type = activity_event + title = ep2_wedding.1010.t + desc = { + desc = ep2_wedding.1010.desc + first_valid = { + triggered_desc = { + trigger = { + has_activity_intent = diplomatic_intent + } + desc = ep2_wedding.1010.diplo + } + triggered_desc = { + trigger = { + has_activity_intent = woo_attendee_intent + } + desc = ep2_wedding.1010.seduce + } + triggered_desc = { + trigger = { + exists = scope:1010_match + } + desc = ep2_wedding.1010.match + } + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = happiness + } + center_portrait = { + trigger = { + exists = scope:1010_match + } + character = scope:1010_match + animation = boredom + } + right_portrait = { + character = scope:1010_target + animation = dismissal + } + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + OR = { + has_activity_intent = diplomatic_intent + has_activity_intent = woo_attendee_intent + } + + scope:host = root + intent_target.location = root.location + + intent_target = { + is_ai = yes + NOT = { has_character_flag = busy_in_wgathering_event } + } + } + + immediate = { + intent_target = { + save_scope_as = 1010_target + add_character_flag = busy_in_wgathering_event + } + if = { + limit = { + any_child = { + is_adult = no + is_betrothed = no + is_participant_in_activity = scope:activity + is_ai = yes + NOT = { has_character_flag = busy_in_wgathering_event } + } + } + random_child = { + limit = { + is_adult = no + is_betrothed = no + is_participant_in_activity = scope:activity + is_ai = yes + NOT = { has_character_flag = busy_in_wgathering_event } + } + save_scope_as = 1010_match + add_character_flag = busy_in_wgathering_event + } + } + add_character_flag = busy_in_wgathering_event + } + + #Option A: gardens + option = { + name = ep2_wedding.1010.a + random_list = { + # target is impressed + 60 = { + modifier = { + scope:activity.activity_location.county = { + development_level >= medium_development_level + } + add = 15 + } + modifier = { + has_trait = lifestyle_gardener + add = 25 + } + modifier = { + has_trait = lifestyle_herbalist + add = 25 + } + modifier = { + any_court_position_holder = { + type = court_gardener_court_position + } + add = 40 + } + modifier = { + scope:activity.activity_location = { + has_building_or_higher = orchards_01 + } + add = 20 + } + modifier = { + scope:activity.activity_location = { + has_building_or_higher = royal_garden_01 + } + add = 50 + } + desc = ep2_wedding.1010.a.success + send_interface_toast = { + title = ep2_wedding.1010.a.success.tt + left_icon = scope:1010_target + scope:activity = { + add_activity_log_entry = { + key = wedding_welcome_garden_log + tags = { good } + score = 20 + character = root + target = scope:1010_target + + # Effect + root = { + reverse_add_opinion = { + target = scope:1010_target + modifier = impressed_opinion + opinion = 20 + } + if = { + limit = { + has_activity_intent = woo_attendee_intent + can_set_relation_lover_trigger = { CHARACTER = scope:1010_target } + } + progress_towards_lover_effect = { + REASON = lover_atmospheric_location + CHARACTER = scope:1010_target + OPINION = default_lover_opinion + } + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + lustful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + } + } + } + #target is not impressed + 40 = { + modifier = { + diplomacy < 10 + add = 10 + } + modifier = { + stewardship < 10 + add = 10 + } + modifier = { + scope:activity.activity_location.county = { + development_level <= bad_development_level + } + add = 30 + } + desc = ep2_wedding.1010.a.failure + send_interface_toast = { + title = ep2_wedding.1010.a.failure.tt + left_icon = scope:1010_target + scope:activity = { + add_activity_log_entry = { + key = wedding_welcome_garden_fail_log + tags = { bad } + score = 20 + character = root + target = scope:1010_target + + # Effect + root = { + reverse_add_opinion = { + target = scope:1010_target + modifier = bored_opinion + opinion = -20 + } + stress_impact = { + base = minor_stress_impact_gain + lustful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + } + } + } + } + } + } + ai_chance = { + base = 100 + modifier = { + scope:activity.activity_location.county = { + development_level >= medium_development_level + } + add = 15 + } + modifier = { + has_trait = lifestyle_gardener + add = 25 + } + modifier = { + has_trait = lifestyle_herbalist + add = 25 + } + modifier = { + any_court_position_holder = { + type = court_gardener_court_position + } + add = 40 + } + modifier = { + scope:activity.activity_location = { + has_building_or_higher = orchards_01 + } + add = 20 + } + modifier = { + scope:activity.activity_location = { + has_building_or_higher = royal_garden_01 + } + add = 50 + } + } + } + + #Option B: venue + option = { + name = ep2_wedding.1010.b + random_list = { + # target is impressed + 60 = { + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_good + } + } + add = 10 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_good + } + } + add = 10 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_good + } + } + add = 10 + } + desc = ep2_wedding.1010.b.success + send_interface_toast = { + title = ep2_wedding.1010.a.success.tt + left_icon = scope:1010_target + scope:activity = { + add_activity_log_entry = { + key = wedding_welcome_ceremony_log + tags = { good } + score = 20 + character = root + target = scope:1010_target + + # Effect + root = { + reverse_add_opinion = { + target = scope:1010_target + modifier = impressed_opinion + opinion = 20 + } + if = { + limit = { + has_activity_intent = woo_attendee_intent + can_set_relation_lover_trigger = { CHARACTER = scope:1010_target } + } + progress_towards_lover_effect = { + REASON = lover_atmospheric_location + CHARACTER = scope:1010_target + OPINION = default_lover_opinion + } + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + lustful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + } + } + } + #target is not impressed + 40 = { + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + add = 10 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_bad + } + } + add = 10 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_bad + } + } + add = 10 + } + desc = ep2_wedding.1010.b.failure + send_interface_toast = { + title = ep2_wedding.1010.a.failure.tt + left_icon = scope:1010_target + scope:activity = { + add_activity_log_entry = { + key = wedding_welcome_ceremony_fail_log + tags = { bad } + score = 20 + character = root + target = scope:1010_target + + # Effect + root = { + reverse_add_opinion = { + target = scope:1010_target + modifier = bored_opinion + opinion = -20 + } + stress_impact = { + base = minor_stress_impact_gain + lustful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + } + } + } + } + } + } + ai_chance = { + base = 100 + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_good + } + } + add = 10 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_good + } + } + add = 10 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_good + } + } + add = 10 + } + } + } + + #Option C: nevermind + option = { + name = ep2_wedding.1010.c + reverse_add_opinion = { + target = scope:1010_target + modifier = feeling_welcome_opinion + opinion = 5 + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + } + } + after = { + remove_character_flag = busy_in_wgathering_event + scope:1010_target = { remove_character_flag = busy_in_wgathering_event } + if = { + limit = { + exists = scope:1010_match + } + scope:1010_match = { remove_character_flag = busy_in_wgathering_event } + } + } +} + +################################################## +# A Proper Match +# by Claudia Baldassi +# ep2_wedding.1080 +################################################## + +# Lay the ground for the matchmaking + +ep2_wedding.1080 = { + type = activity_event + title = ep2_wedding.1080.t + desc = { + desc = ep2_wedding.1080.desc + triggered_desc = { + trigger = { + exists = scope:matchmaking_2 + } + desc = ep2_wedding.1080.desc_2 + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:1080_target + animation = happiness + } + lower_left_portrait = scope:matchmaking_1 + lower_center_portrait = scope:matchmaking_2 + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + has_activity_intent = matchmaking_intent + + intent_target.location = root.location + location = scope:activity.activity_location + + intent_target = { + has_activity_state = passive + is_ai = yes + NOT = { has_character_flag = busy_in_wgathering_event } + } + + scope:activity = { + any_attending_character = { + is_ai = yes + location = root.location + has_activity_state = passive + can_marry_character_trigger = { CHARACTER = root.intent_target } + NOR = { + exists = betrothed + has_character_flag = busy_in_wgathering_event + is_close_or_extended_family_of = root.intent_target + } + trigger_if = { + limit = { + is_female = yes + } + age < marriage_female_fertility_cutoff_age_value + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + intent_target = { save_scope_as = 1080_target } + scope:1080_target = { add_character_flag = busy_in_wgathering_event } + add_character_flag = busy_in_wgathering_event + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + location = root.location + has_activity_state = passive + can_marry_character_trigger = { CHARACTER = root.intent_target } + NOR = { + exists = betrothed + has_character_flag = busy_in_wgathering_event + is_close_or_extended_family_of = root.intent_target + } + trigger_if = { + limit = { + is_female = yes + } + age < marriage_female_fertility_cutoff_age_value + } + } + save_scope_as = matchmaking_1 + add_character_flag = busy_in_wgathering_event + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + is_ai = yes + location = root.location + has_activity_state = passive + can_marry_character_trigger = { CHARACTER = root.intent_target } + NOR = { + exists = betrothed + has_character_flag = busy_in_wgathering_event + is_close_or_extended_family_of = root.intent_target + this = scope:matchmaking_1 + } + trigger_if = { + limit = { + is_female = yes + } + age < marriage_female_fertility_cutoff_age_value + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + location = root.location + has_activity_state = passive + can_marry_character_trigger = { CHARACTER = root.intent_target } + NOR = { + exists = betrothed + has_character_flag = busy_in_wgathering_event + is_close_or_extended_family_of = root.intent_target + this = scope:matchmaking_1 + } + trigger_if = { + limit = { + is_female = yes + } + age < marriage_female_fertility_cutoff_age_value + } + } + save_scope_as = matchmaking_2 + add_character_flag = busy_in_wgathering_event + } + } + } + } + + #Option A: Introduce to matchmaking_1 + option = { + name = ep2_wedding.1080.a + scope:1080_target = { + duel = { + skill = diplomacy + target = scope:matchmaking_1 + 60 = { # success - the matchmaking continues + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1080.a.success + root = { + send_interface_toast = { + title = ep2_wedding.1080.a.success.tt + left_icon = scope:1080_target + right_icon = scope:matchmaking_1 + scope:activity = { + add_activity_log_entry = { + key = wedding_propermatch_court_log + tags = { good } + score = 20 + character = scope:1080_target + target = scope:matchmaking_1 + + # Effect + scope:matchmaking_1 = { + add_opinion = { + target = scope:1080_target + modifier = impressed_opinion + opinion = 20 + } + } + } + } + } + } + scope:1080_target = { + set_variable = { + name = wedding_good_match + value = scope:matchmaking_1 + } + } + } + 40 = { # failure - you'll have to start again with someone else + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1080.a.failure + root = { + send_interface_toast = { + title = ep2_wedding.1080.a.failure.tt + left_icon = scope:1080_target + right_icon = scope:matchmaking_1 + scope:activity = { + add_activity_log_entry = { + key = wedding_propermatch_court_fail_log + tags = { bad } + score = 20 + character = scope:1080_target + target = scope:matchmaking_1 + } + } + } + } + scope:1080_target = { + set_variable = { + name = wedding_no_match + value = scope:matchmaking_1 + } + } + } + } + } + ai_chance = { + base = 200 + } + } + + #Option B: Introduce to matchmaking_2 + option = { + trigger = { + exists = scope:matchmaking_2 + } + name = ep2_wedding.1080.b + scope:1080_target = { + duel = { + skill = diplomacy + target = scope:matchmaking_2 + 50 = { # success - the matchmaking continues + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1080.b.success + root = { + send_interface_toast = { + title = ep2_wedding.1080.a.success.tt + left_icon = scope:1080_target + right_icon = scope:matchmaking_2 + scope:activity = { + add_activity_log_entry = { + key = wedding_propermatch_court_log + tags = { good } + score = 20 + character = scope:1080_target + target = scope:matchmaking_2 + + # Effect + scope:matchmaking_2 = { + add_opinion = { + target = scope:1080_target + modifier = impressed_opinion + opinion = 20 + } + } + } + } + } + } + scope:1080_target = { + set_variable = { + name = wedding_good_match + value = scope:matchmaking_2 + } + } + } + 50 = { # failure - you'll have to start again with someone else + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1080.b.failure + root = { + send_interface_toast = { + title = ep2_wedding.1080.a.failure.tt + left_icon = scope:1080_target + right_icon = scope:matchmaking_2 + scope:activity = { + add_activity_log_entry = { + key = wedding_propermatch_court_fail_log + tags = { bad } + score = 20 + character = scope:1080_target + target = scope:matchmaking_2 + } + } + } + } + scope:1080_target = { + set_variable = { + name = wedding_no_match + value = scope:matchmaking_2 + } + } + } + } + } + ai_chance = { + base = 200 + } + } + + #Option C: let's keep looking + option = { + name = ep2_wedding.1080.c + flavor = ep2_wedding.1080.c.tt + ai_chance = { + base = 100 + modifier = { + has_trait = fickle + add = 25 + } + } + } + after = { + remove_character_flag = busy_in_wgathering_event + scope:1080_target = { remove_character_flag = busy_in_wgathering_event } + scope:matchmaking_1 = { remove_character_flag = busy_in_wgathering_event } + if = { + limit = { exists = scope:matchmaking_2 } + scope:matchmaking_2 = { remove_character_flag = busy_in_wgathering_event } + } + } +} + +################################################## +# A Ritual Wash +# by Claudia Baldassi +# ep2_wedding.1100 +################################################## + +# Northern wedding: the bride goes to a bathhouse with the married women of her family: removal of clothes and kransen (golden circlet) + +ep2_wedding.1100 = { + type = activity_event + title = ep2_wedding.1100.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + desc = ep2_wedding.1100.desc_bride + } + desc = ep2_wedding.1100.desc_relative + } + triggered_desc = { + trigger = { + exists = scope:guest_3 + } + desc = ep2_wedding.1100.desc_extra_guest + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = scope:bride + animation = personality_content + } + center_portrait = { + character = scope:guest_2 + animation = admiration + } + right_portrait = { + character = scope:guest_1 + animation = wedding_happy_cry + } + lower_center_portrait = scope:guest_3 + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOT = { has_variable = has_had_event_1100 } + } + + culture = { has_cultural_pillar = heritage_north_germanic } + is_female = yes + is_ai = no + OR = { + AND = { + this = scope:activity.special_guest:spouse_1 + any_spouse = { + even_if_dead = yes + NOT = { exists = this } + } + any_former_spouse = { + even_if_dead = yes + NOT = { exists = this } + } + } + AND = { + this = scope:activity.special_guest:spouse_2 + any_spouse = { + even_if_dead = yes + NOT = { exists = this } + } + any_former_spouse = { + even_if_dead = yes + NOT = { exists = this } + } + } + AND = { + is_close_or_extended_family_of = scope:activity.special_guest:spouse_1 + scope:activity.special_guest:spouse_1 = { is_female = yes } + is_married = yes + } + AND = { + is_close_or_extended_family_of = scope:activity.special_guest:spouse_2 + scope:activity.special_guest:spouse_2 = { is_female = yes } + is_married = yes + } + } + trigger_if = { + limit = { + scope:activity.special_guest:spouse_1 = { + is_female = yes + } + } + scope:activity = { + any_attending_character = { + culture = { has_cultural_pillar = heritage_north_germanic } + is_female = yes + is_close_or_extended_family_of = scope:activity.special_guest:spouse_1 + is_married = yes + save_temporary_scope_as = guest_1 + } + } + scope:activity = { + any_attending_character = { + culture = { has_cultural_pillar = heritage_north_germanic } + is_female = yes + is_close_or_extended_family_of = scope:activity.special_guest:spouse_1 + is_married = yes + this != scope:guest_1 + } + } + } + trigger_else = { + scope:activity = { + any_attending_character = { + culture = { has_cultural_pillar = heritage_north_germanic } + is_female = yes + is_close_or_extended_family_of = scope:activity.special_guest:spouse_2 + is_married = yes + is_ai = yes + save_temporary_scope_as = guest_1 + } + } + scope:activity = { + any_attending_character = { + culture = { has_cultural_pillar = heritage_north_germanic } + is_female = yes + is_close_or_extended_family_of = scope:activity.special_guest:spouse_2 + is_married = yes + is_ai = yes + this != scope:guest_1 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = reduce_stress_intent + add = 2 + } + modifier = { + is_ai = no + factor = 2 + } + } + + immediate = { + scope:activity = { + set_variable = has_had_event_1100 + } + if = { + limit = { + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + save_scope_as = bride + } + else_if = { + limit = { + scope:activity.special_guest:spouse_1 = { is_female = yes } + } + scope:activity.special_guest:spouse_1 = { save_scope_as = bride } + root = { save_scope_as = guest_1 } + } + else = { + scope:activity.special_guest:spouse_2 = { save_scope_as = bride } + root = { save_scope_as = guest_1 } + } + scope:bride = { + add_character_flag = busy_in_wgathering_event + } + scope:activity = { + random_attending_character = { + limit = { + culture = { has_cultural_pillar = heritage_north_germanic } + is_female = yes + is_close_or_extended_family_of = scope:bride + is_married = yes + is_ai = yes + NOR = { + has_character_flag = busy_in_wgathering_event + this = scope:guest_1 + } + } + if = { + limit = { + exists = scope:guest_1 + } + save_scope_as = guest_2 + } + else = { + save_scope_as = guest_1 + } + } + random_attending_character = { + limit = { + culture = { has_cultural_pillar = heritage_north_germanic } + is_female = yes + is_close_or_extended_family_of = scope:bride + is_married = yes + is_ai = yes + NOR = { + has_character_flag = busy_in_wgathering_event + this = scope:guest_1 + this = scope:guest_2 + } + } + if = { + limit = { + exists = scope:guest_2 + } + save_scope_as = guest_3 + } + else = { + save_scope_as = guest_2 + } + } + } + scope:guest_1 = { add_character_flag = busy_in_wgathering_event } + scope:guest_2 = { add_character_flag = busy_in_wgathering_event } + if = { + limit = { + exists = scope:guest_3 + } + scope:guest_3 = { add_character_flag = busy_in_wgathering_event } + } + } + + #Option A: follow tradition + option = { + name = ep2_wedding.1100.a + scope:activity = { + add_activity_log_entry = { + key = wedding_cleansing_log + tags = { good } + score = 50 + character = scope:bride + + # Effect + scope:bride = { + add_character_modifier = { + modifier = wedding_purified_modifier + years = 5 + } + } + } + } + scope:guest_1 = { + add_character_modifier = { + modifier = wedding_purified_modifier + years = 5 + } + } + scope:guest_2 = { + add_character_modifier = { + modifier = wedding_purified_modifier + years = 5 + } + } + if = { + limit = { exists = scope:guest_3 } + scope:guest_3 = { + add_character_modifier = { + modifier = wedding_purified_modifier + years = 5 + } + } + } + if = { + limit = { + scope:bride = { + any_vassal = { vassal_stance = courtly } + } + } + scope:bride = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:bride + modifier = wedding_traditional_ritual_opinion + } + } + } + } + else_if = { + limit = { + scope:bride.betrothed = { + any_vassal = { vassal_stance = courtly } + } + } + scope:bride.betrothed = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:bride + modifier = wedding_traditional_ritual_opinion + } + } + } + } + ai_chance = { + base = 100 + } + } + + #Option B: try something new + option = { + name = ep2_wedding.1100.b + trigger = { + this = scope:bride + } + random_list = { + 25 = {} #nothing happens + 25 = { + show_chance = no + trigger = { + can_set_relation_friend_trigger = { CHARACTER = scope:guest_1 } + } + set_relation_friend = { + target = scope:guest_1 + reason = friend_wedding_ritual + } + } + 25 = { + show_chance = no + trigger = { + can_set_relation_friend_trigger = { CHARACTER = scope:guest_2 } + } + set_relation_friend = { + target = scope:guest_2 + reason = friend_wedding_ritual + } + } + 25 = { + show_chance = no + trigger = { + exists = scope:guest_3 + can_set_relation_friend_trigger = { CHARACTER = scope:guest_3 } + } + set_relation_friend = { + target = scope:guest_3 + reason = friend_wedding_ritual + } + } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_cleansing_new_log + tags = { good } + score = 50 + character = scope:bride + + # Effect + } + } + stress_impact = { + shy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + #Option D: just enjoy the bath + option = { + name = ep2_wedding.1100.d + trigger = { + has_activity_intent = reduce_stress_intent + this = scope:bride + } + custom_tooltip = available_because_intent_tt + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 150 + modifier = { + has_trait = lazy + add = 100 + } + } + } + + #Option C: this is dumb + option = { + name = ep2_wedding.1100.c + if = { + limit = { + this = scope:bride + any_vassal = { vassal_stance = courtly } + } + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = root + modifier = wedding_no_ritual_opinion + } + } + } + else_if = { + limit = { + this = scope:bride + betrothed = { + any_vassal = { + vassal_stance = courtly + } + } + } + betrothed = { + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:bride + modifier = wedding_no_ritual_opinion + } + } + } + } + else_if = { + limit = { + this != scope:bride + } + scope:bride = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -20 + } + if = { + limit = { + NOT = { has_relation_rival = root } + } + progress_towards_rival_effect = { + REASON = rival_despised_ritual + CHARACTER = root + OPINION = 0 + } + } + } + } + add_character_modifier = { + modifier = wedding_thinking_outside_box_modifier + years = 10 + } + stress_impact = { + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + if = { + limit = { root = scope:bride } + scope:activity = { + add_activity_log_entry = { + key = wedding_cleansing_dismiss_log + tags = { good } + score = 50 + character = scope:bride + } + } + } + else = { + scope:activity = { + add_activity_log_entry = { + key = wedding_cleansing_log + tags = { good } + score = 50 + character = scope:bride + } + } + } + ai_chance = { + base = 75 + modifier = { + has_trait = cynical + add = 25 + } + modifier = { + has_trait = zealous + add = -25 + } + } + } + + after = { + scope:bride = { remove_character_flag = busy_in_wgathering_event } + scope:guest_1 = { remove_character_flag = busy_in_wgathering_event } + scope:guest_2 = { remove_character_flag = busy_in_wgathering_event } + if = { + limit = { + exists = scope:guest_3 + } + scope:guest_3 = { remove_character_flag = busy_in_wgathering_event } + } + } +} + +# CEREMONY EVENTS + +################################################## +# Could it Be You? +# by Claudia Baldassi +# ep2_wedding.1020 +################################################## + +# The spouses fall in love at first sight + +ep2_wedding.1020 = { + type = activity_event + title = ep2_wedding.1020.t + desc = ep2_wedding.1020.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:spouse_2 + animation = admiration + } + + cooldown = { years = 30 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOR = { + has_variable = has_had_event_1020 + has_variable = has_had_event_1180 + } + } + + scope:activity.special_guest:spouse_1 = { + num_of_relation_soulmate = 0 + NOT = { has_character_flag = busy_in_ceremony_event } + } + scope:activity.special_guest:spouse_2 = { + num_of_relation_soulmate = 0 + NOT = { has_character_flag = busy_in_ceremony_event } + } + + root = { + OR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + + scope:activity.special_guest:spouse_1 = { is_attracted_to_gender_of = scope:activity.special_guest:spouse_2 } + scope:activity.special_guest:spouse_2 = { is_attracted_to_gender_of = scope:activity.special_guest:spouse_1 } + scope:activity.special_guest:spouse_1 = { + can_set_relation_soulmate_trigger = { + CHARACTER = scope:activity.special_guest:spouse_2 + } + } + + # They should not know each other, as much as we can verify + scope:activity.special_guest:spouse_1 = { + NOR = { + has_relation_lover = scope:activity.special_guest:spouse_2 + has_relation_friend = scope:activity.special_guest:spouse_2 + has_relation_potential_lover = scope:activity.special_guest:spouse_2 + has_relation_crush = scope:activity.special_guest:spouse_2 + has_relation_potential_friend = scope:activity.special_guest:spouse_2 + } + } + NOT = { + scope:activity.special_guest:spouse_1 = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:activity.special_guest:spouse_2 } } + } + + trigger_if = { + limit = { + root = { is_ai = yes } + } + scope:activity.special_guest:spouse_1 = { is_ai = yes } + scope:activity.special_guest:spouse_2 = { is_ai = yes } + } + trigger_else = { + OR = { + scope:activity.special_guest:spouse_1 = { is_ai = yes } + scope:activity.special_guest:spouse_2 = { is_ai = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = woo_attendee_intent + intent_target ?= root.betrothed + add = 1 + } + } + + immediate = { + scope:activity = { + set_variable = has_had_event_1020 + } + if = { + limit = { + root = scope:activity.special_guest:spouse_1 + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2 + } + } + else = { + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_2 + } + } + add_character_flag = busy_in_ceremony_event + scope:spouse_2 = { add_character_flag = busy_in_ceremony_event } + } + + option = { + name = ep2_wedding.1020.a + scope:activity = { + add_activity_log_entry = { + key = wedding_first_sight_log + tags = { good } + score = 50 + character = root + target = scope:spouse_2 + + # Effect + root = { + set_relation_soulmate = { reason = soulmate_wedding_first_sight target = scope:spouse_2 } + reverse_add_opinion = { + target = scope:spouse_2 + modifier = love_opinion + opinion = 30 + } + if = { + limit = { + has_activity_intent = woo_attendee_intent + intent_target = scope:spouse_2 + } + complete_activity_intent = yes + } + # Achievements + player_succeeded_at_a_thousand_and_one_nights_achievement_effect = yes + } + } + } + } + after = { + remove_character_flag = busy_in_ceremony_event + scope:spouse_2 = { remove_character_flag = busy_in_ceremony_event } + } +} + +################################################## +# A Good/Bad Omen +# by Claudia Baldassi +# ep2_wedding.1030 +################################################## + +# A good or bad omen happens: how do you react? + +ep2_wedding.1030 = { + type = activity_event + title = ep2_wedding.1030.t + desc = { + desc = ep2_wedding.1030.desc + random_valid = { + triggered_desc = { + trigger = { + has_character_flag = good_thing_flag + } + desc = ep2_wedding.1030.desc_good1 + } + triggered_desc = { + trigger = { + has_character_flag = good_thing_flag + } + desc = ep2_wedding.1030.desc_good2 + } + triggered_desc = { + trigger = { + has_character_flag = good_thing_flag + } + desc = ep2_wedding.1030.desc_good3 + } + triggered_desc = { + trigger = { + has_character_flag = bad_thing_flag + } + desc = ep2_wedding.1030.desc_bad1 + } + triggered_desc = { + trigger = { + has_character_flag = bad_thing_flag + } + desc = ep2_wedding.1030.desc_bad2 + } + triggered_desc = { + trigger = { + has_character_flag = bad_thing_flag + } + desc = ep2_wedding.1030.desc_bad3 + } + } + desc = ep2_wedding.1030.desc_outro + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = bad_thing_flag + } + desc = ep2_wedding.1030.desc_bad + } + desc = ep2_wedding.1030.desc_good + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_character_flag = bad_thing_flag + } + animation = fear + } + animation = happiness + } + right_portrait = { + character = scope:1030_chatter + triggered_animation = { + trigger = { + has_character_flag = bad_thing_flag + } + animation = worry + } + animation = admiration + } + lower_center_portrait = { + character = scope:spouse_2 + } + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOT = { + has_variable = has_had_event_1030 + } + } + + scope:activity.special_guest:spouse_2 = { is_ai = yes } + scope:activity = { + any_attending_character = { + is_ai = yes + NOR = { + this = scope:activity.special_guest:spouse_2 + this = root + has_character_flag = busy_in_ceremony_event + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_character_modifier = bp1_superstition_modifier + add = 3 + } + modifier = { + is_ai = yes + factor = 0.3 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = 1 + } + } + + immediate = { + scope:activity = { + set_variable = has_had_event_1030 + } + hidden_effect = { + random_list = { + 50 = { + add_character_flag = good_thing_flag + } + 50 = { + add_character_flag = bad_thing_flag + } + } + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2 + add_character_flag = busy_in_ceremony_event + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1 + } + + scope:activity = { + random_attending_character = { + limit = { + NOR = { + scope:spouse_2 = this + root = this + } + is_ai = yes + } + save_scope_as = 1030_chatter + add_character_flag = busy_in_ceremony_event + } + } + + add_character_flag = busy_in_ceremony_event + + random = { + chance = legend_seed_chance_low + add_character_flag = wedding_legend_seed + } + } + + #Option A: good omen - excellent! + option = { + name = ep2_wedding.1030.a + trigger = { + has_character_flag = good_thing_flag + } + scope:activity = { + add_activity_log_entry = { + key = wedding_omen_good_log + tags = { good } + score = 50 + character = root + target = scope:spouse_2 + } + } + if = { + limit = { + has_activity_intent = reduce_stress_intent + } + stress_impact = { + base = medium_stress_impact_loss + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + } + } + } + + #Option B: dismiss bad omen + option = { + name = ep2_wedding.1030.b + trigger = { + has_character_flag = bad_thing_flag + NOT = { has_character_modifier = bp1_superstition_modifier } + } + if = { + limit = { + ai_rationality >= 40 + } + scope:activity = { + add_activity_log_entry = { + key = wedding_omen_dismissed_log + tags = { bad } + score = 50 + character = root + target = scope:spouse_2 + } + } + if = { + limit = { + has_activity_intent = reduce_stress_intent + } + stress_impact = { + base = minor_stress_impact_loss + } + } + } + else = { + stress_impact = { + base = minor_stress_impact_gain + } + scope:activity = { + add_activity_log_entry = { + key = wedding_omen_bad_log + tags = { bad } + score = 50 + character = root + target = scope:spouse_2 + } + } + } + ai_chance = { + base = 100 + } + } + + #Option c: bad omen - panic + option = { + name = ep2_wedding.1030.c + trigger = { + has_character_flag = bad_thing_flag + has_character_modifier = bp1_superstition_modifier + } + stress_impact = { + base = medium_stress_impact_gain + } + scope:activity = { + add_activity_log_entry = { + key = wedding_omen_bad_log + tags = { bad } + score = 50 + character = root + target = scope:spouse_2 + } + } + ai_chance = { + base = 100 + } + } + + #Option D: good omen - you get a legend seed! + option = { + name = ep2_wedding.1030.d + trigger = { + has_character_flag = good_thing_flag + NOR = { + has_personal_legend_seed = heroic + has_personal_legend_seed = holy + has_personal_legend_seed = legitimizing + } + has_character_flag = wedding_legend_seed + OR = { + scope:spouse_2.dynasty = root.dynasty + scope:spouse_1.dynasty = root.dynasty + } + } + + scope:activity = { + add_activity_log_entry = { + key = wedding_omen_good_log + tags = { good } + score = 50 + character = root + target = scope:spouse_2 + } + } + + legend_seed_great_deed_dynasty_effect = yes + + ai_chance = { #AI can into legend seeds + base = 200 + } + } + + after = { + if = { + limit = { + has_character_flag = good_thing_flag + } + remove_character_flag = good_thing_flag + } + else = { + remove_character_flag = bad_thing_flag + } + remove_character_flag = busy_in_ceremony_event + scope:spouse_2 = { remove_character_flag = busy_in_ceremony_event } + scope:1030_chatter = { remove_character_flag = busy_in_ceremony_event } + } +} + +################################################## +# New Family +# by Claudia Baldassi +# ep2_wedding.1120 +################################################## + +# Spouse: your child from a previous partner makes a fuss + +scripted_trigger ep2_wedding_1120_valid_child_trigger = { + NOT = { + any_parent = { this = root.betrothed } + } + any_parent = { + even_if_dead = yes + this != root + save_temporary_scope_as = other_parent + } + age >= 6 + involved_activity ?= { this = scope:activity } + save_temporary_scope_as = trouble_child +} + +ep2_wedding.1120 = { + type = activity_event + title = ep2_wedding.1120.t + desc = { + desc = ep2_wedding.1120.desc + first_valid = { + triggered_desc = { + trigger = { + scope:trouble_child = { + is_adult = no + } + } + desc = ep2_wedding.1120.desc_child + } + desc = ep2_wedding.1120.desc_adult + } + triggered_desc = { + trigger = { + scope:other_parent = { + involved_activity ?= { this = scope:activity } + } + } + desc = ep2_wedding.1120.desc_parent + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = shock + } + center_portrait = { + character = scope:other_spouse + animation = worry + } + right_portrait = { + character = scope:trouble_child + animation = wedding_objection_start + } + lower_right_portrait = scope:other_parent + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOT = { + has_variable = has_had_event_1120 + } + } + + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + betrothed ?= { + is_ai = yes + } + any_child ?= { + ep2_wedding_1120_valid_child_trigger = yes + } + # if the child's real parent is a secret, make sure that the child knows about it before denouncing it, and they don't like you enough + trigger_if = { + limit = { + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { this = scope:trouble_child } + } + } + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { this = scope:trouble_child } + is_known_by = scope:trouble_child + } + scope:trouble_child = { + opinion = { target = root value < 0 } + } + } + trigger_if = { + limit = { + any_secret = { + type = secret_disputed_heritage + secret_target = { this = scope:trouble_child } + } + } + any_secret = { + type = secret_disputed_heritage + secret_target = { this = scope:trouble_child } + is_known_by = scope:trouble_child + } + scope:trouble_child = { + opinion = { target = root value < 0 } + } + } + } + + weight_multiplier = { + base = 1 + # More drama if the other parent is there too + modifier = { + any_child = { + ep2_wedding_1120_valid_child_trigger = yes + } + scope:other_parent = { + is_alive = yes + involved_activity ?= { this = scope:activity } + } + add = 4 + } + # more likely if the child is an actual child + modifier = { + any_child = { + ep2_wedding_1120_valid_child_trigger = yes + is_adult = no + } + add = 2 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = -0.5 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity = { + set_variable = has_had_event_1120 + } + betrothed = { save_scope_as = other_spouse } + scope:other_spouse = { + add_character_flag = busy_in_ceremony_event + } + random_child = { + limit = { + ep2_wedding_1120_valid_child_trigger = yes + } + save_scope_as = trouble_child + } + scope:trouble_child = { + random_parent = { + even_if_dead = yes + limit = { + this != root + } + save_scope_as = other_parent + } + add_character_flag = busy_in_ceremony_event + } + if = { + limit = { + scope:other_parent = { + is_alive = yes + involved_activity ?= { this = scope:activity } + } + } + scope:other_parent = { add_character_flag = busy_in_ceremony_event } + } + if = { + limit = { + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { this = scope:trouble_child } + } + } + random_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { this = scope:trouble_child } + } + expose_secret = scope:trouble_child + } + add_character_flag = wedding_secret_child_revealed + } + else_if = { + limit = { + any_secret = { + type = secret_disputed_heritage + secret_target = { this = scope:trouble_child } + } + } + random_secret = { + type = secret_disputed_heritage + limit = { + secret_target = { this = scope:trouble_child } + } + expose_secret = scope:trouble_child + } + add_character_flag = wedding_secret_child_revealed + } + if = { + limit = { + has_character_flag = wedding_secret_child_revealed + } + scope:activity = { + add_activity_log_entry = { + key = wedding_child_fuss_secret_log + show_in_conclusion = yes + character = scope:trouble_child + target = root + } + } + } + else = { + scope:activity = { + add_activity_log_entry = { + key = wedding_child_fuss_log + character = scope:trouble_child + target = root + } + } + } + } + + # Option A: be strict + option = { + name = ep2_wedding.1120.a + trigger = { + NOT = { + has_character_flag = wedding_secret_child_revealed + } + } + add_prestige = major_prestige_gain + scope:trouble_child = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -60 + } + } + scope:other_spouse = { + add_opinion = { + target = scope:trouble_child + modifier = angry_opinion + opinion = -30 + } + if = { + limit = { + OR = { + has_trait = compassionate + has_trait = humble + has_trait = content + ai_compassion >= medium_positive_ai_value + } + } + add_opinion = { + target = root + modifier = awkward_opinion + opinion = -20 + } + } + else = { + add_opinion = { + target = root + modifier = amused_opinion + opinion = 30 + } + root = { + add_character_modifier = { + modifier = ep2_wedding_shared_values_modifier + years = 5 + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + calm = minor_stress_impact_gain + shy = minor_stress_impact_gain + arrogant = medium_stress_impact_loss + callous = medium_stress_impact_loss + impatient = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + # Option B: be accepting + option = { + name = ep2_wedding.1120.b + trigger = { + NOT = { + has_character_flag = wedding_secret_child_revealed + } + } + dynasty ?= { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + scope:trouble_child = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 60 + } + } + scope:other_spouse = { + add_opinion = { + target = scope:trouble_child + modifier = angry_opinion + opinion = -30 + } + if = { + limit = { + OR = { + ai_compassion <= low_positive_ai_value + has_trait = callous + has_trait = wrathful + has_trait = vengeful + } + } + add_opinion = { + target = root + modifier = awkward_opinion + opinion = -20 + } + } + else = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 30 + } + root = { + add_character_modifier = { + modifier = ep2_wedding_shared_values_modifier + years = 5 + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_loss + patient = minor_stress_impact_loss + humble = minor_stress_impact_loss + calm = minor_stress_impact_loss + shy = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + impatient = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + # Option C: it was a secret!! + option = { + name = ep2_wedding.1120.c + trigger = { + has_character_flag = wedding_secret_child_revealed + } + if = { + limit = { + scope:trouble_child = { + is_adult = yes + } + } + set_variable = { + days = 100 + name = ep2_confrontational_child + value = scope:trouble_child + } + } + stress_impact = { + deceitful = major_stress_impact_gain + honest = major_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:trouble_child = { remove_character_flag = busy_in_ceremony_event } + scope:other_spouse = { remove_character_flag = busy_in_ceremony_event } + scope:other_parent = { + if = { + limit = { has_character_flag = busy_in_ceremony_event } + remove_character_flag = busy_in_ceremony_event + } + } + if = { + limit = { + has_character_flag = wedding_secret_child_revealed + } + remove_character_flag = wedding_secret_child_revealed + } + } +} + +# Opposite event: it is your spouse who has a complaining child + +scripted_trigger ep2_wedding_1121_valid_child_trigger = { + NOT = { + any_parent = { this = root } + } + any_parent = { + even_if_dead = yes + this != root.betrothed + save_temporary_scope_as = other_parent + } + age >= 6 + involved_activity ?= { this = scope:activity } + save_temporary_scope_as = trouble_child +} + +ep2_wedding.1121 = { + type = activity_event + title = ep2_wedding.1120.t + desc = { + desc = ep2_wedding.1120.desc + first_valid = { + triggered_desc = { + trigger = { + scope:trouble_child = { + is_adult = no + } + } + desc = ep2_wedding.1121.desc_child + } + desc = ep2_wedding.1121.desc_adult + } + triggered_desc = { + trigger = { + scope:other_parent = { + involved_activity ?= { this = scope:activity } + } + } + desc = ep2_wedding.1120.desc_parent + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = scope:other_spouse + animation = worry + } + center_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:trouble_child + animation = wedding_objection_start + } + lower_right_portrait = scope:other_parent + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOT = { + has_variable = has_had_event_1120 + } + } + + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + root.betrothed ?= { + OR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + is_ai = yes + save_temporary_scope_as = other_spouse + any_child = { + ep2_wedding_1121_valid_child_trigger = yes + } + } + # if the child's real parent is a secret, make sure that the child knows about it before denouncing it, and they don't like their parent enough + trigger_if = { + limit = { + scope:other_spouse = { + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { this = scope:trouble_child } + } + } + } + scope:other_spouse = { + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { this = scope:trouble_child } + is_known_by = scope:trouble_child + } + } + scope:trouble_child = { + opinion = { target = scope:other_spouse value < 0 } + } + } + trigger_if = { + limit = { + scope:other_spouse = { + any_secret = { + type = secret_disputed_heritage + secret_target = { this = scope:trouble_child } + } + } + } + scope:other_spouse = { + any_secret = { + type = secret_disputed_heritage + secret_target = { this = scope:trouble_child } + is_known_by = scope:trouble_child + } + } + scope:trouble_child = { + opinion = { target = scope:other_spouse value < 0 } + } + } + } + + weight_multiplier = { + base = 1 + # More drama if the other parent is there too + modifier = { + root.betrothed = { + any_child = { + ep2_wedding_1121_valid_child_trigger = yes + } + scope:other_parent = { + is_alive = yes + involved_activity ?= { this = scope:activity } + } + } + add = 4 + } + # more likely if the child is an actual child + modifier = { + root.betrothed = { + any_child = { + ep2_wedding_1121_valid_child_trigger = yes + is_adult = no + } + } + add = 2 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = -0.5 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity = { + set_variable = has_had_event_1120 + } + root.betrothed = { save_scope_as = other_spouse } + scope:other_spouse = { + add_character_flag = busy_in_ceremony_event + } + scope:other_spouse = { + random_child = { + limit = { + ep2_wedding_1121_valid_child_trigger = yes + } + save_scope_as = trouble_child + } + } + scope:trouble_child = { + random_parent = { + even_if_dead = yes + limit = { + this != root.betrothed + } + save_scope_as = other_parent + } + add_character_flag = busy_in_ceremony_event + } + if = { + limit = { + scope:other_parent = { + involved_activity ?= { this = scope:activity } + } + } + scope:other_parent = { add_character_flag = busy_in_ceremony_event } + } + if = { + limit = { + scope:other_spouse = { + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { this = scope:trouble_child } + } + } + } + scope:other_spouse = { + random_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { this = scope:trouble_child } + } + expose_secret = scope:trouble_child + } + add_character_flag = wedding_secret_child_revealed + } + } + else_if = { + limit = { + scope:other_spouse = { + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { this = scope:trouble_child } + } + } + } + scope:other_spouse = { + random_secret = { + type = secret_disputed_heritage + limit = { + secret_target = { this = scope:trouble_child } + } + expose_secret = scope:trouble_child + } + add_character_flag = wedding_secret_child_revealed + } + } + scope:other_spouse = { + if = { + limit = { + has_character_flag = wedding_secret_child_revealed + } + add_opinion = { + target = scope:trouble_child + modifier = angry_opinion + opinion = -30 + } + } + } + if = { + limit = { + scope:other_spouse = { has_character_flag = wedding_secret_child_revealed } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_child_fuss_secret_log + show_in_conclusion = yes + character = scope:trouble_child + target = scope:other_spouse + } + } + } + else = { + scope:activity = { + add_activity_log_entry = { + key = wedding_child_fuss_log + character = scope:trouble_child + target = scope:other_spouse + } + } + } + } + + # Option A: Shut up! + option = { + name = ep2_wedding.1121.a + add_dread = medium_dread_gain + scope:trouble_child = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -50 + } + } + scope:other_spouse = { + if = { + limit = { + save_temporary_opinion_value_as = { name = opinion_of_you target = root } + opinion = { target = scope:trouble_child value >= scope:opinion_of_you } + NOT = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + } + add_opinion = { + target = root + modifier = berated_child_opinion + } + } + } + add_character_modifier = { + modifier = ep2_wedding_authoritarian_modifier + years = 10 + } + stress_impact = { + compassionate = major_stress_impact_gain + arrogant = major_stress_impact_gain + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + calm = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + } + } + + # Option B: I'll be a better parent! + option = { + name = ep2_wedding.1121.b + scope:trouble_child = { + add_opinion = { + target = root + modifier = give_a_chance_opinion + } + } + scope:other_spouse = { + add_opinion = { + target = root + modifier = give_a_chance_opinion + } + } + add_character_modifier = { + modifier = ep2_wedding_family_focus_modifier + years = 10 + } + stress_impact = { + callous = major_stress_impact_gain + arrogant = major_stress_impact_gain + wrathful = major_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = -0.5 + } + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:trouble_child = { remove_character_flag = busy_in_ceremony_event } + scope:other_spouse = { + remove_character_flag = busy_in_ceremony_event + if = { + limit = { + has_character_flag = wedding_secret_child_revealed + } + remove_character_flag = wedding_secret_child_revealed + } + } + scope:other_parent = { + if = { + limit = { has_character_flag = busy_in_ceremony_event } + remove_character_flag = busy_in_ceremony_event + } + } + } +} + +# Follow-up to 1120. NB this is a Banquet Event. +# You talk with the child who revealed your secret. + +ep2_wedding.1122 = { + type = activity_event + title = ep2_wedding.1120.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:trouble_child = { + has_character_flag = 1122_repentant + } + } + desc = ep2_wedding.1122.desc_repentant + } + desc = ep2_wedding.1122.desc_unrepentant + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:trouble_child + triggered_animation = { + trigger = { + scope:trouble_child = { + has_character_flag = 1122_repentant + } + } + animation = shame + } + triggered_animation = { + trigger = { + NOT = { + scope:trouble_child = { + has_character_flag = 1122_repentant + } + } + } + animation = personality_callous + } + } + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + has_variable = ep2_confrontational_child + scope:activity = { + NOT = { + has_variable = has_had_event_1122 + } + } + } + + immediate = { + var:ep2_confrontational_child = { + save_scope_as = trouble_child + } + scope:activity = { + set_variable = has_had_event_1122 + } + add_character_flag = busy_in_banquet_event + scope:trouble_child = { + add_character_flag = busy_in_banquet_event + } + scope:trouble_child = { + random_list = { + # child regrets it + 50 = { + modifier = { + has_trait = humble + add = 50 + } + modifier = { + has_trait = family_first + add = 100 + } + modifier = { + has_trait = compassionate + add = 100 + } + modifier = { + has_trait = patient + add = 20 + } + modifier = { + has_trait = craven + add = 20 + } + modifier = { + has_trait = shy + add = 20 + } + modifier = { + has_trait = trusting + add = 20 + } + modifier = { + has_trait = fickle + add = 50 + } + modifier = { + has_trait = forgiving + add = 20 + } + modifier = { + has_trait = contrite + add = 100 + } + add_character_flag = 1122_repentant + } + # child is unrepentant + 50 = { + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = arbitrary + add = 50 + } + modifier = { + has_trait = paranoid + add = 100 + } + modifier = { + has_trait = wrathful + add = 20 + } + modifier = { + has_trait = impatient + add = 20 + } + modifier = { + has_trait = brave + add = 20 + } + modifier = { + has_trait = ambitious + add = 20 + } + modifier = { + has_trait = vengeful + add = 20 + } + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = stubborn + add = 100 + } + } + } + } + } + + # Option A: You forgive + option = { + name = ep2_wedding.1122.a + trigger = { + scope:trouble_child = { + has_character_flag = 1122_repentant + } + } + scope:activity = { + add_activity_log_entry = { + key = 1122_child_pacified_log + tags = { good } + score = 10 + character = root + target = scope:trouble_child + # Effect + scope:trouble_child = { + add_opinion = { + target = root + modifier = forgiven_opinion + opinion = 20 + } + } + } + } + stress_impact = { + vengeful = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + # Option B: You don't forgive + option = { + name = ep2_wedding.1122.b + trigger = { + scope:trouble_child = { + has_character_flag = 1122_repentant + } + } + scope:activity = { + add_activity_log_entry = { + key = 1122_child_not_pacified_log + tags = { bad } + score = 10 + character = root + target = scope:trouble_child + # Effect + scope:trouble_child = { + add_opinion = { + target = root + modifier = unforgiven_opinion + opinion = -30 + } + } + root = { + if = { + limit = { + can_add_hook = { + target = scope:trouble_child + type = indebted_hook + } + } + add_hook = { + target = scope:trouble_child + type = indebted_hook + } + } + } + } + } + stress_impact = { + forgiving = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + # Option C: You accept the critique + option = { + name = ep2_wedding.1122.c + trigger = { + scope:trouble_child = { + NOT = { has_character_flag = 1122_repentant } + } + } + scope:activity = { + add_activity_log_entry = { + key = 1122_child_pacified_log + tags = { good } + score = 10 + character = root + target = scope:trouble_child + # Effect + scope:trouble_child = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 30 + } + } + } + } + stress_impact = { + vengeful = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + # Option D: You remain angry + option = { + name = ep2_wedding.1122.d + trigger = { + scope:trouble_child = { + NOT = { has_character_flag = 1122_repentant } + } + } + scope:activity = { + add_activity_log_entry = { + key = 1122_child_not_pacified_log + tags = { bad } + score = 10 + character = root + target = scope:trouble_child + # Effect + root = { + if = { + limit = { + can_add_hook = { + target = scope:trouble_child + type = indebted_hook + } + } + add_hook = { + target = scope:trouble_child + type = indebted_hook + } + } + } + } + } + stress_impact = { + forgiving = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } + + after = { + remove_character_flag = busy_in_banquet_event + scope:trouble_child = { + remove_character_flag = busy_in_banquet_event + if = { + limit = { + has_character_flag = 1122_repentant + } + remove_character_flag = 1122_repentant + } + } + remove_variable = ep2_confrontational_child + } +} + +################################################## +# Secret Whispers +# by Claudia Baldassi +# ep2_wedding.1130 +################################################## + +# A bad secret comes up and compromises the union: someone who knows spills the beans +#The secret is yours. + +ep2_wedding.1130 = { + type = activity_event + title = ep2_wedding.1130.t + desc = { + desc = ep2_wedding.1130.desc + desc = ep2_wedding.1130.desc_continue + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:1130_knows + animation = wedding_objection_start + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOT = { + has_variable = has_had_event_1130 + } + } + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + has_any_secrets = yes + scope:activity = { + any_attending_character = { + any_known_secret = { + secret_owner = root + NOT = { secret_target ?= prev } + } + opinion = { target = root value <= 0 } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:activity = { + any_attending_character = { + any_known_secret = { + secret_owner = root + NOT = { secret_target ?= prev } + + } + has_trait = contrite + } + } + add = 4 + } + modifier = { + scope:activity = { + any_attending_character = { + any_known_secret = { + secret_owner = root + NOT = { secret_target ?= prev } + } + has_relation_rival = root + } + } + add = 5 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = -0.5 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity = { + set_variable = has_had_event_1130 + } + betrothed = { + save_scope_as = other_spouse + add_character_flag = busy_in_ceremony_event + } + scope:activity = { + random_attending_character = { + limit = { + any_known_secret = { + secret_owner = root + NOT = { secret_target ?= prev } + } + } + save_scope_as = 1130_knows + add_character_flag = busy_in_ceremony_event + } + } + scope:1130_knows = { + random_known_secret = { + limit = { + secret_owner = root + NOT = { secret_target ?= scope:1130_knows } + } + save_scope_as = 1130_secret + } + } + } + + #Option A: let them expose the secret + option = { + name = ep2_wedding.1130.a + add_character_modifier = { + modifier = wedding_clean_slate_modifier + years = 10 + } + scope:activity = { + add_activity_log_entry = { + key = wedding_secret_revealed_log + show_in_conclusion = yes + character = scope:1130_knows + target = root + + #Effect + scope:1130_secret = { expose_secret = scope:1130_knows } + root = { + if = { + limit = { + can_set_relation_nemesis_trigger = { CHARACTER = scope:1130_knows } + } + set_relation_nemesis = { + target = scope:1130_knows + reason = nemesis_wedding_spread_voices_secret + } + } + } + } + } + scope:1130_knows = { + if = { + limit = { + has_activity_intent = banquet_mischief_intent + } + complete_activity_intent = yes + } + } + stress_impact = { + deceitful = major_stress_impact_gain + contrite = massive_stress_impact_loss + honest = major_stress_impact_loss + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_honor = 0.5 + } + modifier = { + has_trait = contrite + add = 200 + } + modifier = { + has_trait = honest + add = 100 + } + } + } + + #Option B: kick them out + option = { + name = ep2_wedding.1130.b + add_character_modifier = { + modifier = wedding_web_of_secrets_modifier + years = 10 + } + scope:activity = { + add_activity_log_entry = { + key = wedding_secret_not_revealed_log + show_in_conclusion = yes + character = scope:1130_knows + target = root + + #Effect + root = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:1130_knows } + } + set_relation_rival = { + target = scope:1130_knows + reason = rival_wedding_spread_voices + } + } + add_dread = major_dread_gain + } + scope:1130_knows = { + remove_from_activity = scope:activity + } + } + } + stress_impact = { + contrite = massive_stress_impact_gain + honest = major_stress_impact_gain + } + ai_chance = { + base = 125 + ai_value_modifier = { + ai_honor = -0.5 + } + modifier = { + has_trait = deceitful + add = 200 + } + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:other_spouse = { + remove_character_flag = busy_in_ceremony_event + } + scope:1130_knows = { + remove_character_flag = busy_in_ceremony_event + } + } +} + +# The secret is your partner's. + +ep2_wedding.1131 = { + type = activity_event + title = ep2_wedding.1130.t + desc = { + desc = ep2_wedding.1130.desc + desc = ep2_wedding.1131.desc + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = shock + } + center_portrait = { + character = scope:other_spouse + animation = shame + } + right_portrait = { + character = scope:1130_knows + animation = wedding_objection_start + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOT = { + has_variable = has_had_event_1130 + } + } + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + betrothed ?= { + has_any_secrets = yes + } + scope:activity = { + any_attending_character = { + any_known_secret = { + secret_owner = root.betrothed + NOT = { is_known_by = root } + NOT = { secret_target ?= prev } + } + opinion = { target = root.betrothed value <= 0 } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:activity = { + any_attending_character = { + any_known_secret = { + secret_owner = root.betrothed + NOT = { is_known_by = root } + NOT = { secret_target ?= prev } + } + has_trait = contrite + } + } + add = 4 + } + modifier = { + scope:activity = { + any_attending_character = { + any_known_secret = { + secret_owner = root.betrothed + NOT = { is_known_by = root } + NOT = { secret_target ?= prev } + } + has_relation_rival = root + } + } + add = 4 + } + modifier = { + scope:activity = { + any_attending_character = { + any_known_secret = { + secret_owner = root.betrothed + NOT = { is_known_by = root } + NOT = { secret_target ?= prev } + } + has_relation_rival = root.betrothed + } + } + add = 4 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = -0.5 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity = { + set_variable = has_had_event_1130 + } + betrothed = { + save_scope_as = other_spouse + add_character_flag = busy_in_ceremony_event + } + scope:activity = { + random_attending_character = { + limit = { + any_known_secret = { + secret_owner = root.betrothed + NOT = { is_known_by = root } + NOT = { secret_target ?= prev } + } + } + save_scope_as = 1130_knows + add_character_flag = busy_in_ceremony_event + } + } + scope:1130_knows = { + random_known_secret = { + limit = { + secret_owner = scope:other_spouse + NOT = { is_known_by = root } + NOT = { secret_target ?= scope:1130_knows } + } + save_scope_as = 1130_secret + } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_secret_revealed_log + show_in_conclusion = yes + character = scope:1130_knows + target = scope:other_spouse + + #Effect + scope:1130_secret = { expose_secret = scope:1130_knows } + } + } + scope:1130_knows = { + if = { + limit = { + has_activity_intent = banquet_mischief_intent + } + complete_activity_intent = yes + } + } + } + + #Option A: be understanding + option = { + name = ep2_wedding.1131.a + scope:other_spouse = { + add_opinion = { + target = root + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + can_add_hook = { + target = scope:other_spouse + type = favor_hook + } + } + add_hook = { + target = scope:other_spouse + type = favor_hook + } + } + stress_impact = { + impatient = minor_stress_impact_gain + callous = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = major_stress_impact_gain + paranoid = major_stress_impact_gain + honest = medium_stress_impact_loss + forgiving = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + trusting = major_stress_impact_loss + } + ai_chance = { + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Option B: this is unacceptable! + option = { + name = ep2_wedding.1131.b + add_dread = major_dread_gain + add_character_modifier = { + modifier = wedding_trust_compromised_modifier + years = 10 + } + stress_impact = { + impatient = minor_stress_impact_loss + callous = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + vengeful = major_stress_impact_loss + paranoid = major_stress_impact_loss + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + trusting = major_stress_impact_gain + } + ai_chance = { + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:other_spouse = { + remove_character_flag = busy_in_ceremony_event + } + scope:1130_knows = { + remove_character_flag = busy_in_ceremony_event + } + } +} + +# You know a secret about a spouse. + +ep2_wedding.1132 = { + type = activity_event + title = ep2_wedding.1130.t + desc = ep2_wedding.1132.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = wedding_objection_start + } + center_portrait = { + character = scope:other_spouse + animation = shock + } + right_portrait = { + character = scope:spouse_with_secret + animation = shame + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOT = { + has_variable = has_had_event_1130 + } + } + NOR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + any_known_secret = { + secret_owner = { + OR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + NOT = { secret_target ?= root } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_trait = contrite + add = 4 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = -0.5 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity = { + set_variable = has_had_event_1130 + } + random_known_secret = { + limit = { + secret_owner = { + OR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + NOT = { secret_target ?= root } + } + save_scope_as = 1130_secret + } + scope:1130_secret = { + secret_owner = { + save_scope_as = spouse_with_secret + add_character_flag = busy_in_ceremony_event + } + } + scope:spouse_with_secret.betrothed = { + save_scope_as = other_spouse + add_character_flag = busy_in_ceremony_event + } + } + + #Option A: reveal it + option = { + name = ep2_wedding.1132.a + scope:activity = { + add_activity_log_entry = { + key = wedding_secret_revealed_log + show_in_conclusion = yes + character = root + target = scope:spouse_with_secret + + #Effect + scope:1130_secret = { expose_secret = root } + } + } + scope:other_spouse = { + add_opinion = { + target = root + modifier = opened_my_eyes_opinion + } + } + if = { + limit = { + can_add_hook = { + target = scope:other_spouse + type = favor_hook + } + } + add_hook = { + target = scope:other_spouse + type = favor_hook + } + } + if = { + limit = { + has_activity_intent = banquet_mischief_intent + } + complete_activity_intent = yes + } + stress_impact = { + honest = major_stress_impact_loss + contrite = massive_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = honest + add = 100 + } + modifier = { + has_trait = contrite + add = 100 + } + } + } + + #Option B: keep it + option = { + name = ep2_wedding.1132.b + scope:spouse_with_secret = { + add_opinion = { + target = root + modifier = kept_my_secret_opinion + } + } + if = { + limit = { + can_add_hook = { + target = scope:spouse_with_secret + type = favor_hook + } + } + add_hook = { + target = scope:spouse_with_secret + type = favor_hook + } + } + stress_impact = { + deceitful = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = deceitful + add = 100 + } + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:spouse_with_secret = { + remove_character_flag = busy_in_ceremony_event + } + scope:other_spouse = { + remove_character_flag = busy_in_ceremony_event + } + } +} + +################################################## +# A Misstep +# by Claudia Baldassi +# ep2_wedding.1140 +################################################## + +# A spouse has an embarrassing misstep: stuttering, missing cues, forgetting vows… How do you recover? + +ep2_wedding.1140 = { + type = activity_event + title = ep2_wedding.1140.t + desc = { + desc = ep2_wedding.1140.desc + random_valid = { + desc = ep2_wedding.1140.desc_1 + desc = ep2_wedding.1140.desc_2 + desc = ep2_wedding.1140.desc_3 + } + triggered_desc = { + trigger = { + OR = { + has_activity_intent = diplomatic_intent + has_activity_intent = woo_attendee_intent + } + intent_target = { + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + } + desc = ep2_wedding.1140.desc_target + } + triggered_desc = { + trigger = { + OR = { + has_activity_intent = diplomatic_intent + has_activity_intent = woo_attendee_intent + } + intent_target = { + OR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + } + desc = ep2_wedding.1140.desc_target_spouse + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = wedding_objection_start + } + right_portrait = { + character = scope:fumbling_spouse + animation = shame + } + + lower_right_portrait = scope:intent_target + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + root = scope:host + NOR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + scope:activity.special_guest:spouse_1 = { is_ai = yes } + scope:activity.special_guest:spouse_2 = { is_ai = yes } + trigger_if = { + limit = { + OR = { + has_activity_intent = diplomatic_intent + has_activity_intent = woo_attendee_intent + } + } + intent_target = { is_ai = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = diplomatic_intent + has_activity_intent = woo_attendee_intent + has_activity_intent = reduce_stress_intent + } + add = 2 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = spouse_2 } + random_list = { + 50 = { + modifier = { + scope:spouse_1 = { + has_trait = shy + } + add = 10 + } + modifier = { + scope:spouse_1 = { + has_trait = gregarious + } + add = -10 + } + modifier = { + scope:spouse_1 = { + has_trait = calm + } + add = -10 + } + modifier = { + scope:spouse_1 = { + has_trait = impatient + } + add = 10 + } + modifier = { + scope:spouse_1 = { + has_trait = arrogant + } + add = 10 + } + scope:spouse_1 = { save_scope_as = fumbling_spouse } + } + 50 = { + modifier = { + scope:spouse_2 = { + has_trait = shy + } + add = 10 + } + modifier = { + scope:spouse_2 = { + has_trait = gregarious + } + add = -10 + } + modifier = { + scope:spouse_2 = { + has_trait = calm + } + add = -10 + } + modifier = { + scope:spouse_2 = { + has_trait = impatient + } + add = 10 + } + modifier = { + scope:spouse_2 = { + has_trait = arrogant + } + add = 10 + } + scope:spouse_2 = { save_scope_as = fumbling_spouse } + } + } + if = { + limit = { + OR = { + has_activity_intent = diplomatic_intent + has_activity_intent = woo_attendee_intent + } + } + intent_target = { save_scope_as = intent_target } + } + } + + # Option A: Try to salvage the situation + option = { + name = ep2_wedding.1140.a + duel = { + skill = diplomacy + value = average_skill_rating + # Success: you recover smoothly + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1140.a.success + send_interface_toast = { + title = ep2_wedding.1140.a.success.tt + left_icon = root + scope:activity = { + add_activity_log_entry = { + key = recovered_from_misstep_log + tags = { good } + score = 50 + character = root + target = scope:spouse_1 + + root = { + if = { + limit = { + has_lifestyle = diplomacy_lifestyle + } + add_diplomacy_lifestyle_xp = major_lifestyle_experience + } + } + if = { + limit = { + root = { has_activity_intent = diplomatic_intent } + } + custom_tooltip = ep2_wedding.1140.a.success.tt2 + root.intent_target = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + else_if = { + limit = { + root = { has_activity_intent = woo_attendee_intent } + } + custom_tooltip = ep2_wedding.1140.a.success.tt2 + root = { + progress_towards_lover_effect = { + REASON = lover_impressed_by_smooth_save + CHARACTER = root.intent_target + OPINION = 15 + } + } + } + scope:fumbling_spouse = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + brave = medium_stress_impact_loss + } + } + } + # Failure: you are publicly embarassed + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1140.a.failure + send_interface_toast = { + title = ep2_wedding.1140.a.failure.tt + left_icon = root + right_icon = scope:fumbling_spouse + scope:activity = { + add_activity_log_entry = { + key = made_a_misstep_log + tags = { bad } + score = 50 + character = scope:spouse_1 + + scope:fumbling_spouse = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + shy = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_activity_intent = diplomatic_intent + has_activity_intent = woo_attendee_intent + } + add = 50 + } + } + } + + # Option B: ignore it + option = { + name = ep2_wedding.1140.b + scope:fumbling_spouse = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + shy = medium_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + lazy = medium_stress_impact_loss + } + scope:activity = { + add_activity_log_entry = { + key = made_a_misstep_log + tags = { bad } + score = 50 + character = scope:spouse_1 + } + } + ai_chance = { + base = 100 + } + } + + # Option C: relax! + option = { + name = ep2_wedding.1140.c + trigger = { + has_activity_intent = reduce_stress_intent + } + custom_tooltip = available_because_intent_tt + scope:fumbling_spouse = { + add_opinion = { + target = root + modifier = relieved_opinion + opinion = 20 + } + } + stress_impact = { + base = medium_stress_impact_loss + } + scope:activity = { + add_activity_log_entry = { + key = recovered_from_misstep_log + tags = { good } + score = 50 + character = root + target = scope:spouse_1 + } + } + ai_chance = { + base = 100 + modifier = { + has_activity_intent = reduce_stress_intent + add = 100 + } + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + } +} + +################################################## +# Romantic Scouting +# by Claudia Baldassi +# ep2_wedding.1150 +################################################## + +# Seduction Intent: target scouting + +ep2_wedding.1150 = { + type = activity_event + title = ep2_wedding.1150.t + desc = { + desc = ep2_wedding.1150.desc + first_valid = { + triggered_desc = { + trigger = { + scope:intent_target = { + OR = { + has_trait = shy + has_trait = compassionate + } + } + } + desc = ep2_wedding.1150.desc_1 + } + triggered_desc = { + trigger = { + scope:intent_target = { + OR = { + has_trait = gluttonous + has_trait = drunkard + } + } + } + desc = ep2_wedding.1150.desc_2 + } + triggered_desc = { + trigger = { + scope:intent_target = { + OR = { + has_trait = callous + has_trait = cynical + } + } + } + desc = ep2_wedding.1150.desc_3 + } + triggered_desc = { + trigger = { + scope:intent_target = { + has_trait = zealous + } + } + desc = ep2_wedding.1150.desc_4 + } + desc = ep2_wedding.1150.desc_fallback + } + desc = ep2_wedding.1150.desc_conclusion + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:intent_target + animation = personality_content + } + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + has_activity_intent = woo_attendee_intent + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + NOR = { + intent_target = scope:activity.special_guest:spouse_1 + intent_target = scope:activity.special_guest:spouse_2 + } + intent_target = { is_ai = yes } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = busy_in_ceremony_event + intent_target = { + save_scope_as = intent_target + add_character_flag = busy_in_ceremony_event + } + } + + # Option A: approach with diplo + option = { + name = ep2_wedding.1150.a + duel = { + skill = diplomacy + target = scope:intent_target + # Success: you make a good impression + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1150.a.success + send_interface_toast = { + title = ep2_wedding.1150.a.success.tt + left_icon = root + right_icon = scope:intent_target + progress_towards_lover_effect = { + REASON = lover_impressed_by_talk + CHARACTER = scope:intent_target + OPINION = 15 + } + if = { + limit = { + has_lifestyle = diplomacy_lifestyle + } + add_diplomacy_lifestyle_xp = major_lifestyle_experience + } + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + lustful = major_stress_impact_loss + } + } + scope:activity = { + add_activity_log_entry = { + key = seduction_good_impression_log + tags = { good } + score = 50 + character = root + target = scope:intent_target + } + } + } + # Failure: target is not impress + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1150.a.failure + send_interface_toast = { + title = ep2_wedding.1150.a.failure.tt + left_icon = root + right_icon = scope:intent_target + scope:intent_target = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + shy = medium_stress_impact_gain + lustful = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + modifier = { + diplomacy >= average_skill_level + add = 50 + } + } + } + + # Option B: approach with intrigue + option = { + name = ep2_wedding.1150.b + duel = { + skill = intrigue + target = scope:intent_target + # Success: you make a good impression + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1150.a.success + send_interface_toast = { + title = ep2_wedding.1150.a.success.tt + left_icon = root + right_icon = scope:intent_target + progress_towards_lover_effect = { + REASON = lover_impressed_by_talk + CHARACTER = scope:intent_target + OPINION = 15 + } + if = { + limit = { + has_lifestyle = intrigue_lifestyle + } + add_intrigue_lifestyle_xp = major_lifestyle_experience + } + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + lustful = major_stress_impact_loss + } + } + scope:activity = { + add_activity_log_entry = { + key = seduction_good_impression_log + tags = { good } + score = 50 + character = root + target = scope:intent_target + } + } + } + # Failure: target is not impress + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1150.a.failure + send_interface_toast = { + title = ep2_wedding.1150.a.failure.tt + left_icon = root + right_icon = scope:intent_target + scope:intent_target = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + shy = medium_stress_impact_gain + lustful = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + modifier = { + intrigue >= average_skill_level + add = 50 + } + } + } + + # Option C: approach with learning + option = { + name = ep2_wedding.1150.c + duel = { + skill = learning + target = scope:intent_target + # Success: you make a good impression + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1150.a.success + send_interface_toast = { + title = ep2_wedding.1150.a.success.tt + left_icon = root + right_icon = scope:intent_target + progress_towards_lover_effect = { + REASON = lover_impressed_by_talk + CHARACTER = scope:intent_target + OPINION = 15 + } + if = { + limit = { + has_lifestyle = learning_lifestyle + } + add_learning_lifestyle_xp = major_lifestyle_experience + } + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + lustful = major_stress_impact_loss + } + } + scope:activity = { + add_activity_log_entry = { + key = seduction_good_impression_log + tags = { good } + score = 50 + character = root + target = scope:intent_target + } + } + } + # Failure: target is not impress + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1150.a.failure + send_interface_toast = { + title = ep2_wedding.1150.a.failure.tt + left_icon = root + right_icon = scope:intent_target + scope:intent_target = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + shy = medium_stress_impact_gain + lustful = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + modifier = { + learning >= average_skill_level + add = 50 + } + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:intent_target = { remove_character_flag = busy_in_ceremony_event } + } +} + +################################################## +# Gatecrashers +# by Claudia Baldassi +# ep2_wedding.1160 +################################################## + +# Some pesants are at the gate of the festivity - what do you do? + +ep2_wedding.1160 = { + type = activity_event + title = ep2_wedding.1160.t + desc = ep2_wedding.1160.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = schadenfreude + } + + lower_right_portrait = scope:host + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + has_activity_intent = banquet_mischief_intent + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + scope:activity = { + NOT = { + has_variable = has_had_1160_event + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity = { + set_variable = has_had_1160_event + } + } + + # Option A: let the peasants in + option = { + name = ep2_wedding.1160.a + flavor = ep2_wedding.1160.a.tt + # for the follow-up event + root = { + save_scope_as = mischief_maker + } + scope:host = { trigger_event = ep2_wedding.1161 } + stress_impact = { + base = minor_stress_impact_loss + wrathful = medium_stress_impact_loss + impatient = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + deceitful = major_stress_impact_loss + arbitrary = major_stress_impact_loss + callous = major_stress_impact_loss + fickle = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = deceitful + add = 50 + } + modifier = { + has_trait = arbitrary + add = 50 + } + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = fickle + add = 50 + } + } + } + + # Option B: smuggle food to the pesants + option = { + name = ep2_wedding.1160.b + flavor = ep2_wedding.1160.b.tt + stress_impact = { + base = minor_stress_impact_loss + gluttonous = medium_stress_impact_loss + diligent = medium_stress_impact_loss + generous = major_stress_impact_loss + humble = major_stress_impact_loss + gregarious = major_stress_impact_loss + compassionate = massive_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = generous + add = 50 + } + modifier = { + has_trait = humble + add = 50 + } + modifier = { + has_trait = gregarious + add = 50 + } + modifier = { + has_trait = compassionate + add = 50 + } + } + } + + # Option C: this is below me + option = { + name = ep2_wedding.1160.c + stress_impact = { + greedy = minor_stress_impact_loss + temperate = minor_stress_impact_loss + lazy = minor_stress_impact_loss + honest = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = honest + add = 50 + } + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + } +} + +# Follow-up for the host + +ep2_wedding.1161 = { + type = activity_event + title = ep2_wedding.1160.t + desc = ep2_wedding.1161.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = anger + } + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = busy_in_ceremony_event + } + + # Option A: kick them out! + option = { + name = ep2_wedding.1161.a + duel = { + skill = martial + value = average_skill_rating + 50 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1161.success + send_interface_toast = { + title = ep2_wedding.1161.success.tt + left_icon = root + scope:activity = { + add_activity_log_entry = { + key = wedding_peasant_invasion_managed_log + tags = { good } + score = 20 + character = root + + root = { + add_character_modifier = { + modifier = wedding_enforced_security_modifier + years = 10 + } + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + wrathful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + callous = major_stress_impact_loss + paranoid = massive_stress_impact_loss + } + } + scope:mischief_maker = { + send_interface_toast = { + title = ep2_wedding.1161.success.tt2 + left_icon = root + } + } + } + 50 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1161.failure + send_interface_toast = { + title = ep2_wedding.1161.failure.tt + left_icon = root + scope:activity = { + add_activity_log_entry = { + key = wedding_peasant_invasion_not_managed_log + tags = { bad } + score = 20 + character = root + + root = { + add_character_modifier = { + modifier = wedding_peasants_overrun_modifier + years = 10 + } + } + } + } + stress_impact = { + wrathful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + } + scope:mischief_maker = { + send_interface_toast = { + title = ep2_wedding.1161.failure.tt2 + left_icon = root + } + } + } + } + ai_chance = { + base = 100 + } + } + + # Option B: let them stay + option = { + name = ep2_wedding.1161.b + scope:activity = { + add_activity_log_entry = { + key = wedding_peasant_invasion_stay_log + tags = { bad } + score = 20 + character = root + + root.location.county = { + add_county_modifier = { + modifier = wedding_peasants_connections_county_modifier + years = 10 + } + } + } + } + if = { + limit = { + has_activity_intent = reduce_stress_intent + } + stress_impact = { + base = medium_stress_impact_loss + } + } + else = { + stress_impact = { + generous = medium_stress_impact_loss + humble = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + scope:mischief_maker = { + send_interface_toast = { + title = ep2_wedding.1161.b.tt + left_icon = root + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + add = 50 + } + modifier = { + has_trait = gregarious + add = 50 + } + modifier = { + has_trait = humble + add = 50 + } + modifier = { + has_trait = generous + add = 50 + } + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + } +} + +################################################## +# The Parade +# by Claudia Baldassi +# ep2_wedding.1170 +################################################## + +# A spouse has arrived with a whole parade. Interact with it + +ep2_wedding.1170 = { + type = activity_event + title = ep2_wedding.1170.t + desc = { + desc = ep2_wedding.1170.desc + triggered_desc = { + trigger = { + has_activity_intent = reduce_stress_intent + } + desc = ep2_wedding.1170.desc_relax + } + triggered_desc = { + trigger = { + has_activity_intent = banquet_mischief_intent + } + desc = ep2_wedding.1170.desc_mischief + } + triggered_desc = { + trigger = { + has_activity_intent = murder_attendee_intent + } + desc = ep2_wedding.1170.desc_murder + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = ecstasy + } + lower_center_portrait = scope:rich_spouse + lower_right_portrait = scope:murderee + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_good + } + } + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + OR = { + scope:activity.special_guest:spouse_1 = { + NOT = { is_close_or_extended_family_of = root } + is_lowborn = no + is_ai = yes + location = scope:activity.activity_location + } + scope:activity.special_guest:spouse_2 = { + NOT = { is_close_or_extended_family_of = root } + is_lowborn = no + is_ai = yes + location = scope:activity.activity_location + } + } + NOT = { + scope:activity = { + has_variable = has_had_event_1170 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = banquet_mischief_intent + } + add = 2 + } + modifier = { + has_activity_intent = murder_attendee_intent + add = 1 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity = { + set_variable = has_had_event_1170 + } + random_list = { + 50 = { + trigger = { + scope:activity.special_guest:spouse_1 = { + NOT = { is_close_or_extended_family_of = root } + is_lowborn = no + is_ai = yes + } + } + scope:activity.special_guest:spouse_1 = { save_scope_as = rich_spouse } + } + 50 = { + trigger = { + scope:activity.special_guest:spouse_2 = { + NOT = { is_close_or_extended_family_of = root } + is_lowborn = no + is_ai = yes + } + } + scope:activity.special_guest:spouse_2 = { save_scope_as = rich_spouse } + } + } + if = { + limit = { + has_activity_intent = murder_attendee_intent + } + intent_target = { + save_scope_as = murderee + add_character_flag = busy_in_ceremony_event + } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_parade_arrival_log + tags = { good } + score = 20 + character = scope:rich_spouse + } + } + } + + # Option A: Pocket some horseshoes + option = { + name = ep2_wedding.1170.a + flavor = ep2_wedding.1170.a.tt + add_gold = minor_gold_value + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Option B: What a show + option = { + name = ep2_wedding.1170.b + trigger = { + NOT = { + has_activity_intent = reduce_stress_intent + } + } + flavor = ep2_wedding.1170.b.tt + stress_impact = { + base = minor_stress_impact_loss + generous = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + # Option C: Enjoy the show + option = { + name = ep2_wedding.1170.c + trigger = { + has_activity_intent = reduce_stress_intent + } + custom_tooltip = available_because_intent_tt + stress_impact = { + base = medium_stress_impact_loss + humble = major_stress_impact_loss + compassionate = major_stress_impact_loss + gregarious = major_stress_impact_loss + trusting = major_stress_impact_loss + generous = major_stress_impact_loss + } + ai_chance = { + base = 200 + } + } + + # Option D: mayhem + option = { + name = ep2_wedding.1170.d + trigger = { + has_activity_intent = banquet_mischief_intent + } + custom_tooltip = available_because_intent_tt + add_character_modifier = { + modifier = wedding_parade_mayhem_modifier + years = 5 + } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 200 + } + } + + # Option E: try to kill + option = { + name = ep2_wedding.1170.e + trigger = { + has_activity_intent = murder_attendee_intent + } + flavor = ep2_wedding.1170.e.tt + custom_tooltip = available_because_intent_tt + duel = { + skills = { intrigue prowess } + target = scope:murderee + 40 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1170.success + send_interface_toast = { + title = ep2_wedding.1170.success.tt + left_icon = root + right_icon = scope:murderee + scope:activity = { + add_activity_log_entry = { + key = wedding_parade_death_log + tags = { good } + score = 20 + character = scope:rich_spouse + target = scope:murderee + } + } + scope:murderee = { + death = { + killer = root + death_reason = death_plotting + } + } + complete_activity_intent = yes + stress_impact = { + base = minor_stress_impact_loss + vengeful = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + } + } + } + 60 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1170.failure + send_interface_toast = { + title = ep2_wedding.1170.failure.tt + left_icon = root + right_icon = scope:murderee + stress_impact = { + base = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 200 + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + if = { + limit = { + intent_target ?= { has_character_flag = busy_in_ceremony_event } + } + intent_target = { remove_character_flag = busy_in_ceremony_event } + } + } +} + +################################################## +# A Bad Match +# by Claudia Baldassi +# ep2_wedding.1180 +################################################## + +# Your spouse doesn't really like you... + +ep2_wedding.1180 = { + type = activity_event + title = ep2_wedding.1180.t + desc = ep2_wedding.1180.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:other_spouse + animation = disgust + } + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + OR = { + root.betrothed ?= { + trait_compatibility = { + target = root + value <= low_negative_trait_compatibility + } + } + root.betrothed ?= { + save_temporary_opinion_value_as = { + name = target_opinion + target = root + } + scope:target_opinion < 0 + } + } + root.betrothed ?= { + has_any_good_relationship_with_root_trigger = no + is_ai = yes + } + } + + + weight_multiplier = { + base = 1 + modifier = { + betrothed = { has_any_bad_relationship_with_root_trigger = yes } + add = 1 + } + modifier = { + betrothed = { has_trait = fickle } + add = 1 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + betrothed = { + save_scope_as = other_spouse + add_character_flag = busy_in_ceremony_event + } + scope:activity = { set_variable = has_had_event_1180 } + } + + # Option A: it doesn't matter + option = { + name = ep2_wedding.1180.a + add_character_modifier = { + modifier = wedding_political_mentality_modifier + years = 10 + } + scope:other_spouse = { + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -20 + } + } + stress_impact = { + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + callous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = callous + add = 50 + } + } + } + + # Option B: I'll make you like me! + option = { + name = ep2_wedding.1180.b + if = { + limit = { + has_activity_intent = woo_attendee_intent + intent_target = scope:other_spouse + } + progress_towards_lover_effect = { + CHARACTER = scope:other_spouse + REASON = lover_wedding_trying_hard + OPINION = default_lover_opinion + } + } + else_if = { + limit = { + can_start_scheme = { + type = seduce + target_character = scope:other_spouse + } + } + start_scheme = { + type = seduce + target_character = scope:other_spouse + } + } + else_if = { + limit = { + any_scheme = { + type = seduce + scheme_target_character = scope:other_spouse + } + } + random_scheme = { + type = seduce + limit = { + scheme_target_character = scope:other_spouse + } + add_scheme_progress = scheme_progress_gain + } + } + else = { + scope:other_spouse = { + add_opinion = { + target = root + modifier = making_an_effort_opinion + } + } + } + if = { + limit = { + scope:other_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:other_spouse + } + stress_impact = { + arrogant = minor_stress_impact_gain + fickle = minor_stress_impact_gain + lustful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = lustful + add = 50 + } + } + } + + # Option C: don't care! + option = { + name = ep2_wedding.1180.c + trigger = { + has_activity_intent = reduce_stress_intent + } + custom_tooltip = available_because_intent_tt + scope:other_spouse = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + stress_impact = { + base = major_stress_impact_loss + } + ai_chance = { + base = 150 + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:other_spouse = { remove_character_flag = busy_in_ceremony_event } + } +} + +################################################## +# Religious Complaints +# by Claudia Baldassi +# ep2_wedding.1190 +################################################## + +# Religious guest complains about lavishness, luxury, wastes, and unchaste mingling + +ep2_wedding.1190 = { + type = activity_event + title = ep2_wedding.1190.t + desc = ep2_wedding.1190.desc + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:grumbler + animation = personality_zealous + } + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { + root = scope:host + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + scope:activity = { + any_attending_character = { + NOR = { + this = root + this = scope:host + } + OR = { + this = root.faith.religious_head + has_trait = devoted + has_trait = theologian + has_trait = zealous + } + faith = { + NOR = { + trait_is_virtue = lustful + trait_is_virtue = gluttonous + } + } + } + NOT = { + has_variable = has_had_1190 + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = busy_in_ceremony_event + scope:activity = { + set_variable = has_had_1190 + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:host + } + this = root.faith.religious_head + faith = { + NOR = { + trait_is_virtue = lustful + trait_is_virtue = gluttonous + } + } + } + alternative_limit = { + NOR = { + this = root + this = scope:host + } + has_trait = devoted + faith = { + NOR = { + trait_is_virtue = lustful + trait_is_virtue = gluttonous + } + } + } + alternative_limit = { + NOR = { + this = root + this = scope:host + } + has_trait = theologian + faith = { + NOR = { + trait_is_virtue = lustful + trait_is_virtue = gluttonous + } + } + } + alternative_limit = { + NOR = { + this = root + this = scope:host + } + has_trait = zealous + faith = { + NOR = { + trait_is_virtue = lustful + trait_is_virtue = gluttonous + } + } + } + save_scope_as = grumbler + add_character_flag = busy_in_ceremony_event + } + add_activity_log_entry = { + key = wedding_religious_complaints_log + tags = { bad } + score = 20 + character = scope:grumbler + } + } + } + + # Option A: repent + option = { + name = ep2_wedding.1190.a + scope:grumbler = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + has_trait = zealous + } + } + } + scope:activity = { + every_attending_character = { + limit = { + has_trait = zealous + this != scope:grumbler + this != root + } + custom = every_zealous_attending_character + add_opinion = { + target = root + modifier = pious_opinion + opinion = 5 + } + } + } + } + if = { + limit = { + has_lifestyle = learning_lifestyle + } + add_learning_lifestyle_xp = medium_lifestyle_experience + } + stress_impact = { + zealous = medium_stress_impact_loss + humble = minor_stress_impact_loss + temperate = minor_stress_impact_loss + chaste = minor_stress_impact_loss + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + gluttonous = medium_stress_impact_gain + lustful = medium_stress_impact_gain + drunkard = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1.5 + } + } + } + + # Option B: kick them out + option = { + name = ep2_wedding.1190.b + trigger = { + root = scope:host + } + scope:grumbler = { + remove_from_activity = scope:activity + } + progress_towards_rival_effect = { + CHARACTER = scope:grumbler + REASON = rival_kicked_out_priest + OPINION = default_rival_opinion + } + stress_impact = { + zealous = major_stress_impact_gain + cynical = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + gluttonous = medium_stress_impact_loss + lustful = medium_stress_impact_loss + drunkard = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = gluttonous + add = 25 + } + modifier = { + has_trait = lustful + add = 50 + } + modifier = { + has_trait = cynical + add = 50 + } + modifier = { + has_trait = drunkard + add = 50 + } + } + } + + # Option C: ignore + option = { + name = ep2_wedding.1190.c + scope:grumbler = { + add_opinion = { + target = root + modifier = ignored_opinion + opinion = -5 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + cynical = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + lustful = minor_stress_impact_loss + drunkard = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + # Option D: yes, and I will enjoy it too! + option = { + name = ep2_wedding.1190.d + trigger = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = woo_attendee_intent + has_activity_intent = banquet_mischief_intent + } + } + custom_tooltip = available_because_intent_tt + scope:grumbler = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -20 + } + } + if = { + limit = { + has_activity_intent = woo_attendee_intent + intent_target = { + NOR = { + this = scope:grumbler + has_trait = zealous + } + } + } + root = { + progress_towards_lover_effect = { + CHARACTER = root.intent_target + REASON = lover_daring_move + OPINION = default_lover_opinion + } + } + } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 200 + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:grumbler = { remove_character_flag = busy_in_ceremony_event } + } +} + +################################################## +# A Parent's Heart +# by Claudia Baldassi +# ep2_wedding.1200 +################################################## + +# Proud parent watches everything go well and brags with intent target/friend/rival/neighbor + +ep2_wedding.1200 = { + type = activity_event + title = ep2_wedding.1200.t + desc = { + desc = ep2_wedding.1200.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_activity_intent = woo_attendee_intent + has_activity_intent = diplomatic_intent + has_activity_intent = matchmaking_intent + scope:listener = { has_relation_rival = root } + scope:listener = { has_relation_potential_rival = root} + } + } + desc = ep2_wedding.1200.desc_interest + } + desc = ep2_wedding.1200.desc_generic + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = wedding_happy_cry + } + center_portrait = { + character = scope:my_child + animation = wrestling_victory + } + right_portrait = { + character = scope:listener + animation = boredom + } + lower_left_portrait = scope:my_child + lower_center_portrait = scope:intent_target + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + OR = { + scope:activity.special_guest:spouse_1 = { is_child_of = root } + scope:activity.special_guest:spouse_2 = { is_child_of = root } + } + # Incest alert + NOR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + scope:activity = { + any_attending_character = { + NOR = { + this = root + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + } + trigger_if = { + limit = { + has_activity_intent = matchmaking_intent + } + OR = { + root.intent_target = { has_variable = wedding_good_match } + scope:activity = { + any_attending_character = { + is_ai = yes + location = root.location + can_marry_character_trigger = { CHARACTER = root.intent_target } + NOR = { + exists = betrothed + has_character_flag = busy_in_wgathering_event + is_close_or_extended_family_of = root.intent_target + root.intent_target.var:wedding_no_match ?= this + } + trigger_if = { + limit = { + is_female = yes + } + age < marriage_female_fertility_cutoff_age_value + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = woo_attendee_intent + add = 1 + } + modifier = { + has_activity_intent = diplomatic_intent + add = 1 + } + modifier = { + has_activity_intent = matchmaking_intent + add = 1 + } + modifier = { + root = scope:host + add = 2 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + if = { + limit = { + scope:activity.special_guest:spouse_1 = { is_child_of = root } + } + scope:activity.special_guest:spouse_1 = { save_scope_as = my_child } + } + else = { + scope:activity.special_guest:spouse_2 = { save_scope_as = my_child } + } + if = { + limit = { + OR = { + has_activity_intent = woo_attendee_intent + has_activity_intent = diplomatic_intent + } + } + intent_target = { save_scope_as = listener } + } + else_if = { + limit = { + has_activity_intent = matchmaking_intent + intent_target = { has_variable = wedding_good_match } + } + intent_target.var:wedding_good_match = { save_scope_as = listener } + } + else_if = { + limit = { + has_activity_intent = matchmaking_intent + } + scope:activity = { + random_attending_character = { + limit = { + is_ai = yes + location = root.location + can_marry_character_trigger = { CHARACTER = root.intent_target } + NOR = { + exists = betrothed + has_character_flag = busy_in_wgathering_event + is_close_or_extended_family_of = root.intent_target + root.intent_target.var:wedding_no_match ?= this + } + trigger_if = { + limit = { + is_female = yes + } + age < marriage_female_fertility_cutoff_age_value + } + } + save_scope_as = listener + } + } + } + else_if = { + limit = { + scope:activity = { + any_attending_character = { + OR = { + has_relation_friend = root + has_relation_rival = root + has_relation_lover = root + has_relation_potential_friend = root + has_relation_potential_rival = root + has_relation_potential_lover = root + } + NOR = { + this = scope:my_child + this = scope:my_child.betrothed + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + OR = { + has_relation_friend = root + has_relation_rival = root + has_relation_lover = root + has_relation_potential_friend = root + has_relation_potential_rival = root + has_relation_potential_lover = root + } + NOR = { + this = scope:my_child + this = scope:my_child.betrothed + } + } + save_scope_as = listener + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:my_child + this = scope:my_child.betrothed + } + } + save_scope_as = listener + } + } + } + scope:listener = { add_character_flag = busy_in_ceremony_event } + if = { + limit = { + has_activity_intent = matchmaking_intent + } + intent_target = { save_scope_as = intent_target } + } + } + + # Option A: So proud + option = { + name = ep2_wedding.1200.a + add_prestige = minor_prestige_gain + dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:listener } + add = 50 + } + } + } + + # Option B: Aren't you jealous + option = { + name = ep2_wedding.1200.b + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:listener } + } + progress_towards_rival_effect = { + CHARACTER = scope:listener + REASON = rival_rubbed_it_in + OPINION = default_rival_opinion + } + } + else_if = { + limit = { + has_relation_rival = scope:listener + num_of_relation_nemesis = 0 + } + set_relation_nemesis = { + target = scope:listener + reason = rival_rubbed_it_in + } + } + else = { + reverse_add_opinion = { + target = scope:listener + modifier = annoyed_opinion + opinion = -15 + } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_gloating_log + tags = { bad } + score = 20 + character = root + target = scope:listener + } + } + stress_impact = { + vengeful = medium_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:listener } + add = 50 + } + modifier = { + has_trait = vengeful + add = 25 + } + modifier = { + has_trait = callous + add = 25 + } + } + } + + # Option C: Woo - what about *us* + option = { + name = ep2_wedding.1200.c + trigger = { + has_activity_intent = woo_attendee_intent + } + custom_tooltip = available_because_intent_tt + duel = { + skill = intrigue + target = scope:listener + 50 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:listener = { has_trait = lustful } + add = 15 + } + desc = ep2_wedding.1200.success + send_interface_toast = { + title = ep2_wedding.1200.success.tt + left_icon = root + right_icon = scope:listener + progress_towards_lover_effect = { + CHARACTER = scope:listener + REASON = lover_love_is_in_the_air + OPINION = default_lover_opinion + } + stress_impact = { + base = minor_stress_impact_loss + lustful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + } + } + } + 50 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:listener = { has_trait = chaste } + add = 15 + } + desc = ep2_wedding.1200.failure + send_interface_toast = { + title = ep2_wedding.1200.failure.tt + left_icon = root + right_icon = scope:listener + scope:listener = { + add_opinion = { + target = root + modifier = awkward_opinion + opinion = -10 + } + } + stress_impact = { + base = minor_stress_impact_gain + lustful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 200 + } + } + + # Option D: Diplo: impressive show of power + option = { + name = ep2_wedding.1200.d + flavor = ep2_wedding.1200.d.tt + trigger = { + has_activity_intent = diplomatic_intent + } + custom_tooltip = available_because_intent_tt + duel = { + skill = diplomacy + target = scope:listener + 40 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + root = scope:host + add = 10 + } + modifier = { + scope:listener = { has_trait = trusting } + add = 10 + } + desc = ep2_wedding.1200.success + send_interface_toast = { + title = ep2_wedding.1200.success.tt + left_icon = root + right_icon = scope:listener + complete_activity_intent = yes + scope:activity = { + add_activity_log_entry = { + key = wedding_alliance_log + tags = { good } + score = 20 + character = root + target = scope:listener + + root = { + create_alliance = { + target = scope:listener + allied_through_owner = root + allied_through_target = scope:listener + } + } + scope:listener = { + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + } + } + } + 60 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:listener = { has_trait = paranoid } + add = 20 + } + desc = ep2_wedding.1200.failure + send_interface_toast = { + title = ep2_wedding.1200.failure.tt + left_icon = root + right_icon = scope:listener + stress_impact = { + base = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 200 + } + } + + # Option E: Matchmaking: if only I could do the same for X + option = { + name = ep2_wedding.1200.e + trigger = { + has_activity_intent = matchmaking_intent + } + custom_tooltip = available_because_intent_tt + duel = { + skills = { diplomacy intrigue } + target = scope:listener + 50 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1200.e.success + send_interface_toast = { + title = ep2_wedding.1200.e.success + left_icon = root + right_icon = scope:listener + custom_tooltip = ep2_wedding.1200.e.success.tt + if = { + limit = { + intent_target = { + NOT = { + has_variable = wedding_good_match + } + } + } + intent_target = { + set_variable = { + name = wedding_good_match + value = scope:listener + } + } + } + else = { + intent_target = { + create_betrothal = scope:listener + } + } + scope:listener = { + add_opinion = { + target = root + modifier = flattered_opinion + opinion = 15 + } + } + scope:listener = { + add_opinion = { + target = scope:intent_target + modifier = flattered_opinion + opinion = 15 + } + } + stress_impact = { + base = minor_stress_impact_loss + family_first = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + } + } + } + 50 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1200.e.failure + send_interface_toast = { + title = ep2_wedding.1200.e.failure + left_icon = root + right_icon = scope:listener + intent_target = { + set_variable = { + name = wedding_no_match + value = scope:listener + } + } + scope:listener = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -10 + } + } + stress_impact = { + base = minor_stress_impact_gain + family_first = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 200 + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:listener = { remove_character_flag = busy_in_ceremony_event } + } +} + +################################################## +# Political Talk +# by Claudia Baldassi +# ep2_wedding.1210 +################################################## + +# Political talk with a fellow ruler + +ep2_wedding.1210 = { + type = activity_event + title = ep2_wedding.1210.t + desc = { + desc = ep2_wedding.1210.desc + random_valid = { + triggered_desc = { + trigger = { + scope:talk_to.gold < 0 + } + desc = ep2_wedding.1210.desc_gold + } + triggered_desc = { + trigger = { + scope:talk_to = { + OR = { + has_trait = shy + has_trait = craven + } + } + } + desc = ep2_wedding.1210.desc_fear + } + triggered_desc = { + trigger = { + scope:talk_to = { + any_sub_realm_county = { + any_county_province = { + has_province_modifier = recently_looted_modifier + } + } + } + } + desc = ep2_wedding.1210.desc_raids + } + triggered_desc = { + trigger = { + scope:talk_to = { + OR = { + any_relation = { + type = rival + } + has_trait = paranoid + } + } + } + desc = ep2_wedding.1210.desc_rivals + } + triggered_desc = { + trigger = { + scope:talk_to = { + age > 65 + } + } + desc = ep2_wedding.1210.desc_age + } + desc = ep2_wedding.1210.desc_bad_harvest + desc = ep2_wedding.1210.desc_rain + desc = ep2_wedding.1210.desc_enemies + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:talk_to + animation = thinking + } + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + is_landed = yes + has_activity_intent = diplomatic_intent + intent_target = { + is_landed = yes + NOT = { is_vassal_of = root } + is_ai = yes + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + NOR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = busy_in_ceremony_event + intent_target = { + save_scope_as = talk_to + add_character_flag = busy_in_ceremony_event + } + } + + # Option A: gain hook + option = { + name = ep2_wedding.1210.a + trigger = { + can_add_hook = { + target = scope:talk_to + type = threat_hook + } + } + duel = { + skill = intrigue + target = scope:talk_to + 50 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = schemer + add = 10 + } + modifier = { + has_trait = torturer + add = 20 + } + modifier = { + scope:talk_to = { has_trait = lazy } + add = 20 + } + modifier = { + scope:talk_to = { has_trait = craven } + add = 20 + } + desc = ep2_wedding.1210.a.success + send_interface_toast = { + title = ep2_wedding.1210.a.success + left_icon = root + right_icon = scope:talk_to + scope:activity = { + add_activity_log_entry = { + key = wedding_intimidation_log + tags = { good } + score = 20 + character = root + target = scope:talk_to + + root = { + add_hook = { + target = scope:talk_to + type = threat_hook + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + deceitful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + } + } + } + 50 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:talk_to = { has_trait = torturer } + add = 20 + } + modifier = { + scope:talk_to = { has_trait = brave } + add = 20 + } + desc = ep2_wedding.1210.a.failure + send_interface_toast = { + title = ep2_wedding.1210.a.failure + left_icon = root + right_icon = scope:talk_to + reverse_add_opinion = { + target = scope:talk_to + modifier = threatened_opinion + opinion = -20 + } + stress_impact = { + base = minor_stress_impact_gain + deceitful = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + } + } + + # Option B: gain alliance + option = { + name = ep2_wedding.1210.b + duel = { + skill = diplomacy + target = scope:talk_to + 40 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = diplomat + add = 20 + } + modifier = { + has_trait = august + add = 10 + } + modifier = { + scope:talk_to = { has_trait = lazy } + add = 20 + } + modifier = { + scope:talk_to = { has_trait = trusting } + add = 20 + } + desc = ep2_wedding.1210.b.success + send_interface_toast = { + title = ep2_wedding.1210.b.success + left_icon = root + right_icon = scope:talk_to + complete_activity_intent = yes + scope:activity = { + add_activity_log_entry = { + key = wedding_alliance_log + tags = { good } + score = 20 + character = root + target = scope:talk_to + + root = { + create_alliance = { + target = scope:talk_to + allied_through_owner = root + allied_through_target = scope:talk_to + } + } + scope:talk_to = { + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + } + } + } + 60 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:talk_to = { has_trait = diplomat } + add = 20 + } + modifier = { + scope:talk_to = { has_trait = august } + add = 10 + } + modifier = { + scope:talk_to = { has_trait = paranoid } + add = 20 + } + modifier = { + scope:talk_to = { has_trait = shy } + add = 20 + } + desc = ep2_wedding.1210.b.failure + send_interface_toast = { + title = ep2_wedding.1210.b.failure + left_icon = root + right_icon = scope:talk_to + scope:talk_to = { + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -10 + } + } + stress_impact = { + base = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + } + } + + # Option C: subjugate + option = { + name = ep2_wedding.1210.c + trigger = { + scope:talk_to = { activity_wedding_diplomatic_intent_impressible_target = yes } + } + duel = { + skills = { diplomacy intrigue } + target = scope:talk_to + 30 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = diplomat + add = 20 + } + modifier = { + has_trait = august + add = 10 + } + modifier = { + scope:talk_to = { has_trait = trusting } + add = 20 + } + modifier = { + scope:talk_to = { has_trait = craven } + add = 20 + } + modifier = { + scope:talk_to = { has_trait = shy } + add = 20 + } + desc = ep2_wedding.1210.c.success + send_interface_toast = { + title = ep2_wedding.1210.c.success + left_icon = root + right_icon = scope:talk_to + complete_activity_intent = yes + scope:activity = { + add_activity_log_entry = { + key = wedding_fealty_log + tags = { good } + score = 20 + character = root + target = scope:talk_to + + root = { + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = title_change + add_claim_on_loss = no + } + scope:talk_to = { + change_liege = { + liege = root + change = scope:title_change + } + } + resolve_title_and_vassal_change = scope:title_change + } + } + } + stress_impact = { + base = minor_stress_impact_loss + ambitious = major_stress_impact_loss + } + } + } + 70 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:talk_to = { has_trait = diplomat } + add = 20 + } + modifier = { + scope:talk_to = { has_trait = august } + add = 10 + } + modifier = { + scope:talk_to = { has_trait = paranoid } + add = 20 + } + desc = ep2_wedding.1210.c.failure + send_interface_toast = { + title = ep2_wedding.1210.c.failure + left_icon = root + right_icon = scope:talk_to + scope:talk_to = { + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -20 + } + } + stress_impact = { + base = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:talk_to = { remove_character_flag = busy_in_ceremony_event } + } +} + +################################################## +# Poisonous Relations +# by Claudia Baldassi +# ep2_wedding.1220 +################################################## + +# In-laws are bullies (or other close relatives) + +scripted_trigger wedding_1220_valid_relative_trigger = { + is_ai = yes + is_adult = yes + is_close_family_of = $RELATIVE_SPOUSE$ + NOT = { is_close_family_of = $NON_RELATIVE_SPOUSE$ } + NOR = { + this = $RELATIVE_SPOUSE$ + this = $NON_RELATIVE_SPOUSE$ + } + OR = { + # They enjoy making people feel inadequate + has_trait = deceitful + has_trait = vengeful + has_trait = callous + has_trait = torturer + has_trait = greedy + has_trait = sadistic + # Their family is marrying down + highest_held_title_tier > $NON_RELATIVE_SPOUSE$.highest_held_title_tier + $RELATIVE_SPOUSE$.highest_held_title_tier > $NON_RELATIVE_SPOUSE$.highest_held_title_tier + # They are feuding + house_has_feud_relation_with_trigger = { TARGET = $NON_RELATIVE_SPOUSE$ } + # They already didn't like you + has_any_bad_relationship_with_character_trigger = { CHARACTER = $NON_RELATIVE_SPOUSE$ } + opinion = { + target = $NON_RELATIVE_SPOUSE$ + value <= -25 + } + # They think you are a criminal + has_imprisonment_reason = $NON_RELATIVE_SPOUSE$ + # Or a miscreant + faith = { + NOR = { + this = $NON_RELATIVE_SPOUSE$.faith + faith_hostility_level = { + target = $NON_RELATIVE_SPOUSE$.faith + value = 0 # Accepted + } + } + } + } +} + +ep2_wedding.1220 = { + type = activity_event + title = ep2_wedding.1220.t + desc = { + desc = ep2_wedding.1220.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:relative.highest_held_title_tier > root.highest_held_title_tier + scope:other_spouse.highest_held_title_tier > root.highest_held_title_tier + } + } + desc = ep2_wedding.1220.desc_marry_down + } + triggered_desc = { + trigger = { + scope:relative ?= { + house_has_feud_relation_with_trigger = { TARGET = root } + } + } + desc = ep2_wedding.1220.desc_feud + } + triggered_desc = { + trigger = { + scope:relative = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + opinion = { + target = root + value <= -25 + } + has_imprisonment_reason = root + } + } + } + desc = ep2_wedding.1220.desc_despicable + } + triggered_desc = { + trigger = { + scope:relative.faith = { + NOR = { + this = root.faith + faith_hostility_level = { + target = root.faith + value = 0 + } + } + } + } + desc = ep2_wedding.1220.desc_miscreant + } + desc = ep2_wedding.1220.desc_fallback + } + triggered_desc = { + trigger = { + has_activity_intent = diplomatic_intent + scope:relative != scope:diplo_target + } + desc = ep2_wedding.1220.desc_target + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = shame + } + center_portrait = { + trigger = { + scope:diplo_target ?= { this != scope:relative } + } + character = scope:diplo_target + animation = thinking + } + right_portrait = { + character = scope:relative + animation = anger + } + + lower_right_portrait = scope:other_spouse + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + trigger_if = { + limit = { + root = scope:activity.special_guest:spouse_1 + } + scope:activity = { + any_attending_character = { + wedding_1220_valid_relative_trigger = { + RELATIVE_SPOUSE = scope:activity.special_guest:spouse_2 + NON_RELATIVE_SPOUSE = scope:activity.special_guest:spouse_1 + } + } + } + } + trigger_else = { + scope:activity = { + any_attending_character = { + wedding_1220_valid_relative_trigger = { + RELATIVE_SPOUSE = scope:activity.special_guest:spouse_1 + NON_RELATIVE_SPOUSE = scope:activity.special_guest:spouse_2 + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_activity_intent = diplomatic_intent + add = 2 + } + modifier = { + has_activity_intent = banquet_mischief_intent + add = 1 + } + } + + immediate = { + add_character_flag = busy_in_ceremony_event + if = { + limit = { + root = scope:activity.special_guest:spouse_1 + } + scope:activity.special_guest:spouse_2 = { save_scope_as = other_spouse } + } + else = { + scope:activity.special_guest:spouse_1 = { save_scope_as = other_spouse } + } + scope:activity = { + random_attending_character = { + limit = { + wedding_1220_valid_relative_trigger = { + RELATIVE_SPOUSE = scope:other_spouse + NON_RELATIVE_SPOUSE = root + } + } + save_scope_as = relative + add_character_flag = busy_in_ceremony_event + } + } + if = { + limit = { + has_activity_intent = diplomatic_intent + } + intent_target = { save_scope_as = diplo_target } + } + } + + # Option A: ignore + option = { + name = ep2_wedding.1220.a + add_prestige = minor_prestige_loss + scope:relative = { + add_opinion = { + target = root + modifier = weak_opinion + opinion = 15 + } + } + stress_impact = { + lazy = minor_stress_impact_loss + calm = medium_stress_impact_loss + patient = medium_stress_impact_loss + humble = medium_stress_impact_loss + content = medium_stress_impact_loss + forgiving = major_stress_impact_loss + wrathful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } + + # Option B: react aggressively + option = { + name = ep2_wedding.1220.b + add_prestige = medium_prestige_gain + scope:relative = { + add_opinion = { + target = root + modifier = threatened_opinion + opinion = -15 + } + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:relative } + } + progress_towards_rival_effect = { + REASON = rival_wedding_challenged_prejudices + CHARACTER = scope:relative + OPINION = 0 + } + } + stress_impact = { + lazy = minor_stress_impact_gain + calm = medium_stress_impact_gain + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + craven = medium_stress_impact_gain + shy = medium_stress_impact_gain + paranoid = minor_stress_impact_loss + wrathful = medium_stress_impact_loss + brave = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + stubborn = medium_stress_impact_loss + vengeful = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + # Option C: diplomatic intent: if you handle them well, you can also impress your target (especially if they are the target) + option = { + name = ep2_wedding.1220.c + trigger = { + has_activity_intent = diplomatic_intent + } + flavor = ep2_wedding.1220.c.tt + custom_tooltip = available_because_intent_tt + duel = { + skill = diplomacy + target = scope:relative + 50 = { + # Success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1220.c.success + send_interface_toast = { + title = ep2_wedding.1220.c.success.tt + left_icon = root + right_icon = scope:relative + scope:activity = { + add_activity_log_entry = { + key = wedding_proved_wrong_log + tags = { good } + score = 50 + character = root + target = scope:relative + + root = { + add_prestige = medium_prestige_gain + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:relative } + } + progress_towards_friend_effect = { + REASON = friend_wedding_not_so_bad + CHARACTER = scope:relative + OPINION = default_friend_opinion + } + } + } + scope:diplo_target ?= { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + if = { + limit = { + this = scope:relative + root = { + can_add_hook = { + target = scope:relative + type = favor_hook + } + } + } + root = { + add_hook = { + target = scope:relative + type = favor_hook + } + } + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + calm = medium_stress_impact_loss + patient = medium_stress_impact_loss + forgiving = major_stress_impact_loss + } + } + } + 50 = { + # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1220.c.failure + send_interface_toast = { + title = ep2_wedding.1220.c.failure.tt + left_icon = root + right_icon = scope:relative + add_prestige = minor_prestige_loss + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:relative } + } + progress_towards_rival_effect = { + REASON = rival_wedding_confirmed_prejudices + CHARACTER = scope:relative + OPINION = default_rival_opinion + } + } + stress_impact = { + base = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + wrathful = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 200 + } + } + + # Option D: mischief intent: mess with them + option = { + name = ep2_wedding.1220.d + trigger = { + has_activity_intent = banquet_mischief_intent + } + custom_tooltip = available_because_intent_tt + if = { + limit = { + has_lifestyle = intrigue_lifestyle + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + add_dread = minor_dread_gain + stress_impact = { + base = medium_stress_impact_loss + arrogant = major_stress_impact_loss + stubborn = major_stress_impact_loss + vengeful = major_stress_impact_loss + } + ai_chance = { + base = 200 + } + } + + after = { + remove_character_flag = busy_in_ceremony_event + scope:relative = { remove_character_flag = busy_in_ceremony_event } + } +} + + + +# BANQUET EVENTS + +################################################## +# A Kindred Spirit +# by Claudia Baldassi +# ep2_wedding.1040 +################################################## + +# You make a new friend + +ep2_wedding.1040 = { + type = activity_event + title = ep2_wedding.1040.t + desc = ep2_wedding.1040.desc + theme = wedding_banquet_activity + center_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:new_friend + animation = personality_content + } + + cooldown = { years = 1 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + scope:activity = { + any_attending_character = { + OR = { + has_relation_potential_friend = root + AND = { + has_any_good_relationship_with_root_trigger = no + has_any_bad_relationship_with_root_trigger = no + } + } + is_ai = yes + is_adult = yes + NOT = { has_character_flag = busy_in_banquet_event } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_ai = yes + factor = 0.1 + } + } + + immediate = { + add_character_flag = busy_in_banquet_event + scope:activity = { + random_attending_character = { + limit = { + OR = { + has_relation_potential_friend = root + AND = { + has_any_good_relationship_with_root_trigger = no + has_any_bad_relationship_with_root_trigger = no + } + } + is_ai = yes + is_adult = yes + NOT = { has_character_flag = busy_in_banquet_event } + } + save_scope_as = new_friend + } + } + scope:new_friend = { add_character_flag = busy_in_banquet_event } + } + + #Option A: + option = { + name = ep2_wedding.1040.a + scope:activity = { + add_activity_log_entry = { + key = wedding_kindred_log + tags = { good } + score = 50 + character = root + target = scope:new_friend + + # Effect + root = { + set_relation_friend = { reason = friend_wedding_enjoyable_chat target = scope:new_friend } + reverse_add_opinion = { + target = scope:new_friend + modifier = friendliness_opinion + opinion = 20 + } + } + } + } + stress_impact = { + shy = minor_stress_impact_gain + reclusive = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + trusting = medium_stress_impact_loss + gregarious = major_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + has_trait = shy + add = -50 + } + modifier = { + has_trait = reclusive + add = -75 + } + modifier = { + has_trait = paranoid + add = -75 + } + } + } + + #Option B: + option = { + name = ep2_wedding.1040.b + reverse_add_opinion = { + target = scope:new_friend + modifier = unfriendly_opinion + opinion = -15 + } + stress_impact = { + gregarious = medium_stress_impact_gain + reclusive = major_stress_impact_loss + paranoid = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = gregarious + add = -75 + } + } + } + after = { + remove_character_flag = busy_in_banquet_event + scope:new_friend = { remove_character_flag = busy_in_banquet_event } + } +} + +################################################## +# A Fiery Dance +# by Claudia Baldassi +# ep2_wedding.1050 +################################################## + +# Someone catches fire from the torches + +scripted_trigger ep2_wedding_extra_victim_valid_trigger = { + is_ai = yes + is_adult = yes + NOR = { + this = root + this = scope:1050_victim + } + NOT = { has_character_flag = busy_in_banquet_event } +} + +ep2_wedding.1050 = { + type = activity_event + title = ep2_wedding.1050.t + desc = ep2_wedding.1050.desc + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = fear + } + center_portrait = { + trigger = { + exists = scope:extra_victim_1 + } + character = scope:extra_victim_1 + animation = shock + } + right_portrait = { + character = scope:victim + animation = pain + } + lower_center_portrait = scope:other_victim + lower_right_portrait = scope:extra_victim_2 + + cooldown = { years = 15 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + NOT = { + has_variable = has_had_event_1050 + } + } + + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_good + } + } + scope:activity = { + any_attending_character = { + is_adult = yes + this != root + is_ai = yes + NOT = { has_character_flag = busy_in_banquet_event } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_ai = yes + factor = 0.1 + } + } + + immediate = { + scope:activity = { + set_variable = has_had_event_1050 + } + scope:activity = { + random_attending_character = { + limit = { + is_adult = yes + this != root + is_ai = yes + NOT = { has_character_flag = busy_in_banquet_event } + } + save_scope_as = 1050_victim + increase_wounds_effect = { REASON = burned } + add_character_flag = busy_in_banquet_event + } + } + add_character_flag = busy_in_banquet_event + if = { + limit = { + scope:activity = { + any_attending_character = { + ep2_wedding_extra_victim_valid_trigger = yes + save_temporary_scope_as = extra_victim_1 + } + } + scope:activity = { + any_attending_character = { + ep2_wedding_extra_victim_valid_trigger = yes + this != scope:extra_victim_1 + } + } + } + scope:activity = { + random_attending_character = { + limit = { + ep2_wedding_extra_victim_valid_trigger = yes + } + save_scope_as = extra_victim_1 + add_character_flag = busy_in_banquet_event + } + random_attending_character = { + limit = { + ep2_wedding_extra_victim_valid_trigger = yes + this != scope:extra_victim_1 + } + save_scope_as = extra_victim_2 + add_character_flag = busy_in_banquet_event + } + } + } + if = { + limit = { + scope:activity = { + any_attending_character = { + ep2_wedding_extra_victim_valid_trigger = yes + NOR = { + this = scope:extra_victim_1 + this = scope:extra_victim_2 + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + ep2_wedding_extra_victim_valid_trigger = yes + NOR = { + this = scope:extra_victim_1 + this = scope:extra_victim_2 + } + } + save_scope_as = other_victim + add_character_flag = busy_in_banquet_event + } + } + } + } + + #Option A: try to save them + option = { + name = ep2_wedding.1050.a + duel = { + skill = prowess + value = decent_skill_rating + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1050.a.success + send_interface_toast = { + title = ep2_wedding.1050.a.success.tt + left_icon = scope:1050_victim + scope:activity = { + add_activity_log_entry = { + key = wedding_dance_rescue_log + tags = { good } + score = 25 + character = root + target = scope:1050_victim + + # Effect + root = { + reverse_add_opinion = { + target = scope:1050_victim + modifier = grateful_opinion + opinion = 30 + } + if = { + limit = { + can_add_hook = { + type = indebted_hook + target = scope:1050_victim + } + } + add_hook = { + type = indebted_hook + target = scope:1050_victim + } + } + if = { + limit = { + has_activity_intent = woo_attendee_intent + intent_target = scope:1050_victim + } + progress_towards_lover_effect = { + REASON = lover_wedding_saved_from_flames + CHARACTER = scope:1050_victim + OPINION = default_lover_opinion + } + } + else_if = { + limit = { + has_activity_intent = diplomatic_intent + intent_target = scope:1050_victim + } + create_alliance = { + target = scope:1050_victim + allied_through_owner = root + allied_through_target = scope:1050_victim + } + scope:1050_victim = { + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + } + } + } + } + } + } + } + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1050.a.failure + send_interface_toast = { + title = ep2_wedding.1050.a.failure.tt + left_icon = scope:1050_victim + scope:activity = { + add_activity_log_entry = { + key = wedding_dance_rescue_fail_log + tags = { bad } + score = 25 + character = root + target = scope:1050_victim + + # Effect + root = { + increase_wounds_effect = { REASON = burned } + scope:1050_victim = { + increase_wounds_effect = { REASON = burned } + } + } + } + } + } + } + } + stress_impact = { + craven = massive_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + has_trait = brave + add = 100 + } + modifier = { + has_trait = craven + add = -100 + } + } + } + + #Option B: call for help + option = { + name = ep2_wedding.1050.b + random_list = { + 50 = { + #Saved! + desc = ep2_wedding.1050.b.1 + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + add = -25 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_good + } + } + add = 25 + } + send_interface_toast = { + title = ep2_wedding.1050.b.1.tt + left_icon = scope:1050_victim + scope:activity = { + add_activity_log_entry = { + key = wedding_dance_saved_log + tags = { good } + score = 25 + character = scope:1050_victim + } + + root = { + reverse_add_opinion = { + target = scope:1050_victim + modifier = grateful_opinion + opinion = 15 + } + if = { + limit = { + can_add_hook = { + type = indebted_hook + target = scope:1050_victim + } + } + add_hook = { + type = indebted_hook + target = scope:1050_victim + } + } + } + } + } + } + 50 = { + #Keeps burning! + desc = ep2_wedding.1050.b.2 + send_interface_toast = { + title = ep2_wedding.1050.b.2.tt + left_icon = scope:1050_victim + scope:activity = { + add_activity_log_entry = { + key = wedding_dance_saved_fail_log + tags = { bad } + score = 25 + character = scope:1050_victim + + # Effect + scope:1050_victim = { + increase_wounds_effect = { REASON = burned } + } + } + } + } + } + } + ai_chance = { + base = 50 + } + } + + #Option C: FIRE! + option = { + name = ep2_wedding.1050.c + trigger = { + exists = scope:extra_victim_1 + exists = scope:extra_victim_2 + } + scope:activity = { + add_activity_log_entry = { + key = wedding_dance_disaster_log + tags = { bad } + score = 25 + character = scope:1050_victim + + # Effect + scope:extra_victim_1 = { + increase_wounds_effect = { REASON = burned } + } + scope:extra_victim_2 = { + increase_wounds_effect = { REASON = burned } + } + + root = { add_dread = medium_dread_gain } + } + } + stress_impact = { + compassionate = major_stress_impact_gain + callous = medium_stress_impact_loss + vengeful = major_stress_impact_loss + sadistic = massive_stress_impact_loss + torturer = massive_stress_impact_loss + } + ai_chance = { + base = 30 + modifier = { + has_trait = sadistic + add = 70 + } + modifier = { + has_trait = callous + add = 20 + } + modifier = { + has_trait = compassionate + add = -70 + } + } + } + + #Option D: panic + option = { + name = ep2_wedding.1050.d + trigger = { exists = scope:other_victim } + random = { + chance = 30 + send_interface_toast = { + title = ep2_wedding.1050.d.tt.2 + left_icon = scope:other_victim + scope:activity = { + add_activity_log_entry = { + key = wedding_dance_knocked_log + tags = { bad } + score = 25 + character = root + target = scope:other_victim + + # Effect + root = { custom_tooltip = ep2_wedding.1050.d.tt } + scope:other_victim = { + increase_wounds_effect = { REASON = burned } + } + } + } + } + + } + stress_impact = { + brave = massive_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + has_trait = craven + add = 100 + } + modifier = { + has_trait = brave + add = -100 + } + } + } + after = { + remove_character_flag = busy_in_banquet_event + scope:1050_victim = { remove_character_flag = busy_in_banquet_event } + if = { + limit = { exists = scope:other_victim } + scope:other_victim = { remove_character_flag = busy_in_banquet_event } + } + if = { + limit = { exists = scope:extra_victim_1 } + scope:extra_victim_1 = { remove_character_flag = busy_in_banquet_event } + } + if = { + limit = { exists = scope:extra_victim_2 } + scope:extra_victim_2 = { remove_character_flag = busy_in_banquet_event } + } + } +} + +################################################## +# An Exotic Show +# by Claudia Baldassi +# ep2_wedding.1070 +################################################## + +# Showing off exotic animals can go very well or very wrong + +ep2_wedding.1070 = { + type = activity_event + title = ep2_wedding.1070.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + root = scope:host + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + desc = ep2_wedding.1070.desc_host + } + desc = ep2_wedding.1070.desc_guest + } + desc = ep2_wedding.1070.desc_mid + first_valid = { + triggered_desc = { #Everyone is impressed + trigger = { + has_character_flag = 1070_exotic_fiends_good + } + desc = ep2_wedding.1070.desc_good + } + desc = ep2_wedding.1070.desc_bad #The animals are out of control! + } + triggered_desc = { + trigger = { + exists = scope:1070_target + has_character_flag = 1070_exotic_fiends_bad + } + desc = ep2_wedding.1070.desc_bad_target + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_character_flag = 1070_exotic_fiends_bad + } + animation = shock + } + triggered_animation = { + trigger = { + has_character_flag = 1070_exotic_fiends_good + } + animation = personality_bold + } + } + right_portrait = { + trigger = { + exists = scope:1070_target + has_character_flag = 1070_exotic_fiends_bad + } + character = scope:1070_target + animation = fear + } + + lower_right_portrait = scope:m_hunt + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_good + } + } + scope:activity = { + NOT = { has_variable = has_had_event_1070 } + } + scope:host = { + has_character_modifier = hunt_captive_beast_modifier + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:host = { has_trait = arrogant } + add = 1 + } + modifier = { + scope:host = { has_trait = humble } + add = -1 + } + modifier = { + is_ai = no + factor = 2 + } + } + + immediate = { + add_character_flag = busy_in_banquet_event + scope:activity = { set_variable = has_had_event_1070 } + scope:host = { + if = { + limit = { + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position + is_ai = yes + is_adult = yes + involved_activity = root.involved_activity + NOT = { has_character_flag = busy_in_banquet_event } + } + } + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { + is_ai = yes + is_adult = yes + involved_activity = root.involved_activity + NOT = { has_character_flag = busy_in_banquet_event } + } + save_scope_as = m_hunt + add_character_flag = busy_in_banquet_event + } + } + } + if = { + limit = { + OR = { + has_activity_intent = murder_attendee_intent + has_activity_intent = woo_attendee_intent + has_activity_intent = diplomatic_intent + } + } + intent_target = { save_scope_as = 1070_target } + } + random_list = { + 50 = { # all goes well + modifier = { + scope:host = { + employs_court_position = master_of_hunt_court_position + } + add = 15 + } + modifier = { + exists = scope:m_hunt + add = 15 + } + modifier = { + scope:host = { + has_trait = lifestyle_hunter + } + add = 25 + } + modifier = { + scope:host = { + has_trait = diligent + } + add = 20 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_good + } + } + add = 20 + } + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_normal + } + } + add = 5 + } + add_character_flag = 1070_exotic_fiends_good + } + 50 = { # a beast escapes! + modifier = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + add = 30 + } + modifier = { + scope:host = { + has_trait = arrogant + } + add = 20 + } + modifier = { + scope:host = { + has_trait = lazy + } + add = 15 + } + add_character_flag = 1070_exotic_fiends_bad + if = { + limit = { + this = scope:host + } + stress_impact = { + arrogant = major_stress_impact_gain + ambitious = major_stress_impact_gain + diligent = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + } + } + } + + #Option A: a worthy show + option = { + name = ep2_wedding.1070.a + trigger = { has_character_flag = 1070_exotic_fiends_good } + scope:activity = { + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_good_entertainment_opinion + } + } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_entertain_log + tags = { good } + score = 20 + character = scope:host + + # Effect + scope:host = { add_prestige = medium_prestige_gain } + } + } + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + #Option E: I can do better + option = { + name = ep2_wedding.1070.e + flavor = ep2_wedding.1070.e.tt + trigger = { + has_character_flag = 1070_exotic_fiends_good + } + scope:activity = { + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_good_entertainment_opinion + } + } + } + duel = { + skill = prowess + value = high_skill_rating + # Success: you make the beasts do your bid! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1070.e.success + send_interface_toast = { + title = ep2_wedding.1070.e.tt.success + left_icon = root + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_charm_success_log + tags = { good } + score = 20 + character = root + + # Effect + root = { + add_character_modifier = { + modifier = ep2_beastmaster_modifier + years = 20 + } + add_prestige = medium_prestige_gain + } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 25 + } + } + } + root = { + stress_impact = { + base = minor_stress_impact_loss + brave = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + arrogant = major_stress_impact_loss + ambitious = major_stress_impact_loss + } + } + } + } + # Failure: the beasts disagree with you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1070.e.failure + send_interface_toast = { + title = ep2_wedding.1070.e.tt.failure + left_icon = root + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_charm_failure_log + tags = { bad } + score = 20 + character = root + + # Effect + root = { + random_list = { + 20 = { + custom_tooltip = ep2_wedding.1070.e.tt.failure_1 + scope:activity = { + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != root + } + add_opinion = { + target = root + modifier = laughingstock_opinion + } + } + } + } + 50 = { + increase_wounds_effect = { REASON = wild_animal } + } + 30 = { + trigger = { + NOT = { has_trait = maimed } + } + apply_maimed_trait_and_modifier_effect = yes + } + 30 = { + trigger = { + NOT = { has_trait = one_eyed } + } + add_trait = one_eyed + } + 30 = { + trigger = { + NOT = { has_trait = one_legged } + } + add_trait = one_legged + } + } + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + lazy = major_stress_impact_gain + content = major_stress_impact_gain + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 75 + } + modifier = { + has_trait = ambitious + add = 50 + } + modifier = { + has_trait = stubborn + add = 50 + } + modifier = { + has_trait = lazy + add = -75 + } + modifier = { + has_trait = content + add = -50 + } + } + } + + #Option B: jump in to save the day! + option = { + name = ep2_wedding.1070.b + trigger = { + has_character_flag = 1070_exotic_fiends_bad + NOT = { exists = scope:1070_target } + } + duel = { + skill = prowess + value = high_skill_rating + # Success: you calm down the beasts + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1070.b.success + send_interface_toast = { + title = ep2_wedding.1070.b.tt.success + left_icon = root + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_calmed_success_log + tags = { good } + score = 20 + character = root + + # Effect + root = { + add_character_modifier = { + modifier = ep2_beastmaster_modifier + years = 20 + } + } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 25 + } + } + } + root = { + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + lifestyle_hunter = medium_stress_impact_loss + brave = major_stress_impact_loss + gregarious = major_stress_impact_loss + arrogant = major_stress_impact_loss + } + } + } + } + # Failure: the beasts disagree with you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1070.b.failure + send_interface_toast = { + title = ep2_wedding.1070.e.tt.failure + left_icon = root + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_calmed_failure_log + tags = { good } + score = 20 + character = root + + # Effect + root = { + random_list = { + 50 = { + increase_wounds_effect = { REASON = wild_animal } + } + 30 = { + trigger = { + NOT = { has_trait = maimed } + } + apply_maimed_trait_and_modifier_effect = yes + } + 30 = { + trigger = { + NOT = { has_trait = one_eyed } + } + add_trait = one_eyed + } + 30 = { + trigger = { + NOT = { has_trait = one_legged } + } + add_trait = one_legged + } + } + } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_scary_entertainment_opinion + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + lifestyle_hunter = medium_stress_impact_gain + lazy = medium_stress_impact_gain + craven = major_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = brave + add = 75 + } + modifier = { + has_trait = compassionate + add = 25 + } + modifier = { + has_trait = lifestyle_hunter + add = 25 + } + modifier = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 } + add = 25 + } + modifier = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + add = 25 + } + modifier = { + has_trait = lazy + add = -75 + } + modifier = { + has_trait = craven + add = -100 + } + } + } + + #Option G: jump in to save the intent target! + option = { + name = ep2_wedding.1070.g + trigger = { + has_character_flag = 1070_exotic_fiends_bad + exists = scope:1070_target + NOT = { has_activity_intent = murder_attendee_intent } + } + duel = { + skill = prowess + value = high_skill_rating + # Success: you calm down the beasts + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1070.g.success + send_interface_toast = { + title = ep2_wedding.1070.g.tt.success + left_icon = scope:1070_target + set_relation_friend = { reason = friend_wedding_saved_from_beasts target = scope:1070_target } + if = { + limit = { has_activity_intent = woo_attendee_intent } + progress_towards_lover_effect = { + REASON = friend_wedding_saved_from_beasts + CHARACTER = scope:1070_target + OPINION = default_lover_opinion + } + } + else_if = { + limit = { + has_activity_intent = diplomatic_intent + intent_target = scope:1070_target + } + add_hook = { + type = indebted_hook + target = scope:1070_target + } + create_alliance = { + target = scope:1070_target + allied_through_owner = root + allied_through_target = scope:1070_target + } + scope:1070_target = { + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + } + complete_activity_intent = yes + } + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_rescue_success_log + tags = { good } + score = 20 + character = root + target = scope:1070_target + + # Effect + root = { + add_character_modifier = { + modifier = ep2_beastmaster_modifier + years = 20 + } + } + scope:1070_target = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + NOR = { + this = root + this = scope:1070_target + } + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 25 + } + } + } + root = { + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + lifestyle_hunter = medium_stress_impact_loss + brave = major_stress_impact_loss + gregarious = major_stress_impact_loss + arrogant = major_stress_impact_loss + } + } + } + } + # Failure: the beasts disagree with you + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1070.g.failure + send_interface_toast = { + title = ep2_wedding.1070.g.tt.failure + left_icon = root + right_icon = scope:1070_target + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_rescue_failure_log + tags = { bad } + score = 20 + character = root + target = scope:1070_target + + # Effect + root = { + random_list = { + 50 = { + increase_wounds_effect = { REASON = wild_animal } + } + 30 = { + trigger = { + NOT = { has_trait = maimed } + } + apply_maimed_trait_and_modifier_effect = yes + } + 30 = { + trigger = { + NOT = { has_trait = one_eyed } + } + add_trait = one_eyed + } + 30 = { + trigger = { + NOT = { has_trait = one_legged } + } + add_trait = one_legged + + } + } + } + scope:1070_target = { increase_wounds_effect = { REASON = wild_animal } } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_scary_entertainment_opinion + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + lifestyle_hunter = medium_stress_impact_gain + lazy = medium_stress_impact_gain + craven = major_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = brave + add = 75 + } + modifier = { + has_trait = compassionate + add = 25 + } + modifier = { + has_trait = lifestyle_hunter + add = 25 + } + modifier = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 50 } + add = 25 + } + modifier = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + add = 25 + } + modifier = { + has_trait = lazy + add = -75 + } + modifier = { + has_trait = craven + add = -100 + } + } + } + + #Option H: let the beasts kill your target + option = { + name = ep2_wedding.1070.h + trigger = { + has_character_flag = 1070_exotic_fiends_bad + exists = scope:1070_target + has_activity_intent = murder_attendee_intent + } + custom_tooltip = available_because_intent_tt + scope:1070_target = { + duel = { + skill = prowess + value = high_skill_rating + # Success: they survive + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1070.h.survive + root = { + send_interface_toast = { + title = ep2_wedding.1070.h.tt.survive + left_icon = scope:1070_target + stress_impact = { + ambitious = minor_stress_impact_gain + callous = minor_stress_impact_gain + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + sadistic = major_stress_impact_gain + } + } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_murder_survive_log + tags = { intent murder } + score = 50 + character = scope:1070_target + } + } + } + # Failure: the beasts kill them + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1070.h.kill + root = { + complete_activity_intent = yes + send_interface_toast = { + title = ep2_wedding.1070.h.tt.kill + left_icon = scope:1070_target + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_murder_kill_log + tags = { intent murder } + score = 50 + character = scope:1070_target + + # Effect + scope:1070_target = { + death = { death_reason = death_wild_animal } + } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_scary_entertainment_opinion + } + } + } + stress_impact = { + compassionate = major_stress_impact_gain + ambitious = minor_stress_impact_loss + callous = minor_stress_impact_loss + deceitful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + sadistic = major_stress_impact_loss + } + } + } + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + add = -75 + } + modifier = { + has_trait = lazy + add = 25 + } + modifier = { + has_trait = craven + add = 100 + } + modifier = { + has_trait = deceitful + add = 100 + } + } + } + + #Option C: call master of hunt + option = { + name = ep2_wedding.1070.c + trigger = { + has_character_flag = 1070_exotic_fiends_bad + exists = scope:m_hunt + this = scope:host + } + duel = { + skill = prowess + value = average_skill_rating + 50 = { + #Master of hunt knows what they are doing + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1070.c.success + send_interface_toast = { + title = ep2_wedding.1070.c.tt.success + left_icon = scope:m_hunt + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_calmed_success_log + tags = { good } + score = 20 + character = scope:m_hunt + + # Effect + scope:m_hunt = { + add_character_modifier = { + modifier = ep2_beastmaster_modifier + years = 20 + } + } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_good_entertainment_opinion + } + } + } + stress_impact = { + base = minor_stress_impact_loss + } + } + } + 50 = { + #Why are you paying this guy again?? + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1070.c.failure + send_interface_toast = { + title = ep2_wedding.1070.c.tt.failure + left_icon = scope:m_hunt + scope:host = { + remove_character_modifier = hunt_captive_beast_modifier + } + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_master_failure_log + tags = { bad } + score = 20 + character = scope:m_hunt + + # Effect + scope:m_hunt = { increase_wounds_effect = { REASON = wild_animal } } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_scary_entertainment_opinion + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + } + } + + #Option F: GUARDS!! + option = { + name = ep2_wedding.1070.f + trigger = { + has_character_flag = 1070_exotic_fiends_bad + this = scope:host + NOT = { exists = scope:m_hunt } + } + scope:host = { + remove_character_modifier = hunt_captive_beast_modifier + } + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_guards_log + tags = { bad } + score = 10 + character = scope:host + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_scary_entertainment_opinion + } + } + } + ai_chance = { + base = 100 + } + } + + #Option D: run and hide! + option = { + name = ep2_wedding.1070.d + flavor = ep2_wedding.1070.d.tt + trigger = { + has_character_flag = 1070_exotic_fiends_bad + this != scope:host + } + scope:activity = { + add_activity_log_entry = { + key = wedding_beasts_fled_log + tags = { bad } + score = 10 + character = scope:host + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != scope:host + } + add_opinion = { + target = scope:host + modifier = wedding_scary_entertainment_opinion + } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != root + } + add_opinion = { + target = root + modifier = coward_opinion + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = shy + add = 75 + } + modifier = { + has_trait = reclusive + add = 150 + } + } + } + + after = { + remove_character_flag = busy_in_banquet_event + if = { + limit = { + exists = scope:m_hunt + } + scope:m_hunt = { remove_character_flag = busy_in_banquet_event } + } + } +} + +################################################## +# A Match Made In... ? +# by Claudia Baldassi +# ep2_wedding.1090 +################################################## + +# Matchmaking Intent: push a couple together + +scripted_trigger ep2_wedding_1090_good_match_trigger = { + is_ai = yes + location = root.location + can_marry_character_trigger = { CHARACTER = root.intent_target } + NOR = { + exists = betrothed + AND = { + exists = root.intent_target.var:wedding_no_match + this = root.intent_target.var:wedding_no_match + } + has_character_flag = busy_in_banquet_event + is_close_or_extended_family_of = root.intent_target + } + trigger_if = { + limit = { + is_female = yes + } + age < marriage_female_fertility_cutoff_age_value + } +} + +ep2_wedding.1090 = { + type = activity_event + title = ep2_wedding.1090.t + desc = { + desc = ep2_wedding.1090.desc + first_valid = { + triggered_desc = { + trigger = { + intent_target = { has_variable = wedding_good_match } + } + desc = ep2_wedding.1090.desc_already_matched + } + desc = ep2_wedding.1090.desc_new_match + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = schadenfreude + } + center_portrait = { + character = scope:1090_target + animation = flirtation_left + } + right_portrait = { + character = scope:1090_match + animation = flirtation + } + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + has_activity_intent = matchmaking_intent + + intent_target.location = root.location + location = scope:activity.activity_location + + intent_target = { NOT = { has_character_flag = busy_in_banquet_event } } + + OR = { + intent_target = { has_variable = wedding_good_match } + scope:activity = { + any_attending_character = { + ep2_wedding_1090_good_match_trigger = yes + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + intent_target = { has_variable = wedding_good_match } + add = 4 + } + } + + immediate = { + add_character_flag = busy_in_banquet_event + intent_target = { + save_scope_as = 1090_target + add_character_flag = busy_in_banquet_event + } + if = { + limit = { + scope:1090_target = { has_variable = wedding_good_match } + } + scope:1090_target.var:wedding_good_match = { + save_scope_as = 1090_match + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + ep2_wedding_1090_good_match_trigger = yes + } + save_scope_as = 1090_match + } + } + } + scope:1090_match = { add_character_flag = busy_in_banquet_event } + } + + #Option A: push them together + option = { + name = ep2_wedding.1090.a + scope:1090_target = { + duel = { + skill = diplomacy + target = scope:1090_match + 50 = { # success - get a betrothal + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.1090.a.success + root = { + send_interface_toast = { + title = ep2_wedding.1080.a.success.tt + left_icon = scope:1090_target + right_icon = scope:1090_match + scope:activity = { + add_activity_log_entry = { + key = wedding_matchmade_success_log + tags = { betrothal } + score = 50 + character = scope:1090_target + target = scope:1090_match + + # Effect + scope:1090_target = { create_betrothal = scope:1090_match } + scope:1090_match = { + add_opinion = { + target = scope:1090_target + modifier = impressed_opinion + opinion = 20 + } + if = { + limit = { + scope:1090_match = { can_set_relation_lover_trigger = { CHARACTER = scope:1090_target } } + } + random = { + chance = 10 + scope:1090_match = { + set_relation_lover = { reason = lover_wedding_matchmaking target = scope:1090_target } + } + } + } + } + root = { add_prestige = minor_prestige_gain } + } + } + } + if = { + limit = { has_activity_intent = matchmaking_intent } + complete_activity_intent = yes + } + } + } + 50 = { # failure - you'll have to start again with someone else + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.1090.a.failure + send_interface_toast = { + title = ep2_wedding.1080.a.failure.tt + left_icon = scope:1090_target + right_icon = scope:1090_match + scope:activity = { + add_activity_log_entry = { + key = wedding_matchmade_failure_log + tags = { betrothal } + score = 50 + character = scope:1090_target + target = scope:1090_match + } + } + stress_impact = { + base = minor_stress_impact_gain + } + } + scope:1090_target = { + set_variable = { + name = wedding_no_match + value = scope:1090_match + } + } + } + } + } + ai_chance = { + base = 200 + } + } + + #Option B: no deal + option = { + name = ep2_wedding.1090.b + scope:1090_target = { + set_variable = { + name = wedding_no_match + value = scope:1090_match + } + } + scope:1090_target = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = fickle + add = 25 + } + } + } + + after = { + remove_character_flag = busy_in_banquet_event + scope:1090_match = { remove_character_flag = busy_in_banquet_event } + scope:1090_target = { remove_character_flag = busy_in_banquet_event } + } +} + +# WEDDING NIGHT EVENTS + +################################################## +# That Cursed Table +# by Claudia Baldassi +# ep2_wedding.1060 +################################################## + +# Inspired by Matilda of Tuscany's second wedding: a younger/meeker husband is too intimidated + +ep2_wedding.1060 = { + type = activity_event + title = ep2_wedding.1060.t + desc = ep2_wedding.1060.desc + theme = wedding_night_activity + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:spouse_2 + animation = shame + } + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity.special_guest:spouse_2 = { + is_ai = yes + is_male = yes + NOT = { has_character_flag = busy_in_wnight_event } + } + scope:activity.special_guest:spouse_1 = root + scope:activity.special_guest:spouse_1 = { + NOT = { has_relation_lover = scope:activity.special_guest:spouse_2 } + } + + OR = { + # is weaker + scope:activity.special_guest:spouse_1 = { + tier_difference = { + target = scope:activity.special_guest:spouse_2 + value >= 2 + } + } + # is younger + scope:activity.special_guest:spouse_2.age <= scope:activity.special_guest:spouse_1.age_minus_10 + # has "difficulties" + scope:activity.special_guest:spouse_2 = { + OR = { + fertility <= low_fertility + has_trait = infertile + NOT = { is_attracted_to_gender_of = scope:activity.special_guest:spouse_1 } + } + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + scope:activity.special_guest:spouse_1 = { + tier_difference = { + target = scope:activity.special_guest:spouse_2 + value > 2 + } + } + add = 2 + } + modifier = { + scope:activity.special_guest:spouse_2.age <= scope:activity.special_guest:spouse_1.age_minus_25 + add = 3 + } + modifier = { + scope:activity.special_guest:spouse_2 = { + NOT = { is_attracted_to_gender_of = scope:activity.special_guest:spouse_1 } + } + add = 3 + } + } + + immediate = { + scope:activity.special_guest:spouse_1 = { + save_scope_as = spouse_1 + add_character_flag = busy_in_wnight_event + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = spouse_2 + add_character_flag = busy_in_wnight_event + } + } + + #Option A: *Fine* - triggers follow up + option = { + name = ep2_wedding.1060.a + flavor = ep2_wedding.1060.a.tt + trigger_event = { + id = ep2_wedding.1061 + days = 3 + } + stress_impact = { + base = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = impatient + add = 75 + } + modifier = { + has_trait = lustful + add = 75 + } + modifier = { + has_trait = arrogant + add = 75 + } + } + } + + #Option B: be accepting + option = { + name = ep2_wedding.1060.b + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:spouse_2 + } + if = { + limit = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:spouse_2 } + } + random = { + chance = 5 + set_relation_soulmate = { reason = soulmate_wedding_accepting_partner target = scope:spouse_2 } + # Achievements + player_succeeded_at_a_thousand_and_one_nights_achievement_effect = yes + } + } + scope:spouse_1 = { remove_character_flag = busy_in_wnight_event } + scope:spouse_2 = { remove_character_flag = busy_in_wnight_event } + stress_impact = { + impatient = medium_stress_impact_gain + lustful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + compassionate = medium_stress_impact_loss + patient = medium_stress_impact_loss + humble = medium_stress_impact_loss + chaste = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + add = 75 + } + modifier = { + has_trait = patient + add = 75 + } + modifier = { + has_trait = chaste + add = 75 + } + } + } +} + +# Follow up event: you have emptied the room except for a bare table - spouse reaction + +ep2_wedding.1061 = { + type = activity_event + title = ep2_wedding.1060.t + desc = { + desc = ep2_wedding.1061.desc + first_valid = { + triggered_desc = { + trigger = { + scope:spouse_2 = { has_character_flag = 1061_success } + } + desc = ep2_wedding.1061.desc_1 #It goes well + } + desc = ep2_wedding.1061.desc_2 #Still nothing + } + } + theme = wedding_night_activity + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:spouse_2 + animation = shame + } + + trigger = { + exists = scope:activity + } + + immediate = { + random_list = { + 30 = { + # he gets over it + modifier = { + scope:spouse_2 = { + NOT = { has_trait = impotent } + } + add = 10 + } + modifier = { + scope:spouse_2 = { + NOT = { fertility <= low_fertility } + } + add = 10 + } + modifier = { + scope:spouse_2 = { + has_trait = arrogant + } + add = 10 + } + modifier = { + scope:spouse_2 = { + has_trait = lustful + } + add = 20 + } + modifier = { + scope:spouse_2 = { + has_trait = brave + } + add = 10 + } + modifier = { + scope:spouse_2 = { + has_trait = gregarious + } + add = 10 + } + modifier = { + scope:spouse_2 = { + NOT = { is_attracted_to_gender_of = scope:spouse_1 } + } + factor = 0 + } + scope:spouse_2 = { add_character_flag = 1061_success } + } + 70 = { + #he really doesn't get over it + modifier = { + scope:spouse_2 = { + has_trait = impotent + } + add = 30 + } + modifier = { + scope:spouse_2 = { + fertility <= low_fertility + } + add = 20 + } + modifier = { + scope:spouse_2 = { + has_trait = shy + } + add = 20 + } + modifier = { + scope:spouse_2 = { + has_trait = chaste + } + add = 20 + } + scope:spouse_2 = { add_character_flag = 1061_not_success } + } + } + add_character_flag = is_naked + } + + #Option A: All good then! + option = { + name = ep2_wedding.1061.a + trigger = { + scope:spouse_2 = { has_character_flag = 1061_success } + } + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_challenging_spouse_opinion + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_challenging_spouse_opinion + } + } + scope:spouse_2 = { + add_character_modifier = { + modifier = wedding_nagging_spouse_modifier + years = 10 + } + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:spouse_2 + } + stress_impact = { + base = minor_stress_impact_loss + lustful = medium_stress_impact_loss + } + } + + #Option B: kick them out and denounce them! + option = { + name = ep2_wedding.1061.b + trigger = { + scope:spouse_2 = { has_character_flag = 1061_not_success } + } + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_cruel_spouse_opinion + } + add_character_modifier = { + modifier = wedding_accused_impotency_modifier + years = 10 + } + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_very_bad_fertility = scope:spouse_1 + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_useless_spouse_opinion + } + } + stress_impact = { + calm = minor_stress_impact_gain + patient = medium_stress_impact_gain + chaste = medium_stress_impact_gain + compassionate = major_stress_impact_gain + vengeful = minor_stress_impact_loss + callous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 30 + } + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 30 + } + modifier = { + has_trait = lustful + add = 50 + } + modifier = { + has_trait = wrathful + add = 50 + } + modifier = { + has_trait = impatient + add = 50 + } + } + } + + #Option C: be patient + option = { + name = ep2_wedding.1061.c + trigger = { + scope:spouse_2 = { has_character_flag = 1061_not_success } + } + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:spouse_2 + } + stress_impact = { + arrogant = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + lustful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = calm + add = 30 + } + modifier = { + has_trait = patient + add = 50 + } + modifier = { + has_trait = compassionate + add = 75 + } + } + + } + + after = { + if = { + limit = { + scope:spouse_2 = { has_character_flag = 1061_success } + } + scope:spouse_2 = { remove_character_flag = 1061_success } + } + else_if = { + limit = { + scope:spouse_2 = { has_character_flag = 1061_not_success } + } + scope:spouse_2 = { remove_character_flag = 1061_not_success } + } + scope:spouse_1 = { remove_character_flag = busy_in_wnight_event } + scope:spouse_2 = { remove_character_flag = busy_in_wnight_event } + remove_character_flag = is_naked + } +} + +# Inverted event: it's you who have problems - spouse's reaction + +ep2_wedding.1065 = { + type = activity_event + title = ep2_wedding.1060.t + desc = ep2_wedding.1065.desc + theme = wedding_night_activity + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:spouse_2 + animation = disgust + } + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + scope:activity.special_guest:spouse_1 = { is_male = yes } + scope:activity.special_guest:spouse_1 = root + scope:activity.special_guest:spouse_1 = { + NOT = { has_relation_lover = scope:activity.special_guest:spouse_2 } + } + scope:activity.special_guest:spouse_2 = { + is_ai = yes + NOT = { has_character_flag = busy_in_wnight_event } + } + + OR = { + # is weaker + scope:activity.special_guest:spouse_2 = { + tier_difference = { + target = root + value >= 2 + } + } + # is younger + age <= scope:activity.special_guest:spouse_2.age_minus_10 + # has difficulties + fertility <= low_fertility + has_trait = infertile + NOT = { is_attracted_to_gender_of = scope:activity.special_guest:spouse_2 } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + scope:activity.special_guest:spouse_2 = { + tier_difference = { + target = root + value > 2 + } + } + add = 2 + } + modifier = { + age <= scope:activity.special_guest:spouse_2.age_minus_25 + add = 3 + } + modifier = { + NOT = { is_attracted_to_gender_of = scope:activity.special_guest:spouse_2 } + add = 3 + } + } + + immediate = { + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = spouse_2 } + scope:spouse_1 = { add_character_flag = busy_in_wnight_event } + scope:spouse_2 = { add_character_flag = busy_in_wnight_event } + } + + #Option A: It's a curse! + option = { + name = ep2_wedding.1065.a + flavor = ep2_wedding.1065.a.tt + trigger_event = { + id = ep2_wedding.1066 + days = 3 + } + stress_impact = { + honest = medium_stress_impact_gain + lustful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + deceitful = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = deceitful + add = 50 + } + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = lustful + add = 50 + } + modifier = { + has_character_modifier = bp1_superstition_modifier + add = 50 + } + } + } + + #Option B: Sorry... + option = { + name = ep2_wedding.1065.b + random_list = { + 50 = { #they are understanding + modifier = { + scope:spouse_2 = { + has_trait = compassionate + } + add = 20 + } + modifier = { + scope:spouse_2 = { + has_trait = calm + } + add = 10 + } + modifier = { + scope:spouse_2 = { + has_trait = patient + } + add = 20 + } + send_interface_toast = { + title = ep2_wedding.1065.b1 + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:spouse_2 + } + } + } + 50 = { #they are not + modifier = { + scope:spouse_2 = { + has_trait = callous + } + add = 20 + } + modifier = { + scope:spouse_2 = { + has_trait = lustful + } + add = 30 + } + modifier = { + scope:spouse_2 = { + has_trait = impatient + } + add = 20 + } + modifier = { + scope:spouse_2 = { + has_trait = wrathful + } + add = 10 + } + send_interface_toast = { + title = ep2_wedding.1065.b2 + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_useless_spouse_opinion + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_cruel_spouse_opinion + } + } + add_character_modifier = { + modifier = wedding_accused_impotency_modifier + years = 10 + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_very_bad_fertility = scope:spouse_2 + } + } + } + } + scope:spouse_1 = { remove_character_flag = busy_in_wnight_event } + scope:spouse_2 = { remove_character_flag = busy_in_wnight_event } + stress_impact = { + deceitful = medium_stress_impact_gain + honest = medium_stress_impact_loss + humble = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = 50 + } + modifier = { + has_trait = honest + add = 50 + } + } + } +} + +# Follow up event: your spouse has emptied the room except for a bare table + +ep2_wedding.1066 = { + type = activity_event + title = ep2_wedding.1060.t + desc = { + desc = ep2_wedding.1066.desc + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = 1066_success + } + desc = ep2_wedding.1066.desc_1 #It goes well + } + desc = ep2_wedding.1066.desc_2 #Still nothing + } + } + theme = wedding_night_activity + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:spouse_2 + animation = anger + } + + trigger = { + exists = scope:activity + } + + immediate = { + random_list = { + 30 = { + # you get over it + modifier = { + NOT = { has_trait = impotent } + add = 10 + } + modifier = { + NOT = { fertility <= low_fertility } + add = 10 + } + modifier = { + has_trait = arrogant + add = 10 + } + modifier = { + has_trait = lustful + add = 20 + } + modifier = { + has_trait = brave + add = 10 + } + modifier = { + has_trait = gregarious + add = 10 + } + modifier = { + NOT = { is_attracted_to_gender_of = scope:spouse_2 } + factor = 0 + } + add_character_flag = 1066_success + } + 70 = { + #you really don't get over it + modifier = { + has_trait = impotent + add = 30 + } + modifier = { + fertility <= low_fertility + add = 20 + } + modifier = { + has_trait = shy + add = 20 + } + modifier = { + has_trait = chaste + add = 20 + } + add_character_flag = 1066_not_success + } + } + scope:spouse_2 = { + add_character_flag = is_naked + } + } + + #Option A: I feel better + option = { + name = ep2_wedding.1066.a + trigger = { + has_character_flag = 1066_success + } + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_challenging_spouse_opinion + } + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:spouse_2 + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_challenging_spouse_opinion + } + } + add_character_modifier = { + modifier = wedding_nagging_spouse_modifier + years = 10 + } + stress_impact = { + base = minor_stress_impact_loss + lustful = medium_stress_impact_loss + } + } + + #Option B: ...Still nothing + option = { + name = ep2_wedding.1066.b + trigger = { + has_character_flag = 1066_not_success + } + random_list = { + 50 = { #hey don't take it well + modifier = { + scope:spouse_2 = { has_trait = arrogant } + add = 10 + } + modifier = { + scope:spouse_2 = { has_trait = callous } + add = 20 + } + modifier = { + scope:spouse_2 = { has_trait = sadistic } + add = 25 + } + modifier = { + scope:spouse_2 = { has_trait = lustful } + add = 25 + } + modifier = { + scope:spouse_2 = { has_trait = wrathful } + add = 25 + } + modifier = { + scope:spouse_2 = { has_trait = impatient } + add = 25 + } + send_interface_toast = { + title = ep2_wedding.1066.b_1 + left_icon = scope:spouse_2 + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_useless_spouse_opinion + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_cruel_spouse_opinion + } + } + add_character_modifier = { + modifier = wedding_accused_impotency_modifier + years = 10 + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_very_bad_fertility = scope:spouse_2 + } + stress_impact = { + base = minor_stress_impact_gain + } + } + } + 50 = { #they take it well + modifier = { + scope:spouse_2 = { has_trait = calm } + add = 10 + } + modifier = { + scope:spouse_2 = { has_trait = patient } + add = 25 + } + modifier = { + scope:spouse_2 = { has_trait = compassionate } + add = 40 + } + send_interface_toast = { + title = ep2_wedding.1066.b_2 + left_icon = scope:spouse_2 + scope:spouse_2 = { + add_opinion = { + target = root + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:spouse_2 + modifier = wedding_understanding_spouse_opinion + } + } + if = { + limit = { + scope:spouse_2 = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:spouse_2 + } + stress_impact = { + base = minor_stress_impact_loss + } + } + } + } + } + after = { + if = { + limit = { + has_character_flag = 1066_success + } + remove_character_flag = 1066_success + } + else_if = { + limit = { + has_character_flag = 1066_not_success + } + remove_character_flag = 1066_not_success + } + scope:spouse_1 = { remove_character_flag = busy_in_wnight_event } + scope:spouse_2 = { + remove_character_flag = busy_in_wnight_event + remove_character_flag = is_naked + } + } +} + +################################################## +# One More Goblet +# by Claudia Baldassi +# ep2_wedding.1110 +################################################## + +# Non-spouses: someone gets extremely drunk/doesn't want to leave + +scripted_trigger ep2_wedding_1110_valid_drunk_trigger = { + is_adult = yes + is_ai = yes + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + this = scope:host + has_character_flag = busy_in_wnight_event + } + drinks_alcohol_trigger = yes +} + +ep2_wedding.1110 = { + type = activity_event + title = ep2_wedding.1110.t + desc = { + desc = ep2_wedding.1110.desc_intro + desc = ep2_wedding.1110.desc + triggered_desc = { + trigger = { + root = scope:host + } + desc = ep2_wedding.1110.desc_host + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:1110_drunk + animation = wedding_drunk + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + NOR = { + scope:activity.special_guest:spouse_1 ?= root + scope:activity.special_guest:spouse_2 ?= root + } + scope:host ?= { #There must be alcohol at the party! + drinks_alcohol_trigger = yes + } + scope:activity ?= { + any_attending_character = { + ep2_wedding_1110_valid_drunk_trigger = yes + } + NOT = { has_variable = has_had_1110_event } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:activity = { + any_attending_character = { + ep2_wedding_1110_valid_drunk_trigger = yes + has_trait = drunkard + } + } + add = 10 + } + modifier = { + scope:activity = { + any_attending_character = { + ep2_wedding_1110_valid_drunk_trigger = yes + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = banquet_mischief_intent + } + } + } + add = 3 + } + modifier = { + scope:activity = { + any_attending_character = { + ep2_wedding_1110_valid_drunk_trigger = yes + has_trait = gregarious + } + } + add = 2 + } + modifier = { + is_ai = yes + factor = 0.1 + } + } + + immediate = { + scope:activity = { + random_attending_character = { + limit = { + ep2_wedding_1110_valid_drunk_trigger = yes + has_trait = drunkard + } + alternative_limit = { + ep2_wedding_1110_valid_drunk_trigger = yes + has_trait = gregarious + } + alternative_limit = { + ep2_wedding_1110_valid_drunk_trigger = yes + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = banquet_mischief_intent + } + } + alternative_limit = { + ep2_wedding_1110_valid_drunk_trigger = yes + } + save_scope_as = 1110_drunk + add_character_flag = busy_in_wnight_event + } + set_variable = has_had_1110_event + } + add_character_flag = busy_in_wnight_event + } + + #Option B: Kick them out (host only) + option = { + name = ep2_wedding.1110.b + trigger = { root = scope:host } + flavor = ep2_wedding.1110.b.tt + scope:activity = { + add_activity_log_entry = { + key = wedding_goblet_eject_log + tags = { bad } + score = 25 + character = root + target = scope:1110_drunk + + # Effect + root = { + progress_towards_rival_effect = { + REASON = rival_kicked_out + CHARACTER = scope:1110_drunk + OPINION = -30 + } + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = wedding_severe_host_modifier + years = 20 + } + scope:1110_drunk = { remove_from_activity = scope:activity } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + patient = medium_stress_impact_gain + drunkard = major_stress_impact_gain + just = minor_stress_impact_loss + impatient = minor_stress_impact_loss + callous = minor_stress_impact_loss + temperate = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + } + modifier = { + has_trait = compassionate + add = -25 + } + modifier = { + has_trait = patient + add = -50 + } + modifier = { + has_trait = gregarious + add = -50 + } + modifier = { + has_trait = temperate + add = 100 + } + } + } + + #Option C: If you can't fight them, join them! + option = { + name = ep2_wedding.1110.c + trigger = { drinks_alcohol_trigger = yes } + scope:activity = { + add_activity_log_entry = { + key = wedding_goblet_fool_log + tags = { bad } + score = 25 + character = root + target = scope:1110_drunk + + # Effect + root = { + progress_towards_friend_effect = { + REASON = friend_drinking_buddies + CHARACTER = scope:1110_drunk + OPINION = 10 + } + if = { + limit = { + NOT = { + has_trait = drunkard + } + } + random = { + chance = 5 + add_trait = drunkard + } + } + add_character_modifier = { + modifier = wedding_social_drinker_modifier + years = 20 + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + drunkard = major_stress_impact_loss + temperate = major_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + has_trait = drunkard + add = 200 + } + modifier = { + has_trait = gregarious + add = 75 + } + modifier = { + has_trait = temperate + add = -75 + } + } + } + + #Option A: Judge them hard + option = { + name = ep2_wedding.1110.a + scope:activity = { + add_activity_log_entry = { + key = wedding_goblet_refusal_log + tags = { bad } + score = 25 + character = scope:1110_drunk + + # Effect + root = { + reverse_add_opinion = { + target = scope:1110_drunk + modifier = annoyed_opinion + opinion = -15 + } + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = temperate + add = 50 + } + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + + after = { + remove_character_flag = busy_in_wnight_event + scope:1110_drunk = { remove_character_flag = busy_in_wnight_event } + } +} + +################################################## +# One More Goblet +# by Claudia Baldassi +# ep2_wedding.1111 +################################################## + +# Non-spouses: you get extremely drunk/don't want to leave + +scripted_trigger ep2_wedding_1111_valid_drunk_trigger = { + is_adult = yes + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + has_character_flag = busy_in_wnight_event + } + drinks_alcohol_trigger = yes +} + +ep2_wedding.1111 = { + type = activity_event + title = ep2_wedding.1110.t + desc = { + desc = ep2_wedding.1110.desc_intro + desc = ep2_wedding.1111.desc + triggered_desc = { + trigger = { + root = scope:host + } + desc = ep2_wedding.1111.desc_host + } + desc = ep2_wedding.1111.desc_conclusion + } + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = wedding_drunk + } + right_portrait = { + character = scope:1111_other + animation = disgust + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + + ep2_wedding_1111_valid_drunk_trigger = yes + + scope:host = { #There must be alcohol at the party! + drinks_alcohol_trigger = yes + } + scope:activity = { + NOT = { has_variable = has_had_1110_event } + } + NOR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + trigger_if = { + limit = { + OR = { + this = scope:host + scope:host = scope:activity.special_guest:spouse_1 + scope:host = scope:activity.special_guest:spouse_2 + } + } + scope:activity = { + any_attending_character = { + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + is_adult = yes + is_ai = yes + NOT = { has_character_flag = busy_in_wnight_event } + } + } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + has_trait = drunkard + add = 10 + } + modifier = { + has_trait = gregarious + add = 2 + } + modifier = { + is_ai = yes + factor = 0.1 + } + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = banquet_mischief_intent + } + add = 5 + } + } + + immediate = { + add_character_flag = busy_in_wnight_event + scope:activity = { + set_variable = has_had_1110_event + } + if = { + limit = { + NOR = { + this = scope:host + scope:host = { + OR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + } + } + scope:host = { + add_character_flag = busy_in_wnight_event + save_scope_as = 1111_other + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + is_adult = yes + is_ai = yes + NOT = { has_character_flag = busy_in_wnight_event } + } + save_scope_as = 1111_other + add_character_flag = busy_in_wnight_event + } + } + } + } + + #Option B: not sorry + option = { + name = ep2_wedding.1111.b + add_character_modifier = { + modifier = wedding_social_drinker_modifier + years = 20 + } + random_list = { + 30 = { #join me! + trigger = { + scope:1111_other = { drinks_alcohol_trigger = yes } + } + modifier = { + scope:1111_other = { has_trait = drunkard } + add = 200 + } + modifier = { + scope:1111_other = { has_trait = gregarious } + add = 70 + } + modifier = { + scope:1111_other = { has_trait = wrathful } + add = -50 + } + desc = ep2_wedding.1111.b.1 + send_interface_toast = { + title = ep2_wedding.1111.b.1.tt + left_icon = scope:1111_other + scope:activity = { + add_activity_log_entry = { + key = wedding_goblet_fool_log + tags = { bad } + score = 25 + character = root + target = scope:1111_other + + # Effect + root = { + progress_towards_friend_effect = { + REASON = friend_drinking_buddies + CHARACTER = scope:1111_other + OPINION = 10 + } + } + } + } + } + } + 70 = { #you get kicked out! + trigger = { + scope:1111_other = scope:host + } + modifier = { + scope:1111_other = { has_trait = patient } + add = -30 + } + modifier = { + scope:1111_other = { has_trait = compassionate } + add = -25 + } + modifier = { + scope:1111_other = { has_trait = forgiving } + add = -30 + } + modifier = { + scope:1111_other = { has_trait = wrathful } + add = 50 + } + desc = ep2_wedding.1111.b.2 + send_interface_toast = { + title = ep2_wedding.1111.b.2.tt + left_icon = scope:1111_other + scope:activity = { + add_activity_log_entry = { + key = wedding_goblet_eject_log + tags = { bad } + score = 10 + + character = scope:1111_other + target = root + + #Effect + root = { remove_from_activity = scope:activity } + scope:1111_other ={ + progress_towards_rival_effect = { + REASON = rival_kicked_out + CHARACTER = root + OPINION = -30 + } + } + } + } + } + } + 50 = { #you get judged - harshly + trigger = { + scope:1111_other != scope:host + } + desc = ep2_wedding.1111.b.3 + send_interface_toast = { + title = ep2_wedding.1111.b.3.tt + left_icon = scope:1111_other + reverse_add_opinion = { + target = scope:1111_other + modifier = annoyed_opinion + opinion = -20 + } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_goblet_reprimand_log + tags = { bad } + score = 10 + + character = root + } + } + } + } + if = { + limit = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = banquet_mischief_intent + } + } + stress_impact = { + base = minor_stress_impact_loss + } + } + else = { + stress_impact = { + humble = medium_stress_impact_gain + temperate = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 75 + } + modifier = { + has_trait = drunkard + add = 75 + } + modifier = { + has_trait = humble + add = -50 + } + modifier = { + has_trait = temperate + add = -75 + } + modifier = { + OR = { + has_activity_intent = reduce_stress_intent + has_activity_intent = banquet_mischief_intent + } + opinion = { + target = scope:host + value < neutral_opinion + } + add = 100 + } + } + } + + #Option A: sorry + option = { + name = ep2_wedding.1111.a + scope:activity = { + add_activity_log_entry = { + key = wedding_goblet_reprimand_log + tags = { bad } + score = 25 + character = root + + # Effect + root = { + reverse_add_opinion = { + target = scope:1111_other + modifier = respect_opinion + opinion = 15 + } + stress_impact = { + arrogant = medium_stress_impact_gain + drunkard = medium_stress_impact_gain + } + } + } + } + ai_chance = { + base = 200 + modifier = { + opinion = { + target = scope:host + value > low_positive_opinion + } + add = 100 + } + modifier = { + has_trait = arrogant + add = -75 + } + modifier = { + has_trait = drunkard + add = -75 + } + } + } + + after = { + remove_character_flag = busy_in_wnight_event + scope:1111_other = { remove_character_flag = busy_in_wnight_event } + } +} + + +################################################## +# Why Would You Marry Someone Like Me? +# by Luke Bean +# ep2_wedding.1300 +################################################## + +scripted_trigger ep2_wedding_1300_appearance_insecurity_trigger = { + OR = { + AND = { + is_female = yes + has_trait = giant + } + has_trait = one_eyed + has_trait = scarred + has_trait = one_legged + has_trait = disfigured + has_trait = scaly + has_trait = albino + has_trait = dwarf + has_trait = hunchbacked + has_trait = maimed + has_trait = spindly + has_trait = beauty_bad_1 + has_trait = beauty_bad_2 + has_trait = beauty_bad_3 + } +} + +scripted_trigger ep2_wedding_1300_voice_insecurity_trigger = { + OR = { + has_trait = lisping + has_trait = stuttering + has_trait = wheezing + } +} + +ep2_wedding.1300 = { + type = activity_event + title = ep2_wedding.1300.t + desc = { + desc = ep2_wedding.1300.desc_intro + first_valid = { + triggered_desc = { + trigger = { scope:insecurity = flag:appearance } + desc = ep2_wedding.1300.desc_appearance + } + triggered_desc = { + trigger = { scope:insecurity = flag:dark_past } + desc = ep2_wedding.1300.desc_dark_past + } + triggered_desc = { + trigger = { scope:insecurity = flag:voice } + desc = ep2_wedding.1300.desc_voice + } + triggered_desc = { + trigger = { scope:insecurity = flag:lowborn } + desc = ep2_wedding.1300.desc_lowborn + } + } + desc = ep2_wedding.1300.desc_outro + } + theme = wedding_night_activity + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:spouse_2 + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + has_ep2_dlc_trigger = yes + root = scope:activity.special_guest:spouse_1 + scope:activity.special_guest:spouse_2 = { + is_alive = yes + NOR = { + has_trait = arrogant + any_relation = { type = lover this = root } + any_relation = { type = best_friend this = root } + } + OR = { + ep2_wedding_1300_appearance_insecurity_trigger = yes + has_any_shunned_or_criminal_trait_in_faith_trigger = { + CHARACTER = scope:activity.special_guest:spouse_2 + FAITH = scope:activity.special_guest:spouse_2.faith + } + ep2_wedding_1300_voice_insecurity_trigger = yes + is_lowborn = yes + } + } + } + + weight_multiplier = { + base = 2 + modifier = { + has_activity_intent = woo_attendee_intent + intent_target = scope:activity.special_guest:spouse_2 + add = 3 + } + } + + immediate = { + root = { save_scope_as = spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = spouse_2 } + add_character_flag = busy_in_wnight_event + scope:spouse_2 = { + add_character_flag = busy_in_wnight_event + add_character_flag = is_naked + } + if = { + limit = { + scope:spouse_2 = { + ep2_wedding_1300_appearance_insecurity_trigger = yes + } + } + save_scope_value_as = { + name = insecurity + value = flag:appearance + } + } + else_if = { + limit = { + has_any_shunned_or_criminal_trait_in_faith_trigger = { + CHARACTER = scope:spouse_2 + FAITH = scope:spouse_2.faith + } + } + save_scope_value_as = { + name = insecurity + value = flag:dark_past + } + } + else_if = { + limit = { + scope:spouse_2 = { + ep2_wedding_1300_voice_insecurity_trigger = yes + } + } + save_scope_value_as = { + name = insecurity + value = flag:voice + } + } + else_if = { + limit = { + scope:spouse_2 = { + is_lowborn = yes + } + } + save_scope_value_as = { + name = insecurity + value = flag:lowborn + } + } + if = { + limit = { + scope:spouse_2 = { + OR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + has_trait = ambitious + has_trait = shrewd + intrigue >= high_skill_rating + diplomacy >= high_skill_rating + stewardship >= high_skill_rating + martial >= high_skill_rating + learning >= high_skill_rating + } + } + } + save_scope_value_as = { + name = mind_of_a_ruler + value = yes + } + } + add_character_flag = is_naked + } + + # I chose you for your virtue + option = { + name = ep2_wedding.1300.virtue + custom_tooltip = ep2_wedding.1300.virtue.tt #This option is available because SPOUSE is a virtuous PERSON + custom_tooltip = ep2_wedding.1300.followup.tt + trigger = { + scope:spouse_2 = { num_virtuous_traits >= 1 } + NOR = { + scope:spouse_2 = { num_sinful_traits >= 1 } + has_any_shunned_or_criminal_trait_in_faith_trigger = { + CHARACTER = scope:spouse_2 + FAITH = scope:spouse_2.faith + } + } + } + + show_as_tooltip = { + random_list = { + 10 = { + desc = ep2_wedding.1300.followup.a + show_chance = no + scope:spouse_1 = { + progress_towards_lover_effect = { + CHARACTER = scope:spouse_2 + REASON = lover_shared_insecurity + OPINION = default_lover_opinion + } + } + } + 10 = { + desc = ep2_wedding.1300.followup.b + show_chance = no + } + 10 = { + desc = ep2_wedding.1300.followup.c + show_chance = no + scope:spouse_1 = { + progress_towards_rival_effect = { + REASON = rival_shared_insecurity + CHARACTER = scope:spouse_2 + OPINION = -20 + } + } + } + } + } + stress_impact = { + sadistic = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + cynical = minor_stress_impact_gain + just = minor_stress_impact_loss + chaste = minor_stress_impact_loss + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_zeal = 0.5 + } + modifier = { + has_trait = impatient + add = -30 + } + modifier = { + has_trait = wrathful + add = -30 + } + modifier = { + has_trait = sadistic + add = -30 + } + modifier = { + has_trait = cynical + add = -80 + } + } + save_scope_value_as = { + name = reassurance + value = flag:virtue + } + scope:spouse_2 = { + trigger_event = { + id = ep2_wedding.1301 + } + } + } + + # I need someone like you to rule by my side + option = { + name = ep2_wedding.1300.rule_together + custom_tooltip = ep2_wedding.1300.rule_together.tt #This option is available because SPOUSE has the mind of a ruler + custom_tooltip = ep2_wedding.1300.followup.tt + + trigger = { + exists = scope:mind_of_a_ruler + } + show_as_tooltip = { + random_list = { + 10 = { + desc = ep2_wedding.1300.followup.a + show_chance = no + scope:spouse_1 = { + progress_towards_lover_effect = { + CHARACTER = scope:spouse_2 + REASON = lover_shared_insecurity + OPINION = default_lover_opinion + } + } + } + 10 = { + desc = ep2_wedding.1300.followup.b + show_chance = no + } + 10 = { + desc = ep2_wedding.1300.followup.c + show_chance = no + scope:spouse_1 = { + progress_towards_rival_effect = { + REASON = rival_shared_insecurity + CHARACTER = scope:spouse_2 + OPINION = -20 + } + } + } + } + } + stress_impact = { + lazy = minor_stress_impact_gain + content = minor_stress_impact_gain + fickle = medium_stress_impact_gain + just = medium_stress_impact_loss + diligent = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + } + modifier = { + has_trait = content + add = -30 + } + modifier = { + has_trait = lazy + add = -80 + } + modifier = { + has_trait = arrogant + add = -80 + } + } + save_scope_value_as = { + name = reassurance + value = flag:rule_together + } + scope:spouse_2 = { + trigger_event = { + id = ep2_wedding.1301 + } + } + } + +# This marriage is practical for both of us + option = { + name = ep2_wedding.1300.practical + custom_tooltip = ep2_wedding.1300.followup.tt + trigger = { + NOR = { #This is purely so that you don't get a seven-option event if you marry a beautiful fertile genius with a lisp + has_trait = beauty_good_1 + has_trait = beauty_good_2 + has_trait = beauty_good_3 + } + } + show_as_tooltip = { + random_list = { + 10 = { + desc = ep2_wedding.1300.followup.a + show_chance = no + scope:spouse_1 = { + progress_towards_lover_effect = { + CHARACTER = scope:spouse_2 + REASON = lover_shared_insecurity + OPINION = default_lover_opinion + } + } + } + 10 = { + desc = ep2_wedding.1300.followup.b + show_chance = no + } + 10 = { + desc = ep2_wedding.1300.followup.c + show_chance = no + scope:spouse_1 = { + progress_towards_rival_effect = { + REASON = rival_shared_insecurity + CHARACTER = scope:spouse_2 + OPINION = -20 + } + } + } + } + } + stress_impact = { + arbitrary = minor_stress_impact_gain + zealous = minor_stress_impact_gain + diligent = minor_stress_impact_loss + callous = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + has_trait = arbitrary + add = -30 + } + modifier = { + has_trait = zealous + add = -30 + } + } + save_scope_value_as = { + name = reassurance + value = flag:practical + } + scope:spouse_2 = { + trigger_event = { + id = ep2_wedding.1301 + } + } + } + + # Stop whining, I'm making you a TITLE + option = { + name = ep2_wedding.1300.stop_whining + custom_tooltip = ep2_wedding.1300.followup.tt + + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = wrathful + has_trait = impatient + has_trait = arrogant + } + } + show_as_tooltip = { + random_list = { + 10 = { + desc = ep2_wedding.1300.followup.b + show_chance = no + } + 10 = { + desc = ep2_wedding.1300.followup.c + show_chance = no + scope:spouse_1 = { + progress_towards_rival_effect = { + REASON = rival_shared_insecurity + CHARACTER = scope:spouse_2 + OPINION = -20 + } + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + impatient = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + modifier = { + has_trait = compassionate + add = -80 + } + modifier = { + has_trait = calm + add = -50 + } + } + save_scope_value_as = { + name = reassurance + value = flag:stop_whining + } + scope:spouse_2 = { + trigger_event = { + id = ep2_wedding.1301 + } + } + } + + # I understand how you feel + option = { + name = ep2_wedding.1300.understanding + custom_tooltip = ep2_wedding.1300.followup.tt + + trigger = { + OR = { + has_trait = reclusive + has_trait = shy + has_trait = depressed_1 + has_trait = depressed_genetic + ep2_wedding_1300_appearance_insecurity_trigger = yes + ep2_wedding_1300_voice_insecurity_trigger = yes + } + } + show_as_tooltip = { + random_list = { + 10 = { + desc = ep2_wedding.1300.followup.a + show_chance = no + scope:spouse_1 = { + progress_towards_lover_effect = { + CHARACTER = scope:spouse_2 + REASON = lover_shared_insecurity + OPINION = default_lover_opinion + } + } + } + 10 = { + desc = ep2_wedding.1300.followup.b + show_chance = no + } + 10 = { + desc = ep2_wedding.1300.followup.c + show_chance = no + scope:spouse_1 = { + progress_towards_rival_effect = { + REASON = rival_shared_insecurity + CHARACTER = scope:spouse_2 + OPINION = -20 + } + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_loss + calm = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + modifier = { + has_trait = compassionate + add = -80 + } + modifier = { + has_trait = calm + add = -50 + } + } + save_scope_value_as = { + name = reassurance + value = flag:understanding + } + scope:spouse_2 = { + trigger_event = { + id = ep2_wedding.1301 + } + } + } + + # You're the most beautiful PERSON in the world + option = { + name = ep2_wedding.1300.beauty + custom_tooltip = ep2_wedding.1300.beauty.tt #This option is available because SPOUSE is renowned for THEIR looks + custom_tooltip = ep2_wedding.1300.followup.tt + + trigger = { + scope:spouse_2 = { + OR = { + has_trait = beauty_good_1 + has_trait = beauty_good_2 + has_trait = beauty_good_3 + } + } + } + show_as_tooltip = { + random_list = { + 10 = { + desc = ep2_wedding.1300.followup.a + show_chance = no + scope:spouse_1 = { + progress_towards_lover_effect = { + CHARACTER = scope:spouse_2 + REASON = lover_shared_insecurity + OPINION = default_lover_opinion + } + } + } + 10 = { + desc = ep2_wedding.1300.followup.b + show_chance = no + } + 10 = { + desc = ep2_wedding.1300.followup.c + show_chance = no + scope:spouse_1 = { + progress_towards_rival_effect = { + REASON = rival_shared_insecurity + CHARACTER = scope:spouse_2 + OPINION = -20 + } + } + } + } + } + stress_impact = { + chaste = minor_stress_impact_gain + lustful = minor_stress_impact_loss + honest = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + } + modifier = { + has_trait = chaste + add = -50 + } + } + save_scope_value_as = { + name = reassurance + value = flag:beauty + } + scope:spouse_2 = { + trigger_event = { + id = ep2_wedding.1301 + } + } + } + + # You will give me many strong heirs + option = { + name = ep2_wedding.1300.fertility + custom_tooltip = ep2_wedding.1300.fertility.tt #This option is available because SPOUSE has the right qualities to be a prolific PARENT + custom_tooltip = ep2_wedding.1300.followup.tt + + trigger = { + scope:spouse_2 = { + OR = { + has_trait = physique_good_1 + has_trait = physique_good_2 + has_trait = physique_good_3 + has_trait = fecund + has_trait = lustful + } + } + } + show_as_tooltip = { + random_list = { + 10 = { + desc = ep2_wedding.1300.followup.b + show_chance = no + } + 10 = { + desc = ep2_wedding.1300.followup.c + show_chance = no + scope:spouse_1 = { + progress_towards_rival_effect = { + REASON = rival_shared_insecurity + CHARACTER = scope:spouse_2 + OPINION = -20 + } + } + } + } + } + stress_impact = { + chaste = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + lustful = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_rationality = 0.5 + } + modifier = { + has_trait = chaste + add = -50 + } + modifier = { + has_trait = compassionate + add = -50 + } + } + save_scope_value_as = { + name = reassurance + value = flag:fertility + } + scope:spouse_2 = { + trigger_event = { + id = ep2_wedding.1301 + } + } + } + after = { + remove_character_flag = is_naked + scope:spouse_2 = { + remove_character_flag = is_naked + } + } +} + +ep2_wedding.1301 = { #Spouse response + type = activity_event + title = ep2_wedding.1301.t + desc = { + desc = ep2_wedding.1301.desc_intro + first_valid = { + triggered_desc = { + trigger = { scope:insecurity = flag:appearance } + desc = ep2_wedding.1301.desc_appearance + } + triggered_desc = { + trigger = { scope:insecurity = flag:dark_past } + desc = ep2_wedding.1301.desc_dark_past + } + triggered_desc = { + trigger = { scope:insecurity = flag:voice } + desc = ep2_wedding.1301.desc_voice + } + triggered_desc = { + trigger = { scope:insecurity = flag:lowborn } + desc = ep2_wedding.1301.desc_lowborn + } + } + desc = ep2_wedding.1301.desc_midtro + first_valid = { + triggered_desc = { + trigger = { scope:reassurance = flag:virtue } + desc = ep2_wedding.1301.desc_virtue + } + triggered_desc = { + trigger = { scope:reassurance = flag:rule_together } + desc = ep2_wedding.1301.desc_rule_together + } + triggered_desc = { + trigger = { scope:reassurance = flag:practical } + desc = ep2_wedding.1301.desc_practical + } + triggered_desc = { + trigger = { scope:reassurance = flag:stop_whining } + desc = ep2_wedding.1301.desc_stop_whining + } + triggered_desc = { + trigger = { scope:reassurance = flag:understanding } + desc = ep2_wedding.1301.desc_understanding + } + triggered_desc = { + trigger = { scope:reassurance = flag:beauty } + desc = ep2_wedding.1301.desc_beauty + } + triggered_desc = { + trigger = { scope:reassurance = flag:fertility } + desc = ep2_wedding.1301.desc_fertility + } + } + desc = ep2_wedding.1301.desc_outro + } + theme = wedding_night_activity + left_portrait = { + character = scope:spouse_1 + animation = thinking + } + right_portrait = { + character = root + animation = worry + } + + immediate = { + add_character_flag = is_naked + scope:spouse_1 = { + add_character_flag = is_naked + } + } + + option = { #I want to be worthy of your love... + name = ep2_wedding.1301.love + trigger = { + is_attracted_to_gender_of = scope:spouse_1 + NOR = { + scope:reassurance = flag:fertility + scope:reassurance = flag:stop_whining + scope:reassurance = flag:practical + } + } + scope:spouse_1 = { + send_interface_toast = { + title = ep2_wedding.1301.outcome.love + left_icon = scope:spouse_2 + scope:activity = { + add_activity_log_entry = { + key = wedding_whyme_love_log + tags = { good } + score = 25 + character = scope:spouse_1 + target = scope:spouse_2 + + # Effect + scope:spouse_1 = { + if = { + limit = { + has_activity_intent = woo_attendee_intent + intent_target = scope:spouse_2 + can_set_relation_lover_trigger = { CHARACTER = scope:spouse_2 } + } + set_relation_lover = { + reason = lover_shared_insecurity + target = scope:spouse_2 + } + complete_activity_intent = yes + } + else = { + progress_towards_lover_effect = { + CHARACTER = scope:spouse_2 + REASON = lover_shared_insecurity + OPINION = default_lover_opinion + } + } + } + scope:spouse_2 = { + add_character_modifier = { + modifier = wedding_soothed_insecurity_modifier + years = 15 + } + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.25 + } + modifier = { + scope:reassurance = flag:understanding + add = 30 + } + modifier = { + scope:reassurance = flag:beauty + add = 15 + } + modifier = { + scope:spouse_1 = { has_trait = compassionate } + add = 20 + } + modifier = { + scope:spouse_1 = { attraction >= low_positive_attraction } + add = 20 + } + modifier = { + scope:spouse_1 = { attraction >= medium_positive_attraction } + add = 30 + } + modifier = { + scope:spouse_1 = { attraction >= high_positive_attraction } + add = 50 + } + modifier = { + scope:spouse_1 = { attraction <= low_negative_attraction } + add = -20 + } + modifier = { + scope:spouse_1 = { attraction <= medium_negative_attraction } + add = -30 + } + modifier = { + scope:spouse_1 = { attraction <= high_negative_attraction } + add = -50 + } + } + } + + option = { #I want to trust you... + name = ep2_wedding.1301.trust + trigger = { + NOR = { + scope:reassurance = flag:fertility + scope:reassurance = flag:stop_whining + } + } + scope:spouse_1 = { + send_interface_toast = { + title = ep2_wedding.1301.outcome.trust + left_icon = scope:spouse_2 + scope:activity = { + add_activity_log_entry = { + key = wedding_whyme_trust_log + tags = { good } + score = 25 + character = scope:spouse_1 + target = scope:spouse_2 + + # Effect + scope:spouse_1 = { + if = { + limit = { + has_activity_intent = woo_attendee_intent + intent_target = scope:spouse_2 + can_set_relation_lover_trigger = { CHARACTER = scope:spouse_2 } + } + set_relation_lover = { + reason = lover_shared_insecurity + target = scope:spouse_2 + } + complete_activity_intent = yes + } + else = { + progress_towards_lover_effect = { + CHARACTER = scope:spouse_2 + REASON = lover_shared_insecurity + OPINION = default_lover_opinion + } + } + } + scope:spouse_2 = { + add_character_modifier = { + modifier = wedding_soothed_insecurity_modifier + years = 15 + } + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + } + modifier = { + scope:reassurance = flag:rule_together + add = 30 + } + modifier = { + scope:reassurance = flag:virtue + add = 30 + } + modifier = { + scope:spouse_1 = { has_trait = honest } + add = 30 + } + modifier = { + scope:spouse_1 = { num_virtuous_traits >= 1 } + add = 20 + } + } + } + + option = { #I'm being silly + name = ep2_wedding.1301.silly + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + scope:reassurance = flag:practical + add = 30 + } + modifier = { + scope:reassurance = flag:fertility + add = 30 + } + modifier = { + scope:reassurance = flag:rule_together + add = 10 + } + } + scope:spouse_1 = { + send_interface_toast = { + title = ep2_wedding.1301.outcome.silly + left_icon = scope:spouse_2 + scope:activity = { + add_activity_log_entry = { + key = wedding_whyme_silly_log + tags = { bad } + score = 25 + character = scope:spouse_1 + target = scope:spouse_2 + + # Effect + scope:spouse_2 = { + add_character_modifier = { + modifier = wedding_practical_marriage_modifier + years = 15 + } + } + } + } + } + } + } + + option = { #Misunderstood + name = ep2_wedding.1301.misunderstood + + ai_chance = { + base = 120 + ai_value_modifier = { + ai_energy = -0.25 + } + modifier = { + scope:reassurance = flag:practical + add = 5 + } + modifier = { + scope:reassurance = flag:fertility + add = 10 + } + modifier = { + scope:reassurance = flag:stop_whining + add = 20 + } + } + scope:spouse_1 = { + send_interface_toast = { + title = ep2_wedding.1301.outcome.misunderstood + left_icon = scope:spouse_2 + scope:activity = { + add_activity_log_entry = { + key = wedding_whyme_misunderstood_log + tags = { bad } + score = 25 + character = scope:spouse_1 + target = scope:spouse_2 + + # Effect + scope:spouse_1 = { + progress_towards_rival_effect = { + REASON = rival_shared_insecurity + CHARACTER = scope:spouse_2 + OPINION = -20 + } + } + scope:spouse_2 = { + add_character_modifier = { + modifier = wedding_insecure_marriage_modifier + years = 15 + } + } + } + } + } + } + } + + after = { + remove_character_flag = busy_in_wnight_event + remove_character_flag = is_naked + scope:spouse_1 = { + remove_character_flag = busy_in_wnight_event + remove_character_flag = is_naked + } + } +} + + + +################################################## +# A Friend Is Monopolizing Your Attention +# by Luke Bean +# ep2_wedding.1310 +################################################## + +scripted_trigger ep2_wedding_1310_wedding_friend_trigger = { + any_relation = { type = friend this = root } + is_adult = yes + is_ai = yes + NOR ={ + AND = { + this = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } # If the spouses are friends, that's adorable but incompatible with this event + AND = { + this = scope:activity.special_guest:spouse_2 + root = scope:activity.special_guest:spouse_1 + } + } +} + +ep2_wedding.1310 = { + type = activity_event + title = ep2_wedding.1310.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + this = scope:spouse_1 + this = scope:spouse_2 + } + } + desc = ep2_wedding.1310.desc_spouse + } + triggered_desc = { + trigger = { + this = scope:host + } + desc = ep2_wedding.1310.desc_host + } + desc = ep2_wedding.1310.desc_guest + } + } + + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = laugh + } + center_portrait = { + character = scope:other_guest + animation = disapproval + } + right_portrait = { + character = scope:friend + animation = wedding_drunk + } + + lower_right_portrait = scope:other_spouse + + cooldown = { years = 10 } + + trigger = { + has_ep2_dlc_trigger = yes + scope:activity = { + any_attending_character = { + ep2_wedding_1310_wedding_friend_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_trait = shy + add = 1 + } + modifier = { + has_trait = lifestyle_reveler + add = 1 + } + modifier = { + scope:activity = { exists = var:lovers_wedding } + add = -1 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = 1 + } + modifier = { + is_ai = yes + factor = 0.1 + } + } + + immediate = { + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = spouse_2 } + scope:activity = { + random_attending_character = { + limit = { + ep2_wedding_1310_wedding_friend_trigger = yes + } + save_scope_as = friend + } + } + if = { + limit = { + #If you're one of the spouses + OR = { + this = scope:spouse_1 + this = scope:spouse_2 + } + } + if = { + limit = { this = scope:spouse_1 } + #The person judging you will probably be a close relative of your new spouse, but could also be the spouse themselves + scope:spouse_2 = { save_scope_as = other_spouse } + random_list = { + 100 = { + trigger = { + scope:activity = { + any_attending_character = { + NOT = { + any_relation = { type = friend this = root } + any_relation = { type = friend this = scope:friend } + this = root + this = scope:friend + } + is_adult = yes + is_ai = yes + is_close_family_of = scope:spouse_2 + } + } + } + scope:activity = { + random_attending_character = { + limit = { + NOT = { + any_relation = { type = friend this = root } + any_relation = { type = friend this = scope:friend } + this = root + this = scope:friend + } + is_adult = yes + is_ai = yes + is_close_family_of = scope:spouse_2 + } + save_scope_as = other_guest + } + } + } + 50 = { + scope:spouse_2 = { save_scope_as = other_guest } + } + } + } + else = { + scope:spouse_1 = { save_scope_as = other_spouse } + random_list = { + 100 = { + trigger = { + scope:activity = { + any_attending_character = { + NOT = { + any_relation = { type = friend this = root } + any_relation = { type = friend this = scope:friend } + this = root + this = scope:friend + } + is_adult = yes + is_ai = yes + is_close_family_of = scope:spouse_1 + } + } + } + scope:activity = { + random_attending_character = { + limit = { + NOT = { + any_relation = { type = friend this = root } + any_relation = { type = friend this = scope:friend } + this = root + this = scope:friend + } + is_adult = yes + is_ai = yes + is_close_family_of = scope:spouse_1 + } + save_scope_as = other_guest + } + } + } + 50 = { + scope:spouse_1 = { save_scope_as = other_guest } + } + } + } + } + else_if = { + limit = { this = scope:host } # If you are the host, the judgy guest can be either spouse or any of their close family + random_list = { + 100 = { + trigger = { + NOT = { + scope:spouse_1 = { + any_relation = { + type = friend + this = root + } + } + } + } + scope:spouse_1 = { save_scope_as = other_guest } + } + 100 = { + trigger = { NOT = { scope:spouse_2 = { any_relation = { type = friend this = root } } } } + scope:spouse_2 = { save_scope_as = other_guest } + } + 100 = { + trigger = { + scope:activity = { + any_attending_character = { + NOT = { + any_relation = { type = friend this = root } + any_relation = { type = friend this = scope:friend } + this = root + this = scope:friend + } + is_adult = yes + is_ai = yes + OR = { + is_close_family_of = scope:spouse_1 + is_close_family_of = scope:spouse_2 + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + NOT = { + any_relation = { type = friend this = root } + any_relation = { type = friend this = scope:friend } + this = root + this = scope:friend + } + is_adult = yes + is_ai = yes + OR = { + is_close_family_of = scope:spouse_1 + is_close_family_of = scope:spouse_2 + } + } + save_scope_as = other_guest + } + } + } + 1 = { + scope:activity = { random_attending_character = { save_scope_as = other_guest } } #In case you're friends with both spouses and their entire families, I guess. + } + } + } + else = { + random_list = { + 10 = { + trigger = { NOT = { scope:spouse_1 = { any_relation = { type = friend this = root } } } } #Same options as if you're the host, but much less likely to grab the spouses + scope:spouse_1 = { save_scope_as = other_guest } + } + 10 = { + trigger = { NOT = { scope:spouse_2 = { any_relation = { type = friend this = root } } } } + scope:spouse_2 = { save_scope_as = other_guest } + } + 100 = { + trigger = { + scope:activity = { + any_attending_character = { + NOT = { + any_relation = { type = friend this = root } + any_relation = { type = friend this = scope:friend } + this = root + this = scope:friend + } + is_adult = yes + is_ai = yes + OR = { + is_close_family_of = scope:spouse_1 + is_close_family_of = scope:spouse_2 + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + NOT = { + any_relation = { type = friend this = root } + any_relation = { type = friend this = scope:friend } + this = root + this = scope:friend + } + is_adult = yes + is_ai = yes + OR = { + is_close_family_of = scope:spouse_1 + is_close_family_of = scope:spouse_2 + } + } + save_scope_as = other_guest + } + } + } + 1 = { + scope:activity = { random_attending_character = { save_scope_as = other_guest } } + } + } + } + } + + # What a joy to have FRIEND here with me! + option = { + name = ep2_wedding.1310.a + scope:activity = { + add_activity_log_entry = { + key = wedding_banquet_bond_log + tags = { good } + score = 25 + character = root + target = scope:friend + + # Effect + root = { + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { reason = best_friend_great_time_at_wedding copy_reason = friend target = scope:friend } + } + if = { + limit = { + OR = { + this = scope:spouse_1 + this = scope:spouse_2 + this = scope:host + } + } + reverse_add_opinion = { + target = scope:other_guest + modifier = insult_opinion + opinion = -30 + } + } + stress_impact = { + base = medium_stress_impact_loss + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.1 + } + modifier = { + has_trait = lustful + add = -15 + } + modifier = { + has_trait = gregarious + add = -25 + } + } + } + + # OTHER GUEST, come join us! + option = { + name = ep2_wedding.1310.b + random_list = { + 50 = { #Third person befriends you both + desc = ep2_wedding.1310.b.newfriends + compatibility_modifier = { + who = scope:friend + compatibility_target = scope:other_guest + multiplier = 3 + max = 50 + min = -30 + } + send_interface_toast = { + title = ep2_wedding.1310.b.newfriends + left_icon = scope:other_guest + scope:activity = { + add_activity_log_entry = { + key = wedding_cannot_escape_friends_log + tags = { good } + score = 25 + character = root + target = scope:other_guest + + # Effect + root = { + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:other_guest } + } + set_relation_friend = { + reason = friend_great_time_at_wedding + target = scope:other_guest + province = root.location + } + } + stress_impact = { + gregarious = medium_stress_impact_loss + } + } + scope:friend = { + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:other_guest } + } + set_relation_friend = { + reason = friend_great_time_at_wedding + target = scope:other_guest + province = root.location + } + } + } + } + } + } + } + 50 = { #Everyone has a good time + desc = ep2_wedding.1310.b.goodtime + compatibility_modifier = { + who = scope:friend + compatibility_target = scope:other_guest + multiplier = 2 + max = 35 + min = -35 + } + send_interface_toast = { + title = ep2_wedding.1310.b.goodtime + left_icon = scope:other_guest + scope:activity = { + add_activity_log_entry = { + key = wedding_cannot_escape_goodtime_log + tags = { betrothal } + score = 25 + character = root + target = scope:other_guest + + # Effect + root = { + reverse_add_opinion = { + target = scope:other_guest + modifier = friendliness_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:friend + modifier = friendliness_opinion + opinion = 30 + } + stress_impact = { + gregarious = minor_stress_impact_loss + } + } + } + } + } + } + 40 = { #Everyone has a bad time + desc = ep2_wedding.1310.b.badtime + compatibility_modifier = { + who = scope:friend + compatibility_target = scope:other_guest + multiplier = -3 + max = 60 + min = -9 + } + send_interface_toast = { + title = ep2_wedding.1310.b.badtime + left_icon = scope:other_guest + scope:activity = { + add_activity_log_entry = { + key = wedding_cannot_escape_badtime_log + tags = { betrothal } + score = 25 + character = root + target = scope:other_guest + + #Effect + if = { + limit = { + scope:friend = { can_set_relation_rival_trigger = { CHARACTER = scope:other_guest } } + } + scope:friend = { + set_relation_rival = { + target = scope:other_guest + reason = rival_bad_time_at_wedding + } + } + } + root = { + stress_impact = { + base = minor_stress_impact_gain + } + } + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + } + modifier = { + has_trait = gregarious + add = 20 + } + modifier = { + has_trait = shy + add = -75 + } + } + } + + # Let's sneak out so we can talk properly! + option = { + name = ep2_wedding.1310.c + scope:activity = { + add_activity_log_entry = { + key = wedding_cannot_escape_sneak_log + tags = { betrothal } + score = 25 + character = root + target = scope:friend + + # Effect + root = { + if = { + limit = { NOT = { has_trait = confider } } + add_trait = confider + } + else = { + add_stress = major_stress_impact_loss + } + } + scope:other_guest = { + if = { + limit = { + OR = { + this = scope:spouse_1 + this = scope:spouse_2 + } + } + progress_towards_rival_effect = { + REASON = rival_dishonored_wedding_banquet + CHARACTER = root + OPINION = 0 + } + } + else = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -30 + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + } + modifier = { + has_trait = shy + add = 20 + } + modifier = { + has_trait = gregarious + add = -50 + } + } + } + + option = { # You must excuse me, my friend. + name = ep2_wedding.1310.d + flavor = ep2_wedding.1310.d.tt + scope:activity = { + add_activity_log_entry = { + key = wedding_cannot_escape_excuse_log + tags = { betrothal } + score = 25 + character = root + target = scope:other_guest + + # Effect + scope:other_guest = { + progress_towards_friend_effect = { + REASON = friend_great_time_at_wedding + CHARACTER = root + OPINION = 0 + } + } + } + } + stress_impact = { + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + } + modifier = { + has_trait = gregarious + add = -20 + } + } + } +} + +###################################### +# A Rival Seeks Forgiveness +# by Luke Bean +# ep2_wedding.1320 +###################################### + +scripted_trigger ep2_wedding_1320_forgiving_rival_trigger = { + is_adult = yes + is_ai = yes + any_relation = { type = rival this = root } + NOR = { + has_character_flag = busy_in_wnight_event + has_trait = vengeful + has_trait = arrogant + any_relation = { type = nemesis this = root } + } + OR = { + has_trait = forgiving + has_trait = humble + has_trait = compassionate + AND = { + has_trait = zealous + this.faith = { trait_is_virtue = forgiving } + } + trait_compatibility = { + target = root + value >= medium_positive_trait_compatibility # We're not so different, you and I... + } + } + NOR = { + AND = { + root = scope:activity.special_guest:spouse_1 # Never triggers for rival spouses + this = scope:activity.special_guest:spouse_2 + } + AND = { + root = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } +} + +ep2_wedding.1320 = { + type = activity_event + title = ep2_wedding.1320.t + desc = { + desc = ep2_wedding.1320.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:role = flag:host + scope:rival_role = flag:spouse + } + desc = ep2_wedding.1320.desc_host_vs_spouse + } + triggered_desc = { + trigger = { + scope:role = flag:host + scope:rival_role = flag:guest + } + desc = ep2_wedding.1320.desc_host_vs_guest + } + triggered_desc = { + trigger = { + scope:role = flag:spouse + scope:rival_role = flag:guest + } + desc = ep2_wedding.1320.desc_spouse_vs_guest + } + triggered_desc = { + trigger = { + scope:role = flag:guest + scope:rival_role = flag:host + } + desc = ep2_wedding.1320.desc_guest_vs_host + } + triggered_desc = { + trigger = { + scope:role = flag:guest + scope:rival_role = flag:spouse + } + desc = ep2_wedding.1320.desc_guest_vs_spouse + } + triggered_desc = { + trigger = { + scope:role = flag:spouse + scope:rival_role = flag:host + } + desc = ep2_wedding.1320.desc_spouse_vs_host + } + desc = ep2_wedding.1320.desc_guest_vs_guest + } + desc = ep2_wedding.1320.desc_outro + } + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:rival + animation = shame + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + scope:activity = { + any_attending_character = { + ep2_wedding_1320_forgiving_rival_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + root = scope:host + scope:host = { + ep2_wedding_1320_forgiving_rival_trigger = yes + } + } + add = 5 # Very, very likely to happen if one rival invited and the other accepted + } + modifier = { + OR = { + root = scope:activity.special_guest:spouse_1 + scope:activity.special_guest:spouse_2 = { ep2_wedding_1320_forgiving_rival_trigger = yes } + } + add = 3 # Much more likely to happen on the occasion of one of the rivals' weddings + } + modifier = { + has_trait = forgiving ### More likely to happen if the rival thinks root is the sort of person who might forgive them + add = 1 + } + modifier = { + scope:activity = { + any_attending_character = { + ep2_wedding_1320_forgiving_rival_trigger = yes + has_trait = forgiving + } + } + add = 1 + } + modifier = { + scope:activity = { + any_attending_character = { + ep2_wedding_1320_forgiving_rival_trigger = yes + has_trait = humble + } + } + add = 1 + } + modifier = { + scope:activity = { + any_attending_character = { + ep2_wedding_1320_forgiving_rival_trigger = yes + has_trait = compassionate + } + } + add = 1 + } + modifier = { + scope:activity = { + any_attending_character = { + ep2_wedding_1320_forgiving_rival_trigger = yes + has_trait = zealous + faith = { trait_is_virtue = forgiving } + } + } + add = 1 + } + } + + immediate = { + scope:activity = { + random_attending_character = { + limit = { + ep2_wedding_1320_forgiving_rival_trigger = yes + OR = { + has_trait = forgiving + has_trait = humble + has_trait = compassionate + AND = { + has_trait = zealous + faith = { trait_is_virtue = forgiving } + } + } + } + alternative_limit = { + ep2_wedding_1320_forgiving_rival_trigger = yes + } + save_scope_as = rival + } + } + if = { + limit = { + root = scope:host + } + save_scope_value_as = { + name = role + value = flag:host + } + } + else_if = { + limit = { + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + save_scope_value_as = { + name = role + value = flag:spouse + } + } + else = { + save_scope_value_as = { + name = role + value = flag:guest + } + } + if = { + limit = { + scope:rival = scope:host + } + save_scope_value_as = { + name = rival_role + value = flag:host + } + } + else_if = { + limit = { + OR = { + scope:rival = scope:activity.special_guest:spouse_1 + scope:rival = scope:activity.special_guest:spouse_2 + } + } + save_scope_value_as = { + name = rival_role + value = flag:spouse + } + } + else = { + save_scope_value_as = { + name = rival_role + value = flag:guest + } + } + } + + # Embrace RIVAL and let bygones be bygones! + option = { + name = ep2_wedding.1320.a + scope:activity = { + add_activity_log_entry = { + key = wedding_embraced_rival_log + tags = { rival } + score = 25 + character = root + target = scope:rival + + #Effect + root = { + remove_relation_rival = scope:rival + random_list = { + 80 = { + send_interface_toast = { + title = ep2_wedding.1320.a.friendliness + left_icon = scope:rival + reverse_add_opinion = { + target = scope:rival + modifier = friendliness_opinion + opinion = 30 + } + } + } + 20 = { + compatibility_modifier = { + who = root + compatibility_target = scope:rival + multiplier = 3 + max = 50 + min = -30 + } + send_interface_toast = { + title = ep2_wedding.1320.a.friend + left_icon = scope:rival + set_relation_friend = { reason = friend_reconciled_at_wedding target = scope:rival } + } + } + } + } + } + } + stress_impact = { + vengeful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + forgiving = massive_stress_impact_loss + compassionate = major_stress_impact_loss + gregarious = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.2 + ai_compassion = 0.5 + ai_sociability = 0.2 + } + modifier = { + has_trait = vengeful + add = -100 + } + modifier = { + has_trait = arrogant + add = -50 + } + modifier = { + has_trait = forgiving + add = 100 + } + } + } + + # Hurl a DISH in RIVAL's face. + option = { + name = ep2_wedding.1320.b + scope:activity = { + add_activity_log_entry = { + key = wedding_dished_rival_log + tags = { rival } + score = 25 + character = root + target = scope:rival + + # Effect + root = { + add_dread = minor_dread_gain + } + } + } + random_list = { + 100 = { + desc = ep2_wedding.1310.b.nowound + send_interface_toast = { + title = ep2_wedding.1310.b.nowound + left_icon = scope:rival + reverse_add_opinion = { + target = scope:rival + modifier = angry_opinion + opinion = -50 + } + } + } + 30 = { + desc = ep2_wedding.1310.b.wound + trigger = { + can_set_relation_nemesis_trigger = { CHARACTER = scope:rival } + } + send_interface_toast = { + title = ep2_wedding.1310.b.wound + left_icon = scope:rival + scope:rival = { increase_wounds_effect = { REASON = fight } } + set_relation_nemesis = { reason = nemesis_spurned_reconciliation_at_wedding target = scope:rival } + } + } + 30 = { + desc = ep2_wedding.1310.b.wound + trigger = { + NOT = { can_set_relation_nemesis_trigger = { CHARACTER = scope:rival } } + } + send_interface_toast = { + title = ep2_wedding.1310.b.wound + left_icon = scope:rival + scope:rival = { increase_wounds_effect = { REASON = fight } } + } + } + } + if = { + limit = { + has_activity_intent = banquet_mischief_intent + } + stress_impact = { + base = minor_stress_impact_loss + vengeful = major_stress_impact_loss + } + } + else = { + stress_impact = { + vengeful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + forgiving = massive_stress_impact_gain + compassionate = major_stress_impact_gain + gregarious = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_compassion = -0.5 + } + modifier = { + has_trait = wrathful + add = 30 + } + modifier = { + has_trait = impatient + add = 30 + } + } + } + + # What's forgiveness worth to you? + option = { + name = ep2_wedding.1320.c + + duel = { + target = scope:rival + skill = diplomacy + 25 = { + desc = ep2_wedding.1310.c.hook + trigger = { + can_add_hook = { + target = scope:rival + type = favor_hook + } + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep2_wedding.1310.c.hook + left_icon = scope:rival + scope:activity = { + add_activity_log_entry = { + key = wedding_hooked_rival_log + tags = { rival } + score = 25 + character = root + target = scope:rival + + # Effect + root = { + remove_relation_rival = scope:rival + add_hook = { + target = scope:rival + type = favor_hook + } + } + } + } + } + } + 30 = { + desc = ep2_wedding.1310.c.apology + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = ep2_wedding.1310.c.apology + left_icon = scope:rival + scope:activity = { + add_activity_log_entry = { + key = wedding_apology_rival_log + tags = { rival } + score = 25 + character = root + target = scope:rival + + # Effect + root = { + remove_relation_rival = scope:rival + add_prestige = medium_prestige_value + } + } + } + } + } + 35 = { + desc = ep2_wedding.1310.c.refusal + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = ep2_wedding.1310.c.refusal + left_icon = scope:rival + scope:activity = { + add_activity_log_entry = { + key = wedding_refusal_rival_log + tags = { rival } + score = 25 + character = root + target = scope:rival + + # Effect + root = { + reverse_add_opinion = { + target = scope:rival + modifier = angry_opinion + opinion = -50 + } + } + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + has_trait = ambitious + add = 10 + } + } + } + + #Ignore RIVAL until they leave. + option = { + name = ep2_wedding.1320.d + add_prestige = minor_prestige_gain + scope:rival = { add_prestige = minor_prestige_loss } + reverse_add_opinion = { + target = scope:rival + modifier = angry_opinion + opinion = -20 + } + if = { + limit = { + has_activity_intent = reduce_stress_intent + } + stress_impact = { + base = minor_stress_impact_loss + } + } + ai_chance = { + base = 80 + modifier = { + has_activity_intent = reduce_stress_intent + add = 50 + } + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +############################################## +# We Were Lovers Before The Wedding +# by Luke Bean +# ep2_wedding.1330 +############################################## + +scripted_trigger ep2_wedding_1330_doubts_own_fidelity_trigger = { + OR = { + has_trait = lustful + has_trait = seducer + has_trait = rakish + any_relation = { + type = lover + this != scope:spouse + } + } +} + +ep2_wedding.1330 = { + type = activity_event + title = ep2_wedding.1330.t + desc = ep2_wedding.1330.desc + theme = wedding_night_activity + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:spouse + animation = flirtation + } + + cooldown = { years = 10 } + + trigger = { + has_ep2_dlc_trigger = yes + scope:activity = { exists = var:lovers_wedding } + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + + weight_multiplier = { + base = 100 + } + + immediate = { + if = { + limit = { root = scope:activity.special_guest:spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = spouse } + } + else_if = { + limit = { root = scope:activity.special_guest:spouse_2 } + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse } + } + if = { + limit = { + any_relation = { type = soulmate this != scope:spouse } + } + random_relation = { + type = soulmate + limit = { this != scope:spouse } + save_scope_as = soulmate + } + } + } + + # I love this MAN beyond words + option = { + name = ep2_wedding.1330.a + trigger = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:spouse } + } + + set_relation_soulmate = { + reason = soulmate_married_my_lover + copy_reason = lover + target = scope:spouse + } + # Achievements + player_succeeded_at_a_thousand_and_one_nights_achievement_effect = yes + + stress_impact = { + seducer = medium_stress_impact_gain + rakish = medium_stress_impact_gain + deceitful = minor_stress_impact_gain + chaste = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.25 + } + modifier = { + has_trait = callous + add = -20 + } + } + } + + # I will never need anyone else but HIM + option = { + name = ep2_wedding.1330.b + trigger = { + ep2_wedding_1330_doubts_own_fidelity_trigger = no + } + + add_character_modifier = { + modifier = wedding_wants_to_be_faithful_modifier + years = 20 + } + + stress_impact = { + fickle = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + } + modifier = { + has_trait = chaste + add = 20 + } + } + } + + # I will be faithful. I will change my ways! + option = { + name = ep2_wedding.1330.c + trigger = { + OR = { + has_trait = rakish + any_relation = { + type = lover + this != scope:spouse + } + } + } + + add_character_modifier = { + modifier = wedding_wants_to_be_faithful_modifier + years = 20 + } + if = { + limit = { has_trait = rakish } + random_list = { + 50 = { + send_interface_toast = { + title = ep2_wedding.1330.c.rakish.success + remove_trait = rakish + add_stress = major_stress_impact_gain + } + } + 50 = { + send_interface_toast = { + title = ep2_wedding.1330.c.rakish.failure + add_stress = minor_stress_impact_gain + } + } + } + } + every_relation ?= { + type = lover + limit = { this != scope:spouse } + save_temporary_scope_as = lover + if = { + limit = { scope:lover = { is_ai = no } } + scope:lover = { + send_interface_toast = { + title = ep2_wedding.1330.c.breakup + left_icon = root + root = { remove_relation_lover = scope:lover } + } + } + } + else = { root = { remove_relation_lover = scope:lover } } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.25 + ai_honor = 0.25 + } + modifier = { + has_trait = lustful # lustful will avoid this option UNLESS... + add = -30 + } + modifier = { + has_trait = lustful + has_trait = compassionate # ...they have a reason to feel bad about it. + add = 80 + } + modifier = { + has_trait = lustful + has_trait = just + add = 60 + } + modifier = { + has_trait = lustful + has_trait = honest + add = 60 + } + modifier = { + has_trait = lustful + has_trait = zealous + root.faith = { trait_is_virtue = chaste } + add = 80 + } + } + } + + # I wonder if HE's into... that one thing? + option = { + name = ep2_wedding.1330.d + trigger = { + OR = { + has_trait = deviant + any_secret = { type = secret_deviant } + } + NOR = { + faith = { has_doctrine = doctrine_deviancy_accepted } + scope:spouse = { has_trait = deviant } + scope:spouse = { any_secret = { type = secret_deviant NOT = { is_known_by = root } } } + } + } + + if = { + limit = { any_secret = { type = secret_deviant NOT = { is_known_by = scope:spouse } } } + every_secret = { type = secret_deviant reveal_to = scope:spouse } + } + + hidden_effect = { + if = { + limit = { scope:spouse = { NOT = { any_secret = { type = secret_deviant } } } } + random_list = { + 70 = { + send_interface_toast = { + title = ep2_wedding.1330.d.yuck + left_icon = scope:spouse + reverse_add_opinion = { + target = scope:spouse + modifier = disgusted_opinion + opinion = -15 + } + } + } + 30 = { + compatibility_modifier = { + who = root + compatibility_target = scope:spouse + multiplier = 3 + max = 50 + min = -30 + } + modifier = { + scope:spouse = { has_trait = lustful } + add = 50 + } + modifier = { + scope:spouse = { has_trait = chaste } + add = -50 + } + send_interface_toast = { + title = ep2_wedding.1330.d.yum + left_icon = scope:spouse + scope:spouse = { add_secret = { type = secret_deviant } } + reverse_add_opinion = { + target = scope:spouse + modifier = love_opinion + opinion = 15 + } + } + } + } + } + if = { + limit = { scope:spouse = { any_secret = { type = secret_deviant NOT = { is_known_by = root } } } } + send_interface_toast = { + title = ep2_wedding.1330.d.yeahmetoo + left_icon = scope:spouse + scope:spouse = { every_secret = { type = secret_deviant reveal_to = root } } + reverse_add_opinion = { + target = scope:spouse + modifier = love_opinion + opinion = 15 + } + } + } + } + + show_as_tooltip = { + random_list = { + 1 = { + desc = ep2_wedding.1330.d.yuck.tt + show_chance = no + reverse_add_opinion = { + target = scope:spouse + modifier = disgusted_opinion + opinion = -15 + } + } + 1 = { + desc = ep2_wedding.1330.d.yum.tt + show_chance = no + scope:spouse = { add_secret = { type = secret_deviant } } + reverse_add_opinion = { + target = scope:spouse + modifier = love_opinion + opinion = 15 + } + } + 1 = { + desc = ep2_wedding.1330.d.yeahmetoo.tt + show_chance = no + custom_tooltip = ep2_wedding.1330.d.confession.tt + } + } + } + + ai_chance = { + base = 120 + ai_value_modifier = { + ai_boldness = 0.25 + } + modifier = { + has_trait = lustful + add = 20 + } + } + } + + # How could I have done this to SOULMATE? + option = { + name = ep2_wedding.1330.e + trigger = { + exists = scope:soulmate + } + + remove_relation_lover = scope:spouse + reverse_add_opinion = { + target = scope:soulmate + modifier = love_opinion + opinion = 100 + } + + stress_impact = { + base = major_stress_impact_loss + stubborn = medium_stress_impact_gain + chaste = medium_stress_impact_gain + } + + ai_chance = { + base = 90 + ai_value_modifier = { + ai_honor = 0.25 + ai_boldness = -0.25 + ai_rationality = -0.5 + } + modifier = { + has_trait = fickle + add = 30 + } + modifier = { + has_trait = arbitrary + add = 10 + } + } + } + + # Am I really HIS only love? + option = { + name = ep2_wedding.1330.f + hidden_effect = { + random_list = { + 100 = { # Mind at ease + send_interface_toast = { + title = ep2_wedding.1330.f.mindatease + left_icon = scope:spouse + add_character_modifier = { + modifier = wedding_mind_at_ease_modifier + days = 3650 + } + } + } + 100 = { # Lingering doubts + modifier = { + scope:spouse = { has_trait = deceitful } + add = 30 + } + modifier = { + scope:spouse = { has_trait = lustful } + add = 20 + } + modifier = { + scope:spouse = { has_trait = honest } + add = -30 + } + modifier = { + scope:spouse = { has_trait = chaste } + add = -50 + } + modifier = { + has_trait = paranoid + add = 50 + } + modifier = { + has_trait = trusting + add = -60 + } + + send_interface_toast = { + title = ep2_wedding.1330.f.lingeringdoubts + left_icon = scope:spouse + add_character_modifier = { + modifier = wedding_lingering_doubts_modifier + days = 3650 + } + } + } + 100 = { # Confess all + trigger = { scope:spouse = { any_secret = { type = secret_lover NOT = { is_known_by = root } } } } + modifier = { + scope:spouse = { has_trait = honest } + add = 200 + } + modifier = { + scope:spouse = { has_trait = compassionate } + add = 20 + } + modifier = { + scope:spouse = { has_trait = just } + add = 40 + } + modifier = { + scope:spouse = { has_trait = deceitful } + add = -100 + } + modifier = { + scope:spouse = { has_trait = callous } + add = -20 + } + modifier = { + scope:spouse = { has_trait = sadistic } # "The LOOK on your face!" + add = 20 + } + send_interface_toast = { + title = ep2_wedding.1330.f.confession + left_icon = scope:spouse + scope:spouse = { every_secret = { type = secret_lover limit = { NOT = { is_known_by = root } } reveal_to = root } } + } + } + } + } + show_as_tooltip = { + random_list = { + 1 = { + desc = ep2_wedding.1330.f.lingeringdoubts.tt + show_chance = no + add_character_modifier = { + modifier = wedding_lingering_doubts_modifier + days = 3650 + } + } + 1 = { + desc = ep2_wedding.1330.f.mindatease.tt + show_chance = no + add_character_modifier = { + modifier = wedding_mind_at_ease_modifier + days = 3650 + } + } + 1 = { + desc = ep2_wedding.1330.f.confession.desc + show_chance = no + custom_tooltip = ep2_wedding.1330.f.confession.tt + } + } + } + stress_impact = { + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 90 + modifier = { + has_trait = paranoid + add = 50 + } + } + } + + # Finally, we have no need to hide our love! + option = { + name = ep2_wedding.1330.g + + stress_impact = { + base = medium_stress_impact_loss + honest = major_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { + has_trait = honest + add = 50 + } + } + } +} + +################################################## +# Condolences On Your Wedding +# by Luke Bean +# ep2_wedding.1340 +################################################## + +scripted_trigger ep2_wedding_1340_marriage_cynic_trigger = { + is_ai = yes + OR = { + any_spouse = { # dislikes a spouse + OR = { + reverse_opinion = { + target = prev + value <= low_negative_opinion + } + has_relation_rival = prev + } + } + any_memory = { memory_type = spouse_committed_adultery } # has been cheated on + AND = { # has been divorced + any_former_spouse = { } + NOT = { + any_memory = { memory_type = spouse_died } + } + } + } +} + +scripted_trigger ep2_wedding_1340_unusual_hobbies_trigger = { + OR = { + AND = { + has_trait = lustful + any_relation = { + type = lover + this != scope:intended + } + } + has_trait = seducer + has_trait = torturer + has_trait = rakish + has_trait = cannibal + any_secret = { type = secret_cannibal } + has_trait = witch + any_secret = { type = secret_witch } + } +} + +scripted_effect ep2_wedding_1340_add_confidence = { + if = { + limit = { + this = { is_female = yes } + } + add_character_modifier = wedding_confident_bride + } + else = { add_character_modifier = wedding_confident_groom } +} + +ep2_wedding.1340 = { + type = activity_event + title = ep2_wedding.1340.t + desc = { + desc = ep2_wedding.1340.desc.intro + random_valid = { + triggered_desc = { + trigger = { + exists = scope:disliked_spouse + scope:cynic = { + NOR = { + has_trait = lustful + has_trait = seducer + has_trait = rakish + } + } + } + desc = ep2_wedding.1340.desc.dislikes_spouse + } + triggered_desc = { + trigger = { + exists = scope:disliked_spouse + scope:cynic = { + OR = { # dislikes a spouse and has a lust-related trait + has_trait = lustful + has_trait = seducer + has_trait = rakish + } + } + } + desc = ep2_wedding.1340.desc.dislikes_spouse_lustful + } + triggered_desc = { + trigger = { + scope:cynic = { + AND = { # has been divorced + any_former_spouse = { } + NOT = { + any_memory = { + memory_type = spouse_died + } + } + } + } + exists = scope:divorced_spouse + } + desc = ep2_wedding.1340.desc.divorced + } + triggered_desc = { + trigger = { # has been cheated on + NOT = { exists = scope:adulterous_spouse } # separate loc if they can name them + scope:cynic = { + any_memory = { + memory_type = spouse_committed_adultery + } + } + } + desc = ep2_wedding.1340.desc.cheated_on + } + triggered_desc = { + trigger = { + exists = scope:adulterous_spouse + } + desc = ep2_wedding.1340.desc.cheated_on_alt + } + } + desc = ep2_wedding.1340.desc.outro + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:cynic + animation = eyeroll + } + lower_center_portrait = scope:intended + + cooldown = { years = 15 } + + weight_multiplier = { + base = 1 + modifier = { # more likely to happen if close family member is cynical about marriage + root = { + any_close_family_member = { + is_alive = yes + is_ai = yes + is_participant_in_activity = scope:activity + ep2_wedding_1340_marriage_cynic_trigger = yes + } + } + add = 3 + } + modifier = { # also more likely to happen with a friend + root = { + any_relation = { + type = friend + is_alive = yes + is_ai = yes + is_participant_in_activity = scope:activity + ep2_wedding_1340_marriage_cynic_trigger = yes + } + } + add = 3 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = 2 + } + } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + location = scope:activity.activity_location + OR = { + scope:activity.special_guest:spouse_1 = root + scope:activity.special_guest:spouse_2 = root + } + scope:activity = { + any_attending_character = { + ep2_wedding_1340_marriage_cynic_trigger = yes + } + } + } + + immediate = { + add_character_flag = busy_in_wgathering_event + root = { save_scope_as = nervous_spouse } + if = { + limit = { + root = scope:activity.special_guest:spouse_1 + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = intended + } + } + else = { + scope:activity.special_guest:spouse_1 = { + save_scope_as = intended + } + } + scope:activity = { + random_attending_character = { + limit = { ep2_wedding_1340_marriage_cynic_trigger = yes } + weight = { + base = 1 + modifier = { # much more likely to be cynical friend or family + factor = 100 + has_relation_friend = root + } + modifier = { + factor = 100 + is_close_family_of = root + } + modifier = { # helps if their personality disposes them to be cynical about marriage + factor = 3 + OR = { + has_trait = cynical + has_trait = lustful + } + } + } + save_scope_as = cynic + add_character_flag = busy_in_wgathering_event + if = { # if cynic dislikes a current spouse, mention them by name + limit = { + any_spouse = { + OR = { + reverse_opinion = { + target = prev + value <= 0 + } + has_relation_rival = prev + } + } + } + random_spouse = { + limit = { + OR = { + reverse_opinion = { + target = prev + value <= 0 + } + has_relation_rival = prev + } + } + save_scope_as = disliked_spouse + } + } + if = { # if cynic has a memory of adultery about a living spouse, mention them + limit = { + any_memory = { + memory_type = spouse_committed_adultery + } + } + every_spouse = { + save_temporary_scope_as = temp_spouse + prev = { + every_memory = { + memory_type = spouse_committed_adultery + if = { + limit = { has_memory_participant = scope:temp_spouse } + scope:temp_spouse = { save_scope_as = adulterous_spouse } + } + } + } + } + every_former_spouse = { + save_temporary_scope_as = temp_spouse + prev = { + every_memory = { + memory_type = spouse_committed_adultery + if = { + limit = { has_memory_participant = scope:temp_spouse } + scope:temp_spouse = { save_scope_as = adulterous_spouse } + } + } + } + } + } + if = { + limit = { + AND = { + any_former_spouse = { } + NOT = { + any_memory = { + memory_type = spouse_died + } + } + } + } + random_former_spouse = { save_scope_as = divorced_spouse } + } + } + } + } + + option = { # SPOUSE is perfect for me. + name = ep2_wedding.1340.a + flavor = ep2_wedding.1340.a.tt + random_list = { + 40 = { + compatibility_modifier = { + who = root + compatibility_target = scope:intended + multiplier = 3 + max = 100 + min = -20 + } + modifier = { + scope:intended = { + attraction >= low_positive_attraction + } + factor = 1.2 + } + modifier = { + attraction <= low_negative_attraction + factor = 0.8 + } + send_interface_toast = { + title = ep2_wedding.1340.a.success + ep2_wedding_1340_add_confidence = yes + add_stress = medium_stress_impact_loss + } + } + 20 = { + send_interface_toast = { + title = ep2_wedding.1340.a.failure + add_character_modifier = wedding_jitters + add_stress = minor_stress_impact_gain + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Don't worry, I'll have my hobbies! + name = ep2_wedding.1340.b + flavor = ep2_wedding.1340.b.tt + trigger = { ep2_wedding_1340_unusual_hobbies_trigger = no } + random_list = { + 15 = { + 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 + } + send_interface_toast = { + title = ep2_wedding.1340.b.success + ep2_wedding_1340_add_confidence = yes + add_stress = medium_stress_impact_loss + } + } + 30 = { + send_interface_toast = { + title = ep2_wedding.1340.b.failure + add_character_modifier = wedding_jitters + add_stress = minor_stress_impact_gain + } + } + } + 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 + } + } + } + + option = { # Don't worry, I'll have my... hobbies. + name = ep2_wedding.1340.c + flavor = ep2_wedding.1340.c.tt + trigger = { ep2_wedding_1340_unusual_hobbies_trigger = yes } + random_list = { + 0 = { + modifier = { + has_trait = lustful + any_relation = { + type = lover + this != scope:intended + } + add = 20 + } + modifier = { + has_trait = seducer + add = 20 + } + modifier = { + has_trait = torturer + add = 20 + } + modifier = { + has_trait = rakish + add = 20 + } + modifier = { + OR = { + any_secret = { type = secret_cannibal } + has_trait = cannibal + } + add = 20 + } + modifier = { + OR = { + any_secret = { type = secret_witch } + has_trait = witch + } + add = 20 + } + send_interface_toast = { + title = ep2_wedding.1340.c.success + ep2_wedding_1340_add_confidence = yes + add_stress = medium_stress_impact_loss + } + } + 10 = { + send_interface_toast = { + title = ep2_wedding.1340.c.failure + add_character_modifier = wedding_jitters + add_stress = minor_stress_impact_gain + } + } + } + ai_chance = { + base = 150 + modifier = { + has_trait = seducer + add = 20 + } + modifier = { + has_trait = torturer + add = 20 + } + modifier = { + has_trait = rakish + add = 20 + } + modifier = { + OR = { + any_secret = { type = secret_cannibal } + has_trait = cannibal + } + add = 20 + } + modifier = { + OR = { + any_secret = { type = secret_witch } + has_trait = witch + } + add = 20 + } + } + } + + option = { # Please, I know all about marriage! + name = ep2_wedding.1340.d + flavor = { + first_valid = { + triggered_desc = { + trigger = { + number_of_current_and_former_spouses > 1 + } + desc = ep2_wedding.1340.d.tt.more + } + triggered_desc = { + trigger = { + number_of_current_and_former_spouses > 0 + } + desc = ep2_wedding.1340.d.tt.once + } + desc = ep2_wedding.1340.d.tt.never + } + } + random_list = { + 10 = { + modifier = { + number_of_current_and_former_spouses > 0 + add = 10 + } + modifier = { + number_of_current_and_former_spouses > 1 + add = 20 + } + modifier = { + number_of_current_and_former_spouses > 2 + add = 30 + } + send_interface_toast = { + title = ep2_wedding.1340.d.success + ep2_wedding_1340_add_confidence = yes + add_stress = medium_stress_impact_loss + } + } + 20 = { + send_interface_toast = { + title = ep2_wedding.1340.d.failure + add_character_modifier = wedding_jitters + add_stress = minor_stress_impact_gain + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Get out of my face, you bitter wretch. + name = ep2_wedding.1340.e + trigger = { has_trait = wrathful } + stress_impact = { + base = medium_stress_impact_loss + } + reverse_add_opinion = { + target = scope:cynic + modifier = insulted_opinion + opinion = -30 + } + ai_chance = { + base = 300 + } + } + + option = { # ...will it really be that bad? + name = ep2_wedding.1340.f + trigger = { + NOT = { has_trait = wrathful } + } + add_character_modifier = wedding_jitters + ai_chance = { + base = 50 + } + } + + after = { + remove_character_flag = busy_in_wgathering_event + scope:cynic = { remove_character_flag = busy_in_wgathering_event } + } +} + +################################################## +# Lost For Words +# by Luke Bean +# ep2_wedding.1350 +################################################## + +scripted_trigger ep2_wedding_1350_caring_relative_trigger = { + is_ai = yes + is_close_family_of = root + NOR = { + is_child_of = root + is_grandchild_of = root + has_trait = callous + has_trait = sadistic + this = root + } + opinion = { + target = root + value >= 40 + } +} + +ep2_wedding.1350 = { + type = activity_event + title = ep2_wedding.1350.t + desc = ep2_wedding.1350.desc.intro + theme = wedding_ceremony_activity + center_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:caring_relative + animation = admiration + } + + cooldown = { years = 15 } + + weight_multiplier = { + base = 1 + modifier = { # much more likely to happen if root has wedding jitters + root = { + has_character_modifier = wedding_jitters + } + add = 5 + } + modifier = { + has_activity_intent = reduce_stress_intent + add = 2 + } + } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + location = scope:activity.activity_location + OR = { + scope:activity.special_guest:spouse_1 = root + scope:activity.special_guest:spouse_2 = root + } + scope:activity = { + any_attending_character = { + ep2_wedding_1350_caring_relative_trigger = yes + } + } + } + + immediate = { + scope:activity = { + random_attending_character = { + limit = { ep2_wedding_1350_caring_relative_trigger = yes } + weight = { + base = 10 + modifier = { + add = 10 + is_parent_of = root + } + modifier = { + add = 5 + is_sibling_of = root + } + modifier = { + factor = 2 + has_trait = compassionate + } + } + save_scope_as = caring_relative + } + } + } + + option = { # Enjoy a quiet moment together. + name = ep2_wedding.1350.a + stress_impact = { + base = medium_stress_impact_loss + } + reverse_add_opinion = { + target = scope:caring_relative + modifier = love_opinion + opinion = 15 + } + if = { + limit = { has_character_modifier = wedding_jitters } + remove_character_modifier = wedding_jitters + ep2_wedding_1340_add_confidence = yes # replace wedding_jitters with confidence + } + ai_chance = { + base = 100 + modifier = { + has_character_modifier = wedding_jitters + add = 50 + } + } + } + + option = { # Tell RELATIVE how much it means to have them here. + name = ep2_wedding.1350.b + progress_towards_friend_effect = { + CHARACTER = scope:caring_relative + OPINION = 20 + REASON = friend_supportive_at_wedding + } + ai_chance = { + base = 100 + } + } +} + +############################ +## Wedding Banquet Events +## 2000-2999 +## by Veronica Pazos +############################ + +# Diplomatic Intent: You ask a friend of your target's for info about them + +scripted_trigger ep2_wedding_2000_valid_friend = { + feast_default_adult_participant_trigger = yes + drinks_alcohol_trigger = yes + OR = { #they know the person + is_close_family_or_spouse_of_root_trigger = yes + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root.intent_target } + } + NOT = { is_spouse_of = root } + NOT = { is_close_family_of = root } +} + +scripted_trigger ep2_wedding_2000_is_valiant = { + OR = { + has_lifestyle = martial_lifestyle + prowess >= high_skill_rating + martial >= high_skill_rating + has_trait = brave + has_trait = reckless + has_trait = gallant + has_trait = wrathful + has_trait = overseer + has_trait = strategist + has_trait = lifestyle_hunter + has_trait = lifestyle_blademaster + } +} + +scripted_trigger ep2_wedding_2000_is_nerd = { + OR = { + has_lifestyle = learning_lifestyle + learning >= high_skill_rating + has_trait = theologian + has_trait = scholar + has_trait = diligent + has_trait = shrewd + } +} + +scripted_trigger ep2_wedding_2000_is_social = { + OR = { + has_lifestyle = diplomacy_lifestyle + diplomacy >= high_skill_rating + has_trait = lifestyle_reveler + has_trait = gregarious + has_trait = august + has_trait = diplomat + has_trait = drunkard + has_trait = trusting + has_trait = compassionate + } +} + +scripted_trigger ep2_wedding_2000_is_fishy = { + OR = { + has_lifestyle = intrigue_lifestyle + intrigue >= high_skill_rating + has_trait = callous + has_trait = cynical + has_trait = arbitrary + has_trait = deceitful + has_trait = schemer + has_trait = torturer + has_trait = greedy + has_trait = vengeful + has_trait = ambitious + has_trait = disloyal + } +} + +scripted_trigger ep2_wedding_2000_is_lustful = { + OR = { + has_trait = lustful + has_trait = seducer + has_trait = rakish + has_trait = fornicator + has_trait = adulterer + has_trait = sodomite + has_trait = deviant + } +} + +ep2_wedding.2000 = { + type = activity_event + title = ep2_wedding.2000.t + desc = { + desc = ep2_wedding.2000.desc.intro + random_valid = { + triggered_desc = { + trigger = { + OR = { + intent_target = { + ep2_wedding_2000_is_lustful = yes + } + AND = { + intent_target = { + ep2_wedding_2000_is_lustful = no + } + scope:target_friend = { + ep2_wedding_2000_is_fishy = yes + } + } + } + } + desc = ep2_wedding.2000.desc.lustful + } + triggered_desc = { + trigger = { + OR = { + intent_target = { + ep2_wedding_2000_is_nerd = yes + } + AND = { + intent_target = { + ep2_wedding_2000_is_nerd = no + } + scope:target_friend = { + ep2_wedding_2000_is_fishy = yes + } + } + } + } + desc = ep2_wedding.2000.desc.nerd + } + triggered_desc = { + trigger = { + OR = { + intent_target = { + ep2_wedding_2000_is_valiant = yes + } + AND = { + intent_target = { + ep2_wedding_2000_is_valiant = no + } + scope:target_friend = { + ep2_wedding_2000_is_fishy = yes + } + } + } + } + desc = ep2_wedding.2000.desc.valiant + } + triggered_desc = { + trigger = { + OR = { + intent_target = { + ep2_wedding_2000_is_social = yes + } + AND = { + intent_target = { + ep2_wedding_2000_is_social = no + } + scope:target_friend = { + ep2_wedding_2000_is_fishy = yes + } + } + } + } + desc = ep2_wedding.2000.desc.social + } + triggered_desc = { + trigger = { + OR = { + intent_target = { + ep2_wedding_2000_is_fishy = yes + } + AND = { + intent_target = { + ep2_wedding_2000_is_fishy = no + } + scope:target_friend = { + ep2_wedding_2000_is_fishy = yes + } + } + } + } + desc = ep2_wedding.2000.desc.fishy + } + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + ep2_wedding_2000_is_fishy = yes + } + animation = scheme + } + animation = admiration + } + right_portrait = { + character = scope:target_friend + animation = drink_goblet + } + lower_center_portrait = scope:diplo_target + + cooldown = { years = 5 } + + trigger = { + has_ep2_dlc_trigger = yes + has_activity_intent = diplomatic_intent + intent_target = { #there's something we can say of them + is_alive = yes + OR = { + ep2_wedding_2000_is_valiant = yes + ep2_wedding_2000_is_nerd = yes + ep2_wedding_2000_is_social = yes + ep2_wedding_2000_is_fishy = yes + ep2_wedding_2000_is_lustful = yes + } + } + scope:activity = { #there's someone that knows the person + any_attending_character = { + ep2_wedding_2000_valid_friend = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:activity = { #there's a guy that's best friends with target + any_attending_character = { + has_relation_best_friend = root.intent_target + } + } + } + modifier = { + factor = 1.5 + scope:activity = { #their soulmate is around + any_attending_character = { + has_relation_soulmate = root.intent_target + } + } + } + } + + immediate = { + scope:activity = { #there's someone that knows the person + random_attending_character = { + limit = { + ep2_wedding_2000_valid_friend = yes + } + save_scope_as = target_friend + } + } + intent_target = { save_scope_as = diplo_target } + } + + #Awesome, let's go! + option = { + name = ep2_wedding.2000.a + custom_tooltip = ep2_wedding.2000.a.tt + trigger_event = ep2_wedding.2001 + stress_impact = { + lazy = medium_stress_impact_gain + patient = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = patient + has_trait = shy + } + } + } + } + + #Are they... lying? + option = { + name = ep2_wedding.2000.b + duel = { + skill = intrigue + target = scope:target_friend + 50 = { #they were lying, you catch them + desc = ep2_wedding.2000.b.success + show_chance = no + modifier = { + add = 20 + scope:target_friend = { + ep2_wedding_2000_is_fishy = yes + } + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 5 + } + send_interface_toast = { + title = ep2_wedding.2000.b.success + left_icon = root + custom_tooltip = ep2_wedding.2000.b.success.tt + set_variable = { + name = wbanquet_friend_insight_var + value = scope:diplo_target + } + add_intrigue_skill = 1 + if = { + limit = { has_lifestyle = intrigue_lifestyle } + add_intrigue_lifestyle_xp = minor_lifestyle_experience + } + } + } + 50 = { #they weren't lying + desc = ep2_wedding.2000.b.failure + show_chance = no + modifier = { + add = 50 + scope:target_friend = { + has_trait = honest + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + send_interface_toast = { + title = ep2_wedding.2000.b.failure + left_icon = scope:target_friend + scope:target_friend = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -5 + } + } + } + } + } + stress_impact = { + reclusive = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = reclusive + } + } + } +} + +ep2_wedding.2001 = { + type = activity_event + title = ep2_wedding.2001.t + desc = ep2_wedding.2001.desc + theme = wedding_banquet_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + ep2_wedding_2000_is_fishy = yes + } + animation = scheme + } + animation = admiration + } + right_portrait = { + character = scope:diplo_target + triggered_animation = { + trigger = { + drinks_alcohol_trigger = yes + } + animation = drink_goblet + } + animation = happiness + } + + lower_center_portrait = scope:target_friend + + #Lustful + option = { + name = ep2_wedding.2001.a + set_local_variable = ep2_wedding_lustful_var + ai_chance = { + base = 100 + modifier = { + factor = 2 + ep2_wedding_2000_is_lustful = yes + } + } + } + + #Nerd + option = { + name = { + trigger = { + NOT = { has_trait = dull } + capital_province = { + geographical_region = world_europe + } + } + text = ep2_wedding.2001.b + } + name = ep2_wedding.2001.b.dull + flavor = { + triggered_desc = { + trigger = { + NOT = { has_trait = dull } + } + desc = ep2_wedding.2001.b.flavor + } + } + set_local_variable = ep2_wedding_nerd_var + ai_chance = { + base = 100 + modifier = { + factor = 2 + ep2_wedding_2000_is_nerd = yes + } + } + } + + #Valiant + option = { + name = ep2_wedding.2001.c + set_local_variable = ep2_wedding_valiant_var + ai_chance = { + base = 100 + modifier = { + factor = 2 + ep2_wedding_2000_is_valiant = yes + } + } + } + + #Social + option = { + name = ep2_wedding.2001.d + set_local_variable = ep2_wedding_social_var + ai_chance = { + base = 100 + modifier = { + factor = 2 + ep2_wedding_2000_is_social = yes + } + } + } + + #Fishy + option = { + name = ep2_wedding.2001.e + set_local_variable = ep2_wedding_fishy_var + ai_chance = { + base = 100 + modifier = { + factor = 2 + ep2_wedding_2000_is_fishy = yes + } + } + } + + after = { + scope:diplo_target = { + hidden_effect = { + if = { + limit = { + OR = { + AND = { + ep2_wedding_2000_is_lustful = yes + has_local_variable = ep2_wedding_lustful_var + } + AND = { + ep2_wedding_2000_is_nerd = yes + has_local_variable = ep2_wedding_nerd_var + } + AND = { + ep2_wedding_2000_is_valiant = yes + has_local_variable = ep2_wedding_valiant_var + } + AND = { + ep2_wedding_2000_is_social = yes + has_local_variable = ep2_wedding_social_var + } + AND = { + ep2_wedding_2000_is_fishy = yes + has_local_variable = ep2_wedding_fishy_var + } + } + } + set_local_variable = ep2_wedding_2000_got_it_right + } + } + } + random_list = { + 5 = { + trigger = { + scope:diplo_target = { activity_wedding_diplomatic_intent_impressible_target = yes } + } + desc = ep2_wedding.2000.after.subjugate + show_chance = no + send_interface_toast = { + title = ep2_wedding.2000.after.subjugate + left_icon = scope:diplo_target + custom_tooltip = { + text = ep2_wedding.2000.after.subjugate.tt + complete_activity_intent = yes + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = title_change + add_claim_on_loss = no + } + scope:diplo_target = { + change_liege = { + liege = root + change = scope:title_change + } + } + resolve_title_and_vassal_change = scope:title_change + } + } + } + 10 = { + desc = ep2_wedding.2000.after.alliance + show_chance = no + send_interface_toast = { + title = ep2_wedding.2000.after.alliance + left_icon = scope:diplo_target + custom_tooltip = { + text = ep2_wedding.2000.after.alliance.tt + complete_activity_intent = yes + create_alliance = { + target = scope:diplo_target + allied_through_owner = root + allied_through_target = scope:diplo_target + } + scope:diplo_target = { + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + } + } + } + } + 10 = { + desc = ep2_wedding.2000.after.friends + show_chance = no + send_interface_toast = { + title = ep2_wedding.2000.after.friends + left_icon = scope:diplo_target + progress_towards_friend_effect = { + CHARACTER = scope:diplo_target + OPINION = 15 + REASON = friend_wedding + } + } + } + 20 = { #only possible if you messed up + trigger = { + NOT = { has_local_variable = ep2_wedding_2000_got_it_right } + } + desc = ep2_wedding.2000.after.insult + show_chance = no + send_interface_toast = { + title = ep2_wedding.2000.after.insult.short + left_icon = scope:diplo_target + reverse_add_opinion = { + target = scope:diplo_target + modifier = insult_opinion + opinion = -10 + } + } + } + } + } +} + +############################ +## Wedding Night Events +## 3000-3999 +## by Veronica Pazos and Joe Parkin +############################ + +# Both spouses are shy/nervous and bond over something else + +scripted_trigger ep2_wedding.is_valid_shy = { + OR = { + AND = { + age <= 19 #they're young + NOT = { has_trait = lustful } + } + has_trait = shy + has_trait = craven + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = reclusive + has_trait = chaste + } +} + +ep2_wedding.3000 = { + type = activity_event + title = ep2_wedding.3000.t + desc = ep2_wedding.3000.desc + theme = wedding_night_activity + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:my_spouse + animation = shame + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { #you are a spouse and shy + AND = { + root = scope:activity.special_guest:spouse_1 + ep2_wedding.is_valid_shy = yes + } + AND = { + root = scope:activity.special_guest:spouse_2 + ep2_wedding.is_valid_shy = yes + } + } + OR = { #and they are a spouse and shy; you also don't have a lover relationship already + scope:activity.special_guest:spouse_1 = { + this != root + NOT = { has_relation_lover = root } + ep2_wedding.is_valid_shy = yes + } + scope:activity.special_guest:spouse_2 = { + this != root + NOT = { has_relation_lover = root } + ep2_wedding.is_valid_shy = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = shy + } + } + + immediate = { + if = { + limit = { + scope:activity.special_guest:spouse_1 = { this != root } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = my_spouse + } + } + else = { + scope:activity.special_guest:spouse_2 = { + save_scope_as = my_spouse + } + } + add_character_flag = { #doesn't make sense for you to have sexy times after this + flag = busy_in_wnight_event + days = 90 + } + } + + #Let's go for a walk + option = { + name = ep2_wedding.3000.a + custom_tooltip = ep2_wedding.3000.tt + random_list = { + 50 = { #they like it + desc = ep2_wedding.3000.a.success + show_chance = no + modifier = { + add = 50 + scope:my_spouse = { + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + } + } + } + modifier = { + add = 50 + scope:my_spouse = { + OR = { + has_trait = impatient + has_trait = diligent + } + } + } + send_interface_toast = { + title = ep2_wedding.3000.a.success + left_icon = scope:my_spouse + scope:activity = { + add_activity_log_entry = { + key = ep2_wedding_3000_log_a + tags = { good } + score = 20 + character = root + target = scope:my_spouse + + # Effect + root = { + if = { + limit = { + NOT = { has_relation_friend = scope:my_spouse } + } + set_relation_friend = { + target = scope:my_spouse + reason = lover_wnight_walk + } + } + else_if = { + limit = { + NOT = { has_relation_lover = scope:my_spouse } + } + progress_towards_lover_effect = { + CHARACTER = scope:my_spouse + REASON = lover_wnight_walk + OPINION = default_lover_opinion + } + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + } + } + add_opinion = { + target = scope:my_spouse + modifier = wnight_common_things_opinion + } + } + } + } + } + } + 50 = { #they dont + desc = ep2_wedding.3000.a.failure + show_chance = no + modifier = { + add = 50 + scope:my_spouse = { + OR = { + has_trait = lazy + has_trait = patient + } + } + } + send_interface_toast = { + title = ep2_wedding.3000.a.failure + left_icon = scope:my_spouse + scope:my_spouse = { + add_opinion = { + target = root + modifier = bored_opinion + opinion = -10 + } + } + add_opinion = { + target = scope:my_spouse + modifier = wnight_nothing_in_common_opinion + } + } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = patient + } + } + } + } + + #Do you like... things? Talk about something else + option = { + name = ep2_wedding.3000.b + custom_tooltip = ep2_wedding.3000.tt + random_list = { + 50 = { #they like it + desc = ep2_wedding.3000.b.success + show_chance = no + modifier = { + add = 50 + scope:my_spouse = { + OR = { + has_trait = patient + has_trait = calm + } + } + } + modifier = { + add = 50 + scope:my_spouse = { + OR = { + has_trait = gregarious + has_trait = trusting + } + } + } + send_interface_toast = { + title = ep2_wedding.3000.b.success + left_icon = scope:my_spouse + scope:activity = { + add_activity_log_entry = { + key = ep2_wedding_3000_log_b + tags = { good } + score = 20 + character = root + target = scope:my_spouse + + # Effect + root = { + if = { + limit = { + NOT = { has_relation_friend = scope:my_spouse } + } + set_relation_friend = { + target = scope:my_spouse + reason = lover_wnight_talk + } + } + else_if = { + limit = { NOT = { has_relation_lover = scope:my_spouse } } + progress_towards_lover_effect = { + CHARACTER = scope:my_spouse + REASON = lover_wnight_talk + OPINION = default_lover_opinion + } + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 5 + } + } + } + add_opinion = { + target = scope:my_spouse + modifier = wnight_common_things_opinion + } + } + } + } + } + } + 50 = { #they dont + desc = ep2_wedding.3000.b.failure + show_chance = no + modifier = { + add = 50 + scope:my_spouse = { + OR = { + has_trait = shy + has_trait = reclusive + } + } + } + modifier = { + add = 50 + scope:my_spouse = { + OR = { + has_trait = lisping + has_trait = stuttering + } + } + } + send_interface_toast = { + title = ep2_wedding.3000.b.failure + left_icon = scope:my_spouse + scope:my_spouse = { + add_opinion = { + target = root + modifier = bored_opinion + opinion = -10 + } + } + add_opinion = { + target = scope:my_spouse + modifier = wnight_nothing_in_common_opinion + } + } + } + } + stress_impact = { + reclusive = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = reclusive + } + } + } + + #Let's just sleep + option = { + name = ep2_wedding.3000.c + scope:my_spouse = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 5 + } + } + stress_impact = { + impatient = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = gregarious + } + } + } + } +} + +# Spouse with a secret has a breakdown and confesses their secret + +ep2_wedding.3010 = { + type = activity_event + title = ep2_wedding.3010.t + desc = { + desc = ep2_wedding.3010.desc.intro + first_valid = { #some vague flavour in case you choose the option to not hear about it (you still know the secret in the tooltip + triggered_desc = { + trigger = { + scope:my_spouse = { + any_secret = { + type = secret_murder + NOT = { is_known_by = root } + } + } + } + desc = ep2_wedding.3010.desc.murder + } + triggered_desc = { + trigger = { + scope:my_spouse = { + any_secret = { + type = secret_murder_attempt + NOT = { is_known_by = root } + } + } + } + desc = ep2_wedding.3010.desc.murder_attempt + } + triggered_desc = { + trigger = { + scope:my_spouse = { + any_secret = { + type = secret_cannibal + NOT = { is_known_by = root } + } + } + } + desc = ep2_wedding.3010.desc.cannibal + } + triggered_desc = { + trigger = { + scope:my_spouse = { + any_secret = { + type = secret_deviant + NOT = { is_known_by = root } + } + } + } + desc = ep2_wedding.3010.desc.deviant + } + triggered_desc = { + trigger = { + scope:my_spouse = { + any_secret = { + type = secret_witch + NOT = { is_known_by = root } + } + } + } + desc = ep2_wedding.3010.desc.witch + } + triggered_desc = { + trigger = { + scope:my_spouse = { + any_secret = { + type = secret_non_believer + NOT = { is_known_by = root } + } + } + } + desc = ep2_wedding.3010.desc.non_believer + } + desc = ep2_wedding.3010.desc.fallback + } + } + theme = wedding_night_activity + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:my_spouse + animation = grief + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { #you are one of the spouses + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + OR = { #the other spouse has a secret + scope:activity.special_guest:spouse_1 = { + this != root + any_secret = { + NOT = { is_known_by = root } + } + } + scope:activity.special_guest:spouse_2 = { + this != root + any_secret = { + NOT = { is_known_by = root } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = shy + } + } + + immediate = { + if = { + limit = { + scope:activity.special_guest:spouse_1 = { this != root } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = my_spouse + } + } + else = { + scope:activity.special_guest:spouse_2 = { + save_scope_as = my_spouse + } + } + scope:my_spouse = { + random_secret = { + limit = { NOT = { is_known_by = root } } + save_scope_as = secret_to_reveal + } + } + } + + #You can trust me + option = { + name = ep2_wedding.3010.a + scope:activity = { + add_activity_log_entry = { + key = wedding_confession_log + tags = { good } + score = 25 + character = root + target = scope:my_spouse + + # Effect + root = { + scope:secret_to_reveal = { reveal_to = root } + if = { + limit = { NOT = { has_relation_lover = scope:my_spouse } } + progress_towards_lover_effect = { + CHARACTER = scope:my_spouse + REASON = lover_wnight_secret_accepted + OPINION = default_lover_opinion + } + } + else = { + reverse_add_opinion = { + target = scope:my_spouse + modifier = grateful_opinion + opinion = 5 + } + } + scope:my_spouse = { + if = { + limit = { + NOT = { has_character_modifier = wnight_confider_modifier } + } + add_character_modifier = { + modifier = wnight_confider_modifier + years = 10 + } + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + else = { + reverse_add_opinion = { + target = scope:my_spouse + modifier = grateful_opinion + opinion = 15 + } + } + } + } + root = { + stress_impact = { #intended to be a very stressful moment + calm = medium_stress_impact_gain + content = medium_stress_impact_gain + diligent = medium_stress_impact_gain + temperate = medium_stress_impact_gain + paranoid = major_stress_impact_gain #they can hurt you + just = major_stress_impact_gain + } + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = content + has_trait = diligent + has_trait = temperate + has_trait = paranoid + has_trait = just + } + } + } + } + + #I don't wanna hear the rest + option = { + name = ep2_wedding.3010.b + add_character_modifier = { + modifier = wnight_clear_conscience_modifier + years = 10 + } + stress_impact = { + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = deceitful + } + } + } + + #confess YOUR secret + option = { + name = ep2_wedding.3010.c + trigger = { + any_secret = { + NOT = { is_known_by = scope:my_spouse } + } + } + if = { + limit = { NOT = { has_relation_lover = scope:my_spouse } } + progress_towards_lover_effect = { + CHARACTER = scope:my_spouse + REASON = lover_wnight_secret_shared + OPINION = 20 + } + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + if = { + limit = { + scope:my_spouse = { + NOT = { has_character_modifier = wnight_confider_modifier } + } + } + scope:my_spouse = { + add_character_modifier = { + modifier = wnight_confider_modifier + years = 10 + } + } + } + stress_impact = { + deceitful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + scope:activity = { + add_activity_log_entry = { + key = wedding_confession_joint_log + tags = { good } + score = 25 + character = root + target = scope:my_spouse + + # Effect + root = { + scope:secret_to_reveal = { reveal_to = root } + random_secret = { + limit = { NOT = { is_known_by = scope:my_spouse } } + reveal_to = scope:my_spouse + } + if = { + limit = { NOT = { has_relation_soulmate = scope:my_spouse } } + progress_towards_lover_effect = { + CHARACTER = scope:my_spouse + REASON = lover_wnight_secret_shared + OPINION = 20 + } + } + else = { + reverse_add_opinion = { + target = scope:my_spouse + modifier = grateful_opinion + opinion = 20 + } + } + if = { + limit = { + scope:my_spouse = { + NOT = { has_character_modifier = wnight_confider_modifier } + } + } + scope:my_spouse = { + add_character_modifier = { + modifier = wnight_confider_modifier + years = 10 + } + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + else = { + reverse_add_opinion = { + target = scope:my_spouse + modifier = grateful_opinion + opinion = 20 + } + } + } + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = paranoid + } + } + } + } +} + +# You find out that your spouse fancies the other gender + +scripted_effect ep2_wedding.3020.reveal_secret_effect = { + if = { + limit = { + scope:my_spouse = { + any_secret = { + type = secret_homosexual + NOT = { is_known_by = root } + } + } + } + scope:my_spouse = { + random_secret = { + type = secret_homosexual + limit = { + NOT = { is_known_by = root } + } + reveal_to = root + } + } + } +} + +ep2_wedding.3020 = { + type = activity_event + title = ep2_wedding.3020.t + desc = ep2_wedding.3020.desc + theme = wedding_night_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { NOT = { is_attracted_to_gender_of = scope:my_spouse } } + animation = disbelief + } + animation = stress + } + right_portrait = { + character = scope:my_spouse + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { #you are one of the spouses + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + OR = { #the other spouse doesn't fancy you + scope:activity.special_guest:spouse_1 = { + this != root + NOT = { is_attracted_to_gender_of = root } + } + scope:activity.special_guest:spouse_2 = { + this != root + NOT = { is_attracted_to_gender_of = root } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { + scope:activity.special_guest:spouse_1 = { this != root } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = my_spouse + } + } + else = { + scope:activity.special_guest:spouse_2 = { + save_scope_as = my_spouse + } + } + add_character_flag = { #doesn't make sense for you to have sexy times after this revelation + flag = busy_in_wnight_event + days = 90 + } + } + + #Well... not my problem + option = { + name = ep2_wedding.3020.a + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = patient + } + } + } + } + + #I get it - comfort them + option = { + name = ep2_wedding.3020.b + ep2_wedding.3020.reveal_secret_effect = yes + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:my_spouse } + } + set_relation_friend = { + reason = friend_wnight_homosexual + target = scope:my_spouse + } + } + if = { + limit = { + scope:my_spouse = { + NOT = { has_character_modifier = wnight_confider_modifier } + } + } + scope:my_spouse = { + add_character_modifier = { + modifier = wnight_confider_modifier + years = 10 + } + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:my_spouse + } + stress_impact = { + lustful = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = callous + } + } + } + } + + #You're also NOT attracted to them + option = { + name = ep2_wedding.3020.c + trigger = { + NOT = { is_attracted_to_gender_of = scope:my_spouse } + } + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:my_spouse } + } + set_relation_friend = { + reason = friend_wnight_homosexual_both + target = scope:my_spouse + } + } + if = { + limit = { + scope:my_spouse = { + NOT = { has_character_modifier = wnight_confider_modifier } + } + } + scope:my_spouse = { + add_character_modifier = { + modifier = wnight_confider_modifier + years = 10 + } + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:my_spouse + } + ep2_wedding.3020.reveal_secret_effect = yes + ai_chance = { + base = 100 + modifier = { + factor = 2 + NOT = { is_attracted_to_gender_of = scope:my_spouse } + } + } + } +} + +# Spouse gives you a cute memento to remember this night + +ep2_wedding.3030 = { + type = activity_event + title = ep2_wedding.3030.t + desc = ep2_wedding.3030.desc + theme = wedding_night_activity + center_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = seducer + has_trait = lustful + has_trait = rakish + } + } + animation = flirtation_left + } + animation = love + } + right_portrait = { + character = scope:my_spouse + animation = flirtation + } + artifact = { + target = scope:love_memento + position = lower_center_portrait + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { #you are one of the spouses + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + OR = { #the other spouse likes you in any way + scope:activity.special_guest:spouse_1 = { + this != root + OR = { + has_any_good_relationship_with_root_trigger = yes + opinion = { + target = root + value >= default_friend_opinion #15 + } + } + } + scope:activity.special_guest:spouse_2 = { + this != root + OR = { + has_any_good_relationship_with_root_trigger = yes + opinion = { + target = root + value >= default_friend_opinion #15 + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + OR = { + scope:activity.special_guest:spouse_1 = { + this != root + has_relation_lover = root + } + scope:activity.special_guest:spouse_2 = { + this != root + has_relation_lover = root + } + } + } + modifier = { + factor = 2 + OR = { + scope:activity.special_guest:spouse_1 = { + this != root + has_relation_soulmate = root + } + scope:activity.special_guest:spouse_2 = { + this != root + has_relation_soulmate = root + } + } + } + } + + immediate = { + save_scope_as = itsa_me_scope #used in the artifact description + if = { + limit = { + scope:activity.special_guest:spouse_1 = { this != root } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = my_spouse + } + } + else = { + scope:activity.special_guest:spouse_2 = { + save_scope_as = my_spouse + } + } + hidden_effect_new_object = { + generate_romantic_trinket_effect = { OWNER = scope:my_spouse } + if = { + # Checks required for error suppression + limit = { exists = scope:romantic_trinket } + scope:romantic_trinket = { + save_scope_as = love_memento + set_artifact_description = love_memento_desc + } + } + } + create_character_memory = { + type = wedding_night_trinket + participants = { + spouse_1 = root + spouse_2 = scope:my_spouse + } + } + if = { + limit = { + any_character_artifact = { + artifact_slot_type = miscellaneous + this != scope:love_memento + } + } + random_character_artifact = { + limit = { + artifact_slot_type = miscellaneous + this != scope:love_memento + } + save_scope_as = my_love_memento + } + } + add_character_flag = is_naked + scope:my_spouse = { + add_character_flag = is_naked + } + } + + #I shall cherish this + option = { + name = ep2_wedding.3030.a + #get a bonus to court schemes targetting them + custom_tooltip = ep2_wedding.3030.a.tt + set_variable = { + name = wnight_court_memento_var + value = scope:my_spouse + } + custom_tooltip = ep2_wedding.3030.artifact_tt + scope:love_memento = { + add_artifact_history = { + type = given + actor = scope:my_spouse + recipient = root + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 10 + } + } + } + if = { + limit = { + has_activity_intent = reduce_stress_intent + } + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + else = { + stress_impact = { + paranoid = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = paranoid + } + } + } + } + + #I shall cherish /you/ + option = { + name = ep2_wedding.3030.b + #get a bonus to seduce schemes targetting them + custom_tooltip = ep2_wedding.3030.b.tt + set_variable = { + name = wnight_seduce_memento_var + value = scope:my_spouse + } + custom_tooltip = ep2_wedding.3030.artifact_tt + scope:love_memento = { + add_artifact_history = { + type = given + actor = scope:my_spouse + recipient = root + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 10 + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = paranoid + } + } + } + } + + #I have something for you too! + option = { + name = ep2_wedding.3030.c + trigger = { + exists = scope:my_love_memento + } + scope:love_memento = { set_owner = root } + scope:my_love_memento = { set_owner = scope:my_spouse } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_very_good_fertility = scope:my_spouse + } + else_if = { + limit = { + NOT = { has_relation_lover = scope:my_spouse } + } + progress_towards_lover_effect = { + CHARACTER = scope:my_spouse + REASON = lover_wnight_gifts + OPINION = default_lover_opinion + } + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + lustful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = lustful + has_trait = paranoid + } + } + } + } + + #Reject it + option = { + name = ep2_wedding.3030.d + trigger = { + has_trait = paranoid + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:my_spouse + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -10 + } + } + } + stress_impact = { + base = major_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + after = { + remove_character_flag = is_naked + scope:my_spouse = { + remove_character_flag = is_naked + } + } +} + +# Your spouse and you are having a nice time when the bed catches fire + +ep2_wedding.3040 = { + type = activity_event + title = ep2_wedding.3040.t + desc = ep2_wedding.3040.desc + theme = wedding_night_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = brave + has_trait = reckless + } + } + animation = anger + } + animation = fear + } + right_portrait = { + character = scope:my_spouse + animation = shock + } + + cooldown = { years = 10 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { #you are one of the spouses + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + #This is to check if you've been cheap in general + OR = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_bad + } + } + scope:activity = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_bad + } + } + } + trigger_if = { + limit = { + root = scope:activity.special_guest:spouse_1 + } + #the other spouse likes you at least a tiny bit so you were having fun before the fire + scope:activity.special_guest:spouse_2 = { + OR = { + has_any_good_relationship_with_root_trigger = yes + opinion = { + target = root + value >= 0 + } + } + is_attracted_to_gender_of = root + } + # And you like them too + root = { + is_attracted_to_gender_of = scope:activity.special_guest:spouse_2 + } + } + trigger_else = { + #the other spouse likes you at least a tiny bit so you were having fun before the fire + scope:activity.special_guest:spouse_1 = { + OR = { + has_any_good_relationship_with_root_trigger = yes + opinion = { + target = root + value >= 0 + } + } + is_attracted_to_gender_of = root + } + # And you like them too + root = { + is_attracted_to_gender_of = scope:activity.special_guest:spouse_1 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + has_trait = reckless #you wouldn't pay attention to the candles + } + modifier = { + scope:activity.special_guest:spouse_1 = { + has_relation_lover = scope:activity.special_guest:spouse_2 + } + add = 1 + } + } + + immediate = { + if = { + limit = { + scope:activity.special_guest:spouse_1 = { this != root } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = my_spouse + } + } + else = { + scope:activity.special_guest:spouse_2 = { + save_scope_as = my_spouse + } + } + add_character_flag = is_naked + scope:my_spouse = { + add_character_flag = is_naked + } + } + + #Save them! + option = { + name = ep2_wedding.3040.a + duel = { + skill = prowess + value = average_skill_rating + 50 = { #you save them + desc = ep2_wedding.3040.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = ep2_wedding.3040.a.success + left_icon = root + right_icon = scope:my_spouse + } + } + 50 = { #you get injured + desc = ep2_wedding.3040.a.failure + send_interface_toast = { + title = ep2_wedding.3040.a.failure + left_icon = root + right_icon = scope:my_spouse + increase_wounds_no_death_effect = { REASON = fire } + } + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 5 + } + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = craven + } + } + } + } + + #Save yourself + option = { + name = ep2_wedding.3040.b + random_list = { + 50 = { #spouse saves themselves + desc = ep2_wedding.3040.b.success + show_chance = no + send_interface_toast = { + title = ep2_wedding.3040.b.success + left_icon = scope:my_spouse + } + } + 50 = { #spouse gets injured + desc = ep2_wedding.3040.b.failure + show_chance = no + send_interface_toast = { + title = ep2_wedding.3040.b.failure + left_icon = scope:my_spouse + scope:my_spouse = { + increase_wounds_no_death_effect = { REASON = fire } + } + } + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:my_spouse + } + else = { + scope:my_spouse = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = brave + } + } + } + } + + #MY BODY IS MY WEAPON + option = { + name = ep2_wedding.3040.c + trigger = { has_lifestyle = martial_lifestyle } + duel = { + skill = prowess + value = average_skill_rating + 70 = { #you save them + desc = ep2_wedding.3040.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = ep2_wedding.3040.c.success + left_icon = root + add_prowess_skill = 1 + } + } + 30 = { #you get injured + desc = ep2_wedding.3040.a.failure + send_interface_toast = { + title = ep2_wedding.3040.a.failure + left_icon = root + increase_wounds_no_death_effect = { REASON = fire } + add_prestige = minor_prestige_loss + } + } + } + if = { + limit = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value < 100 + } + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_medium_value + } + } + else = { + add_martial_lifestyle_xp = medium_lifestyle_xp + } + #no fertility gain because you're doing for yourself + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = brave + has_trait = reckless + } + } + modifier = { + factor = 1.5 + has_lifestyle = martial_lifestyle + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = callous + has_trait = sadistic + } + } + } + } + + #Are you trying to kill your spouse? + option = { + name = ep2_wedding.3040.d + flavor = ep2_wedding.3040.d.flavor + trigger = { + has_activity_intent = murder_attendee_intent + scope:my_spouse = { is_ai = yes } + intent_target = scope:my_spouse + } + custom_tooltip = available_because_intent_tt + random_list = { + 50 = { #spouse saves themselves + desc = ep2_wedding.3040.d.success + show_chance = no + send_interface_toast = { #but they know + title = ep2_wedding.3040.d.success + left_icon = scope:my_spouse + attempted_murder_opinion_effect = { + VICTIM = scope:my_spouse + MURDERER = root + } + add_secret = { + type = secret_murder_attempt + target = scope:my_spouse + } + } + } + 50 = { #spouse dies + desc = ep2_wedding.3040.d.failure + show_chance = no + send_interface_toast = { + title = ep2_wedding.3040.d.failure + left_icon = scope:my_spouse + custom_tooltip = ep2_wedding.wedding_intent.success.tt + unknown_murder_effect = { + VICTIM = scope:my_spouse + MURDERER = root + REASON = death_burned + } + set_variable = just_widowed_var + complete_activity_intent = yes + } + give_nickname = nick_the_just_widowed + } + } + } + after = { + remove_character_flag = is_naked + scope:my_spouse = { + remove_character_flag = is_naked + } + } +} + +# Non-spouse: Use the Wedding Night phase where almost no one is around to kill your target +# episode 1: CHANDELIER EXTRAVAGANZA + +ep2_wedding.3050 = { + type = activity_event + title = ep2_wedding.3050.t + desc = ep2_wedding.3050.desc + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:intent_victim + animation = drink_goblet + } + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + NOR = { #you are not one of the spouses + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + has_activity_intent = murder_attendee_intent #you're trying to kill someone + intent_target = { is_alive = yes } #they're not dead yet + intent_target = { #you're not trying to kill the spouses + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = callous + has_trait = deceitful + has_trait = sadistic + } + } + modifier = { #more likely for them to stay behind + factor = 1.5 + intent_target ?= { + OR = { + has_trait = drunkard + has_trait = gregarious + has_trait = lifestyle_reveler + } + } + } + } + + immediate = { + intent_target = { save_scope_as = intent_victim } + } + + #Kill them immediately + option = { + name = ep2_wedding.3050.a + duel = { + skill = prowess + value = average_skill_rating + 70 = { #you kill them + desc = ep2_wedding.3050.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep2_wedding.3050.a.success + left_icon = scope:intent_victim + custom_tooltip = ep2_wedding.wedding_intent.success.tt + unknown_murder_effect = { + VICTIM = scope:intent_victim + MURDERER = root + REASON = death_accident + } + } + complete_activity_intent = yes + } + 30 = { #they catch you + desc = ep2_wedding.3050.a.failure + send_interface_toast = { + title = ep2_wedding.3050.a.failure + left_icon = root + right_icon = scope:intent_victim + attempted_murder_opinion_effect = { + VICTIM = scope:intent_victim + MURDERER = root + } + add_secret = { + type = secret_murder_attempt + target = scope:intent_victim + } + random_secret = { + type = secret_murder_attempt + limit = { + secret_target = scope:intent_victim + } + expose_secret = scope:intent_victim + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + patient = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = patient + has_trait = compassionate + has_trait = deceitful + has_trait = calm + } + } + } + } + + #Use the chandelier + option = { + name = ep2_wedding.3050.b + duel = { + skill = intrigue + value = average_skill_rating + 40 = { #you kill them + desc = ep2_wedding.3050.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep2_wedding.3050.b.success + left_icon = scope:intent_victim + custom_tooltip = ep2_wedding.wedding_intent.success.tt + unknown_murder_effect = { + VICTIM = scope:intent_victim + MURDERER = root + REASON = death_accident + } + } + complete_activity_intent = yes + } + 60 = { #they suspect + desc = ep2_wedding.3050.b.failure + send_interface_toast = { + title = ep2_wedding.3050.b.failure + left_icon = root + right_icon = scope:intent_victim + scope:intent_victim = { + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -5 + } + } + add_secret = { + type = secret_murder_attempt + target = scope:intent_victim + } + } + } + } + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + craven = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = craven + has_trait = compassionate + has_trait = impatient + } + } + } + } + + #Not now, not now... + option = { + name = ep2_wedding.3050.c + custom_tooltip = ep2_wedding.3050.c.tt + set_variable = { + name = wnight_chandelier_murder_var + value = scope:intent_victim + } + stress_impact = { + wrathful = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = wrathful + has_trait = impatient + } + } + } + } +} + +# Either you or spouse doesn't want to take part in bedding ceremony + +scripted_trigger ep2_wedding_3200_is_shy_trigger = { + OR = { + has_trait = shy + has_trait = reclusive + has_trait = craven + has_trait = paranoid + } + NOT = { has_trait = gregarious } +} + +scripted_trigger ep2_wedding_bedding_ceremony_witness_trigger = { + is_adult = yes + NOR = { + this = root + this = scope:my_spouse + scope:bedding_witness_1 ?= this + scope:bedding_witness_2 ?= this + } + OR = { + scope:host.cp:councillor_court_chaplain ?= this + is_close_family_of = root + is_close_family_of = scope:my_spouse + has_relation_friend = root + has_relation_friend = scope:my_spouse + any_court_position_employer = { this = root } + any_court_position_employer = { this = scope:my_spouse } + } +} + +scripted_effect ep2_wedding_bedding_ceremony_witness_effect = { + hidden_effect = { + while = { + count = 3 + scope:activity = { + if = { + limit = { + any_attending_character = { ep2_wedding_bedding_ceremony_witness_trigger = yes } + } + random_attending_character = { + limit = { ep2_wedding_bedding_ceremony_witness_trigger = yes } + weight = { + base = 1 + modifier = { + scope:host.cp:councillor_court_chaplain ?= this + add = 1000 + } + modifier = { + has_trait = lifestyle_reveler + add = 25 + } + modifier = { + has_trait = gregarious + add = 25 + } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = scope:my_spouse } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = scope:my_spouse } + } + if = { + limit = { exists = scope:bedding_witness_2 } + save_scope_as = bedding_witness_3 + } + else_if = { + limit = { exists = scope:bedding_witness_1 } + save_scope_as = bedding_witness_2 + } + else = { save_scope_as = bedding_witness_1 } + add_to_list = bedding_witnesses + } + } + } + } + } +} + +ep2_wedding.3200 = { + type = activity_event + title = ep2_wedding.3200.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:shy_both ?= this } + desc = ep2_wedding.3200.both + } + triggered_desc = { + trigger = { scope:shy_spouse ?= this } + desc = ep2_wedding.3200.self + } + desc = ep2_wedding.3200.other + } + } + theme = wedding_night_activity + left_portrait = { + character = root + outfit_tags = { nightgown } + triggered_animation = { + trigger = { + OR = { + scope:shy_spouse ?= this + exists = scope:shy_both + } + } + animation = worry + } + animation = disapproval + } + right_portrait = { + character = scope:my_spouse + outfit_tags = { nightgown } + triggered_animation = { + trigger = { scope:shy_spouse ?= this } + animation = worry + } + triggered_animation = { + trigger = { exists = scope:shy_both } + animation = stress + } + animation = disapproval + } + lower_left_portrait = scope:bedding_witness_1 + lower_center_portrait = scope:bedding_witness_2 + lower_right_portrait = scope:bedding_witness_3 + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { #you are one of the spouses + scope:activity.special_guest:spouse_1 ?= this + scope:activity.special_guest:spouse_2 ?= this + } + OR = { + scope:activity.special_guest:spouse_1 ?= { + NOT = { has_trait = gregarious } + } + scope:activity.special_guest:spouse_2 ?= { + NOT = { has_trait = gregarious } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + scope:activity.special_guest:spouse_1 = { ep2_wedding_3200_is_shy_trigger = yes } + } + modifier = { + factor = 2 + scope:activity.special_guest:spouse_2 = { ep2_wedding_3200_is_shy_trigger = yes } + } + } + + immediate = { + # Identify root + if = { + limit = { root = scope:activity.special_guest:spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = my_spouse } + } + else = { + scope:activity.special_guest:spouse_1 = { save_scope_as = my_spouse } + } + # Determine shy beddiness + if = { + limit = { + ep2_wedding_3200_is_shy_trigger = yes + scope:my_spouse = { ep2_wedding_3200_is_shy_trigger = yes } + } + save_scope_as = shy_both + } + else_if = { + limit = { ep2_wedding_3200_is_shy_trigger = yes } + save_scope_as = shy_spouse + } + else = { + scope:my_spouse = { save_scope_as = shy_spouse } + } + # Save witnesses + ep2_wedding_bedding_ceremony_witness_effect = yes + } + + #Bar the doors + option = { + name = ep2_wedding.3200.a + flavor = ep2_wedding.3200.a.flavor + trigger = { + # Has door privileges + OR = { + location.county.holder = root + highest_held_title_tier > scope:my_spouse.highest_held_title_tier + } + } + scope:activity = { + add_activity_log_entry = { + key = wedding_barred_bedding_log + character = root + target = scope:my_spouse + + # Effect + root = { + add_character_modifier = { + modifier = wedding_barred_doors_modifier + years = 5 + } + if = { + limit = { scope:shy_spouse ?= this } + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_barred_bedding_doors_opinion + opinion = -20 + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 5 + } + } + else = { + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_barred_bedding_doors_opinion + opinion = 20 + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 75 + } + } + } + } + } + every_in_list = { + list = bedding_witnesses + custom = ep2_wedding_witnesses_tt + add_opinion = { + target = root + modifier = wedding_barred_bedding_doors_opinion + opinion = -10 + } + if = { + limit = { exists = scope:shy_both } + add_opinion = { + target = scope:my_spouse + modifier = wedding_barred_bedding_doors_opinion + opinion = -10 + } + } + } + stress_impact = { + shy = minor_stress_impact_loss + reclusive = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + craven = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + gregarious = miniscule_stress_impact_gain + trusting = miniscule_stress_impact_gain + brave = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = 1 + ai_sociability = -1 + } + } + } + + #Convince to bar + option = { + name = ep2_wedding.3200.c + trigger = { + OR = { + scope:shy_spouse ?= this + exists = scope:shy_both + } + NOR = { + location.county.holder = root + highest_held_title_tier > scope:my_spouse.highest_held_title_tier + } + } + duel = { + skill = diplomacy + target = scope:my_spouse + 40 = { #they accept + desc = ep2_wedding.3200.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + factor = 2 + exists = scope:shy_both + } + send_interface_toast = { + title = ep2_wedding.3200.c.success + left_icon = scope:my_spouse + scope:activity = { + add_activity_log_entry = { + key = wedding_barred_bedding_log + character = root + target = scope:my_spouse + + # Effect + root = { + add_character_modifier = { + modifier = wedding_barred_doors_modifier + years = 5 + } + if = { + limit = { scope:shy_spouse ?= this } + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_barred_bedding_doors_opinion + opinion = 10 + } + } + else = { + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_barred_bedding_doors_opinion + opinion = 20 + } + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 25 + } + } + } + } + every_in_list = { + list = bedding_witnesses + custom = ep2_wedding_witnesses_tt + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_barred_bedding_doors_opinion + opinion = -10 + } + if = { + limit = { exists = scope:shy_both } + add_opinion = { + target = scope:my_spouse + modifier = wedding_barred_bedding_doors_opinion + opinion = -10 + } + } + } + stress_impact = { + shy = minor_stress_impact_loss + reclusive = medium_stress_impact_loss + paranoid = minor_stress_impact_loss + craven = minor_stress_impact_loss + } + } + } + 60 = { #they refuse + desc = ep2_wedding.3200.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = ep2_wedding.3200.c.failure + left_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_forced_bedding_ceremony_opinion + opinion = -10 + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 5 + } + stress_impact = { + shy = miniscule_stress_impact_gain + reclusive = minor_stress_impact_gain + paranoid = miniscule_stress_impact_gain + craven = miniscule_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 0.5 + ai_sociability = -1 + } + } + } + + #Convince to take part + option = { + name = ep2_wedding.3200.d + trigger = { + NOT = { scope:shy_spouse ?= root } + } + duel = { + skill = diplomacy + target = scope:my_spouse + 40 = { # + desc = ep2_wedding.3200.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep2_wedding.3200.d.success + left_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_caved_to_bedding_opinion + opinion = 10 + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 75 + } + } + } + 60 = { # + desc = ep2_wedding.3200.d.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = ep2_wedding.3200.d.failure + left_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_forced_bedding_ceremony_opinion + opinion = -10 + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 5 + } + } + } + } + stress_impact = { + stubborn = miniscule_stress_impact_gain + compassionate = minor_stress_impact_loss + callous = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = 0.5 + ai_sociability = 1 + } + } + } + + #Force to take part + option = { + name = ep2_wedding.3200.e + trigger = { scope:shy_spouse ?= scope:my_spouse } + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_forced_bedding_ceremony_opinion + opinion = -10 + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 20 + } + stress_impact = { + gregarious = medium_stress_impact_loss + zealous = medium_stress_impact_loss + diligent = medium_stress_impact_loss + callous = minor_stress_impact_loss + fickle = miniscule_stress_impact_gain + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_boldness = 0.5 + ai_sociability = 1 + } + } + } + + #Do your duty + option = { + name = ep2_wedding.3200.b + trigger = { scope:shy_spouse ?= this } + if = { + limit = { + NOT = { exists = scope:shy_both } + } + reverse_add_opinion = { + target = scope:my_spouse + modifier = wedding_caved_to_bedding_opinion + opinion = 20 + } + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 20 + } + stress_impact = { + shy = minor_stress_impact_gain + reclusive = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + craven = minor_stress_impact_gain + gregarious = medium_stress_impact_loss + zealous = medium_stress_impact_loss + diligent = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_sociability = 0.5 + } + } + } +} + +scripted_trigger wedding_3300_flavor_character_trigger = { + is_participant_in_activity = scope:activity + NOR = { + this = scope:my_spouse + this = root + } +} + +ep2_wedding.3300 = { + type = activity_event + title = ep2_wedding.3300.t + desc = { + desc = ep2_wedding.3300.opening + # Ceremony flavor 1 + first_valid = { + triggered_desc = { + trigger = { + scope:officiant ?= { is_clergy = yes } + } + desc = ep2_wedding.3300.blessing + } + triggered_desc = { + trigger = { exists = scope:officiant } + desc = ep2_wedding.3300.decorate + } + desc = ep2_wedding.3300.flowers + } + # Ceremony flavor 2 + first_valid = { + triggered_desc = { + trigger = { + drinks_alcohol_trigger = yes + scope:my_spouse = { drinks_alcohol_trigger = yes } + } + desc = ep2_wedding.3300.wine + } + desc = ep2_wedding.3300.anointing + } + # Spouse flavor + first_valid = { + triggered_desc = { + trigger = { has_relation_lover = scope:my_spouse } + desc = ep2_wedding.3300.lover + } + triggered_desc = { + trigger = { has_relation_friend = scope:my_spouse } + desc = ep2_wedding.3300.friend + } + triggered_desc = { + trigger = { + OR = { + has_relation_rival = scope:my_spouse + reverse_opinion = { target = scope:my_spouse value < -50 } + } + } + desc = ep2_wedding.3300.hatred + } + triggered_desc = { + trigger = { + OR = { + has_relation_rival = scope:my_spouse + reverse_opinion = { target = scope:my_spouse value < -10 } + } + } + desc = ep2_wedding.3300.unfriendly + } + triggered_desc = { + trigger = { + OR = { + has_relation_rival = scope:my_spouse + reverse_opinion = { target = scope:my_spouse value >= 25 } + } + } + desc = ep2_wedding.3300.friendly + } + desc = ep2_wedding.3300.polite + } + # Party flavor + random_valid = { + triggered_desc = { + trigger = { scope:jester.employer ?= root } + desc = ep2_wedding.3300.jester_self + } + triggered_desc = { + trigger = { + exists = scope:jester + scope:jester.employer != root + } + desc = ep2_wedding.3300.jester + } + triggered_desc = { + trigger = { + scope:friend ?= { has_relation_friend = root } + } + desc = ep2_wedding.3300.other_friend_self + } + triggered_desc = { + trigger = { + exists = scope:friend + NOT = { + scope:friend = { has_relation_friend = root } + } + } + desc = ep2_wedding.3300.other_friend + } + triggered_desc = { + trigger = { + scope:other_spouse ?= { is_spouse_of = root } + } + desc = ep2_wedding.3300.other_spouse_self + } + triggered_desc = { + trigger = { + exists = scope:other_spouse + NOT = { + scope:other_spouse ?= { is_spouse_of = root } + } + } + desc = ep2_wedding.3300.other_spouse + } + triggered_desc = { + trigger = { + scope:family ?= { is_close_family_of = root } + } + desc = ep2_wedding.3300.family_self + } + triggered_desc = { + trigger = { + scope:family ?= { is_close_family_of = scope:my_spouse } + } + desc = ep2_wedding.3300.family + } + desc = ep2_wedding.3300.fallback + } + } + theme = wedding_night_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_relation_rival = scope:my_spouse + opinion = { target = scope:my_spouse value < -50 } + } + } + animation = dismissal + } + triggered_animation = { + trigger = { + OR = { + has_relation_lover = scope:my_spouse + opinion = { target = scope:my_spouse value >= 25 } + } + } + animation = flirtation_left + } + animation = idle + } + right_portrait = { + character = scope:my_spouse + triggered_animation = { + trigger = { + OR = { + has_relation_rival = root + opinion = { target = root value < -10 } + } + } + animation = disapproval + } + triggered_animation = { + trigger = { + OR = { + has_relation_lover = root + opinion = { target = root value >= 25 } + } + } + animation = flirtation + } + animation = idle + } + lower_left_portrait = scope:bedding_witness_1 + lower_center_portrait = scope:bedding_witness_2 + lower_right_portrait = scope:bedding_witness_3 + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + OR = { #you are one of the spouses + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + + immediate = { + # Identify root + if = { + limit = { root = scope:activity.special_guest:spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = my_spouse } + } + else = { + scope:activity.special_guest:spouse_1 = { save_scope_as = my_spouse } + } + # 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 = { + employs_court_position = court_jester_court_position + court_position:court_jester_court_position ?= { wedding_3300_flavor_character_trigger = yes } + } + court_position:court_jester_court_position = { save_scope_as = jester } + } + else_if = { + limit = { + scope:my_spouse = { + employs_court_position = court_jester_court_position + court_position:court_jester_court_position ?= { wedding_3300_flavor_character_trigger = yes } + } + } + scope:my_spouse.court_position:court_jester_court_position = { save_scope_as = jester } + } + else_if = { + limit = { + scope:host = { + employs_court_position = court_jester_court_position + court_position:court_jester_court_position ?= { wedding_3300_flavor_character_trigger = yes } + } + } + scope:host.court_position:court_jester_court_position = { save_scope_as = jester } + } + # Save friend + if = { + limit = { + any_relation = { + type = friend + wedding_3300_flavor_character_trigger = yes + } + } + random_relation = { + type = friend + limit = { wedding_3300_flavor_character_trigger = yes } + weight = { + base = 1 + modifier = { add = ai_sociability } + modifier = { add = ai_boldness } + } + save_scope_as = other_friend + } + } + else_if = { + limit = { + scope:my_spouse = { + any_relation = { + type = friend + wedding_3300_flavor_character_trigger = yes + } + } + } + scope:my_spouse = { + random_relation = { + type = friend + limit = { wedding_3300_flavor_character_trigger = yes } + weight = { + base = 1 + modifier = { add = ai_sociability } + modifier = { add = ai_boldness } + } + save_scope_as = other_friend + } + } + } + # Save other spouse + if = { + limit = { + any_spouse = { wedding_3300_flavor_character_trigger = yes } + } + random_spouse = { + limit = { wedding_3300_flavor_character_trigger = yes } + weight = { + base = 1 + modifier = { add = ai_sociability } + modifier = { add = ai_boldness } + } + save_scope_as = other_spouse + } + } + else_if = { + limit = { + scope:my_spouse = { + any_spouse = { wedding_3300_flavor_character_trigger = yes } + } + } + scope:my_spouse = { + random_spouse = { + limit = { wedding_3300_flavor_character_trigger = yes } + weight = { + base = 1 + modifier = { add = ai_sociability } + modifier = { add = ai_boldness } + } + save_scope_as = other_spouse + } + } + } + # Save family + random_list = { + 10 = { + trigger = { + any_in_list = { + list = bedding_witnesses + is_close_family_of = root + } + } + random_in_list = { + list = bedding_witnesses + limit = { is_close_family_of = root } + weight = { + base = 1 + modifier = { add = ai_sociability } + modifier = { add = ai_boldness } + } + save_scope_as = family + } + } + 10 = { + trigger = { + any_in_list = { + list = bedding_witnesses + is_close_family_of = scope:my_spouse + } + } + random_in_list = { + list = bedding_witnesses + limit = { is_close_family_of = scope:my_spouse } + weight = { + base = 1 + modifier = { add = ai_sociability } + modifier = { add = ai_boldness } + } + save_scope_as = family + } + } + } + # Save scopes for portraits + if = { + limit = { + exists = scope:jester + scope:jester != scope:bedding_witness_1 + } + scope:jester = { save_scope_as = bedding_witness_1 } + } + else_if = { + limit = { + exists = scope:other_friend + scope:other_friend != scope:bedding_witness_1 + } + scope:other_friend = { save_scope_as = bedding_witness_1 } + } + else_if = { + limit = { + exists = scope:other_spouse + scope:other_spouse != scope:bedding_witness_1 + } + scope:other_spouse = { save_scope_as = bedding_witness_1 } + } + else_if = { + limit = { + exists = scope:family + scope:family != scope:bedding_witness_1 + } + scope:family = { save_scope_as = bedding_witness_1 } + } + add_character_flag = is_naked + scope:my_spouse = { + add_character_flag = is_naked + } + } + + #Hurry up! + option = { + name = ep2_wedding.3300.a + random_list = { + 1 = { + desc = ep2_wedding.3300.a.success + opinion_modifier = { + who = scope:my_spouse + opinion_target = root + multiplier = 1 + } + modifier = { add = attraction } + modifier = { + scope:my_spouse = { has_trait = trusting } + factor = 1.5 + } + modifier = { + scope:my_spouse = { has_trait = humble } + factor = 1.5 + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3300.a.success + left_icon = root + right_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = feast_had_good_time_together_opinion + opinion = 10 + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 75 + } + } + } + 1 = { + desc = ep2_wedding.3300.a.failure + opinion_modifier = { + who = scope:my_spouse + opinion_target = root + multiplier = -1 + } + modifier = { + scope:my_spouse = { has_trait = paranoid } + factor = 1.5 + } + modifier = { + scope:my_spouse = { has_trait = arrogant } + factor = 1.5 + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3300.a.failure + left_icon = root + right_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = disgusted_opinion + opinion = -10 + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:my_spouse + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 5 + } + } + } + } + stress_impact = { + impatient = minor_stress_impact_loss + rakish = minor_stress_impact_loss + lustful = minor_stress_impact_loss + chaste = miniscule_stress_impact_gain + humble = miniscule_stress_impact_gain + craven = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:my_spouse + multiplier = 1 + } + ai_value_modifier = { + ai_boldness = 1 + ai_sociability = 1 + ai_compassion = 0.5 + } + } + } + + #Tired + option = { + name = ep2_wedding.3300.b + random_list = { + 1 = { + desc = ep2_wedding.3300.b.success + opinion_modifier = { + who = scope:my_spouse + opinion_target = root + multiplier = 0.5 + } + modifier = { + scope:my_spouse = { has_trait = compassionate } + factor = 1.5 + } + modifier = { + scope:my_spouse = { has_trait = lustful } + factor = 1.5 + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3300.b.success + left_icon = root + right_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = insulted_opinion + opinion = -10 + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:my_spouse + } + } + } + 1 = { + desc = ep2_wedding.3300.b.failure + opinion_modifier = { + who = scope:my_spouse + opinion_target = root + multiplier = -0.5 + } + modifier = { + scope:my_spouse = { has_trait = chaste } + factor = 1.5 + } + modifier = { + scope:my_spouse = { has_trait = callous } + factor = 1.5 + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3300.b.failure + left_icon = root + right_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = relieved_opinion + opinion = 10 + } + } + } + } + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = miniscule_stress_impact_gain + lustful = miniscule_stress_impact_gain + rakish = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:my_spouse + multiplier = -1 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -1 + ai_sociability = -1 + } + } + } + + #Need more wine + option = { + name = ep2_wedding.3300.c + trigger = { drinks_alcohol_trigger = yes } + random_list = { + 1 = { + opinion_modifier = { + who = scope:my_spouse + opinion_target = root + multiplier = 0.25 + } + modifier = { + scope:my_spouse = { has_trait = gluttonous } + factor = 1.25 + } + modifier = { + scope:my_spouse = { has_trait = shy } + factor = 1.5 + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3300.c.success + left_icon = root + right_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = relieved_opinion + opinion = 10 + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 75 + } + } + } + 1 = { + opinion_modifier = { + who = scope:my_spouse + opinion_target = root + multiplier = -0.25 + } + modifier = { + scope:my_spouse = { drinks_alcohol_trigger = no } + factor = 2 + } + modifier = { + scope:my_spouse = { has_trait = temperate } + factor = 1.5 + } + modifier = { + scope:my_spouse = { has_trait = gregarious } + factor = 1.5 + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3300.c.failure + left_icon = root + right_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = insulted_opinion + opinion = -10 + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:my_spouse + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 5 + } + } + } + } + stress_impact = { + drunkard = minor_stress_impact_loss + honest = minor_stress_impact_loss + temperate = miniscule_stress_impact_gain + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:my_spouse + multiplier = -0.5 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + ai_sociability = 0.5 + } + } + } + + #I'll do it, but I won't like it + option = { + name = ep2_wedding.3300.d + trigger = { + OR = { + has_relation_rival = scope:my_spouse + opinion = { + target = scope:my_spouse + value < -10 + } + } + } + random_list = { + 1 = { + desc = ep2_wedding.3300.d.success + opinion_modifier = { + who = scope:my_spouse + opinion_target = root + multiplier = 0.5 + } + modifier = { add = attraction } + modifier = { add = scope:my_spouse.attraction } + modifier = { + scope:my_spouse = { has_trait = lustful } + factor = 1.5 + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3300.d.success + left_icon = root + right_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = feast_had_good_time_together_opinion + opinion = 10 + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:my_spouse + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 75 + } + } + } + 1 = { + desc = ep2_wedding.3300.d.failure + opinion_modifier = { + who = scope:my_spouse + opinion_target = root + multiplier = -0.5 + } + modifier = { + scope:my_spouse = { has_trait = shy } + factor = 1.5 + } + modifier = { + scope:my_spouse = { has_trait = chaste } + factor = 1.5 + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3300.d.failure + left_icon = root + right_icon = scope:my_spouse + reverse_add_opinion = { + target = scope:my_spouse + modifier = seduce_bad_time_opinion + opinion = -10 + } + if = { + limit = { + scope:my_spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_bad_fertility = scope:my_spouse + } + had_sex_with_effect = { + CHARACTER = scope:my_spouse + PREGNANCY_CHANCE = 5 + } + } + } + } + stress_impact = { + ambitious = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + fickle = miniscule_stress_impact_gain + arrogant = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:my_spouse + multiplier = 0.5 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.5 + ai_sociability = 0.5 + } + } + } + after = { + remove_character_flag = is_naked + scope:my_spouse = { + remove_character_flag = is_naked + } + } +} + +scripted_trigger wedding_3400_shared_trigger = { + is_adult = yes + is_participant_in_activity = scope:activity + NOR = { + this = root + has_any_scripted_relation = root + scope:activity.special_guest:spouse_1 ?= this + scope:activity.special_guest:spouse_2 ?= this + is_child_of = root + is_nibling_of = root + is_uncle_or_aunt_of = root + is_sibling_of = root + is_parent_of = root + is_grandparent_of = root + is_great_grandparent_of = root + is_grandchild_of = root + is_great_grandchild_of = root + } +} + +scripted_trigger wedding_3400_suitor_trigger = { + age < 50 + is_participant_in_activity = scope:activity + is_attracted_to_gender_of = $SUITOR$ + age >= $SUITOR$.age_minus_25 + age < $SUITOR$.age_plus_25 + OR = { + is_married = no + allowed_more_spouses = yes + trigger_if = { + limit = { is_female = yes } + 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 } + root.faith = { has_doctrine = doctrine_adultery_men_accepted } + $SUITOR$.faith = { has_doctrine = doctrine_adultery_men_accepted } + } + } +} + +scripted_effect wedding_3400_save_relative_effect = { + save_scope_as = other_family_spouse + random_close_or_extended_family_member = { + limit = { + is_close_family_of = scope:other_family_spouse + wedding_3400_shared_trigger = yes + save_temporary_scope_as = other_relative_temp + } + alternative_limit = { + wedding_3400_shared_trigger = yes + save_temporary_scope_as = other_relative_temp + } + weight = { + base = 1 + wedding_similiar_family_member_modifier = yes + modifier = { + add = 50 + scope:my_family_spouse = { + any_close_family_member = { + wedding_3400_suitor_trigger = { SUITOR = scope:other_relative_temp } + save_temporary_scope_as = family_suitor_temp + } + } + wedding_3400_suitor_trigger = { SUITOR = scope:family_suitor_temp } + } + } + save_scope_as = other_family_relative + } +} + +scripted_effect wedding_3400_knowledge_effect = { + random_list = { + 0 = { + trigger = { diplomacy < $OTHER$.diplomacy } + modifier = { add = $OTHER$.diplomacy } + add_diplomacy_skill = 1 + } + 0 = { + trigger = { martial < $OTHER$.martial } + modifier = { add = $OTHER$.martial } + add_martial_skill = 1 + } + 0 = { + trigger = { stewardship < $OTHER$.stewardship } + modifier = { add = $OTHER$.stewardship } + add_stewardship_skill = 1 + } + 0 = { + trigger = { intrigue < $OTHER$.intrigue } + modifier = { add = $OTHER$.intrigue } + add_intrigue_skill = 1 + } + 0 = { + trigger = { learning < $OTHER$.learning } + modifier = { add = $OTHER$.learning } + add_learning_skill = 1 + } + } +} + +ep2_wedding.3400 = { + type = activity_event + title = ep2_wedding.3400.t + desc = { + desc = ep2_wedding.3400.opening + first_valid = { + triggered_desc = { + trigger = { drinks_alcohol_trigger = yes } + desc = ep2_wedding.3400.drink_self + } + triggered_desc = { + trigger = { can_be_hashishiyah = yes } + desc = ep2_wedding.3400.hashish_self + } + desc = ep2_wedding.3400.fallback_self + } + first_valid = { + triggered_desc = { + trigger = { + scope:other_family_relative = { drinks_alcohol_trigger = yes } + } + desc = ep2_wedding.3400.drink + } + triggered_desc = { + trigger = { + scope:other_family_relative = { can_be_hashishiyah = yes } + } + desc = ep2_wedding.3400.hashish + } + desc = ep2_wedding.3400.fallback + } + random_valid = { + triggered_desc = { + trigger = { + scope:other_family_relative = { + drinks_alcohol_trigger = yes + NOR = { + is_child_of = scope:my_family_spouse + is_sibling_of = scope:my_family_spouse + is_parent_of = scope:my_family_spouse + is_grandparent_of = scope:my_family_spouse + } + } + } + desc = ep2_wedding.3400.drink_family + } + triggered_desc = { + trigger = { + scope:other_family_relative = { + drinks_alcohol_trigger = no + NOR = { + is_child_of = scope:my_family_spouse + is_sibling_of = scope:my_family_spouse + is_parent_of = scope:my_family_spouse + is_grandparent_of = scope:my_family_spouse + } + } + } + desc = ep2_wedding.3400.family + } + triggered_desc = { + trigger = { + exists = house + exists = scope:other_family_relative.house + house != scope:other_family_relative.house + scope:other_family_relative = { drinks_alcohol_trigger = yes } + } + desc = ep2_wedding.3400.drink_house + } + triggered_desc = { + trigger = { + exists = house + exists = scope:other_family_relative.house + house != scope:other_family_relative.house + scope:other_family_relative = { drinks_alcohol_trigger = no } + } + desc = ep2_wedding.3400.house + } + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + drinks_alcohol_trigger = yes + NOT = { has_trait = temperate } + } + animation = drink_goblet + } + animation = happiness + } + right_portrait = { + character = scope:other_family_relative + triggered_animation = { + trigger = { + drinks_alcohol_trigger = yes + NOT = { has_trait = temperate } + } + animation = toast_goblet + } + animation = laugh + } + lower_right_portrait = scope:activity.special_guest:spouse_1 + lower_center_portrait = scope:my_family_suitor + lower_left_portrait = scope:activity.special_guest:spouse_2 + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + is_adult = yes + # Spouse 1 and 2 are not root + NOR = { + scope:activity.special_guest:spouse_1 = root + scope:activity.special_guest:spouse_2 = root + } + # Spouse 1 is related to root and someone related to Spouse 2 is kicking around + trigger_if = { + limit = { is_close_or_extended_family_of = scope:activity.special_guest:spouse_1 } + scope:activity.special_guest:spouse_2 = { + any_close_or_extended_family_member = { wedding_3400_shared_trigger = yes } + } + } + # Spouse 2 is related to root and someone related to Spouse 1 is kicking around + trigger_else_if = { + limit = { is_close_or_extended_family_of = scope:activity.special_guest:spouse_2 } + scope:activity.special_guest:spouse_1 = { + any_close_or_extended_family_member = { wedding_3400_shared_trigger = yes } + } + } + # No dice + trigger_else = { always = no } + } + + immediate = { + # Save someone related to Spouse 2 + save_scope_as = my_family_relative + if = { + limit = { is_close_or_extended_family_of = scope:activity.special_guest:spouse_1 } + scope:activity.special_guest:spouse_1 = { save_scope_as = my_family_spouse } + scope:activity.special_guest:spouse_2 = { wedding_3400_save_relative_effect = yes } + } + # Save someone related to Spouse 1 + else = { + scope:activity.special_guest:spouse_2 = { save_scope_as = my_family_spouse } + scope:activity.special_guest:spouse_1 = { wedding_3400_save_relative_effect = yes } + } + # Save suitor if relevant + if = { + limit = { + any_close_family_member = { + wedding_3400_suitor_trigger = { SUITOR = scope:other_family_relative } + save_temporary_scope_as = family_suitor_temp + } + scope:other_family_relative = { + wedding_3400_suitor_trigger = { SUITOR = scope:family_suitor_temp } + } + } + random_close_family_member = { + limit = { + wedding_3400_suitor_trigger = { SUITOR = scope:other_family_relative } + save_temporary_scope_as = family_suitor_temp + scope:other_family_relative = { + wedding_3400_suitor_trigger = { SUITOR = scope:family_suitor_temp } + } + } + weight = { + base = 1 + modifier = { + add = 50 + age >= scope:other_family_relative.age_minus_5 + age < scope:other_family_relative.age_plus_5 + } + modifier = { + add = 25 + age >= scope:other_family_relative.age_minus_10 + age < scope:other_family_relative.age_plus_10 + } + modifier = { add = attraction } + } + save_scope_as = my_family_suitor + } + } + } + + #Oh lemme bore you + option = { + name = ep2_wedding.3400.a + send_interface_toast = { + title = ep2_wedding.3400.tt + left_icon = root + right_icon = scope:other_family_relative + wedding_3400_knowledge_effect = { OTHER = scope:other_family_relative } + scope:other_family_relative = { + wedding_3400_knowledge_effect = { OTHER = root } + } + } + stress_impact = { + ambitious = minor_stress_impact_loss + diligent = minor_stress_impact_loss + content = miniscule_stress_impact_gain + lazy = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + #Family matchmaker + option = { + name = ep2_wedding.3400.b + trigger = { exists = scope:my_family_suitor } + random_list = { + 10 = { + desc = ep2_wedding.3400.b.success + opinion_modifier = { + who = scope:my_family_suitor + opinion_target = scope:other_family_relative + multiplier = 0.5 + } + send_interface_toast = { + title = ep2_wedding.3400.b.tt + left_icon = scope:other_family_relative + right_icon = scope:my_family_suitor + scope:other_family_relative = { + progress_towards_lover_effect = { + CHARACTER = scope:my_family_suitor + REASON = lover_wedding_relation_suitor + OPINION = default_lover_opinion + } + } + } + } + 10 = { + desc = ep2_wedding.3400.b.failure + opinion_modifier = { + who = scope:my_family_suitor + opinion_target = scope:other_family_relative + multiplier = -0.5 + } + send_interface_toast = { + title = ep2_wedding.3400.b.failure + left_icon = scope:other_family_relative + right_icon = scope:my_family_suitor + } + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + trusting = minor_stress_impact_loss + callous = miniscule_stress_impact_gain + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:my_family_suitor + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:other_family_relative + multiplier = 0.5 + } + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #More wine! + option = { + name = { + trigger = { drinks_alcohol_trigger = yes } + text = ep2_wedding.3400.c.drink + } + name = { + trigger = { drinks_alcohol_trigger = no } + text = ep2_wedding.3400.c.hashish + } + trigger = { + OR = { + drinks_alcohol_trigger = yes + can_be_hashishiyah = yes + } + } + add_prestige = medium_prestige_gain + if = { + limit = { has_trait = lifestyle_reveler } + add_trait_xp = { + trait = lifestyle_reveler + value = medium_trait_xp + } + } + else = { add_trait = lifestyle_reveler } + if = { + limit = { drinks_alcohol_trigger = yes } + if = { + limit = { + NOT = { has_trait = drunkard } + } + random = { + chance = 1 + add_trait = drunkard + } + stress_impact = { + base = minor_stress_impact_loss + drunkard = minor_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + lazy = minor_stress_impact_loss + temperate = miniscule_stress_impact_gain + diligent = miniscule_stress_impact_gain + } + } + + } + else_if = { + limit = { can_be_hashishiyah = yes } + random = { + chance = 1 + add_trait = hashishiyah + } + stress_impact = { + base = minor_stress_impact_loss + hashishiyah = minor_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + lazy = minor_stress_impact_loss + temperate = miniscule_stress_impact_gain + diligent = miniscule_stress_impact_gain + } + } + ai_chance = { + base = 50 + modifier = { + has_trait = drunkard + add = 50 + } + modifier = { + has_trait = hashishiyah + add = 50 + } + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.5 + } + } + } + + #Befriend + option = { + name = ep2_wedding.3400.d + trigger = { + OR = { + NOT = { exists = scope:my_family_suitor } + NOT = { is_attracted_to_gender_of = scope:other_family_relative } + } + } + progress_towards_friend_effect = { + REASON = friend_wedding_relation_bond + CHARACTER = scope:other_family_relative + OPINION = default_friend_opinion + } + stress_impact = { + gregarious = minor_stress_impact_loss + humble = minor_stress_impact_loss + shy = miniscule_stress_impact_gain + arrogant = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:other_family_relative + multiplier = 1 + } + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + num_of_relation_friend >= 2 + factor = 0 + } + } + } + + #Woo + option = { + name = ep2_wedding.3400.e + trigger = { + is_attracted_to_gender_of = scope:other_family_relative + NOT = { has_trait = celibate } + } + duel = { + skill = intrigue + value = medium_skill_rating + 10 = { + desc = ep2_wedding.3400.e.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = 5 + has_trait = seducer + } + modifier = { add = attraction } + modifier = { + add = 50 + scope:other_family_relative = { + would_attempt_to_seduce_trigger = { CHARACTER = root } + } + } + send_interface_toast = { + title = ep2_wedding.3400.e.success + progress_towards_lover_effect = { + REASON = lover_wedding_relation_bond + CHARACTER = scope:other_family_relative + OPINION = default_lover_opinion + } + if = { + limit = { + might_cheat_on_every_partner_trigger = yes + scope:other_family_relative = { might_cheat_on_every_partner_trigger = yes } + } + had_sex_with_effect = { + CHARACTER = scope:other_family_relative + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + min = 5 + } + 10 = { + desc = ep2_wedding.3400.e.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 50 + NOT = { + scope:other_family_relative = { + would_attempt_to_seduce_trigger = { CHARACTER = root } + } + } + } + min = 5 + send_interface_toast = { + title = ep2_wedding.3400.e.failure + reverse_add_opinion = { + target = scope:other_family_relative + modifier = disgusted_opinion + opinion = -10 + } + } + } + } + stress_impact = { + lustful = minor_stress_impact_loss + rakish = minor_stress_impact_loss + chaste = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:other_family_relative + multiplier = 1 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + } + modifier = { + num_of_relation_lover >= 2 + factor = 0 + } + modifier = { + NOT = { + would_attempt_to_seduce_trigger = { CHARACTER = scope:other_family_relative } + } + factor = 0 + } + } + } +} + +ep2_wedding.3410 = { + type = activity_event + title = ep2_wedding.3410.t + desc = { + desc = ep2_wedding.3410.opening + first_valid = { + triggered_desc = { # Double trouble + trigger = { exists = scope:double_jealousy } + desc = ep2_wedding.3410.double + } + triggered_desc = { # Primary spouse + trigger = { + OR = { + has_relation_lover = scope:jealousy_focus + any_secret = { + type = secret_lover + secret_target = scope:jealousy_focus + } + } + } + desc = ep2_wedding.3410.lover + } + triggered_desc = { # Primary spouse + trigger = { primary_spouse ?= scope:jealousy_focus } + desc = ep2_wedding.3410.primary + } + desc = ep2_wedding.3410.secondary + } + first_valid = { + triggered_desc = { # Double trouble + trigger = { exists = scope:double_jealousy } + desc = ep2_wedding.3410.double_opinion + } + triggered_desc = { # Primary spouse + trigger = { + reverse_opinion = { + target = scope:jealousy_focus + value >= 25 + } + } + desc = ep2_wedding.3410.positive_opinion + } + triggered_desc = { # Primary spouse + trigger = { + reverse_opinion = { + target = scope:jealousy_focus + value <= 0 + } + } + desc = ep2_wedding.3410.negative_opinion + } + desc = ep2_wedding.3410.indifferent_opinion + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + exists = scope:double_jealousy + AND = { + NOT = { exists = scope:double_jealousy } + reverse_opinion = { + target = scope:jealousy_focus + value > 0 + } + } + } + } + animation = stress + } + animation = war_over_win + } + lower_right_portrait = scope:jealousy_focus + lower_left_portrait = scope:jealousy_usurper + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + is_adult = yes + # Spouse 1 and 2 are not root + NOR = { + scope:activity.special_guest:spouse_1 = root + scope:activity.special_guest:spouse_2 = root + } + # Has an intimate relationship with a spouse + OR = { + any_secret = { + type = secret_lover + secret_target = scope:activity.special_guest:spouse_1 + } + any_secret = { + type = secret_lover + secret_target = scope:activity.special_guest:spouse_2 + } + has_relation_lover = scope:activity.special_guest:spouse_1 + has_relation_lover = scope:activity.special_guest:spouse_2 + is_spouse_of = scope:activity.special_guest:spouse_1 + is_spouse_of = scope:activity.special_guest:spouse_2 + } + } + + immediate = { + # Check for double + if = { + limit = { + OR = { + any_secret = { + type = secret_lover + secret_target = scope:activity.special_guest:spouse_1 + } + has_relation_lover = scope:activity.special_guest:spouse_1 + is_spouse_of = scope:activity.special_guest:spouse_1 + } + OR = { + any_secret = { + type = secret_lover + secret_target = scope:activity.special_guest:spouse_2 + } + has_relation_lover = scope:activity.special_guest:spouse_2 + is_spouse_of = scope:activity.special_guest:spouse_2 + } + } + save_scope_as = double_jealousy + } + # Save jealous focus, or preferred + hidden_effect = { + random_list = { + 1 = { + trigger = { + OR = { + any_secret = { + type = secret_lover + secret_target = scope:activity.special_guest:spouse_1 + } + has_relation_lover = scope:activity.special_guest:spouse_1 + is_spouse_of = scope:activity.special_guest:spouse_1 + } + } + opinion_modifier = { + opinion_target = scope:activity.special_guest:spouse_1 + multiplier = 1 + } + scope:activity.special_guest:spouse_1 = { save_scope_as = jealousy_focus } + scope:activity.special_guest:spouse_2 = { save_scope_as = jealousy_usurper } + } + 1 = { + trigger = { + OR = { + any_secret = { + type = secret_lover + secret_target = scope:activity.special_guest:spouse_2 + } + has_relation_lover = scope:activity.special_guest:spouse_2 + is_spouse_of = scope:activity.special_guest:spouse_2 + } + } + opinion_modifier = { + opinion_target = scope:activity.special_guest:spouse_2 + multiplier = 1 + } + scope:activity.special_guest:spouse_2 = { save_scope_as = jealousy_focus } + scope:activity.special_guest:spouse_1 = { save_scope_as = jealousy_usurper } + } + } + } + } + + #Make a scene + option = { + name = ep2_wedding.3410.a + flavor = ep2_wedding.3410.a.flavor + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:jealousy_focus + modifier = ruined_wedding_night_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:jealousy_usurper + modifier = ruined_wedding_night_opinion + opinion = -15 + } + if = { + limit = { + any_secret = { + type = secret_lover + secret_target = scope:jealousy_focus + } + } + scope:jealousy_usurper = { + every_close_family_member = { + custom = every_usurper_close_family_tt + add_opinion = { + target = scope:jealousy_focus + modifier = revealed_lover_wedding_night_opinion + opinion = -20 + } + add_opinion = { + target = root + modifier = ruined_wedding_night_opinion + opinion = -10 + } + } + } + } + expose_lover_secret_or_run_consequence_effect = { + TARGET = scope:jealousy_focus + EXPOSER = root + } + stress_impact = { + base = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + calm = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + modifier = { + any_secret = { + type = secret_lover + secret_target = scope:jealousy_usurper + } + factor = 0.5 + } + } + } + + #Plot murder + option = { + name = ep2_wedding.3410.b + trigger = { + NOR = { + any_secret = { + type = secret_lover + secret_target = scope:jealousy_usurper + } + has_relation_lover = scope:jealousy_usurper + is_scheming_against = { target = scope:jealousy_usurper } + } + can_start_scheme = { + type = murder + target_character = scope:jealousy_usurper + } + } + start_scheme = { + target_character = scope:jealousy_usurper + type = murder + } + random_scheme = { + type = murder + limit = { + scheme_target_character = scope:jealousy_usurper + } + add_scheme_modifier = { type = wedding_consorts_envy_modifier } + } + custom_tooltip = ep2_wedding.3410.b.tt + stress_impact = { + vengeful = minor_stress_impact_loss + zealous = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + forgiving = miniscule_stress_impact_gain + } + ai_chance = { + base = 75 + opinion_modifier = { + opinion_target = scope:jealousy_usurper + multiplier = -1 + } + ai_value_modifier = { + ai_energy = 1 + ai_vengefulness = 1 + ai_boldness = 1 + } + } + } + + #Fed up with focus + option = { + name = ep2_wedding.3410.c + trigger = { + OR = { + has_relation_lover = scope:jealousy_focus + has_relation_lover = scope:jealousy_usurper + } + } + if = { + limit = { has_relation_lover = scope:jealousy_focus } + if = { + limit = { is_ai = yes } + add_opinion = { + target = scope:jealousy_focus + modifier = insulted_opinion + opinion = -20 + } + } + lose_lover_effect = { LOVER = scope:jealousy_focus } + } + if = { + limit = { has_relation_lover = scope:jealousy_usurper } + if = { + limit = { is_ai = yes } + add_opinion = { + target = scope:jealousy_focus + modifier = insulted_opinion + opinion = -20 + } + } + lose_lover_effect = { LOVER = scope:jealousy_usurper } + } + stress_impact = { + fickle = minor_stress_impact_loss + base = miniscule_stress_impact_gain + stubborn = miniscule_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = 1 + ai_boldness = 0.5 + } + } + } + + #Fine by me + option = { + name = ep2_wedding.3410.d + add_character_modifier = { + modifier = wedding_old_news_modifier + years = 5 + } + stress_impact = { + humble = minor_stress_impact_loss + content = minor_stress_impact_loss + arrogant = miniscule_stress_impact_gain + ambitious = miniscule_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:jealousy_focus + multiplier = -1 + } + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } +} + +ep2_wedding.3420 = { + type = activity_event + title = ep2_wedding.3420.t + desc = { + desc = ep2_wedding.3420.opening + random_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + exists = scope:wedding_eat + } + desc = ep2_wedding.3420.eat + } + triggered_desc = { + trigger = { + OR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = lifestyle_reveler + } + exists = scope:wedding_drink + } + desc = ep2_wedding.3420.drink + } + triggered_desc = { + trigger = { + OR = { + has_trait = lustful + has_trait = rakish + } + exists = scope:wedding_lech + } + desc = ep2_wedding.3420.lech + } + triggered_desc = { + trigger = { + OR = { + has_trait = greedy + has_trait = avaricious + } + exists = scope:wedding_steal + } + desc = ep2_wedding.3420.steal + } + triggered_desc = { + trigger = { + OR = { + has_trait = shy + has_trait = reclusive + } + exists = scope:wedding_flee + } + desc = ep2_wedding.3420.flee + } + triggered_desc = { + trigger = { + OR = { + has_trait = generous + has_trait = improvident + } + exists = scope:wedding_charity + } + desc = ep2_wedding.3420.charity + } + triggered_desc = { + trigger = { + OR = { + has_trait = gregarious + has_trait = trusting + } + exists = scope:wedding_social + } + desc = ep2_wedding.3420.social + } + triggered_desc = { + trigger = { + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = august + } + exists = scope:wedding_posture + } + desc = ep2_wedding.3420.posture + } + triggered_desc = { + trigger = { + OR = { + has_trait = honest + has_trait = contrite + } + exists = scope:wedding_blab + scope:blab_guest = root + } + desc = ep2_wedding.3420.blab_self + } + triggered_desc = { + trigger = { + OR = { + has_trait = honest + has_trait = contrite + } + exists = scope:wedding_blab + } + desc = ep2_wedding.3420.blab + } + triggered_desc = { + trigger = { + OR = { + has_trait = deceitful + has_trait = schemer + } + exists = scope:wedding_scheme + } + desc = ep2_wedding.3420.scheme + } + triggered_desc = { + trigger = { + OR = { + has_trait = compassionate + has_trait = generous + } + exists = scope:wedding_help + } + desc = ep2_wedding.3420.help + } + triggered_desc = { + trigger = { + OR = { + has_trait = compassionate + has_trait = zealous + } + exists = scope:wedding_pray + } + desc = ep2_wedding.3420.pray + } + } + desc = ep2_wedding.3420.closing + } + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:social_guest + trigger = { exists = scope:wedding_social } + animation = happiness + } + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + is_adult = yes + exists = scope:activity + } + + immediate = { + scope:activity = { + # Blab scopes + random_attending_character = { + limit = { + any_targeting_secret = { + OR = { + is_known_by = root + secret_owner = root + } + } + } + save_scope_as = blab_guest + random_targeting_secret = { + limit = { is_known_by = root } + alternative_limit = { secret_owner = root } + save_scope_as = blab_secret + } + } + # Scheme scopes + random_attending_character = { + limit = { + OR = { + any_secret = { + NOR = { + is_known_by = root + secret_owner ?= root + secret_target ?= root + } + } + any_targeting_secret = { + NOR = { + is_known_by = root + secret_owner ?= root + secret_target ?= root + } + } + } + } + weight = { + base = 100 + modifier = { + factor = 0.1 + scope:blab_guest ?= this + } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = scheme_guest + hidden_effect = { + random_list = { + 1 = { + trigger = { + any_secret = { + NOR = { + is_known_by = root + secret_owner = root + trigger_if = { + limit = { exists = scope:scheme_target } + secret_target = root + } + } + } + } + random_secret = { + limit = { + NOR = { + is_known_by = root + secret_owner = root + trigger_if = { + limit = { exists = scope:scheme_target } + secret_target = root + } + } + } + save_scope_as = scheme_secret + } + } + 1 = { + trigger = { + any_targeting_secret = { + NOR = { + is_known_by = root + secret_owner = root + trigger_if = { + limit = { exists = scope:scheme_target } + secret_target = root + } + } + } + } + random_targeting_secret = { + limit = { + NOR = { + is_known_by = root + secret_owner = root + trigger_if = { + limit = { exists = scope:scheme_target } + secret_target = root + } + } + } + save_scope_as = scheme_secret + } + } + } + } + } + # Social scopes + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + has_any_scripted_relation = root + } + opinion = { + target = root + value > -25 + } + } + weight = { + base = 50 + modifier = { + scope:blab_guest ?= this + factor = 0.1 + } + modifier = { + scope:scheme_guest ?= this + factor = 0.1 + } + modifier = { + has_trait = gregarious + add = 25 + } + modifier = { + has_trait = lifestyle_reveler + add = 25 + } + modifier = { + trait_compatibility = { + target = root + value >= low_positive_trait_compatibility + } + add = 25 + } + modifier = { + trait_compatibility = { + target = root + value >= medium_positive_trait_compatibility + } + add = 25 + } + modifier = { + trait_compatibility = { + target = root + value >= high_positive_trait_compatibility + } + add = 25 + } + modifier = { + sex_same_as = root + add = 50 + } + modifier = { + age >= root.age_minus_10 + age < root.age_plus_10 + add = 25 + } + modifier = { + age >= root.age_minus_5 + age < root.age_plus_5 + add = 25 + } + } + save_scope_as = social_guest + } + # Help scopes + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + weight = { + base = 50 + modifier = { + scope:blab_guest ?= this + factor = 0.1 + } + modifier = { + scope:scheme_guest ?= this + factor = 0.1 + } + modifier = { + scope:social_guest ?= this + factor = 0.1 + } + modifier = { + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + add = 25 + } + modifier = { + is_healthy = no + add = 25 + } + modifier = { + age >= 50 + add = 25 + } + modifier = { + is_close_family_of = root + factor = 2 + } + modifier = { + ai_energy <= low_negative_ai_value + add = 25 + } + modifier = { + ai_energy <= medium_negative_ai_value + add = 25 + } + modifier = { + ai_energy <= high_negative_ai_value + add = 25 + } + modifier = { + current_weight >= overweight_value + add = 25 + } + modifier = { + age > 30 + add = 25 + } + modifier = { + age > 60 + add = 25 + } + } + save_scope_as = help_guest + } + } + hidden_effect = { + while = { + count = 4 + random_list = { + 10 = { # Eat + trigger = { + NOR = { + exists = scope:wedding_eat + has_trait = inappetetic + } + } + modifier = { + has_trait = temperate + add = -20 + } + modifier = { + has_trait = gluttonous + add = 10 + } + modifier = { + has_trait = comfort_eater + add = 10 + } + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + add = { + value = ai_energy + multiply = -1 + } + } + save_scope_as = wedding_eat + } + 10 = { # Drink + trigger = { + NOT = { exists = scope:wedding_drink } + } + modifier = { + has_trait = temperate + add = -20 + } + modifier = { + has_trait = drunkard + add = 10 + } + modifier = { + has_trait = hashishiyah + add = 10 + } + modifier = { + has_trait = lifestyle_reveler + add = 10 + } + modifier = { + has_trait = lazy + add = 10 + } + modifier = { + add = { + value = ai_energy + multiply = -1 + } + } + save_scope_as = wedding_drink + } + 10 = { # Lech + trigger = { + NOT = { exists = scope:wedding_lech } + would_attempt_to_seduce_married_trigger = yes + is_eunuch_trigger = no + NOR = { + has_trait = celibate + has_trait = devoted + } + } + modifier = { + has_trait = chaste + add = -20 + } + modifier = { + has_trait = lustful + add = 10 + } + modifier = { + has_trait = rakish + add = 10 + } + modifier = { + add = { + value = ai_sociability + multiply = 0.5 + } + } + modifier = { + add = { + value = ai_honor + multiply = -0.5 + } + } + save_scope_as = wedding_lech + } + 10 = { # Steal + trigger = { + NOT = { exists = scope:wedding_steal } + exists = root.capital_province + NOT = { scope:activity.activity_location ?= root.capital_province } + OR = { + has_trait = greedy + has_trait = avaricious + gold < 0 + ai_honor < low_positive_honor + } + } + modifier = { + has_trait = generous + add = -20 + } + modifier = { + has_trait = greedy + add = 10 + } + modifier = { + has_trait = arbitrary + add = 10 + } + modifier = { + has_trait = avaricious + add = 10 + } + modifier = { add = ai_greed } + modifier = { + add = { + value = ai_honor + multiply = -1 + } + } + save_scope_as = wedding_steal + } + 10 = { # Flee + trigger = { + NOT = { exists = scope:wedding_flee } + OR = { + has_trait = shy + has_trait = reclusive + has_trait = paranoid + has_trait = impatient + } + } + modifier = { + has_trait = gregarious + add = -20 + } + modifier = { + has_trait = brave + add = -20 + } + modifier = { + has_trait = trusting + add = -20 + } + modifier = { + has_trait = shy + add = 10 + } + modifier = { + has_trait = paranoid + add = 10 + } + modifier = { + has_trait = craven + add = 10 + } + modifier = { + has_trait = reclusive + add = 10 + } + modifier = { + has_trait = impatient + add = 10 + } + modifier = { + add = { + value = ai_boldness + multiply = -1 + } + } + save_scope_as = wedding_flee + } + 10 = { # Charity + trigger = { + NOT = { exists = scope:wedding_charity } + } + modifier = { + has_trait = greedy + add = -20 + } + modifier = { + has_trait = avaricious + add = -20 + } + modifier = { + has_trait = callous + add = -20 + } + modifier = { + has_trait = sadistic + add = -20 + } + modifier = { + has_trait = generous + add = 10 + } + modifier = { + has_trait = improvident + add = 10 + } + modifier = { + add = { + value = ai_greed + multiply = -1 + } + add = { + value = ai_zeal + multiply = 0.5 + } + } + save_scope_as = wedding_charity + } + 10 = { # Social + trigger = { + NOT = { exists = scope:wedding_social } + exists = scope:social_guest + } + modifier = { + has_trait = shy + add = -20 + } + modifier = { + has_trait = reclusive + add = -20 + } + modifier = { + has_trait = gregarious + add = 10 + } + modifier = { + has_trait = confider + add = 10 + } + modifier = { add = ai_sociability } + save_scope_as = wedding_social + } + 10 = { # Posture + trigger = { + NOT = { exists = scope:wedding_posture } + } + modifier = { + has_trait = humble + add = -20 + } + modifier = { + has_trait = content + add = -20 + } + modifier = { + has_trait = arrogant + add = 10 + } + modifier = { + has_trait = ambitious + add = 10 + } + modifier = { + has_trait = august + add = 10 + } + modifier = { + add = { + value = ai_boldness + multiply = 0.5 + } + } + save_scope_as = wedding_posture + } + 10 = { # Blab + trigger = { + NOT = { exists = scope:wedding_blab } + exists = scope:blab_guest + exists = scope:blab_secret + } + modifier = { + has_trait = deceitful + add = -20 + } + modifier = { + has_trait = honest + add = 10 + } + modifier = { + has_trait = contrite + add = 10 + } + modifier = { + add = { + value = ai_honor + multiply = 0.5 + } + } + save_scope_as = wedding_blab + } + 10 = { # Scheme + trigger = { + NOT = { exists = scope:wedding_scheme } + } + modifier = { + has_trait = honest + add = -20 + } + modifier = { + has_trait = contrite + add = -20 + } + modifier = { + has_trait = deceitful + add = 10 + } + modifier = { + has_trait = schemer + add = 10 + } + modifier = { + add = { + value = ai_honor + multiply = -1 + } + } + save_scope_as = wedding_scheme + } + 10 = { # Help + trigger = { + NOT = { exists = scope:wedding_help } + exists = scope:help_guest + } + modifier = { + has_trait = callous + add = -20 + } + modifier = { + has_trait = sadistic + add = -20 + } + modifier = { + has_trait = compassionate + add = 10 + } + modifier = { + has_trait = generous + add = 10 + } + modifier = { add = ai_compassion } + save_scope_as = wedding_help + } + 10 = { # Pray + trigger = { + NOT = { exists = scope:wedding_pray } + OR = { + is_close_or_extended_family_of = scope:activity.special_guest:spouse_1 + is_close_or_extended_family_of = scope:activity.special_guest:spouse_2 + has_trait = devoted + has_trait = zealous + } + } + modifier = { + has_trait = cynical + add = -20 + } + modifier = { + has_trait = callous + add = -20 + } + modifier = { + has_trait = zealous + add = 10 + } + modifier = { + has_trait = compassionate + add = 10 + } + modifier = { add = ai_zeal } + modifier = { + add = { + value = ai_compassion + multiply = 0.5 + } + } + save_scope_as = wedding_pray + } + } + } + } + } + + #Eat + option = { + name = ep2_wedding.3420.a + trigger = { exists = scope:wedding_eat } + trait = gluttonous + trait = comfort_eater + target_weight_modifier_effect = { VALUE = 2 } + stress_impact = { + gluttonous = medium_stress_impact_loss + comfort_eater = medium_stress_impact_loss + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_energy = 1 + ai_vengefulness = 1 + ai_boldness = 1 + } + } + } + + #Drink + option = { + name = ep2_wedding.3420.b + trigger = { exists = scope:wedding_drink } + trait = drunkard + trait = hashishiyah + trait = lifestyle_reveler + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + } + else = { + add_trait_xp = { + trait = lifestyle_reveler + value = medium_trait_xp + } + } + stress_impact = { + base = minor_stress_impact_loss + drunkard = medium_stress_impact_loss + hashishiyah = medium_stress_impact_loss + lifestyle_reveler = medium_stress_impact_loss + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = 1 + ai_boldness = 0.5 + } + } + } + + #Lech + option = { + name = ep2_wedding.3420.c + trigger = { exists = scope:wedding_lech } + trait = lustful + trait = rakish + if = { + limit = { + NOT = { is_attracted_to_men = yes } + } + had_sex_with_unknown_effect = { GENDER = female } + } + else = { + had_sex_with_unknown_effect = { GENDER = male } + } + stress_impact = { + lustful = medium_stress_impact_loss + rakish = medium_stress_impact_loss + chaste = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } + + #Steal + option = { + name = ep2_wedding.3420.d + trigger = { exists = scope:wedding_steal } + trait = greedy + trait = avaricious + add_gold = { 10 25 } + stress_impact = { + greedy = medium_stress_impact_loss + avaricious = medium_stress_impact_loss + generous = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } + + #Flee + option = { + name = ep2_wedding.3420.e + trigger = { exists = scope:wedding_flee } + trait = shy + trait = reclusive + add_prestige = miniscule_prestige_loss + stress_impact = { + impatient = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + shy = medium_stress_impact_loss + reclusive = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + #Charity + option = { + name = ep2_wedding.3420.f + trigger = { exists = scope:wedding_charity } + trait = generous + trait = improvident + remove_short_term_gold = { 10 25 } + add_piety = minor_piety_gain + stress_impact = { + generous = medium_stress_impact_loss + improvident = medium_stress_impact_loss + greedy = minor_stress_impact_gain + avaricious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } + + #Socialize + option = { + name = ep2_wedding.3420.g + trigger = { exists = scope:wedding_social } + trait = gregarious + trait = trusting + progress_towards_friend_effect = { + REASON = friend_wedding_relation_bond + CHARACTER = scope:social_guest + OPINION = default_friend_opinion + } + stress_impact = { + gregarious = medium_stress_impact_loss + trusting = medium_stress_impact_loss + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } + + #Posture + option = { + name = ep2_wedding.3420.h + trigger = { exists = scope:wedding_posture } + trait = arrogant + trait = ambitious + add_prestige = minor_prestige_gain + stress_impact = { + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } + + #Blab + option = { + name = ep2_wedding.3420.i + trigger = { exists = scope:wedding_blab } + trait = honest + trait = contrite + if = { + limit = { + root != scope:blab_guest + } + reverse_add_opinion = { + target = scope:blab_guest + modifier = exposed_my_secret_opinion + } + } + scope:blab_secret = { expose_secret = root } + stress_impact = { + honest = medium_stress_impact_loss + contrite = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } + + #Scheme + option = { + name = ep2_wedding.3420.j + trigger = { exists = scope:wedding_scheme } + trait = deceitful + trait = schemer + remove_short_term_gold = { 10 25 } + random = { + chance = 50 + custom_tooltip = ep2_wedding.3420.j.tt + hidden_effect = { + if = { + limit = { exists = scope:scheme_secret } + send_interface_toast = { + title = secret_discovered_toast + scope:scheme_secret = { reveal_to = root } + } + } + } + } + stress_impact = { + deceitful = medium_stress_impact_loss + schemer = medium_stress_impact_loss + honest = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } + + #Help + option = { + name = { + text = ep2_wedding.3420.k.health + trigger = { + scope:help_guest = { is_healthy = no } + } + } + name = { + text = ep2_wedding.3420.k.drink + trigger = { + scope:help_guest = { + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + } + } + name = { + text = ep2_wedding.3420.k.fallback + trigger = { + scope:help_guest = { + is_healthy = yes + NOR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + } + } + } + trigger = { exists = scope:wedding_help } + trait = compassionate + flavor = ep2_wedding.3420.k.flavor + progress_towards_friend_effect = { + REASON = friend_wedding_relation_bond + CHARACTER = scope:help_guest + OPINION = default_friend_opinion + } + stress_impact = { + compassionate = medium_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } + + #Pray + option = { + name = ep2_wedding.3420.l + trigger = { exists = scope:wedding_pray } + trait = zealous + add_piety = minor_piety_gain + stress_impact = { + compassionate = minor_stress_impact_loss + zealous = medium_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + ai_vengefulness = -1 + } + } + } +} + +scripted_trigger wedding_3500_shared_trigger = { + is_adult = yes + is_participant_in_activity = scope:activity + NOR = { + this = root + scope:my_family_relative ?= this + scope:my_family_relative_1 ?= this + scope:my_family_relative_2 ?= this + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } +} + +scripted_trigger wedding_3500_same_relation_spouse_trigger = { + is_$RELATION$_of = scope:my_family_spouse + scope:my_family_relative_1 = { is_$RELATION$_of = scope:my_family_spouse } + scope:my_family_relative_2 = { is_$RELATION$_of = scope:my_family_spouse } +} + +scripted_trigger ep2_wedding_3500_relations_spouse_shared_trigger = { + OR = { + wedding_3500_same_relation_spouse_trigger = { RELATION = great_grandchild } + wedding_3500_same_relation_spouse_trigger = { RELATION = grandchild } + wedding_3500_same_relation_spouse_trigger = { RELATION = child } + wedding_3500_same_relation_spouse_trigger = { RELATION = great_grandparent } + wedding_3500_same_relation_spouse_trigger = { RELATION = grandparent } + wedding_3500_same_relation_spouse_trigger = { RELATION = sibling } + wedding_3500_same_relation_spouse_trigger = { RELATION = nibling } + wedding_3500_same_relation_spouse_trigger = { RELATION = uncle_or_aunt } + wedding_3500_same_relation_spouse_trigger = { RELATION = cousin } + } +} + +scripted_trigger ep2_wedding_3500_same_relation_root_trigger = { + scope:my_family_relative_1 = { is_$RELATION$_of = root } + scope:my_family_relative_2 = { is_$RELATION$_of = root } +} + +scripted_trigger ep2_wedding_3500_relations_root_shared_trigger = { + OR = { + ep2_wedding_3500_same_relation_root_trigger = { RELATION = great_grandchild } + ep2_wedding_3500_same_relation_root_trigger = { RELATION = grandchild } + ep2_wedding_3500_same_relation_root_trigger = { RELATION = child } + ep2_wedding_3500_same_relation_root_trigger = { RELATION = great_grandparent } + ep2_wedding_3500_same_relation_root_trigger = { RELATION = grandparent } + ep2_wedding_3500_same_relation_root_trigger = { RELATION = sibling } + ep2_wedding_3500_same_relation_root_trigger = { RELATION = nibling } + ep2_wedding_3500_same_relation_root_trigger = { RELATION = uncle_or_aunt } + ep2_wedding_3500_same_relation_root_trigger = { RELATION = cousin } + } +} + +scripted_effect wedding_3500_save_family_effect = { + scope:activity.special_guest:$SPOUSE$ = { save_scope_as = my_family_spouse } + if = { + limit = { scope:my_family_spouse = scope:activity.special_guest:spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = other_family_spouse } + } + else = { + scope:activity.special_guest:spouse_1 = { save_scope_as = other_family_spouse } + } + while = { + count = 2 + random_close_or_extended_family_member = { + limit = { + trigger_if = { + limit = { + root = { is_close_family_of = scope:my_family_spouse } + } + is_close_family_of = scope:my_family_spouse + } + trigger_else = { is_extended_family_of = scope:my_family_spouse } + wedding_3500_shared_trigger = yes + NOR = { + has_relation_rival = scope:other_family_spouse + opinion = { + target = scope:other_family_spouse + value <= -25 + } + } + } + alternative_limit = { + wedding_3500_shared_trigger = yes + NOR = { + has_relation_rival = scope:other_family_spouse + opinion = { + target = scope:other_family_spouse + value <= -25 + } + } + } + weight = { + base = 1 + wedding_family_member_compatibility_modifier = yes + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + } + if = { + limit = { exists = scope:my_family_relative_1 } + save_scope_as = my_family_relative_2 + } + else = { save_scope_as = my_family_relative_1 } + } + } +} + +scripted_trigger ep2_wedding_3500_active_bedroom_trigger = { + scope:my_family_spouse = { + is_eunuch_trigger = no + NOT = { has_trait = celibate } + } + scope:other_family_spouse = { + is_eunuch_trigger = no + NOT = { has_trait = celibate } + } +} + +scripted_trigger ep2_wedding_3500_dislikes_fornicators_trigger = { + scope:other_family_spouse = { + OR = { + has_trait = fornicator + has_trait = adulterer + } + } + scope:my_family_spouse = { + OR = { + has_trait = fornicator + has_trait = adulterer + } + } + trigger_if = { + limit = { + scope:other_family_spouse = { is_female = yes } + } + faith = { + NOT = { has_doctrine = doctrine_adultery_women_accepted } + } + } + trigger_else = { + faith = { + NOT = { has_doctrine = doctrine_adultery_men_accepted } + } + } +} + +ep2_wedding.3500 = { + type = activity_event + title = ep2_wedding.3500.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:my_family_relative_1 = { sex_same_as = scope:my_family_relative_2 } + ep2_wedding_3500_relations_root_shared_trigger = yes + } + desc = ep2_wedding.3500.intro_plural + } + desc = ep2_wedding.3500.intro + } + desc = ep2_wedding.3500.intro_connector + first_valid = { + # BOTH + triggered_desc = { + trigger = { ep2_wedding_3500_relations_spouse_shared_trigger = yes } + desc = ep2_wedding.3500.relation_shared + } + desc = ep2_wedding.3500.relation + } + first_valid = { + # Personal concerns + triggered_desc = { + trigger = { + scope:my_family_relative_1 = { + OR = { + ep2_wedding_3500_dislikes_fornicators_trigger = yes + has_imprisonment_reason = scope:other_family_spouse + has_relation_rival = scope:other_family_spouse + opinion = { + target = scope:other_family_spouse + value <= -25 + } + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { # Fornicator or adulterer trait, and not accepted in faith + scope:my_family_relative_1 = { ep2_wedding_3500_dislikes_fornicators_trigger = yes } + } + desc = ep2_wedding.3500.fornicator + } + triggered_desc = { + trigger = { + scope:my_family_relative_1 = { has_imprisonment_reason = scope:other_family_spouse } + NOT = { + scope:my_family_relative_1 = { has_imprisonment_reason = scope:my_family_spouse } + } + } + desc = ep2_wedding.3500.criminal + } + triggered_desc = { + trigger = { + OR = { + has_relation_rival = scope:other_family_spouse + opinion = { + target = scope:other_family_spouse + value <= -25 + } + } + } + desc = ep2_wedding.3500.dislike + } + } + } + } + # Political concerns + triggered_desc = { + trigger = { + exists = scope:other_family_spouse.house + exists = scope:my_family_spouse.house + OR = { + scope:other_family_spouse.dynasty.dynasty_prestige_level < scope:my_family_spouse.dynasty.dynasty_prestige_level + scope:other_family_spouse.house.house_head ?= { + is_ruler = yes + OR = { + any_neighboring_top_liege_realm_owner = {scope:my_family_spouse.house.house_head.liege ?= this } + AND = { + exists = liege + scope:my_family_spouse.house.house_head.liege ?= liege + } + } + } + AND = { + NOT = { + scope:my_family_relative_1 = { has_trait = cynical } + } + scope:my_family_spouse.faith = { + NOR = { + this = scope:other_family_spouse.faith + faith_hostility_level = { + target = scope:other_family_spouse.faith + value = 0 # Accepted + } + } + } + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:other_family_spouse.dynasty.dynasty_prestige_level < scope:my_family_spouse.dynasty.dynasty_prestige_level + } + desc = ep2_wedding.3500.renown + } + triggered_desc = { + trigger = { + scope:other_family_spouse.house.house_head ?= { + is_ruler = yes + OR = { + any_neighboring_top_liege_realm_owner = {scope:my_family_spouse.house.house_head.liege ?= this } + AND = { + exists = liege + scope:my_family_spouse.house.house_head.liege ?= liege + } + } + } + } + desc = ep2_wedding.3500.realms + } + triggered_desc = { + trigger = { + NOT = { + scope:my_family_relative_1 = { has_trait = cynical } + } + scope:my_family_spouse.faith = { + NOR = { + this = scope:other_family_spouse.faith + faith_hostility_level = { + target = scope:other_family_spouse.faith + value = 0 # Accepted + } + } + } + } + desc = ep2_wedding.3500.faith + } + } + } + } + # Petty concerns + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:other_family_spouse = { is_healthy = no } + scope:my_family_spouse = { is_healthy = yes } + scope:my_family_relative_1 = { is_healthy = yes } + } + desc = ep2_wedding.3500.health + } + triggered_desc = { + trigger = { + scope:other_family_spouse.ai_boldness > low_positive_boldness + scope:my_family_spouse.ai_boldness < low_negative_boldness + scope:my_family_relative_1.ai_boldness < low_negative_boldness + } + desc = ep2_wedding.3500.bold + } + triggered_desc = { + trigger = { + scope:other_family_spouse.ai_boldness < low_negative_boldness + scope:my_family_spouse.ai_boldness > low_positive_boldness + scope:my_family_relative_1.ai_boldness > low_positive_boldness + } + desc = ep2_wedding.3500.shy + } + triggered_desc = { + trigger = { + scope:other_family_spouse.ai_honor < low_positive_honor + scope:my_family_relative_1.ai_honor >= low_positive_honor + } + desc = ep2_wedding.3500.dishonorable + } + triggered_desc = { + trigger = { + scope:my_family_spouse.age <= scope:other_family_spouse.age_minus_10 + ep2_wedding_3500_active_bedroom_trigger = yes + } + desc = ep2_wedding.3500.old + } + triggered_desc = { + trigger = { + scope:my_family_spouse.age >= scope:other_family_spouse.age_plus_10 + ep2_wedding_3500_active_bedroom_trigger = yes + } + desc = ep2_wedding.3500.young + } + triggered_desc = { + trigger = { + ep2_wedding_3500_active_bedroom_trigger = yes + scope:other_family_spouse = { has_trait = beauty_bad } + NOR = { + scope:my_family_spouse = { has_trait = beauty_bad } + scope:my_family_relative_1 = { has_trait = beauty_bad } + } + } + desc = ep2_wedding.3500.beauty + } + triggered_desc = { + trigger = { + NOR = { + AND = { + scope:other_family_spouse = { is_healthy = no } + scope:my_family_spouse = { is_healthy = yes } + scope:my_family_relative_1 = { is_healthy = yes } + } + AND = { + scope:other_family_spouse.ai_boldness > low_positive_boldness + scope:my_family_spouse.ai_boldness < low_negative_boldness + scope:my_family_relative_1.ai_boldness < low_negative_boldness + } + AND = { + scope:other_family_spouse.ai_boldness < low_negative_boldness + scope:my_family_spouse.ai_boldness > low_positive_boldness + scope:my_family_relative_1.ai_boldness > low_positive_boldness + } + AND = { + scope:other_family_spouse.ai_honor < low_positive_honor + scope:my_family_relative_1.ai_honor >= low_positive_honor + } + AND = { + ep2_wedding_3500_active_bedroom_trigger = yes + OR = { + scope:my_family_spouse.age <= scope:other_family_spouse.age_plus_10 + scope:my_family_spouse.age >= scope:other_family_spouse.age_minus_10 + AND = { + scope:other_family_spouse = { has_trait = beauty_bad } + NOR = { + scope:my_family_spouse = { has_trait = beauty_bad } + scope:my_family_relative_1 = { has_trait = beauty_bad } + } + } + } + } + + } + } + desc = ep2_wedding.3500.fallback + } + } + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:my_family_relative_2 = { + ep2_wedding_3500_dislikes_fornicators_trigger = yes + has_imprisonment_reason = scope:other_family_spouse + has_relation_rival = scope:other_family_spouse + opinion = { + target = scope:other_family_spouse + value <= -25 + } + } + } + desc = ep2_wedding.3500.agree + } + triggered_desc = { + trigger = { + exists = scope:my_family_spouse + scope:other_family_spouse.house.house_head = { is_allied_to = scope:my_family_spouse.house.house_head } + } + desc = ep2_wedding.3500.alliance + } + triggered_desc = { + trigger = { + OR = { + AND = { + scope:other_family_spouse = { has_trait = beauty_bad } + scope:my_family_spouse = { + NOT = { has_trait = beauty_bad } + } + } + AND = { + scope:other_family_spouse = { is_healthy = no } + scope:my_family_spouse = { is_healthy = yes } + } + } + } + desc = ep2_wedding.3500.compromise + } + desc = ep2_wedding.3500.time + } + } + theme = marriage + override_background = { reference = feast } + left_portrait = { + character = scope:my_family_relative_1 + animation = worry + } + center_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:my_family_relative_2 + animation = thinking + } + lower_right_portrait = scope:activity.special_guest:spouse_1 + lower_left_portrait = scope:activity.special_guest:spouse_2 + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + is_adult = yes + # Spouse 1 and 2 are not root + NOR = { + scope:activity.special_guest:spouse_1 ?= root + scope:activity.special_guest:spouse_2 ?= root + } + # More relatives of your family's spouse are about + trigger_if = { + limit = { is_close_or_extended_family_of = scope:activity.special_guest:spouse_1 } + NOR = { + has_relation_rival = scope:activity.special_guest:spouse_1 + opinion = { + target = scope:activity.special_guest:spouse_1 + value <= -25 + } + } + scope:activity.special_guest:spouse_1 = { + any_close_or_extended_family_member = { + count >= 2 + wedding_3500_shared_trigger = yes + NOR = { + has_relation_rival = scope:activity.special_guest:spouse_2 + opinion = { + target = scope:activity.special_guest:spouse_2 + value <= -25 + } + } + } + } + } + trigger_else_if = { + limit = { is_close_or_extended_family_of = scope:activity.special_guest:spouse_2 } + NOR = { + has_relation_rival = scope:activity.special_guest:spouse_2 + opinion = { + target = scope:activity.special_guest:spouse_2 + value <= -25 + } + } + scope:activity.special_guest:spouse_2 = { + any_close_or_extended_family_member = { + count >= 2 + wedding_3500_shared_trigger = yes + NOR = { + has_relation_rival = scope:activity.special_guest:spouse_2 + opinion = { + target = scope:activity.special_guest:spouse_2 + value <= -25 + } + } + } + } + } + # No dice + trigger_else = { always = no } + } + + immediate = { + save_scope_as = my_family_relative + # Save family members related to spouse + hidden_effect = { + if = { + limit = { is_close_or_extended_family_of = scope:activity.special_guest:spouse_1 } + wedding_3500_save_family_effect = { SPOUSE = spouse_1 } + } + else = { + wedding_3500_save_family_effect = { SPOUSE = spouse_2 } + } + } + } + + # Agree + option = { + name = ep2_wedding.3500.a + trigger = { exists = scope:my_family_relative_1 } + progress_towards_friend_effect = { + REASON = friend_wedding_relation_bond + CHARACTER = scope:my_family_relative_1 + OPINION = default_friend_opinion + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + # Rebuff + option = { + name = ep2_wedding.3500.b + trigger = { + scope:my_family_relative_2 ?= { + NOR = { + ep2_wedding_3500_dislikes_fornicators_trigger = yes + has_imprisonment_reason = scope:other_family_spouse + has_relation_rival = scope:other_family_spouse + opinion = { + target = scope:other_family_spouse + value <= -25 + } + } + } + } + progress_towards_friend_effect = { + REASON = friend_wedding_relation_bond + CHARACTER = scope:my_family_relative_2 + OPINION = default_friend_opinion + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } + + #It matters not + option = { + name = ep2_wedding.3500.d + add_prestige = minor_prestige_gain + stress_impact = { + compassionate = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + callous = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + #It is in god's hands now + option = { + name = ep2_wedding.3500.e + add_piety = minor_prestige_gain + stress_impact = { + cynical = miniscule_stress_impact_gain + diligent = miniscule_stress_impact_gain + zealous = minor_stress_impact_loss + lazy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } +} + +############################ +## Wedding Ceremony Events +## 4000-4999 +## by Veronica Pazos +############################ + +scripted_trigger ep2_wedding_4000_valid_betrothed = { + feast_default_adult_participant_trigger = yes #includes is_ai = yes + can_marry_character_trigger = { CHARACTER = root.intent_target } + NOR = { + age < root.intent_target.age_minus_10 + age > root.intent_target.age_plus_10 + } +} + +# Non-spouse: Matchmaking Intent - This wedding is so cool, you guys should also get married + +ep2_wedding.4000 = { + type = activity_event + title = ep2_wedding.4000.t + desc = { + desc = ep2_wedding.4000.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:matchmaked_scope = { + exists = var:wedding_good_match + var:wedding_good_match = scope:objective_scope + } + } + desc = ep2_wedding.4000.desc.good_match + } + triggered_desc = { + trigger = { + scope:matchmaked_scope = { + exists = var:wedding_no_match + var:wedding_no_match = scope:objective_scope + } + } + desc = ep2_wedding.4000.desc.no_match + } + } + } + theme = wedding_ceremony_activity + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:matchmaked_scope + animation = personality_rational + } + lower_center_portrait = scope:objective_scope + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + NOT = { has_variable = had_ep2_wedding_matchmaking_event_var } + NOR = { #you are not one of the spouses + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + has_activity_intent = matchmaking_intent #you're trying to matchmake someone + intent_target = { is_alive = yes } #they're not dead yet + scope:activity = { #there's someone to pair them with + any_attending_character = { + ep2_wedding_4000_valid_betrothed = yes + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + intent_target = { save_scope_as = matchmaked_scope } + scope:activity = { + random_attending_character = { + limit = { ep2_wedding_4000_valid_betrothed = yes } + save_scope_as = objective_scope + } + } + set_variable = { + name = had_ep2_wedding_matchmaking_event_var + days = 90 #enough to not affect this wedding + } + } + + #Go for it + option = { + name = ep2_wedding.4000.a + duel = { + skill = diplomacy + target = scope:matchmaked_scope + 50 = { # success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = 20 + attraction >= medium_positive_attraction + } + modifier = { + add = 30 + attraction >= high_positive_attraction + } + desc = ep2_wedding.4000.a.success + send_interface_toast = { + title = ep2_wedding.4000.a.success + left_icon = scope:matchmaked_scope + right_icon = scope:objective_scope + scope:activity = { + add_activity_log_entry = { + key = ep2_wedding_4000_log_success + character = root + target = scope:matchmaked_scope + + # Effect + root = { custom_tooltip = ep2_wedding.wedding_intent.success.tt } + scope:matchmaked_scope = { create_betrothal = scope:objective_scope } + } + } + } + complete_activity_intent = yes + } + 50 = { # fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.4000.a.failure + send_interface_toast = { + title = ep2_wedding.4000.a.failure + left_icon = scope:matchmaked_scope + add_prestige = minor_prestige_loss + scope:matchmaked_scope = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = patient + } + } + } + } + + #Be subtle + option = { + name = ep2_wedding.4000.b + duel = { + skill = intrigue + target = scope:matchmaked_scope + 30 = { # success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.4000.b.success + send_interface_toast = { + title = ep2_wedding.4000.b.success + left_icon = scope:matchmaked_scope + right_icon = scope:objective_scope + scope:activity = { + add_activity_log_entry = { + key = ep2_wedding_4000_log_success + character = root + target = scope:matchmaked_scope + + # Effect + custom_tooltip = ep2_wedding.wedding_intent.success.tt + scope:matchmaked_scope = { create_betrothal = scope:objective_scope } + } + } + } + complete_activity_intent = yes + } + 70 = { # fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.4000.a.failure + send_interface_toast = { + title = ep2_wedding.4000.a.failure + left_icon = scope:matchmaked_scope + scope:matchmaked_scope = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + } + } + stress_impact = { + brave = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = impatient + } + } + } + } + + #Nahhh + option = { + name = ep2_wedding.4000.c + ai_chance = { + base = 100 + modifier = { + factor = 1.25 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + scope:matchmaked_scope = { + trait_compatibility = { + target = scope:objective_scope + value >= high_positive_trait_compatibility + } + } + } + } + } +} + +# Host: Gain Renown Intent - Bring a white animal to the Banquet to flex (it's painted) + +scripted_trigger ep2_wedding_2010_impressed = { + OR = { #what kind of people would be impressed by a legendary animal? + has_trait = gregarious + has_trait = brave + has_trait = lifestyle_reveler + has_trait = lifestyle_hunter + has_trait = drunkard + has_trait = gallant #white animals were a pretty chivalrous thing to find/hunt + } +} + +ep2_wedding.2010 = { + type = activity_event + title = ep2_wedding.2010.t + desc = { + desc = ep2_wedding.2010.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { #you are one of the spouses + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + } + desc = ep2_wedding.2010.desc_spouse + } + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + animation = personality_rational + } + + cooldown = { years = 5 } + + trigger = { + this = scope:host #you're the host + has_activity_intent = diplomatic_intent + intent_target = { ep2_wedding_2010_impressed = yes } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = deceitful + } + modifier = { + factor = 0.5 + has_trait = honest + } + } + + immediate = { + select_local_animal_effect = { TYPE = big } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + intent_target = { + add_to_list = ep2_wedding_2010_impressed_list + save_scope_as = diplo_target + } + if = { + limit = { + scope:activity = { #there's someone else to impress + any_attending_character = { + feast_default_adult_participant_trigger = yes + NOR = { + this = root + this = root.intent_target + } + ep2_wedding_2010_impressed = yes + } + } + } + scope:activity = { + every_attending_character = { + limit = { + feast_default_adult_participant_trigger = yes + NOR = { + this = root + this = root.intent_target + } + ep2_wedding_2010_impressed = yes + } + add_to_list = ep2_wedding_2010_impressed_list + } + } + } + } + + #Yeah + option = { + name = ep2_wedding.2010.a + custom_tooltip = ep2_wedding.2010.a.tt + every_in_list = { + list = ep2_wedding_2010_impressed_list + custom = ep2_wedding.2010.impressed_list + add_opinion = { + modifier = wbanquet_white_animal_opinion + target = root + opinion = 20 + } + } + #Does anyone suspect? + hidden_effect = { + if = { + limit = { + scope:diplo_target = { + feast_default_adult_participant_trigger = yes + OR = { + has_trait = cynical + has_trait = callous + } + has_any_good_relationship_with_root_trigger = no + } + } + random_list = { + 50 = { #they don't notice + remove_variable = animal_type + if = { + limit = { + scope:diplo_target = { activity_wedding_diplomatic_intent_impressible_target = yes } + } + send_interface_toast = { + title = ep2_wedding.2000.after.subjugate + left_icon = scope:diplo_target + custom_tooltip = { + text = ep2_wedding.2000.after.subjugate.tt + complete_activity_intent = yes + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = title_change + add_claim_on_loss = no + } + scope:diplo_target = { + change_liege = { + liege = root + change = scope:title_change + } + } + resolve_title_and_vassal_change = scope:title_change + } + } + } + } + 50 = { #they do + trigger_event = ep2_wedding.2011 + } + } + } + else_if = { + limit = { + scope:activity = { + any_attending_character = { + feast_default_adult_participant_trigger = yes + OR = { + has_trait = cynical + has_trait = callous + } + has_any_good_relationship_with_root_trigger = no + } + } + } + random_list = { + 50 = { #they don't notice + remove_variable = animal_type + } + 50 = { #they do + trigger_event = ep2_wedding.2011 + } + } + } + } + remove_short_term_gold = minor_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold <= minor_gold_value + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = honest + } + } + } + } + + #Nah + option = { + name = ep2_wedding.2010.b + remove_variable = animal_type + stress_impact = { + gallant = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + lifestyle_reveler = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = gallant + has_trait = gregarious + has_trait = lifestyle_reveler + } + } + modifier = { + factor = 1.25 + has_trait = deceitful + } + } + } +} + +# Follow up: You get called out + +ep2_wedding.2011 = { + type = activity_event + title = ep2_wedding.2011.t + desc = ep2_wedding.2011.desc + theme = wedding_banquet_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = vengeful + has_trait = callous + has_trait = brave + } + } + animation = anger + } + animation = stress + } + right_portrait = { + character = scope:doubting_guest + animation = schadenfreude + } + + immediate = { + scope:activity = { + random_attending_character = { + limit = { + feast_default_adult_participant_trigger = yes + OR = { + has_trait = cynical + has_trait = callous + } + has_any_good_relationship_with_root_trigger = no + } + save_scope_as = doubting_guest + } + } + } + + #Confess + option = { + name = ep2_wedding.2011.a + add_prestige = minor_prestige_loss + add_piety = minor_piety_gain + scope:doubting_guest = { + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + deceitful = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = honest + } + } + } + } + + #Double down + option = { + name = ep2_wedding.2011.b + duel = { #they believe you + skill = intrigue + target = scope:doubting_guest + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + factor = 2 + scope:doubting_guest = { + OR = { + has_trait = trusting + has_trait = loyal + } + } + } + desc = ep2_wedding.2011.b.success + send_interface_toast = { + left_icon = scope:doubting_guest + title = ep2_wedding.2011.b.success + custom_tooltip = ep2_wedding.wedding_intent.success.tt + complete_activity_intent = yes + } + } + 50 = { #they don't + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.2011.b.failure + send_interface_toast = { + left_icon = scope:doubting_guest + title = ep2_wedding.2011.b.failure + scope:doubting_guest = { + add_opinion = { + target = root + opinion = -10 + modifier = annoyed_opinion + } + } + } + } + } + stress_impact = { + trusting = medium_stress_impact_gain + just = medium_stress_impact_gain + honest = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = trusting + has_trait = just + } + } + } + } + + after = { + remove_variable = animal_type + } +} + +# Spouse/Non-spouse: Someone is dangerously close to a well of wine + +scripted_trigger ep2_wedding_2020_would_fall_trigger = { + is_adult = yes + is_alive = yes + feast_default_adult_participant_trigger = yes + drinks_alcohol_trigger = yes + OR = { + has_trait = lifestyle_reveler + has_trait = drunkard + has_trait = gregarious + has_trait = arbitrary + } +} + +ep2_wedding.2020 = { + type = activity_event + title = ep2_wedding.2020.t + desc = ep2_wedding.2020.desc + theme = wedding_banquet_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_activity_intent = banquet_mischief_intent + has_trait = callous + has_trait = sadistic + has_trait = deceitful + } + } + animation = scheme + } + animation = worry + } + right_portrait = { + character = scope:drunk_guest + animation = drink_goblet + } + + cooldown = { years = 5 } + + trigger = { + #DLC check. + has_ep2_dlc_trigger = yes + this != scope:host + scope:activity = { + any_attending_character = { + ep2_wedding_2020_would_fall_trigger = yes + } + has_activity_option = { + category = wedding_option_food + option = wedding_food_good + } + NOT = { + has_variable = has_had_2020_event + } + } + scope:activity = { NOT = { has_variable = ep2_wedding_2020_well_var } } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_activity_intent = banquet_mischief_intent + } + modifier = { + factor = 2 + scope:activity = { + any_attending_character = { + has_trait = drunkard + } + } + } + modifier = { + is_ai = yes + factor = 0.1 + } + } + + immediate = { + scope:activity = { + set_variable = ep2_wedding_2020_well_var + random_attending_character = { + limit = { + ep2_wedding_2020_would_fall_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 50 + has_trait = drunkard + } + } + save_scope_as = drunk_guest + } + set_variable = has_had_2020_event + } + } + + #Tell them + option = { + name = ep2_wedding.2020.a + duel = { + skill = diplomacy + target = scope:drunk_guest + 50 = { #they listen to you + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.2020.a.success + send_interface_toast = { + left_icon = scope:drunk_guest + title = ep2_wedding.2020.a.success + progress_towards_friend_effect = { + REASON = friend_wbanquet_saved_from_well + CHARACTER = scope:drunk_guest + OPINION = 20 + } + add_piety = minor_piety_gain + } + } + 50 = { #they fall down + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.2020.a.failure + send_interface_toast = { + left_icon = scope:drunk_guest + title = ep2_wedding.2020.a.failure + scope:drunk_guest = { + add_prestige = minor_prestige_loss + increase_wounds_effect = { REASON = fall } + } + } + } + } + stress_impact = { + deceitful = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = callous + has_trait = sadistic + } + } + } + } + + #Don't + option = { + name = ep2_wedding.2020.b + random_list = { + 50 = { #they don't fall + desc = ep2_wedding.2020.b.success + send_interface_toast = { + left_icon = scope:drunk_guest + title = ep2_wedding.2020.b.success + #nothing happens + } + } + 50 = { #they fall down + modifier = { + factor = 2 + scope:drunk_guest = { has_trait = drunkard } + } + desc = ep2_wedding.2020.a.failure + send_interface_toast = { + left_icon = scope:drunk_guest + title = ep2_wedding.2020.a.failure + add_stress = major_stress_impact_loss + scope:drunk_guest = { + add_prestige = minor_prestige_loss + increase_wounds_effect = { REASON = fall } + } + } + } + } + stress_impact = { + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + #Crash Wedding Intent - Push them + option = { + name = ep2_wedding.2020.c + trigger = { + OR = { + has_activity_intent = banquet_mischief_intent + AND = { + has_activity_intent = murder_attendee_intent + intent_target = scope:drunk_guest + } + } + } + custom_tooltip = available_because_intent_tt + duel = { + skill = prowess + target = scope:drunk_guest + 50 = { #you push them + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep2_wedding.2020.c.success + send_interface_toast = { + left_icon = scope:drunk_guest + title = ep2_wedding.2020.c.success + custom_tooltip = ep2_wedding.wedding_intent.success.tt + add_stress = major_stress_impact_loss + scope:drunk_guest = { + add_prestige = minor_prestige_loss + increase_wounds_effect = { REASON = fall } + } + complete_activity_intent = yes + } + } + 50 = { #they kick you back + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.2020.c.failure + send_interface_toast = { + left_icon = root + right_icon = scope:drunk_guest + title = ep2_wedding.2020.c.failure + increase_wounds_effect = { REASON = fight } + } + } + 10 = { #they die + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep2_wedding.2020.c.death + send_interface_toast = { + left_icon = root + right_icon = scope:drunk_guest + title = ep2_wedding.2020.c.death + scope:drunk_guest = { + death = { death_reason = death_accident } + } + known_murder_effect = { + VICTIM = scope:drunk_guest + MURDERER = root + EXPOSER = root + } + } + } + } + stress_impact = { + calm = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = forgiving + has_trait = compassionate + } + } + } + } +} diff --git a/N3OW/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt b/N3OW/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt new file mode 100644 index 00000000..b1300e26 --- /dev/null +++ b/N3OW/events/dlc/ep2/wedding_events/ep2_wedding_events_ewan.txt @@ -0,0 +1,6109 @@ +@ep2_wedding_ewan_0052_dolt_pay_out_value = root.massive_gold_value +@ep2_wedding_ewan_0061_high_skill_value = extremely_high_skill_rating +@ep2_wedding_ewan_0061_old_value = 80 +@ep2_wedding_ewan_0061_very_old = 90 + +namespace = ep2_wedding_ewan + +################################################## +# #Banquet Phase +# 0001 - 0010 Quite the Spectacle - Connect with various types of characters over the entertainment. +# 0011 - 0020 Food Fit for a... - Connect with various types of characters over the food. +# 0021 - 0030 Shimmering, Shining - Connect with various types of characters over the venue & its decorations. +# 0031 - 0040 A Sociable Supper - Meet one of your neighbouring rulers and form a fast friendship. +# 0041 - 0050 Speech! Speech! - Make a speech to the happy couple, adjusting the meaning to your intent. +# 0051 - 0060 And Another Thing - Someone is pitching questionable ideas at you, and you can go along with them or not, but they keep coming at you. +# 0061 - 0070 To My Beloved GetRelation - Embarrassing older relation speech. +# 0071 - 0080 Oath in Moment - Your liege offers you a favour for your support. +################################################## + + + + + + + + + + +################################################## +# MISC SCRIPTED TRIGGERS & EFFECTS + +# Filter out characters who aren't appropriate to be giving their unasked opinions on the activity's setup options. +scripted_trigger ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = { + # Filter out players immediately. + is_ai = yes + # Now let's make sure it's no one who wouldn't be having this conversation or who we might want to reserve for something else. + NOR = { + this = root + this = scope:activity.activity_host + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + this ?= root.intent_target + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } +} + +# Standard stress loss for hosts agreeing with criticisms. +scripted_effect ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = { + # Host reacts a bit differently to feedback. + if = { + limit = { this = scope:activity.activity_host } + stress_impact = { + gregarious = miniscule_stress_impact_loss + humble = minor_stress_impact_loss + arrogant = miniscule_stress_impact_gain + } + } + else = { + stress_impact = { gregarious = miniscule_stress_impact_loss } + } +} + +scripted_effect ep2_wedding_ewan_0000_opinion_swap_effect = { + # Progress heavily towards friendship. + progress_towards_friend_effect = { + CHARACTER = $FAVOURED_CHAR$ + REASON = friend_dinner + OPINION = 35 + } + reverse_add_opinion = { + target = $REJECTED_CHAR$ + modifier = respect_opinion + opinion = -15 + } +} + +scripted_effect ep2_wedding_ewan_0000_host_approves_effect = { + # If you're the host, gain some prestige for ignoring them. + if = { + limit = { this = scope:activity.activity_host } + add_prestige = minor_prestige_gain + } + # Otherwise, gain some opinion with the host. + else = { + reverse_add_opinion = { + target = scope:activity.activity_host + modifier = friendliness_opinion + opinion = 15 + } + } +} + +scripted_effect ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { + $TARGET$ = { + # Diplomacy. + if = { + limit = { has_trait = education_diplomacy } + # T1. + if = { + limit = { has_trait = education_diplomacy_1 } + root = { add_diplomacy_lifestyle_xp = minor_lifestyle_xp } + } + # T2. + else_if = { + limit = { has_trait = education_diplomacy_2 } + root = { add_diplomacy_lifestyle_xp = medium_lifestyle_xp } + } + # T3. + else_if = { + limit = { has_trait = education_diplomacy_3 } + root = { add_diplomacy_lifestyle_xp = major_lifestyle_xp } + } + # T4. + else_if = { + limit = { + OR = { + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + } + } + root = { add_diplomacy_lifestyle_xp = massive_lifestyle_xp } + } + } + # Martial. + if = { + limit = { has_trait = education_martial } + # T1. + if = { + limit = { has_trait = education_martial_1 } + root = { add_martial_lifestyle_xp = minor_lifestyle_xp } + } + # T2. + else_if = { + limit = { has_trait = education_martial_2 } + root = { add_martial_lifestyle_xp = medium_lifestyle_xp } + } + # T3. + else_if = { + limit = { has_trait = education_martial_3 } + root = { add_martial_lifestyle_xp = major_lifestyle_xp } + } + # T4. + else_if = { + limit = { + OR = { + has_trait = education_martial_4 + has_trait = education_martial_5 + } + } + root = { add_martial_lifestyle_xp = massive_lifestyle_xp } + } + } + # Stewardship. + if = { + limit = { has_trait = education_stewardship } + # T1. + if = { + limit = { has_trait = education_stewardship_1 } + root = { add_stewardship_lifestyle_xp = minor_lifestyle_xp } + } + # T2. + else_if = { + limit = { has_trait = education_stewardship_2 } + root = { add_stewardship_lifestyle_xp = medium_lifestyle_xp } + } + # T3. + else_if = { + limit = { has_trait = education_stewardship_3 } + root = { add_stewardship_lifestyle_xp = major_lifestyle_xp } + } + # T4. + else_if = { + limit = { + OR = { + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } + } + root = { add_stewardship_lifestyle_xp = massive_lifestyle_xp } + } + } + # Intrigue. + if = { + limit = { has_trait = education_intrigue } + # T1. + if = { + limit = { has_trait = education_intrigue_1 } + root = { add_intrigue_lifestyle_xp = minor_lifestyle_xp } + } + # T2. + else_if = { + limit = { has_trait = education_intrigue_2 } + root = { add_intrigue_lifestyle_xp = medium_lifestyle_xp } + } + # T3. + else_if = { + limit = { has_trait = education_intrigue_3 } + root = { add_intrigue_lifestyle_xp = major_lifestyle_xp } + } + # T4. + else_if = { + limit = { + OR = { + has_trait = education_intrigue_4 + has_trait = education_intrigue_5 + } + } + root = { add_intrigue_lifestyle_xp = massive_lifestyle_xp } + } + } + # Learning. + if = { + limit = { has_trait = education_learning } + # T1. + if = { + limit = { has_trait = education_learning_1 } + root = { add_learning_lifestyle_xp = minor_lifestyle_xp } + } + # T2. + else_if = { + limit = { has_trait = education_learning_2 } + root = { add_learning_lifestyle_xp = medium_lifestyle_xp } + } + # T3. + else_if = { + limit = { has_trait = education_learning_3 } + root = { add_learning_lifestyle_xp = major_lifestyle_xp } + } + # T4. + else_if = { + limit = { + OR = { + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + root = { add_learning_lifestyle_xp = massive_lifestyle_xp } + } + } + } +} + + + + + + + + + + + +################################################## +# BANQUET PHASE + +################################################## +# Quite the Spectacle +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# Character likes T1 entertainment. +scripted_trigger ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = { + OR = { + # Thinks too much entertainment is frivolous. + has_trait = diligent + # Prefers 1-on-1 conversations to showy jugglers. + ## N-not that I'm sad because I can't juggle. + ### My hands are just stupid. + has_trait = shy + # Prefers lagom entertainment. + has_trait = humble + has_trait = content + # Doesn't respect any entertaining profession. + has_trait = honest + ## Just characters are kill-joys. Change my mind. + has_trait = just + # Likes safe entertainment that doesn't give them the jitters. + has_trait = craven + # Doesn't trust large bands of strangers. + has_trait = paranoid + } +} +# Character hates T1 entertainment. +scripted_trigger ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = { + OR = { + # Likes a good joke/acrobat/actor. + has_trait = lazy + has_trait = gregarious + # Prefers big, upscale-everything. + has_trait = arrogant + has_trait = ambitious + # Appreciates the entertainer's art. + has_trait = deceitful + has_trait = arbitrary + # Wants bombastic, dangerous entertainment. + has_trait = brave + # Loves large bands of dangerous strangers. + has_trait = trusting + } +} +# Character likes T2 entertainment. +scripted_trigger ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = { + OR = { + # Accepting of the average. + has_trait = content + has_trait = compassionate + # Likes that money was spent. + has_trait = generous + # Likes the atmosphere being high-effort but not _too_ bustling. + has_trait = calm + has_trait = patient + # Likes a middling option. + has_trait = fickle + has_trait = cynical + } +} +# Character hates T2 entertainment. +scripted_trigger ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = { + OR = { + # Hates the average. + has_trait = ambitious + has_trait = arrogant + # Would have preferred all the money, to take advantage, or else none, not to waste any. + has_trait = greedy + # Want a more bustling atmosphere that goes further than this. + has_trait = wrathful + has_trait = impatient + # Feels that if it was worth doing, it's worth doing to its best. + has_trait = stubborn + has_trait = zealous + } +} +# Character likes T3 entertainment. +scripted_trigger ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = { + OR = { + # Loves excellent entertainment. + has_trait = lazy + has_trait = gregarious + # Prefers big, upscale-everything. + has_trait = arrogant + has_trait = ambitious + # Appreciates the entertainer's art. + has_trait = deceitful + has_trait = arbitrary + # Wants bombastic, dangerous entertainment. + has_trait = brave + # Loves large bands of dangerous strangers. + has_trait = trusting + } +} +# Character hates T3 entertainment. +scripted_trigger ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = { + OR = { + # So much entertainment is frivolous. + has_trait = diligent + # This is way, way too loud. + has_trait = shy + # Wants entertainment to be more lagom. + has_trait = humble + has_trait = content + # Doesn't respect any entertaining profession. + has_trait = honest + ## Just characters are kill-joys. Change my mind. + has_trait = just + # Likes safe entertainment that doesn't give them the jitters. + has_trait = craven + # Doesn't trust large bands of strangers. + has_trait = paranoid + } +} + +# Connect with various types of characters over the entertainment. +ep2_wedding_ewan.0001 = { + type = activity_event + title = ep2_wedding_ewan.0001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_bad + } + } + } + desc = { + desc = ep2_wedding_ewan.0001.desc.intro.bad + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = diligent } + } + desc = ep2_wedding_ewan.0001.desc.t1.love.diligent + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = shy } + } + desc = ep2_wedding_ewan.0001.desc.t1.love.shy + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = humble } + } + desc = ep2_wedding_ewan.0001.desc.t1.love.humble + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = content } + } + desc = ep2_wedding_ewan.0001.desc.t1.love.content + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = honest } + } + desc = ep2_wedding_ewan.0001.desc.t1.love.honest + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = just } + } + desc = ep2_wedding_ewan.0001.desc.t1.love.just + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = craven } + } + desc = ep2_wedding_ewan.0001.desc.t1.love.craven + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = paranoid } + } + desc = ep2_wedding_ewan.0001.desc.t1.love.paranoid + } + } + } + } + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_normal + } + } + } + desc = { + desc = ep2_wedding_ewan.0001.desc.intro.normal + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = content } + } + desc = ep2_wedding_ewan.0001.desc.t2.love.content + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = compassionate } + } + desc = ep2_wedding_ewan.0001.desc.t2.love.compassionate + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = generous } + } + desc = ep2_wedding_ewan.0001.desc.t2.love.generous + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = calm } + } + desc = ep2_wedding_ewan.0001.desc.t2.love.calm + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = patient } + } + desc = ep2_wedding_ewan.0001.desc.t2.love.patient + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = fickle } + } + desc = ep2_wedding_ewan.0001.desc.t2.love.fickle + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = cynical } + } + desc = ep2_wedding_ewan.0001.desc.t2.love.cynical + } + } + } + } + } + desc = { + desc = ep2_wedding_ewan.0001.desc.intro.good + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = lazy } + } + desc = ep2_wedding_ewan.0001.desc.t3.love.lazy + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = gregarious } + } + desc = ep2_wedding_ewan.0001.desc.t3.love.gregarious + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0001.desc.t3.love.arrogant + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0001.desc.t3.love.ambitious + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = deceitful } + } + desc = ep2_wedding_ewan.0001.desc.t3.love.deceitful + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = arbitrary } + } + desc = ep2_wedding_ewan.0001.desc.t3.love.arbitrary + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = brave } + } + desc = ep2_wedding_ewan.0001.desc.t3.love.brave + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = trusting } + } + desc = ep2_wedding_ewan.0001.desc.t3.love.trusting + } + } + } + } + desc = ep2_wedding_ewan.0001.desc.midtro + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_bad + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = lazy } + } + desc = ep2_wedding_ewan.0001.desc.t1.hate.lazy + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = gregarious } + } + desc = ep2_wedding_ewan.0001.desc.t1.hate.gregarious + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0001.desc.t1.hate.arrogant + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0001.desc.t1.hate.ambitious + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = deceitful } + } + desc = ep2_wedding_ewan.0001.desc.t1.hate.deceitful + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = arbitrary } + } + desc = ep2_wedding_ewan.0001.desc.t1.hate.arbitrary + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = brave } + } + desc = ep2_wedding_ewan.0001.desc.t1.hate.brave + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = trusting } + } + desc = ep2_wedding_ewan.0001.desc.t1.hate.trusting + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = lazy + has_trait = gregarious + has_trait = arrogant + has_trait = ambitious + has_trait = deceitful + has_trait = arbitrary + has_trait = brave + has_trait = trusting + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_normal + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0001.desc.t2.hate.ambitious + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0001.desc.t2.hate.arrogant + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = greedy } + } + desc = ep2_wedding_ewan.0001.desc.t2.hate.greedy + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = wrathful } + } + desc = ep2_wedding_ewan.0001.desc.t2.hate.wrathful + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = impatient } + } + desc = ep2_wedding_ewan.0001.desc.t2.hate.impatient + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = stubborn } + } + desc = ep2_wedding_ewan.0001.desc.t2.hate.stubborn + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = zealous } + } + desc = ep2_wedding_ewan.0001.desc.t2.hate.zealous + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = ambitious + has_trait = arrogant + has_trait = greedy + has_trait = wrathful + has_trait = impatient + has_trait = stubborn + has_trait = zealous + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = diligent } + } + desc = ep2_wedding_ewan.0001.desc.t3.hate.diligent + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = shy } + } + desc = ep2_wedding_ewan.0001.desc.t3.hate.shy + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = humble } + } + desc = ep2_wedding_ewan.0001.desc.t3.hate.humble + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = content } + } + desc = ep2_wedding_ewan.0001.desc.t3.hate.content + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = honest } + } + desc = ep2_wedding_ewan.0001.desc.t3.hate.honest + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = just } + } + desc = ep2_wedding_ewan.0001.desc.t3.hate.just + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = craven } + } + desc = ep2_wedding_ewan.0001.desc.t3.hate.craven + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = paranoid } + } + desc = ep2_wedding_ewan.0001.desc.t3.hate.paranoid + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = diligent + has_trait = shy + has_trait = humble + has_trait = content + has_trait = honest + has_trait = just + has_trait = craven + has_trait = paranoid + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + } + theme = feast_activity + left_portrait = { + character = scope:char_1 + animation = throne_room_applaud_1 + } + center_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:char_2 + animation = boredom + } + + cooldown = { years = 1 } + + trigger = { + scope:activity = { + # T1. + trigger_if = { + limit = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_bad + } + } + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = yes + this != scope:char_temp + } + } + } + } + # T2. + trigger_else_if = { + limit = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_normal + } + } + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = yes + this != scope:char_temp + } + } + } + } + # T3. + trigger_else = { + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = yes + this != scope:char_temp + } + } + } + } + } + } + + immediate = { + # Try to grab our actors. + scope:activity = { + # T1. + if = { + limit = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_bad + } + } + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = yes + ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = yes + ep2_wedding_ewan_0001_entertainment_t1_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t1_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + # T2. + else_if = { + limit = { + has_activity_option = { + category = wedding_option_entertainment + option = wedding_entertainment_normal + } + } + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = yes + ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = yes + ep2_wedding_ewan_0001_entertainment_t2_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t2_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + # T3. + else = { + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = yes + ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = yes + ep2_wedding_ewan_0001_entertainment_t3_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0001_entertainment_t3_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + } + # If relevant, grab our intent target. + if = { + limit = { has_activity_intent = murder_attendee_intent } + intent_target = { save_scope_as = intent_target } + } + } + + # Agree with scope:char_1. + option = { + name = { + trigger = { + this != scope:activity.activity_host + } + text = ep2_wedding_ewan.0001.a + } + name = { + trigger = { this = scope:activity.activity_host } + text = ep2_wedding_ewan.0001.a.host + } + flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_1 + + # Apply opinion. + ep2_wedding_ewan_0000_opinion_swap_effect = { + FAVOURED_CHAR = scope:char_1 + REJECTED_CHAR = scope:char_2 + } + # Give some lifestyle XP for who you hobnob with. + ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_1 } + + ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { + opinion_target = scope:char_1 + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:char_2 + multiplier = -0.5 + } + } + } + + # Agree with scope:char_2. + option = { + name = { + trigger = { + this != scope:activity.activity_host + } + text = ep2_wedding_ewan.0001.b + } + name = { + trigger = { this = scope:activity.activity_host } + text = ep2_wedding_ewan.0001.b.host + } + flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_2 + + # Apply opinion. + ep2_wedding_ewan_0000_opinion_swap_effect = { + FAVOURED_CHAR = scope:char_2 + REJECTED_CHAR = scope:char_1 + } + # Give some lifestyle XP for who you hobnob with. + ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_2 } + + ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { + opinion_target = scope:char_2 + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:char_1 + multiplier = -0.5 + } + } + } + + # Murder: my eyes are on scope:intent_target. + option = { + 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 + + scope:intent_target = { + # They're unsettled by your staring. + add_stress = medium_stress_gain + # Then we add a little concern. + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -10 + } + } + + stress_impact = { vengeful = minor_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = 1 + ai_sociability = -0.5 + } + } + } + + # Focus on the acts. + option = { + name = ep2_wedding_ewan.0001.d + + # Opinion with the activty_host, or else prestige. + ep2_wedding_ewan_0000_host_approves_effect = yes + + # We give base stress loss for this'un too. + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -2 + } + } + } +} + +################################################## +# Food Fit for a... +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +# Character likes T1 food. +scripted_trigger ep2_wedding_ewan_0011_food_t1_likes_trigger = { + OR = { + # Has more sedate food preferences. + has_trait = temperate + # Is ok with an only moderately fancy meal. + has_trait = humble + has_trait = content + # Appreciates something with a few fewer courses than usual + has_trait = impatient + # Less food, and less fancy food, means a harder time hiding poisons and other mischiefs. + has_trait = paranoid + # Prefers to eat mostly the same food, if possible. + has_trait = stubborn + } +} +# Character hates T1 food. +scripted_trigger ep2_wedding_ewan_0011_food_t1_hates_trigger = { + OR = { + # Likes plenty of exotic foods. + has_trait = gluttonous + # Prefers a large, fancy meal. + has_trait = arrogant + has_trait = ambitious + # Has the patience for incredibly long meals. + has_trait = patient + # Doesn't see why they wouldn't have more variety. + has_trait = trusting + has_trait = fickle + } +} +# Character likes T2 food. +scripted_trigger ep2_wedding_ewan_0011_food_t2_likes_trigger = { + OR = { + # Accepting of the average. + has_trait = content + has_trait = compassionate + # Likes that money was spent. + has_trait = generous + # Likes the atmosphere being high-effort but not _too_ bustling. + has_trait = calm + has_trait = patient + # Likes a middling option. + has_trait = cynical + } +} +# Character hates T2 food. +scripted_trigger ep2_wedding_ewan_0011_food_t2_hates_trigger = { + OR = { + # Hates the average. + has_trait = ambitious + has_trait = arrogant + # Would have preferred all the money, to take advantage, or else none, not to waste any. + has_trait = greedy + # Want a more bustling atmosphere that goes further than this. + has_trait = wrathful + has_trait = impatient + # Feels that if it was worth doing, it's worth doing to its best. + has_trait = zealous + } +} +# Character likes T3 food. +scripted_trigger ep2_wedding_ewan_0011_food_t3_likes_trigger = { + OR = { + # Likes plenty of exotic foods. + has_trait = gluttonous + # Prefers a large, fancy meal. + has_trait = arrogant + has_trait = ambitious + # Has the patience for incredibly long meals. + has_trait = patient + # Loves the scope and variety of strange foodstuffs. + has_trait = trusting + # Really likes variety and being able to flit. + has_trait = fickle + } +} +# Character hates T3 food. +scripted_trigger ep2_wedding_ewan_0011_food_t3_hates_trigger = { + OR = { + # Has more sedate food preferences. + has_trait = temperate + # Doesn't like showing off this much. + has_trait = humble + has_trait = content + # Can't stand the sheer number of courses. + has_trait = impatient + # Less food, and less fancy food, means a harder time hiding poisons and other mischiefs. + has_trait = paranoid + # Prefers to eat mostly the same food, if possible. + has_trait = stubborn + } +} + +# Connect with various types of characters over the food. +ep2_wedding_ewan.0011 = { + type = activity_event + title = ep2_wedding_ewan.0011.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_bad + } + } + } + desc = { + desc = ep2_wedding_ewan.0011.desc.intro.bad + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = temperate } + } + desc = ep2_wedding_ewan.0011.desc.t1.love.temperate + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = humble } + } + desc = ep2_wedding_ewan.0011.desc.t1.love.humble + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = content } + } + desc = ep2_wedding_ewan.0011.desc.t1.love.content + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = impatient } + } + desc = ep2_wedding_ewan.0011.desc.t1.love.impatient + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = paranoid } + } + desc = ep2_wedding_ewan.0011.desc.t1.love.paranoid + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = stubborn } + } + desc = ep2_wedding_ewan.0011.desc.t1.love.stubborn + } + } + } + } + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_normal + } + } + } + desc = { + desc = ep2_wedding_ewan.0011.desc.intro.normal + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = content } + } + desc = ep2_wedding_ewan.0011.desc.t2.love.content + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = compassionate } + } + desc = ep2_wedding_ewan.0011.desc.t2.love.compassionate + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = generous } + } + desc = ep2_wedding_ewan.0011.desc.t2.love.generous + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = calm } + } + desc = ep2_wedding_ewan.0011.desc.t2.love.calm + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = patient } + } + desc = ep2_wedding_ewan.0011.desc.t2.love.patient + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = cynical } + } + desc = ep2_wedding_ewan.0011.desc.t2.love.cynical + } + } + } + } + } + desc = { + desc = ep2_wedding_ewan.0011.desc.intro.good + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = gluttonous } + } + desc = ep2_wedding_ewan.0011.desc.t3.love.gluttonous + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0011.desc.t3.love.arrogant + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0011.desc.t3.love.ambitious + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = patient } + } + desc = ep2_wedding_ewan.0011.desc.t3.love.patient + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = trusting } + } + desc = ep2_wedding_ewan.0011.desc.t3.love.trusting + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = fickle } + } + desc = ep2_wedding_ewan.0011.desc.t3.love.fickle + } + } + } + } + desc = ep2_wedding_ewan.0011.desc.midtro + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_bad + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = gluttonous } + } + desc = ep2_wedding_ewan.0011.desc.t1.hate.gluttonous + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0011.desc.t1.hate.arrogant + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0011.desc.t1.hate.ambitious + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = patient } + } + desc = ep2_wedding_ewan.0011.desc.t1.hate.patient + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = trusting } + } + desc = ep2_wedding_ewan.0011.desc.t1.hate.trusting + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = fickle } + } + desc = ep2_wedding_ewan.0011.desc.t1.hate.fickle + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = gluttonous + has_trait = arrogant + has_trait = ambitious + has_trait = patient + has_trait = trusting + has_trait = fickle + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_normal + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0011.desc.t2.hate.ambitious + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0011.desc.t2.hate.arrogant + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = greedy } + } + desc = ep2_wedding_ewan.0011.desc.t2.hate.greedy + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = wrathful } + } + desc = ep2_wedding_ewan.0011.desc.t2.hate.wrathful + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = impatient } + } + desc = ep2_wedding_ewan.0011.desc.t2.hate.impatient + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = zealous } + } + desc = ep2_wedding_ewan.0011.desc.t2.hate.zealous + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = ambitious + has_trait = arrogant + has_trait = greedy + has_trait = wrathful + has_trait = impatient + has_trait = zealous + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = temperate } + } + desc = ep2_wedding_ewan.0011.desc.t3.hate.temperate + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = humble } + } + desc = ep2_wedding_ewan.0011.desc.t3.hate.humble + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = content } + } + desc = ep2_wedding_ewan.0011.desc.t3.hate.content + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = impatient } + } + desc = ep2_wedding_ewan.0011.desc.t3.hate.impatient + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = paranoid } + } + desc = ep2_wedding_ewan.0011.desc.t3.hate.paranoid + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = stubborn } + } + desc = ep2_wedding_ewan.0011.desc.t3.hate.stubborn + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = temperate + has_trait = humble + has_trait = content + has_trait = impatient + has_trait = paranoid + has_trait = stubborn + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + } + theme = feast_activity + left_portrait = { + character = scope:char_1 + animation = drink_goblet + } + center_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:char_2 + animation = disapproval + } + + cooldown = { years = 1 } + + trigger = { + scope:activity = { + # T1. + trigger_if = { + limit = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_bad + } + } + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t1_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t1_hates_trigger = yes + this != scope:char_temp + } + } + } + } + # T2. + trigger_else_if = { + limit = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_normal + } + } + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t2_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t2_hates_trigger = yes + this != scope:char_temp + } + } + } + } + # T3. + trigger_else = { + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t3_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t3_hates_trigger = yes + this != scope:char_temp + } + } + } + } + } + } + + immediate = { + scope:activity = { + # Try to grab our actors. + ## T1. + if = { + limit = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_bad + } + } + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t1_likes_trigger = yes + ep2_wedding_ewan_0011_food_t1_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t1_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t1_hates_trigger = yes + ep2_wedding_ewan_0011_food_t1_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t1_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + ## T2. + else_if = { + limit = { + has_activity_option = { + category = wedding_option_food + option = wedding_food_normal + } + } + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t2_likes_trigger = yes + ep2_wedding_ewan_0011_food_t2_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t2_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t2_hates_trigger = yes + ep2_wedding_ewan_0011_food_t2_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t2_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + ## T3. + else = { + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t3_likes_trigger = yes + ep2_wedding_ewan_0011_food_t3_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t3_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t3_hates_trigger = yes + ep2_wedding_ewan_0011_food_t3_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0011_food_t3_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + # Now we try to process a decent activity target. + if = { + limit = { + root = { has_activity_intent = banquet_mischief_intent } + } + ordered_attending_character = { + limit = { + NOR = { + this = root + this = scope:char_1 + this = scope:char_2 + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + # No players. + is_ai = yes + } + order_by = { + # Nab opinion. + add = "opinion(root)" + # Invert it, as we want characters who hate us ranked first. + multiply = -1 + # Aaaand multiply by tier to get more interesting characters who hate us. + if = { + # Unlanded have a rank of zero, so filter this a bit. + limit = { is_landed = yes } + multiply = highest_held_title_tier + } + } + save_scope_as = intent_target + } + } + } + } + + # Agree with scope:char_1. + option = { + name = { + trigger = { + this != scope:activity.activity_host + } + text = ep2_wedding_ewan.0011.a + } + name = { + trigger = { this = scope:activity.activity_host } + text = ep2_wedding_ewan.0011.a.host + } + flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_1 + + # Apply opinion. + ep2_wedding_ewan_0000_opinion_swap_effect = { + FAVOURED_CHAR = scope:char_1 + REJECTED_CHAR = scope:char_2 + } + # Give some lifestyle XP for who you hobnob with. + ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_1 } + + ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { + opinion_target = scope:char_1 + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:char_2 + multiplier = -0.5 + } + } + } + + # Agree with scope:char_2. + option = { + name = { + trigger = { + this != scope:activity.activity_host + } + text = ep2_wedding_ewan.0011.b + } + name = { + trigger = { this = scope:activity.activity_host } + text = ep2_wedding_ewan.0011.b.host + } + flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_2 + + # Apply opinion. + ep2_wedding_ewan_0000_opinion_swap_effect = { + FAVOURED_CHAR = scope:char_2 + REJECTED_CHAR = scope:char_1 + } + # Give some lifestyle XP for who you hobnob with. + ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_2 } + + ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { + opinion_target = scope:char_2 + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:char_1 + multiplier = -0.5 + } + } + } + + # Mischief: spill something on someone. + option = { + 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 + + # You try to trip a server onto someone. + duel = { + skill = intrigue + target = scope:intent_target + # You're successful. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0011.c.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0011.c.tt.success + left_icon = scope:intent_target + scope:intent_target = { + # Lose some prestige. + add_prestige = minor_prestige_loss + # Gain some stress. + add_stress = medium_stress_gain + } + } + } + # The server rights themselves. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0011.c.tt.failure + send_interface_toast = { + title = ep2_wedding_ewan.0011.c.tt.failure + left_icon = scope:intent_target + # Considered borish. + add_prestige = miniscule_prestige_loss + # Plus scope:intent_target notices. + reverse_add_opinion = { + target = scope:intent_target + modifier = suspicion_opinion + opinion = -10 + } + } + } + } + + # We give base stress loss for this'un too. + stress_impact = { + base = medium_stress_impact_loss + deceitful = minor_stress_impact_loss + honest = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.25 + ai_rationality = -0.25 + } + } + } + + # Nod along without paying attention. + option = { + name = ep2_wedding_ewan.0011.d + + # Opinion with the activty_host, or else prestige. + ep2_wedding_ewan_0000_host_approves_effect = yes + + # We give base stress loss for this'un too. + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_loss + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -2 + } + } + } +} + +################################################## +# Shimmering, Shining +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# Character likes T1 decorations. +scripted_trigger ep2_wedding_ewan_0021_decoration_t1_likes_trigger = { + OR = { + # Appreciate it for being low-key. + has_trait = content + has_trait = lazy + has_trait = humble + # Understand that effort still went into it. + has_trait = forgiving + has_trait = compassionate + # Contrarian. + has_trait = arbitrary + # Approves of frugality. + has_trait = greedy + } +} +# Character hates T1 decorations. +scripted_trigger ep2_wedding_ewan_0021_decoration_t1_hates_trigger = { + OR = { + # Hates it for being low-key. + has_trait = ambitious + has_trait = diligent + has_trait = arrogant + # Thinks they could've done better or not hyped it up so much. + has_trait = honest + has_trait = generous + # Thinks it's just not what they expected. + has_trait = just + } +} +# Character likes T2 decorations. +scripted_trigger ep2_wedding_ewan_0021_decoration_t2_likes_trigger = { + OR = { + # Accepting of the average. + has_trait = content + has_trait = compassionate + # Likes that money was spent. + has_trait = generous + # Likes the atmosphere being high-effort but not _too_ bustling. + has_trait = calm + has_trait = patient + # Likes a middling option. + has_trait = fickle + has_trait = cynical + } +} +# Character hates T2 decorations. +scripted_trigger ep2_wedding_ewan_0021_decoration_t2_hates_trigger = { + OR = { + # Hates the average. + has_trait = ambitious + has_trait = arrogant + # Would have preferred all the money, to take advantage, or else none, not to waste any. + has_trait = greedy + # Want a more bustling atmosphere that goes further than this. + has_trait = wrathful + has_trait = impatient + # Feels that if it was worth doing, it's worth doing to its best. + has_trait = stubborn + has_trait = zealous + } +} +# Character likes T3 decorations. +scripted_trigger ep2_wedding_ewan_0021_decoration_t3_likes_trigger = { + OR = { + # Loves an over-the-top wedding. + has_trait = ambitious + has_trait = diligent + has_trait = arrogant + # Think it had the appropriate amount of effort put in. + has_trait = honest + has_trait = just + # Happy to see all the money being spent. + has_trait = greedy + has_trait = generous + } +} +# Character hates T3 decorations. +scripted_trigger ep2_wedding_ewan_0021_decoration_t3_hates_trigger = { + OR = { + # Think this might all be a bit much. + has_trait = content + has_trait = lazy + has_trait = humble + # Worry that the marriage is getting lost amidst all of this pomp. + has_trait = compassionate + # Contrarian. + has_trait = arbitrary + } +} + +# Connect with various types of characters over the venue & its decorations. +ep2_wedding_ewan.0021 = { + type = activity_event + title = ep2_wedding_ewan.0021.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + } + desc = { + desc = ep2_wedding_ewan.0021.desc.intro.bad + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = content } + } + desc = ep2_wedding_ewan.0021.desc.t1.love.content + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = lazy } + } + desc = ep2_wedding_ewan.0021.desc.t1.love.lazy + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = humble } + } + desc = ep2_wedding_ewan.0021.desc.t1.love.humble + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = forgiving } + } + desc = ep2_wedding_ewan.0021.desc.t1.love.forgiving + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = compassionate } + } + desc = ep2_wedding_ewan.0021.desc.t1.love.compassionate + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = arbitrary } + } + desc = ep2_wedding_ewan.0021.desc.t1.love.arbitrary + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = greedy } + } + desc = ep2_wedding_ewan.0021.desc.t1.love.greedy + } + } + } + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_normal + } + } + } + desc = { + desc = ep2_wedding_ewan.0021.desc.intro.normal + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = content } + } + desc = ep2_wedding_ewan.0021.desc.t2.love.content + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = compassionate } + } + desc = ep2_wedding_ewan.0021.desc.t2.love.compassionate + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = generous } + } + desc = ep2_wedding_ewan.0021.desc.t2.love.generous + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = calm } + } + desc = ep2_wedding_ewan.0021.desc.t2.love.calm + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = patient } + } + desc = ep2_wedding_ewan.0021.desc.t2.love.patient + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = fickle } + } + desc = ep2_wedding_ewan.0021.desc.t2.love.fickle + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = cynical } + } + desc = ep2_wedding_ewan.0021.desc.t2.love.cynical + } + } + } + } + desc = { + desc = ep2_wedding_ewan.0021.desc.intro.good + random_valid = { + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0021.desc.t3.love.ambitious + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = diligent } + } + desc = ep2_wedding_ewan.0021.desc.t3.love.diligent + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0021.desc.t3.love.arrogant + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = honest } + } + desc = ep2_wedding_ewan.0021.desc.t3.love.honest + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = just } + } + desc = ep2_wedding_ewan.0021.desc.t3.love.just + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = greedy } + } + desc = ep2_wedding_ewan.0021.desc.t3.love.greedy + } + triggered_desc = { + trigger = { + scope:char_1 = { has_trait = generous } + } + desc = ep2_wedding_ewan.0021.desc.t3.love.generous + } + } + } + } + desc = ep2_wedding_ewan.0021.desc.midtro + first_valid = { + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0021.desc.t1.hate.ambitious + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = diligent } + } + desc = ep2_wedding_ewan.0021.desc.t1.hate.diligent + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0021.desc.t1.hate.arrogant + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = honest } + } + desc = ep2_wedding_ewan.0021.desc.t1.hate.honest + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = generous } + } + desc = ep2_wedding_ewan.0021.desc.t1.hate.generous + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = just } + } + desc = ep2_wedding_ewan.0021.desc.t1.hate.just + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = ambitious + has_trait = diligent + has_trait = arrogant + has_trait = honest + has_trait = generous + has_trait = just + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + triggered_desc = { + trigger = { + scope:activity = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_normal + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0021.desc.t2.hate.ambitious + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0021.desc.t2.hate.arrogant + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = greedy } + } + desc = ep2_wedding_ewan.0021.desc.t2.hate.greedy + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = wrathful } + } + desc = ep2_wedding_ewan.0021.desc.t2.hate.wrathful + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = impatient } + } + desc = ep2_wedding_ewan.0021.desc.t2.hate.impatient + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = stubborn } + } + desc = ep2_wedding_ewan.0021.desc.t2.hate.stubborn + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = zealous } + } + desc = ep2_wedding_ewan.0021.desc.t2.hate.zealous + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = ambitious + has_trait = arrogant + has_trait = greedy + has_trait = wrathful + has_trait = impatient + has_trait = stubborn + has_trait = zealous + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = content } + } + desc = ep2_wedding_ewan.0021.desc.t3.hate.content + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = lazy } + } + desc = ep2_wedding_ewan.0021.desc.t3.hate.lazy + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = humble } + } + desc = ep2_wedding_ewan.0021.desc.t3.hate.humble + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = compassionate } + } + desc = ep2_wedding_ewan.0021.desc.t3.hate.compassionate + } + triggered_desc = { + trigger = { + scope:char_2 = { has_trait = arbitrary } + } + desc = ep2_wedding_ewan.0021.desc.t3.hate.arbitrary + } + triggered_desc = { + trigger = { + scope:char_2 = { + NOR = { + has_trait = content + has_trait = lazy + has_trait = humble + has_trait = compassionate + has_trait = arbitrary + } + } + } + desc = ep2_wedding_ewan.0000.desc.hate.fallback + } + } + } + } + } + theme = feast_activity + left_portrait = { + character = scope:char_1 + animation = admiration + } + center_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:char_2 + animation = disapproval + } + + cooldown = { years = 1 } + + trigger = { + scope:activity = { + # T1. + trigger_if = { + limit = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t1_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t1_hates_trigger = yes + this != scope:char_temp + } + } + } + } + # T2. + trigger_else_if = { + limit = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_normal + } + } + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t2_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t2_hates_trigger = yes + this != scope:char_temp + } + } + } + } + # T3. + trigger_else = { + # Check for a character who likes the setup. + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t3_likes_trigger = yes + # Now we need to wiggle a bit to make sure they don't overlap with one who _dislikes_ the setup. + save_temporary_scope_as = char_temp + scope:activity = { + any_attending_character = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t3_hates_trigger = yes + this != scope:char_temp + } + } + } + } + } + } + + immediate = { + # Try to grab our actors. + scope:activity = { + # T1. + if = { + limit = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_bad + } + } + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t1_likes_trigger = yes + ep2_wedding_ewan_0021_decoration_t1_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t1_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t1_hates_trigger = yes + ep2_wedding_ewan_0021_decoration_t1_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t1_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + # T2. + else_if = { + limit = { + has_activity_option = { + category = wedding_option_decoration + option = wedding_decoration_normal + } + } + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t2_likes_trigger = yes + ep2_wedding_ewan_0021_decoration_t2_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t2_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t2_hates_trigger = yes + ep2_wedding_ewan_0021_decoration_t2_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t2_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + # T3. + else = { + # Check for a character who likes the setup. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t3_likes_trigger = yes + ep2_wedding_ewan_0021_decoration_t3_hates_trigger = no + } + # Failing that, grab anyone valid. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t3_likes_trigger = yes + } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_1 + } + # And for one who dislikes it. + ordered_attending_character = { + # Try to grab opposing characters first. + limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t3_hates_trigger = yes + ep2_wedding_ewan_0021_decoration_t3_likes_trigger = no + } + # Failing that, grab anyone appropriate. + alternative_limit = { + ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes + ep2_wedding_ewan_0021_decoration_t3_hates_trigger = yes + } + # Failing _that_, grab anyone at all. + alternative_limit = { ep2_wedding_ewan_0000_activity_option_opinion_characters_standard_filter_trigger = yes } + # Make sure we're looking at interesting people. + order_by = highest_held_title_tier + save_scope_as = char_2 + } + } + } + # If relevant, grab our intent target. + if = { + limit = { has_activity_intent = woo_attendee_intent } + intent_target = { save_scope_as = intent_target } + } + } + + # Agree with scope:char_1. + option = { + name = { + trigger = { + this != scope:activity.activity_host + } + text = ep2_wedding_ewan.0021.a + } + name = { + trigger = { this = scope:activity.activity_host } + text = ep2_wedding_ewan.0021.a.host + } + flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_1 + + # Apply opinion. + ep2_wedding_ewan_0000_opinion_swap_effect = { + FAVOURED_CHAR = scope:char_1 + REJECTED_CHAR = scope:char_2 + } + # Give some lifestyle XP for who you hobnob with. + ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_1 } + + ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { + opinion_target = scope:char_1 + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:char_2 + multiplier = -0.5 + } + } + } + + # Agree with scope:char_2. + option = { + name = { + trigger = { + this != scope:activity.activity_host + } + text = ep2_wedding_ewan.0021.b + } + name = { + trigger = { this = scope:activity.activity_host } + text = ep2_wedding_ewan.0021.b.host + } + flavor = ep2_wedding_ewan.0000.flavour.hobnob.char_2 + + # Apply opinion. + ep2_wedding_ewan_0000_opinion_swap_effect = { + FAVOURED_CHAR = scope:char_2 + REJECTED_CHAR = scope:char_1 + } + # Give some lifestyle XP for who you hobnob with. + ep2_wedding_ewan_0000_award_lifestyle_xp_per_conversationalist_effect = { TARGET = scope:char_2 } + + ep2_wedding_ewan_0000_host_takes_criticism_stress_gain_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { + opinion_target = scope:char_2 + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:char_1 + multiplier = -0.5 + } + } + } + + # Seduce: try to chat your target up. + option = { + name = ep2_wedding_ewan.0021.c + trigger = { has_activity_intent = woo_attendee_intent } + custom_tooltip = available_because_intent_tt + + # Sprinkle a bit of opinion in there. + reverse_add_opinion = { + target = scope:intent_target + modifier = flattered_opinion + opinion = 30 + } + + if = { + limit = { + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + OR = { + scope:intent_target = scope:activity.special_guest:spouse_1 + scope:intent_target = scope:activity.special_guest:spouse_2 + } + can_set_relation_soulmate_trigger = { CHARACTER = scope:intent_target } + } + random = { + chance = 5 + set_relation_soulmate = { reason = soulmate_wedding_accepting_partner target = scope:intent_target } + # Achievements + player_succeeded_at_a_thousand_and_one_nights_achievement_effect = yes + } + } + + stress_impact = { + chaste = miniscule_stress_impact_gain + lustful = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.5 + } + } + } + + # Don't get involved. + option = { + name = ep2_wedding_ewan.0021.d + + # Opinion with the activty_host, or else prestige. + ep2_wedding_ewan_0000_host_approves_effect = yes + + # We give base stress loss for this'un too. + stress_impact = { + base = minor_stress_impact_loss + shy = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -2 + } + } + } +} + +################################################## +# A Sociable Supper +# by Ewan Cowhig Croft +# 0031 - 0040 +################################################## + +scripted_trigger ep2_wedding_ewan_0031_appropriate_ruler_trigger = { + # Are they an appropriately landed ruler? + highest_held_title_tier >= { + # Grab root's tier. + value = root.highest_held_title_tier + # Now subtract one so that we allow for direct vassals. + add = -1 + # Counts & above only. + min = 2 + } + # Make sure they don't hate root's guts already? + opinion = { + target = root + value >= high_negative_opinion + } + NOR = { + # No family. + is_close_family_of = root + is_consort_of = root + # No prior relations. + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + # No players. + is_ai = no +} + +scripted_effect ep2_wedding_ewan_0031_social_climber_stress_effect = { + stress_impact = { + gregarious = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + shy = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } +} + +scripted_effect ep2_wedding_ewan_0031_make_friend_effect = { + # Become friends. + set_relation_friend = { + target = $TARGET$ + reason = befriended_at_feast + province = scope:activity.activity_location + } + # Plus some opinion for the sake of it. + reverse_add_opinion = { + target = $TARGET$ + modifier = friendliness_opinion + opinion = 15 + } +} + +# Meet one of your neighbouring rulers and form a fast friendship. +ep2_wedding_ewan.0031 = { + type = activity_event + title = ep2_wedding_ewan.0031.t + desc = { + desc = ep2_wedding_ewan.0031.desc.intro + # Our first character. + first_valid = { + triggered_desc = { + trigger = { scope:conversationalist_neighbour ?= scope:char_1 } + desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_neighbour + } + triggered_desc = { + trigger = { scope:conversationalist_covassal ?= scope:char_1 } + desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_covassal + } + triggered_desc = { + trigger = { scope:conversationalist_vassal ?= scope:char_1 } + desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_vassal + } + triggered_desc = { + trigger = { scope:conversationalist_liege ?= scope:char_1 } + desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_liege + } + triggered_desc = { + trigger = { scope:conversationalist_other_ruler ?= scope:char_1 } + desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_other_ruler + } + triggered_desc = { + trigger = { scope:conversationalist_backup ?= scope:char_1 } + desc = ep2_wedding_ewan.0031.desc.char_1.conversationalist_backup + } + } + desc = ep2_wedding_ewan.0031.desc.midro + # Our second character. + first_valid = { + triggered_desc = { + trigger = { scope:conversationalist_neighbour ?= scope:char_2 } + desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_neighbour + } + triggered_desc = { + trigger = { scope:conversationalist_covassal ?= scope:char_2 } + desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_covassal + } + triggered_desc = { + trigger = { scope:conversationalist_vassal ?= scope:char_2 } + desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_vassal + } + triggered_desc = { + trigger = { scope:conversationalist_liege ?= scope:char_2 } + desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_liege + } + triggered_desc = { + trigger = { scope:conversationalist_other_ruler ?= scope:char_2 } + desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_other_ruler + } + triggered_desc = { + trigger = { scope:conversationalist_backup ?= scope:char_2 } + desc = ep2_wedding_ewan.0031.desc.char_2.conversationalist_backup + } + } + desc = ep2_wedding_ewan.0031.desc.outro + } + theme = feast_activity + left_portrait = { + character = scope:char_1 + animation = boredom + } + right_portrait = { + character = scope:char_2 + animation = happiness + } + + cooldown = { years = 1 } + + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + static_group_filter = { + group = ep2_wedding_ewan.0031 + match = 0.1 + } + } + scope:activity = { + any_attending_character = { + count >= 2 + ep2_wedding_ewan_0031_appropriate_ruler_trigger = yes + } + } + } + + immediate = { + # Let's pick some characters! + ## First, grab everyone we might want to pick through. + scope:activity = { + every_attending_character = { + limit = { ep2_wedding_ewan_0031_appropriate_ruler_trigger = yes } + add_to_list = potential_conversationalists_list + } + } + ## Now, we need to try and filter them out by categories. + ### Neighbouring rulers. + #### This one is expensive, so we restrict it to players. + if = { + limit = { is_ai = no } + # Right, we're actually going to post-filter by these guys later on too, so we want to grab all of them the first time we iterate rather than do it twice. + every_in_list = { + list = potential_conversationalists_list + limit = { + OR = { + any_neighboring_and_across_water_realm_same_rank_owner = { this = root } + any_neighboring_and_across_water_top_liege_realm_owner = { this = root } + } + } + add_to_list = neighbouring_conversationalists_list + } + # Now we can go through and grab the best one. + ordered_in_list = { + list = neighbouring_conversationalists_list + # Order by military strength for the most interesting realpolitik choice. + order_by = max_military_strength + # Grab the most suitable for later checks & randomisation. + save_scope_as = conversationalist_neighbour + add_to_list = contending_characters_list + } + } + ### Fellow vassals or one of your lieges. + #### No point iterating through the list repeatedly if we aren't independent. + if = { + limit = { exists = liege } + # Fellow vassals. + ordered_in_list = { + list = potential_conversationalists_list + limit = { liege ?= root.liege } + # Order by military strength for the most interesting realpolitik choice. + order_by = max_military_strength + # Grab the most suitable for later checks & randomisation. + save_scope_as = conversationalist_covassal + add_to_list = contending_characters_list + } + # Lieges. + ordered_in_list = { + list = potential_conversationalists_list + limit = { + save_temporary_scope_as = char_temp + root = { + any_liege_or_above = { this = scope:char_temp } + } + } + # Lieges use a slightly weirder prio-order, since their military strength is less relevant. + order_by = { + # We want to befriend the most powerful person we can, as they're the most interesting. + value = highest_held_title_tier + # _But_, your direct liege is still the best, as they have much more impact on your general rule. + if = { + limit = { this = root.liege } + add = 10 + } + } + # Grab the most suitable for later checks & randomisation. + save_scope_as = conversationalist_liege + add_to_list = contending_characters_list + } + } + ### Direct vassals. + ordered_in_list = { + list = potential_conversationalists_list + limit = { liege ?= root } + # Order by military strength for the most interesting realpolitik choice. + order_by = max_military_strength + # Grab the most suitable for later checks & randomisation. + save_scope_as = conversationalist_vassal + add_to_list = contending_characters_list + } + ### Distant rulers. + ordered_in_list = { + list = potential_conversationalists_list + limit = { + NOR = { + top_liege = root.top_liege + # If we don't have a neighbouring conversationalists list, then this allows the AI to befriend non-realm rulers, and if we do, then this stops us checking through all that smeg again. + trigger_if = { + limit = { + any_in_list = { + list = neighbouring_conversationalists_list + count >= 1 + } + } + is_in_list = neighbouring_conversationalists_list + } + } + } + # Order by military strength for the most interesting realpolitik choice. + order_by = max_military_strength + # Grab the most suitable for later checks & randomisation. + save_scope_as = conversationalist_other_ruler + add_to_list = contending_characters_list + } + ## If we didn't have multiple interesting categories, generate a backup. + if = { + limit = { + calc_true_if = { + amount <= 1 + NOT = { exists = scope:conversationalist_neighbour } + NOT = { exists = scope:conversationalist_covassal } + NOT = { exists = scope:conversationalist_vassal } + NOT = { exists = scope:conversationalist_liege } + NOT = { exists = scope:conversationalist_other_ruler } + } + } + ordered_in_list = { + list = potential_conversationalists_list + limit = { + NOR = { + scope:conversationalist_neighbour ?= this + scope:conversationalist_covassal ?= this + scope:conversationalist_vassal ?= this + scope:conversationalist_liege ?= this + scope:conversationalist_other_ruler ?= this + } + } + # Grab the most suitable for later checks & randomisation. + save_scope_as = conversationalist_backup + add_to_list = contending_characters_list + } + } + # Ok, characters are assembled. Grab our favourite candidates. + ## Grab one. + random_in_list = { + list = contending_characters_list + # This character isn't having a great time at the party, so we try to pick the less sociable char first. + limit = { has_trait = shy } + alternative_limit = { + NOT = { has_trait = gregarious } + } + alternative_limit = { always = yes } + save_scope_as = char_1 + } + ## Then another. + random_in_list = { + list = contending_characters_list + limit = { + this != scope:char_1 + # No trait checks needed here — there's only one character remaining in the list now. + } + save_scope_as = char_2 + } + } + + # Neighbouring ruler. + option = { + name = ep2_wedding_ewan.0031.a + trigger = { + OR = { + scope:conversationalist_neighbour ?= scope:char_1 + scope:conversationalist_neighbour ?= scope:char_2 + } + } + + # Become friends. + ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_neighbour } + + ep2_wedding_ewan_0031_social_climber_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { opinion_target = scope:conversationalist_neighbour } + } + } + + # Fellow vassal. + option = { + name = ep2_wedding_ewan.0031.b + trigger = { + OR = { + scope:conversationalist_covassal ?= scope:char_1 + scope:conversationalist_covassal ?= scope:char_2 + } + } + + # Become friends. + ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_covassal } + + ep2_wedding_ewan_0031_social_climber_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { opinion_target = scope:conversationalist_covassal } + } + } + + # Direct vassal. + option = { + name = ep2_wedding_ewan.0031.c + trigger = { + OR = { + scope:conversationalist_vassal ?= scope:char_1 + scope:conversationalist_vassal ?= scope:char_2 + } + } + + # Become friends. + ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_vassal } + + ep2_wedding_ewan_0031_social_climber_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { opinion_target = scope:conversationalist_vassal } + } + } + + # Liege. + option = { + name = ep2_wedding_ewan.0031.d + trigger = { + OR = { + scope:conversationalist_liege ?= scope:char_1 + scope:conversationalist_liege ?= scope:char_2 + } + } + + # Become friends. + ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_liege } + + ep2_wedding_ewan_0031_social_climber_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { opinion_target = scope:conversationalist_liege } + } + } + + # Distant ruler. + option = { + name = ep2_wedding_ewan.0031.e + trigger = { + OR = { + scope:conversationalist_other_ruler ?= scope:char_1 + scope:conversationalist_other_ruler ?= scope:char_2 + } + } + + # Become friends. + ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_other_ruler } + + ep2_wedding_ewan_0031_social_climber_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { opinion_target = scope:conversationalist_other_ruler } + } + } + + # Backup option. + option = { + name = ep2_wedding_ewan.0031.f + trigger = { + OR = { + scope:conversationalist_backup ?= scope:char_1 + scope:conversationalist_backup ?= scope:char_2 + } + } + + # Become friends. + ep2_wedding_ewan_0031_make_friend_effect = { TARGET = scope:conversationalist_backup } + + ep2_wedding_ewan_0031_social_climber_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { opinion_target = scope:conversationalist_backup } + } + } + + # Recreation: this isn't the time for such ladder-climbing. + option = { + name = ep2_wedding_ewan.0031.g + trigger = { has_activity_intent = reduce_stress_intent } + custom_tooltip = available_because_intent_tt + + # Decent middling prestige. + add_prestige = medium_prestige_gain + + # We give base stress loss for this'un too. + stress_impact = { + base = major_stress_impact_loss + shy = medium_stress_impact_loss + lazy = medium_stress_impact_loss + gregarious = miniscule_stress_impact_gain + ambitious = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = -0.25 + ai_energy = -0.5 + ai_boldness = -1 + } + } + } + + # Mmm. They're not that interesting. + option = { + name = ep2_wedding_ewan.0031.h + trigger = { + NOT = { has_activity_intent = reduce_stress_intent } + } + + # Consolation prestige. + add_prestige = minor_prestige_gain + + stress_impact = { + shy = minor_stress_impact_loss + gregarious = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -2 } + } + } +} + +################################################## +# Speech! Speech! +# by Ewan Cowhig Croft +# 0041 - 0050 +################################################## + +scripted_effect ep2_wedding_ewan_0041_offended_couple_effect = { + # You hath offended them. + if = { + limit = { + # Double-check we're not double-dipping on opinion. + scope:host != scope:spouse_1 + } + reverse_add_opinion = { + target = scope:spouse_1 + modifier = insult_opinion + opinion = -10 + } + } + if = { + limit = { + # Double-check we're not double-dipping on opinion. + scope:host != scope:spouse_2 + } + reverse_add_opinion = { + target = scope:spouse_2 + modifier = insult_opinion + opinion = -10 + } + } +} + +scripted_effect ep2_wedding_ewan_0041_duel_with_highest_social_skill_effect = { + duel = { + skill = $SKILL$ + value = high_skill_rating + # I can't BELIEVE that's true! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding_ewan.0041.g.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0041.g.tt.success + # Your finger is clearly on the pulse. + add_prestige = medium_prestige_gain + # Plus gain some XP in the relevant lifestyle. + add_$SKILL$_lifestyle_xp = major_lifestyle_xp + } + } + # Salacious, but clearly bollocks. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0041.g.tt.failure + send_interface_toast = { + title = ep2_wedding_ewan.0041.g.tt.failure + # No one believes you. + add_prestige = minor_prestige_loss + } + } + } +} + +# Make a speech to the happy couple, adjusting the meaning to your intent. +ep2_wedding_ewan.0041 = { + type = activity_event + title = ep2_wedding_ewan.0041.t + desc = { + desc = ep2_wedding_ewan.0041.desc.intro + first_valid = { + # Murder. + triggered_desc = { + trigger = { has_activity_intent = murder_attendee_intent } + desc = ep2_wedding_ewan.0041.desc.murder + } + # Seduce. + triggered_desc = { + trigger = { has_activity_intent = woo_attendee_intent } + desc = ep2_wedding_ewan.0041.desc.seduce + } + # Diplomacy. + triggered_desc = { + trigger = { has_activity_intent = diplomatic_intent } + desc = ep2_wedding_ewan.0041.desc.diplomacy + } + # Matchmaking. + triggered_desc = { + trigger = { has_activity_intent = matchmaking_intent } + desc = ep2_wedding_ewan.0041.desc.matchmaking + } + # Mischief. + triggered_desc = { + trigger = { has_activity_intent = banquet_mischief_intent } + desc = ep2_wedding_ewan.0041.desc.mischief + } + # Recreation. + desc = ep2_wedding_ewan.0041.desc.recreation + } + desc = ep2_wedding_ewan.0041.desc.outro + } + theme = feast_activity + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:spouse_1 + animation = personality_honorable + } + center_portrait = { + character = scope:spouse_2 + animation = happiness + } + lower_right_portrait = scope:intent_target + + cooldown = { years = 1 } + + trigger = { + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + } + + immediate = { + # Save the spouses for ease of reference. + scope:activity.special_guest:spouse_1 = { save_scope_as = spouse_1 } + scope:activity.special_guest:spouse_2 = { save_scope_as = spouse_2 } + # And, if we've got one, our intent target. + intent_target ?= { save_scope_as = intent_target } + } + + # Praise the happy couple, as expected. + option = { + name = ep2_wedding_ewan.0041.a + + # Gain opinion with the happy couple. + reverse_add_opinion = { + target = scope:spouse_1 + modifier = kindness_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:spouse_2 + modifier = kindness_opinion + opinion = 30 + } + + stress_impact = { + just = miniscule_stress_impact_loss + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 0.5 + } + } + } + + # Recreation: praise the party. + option = { + name = ep2_wedding_ewan.0041.b + trigger = { has_activity_intent = reduce_stress_intent } + custom_tooltip = available_because_intent_tt + + # If you're the host, gain prestige. + if = { + limit = { this = scope:host } + add_prestige = medium_prestige_gain + } + # Otherwise, gain some prestige + opinion with the host. + else = { + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:host + modifier = pleased_opinion + opinion = 20 + } + } + # Annoy the spouses. + ep2_wedding_ewan_0041_offended_couple_effect = yes + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = 0.75 + ai_honor = -0.5 + } + } + } + + # Murder: stare at your target to cause them stress. + option = { + name = ep2_wedding_ewan.0041.c + trigger = { has_activity_intent = murder_attendee_intent } + custom_tooltip = available_because_intent_tt + + scope:intent_target = { + # They're a bit freaked out. + add_stress = major_stress_gain + # And concerned about what you're implying. + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -20 + } + } + # Annoy the spouses. + ep2_wedding_ewan_0041_offended_couple_effect = yes + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = 1 + ai_honor = -0.5 + } + } + } + + # Seduce: make eyes at your seduction target. + option = { + name = ep2_wedding_ewan.0041.d + trigger = { has_activity_intent = woo_attendee_intent } + custom_tooltip = available_because_intent_tt + + # You try to keep it juuuuust about down-low. + duel = { + skill = intrigue + target = scope:intent_target + # They appreciate the hints. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0041.d.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0041.d.tt.success + left_icon = scope:intent_target + # Always gain opinion with them. + reverse_add_opinion = { + target = scope:intent_target + modifier = flustered_opinion + opinion = 20 + } + # If possible, they grow interested in you. + if = { + limit = { + OR = { + root = scope:activity.special_guest:spouse_1 + root = scope:activity.special_guest:spouse_2 + } + OR = { + scope:intent_target = scope:activity.special_guest:spouse_1 + scope:intent_target = scope:activity.special_guest:spouse_2 + } + can_set_relation_soulmate_trigger = { CHARACTER = scope:intent_target } + } + random = { + chance = 5 + set_relation_soulmate = { reason = soulmate_wedding_accepting_partner target = scope:intent_target } + # Achievements + player_succeeded_at_a_thousand_and_one_nights_achievement_effect = yes + } + } + else_if = { + limit = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:intent_target } + } + set_relation_potential_lover = scope:intent_target + } + } + } + # They're publically embarrassed. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0041.d.tt.failure + send_interface_toast = { + title = ep2_wedding_ewan.0041.d.tt.failure + left_icon = scope:intent_target + add_prestige = minor_prestige_loss + reverse_add_opinion = { + target = scope:intent_target + modifier = disgusted_opinion + opinion = -20 + } + } + } + } + # Annoy the spouses. + ep2_wedding_ewan_0041_offended_couple_effect = yes + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + lustful = miniscule_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } + + # Diplomacy: opinion gain with every landed ruler attending. + option = { + name = ep2_wedding_ewan.0041.e + trigger = { has_activity_intent = diplomatic_intent } + custom_tooltip = available_because_intent_tt + + # Try to give a big, impressive speech. + duel = { + skill = diplomacy + value = extremely_high_skill_rating + # You gain opinion with every attending landed character, plus some prestige. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0041.e.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0041.e.tt.success + scope:activity = { + every_attending_character = { + limit = { + is_ruler = yes + this != root + } + custom = custom.every_landed_activity_guest + reverse_add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + } + add_prestige = minor_prestige_gain + } + } + # You just gain the prestige. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0041.e.tt.failure + send_interface_toast = { + title = ep2_wedding_ewan.0041.e.tt.failure + # Consolation prestige. + add_prestige = minor_prestige_gain + } + } + } + # Annoy the spouses. + ep2_wedding_ewan_0041_offended_couple_effect = yes + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } + + # Matchmaking: talk up your char of choice. + option = { + name = ep2_wedding_ewan.0041.f + trigger = { has_activity_intent = matchmaking_intent } + custom_tooltip = available_because_intent_tt + + # Gain opinion with scope:activity_intent. + reverse_add_opinion = { + target = scope:intent_target + modifier = pleased_opinion + opinion = 20 + } + # Plus they get a neat modifier. + scope:intent_target = { + add_character_modifier = { + modifier = ep2_wedding_ewan_0041_attraction_modifier + years = 15 + } + } + # Annoy the spouses. + ep2_wedding_ewan_0041_offended_couple_effect = yes + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } + + # Mischief: try to start some rumours. + option = { + name = ep2_wedding_ewan.0041.g + trigger = { has_activity_intent = banquet_mischief_intent } + custom_tooltip = available_because_intent_tt + + # We take your highest of diplomacy or intrigue and let you duel against it. + if = { + limit = { diplomacy > intrigue } + ep2_wedding_ewan_0041_duel_with_highest_social_skill_effect = { SKILL = diplomacy } + } + else = { + ep2_wedding_ewan_0041_duel_with_highest_social_skill_effect = { SKILL = intrigue } + } + # Annoy the spouses. + ep2_wedding_ewan_0041_offended_couple_effect = yes + + stress_impact = { + arbitrary = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.5 + } + } + } + + # Shy: awkwardly sit back down without saying anything. + option = { + name = ep2_wedding_ewan.0041.h + trigger = { has_trait = shy } + trait = shy + + # The couple are confused. + reverse_add_opinion = { + target = scope:spouse_1 + modifier = confusion_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:spouse_2 + modifier = confusion_opinion + opinion = -10 + } + + # SWEET RELIEF. + stress_impact = { shy = massive_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -1 + ai_sociability = -1 + } + } + } + + # Say something sweet but perfunctory. + option = { + name = ep2_wedding_ewan.0041.i + trigger = { + NOT = { has_trait = shy } + } + + # They're pleased, but not _as_pleased. + reverse_add_opinion = { + target = scope:spouse_1 + modifier = kindness_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:spouse_2 + modifier = kindness_opinion + opinion = 10 + } + + # We most give base stress loss for this'un. + stress_impact = { + base = medium_stress_loss + lazy = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 0.5 + ai_energy = -1 + } + } + } +} + +################################################## +# And Another Thing +# by Ewan Cowhig Croft +# 0051 - 0060 +################################################## + +# Zealous same-faith chars don't mind hearing these things. +scripted_trigger ep2_wedding_ewan_0051_boring_zeal_trigger = { + has_trait = zealous + NOT = { + faith = root.faith + root = { has_trait = zealous } + } +} + +# Make sure a rakish character wouldn't get in legal trouble talking about this (fornication is included in adultery logic). +scripted_trigger ep2_wedding_ewan_0051_legal_rake_trigger = { + has_trait = rakish + save_temporary_scope_as = char_temp + NOT = { + trait_is_criminal_in_faith_trigger = { + TRAIT = adulterer + FAITH = scope:char_temp.faith + GENDER_CHARACTER = scope:char_temp + } + } +} + +# Profligates fall for someone else's scam, so paranoid profligates are immune to this *specific* form of money loss. +scripted_trigger ep2_wedding_ewan_0051_foolish_profligate_trigger = { + has_trait = profligate + NOT = { has_trait = paranoid } +} + +# Pick someone with nothing interesting to say. +scripted_trigger ep2_wedding_ewan_0051_dolt_trigger = { + # We don't want important characters. + highest_held_title_tier <= tier_barony + # Must be verifiably a yawn. + ## Filter out anyone who can probably hold an interesting conversation. + NOR = { + has_trait = gregarious + has_trait = diplomat + diplomacy >= high_skill_rating + learning >= high_skill_rating + # Shy characters will also never do this. + has_trait = shy + } + ## Filter out people who don't make sense or who you might listen to. + NOR = { + this = root + root.intent_target ?= this + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + } + ## Now, ensure they've got an actively boring quality to discuss. + OR = { + # Won't stop talking about work. + has_trait = diligent + # Won't stop talking at all, relentlessly. + has_trait = patient + # Won't stick to the same subject. + has_trait = impatient + # Doesn't see any of the obvious flaws in their idea. + has_trait = arrogant + # Idea makes no sense. + has_trait = arbitrary + # Boring religious talk. + ep2_wedding_ewan_0051_boring_zeal_trigger = yes + # Can't stick to an idea. + has_trait = fickle + # Idea is hyper-focused on disproportionately screwing someone over. + has_trait = vengeful + # Idea is long-winded. + has_trait = lifestyle_poet + # Stress traits want you to go in on their stress-related emporium. + ## Pub. + has_trait = drunkard + ## Cake shop. + has_trait = hashishiyah + ## Brothel. + ep2_wedding_ewan_0051_legal_rake_trigger = yes + ## Some kind of isolation tower. + has_trait = reclusive + ## Whipping. Place. Whiptorium? Whiplaza? + has_trait = flagellant + ## It's someone else's idea and obviously a scam. + ep2_wedding_ewan_0051_foolish_profligate_trigger = yes + ## Want to open a library for journals. + ### Honestly this one is kinda rad, I feel, but I guess I'm boring. + has_trait = journaller + ## Gym. + has_trait = athletic + } +} + +# Triggers for whether you get the option to invest in a specific stress trait pitch. +scripted_trigger ep2_wedding_ewan_0051_interested_stress_pitch_trait_drunkard_trigger = { + has_trait = drunkard + scope:stress_pitch ?= flag:drunkard +} +scripted_trigger ep2_wedding_ewan_0051_interested_stress_pitch_trait_hashishiyah_trigger = { + has_trait = hashishiyah + scope:stress_pitch ?= flag:hashishiyah +} +scripted_trigger ep2_wedding_ewan_0051_interested_stress_pitch_trait_rakish_trigger = { + has_trait = rakish + scope:stress_pitch ?= flag:rakish +} +scripted_trigger ep2_wedding_ewan_0051_interested_stress_pitch_trait_reclusive_trigger = { + has_trait = reclusive + scope:stress_pitch ?= flag:reclusive +} +scripted_trigger ep2_wedding_ewan_0051_interested_stress_pitch_trait_flagellant_trigger = { + OR = { + has_trait = flagellant + # *sigh* And we acknowledge ulterior motives. + has_trait = deviant + any_secret = { type = secret_deviant } + } + scope:stress_pitch ?= flag:flagellant +} +scripted_trigger ep2_wedding_ewan_0051_interested_stress_pitch_trait_profligate_trigger = { + has_trait = profligate + scope:stress_pitch ?= flag:profligate +} +scripted_trigger ep2_wedding_ewan_0051_interested_stress_pitch_trait_journaller_trigger = { + has_trait = journaller + scope:stress_pitch ?= flag:journaller +} +scripted_trigger ep2_wedding_ewan_0051_interested_stress_pitch_trait_athletic_trigger = { + has_trait = athletic + scope:stress_pitch ?= flag:athletic +} + +# Stress for not being a dick to a boring, boring person. +scripted_effect ep2_wedding_ewan_0051_compassion_to_dolt_effect = { + stress_impact = { + compassionate = minor_stress_impact_loss + patient = minor_stress_impact_loss + calm = minor_stress_impact_loss + callous = miniscule_stress_impact_gain + sadistic = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } +} + +# Loss stress when indulging a stress coping trait. +scripted_effect ep2_wedding_ewan_0051_stress_trait_stress_effect = { + stress_impact = { + $STRESS_TRAIT$ = massive_stress_impact_loss + trusting = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + lazy = miniscule_stress_impact_gain + } +} + +# You start a business based around a shared stress coping trait. +scripted_effect ep2_wedding_ewan_0051_start_business_together_effect = { + # Up-front costs for the both of you. + remove_short_term_gold = major_gold_value + scope:dolt = { remove_short_term_gold = major_gold_value } + # Inform that this may not bear fruit for many years. + custom_tooltip = ep2_wedding_ewan.0051.business_venture.tt + hidden_effect = { + # Log that we're waiting on our last venture. + add_character_flag = awaiting_ep2_wedding_ewan_0051_results_flag + # Now, do a hidden duel for this'un. + duel = { + skill = stewardship + value = dolt_stewardship_adjusted_difficulty_value + # It goes well. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + # Weight down if this is a profligacy thing, as that's the surest-loss. + modifier = { + add = -10 + scope:stress_pitch ?= flag:profligate + } + # You always have a very, very slight shot. + min = 2 + # Congrats! + trigger_event = { + id = ep2_wedding_ewan.0052 + years = { 15 25 } + } + } + # It goes poorly. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + # Weight up if this is a profligacy thing, as that's the surest-loss. + modifier = { + add = 10 + scope:stress_pitch ?= flag:profligate + } + # This is not a well-structured proposition for either of you. + min = 25 + # Better luck next time. + trigger_event = { + id = ep2_wedding_ewan.0053 + years = { 15 25 } + } + } + } + } +} + +# Your business is incompatible with your faith. +scripted_effect ep2_wedding_ewan_0051_business_piety_consequences_effect = { + if = { + limit = { this ?= faith.religious_head } + add_piety = medium_piety_loss + } + else = { add_piety = minor_piety_loss } +} + +# Someone is pitching questionable ideas at you, and you can go along with them or not, but they keep coming at you. +ep2_wedding_ewan.0051 = { + type = activity_event + title = ep2_wedding_ewan.0051.t + desc = { + desc = ep2_wedding_ewan.0051.desc.intro + first_valid = { + # Do we have a stress pitch to make, and thus special option shenanigans to account for? + triggered_desc = { + trigger = { exists = scope:stress_pitch } + desc = { + first_valid = { + # Drunkard + triggered_desc = { + trigger = { scope:stress_pitch = flag:drunkard } + desc = ep2_wedding_ewan.0051.desc.drunkard + } + # Hashishiyah + triggered_desc = { + trigger = { scope:stress_pitch = flag:hashishiyah } + desc = ep2_wedding_ewan.0051.desc.hashishiyah + } + # Rakish + triggered_desc = { + trigger = { scope:stress_pitch = flag:rakish } + desc = ep2_wedding_ewan.0051.desc.rakish + } + # Reclusive + triggered_desc = { + trigger = { scope:stress_pitch = flag:reclusive } + desc = ep2_wedding_ewan.0051.desc.reclusive + } + # Flagellant + triggered_desc = { + trigger = { scope:stress_pitch = flag:flagellant } + desc = ep2_wedding_ewan.0051.desc.flagellant + } + # Profligate + triggered_desc = { + trigger = { scope:stress_pitch = flag:profligate } + desc = ep2_wedding_ewan.0051.desc.profligate + } + # Journaller + triggered_desc = { + trigger = { scope:stress_pitch = flag:journaller } + desc = ep2_wedding_ewan.0051.desc.journaller + } + # Athletic + triggered_desc = { + trigger = { scope:stress_pitch = flag:athletic } + desc = ep2_wedding_ewan.0051.desc.athletic + } + } + } + } + # Nope? Right, random roll it. + desc = { + random_valid = { + # Diligent + triggered_desc = { + trigger = { + scope:dolt = { has_trait = diligent } + } + desc = ep2_wedding_ewan.0051.desc.diligent + } + # Patient + triggered_desc = { + trigger = { + scope:dolt = { has_trait = patient } + } + desc = ep2_wedding_ewan.0051.desc.patient + } + # Impatient + triggered_desc = { + trigger = { + scope:dolt = { has_trait = impatient } + } + desc = ep2_wedding_ewan.0051.desc.impatient + } + # Arrogant + triggered_desc = { + trigger = { + scope:dolt = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0051.desc.arrogant + } + # Arbitrary + triggered_desc = { + trigger = { + scope:dolt = { has_trait = arbitrary } + } + desc = ep2_wedding_ewan.0051.desc.arbitrary + } + # Zealous + triggered_desc = { + trigger = { + scope:dolt = { ep2_wedding_ewan_0051_boring_zeal_trigger = yes } + } + desc = ep2_wedding_ewan.0051.desc.zealous + } + # Fickle + triggered_desc = { + trigger = { + scope:dolt = { has_trait = fickle } + } + desc = ep2_wedding_ewan.0051.desc.fickle + } + # Vengeful + triggered_desc = { + trigger = { + scope:dolt = { has_trait = vengeful } + } + desc = ep2_wedding_ewan.0051.desc.vengeful + } + # Poet + triggered_desc = { + trigger = { + scope:dolt = { has_trait = lifestyle_poet } + } + desc = ep2_wedding_ewan.0051.desc.poet + } + } + } + } + desc = ep2_wedding_ewan.0051.desc.outro + } + theme = feast_activity + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:dolt + animation = admiration + } + + cooldown = { years = 1 } + + trigger = { + NOT = { has_character_flag = awaiting_ep2_wedding_ewan_0051_results_flag } + scope:activity = { + any_attending_character = { ep2_wedding_ewan_0051_dolt_trigger = yes } + } + } + + immediate = { + # We need root saved for dumb loc stuff. + save_scope_as = reference + # Right, let's sort our dolt. + ## First, grab everyone applicable. + scope:activity = { + every_attending_character = { + limit = { ep2_wedding_ewan_0051_dolt_trigger = yes } + add_to_list = potential_boring_characters_list + } + } + ## Then sort through them to find the _least_ interesting person. + ordered_in_list = { + list = potential_boring_characters_list + order_by = { + # Grab the two major talky skills. + value = diplomacy + add = learning + # Now, invert them to rank the chars with the worst scores highest. + multiply = -1 + } + save_scope_as = dolt + } + # Ok, now that we've got our dolt, let's check to see if they're going to pitch a stress-based endeavour to you. + scope:dolt = { + # We don't bother to if statement this, because we're going to random roll with a chance of nothing anyway, so we may as well just put the triggers right on the random_list entries. + random_list = { + # Drunkard + 20 = { + trigger = { has_trait = drunkard } + # Weight up a bit if root shares this quality. + modifier = { + add = 20 + root = { has_trait = drunkard } + } + save_scope_value_as = { + name = stress_pitch + value = flag:drunkard + } + } + # Hashishiyah + 20 = { + trigger = { has_trait = hashishiyah } + # Weight up a bit if root shares this quality. + modifier = { + add = 20 + root = { has_trait = hashishiyah } + } + save_scope_value_as = { + name = stress_pitch + value = flag:hashishiyah + } + } + # Rakish + 20 = { + trigger = { ep2_wedding_ewan_0051_legal_rake_trigger = yes } + # Weight up a bit if root shares this quality. + modifier = { + add = 20 + root = { ep2_wedding_ewan_0051_legal_rake_trigger = yes } + } + save_scope_value_as = { + name = stress_pitch + value = flag:rakish + } + } + # Reclusive + 20 = { + trigger = { has_trait = reclusive } + # Weight up a bit if root shares this quality. + modifier = { + add = 20 + root = { has_trait = reclusive } + } + save_scope_value_as = { + name = stress_pitch + value = flag:reclusive + } + } + # Flagellant + 20 = { + trigger = { has_trait = flagellant } + # Weight up a bit if root shares this quality. + modifier = { + add = 20 + root = { has_trait = flagellant } + } + save_scope_value_as = { + name = stress_pitch + value = flag:flagellant + } + } + # Profligate + 20 = { + trigger = { ep2_wedding_ewan_0051_foolish_profligate_trigger = yes } + # Weight up a bit if root shares this quality. + modifier = { + add = 20 + root = { ep2_wedding_ewan_0051_foolish_profligate_trigger = yes } + } + save_scope_value_as = { + name = stress_pitch + value = flag:profligate + } + } + # Journaller + 20 = { + trigger = { has_trait = journaller } + # Weight up a bit if root shares this quality. + modifier = { + add = 20 + root = { has_trait = journaller } + } + save_scope_value_as = { + name = stress_pitch + value = flag:journaller + } + } + # Athletic + 20 = { + trigger = { has_trait = athletic } + # Weight up a bit if root shares this quality. + modifier = { + add = 20 + root = { has_trait = athletic } + } + save_scope_value_as = { + name = stress_pitch + value = flag:athletic + } + } + # No stress coping pitch, so no effect. + ## If they've got 1 stress trait, we want a roughly 20% chance they'll bring that up, so we weight at 20:80. + ### If they have multiple stress traits, the numbers'll get progressively more stacked in favour of pitching such, but uhhh... clearly they have something to get off their chests. + 80 = { + # We still need to check for the presence of some other boring quality so that we can fetch a desc key. + trigger = { + OR = { + has_trait = diligent + has_trait = patient + has_trait = impatient + has_trait = arrogant + has_trait = arbitrary + ep2_wedding_ewan_0051_boring_zeal_trigger = yes + has_trait = fickle + has_trait = vengeful + has_trait = lifestyle_poet + } + } + } + } + } + } + + # Gently exit the conversation. + option = { + name = ep2_wedding_ewan.0051.a + + # Let's give this a go! + duel = { + skill = diplomacy + value = high_skill_rating + # You extricate yourself. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding_ewan.0051.a.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0051.a.tt.success + left_icon = scope:dolt + add_diplomacy_lifestyle_perk_points = 1 + } + } + # It never ends. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0051.a.tt.failure + send_interface_toast = { + title = ep2_wedding_ewan.0051.a.tt.failure + left_icon = scope:dolt + reverse_add_opinion = { + target = scope:dolt + modifier = friendliness_opinion + opinion = 50 + } + } + } + } + + ep2_wedding_ewan_0051_compassion_to_dolt_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = -0.25 + } + } + } + + # Wrathful: By all the denizens of NegativeAfterLife, will you cease this prattle? + option = { + name = ep2_wedding_ewan.0051.b + trigger = { has_trait = wrathful } + trait = wrathful + + # Your firmness is notable. + add_prestige = medium_prestige_gain + # Scope:dolt is hurt. + reverse_add_opinion = { + target = scope:dolt + modifier = hurt_opinion + opinion = -40 + } + # Every wrathful character at the gathering sees your point. + scope:activity = { + every_attending_character = { + limit = { + has_trait = wrathful + NOR = { + this = root + this = scope:dolt + } + } + custom = ep2_wedding_ewan.0051.b.custom.every_wrathful_guest + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + impatient = minor_stress_impact_loss + wrathful = major_stress_impact_loss + patient = miniscule_stress_impact_gain + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + } + } + } + + # Shut. Up. + option = { + name = ep2_wedding_ewan.0051.c + trigger = { + NOT = { has_trait = wrathful } + } + + # Your firmness is notable. + add_character_modifier = { + modifier = ep2_wedding_ewan_0051_snooty_modifier + years = 15 + } + # Scope:dolt is hurt. + reverse_add_opinion = { + target = scope:dolt + modifier = hurt_opinion + opinion = -20 + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + impatient = minor_stress_impact_loss + compassionate = miniscule_stress_impact_gain + patient = miniscule_stress_impact_gain + calm = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = -0.5 + } + } + } + + # Lazy: fall asleep. + option = { + name = ep2_wedding_ewan.0051.d + trigger = { has_trait = lazy } + trait = lazy + + # Scope:dolt is hurt. + add_opinion = { + target = scope:dolt + modifier = hurt_opinion + opinion = -30 + } + # Every lazy character at the gathering respects the hustle. + scope:activity = { + every_attending_character = { + limit = { + has_trait = lazy + NOR = { + this = root + this = scope:dolt + } + } + custom = ep2_wedding_ewan.0051.d.custom.every_lazy_guest + reverse_add_opinion = { + target = root + modifier = respect_opinion + opinion = 30 + } + } + } + + # Lotta stress loss for this one too. + stress_impact = { + lazy = major_stress_impact_loss + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = -1 + } + } + } + + # Drunkard: you buy a pub together. + option = { + name = ep2_wedding_ewan.0051.e + trigger = { + ep2_wedding_ewan_0051_interested_stress_pitch_trait_drunkard_trigger = yes + NOT = { has_trait = lazy } + } + trait = drunkard + + # Roll the effect. + ep2_wedding_ewan_0051_start_business_together_effect = yes + + ep2_wedding_ewan_0051_stress_trait_stress_effect = { STRESS_TRAIT = drunkard } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.75 + } + } + } + + # Hashishiyah: you buy a cake shop together. + option = { + name = ep2_wedding_ewan.0051.f + trigger = { + ep2_wedding_ewan_0051_interested_stress_pitch_trait_hashishiyah_trigger = yes + NOT = { has_trait = lazy } + } + trait = hashishiyah + + # Roll the effect. + ep2_wedding_ewan_0051_start_business_together_effect = yes + + ep2_wedding_ewan_0051_stress_trait_stress_effect = { STRESS_TRAIT = hashishiyah } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.75 + } + } + } + + # Rakish: you start a brothel together. + option = { + name = ep2_wedding_ewan.0051.g + trigger = { + ep2_wedding_ewan_0051_interested_stress_pitch_trait_rakish_trigger = yes + NOT = { has_trait = lazy } + } + trait = rakish + + # Roll the effect. + ep2_wedding_ewan_0051_start_business_together_effect = yes + + ep2_wedding_ewan_0051_stress_trait_stress_effect = { STRESS_TRAIT = rakish } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.75 + } + } + } + + # Reclusive: you start a private retreat together. + option = { + name = ep2_wedding_ewan.0051.h + trigger = { + ep2_wedding_ewan_0051_interested_stress_pitch_trait_reclusive_trigger = yes + NOT = { has_trait = lazy } + } + trait = reclusive + + # Roll the effect. + ep2_wedding_ewan_0051_start_business_together_effect = yes + + ep2_wedding_ewan_0051_stress_trait_stress_effect = { STRESS_TRAIT = reclusive } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.75 + } + } + } + + # Flagellant: you start a... whipping post field together. Apparently. + option = { + name = ep2_wedding_ewan.0051.i + trigger = { + ep2_wedding_ewan_0051_interested_stress_pitch_trait_flagellant_trigger = yes + NOT = { has_trait = lazy } + } + trait = flagellant + trait = deviant + # Account for secret deviants. + if = { + limit = { + any_secret = { type = secret_deviant } + } + random_secret = { + type = secret_deviant + save_scope_as = secret + } + custom_tooltip = ep2_wedding_ewan.0051.i.tt.deviant + } + + # Roll the effect. + ep2_wedding_ewan_0051_start_business_together_effect = yes + + ep2_wedding_ewan_0051_stress_trait_stress_effect = { STRESS_TRAIT = flagellant } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.75 + } + } + } + + # Profligate: you go in on a scam together, but will generally get scammed. + option = { + name = ep2_wedding_ewan.0051.j + trigger = { + ep2_wedding_ewan_0051_interested_stress_pitch_trait_profligate_trigger = yes + NOT = { has_trait = lazy } + } + trait = profligate + + # Roll the effect. + ep2_wedding_ewan_0051_start_business_together_effect = yes + + ep2_wedding_ewan_0051_stress_trait_stress_effect = { STRESS_TRAIT = profligate } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.75 + } + } + } + + # Journaller: you start a library/scriptorium together. + option = { + name = ep2_wedding_ewan.0051.k + trigger = { + ep2_wedding_ewan_0051_interested_stress_pitch_trait_journaller_trigger = yes + NOT = { has_trait = lazy } + } + trait = journaller + + # Roll the effect. + ep2_wedding_ewan_0051_start_business_together_effect = yes + + ep2_wedding_ewan_0051_stress_trait_stress_effect = { STRESS_TRAIT = journaller } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.75 + } + } + } + + # Athletic: you start a gym together. + option = { + name = ep2_wedding_ewan.0051.l + trigger = { + ep2_wedding_ewan_0051_interested_stress_pitch_trait_athletic_trigger = yes + NOT = { has_trait = lazy } + } + trait = athletic + + # Roll the effect. + ep2_wedding_ewan_0051_start_business_together_effect = yes + + ep2_wedding_ewan_0051_stress_trait_stress_effect = { STRESS_TRAIT = athletic } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = -0.75 + } + } + } + + # That's... very interesting... + option = { + name = ep2_wedding_ewan.0051.m + trigger = { + NOR = { + has_trait = lazy + ep2_wedding_ewan_0051_interested_stress_pitch_trait_drunkard_trigger = yes + ep2_wedding_ewan_0051_interested_stress_pitch_trait_hashishiyah_trigger = yes + ep2_wedding_ewan_0051_interested_stress_pitch_trait_rakish_trigger = yes + ep2_wedding_ewan_0051_interested_stress_pitch_trait_reclusive_trigger = yes + ep2_wedding_ewan_0051_interested_stress_pitch_trait_flagellant_trigger = yes + ep2_wedding_ewan_0051_interested_stress_pitch_trait_profligate_trigger = yes + ep2_wedding_ewan_0051_interested_stress_pitch_trait_journaller_trigger = yes + ep2_wedding_ewan_0051_interested_stress_pitch_trait_athletic_trigger = yes + } + } + + # Try to play along as best you can. + duel = { + skill = intrigue + value = extremely_high_skill_rating + # You pull off your bold-faced lie. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding_ewan.0051.m.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0051.m.tt.success + left_icon = scope:dolt + add_intrigue_skill = 1 + } + } + # Some people appreciate your tact. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0051.m.tt.failure + send_interface_toast = { + title = ep2_wedding_ewan.0051.m.tt.failure + left_icon = scope:dolt + add_character_modifier = { + modifier = ep2_wedding_ewan_0051_approachable_modifier + years = 15 + } + } + } + } + + ep2_wedding_ewan_0051_compassion_to_dolt_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.5 + } + } + } + + # Grin and bear it. + option = { + name = ep2_wedding_ewan.0051.n + flavor = ep2_wedding_ewan.0051.n.tt + + # They appreciate you listening. + reverse_add_opinion = { + target = scope:dolt + modifier = friendliness_opinion + opinion = 40 + } + # Try to give a hook - they're likely uninteresting (y'know, inherently), which is why we put this in the opt-out. + if = { + limit = { + can_add_hook = { + target = scope:dolt + type = favor_hook + } + } + add_hook = { + target = scope:dolt + type = favor_hook + } + } + + ep2_wedding_ewan_0051_compassion_to_dolt_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = -1 + } + } + } +} + +# Investment success — your venture turned out to be worthwhile after all! +ep2_wedding_ewan.0052 = { + type = character_event + title = ep2_wedding_ewan.0052.t + desc = { + desc = ep2_wedding_ewan.0052.desc.intro + # Is scope:dolt around? + first_valid = { + # Scope:dolt is dead. + triggered_desc = { + trigger = { + scope:dolt = { is_alive = no } + } + desc = ep2_wedding_ewan.0052.desc.dolt_availability.dead + } + # Scope:dolt is imprisoned. + triggered_desc = { + trigger = { + scope:dolt = { is_imprisoned = yes } + } + desc = ep2_wedding_ewan.0052.desc.dolt_availability.imprisoned + } + # Scope:dolt is available. + desc = ep2_wedding_ewan.0052.desc.dolt_availability.free + } + desc = ep2_wedding_ewan.0052.desc.midtro + # And what was your business again? + first_valid = { + # Drunkard + triggered_desc = { + trigger = { scope:stress_pitch = flag:drunkard } + desc = ep2_wedding_ewan.0052.desc.drunkard + } + # Hashishiyah + triggered_desc = { + trigger = { scope:stress_pitch = flag:hashishiyah } + desc = ep2_wedding_ewan.0052.desc.hashishiyah + } + # Rakish + triggered_desc = { + trigger = { scope:stress_pitch = flag:rakish } + desc = ep2_wedding_ewan.0052.desc.rakish + } + # Reclusive + triggered_desc = { + trigger = { scope:stress_pitch = flag:reclusive } + desc = ep2_wedding_ewan.0052.desc.reclusive + } + # Flagellant + triggered_desc = { + trigger = { scope:stress_pitch = flag:flagellant } + desc = ep2_wedding_ewan.0052.desc.flagellant + } + # Profligate + triggered_desc = { + trigger = { scope:stress_pitch = flag:profligate } + desc = ep2_wedding_ewan.0052.desc.profligate + } + # Journaller + triggered_desc = { + trigger = { scope:stress_pitch = flag:journaller } + desc = ep2_wedding_ewan.0052.desc.journaller + } + # Athletic + triggered_desc = { + trigger = { scope:stress_pitch = flag:athletic } + desc = ep2_wedding_ewan.0052.desc.athletic + } + } + # Who's sending the letter? + first_valid = { + triggered_desc = { + trigger = { + scope:dolt = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + } + desc = ep2_wedding_ewan.0052.desc.outro.dolt_unavailable + } + desc = ep2_wedding_ewan.0052.desc.outro + } + } + theme = feast_activity + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:dolt + animation = happiness + } + override_background = { reference = tavern } + + trigger = { + # Standard checks. + is_available_adult = yes + } + + on_trigger_fail = { + trigger_event = { + id = ep2_wedding_ewan.0052 + years = 1 + } + } + + immediate = { + # Clear the flag. + remove_character_flag = awaiting_ep2_wedding_ewan_0051_results_flag + # Cash for both of you! + add_gold = massive_gold_value + scope:dolt = { + if = { + limit = { is_alive = yes } + add_gold = @ep2_wedding_ewan_0052_dolt_pay_out_value + } + } + # Faith concerns with these iniquities. + ## We don't take off _too_ much for any of these — we're just trying to note them for responsiveness. + ### Unless you're HoF, in which case, that's a bit of a downer. + ## Some faiths would frown on a pub. + if = { + limit = { + scope:stress_pitch = flag:drunkard + faith_forbids_alcohol_trigger = yes + } + ep2_wedding_ewan_0051_business_piety_consequences_effect = yes + } + ## Some faiths frown on sloth. + else_if = { + limit = { + scope:stress_pitch = flag:hashishiyah + # Diligent virtue excluded because you can definitely do work _and_ have a hashish indulging habit, but it's hard to see lots of people _on_ hashish as anything but a den of folks lazing around on cushions chatting about nothing in particular. The horror. + faith = { trait_is_sin = lazy } + } + ep2_wedding_ewan_0051_business_piety_consequences_effect = yes + } + ## Some faiths frown on lust. + else_if = { + limit = { + scope:stress_pitch = flag:rakish + faith = { + OR = { + trait_is_sin = lustful + trait_is_virtue = chaste + } + } + } + ep2_wedding_ewan_0051_business_piety_consequences_effect = yes + } + ## Some faiths frown on isolation. + else_if = { + limit = { + scope:stress_pitch = flag:reclusive + faith = { + OR = { + trait_is_sin = shy + trait_is_virtue = gregarious + } + } + } + ep2_wedding_ewan_0051_business_piety_consequences_effect = yes + } + ## Some faiths frown on boondoggles. + else_if = { + limit = { + scope:stress_pitch = flag:profligate + faith = { trait_is_virtue = greedy } + } + ep2_wedding_ewan_0051_business_piety_consequences_effect = yes + } + ## Some faiths frown on non-gamer activities. + else_if = { + limit = { + scope:stress_pitch = flag:athletic + faith = { trait_is_virtue = lazy } + } + ep2_wedding_ewan_0051_business_piety_consequences_effect = yes + } + } + + # Greedy/Callous/Sadistic/Arbitrary: take scope:dolt's gold too. + option = { + name = ep2_wedding_ewan.0052.a + trigger = { + # You have some sway over scope:dolt. + scope:dolt = { + is_alive = yes + any_liege_or_above = { this = root } + } + OR = { + has_trait = greedy + has_trait = callous + has_trait = sadistic + has_trait = arbitrary + } + } + trait = greedy + trait = callous + trait = sadistic + trait = arbitrary + + scope:dolt = { + # Forcibly transfer the gold. + pay_short_term_gold = { + target = root + gold = @ep2_wedding_ewan_0052_dolt_pay_out_value + } + # But be mad about it. + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -50 + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + # Arrogant: Of course, I'm a business genius. + option = { + name = ep2_wedding_ewan.0052.b + trigger = { has_trait = arrogant } + trait = arrogant + + # Scope:dolt appreciates that you believed in HerHim. + scope:dolt = { + if = { + limit = { is_alive = yes } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + } + } + + stress_impact = { arrogant = massive_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 1 + ai_greed = -1 + } + } + } + + # An unexpectedly pleasant surprise! + option = { + name = ep2_wedding_ewan.0052.c + trigger = { + NOT = { has_trait = arrogant } + } + + # Scope:dolt appreciates that you believed in HerHim. + scope:dolt = { + if = { + limit = { is_alive = yes } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + } + } + + # No stress for notification option. + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 1 + ai_greed = -1 + } + } + } +} + +# Investment failure — semi-predictably, your venture dun goofed. +ep2_wedding_ewan.0053 = { + type = character_event + title = ep2_wedding_ewan.0053.t + desc = { + desc = ep2_wedding_ewan.0053.desc.intro + # Is scope:dolt around? + first_valid = { + # Scope:dolt is dead. + triggered_desc = { + trigger = { + scope:dolt = { is_alive = no } + } + desc = ep2_wedding_ewan.0053.desc.dolt_availability.dead + } + # Scope:dolt is imprisoned. + triggered_desc = { + trigger = { + scope:dolt = { is_imprisoned = yes } + } + desc = ep2_wedding_ewan.0053.desc.dolt_availability.imprisoned + } + # Scope:dolt is available. + desc = ep2_wedding_ewan.0053.desc.dolt_availability.free + } + desc = ep2_wedding_ewan.0053.desc.midtro + # And what was your business again? + first_valid = { + # Drunkard + triggered_desc = { + trigger = { scope:stress_pitch = flag:drunkard } + desc = ep2_wedding_ewan.0053.desc.drunkard + } + # Hashishiyah + triggered_desc = { + trigger = { scope:stress_pitch = flag:hashishiyah } + desc = ep2_wedding_ewan.0053.desc.hashishiyah + } + # Rakish + triggered_desc = { + trigger = { scope:stress_pitch = flag:rakish } + desc = ep2_wedding_ewan.0053.desc.rakish + } + # Reclusive + triggered_desc = { + trigger = { scope:stress_pitch = flag:reclusive } + desc = ep2_wedding_ewan.0053.desc.reclusive + } + # Flagellant + triggered_desc = { + trigger = { scope:stress_pitch = flag:flagellant } + desc = ep2_wedding_ewan.0053.desc.flagellant + } + # Profligate + triggered_desc = { + trigger = { scope:stress_pitch = flag:profligate } + desc = ep2_wedding_ewan.0053.desc.profligate + } + # Journaller + triggered_desc = { + trigger = { scope:stress_pitch = flag:journaller } + desc = ep2_wedding_ewan.0053.desc.journaller + } + # Athletic + triggered_desc = { + trigger = { scope:stress_pitch = flag:athletic } + desc = ep2_wedding_ewan.0053.desc.athletic + } + } + desc = ep2_wedding_ewan.0053.desc.outro + } + theme = feast_activity + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:dolt + animation = shame + } + override_background = { reference = tavern } + + trigger = { + # Standard checks. + is_available_adult = yes + } + + on_trigger_fail = { + trigger_event = { + id = ep2_wedding_ewan.0053 + years = 1 + } + } + + immediate = { + # Clear the flag. + remove_character_flag = awaiting_ep2_wedding_ewan_0051_results_flag + # Troublesome to be reminded of. + add_stress = medium_stress_gain + scope:dolt = { + if = { + limit = { is_ai = yes } + add_stress = massive_stress_gain + } + } + } + + # Bring me that idiot in shackles! + option = { + name = { + trigger = { + scope:dolt = { is_alive = yes } + } + text = ep2_wedding_ewan.0053.a.alive + } + name = { + trigger = { + scope:dolt = { is_alive = no } + } + text = ep2_wedding_ewan.0053.a.dead + } + + scope:dolt = { + if = { + limit = { is_alive = yes } + # If you can imprison scope:dolt, you do. + if = { + limit = { + is_imprisoned = no + any_liege_or_above = { this = root } + } + rightfully_imprison_character_effect = { + TARGET = scope:dolt + IMPRISONER = root + } + } + # Plus they're upset with your lack of understanding. + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -30 + } + } + } + + stress_impact = { + vengeful = major_stress_impact_loss + wrathful = miniscule_stress_impact_loss + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + # This was probably to be expected. + option = { + name = ep2_wedding_ewan.0053.b + + # They're grateful for your understanding. + scope:dolt = { + if = { + limit = { is_alive = yes } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 30 + } + } + } + + stress_impact = { + forgiving = minor_stress_impact_loss + wrathful = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } +} + +################################################## +# To My Beloved GetRelation +# by Ewan Cowhig Croft +# 0061 - 0070 +################################################## + +# Find an old coot to chatter on. +scripted_trigger ep2_wedding_ewan_0061_suitable_doddering_relative_trigger = { + is_ai = yes + # Right, make sure that they're old enough for a good ramble. + age >= 60 + # Must be sufficiently older than our target also. + age >= { + value = $TARGET$.age + add = 20 + } + # Shy characters will never do this. + NOT = { has_trait = shy } + # Must have some predilection for long public speeches. + OR = { + # Some traits make you want to talk. + ## You love the sound of your own voice. + has_trait = arrogant + ## Because you must tell your story to the world. Or something. + has_trait = honest + ## Because you must tell _a_ story to the world. Or something. + has_trait = deceitful + ## You love giving speeches. + has_trait = gregarious + has_trait = ambitious + has_trait = diplomat + has_trait = lifestyle_poet + ## You love giving terrible speeches. + has_trait = sadistic + ## It seemed like a good idea at the time. + ### We've all been there. + #### ;_;. + has_trait = drunkard + has_trait = hashishiyah + # People with very high talky-skills are inclined to talking. + diplomacy >= @ep2_wedding_ewan_0061_high_skill_value + learning >= @ep2_wedding_ewan_0061_high_skill_value + # Really old people will give speeches. + age >= @ep2_wedding_ewan_0061_old_value + } + # And actually family - we check this last so that we iterate over as few characters as possible. + is_close_or_extended_family_of = $TARGET$ + # Filter out candidates that don't make sense. + NOR = { + this = root + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } +} + +# Talk scope:oldling down without hurting HerHis feelings. +scripted_effect ep2_wedding_ewan_0061_diplomatically_stop_speech_effect = { + # Hook + prestige if we can. + if = { + limit = { + can_add_hook = { + target = scope:relative + type = favor_hook + } + } + add_hook = { + target = scope:relative + type = favor_hook + } + add_prestige = minor_prestige_gain + } + # Otherwise, double our prestige. + else = { add_prestige = medium_prestige_gain } +} + +# How much does root prod scope:oldling into continuing, at the cost of scope:relative's mental health? +scripted_effect ep2_wedding_ewan_0061_humiliation_rewards_effect = { + # If this is the player, we give stress to scope:relative. + ## The AI restriction is to stop scope:relative from being harassed into alcoholism/death if they accidentally invite too many dicks to their wedding. + if = { + limit = { is_ai = no } + scope:relative = { add_stress = $STRESS_AMOUNT$_stress_gain } + } + # Everyone gets to lose opinion though! + ## (the AI is thus effectively just trading opinion for stress loss) + reverse_add_opinion = { + target = scope:relative + modifier = humiliated_opinion + opinion = $OPINION_LOSS$ + } +} + +# Embarrassing older relation speech. +ep2_wedding_ewan.0061 = { + type = activity_event + title = ep2_wedding_ewan.0061.t + desc = { + desc = ep2_wedding_ewan.0061.desc.intro + random_valid = { + # Arrogant + triggered_desc = { + trigger = { + scope:oldling = { has_trait = arrogant } + } + desc = ep2_wedding_ewan.0061.desc.arrogant + } + # Honest + triggered_desc = { + trigger = { + scope:oldling = { has_trait = honest } + } + desc = ep2_wedding_ewan.0061.desc.honest + } + # Deceitful + triggered_desc = { + trigger = { + scope:oldling = { has_trait = deceitful } + } + desc = ep2_wedding_ewan.0061.desc.deceitful + } + # Gregarious + triggered_desc = { + trigger = { + scope:oldling = { has_trait = gregarious } + } + desc = ep2_wedding_ewan.0061.desc.gregarious + } + # Ambitious + triggered_desc = { + trigger = { + scope:oldling = { has_trait = ambitious } + } + desc = ep2_wedding_ewan.0061.desc.ambitious + } + # Diplomat + triggered_desc = { + trigger = { + scope:oldling = { has_trait = diplomat } + } + desc = ep2_wedding_ewan.0061.desc.diplomat + } + # Poet + triggered_desc = { + trigger = { + scope:oldling = { has_trait = lifestyle_poet } + } + desc = ep2_wedding_ewan.0061.desc.poet + } + # Sadistic + triggered_desc = { + trigger = { + scope:oldling = { has_trait = sadistic } + } + desc = ep2_wedding_ewan.0061.desc.sadistic + } + # Drunkard + triggered_desc = { + trigger = { + scope:oldling = { has_trait = drunkard } + } + desc = ep2_wedding_ewan.0061.desc.drunkard + } + # Hashishiyah + triggered_desc = { + trigger = { + scope:oldling = { has_trait = hashishiyah } + } + desc = ep2_wedding_ewan.0061.desc.hashishiyah + } + # High Diplomacy + triggered_desc = { + trigger = { scope:oldling.diplomacy >= @ep2_wedding_ewan_0061_high_skill_value } + desc = ep2_wedding_ewan.0061.desc.skill.diplomacy + } + # High Learning + triggered_desc = { + trigger = { scope:oldling.learning >= @ep2_wedding_ewan_0061_high_skill_value } + desc = ep2_wedding_ewan.0061.desc.skill.learning + } + # V. Old + triggered_desc = { + trigger = { scope:oldling.age >= @ep2_wedding_ewan_0061_old_value } + desc = ep2_wedding_ewan.0061.desc.old + } + # V. V. Old + triggered_desc = { + trigger = { scope:oldling.age >= @ep2_wedding_ewan_0061_very_old } + desc = ep2_wedding_ewan.0061.desc.very_old + } + } + desc = ep2_wedding_ewan.0061.desc.outro + } + theme = feast_activity + left_portrait = { + character = scope:oldling + animation = toast_goblet + } + center_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:relative + animation = fear + } + + cooldown = { years = 1 } + + trigger = { + NOR = { + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } + # Either special guest must have a relative who matches the criteria. + scope:activity = { + NOT = { exists = var:had_event_ewan_0061 } + any_attending_character = { + OR = { + ep2_wedding_ewan_0061_suitable_doddering_relative_trigger = { TARGET = scope:activity.special_guest:spouse_1 } + ep2_wedding_ewan_0061_suitable_doddering_relative_trigger = { TARGET = scope:activity.special_guest:spouse_2 } + } + } + } + } + + immediate = { + # Save some scopes for loc and general sanity. + scope:activity = { + special_guest:spouse_1 = { save_scope_as = spouse_1 } + special_guest:spouse_2 = { save_scope_as = spouse_2 } + set_variable = { + name = had_event_ewan_0061 + years = 5 + } + } + # Alright, let's pick a doddering old relative! + scope:activity = { + ordered_attending_character = { + limit = { + OR = { + ep2_wedding_ewan_0061_suitable_doddering_relative_trigger = { TARGET = scope:spouse_1 } + ep2_wedding_ewan_0061_suitable_doddering_relative_trigger = { TARGET = scope:spouse_2 } + } + } + # Naturally, naturally. + order_by = age + # Ok, save 'em for reference. + save_scope_as = oldling + } + } + # Right, work out who they're related to. + random_list = { + # Related to scope:spouse_1. + 100 = { + trigger = { + scope:spouse_1 = { + any_close_or_extended_family_member = { this = scope:oldling } + } + } + scope:spouse_1 = { save_scope_as = relative } + } + # Related to scope:spouse_2. + 100 = { + trigger = { + scope:spouse_2 = { + any_close_or_extended_family_member = { this = scope:oldling } + } + } + scope:spouse_2 = { save_scope_as = relative} + } + } + } + + # Diplomacy: gently interrupt them. + option = { + name = ep2_wedding_ewan.0061.a + trigger = { diplomacy >= extremely_high_skill_rating } + skill = diplomacy + + # Talk scope:oldling down without hurting HerHis feelings. + ep2_wedding_ewan_0061_diplomatically_stop_speech_effect = yes + # Scope:relative is _extremely_ grateful to you either way. + reverse_add_opinion = { + target = scope:relative + modifier = grateful_opinion + opinion = 40 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = miniscule_stress_impact_gain + sadistic = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + # Politely clap to stop them. + option = { + name = ep2_wedding_ewan.0061.b + trigger = { diplomacy < very_high_skill_rating } + + # You give it your best shot. + duel = { + skill = diplomacy + value = high_skill_rating + # You force scope:oldling down. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding_ewan.0061.b.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0061.b.tt.success + left_icon = scope:oldling + # Talk scope:oldling down without hurting HerHis feelings. + ep2_wedding_ewan_0061_diplomatically_stop_speech_effect = yes + } + } + # Scope:oldling continues apace regardless. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0061.b.tt.failure + send_interface_toast = { + title = ep2_wedding_ewan.0061.b.tt.failure + left_icon = scope:oldling + add_prestige = minor_prestige_gain + } + } + } + # Scope:relative is _extremely_ grateful to you either way. + reverse_add_opinion = { + target = scope:relative + modifier = grateful_opinion + opinion = 40 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = miniscule_stress_impact_gain + sadistic = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + # Grin and suffer through it. + option = { + name = ep2_wedding_ewan.0061.c + + # Everyone can commiserate. + scope:activity = { + every_attending_character = { + limit = { + NOR = { + this = scope:oldling + this = root + } + } + custom = custom.every_activity_guest + reverse_add_opinion = { + target = root + modifier = commiseration_opinion + opinion = 15 + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + lazy = minor_stress_impact_loss + patient = minor_stress_impact_loss + impatient = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = -1 + } + } + } + + # Mischief: cheer and whoop for more. + option = { + name = ep2_wedding_ewan.0061.d + trigger = { has_activity_intent = banquet_mischief_intent } + custom_tooltip = available_because_intent_tt + + # Same as the .e rolls, but we remove the minor result and just roll between success & crit success. + duel = { + skill = intrigue + value = very_high_skill_rating + # Critical success. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding_ewan.0061.d.tt.crit_success + send_interface_toast = { + title = ep2_wedding_ewan.0061.d.tt.crit_success + left_icon = scope:oldling + right_icon = scope:relative + # Parse out our effects. + ep2_wedding_ewan_0061_humiliation_rewards_effect = { + STRESS_AMOUNT = massive + OPINION_LOSS = -40 + } + } + } + # Success. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding_ewan.0061.d.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0061.d.tt.success + left_icon = scope:oldling + right_icon = scope:relative + # Parse out our effects. + ep2_wedding_ewan_0061_humiliation_rewards_effect = { + STRESS_AMOUNT = major + OPINION_LOSS = -30 + } + } + } + } + # Plus scope:oldling appreciates the cheering. + reverse_add_opinion = { + target = scope:oldling + modifier = compliment_opinion + opinion = 40 + } + + # We give base stress loss for this'un too. + stress_impact = { + base = major_stress_impact_loss + deceitful = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_compassion = -0.5 + } + } + } + + # Prod them to continue. + option = { + name = ep2_wedding_ewan.0061.e + trigger = { + NOT = { has_activity_intent = banquet_mischief_intent } + } + + # Commence the haranguing. + duel = { + skill = intrigue + value = very_high_skill_rating + # Critical success. + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding_ewan.0061.e.tt.crit_success + send_interface_toast = { + title = ep2_wedding_ewan.0061.e.tt.crit_success + left_icon = scope:oldling + right_icon = scope:relative + # Parse out our effects. + ep2_wedding_ewan_0061_humiliation_rewards_effect = { + STRESS_AMOUNT = massive + OPINION_LOSS = -40 + } + } + } + # Success. + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep2_wedding_ewan.0061.e.tt.success + send_interface_toast = { + title = ep2_wedding_ewan.0061.e.tt.success + left_icon = scope:oldling + right_icon = scope:relative + # Parse out our effects. + ep2_wedding_ewan_0061_humiliation_rewards_effect = { + STRESS_AMOUNT = major + OPINION_LOSS = -30 + } + } + } + # Slight success. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 10 + desc = ep2_wedding_ewan.0061.e.tt.failure + send_interface_toast = { + title = ep2_wedding_ewan.0061.e.tt.failure + left_icon = scope:oldling + right_icon = scope:relative + # Parse out our effects. + ep2_wedding_ewan_0061_humiliation_rewards_effect = { + STRESS_AMOUNT = medium + OPINION_LOSS = -20 + } + } + } + } + # Plus scope:oldling appreciates the prompts. + reverse_add_opinion = { + target = scope:oldling + modifier = compliment_opinion + opinion = 10 + } + + stress_impact = { + base = major_stress_loss + deceitful = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_compassion = -0.5 + } + } + } + + # Stop paying attention. + option = { + name = ep2_wedding_ewan.0061.f + + # Effect is stress loss. + stress_impact = { + base = medium_stress_loss + lazy = medium_stress_impact_loss + diligent = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -0.5 + } + } + } +} + +################################################## +# Oath in Moment +# by Ewan Cowhig Croft +# 0071 - 0080 +################################################## + +# Your liege offers you a favour for your support. +ep2_wedding_ewan.0071 = { + type = character_event + title = ep2_wedding_ewan.0071.t + desc = ep2_wedding_ewan.0071.desc + theme = feast_activity + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:liege + animation = admiration + } + + trigger = { + # DLC check. + has_ep2_dlc_trigger = yes + # Vassals only please. + top_liege != this + # Decent prestige level, as you can't be a nobody. + prestige_level >= medium_prestige_level + # Dynastic cooldowns. + trigger_if = { + limit = { exists = dynasty } + dynasty = { + OR = { + # AI cooldown. + AND = { + root = { is_ai = yes } + NOT = { has_variable = ep2_wedding_ewan_0071_ai_cooldown } + } + # Player cooldown. + AND = { + root = { is_ai = no } + NOT = { has_variable = ep2_wedding_ewan_0071_player_cooldown } + } + } + } + } + # If you're factioning, they won't give ye diddly. + NOR = { + is_a_faction_leader = yes + is_a_faction_member = yes + } + # Must have a liege who... + liege ?= { + NOR = { + has_imprisonment_reason = root + has_banish_reason = root + has_execute_reason = root + } + # ... has a prestige level no higher than yours. + prestige_level <= root.prestige_level + # ... really likes you. + OR = { + opinion = { + target = root + value >= 100 + } + AND = { + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + opinion = { + target = root + value >= 50 + } + } + has_trait = trusting + } + # ... juuuust let's double-check you haven't managed this whilst having a bad relationship. + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + # ... and is an AI. + is_ai = yes + # Plus, filter out stuff that'd look real weird. + NOR = { + # No crime reasons. + has_imprisonment_reason = root + has_banish_reason = root + has_revoke_title_reason = root + has_execute_reason = root + has_divorce_reason = root + # No terrible opinions you might've overridden. + has_any_major_negative_opinion_against_character_trigger = { CHARACTER = root } + # Paranoid lieges don't make themselves this vulnerable. + has_trait = paranoid + } + } + # No use if you already have a strong hook on 'em. + NOT = { has_strong_hook = liege } + } + + weight_multiplier = { + base = 1 + + # Weight up for the dynasty legacy that generally enables this. + modifier = { + # This number is deliberately high — it brings it up to about the standard weighting in the on_action, going from 1 to 100. + add = 99 + dynasty ?= { has_dynasty_perk = ep2_activities_legacy_2 } + } + } + + immediate = { + # Grab the liege immediately for mildly easier loc - we don't worry about a scripted trigger because we only have one liege who can have passed this gate. + liege = { save_scope_as = liege } + # We don't want to see this again for a century or so. + if = { + limit = { exists = dynasty } + # AI get one cooldown... + if = { + limit = { is_ai = yes } + dynasty = { + set_variable = { + name = ep2_wedding_ewan_0071_ai_cooldown + value = yes + years = 100 + } + } + } + # ... and the player gets another, so that the AI doesn't block them. + dynasty = { + set_variable = { + name = ep2_wedding_ewan_0071_player_cooldown + value = yes + years = 100 + } + } + } + } + + # Sounds like a fair trade to me! + option = { + name = ep2_wedding_ewan.0071.a + + # You get your hook. + add_hook = { + type = liege_favour_strong_hook + target = scope:liege + } + # Liege gains prestige! + scope:liege = { + add_prestige = major_prestige_gain + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + + stress_impact = { + humble = major_stress_impact_loss + arbitrary = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_rationality = 2 + ai_honor = 0.5 + } + } + } + + # Thank you, but no thank you. + option = { + name = ep2_wedding_ewan.0071.b + + # You gain prestige. + add_prestige = major_prestige_gain + # Plus dynasty prestige if you're not the same dynasty. + if = { + limit = { + OR = { + AND = { + exists = liege.dynasty + NOT = { dynasty ?= liege.dynasty } + } + AND = { + exists = dynasty + NOT = { exists = liege.dynasty } + } + } + } + dynasty = { add_dynasty_prestige = massive_dynasty_prestige_value } + } + # Liege loses a little opinion of you. + reverse_add_opinion = { + target = scope:liege + modifier = disappointed_opinion + opinion = -15 + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = -0.5 + ai_energy = -0.75 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_admin_events.txt b/N3OW/events/dlc/ep3/ep3_admin_events.txt new file mode 100644 index 00000000..886078c7 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_admin_events.txt @@ -0,0 +1,696 @@ +namespace = ep3_admin_events + +# Event to notify you that your liege has changed government and is no longer admin +ep3_admin_events.0001 = { + type = character_event + title = ep3_admin_events.0001.t + desc = { + desc = ep3_admin_events.0001.intro # Fallback + first_valid = { + triggered_desc = { + trigger = { exists = scope:tribal_gov } + desc = ep3_admin_events.0001.tribal + } + triggered_desc = { + trigger = { exists = scope:feudal_gov } + desc = ep3_admin_events.0001.feudal + } + triggered_desc = { + trigger = { exists = scope:clan_gov } + desc = ep3_admin_events.0001.clan + } + desc = ep3_admin_events.0001.fallback + } + } + theme = administrative + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = stubborn + has_trait = paranoid + } + } + animation = worry + } + animation = thinking + } + right_portrait = { + character = scope:scribe + animation = chancellor + } + lower_right_portrait = scope:liege + + trigger = { + is_landed = yes + } + + immediate = { + liege = { + save_scope_as = liege + switch = { + trigger = government_has_flag + government_is_tribal = { + save_scope_as = tribal_gov + } + government_is_feudal = { + save_scope_as = feudal_gov + } + government_is_clan = { + save_scope_as = clan_gov + } + } + if = { + limit = { + NOR = { + exists = scope:tribal_gov + exists = scope:feudal_gov + exists = scope:clan_gov + } + } + save_scope_as = feudal_gov + } + if = { + limit = { + exists = cp:councillor_chancellor + cp:councillor_chancellor = { is_available_healthy_ai_adult = yes } + } + cp:councillor_chancellor = { save_scope_as = scribe } + } + else_if = { + limit = { + any_courtier = { is_available_healthy_ai_adult = yes } + } + ordered_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + order_by = diplomacy + save_scope_as = scribe + } + } + else = { + create_character = { + location = root.capital_province + template = diplomacy_foreign_affairs_focus_friend_template + faith = scope:liege.capital_county.faith + culture = scope:liege.capital_county.culture + save_scope_as = scribe + } + } + } + scope:scribe = { + assign_quirk_effect = yes + } + + admin_change_government_effect = yes + } + + option = { # I love change + name = ep3_admin_events.0001.a + + add_character_modifier = { + modifier = ep3_admin_change_love + years = 15 + } + + stress_impact = { + lazy = medium_stress_impact_loss + craven = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = stubborn + has_trait = paranoid + has_trait = diligent + } + } + modifier = { + factor = 2 + has_trait = lazy + } + } + } + + option = { # I hate this + name = ep3_admin_events.0001.b + + add_character_modifier = { + modifier = ep3_admin_change_hate + years = 15 + } + + stress_impact = { + diligent = medium_stress_impact_loss + brave = medium_stress_impact_gain + lazy = medium_stress_impact_gain + trusting = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = lazy + has_trait = trusting + has_trait = fickle + } + } + modifier = { + factor = 2 + has_trait = diligent + } + } + } + + option = { # I don't care + name = ep3_admin_events.0001.c + + ai_chance = { + base = 200 + } + } +} + +ep3_admin_events.0002 = { + type = character_event + title = ep3_admin_events.0002.t + desc = { + first_valid = { + triggered_desc = { # Liege + trigger = { scope:previous_governor ?= root.liege } + desc = ep3_admin_events.0002.liege + } + triggered_desc = { # Same house died + trigger = { + scope:previous_governor ?= { + is_alive = no + house = root.house + } + } + desc = ep3_admin_events.0002.house_dead + } + triggered_desc = { # Same house fired + trigger = { + scope:previous_governor ?= { + is_alive = yes + house = root.house + } + } + desc = ep3_admin_events.0002.house_alive + } + triggered_desc = { # Diff house died + trigger = { + scope:previous_governor ?= { is_alive = no } + } + desc = ep3_admin_events.0002.dead + } + triggered_desc = { # Diff house fired + trigger = { + scope:previous_governor ?= { is_alive = yes } + } + desc = ep3_admin_events.0002.alive + } + desc = ep3_admin_events.0002.new + } + first_valid = { + triggered_desc = { # Same house + trigger = { scope:previous_governor.house ?= root.house } + desc = ep3_admin_events.0002.house + } + } + #desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { exists = scope:appointment_succession } + desc = ep3_admin_events.0002.appointment_succession + } + triggered_desc = { + trigger = { exists = scope:appointment } + desc = ep3_admin_events.0002.appointment + } + triggered_desc = { + trigger = { exists = scope:conquest } + desc = ep3_admin_events.0002.conquest + } + } + desc = ep3_admin_events.0002.desc + } + theme = administrative + left_portrait = { + character = root + animation = chancellor + } + lower_center_portrait = scope:previous_governor + lower_right_portrait = { + character = root.liege + trigger = { + root.liege != scope:previous_governor + } + } + cooldown = { days = 1 } + + trigger = { + this != top_liege + any_held_title = { + tier = root.highest_held_title_tier + is_landless_type_title = no + is_noble_family_title = no + } + NOT = { has_character_flag = successful_governorship_elevation } + } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_become_governor" + ordered_held_title = { + limit = { + tier = root.highest_held_title_tier + is_landless_type_title = no + is_noble_family_title = no + } + save_scope_as = governor_title + previous_holder ?= { save_scope_as = previous_governor } + if = { + limit = { + recent_history = { type = appointment_succession days = 1 } + } + save_scope_as = appointment_succession + } + else_if = { + limit = { + recent_history = { type = appointment days = 1 } + } + save_scope_as = appointment + } + else_if = { + limit = { + recent_history = { type = conquest days = 1 } + } + save_scope_as = conquest + } + } + } + + option = { + name = ep3_admin_events.0002.prosperity + trigger = { + is_landed = yes + government_has_flag = government_has_merit + } + flavor = building_buildings_give_merit_tt + custom_tooltip = ep3_admin_events.0002.tt + add_character_modifier = { + modifier = tgp_diligent_governor_modifier + years = 3 + } + + stress_impact = { + lazy = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + + option = { + name = ep3_admin_events.0002.inspection + trigger = { + is_landed = yes + government_has_flag = government_has_merit + any_held_title = { + tier = tier_county + is_landless_type_title = no + count >= 1 + } + } + flavor = inspections_give_merit_tt + custom_tooltip = ep3_admin_events.0002.tt + custom_tooltip = ep3_admin_events.0002.tt_inspection + + add_character_flag = free_inspection + + stress_impact = { + lazy = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + + option = { + name = ep3_admin_events.0002.a + custom_tooltip = ep3_admin_events.0002.tt + stress_impact = { + base = miniscule_stress_impact_loss + } + } + + after = { + if = { + limit = { + is_ai = yes + } + domicile ?= { + move_domicile = root.capital_province + } + } + } +} + +# Your admin liege changed government, and you have to do so as well +ep3_admin_events.0003 = { + hidden = yes + + trigger = { + government_allows = administrative + } + + immediate = { + # Let's evaluate and see which event you should get + if = { # If you are still landed and remain a vassal + limit = { + is_landed = yes + liege != root + } + trigger_event = ep3_admin_events.0001 + } + else_if = { # You are still landed and become independent + limit = { + is_landed = yes + liege = root + } + trigger_event = ep3_admin_events.0005 + } + else_if = { # You became unlanded - Let's go on an adventure! + limit = { # Assuming you are a player + is_landed = no + } + trigger_event = ep3_admin_events.0004 + } + } +} + +# Event to make admin into adventurers +ep3_admin_events.0004 = { + type = character_event + title = ep3_admin_events.0004.t + desc = { + desc = ep3_admin_events.0004.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:reacting_spouse + scope:reacting_spouse = { + OR = { + has_trait = gluttonous + has_trait = greedy + } + } + } + desc = ep3_admin_events.0004.desc_spouse_very_upset + } + triggered_desc = { + trigger = { exists = scope:reacting_spouse } + desc = ep3_admin_events.0004.desc_spouse_upset + } + } + } + theme = landless_adventurer + override_background = { reference = estate } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = eccentric + has_trait = brave + } + } + #animation = delirium + animation = disappointed + } + animation = disbelief + } + right_portrait = { + character = scope:reacting_spouse + triggered_animation = { + trigger = { + OR = { + has_trait = gluttonous + has_trait = greedy + } + } + animation = crying + } + animation = worry + } + + immediate = { + if = { # Destroy your noble family title if you have one + limit = { + any_held_title = { + is_noble_family_title = yes + } + } + every_held_title = { + limit = { + is_noble_family_title = yes + } + save_temporary_scope_as = family_title + prev = { destroy_title = scope:family_title } + } + } + if = { # Become an adventurer + limit = { is_ai = no } + create_landless_adventurer_title_effect = { + REASON = flag:runaway_allowed + FLAVOR_CHAR = root + } + hidden_effect = { + contract_passive_spawn_effect = { + SPAWN_CONTRACTS = 5 + } + } + } + if = { # If you are married, let's save your spouse as a scope for some added flavor + limit = { + is_married = yes + any_spouse = { + employer = root + } + } + random_spouse = { + limit = { employer = root } + save_scope_as = reacting_spouse + } + } + } + + option = { + name = { + trigger = { + exists = scope:reacting_spouse + scope:reacting_spouse = { + OR = { + has_trait = gluttonous + has_trait = greedy + } + } + } + text = ep3_admin_events.0004.a + } + name = { + trigger = { + exists = scope:reacting_spouse + scope:reacting_spouse = { + NOR = { + has_trait = gluttonous + has_trait = greedy + } + } + } + text = ep3_admin_events.0004.b + } + name = { + trigger = { + NOT = { exists = scope:reacting_spouse } + } + text = ep3_admin_events.0004.c + } + } +} + +# Notification event that you became independent +ep3_admin_events.0005 = { + type = character_event + title = ep3_admin_events.0005.t + desc = { + desc = ep3_admin_events.0005.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:still_admin } + desc = ep3_admin_events.0005.desc_still_admin + } + desc = ep3_admin_events.0005.desc_lost_admin + } + } + theme = administrative + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = fickle + has_trait = lazy + has_trait = paranoid + } + } + animation = stress + } + animation = interested + } + right_portrait = { + character = scope:messenger + animation = chancellor + } + lower_right_portrait = scope:gov_liege + + immediate = { + # Let's find a character to bring us these news + if = { + limit = { + exists = cp:councillor_chancellor + cp:councillor_chancellor = { is_available_healthy_ai_adult = yes } + } + cp:councillor_chancellor = { save_scope_as = messenger } + } + else_if = { + limit = { + any_courtier = { is_available_healthy_ai_adult = yes } + } + ordered_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + order_by = diplomacy + save_scope_as = messenger + } + } + else = { + create_character = { + location = root.capital_province + template = diplomacy_foreign_affairs_focus_friend_template + faith = root.capital_county.faith + culture = root.capital_county.culture + save_scope_as = messenger + } + } + + # Show this to make it clear to the player that you became independent + show_as_tooltip = { + 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 + } + if = { # You are allowed to keep admin as your government + limit = { + highest_held_title_tier >= tier_kingdom + culture ?= { has_cultural_parameter = can_adopt_administrative_government_as_kingdom_tier } + } + save_scope_as = still_admin + } + else = { # You change your government + admin_change_government_effect = yes + } + } + + option = { + name = ep3_admin_events.0005.a + # We handle everything in the immediate + } +} + +# Reception Hall domicile upgrade provides legitimacy +# We put it in a delayed event to make sure that we can notify the player of the effect, so they can see it +ep3_admin_events.0010 = { + hidden = yes + + immediate = { + save_scope_as = legitimacy_gainer + + # We first send the notification of the legitimacy being granted + house = { + every_house_member = { + limit = { is_ai = no } + send_interface_message = { + type = event_toast_effect_good + title = ep3_dynasty_legacy_gain_legitimacy_effect_title + left_icon = root + right_icon = root.primary_title + show_as_tooltip = { + scope:legitimacy_gainer = { add_legitimacy = house.var:ep3_legacy_legitimacy_counter } + } + } + } + } + + # Then we add the actual legitimacy + add_legitimacy = house.var:ep3_legacy_legitimacy_counter + + # Finally, let's reset the counter according to building level + house = { + if = { + limit = { + house_head.domicile ?= { has_domicile_parameter = reception_hall_legitimacy_loss_04 } + } + change_variable = { + name = ep3_legacy_legitimacy_counter + multiply = 0.75 + } + } + else_if = { + limit = { + house_head.domicile ?= { has_domicile_parameter = reception_hall_legitimacy_loss_03 } + } + change_variable = { + name = ep3_legacy_legitimacy_counter + multiply = 0.5 + } + } + else_if = { + limit = { + house_head.domicile ?= { has_domicile_parameter = reception_hall_legitimacy_loss_02 } + } + change_variable = { + name = ep3_legacy_legitimacy_counter + multiply = 0.25 + } + } + else_if = { + limit = { + house_head.domicile ?= { has_domicile_parameter = reception_hall_legitimacy_loss_01 } + } + change_variable = { + name = ep3_legacy_legitimacy_counter + multiply = 0 + } + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_akolouthos_events.txt b/N3OW/events/dlc/ep3/ep3_akolouthos_events.txt new file mode 100644 index 00000000..d6df5224 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_akolouthos_events.txt @@ -0,0 +1,332 @@ +namespace = ep3_akolouthos_events + +# Varangian-eligible courtier gains Varangian or Varangian gains Loyal +ep3_akolouthos_events.1000 = { + hidden = yes + + trigger = { + OR = { + # A varangian who isn't loyal + any_courtier = { + has_trait = varangian + NOT = { has_trait = loyal } + } + #An eligible Varangian who doesn't have the trait + any_courtier = { + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_court_position_holder = { + type = bodyguard_court_position + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + } + modifier = { + add = 1 + any_court_position_holder = { + type = bodyguard_court_position + NOT = { has_trait = loyal } + has_trait = varangian + } + } + modifier = { + add = 1 + any_court_position_holder = { + type = akolouthos_court_position + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + } + } + + immediate = { + random_court_position_holder = { + type = akolouthos_court_position + save_scope_as = akolouthos + } + #Most important that Varangian Akolouthos becomes Varangian + if = { + limit = { + any_court_position_holder = { + type = akolouthos_court_position + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + } + random_court_position_holder = { + type = akolouthos_court_position + limit = { + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + save_scope_as = trait_getter + } + ep3_send_akolouthos_message_varangian = yes + } + #Second-most important: Varangian bodyguard becomes Varangian + else_if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + save_scope_as = trait_getter + } + ep3_send_akolouthos_message_varangian = yes + } + #Then either add loyal to a Varangian bodyguard or to Akolouthos + else_if = { + limit = { + OR = { + any_court_position_holder = { + type = bodyguard_court_position + has_trait = varangian + NOT = { has_trait = loyal } + } + any_court_position_holder = { + type = akolouthos_court_position + has_trait = varangian + NOT = { has_trait = loyal } + } + } + } + random_list = { + #Add loyal to a Varangian bodyguard + 10 = { + trigger = { + any_court_position_holder = { + type = bodyguard_court_position + has_trait = varangian + NOT = { has_trait = loyal } + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + has_trait = varangian + NOT = { has_trait = loyal } + } + save_scope_as = trait_getter + } + ep3_send_akolouthos_message_loyal = yes + } + #Add loyal to a Varangian akolouthos + 10 = { + trigger = { + any_court_position_holder = { + type = akolouthos_court_position + has_trait = varangian + NOT = { has_trait = loyal } + } + } + random_court_position_holder = { + type = akolouthos_court_position + limit = { + has_trait = varangian + NOT = { has_trait = loyal } + } + save_scope_as = trait_getter + } + ep3_send_akolouthos_message_loyal = yes + } + } + } + #Add Varangian to some non-Varangian Varangian + else_if = { + limit = { + any_courtier = { + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + } + random_courtier = { + limit = { + NOT = { has_trait = varangian } + ep3_varangian_trigger = yes + } + save_scope_as = trait_getter + } + ep3_send_akolouthos_message_varangian = yes + } + #Add loyal to some non-bodyguard Varangian + else = { + random_courtier = { + limit = { + has_trait = varangian + NOT = { has_trait = loyal } + } + save_scope_as = trait_getter + } + ep3_send_akolouthos_message_loyal = yes + } + } +} + +# Akolouthos recruits Varangian +ep3_akolouthos_events.1001 = { + hidden = yes + + trigger = { + #Don't really need this if root is swarming in Varangians already + NOT = { + any_courtier_or_guest = { + count >= 8 + ep3_varangian_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + #Weigh up chances if Varangians are needed to fill posts + modifier = { + add = 1 + NOT = { + any_courtier_or_guest = { + count >= 3 + ep3_varangian_trigger = yes + } + } + } + } + + immediate = { + random_court_position_holder = { + type = akolouthos_court_position + save_scope_as = akolouthos + } + #Find a candidate in the local pool + if = { + limit = { + is_landed = yes + any_pool_character = { + province = root.capital_province + ep3_varangian_trigger = yes + prowess > low_skill_rating + } + } + random_pool_character = { + province = root.capital_province + limit = { + ep3_varangian_trigger = yes + prowess > low_skill_rating + } + save_scope_as = new_varangian + } + scope:new_varangian = { + if = { + limit = { + NOT = { has_trait = varangian } + } + hidden_effect = { + add_trait = varangian + } + } + } + } + #Find a candidate in pools of akolouthos's culture + else_if = { + limit = { + scope:akolouthos = { + ep3_varangian_trigger = yes + } + exists = scope:akolouthos.culture.culture_head + scope:akolouthos.culture.culture_head = { + is_landed = yes + } + any_pool_character = { + province = scope:akolouthos.culture.culture_head.capital_province + ep3_varangian_trigger = yes + prowess >= low_skill_rating + } + } + scope:akolouthos.culture.culture_head = { + save_scope_as = akolouthos_culture_head + } + random_pool_character = { + province = scope:akolouthos_culture_head.capital_province + limit = { + ep3_varangian_trigger = yes + prowess > low_skill_rating + } + save_scope_as = new_varangian + } + scope:new_varangian = { + if = { + limit = { + NOT = { has_trait = varangian } + } + hidden_effect = { + add_trait = varangian + } + } + } + } + #Create a candidate + else_if = { + limit = { + scope:akolouthos = { + ep3_varangian_trigger = yes + } + } + create_character = { + template = varangian_template + location = root.location + culture = scope:akolouthos.culture + faith = scope:akolouthos.faith + dynasty = none + save_scope_as = new_varangian + } + } + else_if = { + limit = { + current_date < 990 + } + #Norse + create_character = { + template = varangian_template + location = root.location + culture = culture:norse + faith = root.faith + dynasty = none + save_scope_as = new_varangian + } + } + else = { + #Anglo-Saxon + create_character = { + template = varangian_template + location = root.location + culture = culture:anglo_saxon + faith = root.faith + dynasty = none + save_scope_as = new_varangian + } + } + send_interface_message = { + type = event_martial_good_with_text + title = ep3_akolouthos_events.1001 + desc = ep3_akolouthos_events.1001_notification_tooltip + tooltip = akolouthos_effect_tooltip + left_icon = scope:new_varangian + right_icon = scope:akolouthos + add_courtier = scope:new_varangian + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_camp_party_events.txt b/N3OW/events/dlc/ep3/ep3_camp_party_events.txt new file mode 100644 index 00000000..53debc6d --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_camp_party_events.txt @@ -0,0 +1,3727 @@ +namespace = ep3_camp_party + +################################ +# Maintenance +################################ + +# START EVENT +ep3_camp_party.0001 = { + type = activity_event + title = ep3_camp_party.0001.t + desc = ep3_camp_party.0001.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + center_portrait = { + character = root + animation = drink + } + + option = { + name = ep3_camp_party.0001.a + ai_chance = { + base = 100 + } + } +} + +# CONCLUSION EVENT +ep3_camp_party.0009 = { + type = activity_event + title = ep3_camp_party.0009.t + desc = ep3_camp_party.0009.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + center_portrait = { + character = root + animation = ecstasy + } + + immediate = { + #Reward effects + camp_party_completed_log_entry_effect = yes + } + + option = { + name = ep3_camp_party.0009.a + ai_chance = { + base = 100 + } + } +} + +################################ +# Events +################################ +# ep3_camp_party.1000 - Listen to a story at the campfire +# ep3_camp_party.1005 - Someone wanders off and gets lost +# ep3_camp_party.1010 - Solve a riddle +# ep3_camp_party.1015 - An archery contest breaks out +# ep3_camp_party.1020 - A local turns up +# ep3_camp_party.1025 - Bond with your intent target +# ep3_camp_party.1030 - Relieve stress - intent event +# ep3_camp_party.1035 - Fell a tree for more firewood +# ep3_camp_party.1040 - Encounter a wandering merchant +# + +# Listen to a story at the campfire +ep3_camp_party.1000 = { + type = activity_event + title = ep3_camp_party.1000.t + desc = ep3_camp_party.1000.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = drink + } + right_portrait = { + character = scope:storyteller + animation = storyteller + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + involved_activity = { + any_attending_character = { + count > 3 #Make sure there's actually a 'crowd' to listen + this != root + is_ai = yes + is_adult = yes + } + } + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + random_attending_character = { + limit = { + this != root + is_ai = yes + is_adult = yes + } + save_scope_as = storyteller + } + } + } + + #If we rip some of these tables apart... + option = { + name = ep3_camp_party.1000.a + + trigger = { + involved_activity = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + } + + add_internal_flag = special + + flavor = ep3_camp_party.1000.a.tt + + domicile = { + change_provisions = medium_provisions_loss + } + + create_artifact = { + name = ep3_makeshift_mace + description = ep3_makeshift_mace_description + type = mace + visuals = mace + modifier = artifact_prowess_4_modifier + modifier = artifact_mercenary_hire_cost_mult_2_modifier + modifier = artifact_men_at_arms_maintenance_8_modifier + modifier = artifact_monthly_prestige_penalty_modifier + creator = root + rarity = common + save_scope_as = makeshift_mace + } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Oh yeah? Well I have a story too! + option = { + name = ep3_camp_party.1000.b + + trigger = { + OR = { + has_trait = lifestyle_poet + has_trait = lifestyle_traveler + } + } + + duel = { + skill = diplomacy + value = medium_skill_rating + # Success: Your story is believed + 50 = { + desc = ep3_camp_party.1000.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1000.b.success + left_icon = root + + add_prestige = medium_prestige_gain + involved_activity = { + if = { + limit = { + any_attending_character = { + NOR = { + this = scope:storyteller + this = root + } + } + } + every_attending_character = { + custom = custom.every_attending_character + limit = { + NOR = { + this = scope:storyteller + this = root + } + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 10 + } + } + } + } + } + } + # Failure + 50 = { + desc = ep3_camp_party.1000.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1000.b.failure + left_icon = root + + add_prestige = medium_prestige_loss + } + } + } + + random = { + chance = 50 + + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_camp_party.1000.b.tt + left_icon = root + right_icon = scope:storyteller + + reverse_add_opinion = { + target = scope:storyteller + modifier = upstaged_opinion + opinion = -25 + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -1 + } + } + } + + #Another! + option = { + name = ep3_camp_party.1000.c + + scope:storyteller = { + duel = { + skill = diplomacy + value = medium_skill_rating + # Success: Their next story is great + 50 = { + desc = ep3_camp_party.1000.c.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1000.c.success + left_icon = root + right_icon = scope:storyteller + + involved_activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + progress_towards_friend_effect = { + REASON = friend_encouraged_tale + CHARACTER = root + OPINION = default_friend_opinion + } + } + } + # Failure: Their next story is a damp squib + 50 = { + desc = ep3_camp_party.1000.c.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1000.c.failure + left_icon = root + right_icon = scope:storyteller + + add_prestige = medium_prestige_loss + } + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + #A fine tale. + option = { + name = ep3_camp_party.1000.d + + scope:activity = { activity_special_type_progression_variable = { NUM = 10 } } + custom_tooltip = camp_party_tt_positive_tiny + + stress_impact = { + patient = minor_stress_impact_loss + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +# Someone wanders off and gets lost +ep3_camp_party.1005 = { + type = activity_event + title = ep3_camp_party.1005.t + desc = ep3_camp_party.1005.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:attendee + animation = worry + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + involved_activity = { + any_attending_character = { + count > 2 #Requires you plus two others + this != root + is_ai = yes + is_adult = yes + } + } + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + random_attending_character = { + limit = { + this != root + is_ai = yes + is_adult = yes + } + save_scope_as = attendee + } + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:attendee + } + is_ai = yes + is_adult = yes + } + save_scope_as = wanderer + } + } + } + + #Chuck some more wood on the fire to guide them home + option = { + name = ep3_camp_party.1005.a + + trigger = { + involved_activity = { + OR = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + } + } + + add_internal_flag = special + + domicile = { + change_provisions = minor_provisions_loss + } + + reverse_add_opinion = { + target = scope:wanderer + modifier = grateful_opinion + opinion = 20 + } + + if = { + limit = { + involved_activity = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + } + } + random = { + chance = 50 + + custom_tooltip = ep3_camp_party.1005.a.tt.positive + trigger_event = ep3_camp_party.1006 + } + } + if = { #Boost chance for lavish + limit = { + involved_activity = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + } + random = { + chance = 80 + + custom_tooltip = ep3_camp_party.1005.a.tt.positive + trigger_event = ep3_camp_party.1006 + } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Search for them + option = { + name = ep3_camp_party.1005.b + + duel = { + skills = { learning martial } + value = medium_skill_rating + + # You find them + 50 = { + desc = ep3_camp_party.1005.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1005.b.success + left_icon = root + right_icon = scope:wanderer + + if = { + limit = { + NOT = { + has_trait = lifestyle_hunter + } + } + add_trait = lifestyle_hunter + } + + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = { 3 8 } + } + + reverse_add_opinion = { + target = scope:wanderer + modifier = grateful_opinion + opinion = 15 + } + + scope:activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + } + } + # You find some berries + 50 = { + desc = ep3_camp_party.1005.b.neutral + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1005.b.neutral + left_icon = root + right_icon = scope:attendee + + domicile = { + change_provisions = microscopic_provisions_gain + } + + scope:wanderer = { + random = { + chance = 35 + add_trait = lifestyle_gardener + } + } + } + } + # You don't find them, and have a tangle with a wild animal + 50 = { + desc = ep3_camp_party.1005.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1005.b.failure + left_icon = root + right_icon = scope:wanderer + + add_prestige = miniscule_prestige_loss + increase_wounds_no_death_effect = { REASON = wild_animal } + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 1 + } + } + } + + #They'll come back, no worries + option = { + name = ep3_camp_party.1005.c + + random_list = { + #They find their way back + 50 = { + desc = ep3_camp_party.1005.c.success + + send_interface_toast = { + title = ep3_camp_party.1005.c.success + left_icon = root + right_icon = scope:wanderer + + scope:wanderer = { + add_stress = miniscule_stress_loss + } + + scope:activity = { activity_special_type_progression_variable = { NUM = 10 } } + custom_tooltip = camp_party_tt_positive_tiny + } + } + #They find their way back, wounded + 50 = { + desc = ep3_camp_party.1005.c.failure + + send_interface_toast = { + title = ep3_camp_party.1005.c.failure + left_icon = root + right_icon = scope:wanderer + + scope:wanderer = { + increase_wounds_no_death_effect = { REASON = wild_animal } + } + } + } + # They are lost forever + 10 = { + desc = ep3_camp_party.1005.c.critfailure + + send_interface_toast = { + title = ep3_camp_party.1005.c.critfailure + left_icon = root + right_icon = scope:attendee + + scope:wanderer = { + move_to_pool = yes + } + } + } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = -1 + } + } + } +} + +# Followup to 1005: some wanderers join! +ep3_camp_party.1006 = { + type = activity_event + title = ep3_camp_party.1006.t + desc = ep3_camp_party.1006.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:newcomer + animation = obsequious_bow + } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + } + if = { + limit = { + any_pool_character = { + province = root.location + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = newcomer + } + } + else = { + create_character = { + template = bandit_character + culture = location.culture + faith = location.faith + location = root.location + save_scope_as = newcomer + } + } + hidden_effect = { + scope:newcomer = { + add_trait = lifestyle_physician + add_trait_xp = { + trait = lifestyle_physician + value = { + integer_range = { + min = 50 + max = 100 + } + } + } + add_trait = lifestyle_traveler + add_trait_xp = { + trait = lifestyle_traveler + track = danger + value = { + integer_range = { + min = 25 + max = 75 + } + } + } + } + } + domicile = { + change_provisions = miniscule_provisions_gain + } + } + + #Join, and stay! + option = { + name = ep3_camp_party.1006.a + + scope:newcomer = { + add_to_activity = scope:activity + } + add_courtier = scope:newcomer + + scope:activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + stress_impact = { + calm = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Come join the revelries, and teach me how you survive in the wilderness + option = { + name = ep3_camp_party.1006.b + + scope:newcomer = { + add_to_activity = scope:activity + } + + scope:activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + if = { + limit = { + NOT = { + has_trait = lifestyle_physician + } + } + add_trait = lifestyle_physician + } + + add_trait_xp = { + trait = lifestyle_physician + value = { 15 30 } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 1 + } + } + } +} + +# Solve a riddle +ep3_camp_party.1010 = { + type = activity_event + title = ep3_camp_party.1010.t + desc = { + desc = ep3_camp_party.1010.desc + random_valid = { + triggered_desc = { + trigger = { has_character_flag = 1010_first_riddle_answer } + desc = ep3_camp_party.1010.desc_riddle_01 + } + triggered_desc = { + trigger = { has_character_flag = 1010_second_riddle_answer } + desc = ep3_camp_party.1010.desc_riddle_02 + } + triggered_desc = { + trigger = { has_character_flag = 1010_third_riddle_answer } + desc = ep3_camp_party.1010.desc_riddle_03 + } + triggered_desc = { + trigger = { has_character_flag = 1010_fourth_riddle_answer } + desc = ep3_camp_party.1010.desc_riddle_04 + } + triggered_desc = { + trigger = { has_character_flag = 1010_fifth_riddle_answer } + desc = ep3_camp_party.1010.desc_riddle_05 + } + triggered_desc = { + trigger = { has_character_flag = 1010_sixth_riddle_answer } + desc = ep3_camp_party.1010.desc_riddle_06 + } + triggered_desc = { + trigger = { has_character_flag = 1010_seventh_riddle_answer } + desc = ep3_camp_party.1010.desc_riddle_07 + } + triggered_desc = { + trigger = { has_character_flag = 1010_eighth_riddle_answer } + desc = ep3_camp_party.1010.desc_riddle_08 + } + } + desc = ep3_camp_party.1010.desc_outro + } + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:riddler + animation = drink + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + involved_activity = { + any_attending_character = { + count > 1 + this != root + is_ai = yes + is_adult = yes + } + } + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + random_attending_character = { + limit = { + this != root + is_ai = yes + is_adult = yes + } + save_scope_as = riddler + } + } + random_list = { + 1 = { add_character_flag = 1010_first_riddle_answer } + 1 = { add_character_flag = 1010_second_riddle_answer } + 1 = { add_character_flag = 1010_third_riddle_answer } + 1 = { add_character_flag = 1010_fourth_riddle_answer } + 1 = { add_character_flag = 1010_fifth_riddle_answer } + 1 = { add_character_flag = 1010_sixth_riddle_answer } + 1 = { add_character_flag = 1010_seventh_riddle_answer } + 1 = { add_character_flag = 1010_eighth_riddle_answer } + } + } + + #I'm big brained and know the answer + option = { + name = ep3_camp_party.1010.a + + trigger = { + OR = { + has_trait = intellect_good + has_trait = shrewd + } + } + + reverse_add_opinion = { + target = scope:riddler + modifier = disappointed_opinion + opinion = -5 + } + + add_prestige = medium_prestige_gain + + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + else = { + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = wit + value = tournament_hastiludes_xp_gain_medium_value + } + } + + stress_impact = { + arrogant = medium_stress_impact_loss + impatient = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Hmm, well, what about this guess? + option = { + name = ep3_camp_party.1010.b + + duel = { + skill = learning + value = medium_skill_rating + # Success: You guessed right + 50 = { + desc = ep3_camp_party.1010.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1010.b.success.title #Used for supplying the actual answer + left_icon = root + right_icon = scope:riddler + + add_prestige = medium_prestige_gain + involved_activity = { + every_attending_character = { + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 5 + } + } + } + } + } + # Failure: You guessed wrong + 50 = { + desc = ep3_camp_party.1010.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1010.b.failure + left_icon = root + right_icon = scope:riddler + + add_prestige = minor_prestige_loss + scope:riddler = { + add_stress = miniscule_stress_loss + } + } + } + } + + stress_impact = { + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + gregarious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + } + } + } + + #No idea, want a drink? + option = { + name = ep3_camp_party.1010.c + + flavor = ep3_camp_party.1010.c.tt + + involved_activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + stress_impact = { + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + humble = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + after = { + remove_character_flag ?= 1010_first_riddle_answer + remove_character_flag ?= 1010_second_riddle_answer + remove_character_flag ?= 1010_third_riddle_answer + remove_character_flag ?= 1010_fourth_riddle_answer + remove_character_flag ?= 1010_fifth_riddle_answer + remove_character_flag ?= 1010_sixth_riddle_answer + remove_character_flag ?= 1010_seventh_riddle_answer + remove_character_flag ?= 1010_eighth_riddle_answer + } +} + +# An archery contest breaks out +ep3_camp_party.1015 = { + type = activity_event + title = ep3_camp_party.1015.t + desc = ep3_camp_party.1015.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:archer + animation = hunting_shortbow_rest_arrow_default + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + involved_activity = { + any_attending_character = { + count > 1 + this != root + is_ai = yes + is_adult = yes + } + } + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + random_attending_character = { + limit = { + this != root + is_ai = yes + is_adult = yes + } + save_scope_as = archer + } + } + + if = { + limit = { + involved_activity = { + OR = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + } + } + involved_activity = { + random_attending_character = { + limit = { + NOR = { + this = root + this = scope:archer + } + is_ai = yes + is_adult = yes + } + save_scope_as = apple_holder + } + } + } + } + + #Use apples as targets + option = { + name = ep3_camp_party.1015.a + + trigger = { + involved_activity = { + OR = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + any_attending_character = { + count > 2 + this != root + is_ai = yes + is_adult = yes + } + } + } + + add_internal_flag = special + + flavor = ep3_camp_party.1015.a.tt + + domicile = { + change_provisions = microscopic_provisions_loss + } + + duel = { + skill = prowess + target = scope:archer + # Success: You hit + 30 = { + desc = ep3_camp_party.1015.a.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1015.a.success + left_icon = root + right_icon = scope:archer + + add_prestige = major_prestige_gain + if = { + limit = { + has_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + else = { + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + scope:archer = { + pay_short_term_gold = { + target = root + gold = tiny_gold_value + } + } + } + } + # Failure: You miss + 40 = { + desc = ep3_camp_party.1015.a.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1015.a.failure + left_icon = root + right_icon = scope:archer + + pay_short_term_gold = { + target = scope:archer + gold = tiny_gold_value + } + + scope:archer = { + 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 + } + } + else = { + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + } + # Failure: You REALLY miss + 10 = { + desc = ep3_camp_party.1015.a.critfailure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1015.a.critfailure + left_icon = root + right_icon = scope:apple_holder + + scope:apple_holder = { + if = { + limit = { + NOT = { + has_trait = one_eyed + } + } + add_trait = one_eyed + } + else = { + increase_wounds_no_death_effect = { REASON = wounds } + } + add_opinion = { + target = root + modifier = maimed_me + opinion = -50 + } + } + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + callous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + #Why don't we make this into a hunting competition? + option = { + name = ep3_camp_party.1015.b + + random_list = { + 10 = { + desc = ep3_camp_party.1015.b.success + modifier = { #If you're both good + add = 5 + AND = { + scope:archer = { + prowess > 10 + } + prowess > 10 + } + } + modifier = { #If at least one of you is good + add = 5 + OR = { + scope:archer = { + prowess > 10 + } + prowess > 10 + } + } + + send_interface_toast = { + title = ep3_camp_party.1015.b.success + left_icon = root + right_icon = scope:archer + + domicile = { + change_provisions = { miniscule_provisions_gain medium_provisions_gain } + } + if = { + limit = { + has_trait = lifestyle_hunter + } + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = tournament_hastiludes_xp_gain_major_value + } + } + else = { + add_trait = lifestyle_hunter + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + 10 = { + desc = ep3_camp_party.1015.b.failure + send_interface_toast = { + title = ep3_camp_party.1015.b.failure + left_icon = root + right_icon = scope:archer + + if = { + limit = { + has_trait = lifestyle_hunter + } + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = tournament_hastiludes_xp_gain_medium_value + } + } + else = { + add_trait = lifestyle_hunter + add_trait_xp = { + trait = lifestyle_hunter + track = hunter + value = tournament_hastiludes_xp_gain_medium_value + } + } + + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + 1 = { + desc = ep3_camp_party.1015.b.critfailure + send_interface_toast = { + title = ep3_camp_party.1015.b.critfailure + left_icon = root + right_icon = scope:archer + + increase_wounds_no_death_effect = { REASON = wounds } + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Come, then! + option = { + name = ep3_camp_party.1015.c + + trigger = { + involved_activity = { + NOR = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + } + } + + duel = { + skill = prowess + target = scope:archer + # Success: You win + 50 = { + desc = ep3_camp_party.1015.c.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1015.c.success + left_icon = root + right_icon = scope:archer + + 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 + } + } + else = { + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_major_value + } + } + } + } + # Failure: You lose + 50 = { + desc = ep3_camp_party.1015.c.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1015.c.failure + left_icon = root + right_icon = scope:archer + + add_stress = miniscule_stress_gain + scope:archer = { + add_prestige = medium_prestige_gain + } + } + } + } + + stress_impact = { + patient = minor_stress_impact_gain + impatient = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + #Ah, you're better than me, let's just sit and talk shall we? + option = { + name = ep3_camp_party.1015.d + + involved_activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + reverse_add_opinion = { + target = scope:archer + modifier = pleased_opinion + opinion = 25 + } + + stress_impact = { + arrogant = minor_stress_impact_gain + impatient = minor_stress_impact_gain + humble = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } +} + +# A local turns up +ep3_camp_party.1020 = { + type = activity_event + title = ep3_camp_party.1020.t + desc = { + desc = ep3_camp_party.1020.opening + first_valid = { + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = witch_flag + } + } + desc = ep3_camp_party.1020.witch + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = cannibal_flag + } + } + desc = ep3_camp_party.1020.cannibal + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = mangled_flag + } + } + desc = ep3_camp_party.1020.mangled + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = mystic_flag + } + } + desc = ep3_camp_party.1020.mystic + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = siblings_flag + } + } + desc = ep3_camp_party.1020.siblings + } + } + triggered_desc = { + trigger = { + scope:local = { + NOT = { + has_character_flag = siblings_flag + } + } + } + desc = ep3_camp_party.1020.ending + } + } + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = shock + } + center_portrait = { + trigger = { + exists = scope:local_sibling + } + character = scope:local_sibling + animation = sick + camera = camera_event_left_forward + } + right_portrait = { + character = scope:local + animation = beg + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + involved_activity = { + OR = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + } + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + } + + random_list = { + 2 = { #Normal pool character + trigger = { + any_pool_character = { + province = root.location + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = local + } + } + 1 = { + create_character = { + template = bp1_yearly_2021_learning_witch_template + culture = location.culture + faith = location.faith + location = root.location + save_scope_as = local + } + hidden_effect = { + scope:local = { + add_character_flag = witch_flag + } + } + } + 1 = { + create_character = { + template = generic_peasant_character + culture = location.culture + faith = location.faith + location = root.location + save_scope_as = local + } + hidden_effect = { + scope:local = { + add_secret = { type = secret_cannibal } + add_character_flag = cannibal_flag + } + } + } + 1 = { + create_character = { + template = generic_peasant_character + culture = location.culture + faith = location.faith + location = root.location + age = { 20 30 } + save_scope_as = local + } + hidden_effect = { + scope:local = { + random_list = { + 1 = { #Cowhig Croft 'em + add_trait = one_eyed + add_trait = one_legged + add_trait = scarred + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 50 + max = 100 + } + } + } + add_learning_skill = { 5 15 } + add_diplomacy_skill = { 5 15 } + add_character_flag = mangled_flag + } + 1 = { #'Yes it is', not 'that it be' + add_trait = lifestyle_mystic + add_trait_xp = { + trait = lifestyle_mystic + value = { + integer_range = { + min = 50 + max = 100 + } + } + } + add_trait = lifestyle_herbalist + set_age = { 35 60 } + add_character_flag = mystic_flag + } + 1 = { #Someone suspiciously close to their sibling, whose parents have mysteriously just died... + create_character = { #Make their dad + template = generic_peasant_character + gender = male + culture = location.culture + faith = location.faith + location = root.location + age = { 50 70 } + save_scope_as = local_dad + } + create_character = { #Make their mum + template = generic_female_peasant_character + gender = female + culture = location.culture + faith = location.faith + location = root.location + age = { 50 70 } + save_scope_as = local_mum + } + + scope:local_dad = { + death = { death_reason = death_mysterious } + } + scope:local_mum = { + death = { death_reason = death_mysterious } + } + + #Now back to the person at hand + set_sexuality = bisexual #No, this isn't a statement on the inherently incestuous nature of bisexuals, I just don't want to have to set up all the cascading checks for brother/brother, brother/sister, sister/sister for what is a throwaway part of an event. OK?! (ㆆ_ㆆ) + add_secret = { type = secret_incest } + set_father = scope:local_dad + set_mother = scope:local_mum + add_character_flag = siblings_flag + + #Make them a good character that you want to have, so giving us plenty of intrigue later on + random_list = { + 10 = { add_trait = beauty_good_1 } + 10 = { add_trait = beauty_good_2 } + 10 = { add_trait = physique_good_1 } + 10 = { add_trait = physique_good_2 } + 1 = { add_trait = fecund } + 5 = { add_trait = strong } + 5 = { add_trait = shrewd } + } + + #And now to their sibling + create_character = { + template = generic_peasant_character + culture = location.culture + faith = location.faith + location = root.location + age = { 20 30 } + save_scope_as = local_sibling + } + scope:local_sibling = { + set_sexuality = bisexual #Same goes here! + set_father = scope:local_dad + set_mother = scope:local_mum + set_relation_lover = { target = scope:local } + random_list = { #As above + 10 = { add_trait = beauty_good_1 } + 10 = { add_trait = beauty_good_2 } + 10 = { add_trait = physique_good_1 } + 10 = { add_trait = physique_good_2 } + 1 = { add_trait = fecund } + 5 = { add_trait = strong } + 5 = { add_trait = shrewd } + } + } + + random_list = { #Did they kill their parents? + 5 = { #First one did + add_trait = kinslayer_3 + } + 5 = { #Second one did + scope:local_sibling = { + add_trait = kinslayer_3 + } + } + 20 = { #They BOTH did! + add_trait = kinslayer_3 + scope:local_sibling = { + add_trait = kinslayer_3 + } + } + } + } + } + } + } + } + } + } + + #Invite them in + option = { + name = ep3_camp_party.1020.a + + domicile = { + change_provisions = minor_provisions_loss + } + + add_courtier = scope:local + reverse_add_opinion = { + target = scope:local + modifier = grateful_opinion + opinion = 50 + } + if = { + limit = { + exists = scope:local_sibling + } + add_courtier = scope:local_sibling + reverse_add_opinion = { + target = scope:local_sibling + modifier = grateful_opinion + opinion = 50 + } + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = medium_stress_impact_gain + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Give them food + option = { + name = ep3_camp_party.1020.b + + domicile = { + change_provisions = miniscule_provisions_loss + } + + add_piety = medium_piety_gain + + involved_activity = { + every_attending_character = { + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = charity_opinion + opinion = 15 + } + } + } + + stress_impact = { + just = miniscule_stress_impact_loss + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + #Something's off about them; turn them away + option = { + name = ep3_camp_party.1020.c + + domicile = { + change_provisions = miniscule_provisions_gain + } + + involved_activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + trigger_event = ep3_camp_party.1021 + + stress_impact = { + paranoid = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + trusting = minor_stress_impact_gain + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +# Resolution event to the previous +ep3_camp_party.1021 = { + type = activity_event + title = ep3_camp_party.1021.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = paranoid + } + } + desc = ep3_camp_party.1021.callous + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = witch_flag + } + } + desc = ep3_camp_party.1021.witch + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = cannibal_flag + } + } + desc = ep3_camp_party.1021.cannibal + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = mangled_flag + } + } + desc = ep3_camp_party.1021.mangled + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = mystic_flag + } + } + desc = ep3_camp_party.1021.mystic + } + triggered_desc = { + trigger = { + scope:local = { + has_character_flag = siblings_flag + } + } + desc = ep3_camp_party.1021.siblings + } + triggered_desc = { + desc = ep3_camp_party.1021.normal + } + } + } + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = paranoid + } + } + animation = dismissal + } + triggered_animation = { + trigger = { + scope:local = { + OR = { + has_character_flag = siblings_flag + has_character_flag = mystic_flag + } + } + } + animation = grief + } + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = paranoid + } + } + animation = worry + } + } + center_portrait = { + trigger = { + exists = scope:local_sibling + } + character = scope:local_sibling + animation = shock + camera = camera_event_left_forward + } + right_portrait = { + character = scope:local + animation = anger + } + cooldown = { months = 3 } + + option = { + name = { + trigger = { + scope:local = { + has_character_flag = siblings_flag + } + } + text = ep3_camp_party.1021.a.face + } + name = { + trigger = { + scope:local = { + has_character_flag = mystic_flag + } + } + text = ep3_camp_party.1021.a.ill + } + name = { + trigger = { + scope:local = { + NOR = { + has_character_flag = siblings_flag + has_character_flag = mystic_flag + } + } + } + text = ep3_camp_party.1021.a.sad + } + + trigger = { + NOR = { + has_trait = callous + has_trait = paranoid + } + } + + if = { #If you turn away the witch, they turn one of your people into one + limit = { + scope:local = { + has_character_flag = witch_flag + } + } + hidden_effect = { + involved_activity = { + random_attending_character = { + limit = { + this != root + } + add_secret = { type = secret_witch } + } + } + } + } + else_if = { #Or a cannibal + limit = { + scope:local = { + has_character_flag = cannibal_flag + } + } + hidden_effect = { + involved_activity = { + random_attending_character = { + limit = { + this != root + } + add_secret = { type = secret_cannibal } + } + } + } + } + else_if = { #If you turn away the mangled man, everyone just feels bad + limit = { + scope:local = { + has_character_flag = mangled_flag + } + } + involved_activity = { + every_attending_character = { + custom = custom.every_attending_character + add_opinion = { + target = root + modifier = guilty_opinion + opinion = -25 + } + add_stress = minor_stress_gain + } + random_attending_character = { + limit = { + NOR = { + this = root + has_trait = loyal + has_trait = sadistic + has_trait = callous + } + } + random = { + chance = 75 + add_trait = disloyal + } + } + } + } + else_if = { #The mystic poisons you + limit = { + scope:local = { + has_character_flag = mystic_flag + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + else_if = { #The siblings attack you + limit = { + scope:local = { + has_character_flag = siblings_flag + } + } + random_list = { + 10 = { + modifier = { + employs_court_position = court_physician_court_position + add = 5 + } + increase_wounds_no_death_effect = { REASON = fight } + } + 3 = { + add_trait = one_eyed + } + } + } + else = { + if = { + limit = { + NOT = { + has_character_modifier = ep3_uneasy_modifier + } + } + add_character_modifier = { + modifier = ep3_uneasy_modifier + years = 3 + } + } + } + + stress_impact = { + base = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { + name = ep3_camp_party.1021.b + + trigger = { + OR = { + has_trait = callous + has_trait = paranoid + } + } + + add_stress = medium_stress_loss + } + + after = { + scope:local = { + remove_character_flag = witch_flag + remove_character_flag = cannibal_flag + remove_character_flag = mangled_flag + remove_character_flag = mystic_flag + remove_character_flag = siblings_flag + } + } +} + +# Bond with your intent target +ep3_camp_party.1025 = { + type = activity_event + title = ep3_camp_party.1025.t + desc = ep3_camp_party.1025.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:friend + animation = storyteller + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + has_activity_intent = befriend_attendee_intent + intent_target ?= { + is_alive = yes + this != root + } + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + } + intent_target = { save_scope_as = friend } + } + + #No, no, tell me more! + option = { + name = ep3_camp_party.1025.a + + trigger = { + OR = { + has_relation_potential_friend = scope:friend + has_trait = diplomat + has_trait = gregarious + diplomacy > 15 + number_of_personality_traits_in_common = { + target = scope:friend + value >= 2 + } + number_of_traits_in_common = { + target = scope:friend + value >= 3 + } + } + } + + set_relation_friend = { + target = scope:friend + reason = friend_listened_to_story + } + complete_activity_intent = yes + + stress_impact = { + arrogant = minor_stress_impact_gain + humble = minor_stress_impact_loss + callous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #I do! I did stuff like... + option = { + name = ep3_camp_party.1025.b + + duel = { + skill = diplomacy + value = medium_skill_rating + # Success: You pluck a memory out of thin air + 50 = { + desc = ep3_camp_party.1025.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1025.b.success + left_icon = root + right_icon = scope:friend + + progress_towards_friend_effect = { + REASON = friend_bonded_over_story + CHARACTER = scope:friend + OPINION = default_friend_opinion + } + if = { + limit = { + has_relation_friend = scope:friend + } + complete_activity_intent = yes + } + } + } + # Failure: You had a boring childhood, apparently + 50 = { + desc = ep3_camp_party.1025.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1025.b.failure + left_icon = root + right_icon = scope:friend + + reverse_add_opinion = { + target = scope:friend + modifier = disappointed_opinion + opinion = -20 + } + } + } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + patient = miniscule_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #...how about a topic change? + option = { + name = ep3_camp_party.1025.c + + flavor = ep3_camp_party.1025.c.tt + + random = { + chance = 50 + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } +} + +# Relieve stress - intent event +ep3_camp_party.1030 = { + type = activity_event + title = ep3_camp_party.1030.t + desc = ep3_camp_party.1030.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = drink + } + right_portrait = { + character = scope:reveler + animation = lantern + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + has_activity_intent = reduce_stress_intent + involved_activity = { + any_attending_character = { + count > 1 + this != root + is_ai = yes + is_adult = yes + } + } + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + random_attending_character = { + limit = { + this != root + is_ai = yes + is_adult = yes + } + save_scope_as = reveler + } + } + } + + # Crack out all the reserves lads! + option = { + name = ep3_camp_party.1030.a + + trigger = { + involved_activity = { + OR = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + } + } + + add_internal_flag = special + + if = { + limit = { + has_trait = lifestyle_reveler + } + add_trait_xp = { + trait = lifestyle_reveler + value = { 10 25 } + } + } + else = { + add_trait = lifestyle_reveler + add_trait_xp = { + trait = lifestyle_reveler + value = { 10 25 } + } + } + + involved_activity = { + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != root + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + add_stress = medium_stress_loss + } + } + + domicile = { + change_provisions = medium_provisions_loss + } + + involved_activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + stress_impact = { + base = major_stress_impact_loss + temperate = miniscule_stress_impact_gain + gluttonous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -1 + } + } + } + + # Let's live a little - downgraded version of option A + option = { + name = ep3_camp_party.1030.b + + involved_activity = { + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != root + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + add_stress = miniscule_stress_loss + } + } + + domicile = { + change_provisions = minor_provisions_loss + } + + random = { + chance = 30 + send_interface_toast = { + title = ep3_camp_party.1030.b.success + left_icon = root + + add_character_modifier = { + modifier = ep3_life_of_the_party + years = 10 + } + } + } + + scope:activity = { activity_special_type_progression_variable = { NUM = 10 } } + custom_tooltip = camp_party_tt_positive_tiny + + stress_impact = { + base = minor_stress_impact_loss + gluttonous = miniscule_stress_impact_gain + temperate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + #We should be sensible + option = { + name = ep3_camp_party.1030.c + + add_character_modifier = { + modifier = ep3_sensible_provisions + years = 10 + } + + involved_activity = { + every_attending_character = { + custom = custom.every_attending_character + limit = { + this != root + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + } + + stress_impact = { + temperate = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + honest = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + +# Fell a tree for more firewood +ep3_camp_party.1035 = { + type = activity_event + title = ep3_camp_party.1035.t + desc = ep3_camp_party.1035.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:treefeller + animation = aggressive_axe + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = mountains + } + } + } + + immediate = { + location = { + save_scope_as = location + } + involved_activity = { + save_scope_as = activity + random_attending_character = { + limit = { + this != root + is_ai = yes + is_adult = yes + } + save_scope_as = treefeller + } + } + } + + # Burn some old barrels and crates + option = { + name = ep3_camp_party.1035.a + + trigger = { + involved_activity = { + OR = { + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_simple + } + has_activity_option = { + category = camp_party_option_food + option = camp_party_food_lavish + } + } + } + } + + add_internal_flag = special + + if = { + limit = { + NOT = { + has_trait = shrewd + } + } + random = { + chance = 25 + send_interface_toast = { + title = ep3_camp_party.1035.a.success + left_icon = root + + add_trait = shrewd + } + } + } + else = { + add_stewardship_lifestyle_perk_points = 1 + } + + involved_activity = { + every_attending_character = { + custom = custom.every_attending_character + add_character_modifier = { + modifier = ep3_warm_and_content + years = 3 + } + } + } + + domicile = { + change_provisions = medium_provisions_loss + } + + stress_impact = { + greedy = miniscule_stress_impact_gain + generous = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -1 + } + } + } + + # Fell a tree + option = { + name = ep3_camp_party.1035.b + + duel = { + skill = prowess + value = medium_skill_rating + # Success: Your story is believed + 50 = { + desc = ep3_camp_party.1035.b.success + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1035.b.success + left_icon = root + right_icon = scope:treefeller + + add_prestige = medium_prestige_gain + involved_activity = { + every_attending_character = { + custom = custom.every_attending_character + add_character_modifier = { + modifier = ep3_warm_and_content + years = 1 + } + } + } + + domicile = { + change_provisions = miniscule_provisions_gain + } + } + } + # Failure + 50 = { + desc = ep3_camp_party.1035.b.failure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1035.b.failure + left_icon = root + right_icon = scope:treefeller + + add_prestige = minor_prestige_loss + } + } + # Crit Failure + 10 = { + desc = ep3_camp_party.1035.b.critfailure + show_chance = yes + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + title = ep3_camp_party.1035.b.critfailure + left_icon = root + right_icon = scope:treefeller + + add_prestige = medium_prestige_loss + increase_wounds_no_death_effect = { REASON = accident } + } + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + paranoid = miniscule_stress_impact_gain + trusting = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Scrabble around in the brush for some twigs + option = { + name = ep3_camp_party.1035.c + + domicile = { + change_provisions = microscopic_provisions_gain + } + + reverse_add_opinion = { + target = scope:treefeller + modifier = disappointed_opinion + opinion = -20 + } + + stress_impact = { + temperate = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + honest = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + +# Encounter a wandering merchant +ep3_camp_party.1040 = { + type = activity_event + title = ep3_camp_party.1040.t + desc = ep3_camp_party.1040.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:merchant + animation = scheme + } + artifact = { + target = scope:big_artifact + position = lower_left_portrait + } + artifact = { + target = scope:small_artifact + position = lower_center_portrait + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + drinks_alcohol_trigger = yes + } + + immediate = { + location = { + save_scope_as = location + } + if = { + limit = { + any_pool_character = { + province = root.location + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + } + save_scope_as = merchant + } + } + else = { + create_character = { + template = merchant_template + culture = location.culture + faith = location.faith + location = root.location + save_scope_as = merchant + } + } + scope:merchant = { + hidden_effect = { + random_list = { #Generate a big artifact + 10 = { + random_dummy_gender_effect = yes + create_artifact_weapon_effect = { + OWNER = scope:merchant + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_sword + } + hidden_effect = { + scope:newly_created_artifact ?= { + save_scope_as = big_artifact + add_artifact_modifier = artifact_negate_prowess_penalty_add_3_modifier + set_artifact_rarity = famed + } + } + } + 10 = { + random_dummy_gender_effect = yes + create_artifact_regalia_effect = { + OWNER = scope:merchant + SMITH = scope:dummy_gender + } + hidden_effect = { + scope:newly_created_artifact ?= { + save_scope_as = big_artifact + add_artifact_modifier = artifact_monthly_prestige_add_3_modifier + set_artifact_rarity = famed + } + } + } + 2 = { #Chance of it being amazing + random_dummy_gender_effect = yes + create_artifact_armor_effect = { + OWNER = scope:merchant + CREATOR = scope:dummy_gender + SET_ARMOR_TYPE = flag:armor_type_scale + } + hidden_effect = { + scope:newly_created_artifact ?= { + save_scope_as = big_artifact + add_artifact_modifier = artifact_prowess_5_modifier + add_artifact_modifier = artifact_knight_effectiveness_5_modifier + add_artifact_modifier = artifact_hard_casualty_modifier_5_modifier + add_artifact_modifier = artifact_courtier_and_guest_opinion_5_modifier + set_artifact_rarity = illustrious + set_artifact_name = resplendent_armour_name + set_artifact_description = resplendent_armour_desc + } + } + } + } + random_list = { + 10 = { + random_dummy_gender_effect = yes + create_artifact_brooch_effect = { + OWNER = scope:owner + SMITH = scope:dummy_gender + } + scope:newly_created_artifact ?= { + save_scope_as = small_artifact + } + } + 10 = { + random_dummy_gender_effect = yes + create_artifact_book_effect = { + OWNER = scope:owner + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:no + SET_TOPIC = flag:no + } + scope:newly_created_artifact ?= { + save_scope_as = small_artifact + } + } + } + } + } + } + + # Buy a big shiny thing + option = { + name = ep3_camp_party.1040.a + + pay_short_term_gold = { + target = scope:merchant + gold = major_gold_value + } + + scope:big_artifact = { + set_owner = root + } + + involved_activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_loss + temperate = miniscule_stress_impact_gain + profligate = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + # Buy a small item + option = { + name = ep3_camp_party.1040.b + + pay_short_term_gold = { + target = scope:merchant + gold = tiny_gold_value + } + + scope:small_artifact = { + set_owner = root + } + + scope:activity = { activity_special_type_progression_variable = { NUM = 10 } } + custom_tooltip = camp_party_tt_positive_tiny + + stress_impact = { + greedy = miniscule_stress_impact_gain + generous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + # Tell them to sod off + option = { + name = ep3_camp_party.1040.c + + add_character_modifier = { + modifier = ep3_responsible_with_money + years = 10 + } + + reverse_add_opinion = { + target = scope:merchant + modifier = disappointed_opinion + opinion = -20 + } + + stress_impact = { + temperate = miniscule_stress_impact_loss + greedy = minor_stress_impact_loss + generous = minor_stress_impact_gain + profligate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + + +################################ +# Events +################################ +# ep3_camp_party.2000 - Choose which same-trait follower to chat with +# + +scripted_trigger 2000_adult_ai_follower_trigger = { + this != root + is_ai = yes + is_adult = yes +} + +scripted_trigger 2000_suitable_follower_for_conversation_trigger = { + 2000_adult_ai_follower_trigger = yes + NOR = { + has_relation_rival = root + has_relation_best_friend = root + } +} + +scripted_trigger 2000_has_same_personality_trait_as_root_trigger = { + has_trait_category = personality + root = { has_trait = prev } #The aforementioned trait +} + + +#Choose which same-trait follower to chat with +ep3_camp_party.2000 = { + type = activity_event + title = ep3_camp_party.2000.t + desc = ep3_camp_party.2000.desc + theme = landless_adventurer + override_background = { reference = ep3_campfire } + left_portrait = { + character = root + animation = thinking + } + center_portrait = { + character = scope:first_follower + animation = drink + } + right_portrait = { + character = scope:second_follower + animation = happiness + } + cooldown = { months = 3 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + involved_activity = { + #At least 3 peeps + any_attending_character = { count >= 3 } + #First person with a trait in common with ROOT + any_attending_character = { + 2000_suitable_follower_for_conversation_trigger = yes + any_character_trait = { + 2000_has_same_personality_trait_as_root_trigger = yes + save_temporary_scope_as = trait_check + } + save_temporary_scope_as = first_follower_check + } + #Second person with a trait in common with ROOT + any_attending_character = { + 2000_suitable_follower_for_conversation_trigger = yes + this != scope:first_follower_check + #NOT the same trait as the first person + custom_tooltip = { #This is an error suppression, known by Code already + text = ep3_camp_party.2000.t + any_character_trait = { + 2000_has_same_personality_trait_as_root_trigger = yes + this != scope:trait_check #the trait + } + } + save_temporary_scope_as = second_follower_check + } + #Random joe for loc in case we got the deceitful trait + any_attending_character = { + 2000_adult_ai_follower_trigger = yes + NOR = { + this = scope:first_follower_check + this = scope:second_follower_check + } + } + } + } + immediate = { + involved_activity = { + #First person with a trait in common with ROOT + random_attending_character = { + limit = { + 2000_suitable_follower_for_conversation_trigger = yes + any_character_trait = { 2000_has_same_personality_trait_as_root_trigger = yes } + } + save_scope_as = first_follower + random_character_trait = { + limit = { 2000_has_same_personality_trait_as_root_trigger = yes } + root = { + set_variable = { + name = first_follower_trait_var + value = prev #the trait + } + } + } + } + #Second person with a trait in common with ROOT + random_attending_character = { + limit = { + 2000_suitable_follower_for_conversation_trigger = yes + #NOT the same trait as the first person + any_character_trait = { + 2000_has_same_personality_trait_as_root_trigger = yes + NOT = { var:first_follower_trait_var ?= prev } #the trait + } + this != scope:first_follower + } + save_scope_as = second_follower + random_character_trait = { + limit = { + 2000_has_same_personality_trait_as_root_trigger = yes + NOT = { var:first_follower_trait_var ?= prev } #the trait + } + root = { + set_variable = { + name = second_follower_trait_var + value = prev #the trait + } + } + } + } + #Random joe for loc in case we got the deceitful trait + random_attending_character = { + limit = { + 2000_adult_ai_follower_trigger = yes + NOR = { + this = scope:first_follower + this = scope:second_follower + } + } + save_scope_as = other_follower + } + } + #For deceitful loc + random_dummy_gender_effect = yes + } + #Focus on first follower + option = { + name = ep3_camp_party.2000.a + reverse_add_opinion = { + target = scope:first_follower + modifier = camp_party_listened_to_me_opinion + opinion = 20 + } + random = { + chance = 40 + progress_towards_friend_effect = { + REASON = friend_bonded_over_personalities + CHARACTER = scope:first_follower + OPINION = 20 + } + } + ai_chance = { base = 100 } + } + #Focus on second follower + option = { + name = ep3_camp_party.2000.b + reverse_add_opinion = { + target = scope:second_follower + modifier = camp_party_listened_to_me_opinion + opinion = 20 + } + random = { + chance = 40 + progress_towards_friend_effect = { + REASON = friend_bonded_over_personalities + CHARACTER = scope:second_follower + OPINION = 20 + } + } + ai_chance = { base = 100 } + } + #Triggered option: Let's debate! + option = { + name = ep3_camp_party.2000.c + trigger = { + domicile ?= { has_domicile_building = camp_fire_nightly_debates } + } + show_as_unavailable = { always = yes } + reason = has_building_camp_fire_nightly_debates + reverse_add_opinion = { + target = scope:first_follower + modifier = camp_party_listened_to_me_opinion + opinion = 20 + } + reverse_add_opinion = { + target = scope:second_follower + modifier = camp_party_listened_to_me_opinion + opinion = 20 + } + random = { + chance = 20 + progress_towards_friend_effect = { + REASON = friend_bonded_over_personalities + CHARACTER = scope:second_follower + OPINION = 20 + } + } + random = { + chance = 20 + progress_towards_friend_effect = { + REASON = friend_bonded_over_personalities + CHARACTER = scope:second_follower + OPINION = 20 + } + } + random = { + chance = 20 + add_learning_skill = 1 + } + ai_chance = { base = 100 } + } + #Triggered option: celebrate our companionship! + option = { + name = ep3_camp_party.2000.d + trigger = { + custom_tooltip = { + text = ep3_camp_party.2000.d.tt + domicile ?= { has_domicile_building_or_higher = mess_tent_03 } + } + } + show_as_unavailable = { always = yes } + reason = has_building_mess_tent_03_or_higher + reverse_add_opinion = { + target = scope:first_follower + modifier = camp_party_reveled_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:second_follower + modifier = camp_party_reveled_opinion + opinion = 40 + } + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + } + else_if = { + limit = { + has_trait = lifestyle_reveler + NOT = { + has_trait_xp = { + trait = lifestyle_reveler + value >= 100 #Max + } + } + } + add_trait_xp = { + trait = lifestyle_reveler + value = { + integer_range = { + min = medium_trait_xp + max = major_trait_xp + } + } + } + } + else_if = { + limit = { has_lifestyle = diplomacy_lifestyle } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + } + else = { add_prestige = medium_prestige_gain } + stress_impact = { + base = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + } + involved_activity = { activity_special_type_progression_variable = { NUM = 15 } } + custom_tooltip = camp_party_tt_positive_medium + + ai_chance = { base = 100 } + } + after = { + remove_variable ?= first_follower_trait_var + remove_variable ?= second_follower_trait_var + } +} + +ep3_camp_party.2100 = { + type = activity_event + title = ep3_camp_party.2100.t + desc = { + random_valid = { + triggered_desc = { + trigger = { scope:char_spawn_type = flag:porters } #porters - himbos + desc = ep3_laamps.8200.desc_1 + } + triggered_desc = { + trigger = { scope:char_spawn_type = flag:fools } #capering fools - fools + desc = ep3_laamps.8200.desc_2 + } + triggered_desc = { + trigger = { scope:char_spawn_type = flag:locals } #hangers on - local ethos people + desc = ep3_laamps.8200.desc_3 + } + } + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:porters + } + animation = admiration + } + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:fools + } + animation = laugh + } + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:locals + } + animation = personality_rational + } + } + right_portrait = { + character = scope:new_person + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:porters + } + animation = hero_flex + } + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:fools + } + animation = dancing + } + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:locals + } + animation = beg + } + triggered_outfit = { + trigger = { scope:char_spawn_type = flag:porters } + outfit_tags = { beggar_rags } + } + triggered_outfit = { + trigger = { scope:char_spawn_type = flag:fools } + outfit_tags = { jester_outfit } + } + } + + override_background = { + reference = ep3_campfire + } + + trigger = { + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + has_activity_intent = fireside_chat_intent + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + domicile ?= { + has_domicile_parameter = camp_recruit_porters_events + } + } + modifier = { + add = 0.5 + domicile ?= { + has_domicile_parameter = camp_recruit_fool_events + } + } + modifier = { + add = 0.5 + domicile ?= { + has_domicile_parameter = camp_recruit_locals_events + } + } + } + + immediate = { + location = { + save_scope_as = location + } + location.county = { + save_scope_as = location_county + } + location.county.holder.top_liege = { + save_scope_as = location_top_liege + } + random_list = { + 1 = { + save_scope_value_as = { + name = char_spawn_type + value = flag:locals + } + } + 1 = { + save_scope_value_as = { + name = char_spawn_type + value = flag:porters + } + } + 1 = { + save_scope_value_as = { + name = char_spawn_type + value = flag:fools + } + } + } + + if = { + limit = { + scope:char_spawn_type = flag:porters + } + #create a porter himbo + create_character = { + location = scope:location + age = { 18 28 } + random_traits_list = { + count = 1 + education_martial_prowess_2 = {} + education_martial_prowess_3 = {} + } + random_traits_list = { + count = 1 + brave = {} + diligent = {} + humble = {} + } + random_traits_list = { + honest = {} + gregarious = {} + trusting = {} + compassionate = {} + generous = {} + calm = {} + } + random_traits_list = { + count = 1 + lustful = {} + chaste = {} + wrathful = {} + arrogant = {} + impatient = {} + patient = {} + impatient = {} + ambitious = {} + cynical = {} + zealous = {} + stubborn = {} + } + random_traits = no + martial = { + min_template_low_skill + max_template_low_skill + } + prowess = { + min_template_high_skill + max_template_high_skill + } + faith = location.faith + culture = location.culture + gender_female_chance = { + add = 25 + } + save_scope_as = new_person + } + + hidden_effect = { + scope:new_person = { + random_list = { + 2 = { + add_trait = intellect_bad_2 + add_trait = physique_good_1 + add_trait = strong + } + 2 = { + add_trait = strong + } + 2 = { + add_trait = strong + add_trait = giant + } + 2 = { + add_trait = intellect_bad_1 + add_trait = giant + } + 1 = { + add_trait = giant + add_trait = physique_good_2 + add_trait = strong + } + } + } + } + } + else_if = { + limit = { + scope:char_spawn_type = flag:fools + } + create_character = { + template = poet_template + culture = location.culture + faith = location.faith + location = root.location + save_scope_as = new_person + } + hidden_effect = { + scope:new_person = { + add_trait = fecund + add_trait = lifestyle_traveler + add_trait = loyal + } + } + } + else_if = { + limit = { + scope:char_spawn_type = flag:locals + } + create_character = { + template = merchant_template + culture = location.culture + faith = location.faith + location = root.location + save_scope_as = new_person + } + hidden_effect = { + scope:new_person = { + random_list = { + 8 = { + add_trait = shrewd + } + 1 = { + add_trait = intellect_good_1 + } + 1 = { + add_trait = intellect_good_2 + } + } + } + } + } + } + + option = { #welcome, weary traveler + name = ep3_laamps.8200.a + add_courtier = scope:new_person + add_character_flag = { + flag = had_ep3_laamps_8200 + years = 4 + } + + ai_chance = 100 + + stress_impact = { + compassionate = minor_stress_loss + } + } + + option = { #please go away + name = ep3_laamps.8200.b + add_character_flag = { + flag = had_ep3_laamps_8200 + years = 2 + } + scope:new_person = { + silent_disappearance_effect = yes + } + + stress_impact = { + paranoid = medium_stress_loss + shy = medium_stress_loss + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_camp_temperament_events.txt b/N3OW/events/dlc/ep3/ep3_camp_temperament_events.txt new file mode 100644 index 00000000..67d203b3 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_camp_temperament_events.txt @@ -0,0 +1,1528 @@ +namespace = ep3_camp_temperament + +#### +# ep3_camp_temperament.0001-0009 - To Feed a Friend +# ep3_camp_temperament.0010-0019 - In Every Corner +# ep3_camp_temperament.0020-0029 - Hearsay +# ep3_camp_temperament.0030-0039 - Mutiny +# ep3_camp_temperament.0040-0049 - A Devoted Follower +#### + +################################################## +# To Feed a Friend +# by Veronica Pazos +################################################## + +# Your followers chip in with some Provisions if you're low +ep3_camp_temperament.0001 = { + type = character_event + title = ep3_camp_temperament.0001.t + desc = ep3_camp_temperament.0001.desc + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = paranoid + } + animation = paranoia + } + triggered_animation = { + trigger = { + has_trait = callous + } + animation = dismissal + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = trusting + has_trait = gregarious + } + } + animation = wedding_happy_cry + } + animation = happiness + } + right_portrait = { + character = scope:potential_friend + animation = toast_goblet + } + lower_center_portrait = scope:friend_2 + lower_right_portrait = scope:friend_3 + cooldown = { years = 10 } + override_background = { reference = corridor_day } + + trigger = { + has_domicile_temperament_high = yes + domicile = { provisions <= provisions_privation_threshold_start } + any_courtier = { + is_available_healthy_ai_adult = yes + has_good_opinion_of_root_trigger = yes + count >= 3 + } + } + + immediate = { + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + has_good_opinion_of_root_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 5 + has_relation_potential_friend = root + } + modifier = { + add = 2 + has_relation_friend = root + } + modifier = { + add = 2 + is_knight_of = root + } + modifier = { + add = 2 + has_any_court_position = yes + } + } + save_scope_as = potential_friend + } + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + this != scope:potential_friend + has_good_opinion_of_root_trigger = yes + } + save_scope_as = friend_2 + } + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + this != scope:potential_friend + this != scope:friend_2 + has_good_opinion_of_root_trigger = yes + } + save_scope_as = friend_3 + } + } + + option = { # Let's eat all together! + name = ep3_camp_temperament.0001.a + trigger = { + has_trait = gregarious + NOR = { + has_trait = paranoid + has_trait = callous + } + } + every_courtier = { + add_opinion = { + target = root + opinion = 20 + modifier = grateful_opinion + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + disloyal = major_stress_impact_gain + shy = major_stress_impact_gain + gluttonous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = gluttonous + has_trait = disloyal + } + } + modifier = { + factor = 2 + has_trait = gregarious + } + } + } + + option = { # You're out to get me + name = ep3_camp_temperament.0001.b + trigger = { + OR = { + has_trait = paranoid + has_trait = callous + } + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:potential_friend + IMPRISONER = root + } + add_dread = medium_dread_gain + + stress_impact = { + paranoid = major_stress_impact_loss + callous = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = paranoid + has_trait = callous + } + } + } + } + + option = { # Can we just sell them for some gold pls + name = ep3_camp_temperament.0001.c + add_gold = { + value = medium_provisions_gain + multiply = 0.1 + } + + stress_impact = { + greedy = medium_stress_impact_loss + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = paranoid + has_trait = gregarious + } + } + modifier = { + factor = 2 + has_trait = greedy + } + } + } + + option = { # I treasure _you_ the most + name = ep3_camp_temperament.0001.d + trigger = { + NOR = { + has_trait = paranoid + has_trait = callous + } + } + progress_towards_friend_effect = { + REASON = friend_treasured_more_than_food + CHARACTER = scope:potential_friend + OPINION = default_friend_opinion + } + + stress_impact = { + trusting = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + callous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = paranoid + has_trait = deceitful + has_trait = shy + } + } + modifier = { + factor = 2 + OR = { + has_trait = deceitful + has_trait = shy + } + } + } + } + + option = { # Thank you, amigos + name = ep3_camp_temperament.0001.e + domicile ?= { + change_provisions = medium_provisions_gain + } + + stress_impact = { + callous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + OR = { + has_trait = callous + has_trait = paranoid + has_trait = gregarious + } + } + modifier = { + factor = 3 + domicile = { + provisions <= provisions_privation_threshold_low + } + } + } + } +} + +################################################## +# In Every Corner +# by Veronica Pazos +################################################## + +# You suspect your enemies come from within your own camp +ep3_camp_temperament.0010 = { + type = character_event + title = ep3_camp_temperament.0010.t + desc = { + desc = ep3_camp_temperament.0010.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:enemy = { is_spouse_of = root } + } + desc = ep3_camp_temperament.0010.desc.spouse + } + triggered_desc = { + trigger = { + scope:enemy = { is_child_of = root } + } + desc = ep3_camp_temperament.0010.desc.child + } + triggered_desc = { + trigger = { + scope:enemy = { has_relation_friend = root } + } + desc = ep3_camp_temperament.0010.desc.friend + } + } + } + + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = paranoid + } + animation = paranoia + } + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = disloyal + has_trait = wrathful + has_trait = vengeful + } + } + animation = anger + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = trusting + has_trait = gregarious + } + } + animation = crying + } + animation = stress + } + right_portrait = { + character = scope:enemy + animation = go_to_your_room + } + cooldown = { years = 10 } + override_background = { reference = corridor_night } + override_effect_2d = { + reference = rain + } + + trigger = { + has_domicile_temperament_low = yes + any_courtier = { + is_available_healthy_ai_adult = yes + has_bad_opinion_of_root_trigger = yes + } + } + + immediate = { + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + has_bad_opinion_of_root_trigger = yes + } + weight = { # Let's grab someone interesting + base = 1 + modifier = { + add = 5 + is_spouse_of = root + } + modifier = { + add = 5 + is_child_of = root + } + modifier = { + add = 2 + has_relation_friend = root + } + modifier = { + add = 2 + has_really_bad_opinion_of_root_trigger = yes + } + } + save_scope_as = enemy + } + } + + option = { # Et tu, Brute? + name = ep3_camp_temperament.0010.a + flavor = { + first_valid = { + triggered_desc = { + trigger = { # These people would know Latin + location = { geographical_region = world_europe } + } + desc = ep3_camp_temperament.0010.a.flavor + } + } + } + trigger = { + scope:enemy = { + OR = { + is_spouse_of = root + is_child_of = root + } + } + } + add_internal_flag = special + custom_tooltip = ep3_camp_temperament_0010_tt + set_variable = { + name = et_tu_brute_var + value = scope:enemy + } + add_character_modifier = { + modifier = ep3_heartbreak_modifier + years = 15 + } + stress_impact = { + base = minor_stress_impact_gain # Always stressful to be betrayed by a close family member + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + modifier = { + factor = 2 + has_trait = vengeful + } + } + } + + option = { # I'll pay you and shut up + name = ep3_camp_temperament.0010.b + trigger = { + has_trait = ambitious + NOT = { has_trait = vengeful } + } + pay_short_term_gold = { + target = scope:enemy + gold = minor_gold_value + } + scope:enemy = { + add_opinion = { + target = root + modifier = bribed_opinion + opinion = 15 + } + } + every_courtier = { + limit = { + this != scope:enemy + } + add_opinion = { + target = root + modifier = reputation_opinion + opinion = 10 + } + } + stress_impact = { + ambitious = minor_stress_impact_loss + greedy = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = generous + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = vengeful + gold <= medium_gold_value + } + } + } + } + + option = { # It's a PLOT + name = ep3_camp_temperament.0010.c + trigger = { + has_trait = vengeful + NOT = { has_trait = ambitious } + } + add_character_modifier = { + modifier = ep3_determined_modifier + years = 5 + } + stress_impact = { + calm = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = compassionate + has_trait = forgiving + } + } + modifier = { + factor = 2 + has_trait = vengeful + } + } + } + + option = { # I'll give them some food to placate them + name = ep3_camp_temperament.0010.d + trigger = { + NOT = { has_trait = vengeful } + } + domicile ?= { + change_provisions = minor_provisions_loss + } + every_courtier = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + + stress_impact = { + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = greedy + has_trait = wrathful + } + } + modifier = { + factor = 2 + OR = { + has_trait = compassionate + has_trait = forgiving + domicile ?= { provisions <= provisions_privation_threshold_start } + } + } + } + } + + option = { # Opt out + name = ep3_camp_temperament.0010.e + + stress_impact = { + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +################################################## +# Hearsay +# by Veronica Pazos +################################################## + +scripted_effect ep3_camp_temperament_0020_secret_effect = { + custom_tooltip = ep3_camp_temperament_0020_d_tt + hidden_effect = { + send_interface_toast = { + title = ep3_camp_temperament_0020_d_tt + left_icon = scope:secret_owner + scope:secret = { + reveal_to = root + } + } + } +} + +# Follower reveals secret from province holder or holder's liege +ep3_camp_temperament.0020 = { + type = character_event + title = ep3_camp_temperament.0020.t + desc = ep3_camp_temperament.0020.desc + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = deceitful + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + OR = { + has_trait = journaller + has_trait = lifestyle_poet + has_trait = violet_poet + } + } + animation = happiness + } + animation = interested + } + right_portrait = { + character = scope:secret_giver + animation = throne_room_bow_1 + } + lower_right_portrait = scope:secret_owner + cooldown = { years = 10 } + + trigger = { + has_domicile_temperament_high = yes + any_courtier = { + is_available_healthy_ai_adult = yes + } + OR = { # Holder or holder's liege have a secret + domicile.domicile_location.county.holder ?= { + any_secret = { + NOT = { is_known_by = root } + } + } + domicile.domicile_location.county.holder.top_liege ?= { + any_secret = { + NOT = { is_known_by = root } + } + } + } + } + + immediate = { + random_list = { + 1 = { + trigger = { + domicile.domicile_location.county.holder ?= { + any_secret = { + NOT = { is_known_by = root } + } + } + } + domicile.domicile_location.county.holder = { + save_scope_as = secret_owner + random_secret = { + limit = { + NOT = { is_known_by = root } + } + save_scope_as = secret + } + } + } + 1 = { + trigger = { + domicile.domicile_location.county.holder.top_liege ?= { + any_secret = { + NOT = { is_known_by = root } + } + } + } + domicile.domicile_location.county.holder.top_liege = { + save_scope_as = secret_owner + random_secret = { + limit = { + NOT = { is_known_by = root } + } + save_scope_as = secret + } + } + } + } + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + weight = { # Find someone relevant + base = 1 + modifier = { + add = 2 + intrigue > medium_skill_rating + } + modifier = { + add = 2 + has_any_court_position = yes + } + modifier = { + add = 1 + OR = { + has_trait = lustful + has_trait = rakish + } + } + } + save_scope_as = secret_giver + } + } + + option = { # I need to write this down + name = ep3_camp_temperament.0020.a + trigger = { + OR = { + has_trait = journaller + has_trait = lifestyle_poet + has_trait = violet_poet + } + } + ep3_camp_temperament_0020_secret_effect = yes + add_character_modifier = { + modifier = ep3_inspired_by_life + years = 15 + } + stress_impact = { + journaller = medium_stress_impact_loss + lifestyle_poet = medium_stress_impact_loss + violet_poet = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = deceitful + } + modifier = { + factor = 2 + OR = { + has_trait = journaller + has_trait = lifestyle_poet + has_trait = violet_poet + } + } + } + } + + option = { # Yummy yummy tasty gossip + name = ep3_camp_temperament.0020.b + trigger = { + has_trait = deceitful + } + ep3_camp_temperament_0020_secret_effect = yes + random_list = { + 1 = { + scope:secret_giver = { + add_intrigue_skill = 1 + } + } + 1 = { + scope:secret_giver = { + add_intrigue_skill = 2 + } + } + 1 = { + scope:secret_giver = { + add_intrigue_skill = 3 + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = callous + } + } + } + + option = { # What were you doing slacking around huh + name = ep3_camp_temperament.0020.c + trigger = { + can_add_hook = { + target = scope:secret_giver + type = strong_prostitute_blackmail_hook + } + } + add_hook = { + target = scope:secret_giver + type = strong_prostitute_blackmail_hook + } + + stress_impact = { + diligent = medium_stress_impact_loss + lustful = medium_stress_impact_gain + rakish = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = rakish + has_trait = trusting + } + } + modifier = { + factor = 2 + has_trait = diligent + } + } + } + + option = { # Tell me at once! + name = ep3_camp_temperament.0020.d + trigger = { # You have access to a better version of this option + NOR = { + has_trait = journaller + has_trait = lifestyle_poet + has_trait = violet_poet + has_trait = deceitful + } + } + ep3_camp_temperament_0020_secret_effect = yes + + stress_impact = { + compassionate = medium_stress_impact_loss + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = patient + } + modifier = { + factor = 2 + has_trait = compassionate + } + } + } + + option = { # Secrets are evil + name = ep3_camp_temperament.0020.e + add_piety = minor_piety_gain + + stress_impact = { + zealous = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = callous + } + } + modifier = { + factor = 2 + has_trait = zealous + } + } + } +} + +################################################## +# Mutiny! +# by Veronica Pazos +################################################## + +# A follower tries to lead a mutiny against you +ep3_camp_temperament.0030 = { + type = character_event + title = ep3_camp_temperament.0030.t + desc = { + desc = ep3_camp_temperament.0030.desc.intro + first_valid = { + triggered_desc = { + trigger = { + domicile ?= { + provisions <= provisions_privation_threshold_low + } + } + desc = ep3_camp_temperament.0030.desc.no_food + } + desc = ep3_camp_temperament.0030.desc.other + } + desc = ep3_camp_temperament.0030.desc.outro + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = craven + } + } + animation = worry + } + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = vengeful + has_trait = callous + } + } + animation = anger + } + animation = stress + } + right_portrait = { + character = scope:cocky_follower + animation = chess_cocky + } + lower_left_portrait = { + trigger = { + has_trait = craven + NOR = { + has_trait = vengeful + has_trait = wrathful + has_trait = callous + } + exists = scope:bus_follower + } + character = scope:bus_follower + } + cooldown = { years = 10 } + override_background = { reference = bp1_bonfire } + + trigger = { + has_domicile_temperament_low = yes + any_courtier = { + is_available_healthy_ai_adult = yes + has_bad_opinion_of_root_trigger = yes + } + } + + weight_multiplier = { #More likely to happen if they're starving + base = 1 + modifier = { + factor = 2 + domicile ?= { + provisions <= provisions_privation_threshold_low + } + } + } + + immediate = { + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + has_bad_opinion_of_root_trigger = yes + } + weight = { # Let's grab someone interesting + base = 1 + modifier = { + add = 5 + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + root.domicile ?= { + provisions <= provisions_privation_threshold_low + } + } + modifier = { + add = 2 + is_spouse_of = root + } + modifier = { + add = 2 + is_child_of = root + } + modifier = { + add = 2 + has_really_bad_opinion_of_root_trigger = yes + } + } + save_scope_as = cocky_follower + } + every_courtier = { + limit = { # Including the cocky guy + is_available_healthy_ai_adult = yes + has_bad_opinion_of_root_trigger = yes + } + add_to_list = mutiniers + } + if = { + limit = { + any_courtier = { + is_available_healthy_ai_adult = yes + this != scope:cocky_follower + } + } + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + this != scope:cocky_follower + } + weight = { + base = 1 + modifier = { + add = 5 + has_court_position = second_camp_officer + } + modifier = { + add = 2 + has_any_court_position = yes + } + } + save_scope_as = bus_follower + } + } + } + + option = { # It was actually this guy's fault + name = ep3_camp_temperament.0030.a + trigger = { + has_trait = craven + NOR = { + has_trait = vengeful + has_trait = wrathful + has_trait = callous + } + exists = scope:bus_follower # If there's someone to actually throw under the bus + } + scope:bus_follower = { + increase_wounds_effect = { REASON = beaten } + } + stress_impact = { + craven = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + brave = major_stress_impact_gain + wrathful = major_stress_impact_gain + } + ai_chance = { + base = 0 # Don't get people beaten up for no reason + modifier = { + add = 200 + has_trait = craven + } + } + } + + option = { # I'm gonna beat you up + name = ep3_camp_temperament.0030.b + trigger = { + has_trait = wrathful + NOR = { + has_trait = craven + has_trait = calm + has_trait = temperate + } + } + duel = { + skill = prowess + target = scope:cocky_follower + 50 = { + desc = ep3_camp_temperament.0030.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep3_camp_temperament.0030.b.success + left_icon = root + right_icon = scope:cocky_follower + scope:cocky_follower = { + death = { death_reason = death_beaten } + } + } + } + 50 = { + desc = ep3_camp_temperament.0030.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = ep3_camp_temperament.0030.b.failure + left_icon = root + right_icon = scope:cocky_follower + increase_wounds_no_death_effect = { REASON = beaten } + } + } + } + stress_impact = { + base = medium_stress_impact_gain + wrathful = major_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 200 + has_trait = wrathful + } + } + } + + option = { # You said what + name = ep3_camp_temperament.0030.c + reason = dread + trigger = { + dread >= 75 + NOT = { has_trait = craven } + } + # This should be enough reward + scope:cocky_follower = { + give_nickname = nick_brown_cheeks + add_character_modifier = { #Forever + modifier = ep3_poopy_pants + } + } + # But we'll give you something else, I guess + every_courtier = { + limit = { + this != scope:cocky_follower + NOR = { + has_trait = brave + has_trait = callous + } + } + add_opinion = { + target = root + opinion = 5 + modifier = respect_opinion + } + } + add_dread = minor_dread_gain + stress_impact = { + vengeful = medium_stress_impact_loss + calm = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = compassionate + } + } + modifier = { + factor = 2 + has_trait = vengeful + } + } + } + + option = { # You can go if you want to + name = ep3_camp_temperament.0030.d + every_in_list = { + list = mutiniers + save_temporary_scope_as = followers_to_leave + root = { remove_courtier_or_guest = scope:followers_to_leave } + } + every_courtier = { + limit = { + is_available_healthy_ai_adult = yes + NOT = { is_in_list = mutiniers } + } + add_opinion = { + target = root + opinion = 10 + modifier = benevolent_to_mutiniers_opinion + } + } + stress_impact = { + calm = medium_stress_impact_loss + temperate = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + trusting = medium_stress_impact_loss + callous = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = wrathful + has_trait = vengeful + } + } + modifier = { + factor = 2 + OR = { + has_trait = calm + has_trait = temperate + has_trait = compassionate + has_trait = trusting + } + } + } + } + + option = { # Take the money and shut up + name = ep3_camp_temperament.0030.e + pay_short_term_gold = { + target = scope:cocky_follower + gold = medium_gold_value + } + every_courtier = { + limit = { + is_available_healthy_ai_adult = yes + has_bad_opinion_of_root_trigger = yes + } + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + stress_impact = { + greedy = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + OR = { + has_trait = greedy + has_trait = wrathful + gold <= medium_gold_value + } + } + } + } +} + +################################################## +# A Devoted Follower +# by Veronica Pazos +################################################## + +scripted_trigger ep3_camp_temperament_0040_valid_scheme_trigger = { + scheme_owner = root + exists = scheme_target_character + any_scheme_agent_slot = { } + NOR = { + scheme_target_character = $FOLLOWER$ + any_scheme_agent_character = { this = $FOLLOWER$ } + } +} + +# Your follower offers themselves as an agent for your scheme +ep3_camp_temperament.0040 = { + type = character_event + title = ep3_camp_temperament.0040.t + desc = ep3_camp_temperament.0040.desc + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = arrogant + } + animation = hero_flex + } + triggered_animation = { + trigger = { + has_trait = humble + } + animation = shame + } + triggered_animation = { + trigger = { + OR = { + intrigue >= high_skill_rating + has_focus = intrigue_skulduggery_focus + has_trait = deceitful + } + } + animation = scheme + } + animation = interested + } + right_portrait = { + character = scope:follower + animation = admiration + } + lower_right_portrait = scope:target + cooldown = { years = 10 } + override_background = { reference = corridor_day } + + trigger = { + has_domicile_temperament_high = yes + any_courtier = { + is_available_healthy_ai_adult = yes + has_good_opinion_of_root_trigger = yes + save_temporary_scope_as = follower_temp + root = { + any_scheme = { + ep3_camp_temperament_0040_valid_scheme_trigger = { FOLLOWER = scope:follower_temp } + } + } + } + } + + immediate = { + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + has_good_opinion_of_root_trigger = yes + save_temporary_scope_as = follower_temp + root = { + any_scheme = { + ep3_camp_temperament_0040_valid_scheme_trigger = { FOLLOWER = scope:follower_temp } + save_temporary_scope_as = scheme_temp + } + } + } + weight = { + base = 2 + modifier = { + add = 2 + has_trait = eccentric + } + modifier = { + add = 1 + has_trait = gregarious + } + modifier = { + add = 1 + diplomacy >= medium_skill_rating + } + modifier = { + add = -1 + is_close_family_of = root + } + } + save_scope_as = follower + assign_quirk_effect = yes + set_variable = { + name = devotee_agent_var + value = root + } + } + scope:scheme_temp = { + save_scope_as = my_scheme + scheme_target_character = { save_scope_as = target } + } + } + + option = { # You're right, I'm great + name = ep3_camp_temperament.0040.a + trigger = { + prestige_level >= 3 + NOR = { + intrigue >= high_skill_rating + has_focus = intrigue_skulduggery_focus + } + } + add_character_modifier = { + modifier = ep3_arrogant_schemer_modifier + years = 15 + } + stress_impact = { + arrogant = major_stress_impact_loss + gregarious = medium_stress_impact_loss + humble = major_stress_impact_gain + shy = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = gregarious + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = shy + } + } + } + } + + option = { # I'll do the job myself + name = ep3_camp_temperament.0040.b + trigger = { + OR = { + intrigue >= high_skill_rating + has_focus = intrigue_skulduggery_focus + } + } + scope:my_scheme = { + if = { + limit = { scheme_agent_charges < opportunity_cap_value } + change_opportunities = 1 + } + add_scheme_modifier = { + type = ep3_self_employed_scheme_modifier + } + } + + stress_impact = { + arrogant = major_stress_impact_loss + deceitful = medium_stress_impact_loss + calm = medium_stress_impact_gain + temperate = medium_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = temperate + has_trait = humble + } + } + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = deceitful + } + } + } + } + + option = { # What a great friend you are + name = ep3_camp_temperament.0040.c + progress_towards_friend_effect = { + REASON = friend_my_biggest_fan + CHARACTER = scope:follower + OPINION = default_friend_opinion + } + + stress_impact = { + gregarious = medium_stress_impact_loss + trusting = medium_stress_impact_loss + callous = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = shy + } + } + modifier = { + factor = 2 + OR = { + has_trait = gregarious + has_trait = trusting + } + } + } + } + + option = { # Sure, join in! + name = ep3_camp_temperament.0040.d + custom_tooltip = { + text = ep3_camp_temperament.0040.d.tt + scope:my_scheme = { + add_agent_slot = agent_devotee + random_scheme_agent_slot = { + limit = { + is_agent_slot_type = agent_devotee + is_filled = no + } + save_scope_as = slot + scope:follower = { add_to_agent_slot = scope:slot } + } + } + } + ai_chance = { + base = 200 # Best option for the AI + } + } + + option = { # Just stay there and admire me + name = ep3_camp_temperament.0040.e + add_prestige = minor_prestige_gain + + stress_impact = { + arrogant = major_stress_impact_loss + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + modifier = { # If AI is running low on Prestige + factor = 2 + prestige <= medium_prestige_value + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_contract_events.txt b/N3OW/events/dlc/ep3/ep3_contract_events.txt new file mode 100644 index 00000000..3639690c --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_contract_events.txt @@ -0,0 +1,10151 @@ +################################################### +## EP3 Contract Events +## +################################################### + +namespace = ep3_contract_event + +scripted_effect set_contract_scopes_effect = { + scope:task_contract.task_contract_taker ?= { + save_scope_as = task_contract_taker + } + scope:task_contract.task_contract_employer ?= { + save_scope_as = task_contract_employer + } + if = { + limit = { + exists = scope:task_contract.task_contract_destination + } + scope:task_contract.task_contract_destination = { + save_scope_as = task_contract_destination + } + } + else = { + scope:task_contract.var:task_contract_destination ?= { + save_scope_as = task_contract_destination + } + } + if = { + limit = { + exists = scope:task_contract.task_contract_target + } + scope:task_contract.task_contract_target ?= { + save_scope_as = task_contract_target + } + } + else = { + scope:task_contract.var:task_contract_target ?= { + save_scope_as = task_contract_target + } + } + scope:task_contract.var:task_contract_war ?= { + save_scope_as = task_contract_war + } + if = { + limit = { + exists = scope:task_contract.var:task_contract_object + } + scope:task_contract.var:task_contract_object = { + save_scope_as = task_contract_object + } + } + if = { + limit = { + exists = scope:task_contract.var:escorted_artifact + } + scope:task_contract.var:escorted_artifact = { + save_scope_as = escorted_artifact + } + } + if = { + limit = { + exists = scope:task_contract.var:escorted_gold + } + scope:task_contract.var:escorted_gold = { + save_scope_as = escorted_gold + } + } + if = { + limit = { + exists = scope:task_contract.var:escorted_story + } + scope:task_contract.var:escorted_story = { + save_scope_as = escorted_story + } + } +} + +scripted_effect start_contract_travel_without_domicile = { + start_travel_plan = { + destination = scope:task_contract_destination + on_arrival_destinations = all + } +} +scripted_effect start_contract_travel_with_domicile = { + start_travel_plan = { + destination = scope:task_contract_destination + travel_with_domicile = yes + return_trip = no + on_arrival_destinations = all + } +} + +#taking a transport contract - triggered after you take a transport contract +ep3_contract_event.0001 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_vip } } + desc = ep3_contract_event.0001.t_vip + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_ward } } + desc = ep3_contract_event.0001.t_child + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_explorer } } + desc = ep3_contract_event.0001.t_explorer + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_artifact } } + desc = ep3_contract_event.0001.t_artifact + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_gold } } + desc = ep3_contract_event.0001.t_gold + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_animal } } + desc = ep3_contract_event.0001.t_animal + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_construction_contract } } + desc = ep3_contract_event.0001.t_construction + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_explorer } } + desc = ep3_contract_event.0001.desc_intro_explorer + } + desc = ep3_contract_event.0001.desc + } + #desc for the explorer contract type for differrent point of interests types + first_valid = { + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:special_buildings_martial } + desc = ep3_contract_event.0001.desc_special_buildings_martial + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:special_buildings_learning } + desc = ep3_contract_event.0001.desc_special_buildings_learning + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:special_buildings_religious } + desc = ep3_contract_event.0001.desc_special_buildings_religious + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:special_buildings_diplomatic } + desc = ep3_contract_event.0001.desc_special_buildings_diplomatic + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:grand_city } + desc = ep3_contract_event.0001.desc_grand_city + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:special_buildings_wonder } + desc = ep3_contract_event.0001.desc_special_buildings_wonder + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:special_buildings_economic } + desc = ep3_contract_event.0001.desc_special_buildings_economic + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:mausoleum_at_halicarnassus } + desc = ep3_contract_event.0001.desc_mausoleum_at_halicarnassus + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:lighthouse_of_alexandria } + desc = ep3_contract_event.0001.desc_lighthouse_of_alexandria + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:natural_feature } + desc = ep3_contract_event.0001.desc_natural_feature + } + triggered_desc = { + trigger = { scope:task_contract.var:travel_reason ?= flag:capitals } + desc = ep3_contract_event.0001.desc_capitals + } + } + first_valid = { + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_vip } } + desc = ep3_contract_event.0001.desc_vip + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_ward } } + desc = ep3_contract_event.0001.desc_child + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_explorer } } + desc = ep3_contract_event.0001.desc_explorer + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_artifact } } + desc = ep3_contract_event.0001.desc_artifact + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_gold } } + desc = ep3_contract_event.0001.desc_gold + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_animal } } + desc = ep3_contract_event.0001.desc_animal + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_construction_contract } } + desc = ep3_contract_event.0001.desc_construction + } + } + } + theme = landless_adventurer + override_background = { reference = terrain } + #task_contract_taker, you + left_portrait = { + character = root + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_vip } } + animation = personality_honorable + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_ward } } + animation = personality_compassionate + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_explorer } } + animation = interested_left + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_artifact } } + animation = personality_bold + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_gold } } + animation = stunned + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_animal } } + animation = love + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_construction_contract } } + animation = personality_rational + } + } + #character you have to escort, if exists + right_portrait = { + character = scope:right_portrait + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_vip } } + animation = personality_rational + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_ward } } + animation = clutching_toy + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_explorer } } + animation = eccentric + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_artifact } } + animation = personality_compassionate + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_gold } } + animation = personality_compassionate + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_animal } } + animation = personality_compassionate + } + triggered_animation = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_construction_contract } } + animation = personality_bold + } + } + #character giving you the contract, if it's not the chracter you have to escort + lower_right_portrait = { + trigger = { + NOR = { + scope:task_contract_object ?= scope:task_contract_target + scope:task_contract_object ?= scope:task_contract_employer + } + } + character = scope:task_contract_employer + } + #character you have to go to, if exists + lower_left_portrait = { + trigger = { + exists = scope:task_contract_target + scope:task_contract_target != scope:task_contract_employer + } + character = scope:task_contract_target + } + #artifact you have to escort, if exists + artifact = { + trigger = { exists = scope:escorted_artifact } + target = scope:escorted_artifact + position = lower_center_portrait + } + + immediate = { + set_contract_scopes_effect = yes + if = { + limit = { + exists = scope:task_contract_object + } + scope:task_contract_object = { + save_scope_as = right_portrait + } + } + else = { + scope:task_contract_employer = { + save_scope_as = right_portrait + } + } + } + + #take the contract and start the travel without domicile + option = { + name = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_vip } } + text = ep3_contract_event.0001.vip + } + name = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_ward } } + text = ep3_contract_event.0001.child + } + name = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_explorer } } + text = ep3_contract_event.0001.explorer + } + name = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_artifact } } + text = ep3_contract_event.0001.artifact + } + name = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_gold } } + text = ep3_contract_event.0001.gold + } + name = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_animal } } + text = ep3_contract_event.0001.animal + } + name = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_construction_contract } } + text = ep3_contract_event.0001.construction + } + scope:task_contract = { + switch = { + trigger = has_task_contract_type + #escorting a VIP + laamp_transport_vip = { + custom_tooltip = ep3_contract_event.0001.tt_vip + scope:task_contract_object = { + visit_court_of = root + add_character_flag = blocked_from_leaving + } + root = { + start_contract_travel_without_domicile = yes + } + } + #escorting a ward to guardian + laamp_transport_ward = { + custom_tooltip = ep3_contract_event.0001.tt_ward + scope:task_contract_object = { + visit_court_of = root + add_character_flag = blocked_from_leaving + } + root = { + start_contract_travel_without_domicile = yes + } + } + #escorting a random pool character to a random point of interest + laamp_transport_explorer = { + custom_tooltip = ep3_contract_event.0001.tt_explorer + scope:task_contract_object = { + if = { + limit = { + is_landed = no + } + visit_court_of = root + add_character_flag = blocked_from_leaving + } + } + root = { + start_contract_travel_without_domicile = yes + } + } + #escorting an artifact + laamp_transport_artifact = { + custom_tooltip = ep3_contract_event.0001.tt_artifact + scope:escorted_artifact = { + set_owner = root + set_variable = { + name = ungiftable + } + } + root = { + start_contract_travel_without_domicile = yes + } + } + #escorting a large sum of money + laamp_transport_gold = { + custom_tooltip = ep3_contract_event.0001.tt_gold + scope:task_contract_employer = { + pay_treasury_or_gold = { + target = root + value = scope:escorted_gold + } + } + root = { + start_contract_travel_without_domicile = yes + } + } + #escorting a dog or a cat + laamp_transport_animal = { + custom_tooltip = ep3_contract_event.0001.tt_animal + scope:task_contract_employer = { + if = { + limit = { + scope:escorted_story ?= { story_type = story_cycle_pet_dog } + } + transfer_dog_story_cycle_to_effect = { + CHARACTER = root + STORY = scope:escorted_story + } + } + else = { + transfer_cat_story_cycle_to_effect = { + CHARACTER = root + STORY = scope:escorted_story + } + } + } + root = { + start_contract_travel_without_domicile = yes + } + } + #delivering materials for holding construcion + laamp_construction_contract = { + custom_tooltip = ep3_contract_event.0001.tt_construction + root = { + start_contract_travel_without_domicile = yes + } + } + } + } + #AI should always try to complete the contract + ai_chance = { + base = 1 + } + } + #take the contract and start the travel with domicile + option = { + name = ep3_contract_event.0001.with_domicile + scope:task_contract = { + switch = { + trigger = has_task_contract_type + #escorting a VIP + laamp_transport_vip = { + custom_tooltip = ep3_contract_event.0001.tt_vip + scope:task_contract_object = { + visit_court_of = root + add_character_flag = blocked_from_leaving + } + root = { + start_contract_travel_with_domicile = yes + } + } + #escorting a ward to guardian + laamp_transport_ward = { + custom_tooltip = ep3_contract_event.0001.tt_ward + scope:task_contract_object = { + visit_court_of = root + add_character_flag = blocked_from_leaving + } + root = { + start_contract_travel_with_domicile = yes + } + } + #escorting a random pool character to a random point of interest + laamp_transport_explorer = { + custom_tooltip = ep3_contract_event.0001.tt_explorer + scope:task_contract_object = { + if = { + limit = { + is_landed = no + } + visit_court_of = root + add_character_flag = blocked_from_leaving + } + } + root = { + start_contract_travel_with_domicile = yes + } + } + #escorting an artifact + laamp_transport_artifact = { + custom_tooltip = ep3_contract_event.0001.tt_artifact + scope:escorted_artifact = { + set_owner = root + set_variable = { + name = ungiftable + } + } + root = { + start_contract_travel_with_domicile = yes + } + } + #escorting a large sum of money + laamp_transport_gold = { + custom_tooltip = ep3_contract_event.0001.tt_gold + scope:task_contract_employer = { + pay_treasury_or_gold = { + target = root + value = scope:escorted_gold + } + } + root = { + start_contract_travel_with_domicile = yes + } + } + #escorting a dog or a cat + laamp_transport_animal = { + custom_tooltip = ep3_contract_event.0001.tt_animal + scope:task_contract_employer = { + if = { + limit = { + scope:escorted_story ?= { story_type = story_cycle_pet_dog } + } + transfer_dog_story_cycle_to_effect = { + CHARACTER = root + STORY = scope:escorted_story + } + } + else = { + transfer_cat_story_cycle_to_effect = { + CHARACTER = root + STORY = scope:escorted_story + } + } + } + root = { + start_contract_travel_with_domicile = yes + } + } + #delivering materials for holding construcion + laamp_construction_contract = { + custom_tooltip = ep3_contract_event.0001.tt_construction + root = { + start_contract_travel_with_domicile = yes + } + } + } + } + custom_tooltip = ep3_contract_event.0001.with_domicile.tt + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +scripted_trigger 0002_is_applicable_contract_trigger = { + OR = { + has_task_contract_group = laamp_contracts_transport_group + #Treasure Map Contract + AND = { + root = { has_variable = ep3_laamp_decision_1000_is_excavating } + exists = var:contract_treasure_location + } + } +} + +#Event adding relevant characters to your travel entourage if you have an active transport contract +ep3_contract_event.0002 = { + hidden = yes + trigger = { + has_government = landless_adventurer_government + } + immediate = { + every_character_active_contract = { + limit = { + 0002_is_applicable_contract_trigger = yes + save_temporary_scope_as = temp_contract + #task_contract_taker ?= root + root.current_travel_plan = { + #Treasure Map Contract + trigger_if = { + limit = { + scope:temp_contract = { exists = var:contract_treasure_location } + } + OR = { + final_destination_province ?= scope:temp_contract.var:contract_treasure_location + next_destination_province = scope:temp_contract.var:contract_treasure_location + any_future_path_location = { + this = scope:temp_contract.var:contract_treasure_location + } + } + } + trigger_else = { + OR = { + final_destination_province ?= scope:temp_contract.var:task_contract_destination + next_destination_province = scope:temp_contract.var:task_contract_destination + any_future_path_location = { + this = scope:temp_contract.var:task_contract_destination + } + } + } + } + } + var:task_contract_object ?= { add_to_list = task_contract_companions } + #Treasure Map Contract, add the scraggly old employer + if = { + limit = { has_task_contract_type = laamp_treasure_map_contract } + task_contract_employer = { add_to_list = task_contract_companions } + } + } + every_courtier_or_guest = { + limit = { + is_travelling = no + } + add_to_list = task_contract_companions + } + every_in_list = { + list = task_contract_companions + root.current_travel_plan = { add_companion = prev } + } + } +} + +#Raid for Captives contract starting a war +ep3_contract_event.0003 = { + type = character_event + title = ep3_contract_event.0003.t + desc = ep3_contract_event.0003.desc + theme = war + #task_contract_taker, you + left_portrait = { + character = root + animation = personality_compassionate + } + #character giving you the contract + lower_right_portrait = { + character = scope:task_contract_employer + } + #character you have to fight in a war + lower_left_portrait = { + character = scope:task_contract_target + } + + immediate = { + set_contract_scopes_effect = yes + } + + #take the contract and start raiding + option = { + name = ep3_contract_event.0003.a + start_war = { + cb = ep3_laamp_raid_contract_cb + target = scope:task_contract_target + } + random_character_war = { + limit = { + using_cb = ep3_laamp_raid_contract_cb + primary_attacker = root + primary_defender = scope:task_contract_target + } + save_scope_as = new_war + } + scope:task_contract = { + set_variable = { + name = task_contract_war + value = scope:new_war + } + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +#Raid for Captives - complete contract letter event, triggered in the cb on war end +ep3_contract_event.0004 = { + type = letter_event + sender = scope:task_contract_employer + opening = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract_outcome ?= flag:failure } + desc = ep3_contract_event.0004.opening_failure + } + desc = ep3_contract_event.0004.opening + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract_outcome ?= flag:failure } + desc = ep3_contract_event.0004.desc_failure + } + desc = ep3_contract_event.0004.desc + } + } + + immediate = { + if = { + limit = { + scope:task_contract_outcome ?= flag:failure + } + add_prestige = task_contract_failure_prestige_loss_full_value + reverse_add_opinion = { + opinion = -50 + modifier = hate_opinion + target = scope:task_contract_employer + } + } + else = { + scope:task_contract_employer = { + custom_tooltip = ep3_contract_event.0004.success + every_prisoner = { + limit = { + has_character_flag = captured_in_ep3_laamp_raid_contract_cb + } + #doing this here instead of in the war effects to show a neat list of the prisoners in the tooltip + add_opinion = { + modifier = abductor_opinion + target = root + years = 5 + } + root = { + if = { + limit = { NOT = { exists = local_var:temp_ransom } } + set_local_variable = { + name = temp_ransom + value = prev.ransom_cost + } + } + else = { + change_local_variable = { + name = temp_ransom + add = prev.ransom_cost + } + } + } + remove_character_flag = captured_in_ep3_laamp_raid_contract_cb + } + } + } + } + + option = { + name = { + trigger = { scope:task_contract_outcome ?= flag:failure } + text = ep3_contract_event.0004.b + } + name = { + trigger = { NOT = { exists = scope:task_contract_outcome } } + text = ep3_contract_event.0004.a + } + if = { + limit = { + scope:task_contract_outcome ?= flag:failure + } + } + else = { + add_gold = { + value = local_var:temp_ransom + if = { + limit = { + domicile = { has_domicile_parameter = camp_improved_mercenary_contract_rewards } + } + multiply = camp_improved_mercenary_contract_rewards_value + } + if = { + limit = { + has_perk = hard_rule_perk + } + multiply = adventurer_hard_rule_contract_rewards_value + } + } + if = { + limit = { + faith != scope:defender.faith + } + add_piety = minor_piety_gain + } + } + } +} + +#Treasure Hunting Contract - start event +ep3_contract_event.0005 = { + type = character_event + title = ep3_contract_event.0005.t + desc = ep3_contract_event.0005.desc + theme = travel + + left_portrait = { + character = root + animation = personality_compassionate + } + lower_right_portrait = { + character = scope:task_contract_employer + } + + immediate = { + } + + #go on a treasure hunting travel, opens decision to set target location + option = { + name = ep3_contract_event.0005.a + custom_tooltip = ep3_contract_event.0005.a_tt + decision:treasure_hunting_contract_decision = { + open_view_data = { + view = decision_detail + player = root + } + } + #AI should always try to complete the contract + ai_chance = { + base = 1 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +#Treasure Hunting Contract - event triggered when you reach a location chosen in the decision +ep3_contract_event.0006 = { + type = character_event + title = ep3_contract_event.0006.t + desc = { + desc = ep3_contract_event.0006.desc + first_valid = { + triggered_desc = { + trigger = { + scope:task_contract_destination = { + has_holding_type = church_holding + } + } + desc = ep3_contract_event.0006.desc_locals_temple + } + triggered_desc = { + trigger = { + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + desc = ep3_contract_event.0006.desc_locals_city + } + triggered_desc = { + trigger = { + scope:task_contract_destination = { + has_holding_type = castle_holding + } + } + desc = ep3_contract_event.0006.desc_locals_castle + } + desc = ep3_contract_event.0006.desc_locals + } + } + theme = travel + left_portrait = { + character = root + animation = eavesdrop + } + right_portrait = { + character = scope:local_1 + animation = debating + } + lower_left_portrait = { + character = scope:local_ruler + } + lower_right_portrait = { + trigger = { exists = scope:local_2 } + character = scope:local_2 + } + #artifact you find + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + override_background = { + trigger = { + scope:task_contract_destination = { + has_holding_type = castle_holding + } + } + reference = corridor_night + } + override_background = { + trigger = { + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + reference = market + } + override_background = { + trigger = { + scope:task_contract_destination = { + has_holding_type = church_holding + } + } + reference = temple + } + override_background = { + trigger = { + scope:task_contract_destination = { + NOR = { + has_holding_type = castle_holding + has_holding_type = city_holding + has_holding_type = church_holding + } + } + } + reference = tavern + } + + trigger = { + any_character_task_contract = { + task_contract_type = laamp_treasure_hunting_contract + var:task_contract_destination ?= root.location + } + } + + immediate = { + random_character_task_contract = { + task_contract_type = laamp_treasure_hunting_contract + limit = { + var:task_contract_destination ?= root.location + } + save_scope_as = task_contract + } + scope:task_contract.var:task_contract_destination = { + save_scope_as = task_contract_destination + county.holder = { + save_scope_as = local_ruler + } + } + scope:task_contract.task_contract_employer = { + save_scope_as = inspiration_owner + save_scope_as = task_contract_employer + } + if = { + limit = { + scope:task_contract_destination = { + has_holding_type = church_holding + } + } + if = { + limit = { + any_pool_character = { + province = scope:task_contract_destination + is_available_healthy_ai_adult = yes + } + } + random_pool_character = { + province = scope:task_contract_destination + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = local_1 + } + } + else = { + create_character = { + template = fp1_trade_partner_priest + location = scope:task_contract_destination + culture = scope:task_contract_destination.county.culture + faith = scope:task_contract_destination.county.faith + #Set up the scope + save_scope_as = local_1 + } + } + inspiration_adventure_create_artifact_effect = { + OWNER = scope:local_1 + CREATOR = scope:local_1 + } + } + else_if = { + limit = { + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + if = { + limit = { + any_pool_character = { + province = scope:task_contract_destination + is_available_healthy_ai_adult = yes + } + } + random_pool_character = { + province = scope:task_contract_destination + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = local_1 + } + } + else = { + create_character = { + template = merchant_template + location = scope:task_contract_destination + culture = scope:task_contract_destination.county.culture + faith = scope:task_contract_destination.county.faith + #Set up the scope + save_scope_as = local_1 + } + } + inspiration_adventure_create_artifact_effect = { + OWNER = scope:local_1 + CREATOR = scope:local_1 + } + } + else = { + if = { + limit = { + any_pool_character = { + province = scope:task_contract_destination + is_available_healthy_ai_adult = yes + } + } + random_pool_character = { + province = scope:task_contract_destination + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = local_1 + } + } + else = { + create_character = { + template = fp3_tomb_raider + location = scope:task_contract_destination + culture = scope:task_contract_destination.county.culture + faith = scope:task_contract_destination.county.faith + #Set up the scope + save_scope_as = local_1 + } + } + if = { + limit = { + any_pool_character = { + province = scope:task_contract_destination + is_available_healthy_ai_adult = yes + this != scope:local_1 + } + } + random_pool_character = { + province = scope:task_contract_destination + limit = { + is_available_healthy_ai_adult = yes + this != scope:local_1 + } + save_scope_as = local_2 + } + } + else = { + create_character = { + template = fp3_tomb_raider + location = scope:task_contract_destination + culture = scope:task_contract_destination.county.culture + faith = scope:task_contract_destination.county.faith + #Set up the scope + save_scope_as = local_2 + } + } + if = { + limit = { + scope:task_contract_destination = { + has_holding_type = castle_holding + } + } + inspiration_adventure_create_artifact_effect = { + OWNER = scope:local_ruler + CREATOR = scope:local_ruler + } + } + else = { + inspiration_adventure_create_artifact_effect = { + OWNER = scope:local_1 + CREATOR = scope:local_1 + } + } + } + #Don't need no "Lost Court Artifact to [...]" errors for this + scope:newly_created_artifact = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 2 + } + } + } + + #go with the locals - castle only + option = { + name = ep3_contract_event.0006.castle + trigger = { + scope:task_contract_destination = { + has_holding_type = castle_holding + } + } + reason = castle_holding + duel = { + skills = { diplomacy intrigue } + target = scope:local_1 + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 50 + } + desc = ep3_contract_event.0006.castle_won + save_scope_value_as = { + name = success_reason + value = flag:castle + } + trigger_event = ep3_contract_event.0007 + show_as_tooltip = { + scope:newly_created_artifact = { + set_owner = root + } + } + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -49 + } + modifier = { + exists = scope:local_2 + add = scope:local_2.intrigue + add = scope:local_2.diplomacy + } + desc = ep3_contract_event.0006.castle_lost_desc + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_contract_event.0006.castle_lost + desc = ep3_contract_event.0006.castle_lost_desc + left_icon = root + right_icon = scope:local_1 + scope:newly_created_artifact = { + set_owner = scope:local_1 + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + deceitful = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + #prove you're pious - church only + option = { + name = ep3_contract_event.0006.church + trigger = { + scope:task_contract_destination = { + has_holding_type = church_holding + } + } + reason = church_holding + random_list = { + 4 = { + modifier = { + add = root.piety_level + } + modifier = { + add = root.num_virtuous_traits + } + modifier = { + add = { + value = root.num_sinful_traits + multiply = -1 + } + } + modifier = { + add = root.learning + } + desc = ep3_contract_event.0006.church_won + save_scope_value_as = { + name = success_reason + value = flag:church + } + trigger_event = ep3_contract_event.0007 + show_as_tooltip = { + scope:newly_created_artifact = { + set_owner = root + } + } + } + 4 = { + modifier = { + add = scope:local_1.piety_level + } + modifier = { + add = scope:local_1.num_virtuous_traits + } + modifier = { + add = { + value = scope:local_1.num_sinful_traits + multiply = -1 + } + } + desc = ep3_contract_event.0006.church_lost_desc + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_contract_event.0006.church_lost + desc = ep3_contract_event.0006.church_lost_desc + left_icon = root + right_icon = scope:local_1 + scope:newly_created_artifact = { + set_owner = scope:local_1 + } + } + } + } + stress_impact = { + cynical = minor_stress_impact_gain + zealous = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + #barter for lower price - city only + option = { + name = ep3_contract_event.0006.city + trigger = { + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + reason = city_holding + random_list = { + 1 = { + modifier = { + add = root.prestige_level + } + modifier = { + add = root.dynasty.dynasty_prestige_level + } + modifier = { + add = root.stewardship + } + desc = ep3_contract_event.0006.city_won + save_scope_value_as = { + name = success_reason + value = flag:city + } + pay_short_term_gold = { + target = scope:local_1 + gold = minor_gold_value + } + trigger_event = ep3_contract_event.0007 + show_as_tooltip = { + scope:newly_created_artifact = { + set_owner = root + } + } + } + 1 = { + modifier = { + add = scope:local_1.prestige_level + } + modifier = { + add = scope:local_1.dynasty.dynasty_prestige_level + } + desc = ep3_contract_event.0006.city_lost_desc + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_contract_event.0006.city_lost + desc = ep3_contract_event.0006.city_lost_desc + left_icon = root + right_icon = scope:local_1 + } + } + } + stress_impact = { + generous = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + #try to buy it - always + option = { + name = ep3_contract_event.0006.buy + if = { + limit = { + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + pay_short_term_gold = { + target = scope:local_1 + gold = major_gold_value + } + save_scope_value_as = { + name = success_reason + value = flag:buy + } + trigger_event = ep3_contract_event.0007 + show_as_tooltip = { + scope:newly_created_artifact = { + set_owner = root + } + } + } + else = { + duel = { + skill = stewardship + target = scope:local_1 + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + max = 50 + } + desc = ep3_contract_event.0006.buy_won + pay_short_term_gold = { + target = scope:local_1 + gold = major_gold_value + } + save_scope_value_as = { + name = success_reason + value = flag:buy + } + trigger_event = ep3_contract_event.0007 + show_as_tooltip = { + scope:newly_created_artifact = { + set_owner = root + } + } + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -49 + } + modifier = { + exists = scope:local_2 + add = scope:local_2.stewardship + } + desc = ep3_contract_event.0006.buy_lost_desc + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_contract_event.0006.buy_lost + desc = ep3_contract_event.0006.buy_lost_desc + left_icon = root + right_icon = scope:local_1 + pay_short_term_gold = { + target = scope:local_1 + gold = major_gold_value + } + scope:newly_created_artifact = { + set_owner = scope:local_1 + } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + modifier = { + factor = 0 + short_term_gold < major_gold_value + } + } + } + #intimidate them - freebooters and swords-for-hire only + option = { + name = ep3_contract_event.0006.intimidate + trigger = { + OR = { + has_realm_law = camp_purpose_brigands + has_realm_law = camp_purpose_mercenaries + } + } + reason = purpose_brigands_and_mercenaries + duel = { + skills = { intrigue prowess } + target = scope:local_1 + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 50 + } + desc = ep3_contract_event.0006.intimidate_won + save_scope_value_as = { + name = success_reason + value = flag:intimidate + } + trigger_event = ep3_contract_event.0007 + show_as_tooltip = { + scope:newly_created_artifact = { + set_owner = root + } + } + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -49 + } + modifier = { + exists = scope:local_2 + add = scope:local_2.intrigue + add = scope:local_2.prowess + } + desc = ep3_contract_event.0006.intimidate_lost_desc + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_contract_event.0006.intimidate_lost + desc = ep3_contract_event.0006.intimidate_lost_desc + left_icon = root + right_icon = scope:local_1 + scope:newly_created_artifact = { + set_owner = scope:local_1 + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + #hit the local library - scholars and legitimists only + option = { + name = ep3_contract_event.0006.library + trigger = { + OR = { + has_realm_law = camp_purpose_scholars + has_realm_law = camp_purpose_legitimists + } + } + reason = purpose_legitimists_and_scholars + duel = { + skill = learning + value = decent_skill_rating + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 50 + } + desc = ep3_contract_event.0006.library_won + save_scope_value_as = { + name = success_reason + value = flag:library + } + hidden_effect = { + destroy_artifact = scope:newly_created_artifact + } + custom_tooltip = ep3_contract_event.0006.library.tt + trigger_event = ep3_contract_event.0007 + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_contract_event.0006.library_lost_desc + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_contract_event.0006.library_lost + desc = ep3_contract_event.0006.library_lost_desc + left_icon = root + hidden_effect = { + if = { + limit = { + exists = scope:newly_created_artifact + } + destroy_artifact = scope:newly_created_artifact + } + } + } + } + } + stress_impact = { + impatient = minor_stress_impact_gain + patient = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + #go on your own - wanderers and explorers only + option = { + name = ep3_contract_event.0006.explore + trigger = { + OR = { + has_realm_law = camp_purpose_wanderers + has_realm_law = camp_purpose_explorers + } + } + reason = purpose_explorers_and_wanderers + duel = { + skills = { diplomacy martial } + value = decent_skill_rating + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 50 + } + desc = ep3_contract_event.0006.explore_won + save_scope_value_as = { + name = success_reason + value = flag:explore + } + hidden_effect = { + destroy_artifact = scope:newly_created_artifact + } + custom_tooltip = ep3_contract_event.0006.explore.tt + trigger_event = ep3_contract_event.0007 + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_contract_event.0006.explore_lost_desc + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_contract_event.0006.explore_lost + desc = ep3_contract_event.0006.explore_lost_desc + left_icon = root + hidden_effect = { + if = { + limit = { + exists = scope:newly_created_artifact + } + destroy_artifact = scope:newly_created_artifact + } + } + } + } + } + stress_impact = { + impatient = minor_stress_impact_gain + patient = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } +} + +scripted_effect change_treasure_type = { + scope:newly_created_artifact = { + if = { + limit = { + OR = { + exists = scope:cupboard + exists = scope:ark_covenant + exists = scope:throne + exists = scope:necklace_artifact + exists = scope:armor_artifact + exists = scope:weapon_artifact + exists = scope:regalia_artifact + #exists = scope:box + #exists = scope:skull + #exists = scope:goblet + #exists = scope:animal_hide_size + exists = scope:tapestry + } + } + #do nothing, as they should already have the correct type + } + else_if = { + limit = { + OR = { + has_variable = ascalon + has_variable = staff_kakusandha + has_variable = zomorrodnegar + has_variable = aruval + has_variable = sword_cid + has_variable = sword_of_muhammad + has_variable = mmaagha_kamalu + has_variable = sword_attila + } + } + reforge_artifact = { type = regalia } + } + else_if = { + limit = { has_variable = iron_crown } + reforge_artifact = { type = helmet } + } + else_if = { + limit = { artifact_type = pedestal } + reforge_artifact = { type = miscellaneous } + } + set_owner = root + } +} + +#Treasure Hunting Contract - event triggered if you find an artifact in previous event ep3_contract_event.0006 to decide if you want to keep the artifact for yourself or complete the contract +ep3_contract_event.0007 = { + type = character_event + title = ep3_contract_event.0007.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:success_reason = flag:castle + scope:task_contract_destination = { + has_holding_type = castle_holding + } + } + desc = ep3_contract_event.0007.desc_castle_castle + } + triggered_desc = { + trigger = { + scope:success_reason = flag:church + scope:task_contract_destination = { + has_holding_type = church_holding + } + } + desc = ep3_contract_event.0007.desc_church_church + } + triggered_desc = { + trigger = { + scope:success_reason = flag:city + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + desc = ep3_contract_event.0007.desc_city_city + } + triggered_desc = { + trigger = { + scope:success_reason = flag:buy + scope:task_contract_destination = { + has_holding_type = castle_holding + } + } + desc = ep3_contract_event.0007.desc_castle_buy + } + triggered_desc = { + trigger = { + scope:success_reason = flag:buy + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + desc = ep3_contract_event.0007.desc_city_buy + } + triggered_desc = { + trigger = { + scope:success_reason = flag:buy + scope:task_contract_destination = { + has_holding_type = church_holding + } + } + desc = ep3_contract_event.0007.desc_church_buy + } + triggered_desc = { + trigger = { + scope:success_reason = flag:intimidate + scope:task_contract_destination = { + has_holding_type = castle_holding + } + } + desc = ep3_contract_event.0007.desc_castle_intimidate + } + triggered_desc = { + trigger = { + scope:success_reason = flag:intimidate + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + desc = ep3_contract_event.0007.desc_city_intimidate + } + triggered_desc = { + trigger = { + scope:success_reason = flag:intimidate + scope:task_contract_destination = { + has_holding_type = church_holding + } + } + desc = ep3_contract_event.0007.desc_church_intimidate + } + triggered_desc = { + trigger = { scope:success_reason = flag:library } + desc = ep3_contract_event.0007.desc_library + } + triggered_desc = { + trigger = { scope:success_reason = flag:explore } + desc = ep3_contract_event.0007.desc_explore + } + } + } + theme = travel + + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:local_1 + trigger = { + NOR = { + scope:success_reason = flag:library + scope:success_reason = flag:explore + } + } + animation = rage + } + lower_left_portrait = { + character = scope:task_contract_employer + } + lower_right_portrait = { + trigger = { + exists = scope:local_2 + NOR = { + scope:success_reason = flag:library + scope:success_reason = flag:explore + } + } + character = scope:local_2 + } + #artifact you find + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + + override_background = { + trigger = { + OR = { + scope:success_reason = flag:library + scope:success_reason = flag:explore + } + } + reference = wilderness + } + override_background = { + trigger = { + scope:task_contract_destination = { + has_holding_type = castle_holding + } + } + reference = corridor_night + } + override_background = { + trigger = { + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + reference = market + } + override_background = { + trigger = { + scope:task_contract_destination = { + has_holding_type = church_holding + } + } + reference = temple + } + override_background = { + trigger = { + scope:task_contract_destination = { + NOR = { + has_holding_type = castle_holding + has_holding_type = city_holding + has_holding_type = church_holding + } + } + } + reference = tavern + } + + immediate = { + random_courtier = { + limit = { + is_adult = yes + } + save_scope_as = follower + } + if = { + limit = { + OR = { + scope:success_reason = flag:library + scope:success_reason = flag:explore + } + } + inspiration_adventure_create_artifact_effect = { + OWNER = root + CREATOR = root + } + add_gold = major_gold_value + } + if = { + limit = { + scope:success_reason = flag:city + } + change_treasure_type = yes + scope:newly_created_artifact = { + set_owner = root + } + inspiration_adventure_create_artifact_effect = { + OWNER = scope:local_1 + CREATOR = scope:local_1 + } + } + } + + #give it back to locals so they join you + option = { + name = ep3_contract_event.0007.castle + trigger = { + scope:success_reason = flag:castle + } + scope:newly_created_artifact = { + set_owner = scope:local_1 + } + add_courtier = scope:local_1 + add_courtier = scope:local_2 + + stress_impact = { + greedy = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + } + #AI should always complete the contract + ai_chance = { + base = 0 + } + } + #pay them more so they join you + option = { + name = ep3_contract_event.0007.castle_buy + trigger = { + scope:success_reason = flag:buy + scope:task_contract_destination = { + has_holding_type = city_holding + } + } + pay_short_term_gold = { + target = scope:local_2 + gold = major_gold_value + } + add_courtier = scope:local_1 + add_courtier = scope:local_2 + + stress_impact = { + greedy = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + } + #AI should always complete the contract + ai_chance = { + base = 0 + } + } + #Buy everything for yourself + option = { + name = ep3_contract_event.0007.city_city + trigger = { + scope:success_reason = flag:city + } + pay_short_term_gold = { + target = scope:local_1 + gold = major_gold_value + } + change_treasure_type = yes + scope:newly_created_artifact = { + set_owner = scope:local_1 + } + + stress_impact = { + content = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + #AI should always complete the contract + ai_chance = { + base = 0 + } + } + #after all, why wouldn't I take it for myself? + option = { + name = ep3_contract_event.0007.a + if = { + limit = { + NOT = { scope:success_reason = flag:city } + } + change_treasure_type = yes + } + if = { + limit = { + scope:success_reason = flag:castle + } + set_relation_rival = { + target = scope:local_1 + reason = rival_stole_artifact + } + set_relation_rival = { + target = scope:local_2 + reason = rival_stole_artifact + } + } + + stress_impact = { + content = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + #AI should always complete the contract + ai_chance = { + base = 0 + } + } + #give it back to task_contract_employer to complete the contract + option = { + name = ep3_contract_event.0007.b + scope:newly_created_artifact = { + set_owner = scope:task_contract_employer + } + scope:task_contract = { + complete_task_contract = success_standard + } + if = { + limit = { + scope:success_reason = flag:castle + } + set_relation_rival = { + target = scope:local_1 + reason = rival_stole_artifact + } + set_relation_rival = { + target = scope:local_2 + reason = rival_stole_artifact + } + } + #AI should always complete the contract + ai_chance = { + base = 10 + } + } + after = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:local_ruler } + scope:success_reason = flag:castle + } + progress_towards_rival_effect = { + REASON = rival_stole_artifact + CHARACTER = scope:local_ruler + OPINION = default_rival_opinion + } + } + } +} + +#Join war contract - joining the war +ep3_contract_event.0008 = { + type = character_event + title = ep3_contract_event.0008.t + desc = ep3_contract_event.0008.desc + theme = war + #task_contract_taker, you + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:commander + animation = personality_callous + } + #character giving you the contract + lower_right_portrait = { + character = scope:task_contract_employer + } + #character you have to fight in a war + lower_left_portrait = { + character = scope:task_contract_target + } + + immediate = { + set_contract_scopes_effect = yes + scope:task_contract_employer = { + random_knight = { + save_scope_as = commander + } + } + scope:commander = { + add_character_flag = need_military_outfit + } + } + + #take the contract and join the war + option = { + name = ep3_contract_event.0008.a + highlight_portrait = scope:task_contract_employer + scope:task_contract_war = { + hidden_effect = { set_called_to = root } + if = { + limit = { + is_attacker = scope:task_contract_employer + } + add_attacker = root + } + else = { + add_defender = root + } + } + custom_tooltip = join_war_contract.employer_military_strength + custom_tooltip = join_war_contract.target_military_strength + #AI should always complete the contract + ai_chance = { + base = 10 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } + after = { + scope:commander = { + remove_character_flag = need_military_outfit + } + } +} + +#Reclaim Artifact contract - start event +ep3_contract_event.0009 = { + type = character_event + title = ep3_contract_event.0009.t + desc = ep3_contract_event.0009.desc + theme = intrigue + #task_contract_taker, you + left_portrait = { + character = root + animation = scheme + } + #character giving you the contract + right_portrait = { + character = scope:task_contract_employer + animation = bribing + } + #character you have to steal from + lower_right_portrait = { + character = scope:task_contract_target + } + #artifact you have to steal + artifact = { + target = scope:task_contract_object + position = lower_center_portrait + } + + immediate = { + set_contract_scopes_effect = yes + } + #take the contract and start scheme to steal the artifact + option = { + name = ep3_contract_event.0009.a + custom_tooltip = ep3_contract_event.0009.open_start_stealing_back_artifact + if = { + limit = { + is_ai = yes + } + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = steal_back_artifact + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_thief + AGENT_2 = agent_thief + # Speed. + AGENT_3 = agent_infiltrator + AGENT_4 = agent_infiltrator + # Secrecy. + AGENT_5 = agent_lookout + } + scope:new_scheme ?= { + set_variable = { + name = target_artifact + value = scope:task_contract_object + } + } + } + else = { + open_interaction_window = { + interaction = start_stealing_back_artifact + actor = root + recipient = scope:task_contract_target + } + } + #AI should always complete the contract + ai_chance = { + base = 10 + } + } + #take the contract, but only unlock the steal artifact interaction + option = { + name = ep3_contract_event.0009.b + #AI should always complete the contract + ai_chance = { + base = 0 + } + } +} + +#transport contract completion event - triggered whenever you have an active transport contract and pass through a contract location +ep3_contract_event.0011 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_vip } } + desc = ep3_contract_event.0011.t_vip + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_ward } } + desc = ep3_contract_event.0011.t_child + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_explorer } } + desc = ep3_contract_event.0011.t_explorer + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_artifact } } + desc = ep3_contract_event.0011.t_artifact + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_gold } } + desc = ep3_contract_event.0011.t_gold + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_animal } } + desc = ep3_contract_event.0011.t_animal + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_construction_contract } } + desc = ep3_contract_event.0011.t_construction + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_vip } } + desc = ep3_contract_event.0011.desc_vip + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_ward } } + desc = { + desc = ep3_contract_event.0011.desc_ward + first_valid = { + triggered_desc = { + trigger = { scope:ward_too_old ?= yes } + desc = ep3_contract_event.0011.desc_ward_too_old + } + triggered_desc = { + trigger = { scope:ward_limit ?= yes } + desc = ep3_contract_event.0011.desc_ward_limit + } + desc = ep3_contract_event.0011.desc_ward_accepted + } + } + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_explorer } } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:task_contract.var:travel_reason = { + OR = { + flag:capitals ?= this + flag:grand_city ?= this + flag:mausoleum_at_halicarnassus ?= this + flag:lighthouse_of_alexandria ?= this + } + } + } + desc = ep3_contract_event.0011.desc_explorer_other + } + desc = ep3_contract_event.0011.desc_explorer_building + } + } + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_artifact } } + desc = ep3_contract_event.0011.desc_artifact + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_gold } } + desc = ep3_contract_event.0011.desc_gold + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_transport_animal } } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:task_contract.var:escorted_story ?= { story_type = story_cycle_pet_dog } + scope:hates_pets ?= yes + } + desc = ep3_contract_event.0011.desc_animal_dog_hate + } + triggered_desc = { + trigger = { scope:task_contract.var:escorted_story ?= { story_type = story_cycle_pet_dog } } + desc = ep3_contract_event.0011.desc_animal_dog_love + } + triggered_desc = { + trigger = { + scope:task_contract.var:escorted_story ?= { story_type = story_cycle_pet_cat } + scope:hates_pets ?= yes + } + desc = ep3_contract_event.0011.desc_animal_cat_hate + } + triggered_desc = { + trigger = { scope:task_contract.var:escorted_story ?= { story_type = story_cycle_pet_cat } } + desc = ep3_contract_event.0011.desc_animal_cat_love + } + } + } + } + triggered_desc = { + trigger = { scope:task_contract = { has_task_contract_type = laamp_construction_contract } } + desc = ep3_contract_event.0011.desc_construction + } + } + } + theme = landless_adventurer + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + trigger = { exists = scope:task_contract_target } + character = scope:task_contract_target + animation = personality_compassionate + } + lower_right_portrait = { + trigger = { + exists = scope:task_contract_employer + NOT = { scope:task_contract_target ?= scope:task_contract_employer } + } + character = scope:task_contract_employer + } + lower_left_portrait = { + trigger = { + exists = scope:task_contract_object + NOR = { + scope:task_contract_target = scope:task_contract_object + scope:task_contract_employer = scope:task_contract_object + } + } + character = scope:task_contract_object + } + artifact = { + trigger = { exists = scope:escorted_artifact } + target = scope:escorted_artifact + position = lower_center_portrait + } + + immediate = { + set_contract_scopes_effect = yes + scope:task_contract = { + switch = { + trigger = has_task_contract_type + laamp_transport_vip = { + root.current_travel_plan = { remove_character = scope:task_contract_object } + scope:task_contract_object = { + remove_variable = blocked_from_leaving + visit_court_of = scope:task_contract_target + } + } + laamp_transport_ward = { + root.current_travel_plan = { remove_character = scope:task_contract_object } + if = { + limit = { + scope:task_contract_object = { + is_adult = yes + } + } + save_scope_value_as = { + name = ward_too_old + value = yes + } + } + else_if = { + limit = { + scope:task_contract_target = { + num_of_relation_ward > 1 + } + } + save_scope_value_as = { + name = ward_limit + value = yes + } + } + else = { + scope:task_contract_object = { + if = { + limit = { + any_relation = { + type = guardian + } + } + random_relation = { + type = guardian + save_scope_as = old_guardian + } + remove_guardian_effect = { + GUARDIAN = scope:old_guardian + WARD = scope:task_contract_object + RETURN_WARD = no + HIDE_OPINION = no + } + } + remove_variable = blocked_from_leaving + visit_court_of = scope:task_contract_target + set_relation_guardian = scope:task_contract_target + save_scope_as = ward + scope:task_contract_target = { + save_scope_as = guardian + } + scope:task_contract_employer = { + save_scope_as = ward_liege + } + trigger_event = { on_action = on_ward_arrive_at_guardian } + } + } + scope:task_contract_object = { + progress_towards_friend_effect = { + REASON = friend_random_fallback + CHARACTER = root + OPINION = default_friend_opinion + } + } + } + laamp_transport_explorer = { + root.current_travel_plan = { remove_character = scope:task_contract_object } + scope:task_contract_object = { + remove_variable = blocked_from_leaving + save_scope_as = task_contract_target + } + } + laamp_transport_artifact = { + scope:escorted_artifact = { + set_owner = scope:task_contract_target + set_variable = { + name = ungiftable + } + } + } + laamp_transport_gold = { + root = { + pay_treasury_or_gold = { + target = scope:task_contract_target + value = scope:task_contract.var:escorted_gold + } + } + scope:task_contract_employer = { + if = { + limit = { + can_add_hook = { + target = scope:task_contract_target + type = indebted_hook + } + } + add_hook = { + target = scope:task_contract_target + type = indebted_hook + } + } + } + } + laamp_transport_animal = { + #give them the whole story cycle for pets + if = { + limit = { + scope:escorted_story = { story_type = story_cycle_pet_dog } + } + root = { + transfer_dog_story_cycle_to_effect = { + CHARACTER = scope:task_contract_target + STORY = scope:escorted_story + } + } + } + else = { + root = { + transfer_cat_story_cycle_to_effect = { + CHARACTER = scope:task_contract_target + STORY = scope:escorted_story + } + } + scope:escorted_story = { + set_variable = { + name = gifted_pet_story + value = scope:task_contract_employer + } + } + } + scope:task_contract_target = { + if = { + limit = { #"What am I supposed to do with this??" + OR = { + has_personality_malicious_trigger = yes + AND = { + scope:escorted_story = { story_type = story_cycle_pet_cat } + has_character_modifier = cat_story_allergy_modifier + } + AND = { + scope:escorted_story = { story_type = story_cycle_pet_dog } + faith = { religion_tag = islam_religion } + } + } + } + save_scope_value_as = { + name = hates_pets + value = yes + } + add_opinion = { + target = scope:task_contract_employer + modifier = dumped_animal_on_me_opinion + } + } + else = { + add_opinion = { + target = scope:task_contract_employer + modifier = grateful_opinion + opinion = 15 + } + } + } + } + laamp_construction_contract = { + scope:task_contract_destination = { + county = { + add_county_modifier = { + modifier = massive_construction_efforts_modifier + years = 5 + } + } + } + } + } + } + } + + option = { + name = ep3_contract_event.0011.a + trigger = { + scope:task_contract = { + has_task_contract_type = laamp_construction_contract + } + } + add_character_modifier = ep3_construction_contract_modifier + custom_tooltip = ep3_contract_event.0011.construction_invalidation + show_as_tooltip = { + custom_tooltip = ep3_contract_event.0011.construction_reward + scope:task_contract = { complete_task_contract = success_critical } + } + if = { + limit = { + current_travel_plan ?= { + is_travel_with_domicile = no + } + } + current_travel_plan ?= { + abort_travel_plan = yes + } + save_scope_value_as = { + name = provision_to_gold_conversion_value + value = { + value = root.domicile.provision_cost_to_owner + add = root.domicile.provisions + } + } + if = { + limit = { + scope:provision_to_gold_conversion_value < 0 + } + domicile = { + change_provisions = { + value = 0 + subtract = root.domicile.provisions + } + } + add_gold = { + value = scope:provision_to_gold_conversion_value + multiply = 0.1 + } + } + else = { + domicile = { + change_provisions = root.domicile.provision_cost_to_owner + } + } + } + #AI should have a small chance to move the domicile + ai_chance = { + base = 2 + } + } + + option = { + name = ep3_contract_event.0011.b + trigger = { + scope:task_contract = { + has_task_contract_type = laamp_transport_explorer + task_contract_employer = { + is_landed = no + } + } + } + add_courtier = scope:task_contract_object + current_travel_plan = { + add_companion = scope:task_contract_object + } + #AI should be willing to take more people, as it's probably their best bet to get them + ai_chance = { + base = 20 + } + } + + option = { + name = ep3_contract_event.0011.c + trigger = { scope:ward_limit ?= yes } + duel = { + skill = diplomacy + value = scope:task_contract_target.diplomacy + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + scope:task_contract_target = { + random_relation = { + type = ward + save_scope_as = current_ward + } + remove_guardian_effect = { + GUARDIAN = scope:task_contract_target + WARD = scope:current_ward + RETURN_WARD = yes + HIDE_OPINION = yes + } + } + scope:task_contract_object = { + remove_variable = blocked_from_leaving + visit_court_of = scope:task_contract.var:task_contract_target + set_relation_guardian = scope:task_contract.var:task_contract_target + save_scope_as = ward + scope:task_contract.var:task_contract_target = { + save_scope_as = guardian + } + scope:task_contract.var:task_contract_employer = { + save_scope_as = ward_liege + } + trigger_event = { on_action = on_ward_arrive_at_guardian } + } + save_scope_value_as = { + name = ward_limit + value = no + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + scope:task_contract_target = { + add_opinion = { + target = root + modifier = insulted_opinion + opinion = -20 + } + } + } + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + + option = { + name = { + trigger = { + any_task_contract = { + save_temporary_scope_as = temp_contract + task_contract_taker ?= { + this = root + } + root.current_travel_plan = { + any_future_path_location = { + this = scope:temp_contract.task_contract_destination + } + } + } + } + text = ep3_contract_event.0011.d_continue + } + name = { + trigger = { + always = yes + } + text = ep3_contract_event.0011.d_end + } + if = { + limit = { + scope:task_contract = { + has_task_contract_type = laamp_construction_contract + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + #AI should always complete the contract + ai_chance = { + base = 1 + modifier = { + add = 1000 + #AI should keep going if other contracts are on the travel path + any_task_contract = { + save_temporary_scope_as = temp_contract + task_contract_taker ?= { + this = root + } + root.current_travel_plan = { + any_future_path_location = { + this = scope:temp_contract.task_contract_destination + } + } + } + } + } + } + + after = { + scope:task_contract = { + switch = { + trigger = has_task_contract_type + laamp_transport_vip = { + if = { + limit = { + var:task_contract_object ?= { + is_alive = no + } + } + complete_task_contract = failure_standard + } + else_if = { + limit = { + time_since_contract_taken > 360 + } + complete_task_contract = success_standard + } + else = { + complete_task_contract = success_critical + } + } + laamp_transport_artifact = { + if = { + limit = { + OR = { + NOT = { exists = scope:task_contract.var:escorted_artifact } + scope:task_contract.var:escorted_artifact ?= { + artifact_durability < 1 + } + } + } + complete_task_contract = transport_destroyed + } + else_if = { + limit = { + time_since_contract_taken > 360 + } + complete_task_contract = success_standard + } + else = { + complete_task_contract = success_critical + } + } + laamp_transport_gold = { + complete_task_contract = success_standard + } + laamp_transport_ward = { + if = { + limit = { + OR = { + scope:ward_limit ?= yes + scope:ward_too_old ?= yes + } + } + complete_task_contract = failure_standard + } + else = { + complete_task_contract = success_standard + } + } + laamp_transport_explorer = { + if = { + limit = { + time_since_contract_taken > 360 + } + complete_task_contract = success_standard + } + else = { + complete_task_contract = success_critical + } + } + laamp_transport_animal = { + complete_task_contract = success_standard + } + } + } + } +} + +#transport contract invalidated - triggered whenever a transport contract is invalidated for any reason +#on_invalidation has to specify scope:task_contract_invalidation_reason +ep3_contract_event.0012 = { + type = letter_event + opening = { + triggered_desc = { + trigger = { + OR = { + scope:task_contract_invalidation_reason = flag:escortee_dead + scope:task_contract_invalidation_reason = flag:pet_dead + } + } + desc = ep3_contract_event.0012.opening_angry + } + triggered_desc = { + trigger = { + OR = { + scope:task_contract_invalidation_reason = flag:employer_dead + scope:task_contract_invalidation_reason = flag:target_dead + scope:task_contract_invalidation_reason = flag:prisoner_free + scope:task_contract_invalidation_reason = flag:not_vassal + scope:task_contract_invalidation_reason = flag:unlanded_employer_is_imprisoned + scope:task_contract_invalidation_reason = flag:faction_disbanded + } + } + desc = ep3_contract_event.0012.opening + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract_invalidation_reason = flag:employer_dead } + desc = ep3_contract_event.0012.desc_employer_dead + } + triggered_desc = { + trigger = { scope:task_contract_invalidation_reason = flag:target_dead } + desc = ep3_contract_event.0012.desc_target_dead + } + triggered_desc = { + trigger = { scope:task_contract_invalidation_reason = flag:escortee_dead } + desc = ep3_contract_event.0012.desc_escortee_dead + } + triggered_desc = { + trigger = { scope:task_contract_invalidation_reason = flag:pet_dead } + desc = ep3_contract_event.0012.desc_pet_dead + } + triggered_desc = { + trigger = { scope:task_contract_invalidation_reason = flag:prisoner_free } + desc = ep3_contract_event.0012.desc_prisoner_free + } + triggered_desc = { + trigger = { scope:task_contract_invalidation_reason = flag:not_vassal } + desc = ep3_contract_event.0012.desc_not_vassal + } + triggered_desc = { + trigger = { scope:task_contract_invalidation_reason = flag:unlanded_employer_is_imprisoned } + desc = ep3_contract_event.0012.desc_unlanded_employer_is_imprisoned + } + triggered_desc = { + trigger = { scope:task_contract_invalidation_reason = flag:faction_disbanded } + desc = ep3_contract_event.0012.desc_faction_disbanded + } + } + } + sender = scope:sender + immediate = { + if = { + limit = { + exists = current_travel_plan + NOT = { exists = scope:travel_destination } + } + current_travel_plan.final_destination_province = { + save_scope_as = travel_destination + } + } + #For those with heirs + if = { + limit = { exists = scope:employer_heir } + scope:employer_heir = { save_scope_as = sender } + } + #Or just the employer, straight up + else = { + scope:task_contract_employer = { save_scope_as = sender } + } + #Remove the treasure map + if = { + limit = { + var:invalidated_task_contract_type = flag:laamp_treasure_map_contract + } + random_character_artifact = { + limit = { has_variable = 1025_treasure_map } + hidden_effect = { destroy_artifact = this } + } + #Remove the employer from your camp + if = { + limit = { + scope:task_contract_employer = { is_courtier_of = root } + } + remove_courtier_or_guest = scope:task_contract_employer + } + #Mysterious + custom_tooltip = treasure_map_disappeared.tt + } + #stuff that would be nice to see in tooltip, but is already executed in on_invalidation + show_as_tooltip = { + if = { + limit = { + scope:task_contract_object ?= { is_alive = yes } + } + scope:task_contract_object = { return_to_court = yes } + } + } + switch = { + trigger = scope:task_contract_invalidation_reason + #employer or target died, get gold compensation + flag:employer_dead = { add_gold = task_contract_invalidated_gold_gain_value } + flag:target_dead = { add_gold = task_contract_invalidated_gold_gain_value } + #character or pet you were suppose to escort died + flag:escortee_dead = { + add_prestige = task_contract_failure_prestige_loss_full_value + scope:task_contract_employer = { + progress_towards_rival_effect = { + REASON = rival_escortee_died + CHARACTER = root + OPINION = default_rival_opinion + } + } + } + flag:pet_dead = { + add_prestige = task_contract_failure_prestige_loss_full_value + scope:task_contract_employer = { + progress_towards_rival_effect = { + REASON = rival_escortee_died + CHARACTER = root + OPINION = default_rival_opinion + } + } + } + flag:prisoner_free = { add_gold = task_contract_invalidated_gold_gain_value } + flag:unlanded_employer_is_imprisoned = { + #Nothing for you. They're unlanded. + } + flag:not_vassal = { + add_gold = task_contract_invalidated_gold_gain_value + } + flag:faction_disbanded = { + add_gold = task_contract_invalidated_gold_gain_value + } + } + } + #Let's head home + option = { + name = { + trigger = { + OR = { + scope:task_contract_invalidation_reason = flag:employer_dead + scope:task_contract_invalidation_reason = flag:target_dead + scope:task_contract_invalidation_reason = flag:prisoner_free + scope:task_contract_invalidation_reason = flag:not_vassal + scope:task_contract_invalidation_reason = flag:faction_disbanded + } + } + text = ep3_contract_event.0012.a + } + name = { + trigger = { + OR = { + scope:task_contract_invalidation_reason = flag:escortee_dead + scope:task_contract_invalidation_reason = flag:pet_dead + scope:task_contract_invalidation_reason = flag:unlanded_employer_is_imprisoned + } + } + text = ep3_contract_event.0012.b + } + return_home = yes + ai_chance = { + base = 10 + } + } + #Keep going + option = { + name = ep3_contract_event.0012.c + trigger = { exists = scope:travel_destination } + ai_chance = { + base = 0 + } + } + after = { + remove_variable = invalidated_task_contract_type + } +} + +#Join war contract success/failure = triggered when war ends in war_on_actions +ep3_contract_event.0013 = { + type = letter_event + sender = scope:task_contract_employer + opening = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract_reward = flag:success_standard } + desc = ep3_contract_event.0013.opening_success + } + triggered_desc = { + trigger = { scope:task_contract_reward = flag:failure_standard } + desc = ep3_contract_event.0013.opening_failure + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:task_contract_reward = flag:success_standard } + desc = ep3_contract_event.0013.desc_success + } + triggered_desc = { + trigger = { scope:task_contract_reward = flag:failure_standard } + desc = ep3_contract_event.0013.desc_failure + } + } + } + + immediate = { + #save scopes for ep3_hire_laamp_mercs_payment_value scripted value to work + save_scope_as = laamp_temp + scope:task_contract_employer = { + save_scope_as = employer + } + save_scope_value_as = { + name = war_contribution_value + value = "scope:war.war_contribution(scope:laamp_temp)" + } + } + option = { + name = ep3_contract_event.0013.a + trigger = { scope:task_contract_reward = flag:success_standard } + scope:task_contract_employer = { + pay_treasury_or_gold = { + target = scope:task_contract_taker + value = ep3_hire_laamp_mercs_payment_value + } + } + scope:laamp_temp = { + if = { + limit = { + faith != scope:task_contract.var:task_contract_target.faith + } + add_piety = { + value = "scope:war.war_contribution(scope:laamp_temp)" + divide = 100 + min = minor_piety_gain + max = massive_piety_gain + } + } + } + ai_chance = { + base = 1 + } + } + option = { + name = ep3_contract_event.0013.b + trigger = { scope:task_contract_reward = flag:failure_standard } + + ai_chance = { + base = 1 + } + } +} + +#Protect Heritage - start event to help getting a title revocation rights vassal contract +ep3_contract_event.0020 = { + type = character_event + title = ep3_contract_event.0020.t + desc = ep3_contract_event.0020.desc + theme = intrigue + #contract_taker, you + left_portrait = { + character = root + animation = personality_compassionate + } + #character giving you the contract + lower_right_portrait = { + character = scope:task_contract_employer + } + #character you have to fight in a war + lower_left_portrait = { + character = scope:task_contract_target + } + + immediate = { + set_contract_scopes_effect = yes + } + + #use hook + option = { + name = ep3_contract_event.0020.a + trigger = { + has_hook = scope:task_contract_target + } + show_as_unavailable = { + NOT = { has_hook = scope:task_contract_target } + } + reason = hook + remove_hook = { target = scope:task_contract_target } + scope:task_contract_employer = { + vassal_contract_set_obligation_level = { + type = title_revocation_rights + level = 1 + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + #intrigue + option = { + name = ep3_contract_event.0020.b + trigger = { + OR = { + has_realm_law = camp_purpose_wanderers + has_realm_law = camp_purpose_explorers + } + } + reason = purpose_explorers_and_wanderers + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = protect_minority_vassal_contract_intrigue_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_thug + AGENT_2 = agent_shill + AGENT_3 = agent_wrangler + # Speed. + AGENT_4 = agent_infiltrator + AGENT_5 = agent_socialite + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + trigger_event = laamp_extra_contract_schemes.0001 + custom_tooltip = ep3_contract_event.0020.agents_intrigue + custom_tooltip = ep3_contract_event.0020.tt + } + #martial + option = { + name = ep3_contract_event.0020.c + trigger = { + OR = { + has_realm_law = camp_purpose_brigands + has_realm_law = camp_purpose_mercenaries + } + } + reason = purpose_brigands_and_mercenaries + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = protect_minority_vassal_contract_martial_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_muscle + AGENT_2 = agent_thug + AGENT_3 = agent_bodyguard + # Speed. + AGENT_4 = agent_footpad + AGENT_5 = agent_tracker + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + trigger_event = laamp_extra_contract_schemes.0001 + custom_tooltip = ep3_contract_event.0020.agents_martial + custom_tooltip = ep3_contract_event.0020.tt + } + #learning + option = { + name = ep3_contract_event.0020.d + trigger = { + OR = { + has_realm_law = camp_purpose_scholars + has_realm_law = camp_purpose_legitimists + } + } + reason = purpose_legitimists_and_scholars + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = protect_minority_vassal_contract_learning_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_bailiff + AGENT_2 = agent_scribe + AGENT_3 = agent_diplomat + # Speed. + AGENT_4 = agent_theologian + AGENT_5 = agent_justiciar_speed + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + trigger_event = laamp_extra_contract_schemes.0001 + custom_tooltip = ep3_contract_event.0020.agents_learning + custom_tooltip = ep3_contract_event.0020.tt + } + #diplomacy - always + option = { + name = ep3_contract_event.0020.e + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = protect_minority_vassal_contract_diplomacy_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_diplomat + AGENT_2 = agent_shill + AGENT_3 = agent_scribe + # Speed. + AGENT_4 = agent_socialite + AGENT_5 = agent_herald + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + trigger_event = laamp_extra_contract_schemes.0001 + custom_tooltip = ep3_contract_event.0020.agents_diplomacy + custom_tooltip = ep3_contract_event.0020.tt + } +} + +#Reward the Faithful - start event to help getting a religious rights vassal contract +ep3_contract_event.0021 = { + type = character_event + title = ep3_contract_event.0021.t + desc = ep3_contract_event.0021.desc + theme = intrigue + #contract_taker, you + left_portrait = { + character = root + animation = personality_compassionate + } + #character giving you the contract + right_portrait = { + character = scope:task_contract_employer + } + #character you have to fight in a war + lower_right_portrait = { + character = scope:task_contract_target + } + + immediate = { + set_contract_scopes_effect = yes + } + + #use hook + option = { + name = ep3_contract_event.0021.a + trigger = { + has_hook = scope:task_contract_target + } + show_as_unavailable = { + NOT = { has_hook = scope:task_contract_target } + } + reason = hook + remove_hook = { target = scope:task_contract_target } + scope:task_contract_employer = { + vassal_contract_set_obligation_level = { + type = religious_rights + level = 1 + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + #intrigue + option = { + name = ep3_contract_event.0021.b + trigger = { + OR = { + has_realm_law = camp_purpose_wanderers + has_realm_law = camp_purpose_explorers + } + } + reason = purpose_explorers_and_wanderers + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = protect_minority_vassal_contract_intrigue_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_thug + AGENT_2 = agent_shill + AGENT_3 = agent_wrangler + # Speed. + AGENT_4 = agent_infiltrator + AGENT_5 = agent_socialite + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + trigger_event = laamp_extra_contract_schemes.0001 + custom_tooltip = ep3_contract_event.0021.agents_intrigue + custom_tooltip = ep3_contract_event.0021.tt + } + #martial + option = { + name = ep3_contract_event.0021.c + trigger = { + OR = { + has_realm_law = camp_purpose_brigands + has_realm_law = camp_purpose_mercenaries + } + } + reason = purpose_brigands_and_mercenaries + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = protect_minority_vassal_contract_martial_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_muscle + AGENT_2 = agent_thug + AGENT_3 = agent_bodyguard + # Speed. + AGENT_4 = agent_footpad + AGENT_5 = agent_tracker + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + trigger_event = laamp_extra_contract_schemes.0001 + custom_tooltip = ep3_contract_event.0021.agents_martial + custom_tooltip = ep3_contract_event.0021.tt + } + #learning + option = { + name = ep3_contract_event.0021.d + trigger = { + OR = { + has_realm_law = camp_purpose_scholars + has_realm_law = camp_purpose_legitimists + } + } + reason = purpose_legitimists_and_scholars + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = protect_minority_vassal_contract_learning_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_bailiff + AGENT_2 = agent_scribe + AGENT_3 = agent_diplomat + # Speed. + AGENT_4 = agent_theologian + AGENT_5 = agent_justiciar_speed + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + trigger_event = laamp_extra_contract_schemes.0001 + custom_tooltip = ep3_contract_event.0021.agents_learning + custom_tooltip = ep3_contract_event.0021.tt + } + #diplomacy - always + option = { + name = ep3_contract_event.0021.e + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = protect_minority_vassal_contract_diplomacy_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_diplomat + AGENT_2 = agent_shill + AGENT_3 = agent_scribe + # Speed. + AGENT_4 = agent_socialite + AGENT_5 = agent_herald + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + trigger_event = laamp_extra_contract_schemes.0001 + custom_tooltip = ep3_contract_event.0021.agents_diplomacy + custom_tooltip = ep3_contract_event.0021.tt + } +} + +#Contract to scheme a Prison Break - starting event +ep3_contract_event.0030 = { + type = character_event + title = ep3_contract_event.0030.t + desc = ep3_contract_event.0030.desc + theme = intrigue + #contract_taker, you + left_portrait = { + character = root + animation = eyeroll + } + #contract_object, character to rescue from prison + right_portrait = { + character = scope:task_contract_employer + animation = bribing + } + #character giving you the contract + lower_right_portrait = { + character = scope:task_contract_object + } + #the imprisoner + lower_left_portrait = { + character = scope:task_contract_target + } + + immediate = { + set_contract_scopes_effect = yes + } + + #use hook + option = { + name = ep3_contract_event.0030.a + trigger = { + has_hook = scope:task_contract_target + } + show_as_unavailable = { + NOT = { has_hook = scope:task_contract_target } + } + reason = hook + remove_hook = { target = scope:task_contract_target } + scope:task_contract = { + complete_task_contract = success_standard + } + #AI should always try to complete the contract + ai_chance = { + base = 100 + } + } + #prison break + option = { + name = ep3_contract_event.0030.b + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = laamp_prison_break_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_thief + AGENT_2 = agent_thug + # Speed. + AGENT_3 = agent_infiltrator + # Secrecy. + AGENT_4 = agent_lookout + AGENT_5 = agent_decoy + } + scope:task_contract.scheme = { + save_scope_as = scheme + } + custom_tooltip = ep3_contract_event.0030.agents + trigger_event = laamp_extra_contract_schemes.0011 + #AI should always try to complete the contract + ai_chance = { + base = 1 + } + } + #prison break + option = { + name = ep3_contract_event.0030.c + custom_tooltip = ep3_contract_event.0030.c.tt + reverse_add_opinion = { + modifier = angry_opinion + opinion = -10 + target = scope:task_contract_employer + } + + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +#Are we actually traveling towards the treasure now? +scripted_trigger 0040_traveling_towards_treasure_with_domicile_trigger = { + has_variable = ep3_laamp_decision_1000_is_excavating + current_travel_plan ?= { + is_travel_with_domicile = yes + OR = { + next_destination_province = scope:task_contract_destination + final_destination_province = scope:task_contract_destination + } + } +} + +#Your Treasure Map broke! +ep3_contract_event.0040 = { + type = character_event + title = ep3_contract_event.0040.t + desc = ep3_contract_event.0040.desc + theme = travel + left_portrait = { + character = root + animation = shock + } + immediate = { + #Save scopes + random_character_task_contract = { + task_contract_type = laamp_treasure_map_contract + save_scope_as = task_contract + } + scope:task_contract = { + task_contract_employer = { save_scope_as = task_contract_employer } + var:contract_treasure_location = { save_scope_as = treasure_map_contract_destination } + } + #Remove treasure map + destroy_artifact = scope:decayed_artifact + #Don't need you anymore, go away + #move_to_pool = scope:task_contract_employer + scope:task_contract_employer = { select_and_move_to_pool_effect = yes } + } + #Back home we go + option = { + name = { + trigger = { exists = current_travel_plan } + text = ep3_contract_event.0040.a_travel + } + name = ep3_contract_event.0040.a + #Haven't paid up? + if = { + limit = { 0040_traveling_towards_treasure_with_domicile_trigger = no } + #Then back home we go + return_home = yes + } + else = { + #Keep doing what you're doing + } + ai_chance = { + base = 10 + } + } + #Otherwise possibly stay in place + option = { + name = ep3_contract_event.0040.b + trigger = { 0040_traveling_towards_treasure_with_domicile_trigger = yes } + #Show 'em what happened + show_as_tooltip = { + domicile ?= { move_domicile = root.location } + } + #No point in traveling without the map + current_travel_plan ?= { abort_travel_plan = yes } + ai_chance = { + base = 2 + } + } +} + +#Employer died or became incapable while in your camp +ep3_contract_event.0041 = { + type = character_event + title = { + first_valid = { + #Dead + triggered_desc = { + trigger = { + scope:task_contract_employer = { is_alive = no } + } + desc = ep3_contract_event.0041.t_dead + } + #Incapable + triggered_desc = { + trigger = { + scope:task_contract_employer = { has_trait = incapable } + } + desc = ep3_contract_event.0041.t_incapable + } + } + } + desc = { + first_valid = { + #Dead + triggered_desc = { + trigger = { + scope:task_contract_employer = { is_alive = no } + } + desc = ep3_contract_event.0041.desc_dead + } + #Incapable + triggered_desc = { + trigger = { + scope:task_contract_employer = { has_trait = incapable } + } + desc = ep3_contract_event.0041.desc_incapable + } + } + desc = ep3_contract_event.0041.desc_outro + } + theme = travel + override_background = { reference = ep3_relaxing_tent } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:task_contract_employer + #Dead + triggered_animation = { + trigger = { is_alive = no } + animation = dead + } + #Incapable + animation = shiver + } + immediate = { + #Scopes are carried over from when the event triggers in the invalidation block of the laamp_treasure_map_contract + scope:task_contract_destination = { save_scope_as = travel_destination } + #Wait, what just happened? + scope:task_contract_employer = { + if = { + limit = { is_alive = no } + #Repurposing old loc strings... + save_scope_as = target + custom_tooltip = seize_realm_target_died_tt + } + else = { custom_tooltip = treasure_map_employer_is_incapable.tt } + } + #Remove the treasure map + random_character_artifact = { + limit = { has_variable = 1025_treasure_map } + save_scope_as = 0041_treasure_map + hidden_effect = { destroy_artifact = this } + } + #Very mysterious + custom_tooltip = treasure_map_disappeared.tt + #Mention that it invalidated + custom_tooltip = contract_invalidated_desc + } + #Staying. Here. + option = { + name = ep3_contract_event.0041.a + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:task_contract_employer = { is_alive = no } + } + desc = ep3_contract_event.0041.a.flavor_dead + } + triggered_desc = { + trigger = { + scope:task_contract_employer = { has_trait = incapable } + } + desc = ep3_contract_event.0041.a.flavor_incapable + } + } + } + #No point in traveling without the map + return_home = yes + } + #Already paid for my domicile to travel. We're continuing! + option = { + name = travel_danger_events.1011.c + trigger = { 0040_traveling_towards_treasure_with_domicile_trigger = yes } + } + after = { remove_variable ?= ep3_laamp_decision_1000_is_excavating } +} + +scripted_trigger 0045_artifact_will_be_reforged_trigger = { + OR = { + #Variables + has_variable = ascalon + has_variable = staff_kakusandha + has_variable = zomorrodnegar + has_variable = aruval + has_variable = sword_cid + has_variable = sword_of_muhammad + has_variable = mmaagha_kamalu + has_variable = sword_attila + has_variable = iron_crown + has_variable = crown_of_justinian + has_variable = angelica_ring + #Types + artifact_type = scepter_pedestal + artifact_type = brooch_pedestal + artifact_type = necklace_pedestal + artifact_type = pedestal + artifact_type = sculpture + artifact_type = goblet + artifact_type = jug + artifact_type = urn + } +} + +#You have accepted the Treasure Map contract - the employer tags along - starting event +ep3_contract_event.0043 = { + type = character_event + title = ep3_contract_event.0043.t + desc = ep3_contract_event.0043.desc + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = gallowsbait + has_trait = greedy + } + animation = personality_dishonorable + } + animation = personality_rational + } + right_portrait = { + character = scope:task_contract_employer + animation = ecstasy + } + artifact = { + trigger = { exists = scope:0043_treasure_map } + target = scope:0043_treasure_map + position = lower_center_portrait + } + immediate = { + #Save scopes + random_character_task_contract = { + task_contract_type = laamp_treasure_map_contract + save_scope_as = task_contract + } + scope:task_contract.task_contract_employer = { save_scope_as = task_contract_employer } + show_as_tooltip = { add_courtier = scope:task_contract_employer } + scope:task_contract_employer = { + reverse_add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + #This should always exist + random_character_artifact = { + limit = { has_variable = 1025_treasure_map } + save_scope_as = 0043_treasure_map + } + } + #Do it now - open Decisions screen + option = { + name = ep3_contract_event.0043.a + custom_tooltip = ep3_contract_event.0043.a.tt + #Decisions!! + decision:treasure_map_contract_decision = { + open_view_data = { + view = decision_detail + player = root + } + } + } + #Yeah, yeah, I'll get to it... + option = { + name = ep3_contract_event.0043.b + } +} + +#Pre-filter because on_arrival_event doesn't respect event triggers :scree: +ep3_contract_event.0044 = { + hidden = yes + + immediate = { + if = { + limit = { + has_variable = ep3_laamp_decision_1000_is_excavating + any_character_task_contract = { task_contract_type = laamp_treasure_map_contract } + } + trigger_event = ep3_contract_event.0045 + } + else = { + #Nothing. Zilch. Zip. Nada. + } + } +} + +#You find the Treasure. Do you keep it? +ep3_contract_event.0045 = { + type = character_event + title = ep3_contract_event.0045.t + desc = { + first_valid = { + #Historical artifact + triggered_desc = { + trigger = { exists = scope:treasure_artifact_historical } + desc = ep3_contract_event.0045.desc_artifact_historical + } + #jewelry + triggered_desc = { + trigger = { exists = scope:treasure_artifact_jewelry } + desc = ep3_contract_event.0045.desc_artifact_jewelry + } + #Great amount of gold + triggered_desc = { + trigger = { exists = scope:treasure_gold_great } + desc = ep3_contract_event.0045.desc_gold_great + } + #Mediocre amount of gold + triggered_desc = { + trigger = { exists = scope:treasure_gold_mediocre } + desc = ep3_contract_event.0045.desc_gold_mediocre + } + #Poor amount of gold + triggered_desc = { + trigger = { exists = scope:treasure_gold_poor } + desc = ep3_contract_event.0045.desc_gold_poor + } + #Nice view - oasis + triggered_desc = { + trigger = { + exists = scope:treasure_riches_in_scenery + exists = scope:is_dry_region + } + desc = ep3_contract_event.0045.desc_riches_in_scenery_dry + } + #Nice view - spring + triggered_desc = { + trigger = { + exists = scope:treasure_riches_in_scenery + NOT = { exists = scope:is_dry_region } + } + desc = ep3_contract_event.0045.desc_riches_in_scenery + } + #Fallback + desc = ep3_contract_event.0045.desc_pillaged + } + } + theme = landless_adventurer + #Literally anything else but that adventurer tent + override_background = { reference = terrain } + #The treasure of beautiful nature + override_background = { + trigger = { + exists = scope:treasure_riches_in_scenery + NOT = { exists = scope:is_dry_region } + } + reference = ce1_legendary_spring + } + #The desert version + override_background = { + trigger = { + exists = scope:treasure_riches_in_scenery + exists = scope:is_dry_region + } + reference = ce1_legendary_oasis + } + #A cave! + override_background = { + trigger = { + OR = { + exists = scope:treasure_gold_great + exists = scope:treasure_gold_mediocre + exists = scope:treasure_gold_poor + } + } + reference = fp3_cave + } + left_portrait = { + character = root + #Nice view + triggered_animation = { + trigger = { exists = scope:treasure_riches_in_scenery } + animation = shock + } + #Poor amount of gold + triggered_animation = { + trigger = { + has_trait = greedy + exists = scope:treasure_gold_poor + } + animation = personality_cynical + } + triggered_animation = { + trigger = { exists = scope:treasure_pillaged } + animation = disapproval + } + triggered_animation = { + trigger = { has_trait = gallowsbait } + animation = personality_dishonorable + } + animation = thinking + } + artifact = { + trigger = { exists = scope:0045_display_artifact } + target = scope:0045_display_artifact + position = lower_center_portrait + } + trigger = { + has_variable = ep3_laamp_decision_1000_is_excavating + any_character_task_contract = { task_contract_type = laamp_treasure_map_contract } + } + immediate = { + #Save scopes + random_character_task_contract = { + task_contract_type = laamp_treasure_map_contract + save_scope_as = task_contract + } + scope:task_contract.task_contract_employer = { save_scope_as = task_contract_employer } + scope:task_contract.var:contract_treasure_location = { save_scope_as = excavation_location } + #This should always exist + random_character_artifact = { + limit = { has_variable = 1025_treasure_map } + save_scope_as = 0045_treasure_map + } + #What did we find? + random_list = { + #Historical artifact + 1 = { + trigger = { is_ai = no } + #What artifact? + hidden_effect_new_object = { + generate_historical_artifact_based_on_location_effect = { LOCATION = scope:excavation_location } + scope:newly_created_artifact = { save_scope_as = treasure_artifact_historical } + } + create_character_memory = { type = treasure_map_memory } + scope:new_memory ?= { + set_variable = { + name = treasure_map_historical_artifact + value = scope:treasure_artifact_historical + } + set_variable = { + name = treasure_map_historical_artifact_location + value = scope:excavation_location + } + if = { + limit = { + exists = var:treasure_map_historical_artifact + exists = var:treasure_map_historical_artifact_location + } + #To prevent 'unused except in loc' errors :catto: + } + } + #Note that it has a historical artifact, for the Contract Success Reward + scope:task_contract = { + set_variable = { + name = has_unique_historical_artifact + value = scope:treasure_artifact_historical + } + } + } + #Jewelry + 5 = { + #Generate jewelry + hidden_effect_new_object = { + random_pool_character = { + province = root.location + limit = { is_available_adult = yes } + save_scope_as = 0045_smith + } + if = { + limit = { + NOT = { exists = scope:0045_smith } + } + create_character = { + template = generic_peasant_character + location = root.location + dynasty = none + culture = root.location.culture + faith = root.location.faith + save_scope_as = 0045_smith + } + } + random_list = { + 10 = { set_artifact_rarity_illustrious = yes } + 20 = { set_artifact_rarity_famed = yes } + 40 = { set_artifact_rarity_masterwork = yes } + } + random_list = { + 50 = { + create_artifact_brooch_effect = { + OWNER = scope:0045_smith + SMITH = scope:0045_smith + } + } + 50 = { + create_artifact_ring_effect = { + OWNER = scope:0045_smith + SMITH = scope:0045_smith + } + } + 50 = { + create_artifact_necklace_effect = { + OWNER = scope:0045_smith + SMITH = scope:0045_smith + } + } + } + #Finalization + scope:newly_created_artifact ?= { + add_scaled_artifact_modifier_prestige_effect = yes + #Don't need no notification about this + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 2 + } + save_scope_as = treasure_artifact_jewelry + set_owner = root + } + } + #Note that it is jewelry, for the Contract Success Reward + scope:task_contract = { + set_variable = { + name = has_jewelry_artifact + value = scope:treasure_artifact_jewelry + } + } + } + #Great amount of gold + 20 = { + save_scope_as = treasure_gold_great + save_scope_value_as = { + name = 0045_gold_gained + value = { + value = major_gold_laamps_value + multiply = 2 + } + } + #Note that it is Great, for the Contract Success Reward + scope:task_contract = { + set_variable = { + name = treasure_gold_great + value = scope:0045_gold_gained + } + } + } + #Mediocre amount of gold + 20 = { + save_scope_as = treasure_gold_mediocre + save_scope_value_as = { + name = 0045_gold_gained + value = major_gold_laamps_value + } + #Note that it is Mediocre, for the Contract Success Reward + scope:task_contract = { + set_variable = { + name = treasure_gold_mediocre + value = scope:0045_gold_gained + } + } + } + #Poor amount of gold + 30 = { + save_scope_as = treasure_gold_poor + save_scope_value_as = { + name = 0045_gold_gained + value = { + value = medium_gold_laamps_value + divide = 2 + } + } + #Note that it is Poor, for the Contract Success Reward + scope:task_contract = { + set_variable = { + name = treasure_gold_poor + value = scope:0045_gold_gained + } + } + } + #Nice view + 30 = { + trigger = { + NOT = { has_character_modifier = divine_springs_modifier } + } + #Pretty divine, innit + if = { + limit = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value < 100 + } + } + add_trait_xp = { + trait = pilgrim + value = { + integer_range = { + min = small_lifestyle_random_xp_mid + max = small_lifestyle_random_xp_high + } + } + } + } + else = { + stress_impact = { + base = medium_stress_impact_loss + zealous = minor_stress_impact_loss + } + } + save_scope_as = treasure_riches_in_scenery + create_character_memory = { type = treasure_map_memory } + scope:new_memory ?= { + set_variable = { + name = treasure_map_divine_scenery + value = scope:excavation_location + } + if = { + limit = { exists = var:treasure_map_divine_scenery } + #To prevent 'unused except in loc' errors :catto: + } + } + #Note that it is scenic, for the Contract Success Reward + scope:task_contract = { + set_variable = { + name = has_scenic_riches + value = flag:yes + } + } + } + #Someone beat you to it + 20 = { + save_scope_as = treasure_pillaged + save_scope_value_as = { + name = 0045_gold_gained + value = minor_gold_laamps_value + } + #Note that it is Pillaged, for the Contract Success Reward + scope:task_contract = { + set_variable = { + name = treasure_pillaged + value = scope:0045_gold_gained + } + } + } + } + #Oasis, not spring + if = { + limit = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + save_scope_as = is_dry_region + } + #Display the artifact + scope:treasure_artifact_historical ?= { save_scope_as = 0045_display_artifact } + scope:treasure_artifact_jewelry ?= { save_scope_as = 0045_display_artifact } + } + #Let Employer know + option = { + name = { + text = { + first_valid = { + #Historical Artifact + triggered_desc = { + trigger = { exists = scope:treasure_artifact_historical } + desc = ep3_contract_event.0045.a_artifact_historical + } + #Alright + triggered_desc = { + trigger = { + OR = { + exists = scope:treasure_artifact_jewelry + exists = scope:treasure_gold_great + exists = scope:treasure_gold_mediocre + exists = scope:treasure_riches_in_scenery + } + } + desc = ep3_contract_event.0045.a + } + #Meh + triggered_desc = { + trigger = { + OR = { + exists = scope:treasure_gold_poor + exists = scope:treasure_pillaged + } + } + desc = ep3_contract_event.0045.a_pillaged + } + } + } + } + #We don't really care if the map breaks at this point + scope:task_contract = { set_variable = 0045_used_map } + #Trigger the concluding event + trigger_event = ep3_contract_event.0050 + #You're doing the right thing + stress_impact = { + base = minor_stress_impact_loss + honest = medium_stress_impact_loss + greedy = minor_stress_impact_gain + } + } + #Keep it for yourself + option = { + name = { + text = { + first_valid = { + #Historical Artifact + triggered_desc = { + trigger = { exists = scope:treasure_artifact_historical } + desc = ep3_contract_event.0045.b_artifact_historical + } + #Alright + triggered_desc = { + trigger = { + OR = { + exists = scope:treasure_artifact_jewelry + exists = scope:treasure_gold_great + exists = scope:treasure_gold_mediocre + } + } + desc = ep3_contract_event.0045.b + } + #Meh + triggered_desc = { + trigger = { + OR = { + exists = scope:treasure_gold_poor + exists = scope:treasure_pillaged + } + } + desc = ep3_contract_event.0045.b_pillaged + } + } + } + } + #... just... doesn't make sense + trigger = { + NOT = { exists = scope:treasure_riches_in_scenery } + } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:treasure_artifact_historical ?= { 0045_artifact_will_be_reforged_trigger = yes } + } + desc = ep3_contract_event.0045.b.flavor_reforged + } + desc = ep3_contract_event.0045.b.flavor + } + } + #Historical artifact: Change it to something useful. + if = { + limit = { exists = scope:treasure_artifact_historical } + scope:treasure_artifact_historical = { + if = { + limit = { + OR = { + has_variable = ascalon + has_variable = staff_kakusandha + has_variable = zomorrodnegar + has_variable = aruval + has_variable = sword_cid + has_variable = sword_of_muhammad + has_variable = mmaagha_kamalu + has_variable = sword_attila + artifact_type = scepter_pedestal + } + } + reforge_artifact = { type = regalia } + } + else_if = { + limit = { + OR = { + has_variable = iron_crown + has_variable = crown_of_justinian + } + } + reforge_artifact = { type = helmet } + } + else_if = { + limit = { has_variable = angelica_ring } + reforge_artifact = { type = ring } + } + else_if = { + limit = { artifact_type = brooch_pedestal } + reforge_artifact = { type = brooch } + } + else_if = { + limit = { artifact_type = necklace_pedestal } + reforge_artifact = { type = necklace } + } + else_if = { + limit = { + OR = { + artifact_type = pedestal + artifact_type = sculpture + artifact_type = goblet + artifact_type = jug + artifact_type = urn + } + } + reforge_artifact = { type = miscellaneous } + } + } + show_as_tooltip = { + scope:treasure_artifact_historical = { set_owner = root } + } + } + else_if = { + limit = { exists = scope:treasure_artifact_jewelry } + show_as_tooltip = { + scope:treasure_artifact_jewelry = { set_owner = root } + } + } + else = { add_short_term_gold = scope:0045_gold_gained } + #Get rid of the contract + scope:task_contract = { complete_task_contract = failure_standard } + #Off ye go + remove_courtier_or_guest = scope:task_contract_employer + #You stole a historical treasure + if = { + limit = { exists = scope:treasure_artifact_historical } + #Shame on you + laamp_rewards_apply_criminal_xp_effect = { + TRACK = thief + XP_MIN = gallowsbait_xp_major_gain + XP_MAX = gallowsbait_xp_massive_gain + } + stress_impact = { + base = major_stress_impact_gain + honest = minor_stress_impact_gain + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + } + #You stole something significant + else_if = { + limit = { + OR = { + exists = scope:treasure_artifact_jewelry + exists = scope:treasure_gold_great + } + } + #Shame on you + laamp_rewards_apply_criminal_xp_effect = { + TRACK = thief + XP_MIN = gallowsbait_xp_minor_gain + XP_MAX = gallowsbait_xp_major_gain + } + stress_impact = { + base = medium_stress_impact_gain + honest = minor_stress_impact_gain + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + } + #Or not + else = { + #Ehh petty theft + laamp_rewards_apply_criminal_xp_effect = { + TRACK = thief + XP_MIN = gallowsbait_xp_minor_gain + XP_MAX = gallowsbait_xp_minor_gain + } + stress_impact = { + base = minor_stress_impact_gain + honest = minor_stress_impact_gain + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + } + ai_chance = { + base = 0 + } + } +} + +#Back at the employer. Fork over the treasure +ep3_contract_event.0050 = { + type = character_event + title = ep3_contract_event.0050.t + desc = { + first_valid = { + #Historical artifact + triggered_desc = { + trigger = { exists = scope:treasure_artifact_historical } + desc = ep3_contract_event.0050.desc_artifact_historical + } + #jewelry artifact + triggered_desc = { + trigger = { exists = scope:treasure_artifact_jewelry } + desc = ep3_contract_event.0050.desc_artifact_jewelry + } + #Gold + triggered_desc = { + trigger = { + OR = { + exists = scope:treasure_gold_great + exists = scope:treasure_gold_mediocre + exists = scope:treasure_gold_poor + } + } + desc = ep3_contract_event.0050.desc_gold + } + #Scenic + triggered_desc = { + trigger = { exists = scope:treasure_riches_in_scenery } + desc = ep3_contract_event.0050.desc_scenic + } + #Pillaged + desc = ep3_contract_event.0050.desc_pillaged + } + } + theme = inspiration_complete + override_background = { reference = ep3_relaxing_tent } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = greedy } + animation = personality_cynical + } + animation = flirtation + } + right_portrait = { + character = scope:task_contract_employer + #Historical artifact + triggered_animation = { + trigger = { exists = scope:treasure_artifact_historical } + animation = disbelief + } + #Scenic + triggered_animation = { + trigger = { exists = scope:treasure_riches_in_scenery } + animation = wedding_happy_cry + } + #Pillaged + triggered_animation = { + trigger = { exists = scope:treasure_pillaged } + animation = sadness + } + animation = happiness + } + artifact = { + trigger = { exists = scope:0045_display_artifact } + target = scope:0045_display_artifact + position = lower_center_portrait + } + immediate = { + + } + #Fork it over + option = { + name = ep3_contract_event.0050.a + scope:task_contract = { complete_task_contract = success_standard } + if = { + limit = { exists = scope:treasure_riches_in_scenery } + #Perma modifier + add_character_modifier = { modifier = divine_springs_modifier } + } + #Ya did the right thing, son + stress_impact = { honest = minor_stress_impact_loss } + ai_chance = { + base = 10 + } + } + after = { + #Off ye go + remove_courtier_or_guest = scope:task_contract_employer + } +} + +#To remove the variable for those who go into the travel planner but then decide not to travel to the Excavation Site +ep3_contract_event.0055 = { + hidden = yes + + trigger = { has_variable = ep3_laamp_decision_1000_is_planning_excavation_trip } + + immediate = { + remove_variable ?= ep3_laamp_decision_1000_is_planning_excavation_trip + #Is it our active contract? + random_character_task_contract = { + limit = { has_variable = contract_treasure_location } + save_scope_as = task_contract + } + #Are we going to the destination? + if = { + limit = { + any_character_active_contract = { task_contract_type = laamp_treasure_map_contract } + current_travel_plan ?= { + any_future_path_location = { this = scope:task_contract.var:contract_treasure_location } + } + } + set_variable = ep3_laamp_decision_1000_is_excavating + } + } +} + +#Help Claimant start a war contract +ep3_contract_event.0060 = { + type = character_event + title = ep3_contract_event.0060.t + desc = ep3_contract_event.0060.desc + theme = war + #task_contract_taker, you + left_portrait = { + character = root + animation = personality_bold + } + #commander, an envoy from employer + right_portrait = { + character = scope:commander + animation = storyteller + } + #character giving you the contract + lower_right_portrait = { + character = scope:task_contract_employer + } + #character you have to fight in a war + lower_left_portrait = { + character = scope:task_contract_target + } + + immediate = { + set_contract_scopes_effect = yes + scope:task_contract_employer = { + random_knight = { + save_scope_as = commander + } + } + } + + #take the contract and start the claim war + option = { + name = ep3_contract_event.0060.a + scope:task_contract_employer = { + start_war = { + cb = claim_cb + target = scope:task_contract_target + claimant = scope:task_contract_employer + target_title = scope:task_contract.var:task_contract_title + } + #needs a custom tooltip as the war doesn't exist yet + custom_tooltip = ep3_contract_event.0060.join_war + random_character_war = { + limit = { + using_cb = claim_cb + primary_attacker = scope:task_contract_employer + primary_defender = scope:task_contract_target + } + save_scope_as = task_contract_war + } + } + scope:task_contract = { + set_variable = { + name = task_contract_war + value = scope:task_contract_war + } + } + scope:task_contract_war ?= { + hidden_effect = { set_called_to = root } + add_attacker = root + } + + + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +#Join Faction - intro +ep3_contract_event.0070 = { + type = character_event + title = ep3_contract_event.0070.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:task_contract_faction = { + faction_is_type = nation_fracturing_faction + } + } + desc = ep3_contract_event.0070.desc_nation_fracturing_faction + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:task_contract_faction = { + faction_is_type = liberty_faction + } + } + desc = ep3_contract_event.0070.desc_liberty_faction + } + triggered_desc = { + trigger = { + scope:task_contract_faction = { + faction_is_type = independence_faction + } + } + desc = ep3_contract_event.0070.desc_independence_faction + } + triggered_desc = { + trigger = { + scope:task_contract_faction = { + faction_is_type = claimant_faction + } + } + desc = ep3_contract_event.0070.desc_claimant_faction + } + desc = ep3_contract_event.0070.desc_fallback_faction + } + first_valid = { + triggered_desc = { + trigger = { + scope:task_contract_employer = { + vassal_contract_has_flag = obligation_high_taxes + } + } + desc = ep3_contract_event.0070.desc_liege_taxes + } + triggered_desc = { + trigger = { + scope:task_contract_employer = { + vassal_contract_has_flag = obligation_high_levies + } + } + desc = ep3_contract_event.0070.desc_liege_levies + } + triggered_desc = { + trigger = { + scope:task_contract_target.culture != scope:task_contract_employer.culture + } + desc = ep3_contract_event.0070.desc_liege_culture + } + triggered_desc = { + trigger = { + scope:task_contract_target.faith != scope:task_contract_employer.faith + } + desc = ep3_contract_event.0070.desc_liege_faith + } + desc = ep3_contract_event.0070.desc_liege_fallback + } + } + } + desc = ep3_contract_event.0070.desc_outro + } + theme = war + #task_contract_taker, you + left_portrait = { + character = root + animation = inspect_weapon + } + #commander, an envoy from employer + right_portrait = { + character = scope:commander + animation = storyteller + } + #character giving you the contract + lower_right_portrait = { + character = scope:task_contract_employer + } + #character you have to fight in a war + lower_left_portrait = { + character = scope:task_contract_target + } + + immediate = { + set_contract_scopes_effect = yes + scope:task_contract_employer = { + random_knight = { + save_scope_as = commander + } + } + scope:task_contract_target = { + random_held_title = { + title_tier < kingdom + limit = { + trigger_if = { + limit = { + root.prestige_level > 3 + } + tier >= tier_duchy + } + tier >= tier_county + this != scope:task_contract_target.primary_title + this != scope:task_contract_target.primary_title.title_capital_county + } + weight = { + base = 1 + modifier = { + add = 100 + root = { + has_claim_on = prev + } + } + } + save_scope_as = promised_title + } + } + scope:task_contract.var:task_contract_faction = { + save_scope_as = task_contract_faction + } + } + + #take the contract and start the claim war, if they promise you land afterwards + option = { + name = ep3_contract_event.0070.a + trigger = { + custom_description = { + text = adventurer_not_famous_trigger_tt + value = 3 + prestige_level >= 3 + } + exists = scope:promised_title + } + show_as_unavailable = { + exists = scope:promised_title + } + join_faction_forced = { + faction = scope:task_contract.var:task_contract_faction + forced_by = scope:task_contract.task_contract_employer + years = 1 + } + # Give me land + scope:task_contract = { + set_variable = { + name = task_contract_title + value = scope:promised_title + } + } + show_as_tooltip = { + custom_tooltip = task_contract_tab_success + + create_title_and_vassal_change = { + type = granted + save_scope_as = title_change_vassal + } + scope:promised_title = { + change_title_holder = { + holder = scope:task_contract.task_contract_taker + change = scope:title_change_vassal + take_baronies = no + } + } + resolve_title_and_vassal_change = scope:title_change_vassal + } + open_view = { + view = factions_window + player = root + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + modifier = { + add = 1000 + has_claim_on = scope:promised_title + } + modifier = { + add = 20 + has_realm_law = camp_purpose_legitimists + } + } + } + #take the contract and start the claim war + option = { + name = ep3_contract_event.0070.b + join_faction_forced = { + faction = scope:task_contract.var:task_contract_faction + forced_by = scope:task_contract.task_contract_employer + years = 1 + } + open_view = { + view = factions_window + player = root + } + + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + set_variable = { + name = suppress_invalidation_event + value = yes + } + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +### Help out in a council task contract + +scripted_effect set_council_scopes_effect = { + scope:task_contract = { + var:task_contract_councillor = { + save_scope_as = task_contract_councillor + } + var:task_contract_councillor_liege = { + save_scope_as = task_contract_councillor_liege + } + } +} + +## Court Chaplain +# Fabricate claim - intro +ep3_contract_event.0080 = { + type = character_event + title = ep3_contract_event.0080.t + desc = ep3_contract_event.0080.desc + theme = faith + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:task_contract_councillor + animation = storyteller + } + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + + trigger = { + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + } + + #Open intetactin to fabricate claim + option = { + name = ep3_contract_event.0080.a + custom_tooltip = ep3_contract_event.0080.open_start_generate_claim_interaction + open_interaction_window = { + interaction = start_generate_claim_interaction + actor = root + recipient = scope:task_contract_target + } + if = { + limit = { + is_ai = yes + } + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = generate_claim + TARGET_TYPE = target_title + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_scribe + AGENT_2 = agent_diplomat + # Speed. + AGENT_3 = agent_justiciar + AGENT_4 = agent_socialite + # Secrecy. + AGENT_5 = agent_decoy + } + } + ai_chance = { + base = 100 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +# Fight Faith conversion - intro +ep3_contract_event.0082 = { + type = character_event + title = ep3_contract_event.0082.t + desc = ep3_contract_event.0082.desc + theme = faith + left_portrait = { + character = root + animation = menacing + } + lower_left_portrait = { + character = scope:task_contract_councillor_liege + } + lower_right_portrait = { + character = scope:task_contract_employer + } + + trigger = { + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + } + + #help at the location + option = { + name = ep3_contract_event.0082.a + custom_tooltip = ep3_contract_event.0082.to_destination + if = { + limit = { + location = scope:task_contract_destination + } + trigger_event = ep3_contract_event.0083 + } + else = { + start_travel_plan = { + destination = scope:task_contract_destination + on_arrival_destinations = all + on_arrival_event = ep3_contract_event.0083 + } + } + ai_chance = { + base = 100 + } + } + #talk to the liege + option = { + name = ep3_contract_event.0082.b + custom_tooltip = ep3_contract_event.0082.to_liege + if = { + limit = { + location = scope:task_contract_councillor_liege.capital_province + } + trigger_event = ep3_contract_event.0084 + } + else = { + start_travel_plan = { + destination = scope:task_contract_councillor_liege.capital_province + on_arrival_destinations = all + on_arrival_event = ep3_contract_event.0084 + } + } + ai_chance = { + base = 100 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +scripted_effect protect_county_from_conversion_effect = { + scope:task_contract_councillor_liege = { + set_variable = { + name = hold_court_8120_religion_block + value = scope:task_contract_destination.faith + years = 15 + } + add_character_modifier = { + modifier = hold_court_8120_tolerance_modifier + years = 10 + } + } + scope:task_contract_destination.county = { + add_county_modifier = { + modifier = hold_court_8120_stopped_modifier + years = 15 + } + } + scope:task_contract_councillor = { + start_default_task = yes + } +} + +# Fight Faith conversion - deal with it at location +ep3_contract_event.0083 = { + type = character_event + title = ep3_contract_event.0083.t + desc = ep3_contract_event.0083.desc + theme = faith + override_background = { + reference = temple_scope + } + override_effect_2d = { + reference = smoke + } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:task_contract_employer + animation = rage + } + lower_left_portrait = { + character = scope:task_contract_councillor + } + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + + trigger = { + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + } + + #capture the chaplain + option = { + name = ep3_contract_event.0083.a + duel = { + skill = intrigue + target = scope:task_contract_councillor + 25 = { + desc = ep3_contract_event.0083.a_win + send_interface_toast = { + title = ep3_contract_event.0083.a_win + left_icon = root + right_icon = scope:task_contract_employer + 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 + } + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + } + 25 = { + desc = ep3_contract_event.0083.a_lose + send_interface_toast = { + title = ep3_contract_event.0083.a_lose + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = failure_standard + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + stress_impact = { + callous = minor_stress_impact_loss + just = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + lazy = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + #force it through + option = { + name = ep3_contract_event.0083.b + duel = { + skills = { martial prowess } + target = scope:task_contract_councillor + 25 = { + desc = ep3_contract_event.0083.b_win + send_interface_toast = { + title = ep3_contract_event.0083.b_win + left_icon = root + right_icon = scope:task_contract_employer + protect_county_from_conversion_effect = yes + scope:task_contract_councillor_liege = { + add_opinion = { + modifier = fp2_questioned_my_faith_opinion + target = root + } + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + } + 25 = { + desc = ep3_contract_event.0083.b_lose + send_interface_toast = { + title = ep3_contract_event.0083.b_lose + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = failure_standard + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + stress_impact = { + wrathful = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 100 + OR = { + highest_skill = martial + prowess > scope:task_contract_councillor.prowess + } + } + } + } + #talk it through + option = { + name = ep3_contract_event.0083.c + duel = { + skills = { diplomacy learning } + target = scope:task_contract_councillor + 25 = { + desc = ep3_contract_event.0083.c_win + send_interface_toast = { + title = ep3_contract_event.0083.c_win + left_icon = root + right_icon = scope:task_contract_employer + protect_county_from_conversion_effect = yes + scope:task_contract_councillor_liege = { + add_opinion = { + modifier = fp2_questioned_my_faith_opinion + target = root + } + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + } + 25 = { + desc = ep3_contract_event.0083.c_lose + send_interface_toast = { + title = ep3_contract_event.0083.c_lose + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = failure_standard + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + stress_impact = { + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + OR = { + highest_skill = diplomacy + highest_skill = learning + } + } + } + } + #come with me + option = { + name = ep3_contract_event.0083.d + scope:task_contract = { + complete_task_contract = failure_standard + } + if = { + limit = { + scope:task_contract_employer = { + is_landed = yes + } + } + random_list = { + 110 = { + modifier = { + add = scope:task_contract_employer.ai_rationality + } + hidden_effect = { + scope:task_contract_employer = { + depose = yes + if = { + limit = { + any_traveling_family_member = { } + } + every_traveling_family_member = { + save_temporary_scope_as = family_to_move + root = { add_courtier = scope:family_to_move } + } + } + } + } + add_courtier = scope:task_contract_employer + reverse_add_opinion = { + modifier = helped_me_in_time_of_need + target = scope:task_contract_employer + } + } + 110 = { + modifier = { + add = scope:task_contract_employer.ai_honor + } + reverse_add_opinion = { + modifier = mocked_me_in_time_of_need + target = scope:task_contract_employer + } + } + } + } + else = { + add_courtier = scope:task_contract_employer + reverse_add_opinion = { + modifier = helped_me_in_time_of_need + target = scope:task_contract_employer + } + hidden_effect = { + if = { + limit = { + any_traveling_family_member = { } + } + every_traveling_family_member = { + save_temporary_scope_as = family_to_move + root = { add_courtier = scope:family_to_move } + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_loss + just = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 10 + scope:task_contract_employer = { + is_landed = no + } + } + } + } +} + +# Fight Faith conversion - deal with it at liege +ep3_contract_event.0084 = { + type = character_event + title = ep3_contract_event.0084.t + desc = ep3_contract_event.0084.desc + theme = faith + override_background = { + reference = throne_room + } + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:task_contract_councillor_liege + animation = thinking + } + lower_left_portrait = { + character = scope:task_contract_employer + } + lower_right_portrait = { + character = scope:task_contract_councillor + } + + trigger = { + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + } + + #suggest new management + option = { + name = ep3_contract_event.0084.a + duel = { + skills = { intrigue prowess } + target = scope:task_contract_target + 0 = { + desc = ep3_contract_event.0084.a_win_rights + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + factor = root.prestige_level + } + send_interface_toast = { + title = ep3_contract_event.0084.a_win_rights + left_icon = root + right_icon = scope:task_contract_employer + create_title_and_vassal_change = { + type = granted + save_scope_as = title_change_vassal + } + scope:task_contract.var:task_contract_destination.county = { + change_title_holder = { + holder = scope:task_contract_employer + change = scope:title_change_vassal + take_baronies = no + } + } + resolve_title_and_vassal_change = scope:title_change_vassal + scope:task_contract_employer = { + custom_tooltip = ep3_contract_event.0084.a_win_rights.tt + if = { + limit = { + is_vassal_of = scope:task_contract_target + } + vassal_contract_set_obligation_level = { + type = religious_rights + level = 1 + } + } + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + 25 = { + desc = ep3_contract_event.0084.a_win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = ep3_contract_event.0084.a_win + left_icon = root + right_icon = scope:task_contract_employer + create_title_and_vassal_change = { + type = granted + save_scope_as = title_change_vassal + } + scope:task_contract.var:task_contract_destination.county = { + change_title_holder = { + holder = scope:task_contract_employer + change = scope:title_change_vassal + take_baronies = no + } + } + resolve_title_and_vassal_change = scope:title_change_vassal + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + 25 = { + desc = ep3_contract_event.0084.a_lost + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + send_interface_toast = { + title = ep3_contract_event.0084.a_lost + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = failure_standard + } + scope:task_contract_councillor_liege = { + add_opinion = { + modifier = fp2_questioned_my_faith_opinion + opinion = -30 + target = root + } + } + } + } + } + stress_impact = { + ambitious = minor_stress_impact_loss + impatient = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + OR = { + highest_skill = intrigue + prowess > scope:task_contract_target.prowess + } + } + } + } + + #talk it through + option = { + name = ep3_contract_event.0084.b + duel = { + skills = { diplomacy learning } + target = scope:task_contract_target + 25 = { + desc = ep3_contract_event.0084.b_win + send_interface_toast = { + title = ep3_contract_event.0084.b_win + left_icon = root + right_icon = scope:task_contract_employer + protect_county_from_conversion_effect = yes + } + scope:task_contract = { + complete_task_contract = success_standard + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + } + 25 = { + desc = ep3_contract_event.0084.b_lost + scope:task_contract = { + complete_task_contract = failure_standard + } + send_interface_toast = { + title = ep3_contract_event.0084.b_lost + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract_councillor_liege = { + add_opinion = { + modifier = fp2_questioned_my_faith_opinion + opinion = -30 + target = root + } + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + stress_impact = { + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + OR = { + highest_skill = diplomacy + highest_skill = learning + } + } + } + } +} + +# Help Faith conversion - intro +ep3_contract_event.0085 = { + type = character_event + title = ep3_contract_event.0085.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:task_contract_councillor = { + has_personality_malicious_trigger = yes + } + } + desc = ep3_contract_event.0085.desc_bad + } + desc = ep3_contract_event.0085.desc_good + } + } + theme = faith + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:task_contract_councillor = { + has_personality_malicious_trigger = yes + } + } + animation = stunned + } + animation = prayer + } + right_portrait = { + character = scope:task_contract_councillor + animation = storyteller + } + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + + trigger = { + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + } + + #you condemn the evil chaplain methods + option = { + name = ep3_contract_event.0085.a + trigger = { + scope:task_contract_councillor = { + has_personality_malicious_trigger = yes + } + } + duel = { + skills = { prowess diplomacy } + target = scope:task_contract_councillor + 0 = { + desc = ep3_contract_event.0085.a_win_critical + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + factor = root.prestige_level + } + send_interface_toast = { + title = ep3_contract_event.0085.a_win_critical + left_icon = root + right_icon = scope:task_contract_employer + 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 + } + } + } + scope:task_contract = { + complete_task_contract = failure_standard + } + } + 25 = { + desc = ep3_contract_event.0085.a_win + send_interface_toast = { + title = ep3_contract_event.0085.a_win + left_icon = root + right_icon = scope:task_contract_employer + protect_county_from_conversion_effect = yes + scope:task_contract = { + complete_task_contract = failure_standard + } + scope:task_contract_councillor_liege = { + add_opinion = { + modifier = fp3_wrongful_imprisonment_opinion + opinion = -30 + target = root + } + } + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + } + 25 = { + desc = ep3_contract_event.0085.a_lose + send_interface_toast = { + title = ep3_contract_event.0085.a_lose + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = failure_standard + } + scope:task_contract_councillor_liege = { + add_opinion = { + modifier = fp3_wrongful_imprisonment_opinion + opinion = -30 + target = root + } + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + stress_impact = { + honest = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + OR = { + highest_skill = diplomacy + prowess > scope:task_contract_councillor.prowess + } + } + } + } + + #you agree with the evil chaplain methods + option = { + name = ep3_contract_event.0085.b + trigger = { + scope:task_contract_councillor = { + has_personality_malicious_trigger = yes + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + stress_impact = { + honest = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + sadistic = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = 100 + OR = { + highest_skill = diplomacy + prowess > scope:task_contract_councillor.prowess + } + } + } + } + + #you tell a story about the good gods + option = { + name = ep3_contract_event.0085.c + trigger = { + scope:task_contract_councillor = { + has_personality_malicious_trigger = no + } + } + duel = { + skill = learning + value = high_skill_rating + 25 = { + desc = ep3_contract_event.0085.c_win + send_interface_toast = { + title = ep3_contract_event.0085.c_win + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = success_standard + } + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + } + 25 = { + desc = ep3_contract_event.0085.c_lose + send_interface_toast = { + title = ep3_contract_event.0085.a_lose + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = failure_standard + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + stress_impact = { + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + shy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill = learning + } + } + } + + #you tell a story about the evil gods + option = { + name = ep3_contract_event.0085.d + trigger = { + scope:task_contract_councillor = { + has_personality_malicious_trigger = no + } + } + duel = { + skill = intrigue + value = high_skill_rating + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = ep3_contract_event.0085.d_win + send_interface_toast = { + title = ep3_contract_event.0085.d_win + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = success_standard + } + } + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + desc = ep3_contract_event.0085.d_lose + send_interface_toast = { + title = ep3_contract_event.0085.d_lose + left_icon = root + right_icon = scope:task_contract_employer + scope:task_contract = { + complete_task_contract = failure_standard + } + } + } + } + stress_impact = { + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_gain + shy = minor_stress_impact_gain + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill = intrigue + } + } + } + + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +## Marshal +# train commanders - intro +ep3_contract_event.0090 = { + type = character_event + title = ep3_contract_event.0090.t + desc = ep3_contract_event.0090.desc + theme = landless_adventurer + #task_contract_taker, you + left_portrait = { + character = root + animation = inspect_weapon + } + #marshal + right_portrait = { + character = scope:task_contract_councillor + animation = storyteller + } + #marshal's liege + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + } + + option = { + name = ep3_contract_event.0090.a + custom_tooltip = ep3_contract_event.0090.opens_task_contract_train_knight_interaction + open_interaction_window = { + interaction = task_contract_train_knight_interaction + actor = root + recipient = scope:task_contract_employer + } + if = { + limit = { + is_ai = yes + } + run_interaction = { + interaction = task_contract_train_knight_interaction + actor = root + recipient = scope:task_contract_employer + execute_threshold = decline + } + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +scripted_effect count_knights_trained_effect = { + scope:task_contract = { + if = { + limit = { + $RESULT$ = yes + } + change_variable = { + name = knights_trained + add = 1 + } + if = { + limit = { + NOT = { + scope:task_contract = { + has_variable_list = knights_to_train + any_in_list = { + variable = knights_to_train + is_alive = yes + is_knight = yes + } + } + } + } + scope:task_contract = { + if = { + limit = { + scope:task_contract.var:knights_trained >= scope:task_contract.var:knights_limit + } + complete_task_contract = success_critical + } + else_if = { + limit = { + scope:task_contract.var:knights_trained >= scope:task_contract.var:knights_failed + } + complete_task_contract = success_standard + } + else = { + complete_task_contract = failure_standard + } + } + } + } + if = { + limit = { + $RESULT$ = no + } + change_variable = { + name = knights_failed + add = 1 + } + if = { + limit = { + NOT = { + scope:task_contract = { + has_variable_list = knights_to_train + any_in_list = { + variable = knights_to_train + is_alive = yes + is_knight = yes + } + } + } + } + scope:task_contract = { + if = { + limit = { + NOT = { scope:task_contract.var:knights_trained = 0 } + scope:task_contract.var:knights_trained >= scope:task_contract.var:knights_failed + } + complete_task_contract = success_standard + } + else = { + complete_task_contract = failure_standard + } + } + } + } + } +} + +# train commanders - interaction event +ep3_contract_event.0091 = { + type = character_event + title = ep3_contract_event.0091.t + desc = { + desc = ep3_contract_event.0091.desc + first_valid = { + triggered_desc = { + trigger = { scope:helper = root } + desc = { + desc = ep3_contract_event.0091.desc_me + first_valid = { + triggered_desc = { + trigger = {root.prowess < high_skill_rating } + desc = ep3_contract_event.0091.desc_me_high_prowess + } + desc = ep3_contract_event.0091.desc_me_low_prowess + } + } + } + desc = { + desc = ep3_contract_event.0091.desc_helper + first_valid = { + triggered_desc = { + trigger = {scope:helper.prowess < high_skill_rating } + desc = ep3_contract_event.0091.desc_high_prowess + } + desc = ep3_contract_event.0091.desc_low_prowess + } + } + } + desc = ep3_contract_event.0091.desc_outro + } + theme = war + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:helper = root + root.prowess < high_skill_rating + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:helper = root + root.prowess >= high_skill_rating + } + animation = inspect_weapon + } + triggered_animation = { + trigger = { + scope:helper != root + scope:helper.prowess < high_skill_rating + } + animation = stunned + } + triggered_animation = { + trigger = { + scope:helper != root + scope:helper.prowess >= high_skill_rating + } + animation = disappointed + } + } + right_portrait = { + character = scope:knight + triggered_animation = { + trigger = { + scope:helper = root + root.prowess < high_skill_rating + } + animation = random_weapon_celebrate + } + triggered_animation = { + trigger = { + scope:helper = root + root.prowess >= high_skill_rating + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:helper != root + scope:helper.prowess < high_skill_rating + } + animation = random_weapon_celebrate + } + triggered_animation = { + trigger = { + scope:helper != root + scope:helper.prowess >= high_skill_rating + } + animation = random_weapon_yield + } + } + lower_left_portrait = { + trigger = { scope:helper != root } + character = scope:helper + } + lower_right_portrait = { + character = scope:task_contract_councillor + } + lower_center_portrait = { + character = scope:task_contract_councillor_liege + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + # search for anyone that could help you train them + random_court_position_holder = { + type = second_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = master_of_arms_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = light_cavalry_captain_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = camelry_captain_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = elephantry_captain_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = heavy_cavalry_captain_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = horse_archer_captain_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = archer_captain_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = heavy_infantry_captain_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = light_infantry_captain_camp_officer + add_to_list = helpers_list + } + random_court_position_holder = { + type = pike_captain_camp_officer + add_to_list = helpers_list + } + random_in_list = { + list = helpers_list + save_scope_as = helper + } + if = { + limit = { + exists = scope:helper + } + scope:helper = { + every_character_trait = { + limit = { + has_trait_category = commander + } + scope:task_contract = { + add_to_variable_list = { + name = takers_commander_traits + target = prev + } + } + } + } + } + else = { + save_scope_as = helper + } + scope:task_contract = { + random_in_list = { + variable = takers_commander_traits + save_scope_as = trait_to_teach + } + } + scope:helper = { + set_signature_weapon_effect = yes + } + scope:knight = { + set_signature_weapon_effect = yes + } + scope:task_contract = { + remove_list_variable = { + name = knights_to_train + target = scope:knight + } + } + } + + # steal the knight + option = { + name = ep3_contract_event.0091.a + trigger = { scope:knight = { is_landed = no } } + duel = { + skill = diplomacy + target = scope:knight + 25 = { + desc = ep3_contract_event.0091_won_recruit + modifier = { + add = root.prestige_level + factor = 5 + } + send_interface_toast = { + title = ep3_contract_event.0091_won_recruit + left_icon = root + right_icon = scope:knight + add_courtier = scope:knight + domicile = { + change_provisions = { + value = scope:knight.prowess + multiply = -4 + } + } + pay_short_term_gold = { + target = scope:task_contract_employer + gold = { + value = scope:knight.prowess + multiply = 5 + } + } + } + count_knights_trained_effect = { RESULT = no } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + } + 25 = { + desc = ep3_contract_event.0091_lost_recruit + send_interface_toast = { + title = ep3_contract_event.0091_lost_recruit + left_icon = root + right_icon = scope:knight + } + count_knights_trained_effect = { RESULT = no } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + stress_impact = { + impatient = minor_stress_impact_loss + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + callous = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill = diplomacy + } + } + } + + # teach them a trait you know + option = { + name = ep3_contract_event.0091.b + trigger = { + exists = scope:trait_to_teach + scope:knight = { + NOT = { has_trait = scope:trait_to_teach } + } + } + duel = { + skill = martial + target = scope:knight + 25 = { + desc = ep3_contract_event.0091_won_trait + modifier = { + add = root.learning + } + send_interface_toast = { + title = ep3_contract_event.0091_won_trait + left_icon = root + right_icon = scope:knight + scope:knight = { + add_trait = scope:trait_to_teach + } + } + count_knights_trained_effect = { RESULT = yes } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + } + 25 = { + desc = ep3_contract_event.0091_lost + send_interface_toast = { + title = ep3_contract_event.0091_lost + left_icon = root + right_icon = scope:knight + } + count_knights_trained_effect = { RESULT = no } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + arrogant = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill = martial + } + } + } + + # let helper teach them some prowess + option = { + name = ep3_contract_event.0091.c + trigger = { + exists = scope:helper + scope:helper != root + } + scope:helper = { + duel = { + skill = prowess + target = scope:knight + 25 = { + desc = ep3_contract_event.0091_won_helper + send_interface_toast = { + title = ep3_contract_event.0091_won_helper + left_icon = root + right_icon = scope:knight + scope:knight = { + add_prowess_skill = { + value = scope:helper.prowess + subtract = scope:knight.prowess + divide = 4 + add = { + value = scope:knight.ai_boldness + divide = 10 + } + add = { + value = scope:helper.ai_boldness + divide = 10 + } + min = 2 + max = 5 + } + force_character_skill_recalculation = yes + } + } + count_knights_trained_effect = { RESULT = yes } + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + } + 25 = { + desc = ep3_contract_event.0091_lost + count_knights_trained_effect = { RESULT = no } + send_interface_toast = { + title = ep3_contract_event.0091_lost + left_icon = root + right_icon = scope:knight + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + humble = minor_stress_impact_loss + shy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = 100 + scope:helper.prowess > scope:knight.prowess + } + } + } + + # teach them some prowess yourself + option = { + name = ep3_contract_event.0091.d + duel = { + skill = prowess + target = scope:knight + 50 = { + desc = ep3_contract_event.0091_won + send_interface_toast = { + title = ep3_contract_event.0091_won + left_icon = root + right_icon = scope:knight + scope:knight = { + add_prowess_skill = { + value = root.prowess + subtract = scope:knight.prowess + divide = 4 + add = { + value = scope:knight.ai_boldness + divide = 10 + } + add = { + value = root.ai_boldness + divide = 10 + } + min = 1 + max = 4 + } + force_character_skill_recalculation = yes + } + } + count_knights_trained_effect = { RESULT = yes } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + add = { + value = scope:knight.ai_energy + divide = -10 + } + } + modifier = { + add = { + value = root.ai_energy + divide = -10 + } + } + } + 50 = { + desc = ep3_contract_event.0091_lost + send_interface_toast = { + title = ep3_contract_event.0091_lost + left_icon = root + right_icon = scope:knight + } + count_knights_trained_effect = { RESULT = no } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + modifier = { + add = { + value = scope:knight.ai_energy + divide = 10 + } + } + modifier = { + add = { + value = root.ai_energy + divide = 10 + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + prowess > scope:knight.prowess + } + } + } + + after = { + hidden_effect = { + if = { + limit = { + exists = scope:trait_to_teach + } + scope:task_contract = { + remove_list_variable = { + name = takers_commander_traits + target = scope:trait_to_teach + } + } + } + if = { + limit = { + scope:task_contract = { + has_variable_list = knights_to_train + any_in_list = { + variable = knights_to_train + is_alive = yes + is_knight = yes + } + } + } + if = { + limit = { + is_ai = yes + } + #save new knight for the ai, as they can't use the interaction to do it + ordered_in_list = { + variable = knights_to_train + order_by = { + value = prowess + multiply = -1 + } + save_scope_as = knight + } + #run the event directly + root = { + trigger_event = { + id = ep3_contract_event.0091 + days = 1 + } + } + } + #open the interaction for human players + else = { + open_interaction_window = { + interaction = task_contract_train_knight_interaction + actor = root + recipient = scope:task_contract_employer + } + } + } + } + } +} + +scripted_effect set_corruption_reason_effect = { + scope:corrupt_province.county = { + switch = { + trigger = has_county_modifier + county_corruption_inefficient_tax_collection_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:taxes + } + } + county_corruption_deserting_levies_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:riots + } + } + county_corruption_smuggling_ring_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:bandits + } + } + county_corruption_bandits_rampant_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:bandits + } + } + county_corruption_inefficient_census_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:taxes + } + } + county_corruption_lack_of_sheriffs_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:bandits + } + } + county_corruption_lack_of_courts_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:bandits + } + } + county_corruption_thieves_guild_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:bandits + } + } + county_corruption_unsafe_highways_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:bandits + } + } + county_corruption_uncooperative_guilds_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:taxes + } + } + county_corruption_lackluster_administration_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:taxes + } + } + small_investment_in_revolt_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:riots + } + } + medium_investment_in_revolt_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:riots + } + } + high_investment_in_revolt_modifier = { + save_scope_value_as = { + name = corruption_reason + value = flag:riots + } + } + } + #fallback if the county have no modifier + if = { + limit = { + NOT = { exists = scope:corruption_reason } + } + save_scope_value_as = { + name = corruption_reason + value = flag:low_control + } + } + } +} + +# increase control - intro +ep3_contract_event.0092 = { + type = character_event + title = ep3_contract_event.0092.t + desc = { + desc = ep3_contract_event.0092.desc + first_valid = { + triggered_desc = { + trigger = { scope:corruption_reason = flag:taxes } + desc = ep3_contract_event.0092.desc_taxes + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:bandits } + desc = ep3_contract_event.0092.desc_bandits + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:riots } + desc = ep3_contract_event.0092.desc_riots + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:low_control } + desc = ep3_contract_event.0092.desc_low_control + } + } + } + theme = landless_adventurer + #task_contract_taker, you + left_portrait = { + character = root + animation = disbelief + } + #marshal + right_portrait = { + character = scope:task_contract_councillor + animation = shame + } + #marshal's liege + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + widget = { + gui = "event_window_widget_peasant_leader" + container = "custom_widgets_container" + } + + immediate = { + ep3_peasant_leader_widget_setup_effect = yes + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + #saving scope for custom localization and corruption reason + scope:task_contract_destination = { + save_scope_as = corrupt_province + } + set_corruption_reason_effect = yes + } + + #just travel there + option = { + name = ep3_contract_event.0092.a + #trigger the event immediately if you are already there + if = { + limit = { + scope:task_contract_destination = root.location + } + trigger_event = ep3_contract_event.0093 + } + #otherwise, tirgger a travel plan + else = { + custom_tooltip = ep3_contract_event.0092.a_tt + start_travel_plan = { + destination = scope:task_contract_destination + on_arrival_event = ep3_contract_event.0093 + on_arrival_destinations = all_but_last + can_cancel_planning = no + } + } + + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + + #move your camp there + option = { + name = ep3_contract_event.0092.b + trigger = { + NOR = { + scope:task_contract_destination = root.domicile.domicile_location + scope:task_contract_destination = root.location + } + } + custom_tooltip = ep3_contract_event.0092.b_tt + custom_tooltip = ep3_contract_event.0001.with_domicile.tt + start_travel_plan = { + destination = scope:task_contract_destination + on_arrival_event = ep3_contract_event.0093 + on_arrival_destinations = all + travel_with_domicile = yes + return_trip = no + can_cancel_planning = no + } + + #AI shouldn't move camps in events + ai_chance = { + base = 0 + } + } + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } + after = { + ep3_peasant_leader_widget_clear_effect = yes + } +} + +# increase control - arrival +ep3_contract_event.0093 = { + type = character_event + title = ep3_contract_event.0093.t + desc = { + desc = ep3_contract_event.0093.desc + first_valid = { + triggered_desc = { + trigger = { scope:corruption_reason = flag:taxes } + desc = ep3_contract_event.0093.desc_taxes + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:bandits } + desc = ep3_contract_event.0093.desc_bandits + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:riots } + desc = ep3_contract_event.0093.desc_riots + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:low_control } + desc = ep3_contract_event.0093.desc_low_control + } + } + } + theme = landless_adventurer + override_background = { + reference = terrain_travel + } + #task_contract_taker, you + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + scope:corruption_reason = flag:taxes + } + animation = personality_compassionate + } + triggered_animation = { + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + scope:corruption_reason = flag:bandits + } + animation = shock + } + triggered_animation = { + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + scope:corruption_reason = flag:riots + } + animation = interested_left + } + triggered_animation = { + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + scope:corruption_reason = flag:low_control + } + animation = shame + } + triggered_animation = { + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + scope:corruption_reason = flag:taxes + } + animation = dismissal + } + triggered_animation = { + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + scope:corruption_reason = flag:bandits + } + animation = disbelief + } + triggered_animation = { + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + scope:corruption_reason = flag:riots + } + animation = disappointed + } + triggered_animation = { + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + scope:corruption_reason = flag:low_control + } + animation = eyeroll + } + } + #peasant spokeperson + right_portrait = { + character = scope:corrupt_province_peasant + animation = beg + } + #marshal + lower_left_portrait = { + character = scope:task_contract_councillor + } + #marshal's liege + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + widget = { + gui = "event_window_widget_peasant_leader" + container = "custom_widgets_container" + } + cooldown = { days = 1 } + + trigger = { + any_character_active_contract = { + has_task_contract_type = laamp_help_increase_control_contract + } + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + ep3_peasant_leader_widget_setup_effect = yes + if = { + limit = { + NOT = { exists = scope:corrupt_province } + } + location = { + save_scope_as = corrupt_province + } + } + #remove the visited county from the list of corrupt counties, so you don't have to visit it anymore + scope:task_contract = { + remove_list_variable = { + name = corrupt_counties + target = scope:corrupt_province.county + } + } + #find a local peasant + random_pool_character = { + province = scope:corrupt_province + limit = { + is_available_healthy_ai_adult = yes + faith = scope:corrupt_province.county.faith + culture = scope:corrupt_province.county.culture + } + save_scope_as = corrupt_province_peasant + } + if = { + limit = { + NOT = { exists = scope:corrupt_province_peasant } + } + create_character = { + location = scope:corrupt_province + template = peasant_character + gender_female_chance = 50 + faith = scope:corrupt_province.county.faith + culture = scope:corrupt_province.county.culture + save_scope_as = corrupt_province_peasant + } + } + #add them to a list, they will become army leaders if a war breaks out + scope:task_contract = { + add_to_variable_list = { + name = met_peasant_leaders + target = scope:corrupt_province_peasant + } + } + #set flag with reason for localization + if = { + limit = { + NOT = { exists = scope:corruption_reason } + } + set_corruption_reason_effect = yes + } + } + + #help the marshal + option = { + name = ep3_contract_event.0093.a + duel = { + skill = martial + value = high_skill_rating + 25 = { + desc = ep3_contract_event.0093.a_win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + add_dread = 5 + scope:corrupt_province.county = { + add_county_modifier = { + modifier = marshal_task_increase_control_increased_opinion_modifier + years = 5 + } + } + } + 25 = { + desc = ep3_contract_event.0093.a_lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + scope:corrupt_province.county = { + add_county_modifier = { + modifier = marshal_task_military_presence_modifier + years = 5 + } + } + if = { + limit = { + any_maa_regiment = { } + } + random_maa_regiment = { + change_maa_troops_count = { + value = maa_current_troops_count + multiply = laamp_base_contract_schemes_1301_maa_damage_moderate_value + } + } + } + else_if = { + limit = { + any_courtier = { + is_adult = yes + NOR = { + is_close_family_of = root + is_spouse_of = root + } + } + } + ordered_courtier = { + order_by = martial + limit = { + is_adult = yes + NOR = { + is_close_family_of = root + is_spouse_of = root + } + } + scope:corrupt_province.province_owner = { + add_courtier = prev + } + } + } + else = { + pay_short_term_gold = { + target = scope:corrupt_province.province_owner + gold = root.minor_gold_value + } + domicile = { + change_provisions = { + integer_range = { + min = miniscule_provisions_value + max = minor_provisions_value + } + } + } + } + } + } + if = { + limit = { + scope:task_contract.var:num_of_corrupt_counties = 1 + scope:task_contract.var:control = 0 + scope:task_contract.var:support = 0 + } + custom_tooltip = ep3_contract_event.0094_success + scope:task_contract = { + complete_task_contract = success_critical + } + } + ep3_increase_peasant_control_effect = yes + stress_impact = { + compassionate = minor_stress_impact_gain + calm = minor_stress_impact_gain + just = minor_stress_impact_gain + impatient = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + + #side with peasants + option = { + name = ep3_contract_event.0093.b + every_courtier = { + limit = { + is_lowborn = yes + NOT = { + has_opinion_modifier = { + modifier = sided_with_peasants_opinion + target = root + } + } + } + custom = every_lowborn_follower + add_opinion = { + modifier = sided_with_peasants_opinion + target = root + years = 3 + } + } + if = { + limit = { + scope:task_contract.var:num_of_corrupt_counties = 1 + scope:task_contract.var:control = 0 + scope:task_contract.var:support = 0 + } + custom_tooltip = ep3_contract_event.0094_fail + show_as_tooltip = { + scope:task_contract = { + complete_task_contract = failure_standard + } + } + trigger_event = { + id = ep3_contract_event.0095 + delayed = yes + } + } + ep3_increase_peasant_support_effect = yes + stress_impact = { + compassionate = minor_stress_impact_loss + fickle = minor_stress_impact_loss + just = minor_stress_impact_loss + wrathful = minor_stress_impact_gain + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } + + after = { + ep3_peasant_leader_widget_clear_effect = yes + #check if there are more corrupt counties to visit + if = { + limit = { + scope:task_contract = { + has_variable_list = corrupt_counties + variable_list_size = { + name = corrupt_counties + value >= 1 + } + } + } + #follow up event to keep going + trigger_event = { + id = ep3_contract_event.0094 + delayed = yes + } + } + #else complete the contract + else = { + if = { + limit = { + scope:task_contract.var:control > scope:task_contract.var:support + NAND = { + scope:task_contract.var:control = 0 + scope:task_contract.var:support = 0 + } + } + custom_tooltip = ep3_contract_event.0094_success + scope:task_contract = { + if = { + limit = { + scope:task_contract.var:control = scope:task_contract.var:num_of_corrupt_counties + } + complete_task_contract = success_critical + } + else = { + complete_task_contract = success_standard + } + } + } + else_if = { + limit = { + scope:task_contract.var:control <= scope:task_contract.var:support + NAND = { + scope:task_contract.var:control = 0 + scope:task_contract.var:support = 0 + } + } + custom_tooltip = ep3_contract_event.0094_fail + show_as_tooltip = { + scope:task_contract = { + complete_task_contract = failure_standard + } + } + trigger_event = { + id = ep3_contract_event.0095 + delayed = yes + } + } + } + } +} + +# increase control - keep going +ep3_contract_event.0094 = { + type = character_event + title = ep3_contract_event.0094.t + desc = { + desc = ep3_contract_event.0094.desc + first_valid = { + triggered_desc = { + trigger = { scope:corruption_reason = flag:taxes } + desc = ep3_contract_event.0094.desc_taxes + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:bandits } + desc = ep3_contract_event.0094.desc_bandits + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:riots } + desc = ep3_contract_event.0094.desc_riots + } + triggered_desc = { + trigger = { scope:corruption_reason = flag:low_control } + desc = ep3_contract_event.0094.desc_low_control + } + } + } + theme = landless_adventurer + #task_contract_taker, you + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + scope:corruption_reason = flag:taxes + } + animation = personality_rational + } + triggered_animation = { + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + scope:corruption_reason = flag:bandits + } + animation = worry + } + triggered_animation = { + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + scope:corruption_reason = flag:riots + } + animation = personality_honorable + } + triggered_animation = { + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + scope:corruption_reason = flag:low_control + } + animation = stunned + } + triggered_animation = { + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + scope:corruption_reason = flag:taxes + } + animation = personality_greedy + } + triggered_animation = { + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + scope:corruption_reason = flag:bandits + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + scope:corruption_reason = flag:riots + } + animation = eyeroll + } + triggered_animation = { + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + scope:corruption_reason = flag:low_control + } + animation = boredom + } + } + #marshal + right_portrait = { + character = scope:task_contract_councillor + animation = debating + } + #marshal's liege + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + widget = { + gui = "event_window_widget_peasant_leader" + container = "custom_widgets_container" + } + + immediate = { + if = { + limit = { + NOT = { has_variable = contract_094_travel_fallback_true } + } + ep3_peasant_leader_widget_setup_effect = yes + scope:task_contract = { + #set a county from the corrupt counties list as the corrupt county to visit next + random_in_list = { + variable = corrupt_counties + title_province = { + save_scope_as = corrupt_province + } + } + #update the destination variable for proper tooltips and descriptions in other UIs + set_variable = { + name = task_contract_destination + value = scope:corrupt_province + } + } + set_corruption_reason_effect = yes + } + else = { + remove_variable = contract_094_travel_fallback_true + } + } + + #travel without camp + option = { + name = ep3_contract_event.0094.a + hidden_effect = { + current_travel_plan ?= { + abort_travel_plan = yes + } + start_travel_plan = { + destination = scope:corrupt_province + on_arrival_event = ep3_contract_event.0093 + on_arrival_destinations = all_but_last + on_travel_planner_cancel_on_action = ep3_contract_094_travel_fallback + can_cancel_planning = no + } + } + custom_tooltip = ep3_contract_event.0094.travel_without_domicile + + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + + # travel with camp - only if you traveled with it here + option = { + name = ep3_contract_event.0094.b + trigger = { + domicile.domicile_location = root.location + } + hidden_effect = { + current_travel_plan ?= { + abort_travel_plan = yes + } + start_travel_plan = { + destination = scope:corrupt_province + on_arrival_event = ep3_contract_event.0093 + on_arrival_destinations = all + travel_with_domicile = yes + return_trip = no + can_cancel_planning = no + } + } + custom_tooltip = ep3_contract_event.0094.travel_with_domicile + custom_tooltip = ep3_contract_event.0001.with_domicile.tt + + #AI shouldn't move their camp in events + ai_chance = { + base = 0 + } + } + + # I had enough, fail contract + option = { + name = ep3_contract_event.0094.c + trigger = { + scope:task_contract.var:control <= scope:task_contract.var:support + } + flavor = ep3_contract_event.0094_fail + show_as_tooltip = { + scope:task_contract = { + complete_task_contract = failure_standard + } + } + trigger_event = ep3_contract_event.0095 + stress_impact = { + ambitious = major_stress_impact_gain + lazy = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } + + # I had enough, succeed contract + option = { + name = ep3_contract_event.0094.c + trigger = { + scope:task_contract.var:control > scope:task_contract.var:support + } + flavor = ep3_contract_event.0094_success + scope:task_contract = { + if = { + limit = { + scope:task_contract.var:control = scope:task_contract.var:num_of_corrupt_counties + } + complete_task_contract = success_critical + } + else = { + complete_task_contract = success_standard + } + } + return_home = yes + stress_impact = { + ambitious = minor_stress_impact_gain + lazy = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + + after = { + ep3_peasant_leader_widget_clear_effect = yes + } +} + +# increase control - follow up +ep3_contract_event.0095 = { + type = character_event + title = ep3_contract_event.0095.t + desc = ep3_contract_event.0095.desc + theme = landless_adventurer + #task_contract_taker, you + left_portrait = { + character = root + animation = schadenfreude + } + #marshal + right_portrait = { + character = scope:task_contract_councillor + animation = rage + } + #marshal's liege + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + widget = { + gui = "event_window_widget_peasant_leader" + container = "custom_widgets_container" + } + cooldown = { days = 1 } + + immediate = { + # transfer the list of supported counties from contract to root, as the contract will be destroyed after this event, so that you will have access to the ep3_laamp_peasant_war cb, even if you didn't choose war in this event + scope:task_contract = { + every_in_list = { + variable = supported_counties + root = { + add_to_variable_list = { + name = war_supported_counties_list + target = prev + } + } + } + every_in_list = { + variable = met_peasant_leaders + root = { + add_to_variable_list = { + name = war_met_peasant_leaders_list + target = prev + } + } + } + } + scope:task_contract_taker = { + ep3_peasant_leader_widget_setup_effect = yes + } + } + + #lead an independence peasant war + option = { + name = ep3_contract_event.0095.a + #start a freedom war! + 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 = 20 + + } + } + + # they are on their own, for now + option = { + name = ep3_contract_event.0095.b + scope:task_contract = { + every_in_list = { + variable = supported_counties + custom = laamp_peasant_revolt_every_county + random_list = { + 1 = { + add_county_modifier = small_investment_in_revolt_modifier + } + 1 = { + add_county_modifier = medium_investment_in_revolt_modifier + } + 1 = { + add_county_modifier = high_investment_in_revolt_modifier + } + } + } + } + #this also fails the contract + scope:task_contract = { + complete_task_contract = failure_standard + } + return_home = yes + stress_impact = { + craven = minor_stress_impact_loss + lazy = minor_stress_impact_loss + brave = minor_stress_impact_gain + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } + + # try to weasel out of it + option = { + name = ep3_contract_event.0095.c + duel = { + skills = { diplomacy intrigue } + target = scope:task_contract_councillor + 1 = { + desc = ep3_contract_event.0095.c_win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + 25 = { + desc = ep3_contract_event.0095.c_tie + scope:task_contract = { + invalidate_contract = yes + } + } + 25 = { + desc = ep3_contract_event.0095.c_lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 5 + } + scope:task_contract = { + complete_task_contract = failure_standard + } + } + } + return_home = yes + stress_impact = { + honest = minor_stress_impact_gain + brave = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + deceitful = minor_stress_impact_loss + cynical = minor_stress_impact_loss + } + #AI should always try to complete the contract + ai_chance = { + base = 20 + } + } + + after = { + ep3_peasant_leader_widget_clear_effect = yes + } +} + +## Spymaster +#Contract to scheme find secrets - starting event +ep3_contract_event.0100 = { + type = character_event + title = ep3_contract_event.0100.t + desc = ep3_contract_event.0100.desc + theme = intrigue + #task_contract_taker, you + left_portrait = { + character = root + animation = stunned + } + #spymaster + right_portrait = { + character = scope:task_contract_councillor + animation = scheme + } + #spymaster's liege + lower_right_portrait = { + character = scope:task_contract_councillor_liege + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + } + + #start scheme to find secrets + option = { + name = ep3_contract_event.0030.b + begin_contract_scheme_with_agents_effect = { + SCHEME_TYPE = laamp_help_find_secrets_scheme + TARGET_TYPE = target_character + TARGET_SCOPE = scope:task_contract_target + TASK_CONTRACT = scope:task_contract + # Success. + AGENT_1 = agent_diplomat + AGENT_2 = agent_shill + AGENT_3 = agent_gabbler + # Speed. + AGENT_4 = agent_theologian + # Secrecy. + AGENT_5 = agent_justiciar + } + #AI should always try to complete the contract + ai_chance = { + base = 1 + } + } + + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +# Boost Legitimacy - intro +ep3_contract_event.0510 = { + type = character_event + title = ep3_contract_event.0510.t + desc = ep3_contract_event.0510.desc + theme = diplomacy + override_background = { + reference = alley_day + } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:peasant + animation = debating + } + lower_right_portrait = { + character = scope:task_contract_employer + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + create_character = { + template = generic_peasant_character + location = this.location + faith = location.faith + culture = location.culture + random_traits = yes + trait = peasant_leader + save_scope_as = peasant + } + location = { + save_scope_as = location + } + } + + #You attempt to debate the local + option = { + name = ep3_contract_event.0510.a + + duel = { + skills = { diplomacy learning } + target = scope:peasant + + 50 = { #You win the debate + desc = ep3_contract_event.0510.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 5 + scope:task_contract = { + complete_task_contract = success_standard + } + add_character_flag = contract_success_flag + trigger_event = ep3_contract_event.0520 + } + 40 = { #You are unconvincing + desc = ep3_contract_event.0510.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + scope:task_contract = { + complete_task_contract = failure_standard + } + add_character_flag = contract_failure_flag + trigger_event = ep3_contract_event.0520 + } + 10 = { #You actively damage your employer in the eyes of his subjects + desc = ep3_contract_event.0510.a.critfailure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 1 + scope:task_contract = { + complete_task_contract = failure_critical + } + add_character_flag = contract_crit_failure_flag + trigger_event = ep3_contract_event.0520 + } + } + stress_impact = { + honest = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + OR = { + highest_skill = diplomacy + learning > scope:peasant.learning + } + } + } + } + + #Threaten the local + option = { + name = ep3_contract_event.0510.b + duel = { + skills = { diplomacy prowess } + target = scope:peasant + + 30 = { #You win the 'debate' + desc = ep3_contract_event.0510.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 3 + scope:task_contract = { + complete_task_contract = success_standard + } + add_character_flag = contract_success_flag + trigger_event = ep3_contract_event.0520 + } + 50 = { #You are unconvincing + desc = ep3_contract_event.0510.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + scope:task_contract = { + complete_task_contract = failure_standard + } + add_character_flag = contract_failure_flag + trigger_event = ep3_contract_event.0520 + } + 20 = { #You actively damage your employer in the eyes of his subjects + desc = ep3_contract_event.0510.b.critfailure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 1 + scope:peasant = { + create_faction = { + type = peasant_faction + target = scope:task_contract_employer + } + } + scope:task_contract = { + complete_task_contract = failure_critical + } + add_character_flag = contract_crit_failure_flag + trigger_event = ep3_contract_event.0520 + } + } + stress_impact = { + honest = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + sadistic = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill_including_prowess = prowess + } + } + } + + #Pay him off to support your cause + option = { + name = ep3_contract_event.0510.c + + pay_short_term_gold = { + target = scope:peasant + gold = minor_gold_value + } + + random_list = { + 75 = { + modifier = { + add = 15 + scope:peasant = { + OR = { + has_trait = greedy + has_trait = arbitrary + } + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + add_character_flag = contract_success_flag + trigger_event = ep3_contract_event.0520 + } + 25 = { + modifier = { + add = 25 + scope:peasant = { + OR = { + has_trait = stubborn + has_trait = ambitious + } + } + } + scope:task_contract = { + complete_task_contract = failure_standard + } + add_character_flag = contract_failure_flag + trigger_event = ep3_contract_event.0520 + } + } + + + stress_impact = { + gregarious = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + shy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + gold > 100 + } + } + } + + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +# Boost Legitimacy - resolution +ep3_contract_event.0520 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = contract_success_flag } + desc = ep3_contract_event.0520.t.success + } + triggered_desc = { + trigger = { has_character_flag = contract_failure_flag } + desc = ep3_contract_event.0520.t.failure + } + triggered_desc = { + trigger = { has_character_flag = contract_crit_failure_flag } + desc = ep3_contract_event.0520.t.critfailure + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = contract_success_flag } + desc = ep3_contract_event.0520.desc.success + } + triggered_desc = { + trigger = { has_character_flag = contract_failure_flag } + desc = ep3_contract_event.0520.desc.failure + } + triggered_desc = { + trigger = { has_character_flag = contract_crit_failure_flag } + desc = ep3_contract_event.0520.desc.critfailure + } + } + } + theme = diplomacy + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_character_flag = contract_success_flag + } + animation = personality_honorable + } + animation = stress + } + right_portrait = { + character = scope:task_contract_employer + triggered_animation = { + trigger = { + has_character_flag = contract_success_flag + } + animation = ecstasy + } + animation = anger + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + location = { + save_scope_as = location + } + show_as_tooltip = { + if = { + limit = { + has_character_flag = contract_success_flag + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + else_if = { + limit = { + has_character_flag = contract_failure_flag + } + scope:task_contract = { + complete_task_contract = failure_standard + } + } + else = { + scope:task_contract = { + complete_task_contract = failure_critical + } + } + } + } + + option = { + name = ep3_contract_event.0520.a + + trigger = { + has_character_flag = contract_success_flag + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + name = ep3_contract_event.0520.b + + trigger = { + NOT = { + has_character_flag = contract_success_flag + } + } + + stress_impact = { + base = miniscule_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + after = { + remove_character_flag = contract_crit_success_flag + remove_character_flag = contract_success_flag + remove_character_flag = contract_failure_flag + remove_character_flag = contract_crit_failure_flag + } +} + +# Turbulent Priest - intro +ep3_contract_event.0550 = { + type = character_event + title = ep3_contract_event.0550.t + desc = ep3_contract_event.0550.desc + theme = martial + override_background = { + reference = alley_night + } + left_portrait = { + character = root + animation = lantern + } + right_portrait = { + character = scope:messenger + outfit_tags = { travel_cloak } + animation = scheme + hide_info = yes + } + lower_right_portrait = { + character = scope:task_contract_employer + } + + immediate = { + set_contract_scopes_effect = yes + set_council_scopes_effect = yes + location = { + save_scope_as = location + } + scope:task_contract_employer = { + random_councillor = { #Has a councillor who they hate + limit = { + is_ai = yes + reverse_opinion = { + target = scope:task_contract_employer + value <= high_negative_opinion + } + } + save_scope_as = councillor + } + } + if = { + limit = { + any_pool_character = { + province = root.location + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + age >= 25 + age <= 75 + } + } + random_pool_character = { + province = root.location + limit = { + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + age >= 25 + age <= 75 + } + save_scope_as = messenger + } + } + else = { + create_character = { + template = generic_peasant_character + location = this.location + faith = location.faith + culture = location.culture + random_traits = yes + save_scope_as = messenger + } + } + } + + #Open the letter + option = { + name = ep3_contract_event.0550.a + + custom_tooltip = ep3_contract_event.0550.a.tt + + trigger_event = ep3_contract_event.0555 + + stress_impact = { + honest = miniscule_stress_impact_gain + deceitful = miniscule_stress_impact_loss + craven = miniscule_stress_impact_gain + brave = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +# Turbulent Priest - Letter +ep3_contract_event.0555 = { + type = character_event + window = anonymous_letter_event + title = debug.0002.t + desc = ep3_contract_event.0555.desc + theme = martial + + #Okie doke + option = { + name = ep3_contract_event.0555.a + + trigger_event = { + id = ep3_contract_event.0560 + days = 1 + } + + stress_impact = { + honest = miniscule_stress_impact_gain + deceitful = miniscule_stress_impact_loss + craven = miniscule_stress_impact_gain + brave = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } +} + +# Turbulent Priest - decision +ep3_contract_event.0560 = { + type = character_event + title = ep3_contract_event.0560.t + desc = ep3_contract_event.0560.desc + theme = martial + override_background = { + reference = alley_night + } + left_portrait = { + character = root + animation = hunting_knife_start + } + right_portrait = { + character = scope:councillor + animation = drink_goblet + } + + immediate = { + set_contract_scopes_effect = yes + location = { + save_scope_as = location + } + scope:task_contract_employer = { + random_sub_realm_barony = { #Save a place for the exile to go + limit = { + this != root.capital_province + } + save_scope_as = exile_barony + } + } + } + + option = { #Slaughter them + name = ep3_contract_event.0560.a + + duel = { + skills = { prowess martial } + target = scope:councillor + + 30 = { #You break in and kill everyone inside + desc = ep3_contract_event.0560.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 3 + add_character_flag = contract_success_flag + custom_tooltip = ep3_contract_event.0560.contractsuccess + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + scope:councillor = { death = { death_reason = death_murder } } + } + 50 = { #You break in, kill the target, but suffer wounds + desc = ep3_contract_event.0560.a.neutral + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + increase_wounds_no_death_effect = { REASON = fight } + add_character_flag = contract_success_flag + custom_tooltip = ep3_contract_event.0560.contractsuccess + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + scope:councillor = { death = { killer = root death_reason = death_duel } } + } + 30 = { #You fail to even kill the target + desc = ep3_contract_event.0560.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 3 + increase_wounds_no_death_effect = { REASON = fight } + add_character_flag = contract_crit_failure_flag + custom_tooltip = ep3_contract_event.0560.contractfailure + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + } + 10 = { #You are killed! + desc = ep3_contract_event.0560.a.critfailure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 1 + death = { killer = scope:councillor death_reason = death_duel } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + impatient = miniscule_stress_impact_loss + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill_including_prowess = prowess + } + } + } + + option = { #Knife him in the loo + name = ep3_contract_event.0560.b + + duel = { + skills = { prowess intrigue } + target = scope:councillor + + 40 = { #It works perfectly + desc = ep3_contract_event.0560.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 4 + add_character_flag = contract_success_flag + custom_tooltip = ep3_contract_event.0560.contractcritsuccess + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + scope:councillor = { death = { death_reason = death_murder } } + } + 40 = { #There is a scuffle, and people notice as you escape + desc = ep3_contract_event.0560.b.neutral + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 4 + add_character_flag = contract_success_flag + custom_tooltip = ep3_contract_event.0560.contractsuccess + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + scope:councillor = { death = { killer = root death_reason = death_murder_known } } + } + 20 = { #He doesn't even go to the toilet + desc = ep3_contract_event.0560.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 2 + increase_wounds_no_death_effect = { REASON = fight } + add_character_flag = contract_failure_flag + custom_tooltip = ep3_contract_event.0560.contractcritfailure + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + impatient = minor_stress_impact_gain + patient = miniscule_stress_impact_loss + } + + ai_chance = { + base = 10 + modifier = { + add = 50 + highest_skill = intrigue + } + } + } + + option = { #Poison his drink + name = ep3_contract_event.0560.c + + duel = { + skill = intrigue + value = very_high_skill_rating + + 20 = { #It works perfectly + desc = ep3_contract_event.0560.c.critsuccess + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 2 + add_character_flag = contract_crit_success_flag + custom_tooltip = ep3_contract_event.0560.contractcritsuccess + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + } + 50 = { #By the time they realise it was you, he is already dead + desc = ep3_contract_event.0560.c.success + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + add_character_flag = contract_success_flag + custom_tooltip = ep3_contract_event.0560.contractsuccess + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + scope:councillor = { death = { killer = root death_reason = death_poison } } + } + 50 = { #It merely makes him sick + desc = ep3_contract_event.0560.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + add_character_flag = contract_failure_flag + custom_tooltip = ep3_contract_event.0560.contractfailure + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + scope:councillor = { contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } } + } + 20 = { #He sees you spiking the drink + desc = ep3_contract_event.0560.c.critfailure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 2 + add_character_flag = contract_crit_failure_flag + custom_tooltip = ep3_contract_event.0560.contractcritfailure + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + } + } + + stress_impact = { + brave = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill = intrigue + } + } + } + + option = { #Lady Boyle 'em + name = ep3_contract_event.0560.d + + duel = { + skills = { intrigue learning } + target = scope:councillor + + 25 = { #It works perfectly + desc = ep3_contract_event.0560.d.critsuccess + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 2 + add_character_flag = contract_crit_success_flag + custom_tooltip = ep3_contract_event.0560.contractcritsuccess + scope:task_contract_employer = { + fire_councillor = scope:councillor + } + scope:councillor = { + if = { + limit = { + is_landed = no + } + banish = yes + } + else = { + banish = yes + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = root + } + } + } + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + } + 50 = { #You have to knock him out before abduction + desc = ep3_contract_event.0560.d.success + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + add_character_flag = contract_success_flag + custom_tooltip = ep3_contract_event.0560.contractsuccess + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + scope:task_contract_employer = { + fire_councillor = scope:councillor + } + scope:councillor = { + increase_wounds_no_death_effect = { REASON = fight } + if = { + limit = { + is_landed = no + } + banish = yes + } + else = { + banish = yes + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = root + } + } + } + } + 35 = { #He escapes from your clutches + desc = ep3_contract_event.0560.d.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 3 + add_character_flag = contract_crit_failure_flag + custom_tooltip = ep3_contract_event.0560.contractcritfailure + trigger_event = { + id = ep3_contract_event.0565 + days = { 1 2 } + } + } + } + + stress_impact = { + brave = minor_stress_impact_gain + craven = miniscule_stress_impact_loss + sadistic = medium_stress_impact_gain + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + modifier = { + add = 25 + highest_skill = intrigue + } + modifier = { + add = 100 + highest_skill = learning + } + } + } +} + +# Turbulent Priest - resolution +ep3_contract_event.0565 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = contract_crit_success_flag } + desc = ep3_contract_event.0565.t.critsuccess + } + triggered_desc = { + trigger = { has_character_flag = contract_success_flag } + desc = ep3_contract_event.0565.t.success + } + triggered_desc = { + trigger = { has_character_flag = contract_failure_flag } + desc = ep3_contract_event.0565.t.failure + } + triggered_desc = { + trigger = { has_character_flag = contract_crit_failure_flag } + desc = ep3_contract_event.0565.t.critfailure + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = contract_crit_success_flag } + desc = ep3_contract_event.0565.desc.critsuccess + } + triggered_desc = { + trigger = { has_character_flag = contract_success_flag } + desc = ep3_contract_event.0565.desc.success + } + triggered_desc = { + trigger = { has_character_flag = contract_failure_flag } + desc = ep3_contract_event.0565.desc.failure + } + triggered_desc = { + trigger = { has_character_flag = contract_crit_failure_flag } + desc = ep3_contract_event.0565.desc.critfailure + } + } + } + theme = martial + override_background = { + reference = ep2_travel_bridge + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_character_flag = contract_success_flag + has_character_flag = contract_crit_success_flag + } + } + animation = steward + } + outfit_tags = { nightgown } + animation = stress + } + right_portrait = { + trigger = { + OR = { + has_character_flag = contract_success_flag + has_character_flag = contract_crit_success_flag + } + } + character = scope:messenger + animation = jockey_idle + outfit_tags = { travel_cloak } + hide_info = yes + camera = camera_event_horse_right + } + lower_center_portrait = { + character = scope:councillor + } + + immediate = { + set_contract_scopes_effect = yes + if = { + limit = { + any_pool_character = { + province = root.location + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + age >= 25 + age <= 75 + } + } + random_pool_character = { + province = root.location + limit = { + is_physically_able_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + age >= 25 + age <= 75 + } + save_scope_as = messenger + } + } + else = { + create_character = { + template = generic_peasant_character + location = this.location + faith = location.faith + culture = location.culture + random_traits = yes + save_scope_as = messenger + } + } + if = { + limit = { + has_character_flag = contract_crit_success_flag + } + scope:task_contract = { + complete_task_contract = success_critical + } + } + else_if = { + limit = { + has_character_flag = contract_success_flag + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + else_if = { + limit = { + has_character_flag = contract_failure_flag + } + scope:task_contract = { + complete_task_contract = failure_standard + } + } + else = { + scope:task_contract = { + complete_task_contract = failure_critical + } + } + } + + option = { + name = ep3_contract_event.0565.a + + trigger = { + OR = { + has_character_flag = contract_crit_success_flag + has_character_flag = contract_success_flag + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + name = ep3_contract_event.0565.b + + trigger = { + NOR = { + has_character_flag = contract_crit_success_flag + has_character_flag = contract_success_flag + } + } + + stress_impact = { + base = miniscule_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + after = { + remove_character_flag = contract_crit_success_flag + remove_character_flag = contract_success_flag + remove_character_flag = contract_failure_flag + remove_character_flag = contract_crit_failure_flag + } +} + +# Rescue Wanderer - Intro +ep3_contract_event.0570 = { + type = character_event + title = ep3_contract_event.0570.t + desc = ep3_contract_event.0570.desc + theme = intrigue + override_background = { + reference = dungeon + } + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:task_contract_employer + animation = prisondungeon + } + lower_right_portrait = { + character = scope:prisonguard + } + + immediate = { + set_contract_scopes_effect = yes + save_scope_as = root_for_loc + create_character = { + template = mercenary + location = this.location + faith = location.faith + culture = location.culture + gender_female_chance = root_soldier_female_chance + random_traits = yes + save_scope_as = prisonguard + } + location = { + save_scope_as = location + } + + save_scope_value_as = { + name = lockpick_range + value = { + integer_range = { + min = 1 + max = 10 + } + } + } + } + + #Duel the guard to get them out + option = { + name = ep3_contract_event.0570.a + + trigger = { + can_start_single_combat_trigger = yes + } + + add_internal_flag = dangerous + + custom_tooltip = ep3_contract_event.0570.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:prisonguard + FATALITY = always + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = ep3_contract_event.0571 + INVALIDATION_EVENT = single_combat.1006 + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + modifier = { + add = 50 + highest_skill_including_prowess = prowess + } + } + } + + #Make a distraction + option = { + name = ep3_contract_event.0570.b + + duel = { + skill = intrigue + value = decent_skill_rating + + 50 = { #The distraction works + desc = ep3_contract_event.0570.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + trigger_event = { + id = ep3_contract_event.0575 + days = 1 + } + } + 50 = { #It doesn't work and you have to escape + desc = ep3_contract_event.0570.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractfailure + add_character_flag = contract_failure_flag + random = { + chance = 30 + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_contract_event.0570.b.failure.tt + desc = ep3_contract_event.0570.b.failure.tt + left_icon = root + right_icon = scope:prisonguard + increase_wounds_no_death_effect = { REASON = fight } + } + } + trigger_event = { + id = ep3_contract_event.0575 + days = 1 + } + } + } + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = miniscule_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill = intrigue + } + } + } + + #Try to pick the lock + option = { + name = ep3_contract_event.0570.c + + random_list = { + 35 = { + modifier = { + add = 20 + has_trait = gallowsbait + } + modifier = { + add = 20 + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 25 + } + } + modifier = { + add = 20 + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 75 + } + } + add_character_flag = contract_success_flag + custom_tooltip = ep3_contract_event.0560.contractsuccess + trigger_event = { + id = ep3_contract_event.0575 + days = 1 + } + } + 65 = { + modifier = { + add = scope:lockpick_range + } + add_character_flag = contract_failure_flag + custom_tooltip = ep3_contract_event.0560.contractfailure + trigger_event = { + id = ep3_contract_event.0575 + days = 1 + } + } + } + + stress_impact = { + patient = minor_stress_impact_loss + impatient = medium_stress_impact_loss + } + + ai_chance = { + base = 25 + } + } + + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +#Add relevant flags +ep3_contract_event.0571 = { + hidden = yes + immediate = { + add_character_flag = contract_duel_success_flag + add_character_flag = contract_success_flag + trigger_event = { + id = ep3_contract_event.0575 + days = 1 + } + } +} + +# Rescue Wanderer - resolution +ep3_contract_event.0575 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = contract_success_flag } + desc = ep3_contract_event.0575.t.success + } + triggered_desc = { + trigger = { has_character_flag = contract_failure_flag } + desc = ep3_contract_event.0575.t.failure + } + } + } + desc = { + triggered_desc = { + trigger = { has_character_flag = contract_duel_success_flag } + desc = ep3_contract_event.0575.desc.duel + } + first_valid = { + triggered_desc = { + trigger = { has_character_flag = contract_success_flag } + desc = ep3_contract_event.0575.desc.success + } + triggered_desc = { + trigger = { has_character_flag = contract_failure_flag } + desc = ep3_contract_event.0575.desc.failure + } + } + } + theme = intrigue + override_background = { + reference = alley_day + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { + has_character_flag = contract_failure_flag + } + } + animation = personality_honorable + } + animation = stress + } + right_portrait = { + trigger = { + root = { + has_character_flag = contract_success_flag + } + } + character = scope:task_contract_employer + animation = ecstasy + } + artifact = { + trigger = { exists = scope:newly_created_artifact } + target = scope:newly_created_artifact + position = lower_center_portrait + } + + immediate = { + set_contract_scopes_effect = yes + hidden_effect = { + scope:task_contract_employer.primary_title = { + save_scope_as = title + } + destroy_title = scope:title + } + add_courtier = scope:task_contract_employer + if = { + limit = { + has_character_flag = contract_failure_flag + } + scope:task_contract = { + complete_task_contract = failure_standard + } + } + else = { + scope:task_contract = { + complete_task_contract = success_standard + } + } + if = { + limit = { + has_character_flag = contract_duel_success_flag + } + add_gold = { 15 40 } + hidden_effect = { + random_dummy_gender_effect = yes + create_artifact_brooch_effect = { + OWNER = scope:dummy_gender + SMITH = scope:dummy_gender + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_negate_prowess_penalty_add_3_modifier + add_artifact_modifier = artifact_monthly_prestige_2_modifier + add_artifact_modifier = artifact_dynasty_opinion_1_modifier + set_artifact_rarity = masterwork + set_artifact_name = ep3_pilfered_brooch + add_artifact_history = { + type = stolen + actor = scope:prisonguard + recipient = root + } + } + } + } + } + + option = { + name = ep3_contract_event.0575.a + + trigger = { + NOT = { + has_character_flag = contract_failure_flag + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + name = ep3_contract_event.0575.b + + trigger = { + has_character_flag = contract_failure_flag + } + + ai_chance = { + base = 10 + } + } + + after = { + remove_character_flag = contract_success_flag + remove_character_flag = contract_failure_flag + remove_character_flag = contract_duel_success_flag + } +} + +# Find Secret - Intro +ep3_contract_event.0580 = { + type = character_event + title = ep3_contract_event.0580.t + desc = ep3_contract_event.0580.desc + theme = intrigue + override_background = { + reference = temple + } + left_portrait = { + character = root + animation = eavesdrop + } + right_portrait = { + character = scope:secret_haver + animation = paranoia + } + lower_center_portrait = { + character = scope:task_contract_employer + } + + immediate = { + set_contract_scopes_effect = yes + scope:task_contract_employer = { + if = { + limit = { + any_vassal = { + any_secret = { + count > 0 + NOT = { is_known_by = scope:task_contract_employer } + } + } + } + random_vassal = { + limit = { + any_secret = { + count > 0 + NOT = { is_known_by = scope:task_contract_employer } + } + } + save_scope_as = secret_haver + random_secret = { + limit = { + NOT = { is_known_by = scope:task_contract_employer } + } + save_scope_as = secret + } + } + } + else_if = { + limit = { + any_courtier_or_guest = { + any_secret = { + count > 0 + NOT = { is_known_by = scope:task_contract_employer } + } + } + } + random_courtier_or_guest = { + limit = { + any_secret = { + count > 0 + NOT = { is_known_by = scope:task_contract_employer } + } + } + save_scope_as = secret_haver + random_secret = { + limit = { + NOT = { is_known_by = scope:task_contract_employer } + } + save_scope_as = secret + } + } + } + else = { + random_courtier_or_guest = { + limit = { + is_available_adult = yes + } + save_scope_as = secret_haver + give_random_likely_secret_effect = yes + random_secret = { + limit = { + NOT = { is_known_by = scope:task_contract_employer } + } + save_scope_as = secret + } + } + } + if = { + limit = { + NOT = { + exists = scope:secret_haver + } + } + create_character = { + employer = scope:task_contract_employer + template = pool_repopulate_stewardship + faith = scope:task_contract_employer.faith + culture = scope:task_contract_employer.culture + save_scope_as = secret_haver + } + scope:secret_haver = { + give_random_likely_secret_effect = yes + random_secret = { + save_scope_as = secret + } + } + } + } + } + + #Investigate + option = { + name = ep3_contract_event.0580.a + + duel = { + skill = intrigue + value = decent_skill_rating + + 50 = { #You learn their secret + desc = ep3_contract_event.0580.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + } + 50 = { #Turns out they don't have one...? + desc = ep3_contract_event.0580.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractfailure + add_character_flag = contract_failure_flag + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + } + } + + stress_impact = { + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 20 + highest_skill = intrigue + intrigue >= decent_skill_rating + } + modifier = { + add = 70 + highest_skill = intrigue + intrigue >= 16 + } + } + } + + #Try to lie about it + option = { + name = ep3_contract_event.0580.b + + duel = { + skills = { diplomacy intrigue } + target = scope:task_contract_employer + + 50 = { #Your lie works + desc = ep3_contract_event.0580.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + add_character_flag = lied_about_secret_flag + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + } + 50 = { #They know you're lying + desc = ep3_contract_event.0580.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractfailure + add_character_flag = contract_failure_flag + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = 90 + diplomacy >= scope:task_contract_employer.diplomacy + intrigue >= scope:task_contract_employer.intrigue + } + } + } + + #Threaten them + option = { + name = ep3_contract_event.0580.c + + flavor = ep3_contract_event.0580.c.tt + + if = { + limit = { + scope:task_contract_employer = { + NOT = { + any_secret = { } + } + } + } + duel = { + skill = prowess + target = scope:secret_haver + + 50 = { #Your intimidation works + desc = ep3_contract_event.0580.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + modifier = { + dread > 25 + add = 10 + } + modifier = { + dread > 50 + add = 10 + } + modifier = { + dread > 75 + add = 10 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + } + 50 = { #They aren't impressed + desc = ep3_contract_event.0580.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractfailure + add_character_flag = contract_failure_flag + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + } + } + } + else = { + duel = { + skill = prowess + target = scope:secret_haver + + 10 = { #Your intimidation works + desc = ep3_contract_event.0580.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 1 + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + } + 80 = { #They try to cut a deal... + desc = ep3_contract_event.0580.c.neutral + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 10 + hidden_effect = { #For a decent reward + scope:secret_haver = { + add_gold = { 50 100 } + } + } + custom_tooltip = ep3_contract_event.0580.c.neutral.tt + trigger_event = { + id = ep3_contract_event.0581 + days = 1 + } + } + 10 = { #They aren't impressed + desc = ep3_contract_event.0580.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 1 + custom_tooltip = ep3_contract_event.0560.contractfailure + add_character_flag = contract_failure_flag + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = miniscule_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + prowess > { + value = scope:secret_haver.prowess + add = 3 + } + } + } + } + + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +# Find Secret - Secret Haver Deal Proposal +ep3_contract_event.0581 = { + type = character_event + title = ep3_contract_event.0581.t + desc = ep3_contract_event.0581.desc + theme = intrigue + override_background = { + reference = temple + } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:secret_haver + animation = scheme + } + lower_center_portrait = { + character = scope:task_contract_employer + } + + immediate = { + set_contract_scopes_effect = yes + scope:task_contract_employer = { + random_secret = { + save_scope_as = employer_secret + } + } + hidden_effect = { + scope:secret_haver = { + random_dummy_gender_effect = yes + create_artifact_ring_effect = { + OWNER = scope:dummy_gender + SMITH = scope:dummy_gender + } + } + } + } + + #Turn down the deal + option = { + name = ep3_contract_event.0581.a + + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + + trigger_event = { + id = ep3_contract_event.0585 + days = 1 + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + } + } + + #Leave with his rewards + option = { + name = ep3_contract_event.0581.b + + scope:secret_haver = { + pay_short_term_gold = { + target = root + gold = scope:secret_haver.gold + } + } + + scope:newly_created_artifact = { + set_owner = root + } + + scope:employer_secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + + custom_tooltip = ep3_contract_event.0560.contractfailure + + scope:task_contract = { + complete_task_contract = failure_standard + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + } + } +} + +# Find Secret - Resolution +ep3_contract_event.0585 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = contract_success_flag } + desc = ep3_contract_event.0585.t.success + } + triggered_desc = { + trigger = { has_character_flag = contract_failure_flag } + desc = ep3_contract_event.0585.t.failure + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = lied_about_secret_flag } + desc = ep3_contract_event.0585.desc.liedsuccessfully + } + triggered_desc = { + trigger = { has_character_flag = contract_success_flag } + desc = ep3_contract_event.0585.desc.success + } + triggered_desc = { + trigger = { has_character_flag = contract_failure_flag } + desc = ep3_contract_event.0585.desc.failure + } + } + } + theme = intrigue + override_background = { + reference = council_chamber + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { + has_character_flag = contract_failure_flag + } + } + animation = steward + } + animation = stress + } + right_portrait = { + character = scope:task_contract_employer + triggered_animation = { + trigger = { + root = { + has_character_flag = contract_success_flag + } + } + animation = ecstasy + } + animation = anger + } + + immediate = { + set_contract_scopes_effect = yes + if = { + limit = { + has_character_flag = contract_failure_flag + } + scope:task_contract = { + complete_task_contract = failure_standard + } + } + else = { + scope:task_contract = { + complete_task_contract = success_standard + } + } + } + + option = { + name = ep3_contract_event.0585.a + + trigger = { + NOT = { + has_character_flag = contract_failure_flag + } + } + + if = { + limit = { + NOT = { + has_character_flag = lied_about_secret_flag + } + } + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = scope:task_contract_employer + } + } + } + else = { + hidden_effect = { + scope:secret_haver = { + random_list = { + 1 = { add_secret = { type = secret_cannibal } } + 1 = { add_secret = { type = secret_witch } } + 1 = { add_secret = { type = secret_non_believer } } + } + } + } + scope:secret_haver = { + random_secret = { + limit = { + this != scope:secret + } + reveal_to_without_events_effect = { + CHARACTER = scope:task_contract_employer + } + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + name = ep3_contract_event.0585.b + + trigger = { + has_character_flag = contract_failure_flag + } + + ai_chance = { + base = 10 + } + } + + after = { + remove_character_flag = contract_success_flag + remove_character_flag = contract_failure_flag + remove_character_flag = lied_about_secret_flag + } +} + +# Eliminate Heir - Intro +ep3_contract_event.0590 = { + type = character_event + title = ep3_contract_event.0590.t + desc = ep3_contract_event.0590.desc + theme = intrigue + override_background = { + reference = alley_night + } + left_portrait = { + character = root + animation = spymaster + } + right_portrait = { + character = scope:heir + animation = paranoia + } + lower_center_portrait = { + character = scope:task_contract_employer + } + + immediate = { + set_contract_scopes_effect = yes + scope:task_contract_employer = { + random_heir = { + limit = { + is_primary_heir_of = scope:task_contract_employer + reverse_opinion = { + target = scope:task_contract_employer + value <= high_negative_opinion + } + age > 16 #No murderin' babies + } + save_scope_as = heir + } + } + location = { + save_scope_as = location + } + } + + #A knife in the dark... + option = { + name = ep3_contract_event.0590.a + + duel = { + skill = prowess + target = scope:heir + + 50 = { #Stabby stab + desc = ep3_contract_event.0590.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractsuccess + scope:heir = { + death = { + death_reason = death_disappearance + killer = root + } + } + scope:task_contract = { + complete_task_contract = success_standard + } + } + 50 = { #They get away, oh no + desc = ep3_contract_event.0590.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractfailure + add_character_flag = contract_failure_flag + scope:heir = { + add_character_modifier = { + modifier = watchful_modifier + years = 5 + } + } + scope:task_contract_employer = { + add_character_modifier = { + modifier = ep3_under_suspicion_modifier + years = 5 + } + } + trigger_event = { + id = ep3_contract_event.0595 + days = 1 + } + } + } + + stress_impact = { + sadistic = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 50 + highest_skill_including_prowess = prowess + } + } + } + + #Maybe just bonk 'em on the head and drag them away somewhere? + option = { + name = ep3_contract_event.0590.b + + duel = { + skills = { prowess intrigue } + value = decent_skill_rating + + 50 = { #Get bonked, nerd + desc = ep3_contract_event.0590.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + add_character_flag = knockedout_flag + trigger_event = { + id = ep3_contract_event.0591 + days = 1 + } + } + 50 = { #They get away + desc = ep3_contract_event.0590.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractfailure + add_character_flag = contract_failure_flag + trigger_event = { + id = ep3_contract_event.0595 + days = 1 + } + } + 10 = { #You, uh, bonk a lil hard + desc = ep3_contract_event.0590.b.fatalbonk + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 1 + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + scope:heir = { + death = { + death_reason = death_disappearance + killer = root + } + } + add_stress = minor_stress_gain + scope:task_contract = { + complete_task_contract = success_standard + } + } + } + + stress_impact = { + sadistic = medium_stress_impact_gain + compassionate = miniscule_stress_impact_loss + } + + ai_chance = { + base = 10 + modifier = { + add = 50 + highest_skill = intrigue + } + } + } + + #Try to explain + option = { + name = ep3_contract_event.0590.c + + duel = { + skill = diplomacy + target = scope:heir + + 50 = { #You persuade them to leave + desc = ep3_contract_event.0590.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 5 + custom_tooltip = ep3_contract_event.0560.contractsuccess + add_character_flag = contract_success_flag + add_character_flag = camewillingly_flag + scope:secret = { + reveal_to_without_events_effect = { + CHARACTER = root + } + } + trigger_event = { + id = ep3_contract_event.0591 + days = 1 + } + } + 50 = { #They refuse to go + desc = ep3_contract_event.0590.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + min = 5 + hidden_effect = { #For a decent reward + scope:secret_haver = { + add_gold = { 50 100 } + } + } + custom_tooltip = ep3_contract_event.0560.contractfailure + trigger_event = { + id = ep3_contract_event.0595 + days = 1 + } + } + 10 = { #You let slip who put you up to this + desc = ep3_contract_event.0590.c.critfailure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + min = 1 + custom_tooltip = ep3_contract_event.0560.contractfailure + add_character_flag = contract_failure_flag + scope:heir = { + set_relation_rival = { + target = scope:task_contract_employer + reason = rival_historical + } + } + trigger_event = { + id = ep3_contract_event.0595 + days = 1 + } + } + } + + stress_impact = { + sadistic = major_stress_impact_gain + callous = medium_stress_impact_gain + compassionate = medium_stress_impact_loss + } + + ai_chance = { + base = 10 + modifier = { + add = 100 + highest_skill = diplomacy + } + } + } + + #invalidate the contract + option = { + name = ep3_contract_event.0001.invalidate + scope:task_contract = { + invalidate_contract = yes + } + #AI should always try to complete the contract + ai_chance = { + base = 0 + } + } +} + +# Eliminate Heir - Transition Event +ep3_contract_event.0591 = { + type = character_event + title = ep3_contract_event.0591.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = knockedout_flag } + desc = ep3_contract_event.0591.desc.knockedout + } + triggered_desc = { + trigger = { has_character_flag = camewillingly_flag } + desc = ep3_contract_event.0591.desc.camewillingly + } + } + } + theme = intrigue + override_background = { + reference = terrain_scope + } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:heir + animation = thinking + } + lower_center_portrait = { + character = scope:task_contract_employer + } + + immediate = { + set_contract_scopes_effect = yes + + scope:task_contract_employer = { + random_sub_realm_barony = { + limit = { + exists = holder + } + save_scope_as = random_barony + } + } + + scope:heir = { + add_trait = gallivanter + } + } + + #Best of luck! + option = { + name = ep3_contract_event.0591.a + + scope:heir = { + add_hook = { + target = root + type = favor_hook + } + start_travel_plan = { + destination = scope:random_barony + } + } + + scope:task_contract = { + complete_task_contract = success_standard + } + + ai_chance = { + base = 10 + } + } +} + +# Eliminate Heir - Resolution +ep3_contract_event.0595 = { + type = character_event + title = ep3_contract_event.0595.t + desc = ep3_contract_event.0595.desc + theme = intrigue + override_background = { + reference = council_chamber + } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:task_contract_employer + animation = anger + } + + immediate = { + set_contract_scopes_effect = yes + scope:task_contract = { + complete_task_contract = failure_standard + } + } + + option = { + name = ep3_contract_event.0595.a + + stress_impact = { + base = miniscule_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + after = { + remove_character_flag = contract_success_flag + remove_character_flag = contract_failure_flag + } +} diff --git a/N3OW/events/dlc/ep3/ep3_councillor_events.txt b/N3OW/events/dlc/ep3/ep3_councillor_events.txt new file mode 100644 index 00000000..8d7903a4 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_councillor_events.txt @@ -0,0 +1,173 @@ +######################## +# EP3 Councillors Events +######################## +namespace = ep3_councillor_event + +# Spouse increases your Influence +ep3_councillor_event.0001 = { + hidden = yes + + cooldown = { years = 10 } + + trigger = { + valid_spouse_councillor_trigger = yes + government_allows = administrative + } + + weight_multiplier = { + base = 1 + councillor_spouse_limited_skill_rating_modifier = { + SKILL = intrigue + SCALE = 1 + SKILL_RATING = spouse_skill_rating_1 + } + } + + immediate = { + cp:councillor_spouse = { + save_scope_as = councillor + } + send_interface_message = { + type = msg_spouse_task_good + title = ep3_councillor_event.0001.t + desc = { + triggered_desc = { + trigger = { + scope:councillor = { diplomacy < average_skill_level } + } + desc = spouse_task_diplomacy_good_unskilled_notification_tooltip + } + triggered_desc = { + trigger = { + scope:councillor = { diplomacy >= average_skill_level } + } + desc = spouse_task_diplomacy_good_skilled_notification_tooltip + } + } + + right_icon = scope:councillor + + change_influence = { + if = { + limit = { + scope:councillor = { + culture = { has_cultural_tradition = tradition_ep3_palace_politics } + } + } + add = medium_influence_gain + } + else = { + add = minor_influence_gain + } + } + } + } +} + +# Spouse increases your candidate score for a title if you are in to inherit +ep3_councillor_event.0002 = { + hidden = yes + + cooldown = { years = 10 } + + trigger = { + valid_spouse_councillor_trigger = yes + government_allows = administrative + top_liege = { + any_sub_realm_title = { + tier >= tier_duchy + is_noble_family_title = no + holder = { government_allows = administrative } + any_title_heir = { + prev = { # For getting the correct title + place_in_line_of_succession = { + target = prev # And again for going back and getting the correct character + value <= 3 + } + } + this = root + } + } + } + } + + weight_multiplier = { + base = 1 + councillor_spouse_limited_skill_rating_modifier = { + SKILL = diplomacy + SCALE = 1 + SKILL_RATING = spouse_skill_rating_1 + } + } + + immediate = { + cp:councillor_spouse = { + save_scope_as = councillor + } + top_liege = { + random_sub_realm_title = { + limit = { + tier >= tier_duchy + is_noble_family_title = no + holder = { government_allows = administrative } + any_title_heir = { + prev = { + place_in_line_of_succession = { + target = prev + value <= 3 + } + } + this = root + } + } + save_scope_as = target_title + } + } + save_scope_value_as = { + name = improved_candidate_score + value = { + if = { + limit = { + scope:councillor = { + culture = { has_cultural_tradition = tradition_ep3_palace_politics } + } + } + add = 15 + } + else = { + add = 10 + } + } + } + send_interface_message = { + type = msg_spouse_task_good + title = ep3_councillor_event.0002.t + desc = { + triggered_desc = { + trigger = { + scope:councillor = { diplomacy < average_skill_level } + } + desc = spouse_task_diplomacy_good_unskilled_notification_tooltip + } + triggered_desc = { + trigger = { + scope:councillor = { diplomacy >= average_skill_level } + } + desc = spouse_task_diplomacy_good_skilled_notification_tooltip + } + } + + right_icon = scope:councillor + left_icon = scope:target_title + + custom_tooltip = ep3_councillor_event.0002.desc + + scope:target_title = { + change_appointment_investment = { + target = root + value = scope:improved_candidate_score + } + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_decisions_events.txt b/N3OW/events/dlc/ep3/ep3_decisions_events.txt new file mode 100644 index 00000000..b8d45c53 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_decisions_events.txt @@ -0,0 +1,8076 @@ +################################################### +## EP3 Decision Events +## +## 0001 - 0006 Triumph Decision +## 1000 Find Charioteer Decision +## 2000 Governor Confirmation Decision +## 3000 Restore Greece Decision +## 3100 Prepare Greek Fire Dromons +## 3200 Mass Arrests Decision +## 4000 Re-establish the original Eastern Empire +## 4010 - 4019 Ask for help/a crusade +## 4020 - 4029 Evagelize the Slavs +## 4030 Recreate the ERE +## 4040 Reintroduce the Grain Dole +## 4050 Consolidate Rule +## 4060 Convert to Feudalism from Administrative +## 4070 Convert to Administrative from Feudalism +## 5001 Knight of the Swan +## 7000 Gather Provisions +## 4080 Found Salon +## 4090 Renounce Governorship +## 5000 Commission Icon +## 5010 Hire Chief Eunuch +## 5020 - 5021 Embrace Heresy +################################################### + +namespace = ep3_decisions_event + +scripted_trigger ep3_decisions_event_valid_prisoner_trigger = { + exists = scope:triumph_enemy_defeated + OR = { + # they are vassals or knights of the defeated + liege = scope:triumph_enemy_defeated + liege.liege = scope:triumph_enemy_defeated + liege.liege.liege = scope:triumph_enemy_defeated + # they are the defeated (e.g. pretender or previous liege) + this = scope:triumph_enemy_defeated + # they participated recently in a rebellion war vs you + any_memory = { + memory_age_years < 5 + OR = { # Using a rebellious CB + var:war_cb ?= flag:war_memory_cb_independence + var:war_cb ?= flag:war_memory_cb_tyranny + var:war_cb ?= flag:war_memory_cb_depose + var:war_cb ?= flag:war_memory_cb_fracture + } + OR = { + AND = { # Personally lost the war + memory_owner = scope:triumph_enemy_defeated + has_memory_type = war_lost + var:war_attacker = scope:triumph_enemy_defeated + } + AND = { # Joined the losing war + has_memory_type = joined_allys_war + var:war_attacker = scope:triumph_enemy_defeated + var:war_ally = scope:triumph_enemy_defeated + } + AND = { # Personally lost the war you started + memory_owner = scope:triumph_enemy_defeated + has_memory_type = war_lost + var:war_attacker = root + } + AND = { # Joined the losing war you started + has_memory_type = joined_allys_war + var:war_attacker = root + var:war_ally = scope:triumph_enemy_defeated + } + } + } + } + # no "women and children" + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:triumph_enemy_defeated } + is_adult = yes +} + +scripted_trigger ep3_decisions_event_valid_hostage_trigger = { + exists = scope:triumph_enemy_defeated + is_hostage = yes + warden = root + home_court = scope:triumph_enemy_defeated + location = root.location + age >= 7 +} + +# Parade through the city +ep3_decisions_event.0001 = { + type = character_event + window = fullscreen_event + title = ep3_decisions_event.0001.t + desc = { + desc = ep3_decisions_event.0001.intro + first_valid = { + triggered_desc = { + trigger = { + # In Constantinople + location = province:496 + } + desc = ep3_decisions_event.0001.desc_const + } + desc = ep3_decisions_event.0001.desc_other + } + first_valid = { + triggered_desc = { + trigger = { + exists = var:ep3_valid_triumph_victory + } + desc = ep3_decisions_event.0001.desc + } + desc = ep3_decisions_event.0001.desc_no_war + } + desc = ep3_decisions_event.0001.desc_end + } + theme = emperor + override_background = { reference = ep3_triumph } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_hold_triumph" + # if we have won a war, save the defeated enemy + var:ep3_valid_triumph_victory ?= { + save_scope_as = triumph_enemy_defeated + } + # if we have relevant prisoners, find one + if = { + limit = { + any_prisoner = { + ep3_decisions_event_valid_prisoner_trigger = yes + } + } + random_prisoner = { + limit = { + this = scope:triumph_enemy_defeated + } + alternative_limit = { + ep3_decisions_event_valid_prisoner_trigger = yes + is_landed = yes + } + alternative_limit = { + ep3_decisions_event_valid_prisoner_trigger = yes + } + save_scope_as = valid_prisoner + } + } + # if we have a relevant hostage, save them + if = { + limit = { + any_courtier = { + ep3_decisions_event_valid_hostage_trigger = yes + } + } + random_courtier = { + limit = { + ep3_decisions_event_valid_hostage_trigger = yes + } + save_scope_as = enemy_hostage + } + } + # if we have a relevant artifact, save it + if = { + limit = { + exists = scope:triumph_enemy_defeated + exists = var:byz_valid_for_trophy + var:byz_valid_for_trophy = { + save_temporary_scope_as = artifact_check + } + scope:artifact_check = { + previous_owner ?= scope:triumph_enemy_defeated + } + } + var:byz_valid_for_trophy = { + save_scope_as = sacked_artifact + } + } + # Create a memory right away + create_character_memory = { + type = byz_held_triumph + } + #Used in loc + scope:new_memory = { + set_variable = { + name = triumph_location + value = root.location + } + } + #Used in loc + root.location = { save_scope_as = t_location } + #Otherwise the error log screams + if = { + limit = { + any_memory = { + has_variable = triumph_location + } + } + } + #Add legitimacy + add_legitimacy = medium_legitimacy_gain + } + + #Option A: to the Hippodrome + option = { + name = ep3_decisions_event.0001.a + flavor = ep3_decisions_event.0001.a.flavor + custom_tooltip = ep3_decisions_event.0001.a.tt + add_character_flag = triumph_hippodrome + trigger_event = { + id = ep3_decisions_event.0002 + days = 1 + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = cynical + add = 50 + } + modifier = { + has_trait = ambitious + add = 50 + } + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.5 + } + } + } + + #Option B: to Hagia Sophia + option = { + name = ep3_decisions_event.0001.b + flavor = ep3_decisions_event.0001.b.flavor + custom_tooltip = ep3_decisions_event.0001.b.tt + add_character_flag = triumph_hagia_sophia + trigger_event = { + id = ep3_decisions_event.0003 + days = 1 + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = 50 + } + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = content + add = 50 + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + after = { + remove_variable = ep3_valid_triumph_victory + remove_variable = byz_valid_for_trophy + } +} + +# At the Hippodrome +ep3_decisions_event.0002 = { + type = character_event + title = ep3_decisions_event.0002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:triumph_enemy_defeated } + desc = ep3_decisions_event.0002.desc_enemy + } + desc = ep3_decisions_event.0002.desc_no_war + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:valid_prisoner + } + desc = ep3_decisions_event.0002.desc_prisoner + } + desc = ep3_decisions_event.0002.desc_no_prisoner + } + triggered_desc = { + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:sacked_artifact + } + desc = ep3_decisions_event.0002.desc_artifact + } + triggered_desc = { + trigger = { + exists = scope:enemy_hostage + } + desc = ep3_decisions_event.0002.desc_hostage + } + desc = ep3_decisions_event.0002.desc_conclusion + } + theme = emperor + override_background = { reference = ep3_hippodrome_track } + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + right_portrait = { + trigger = { + exists = scope:valid_prisoner + } + character = scope:valid_prisoner + override_imprisonment_visuals = yes + animation = prisonhouse + outfit_tags = { beggar_rags } + } + lower_right_portrait = scope:enemy_hostage + artifact = { + position = lower_left_portrait + target = scope:sacked_artifact + } + + #Option A: humiliate the prisoners + option = { + name = ep3_decisions_event.0002.a + flavor = ep3_decisions_event.0002.a.tt + trigger = { exists = scope:valid_prisoner } + trigger_event = { + id = ep3_decisions_event.0004 + days = 1 + } + ai_chance = { + base = 200 + modifier = { + has_trait = just + add = 50 + } + modifier = { + has_trait = vengeful + add = 100 + } + modifier = { + has_trait = sadistic + add = 50 + } + modifier = { + has_trait = callous + add = 50 + } + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + #Option B: parade and distribute the spoils to the crowd + option = { + name = ep3_decisions_event.0002.b + flavor = ep3_decisions_event.0002.b.tt + trigger = { + exists = scope:triumph_enemy_defeated + NOT = { exists = scope:sacked_artifact } + } + remove_treasury_or_gold = minor_treasury_or_gold_value + change_influence = major_influence_gain + add_legitimacy = minor_legitimacy_gain + trigger_event = ep3_decisions_event.0007 + stress_impact = { + greedy = major_stress_impact_gain + generous = medium_stress_impact_loss + } + ai_chance = { + base = 200 + modifier = { + has_trait = greedy + add = -100 + } + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = 0.5 + } + } + } + + #Option E: parade the spoils, destroy the symbols, and distribute the gold + option = { + name = ep3_decisions_event.0002.e + flavor = ep3_decisions_event.0002.e.tt + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:sacked_artifact + } + change_influence = major_influence_gain + add_prestige = major_prestige_gain + destroy_artifact = scope:sacked_artifact + add_legitimacy = minor_legitimacy_gain + if = { + limit = { + scope:triumph_enemy_defeated.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:triumph_enemy_defeated.culture + value = medium_negative_culture_acceptance + desc = cultural_acceptance_triumph_offensive + } + } + } + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -50 + } + } + } + trigger_event = ep3_decisions_event.0007 + stress_impact = { + greedy = minor_stress_impact_gain + generous = medium_stress_impact_loss + zealous = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 250 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 0.75 + ai_rationality = -0.25 + } + } + } + + #Option C: distribute gold and food to the crowd + option = { + name = ep3_decisions_event.0002.c + flavor = ep3_decisions_event.0002.c.tt + trigger = { + NOT = { exists = scope:triumph_enemy_defeated } + } + # This is a correspective of option B, but all the money must come from your own pockets + remove_short_term_gold = major_gold_value + change_influence = major_influence_gain + add_legitimacy = minor_legitimacy_gain + trigger_event = ep3_decisions_event.0007 + stress_impact = { + greedy = major_stress_impact_gain + generous = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = -100 + } + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + } + } + } + + #Option D: address the crowd + option = { + name = ep3_decisions_event.0002.d + flavor = ep3_decisions_event.0002.d.tt + custom_tooltip = ep3_decisions_event.0002.d.custom_tooltip + trigger_event = { + id = ep3_decisions_event.0005 + days = 1 + } + ai_chance = { + base = 150 + modifier = { + has_trait = arrogant + add = 50 + } + modifier = { + has_trait = gregarious + add = 50 + } + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +# At Hagia Sophia +ep3_decisions_event.0003 = { + type = character_event + title = ep3_decisions_event.0003.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:triumph_enemy_defeated } + desc = ep3_decisions_event.0003.desc + } + desc = ep3_decisions_event.0003.desc_no_war + } + triggered_desc = { + trigger = { + exists = scope:enemy_hostage + } + desc = ep3_decisions_event.0003.desc_hostage + } + } + theme = emperor + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = scope:actor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + trigger = { + exists = scope:enemy_hostage + } + character = scope:enemy_hostage + animation = sadness + } + lower_right_portrait = scope:triumph_enemy_defeated + artifact = { + position = lower_left_portrait + target = scope:sacked_artifact + } + + immediate = { + + } + + #Option C: hostage + option = { + name = ep3_decisions_event.0003.c + flavor = ep3_decisions_event.0003.c.tt + trigger = { exists = scope:enemy_hostage } + if = { + limit = { + scope:triumph_enemy_defeated.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:triumph_enemy_defeated.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_triumph_peace + } + } + } + add_diplomacy_lifestyle_xp = major_lifestyle_xp + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 50 + } + } + } + scope:enemy_hostage = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 50 + } + } + ai_chance = { + base = 200 + modifier = { + has_trait = forgiving + add = 100 + } + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 0.5 + } + } + } + + #Option B: dedicate to God + option = { + name = ep3_decisions_event.0003.b + trigger = { + exists = scope:triumph_enemy_defeated + NOT = { exists = scope:sacked_artifact } + } + add_piety = major_piety_gain + add_character_modifier = { + modifier = ep3_triumph_of_god_modifier + years = 10 + } + ai_chance = { + base = 200 + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = humble + add = 100 + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option D: dedicate the spoils to God + option = { + name = ep3_decisions_event.0003.d + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:sacked_artifact + } + custom_tooltip = ep3_decisions_event.0003.d.tt_artifact + hidden_effect = { destroy_artifact = scope:sacked_artifact } + add_piety = massive_piety_gain + add_legitimacy = minor_legitimacy_gain + add_character_modifier = { + modifier = ep3_triumph_of_god_modifier + years = 10 + } + faith = { + change_fervor = { + value = 1 + desc = fervor_gain_triumph_of_god + } + } + ai_chance = { + base = 250 + modifier = { + has_trait = zealous + add = 100 + } + modifier = { + has_trait = greedy + add = -150 + } + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 0.5 + } + } + } + + #Option A: receive blessing + option = { + name = ep3_decisions_event.0003.a + add_piety = medium_piety_gain + add_character_modifier = { + modifier = ep3_blessed_in_triumph_modifier + years = 10 + } + add_legitimacy = minor_legitimacy_gain + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = 50 + } + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + after = { trigger_event = ep3_decisions_event.0007 } +} + +# Deal with the prisoners +ep3_decisions_event.0004 = { + type = character_event + title = ep3_decisions_event.0004.t + desc = { + desc = ep3_decisions_event.0004.desc + triggered_desc = { + trigger = { + exists = scope:enemy_hostage + } + desc = ep3_decisions_event.0004.desc_hostage + } + } + theme = emperor + override_background = { reference = ep3_hippodrome } + left_portrait = { + character = root + animation = war_defender + } + right_portrait = { + character = scope:valid_prisoner + override_imprisonment_visuals = yes + animation = prisonhouse + outfit_tags = { beggar_rags } + } + lower_center_portrait = scope:enemy_hostage + + immediate = { + # needed in the blinding effects + save_scope_as = actor + scope:valid_prisoner = { save_scope_as = recipient } + } + + #Option A: blind + option = { + name = ep3_decisions_event.0004.a + trigger = { + scope:valid_prisoner = { + NOT = { has_trait = blind } + } + } + # Effects, opinions, and stress for blinding + blind_recipient_effect = yes + blind_opinion_effect = yes + blind_castrate_and_disfigure_effect = yes #stress is here + # The people love a traditionally Byzantine show of strength + # You uphold the Byzantine traditions + add_character_modifier = { + modifier = ep3_triumph_traditional_punishments_modifier + years = 5 + } + change_influence = medium_influence_gain + add_legitimacy = minor_legitimacy_gain + if = { + limit = { + exists = scope:enemy_hostage + } + scope:enemy_hostage = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + } + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + } + ai_chance = { + base = 300 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } + + #Option B: execute + option = { + name = ep3_decisions_event.0004.b + execute_prisoner_effect = { #stress is here + VICTIM = scope:valid_prisoner + EXECUTIONER = root + } + # The people are afraid of the show of strength + add_character_modifier = { + modifier = ep3_triumph_public_executioner_modifier + years = 5 + } + if = { + limit = { + exists = scope:enemy_hostage + } + scope:enemy_hostage = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -30 + } + } + } + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -30 + } + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 100 + } + modifier = { + has_trait = paranoid + add = 50 + } + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 0.5 + } + } + } + + #Option C: pardon + option = { + name = ep3_decisions_event.0004.c + scope:valid_prisoner = { release_from_prison = yes } + if = { + limit = { + can_add_hook = { + target = scope:valid_prisoner + type = indebted_hook + } + } + add_hook = { + target = scope:valid_prisoner + type = indebted_hook + } + } + # The people think you are nice + change_influence = major_influence_gain + if = { + limit = { + exists = scope:enemy_hostage + } + scope:enemy_hostage = { + add_opinion = { + target = root + modifier = merciful_opinion + opinion = 20 + } + } + } + if = { + limit = { + scope:triumph_enemy_defeated = { is_alive = yes } + } + scope:triumph_enemy_defeated = { + add_opinion = { + target = root + modifier = merciful_opinion + opinion = 30 + } + } + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + vengeful = major_stress_impact_gain + paranoid = major_stress_impact_gain + trusting = medium_stress_impact_loss + forgiving = major_stress_impact_loss + compassionate = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = forgiving + add = 100 + } + modifier = { + has_trait = content + add = 50 + } + modifier = { + has_trait = compassionate + add = 50 + } + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + after = { trigger_event = ep3_decisions_event.0007 } +} + +# Make a speech +ep3_decisions_event.0005 = { + type = character_event + title = ep3_decisions_event.0005.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:triumph_enemy_defeated } + desc = ep3_decisions_event.0005.desc_victory + } + desc = ep3_decisions_event.0005.desc_no_war + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:triumph_enemy_defeated + exists = scope:valid_prisoner + } + desc = ep3_decisions_event.0005.desc_prisoner + } + desc = ep3_decisions_event.0005.desc_politics + } + triggered_desc = { + trigger = { + exists = scope:enemy_hostage + } + desc = ep3_decisions_event.0005.desc_hostage + } + } + theme = emperor + override_background = { reference = ep3_hippodrome } + left_portrait = { + character = root + animation = war_defender + } + right_portrait = { + trigger = { + exists = scope:enemy_hostage + } + character = scope:enemy_hostage + animation = sadness + } + lower_center_portrait = scope:valid_prisoner + + immediate = { + # The people are excited to see and hear you + add_prestige = medium_prestige_gain + } + + #Option A: promise victories + option = { + name = ep3_decisions_event.0005.a + flavor = ep3_decisions_event.0005.tt + duel = { + value = average_skill_rating + skill = martial + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_decisions_event.0005.a.success + send_interface_toast = { + title = ep3_decisions_event.success + left_icon = root + custom_tooltip = ep3_decisions_event.a.tt + add_character_modifier = { + modifier = ep3_triumph_promised_victories_modifier + years = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_decisions_event.0005.a.failure + send_interface_toast = { + title = ep3_decisions_event.failure + left_icon = root + custom_tooltip = ep3_decisions_event.a.tt_no + } + } + } + add_character_flag = triumph_promised_victories + ai_chance = { + base = 100 + modifier = { + has_trait = wrathful + add = 50 + } + modifier = { + has_trait = ambitious + add = 50 + } + modifier = { + has_trait = brave + add = 50 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } + + #Option B: promise stability + option = { + name = ep3_decisions_event.0005.b + flavor = ep3_decisions_event.0005.tt + duel = { + value = average_skill_rating + skill = diplomacy + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_decisions_event.0005.b.success + send_interface_toast = { + title = ep3_decisions_event.success + left_icon = root + custom_tooltip = ep3_decisions_event.b.tt + add_character_modifier = { + modifier = ep3_triumph_promised_stability_modifier + years = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_decisions_event.0005.a.failure + send_interface_toast = { + title = ep3_decisions_event.failure + left_icon = root + custom_tooltip = ep3_decisions_event.b.tt_no + } + } + } + add_character_flag = triumph_promised_stability + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = just + add = 50 + } + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 0.5 + } + } + } + + #Option C: promise prosperity + option = { + name = ep3_decisions_event.0005.c + flavor = ep3_decisions_event.0005.tt + duel = { + value = average_skill_rating + skill = stewardship + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_decisions_event.0005.c.success + send_interface_toast = { + title = ep3_decisions_event.success + left_icon = root + custom_tooltip = ep3_decisions_event.c.tt + add_character_modifier = { + modifier = ep3_triumph_promised_prosperity_modifier + years = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_decisions_event.0005.a.failure + send_interface_toast = { + title = ep3_decisions_event.failure + left_icon = root + custom_tooltip = ep3_decisions_event.c.tt_no + } + } + } + add_character_flag = triumph_promised_prosperity + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + add = 50 + } + modifier = { + has_trait = diligent + add = 50 + } + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { + trigger_event = ep3_decisions_event.0007 + trigger_event = { + id = ep3_decisions_event.0006 + months = { 45 59 } + } + } +} + +# Follow-up, some years later +ep3_decisions_event.0006 = { + type = character_event + title = ep3_decisions_event.0006.t + desc = { + desc = ep3_decisions_event.0006.desc + first_valid = { + triggered_desc = { + trigger = { has_character_flag = triumph_promised_victories } + desc = ep3_decisions_event.0006.desc_victory + } + triggered_desc = { + trigger = { has_character_flag = triumph_promised_stability } + desc = ep3_decisions_event.0006.desc_stability + } + triggered_desc = { + trigger = { has_character_flag = triumph_promised_prosperity } + desc = ep3_decisions_event.0006.desc_prosperity + } + } + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = triumph_promise_kept + } + desc = ep3_decisions_event.0006.desc_yes + } + desc = ep3_decisions_event.0006.desc_no + } + } + theme = emperor + left_portrait = { + character = root + triggered_animation = { + trigger = { has_character_flag = triumph_promise_kept } + animation = happiness + } + triggered_animation = { + trigger = { NOT = { has_character_flag = triumph_promise_kept } } + animation = shame + } + } + right_portrait = { + character = scope:talker + animation = worry + } + + trigger = { + OR = { + has_character_flag = triumph_promised_prosperity + has_character_flag = triumph_promised_victories + has_character_flag = triumph_promised_stability + } + } + + immediate = { + random_memory = { + memory_type = byz_held_triumph + limit = { + memory_age_years < 5 + } + save_scope_as = triumph_memory + } + if = { + limit = { + has_character_flag = triumph_promised_victories + has_variable = ep3_valid_triumph_victory + } + add_character_flag = triumph_promise_kept + } + else_if = { + limit = { + has_character_flag = triumph_promised_stability + NOT = { + any_memory = { + memory_age_years < scope:triumph_memory.memory_age_years + OR = { + var:war_cb ?= flag:war_memory_cb_independence + var:war_cb ?= flag:war_memory_cb_tyranny + var:war_cb ?= flag:war_memory_cb_depose + var:war_cb ?= flag:war_memory_cb_fracture + } + } + } + } + add_character_flag = triumph_promise_kept + } + else_if = { + limit = { + has_character_flag = triumph_promised_prosperity + } + add_character_flag = triumph_promise_kept + } + if = { + limit = { + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + location = root.location + } + } + cp:councillor_steward = { save_scope_as = talker } + } + else_if = { + limit = { + any_courtier_or_guest = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + is_adult = yes + } + } + random_courtier_or_guest = { + limit = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + is_adult = yes + } + save_scope_as = talker + } + } + else = { + random_courtier_or_guest = { + limit = { is_adult = yes } #There should always be at least one to grab + save_scope_as = talker + } + } + } + + #Promise kept + option = { + name = ep3_decisions_event.0006.a + trigger = { has_character_flag = triumph_promise_kept } + change_influence = major_influence_gain + # The people believe in you + add_legitimacy = minor_legitimacy_gain + } + + #Promise not kept + option = { + name = ep3_decisions_event.0006.b + trigger = { NOT = { has_character_flag = triumph_promise_kept } } + change_influence = minor_influence_loss + # The people are disappointed + add_legitimacy = minor_legitimacy_loss + } + + after = { + remove_character_flag = triumph_promised_prosperity + remove_character_flag = triumph_promised_victories + remove_character_flag = triumph_promised_stability + remove_character_flag = triumph_promise_kept + } +} + +# Conclusion Event +ep3_decisions_event.0007 = { + type = character_event + window = fullscreen_event + title = ep3_decisions_event.0007.t + desc = { + desc = ep3_decisions_event.0007.desc + first_valid = { + triggered_desc = { + trigger = { has_character_flag = triumph_hagia_sophia } + desc = ep3_decisions_event.0007.hagia_sophia + } + desc = ep3_decisions_event.0007.hippodrome + } + } + theme = emperor + override_background = { reference = ep3_triumph } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_hold_triumph" + change_influence = major_influence_gain + } + + option = { + name = ep3_decisions_event.0007.a + custom_tooltip = ep3_decisions_event.0007.a.tt + } + + after = { + if = { + limit = { has_character_flag = triumph_hippodrome } + remove_character_flag = triumph_hippodrome + } + if = { + limit = { has_character_flag = triumph_hagia_sophia} + remove_character_flag = triumph_hagia_sophia + } + } +} + +############################################## +### Find a Charioteer +### by Chad Uhl +scripted_trigger mediocre_charioteer_trigger = { + can_be_employed_as = charioteer_court_position + is_available_healthy_ai_adult = yes + has_any_charioteer_trait = no + prowess >= 7 +} + +scripted_trigger good_charioteer_trigger = { + can_be_employed_as = charioteer_court_position + is_available_healthy_ai_adult = yes + has_any_charioteer_trait = yes + has_trait = education_martial + prowess >= 14 +} + +ep3_decisions_event.1000 = { + type = character_event + title = ep3_decisions_event.1000.t + desc = { + desc = ep3_decisions_event.1000.desc + triggered_desc = { + trigger = { exists = scope:stolen_charioteer } + desc = ep3_decisions_event.1000.desc.stolen_charioteer + } + } + theme = administrative + + left_portrait = { + character = scope:mediocre_charioteer + animation = happiness + } + right_portrait = { + character = scope:good_charioteer + animation = personality_honorable + } + lower_center_portrait = scope:stolen_charioteer + + immediate = { + # Find a mediocre one + if = { # check for a mediocre character in the pool + limit = { + any_pool_character = { + province = root.capital_province + mediocre_charioteer_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { mediocre_charioteer_trigger = yes } + save_scope_as = mediocre_charioteer + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = root_soldier_female_chance + age = { 16 30 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_martial_1 = {} + education_intrigue_1 = {} + education_intrigue_2 = {} + } + random_traits_list = { + count = 2 + ambitious = {} + arrogant = {} + deceitful = {} + diligent = {} + impatient = {} + honest = {} + brave = {} + lustful = {} + wrathful = {} + } + random_traits = yes + prowess = { + min_template_low_skill + max_template_average_skill + } + save_scope_as = mediocre_charioteer + } + } + + # Find a good one + if = { # check for a GOOD character in the pool + limit = { + any_pool_character = { + province = root.capital_province + good_charioteer_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { good_charioteer_trigger = yes } + save_scope_as = good_charioteer + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = root_soldier_female_chance + age = { 16 30 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_martial_1 = {} + education_martial_2 = {} + education_martial_3 = {} + } + random_traits_list = { + count = 2 + ambitious = {} + arrogant = {} + deceitful = {} + diligent = {} + impatient = {} + honest = {} + brave = {} + lustful = {} + wrathful = {} + } + random_traits = yes + prowess = { + min_template_decent_skill + max_template_decent_skill + } + save_scope_as = good_charioteer + } + hidden_effect = { + scope:good_charioteer = { + if = { + limit = { has_any_charioteer_trait = no } + random_list = { + 1 = { + add_trait = charioteer_green + add_trait_xp = { + trait = charioteer_green + value = 10 + } + } + 1 = { + add_trait = charioteer_blue + add_trait_xp = { + trait = charioteer_blue + value = 10 + } + } + 1 = { + add_trait = charioteer_white + add_trait_xp = { + trait = charioteer_white + value = 10 + } + } + 1 = { + add_trait = charioteer_red + add_trait_xp = { + trait = charioteer_red + value = 10 + } + } + } + } + } + } + } + + # Optional: Steal one from another character (only for human players) + if = { + limit = { is_ai = no } + } + top_liege = { + every_vassal_or_below = { + limit = { + employs_court_position = charioteer_court_position + is_ai = yes + } + court_position:charioteer_court_position = { + add_to_list = charioteers + } + } + } + if = { + limit = { list_size:charioteers >= 1 } + random_in_list = { + list = charioteers + save_scope_as = stolen_charioteer + } + } + + } + + option = { + name = ep3_decisions_event.1000.a + custom_tooltip = ep3_decisions_event.1000.a.aptitude + pay_treasury_or_gold = { + target = scope:mediocre_charioteer + value = low_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:mediocre_charioteer } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:mediocre_charioteer + COURT_POS = charioteer_court_position + } + } + appoint_court_position = { + recipient = scope:mediocre_charioteer + court_position = charioteer_court_position + } + } + else_if = { + limit = { + employs_court_position = charioteer_court_position + } + random_court_position_holder = { + type = charioteer_court_position + save_scope_as = current_charioteer + } + replace_court_position = { + recipient = scope:mediocre_charioteer + holder = scope:current_charioteer + court_position = charioteer_court_position + } + } + } + + option = { + name = ep3_decisions_event.1000.b + custom_tooltip = ep3_decisions_event.1000.b.aptitude + pay_treasury_or_gold = { + target = scope:good_charioteer + value = high_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:good_charioteer } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:good_charioteer + COURT_POS = charioteer_court_position + } + } + appoint_court_position = { + recipient = scope:good_charioteer + court_position = charioteer_court_position + } + } + else_if = { + limit = { + employs_court_position = charioteer_court_position + } + random_court_position_holder = { + type = charioteer_court_position + save_scope_as = current_charioteer + } + replace_court_position = { + recipient = scope:good_charioteer + holder = scope:current_charioteer + court_position = charioteer_court_position + } + } + } + + option = { + name = ep3_decisions_event.1000.c + custom_tooltip = ep3_decisions_event.1000.c.aptitude + trigger = { exists = scope:stolen_charioteer } + pay_treasury_or_gold = { + target = scope:stolen_charioteer + value = high_skill_court_physician_cost + } + change_influence = medium_influence_loss + hidden_effect = { add_courtier = scope:stolen_charioteer } + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:stolen_charioteer + COURT_POS = charioteer_court_position + } + } + appoint_court_position = { + recipient = scope:stolen_charioteer + court_position = charioteer_court_position + } + } + else_if = { + limit = { + employs_court_position = charioteer_court_position + } + random_court_position_holder = { + type = charioteer_court_position + save_scope_as = current_charioteer + } + replace_court_position = { + recipient = scope:stolen_charioteer + holder = scope:current_charioteer + court_position = charioteer_court_position + } + } + } + + option = { + name = ep3_decisions_event.1000.d + } +} + +############################################## +### Find a Bookmaker +### by Chad Uhl +scripted_trigger mediocre_bookmaker_trigger = { + can_be_employed_as = bookmaker_court_position + is_available_healthy_ai_adult = yes + stewardship >= 7 +} + +scripted_trigger good_bookmaker_trigger = { + can_be_employed_as = bookmaker_court_position + is_available_healthy_ai_adult = yes + stewardship >= 14 + has_trait = education_stewardship +} + +ep3_decisions_event.1010 = { + type = character_event + title = ep3_decisions_event.1010.t + desc = ep3_decisions_event.1010.desc + theme = administrative + + left_portrait = { + character = scope:mediocre_bookmaker + animation = happiness + } + right_portrait = { + character = scope:good_bookmaker + animation = personality_honorable + } + + immediate = { + # Find a mediocre one + if = { # check for a mediocre character in the pool + limit = { + any_pool_character = { + province = root.capital_province + mediocre_bookmaker_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { mediocre_bookmaker_trigger = yes } + save_scope_as = mediocre_bookmaker + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = root_soldier_female_chance + age = { 16 30 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_stewardship_1 = {} + education_intrigue_1 = {} + education_intrigue_2 = {} + } + random_traits = yes + stewardship = { + min_template_low_skill + max_template_average_skill + } + save_scope_as = mediocre_bookmaker + } + } + + # Find a good one + if = { # check for a GOOD character in the pool + limit = { + any_pool_character = { + province = root.capital_province + good_bookmaker_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { good_bookmaker_trigger = yes } + save_scope_as = good_bookmaker + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = root_soldier_female_chance + age = { 16 30 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_stewardship_1 = {} + education_stewardship_2 = {} + education_stewardship_3 = {} + } + random_traits = yes + stewardship = { + min_template_decent_skill + max_template_decent_skill + } + save_scope_as = good_bookmaker + } + } + } + + option = { + name = ep3_decisions_event.1010.a + custom_tooltip = ep3_decisions_event.1010.a.aptitude + pay_treasury_or_gold = { + target = scope:mediocre_bookmaker + value = low_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:mediocre_bookmaker } + court_position_grant_effect = { + CANDIDATE = scope:mediocre_bookmaker + POS = bookmaker + EMPLOYER = root + } + } + + option = { + name = ep3_decisions_event.1010.b + custom_tooltip = ep3_decisions_event.1010.b.aptitude + pay_treasury_or_gold = { + target = scope:good_bookmaker + value = high_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:good_bookmaker } + court_position_grant_effect = { + CANDIDATE = scope:good_bookmaker + POS = bookmaker + EMPLOYER = root + } + } + + option = { + name = ep3_decisions_event.1000.d + } +} + + + +############################################## +# Confirm Governorship +# directed by Joe Parkin +# based on the book by P. Homage +# +# 2001 -> Liege welcomes Governor +# 2002 -> Governor learns of rejection (end) +# 2010 -> Liege receives Governor +# 2011 -> Governor learns of result (end) +# 2080 -> Confirmation invalidated info +# 2090 -> Invalidation handling + +scripted_trigger admin_confirmation_valid_trigger = { # Confirmation is still valid + is_alive = yes + is_imprisoned = no + var:confirmation_liege_scope ?= { + is_alive = yes + is_imprisoned = no + } + liege ?= var:confirmation_liege_scope +} + +scripted_effect admin_confirmation_refuse_effect = { + scope:confirmation_vassal = { + change_influence = medium_influence_loss + add_opinion = { + modifier = refusal_opinion + target = scope:confirmation_liege + opinion = -20 + } + } +} + +scripted_effect admin_confirmation_clear_variable_effect = { + current_travel_plan ?= { + if = { + limit = { is_paused = yes } + resume_travel_plan = yes + } + } + # Vassal + if = { + limit = { has_variable = confirmation_cooldown_vassal } + remove_variable = confirmation_cooldown_vassal + } + # Liege + if = { + limit = { has_variable = confirmation_liege_scope } + remove_variable = confirmation_liege_scope + } +} + +ep3_decisions_event.2001 = { + type = letter_event + opening = ep3_decisions_event.2001.opening + sender = { + character = scope:confirmation_vassal + animation = throne_room_bow_1 + } + desc = ep3_decisions_event.2001.desc + + trigger = { + scope:confirmation_vassal = { + is_alive = yes + is_imprisoned = no + } + } + + on_trigger_fail = { + scope:confirmation_vassal = { + if = { + limit = { is_alive = no } + trigger_event = ep3_decisions_event.2090 + } + } + } + + option = { + name = ep3_decisions_event.2001.a + trigger = { + scope:confirmation_vassal = { admin_confirmation_valid_trigger = yes } + } + custom_tooltip = ep3_decisions_event.2001.a.tt + trigger_event = ep3_decisions_event.2010 + ai_chance = { base = 100 } + } + + option = { + name = ep3_decisions_event.2001.b + flavor = ep3_decisions_event.2001.b.tt + admin_confirmation_refuse_effect = yes + scope:confirmation_vassal = { + trigger_event = { on_action = admin_confirmation_invalid_on_action } + } + if = { + limit = { + NOT = { has_relation_rival = scope:confirmation_vassal } + } + stress_impact = { + arrogant = medium_stress_impact_gain + just = medium_stress_impact_gain + } + } + else = { + stress_impact = { base = medium_stress_impact_loss } + } + ai_chance = { + base = -4 + modifier = { + add = 5 + opinion = { + target = scope:confirmation_vassal + value < 0 + } + } + modifier = { + add = 45 + has_relation_rival = scope:confirmation_vassal + } + } + } +} + +ep3_decisions_event.2002 = { + type = letter_event + opening = ep3_decisions_event.2002.opening + desc = ep3_decisions_event.2002.desc + sender = scope:confirmation_liege + + trigger = { admin_confirmation_valid_trigger = yes } + + immediate = { + show_as_tooltip = { admin_confirmation_refuse_effect = yes } + } + + option = { + name = ep3_decisions_event.2002.a + } + + after = { admin_confirmation_clear_variable_effect = yes } +} + +scripted_effect admin_confirmation_liege_reward_effect = { + scope:confirmation_liege = { + if = { + limit = { has_royal_court = yes has_dlc_feature = royal_court } + change_current_court_grandeur = miniscule_court_grandeur_gain + } + add_prestige = minor_prestige_gain + change_influence = minor_influence_gain + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + } +} + +scripted_effect admin_confirmation_vassal_reward_effect = { + scope:confirmation_vassal = { admin_confirmation_vassal_reward_guts_effect = yes } + admin_confirmation_clear_variable_effect = yes +} + +# Liege receives Governor +ep3_decisions_event.2010 = { + type = character_event # to avoid too much in the court for ruler + title = ep3_decisions_event.2010.t + desc = { + desc = ep3_decisions_event.2010.desc + #What kind of theme is it? + first_valid = { + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_civilian + } + } + desc = ep3_decisions_event.2010.desc_theme_civilian + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_military + } + } + desc = ep3_decisions_event.2010.desc_theme_military + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_frontier + } + } + desc = ep3_decisions_event.2010.desc_theme_frontier + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_imperial + } + } + desc = ep3_decisions_event.2010.desc_theme_imperial + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_naval + } + } + desc = ep3_decisions_event.2010.desc_theme_naval + } + #Is small + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + OR = { + AND = { + highest_held_title_tier = tier_kingdom + sub_realm_size <= 5 + } + AND = { + highest_held_title_tier = tier_duchy + sub_realm_size <= 2 + } + AND = { + highest_held_title_tier <= tier_county + sub_realm_size <= 1 + } + } + } + } + desc = ep3_decisions_event.2010.desc_theme_small + } + #Is big + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + OR = { + AND = { + highest_held_title_tier = tier_kingdom + sub_realm_size >= 20 + } + AND = { + highest_held_title_tier <= tier_duchy + sub_realm_size >= 8 + } + } + } + } + desc = ep3_decisions_event.2010.desc_theme_big + } + + desc = ep3_decisions_event.2010.desc_theme_balanced + } + #Who lives there? + first_valid = { + #Friendly foreigners + triggered_desc = { + trigger = { + scope:confirmation_vassal.capital_county.culture = { + this != root.culture + cultural_acceptance = { + target = root.culture + value >= 30 + } + } + } + desc = ep3_decisions_event.2010.desc_cool_foreigners + } + #Weird foreigners + triggered_desc = { + trigger = { + scope:confirmation_vassal.capital_county.culture = { + this != root.culture + } + } + desc = ep3_decisions_event.2010.desc_weird_foreigners + } + #Same culture as emperor + desc = ep3_decisions_event.2010.desc_same_culture + } + #What faith are they? + first_valid = { + #State faith, but not emperor's faith + triggered_desc = { + trigger = { + faith != scope:confirmation_vassal.capital_county.faith + primary_title.state_faith = { + this = scope:confirmation_vassal.capital_county.faith + } + } + desc = ep3_decisions_event.2010.desc_state_faith + } + #Awful heretics + triggered_desc = { + trigger = { + faith != scope:confirmation_vassal.capital_county.faith + faith = { + faith_hostility_level = { + target = scope:confirmation_vassal.capital_county.faith + value >= faith_hostile_level + } + } + } + desc = ep3_decisions_event.2010.desc_heretic_faith + } + #Different faith,but alright + triggered_desc = { + trigger = { + faith != scope:confirmation_vassal.capital_county.faith + } + desc = ep3_decisions_event.2010.desc_accepted_faith + } + #Emperor's faith + desc = ep3_decisions_event.2010.desc_my_faith + } + #Does he like you? + random_valid = { + triggered_desc = { + trigger = { + #He hates you + scope:confirmation_vassal = { + opinion = { + target = root + value < -50 + } + } + } + desc = ep3_decisions_event.2010.desc_hate + } + triggered_desc = { + trigger = { + #He loves you + scope:confirmation_vassal = { + opinion = { + target = root + value > 50 + } + } + } + desc = ep3_decisions_event.2010.desc_love + } + triggered_desc = { + trigger = { + #He is old as shit and meh on you + scope:confirmation_vassal = { + age > 55 + health < fine_health + } + } + desc = ep3_decisions_event.2010.desc_decrepit + } + triggered_desc = { + trigger = { + #He is young as shit and meh on you + scope:confirmation_vassal = { + age < 25 + } + } + desc = ep3_decisions_event.2010.desc_young + } + triggered_desc = { + trigger = { + #He sucks at his job + scope:confirmation_vassal = { + governor_efficiency < 0.75 + } + } + desc = ep3_decisions_event.2010.desc_incompetent + } + triggered_desc = { + trigger = { + #He's great at his job' + scope:confirmation_vassal = { + governor_efficiency > 1.25 + } + } + desc = ep3_decisions_event.2010.desc_skilled + } + #He's just meh + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + NOR = { + opinion = { + target = root + value > 50 + } + opinion = { + target = root + value < -50 + } + AND = { + age > 55 + health < fine_health + } + age < 25 + governor_efficiency < 0.75 + governor_efficiency > 1.25 + } + } + } + desc = ep3_decisions_event.2010.desc_generic_outro + } + + } + } + theme = emperor + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_duty" } + + left_portrait = scope:confirmation_liege + right_portrait = { + character = scope:confirmation_vassal + animation = throne_room_bow_1 + } + + trigger = { + #is_available = yes + scope:confirmation_vassal = { + is_alive = yes + is_imprisoned = no + } + } + + immediate = { + save_opinion_value_as = { + name = opinion_of_petitioner + target = scope:confirmation_vassal + } + scope:confirmation_vassal = { + save_scope_as = second + assign_quirk_effect = yes + } + } + + + option = { + name = ep3_decisions_event.2010.a + show_as_tooltip = { + scope:confirmation_vassal = { + add_prestige = minor_prestige_gain + change_influence = medium_influence_gain + } + } + } + + after = { + admin_confirmation_liege_reward_effect = yes + scope:confirmation_vassal = { trigger_event = ep3_decisions_event.2011 } + } +} + +# Governor learns of result (end) +ep3_decisions_event.2011 = { + type = court_event + title = ep3_decisions_event.2010.t + desc = { + desc = ep3_decisions_event.2011.desc + #Is this administration a shitshow? + random_valid = { + triggered_desc = { + trigger = { + scope:confirmation_liege = { + age <= 20 + } + } + desc = ep3_decisions_event.2011.desc_child + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + faith = { + NOR = { + this = scope:confirmation_liege.primary_title.state_faith + this = scope:confirmation_liege.capital_county.faith + } + } + } + } + desc = ep3_decisions_event.2011.desc_heretic + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + is_at_war = yes + any_character_war = { + OR = { + AND = { + is_attacker = scope:confirmation_liege + attacker_war_score <= 60 + } + AND = { + is_defender = scope:confirmation_liege + defender_war_score <= 60 + } + } + } + } + } + desc = ep3_decisions_event.2011.desc_war + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + OR = { + AND = { + diplomacy < average_skill_rating + stewardship < average_skill_rating + martial < average_skill_rating + intrigue < average_skill_rating + learning < average_skill_rating + } + capital_county = { + county_control < 90 + } + legitimacy_level < 2 + } + } + } + desc = ep3_decisions_event.2011.desc_poorly_run + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + OR = { + AND = { + diplomacy >= average_skill_rating + stewardship >= average_skill_rating + martial >= average_skill_rating + intrigue >= average_skill_rating + learning >= average_skill_rating + } + AND = { + has_trait = governor + has_trait_xp = { + trait = governor + value >= 75 + } + + } + legitimacy_level >= 4 + } + } + } + desc = ep3_decisions_event.2011.desc_well_run + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + OR = { + AND = { + is_female = yes + has_realm_law = male_preference_law + } + AND = { + is_male = yes + has_realm_law = female_preference_law + } + } + legitimacy_level < 5 + } + } + desc = ep3_decisions_event.2011.desc_gender + } + desc = ep3_decisions_event.2011.desc_typical_palace + } + #What does emperor think of you? + first_valid = { + #Loathes you + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:confirmation_liege + value < -50 + } + } + desc = ep3_decisions_event.2011.desc_hate + } + #Loves you + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:confirmation_liege + value > 50 + } + } + desc = ep3_decisions_event.2011.desc_love + } + #meh + desc = ep3_decisions_event.2011.desc_meh + } + #What kind of theme do you have? + first_valid = { + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_civilian + } + } + desc = ep3_decisions_event.2011.desc_theme_civilian + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_military + } + } + desc = ep3_decisions_event.2011.desc_theme_military + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_frontier + } + } + desc = ep3_decisions_event.2011.desc_theme_frontier + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_imperial + } + } + desc = ep3_decisions_event.2011.desc_theme_imperial + } + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + vassal_contract_has_flag = admin_theme_naval + } + } + desc = ep3_decisions_event.2011.desc_theme_naval + } + #Is small + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + OR = { + AND = { + highest_held_title_tier = tier_kingdom + sub_realm_size <= 5 + } + AND = { + highest_held_title_tier = tier_duchy + sub_realm_size <= 2 + } + AND = { + highest_held_title_tier <= tier_county + sub_realm_size <= 1 + } + } + } + } + desc = ep3_decisions_event.2011.desc_theme_small + } + #Is big + triggered_desc = { + trigger = { + scope:confirmation_vassal = { + OR = { + AND = { + highest_held_title_tier = tier_kingdom + sub_realm_size >= 20 + } + AND = { + highest_held_title_tier <= tier_duchy + sub_realm_size >= 8 + } + } + } + } + desc = ep3_decisions_event.2011.desc_theme_big + } + desc = ep3_decisions_event.2011.desc_theme_balanced + } + desc = ep3_decisions_event.2011.desc_outro + } + theme = administrative + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_duty" } + court_scene = { + button_position_character = scope:confirmation_liege + court_owner = scope:confirmation_liege + show_timeout_info = no + roles = { + scope:confirmation_vassal = { + group = petitioners_group + animation = throne_room_bow_1 + } + } + } + + trigger = { admin_confirmation_valid_trigger = yes } + + immediate = { + scope:confirmation_liege = { + save_scope_as = second + assign_quirk_effect = yes + if = { + limit = { has_royal_court = yes } + open_view_data = { + view = royal_court + secondary_actor = scope:confirmation_vassal + player = scope:confirmation_vassal + } + } + } + } + + + option = { + name = ep3_decisions_event.2011.a + } + + after = { + admin_confirmation_vassal_reward_effect = yes + if = { + limit = { + scope:confirmation_liege = { has_royal_court = yes } + } + close_view = { + view = royal_court + player = scope:confirmation_vassal + } + } + } +} + +#Confirmation no longer available +ep3_decisions_event.2080 = { + type = character_event + title = ep3_decisions_event.2080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + NOT = { government_allows = administrative } + primary_title.tier = scope:confirmation_liege.primary_title.tier + } + } + desc = ep3_decisions_event.2080.desc.court + } + triggered_desc = { + trigger = { is_imprisoned = yes } + desc = ep3_decisions_event.2080.desc.imprisoned + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + is_alive = no + killer ?= root + } + } + desc = ep3_decisions_event.2080.desc.liege_dead_me + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { is_alive = no } + } + desc = ep3_decisions_event.2080.desc.liege_dead + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { + is_imprisoned = yes + imprisoner ?= root + } + } + desc = ep3_decisions_event.2080.desc.liege_imprisoned_me + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { is_imprisoned = yes } + } + desc = ep3_decisions_event.2080.desc.liege_imprisoned + } + } + triggered_desc = { + trigger = { + exists = liege + NOR = { + liege = root + liege = scope:confirmation_liege + } + AND = { # Of the Emperor + top_liege ?= { highest_held_title_tier = tier_empire } + government_allows = administrative + liege ?= top_liege + } + } + desc = ep3_decisions_event.2080.desc.new_liege + } + triggered_desc = { + trigger = { + scope:confirmation_liege = { is_alive = yes } + exists = liege + liege != root + } + desc = ep3_decisions_event.2080.desc + } + } + theme = administrative + left_portrait = { + character = scope:confirmation_liege + triggered_animation = { + trigger = { is_imprisoned = yes } + animation = prisondungeon + } + triggered_animation = { + trigger = { is_alive = no } + animation = idle + } + triggered_animation = { + trigger = { is_available = no } + animation = dismissal + } + } + right_portrait = { + character = liege + trigger = { + liege != scope:confirmation_liege + } + } + + trigger = { admin_confirmation_valid_trigger = no } + + immediate = { + # Transfer the variable to a scope for loc & such. + var:homage_liege_scope ?= { save_scope_as = homage_liege } + } + + option = { + name = { + text = ep3_decisions_event.2080.a_court + trigger = { has_royal_court = yes } + } + name = { + text = ep3_decisions_event.2080.a_prison + trigger = { is_imprisoned = yes } + } + name = { + text = ep3_decisions_event.2080.a_liege + trigger = { + scope:confirmation_liege = { + is_alive = yes + is_imprisoned = no + } + } + } + name = { + text = ep3_decisions_event.2080.a + trigger = { always = yes } + } + } + + after = { admin_confirmation_clear_variable_effect = yes } +} + +# Invalidation handling +ep3_decisions_event.2090 = { + hidden = yes + immediate = { + if = { + limit = { + scope:confirmation_liege = { + OR = { + is_alive = no + is_imprisoned = yes + is_travelling = yes + } + } + } + send_interface_toast = { + title = admin_confirmation_costs_refunded + left_icon = root + if = { # Remove variable preventing you + limit = { has_variable = confirmation_grace } + remove_variable = confirmation_grace + } + # Refund any costs + add_prestige = standard_activity_cost + } + trigger_event = ep3_decisions_event.2080 + } + else = { + scope:confirmation_liege = { trigger_event = ep3_decisions_event.2001 } + } + current_travel_plan ?= { + delay_travel_plan = { days = 90 } + } + } +} + + +######################################################### +### Restore Backwater Greek Counties Decision Events +### by Chad Uhl + +# Event for the Governor when they've completely removed the backwater modifiers +ep3_decisions_event.3000 = { + type = letter_event + opening = ep3_decisions_event.3001.opening + desc = ep3_decisions_event.3000.desc + sender = top_liege + + immediate = { + show_as_tooltip = { + every_sub_realm_county = { + limit = { + title_province = { + geographical_region = greek_backwater_modifier_region + } + } + remove_county_modifier = backwater_county_modifier + } + } + } + + option = { + name = ep3_decisions_event.3000.a + # Big influence gain + change_influence = massive_influence_gain + # Modifier to improve Stewardship, which in turn improves Governor Efficiency + add_character_modifier = { + modifier = restored_greek_theme_modifier + } + # Let the player know that they are getting boosted governor efficiency + custom_tooltip = restored_greek_theme_gov_efficiency_tt + # Improve relationship with the emperor + reverse_add_opinion = { + target = liege + modifier = impressed_opinion + opinion = 20 + } + } +} + +# Event for the emperor when all the counties of Greece have been rid of the backwater modifier +ep3_decisions_event.3001 = { + type = character_event + title = ep3_decisions_event.3001.t + desc = ep3_decisions_event.3001.desc + theme = emperor + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:interlocutor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + + trigger = { + any_sub_realm_county = { + title_province = { geographical_region = greek_backwater_modifier_region } + } + any_sub_realm_county = { + count = 0 + title_province = { + geographical_region = greek_backwater_modifier_region + } + has_county_modifier = backwater_county_modifier + } + } + + # If the emperor isn't valid for this event yet, check next year + on_trigger_fail = { + if = { # If the emperor no longer holds any county in this region, then we remove all the modifiers and just call it quits + limit = { + any_sub_realm_county = { + count = 0 + title_province = { + geographical_region = greek_backwater_modifier_region + } + } + } + every_county_in_region = { + region = greek_backwater_modifier_region + limit = { + has_county_modifier = backwater_county_modifier + } + remove_county_modifier = backwater_county_modifier + } + } + else = { # If the emperor still holds counties in Greece, we will check all this again in a year to see the status + trigger_event = { + id = ep3_decisions_event.3001 + years = 1 + } + } + } + + immediate = { + # Find an interlocutor + if = { + limit = { exists = cp:councillor_steward } + cp:councillor_steward = { save_scope_as = interlocutor } + } + else_if = { + limit = { exists = cp:councillor_chancellor } + cp:councillor_chancellor = { save_scope_as = interlocutor } + } + else_if = { + limit = { + any_councillor = { } + } + random_councillor = { + save_scope_as = interlocutor + } + } + else = { + ordered_vassal = { + order_by = stewardship + save_scope_as = interlocutor + } + } + + # Create the tooltip showing that all the modifiers have been removed + show_as_tooltip = { + custom_tooltip = { + text = every_county_in_greece_tt + every_county_in_region = { + region = greek_backwater_modifier_region + limit = { + holder = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + remove_county_modifier = backwater_county_modifier + } + } + } + } + + option = { # Celebrate the Empire's wealth and abundance + name = ep3_decisions_event.3001.a + add_legitimacy = minor_legitimacy_gain + change_influence = major_influence_gain + } +} + + +######################################################### +### Prepare Greek Fire Dromons +### by Jason Cantalini + +# Event for the holder of constantinople when they opt into the decision +ep3_decisions_event.3100 = { + type = character_event + title = ep3_decisions_event.3100.t + desc = ep3_decisions_event.3100.desc + theme = war + override_background = { reference = docks } + + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:aide + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + + immediate = { + # Find an interlocutor + if = { + limit = { exists = cp:councillor_marshal } + cp:councillor_steward = { save_scope_as = aide } + } + else_if = { + limit = { exists = cp:councillor_steward } + cp:councillor_chancellor = { save_scope_as = aide } + } + else_if = { + limit = { + any_councillor = { } + } + random_councillor = { + save_scope_as = aide + } + } + else_if = { + limit = { + vassal_count >= 1 + } + ordered_vassal = { + order_by = martial + save_scope_as = aide + } + } + else_if = { + limit = { + any_courtier = { + is_alive = yes + } + } + ordered_courtier = { + order_by = martial + save_scope_as = aide + } + } + else = { + random_pool_character = { + province = root.capital_province + limit = { + is_adult = yes + } + save_scope_as = aide + } + } + } + + option = { #Use the city's native capabilities to produce what's needed + name = ep3_decisions_event.3100.a + trigger = { + influence >= major_influence_value + } + show_as_unavailable = { influence < massive_influence_value } + save_scope_as = actor + add_character_flag = { + flag = took_greek_fire_decision_flag + years = 10 + } + begin_scheme_with_agents_effect = { + SCHEME_TYPE = prepare_fire_dromons_scheme + TARGET_TYPE = target_title + TARGET_SCOPE = root.capital_county + # Success. + AGENT_1 = agent_alchemist + AGENT_2 = agent_draughtsman + # Speed. + AGENT_3 = agent_drillmaster + AGENT_4 = agent_supplier + AGENT_5 = agent_bureaucrat_title + } + custom_tooltip = defensive_fire_dromons_success_tooltip + custom_tooltip = defensive_fire_dromons_custom_desc + custom_tooltip = defensive_fire_dromons_buildings_desc + change_influence = major_influence_loss + + stress_impact = { + compassionate = medium_stress_impact_gain + calm = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + } + modifier = { + factor = 0 + influence < massive_influence_value + } + modifier = { + factor = 0 + } + } + } + option = { #Have the latins manufacture ships + name = ep3_decisions_event.3100.b + trigger = { + treasury >= major_gold_value_static_max + } + show_as_unavailable = { treasury < massive_gold_value_static_max } + save_scope_as = actor + add_character_flag = { + flag = took_greek_fire_decision_flag + years = 10 + } + begin_scheme_with_agents_effect = { + SCHEME_TYPE = prepare_fire_dromons_scheme + TARGET_TYPE = target_title + TARGET_SCOPE = root.capital_county + # Success. + AGENT_1 = agent_alchemist + AGENT_2 = agent_draughtsman + # Speed. + AGENT_3 = agent_drillmaster + AGENT_4 = agent_supplier + AGENT_5 = agent_bureaucrat_title + } + custom_tooltip = defensive_fire_dromons_success_tooltip + custom_tooltip = defensive_fire_dromons_custom_desc + custom_tooltip = defensive_fire_dromons_buildings_desc + remove_treasury_or_gold = major_gold_value_static_max + + stress_impact = { + compassionate = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + calm = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + factor = 0 + treasury < massive_gold_value_static_max + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = paranoid + } + } + } + } + option = { #Actually... never mind + name = ep3_decisions_event.3100.c + remove_decision_cooldown = prepare_greek_fire_dromons_decision + stress_impact = { + sadistic = minor_stress_impact_gain + callous = miniscule_stress_impact_gain + ambitious = miniscule_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = compassionate + has_trait = calm + has_trait = content + } + } + } + } +} + + +######################################################### +### Mass Arrests Decision Events +### by Chad Uhl + +#ep3_decisions_event.3200 = { +# type = character_event +# title = ep3_decisions_event.3200.t +# desc = ep3_decisions_event.3200.desc +# theme = emperor +# +# left_portrait = { +# character = scope:pf_1.house_head +# animation = spymaster +# } +# right_portrait = { +# character = scope:pf_2.house_head +# animation = scheme +# } +# lower_left_portrait = scope:pf_3.house_head +# lower_center_portrait = scope:pf_4.house_head +# lower_right_portrait = scope:pf_5.house_head +# +# immediate = { +# every_powerful_family = { +# limit = { NOT = { root.house ?= this } } +# add_to_list = powerful_families +# } +# ordered_powerful_family = { +# limit = { +# NOR = { +# root.house ?= this +# scope:pf_1 ?= this +# scope:pf_2 ?= this +# scope:pf_3 ?= this +# scope:pf_4 ?= this +# scope:pf_5 ?= this +# } +# } +# order_by = house_power_score +# max = 5 +# check_range_bounds = no +# +# if = { +# limit = { +# exists = scope:pf_4 +# list_size:powerful_families >= 5 +# } +# save_scope_as = pf_5 +# } +# else_if = { +# limit = { +# exists = scope:pf_3 +# list_size:powerful_families >= 4 +# } +# save_scope_as = pf_4 +# } +# else_if = { +# limit = { +# exists = scope:pf_2 +# list_size:powerful_families >= 3 +# } +# save_scope_as = pf_3 +# } +# else_if = { +# limit = { +# exists = scope:pf_1 +# list_size:powerful_families >= 2 +# } +# save_scope_as = pf_2 +# } +# else = { +# save_scope_as = pf_1 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.a +# trigger = { exists = scope:pf_1 } +# highlight_portrait = scope:pf_1.house_head +# scope:pf_1 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_1.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 50 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_1.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_1.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_1.house_head +# add = 50 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.b +# trigger = { exists = scope:pf_2 } +# highlight_portrait = scope:pf_2.house_head +# scope:pf_2 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_2.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 40 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_2.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_2.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_2.house_head +# add = 50 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.c +# trigger = { exists = scope:pf_3 } +# highlight_portrait = scope:pf_3.house_head +# scope:pf_3 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_3.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 30 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_3.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_3.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_3.house_head +# add = 50 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.d +# trigger = { exists = scope:pf_4 } +# highlight_portrait = scope:pf_4.house_head +# scope:pf_4 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_4.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 20 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_4.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_4.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_4.house_head +# add = 50 +# } +# } +# } +# +# option = { +# name = ep3_decisions_event.3200.e +# trigger = { exists = scope:pf_5 } +# highlight_portrait = scope:pf_5.house_head +# scope:pf_5 = { 3200_house_member_effect = yes } +# add_legitimacy = medium_legitimacy_loss +# add_tyranny = massive_tyranny_gain +# +# if = { +# limit = { scope:pf_5.house_head = { is_ai = yes } } +# trigger_event = { +# id = ep3_decisions_event.3201 +# days = 5 +# } +# } +# +# ai_chance = { +# base = 10 +# modifier = { +# has_any_good_relationship_with_character_trigger = { CHARACTER = scope:pf_5.house_head } +# factor = 0 +# } +# modifier = { +# has_relation_nemesis = scope:pf_5.house_head +# add = 100 +# } +# modifier = { +# has_relation_rival = scope:pf_5.house_head +# add = 50 +# } +# } +# } +# +# option = { # I changed my mind +# name = ep3_decisions_event.3200.f +# remove_decision_cooldown = mass_arrests_decision +# } +#} + +# House head begs for release +ep3_decisions_event.3201 = { + type = character_event + title = ep3_decisions_event.3201.t + desc = ep3_decisions_event.3201.desc + theme = emperor + + left_portrait = { + character = scope:imprisoned_house_head + animation = prisonhouse + override_imprisonment_visuals = yes + } + right_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + trigger = { + scope:imprisoned_house_head = { + is_alive = yes + is_imprisoned_by = root + } + } + + option = { # Release Them + name = ep3_decisions_event.3201.a + scope:imprisoned_house_head = { + release_from_prison = yes + } + if = { + limit = { + can_add_hook = { + target = scope:imprisoned_house_head + type = liege_favour_strong_hook + } + } + add_hook = { + target = scope:imprisoned_house_head + type = liege_favour_strong_hook + } + } + + scope:imprisoned_house_head = { + if = { + limit = { + NOR = { + # Cannot have any of these traits + has_trait = vengeful + has_trait = wrathful + has_trait = ambitious + + # And not already be loyal + has_trait = loyal + + # And not be a rival + NOT = { has_relation_rival = root } + } + is_ai = yes + } + random = { + chance = { + value = 15 + if = { + limit = { + has_trait = craven + } + add = 15 + } + if = { + limit = { + has_trait = content + } + add = 10 + } + if = { + limit = { + has_trait = forgiving + } + add = 5 + } + if = { + limit = { + has_trait = honest + } + add = 5 + } + if = { + limit = { + has_trait = trusting + } + add = 5 + } + } + add_trait = loyal + } + } + } + + ai_chance = { + base = 50 + modifier = { + has_trait = vengeful + factor = 0 + } + modifier = { + OR = { + has_trait = forgiving + has_trait = trusting + } + factor = 2 + } + } + } + + option = { # No + name = ep3_decisions_event.3201.b + add_dread = medium_dread_gain + + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = forgiving + has_trait = trusting + } + factor = 0 + } + } + } +} + + +######################################################### +### Re-establish the original Eastern Empire +### by Claudia Baldassi + +ep3_decisions_event.4000 = { + type = character_event + title = ep3_decisions_event.4000.t + desc = ep3_decisions_event.4000.desc + theme = emperor + override_background = { reference = ep3_hippodrome_track } + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_hold_triumph" + retake_eastern_provinces_decision_effect = yes + create_character_memory = { + type = byz_theodosian_border_memory + } + } + + option = { + name = ep3_decisions_event.4000.a + } +} + +scripted_effect send_help_from_called_effect = { + scope:caller = { + pay_treasury_or_gold = { + target = scope:called + value = major_treasury_or_gold_value + } + spawn_army = { + levies = 4000 + men_at_arms = { + type = conrois + men = 500 + } + location = scope:caller.capital_province + origin = scope:called.capital_province + war = scope:our_war + name = ep3_religious_volunteers_army + } + } + scope:called = { + add_character_modifier = { + modifier = ep3_sent_help_to_east_modifier + years = 10 + } + } +} + +#Ask an ally for war help +ep3_decisions_event.4010 = { + type = letter_event + opening = ep3_decisions_event.4010.t + desc = ep3_decisions_event.4010.desc + sender = scope:caller + + immediate = { + save_scope_as = called + faith.religious_head = { save_scope_as = pope } + } + + #Option A: we will help + option = { + name = ep3_decisions_event.4010.a + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4015 + days = 2 + } + } + show_as_tooltip = { + send_help_from_called_effect = yes + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.5 + } + } + } + #Option B: ask the pope + option = { + name = ep3_decisions_event.4010.b + flavor = ep3_decisions_event.4010.b.tt_2 + save_scope_as = sponsor + scope:pope = { + trigger_event = { + id = ep3_decisions_event.4012 + days = 2 + } + } + scope:caller = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.b.tt + left_icon = root + right_icon = scope:pope + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:pope + multiplier = 1 + } + opinion_modifier = { + who = scope:pope + opinion_target = root + multiplier = 2 + } + } + } + #Option C: no + option = { + name = ep3_decisions_event.4010.c + scope:caller = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.c.tt + left_icon = scope:called + } + } + ai_chance = { + base = 25 + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = -2 + } + } + } +} + +scripted_trigger ask_help_valid_for_crusades_trigger = { +# There is in the world a christian faith with crusades and a HoF to call them (mainly Catholic) + religion:christianity_religion = { + exists = var:variable_ghw_unlocked + NOT = { exists = var:variable_first_ghw_cooldown } + } + scope:pope = { + is_imprisoned = no + faith = { + has_doctrine_parameter = great_holy_wars_active + fervor >= 60 + } + } +} + +#Ask the pope +ep3_decisions_event.4011 = { + type = letter_event + opening = ep3_decisions_event.4010.t + desc = ep3_decisions_event.4010.desc + sender = scope:caller + + immediate = { + save_scope_as = called + save_scope_as = pope + } + + #Option A: send help + option = { + name = ep3_decisions_event.4010.a + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4015 + days = 2 + } + } + show_as_tooltip = { + send_help_from_called_effect = yes + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 0.5 + } + } + } + #Option B: call crusade + option = { + name = ep3_decisions_event.4011.b + trigger = { + faith = { + NOT = { exists = great_holy_war } + } + ask_help_valid_for_crusades_trigger = yes + } + if = { + limit = { + faith = { + fervor >= 60 + fervor < 75 + } + } + faith = { + change_fervor = { + value = minor_fervor_value + desc = called_for_help_fervor + } + } + } + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4013 + days = 3 + } + } + ai_chance = { + base = 100 + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = 2 + } + ai_value_modifier = { + ai_zeal = 2 + } + } + } + #Option C: no + option = { + name = ep3_decisions_event.4011.c + scope:caller = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.c.tt + left_icon = scope:called + } + } + ai_chance = { + base = 25 + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = -2 + } + } + } +} + +#The ally asks the pope +ep3_decisions_event.4012 = { + type = letter_event + opening = ep3_decisions_event.4012.t + desc = ep3_decisions_event.4012.desc + sender = scope:sponsor + + immediate = { + save_scope_as = called + save_scope_as = pope + } + + #Option A: send help + option = { + name = ep3_decisions_event.4012.a + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4015 + days = 2 + } + } + scope:sponsor = { + send_interface_toast = { + title = ep3_decisions_event.4012.a.tt + left_icon = scope:pope + right_icon = scope:caller + show_as_tooltip = { + send_help_from_called_effect = yes + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:sponsor + multiplier = 1 + } + } + } + #Option B: call crusade + option = { + name = ep3_decisions_event.4012.b + trigger = { + faith = { + NOT = { exists = great_holy_war } + } + ask_help_valid_for_crusades_trigger = yes + } + if = { + limit = { + faith = { + fervor >= 60 + fervor < 75 + } + } + faith = { + change_fervor = { + value = minor_fervor_value + desc = called_for_help_fervor + } + } + } + scope:caller = { + trigger_event = { + id = ep3_decisions_event.4013 + days = 3 + } + } + scope:sponsor = { + send_interface_toast = { + title = ep3_decisions_event.4012.b.tt + left_icon = scope:pope + right_icon = scope:caller + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + } + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = 1 + } + opinion_modifier = { + who = root + opinion_target = scope:sponsor + multiplier = 2 + } + } + } + #Option C: no + option = { + name = ep3_decisions_event.4011.c + scope:caller = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.c.tt + left_icon = scope:called + } + } + scope:sponsor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4010.c.tt + left_icon = scope:called + } + } + ai_chance = { + base = 25 + opinion_modifier = { + who = root + opinion_target = scope:caller + multiplier = -1 + } + opinion_modifier = { + who = root + opinion_target = scope:sponsor + multiplier = -2 + } + } + } +} + +#The pope asks for support for a crusade +ep3_decisions_event.4013 = { + type = letter_event + opening = ep3_decisions_event.4013.t + desc = ep3_decisions_event.4013.desc + sender = scope:pope + + #Option A: pledge to send money + option = { + name = ep3_decisions_event.4013.a + custom_tooltip = ep3_decisions_event.4013.a.tt + add_character_flag = pledged_money_to_crusade_support + create_character_memory = { + type = western_help_pope + participants = { pope = scope:pope enemy = scope:enemy } + } + scope:pope = { + trigger_event = { + id = ep3_decisions_event.4014 + days = 3 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 1 + ai_greed = -0.5 + } + modifier = { + scope:our_war = { + is_defender = root + attacker_war_score > 30 + } + add = 50 + } + modifier = { + scope:our_war = { + is_defender = root + attacker_war_score > 60 + } + add = 100 + } + modifier = { + scope:our_war = { + is_attacker = root + defender_war_score > 30 + } + add = 50 + } + modifier = { + scope:our_war = { + is_attacker = root + defender_war_score > 60 + } + add = 100 + } + modifier = { + factor = 0 + gold <= massive_gold_value + } + } + } + #Option B: nevermind then + option = { + name = ep3_decisions_event.4013.b + scope:pope = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4013.b.tt + left_icon = scope:caller + } + } + scope:sponsor ?= { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4013.b.tt + left_icon = scope:caller + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + +scripted_effect ask_help_crusade_setup_effect = { + great_holy_war = { + set_war_declarer = scope:ghw_sponsor + if = { + limit = { is_directed_ghw = no } + undirected_ghw_recipient_selection_effect = yes + } + } + if = { + limit = { scope:ghw_sponsor.gold > 0 } + great_holy_war = { + change_war_chest_gold = { + value = scope:ghw_sponsor.gold + divide = 2 + max = 5000 + } + } + scope:ghw_sponsor = { + remove_short_term_gold = { + value = gold + divide = 2 + max = 5000 + } + } + } + great_holy_war = { + pledge_attacker = scope:ghw_sponsor + set_variable = { + name = redirect_cost + value = 500 + } + } + #If no Claimant or Title Holder is available to be the Papal choice and the Crusade has not proceeded far enough to have a favoritebeneficiary, select a fallback Recipient so that the CB's tooltip does not appear incomplete. + if = { #Random Courtier in the Pope's court. + limit = { + NOT = { exists = faith.great_holy_war.ghw_title_recipient } + exists = scope:ghw_sponsor + exists = scope:the_faith.great_holy_war + scope:ghw_sponsor = { + any_courtier = { + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + } + } + scope:ghw_sponsor = { + random_courtier = { + alternative_limit = { + scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } + is_male = yes + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + alternative_limit = { + scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } + is_female = yes + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + limit = { + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + save_scope_as = fallback_recipient + add_character_flag = flag_is_ghw_fallback_recipient + } + } + } + else_if = { #Else Generate a fallback recipient. + limit = { + NOT = { exists = faith.great_holy_war.ghw_title_recipient } + } + create_character = { + location = scope:ghw_sponsor.capital_province + template = new_commander_character + faith = scope:the_faith + culture = scope:ghw_sponsor.culture + save_scope_as = fallback_recipient + gender_female_chance = { + if = { + limit = { + scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { + add = 50 + } + } + } + scope:fallback_recipient = { add_character_flag = flag_is_ghw_fallback_recipient } + } + great_holy_war = { + set_variable = { + name = var_fallback_recipient + value = scope:fallback_recipient + } + } + every_player = { #Inform players + limit = { + faith = scope:the_faith + highest_held_title_tier >= tier_county + this != scope:ghw_sponsor + } + trigger_event = great_holy_war.0003 #Send event immediately for player, then delay it for all the AIs. + } + every_player = { #Inform defending players + limit = { + OR = { + faith = scope:target_faith #All infidels. + any_liege_or_above = { + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + AND = { + faith != scope:the_faith + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + } + } + trigger_event = great_holy_war.0050 + } + #Attackers Pledge to the Crusade. (AI only) + every_faith_ruler = { + limit = { + is_ai = yes + is_landed = yes + highest_held_title_tier >= tier_county + NOR = { + this = scope:ghw_sponsor + scope:the_faith.great_holy_war = { has_pledged_attacker = prev } + target_is_liege_or_above = scope:target_character + } + } + trigger_event = { + #AI pledging. There is a chance the AI might pledge after the Crusade starts, but it's a lot less likely. + id = great_holy_war.0020 + days = { 50 450 } + } + } + every_faith_holy_order = { + trigger_event = { + #Holy orders always join + id = great_holy_war.0090 + days = { 30 60 } + } + } + #Defenders Pledge to the Crusade. (AI only) + scope:target_character = { + religion = { + every_faith = { + every_faith_ruler = { + limit = { + is_ai = yes + is_landed = yes + highest_held_title_tier >= tier_county + NOT = { + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + } + trigger_event = { + #AI counterpledging. Unlike attackers, defenders should be selected much faster during the preparation phase and then stop. + id = great_holy_war.0021 + days = { 25 150 } + } + } + } + } + faith = { + every_faith_holy_order = { + trigger_event = { + # Holy orders always join + id = great_holy_war.0091 + days = { 30 60 } + } + } + } + } +} + +#Responded yes to the pope +ep3_decisions_event.4014 = { + type = letter_event + opening = ep3_decisions_event.4010.t + desc = ep3_decisions_event.4014.desc + sender = scope:caller + + #Option A: unleash the crusade! + option = { + name = ep3_decisions_event.4014.a + faith = { save_scope_as = the_faith } + save_scope_as = ghw_sponsor + scope:enemy = { save_scope_as = target_character } + # Launch the preparation phase + faith = { + start_great_holy_war = { + target_character = scope:target_character + target_title = scope:target_kingdom + delay = { 365 545 } + } + } + scope:target_character.faith = { save_scope_as = target_faith } + faith = { ask_help_crusade_setup_effect = yes } + if = { + limit = { + scope:caller = { + has_character_flag = pledged_money_to_crusade_support + } + } + scope:caller = { + send_interface_toast = { + title = ep3_decisions_event.4014.a.tt + left_icon = scope:ghw_sponsor + remove_treasury_or_gold = massive_treasury_or_gold_value + scope:ghw_sponsor.faith.great_holy_war = { + change_war_chest_gold = { + value = scope:caller.massive_gold_value + } + } + } + } + } + } + after = { + scope:caller = { remove_character_flag = pledged_money_to_crusade_support } + } +} + +#Called offers help in exchange for something +ep3_decisions_event.4015 = { + type = letter_event + opening = ep3_decisions_event.4013.t + desc = ep3_decisions_event.4015.desc + sender = scope:called + + #Option A: accept + option = { + name = ep3_decisions_event.4015.a + scope:called = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4015.a.tt + left_icon = scope:caller + scope:caller = { + pay_treasury_or_gold = { + target = scope:called + value = major_treasury_or_gold_value + } + spawn_army = { + levies = 4000 + men_at_arms = { + type = conrois + men = 500 + } + location = scope:caller.capital_province + origin = scope:called.capital_province + war = scope:our_war + name = ep3_religious_volunteers_army + } + create_character_memory = { + type = western_help_ally + participants = { ally = scope:called enemy = scope:enemy } + } + } + add_character_modifier = { + modifier = ep3_sent_help_to_east_modifier + years = 10 + } + } + } + ai_chance = { + base = 100 + modifier = { + scope:our_war = { + is_defender = root + attacker_war_score > 30 + } + add = 50 + } + modifier = { + scope:our_war = { + is_defender = root + attacker_war_score > 60 + } + add = 100 + } + modifier = { + scope:our_war = { + is_attacker = root + defender_war_score > 30 + } + add = 50 + } + modifier = { + scope:our_war = { + is_attacker = root + defender_war_score > 60 + } + add = 100 + } + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + factor = 0 + treasury_or_gold <= major_treasury_or_gold_value + } + } + } + + #Option B: refuse + option = { + name = ep3_decisions_event.4015.b + scope:called = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.4013.b.tt + left_icon = scope:caller + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + + +ep3_decisions_event.4020 = { + type = character_event + title = ep3_decisions_event.4020.t + desc = ep3_decisions_event.4020.desc + theme = emperor + override_background = { reference = ep3_hagia_sophia } + + left_portrait = { + character = root + animation = prayer + } + right_portrait = { + character = scope:evangelizer + animation = wedding_priest + } + lower_right_portrait = scope:pagan + + immediate = { + if = { + limit = { + has_title = title:e_byzantium + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + valid_for_pagan_conversion_trigger = yes + } + save_scope_as = pagan + } + } + else = { + random_neighboring_and_across_water_realm_same_rank_owner = { + limit = { + valid_for_pagan_conversion_trigger = yes + } + save_scope_as = pagan + } + } + scope:pagan.primary_title = { save_scope_as = title_to_convert } + random_pool_character = { + province = root.location + limit = { + faith = root.faith + learning >= 18 + } + save_scope_as = evangelizer + } + if = { + limit = { + NOT = { exists = scope:evangelizer } + } + random_list = { + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_female } } } + create_character = { + location = root.location + name = "Kyrillos" + template = ep3_evangelizer_template + gender_female_chance = 0 + save_scope_as = evangelizer + } + } + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_female } } } + create_character = { + location = root.location + name = "Methodios" + template = ep3_evangelizer_template + gender_female_chance = 0 + save_scope_as = evangelizer + } + } + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_female } } } + create_character = { + location = root.location + name = "Konstantinos" + template = ep3_evangelizer_template + gender_female_chance = 0 + save_scope_as = evangelizer + } + } + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_female } } } + create_character = { + location = root.location + name = "Michael" + template = ep3_evangelizer_template + gender_female_chance = 0 + save_scope_as = evangelizer + } + } + 25 = { + trigger = { NOT = { root.faith = { has_doctrine_parameter = clergy_must_be_male } } } + create_character = { + location = root.location + template = ep3_evangelizer_template + gender_female_chance = 100 + save_scope_as = evangelizer + } + } + } + } + add_courtier = scope:evangelizer + save_scope_as = sender + location = { save_scope_as = starting_point } + } + + option = { + name = ep3_decisions_event.4020.a + custom_tooltip = ep3_decisions_event.4020.a.tt + scope:evangelizer = { + start_travel_plan = { + destination = scope:pagan.capital_province + on_arrival_event = ep3_decisions_event.4021 + on_arrival_destinations = all + return_trip = no # One way + } + } + } +} + +ep3_decisions_event.4021 = { + hidden = yes + + immediate = { + #scope:evangelizer = { set_location = { location = scope:pagan.capital_province stick_to_location = yes } } + scope:pagan = { add_visiting_courtier = scope:evangelizer } + if = { + limit = { + scope:pagan = { + OR = { + is_alive = no + is_landed = no + } + } + } + scope:title_to_convert.holder = { save_scope_as = pagan } + } + scope:pagan.faith = { save_scope_as = old_faith } + # Player event for scope:pagan + if = { + limit = { + scope:pagan = { is_ai = no } + } + scope:pagan = { + trigger_event = { + id = ep3_decisions_event.4022 + days = 1 + } + } + } + # AI event for the evangelizer + else = { + scope:evangelizer = { + trigger_event = { + id = ep3_decisions_event.4023 + days = 1 + } + } + } + } +} + +ep3_decisions_event.4022 = { + type = character_event + title = ep3_decisions_event.4020.t + desc = ep3_decisions_event.4022.desc + theme = emperor + + trigger = { + scope:evangelizer = { is_alive = yes } + } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:evangelizer + animation = wedding_priest + } + lower_right_portrait = scope:sender + + #Option A: hear them out + option = { + name = ep3_decisions_event.4022.a + create_character_memory = { + type = was_evangelized_memory + participants = { missionary = scope:evangelizer sender = scope:sender } + } + set_character_faith_with_conversion = scope:evangelizer.faith + custom_tooltip = ep3_decisions_event.4022.a.tt + custom_tooltip = negotiated_alliance_delay_tt + show_as_tooltip = { + create_alliance = { + target = scope:sender + allied_through_owner = scope:pagan + allied_through_target = scope:sender + } + scope:sender = { + add_opinion = { + target = scope:pagan + modifier = event_negotiated_alliance_opinion + } + } + } + scope:evangelizer = { + add_character_flag = success_conversion + } + scope:sender = { + create_character_memory = { + type = evangelized_memory + participants = { missionary = scope:evangelizer pagan = scope:pagan } + } + } + stress_impact = { + zealous = major_stress_impact_gain + content = major_stress_impact_gain + craven = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + + #Option C: no thanks with stab + option = { + name = ep3_decisions_event.4022.c + flavor = ep3_decisions_event.4022.c.tt + add_piety = major_piety_gain + scope:evangelizer = { + death = { + death_reason = death_execution + killer = root + } + } + scope:sender = { + trigger_event = { + id = ep3_decisions_event.4026 + days = 3 + } + } + scope:pagan = { + add_character_flag = do_not_disturb_preachers + } + scope:title_to_convert = { + set_variable = do_not_disturb_preachers + } + stress_impact = { + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + gregarious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + } + + #Option B: no thanks + option = { + name = ep3_decisions_event.4022.b + add_piety = medium_piety_gain + scope:evangelizer = { + add_character_flag = failed_conversion + } + } + + after = { + if = { + limit = { + scope:sender = { is_alive = yes } + scope:evangelizer = { is_alive = yes } + } + scope:evangelizer = { + start_travel_plan = { + destination = scope:sender.location + on_arrival_event = ep3_decisions_event.4024 + on_arrival_destinations = all + return_trip = no # One way + } + } + } + else_if = { + limit = { + scope:evangelizer = { is_alive = yes } + } + scope:evangelizer = { + start_travel_plan = { + destination = scope:starting_point + on_arrival_event = ep3_decisions_event.4024 + on_arrival_destinations = all + return_trip = no # One way + } + } + } + } +} + +ep3_decisions_event.4023 = { + type = character_event + title = ep3_decisions_event.4023.t + desc = ep3_decisions_event.4023.desc + theme = emperor + + trigger = { + scope:evangelizer = { is_alive = yes } + } + + left_portrait = { + character = root + animation = wedding_priest + } + right_portrait = { + character = scope:pagan + animation = thinking + } + lower_right_portrait = scope:sender + + immediate = { + scope:evangelizer = { + duel = { + skill = learning + target = scope:pagan + 50 = { # Convert + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:pagan = { + has_trait = fickle + } + add = 10 + } + modifier = { + scope:pagan = { + has_trait = craven + } + add = 10 + } + modifier = { + scope:pagan = { + has_trait = intellect_bad + } + add = 10 + } + scope:pagan = { + set_character_faith_with_conversion = scope:evangelizer.faith + create_character_memory = { + type = was_evangelized_memory + participants = { missionary = scope:evangelizer sender = scope:sender } + } + } + scope:sender = { + create_character_memory = { + type = evangelized_memory + participants = { missionary = scope:evangelizer pagan = scope:pagan } + } + } + show_as_tooltip = { + scope:pagan = { + create_alliance = { + target = scope:sender + allied_through_owner = scope:pagan + allied_through_target = scope:sender + } + } + scope:sender = { + add_opinion = { + target = scope:pagan + modifier = event_negotiated_alliance_opinion + } + } + } + scope:evangelizer = { + add_character_flag = success_conversion + } + } + 50 = { # Not convert + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:pagan = { + has_trait = theologian + } + add = 10 + } + modifier = { + scope:pagan = { + has_trait = stubborn + } + add = 10 + } + scope:pagan = { add_piety = medium_piety_gain } + scope:evangelizer = { + add_character_flag = failed_conversion + } + } + 5 = { # They _really_ don't wanna convert + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:pagan = { + has_trait = sadistic + } + add = 5 + } + modifier = { + scope:pagan = { + has_trait = callous + } + add = 5 + } + modifier = { + scope:pagan = { + has_trait = torturer + } + add = 5 + } + scope:pagan = { add_piety = major_piety_gain } + scope:evangelizer = { + death = { + death_reason = death_execution + killer = root + } + } + scope:sender = { + trigger_event = { + id = ep3_decisions_event.4026 + days = 3 + } + } + scope:pagan = { + add_character_flag = do_not_disturb_preachers + } + scope:title_to_convert = { + set_variable = do_not_disturb_preachers + } + } + } + } + } + + option = { + name = ep3_decisions_event.4023.a + } + + after = { + if = { + limit = { + scope:sender = { is_alive = yes } + scope:evangelizer = { is_alive = yes } + } + scope:evangelizer = { + start_travel_plan = { + destination = scope:sender.location + on_arrival_event = ep3_decisions_event.4024 + on_arrival_destinations = all + return_trip = no # One way + } + } + } + else_if = { + limit = { + scope:evangelizer = { is_alive = yes } + } + scope:evangelizer = { + start_travel_plan = { + destination = scope:starting_point + on_arrival_event = ep3_decisions_event.4024 + on_arrival_destinations = all + return_trip = no # One way + } + } + } + } +} + +ep3_decisions_event.4024 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:sender = { is_alive = yes } + } + scope:sender = { + save_scope_as = recipient + trigger_event = { + id = ep3_decisions_event.4025 + days = 1 + } + } + } + else = { + scope:starting_point.barony.holder.top_liege = { + save_scope_as = new_sender + save_scope_as = recipient + trigger_event = { + id = ep3_decisions_event.4025 + days = 1 + } + } + } + } +} + +ep3_decisions_event.4025 = { + type = character_event + title = ep3_decisions_event.4020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:new_sender + } + desc = ep3_decisions_event.4025.desc_new + } + desc = ep3_decisions_event.4025.desc_old + } + first_valid = { + triggered_desc = { + trigger = { + scope:evangelizer = { + has_character_flag = success_conversion + } + } + desc = ep3_decisions_event.4025.desc_success + } + desc = ep3_decisions_event.4025.desc_failure + } + } + theme = emperor + + left_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + scope:evangelizer = { has_character_flag = success_conversion } + } + animation = prayer + } + triggered_animation = { + trigger = { + scope:evangelizer = { has_character_flag = failed_conversion } + } + animation = disapproval + } + } + right_portrait = { + character = scope:evangelizer + animation = wedding_priest + } + lower_right_portrait = scope:pagan + + immediate = { + if = { + limit = { + scope:evangelizer = { + has_character_flag = success_conversion + } + } + show_as_tooltip = { + scope:pagan = { + set_character_faith_with_conversion = scope:evangelizer.faith + } + } + custom_tooltip = ep3_decisions_event.4025.a.tt + scope:pagan = { + create_alliance = { + target = scope:sender + allied_through_owner = scope:pagan + allied_through_target = scope:sender + } + } + scope:sender = { + add_opinion = { + target = scope:pagan + modifier = event_negotiated_alliance_opinion + } + } + gain_holy_legend_seed_tooltip_effect = yes + hidden_effect = { + legend_seed_great_deed_faith_effect = { + ANTAGONIST = scope:pagan + OLD_FAITH = scope:old_faith + } + } + } + } + + option = { + name = ep3_decisions_event.4025.a + trigger = { + scope:evangelizer = { + has_character_flag = success_conversion + } + } + change_influence = major_influence_gain + add_prestige = major_prestige_gain + } + + option = { + name = ep3_decisions_event.4025.b + trigger = { + scope:evangelizer = { + has_character_flag = failed_conversion + } + } + change_influence = medium_influence_gain + add_prestige = medium_prestige_gain + } +} + +ep3_decisions_event.4026 = { + type = character_event + title = ep3_decisions_event.4020.t + desc = ep3_decisions_event.4026.desc + theme = emperor + + left_portrait = { + character = root + animation = anger + } + lower_right_portrait = scope:pagan + lower_left_portrait = scope:evangelizer + + immediate = { + show_as_tooltip = { + scope:evangelizer = { + death = { + death_reason = death_execution + killer = scope:pagan + } + } + } + } + + # Option A: they will pay! + option = { + name = ep3_decisions_event.4026.a + change_influence = medium_influence_gain + add_prestige = medium_prestige_gain + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:pagan } + } + set_relation_rival = { + reason = rival_killed_religious_emissary + target = scope:pagan + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:pagan + modifier = hate_opinion + opinion = -50 + } + } + ai_chance = { + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } +} + +ep3_decisions_event.4030 = { + type = character_event + title = ep3_decisions_event.4030.t + desc = ep3_decisions_event.4030.desc + theme = byzantine + override_background = { reference = ep3_constantinople } + override_effect_2d = { + reference = legend_glow + } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + immediate = { + recreate_ere_decision_effect = yes + create_character_memory = { + type = reformed_ere_memory + } + } + + option = { + name = ep3_decisions_event.4030.a + } +} + +ep3_decisions_event.4040 = { + type = character_event + title = ep3_decisions_event.4040.t + desc = ep3_decisions_event.4040.desc + theme = emperor + override_background = { reference = ep3_constantinople } + + left_portrait = { + character = root + animation = war_over_win + } + + immediate = { + show_as_tooltip = { + reinstitute_grain_dole_decision_effect = yes + } + create_character_memory = { + type = grain_dole_memory + } + } + + option = { + name = ep3_decisions_event.4040.a + } +} + +# Consolidate Rule +ep3_decisions_event.4050 = { + type = character_event + title = ep3_decisions_event.4050.t + desc = { + desc = ep3_decisions_event.4050.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:head_of_faith = { + OR = { + opinion = { + target = root + value <= -75 + } + has_relation_rival = root + } + } + } + desc = ep3_decisions_event.4050.desc.hate + } + desc = ep3_decisions_event.4050.desc.other + } + desc = ep3_decisions_event.4050.desc.outro + } + theme = emperor + override_background = { reference = temple } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = arrogant } + animation = disapproval + } + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = humble + has_trait = content + } + } + animation = obsequious_bow + } + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + + right_portrait = { + character = scope:head_of_faith + triggered_animation = { + trigger = { + OR = { + opinion = { + target = root + value <= -75 + } + has_relation_rival = root + } + } + animation = war_over_win + } + animation = admiration + } + + immediate = { + faith.religious_head = { + save_scope_as = head_of_faith + } + } + + option = { + name = ep3_decisions_event.4050.a + add_character_modifier = { + modifier = ep3_consolidated_rule_modifier + years = 15 + } + } + + option = { + name = ep3_decisions_event.4050.b + add_legitimacy = major_legitimacy_gain + } + + option = { + name = ep3_decisions_event.4050.c + trigger = { + scope:head_of_faith = { + OR = { + opinion = { + target = root + value <= -75 + } + has_relation_rival = root + } + } + can_add_hook = { + target = scope:head_of_faith + type = loyalty_hook + } + } + add_hook = { + type = loyalty_hook + target = scope:head_of_faith + } + } +} + + +######################################################### +### Convert to Administrative from Feudalism + +ep3_decisions_event.4060 = { + type = character_event + title = ep3_decisions_event.4060.t + desc = { + desc = ep3_decisions_event.4060.desc + first_valid = { #We talk a bit about the biggest non coverted vassal if there is one. + triggered_desc = { + trigger = { + exists = scope:obstinate_vassal + trigger_if = { + limit = { exists = scope:non_de_jure_vassal } + scope:obstinate_vassal.sub_realm_size >= scope:non_de_jure_vassal.sub_realm_size + } + trigger_if = { + limit = { exists = scope:non_state_faith_vassal } + scope:obstinate_vassal.sub_realm_size >= scope:non_state_faith_vassal.sub_realm_size + } + } + desc = ep3_decisions_event.4060.resistance.desc + } + triggered_desc = { + trigger = { + exists = scope:non_state_faith_vassal + trigger_if = { + limit = { exists = scope:non_de_jure_vassal } + scope:non_state_faith_vassal.sub_realm_size >= scope:non_de_jure_vassal.sub_realm_size + } + trigger_if = { + limit = { exists = scope:obstinate_vassal } + scope:non_state_faith_vassal.sub_realm_size >= scope:obstinate_vassal.sub_realm_size + } + } + desc = ep3_decisions_event.4060.state_faith.desc + } + triggered_desc = { + trigger = { + exists = scope:non_de_jure_vassal + trigger_if = { + limit = { exists = scope:non_state_faith_vassal } + scope:non_de_jure_vassal.sub_realm_size >= scope:non_state_faith_vassal.sub_realm_size + } + trigger_if = { + limit = { exists = scope:obstinate_vassal } + scope:non_de_jure_vassal.sub_realm_size >= scope:obstinate_vassal.sub_realm_size + } + } + desc = ep3_decisions_event.4060.de_jure.desc + } + } + desc = ep3_decisions_event.4060.outro.desc + } + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_right_portrait = { + character = scope:obstinate_vassal + } + lower_center_portrait = { + character = scope:non_state_faith_vassal + } + lower_left_portrait = { + character = scope:non_de_jure_vassal + } + + + immediate = { + show_as_tooltip = { + 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 } + } + if = { + limit = { + NOT = { has_character_flag = latin_emp_force_admin_flag } + top_liege = this + } + add_character_modifier = { modifier = first_admin_emperor } + } + } + hidden_effect = { + ordered_vassal = { + limit = { + NOR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_tribal + government_has_flag = government_is_administrative + } + primary_title = { + target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals + } + } + order_by = sub_realm_size + save_scope_as = non_de_jure_vassal + } + ordered_vassal = { + limit = { + NOR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_tribal + government_has_flag = government_is_administrative + primary_title = { + target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals + } + } + faith = scope:administrative_liege.faith #The future state faith + } + order_by = sub_realm_size + position = 0 + save_scope_as = non_state_faith_vassal + } + ordered_vassal = { + limit = { + NOR = { + government_has_flag = government_is_theocracy + government_has_flag = government_is_republic + government_has_flag = government_is_landless_adventurer + government_has_flag = government_is_tribal + government_has_flag = government_is_administrative + primary_title = { + target_is_de_jure_liege_or_above = scope:administrative_liege.primary_title #We only auto convert de jure vassals + } + faith = scope:administrative_liege.faith #The future state faith + } + } + order_by = sub_realm_size + save_scope_as = obstinate_vassal + } + every_vassal_or_below = { + limit = { + is_ai = no + } + trigger_event = { + id = ep3_decisions_event.4065 + } + } + } + } + #Finally some Law and Order + option = { + name = ep3_decisions_event.4060.a + if = { + limit = { + OR = { + exists = scope:non_de_jure_vassal + exists = scope:obstinate_vassal + exists = scope:non_state_faith_vassal + } + } + custom_tooltip = vassal_did_not_become_administrative + } + } +} + +#Vassals get notified +ep3_decisions_event.4065 = { + type = letter_event + opening = ep3_decisions_event.4065.opening + desc = ep3_decisions_event.4065.desc + sender = { + character = scope:actor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + option = { + name = ep3_decisions_event.4065.a + trigger = { + OR = { + ep3_vassal_will_become_admin = yes + exists = scope:great_yuan_ruler + } + } + change_to_administrative_effect = yes + #Specifically for when great yuan is formed + if = { + limit = { + exists = scope:great_yuan_ruler + } + hidden_effect = { #This again only converts subvassals if they are AI - this event should also have triggered for other humans down the chain. + every_vassal = { #Everyone below also converts (could be Counts, could be Dukes) + limit = { + tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (Could be Counts, could be Barons) + limit = { + tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (could be Barons) + limit = { + tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (could be Barons) + limit = { + tgp_mongol_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + } + } + } + } + } + } + #Firing from normal admin creation + else = { + hidden_effect = { #This again only converts subvassals if they are AI - this event should also have triggered for other humans down the chain. + every_vassal = { #Everyone below also converts (could be Counts, could be Dukes) + limit = { + ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (Could be Counts, could be Barons) + limit = { + ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (could be Barons) + limit = { + ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + every_vassal = { #Everyone below also converts (could be Barons) + limit = { + ep3_vassal_will_become_admin = yes #We still don't want mayors and bishops + is_ai = yes + } + change_to_administrative_effect = yes + } + } + } + } + } + } + } + option = { + name = ep3_decisions_event.4065.b + trigger = { + ep3_vassal_will_become_admin = yes + } + scope:actor = { + add_opinion = { + modifier = annoyed_opinion + opinion = -20 + target = root + } + } + } + option = { + name = ep3_decisions_event.4065.c + trigger = { + ep3_vassal_will_become_admin = no + } + } +} + +######################################################### +### Convert to Feudalism from Administrative + +ep3_decisions_event.4070 = { + type = character_event + title = ep3_decisions_event.4070.t + desc = ep3_decisions_event.4070.desc + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = arrogant } + animation = personality_callous + } + triggered_animation = { + trigger = { has_trait = craven } + animation = worry + } + animation = personality_bold + } + immediate = { + show_as_tooltip = { + if = { + limit = { ep3_is_clan_inclined_trigger = yes } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + option = { + name = ep3_decisions_event.4070.a + } +} + +#Vassals get notified +ep3_decisions_event.4075 = { + type = letter_event + opening = ep3_decisions_event.4075.opening + desc = ep3_decisions_event.4070.desc + sender = { + character = scope:actor + animation = personality_rational + } + immediate = { + show_as_tooltip = { + if = { + limit = { ep3_is_clan_inclined_trigger = yes } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + #You are now a king! ... or duke. Or count? + option = { + name = ep3_decisions_event.4075.a + } +} + +################################################## +# Gather Provisions +# by Joe Parkin +# 7000-7009 +################################################## + +scripted_effect determine_provision_count_effect = { + save_scope_value_as = { + name = $NAME$_provisions_count + value = { + integer_range = { + min = 200 + max = 400 + } + multiply = { + value = 1 + add = { + value = $CHAR$.$SKILL$ + multiply = 0.01 + } + if = { + limit = { + domicile ?= { has_domicile_parameter = camp_improves_gather_provisions_decision } + } + add = 0.5 + } + } + ceiling = yes + } + } +} + +ep3_decisions_event.7000 = { + type = character_event + title = ep3_decisions_event.7000.t + desc = { + desc = ep3_decisions_event.7000.desc + first_valid = { + triggered_desc = { + trigger = { + location = { + OR = { + has_province_modifier = winter_mild_modifier + has_province_modifier = winter_normal_modifier + has_province_modifier = winter_harsh_modifier + } + } + } + desc = ep3_decisions_event.7000.winter_forage + } + triggered_desc = { + trigger = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = taiga + } + } + } + desc = ep3_decisions_event.7000.difficult_forage + } + triggered_desc = { + trigger = { + location = { + OR = { + terrain = farmlands + terrain = floodplains + terrain = wetlands + } + } + } + desc = ep3_decisions_event.7000.difficult_hunt + } + triggered_desc = { + trigger = { + location = { + OR = { + terrain = forest + terrain = hills + terrain = plains + } + } + } + desc = ep3_decisions_event.7000.good + } + desc = ep3_decisions_event.7000.fallback + } + } + theme = hunting + override_background = { reference = terrain } + left_portrait = { + character = root + animation = survey + } + right_portrait = { + character = scope:portrait + triggered_animation = { + trigger = { has_court_position = chief_forager_camp_officer } + animation = admiration + } + triggered_animation = { + trigger = { has_court_position = huntperson_camp_officer } + scripted_animation = bow_closed_blunt + } + } + lower_right_portrait = { + character = scope:huntperson + trigger = { + exists = scope:huntperson + exists = scope:portrait + scope:huntperson != scope:portrait + } + } + + immediate = { + save_scope_as = camp_owner + location = { save_scope_as = forage_province } + court_position:chief_forager_camp_officer ?= { + save_scope_as = chief_forager + save_scope_as = portrait + } + court_position:huntperson_camp_officer ?= { + save_scope_as = huntperson + if = { + limit = { NOT = { exists = scope:portrait } } + save_scope_as = portrait + } + } + determine_provision_count_effect = { NAME = learning CHAR = scope:camp_owner SKILL = learning } + determine_provision_count_effect = { NAME = prowess CHAR = scope:camp_owner SKILL = prowess } + if = { + limit = { + has_perk = golden_aplomb_perk + } + set_variable = { + name = has_golden_aplomb_perk + value = flag:yes + } + } + else = { + set_variable = { + name = has_golden_aplomb_perk + value = flag:no + } + } + } + + option = { # Forage + name = ep3_decisions_event.7000.a + flavor = ep3_decisions_event.7000.a_foraging + duel = { + skill = learning + value = decent_skill_rating + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.crit_success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.a.crit_success + left_icon = root + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_forage_base_value + multiply = 1.5 + } + } + } + } + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.a.success + left_icon = root + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_forage_base_value + } + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.a.failure + left_icon = root + custom_tooltip = ep3_decisions_event.7000.no_provisions_tt + } + } + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.crit_failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.a.failure + left_icon = root + if = { + limit = { + location = { + OR = { + has_province_modifier = winter_mild_modifier + has_province_modifier = winter_normal_modifier + has_province_modifier = winter_harsh_modifier + } + } + NOR = { + has_character_modifier = travel_mild_frostbite_modifier + has_character_modifier = travel_severe_frostbite_modifier + } + } + add_character_modifier = { + modifier = travel_mild_frostbite_modifier + years = 3 + } + } + else_if = { + limit = { + NOT = { has_trait = ill } + location = { + OR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + terrain = farmlands + terrain = plains + } + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + else = { + increase_wounds_effect = { REASON = wild_animal } + } + } + } + } + ai_chance = { + base = 1 + modifier = { add = learning } + } + } + + option = { # Hunt + name = ep3_decisions_event.7000.b + flavor = ep3_decisions_event.7000.b_trapping + duel = { + skill = prowess + value = decent_skill_rating + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.crit_success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.a.crit_success + left_icon = root + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_hunt_base_value + multiply = 1.5 + } + } + } + } + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.a.success + left_icon = root + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_hunt_base_value + } + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.a.failure + left_icon = root + custom_tooltip = ep3_decisions_event.7000.no_provisions_tt + } + } + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.a.crit_failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.a.crit_failure + left_icon = root + increase_wounds_effect = { REASON = wild_animal } + } + } + } + ai_chance = { + base = 1 + modifier = { add = prowess } + } + } + + option = { # Send Chief Forager + flavor = ep3_decisions_event.7000.a_flavor + name = { + trigger = { NOT = { exists = scope:chief_forager } } + text = ep3_decisions_event.7000.c + } + name = { + trigger = { exists = scope:chief_forager } + text = ep3_decisions_event.7000.c.named + } + trigger = { employs_court_position = chief_forager_camp_officer } + reason = have_chief_forager + show_as_unavailable = { always = yes } + scope:chief_forager ?= { + duel = { + skill = learning + value = decent_skill_rating + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.c.crit_success + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.c.crit_success + left_icon = scope:chief_forager + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_forage_base_value + multiply = 1.75 + } + } + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.c.success + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.c.success + left_icon = scope:chief_forager + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_forage_base_value + multiply = 1.25 + } + } + } + } + } + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.c.failure + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.c.failure + left_icon = scope:chief_forager + custom_tooltip = ep3_decisions_event.7000.no_provisions_tt + } + } + } + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.c.crit_failure + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.c.crit_failure + left_icon = scope:chief_forager + scope:chief_forager = { + if = { + limit = { + location = { + OR = { + has_province_modifier = winter_mild_modifier + has_province_modifier = winter_normal_modifier + has_province_modifier = winter_harsh_modifier + } + } + NOR = { + has_character_modifier = travel_mild_frostbite_modifier + has_character_modifier = travel_severe_frostbite_modifier + } + } + add_character_modifier = { + modifier = travel_mild_frostbite_modifier + years = 3 + } + } + else_if = { + limit = { + NOT = { has_trait = ill } + location = { + OR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + terrain = farmlands + terrain = plains + } + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + else = { + increase_wounds_effect = { REASON = wild_animal } + } + } + } + } + } + } + } + ai_chance = { + base = 1 + modifier = { + exists = court_position:chief_forager_camp_officer + add = court_position:chief_forager_camp_officer.learning + } + } + } + + option = { # Send Huntperson + flavor = ep3_decisions_event.7000.b_flavor + name = { + trigger = { NOT = { exists = scope:huntperson } } + text = ep3_decisions_event.7000.d + } + name = { + trigger = { exists = scope:huntperson } + text = ep3_decisions_event.7000.d.named + } + trigger = { employs_court_position = huntperson_camp_officer } + reason = have_huntperson + show_as_unavailable = { always = yes } + scope:huntperson ?= { + duel = { + skill = prowess + value = decent_skill_rating + 2 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.d.crit_success + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.d.crit_success + left_icon = scope:huntperson + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_hunt_base_value + multiply = 1.75 + } + } + } + } + } + } + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_decisions_event.7000.d.success + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.7000.d.success + left_icon = scope:huntperson + domicile ?= { + change_provisions = { + value = { + value = scope:forage_province.gather_provisions_hunt_base_value + multiply = 1.25 + } + } + } + } + } + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.d.failure + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.d.failure + left_icon = scope:huntperson + custom_tooltip = ep3_decisions_event.7000.no_provisions_tt + } + } + } + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_decisions_event.7000.d.crit_failure + scope:camp_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_decisions_event.7000.d.crit_failure + left_icon = scope:huntperson + scope:huntperson = { + increase_wounds_effect = { REASON = wild_animal } + } + } + } + } + } + } + ai_chance = { + base = 1 + modifier = { + exists = court_position:huntperson_camp_officer + add = court_position:huntperson_camp_officer.prowess + } + } + } + after = { + remove_variable = has_golden_aplomb_perk + } +} + +# Found Salon +ep3_decisions_event.4080 = { + type = character_event + title = ep3_decisions_event.4080.t + desc = { + desc = ep3_decisions_event.4080.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root = character:andalusian_0003 + } + desc = ep3_decisions_event.4080.wallada + } + desc = ep3_decisions_event.4080.heir + } + desc = ep3_decisions_event.4080.desc.outro + } + theme = violet_poet + override_background = { reference = courtyard } + + left_portrait = { + character = root + animation = personality_honorable + } + + immediate = { + location = { + save_scope_as = location + } + } + + option = { + name = ep3_decisions_event.4080.a + if = { + limit = { + exists = dynasty + } + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + } + add_prestige = major_prestige_gain + scope:location = { + add_province_modifier = { + modifier = ep3_poets_salon_modifier + years = 250 + } + } + add_character_modifier = { + modifier = ep3_founded_salon_modifier + } + } +} + +######################################################### +### Renounce Governorship + +ep3_decisions_event.4090 = { + type = character_event + title = ep3_decisions_event.4090.t + desc = ep3_decisions_event.4090.desc + theme = administrative + override_background = { reference = estate } + right_portrait = { + character = root + triggered_animation = { + trigger = { government_allows = merit } + animation = writing + } + triggered_animation = { + trigger = { has_trait_benevolent_trigger = yes } + animation = worry + } + animation = scheme + } + lower_left_portrait = scope:new_governor + + immediate = { + liege = { save_scope_as = liege } #For loc + } + + option = { + name = ep3_decisions_event.4090.a + name = { + trigger = { + government_allows = merit + } + text = ep3_decisions_event.4090.a_merit + } + + if = { + limit = { + involved_activity ?= { + has_activity_type = activity_imperial_examination + } + } + set_activity_intent = imperial_exam_taker_intent + } + + if = { + limit = { + government_allows = merit + } + add_character_modifier = { + modifier = ep3_renounced_governorship_merit + years = 15 + } + set_appointment_timeout = { + years = 3 + desc = appointment_timeout_desc_retired_governor + } + } + else = { + add_gold = massive_gold_value + add_character_modifier = { + modifier = ep3_renounced_governorship + years = 15 + } + } + force_step_down_landed_titles = yes + if = { + limit = { + tgp_is_any_minister = yes + } + liege = { save_scope_as = councillor_liege } # Needed for the effect + fired_minister_position_effect = yes + } + tgp_step_down_title_recipient_tooltip_effect = yes + } +} + +######################################################### +### Knight of the Swan + +ep3_decisions_event.5001 = { + type = character_event + title = ep3_decisions_event.5001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:adoring_fan = { is_spouse_of = root } + } + desc = ep3_decisions_event.5001.desc.spouse + } + desc = ep3_decisions_event.5001.desc.intro + } + desc = ep3_decisions_event.5001.desc + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:adoring_fan = { is_spouse_of = root } + } + animation = ecstasy + } + triggered_animation = { + trigger = { + has_trait = arrogant + } + animation = hero_flex + } + triggered_animation = { + trigger = { + has_trait = humble + } + animation = shame + } + animation = laugh + } + right_portrait = { + character = scope:adoring_fan + animation = admiration + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + override_effect_2d = { + reference = legend_glow + } + override_background = { reference = ce1_legendary_spring } + + immediate = { + dummy_opposite_gender_effect = { TARGET = root } + hidden_effect_new_object = { + save_scope_as = owner + set_artifact_rarity_illustrious = yes + create_artifact = { + name = artifact_knight_of_the_swan_name + description = artifact_knight_of_the_swan + type = armor_mail + visuals = armor + modifier = artifact_armor_knight_of_the_swan_artifact_modifier + wealth = 400 + quality = 400 + save_scope_as = newly_created_artifact + } + } + add_character_flag = wear_armor + if = { # If your spouse likes you we grab them + limit = { + any_spouse = { + is_available_healthy_ai_adult = yes + has_any_good_relationship_with_root_trigger = yes + } + } + random_spouse = { + limit = { + is_available_healthy_ai_adult = yes + has_any_good_relationship_with_root_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 5 + has_relation_lover = root + } + modifier = { + add = 3 + this = root.primary_spouse + } + } + save_scope_as = adoring_fan + } + } + else_if = { + limit = { + any_courtier_or_guest = { + is_available_ai_adult = yes + } + } + ordered_courtier_or_guest = { + limit = { is_available_healthy_ai_adult = yes } + order_by = sum_of_all_skills_value + save_scope_as = adoring_fan + } + } + else = { + create_character = { + location = root.location + template = ep3_common_fan_character + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + faith = root.capital_county.faith + culture = root.capital_county.culture + save_scope_as = adoring_fan + } + } + } + + option = { # Are you into protecting peasants + name = ep3_decisions_event.5001.a + add_character_modifier = { # Permanent + modifier = ep3_valiant_knight_modifier + } + + stress_impact = { + seducer = major_stress_impact_gain + rakish = major_stress_impact_gain + lustful = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = seducer + has_trait = rakish + has_trait = lustful + has_trait = craven + } + } + } + } + + option = { #...or are you into saving ladies + name = ep3_decisions_event.5001.b + custom_tooltip = ep3_courteous_knight_var_tt + add_character_modifier = { # Permanent + modifier = ep3_courteous_knight_modifier + } + + stress_impact = { + celibate = major_stress_impact_gain + chaste = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = celibate + has_trait = chaste + has_trait = just + has_trait = callous + } + } + } + } + + after = { + disburse_knight_errant_decision_rewards_effect = yes + trigger_event = { # We give you a Legendary Sighting - also added to the regular event triggers so if it doesn't trigger here it will eventually + id = hunt.2510 + days = { 30 90 } + } + trigger_event = { # Someone from your family may take an interest in you - also added to the laamp on_action, so if it doesn't trigger here it will eventually + id = ep3_decisions_event.5002 + days = { 30 90 } + } + } +} + +scripted_trigger ep3_decisions_event_5002_family_trigger = { + is_available_healthy_ai_adult = yes + OR = { + is_landed = yes + NOT = { is_courtier_of = root } + } + NOT = { is_spouse_of = root } + OR = { + has_relation_rival = root + has_relation_potential_rival = root + opinion = { + target = root + value <= 0 + } + } +} + +ep3_decisions_event.5002 = { + type = character_event + title = ep3_decisions_event.5002.t + desc = ep3_decisions_event.5002.desc + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = humble + has_trait = calm + } + } + animation = dismissal + } + animation = anger + } + right_portrait = { + character = scope:my_rival + animation = disapproval + } + + trigger = { + is_available = yes + is_landed = no + any_close_or_extended_family_member = { + ep3_decisions_event_5002_family_trigger = yes + } + NOT = { has_variable = had_ep3_decisions_event_5002 } + } + + immediate = { + set_variable = had_ep3_decisions_event_5002 + # We try to find someone that doesn't like you + random_close_or_extended_family_member = { + limit = { + ep3_decisions_event_5002_family_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 50 + has_relation_rival = root + } + modifier = { + add = 25 + has_relation_potential_rival = root + } + modifier = { + add = 25 + opinion = { + target = root + value <= -25 + } + } + modifier = { + add = 25 + is_landed = yes + } + } + save_scope_as = my_rival + } + } + + option = { # You got a point + name = ep3_decisions_event.5002.a + custom_tooltip = { + text = ep3_decisions_event_5002_a_tt + set_variable = ep3_grace_to_the_family_var + } + scope:my_rival = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + stress_impact = { + arrogant = major_stress_impact_gain + wrathful = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = arrogant + has_trait = wrathful + } + } + } + } + + option = { # Screw you + name = ep3_decisions_event.5002.b + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:my_rival } + } + set_relation_rival = { + target = scope:my_rival + reason = rival_called_me_a_disgrace + } + } + add_character_modifier = { + modifier = ep3_black_sheep + years = 10 + } + stress_impact = { + arrogant = major_stress_impact_loss + wrathful = major_stress_impact_loss + calm = medium_stress_impact_gain + humble = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = humble + has_trait = ambitious + } + } + } + } +} + +######################################################### +### Commission Icon Artifact +ep3_decisions_event.5000 = { + type = character_event + title = ep3_decisions_event.5000.t + desc = ep3_decisions_event.5000.desc + theme = faith + override_background = { reference = study } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:local_artisan + animation = obsequious_bow + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + if = { + limit = { + scope:commission_trinket_icon = yes + } + create_artifact_trinket_icon_effect = { OWNER = root PAINTER = scope:local_artisan } + } + else_if = { + limit = { + scope:commission_court_icon_large = yes + } + create_artifact_court_icon_large_effect = { OWNER = root PAINTER = scope:local_artisan } + } + else = { + create_artifact_court_icon_small_effect = { OWNER = root PAINTER = scope:local_artisan } + } + } + + option = { # well done + name = ep3_decisions_event.5030.a + show_as_tooltip = { + scope:newly_created_artifact = { set_owner = root } + } + } +} + +### Hire Chief Eunuch +scripted_trigger mediocre_eunuch_trigger = { + has_trait = eunuch + can_be_employed_as = chief_eunuch_court_position + is_available_healthy_ai_adult = yes + diplomacy > average_skill_rating + intrigue > average_skill_rating +} + +scripted_trigger good_eunuch_trigger = { + has_trait = eunuch + can_be_employed_as = chief_eunuch_court_position + is_available_healthy_ai_adult = yes + NOR = { + is_landed = yes + has_trait = blind + } + OR = { + has_trait = education_diplomacy + has_trait = education_intrigue + } + diplomacy >= good_skill_level + intrigue >= good_skill_level +} + +ep3_decisions_event.5010 = { + type = character_event + title = ep3_decisions_event.5010.t + desc = ep3_decisions_event.5010.desc + theme = administrative + + left_portrait = { + character = scope:mediocre_eunuch + animation = happiness + } + right_portrait = { + character = scope:good_eunuch + animation = personality_honorable + } + + immediate = { + # Find a mediocre one + if = { # check for a mediocre character in the pool + limit = { + any_pool_character = { + province = root.capital_province + mediocre_eunuch_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { mediocre_eunuch_trigger = yes } + save_scope_as = mediocre_eunuch + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = 0 + age = { 16 65 } + culture = root.location.culture + faith = root.location.faith + random_traits_list = { + count = 1 + education_diplomacy_1 = {} + education_diplomacy_2 = {} + education_intrigue_1 = {} + education_intrigue_2 = {} + } + random_traits_list = { + count = 1 + eunuch_1 = {} + beardless_eunuch = {} + } + random_traits = yes + diplomacy = { + min_template_low_skill + max_template_average_skill + } + intrigue = { + min_template_low_skill + max_template_average_skill + } + save_scope_as = mediocre_eunuch + } + } + + # Find a good one + if = { # check for a GOOD character in the pool + limit = { + any_pool_character = { + province = root.capital_province + good_eunuch_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { good_eunuch_trigger = yes } + save_scope_as = good_eunuch + } + } + else = { # otherwise create one + create_character = { + location = root.capital_province + gender_female_chance = 0 + age = { 16 65 } + culture = root.culture + faith = root.faith + random_traits_list = { + count = 1 + education_diplomacy_3 = {} + education_diplomacy_4 = {} + education_intrigue_3 = {} + education_intrigue_4 = {} + } + random_traits_list = { + count = 1 + eunuch_1 = {} + beardless_eunuch = {} + } + random_traits = yes + diplomacy = { + min_template_average_skill + max_template_medium_skill + } + intrigue = { + min_template_average_skill + max_template_medium_skill + } + save_scope_as = good_eunuch + } + } + } + + option = { + name = ep3_decisions_event.5010.a + pay_treasury_or_gold = { + target = scope:mediocre_eunuch + value = low_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:mediocre_eunuch } + court_position_grant_effect = { POS = chief_eunuch CANDIDATE = scope:mediocre_eunuch EMPLOYER = root } + } + + option = { + name = ep3_decisions_event.5010.b + pay_treasury_or_gold = { + target = scope:good_eunuch + value = high_skill_court_physician_cost + } + hidden_effect = { add_courtier = scope:good_eunuch } + court_position_grant_effect = { POS = chief_eunuch CANDIDATE = scope:good_eunuch EMPLOYER = root } + } + + option = { + name = ep3_decisions_event.1000.d + } +} + +### Embrace Heresy +ep3_decisions_event.5020 = { + type = character_event + title = ep3_decisions_event.5020.t + desc = { + desc = ep3_decisions_event.5020.desc + triggered_desc = { + trigger = { + exists = scope:heresy_2 + } + desc = ep3_decisions_event.5020.desc_more + } + } + theme = faith + + left_portrait = { + character = root + animation = scheme + } + + immediate = { + top_liege ?= { + every_realm_county = { + limit = { + OR = { + faith = { + faith_is_interesting_heresy_to_state_faith_trigger = yes + } + any_neighboring_county = { + holder.top_liege ?= { + this != root.top_liege + } + faith = { + faith_is_interesting_heresy_to_state_faith_trigger = yes + } + } + } + } + every_neighboring_county = { + limit = { + holder.top_liege ?= { + this != root.top_liege + } + faith = { + faith_is_interesting_heresy_to_state_faith_trigger = yes + } + } + faith = { + add_to_list = available_heresies + } + } + if = { + limit = { + faith = { + faith_is_interesting_heresy_to_state_faith_trigger = yes + } + } + faith = { + add_to_list = available_heresies + } + } + } + } + ordered_in_list = { + list = available_heresies + order_by = num_county_followers + position = 1 + save_scope_as = heresy_1 + } + ordered_in_list = { + list = available_heresies + limit = { this != scope:heresy_1 } + order_by = num_county_followers + position = 1 + save_scope_as = heresy_2 + } + ordered_in_list = { + list = available_heresies + limit = { + this != scope:heresy_1 + this != scope:heresy_2 + } + order_by = num_county_followers + position = 1 + save_scope_as = heresy_3 + } + } + + option = { + name = ep3_decisions_event.5020.a + set_character_faith_with_conversion = scope:heresy_1 + add_heresiarch_trait_effect = yes + # Otherwise the conversion event will remove the trait + add_character_flag = converted_by_heresy_decision + scope:heresy_1 = { save_scope_as = heresy } + custom_tooltip = unlocks_demand_state_faith_decision + top_liege ?= { + every_vassal = { + limit = { + faith = scope:heresy_1 + } + root = { + if = { + limit = { + can_add_hook = { + target = prev + type = influence_hook + } + } + add_hook = { + target = prev + type = influence_hook + } + } + } + } + } + change_influence = { + value = minor_influence_gain + multiply = number_of_counties_with_heresy_1 + min = 150 + } + } + + option = { + name = ep3_decisions_event.5020.b + trigger = { + exists = scope:heresy_2 + } + set_character_faith_with_conversion = scope:heresy_2 + add_heresiarch_trait_effect = yes + # Otherwise the conversion event will remove the trait + add_character_flag = converted_by_heresy_decision + scope:heresy_2 = { save_scope_as = heresy } + custom_tooltip = unlocks_demand_state_faith_decision + top_liege ?= { + every_vassal = { + limit = { + faith = scope:heresy_2 + } + root = { + if = { + limit = { + can_add_hook = { + target = prev + type = influence_hook + } + } + add_hook = { + target = prev + type = influence_hook + } + } + } + } + } + change_influence = { + value = minor_influence_gain + multiply = number_of_counties_with_heresy_2 + min = 150 + } + } + + option = { + name = ep3_decisions_event.5020.c + trigger = { + exists = scope:heresy_3 + } + set_character_faith_with_conversion = scope:heresy_3 + add_heresiarch_trait_effect = yes + # Otherwise the conversion event will remove the trait + add_character_flag = converted_by_heresy_decision + scope:heresy_3 = { save_scope_as = heresy } + custom_tooltip = unlocks_demand_state_faith_decision + top_liege ?= { + every_vassal = { + limit = { + faith = scope:heresy_3 + } + root = { + if = { + limit = { + can_add_hook = { + target = prev + type = influence_hook + } + } + add_hook = { + target = prev + type = influence_hook + } + } + } + } + } + change_influence = { + value = minor_influence_gain + multiply = number_of_counties_with_heresy_3 + min = 150 + } + } + + option = { + name = ep3_decisions_event.5020.d + } + + after = { + if = { + limit = { + exists = scope:heresy + } + set_variable = { + name = heresy_embraced + value = scope:heresy + years = 50 + } + } + } +} + +ep3_decisions_event.5021 = { + type = character_event + title = ep3_decisions_event.5021.t + desc = ep3_decisions_event.5021.desc + theme = faith + + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:heretic + animation = scheme + } + + # Option A: change state faith + option = { + name = ep3_decisions_event.5021.a + scope:heretic = { + send_interface_message = { + type = event_generic_good + title = ep3_decisions_event.5021.a.tt + left_icon = root + root = { + primary_title = { set_state_faith = scope:heresy } + add_opinion = { + target = scope:heretic + modifier = forced_state_heresy_opinion + opinion = -50 + } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = number_of_counties_with_heresy_acceptance + } + modifier = { + add = number_of_vassals_with_heresy_acceptance + } + modifier = { + add = influence_difference_value + } + modifier = { + scope:heretic.house = { is_powerful_family = yes } + add = 25 + } + modifier = { + scope:heretic.house = { is_dominant_family = yes } + add = 25 + } + modifier = { + scope:heretic = { + domicile ?= { + has_domicile_parameter = more_successful_heresies + location.county.faith = scope:heretic.faith + } + } + add = 25 + } + } + } + + # Option B: change state faith and convert + option = { + name = ep3_decisions_event.5021.b + scope:heretic = { + send_interface_message = { + type = event_generic_good + title = ep3_decisions_event.5021.a.tt + left_icon = root + root = { + primary_title = { set_state_faith = scope:heresy } + set_character_faith_with_conversion = scope:heresy + add_opinion = { + target = scope:heretic + modifier = forced_state_heresy_opinion + opinion = -50 + } + } + } + } + ai_chance = { + base = 0 + modifier = { + add = number_of_counties_with_heresy_acceptance + } + modifier = { + add = number_of_vassals_with_heresy_acceptance + } + modifier = { + add = influence_difference_value + } + modifier = { + scope:heretic.house = { is_powerful_family = yes } + add = 25 + } + modifier = { + scope:heretic.house = { is_dominant_family = yes } + add = 25 + } + modifier = { + has_trait = cynical + add = 20 + } + modifier = { + scope:heretic = { + domicile ?= { + has_domicile_parameter = more_successful_heresies + location.county.faith = scope:heretic.faith + } + } + add = 15 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + # Option C: just no + option = { + name = ep3_decisions_event.5021.c + scope:heretic = { + send_interface_message = { + type = event_generic_bad + title = ep3_decisions_event.5021.c.tt + left_icon = root + } + } + ai_chance = { + base = 250 + } + } +} + +### Commission Silk Regalia +ep3_decisions_event.5030 = { + type = character_event + title = ep3_decisions_event.5030.t + desc = ep3_decisions_event.5030.desc + theme = inspiration_complete + override_background = { reference = study } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:local_artisan + animation = obsequious_bow + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + override_effect_2d = { + reference = legend_glow + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + hidden_effect = { + set_artifact_rarity_famed = yes + create_artifact_regalia_effect = { + OWNER = root + SMITH = scope:local_artisan + } + scope:newly_created_artifact = { + set_artifact_name = silk_regalia_name + set_artifact_description = silk_regalia_description + } + } + } + + option = { # well done + name = ep3_decisions_event.5000.a + show_as_tooltip = { + scope:newly_created_artifact = { set_owner = root } + } + } +} + +######################################################### +### Separatist Uprising +ep3_decisions_event.6001 = { + type = character_event + title = ep3_decisions_event.6001.t + desc = { + desc = ep3_decisions_event.6001.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spouse + scope:spouse = { + culture = root.culture + } + } + desc = ep3_decisions_event.6001.desc.spouse_same_culture + } + triggered_desc = { + trigger = { + exists = scope:spouse + scope:spouse = { + culture != root.culture + } + } + desc = ep3_decisions_event.6001.desc.spouse_diff_culture + } + desc = ep3_decisions_event.6001.desc.no_spouse + } + desc = ep3_decisions_event.6001.desc.outro + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = callous + has_trait = ambitious + } + } + animation = scheme + } + animation = marshal_shield + } + right_portrait = { + trigger = { exists = scope:spouse } + character = scope:spouse + animation = admiration + } + lower_right_portrait = scope:liege + + immediate = { + location.county = { save_scope_as = county } + save_scope_as = laamp + location.duchy.holder.top_liege = { save_scope_as = liege } + if = { + limit = { exists = location.county.kingdom } + location.county.kingdom = { save_scope_as = kingdom_title } + } + scope:liege = { save_scope_as = target_military } + if = { + limit = { + any_spouse = { + is_available_healthy_ai_adult = yes + has_any_good_relationship_with_root_trigger = yes + } + } + random_spouse = { + limit = { + is_available_healthy_ai_adult = yes + has_any_good_relationship_with_root_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 5 + has_relation_lover = root + } + modifier = { + add = 3 + this = root.primary_spouse + } + } + save_scope_as = spouse + } + } + } + + option = { # Go to war NOW + name = ep3_decisions_event.6001.a + set_variable = separatist_uprising_decision_var + add_to_variable_list = { + name = separatist_uprising_decision_target_var + target = scope:liege + } + add_character_modifier = { + modifier = ep3_separatist_uprising + years = 15 + } + add_pressed_claim = location.duchy + spawn_army = { + name = culture_separatists + levies = { + value = 500 + multiply = { + value = scope:liege.primary_title.tier + } + } + location = root.location + origin = root.location + inheritable = no + } + spawn_army = { + name = culture_separatists + levies = { + value = 500 + multiply = { + value = scope:liege.primary_title.tier + } + } + location = root.location + origin = root.location + inheritable = no + } + spawn_army = { + name = culture_separatists + men_at_arms = { + type = handpicked_faithful + stacks = 2 + } + location = root.location + origin = root.location + inheritable = no + } + spawn_army = { + name = culture_separatists + men_at_arms = { + type = handpicked_faithful + stacks = 2 + } + location = root.location + origin = root.location + inheritable = no + } + spawn_army = { + name = culture_separatists + men_at_arms = { + type = handpicked_faithful + stacks = 2 + } + location = root.location + origin = root.location + inheritable = no + } + start_war = { + cb = claim_cb + target = location.duchy.holder.top_liege + claimant = root + target_title = location.duchy + } + stress_impact = { + calm = major_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + root_military_strength_higher_than_military_target_value > target_military_strength_root_value + } + modifier = { + factor = 2 + OR = { + has_trait = reckless + has_trait = wrathful + has_trait = brave + } + } + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = craven + } + } + modifier = { # Asen and Peter always try to go to war with you + add = 1000 + primary_title = title:d_laamp_asen + } + } + } + + option = { # Just the claim pls + name = ep3_decisions_event.6001.b + set_variable = separatist_uprising_decision_var + add_gold = major_gold_value + add_pressed_claim = location.duchy + + stress_impact = { + celibate = major_stress_impact_gain + chaste = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + root_military_strength_higher_than_military_target_value < target_military_strength_root_value + } + modifier = { # Asen and Peter always try to go to war with you + factor = 0 + primary_title = title:d_laamp_asen + } + } + } + + option = { # Pacifist route + name = ep3_decisions_event.6001.c + show_as_unavailable = { always = yes } # We let you know that this route exists + trigger = { + # Friend or Lover + trigger_if = { + limit = { + OR = { + can_set_relation_potential_lover_trigger = { CHARACTER = scope:liege } + can_set_relation_lover_trigger = { CHARACTER = scope:liege } + } + } + custom_tooltip = { + text = separatist_uprising_decision_pacifist_option_friend_lover_tt + calc_true_if = { + amount >= 3 + any_spouse = { + is_lowborn = no + culture = root.location.county.culture + } + faith = root.location.county.faith + any_hooked_character = { this = scope:liege } + OR = { + has_relation_friend = scope:liege + has_relation_lover = scope:liege + } + prestige_level > scope:liege.prestige_level + } + } + } + # Only Friend + trigger_else = { + custom_tooltip = { + text = separatist_uprising_decision_pacifist_option_friend_tt + calc_true_if = { + amount >= 3 + any_spouse = { + is_lowborn = no + culture = root.location.county.culture + } + faith = root.location.county.faith + any_hooked_character = { this = scope:liege } + has_relation_friend = scope:liege + prestige_level > scope:liege.prestige_level + } + } + } + location.duchy = { + any_de_jure_county = { + this != scope:liege.capital_county + } + } + } + scope:liege = { save_scope_as = new_liege } + set_variable = separatist_uprising_decision_var + set_variable = became_landed_through_separatist_uprising_var + location.duchy = { + add_to_list = transfer_titles + # All De Jure Counties held by the liege will be moved over + every_de_jure_county = { + limit = { + holder = scope:liege + this != scope:liege.capital_county + } + add_to_list = transfer_titles + } + # If no counties can be taken from the liege, grab one from vassals + if = { + limit = { + NOT = { + any_in_list = { + list = transfer_titles + tier = tier_county + } + } + } + random_de_jure_county = { + limit = { + holder = { any_liege_or_above = { this = scope:liege } } + } + weight = { + base = 1 + modifier = { + add = 100 + NOR = { + holder.primary_title = this + holder.capital_county = this + } + } + } + add_to_list = transfer_titles + } + } + holder ?= { + if = { # Handle noble family heads you are stealing duchy from + limit = { + highest_held_title_tier = tier_duchy + any_held_title = { is_noble_family_title = yes } + any_held_title = { + count = 1 + title_tier = duchy + is_noble_family_title = no + } + } + if = { # Give titles to heir, keep noble family + limit = { primary_heir.house ?= house } + primary_heir = { save_scope_as = old_heir } + every_held_title = { + limit = { + NOR = { + is_landless_type_title = yes + is_noble_family_title = yes + } + } + add_to_list = heir_titles + } + } + else = { # Give titles to adventurer + every_held_title = { + limit = { + NOR = { + is_landless_type_title = yes + is_noble_family_title = yes + } + } + add_to_list = transfer_titles + } + } + } + } + } + if = { + limit = { + exists = scope:old_heir + any_in_list = { list = heir_titles } + } + hidden_effect = { + create_title_and_vassal_change = { + type = granted + save_scope_as = heir_change + add_claim_on_loss = no + } + every_in_list = { + list = heir_titles + limit = { tier >= tier_county } + change_title_holder_include_vassals = { + holder = scope:old_heir + change = scope:heir_change + } + } + resolve_title_and_vassal_change = scope:heir_change + } + } + ep3_become_landed_transfer_no_ennobled_modifier_effect = { + TITLE_RECEIVER = root + TITLE_LIST = transfer_titles + TYPE = granted + REASON = flag:culture_champion + } + hidden_effect = { + scope:old_heir ?= { + create_title_and_vassal_change = { + type = granted + save_scope_as = heir_change2 + add_claim_on_loss = no + } + change_liege = { + liege = root + change = scope:heir_change2 + } + resolve_title_and_vassal_change = scope:heir_change2 + } + every_courtier = { + set_variable = { + name = former_camp_leader + value = root + } + add_trait = adventurer_follower + } + } + add_pressed_claim = scope:kingdom_title + # Messages for nearby players + create_landed_ruler_message_effect = { + LANDED = root + FLAVOR_CHAR = scope:new_liege + FLAVOR_TITLE = scope:new_primary_title + REASON = flag:culture_champion + } + stress_impact = { + celibate = major_stress_impact_gain + chaste = medium_stress_impact_gain + just = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = celibate + has_trait = chaste + has_trait = just + has_trait = callous + } + } + modifier = { # Asen and Peter always try to go to war with you + factor = 0 + primary_title = title:d_laamp_asen + } + } + } + + option = { # Let me think about it + name = ep3_decisions_event.6001.d + + ai_chance = { + base = 0 + } + } +} + +# We give out the Populist Leader trait +ep3_decisions_event.6002 = { + type = character_event + title = ep3_decisions_event.6002.t + desc = ep3_decisions_event.6002.desc + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = callous + has_trait = ambitious + } + } + animation = chess_cocky + } + animation = celebrate_sword + } + lower_right_portrait = scope:defender + + option = { # Wahoo + name = ep3_decisions_event.6002.a + if = { + limit = { + has_trait = peasant_leader + } + remove_trait = peasant_leader + add_trait_force_tooltip = populist_leader + } + else = { + add_trait_force_tooltip = populist_leader + } + if = { # If you are Todor we remove your op Modifier + limit = { has_character_modifier = ep3_master_todor_modifier } + remove_character_modifier = ep3_master_todor_modifier + } + stress_impact = { + brave = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } +} + + +################################################## +# Go Fish +# by Alexander Windahl +# 9001-9030 +################################################## +ep3_decisions_event.9001 = { + type = character_event + title = ep3_decisions_event.9001.t + desc = { + desc = ep3_decisions_event.9001.desc + + triggered_desc = { + trigger = { + exists = scope:potential_friend + } + desc = ep3_decisions_event.9001.friend + } + + first_valid = { + triggered_desc = { + trigger = { + location = { + #only ice-fish if water is frozen + has_province_modifier = winter_harsh_modifier + + } + } + desc = ep3_decisions_event.9001.ice_fishing + } + desc = ep3_decisions_event.9001.fishing + } + } + + theme = travel_sea + override_background = { reference = bp1_docks_tribal } + override_effect_2d = { + trigger = { + exists = scope:rain_day + } + reference = rain + } + + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:potential_friend + animation = admiration + } + + immediate = { + save_scope_as = camp_owner + location = { save_scope_as = fishing_province } + random_relation = { + type = potential_friend + limit = { + this != scope:camp_owner + is_physically_able_ai_adult = yes + location = scope:fishing_province + } + save_scope_as = potential_friend + } + random_rain_snow_chance_effect = yes + } + + option = { # Fish alone + name = ep3_decisions_event.9001.a + + stress_impact = { + reclusive = minor_stress_impact_loss + } + + ai_chance = { + base = 1 + } + + custom_tooltip = ep3_decisions_event.9001.a.tt + + trigger_event = { id = ep3_decisions_event.9010 } + } + + option = { # Fish with your potential_friend + trigger = { + exists = scope:potential_friend + } + name = ep3_decisions_event.9001.b + + scope:potential_friend = { + add_opinion = { + target = root + modifier = happy_opinion + opinion = 10 + } + } + + ai_chance = { + base = 1 + } + + custom_tooltip = ep3_decisions_event.9001.b.tt + + trigger_event = { id = ep3_decisions_event.9020 } + } + + option = { # Rent a boat + add_character_flag = { + flag = ocean + years = 2 + } + if = { + limit = { + has_character_flag = ocean + } + } + name = ep3_decisions_event.9001.c + + trigger = { + short_term_gold >= medium_gold_value + trigger_if = { + limit = { + is_ai = yes + } + short_term_gold >= 500 + } + } + remove_short_term_gold = minor_gold_value + + custom_tooltip = ep3_decisions_event.9001.c.tt + + ai_chance = { + base = 1 + } + + trigger_event = { id = ep3_decisions_event.9030 } + } +} + +ep3_decisions_event.9010 = { # Fish Alone + type = character_event + title = ep3_decisions_event.9010.t + desc = { + desc = ep3_decisions_event.9010.desc + } + + theme = travel_sea + override_background = { reference = bp1_docks_tribal } + override_effect_2d = { + trigger = { + exists = scope:rain_day + } + reference = rain + } + + left_portrait = { + character = root + animation = hunting_knife_start + } + + option = { + name = ep3_decisions_event.9010.a + + duel = { + skill = prowess + value = 22 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + add_stress = minor_stress_impact_loss + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9030.a.fish + left_icon = root + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = medium_stress_impact_loss + } + domicile = { + change_provisions = miniscule_provisions_value + } + } + } + } + ai_chance = { + base = 1 + } + } + + option = { + trigger = { + NOT = { + has_trait = wrathful + } + } + name = ep3_decisions_event.9010.b + + random_list = { + 99 = { #nothing happens + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9010.b.nothing + left_icon = root + stress_impact = { + base = medium_stress_impact_loss + calm = medium_stress_impact_loss + } + } + } + 1 = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9010.b.trait + left_icon = root + add_trait = calm + stress_impact = { + base = medium_stress_impact_loss + calm = medium_stress_impact_loss + } + } + } + } + ai_chance = { + base = 1 + } + } +} + + +ep3_decisions_event.9020 = { # Fish With Your potential_friend + type = character_event + title = ep3_decisions_event.9020.t + desc = { + desc = ep3_decisions_event.9020.desc + } + + theme = travel_sea + override_background = { reference = bp1_docks_tribal } + override_effect_2d = { + trigger = { + exists = scope:rain_day + } + reference = rain + } + + left_portrait = { + character = root + animation = laugh + } + + right_portrait = { + character = scope:potential_friend + animation = happiness + } + + option = { #Become friends! + name = ep3_decisions_event.9020.a + + progress_towards_friend_effect = { + CHARACTER = scope:potential_friend + OPINION = yes + REASON = friend_fishing_trip + } + + random_list = { + 99 = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + right_icon = scope:potential_friend + add_stress = medium_stress_impact_loss + } + } + 1 = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.fish + left_icon = root + right_icon = scope:potential_friend + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = major_stress_impact_loss + } + domicile = { + change_provisions = miniscule_provisions_value + } + } + } + } + + ai_chance = { + base = 1 + } + } + + option = { #Actually, the fish are more important + name = ep3_decisions_event.9020.b + + duel = { + skill = prowess + value = 20 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + right_icon = scope:potential_friend + add_stress = medium_stress_impact_loss + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9030.a.fish + left_icon = root + right_icon = scope:potential_friend + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = major_stress_impact_loss + } + domicile = { + change_provisions = miniscule_provisions_value + } + } + } + } + + ai_chance = { + base = 1 + } + } +} + +ep3_decisions_event.9030 = { # Fish On A Boat, your potential friend will join you + type = character_event + title = ep3_decisions_event.9030.t + desc = { + desc = ep3_decisions_event.9030.desc + + triggered_desc = { + trigger = { + exists = scope:potential_friend + } + desc = ep3_decisions_event.9030.friend + } + } + + theme = travel_sea + override_background = { reference = ocean } + override_effect_2d = { + trigger = { + exists = scope:rain_day + } + reference = rain + } + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:potential_friend + animation = personality_content + } + + option = { #You fish + name = ep3_decisions_event.9030.a + + duel = { + skill = prowess + value = 30 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + right_icon = scope:potential_friend + add_stress = major_stress_impact_loss + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9030.a.fish + left_icon = root + right_icon = scope:potential_friend + stress_impact = { + base = minor_stress_impact_loss + ambitious = major_stress_impact_loss + } + domicile = { + change_provisions = minor_provisions_value + } + } + } + } + + ai_chance = { + base = 1 + } + } + + option = { #Have your buddy fish + name = ep3_decisions_event.9030.b + trigger = { + exists = scope:potential_friend + } + + progress_towards_friend_effect = { + CHARACTER = scope:potential_friend + OPINION = yes + REASON = friend_fishing_trip + } + + random_list = { + 80 = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_decisions_event.9030.a.nofish + left_icon = root + right_icon = scope:potential_friend + add_stress = major_stress_impact_loss + } + } + 20 = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_decisions_event.9030.a.fishfriend + left_icon = scope:potential_friend + add_stress = minor_stress_impact_loss + domicile = { + change_provisions = minor_provisions_value + } + } + } + } + + ai_chance = { + base = 1 + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_emperor_yearly_2.txt b/N3OW/events/dlc/ep3/ep3_emperor_yearly_2.txt new file mode 100644 index 00000000..c846c16c --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_emperor_yearly_2.txt @@ -0,0 +1,7034 @@ +namespace = ep3_emperor_yearly + +############################## +# EP3 Admin (Emperor) Events # +# by Claudia Baldassi # +# 2000 - 2999 # +############################## + +# Byzantine-only: you have reconquered an important city of the long-lost Empire + +ep3_emperor_yearly.2000 = { + type = character_event + window = fullscreen_event + title = ep3_emperor_yearly.2000.t + desc = { + desc = ep3_emperor_yearly.2000.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:county = title:c_antiocheia + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.2000.desc_antioch + } + triggered_desc = { + trigger = { + scope:county = title:c_antiocheia + } + desc = ep3_emperor_yearly.2000.desc_antioch_not_christ + } + triggered_desc = { + trigger = { + scope:county = title:c_jerusalem + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.2000.desc_jerusalem + } + triggered_desc = { + trigger = { + scope:county = title:c_jerusalem + } + desc = ep3_emperor_yearly.2000.desc_jerusalem_not_christ + } + triggered_desc = { + trigger = { + scope:county = title:c_alexandria + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.2000.desc_alexandria_not_christ + } + triggered_desc = { + trigger = { + scope:county = title:c_alexandria + } + desc = ep3_emperor_yearly.2000.desc_alexandria + } + #Maximum estent of the Roman Empire to the East (Trajan) - Abbadan + triggered_desc = { + trigger = { + scope:county = title:c_abbadan + } + desc = ep3_emperor_yearly.2000.desc_frontier + } + triggered_desc = { + trigger = { + scope:county = title:c_edessa + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.2000.desc_edessa + } + triggered_desc = { + trigger = { + scope:county = title:c_edessa + } + desc = ep3_emperor_yearly.2000.desc_edessa_not_christ + } + triggered_desc = { + trigger = { + scope:county = title:c_bari + } + desc = ep3_emperor_yearly.2000.desc_bari + } + triggered_desc = { + trigger = { + scope:county = title:c_siracusa + } + desc = ep3_emperor_yearly.2000.desc_syracuse + } + triggered_desc = { + trigger = { + scope:county = title:c_roma + } + desc = ep3_emperor_yearly.2000.desc_rome + } + triggered_desc = { + trigger = { + scope:county = title:c_ravenna + } + desc = ep3_emperor_yearly.2000.desc_ravenna + } + triggered_desc = { + trigger = { + scope:county = title:c_tunis + } + desc = ep3_emperor_yearly.2000.desc_carthago + } + triggered_desc = { + trigger = { + scope:county = title:c_tangiers + } + desc = ep3_emperor_yearly.2000.desc_tingis + } + triggered_desc = { + trigger = { + scope:county = title:c_murcia + } + desc = ep3_emperor_yearly.2000.desc_carthago_spartaria + } + triggered_desc = { + trigger = { + scope:county = title:c_lombardia + } + desc = ep3_emperor_yearly.2000.desc_milan + } + triggered_desc = { + trigger = { + scope:county = title:c_trier + } + desc = ep3_emperor_yearly.2000.desc_trier + } + triggered_desc = { + trigger = { + OR = { + scope:county = title:c_cumberland + scope:county = title:c_northumberland + } + } + desc = ep3_emperor_yearly.2000.desc_hadrians_wall + } + triggered_desc = { + trigger = { + scope:county = title:c_chandax + } + desc = ep3_emperor_yearly.2000.desc_chandax + } + triggered_desc = { + trigger = { + scope:county = title:c_tourraine + } + desc = ep3_emperor_yearly.2000.desc_tours + } + } + } + theme = war + override_background = { reference = ep3_triumph } + + trigger = { + has_ep3_dlc_trigger = yes + is_roman_emperor_trigger = yes + trigger_if = { + limit = { + scope:county = title:c_tourraine + } + NOT = { exists = var:ep3_reconquered_tourraine } + } + trigger_else_if = { + limit = { + scope:county = title:c_chandax + } + NOT = { exists = var:ep3_reconquered_chandax } + } + trigger_else_if = { + limit = { + OR = { + scope:county = title:c_cumberland + scope:county = title:c_northumberland + } + } + NOT = { exists = var:ep3_reconquered_hadrian } + } + trigger_else_if = { + limit = { + scope:county = title:c_trier + } + NOT = { exists = var:ep3_reconquered_trier } + } + trigger_else_if = { + limit = { + scope:county = title:c_lombardia + } + NOT = { exists = var:ep3_reconquered_lombardia } + } + trigger_else_if = { + limit = { + scope:county = title:c_murcia + } + NOT = { exists = var:ep3_reconquered_murcia } + } + trigger_else_if = { + limit = { + scope:county = title:c_tangiers + } + NOT = { exists = var:ep3_reconquered_tangiers } + } + trigger_else_if = { + limit = { + scope:county = title:c_tunis + } + NOT = { exists = var:ep3_reconquered_tunis } + } + trigger_else_if = { + limit = { + scope:county = title:c_ravenna + } + NOT = { exists = var:ep3_reconquered_ravenna } + } + trigger_else_if = { + limit = { + scope:county = title:c_roma + } + NOT = { exists = var:ep3_reconquered_roma } + } + trigger_else_if = { + limit = { + scope:county = title:c_siracusa + } + NOT = { exists = var:ep3_reconquered_siracusa } + } + trigger_else_if = { + limit = { + scope:county = title:c_bari + } + NOT = { exists = var:ep3_reconquered_bari } + } + trigger_else_if = { + limit = { + scope:county = title:c_edessa + } + NOT = { exists = var:ep3_reconquered_edessa } + } + trigger_else_if = { + limit = { + scope:county = title:c_abbadan + } + NOT = { exists = var:ep3_reconquered_abbadan } + } + trigger_else_if = { + limit = { + scope:county = title:c_alexandria + } + NOT = { exists = var:ep3_reconquered_alexandria } + } + trigger_else_if = { + limit = { + scope:county = title:c_jerusalem + } + NOT = { exists = var:ep3_reconquered_jerusalem } + } + trigger_else_if = { + limit = { + scope:county = title:c_antiocheia + } + NOT = { exists = var:ep3_reconquered_antiocheia } + } + trigger_else = { + always = no + } + } + + immediate = { + change_influence = massive_influence_gain + add_prestige = major_prestige_gain + } + + #Option A + option = { + name = ep3_emperor_yearly.2000.a + if = { + limit = { + OR = { + scope:county = title:c_antiocheia + scope:county = title:c_jerusalem + scope:county = title:c_alexandria + scope:county = title:c_roma + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_restored_pentarchy_seat_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_restored_pentarchy_seat_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_abbadan + scope:county = title:c_cumberland + scope:county = title:c_northumberland + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_maximum_border_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_maximum_border_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_ravenna + scope:county = title:c_tunis + scope:county = title:c_murcia + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_new_justinian_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_new_justinian_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_lombardia + scope:county = title:c_trier + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_western_tetrarch_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_western_tetrarch_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_tangiers + scope:county = title:c_tourraine + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_long_lost_province_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_long_lost_province_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_edessa + scope:county = title:c_bari + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_long_contested_province_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_long_contested_province_modifier + years = 10 + } + } + else_if = { + limit = { + OR = { + scope:county = title:c_siracusa + scope:county = title:c_chandax + } + } + scope:county = { + add_county_modifier = { + modifier = ep3_medi_gem_county_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_medi_gem_modifier + years = 10 + } + } + } + + 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 = { + any_owned_story = { + type = ep3_story_cycle_restoring_rome + } + } + } + create_story = ep3_story_cycle_restoring_rome + } + } +} + +# Courtiers grumble about you sending an imperial prince/princess to marry abroad among barbarians + +scripted_trigger emperor_2010_valid_child_trigger = { + is_adult = yes + is_married = yes + primary_spouse.culture = { + NOT = { has_cultural_pillar = heritage_byzantine } + } + liege.culture = { + NOT = { has_cultural_pillar = heritage_byzantine } + } + location.culture = { + NOT = { has_cultural_pillar = heritage_byzantine } + } + is_travelling = no + culture = { has_cultural_pillar = heritage_byzantine } +} + +scripted_trigger emperor_2010_valid_courtier_trigger = { + is_available_healthy_ai_adult = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + culture = { has_cultural_pillar = heritage_byzantine } +} + +ep3_emperor_yearly.2010 = { + type = character_event + title = ep3_emperor_yearly.2010.t + desc = ep3_emperor_yearly.2010.desc + theme = emperor + left_portrait = { + character = scope:gossip_1 + animation = eyeroll + } + right_portrait = { + character = scope:gossip_2 + animation = throne_room_conversation_1 + } + lower_center_portrait = scope:sent_off + cooldown = { years = 50 } + + trigger = { + is_available_adult = yes + valid_for_byz_emperor_content_trigger = yes + any_child = { + emperor_2010_valid_child_trigger = yes + } + any_courtier = { + count >= 2 + emperor_2010_valid_courtier_trigger = yes + } + } + + immediate = { + random_child = { + limit = { + emperor_2010_valid_child_trigger = yes + } + save_scope_as = sent_off + } + random_courtier = { + limit = { + emperor_2010_valid_courtier_trigger = yes + } + save_scope_as = gossip_1 + } + random_courtier = { + limit = { + emperor_2010_valid_courtier_trigger = yes + this != scope:gossip_1 + } + save_scope_as = gossip_2 + } + scope:sent_off.primary_spouse = { save_scope_as = spouse } + } + + #Option A: it was necessary + option = { + name = ep3_emperor_yearly.2010.a + add_character_modifier = { + modifier = ep3_politics_before_all_modifier + years = 40 + } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { + government_allows = administrative + } + change_influence = medium_influence_gain + } + else = { + add_prestige = medium_prestige_gain + } + stress_impact = { + arrogant = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + zealous = medium_stress_impact_gain + compassionate = major_stress_impact_gain + family_first = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = arrogant + } + modifier = { + add = -50 + has_trait = deceitful + } + modifier = { + add = 50 + has_trait = diplomat + } + modifier = { + add = 100 + has_trait = ambitious + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = family_first + } + } + } + + #Option B: a worthy sacrifice + option = { + name = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + text = ep3_emperor_yearly.2010.b + } + name = { + trigger = { + NOT = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + } + text = ep3_emperor_yearly.2010.b2 + } + add_character_modifier = { + modifier = ep3_everything_for_byz_modifier + years = 40 + } + add_piety = medium_piety_gain + stress_impact = { + cynical = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + add = 100 + } + modifier = { + has_trait = cynical + add = -50 + } + modifier = { + has_trait = humble + add = 75 + } + } + } + + #Option C: shut up + option = { + name = ep3_emperor_yearly.2010.c + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:gossip_1 + modifier = angry_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:gossip_2 + modifier = angry_opinion + opinion = -10 + } + stress_impact = { + humble = major_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + has_trait = arrogant + add = 100 + } + } + } +} + +# Byzantine-only: The Patriarch refuses to crown you as new emperor because you have a criminal trait (e.g. kinslayer) + +ep3_emperor_yearly.2020 = { + type = character_event + title = ep3_emperor_yearly.2020.t + desc = ep3_emperor_yearly.2020.desc + theme = emperor + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:patriarch + animation = anger + } + + trigger = { + has_ep3_dlc_trigger = yes + valid_for_byz_emperor_content_trigger = yes + exists = root.faith.religious_head + this != faith.religious_head + faith.religious_head = { + opinion = { + target = root + value <= 0 + } + location = root.location + } + has_any_criminal_trait_in_faith_trigger = { + CHARACTER = root + FAITH = root.faith + } + NOT = { has_character_flag = has_had_ep3_2020 } + } + + immediate = { + faith.religious_head = { save_scope_as = patriarch } + add_character_flag = has_had_ep3_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 } + } + save_scope_as = target_criminal_trait + } + } + + #Option A: repent + option = { + name = ep3_emperor_yearly.2020.a + flavor = ep3_emperor_yearly.2020.a.tt + change_influence = major_influence_loss + add_prestige = major_prestige_loss + custom_tooltip = ep3_emperor_yearly.2020.a.tt2 + + trigger_event = { + id = ep3_emperor_yearly.2021 + days = 366 + } + scope:patriarch = { + add_opinion = { + target = root + modifier = forgiven_opinion + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + cynical = major_stress_impact_gain + arrogant = major_stress_impact_gain + zealous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + has_trait = ambitious + add = -50 + } + modifier = { + has_trait = arrogant + add = -50 + } + } + } + + #Option B: ignore + option = { + name = ep3_emperor_yearly.2020.b + change_influence = major_influence_gain + add_prestige = major_prestige_gain + if = { + limit = { piety_level >= low_piety_level } + add_piety_level = -1 + } + else = { + add_piety = major_piety_loss + } + scope:patriarch = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -50 + } + } + + stress_impact = { + zealous = major_stress_impact_gain + humble = major_stress_impact_gain + arrogant = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + has_trait = zealous + add = -50 + } + modifier = { + has_trait = humble + add = -50 + } + } + } +} + +ep3_emperor_yearly.2021 = { + type = character_event + title = ep3_emperor_yearly.2021.t + desc = { + desc = ep3_emperor_yearly.2021.desc + first_valid = { + triggered_desc = { + trigger = { scope:patriarch = { is_alive = yes } } + desc = ep3_emperor_yearly.2021.desc_patriarch + } + desc = ep3_emperor_yearly.2021.desc_patriarch_new + } + desc = ep3_emperor_yearly.2021.desc_end + } + theme = crown + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:patriarch_portrait + animation = wedding_priest + } + lower_right_portrait = { + 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 = { + CHARACTER = root + FAITH = root.faith + } + } + + immediate = { + if = { + limit = { + scope:patriarch = { + is_alive = yes + faith = scope:patriarch.faith + } + } + scope:patriarch = { save_scope_as = patriarch_portrait } + } + else = { + faith.religious_head = { save_scope_as = patriarch_portrait } + } + } + + option = { + name = ep3_emperor_yearly.2021.a + add_legitimacy = minor_legitimacy_gain + remove_trait = scope:target_criminal_trait + } +} + +# The Patriarch refuses to crown a new emperor after a coup +scripted_trigger valid_clergy_gender_trigger = { + trigger_if = { + limit = { + root.faith = { has_doctrine_parameter = clergy_must_be_male } + } + is_male = yes + } + trigger_else_if = { + limit = { + root.faith = { has_doctrine_parameter = clergy_must_be_female } + } + is_male = no + } + trigger_else = { + always = yes + } + is_available_ai_adult = yes + has_education_learning_trigger = yes +} + +ep3_emperor_yearly.2030 = { + type = character_event + title = ep3_emperor_yearly.2030.t + desc = ep3_emperor_yearly.2030.desc + theme = crown + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:patriarch + animation = anger + } + lower_center_portrait = scope:predecessor + lower_left_portrait = scope:new_patriarch + + trigger = { + exists = faith.religious_head + root != root.faith.religious_head + title:e_byzantium.previous_holder = { is_alive = yes } + faith.religious_head = { + opinion = { + target = root + value <= 0 + } + } + faith.religious_head = { + opinion = { + target = title:e_byzantium.previous_holder + value > 40 + } + } + # You have already had an event about the Patriarch complaining! + NOT = { has_character_flag = has_had_ep3_2020 } + } + + immediate = { + faith.religious_head = { save_scope_as = patriarch } + title:e_byzantium.previous_holder = { save_scope_as = predecessor } + hidden_effect = { + if = { + limit = { + any_courtier = { + valid_clergy_gender_trigger = yes + is_available_ai_adult = yes + } + } + random_courtier = { + limit = { + house = root.house + valid_clergy_gender_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { + valid_clergy_gender_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { + valid_clergy_gender_trigger = yes + } + save_scope_as = new_patriarch + add_character_flag = { + flag = need_priest_outfit + } + } + } + else_if = { + limit = { + any_pool_character = { + province = root.location + is_available_ai_adult = yes + valid_clergy_gender_trigger = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + valid_clergy_gender_trigger = yes + } + save_scope_as = new_patriarch + add_character_flag = { + flag = need_priest_outfit + } + } + } + else = { + create_character = { + template = priest_character_template + location = root.location + save_scope_as = new_patriarch + } + scope:new_patriarch = { + add_character_flag = patriarch_created + } + } + scope:new_patriarch = { + add_trait = loyal + } + } + #needed for loc + root = { save_scope_as = root_scope } + } + + # Option A: then it's time for a change! + option = { + name = ep3_emperor_yearly.2030.a + custom_tooltip = ep3_emperor_yearly.2030.a.tt + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + faith.religious_head_title = { + change_title_holder = { + holder = scope:new_patriarch + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + scope:patriarch = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -100 + } + } + scope:new_patriarch = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 60 + } + } + add_hook = { + target = scope:new_patriarch + type = favor_hook + } + every_vassal = { + vassal_stance = zealot + limit = { + this != scope:new_patriarch + } + custom = every_zealot_vassal + add_opinion = { + modifier = impious_opinion + target = root + opinion = -25 + } + } + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 20 + } + } + stress_impact = { + zealous = massive_stress_impact_gain + ambitious = minor_stress_impact_loss + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = 0.5 + } + modifier = { + has_trait = ambitious + add = 100 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + #Option B: I'll prove my worth + option = { + name = ep3_emperor_yearly.2030.b + add_character_modifier = { + modifier = ep3_emperor_proving_themselves_modifier + years = 15 + } + custom_tooltip = patriarch_support_2030_desc_tt + scope:predecessor = { + add_character_flag = { + flag = patriarch_support_2030 + years = 15 + } + } + stress_impact = { + humble = medium_stress_impact_gain + lazy = major_stress_impact_gain + content = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { + if = { + limit = { + has_character_flag = has_had_ep3_2020 + } + remove_character_flag = has_had_ep3_2020 + } + if = { + limit = { + is_ai = yes + scope:new_patriarch = { + this != root.faith.religious_head + has_character_flag = patriarch_created + } + } + scope:new_patriarch = { silent_disappearance_effect = yes } + } + } +} + +# Patriarch who dislikes you protests you remarrying +ep3_emperor_yearly.2040 = { + type = character_event + title = ep3_emperor_yearly.2040.t + desc = ep3_emperor_yearly.2040.desc + theme = emperor + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:patriarch + animation = anger + } + lower_left_portrait = scope:new_wife + + lower_right_portrait = scope:new_patriarch + + trigger = { + valid_for_byz_emperor_content_trigger = yes + faith = { + NOR = { + has_doctrine = doctrine_polygamy + has_doctrine = doctrine_concubines + } + } + exists = faith.religious_head + root != root.faith.religious_head + faith.religious_head = { + opinion = { + target = root + value <= 20 + } + } + #Only dead previous spouses: if divorce is disallowed by your faith, you can't have previous spouses who are alive; if divorce is allowed, there is no reason to nag about your previous spouses; if divorce is approved (by the HoF), it means that the previous wedding has been annuled, so there's nothing to complain about. + any_former_spouse = { + even_if_dead = yes + is_alive = no + count >= 2 + } + NOT = { has_character_flag = ep3_has_had_2040 } + } + + immediate = { + add_character_flag = ep3_has_had_2040 + faith.religious_head = { save_scope_as = patriarch } + primary_spouse = { save_scope_as = new_wife } + random_former_spouse = { + even_if_dead = yes + limit = { is_alive = no } + save_scope_as = old_wife_1 + } + random_former_spouse = { + even_if_dead = yes + limit = { + is_alive = no + this != scope:old_wife_1 + } + save_scope_as = old_wife_2 + } + hidden_effect = { + create_character = { + template = priest_character_template + location = root.location + save_scope_as = new_patriarch + } + scope:new_patriarch = { + add_trait = loyal + } + } + #needed for loc + root = { save_scope_as = root_scope } + } + + #Option A: replace him! + option = { + name = ep3_emperor_yearly.2040.a + custom_tooltip = ep3_emperor_yearly.2030.a.tt + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + faith.religious_head_title = { + change_title_holder = { + holder = scope:new_patriarch + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + add_piety = major_piety_loss + scope:patriarch = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -100 + } + } + scope:new_patriarch = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 60 + } + } + add_hook = { + target = scope:new_patriarch + type = favor_hook + } + every_vassal = { + vassal_stance = zealot + limit = { + this != scope:new_patriarch + } + custom = every_zealot_vassal + add_opinion = { + modifier = impious_opinion + target = root + opinion = -35 + } + } + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 10 + } + } + stress_impact = { + zealous = massive_stress_impact_gain + content = major_stress_impact_gain + ambitious = minor_stress_impact_loss + lustful = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = 0.5 + } + modifier = { + has_trait = ambitious + add = 100 + } + modifier = { + has_trait = lustful + add = 50 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + #Option B: bribe + option = { + name = ep3_emperor_yearly.2040.b + add_piety = medium_piety_loss + pay_short_term_gold = { + target = scope:patriarch + gold = major_gold_value + } + scope:patriarch = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + add_character_modifier = { + modifier = ep3_blessed_union_modifier + years = 25 + } + stress_impact = { + honest = major_stress_impact_gain + greedy = major_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = -0.5 + } + } + } + + #Option C: you try to convince him it's fine + option = { + name = ep3_emperor_yearly.2040.c + duel = { + target = scope:patriarch + skills = { diplomacy learning } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2040.c.success + send_interface_toast = { + title = ep3_emperor_yearly.2040.c.success.tt + left_icon = scope:patriarch + add_character_modifier = { + modifier = ep3_blessed_union_modifier + years = 25 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2040.c.failure + send_interface_toast = { + title = ep3_emperor_yearly.2040.c.failure.tt + left_icon = scope:patriarch + add_character_modifier = { + modifier = ep3_non_blessed_union_modifier + years = 25 + } + } + } + } + stress_impact = { + shy = major_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_energy = 1 + } + } + } +} + +# Flavor event hailing the new emperor, recounting when and if their family last held the throne +ep3_emperor_yearly.2050 = { + type = character_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:last_emperor + } + desc = ep3_emperor_yearly.2050.t2 + } + desc = ep3_emperor_yearly.2050.t + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:last_emperor + } + desc = ep3_emperor_yearly.2050.desc + } + desc = ep3_emperor_yearly.2050.desc_first + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = diplomacy } + } + desc = ep3_emperor_yearly.2050.desc_diplo + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = martial } + } + desc = ep3_emperor_yearly.2050.desc_martial + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = stewardship } + } + desc = ep3_emperor_yearly.2050.desc_stewardship + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = intrigue } + } + desc = ep3_emperor_yearly.2050.desc_intrigue + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill = learning } + } + desc = ep3_emperor_yearly.2050.desc_learning + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + scope:last_emperor = { highest_skill_including_prowess = prowess } + } + desc = ep3_emperor_yearly.2050.desc_prowess + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + } + desc = ep3_emperor_yearly.2050.desc_fallback + } + desc = ep3_emperor_yearly.2050.desc_first_accomplish + } + triggered_desc = { + trigger = { + exists = scope:last_emperor + } + desc = ep3_emperor_yearly.2050.desc_body + } + } + theme = crown + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = personality_bold + } + + lower_right_portrait = { + trigger = { exists = scope:last_emperor } + character = scope:last_emperor + } + + immediate = { + #scope:title comes from the on_action that triggers the event + scope:title = { + if = { + limit = { + any_past_holder = { + house = root.house + this != root + } + } + ordered_past_holder_reversed = { + limit = { + house = root.house + this != root + } + position = 1 + save_scope_as = last_emperor + } + } + } + } + + option = { + name = ep3_emperor_yearly.2050.a + } +} + +# Hold Court event: Councillor/court position asks you to organize a large celebration for the anniversary of the foundation of Constantinople (11 May) +scripted_trigger valid_date_foundation_constantinople_trigger = { + OR = { + AND = { + current_date > 923.5.11 + current_date <= 924.5.11 + } + AND = { + current_date > 1023.5.11 + current_date <= 1024.5.11 + } + AND = { + current_date > 1123.5.11 + current_date <= 1124.5.11 + } + AND = { + current_date > 1223.5.11 + current_date <= 1224.5.11 + } + AND = { + current_date > 1323.5.11 + current_date <= 1324.5.11 + } + AND = { + current_date > 1423.5.11 + current_date <= 1424.5.11 + } + } +} + +ep3_emperor_yearly.2060 = { + type = court_event + title = ep3_emperor_yearly.2060.t + desc = { + desc = ep3_emperor_yearly.2060.desc + triggered_desc = { + trigger = { + OR = { + valid_date_foundation_constantinople_trigger = yes + AND = { + current_date > 1323.5.11 + current_date <= 1324.5.11 + } + } + } + desc = ep3_emperor_yearly.2060.desc_century + } + } + theme = court + court_scene = { + button_position_character = scope:2060_councillor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:2060_councillor = { + group = petitioners_group + animation = personality_honorable + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + valid_for_byz_emperor_content_trigger = yes + # You have Constantinople! + any_realm_county = { + this = title:c_byzantion + } + OR = { + cp:councillor_chancellor ?= { + has_court_event_flag = no + is_available_ai_adult = yes + } + cp:councillor_steward ?= { + has_court_event_flag = no + is_available_ai_adult = yes + } + any_court_position_holder = { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + capital_county = title:c_byzantion + add = 1 + } + # The foundation was in 324 - we wanna make it more likely if it's X centuries + modifier = { + valid_date_foundation_constantinople_trigger = yes + add = 4 + } + # This is the 1000 years from foundation! + modifier = { + current_date > 1323.5.11 + current_date <= 1324.5.11 + add = 5 + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + if = { + limit = { + cp:councillor_chancellor ?= { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + cp:councillor_chancellor = { + save_scope_as = 2060_councillor + court_event_character_flag_effect = yes + } + } + else_if = { + limit = { + cp:councillor_steward ?= { + has_court_event_flag = no + is_available_ai_adult = yes + } + } + cp:councillor_steward = { + save_scope_as = 2060_councillor + court_event_character_flag_effect = yes + } + } + else = { + random_court_position_holder = { + limit = { + has_court_event_flag = no + is_available_ai_adult = yes + } + save_scope_as = 2060_councillor + court_event_character_flag_effect = yes + } + } + court_event_character_flag_effect = yes + # for loc + title:b_constantinople = { + save_scope_as = queen_city + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: greatest celebration for the century or millennia + option = { + name = ep3_emperor_yearly.2060.a + trigger = { + valid_date_foundation_constantinople_trigger = yes + } + title:c_byzantion = { + add_county_modifier = { + modifier = ep3_century_celebration_county_modifier + years = 5 + } + } + add_character_flag = { + flag = constantinople_birthday_flag + years = 5 + } + custom_tooltip = constantinople_birthday_flag_tt + remove_treasury_or_gold = major_treasury_or_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = major_stress_impact_gain + arrogant = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + generous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = 0.5 + } + } + } + + # Option B: celebration + option = { + name = ep3_emperor_yearly.2060.b + trigger = { + NOT = { + valid_date_foundation_constantinople_trigger = yes + } + } + title:c_byzantion = { + add_county_modifier = { + modifier = ep3_foundation_celebration_county_modifier + years = 5 + } + } + add_character_flag = { + flag = constantinople_birthday_flag + years = 5 + } + custom_tooltip = constantinople_birthday_flag_tt + remove_treasury_or_gold = major_treasury_or_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = major_stress_impact_gain + arrogant = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + generous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = 0.5 + } + } + } + # Option C: not the right time + option = { + name = ep3_emperor_yearly.2060.c + stress_impact = { + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + } + } + after = { + clear_court_event_participation = yes + scope:2060_councillor = { + clear_court_event_participation = yes + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Hold Court event: Foreigners bring exotic diplomatic gifts: what are you supposed to do with a giraffe?? +ep3_emperor_yearly.2070 = { + type = court_event + title = ep3_emperor_yearly.2070.t + desc = ep3_emperor_yearly.2070.desc + theme = court + court_scene = { + button_position_character = scope:ambassador + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:ambassador = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + lower_left_portrait = scope:ambassador_liege + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 25 } + + trigger = { + is_valid_for_east_asian_events_geo_trigger = no + has_ep3_dlc_trigger = yes + NOT = { + # You don't own any province where giraffes could reasonably be + any_realm_county = { + any_county_province = { + geographical_region = custom_sub_saharan_africa_immediate + } + } + + } + any_county_in_region = { + region = custom_sub_saharan_africa_immediate + holder = { is_ai = yes } + holder.top_liege = { is_ai = yes } + } + #Admin only + government_allows = administrative + #Admin Emperor + top_liege = this + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.2 + any_county_in_region = { + region = custom_sub_saharan_africa_immediate + faith.religion = root.faith.religion + } + } + modifier = { + add = 0.3 + any_county_in_region = { + region = custom_sub_saharan_africa_immediate + faith = root.faith + } + } + + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_county_in_region = { + region = custom_sub_saharan_africa_immediate + limit = { + holder = { is_ai = yes } + holder.top_liege = { is_ai = yes } + faith = root.faith + } + alternative_limit = { + holder = { is_ai = yes } + holder.top_liege = { is_ai = yes } + faith.religion = root.faith.religion + } + alternative_limit = { + holder = { is_ai = yes } + holder.top_liege = { is_ai = yes } + } + save_scope_as = giraffe_county + } + scope:giraffe_county.holder.top_liege = { + save_scope_as = ambassador_liege + } + create_character = { + template = ambassador_template + location = root.location + faith = scope:giraffe_county.faith + culture = scope:giraffe_county.culture + gender_female_chance = 50 + save_scope_as = ambassador + } + court_event_character_flag_effect = yes + scope:ambassador = { + court_event_character_flag_effect = yes + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + #Option A: accept gifts + option = { + name = ep3_emperor_yearly.2070.a + add_character_modifier = { + modifier = ep3_exotic_giraffe_modifier + years = 20 + } + if = { + limit = { + scope:ambassador_liege = { + in_diplomatic_range = root + } + } + scope:ambassador_liege = { + add_opinion = { + target = root + modifier = accepted_gift_opinion + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = gregarious + add = -25 + } + modifier = { + has_trait = zealous + add = -25 + } + } + } + + #Option B: bribe the ambassador + option = { + name = ep3_emperor_yearly.2070.b + flavor = ep3_emperor_yearly.2070.b.tt + duel = { + skills = { diplomacy intrigue } + target = scope:ambassador + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:ambassador.faith.religion = root.faith.religion + add = 10 + } + modifier = { + scope:ambassador.faith = root.faith + add = 10 + } + modifier = { + OR = { + scope:ambassador_liege = { has_royal_court = no } + scope:ambassador_liege = { + court_grandeur_current_level < root.court_grandeur_current_level + } + } + add = 15 + } + modifier = { + diplomacy >= high_skill_rating + add = 10 + } + modifier = { + legitimacy_level >= scope:ambassador_liege.legitimacy_level + add = 10 + } + #Everyone is impressed by your automata etc + modifier = { + valid_for_byz_emperor_content_trigger = yes + add = 10 + } + desc = ep3_emperor_yearly.2070.b.success + send_interface_toast = { + left_icon = scope:ambassador + title = ep3_emperor_yearly.2070.b.success.tt + add_courtier = scope:ambassador + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + faith = { + faith_hostility_level = { + target = scope:ambassador.faith + value > faith_astray_level + } + } + add = 15 + } + modifier = { + diplomacy <= mediocre_skill_rating + add = 10 + } + modifier = { + scope:ambassador_liege = { + court_grandeur_current_level > root.court_grandeur_current_level + } + add = 15 + } + desc = ep3_emperor_yearly.2070.b.failure + send_interface_toast = { + left_icon = scope:ambassador + title = ep3_emperor_yearly.2070.b.failure.tt + add_courtier = scope:ambassador + pay_short_term_gold = { + target = scope:ambassador + gold = medium_gold_value + } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = honest + add = -25 + } + modifier = { + has_trait = just + add = -25 + } + modifier = { + has_trait = paranoid + add = -25 + } + } + } + + #Option C: opt out + option = { + name = ep3_emperor_yearly.2070.c + flavor = ep3_emperor_yearly.2070.c.tt + add_treasury_or_gold = minor_treasury_or_gold_value + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + has_trait = lazy + add = 25 + } + } + } + + after = { + clear_court_event_participation = yes + if = { + limit = { + is_ai = yes + scope:ambassador = { liege != root } + } + scope:ambassador = { + silent_disappearance_effect = yes + } + } + else_if = { + limit = { + is_ai = no + scope:ambassador = { liege != root } + } + hidden_effect = { + scope:ambassador = { + move_to_pool_at = scope:ambassador_liege.capital_province + } + } + } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Someone suggests opening a (grammar) school for the poor +ep3_emperor_yearly.2080 = { + type = court_event + title = ep3_emperor_yearly.2080.t + desc = { + desc = ep3_emperor_yearly.2080.desc + first_valid = { + triggered_desc = { + trigger = { + valid_for_byz_emperor_content_trigger = yes + } + desc = ep3_emperor_yearly.2080.desc_byz + } + desc = ep3_emperor_yearly.2080.desc_gen + } + } + theme = court + court_scene = { + button_position_character = scope:school_proposer + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:school_proposer = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 25 } + + trigger = { + has_ep3_dlc_trigger = yes + #Only admin systems tolerate education as a mean for social advancement + government_allows = administrative + #Emperor + top_liege = this + #Not ongoing in the same capital + capital_county = { + NOT = { + has_county_modifier = ep3_grammar_school_county_modifier + } + } + #Ongoing building construction in the capital + capital_county = { + any_county_province = { + has_ongoing_construction = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + valid_for_byz_emperor_content_trigger = yes + } + modifier = { + add = 1 + employs_court_position = high_almoner_court_position + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + court_event_character_flag_effect = yes + capital_county = { + save_scope_as = school_county + } + if = { + limit = { + any_court_position_holder = { + type = high_almoner_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = high_almoner_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = school_proposer + } + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + cp:councillor_court_chaplain = { save_scope_as = school_proposer } + } + else = { + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = school_proposer + } + } + scope:school_proposer = { court_event_character_flag_effect = yes } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Build the school + option = { + name = ep3_emperor_yearly.2080.a + flavor = ep3_emperor_yearly.2080.a.tt + capital_county = { + add_county_modifier = { + modifier = ep3_school_building_county_modifier + years = 5 + } + } + trigger_event = { + id = ep3_emperor_yearly.2081 + years = 5 + } + remove_treasury_or_gold = medium_treasury_or_gold_value + stress_impact = { + greedy = major_stress_impact_gain + arrogant = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 1 + } + } + } + + # Option B: opt out + option = { + name = ep3_emperor_yearly.2080.b + stress_impact = { + compassionate = major_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_energy = -0.5 + } + } + } + + after = { + scope:school_proposer = { clear_court_event_participation = yes } + clear_court_event_participation = yes + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +ep3_emperor_yearly.2081 = { + hidden = yes + + trigger = { + scope:school_county.holder = root + } + + on_trigger_fail = { + scope:school_county.holder ?= { + trigger_event = ep3_emperor_yearly.2081 + } + } + + immediate = { + scope:school_county = { + add_county_modifier = { + modifier = ep3_grammar_school_county_modifier + years = 50 + } + } + } +} + +# Very popular mime is making offers and demands +ep3_emperor_yearly.2090 = { + type = court_event + title = ep3_emperor_yearly.2090.t + desc = ep3_emperor_yearly.2090.desc + theme = court + lower_right_portrait = scope:marshal + court_scene = { + button_position_character = scope:mime + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:mime = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + # Only Byz has famous mimes + valid_for_byz_emperor_content_trigger = yes + # Ongoing increase control task + cp:councillor_marshal ?= { + is_performing_council_task = task_increase_control + } + NOT = { employs_court_position = court_jester_court_position } + can_employ_court_position_type = court_jester_court_position + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_marshal = { + councillor_task_target ?= { + save_scope_as = control_target + } + } + if = { + limit = { + any_pool_character = { + province = root.location + has_character_flag = famous_mime + } + } + random_pool_character = { + province = root.location + limit = { + has_character_flag = famous_mime + } + save_scope_as = mime + } + } + else_if = { + limit = { + any_pool_character = { + province = root.location + culture = root.capital_county.culture + faith = { + this = root.capital_county.faith + has_dominant_ruling_gender = prev + } + diplomacy >= 14 + } + } + random_pool_character = { + province = root.location + limit = { + culture = root.capital_county.culture + faith = { + this = root.capital_county.faith + has_dominant_ruling_gender = prev + } + diplomacy >= 14 + } + save_scope_as = mime + } + hidden_effect = { + if = { + limit = { + scope:mime = { + NOT = { has_trait = shrewd } + } + } + scope:mime = { add_trait = shrewd } + } + if = { + limit = { + scope:mime = { + NOT = { has_trait = athletic } + } + } + scope:mime = { add_trait = athletic } + } + } + } + else = { + create_character = { + location = root.location + template = mime_template + save_scope_as = mime + } + } + scope:mime = { + court_event_character_flag_effect = yes + add_character_flag = famous_mime + } + cp:councillor_marshal = { + save_scope_as = marshal + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: hire to help + option = { + name = ep3_emperor_yearly.2090.a + add_courtier = scope:mime + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:mime + } + scope:mime = { + add_character_flag = famous_mime_control + } + custom_tooltip = ep3_emperor_yearly.2090.a.tt + stress_impact = { + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + # Option B: hire for yourself + option = { + name = ep3_emperor_yearly.2090.b + add_courtier = scope:mime + court_position_grant_effect = { + EMPLOYER = root + POS = court_jester + CANDIDATE = scope:mime + } + scope:mime = { + add_character_flag = famous_mime_court + } + custom_tooltip = ep3_emperor_yearly.2090.b.tt + stress_impact = { + diligent = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option C: opt out + option = { + name = ep3_emperor_yearly.2090.c + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + after = { + scope:mime = { + clear_court_event_participation = yes + } + clear_court_event_participation = yes + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Different copies of a diplomatic treaty with a neighbor don't match. +scripted_trigger 2100_valid_neighboring_county_trigger = { + any_neighboring_county = { + holder.top_liege = root + } + save_temporary_scope_as = check_county + NOT = { + root = { + has_claim_on = scope:check_county + } + } +} + +ep3_emperor_yearly.2100 = { + type = court_event + title = ep3_emperor_yearly.2100.t + desc = ep3_emperor_yearly.2100.desc + theme = court + court_scene = { + button_position_character = scope:chancellor + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:chancellor = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + top_liege = this + any_neighboring_top_liege_realm_owner = { + is_ai = yes + NOT = { is_at_war_with = root } + custom_tooltip = { + text = ep3_emperor_yearly.2100.angry_error_log + any_top_realm_border_county = { + 2100_valid_neighboring_county_trigger = yes + } + } + } + cp:councillor_chancellor ?= { + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + valid_for_byz_emperor_content_trigger = yes + } + modifier = { + add = 4 + cp:councillor_court_chaplain ?= { + is_performing_council_task = task_fabricate_claim + } + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_intrigue } + } + + immediate = { + court_event_character_flag_effect = yes + cp:councillor_chancellor = { + save_scope_as = chancellor + court_event_character_flag_effect = yes + } + random_neighboring_top_liege_realm_owner = { + limit = { + is_ai = yes + NOT = { is_at_war_with = root } + any_top_realm_border_county = { + 2100_valid_neighboring_county_trigger = yes + } + } + random_top_realm_border_county = { + limit = { + 2100_valid_neighboring_county_trigger = yes + } + save_scope_as = contested_county + } + save_scope_as = neighbor + } + random_top_realm_border_county = { + limit = { + any_neighboring_county = { + this = scope:contested_county + } + NOT = { + scope:neighbor = { has_claim_on = prev } + } + } + save_scope_as = our_county + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: try to gain claim + option = { + name = ep3_emperor_yearly.2100.a + duel = { + skill = diplomacy + target = scope:neighbor + 60 = { #Success: get claim + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2100.a.success + send_interface_toast = { + title = ep3_emperor_yearly.2100.a.success.tt + left_icon = scope:neighbor + add_pressed_claim = scope:contested_county + } + } + 35 = { #Failure: no claim + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2100.a.failure + send_interface_toast = { + title = ep3_emperor_yearly.2100.a.failure.tt + left_icon = scope:neighbor + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + } + } + 5 = { #Crit failure: get them a claim + trigger = { + exists = scope:our_county + } + compare_modifier = { + value = scope:duel_value + multiplier = -4.5 + } + desc = ep3_emperor_yearly.2100.a.crit_fail + send_interface_toast = { + title = ep3_emperor_yearly.2100.a.crit_fail.tt + left_icon = scope:neighbor + scope:neighbor = { + add_pressed_claim = scope:our_county + } + } + } + } + stress_impact = { + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -0.5 + } + } + } + + # Option B: let's collaborate + option = { + name = ep3_emperor_yearly.2100.b + trigger = { + NOR = { + has_truce = scope:neighbor + is_allied_to = scope:neighbor + } + } + add_truce_both_ways = { + character = scope:neighbor + years = 5 + name = TRUCE_COLLABORATION + } + scope:neighbor = { + add_opinion = { + target = root + modifier = collaborative_opinion + opinion = 30 + } + } + stress_impact = { + vengeful = medium_stress_impact_gain + callous = medium_stress_impact_gain + arrogant = major_stress_impact_gain + ambitious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 1 + } + } + } + + # Option C: opt out + option = { + name = ep3_emperor_yearly.2100.c + add_intrigue_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + + after = { + clear_court_event_participation = yes + scope:chancellor = { clear_court_event_participation = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Merchants of a foreign culture offer their services as translators and interpreters. +ep3_emperor_yearly.2110 = { + type = court_event + title = ep3_emperor_yearly.2110.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = scope:provincial_culture + } + desc = ep3_emperor_yearly.2110.desc_same + } + desc = ep3_emperor_yearly.2110.desc_other + } + desc = ep3_emperor_yearly.2110.desc + } + theme = court + court_scene = { + button_position_character = scope:merchant + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:merchant = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + OR = { + has_ep3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + government_allows = administrative + top_liege = this + any_realm_county = { + culture != root.capital_county.culture + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + valid_for_byz_emperor_content_trigger = yes + } + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + court_event_character_flag_effect = yes + root.capital_county.culture = { save_scope_as = capital_culture } + random_realm_county = { + limit = { + culture != scope:capital_culture + } + save_scope_as = provincial_county + culture = { save_scope_as = provincial_culture } + } + random_pool_character = { + province = scope:provincial_county.title_province + limit = { + stewardship >= 14 + culture = scope:provincial_culture + } + save_scope_as = merchant + } + if = { + limit = { + exists = scope:merchant + } + scope:merchant = { + hidden_effect = { + move_to_pool_at = root.location + learn_language_of_culture = scope:capital_culture + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + add_random_tiered_trait_track_xp_effect = { + TRAIT = lifestyle_traveler + TRACK = travel + LEVEL_1 = yes + LEVEL_3 = no + } + add_random_tiered_trait_track_xp_effect = { + TRAIT = lifestyle_traveler + TRACK = danger + LEVEL_1 = yes + LEVEL_3 = no + } + } + } + } + } + else = { + create_character = { + location = root.location + template = good_merchant_template + culture = scope:provincial_culture + faith = scope:provincial_county.faith + save_scope_as = merchant + } + hidden_effect = { + scope:merchant = { + if = { + limit = { + NOT = { + knows_language_of_culture = scope:capital_culture + } + } + learn_language_of_culture = scope:capital_culture + } + add_character_flag = created + } + } + } + scope:merchant = { court_event_character_flag_effect = yes } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Send to local administration + option = { + name = ep3_emperor_yearly.2110.a + scope:capital_culture = { + change_cultural_acceptance = { + target = scope:provincial_culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + scope:merchant = { + hidden_effect = { + move_to_pool_at = scope:provincial_county + } + } + #Governor + scope:provincial_county.duchy.holder = { + hidden_effect = { add_courtier = scope:merchant } + } + stress_impact = { + ambitious = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + modifier = { + has_trait = ambitious + add = -25 + } + } + } + + # Option B: Send to central administration + option = { + name = ep3_emperor_yearly.2110.b + scope:capital_culture = { + change_cultural_acceptance = { + target = scope:provincial_culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + add_courtier = scope:merchant + change_influence = medium_influence_gain + pay_treasury_or_gold = { + target = scope:merchant + value = minor_treasury_or_gold_value + } + stress_impact = { + lazy = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + has_trait = lazy + add = -25 + } + } + } + + # Option C: opt out + option = { + name = ep3_emperor_yearly.2110.c + add_prestige = minor_prestige_gain + scope:merchant = { add_character_flag = unused } + stress_impact = { + gregarious = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + after = { + scope:merchant = { + clear_court_event_participation = yes + if = { + limit = { + root = { is_ai = yes } + has_character_flag = created + has_character_flag = unused + } + silent_disappearance_effect = yes + } + } + clear_court_event_participation = yes + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Your Byz spouse or child-in-law at court is accused of being arrogant and pretentious +scripted_trigger 2120_valid_byz_spouse_trigger = { + is_alive = yes + culture = { has_cultural_pillar = heritage_byzantine } + location = root.location + is_available_ai_adult = yes +} +scripted_trigger 2120_valid_non_byz_complainer_trigger = { + culture = { + NOT = { has_cultural_pillar = heritage_byzantine } + } + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + is_available_ai_adult = yes + location = root.location +} + +ep3_emperor_yearly.2120 = { + type = court_event + title = ep3_emperor_yearly.2120.t + desc = ep3_emperor_yearly.2120.desc + theme = court + court_scene = { + button_position_character = scope:complainer + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:complainer = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + # You and your capital are not Byz + NOR = { + culture = { + has_cultural_pillar = heritage_byzantine + } + capital_county.culture = { + has_cultural_pillar = heritage_byzantine + } + } + # You have a spouse or in-law at court who is Byz + OR = { + any_spouse = { + 2120_valid_byz_spouse_trigger = yes + save_temporary_scope_as = byz_char + } + any_child = { + any_spouse = { + 2120_valid_byz_spouse_trigger = yes + save_temporary_scope_as = byz_char + } + } + } + # Someone who could complain + any_courtier = { + 2120_valid_non_byz_complainer_trigger = yes + NOT = { is_close_family_of = scope:byz_char } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + immediate = { + court_event_character_flag_effect = yes + random_spouse = { + limit = { + 2120_valid_byz_spouse_trigger = yes + } + save_scope_as = the_byz + } + if = { + limit = { + NOT = { exists = scope:the_byz } + } + random_child = { + limit = { + any_spouse = { + 2120_valid_byz_spouse_trigger = yes + } + } + random_spouse = { + limit = { + 2120_valid_byz_spouse_trigger = yes + } + save_scope_as = the_byz + } + } + } + random_courtier = { + limit = { + 2120_valid_non_byz_complainer_trigger = yes + NOT = { is_close_family_of = scope:the_byz } + } + save_scope_as = complainer + } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: side with Byz + option = { + name = ep3_emperor_yearly.2120.a + culture = { + change_cultural_acceptance = { + target = scope:the_byz.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + scope:the_byz = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + temperate = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + add = -25 + } + modifier = { + has_trait = temperate + add = -25 + } + modifier = { + has_trait = content + add = -25 + } + } + } + + # Option B: side with courtier + option = { + name = ep3_emperor_yearly.2120.b + culture = { + change_cultural_acceptance = { + target = scope:the_byz.culture + value = miniscule_negative_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + add_character_modifier = { + modifier = defender_of_values_modifier + years = 15 + } + scope:the_byz = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + stress_impact = { + humble = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = ambitious + add = -25 + } + modifier = { + has_trait = fickle + add = -25 + } + } + } + + # Option C: opt out + option = { + name = ep3_emperor_yearly.2120.c + stress_impact = { + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + has_trait = diligent + add = -25 + } + } + } + + after = { + clear_court_event_participation = yes + scope:complainer = { clear_court_event_participation = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +#A prisoner (house arrest) is allowed into the court to plead for freedom +ep3_emperor_yearly.2130 = { + type = court_event + title = ep3_emperor_yearly.2130.t + desc = ep3_emperor_yearly.2130.desc + theme = court + court_scene = { + button_position_character = scope:prisoner + court_event_force_open = yes + show_timeout_info = no + should_pause_time = yes + roles = { + scope:prisoner = { + group = petitioners_group + animation = obsequious_bow + } + } + } + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + top_liege = this + any_prisoner = { + is_in_prison_type = house_arrest + is_ai = yes + age >= 14 + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_administrative } + } + + immediate = { + court_event_character_flag_effect = yes + random_prisoner = { + limit = { + is_in_prison_type = house_arrest + is_ai = yes + age >= 14 + } + save_scope_as = prisoner + } + scope:prisoner = { court_event_character_flag_effect = yes } + # Trigger next event in chain. + hold_court_queue_next_event_effect = yes + } + + # Option A: Pardon + option = { + name = ep3_emperor_yearly.2130.a + scope:prisoner = { release_from_prison = yes } + consume_all_criminal_reasons_effect = { + LIEGE = root + CRIMINAL = scope:prisoner + } + if = { + limit = { + can_add_hook = { + target = scope:prisoner + type = favor_hook + } + } + add_hook = { + target = scope:prisoner + type = favor_hook + } + } + change_influence = minor_influence_gain + stress_impact = { + forgiving = major_stress_impact_loss + compassionate = major_stress_impact_loss + just = medium_stress_impact_loss + vengeful = massive_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + } + } + } + + # Option B: Require support + option = { + name = ep3_emperor_yearly.2130.b + trigger = { + scope:prisoner = { + government_allows = administrative + is_vassal_or_below_of = root + is_landed_or_landless_administrative = yes + } + } + scope:prisoner = { + release_from_prison = yes + change_influence = major_influence_loss + } + change_influence = major_influence_gain + stress_impact = { + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = major_stress_impact_gain + content = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + } + } + + # Option C: work for me + option = { + name = ep3_emperor_yearly.2130.c + trigger = { + scope:prisoner = { + NOR = { + is_vassal_or_below_of = root + is_landed_or_landless_administrative = yes + is_landed = yes + } + } + } + scope:prisoner = { release_from_prison = yes } + hidden_effect = { add_courtier = scope:prisoner } + custom_tooltip = { + text = ep3_emperor_yearly.2130.c.tt + add_character_flag = ep3_2130_ex_prisoner + } + stress_impact = { + honest = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + # Option D: ask for troops + option = { + name = ep3_emperor_yearly.2130.d + trigger = { + scope:prisoner = { + is_landed = yes + NOT = { is_vassal_or_below_of = root } + } + } + scope:prisoner = { + release_from_prison = yes + add_character_modifier = { + modifier = ep3_mercenaries_abroad_modifier + years = 10 + } + } + add_character_modifier = { + modifier = ep3_mercenaries_from_abroad_modifier + years = 10 + } + stress_impact = { + craven = medium_stress_impact_gain + honest = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + # Option E: Ignore + option = { + name = ep3_emperor_yearly.2130.e + add_prestige = minor_prestige_gain + stress_impact = { + base = minor_stress_impact_gain + } + ai_chance = { + base = 75 + modifier = { + has_trait = vengeful + add = 25 + } + modifier = { + has_trait = deceitful + add = -25 + } + modifier = { + has_trait = forgiving + add = -25 + } + } + } + + after = { + clear_court_event_participation = yes + scope:prisoner = { clear_court_event_participation = yes } + # Finish up the chain if relevant. + hold_court_queue_post_event_effect = yes + } +} + +# Plunder the tombs of previous emperors if in debt + +ep3_emperor_yearly.2140 = { + type = character_event + title = ep3_emperor_yearly.2140.t + desc = ep3_emperor_yearly.2140.desc + theme = emperor + override_background = { reference = ep3_constantinople } + left_portrait = { + character = root + animation = personality_greedy + } + cooldown = { years = 50 } + + trigger = { + valid_for_byz_emperor_content_trigger = yes + gold < 0 + } + + weight_multiplier = { + base = 1 + modifier = { + gold < -150 + add = 1 + } + modifier = { + gold < -300 + add = 2 + } + modifier = { + factor = 0.5 + has_trait = zealous + } + } + + # Option A: Let's do it + option = { + name = ep3_emperor_yearly.2140.a + add_treasury_or_gold = major_treasury_or_gold_value + add_character_modifier = { + modifier = ep3_grave_robber_modifier + years = 20 + } + root.capital_province = { + add_province_modifier = { + modifier = ep3_imperial_tombs_violated_province_modifier + years = 10 + } + } + stress_impact = { + zealous = massive_stress_impact_gain + gregarious = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Option B: Not worth it + option = { + name = ep3_emperor_yearly.2140.b + add_piety = minor_piety_gain + change_influence = minor_influence_gain + stress_impact = { + greedy = massive_stress_impact_gain + diligent = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } +} + +# Governor/Emperor: You are told about a new Stylite "saint" in your area + +ep3_emperor_yearly.2150 = { + type = character_event + title = ep3_emperor_yearly.2150.t + desc = { + desc = ep3_emperor_yearly.2150.desc + first_valid = { + triggered_desc = { + trigger = { + scope:saint = { has_nickname = nick_the_stylite } + } + desc = ep3_emperor_yearly.2150.desc.stylite + } + triggered_desc = { + trigger = { + scope:saint = { has_nickname = nick_the_grazer } + } + desc = ep3_emperor_yearly.2150.desc.grazer + } + triggered_desc = { + trigger = { + scope:saint = { has_nickname = nick_the_iron_wearer } + } + desc = ep3_emperor_yearly.2150.desc.iron + } + } + desc = ep3_emperor_yearly.2150.desc.end + } + theme = administrative + left_portrait = { + character = root + animation = thinking + } + lower_right_portrait = scope:saint + cooldown = { years = 25 } + + trigger = { + OR = { + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + any_sub_realm_county = { + faith = faith:orthodox + } + } + + weight_multiplier = { + base = 1 + #More common in early dates + modifier = { + add = 1 + current_date < 1000.1.1 + } + modifier = { + add = 1 + has_trait = zealous + } + modifier = { + add = 1 + has_trait = cynical + } + modifier = { + is_ai = yes + factor = 0.1 + } + } + + immediate = { + if = { + limit = { + capital_province.county.faith = faith:orthodox + } + capital_province = { + save_scope_as = capital + } + } + else = { + random_sub_realm_county = { + limit = { + faith = faith:orthodox + } + random_province = { + save_scope_as = capital + } + } + } + random_pool_character = { + province = root.location + limit = { + faith = faith:orthodox + can_be_clergy_due_to_gender_trigger = yes + is_available_ai_adult = yes + OR = { + has_trait = eccentric + has_trait = zealous + has_trait = saint + has_trait = lifestyle_mystic + has_nickname = nick_the_stylite + has_nickname = nick_the_grazer + has_nickname = nick_the_iron_wearer + } + learning >= 16 + } + save_scope_as = saint + } + if = { + limit = { + NOT = { exists = scope:saint } + } + create_character = { + template = stylite_saint_character + faith = faith:orthodox + culture = scope:capital.county.culture + location = root.location + save_scope_as = saint + } + } + hidden_effect = { + if = { + limit = { + scope:saint = { + NOT = { + has_trait = eccentric + } + } + } + scope:saint = { + add_trait = eccentric + } + } + scope:saint = { + add_trait = inappetetic + add_trait = wounded_1 + change_current_weight = -50 + random_list = { + # is a holy man + 50 = { + add_character_flag = real_holy_man + modifier = { + has_trait = zealous + add = 20 + } + modifier = { + has_trait = education_learning_1 + add = 5 + } + modifier = { + has_trait = education_learning_2 + add = 10 + } + modifier = { + has_trait = education_learning_3 + add = 15 + } + modifier = { + has_trait = education_learning_4 + add = 20 + } + modifier = { + has_trait = saint + add = 25 + } + modifier = { + has_trait = lifestyle_mystic + add = 15 + } + modifier = { + has_trait = honest + add = 15 + } + modifier = { + has_trait = scholar + add = 10 + } + modifier = { + has_trait = theologian + add = 10 + } + modifier = { + has_trait = chaste + add = 10 + } + modifier = { + has_trait = temperate + add = 10 + } + modifier = { + has_trait = wrathful + add = 15 + } + modifier = { + has_trait = arrogant + add = 10 + } + modifier = { + has_trait = humble + add = 10 + } + modifier = { + has_trait = arbitrary + add = 15 + } + modifier = { + has_trait = callous + add = 10 + } + modifier = { + has_trait = reclusive + add = 25 + } + } + # is a crook + 50 = { + add_character_flag = is_a_crook + modifier = { + has_trait = education_intrigue_1 + add = 5 + } + modifier = { + has_trait = education_intrigue_2 + add = 10 + } + modifier = { + has_trait = education_intrigue_3 + add = 15 + } + modifier = { + has_trait = education_intrigue_4 + add = 20 + } + modifier = { + has_trait = whole_of_body + add = 15 + } + modifier = { + has_trait = deceitful + add = 20 + } + modifier = { + has_trait = lifestyle_reveler + add = 30 + } + modifier = { + has_trait = lustful + add = 10 + } + modifier = { + has_trait = greedy + add = 10 + } + modifier = { + has_trait = patient + add = 15 + } + modifier = { + has_trait = brave + add = 15 + } + modifier = { + has_trait = paranoid + add = 10 + } + modifier = { + has_trait = compassionate + add = 15 + } + } + } + random_list = { + 33 = { + give_nickname = nick_the_stylite + } + 33 = { + give_nickname = nick_the_grazer + } + 33 = { + give_nickname = nick_the_iron_wearer + } + } + } + } + } + + #Option A: all hail the saint! + option = { + name = ep3_emperor_yearly.2150.a + flavor = ep3_emperor_yearly.2150.a.tt + pay_treasury_or_gold = { + target = scope:saint + value = minor_treasury_or_gold_value + } + if = { + limit = { + can_employ_court_position_type = cave_hermit_court_position + scope:saint = { can_be_employed_as = cave_hermit_court_position } + } + court_position_grant_effect = { + EMPLOYER = root + POS = cave_hermit + CANDIDATE = scope:saint + } + } + scope:capital.county = { + change_county_control = major_county_control_gain + } + add_piety = minor_piety_gain + stress_impact = { + cynical = major_stress_impact_gain + comfort_eater = medium_stress_impact_gain + just = minor_stress_impact_gain + greedy = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = -0.5 + } + modifier = { + treasury_or_gold < tiny_treasury_or_gold_value + factor = 0 + } + modifier = { + has_trait = cynical + factor = 0 + } + } + } + + #Option B: put him to the test + option = { + name = ep3_emperor_yearly.2150.b + duel = { + skills = { intrigue learning } + target = scope:saint + # you find the truth + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2150.b.tt.success + show_as_tooltip = { + if = { + limit = { + top_liege = this + } + change_influence = major_influence_gain + } + else = { + add_character_flag = { + flag = ep3_2150_found_truth + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2150.b.tt + change_influence = minor_influence_gain + } + random_list = { + 50 = { + show_chance = no + desc = ep3_emperor_yearly.2150.b.tt.holy + scope:capital.county = { + add_county_modifier = { + modifier = land_of_holy_county_modifier + years = 25 + } + } + } + 50 = { + show_chance = no + desc = ep3_emperor_yearly.2150.b.tt.crook + scope:capital.county = { + add_county_modifier = { + modifier = no_crooks_county_modifier + years = 25 + } + } + } + } + } + hidden_effect = { + send_interface_toast = { + title = ep3_emperor_yearly.2150.b.tt.success + left_icon = scope:saint + type = event_generic_neutral + if = { + limit = { + top_liege = this + } + change_influence = major_influence_gain + } + else = { + add_character_flag = { + flag = ep3_2150_found_truth + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2150.b.tt + change_influence = minor_influence_gain + } + if = { + limit = { + scope:saint = { has_character_flag = real_holy_man } + } + custom_tooltip = ep3_emperor_yearly.2150.b.tt.holy + scope:capital.county = { + add_county_modifier = { + modifier = land_of_holy_county_modifier + years = 25 + } + } + } + else = { + custom_tooltip = ep3_emperor_yearly.2150.b.tt.crook + scope:capital.county = { + add_county_modifier = { + modifier = no_crooks_county_modifier + years = 25 + } + } + } + } + } + } + # you have no idea + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2150.b.tt.failure + send_interface_toast = { + title = ep3_emperor_yearly.2150.b.tt.failure + left_icon = scope:saint + type = event_generic_neutral + custom_tooltip = ep3_emperor_yearly.2150.b.tt.continue + change_influence = minor_influence_loss + } + scope:saint = { add_character_flag = follow_up_2150 } + trigger_event = { + id = ep3_emperor_yearly.2151 + years = 3 + } + } + } + stress_impact = { + lazy = major_stress_impact_gain + arbitrary = major_stress_impact_gain + fickle = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.5 + } + modifier = { + has_trait = lazy + add = -75 + } + } + } + + #Option C: he's clearly a fake! + option = { + name = ep3_emperor_yearly.2150.c + scope:capital.county = { + change_county_control = minor_county_control_loss + } + if = { + limit = { + top_liege = this + } + change_influence = medium_influence_gain + } + else = { + increase_governance_effect = { VALUE = 2 } + change_influence = miniscule_influence_gain + } + stress_impact = { + zealous = major_stress_impact_gain + diligent = medium_stress_impact_gain + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = 0.5 + } + } + } + + after = { + if = { + limit = { + scope:saint = { + NOT = { + has_character_flag = follow_up_2150 + } + } + } + scope:saint = { + remove_character_flag = real_holy_man + remove_character_flag = is_a_crook + } + if = { + limit = { + is_ai = yes + scope:saint = { has_any_court_position = no } + } + scope:saint = { silent_disappearance_effect = yes } + } + } + } +} + +ep3_emperor_yearly.2151 = { + type = character_event + title = ep3_emperor_yearly.2150.t + desc = { + desc = ep3_emperor_yearly.2151.desc + first_valid = { + triggered_desc = { + trigger = { + scope:saint = { has_character_flag = real_holy_man } + } + desc = ep3_emperor_yearly.2151.desc_saint + } + desc = ep3_emperor_yearly.2151.desc_crook + } + } + theme = administrative + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chaplain + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_right_portrait = scope:saint + + trigger = { + scope:saint = { is_alive = yes } + OR = { + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + any_sub_realm_county = { + faith = faith:orthodox + this = scope:capital.county + } + exists = cp:councillor_court_chaplain + } + + on_trigger_fail = { + if = { + limit = { + scope:saint = { is_alive = yes } + } + scope:saint = { + remove_character_flag = real_holy_man + remove_character_flag = is_a_crook + remove_character_flag = follow_up_2150 + } + } + } + + immediate = { + if = { + limit = { + scope:saint = { has_character_flag = real_holy_man } + } + scope:capital.county = { + add_county_modifier = { + modifier = ep3_persecuting_saints_county_modifier + years = 5 + } + } + } + else = { + scope:capital.county = { + add_county_modifier = { + modifier = ep3_conmen_among_us_county_modifier + years = 5 + } + } + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { + name = ep3_emperor_yearly.2151.a + } + + after = { + scope:saint = { + remove_character_flag = real_holy_man + remove_character_flag = is_a_crook + remove_character_flag = follow_up_2150 + } + if = { + limit = { + is_ai = yes + } + scope:saint = { silent_disappearance_effect = yes } + } + } +} + +# Governor: If you border with nomadic people, they keep moving people into your borders + +scripted_trigger ep3_2160_valid_neighbor_trigger = { + liege != root.liege + OR = { + government_has_flag = government_is_tribal + culture = { + OR = { + has_cultural_tradition = tradition_horse_lords + has_cultural_tradition = tradition_saharan_nomads + has_cultural_tradition = tradition_desert_nomads + } + } + } + is_ai = yes +} + +ep3_emperor_yearly.2160 = { + type = character_event + title = ep3_emperor_yearly.2160.t + desc = ep3_emperor_yearly.2160.desc + theme = war + left_portrait = { + character = root + animation = eyeroll + } + lower_right_portrait = scope:nomad_neighbor + cooldown = { years = 25 } + + trigger = { + valid_for_byz_governor_content_trigger = yes + any_neighboring_realm_same_rank_owner = { + ep3_2160_valid_neighbor_trigger = yes + any_sub_realm_county = { + any_neighboring_county = { + holder = root + } + } + } + } + + immediate = { + random_neighboring_realm_same_rank_owner = { + limit = { + ep3_2160_valid_neighbor_trigger = yes + } + save_scope_as = nomad_neighbor + } + scope:nomad_neighbor = { + random_sub_realm_county = { + limit = { + any_neighboring_county = { + holder = root + } + } + save_scope_as = nomad_county + } + } + scope:nomad_county = { + random_neighboring_county = { + limit = { + holder = root + } + save_scope_as = our_county + } + } + } + + # Option A: welcome them + option = { + name = ep3_emperor_yearly.2160.a + flavor = ep3_emperor_yearly.2160.a.tt + scope:our_county = { + add_county_modifier = { + modifier = ep3_settling_nomads_county_modifier + years = 25 + } + } + culture = { + change_cultural_acceptance = { + target = scope:nomad_neighbor.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + add = -100 + } + modifier = { + has_trait = callous + add = -25 + } + modifier = { + has_trait = gregarious + add = 25 + } + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + # Option B: diplomatic escalation + option = { + name = ep3_emperor_yearly.2160.b + flavor = ep3_emperor_yearly.2160.b.flavor + duel = { + skill = diplomacy + target = scope:nomad_neighbor + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2160.b.tt.success + send_interface_toast = { + title = ep3_emperor_yearly.2160.b.success + left_icon = scope:nomad_neighbor + type = event_generic_neutral + add_pressed_claim = scope:nomad_county + add_character_flag = { + flag = ep3_2160_success + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2160.b.tt + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2160.b.tt.failure + send_interface_toast = { + title = ep3_emperor_yearly.2160.b.failure + left_icon = scope:nomad_neighbor + type = event_generic_neutral + scope:nomad_neighbor = { add_pressed_claim = scope:our_county } + add_character_flag = { + flag = ep3_2160_failure + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2160.b.tt2 + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + shy = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } +} + +# People are hiding from you, in your low-control province, in tunnels, in fairy chimneys, and within mountains + +ep3_emperor_yearly.2170 = { + type = character_event + title = ep3_emperor_yearly.2170.t + desc = ep3_emperor_yearly.2170.desc + theme = stewardship + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 25 } + + trigger = { + OR ={ + valid_for_byz_governor_content_trigger = yes + has_tgp_dlc_trigger = yes + } + + any_sub_realm_county = { + OR = { + any_county_province = { has_building = fairy_chimneys } + AND = { + county_control <= 50 + county_has_province_with_terrain = { + terrain = mountains + terrain = hills + terrain = forest + terrain = jungle + terrain = desert_mountains + terrain = steppe + terrain = desert + } + } + } + NOR = { + has_county_modifier = ep3_tunnels_encouraged_county_modifier + has_county_modifier = ep3_population_control_county_modifier + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_sub_realm_county = { + limit = { + NOR = { + has_county_modifier = ep3_tunnels_encouraged_county_modifier + has_county_modifier = ep3_population_control_county_modifier + } + any_county_province = { has_building = fairy_chimneys } + } + save_scope_as = our_county + } + if = { + limit = { + NOT = { exists = scope:our_county } + } + ordered_sub_realm_county = { + limit = { + NOR = { + has_county_modifier = ep3_tunnels_encouraged_county_modifier + has_county_modifier = ep3_population_control_county_modifier + } + county_has_province_with_terrain = { + terrain = mountains + terrain = hills + terrain = forest + terrain = jungle + terrain = desert_mountains + terrain = steppe + terrain = desert + } + } + order_by = { + value = county_control + multiply = -1 + } + save_scope_as = our_county + } + } + } + + # Option A: encourage it as defense + option = { + name = ep3_emperor_yearly.2170.a + scope:our_county = { + add_county_modifier = { + modifier = ep3_tunnels_encouraged_county_modifier + years = 50 + } + } + change_influence = major_influence_gain + stress_impact = { + greedy = major_stress_impact_gain + paranoid = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + has_trait = paranoid + add = -75 + } + modifier = { + has_trait = greedy + factor = 0 + } + } + } + + # Option B: discourage it for taxation + option = { + name = ep3_emperor_yearly.2170.b + scope:our_county = { + add_county_modifier = { + modifier = ep3_population_control_county_modifier + years = 50 + } + } + add_character_flag = { + flag = ep3_2170_success + years = 25 + } + custom_tooltip = ep3_emperor_yearly.2160.b.tt + stress_impact = { + generous = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + +# Traveling pilgrims come to an estate - response from the estate owner + +ep3_emperor_yearly.2180 = { + type = character_event + title = ep3_emperor_yearly.2180.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + location = top_liege.capital_province + } + desc = ep3_emperor_yearly.2180.desc_capital + } + desc = ep3_emperor_yearly.2180.desc + } + first_valid = { + triggered_desc = { + trigger = { + top_liege = scope:event_host.top_liege + } + desc = ep3_emperor_yearly.2180.desc_fellow + } + desc = ep3_emperor_yearly.2180.desc_foreigner + } + } + theme = travel + left_portrait = { + character = root + animation = worry + } + lower_right_portrait = scope:event_host + cooldown = { years = 10 } + + trigger = { + is_available_travelling = yes + is_location_valid_for_travel_event_on_land = yes + involved_activity ?= { + has_activity_type = activity_pilgrimage + } + location = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + dynasty != root.dynasty + is_available = yes + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + location = { + any_province_domicile = { + is_domicile_type = estate + owner.religion = root.religion + } + } + add = 0.5 + } + modifier = { + location = { + any_province_domicile = { + is_domicile_type = estate + owner.faith = root.faith + } + } + add = 0.5 + } + } + + immediate = { + location = { + random_province_domicile = { + limit = { + is_domicile_type = estate + owner ?= { + dynasty != root.dynasty + is_available = yes + faith = root.faith + } + } + alternative_limit = { + is_domicile_type = estate + owner ?= { + dynasty != root.dynasty + is_available = yes + religion = root.religion + } + } + alternative_limit = { + is_domicile_type = estate + owner ?= { + dynasty != root.dynasty + is_available = yes + } + } + owner ?= { + save_scope_as = event_host + } + } + save_scope_as = location + } + #for the response event + root = { save_scope_as = pilgrim } + } + + # Option A: let's approach the estate + option = { + name = ep3_emperor_yearly.2180.a + flavor = ep3_emperor_yearly.2180.a.tt + current_travel_plan = { + delay_travel_plan = { + days = 7 + } + } + scope:event_host = { + trigger_event = { + id = ep3_emperor_yearly.2181 + days = 1 + } + } + stress_impact = { + shy = medium_stress_impact_gain + zealous = medium_stress_impact_gain + reclusive = major_stress_impact_gain + impatient = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option B: better make hurry instead + option = { + name = ep3_emperor_yearly.2180.b + add_piety = minor_piety_gain + stress_impact = { + craven = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } +} + +ep3_emperor_yearly.2181 = { + type = character_event + title = ep3_emperor_yearly.2180.t + desc = { + desc = ep3_emperor_yearly.2181.desc + first_valid = { + triggered_desc = { + trigger = { + top_liege = scope:pilgrim.top_liege + } + desc = ep3_emperor_yearly.2181.desc_fellow + } + desc = ep3_emperor_yearly.2181.desc_foreigner + } + } + theme = stewardship + left_portrait = { + character = root + animation = chaplain + } + right_portrait = { + character = scope:pilgrim + animation = beg + } + + trigger = { + scope:pilgrim = { is_alive = yes } + } + + immediate = { + top_liege = { save_scope_as = liege } + } + + # Option A: give advice on the area + option = { + name = ep3_emperor_yearly.2181.a + flavor = ep3_emperor_yearly.2181.a_flavor + scope:pilgrim = { + send_interface_toast = { + type = event_generic_good_text + title = ep3_emperor_yearly.2181.a.tt + left_icon = root + current_travel_plan = { + add_travel_plan_modifier = { + modifier = ep3_lay_of_the_land_modifier + } + } + } + } + add_character_modifier = { + modifier = ep3_friendly_host_modifier + years = 10 + } + stress_impact = { + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + cynical = minor_stress_impact_gain + reclusive = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option B: give guides and guards + option = { + name = ep3_emperor_yearly.2181.b + flavor = ep3_emperor_yearly.2181.b_flavor + scope:pilgrim = { + send_interface_toast = { + type = event_generic_good_text + title = ep3_emperor_yearly.2181.b.tt + left_icon = root + current_travel_plan = { + add_travel_plan_modifier = { + modifier = ep3_guides_and_guards_modifier + } + } + } + } + change_influence = minor_influence_loss + if = { + limit = { + faith = scope:pilgrim.faith + } + add_character_modifier = { + modifier = ep3_pilgrim_protector_same_modifier + years = 10 + } + } + else = { + add_character_modifier = { + modifier = ep3_pilgrim_protector_other_modifier + years = 10 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + greedy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_zeal = 0.5 + } + modifier = { + scope:pilgrim.faith = root.faith + add = 150 + } + } + } + + # Option C: this is not a hotel - opt out + option = { + name = ep3_emperor_yearly.2181.c + scope:pilgrim = { + send_interface_toast = { + type = event_generic_bad_text + title = ep3_emperor_yearly.2181.c.tt + left_icon = root + + pay_short_term_gold = { + target = root + gold = tiny_gold_value + } + } + } + stress_impact = { + generous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + ai_zeal = -1 + } + } + } +} + +# Emperor/Governor: Landowners have been hoarding grain to resell it during food shortages + +scripted_trigger ep3_2190_valid_domicile_owner_trigger = { + NOR = { + dynasty = root.dynasty + this = root + } + is_available_ai_adult = yes + opinion = { + target = root + value <= 20 + } +} + +ep3_emperor_yearly.2190 = { + type = character_event + title = ep3_emperor_yearly.2190.t + desc = ep3_emperor_yearly.2190.desc + theme = administrative + override_background = { reference = ep3_relaxing_room } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:landowner + animation = eyeroll + } + cooldown = { years = 15 } + + trigger = { + OR = { + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + capital_province = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + ep3_2190_valid_domicile_owner_trigger = yes + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + capital_province = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + ep3_2190_valid_domicile_owner_trigger = yes + OR = { + has_trait = greedy + has_trait = deceitful + has_trait = arbitrary + } + } + } + } + add = 2 + } + modifier = { + capital_province = { + any_province_domicile = { + is_domicile_type = estate + owner ?= { + ep3_2190_valid_domicile_owner_trigger = yes + OR = { + has_trait = generous + has_trait = humble + has_trait = honest + has_trait = just + } + } + } + } + factor = 0 + } + } + + immediate = { + capital_province = { + random_province_domicile = { + limit = { + is_domicile_type = estate + owner ?= { + ep3_2190_valid_domicile_owner_trigger = yes + } + } + owner = { + save_scope_as = landowner + } + } + save_scope_as = capital + } + liege = { save_scope_as = liege } + save_scope_as = root_scope + } + + # Option A: Make an example + option = { + name = ep3_emperor_yearly.2190.a + if = { + limit = { + top_liege = this + } + every_vassal = { + limit = { + OR = { + has_vassal_stance = courtly + has_vassal_stance = parochial + } + this != scope:landowner + } + custom = every_courtly_parochial_vassal + add_opinion = { + target = root + modifier = targeting_nobility_opinion + } + } + } + else = { + custom_tooltip = ep3_emperor_yearly.2150.b.tt + add_character_flag = { + flag = ep3_2190_honest + years = 25 + } + liege = { + every_vassal = { + limit = { + OR = { + has_vassal_stance = courtly + has_vassal_stance = parochial + } + NOR = { + this = scope:landowner + this = root + } + } + custom = every_courtly_parochial_fellow_vassal + add_opinion = { + target = root + modifier = targeting_nobility_opinion + } + } + } + } + capital_province.county = { + add_county_modifier = { + modifier = ep3_open_granary_county_modifier + years = 15 + } + } + scope:landowner = { + change_influence = medium_influence_loss + remove_short_term_gold = medium_gold_value + add_opinion = { + target = root + modifier = ruined_me_opinion + } + } + stress_impact = { + greedy = medium_stress_impact_gain + content = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_sociability = -0.5 + } + modifier = { + has_trait = brave + add = 25 + } + modifier = { + has_trait = just + add = 25 + } + modifier = { + has_trait = craven + add = -75 + } + modifier = { + scope:landowner = { + gold < medium_gold_value + } + factor = 0 + } + } + } + + # Option B: get bribed + option = { + name = ep3_emperor_yearly.2190.b + scope:landowner = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + add_opinion = { + target = root + modifier = accepted_bribe_opinion + opinion = 20 + } + } + change_influence = miniscule_influence_loss + stress_impact = { + honest = major_stress_impact_gain + just = major_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 0.5 + } + modifier = { + has_trait = honest + factor = 0 + } + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = diligent + add = -50 + } + modifier = { + scope:landowner = { + gold < medium_gold_value + } + factor = 0 + } + } + } + + # Option C: wrist-slap - opt out + option = { + name = ep3_emperor_yearly.2190.c + scope:landowner = { + add_opinion = { + target = root + modifier = off_the_hook_opinion + opinion = 5 + } + } + stress_impact = { + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# A governor who doesn't like the emperor can seize the tax gold about to go to the emperor +ep3_emperor_yearly.2200 = { + type = character_event + title = ep3_emperor_yearly.2200.t + + desc = { + first_valid = { + #You have a ceremonial monarch + triggered_desc = { + trigger = { + tgp_realm_has_ceremonial_liege_trigger = yes + } + desc = ep3_emperor_yearly.2200.desc.c_monarch + } + #Not ceremonial monarch + desc = ep3_emperor_yearly.2200.desc + } + } + theme = stewardship + override_background = relaxing_room + left_portrait = { + character = root + animation = personality_greedy + } + lower_right_portrait = scope:liege + lower_left_portrait = scope:ceremonial_monarch + cooldown = { years = 10 } + + trigger = { + is_governor = yes + NOT = { is_at_war_with = liege } + OR = { + opinion = { + target = liege + value < 0 + } + has_relation_potential_rival = liege + has_relation_rival = liege + house_has_feud_relation_with_trigger = { TARGET = liege } + liege = { house_has_feud_relation_with_trigger ={ TARGET = root } } + } + } + + weight_multiplier = { + base = 1 + modifier = { + valid_for_byz_governor_content_trigger = yes + add = 1 + } + } + + immediate = { + liege = { save_scope_as = liege } + primary_title = { save_scope_as = governorship } + liege.capital_county = { save_scope_as = capital } + if = { + limit = { + tgp_realm_has_ceremonial_liege_trigger = yes + } + top_liege.primary_title.var:administrative_ui_special_title.holder = { + save_scope_as = ceremonial_monarch + } + } + } + + # Option A: why not? + option = { + name = ep3_emperor_yearly.2200.a + add_gold = major_gold_value + add_character_flag = { + flag = ep3_embezzling_governor + years = 10 + } + custom_tooltip = ep3_emperor_yearly.2160.b.tt2 + increase_governance_effect = { VALUE = -4 } + if = { + limit = { + NOT = { has_trait = disloyal } + } + random = { + chance = 35 + send_interface_toast = { + title = ep3_emperor_yearly.2200.a.tt + left_icon = root + add_trait_force_tooltip = disloyal + } + } + } + if = { + limit = { + any_scheme = { + type = depose + scheme_target_character = scope:liege + } + } + random_scheme = { + type = depose + limit = { + scheme_target_character = scope:liege + } + add_scheme_modifier = { + type = scheme_grand_ambitions_embezzling_modifier + } + } + } + stress_impact = { + honest = major_stress_impact_gain + just = major_stress_impact_gain + loyal = major_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + # Option B: never! + option = { + name = ep3_emperor_yearly.2200.b + if = { + limit = { + NOT = { has_trait = loyal } + } + random = { + chance = 35 + send_interface_toast = { + title = ep3_emperor_yearly.2200.b.tt + left_icon = root + add_trait_force_tooltip = loyal + } + } + } + stress_impact = { + deceitful = minor_stress_impact_gain + greedy = minor_stress_impact_gain + disloyal = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +# Make up a prophecy to present to the emperor to support your candidacy to a certain position +ep3_emperor_yearly.2210 = { + type = character_event + title = ep3_emperor_yearly.2210.t + desc = { + desc = ep3_emperor_yearly.2210.desc + triggered_desc = { + trigger = { + NOR = { + has_trait = zealous + has_trait = loyal + } + liege = { + OR = { + has_trait = eccentric + has_trait = zealous + has_trait = trusting + has_character_modifier = bp1_superstition_modifier + } + } + } + desc = ep3_emperor_yearly.2210.desc_believe + } + triggered_desc = { + trigger = { + faith.religion = { is_in_family = rf_abrahamic } + } + desc = ep3_emperor_yearly.2210.desc_jacob + } + } + theme = realm + override_background = { reference = estate } + left_portrait = { + character = root + animation = schadenfreude + } + cooldown = { years = 25 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + liege = { is_available_adult = yes } + # candidate to a governorship (or the empire) + any_heir_title = { + tier > tier_county + holder ?= { + government_allows = administrative + has_realm_law_flag = appointment_type_succession + } + } + is_landed = no + } + + weight_multiplier = { + base = 1 + modifier = { + has_trait = deceitful + add = 0.5 + } + modifier = { + has_trait = eccentric + add = 0.5 + } + modifier = { + has_trait = zealous + add = 0.5 + } + modifier = { + liege = { has_character_modifier = bp1_superstition_modifier } + add = 0.5 + } + modifier = { + liege = { + OR = { + has_trait = zealous + has_trait = eccentric + has_trait = trusting + } + } + add = 0.5 + } + } + + immediate = { + random_heir_title = { + limit = { + holder ?= { + government_allows = administrative + has_realm_law_flag = appointment_type_succession + } + tier > tier_county + } + save_scope_as = potential_title + } + liege = { save_scope_as = liege } + # For the responding event + root = { save_scope_as = vassal } + } + + #Option A: yes + option = { + name = ep3_emperor_yearly.2210.a + change_influence = minor_influence_loss + if = { + limit = { + scope:liege = { is_ai = no } + } + custom_tooltip = ep3_emperor_yearly.2210.a.tt + scope:liege = { + trigger_event = { + id = ep3_emperor_yearly.2211 + days = 1 + } + } + } + else = { + duel = { + skills = { intrigue learning } + target = scope:liege + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + scope:liege = { has_trait = eccentric } + add = 20 + } + modifier = { + scope:liege = { has_trait = zealous } + add = 20 + } + modifier = { + scope:liege = { has_trait = trusting } + add = 20 + } + modifier = { + scope:liege = { has_character_modifier = bp1_superstition_modifier } + add = 30 + } + desc = ep3_emperor_yearly.2210.a.success + send_interface_toast = { + title = ep3_emperor_yearly.2210.a.success.tt + left_icon = scope:liege + scope:potential_title = { + change_appointment_investment = { + target = root + value = appointment_score_major_value + } + } + } + } + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + has_trait = honest + add = 10 + } + modifier = { + scope:liege = { has_trait = cynical } + add = 20 + } + modifier = { + scope:liege.faith = { this != root.faith } + add = 15 + } + desc = ep3_emperor_yearly.2210.a.failure + send_interface_toast = { + title = ep3_emperor_yearly.2210.a.failure.tt + left_icon = scope:liege + change_influence = minor_influence_loss + } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + cynical = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = deceitful + add = 50 + } + modifier = { + liege = { has_trait = eccentric } + add = 75 + } + modifier = { + liege = { has_trait = zealous } + add = 75 + } + modifier = { + liege = { has_character_modifier = bp1_superstition_modifier } + add = 100 + } + } + } + + #Option B: no + option = { + name = ep3_emperor_yearly.2210.b + change_influence = miniscule_influence_gain + stress_impact = { + deceitful = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_honor = 0.5 + } + } + } +} + +ep3_emperor_yearly.2211 = { + type = character_event + title = ep3_emperor_yearly.2210.t + desc = ep3_emperor_yearly.2211.desc + theme = vassal + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:vassal + animation = debating + } + + immediate = { + } + + # Option A: super yes + option = { + name = ep3_emperor_yearly.2211.a + trigger = { + OR = { + has_trait = eccentric + has_trait = zealous + has_trait = trusting + has_character_modifier = bp1_superstition_modifier + } + } + scope:potential_title = { + change_appointment_investment = { + target = scope:vassal + value = appointment_score_major_value + } + } + add_piety = minor_piety_gain + stress_impact = { + base = massive_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = eccentric + add = 50 + } + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = trusting + add = 50 + } + modifier = { + has_character_modifier = bp1_superstition_modifier + add = 50 + } + } + } + + # Option B: yes + option = { + name = ep3_emperor_yearly.2211.b + trigger = { + NOR = { + has_trait = eccentric + has_trait = zealous + has_character_modifier = bp1_superstition_modifier + } + } + scope:potential_title = { + change_appointment_investment = { + target = scope:vassal + value = appointment_score_medium_value + } + } + if = { + limit = { + can_add_hook = { + target = scope:vassal + type = favor_hook + } + } + add_hook = { + target = scope:vassal + type = favor_hook + } + } + else = { + change_influence = minor_influence_gain + } + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_rationality = -0.5 + } + } + } + + # Option D: super no + option = { + name = ep3_emperor_yearly.2211.d + trigger = { + OR = { + has_trait = cynical + has_trait = callous + has_trait = sadistic + faith != scope:vassal.faith + } + } + add_character_modifier = { + modifier = ep3_unbeliever_in_signs_modifier + years = 25 + } + scope:vassal = { + change_influence = major_influence_loss + } + stress_impact = { + zealous = major_stress_impact_gain + } + ai_chance = { + base = 150 + modifier = { + has_trait = cynical + add = 50 + } + modifier = { + has_trait = callous + add = 50 + } + modifier = { + has_trait = sadistic + add = 50 + } + modifier = { + faith != scope:vassal.faith + add = 50 + } + } + } + + # Option C: no + option = { + name = ep3_emperor_yearly.2211.c + scope:vassal = { + change_influence = minor_influence_loss + } + change_influence = minor_influence_gain + ai_chance = { + base = 100 + } + } +} + +# Shepherds moved close to a monastery with wives and children + +scripted_trigger ep3_2220_valid_county_trigger = { + faith = { has_doctrine = tenet_monasticism } + any_county_province = { + OR = { + has_holding_type = church_holding + ep3_2220_famous_monastery_trigger = yes + } + } + any_county_province = { + NOR = { + has_holding_type = church_holding + ep3_2220_famous_monastery_trigger = yes + } + OR = { + has_building_or_higher = hill_farms_01 + has_building_or_higher = pastures_01 + has_building_or_higher = farm_estates_01 + } + } +} + +scripted_trigger ep3_2220_famous_monastery_trigger = { + OR = { + this = province:678 #Sumela + this = province:3796 #Meteora + this = province:3776 #Mt.Athos + this = province:6032 #St.Catherine + this = province:5764 #Jvari + this = province:3729 #Hosios Loukas + } +} + +ep3_emperor_yearly.2220 = { + type = character_event + title = ep3_emperor_yearly.2220.t + desc = ep3_emperor_yearly.2220.desc + theme = vassal + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:chaplain + animation = throne_room_messenger_3 + } + cooldown = { years = 20 } + + trigger = { + valid_for_byz_governor_content_trigger = yes + any_sub_realm_county = { + ep3_2220_valid_county_trigger = yes + } + cp:councillor_court_chaplain ?= { + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_sub_realm_county = { + ep3_2220_valid_county_trigger = yes + any_county_province = { + ep3_2220_famous_monastery_trigger = yes + } + } + add = 2 + } + } + + immediate = { + random_sub_realm_county = { + limit = { + ep3_2220_valid_county_trigger = yes + any_county_province = { + ep3_2220_famous_monastery_trigger = yes + } + } + alternative_limit = { + ep3_2220_valid_county_trigger = yes + } + random_county_province = { + limit = { + ep3_2220_famous_monastery_trigger = yes + } + alternative_limit = { + has_holding_type = church_holding + OR = { + has_building_or_higher = scriptorium_01 + has_building_or_higher = monastic_schools_01 + } + } + alternative_limit = { + has_holding_type = church_holding + } + save_scope_as = monastery + } + random_county_province = { + limit = { + NOR = { + has_holding_type = church_holding + ep3_2220_famous_monastery_trigger = yes + } + OR = { + has_building_or_higher = hill_farms_01 + has_building_or_higher = pastures_01 + has_building_or_higher = farm_estates_01 + } + } + save_scope_as = shepherd_province + } + save_scope_as = interested_county + } + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + # Option A: Shepherds' side + option = { + name = ep3_emperor_yearly.2220.a + scope:interested_county = { + add_county_modifier = { + modifier = ep3_roaming_shepherds_county_modifier + years = 20 + } + } + add_prestige = medium_prestige_gain + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + } + } + + # Option B: Monks' side + option = { + name = ep3_emperor_yearly.2220.b + scope:interested_county = { + add_county_modifier = { + modifier = ep3_monastic_quiet_county_modifier + years = 20 + } + } + change_influence = minor_influence_gain + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + # Option C: it's their problem + option = { + name = ep3_emperor_yearly.2220.c + change_influence = miniscule_influence_loss + stress_impact = { + base = minor_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + has_trait = diligent + add = -40 + } + } + } +} + +# Public sentiment turns against foreign merchants and riots break out in their section of the city + +ep3_emperor_yearly.2230 = { + type = character_event + title = ep3_emperor_yearly.2230.t + desc = ep3_emperor_yearly.2230.desc + theme = administrative + left_portrait = { + character = root + animation = worry + } + cooldown = { years = 35 } + + trigger = { + OR = { + AND = { + is_governor = yes + government_has_flag = government_is_administrative + } + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + capital_county = { county_control <= 75 } + } + + weight_multiplier = { + base = 1 + modifier = { + capital_county = { + county_control <= 50 + } + add = 1 + } + modifier = { + OR = { + valid_for_byz_governor_content_trigger = yes + valid_for_byz_emperor_content_trigger = yes + } + add = 1 + } + } + + immediate = { + capital_county = { save_scope_as = capital } + capital_province.barony = { save_scope_as = city } + } + + # Option A: repress + option = { + name = ep3_emperor_yearly.2230.a + add_character_modifier = { + modifier = ep3_law_and_order_modifier + years = 20 + } + if = { + limit = { + top_liege = this + } + change_influence = medium_influence_gain + } + else = { + if = { + limit = { + has_trait = governor + } + add_trait_xp = { + trait = governor + value = small_lifestyle_random_xp_high + } + } + else = { + add_trait = governor + } + } + stress_impact = { + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + patient = medium_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { + has_trait = compassionate + add = -50 + } + modifier = { + has_trait = forgiving + add = -50 + } + modifier = { + has_trait = patient + add = -25 + } + } + } + + # Option B: exploit + option = { + name = ep3_emperor_yearly.2230.b + add_gold = medium_gold_value + change_influence = massive_influence_value + scope:capital = { + add_county_modifier = { + modifier = ep3_rampaging_disorders_county_modifier + years = 15 + } + } + stress_impact = { + generous = major_stress_impact_gain + just = major_stress_impact_gain + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + has_trait = generous + add = -50 + } + modifier = { + has_trait = just + add = -50 + } + modifier = { + has_trait = honest + add = -25 + } + modifier = { + has_trait = compassionate + add = -25 + } + } + } + + # Option C: find a compromise + option = { + name = ep3_emperor_yearly.2230.c + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2230.c_success + send_interface_toast = { + title = ep3_emperor_yearly.2230.c_success.tt + left_icon = root + change_influence = medium_influence_gain + add_character_modifier = { + modifier = ep3_crowd_bender_modifier + years = 20 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2230.c_failure + send_interface_toast = { + title = ep3_emperor_yearly.2230.c_failure.tt + left_icon = root + scope:capital = { + add_county_modifier = { + modifier = ep3_rampaging_disorders_county_modifier + years = 15 + } + } + } + } + } + stress_impact = { + vengeful = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + patient = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { + has_trait = vengeful + add = -50 + } + modifier = { + has_trait = callous + add = -50 + } + modifier = { + has_trait = sadistic + add = -50 + } + modifier = { + has_trait = patient + add = -25 + } + modifier = { + has_trait = wrathful + add = -25 + } + } + } +} + +# An obnoxious "scholar" close to you keeps quoting the Classics out of place + +scripted_trigger ep3_valid_greek_culture_trigger = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + } +} + +scripted_trigger ep3_2240_valid_courtier_trigger = { + culture = { + OR = { + has_graphical_east_asia_culture_group_trigger = yes + ep3_valid_greek_culture_trigger = yes + } + } + + OR = { + knows_language = language_greek + learning >= 10 + has_trait = education_learning_1 + 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 } +} + +ep3_emperor_yearly.2240 = { + type = character_event + title = ep3_emperor_yearly.2240.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:the_scholar = { + culture = { has_graphical_east_asia_culture_group_trigger = yes } + } + } + desc = ep3_emperor_yearly.2240.desc_quote_confucius + } + random_valid = { + desc = ep3_emperor_yearly.2240.desc_quote_a + desc = ep3_emperor_yearly.2240.desc_quote_b + desc = ep3_emperor_yearly.2240.desc_quote_c + triggered_desc = { + trigger = { + scope:the_scholar = { knows_language = language_latin } + } + desc = ep3_emperor_yearly.2240.desc_quote_latin + } + } + } + desc = ep3_emperor_yearly.2240.desc_outro + } + theme = learning + override_background = { reference = ep3_medi_market } + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:the_scholar + animation = debating + } + cooldown = { years = 25 } + + trigger = { + OR = { + has_ep3_dlc_trigger = yes + has_tgp_dlc_trigger = yes + } + is_landed_or_landless_administrative = yes + government_allows = administrative + culture = { + 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 = { + base = 1 + modifier = { + culture = culture:greek + add = 1 + } + modifier = { + any_courtier_or_guest = { + ep3_2240_valid_courtier_trigger = yes + knows_language = language_latin + } + add = 1 + } + modifier = { + any_courtier_or_guest = { + ep3_2240_valid_courtier_trigger = yes + is_of_major_interest_trigger = { CHARACTER = root } + } + add = 1 + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + ep3_2240_valid_courtier_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 3 + knows_language = language_latin + } + modifier = { + add = 2 + is_of_major_interest_trigger = { CHARACTER = root } + } + } + save_scope_as = the_scholar + } + } + + # Option A: outwit + option = { + name = ep3_emperor_yearly.2240.a + flavor = ep3_emperor_yearly.2240.a.flavor + duel = { + skill = learning + target = scope:the_scholar + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_emperor_yearly.2240.a_success + send_interface_toast = { + title = ep3_emperor_yearly.2240.a_success.tt + left_icon = root + right_icon = scope:the_scholar + change_influence = massive_influence_gain + scope:the_scholar = { change_influence = major_influence_loss } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_emperor_yearly.2240.a_failure + send_interface_toast = { + title = ep3_emperor_yearly.2240.a_failure.tt + left_icon = root + right_icon = scope:the_scholar + change_influence = major_influence_loss + scope:the_scholar = { change_influence = massive_influence_gain } + } + } + } + stress_impact = { + dull = major_stress_impact_gain + shy = medium_stress_impact_gain + humble = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + has_trait = dull + add = -50 + } + modifier = { + has_trait = shy + add = -25 + } + modifier = { + has_trait = humble + add = -25 + } + } + } + + # Option B: just shut up! + option = { + name = ep3_emperor_yearly.2240.b + add_dread = minor_dread_gain + change_influence = minor_influence_gain + scope:the_scholar = { + change_influence = medium_influence_loss + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -25 + } + } + stress_impact = { + base = medium_stress_impact_loss + humble = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = calm + add = -25 + } + modifier = { + scope:the_scholar.dynasty ?= root.dynasty + add = -75 + } + modifier = { + scope:the_scholar = { is_heir_of = root } + factor = 0 + } + } + } + + # Option C: ignore - opt-out + option = { + name = ep3_emperor_yearly.2240.c + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +### STATE FAITH EVENTS ### + +# Your liege changed the state faith (reaction) +ep3_emperor_yearly.2300 = { + type = character_event + title = ep3_emperor_yearly.2300.t + desc = ep3_emperor_yearly.2300.desc + theme = administrative + left_portrait = { + character = root + animation = reading + } + lower_right_portrait = scope:liege_loc + + immediate = { + liege = { save_scope_as = liege_loc } + liege.capital_province = { save_scope_as = capital } + } + + #Option A: Outrageous + option = { + name = ep3_emperor_yearly.2300.a + trigger = { + faith != liege.primary_title.state_faith + } + add_piety = medium_piety_gain + stress_impact = { + calm = minor_stress_impact_gain + cynical = medium_stress_impact_gain + humble = medium_stress_impact_gain + loyal = major_stress_impact_gain + } + } + + #Option B: The emperor must be right + option = { + name = ep3_emperor_yearly.2300.b + trigger = { + faith != liege.primary_title.state_faith + } + set_character_faith = liege.primary_title.state_faith + stress_impact = { + zealous = major_stress_impact_gain + disloyal = major_stress_impact_gain + arrogant = major_stress_impact_gain + loyal = major_stress_impact_loss + } + } + + #Option C: Finally + option = { + name = ep3_emperor_yearly.2300.c + trigger = { + faith = liege.primary_title.state_faith + } + add_piety = medium_piety_gain + stress_impact = { + zealous = major_stress_impact_loss + loyal = major_stress_impact_loss + } + } +} + +# Your liege demands that you make more of an effort to convert your counties, who don't follow the state faith +ep3_emperor_yearly.2310 = { + type = letter_event + opening = ep3_emperor_yearly.2310.t + desc = { + desc = ep3_emperor_yearly.2310.desc + triggered_desc = { + trigger = { + faith != top_liege.primary_title.state_faith + } + desc = ep3_emperor_yearly.2310.desc_you_too + } + } + sender = scope:liege_loc + + trigger = { + is_governor = yes + government_allows = state_faith + exists = top_liege.primary_title.state_faith + top_liege.faith = top_liege.primary_title.state_faith + any_sub_realm_county = { + faith != root.top_liege.primary_title.state_faith + } + top_liege = { is_ai = yes } + } + + immediate = { + top_liege = { save_scope_as = liege_loc } + cp:councillor_court_chaplain ?= { save_scope_as = chaplain } + random_sub_realm_county = { + limit = { + faith != root.top_liege.primary_title.state_faith + } + weight = { + base = 1 + modifier = { + this = root.capital_county + add = 100 + } + } + save_scope_as = target_county + } + } + + #Option A: start converting county + option = { + name = ep3_emperor_yearly.2310.a + trigger = { + exists = scope:chaplain + scope:chaplain.faith = root.top_liege.primary_title.state_faith + } + scope:chaplain = { + set_council_task = { + task_type = task_conversion + target = scope:target_county.title_province + } + } + increase_governance_effect = { VALUE = 10 } + scope:liege_loc = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + lazy = medium_stress_impact_gain + disloyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + modifier = { + has_trait = disloyal + add = -50 + } + modifier = { + has_trait = lazy + add = -50 + } + opinion_modifier = { + who = root + opinion_target = scope:liege_loc + } + } + } + + #Option B: no thanks + option = { + name = ep3_emperor_yearly.2310.b + trigger = { + faith != top_liege.primary_title.state_faith + } + add_piety = medium_piety_gain + scope:liege_loc = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + stress_impact = { + loyal = major_stress_impact_gain + zealous = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_zeal = 0.5 + } + opinion_modifier = { + opinion_target = scope:liege_loc + multiplier = -1 + } + } + } + + #Option C: I'll convert myself for starters + option = { + name = ep3_emperor_yearly.2310.c + trigger = { + faith != top_liege.primary_title.state_faith + } + set_character_faith = top_liege.primary_title.state_faith + change_influence = medium_influence_gain + stress_impact = { + zealous = major_stress_impact_gain + disloyal = major_stress_impact_gain + arrogant = major_stress_impact_gain + loyal = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_zeal = -0.5 + } + modifier = { + has_trait = loyal + add = 100 + } + modifier = { + has_trait = disloyal + add = -50 + } + opinion_modifier = { + opinion_target = scope:liege_loc + } + } + } + + #Option D: I'll think about it + option = { + name = ep3_emperor_yearly.2310.d + trigger = { + faith = top_liege.primary_title.state_faith + } + scope:liege_loc = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + ai_chance = { + base = 100 + opinion_modifier = { + who = root + opinion_target = scope:liege_loc + multiplier = -1 + } + } + } +} + +# HoF helps you change state faith +ep3_emperor_yearly.2320 = { + type = character_event + title = ep3_emperor_yearly.2320.t + desc = ep3_emperor_yearly.2320.desc + theme = faith + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:hof + animation = wedding_priest + } + + cooldown = { years = 20 } + + trigger = { + government_allows = administrative + government_allows = state_faith + exists = primary_title.state_faith + top_liege = this + highest_held_title_tier >= tier_empire + faith != primary_title.state_faith + faith.fervor > primary_title.state_faith.fervor + exists = faith.religious_head + faith.religious_head != root + primary_title.state_faith.religious_head ?= { + this != root.faith.religious_head + } + } + + immediate = { + faith.religious_head = { save_scope_as = hof } + } + + weight_multiplier = { + base = 1 + # More likely if you are close to affording the (discounted) change state faith decision + modifier = { + OR = { + influence >= 7000 + piety >= 3000 + } + add = 1 + } + # Less likely if you are far from affording the (discounted) change state faith decision + modifier = { + OR = { + influence <= 3000 + piety <= 2000 + } + factor = 0.5 + } + } + + #Option A: thanks + option = { + name = ep3_emperor_yearly.2320.a + custom_tooltip = ep3_emperor_yearly.2320.a.tt + add_character_flag = { + flag = ep3_hof_state_faith_discount + years = 10 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: no thanks + option = { + name = ep3_emperor_yearly.2320.b + every_vassal = { + limit = { + faith = root.primary_title.state_faith + } + custom = every_vassal_state_faith + add_opinion = { + target = root + modifier = pious_opinion + opinion = 5 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } +} + +# Your State faith's fervor is too low (heresy risk) +ep3_emperor_yearly.2330 = { + type = character_event + title = ep3_emperor_yearly.2330.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:hof + } + desc = ep3_emperor_yearly.2330.desc_hof + } + desc = ep3_emperor_yearly.2330.desc + } + desc = ep3_emperor_yearly.2330.desc_end + triggered_desc = { + trigger = { + exists = scope:hof + } + desc = ep3_emperor_yearly.2330.desc_end_hof + } + } + theme = faith + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + trigger = { + exists = scope:hof + } + character = scope:hof + animation = debating + } + + cooldown = { years = 20 } + + trigger = { + government_allows = administrative + government_allows = state_faith + exists = primary_title.state_faith + top_liege = this + highest_held_title_tier >= tier_empire + faith = primary_title.state_faith + faith.fervor < 40 + } + + immediate = { + if = { + limit = { + exists = faith.religious_head + faith.religious_head != root + } + faith.religious_head = { save_scope_as = hof } + } + } + + weight_multiplier = { + base = 1 + # More likely if fervor is very low + modifier = { + faith = { + fervor < 30 + } + add = 1 + } + modifier = { + faith = { + fervor < 20 + } + add = 1 + } + modifier = { + faith = { + fervor < 10 + } + add = 1 + } + } + + #Option A: let's do something + option = { + name = ep3_emperor_yearly.2330.a + flavor = ep3_emperor_yearly.2330.a.tt + faith = { + change_fervor = { + value = minor_fervor_gain + desc = state_faith_fervor_campaign + } + } + add_piety = major_piety_loss + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + #Option B: it's probably fine + option = { + name = ep3_emperor_yearly.2330.b + stress_impact = { + zealous = massive_stress_impact_gain + diligent = major_stress_impact_gain + loyal = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_zeal = -0.5 + } + modifier = { + add = 50 + has_trait = eccentric + } + modifier = { + add = -50 + has_trait = loyal + } + } + } +} + +# You (either emperor or governor) do not practice your state faith and someone complains +ep3_emperor_yearly.2340 = { + type = character_event + title = ep3_emperor_yearly.2340.t + desc = ep3_emperor_yearly.2340.desc + theme = administrative + left_portrait = { + character = root + animation = eyeroll + } + right_portrait = { + character = scope:complainer + animation = debating + } + + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + OR = { + #emperor + AND = { + top_liege = this + highest_held_title_tier >= tier_empire + } + #governor + is_governor = yes + } + government_allows = state_faith + exists = top_liege.primary_title.state_faith + faith != top_liege.primary_title.state_faith + trigger_if = { + limit = { + top_liege = this + } + any_vassal = { + house ?= { + is_powerful_family = yes + } + faith = top_liege.primary_title.state_faith + is_available_ai_adult = yes + } + } + trigger_else = { + top_liege = { + any_vassal = { + faith = top_liege.primary_title.state_faith + is_available_ai_adult = yes + } + } + } + } + + immediate = { + # If emperor + if = { + limit = { + top_liege = this + } + # Find a vassal from a powerful family + random_vassal = { + limit = { + house ?= { + is_powerful_family = yes + } + faith = root.primary_title.state_faith + is_available_ai_adult = yes + } + save_scope_as = complainer + } + } + # If governor + else = { + # find a fellow vassal - prio to neighbors, powerful families, zealots + top_liege = { + random_vassal = { + limit = { + faith = top_liege.primary_title.state_faith + is_available_ai_adult = yes + } + weight = { + base = 1 + modifier = { + any_neighboring_realm_same_rank_owner = { + this = root + } + add = 50 + } + modifier = { + house ?= { + is_powerful_family = yes + } + add = 25 + } + modifier = { + has_trait = zealous + add = 25 + } + modifier = { + has_vassal_stance = zealot + add = 15 + } + } + save_scope_as = complainer + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + top_liege = this + add = 0.5 + } + } + + #Option A: Maybe I should fall in line... + option = { + name = ep3_emperor_yearly.2340.a + set_character_faith = top_liege.primary_title.state_faith + if = { + limit = { + top_liege = this + } + add_legitimacy = minor_legitimacy_gain + } + else = { + change_influence = medium_influence_gain + } + stress_impact = { + zealous = massive_stress_impact_gain + stubborn = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_zeal = -0.5 + } + modifier = { + has_trait = diligent + add = 50 + } + modifier = { + has_trait = loyal + add = 50 + } + } + } + + #Option B: Blah blah blah... + option = { + name = ep3_emperor_yearly.2340.b + if = { + limit = { + top_liege = this + } + every_vassal = { + limit = { + faith = root.primary_title.state_faith + } + custom = every_vassal_state_faith + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + } + else = { + top_liege = { + every_vassal = { + limit = { + faith = top_liege.primary_title.state_faith + } + custom = every_fellow_vassal_state_faith + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + } + } + add_piety = major_piety_gain + stress_impact = { + zealous = major_stress_impact_loss + lazy = medium_stress_impact_loss + eccentric = medium_stress_impact_loss + diligent = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = -0.5 + } + modifier = { + has_trait = loyal + add = -50 + } + modifier = { + has_trait = eccentric + add = 50 + } + } + } +} + +### NOBLE FAMILIES MAINTENANCE ### + +# You are not from a Powerful Family - react to a new Powerful Family emerging + +ep3_emperor_yearly.2400 = { + type = character_event + title = ep3_emperor_yearly.2400.t + desc = ep3_emperor_yearly.2400.desc + theme = administrative + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:new_family + animation = toast_goblet + } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = no + } + NOT = { + #cooldown + has_character_flag = 8020_powerful_family_cooldown + } + } + + immediate = { + add_character_flag = { + flag = 8020_powerful_family_cooldown + years = 10 + } + } + + option = { + name = ep3_emperor_yearly.2400.a + custom_tooltip = 8020_powerful_family_desc + } +} + +# Your family is now a Powerful Family + +ep3_emperor_yearly.2401 = { + type = character_event + title = ep3_emperor_yearly.2401.t + desc = ep3_emperor_yearly.2401.desc + theme = administrative + left_portrait = { + character = root + animation = ecstasy + } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = yes + } + } + + immediate = { + # For the tooltip + root = { save_scope_as = new_family } + } + + option = { + name = ep3_emperor_yearly.2401.a + custom_tooltip = 8020_powerful_family_desc + } +} + +# A new noble family is introduced to the empire + +ep3_emperor_yearly.2410 = { + type = character_event + title = ep3_emperor_yearly.2410.t + desc = ep3_emperor_yearly.2410.desc + theme = administrative + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:noble_family_head + animation = happy_teacher + } + + trigger = { + government_allows = administrative + is_available = yes + exists = scope:noble_family_head + exists = scope:new_title + NOR = { + this.house ?= scope:new_title.holder.house + has_character_flag = 2410_noble_family_cooldown + } + } + + on_trigger_fail = { + if = { + limit = { + exists = scope:noble_family_head + exists = scope:new_title + OR = { + has_character_flag = 2410_noble_family_cooldown + is_available = no + } + } + send_interface_message = { + title = 2410_noble_family_tt + type = msg_new_powerful_family + left_icon = scope:noble_family_head + right_icon = scope:new_title + desc = 2410_noble_family_tt_desc + } + } + } + + immediate = { + add_character_flag = { + flag = 2410_noble_family_cooldown + years = 5 + } + scope:new_title.holder = { + save_scope_as = new_family + save_scope_as = noble_family_head + } + } + + option = { + name = ep3_emperor_yearly.2410.a + custom_tooltip = 2410_noble_family_tt_desc + } +} + +# A new family (and not the emperor's) has become dominant +ep3_emperor_yearly.2420 = { + type = character_event + title = ep3_emperor_yearly.2420.t + desc = ep3_emperor_yearly.2420.desc + theme = administrative + left_portrait = { + character = scope:noble_family_head + animation = personality_dishonorable + } + + trigger = { + government_allows = administrative + is_available = yes + NOT = { + #cooldown + has_character_flag = 2420_noble_family_cooldown + } + } + + on_trigger_fail = { + if = { + limit = { + OR = { + has_character_flag = 2420_noble_family_cooldown + is_available = no + } + } + send_interface_message = { + title = 2420_noble_family_tt + type = msg_new_powerful_family + left_icon = scope:noble_family_head + desc = 2420_noble_family_tt_desc + } + } + } + + immediate = { + add_character_flag = { + flag = 2420_noble_family_cooldown + years = 5 + } + } + + option = { + name = ep3_emperor_yearly.2420.a + custom_tooltip = 2420_noble_family_tt_desc + } +} diff --git a/N3OW/events/dlc/ep3/ep3_emperor_yearly_3.txt b/N3OW/events/dlc/ep3/ep3_emperor_yearly_3.txt new file mode 100644 index 00000000..352ed6d0 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_emperor_yearly_3.txt @@ -0,0 +1,1947 @@ +namespace = ep3_emperor_yearly + +############################ +# EP3 Admin Emperor Events # +# by Jason Cantalini # +# 3000 - 3500 # +############################ + +# Byzantine-only: your Varangians loot the palace after succession + +ep3_emperor_yearly.3000 = { + type = character_event + title = ep3_emperor_yearly.3000.t + desc = { + desc = ep3_emperor_yearly.3000.desc + first_valid = { + triggered_desc = { + trigger = { + scope:varangian_leader = { + is_courtier_of = root + } + } + desc = ep3_emperor_yearly.3000.desc_leader + } + desc = ep3_emperor_yearly.3000.desc_no_leader + } + } + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:varangian_leader + animation = celebrate_axe + camera = camera_event_very_left + } + lower_right_portrait = { + character = scope:varangian_2 + } + lower_left_portrait = { + character = scope:varangian_3 + } + lower_center_portrait = { + character = scope:dead_emperor + } + + trigger = { + has_ep3_dlc_trigger = yes + primary_title = { has_variable = founded_varangian_guard } + } + + immediate = { + save_scope_as = root_scope + #Choose which malus to use + random_list = { + #Artifact is damaged + 10 = { + trigger = { + any_character_artifact = { + artifact_durability > 45 + } + } + add_character_flag = malus_broken_artifact + random_character_artifact = { + limit = { + artifact_durability > 45 + } + save_scope_as = broken_artifact + } + save_scope_value_as = { + name = varangian_gold + value = { + value = 0 + add = { + value = var:varangian_regiments + multiply = 30 + } + } + } + } + #Artifact is stolen + 10 = { + trigger = { + any_character_artifact = { + artifact_wealth_quality_average_value < 20 + } + } + random_character_artifact = { + limit = { + artifact_wealth_quality_average_value < 20 + } + save_scope_as = stolen_artifact + } + add_character_flag = malus_stolen_artifact + save_scope_value_as = { + name = varangian_gold + value = { + value = 0 + add = { + value = var:varangian_regiments + multiply = 30 + } + } + } + } + ##Court grandeur lost + 10 = { + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + } + add_character_flag = malus_court_grandeur + save_scope_value_as = { + name = varangian_gold + value = { + value = 0 + add = { + value = var:varangian_regiments + multiply = 30 + } + } + } + } + ##Gold is lost + 10 = { + save_scope_value_as = { + name = varangian_gold + value = { + value = 0 + add = { + value = var:varangian_regiments + multiply = 50 + } + } + } + } + } + + #Choose which bonus to give a refuser + random_list = { + 5 = { + trigger = { + is_adult = yes + } + add_character_flag = refuse_bonus_dread + } + 10 = { + add_character_flag = refuse_bonus_prestige + } + 5 = { + add_character_flag = refuse_bonus_opinion + } + } + + #Choose which bonus to give an accepter + random_list = { + 10 = { + trigger = { + max_number_maa_soldiers_of_base_type = { + type = heavy_infantry + value >= 300 + } + } + add_character_flag = accept_bonus_heavy_infantry + } + 10 = { + add_character_flag = accept_bonus_scheme_resist + } + 10 = { + add_character_flag = accept_bonus_army + } + 10 = { + add_character_flag = accept_bonus_legitimacy + } + } + + #Save a first Varangian to be the boss + if = { + limit = { + any_court_position_holder = { + type = akolouthos_court_position + ep3_varangian_trigger = yes + is_available = yes + } + } + random_court_position_holder = { + type = akolouthos_court_position + save_scope_as = varangian_leader + } + } + else_if = { + limit = { + any_court_position_holder = { + type = bodyguard_court_position + ep3_varangian_trigger = yes + is_available = yes + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + ep3_varangian_trigger = yes + is_available = yes + } + save_scope_as = varangian_leader + } + } + else_if = { + limit = { + any_courtier = { + ep3_varangian_trigger = yes + is_available_adult = yes + } + } + random_courtier = { + limit = { + ep3_varangian_trigger = yes + is_available_adult = yes + } + save_scope_as = varangian_leader + } + } + else_if = { + limit = { + current_date < 1066 + } + #Norse + create_character = { + template = varangian_template + location = root.location + culture = culture:norse + faith = root.faith + dynasty = none + save_scope_as = varangian_leader + } + scope:varangian_leader = { + add_character_flag = need_military_outfit + } + hidden_effect = { add_visiting_courtier = scope:varangian_leader } + } + else = { + #Anglo-Saxon + create_character = { + template = varangian_template + location = root.location + culture = culture:anglo_saxon + faith = root.faith + dynasty = none + save_scope_as = varangian_leader + } + scope:varangian_leader = { + add_character_flag = need_military_outfit + } + hidden_effect = { add_visiting_courtier = scope:varangian_leader } + } + #Save another Varangian + if = { + limit = { + exists = scope:varangian_leader + any_court_position_holder = { + type = bodyguard_court_position + ep3_varangian_trigger = yes + is_available = yes + this != scope:varangian_leader + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + ep3_varangian_trigger = yes + is_available = yes + this != scope:varangian_leader + } + save_scope_as = varangian_2 + } + } + else_if = { + limit = { + exists = scope:varangian_leader + any_courtier = { + ep3_varangian_trigger = yes + is_available_adult = yes + this != scope:varangian_leader + } + } + random_courtier = { + limit = { + ep3_varangian_trigger = yes + is_available_adult = yes + this != scope:varangian_leader + } + save_scope_as = varangian_2 + } + } + #Save a third + if = { + limit = { + exists = scope:varangian_leader + exists = scope:varangian_2 + any_court_position_holder = { + type = bodyguard_court_position + ep3_varangian_trigger = yes + is_available = yes + NOR = { + this = scope:varangian_leader + this = scope:varangian_2 + } + } + } + random_court_position_holder = { + type = bodyguard_court_position + limit = { + ep3_varangian_trigger = yes + is_available = yes + NOR = { + this = scope:varangian_leader + this = scope:varangian_2 + } + } + save_scope_as = varangian_3 + } + } + else_if = { + limit = { + exists = scope:varangian_leader + exists = scope:varangian_2 + any_courtier = { + ep3_varangian_trigger = yes + is_available_adult = yes + NOR = { + this = scope:varangian_leader + this = scope:varangian_2 + } + } + } + random_courtier = { + limit = { + ep3_varangian_trigger = yes + is_available_adult = yes + NOR = { + this = scope:varangian_leader + this = scope:varangian_2 + } + } + save_scope_as = varangian_3 + } + } + } + + #Have the Akolouthos seize some of the spoils + option = { + name = ep3_emperor_yearly.3000.a + flavor = ep3_emperor_yearly.3000.a.flavor + trigger = { + employs_court_position = akolouthos_court_position + any_court_position_holder = { + type = akolouthos_court_position + aptitude = { + court_position = akolouthos_court_position + value >= 3 + } + } + } + add_internal_flag = special + custom_tooltip = akolouthos_aptitude_option_unlock + + #Random refuse bonus effect + if = { + limit = { + has_character_flag = refuse_bonus_prestige + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_prestige = massive_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + add_prestige = major_prestige_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + if = { + limit = { + has_character_flag = refuse_bonus_dread + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_dread = major_dread_gain + add_prestige = major_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + add_dread = medium_dread_gain + add_prestige = medium_prestige_gain + } + else = { + add_dread = minor_dread_gain + add_prestige = minor_prestige_gain + } + } + if = { + limit = { + has_character_flag = refuse_bonus_opinion + } + if = { + limit = { + var:varangian_regiments >= 7 + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 30 + target = root + } + } + add_prestige = major_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 20 + target = root + } + } + add_prestige = medium_prestige_gain + } + else = { + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 10 + target = root + } + } + add_prestige = minor_prestige_gain + } + } + change_influence = medium_influence_gain + + remove_treasury_or_gold = { + value = { + value = 0 + add = { + value = scope:varangian_gold + multiply = 0.4 + } + } + } + #Negative heavy inf and scheme resistance modifier + add_character_modifier = { + modifier = disrespected_varangians_modifier + years = 10 + } + if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + if = { + limit = { + scope:varangian_leader = { has_trait = loyal } + } + scope:varangian_leader = { remove_trait = loyal } + reverse_add_opinion = { + target = scope:varangian_leader + modifier = angry_opinion + opinion = -20 + } + } + else = { + reverse_add_opinion = { + target = scope:varangian_leader + modifier = hate_opinion + opinion = -40 + } + } + } + if = { + limit = { + exists = scope:varangian_2 + } + if = { + limit = { + scope:varangian_2 = { has_trait = loyal } + } + scope:varangian_2 = { remove_trait = loyal } + reverse_add_opinion = { + target = scope:varangian_2 + modifier = angry_opinion + opinion = -20 + } + } + else = { + reverse_add_opinion = { + target = scope:varangian_2 + modifier = hate_opinion + opinion = -40 + } + } + } + if = { + limit = { + exists = scope:varangian_3 + } + if = { + limit = { + scope:varangian_3 = { has_trait = loyal } + } + scope:varangian_3 = { remove_trait = loyal } + reverse_add_opinion = { + target = scope:varangian_3 + modifier = angry_opinion + opinion = -20 + } + } + else = { + reverse_add_opinion = { + target = scope:varangian_3 + modifier = hate_opinion + opinion = -40 + } + } + } + #Apply randomized_malus + if = { + limit = { + has_character_flag = malus_court_grandeur + var:varangian_regiments >= 7 + } + change_current_court_grandeur = minor_court_grandeur_loss + } + if = { + limit = { + has_character_flag = malus_broken_artifact + var:varangian_regiments >= 7 + } + scope:broken_artifact = { + add_durability = -20 + } + } + if = { + limit = { + NOT = { + scope:varangian_leader = { + is_courtier_of = root + } + } + } + hidden_effect = { + scope:varangian_leader = { move_to_pool = yes } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + generous = medium_stress_impact_gain + content = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = paranoid + has_trait = generous + has_trait = content + has_trait = just + } + } + modifier = { + factor = 3 + short_term_gold <= 300 + } + modifier = { + factor = 0.5 + OR = { + has_trait = content + has_trait = just + } + } + } + } + #Chastise the Varangians + option = { + trigger = { + age >= 12 + } + name = ep3_emperor_yearly.3000.b + flavor = ep3_emperor_yearly.3000.b.flavor + #Random refuse bonus effect + if = { + limit = { + has_character_flag = refuse_bonus_prestige + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_prestige = massive_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + add_prestige = major_prestige_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + if = { + limit = { + has_character_flag = refuse_bonus_dread + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_dread = major_dread_gain + add_prestige = major_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + add_dread = medium_dread_gain + add_prestige = medium_prestige_gain + } + else = { + add_dread = minor_dread_gain + add_prestige = minor_prestige_gain + } + } + if = { + limit = { + has_character_flag = refuse_bonus_opinion + } + if = { + limit = { + var:varangian_regiments >= 7 + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 30 + target = root + } + } + add_prestige = major_prestige_gain + } + else_if = { + limit = { + var:varangian_regiments >= 4 + } + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 20 + target = root + } + } + add_prestige = medium_prestige_gain + } + else = { + every_vassal = { + custom = every_parochial_vassal + add_opinion = { + modifier = respect_opinion + opinion = 10 + target = root + } + } + add_prestige = minor_prestige_gain + } + } + + if = { + limit = { + var:varangian_regiments > 0 + } + remove_long_term_gold = { + value = scope:varangian_gold + } + } + + #show custom payout tooltip + if = { + limit = { + exists = scope:varangian_3 + } + custom_tooltip = major_gold_to_varangians_tooltip + } + else_if = { + limit = { + exists = scope:varangian_2 + } + custom_tooltip = medium_gold_to_varangians_tooltip + } + else_if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + custom_tooltip = minor_gold_to_varangians_tooltip + } + + if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + if = { + limit = { + scope:varangian_leader = { has_trait = loyal } + } + scope:varangian_leader = { remove_trait = loyal } + } + else = { + reverse_add_opinion = { + target = scope:varangian_leader + modifier = angry_opinion + opinion = -20 + } + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_leader + gold = 25 + } + } + } + if = { + limit = { + exists = scope:varangian_2 + } + if = { + limit = { + scope:varangian_2 = { has_trait = loyal } + } + scope:varangian_2 = { remove_trait = loyal } + } + else = { + reverse_add_opinion = { + target = scope:varangian_2 + modifier = angry_opinion + opinion = -20 + } + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_2 + gold = 25 + } + } + } + if = { + limit = { + exists = scope:varangian_3 + } + if = { + limit = { + scope:varangian_3 = { has_trait = loyal } + } + scope:varangian_3 = { remove_trait = loyal } + } + else = { + reverse_add_opinion = { + target = scope:varangian_3 + modifier = angry_opinion + opinion = -20 + } + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_3 + gold = 25 + } + } + } + #Negative heavy inf and scheme resistance modifier + add_character_modifier = { + modifier = disrespected_varangians_modifier + years = 10 + } + #Apply randomized_malus + ep3_palace_looting_random_malus_effect = yes + + if = { + limit = { + NOT = { + scope:varangian_leader = { + is_courtier_of = root + } + } + } + hidden_effect = { + scope:varangian_leader = { move_to_pool = yes } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + generous = minor_stress_impact_gain + content = minor_stress_impact_gain + just = miniscule_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = paranoid + has_trait = generous + has_trait = content + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = generous + has_trait = content + has_trait = just + } + } + } + } + #It's just tradition + option = { + name = ep3_emperor_yearly.3000.c + flavor = ep3_emperor_yearly.3000.c.flavor + if = { + limit = { + has_character_flag = accept_bonus_legitimacy + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_legitimacy = major_legitimacy_gain + } + else_if = { + limit = { + var:varangian_regiments >= 3 + } + add_legitimacy = medium_legitimacy_gain + } + else = { + add_legitimacy = minor_legitimacy_gain + } + } + if = { + limit = { + has_character_flag = accept_bonus_heavy_infantry + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_character_modifier = { + modifier = loyal_varangians_modifier + years = 10 + } + add_legitimacy = medium_legitimacy_gain + } + else_if = { + limit = { + var:varangian_regiments >= 3 + } + add_character_modifier = { + modifier = loyal_varangians_modifier + years = 10 + } + add_legitimacy = miniscule_legitimacy_gain + } + else = { + add_character_modifier = { + modifier = loyal_varangians_modifier + years = 10 + } + } + } + if = { + limit = { + has_character_flag = accept_bonus_scheme_resist + } + if = { + limit = { + var:varangian_regiments >= 7 + } + add_character_modifier = { + modifier = attentive_varangians_modifier + years = 10 + } + add_legitimacy = medium_legitimacy_gain + } + else_if = { + limit = { + var:varangian_regiments >= 3 + } + add_character_modifier = { + modifier = attentive_varangians_modifier + years = 10 + } + add_legitimacy = miniscule_legitimacy_gain + } + else = { + add_character_modifier = { + modifier = attentive_varangians_modifier + years = 10 + } + } + } + if = { + limit = { + has_character_flag = accept_bonus_army + } + if = { + limit = { + var:varangian_regiments >= 7 + } + spawn_army = { + name = eager_varangian_army + levies = 600 + men_at_arms = { + type = varangian_guards + stacks = 4 + } + location = root.capital_province + uses_supply = yes + inheritable = no + } + } + else_if = { + limit = { + var:varangian_regiments >= 3 + } + spawn_army = { + name = eager_varangian_army + levies = 300 + men_at_arms = { + type = varangian_guards + stacks = 2 + } + location = root.capital_province + uses_supply = yes + inheritable = no + } + } + else = { + spawn_army = { + name = eager_varangian_army + levies = 100 + men_at_arms = { + type = varangian_guards + stacks = 1 + } + location = root.capital_province + uses_supply = yes + inheritable = no + } + } + } + + if = { + limit = { + var:varangian_regiments > 0 + } + remove_long_term_gold = { + value = scope:varangian_gold + } + } + + + #show custom payout tooltip + if = { + limit = { + exists = scope:varangian_3 + } + custom_tooltip = major_gold_to_varangians_tooltip + } + else_if = { + limit = { + exists = scope:varangian_2 + } + custom_tooltip = medium_gold_to_varangians_tooltip + } + else_if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + custom_tooltip = minor_gold_to_varangians_tooltip + } + + if = { + limit = { + scope:varangian_leader = { + is_courtier_of = root + } + } + reverse_add_opinion = { + target = scope:varangian_leader + modifier = loyalty_opinion + opinion = 60 + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_leader + gold = 25 + } + } + } + if = { + limit = { + exists = scope:varangian_2 + } + reverse_add_opinion = { + target = scope:varangian_2 + modifier = loyalty_opinion + opinion = 60 + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_2 + gold = 25 + } + } + } + if = { + limit = { + exists = scope:varangian_3 + } + reverse_add_opinion = { + target = scope:varangian_3 + modifier = loyalty_opinion + opinion = 60 + } + hidden_effect = { + pay_long_term_gold = { + target = scope:varangian_3 + gold = 25 + } + } + } + + #Apply randomized_malus + ep3_palace_looting_random_malus_effect = yes + + stress_impact = { + generous = miniscule_stress_impact_loss + paranoid = minor_stress_impact_loss + greedy = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = -0.5 + ai_vengefulness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = vengeful + has_trait = arrogant + has_trait = arbitrary + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = arrogant + has_trait = arbitrary + } + } + } + } + after = { + if = { + limit = { + scope:varangian_leader = { + has_character_flag = need_military_outfit + } + } + scope:varangian_leader = { + remove_character_flag = need_military_outfit + } + } + if = { + limit = { + has_character_flag = malus_broken_artifact + } + remove_character_flag = malus_broken_artifact + } + if = { + limit = { + has_character_flag = malus_stolen_artifact + } + remove_character_flag = malus_stolen_artifact + } + if = { + limit = { + has_character_flag = malus_court_grandeur + } + remove_character_flag = malus_court_grandeur + } + if = { + limit = { + has_character_flag = refuse_bonus_dread + } + remove_character_flag = refuse_bonus_dread + } + if = { + limit = { + has_character_flag = refuse_bonus_opinion + } + remove_character_flag = refuse_bonus_opinion + } + if = { + limit = { + has_character_flag = refuse_bonus_prestige + } + remove_character_flag = refuse_bonus_prestige + } + if = { + limit = { + has_character_flag = accept_bonus_heavy_infantry + } + remove_character_flag = accept_bonus_heavy_infantry + } + if = { + limit = { + has_character_flag = accept_bonus_scheme_resist + } + remove_character_flag = accept_bonus_scheme_resist + } + if = { + limit = { + has_character_flag = accept_bonus_army + } + remove_character_flag = accept_bonus_army + } + if = { + limit = { + has_character_flag = accept_bonus_legitimacy + } + remove_character_flag = accept_bonus_legitimacy + } + } +} + +#Byzantine emperor sends fireships to defend the strait of Marmara +ep3_emperor_yearly.3010 = { + hidden = yes + + trigger = { + #province is strait of Marmara + scope:army.location = { + OR = { + this = province:947 + this = province:950 + this = province:948 + this = province:8667 + this = province:8668 + this = province:8665 + } + } + #A lot of jank would be introduced by multiplayer and armies continuing to move, unpaused + has_multiple_players = no + title:c_byzantion = { has_county_modifier = defensive_fire_dromons_modifier } + NOT = { has_character_flag = used_fire_dromons } + #this event is really going to f up the enemy army in a way no player will appreciate + is_ai = yes + + #Is it at war with powerful ruler whose capital is Constantinople + any_war_enemy = { + is_landed = yes + capital_county = title:c_byzantion + capital_province = { is_occupied = no } + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + } + } + } + } + + immediate = { + save_scope_as = invader + scope:army.army_commander ?= { save_scope_as = invading_commander } + random_war_enemy = { + limit = { + is_landed = yes + capital_county = title:c_byzantion + capital_province = { is_occupied = no } + culture = { + OR = { + this = culture:greek + any_parent_culture_or_above = { this = culture:greek } + } + } + } + save_scope_as = marmara_defender + } + scope:marmara_defender = { + trigger_event = ep3_emperor_yearly.3011 + } + } +} + +ep3_emperor_yearly.3011 = { + type = character_event + title = ep3_emperor_yearly.3011.t + desc = { + desc = ep3_emperor_yearly.3011.intro + first_valid = { + triggered_desc = { + trigger = { + scope:invader = { + this = scope:invading_commander + } + } + desc = ep3_emperor_yearly.3011.liege_attacking + } + desc = ep3_emperor_yearly.3011.commander_attacking + } + desc = ep3_emperor_yearly.3011.desc + triggered_desc = { + trigger = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = ep3_emperor_yearly.3011.kyrie_eleison + } + } + theme = war + override_background = { reference = ep3_constantinople } + left_portrait = { + character = scope:city_defender + animation = survey + camera = camera_event_left_away + } + lower_right_portrait = { + character = scope:invading_commander + } + + immediate = { + #perspective character for event window + if = { + limit = { + is_available = yes + } + save_scope_as = city_defender + } + else_if = { + limit = { + cp:councillor_marshal ?= { + is_available = yes + } + } + cp:councillor_marshal = { + save_scope_as = city_defender + } + } + else_if = { + limit = { + OR = { + has_diarchy_type = temporary_regency + has_diarchy_type = regency + } + diarch = { + is_available = yes + } + } + diarch = { save_scope_as = city_defender } + } + else = { + save_scope_as = city_defender + } + scope:city_defender = { + add_character_flag = need_military_outfit + } + scope:invader = { + if = { + limit = { + any_knight = { + is_in_army = yes + this != scope:invading_commander + } + } + random_knight = { + limit = { + is_in_army = yes + this != scope:invading_commander + } + save_scope_as = knight_1 + } + } + if = { + limit = { + any_knight = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:invading_commander + } + } + } + random_knight = { + limit = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:invading_commander + } + } + save_scope_as = knight_2 + } + } + if = { + limit = { + any_knight = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:invading_commander + } + } + } + random_knight = { + limit = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:invading_commander + } + } + save_scope_as = knight_3 + } + } + if = { + limit = { + any_knight = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:knight_3 + this = scope:invading_commander + } + } + } + random_knight = { + limit = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:knight_3 + this = scope:invading_commander + } + } + save_scope_as = knight_4 + } + } + if = { + limit = { + any_knight = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:knight_3 + this = scope:knight_4 + this = scope:invading_commander + } + } + } + random_knight = { + limit = { + is_in_army = yes + NOR = { + this = scope:knight_1 + this = scope:knight_2 + this = scope:knight_3 + this = scope:knight_4 + this = scope:invading_commander + } + } + save_scope_as = knight_5 + } + } + } + } + #Use the greek fire ships + option = { + name = ep3_emperor_yearly.3011.a + add_character_flag = { + flag = used_fire_dromons + days = 30 + } + custom_tooltip = unable_to_use_fire_ships_tooltip + scope:city_defender = { + duel = { + skill = martial + target = scope:invading_commander + 35 = { #Your fleet ruins the enemy + desc = ep3_emperor_yearly.3011.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -34 + } + modifier = { + has_trait = forder + add = 20 + } + modifier = { + highest_held_title_tier >= tier_empire + + add = 10 + } + modifier = { + scope:army = { + army_size <= 1000 + } + add = 10 + } + modifier = { + scope:army = { + #Big enough army to actually siege the city + army_size < 2500 + } + add = 10 + } + modifier = { + scope:invading_commander = { + has_trait = reckless + } + add = 10 + } + modifier = { + has_trait = reckless + add = 10 + } + modifier = { + has_trait = aggressive_attacker + add = 10 + } + modifier = { + has_trait = military_engineer + add = 10 + } + modifier = { + scope:invading_commander = { + has_trait = aggressive_attacker + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_01 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_03 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_05 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_07 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_01 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_03 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_05 + } + add = 5 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_07 + } + add = 5 + } + show_as_tooltip = { ep3_greek_fire_success_effect = yes } + root = { add_character_flag = successful_greek_fire_attack } + } + 50 = { #Your fleet does some damage + desc = ep3_emperor_yearly.3011.a.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + has_trait = forder + add = 40 + } + modifier = { + scope:army = { + #Big enough army to actually siege the city + army_size < 2500 + } + add = 20 + } + modifier = { + scope:army = { + army_size <= 1000 + } + add = 20 + } + modifier = { + scope:invading_commander = { + has_trait = reckless + } + add = 20 + } + modifier = { + scope:invading_commander = { + has_trait = aggressive_attacker + } + add = 10 + } + modifier = { + has_trait = aggressive_attacker + add = 20 + } + modifier = { + has_trait = military_engineer + add = 20 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_01 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_03 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_05 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = curtain_walls_07 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_01 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_03 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_05 + } + add = 10 + } + modifier = { + province:496 = { + has_building_or_higher = common_tradeport_07 + } + add = 10 + } + show_as_tooltip = { ep3_greek_fire_fail_effect = yes } + root = { add_character_flag = failed_greek_fire_attack } + } + 15 = { #Your fleet does a little damage and... ruins themselves + desc = ep3_emperor_yearly.3011.a.critical_fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -14 + } + modifier = { + scope:invading_commander = { + has_trait = forder + } + add = 40 + } + modifier = { + scope:invading_commander = { + has_trait = organizer + } + add = 20 + } + modifier = { + scope:invading_commander = { + has_trait = cautious_leader + } + add = 20 + } + modifier = { + has_trait = cautious_leader + add = 20 + } + + modifier = { + scope:army = { + army_size >= 5000 + } + add = 20 + } + modifier = { + scope:army = { + army_size >= 10000 + } + add = 20 + } + show_as_tooltip = { ep3_greek_fire_crit_fail_effect = yes } + root = { add_character_flag = crit_failed_greek_fire_attack } + } + } + } + trigger_event = ep3_emperor_yearly.3012 + stress_impact = { + compassionate = medium_stress_impact_gain + cautious_leader = medium_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 1 + } + modifier = { + add = 20 + scope:city_defender = { + martial >= high_skill_rating + } + } + modifier = { + add = 20 + scope:invading_commander = { + martial <= high_skill_rating + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = compassionate + has_trait = cautious_leader + } + } + modifier = { + factor = 2 + scope:army = { + army_size >= 4000 + } + } + modifier = { + factor = 2 + scope:army = { + army_size >= 7000 + } + } + } + } + #Don't attack + option = { + name = ep3_emperor_yearly.3011.b + if = { + limit = { + scope:army = { + #Big enough army to actually siege the city + army_size >= 4000 + } + } + add_prestige = medium_prestige_loss + } + else_if = { + limit = { + scope:army = { + army_size >= 3000 + } + } + add_prestige = minor_prestige_loss + } + else = { + add_prestige = miniscule_prestige_loss + } + stress_impact = { + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + sadistic = miniscule_stress_impact_gain + reckless = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + } + modifier = { + add = 20 + scope:city_defender = { + martial < decent_skill_rating + } + } + modifier = { + add = 20 + scope:invading_commander = { + martial > very_high_skill_rating + } + } + modifier = { + factor = 0.5 + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = reckless + has_trait = brave + } + } + modifier = { + factor = 2 + scope:army = { + army_size <= 2000 + } + } + modifier = { + factor = 2 + scope:army = { + army_size < 1000 + } + } + } + } + after = { + scope:city_defender = { remove_character_flag = need_military_outfit } + } +} + +ep3_emperor_yearly.3012 = { + type = character_event + title = ep3_emperor_yearly.3012.t + desc = { + desc = ep3_emperor_yearly.3012.intro + #Triggered desc based on success + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = successful_greek_fire_attack + } + desc = ep3_emperor_yearly.3012.attack_success + } + triggered_desc = { + trigger = { + has_character_flag = failed_greek_fire_attack + } + desc = ep3_emperor_yearly.3012.attack_fail + } + triggered_desc = { + trigger = { + has_character_flag = crit_failed_greek_fire_attack + } + desc = ep3_emperor_yearly.3012.attack_crit_fail + } + } + } + theme = war + override_background = { reference = ocean } + widget = { + gui = "event_window_widget_vfx_heavy_smoke" + container = "foreground_shader_vfx_container" + } + right_portrait = { + character = scope:invading_commander + triggered_animation = { + trigger = { + root = { has_character_flag = successful_greek_fire_attack } + } + animation = sword_yield_start + } + triggered_animation = { + trigger = { + root = { has_character_flag = failed_greek_fire_attack } + } + animation = fear + } + triggered_animation = { + trigger = { + root = { has_character_flag = crit_failed_greek_fire_attack } + } + animation = sword_coup_degrace + } + } + + immediate = { + play_music_cue = "mx_cue_war_declared" + #show effect as tooltip here + create_character_memory = { + type = endured_greek_fire_memory + participants = { + attacker = root + } + } + } + + option = { + name = { + trigger = { has_character_flag = successful_greek_fire_attack } + text = ep3_emperor_yearly.3012.a_success + } + name = { + trigger = { has_character_flag = failed_greek_fire_attack } + text = ep3_emperor_yearly.3012.a_fail + } + name = { + trigger = { has_character_flag = crit_failed_greek_fire_attack } + text = ep3_emperor_yearly.3012.a_crit_fail + } + + if = { + limit = { has_character_flag = successful_greek_fire_attack + } + ep3_greek_fire_success_effect = yes + } + if = { + limit = { + has_character_flag = failed_greek_fire_attack + } + ep3_greek_fire_fail_effect = yes + } + if = { + limit = { + has_character_flag = crit_failed_greek_fire_attack + } + ep3_greek_fire_crit_fail_effect = yes + } + #Apply memory to invading commander? + if = { + limit = { + has_character_flag = successful_greek_fire_attack + } + stress_impact = { + sadistic = medium_stress_impact_loss + paranoid = minor_stress_impact_loss + vengeful = medium_stress_impact_loss + callous = minor_stress_impact_loss + } + } + } + after = { + if = { + limit = { has_character_flag = successful_greek_fire_attack + } + remove_character_flag = successful_greek_fire_attack + } + if = { + limit = { + has_character_flag = failed_greek_fire_attack + } + remove_character_flag = failed_greek_fire_attack + } + if = { + limit = { + has_character_flag = crit_failed_greek_fire_attack + } + remove_character_flag = crit_failed_greek_fire_attack + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_emperor_yearly_8.txt b/N3OW/events/dlc/ep3/ep3_emperor_yearly_8.txt new file mode 100644 index 00000000..7d2ab642 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_emperor_yearly_8.txt @@ -0,0 +1,2206 @@ +namespace = ep3_emperor_yearly + +############################ +# EP3 Admin Emperor Events # +# by Joe Parkin # +# 8000 - 8500 # +############################ + +# Capital depopulated: move from somewhere else? + +scripted_trigger ep3_emperor_yearly_8000_county_holder_trigger = { + NOT = { has_county_modifier = ep3_development_sacrifice_modifier } + holder = { + NOR = { + this = root + scope:suggestor ?= this + } + OR = { + is_governor = yes + liege = { is_governor = yes } + } + } +} + +scripted_effect ep3_emperor_yearly_8000_save_governor_county_pair_effect = { + save_scope_as = governor_$COUNT$ + random_in_list = { + list = developed_counties + limit = { + OR = { + holder = scope:governor_$COUNT$ + holder = { is_vassal_of = scope:governor_$COUNT$ } + } + } + save_scope_as = county_$COUNT$ + } +} + +scripted_effect ep3_emperor_yearly_8000_county_effect = { + scope:governor_$COUNT$ = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -20 + } + } + save_scope_value_as = { + name = development_loss + value = { + value = scope:county_$COUNT$.development_level + multiply = 0.1 + ceiling = yes + multiply = -1 + } + } + scope:county_$COUNT$ = { + change_development_level = scope:development_loss + add_county_modifier = { + modifier = ep3_development_sacrifice_modifier + years = 10 + } + } +} + +ep3_emperor_yearly.8000 = { + type = character_event + title = ep3_emperor_yearly.8000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { capital_province = province:496 } # Constantinopolis + desc = ep3_emperor_yearly.8000.intro_byz + } + desc = ep3_emperor_yearly.8000.intro + } + desc = ep3_emperor_yearly.8000.desc + } + theme = emperor + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:suggestor + triggered_animation = { + trigger = { has_trait = blind } + animation = admiration + } + animation = chancellor + } + lower_left_portrait = scope:governor_1 + lower_center_portrait = scope:governor_2 + lower_right_portrait = scope:governor_3 + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + # Ensure you are l'empereur + highest_held_title_tier >= tier_empire + is_independent_ruler = yes + government_allows = administrative + # Ensure there are people to annoy + any_vassal = { + count >= 3 + is_governor = yes + } + # Ensure this has not happened already + NOT = { + capital_county = { has_county_modifier = ep3_development_waning_modifier } + } + # Recent conflict + OR = { + any_truce_holder = { } + any_truce_target = { } + is_at_war = yes + } + # Be nice + NOR = { + any_character_epidemic = { } + capital_province = { + any_province_epidemic = { } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_truce_holder = { highest_held_title_tier >= tier_kingdom } + add = 1 + } + modifier = { + any_truce_target = { highest_held_title_tier >= tier_kingdom } + add = 1 + } + modifier = { + is_at_war = yes + add = 1 + } + } + + immediate = { + if = { # Steward + limit = { + cp:councillor_steward ?= { is_available_adult = yes } + } + cp:councillor_steward = { save_scope_as = suggestor } + } + else = { # Fallback + random_courtier = { + limit = { is_available_adult = yes } + weight = { + base = 1 + modifier = { + has_trait = education_stewardship + factor = 10 + } + modifier = { add = stewardship } + modifier = { + has_trait = blind + factor = 0 + } + } + save_scope_as = suggestor + } + } + # Find development target + ordered_sub_realm_county = { + limit = { ep3_emperor_yearly_8000_county_holder_trigger = yes } + order_by = development_level + position = 2 + save_scope_value_as = { + name = minimum_development + value = development_level + } + } + # Find matching counties + every_sub_realm_county = { + limit = { + development_level >= scope:minimum_development + ep3_emperor_yearly_8000_county_holder_trigger = yes + } + add_to_list = developed_counties + holder = { + if = { + limit = { is_governor = yes } + add_to_list = developed_governors + } + else_if = { + limit = { + liege = { is_governor = yes } + } + liege = { add_to_list = developed_governors } + } + } + } + hidden_effect = { + while = { + count = 3 + random_in_list = { + list = developed_governors + limit = { + trigger_if = { + limit = { exists = scope:governor_1 } + this != scope:governor_1 + } + trigger_if = { + limit = { exists = scope:governor_2 } + this != scope:governor_2 + } + } + weight = { + base = 1 + modifier = { + OR = { + is_of_major_interest_trigger = { CHARACTER = root } + liege = { is_of_major_interest_trigger = { CHARACTER = root } } + } + add = 5 + } + modifier = { + OR = { + is_of_major_interest_trigger = { CHARACTER = scope:suggestor } + liege = { is_of_major_interest_trigger = { CHARACTER = scope:suggestor } } + } + add = 3 + } + modifier = { + OR = { + is_of_minor_interest_trigger = { CHARACTER = root } + liege = { is_of_minor_interest_trigger = { CHARACTER = root } } + } + add = 5 + } + modifier = { + OR = { + is_of_minor_interest_trigger = { CHARACTER = scope:suggestor } + liege = { is_of_minor_interest_trigger = { CHARACTER = scope:suggestor } } + } + add = 3 + } + } + if = { + limit = { exists = scope:governor_2 } + ep3_emperor_yearly_8000_save_governor_county_pair_effect = { COUNT = 3 } + } + else_if = { + limit = { exists = scope:governor_1 } + ep3_emperor_yearly_8000_save_governor_county_pair_effect = { COUNT = 2 } + } + else = { + ep3_emperor_yearly_8000_save_governor_county_pair_effect = { COUNT = 1 } + } + } + } + } + } + + option = { + name = ep3_emperor_yearly.8000.a + highlight_portrait = scope:governor_1 + ep3_emperor_yearly_8000_county_effect = { COUNT = 1 } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:governor_1 + multiplier = -0.5 + } + } + } + + option = { + name = ep3_emperor_yearly.8000.b + trigger = { exists = scope:governor_2 } + highlight_portrait = scope:governor_2 + ep3_emperor_yearly_8000_county_effect = { COUNT = 2 } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:governor_2 + multiplier = -0.5 + } + } + } + + option = { + name = ep3_emperor_yearly.8000.c + trigger = { exists = scope:governor_3 } + highlight_portrait = scope:governor_3 + ep3_emperor_yearly_8000_county_effect = { COUNT = 3 } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = 0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:governor_3 + multiplier = -0.5 + } + } + } + + option = { + name = ep3_emperor_yearly.8000.d + capital_county = { + change_development_level = -2 + add_county_modifier = { + modifier = ep3_development_waning_modifier + years = 10 + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 0.25 + } + } + } +} + +# The fake letter of introduction + +scripted_trigger emperor_yearly_8010_valid_governor_trigger = { + is_governor = yes + is_available_adult = yes + NOR = { + is_close_family_of = root + is_spouse_of = root + has_any_scripted_relation = root + } +} + +ep3_emperor_yearly.8010 = { + type = letter_event + opening = { + first_valid = { + triggered_desc = { + trigger = { has_title = title:e_byzantium } + desc = ep3_emperor_yearly.8010.opening_byz + } + desc = ep3_emperor_yearly.8010.opening + } + } + desc = ep3_emperor_yearly.8010.desc + sender = { + character = scope:governor + animation = sadness + } + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + # Ensure you are l'empereur + highest_held_title_tier >= tier_empire + is_independent_ruler = yes + government_allows = administrative + # Ensure there is a governor to be duped + any_vassal = { emperor_yearly_8010_valid_governor_trigger = yes } + } + + immediate = { + random_vassal = { + limit = { emperor_yearly_8010_valid_governor_trigger = yes } + weight = { + base = 1 + modifier = { + highest_held_title_tier = tier_duchy + add = 1 + } + modifier = { + is_powerful_vassal = yes + add = -1 + } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = governor + } + create_character = { + template = pool_repopulate_intrigue + location = scope:governor.capital_province + dynasty = none + save_scope_as = liar + } + hidden_effect = { + rightfully_imprison_character_effect = { + TARGET = scope:liar + IMPRISONER = scope:governor + } + } + show_as_tooltip = { + scope:governor = { + imprison = { + target = scope:liar + type = house_arrest + } + } + } + } + + option = { # Reward + name = ep3_emperor_yearly.8010.a + pay_short_term_gold = { + gold = tiny_gold_value + target = scope:governor + } + reverse_add_opinion = { + target = scope:governor + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = -0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:governor + multiplier = 0.25 + } + } + } + + option = { # Corroborate + name = ep3_emperor_yearly.8010.b + change_influence = medium_influence_loss + add_prestige = minor_prestige_gain + scope:liar = { release_from_prison = yes } + scope:governor = { add_courtier = scope:liar } + reverse_add_opinion = { + target = scope:liar + modifier = grateful_opinion + opinion = 30 + } + add_hook = { + target = scope:liar + type = loyalty_hook + } + stress_impact = { + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 0.5 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + + option = { # Imprison + name = ep3_emperor_yearly.8010.c + scope:governor = { change_influence = minor_influence_gain } + hidden_effect = { + scope:liar = { release_from_prison = yes } + } + send_interface_toast = { + title = ep3_emperor_yearly.8010.c.tt + left_icon = scope:liar + imprison = { + target = scope:liar + type = house_arrest + } + } + hidden_effect = { + scope:liar = { change_prison_type = dungeon } + } + stress_impact = { + lazy = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = 0.5 + } + } + } + + option = { # Dismiss + name = ep3_emperor_yearly.8010.d + scope:governor = { change_influence = medium_influence_gain } + add_dread = miniscule_dread_gain + scope:liar = { + death = { + death_reason = death_execution + killer = scope:governor + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.25 + } + } + } +} + +# Selling the purple + +scripted_trigger emperor_yearly_8020_valid_purpler_trigger = { + is_available_ai_adult = yes + top_liege = root + is_clergy = no + NOR = { + has_character_modifier = ep3_bought_the_purple_modifier + root.cp:councillor_steward ?= this + is_spouse_of = root + has_trait = humble + has_trait = content + } +} + +scripted_effect emperor_yearly_8020_valid_purpler_effect = { + save_scope_as = purplest + pay_short_term_gold = { + target = root + gold = scope:purplest.major_gold_value + } + if = { + limit = { is_close_family_of = root } + change_influence = minor_influence_gain + } + else_if = { + limit = { has_claim_on = root.primary_title } + change_influence = minor_influence_gain + } + else = { change_influence = medium_influence_gain } + add_character_modifier = ep3_bought_the_purple_modifier + root.primary_title = { + change_appointment_investment = { + target = scope:purplest + value = 25 + } + } +} + +ep3_emperor_yearly.8020 = { + type = character_event + title = ep3_emperor_yearly.8020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { gold < -150 } + desc = ep3_emperor_yearly.8020.intro.really_bankrupt + } + triggered_desc = { + trigger = { gold < 0 } + desc = ep3_emperor_yearly.8020.intro.bankrupt + } + desc = ep3_emperor_yearly.8020.intro + } + desc = ep3_emperor_yearly.8020.desc + } + theme = emperor + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:suggestor + animation = admiration + } + lower_left_portrait = scope:purpler_1 + lower_center_portrait = scope:purpler_2 + lower_right_portrait = scope:purpler_3 + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + # Ensure you are l'empereur + is_roman_emperor_trigger = yes + # Ensure you are struggling financially + gold < medium_gold_value + # Ensure there is someone governor who wants the purple + OR = { + any_relation = { + type = friend + emperor_yearly_8020_valid_purpler_trigger = yes + } + primary_title = { + any_claimant = { emperor_yearly_8020_valid_purpler_trigger = yes } + } + any_vassal = { + is_governor = yes + emperor_yearly_8020_valid_purpler_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + # Weight up as you get poorer + modifier = { + gold < minor_gold_value + add = 1 + } + modifier = { + gold < tiny_gold_value + add = 1 + } + modifier = { + gold < 0 + add = 1 + } + modifier = { + gold < 50 + add = 1 + } + modifier = { + gold < 100 + add = 1 + } + modifier = { + gold < 150 + add = 1 + } + } + + immediate = { + # Find suitable candidates + every_relation = { + type = friend + limit = { emperor_yearly_8020_valid_purpler_trigger = yes } + add_to_list = potential_purplers + } + primary_title = { + every_claimant = { + limit = { emperor_yearly_8020_valid_purpler_trigger = yes } + add_to_list = potential_purplers + } + } + every_vassal = { + limit = { + is_governor = yes + emperor_yearly_8020_valid_purpler_trigger = yes + } + add_to_list = potential_purplers + } + # Select up to 3 + while = { + limit = { + # Have not already found 3 + NAND = { + exists = scope:purpler_1 + exists = scope:purpler_2 + exists = scope:purpler_3 + } + # Anyone left to pick from + any_in_list = { + list = potential_purplers + NOR = { + scope:purpler_1 ?= this + scope:purpler_2 ?= this + scope:purpler_3 ?= this + } + } + } + random_in_list = { + list = potential_purplers + # Ability to pay + limit = { gold >= monumental_gold_value } + alternative_limit = { gold >= massive_gold_value } + alternative_limit = { gold >= major_gold_value } + alternative_limit = { always = yes } + weight = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.1 + ai_greed = 0.1 + } + modifier = { # Prefer arrogant + has_trait = arrogant + add = 10 + } + modifier = { # Prefer ambitious + has_trait = ambitious + add = 5 + } + modifier = { # Prefer born purplers + has_trait = born_in_the_purple + factor = 2 + } + modifier = { # Prefer higher tiers + highest_held_title_tier > 0 + add = { + value = highest_held_title_tier + multiply = 3 + } + } + modifier = { # Don't like barons + highest_held_title_tier = tier_barony + add = -50 + } + modifier = { # Don't like counts + highest_held_title_tier = tier_county + add = -25 + } + modifier = { # Prefer best friends + has_relation_best_friend = root + add = 10 + } + modifier = { # Prefer friends + has_relation_friend = root + add = 10 + } + modifier = { # Prefer strong claimants + has_strong_claim_on = root.primary_title + add = 10 + } + modifier = { # Prefer claimants + has_claim_on = root.primary_title + add = 10 + } + # For more diversity + modifier = { + has_relation_friend = root + any_in_list = { + list = purplers + has_relation_friend = root + } + factor = 0 + } + modifier = { + has_claim_on = root.primary_title + any_in_list = { + list = purplers + has_claim_on = root.primary_title + } + factor = 0 + } + modifier = { + is_vassal_of = root + is_governor = yes + any_in_list = { + list = purplers + is_vassal_of = root + is_governor = yes + } + factor = 0 + } + # Interest + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + modifier = { + gold <= medium_gold_value + add = -25 + } + modifier = { + gold <= minor_gold_value + add = -50 + } + modifier = { + gold <= 0 + factor = 0 + } + } + if = { + limit = { exists = scope:purpler_2 } + save_scope_as = purpler_3 + } + else_if = { + limit = { exists = scope:purpler_1 } + save_scope_as = purpler_2 + } + else = { save_scope_as = purpler_1 } + remove_from_list = potential_purplers + add_to_list = purplers + } + } + # Save Suggestor + if = { # Steward + limit = { + cp:councillor_steward ?= { is_available_adult = yes } + } + cp:councillor_steward = { save_scope_as = suggestor } + } + else = { # Fallback + random_courtier = { + limit = { + is_available_adult = yes + NOT = { is_in_list = purplers } + } + weight = { + base = 1 + modifier = { + has_trait = education_stewardship + factor = 10 + } + modifier = { add = stewardship } + modifier = { + has_trait = blind + factor = 0 + } + } + save_scope_as = suggestor + } + } + } + + option = { # 1 + name = { + trigger = { + scope:purpler_1 = { has_relation_friend = root } + } + text = ep3_emperor_yearly.8020.a.friend + } + name = { + trigger = { + scope:purpler_1 = { has_claim_on = root.primary_title } + } + text = ep3_emperor_yearly.8020.a.claimant + } + name = { + trigger = { + scope:purpler_1 = { + NOR = { + has_relation_friend = root + has_claim_on = root.primary_title + } + } + } + text = ep3_emperor_yearly.8020.a.vassal + } + highlight_portrait = scope:purpler_1 + scope:purpler_1 = { emperor_yearly_8020_valid_purpler_effect = yes } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = -0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:purpler_1 + multiplier = 0.25 + } + } + } + + option = { # 2 + name = { + trigger = { + scope:purpler_2 = { has_relation_friend = root } + } + text = ep3_emperor_yearly.8020.b.friend + } + name = { + trigger = { + scope:purpler_2 = { has_claim_on = root.primary_title } + } + text = ep3_emperor_yearly.8020.b.claimant + } + name = { + trigger = { + scope:purpler_2 = { + NOR = { + has_relation_friend = root + has_claim_on = root.primary_title + } + } + } + text = ep3_emperor_yearly.8020.b.vassal + } + highlight_portrait = scope:purpler_2 + scope:purpler_2 = { emperor_yearly_8020_valid_purpler_effect = yes } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 0.5 + ai_value_modifier = { + ai_honor = -0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:purpler_2 + multiplier = 0.25 + } + } + } + + option = { # 3 + name = { + trigger = { + scope:purpler_3 = { has_relation_friend = root } + } + text = ep3_emperor_yearly.8020.c.friend + } + name = { + trigger = { + scope:purpler_3 = { has_claim_on = root.primary_title } + } + text = ep3_emperor_yearly.8020.c.claimant + } + name = { + trigger = { + scope:purpler_3 = { + NOR = { + has_relation_friend = root + has_claim_on = root.primary_title + } + } + } + text = ep3_emperor_yearly.8020.c.vassal + } + highlight_portrait = scope:purpler_3 + scope:purpler_3 = { emperor_yearly_8020_valid_purpler_effect = yes } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_rationality = -0.5 + } + opinion_modifier = { + who = root + opinion_target = scope:purpler_3 + multiplier = 0.25 + } + } + } + + option = { # PURPLE MINE + name = ep3_emperor_yearly.8020.d + add_prestige = medium_prestige_value + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.25 + } + } + } +} + +# Porphyrios returns + +scripted_trigger ep3_emperor_yearly_8030_bosporos_trigger = { + any_sub_realm_county = { + is_coastal_county = yes + OR = { + duchy = title:d_thrace + duchy = title:d_optimatoi + duchy = title:d_opsikion + this = title:c_abydos + } + } +} + +scripted_effect ep3_emperor_yearly_8030_coast_modifier_effect = { + every_in_list = { + list = coast_counties + custom = every_bosporos_coast_county_tt + add_county_modifier = { + modifier = ep3_leviathan_$MODIFIER$_county_modifier + years = 15 + } + } +} + +scripted_effect ep3_emperor_yearly_8030_sea_modifier_effect = { + every_in_list = { + list = sea_provinces + custom = every_bosporos_sea_province_tt + add_province_modifier = { + modifier = ep3_leviathan_$MODIFIER$_province_modifier + years = 15 + } + } +} + +ep3_emperor_yearly.8030 = { + type = character_event + title = ep3_emperor_yearly.8030.t + desc = ep3_emperor_yearly.8030.desc + theme = emperor + override_background = { reference = docks } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:complainer + animation = survey + } + cooldown = { years = 50 } + + trigger = { + has_ep3_dlc_trigger = yes + # Ensure you are l'empereur + is_roman_emperor_trigger = yes + # Have a marshal + cp:councillor_marshal ?= { is_ai = yes } + # Ensure you control the Bosporos strait + completely_controls = title:c_byzantion # Dytika + completely_controls = title:c_bithynia # Anatoli + # Never twice + NOT = { has_character_flag = ep3_porphyrios_cooldown } + } + + immediate = { + add_character_flag = ep3_porphyrios_cooldown + # Sea provinces scopes + province:8668 = { add_to_list = sea_provinces } + province:947 = { add_to_list = sea_provinces } + province:8665 = { add_to_list = sea_provinces } + # Coastal counties scopes + title:c_byzantion = { add_to_list = coast_counties } + title:d_thrace = { + every_de_jure_county = { + limit = { is_coastal_county = yes } + add_to_list = coast_counties + } + } + title:d_optimatoi = { + every_de_jure_county = { + limit = { is_coastal_county = yes } + add_to_list = coast_counties + } + } + title:d_opsikion = { + every_de_jure_county = { + limit = { is_coastal_county = yes } + add_to_list = coast_counties + } + } + title:c_abydos = { add_to_list = coast_counties } + # Save marshal + cp:councillor_marshal = { save_scope_as = marshal } + # Complaining character scope + cp:councillor_steward ?= { add_to_list = complainants } + every_vassal = { + limit = { ep3_emperor_yearly_8030_bosporos_trigger = yes } + add_to_list = complainants + } + every_courtier = { add_to_list = complainants } + ordered_in_list = { + list = complainants + limit = { + is_available_ai_adult = yes + is_clergy = no + } + order_by = highest_held_title_tier + save_scope_as = complainer + } + # Justinian I for flavor + character:70512 = { save_scope_as = justinian } + random = { + chance = 25 + save_scope_as = artifact_reward + } + } + + option = { # Bold + name = ep3_emperor_yearly.8030.a + flavor = ep3_emperor_yearly.8030.a.flavor + scope:marshal = { + duel = { + skill = martial + value = decent_skill_rating + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_emperor_yearly.8030.a.success + root = { + show_as_tooltip = { + send_interface_toast = { + title = ep3_emperor_yearly.8030.a.success + left_icon = root + add_prestige = medium_prestige_gain + add_short_term_gold = medium_gold_value + add_character_modifier = { + modifier = ep3_leviathan_success_character_modifier + years = 15 + } + scope:marshal = { change_influence = medium_influence_gain } + } + random = { + chance = 25 + create_artifact = { + name = whale_fat_candles_name + description = whale_fat_candles_description + rarity = masterwork + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_prestige_5_modifier + creator = root + save_scope_as = whale_fat_candles + } + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_emperor_yearly.8030.a.success + left_icon = root + add_prestige = medium_prestige_gain + add_short_term_gold = medium_gold_value + add_character_modifier = { + modifier = ep3_leviathan_success_character_modifier + years = 15 + } + scope:marshal = { change_influence = medium_influence_gain } + if = { + limit = { exists = scope:artifact_reward } + create_artifact = { + name = whale_fat_candles_name + description = whale_fat_candles_description + rarity = masterwork + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_prestige_5_modifier + creator = root + save_scope_as = whale_fat_candles + } + } + } + } + } + } + 10 = { + desc = ep3_emperor_yearly.8030.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_emperor_yearly.8030.a.failure + left_icon = root + add_prestige = minor_prestige_loss + remove_short_term_gold = tiny_gold_value + add_character_modifier = { + modifier = ep3_leviathan_failure_character_modifier + years = 15 + } + ep3_emperor_yearly_8030_coast_modifier_effect = { MODIFIER = loose } + ep3_emperor_yearly_8030_sea_modifier_effect = { MODIFIER = loose } + } + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = -0.25 + ai_boldness = 0.5 + } + } + } + + option = { # Rational + name = ep3_emperor_yearly.8030.c + remove_treasury_or_gold = minor_treasury_or_gold_value + ep3_emperor_yearly_8030_coast_modifier_effect = { MODIFIER = mandate } + ep3_emperor_yearly_8030_sea_modifier_effect = { MODIFIER = mandate } + stress_impact = { + greedy = medium_stress_impact_gain + lazy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { # Do nothing + name = ep3_emperor_yearly.8030.d + flavor = ep3_emperor_yearly.8030.d.flavor + add_piety = major_piety_gain + ep3_emperor_yearly_8030_coast_modifier_effect = { MODIFIER = loose } + ep3_emperor_yearly_8030_sea_modifier_effect = { MODIFIER = loose } + stress_impact = { + zealous = medium_stress_impact_loss + diligent = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.25 + } + } + } +} + +# Iconoclasm + +ep3_emperor_yearly.8040 = { + type = character_event + title = ep3_emperor_yearly.8040.t + desc = { + desc = ep3_emperor_yearly.8040.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:truce_target } + desc = ep3_emperor_yearly.8040.truce_target + } + triggered_desc = { + trigger = { exists = scope:truce_holder } + desc = ep3_emperor_yearly.8040.truce_holder + } + triggered_desc = { + trigger = { exists = scope:epidemic } + desc = ep3_emperor_yearly.8040.plague + } + triggered_desc = { + trigger = { + any_in_list = { + variable = formerly_infected_counties + this = title:c_byzantion + } + } + desc = ep3_emperor_yearly.8040.past_plague + } + desc = ep3_emperor_yearly.8040.debt + } + desc = ep3_emperor_yearly.8040.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:family } + desc = ep3_emperor_yearly.8040.family + } + triggered_desc = { + trigger = { exists = scope:predecessor } + desc = ep3_emperor_yearly.8040.predecessor + } + desc = ep3_emperor_yearly.8040.leo + } + } + theme = emperor + override_background = { reference = ep3_hagia_sophia } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:priest + triggered_animation = { + trigger = { faith = faith:iconoclast } + animation = admiration + } + animation = disapproval + } + lower_right_portrait = scope:leo + cooldown = { years = 50 } + + trigger = { + OR = { + static_group_filter = { + group = ep3_emperor_yearly.8040 + match = 0.2 + } + has_trait = cynical + } + has_ep3_dlc_trigger = yes + # Ensure you are l'empereur + has_title = title:e_byzantium + # You are not an Iconoclast + faith = faith:orthodox + # Something bad has happened + OR = { + # Won war recently to powerful enemy + any_truce_holder = { highest_held_title_tier >= tier_kingdom } + # Lost war recently to powerful enemy + any_truce_target = { highest_held_title_tier >= tier_kingdom } + # In debt + gold < -100 + # Epidemic + capital_province = { + any_province_epidemic = { } + } + any_in_list = { + variable = formerly_infected_counties + title_province = root.capital_province + } + } + # Never twice + NOT = { has_character_flag = ep3_iconoclast_cooldown } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + # Constantinopolis is Iconoclast + capital_province.faith = faith:iconoclast + } + modifier = { + factor = 2 + # Iconoclasm is about + any_sub_realm_county = { faith = faith:iconoclast } + } + modifier = { + factor = 2 + # Won war recently to powerful enemy + any_truce_holder = { highest_held_title_tier >= tier_kingdom } + } + modifier = { + factor = 2 + # Lost war recently to powerful enemy + any_truce_target = { highest_held_title_tier >= tier_kingdom } + } + modifier = { + factor = 2 + # In debt + gold < -100 + } + modifier = { + factor = 2 + capital_province = { + any_province_epidemic = { } + } + } + modifier = { + factor = 2 + any_in_list = { + variable = formerly_infected_counties + title_province = root.capital_province + } + } + } + + immediate = { + add_character_flag = ep3_iconoclast_cooldown + capital_province = { save_scope_as = constantinople } + character:70502 = { save_scope_as = leo } + title:e_byzantium.previous_holder ?= { + if = { + limit = { faith = faith:iconoclast } + save_scope_as = predecessor + } + } + if = { + limit = { + any_close_family_member = { + faith = faith:iconoclast + OR = { + is_parent_of = root + is_grandparent_of = root + } + } + } + random_close_family_member = { + limit = { + sex_same_as = root + is_parent_of = root + faith = faith:iconoclast + } + alternative_limit = { + is_parent_of = root + faith = faith:iconoclast + } + alternative_limit = { + sex_same_as = root + is_grandparent_of = root + faith = faith:iconoclast + } + alternative_limit = { + is_grandparent_of = root + faith = faith:iconoclast + } + save_scope_as = family + } + } + if = { + limit = { + title:k_orthodox.holder = { is_vassal_of = root } + } + title:k_orthodox.holder = { save_scope_as = priest } + } + else = { + ordered_vassal = { + limit = { + OR = { + is_clergy = yes + is_theocratic_lessee = yes + government_has_flag = government_is_theocracy + } + } + order_by = highest_held_title_tier + save_scope_as = priest + } + } + # Fallback + if = { + limit = { NOT = { exists = scope:priest } } + cp:councillor_court_chaplain ?= { save_scope_as = priest } + } + if = { + limit = { + # Lost war recently to powerful enemy + any_truce_target = { highest_held_title_tier >= tier_kingdom } + } + ordered_truce_target = { + order_by = max_military_strength + save_scope_as = truce_target + } + } + if = { + limit = { + # Won war recently to powerful enemy + any_truce_holder = { highest_held_title_tier >= tier_kingdom } + } + ordered_truce_holder = { + order_by = max_military_strength + save_scope_as = truce_holder + } + } + scope:constantinople = { + if = { + limit = { + any_province_epidemic = { } + } + random_province_epidemic = { + limit = { outbreak_intensity = apocalyptic } + alternative_limit = { outbreak_intensity = major } + alternative_limit = { outbreak_intensity = minor } + save_scope_as = epidemic + } + } + } + } + + option = { # Convert + name = ep3_emperor_yearly.8040.a + add_piety = major_piety_gain + set_character_faith_with_conversion = faith:iconoclast + add_character_modifier = { + modifier = ep3_iconoclast_modifier + years = 15 + } + if = { + limit = { ep3_iconoclast_vassal_count > 0 } + change_influence = { + value = 25 + multiply = ep3_iconoclast_vassal_count + } + } + scope:priest = { + if = { + limit = { faith != faith:iconoclast } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + else = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + stress_impact = { + stubborn = medium_stress_impact_gain + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 0.5 + } + } + } + + option = { # Stay the course + name = ep3_emperor_yearly.8040.b + change_influence = medium_influence_gain + stress_impact = { + fickle = medium_stress_impact_gain + zealous = medium_stress_impact_gain + humble = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 2 + ai_value_modifier = { + ai_energy = -0.5 + ai_rationality = 0.5 + } + } + } +} + +# Norse raiders + +scripted_trigger ep3_emperor_yearly_8050_culture_trigger = { + OR = { + this = culture:norse + any_parent_culture_or_above = { this = culture:norse } + } + culture_number_of_counties > 0 +} + +scripted_effect ep3_emperor_yearly_8050_unchecked_county_effect = { + change_county_control = -10 + change_development_level = -1 + add_county_modifier = { + modifier = ep3_raider_unchecked_modifier + years = 10 + } +} + +ep3_emperor_yearly.8050 = { + type = character_event + title = ep3_emperor_yearly.8050.t + desc = ep3_emperor_yearly.8050.desc + theme = emperor + override_background = { reference = ep3_constantinople } + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = cp:councillor_marshal + animation = worry + } + lower_right_portrait = { + character = scope:raider + outfit_tags = { military } + } + cooldown = { years = 50 } + + trigger = { + has_ep3_dlc_trigger = yes + # Ensure you are l'empereur + government_allows = administrative + highest_held_title_tier >= tier_empire + is_independent_ruler = yes + # Have a marshal + cp:councillor_marshal ?= { is_ai = yes } + # Sea capital + any_held_county = { + development_level >= terrible_development_level + title_province = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + # Only oceans that make sense + OR = { + geographical_region = world_europe + geographical_region = world_middle_east_jerusalem + geographical_region = world_africa_north + geographical_region = world_asia_minor + geographical_region = world_steppe_west + } + } + } + # Never twice + NOT = { has_character_flag = ep3_sea_raiders_cooldown } + # Culture + OR = { + culture:norse = { culture_number_of_counties >= 1 } + any_culture_global = { + culture_number_of_counties >= 1 + any_parent_culture_or_above = { this = culture:norse } + } + } + # Faith + religion:germanic_religion = { + any_faith = { num_county_followers >= 1 } + } + } + + immediate = { + # Never twice + add_character_flag = ep3_sea_raiders_cooldown + # Save marshal + cp:councillor_marshal = { save_scope_as = marshal } + # Pick a port county + if = { + limit = { + capital_province = { is_coastal = yes } + } + capital_province.county = { save_scope_as = raid_target } + } + else = { + random_held_county = { + limit = { + development_level >= terrible_development_level + title_province = { is_coastal = yes } + } + weight = { + base = 1 + modifier = { add = development_level } + modifier = { + title_province = { has_building_or_higher = common_tradeport_01 } + factor = 2 + } + } + save_scope_as = raid_target + } + } + # Save sea for raider location + scope:raid_target.title_province = { + random_neighboring_province = { + limit = { is_sea_province = yes } + save_scope_as = sea_province + } + } + # Culture + random_culture_global = { + limit = { + has_cultural_pillar = heritage_north_germanic + has_cultural_tradition = tradition_fp1_coastal_warriors + ep3_emperor_yearly_8050_culture_trigger = yes + } + alternative_limit = { + has_cultural_tradition = tradition_fp1_coastal_warriors + ep3_emperor_yearly_8050_culture_trigger = yes + } + alternative_limit = { + has_cultural_pillar = heritage_north_germanic + ep3_emperor_yearly_8050_culture_trigger = yes + } + alternative_limit = { ep3_emperor_yearly_8050_culture_trigger = yes } + weight = { + base = 1 + modifier = { add = culture_number_of_counties } + } + save_scope_as = raider_culture + } + # Faith + religion:germanic_religion = { + random_faith = { + limit = { num_county_followers >= 1 } + weight = { + base = 1 + modifier = { add = num_county_followers } + } + save_scope_as = raider_faith + } + } + # Create raider + create_character = { + template = ep3_sea_raider_template + dynasty = none + location = scope:sea_province + culture = scope:raider_culture + faith = scope:raider_faith + save_scope_as = raider + } + scope:raider = { add_character_flag = wear_armor } + } + + option = { # Recruit + name = { + text = ep3_emperor_yearly.8050.b.byz + trigger = { primary_title = title:e_byzantium } + } + name = { + text = ep3_emperor_yearly.8050.b + trigger = { primary_title != title:e_byzantium } + } + pay_short_term_gold = { + gold = minor_gold_value + target = scope:raider + } + if = { + limit = { has_title = title:e_byzantium } + scope:raider = { add_trait = varangian } + } + add_courtier = scope:raider + reverse_add_opinion = { + target = scope:raider + modifier = loyalty_opinion + opinion = 20 + } + stress_impact = { + paranoid = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = -0.5 + } + } + } + + option = { # Attack + name = ep3_emperor_yearly.8050.c + scope:marshal = { + duel = { + skill = martial + target = scope:raider + 8 = { + desc = ep3_emperor_yearly.8050.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_emperor_yearly.8050.c.success + right_icon = scope:raider + add_prestige = medium_prestige_gain + scope:marshal = { + change_influence = medium_influence_gain + add_short_term_gold = root.tiny_gold_value + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:raider + IMPRISONER = root + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_emperor_yearly.8050.c.failure + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_emperor_yearly.8050.c.failure + right_icon = scope:raider + add_prestige = medium_prestige_loss + scope:raid_target.county = { ep3_emperor_yearly_8050_unchecked_county_effect = yes } + } + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { # Pay-off + name = ep3_emperor_yearly.8050.a + pay_short_term_gold = { + gold = tiny_gold_value + target = scope:raider + } + stress_impact = { + greedy = medium_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = -0.25 + } + } + } + + after = { + scope:raider = { + if = { + limit = { + OR = { + employer ?= root + imprisoner ?= root + } + } + remove_character_flag = wear_armor + } + else = { silent_disappearance_effect = yes } + } + } +} + +# Defecting governor + +scripted_trigger ep3_emperor_yearly_8060_defector_trigger = { + is_ai = yes + is_governor = yes + is_at_war = no + # Something is rotten + OR = { + root.legitimacy_level <= 2 + governor_efficiency <= 0.75 + } + NOR = { + has_character_flag = ep3_defector_cooldown + has_trait = loyal + has_relation_friend = root + has_relation_lover = root + is_close_family_of = root + is_spouse_of = root + house = root.house + } + opinion = { + target = root + value < -25 + } + save_temporary_scope_as = defector_temp + NOT = { + root = { has_hook = scope:defector_temp } + } + root = { + # Valid defection sponsor + any_neighboring_and_across_water_top_liege_realm_owner = { + ep3_emperor_yearly_8060_neighbour_trigger = { DEFECTOR = scope:defector_temp } + } + # Avoid any factions which are ongoing + NOT = { + any_targeting_faction = { + any_faction_member = { this = scope:defector_temp } + OR = { + faction_can_press_demands = yes + faction_is_at_war = yes + } + } + } + } +} + +scripted_trigger ep3_emperor_yearly_8060_neighbour_trigger = { + highest_held_title_tier > $DEFECTOR$.highest_held_title_tier + opinion = { + target = $DEFECTOR$ + value >= 25 + } + reverse_opinion = { + target = $DEFECTOR$ + value >= 25 + } + OR = { + AND = { + culture = $DEFECTOR$.culture + culture != root.culture + } + AND = { + faith = $DEFECTOR$.faith + faith != root.faith + } + AND = { + dynasty = $DEFECTOR$.dynasty + dynasty != root.dynasty + } + is_spouse_of = $DEFECTOR$ + is_close_family_of = $DEFECTOR$ + has_relation_friend = $DEFECTOR$ + has_relation_lover = $DEFECTOR$ + } +} + +scripted_effect ep3_emperor_yearly_8060_defect_effect = { + add_legitimacy = medium_legitimacy_loss + create_title_and_vassal_change = { + type = conquest + save_scope_as = title_change + add_claim_on_loss = no + } + scope:defector = { + change_liege = { + liege = scope:sponsor + change = scope:title_change + } + } + resolve_title_and_vassal_change = scope:title_change + custom_tooltip = { + text = ep3_emperor_yearly.8060.every_title + scope:defector = { + every_held_title = { + title_tier >= county + save_scope_as = title + root = { add_pressed_claim = scope:title } + } + } + } + add_opinion = { + target = scope:defector + modifier = treachery_opinion + } + scope:defector = { + if = { + limit = { + scope:sponsor = { + NOT = { government_allows = administrative } + } + } + if = { + limit = { + faith = { religion_tag = islam_religion } + } + change_government = clan_government + } + else = { change_government = feudal_government } + } + hidden_effect = { + every_vassal = { + limit = { government_allows = administrative } + if = { + limit = { + scope:sponsor = { + NOT = { government_allows = administrative } + } + } + if = { + limit = { + faith = { religion_tag = islam_religion } + } + change_government = clan_government + } + else = { change_government = feudal_government } + } + } + } + } +} + +ep3_emperor_yearly.8060 = { + type = character_event + title = ep3_emperor_yearly.8060.t + desc = { + desc = ep3_emperor_yearly.8060.intro + first_valid = { + triggered_desc = { + trigger = { + scope:defector = { is_spouse_of = scope:sponsor } + NOT = { is_spouse_of = scope:defector } + } + desc = ep3_emperor_yearly.8060.spouse + } + triggered_desc = { + trigger = { + scope:defector = { is_close_family_of = scope:sponsor } + NOT = { is_close_family_of = scope:defector } + } + desc = ep3_emperor_yearly.8060.family + } + triggered_desc = { + trigger = { + scope:defector.house = scope:sponsor.house + house != scope:defector.house + } + desc = ep3_emperor_yearly.8060.house + } + triggered_desc = { + trigger = { + scope:defector.dynasty = scope:sponsor.dynasty + dynasty != scope:defector.dynasty + } + desc = ep3_emperor_yearly.8060.dynasty + } + triggered_desc = { + trigger = { + scope:defector.culture = scope:sponsor.culture + culture != scope:defector.culture + scope:defector.faith = scope:sponsor.faith + faith != scope:defector.faith + } + desc = ep3_emperor_yearly.8060.faith_and_culture + } + triggered_desc = { + trigger = { + scope:defector.culture = scope:sponsor.culture + culture != scope:defector.culture + } + desc = ep3_emperor_yearly.8060.culture + } + triggered_desc = { + trigger = { + scope:defector.faith = scope:sponsor.faith + faith != scope:defector.faith + } + desc = ep3_emperor_yearly.8060.faith + } + desc = ep3_emperor_yearly.8060.fallback + } + } + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = worry + } + lower_center_portrait = scope:defector + lower_right_portrait = scope:sponsor + cooldown = { years = 50 } + + trigger = { + has_ep3_dlc_trigger = yes + # Ensure you are l'empereur + highest_held_title_tier >= tier_empire + is_independent_ruler = yes + government_allows = administrative + # To avoid edge cases + is_at_war = no + # Valid defector exists + any_vassal = { ep3_emperor_yearly_8060_defector_trigger = yes } + } + + immediate = { + ordered_vassal = { + limit = { ep3_emperor_yearly_8060_defector_trigger = yes } + order_by = { + value = 0 + add = { + value = "opinion(root)" + abs = yes + } + } + save_scope_as = defector + add_character_flag = ep3_defector_cooldown + root = { + ordered_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + any_sub_realm_county = { + any_neighboring_county = { + OR = { + holder = scope:defector + holder.liege ?= scope:defector + holder.liege.liege ?= scope:defector + } + } + } + ep3_emperor_yearly_8060_neighbour_trigger = { DEFECTOR = scope:defector } + } + alternative_limit = { + ep3_emperor_yearly_8060_neighbour_trigger = { DEFECTOR = scope:defector } + } + order_by = max_military_strength + save_scope_as = sponsor + } + } + } + } + + option = { # Arrest + name = ep3_emperor_yearly.8060.a + duel = { + skill = intrigue + target = scope:defector + 8 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_emperor_yearly.8060.success + send_interface_toast = { + title = ep3_emperor_yearly.8060.success + left_icon = scope:defector + right_icon = scope:sponsor + change_influence = medium_influence_gain + add_dread = medium_dread_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:defector + IMPRISONER = root + } + reverse_add_opinion = { + target = scope:sponsor + modifier = annoyed_opinion + opinion = -20 + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_emperor_yearly.8060.failure + send_interface_toast = { + title = ep3_emperor_yearly.8060.failure + left_icon = scope:defector + right_icon = scope:sponsor + ep3_emperor_yearly_8060_defect_effect = yes + } + } + } + add_tyranny = medium_tyranny_gain + stress_impact = { + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = -0.5 + ai_energy = 0.5 + } + } + } + + option = { # Pay off + name = ep3_emperor_yearly.8060.b + pay_short_term_gold = { + gold = medium_gold_value + target = scope:defector + } + reverse_add_opinion = { + modifier = grateful_opinion + opinion = 25 + target = scope:defector + } + stress_impact = { + greedy = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_greed = -0.5 + } + } + } + + option = { # May defect + name = ep3_emperor_yearly.8060.c + random = { + chance = 33 + save_scope_as = failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_emperor_yearly.8060.defect + left_icon = scope:defector + right_icon = scope:sponsor + ep3_emperor_yearly_8060_defect_effect = yes + } + } + hidden_effect = { + if = { + limit = { NOT = { exists = scope:failure } } + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_emperor_yearly.8060.no_defect + left_icon = scope:defector + right_icon = scope:sponsor + } + } + } + stress_impact = { + just = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_eparch_events.txt b/N3OW/events/dlc/ep3/ep3_eparch_events.txt new file mode 100644 index 00000000..f764fba3 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_eparch_events.txt @@ -0,0 +1,1879 @@ +######################## +# EP3 Eparch Events +######################## +namespace = ep3_eparch_event + +### Fortify the Capital +ep3_eparch_event.0001 = { + type = character_event + title = ep3_eparch_event.0001.t + desc = { + desc = ep3_eparch_event.0001.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:defensive_war = { defender_war_score > 10 } + } + desc = ep3_eparch_event.0001.desc_winning_war + } + triggered_desc = { + trigger = { + scope:defensive_war = { defender_war_score < -10 } + } + desc = ep3_eparch_event.0001.desc_losing_war + } + desc = ep3_eparch_event.0001.desc_undecided_war + } + desc = ep3_eparch_event.0001.desc_outro + } + theme = administrative + override_background = { reference = ep3_city_gate } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = craven + has_trait = paranoid + } + } + animation = paranoia + } + triggered_animation = { + trigger = { + OR = { + has_trait = brave + has_trait = diligent + has_trait = ambitious + } + } + animation = inspect_weapon + } + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + has_court_position = eparch_court_position + liege = { + any_character_war = { + is_war_leader = prev + is_defender = prev + } + capital_province ?= { + NOT = { has_province_modifier = ep3_eparch_fortified_capital_modifier } + is_occupied = no + any_army_in_location = { + NOR = { + is_army_in_siege = yes + is_army_in_raid = yes + } + } + } + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + random_character_war = { + limit = { + is_war_leader = prev + is_defender = prev + } + primary_attacker = { save_scope_as = attacker } + save_scope_as = defensive_war + } + capital_province = { save_scope_as = capital } + } + } + + option = { # The capital MUST be protected! + name = ep3_eparch_event.0001.a + + remove_treasury_or_gold = major_treasury_or_gold_value + if = { + limit = { has_trait = governor } + increase_governance_effect = { VALUE = 4 } + } + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_fortified_capital_modifier + years = 20 + } + } + + # Follow up event for the liege + scope:emperor = { trigger_event = ep3_eparch_event.0002 } + + stress_impact = { + greedy = medium_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = diligent + } + modifier = { # Wants to protect themself, the enemey MIGHT actually get here + factor = 2 + has_trait = paranoid + } + modifier = { # Wants to make sure the citizens are safe + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < major_treasury_or_gold_value + } + } + } + + option = { # A moderate improvement should suffice. + name = ep3_eparch_event.0001.b + + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_somewhat_fortified_capital_modifier + years = 10 + } + } + + stress_impact = { + # None + } + + ai_chance = { + base = 20 + + modifier = { + factor = 4 + has_trait = temperate + } + modifier = { + factor = 2 + has_trait = content + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < minor_treasury_or_gold_value + } + } + } + + option = { # Surely the capital is not in any danger? + name = ep3_eparch_event.0001.c + + stress_impact = { + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = lazy + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 2 + has_trait = brave + } + modifier = { + factor = 0 + has_trait = craven + } + } + } +} + +# Liege follow up +ep3_eparch_event.0002 = { + type = character_event + title = ep3_eparch_event.0001.t + desc = { + desc = ep3_eparch_event.0002.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:emperor_is_home } + desc = ep3_eparch_event.0002.desc_at_home + } + desc = ep3_eparch_event.0002.desc_away + } + } + theme = emperor + override_background = { + trigger = { exists = scope:emperor_is_home } + reference = ep3_city_gate + } + override_background = { + trigger = { is_commanding_army = yes } + reference = army_camp + } + override_background = { + reference = terrain + } + left_portrait = { + character = root + triggered_animation = { + trigger = { exists = scope:emperor_is_home } + animation = war_defender + } + animation = reading + } + right_portrait = { + character = scope:emperor_is_home + triggered_animation = { + trigger = { + OR = { + has_trait = brave + has_trait = diligent + has_trait = ambitious + } + } + animation = inspect_weapon + } + animation = steward + } + lower_right_portrait = { + character = scope:emperor_is_away + } + + trigger = { + } + + immediate = { + show_as_tooltip = { + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_fortified_capital_modifier + years = 20 + } + } + } + + # Scopes for portraits, descs, etc. + if = { + limit = { + location = scope:capital + } + scope:eparch = { save_scope_as = emperor_is_home } + } + else = { + scope:eparch = { save_scope_as = emperor_is_away } + } + } + + option = { # Such diligence ought to be rewarded! + name = ep3_eparch_event.0002.a + + scope:eparch = { + send_interface_message = { + type = event_generic_good + title = eparch_reward_msg_title + left_icon = root + + root = { + pay_short_term_gold = { + target = scope:eparch + gold = medium_gold_value + } + } + } + } + progress_towards_friend_effect = { + REASON = friend_rewarding_duties + CHARACTER = scope:eparch + OPINION = default_friend_opinion + } + + stress_impact = { + greedy = medium_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = just + } + modifier = { + factor = 3 + has_trait = generous + } + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_gold < medium_gold_value + } + } + } + + option = { # They are only doing their job. + name = ep3_eparch_event.0002.b + + stress_impact = { + # None + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = greedy + } + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 2 + has_trait = content + } + } + } +} + +### Losing Control +ep3_eparch_event.0005 = { + type = character_event + title = ep3_eparch_event.0005.t + desc = ep3_eparch_event.0005.desc + theme = administrative + override_background = { + trigger = { scope:capital = province:496 } + reference = ep3_constantinople + } + override_background = { reference = market } + left_portrait = { + character = root + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + has_court_position = eparch_court_position + liege = { + capital_province.county ?= { + county_control < 90 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + capital_province.county ?= { + county_control < 60 + } + factor = 1.1 + } + modifier = { + capital_province.county ?= { + county_control < 30 + } + factor = 1.2 + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + capital_province = { save_scope_as = capital } + + if = { + limit = { + exists = cp:councillor_marshal + NOT = { cp:councillor_marshal = root } + } + cp:councillor_marshal = { save_scope_as = marshal } + } + } + } + + option = { # Let's pay for some extra hands to patrol the streets + name = ep3_eparch_event.0005.a + + remove_treasury_or_gold = medium_treasury_or_gold_value + if = { + limit = { has_trait = governor } + increase_governance_effect = { VALUE = 4 } + } + scope:emperor = { + send_interface_message = { + type = send_interface_message_good + title = ep3_eparch_event.0005.success_liege + left_icon = scope:capital.county + right_icon = scope:eparch + + scope:capital.county = { + change_county_control = 5 + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = education_martial + } + modifier = { + factor = 2 + has_trait = paranoid + } + modifier = { + factor = 2 + has_trait = compassionate + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + + option = { # Perhaps we can turn the criminals against each other? + name = ep3_eparch_event.0005.b + + duel = { + skill = intrigue + value = decent_skill_rating + 50 = { # Success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + desc = ep3_eparch_event.0005.b_success_tt + send_interface_toast = { + title = ep3_eparch_event.0005.b_success + left_icon = scope:capital.county + + add_intrigue_lifestyle_xp = medium_lifestyle_xp + + scope:emperor = { + send_interface_message = { + type = send_interface_message_good + title = ep3_eparch_event.0005.success_liege + left_icon = scope:capital.county + right_icon = scope:eparch + + scope:capital.county = { + change_county_control = 10 + } + } + } + } + } + 50 = { # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -49 + } + desc = ep3_eparch_event.0005.b_failure_tt + send_interface_toast = { + title = ep3_eparch_event.0005.b_failure + left_icon = scope:capital.county + + scope:emperor = { + send_interface_message = { + type = send_interface_message_bad + title = ep3_eparch_event.0005.failure_liege + left_icon = scope:capital.county + right_icon = scope:eparch + + scope:capital.county = { + change_county_control = -5 + } + } + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = deceitful + } + modifier = { + factor = 2 + has_trait = vengeful + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + option = { # Marshal might be able to help? + name = ep3_eparch_event.0005.c + + trigger = { + exists = scope:marshal + } + + change_influence = medium_influence_loss + scope:marshal = { + random = { + chance = { + value = 10 + add = { + value = scope:marshal.intrigue + multiply = 2 + } + max = 90 + } + + send_interface_toast = { + left_icon = scope:eparch + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:eparch + } + } + add_hook = { + type = favor_hook + target = scope:eparch + } + } + } + } + } + scope:emperor = { + send_interface_message = { + type = send_interface_message_good + title = ep3_eparch_event.0005.success_liege + left_icon = scope:capital.county + right_icon = scope:eparch + + scope:capital.county = { + change_county_control = 5 + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = trusting + } + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 2 + has_trait = humble + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { # No need to overreact. The situation is not THAT desperate. + name = ep3_eparch_event.0005.d + + eparch_neglecting_duty_effect = yes + + stress_impact = { + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = lazy + } + modifier = { + factor = 2 + has_trait = content + } + modifier = { + factor = 0 + has_trait = diligent + } + } + } +} + +### Sickness Strikes +ep3_eparch_event.0010 = { + type = character_event + title = ep3_eparch_event.0010.t + desc = ep3_eparch_event.0010.desc + theme = administrative + override_background = { + trigger = { scope:capital = province:496 } + reference = ep3_constantinople + } + override_background = { reference = market } + left_portrait = { + character = root + animation = disbelief + } + + cooldown = { years = 10 } + + trigger = { + has_court_position = eparch_court_position + liege = { + capital_province ?= { + any_province_epidemic = { count > 0 } + } + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + capital_province = { save_scope_as = capital } + } + if = { + limit = { + employs_court_position = court_physician_court_position + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = physician + } + } + liege = { + capital_province ?= { + random_province_epidemic = { + weight = { + base = 1 + modifier = { + add = 30 + outbreak_intensity >= apocalyptic + } + modifier = { + add = 20 + outbreak_intensity >= major + } + } + + save_scope_as = capital_plague + } + } + } + } + + option = { # Drastic measures are required. Quarantine the city! + name = ep3_eparch_event.0010.a + + trigger = { + scope:capital = { + any_province_epidemic = { + OR = { + outbreak_intensity = major + outbreak_intensity = apocalyptic + } + } + } + } + + remove_treasury_or_gold = major_treasury_or_gold_value + scope:capital = { + every_province_epidemic = { + if = { + limit = { + outbreak_intensity = major + } + set_epidemic_outbreak_intensity = minor + } + else_if = { + limit = { + outbreak_intensity = apocalyptic + } + set_epidemic_outbreak_intensity = major + } + } + } + + stress_impact = { + fickle = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = eccentric + } + modifier = { + factor = 2 + has_trait = wrathful + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < major_treasury_or_gold_value + } + } + } + + option = { # Scour the city for physicians and put them to work. + name = ep3_eparch_event.0010.b + + change_influence = medium_influence_loss + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_plague_protection_modifier + years = 20 + } + } + + stress_impact = { + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = deceitful + } + modifier = { + factor = 2 + has_trait = diligent + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 0.5 + has_trait = greedy + } + } + } + + option = { # My physician can help! + name = ep3_eparch_event.0010.c + + trigger = { + exists = scope:physician + } + + scope:physician = { + duel = { + value = decent_skill_rating + localization = duel_aptitude_challenge + 10 = { # Success + compare_modifier = { + value = scope:physician.aptitude:court_physician_court_position + multiplier = 20 + min = -9 + } + desc = ep3_eparch_event.0010.c_success_tt + send_interface_toast = { + title = ep3_eparch_event.0010.c_success + left_icon = scope:capital.county + + scope:capital = { + add_province_modifier = { + modifier = ep3_eparch_physician_at_work_modifier + years = 25 + } + } + } + } + 90 = { # Failure + compare_modifier = { + value = scope:physician.aptitude:court_physician_court_position + multiplier = -20 + min = -89 + } + desc = ep3_eparch_event.0010.c_failure_tt + send_interface_toast = { + title = ep3_eparch_event.0010.c_failure + left_icon = scope:capital.county + + root = { change_influence = major_influence_loss } + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = generous + } + modifier = { + factor = 1.5 + has_trait = diligent + } + modifier = { + factor = 0.5 + has_trait = greedy + } + } + } + + option = { # A slight cough isn't going to kill anyone... + name = ep3_eparch_event.0010.d + + eparch_neglecting_duty_effect = yes + + stress_impact = { + diligent = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = arbitrary + } + modifier = { + factor = 2 + has_trait = cynical + } + modifier = { + factor = 2 + has_trait = sadistic + } + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = compassionate + } + } + } + } +} + +### University Needs Teachers +ep3_eparch_event.0015 = { + type = character_event + title = ep3_eparch_event.0015.t + desc = ep3_eparch_event.0015.desc + theme = administrative + override_background = { + trigger = { scope:capital = province:496 } + reference = ep3_constantinople + } + override_background = { reference = bp2_university } + left_portrait = { + character = root + animation = reading + } + lower_left_portrait = scope:teacher_my_house + lower_center_portrait = scope:teacher_powerful_family + lower_right_portrait = scope:teacher_local_scholar + + cooldown = { years = 10 } + + trigger = { + has_court_position = eparch_court_position + liege = { + capital_province ?= { + is_higher_studies_location = yes + } + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + capital_province = { + save_scope_as = capital + save_scope_as = location # For the teacher trigger used below + } + } + + # Look for and save suitable candidates + # Find a candidate within root's own house + house = { + random_house_member = { + limit = { + is_courtier = yes + liege = { # It's your direct courtier or the courtier of an AI character + OR = { + this = scope:eparch + is_ai = yes + } + } + any_heir_title = { count < 1 } # Is not an heir to any titles + is_available_adult_education_teacher = yes # Is a suitable teacher + } + save_scope_as = teacher_my_house + } + } + # Find a candidate from a powerful family + liege = { + random_powerful_family = { + limit = { + NOR = { + this = scope:eparch.house + this = scope:emperor.house + } + any_house_member = { + is_courtier = yes + liege = { is_ai = yes } # Is a courtier of an AI character + any_heir_title = { count < 1 } # Is not an heir to any titles + is_available_adult_education_teacher = yes # Is a suitable teacher + } + } + random_house_member = { + limit = { + is_courtier = yes + liege = { is_ai = yes } # Is a courtier of an AI character + any_heir_title = { count < 1 } # Is not an heir to any titles + is_available_adult_education_teacher = yes # Is a suitable teacher + } + save_scope_as = teacher_powerful_family + house.house_head = { save_scope_as = powerful_house_head } + } + } + } + # Find/create a local scholar + if = { + limit = { + any_pool_character = { + province = scope:capital + is_available_adult_education_teacher = yes + NOR = { + has_character_flag = teacher_1 + has_character_flag = teacher_2 + } + } + } + random_pool_character = { + province = scope:capital + limit = { + is_available_adult_education_teacher = yes + NOR = { + has_character_flag = teacher_1 + has_character_flag = teacher_2 + } + } + save_scope_as = teacher_local_scholar + } + } + else = { + create_character = { + # Below is based on the adult_education_teacher template + age = { 35 75 } + random_traits_list = { + count = 1 + education_diplomacy_4 = {} + education_martial_4 = {} + education_stewardship_4 = {} + education_intrigue_4 = {} + education_learning_4 = {} + education_diplomacy_5 = {} + education_martial_5 = {} + education_stewardship_5 = {} + education_intrigue_5 = {} + education_learning_5 = {} + } + diplomacy = { + min_template_average_skill + max_template_decent_skill + } + martial = { + min_template_average_skill + max_template_decent_skill + } + stewardship = { + min_template_average_skill + max_template_decent_skill + } + intrigue = { + min_template_average_skill + max_template_decent_skill + } + learning = { + min_template_average_skill + max_template_decent_skill + } + random_traits = yes + dynasty = none + faith = scope:capital.faith + culture = scope:capital.culture + gender_female_chance = { + if = { + limit = { scope:capital.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:capital.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + location = scope:capital + save_scope_as = teacher_local_scholar + } + } + } + + option = { # As it happens, I know the perfect candidate! + name = ep3_eparch_event.0015.a + + trigger = { + exists = scope:teacher_my_house + } + + remove_treasury_or_gold = major_treasury_or_gold_value + house = { + add_house_modifier = { + modifier = ep3_eparch_university_influence_modifier + years = 25 + } + } + scope:teacher_my_house = { + save_scope_as = teacher_tt + custom_tooltip = { + text = teacher_moves_to_capital_tt + move_to_pool_at = scope:capital + add_character_flag = teacher_1 + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = family_first + } + modifier = { + factor = 3 + has_trait = ambitious + } + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 2 + has_trait = just + scope:teacher_my_house.sum_of_all_skills_value > scope:teacher_powerful_family.sum_of_all_skills_value + scope:teacher_my_house.sum_of_all_skills_value > scope:teacher_local_scholar.sum_of_all_skills_value + } + modifier = { + factor = 0.5 + has_trait = honest + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < major_treasury_or_gold_value + } + } + } + + option = { # The X family has a worthy candidate. + name = ep3_eparch_event.0015.b + + trigger = { + exists = scope:teacher_powerful_family + } + + if = { + limit = { + can_add_hook = { + target = scope:powerful_house_head + type = favor_hook + } + } + add_hook = { + target = scope:powerful_house_head + type = favor_hook + } + } + scope:powerful_house_head = { + add_opinion = { + modifier = respect_opinion + opinion = 20 + target = scope:eparch + } + send_interface_message = { + type = msg_admin_eparch_with_text_good + title = ep3_eparch_event.0015.b.msg.t + desc = ep3_eparch_event.0015.b.msg.desc + left_icon = scope:eparch + right_icon = scope:teacher_powerful_family + + change_influence = medium_influence_gain + house = { + add_house_modifier = { + modifier = ep3_eparch_university_influence_modifier + years = 25 + } + } + } + } + scope:teacher_powerful_family = { + save_scope_as = teacher_tt + custom_tooltip = { + text = teacher_moves_to_capital_tt + move_to_pool_at = scope:capital + add_character_flag = teacher_1 + } + } + + stress_impact = { + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = trusting + } + modifier = { + factor = 2 + has_trait = just + scope:teacher_powerful_family.sum_of_all_skills_value > scope:teacher_my_house.sum_of_all_skills_value + scope:teacher_powerful_family.sum_of_all_skills_value > scope:teacher_local_scholar.sum_of_all_skills_value + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { # There is bound to be a scholar I can hire within the city + name = ep3_eparch_event.0015.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:teacher_local_scholar = { + save_scope_as = teacher_tt + custom_tooltip = { + text = teacher_moves_to_capital_tt + add_character_flag = teacher_1 + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = just + scope:teacher_local_scholar.sum_of_all_skills_value > scope:teacher_my_house.sum_of_all_skills_value + scope:teacher_local_scholar.sum_of_all_skills_value > scope:teacher_powerful_family.sum_of_all_skills_value + } + modifier = { + factor = 2 + has_trait = humble + } + modifier = { # The AI shouldn't spend gold it doesn't have + factor = 0 + short_term_treasury_or_gold < medium_treasury_or_gold_value + } + } + } + + option = { # Actually. How about you come work for me? + name = ep3_eparch_event.0015.d + + trigger = { + NOT = { exists = scope:teacher_my_house } + } + + change_influence = medium_influence_loss + add_courtier = scope:teacher_local_scholar + eparch_neglecting_duty_effect = yes + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = greedy + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 2 + has_trait = deceitful + } + modifier = { + factor = 0 + has_trait = content + } + modifier = { # The AI shouldn't spend influence it doesn't have + factor = 0 + influence < medium_influence_value + } + } + } + + option = { # They will have to make do for now. + name = ep3_eparch_event.0015.e + + eparch_neglecting_duty_effect = yes + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = lazy + } + modifier = { + factor = 0 + has_trait = diligent + } + } + } +} + +### For Services Rendered +ep3_eparch_event.0020 = { + type = character_event + title = ep3_eparch_event.0020.t + desc = { + desc = ep3_eparch_event.0020.desc_intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:reward_gold + } + desc = ep3_eparch_event.0020.desc_gold + } + triggered_desc = { + trigger = { + exists = scope:reward_artifact + } + desc = ep3_eparch_event.0020.desc_artifact + } + triggered_desc = { + trigger = { + exists = scope:reward_hook_removal + } + desc = ep3_eparch_event.0020.desc_hook_removal + } + triggered_desc = { + trigger = { + exists = scope:reward_emperor_hook + } + desc = ep3_eparch_event.0020.desc_emperor_hook + } + } + } + theme = administrative + override_background = { reference = corridor_night } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { + exists = scope:reward_gold + } + animation = betting + } + triggered_animation = { + trigger = { + exists = scope:reward_artifact + } + animation = inspect_weapon + } + triggered_animation = { + trigger = { + exists = scope:reward_hook_removal + } + animation = toast + } + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_right_portrait = scope:peer_with_hook + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + cooldown = { years = 20 } + + trigger = { + has_court_position = eparch_court_position + } + + weight_multiplier = { + base = 1 + + modifier = { # Neglecting your duty reduces the chance to receive rewards + add = { + value = var:eparch_neglecting_duty + multiply = -1 # To make this a negative value + divide = 100 # To make the value fit the scale + min = -0.8 + } + exists = var:eparch_neglecting_duty + } + } + + immediate = { + save_scope_as = eparch + liege = { + save_scope_as = emperor + capital_province = { + save_scope_as = capital + } + } + + # Generate a reward + hidden_effect = { + random_list = { + 10 = { # Gold + save_scope_as = reward_gold + } + 10 = { # Artifact + save_scope_as = reward_artifact + random_list = { # Randomize the artifact type + 10 = { + create_artifact_weapon_effect = { OWNER = root CREATOR = scope:emperor SET_WEAPON_TYPE = flag:artifact_weapon_type_axe } + } + 10 = { + create_artifact_weapon_effect = { OWNER = root CREATOR = scope:emperor SET_WEAPON_TYPE = flag:artifact_weapon_type_mace } + } + 10 = { + create_artifact_weapon_effect = { OWNER = root CREATOR = scope:emperor SET_WEAPON_TYPE = flag:artifact_weapon_type_sword } + } + 10 = { + create_artifact_armor_effect = { OWNER = root CREATOR = scope:emperor SET_ARMOR_TYPE = flag:no } + } + 10 = { + create_artifact_regalia_effect = { OWNER = root SMITH = scope:emperor } + } + 10 = { + create_artifact_crown_effect = { OWNER = root SMITH = scope:emperor } + } + 10 = { + create_artifact_brooch_effect = { OWNER = root SMITH = scope:emperor } + } + } + } + 10 = { # Hook Removal + trigger = { + liege = { + any_vassal = { + has_usable_hook = root + is_ai = yes + } + } + } + save_scope_as = reward_hook_removal + liege = { + random_vassal = { + limit = { + has_usable_hook = root + is_ai = yes + } + save_scope_as = peer_with_hook + } + } + } + 10 = { # Gain hook on emperor + trigger = { + can_add_hook = { + target = scope:emperor + type = favor_hook + } + } + save_scope_as = reward_emperor_hook + } + } + } + } + + option = { + name = ep3_eparch_event.0020.a + + # We apply the actual effects here, instead of in the immediate, because it looks better in-game + if = { # Add the gold + limit = { + exists = scope:reward_gold + } + add_gold = major_gold_value + } + if = { # We create the artifact above, but let's make sure we show it + limit = { + exists = scope:newly_created_artifact + } + scope:newly_created_artifact = { + show_as_tooltip = { + set_owner = root + } + } + } + if = { # Spend the hook on the peer-vassal + limit = { + exists = scope:reward_hook_removal + } + scope:peer_with_hook ?= { + use_hook = root + } + } + if = { # Add hook on emperor + limit = { + exists = scope:reward_emperor_hook + } + add_hook = { + target = scope:emperor + type = favor_hook + } + } + + ai_chance = { + base = 10 + } + } +} + +### Eparch: Neglect of Duty +ep3_eparch_event.9000 = { + type = character_event + title = ep3_eparch_event.9000.t + desc = ep3_eparch_event.9000.desc + theme = emperor + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:eparch + animation = shame + } + + trigger = { + employs_court_position = eparch_court_position + OR = { + NOT = { exists = var:eparch_neglecting_duty } + AND = { + exists = var:eparch_neglecting_duty + var:eparch_neglecting_duty <= 10 + } + } + } + + immediate = { + # Let's make sure we have all of our scopes + if = { + limit = { + NOT = { exists = scope:eparch } + } + random_court_position_holder = { + type = eparch_court_position + save_scope_as = eparch + } + } + if = { + limit = { + NOT = { exists = scope:emperor } + } + save_scope_as = emperor + } + if = { + limit = { + NOT = { exists = scope:capital } + } + capital_province = { save_scope_as = capital } + } + } + + option = { # Unacceptable! Have them fired at once! + name = ep3_eparch_event.9000.a + + show_as_tooltip = { + revoke_court_position = { + recipient = scope:eparch + court_position = eparch_court_position + } + scope:eparch = { + change_influence = massive_influence_loss + } + } + add_dread = 10 + if = { + limit = { + scope:eparch = { has_hook = root } + } + custom_tooltip = eparch_hook_warning + change_influence = major_influence_loss + } + scope:eparch = { + save_scope_as = eparch_is_fired + trigger_event = ep3_eparch_event.9001 + } + + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + + modifier = { + factor = 3 + has_trait = wrathful + } + modifier = { + factor = 3 + has_trait = vengeful + } + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 2 + has_trait = impatient + } + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0 + scope:eparch = { has_hook = root } + } + } + } + + option = { # Consider this a warning. But you will owe me! + name = ep3_eparch_event.9000.b + + change_influence = medium_influence_gain + + show_as_tooltip = { + if = { # If the eparch has a hook on us, spend that hook + limit = { + scope:eparch = { has_hook = root } + } + scope:eparch = { use_hook = root } + } + else_if = { # Otherwise, let's add a hook on the eparch if we can + limit = { + can_add_hook = { + type = favor_hook + target = scope:eparch + } + } + add_hook = { + type = favor_hook + target = scope:eparch + } + } + } + scope:eparch = { + save_scope_as = eparch_is_warned + trigger_event = ep3_eparch_event.9001 + } + + stress_impact = { + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + + modifier = { + factor = 4 + has_trait = deceitful + } + modifier = { + factor = 2 + has_trait = patient + } + modifier = { + factor = 2 + has_trait = arbitrary + } + modifier = { + factor = 0 + has_trait = honest + } + } + } + + option = { # I will turn a blind eye to this. For now. + name = ep3_eparch_event.9000.c + + scope:eparch = { + save_scope_as = eparch_gets_away_with_it + trigger_event = ep3_eparch_event.9001 + } + + stress_impact = { + vengeful = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 20 + + modifier = { + factor = 4 + has_trait = trusting + } + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 2 + has_trait = humble + } + modifier = { + factor = 1.5 + has_trait = craven + } + modifier = { + factor = 1.5 + has_trait = shy + } + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = just + } + } + } + } +} + +# Notify Eparch of liege's action +ep3_eparch_event.9001 = { + type = character_event + title = ep3_eparch_event.9000.t + desc = { + triggered_desc = { + trigger = { + OR = { + exists = scope:eparch_is_fired + exists = scope:eparch_is_warned + } + } + desc = ep3_eparch_event.9001.intro + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:eparch_is_fired + } + desc = ep3_eparch_event.9001.desc_fired + } + triggered_desc = { + trigger = { + exists = scope:eparch_is_warned + } + desc = ep3_eparch_event.9001.desc_warned + } + desc = ep3_eparch_event.9001.desc_nothing + } + } + theme = administrative + override_background = { reference = throne_room_scope } + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:eparch_is_fired + } + animation = stress + } + triggered_animation = { + trigger = { + exists = scope:eparch_is_warned + } + animation = worry + } + animation = shame + } + right_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { + exists = scope:eparch_is_fired + } + animation = dismissal + } + triggered_animation = { + trigger = { + exists = scope:eparch_is_warned + } + animation = scheme + } + animation = disapproval + } + + trigger = { + scope:emperor = { is_alive = yes } + scope:eparch = { is_alive = yes } + } + + immediate = { + scope:emperor = { save_scope_as = background_throne_room_scope } + } + + option = { # What? FIRED!? + name = ep3_eparch_event.9001.a + + trigger = { + exists = scope:eparch_is_fired + } + + change_influence = massive_influence_loss + scope:emperor = { + revoke_court_position = { + recipient = scope:eparch + court_position = eparch_court_position + } + } + } + + option = { # Well, that could have ended much worse I suppose. + name = ep3_eparch_event.9001.b + + trigger = { + exists = scope:eparch_is_warned + } + + if = { # If the eparch has a hook on the emperor, spend that hook + limit = { + has_hook = scope:emperor + } + use_hook = scope:emperor + } + else_if = { # Otherwise, let's add a hook on the eparch if we can + limit = { + scope:emperor = { + can_add_hook = { + type = favor_hook + target = scope:eparch + } + } + } + scope:emperor = { + add_hook = { + type = favor_hook + target = scope:eparch + } + } + } + } + + option = { # I can consider myself lucky. + name = ep3_eparch_event.9001.c + + trigger = { + NOR = { + exists = scope:eparch_is_fired + exists = scope:eparch_is_warned + } + } + + change_influence = minor_influence_gain + } +} diff --git a/N3OW/events/dlc/ep3/ep3_governor_yearly_3.txt b/N3OW/events/dlc/ep3/ep3_governor_yearly_3.txt new file mode 100644 index 00000000..0d2b5207 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_governor_yearly_3.txt @@ -0,0 +1,9178 @@ +namespace = ep3_governor_yearly + +################################################## +# EP3 Governor Events +# by Jason Cantalini + + +##################################### +# Pastures New # +# by Jason Cantalini # +# 3001 # +##################################### + +#Your newly bought lands and the poor local governor inspire you to... avarice +ep3_governor_yearly.3001 = { + type = character_event + title = ep3_governor_yearly.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + NOT = { has_trait = cynical } + } + desc = ep3_governor_yearly.3001.desc_christian + } + desc = ep3_governor_yearly.3001.desc_other + } + desc = ep3_governor_yearly.3001.desc_mid + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_greek } + } + desc = ep3_governor_yearly.3001.desc_greek + } + desc = ep3_governor_yearly.3001.desc_non_greek + } + desc = ep3_governor_yearly.3001.desc + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_garden + } + desc = ep3_governor_yearly.3001.desc_garden + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_garden_leisure + } + desc = ep3_governor_yearly.3001.desc_garden_leisure + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_garden_fruit + } + desc = ep3_governor_yearly.3001.desc_garden_fruit + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_grazing_land + } + desc = ep3_governor_yearly.3001.desc_grazing_land + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_horse_pasture + } + desc = ep3_governor_yearly.3001.desc_horse_pasture + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_camel_pasture + } + desc = ep3_governor_yearly.3001.desc_camel_pasture + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_grain_field + } + desc = ep3_governor_yearly.3001.desc_grain_field + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_vineyard + } + desc = ep3_governor_yearly.3001.desc_vineyard + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_olive + } + desc = ep3_governor_yearly.3001.desc_olive + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_silk + } + desc = ep3_governor_yearly.3001.desc_silk + } + triggered_desc = { + trigger = { + has_character_flag = domicile_new_built_tea + } + desc = ep3_governor_yearly.3001.desc_tea + } + } + } + theme = administrative + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_garden + has_character_flag = domicile_new_built_garden_leisure + has_character_flag = domicile_new_built_garden_fruit + } + } + reference = garden + } + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_garden + has_character_flag = domicile_new_built_garden_leisure + has_character_flag = domicile_new_built_garden_fruit + } + } + reference = garden + } + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + } + scope:root_domicile_province = { + OR = { + terrain = drylands + terrain = desert + terrain = desert_mountains + terrain = oasis + terrain = floodplains + } + } + } + reference = drylands + } + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + } + scope:root_domicile_province = { + OR = { + terrain = plains + terrain = farmlands + terrain = wetlands + terrain = jungle + } + } + } + reference = plains + } + override_background = { + trigger = { + OR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + } + scope:root_domicile_province = { + OR = { + terrain = mountains + terrain = hills + terrain = forest + terrain = taiga + } + } + } + reference = ep2_travel_settlement_hills + } + #Farm/orchard type ones + override_background = { + trigger = { + NOR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + has_character_flag = domicile_new_built_garden + has_character_flag = domicile_new_built_garden_leisure + has_character_flag = domicile_new_built_garden_fruit + } + scope:root_domicile_province = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + terrain = oasis + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_desert + } + override_background = { + trigger = { + NOR = { + has_character_flag = domicile_new_built_grazing_land + has_character_flag = domicile_new_built_horse_pasture + has_character_flag = domicile_new_built_camel_pasture + has_character_flag = domicile_new_built_garden + has_character_flag = domicile_new_built_garden_leisure + has_character_flag = domicile_new_built_garden_fruit + } + scope:root_domicile_province = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + terrain = oasis + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_farm + } + + left_portrait = { + character = root + animation = happy_teacher + } + lower_right_portrait = { + character = scope:governor + } + + cooldown = { + years = 10 + } + + trigger = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_administrative + any_held_title = { + is_noble_family_title = yes + } + domicile.domicile_location.county.holder = { + government_has_flag = government_is_administrative + governor_efficiency <= 0.75 + NOR = { + this = root + liege ?= root + top_liege = root + this = root.top_liege + is_at_war_with = root + root = { + has_dread_level_towards = { + target = prev + level >= 2 + } + } + } + highest_held_title_tier >= root.highest_held_title_tier + highest_held_title_tier >= tier_duchy + } + is_available_allow_travelling = yes + age >= 14 + } + + immediate = { + domicile.domicile_location = { + save_scope_as = root_domicile_province + duchy = { + save_scope_as = target_theme + } + } + domicile.domicile_location.county.holder = { + save_scope_as = governor + } + save_scope_as = landlord + } + + #The governor is useless! Time to snap up lots of land + option = { + name = ep3_governor_yearly.3001.a + flavor = ep3_governor_yearly.3001.a.flavor + + custom_tooltip = ep3_governor_yearly.3001.a_govs_low + change_influence = minor_influence_loss + + remove_short_term_gold = medium_gold_value + + #Gotta be a shark if you want hella real domicile + duel = { + skills = { stewardship intrigue } + target = scope:governor + 60 = { #The governor is useless and you are a great landlord + desc = ep3_governor_yearly.3001.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -59 + } + modifier = { + influence_level >= 3 + add = 20 + } + modifier = { + influence_level >= 4 + add = 40 + } + modifier = { + governor_efficiency >= 1.25 + add = 20 + } + + send_interface_toast = { + title = ep3_governor_yearly.3001.a_success + left_icon = root + right_icon = scope:governor + house = { + add_house_modifier = { + modifier = vast_tracts_of_land_modifier + years = 50 + } + } + if = { + limit = { + has_lifestyle = intrigue_lifestyle + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + else = { + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + } + } + 40 = { #You look like a treasonous fool + desc = ep3_governor_yearly.3001.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + modifier = { + influence_level <= 1 + add = 20 + } + modifier = { + governor_efficiency <= 0.75 + add = 20 + } + send_interface_toast = { + title = ep3_governor_yearly.3001.a_failure + left_icon = root + right_icon = scope:governor + add_prestige = minor_prestige_loss + custom_tooltip = ep3_governor_yearly.3001.b_gov_response + #governor chooses how to react + scope:governor = { + trigger_event = { + id = ep3_governor_yearly.3002 + days = 30 + } + } + } + #keep track of how much land the governor notices missing + add_character_flag = vast_lands_stolen + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + content = major_stress_impact_gain + humble = medium_stress_impact_gain + just = major_stress_impact_gain + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + modifier = { + add = -100 + OR = { + intrigue <= low_skill_rating + stewardship <= low_skill_rating + AND = { + intrigue <= medium_skill_rating + stewardship <= medium_skill_rating + } + } + } + modifier = { + add = 100 + OR = { + intrigue >= very_high_skill_rating + stewardship >= very_high_skill_rating + AND = { + intrigue >= decent_skill_rating + stewardship >= decent_skill_rating + } + } + } + modifier = { + add = -100 + scope:governor = { + OR = { + intrigue >= very_high_skill_rating + stewardship >= very_high_skill_rating + AND = { + intrigue >= medium_skill_rating + stewardship >= medium_skill_rating + } + } + } + } + modifier = { + add = -100 + scope:governor = { + OR = { + intrigue <= low_skill_rating + stewardship <= low_skill_rating + AND = { + intrigue <= medium_skill_rating + stewardship <= medium_skill_rating + } + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + has_trait = just + has_trait = generous + has_trait = patient + short_term_gold <= medium_gold_value + AND = { + intrigue <= low_skill_rating + stewardship <= low_skill_rating + } + } + } + } + } + #Sneak yourself some tenants you maybe shouldn't get + option = { + name = ep3_governor_yearly.3001.b + flavor = ep3_governor_yearly.3001.b.flavor + house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + if = { + limit = { + has_lifestyle = intrigue_lifestyle + } + add_intrigue_lifestyle_xp = minor_lifestyle_xp + } + else = { + add_stewardship_lifestyle_xp = minor_lifestyle_xp + } + remove_short_term_gold = minor_gold_value + change_influence = miniscule_influence_loss + custom_tooltip = ep3_governor_yearly.3001.b_gov_response + #governor chooses how to react + scope:governor = { + trigger_event = { + id = ep3_governor_yearly.3002 + days = 30 + } + } + + stress_impact = { + content = medium_stress_impact_gain + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + patient = miniscule_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + has_trait = just + has_trait = patient + } + } + } + } + #Offer help to the governor to stop other landlords + option = { + name = ep3_governor_yearly.3001.c + flavor = ep3_governor_yearly.3001.c.flavor + + change_influence = minor_influence_gain + increase_governance_effect = { VALUE = 10 } + scope:governor = { + increase_governance_effect = { VALUE = 5 } + } + reverse_add_opinion = { + target = scope:governor + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + greedy = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + arrogant = miniscule_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + ai_honor = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arbitrary + has_trait = ambitious + has_trait = arrogant + } + } + } + } +} + +##################################### +# Taxpayers to Tenants # +# by Jason Cantalini # +# 3002 # +##################################### + +scripted_trigger ep3_governor_yearly_3002_tax_farmer_trigger = { + age >= 18 + is_available = yes + save_temporary_scope_as = tax_farmer + root.faith = { + has_dominant_ruling_gender = scope:tax_farmer + } + NOT = { + this = root.cp:councillor_court_chaplain + } +} + +#A landholder is snapping up your taxpayers' properties! +ep3_governor_yearly.3002 = { + type = character_event + title = ep3_governor_yearly.3002.t + desc = { + desc = ep3_governor_yearly.3002.desc + first_valid = { + triggered_desc = { + trigger = { + scope:tax_farmer.culture = { has_cultural_pillar = language_greek } + } + desc = ep3_governor_yearly.3002_insult_greek + } + triggered_desc = { + trigger = { + scope:tax_farmer.culture = { has_cultural_pillar = language_armenian } + scope:landlord = { + is_female = no + } + } + desc = ep3_governor_yearly.3002_insult_armenian + } + desc = ep3_governor_yearly.3002_insult_generic + } + desc = ep3_governor_yearly.3002.desc_mid + first_valid = { + triggered_desc = { + trigger = { + scope:landlord = { has_character_flag = vast_lands_stolen } + } + desc = ep3_governor_yearly.3002_half_duchy + } + desc = ep3_governor_yearly.3002_some_of_duchy + } + desc = ep3_governor_yearly.3002.desc_outro + } + + theme = administrative + override_background = { + reference = study + } + left_portrait = { + character = root + animation = reading + camera = camera_event_left_forward + } + right_portrait = { + character = scope:tax_farmer + animation = debating + } + lower_right_portrait = { + character = scope:landlord + } + + trigger = { + scope:landlord = { + is_alive = yes + } + } + + immediate = { + #need to grab some mook to be the face of tax collection + if = { + limit = { + any_vassal_or_below = { + OR = { + any_held_title = { + this = scope:root_domicile_province.barony + } + any_vassal = { + any_held_title = { + this = scope:root_domicile_province.barony + } + } + } + age >= 18 + is_available = yes + NOR = { + government_has_flag = government_is_theocracy + this = root.cp:councillor_court_chaplain + this = scope:landlord + } + } + } + random_vassal_or_below = { + limit = { + OR = { + any_held_title = { + this = scope:root_domicile_province.barony + } + any_vassal = { + any_held_title = { + this = scope:root_domicile_province.barony + } + } + } + age >= 18 + is_available = yes + NOR = { + government_has_flag = government_is_theocracy + this = root.cp:councillor_court_chaplain + this = scope:landlord + } + } + save_scope_as = tax_farmer + } + } + if = { + limit = { + NOT = { + exists = scope:tax_farmer + } + } + top_liege = { + random_vassal = { + limit = { + is_landless_administrative = yes + age >= 18 + is_available = yes + this != scope:landlord + domicile.domicile_location.duchy = { + this = scope:target_theme + } + } + save_scope_as = tax_farmer + } + } + } + if = { + limit = { + NOT = { + exists = scope:tax_farmer + } + } + random_courtier_or_guest = { + limit = { ep3_governor_yearly_3002_tax_farmer_trigger = yes } + save_scope_as = tax_farmer + } + } + if = { + limit = { + NOT = { + exists = scope:tax_farmer + } + } + random_pool_character = { + province = root.capital_province + limit = { ep3_governor_yearly_3002_tax_farmer_trigger = yes } + save_scope_as = tax_farmer + } + } + if = { + limit = { + NOT = { + exists = scope:tax_farmer + } + } + create_character = { + template = estate_owner_character + location = root.capital_province + save_scope_as = tax_farmer + } + scope:tax_farmer = { + add_character_flag = temp_character + } + } + } + + #I HAVE THE INFLUENCE TO SEE HIS ASS PUT IN JAIL + option = { + trigger = { + OR = { + influence_level >= 3 + scope:landlord = { + is_landed = no + } + } + } + name = ep3_governor_yearly.3002.a + flavor = ep3_governor_yearly.3002.a.flavor + reason = influence_level + #You have to exert yourself more to frame someone who didn't grab much land + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + change_influence = minor_influence_loss + } + else = { + change_influence = medium_influence_loss + } + + #downgrade the landlord's lands from what they should be - will be actually changed in mirror event + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + } + else = { + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = some_smallholds_modifier + years = 50 + } + } + } + } + #He's a criminal now + add_opinion = { + modifier = stolen_land_opinion + target = scope:landlord + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:landlord } + } + if = { + limit = { has_relation_potential_rival = scope:landlord + } + add_character_flag = governor_becomes_rival + } + else = { + add_character_flag = governor_becomes_potential_rival + show_as_tooltip = { + progress_towards_rival_effect = { + REASON = rival_accused_of_stealing_land + CHARACTER = scope:landlord + OPINION = 0 + } + } + reverse_add_opinion = { + modifier = angry_opinion + target = scope:landlord + opinion = -30 + } + } + } + else = { + reverse_add_opinion = { + target = scope:landlord + modifier = angry_opinion + opinion = -30 + } + } + add_character_flag = governor_accuses_crime + + + stress_impact = { + vengeful = minor_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + humble = miniscule_stress_impact_gain + } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_honor = -1 + ai_vengefulness = 1 + } + modifier = { + factor = 3 + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + has_trait = forgiving + has_trait = compassionate + has_trait = patient + has_trait = humble + influence <= minor_influence_value + } + } + } + } + #You're gonna be mean to the peasants regardless + option = { + trigger = { + OR = { + dread >= 40 + has_trait = sadistic + has_trait = arbitrary + } + } + name = ep3_governor_yearly.3002.b + flavor = ep3_governor_yearly.3002.b.flavor + + scope:root_domicile_province.county = { + add_county_modifier = { + modifier = taxed_and_pressganged_tenants_modifier + years = 10 + } + } + add_dread = minor_dread_gain + add_character_flag = governor_uses_force + #downgrade landlord's new lands again + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + } + else = { + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = some_smallholds_modifier + years = 50 + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + content = minor_stress_impact_gain + generous = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = content + has_trait = generous + has_trait = forgiving + has_trait = just + } + } + } + } + #You can try to make a scandal of this to save some face + option = { + name = ep3_governor_yearly.3002.c + flavor = ep3_governor_yearly.3002.c.flavor + + #governor loses more or less governor efficiency based on scale of lands + #Show correct amount of lands that landlord got + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + add_character_flag = { + flag = ep3_governor_yearly_3002_landlord_wins + years = 10 + } + custom_tooltip = ep3_governor_yearly.3000_governance_loss + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = vast_tracts_of_land_modifier + years = 50 + } + } + } + } + else = { + add_character_flag = { + flag = ep3_governor_yearly_3002_landlord_fight + years = 10 + } + custom_tooltip = ep3_governor_yearly.3000_miniscule_governance_loss + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + } + + #Embarrass the landlord + scope:landlord = { + add_prestige = minor_prestige_loss + } + + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:landlord + opinion = -20 + } + add_character_flag = governor_scandalizes + + stress_impact = { + forgiving = minor_stress_impact_gain + generous = miniscule_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = arbitrary + has_trait = forgiving + } + } + } + } + #Well played, landholder. Well played. + option = { + name = ep3_governor_yearly.3002.d + flavor = ep3_governor_yearly.3002.d.flavor + + #governor loses more or less governor efficiency based on scale of lands + #Show correct amount of lands that landlord got + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + add_character_flag = { + flag = ep3_governor_yearly_3002_landlord_dominates + years = 10 + } + custom_tooltip = ep3_governor_yearly.3000_major_governance_loss + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = vast_tracts_of_land_modifier + years = 50 + } + } + } + } + else = { + add_character_flag = { + flag = ep3_governor_yearly_3002_landlord_wins + years = 10 + } + custom_tooltip = ep3_governor_yearly.3000_governance_loss + show_as_tooltip = { + scope:landlord.house = { + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + } + change_influence = minor_influence_gain + scope:landlord = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + add_character_flag = governor_backs_down + + stress_impact = { + vengeful = medium_stress_impact_gain + diligent = minor_stress_impact_gain + greedy = miniscule_stress_impact_gain + arrogant = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_vengefulness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = vengeful + has_trait = arrogant + has_trait = wrathful + has_trait = diligent + } + } + } + } + after = { + #Get rid of a guy we just created + if = { + limit = { + scope:tax_farmer = { + has_character_flag = temp_character + } + #but only if root isn't a player with watchful eyes of flesh + is_ai = yes + } + scope:tax_farmer = { + silent_disappearance_effect = yes + } + } + #mirror letter event to end chain + scope:landlord = { + trigger_event = { + id = ep3_governor_yearly.3003 + days = 1 + } + } + } +} + +# 3003 +#The governor has a reply for you +ep3_governor_yearly.3003 = { + type = letter_event + opening = ep3_governor_yearly.3003.t + desc = { + first_valid = { + #desc is based on governor's response + triggered_desc = { + trigger = { + scope:governor = { has_character_flag = governor_accuses_crime } + } + desc = ep3_governor_yearly.3003.desc_accused_of_crime + } + triggered_desc = { + trigger = { + scope:governor = { has_character_flag = governor_uses_force } + } + desc = ep3_governor_yearly.3003.desc_force_used + } + triggered_desc = { + trigger = { + scope:governor = { has_character_flag = governor_scandalizes } + } + desc = ep3_governor_yearly.3003.desc_scandal + } + triggered_desc = { + trigger = { + scope:governor = { has_character_flag = governor_backs_down } + } + desc = ep3_governor_yearly.3003.desc_backs_down + } + } + } + sender = scope:governor + + trigger = { + scope:governor = { + OR = { + has_character_flag = governor_accuses_crime + has_character_flag = governor_uses_force + has_character_flag = governor_scandalizes + has_character_flag = governor_backs_down + } + is_alive = yes + } + } + + immediate = { + #Need to show effects from mirror event and potentially downgrade the landlord's new lands modifier + if = { + limit = { + scope:governor = { has_character_flag = governor_accuses_crime } + } + #Need to actually do the modifier switch, since the last event doesn't + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + scope:landlord.house = { + remove_house_modifier = vast_tracts_of_land_modifier + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + else = { + scope:landlord.house = { + remove_house_modifier = productive_lands_modifier + add_house_modifier = { + modifier = some_smallholds_modifier + years = 50 + } + } + } + show_as_tooltip = { + scope:governor = { + add_opinion = { + modifier = stolen_land_opinion + target = scope:landlord + } + } + if = { + limit = { + scope:governor = { has_character_flag = governor_becomes_rival } + } + scope:governor = { + set_relation_rival = { + target = root + reason = rival_accused_of_stealing_land + } + } + } + else_if = { + limit = { + scope:governor = { has_character_flag = governor_becomes_potential_rival } + } + scope:governor = { + progress_towards_rival_effect = { + REASON = rival_accused_of_stealing_land + CHARACTER = scope:landlord + OPINION = 0 + } + } + } + } + } + else_if = { + limit = { + scope:governor = { has_character_flag = governor_uses_force } + } + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + scope:landlord.house = { + remove_house_modifier = vast_tracts_of_land_modifier + add_house_modifier = { + modifier = productive_lands_modifier + years = 50 + } + } + } + else = { + scope:landlord.house = { + remove_house_modifier = productive_lands_modifier + add_house_modifier = { + modifier = some_smallholds_modifier + years = 50 + } + } + } + reverse_add_opinion = { + modifier = angry_opinion + target = scope:governor + opinion = -20 + } + show_as_tooltip = { + scope:root_domicile_province.county = { + add_county_modifier = { + modifier = taxed_and_pressganged_tenants_modifier + years = 10 + } + } + } + } + else_if = { + limit = { + scope:governor = { has_character_flag = governor_scandalizes } + } + add_prestige = minor_prestige_loss + reverse_add_opinion = { + modifier = angry_opinion + target = scope:governor + opinion = -20 + } + } + } + + option = { + name = { + trigger = { + scope:governor = { has_character_flag = governor_accuses_crime } + } + text = ep3_governor_yearly.3003.a_accused_of_crime + } + name = { + trigger = { + scope:governor = { has_character_flag = governor_uses_force } + } + text = ep3_governor_yearly.3003.a_force_used + } + name = { + trigger = { + scope:governor = { has_character_flag = governor_accuses_crime } + } + text = ep3_governor_yearly.3003.a_accused_of_crime + } + name = { + trigger = { + scope:governor = { has_character_flag = governor_backs_down } + } + text = ep3_governor_yearly.3003.a_backs_down + } + if = { + limit = { + scope:governor = { has_character_flag = governor_backs_down } + } + #give landlord some prestige because he got away with his shenanigans + add_prestige = miniscule_prestige_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_sociability = 0.25 + } + } + } + after = { + #clean up flags from the event chain + if = { + limit = { + scope:landlord = { + has_character_flag = vast_lands_stolen + } + } + scope:landlord = { + remove_character_flag = vast_lands_stolen + } + } + if = { + limit = { + scope:governor = { + has_character_flag = governor_accuses_crime + } + } + scope:governor = { + remove_character_flag = governor_accuses_crime + } + } + if = { + limit = { + scope:governor = { + has_character_flag = governor_uses_force + } + } + scope:governor = { + remove_character_flag = governor_uses_force + } + } + if = { + limit = { + scope:governor = { + has_character_flag = governor_scandalizes + } + } + scope:governor = { + remove_character_flag = governor_scandalizes + } + } + if = { + limit = { + scope:governor = { + has_character_flag = governor_backs_down + } + } + scope:governor = { + remove_character_flag = governor_backs_down + } + } + } +} + +##################################### +# Still, the Basileus Fights # +# by Jason Cantalini # +# 3010 # +##################################### + +#A governor considers how to react to the emperor's longstanding, dragged-out war +ep3_governor_yearly.3010 = { + type = character_event + title = ep3_governor_yearly.3010.t + desc = { + desc = ep3_governor_yearly.3010.desc + first_valid = { + triggered_desc = { + trigger = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + desc = ep3_governor_yearly.3010.desc_defender + } + desc = ep3_governor_yearly.3010.desc_attacker + } + desc = ep3_governor_yearly.3010.desc_mid + first_valid = { + triggered_desc = { + trigger = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score > 20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score > 20 + } + } + } + } + desc = ep3_governor_yearly.3010.desc_winning + } + triggered_desc = { + trigger = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score < -20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score < -20 + } + } + } + } + desc = ep3_governor_yearly.3010.desc_losing + } + desc = ep3_governor_yearly.3010.desc_middling + } + } + + theme = emperor + override_background = { + reference = battlefield + } + override_effect_2d = { + reference = flies + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + animation = stayback + } + triggered_animation = { + trigger = { + scope:emperor = { + is_attacker_in_war = scope:war + } + } + animation = inspect_weapon + } + camera = camera_event_very_left + } + right_portrait = { + character = scope:foe + triggered_animation = { + trigger = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + animation = aggressive_mace + } + triggered_animation = { + trigger = { + scope:emperor = { + is_attacker_in_war = scope:war + } + } + animation = stayback + } + camera = camera_event_very_right + } + + trigger = { + is_governor = yes + is_imprisoned = no + exists = scope:war + liege ?= { + any_character_war = { + this = scope:war + attacker_war_score < 80 + defender_war_score < 80 + } + } + is_at_war = no + NOT = { + any_ally = { + is_at_war_with = liege + any_character_war = { + this = scope:war + } + } + } + age >= 12 + } + + immediate = { + save_scope_as = governor + liege = { + save_scope_as = emperor + } + scope:emperor = { + add_character_flag = need_military_outfit + } + if = { + limit = { + scope:emperor = { + is_defender_in_war = scope:war + } + } + scope:war = { + primary_attacker = { + save_scope_as = foe + } + } + } + else = { + scope:war = { + primary_defender = { + save_scope_as = foe + } + } + } + scope:foe = { + add_character_flag = need_military_outfit + } + } + + #Join the emperor in this war + option = { + name = ep3_governor_yearly.3010.a + flavor = ep3_governor_yearly.3010.a.flavor + if = { + limit = { + scope:emperor = { + is_ai = yes + } + } + random_list = { + 50 = { #Emperor accepts your help + desc = ep3_governor_yearly.3010.a.success + + modifier = { + ep3_emperors_war_strength_value < ep3_emperors_foe_war_strength_value + add = 25 + } + modifier = { + ep3_emperors_war_strength_double_value < ep3_emperors_foe_war_strength_value + add = 100 + } + modifier = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score < -20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score < -20 + } + } + } + add = 50 + } + modifier = { + reverse_opinion = { + target = scope:emperor + value >= 50 + } + add = 25 + } + modifier = { + reverse_opinion = { + target = scope:emperor + value >= 80 + } + add = 25 + } + modifier = { + scope:emperor = { + gold <= 0 + } + add = 50 + } + modifier = { + scope:emperor = { + monthly_character_income < 0 + } + add = 75 + } + modifier = { + scope:emperor = { + ai_boldness < low_negative_ai_value + } + add = 50 + } + show_as_tooltip = { + ep3_governor_yearly_3010_war_aid_effect = yes + } + trigger_event = { + id = ep3_governor_yearly.3012 + days = 1 + } + } + 50 = { #Emperor turns down your help + desc = ep3_governor_yearly.3010.a.fail + modifier = { + current_military_strength < strong_governor_military_value + add = 25 + } + modifier = { + ep3_emperors_war_strength_value > ep3_emperors_foe_war_strength_value + add = 25 + } + modifier = { + ep3_emperors_war_strength_value > ep3_emperors_foe_war_strength_double_value + add = 100 + } + modifier = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score > 20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score > 20 + } + } + } + add = 50 + } + modifier = { + reverse_opinion = { + target = scope:emperor + value <= -30 + } + add = 25 + } + modifier = { + reverse_opinion = { + target = scope:emperor + value <= -60 + } + add = 25 + } + modifier = { + is_powerful_vassal = no + add = 25 + } + modifier = { + NOT = { + house = { + is_powerful_family = yes + } + } + add = 25 + } + modifier = { + scope:emperor = { + gold >= massive_gold_value + } + add = 25 + } + modifier = { + scope:emperor = { + ai_boldness > low_negative_ai_value + } + add = 50 + } + add_character_flag = governor_war_aid_deal_failed + trigger_event = { + id = ep3_governor_yearly.3012 + days = 1 + } + } + } + } + else = { + #Trigger letter event for player emperor + scope:emperor = { + trigger_event = { + id = ep3_governor_yearly.3011 + days = 1 + } + } + } + stress_impact = { + brave = miniscule_stress_impact_loss + diligent = minor_stress_impact_loss + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + ai_honor = 1 + } + modifier = { + add = -50 + OR = { + diplomacy <= low_skill_rating + intrigue <= low_skill_rating + } + } + #The war has been dragging on for more than 3 years + modifier = { + add = 50 + OR = { + scope:att_governor_5 ?= this + scope:att_governor_6 ?= this + scope:def_governor_5 ?= this + scope:def_governor_6 ?= this + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = content + has_trait = paranoid + has_trait = lazy + has_trait = disloyal + is_powerful_vassal = no + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score > 20 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score > 20 + } + } + } + } + } + } + #Foment unrest against the weak emperor + option = { + name = ep3_governor_yearly.3010.b + flavor = ep3_governor_yearly.3010.b.flavor + if = { + limit = { + is_powerful_vassal = yes + + scope:emperor = { + has_realm_law = acclamation_succession_law + } + NOR = { + has_claim_on = scope:emperor.primary_title + AND = { + culture = { + has_cultural_parameter = physical_disfigurement_blocks_inheritance + } + OR = { + has_trait = eunuch + has_trait = disfigured + has_trait = blind + } + } + AND = { + scope:emperor.culture = { + has_cultural_parameter = physical_disfigurement_blocks_inheritance + } + OR = { + has_trait = eunuch + has_trait = disfigured + has_trait = blind + } + } + } + } + if = { + limit = { + OR = { + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score > 50 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score > 50 + } + } + } + } + change_influence = massive_influence_loss + } + else = { + change_influence = major_influence_loss + } + + scope:emperor = { + send_interface_message = { + type = msg_governor_challenges_weakness + title = msg_claimed_weak_emperors_title.t + desc = msg_claimed_weak_emperors_title.flavor + right_icon = root + + root = { + add_unpressed_claim = scope:emperor.primary_title + progress_towards_rival_effect = { + REASON = rival_challenged_weak_emperor + CHARACTER = scope:emperor + OPINION = -50 + } + } + } + } + } + else = { + if = { + limit = { + is_a_faction_member = yes + } + scope:emperor = { + send_interface_message = { + type = msg_governor_challenges_weakness + title = msg_claimed_weak_emperors_title.t.2 + desc = msg_claimed_weak_emperors_title.flavor.2 + right_icon = root + root = { add_joined_faction_discontent = 30 } + } + } + } + else_if = { + limit = { + scope:emperor = { + has_realm_law = acclamation_succession_law + } + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = root + } + NOT = { + has_character_flag = decried_weakness_score + + } + } + custom_tooltip = governor_challenges_weakness_candidate_score + add_character_flag = { + flag = decried_weakness_score + years = 5 + } + } + change_influence = medium_influence_gain + reverse_add_opinion = { + target = scope:emperor + modifier = angry_opinion + opinion = -25 + } + } + stress_impact = { + ambitious = miniscule_stress_impact_loss + forgiving = medium_stress_impact_gain + content = major_stress_impact_gain + humble = major_stress_impact_gain + trusting = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = 0.5 + } + #The war has been dragging on for more than 3 years + modifier = { + add = 100 + OR = { + scope:att_governor_5 ?= this + scope:att_governor_6 ?= this + scope:def_governor_5 ?= this + scope:def_governor_6 ?= this + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 2 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 1 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 5 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 4 + } + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = content + has_trait = humble + has_trait = trusting + has_trait = just + scope:att_governor_1 ?= this + scope:att_governor_2 ?= this + scope:def_governor_1 ?= this + scope:def_governor_2 ?= this + is_powerful_vassal = no + AND = { + scope:emperor = { + is_defender_in_war = scope:war + } + scope:war = { + defender_war_score >= 0 + } + } + AND = { + scope:emperor = { + is_attacker_in_war = scope:war + } + scope:war = { + attacker_war_score >= 0 + } + } + } + } + } + } + #The emperor is distracted... time to extend my grasp here + option = { + name = ep3_governor_yearly.3010.c + flavor = ep3_governor_yearly.3010.c.flavor + increase_governance_effect = { VALUE = 10 } + add_character_modifier = { + modifier = ep3_exploited_weak_master_modifier + years = 10 + } + stress_impact = { + greedy = minor_stress_impact_loss + just = major_stress_impact_gain + diligent = major_stress_impact_gain + generous = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = diligent + has_trait = generous + has_trait = honest + } + } + } + } + #I will make pious donations and pray for victory + option = { + name = ep3_governor_yearly.3010.d + add_piety = medium_piety_gain + remove_short_term_gold = minor_gold_value + stress_impact = { + zealous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = ambitious + } + } + } + } + after = { + scope:emperor = { + remove_character_flag = need_military_outfit + } + scope:foe = { + remove_character_flag = need_military_outfit + } + } +} + +#Player emperor chooses whether to accept governor's aid deal +ep3_governor_yearly.3011 = { + type = letter_event + opening = { + desc = ep3_governor_yearly.3011.opening + } + desc = ep3_governor_yearly.3011.desc + sender = scope:governor + + immediate = { + } + #Accept the exchange + option = { + name = ep3_governor_yearly.3011.a + show_as_tooltip = { + scope:governor = { + ep3_governor_yearly_3010_war_aid_effect = yes + } + } + stress_impact = { + craven = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + stubborn = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + brave = miniscule_stress_impact_gain + } + } + #Refuse the exchange + option = { + name = ep3_governor_yearly.3011.b + scope:governor = { add_character_flag = governor_war_aid_deal_failed } + stress_impact = { + craven = medium_stress_impact_gain + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + } + after = { + scope:governor = { + trigger_event = { + id = ep3_governor_yearly.3012 + days = 1 + } + } + } +} + +#Governor gets emperor's response +ep3_governor_yearly.3012 = { + type = letter_event + opening = { + desc = ep3_governor_yearly.3012.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = governor_war_aid_deal_failed + } + desc = ep3_governor_yearly.3012.desc_fail + } + desc = ep3_governor_yearly.3012.desc_success + } + } + sender = scope:emperor + + + #Alright then + option = { + + name = { + trigger = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + text = ep3_governor_yearly.3012.kyrie_eleison + } + name = { + trigger = { + NAND = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + NOT = { + has_character_flag = governor_war_aid_deal_failed + } + } + text = ep3_emperor_yearly.3011.a_to_war + } + name = { + trigger = { + NAND = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + has_character_flag = governor_war_aid_deal_failed + } + text = ep3_emperor_yearly.3011.a_no_war + } + if = { + limit = { + NOT = { + has_character_flag = governor_war_aid_deal_failed + } + } + ep3_governor_yearly_3010_war_aid_effect = yes + } + } + after = { + if = { + limit = { + has_character_flag = governor_war_aid_deal_failed + } + remove_character_flag = governor_war_aid_deal_failed + } + } +} + +##################################### +# God Appointed... Him? # +# by Jason Cantalini # +# 3020 # +##################################### + +#The emperor has an unacceptable trait and a governor wants to make a stink about it +ep3_governor_yearly.3020 = { + type = character_event + title = ep3_governor_yearly.3020.t + desc = { + desc = ep3_governor_yearly.3020.desc + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = condemning_physical_trait + } + desc = ep3_governor_yearly.3020.desc_physical + } + desc = ep3_governor_yearly.3020.desc_crime + } + } + + theme = emperor + override_background = { + reference = throne_room + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + trigger = { + age >= 12 + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + OR = { + is_governor = yes + is_landless_administrative = yes + } + liege = { + NOR = { + has_character_flag = had_ep3_governor_yearly_3020 + has_character_modifier = emperor_repented_for_flaws_modifier + } + valid_for_byz_emperor_content_trigger = yes + save_temporary_scope_as = emperor_temp + legitimacy_level < 5 + government_has_flag = government_is_administrative + top_liege = this + OR = { + #Emperor has criminal trait + AND = { + has_trait = incestuous + 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 } + } + AND = { + has_trait = kinslayer + NOT = { + root = { has_trait = kinslayer } + } + } + AND = { + has_trait = adulterer + 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 } + } + AND = { + has_trait = fornicator + NOT = { + root = { + OR = { + has_trait = fornicator + has_trait = adulterer + } + } + } + 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 } + } + 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 } + } + 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 } + } + AND = { + has_trait = sodomite + root = { + NOR = { + has_trait = sodomite + any_secret = { + type = secret_homosexual + } + } + } + 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 } + } + 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 } + } + AND = { + root.culture = { + has_cultural_parameter = physical_disfigurement_blocks_inheritance + } + OR = { + has_trait = eunuch_1 + has_trait = beardless_eunuch + has_trait = blind + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = clubfooted + has_trait = disfigured + } + } + } + } + OR = { + is_ai = no + opinion = { + target = liege + value <= 40 + } + } + } + immediate = { + save_scope_as = minister + liege = { + save_scope_as = emperor + add_character_flag = { + flag = had_ep3_governor_yearly_3020 + years = 1 + } + random_list = { + 1 = { + trigger = { + has_trait = incestuous + 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 } + } + random_character_trait = { + limit = { + this = trait:incestuous + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = kinslayer + NOT = { + root = { has_trait = kinslayer } + } + } + random_character_trait = { + limit = { + OR = { + this = trait:kinslayer_1 + this = trait:kinslayer_2 + this = trait:kinslayer_3 + } + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = adulterer + 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 } + } + random_character_trait = { + limit = { + this = trait:adulterer + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = fornicator + NOT = { + root = { + OR = { + has_trait = fornicator + has_trait = adulterer + } + } + } + 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 } + } + random_character_trait = { + limit = { + this = trait:fornicator + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = deviant + 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 } + } + random_character_trait = { + limit = { + this = trait:deviant + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = witch + 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 } + } + random_character_trait = { + limit = { + this = trait:witch + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = sodomite + root = { + NOR = { + has_trait = sodomite + any_secret = { + type = secret_homosexual + } + } + } + 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 } + } + random_character_trait = { + limit = { + this = trait:sodomite + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + has_trait = cannibal + 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 } + } + random_character_trait = { + limit = { + this = trait:cannibal + } + save_scope_as = target_trait + } + } + 1 = { + trigger = { + root.culture = { + has_cultural_parameter = physical_disfigurement_blocks_inheritance + } + OR = { + has_trait = eunuch + has_trait = blind + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = clubfooted + has_trait = disfigured + } + } + random_character_trait = { + limit = { + OR = { + this = trait:eunuch_1 + this = trait:beardless_eunuch + this = trait:blind + this = trait:maimed + this = trait:one_eyed + this = trait:one_legged + this = trait:hunchbacked + this = trait:dwarf + this = trait:incapable + this = trait:clubfooted + this = trait:disfigured + } + } + save_scope_as = target_trait + root ={ add_character_flag = condemning_physical_trait } + } + } + } + } + } + #Secretly spread dissent and make the emperor a laughingstock + option = { + name = ep3_governor_yearly.3020.a + flavor = ep3_governor_yearly.3020.a.flavor + duel = { + skill = intrigue + target = scope:emperor + 55 = { #The gossips go wild heeding your words + desc = ep3_governor_yearly.3020.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + modifier = { + add = 30 + influence_level >= 2 + } + modifier = { + add = 30 + influence_level >= 4 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3020.a.success + left_icon = scope:emperor + add_intrigue_lifestyle_xp = medium_lifestyle_xp + change_influence = medium_influence_gain + #Emperor gets toast that they're losing influence + scope:emperor = { + send_interface_message = { + type = msg_unflattering_imperial_trait_gossip + title = msg_unflattering_imperial_trait_gossip.t + desc = msg_unflattering_imperial_trait_gossip.flavor + change_influence = minor_influence_loss + add_stress = miniscule_stress_gain + } + } + } + + } + 45 = { #No one pays you any heed + desc = ep3_governor_yearly.3020.a.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -44 + } + modifier = { + add = 30 + scope:emperor = { influence_level >= 2 } + } + modifier = { + add = 30 + scope:emperor = { influence_level >= 4 } + } + modifier = { + add = 30 + scope:emperor = { legitimacy_level >= 3 } + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3020.a.fail + left_icon = scope:emperor + add_stress = minor_stress_gain + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + trusting = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = -1 + } + modifier = { + add = 25 + intrigue >= high_skill_rating + scope:emperor = { + intrigue <= mediocre_skill_rating + } + } + modifier = { + add = -50 + intrigue <= mediocre_skill_rating + scope:emperor = { + intrigue >= high_skill_rating + } + } + modifier = { + factor = 0 + OR = { + intrigue <= low_skill_rating + scope:emperor = { + intrigue >= very_high_skill_rating + } + scope:emperor = { + dread >= 90 + } + scope:emperor = { + legitimacy_level >= 5 + } + has_trait = honest + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + } + } + } + } + #I should write a letter of warning and urge the emperor to seek god's forgiveness + option = { + name = ep3_governor_yearly.3020.b + flavor = ep3_governor_yearly.3020.flavor + #Faction gains discontent + if = { + limit = { + is_a_faction_member = yes + } + add_joined_faction_discontent = 20 + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + NOR = { + has_trait = eunuch + has_trait = blind + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = clubfooted + has_trait = disfigured + has_character_flag = insulted_trait_candidate_score + + } + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = root + } + } + custom_tooltip = governor_insulted_imperial_trait_candidate_score + add_character_flag = { + flag = insulted_trait_candidate_score + years = 5 + } + } + else = { + add_prestige = medium_prestige_gain + add_piety = minor_piety_gain + } + #Increases powerful family rating + #Emperor loses prestige and legitimacy + show_as_tooltip = { + scope:emperor = { + add_prestige = minor_prestige_loss + add_legitimacy = minor_legitimacy_loss + } + } + reverse_add_opinion = { + modifier = insulted_opinion + target = scope:emperor + opinion = -30 + } + scope:emperor = { + trigger_event = { + id = ep3_governor_yearly.3021 + days = 1 + } + } + stress_impact = { + zealous = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + modifier = { + add = -50 + OR = { + scope:emperor = { + dread >= 25 + } + opinion = { + target = scope:emperor + value >= 20 + } + } + } + modifier = { + add = 50 + OR = { + scope:emperor = { + legitimacy_level <= 1 + } + opinion = { + target = scope:emperor + value < -50 + } + } + } + modifier = { + factor = 0 + OR = { + scope:emperor = { + dread > 50 + } + opinion = { + target = scope:emperor + value > 0 + } + has_trait = content + has_trait = forgiving + has_trait = compassionate + has_trait = content + } + } + } + } + #I'm just going to do my job and keep my nose clean + option = { + name = ep3_governor_yearly.3020.c + if = { + limit = { + is_governor = yes + } + increase_governance_effect = { VALUE = 5 } + } + else = { + add_gold = tiny_gold_value + } + stress_impact = { + vengeful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_boldness = -0.5 + ai_zeal = -0.5 + ai_sociability = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = paranoid + has_trait = sadistic + has_trait = wrathful + has_trait = zealous + } + } + } + } +} + +#Emperor receives rude message from governor +ep3_governor_yearly.3021 = { + type = letter_event + opening = { + desc = ep3_governor_yearly.3021.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:minister = { has_character_flag = condemning_physical_trait } + } + desc = ep3_governor_yearly.3021.desc_physical + } + desc = ep3_governor_yearly.3021.desc_crime + } + } + sender = scope:minister + + immediate = { + show_as_tooltip = { + scope:minister = { + if = { + limit = { + is_a_faction_member = yes + } + add_joined_faction_discontent = 20 + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + NOR = { + has_trait = eunuch + has_trait = blind + has_trait = maimed + has_trait = one_eyed + has_trait = one_legged + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = clubfooted + has_trait = disfigured + } + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = root + } + } + custom_tooltip = governor_insulted_imperial_trait_candidate_score + add_character_flag = insulted_trait_candidate_score + } + else = { + add_prestige = medium_prestige_gain + add_piety = minor_piety_gain + } + } + } + add_prestige = minor_prestige_loss + add_legitimacy = minor_legitimacy_loss + custom_tooltip = ep3_governor_yearly.3021.bad_trait + } + + #I suppose I should seek God's favor + option = { + name = ep3_governor_yearly.3021.a + flavor = ep3_governor_yearly.3021.a.flavor + add_character_modifier = { + modifier = emperor_repented_for_flaws_modifier + years = 10 + } + custom_tooltip = ep3_governor_yearly.3021.blocker + add_prestige = medium_prestige_loss + stress_impact = { + zealous = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = major_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -1 + ai_honor = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = wrathful + has_trait = arrogant + has_trait = vengeful + prestige < major_prestige_value + } + } + } + } + #Impertinence! + option = { + name = ep3_governor_yearly.3021.b + stress_impact = { + humble = miniscule_stress_impact_gain + zealous = miniscule_stress_impact_gain + trusting = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_boldness = 1 + ai_rationality = -1 + } + modifier = { + factor = 0.5 + OR = { + has_trait = humble + has_trait = zealous + has_trait = trusting + } + } + } + } + after = { + if = { + limit = { + scope:minister = { + has_character_flag = condemning_physical_trait + } + } + scope:minister = { + remove_character_flag = condemning_physical_trait + } + } + } +} + +##################################### +# Quiet Times # +# by Jason Cantalini # +# 3030 # +##################################### + +#The empire has been at peace for years and prosperity is growing +ep3_governor_yearly.3030 = { + type = character_event + title = ep3_governor_yearly.3030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = ep3_governor_yearly.3030.desc_christian + } + desc = ep3_governor_yearly.3030.desc_generic + } + desc = ep3_governor_yearly.3030.desc + } + theme = administrative + override_background = { + trigger = { + location.culture ?= { has_graphical_mediterranean_culture_group_trigger = yes } + } + reference = estate + } + override_background = { + trigger = { + NOT = { + location.culture ?= { has_graphical_mediterranean_culture_group_trigger = yes } + } + } + reference = courtyard + } + left_portrait = { + character = root + animation = writing + } + lower_right_portrait = scope:emperor + + trigger = { + basic_is_valid_for_yearly_events_trigger = yes + is_landed = yes + government_allows = administrative + top_liege != this + years_from_game_start >= 4 + is_at_war = no + age >= 12 + capital_county = { + county_control >= 100 + } + primary_title = { + NOT = { + has_variable = admin_war_aftermath_var + } + } + top_liege = { + is_at_war = no + primary_title = { + NOT = { + has_variable = admin_war_aftermath_var + } + } + capital_county = { + county_control >= 100 + } + } + OR = { + liege = root.top_liege + liege = { + is_at_war = no + primary_title = { + NOT = { + has_variable = admin_war_aftermath_var + } + } + } + } + NOT = { + any_sub_realm_county = { + any_province = { + any_province_epidemic = { } + } + } + } + } + immediate = { + top_liege = { + save_scope_as = emperor + } + } + #We will become soft if we do not fight + option = { + name = ep3_governor_yearly.3030.a + flavor = ep3_governor_yearly.3030.a.flavor + trigger = { + OR = { + any_neighboring_top_liege_realm_owner = { + any_realm_county = { + any_neighboring_county = { + OR = { + holder = root + holder.liege = root + } + } + } + } + NOT = { + has_character_flag = warmongering_admin + } + } + } + if = { + limit = { + NOT = { + has_character_flag = warmongering_admin + } + } + #You get access to a CB...? + add_character_flag = warmongering_admin + custom_tooltip = access_to_admin_raid_tooltip + custom_tooltip = admin_raid_gives_modifier_tooltip + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_raid_modifier + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_2_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_2_raid_modifier + remove_character_modifier = ep3_loyal_troops_raid_modifier + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_3_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_3_raid_modifier + remove_character_modifier = ep3_loyal_troops_2_raid_modifier + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_4_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_4_raid_modifier + remove_character_modifier = ep3_loyal_troops_3_raid_modifier + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_loyal_troops_5_raid_modifier + } + } + add_character_modifier = ep3_loyal_troops_5_raid_modifier + remove_character_modifier = ep3_loyal_troops_4_raid_modifier + } + else = { + add_martial_lifestyle_xp = medium_lifestyle_xp + } + stress_impact = { + lazy = major_stress_impact_gain + compassionate = medium_stress_impact_gain + content = major_stress_impact_gain + calm = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_compassion = -1 + ai_boldness = 1 + } + modifier = { + factor = 0 + OR = { + NOT = { + any_neighboring_top_liege_realm_owner = { + any_realm_county = { + any_neighboring_county = { + OR = { + holder = root + holder.liege = root + } + } + } + } + } + has_trait = lazy + has_trait = compassionate + has_trait = content + has_trait = calm + has_trait = humble + } + } + } + } + #I should further the cause of peace and harmony in my governorship + option = { + name = ep3_governor_yearly.3030.b + increase_governance_effect = { VALUE = 15 } + add_character_modifier = { + modifier = ep3_peaceful_administrator_modifier + years = 10 + } + stress_impact = { + lazy = minor_stress_impact_gain + paranoid = major_stress_impact_gain + wrathful = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_vengefulness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = paranoid + has_trait = wrathful + has_trait = sadistic + } + } + } + } + #We are free to relish a cozy life with our families! + option = { + name = ep3_governor_yearly.3030.c + + #Some kind of estate bonus + #New estate sub-building type? + if = { + limit = { + house = { + house_head = root + } + NOT = { + has_character_flag = ep3_construct_grand_solar + } + } + add_character_flag = ep3_construct_grand_solar + custom_tooltip = can_construct_solar_tooltip + custom_tooltip = solar_estate_effect_tooltip + add_stress = major_stress_loss + house = { + every_house_member = { + custom = custom.every_house_member + limit = { + NOT = { + has_relation_rival = root + } + is_imprisoned = no + this != root + } + add_stress = major_stress_loss + } + } + } + else = { + add_stress = major_stress_loss + house = { + every_house_member = { + custom = custom.every_house_member + limit = { + NOT = { + has_relation_rival = root + } + is_imprisoned = no + this != root + } + add_stress = major_stress_loss + add_opinion = { + modifier = love_opinion + target = root + opinion = 20 + } + } + } + } + stress_impact = { + diligent = minor_stress_impact_gain + impatient = minor_stress_impact_gain + callous = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = impatient + has_trait = callous + has_trait = ambitious + } + } + } + } +} + +##################################### +# Basileus Autokrator! # +# by Jason Cantalini # +# 3040 # +##################################### + +#Emperor has high legitimacy +ep3_governor_yearly.3040 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + has_cultural_pillar = language_greek + } + } + desc = ep3_governor_yearly.3040.t_greek + } + desc = ep3_governor_yearly.3040.t + } + } + desc = ep3_governor_yearly.3040.desc + theme = emperor + override_effect_2d = { + reference = legend_glow + } + override_background = { + trigger = { + scope:emperor = { capital_county = title:c_byzantion } + } + reference = ep3_constantinople + } + override_background = { + trigger = { + NOT = { + scope:emperor = { capital_county = title:c_byzantion } + } + } + reference = throne_room + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + camera = camera_event_left_forward + } + right_portrait = { + character = scope:candidate + animation = throne_room_bow_1 + } + + trigger = { + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + OR = { + is_governor = yes + is_landless_administrative = yes + } + is_at_war = no + top_liege = { + is_imprisoned = no + legitimacy_level >= 4 + has_government = administrative_government + } + age >= 12 + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 3 + top_liege = { + is_imprisoned = no + legitimacy_level >= 5 + } + } + } + + immediate = { + save_scope_as = root_scope + top_liege = { + save_scope_as = emperor + } + if = { + limit = { + scope:emperor.house = { + any_house_member = { + this != scope:emperor + is_ai = yes + save_temporary_scope_as = aspirant + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = scope:aspirant + } + #Ensure they're actually a visible candidate currently in contention + OR = { + is_close_family_of = scope:emperor + AND = { + is_vassal_of = scope:emperor + is_landed = yes + } + scope:emperor.primary_title = { + any_succession_appointment_investors = { + count > 1 + candidate = scope:aspirant + } + } + } + } + } + } + scope:emperor.house = { + every_house_member = { + limit = { + this != scope:emperor + is_ai = yes + save_temporary_scope_as = aspirant + is_candidate_for_title_trigger = { + TITLE = scope:emperor.primary_title + CANDIDATE = scope:aspirant + } + #Ensure they're actually a visible candidate currently in contention + OR = { + is_close_family_of = scope:emperor + AND = { + is_vassal_of = scope:emperor + is_landed = yes + } + scope:emperor.primary_title = { + any_succession_appointment_investors = { + count > 1 + candidate = scope:aspirant + } + } + } + } + add_to_list = imperial_house_candidates + } + } + ordered_in_list = { + list = imperial_house_candidates + order_by = "appointment_candidate_score(scope:emperor.primary_title)" + position = 0 + save_scope_as = candidate + } + } + } + + + #My family should really be closer to his... + option = { + trigger = { + exists = house + house != scope:emperor.house + } + name = ep3_governor_yearly.3040.a + flavor = ep3_governor_yearly.3040.a.flavor + + root = { + if = { + limit = { + NOT = { + house = { + has_variable = intermarrying_with_var + var:intermarrying_with_var = { + this = scope:emperor.house + } + } + } + } + #Increased marriage acceptance + house = { + set_variable = { + name = intermarrying_with_var + value = scope:emperor.house + years = 30 + } + } + scope:emperor.house = { + set_variable = { + name = intermarrying_with_var + value = root.house + years = 30 + } + } + custom_tooltip = ep3_governor_yearly_3040_marriage_tooltip + add_character_flag = { + flag = ep3_intermarrying_gov + days = 5 + } + + } + } + scope:emperor.house = { + every_house_member = { + custom = custom.every_house_member_emperor + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + if = { + limit = { + scope:emperor = { + is_ai = no + } + } + scope:emperor = { + send_interface_message = { + type = msg_governor_compliments_legitimacy + title = msg_governor_compliments_legitimacy.t + right_icon = root + + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + reverse_add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + if = { + limit = { + root = { + has_character_flag = ep3_intermarrying_gov + + } + } + custom_tooltip = ep3_governor_yearly_3040_marriage_tooltip + } + } + } + } + else = { + scope:emperor = { + dynasty = { add_dynasty_prestige = miniscule_dynasty_prestige_gain } + hidden_effect = { + reverse_add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + } + } + } + + dynasty = { add_dynasty_prestige = 25 } + + stress_impact = { + paranoid = minor_stress_impact_gain + shy = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value <= 25 + } + } + modifier = { + factor = 0 + OR = { + opinion = { + target = scope:emperor + value <= -25 + } + has_trait = paranoid + has_trait = shy + has_trait = content + } + } + } + } + #This family is sticking around, I should get in good with his heir + option = { + trigger = { + exists = scope:candidate + intrigue > average_skill_rating + } + name = ep3_governor_yearly.3040.b + flavor = ep3_governor_yearly.3040.b.flavor + if = { + limit = { + can_add_hook = { + target = scope:candidate + type = favor_hook + } + } + add_hook = { + type = favor_hook + target = scope:candidate + } + } + else = { + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:candidate + opinion = 40 + } + } + custom_tooltip = sycophant_boosts_credibility_candidate_score + scope:candidate = { + add_character_flag = { + flag = boosted_by_sycophant_score + years = 20 + } + } + hidden_effect = { + add_opinion = { + target = scope:candidate + modifier = respect_opinion + opinion = 30 + } + } + change_influence = minor_influence_gain + + stress_impact = { + impatient = medium_stress_impact_gain + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_rationality = 0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:candidate + value < 0 + } + } + modifier = { + factor = 0 + OR = { + opinion = { + target = scope:candidate + value <= -50 + } + has_trait = impatient + has_trait = just + has_trait = honest + } + } + } + } + #This guy isn't going anywhere. We need to fortify our self-sufficiency + option = { + name = ep3_governor_yearly.3040.c + flavor = ep3_governor_yearly.3040.c.flavor + add_character_modifier = { + modifier = independent_administrator_modifier + years = 20 + } + if = { + limit = { + any_maa_regiment = { + is_title_maa_regiment = no + can_upgrade_maa = yes + } + } + random_maa_regiment = { + limit = { + is_title_maa_regiment = no + can_upgrade_maa = yes + } + change_maa_regiment_size = { + size = 1 + reinforce = yes + } + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_skoutatoi + } + capital_province = { + NOR = { + terrain = farmlands + terrain = forest + terrain = wetlands + } + } + } + create_maa_regiment = { + type = skoutatoi + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_akritai + } + capital_province = { + OR = { + terrain = forest + terrain = wetlands + } + } + } + create_maa_regiment = { + type = akritai + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_ballistrai + } + capital_province = { + terrain = farmlands + } + } + create_maa_regiment = { + type = ballistrai + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_ayrudzi + } + } + create_maa_regiment = { + type = ayrudzi + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_hussar + } + } + create_maa_regiment = { + type = hussar + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_monaspa + } + } + create_maa_regiment = { + type = monaspa + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_cataphract_archers + } + } + create_maa_regiment = { + type = cataphract_archers + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_mubarizun + } + } + create_maa_regiment = { + type = mubarizun + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_tawashi + } + } + create_maa_regiment = { + type = tawashi + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_conrois + } + } + create_maa_regiment = { + type = conrois + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + has_trait = nomadic_philosophy + } + } + create_maa_regiment = { + type = horse_archers + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_pike_columns + } + } + create_maa_regiment = { + type = picchieri + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_druzhina + } + } + create_maa_regiment = { + type = druzhina + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + mpo_can_recruit_nomad_heavy_cavalry_maa_trigger = yes + } + create_maa_regiment = { + type = nomad_lancers + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + mpo_can_recruit_nomad_maa_trigger = yes + } + create_maa_regiment = { + type = heavy_horse_archers + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_advanced_bowmaking + } + capital_province = { + NOR = { + terrain = desert + terrain = drylands + terrain = plains + } + } + } + create_maa_regiment = { + type = crossbowmen + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_war_camels + } + capital_province = { + OR = { + terrain = desert + terrain = drylands + } + } + } + create_maa_regiment = { + type = camel_rider + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = farmlands + terrain = floodplains + } + } + culture = { + has_innovation = innovation_quilted_armor + } + short_term_gold >= 200 + } + create_maa_regiment = { + type = armored_footmen + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = plains + terrain = drylands + } + } + } + create_maa_regiment = { + type = light_horsemen + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = forest + terrain = taiga + terrain = hills + } + } + } + create_maa_regiment = { + type = bowmen + check_can_recruit = no + size = 1 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = jungle + terrain = wetlands + } + } + } + create_maa_regiment = { + type = light_footmen + check_can_recruit = no + size = 1 + } + } + else = { + create_maa_regiment = { + type = pikemen_unit + check_can_recruit = no + size = 1 + } + } + remove_short_term_gold = minor_gold_value + + stress_impact = { + trusting = medium_stress_impact_gain + humble = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_sociability = -0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value >= 40 + } + } + modifier = { + add = 50 + any_neighboring_top_liege_realm_owner = { + any_realm_county = { + any_neighboring_county = { + OR = { + holder = root + holder.liege = root + } + } + } + } + } + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + opinion = { + target = scope:emperor + value >= 75 + } + has_trait = generous + has_trait = trusting + has_trait = humble + } + } + } + } + #I should use his image to reinforce my governance and drive enlistment + option = { + name = ep3_governor_yearly.3040.d + flavor = ep3_governor_yearly.3040.d.flavor + trigger = { + is_governor = yes + } + add_prestige = minor_prestige_gain + if = { + limit = { + any_maa_regiment = { + is_title_maa_regiment = yes + can_upgrade_maa = yes + } + } + every_maa_regiment = { + limit = { + is_title_maa_regiment = yes + can_upgrade_maa = yes + } + change_maa_regiment_size = { + size = 1 + reinforce = yes + } + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_cataphract + } + short_term_gold >= 300 + capital_province = { + NOR = { + terrain = hills + terrain = mountains + terrain = desert_mountains + terrain = wetlands + } + } + } + create_maa_regiment = { + type = cataphract + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_skoutatoi + } + capital_province = { + NOR = { + terrain = farmlands + terrain = forest + terrain = wetlands + } + } + } + create_maa_regiment = { + type = skoutatoi + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_akritai + } + capital_province = { + OR = { + terrain = forest + terrain = wetlands + } + } + } + create_maa_regiment = { + type = akritai + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_ballistrai + } + capital_province = { + terrain = farmlands + } + } + create_maa_regiment = { + type = ballistrai + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_ayrudzi + } + } + create_maa_regiment = { + type = ayrudzi + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_monaspa + } + } + create_maa_regiment = { + type = monaspa + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_cataphract_archers + } + } + create_maa_regiment = { + type = cataphract_archers + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_hussar + } + } + create_maa_regiment = { + type = hussar + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_mubarizun + } + } + create_maa_regiment = { + type = mubarizun + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_tawashi + } + } + create_maa_regiment = { + type = tawashi + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_conrois + } + } + create_maa_regiment = { + type = conrois + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + has_trait = nomadic_philosophy + } + } + create_maa_regiment = { + type = horse_archers + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_pike_columns + } + } + create_maa_regiment = { + type = picchieri + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_cultural_parameter = unlock_maa_druzhina + } + } + create_maa_regiment = { + type = druzhina + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + mpo_can_recruit_nomad_heavy_cavalry_maa_trigger = yes + } + create_maa_regiment = { + type = nomad_lancers + check_can_recruit = no + title = root.primary_title + size = 1 + } + } + else_if = { + limit = { + mpo_can_recruit_nomad_maa_trigger = yes + } + create_maa_regiment = { + type = heavy_horse_archers + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_advanced_bowmaking + } + capital_province = { + NOR = { + terrain = desert + terrain = drylands + terrain = plains + } + } + } + create_maa_regiment = { + type = crossbowmen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + culture = { + has_innovation = innovation_war_camels + } + capital_province = { + OR = { + terrain = desert + terrain = drylands + } + } + } + create_maa_regiment = { + type = camel_rider + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = farmlands + terrain = floodplains + } + } + culture = { + has_innovation = innovation_quilted_armor + } + short_term_gold >= 200 + } + create_maa_regiment = { + type = armored_footmen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = plains + terrain = drylands + } + } + } + create_maa_regiment = { + type = light_horsemen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = forest + terrain = taiga + terrain = hills + } + } + } + create_maa_regiment = { + type = bowmen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else_if = { + limit = { + capital_province = { + OR = { + terrain = jungle + terrain = wetlands + } + } + } + create_maa_regiment = { + type = light_footmen + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + else = { + create_maa_regiment = { + type = pikemen_unit + check_can_recruit = no + title = root.primary_title + size = 2 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value < -0 + } + } + modifier = { + add = 50 + any_neighboring_top_liege_realm_owner = { + any_realm_county = { + any_neighboring_county = { + OR = { + holder = root + holder.liege = root + } + } + } + } + } + modifier = { + factor = 0 + OR = { + short_term_gold <= medium_gold_value + has_trait = greedy + has_trait = ambitious + } + } + } + } +} + +##################################### +# God Appointed... Him? # +# by Jason Cantalini # +# 3050 # +##################################### + +#Emperor has low legitimacy +ep3_governor_yearly.3050 = { + type = character_event + title = ep3_governor_yearly.3050.t + desc = { + desc = ep3_governor_yearly.3050.desc + first_valid = { + #Emperor is a mess + triggered_desc = { + trigger = { + has_character_flag = demon_emperor_madness + } + desc = ep3_governor_yearly.3050.mess + } + #Emperor is useless + triggered_desc = { + trigger = { + has_character_flag = demon_emperor_sloth + } + desc = ep3_governor_yearly.3050.shiftless + } + #Emperor is a cowardly worm + triggered_desc = { + trigger = { + has_character_flag = demon_emperor_fear + } + desc = ep3_governor_yearly.3050.coward + } + #Emperor is a monster + triggered_desc = { + trigger = { + has_character_flag = demon_emperor_cruel + } + desc = ep3_governor_yearly.3050.cruel + } + #Emperor just plain sucks + desc = ep3_governor_yearly.3050.generic_bad + } + desc = ep3_governor_yearly.3050.outro + } + theme = emperor + override_effect_2d = { + reference = flies + } + override_background = { + trigger = { + scope:emperor.capital_county.culture = { + OR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + has_cultural_pillar = heritage_latin + has_graphical_mediterranean_culture_group_trigger = yes + } + } + NOR = { + has_character_flag = demon_emperor_cruel + has_character_flag = demon_emperor_generic + } + } + reference = ep3_byzantine_feast + } + override_background = { + trigger = { + scope:emperor.capital_county.culture = { + NOR = { + has_cultural_pillar = heritage_byzantine + has_cultural_pillar = heritage_caucasian + has_cultural_pillar = heritage_latin + has_graphical_mediterranean_culture_group_trigger = yes + } + } + NOR = { + has_character_flag = demon_emperor_cruel + has_character_flag = demon_emperor_generic + } + } + reference = corridor_night + } + override_background = { + trigger = { + has_character_flag = demon_emperor_cruel + } + reference = bp1_bonfire + } + override_background = { + trigger = { + has_character_flag = demon_emperor_generic + } + reference = bedchamber + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_madness + } + } + animation = aggressive_unarmed + } + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_sloth + } + } + animation = throne_room_kneel_1 + } + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_fear + } + } + animation = paranoia + } + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_cruel + } + } + animation = manic + } + triggered_animation = { + trigger = { + root = { + has_character_flag = demon_emperor_generic + } + } + animation = eccentric + } + } + lower_right_portrait = scope:faith_head + + trigger = { + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + OR = { + is_governor = yes + is_landless_administrative = yes + } + is_at_war = no + top_liege = { + has_legitimacy = yes + legitimacy_level < 2 + age >= 8 + } + age >= 12 + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 3 + top_liege = { + is_imprisoned = no + legitimacy_level < 1 + } + } + } + + immediate = { + save_scope_as = root_scope + top_liege = { + save_scope_as = emperor + } + random_list = { + 3 = { + trigger = { + scope:emperor = { + ai_rationality <= low_negative_ai_value + } + } + modifier = { + factor = 4 + scope:emperor = { + ai_rationality <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_madness + days = 5 + } + if = { + limit = { + scope:emperor = { + is_adult = yes + } + } + scope:emperor = { add_character_flag = is_naked } + } + } + 3 = { + trigger = { + scope:emperor = { + ai_energy <= low_negative_ai_value + } + } + modifier = { + factor = 4 + scope:emperor = { + ai_energy <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_sloth + days = 5 + } + if = { + limit = { + scope:emperor = { + is_adult = yes + } + } + scope:emperor = { add_character_flag = is_naked } + } + } + 3 = { + trigger = { + scope:emperor = { + ai_boldness <= low_negative_ai_value + } + } + modifier = { + factor = 4 + scope:emperor = { + ai_boldness <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_fear + days = 5 + } + } + 3 = { + trigger = { + scope:emperor = { + ai_compassion <= low_negative_ai_value + } + } + modifier = { + factor = 4 + scope:emperor = { + ai_compassion <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_cruel + days = 5 + } + } + 1 = { + modifier = { + factor = 15 + scope:emperor = { + ai_honor <= high_negative_ai_value + } + } + add_character_flag = { + flag = demon_emperor_generic + days = 5 + } + if = { + limit = { + scope:emperor = { + is_adult = yes + } + } + scope:emperor = { add_character_flag = is_naked } + } + } + } + if = { + limit = { + maa_regiments_max_count > maa_regiments_count + any_maa_regiment = { + is_title_maa_regiment = yes + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + is_title_maa_regiment = yes + } + position = 0 + save_scope_value_as = { + name = regiment_size + value = maa_size + } + save_scope_as = regiment + } + } + if = { + limit = { + OR = { + has_trait = zealous + piety_level >= 3 + } + exists = root.faith.religious_head + NOT = { + root.faith.religious_head = { + this = root + } + } + } + root.faith.religious_head = { save_scope_as = faith_head } + } + } + #DEMON! + option = { + name = ep3_governor_yearly.3050.a + trigger = { + OR = { + has_trait = zealous + piety_level >= 3 + } + } + reason = piety_level + add_piety = major_piety_gain + scope:emperor = { + add_opinion = { + modifier = insulted_opinion + target = root + opinion = -50 + } + } + if = { + limit = { + exists = scope:faith_head + } + scope:faith_head = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + stress_impact = { + paranoid = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + cynical = major_stress_impact_gain + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = calm + has_trait = forgiving + } + } + } + } + #Why should the troops answer to such a poser... and not me? + option = { + name = ep3_governor_yearly.3050.b + trigger = { + is_governor = yes + influence_level >= 3 + } + reason = influence_level + add_character_flag = { + flag = low_legitimacy_admin_factions_flag + years = 20 + } + scope:emperor = { + send_interface_message = { + type = msg_governor_challenging_illegitimacy + title = msg_governor_challenging_illegitimacy.t + desc = msg_governor_challenging_illegitimacy.desc + right_icon = scope:root_scope + + custom_tooltip = ep3_governor_yearly_3050_factions_emp_tooltip + add_legitimacy = miniscule_legitimacy_loss + } + } + + if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 1 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 1 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 2 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 2 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 3 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 3 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 4 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 4 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 5 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 5 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 6 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 6 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 7 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 7 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 8 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 8 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 9 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 9 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 10 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 10 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 11 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 11 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 12 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 12 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 13 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 13 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value = 14 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 14 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else_if = { + limit = { + exists = scope:regiment + ep3_governor_yearly_3050_regiment_size_value >= 15 + } + create_maa_regiment = { + type_of = scope:regiment + check_can_recruit = no + size = 15 + } + scope:regiment = { destroy_maa_regiment = yes } + } + else = { + add_prestige = medium_prestige_gain + change_influence = minor_influence_gain + } + add_trait = disloyal + + stress_impact = { + disloyal = minor_stress_impact_loss + loyal = medium_stress_impact_gain + just = major_stress_impact_gain + trusting = medium_stress_impact_gain + humble = major_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value < -20 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value < -70 + } + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value >= 0 + } + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = trusting + has_trait = humble + has_trait = content + has_trait = loyal + } + opinion = { + target = scope:emperor + value >= 60 + } + } + } + } + #He needs my support! + option = { + name = ep3_governor_yearly.3050.c + flavor = ep3_governor_yearly.3050.c.flavor + scope:emperor = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + scope:emperor = { + send_interface_message = { + type = msg_governor_supports_rule + title = msg_governor_supports_rule.t + desc = msg_governor_supports_rule.desc + right_icon = scope:root_scope + + add_legitimacy = miniscule_legitimacy_gain + random = { + chance = 20 + root = { add_trait = loyal } + } + } + } + stress_impact = { + loyal = miniscule_stress_impact_loss + arbitrary = major_stress_impact_gain + paranoid = medium_stress_impact_gain + fickle = medium_stress_impact_gain + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 2 + ai_compassion = 0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value < -20 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value > 20 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value > 70 + } + } + modifier = { + factor = 0 + OR = { + has_trait = arbitrary + has_trait = paranoid + has_trait = fickle + has_trait = deceitful + } + opinion = { + target = scope:emperor + value <= 70 + } + } + } + } + #A perfect time to get involved in imperial politics... and neglect my other duties + option = { + name = ep3_governor_yearly.3050.d + + if = { + limit = { + is_governor = yes + NOT = { has_character_flag = ep3_governor_yearly_3050_neglect_duties } + } + change_influence = medium_influence_gain + #Lose governor efficiency + custom_tooltip = ep3_governor_yearly_3050_neglect_duties_tooltip + add_character_flag = { + flag = ep3_governor_yearly_3050_neglect_duties + years = 10 + } + } + else_if = { + limit = { + NOT = { + has_character_modifier = ep3_neglecting_house_head_duties_modifier + } + } + change_influence = minor_influence_gain + add_character_modifier = { + modifier = ep3_neglecting_house_head_duties_modifier + years = 10 + } + } + else = { + change_influence = medium_influence_gain + add_prestige = minor_prestige_loss + } + + stress_impact = { + diligent = medium_stress_impact_gain + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 0.5 + ai_energy = -0.5 + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value <= -70 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value < 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value >= 50 + } + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + has_trait = humble + } + opinion = { + target = scope:emperor + value >= 80 + } + } + } + } + after = { + if = { + limit = { + scope:emperor = { + has_character_flag = is_naked + } + } + scope:emperor = { + remove_character_flag = is_naked + } + } + } +} + +##################################### +# A Resplendent Coronation # +# by Jason Cantalini # +# 3060 # +##################################### + +#Admin Imperial Succession event +ep3_governor_yearly.3060 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.t_regent + } + desc = ep3_governor_yearly.3060.t + } + } + desc = { + #The old Basileus is dead or usurped + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.intro_regent + } + triggered_desc = { + trigger = { + scope:previous_holder = { + is_alive = yes + NOT = { + has_character_flag = abdicated_from_throne + } + } + } + desc = ep3_governor_yearly.3060.intro_usurper + } + desc = ep3_governor_yearly.3060.intro_deceased + } + #Where is new Basileus being acclaimed? + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.desc_regent + } + triggered_desc = { + trigger = { + scope:emperor = { + has_character_flag = ep3_new_emperor_afield + } + } + desc = ep3_governor_yearly.3060.desc_afield + } + desc = ep3_governor_yearly.3060.desc_temple + } + #Is it Byzantine or nah? + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.desc_regent_acclaim + } + triggered_desc = { + trigger = { + scope:emperor = { + religion = { + this = religion:christianity_religion + } + primary_title = { + this = title:e_byzantium + } + #is either a Byzantine themselves or has a byzantine around to indicate any interest in Byzantine traditions + OR = { + culture = { + has_cultural_pillar = heritage_byzantine + OR = { + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:greek + } + } + any_vassal = { + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:greek + } + } + } + } + is_female = no + } + } + desc = ep3_governor_yearly.3060.desc_byzantine + } + triggered_desc = { + trigger = { + scope:emperor = { + religion = { + this = religion:christianity_religion + } + primary_title = { + this = title:e_byzantium + } + OR = { + culture = { + has_cultural_pillar = heritage_byzantine + OR = { + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:greek + } + } + any_vassal = { + culture = { + OR = { + has_cultural_pillar = heritage_byzantine + any_parent_culture_or_above = { + this = culture:greek + } + this = culture:greek + } + } + } + } + is_female = yes + } + } + desc = ep3_governor_yearly.3060.desc_byzantine_femme + } + desc = ep3_governor_yearly.3060.desc_generic + } + #Emperor's legitimacy + first_valid = { + triggered_desc = { + trigger = { + scope:new_holder = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + desc = ep3_governor_yearly.3060.desc_regent_legit + } + triggered_desc = { + trigger = { + scope:emperor = { + legitimacy_level >= 4 + } + } + desc = ep3_governor_yearly.3060.desc_high_legit + } + triggered_desc = { + trigger = { + scope:emperor = { + legitimacy_level < 4 + legitimacy_level >= 2 + } + } + desc = ep3_governor_yearly.3060.desc_medium_legit + } + desc = ep3_governor_yearly.3060.desc_low_legit + } + } + theme = emperor + override_background = { + trigger = { + scope:emperor = { + capital_county = title:c_byzantion + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + NOT = { + has_character_flag = ep3_new_emperor_afield + } + } + } + reference = ep3_hagia_sophia + } + override_background = { + trigger = { + NOT = { + scope:emperor = { + capital_county = title:c_byzantion + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + } + scope:emperor = { + tgp_is_ceremonial_regent_trigger = no # Not 'actual' ruler + NOT = { + has_character_flag = ep3_new_emperor_afield + } + } + } + reference = temple + } + override_background = { + trigger = { + scope:emperor = { + has_character_flag = ep3_new_emperor_afield + location = { + OR = { + terrain = desert + terrain = drylands + terrain = oasis + terrain = desert_mountains + terrain = floodplains + } + } + } + } + reference = ce1_legendary_oasis + } + override_background = { + trigger = { + scope:emperor = { + has_character_flag = ep3_new_emperor_afield + location = { + NOR = { + terrain = desert + terrain = drylands + terrain = oasis + terrain = desert_mountains + terrain = floodplains + } + } + } + } + reference = ce1_legendary_spring + } + override_background = { + trigger = { + exists = scope:background_throne_room_scope + scope:emperor = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + reference = throne_room_scope + } + left_portrait = { + character = scope:emperor + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_win + } + right_portrait = { + character = scope:ceremonial_liege + animation = holding_hu + 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 + } + clear_saved_scope = ceremonial_liege + } + scope:ceremonial_liege ?= { save_scope_as = background_throne_room_scope } + save_scope_as = root_scope + if = { + limit = { + scope:emperor = { + OR = { + is_travelling = yes + is_in_army = yes + } + #Is not at sea + location = { + exists = holder + } + } + } + scope:emperor = { + add_character_flag = { + flag = ep3_new_emperor_afield + days = 30 + } + } + } + scope:emperor = { + location = { + save_scope_as = emp_location + } + } + if = { + limit = { + has_ach_dlc_trigger = yes + scope:emperor = { + has_realm_law = uncrowned + } + } + custom_tooltip = admin_coronation_still_req_tt + } + } + #My positive relation? This is amazing news! + option = { + name = ep3_governor_yearly.3060.a + trigger = { + OR = { + has_relation_friend = scope:emperor + has_relation_potential_friend = scope:emperor + has_relation_lover = scope:emperor + has_relation_soulmate = scope:emperor + is_allied_to = scope:emperor + is_close_family_of = scope:emperor + house = scope:emperor.house + is_spouse_of = scope:emperor + } + NOR = { + has_relation_rival = scope:emperor + reverse_opinion = { + target = scope:emperor + value <= -25 + } + } + } + if = { + limit = { + scope:emperor = { + legitimacy_level >= 5 + } + } + add_gold = medium_gold_value + change_influence = medium_influence_gain + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 4 + } + } + add_gold = medium_gold_value + change_influence = minor_influence_gain + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 3 + } + } + add_gold = minor_gold_value + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:emperor + opinion = 5 + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 2 + } + } + add_gold = minor_gold_value + scope:emperor = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 1 + } + } + scope:emperor = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + } + add_gold = tiny_gold_value + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + else = { + scope:emperor = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + add_gold = tiny_gold_value + change_influence = miniscule_influence_loss + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + hidden_effect = { + add_opinion = { + modifier = loyalty_opinion + target = scope:emperor + opinion = 10 + } + } + if = { + limit = { + scope:emperor = { + legitimacy_level <= 1 + } + } + stress_impact = { + base = minor_stress_impact_loss + greedy = miniscule_stress_impact_loss + } + } + else = { + stress_impact = { + base = medium_stress_impact_loss + greedy = miniscule_stress_impact_loss + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + ai_energy = 1 + } + modifier = { + add = 50 + has_trait = loyal + } + modifier = { + add = 50 + has_trait = greedy + } + modifier = { + add = 50 + scope:emperor = { + influence_level >= 3 + } + } + modifier = { + add = 50 + scope:emperor = { + influence_level >= 4 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 3 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 4 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 5 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 2 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 1 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 0 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value >= 75 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value >= 25 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value < 0 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value <= -25 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value <= -75 + } + } + } + } + #I am a detractor of this emperor + option = { + name = ep3_governor_yearly.3060.b + flavor = ep3_governor_yearly.3060.b.flavor + if = { + limit = { + scope:emperor = { + legitimacy_level >= 5 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 80 + } + } + if = { + limit = { + has_multiple_players = no + is_ai = no + scope:previous_holder = { + is_ruler = no + NOT = { + has_relation_rival = root + } + } + } + add_courtier = scope:previous_holder + scope:previous_holder = { + every_traveling_family_member = { + limit = { + this != scope:previous_holder + } + root = { add_courtier = prev } + hidden_effect = { + return_to_court = yes + } + } + } + } + } + change_influence = major_influence_loss + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -80 + } + } + #Add modifier + add_character_modifier = { + modifier = ep3_head_of_opposition_modifier + years = 10 + } + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 4 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 60 + } + } + if = { + limit = { + has_multiple_players = no + is_ai = no + scope:previous_holder = { + is_ruler = no + NOT = { + has_relation_rival = root + } + } + } + add_courtier = scope:previous_holder + scope:previous_holder = { + every_traveling_family_member = { + limit = { + this != scope:previous_holder + } + root = { add_courtier = prev } + hidden_effect = { + return_to_court = yes + } + } + } + } + } + change_influence = medium_influence_loss + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -40 + } + } + #Add modifier + add_character_modifier = { + modifier = ep3_head_of_opposition_modifier + years = 5 + } + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 3 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 40 + } + } + if = { + limit = { + has_multiple_players = no + is_ai = no + scope:previous_holder = { + is_ruler = no + NOT = { + has_relation_rival = root + } + } + } + add_courtier = scope:previous_holder + scope:previous_holder = { + every_traveling_family_member = { + root = { add_courtier = prev } + hidden_effect = { + return_to_court = yes + } + } + } + } + } + add_prestige = medium_prestige_gain + change_influence = miniscule_influence_gain + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -50 + } + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 2 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + } + add_prestige = minor_prestige_gain + change_influence = minor_influence_gain + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -40 + } + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 1 + } + } + if = { + limit = { + scope:previous_holder = { + is_alive = yes + NOR = { + has_character_flag = abdicated_from_throne + this = root + } + } + } + scope:previous_holder = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + } + } + add_prestige = miniscule_prestige_gain + change_influence = medium_influence_gain + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -40 + } + } + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + else = { + change_influence = medium_influence_gain + scope:emperor = { + add_opinion = { + modifier = opposition_opinion + target = root + opinion = -20 + } + } + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + hidden_effect = { + add_opinion = { + modifier = contempt_opinion + target = scope:emperor + opinion = -20 + } + } + + if = { + limit = { + scope:emperor = { + legitimacy_level >= 4 + } + } + stress_impact = { + trusting = medium_stress_impact_gain + content = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + craven = medium_stress_impact_gain + humble = medium_stress_impact_gain + loyal = medium_stress_impact_gain + } + } + else = { + stress_impact = { + loyal = medium_stress_impact_gain + } + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 1 + ai_energy = 1 + } + modifier = { + add = 50 + has_trait = disloyal + } + modifier = { + add = -50 + house ?= scope:emperor.house + } + modifier = { + add = -100 + scope:emperor = { + has_hook = root + } + } + modifier = { + add = 25 + scope:emperor = { + influence_level <= 1 + } + } + modifier = { + add = -50 + scope:emperor = { + influence_level >= 3 + } + } + modifier = { + add = -50 + scope:emperor = { + influence_level >= 4 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 3 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 4 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level >= 5 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 2 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 1 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level <= 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:emperor + value >= 75 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value > 0 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value <= -25 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value <= -50 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value <= -75 + } + } + modifier = { + factor = 0 + has_trait = loyal + } + modifier = { + factor = 0 + scope:emperor = { + legitimacy_level >= 4 + } + OR = { + has_trait = trusting + has_trait = content + has_trait = paranoid + has_trait = craven + has_trait = humble + } + } + } + } + #I am a supporter of this emperor + option = { + name = ep3_governor_yearly.3060.c + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:emperor = { tgp_is_ceremonial_regent_trigger = yes } + } + desc = ep3_governor_yearly.3060.c.flavor_regent + } + triggered_desc = { + trigger = { + scope:emperor = { + legitimacy_level >= 4 + } + } + desc = ep3_governor_yearly.3060.c.flavor_high_legit + } + triggered_desc = { + trigger = { + scope:emperor = { + legitimacy_level <= 1 + } + } + desc = ep3_governor_yearly.3060.c.flavor_low_legit + } + desc = ep3_governor_yearly.3060.c.flavor_med_legit + } + } + #High legitimacy: gain influence and a little opinion with emp + #Low legitimacy: lose opinion and gain big opinion with emp + + if = { + limit = { + scope:emperor = { + legitimacy_level >= 5 + } + } + change_influence = medium_influence_gain + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 4 + } + } + reverse_add_opinion = { + modifier = support_opinion + target = scope:emperor + opinion = 10 + } + change_influence = minor_influence_gain + custom_tooltip = ep3_succession_high_legitimacy_tooltip + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 3 + } + } + change_influence = miniscule_influence_loss + reverse_add_opinion = { + modifier = support_opinion + target = scope:emperor + opinion = 10 + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 2 + } + } + change_influence = minor_influence_loss + scope:emperor = { + add_opinion = { + modifier = support_opinion + target = root + opinion = 20 + } + } + } + else_if = { + limit = { + scope:emperor = { + legitimacy_level >= 1 + } + } + scope:emperor = { + add_opinion = { + modifier = support_opinion + target = root + opinion = 30 + } + } + change_influence = medium_influence_loss + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + else = { + scope:emperor = { + add_opinion = { + modifier = support_opinion + target = root + opinion = 50 + } + } + change_influence = major_influence_loss + custom_tooltip = ep3_succession_low_legitimacy_tooltip + } + hidden_effect = { + add_opinion = { + modifier = loyalty_opinion + target = scope:emperor + opinion = 10 + } + } + if = { + limit = { + scope:emperor = { + legitimacy_level <= 1 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + craven = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + disloyal = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + } + else = { + stress_impact = { + disloyal = medium_stress_impact_gain + } + } + + ai_chance = { + base = 0 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + ai_energy = 1 + } + modifier = { + add = 100 + has_trait = loyal + } + modifier = { + add = 50 + house ?= scope:emperor.house + } + modifier = { + add = 100 + scope:emperor = { + has_hook = root + } + } + modifier = { + add = -25 + scope:emperor = { + influence_level <= 1 + } + } + modifier = { + add = 50 + scope:emperor = { + influence_level >= 3 + } + } + modifier = { + add = 50 + scope:emperor = { + influence_level >= 4 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 3 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 4 + } + } + modifier = { + add = 25 + scope:emperor = { + legitimacy_level >= 5 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 2 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 1 + } + } + modifier = { + add = -25 + scope:emperor = { + legitimacy_level <= 0 + } + } + modifier = { + add = 50 + opinion = { + target = scope:emperor + value >= 75 + } + } + modifier = { + add = 25 + opinion = { + target = scope:emperor + value >= 25 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value < 0 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value <= -25 + } + } + modifier = { + add = -25 + opinion = { + target = scope:emperor + value <= -75 + } + } + modifier = { + factor = 0 + has_trait = disloyal + } + modifier = { + factor = 0 + scope:emperor = { + legitimacy_level <= 1 + } + OR = { + has_trait = disloyal + has_trait = arrogant + has_trait = craven + has_trait = paranoid + has_trait = ambitious + has_trait = fickle + } + } + } + } + #No opinion... + option = { + name = { + trigger = { + scope:emperor = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + text = ep3_governor_yearly.3060.d.regent + } + name = { + trigger = { + scope:emperor = { tgp_is_ceremonial_regent_trigger = no } # Not 'actual' ruler + } + text = ep3_governor_yearly.3060.d + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + ai_sociability = -1 + } + } + } +} + +scripted_trigger ep3_governor_yearly_3070_racer_trigger = { + is_alive = yes + is_adult = yes + age < 45 + is_available = yes + ai_energy >= low_negative_ai_value + NOT = { + has_character_modifier = obese_modifier + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:liege } + NOT = { is_primary_heir_of = scope:liege } +} + +scripted_trigger ep3_governor_yearly_3070_close_governor_trigger = { + is_governor = yes + NOR = { + this = root + house = root.house + primary_heir = root + primary_heir.house ?= { + this = root.house + } + } + any_sub_realm_county = { + count >= ep3_governor_yearly_3070_governorship_value + } +} + +##################################### +# A Well-Traveled Tongue # +# by Jason Cantalini # +# 3070 # +##################################### + +#You are very distant from the emperor and a traveler from the imperial court is visiting to mock you +ep3_governor_yearly.3070 = { + type = character_event + title = ep3_governor_yearly.3070.t + desc = { + desc = ep3_governor_yearly.3070.intro + first_valid = { + triggered_desc = { + trigger = { + is_landed = yes + } + desc = ep3_governor_yearly.3070.landed + } + desc = ep3_governor_yearly.3070.unlanded + } + first_valid = { + triggered_desc = { + trigger = { + scope:liege.culture = { + has_cultural_parameter = hosts_chariot_races + } + } + desc = ep3_governor_yearly.3070.chariot + } + desc = ep3_governor_yearly.3070.horse + } + desc = ep3_governor_yearly.3070.desc + } + #Loc for young racer making fun of you + theme = administrative + override_background = { + reference = terrain_travel + } + + left_portrait = { + character = scope:rider + animation = jockey_gallop + camera = camera_event_horse_left + } + + right_portrait = { + character = scope:charioteer + animation = chariot_neutral + camera = camera_event_chariot_right + } + + lower_right_portrait = scope:close_governor + + trigger = { + top_liege != this + government_allows = administrative + OR = { + AND = { + is_landed = yes + NOT = { + any_sub_realm_county = { + any_neighboring_county = { + holder = root.liege + } + } + } + } + AND = { + is_landless_administrative = yes + #This will make absolutely no sense if landless root's domicile is in liege's capital province + domicile.domicile_location = { + this != root.top_liege.capital_province + } + #Either liege is top liege or root's domicile is in liege's sub realm + OR = { + liege = { + top_liege = this + } + liege = { + top_liege != this + any_sub_realm_county = { + this = root.domicile.domicile_location.county + } + } + } + } + } + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + trigger_if = { + limit = { + is_landed = yes + } + capital_province = { + save_temporary_scope_as = root_capital_temp + } + } + trigger_else = { + domicile = { + domicile_location = { + save_temporary_scope_as = root_capital_temp + } + } + } + OR = { + #EMPEROR LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 200000 + } + #Medium range for one or the other + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + OR = { + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 150000 + } + #Short range if neither is coastal + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + NOR = { + liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 100000 + } + + #KING LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 100000 + } + #Medium range for one or the other + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + OR = { + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 75000 + } + #Short range if neither is coastal + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 50000 + } + } + liege = { + save_temporary_scope_as = temp_liege + + any_courtier_or_guest = { + NOT = { + is_foreign_court_guest = yes + } + is_alive = yes + is_adult = yes + age <= 45 + is_available = yes + ai_energy >= low_negative_ai_value + NOT = { + has_character_modifier = obese_modifier + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:temp_liege } + NOT = { is_primary_heir_of = scope:temp_liege } + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + if = { + limit = { + is_landed = yes + } + capital_province = { + save_scope_as = root_capital + } + } + else = { + domicile = { + domicile_location = { + save_scope_as = root_capital + } + } + } + liege = { + save_scope_as = liege + } + scope:liege = { + if = { + limit = { + culture = { + has_cultural_parameter = hosts_chariot_races + } + } + if = { + limit = { + any_court_position_holder = { + type = charioteer_court_position + ep3_governor_yearly_3070_racer_trigger = yes + } + } + random_court_position_holder = { + type = charioteer_court_position + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = charioteer + } + } + else_if = { + limit = { + house = { + any_house_member = { + is_courtier_of = scope:liege + ep3_governor_yearly_3070_racer_trigger = yes + } + } + } + house = { + random_house_member = { + limit = { + is_courtier_of = scope:liege + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = charioteer + } + } + } + else_if = { + limit = { + any_courtier = { + ep3_governor_yearly_3070_racer_trigger = yes + } + } + random_courtier = { + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = charioteer + } + } + else = { + random_pool_guest = { + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = charioteer + } + } + scope:charioteer = { + save_scope_as = racer + } + } + else = { + if = { + limit = { + any_court_position_holder = { + type = charioteer_court_position + ep3_governor_yearly_3070_racer_trigger = yes + } + } + random_court_position_holder = { + type = charioteer_court_position + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = rider + } + } + else_if = { + limit = { + house ?= { + any_house_member = { + is_courtier_of = scope:liege + ep3_governor_yearly_3070_racer_trigger = yes + } + } + } + house = { + random_house_member = { + limit = { + is_courtier_of = scope:liege + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = rider + } + } + } + else_if = { + limit = { + any_courtier = { + ep3_governor_yearly_3070_racer_trigger = yes + } + } + random_courtier = { + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = rider + } + } + else = { + random_pool_guest = { + limit = { + ep3_governor_yearly_3070_racer_trigger = yes + } + save_scope_as = rider + } + } + scope:rider = { + save_scope_as = racer + } + } + } + if = { + limit = { + scope:liege = { + any_vassal = { + ep3_governor_yearly_3070_close_governor_trigger = yes + } + any_sub_realm_county = { + any_neighboring_county = { + holder = scope:liege + } + } + } + } + scope:liege = { + random_vassal = { + limit = { + ep3_governor_yearly_3070_close_governor_trigger = yes + any_sub_realm_county = { + any_neighboring_county = { + holder = scope:liege + } + } + } + save_scope_as = close_governor + } + } + } + else_if = { + limit = { + scope:liege = { + any_vassal = { + ep3_governor_yearly_3070_close_governor_trigger = yes + save_temporary_scope_as = temp_vassal + "scope:liege.capital_province.squared_distance(scope:temp_vassal.capital_province)" < 25000 + } + + } + } + scope:liege = { + random_vassal = { + 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 + } + } + } + } + #You're blind if you don't see the opportunities out here + option = { + name = ep3_governor_yearly.3070.a + trigger = { + has_trait = governor + has_trait_xp = { + trait = governor + value >= 40 + } + } + increase_governance_effect = { VALUE = 5 } + add_prestige = minor_prestige_gain + root.primary_title = { + ordered_title_heir = { + order_by = "appointment_candidate_score(root.primary_title)" + max = 1 + limit = { + house = root.house + } + root.primary_title = { + change_appointment_investment = { + target = prev + value = appointment_score_minor_value + } + } + } + } + stress_impact = { + fickle = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = -0.5 + ai_honor = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = ambitious + has_trait = arrogant + } + } + } + } + #I'll move my domicile + option = { + name = ep3_governor_yearly.3070.b + trigger = { + is_landed = no + } + change_influence = medium_influence_gain + domicile = { + move_domicile = scope:liege.capital_province + } + house = { + every_house_member = { + custom = custom.every_house_member + limit = { + NOR = { + this = root + this = scope:liege + } + age > 3 + } + change_influence = miniscule_influence_gain + add_opinion = { + modifier = uprooted_family_opinion + target = root + opinion = -20 + } + } + } + + every_spouse = { + change_influence = miniscule_influence_gain + add_opinion = { + modifier = uprooted_family_opinion + target = root + opinion = -20 + } + } + remove_short_term_gold = minor_gold_value + stress_impact = { + stubborn = minor_stress_impact_gain + lazy = medium_stress_impact_gain + content = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 1 + + } + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = lazy + has_trait = shy + has_trait = content + short_term_gold < minor_gold_value + } + } + } + } + #I need to get a more relevant appointment... + option = { + trigger = { + exists = scope:close_governor + } + name = ep3_governor_yearly.3070.c + flavor = ep3_governor_yearly.3070.c.flavor + scope:close_governor.primary_title = { + change_appointment_investment = { + target = root + value = appointment_score_medium_value + } + } + scope:racer = { + add_hook = { + type = favor_hook + target = root + } + } + + stress_impact = { + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_greed = 1 + + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + has_trait = content + } + } + } + } + #He's right... we need to improve the roads or this place will remain irrelevant + option = { + name = ep3_governor_yearly.3070.d + trigger = { + is_landed = yes + } + remove_treasury_or_gold = medium_treasury_or_gold_value + duel = { + skills = { stewardship learning } + value = medium_skill_rating + 55 = { #Your road-building efforts go well + desc = ep3_governor_yearly.3070.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3070.d.success + increase_governance_effect = { VALUE = 10 } + change_influence = minor_influence_gain + every_sub_realm_county = { + custom = custom.every_sub_realm_county + change_development_progress = medium_development_progress_gain + } + + } + } + 45 = { #Your province remains isolated... but now it's poorer + desc = ep3_governor_yearly.3070.d.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -44 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3070.d.fail + change_influence = miniscule_influence_loss + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + } + modifier = { + add = 50 + OR = { + stewardship > very_high_skill_rating + learning > very_high_skill_rating + AND = { + stewardship >= high_skill_rating + learning >= high_skill_rating + } + } + } + modifier = { + add = -50 + OR = { + stewardship < average_skill_rating + learning < average_skill_rating + AND = { + stewardship <= medium_skill_rating + learning <= medium_skill_rating + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_treasury_or_gold < medium_treasury_or_gold_value + stewardship < low_skill_rating + learning < low_skill_rating + } + } + } + } + #My quaint little corner of the world is nice + option = { + name = ep3_governor_yearly.3070.e + if = { + limit = { + culture != capital_county.culture + } + culture = { + change_cultural_acceptance = { + target = root.capital_county.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_content_governor + } + } + } + else_if = { + limit = { + culture = scope:liege.culture + has_dlc_feature = diverge_culture + NOT = { + has_character_flag = diverging_culture_discount + } + } + add_character_flag = diverging_culture_discount + custom_tooltip = diverging_culture_discount_tooltip + } + else_if = { + limit = { + culture = scope:liege.culture + } + add_piety = minor_piety_gain + } + else = { + add_character_modifier = { + modifier = contented_governing_countrymen_modifier + years = 10 + desc = contented_governing_countrymen_modifier_tooltip + } + } + change_influence = minor_influence_loss + if = { + limit = { + OR = { + culture != capital_county.culture + culture = scope:liege.culture + } + } + stress_impact = { + base = medium_stress_impact_loss + impatient = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + impatient = minor_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = ambitious + has_trait = arrogant + has_trait = impatient + } + } + } + } +} + +##################################### +# Taken by the Sea # +# by Jason Cantalini # +# 3080 # +##################################### + +scripted_trigger ep3_governor_yearly_3080_captain_trigger = { + is_alive = yes + is_adult = yes + age <= 55 + is_available = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + OR = { + prowess > low_skill_rating + martial > low_skill_rating + } + is_foreign_court_guest = no + NOR = { + is_primary_heir_of = root + is_player_heir_of = root + } +} + +#You are very distant from the emperor and shipments to you are being lost +ep3_governor_yearly.3080 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:liege.capital_county = { + is_coastal_county = yes + } + NOT = { + any_sub_realm_county = { + is_coastal_county = no + } + } + } + desc = ep3_governor_yearly.3080.t_sea + } + desc = ep3_governor_yearly.3080.t + } + } + desc = { + desc = ep3_governor_yearly.3080.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:rebel_faction + } + desc = ep3_governor_yearly.3080.desc_faction + } + desc = ep3_governor_yearly.3080.desc + } + } + theme = administrative + override_background = { + trigger = { + scope:liege.capital_county = { + is_coastal_county = yes + } + NOT = { + any_sub_realm_county = { + is_coastal_county = no + } + } + } + reference = ocean + } + override_background = { + trigger = { + OR = { + scope:liege.capital_county = { + is_coastal_county = no + } + any_sub_realm_county = { + is_coastal_county = no + } + } + } + reference = terrain_travel + } + + left_portrait = { + character = root + animation = anger + camera = camera_event_left_forward + } + + right_portrait = { + character = scope:captain + triggered_animation = { + trigger = { + exists = scope:rebel_faction + } + animation = throne_room_two_handed_passive_1 + } + triggered_animation = { + trigger = { + NOT = { + exists = scope:rebel_faction + } + } + animation = survey + } + camera = camera_event_right_pointing_left + } + lower_right_portrait = scope:liege + + trigger = { + is_landed = yes + government_has_flag = government_is_administrative + top_liege != this + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + age >= 8 + capital_province = { + save_temporary_scope_as = root_capital_temp + } + OR = { + #EMPEROR LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 400000 + } + #Medium range for one or the other + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + OR = { + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 300000 + } + #Short range if neither is coastal + AND = { + liege = { + highest_held_title_tier >= tier_empire + } + NOR = { + liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 200000 + } + + #KING LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 200000 + } + #Medium range for one or the other + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + OR = { + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 150000 + } + #Short range if neither is coastal + AND = { + liege = { + highest_held_title_tier <= tier_kingdom + } + liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "liege.capital_province.squared_distance(scope:root_capital_temp)" > 100000 + } + } + OR = { + any_knight = { + ep3_governor_yearly_3080_captain_trigger = yes + } + any_courtier_or_guest = { + ep3_governor_yearly_3080_captain_trigger = yes + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + capital_province = { + save_scope_as = root_capital + } + liege = { + save_scope_as = liege + } + if = { + limit = { + any_knight = { + ep3_governor_yearly_3080_captain_trigger = yes + } + } + random_knight = { + limit = { + ep3_governor_yearly_3080_captain_trigger = yes + } + save_scope_as = captain + } + } + else_if = { + limit = { + any_courtier = { + ep3_governor_yearly_3080_captain_trigger = yes + } + } + random_courtier = { + limit = { + ep3_governor_yearly_3080_captain_trigger = yes + } + save_scope_as = captain + } + } + else = { + random_pool_guest = { + limit = { + ep3_governor_yearly_3080_captain_trigger = yes + } + save_scope_as = captain + } + } + if = { + limit = { + any_targeting_faction = { + OR = { + faction_is_type = populist_faction + faction_is_type = peasant_faction + } + } + } + random_targeting_faction = { + limit = { + OR = { + faction_is_type = populist_faction + faction_is_type = peasant_faction + } + } + save_scope_as = rebel_faction + } + } + if = { + limit = { + exists = scope:rebel_faction + } + capital_county = { + change_county_control = miniscule_county_control_loss + } + } + else = { + add_character_flag = { + flag = ep3_governor_ignored_isolation + years = 5 + } + custom_tooltip = ep3_governor_ignored_isolation_tooltip + } + } + #Long-term improvements are needed or this will only happen again + option = { + trigger = { + has_trait = governor + stewardship >= very_high_skill_rating + } + name = ep3_governor_yearly.3080.a + if = { + limit = { + exists = scope:rebel_faction + NOT = { + has_character_modifier = ep3_face_of_empire_modifier + } + } + add_character_modifier = { + modifier = ep3_face_of_empire_modifier + years = 20 + } + } + else = { + capital_county = { + change_development_progress = medium_development_progress_gain + } + } + increase_governance_effect = { VALUE = 5 } + stress_impact = { + diligent = miniscule_stress_impact_loss + impatient = medium_stress_impact_gain + fickle = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = fickle + has_trait = trusting + } + } + } + } + #I need to get out of here... + option = { + name = ep3_governor_yearly.3080.b + change_influence = minor_influence_gain + add_character_modifier = { + modifier = ep3_anxious_for_new_assignment_modifier + years = 5 + desc = ep3_anxious_for_new_assignment_desc + } + custom_tooltip = ep3_anxious_for_new_assignment_tooltip + stress_impact = { + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + humble = minor_stress_impact_gain + calm = minor_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_honor = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = just + has_trait = humble + has_trait = calm + has_trait = content + } + } + } + } + #We can take care of the rebels ourselves + option = { + trigger = { + exists = scope:rebel_faction + } + name = ep3_governor_yearly.3080.c + duel = { + skills = { martial diplomacy } + value = medium_skill_rating + 55 = { #You subdue them + desc = ep3_governor_yearly.3080.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3080.c.success + increase_governance_effect = { VALUE = 10 } + if = { + limit = { + scope:captain = { + is_acclaimed = yes + } + } + scope:captain.accolade = { + add_glory = medium_glory_gain + } + } + else = { + scope:rebel_faction = { + add_faction_discontent = medium_discontent_loss + } + } + capital_county = { + change_county_control = minor_county_control_gain + } + } + } + 35 = { #The rebs remain angry + desc = ep3_governor_yearly.3080.c.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -34 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3080.c.fail + scope:captain = { + increase_wounds_effect = { REASON = fight } + } + scope:rebel_faction = { + add_faction_discontent = minor_discontent_gain + } + } + } + 10 = { #The rebs are very very angry + desc = ep3_governor_yearly.3080.c.crit_fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -9 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3080.c.crit_fail + + scope:captain = { + death = { + death_reason = death_disappearance + } + } + capital_county = { + change_county_control = medium_county_control_loss + } + scope:rebel_faction = { + add_faction_discontent = medium_discontent_gain + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + modifier = { + add = -50 + OR = { + diplomacy < average_skill_rating + martial < average_skill_rating + AND = { + diplomacy <= medium_skill_rating + martial <= medium_skill_rating + } + } + } + modifier = { + add = 50 + OR = { + diplomacy >= very_high_skill_rating + martial >= very_high_skill_rating + AND = { + diplomacy >= decent_skill_rating + martial >= decent_skill_rating + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = lazy + diplomacy < low_skill_rating + martial < low_skill_rating + AND = { + diplomacy <= decent_skill_rating + martial <= decent_skill_rating + } + } + } + } + } + + #Go, find the lost post-haste! + option = { + trigger = { + NOT = { exists = scope:rebel_faction } + } + name = ep3_governor_yearly.3080.d + duel = { + skills = { diplomacy intrigue } + value = medium_skill_rating + 55 = { #You manage to recover lost shipments and scrounge replacements up + desc = ep3_governor_yearly.3080.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3080.d.success + increase_governance_effect = { VALUE = 10 } + remove_character_flag = ep3_governor_ignored_isolation + custom_tooltip = ep3_governor_ignored_isolation_removal_tooltip + } + } + 35 = { #You find nothing + desc = ep3_governor_yearly.3080.d.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -34 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3080.d.fail + } + } + 10 = { #You waste money on a total debacle + desc = ep3_governor_yearly.3080.d.crit_fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -9 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3080.d.crit_fail + + capital_county = { + change_development_progress = medium_development_progress_loss + } + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 0.5 + } + modifier = { + add = -50 + OR = { + diplomacy < average_skill_rating + intrigue < average_skill_rating + AND = { + diplomacy <= medium_skill_rating + intrigue <= medium_skill_rating + } + } + } + modifier = { + add = 50 + OR = { + diplomacy >= very_high_skill_rating + intrigue >= very_high_skill_rating + AND = { + diplomacy >= decent_skill_rating + intrigue >= decent_skill_rating + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = lazy + diplomacy < low_skill_rating + intrigue < low_skill_rating + AND = { + diplomacy <= decent_skill_rating + intrigue <= decent_skill_rating + } + } + } + } + } + + #Whaddaya gonna do *shrug* + option = { + name = ep3_governor_yearly.3080.e + stress_impact = { + base = minor_stress_impact_loss + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + greedy = minor_stress_impact_gain + lazy = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = paranoid + has_trait = ambitious + has_trait = greedy + } + } + } + } + after = { + if = { + limit = { + scope:captain ?= { + has_character_flag = need_military_outfit + } + } + scope:captain = { + remove_character_flag = need_military_outfit + } + } + } +} + +##################################### +# The Heart of the Byzantine Empire # +# by Jason Cantalini # +# 3090 # +##################################### + +#Your estate/province is at the center of the action and it's great +ep3_governor_yearly.3090 = { + type = character_event + title = ep3_governor_yearly.3090.t + desc = { + desc = ep3_governor_yearly.3090.desc + first_valid = { + triggered_desc = { + trigger = { + is_landed = yes + } + desc = ep3_governor_yearly.3090.landed + } + desc = ep3_governor_yearly.3090.unlanded + } + } + + theme = administrative + override_background = { + trigger = { + scope:root_capital.county = { + culture = { + OR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + } + } + reference = ep3_city_gate + } + override_background = { + trigger = { + scope:root_capital.county = { + culture_has_east_asian_heritage_pillar_trigger = yes + } + } + reference = market + } + override_background = { + trigger = { + scope:root_capital.county = { + culture = { + NOR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + culture_has_east_asian_heritage_pillar_trigger = no + } + } + } + reference = tour_arrival + } + + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + lower_right_portrait = scope:liege + + trigger = { + age >= 8 + top_liege != this + government_allows = administrative + exists = domicile + trigger_if = { + limit = { + is_landed = yes + } + capital_province = { + save_temporary_scope_as = root_capital_temp + } + } + trigger_else = { + domicile = { + domicile_location = { + save_temporary_scope_as = root_capital_temp + } + } + } + OR = { + is_landed = yes + is_landless_administrative = yes + } + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + + #Capital is not a border province + NOT = { + scope:root_capital_temp.county = { + any_neighboring_county = { + holder = { + top_liege != root.top_liege + } + } + } + } + scope:root_capital_temp.county = { + culture = root.top_liege.capital_county.culture + } + + OR = { + scope:root_capital_temp = { + this = root.top_liege.capital_province + } + #EMPEROR LIEGE + #Long range if both imperial capital and root's are coastal + AND = { + is_landed = yes + top_liege = { + highest_held_title_tier >= tier_empire + } + top_liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 80000 + } + #Medium range for one or the other + AND = { + is_landed = yes + top_liege = { + highest_held_title_tier >= tier_empire + } + OR = { + top_liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 70000 + } + #Short range if neither is coastal + AND = { + is_landed = yes + top_liege = { + highest_held_title_tier >= tier_empire + } + NOR = { + top_liege.capital_county = { + is_coastal_county = yes + } + scope:root_capital_temp.county = { + is_coastal_county = yes + } + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 60000 + } + + #KING top_liege + #Long range if both imperial capital and root's are coastal + AND = { + OR = { + top_liege = { + highest_held_title_tier <= tier_kingdom + } + is_landless_ruler = yes + } + top_liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 40000 + } + #Medium range for one or the other + AND = { + OR = { + top_liege = { + highest_held_title_tier <= tier_kingdom + } + is_landless_ruler = yes + } + OR = { + top_liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 35000 + } + #Short range if neither is coastal + AND = { + OR = { + top_liege = { + highest_held_title_tier <= tier_kingdom + } + is_landless_ruler = yes + } + top_liege.capital_county = { + is_coastal_county = no + } + scope:root_capital_temp.county = { + is_coastal_county = no + } + "top_liege.capital_province.squared_distance(scope:root_capital_temp)" < 30000 + } + } + OR = { + top_liege = { + highest_held_title_tier <= tier_empire + realm_size >= 50 + } + top_liege = { + highest_held_title_tier <= tier_kingdom + realm_size >= 20 + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + if = { + limit = { + is_landed = yes + } + capital_province = { save_scope_as = root_capital } + } + else = { + domicile.domicile_location = { save_scope_as = root_capital } + } + top_liege = { save_scope_as = liege } + } + #Broker access to the halls of power in exchange for $$$ + option = { + name = ep3_governor_yearly.3090.a + flavor = ep3_governor_yearly.3090.a.flavor + add_gold = major_gold_value + change_influence = miniscule_influence_loss + + stress_impact = { + generous = medium_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = compassionate + has_trait = generous + short_term_gold < minor_gold_value + } + } + } + } + + + #Expand your local investments + option = { + name = ep3_governor_yearly.3090.b + if = { + limit = { + NOT = { + house = { + has_house_modifier = ep3_invested_in_power_center_modifier + } + } + } + house = { + add_house_modifier = { + modifier = ep3_invested_in_power_center_modifier + years = 50 + } + } + increase_governance_effect = { VALUE = 5 } + } + else_if = { + limit = { + OR = { + is_landless_ruler = yes + domicile.domicile_location = root.capital_province + } + NOT = { + has_character_modifier = ep3_cosmopolitan_domicile_modifier + } + } + add_character_modifier = { + modifier = ep3_cosmopolitan_domicile_modifier + years = 10 + } + } + else_if = { + limit = { + is_landed = yes + } + increase_governance_effect = { VALUE = 10 } + capital_county = { + change_development_progress = minor_development_progress_gain + } + } + else = { + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + remove_short_term_gold = minor_gold_value + + stress_impact = { + impatient = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = impatient + short_term_gold < minor_gold_value + } + } + } + } + + #Host a dinner with some influential persons + option = { + name = ep3_governor_yearly.3090.c + flavor = ep3_governor_yearly.3090.c.flavor + #Add opinion with local lords and landless admin + change_influence = medium_influence_gain + if = { + limit = { + is_landed = yes + } + scope:liege = { + every_vassal = { + custom = custom.every_realm_vassal_local_estate + limit = { + domicile.domicile_location ?= { + county = { + holder = { + OR = { + this = root + liege = root + } + } + } + } + this != root + } + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 10 + } + } + } + every_vassal = { + custom = custom.every_vassal + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 10 + } + + } + } + else = { + scope:liege = { + every_vassal = { + custom = custom.every_vassal_same_domicile_location + limit = { + domicile.domicile_location ?= scope:root_capital + this != root + } + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 10 + } + } + } + if = { + limit = { scope:root_capital.county.holder = root.top_liege } + scope:liege = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + if = { + limit = { + scope:liege = { + any_close_family_member = { + is_adult = yes + location = scope:root_capital + this != root + } + } + } + scope:liege = { + random_close_family_member = { + limit = { + is_adult = yes + location = scope:root_capital + this != root + } + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + } + if = { + limit = { + scope:liege = { + any_councillor = { + is_adult = yes + location = scope:root_capital + this != root + } + } + } + scope:liege = { + random_councillor = { + limit = { + is_adult = yes + location = scope:root_capital + this != root + } + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 10 + } + } + } + } + } + stress_impact = { + shy = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = temperate + } + } + } + } +} + +##################################### +# Our Empire, Pandemonium # +# by Jason Cantalini # +# 3100 # +##################################### + +scripted_trigger ep3_governor_yearly_3100_messenger_trigger = { + is_alive = yes + is_adult = yes + age <= 55 + is_travelling = no + is_in_army = no + is_imprisoned = no + has_contagious_deadly_disease_trigger = no + is_incapable = no + is_foreign_court_guest = no + trigger_if = { + limit = { + exists = scope:liege_temp + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:liege_temp } + NOR = { + is_primary_heir_of = scope:liege_temp + is_player_heir_of = scope:liege_temp + is_close_family_of = scope:liege_temp + is_spouse_of = scope:liege_temp + } + } + trigger_else = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:liege } + NOR = { + is_primary_heir_of = scope:liege + is_player_heir_of = scope:liege + is_close_family_of = scope:liege + is_spouse_of = scope:liege + } + } + +} + +scripted_trigger ep3_governor_yearly_3100_crappy_liege_trigger = { + #Liege sucks + liege = { + has_active_diarchy = no + OR = { + #Bad governor (won't work on emperors) + governor_efficiency <= 0.6 + #Generally shite + AND = { + diplomacy <= low_skill_rating + martial <= low_skill_rating + stewardship <= low_skill_rating + intrigue <= low_skill_rating + learning <= low_skill_rating + } + + } + } +} + +#Liege is in debt / region or empire is poorly governed +ep3_governor_yearly.3100 = { + type = character_event + title = ep3_governor_yearly.3100.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + liege = { + gold <= -50 + } + ep3_governor_yearly_3100_crappy_liege_trigger = yes + } + } + desc = ep3_governor_yearly.3100.intro_liege + } + desc = ep3_governor_yearly.3100.intro_governors + } + desc = ep3_governor_yearly.3100.desc + first_valid = { + triggered_desc = { + trigger = { + liege = { + gold <= -50 + } + } + desc = ep3_governor_yearly.3100.desc_liege_debt + } + triggered_desc = { + trigger = { + ep3_governor_yearly_3100_crappy_liege_trigger = yes + } + desc = ep3_governor_yearly.3100.desc_liege_skill + } + desc = ep3_governor_yearly.3100.desc_governors + } + } + + theme = administrative + + left_portrait = { + character = root + animation = war_defender + } + right_portrait = { + character = scope:messenger + animation = obsequious_bow + } + lower_right_portrait = scope:liege + + trigger = { + NOT = { + has_government = celestial_government + } + age >= 12 + top_liege != this + government_allows = administrative + OR = { + is_landed = yes + is_landless_administrative = yes + } + has_ep3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_at_war = no + OR = { + #liege is in debt + liege = { + gold <= -50 + } + ep3_governor_yearly_3100_crappy_liege_trigger = yes + #Governors of empire suck + liege = { + any_vassal = { + government_allows = administrative + is_landed = yes + add_to_temporary_list = admin_vassals + } + any_in_list = { + list = admin_vassals + percent >= 0.5 + governor_efficiency <= 0.8 + } + } + } + liege = { + save_temporary_scope_as = liege_temp + OR = { + any_courtier = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + any_pool_guest = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + } + } + governor_efficiency > 0.75 + } + + cooldown = { + years = 10 + } + immediate = { + if = { + limit = { + is_landed = yes + } + capital_province = { + save_scope_as = root_capital + } + } + else = { + domicile = { + domicile_location = { + save_scope_as = root_capital + } + } + } + liege = { + save_scope_as = liege + assign_quirk_effect = yes + } + #Save random courtier to be messenger + scope:liege = { + if = { + limit = { + any_courtier = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + } + random_courtier = { + limit = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + save_scope_as = messenger + } + } + else = { + random_pool_guest = { + limit = { + ep3_governor_yearly_3100_messenger_trigger = yes + } + save_scope_as = messenger + } + } + } + + #Choose negative trait that might be gained + random_list = { + 5 = { + trigger = { + NOR = { + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = ambitious + has_trait = diligent + } + OR = { + ai_energy <= low_negative_ai_value + ai_compassion >= low_positive_ai_value + } + } + add_character_flag = { + flag = ep3_governor_yearly_3100_depressed + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = reclusive + has_trait = gregarious + } + ai_sociability <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_reclusive + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = irritable + has_trait = calm + } + ai_vengefulness >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_irritable + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = drunkard + has_trait = temperate + AND = { + faith_forbids_alcohol_trigger = yes + has_trait = zealous + } + } + ai_energy <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_drunkard + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = hashishiyah + has_trait = temperate + } + ai_energy <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_hashishiyah + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = comfort_eater + has_trait = temperate + } + ai_greed >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_comfort_eater + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = contrite + has_trait = arrogant + has_trait = vengeful + has_trait = sadistic + has_trait = callous + } + ai_compassion >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_contrite + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = improvident + has_trait = greedy + has_trait = sadistic + has_trait = callous + } + ai_greed <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_improvident + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = rakish + has_trait = chaste + has_trait = celibate + has_sexuality = asexual + } + is_adult = yes + ai_sociability >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_rakish + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = profligate + has_trait = temperate + has_trait = diligent + } + ai_rationality <= low_negative_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_profligate + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = flagellant + has_trait = cynical + } + ai_zeal >= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_flagellant + days = 20 + } + } + 5 = { + trigger = { + NOR = { + has_trait = gluttonous + has_trait = inappetetic + } + ai_greed <= low_positive_ai_value + } + add_character_flag = { + flag = ep3_governor_yearly_3100_inappetetic + days = 20 + } + } + } + save_scope_as = root_scope + } + #My example should be followed more closely + option = { + name = ep3_governor_yearly.3100.a + trigger = { + governor_efficiency >= 1.25 + } + reason = governor_efficiency + change_influence = major_influence_gain + add_prestige = medium_prestige_gain + + custom_tooltip = ep3_following_governorship_example_tooltip + if = { + limit = { + OR = { + scope:liege = { + gold <= -50 + } + ep3_governor_yearly_3100_crappy_liege_trigger = yes + } + is_ai = no + } + scope:liege = { + increase_governance_effect = { VALUE = 20 } + } + } + else_if = { + limit = { + OR = { + scope:liege = { + gold <= -50 + } + ep3_governor_yearly_3100_crappy_liege_trigger = yes + } + } + scope:liege = { + increase_governance_effect = { VALUE = 10 } + } + } + else_if = { + limit = { + is_ai = no + } + hidden_effect = { + scope:liege = { + every_vassal = { + increase_governance_effect = { VALUE = 10 } + } + } + } + } + else = { + hidden_effect = { + scope:liege = { + every_vassal = { + increase_governance_effect = { VALUE = 5 } + } + } + } + } + stress_impact = { + base = major_stress_impact_gain + diligent = major_stress_impact_loss + just = minor_stress_impact_loss + administrator = minor_stress_impact_loss + loyal = miniscule_stress_impact_loss + lazy = major_stress_impact_gain + content = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 1 + } + modifier = { + add = -100 + stress_level >= 1 + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = content + has_trait = arbitrary + stress_level >= 2 + } + } + } + } + #Urge the Emperor to amend this state of affairs + option = { + name = ep3_governor_yearly.3100.b + duel = { + skill = diplomacy + value = medium_skill_rating + 55 = { #The emperor is impressed by your conviction + desc = ep3_governor_yearly.3100.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -54 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.3100.b.success + left_icon = scope:liege + change_influence = minor_influence_gain + scope:liege = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + } + } + 45 = { #The emperor is offended + desc = ep3_governor_yearly.3100.b.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -44 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.3100.b.fail + left_icon = scope:liege + scope:liege = { + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -30 + } + } + } + } + } + hidden_effect = { + if = { + limit = { + ep3_governor_yearly_3100_crappy_liege_trigger = yes + top_liege = this + + } + scope:liege = { + send_interface_message = { + type = msg_governor_upset_about_skill + title = msg_governor_upset_about_skill.t + desc = msg_governor_upset_about_skill.desc + right_icon = scope:root_scope + + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:root_scope + opinion = -10 + } + } + } + } + else_if = { + limit = { + ep3_governor_yearly_3100_crappy_liege_trigger = yes + top_liege != this + + } + scope:liege = { + send_interface_message = { + type = msg_governor_upset_about_governance + title = msg_governor_upset_about_governance.t + desc = msg_governor_upset_about_governance.desc + right_icon = scope:root_scope + + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:root_scope + opinion = -10 + } + } + } + } + else_if = { + limit = { + liege = { + gold <= -50 + } + } + scope:liege = { + send_interface_message = { + type = msg_governor_upset_about_insolvency + title = msg_governor_upset_about_insolvency.t + desc = msg_governor_upset_about_insolvency.desc + right_icon = scope:root_scope + + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:root_scope + opinion = -15 + } + } + } + } + else = { + scope:liege = { + send_interface_message = { + type = msg_governor_upset_about_bad_govs + title = msg_governor_upset_about_bad_govs.t + desc = msg_governor_upset_about_bad_govs.desc + right_icon = scope:root_scope + + reverse_add_opinion = { + modifier = frustrated_opinion + target = scope:root_scope + opinion = -10 + } + } + } + } + } + stress_impact = { + stubborn = miniscule_stress_impact_loss + shy = miniscule_stress_impact_gain + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_sociability = 1 + } + + modifier = { + add = 50 + diplomacy >= very_high_skill_rating + } + modifier = { + add = -50 + has_trait = shy + } + modifier = { + add = -50 + diplomacy <= decent_skill_rating + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = humble + diplomacy < average_skill_rating + } + } + } + } + #Things are bad... I need to grab stuff for myself + option = { + name = ep3_governor_yearly.3100.c + flavor = ep3_governor_yearly.3100.c.flavor + if = { + limit = { + is_landed = yes + } + add_gold = medium_gold_value + capital_county = { + change_development_progress = medium_development_progress_loss + } + add_prestige = medium_prestige_loss + } + else = { + add_gold = minor_gold_value + add_prestige = medium_prestige_loss + } + stress_impact = { + greedy = miniscule_stress_impact_loss + just = medium_stress_impact_gain + generous = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = -100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + + modifier = { + add = -50 + prestige < major_prestige_value + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = generous + has_trait = honest + prestige < medium_prestige_value + } + } + } + } + #God, I can't think about this miserable state of affairs... + option = { + name = ep3_governor_yearly.3100.d + flavor = ep3_governor_yearly.3100.d.flavor + #Reduce governor efficiency + add_character_modifier = { + modifier = ep3_ignoring_realm_decline_modifier + years = 10 + desc = ep3_ignoring_realm_decline_tooltip + } + custom_tooltip = ep3_ignoring_realm_decline_years_tooltip + random_list = { + 45 = { + add_stress = minor_stress_impact_loss + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_reclusive + + } + add_trait = reclusive + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_irritable + } + add_trait = irritable + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_drunkard + } + add_trait = drunkard + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_hashishiyah + } + add_trait = hashishiyah + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_comfort_eater + } + add_trait = comfort_eater + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_flagellant + } + add_trait = flagellant + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_contrite + } + add_trait = contrite + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_improvident + } + add_trait = improvident + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_rakish + } + add_trait = rakish + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_hashishiyah + } + add_trait = hashishiyah + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_profligate + } + add_trait = profligate + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_inappetetic + } + add_trait = inappetetic + } + 5 = { + trigger = { + has_character_flag = ep3_governor_yearly_3100_depressed + } + add_trait = depressed_1 + } + } + stress_impact = { + lazy = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + depressed_1 = miniscule_stress_impact_loss + depressed_genetic = miniscule_stress_impact_loss + diligent = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + + modifier = { + add = -50 + prestige < major_prestige_value + } + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = ambitious + has_trait = stubborn + prestige < medium_prestige_value + } + } + } + } +} + diff --git a/N3OW/events/dlc/ep3/ep3_governor_yearly_8.txt b/N3OW/events/dlc/ep3/ep3_governor_yearly_8.txt new file mode 100644 index 00000000..6c638bcb --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_governor_yearly_8.txt @@ -0,0 +1,4489 @@ +namespace = ep3_governor_yearly + +################################################## +# EP3 Governor Events +# by Joe Parkin + +scripted_trigger ep3_governor_involved_with_root_or_liege_trigger = { + OR = { + trigger_if = { + limit = { exists = house } + OR = { + root.house ?= house + root.top_liege.house ?= house + } + } + is_close_family_of = root + is_close_family_of = root.top_liege + is_consort_of = root + is_consort_of = root.top_liege + has_any_scripted_relation = root + has_any_scripted_relation = root.top_liege + } +} + +##################################### +# Scratching Backs # +# by Joe Parkin # +# 8010 # +##################################### + +scripted_trigger ep3_governor_8010_governor_trigger = { + this != root + is_available_adult = yes + is_governor = yes + is_ai = yes + ep3_governor_involved_with_root_or_liege_trigger = no + NOR = { + house_has_feud_relation_with_trigger = { TARGET = root } + has_trait = content + has_trait = honest + has_trait = humble + } +} + +scripted_effect ep3_governor_8010_offer_demand_effect = { + switch = { + trigger = $FLAG_SCOPE$ + flag:hook = { + $RECEIVER$ = { + add_hook = { + target = $GIVER$ + type = obligation_hook + } + } + } + flag:candidacy = { + $TITLE$ = { + change_appointment_investment = { + target = $TITLE_RECEIVER$ + value = appointment_score_minor_value + } + } + } + flag:influence = { + $RECEIVER$ = { change_influence = medium_influence_gain } + } + flag:gold = { + $GIVER$ = { + pay_short_term_gold = { + gold = medium_gold_value + target = $RECEIVER$ + } + } + } + } +} + +ep3_governor_yearly.8010 = { + type = letter_event + opening = ep3_governor_yearly.8010.opening + desc = { + desc = ep3_governor_yearly.8010.desc + first_valid = { + triggered_desc = { + trigger = { scope:governor_request = flag:hook } + desc = ep3_governor_yearly.8010.hook + } + triggered_desc = { + trigger = { scope:governor_request = flag:candidacy } + desc = ep3_governor_yearly.8010.candidacy + } + triggered_desc = { + trigger = { scope:governor_request = flag:influence } + desc = ep3_governor_yearly.8010.influence + } + desc = ep3_governor_yearly.8010.gold + } + desc = ep3_governor_yearly.8010.end + } + sender = { + character = scope:governor + animation = schadenfreude + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + top_liege = { + any_vassal = { ep3_governor_8010_governor_trigger = yes } + } + } + + immediate = { + top_liege = { + random_vassal = { + limit = { + ep3_governor_8010_governor_trigger = yes + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = deceitful + } + any_neighboring_realm_same_rank_owner = { this = root } + } + alternative_limit = { + ep3_governor_8010_governor_trigger = yes + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = deceitful + } + } + alternative_limit = { ep3_governor_8010_governor_trigger = yes } + weight = { + base = 100 + modifier = { add = ai_energy } + modifier = { add = ai_boldness } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = governor + ordered_heir_title = { + limit = { + has_order_of_succession = appointment + tier >= tier_duchy + } + order_by = "place_in_line_of_succession(root)" + save_scope_as = their_title + } + save_scope_as = their_title_receiver + if = { + limit = { + NOR = { + exists = scope:their_title + primary_heir ?= root.top_liege + } + } + primary_heir ?= { + ordered_heir_title = { + limit = { + has_order_of_succession = appointment + tier >= tier_duchy + } + order_by = "place_in_line_of_succession(scope:governor.primary_heir)" + save_scope_as = their_title + } + save_scope_as = their_title_receiver + } + } + if = { + limit = { + NOT = { exists = scope:their_title } + } + top_liege.primary_title = { save_scope_as = their_title } + } + if = { + limit = { + NOT = { exists = scope:title_receiver } + } + save_scope_as = title_receiver + } + } + } + ordered_heir_title = { + limit = { + has_order_of_succession = appointment + tier >= tier_duchy + } + order_by = "place_in_line_of_succession(root)" + save_scope_as = title + } + save_scope_as = title_receiver + if = { + limit = { + NOR = { + exists = scope:title + primary_heir ?= root.top_liege + } + } + primary_heir ?= { + ordered_heir_title = { + limit = { + has_order_of_succession = appointment + tier >= tier_duchy + } + order_by = "place_in_line_of_succession(root.primary_heir)" + save_scope_as = title + } + save_scope_as = title_receiver + } + } + if = { + limit = { + NOT = { exists = scope:title } + } + top_liege.primary_title = { save_scope_as = title } + } + if = { + limit = { + NOT = { exists = scope:title_receiver } + } + save_scope_as = title_receiver + } + hidden_effect = { + random_list = { + 10 = { + trigger = { + NOT = { + scope:governor = { has_hook = root } + } + } + modifier = { add = scope:governor.intrigue } + save_scope_value_as = { + name = governor_request + value = flag:hook + } + } + 10 = { + trigger = { + exists = scope:their_title + exists = scope:their_title_receiver + scope:their_title = { has_order_of_succession = appointment } + } + modifier = { + add = 10 + scope:governor = { has_trait = ambitious } + } + modifier = { + add = 10 + scope:governor = { has_claim_on = root.top_liege.primary_title } + } + save_scope_value_as = { + name = governor_request + value = flag:candidacy + } + } + 10 = { + save_scope_value_as = { + name = governor_request + value = flag:influence + } + } + 10 = { + trigger = { root.gold > root.major_gold_value } + modifier = { + add = { + value = scope:governor.ai_greed + multiply = 0.25 + } + } + save_scope_value_as = { + name = governor_request + value = flag:gold + } + } + } + random_list = { + 5 = { + trigger = { + NOR = { + scope:governor_request ?= flag:hook + has_hook = scope:governor + } + } + modifier = { add = scope:governor.intrigue } + save_scope_value_as = { + name = governor_offer + value = flag:hook + } + } + 10 = { + trigger = { + NOT = { scope:governor_request ?= flag:candidacy } + exists = scope:title + exists = scope:title_receiver + scope:their_title = { has_order_of_succession = appointment } + } + modifier = { + add = 10 + has_trait = ambitious + } + modifier = { + add = 10 + has_claim_on = root.top_liege.primary_title + } + save_scope_value_as = { + name = governor_offer + value = flag:candidacy + } + } + 10 = { + trigger = { + NOT = { scope:governor_request ?= flag:influence } + } + save_scope_value_as = { + name = governor_offer + value = flag:influence + } + } + 10 = { + trigger = { + NOT = { scope:governor_request ?= flag:gold } + scope:governor.gold > scope:governor.major_gold_value + } + modifier = { + gold < minor_gold_value + add = 10 + } + modifier = { + gold < 0 + add = 10 + } + save_scope_value_as = { + name = governor_offer + value = flag:gold + } + } + } + } + } + + option = { # Accept + name = ep3_governor_yearly.8010.a + ep3_governor_8010_offer_demand_effect = { + FLAG_SCOPE = scope:governor_offer + GIVER = scope:governor + RECEIVER = root + TITLE = scope:title + TITLE_RECEIVER = scope:title_receiver + } + ep3_governor_8010_offer_demand_effect = { + FLAG_SCOPE = scope:governor_request + GIVER = root + RECEIVER = scope:governor + TITLE = scope:their_title + TITLE_RECEIVER = scope:their_title_receiver + } + reverse_add_opinion = { + target = scope:governor + modifier = pleased_opinion + opinion = 10 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 2 + ai_boldness = 1 + ai_honor = -2 + ai_energy = 1 + } + } + } + + option = { # Reverse + name = ep3_governor_yearly.8010.b + duel = { + skills = { intrigue diplomacy } + target = scope:governor + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8010.b.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8010.b.success + right_icon = scope:governor + ep3_governor_8010_offer_demand_effect = { + FLAG_SCOPE = scope:governor_offer + GIVER = root + RECEIVER = scope:governor + TITLE = scope:their_title + TITLE_RECEIVER = scope:their_title_receiver + } + ep3_governor_8010_offer_demand_effect = { + FLAG_SCOPE = scope:governor_request + GIVER = scope:governor + RECEIVER = root + TITLE = scope:title + TITLE_RECEIVER = scope:title_receiver + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8010.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8010.b.failure + right_icon = scope:governor + reverse_add_opinion = { + target = scope:governor + modifier = annoyed_opinion + opinion = -15 + } + } + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + } + } + + option = { # Refuse + name = ep3_governor_yearly.8010.c + reverse_add_opinion = { + target = scope:governor + modifier = disappointed_opinion + opinion = -10 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +##################################### +# Provincial Leverage # +# by Joe Parkin # +# 8020 # +##################################### + +scripted_trigger ep3_governor_8020_estate_holder_trigger = { + this != root + is_ai = yes + domicile ?= { + is_domicile_type = estate + OR = { + domicile_location.county.holder ?= root + domicile_location.county.holder.liege ?= root + domicile_location.county.holder.liege.liege ?= root + } + num_domicile_buildings >= 3 + } + is_available_adult = yes + ep3_governor_involved_with_root_or_liege_trigger = no +} + +scripted_effect ep3_governor_8020_fail_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8020.failure + right_icon = scope:estate_owner + + scope:estate_owner = { save_scope_as = recipient } # For loc reasons + custom_tooltip = { + text = raid_estate_destroy_buildings_tt + scope:other_estate = { + destroy_random_estate_building_variable_effect = yes + destroy_random_estate_building_effect = yes + } + } + } +} + +ep3_governor_yearly.8020 = { + type = character_event + title = ep3_governor_yearly.8020.t + desc = { + desc = ep3_governor_yearly.8020.desc + } + theme = administrative + override_background = { reference = estate } + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:estate_owner + animation = disapproval + } + + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + domicile ?= { is_domicile_type = estate } + top_liege = { + any_vassal_or_below = { ep3_governor_8020_estate_holder_trigger = yes } + } + } + + immediate = { + domicile = { save_scope_as = my_estate } + top_liege = { + random_vassal_or_below = { + limit = { ep3_governor_8020_estate_holder_trigger = yes } + save_scope_as = estate_owner + domicile = { save_scope_as = other_estate } + } + } + } + + option = { # Extort + name = ep3_governor_yearly.8020.a + flavor = ep3_governor_yearly.8020.reason + reverse_add_opinion = { + target = scope:estate_owner + modifier = extorted_me_opinion + opinion = -20 + } + save_scope_value_as = { + name = extort_chance + value = { + value = 0 + add = { + value = scope:estate_owner.ai_greed + multiply = 0.25 + } + } + } + save_scope_value_as = { + name = gold_value + value = { + value = 0 + add = { + value = scope:estate_owner.minor_gold_value + multiply = root.stewardship + divide = 2 + } + } + } + save_scope_as = extorted + duel = { + skill = stewardship + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + modifier = { add = scope:extort_chance } + modifier = { + scope:estate_owner.short_term_gold < scope:gold_value + factor = 0.1 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8020.success + right_icon = scope:estate_owner + scope:estate_owner = { + pay_short_term_gold = { + target = root + gold = scope:gold_value + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + ep3_governor_8020_fail_effect = yes + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -2 + ai_energy = 1 + } + } + } + + option = { # Favor + name = ep3_governor_yearly.8020.b + flavor = ep3_governor_yearly.8020.reason + reverse_add_opinion = { + target = scope:estate_owner + modifier = extorted_me_opinion + opinion = -20 + } + save_scope_as = extorted + save_scope_value_as = { + name = extort_chance + value = { + value = 50 + add = { + value = scope:estate_owner.ai_honor + multiply = 0.25 + } + max = 75 + min = 25 + } + } + duel = { + skill = intrigue + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + modifier = { add = scope:extort_chance } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8020.success + right_icon = scope:estate_owner + add_hook = { + target = scope:estate_owner + type = obligation_hook + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + ep3_governor_8020_fail_effect = yes + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_honor = -1 + } + } + } + + option = { # Good word + name = ep3_governor_yearly.8020.c + flavor = ep3_governor_yearly.8020.reason + reverse_add_opinion = { + target = scope:estate_owner + modifier = extorted_me_opinion + opinion = -20 + } + save_scope_as = extorted + save_scope_value_as = { + name = extort_chance + value = { + value = 50 + add = { + value = scope:estate_owner.ai_energy + multiply = 0.25 + } + max = 75 + min = 25 + } + } + save_scope_value_as = { + name = influence_value + value = { + value = minor_influence_gain + multiply = diplomacy + divide = 2 + } + } + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + modifier = { add = scope:extort_chance } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8020.success + right_icon = scope:estate_owner + change_influence = scope:influence_value + scope:estate_owner = { change_influence = minor_influence_loss } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + ep3_governor_8020_fail_effect = yes + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + ai_honor = 1 + } + } + } + + option = { # Friendly + name = ep3_governor_yearly.8020.d + reverse_add_opinion = { + target = scope:estate_owner + modifier = friendliness_opinion + opinion = 15 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +##################################### +# Accidental Grace # +# by Joe Parkin # +# 8030 # +##################################### + +scripted_trigger ep3_governor_yearly_8030_informer_trigger = { + is_available_adult = yes + OR = { + is_courtier = yes + AND = { + highest_held_title_tier = tier_barony + has_government = republic_government + } + } + ep3_governor_involved_with_root_or_liege_trigger = no +} + +ep3_governor_yearly.8030 = { + type = character_event + title = ep3_governor_yearly.8030.t + desc = { + desc = ep3_governor_yearly.8030.desc + random_valid = { + triggered_desc = { + trigger = { + scope:estate = { + OR = { + has_domicile_building_or_higher = barracks_01 + has_domicile_building_or_higher = watchtower_01 + has_domicile_building_or_higher = guardhouse_01 + } + } + } + desc = ep3_governor_yearly.8030.martial + } + triggered_desc = { + trigger = { + scope:estate = { + OR = { + has_domicile_building_or_higher = garden_01 + has_domicile_building_or_higher = grazing_land_01 + has_domicile_building_or_higher = grain_field_01 + has_domicile_building_or_higher = vineyard_01 + has_domicile_building_or_higher = olive_01 + } + } + } + desc = ep3_governor_yearly.8030.agriculture + } + triggered_desc = { + trigger = { + scope:estate = { + OR = { + has_domicile_building_or_higher = market_01 + has_domicile_building_or_higher = workshop_01 + has_domicile_building_or_higher = guardhouse_01 + } + } + } + desc = ep3_governor_yearly.8030.commerce + } + desc = ep3_governor_yearly.8030.fallback + } + } + theme = administrative + override_background = { reference = estate } + left_portrait = { + character = root + animation = admiration + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + domicile ?= { + is_domicile_type = estate + num_domicile_buildings >= 3 + domicile_location.county = { + OR = { + holder = root + holder = { is_vassal_of = root } + } + } + } + NOT = { + any_sub_realm_county = { + OR = { + has_county_modifier = ep3_governor_yearly_8030_stifled_modifier + has_county_modifier = ep3_governor_yearly_8030_benign_modifier + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = governor_efficiency + divide = 100 + } + } + } + + immediate = { + domicile = { save_scope_as = estate } + } + + option = { # Tax it + name = ep3_governor_yearly.8030.a + add_treasury_or_gold = medium_treasury_or_gold_value + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 0.5 + } + } + } + + option = { # Encourage it + name = ep3_governor_yearly.8030.b + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_governor_yearly_8030_benign_char_modifier + years = 10 + } + scope:estate.domicile_location.county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8030_benign_modifier + years = 10 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 0.5 + } + } + } + + option = { # Leave it + name = ep3_governor_yearly.8030.c + stress_impact = { + diligent = minor_stress_impact_gain + greedy = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = -1 + } + } + } +} + +##################################### +# Dynastic Distractions # +# by Joe Parkin # +# 8040 # +##################################### + +scripted_trigger ep3_governor_yearly_8040_complainant_trigger = { + is_available_adult = yes + is_ai = yes + highest_held_title_tier <= tier_county + ep3_governor_involved_with_root_or_liege_trigger = no + capital_county.duchy = root.domicile.domicile_location.duchy +} + +ep3_governor_yearly.8040 = { + type = character_event + title = ep3_governor_yearly.8040.t + desc = ep3_governor_yearly.8040.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:complainant + animation = debating + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + domicile ?= { + is_domicile_type = estate + num_domicile_buildings >= 3 + } + any_vassal_or_below = { ep3_governor_yearly_8040_complainant_trigger = yes } + NOT = { + any_sub_realm_county = { + OR = { + has_county_modifier = ep3_governor_yearly_8030_stifled_modifier + has_county_modifier = ep3_governor_yearly_8030_benign_modifier + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = governor_efficiency + divide = 100 + multiply = -1 + } + } + } + + immediate = { + domicile = { save_scope_as = estate } + random_vassal_or_below = { + limit = { ep3_governor_yearly_8040_complainant_trigger = yes } + weight = { + base = 1 + modifier = { + add = 1 + government_has_flag = government_is_republic + } + modifier = { + add = -1 + OR = { + government_has_flag = government_is_feudal + government_has_flag = government_is_clan + } + } + modifier = { + add = -2 + government_has_flag = government_is_theocracy + } + modifier = { + add = 10 + liege ?= root + } + } + save_scope_as = complainant + } + } + + option = { # Focus on province + name = ep3_governor_yearly.8040.a + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_governor_yearly_8040_province_development_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:complainant + modifier = respect_opinion + opinion = 15 + } + stress_impact = { + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = 1 + ai_greed = -1 + } + } + } + + option = { # Focus on estate + name = ep3_governor_yearly.8040.b + add_character_modifier = { + modifier = ep3_governor_yearly_8040_domicile_development_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:complainant + modifier = annoyed_opinion + opinion = -15 + } + stress_impact = { + generous = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = 1 + ai_greed = -1 + } + } + } + + option = { # Try to do both + name = ep3_governor_yearly.8040.d + duel = { + skill = stewardship + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8040.d.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8040.d.success + add_character_modifier = { + modifier = ep3_governor_yearly_8040_across_things_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:complainant + modifier = impressed_opinion + opinion = 15 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8040.d.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8040.d.failure + add_character_modifier = { + modifier = ep3_governor_yearly_8040_overwhelmed_modifier + years = 10 + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + humble = minor_stress_impact_gain + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = -1 + } + } + } + + option = { # Defer + name = ep3_governor_yearly.8040.c + reverse_add_opinion = { + target = scope:complainant + modifier = angry_opinion + opinion = -30 + } + add_character_modifier = { + modifier = ep3_governor_yearly_8040_shirker_modifier + years = 5 + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + ai_honor = -0.5 + } + } + } +} + +##################################### +# Enemy at the Gates # +# by Joe Parkin # +# 8050 # +##################################### + +scripted_trigger ep3_governor_8050_war_trigger = { + primary_defender = root.top_liege + casus_belli = { + any_target_title = { is_de_jure_liege_or_above_target = root.primary_title } + } + NOT = { + any_war_participant = { this = root } + } +} + +ep3_governor_yearly.8050 = { + type = character_event + title = ep3_governor_yearly.8050.t + desc = { + desc = ep3_governor_yearly.8050.desc + first_valid = { + triggered_desc = { + trigger = { always = yes } + desc = ep3_governor_yearly.8050.kingdom + } + desc = ep3_governor_yearly.8050.neighbour + } + desc = ep3_governor_yearly.8050.end + } + theme = administrative + override_background = { reference = ep3_city_gate } + left_portrait = { + character = root + animation = worry + } + lower_left_portrait = scope:war_liege + lower_right_portrait = scope:war_attacker + + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + government_has_flag = government_is_administrative + is_available_adult = yes + is_governor = yes + top_liege = { + is_at_war = yes + any_character_war = { ep3_governor_8050_war_trigger = yes } + } + NOT = { + is_at_war_with = top_liege + } + } + + immediate = { + top_liege = { + save_scope_as = war_liege + random_character_war = { + limit = { ep3_governor_8050_war_trigger = yes } + save_scope_as = war + primary_attacker = { save_scope_as = war_attacker } + casus_belli = { + ordered_target_title = { + limit = { is_de_jure_liege_or_above_target = root.primary_title } + order_by = tier + save_scope_as = target_title + } + } + } + } + } + + option = { # Send soldiers + name = ep3_governor_yearly.8050.a + scope:war = { add_defender = root } + top_liege.primary_title = { + change_appointment_investment = { + target = root + value = appointment_score_minor_value + } + } + add_character_modifier = { + modifier = ep3_governor_yearly_8050_imperial_recruiter_modifier + years = 10 + } + stress_impact = { + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { # Request reinforcements + name = ep3_governor_yearly.8050.b + add_character_modifier = { + modifier = ep3_governor_yearly_8050_imperial_fortification_modifier + years = 10 + } + stress_impact = { + brave = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 1 + ai_boldness = -1 + ai_greed = -1 + } + } + } + + option = { # Request gold + name = ep3_governor_yearly.8050.c + add_treasury_or_gold = top_liege.medium_treasury_or_gold_value + change_influence = medium_influence_loss + add_character_modifier = { + modifier = ep3_governor_yearly_8050_imperial_resources_modifier + years = 10 + } + stress_impact = { + generous = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + } + } + + option = { # Nothing + name = ep3_governor_yearly.8050.d + stress_impact = { + greedy = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 1 + } + } + } +} + +##################################### +# Provincial Rackets # +# by Joe Parkin # +# 8060 # +##################################### + +scripted_trigger ep3_governor_yearly_8060_complainant_trigger = { + is_available_adult = yes + OR = { + is_courtier = yes + AND = { + highest_held_title_tier = tier_barony + has_government = republic_government + } + } + ep3_governor_involved_with_root_or_liege_trigger = no +} + +scripted_effect ep3_governor_yearly_8060_success_effect = { + add_short_term_gold = scope:gold + custom_tooltip = { + text = ep3_governor_yearly.8060.efficiency_tt + add_character_flag = { + flag = ep3_8060_efficiency_drop + years = 10 + } + } +} + +ep3_governor_yearly.8060 = { + type = character_event + title = ep3_governor_yearly.8060.t + desc = ep3_governor_yearly.8060.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = steward + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + OR = { + any_vassal_or_below = { ep3_governor_yearly_8060_complainant_trigger = yes } + any_courtier = { ep3_governor_yearly_8060_complainant_trigger = yes } + } + } + + option = { # Take gold + name = ep3_governor_yearly.8060.a + save_scope_as = intrigue + save_scope_value_as = { + name = gold + value = { + value = minor_gold_value + multiply = { + value = intrigue + divide = 3 + } + add = { 1 2 } + min = 50 + } + } + duel = { + skill = intrigue + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8060.a.success + show_as_tooltip = { ep3_governor_yearly_8060_success_effect = yes } + trigger_event = { + id = ep3_governor_yearly.8061 + days = 5 + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8060.a.failure + custom_tooltip = ep3_governor_yearly.8060.a.failure_tt + trigger_event = { + id = ep3_governor_yearly.8062 + days = 5 + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Cook books + name = ep3_governor_yearly.8060.b + save_scope_as = stewardship + save_scope_value_as = { + name = gold + value = { + value = tiny_gold_value + multiply = { + value = stewardship + divide = 3 + } + add = { 1 2 } + min = 25 + } + } + duel = { + skill = stewardship + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8060.a.success + show_as_tooltip = { ep3_governor_yearly_8060_success_effect = yes } + trigger_event = { + id = ep3_governor_yearly.8061 + days = 5 + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8060.a.failure + custom_tooltip = ep3_governor_yearly.8060.a.failure_tt + trigger_event = { + id = ep3_governor_yearly.8062 + days = 5 + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 0.5 + } + } + } + + option = { # Bolster treasury + name = ep3_governor_yearly.8060.c + remove_short_term_gold = medium_gold_value + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_bolstered_governor_treasury_modifier + years = 10 + } + stress_impact = { + arbitrary = minor_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { # Do nothing + name = ep3_governor_yearly.8060.d + stress_impact = { + fickle = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = -1 + } + } + } +} + +ep3_governor_yearly.8061 = { + hidden = yes + type = character_event + + immediate = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8060.embezzle_tt + ep3_governor_yearly_8060_success_effect = yes + } + } +} + +ep3_governor_yearly.8062 = { + type = character_event + title = ep3_governor_yearly.8060.t + desc = ep3_governor_yearly.8062.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:complainant + animation = chancellor + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + has_domicile = yes + } + + immediate = { + every_courtier = { + limit = { ep3_governor_yearly_8060_complainant_trigger = yes } + add_to_list = complainants + } + domicile = { save_scope_as = estate } + every_vassal_or_below = { + limit = { + ep3_governor_yearly_8060_complainant_trigger = yes + primary_title.title_capital_county = scope:estate.domicile_location.county + } + alternative_limit = { + ep3_governor_yearly_8060_complainant_trigger = yes + primary_title.title_capital_county.duchy = scope:estate.domicile_location.duchy + } + alternative_limit = { ep3_governor_yearly_8060_complainant_trigger = yes } + add_to_list = complainants + } + random_in_list = { + list = complainants + weight = { + base = 1 + modifier = { + add = { + value = ai_energy + multiply = 0.25 + } + } + modifier = { + add = { + value = ai_honor + multiply = 0.25 + } + } + modifier = { add = stewardship } + } + save_scope_as = complainant + } + ep3_governor_yearly_8060_success_effect = yes + } + + option = { # Convince + name = ep3_governor_yearly.8062.a + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8062.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8062.a.success + left_icon = scope:complainant + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8062.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8062.a.failure + left_icon = scope:complainant + change_influence = medium_influence_loss + reverse_add_opinion = { + target = scope:complainant + modifier = insulted_opinion + opinion = -15 + } + } + } + } + stress_impact = { + honest = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Threaten + name = ep3_governor_yearly.8062.b + random_list = { + 100 = { + modifier = { add = dread } + opinion_modifier = { + who = scope:complainant + opinion_target = root + multiplier = 0.5 + } + modifier = { + add = { + value = scope:complainant.ai_energy + min = 0 + } + } + modifier = { + add = { + value = scope:complainant.ai_boldness + min = 0 + } + } + min = 20 + desc = ep3_governor_yearly.8062.b.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8062.b.success + left_icon = scope:complainant + scope:complainant = { + add_hook = { + target = root + type = favor_hook + } + } + } + } + 100 = { + modifier = { + add = { + value = scope:complainant.ai_energy + max = 0 + } + } + modifier = { + add = { + value = scope:complainant.ai_boldness + max = 0 + } + } + min = 20 + desc = ep3_governor_yearly.8062.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8062.b.failure + left_icon = scope:complainant + change_influence = medium_influence_loss + reverse_add_opinion = { + target = scope:complainant + modifier = threatened_opinion + opinion = -15 + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # Bribe + name = ep3_governor_yearly.8062.c + random_list = { + 100 = { + modifier = { + add = { + value = scope:complainant.ai_greed + min = 0 + } + } + modifier = { + add = { + value = scope:complainant.ai_honor + max = 0 + } + } + min = 1 + desc = ep3_governor_yearly.8062.c.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8062.c.success + left_icon = scope:complainant + pay_short_term_gold = { + target = scope:complainant + gold = minor_gold_value + } + } + } + 100 = { + modifier = { + add = { + value = scope:complainant.ai_greed + max = 0 + } + } + modifier = { + add = { + value = scope:complainant.ai_honor + min = 0 + } + } + min = 1 + desc = ep3_governor_yearly.8062.c.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8062.c.failure + left_icon = scope:complainant + change_influence = medium_influence_loss + reverse_add_opinion = { + target = scope:complainant + modifier = disgusted_opinion + opinion = -15 + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + option = { # Give it back + name = ep3_governor_yearly.8062.d + remove_short_term_gold = scope:gold + reverse_add_opinion = { + target = scope:complainant + modifier = suspicious_opinion + opinion = -10 + } + stress_impact = { + greedy = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = -0.5 + ai_honor = 0.5 + } + } + } +} + +##################################### +# A Governor's Work # +# by Joe Parkin # +# 8070 # +##################################### + +ep3_governor_yearly.8070 = { + type = character_event + title = ep3_governor_yearly.8070.t + desc = ep3_governor_yearly.8070.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = boredom + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + NOT = { + has_trait = ambitious + has_trait = diligent + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = governor_efficiency + divide = 100 + multiply = -1 + } + } + } + + option = { # Work hard + name = ep3_governor_yearly.8070.a + increase_governance_effect = { VALUE = 10 } + add_stewardship_skill = 1 + stress_impact = { + base = medium_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 0.5 + } + } + } + + option = { # Find someone to help + name = ep3_governor_yearly.8070.b + remove_short_term_gold = medium_gold_value + stress_impact = { + lazy = major_stress_impact_loss + stubborn = minor_stress_impact_gain + greedy = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -1 + ai_honor = -0.5 + } + } + } + + option = { # Ignore work + name = ep3_governor_yearly.8070.c + add_character_modifier = { + modifier = ep3_governor_yearly_8070_ignore_modifier + years = 5 + } + stress_impact = { + base = medium_stress_impact_loss + lazy = massive_stress_impact_loss + diligent = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -1 + ai_honor = -0.5 + } + } + } +} + +##################################### +# Malignant Magistrate # +# by Joe Parkin # +# 8080 # +##################################### + +ep3_governor_yearly.8080 = { + type = character_event + title = ep3_governor_yearly.8080.t + desc = ep3_governor_yearly.8080.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:magistrate + animation = beg + } + + cooldown = { years = 10 } + + trigger = { + is_available_adult = yes + is_governor = yes + NOR = { + has_character_modifier = ep3_governor_yearly_8080_tense_bureaucracy_modifier + has_character_modifier = ep3_governor_yearly_8080_jumpy_bureaucracy_modifier + has_character_modifier = ep3_governor_yearly_8080_corrupt_bureaucracy_modifier + } + } + + immediate = { + create_character = { + template = ep3_magistrate_character + location = root.capital_province + culture = root.capital_county.culture + faith = root.capital_county.faith + dynasty = none + save_scope_as = magistrate + } + } + + option = { # Punish + name = ep3_governor_yearly.8080.a + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_governor_yearly_8080_tense_bureaucracy_modifier + years = 10 + } + stress_impact = { + arbitrary = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { # Execute + name = ep3_governor_yearly.8080.b + add_dread = minor_dread_gain + add_character_modifier = { + modifier = ep3_governor_yearly_8080_jumpy_bureaucracy_modifier + years = 10 + } + scope:magistrate = { + death = { + death_reason = death_execution + killer = root + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Embezzle + name = ep3_governor_yearly.8080.c + add_short_term_gold = medium_gold_value + add_character_modifier = { + modifier = ep3_governor_yearly_8080_corrupt_bureaucracy_modifier + years = 10 + } + scope:magistrate = { silent_disappearance_effect = yes } + stress_impact = { + honest = minor_stress_impact_gain + generous = minor_stress_impact_gain + diligent = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Recruit + name = ep3_governor_yearly.8080.d + add_courtier = scope:magistrate + add_hook = { + target = scope:magistrate + type = loyalty_hook + } + add_character_modifier = { + modifier = ep3_governor_yearly_8080_corrupt_bureaucracy_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:magistrate + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + } + } + } + after = { + scope:magistrate = { + silent_disappearance_ai_effect = yes + } + } +} + +##################################### +# Politics of Spite # +# by Joe Parkin # +# 8090 # +##################################### + +scripted_trigger ep3_governor_yearly_8090_title_trigger = { + OR = { + tier = tier_duchy + tier = tier_kingdom + } + save_temporary_scope_as = title_temp + any_past_holder = { + ep3_governor_yearly_8090_past_holder_trigger = { TITLE = scope:title_temp } + } +} + +scripted_trigger ep3_governor_yearly_8090_past_holder_trigger = { + house ?= { + NOR = { + $TITLE$.holder.house ?= this + $TITLE$.holder.top_liege.house ?= this + } + any_house_member = { ep3_governor_yearly_8090_house_member_trigger = yes } + } +} + +scripted_trigger ep3_governor_yearly_8090_house_member_trigger = { + is_ai = yes + is_adult = yes + is_healthy = yes + is_landed = no + any_held_title = { is_noble_family_title = yes } + ep3_governor_involved_with_root_or_liege_trigger = no +} + +ep3_governor_yearly.8090 = { + type = character_event + title = ep3_governor_yearly.8090.t + desc = ep3_governor_yearly.8090.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = worry + } + lower_right_portrait = scope:old_holder + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + any_held_title = { ep3_governor_yearly_8090_title_trigger = yes } + } + + immediate = { + ordered_held_title = { + limit = { ep3_governor_yearly_8090_title_trigger = yes } + save_scope_as = disputed_title + random_past_holder = { + limit = { + ep3_governor_yearly_8090_past_holder_trigger = { TITLE = scope:disputed_title } + } + house = { + random_house_member = { + limit = { ep3_governor_yearly_8090_house_member_trigger = yes } + save_scope_as = old_holder + } + } + } + } + } + + option = { # Antagonize + name = ep3_governor_yearly.8090.a + set_relation_rival = { + target = scope:old_holder + reason = rival_ep3_province_claim + } + duel = { + skills = { stewardship intrigue } + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8090.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8090.a.success + right_icon = scope:old_holder + scope:old_holder = { change_influence = minor_influence_loss } + primary_title = { + change_appointment_investment = { + target = scope:old_holder + value = appointment_score_medium_loss_value + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8090.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8090.a.failure + right_icon = scope:old_holder + change_influence = minor_influence_loss + primary_title = { + change_appointment_investment = { + target = scope:old_holder + value = appointment_score_medium_value + } + } + } + } + } + stress_impact = { + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # Placate + name = ep3_governor_yearly.8090.b + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + min = 5 + opinion_modifier = { + who = scope:old_holder + opinion_target = root + multiplier = 0.5 + } + change_influence = minor_influence_gain + reverse_add_opinion = { + target = scope:old_holder + modifier = friendliness_opinion + opinion = 15 + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + min = 5 + primary_title = { + change_appointment_investment = { + target = scope:old_holder + value = appointment_score_minor_value + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.5 + } + } + } + + option = { # Compensate + name = ep3_governor_yearly.8090.c + pay_short_term_gold = { + target = scope:old_holder + gold = minor_gold_value + } + random = { + chance = 25 + modifier = { + add = { + value = scope:old_holder.ai_greed + multiply = -0.5 + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_province_claim + CHARACTER = scope:old_holder + OPINION = default_rival_opinion + } + } + stress_impact = { + honest = minor_stress_impact_gain + generous = minor_stress_impact_gain + diligent = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = 0.5 + } + } + } + + option = { # Do nothing + name = ep3_governor_yearly.8090.d + primary_title = { + change_appointment_investment = { + target = scope:old_holder + value = appointment_score_minor_value + } + } + random = { + chance = 25 + modifier = { + add = { + value = scope:old_holder.ai_vengefulness + multiply = 0.5 + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_province_claim + CHARACTER = scope:old_holder + OPINION = default_rival_opinion + } + } + stress_impact = { + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +##################################### +# Nefarious Neighbor # +# by Joe Parkin # +# 8100 # +##################################### + +scripted_trigger ep3_governor_yearly_8100_governor_trigger = { + is_ai = yes + ep3_governor_involved_with_root_or_liege_trigger = no + is_available_adult = yes + is_governor = yes + highest_held_title_tier = root.highest_held_title_tier + opinion = { + target = root + value < 25 + } + any_close_family_member = { + can_appoint_for_title = root.primary_title + is_adult = yes + } +} + +ep3_governor_yearly.8100 = { + type = character_event + title = ep3_governor_yearly.8100.t + desc = ep3_governor_yearly.8100.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:target_family_member + animation = thinking + } + lower_center_portrait = scope:governor + lower_right_portrait = scope:neighboring_promoted_char + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + any_neighboring_realm_same_rank_owner = { + ep3_governor_yearly_8100_governor_trigger = yes + save_temporary_scope_as = temp_governor + any_close_family_member = { + can_appoint_for_title = root.primary_title + is_adult = yes + } + } + any_close_family_member = { + can_appoint_for_title = scope:temp_governor.primary_title + is_adult = yes + house ?= root.house + } + } + + immediate = { + random_neighboring_realm_same_rank_owner = { + limit = { ep3_governor_yearly_8100_governor_trigger = yes } + weight = { + base = 1 + modifier = { + has_relation_rival = root + add = 1 + } + modifier = { + add = { + value = "opinion(root)" + multiply = -0.25 + max = 0 + } + } + } + save_scope_as = governor + random_close_family_member = { + limit = { + can_appoint_for_title = root.primary_title + is_adult = yes + } + save_scope_as = neighboring_promoted_char + } + } + primary_title = { + change_appointment_investment = { + target = scope:neighboring_promoted_char + value = appointment_score_medium_value + } + } + random_close_family_member = { + limit = { + can_appoint_for_title = scope:governor.primary_title + is_adult = yes + house ?= root.house + } + save_scope_as = target_family_member + } + } + + option = { # Do same + name = ep3_governor_yearly.8100.a + scope:governor.primary_title = { + change_appointment_investment = { + target = scope:target_family_member + value = appointment_score_minor_value + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor + OPINION = default_rival_opinion + } + stress_impact = { + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { # Denounce + name = ep3_governor_yearly.8100.b + change_influence = minor_influence_loss + primary_title = { + change_appointment_investment = { + target = scope:neighboring_promoted_char + value = appointment_score_minor_loss_value + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor + OPINION = default_rival_opinion + } + stress_impact = { + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Governor + name = ep3_governor_yearly.8100.c + trigger = { + has_trait = governor + NOT = { + scope:governor = { has_trait = governor } + } + } + primary_title = { + change_appointment_investment = { + target = scope:neighboring_promoted_char + value = appointment_score_major_loss_value + } + } + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor + OPINION = default_rival_opinion + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Ignore + name = ep3_governor_yearly.8100.d + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } +} + +##################################### +# Pugnacious Peers # +# by Joe Parkin # +# 8110 # +##################################### + +scripted_trigger ep3_governor_yearly_8110_governor_trigger = { + is_ai = yes + ep3_governor_involved_with_root_or_liege_trigger = no + is_available_adult = yes + is_governor = yes + highest_held_title_tier = root.highest_held_title_tier +} + +scripted_trigger ep3_governor_yearly_8110_second_trigger = { + opinion = { + target = $FIRST$ + value < 50 + } + reverse_opinion = { + target = $FIRST$ + value < 50 + } + ep3_governor_involved_with_root_or_liege_trigger = no + NOR = { + this = $FIRST$ + is_close_family_of = $FIRST$ + is_consort_of = $FIRST$ + has_relation_friend = $FIRST$ + has_relation_lover = $FIRST$ + house ?= $FIRST$.house + } +} + +ep3_governor_yearly.8110 = { + type = character_event + title = ep3_governor_yearly.8110.t + desc = ep3_governor_yearly.8110.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = scheme + } + lower_center_portrait = scope:governor_1 + lower_right_portrait = scope:governor_2 + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + any_neighboring_realm_same_rank_owner = { + ep3_governor_yearly_8100_governor_trigger = yes + save_temporary_scope_as = governor_1_temp + } + any_neighboring_realm_same_rank_owner = { + ep3_governor_yearly_8100_governor_trigger = yes + ep3_governor_yearly_8110_second_trigger = { FIRST = scope:governor_1_temp } + } + } + + immediate = { + random_neighboring_realm_same_rank_owner = { + limit = { ep3_governor_yearly_8100_governor_trigger = yes } + weight = { + base = 1 + modifier = { + primary_title.kingdom = root.primary_title.kingdom + add = 1 + } + } + save_scope_as = governor_1 + } + random_neighboring_realm_same_rank_owner = { + limit = { + ep3_governor_yearly_8100_governor_trigger = yes + ep3_governor_yearly_8110_second_trigger = { FIRST = scope:governor_1 } + } + weight = { + base = 1 + modifier = { + primary_title.kingdom = root.primary_title.kingdom + add = 1 + } + } + save_scope_as = governor_2 + } + scope:governor_1 = { + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor_2 + OPINION = default_rival_opinion + } + } + } + + option = { # Try to escalate + name = ep3_governor_yearly.8110.a + change_influence = minor_influence_loss + duel = { + skill = intrigue + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8110.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8110.a.success + left_icon = scope:governor_1 + right_icon = scope:governor_2 + scope:governor_1 = { + progress_towards_rival_effect = { + REASON = rival_ep3_governor_friction + CHARACTER = scope:governor_2 + OPINION = default_rival_opinion + } + add_merit_if_relevant_effect = { + MERIT = minor_merit_loss + } + } + scope:governor_2 = { + add_merit_if_relevant_effect = { + MERIT = minor_merit_loss + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8110.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8110.a.failure + left_icon = scope:governor_1 + right_icon = scope:governor_2 + add_merit_if_relevant_effect = { + MERIT = minor_merit_loss + } + custom_tooltip = { + text = ep3_governor_yearly.8110.a.failure_tt + reverse_add_opinion = { + target = scope:governor_1 + modifier = angry_opinion + opinion = -25 + } + reverse_add_opinion = { + target = scope:governor_2 + modifier = angry_opinion + opinion = -25 + } + } + } + } + } + stress_impact = { + honest = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Side with 1 + name = ep3_governor_yearly.8110.b + reverse_add_opinion = { + target = scope:governor_1 + modifier = friendliness_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:governor_2 + modifier = unfriendly_opinion + opinion = -15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Side with 2 + name = ep3_governor_yearly.8110.c + reverse_add_opinion = { + target = scope:governor_2 + modifier = friendliness_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:governor_1 + modifier = unfriendly_opinion + opinion = -15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Call for unity + name = ep3_governor_yearly.8110.d + change_influence = minor_influence_gain + add_merit_if_relevant_effect = { + MERIT = miniscule_merit_value + } + custom_tooltip = { + text = ep3_governor_yearly.8110.d.tt + reverse_add_opinion = { + target = scope:governor_1 + modifier = annoyed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:governor_2 + modifier = annoyed_opinion + opinion = -15 + } + } + stress_impact = { + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } +} + +##################################### +# An Act of God # +# by Joe Parkin # +# 8120 # +##################################### + +scripted_trigger ep3_governor_yearly_8120_county_trigger = { + county_control >= 75 + OR = { + ep3_governor_yearly_8120_earthquake_trigger = yes + ep3_governor_yearly_8120_storm_trigger = yes + ep3_governor_yearly_8120_flood_trigger = yes + } + NOT = { + any_county_province_epidemic = {} + } +} + +scripted_trigger ep3_governor_yearly_8120_earthquake_trigger = { + any_county_province = { + geographical_region = world_asia_minor + OR = { + terrain = mountains + terrain = desert_mountains + } + } +} + +scripted_trigger ep3_governor_yearly_8120_storm_trigger = { + is_coastal_county = yes +} + +scripted_trigger ep3_governor_yearly_8120_flood_trigger = { + OR = { + is_riverside_county = yes + any_county_province = { + terrain = wetlands + OR = { + is_coastal = yes + is_riverside_province = yes + } + } + } +} + +ep3_governor_yearly.8120 = { + type = character_event + title = ep3_governor_yearly.8120.t + desc = { + desc = ep3_governor_yearly.8120.desc + first_valid = { + triggered_desc = { + trigger = { + scope:disaster_county = { is_coastal_county = yes } + } + desc = ep3_governor_yearly.8120.storm + } + desc = ep3_governor_yearly.8120.storm + } + desc = ep3_governor_yearly.8120.ending + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = worry + } + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + any_sub_realm_county = { ep3_governor_yearly_8120_county_trigger = yes } + NOR = { + has_character_modifier = ep3_governor_yearly_8120_relief_leader_modifier + has_character_modifier = ep3_governor_yearly_8120_relief_botched_modifier + any_sub_realm_county = { has_county_modifier = ep3_governor_yearly_8120_relief_aid_modifier } + } + } + + immediate = { + random_sub_realm_county = { + limit = { ep3_governor_yearly_8120_county_trigger = yes } + weight = { + base = 1 + modifier = { + holder = root + add = 1 + } + } + save_scope_as = disaster_county + change_county_control = -30 + change_development_progress_with_overflow = -50 + } + } + + option = { # Oversee recovery + name = ep3_governor_yearly.8120.a + duel = { + skill = stewardship + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + min = 3 + desc = ep3_governor_yearly.8120.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8120.a.success + right_icon = scope:disaster_county + increase_governance_effect = { VALUE = 5 } + scope:disaster_county = { + change_county_control = 20 + change_development_progress_with_overflow = 40 + } + add_character_modifier = { + modifier = ep3_governor_yearly_8120_relief_leader_modifier + years = 10 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + min = 3 + desc = ep3_governor_yearly.8120.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8120.a.failure + right_icon = scope:disaster_county + add_character_modifier = { + modifier = ep3_governor_yearly_8120_relief_botched_modifier + years = 10 + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = 1 + } + } + } + + option = { # Offer aid + name = ep3_governor_yearly.8120.b + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:disaster_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8120_relief_aid_modifier + years = 5 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + modifier = { + treasury_or_gold < medium_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Ignore + name = ep3_governor_yearly.8120.c + add_piety = minor_piety_gain + add_character_modifier = { + modifier = ep3_governor_yearly_8120_relief_rejected_modifier + years = 10 + } + stress_impact = { + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } +} + +##################################### +# Avarice and Opportunity # +# by Joe Parkin # +# 8130 # +##################################### + +ep3_governor_yearly.8130 = { + type = character_event + title = ep3_governor_yearly.8130.t + desc = { + desc = ep3_governor_yearly.8130.desc + + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = steward + } + lower_center_portrait = scope:governor_1 + lower_right_portrait = scope:governor_2 + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + gold < 0 + } + modifier = { + add = 1 + gold < minor_gold_value + } + } + + option = { # Harsh tax + name = ep3_governor_yearly.8130.a + add_character_modifier = { + modifier = ep3_governor_yearly_8130_raised_taxes_modifier + years = 5 + } + stress_impact = { + generous = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + } + } + } + + option = { # Minor tax + name = ep3_governor_yearly.8130.b + add_treasury_or_gold = minor_treasury_or_gold_value + add_character_modifier = { + modifier = ep3_governor_yearly_8130_special_levy_modifier + years = 5 + } + stress_impact = { + generous = minor_stress_impact_gain + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.5 + ai_honor = -0.5 + } + } + } + + option = { # Invest into province + name = ep3_governor_yearly.8130.c + change_influence = medium_influence_loss + increase_governance_effect = { VALUE = 5 } + add_character_modifier = { + modifier = ep3_governor_yearly_8130_raised_almonage_modifier + years = 5 + } + stress_impact = { + callous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.5 + ai_honor = -0.5 + } + } + } + + option = { # Do nothing + name = ep3_governor_yearly.8130.d + stress_impact = { + greedy = medium_stress_impact_gain + generous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_honor = 1 + } + } + } +} + +##################################### +# Checking the House # +# by Joe Parkin # +# 8140 # +##################################### + +scripted_trigger ep3_governor_8140_estate_holder_trigger = { + domicile ?= { + is_domicile_type = estate + OR = { + domicile_location.county.holder ?= root + domicile_location.county.holder.liege ?= root + domicile_location.county.holder.liege.liege ?= root + } + num_domicile_buildings >= 3 + } + this != root + is_ai = yes + is_available_adult = yes + ep3_governor_involved_with_root_or_liege_trigger = no +} + +ep3_governor_yearly.8140 = { + type = character_event + title = ep3_governor_yearly.8140.t + desc = ep3_governor_yearly.8140.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:peasant + animation = beg + } + lower_center_portrait = scope:estate_owner + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + top_liege = { + any_vassal_or_below = { ep3_governor_8140_estate_holder_trigger = yes } + } + } + + immediate = { + top_liege = { + random_vassal_or_below = { + limit = { ep3_governor_8140_estate_holder_trigger = yes } + save_scope_as = estate_owner + domicile = { + save_scope_as = estate + domicile_location.county = { save_scope_as = estate_county } + } + } + } + create_character = { + template = peasant_character + location = root.capital_province + dynasty = none + culture = scope:estate.domicile_location.county.culture + faith = scope:estate.domicile_location.county.faith + gender_female_chance = { + if = { + limit = { scope:estate_county.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:estate_county.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { add = 50 } + } + save_scope_as = peasant + } + scope:estate_county = { change_development_progress_with_overflow = -50 } + } + + option = { # Fine family + name = ep3_governor_yearly.8140.a + change_influence = minor_influence_loss + increase_governance_effect = { VALUE = 5 } + remove_treasury_or_gold = medium_treasury_or_gold_value + progress_towards_rival_effect = { + REASON = rival_family_estate_fined + CHARACTER = scope:estate_owner + OPINION = default_rival_opinion + } + stress_impact = { + arbitrary = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + modifier = { + treasury_or_gold < major_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Reason with family + name = ep3_governor_yearly.8140.b + change_influence = medium_influence_loss + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + reverse_add_opinion = { + target = scope:estate_owner + modifier = respect_opinion + opinion = 15 + } + scope:estate_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8140_negotiated_modifier + years = 10 + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + reverse_add_opinion = { + target = scope:estate_owner + modifier = contempt_opinion + opinion = -15 + } + scope:estate_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8140_ignored_modifier + years = 10 + } + } + } + } + stress_impact = { + arbitrary = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { # Side with family + name = ep3_governor_yearly.8140.c + change_influence = minor_influence_gain + progress_towards_friend_effect = { + REASON = friend_family_estate_permission + CHARACTER = scope:estate_owner + OPINION = default_friend_opinion + } + scope:estate_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8140_defended_modifier + years = 10 + } + } + stress_impact = { + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 0.5 + ai_honor = -0.5 + } + } + } + + option = { # Ignore + name = ep3_governor_yearly.8140.d + scope:estate_county = { + add_county_modifier = { + modifier = ep3_governor_yearly_8140_ignored_modifier + years = 10 + } + } + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + after = { + scope:peasant = { silent_disappearance_effect = yes } + } +} + +##################################### +# End of the Tether # +# by Joe Parkin # +# 8150 # +##################################### + +scripted_trigger ep3_governor_yearly_8150_county_trigger = { + OR = { + ep3_governor_yearly_8150_create_faction_chance_trigger = { TYPE = populist } + ep3_governor_yearly_8150_create_faction_chance_trigger = { TYPE = peasant } + } +} + +scripted_trigger ep3_governor_yearly_8150_create_faction_chance_trigger = { + county_opinion < -25 + title_create_faction_type_chance = { + type = $TYPE$_faction + target = root + value >= 10 + } +} + +scripted_trigger ep3_governor_yearly_8150_existing_faction_trigger = { + OR = { + faction_is_type = peasant_faction + faction_is_type = populist_faction + } + NOT = { has_variable = ep3_governor_yearly_8150_ignored } +} + +scripted_effect ep3_governor_yearly_8150_create_faction_effect = { + title_create_faction = { + type = $TYPE$_faction + target = root + } + add_to_list = rebel_counties + random_title_joined_faction = { + limit = { faction_is_type = $TYPE$_faction } + save_scope_as = targeting_faction + } +} + +scripted_effect ep3_governor_yearly_8150_county_modifier_effect = { + every_in_list = { + list = rebel_counties + custom = ep3_governor_yearly.8150.county_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8150_$MODIFIER$_modifier + years = 10 + } + } + hidden_effect = { + every_in_list = { + list = potential_rebel_counties + add_county_modifier = { + modifier = ep3_governor_yearly_8150_$MODIFIER$_modifier + years = 10 + } + } + } +} + +ep3_governor_yearly.8150 = { + type = character_event + title = ep3_governor_yearly.8150.t + desc = { + desc = ep3_governor_yearly.8150.desc + first_valid = { + triggered_desc = { + trigger = { + scope:targeting_faction = { faction_is_type = populist_faction } + scope:marshal.culture != scope:targeting_faction.var:faction_culture + } + desc = ep3_governor_yearly.8150.culture + } + triggered_desc = { + trigger = { + scope:targeting_faction = { faction_is_type = populist_faction } + scope:marshal.faith != scope:targeting_faction.var:faction_faith + } + desc = ep3_governor_yearly.8150.faith + } + desc = ep3_governor_yearly.8150.peasant + } + desc = ep3_governor_yearly_8150.end + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:marshal + animation = worry + } + lower_right_portrait = scope:rebel_leader + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + OR = { + any_targeting_faction = { ep3_governor_yearly_8150_existing_faction_trigger = yes } + any_held_county = { ep3_governor_yearly_8150_county_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = governor_efficiency + divide = 100 + multiply = -1 + } + } + } + + immediate = { + # A military character + cp:councillor_marshal ?= { save_scope_as = marshal } + if = { + limit = { NOT = { exists = scope:marshal } } + ordered_knight = { + order_by = age + save_scope_as = marshal + } + } + if = { + limit = { NOT = { exists = scope:marshal } } + ordered_courtier = { + limit = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + order_by = age + save_scope_as = marshal + } + } + if = { + limit = { + any_targeting_faction = { ep3_governor_yearly_8150_existing_faction_trigger = yes } + } + random_targeting_faction = { + limit = { ep3_governor_yearly_8150_existing_faction_trigger = yes } + weight = { + base = 1 + modifier = { + add = { + value = faction_discontent + multiply = 0.25 + } + } + } + save_scope_as = targeting_faction + every_faction_county_member = { add_to_list = rebel_counties } + } + } + else = { + random_held_county = { + limit = { ep3_governor_yearly_8150_county_trigger = yes } + weight = { + base = 1 + modifier = { + add = { + value = county_opinion + multiply = -1 + } + } + } + if = { + limit = { ep3_governor_yearly_8150_create_faction_chance_trigger = { TYPE = populist } } + ep3_governor_yearly_8150_create_faction_effect = { TYPE = populist } + } + else = { ep3_governor_yearly_8150_create_faction_effect = { TYPE = peasant } } + } + } + ordered_in_list = { + list = rebel_counties + order_by = { + value = 0 + subtract = county_opinion + } + save_scope_as = rebel_county + } + if = { # Error suppression + limit = { exists = scope:targeting_faction } + root = { + every_held_county = { + limit = { + NOT = { any_title_joined_faction = { this = scope:targeting_faction } } + can_title_join_faction = scope:targeting_faction + } + add_to_list = potential_rebel_counties + } + } + } + save_scope_value_as = { + name = potential_rebel_count + value = { + value = 0 + every_in_list = { + list = potential_rebel_counties + add = 1 + } + divide = 10 + ceiling = yes + } + } + } + + option = { # Placate leaders + name = ep3_governor_yearly.8150.a + remove_treasury_or_gold = minor_treasury_or_gold_value + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8150.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8150.a.success + right_icon = scope:rebel_county + increase_governance_effect = { VALUE = 5 } + ep3_governor_yearly_8150_county_modifier_effect = { MODIFIER = placated } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8150.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8150.a.failure + right_icon = scope:rebel_county + ep3_governor_yearly_8150_county_modifier_effect = { MODIFIER = insulted } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + just = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 0.5 + ai_honor = -0.5 + ai_greed = -0.5 + ai_energy = 0.5 + } + modifier = { + treasury_or_gold < medium_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Grant requests + name = ep3_governor_yearly.8150.b + remove_treasury_or_gold = medium_treasury_or_gold_value + ep3_governor_yearly_8150_county_modifier_effect = { MODIFIER = concession } + stress_impact = { + arrogant = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -0.5 + } + modifier = { + treasury_or_gold < major_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Crackdown + name = ep3_governor_yearly.8150.c + change_influence = minor_influence_gain + if = { + limit = { + scope:targeting_faction = { faction_is_type = populist_faction } + culture != scope:targeting_faction.var:faction_culture + } + culture = { + change_cultural_acceptance = { + target = scope:targeting_faction.var:faction_culture + value = medium_cultural_acceptance_loss + desc = cultural_acceptance_ep3_governor_yearly_8150_crackdown + } + } + add_character_modifier = { + modifier = ep3_governor_yearly_8150_minority_crackdown_modifier + years = 10 + } + } + else_if = { + limit = { + scope:targeting_faction = { faction_is_type = populist_faction } + faith != scope:targeting_faction.var:faction_faith + } + add_character_modifier = { + modifier = ep3_governor_yearly_8150_minority_crackdown_modifier + years = 10 + } + } + else = { + add_character_modifier = { + modifier = ep3_governor_yearly_8150_peasant_crackdown_modifier + years = 10 + } + } + reverse_add_opinion = { + target = scope:marshal + modifier = pleased_opinion + opinion = 15 + } + ep3_governor_yearly_8150_county_modifier_effect = { MODIFIER = crackdown } + scope:targeting_faction = { + add_faction_discontent = { -10 -20 } + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_boldness = 0.5 + ai_energy = 0.5 + } + } + } + + option = { # Ignore + name = ep3_governor_yearly.8150.d + scope:targeting_faction = { + add_faction_discontent = { 8 18 } + custom_tooltip = { + text = ep3_governor_yearly.8150.d.tt + set_variable = ep3_governor_yearly_8150_ignored + } + } + ordered_in_list = { + list = potential_rebel_counties + max = scope:potential_rebel_count + check_range_bounds = no + order_by = { + value = 0 + subtract = county_opinion + } + title_join_faction = scope:targeting_faction + } + stress_impact = { + diligent = medium_stress_impact_gain + craven = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } +} + +##################################### +# Equitable Access # +# by Joe Parkin # +# 8160 # +##################################### + +scripted_trigger ep3_governor_yearly_8160_culture_trigger = { + culture = { + NOR = { + this = root.culture + this = root.top_liege.culture + } + cultural_acceptance = { + target = root.top_liege.culture + value < 75 + } + } +} + +scripted_trigger ep3_governor_yearly_8160_faith_trigger = { + faith = { + NOR = { + this = root.faith + this = root.top_liege.faith + } + faith_hostility_level = { + target = root.top_liege.faith + value > 1 + } + } +} + +ep3_governor_yearly.8160 = { + type = character_event + title = ep3_governor_yearly.8160.t + desc = { + desc = ep3_governor_yearly.8160.desc + first_valid = { + triggered_desc = { + trigger = { + scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } + culture = top_liege.culture + scope:councillor.culture != top_liege.culture + } + desc = ep3_governor_yearly.8160.culture_councillor + } + triggered_desc = { + trigger = { + scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } + culture != top_liege.culture + scope:councillor.culture = top_liege.culture + } + desc = ep3_governor_yearly.8160.culture_self + } + triggered_desc = { + trigger = { + scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } + } + desc = ep3_governor_yearly.8160.culture + } + desc = ep3_governor_yearly.8160.faith + } + first_valid = { + triggered_desc = { + trigger = { scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } } + desc = ep3_governor_yearly.8160.culture_end + } + desc = ep3_governor_yearly.8160.faith_end + } + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = scope:councillor + animation = dismissal + } + lower_center_portrait = scope:administrator + + cooldown = { years = 15 } + + trigger = { + has_ep3_dlc_trigger = yes + is_available_adult = yes + is_governor = yes + any_sub_realm_county = { + OR = { + ep3_governor_yearly_8160_culture_trigger = yes + ep3_governor_yearly_8160_faith_trigger = yes + } + } + } + + immediate = { + random_sub_realm_county = { + limit = { + ep3_governor_yearly_8160_culture_trigger = yes + ep3_governor_yearly_8160_faith_trigger = no + } + alternative_limit = { ep3_governor_yearly_8160_culture_trigger = yes } + alternative_limit = { ep3_governor_yearly_8160_faith_trigger = yes } + weight = { + base = 1 + modifier = { add = development_level } + modifier = { + holder = root + factor = 2 + } + } + save_scope_as = minority_county + } + if = { + limit = { scope:minority_county = { ep3_governor_yearly_8160_culture_trigger = yes } } + if = { + limit = { + cp:councillor_steward ?= { + NOR = { + culture = scope:minority_county.culture + has_trait = humble + has_trait = compassionate + } + } + } + cp:councillor_steward = { save_scope_as = councillor } + } + if = { + limit = { NOT = { exists = scope:councillor } } + ordered_courtier = { + limit = { + NOR = { + culture = scope:minority_county.culture + has_trait = humble + has_trait = compassionate + } + } + order_by = stewardship + save_scope_as = councillor + } + } + save_scope_as = culture + } + else = { + cp:councillor_court_chaplain = { save_scope_as = councillor } + if = { + limit = { NOT = { exists = scope:councillor } } + random_courtier = { + limit = { + faith = root.faith + is_clergy = yes + } + alternative_limit = { faith = root.faith } + weight = { + base = 1 + modifier = { add = learning } + modifier = { + has_trait = zealous + add = 10 + } + } + save_scope_as = councillor + } + } + } + create_character = { + template = pool_repopulate_stewardship + culture = scope:minority_county.culture + faith = scope:minority_county.faith + location = root.location + gender_female_chance = { + if = { + limit = { scope:minority_county.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:minority_county.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = administrator + } + } + + option = { # Encourage access + name = ep3_governor_yearly.8160.a + remove_treasury_or_gold = minor_treasury_or_gold_value + change_influence = minor_influence_loss + increase_governance_effect = { VALUE = 5 } + reverse_add_opinion = { + target = scope:councillor + modifier = angry_opinion + opinion = -25 + } + add_courtier = scope:administrator + reverse_add_opinion = { + target = scope:administrator + modifier = grateful_opinion + opinion = 50 + } + if = { + limit = { exists = scope:culture } + culture = { + change_cultural_acceptance = { + target = scope:minority_county.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_promoted_bureaucrats + } + } + stress_impact = { + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + else = { + add_piety = minor_piety_gain + every_sub_realm_county = { + limit = { faith = scope:minority_county.faith } + custom = ep3_governor_yearly.8160.faith_county_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8160_promoted_modifier + years = 10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + lazy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + modifier = { + treasury_or_gold < medium_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Suppress + name = ep3_governor_yearly.8160.b + add_dread = medium_dread_gain + if = { + limit = { exists = scope:culture } + culture = { + change_cultural_acceptance = { + target = scope:minority_county.culture + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_promoted_bureaucrats + } + } + every_sub_realm_county = { + limit = { culture = scope:minority_county.culture } + custom = ep3_governor_yearly.8160.culture_county_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8160_suppressed_modifier + years = 10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + } + else = { + every_sub_realm_county = { + limit = { faith = scope:minority_county.faith } + custom = ep3_governor_yearly.8160.faith_county_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8160_suppressed_modifier + years = 10 + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + just = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + } + reverse_add_opinion = { + target = scope:councillor + modifier = pleased_opinion + opinion = 25 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -1 + } + } + } + + option = { # Dismiss + name = ep3_governor_yearly.8160.d + ai_chance = { + base = 100 + } + } + after = { + scope:administrator = { + silent_disappearance_ai_effect = yes + } + } +} + +##################################### +# Local Defense # +# by Joe Parkin # +# 8170 # +##################################### + +scripted_trigger ep3_governor_yearly_8170_raider_trigger = { + save_temporary_scope_as = raider_temp + trigger_if = { + limit = { + root = { + any_character_to_title_neighboring_county = { holder.top_liege = scope:raider_temp.top_liege } + } + } + can_raid_trigger = yes + } + trigger_else = { can_raid_across_water_trigger = yes } + ep3_governor_involved_with_root_or_liege_trigger = no + NOR = { + root.top_liege ?= top_liege + any_ally = { + OR = { + this = root + target_is_liege_or_above = root + } + } + any_war_enemy = { + OR = { + this = root + target_is_liege_or_above = root + } + } + any_truce_target = { + OR = { + this = root + target_is_liege_or_above = root + } + } + } +} + +ep3_governor_yearly.8170 = { + type = character_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + any_character_to_title_neighboring_county = { holder.top_liege = scope:raider.top_liege } + } + desc = ep3_governor_yearly.8170.t.land + } + desc = ep3_governor_yearly.8170.t.sea + } + } + } + desc = { + desc = ep3_governor_yearly.8170.desc + first_valid = { + triggered_desc = { + trigger = { + any_character_to_title_neighboring_county = { holder.top_liege = scope:raider.top_liege } + } + desc = ep3_governor_yearly.8170.land + } + desc = ep3_governor_yearly.8170.sea + } + desc = ep3_governor_yearly.8170.ending + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = root.cp:councillor_marshal + animation = debating + } + lower_center_portrait = scope:raider + + cooldown = { years = 15 } + + trigger = { + is_available_adult = yes + is_governor = yes + any_character_to_title_neighboring_and_across_water_county = { + holder = { + OR = { + ep3_governor_yearly_8170_raider_trigger = yes + any_liege_or_above = { ep3_governor_yearly_8170_raider_trigger = yes } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_character_to_title_neighboring_and_across_water_county = { + holder = { + OR = { + AND = { + ep3_governor_yearly_8170_raider_trigger = yes + reverse_has_opinion_modifier = { + target = root + modifier = raided_me_opinion + } + } + any_liege_or_above = { + ep3_governor_yearly_8170_raider_trigger = yes + reverse_has_opinion_modifier = { + target = root + modifier = raided_me_opinion + } + } + } + } + } + add = 1 + } + } + + immediate = { + save_scope_as = governor + # A military character + cp:councillor_marshal ?= { save_scope_as = marshal } + if = { + limit = { NOT = { exists = scope:marshal } } + ordered_knight = { + order_by = age + save_scope_as = marshal + } + } + if = { + limit = { NOT = { exists = scope:marshal } } + ordered_courtier = { + limit = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + order_by = age + save_scope_as = marshal + } + } + scope:marshal = { add_to_list = threatened_vassals } + # A raiding neighbour + every_character_to_title_neighboring_and_across_water_county = { + limit = { + holder = { + OR = { + ep3_governor_yearly_8170_raider_trigger = yes + any_liege_or_above = { ep3_governor_yearly_8170_raider_trigger = yes } + } + } + } + holder = { + if = { + limit = { + any_liege_or_above = { ep3_governor_yearly_8170_raider_trigger = yes } + } + ordered_liege_or_above = { + limit = { ep3_governor_yearly_8170_raider_trigger = yes } + order_by = highest_held_title_tier + add_to_list = potential_raiders + } + } + else = { add_to_list = potential_raiders } + } + } + random_in_list = { + list = potential_raiders + weight = { + base = 1 + modifier = { + reverse_has_opinion_modifier = { + target = root + modifier = raided_me_opinion + } + add = 10 + } + } + save_scope_as = raider + every_character_to_title_neighboring_and_across_water_county = { + limit = { + save_temporary_scope_as = neighbour_county_temp + root = { any_sub_realm_county = { this = scope:neighbour_county_temp } } + } + add_to_list = threatened_counties + if = { + limit = { holder != root } + holder = { + add_to_list = threatened_vassals + every_liege_or_above = { + limit = { + NOR = { + this = root + highest_held_title_tier < root.highest_held_title_tier + } + } + add_to_list = threatened_vassals + } + } + } + } + } + random_in_list = { + list = threatened_counties + weight = { + base = 1 + modifier = { + any_county_province = { has_province_modifier = recently_looted_modifier } + add = 10 + } + modifier = { + add = { + value = 5 + subtract = title_province.fort_level + } + } + modifier = { + add = { + value = title_province.available_loot + multiply = 0.1 + } + } + } + save_scope_as = raid_county + } + set_variable = { + name = threatened_counties_count + value = { + value = 0 + every_in_list = { + list = threatened_counties + add = 1 + } + } + months = 1 + } + } + + option = { # A + name = ep3_governor_yearly.8170.a + remove_treasury_or_gold = { + value = { + value = minor_treasury_or_gold_value + multiply = var:threatened_counties_count + max = 100 + } + } + increase_governance_effect = { VALUE = 5 } + every_in_list = { + list = threatened_counties + custom = ep3_governor_yearly.8170.modifier_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8170_warning_system_modifier + years = 10 + } + } + every_in_list = { + list = threatened_vassals + custom = ep3_governor_yearly.8170.opinion_tt + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 1 + ai_honor = 1 + } + modifier = { + treasury_or_gold < major_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Own ideas + name = ep3_governor_yearly.8170.b + remove_treasury_or_gold = medium_treasury_or_gold_value + duel = { + skill = martial + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + desc = ep3_governor_yearly.8170.b.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8170.b.success + change_influence = minor_influence_gain + increase_governance_effect = { VALUE = 10 } + every_in_list = { + list = threatened_counties + custom = ep3_governor_yearly.8170.modifier_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8170_success_modifier + years = 10 + } + } + every_in_list = { + list = threatened_vassals + custom = ep3_governor_yearly.8170.opinion_tt + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 1 + } + desc = ep3_governor_yearly.8170.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8170.b.failure + every_in_list = { + list = threatened_counties + custom = ep3_governor_yearly.8170.modifier_tt + add_county_modifier = { + modifier = ep3_governor_yearly_8170_failure_modifier + years = 10 + } + } + every_in_list = { + list = threatened_vassals + custom = ep3_governor_yearly.8170.opinion_tt + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = 1 + ai_energy = 1 + } + modifier = { + treasury_or_gold < major_treasury_or_gold_value + factor = 0 + } + } + } + + option = { # Diplomacy + name = ep3_governor_yearly.8170.c + duel = { + skill = diplomacy + value = decent_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 5 + min = 3 + } + desc = ep3_governor_yearly.8170.c.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_governor_yearly.8170.c.success + left_icon = scope:marshal + right_icon = scope:raider + scope:raider = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + add_truce_one_way = { + character = root + years = 10 + name = ep3_governor_yearly_8170_truce + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -5 + min = 3 + } + desc = ep3_governor_yearly.8170.c.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_governor_yearly.8170.c.failure + left_icon = scope:marshal + right_icon = scope:raider + change_influence = minor_influence_loss + reverse_add_opinion = { + target = scope:raider + modifier = contempt_opinion + opinion = -25 + } + } + } + } + stress_impact = { + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 1 + ai_compassion = 1 + } + } + } + + option = { # Refuse + name = ep3_governor_yearly.8170.d + reverse_add_opinion = { + target = scope:marshal + modifier = annoyed_opinion + opinion = -15 + } + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = 1 + ai_honor = -1 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_interactions_events.txt b/N3OW/events/dlc/ep3/ep3_interactions_events.txt new file mode 100644 index 00000000..24476a30 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_interactions_events.txt @@ -0,0 +1,4609 @@ +namespace = ep3_interactions_events + +# Favor +ep3_interactions_events.0001 = { + type = letter_event + opening = ep3_interactions_events.0001.opening + desc = { + desc = ep3_interactions_events.0001.desc + desc = ep3_interactions_events.0001.favor + } + sender = scope:recipient + + trigger = { + exists = scope:demanded_administration + scope:recipient.primary_title = scope:demanded_administration + scope:recipient = { target_is_liege_or_above = scope:actor } + } + + #Accept + option = { + name = ep3_interactions_events.0001.a + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_interactions_events.0001.accept_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + add_hook = { + target = scope:actor + type = favor_hook + } + change_to_administrative_interaction_effect = yes + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 75 + opinion_modifier = { + opinion_target = scope:recipient + multiplier = 0.5 + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0001.b + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_interactions_events.0001.refuse_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + # In Japan, this starts a war + if = { + limit = { + scope:actor = { government_has_flag = government_is_japan_administrative } + scope:recipient = { government_has_flag = government_is_japan_feudal } + } + tgp_japan_demand_administrative_refusal_effect = yes + } + # Elsewhere it does not + else = { custom_tooltip = demand_admin_interaction_vassal_refuses } + # Opinion + if = { + limit = { + scope:actor = { is_ai = yes } + } + reverse_add_opinion = { + target = scope:actor + modifier = angry_opinion + opinion = -25 + } + } + } + } + ai_chance = { + base = 10 + } + } + + #Use a Hook to force it through + option = { + name = religious_interaction.2012.c + trigger = { has_strong_usable_hook = scope:recipient } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_interactions_events.0001.force_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + scope:actor = { use_hook = scope:recipient } + change_to_administrative_interaction_effect = yes + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +# Gold +ep3_interactions_events.0002 = { + type = letter_event + opening = ep3_interactions_events.0001.opening + desc = { + desc = ep3_interactions_events.0001.desc + desc = ep3_interactions_events.0002.gold + } + sender = scope:recipient + + trigger = { + exists = scope:demanded_administration + scope:recipient.primary_title = scope:demanded_administration + scope:recipient = { target_is_liege_or_above = scope:actor } + } + + immediate = { + } + + #Accept + option = { + name = ep3_interactions_events.0002.a + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_interactions_events.0001.accept_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + change_to_administrative_interaction_effect = yes + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 0.5 + } + modifier = { + factor = 0.2 + gold <= 0 + } + opinion_modifier = { + opinion_target = scope:recipient + multiplier = 0.5 + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0001.b + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_interactions_events.0001.refuse_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + custom_tooltip = demand_admin_interaction_vassal_refuses + if = { + limit = { + scope:actor = { is_ai = yes } + } + reverse_add_opinion = { + target = scope:actor + modifier = angry_opinion + opinion = -25 + } + } + } + } + ai_chance = { + base = 10 + modifier = { + add = 100 + gold < medium_gold_value + } + } + } + + #Use a Hook to force it through + option = { + name = religious_interaction.2011.c + trigger = { has_strong_usable_hook = scope:recipient } + save_scope_value_as = { # Cancel extra gold + name = gold + value = no + } + scope:recipient = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_interactions_events.0001.force_toast + left_icon = scope:actor + right_icon = scope:demanded_administration + scope:actor = { use_hook = scope:recipient } + change_to_administrative_interaction_effect = yes + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +# Recipient Player event +ep3_interactions_events.0005 = { + type = letter_event + opening = ep3_interactions_events.0005.opening + desc = { + desc = ep3_interactions_events.0005.desc + first_valid = { + triggered_desc = { + trigger = { scope:hereditary = yes } + desc = ep3_interactions_events.0005.hereditary + } + desc = ep3_interactions_events.0005.fallback + } + } + sender = scope:actor + + trigger = { + exists = scope:demanded_administration + scope:recipient.primary_title = scope:demanded_administration + scope:recipient = { target_is_liege_or_above = scope:actor } + } + + #Accept + option = { + name = ep3_interactions_events.0005.a + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = demand_admin_interaction_accept + left_icon = scope:recipient + change_to_administrative_interaction_effect = yes + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 0 + demand_admin_acceptance_modifier = yes + modifier = { # We increase the value to compensate for the potentially high AI values in the other options + factor = 2 + always = yes + } + } + } + + #Favor + option = { + name = ep3_interactions_events.0005.b + trigger = { + NOT = { + has_hook_of_type = { + target = scope:actor + type = favor_hook + } + } + scope:hook = no + } + show_as_unavailable = { scope:hook = yes } + custom_description_no_bullet = { + text = if_actor_accepts_desc + object = scope:actor + } + show_as_tooltip = { + add_hook = { + target = scope:actor + type = favor_hook + } + change_to_administrative_interaction_effect = yes + } + scope:actor = { + trigger_event = { + id = ep3_interactions_events.0001 + days = 5 + } + } + ai_chance = { + base = 100 + modifier = { + add = { + value = 50 + # This goes double for your Powerful Vassals. A better contract is likely to be much more important than a short-term payout. + if = { + limit = { is_powerful_vassal_of = scope:actor } + add = 100 + } + } + this.liege = scope:actor + } + modifier = { + has_trait = ambitious + add = 50 + } + } + } + + #Gold + option = { + name = ep3_interactions_events.0005.c + trigger = { scope:hook = no } + show_as_unavailable = { scope:hook = yes } + save_scope_value_as = { + name = gold + value = yes + } + custom_description_no_bullet = { + text = if_actor_accepts_desc + object = scope:actor + } + show_as_tooltip = { + change_to_administrative_interaction_effect = yes + } + scope:actor = { + trigger_event = { + id = ep3_interactions_events.0002 + days = 5 + } + } + ai_chance = { + base = 100 + modifier = { + add = 50 # More likely to ask for gold if they're poor + scope:recipient.short_term_gold < medium_gold_value + } + modifier = { + add = { # Much more likely to ask for gold if involved in one of their own wars (they want to win). + value = 50 + if = { + # Especially true if they're in debt! + limit = { gold < 0 } + add = 150 + } + } + is_at_war = yes + any_character_war = { is_war_leader = scope:recipient } + } + modifier = { + has_trait = greedy + add = 50 + } + modifier = { + ai_greed < high_negative_ai_value + add = -50 + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0005.d + trigger = { scope:hook = no } + show_as_unavailable = { scope:hook = yes } + scope:actor = { + send_interface_toast = { + type = event_toast_effect_bad + title = demand_admin_interaction_refuse + left_icon = scope:recipient + custom_tooltip = demand_admin_interaction_vassal_refuses + } + if = { + limit = { is_ai = yes } + add_opinion = { + modifier = angry_opinion + target = scope:recipient + opinion = -15 + } + } + } + ai_chance = { + base = 20 + opinion_modifier = { + opinion_target = scope:actor + multiplier = -0.5 + } + modifier = { + has_dread_level_towards = { + target = scope:actor + level = 1 + } + add = -15 + } + modifier = { + has_dread_level_towards = { + target = scope:actor + level = 2 + } + add = -30 + } + modifier = { + has_trait = stubborn + add = 25 + } + modifier = { + has_trait = arrogant + add = 25 + } + modifier = { + has_trait = ambitious + add = -25 + } + } + } +} + +ep3_interactions_events.0010 = { + type = letter_event + opening = ep3_interactions_events.0010.opening + desc = ep3_interactions_events.0010.desc + sender = scope:intermediary + + immediate = { + custom_tooltip = ep3_interactions_events.0010.tt + } + + option = { name = ep3_interactions_events.0010.a } +} + +ep3_interactions_events.0011 = { + type = letter_event + opening = ep3_interactions_events.0011.opening + desc = ep3_interactions_events.0011.desc + sender = scope:intermediary + + immediate = { + custom_tooltip = ep3_interactions_events.0011.tt + } + + option = { name = ep3_interactions_events.0011.a } +} + +ep3_interactions_events.0012 = { + type = letter_event + opening = ep3_interactions_events.0012.opening + desc = ep3_interactions_events.0012.desc + sender = scope:intermediary + + immediate = { + + } + + option = { name = ep3_interactions_events.0012.a } +} + +ep3_interactions_events.0013 = { + type = letter_event + opening = ep3_interactions_events.0013.opening + desc = ep3_interactions_events.0013.desc + sender = scope:recipient + + immediate = { + + } + + option = { + name = char_interaction.0263.a + } +} + +ep3_interactions_events.0014 = { + type = letter_event + opening = ep3_interactions_events.0014.opening + desc = ep3_interactions_events.0014.desc + sender = scope:recipient + + immediate = { + } + + option = { + name = ep3_interactions_events.0014.a + } +} + +ep3_interactions_events.0020 = { + type = letter_event + opening = ep3_interactions_events.0020.opening + desc = ep3_interactions_events.0020.desc + sender = scope:recipient + + immediate = { + # Refund the influence cost + change_influence = { + value = admin_council_cost_value + multiply = 0.5 + } + } + + option = { + name = ep3_interactions_events.0020.a + } +} + +ep3_interactions_events.0021 = { + type = letter_event + opening = ep3_interactions_events.0021.opening + desc = ep3_interactions_events.0021.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0021.a + } +} + +scripted_trigger ep3_interactions_events_0030_callous_trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = zealous + has_relation_rival = scope:recipient + has_relation_nemesis = scope:recipient + has_relation_victim = scope:recipient + has_relation_bully = scope:recipient + } +} + +#You castrate a child-aged family member +ep3_interactions_events.0030 = { # By Jason Cantalini + type = character_event + title = ep3_interactions_events.0030.t + desc = { + desc = ep3_interactions_events.0030.desc.intro + first_valid = { + triggered_desc = { + trigger = { + age < 12 + } + desc = ep3_interactions_events.0030.desc.child_address + } + desc = ep3_interactions_events.0030.desc.normal_address + } + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_greek } + OR = { + has_title = title:e_byzantium + top_liege = { + has_title = title:e_byzantium + } + } + } + desc = ep3_interactions_events.0030.desc.greek + } + desc = ep3_interactions_events.0030.desc.non_greek + } + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + has_character_flag = accepted_castration_child + } + } + desc = ep3_interactions_events.0030.desc.accepted_child + } + triggered_desc = { + trigger = { + scope:recipient = { + has_character_flag = accepted_castration_youth + } + } + desc = ep3_interactions_events.0030.desc.accepted_youth + } + triggered_desc = { + trigger = { + age < 12 + } + desc = ep3_interactions_events.0030.desc.child_resents_castration + } + desc = ep3_interactions_events.0030.desc.resents_castration + } + desc = ep3_interactions_events.0030.desc + } + theme = administrative + override_background = { + reference = physicians_study + } + left_portrait = { + character = scope:actor + triggered_animation = { + trigger = { + scope:recipient = { has_character_flag = resents_castration } + } + animation = go_to_your_room + } + triggered_animation = { + trigger = { + NOT = { + scope:recipient = { has_character_flag = resents_castration } + } + } + animation = personality_forgiving + } + } + right_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + scope:recipient = { has_character_flag = resents_castration } + } + animation = fear + } + triggered_animation = { + trigger = { + NOT = { + scope:recipient = { has_character_flag = resents_castration } + } + } + animation = crying + } + } + + immediate = { + hidden_effect = { + #For the text + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + } + + option = { + name = { + trigger = { + ep3_interactions_events_0030_callous_trigger = yes + } + text = ep3_interactions_events.0030_callous + } + name = { + trigger = { + ep3_interactions_events_0030_callous_trigger = no + } + text = ep3_interactions_events.0030_kind + } + scope:actor = { change_influence = minor_influence_gain } + if = { + limit = { + scope:recipient = { + has_character_flag = accepted_castration_child + } + } + scope:recipient = { + ep3_child_castration_effect = yes + add_stress = medium_stress_gain + custom_tooltip = castration_better_before_maturity + } + } + else_if = { + limit = { + scope:recipient = { + has_character_flag = accepted_castration_youth + } + } + scope:recipient = { + ep3_youth_castration_effect = yes + add_stress = major_stress_gain + } + } + else = { + scope:recipient = { + ep3_child_castration_effect = yes + add_opinion = { + modifier = castration_opinion + target = scope:actor + opinion = -50 + } + add_stress = major_stress_gain + } + } + scope:recipient = { + create_character_memory = { + type = family_castration_memory + participants = { + castrator = scope:actor + } + } + } + ai_chance = { + base = 100 + } + } + after = { + if = { + limit = { + scope:recipient = { + has_character_flag = accepted_castration_child + } + } + scope:recipient = { + remove_character_flag = accepted_castration_child + } + } + if = { + limit = { + scope:recipient = { + has_character_flag = accepted_castration_youth + } + } + scope:recipient = { + remove_character_flag = accepted_castration_youth + } + } + if = { + limit = { + scope:recipient = { + has_character_flag = resents_castration + } + } + scope:recipient = { + remove_character_flag = resents_castration + } + } + if = { + limit = { + scope:recipient = { + has_character_modifier = brutal_castration_modifier + } + } + send_interface_toast = { + type = event_generic_bad_text + title = ep3_interactions_events.0030.bad_castration.t + desc = ep3_interactions_events.0030.bad_castration + left_icon = scope:physician + right_icon = scope:recipient + + show_as_tooltip = { + scope:recipient = { + add_character_modifier = brutal_castration_modifier + } + } + } + } + else = { + send_interface_toast = { + type = event_generic_good_text + title = ep3_interactions_events.0030.good_castration.t + desc = ep3_interactions_events.0030.good_castration + left_icon = scope:physician + right_icon = scope:recipient + } + } + } +} + +#The family member you wish castrated flees! +ep3_interactions_events.0031 = { # By Jason Cantalini + type = character_event + title = ep3_interactions_events.0031.t + desc = ep3_interactions_events.0031.desc + theme = healthcare + override_background = { + trigger = { + culture = { + OR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + has_building_gfx = indian_building_gfx + } + } + NOT = { government_has_flag = government_is_tribal } + } + reference = ep3_city_gate + } + override_background = { + trigger = { + OR = { + culture = { + NOR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + has_building_gfx = indian_building_gfx + } + } + government_has_flag = government_is_tribal + } + } + reference = market + } + left_portrait = { + character = scope:actor + triggered_animation = { + trigger = { + OR = { + ep3_interactions_events_0030_callous_trigger = yes + has_trait = vengeful + has_trait = just + has_trait = wrathful + } + } + animation = anger + } + triggered_animation = { + trigger = { + NOR = { + ep3_interactions_events_0030_callous_trigger = yes + has_trait = vengeful + has_trait = just + has_trait = wrathful + } + } + animation = survey + } + + } + lower_right_portrait = scope:recipient + + immediate = { + if = { + limit = { + has_hook = scope:recipient + } + remove_hook = { target = scope:recipient } + } + if = { + limit = { + OR = { + is_landed = yes + is_landless_ruler = yes + is_governor = yes + } + } + remove_courtier_or_guest = scope:recipient + } + scope:recipient = { + set_relation_rival = { + target = scope:actor + reason = rival_attempted_castration + } + add_stress = medium_stress_gain + } + scope:recipient = { + create_character_memory = { + type = family_castration_fled_memory + participants = { + castrator = scope:actor + } + } + } + } + + #Have him found and castrated NOW! + option = { + name = ep3_interactions_events.0031.a + + if = { + limit = { + influence >= medium_influence_value + } + change_influence = medium_influence_loss + } + else = { + add_prestige = medium_prestige_loss + } + + + duel = { + skill = intrigue + target = scope:recipient + 45 = { #The boy is found and dealt with + desc = ep3_interactions_events.0031.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -44 + } + modifier = { + highest_held_title_tier >= tier_empire + add = 30 + } + modifier = { + highest_held_title_tier >= tier_duchy + add = 10 + } + modifier = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + intrigue > very_high_skill_rating + } + add = 15 + } + modifier = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + intrigue >= high_skill_rating + } + add = 10 + } + modifier = { + dread > 70 + add = 10 + } + + send_interface_toast = { + title = ep3_interactions_events.0031.a_success + left_icon = root + right_icon = scope:recipient + + if = { + limit = { + OR = { + is_landed = yes + is_landless_ruler = yes + } + } + add_courtier = scope:recipient + } + scope:actor = { change_influence = minor_influence_gain } + scope:recipient = { + ep3_youth_castration_effect = yes + add_opinion = { + target = scope:actor + modifier = angry_opinion + opinion = -50 + } + } + scope:recipient = { + create_character_memory = { + type = family_castration_memory + participants = { + castrator = scope:actor + } + } + } + } + } + 55 = { #The boy eludes your searchers + desc = ep3_interactions_events.0031.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -54 + } + send_interface_toast = { + title = ep3_interactions_events.0031.a_failure + left_icon = root + right_icon = scope:recipient + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + arbitrary = miniscule_stress_impact_gain + content = minor_stress_impact_gain + fickle = minor_stress_impact_gain + generous = miniscule_stress_impact_gain + } + ai_chance = { + ai_value_modifier = { + ai_vengefulness = 1 + ai_zeal = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = content + has_trait = fickle + AND = { + influence < medium_influence_value + prestige < medium_prestige_value + } + } + } + } + } + #He won't sacrifice for us - he should indeed be gone + option = { + name = { + trigger = { + OR = { + ep3_interactions_events_0030_callous_trigger = yes + has_trait = vengeful + has_trait = just + has_trait = wrathful + } + } + text = ep3_interactions_events.0031_callous + } + name = { + trigger = { + NOR = { + ep3_interactions_events_0030_callous_trigger = yes + has_trait = vengeful + has_trait = just + has_trait = wrathful + } + } + text = ep3_interactions_events.0031_kind + } + stress_impact = { + just = miniscule_stress_impact_gain + ambitious = miniscule_stress_impact_gain + stubborn = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + ai_value_modifier = { + ai_compassion = 1 + ai_energy = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = vengeful + has_trait = wrathful + has_trait = sadistic + } + } + } + } + after = { + hidden_effect = { + if = { + limit = { + scope:recipient = { + NOT = { is_courtier_of = root } + } + } + if = { + limit = { + any_relation = { + type = rival + OR = { + is_landed = yes + is_landless_ruler = yes + } + } + } + random_relation = { + type = rival + limit = { + OR = { + is_landed = yes + is_landless_ruler = yes + } + } + save_scope_as = rival + } + scope:recipient = { + visit_court_of = scope:rival + } + } + else_if = { + limit = { + exists = root.top_liege + } + scope:recipient = { set_location = root.top_liege.capital_province } + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { + NOT = { + government_has_flag = government_is_tribal + } + } + } + random_neighboring_top_liege_realm_owner = { + limit = { + NOT = { + government_has_flag = government_is_tribal + } + } + save_scope_as = destination_owner + } + scope:recipient = { + visit_court_of = scope:destination_owner + } + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { + exists = this + } + } + random_neighboring_top_liege_realm_owner = { + save_scope_as = destination_owner + } + scope:recipient = { + visit_court_of = scope:destination_owner + } + } + } + } + } +} + +#The emperor sends a reward for your governorship skills +ep3_interactions_events.0040 = { + type = letter_event + opening = ep3_interactions_events.0040.opening + desc = ep3_interactions_events.0040.desc + sender = scope:emperor + + immediate = { + random_list = { + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 90 + } + } + change_influence = major_influence_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value >= 90 + } + } + change_influence = massive_influence_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 90 + } + } + add_gold = medium_gold_value + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value >= 90 + } + } + add_gold = major_gold_value + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 95 + } + } + add_trait_xp = { + trait = governor + value = 5 + } + add_prestige = medium_prestige_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 90 + } + } + change_influence = medium_influence_gain + add_prestige = minor_prestige_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value >= 90 + } + } + change_influence = major_influence_gain + add_prestige = medium_prestige_gain + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value >= 90 + } + } + add_character_modifier = { + modifier = ep3_efforts_recognized_modifier + years = 10 + } + } + 10 = { + trigger = { + has_trait_xp = { + trait = governor + value < 95 + } + } + add_character_modifier = { + modifier = ep3_publicly_recognized_modifier + years = 10 + } + } + } + } + + option = { + name = ep3_interactions_events.0040.a + scope:emperor = { + add_hook = { + target = root + type = loyalty_hook + years = 5 + } + } + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:emperor + modifier = feeling_appreciated_opinion + opinion = 30 + } + } + if = { + limit = { + scope:emperor = { is_ai = yes } + } + scope:emperor = { + add_opinion = { + target = root + modifier = appreciation_opinion + opinion = 30 + } + } + } + } +} + +scripted_effect ep3_rent_knight_effect = { + $KNIGHT_TO_RENT$ = { + liege = { + save_scope_as = og_liege + } + add_opinion = { + modifier = recruited_me_opinion + target = root + } + save_scope_as = rented_knight + } + custom_tooltip = ep3_rent_knight_effect.tt + hidden_effect = { + add_courtier = $KNIGHT_TO_RENT$ + $KNIGHT_TO_RENT$ = { + add_character_flag = blocked_from_leaving + set_knight_status = force + } + #return event + trigger_event = { + id = ep3_interactions_events.0102 + years = 5 + } + } +} + +ep3_interactions_events.0101 = { + type = character_event + title = ep3_interactions_events.0101.t + desc = { + desc = ep3_interactions_events.0101.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:cool_trait_1 } + desc = ep3_interactions_events.0101.desc_knight_1_trait + } + triggered_desc = { + trigger = { exists = scope:knight_to_rent_1 } + desc = ep3_interactions_events.0101.desc_knight_1 + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:cool_trait_2 } + desc = ep3_interactions_events.0101.desc_knight_2_trait + } + triggered_desc = { + trigger = { exists = scope:knight_to_rent_2 } + desc = ep3_interactions_events.0101.desc_knight_2 + } + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:cool_trait_3 } + desc = ep3_interactions_events.0101.desc_knight_3_trait + } + triggered_desc = { + trigger = { exists = scope:knight_to_rent_3 } + desc = ep3_interactions_events.0101.desc_knight_3 + } + } + } + theme = war + + left_portrait = { + character = scope:actor + } + right_portrait = { + character = scope:recipient + } + lower_left_portrait = { + trigger = { exists = scope:knight_to_rent_1 } + character = scope:knight_to_rent_1 + } + lower_center_portrait = { + trigger = { exists = scope:knight_to_rent_2 } + character = scope:knight_to_rent_2 + } + lower_right_portrait = { + trigger = { exists = scope:knight_to_rent_3 } + character = scope:knight_to_rent_3 + } + immediate = { + scope:recipient = { + every_knight = { + limit = { + is_landed = no + } + add_to_list = potential_knights + } + } + #remove the very top guy + ordered_in_list = { + list = potential_knights + order_by = prowess + remove_from_list = potential_knights + } + if = { + limit = { + list_size:potential_knights > 2 + } + ordered_in_list = { + list = potential_knights + order_by = prowess + save_scope_as = knight_to_rent_1 + remove_from_list = potential_knights + } + } + if = { + limit = { + list_size:potential_knights > 1 + } + ordered_in_list = { + list = potential_knights + order_by = prowess + save_scope_as = knight_to_rent_2 + remove_from_list = potential_knights + } + } + if = { + limit = { + list_size:potential_knights > 0 + } + ordered_in_list = { + list = potential_knights + order_by = prowess + save_scope_as = knight_to_rent_3 + remove_from_list = potential_knights + } + } + if = { + limit = { + scope:knight_to_rent_3 = { + any_character_trait = { + has_trait_category = commander + } + } + } + scope:knight_to_rent_3 = { + random_character_trait = { + limit = { + has_trait_category = commander + } + save_scope_as = cool_trait_3 + } + } + } + if = { + limit = { + scope:knight_to_rent_2 ?= { + any_character_trait = { + has_trait_category = commander + } + } + } + scope:knight_to_rent_2 = { + random_character_trait = { + limit = { + has_trait_category = commander + } + save_scope_as = cool_trait_2 + } + } + } + if = { + limit = { + scope:knight_to_rent_1 ?= { + any_character_trait = { + has_trait_category = commander + } + } + } + scope:knight_to_rent_1 = { + random_character_trait = { + limit = { + has_trait_category = commander + } + save_scope_as = cool_trait_1 + } + } + } + } + + option = { + name = ep3_interactions_events.0101.a + trigger = { exists = scope:knight_to_rent_1 } + ep3_rent_knight_effect = { + KNIGHT_TO_RENT = scope:knight_to_rent_1 + } + } + option = { + name = ep3_interactions_events.0101.b + trigger = { exists = scope:knight_to_rent_2 } + ep3_rent_knight_effect = { + KNIGHT_TO_RENT = scope:knight_to_rent_2 + } + } + option = { + name = ep3_interactions_events.0101.c + trigger = { exists = scope:knight_to_rent_3 } + ep3_rent_knight_effect = { + KNIGHT_TO_RENT = scope:knight_to_rent_3 + } + } + option = { + name = ep3_interactions_events.0101.d + } +} + +ep3_interactions_events.0102 = { + type = letter_event + opening = ep3_interactions_events.0102.opening + desc = ep3_interactions_events.0102.desc + sender = scope:rented_knight + + trigger = { + scope:rented_knight ?= { + is_alive = yes + } + } + immediate = { + scope:rented_knight = { + remove_character_flag = blocked_from_leaving + } + if = { + limit = { + scope:og_liege ?= { + is_alive = yes + } + } + scope:og_liege = { + show_as_tooltip = { + scope:rented_knight = { + return_to_court = yes + } + } + hidden_effect = { + add_courtier = scope:rented_knight + } + } + } + else = { + remove_courtier_or_guest = scope:rented_knight + } + } + + option = { + name = ep3_interactions_events.0102.a + add_hook = { + type = loyalty_hook + target = scope:rented_knight + } + } +} + +#if recipient (laamp) declines hire_laamp_mercenaries_interaction he gets this event to pick smth to negotiate +ep3_interactions_events.0111 = { + type = character_event + title = ep3_interactions_events.0111.t + desc = ep3_interactions_events.0111.desc + theme = war + left_portrait = { + character = scope:recipient + animation = thinking + } + right_portrait = { + character = scope:actor + animation = bribing + } + artifact = { + target = scope:actor_artifact + position = lower_center_portrait + trigger = { exists = scope:actor_artifact } + } + + immediate = { + scope:recipient = { save_scope_as = adventurer } + if = { + limit = { + scope:recipient.prestige_level > 1 + scope:recipient.prestige_level < 3 + } + scope:actor = { + random_held_title = { + title_tier = county + limit = { + NOR = { + scope:actor.primary_title ?= this + scope:actor.capital_county ?= this + scope:actor.capital_county.duchy ?= this.duchy + } + is_noble_family_title = no + is_landless_type_title = no + } + add_to_list = purchased_titles + } + } + } + else_if = { + limit = { + scope:recipient.prestige_level > 2 + scope:actor = { + any_held_title = { + title_tier = duchy + NOR = { + scope:actor.primary_title ?= this + scope:actor.capital_county.de_jure_liege ?= this + } + is_noble_family_title = no + is_landless_type_title = no + } + } + } + scope:actor = { + random_held_title = { + title_tier = duchy + limit = { + NOR = { + scope:actor.primary_title ?= this + scope:actor.capital_county.de_jure_liege ?= 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 + } + } + } + } + } + else = { + scope:actor = { + random_held_title = { + title_tier >= county + limit = { + NOR = { + scope:actor.primary_title ?= this + scope:actor.capital_county ?= this + scope:actor.capital_county.duchy ?= duchy + any_in_de_jure_hierarchy = { scope:actor.capital_county ?= 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 + } + } + } + } + } + ordered_in_list = { + list = purchased_titles + limit = { + is_noble_family_title = no + is_landless_type_title = no + } + save_scope_as = new_primary_title + } + + scope:actor = { + every_character_war = { + add_to_list = actor_wars + } + random_character_artifact = { + limit = { + scope:recipient = { can_equip_artifact = prev } + } + save_scope_as = actor_artifact + } + } + every_in_list = { + list = actor_wars + limit = { + primary_defender = scope:actor + } + add_to_list = join_as_defender + remove_from_list = actor_wars + } + every_in_list = { + list = actor_wars + limit = { + primary_attacker = scope:actor + } + add_to_list = join_as_attacker + remove_from_list = actor_wars + } + } + + #Ask for land + option = { + name = ep3_interactions_events.0111.a + trigger = { + exists = scope:new_primary_title + prestige_level >= 2 + scope:new_primary_title = { + NOR = { + this = scope:actor.primary_title + this = scope:actor.capital_county + duchy = scope:actor.capital_county.duchy + } + } + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + save_scope_value_as = { + name = negotiation_offer + value = flag:land + } + show_as_tooltip = { + # Determine hierarchy + ep3_become_landed_save_liege_effect = { + TITLE_GIVER = scope:actor + ALWAYS_INDEPENDENT = no + TITLE_LIST = purchased_titles + } + # Resolve title, liege, government changes + ep3_become_landed_transfer_effect = { + TITLE_RECEIVER = scope:recipient + TITLE_LIST = purchased_titles + TYPE = granted + REASON = flag:purchased + } + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + + ai_chance = { + base = 0 + modifier = { # Province value + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = scope:new_primary_title.development_level + scope:new_primary_title = { + every_county_province = { add = num_buildings } + } + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { ep3_purchase_land_valid_county_trigger = yes } + add = development_level + every_county_province = { add = num_buildings } + } + } + } + multiply = -1 + } + } + modifier = { # Land is foreign + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = -10 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + add = -10 + } + } + } + max = -30 + } + trigger_if = { + limit = { scope:new_primary_title.tier = tier_county } + scope:new_primary_title.culture != scope:recipient.culture + } + trigger_else = { + scope:new_primary_title = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + } + } + } + modifier = { # Different faith + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = -10 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = -10 + } + } + } + max = -30 + } + trigger_if = { + limit = { scope:new_primary_title.tier = tier_county } + scope:new_primary_title.faith != scope:recipient.faith + } + trigger_else = { + scope:new_primary_title = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + } + } + } + modifier = { # My culture's lands + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = 15 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = 15 + } + } + } + if = { + limit = { scope:acceptance != 0 } + divide = scope:acceptance + } + min = 50 + } + scope:actor.culture != scope:recipient.culture + trigger_if = { + limit = { scope:new_primary_title.tier = tier_county } + scope:new_primary_title.culture = scope:recipient.culture + } + trigger_else = { + scope:new_primary_title = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + culture = scope:recipient.culture + } + } + } + scope:recipient.culture = { + save_temporary_scope_value_as = { + name = acceptance + value = { + value = "cultural_acceptance(scope:actor.culture)" + divide = 25 + ceiling = yes + } + } + } + } + modifier = { # My faith's lands + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = 15 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = 15 + } + } + } + if = { + limit = { scope:hostility != 0 } + multiply = scope:hostility + } + min = 50 + } + scope:actor.faith != scope:recipient.faith + trigger_if = { + limit = { scope:new_primary_title.tier = tier_county } + scope:new_primary_title.faith = scope:recipient.faith + } + trigger_else = { + scope:new_primary_title = { + any_de_jure_county = { + ep3_purchase_land_valid_county_trigger = yes + faith = scope:recipient.faith + } + } + } + scope:recipient.faith = { + save_temporary_scope_value_as = { + name = hostility + value = "faith_hostility_level(scope:actor.faith)" + } + } + } + modifier = { + factor = 0 + NOR = { + current_military_strength < 1000 # You can do better + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + NOR = { + AND = { + has_character_modifier = ep3_lust_for_land_modifier + ai_greed >= 25 + ai_boldness >= 25 + ai_rationality <= -25 + } + AND = { + has_trait = greedy + ai_rationality <= -50 + } + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + } + } + } + + #Ask for artifact + option = { + name = ep3_interactions_events.0111.b + trigger = { + exists = scope:actor_artifact + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + show_as_tooltip = { + scope:actor_artifact = { + set_owner = scope:recipient + } + } + save_scope_value_as = { + name = negotiation_offer + value = flag:artifact + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + #Ask for alliance + option = { + name = ep3_interactions_events.0111.c + trigger = { + scope:actor = { + NOT = { is_allied_to = scope:recipient } + } + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + show_as_tooltip = { + scope:actor = { + create_alliance = { + target = scope:recipient + allied_through_owner = scope:actor + allied_through_target = scope:recipient + } + } + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = event_negotiated_alliance_opinion + } + } + } + save_scope_value_as = { + name = negotiation_offer + value = flag:alliance + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + #Ask for adding to contact list + option = { + name = ep3_interactions_events.0111.d + trigger = { + scope:actor = { + NOT = { is_contact_of = scope:recipient } + } + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + show_as_tooltip = { + scope:recipient = { + add_contact = scope:actor + } + } + save_scope_value_as = { + name = negotiation_offer + value = flag:contact_list + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + #Ask for provisions + option = { + name = ep3_interactions_events.0111.e + trigger = { + scope:recipient.domicile.provisions < scope:recipient.domicile.max_provisions + } + save_scope_value_as = { + name = negotiation_offer + value = flag:provisions + } + custom_tooltip = ep3_interactions_events.0111.actor_decides + show_as_tooltip = { + scope:recipient.domicile = { + change_provisions = { + value = { + value = 0 + add = scope:recipient.domicile.max_provisions + subtract = scope:recipient.domicile.provisions + } + } + } + } + scope:actor = { + trigger_event = ep3_interactions_events.0112 + } + custom_tooltip = ep3_interactions_events.0111.join_wars + ai_chance = { + base = 100 + modifier = { + scope:recipient.domicile.provisions = scope:recipient.domicile.max_provisions + factor = 0 + } + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0111.f + 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 + } + } + } + } + + ai_chance = { + base = 1 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +#actor has to respond to the laamp offer +ep3_interactions_events.0112 = { + type = letter_event + opening = ep3_interactions_events.0112.opening + desc = { + desc = ep3_interactions_events.0112.desc + first_valid = { + triggered_desc = { + trigger = { scope:negotiation_offer = flag:land } + desc = ep3_interactions_events.0112.desc_land + } + triggered_desc = { + trigger = { scope:negotiation_offer = flag:artifact } + desc = ep3_interactions_events.0112.desc_artifact + } + triggered_desc = { + trigger = { scope:negotiation_offer = flag:alliance } + desc = ep3_interactions_events.0112.desc_alliance + } + triggered_desc = { + trigger = { scope:negotiation_offer = flag:provisions } + desc = ep3_interactions_events.0112.desc_provisions + } + triggered_desc = { + trigger = { scope:negotiation_offer = flag:contact_list } + desc = ep3_interactions_events.0112.desc_contact_list + } + } + } + sender = scope:recipient + + #Accept + option = { + name = ep3_interactions_events.0112.a + scope:actor = { + pay_treasury_or_gold = { + target = scope:recipient + value = ep3_hire_laamp_mercs_cost_value + } + add_to_variable_list = { + name = hired_mercenaries + target = scope:recipient + } + } + switch = { + trigger = scope:negotiation_offer + flag:land = { + # Determine hierarchy + ep3_become_landed_save_liege_effect = { + TITLE_GIVER = scope:actor + ALWAYS_INDEPENDENT = no + TITLE_LIST = purchased_titles + } + # Resolve title, liege, government changes + ep3_become_landed_transfer_effect = { + TITLE_RECEIVER = scope:recipient + TITLE_LIST = purchased_titles + TYPE = granted + REASON = flag:purchased + } + # Extra purchase land specific + scope:actor = { + stress_impact = { + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_loss + } + } + # Effects on land giver + scope:actor = { add_legitimacy = -15 } + # Messages for nearby players + create_landed_ruler_message_effect = { + LANDED = scope:recipient + FLAVOR_CHAR = scope:actor + FLAVOR_TITLE = scope:new_primary_title + REASON = flag:purchased + } + } + flag:artifact = { + scope:actor_artifact = { + set_owner = scope:recipient + } + } + flag:alliance = { + scope:actor = { + create_alliance = { + target = scope:recipient + allied_through_owner = scope:actor + allied_through_target = scope:recipient + } + } + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = event_negotiated_alliance_opinion + } + } + } + flag:provisions = { + scope:recipient = { + domicile = { + change_provisions = { + value = { + value = 0 + add = scope:recipient.domicile.max_provisions + subtract = scope:recipient.domicile.provisions + } + } + } + } + scope:actor = { + remove_short_term_gold = minor_gold_value + } + } + flag:contact_list = { + scope:recipient = { + add_contact = scope:actor + } + } + } + every_in_list = { + list = join_as_attacker + add_attacker = scope:recipient + } + every_in_list = { + list = join_as_defender + add_defender = scope:recipient + } + scope:recipient = { + add_character_flag = joined_as_mercenary + } + + ai_chance = { + base = 4 + modifier = { # Land is foreign + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = 10 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + culture != scope:recipient.culture + } + add = 10 + } + } + } + max = 30 + } + scope:negotiation_offer = flag:land + } + modifier = { # Different faith + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = 10 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = 10 + } + } + } + max = 30 + } + scope:negotiation_offer = flag:land + } + modifier = { # My culture's lands + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = -15 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = -15 + } + } + } + if = { + limit = { scope:acceptance != 0 } + divide = scope:acceptance + } + min = -50 + } + scope:negotiation_offer = flag:land + scope:recipient.culture = { + save_temporary_scope_value_as = { + name = acceptance + value = { + value = "cultural_acceptance(scope:actor.culture)" + divide = 25 + ceiling = yes + } + } + } + } + modifier = { # My faith's lands + add = { + value = 0 + if = { + limit = { scope:new_primary_title.tier = tier_county } + add = -15 + } + else = { + scope:new_primary_title = { + every_de_jure_county = { + limit = { + ep3_purchase_land_valid_county_trigger = yes + faith != scope:recipient.faith + } + add = -15 + } + } + } + if = { + limit = { scope:hostility != 0 } + multiply = scope:hostility + } + min = -50 + } + scope:negotiation_offer = flag:land + scope:recipient.faith = { + save_temporary_scope_value_as = { + name = hostility + value = "faith_hostility_level(scope:actor.faith)" + } + } + } + modifier = { + factor = 0 + scope:negotiation_offer = flag:provisions + scope:actor = { + short_term_gold < minor_gold_value + } + } + modifier = { + factor = 0 + scope:recipient = { + is_ai = yes + NOR = { + current_military_strength < 1000 # You can do better + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + NOR = { + AND = { + has_character_modifier = ep3_lust_for_land_modifier + ai_greed >= 25 + ai_boldness >= 25 + ai_rationality <= -25 + } + AND = { + has_trait = greedy + ai_rationality <= -50 + } + global_variable_list_size = { + name = laamps_tally + value >= too_many_laamps_value + } + } + } + } + } + } + #Refuse + option = { + name = ep3_interactions_events.0112.b + scope:recipient = { + send_interface_message = { + type = event_diplomacy_bad + title = ep3_interactions_events.0112.refuse + left_icon = scope:actor + add_opinion = { + target = scope:actor + modifier = insulted_opinion + } + } + } + ai_chance = { + base = 1 + } + } + + #Use a Hook to force it through + option = { + name = ep3_interactions_events.0112.c + trigger = { + has_strong_usable_hook = scope:recipient + scope:recipient = { + is_ai = yes + } + } + use_hook = scope:recipient + + every_in_list = { + list = join_as_attacker + add_attacker = scope:recipient + } + every_in_list = { + list = join_as_defender + add_defender = scope:recipient + } + scope:recipient = { + add_character_flag = joined_as_mercenary + } + ai_chance = { + base = 1000 + modifier = { + factor = 0 + OR = { + scope:actor = { + is_ai = no + } + scope:recipient = { + is_ai = no + } + } + } + } + } +} + +#event to pay off all laamp mercenaries for a war leader +ep3_interactions_events.0121 = { + type = letter_event + opening = ep3_interactions_events.0121.opening + desc = ep3_interactions_events.0121.desc + sender = scope:laamp + + trigger = { + any_in_list = { + list = laamp_mercenaries + is_alive = yes + } + } + + immediate = { + ordered_in_list = { + list = laamp_mercenaries + limit = { + is_alive = yes + } + order_by = { + save_temporary_scope_as = char_temp + add = "scope:war.war_contribution(scope:char_temp)" + } + save_scope_as = laamp + } + save_scope_value_as = { + name = war_contribution_value + value = "scope:war.war_contribution(scope:laamp)" + } + } + + #Accept + option = { + name = ep3_interactions_events.0121.a + save_scope_value_as = { + name = next_payment + value = flag:accept + } + every_in_list = { + list = laamp_mercenaries + limit = { + is_alive = yes + } + save_temporary_scope_as = laamp_temp + scope:employer = { + pay_treasury_or_gold = { + target = prev + value = ep3_hire_laamp_mercs_payment_value + } + } + if = { + limit = { + is_ai = no + } + trigger_event = ep3_interactions_events.0122 + } + if = { + limit = { + NOT = { is_contact_of = scope:laamp } + } + scope:laamp = { + add_contact = root + } + } + } + + ai_chance = { + base = 100 + } + } + #Accept, but give them less gold + option = { + name = ep3_interactions_events.0121.b + save_scope_value_as = { + name = next_payment + value = flag:pay_less + } + every_in_list = { + list = laamp_mercenaries + limit = { + is_alive = yes + } + save_temporary_scope_as = laamp_temp + save_scope_value_as = { + name = war_contribution_value + value = "scope:war.war_contribution(scope:laamp_temp)" + } + scope:employer = { + pay_treasury_or_gold = { + target = prev + value = { + add = ep3_hire_laamp_mercs_payment_value + divide = 2 + } + } + } + add_opinion = { + modifier = laamp_skimmed_opinion + target = scope:employer + } + if = { + limit = { + can_add_hook = { + target = scope:employer + type = indebted_hook + } + } + add_hook = { + type = indebted_hook + target = scope:employer + } + } + if = { + limit = { + is_ai = no + } + trigger_event = ep3_interactions_events.0122 + } + if = { + limit = { + NOT = { is_contact_of = scope:laamp } + } + scope:laamp = { + add_contact = root + } + } + } + ai_chance = { + base = 0 + modifier = { + add = 20 + has_trait = greedy + } + modifier = { + add = 100 + short_term_gold < minor_gold_value + } + } + } + + #Refuse + option = { + name = ep3_interactions_events.0121.c + save_scope_value_as = { + name = next_payment + value = flag:refuse + } + every_in_list = { + list = laamp_mercenaries + limit = { + is_alive = yes + } + progress_towards_rival_effect = { + REASON = rival_unpayed_laamp + CHARACTER = scope:employer + OPINION = -100 + } + if = { + limit = { + can_add_hook = { + target = scope:employer + type = strong_favor_hook + } + } + add_hook = { + type = strong_favor_hook + target = scope:employer + } + } + if = { + limit = { + is_ai = no + } + trigger_event = ep3_interactions_events.0122 + } + } + ai_chance = { + base = 0 + #refuse only if you don't have gold + modifier = { + add = 100 + short_term_gold < minor_gold_value + } + #and none of the mercenaries are human players + modifier = { + factor = 0 + any_in_list = { + list = laamp_mercenaries + is_ai = no + } + } + } + } +} + +#event to inform laamp mercenaries if they got payed +ep3_interactions_events.0122 = { + type = letter_event + opening = ep3_interactions_events.0122.opening + desc = { + desc = ep3_interactions_events.0122.desc + first_valid = { + triggered_desc = { + trigger = { scope:next_payment = flag:accept } + desc = ep3_interactions_events.0122.desc_accept + } + triggered_desc = { + trigger = { scope:next_payment = flag:pay_less } + desc = ep3_interactions_events.0122.desc_pay_less + } + triggered_desc = { + trigger = { scope:next_payment = flag:refuse } + desc = ep3_interactions_events.0122.desc_not_pay + } + } + } + sender = scope:employer + + immediate = { + #set scope for the ep3_hire_laamp_mercs_payment_value scripted value to work + save_scope_as = laamp_temp + save_scope_value_as = { + name = war_contribution_value + value = "scope:war.war_contribution(scope:laamp_temp)" + } + switch = { + trigger = scope:next_payment + flag:accept = { + show_as_tooltip = { + scope:employer = { + pay_treasury_or_gold = { + target = prev + value = ep3_hire_laamp_mercs_payment_value + } + } + } + } + flag:pay_less = { + show_as_tooltip = { + scope:employer = { + pay_treasury_or_gold = { + target = prev + value = { + add = ep3_hire_laamp_mercs_payment_value + divide = 2 + } + } + } + add_opinion = { + modifier = laamp_skimmed_opinion + target = scope:employer + } + if = { + limit = { + can_add_hook = { + target = scope:employer + type = indebted_hook + } + } + add_hook = { + type = indebted_hook + target = scope:employer + } + } + } + + } + flag:refuse = { + show_as_tooltip = { + if = { + limit = { + can_add_hook = { + target = scope:employer + type = strong_favor_hook + } + } + add_hook = { + type = strong_favor_hook + target = scope:employer + } + } + } + } + } + if = { + limit = { + scope:employer = { + NOT = { is_contact_of = root } + } + } + add_contact = scope:employer + } + } + + option = { + name = { + trigger = { scope:next_payment = flag:accept } + text = ep3_interactions_events.0122.a + } + name = { + trigger = { scope:next_payment = flag:pay_less } + text = ep3_interactions_events.0122.b + } + name = { + trigger = { scope:next_payment = flag:refuse } + text = ep3_interactions_events.0122.c + } + } +} + +# Admin - Request Support Interaction +# Accepted notification event +ep3_interactions_events.0201 = { + type = letter_event + opening = ep3_interactions_events.0201.opening + desc = ep3_interactions_events.0201.desc + sender = scope:recipient + + immediate = { + show_as_tooltip = { + scope:target = { + change_appointment_investment = { + target = scope:secondary_recipient + investor = scope:recipient + value = scope:request_support_score + } + } + } + } + + option = { + name = ep3_interactions_events.0201.a + } +} + +# Refused notification event +ep3_interactions_events.0202 = { + type = letter_event + opening = ep3_interactions_events.0202.opening + desc = ep3_interactions_events.0202.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0202.a + } +} + +# Accepted Coax to War interaction +ep3_interactions_events.0210 = { + type = letter_event + opening = ep3_interactions_events.0210.opening + desc = ep3_interactions_events.0210.desc + sender = scope:recipient + + immediate = { + show_as_tooltip = { + scope:recipient = { + change_influence = { + value = massive_influence_gain + multiply = 2 + } + start_war = { + cb = influence_war_cb + target = scope:secondary_recipient + claimant = scope:recipient.top_liege + target_title = scope:target + } + custom_tooltip = frontier_influence_war_interaction_target_title_tt + } + } + } + + option = { + name = ep3_interactions_events.0210.a + } +} + +# Declined Coax to War interaction +ep3_interactions_events.0211 = { + type = letter_event + opening = { + desc = yearly.1020.opening + desc = ep3_interactions_events.0211.opening + } + desc = ep3_interactions_events.0211.desc + sender = scope:recipient + + immediate = { + show_as_tooltip = { + change_influence = { + value = massive_influence_gain + } + reverse_add_opinion = { + modifier = refused_summons_to_war_opinion + target = scope:actor + } + } + } + + option = { + name = ep3_interactions_events.0211.a + } +} + +# Adoption accepted +ep3_interactions_events.0400 = { + type = letter_event + opening = ep3_interactions_events.0400.opening + desc = ep3_interactions_events.0400.desc + sender = scope:recipient + + immediate = { + noble_family_adoption_effect = { + ADOPTEE = scope:recipient + ADOPTER = scope:actor + } + create_character_memory = { + type = noble_family_adopted + participants = { adoptee = scope:recipient } + } + scope:new_memory = { + set_variable = { + name = adopted_house + value = scope:actor.house + } + } + scope:recipient = { + create_character_memory = { + type = was_noble_family_adopted + participants = { house_head = scope:actor } + } + scope:new_memory = { + set_variable = { + name = adopted_house + value = scope:actor.house + } + } + } + } + + option = { + name = ep3_interactions_events.0400.a + } + + after = { + if = { + limit = { exists = var:adopted_house } # Error suppression + } + } +} + +# Raid Remit accepted +ep3_interactions_events.0421 = { + type = letter_event + opening = ep3_interactions_events.0421.opening + desc = ep3_interactions_events.0421.desc + sender = scope:recipient + + immediate = { + scope:actor = { + set_variable = { + name = raid_estate_permission + value = scope:secondary_recipient.house + } + if = { + limit = { scope:gold = yes } + pay_short_term_gold = { + target = scope:recipient + gold = scope:actor.minor_gold_value + } + } + } + } + + option = { + name = ep3_interactions_events.0421.a + scope:recipient = { custom_tooltip = request_raid_remit_interaction_effect_tt } + } + + after = { + if = { + limit = { exists = var:adopted_house } # Error suppression + } + } +} + +# Eviction events +ep3_interactions_events.0500 = { + type = letter_event + opening = ep3_interactions_events.0500.opening + desc = ep3_interactions_events.0500.desc + sender = scope:actor + + trigger = { is_ai = no } + + option = { + name = ep3_interactions_events.0500.a + trigger = { + custom_tooltip = { + text = ep3_interactions_events.0500.a.tt.need_soldiers + current_military_strength >= ep3_interactions_events_0500_troops_count_value + } + } + show_as_unavailable = { always = yes } + custom_description_no_bullet = { + text = evict_adventurer_consequences_tt + object = scope:recipient + subject = scope:actor + } + custom_tooltip = evict_adventurer_casus_belli_tt + show_as_tooltip = { + reverse_add_opinion = { + target = scope:actor + modifier = eviction_ignored_opinion + } + } + } + + option = { + name = ep3_interactions_events.0500.b + trigger = { + current_military_strength < ep3_interactions_events_0500_troops_count_value + } + custom_description_no_bullet = { + text = evict_adventurer_consequences_tt + object = scope:recipient + subject = scope:actor + } + custom_tooltip = evict_adventurer_forced_tt + custom_tooltip = evict_adventurer_forced_tt.part_2 + show_as_tooltip = { + reverse_add_opinion = { + target = scope:actor + modifier = eviction_ignored_opinion + } + } + } + + after = { trigger_event = ep3_interactions_events.0502 } +} + +ep3_interactions_events.0501 = { + hidden = yes + type = character_event + + trigger = { + var:adventurer_expeller ?= { + is_alive = yes + is_landed = yes + save_temporary_scope_as = expeller_temp + } + is_alive = yes + government_has_flag = government_is_landless_adventurer + domicile.domicile_location.county.holder ?= { + OR = { + scope:expeller_temp ?= this + any_liege_or_above = { scope:expeller_temp ?= this } + } + } + NOR = { + is_at_war_with = var:adventurer_expeller + is_spouse_of = var:adventurer_expeller + has_relation_friend = var:adventurer_expeller + has_relation_lover = var:adventurer_expeller + } + } + + immediate = { + save_scope_as = adventurer + var:adventurer_expeller = { + save_scope_as = expeller + send_interface_message = { + type = msg_landless_adventurer_expulsion_consequences + title = expel_adventurer_consequences_title + left_icon = scope:adventurer + scope:adventurer = { + send_interface_message = { + type = msg_landless_adventurer_expulsion_consequences_adventurer + title = expel_adventurer_consequences_title + left_icon = scope:expeller + custom_tooltip = evict_adventurer_casus_belli_tt + reverse_add_opinion = { + target = scope:expeller + modifier = eviction_ignored_opinion + } + } + } + } + if = { + limit = { + is_ai = yes + is_character_interaction_valid = { + recipient = scope:adventurer + interaction = imprison_interaction + } + scope:adventurer = { + NOT = { + current_travel_plan ?= { + is_travel_with_domicile = yes + final_destination_province.county.holder = { + OR = { + this = scope:expeller + any_liege_or_above = { this = scope:expeller } + } + } + } + } + } + } + run_interaction = { + interaction = imprison_interaction + actor = scope:expeller + recipient = scope:adventurer + execute_threshold = decline + } + } + } + remove_variable = adventurer_expeller + trigger_event = ep3_interactions_events.0502 + } +} + +ep3_interactions_events.0502 = { + hidden = yes + type = character_event + + trigger = { is_ai = yes } + + immediate = { + save_scope_as = adventurer + random_list = { + 10 = { # Stay + trigger = { current_military_strength > scope:expeller.military_strength_25_percent_value } + modifier = { + add = { + value = current_strength_with_allies_value + multiply = 0.1 + } + } + modifier = { + scope:expeller = { + any_held_title = { + any_claimant = { this = scope:adventurer } + } + } + factor = 2 + } + opinion_modifier = { + who = scope:expeller + opinion_target = root + multiplier = -0.2 + } + } + 10 = { # Leave + modifier = { + add = { + value = scope:expeller.current_strength_with_allies_value + multiply = 0.1 + } + } + scope:expeller = { + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + NOR = { + has_imprisonment_reason = scope:adventurer + has_execute_reason = scope:adventurer + has_banish_reason = scope:adventurer + } + } + save_scope_as = destination_realm_owner + } + } + start_travel_plan = { + destination = scope:destination_realm_owner.capital_province + return_trip = no + } + } + } + } +} + +scripted_trigger ep3_interactions_events_0600_nice_option_trigger = { + scope:supporter = { + is_ruler = yes + } + NOT = { + is_allied_to = scope:supporter + } + OR = { + has_relation_friend = scope:supporter + has_relation_lover = scope:supporter + has_relation_soulmate = scope:supporter + has_trait = loyal + has_trait = schemer + has_trait = diplomat + AND = { + has_trait = governor + has_trait_xp = { + trait = governor + value >= 75 + } + } + } +} + +scripted_trigger ep3_interactions_events_0600_hate_option_trigger = { + scope:supporter = { + is_ruler = yes + } + NOR = { + is_allied_to = scope:supporter + has_relation_friend = scope:supporter + has_relation_potential_friend = scope:supporter + has_relation_best_friend = scope:supporter + has_trait = loyal + } + OR = { + has_relation_potential_rival = scope:supporter + has_relation_rival = scope:supporter + has_relation_nemesis = scope:supporter + has_trait = disloyal + has_trait = arrogant + has_trait = arbitrary + has_trait = paranoid + has_trait = fickle + has_trait = wrathful + } +} + +scripted_effect ep3_interactions_events_0601_ally_success = { + custom_tooltip = negotiate_alliance_effect_tooltip + create_alliance = { + target = scope:supporter + allied_through_owner = scope:new_landed_admin + allied_through_target = scope:supporter + } + scope:supporter = { + add_hook = { + type = favor_hook + target = scope:new_landed_admin + } + } + add_hook = { + type = favor_hook + target = scope:supporter + } + reverse_add_opinion = { + target = scope:supporter + modifier = trust_opinion + opinion = 25 + } + random_list = { + 66 = { + increase_governance_effect = { VALUE = 10 } + } + 33 = { + trigger = { + NOT = { + has_trait = loyal + } + } + add_trait = loyal + } + } +} + +scripted_effect ep3_interactions_events_0601_ally_fail = { + reverse_add_opinion = { + target = scope:supporter + modifier = disappointed_opinion + opinion = -25 + } +} + +scripted_effect ep3_interactions_events_0601_insult = { + change_influence = medium_influence_gain + add_prestige = minor_prestige_gain + if = { + limit = { + has_trait = disloyal + } + add_piety = minor_piety_loss + } + else = { add_trait = disloyal } + if = { + limit = { + scope:supporter = { + can_set_relation_rival_trigger = { CHARACTER = scope:new_landed_admin } + } + } + set_relation_rival = { + target = scope:supporter + reason = rival_ignored_candidacy_support + } + } + else_if = { + limit = { + scope:supporter = { + can_set_relation_nemesis_trigger = { CHARACTER = scope:new_landed_admin } + } + } + set_relation_nemesis = { + target = scope:supporter + reason = rival_ignored_candidacy_support + } + } + else = { + reverse_add_opinion = { + modifier = hate_opinion + target = scope:supporter + opinion = -50 + } + + } +} + +scripted_effect ep3_interactions_events_0601_hook = { + random_list = { + 75 = { + increase_governance_effect = { VALUE = 10 } + } + 25 = { + trigger = { + NOT = { + has_trait = loyal + } + } + add_trait = loyal + } + } + reverse_add_opinion = { + target = scope:supporter + modifier = trust_opinion + opinion = 30 + } + scope:supporter = { + add_hook = { + type = loyalty_hook + target = scope:new_landed_admin + } + } +} + +scripted_effect ep3_interactions_events_0601_friendship = { + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:supporter} + } + progress_towards_friend_effect = { + REASON = friend_supported_candidacy + CHARACTER = scope:supporter + OPINION = 10 + } + } + else = { + reverse_add_opinion = { + modifier = friendliness_opinion + target = scope:supporter + opinion = 30 + } + } + change_influence = minor_influence_loss +} + +scripted_effect ep3_interactions_events_0601_gift = { + change_influence = minor_influence_gain + pay_short_term_gold = { + target = scope:supporter + gold = medium_gold_value + } +} + +scripted_effect ep3_interactions_events_0601_ignore = { + progress_towards_rival_effect = { + REASON = rival_ignored_candidacy_support + CHARACTER = scope:supporter + OPINION = 0 + } + reverse_add_opinion = { + target = scope:supporter + modifier = disrespect_opinion + opinion = -20 + } +} + +# You used promote candidate on someone and they got the title! Time to reward top contributor +ep3_interactions_events.0600 = { + type = character_event + title = ep3_interactions_events.0600.t + desc = ep3_interactions_events.0600.desc + theme = administrative + override_background = { + trigger = { + scope:supporter = { + primary_title = { + this = title:e_byzantium + } + } + } + reference = ep3_byzantium_throneroom + } + override_background = { + trigger = { + scope:supporter = { + primary_title = { + NOT = { this = title:e_byzantium } + } + } + } + reference = ep3_byzantine_feast + } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = scope:supporter + animation = happiness + } + + immediate = { + primary_title = { + ordered_succession_appointment_investors = { + candidate = root + value >= 20 + limit = { + NOT = { + house ?= root.house + } + is_alive = yes + is_imprisoned = no + NOR = { + has_relation_rival = root + is_at_war_with = root + } + } + save_scope_as = supporter + } + } + if = { + limit = { + NOT = { + exists = scope:new_landed_admin + } + } + save_scope_as = new_landed_admin + } + } + + #Let's be allies! + option = { + name = ep3_interactions_events.0600.a + trigger = { + ep3_interactions_events_0600_nice_option_trigger = yes + } + scope:supporter = { + save_scope_as = recipient + } + + if = { + limit = { + scope:supporter = { + is_ai = yes + } + } + duel = { + skills = { diplomacy intrigue } + target = scope:supporter + 75 = { #Being allies sounds cool + desc = ep3_interactions_events.0600.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -74 + } + modifier = { + scope:supporter = { + opinion = { + target = root + value >= 40 + } + } + add = 50 + } + modifier = { + scope:supporter = { + opinion = { + target = root + value >= 80 + } + } + add = 50 + } + modifier = { + scope:supporter = { + highest_held_title_tier <= tier_duchy + } + highest_held_title_tier >= tier_kingdom + add = 75 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_interactions_events.0600.a.success + left_icon = scope:supporter + + show_as_tooltip = { + ep3_interactions_events_0601_ally_success = yes + } + add_character_flag = { + flag = supporter_response_ally_success + days = 30 + } + } + } + 25 = { #Ah shit, he mad + desc = ep3_interactions_events.0600.a.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -24 + } + modifier = { + scope:supporter = { + is_liege_or_above_of = root + } + add = 50 + } + modifier = { + scope:supporter ={ + opinion = { + target = root + value < 0 + } + } + add = 50 + } + modifier = { + scope:supporter ={ + opinion = { + target = root + value < -40 + } + } + add = 50 + } + modifier = { + scope:supporter ={ + opinion = { + target = root + value < -80 + } + } + add = 50 + } + modifier = { + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + highest_held_title_tier <= tier_duchy + add = 75 + } + min = 5 + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_interactions_events.0600.a.fail + left_icon = scope:supporter + + show_as_tooltip = { + ep3_interactions_events_0601_ally_fail = yes + } + add_character_flag = { + flag = supporter_response_ally_fail + days = 30 + } + } + } + } + } + else = { + custom_tooltip = player_supporter_agree_tt + custom_tooltip = negotiate_alliance_effect_tooltip + show_as_tooltip = { + ep3_interactions_events_0601_ally_success = yes + } + add_character_flag = { + flag = supporter_response_ally_player + days = 30 + } + } + stress_impact = { + trusting = medium_stress_impact_loss + ambitious = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + fickle = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_sociability = 1 + } + modifier = { + add = 50 + has_trait = trusting + } + modifier = { + add = -100 + OR = { + AND = { + diplomacy <= mediocre_skill_rating + intrigue <= mediocre_skill_rating + } + diplomacy < low_skill_rating + intrigue < low_skill_rating + } + } + modifier = { + add = 100 + OR = { + AND = { + diplomacy >= decent_skill_rating + intrigue >= decent_skill_rating + } + diplomacy >= very_high_skill_rating + intrigue >= very_high_skill_rating + } + } + modifier = { + add = -100 + opinion = { + target = scope:supporter + value <= 0 + } + } + modifier = { + add = -100 + reverse_opinion = { + target = scope:supporter + value <= 0 + } + } + modifier = { + add = 100 + opinion = { + target = scope:supporter + value >= 60 + } + } + modifier = { + add = 100 + reverse_opinion = { + target = scope:supporter + value >= 60 + } + } + modifier = { + add = -100 + OR = { + AND = { + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + highest_held_title_tier <= tier_duchy + } + AND = { + scope:supporter = { + highest_held_title_tier <= tier_duchy + } + highest_held_title_tier >= tier_kingdom + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = fickle + has_trait = arbitrary + AND = { + diplomacy <= low_skill_rating + intrigue <= low_skill_rating + } + opinion = { + target = scope:supporter + value <= -40 + } + reverse_opinion = { + target = scope:supporter + value <= -40 + } + } + } + } + } + + #I really hate that bastard + option = { + trigger = { + ep3_interactions_events_0600_hate_option_trigger = yes + } + name = ep3_interactions_events.0600.b + flavor = ep3_interactions_events.0600.b.flavor + + show_as_tooltip = { + ep3_interactions_events_0601_insult = yes + } + add_character_flag = { + flag = supporter_response_insult + days = 30 + } + stress_impact = { + arrogant = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + trusting = medium_stress_impact_gain + generous = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + modifier = { + add = 50 + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = fickle + has_trait = arbitrary + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value <= -50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value <= -90 + } + } + modifier = { + add = -100 + opinion = { + target = scope:supporter + value >= 30 + } + } + modifier = { + add = -100 + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + highest_held_title_tier <= tier_duchy + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = trusting + has_trait = generous + has_trait = compassionate + opinion = { + target = scope:supporter + value >= 60 + } + } + } + } + } + + #Give him a hook + option = { + name = ep3_interactions_events.0600.c + flavor = ep3_interactions_events.0600.c.flavor + trigger = { + ep3_interactions_events_0600_nice_option_trigger = no + scope:supporter = { + can_add_hook = { + target = root + type = loyalty_hook + } + } + } + show_as_tooltip = { + ep3_interactions_events_0601_hook = yes + } + add_character_flag = { + flag = supporter_response_hook + days = 30 + } + stress_impact = { + trusting = minor_stress_impact_loss + generous = minor_stress_impact_loss + just = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + fickle = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_greed = -1 + } + modifier = { + add = 50 + OR = { + has_trait = trusting + has_trait = generous + has_trait = just + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < -25 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value >= 90 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value >= 50 + } + } + modifier = { + add = -100 + scope:supporter = { + highest_held_title_tier <= tier_duchy + } + highest_held_title_tier >= tier_kingdom + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = fickle + has_trait = arbitrary + has_trait = greedy + has_trait = ambitious + opinion = { + target = scope:supporter + value < -50 + } + } + } + } + } + + #Be his friend (aww) + option = { + trigger = { + ep3_interactions_events_0600_hate_option_trigger = no + } + name = ep3_interactions_events.0600.d + + show_as_tooltip = { + ep3_interactions_events_0601_friendship = yes + } + add_character_flag = { + flag = supporter_response_friendship + days = 30 + } + stress_impact = { + compassionate = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + callous = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + add = 50 + OR = { + has_trait = trusting + has_trait = generous + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < -25 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value >= 90 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value >= 50 + } + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = callous + has_trait = fickle + opinion = { + target = scope:supporter + value < -50 + } + influence <= minor_influence_value + } + } + } + } + + #Send some gold + option = { + name = ep3_interactions_events.0600.e + show_as_tooltip = { + ep3_interactions_events_0601_gift = yes + } + add_character_flag = { + flag = supporter_response_gift + days = 30 + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 1 + } + modifier = { + add = 50 + OR = { + has_trait = trusting + has_trait = generous + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value < -25 + } + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_gold <= medium_gold_value + } + } + } + } + + #I don't owe this guy shit + option = { + name = ep3_interactions_events.0600.f + show_as_tooltip = { + ep3_interactions_events_0601_ignore = yes + } + add_character_flag = { + flag = supporter_response_ignore + days = 30 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + fickle = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + trusting = minor_stress_impact_gain + generous = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_sociability = -0.5 + } + modifier = { + add = 50 + OR = { + has_trait = arrogant + has_trait = wrathful + has_trait = fickle + has_trait = arbitrary + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value <= -60 + } + } + modifier = { + add = 50 + opinion = { + target = scope:supporter + value < 0 + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value >= 30 + } + } + modifier = { + add = -50 + opinion = { + target = scope:supporter + value >= 60 + } + } + modifier = { + add = -100 + scope:supporter = { + highest_held_title_tier >= tier_kingdom + } + highest_held_title_tier <= tier_duchy + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = trusting + has_trait = generous + has_trait = humble + has_trait = gregarious + opinion = { + target = scope:supporter + value >= 60 + } + } + } + } + } + after = { + scope:supporter = { + trigger_event = ep3_interactions_events.0601 + } + } +} + +ep3_interactions_events.0601 = { + type = letter_event + opening = { + desc = ep3_interactions_events.0601.opening + } + desc = { + desc = ep3_interactions_events.0601.desc + first_valid = { + triggered_desc = { + trigger = { + scope:new_landed_admin = { + OR = { + has_character_flag = supporter_response_insult + has_character_flag = supporter_response_ignore + } + } + } + desc = ep3_interactions_events.0601.desc_scorn + } + desc = ep3_interactions_events.0601.desc_repay + } + + first_valid = { + triggered_desc = { + trigger = { + scope:new_landed_admin = { + OR = { + has_character_flag = supporter_response_ally_success + has_character_flag = supporter_response_ally_fail + has_character_flag = supporter_response_ally_player + } + } + } + desc = ep3_interactions_events.0601.desc_ally + } + triggered_desc = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_insult + } + } + desc = ep3_interactions_events.0601.desc_insult + } + triggered_desc = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_hook + } + } + desc = ep3_interactions_events.0601.desc_hook + } + triggered_desc = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_friendship + } + } + desc = ep3_interactions_events.0601.desc_friendship + } + triggered_desc = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_gift + } + } + desc = ep3_interactions_events.0601.desc_gift + } + desc = ep3_interactions_events.0601.desc_ignore + } + } + sender = scope:new_landed_admin + + immediate = { + #How did the new ruler reply? + scope:new_landed_admin = { + if = { + limit = { + has_character_flag = supporter_response_ally_success + } + ep3_interactions_events_0601_ally_success = yes + } + else_if = { + limit = { + has_character_flag = supporter_response_ally_fail + } + ep3_interactions_events_0601_ally_fail = yes + } + else_if = { + limit = { + has_character_flag = supporter_response_insult + } + ep3_interactions_events_0601_insult = yes + } + else_if = { + limit = { + has_character_flag = supporter_response_hook + } + ep3_interactions_events_0601_hook = yes + add_opinion = { + target = scope:supporter + modifier = trust_opinion + opinion = 10 + } + } + else_if = { + limit = { + has_character_flag = supporter_response_friendship + } + ep3_interactions_events_0601_friendship = yes + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:supporter} + } + add_opinion = { + modifier = friendliness_opinion + target = scope:supporter + opinion = 10 + } + } + else = { + add_opinion = { + modifier = friendliness_opinion + target = scope:supporter + opinion = 30 + } + } + } + + else_if = { + limit = { + has_character_flag = supporter_response_gift + } + ep3_interactions_events_0601_gift = yes + } + else_if = { + limit = { + has_character_flag = supporter_response_ignore + } + ep3_interactions_events_0601_ignore = yes + add_opinion = { + target = scope:supporter + modifier = disrespect_opinion + opinion = -10 + } + } + } + } + + #Yep + option = { + name = { + trigger = { + scope:new_landed_admin = { + NOR = { + has_character_flag = supporter_response_insult + has_character_flag = supporter_response_ignore + } + } + } + text = ep3_interactions_events.0601.a_repaid + } + name = { + trigger = { + scope:new_landed_admin = { + OR = { + has_character_flag = supporter_response_insult + has_character_flag = supporter_response_ignore + } + } + } + text = ep3_interactions_events.0601.a_scorned + } + if = { + limit = { + scope:new_landed_admin = { + has_character_flag = supporter_response_ally_player + } + } + scope:new_landed_admin = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_interactions_events.0600.a.success + left_icon = scope:supporter + + ep3_interactions_events_0601_ally_success = yes + } + } + reverse_add_opinion = { + modifier = trust_opinion + target = scope:new_landed_admin + opinion = 25 + } + stress_impact = { + paranoid = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + } + } + + #No thanks + option = { + trigger = { + scope:new_landed_admin = { + has_character_flag = supporter_response_ally_player + } + } + name = ep3_interactions_events.0601.b + scope:new_landed_admin = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_interactions_events.0600.a.fail + left_icon = scope:supporter + + ep3_interactions_events_0601_ally_fail = yes + } + } + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:new_landed_admin + opinion = -25 + } + + stress_impact = { + trusting = minor_stress_impact_gain + generous = minor_stress_impact_gain + just = minor_stress_impact_gain + } + } +} + +# You are an adventurer who just got granted a landless admin estate! +ep3_interactions_events.0610 = { + type = character_event + title = ep3_interactions_events.0610.t + desc = { + desc = ep3_interactions_events.0610.desc + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + this = scope:emperor + } + } + desc = ep3_interactions_events.0610.desc_emperor + } + desc = ep3_interactions_events.0610.desc_governor + } + triggered_desc = { + trigger = { + root = { + has_character_flag = procure_estate_conversion + } + } + desc = ep3_interactions_events.0610.desc_conversion + } + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { + this = scope:emperor + } + } + desc = ep3_interactions_events.0610.desc_emperor_outro + } + desc = ep3_interactions_events.0610.desc_non_governor_outro + } + } + #Triggered desc based on what you paid + #And if you converted + #Triggered desc based on whether recipient is emperor + theme = administrative + left_portrait = { + character = root + animation = survey + } + lower_right_portrait = scope:recipient + lower_center_portrait = { + character = scope:emperor + trigger = { + this != scope:recipient + } + } + override_background = { + reference = estate + } + + immediate = { + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Byzantine_Flavor/ep3_mx_sting_byzantineflavor_become_governor" + primary_title = { + ordered_succession_appointment_investors = { + candidate = root + limit = { + NOT = { + house ?= root.house + } + is_alive = yes + is_imprisoned = no + NOR = { + has_relation_rival = root + is_at_war_with = root + } + } + save_scope_as = supporter + } + } + if = { + limit = { + 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 + } + } + else = { + scope:recipient = { + save_scope_as = emperor + } + } + show_as_tooltip = { + get_title = primary_title + domicile = { + add_domicile_building = estate_main_01 + } + } + } + + #I'm a new kinda landless now + option = { + name = ep3_interactions_events.0610.a + } +} + +#You are turned down +ep3_interactions_events.0611 = { + type = letter_event + opening = { + desc = ep3_interactions_events.0611.opening + } + desc = ep3_interactions_events.0611.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0611.a + } +} + +ep3_interactions_events.0620 = { # Ask for Influence accepted letter + type = letter_event + opening = { + desc = ep3_interactions_events.0620.opening + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + faith.religion = { + this = religion:christianity_religion + } + } + desc = ep3_interactions_events.0620.desc_byz + } + desc = ep3_interactions_events.0620.desc + } + } + sender = scope:recipient + + immediate = { + show_as_tooltip = { ep3_hof_ask_for_influence_interaction_effect = yes } + } + + option = { + name = { + trigger = { + scope:actor = { + ai_zeal >= low_positive_ai_value + ai_greed < low_positive_ai_value + } + } + text = ep3_interactions_events.0620.a + } + name = { + trigger = { + scope:actor = { + ai_greed >= low_positive_ai_value + ai_zeal < low_positive_ai_value + } + } + text = ep3_interactions_events.0620.b + } + name = { + trigger = { + scope:actor = { + ai_greed < low_positive_ai_value + ai_zeal < low_positive_ai_value + } + } + text = ep3_interactions_events.0620.c + } + } +} + +ep3_interactions_events.0621 = { # Ask for Influence rejection letter event + type = letter_event + opening = { + desc = ep3_interactions_events.0621.opening + } + desc = ep3_interactions_events.0621.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0621.a + } +} + +# Governor is fired/retired - governor_removal_interaction +ep3_interactions_events.0630 = { + type = letter_event + opening = { + desc = ep3_interactions_events.0630.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:actor = { + exists = scope:recipient.house + house ?= { + this = scope:recipient.house + } + } + } + desc = ep3_interactions_events.0630.desc_family + } + triggered_desc = { + trigger = { + scope:actor = { + opinion = { + target = scope:recipient + value <= -50 + } + } + } + desc = ep3_interactions_events.0630.desc_spite + } + triggered_desc = { + trigger = { + scope:actor = { + opinion = { + target = scope:recipient + value >= 50 + } + } + } + desc = ep3_interactions_events.0630.desc_guilt + } + desc = ep3_interactions_events.0630.desc + } + } + sender = scope:actor + + immediate = { + } + + option = { + name = { + trigger = { + scope:actor = { + OR = { + ai_vengefulness >= low_positive_ai_value + opinion = { + target = scope:recipient + value <= -60 + } + } + } + } + text = ep3_interactions_events.0630.a + } + name = { + trigger = { + scope:actor = { + NOR = { + ai_vengefulness >= low_positive_ai_value + opinion = { + target = scope:recipient + value <= -60 + } + } + OR = { + ai_honor >= low_positive_ai_value + opinion = { + target = scope:recipient + value >= 60 + } + } + } + } + text = ep3_interactions_events.0630.b + } + name = { + trigger = { + scope:actor = { + NOR = { + ai_vengefulness >= low_positive_ai_value + opinion = { + target = scope:recipient + value <= -60 + } + ai_honor >= low_positive_ai_value + opinion = { + target = scope:recipient + value >= 60 + } + } + + } + } + text = ep3_interactions_events.0630.c + } + custom_tooltip = depose_governor_lose_titles_tt + scope:actor = { + send_interface_toast = { + type = event_toast_effect_good + title = demand_governor_resignation_accepted_toast + left_icon = scope:recipient + scope:recipient = { + governor_resignation_title_transfer_effect = yes + if = { + limit = { + scope:actor = { + has_realm_law_flag = celestial_retirement_law + } + tgp_is_above_retirement_age_trigger = { REALM_OWNER = scope:actor } + } + show_as_tooltip = { + scope:actor = { + if = { + limit = { has_treasury = yes } + pay_treasury_to_gold = { + target = scope:recipient + value = scope:force_retirement_treasury_cost + } + } + } + } + } + } + } + } + } +} + +# Faction War interactions +ep3_interactions_events.0800 = { # Join Faction War acceptance letter event + type = letter_event + opening = char_interaction.0001.opening + desc = ep3_interactions_events.0800.desc + sender = scope:recipient + + immediate = { + ep3_join_faction_war_effect = yes + } + + option = { + name = ep3_interactions_events.0800.a + } +} + +ep3_interactions_events.0801 = { # Join Faction War rejection letter event + type = letter_event + opening = char_interaction.0001.opening + desc = ep3_interactions_events.0801.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0801.a + } +} + +ep3_interactions_events.0810 = { # Switch Faction War Sides acceptance letter event + type = letter_event + opening = char_interaction.0001.opening + desc = ep3_interactions_events.0810.desc + sender = scope:recipient + + immediate = { + ep3_switch_faction_war_sides_effect = yes + } + + option = { + name = ep3_interactions_events.0810.a + } +} + +ep3_interactions_events.0811 = { # Switch Faction War Sides rejection letter event + type = letter_event + opening = char_interaction.0001.opening + desc = ep3_interactions_events.0811.desc + sender = scope:recipient + + option = { + name = ep3_interactions_events.0811.a + } +} diff --git a/N3OW/events/dlc/ep3/ep3_laamp_decision_events.txt b/N3OW/events/dlc/ep3/ep3_laamp_decision_events.txt new file mode 100644 index 00000000..dc18fbeb --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_laamp_decision_events.txt @@ -0,0 +1,22296 @@ +namespace = ep3_laamp_decision_event +################################ +## Visit Local Settlement Decision +## ep3_laamp_decision_event.1000-1060 +################################ +# ep3_laamp_decision_event.1000 - Enter the Title of ProvinceName. What do you want to do? +# ep3_laamp_decision_event.1001 - Page 2 +# ep3_laamp_decision_event.1010 - Stock up on supplies +# ep3_laamp_decision_event.1020 - Sell an artifact to local peddlers +# ep3_laamp_decision_event.1025 - Head to the Town Crier to spawn Contract(s) +# +# ep3_laamp_decision_event.1030 - Visit the local tavern +# ep3_laamp_decision_event.1031 - Storyteller +# ep3_laamp_decision_event.1033 - Recruitment +# ep3_laamp_decision_event.1035 - Spouse Material +# ep3_laamp_decision_event.1037 - Master Thief +# +# ep3_laamp_decision_event.1040 - Church Holding: Visit the local church grounds +# ep3_laamp_decision_event.1041 - Healer +# ep3_laamp_decision_event.1043 - Church +# ep3_laamp_decision_event.1045 - Garden +# ep3_laamp_decision_event.1047 - Recruit Physician +# +# ep3_laamp_decision_event.1050 - Castle Holding: Visit the local castle grounds +# ep3_laamp_decision_event.1051 - Training Grounds +# ep3_laamp_decision_event.1053 - Recruit at Garrison +# ep3_laamp_decision_event.1055 - Reinforce Men-at-Arms +# ep3_laamp_decision_event.1057 - Recruit Bodyguard +# +# ep3_laamp_decision_event.1060 - City Holding: Visit the local fine craftsmen +# ep3_laamp_decision_event.1061 - Weaponsmith +# ep3_laamp_decision_event.1063 - Armorsmith +# ep3_laamp_decision_event.1065 - Jeweler +# ep3_laamp_decision_event.1067 - Recruit Quartermaster +# + +#The actual adding of the settlement +scripted_effect 1000_add_settlement_effect = { + #A holding is a tad bit more memorable + if = { + limit = { + location = { has_holding = yes } + } + add_to_variable_list = { + name = laamp_visited_settlements_list + target = root.location + years = 15 + } + } + #Otherwise just some rural settlement + else = { + add_to_variable_list = { + name = laamp_visited_settlements_list + target = root.location + years = 10 + } + } +} + +#For loc flavor +scripted_effect 1000_remember_settlement_effect = { + #Do we already remember this place? + if = { + limit = { + has_variable = laamp_visited_settlements_list + any_in_list = { + variable = laamp_visited_settlements_list + this = scope:visiting_location + } + } + #Replace old entry with a new one + remove_list_variable = { + name = laamp_visited_settlements_list + target = scope:visiting_location + } + 1000_add_settlement_effect = yes + } + #Otherwise just add it to the list + else = { + 1000_add_settlement_effect = yes + } +} + +#We return to the main event to peruse other options or leave +scripted_effect 1000_return_to_main_effect = { + custom_tooltip = ep3_laamp_decision_event.return.tt + trigger_event = ep3_laamp_decision_event.1000 +} + +#What was our last location? +scripted_effect 1000_update_last_location_effect = { + if = { + limit = { has_variable = return_from_location } + remove_variable = return_from_location + set_variable = { + name = return_from_location + value = $LOCATION_FLAG$ + } + } + else = { + set_variable = { + name = return_from_location + value = $LOCATION_FLAG$ + } + } +} + +#Clean up variables when we leave the decision +scripted_effect 1000_clean_up_effect = { + #Supplies + remove_variable ?= supply_gold_cost + remove_variable ?= 1010_guards_summoned + #Artifacts + scope:1020_first_artifact_to_sell ?= { 1020_remove_sell_variables_effect = yes } #If we didn't sell any artifacts + scope:1020_second_artifact_to_sell ?= { 1020_remove_sell_variables_effect = yes } + scope:1020_third_artifact_to_sell ?= { 1020_remove_sell_variables_effect = yes } + remove_variable ?= 1021_artifact_sell_screen + #Town Crier + remove_variable ?= 1025_first_contract_desc + remove_variable ?= 1025_second_contract_desc + remove_variable ?= 1025_third_contract_desc + #Healer + scope:1041_health_artifact ?= { remove_variable ?= 1065_accessory_value } + remove_variable ?= 1041_healer_aptitude + remove_variable ?= 1041_partner_healer_aptitude + #Church + remove_variable ?= 1043_collect_gold_difficulty + #Weaponsmith + scope:1061_first_weapon ?= { remove_variable ?= 1061_weapon_value } #If we didn't buy any of the items + scope:1061_second_weapon ?= { remove_variable ?= 1061_weapon_value } + scope:1061_third_weapon ?= { remove_variable ?= 1061_weapon_value } + #Armorer + scope:1063_first_armor ?= { remove_variable ?= 1063_armor_value } #If we didn't buy any of the items + scope:1063_second_armor ?= { remove_variable ?= 1063_armor_value } + scope:1063_third_armor ?= { remove_variable ?= 1063_armor_value } + #Jeweler + scope:1065_first_accessory ?= { remove_variable ?= 1065_accessory_value } #If we didn't buy any of the items + scope:1065_second_accessory ?= { remove_variable ?= 1065_accessory_value } + scope:1065_third_accessory ?= { remove_variable ?= 1065_accessory_value } + #Main + clear_variable_list = list_of_options + remove_variable ?= list_of_options + remove_variable ?= return_from_location + #Un-engage us from the decision + remove_variable ?= ep3_laamp_decision_1000_is_visiting +} + +#Find someone whos company you tolerate +scripted_trigger 1000_appropriate_visiting_partner_basic_trigger = { + location = root.location + is_available = yes + age >= 10 + OR = { + opinion = { + target = root + value >= 25 + } + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + } + NOR = { + has_relation_potential_rival = root + has_relation_victim = root + has_relation_bully = root + #... don't bring your second-in-command while away, duh + has_court_position = second_camp_officer + has_variable = 1010_payment_child + } +} + +#Are we not in a city? +scripted_trigger 1000_is_a_nomadic_holding_trigger = { + scope:visiting_location = { + is_nomadic_location_trigger = yes + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } +} + +#No options left - I tried to do this the easy way, but checking the existence of variable_lists wouldn't let me +scripted_trigger 1000_time_to_go_home_trigger = { + has_variable = return_from_location + #Did we have, and are we done with the Tribal / No Settlement option? + exists = scope:laamp_decision_finished_tavern_option + #Did we have, and are we done with the Church Holding option? + trigger_if = { + limit = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + exists = scope:laamp_decision_finished_church_option + } + #Did we have, and are we done with the Castle Holding option? + trigger_if = { + limit = { + scope:visiting_location = { has_holding_type = castle_holding } + } + exists = scope:laamp_decision_finished_castle_option + } + #Did we have, and are we done with the City Holding option? + trigger_if = { + limit = { + scope:visiting_location = { has_holding_type = city_holding } + } + exists = scope:laamp_decision_finished_craftsmen_option + } + #Did we have, and are we done with the Sell Artifact option? + trigger_if = { + limit = { + OR = { + is_target_in_variable_list = { + name = list_of_options + target = flag:has_artifact_option + } + exists = scope:1020_first_artifact_to_sell + } + } + exists = scope:laamp_decision_sold_artifact + } + #Did we have, and are we done with the Buy Supplies option? + trigger_if = { + limit = { + domicile ?= { provisions = max_provisions } + } + always = yes + } + trigger_else = { exists = scope:laamp_decision_bought_supplies } + #Did we have, and are we done with the Contract option? + OR = { + has_variable = 1025_has_contracted_recently + exists = scope:laamp_decision_has_contracted + } +} + +#Don't sell levelling banners +scripted_trigger 1000_is_unsellable_artifact_trigger = { + OR = { + has_variable = banner_house + has_variable = banner_dynasty + has_variable = 1025_treasure_map + } +} + +#Prioritize sick or ill people if we're heading to a Church Holding +scripted_trigger 1000_has_illness_or_wound_to_treat_trigger = { + OR = { + has_treatable_disease_trigger = yes + has_trait = wounded_1 + has_wounds_trigger = yes + } +} + +#It's either this or a massive, nested trigger_if in the Main Square event :eyes: +scripted_trigger 1000_done_with_second_trigger = { + exists = scope:been_to_second + OR = { + #Only had Supply & Contract + AND = { + OR = { + exists = scope:laamp_decision_bought_supplies + domicile ?= { provisions = max_provisions } + } + NOT = { + is_target_in_variable_list = { + name = list_of_options + target = flag:has_artifact_option + } + } + OR = { + exists = scope:laamp_decision_has_contracted + has_variable = 1025_has_contracted_recently + } + } + #Done all of them + AND = { + OR = { + exists = scope:laamp_decision_bought_supplies + domicile ?= { provisions = max_provisions } + } + is_target_in_variable_list = { + name = list_of_options + target = flag:has_artifact_option + } + exists = scope:laamp_decision_sold_artifact + exists = scope:laamp_decision_has_contracted + } + } +} + +#Set up some reusable trait triggers +scripted_trigger 1010_has_friendly_traits = { + OR = { + has_trait = gregarious + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + has_trait = generous + has_trait = fickle + has_trait = calm + } +} + +scripted_trigger 1010_has_uninterested_traits = { + OR = { + has_trait = callous + has_trait = cynical + has_trait = arrogant + has_trait = fickle + has_trait = arbitrary + has_trait = patient + has_trait = sadistic + } +} + +scripted_trigger 1010_has_commerce_traits = { + OR = { + has_trait = greedy + has_trait = deceitful + has_trait = ambitious + has_trait = diligent + has_trait = impatient + } +} + +scripted_trigger 1010_has_standoffish_traits = { + OR = { + has_trait = shy + has_trait = craven + has_trait = humble + has_trait = paranoid + } +} + +scripted_trigger 1010_has_irrational_traits = { + OR = { + has_trait = eccentric + has_trait = lunatic + has_trait = possessed + } +} + +scripted_trigger 1011_has_no_applicable_traits = { + 1010_has_friendly_traits = no + 1010_has_uninterested_traits = no + 1010_has_commerce_traits = no + 1010_has_standoffish_traits = no + 1010_has_irrational_traits = no +} + + +###################################################################### +# MAIN +# ep3_laamp_decision_event.1000 +###################################################################### +# > Visit Tavern +# > Holding Option (Visit Church / Visit Castle Grounds / Visit Craftsmen District) +# > Page 2 +# > Leave Settlement + + + +#Enter the Title of BaronyName (Constantinople etc). What do you want to do? +ep3_laamp_decision_event.1000 = { + type = character_event + title = ep3_laamp_decision_event.1000.t + window = visit_settlement_window + desc = { + #INTRO: Action / Unique Location / Holding Variations + first_valid = { + ##RETURN: We've returned to this scene, now what + #RETURN: We have no options left - time to go home + triggered_desc = { + trigger = { 1000_time_to_go_home_trigger = yes } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_home + } + #RETURN: Return from where? + first_valid = { + #RETURN: Unique locations + #Constantinople + triggered_desc = { + trigger = { + has_variable = return_from_location + exists = scope:is_constantinople + } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_constantinople_01 + } + random_valid = { + #RETURN: We've returned from Page 2 + triggered_desc = { + trigger = { var:return_from_location ?= flag:second } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_from_second + } + #RETURN: We've returned from the Tavern + triggered_desc = { + trigger = { var:return_from_location ?= flag:tavern } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_from_tavern + } + #RETURN: We've returned from the Church + triggered_desc = { + trigger = { var:return_from_location ?= flag:church_grounds } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_from_church + } + #RETURN: We've returned from the Castle grounds + triggered_desc = { + trigger = { var:return_from_location ?= flag:castle_grounds } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_from_castle + } + #RETURN: We've returned from the Craftsmen + triggered_desc = { + trigger = { var:return_from_location ?= flag:craftsmen } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_from_craftsmen + } + #RETURN: Generics to mix in + #Generics + triggered_desc = { + trigger = { + has_variable = return_from_location + exists = scope:neighboring_county + } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_generic_01 + } + triggered_desc = { + trigger = { has_variable = return_from_location } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_generic_02 + } + triggered_desc = { + trigger = { has_variable = return_from_location } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_generic_03 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + scope:visiting_location = { has_holding = yes } + } + desc = ep3_laamp_decision_event.1000.desc_intro_returned_generic_04 + } + } + } + ##FIRST TIME: Opening scene, paint a picture + #FIRST TIME: Unique locations: Constantinople + triggered_desc = { + trigger = { exists = scope:is_constantinople } + desc = ep3_laamp_decision_event.1000.desc_intro_constantinople + } + #FIRST TIME: Holding: Intro depending on type of holding (tribal/church/castle/city) + random_valid = { + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + desc = ep3_laamp_decision_event.1000.desc_intro_tribal_holding_01 + } + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + desc = ep3_laamp_decision_event.1000.desc_intro_tribal_holding_02 + } + } + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + desc = ep3_laamp_decision_event.1000.desc_intro_church_holding + } + triggered_desc = { + trigger = { + scope:visiting_location = { has_holding_type = castle_holding } + } + desc = ep3_laamp_decision_event.1000.desc_intro_castle_holding + } + triggered_desc = { + trigger = { + scope:visiting_location = { has_holding_type = city_holding } + } + desc = ep3_laamp_decision_event.1000.desc_intro_city_holding + } + } + #OUTRO: Returned to main square + first_valid = { + ##RETURN HOME + #RETURN HOME: No partner, time to go home + triggered_desc = { + trigger = { + 1000_time_to_go_home_trigger = yes + NOT = { exists = scope:visiting_partner } + } + desc = ep3_laamp_decision_event.1000.desc_outro_home + } + #RETURN HOME: Partner feels it's time to go home + triggered_desc = { + trigger = { + 1000_time_to_go_home_trigger = yes + exists = scope:visiting_partner + } + desc = ep3_laamp_decision_event.1000.desc_outro_partner_home + } + ##RETURN + #RETURN: We've returned to this scene, what do you see + ##Weather fx + first_valid = { + #RETURN: Region - Scandinavia - Summer + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } #Block all RETURN outros for unique locations, they are handled in unique RETURN intro + middle_of_year_season_trigger = yes #Light out + NOR = { + has_variable = 1000_is_currently_raining + has_variable = 1000_is_currently_snowing + } + scope:visiting_location = { geographical_region = world_europe_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_scandinavia_summer_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + has_variable = 1000_is_currently_raining + scope:visiting_location = { geographical_region = world_europe_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_scandinavia_summer_returned_02 + } + #RETURN: Region - Scandinavia - Winter + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_europe_north } + has_variable = 1000_is_currently_snowing + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_scandinavia_winter_returned_01 + } + random_valid = { + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + end_of_year_season_trigger = yes #Dark out + scope:visiting_location = { geographical_region = world_europe_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_scandinavia_winter_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + end_of_year_season_trigger = yes #Dark out + scope:visiting_location = { geographical_region = world_europe_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_scandinavia_winter_returned_03 + } + } + #RETURN: Region - Britannia + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + NOR = { + has_variable = 1000_is_currently_raining + has_variable = 1000_is_currently_foggy + } + scope:visiting_location = { geographical_region = world_europe_west_britannia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_britannia_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + has_variable = 1000_is_currently_raining + scope:visiting_location = { geographical_region = world_europe_west_britannia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_britannia_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + has_variable = 1000_is_currently_foggy + scope:visiting_location = { geographical_region = world_europe_west_britannia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_britannia_returned_03 + } + ##No Weather fx + random_valid = { + #RETURN: Region - Europe + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + middle_of_year_season_trigger = yes + scope:visiting_location = { + geographical_region = world_europe + NOT = { geographical_region = world_europe_north } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_europe_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { + geographical_region = world_europe + NOT = { geographical_region = world_europe_north } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_europe_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { + geographical_region = world_europe + NOT = { geographical_region = world_europe_north } + faith = { religion_tag = christianity_religion } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_europe_returned_03 + } + #RETURN: Region - Iberia + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_europe_west_iberia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_iberia_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_europe_west_iberia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_iberia_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_europe_west_iberia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_iberia_returned_03 + } + #RETURN: Region - Middle East + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_middle_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_middle_east_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_middle_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_middle_east_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_middle_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_middle_east_returned_03 + } + #RETURN: Region - India + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_03 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_04 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_05 + } + + #RETURN: Region - Steppe + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_steppe } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_steppe_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_steppe } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_steppe_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_steppe } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_steppe_returned_03 + } + #RETURN: Region - North Africa + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + middle_of_year_season_trigger = yes + scope:visiting_location = { geographical_region = world_africa_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_north_africa_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_north_africa_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_north_africa_returned_03 + } + #RETURN: Region - West Africa + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_west } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_west_africa_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_west } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_west_africa_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_west } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_west_africa_returned_03 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_west } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_west_africa_returned_04 + } + #RETURN: Region - East Africa + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_east_africa_returned_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_east_africa_returned_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_east_africa_returned_03 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_africa_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_east_africa_returned_04 + } + #RETURN: Region - Generic + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + current_season_summer = yes + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_03 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_04 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_05 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + middle_of_year_season_trigger = yes + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_06 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + middle_of_year_season_trigger = yes + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_07 + } + #RETURN: Partner looks around + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_partner ?= { + NOR = { + has_trait = cynical + has_trait = paranoid + has_trait = callous + } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_01 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_partner ?= { is_adult = no } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_02 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_partner ?= { is_adult = no } + NOR = { + has_trait = irritable + has_trait = wrathful + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_03 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_partner ?= { + NOR = { + has_trait = cynical + has_trait = lifestyle_reveler + any_secret = { + type = secret_non_believer + } + } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_04 + } + triggered_desc = { + trigger = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_partner ?= { + OR = { + has_relation_friend = root + has_relation_lover = root + is_close_family_of = root + } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_05 + } + } + } + ##FIRST TIME + #FIRST TIME: Revisiting Constantinople + triggered_desc = { + trigger = { + NOT = { has_variable = return_from_location } + exists = scope:is_constantinople + any_in_list = { + variable = laamp_visited_settlements_list + this = scope:visiting_location + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_revisit_constantinople + } + #FIRST TIME: It's Constantinople + triggered_desc = { + trigger = { + NOT = { has_variable = return_from_location } + exists = scope:is_constantinople + } + desc = ep3_laamp_decision_event.1000.desc_outro_constantinople + } + #FIRST TIME: Our visiting partner flavor + random_valid = { + triggered_desc = { + trigger = { + NOT = { has_variable = return_from_location } + NOT = { exists = scope:is_unique_location } + exists = scope:visiting_partner + } + desc = ep3_laamp_decision_event.1000.desc_outro_partner_01 + } + } + #FIRST TIME: We've been to this settlement before + triggered_desc = { + trigger = { + NOT = { has_variable = return_from_location } + NOT = { exists = scope:is_unique_location } + any_in_list = { + variable = laamp_visited_settlements_list + this = scope:visiting_location + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_revisit + } + #FIRST TIME: New place + triggered_desc = { + trigger = { + NOT = { has_variable = return_from_location } + NOT = { exists = scope:is_unique_location } + } + desc = ep3_laamp_decision_event.1000.desc_outro_new + } + } + } + theme = landless_adventurer + #Backgrounds & fx + #Church Holding + override_sound = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + reference = "event:/SFX/Events/Themes/sfx_event_theme_type_faith" + } + #Castle Holding + override_sound = { + trigger = { + scope:visiting_location = { has_holding_type = castle_holding } + } + reference = "event:/SFX/Events/Themes/sfx_event_theme_type_martial" + } + #City Holding + override_sound = { + trigger = { + scope:visiting_location = { has_holding_type = city_holding } + } + reference = "event:/SFX/Events/Themes/sfx_event_theme_type_stewardship" + } + #Swedish summer + override_effect_2d = { + trigger = { has_variable = 1000_is_currently_raining } + reference = rain + } + widget = { + is_shown = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_europe_north } + has_variable = 1000_is_currently_snowing + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + #HOME: Tribe + override_background = { + trigger = { + 1000_time_to_go_home_trigger = yes + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + reference = bp1_bonfire + } + #HOME + override_background = { + trigger = { 1000_time_to_go_home_trigger = yes} + reference = alley_night + } + #Snowing in tribal Scandinavia + override_background = { + trigger = { is_snowy_rural_scandinavia_location_trigger = yes } + reference = ep2_hunt_snowy_forest + } + #Tribal Holding + override_background = { + trigger = { + scope:visiting_location = { has_holding_type = tribal_holding } + } + reference = village + } + override_background = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + reference = mpo_camp_steppe + } + #Constantinople + override_background = { + trigger = { exists = scope:is_constantinople } + reference = ep3_constantinople + } + #Church Holding + override_background = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + reference = holy_site_generic + } + #Castle Holding + override_background = { + trigger = { + scope:visiting_location = { has_holding_type = castle_holding } + } + reference = courtyard_location + } + #City Holding + override_background = { + trigger = { + scope:visiting_location = { has_holding_type = city_holding } + } + reference = ep3_city_gate + } + #Fallback + override_background = { reference = market } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #Time to go home + triggered_animation = { + trigger = { 1000_time_to_go_home_trigger = yes } + animation = boredom + } + #Friendly + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_friendly_traits = yes } + } + animation = personality_forgiving + } + #Business-minded + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_commerce_traits = yes } + } + animation = personality_greedy + } + #Uninterested + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_uninterested_traits = yes } + } + animation = personality_cynical + } + #Irrational + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + #A bit awkward + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_standoffish_traits = yes } + } + animation = personality_coward + } + animation = personality_compassionate + } + center_portrait = { + character = root + triggered_animation = { + trigger = { 1010_has_irrational_traits = yes } + animation = personality_irrational + } + triggered_animation = { + trigger = { 1010_has_standoffish_traits = yes } + animation = personality_coward + } + triggered_animation = { + trigger = { 1010_has_uninterested_traits = yes } + animation = personality_callous + } + animation = personality_content + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #For loc purposes + if = { + limit = { + NOT = { exists = scope:visiting_location } + } + location = { save_scope_as = visiting_location } + } + if = { + limit = { + NOT = { exists = scope:neighboring_county } + } + location = { + random_neighboring_province = { + limit = { is_location_valid_for_travel_event_on_land = yes } + save_scope_as = neighboring_county + } + } + } + random_dummy_gender_effect = yes + #To rain or not to rain + if = { + limit = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + middle_of_year_season_trigger = yes + location_has_winter_trigger = no + scope:visiting_location = { + OR = { + geographical_region = world_europe_north + geographical_region = world_europe_west_britannia + } + } + } + random_list = { + 50 = { + #No rain + } + 50 = { + set_variable = 1000_is_currently_raining + } + } + } + #To snow or not to snow + if = { + limit = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + end_of_year_season_trigger = yes + location_has_winter_trigger = yes + scope:visiting_location = { geographical_region = world_europe_north } + } + random_list = { + 50 = { + #No rain + } + 50 = { + set_variable = 1000_is_currently_snowing + } + } + } + #To fog or not to fog + if = { + limit = { + has_variable = return_from_location + NOT = { exists = scope:is_unique_location } + scope:visiting_location = { geographical_region = world_europe_west_britannia } + } + random_list = { + 50 = { + #No rain + } + 50 = { + set_variable = 1000_is_currently_foggy + } + } + } + #This. Is. _Constantinople_ + if = { + limit = { scope:visiting_location.barony = title:b_constantinople } + save_scope_as = is_constantinople + save_scope_as = is_unique_location #In case we add more unique locations + } + #Assemble the list of options the first time this window pops + if = { + limit = { + NOT = { exists = scope:first_pass } + } + #Buy supply option - not really any gate since it might change during your visit + + #Sell artifact option + if = { + #We actually have an artifact to sell + limit = { + any_character_artifact = { + count >= 1 + 1000_is_unsellable_artifact_trigger = no + } + } + add_to_variable_list = { + name = list_of_options + target = flag:has_artifact_option + } + } + #Town Crier option - not really any gate, as long as we don't cap amount of contracts I guess? + + #Visit the local tavern, added for all holding types + add_to_variable_list = { + name = list_of_options + target = flag:has_tavern_option + } + #Church Holding: Visit the local church grounds + if = { + limit = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + add_to_variable_list = { + name = list_of_options + target = flag:has_church_option + } + } + #Castle Holding: Visit the local castle grounds + if = { + limit = { + scope:visiting_location = { has_holding_type = castle_holding } + } + add_to_variable_list = { + name = list_of_options + target = flag:has_castle_option + } + } + #City Holding: Visit the local fine craftsmen + if = { + limit = { + scope:visiting_location = { has_holding_type = city_holding } + } + add_to_variable_list = { + name = list_of_options + target = flag:has_craftsman_option + } + } + #Also find someone to bring with you from your crew to display in the bottom-left corner - Spouse/Friend/Marshal/Bodyguard + if = { + limit = { + NOT = { exists = scope:visiting_partner } + } + if = { + limit = { + any_courtier = { 1000_appropriate_visiting_partner_basic_trigger = yes } + } + random_courtier = { + limit = { 1000_appropriate_visiting_partner_basic_trigger = yes } + weight = { + base = 1 + #If we desparately want to bring sick relatives to the doctor + modifier = { + add = 1000 + is_close_family_of = root + 1000_has_illness_or_wound_to_treat_trigger = yes + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + modifier = { + add = 500 + is_spouse_of = root + 1000_has_illness_or_wound_to_treat_trigger = yes + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + modifier = { + add = 100 + has_relation_lover = root + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + modifier = { + add = 20 + is_spouse_of = root + } + modifier = { + add = 15 + is_primary_heir_of = root + } + modifier = { + add = 10 + OR = { + has_court_position = bodyguard_court_position + has_court_position = quartermaster_camp_officer + has_court_position = master_of_spoils_camp_officer + } + } + modifier = { + add = 5 + is_close_family_of = root + } + modifier = { + add = 2 + has_trait = ambitious + } + modifier = { + add = -5 + has_trait = lazy + } + } + save_scope_as = visiting_partner + } + + } + } + save_scope_as = first_pass + } + } + #Church Holding Option: Visit the local church grounds + option = { + name = { + text = { + first_valid = { + #Return to look at the church + triggered_desc = { + trigger = { exists = scope:been_to_church_grounds } + desc = ep3_laamp_decision_event.1000.b_second + } + #First time looking at the church + desc = ep3_laamp_decision_event.1000.b + } + } + } + trigger = { + #Do we actually have the church option available + custom_tooltip = { + text = tapped_out.tt + is_target_in_variable_list = { + name = list_of_options + target = flag:has_church_option + } + NOT = { exists = scope:laamp_decision_finished_church_option } + } + } + show_as_unavailable = { + #Hide the options when we're _all_ done + trigger_if = { + limit = { + exists = scope:laamp_decision_finished_church_option + 1000_time_to_go_home_trigger = no + } + always = yes + } + trigger_else = { always = no } + } + reason = church_holding + #Actual transition event + custom_tooltip = ep3_laamp_decision_event.1000.b.tt + trigger_event = ep3_laamp_decision_event.1040 + ai_chance = { base = 100 } + } + #Castle Holding Option: Visit the local castle grounds + option = { + name = { + text = { + first_valid = { + #Return to look at the castle + triggered_desc = { + trigger = { exists = scope:been_to_castle_grounds } + desc = ep3_laamp_decision_event.1000.c_second + } + #First time looking at the castle + desc = ep3_laamp_decision_event.1000.c + } + } + } + trigger = { + #Do we actually have the castle option available + custom_tooltip = { + text = tapped_out.tt + is_target_in_variable_list = { + name = list_of_options + target = flag:has_castle_option + } + NOT = { exists = scope:laamp_decision_finished_castle_option } + } + } + show_as_unavailable = { + #Hide the options when we're _all_ done + trigger_if = { + limit = { + exists = scope:laamp_decision_finished_castle_option + 1000_time_to_go_home_trigger = no + } + always = yes + } + trigger_else = { always = no } + } + reason = castle_holding + #Actual transition event + custom_tooltip = ep3_laamp_decision_event.1000.c.tt + trigger_event = ep3_laamp_decision_event.1050 + ai_chance = { base = 100 } + } + #City Holding Option: Visit the local fine craftsmen + option = { + name = { + text = { + first_valid = { + #Return to look at the craftsmen + triggered_desc = { + trigger = { exists = scope:been_to_craftsmen } + desc = ep3_laamp_decision_event.1000.d_second + } + #First time looking at craftsmen + desc = ep3_laamp_decision_event.1000.d + } + } + } + #Do we have few enough options to display this option on the main page + trigger = { + #Do we actually have the craftsmenned option available + custom_tooltip = { + text = tapped_out.tt + is_target_in_variable_list = { + name = list_of_options + target = flag:has_craftsman_option + } + NOT = { exists = scope:laamp_decision_finished_craftsmen_option } + } + } + show_as_unavailable = { + #Hide the options when we're _all_ done + trigger_if = { + limit = { + exists = scope:laamp_decision_finished_craftsmen_option + 1000_time_to_go_home_trigger = no + } + always = yes + } + trigger_else = { always = no } + } + reason = city_holding + #We got kick-off! + 1000_update_last_location_effect = { LOCATION_FLAG = flag:main_square } + #Actual transition event + custom_tooltip = ep3_laamp_decision_event.1000.d.tt + trigger_event = ep3_laamp_decision_event.1060 + ai_chance = { base = 100 } + } + #Tribal Holding Option: Visit the local tavern + option = { + name = { + text = { + first_valid = { + #Return to the tavern + triggered_desc = { + trigger = { exists = scope:been_to_tavern } + desc = ep3_laamp_decision_event.1000.a_second + } + #They're nomads + triggered_desc = { + trigger = { 1000_is_a_nomadic_holding_trigger = yes } + desc = ep3_laamp_decision_event.1000.a_nomads + } + #First time visiting the tavern + desc = ep3_laamp_decision_event.1000.a_tavern + } + } + } + trigger = { + #Do we actually have the tavern option available + custom_tooltip = { + text = tapped_out.tt + is_target_in_variable_list = { + name = list_of_options + target = flag:has_tavern_option + } + NOT = { exists = scope:laamp_decision_finished_tavern_option } + } + } + show_as_unavailable = { + #Hide the options when we're _all_ done + trigger_if = { + limit = { + exists = scope:laamp_decision_finished_tavern_option + 1000_time_to_go_home_trigger = no + } + always = yes + } + trigger_else = { always = no } + } + reason = visit_tavern + #Actual transition event + if = { + limit = { 1000_is_a_nomadic_holding_trigger = yes } + custom_tooltip = ep3_laamp_decision_event.1000.a_nomads.tt + } + else = { custom_tooltip = ep3_laamp_decision_event.1000.a.tt } + trigger_event = ep3_laamp_decision_event.1030 + ai_chance = { base = 100 } + } + #Page 2: Consider additional options + option = { + name = ep3_laamp_decision_event.1000.h + trigger = { + #If we were initially maxed out on provisions but lost provisions while visiting other parts... + trigger_if = { + limit = { + NOT = { exists = scope:been_to_second } + } + always = yes + } + trigger_else_if = { + limit = { exists = scope:been_to_second } + custom_tooltip = { + text = tapped_out.tt + 1000_done_with_second_trigger = no + } + } + #Otherwise we're just done here + trigger_else = { + custom_tooltip = { + text = tapped_out.tt + NOT = { exists = scope:laamp_decision_second_finished } + } + } + #Nothing here for the AI + is_ai = no + } + show_as_unavailable = { + #Hide the options when we're _all_ done + trigger_if = { + limit = { + OR = { + AND = { + exists = scope:laamp_decision_second_finished + 1000_time_to_go_home_trigger = no + } + AND = { + exists = scope:been_to_second + 1000_time_to_go_home_trigger = no + } + } + + } + always = yes + } + trigger_else = { always = no } + } + #We got kick-off! + 1000_update_last_location_effect = { LOCATION_FLAG = flag:main_square } + #Actual transition event + custom_tooltip = ep3_laamp_decision_event.1000.h.tt + trigger_event = ep3_laamp_decision_event.1001 + } + #Let's go back to the camp + option = { + name = { + text = { + first_valid = { + #No options left, partner flavor + triggered_desc = { + trigger = { + 1000_time_to_go_home_trigger = yes + exists = scope:visiting_partner + } + desc = ep3_laamp_decision_event.1000.i_home_partner + } + #No options left + triggered_desc = { + trigger = { 1000_time_to_go_home_trigger = yes } + desc = ep3_laamp_decision_event.1000.i_home + } + #Let's get outta here + desc = ep3_laamp_decision_event.1000.i + } + } + } + custom_tooltip = ep3_laamp_decision_event.1000.i.tt + #For loc reasons + 1000_remember_settlement_effect = yes + 1000_clean_up_effect = yes + ai_chance = { base = 50 } + } + after = { + remove_variable ?= 1000_is_currently_raining + remove_variable ?= 1000_is_currently_snowing + remove_variable ?= 1000_is_currently_foggy + #For all options that are NOT Page 2 + if = { + limit = { + has_variable = return_from_location + NOT = { var:return_from_location = flag:main_square } + } + #We got kick-off! + 1000_update_last_location_effect = { LOCATION_FLAG = flag:main_square } + } + } +} + + +###################################################################### +# PAGE 2 +# ep3_laamp_decision_event.1001 +###################################################################### +# > Buy Supplies +# > Sell Artifact +# > Town Crier +# > Back to Main Square + +#Return to Page 2 +scripted_effect 1001_return_to_second_effect = { + custom_tooltip = ep3_laamp_decision_event.return.tt + trigger_event = ep3_laamp_decision_event.1001 +} + +scripted_effect 1001_been_to_second_effect = { + if = { + limit = { + NOT = { exists = scope:been_to_second } + } + save_scope_as = been_to_second + } +} + + +#Page 2 - Consider additional options +ep3_laamp_decision_event.1001 = { + type = character_event + title = ep3_laamp_decision_event.1000.t + window = visit_settlement_window + desc = { + #INTRO + first_valid = { + ##RETURN: We've returned to this scene, now what + #RETURN: We have no options left - time to go home + triggered_desc = { + trigger = { 1000_done_with_second_trigger = yes } + desc = ep3_laamp_decision_event.1001.desc_intro_return_finished + } + #RETURN: You just returned from assaulting the supply merchant + triggered_desc = { + trigger = { + var:return_from_location ?= flag:supply_merchant + has_variable = 1010_guards_summoned + } + desc = ep3_laamp_decision_event.1001.desc_intro_returned_from_assaulting_supplies + } + #RETURN: Return from where? + random_valid = { + #RETURN: We've returned from Supply Merchant + triggered_desc = { + trigger = { var:return_from_location ?= flag:supply_merchant } + desc = ep3_laamp_decision_event.1001.desc_intro_returned_from_supplies + } + #RETURN: We've returned from Artifact Peddler + triggered_desc = { + trigger = { var:return_from_location ?= flag:artifact_peddler } + desc = ep3_laamp_decision_event.1001.desc_intro_returned_from_artifacts + } + #RETURN: We've returned from Town Crier + triggered_desc = { + trigger = { var:return_from_location ?= flag:contract } + desc = ep3_laamp_decision_event.1001.desc_intro_returned_from_contract + } + #RETURN: Generics to mix in + random_valid = { + #Generics + triggered_desc = { + trigger = { exists = scope:been_to_second } + desc = ep3_laamp_decision_event.1001.desc_intro_returned_generic_01 + } + triggered_desc = { + trigger = { exists = scope:been_to_second } + desc = ep3_laamp_decision_event.1001.desc_intro_returned_generic_02 + } + } + } + #FIRST TIME + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + NOT = { exists = scope:been_to_second } + } + desc = ep3_laamp_decision_event.1001.desc_intro_nomads + } + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_second } + } + desc = ep3_laamp_decision_event.1001.desc_intro + } + } + #OUTRO + first_valid = { + ##RETURN HOME + #RETURN HOME: No partner, time to go home + triggered_desc = { + trigger = { + 1000_done_with_second_trigger = yes + NOT = { exists = scope:visiting_partner } + } + desc = ep3_laamp_decision_event.1001.desc_outro_return_finished + } + #RETURN HOME: Partner feels it's time to go home + triggered_desc = { + trigger = { + 1000_done_with_second_trigger = yes + exists = scope:visiting_partner + } + desc = ep3_laamp_decision_event.1001.desc_outro_return_partner_finished + } + #RETURN: Virtually re-using the ones from Main Square + random_valid = { + #RETURN: Region - Europe + triggered_desc = { + trigger = { + exists = scope:been_to_second + middle_of_year_season_trigger = yes + scope:visiting_location = { + geographical_region = world_europe + NOT = { geographical_region = world_europe_north } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_europe_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { + geographical_region = world_europe + NOT = { geographical_region = world_europe_north } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_europe_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { + geographical_region = world_europe + NOT = { geographical_region = world_europe_north } + faith = { religion_tag = christianity_religion } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_europe_returned_03 + } + #RETURN: Region - Iberia + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_europe_west_iberia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_iberia_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_europe_west_iberia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_iberia_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_europe_west_iberia } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_iberia_returned_03 + } + #RETURN: Region - Middle East + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_middle_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_middle_east_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_middle_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_middle_east_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_middle_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_middle_east_returned_03 + } + #RETURN: Region - India + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_03 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_04 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_india } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_india_returned_05 + } + + #RETURN: Region - Steppe + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_steppe } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_steppe_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_steppe } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_steppe_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_steppe } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_steppe_returned_03 + } + #RETURN: Region - North Africa + triggered_desc = { + trigger = { + exists = scope:been_to_second + middle_of_year_season_trigger = yes + scope:visiting_location = { geographical_region = world_africa_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_north_africa_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_north_africa_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_north } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_north_africa_returned_03 + } + #RETURN: Region - West Africa + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_west } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_west_africa_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_west } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_west_africa_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_west } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_west_africa_returned_03 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_west } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_west_africa_returned_04 + } + #RETURN: Region - East Africa + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_east_africa_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_east_africa_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_east_africa_returned_03 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_location = { geographical_region = world_africa_east } + } + desc = ep3_laamp_decision_event.1000.desc_outro_regional_east_africa_returned_04 + } + #RETURN: Region - Generic + triggered_desc = { + trigger = { exists = scope:been_to_second } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_01 + } + triggered_desc = { + trigger = { exists = scope:been_to_second } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + middle_of_year_season_trigger = yes + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_03 + } + triggered_desc = { + trigger = { exists = scope:been_to_second } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_04 + } + triggered_desc = { + trigger = { exists = scope:been_to_second } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_05 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + middle_of_year_season_trigger = yes + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_06 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + middle_of_year_season_trigger = yes + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_generic_07 + } + #RETURN: Partner looks around + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_partner ?= { + NOR = { + has_trait = cynical + has_trait = paranoid + has_trait = callous + } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_01 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_partner ?= { is_adult = no } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_02 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_partner ?= { is_adult = no } + NOR = { + has_trait = irritable + has_trait = wrathful + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_03 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_partner ?= { + NOR = { + has_trait = cynical + has_trait = lifestyle_reveler + any_secret = { + type = secret_non_believer + } + } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_04 + } + triggered_desc = { + trigger = { + exists = scope:been_to_second + scope:visiting_partner ?= { + OR = { + has_relation_friend = root + has_relation_lover = root + is_close_family_of = root + } + } + } + desc = ep3_laamp_decision_event.1000.desc_outro_returned_partner_generic_05 + } + } + + } + } + theme = landless_adventurer + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_generic" } + #Indenting backgrounds for easier folding + #HOME: Tribe + override_background = { + trigger = { + 1000_time_to_go_home_trigger = yes + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + reference = bp1_bonfire + } + #HOME + override_background = { + trigger = { 1000_time_to_go_home_trigger = yes} + reference = alley_night + } + #Snowing in tribal Scandinavia + override_background = { + trigger = { is_snowy_rural_scandinavia_location_trigger = yes } + reference = ep2_hunt_snowy_forest + } + #Tribe Holding + override_background = { + trigger = { + scope:visiting_location = { has_holding_type = tribal_holding } + } + reference = village + } + override_background = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + reference = mpo_camp_steppe + } + #Constantinople + override_background = { + trigger = { exists = scope:is_constantinople } + reference = ep3_constantinople + } + #Church Holding + override_background = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + } + reference = holy_site_generic + } + #Castle Holding + override_background = { + trigger = { + scope:visiting_location = { has_holding_type = castle_holding } + } + reference = courtyard_location + } + #City Holding + override_background = { + trigger = { + scope:visiting_location = { has_holding_type = city_holding } + } + reference = ep3_city_gate + } + #Fallback + override_background = { reference = market } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #Time to go home + triggered_animation = { + trigger = { 1000_time_to_go_home_trigger = yes } + animation = boredom + } + #Friendly + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_friendly_traits = yes } + } + animation = personality_content + } + #Business-minded + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_commerce_traits = yes } + } + animation = thinking + } + #Uninterested + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_uninterested_traits = yes } + } + animation = personality_callous + } + #Irrational + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_irrational_traits = yes } + } + animation = eccentric + } + #A bit awkward + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_standoffish_traits = yes } + } + animation = shame + } + animation = personality_bold + } + center_portrait = { + character = root + triggered_animation = { + trigger = { 1010_has_irrational_traits = yes } + animation = personality_irrational + } + triggered_animation = { + trigger = { 1010_has_standoffish_traits = yes } + animation = personality_coward + } + triggered_animation = { + trigger = { 1010_has_uninterested_traits = yes } + animation = personality_cynical + } + animation = personality_rational + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #It just works. (To get the appropriate loc when you snub the artifact vendor at the last minute, then refresh when we exit & re-enter) + remove_variable ?= 1021_artifact_sell_screen + } + #Option: Stock up on supplies + option = { + name = { + text = { + first_valid = { + #Return to look at supplies + triggered_desc = { + trigger = { exists = scope:did_not_buy_supplies } + desc = ep3_laamp_decision_event.1001.a_second + } + #First time looking at supplies + desc = ep3_laamp_decision_event.1001.a + } + } + } + trigger = { + #You recently botched threatening this merchant + trigger_if = { + limit = { has_variable = 1010_guards_summoned } + custom_tooltip = { + text = guards_were_summoned.tt + NOT = { has_variable = 1010_guards_summoned } + } + } + #Already got a hand-out from this merchant + trigger_else_if = { + limit = { scope:laamp_decision_bought_supplies ?= flag:handout } + custom_tooltip = { + text = already_received_supplies.tt + NOT = { scope:laamp_decision_bought_supplies ?= flag:handout } + } + } + #Already bought provisions this visit + trigger_else_if = { + limit = { exists = scope:laamp_decision_bought_supplies } + custom_tooltip = { + text = already_bought_supplies.tt + NOT = { exists = scope:laamp_decision_bought_supplies } + } + } + #Already at max provisions + trigger_else = { + custom_tooltip = { + text = full_on_supplies.tt + NOT = { + domicile ?= { provisions = max_provisions } + } + } + } + } + #Since this is semi-dynamic, show it always + show_as_unavailable = { always = yes } + reason = buy_provisions + #For loc + 1001_been_to_second_effect = yes + #Actual transition event + custom_tooltip = ep3_laamp_decision_event.1001.a.tt + trigger_event = ep3_laamp_decision_event.1010 + } + #Option: Sell an artifact to local peddlers + option = { + name = { + text = { + first_valid = { + #Return to sell artifacts + triggered_desc = { + trigger = { exists = scope:did_not_sell_artifact } + desc = ep3_laamp_decision_event.1001.b_second + } + #First time selling artifacts + desc = ep3_laamp_decision_event.1001.b + } + } + } + trigger = { + #Do we actually have the artifact option available + trigger_if = { + limit = { + is_target_in_variable_list = { + name = list_of_options + target = flag:has_artifact_option + } + } + always = yes + } + trigger_else_if = { + limit = { exists = scope:laamp_decision_sold_artifact } + custom_tooltip = { + text = already_sold_artifact.tt + #We haven't already sold an artifact + NOT = { exists = scope:laamp_decision_sold_artifact } + } + } + trigger_else = { always = no } + } + show_as_unavailable = { + #Only show it if it was available from the start + trigger_if = { + limit = { exists = scope:laamp_decision_sold_artifact } + always = yes + } + trigger_else = { always = no } + } + reason = sell_artifacts + #For loc + 1001_been_to_second_effect = yes + #Actual transition event + custom_tooltip = ep3_laamp_decision_event.1001.b.tt + #Back to smirk-town with you + if = { + limit = { exists = scope:attempted_artifact_haggle } + trigger_event = ep3_laamp_decision_event.1021 + } + #Otherwise regular peddler + else = { trigger_event = ep3_laamp_decision_event.1020 } + } + #Option: Head to the Town Crier for contracts + option = { + name = { + text = { + first_valid = { + #Return to look at contracts + triggered_desc = { + trigger = { exists = scope:been_to_contract } + desc = ep3_laamp_decision_event.1001.c_second + } + #First time looking at contracts + desc = ep3_laamp_decision_event.1001.c + } + } + } + trigger = { + #You are still on cooldown (you can go in to the board once to realize the board is empty, then the option greys out) + trigger_if = { + limit = { scope:laamp_decision_has_contracted ?= flag:no } + custom_tooltip = { + text = no_contracts.tt + always = no + } + } + #You have spawned contracts during this visit + trigger_else_if = { + limit = { + OR = { + has_variable = 1025_has_contracted_recently + scope:laamp_decision_has_contracted ?= flag:yes + } + } + custom_tooltip = { + text = already_spawned_contracts.tt + always = no + } + } + #Otherwise, have a look (except for the AI, who take contracts through a different system) + trigger_else = { is_ai = no } + } + #Notice board can be empty, so no real cooldown? + show_as_unavailable = { always = yes } + reason = spawn_contracts + #For loc + 1001_been_to_second_effect = yes + #Actual transition event + custom_tooltip = ep3_laamp_decision_event.1001.c.tt + trigger_event = ep3_laamp_decision_event.1025 + } + #Go back to Main Square + option = { + name = ep3_laamp_decision_event.1001.d + #Time to close off the option? + if = { + limit = { 1000_done_with_second_trigger = yes } + save_scope_as = laamp_decision_second_finished + } + else_if = { + limit = { + NOT = { exists = scope:been_to_second } + } + save_scope_as = been_to_second + } + #We got kick-off! + 1000_update_last_location_effect = { LOCATION_FLAG = flag:second } + #Go back to the main event + 1000_return_to_main_effect = yes + } +} + + +###################################################################### +# BUY SUPPLIES +# ep3_laamp_decision_event.1010 +###################################################################### + +#Remember merchant for loc +scripted_effect 1010_remember_vendor_character_effect = { + #Do we already remember them? + if = { + limit = { + has_variable = laamp_remembered_$GUILD$s_list #Notice the 's' right after GUILD (= 'merchants' instead of 'merchant') + any_in_list = { + variable = laamp_remembered_$GUILD$s_list + this = $CHARACTER$ + } + } + #Replace old entry with a new one + remove_list_variable = { + name = laamp_remembered_$GUILD$s_list + target = $CHARACTER$ + } + add_to_variable_list = { + name = laamp_remembered_$GUILD$s_list + target = $CHARACTER$ + years = 10 + } + } + #Otherwise just add 'em to the list + else = { + add_to_variable_list = { + name = laamp_remembered_$GUILD$s_list + target = $CHARACTER$ + years = 10 + } + } +} + +#Set the correct variable to adjust loc for the Buy Supply option +scripted_effect 1010_bought_supplies_effect = { + save_scope_value_as = { + name = laamp_decision_bought_supplies + value = flag:none + } + #Go back to the main event + hidden_effect = { 1001_return_to_second_effect = yes } +} + +#No prisoners. No rivals. No service. +scripted_trigger 1010_basic_merchant_checks_trigger = { + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + is_available_adult = yes + #No double-dipping + trigger_if = { + limit = { exists = scope:laamp_supply_merchant } + this != scope:laamp_supply_merchant + } + trigger_if = { + limit = { exists = scope:laamp_artifact_peddler } + this != scope:laamp_artifact_peddler + } + trigger_if = { + limit = { exists = scope:laamp_town_crier } + this != scope:laamp_town_crier + } + + #Tavern + trigger_if = { + limit = { exists = scope:laamp_storyteller } + this != scope:laamp_storyteller + } + trigger_if = { + limit = { exists = scope:laamp_first_recruit } + this != scope:laamp_first_recruit + } + trigger_if = { + limit = { exists = scope:laamp_second_recruit } + this != scope:laamp_second_recruit + } + trigger_if = { + limit = { exists = scope:laamp_third_recruit } + this != scope:laamp_third_recruit + } + trigger_if = { + limit = { exists = scope:laamp_generic_jane } + this != scope:laamp_generic_jane + } + trigger_if = { + limit = { exists = scope:laamp_spouse_material } + this != scope:laamp_spouse_material + } + trigger_if = { + limit = { exists = scope:laamp_hooded_figure } + this != scope:laamp_hooded_figure + } + + #Church + trigger_if = { + limit = { exists = scope:laamp_healer_character } + this != scope:laamp_healer_character + } + trigger_if = { + limit = { exists = scope:laamp_clergy_character } + this != scope:laamp_clergy_character + } + trigger_if = { + limit = { exists = scope:laamp_physician_recruit } + this != scope:laamp_physician_recruit + } + + #Castle + trigger_if = { + limit = { exists = scope:laamp_plain_guard } + this != scope:laamp_plain_guard + } + trigger_if = { + limit = { exists = scope:laamp_talented_guard } + this != scope:laamp_talented_guard + } + trigger_if = { + limit = { exists = scope:laamp_disgruntled_moa } + this != scope:laamp_disgruntled_moa + } + trigger_if = { + limit = { exists = scope:laamp_maa_reinforcer } + this != scope:laamp_maa_reinforcer + } + trigger_if = { + limit = { exists = scope:laamp_bodyguard_recruit } + this != scope:laamp_bodyguard_recruit + } + + #City + trigger_if = { + limit = { exists = scope:laamp_weaponsmith_craftsman } + this != scope:laamp_weaponsmith_craftsman + } + trigger_if = { + limit = { exists = scope:laamp_armorer_craftsman} + this != scope:laamp_armorer_craftsman + } + trigger_if = { + limit = { exists = scope:laamp_jeweler_craftsman } + this != scope:laamp_jeweler_craftsman + } + trigger_if = { + limit = { exists = scope:laamp_quartermaster_recruit } + this != scope:laamp_quartermaster_recruit + } +} + +#Scripty-scripted repeat triggers to check if we already saved this character +scripted_trigger 1010_is_a_saved_merchant_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_merchants_list + target = scope:saved_character_check + } + } +} + +scripted_trigger 1010_is_a_saved_peddler_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_peddlers_list + target = scope:saved_character_check + } + } +} + +scripted_trigger 1010_is_a_saved_crier_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_criers_list + target = scope:saved_character_check + } + } +} + +#Tavern +scripted_trigger 1010_is_a_saved_storyteller_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_storytellers_list + target = scope:saved_character_check + } + } +} + +scripted_trigger 1010_is_a_saved_thief_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_thiefs_list #Don't judge me, 'thiefs' is most consequential + target = scope:saved_character_check + } + } +} + +#Church +scripted_trigger 1010_is_a_saved_healer_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_healers_list + target = scope:saved_character_check + } + } +} + +scripted_trigger 1010_is_a_saved_clergy_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_clergys_list + target = scope:saved_character_check + } + } +} + +scripted_trigger 1010_is_a_saved_physician_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_physicians_list + target = scope:saved_character_check + } + } +} + +#Castle +scripted_trigger 1010_is_a_saved_bodyguard_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_bodyguards_list + target = scope:saved_character_check + } + } +} + +#Craftsmen +scripted_trigger 1010_is_a_saved_weaponsmith_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_weaponsmiths_list + target = scope:saved_character_check + } + } +} + +scripted_trigger 1010_is_a_saved_armorer_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_armorers_list + target = scope:saved_character_check + } + } +} + +scripted_trigger 1010_is_a_saved_jeweler_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_jewelers_list + target = scope:saved_character_check + } + } +} + +scripted_trigger 1010_is_a_saved_quartermaster_trigger = { + root = { + is_target_in_variable_list = { + name = laamp_remembered_quartermasters_list + target = scope:saved_character_check + } + } +} + +#Can we actually? +scripted_trigger 1010_would_trade_child_for_supplies_trigger = { + OR = { + AND = { + #Normal people wouldn't trade away a child for a 'top-up' + OR = { + has_trait = greedy + has_trait = callous + } + scope:1010_supply_less_than ?= flag:1010_less_than_100_supply + } + AND = { + exists = scope:1010_supply_less_than + OR = { + scope:1010_supply_less_than = flag:1010_less_than_20_supply + scope:1010_supply_less_than = flag:1010_less_than_40_supply + scope:1010_supply_less_than = flag:1010_less_than_60_supply + scope:1010_supply_less_than = flag:1010_less_than_80_supply + } + } + } + exists = scope:payment_child +} + +#Don't trade away your heir +scripted_trigger 1010_payment_child_trigger = { + age >= 2 + age <= 15 + is_courtier_of = root + NOT = { is_primary_heir_of = root } + save_temporary_scope_as = child_check + root.primary_title = { + place_in_line_of_succession = { + target = scope:child_check + value >= 3 + } + } + is_available = yes + location = scope:visiting_location + #Let's just avoid some technical headaches if we brought a kid along + trigger_if = { + limit = { exists = scope:visiting_partner } + this != scope:visiting_partner + } +} + +scripted_trigger 1010_is_thieving_character_trigger = { + #intrigue >= extremely_high_skill_rating + NOR = { + has_trait = honest + has_trait = just + } + is_adult = yes +} + +#Mark that child +scripted_effect 1010_mark_chosen_child_effect = { + scope:payment_child = { + if = { + limit = { has_variable = 1010_payment_child } + remove_variable ?= 1010_payment_child + set_variable = { + name = 1010_payment_child + days = visit_settlement_cooldown_days + } + } + else = { + set_variable = { + name = 1010_payment_child + days = visit_settlement_cooldown_days + } + } + } +} + +#Supply duel for your highest skill stat +scripted_effect 1010_highest_skill_duel_effect = { + if = { + limit = { highest_skill = diplomacy } + 1010_duel_effect = { SKILL = diplomacy } + } + else_if = { + limit = { highest_skill = stewardship } + 1010_duel_effect = { SKILL = stewardship } + } + else_if = { + limit = { highest_skill = intrigue } + 1010_duel_effect = { SKILL = intrigue } + } + else_if = { + limit = { highest_skill = learning } + 1010_duel_effect = { SKILL = learning } + } + else_if = { + limit = { highest_skill = martial } + 1010_duel_effect = { SKILL = martial } + } + else_if = { + limit = { highest_skill_including_prowess = prowess } + 1010_duel_effect = { SKILL = prowess } + } +} + +#Actual supply duel effect +scripted_effect 1010_duel_effect = { + duel = { + skill = $SKILL$ + target = scope:laamp_supply_merchant + #Success: Half supply for free + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamp_decision_event.1010.a_$SKILL$.success + send_interface_toast = { + title = ep3_laamp_decision_event.1010.a_$SKILL$.success + left_icon = root + right_icon = scope:laamp_supply_merchant + #Get 1/4 of your way to 100% (So if max is 100 and you have 20 provisions, you should gain 40 provisions) + domicile ?= { change_provisions = quarter_to_max_provisions_value } + #Set up the cooldown for the convince-ction + set_variable = { + name = 1010_has_convinced_recently + value = flag:success + days = visit_settlement_minimum_cooldown_days #Sync this with fail & critical_fail + } + #Determine why we can't return to this option + save_scope_value_as = { + name = laamp_decision_bought_supplies + value = flag:handout + } + #Go back to the main event + hidden_effect = { 1001_return_to_second_effect = yes } + } + } + #Failure: Increased price for supplies + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + desc = ep3_laamp_decision_event.1010.a_$SKILL$.failure + send_interface_toast = { + title = ep3_laamp_decision_event.1010.a_$SKILL$.failure + left_icon = root + right_icon = scope:laamp_supply_merchant + custom_tooltip = ep3_laamp_decision_event.1010.a.failure.tt + #Set up the cooldown for the convince-ction + set_variable = { + name = 1010_has_convinced_recently + value = flag:fail + days = visit_settlement_minimum_cooldown_days #Sync this with success, critical_fail & the tooltip, currently displayed in 'months' (plural) + } + #Price increased - try again + 1001_return_to_second_effect = yes + } + } + #Critical Failure: The local guards are summoned + 5 = { + trigger = { + root = { + OR = { + highest_skill = martial + highest_skill_including_prowess = prowess + } + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + min = 5 + desc = ep3_laamp_decision_event.1010.a_$SKILL$.critical_failure + send_interface_toast = { + title = ep3_laamp_decision_event.1010.a_$SKILL$.critical_failure + left_icon = root + right_icon = scope:laamp_supply_merchant + custom_tooltip = ep3_laamp_decision_event.1010.a.failure.tt + #Set up the cooldown for the convince-ction + set_variable = { + name = 1010_has_convinced_recently + value = flag:fail + days = visit_settlement_minimum_cooldown_days #Sync this with success & critical_fail + } + #Quite the tussle + increase_wounds_effect = { REASON = fight } + #This merchant doesn't want to see you again + progress_towards_rival_effect = { + REASON = rival_tried_to_intimidate_merchant + CHARACTER = scope:laamp_supply_merchant + OPINION = default_rival_opinion + } + #And you will not be going back to supply merchant, but feel free to look at the greyed out option + set_variable = 1010_guards_summoned + #Determine why we can't return to this option + save_scope_value_as = { + name = laamp_decision_bought_supplies + value = flag:none + } + #Go back to the main event + 1001_return_to_second_effect = yes + } + } + } +} + + +#Stock 'Em Up +ep3_laamp_decision_event.1010 = { + type = character_event + title = ep3_laamp_decision_event.1010.t + window = visit_settlement_window + desc = { + #Intro + first_valid = { + #This is a CITY HOLDING, aschually. More refined buyers. + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + scope:visiting_location = { has_holding_type = city_holding } + } + desc = ep3_laamp_decision_event.1010.desc_posh_stalls + } + #We've returned to this scene + triggered_desc = { + trigger = { exists = scope:did_not_buy_supplies } + desc = ep3_laamp_decision_event.1010.desc_returned + } + #First time in this scene + desc = ep3_laamp_decision_event.1010.desc + } + #Returning customer + #FIRST TIME: The merchant remembers you + random_valid = { + #Friendly + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + exists = scope:laamp_recurring_supply_merchant + trigger_if = { + limit = { exists = scope:laamp_friendly_supply_merchant } + always = yes + } + trigger_else = { always = no } + } + desc = ep3_laamp_decision_event.1010.desc_reused_merchant_reaction_01 + } + #Slightly standoff-ish + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + exists = scope:laamp_recurring_supply_merchant + trigger_if = { + limit = { exists = scope:laamp_antagonistic_supply_merchant } + always = yes + } + trigger_else = { always = no } + } + desc = ep3_laamp_decision_event.1010.desc_reused_merchant_reaction_02 + } + } + #FIRST TIME: The merchant remembers you: First INTRO part of DIALOGUE + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + exists = scope:laamp_recurring_supply_merchant + } + desc = ep3_laamp_decision_event.1010.desc_reused_merchant_intro + } + #FIRST TIME: The merchant remembers you: Random MID part of DIALOGUE + random_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + exists = scope:laamp_recurring_supply_merchant + } + desc = ep3_laamp_decision_event.1010.desc_reused_merchant_01 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + exists = scope:laamp_recurring_supply_merchant + } + desc = ep3_laamp_decision_event.1010.desc_reused_merchant_02 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + exists = scope:laamp_recurring_supply_merchant + } + desc = ep3_laamp_decision_event.1010.desc_reused_merchant_03 + } + } + #FIRST TIME: The merchant remembers you: Random OUTRO part of DIALOGUE + random_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + exists = scope:laamp_recurring_supply_merchant + } + desc = ep3_laamp_decision_event.1010.desc_reused_merchant_outro_01 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_buy_supplies } + exists = scope:laamp_recurring_supply_merchant + } + desc = ep3_laamp_decision_event.1010.desc_reused_merchant_outro_02 + } + } + #First time meeting merchant + #FIRST TIME: Merchant REACTION + first_valid = { + #Friendly + triggered_desc = { + trigger = { + NOR = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + scope:laamp_supply_merchant = { 1010_has_friendly_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_gregarious_new + } + #Uninterested + triggered_desc = { + trigger = { + NOR = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + scope:laamp_supply_merchant = { 1010_has_uninterested_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_callous_new + } + #Business-minded + triggered_desc = { + trigger = { + NOR = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + scope:laamp_supply_merchant = { 1010_has_commerce_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_greedy_new + } + #A bit awkward + triggered_desc = { + trigger = { + NOR = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + scope:laamp_supply_merchant = { 1010_has_standoffish_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_shy_new + } + #Irrational + triggered_desc = { + trigger = { + NOR = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + scope:laamp_supply_merchant = { 1010_has_irrational_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_eccentric_new + } + #Generic + random_valid = { + triggered_desc = { + trigger = { + NOR = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + scope:laamp_supply_merchant = { 1011_has_no_applicable_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_generic_new_01 + } + triggered_desc = { + trigger = { + NOR = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + scope:laamp_supply_merchant = { 1011_has_no_applicable_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_generic_new_01 + } + } + } + #FIRST TIME in this scene: Random DIALOGUE + random_valid = { + triggered_desc = { + trigger = { + NOT = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + } + desc = ep3_laamp_decision_event.1010.desc_outro_new_01 + } + triggered_desc = { + trigger = { + NOT = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + } + desc = ep3_laamp_decision_event.1010.desc_outro_new_02 + } + triggered_desc = { + trigger = { + NOT = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + } + desc = ep3_laamp_decision_event.1010.desc_outro_new_03 + } + #"Cruel world innit?" + triggered_desc = { + trigger = { + NOT = { + exists = scope:did_not_buy_supplies + exists = scope:laamp_recurring_supply_merchant + } + scope:laamp_supply_merchant = { + OR = { + has_trait = compassionate + AND = { + age >= 30 + age >= root.age_plus_25 + } + } + } + } + desc = ep3_laamp_decision_event.1010.desc_outro_special_new_04 + } + } + #Return to scene + #RETURN: Merchant REACTION + first_valid = { + #Friendly + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_friendly_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_gregarious_return + } + #Uninterested + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_uninterested_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_callous_return + } + #Business-minded + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_commerce_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_greedy_return + } + #A bit awkward + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_standoffish_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_shy_return + } + #Irrational + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_irrational_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_trait_eccentric_return + } + #Generic + random_valid = { + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1011_has_no_applicable_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_generic_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1011_has_no_applicable_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_generic_returned_02 + } + } + } + #RETURN: Random DIALOGUE + random_valid = { + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_irrational_traits = no } #For some quirkyness + } + desc = ep3_laamp_decision_event.1010.desc_outro_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_irrational_traits = no } #For some quirkyness + } + desc = ep3_laamp_decision_event.1010.desc_outro_returned_02 + } + triggered_desc = { + trigger = { + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_irrational_traits = no } #For some quirkyness + } + desc = ep3_laamp_decision_event.1010.desc_outro_returned_03 + } + triggered_desc = { + trigger = { + #Irrational is seeing you for the first time (again) + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_irrational_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_outro_new_01 + } + triggered_desc = { + trigger = { + #Irrational is seeing you for the first time (again) + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_irrational_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_outro_new_02 + } + triggered_desc = { + trigger = { + #Irrational is seeing you for the first time (again) + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_irrational_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_outro_new_03 + } + triggered_desc = { + trigger = { + #Irrational is seeing you for the first time (again) + exists = scope:did_not_buy_supplies + scope:laamp_supply_merchant = { 1010_has_irrational_traits = yes } + } + desc = ep3_laamp_decision_event.1010.desc_outro_special_new_04 + } + } + first_valid = { + #RETURN: Sneaky Partner + triggered_desc = { + trigger = { + exists = scope:1010_potentiaL_thievery + exists = scope:did_not_buy_supplies + } + desc = ep3_laamp_decision_event.1010.desc_outro_sneaky_partner_returned + } + #FIRST TIME: Sneaky Partner + triggered_desc = { + trigger = { exists = scope:1010_potentiaL_thievery } + desc = ep3_laamp_decision_event.1010.desc_outro_sneaky_partner + } + } + } + theme = stewardship + override_background = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + reference = army_camp + } + override_background = { reference = market } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #Potential thief + triggered_animation = { + trigger = { exists = scope:1010_potentiaL_thievery } + animation = personality_dishonorable + } + #Friendly + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_friendly_traits = yes } + } + animation = personality_forgiving + } + #Business-minded + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_commerce_traits = yes } + } + animation = personality_greedy + } + #Uninterested + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_uninterested_traits = yes } + } + animation = personality_cynical + } + #Irrational + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + #A bit awkward + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_standoffish_traits = yes } + } + animation = personality_coward + } + animation = personality_content + } + center_portrait = { + character = root + camera = camera_event_scheme_center_look_semi_right + animation = steward + } + right_portrait = { + character = scope:laamp_supply_merchant + #Friendly + triggered_animation = { + trigger = { + scope:laamp_supply_merchant = { 1010_has_friendly_traits = yes } + } + animation = personality_compassionate + } + #Uninterested + triggered_animation = { + trigger = { + scope:laamp_supply_merchant = { 1010_has_uninterested_traits = yes } + } + animation = personality_callous + } + #Business-minded + triggered_animation = { + trigger = { + scope:laamp_supply_merchant = { 1010_has_commerce_traits = yes } + } + animation = admiration + } + #A bit awkward + triggered_animation = { + trigger = { + scope:laamp_supply_merchant = { 1010_has_standoffish_traits = yes } + } + animation = personality_coward + } + #Irrational + triggered_animation = { + trigger = { + scope:laamp_supply_merchant = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + animation = steward + } + lower_left_portrait = { + trigger = { exists = scope:payment_child } + character = scope:payment_child + } + lower_center_portrait = { + trigger = { + exists = scope:other_parent + trigger_if = { + limit = { exists = scope:visiting_partner } + scope:other_parent != scope:visiting_partner + } + } + character = scope:other_parent + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Find our merchant + if = { + #Do we already have a merchant? + limit = { + NOT = { exists = scope:laamp_supply_merchant } + } + #Has this person been our supply merchant in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_merchant_trigger = yes + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_supply_merchant + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_supply_merchant + scope:laamp_supply_merchant = { + if = { + limit = { + OR = { + has_trait = greedy + has_trait = craven + has_trait = wrathful + has_trait = deceitful + 1010_has_uninterested_traits = yes + } + } + save_scope_as = laamp_antagonistic_supply_merchant + } + else_if = { + limit = { + NOT = { exists = scope:laamp_antagonistic_supply_merchant } + OR = { + has_trait = gregarious + has_trait = compassionate + has_trait = honest + has_trait = eccentric + has_trait = forgiving + has_trait = trusting + } + } + save_scope_as = laamp_friendly_supply_merchant + } + } + } + #Otherwise find a merchant in the pool + if = { + limit = { + NOT = { exists = scope:laamp_supply_merchant } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + } + save_scope_as = laamp_supply_merchant + } + } + #Otherwise create a merchant + if = { + limit = { + NOT = { exists = scope:laamp_supply_merchant } + } + #Create merchant to stuff in pool + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_supply_merchant + } + } + #Remember the merchant + 1010_remember_vendor_character_effect = { GUILD = merchant CHARACTER = scope:laamp_supply_merchant } + } + #Determine how much supply we are buying, reflect this in cost and options available (don't trade away children for 5% supply...) + if = { + limit = { + OR = { + #If we haven't bought provisions already + NOT = { exists = scope:1010_supply_value } + #Or if we went here, then used provisions elsewhere in the holding and came back + AND = { + exists = scope:1010_supply_value + NOR = { + scope:1010_supply_value = domicile.max_provisions + scope:1010_supply_value = domicile.provisions + } + } + } + } + if = { + #Less than 20% supply + limit = { + domicile ?= { provisions <= twenty_percent_provisions_value } + } + save_scope_value_as = { + name = 1010_supply_less_than + value = flag:1010_less_than_20_supply + } + } + else_if = { + #Less than 40% supply + limit = { + domicile ?= { provisions <= forty_percent_provisions_value } + } + save_scope_value_as = { + name = 1010_supply_less_than + value = flag:1010_less_than_40_supply + } + } + else_if = { + #Less than 60% supply + limit = { + domicile ?= { provisions <= sixty_percent_provisions_value } + } + save_scope_value_as = { + name = 1010_supply_less_than + value = flag:1010_less_than_60_supply + } + } + else_if = { + #Less than 80% supply + limit = { + domicile ?= { provisions <= eighty_percent_provisions_value } + } + save_scope_value_as = { + name = 1010_supply_less_than + value = flag:1010_less_than_80_supply + } + } + else_if = { + #Less than 100% supply + limit = { + domicile ?= { provisions < max_provisions } + } + save_scope_value_as = { + name = 1010_supply_less_than + value = flag:1010_less_than_100_supply + } + } + set_variable = { + name = supply_gold_cost + value = { + value = domicile.max_provisions + subtract = domicile.provisions + #Now we have the missing provisions value + multiply = 0.05 + round = yes + } + } + save_scope_value_as = { + name = 1010_supply_value + value = domicile.provisions + } + } + #Find a suitable child. Don't trade away your heir. + if = { + limit = { + NOT = { exists = scope:payment_child } + 1010_would_trade_child_for_supplies_trigger = yes + } + #Did we already pick a child and are actually decision-scumming? + if = { + limit = { + any_child = { + 1010_payment_child_trigger = yes + has_variable = 1010_payment_child + } + } + random_child = { + limit = { + 1010_payment_child_trigger = yes + has_variable = 1010_payment_child + } + save_scope_as = payment_child + #Refresh the mark + 1010_mark_chosen_child_effect = yes + } + } + #Otherwise pick a child + if = { + limit = { + NOT = { exists = scope:payment_child } + any_child = { 1010_payment_child_trigger = yes } + } + every_child = { + limit = { 1010_payment_child_trigger = yes } + add_to_list = list_of_unimportant_children + } + random_in_list = { + list = list_of_unimportant_children + weight = { + base = 0 + #Look for children who can't inherit first + modifier = { + is_female = yes + root = { + OR = { + faith = { has_doctrine_parameter = male_dominated_law } + has_realm_law = male_only_law + } + } + add = 50 + } + modifier = { + is_male = yes + root = { + OR = { + faith = { has_doctrine_parameter = female_dominated_law } + has_realm_law = female_only_law + } + } + add = 50 + } + #Then the ones you like less + modifier = { + opinion = { + target = root + value <= 50 + } + add = 25 + } + modifier = { + opinion = { + target = root + value <= 30 + } + add = 25 + } + modifier = { + opinion = { + target = root + value <= 10 + } + add = 25 + } + modifier = { + opinion = { + target = root + value < 0 + } + add = 25 + } + modifier = { + has_relation_friend = root + factor = 0 + } + } + save_scope_as = payment_child + #No decision-scumming + 1010_mark_chosen_child_effect = yes + } + } + #Find the other parent of the child - should be adequately upset that you traded away their kid. You monster. + if = { + limit = { exists = scope:payment_child } + if = { + limit = { is_female = yes } + if = { + limit = { + scope:payment_child.father = { is_alive = yes } + } + scope:payment_child.father = { save_scope_as = other_parent } + } + } + else_if = { + limit = { + scope:payment_child.mother = { is_alive = yes } + } + scope:payment_child.mother = { save_scope_as = other_parent } + } + } + } + #Is our partner actually a bit thieving? + if = { + #This looks a bit weird, localization-wise. + limit = { + #We're not a master thief + NOT = { highest_skill = intrigue } + #But our friend is a competent thief + scope:visiting_partner ?= { 1010_is_thieving_character_trigger = yes } + NOT = { exists = scope:1010_potentiaL_thievery } + } + if = { + limit = { + NOT = { has_variable = 1010_calculated_thievery_punishment } + } + set_variable = { + name = 1010_calculated_thievery_punishment + value = { + integer_range = { + min = medium_trait_xp + max = major_trait_xp + } + } + days = visit_settlement_small_cooldown_days + } + } + save_scope_as = 1010_potentiaL_thievery + } + #Price tweaks! + if = { + limit = { exists = var:supply_gold_cost } + #You botched a convince duel, price increased + if = { + limit = { + var:1010_has_convinced_recently ?= flag:fail + NOT = { exists = scope:1010_adjusted_provision_cost } + } + change_variable = { + name = supply_gold_cost + multiply = 1.3 + } + save_scope_value_as = { + name = 1010_adjusted_provision_cost + value = flag:yes + } + } + #Random selection of price reductions + if = { + limit = { + NOT = { exists = scope:1010_applied_price_reductions } + } + #Perk discount + if = { + limit = { + root = { has_perk = war_profiteer_perk } + } + change_variable = { + name = supply_gold_cost + multiply = 0.75 + } + } + #Cheaper supplies in City Holding + if = { + limit = { + root.location = { has_holding_type = city_holding } + } + change_variable = { + name = supply_gold_cost + multiply = 0.7 + } + } + #Cheaper supplies from Camp Party + if = { + limit = { + has_character_flag = cheaper_provisions_visit_holding_flag + } + change_variable = { + name = supply_gold_cost + multiply = 0.6 + } + } + save_scope_value_as = { + name = 1010_applied_price_reductions + value = flag:yes + } + } + } + } + #Trade gold + option = { + name = ep3_laamp_decision_event.1010.b + trigger = { short_term_gold >= var:supply_gold_cost } + show_as_unavailable = { always = yes } + #Pay gold + remove_short_term_gold = var:supply_gold_cost + #Get supplies + domicile ?= { + change_provisions = { + value = { + value = max_provisions + subtract = provisions + } + } + } + #Set correct variables and reroute us to main square + 1010_bought_supplies_effect = yes + } + #Convince them to give you some supply for free + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { highest_skill = diplomacy } + desc = ep3_laamp_decision_event.1010.a_diplomacy + } + triggered_desc = { + trigger = { highest_skill = stewardship } + desc = ep3_laamp_decision_event.1010.a_stewardship + } + triggered_desc = { + trigger = { highest_skill = intrigue } + desc = ep3_laamp_decision_event.1010.a_intrigue + } + triggered_desc = { + trigger = { highest_skill = learning } + desc = ep3_laamp_decision_event.1010.a_learning + } + triggered_desc = { + trigger = { + OR = { + highest_skill = martial + highest_skill_including_prowess = prowess + } + } + desc = ep3_laamp_decision_event.1010.a_martial + } + } + } + } + trigger = { + #Are we on cooldown? + custom_tooltip = { + text = ep3_laamp_decision_event.1010.a.cooldown.tt + NOT = { has_variable = 1010_has_convinced_recently } + } + } + #Keep you informed of the cooldown + show_as_unavailable = { always = yes } + #Duel effect + 1010_highest_skill_duel_effect = yes + } + #Triggered Option: Trade child + option = { + name = { + trigger = { has_trait = callous } + text = ep3_laamp_decision_event.1010.c_callous + } + name = ep3_laamp_decision_event.1010.c + flavor = { + first_valid = { + triggered_desc = { + trigger = { has_trait = callous } + desc = ep3_laamp_decision_event.1010.c.flavor_callous + } + desc = ep3_laamp_decision_event.1010.c.flavor + } + } + trigger = { + exists = scope:payment_child + #For sanity reasons + is_ai = no + } + highlight_portrait = scope:payment_child + #Pay child + scope:payment_child = { + add_opinion = { + modifier = traded_me_away_opinion + target = root + opinion = -50 + } + progress_towards_rival_effect = { + REASON = rival_traded_away_child + CHARACTER = root + OPINION = default_rival_opinion + } + move_to_pool = yes + } + if = { + limit = { exists = scope:other_parent } + scope:other_parent = { + add_opinion = { + modifier = traded_away_child_opinion + target = root + opinion = -50 + } + } + } + #Get supplies + domicile ?= { change_provisions = max_provisions } + #Give appropriate amounts of stress + stress_impact = { + compassionate = major_stress_impact_gain + } + #Set correct variables and reroute us to main square + 1010_bought_supplies_effect = yes + } + #Triggered Option: Intrigue-y visiting partner steals some supply for you + option = { + name = ep3_laamp_decision_event.1010.d + trigger = { + exists = scope:1010_potentiaL_thievery + #Are we on cooldown? + custom_tooltip = { + text = ep3_laamp_decision_event.1010.d.cooldown.tt + NOT = { has_variable = 1010_has_stolen_recently } + } + } + flavor = ep3_laamp_decision_event.1010.d.flavor + show_as_unavailable = { exists = scope:1010_potentiaL_thievery } + scope:visiting_partner = { + duel = { + skill = intrigue + target = scope:laamp_supply_merchant + #Success: Supplies! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamp_decision_event.1010.d.success + root = { + send_interface_toast = { + title = ep3_laamp_decision_event.1010.d.success + left_icon = scope:visiting_partner + right_icon = scope:laamp_supply_merchant + #Successful theft! + domicile ?= { change_provisions = half_to_max_provisions_value } + #Set up the cooldown for the convince-action + set_variable = { + name = 1010_has_stolen_recently + value = flag:success + days = visit_settlement_minimum_cooldown_days #Sync this with fail + } + #Determine why we can't return to this option + save_scope_value_as = { + name = laamp_decision_bought_supplies + value = flag:none + } + #Go back to the main event + hidden_effect = { 1001_return_to_second_effect = yes } + } + } + + } + #Failure: The local guards are summoned + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + min = 5 + desc = ep3_laamp_decision_event.1010.d.failure + root = { + send_interface_toast = { + title = ep3_laamp_decision_event.1010.d.failure + left_icon = scope:visiting_partner + right_icon = scope:laamp_supply_merchant + #Quite the tussle + scope:visiting_partner = { + increase_wounds_effect = { REASON = fight } + } + custom_tooltip = ep3_laamp_decision_event.1010.a.failure.tt + #Set up the cooldown for the convince-action + set_variable = { + name = 1010_has_stolen_recently + value = flag:fail + days = visit_settlement_minimum_cooldown_days #Sync this with success + } + #This merchant doesn't want to see you again + progress_towards_rival_effect = { + REASON = rival_tried_to_steal_supplies + CHARACTER = scope:laamp_supply_merchant + OPINION = default_rival_opinion + } + #And you will not be going back to supply merchant, but feel free to look at the greyed out option + set_variable = 1010_guards_summoned + #Determine why we can't return to this option + save_scope_value_as = { + name = laamp_decision_bought_supplies + value = flag:none + } + #Go back to the main event + 1001_return_to_second_effect = yes + } + } + } + } + } + } + #I want to do something else + option = { + name = ep3_laamp_decision_event.1010.e + #For desc flavor + save_scope_as = did_not_buy_supplies + #Go back to the main event + 1001_return_to_second_effect = yes + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:supply_merchant } + } +} + + +###################################################################### +# SELL ARTIFACT +# ep3_laamp_decision_event.1020 +###################################################################### + +scripted_effect 1020_suppress_artifact_notifications_effect = { + #Don't need no notification about this + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 2 + } +} + +scripted_effect 1020_remove_sell_variables_effect = { + remove_variable ?= 1020_artifact_sell_value + remove_variable ?= 1020_artifact_sell_high_value + remove_variable ?= 1020_artifact_sell_low_value +} + +#Set the correct variable to block off the Artifact option and remove the desc flavor variable +scripted_effect 1020_sold_artifact_effect = { + scope:1020_first_artifact_to_sell ?= { 1020_remove_sell_variables_effect = yes } + scope:1020_second_artifact_to_sell ?= { 1020_remove_sell_variables_effect = yes } + scope:1020_third_artifact_to_sell ?= { 1020_remove_sell_variables_effect = yes } + remove_list_variable = { + name = list_of_options + target = flag:has_artifact_option + } + remove_variable ?= 1021_artifact_sell_screen + save_scope_as = laamp_decision_sold_artifact + #Go back to the main event + hidden_effect = { 1001_return_to_second_effect = yes } +} + +#Reused effect to set the variable +scripted_effect 1020_set_artifact_value_variables_effect = { + #Regular price + set_variable = { + name = 1020_artifact_sell_value + value = { + value = $GOLD_VALUE$ + #Better buyers in City Holding + if = { + limit = { + scope:visiting_location = { has_holding_type = city_holding } + } + multiply = { 1.15 1.25 } + } + multiply = { 0.90 1.1 } + } + } + #Haggle success / Outraged partner price + set_variable = { + name = 1020_artifact_sell_high_value + value = { + value = var:1020_artifact_sell_value + #Better buyers in City Holding + if = { + limit = { + scope:visiting_location = { has_holding_type = city_holding } + } + multiply = { 1.15 1.25 } + } + #Haggle success / Outraged partner price + multiply = { 1.15 1.25 } + } + } + #Haggle failed price + set_variable = { + name = 1020_artifact_sell_low_value + value = { + value = var:1020_artifact_sell_value + #Better buyers in City Holding + if = { + limit = { + scope:visiting_location = { has_holding_type = city_holding } + } + multiply = { 1.15 1.25 } + } + #Haggle failed price + multiply = { 0.55 0.8 } + } + } +} + +#Calculate how much the artifact is worth +scripted_effect 1020_calculate_artifact_value_effect = { + #Very expensive + if = { + limit = { rarity = illustrious } + 1020_set_artifact_value_variables_effect = { GOLD_VALUE = root.massive_gold_value } + } + #Expensive + else_if = { + limit = { rarity = famed } + 1020_set_artifact_value_variables_effect = { GOLD_VALUE = root.major_gold_value } + } + #OK price + else_if = { + limit = { rarity = masterwork } + 1020_set_artifact_value_variables_effect = { GOLD_VALUE = root.medium_gold_value } + } + #Cheap + else_if = { + limit = { rarity = common } + 1020_set_artifact_value_variables_effect = { GOLD_VALUE = root.minor_gold_value } + } +} + + +#Sell an artifact to local peddlers +ep3_laamp_decision_event.1020 = { + type = character_event + title = ep3_laamp_decision_event.1020.t + window = visit_settlement_window + desc = { + #Intro + first_valid = { + #FIRST TIME: We've seen this peddler before + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + exists = scope:laamp_recurring_artifact_peddler + } + desc = ep3_laamp_decision_event.1020.desc_intro_reused_peddler + } + #FIRST TIME: This is a CITY HOLDING, aschually. More refined buyers. + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + scope:visiting_location = { has_holding_type = city_holding } + } + desc = ep3_laamp_decision_event.1020.desc_intro_posh_stalls + } + #RETURN SELL SCREEN: Guess we're thinking very hard + random_valid = { + triggered_desc = { + trigger = { has_variable = 1021_artifact_sell_screen } + desc = ep3_laamp_decision_event.1020.desc_intro_intermediate_returned_01 + } + triggered_desc = { + trigger = { has_variable = 1021_artifact_sell_screen } + desc = ep3_laamp_decision_event.1020.desc_intro_intermediate_returned_02 + } + } + #RETURN: We've returned to this scene, now what + random_valid = { + triggered_desc = { + trigger = { exists = scope:did_not_sell_artifact } + desc = ep3_laamp_decision_event.1020.desc_intro_returned_01 + } + triggered_desc = { + trigger = { exists = scope:did_not_sell_artifact } + desc = ep3_laamp_decision_event.1020.desc_intro_returned_02 + } + } + #FIRST TIME: Intro + random_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + } + desc = ep3_laamp_decision_event.1020.desc_intro_new_01 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + } + desc = ep3_laamp_decision_event.1020.desc_intro_new_02 + } + } + } + #FIRST TIME: Artifact Flavor + first_valid = { + #FIRST TIME: One artifact + random_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + exists = scope:1020_first_artifact_to_sell + NOT = { exists = scope:1020_second_artifact_to_sell } + NOT = { exists = scope:1020_third_artifact_to_sell } + } + desc = ep3_laamp_decision_event.1020.desc_one_artifact_new_01 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + exists = scope:1020_first_artifact_to_sell + NOT = { exists = scope:1020_second_artifact_to_sell } + NOT = { exists = scope:1020_third_artifact_to_sell } + } + desc = ep3_laamp_decision_event.1020.desc_one_artifact_new_02 + } + } + #FIRST TIME: Two artifacts + random_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + exists = scope:1020_first_artifact_to_sell + exists = scope:1020_second_artifact_to_sell + NOT = { exists = scope:1020_third_artifact_to_sell } + } + desc = ep3_laamp_decision_event.1020.desc_two_artifacts_new_01 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + exists = scope:1020_first_artifact_to_sell + exists = scope:1020_second_artifact_to_sell + NOT = { exists = scope:1020_third_artifact_to_sell } + } + desc = ep3_laamp_decision_event.1020.desc_two_artifacts_new_02 + } + } + #FIRST TIME: Three artifacts + random_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + exists = scope:1020_first_artifact_to_sell + exists = scope:1020_second_artifact_to_sell + exists = scope:1020_third_artifact_to_sell + } + desc = ep3_laamp_decision_event.1020.desc_three_artifacts_new_01 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + exists = scope:1020_first_artifact_to_sell + exists = scope:1020_second_artifact_to_sell + exists = scope:1020_third_artifact_to_sell + } + desc = ep3_laamp_decision_event.1020.desc_three_artifacts_new_02 + } + } + } + #Visiting Partner flavor + first_valid = { + #RETURN: We've returned with our outraged clever partner + triggered_desc = { + trigger = { + exists = scope:did_not_sell_artifact + exists = scope:1020_outraged_partner + } + desc = ep3_laamp_decision_event.1020.desc_outraged_partner_returned + } + #FIRST TIME: Outraged clever partner + triggered_desc = { + trigger = { exists = scope:1020_outraged_partner } + desc = ep3_laamp_decision_event.1020.desc_outraged_partner_new + } + } + } + theme = stewardship + override_background = { reference = ep2_village_festival } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #Outraged + triggered_animation = { + trigger = { exists = scope:1020_outraged_partner } + animation = rage + } + #Friendly + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_friendly_traits = yes } + } + animation = personality_forgiving + } + #Business-minded + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_commerce_traits = yes } + } + animation = personality_greedy + } + #Uninterested + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_uninterested_traits = yes } + } + animation = personality_cynical + } + #Irrational + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + #A bit awkward + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_standoffish_traits = yes } + } + animation = personality_coward + } + animation = personality_compassionate + } + center_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:laamp_artifact_peddler + #Friendly + triggered_animation = { + trigger = { + scope:laamp_artifact_peddler = { 1010_has_friendly_traits = yes } + } + animation = personality_compassionate + } + #Uninterested + triggered_animation = { + trigger = { + scope:laamp_artifact_peddler = { 1010_has_uninterested_traits = yes } + } + animation = personality_callous + } + #Business-minded + triggered_animation = { + trigger = { + scope:laamp_artifact_peddler = { 1010_has_commerce_traits = yes } + } + animation = admiration + } + #A bit awkward + triggered_animation = { + trigger = { + scope:laamp_artifact_peddler = { 1010_has_standoffish_traits = yes } + } + animation = personality_coward + } + #Irrational + triggered_animation = { + trigger = { + scope:laamp_artifact_peddler = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + animation = personality_forgiving + } + artifact = { + trigger = { exists = scope:1020_first_artifact_to_sell } + target = scope:1020_first_artifact_to_sell + position = lower_left_portrait + } + artifact = { + trigger = { exists = scope:1020_second_artifact_to_sell } + target = scope:1020_second_artifact_to_sell + position = lower_center_portrait + } + artifact = { + trigger = { exists = scope:1020_third_artifact_to_sell } + target = scope:1020_third_artifact_to_sell + position = lower_right_portrait + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Do we have someone more clever in our company? + if = { + limit = { + NOT = { exists = scope:1020_outraged_partner } + scope:visiting_partner ?= { + stewardship > root.stewardship + stewardship >= average_skill_rating + } + } + #Save outraged clever partner + save_scope_as = 1020_outraged_partner + } + #Find our peddler + if = { + #Do we already have a peddler? + limit = { + NOT = { exists = scope:laamp_artifact_peddler } + } + #Has this person been our artifact peddler in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_peddler_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_artifact_peddler + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_artifact_peddler + } + #Otherwise find a peddler in the pool + if = { + limit = { + NOT = { exists = scope:laamp_artifact_peddler } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + } + save_scope_as = laamp_artifact_peddler + } + } + #Otherwise create a peddler + if = { + limit = { + NOT = { exists = scope:laamp_artifact_peddler } + } + #Create peddler to stuff in pool + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_artifact_peddler + } + } + #Remember the peddler + 1010_remember_vendor_character_effect = { GUILD = peddler CHARACTER = scope:laamp_artifact_peddler } + } + #What artifacts are we selling? + if = { + limit = { + NOT = { exists = scope:1020_first_artifact_to_sell } + } + every_character_artifact = { + limit = { 1000_is_unsellable_artifact_trigger = no } + add_to_list = list_of_potential_artifacts_to_sell + } + #Pick a random artifact in the list so we have a starting point + random_in_list = { + list = list_of_potential_artifacts_to_sell + limit = { has_variable = 1020_interesting_artifact_to_sell } + alternative_limit = { + #Empty, just pick an artifact from the list already + } + #Remember the artifact for next visit + set_variable = { + name = 1020_interesting_artifact_to_sell + days = visit_settlement_cooldown_days + } + save_scope_as = 1020_first_artifact_to_sell + } + #Pick something the peddler saw on your character + if = { + limit = { + any_in_list = { + list = list_of_potential_artifacts_to_sell + this != scope:1020_first_artifact_to_sell + } + } + random_in_list = { + list = list_of_potential_artifacts_to_sell + limit = { + has_variable = 1020_interesting_artifact_to_sell + this != scope:1020_first_artifact_to_sell + is_equipped = yes + } + alternative_limit = { + this != scope:1020_first_artifact_to_sell + is_equipped = no + } + alternative_limit = { + this != scope:1020_first_artifact_to_sell + } + #Remember the artifact for next visit + set_variable = { + name = 1020_interesting_artifact_to_sell + days = visit_settlement_cooldown_days + } + save_scope_as = 1020_second_artifact_to_sell + } + + } + #Pick something that isn't whatever old court artifact from when you used to be someone + if = { + limit = { + any_in_list = { + list = list_of_potential_artifacts_to_sell + NOT = { + this = scope:1020_first_artifact_to_sell + this = scope:1020_second_artifact_to_sell + } + } + } + random_in_list = { + list = list_of_potential_artifacts_to_sell + limit = { + has_variable = 1020_interesting_artifact_to_sell + NOT = { + this = scope:1020_first_artifact_to_sell + this = scope:1020_second_artifact_to_sell + } + ep1_artifact_is_court_artifact_trigger = no + is_unique = no + } + alternative_limit = { + NOT = { + this = scope:1020_first_artifact_to_sell + this = scope:1020_second_artifact_to_sell + } + ep1_artifact_is_court_artifact_trigger = no + } + alternative_limit = { + NOT = { + this = scope:1020_first_artifact_to_sell + this = scope:1020_second_artifact_to_sell + } + is_unique = no + } + alternative_limit = { + NOT = { + this = scope:1020_first_artifact_to_sell + this = scope:1020_second_artifact_to_sell + } + } + #Remember the artifact for next visit + set_variable = { + name = 1020_interesting_artifact_to_sell + days = visit_settlement_cooldown_days + } + save_scope_as = 1020_third_artifact_to_sell + } + } + } + #Set the prices + if = { + #Always exists + limit = { + scope:1020_first_artifact_to_sell = { + NOT = { has_variable = 1020_artifact_sell_value } + } + } + scope:1020_first_artifact_to_sell = { + 1020_calculate_artifact_value_effect = yes + #Don't need no notifications about this + 1020_suppress_artifact_notifications_effect = yes + } + #2nd Artifact + if = { + limit = { exists = scope:1020_second_artifact_to_sell } + scope:1020_second_artifact_to_sell = { + 1020_calculate_artifact_value_effect = yes + #Don't need no notifications about this + 1020_suppress_artifact_notifications_effect = yes + } + } + #3rd Artifact + if = { + limit = { exists = scope:1020_third_artifact_to_sell } + scope:1020_third_artifact_to_sell = { + 1020_calculate_artifact_value_effect = yes + #Don't need no notifications about this + 1020_suppress_artifact_notifications_effect = yes + } + } + #Let's not do this twice + } + } + #Go to sell screen + option = { + name = ep3_laamp_decision_event.1020.a + #Inform player + custom_tooltip = ep3_laamp_decision_event.1020.a.tt + #Show the current estimated prices so that you can compare + custom_tooltip = ep3_laamp_decision_event.1020.a.first_artifact.tt + #2nd Artifact + if = { + limit = { exists = scope:1020_second_artifact_to_sell } + custom_tooltip = ep3_laamp_decision_event.1020.a.second_artifact.tt + } + #3rd Artifact + if = { + limit = { exists = scope:1020_third_artifact_to_sell } + custom_tooltip = ep3_laamp_decision_event.1020.a.third_artifact.tt + } + if = { # Eagle + limit = { + can_laamp_sell_eagle_trigger = yes + } + custom_tooltip = ep3_laamp_decision_event.1020.eagle.tt + custom_tooltip = ep3_laamp_decision_event.1020.eagle.price_tt + } + remove_variable ?= 1021_artifact_sell_screen + #Go to sell screen + trigger_event = ep3_laamp_decision_event.1021 + } + #Attempt a haggle + option = { + name = ep3_laamp_decision_event.1020.b + trigger = { + #You're on cooldown + custom_tooltip = { + text = ep3_laamp_decision_event.1020.b.cooldown.tt + NOT = { has_variable = 1020_has_haggled_recently } + } + } + duel = { + skill = stewardship + target = scope:laamp_artifact_peddler + #Success: Artifact merchant looks contemplatively at you, increased price + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamp_decision_event.1020.b.success + send_interface_toast = { + title = ep3_laamp_decision_event.1020.b.success + left_icon = root + right_icon = scope:laamp_artifact_peddler + #For loc and effects + save_scope_value_as = { + name = attempted_artifact_haggle + value = flag:success + } + #Show the estimated success prices so that you can compare + custom_tooltip = ep3_laamp_decision_event.1020.b.success.first_artifact.tt + #2nd Artifact + if = { + limit = { exists = scope:1020_second_artifact_to_sell } + custom_tooltip = ep3_laamp_decision_event.1020.b.success.second_artifact.tt + } + #3rd Artifact + if = { + limit = { exists = scope:1020_third_artifact_to_sell } + custom_tooltip = ep3_laamp_decision_event.1020.b.success.third_artifact.tt + } + if = { + limit = { has_lifestyle = stewardship_lifestyle } + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + stress_impact = { + greedy = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + } + #Go to sell screen with modified costs + trigger_event = ep3_laamp_decision_event.1021 + } + } + #Failure: Artifact merchant smirks at you, decreased price + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + desc = ep3_laamp_decision_event.1020.b.failure + send_interface_toast = { + title = ep3_laamp_decision_event.1020.b.failure + left_icon = root + right_icon = scope:laamp_artifact_peddler + #For loc and effects + save_scope_value_as = { + name = attempted_artifact_haggle + value = flag:failure + } + #Show the estimated failure prices so that you can compare + custom_tooltip = ep3_laamp_decision_event.1020.b.failure.first_artifact.tt + #2nd Artifact + if = { + limit = { exists = scope:1020_second_artifact_to_sell } + custom_tooltip = ep3_laamp_decision_event.1020.b.failure.second_artifact.tt + } + #3rd Artifact + if = { + limit = { exists = scope:1020_third_artifact_to_sell } + custom_tooltip = ep3_laamp_decision_event.1020.b.failure.third_artifact.tt + } + stress_impact = { + base = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + #Go to sell screen with modified costs + trigger_event = ep3_laamp_decision_event.1021 + } + } + } + set_variable = { + name = 1020_has_haggled_recently + days = visit_settlement_minimum_cooldown_days + } + } + #Triggered Option: Outraged clever partner gets you a higher price for a random artifact + option = { + name = ep3_laamp_decision_event.1020.c + #If we have an outraged clever partner + trigger = { exists = scope:1020_outraged_partner } + #... whom randomly sells one of the artifacts at a higher price + random_list = { + #This should always exist + 50 = { + desc = ep3_laamp_decision_event.1020.c.first_artifact + add_gold = scope:1020_first_artifact_to_sell.var:1020_artifact_sell_high_value + scope:1020_first_artifact_to_sell = { set_owner = scope:laamp_artifact_peddler } + } + #Artifact #2 + 50 = { + trigger = { exists = scope:1020_second_artifact_to_sell } + desc = ep3_laamp_decision_event.1020.c.second_artifact + add_gold = scope:1020_second_artifact_to_sell.var:1020_artifact_sell_high_value + scope:1020_second_artifact_to_sell = { set_owner = scope:laamp_artifact_peddler } + } + #Artifact #3 + 50 = { + trigger = { exists = scope:1020_third_artifact_to_sell } + desc = ep3_laamp_decision_event.1020.c.third_artifact + add_gold = scope:1020_third_artifact_to_sell.var:1020_artifact_sell_high_value + scope:1020_third_artifact_to_sell = { set_owner = scope:laamp_artifact_peddler } + } + } + #Set correct variables and reroute us to main square + 1020_sold_artifact_effect = yes + stress_impact = { + ambitious = minor_stress_impact_gain + lazy = minor_stress_impact_loss + } + #Inform the player + custom_tooltip = ep3_laamp_decision_event.return.tt + } + #I want to do something else + option = { + name = ep3_laamp_decision_event.1020.d + #For desc flavor + save_scope_as = did_not_sell_artifact + #Go back to the main event + 1001_return_to_second_effect = yes + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:artifact_peddler } + } +} + + +#Sell (or destroy) artifact (if unique artifact) +scripted_effect ep3_laamp_decision_1021_sell_artifact_effect = { + save_temporary_scope_as = artifact_to_sell #More descriptive than 'prev' + #Get appropriate amount of gold + root = { + if = { + limit = { + exists = scope:attempted_artifact_haggle + scope:attempted_artifact_haggle = flag:success + } + add_gold = scope:artifact_to_sell.var:1020_artifact_sell_high_value + } + else_if = { + limit = { + exists = scope:attempted_artifact_haggle + scope:attempted_artifact_haggle = flag:failure + } + add_gold = scope:artifact_to_sell.var:1020_artifact_sell_low_value + } + else = { add_gold = scope:artifact_to_sell.var:1020_artifact_sell_value } + } + #Set the artifact owner + if = { + limit = { + scope:artifact_to_sell = { is_unique = yes } + } + #Destroy unique artifacts so they don't get stuck with the Pool People + hidden_effect = { destroy_artifact = scope:artifact_to_sell } + } + else = { set_owner = scope:laamp_artifact_peddler } +} + + +#Actual sell screen +ep3_laamp_decision_event.1021 = { + type = character_event + window = visit_settlement_window + title = { + first_valid = { + #Haggle Success + triggered_desc = { + trigger = { scope:attempted_artifact_haggle ?= flag:success } + desc = ep3_laamp_decision_event.1021.t_success + } + #Haggle Failure + triggered_desc = { + trigger = { scope:attempted_artifact_haggle ?= flag:failure } + desc = ep3_laamp_decision_event.1021.t_failure + } + desc = ep3_laamp_decision_event.1021.t + } + } + desc = { + first_valid = { + #FIRST TIME: Haggle Success + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_haggled_artifact } + scope:attempted_artifact_haggle ?= flag:success + } + desc = ep3_laamp_decision_event.1021.desc_success + } + #FIRST TIME: Haggle Failure + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_haggled_artifact } + scope:attempted_artifact_haggle ?= flag:failure + } + desc = ep3_laamp_decision_event.1021.desc_failure + } + #FIRST TIME: Generic first-strings + random_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + } + desc = ep3_laamp_decision_event.1021.desc_moment_of_purchase_01 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:did_not_sell_artifact } + } + desc = ep3_laamp_decision_event.1021.desc_moment_of_purchase_02 + } + } + #RETURN: Same as the generic first-strings + random_valid = { + triggered_desc = { + trigger = { + NOT = { has_variable = 1021_artifact_sell_screen } + } + desc = ep3_laamp_decision_event.1021.desc_moment_of_purchase_01 + } + triggered_desc = { + trigger = { + NOT = { has_variable = 1021_artifact_sell_screen } + } + desc = ep3_laamp_decision_event.1021.desc_moment_of_purchase_02 + } + } + #RETURN: Same as the return-strings in ep3_laamp_decision_event.1020 + random_valid = { + triggered_desc = { + trigger = { + OR = { + exists = scope:did_not_sell_haggled_artifact + exists = scope:did_not_sell_artifact + } + } + desc = ep3_laamp_decision_event.1020.desc_intro_returned_01 + } + triggered_desc = { + trigger = { + OR = { + exists = scope:did_not_sell_haggled_artifact + exists = scope:did_not_sell_artifact + } + } + desc = ep3_laamp_decision_event.1020.desc_intro_returned_02 + } + } + } + } + theme = stewardship + override_background = { reference = ep2_village_festival } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #Outraged + triggered_animation = { + trigger = { exists = scope:1020_outraged_partner } + animation = rage + } + #Friendly + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_friendly_traits = yes } + } + animation = personality_forgiving + } + #Business-minded + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_commerce_traits = yes } + } + animation = personality_greedy + } + #Uninterested + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_uninterested_traits = yes } + } + animation = personality_cynical + } + #Irrational + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + #A bit awkward + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_standoffish_traits = yes } + } + animation = personality_coward + } + animation = personality_compassionate + } + center_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:attempted_artifact_haggle + scope:attempted_artifact_haggle = flag:failure + } + animation = shame + } + triggered_animation = { + trigger = { + can_laamp_sell_eagle_trigger = yes + } + animation = hunting_falcon + } + animation = thinking + } + right_portrait = { + character = scope:laamp_artifact_peddler + triggered_animation = { + trigger = { exists = scope:attempted_artifact_haggle } + animation = disapproval + } + animation = steward + } + artifact = { + trigger = { exists = scope:1020_first_artifact_to_sell } + target = scope:1020_first_artifact_to_sell + position = lower_left_portrait + } + artifact = { + trigger = { exists = scope:1020_second_artifact_to_sell } + target = scope:1020_second_artifact_to_sell + position = lower_center_portrait + } + artifact = { + trigger = { exists = scope:1020_third_artifact_to_sell } + target = scope:1020_third_artifact_to_sell + position = lower_right_portrait + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + } + #Sell artifact #1 + option = { + name = ep3_laamp_decision_event.1021.a + #Sell the artifact, price depending on if you haggled or not etc + scope:1020_first_artifact_to_sell = { ep3_laamp_decision_1021_sell_artifact_effect = yes } + #Set correct variables and reroute us to main square + 1020_sold_artifact_effect = yes + } + #Sell artifact #2 + option = { + name = ep3_laamp_decision_event.1021.b + trigger = { exists = scope:1020_second_artifact_to_sell } + #Sell the artifact, price depending on if you haggled or not etc + scope:1020_second_artifact_to_sell = { ep3_laamp_decision_1021_sell_artifact_effect = yes } + #Set correct variables and reroute us to main square + 1020_sold_artifact_effect = yes + } + #Sell artifact #3 + option = { + name = ep3_laamp_decision_event.1021.c + trigger = { exists = scope:1020_third_artifact_to_sell } + #Sell the artifact, price depending on if you haggled or not etc + scope:1020_third_artifact_to_sell = { ep3_laamp_decision_1021_sell_artifact_effect = yes } + #Set correct variables and reroute us to main square + 1020_sold_artifact_effect = yes + } + option = { + name = ep3_laamp_decision_event.1021.eagle + trigger = { + can_laamp_sell_eagle_trigger = yes + } + #Sell eagle :( + add_character_flag = is_selling_eagle_flag + show_as_tooltip = { + sell_eagle_effect = { + PRICE = hunting_eagle_sell_value + RECIPIENT = scope:laamp_artifact_peddler + SELLER = root + } + } + + #Stress + stress_impact = { + base = minor_stress_impact_gain + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + + #Set correct variables and reroute us to main square + 1020_sold_artifact_effect = yes + + ai_chance = { + base = 15 # No one is really doing this unless they're giga broke + modifier = { + factor = 1.7 + short_term_gold <= 5 + } + modifier = { + add = 1.2 + has_character_modifier = weak_eagle_modifier + } + modifier = { + add = 1.5 + has_character_modifier = very_weak_eagle_modifier + } + modifier = { + add = 1.5 + eagle_is_old_trigger = yes + } + modifier = { + add = 0.75 + OR = { + has_character_modifier = strong_eagle_modifier + has_eagle_personality_trait_trigger = yes + } + } + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.5 + } + } + } + #I've changed my mind + option = { + name = { + text = { + first_valid = { + #Go back to main + triggered_desc = { + trigger = { exists = scope:attempted_artifact_haggle } + desc = ep3_laamp_decision_event.1020.d + } + #Go back to the previous screen + desc = ep3_laamp_decision_event.1021.d + } + } + } + #For desc flavor + if = { + #We came through here the first time + limit = { + NOT = { exists = scope:did_not_sell_artifact } + } + save_scope_as = did_not_sell_artifact + } + #We came through here via haggling + if = { + limit = { exists = scope:attempted_artifact_haggle } + if = { + limit = { + NOT = { exists = scope:did_not_sell_haggled_artifact } + } + save_scope_as = did_not_sell_haggled_artifact + } + #Go back to main + custom_tooltip = ep3_laamp_decision_event.return.tt + trigger_event = ep3_laamp_decision_event.1000 + } + else = { + #Go back to the previous screen + trigger_event = ep3_laamp_decision_event.1020 + } + } + after = { + #For loc + if = { + limit = { + NOT = { has_variable = 1021_artifact_sell_screen } + } + set_variable = 1021_artifact_sell_screen + } + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:artifact_peddler } + hidden_effect = { + # Put eagle selling option on cooldown + if = { + limit = { + has_available_eagle_trigger = yes + } + add_character_flag = { + flag = cant_sell_eagle + months = 6 + } + } + # Actually sell the eagle if applicable + if = { + limit = { + has_character_flag = is_selling_eagle_flag + } + sell_eagle_effect = { + PRICE = hunting_eagle_sell_value + RECIPIENT = scope:laamp_artifact_peddler + SELLER = root + } + remove_character_flag = is_selling_eagle_flag + } + } + } +} + + +###################################################################### +# TOWN CRIER +# ep3_laamp_decision_event.1025 +###################################################################### + +#For hubs. All events that use this need to account for loc in relation to the value being 0, 1, or 2 (e.g. scope:church_grounds_loc_tracker ?= 0 ) +scripted_effect 1025_set_and_check_hub_loc_tracker_scope_effect = { + if = { + limit = { + NOT = { exists = scope:$HUB$_loc_tracker } #e.g. scope:church_grounds_loc_tracker + } + save_scope_value_as = { + name = $HUB$_loc_tracker + value = 0 + } + } + else_if = { + limit = { scope:$HUB$_loc_tracker ?= 2 } + save_scope_value_as = { + name = $HUB$_loc_tracker + value = 0 + } + } + else_if = { + limit = { scope:$HUB$_loc_tracker ?= 0 } + save_scope_value_as = { + name = $HUB$_loc_tracker + value = 1 + } + } + else = { + save_scope_value_as = { + name = $HUB$_loc_tracker + value = 2 + } + } +} + +#Technically these could be rolled into the HUB variant if we add a 3rd random loc for all current SCENEs +#For scenes. All events that use this need to account for loc in relation to the value being 0 or 1 (e.g. scope:weaponsmith_loc_tracker ?= 0 ) +scripted_effect 1025_set_and_check_scene_loc_tracker_scope_effect = { + if = { + limit = { + NOT = { exists = scope:$SCENE$_loc_tracker } #e.g. scope:weaponsmith_loc_tracker + } + save_scope_value_as = { + name = $SCENE$_loc_tracker + value = 0 + } + } + else_if = { + limit = { scope:$SCENE$_loc_tracker ?= 1 } + save_scope_value_as = { + name = $SCENE$_loc_tracker + value = 0 + } + } + else = { + save_scope_value_as = { + name = $SCENE$_loc_tracker + value = 1 + } + } +} + +#Set the correct variable to block off the Contract option and remove the desc flavor variable +scripted_effect 1025_finished_contract_effect = { + #Set up the cooldown for the contract action + set_variable = { + name = 1025_has_contracted_recently + days = visit_settlement_minimum_cooldown_days + } + #We're done here + save_scope_value_as = { + name = laamp_decision_has_contracted + value = flag:yes + } + #Go back to the main event + hidden_effect = { 1001_return_to_second_effect = yes } +} + +#Used in enough places +scripted_effect 1025_save_random_county_province_effect = { + random_county_in_region = { + region = $REGION$ + random_county_province = { save_scope_as = contract_province } + } +} + +#Not too far away... Should probably be revisited sometime in the future. Use distance instead? +scripted_effect 1025_set_contract_location_effect = { + random_list = { + #North Europe + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_europe_north } + } + 1025_save_random_county_province_effect = { REGION = world_europe_north } + } + #West Europe + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_europe_west } + } + 1025_save_random_county_province_effect = { REGION = world_europe_west } + } + #East Europe + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_europe_east } + } + 1025_save_random_county_province_effect = { REGION = world_europe_east } + } + #South Europe + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_europe_south } + } + 1025_save_random_county_province_effect = { REGION = world_europe_south } + } + #Middle East + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_middle_east } + } + 1025_save_random_county_province_effect = { REGION = world_middle_east } + } + #India + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_india } + } + 1025_save_random_county_province_effect = { REGION = world_india } + } + #North Africa + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_africa_north } + } + 1025_save_random_county_province_effect = { REGION = world_africa_north } + } + #West Africa + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_africa_west } + } + 1025_save_random_county_province_effect = { REGION = world_africa_west } + } + #East Africa + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_africa_east } + } + 1025_save_random_county_province_effect = { REGION = world_africa_east } + } + #West Steppe + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_steppe_west } + } + 1025_save_random_county_province_effect = { REGION = world_steppe_west } + } + #East Steppe + 10 = { + trigger = { + scope:visiting_location = { geographical_region = world_steppe_east } + } + 1025_save_random_county_province_effect = { REGION = world_steppe_east } + } + } +} + +#Set contract type +scripted_effect 1025_randomize_and_remember_contract_type_effect = { + #Find an employer to check the trigger against + scope:visiting_location.county = { + holder ?= { + if = { + limit = { 1025_is_appropriate_landed_contract_employer_trigger = yes } + add_to_temporary_list = potential_contract_employers + } + every_vassal_or_below ?= { + limit = { 1025_is_appropriate_landed_contract_employer_trigger = yes } + add_to_temporary_list = potential_contract_employers + } + top_liege ?= { + if = { + limit = { 1025_is_appropriate_landed_contract_employer_trigger = yes } + add_to_temporary_list = potential_contract_employers + } + every_vassal_or_below ?= { + limit = { 1025_is_appropriate_landed_contract_employer_trigger = yes } + add_to_temporary_list = potential_contract_employers + } + } + } + every_neighboring_county ?= { + holder ?= { + if = { + limit = { 1025_is_appropriate_landed_contract_employer_trigger = yes } + } + add_to_temporary_list = potential_contract_employers + every_vassal_or_below ?= { + limit = { 1025_is_appropriate_landed_contract_employer_trigger = yes } + add_to_temporary_list = potential_contract_employers + } + top_liege ?= { + if = { + limit = { 1025_is_appropriate_landed_contract_employer_trigger = yes } + add_to_temporary_list = potential_contract_employers + } + every_vassal_or_below ?= { + limit = { 1025_is_appropriate_landed_contract_employer_trigger = yes } + add_to_temporary_list = potential_contract_employers + } + } + } + } + } + #Pick actual contract groups + random_list = { + #Nothing at all! + 10 = { + modifier = { + 1000_is_a_nomadic_holding_trigger = yes + factor = 2 + } + modifier = { + num_offered_task_contracts > 5 + add = 20 + } + modifier = { + num_offered_task_contracts > 10 + add = 20 + } + #No contracts + } + #Treasure Map + 5 = { + #Do we already have a treasure map contract? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:treasure_map_contract } + } + trigger_else = { always = no } + #Do we already have an active Treasure Map contract? + any_character_artifact = { has_variable = 1025_treasure_map } + any_character_task_contract = { task_contract_type = laamp_treasure_map_contract } + #Are we on cooldown? + has_variable = 1025_had_treasure_map_contract_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:treasure_map_contract } + } + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:treasure_map_contract + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:treasure_map_contract + } + } + #Legendary Contract + 5 = { + #Did we spawn a legendary contract recently? + trigger = { + prestige_level >= tier_kingdom + 1025_can_create_legendary_contract_trigger = yes + NOR = { + #Are we on cooldown? + has_variable = 1025_had_legendary_contract_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:legendary_contract } + } + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:legendary_contract + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:legendary_contract + } + #Yes, I will whack you with a double cooldown on legendaries. It's shorter if you don't pick the option though + set_variable = { + name = 1025_had_legendary_contract_recently + days = visit_settlement_minimum_cooldown_days + } + } + #Transport Contracts + 20 = { + #Did we spawn transport contracts recently? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:transport_contracts } + } + trigger_else = { always = no } + #Are we on cooldown? + has_variable = 1025_had_transport_contracts_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:transport_contracts } + } + #Can we actually spawn any transport contracts? + any_in_List = { + list = potential_contract_employers + save_temporary_scope_as = considered_employer + can_create_transport_contract_trigger = { LAAMP = root EMPLOYER = scope:considered_employer } + } + } + #More transports for the baggage train + modifier = { + domicile ?= { has_domicile_building = baggage_train_01 } + factor = 2 + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:transport_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:transport_contracts + } + } + #Criminal Contracts + 20 = { + #Did we spawn criminal contracts recently? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:criminal_contracts } + } + trigger_else = { always = no } + #Are we on cooldown? + has_variable = 1025_had_criminal_contracts_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:criminal_contracts } + } + #Can we actually spawn any criminal contracts? + any_in_list = { + list = potential_contract_employers + save_temporary_scope_as = considered_employer + can_create_criminal_contract_trigger = { LAAMP = root EMPLOYER = scope:considered_employer } + } + } + #More criminals... if corrupt location + modifier = { + scope:visiting_location.county = { has_county_corruption_trigger = yes } + add = 10 + } + modifier = { + scope:visiting_location.county = { county_control <= 50 } + add = 10 + } + #Are you actually looking for criminal contracts? + modifier = { + has_trait = honest + factor = 0.5 + } + modifier = { + has_trait = deceitful + factor = 2 + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:criminal_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:criminal_contracts + } + } + #Justicar Contracts + 20 = { + #Did we spawn justicar contracts recently? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:justicar_contracts } + } + trigger_else = { always = no } + #Are we on cooldown? + has_variable = 1025_had_justicar_contracts_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:justicar_contracts } + } + #Can we actually spawn any justicar contracts? + any_in_list = { + list = potential_contract_employers + save_temporary_scope_as = considered_employer + can_create_justicar_contract_trigger = { LAAMP = root EMPLOYER = scope:considered_employer } + } + } + #More criminals... if corrupt location + modifier = { + scope:visiting_location.county = { has_county_corruption_trigger = yes } + add = 10 + } + modifier = { + scope:visiting_location.county = { county_control <= 50 } + add = 10 + } + #You're pretty law-abiding? + modifier = { + OR = { + has_trait = honest + has_trait = just + has_trait = gallant + has_focus = martial_chivalry_focus + } + factor = 2 + } + modifier = { + has_trait = deceitful + factor = 0.5 + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:justicar_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:justicar_contracts + } + } + #Hireling Contracts + 20 = { + #Did we spawn hireling contracts recently? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:hireling_contracts } + } + trigger_else = { always = no } + #Are we on cooldown? + has_variable = 1025_had_hireling_contracts_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:hireling_contracts } + } + #Can we actually spawn any hireling contracts? + any_in_list = { + list = potential_contract_employers + save_temporary_scope_as = considered_employer + can_create_hireling_contract_trigger = { LAAMP = root EMPLOYER = scope:considered_employer } + } + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:hireling_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:hireling_contracts + } + } + #Diplomacy Contracts + 20 = { + #Did we spawn diplomacy contracts recently? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:diplomacy_contracts } + } + trigger_else = { always = no } + #Are we on cooldown? + has_variable = 1025_had_diplomacy_contracts_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:diplomacy_contracts } + } + #Can we actually spawn any diplomacy contracts? + any_in_list = { + list = potential_contract_employers + save_temporary_scope_as = considered_employer + can_create_diplomacy_contract_trigger = { LAAMP = root EMPLOYER = scope:considered_employer } + } + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:diplomacy_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:diplomacy_contracts + } + } + #Stewardship Contracts + 20 = { + #Did we spawn stewardship contracts recently? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:stewardship_contracts } + } + trigger_else = { always = no } + #Are we on cooldown? + has_variable = 1025_had_stewardship_contracts_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:stewardship_contracts } + } + #Can we actually spawn any stewardship contracts? + any_in_list = { + list = potential_contract_employers + save_temporary_scope_as = considered_employer + can_create_stewardship_contract_trigger = { LAAMP = root EMPLOYER = scope:considered_employer } + } + } + #More organization in highly developed areas + modifier = { + scope:visiting_location.county = { development_level > bad_development_level } + add = 10 + } + modifier = { + scope:visiting_location.county = { development_level > medium_development_level } + add = 10 + } + #You're shrewd? + modifier = { + OR = { + has_trait = governor + has_trait = diligent + has_trait = administrator + } + factor = 2 + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:stewardship_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:stewardship_contracts + } + } + #Learning Contracts + 20 = { + #Did we spawn learning contracts recently? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:learning_contracts } + } + trigger_else = { always = no } + #Are we on cooldown? + has_variable = 1025_had_learning_contracts_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:learning_contracts } + } + #Can we actually spawn any learning contracts? + any_in_list = { + list = potential_contract_employers + save_temporary_scope_as = considered_employer + can_create_learning_contract_trigger = { LAAMP = root EMPLOYER = scope:considered_employer } + } + } + modifier = { + scope:visiting_location.county = { development_level > medium_development_level } + add = 10 + } + modifier = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + add = 10 + } + #You're... academic? + modifier = { + has_trait = scholar + factor = 2 + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:learning_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:learning_contracts + } + } + #Intrigue Contracts + 20 = { + #Did we spawn intrigue contracts recently? + trigger = { + NOR = { + #Is this contract type already saved from our last visit? + trigger_if = { + limit = { 1025_location_has_a_saved_contract_type_trigger = yes } + 1025_saved_location_contract_type_matches_this_type_trigger = { CONTRACT_TYPE_FLAG = flag:intrigue_contracts } + } + trigger_else = { always = no } + #Are we on cooldown? + has_variable = 1025_had_intrigue_contracts_recently + #Has this contract type already been assigned to another contract scope this visit? + 1025_contract_type_is_assigned_trigger = { CONTRACT_TYPE_FLAG = flag:intrigue_contracts } + } + #Can we actually spawn any intrigue contracts? + any_in_list = { + list = potential_contract_employers + save_temporary_scope_as = considered_employer + can_create_intrigue_contract_trigger = { LAAMP = root EMPLOYER = scope:considered_employer } + } + } + modifier = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + add = 10 + } + #You're... schemer? + modifier = { + has_trait = schemer + factor = 2 + } + #Set the type + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:intrigue_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:intrigue_contracts + } + } + #Add more contract types below VV + } + scope:visiting_location = { + #Clean up any old variables + if = { + limit = { has_variable = 1025_saved_$NUM$_contract_type } + remove_variable = 1025_saved_$NUM$_contract_type + } + #We will not be saving legendary contracts as those are more volatile (does employer still exist? etc) + if = { + limit = { scope:1025_$NUM$_contract ?= flag:legendary_contract } + #Nothing + } + else_if = { + limit = { exists = scope:1025_$NUM$_contract } + #Remember this to avoid decision-scumming + set_variable = { + name = 1025_saved_$NUM$_contract_type #i.e. 1025_saved_first_contract_type + value = scope:1025_$NUM$_contract #i.e. flag:treasure_map_contract + days = visit_settlement_minimum_cooldown_days + } + } + else = { + save_scope_value_as = { + name = 1025_$NUM$_no_contract + value = flag:no_contract + } + #Remember this to avoid decision-scumming + set_variable = { + name = 1025_saved_$NUM$_contract_type + value = scope:1025_$NUM$_no_contract + days = visit_settlement_minimum_cooldown_days + } + } + } +} + +#Do we need an employer? +scripted_effect 1025_generate_employer_effect = { + #Treasure Map + if = { + limit = { scope:1025_$NUM$_contract = flag:treasure_map_contract } + #Find an employer for the treasure map contract + random_pool_character = { + province = scope:visiting_location + limit = { + 1025_is_old_and_unable_trigger = yes + 1025_appropriate_contract_employer_trigger = yes + } + save_scope_as = 1025_$NUM$_contract_employer + } + #Or create someone + if = { + limit = { + NOT = { exists = scope:1025_$NUM$_contract_employer } + } + create_character = { + template = generic_peasant_character + age = { 50 70 } + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = 1025_$NUM$_contract_employer + } + scope:1025_$NUM$_contract_employer = { + random_list = { + 10 = { add_trait = blind } + 10 = { add_trait = one_legged } + 10 = { add_trait = one_eyed } + 10 = { add_trait = infirm } + 10 = { add_trait = wounded_2 } + } + } + } + } +} + +#This is where the lagg-ic happens... Probably needs revisiting later on. +scripted_effect 1025_find_ruler_and_spawn_legendary_contract_effect = { + #Saves us a scope:employing_ruler + random_county_in_region = { + region = $REGION$ + limit = { 1025_region_has_suitable_employer_trigger = yes } + save_scope_as = contract_county + #Find the ruler + scope:contract_county.holder = { save_scope_as = employing_ruler } + } + #Legendary... contracts? + random_list = { + #Raid + 10 = { + trigger = { + can_create_task_contract = { + type_name = laamp_raid_contract + employer = scope:employing_ruler + } + } + create_task_contract = { + task_contract_type = laamp_raid_contract + location = scope:employing_ruler.capital_province + task_contract_employer = scope:employing_ruler + task_contract_tier = task_contract_t3_value #Legendary! + save_scope_as = 1025_legendary_contract + } + } + 10 = { + trigger = { + can_create_task_contract = { + type_name = laamp_steal_artifact_contract + employer = scope:employing_ruler + } + } + create_task_contract = { + task_contract_type = laamp_steal_artifact_contract + location = scope:employing_ruler.capital_province + task_contract_employer = scope:employing_ruler + task_contract_tier = task_contract_t3_value #Legendary! + save_scope_as = 1025_legendary_contract + } + } + 10 = { + trigger = { + can_create_task_contract = { + type_name = laamp_treasure_hunting_contract + employer = scope:employing_ruler + } + } + create_task_contract = { + task_contract_type = laamp_treasure_hunting_contract + location = scope:employing_ruler.capital_province + task_contract_employer = scope:employing_ruler + task_contract_tier = task_contract_t3_value #Legendary! + save_scope_as = 1025_legendary_contract + } + } + 10 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_vip + employer = scope:employing_ruler + } + } + create_task_contract = { + task_contract_type = laamp_transport_vip + location = scope:employing_ruler.capital_province + task_contract_employer = scope:employing_ruler + task_contract_tier = task_contract_t3_value #Legendary! + save_scope_as = 1025_legendary_contract + } + } + 10 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_artifact + employer = scope:employing_ruler + } + } + create_task_contract = { + task_contract_type = laamp_transport_artifact + location = scope:employing_ruler.capital_province + task_contract_employer = scope:employing_ruler + task_contract_tier = task_contract_t3_value #Legendary! + save_scope_as = 1025_legendary_contract + } + } + 10 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_gold + employer = scope:employing_ruler + } + } + create_task_contract = { + task_contract_type = laamp_transport_gold + location = scope:employing_ruler.capital_province + task_contract_employer = scope:employing_ruler + task_contract_tier = task_contract_t3_value #Legendary! + save_scope_as = 1025_legendary_contract + } + } + 10 = { + trigger = { + can_create_task_contract = { + type_name = laamp_transport_animal + employer = scope:employing_ruler + } + } + create_task_contract = { + task_contract_type = laamp_transport_animal + location = scope:employing_ruler.capital_province + task_contract_employer = scope:employing_ruler + task_contract_tier = task_contract_t3_value #Legendary! + save_scope_as = 1025_legendary_contract + } + } + } + scope:1025_legendary_contract = { + set_variable = { + name = retain_despite_distance + value = yes + } + } +} + +#Spawn the actual contracts +scripted_effect 1025_option_picked_spawn_contract_effect = { + #Treasure Map + switch = { + trigger = scope:1025_$NUM$_contract + flag:treasure_map_contract = { + hidden_effect = { + #Create treasure map contract + create_task_contract = { + task_contract_type = laamp_treasure_map_contract + location = scope:visiting_location + task_contract_employer = scope:1025_$NUM$_contract_employer + task_contract_tier = scope:1025_$NUM$_contract_employer.task_contract_tier_value + save_scope_as = 1025_treasure_map_contract + } + scope:1025_treasure_map_contract ?= { + #Pick treasure location + 1025_set_contract_location_effect = yes + #Save location on contract + if = { + limit = { exists = scope:contract_province } + set_variable = { + name = contract_treasure_location + value = scope:contract_province + } + } + #Fallback + else = { + random_county_in_region = { + region = world_asia_minor #Something something Bosnia + random_county_province = { save_scope_as = treasure_province } + } + set_variable = { + name = contract_treasure_location + value = scope:treasure_province + } + } + #Save the pick-up location + set_variable = { + name = contract_picked_up_in_location + value = scope:visiting_location + } + } + } + #What do you mean _in your face_ :c + scope:1025_treasure_map_contract = { + open_view_data = { + view = task_contract + player = root + } + } + } + #Legendary Contract + flag:legendary_contract = { + hidden_effect = { #Comment out this hidden_effect = { ... } to better survey what contracts become available while debugging + #North Europe + if = { + limit = { + scope:visiting_location = { geographical_region = world_europe_north } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_europe_north } + } + #West Europe + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_europe_west } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_europe_west } + } + #East Europe + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_europe_east } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_europe_east } + } + #South Europe + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_europe_south } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_europe_south } + } + #Middle East + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_middle_east } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_middle_east } + } + #India + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_india } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_india } + } + #North Africa + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_africa_north } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_africa_north } + } + #West Africa + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_africa_west } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_africa_west } + } + #East Africa + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_africa_east } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_africa_east } + } + #West Steppe + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_steppe_west } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_steppe_west } + } + #East Steppe + else_if = { + limit = { + scope:visiting_location = { geographical_region = world_steppe_east } + } + 1025_find_ruler_and_spawn_legendary_contract_effect = { REGION = world_steppe_east } + } + #YOLO + else = { + random_ruler = { + limit = { + save_temporary_scope_as = ruler_check + valid_laamp_basic_trigger = { + EMPLOYER = scope:ruler_check + LAAMP = root + } + } + save_scope_as = employing_ruler + } + } + } + #What do you mean _in your face_ :c + scope:1025_legendary_contract ?= { + open_view_data = { + view = task_contract + player = root + } + } + } + #Transport Contracts + flag:transport_contracts = { + hidden_effect = { + populate_task_contracts_for_area = { + location = scope:visiting_location + amount = num_contracts_spawned_value + group = { laamp_contracts_transport_group } + } + } + } + #Criminal Contracts + flag:criminal_contracts = { + hidden_effect = { + populate_task_contracts_for_area = { + location = scope:visiting_location + amount = num_contracts_spawned_value + group = { laamp_contracts_criminal_group } + } + } + } + #Justicar Contracts + flag:justicar_contracts = { + hidden_effect = { + populate_task_contracts_for_area = { + location = scope:visiting_location + amount = num_contracts_spawned_value + group = { laamp_contracts_justicar_group } + } + } + } + #Hireling Contracts + flag:hireling_contracts = { + hidden_effect = { + populate_task_contracts_for_area = { + location = scope:visiting_location + amount = num_contracts_spawned_value + group = { laamp_contracts_hireling_group laamp_contracts_martial_group } #Stashing martial here, for now + } + } + } + #Diplomacy Contracts + flag:diplomacy_contracts = { + hidden_effect = { + populate_task_contracts_for_area = { + location = scope:visiting_location + amount = num_contracts_spawned_value + group = { laamp_contracts_diplomacy_group } + } + } + } + #Stewardship Contracts + flag:stewardship_contracts = { + hidden_effect = { + populate_task_contracts_for_area = { + location = scope:visiting_location + amount = num_contracts_spawned_value + group = { laamp_contracts_stewardship_group } + } + } + } + #Learning Contracts + flag:learning_contracts = { + hidden_effect = { + populate_task_contracts_for_area = { + location = scope:visiting_location + amount = num_contracts_spawned_value + group = { laamp_contracts_learning_group } + } + } + } + #Intrigue Contracts + flag:intrigue_contracts = { + hidden_effect = { + populate_task_contracts_for_area = { + location = scope:visiting_location + amount = num_contracts_spawned_value + group = { laamp_contracts_intrigue_group } + } + } + } + #Add more contract types below VV + } +} + +#Set up the tooltip, cooldown and prestige cost +scripted_effect 1025_option_tooltip_and_cooldown_contract_type_effect = { + #Contract stuff + switch = { + trigger = scope:1025_$NUM$_contract + #Treasure Map + flag:treasure_map_contract = { + custom_tooltip = ep3_laamp_decision_event.1025.treasure_map_contract_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_treasure_map_contract_recently + days = visit_settlement_large_cooldown_days + } + #Prestige cost + add_prestige = minor_prestige_loss + } + #Legendary Contract + flag:legendary_contract = { + custom_tooltip = ep3_laamp_decision_event.1025.legendary_contract_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_legendary_contract_recently + days = visit_settlement_large_cooldown_days + } + #Prestige cost + add_prestige = medium_prestige_loss + } + #Transport Contracts + flag:transport_contracts = { + custom_tooltip = ep3_laamp_decision_event.1025.transport_contracts_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_transport_contracts_recently + days = visit_settlement_cooldown_days + } + #Prestige cost + add_prestige = minor_prestige_loss + } + #Criminal Contracts + flag:criminal_contracts = { + custom_tooltip = ep3_laamp_decision_event.1025.criminal_contracts_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_criminal_contracts_recently + days = visit_settlement_cooldown_days + } + #No prestige cost + } + #Justicar Contracts + flag:justicar_contracts = { + custom_tooltip = ep3_laamp_decision_event.1025.justicar_contracts_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_justicar_contracts_recently + days = visit_settlement_cooldown_days + } + #Prestige cost + add_prestige = minor_prestige_loss + } + #Hireling Contracts + flag:hireling_contracts = { + custom_tooltip = ep3_laamp_decision_event.1025.hireling_contracts_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_hireling_contracts_recently + days = visit_settlement_cooldown_days + } + #Prestige cost + add_prestige = minor_prestige_loss + } + #Diplomacy Contracts + flag:diplomacy_contracts = { + custom_tooltip = ep3_laamp_decision_event.1025.diplomacy_contracts_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_diplomacy_contracts_recently + days = visit_settlement_cooldown_days + } + #Prestige cost + add_prestige = minor_prestige_loss + } + #Stewardship Contracts + flag:stewardship_contracts = { + custom_tooltip = ep3_laamp_decision_event.1025.stewardship_contracts_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_stewardship_contracts_recently + days = visit_settlement_cooldown_days + } + #Prestige cost + add_prestige = minor_prestige_loss + } + #Learning Contracts + flag:learning_contracts = { + custom_tooltip = ep3_laamp_decision_event.1025.learning_contracts_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_learning_contracts_recently + days = visit_settlement_cooldown_days + } + #Prestige cost + add_prestige = minor_prestige_loss + } + #Intrigue Contracts + flag:intrigue_contracts = { + custom_tooltip = ep3_laamp_decision_event.1025.intrigue_contracts_tt + #Set up the cooldown for the contract type + set_variable = { + name = 1025_had_intrigue_contracts_recently + days = visit_settlement_cooldown_days + } + #Prestige cost + add_prestige = minor_prestige_loss + } + #Add more contract types below VV + } +} + +#Remember, remember (... but not legendary contracts) +scripted_effect 1025_translate_variable_into_flag_effect = { + scope:visiting_location = { + #The Nothingness + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:no_contract } + #Nothing + } + #Treasure Map + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:treasure_map_contract } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:treasure_map_contract + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:treasure_map_contract + } + } + } + #Transport Contracts + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:transport_contracts } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:transport_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:transport_contracts + } + } + } + #Criminal Contracts + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:criminal_contracts } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:criminal_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:criminal_contracts + } + } + } + #Justicar Contracts + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:justicar_contracts } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:justicar_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:justicar_contracts + } + } + } + #Hireling Contracts + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:hireling_contracts } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:hireling_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:hireling_contracts + } + } + } + #Diplomacy Contracts + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:diplomacy_contracts } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:diplomacy_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:diplomacy_contracts + } + } + } + #Stewardship Contracts + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:stewardship_contracts } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:stewardship_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:stewardship_contracts + } + } + } + #Learning Contracts + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:learning_contracts } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:learning_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:learning_contracts + } + } + } + #Intrigue Contracts + if = { + limit = { var:1025_saved_$NUM$_contract_type ?= flag:intrigue_contracts } + save_scope_value_as = { + name = 1025_$NUM$_contract + value = flag:intrigue_contracts + } + #Save as a temporary variable that is removed after exiting the decision to avoid desc-bloat + root = { + set_variable = { + name = 1025_$NUM$_contract_desc + value = flag:intrigue_contracts + } + } + } + #Add more contract types below VV + } +} + +#This location has a saved contract variable +scripted_trigger 1025_location_has_a_saved_contract_type_trigger = { + scope:visiting_location = { + OR = { + has_variable = 1025_saved_first_contract_type + has_variable = 1025_saved_second_contract_type + has_variable = 1025_saved_third_contract_type + } + } +} + +#The saved contract variable is of CONTRACT_TYPE_FLAG-type +scripted_trigger 1025_saved_location_contract_type_matches_this_type_trigger = { + scope:visiting_location = { + OR = { + var:1025_saved_first_contract_type ?= $CONTRACT_TYPE_FLAG$ + var:1025_saved_second_contract_type ?= $CONTRACT_TYPE_FLAG$ + var:1025_saved_third_contract_type ?= $CONTRACT_TYPE_FLAG$ + } + } +} + +#Used more than 3 times eh +scripted_trigger 1025_region_has_suitable_employer_trigger = { + holder = { + highest_held_title_tier > tier_duchy + NOT = { is_in_list = checked_holders } + save_temporary_scope_as = holder_check + valid_laamp_basic_trigger = { + EMPLOYER = scope:holder_check + LAAMP = root + } + #Copying the special contracts from the character interaction, for now. MUST match the random_list in 1025_find_ruler_and_spawn_legendary_contract_effect + root = { + OR = { + can_create_task_contract = { + type_name = laamp_raid_contract + employer = scope:holder_check + } + can_create_task_contract = { + type_name = laamp_steal_artifact_contract + employer = scope:holder_check + } + can_create_task_contract = { + type_name = laamp_treasure_hunting_contract + employer = scope:holder_check + } + can_create_task_contract = { + type_name = laamp_transport_vip + employer = scope:holder_check + } + can_create_task_contract = { + type_name = laamp_transport_artifact + employer = scope:holder_check + } + can_create_task_contract = { + type_name = laamp_transport_gold + employer = scope:holder_check + } + can_create_task_contract = { + type_name = laamp_transport_animal + employer = scope:holder_check + } + } + } + add_to_temporary_list = checked_holders + } +} + +#... well, can we? +scripted_trigger 1025_can_create_legendary_contract_trigger = { + OR = { + #North Europe + AND = { + scope:visiting_location = { geographical_region = world_europe_north } + any_county_in_region = { + region = world_europe_north + 1025_region_has_suitable_employer_trigger = yes + } + } + #West Europe + AND = { + scope:visiting_location = { geographical_region = world_europe_west } + any_county_in_region = { + region = world_europe_west + 1025_region_has_suitable_employer_trigger = yes + } + } + #East Europe + AND = { + scope:visiting_location = { geographical_region = world_europe_east } + any_county_in_region = { + region = world_europe_east + 1025_region_has_suitable_employer_trigger = yes + } + } + #South Europe + AND = { + scope:visiting_location = { geographical_region = world_europe_south } + any_county_in_region = { + region = world_europe_south + 1025_region_has_suitable_employer_trigger = yes + } + } + #Middle East + AND = { + scope:visiting_location = { geographical_region = world_middle_east } + any_county_in_region = { + region = world_middle_east + 1025_region_has_suitable_employer_trigger = yes + } + } + #India + AND = { + scope:visiting_location = { geographical_region = world_india } + any_county_in_region = { + region = world_india + 1025_region_has_suitable_employer_trigger = yes + } + } + #North Africa + AND = { + scope:visiting_location = { geographical_region = world_africa_north } + any_county_in_region = { + region = world_africa_north + 1025_region_has_suitable_employer_trigger = yes + } + } + #West Africa + AND = { + scope:visiting_location = { geographical_region = world_africa_west } + any_county_in_region = { + region = world_africa_west + 1025_region_has_suitable_employer_trigger = yes + } + } + #East Africa + AND = { + scope:visiting_location = { geographical_region = world_africa_east } + any_county_in_region = { + region = world_africa_east + 1025_region_has_suitable_employer_trigger = yes + } + } + #West Steppe + AND = { + scope:visiting_location = { geographical_region = world_steppe_west } + any_county_in_region = { + region = world_steppe_west + 1025_region_has_suitable_employer_trigger = yes + } + } + #East Steppe + AND = { + scope:visiting_location = { geographical_region = world_steppe_east } + any_county_in_region = { + region = world_steppe_east + 1025_region_has_suitable_employer_trigger = yes + } + } + } +} + +#Don't duplicate contract types between contract scopes +scripted_trigger 1025_contract_type_is_assigned_trigger = { + OR = { + scope:1025_first_contract ?= $CONTRACT_TYPE_FLAG$ + scope:1025_second_contract ?= $CONTRACT_TYPE_FLAG$ + scope:1025_third_contract ?= $CONTRACT_TYPE_FLAG$ + } +} + +#Since the treasure map contract doesn't have a time limit, make 'em old and unfit +scripted_trigger 1025_is_old_and_unable_trigger = { + age > 50 + is_imprisoned = no + OR = { + has_trait = blind + has_trait = one_legged + has_trait = one_eyed + has_trait = infirm + has_trait = wounded_1 + } +} + +#Standard checks +scripted_trigger 1025_appropriate_contract_employer_trigger = { + # Players shouldn't get tangled up in contracts, ever. + is_ai = yes + # Plus some standard stuff. + is_alive = yes + is_adult = yes + is_incapable = no + # Don't offer to work with those who've wronged us. + NOR = { + government_has_flag = government_is_landless_adventurer + # No one we're at war with. + is_at_war_with = root + # Rivals are cheap to grab. + has_relation_rival = root + # Expulsion + custom_tooltip = { + text = adventurer_expelled_trigger_tt + OR = { + has_opinion_modifier = { + target = root + modifier = eviction_ignored_opinion + } + any_liege_or_above = { + has_opinion_modifier = { + target = root + modifier = eviction_ignored_opinion + } + } + } + } + } +} + +#Landed checks +scripted_trigger 1025_is_appropriate_landed_contract_employer_trigger = { + 1025_appropriate_contract_employer_trigger = yes + this.capital_province ?= { + squared_distance = { + target = root.domicile.domicile_location + value < define:NTaskContract|ADVENTURER_DISTANCE_RESTRICTION + } + } +} + +#In too deep, man +scripted_trigger 1025_is_gated_due_to_thievery_trigger = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 60 + } +} + +#Should we be gated from contracts? +scripted_trigger 1025_is_renowned_thief_trigger = { + trigger_if = { + limit = { scope:1025_$NUM$_contract = flag:treasure_map_contract } + custom_tooltip = { + text = gallowsbait_thief_blocked_from_contract.tt + 1025_is_gated_due_to_thievery_trigger = no + } + } + trigger_else = { always = yes } +} + +#Nothing at all! +scripted_trigger 1025_no_contracts_trigger = { + OR = { + #All contract types are on cooldown, I guess + NOR = { + exists = scope:1025_first_contract + exists = scope:1025_second_contract + exists = scope:1025_third_contract + } + has_variable = 1025_has_contracted_recently + } +} + + +#Head to the Town Crier to spawn Contract(s) +ep3_laamp_decision_event.1025 = { + type = character_event + title = ep3_laamp_decision_event.1025.t + window = visit_settlement_window + desc = { + #What're they doing? + first_valid = { + #We've returned to this scene, now what + #Use this when we have all contract types on cooldown. Should be a bored crier. + ##COOLDOWN + triggered_desc = { + trigger = { 1025_no_contracts_trigger = yes } + desc = ep3_laamp_decision_event.1025.desc_nothing + } + #RETURN: Tribal - Legendary contract + random_valid = { + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + exists = scope:been_to_contract + scope:contract_loc_tracker ?= 0 + OR = { + scope:1025_first_contract ?= flag:legendary_contract + scope:1025_second_contract ?= flag:legendary_contract + scope:1025_third_contract ?= flag:legendary_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_tribal_legendary_returned_01 + } + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + scope:contract_loc_tracker ?= 1 + OR = { + scope:1025_first_contract ?= flag:legendary_contract + scope:1025_second_contract ?= flag:legendary_contract + scope:1025_third_contract ?= flag:legendary_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_tribal_legendary_returned_02 + } + } + #RETURN: Legendary contract + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_contract + scope:contract_loc_tracker ?= 0 + OR = { + scope:1025_first_contract ?= flag:legendary_contract + scope:1025_second_contract ?= flag:legendary_contract + scope:1025_third_contract ?= flag:legendary_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_legendary_returned_01 + } + triggered_desc = { + trigger = { + scope:contract_loc_tracker ?= 1 + OR = { + scope:1025_first_contract ?= flag:legendary_contract + scope:1025_second_contract ?= flag:legendary_contract + scope:1025_third_contract ?= flag:legendary_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_legendary_returned_02 + } + } + #RETURN: Tribal - No legendary contract + random_valid = { + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + exists = scope:been_to_contract + scope:contract_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1025.desc_tribal_returned_01 + } + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + scope:contract_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1025.desc_tribal_returned_02 + } + } + #RETURN: No legendary contract + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_contract + scope:contract_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1025.desc_returned_01 + } + triggered_desc = { + trigger = { scope:contract_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1025.desc_returned_02 + } + } + #FIRST TIME: Tribal - Legendary contract - Reused Elder + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + exists = scope:laamp_recurring_town_crier + NOR = { + exists = scope:been_to_contract + has_variable = 1025_has_contracted_recently + } + OR = { + scope:1025_first_contract ?= flag:legendary_contract + scope:1025_second_contract ?= flag:legendary_contract + scope:1025_third_contract ?= flag:legendary_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_tribal_legendary_reused_crier + } + #FIRST TIME: Legendary contract - Reused Town Crier + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_town_crier + NOR = { + exists = scope:been_to_contract + has_variable = 1025_has_contracted_recently + } + OR = { + scope:1025_first_contract ?= flag:legendary_contract + scope:1025_second_contract ?= flag:legendary_contract + scope:1025_third_contract ?= flag:legendary_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_legendary_reused_crier + } + #FIRST TIME: Tribal - Legendary contract + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + NOR = { + exists = scope:been_to_contract + has_variable = 1025_has_contracted_recently + } + OR = { + scope:1025_first_contract ?= flag:legendary_contract + scope:1025_second_contract ?= flag:legendary_contract + scope:1025_third_contract ?= flag:legendary_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_tribal_legendary + } + #FIRST TIME: Legendary contract + triggered_desc = { + trigger = { + NOR = { + exists = scope:been_to_contract + has_variable = 1025_has_contracted_recently + } + OR = { + scope:1025_first_contract ?= flag:legendary_contract + scope:1025_second_contract ?= flag:legendary_contract + scope:1025_third_contract ?= flag:legendary_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_legendary + } + #FIRST TIME: Tribal - No legendary contract - Reused Town Crier + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + exists = scope:laamp_recurring_town_crier + NOR = { + exists = scope:been_to_contract + has_variable = 1025_has_contracted_recently + } + } + desc = ep3_laamp_decision_event.1025.desc_tribal_reused_crier + } + #FIRST TIME: No legendary contract - Reused Town Crier + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_town_crier + NOR = { + exists = scope:been_to_contract + has_variable = 1025_has_contracted_recently + } + } + desc = ep3_laamp_decision_event.1025.desc_reused_crier + } + #FIRST TIME: Tribal - No legendary contract + triggered_desc = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + NOR = { + exists = scope:been_to_contract + has_variable = 1025_has_contracted_recently + } + } + desc = ep3_laamp_decision_event.1025.desc_tribal + } + #FIRST TIME: No legendary contract + triggered_desc = { + trigger = { + NOR = { + exists = scope:been_to_contract + has_variable = 1025_has_contracted_recently + } + } + desc = ep3_laamp_decision_event.1025.desc + } + } + #Concatenated and outsourced to custom_loc - trust me, this is less cursed than the alternative + #A exists + triggered_desc = { + trigger = { + exists = scope:1025_first_contract + NOR = { + exists = scope:1025_second_contract + exists = scope:1025_third_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_concatenated_A + } + #AB exists + triggered_desc = { + trigger = { + exists = scope:1025_first_contract + exists = scope:1025_second_contract + NOT = { exists = scope:1025_third_contract } + } + desc = ep3_laamp_decision_event.1025.desc_concatenated_AB + } + #ABC exists + triggered_desc = { + trigger = { + exists = scope:1025_first_contract + exists = scope:1025_second_contract + exists = scope:1025_third_contract + } + desc = ep3_laamp_decision_event.1025.desc_concatenated_ABC + } + #B exists + triggered_desc = { + trigger = { + exists = scope:1025_second_contract + NOR = { + exists = scope:1025_first_contract + exists = scope:1025_third_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_concatenated_B + } + #BC exists + triggered_desc = { + trigger = { + NOT = { exists = scope:1025_first_contract } + exists = scope:1025_second_contract + exists = scope:1025_third_contract + } + desc = ep3_laamp_decision_event.1025.desc_concatenated_BC + } + #C exists + triggered_desc = { + trigger = { + exists = scope:1025_third_contract + NOR = { + exists = scope:1025_first_contract + exists = scope:1025_second_contract + } + } + desc = ep3_laamp_decision_event.1025.desc_concatenated_C + } + #AC exists + triggered_desc = { + trigger = { + exists = scope:1025_first_contract + exists = scope:1025_third_contract + NOT = { exists = scope:1025_second_contract } + } + desc = ep3_laamp_decision_event.1025.desc_concatenated_AC + } + } + theme = landless_adventurer + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_activity" } + override_background = { + trigger = { 1000_is_a_nomadic_holding_trigger = yes } + reference = mpo_camp_steppe + } + override_background = { reference = garden_location } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + animation = survey + } + center_portrait = { + character = root + triggered_animation = { + trigger = { 1025_no_contracts_trigger = yes } + animation = worry + } + animation = interested + } + right_portrait = { + character = scope:laamp_town_crier + triggered_animation = { + trigger = { 1025_no_contracts_trigger = yes } + animation = boredom + } + animation = debating + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = contract } + #Run all of this once + if = { + limit = { + NOT = { exists = scope:been_to_contract } + } + #Spawn a Town Crier + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_crier_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + #_Elder_ + trigger_if = { + limit = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + age >= 50 + } + } + save_scope_as = laamp_town_crier + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_town_crier + } + #Otherwise find a Town Crier in the pool + if = { + limit = { + NOT = { exists = scope:laamp_town_crier } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + is_available_healthy_adult = yes + NOT = { has_trait = shy } + #_Elder_ + trigger_if = { + limit = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + age >= 50 + } + } + save_scope_as = laamp_town_crier + } + } + #Otherwise create a Town Crier + if = { + limit = { + NOT = { exists = scope:laamp_town_crier } + } + #Create Elder to stuff in pool + if = { + limit = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + create_character = { + template = generic_peasant_character + location = scope:visiting_location + age = { 50 60 } + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_town_crier + } + } + #Create Town Crier to stuff in pool + else = { + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_town_crier + } + } + } + #Remember the Town Crier + 1010_remember_vendor_character_effect = { GUILD = crier CHARACTER = scope:laamp_town_crier } + #First Contract + if = { + limit = { + NOT = { exists = scope:1025_first_contract } + } + #Did we, or someone else, check for contracts here recently? + if = { + limit = { + scope:visiting_location = { has_variable = 1025_saved_first_contract_type } + } + #Translating values from variable to flag translates to number? + 1025_translate_variable_into_flag_effect = { NUM = first } + } + #Otherwise generate a new type + else = { + 1025_randomize_and_remember_contract_type_effect = { NUM = first } + } + } + #Set up the employer, if necessary + if = { + limit = { exists = scope:1025_first_contract } + 1025_generate_employer_effect = { NUM = first } + } + #Second Contract + if = { + limit = { + NOT = { exists = scope:1025_second_contract } + } + #Did we, or someone else, check for contracts here recently? + if = { + limit = { + scope:visiting_location = { has_variable = 1025_saved_second_contract_type } + } + #Translating values from variable to flag + 1025_translate_variable_into_flag_effect = { NUM = second } + } + #Otherwise generate a new type + else = { + 1025_randomize_and_remember_contract_type_effect = { NUM = second } + } + } + #Set up the employer, if necessary + if = { + limit = { exists = scope:1025_second_contract } + 1025_generate_employer_effect = { NUM = second } + } + #If no legendary contract, Third Contract + if = { + limit = { + NOT = { exists = scope:1025_third_contract } + } + #Did we, or someone else, check for contracts here recently? + if = { + limit = { + scope:visiting_location = { has_variable = 1025_saved_third_contract_type } + } + #Translating values from variable to flag + 1025_translate_variable_into_flag_effect = { NUM = third } + } + #Otherwise generate a new type + else = { + 1025_randomize_and_remember_contract_type_effect = { NUM = third } + } + } + #Set up the employer, if necessary + if = { + limit = { exists = scope:1025_third_contract } + 1025_generate_employer_effect = { NUM = third } + } + } + } + #Contract A + option = { + name = ep3_laamp_decision_event.1025.a + trigger = { + exists = scope:1025_first_contract + 1025_is_renowned_thief_trigger = { NUM = first } + } + show_as_unavailable = { exists = scope:1025_first_contract } + #Remove the remember-variable for A + scope:visiting_location = { remove_variable ?= 1025_saved_first_contract_type } + #Spawn contract(s) + 1025_option_picked_spawn_contract_effect = { NUM = first } + #Pick tooltip and set up the cooldown for the contract type + 1025_option_tooltip_and_cooldown_contract_type_effect = { NUM = first } + #Done here; go back to the main event + 1025_finished_contract_effect = yes + } + #Contract B + option = { + name = ep3_laamp_decision_event.1025.b + trigger = { + exists = scope:1025_second_contract + 1025_is_renowned_thief_trigger = { NUM = second } + } + show_as_unavailable = { exists = scope:1025_second_contract } + #Remove the remember-variable for B + scope:visiting_location = { remove_variable ?= 1025_saved_second_contract_type } + #Spawn contract(s) + 1025_option_picked_spawn_contract_effect = { NUM = second } + #Pick tooltip and set up the cooldown for the contract type + 1025_option_tooltip_and_cooldown_contract_type_effect = { NUM = second } + #Done here; go back to the main event + 1025_finished_contract_effect = yes + } + #Contract C + option = { + name = ep3_laamp_decision_event.1025.c + trigger = { + exists = scope:1025_third_contract + 1025_is_renowned_thief_trigger = { NUM = third } + } + show_as_unavailable = { exists = scope:1025_third_contract } + #Remove the remember-variable for C + scope:visiting_location = { remove_variable ?= 1025_saved_third_contract_type } + #Spawn contract(s) + 1025_option_picked_spawn_contract_effect = { NUM = third } + #Pick tooltip and set up the cooldown for the contract type + 1025_option_tooltip_and_cooldown_contract_type_effect = { NUM = third } + #Done here; go back to the main event + 1025_finished_contract_effect = yes + } + #I want to do something else + option = { + #Nothing here + name = { + trigger = { + NOT = { + exists = scope:been_to_contract + exists = scope:1025_first_contract + exists = scope:1025_second_contract + exists = scope:1025_third_contract + } + } + text = ep3_laamp_decision_event.1025.d_nothing + } + name = ep3_laamp_decision_event.1025.d + if = { + limit = { + NOT = { + exists = scope:1025_first_contract + exists = scope:1025_second_contract + exists = scope:1025_third_contract + } + } + save_scope_value_as = { + name = laamp_decision_has_contracted + value = flag:no + } + } + #For desc flavor + else = { save_scope_as = been_to_contract } + #Go back to the main event + 1001_return_to_second_effect = yes + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:contract } + } +} + + +###################################################################### +# TAVERN +# ep3_laamp_decision_event.1030 +###################################################################### + +#Withered workaround +scripted_effect 1030_save_hub_scope_effect = { + if = { + limit = { + NOT = { exists = scope:been_to_$HUB$ } + } + save_scope_as = been_to_$HUB$ + } +} + +#Set the correct variable to block off the Tavern option and remove the desc flavor variable +scripted_effect 1030_finished_tavern_effect = { + remove_list_variable = { + name = list_of_options + target = flag:has_tavern_option + } + save_scope_as = laamp_decision_finished_tavern_option +} + +#Nothing left for us to do +scripted_trigger 1030_done_with_tavern_trigger = { + exists = scope:laamp_decision_has_storied + exists = scope:laamp_decision_has_recruited + trigger_if = { + limit = { exists = scope:laamp_spouse_material } + exists = scope:laamp_decision_has_spoused + } + trigger_if = { + limit = { exists = scope:laamp_hooded_figure } + exists = scope:laamp_decision_recruited_hood + } +} + +#Should be an alright seedy fella +scripted_trigger 1030_gallowsbait_character_trigger = { + intrigue > 15 + has_trait = gallowsbait + OR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value = medium_lifestyle_random_xp_low + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value = medium_lifestyle_random_xp_low + } + has_trait_xp = { + trait = gallowsbait + track = thief + value = medium_lifestyle_random_xp_low + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value = medium_lifestyle_random_xp_low + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value = medium_lifestyle_random_xp_low + } + } +} + +#Not Emperors and Kings, except if... +scripted_trigger 1030_appropriate_noble_trigger = { + is_available_ai_adult = yes + NOR = { + is_contact_of = root + has_variable = 1030_has_been_hooded_recently + has_any_scripted_relation = root #Remember to disable this for rival should we revisit to add some form of murder option in the future + } + #... they're eccentric + trigger_if = { + limit = { + NOT = { has_trait = eccentric } + } + highest_held_title_tier <= tier_duchy + } +} + +scripted_trigger 1030_not_already_used_character_trigger = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no +} + + +#Visit the local tavern +ep3_laamp_decision_event.1030 = { + type = character_event + title = ep3_laamp_decision_event.1030.t + window = visit_settlement_window + desc = { + #Intro + first_valid = { + #We've returned to this scene, now what + #RETURN: We've returned from Main Square + random_valid = { + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + 1000_is_a_nomadic_holding_trigger = no + exists = scope:been_to_tavern + OR = { + scope:tavern_loc_tracker ?= 0 + scope:tavern_loc_tracker ?= 2 + } + } + desc = ep3_laamp_decision_event.1030.desc_returned_01 + } + #Nomad variant + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + 1000_is_a_nomadic_holding_trigger = yes + exists = scope:been_to_tavern + OR = { + scope:tavern_loc_tracker ?= 0 + scope:tavern_loc_tracker ?= 2 + } + } + desc = ep3_laamp_decision_event.1030.desc_nomad_returned_01 + } + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + scope:tavern_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1030.desc_returned_02 + } + } + #RETURN: We've returned from the Storyteller + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + var:return_from_location ?= flag:storyteller + } + desc = ep3_laamp_decision_event.1030.desc_returned_from_story + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + var:return_from_location ?= flag:storyteller + } + desc = ep3_laamp_decision_event.1030.desc_nomad_returned_from_story + } + #RETURN: We've returned from the Recruitment + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + var:return_from_location ?= flag:recruit + } + desc = ep3_laamp_decision_event.1030.desc_returned_from_recruit + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + var:return_from_location ?= flag:recruit + } + desc = ep3_laamp_decision_event.1030.desc_nomad_returned_from_recruit + } + #RETURN: We've returned from unwinding with the Spouse Material + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + var:return_from_location ?= flag:spouse + exists = scope:1035_unwinded_with_spouse_potential + } + desc = ep3_laamp_decision_event.1030.desc_returned_from_unwinding_spouse + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + var:return_from_location ?= flag:spouse + exists = scope:1035_unwinded_with_spouse_potential + } + desc = ep3_laamp_decision_event.1030.desc_nomad_returned_from_unwinding_spouse + } + #RETURN: We've returned from the Spouse Material + triggered_desc = { + trigger = { var:return_from_location ?= flag:spouse } + desc = ep3_laamp_decision_event.1030.desc_returned_from_spouse + } + #RETURN: We failed to save noble Hooded Figure + triggered_desc = { + trigger = { + var:return_from_location ?= flag:hood + scope:laamp_decision_recruited_hood ?= flag:wounded + } + desc = ep3_laamp_decision_event.1030.desc_returned_from_hood_noble_fail + } + #RETURN: We've returned from the noble Hooded Figure + triggered_desc = { + trigger = { + var:return_from_location ?= flag:hood + exists = scope:laamp_disguised_noble + } + desc = ep3_laamp_decision_event.1030.desc_returned_from_hood_noble + } + #RETURN: We've returned from the Hooded Figure + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + var:return_from_location ?= flag:hood + } + desc = ep3_laamp_decision_event.1030.desc_returned_from_hood + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + var:return_from_location ?= flag:hood + } + desc = ep3_laamp_decision_event.1030.desc_nomad_returned_from_hood + } + #FIRST TIME: Nomad dwelling + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + NOT = { exists = scope:been_to_tavern } + } + desc = ep3_laamp_decision_event.1030.desc_nomad + } + #FIRST TIME: First time here + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_tavern } + } + desc = ep3_laamp_decision_event.1030.desc + } + } + #MID: Is there a spouse? Do we recognize them? Have we interacted with them? + first_valid = { + #RETURN: Reused spouse is still here + triggered_desc = { + trigger = { + exists = scope:been_to_tavern + exists = scope:laamp_recurring_spouse + NOR = { + exists = scope:been_to_spouse + exists = scope:laamp_decision_has_spoused + } + } + desc = ep3_laamp_decision_event.1030.desc_mid_return_reused_spouse + } + #FIRST TIME: You've seen this lass/lad before + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_tavern } + exists = scope:laamp_recurring_spouse + } + desc = ep3_laamp_decision_event.1030.desc_mid_reused_spouse + } + #RETURN: Spouse is still here + triggered_desc = { + trigger = { + exists = scope:been_to_tavern + exists = scope:laamp_spouse_material + NOR = { + exists = scope:been_to_spouse + exists = scope:laamp_decision_has_spoused + } + } + desc = ep3_laamp_decision_event.1030.desc_mid_return_spouse + } + #FIRST TIME: Nomad dwelling + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + NOT = { exists = scope:been_to_tavern } + exists = scope:laamp_spouse_material + } + desc = ep3_laamp_decision_event.1030.desc_nomad_mid_spouse + } + #Otherwise just exclude them + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + NOT = { exists = scope:been_to_tavern } + } + desc = ep3_laamp_decision_event.1030.desc_nomad_mid + } + #FIRST TIME + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_tavern } + exists = scope:laamp_spouse_material + } + desc = ep3_laamp_decision_event.1030.desc_mid_spouse + } + #Otherwise just exclude them + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_tavern } + } + desc = ep3_laamp_decision_event.1030.desc_mid + } + } + #Outro + first_valid = { + #FIRST TIME: First time here, look at the hood + triggered_desc = { + trigger = { + exists = scope:laamp_hooded_figure + NOT = { exists = scope:been_to_tavern } + } + desc = ep3_laamp_decision_event.1030.desc_outro_hooded + } + #FIRST TIME: First time here, curious partner + triggered_desc = { + trigger = { + exists = scope:visiting_partner + NOT = { exists = scope:been_to_tavern } + } + desc = ep3_laamp_decision_event.1030.desc_outro_partner + } + #FIRST TIME: First time here + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_tavern } + } + desc = ep3_laamp_decision_event.1030.desc_outro + } + #RETURN: Partner - there is nothing left for us here + triggered_desc = { + trigger = { + exists = scope:visiting_partner + 1030_done_with_tavern_trigger = yes + } + desc = ep3_laamp_decision_event.1030.desc_outro_return_partner_finished + } + #RETURN: There is nothing left for us here + triggered_desc = { + trigger = { 1030_done_with_tavern_trigger = yes } + desc = ep3_laamp_decision_event.1030.desc_outro_return_finished + } + #RETURN: Hood noble did not deviate, yet + triggered_desc = { + trigger = { + exists = scope:laamp_hooded_figure + exists = scope:laamp_disguised_noble + NOR = { + exists = scope:laamp_decision_recruited_hood + exists = scope:been_to_hood + } + } + desc = ep3_laamp_decision_event.1030.desc_outro_hooded_noble_return + } + #RETURN: Hood thief did not deviate, yet + triggered_desc = { + trigger = { + exists = scope:laamp_hooded_figure + NOR = { + exists = scope:laamp_decision_recruited_hood + exists = scope:been_to_hood + } + } + desc = ep3_laamp_decision_event.1030.desc_outro_hooded_return + } + #RETURN: We've been here before + random_valid = { + #RETURN: Partner flavor + triggered_desc = { + trigger = { + exists = scope:visiting_partner + exists = scope:been_to_tavern + scope:tavern_loc_tracker ?= 0 + has_variable = 1030_use_partner_animation_var + } + desc = ep3_laamp_decision_event.1030.desc_outro_return_partner_01 + } + triggered_desc = { + trigger = { + exists = scope:visiting_partner + scope:tavern_loc_tracker ?= 1 + has_variable = 1030_use_partner_animation_var + } + desc = ep3_laamp_decision_event.1030.desc_outro_return_partner_02 + } + triggered_desc = { + trigger = { + exists = scope:visiting_partner + scope:tavern_loc_tracker ?= 2 + has_variable = 1030_use_partner_animation_var + } + desc = ep3_laamp_decision_event.1030.desc_outro_return_partner_03 + } + #RETURN: Generics + triggered_desc = { + trigger = { + exists = scope:been_to_tavern + scope:tavern_loc_tracker ?= 0 + NOT = { has_variable = 1030_use_partner_animation_var } + } + desc = ep3_laamp_decision_event.1030.desc_outro_return_01 + } + triggered_desc = { + trigger = { + scope:tavern_loc_tracker ?= 1 + NOT = { has_variable = 1030_use_partner_animation_var } + } + desc = ep3_laamp_decision_event.1030.desc_outro_return_02 + } + triggered_desc = { + trigger = { + scope:tavern_loc_tracker ?= 2 + NOT = { has_variable = 1030_use_partner_animation_var } + } + desc = ep3_laamp_decision_event.1030.desc_outro_return_03 + } + } + } + } + theme = landless_adventurer + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_social" } + override_icon = { reference = "gfx/interface/icons/event_types/type_travel_stewardship.dds" } + override_background = { + trigger = { 1000_is_a_nomadic_holding_trigger = yes } + reference = mpo_tent_interior_mongol + } + override_background = { + trigger = { + scope:visiting_location = { + has_holding_type = tribal_holding + } + } + reference = throne_room_tribal + } + override_background = { reference = tavern } + #PARTNER / ROOT + left_portrait = { + trigger = { + exists = scope:1030_first_character + #Don't display this one if ROOT is in both portraits + NAND = { + scope:1030_first_character = root + exists = scope:1030_second_character + scope:1030_second_character = root + } + } + character = scope:1030_first_character + #PARTNER: If it's our (tired) visiting partner + triggered_animation = { + trigger = { + 1030_done_with_tavern_trigger = yes + scope:visiting_partner ?= scope:1030_first_character + } + animation = boredom + } + #PARTNER: Variation 01 + triggered_animation = { + trigger = { + scope:visiting_partner ?= scope:1030_first_character + exists = scope:been_to_tavern + scope:tavern_loc_tracker ?= 0 + root = { has_variable = 1030_use_partner_animation_var } + } + animation = interested + } + #PARTNER: Variation 02 + triggered_animation = { + trigger = { + scope:visiting_partner ?= scope:1030_first_character + scope:tavern_loc_tracker ?= 1 + root = { has_variable = 1030_use_partner_animation_var } + } + animation = laugh + } + #PARTNER: Variation 03 + triggered_animation = { + trigger = { + scope:visiting_partner ?= scope:1030_first_character + scope:tavern_loc_tracker ?= 2 + root = { has_variable = 1030_use_partner_animation_var } + } + animation = dancing + } + #PARTNER: If it's our visiting partner + triggered_animation = { + trigger = { scope:visiting_partner ?= scope:1030_first_character } + animation = personality_content + } + #ROOT: Hooded figure! + triggered_animation = { + trigger = { + scope:1030_first_character = root + exists = scope:laamp_hooded_figure + NOT = { exists = scope:been_to_hood } + } + animation = interested + } + #ROOT: Eyeing the vixen at the bar + triggered_animation = { + trigger = { + scope:1030_first_character = root + exists = scope:laamp_spouse_material + NOT = { exists = scope:been_to_spouse } + } + animation = admiration + } + #ROOT: Eh, why not + triggered_animation = { + trigger = { + scope:1030_first_character = root + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = eccentric + } + } + animation = personality_irrational + } + #ROOT: That's.. a lot of people + triggered_animation = { + trigger = { + scope:1030_first_character = root + OR = { + has_trait = paranoid + has_trait = shy + } + } + animation = personality_coward + } + #ROOT: My kind of people! + triggered_animation = { + trigger = { + scope:1030_first_character = root + OR = { + has_trait = lifestyle_reveler + has_trait = gregarious + } + } + animation = happiness + } + #Fallback, we really shouldn't end up here + animation = happiness + } + #SPOUSE / ROOT + center_portrait = { + trigger = { exists = scope:1030_second_character } + camera = camera_event_scheme_vs_right_look_right + character = scope:1030_second_character + #SPOUSE: Untapped + triggered_animation = { + trigger = { + scope:laamp_spouse_material ?= scope:1030_second_character + NOT = { exists = scope:been_to_spouse } + } + animation = personality_rational + } + #SPOUSE: Been there + triggered_animation = { + trigger = { scope:laamp_spouse_material ?= scope:1030_second_character } + animation = personality_cynical + } + #ROOT: Hooded figure! + triggered_animation = { + trigger = { + scope:1030_second_character = root + exists = scope:laamp_hooded_figure + NOT = { exists = scope:been_to_hood } + } + animation = interested + } + #ROOT: Eyeing the vixen at the bar + triggered_animation = { + trigger = { + scope:1030_second_character = root + exists = scope:laamp_spouse_material + NOT = { exists = scope:been_to_spouse } + } + animation = admiration + } + #ROOT: Eh, why not + triggered_animation = { + trigger = { + scope:1030_second_character = root + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = eccentric + } + } + animation = personality_irrational + } + #ROOT: That's.. a lot of people + triggered_animation = { + trigger = { + scope:1030_second_character = root + OR = { + has_trait = paranoid + has_trait = shy + } + } + animation = personality_coward + } + #ROOT: My kind of people! + triggered_animation = { + trigger = { + scope:1030_second_character = root + OR = { + has_trait = lifestyle_reveler + has_trait = gregarious + } + } + animation = happiness + } + #Fallback, we really shouldn't end up here + animation = personality_rational + } + #HOOD / SPOUSE + right_portrait = { + trigger = { + exists = scope:1030_third_character + #If this is root, then that means we have talked to the Hooded Figure and we don't have a Spouse to display, so let's disappear the portrait + scope:1030_third_character != root + } + camera = camera_event_scheme_vs_center_look_left + character = scope:1030_third_character + #HOOD: Hood for the hooded figure + triggered_outfit = { + trigger = { scope:laamp_hooded_figure ?= scope:1030_third_character } + outfit_tags = { western_stealth_hood } + } + #HOOD NOBLE: We've returned here and it's still the hooded noble + triggered_animation = { + trigger = { + scope:laamp_disguised_noble ?= scope:1030_third_character + exists = scope:been_to_tavern + } + animation = drink_goblet + } + #HOOD THIEF: We've returned here and it's still the hooded thief + triggered_animation = { + trigger = { + scope:laamp_hooded_figure ?= scope:1030_third_character + exists = scope:been_to_tavern + } + animation = spymaster + } + #SPOUSE: Untapped + triggered_animation = { + trigger = { + scope:laamp_spouse_material ?= scope:1030_third_character + NOT = { exists = scope:been_to_spouse } + } + animation = personality_rational + } + #SPOUSE: Been there + triggered_animation = { + trigger = { scope:laamp_spouse_material ?= scope:1030_third_character } + animation = personality_cynical + } + #Fallback, we really shouldn't end up here + animation = personality_callous + } + #Shove the Spouse / Hood here if they exist, we've visited them but we haven't actioned them yet + lower_left_portrait = { + trigger = { + NOT = { root ?= scope:1030_fourth_character } + } + character = scope:1030_fourth_character + } + lower_center_portrait = { + trigger = { + NOT = { root ?= scope:1030_fifth_character } + } + character = scope:1030_fifth_character + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Set up the ancillary portraits to remind the player of the characters + if = { + #Hood _and_ Spouse exists + limit = { + #We've been to both at least once + exists = scope:been_to_spouse + exists = scope:been_to_hood + #We're not done with them yet + AND = { + exists = scope:laamp_spouse_material + NOT = { exists = scope:laamp_decision_has_spoused } + } + AND = { + exists = scope:laamp_hooded_figure + NOT = { exists = scope:laamp_decision_recruited_hood } + } + #This isn't already the state + NAND = { + exists = scope:1030_fourth_character + scope:1030_fourth_character ?= scope:laamp_spouse_material + exists = scope:1030_fifth_character + scope:1030_fifth_character ?= scope:laamp_hooded_figure + } + } + scope:laamp_spouse_material = { save_scope_as = 1030_fourth_character } + scope:laamp_hooded_figure = { save_scope_as = 1030_fifth_character } + } + else_if = { + #Only Spouse exists + limit = { + exists = scope:laamp_spouse_material + NOR = { + #We're not done with Spouse yet + exists = scope:laamp_decision_has_spoused + #This isn't already the state + AND = { + exists = scope:1030_fourth_character + scope:1030_fourth_character ?= scope:laamp_spouse_material + } + } + #We've been to Spouse at least once + exists = scope:been_to_spouse + } + scope:laamp_spouse_material = { save_scope_as = 1030_fourth_character } + } + else_if = { + #Hood exists but Spouse either never existed or got recruited + limit = { + exists = scope:laamp_hooded_figure + NOR = { + #We're not done with Hood yet + exists = scope:laamp_decision_recruited_hood + #This isn't already the state + AND = { + exists = scope:1030_fourth_character + scope:1030_fourth_character ?= scope:laamp_hooded_figure + } + } + #We've been to Hood at least once + exists = scope:been_to_hood + OR = { + #Either the Spouse never existed + NAND = { + exists = scope:laamp_spouse_material + exists = scope:laamp_decision_has_spoused + } + #Or we've recruited the Spouse already + AND = { + exists = scope:laamp_spouse_material + exists = scope:laamp_decision_has_spoused + } + } + } + scope:laamp_hooded_figure = { save_scope_as = 1030_fourth_character } + #If we've already attached Hood to the fifth portrait, overwrite it with ROOT to hide that portrait + if = { + limit = { exists = scope:1030_fifth_character } + save_scope_as = 1030_fifth_character + } + } + #Clean up any existing fourth/fifth portrait if we're done with all who exist + if = { + limit = { + exists = scope:1030_fourth_character + trigger_if = { + limit = { + exists = scope:laamp_spouse_material + exists = scope:laamp_hooded_figure + } + #We've recruited the Spouse already + AND = { + exists = scope:laamp_spouse_material + exists = scope:laamp_decision_has_spoused + } + #We've recruited the Hood already + AND = { + exists = scope:laamp_hooded_figure + exists = scope:laamp_decision_recruited_hood + } + } + trigger_else_if = { + limit = { + exists = scope:laamp_spouse_material + NOT = { exists = scope:laamp_hooded_figure } + } + #We've recruited the Spouse already + AND = { + exists = scope:laamp_spouse_material + exists = scope:laamp_decision_has_spoused + } + } + trigger_else_if = { + limit = { + exists = scope:laamp_hooded_figure + NOT = { exists = scope:laamp_spouse_material } + } + #We've recruited the Hood already + AND = { + exists = scope:laamp_hooded_figure + exists = scope:laamp_decision_recruited_hood + } + } + trigger_else = { always = no } + #This isn't already the state + scope:1030_fourth_character != root + } + #Overwrite with ROOT to hide that portrait + save_scope_as = 1030_fourth_character + } + if = { + limit = { + #We've recruited the Hood already + AND = { + exists = scope:laamp_hooded_figure + exists = scope:laamp_decision_recruited_hood + } + #This isn't already the state + exists = scope:1030_fifth_character + scope:1030_fifth_character != root + } + #Overwrite with ROOT to hide that portrait + save_scope_as = 1030_fifth_character + } + #Can we _not_ repeat the loc? + 1025_set_and_check_hub_loc_tracker_scope_effect = { HUB = tavern } + #Some animation flavor + random_list = { + 75 = { + trigger = { + exists = scope:visiting_partner + trigger_if = { + limit = { exists = scope:laamp_hooded_figure } + exists = scope:been_to_hood + } + } + set_variable = 1030_use_partner_animation_var + } + 25 = { + #Nothing + } + } + #Create the spouse character + if = { + limit = { + OR = { + #Do we remember someone? + any_pool_character = { + province = scope:visiting_location + location = scope:visiting_location + root = { + is_target_in_variable_list = { + name = 1025_remembered_spouse_potential_list + target = prev #The considered spouse character + } + } + } + #Or did we actually encounter them? + any_pool_character = { + province = scope:visiting_location + location = scope:visiting_location + is_target_in_variable_list = { + name = 1030_marked_as_spouse_material_for_list + target = root + } + } + } + } + random_pool_character = { + province = scope:visiting_location + limit = { + OR = { + root = { + is_target_in_variable_list = { + name = 1025_remembered_spouse_potential_list + target = prev #The considered spouse character + } + } + is_target_in_variable_list = { + name = 1030_marked_as_spouse_material_for_list + target = root + } + } + } + save_scope_as = laamp_spouse_material + #Some more loc flavor shenanigans for these saved scopes + if = { + #Only save them if we actually interacted with them + limit = { + root = { + is_target_in_variable_list = { + name = 1025_remembered_spouse_potential_list + target = prev #The considered spouse character + } + } + } + save_scope_as = laamp_recurring_spouse + } + } + } + #No? Then roll for a new spouse + if = { + limit = { + NOR = { + exists = scope:laamp_spouse_material + #Unless you're on local cooldown + scope:visiting_location = { + is_target_in_variable_list = { + name = laamp_decisions_1000_checked_for_spouse_list + target = root + } + } + } + allowed_more_spouses = yes + } + random_list = { + 75 = { + #Maybe? + modifier = { + OR = { + has_trait = seducer + has_trait = rakish + } + add = -25 + } + #No spouse + } + 25 = { #Nerf this number into the ground to keep our LAAMP friends spouseless forever + #Find a spouse in the pool + if = { + limit = { + NOT = { exists = scope:laamp_spouse_material } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + #We can marry them + can_marry_character_trigger = { CHARACTER = root } + #We want to marry them + root = { is_attracted_to_gender_of = prev } #Prev is the spouse scope + #They might want to marry us + is_attracted_to_gender_of = root + } + save_scope_as = laamp_spouse_material + } + } + #Otherwise create 'em + if = { + limit = { + NOT = { exists = scope:laamp_spouse_material } + } + #Gender doesn't matter + if = { + limit = { allowed_to_marry_same_sex_trigger = yes } + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + diplomacy = { low_skill_rating high_skill_rating } + martial = { low_skill_rating high_skill_rating } + stewardship = { low_skill_rating high_skill_rating } + intrigue = { low_skill_rating high_skill_rating } + learning = { low_skill_rating high_skill_rating } + save_scope_as = laamp_spouse_material + } + } + #Straight female + else_if = { + limit = { is_female = yes } + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + gender = male + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + diplomacy = { low_skill_rating high_skill_rating } + martial = { low_skill_rating high_skill_rating } + stewardship = { low_skill_rating high_skill_rating } + intrigue = { low_skill_rating high_skill_rating } + learning = { low_skill_rating high_skill_rating } + save_scope_as = laamp_spouse_material + } + } + #Straight male + else = { + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + gender = female + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + diplomacy = { low_skill_rating high_skill_rating } + martial = { low_skill_rating high_skill_rating } + stewardship = { low_skill_rating high_skill_rating } + intrigue = { low_skill_rating high_skill_rating } + learning = { low_skill_rating high_skill_rating } + save_scope_as = laamp_spouse_material + } + } + } + #Some buffs pls? + scope:laamp_spouse_material ?= { + if = { + limit = { + NOT = { has_variable = 1030_has_rolled_for_congenital_traits } + NOR = { + has_trait = beauty_good_1 + has_trait = intellect_good_1 + has_trait = physique_good_1 + has_trait = fecund + has_trait = strong + has_trait = shrewd + } + } + hidden_effect = { + random = { + chance = 5 + random_list = { + 10 = { add_trait = beauty_good_1 } + 10 = { add_trait = intellect_good_1 } + 10 = { add_trait = physique_good_1 } + 10 = { add_trait = fecund } + 10 = { add_trait = strong } + 10 = { add_trait = shrewd } + } + } + } + } + #Give 'em a year + add_to_variable_list = { + name = 1030_marked_as_spouse_material_for_list + target = root + days = visit_settlement_minimum_cooldown_days + } + #... no more congenital traits rolls for them + set_variable = 1030_has_rolled_for_congenital_traits + #Funny as it looks when the tooltip wanders through all possible options, this is probs what looks more WAD + if = { + limit = { + NOT = { has_variable = raunchy_compliment_noun } + } + set_raunchy_compliment_noun_effect = yes + } + } + } + } + #Set up the cooldown per holding, so that you can hop around to different taverns + scope:visiting_location = { + add_to_variable_list = { + name = laamp_decisions_1000_checked_for_spouse_list + target = root + days = visit_settlement_minimum_cooldown_days + } + } + } + #Rare: Spawn a hooded figure + if = { + limit = { + NOT = { has_variable = laamp_decision_1000_checked_for_hood } + } + random_list = { + 75 = { + #No Hooded Figure + } + #Shady Noble + 25 = { + #Look for the holder first + if = { + limit = { + scope:visiting_location.county.holder ?= { + 1030_appropriate_noble_trigger = yes + location = scope:visiting_location + } + } + scope:visiting_location.county.holder = { + save_scope_as = laamp_hooded_figure + save_scope_as = laamp_disguised_noble + } + } + #Otherwise a landed or ladmin in the same location + if = { + limit = { + NOT = { exists = scope:laamp_hooded_figure } + } + scope:visiting_location = { + random_character_in_location = { + limit = { + 1030_appropriate_noble_trigger = yes + is_landed_or_landless_administrative = yes + } + save_scope_as = laamp_hooded_figure + save_scope_as = laamp_disguised_noble + } + #... or a landed/ladmin in a neighboring province. Does this tank performance? + if = { + limit = { + NOT = { exists = scope:laamp_hooded_figure } + } + random_neighboring_province = { + limit = { is_sea_province = no } + random_character_in_location = { + limit = { + 1030_appropriate_noble_trigger = yes + is_landed_or_landless_administrative = yes + } + save_scope_as = laamp_hooded_figure + save_scope_as = laamp_disguised_noble + } + } + } + } + } + scope:laamp_hooded_figure ?= { + #Don't need to pull the same ruler several times + set_variable = { + name = 1030_has_been_hooded_recently + days = visit_settlement_cooldown_days + } + } + } + #Master Thief + 25 = { + #More common in Tribal/No Settlement + modifier = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + factor = 2 + } + #Has this person been our thief in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_thief_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_hooded_figure + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_thief + } + #Otherwise find a thief in the pool + if = { + limit = { + NOT = { exists = scope:laamp_hooded_figure } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + is_available_healthy_adult = yes + 1030_gallowsbait_character_trigger = yes + } + save_scope_as = laamp_hooded_figure + } + } + #Otherwise create a thief + if = { + limit = { + NOT = { exists = scope:laamp_hooded_figure } + } + #Create bodyguard to stuff in pool + create_character = { + template = bp1_yearly_2021_intrigue_person_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + intrigue = { decent_skill_rating high_skill_rating } + save_scope_as = laamp_hooded_figure + } + scope:laamp_hooded_figure ?= { + #Chance to add a malus trait to this spectatular being + if = { + limit = { + NOR = { + has_trait = possessed_1 + has_trait = lunatic_1 + has_trait = depressed_1 + has_trait = drunkard + has_trait = hashishiyah + has_trait = irritable + } + } + hidden_effect = { + random = { + chance = 20 + random_list = { + 10 = { add_trait = possessed_1 } + 10 = { add_trait = lunatic_1 } + 10 = { add_trait = depressed_1 } + 10 = { add_trait = drunkard } + 10 = { add_trait = hashishiyah } + 10 = { add_trait = irritable } + } + } + } + } + #... also, it's a criminal, so... yeah + hidden_effect = { + if = { + limit = { + NOT = { has_trait = gallowsbait } + } + add_trait = gallowsbait + random_list = { + #Bandit + 25 = { + add_trait_xp = { + trait = gallowsbait + track = bandit + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + #Trickster + 25 = { + add_trait_xp = { + trait = gallowsbait + track = trickster + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + #Thief + 25 = { + add_trait_xp = { + trait = gallowsbait + track = thief + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + #Poacher + 25 = { + add_trait_xp = { + trait = gallowsbait + track = poacher + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + #Marauder + 25 = { + add_trait_xp = { + trait = gallowsbait + track = marauder + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + } + } + } + } + } + } + } + #For the portrait + scope:laamp_hooded_figure ?= { save_scope_as = 1030_second_character } + #No decision-scumming + set_variable = { + name = laamp_decision_1000_checked_for_hood + days = visit_settlement_cooldown_days + } + } + #Set up the initial portraits + if = { + limit = { + NOT = { exists = scope:1030_portraits_setup } + } + if = { + limit = { + exists = scope:laamp_spouse_material + exists = scope:laamp_hooded_figure + } + #Spouse, Hood and Partner exists + if = { + limit = { exists = scope:visiting_partner } + scope:visiting_partner = { save_scope_as = 1030_first_character } + } + scope:laamp_spouse_material = { save_scope_as = 1030_second_character } + scope:laamp_hooded_figure = { save_scope_as = 1030_third_character } + } + else_if = { + limit = { exists = scope:laamp_spouse_material } + #Spouse and Partner exists + if = { + limit = { exists = scope:visiting_partner } + scope:visiting_partner = { save_scope_as = 1030_first_character } + } + #Save ROOT + save_scope_as = 1030_second_character + scope:laamp_spouse_material = { save_scope_as = 1030_third_character } + } + else_if = { + limit = { exists = scope:laamp_hooded_figure } + #Hood and Partner exists + if = { + limit = { exists = scope:visiting_partner } + scope:visiting_partner = { save_scope_as = 1030_first_character } + } + #Save ROOT + save_scope_as = 1030_second_character + scope:laamp_hooded_figure = { save_scope_as = 1030_third_character } + } + else_if = { + limit = { exists = scope:visiting_partner } + #Only Partner exists + scope:visiting_partner = { save_scope_as = 1030_first_character } + #Save ROOT + save_scope_as = 1030_second_character + } + else = { + #You're alone - save ROOT + save_scope_as = 1030_second_character + } + save_scope_as = 1030_portraits_setup + } + } + #Listen to a story + option = { + name = { + text = { + first_valid = { + #Return to the storyteller + triggered_desc = { + trigger = { exists = scope:been_to_storyteller } + desc = ep3_laamp_decision_event.1030.a_second + } + #First time at the storyteller's + desc = ep3_laamp_decision_event.1030.a + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1030.a.cooldown.tt + NOT = { exists = scope:laamp_decision_has_storied } + } + } + show_as_unavailable = { always = yes } + reason = storyteller + custom_tooltip = ep3_laamp_decision_event.1030.a.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = tavern } + #Go to the storyteller + trigger_event = ep3_laamp_decision_event.1031 + ai_chance = { base = 100 } + } + #Look for someone to recruit + option = { + name = { + text = { + first_valid = { + #Return to the recruits + triggered_desc = { + trigger = { exists = scope:been_to_recruit } + desc = ep3_laamp_decision_event.1030.b_second + } + #First time talking to recruits + desc = ep3_laamp_decision_event.1030.b + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1030.b.cooldown.tt + NOT = { exists = scope:laamp_decision_has_recruited } + } + } + show_as_unavailable = { always = yes } + reason = recruitment + custom_tooltip = ep3_laamp_decision_event.1030.b.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = tavern } + #Go to the recruits + trigger_event = ep3_laamp_decision_event.1033 + ai_chance = { base = 100 } + } + #Check out that Spouse Material + option = { + name = { + text = { + first_valid = { + #Already scoped out the spouse + triggered_desc = { + trigger = { + OR = { + exists = scope:been_to_spouse + exists = scope:laamp_recurring_spouse + } + } + desc = ep3_laamp_decision_event.1030.c_second + } + #First time talking to spouse + desc = ep3_laamp_decision_event.1030.c + } + } + } + trigger = { + exists = scope:laamp_spouse_material + #Recently recruited a spouse, settle down there + trigger_if = { + limit = { has_variable = 1035_has_spoused_recently } + custom_tooltip = { + text = ep3_laamp_decision_event.1030.c.cooldown.tt + always = no + } + } + #Loc differences + trigger_else_if = { + limit = { scope:laamp_decision_has_spoused ?= flag:no } + custom_tooltip = { + text = ep3_laamp_decision_event.1030.c.failure.cooldown.tt + always = no + } + } + trigger_else = { always = yes } + } + show_as_unavailable = { + #Show it if we return here from the Spouse screen + trigger_if = { + limit = { exists = scope:laamp_spouse_material } + always = yes + } + #If we are already married, don't show it + trigger_else = { always = no } + } + reason = potential_spouse + highlight_portrait = scope:laamp_spouse_material + #Been there once already + if = { + limit = { + OR = { + exists = scope:laamp_recurring_spouse + exists = scope:been_to_spouse + } + } + custom_tooltip = ep3_laamp_decision_event.1030.c.tt_second + } + else = { + custom_tooltip = ep3_laamp_decision_event.1030.c.tt + } + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = tavern } + #Go to the spouse material + trigger_event = ep3_laamp_decision_event.1035 + ai_chance = { base = 100 } + } + #Rare Option: Visit Hooded Figure + option = { + name = { + text = { + first_valid = { + #Return to the Hood noble + triggered_desc = { + trigger = { + exists = scope:been_to_hood + exists = scope:laamp_disguised_noble + } + desc = ep3_laamp_decision_event.1030.d_third + } + #Return to the Hood thief + triggered_desc = { + trigger = { exists = scope:been_to_hood } + desc = ep3_laamp_decision_event.1030.d_second + } + #First time at the Hood + desc = ep3_laamp_decision_event.1030.d + } + } + } + trigger = { + exists = scope:laamp_hooded_figure + NOT = { exists = scope:laamp_decision_recruited_hood } + is_ai = no + } + reason = hooded_character + #Been there once already + if = { + limit = { exists = scope:been_to_hood } + custom_tooltip = ep3_laamp_decision_event.1030.d.tt_second + } + else = { + custom_tooltip = ep3_laamp_decision_event.1030.d.tt + } + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = tavern } + #Go to the hooded figure screen + trigger_event = ep3_laamp_decision_event.1037 + } + #I want to do something else + option = { + name = { + text = { + first_valid = { + #Nothing left to do + triggered_desc = { + trigger = { 1030_done_with_tavern_trigger = yes } + desc = ep3_laamp_decision_event.1030.e_second + } + #Back to main square + desc = ep3_laamp_decision_event.1030.e + } + } + } + #Have we done everything? Are we closing off the option? + if = { + limit = { 1030_done_with_tavern_trigger = yes } + #Clean up unnecessary variables and close off the option + 1030_finished_tavern_effect = yes + } + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = tavern } + #Go back to the main event + 1000_return_to_main_effect = yes + ai_chance = { base = 100 } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:tavern } + remove_variable ?= 1030_use_partner_animation_var + } +} + + +#Return to the holding hub (church grounds, castle grounds etc) from a subsequent event +scripted_effect 1031_been_to_effect = { + #For desc flavor + if = { + limit = { + NOT = { exists = scope:been_to_$GUILD$ } + } + save_scope_as = been_to_$GUILD$ + } + #Go back to the previous screen + if = { + limit = { var:return_from_location ?= flag:tavern } + 1031_return_to_tavern_effect = yes + } + #Go back to church grounds + if = { + limit = { var:return_from_location ?= flag:church_grounds } + 1041_return_to_church_grounds_effect = yes + } + #Go back to castle grounds + if = { + limit = { var:return_from_location ?= flag:castle_grounds } + 1051_return_to_castle_effect = yes + } + #Go back to craftsmen district + if = { + limit = { var:return_from_location ?= flag:craftsmen } + 1061_return_to_craftsmen_effect = yes + } +} + +#We return to the tavern main room to peruse other options +scripted_effect 1031_return_to_tavern_effect = { + custom_tooltip = ep3_laamp_decision_event.1031.return.tt + trigger_event = ep3_laamp_decision_event.1030 +} + +#Set the correct variable to block off the Storyteller option and remove the desc flavor variable +scripted_effect 1031_storied_effect = { + save_scope_as = laamp_decision_has_storied + #Go back to the tavern main room + hidden_effect = { 1031_return_to_tavern_effect = yes } +} + +#The one that ya want +scripted_effect 1031_actual_skill_increase_effect = { + if = { + limit = { scope:1031_skill_to_buff = flag:diplomacy } + add_diplomacy_skill = 1 + } + if = { + limit = { scope:1031_skill_to_buff = flag:martial } + add_martial_skill = 1 + } + if = { + limit = { scope:1031_skill_to_buff = flag:stewardship } + add_stewardship_skill = 1 + } + if = { + limit = { scope:1031_skill_to_buff = flag:intrigue } + add_intrigue_skill = 1 + } + if = { + limit = { scope:1031_skill_to_buff = flag:learning } + add_learning_skill = 1 + } +} + +#Participation prize +scripted_effect 1031_add_skill_modifier_effect = { + if = { + limit = { scope:1031_skill_to_buff = flag:diplomacy } + add_character_modifier = { + modifier = laamp_decision_exotic_story_diplomacy_gain_modifier + days = visit_settlement_minimum_cooldown_days + } + } + if = { + limit = { scope:1031_skill_to_buff = flag:martial } + add_character_modifier = { + modifier = laamp_decision_exotic_story_martial_gain_modifier + days = visit_settlement_minimum_cooldown_days + } + } + if = { + limit = { scope:1031_skill_to_buff = flag:stewardship } + add_character_modifier = { + modifier = laamp_decision_exotic_story_stewardship_gain_modifier + days = visit_settlement_minimum_cooldown_days + } + } + if = { + limit = { scope:1031_skill_to_buff = flag:intrigue } + add_character_modifier = { + modifier = laamp_decision_exotic_story_intrigue_gain_modifier + days = visit_settlement_minimum_cooldown_days + } + } + if = { + limit = { scope:1031_skill_to_buff = flag:learning } + add_character_modifier = { + modifier = laamp_decision_exotic_story_learning_gain_modifier + days = visit_settlement_minimum_cooldown_days + } + } +} + +#Modified by how low the skill is - lower means higher chance +scripted_effect 1031_boost_lowest_skill_effect = { + random_list = { + 2 = { + desc = ep3_laamp_decision_event.1031.a_success.desc + trigger = { + trigger_if = { + limit = { has_variable = 1031_skill_gain_variable } + var:1031_skill_gain_variable != visit_settlement_skill_gain_cap_value + } + trigger_else = { always = yes } + } + #Skill is less than low_skill_rating + modifier = { + scope:1031_skill_to_buff_value < low_skill_rating + add = 23 + } + #Skill is less than average_skill_rating + modifier = { + scope:1031_skill_to_buff_value >= low_skill_rating + scope:1031_skill_to_buff_value < average_skill_rating + add = 18 + } + #Skill is less than medium_skill_rating + modifier = { + scope:1031_skill_to_buff_value >= average_skill_rating + scope:1031_skill_to_buff_value < medium_skill_rating + add = 13 + } + #Skill is less than high_skill_rating + modifier = { + scope:1031_skill_to_buff_value >= medium_skill_rating + scope:1031_skill_to_buff_value < high_skill_rating + add = 8 + } + #Skill is less than very_high_skill_rating + modifier = { + scope:1031_skill_to_buff_value >= high_skill_rating + scope:1031_skill_to_buff_value < very_high_skill_rating + add = 3 + } + #What do you mean, only see one side of the argument? + modifier = { + has_trait = zealous + factor = 0.8 + } + #Easier time finding the silver lining. Probs. + modifier = { + has_trait = eccentric + factor = 2 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamp_decision_event.1031.a_success.t + desc = ep3_laamp_decision_event.1031.a_success.desc + left_icon = root + #Increase skill + 1031_actual_skill_increase_effect = yes + } + #We cap the max amount of skill points gained + if = { + limit = { + NOT = { has_variable = 1031_skill_gain_variable } + } + set_variable = { + name = 1031_skill_gain_variable + value = 1 + } + } + else_if = { + limit = { + has_variable = 1031_skill_gain_variable + var:1031_skill_gain_variable != visit_settlement_skill_gain_cap_value + } + change_variable = { + name = 1031_skill_gain_variable + add = 1 + } + } + else = { + #Nothing happens + } + } + 25 = { + desc = ep3_laamp_decision_event.1031.a_semi_success.desc + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_laamp_decision_event.1031.a_semi_success.t + desc = ep3_laamp_decision_event.1031.a_semi_success.desc + left_icon = root + #Have some lifestyle xp + if = { + limit = { scope:1031_skill_to_buff = flag:diplomacy } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { scope:1031_skill_to_buff = flag:martial } + add_martial_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { scope:1031_skill_to_buff = flag:stewardship } + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { scope:1031_skill_to_buff = flag:intrigue } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { scope:1031_skill_to_buff = flag:learning } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + } + } + 50 = { + desc = ep3_laamp_decision_event.1031.a_failure.desc + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_laamp_decision_event.1031.a_failure.t + desc = ep3_laamp_decision_event.1031.a_failure.desc + left_icon = root + #Apply temporary skill modifier + 1031_add_skill_modifier_effect = yes + } + } + } +} + +#Used often enough to warrant a trigger +scripted_trigger 1031_is_max_witty_trigger = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = wit + value = 100 + } +} + + +#Storyteller +ep3_laamp_decision_event.1031 = { + type = character_event + title = ep3_laamp_decision_event.1031.t + window = visit_settlement_window + desc = { + #Stay a while, and listen! + random_valid = { + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 1 + var:1031_saved_storyteller_state ?= 9 + } + } + desc = ep3_laamp_decision_event.1031.desc_01 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 2 + var:1031_saved_storyteller_state ?= 10 + } + } + desc = ep3_laamp_decision_event.1031.desc_02 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 3 + var:1031_saved_storyteller_state ?= 11 + } + } + desc = ep3_laamp_decision_event.1031.desc_03 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 4 + var:1031_saved_storyteller_state ?= 12 + } + } + desc = ep3_laamp_decision_event.1031.desc_04 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 5 + var:1031_saved_storyteller_state ?= 13 + } + } + desc = ep3_laamp_decision_event.1031.desc_05 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 6 + var:1031_saved_storyteller_state ?= 14 + } + } + desc = ep3_laamp_decision_event.1031.desc_06 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 7 + var:1031_saved_storyteller_state ?= 15 + } + } + desc = ep3_laamp_decision_event.1031.desc_07 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 8 + var:1031_saved_storyteller_state ?= 16 + } + } + desc = ep3_laamp_decision_event.1031.desc_08 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 9 + var:1031_saved_storyteller_state ?= 1 + } + } + desc = ep3_laamp_decision_event.1031.desc_09 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 10 + var:1031_saved_storyteller_state ?= 2 + } + } + desc = ep3_laamp_decision_event.1031.desc_10 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 11 + var:1031_saved_storyteller_state ?= 3 + } + } + desc = ep3_laamp_decision_event.1031.desc_11 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 12 + var:1031_saved_storyteller_state ?= 4 + } + } + desc = ep3_laamp_decision_event.1031.desc_12 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 13 + var:1031_saved_storyteller_state ?= 5 + } + } + desc = ep3_laamp_decision_event.1031.desc_13 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 14 + var:1031_saved_storyteller_state ?= 6 + } + } + desc = ep3_laamp_decision_event.1031.desc_14 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 15 + var:1031_saved_storyteller_state ?= 7 + } + } + desc = ep3_laamp_decision_event.1031.desc_15 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 16 + var:1031_saved_storyteller_state ?= 8 + } + } + desc = ep3_laamp_decision_event.1031.desc_16 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 17 + var:1031_saved_storyteller_state ?= 9 + } + } + desc = ep3_laamp_decision_event.1031.desc_17 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 18 + var:1031_saved_storyteller_state ?= 10 + } + } + desc = ep3_laamp_decision_event.1031.desc_18 + } + triggered_desc = { + trigger = { + OR = { + var:1031_saved_storyteller_state ?= 19 + var:1031_saved_storyteller_state ?= 11 + } + } + desc = ep3_laamp_decision_event.1031.desc_19 + } + } + desc = ep3_laamp_decision_event.1031.desc_outro + } + theme = landless_adventurer + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_learning" } + override_icon = { reference = "gfx/interface/icons/event_types/type_learning.dds" } + override_background = { + trigger = { + scope:visiting_location = { 1000_is_a_nomadic_holding_trigger = yes } + } + reference = bp1_bonfire + } + override_background = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + reference = bp1_kitchen_western + } + override_background = { reference = relaxing_room_location } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + triggered_animation = { + trigger = { has_trait = zealous } + animation = personality_cynical + } + animation = interested + } + center_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = eccentric } + animation = happiness + } + triggered_animation = { + trigger = { has_trait = zealous } + animation = dismissal + } + animation = thinking + } + right_portrait = { + character = scope:laamp_storyteller + camera = camera_event_scheme_far_right + animation = storyteller + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Can we _not_ repeat the loc? + if = { + limit = { has_variable = 1031_saved_storyteller_state } + #We're capped out? Reset. + if = { + limit = { var:1031_saved_storyteller_state = 19 } + remove_variable ?= 1031_saved_storyteller_state + set_variable = { + name = 1031_saved_storyteller_state + value = 1 + years = 10 + } + } + #No? Then just increment. + else = { + save_scope_value_as = { + name = 1031_storyteller_state_cache + value = var:1031_saved_storyteller_state + } + remove_variable ?= 1031_saved_storyteller_state + set_variable = { + name = 1031_saved_storyteller_state + value = { + value = scope:1031_storyteller_state_cache + add = 1 + } + years = 10 + } + } + } + #Otherwise set up the counter + else = { + set_variable = { + name = 1031_saved_storyteller_state + value = { + #Randomize where we start + integer_range = { + min = 1 + max = 16 + } + } + years = 10 + } + } + #Find our storyteller + if = { + #Do we already have a storyteller? + limit = { + NOT = { exists = scope:laamp_storyteller } + } + #Has this person been our storyteller in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + faith = scope:visiting_location.faith + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_storyteller_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_storyteller + } + #Otherwise find a storyteller in the pool + if = { + limit = { + NOT = { exists = scope:laamp_storyteller } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + has_trait = lifestyle_reveler + } + save_scope_as = laamp_storyteller + } + } + #Otherwise create a storyteller + if = { + limit = { + NOT = { exists = scope:laamp_storyteller } + } + #Create storyteller to stuff in pool + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + trait = lifestyle_reveler + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_storyteller + } + } + #Make 'em a Reveler + scope:laamp_storyteller ?= { + if = { + limit = { + NOT = { has_trait = lifestyle_reveler } + } + add_trait = lifestyle_reveler + add_trait_xp = { + trait = lifestyle_reveler + value = { + integer_range = { + min = small_lifestyle_random_xp_mid + max = small_lifestyle_random_xp_high + } + } + } + } + } + #Remember the storyteller + 1010_remember_vendor_character_effect = { GUILD = storyteller CHARACTER = scope:laamp_storyteller } + } + #What skill do we buff? + if = { + limit = { + NOT = { exists = scope:1031_skill_to_buff } + } + #Roll for which skill to boost + random_list = { + 1 = { + save_scope_value_as = { + name = 1031_skill_to_buff + value = flag:diplomacy + } + save_scope_value_as = { + name = 1031_skill_to_buff_value + value = diplomacy + } + } + 1 = { + save_scope_value_as = { + name = 1031_skill_to_buff + value = flag:martial + } + save_scope_value_as = { + name = 1031_skill_to_buff_value + value = martial + } + } + 1 = { + save_scope_value_as = { + name = 1031_skill_to_buff + value = flag:stewardship + } + save_scope_value_as = { + name = 1031_skill_to_buff_value + value = stewardship + } + } + 1 = { + save_scope_value_as = { + name = 1031_skill_to_buff + value = flag:intrigue + } + save_scope_value_as = { + name = 1031_skill_to_buff_value + value = intrigue + } + } + 1 = { + save_scope_value_as = { + name = 1031_skill_to_buff + value = flag:learning + } + save_scope_value_as = { + name = 1031_skill_to_buff_value + value = learning + } + } + } + } + #Save the xp trait as a static number + if = { + limit = { + NOR = { + #We're not already maxed in Wit + 1031_is_max_witty_trigger = yes + exists = scope:storyteller_xp + } + } + save_scope_value_as = { + name = storyteller_xp + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_mid + } + } + } + } + } + #Contemplate the story + option = { + name = { + text = { + first_valid = { + #Eccentric appreciates this + triggered_desc = { + trigger = { has_trait = eccentric } + desc = ep3_laamp_decision_event.1031.a_eccentric + } + #Zealous does not appreciate this + triggered_desc = { + trigger = { has_trait = zealous } + desc = ep3_laamp_decision_event.1031.a_zealous + } + #'s alright I guess + desc = ep3_laamp_decision_event.1031.a + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1031.a.cooldown.tt + NOT = { has_variable = 1031_has_storied_recently } + } + } + show_as_unavailable = { always = yes } + #Set the cooldown on the action + set_variable = { + name = 1031_has_storied_recently + days = visit_settlement_minimum_cooldown_days + } + #Chance to boost your lowest skill + 1031_boost_lowest_skill_effect = yes + if = { + limit = { + has_trait = zealous + NOT = { has_trait = eccentric } + } + stress_impact = { zealous = miniscule_stress_impact_gain } + } + #Set the variables and redirect us back to the tavern main room + 1031_storied_effect = yes + ai_chance = { + base = 100 + modifier = { + has_variable = 1031_skill_gain_variable + var:1031_skill_gain_variable < visit_settlement_skill_gain_cap_value + add = 400 #Just do it + } + } + } + #Learn revelry or strong-arm the skill gain + option = { + name = { + text = { + first_valid = { + #I know this one! + triggered_desc = { + trigger = { 1031_is_max_witty_trigger = yes } + desc = ep3_laamp_decision_event.1031.b_reveler + } + #Yeeh narration! + desc = ep3_laamp_decision_event.1031.b + } + } + } + trigger = { + #Put a cooldown on strongarming it + trigger_if = { + limit = { 1031_is_max_witty_trigger = yes } + custom_tooltip = { + text = ep3_laamp_decision_event.1031.b.cooldown.tt + NOT = { has_variable = 1031_has_reveled_recently } + } + } + #If we're zealous, we also need to be eccentric + trigger_if = { + limit = { has_trait = zealous } + has_trait = eccentric + } + #Trigger for everyone else + trigger_else = { + always = yes + } + } + show_as_unavailable = { + #Hide if what you're missing is a trait + trigger_if = { + limit = { + has_trait = zealous + NOT = { has_trait = eccentric } + } + always = no + } + trigger_else = { always = yes } + } + #Strongarm it + if = { + limit = { 1031_is_max_witty_trigger = yes } + 1031_actual_skill_increase_effect = yes + #Set the cooldown on the action + set_variable = { + name = 1031_has_reveled_recently + months = visit_settlement_small_cooldown_days + } + stress_impact = { + base = medium_stress_impact_gain + ambitious = minor_stress_impact_loss + } + } + #Otherwise learn something + else = { + #Pay up + pay_short_term_gold = { + target = scope:laamp_storyteller + gold = minor_gold_laamps_value + } + #Gain trait + if = { + limit = { + NOT = { has_trait = tourney_participant } + } + add_trait = tourney_participant + add_trait_xp = { + trait = tourney_participant + track = wit + value = scope:storyteller_xp + } + } + #Or be educated + else = { + add_trait_xp = { + trait = tourney_participant + track = wit + value = scope:storyteller_xp + } + } + } + #Set the variables and redirect us back to the tavern main room + 1031_storied_effect = yes + ai_chance = { + base = 100 + modifier = { + 1031_is_max_witty_trigger = no + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + 1031_is_max_witty_trigger = yes + stress_level > 1 + factor = 0 + } + } + } + #Stress relief + option = { + name = { + text = { + first_valid = { + #Blasphemy! + triggered_desc = { + trigger = { has_trait = zealous } + desc = ep3_laamp_decision_event.1031.c_zealous + } + #_I_ was entertained + desc = ep3_laamp_decision_event.1031.c + } + } + } + trigger = { + #Put a cooldown on relaxation + custom_tooltip = { + text = ep3_laamp_decision_event.1031.c.cooldown.tt + NOT = { has_variable = 1031_has_relaxed_recently } + } + } + show_as_unavailable = { always = yes } + #Heathens! + if = { + limit = { has_trait = zealous } + add_piety = minor_piety_gain + } + #Took my mind off of things + stress_impact = { + base = miniscule_stress_impact_loss + zealous = minor_stress_impact_loss + } + #Set the cooldown on the action + set_variable = { + name = 1031_has_relaxed_recently + months = visit_settlement_minimum_cooldown_days + } + #Set the variables and redirect us back to the tavern main room + 1031_storied_effect = yes + ai_chance = { + base = 200 #Just do it + } + } + #I want to go back + option = { + name = ep3_laamp_decision_event.1031.d + #If you can't do anything, go in here, see the cooldown dates, go out and then we grey out the option + if = { + limit = { + has_variable = 1031_has_storied_recently + has_variable = 1031_has_reveled_recently + has_variable = 1031_has_relaxed_recently + } + #Set the variables and redirect us back to the tavern main room + 1031_storied_effect = yes + } + else = { + #Set the variables and redirect us back to the tavern main room + 1031_been_to_effect = { GUILD = storyteller } + } + ai_chance = { base = 100 } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:storyteller } + } +} + + +#Set the correct variable to block off the Recruitment option and remove the desc flavor variable +scripted_effect 1033_recruited_effect = { + save_scope_as = laamp_decision_has_recruited + #Go back to the tavern main room + hidden_effect = { 1031_return_to_tavern_effect = yes } +} + +#Tombola! +scripted_effect 1033_generate_character_effect = { + random_list = { + #Generic + 60 = { + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + diplomacy = { decent_skill_rating high_skill_rating } + save_scope_as = 1033_new_character + } + } + #Diplomacy + 10 = { + #Some variation + modifier = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + factor = 2 + } + create_character = { + template = bp1_yearly_2021_diplomacy_person_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + diplomacy = { decent_skill_rating high_skill_rating } + save_scope_as = 1033_new_character + } + } + #Martial + 10 = { + modifier = { + scope:visiting_location = { has_holding_type = castle_holding } + factor = 2 + } + create_character = { + template = bp1_yearly_2021_martial_person_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + martial = { decent_skill_rating high_skill_rating } + save_scope_as = 1033_new_character + } + } + #Stewardship + 10 = { + modifier = { + scope:visiting_location = { has_holding_type = city_holding } + factor = 2 + } + create_character = { + template = bp1_yearly_2021_stewardship_person_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + stewardship = { decent_skill_rating high_skill_rating } + save_scope_as = 1033_new_character + } + } + #Intrigue + 10 = { + modifier = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + factor = 2 + } + create_character = { + template = bp1_yearly_2021_intrigue_person_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + intrigue = { decent_skill_rating high_skill_rating } + save_scope_as = 1033_new_character + } + } + #Learning + 10 = { + modifier = { + scope:visiting_location = { + OR = { + has_holding_type = church_holding + has_holding_type = temple_citadel_holding + } + } + factor = 2 + } + create_character = { + template = bp1_yearly_2021_learning_person_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + learning = { decent_skill_rating high_skill_rating } + save_scope_as = 1033_new_character + } + } + #... witch + 5 = { + modifier = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + factor = 2 + } + create_character = { + template = bp1_yearly_2021_learning_witch_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + learning = { decent_skill_rating high_skill_rating } + save_scope_as = 1033_new_character + } + } + } + scope:1033_new_character ?= { + #Chance to add a malus trait to this spectatular being + if = { + limit = { + NOR = { + has_trait = possessed_1 + has_trait = lunatic_1 + has_trait = depressed_1 + has_trait = drunkard + has_trait = hashishiyah + has_trait = irritable + } + } + hidden_effect = { + random = { + chance = 20 + random_list = { + 10 = { add_trait = possessed_1 } + 10 = { add_trait = lunatic_1 } + 10 = { add_trait = depressed_1 } + 10 = { add_trait = drunkard } + 10 = { add_trait = hashishiyah } + 10 = { add_trait = irritable } + } + } + } + } + } + if = { + limit = { scope:laamp_first_recruit ?= $SCOPE$ } + scope:1033_new_character = { save_scope_as = laamp_first_recruit } + } + if = { + limit = { scope:laamp_second_recruit ?= $SCOPE$ } + scope:1033_new_character = { save_scope_as = laamp_second_recruit } + } + if = { + limit = { scope:laamp_third_recruit ?= $SCOPE$ } + scope:1033_new_character = { save_scope_as = laamp_third_recruit } + } +} + +#Used enough to warrant an effect +scripted_effect 1033_add_courtier_with_opinion_effect = { + if = { + limit = { + has_perk = professional_workforce_perk + } + $TARGET$ = { + if = { + limit = { + highest_skill_including_prowess = prowess + } + add_prowess_skill = 5 + } + else_if = { + limit = { + highest_skill = intrigue + } + add_intrigue_skill = 5 + } + else_if = { + limit = { + highest_skill = martial + } + add_martial_skill = 5 + } + else_if = { + limit = { + highest_skill = stewardship + } + add_stewardship_skill = 5 + } + else_if = { + limit = { + highest_skill = diplomacy + } + add_diplomacy_skill = 5 + } + else_if = { + limit = { + highest_skill = learning + } + add_learning_skill = 5 + } + hidden_effect = { + force_character_skill_recalculation = yes + } + } + } + add_courtier = $TARGET$ + hidden_effect = { + $TARGET$ = { + add_opinion = { + modifier = recruited_me_opinion + target = root + opinion = 50 + } + } + } +} + +scripted_effect 1033_set_cost_effect = { + save_scope_value_as = { + name = $VALUE_NAME$_sum_skills + value = { + add = $CHARACTER$.diplomacy + add = $CHARACTER$.martial + add = $CHARACTER$.stewardship + add = $CHARACTER$.intrigue + add = $CHARACTER$.learning + add = $CHARACTER$.prowess + } + } + save_scope_value_as = { + name = $VALUE_NAME$ + value = { + integer_range = { + min = medium_gold_laamps_value + max = major_gold_laamps_value + } + #Cheaper out in the wilds + if = { + limit = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + multiply = 0.6 + } + if = { #They're stellar? More expensive. :elmofire: + limit = { scope:$VALUE_NAME$_sum_skills >= 120 } #Good in all skills? + multiply = 8 #20 in all skills + } + else_if = { + limit = { scope:$VALUE_NAME$_sum_skills >= 100 } #Good in four skills? + multiply = 5 + } + else_if = { + limit = { scope:$VALUE_NAME$_sum_skills >= 80 } #Good in three skills? + multiply = 4 + } + else_if = { + limit = { scope:$VALUE_NAME$_sum_skills >= 60 } #Good in two skills? + multiply = 3 + } + else_if = { + limit = { scope:$VALUE_NAME$_sum_skills >= 40 } #Good in one-and-a-half skill? Should be roughly 90-110 gold + multiply = 2.5 + } + else_if = { + limit = { scope:$VALUE_NAME$_sum_skills >= 20 } #Good in one skill? + multiply = 1.5 + } + #Add perk discounts and other things here. + } + } +} + +#This is a remotely interesting character +scripted_trigger 1033_has_interesting_skillset_trigger = { + OR = { + diplomacy > high_skill_rating + martial > high_skill_rating + stewardship > high_skill_rating + intrigue > high_skill_rating + learning > high_skill_rating + prowess > high_skill_rating + } +} + + +#Recruitment +ep3_laamp_decision_event.1033 = { + type = character_event + title = ep3_laamp_decision_event.1033.t + window = visit_settlement_window + desc = { + #What's going down in the recruitment corner + first_valid = { + #We've returned to this scene, now what + #RETURN: We have three recruits + random_valid = { + triggered_desc = { + trigger = { + NOT = { exists = scope:laamp_generic_jane } + exists = scope:been_to_recruit + scope:recruit_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1033.desc_returned_01 + } + triggered_desc = { + trigger = { + NOT = { exists = scope:laamp_generic_jane } + scope:recruit_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1033.desc_returned_02 + } + } + #RETURN: We have two recruits, and Jane + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_recruit + scope:recruit_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1033.desc_returned_jane_01 + } + triggered_desc = { + trigger = { scope:recruit_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1033.desc_returned_jane_02 + } + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_recruit } + } + desc = ep3_laamp_decision_event.1033.desc + } + } + #Do we have two or three potential recruits? + first_valid = { + triggered_desc = { + trigger = { + exists = scope:laamp_generic_jane + NOT = { exists = scope:been_to_recruit } + } + desc = ep3_laamp_decision_event.1033.desc_mid_two + } + triggered_desc = { + trigger = { + NOT = { + exists = scope:been_to_recruit + exists = scope:laamp_generic_jane + } + } + desc = ep3_laamp_decision_event.1033.desc_mid_three + } + } + #OUTRO: + first_valid = { + #We have a Visiting Partner + triggered_desc = { + trigger = { + exists = scope:visiting_partner + NOT = { exists = scope:laamp_generic_jane } + } + desc = ep3_laamp_decision_event.1033.desc_partner_outro + } + #We have a Generic Jane + triggered_desc = { + trigger = { + exists = scope:laamp_generic_jane + NOT = { exists = scope:been_to_recruit } + } + desc = ep3_laamp_decision_event.1033.desc_jane_outro + } + triggered_desc = { + trigger = { exists = scope:laamp_generic_jane } + desc = ep3_laamp_decision_event.1033.desc_returned_jane_outro + } + #We have no Visiting Partner or Generic Jane + desc = ep3_laamp_decision_event.1033.desc_outro + } + } + theme = landless_adventurer + override_icon = { reference = "gfx/interface/icons/event_types/type_duty.dds" } + override_background = { reference = feast } + #Our recruits + left_portrait = { + trigger = { exists = scope:1033_first_character } + character = scope:1033_first_character + triggered_animation = { + trigger = { + scope:recruit_loc_tracker ?= 1 + NOT = { scope:1033_first_character ?= scope:visiting_partner } + } + animation = flirtation + } + #Friendly + triggered_animation = { + trigger = { + scope:1033_first_character = { 1010_has_friendly_traits = yes } + } + animation = admiration + } + #Business-minded + triggered_animation = { + trigger = { + scope:1033_first_character = { 1010_has_commerce_traits = yes } + } + animation = schadenfreude + } + #Uninterested + triggered_animation = { + trigger = { + scope:1033_first_character = { 1010_has_uninterested_traits = yes } + } + animation = personality_cynical + } + #Irrational + triggered_animation = { + trigger = { + scope:1033_first_character = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + #A bit awkward + triggered_animation = { + trigger = { + scope:1033_first_character = { 1010_has_standoffish_traits = yes } + } + animation = shame + } + animation = interested + } + center_portrait = { + character = scope:1033_second_character + triggered_animation = { + trigger = { + scope:recruit_loc_tracker ?= 1 + scope:1033_second_character != root + } + animation = worry + } + #Friendly + triggered_animation = { + trigger = { + scope:1033_second_character = { 1010_has_friendly_traits = yes } + } + animation = personality_compassionate + } + #Business-minded + triggered_animation = { + trigger = { + scope:1033_second_character = { 1010_has_commerce_traits = yes } + } + animation = personality_dishonorable + } + #Uninterested + triggered_animation = { + trigger = { + scope:1033_second_character = { 1010_has_uninterested_traits = yes } + } + animation = personality_callous + } + #Irrational + triggered_animation = { + trigger = { + scope:1033_second_character = { 1010_has_irrational_traits = yes } + } + animation = laugh + } + #A bit awkward + triggered_animation = { + trigger = { + scope:1033_second_character = { 1010_has_standoffish_traits = yes } + } + animation = disbelief + } + animation = hero_flex + } + right_portrait = { + trigger = { exists = scope:1033_third_character } + character = scope:1033_third_character + camera = camera_event_scheme_center_forward + triggered_animation = { + trigger = { exists = scope:laamp_generic_jane } + animation = personality_zealous + } + triggered_animation = { + trigger = { + scope:recruit_loc_tracker ?= 1 + NOT = { exists = scope:laamp_generic_jane } + } + animation = disapproval + } + #Friendly + triggered_animation = { + trigger = { + scope:1033_third_character = { 1010_has_friendly_traits = yes } + } + animation = personality_forgiving + } + #Business-minded + triggered_animation = { + trigger = { + scope:1033_third_character = { 1010_has_commerce_traits = yes } + } + animation = personality_greedy + } + #Uninterested + triggered_animation = { + trigger = { + scope:1033_third_character = { 1010_has_uninterested_traits = yes } + } + animation = disapproval + } + #Irrational + triggered_animation = { + trigger = { + scope:1033_third_character = { 1010_has_irrational_traits = yes } + } + animation = eccentric + } + #A bit awkward + triggered_animation = { + trigger = { + scope:1033_third_character = { 1010_has_standoffish_traits = yes } + } + animation = personality_coward + } + animation = scheme + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #For the background + scope:visiting_location.county.holder = { save_scope_as = bg_override_char } + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = recruit } + #Create the characters + if = { + limit = { + NOT = { exists = scope:laamp_first_recruit } + } + #First character + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + #Remotely interesting + 1033_has_interesting_skillset_trigger = yes + } + save_scope_as = laamp_first_recruit + } + #Otherwise create 'em + if = { + limit = { + NOT = { exists = scope:laamp_first_recruit } + } + #Create first recruit to stuff in pool + save_scope_as = laamp_first_recruit + 1033_generate_character_effect = { SCOPE = scope:laamp_first_recruit } + } + #Set their cost + 1033_set_cost_effect = { CHARACTER = scope:laamp_first_recruit VALUE_NAME = first_recruit_cost } + #Second character + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + #Remotely interesting + 1033_has_interesting_skillset_trigger = yes + this != scope:laamp_first_recruit + } + save_scope_as = laamp_second_recruit + } + #Otherwise create 'em + if = { + limit = { + NOT = { exists = scope:laamp_second_recruit } + } + #Create second recruit to stuff in pool + save_scope_as = laamp_second_recruit + 1033_generate_character_effect = { SCOPE = scope:laamp_second_recruit } + } + #Set their cost + 1033_set_cost_effect = { CHARACTER = scope:laamp_second_recruit VALUE_NAME = second_recruit_cost } + #You have no one? Well. Have a generic Joe + if = { + limit = { + any_courtier = { count <= 2 } + } + #Grab someone random + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + is_available_healthy_adult = yes + NOR = { + this = scope:laamp_first_recruit + this = scope:laamp_second_recruit + } + } + #More fun this way + weight = { + base = 1 + modifier = { + any_secret = { exists = this } + factor = 2 + } + } + save_scope_as = laamp_generic_jane + } + #Otherwise create 'em + if = { + limit = { + NOT = { exists = scope:laamp_generic_jane } + } + #Create generic to stuff in pool + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_generic_jane + } + #... you didn't think it would be _that_ easy, right? + scope:laamp_generic_jane ?= { + hidden_effect = { + random = { + chance = 20 + random_list = { + #Have a murderer + 10 = { + trigger = { is_murderer_trigger = no } + #Create a victim to kill + create_character = { + template = generic_peasant_character + culture = scope:visiting_location.location.county.culture + faith = scope:visiting_location.location.county.faith + location = scope:visiting_location.location + after_creation = { set_to_lowborn = yes } + save_scope_as = 1030_previous_victim + } + scope:1030_previous_victim = { + death = { + death_reason = death_murder + killer = scope:laamp_generic_jane + } + } + #Set up secret + scope:laamp_generic_jane = { + add_secret = { + type = secret_murder + target = scope:1030_previous_victim + } + } + } + #Or a witch + 10 = { + trigger = { is_witch_trigger = no } + add_secret = { type = secret_witch } + } + #Or a cannibal + 10 = { + trigger = { is_cannibal_trigger = no } + add_secret = { type = secret_cannibal } + } + #Maybe a deviant? + 10 = { + trigger = { is_deviant_trigger = no } + add_secret = { type = secret_deviant } + } + } + } + } + } + } + } + #Third character + if = { + limit = { + NOT = { exists = scope:laamp_generic_jane } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + #Remotely interesting + 1033_has_interesting_skillset_trigger = yes + NOR = { + this = scope:laamp_first_recruit + this = scope:laamp_second_recruit + } + } + save_scope_as = laamp_third_recruit + } + if = { + limit = { + NOT = { exists = scope:laamp_third_recruit } + } + #Create third recruit to stuff in pool + save_scope_as = laamp_third_recruit + 1033_generate_character_effect = { SCOPE = scope:laamp_third_recruit } + } + #Set their cost + if = { + limit = { exists = scope:laamp_third_recruit } + 1033_set_cost_effect = { CHARACTER = scope:laamp_third_recruit VALUE_NAME = third_recruit_cost } + } + } + } + #Determine whom to display + if = { + limit = { + NOT = { exists = scope:1033_second_character } + } + if = { + limit = { exists = scope:laamp_first_recruit } + scope:laamp_first_recruit = { save_scope_as = 1033_first_character } + } + if = { + limit = { exists = scope:laamp_second_recruit } + scope:laamp_second_recruit = { save_scope_as = 1033_second_character } + } + if = { + limit = { exists = scope:laamp_generic_jane } + scope:laamp_generic_jane = { save_scope_as = 1033_third_character } + } + if = { + limit = { + NOT = { exists = scope:1033_third_character } + exists = scope:laamp_third_recruit + } + scope:laamp_third_recruit = { save_scope_as = 1033_third_character } + } + if = { + limit = { + NOT = { exists = scope:1033_first_character } + exists = scope:visiting_partner + } + scope:visiting_partner = { save_scope_as = 1033_first_character } + } + if = { + limit = { + NOT = { exists = scope:1033_second_character } + } + save_scope_as = 1033_second_character + } + } + } + #Recruit character A + option = { + name = ep3_laamp_decision_event.1033.a + #Pay gold + pay_short_term_gold = { + target = scope:laamp_first_recruit + gold = scope:first_recruit_cost + } + #Hire wo/manpower + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_first_recruit } + #Set the variables and redirect us back to the tavern main room + 1033_recruited_effect = yes + #Rewards for the Camp Party + hidden_effect = { + if = { + limit = { + has_character_flag = better_recruitment_visit_holding_flag + } + scope:laamp_first_recruit = { + ep3_camp_party_visit_holding_skills_boost = yes + } + } + } + ai_chance = { + base = 50 + modifier = { + short_term_gold < scope:first_recruit_cost + short_term_gold < laamp_ai_spending_pants_value + any_courtier = { count <= 2 } + factor = 0 + } + } + } + #Recruit character B + option = { + name = ep3_laamp_decision_event.1033.b + #Pay gold + pay_short_term_gold = { + target = scope:laamp_second_recruit + gold = scope:second_recruit_cost + } + #Hire wo/manpower + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_second_recruit } + #Set the variables and redirect us back to the tavern main room + 1033_recruited_effect = yes + hidden_effect = { + if = { + limit = { + has_character_flag = better_recruitment_visit_holding_flag + } + scope:laamp_second_recruit = { + ep3_camp_party_visit_holding_skills_boost = yes + } + } + } + ai_chance = { + base = 50 + modifier = { + short_term_gold < scope:second_recruit_cost + short_term_gold < laamp_ai_spending_pants_value + any_courtier = { count <= 2 } + factor = 0 + } + } + } + #Recruit character C + option = { + name = ep3_laamp_decision_event.1033.c + trigger = { + NOT = { exists = scope:laamp_generic_jane } + } + #Pay gold + pay_short_term_gold = { + target = scope:laamp_third_recruit + gold = scope:third_recruit_cost + } + #Hire wo/manpower + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_third_recruit } + #Set the variables and redirect us back to the tavern main room + 1033_recruited_effect = yes + hidden_effect = { + if = { + limit = { + has_character_flag = better_recruitment_visit_holding_flag + } + scope:laamp_third_recruit = { + ep3_camp_party_visit_holding_skills_boost = yes + } + } + } + ai_chance = { + base = 50 + modifier = { + short_term_gold < scope:third_recruit_cost + short_term_gold < laamp_ai_spending_pants_value + any_courtier = { count <= 2 } + factor = 0 + } + } + } + #Generic Jane keeps waving their hand + option = { + name = ep3_laamp_decision_event.1033.d + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1033.d.cooldown.tt + NOT = { has_variable = 1033_generic_jane_cooldown } + exists = scope:laamp_generic_jane + } + } + show_as_unavailable = { + #Show that it's unavailable if it would actually be available + trigger_if = { + limit = { + exists = scope:laamp_generic_jane + has_variable = 1033_generic_jane_cooldown + } + always = yes + } + trigger_else = { always = no } + } + #Add 'em + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_generic_jane } + set_variable = { + name = 1033_generic_jane_cooldown + days = visit_settlement_minimum_cooldown_days + } + #Set the variables and redirect us back to the tavern main room + 1033_recruited_effect = yes + hidden_effect = { + if = { + limit = { + has_character_flag = better_recruitment_visit_holding_flag + } + scope:laamp_generic_jane = { + ep3_camp_party_visit_holding_skills_boost = yes + } + } + } + ai_chance = { + base = 1000 #Just do it + } + } + #I want to go back + option = { + name = ep3_laamp_decision_event.1033.e + #Set the variables and redirect us back to the tavern main room + 1031_been_to_effect = { GUILD = recruit } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + factor = 2 + } + } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:recruit } + } +} + + +#Set the correct variable to block off the Spouse option and remove the desc flavor variable +scripted_effect 1035_spoused_effect = { + save_scope_value_as = { + name = laamp_decision_has_spoused + value = flag:yes + } + #Cooldown for prowling + set_variable = { + name = 1035_has_spoused_recently + days = visit_settlement_minimum_cooldown_days + } + #Go back to the tavern main room + hidden_effect = { 1031_return_to_tavern_effect = yes } +} + + +#Spouse material +ep3_laamp_decision_event.1035 = { + type = character_event + title = ep3_laamp_decision_event.1035.t + window = visit_settlement_window + desc = { + #Well, hello there + first_valid = { + #We've returned to this scene, now what + #RETURN: Generics + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_spouse + scope:spouse_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1035.desc_returned_01 + } + triggered_desc = { + trigger = { scope:spouse_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1035.desc_returned_02 + } + } + #FIRST TIME: We've seen this spouse-r before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_spouse + NOT = { exists = scope:been_to_spouse } + } + desc = ep3_laamp_decision_event.1035.desc_reused_spouse + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_spouse } + } + desc = ep3_laamp_decision_event.1035.desc + } + } + } + theme = seduction + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_seduction" } + override_background = { + trigger = { 1000_is_a_nomadic_holding_trigger = yes } + reference = ep3_military_tent #Give me other variations - like a yurt - and I'll use a yurt. Otherwise you get a tent. + } + override_background = { + trigger = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + reference = tavern + } + override_background = { reference = tavern } + center_portrait = { + character = root + camera = camera_event_scheme_vs_right_look_right + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + has_trait = shy + } + } + animation = shame + } + animation = ecstasy + } + right_portrait = { + character = scope:laamp_spouse_material + #First time engaging them + triggered_animation = { + trigger = { + NOT = { exists = scope:been_to_spouse } + } + animation = personality_callous + } + animation = personality_cynical + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Run this once: Re-save the portrait so the Spouse is not the 1030_second_character / 1030_third_character + if = { + limit = { scope:1030_second_character ?= scope:laamp_spouse_material } + #If we have a partner, shuffle the portraits + if = { + limit = { exists = scope:visiting_partner } + #Move ROOT into the second character slot + save_scope_as = 1030_second_character + scope:visiting_partner = { save_scope_as = 1030_first_character } + } + #Otherwise overwrite the portrait with ROOT to disappear the second one + else = { save_scope_as = 1030_second_character } + } + else_if = { + limit = { scope:1030_third_character ?= scope:laamp_spouse_material } + #Overwrite the portrait with ROOT to disappear the third one + save_scope_as = 1030_third_character + #And move ROOT into the second character slot + save_scope_as = 1030_second_character + } + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = spouse } + #Remember this potential spouse -- for a while, at least + add_to_variable_list = { + name = 1025_remembered_spouse_potential_list + target = scope:laamp_spouse_material + days = visit_settlement_minimum_cooldown_days + } + #Set the drink cost + if = { + limit = { + NOT = { exists = scope:spouse_drink_cost } + } + save_scope_value_as = { + name = spouse_drink_cost + value = { + integer_range = { + min = tiny_gold_laamps_value + max = minor_gold_laamps_value + } + } + } + } + #Pick a pick-up line + if = { + limit = { + NOT = { exists = scope:1035_saved_pickup_line } + } + random_list = { + 10 = { + save_scope_value_as = { + name = 1035_saved_pickup_line + value = flag:first + } + } + 10 = { + save_scope_value_as = { + name = 1035_saved_pickup_line + value = flag:second + } + } + 10 = { + save_scope_value_as = { + name = 1035_saved_pickup_line + value = flag:third + } + } + 10 = { + save_scope_value_as = { + name = 1035_saved_pickup_line + value = flag:fourth + } + } + 10 = { + save_scope_value_as = { + name = 1035_saved_pickup_line + value = flag:fifth + } + } + } + } + } + #Buy 'em a drink + option = { + name = ep3_laamp_decision_event.1035.a + #Pay gold + remove_short_term_gold = scope:spouse_drink_cost + #Have them join your camp + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_spouse_material } + #Set the variables and redirect us back to the tavern main room + 1035_spoused_effect = yes + ai_chance = { + base = 300 + modifier = { + short_term_gold < scope:spouse_drink_cost + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Intrigue Duel + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:1035_saved_pickup_line ?= flag:first } + desc = ep3_laamp_decision_event.1035.b_first + } + triggered_desc = { + trigger = { scope:1035_saved_pickup_line ?= flag:second } + desc = ep3_laamp_decision_event.1035.b_second + } + triggered_desc = { + trigger = { scope:1035_saved_pickup_line ?= flag:third } + desc = ep3_laamp_decision_event.1035.b_third + } + triggered_desc = { + trigger = { scope:1035_saved_pickup_line ?= flag:fourth } + desc = ep3_laamp_decision_event.1035.b_fourth + } + triggered_desc = { + trigger = { scope:1035_saved_pickup_line ?= flag:fifth } + desc = ep3_laamp_decision_event.1035.b_fifth + } + #Fallback + desc = ep3_laamp_decision_event.1035.b_fallback + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1035.b.cooldown.tt + NOT = { has_variable = 1035_spouse_duelled_recently } + } + } + show_as_unavailable = { always = yes } + duel = { + skill = intrigue + value = average_skill_rating + #Success: Hire 'em up + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamp_decision_event.1035.b.success + send_interface_toast = { + title = ep3_laamp_decision_event.1035.b.success + left_icon = root + right_icon = scope:laamp_spouse_material + #Yippee! + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_spouse_material } + #This 'finished' is different since it changes between flag:yes and flag:no + 1035_spoused_effect = yes + } + } + #Failure: Bye, now + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + desc = ep3_laamp_decision_event.1035.b.failure + send_interface_toast = { + type = event_toast_text_bad + title = ep3_laamp_decision_event.1035.b.failure + desc = ep3_laamp_decision_event.1035.b.failure.tt + left_icon = root + right_icon = scope:laamp_spouse_material + #Oh well + custom_tooltip = ep3_laamp_decision_event.1035.b.failure.tt + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_has_spoused + value = flag:no + } + #Go back to the tavern main room + 1031_return_to_tavern_effect = yes + } + } + } + #Cooldown for the action + set_variable = { + name = 1035_spouse_duelled_recently + days = visit_settlement_minimum_cooldown_days + } + ai_chance = { base = 200 } + } + #Triggered Option: Seducer + option = { + name = ep3_laamp_decision_event.1035.c + trigger = { + has_trait = seducer + is_ai = no + trigger_if = { + limit = { has_variable = 1035_spouse_unwinded_recently } + custom_tooltip = { + text = ep3_laamp_decision_event.1035.c.cooldown.tt + always = no + } + } + } + show_as_unavailable = { always = yes } + #Pick 'em up + progress_towards_lover_effect = { + CHARACTER = scope:laamp_spouse_material + REASON = lover_tavern_hookup + OPINION = 50 + } + add_courtier = scope:laamp_spouse_material + save_scope_as = 1035_unwinded_with_spouse_potential + #Cooldown for the action + set_variable = { + name = 1035_spouse_unwinded_recently + months = visit_settlement_minimum_cooldown_days + } + #Set the variables and redirect us back to the tavern main room + 1035_spoused_effect = yes + } + #I want to go back + option = { + name = ep3_laamp_decision_event.1035.d + #Set the variables and redirect us back to the tavern main room + 1031_been_to_effect = { GUILD = spouse } + ai_chance = { base = 100 } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:spouse } + } +} + + +#Set the correct variable to block off the Hood option and remove the desc flavor variable +scripted_effect 1037_hooded_effect = { + save_scope_value_as = { + name = laamp_decision_recruited_hood + value = flag:no + } + #Go back to the tavern main room + hidden_effect = { 1031_return_to_tavern_effect = yes } +} + +#This implementation hurts me as much as it hurts you +scripted_effect 1037_determine_highest_gallowsbait_track_effect = { + if = { + limit = { has_trait = gallowsbait } + #Is any of it aced? + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value = 100 #Max value + } + } + save_scope_as = ace_gallowsbait_bandit + } + else_if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = trickster + value = 100 #Max value + } + } + save_scope_as = ace_gallowsbait_trickster + } + else_if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = thief + value = 100 #Max value + } + } + save_scope_as = ace_gallowsbait_thief + } + else_if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = poacher + value = 100 #Max value + } + } + save_scope_as = ace_gallowsbait_poacher + } + else_if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = marauder + value = 100 #Max value + } + } + save_scope_as = ace_gallowsbait_marauder + } + #If two are roughly the same, randomize it + random_list = { + 10 = { + trigger = { exists = scope:ace_gallowsbait_bandit } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:bandit + } + } + 10 = { + trigger = { exists = scope:ace_gallowsbait_trickster } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:trickster + } + } + 10 = { + trigger = { exists = scope:ace_gallowsbait_thief } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:thief + } + } + 10 = { + trigger = { exists = scope:ace_gallowsbait_poacher } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:poacher + } + } + 10 = { + trigger = { exists = scope:ace_gallowsbait_marauder } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:marauder + } + } + } + #No? Then find an intermediate. + if = { + limit = { + NOT = { exists = scope:1037_highest_gallowsbait_track } + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= medium_lifestyle_random_xp_high + } + } + save_scope_as = intermediate_gallowsbait_bandit + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= medium_lifestyle_random_xp_high + } + } + save_scope_as = intermediate_gallowsbait_trickster + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = thief + value >= medium_lifestyle_random_xp_high + } + } + save_scope_as = intermediate_gallowsbait_thief + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= medium_lifestyle_random_xp_high + } + } + save_scope_as = intermediate_gallowsbait_poacher + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= medium_lifestyle_random_xp_high + } + } + save_scope_as = intermediate_gallowsbait_marauder + } + #If two are roughly the same, randomize it + random_list = { + 10 = { + trigger = { exists = scope:intermediate_gallowsbait_bandit } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:bandit + } + } + 10 = { + trigger = { exists = scope:intermediate_gallowsbait_trickster } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:trickster + } + } + 10 = { + trigger = { exists = scope:intermediate_gallowsbait_thief } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:thief + } + } + 10 = { + trigger = { exists = scope:intermediate_gallowsbait_poacher } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:poacher + } + } + 10 = { + trigger = { exists = scope:intermediate_gallowsbait_marauder } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:marauder + } + } + } + } + #Still nothing? How about an average. + if = { + limit = { + NOT = { exists = scope:1037_highest_gallowsbait_track } + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= medium_lifestyle_random_xp_low + } + } + save_scope_as = average_gallowsbait_bandit + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= medium_lifestyle_random_xp_low + } + } + save_scope_as = average_gallowsbait_trickster + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = thief + value >= medium_lifestyle_random_xp_low + } + } + save_scope_as = average_gallowsbait_thief + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= medium_lifestyle_random_xp_low + } + } + save_scope_as = average_gallowsbait_poacher + } + if = { + limit = { + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= medium_lifestyle_random_xp_low + } + } + save_scope_as = average_gallowsbait_marauder + } + #If two are roughly the same, randomize it + random_list = { + 10 = { + trigger = { exists = scope:average_gallowsbait_bandit } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:bandit + } + } + 10 = { + trigger = { exists = scope:average_gallowsbait_trickster } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:trickster + } + } + 10 = { + trigger = { exists = scope:average_gallowsbait_thief } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:thief + } + } + 10 = { + trigger = { exists = scope:average_gallowsbait_poacher } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:poacher + } + } + 10 = { + trigger = { exists = scope:average_gallowsbait_marauder } + save_scope_value_as = { + name = 1037_highest_gallowsbait_track + value = flag:marauder + } + } + } + } + #If we still don't have a scope here, we need to have another look at the character pool pull/create, 'cause then it didn't reach medium_lifestyle_random_xp_low in any track + } +} + +#Yupyup +scripted_effect 1037_hire_thief_effect = { + hidden_effect = { + reverse_add_opinion = { + target = scope:laamp_hooded_figure + modifier = recruited_me_opinion + opinion = 30 + } + } + add_courtier = scope:laamp_hooded_figure + #The actual effect happens in after + show_as_tooltip = { + camp_officer_grant_effect = { + EMPLOYER = root + POS = master_thief + CANDIDATE = scope:laamp_hooded_figure + } + } + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_recruited_hood + value = flag:yes + } + #Go back to tavern + hidden_effect = { 1031_return_to_tavern_effect = yes } +} + +#Pretty self-explanatory +scripted_trigger 1037_maxed_gallowsbait_track_trigger = { + OR = { + has_trait_xp = { + trait = gallowsbait + track = bandit + value = 100 #Max value + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value = 100 #Max value + } + has_trait_xp = { + trait = gallowsbait + track = thief + value = 100 #Max value + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value = 100 #Max value + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value = 100 #Max value + } + } +} + +scripted_effect 1037_noble_reward_effect = { + add_contact = scope:laamp_disguised_noble + add_hook_if_possible_default_length_effect = { + TARGET = scope:laamp_disguised_noble + TYPE = favor_hook + } + progress_towards_friend_effect = { + REASON = friend_rescued_from_tavern_brawl + CHARACTER = scope:laamp_disguised_noble + OPINION = default_friend_opinion + } +} + +#Duel for your highest skill stat +scripted_effect 1037_highest_skill_duel_effect = { + if = { + limit = { highest_skill = diplomacy } + 1037_duel_effect = { SKILL = diplomacy } + } + else_if = { + limit = { highest_skill = stewardship } + 1037_duel_effect = { SKILL = stewardship } + } + else_if = { + limit = { highest_skill = intrigue } + 1037_duel_effect = { SKILL = intrigue } + } + else_if = { + limit = { highest_skill = learning } + 1037_duel_effect = { SKILL = learning } + } + else_if = { + limit = { highest_skill = martial } + 1037_duel_effect = { SKILL = martial } + } + else_if = { + limit = { highest_skill_including_prowess = prowess } + 1037_duel_effect = { SKILL = prowess } + } +} + +#Actual duel effect +scripted_effect 1037_duel_effect = { + duel = { + skill = $SKILL$ + value = medium_skill_rating + #Success: Yay, free contact + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamp_decision_event.1037.b.success + send_interface_toast = { + title = ep3_laamp_decision_event.1037.b.success.t + left_icon = root + right_icon = scope:laamp_disguised_noble + #Woo rewards + show_as_tooltip = { #Don't need two toasts for the hook + add_contact = scope:laamp_disguised_noble + progress_towards_friend_effect = { + REASON = friend_rescued_from_tavern_brawl + CHARACTER = scope:laamp_disguised_noble + OPINION = default_friend_opinion + } + } + hidden_effect = { 1037_noble_reward_effect = yes } + #Go back to the main event + 1037_hooded_effect = yes + } + } + #Failure: Whoopsie, they became wounded + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + desc = ep3_laamp_decision_event.1037.b.failure + send_interface_toast = { + title = ep3_laamp_decision_event.1037.b.failure.t + left_icon = root + right_icon = scope:laamp_disguised_noble + random_list = { + 50 = { + #Less chance that _we_ get hurt if we're buff + compare_modifier = { value = prowess } + #Oops + scope:laamp_disguised_noble = { + increase_wounds_effect = { REASON = fight } + } + } + 50 = { + #Owwie + increase_wounds_effect = { REASON = fight } + } + } + save_scope_value_as = { + name = laamp_decision_recruited_hood + value = flag:wounded + } + #Go back to the tavern main room + 1037_hooded_effect = yes + } + } + } +} + + +#The hooded figure +ep3_laamp_decision_event.1037 = { + type = character_event + window = visit_settlement_window + title = { + first_valid = { + #Noble + triggered_desc = { + trigger = { exists = scope:laamp_disguised_noble } + desc = ep3_laamp_decision_event.1037.t_noble + } + #Thief + desc = ep3_laamp_decision_event.1037.t + } + } + desc = { + #Hello, hooded person + first_valid = { + #We've returned to this scene, now what + #RETURN: Noble + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_hood + exists = scope:laamp_disguised_noble + scope:hood_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1037.desc_noble_returned_01 + } + triggered_desc = { + trigger = { + exists = scope:laamp_disguised_noble + scope:hood_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1037.desc_noble_returned_02 + } + } + #RETURN: Thief + random_valid = { + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + exists = scope:been_to_hood + exists = scope:1037_neighboring_holding + scope:hood_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1037.desc_returned_01 + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + exists = scope:been_to_hood + exists = scope:1037_neighboring_holding + scope:hood_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1037.desc_nomad_returned_01 + } + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + exists = scope:been_to_hood + scope:hood_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1037.desc_returned_02 + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + exists = scope:been_to_hood + scope:hood_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1037.desc_nomad_returned_02 + } + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + scope:hood_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1037.desc_returned_03 + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + scope:hood_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1037.desc_nomad_returned_03 + } + } + #FIRST TIME: We've seen this thief before + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + exists = scope:laamp_recurring_thief + NOT = { exists = scope:been_to_hood } + } + desc = ep3_laamp_decision_event.1037.desc_reused_thief + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + exists = scope:laamp_recurring_thief + NOT = { exists = scope:been_to_hood } + } + desc = ep3_laamp_decision_event.1037.desc_nomad_reused_thief + } + #FIRST TIME: Hooded noble is in trouble! + triggered_desc = { + trigger = { + exists = scope:laamp_disguised_noble + NOT = { exists = scope:been_to_hood } + } + desc = ep3_laamp_decision_event.1037.desc_noble + } + #FIRST TIME: Hooded thief + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = no + NOT = { exists = scope:been_to_hood } + } + desc = ep3_laamp_decision_event.1037.desc + } + #Nomad variant + triggered_desc = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + NOT = { exists = scope:been_to_hood } + } + desc = ep3_laamp_decision_event.1037.desc_nomad + } + } + } + theme = landless_adventurer + override_sound = { + trigger = { exists = scope:laamp_disguised_noble } + reference = "event:/SFX/Events/Themes/sfx_event_theme_type_dynasty" + } + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_intrigue" } + override_icon = { + trigger = { + NOT = { exists = scope:laamp_disguised_noble } + } + reference = "gfx/interface/icons/event_types/type_intrigue.dds" + } + override_background = { + trigger = { exists = scope:laamp_disguised_noble } + reference = tavern + } + override_background = { + trigger = { 1000_is_a_nomadic_holding_trigger = yes } + reference = ep3_relaxing_tent + } + override_background = { reference = bp1_wine_cellar } + left_portrait = { + trigger = { exists = scope:1037_left_character } + character = scope:1037_left_character + #Noble: Engaging the noble + triggered_animation = { + trigger = { + exists = scope:laamp_disguised_noble + NOT = { exists = scope:been_to_hood } + } + animation = disbelief + } + #Noble: They're fighting + triggered_animation = { + trigger = { exists = scope:laamp_disguised_noble } + animation = personality_coward + } + animation = interested + } + center_portrait = { + character = scope:1037_center_character + camera = camera_event_scheme_center_look_semi_right + #Noble: First time engaging the noble + triggered_animation = { + trigger = { + exists = scope:laamp_disguised_noble + NOT = { exists = scope:been_to_hood } + } + #_Seating tax_?! + animation = anger + } + #Noble: I am NOT paying + triggered_animation = { + trigger = { exists = scope:laamp_disguised_noble } + animation = disapproval + } + #Thief: Is... cleaning up blood? + triggered_animation = { + trigger = { scope:hood_loc_tracker ?= 1 } + animation = disbelief + } + #Thief: Don't like this + triggered_animation = { + trigger = { has_trait = honest } + animation = stress + } + #Thief + animation = personality_rational + } + right_portrait = { + character = scope:1037_right_character + camera = camera_event_scheme_far_right + #Noble: Ruffian: First time engaging the noble + triggered_animation = { + trigger = { + exists = scope:laamp_disguised_noble + NOT = { exists = scope:been_to_hood } + } + #Menacing + animation = menacing + } + #Noble: Ruffian: I am NOT paying + triggered_animation = { + trigger = { exists = scope:laamp_disguised_noble } + animation = threatening + } + #Thief: Just cleaned up some blood. 's fine. + triggered_animation = { + trigger = { + 1000_is_a_nomadic_holding_trigger = yes + scope:hood_loc_tracker ?= 1 + } + #Happy to see you + animation = spymaster + } + #Thief: First time engaging the thief + triggered_animation = { + trigger = { + exists = scope:laamp_recurring_thief + NOT = { exists = scope:been_to_hood } + } + #Happy to see you + animation = ecstasy + } + #Thief: Whadda ya want + triggered_animation = { + trigger = { + NOT = { exists = scope:been_to_hood } + } + #A bit reserved + animation = disapproval + } + animation = chess_cocky + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Run this once: Re-save the portrait so the Hood is not the 1030_third_character + if = { + limit = { scope:1030_third_character ?= scope:laamp_hooded_figure } + #Shuffle Spouse over, if they exist + if = { + limit = { scope:1030_second_character ?= scope:laamp_spouse_material } + scope:laamp_spouse_material ?= { save_scope_as = 1030_third_character } + } + #Otherwise overwrite the portrait with ROOT to disappear the third one + else = { save_scope_as = 1030_third_character } + #Move ROOT into the second character slot + if = { + limit = { + NOT = { scope:1030_second_character ?= root } + } + save_scope_as = 1030_second_character + } + #Remember the thief + if = { + limit = { + NOT = { exists = scope:laamp_disguised_noble } + } + 1010_remember_vendor_character_effect = { GUILD = thief CHARACTER = scope:laamp_hooded_figure } + } + } + #Tweak the portraits for the noble-fight + if = { + limit = { + exists = scope:laamp_disguised_noble + NOT = { scope:1037_left_character ?= root } + } + #Move ourselves to the left + save_scope_as = 1037_left_character + #Plonk the perilous noble in the middle + scope:laamp_disguised_noble = { save_scope_as = 1037_center_character } + #Shove a ruffian on the right + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + after_creation = { set_to_lowborn = yes } + save_scope_as = 1037_local_ruffian + } + scope:1037_local_ruffian = { save_scope_as = 1037_right_character } + } + #Otherwise set up the thief situation + else_if = { + limit = { + NOR = { + exists = scope:laamp_disguised_noble + exists = scope:1037_center_character + } + } + #We go in the middle + save_scope_as = 1037_center_character + #... and the thief on the right + scope:laamp_hooded_figure = { save_scope_as = 1037_right_character } + } + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = hood } + #Thief effects + if = { + limit = { + NOR = { + exists = scope:laamp_disguised_noble + exists = scope:1037_neighboring_holding + } + } + #Save a neighboring holding + location = { + random_neighboring_province = { + limit = { + is_sea_province = no + has_holding = yes + } + save_scope_as = 1037_neighboring_holding + } + } + #Figure their highest Gallowbait track + scope:laamp_hooded_figure = { 1037_determine_highest_gallowsbait_track_effect = yes } + } + #Noble effects + if = { + limit = { exists = scope:laamp_disguised_noble } + #Exactly how much does the hooded noble owe? + save_scope_value_as = { + name = noble_tab_value + value = { + value = scope:laamp_disguised_noble.medium_gold_value + #Go outside of the city to drink, eh + if = { + limit = { + scope:visiting_location = { + OR = { + has_holding_type = tribal_holding + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + multiply = 0.5 + } + } + } + } + } + #Noble: Pay their tab + option = { + name = ep3_laamp_decision_event.1037.a + trigger = { exists = scope:laamp_disguised_noble } + flavor = ep3_laamp_decision_event.1037.a.flavor + #Pay up + remove_short_term_gold = scope:noble_tab_value + #Woo rewards + 1037_noble_reward_effect = yes + #Quite the molah + stress_impact = { greedy = minor_stress_impact_gain } + #Set the variables and redirect us back to the tavern main room + 1037_hooded_effect = yes + } + #Noble: Duel the villain + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { highest_skill_including_prowess = diplomacy } + desc = ep3_laamp_decision_event.1037.b_diplomacy + } + triggered_desc = { + trigger = { highest_skill_including_prowess = stewardship } + desc = ep3_laamp_decision_event.1037.b_stewardship + } + triggered_desc = { + trigger = { highest_skill_including_prowess = intrigue } + desc = ep3_laamp_decision_event.1037.b_intrigue + } + triggered_desc = { + trigger = { highest_skill_including_prowess = learning } + desc = ep3_laamp_decision_event.1037.b_learning + } + triggered_desc = { + trigger = { + OR = { + highest_skill_including_prowess = martial + highest_skill_including_prowess = prowess + } + } + desc = ep3_laamp_decision_event.1037.b_martial + } + } + } + } + trigger = { exists = scope:laamp_disguised_noble } + flavor = ep3_laamp_decision_event.1037.b.flavor + #Duel effect + 1037_highest_skill_duel_effect = yes + } + #Noble Triggered Option: We're pretty bad, bro + option = { + name = ep3_laamp_decision_event.1037.c + trigger = { + exists = scope:laamp_disguised_noble + has_trait = gallowsbait + OR = { + #Bandit + has_trait_xp = { + trait = gallowsbait + track = bandit + value > 50 #Half-way + } + #Trickster + has_trait_xp = { + trait = gallowsbait + track = trickster + value > 50 #Half-way + } + #Thief + has_trait_xp = { + trait = gallowsbait + track = thief + value > 50 #Half-way + } + #Poacher + has_trait_xp = { + trait = gallowsbait + track = poacher + value > 50 #Half-way + } + #Marauder + has_trait_xp = { + trait = gallowsbait + track = marauder + value > 50 #Half-way + } + } + } + flavor = ep3_laamp_decision_event.1037.c.flavor + if = { + limit = { + NOT = { + has_trait_xp = { + trait = gallowsbait + track = marauder + value = 100 #Max + } + } + } + add_trait_xp = { + trait = gallowsbait + track = marauder + value = small_lifestyle_random_xp_low + } + } + #Woo rewards + 1037_noble_reward_effect = yes + #I just don't like being criminal, OK? + stress_impact = { + honest = minor_stress_impact_gain + } + #Set the variables and redirect us back to the tavern main room + 1037_hooded_effect = yes + } + #Thief: Recruit them (expensive) + option = { + name = { + text = { + first_valid = { + #I have an open position... + triggered_desc = { + trigger = { can_employ_court_position_type = master_thief_camp_officer } + desc = ep3_laamp_decision_event.1037.d_thief_position + } + #Standard reply + desc = ep3_laamp_decision_event.1037.d + } + } + } + #Replace it with the strongarm option if we have aced a Gallowsbait track + trigger = { + 1037_maxed_gallowsbait_track_trigger = no + #Not available if it's the hooded noble + NOT = { exists = scope:laamp_disguised_noble } + } + #Half if you can offer them an attractive position + if = { + limit = { can_employ_court_position_type = master_thief_camp_officer } #If we, sometime in the future, easily can determine which track of a scaling trait is highest, let's gate it to Thief track + pay_short_term_gold = { + target = scope:laamp_hooded_figure + gold = { + value = major_gold_laamps_value + divide = 2 + } + } + #Hire them (effect in After) + 1037_hire_thief_effect = yes + } + #Otherwise pay up + else = { + pay_short_term_gold = { + target = scope:laamp_hooded_figure + gold = major_gold_laamps_value + } + #Have them join your camp + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_hooded_figure } + #Set the variables and redirect us back to the tavern main room + 1037_hooded_effect = yes + } + } + #Thief: Intrigue Duel + option = { + name = ep3_laamp_decision_event.1037.e + #Replace it with the strongarm option if we have aced a Gallowsbait track + trigger = { + 1037_maxed_gallowsbait_track_trigger = no + #Not available if it's the hooded noble + NOT = { exists = scope:laamp_disguised_noble } + } + duel = { + skill = intrigue + target = scope:laamp_hooded_figure + #Success: Hire 'em up + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 2 + desc = ep3_laamp_decision_event.1037.e.success + send_interface_toast = { + title = ep3_laamp_decision_event.1037.e.success + left_icon = root + right_icon = scope:laamp_hooded_figure + #Yippee! + if = { + limit = { can_employ_court_position_type = master_thief_camp_officer } + #Hire them (effect in After) + 1037_hire_thief_effect = yes + } + else = { + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_hooded_figure } + + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_recruited_hood + value = flag:yes + } + #Go back to tavern + hidden_effect = { 1031_return_to_tavern_effect = yes } + } + } + } + #Failure: Bye, now + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + desc = ep3_laamp_decision_event.1037.e.failure + send_interface_toast = { + type = event_toast_text_bad + title = ep3_laamp_decision_event.1037.e.failure + desc = ep3_laamp_decision_event.1037.e.failure.tt + left_icon = root + right_icon = scope:laamp_hooded_figure + #Oh well + custom_tooltip = ep3_laamp_decision_event.1037.e.failure.tt + #This 'finished' is different since it changes between flag:yes and flag:no + 1037_hooded_effect = yes + } + } + } + } + #Thief: Teach me about Gallowsbait... + option = { + name = ep3_laamp_decision_event.1037.f + trigger = { + #Unless you are full in whatever the hooded figure offers + NOR = { + #Bandit + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 100 #Max value + } + scope:1037_highest_gallowsbait_track ?= flag:bandit + } + #Trickster + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 100 #Max value + } + scope:1037_highest_gallowsbait_track ?= flag:trickster + } + #Thief + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 100 #Max value + } + scope:1037_highest_gallowsbait_track ?= flag:thief + } + #Poacher + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 100 #Max value + } + scope:1037_highest_gallowsbait_track ?= flag:poacher + } + #Marauder + AND = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 100 #Max value + } + scope:1037_highest_gallowsbait_track ?= flag:marauder + } + } + #Not available if it's the hooded noble + NOT = { exists = scope:laamp_disguised_noble } + } + #Get trait + if = { + limit = { + NOT = { has_trait = gallowsbait } + } + add_trait = gallowsbait + } + #Or get a significant amount of experience in trait + else = { + #Pay gold + pay_short_term_gold = { + target = scope:laamp_hooded_figure + gold = medium_gold_laamps_value + } + if = { + limit = { scope:1037_highest_gallowsbait_track ?= flag:bandit } + add_trait_xp = { + trait = gallowsbait + track = bandit + value = trait_third_level_value + } + } + else_if = { + limit = { scope:1037_highest_gallowsbait_track ?= flag:trickster } + add_trait_xp = { + trait = gallowsbait + track = trickster + value = trait_third_level_value + } + } + else_if = { + limit = { scope:1037_highest_gallowsbait_track ?= flag:thief } + add_trait_xp = { + trait = gallowsbait + track = thief + value = trait_third_level_value + } + } + else_if = { + limit = { scope:1037_highest_gallowsbait_track ?= flag:poacher } + add_trait_xp = { + trait = gallowsbait + track = poacher + value = trait_third_level_value + } + } + else_if = { + limit = { scope:1037_highest_gallowsbait_track ?= flag:marauder } + add_trait_xp = { + trait = gallowsbait + track = marauder + value = trait_third_level_value + } + } + } + #Some Intrigue lifestyle gain, coming up + add_intrigue_lifestyle_xp = medium_lifestyle_xp + #Stressful for honest characters + stress_impact = { + honest = minor_stress_impact_gain + } + #Set the variables and redirect us back to the tavern main room + 1037_hooded_effect = yes + } + #Thief Triggered Option: You have aced Gallowsbait in a track + option = { + name = ep3_laamp_decision_event.1037.g + trigger = { + has_trait = gallowsbait + 1037_maxed_gallowsbait_track_trigger = yes + #Not available if it's the hooded noble + NOT = { exists = scope:laamp_disguised_noble } + } + 1033_add_courtier_with_opinion_effect = { TARGET = scope:laamp_hooded_figure } + #Set the variables and redirect us back to the tavern main room + 1037_hooded_effect = yes + ai_chance = { + base = 100 + } + } + #I want to go back + option = { + name = ep3_laamp_decision_event.1037.h + #Set the variables and redirect us back to the tavern main room + 1031_been_to_effect = { GUILD = hood } + } + after = { + if = { + limit = { scope:laamp_decision_recruited_hood ?= flag:yes } + #Appoint them + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:laamp_hooded_figure + COURT_POS = master_thief_camp_officer + } + } + camp_officer_grant_effect = { + EMPLOYER = root + POS = master_thief + CANDIDATE = scope:laamp_hooded_figure + } + } + } + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:hood } + } +} + + +###################################################################### +# CHURCH GROUNDS +# ep3_laamp_decision_event.1040 +###################################################################### + +#Set the correct variable to block off the Church option and remove the desc flavor variable +scripted_effect 1040_finished_churched_effect = { + remove_list_variable = { + name = list_of_options + target = flag:has_church_option + } + save_scope_as = laamp_decision_finished_church_option +} + +#Nothing left for us to do +scripted_trigger 1040_done_with_church_trigger = { + exists = scope:laamp_decision_has_healed + exists = scope:laamp_decision_has_churched + exists = scope:laamp_decision_has_gardened + trigger_if = { + limit = { exists = scope:laamp_physician_recruit } + exists = scope:laamp_decision_recruited_physician + } +} + +#One of your sick kids who wouldn't fit the visiting_partner trigger +scripted_trigger 1040_sickly_minor_trigger = { + location = root.location + is_courtier_of = root + is_travelling = no + is_imprisoned = no + 1000_has_illness_or_wound_to_treat_trigger = yes + age < 10 +} + + +#Church Holding: Visit the local church grounds +ep3_laamp_decision_event.1040 = { + type = character_event + title = ep3_laamp_decision_event.1040.t + window = visit_settlement_window + desc = { + #Intro + first_valid = { + #We've returned to this scene, now what + #RETURN: We've returned from Main Square + random_valid = { + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + exists = scope:been_to_church_grounds + OR = { + scope:church_grounds_loc_tracker ?= 0 + scope:church_grounds_loc_tracker ?= 2 + } + } + desc = ep3_laamp_decision_event.1040.desc_returned_01 + } + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + scope:church_grounds_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1040.desc_returned_02 + } + } + #RETURN: We've returned from the Healer + triggered_desc = { + trigger = { var:return_from_location ?= flag:healer } + desc = ep3_laamp_decision_event.1040.desc_returned_from_healer + } + #RETURN: We've returned from the Church + triggered_desc = { + trigger = { var:return_from_location ?= flag:church } + desc = ep3_laamp_decision_event.1040.desc_returned_from_church + } + #RETURN: We've returned from the Garden + triggered_desc = { + trigger = { var:return_from_location ?= flag:garden } + desc = ep3_laamp_decision_event.1040.desc_returned_from_garden + } + #RETURN: We've returned from the Physician + triggered_desc = { + trigger = { var:return_from_location ?= flag:physician } + desc = ep3_laamp_decision_event.1040.desc_returned_from_physician + } + #FIRST TIME: First time here + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_church_grounds } + } + desc = ep3_laamp_decision_event.1040.desc + } + } + #Outro + first_valid = { + #FIRST TIME: For some reason, you have both Sickly Minor and Physician + triggered_desc = { + trigger = { + exists = scope:laamp_physician_recruit + exists = scope:1040_sickly_minor + NOT = { exists = scope:been_to_church_grounds } + } + desc = ep3_laamp_decision_event.1040.desc_outro_physician_sickly_minor + } + #FIRST TIME: First time here, look at the physician + triggered_desc = { + trigger = { + exists = scope:laamp_physician_recruit + NOT = { exists = scope:been_to_church_grounds } + } + desc = ep3_laamp_decision_event.1040.desc_outro_physician + } + #FIRST TIME: First time here, sickly minor + triggered_desc = { + trigger = { + exists = scope:1040_sickly_minor + NOT = { exists = scope:been_to_church_grounds } + } + desc = ep3_laamp_decision_event.1040.desc_outro_sickly_minor + } + #FIRST TIME: First time here, curious partner + triggered_desc = { + trigger = { + exists = scope:visiting_partner + NOT = { exists = scope:been_to_church_grounds } + } + desc = ep3_laamp_decision_event.1040.desc_outro_partner + } + #FIRST TIME: First time here + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_church_grounds } + } + desc = ep3_laamp_decision_event.1040.desc_outro + } + #RETURN: Partner - there is nothing left for us here + triggered_desc = { + trigger = { + exists = scope:visiting_partner + 1040_done_with_church_trigger = yes + } + desc = ep3_laamp_decision_event.1040.desc_outro_return_partner_finished + } + #RETURN: There is nothing left for us here + triggered_desc = { + trigger = { 1040_done_with_church_trigger = yes } + desc = ep3_laamp_decision_event.1040.desc_outro_return_finished + } + #RETURN: Physician did not move to their study, yet + triggered_desc = { + trigger = { + exists = scope:laamp_physician_recruit + NOR = { + exists = scope:been_to_physician + exists = scope:laamp_decision_recruited_physician + } + } + desc = ep3_laamp_decision_event.1040.desc_outro_physician_return + } + #RETURN: We've been here before + first_valid = { + #RETURN: Sickly minor is still at the healer's + triggered_desc = { + trigger = { + exists = scope:1040_sickly_minor + var:return_from_location ?= flag:healer + scope:1040_sickly_minor = { has_any_illness = yes } + } + desc = ep3_laamp_decision_event.1040.desc_outro_sickly_minor_return + } + random_valid = { + #RETURN: Partner flavor + triggered_desc = { + trigger = { + exists = scope:visiting_partner + exists = scope:been_to_church_grounds + scope:church_grounds_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1040.desc_outro_return_partner_01 + } + triggered_desc = { + trigger = { + exists = scope:visiting_partner + scope:church_grounds_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1040.desc_outro_return_partner_02 + } + triggered_desc = { + trigger = { + exists = scope:visiting_partner + scope:church_grounds_loc_tracker ?= 2 + } + desc = ep3_laamp_decision_event.1040.desc_outro_return_partner_03 + } + #RETURN: Generics + triggered_desc = { + trigger = { + exists = scope:been_to_church_grounds + scope:church_grounds_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1040.desc_outro_return_01 + } + triggered_desc = { + trigger = { scope:church_grounds_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1040.desc_outro_return_02 + } + triggered_desc = { + trigger = { scope:church_grounds_loc_tracker ?= 2 } + desc = ep3_laamp_decision_event.1040.desc_outro_return_03 + } + } + } + } + } + theme = faith + #Get outta here already + override_effect_2d = { + trigger = { + 1040_done_with_church_trigger = yes + scope:visiting_location = { is_drylands_or_desert_trigger = no } + } + reference = rain + } + override_background = { + trigger = { + location = { + culture = { has_graphical_east_asia_culture_group_trigger = no } + geographical_region = world_asia_southeast + } + } + reference = holy_site_generic + } + override_background = { reference = courtyard_location } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #If it's our (tired) visiting partner + triggered_animation = { + trigger = { 1040_done_with_church_trigger = yes } + animation = boredom + } + #Concerned about our kid + triggered_animation = { + trigger = { + exists = scope:1040_sickly_minor + is_close_family_of = scope:1040_sickly_minor + OR = { + AND = { + var:return_from_location ?= flag:healer + scope:1040_sickly_minor = { has_any_illness = yes } + } + NOT = { exists = scope:been_to_church_grounds } + } + } + animation = stress + } + #Zealous dudette + triggered_animation = { + trigger = { + scope:visiting_partner = { has_trait = zealous } + } + animation = personality_zealous + } + #Cynical dude + triggered_animation = { + trigger = { + scope:visiting_partner = { has_trait = cynical } + } + animation = personality_cynical + } + #Friendly + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_friendly_traits = yes } + } + animation = personality_forgiving + } + #Business-minded + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_commerce_traits = yes } + } + animation = personality_greedy + } + #Uninterested + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_uninterested_traits = yes } + } + animation = personality_callous + } + #Irrational + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + #A bit awkward + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_standoffish_traits = yes } + } + animation = personality_coward + } + animation = survey + } + center_portrait = { + character = root + #Concerned about our kid + triggered_animation = { + trigger = { + exists = scope:1040_sickly_minor + OR = { + AND = { + var:return_from_location ?= flag:healer + scope:1040_sickly_minor = { has_any_illness = yes } + } + NOT = { exists = scope:been_to_church_grounds } + } + } + animation = worry + } + #Bah, humbug + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + } + } + animation = boredom + } + animation = personality_content + } + #Do we have a Physician? + right_portrait = { + trigger = { + exists = scope:1040_third_character + #If this is root, then that means we have talked to the Physician, so let's disappear the portrait + scope:1040_third_character != root + } + camera = camera_event_scheme_center_forward + character = scope:1040_third_character + #Otherwise it's the Physician + animation = personality_zealous + } + #Shove the Physician as long as we've visited them but haven't actioned them + lower_left_portrait = { + trigger = { + exists = scope:1040_fourth_character + #Unless we've actioned them and overwritten them with ROOT + scope:1040_fourth_character != root + } + character = scope:1040_fourth_character + } + #Show the kid here if not actioned + lower_center_portrait = { + trigger = { + exists = scope:1040_fifth_character + scope:1040_sickly_minor = { has_any_illness = yes } + scope:1040_fifth_character != root + } + character = scope:1040_fifth_character + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Set up the ancillary portraits to remind the player of the characters + if = { + #Physician exists + limit = { + #We've been to them at least once + exists = scope:been_to_physician + #We're not done with them yet + AND = { + exists = scope:laamp_physician_recruit + NOT = { exists = scope:laamp_decision_recruited_physician } + } + #This isn't already the state + NAND = { + exists = scope:1040_fourth_character + scope:1040_fourth_character ?= scope:laamp_physician_recruit + } + } + scope:laamp_physician_recruit = { save_scope_as = 1040_fourth_character } + } + #Clear out the ancillary portrait(s) + if = { + limit = { + exists = scope:1040_fourth_character + scope:laamp_physician_recruit ?= scope:1040_fourth_character + exists = scope:laamp_decision_recruited_physician + } + #Overwrite with ROOT to hide that portrait + save_scope_as = 1040_fourth_character + } + if = { + limit = { + exists = scope:1040_fifth_character + scope:1040_sickly_minor ?= scope:1040_fifth_character + exists = scope:laamp_decision_has_healed + } + #Overwrite with ROOT to hide that portrait + save_scope_as = 1040_fifth_character + } + #Can we _not_ repeat the loc? + 1025_set_and_check_hub_loc_tracker_scope_effect = { HUB = church_grounds } + #Do we have a sick minor we snuck along? + if = { + limit = { + NOT = { exists = scope:1040_sickly_minor } + any_close_family_member = { 1040_sickly_minor_trigger = yes } + } + random_close_family_member = { + limit = { 1040_sickly_minor_trigger = yes } + save_scope_as = 1040_sickly_minor + save_scope_as = 1040_fifth_character + } + } + #Rare: Spawn a spectacular Physician + if = { + limit = { + NOT = { has_variable = laamp_decision_1000_checked_for_physician } + } + random_list = { + 80 = { + #No Physician + } + 20 = { + #Has this person been our physician in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_physician_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_physician_recruit + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_physician + } + #Otherwise find a physician in the pool + if = { + limit = { + NOT = { exists = scope:laamp_physician_recruit } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + has_trait = devoted + learning >= 15 + OR = { + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + } + } + save_scope_as = laamp_physician_recruit + } + } + #Otherwise create a physician + if = { + limit = { + NOT = { exists = scope:laamp_physician_recruit } + } + #Create physician to stuff in pool + create_character = { + template = bp1_yearly_2021_learning_person_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + learning = { decent_skill_rating high_skill_rating } + save_scope_as = laamp_physician_recruit + } + scope:laamp_physician_recruit ?= { + #Chance to add a malus trait to this spectatular being + if = { + limit = { + NOR = { + has_trait = possessed_1 + has_trait = lunatic_1 + has_trait = depressed_1 + has_trait = drunkard + has_trait = hashishiyah + has_trait = irritable + any_secret = { type = secret_witch } + } + } + hidden_effect = { + random = { + chance = 20 + random_list = { + 10 = { add_trait = possessed_1 } + 10 = { add_trait = lunatic_1 } + 10 = { add_trait = depressed_1 } + 10 = { add_trait = drunkard } + 10 = { add_trait = hashishiyah } + 10 = { add_trait = irritable } + 10 = { + add_secret = { type = secret_witch } + } + } + } + } + } + if = { + limit = { + NOT = { has_trait = devoted } + } + add_trait = devoted + } + } + } + scope:laamp_physician_recruit = { save_scope_as = 1040_third_character } + #Remember the physician + 1010_remember_vendor_character_effect = { GUILD = physician CHARACTER = scope:laamp_physician_recruit } + } + } + #No decision-scumming + set_variable = { + name = laamp_decision_1000_checked_for_physician + days = visit_settlement_cooldown_days + } + } + #Make sure we remember the church isn't available because you were a thieving heathen + if = { + limit = { + NOT = { exists = scope:laamp_decision_has_churched } + has_variable = 1040_caught_stealing + } + save_scope_as = laamp_decision_has_churched + } + } + #Attempt to improve your health // OR // Attempt to cure (curable) illness + option = { + name = { + text = { + first_valid = { + #Sickly child is still waiting at the healer's + triggered_desc = { + trigger = { + exists = scope:been_to_healer + exists = scope:1040_sickly_minor + NOT = { exists = scope:laamp_decision_has_healed } + } + desc = ep3_laamp_decision_event.1040.a_second_sickly_minor + } + #Return to healer + triggered_desc = { + trigger = { exists = scope:been_to_healer } + desc = ep3_laamp_decision_event.1040.a_second + } + #We are meeting a sickly child at the healer's + triggered_desc = { + trigger = { exists = scope:1040_sickly_minor } + desc = ep3_laamp_decision_event.1040.a_sickly_minor + } + #First time going to healer + desc = ep3_laamp_decision_event.1040.a + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1040.a.cooldown.tt + NOT = { exists = scope:laamp_decision_has_healed } + } + } + show_as_unavailable = { always = yes } + reason = visit_healer + custom_tooltip = ep3_laamp_decision_event.1040.a.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = church_grounds } + #Go to the Healer screen + trigger_event = ep3_laamp_decision_event.1041 + ai_chance = { base = 100 } + } + #Visit church + option = { + name = { + text = { + first_valid = { + #Return to church + triggered_desc = { + trigger = { exists = scope:been_to_church } + desc = ep3_laamp_decision_event.1040.b_second + } + #First time at church + desc = ep3_laamp_decision_event.1040.b + } + } + } + trigger = { + #You were recently caught stealing from the church + trigger_if = { + limit = { has_variable = 1040_caught_stealing } + custom_tooltip = { + text = caught_stealing.tt + always = no + } + } + trigger_else = { + custom_tooltip = { + text = ep3_laamp_decision_event.1040.b.cooldown.tt + NOT = { exists = scope:laamp_decision_has_churched } + } + } + } + show_as_unavailable = { always = yes } + reason = visit_church + custom_tooltip = ep3_laamp_decision_event.1040.b.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = church_grounds } + #Go to the Church screen + trigger_event = ep3_laamp_decision_event.1043 + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 2 + } + modifier = { + has_trait = pilgrim + factor = 2 + } + } + } + #Convert to local faith // OR // Contemplate faith + option = { + name = { + text = { + first_valid = { + #Convert to faith + triggered_desc = { + trigger = { exists = scope:been_to_garden } + desc = ep3_laamp_decision_event.1040.c_second + } + #Contemplate faith + desc = ep3_laamp_decision_event.1040.c + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1040.c.cooldown.tt + NOT = { exists = scope:laamp_decision_has_gardened } + } + } + show_as_unavailable = { always = yes } + reason = visit_garden + custom_tooltip = ep3_laamp_decision_event.1040.c.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = church_grounds } + #Go to the Garden screen + trigger_event = ep3_laamp_decision_event.1045 + ai_chance = { + base = 100 + modifier = { + stress_level >= 2 + add = 400 + } + } + } + #Rare Option: Hire cheaper, skilled, Physician + option = { + name = { + text = { + first_valid = { + #Return to talk to physician + triggered_desc = { + trigger = { exists = scope:been_to_physician } + desc = ep3_laamp_decision_event.1040.d_second + } + #First time talking to physician + desc = ep3_laamp_decision_event.1040.d + } + } + } + trigger = { + exists = scope:laamp_physician_recruit + NOT = { exists = scope:laamp_decision_recruited_physician } + } + reason = recruit_physician + custom_tooltip = ep3_laamp_decision_event.1040.d.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = church_grounds } + #For the Physician screen + trigger_event = ep3_laamp_decision_event.1047 + ai_chance = { + base = 1000 #Just do it + } + } + #I want to do something else + option = { + name = { + text = { + first_valid = { + #Nothing left to do + triggered_desc = { + trigger = { 1040_done_with_church_trigger = yes } + desc = ep3_laamp_decision_event.1040.e_second + } + #Back to main square + desc = ep3_laamp_decision_event.1040.e + } + } + } + #Have we done everything? Are we closing off the option? + if = { + limit = { 1040_done_with_church_trigger = yes } + #Clean up unnecessary variables and close off the option + 1040_finished_churched_effect = yes + } + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = church_grounds } + #Go back to the main event + 1000_return_to_main_effect = yes + ai_chance = { base = 100 } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:church_grounds } + } +} + + +#Pretty straight forward +scripted_effect 1041_chance_to_buff_item_rarity_effect = { + random_list = { + 20 = { + trigger = { + exists = scope:laamp_healer_character + $VENDOR$ = scope:laamp_healer_character + } + set_artifact_rarity_famed = yes + } + 40 = { + modifier = { + exists = scope:laamp_jeweler_craftsman + $VENDOR$ = scope:laamp_jeweler_craftsman + factor = 2 + } + set_artifact_rarity_masterwork = yes + } + 80 = { + set_artifact_rarity_common = yes + } + } +} + +#Reused effect to set the value variables +scripted_effect 1041_set_item_value_effect = { + #Weapon cost + if = { + limit = { has_variable = 1061_laamp_decision_weapon } + if = { + limit = { rarity = masterwork } + set_variable = { + name = 1061_weapon_value + value = { + value = root.major_gold_value + multiply = { 1 1.5 } + } + } + } + else = { + set_variable = { + name = 1061_weapon_value + value = { + value = root.medium_gold_value + multiply = { 0.75 1.25 } + } + } + } + } + #Armor cost + if = { + limit = { has_variable = 1063_laamp_decision_armor } + if = { + limit = { rarity = masterwork } + set_variable = { + name = 1063_armor_value + value = { + value = root.major_gold_value + multiply = { 1.5 2 } + } + } + } + else = { + set_variable = { + name = 1063_armor_value + value = { + value = root.medium_gold_value + multiply = { 1.25 1.75 } + } + } + } + } + #Accessory cost + if = { + limit = { + OR = { + has_variable = 1041_laamp_decision_health_artifact + has_variable = 1065_laamp_decision_accessory + } + } + if = { + limit = { + rarity = famed + has_variable = 1041_laamp_decision_health_artifact + } + set_variable = { + name = 1065_accessory_value + value = { + value = root.massive_gold_value + multiply = { 1 1.5 } + } + } + } + else_if = { + limit = { rarity = masterwork } + set_variable = { + name = 1065_accessory_value + value = { + value = root.major_gold_value + multiply = { 1.25 1.75 } + } + } + } + else = { + set_variable = { + name = 1065_accessory_value + value = { + value = root.medium_gold_value + multiply = { 1 1.5 } + } + } + } + } +} + +#We return to the church grounds event to peruse other options +scripted_effect 1041_return_to_church_grounds_effect = { + custom_tooltip = ep3_laamp_decision_event.1041.return.tt + trigger_event = ep3_laamp_decision_event.1040 +} + +#Set the correct variable to block off the Healer option and remove the desc flavor variable +scripted_effect 1041_healed_effect = { + scope:1041_health_artifact = { remove_variable ?= 1065_accessory_value } + remove_variable ?= 1041_healer_aptitude + remove_variable ?= 1041_partner_healer_aptitude + save_scope_as = laamp_decision_has_healed + #Go back to church grounds + hidden_effect = { 1041_return_to_church_grounds_effect = yes } +} + +#Determine the variable effect based on their aptitude, one for the healer and one for the physician-partner +scripted_effect 1041_calculate_aptitude_modifier_effect = { + if = { + limit = { + $CHARACTER$ = { + aptitude = { + court_position = court_physician_court_position + value >= 1 + } + } + } + change_variable = { + name = $VARIABLE$ + add = 1 + } + } + if = { + limit = { + $CHARACTER$ = { + aptitude = { + court_position = court_physician_court_position + value >= 2 + } + } + } + change_variable = { + name = $VARIABLE$ + add = 1 + } + } + if = { + limit = { + $CHARACTER$ = { + aptitude = { + court_position = court_physician_court_position + value >= 3 + } + } + } + change_variable = { + name = $VARIABLE$ + add = 1 + } + } + if = { + limit = { + $CHARACTER$ = { + aptitude = { + court_position = court_physician_court_position + value >= 4 + } + } + } + change_variable = { + name = $VARIABLE$ + add = 1 + } + } + if = { + limit = { + $CHARACTER$ = { + aptitude = { + court_position = court_physician_court_position + value >= 5 + } + } + } + change_variable = { + name = $VARIABLE$ + add = 1 + } + } +} + +#The actual removal-of-illness +scripted_effect 1041_remove_illness_or_wound_effect = { + random_list = { + 100 = { + trigger = { has_character_modifier = infected_wound_modifier } + remove_character_modifier = infected_wound_modifier + } + 100 = { + trigger = { has_character_modifier = gangrene_modifier } + remove_character_modifier = gangrene_modifier + } + 100 = { + trigger = { has_trait = wounded_1 } + remove_trait = wounded_1 + } + 100 = { + trigger = { has_trait = wounded_2 } + remove_trait = wounded_2 + } + 100 = { + trigger = { has_trait = wounded_3 } + remove_trait = wounded_3 + } + 100 = { + trigger = { has_trait = ill } + remove_trait = ill + } + 100 = { + trigger = { has_trait = pneumonic } + remove_trait = pneumonic + } + 50 = { + trigger = { has_trait = typhus } + remove_trait = typhus + } + 50 = { + trigger = { has_trait = gout_ridden } + remove_trait = gout_ridden + } + 50 = { + trigger = { has_trait = consumption } + remove_trait = consumption + } + 50 = { + trigger = { has_trait = smallpox } + remove_trait = smallpox + } + 50 = { + trigger = { has_trait = great_pox } + remove_trait = great_pox + } + 25 = { + trigger = { has_trait = cancer } + remove_trait = cancer + } + 25 = { + trigger = { has_trait = bubonic_plague } + remove_trait = bubonic_plague + } + 25 = { + trigger = { has_trait = leper } + remove_trait = leper + } + } +} + +#Do you feel lucky? +scripted_effect 1041_treatment_roll_effect = { + random_list = { + #Failure + 70 = { + #Some weighting based on the aptitude of the performing party (healer/physician-partner) + modifier = { + exists = $VARIABLE$ + $VARIABLE$ >= 5 + add = -15 + } + modifier = { + exists = $VARIABLE$ + $VARIABLE$ >= 4 + add = -15 + } + modifier = { + exists = $VARIABLE$ + $VARIABLE$ >= 3 + add = -15 + } + #Notify us about the outcome + if = { + limit = { + NOT = { $TARGET_CHARACTER$ = root } #If our partner gets treated + } + send_interface_toast = { + type = event_toast_text_bad + title = ep3_laamp_decision_event.1041.treatment_failure.t + desc = ep3_laamp_decision_event.1041.treatment_failure.desc + left_icon = root + right_icon = $TARGET_CHARACTER$ + } + } + else = { + send_interface_toast = { + type = event_toast_text_bad #If we get treated + title = ep3_laamp_decision_event.1041.treatment_failure.t + desc = ep3_laamp_decision_event.1041.treatment_failure.desc + left_icon = root + } + } + #Nothing happens + } + #Success + 30 = { + modifier = { + NOT = { $TARGET_CHARACTER$ = root } #The scoped character is either visiting_partner or sickly_minor + $TARGET_CHARACTER$ = { + age < 20 + is_child_of = root + } + add = 30 + } + modifier = { + NOT = { $TARGET_CHARACTER$ = root } #... a cold-hearted person can tweak this back later on when people complain about too low child mortality rates + $TARGET_CHARACTER$ = { + age < 10 + is_child_of = root + } + add = 30 + } + #If our partner gets treated + if = { + limit = { + NOT = { $TARGET_CHARACTER$ = root } #The scoped character is either visiting_partner or sickly_minor + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamp_decision_event.1041.treatment_success.t + left_icon = root + right_icon = $TARGET_CHARACTER$ + $TARGET_CHARACTER$ = { 1041_remove_illness_or_wound_effect = yes } + } + } + #If we get treated, automatic toast + else = { 1041_remove_illness_or_wound_effect = yes } + } + } +} + +#Someone learn-y or mystic +scripted_trigger 1041_physician_partner_trigger = { + OR = { + learning >= 15 + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + has_trait = witch + } +} + + +#Visit Healer +ep3_laamp_decision_event.1041 = { + type = character_event + title = ep3_laamp_decision_event.1041.t + window = visit_settlement_window + desc = { + #What are they up to? + first_valid = { + #We've returned to this scene, now what + #RETURN: A sick minor... is still here + triggered_desc = { + trigger = { + exists = scope:1040_sickly_minor + exists = scope:been_to_healer + } + desc = ep3_laamp_decision_event.1041.desc_returned_sickly_minor + } + #RETURN: Physician partner wants a stab at it + triggered_desc = { + trigger = { + scope:visiting_partner ?= { + 1041_physician_partner_trigger = yes + 1000_has_illness_or_wound_to_treat_trigger = no + } + exists = scope:been_to_healer + } + desc = ep3_laamp_decision_event.1041.desc_returned_physician_partner + } + #RETURN: Generics + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_healer + scope:healer_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1041.desc_returned_01 + } + triggered_desc = { + trigger = { scope:healer_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1041.desc_returned_02 + } + } + #FIRST TIME: A sick minor was snuck along + triggered_desc = { + trigger = { + exists = scope:1040_sickly_minor + NOT = { exists = scope:been_to_healer } + } + desc = ep3_laamp_decision_event.1041.desc_sickly_minor + } + #FIRST TIME: Our partner is actually pretty physician-y + triggered_desc = { + trigger = { + scope:visiting_partner ?= { + 1041_physician_partner_trigger = yes + 1000_has_illness_or_wound_to_treat_trigger = no + } + NOT = { exists = scope:been_to_healer } + } + desc = ep3_laamp_decision_event.1041.desc_physician_partner + } + #FIRST TIME: We've seen this healer before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_healer_character + NOT = { exists = scope:been_to_healer } + } + desc = ep3_laamp_decision_event.1041.desc_reused_healer + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_healer } + } + desc = ep3_laamp_decision_event.1041.desc + } + } + #Describe the artifact + first_valid = { + #RETURN: Horn artifact + triggered_desc = { + trigger = { + exists = scope:been_to_healer + scope:1041_health_artifact = { has_variable = health_horn } + } + desc = ep3_laamp_decision_event.1041.desc_outro_return_horn + } + #FIRST TIME: Horn artifact + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_healer } + scope:1041_health_artifact = { has_variable = health_horn } + } + desc = ep3_laamp_decision_event.1041.desc_outro_horn + } + #RETURN: Other artifacts + triggered_desc = { + trigger = { + exists = scope:been_to_healer + scope:1041_health_artifact = { + NOT = { has_variable = health_horn } + } + } + desc = ep3_laamp_decision_event.1041.desc_outro_return_artifact + } + #FIRST TIME: Other artifacts + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_healer } + scope:1041_health_artifact = { + NOT = { has_variable = health_horn } + } + } + desc = ep3_laamp_decision_event.1041.desc_outro_artifact + } + } + } + theme = medicine + #Someone close to you is sick + override_sound = { + trigger = { + OR = { + scope:visiting_partner ?= { 1000_has_illness_or_wound_to_treat_trigger = yes } + exists = scope:1040_sickly_minor + } + } + reference = "event:/MUSIC/Cues/Events/Illness/mx_cue_illness" + } + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_medicine" } + override_background = { reference = physicians_study } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #If it's our (tired) visiting partner + triggered_animation = { + trigger = { 1040_done_with_church_trigger = yes } + animation = boredom + } + #Concerned about our kid + triggered_animation = { + trigger = { + exists = scope:1040_sickly_minor + is_close_family_of = scope:1040_sickly_minor + } + animation = stress + } + #Sick dudette + triggered_animation = { + trigger = { 1000_has_illness_or_wound_to_treat_trigger = yes } + animation = pain + } + #Doctor dude + triggered_animation = { + trigger = { 1041_physician_partner_trigger = yes } + animation = ecstasy + } + animation = thinking + } + center_portrait = { + character = root + triggered_animation = { + trigger = { exists = scope:1040_sickly_minor } + animation = worry + } + animation = personality_content + } + right_portrait = { + character = scope:laamp_healer_character + camera = camera_event_scheme_far_right + animation = physician + } + #Do we have a sick minor? + lower_left_portrait = { + trigger = { exists = scope:1040_sickly_minor } + character = scope:1040_sickly_minor + } + artifact = { + target = scope:1041_health_artifact + position = lower_right_portrait + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = healer } + #Find our healer + if = { + #Do we already have a healer? + limit = { + NOT = { exists = scope:laamp_healer_character } + } + #Has this person been our healer in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_healer_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_healer_character + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_healer_character + } + #Otherwise find a healer in the pool + if = { + limit = { + NOT = { exists = scope:laamp_healer_character } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + has_trait = lifestyle_physician + } + save_scope_as = laamp_healer_character + } + } + #Otherwise create a healer + if = { + limit = { + NOT = { exists = scope:laamp_healer_character } + } + #Create healer to stuff in pool + create_character = { + template = physician_high_character_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_healer_character + } + } + #Remember the healer + 1010_remember_vendor_character_effect = { GUILD = healer CHARACTER = scope:laamp_healer_character } + #Find our healing artifact + if = { + limit = { + NOT = { exists = scope:1041_health_artifact } + } + scope:laamp_healer_character ?= { + #Have we created healing artifacts recently, which we can pull? + if = { + limit = { + any_character_artifact ?= { has_variable = 1041_laamp_decision_health_artifact } + } + random_character_artifact = { + limit = { has_variable = 1041_laamp_decision_health_artifact } + save_scope_as = 1041_health_artifact + } + } + #If we don't have any old healing artifacts; generate a new one! + hidden_effect_new_object = { #HAZMAT SUIT OF ERROR SUPRESSION + if = { + limit = { + NOT = { exists = scope:1041_health_artifact } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_healer_character } + #Generate healing artifact + generate_health_trinket_effect = yes + #Finalization + scope:newly_created_health_artifact ?= { + set_variable = { + name = 1041_laamp_decision_health_artifact + days = visit_settlement_cooldown_days + } + #Belt & suspenders + set_variable = 1041_laamp_decision_health_artifact + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1041_health_artifact + } + } + #Set the value of the health artifact + scope:1041_health_artifact = { 1041_set_item_value_effect = yes } + } + } + } + if = { + limit = { + exists = scope:laamp_healer_character + NOT = { has_variable = 1041_healer_aptitude } + } + #Calculate the healer's aptitude + set_variable = { + name = 1041_healer_aptitude + value = 0 + } + 1041_calculate_aptitude_modifier_effect = { CHARACTER = scope:laamp_healer_character VARIABLE = 1041_healer_aptitude } + #Calculate our physician friend's aptitude + if = { + limit = { + scope:visiting_partner ?= { 1041_physician_partner_trigger = yes } + } + set_variable = { + name = 1041_partner_healer_aptitude + value = 0 + } + 1041_calculate_aptitude_modifier_effect = { CHARACTER = scope:visiting_partner VARIABLE = 1041_partner_healer_aptitude } + } + } + } + #For the background + scope:laamp_healer_character = { + if = { + limit = { + is_ruler = no + exists = court_owner + } + court_owner = { save_scope_as = bg_override_char } + } + else = { + save_scope_as = bg_override_char + } + } + } + #Attempt to improve your health // OR // Attempt to cure (curable) illness + option = { + name = { + text = { + first_valid = { + #We're ill + triggered_desc = { + trigger = { 1000_has_illness_or_wound_to_treat_trigger = yes } + desc = ep3_laamp_decision_event.1041.a_ill + } + #Just a standard procedure + desc = ep3_laamp_decision_event.1041.a + } + } + } + #We're ill, roll for some treatment + if = { + limit = { 1000_has_illness_or_wound_to_treat_trigger = yes } + 1041_treatment_roll_effect = { TARGET_CHARACTER = root VARIABLE = var:1041_healer_aptitude } + } + #Standard procedure health modifier + else = { + if = { + limit = { has_character_modifier = laamp_decision_church_health_modifier } + hidden_effect = { remove_character_modifier = laamp_decision_church_health_modifier } + } + add_character_modifier = { + modifier = laamp_decision_church_health_modifier + days = visit_settlement_cooldown_days + } + } + pay_short_term_gold = { + target = scope:laamp_healer_character + gold = minor_gold_value + } + #Set the variables and redirect us back to the Church Grounds + 1041_healed_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < minor_gold_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + 1000_has_illness_or_wound_to_treat_trigger = no + has_character_modifier = laamp_decision_church_health_modifier + factor = 0 + } + } + } + #Buy the health artifact + option = { + name = ep3_laamp_decision_event.1041.b + scope:1041_health_artifact = { + root = { + pay_short_term_gold = { + target = scope:laamp_healer_character + gold = prev.var:1065_accessory_value + } + } + set_owner = root + } + #Set the variables and redirect us back to the Church Grounds + 1041_healed_effect = yes + ai_chance = { + base = 50 + modifier = { + short_term_gold < scope:1041_health_artifact.var:1065_accessory_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Triggered Option: Your partner wants to try their hand at the procedure + option = { + name = ep3_laamp_decision_event.1041.c + trigger = { + scope:visiting_partner ?= { + 1041_physician_partner_trigger = yes + 1000_has_illness_or_wound_to_treat_trigger = no + } + NOT = { exists = scope:1040_sickly_minor } + } + flavor = ep3_laamp_decision_event.1041.c.flavor + #We're ill, roll for some treatment + if = { + limit = { 1000_has_illness_or_wound_to_treat_trigger = yes } + 1041_treatment_roll_effect = { TARGET_CHARACTER = root VARIABLE = var:1041_partner_healer_aptitude } + } + #Standard procedure health modifier + else = { + if = { + limit = { has_character_modifier = laamp_decision_church_health_partner_modifier } + hidden_effect = { remove_character_modifier = laamp_decision_church_health_partner_modifier } + } + add_character_modifier = { + modifier = laamp_decision_church_health_partner_modifier + days = visit_settlement_cooldown_days + } + } + progress_towards_friend_effect = { + REASON = friend_allowed_to_treat + CHARACTER = scope:visiting_partner + OPINION = default_friend_opinion + } + scope:visiting_partner = { + if = { + limit = { + NOT = { has_trait = lifestyle_physician } + } + add_trait = lifestyle_physician + } + else_if = { + limit = { + has_trait = lifestyle_physician + has_trait_xp = { + trait = lifestyle_physician + value < 100 + } + } + add_trait_xp = { + trait = lifestyle_physician + value = 40 + } + } + else = { + add_learning_skill = 1 + } + } + #Set the variables and redirect us back to the Church Grounds + 1041_healed_effect = yes + ai_chance = { base = 200 } + } + #Triggered Option: Your partner or sickly minor is ill + option = { + name = { + text = ep3_laamp_decision_event.1041.d + trigger = { exists = scope:1040_sickly_minor } + } + name = { + text = ep3_laamp_decision_event.1041.d.partner + trigger = { exists = scope:visiting_partner } + } + trigger = { + OR = { + scope:visiting_partner ?= { 1000_has_illness_or_wound_to_treat_trigger = yes } + exists = scope:1040_sickly_minor + } + } + if = { + limit = { exists = scope:1040_sickly_minor } + 1041_treatment_roll_effect = { TARGET_CHARACTER = scope:1040_sickly_minor VARIABLE = var:1041_healer_aptitude } + progress_towards_friend_effect = { + REASON = friend_got_treatment + CHARACTER = scope:1040_sickly_minor + OPINION = default_friend_opinion + } + } + else = { + 1041_treatment_roll_effect = { TARGET_CHARACTER = scope:visiting_partner VARIABLE = var:1041_healer_aptitude } + progress_towards_friend_effect = { + REASON = friend_got_treatment + CHARACTER = scope:visiting_partner + OPINION = default_friend_opinion + } + } + pay_short_term_gold = { + target = scope:laamp_healer_character + gold = minor_gold_value + } + #Set the variables and redirect us back to the Church Grounds + 1041_healed_effect = yes + ai_chance = { + base = 300 + modifier = { + short_term_gold < minor_gold_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #I want to go back + option = { + name = ep3_laamp_decision_event.1041.e + #Sets variables and returns us to church grounds screen + 1031_been_to_effect = { GUILD = healer } + ai_chance = { base = 100 } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:healer } + } +} + + +#Set the correct variable to block off the Church option and remove the desc flavor variable +scripted_effect 1043_churched_effect = { + save_scope_as = laamp_decision_has_churched + #Go back to church grounds + hidden_effect = { 1041_return_to_church_grounds_effect = yes } +} + +#Not really into religion +scripted_trigger 1043_is_unzealous_trigger = { + OR = { + has_trait = cynical + any_secret = { type = secret_non_believer } + } +} + + +#Visit Church +ep3_laamp_decision_event.1043 = { + type = character_event + title = ep3_laamp_decision_event.1043.t + window = visit_settlement_window + desc = { + #What are they up to? + first_valid = { + #We've returned to this scene, now what + #RETURN: Generics + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_church + scope:church_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1043.desc_returned_01 + } + triggered_desc = { + trigger = { scope:church_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1043.desc_returned_02 + } + } + #FIRST TIME: We've seen this NunMonk before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_clergy_character + NOT = { exists = scope:been_to_church } + } + desc = ep3_laamp_decision_event.1043.desc_reused_clergy + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_church } + } + desc = ep3_laamp_decision_event.1043.desc + } + } + #How about some theft + first_valid = { + #RETURN: Longing master thief + triggered_desc = { + trigger = { + scope:visiting_partner ?= { has_court_position = master_thief_camp_officer } + exists = scope:been_to_church + } + desc = ep3_laamp_decision_event.1043.desc_return_outro_thief + } + #RETURN: Outro + triggered_desc = { + trigger = { exists = scope:been_to_church } + desc = ep3_laamp_decision_event.1043.desc_return_outro + } + #FIRST TIME: Longing master thief + triggered_desc = { + trigger = { + scope:visiting_partner ?= { has_court_position = master_thief_camp_officer } + NOT = { exists = scope:been_to_church } + } + desc = ep3_laamp_decision_event.1043.desc_outro_thief + } + #FIRST TIME: Outro + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_church } + } + desc = ep3_laamp_decision_event.1043.desc_outro + } + } + } + theme = faith + override_sound = { reference = "event:/MUSIC/Cues/Events/Sacral Happening/mx_cue_epic_sacral_moment" } + override_background = { reference = temple } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #Master thief + triggered_animation = { + trigger = { has_court_position = master_thief_camp_officer } + animation = scheme + } + #Unzealous + triggered_animation = { + trigger = { 1043_is_unzealous_trigger = yes } + animation = personality_cynical + } + #Zealous + triggered_animation = { + trigger = { + scope:visiting_partner = { has_trait = zealous } + } + animation = ecstasy + } + #Friendly + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_friendly_traits = yes } + } + animation = interested + } + #Business-minded + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_commerce_traits = yes } + } + animation = personality_greedy + } + #Uninterested + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_uninterested_traits = yes } + } + animation = boredom + } + #Irrational + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_irrational_traits = yes } + } + animation = personality_irrational + } + #A bit awkward + triggered_animation = { + trigger = { + scope:visiting_partner = { 1010_has_standoffish_traits = yes } + } + animation = disapproval + } + animation = personality_honorable + } + center_portrait = { + character = root + triggered_animation = { + trigger = { 1043_is_unzealous_trigger = yes } + animation = disapproval + } + animation = personality_content + } + right_portrait = { + character = scope:laamp_clergy_character + animation = personality_forgiving + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #For the background + scope:visiting_location.county.holder = { save_scope_as = bg_override_char } + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = church } + #Find our clergy + if = { + #Do we already have a clergy? + limit = { + NOT = { exists = scope:laamp_clergy_character } + } + #Has this person been our clergy in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + faith = scope:visiting_location.faith + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_clergy_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_clergy_character + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_clergy_character + } + #Otherwise find a clergy in the pool + if = { + limit = { + NOT = { exists = scope:laamp_clergy_character } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + has_trait = devoted + faith = scope:visiting_location.faith + } + save_scope_as = laamp_clergy_character + } + } + #Otherwise create a clergy + if = { + limit = { + NOT = { exists = scope:laamp_clergy_character } + } + #Create clergy to stuff in pool + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + trait = devoted + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_clergy_character + } + } + #Remember the clerger + 1010_remember_vendor_character_effect = { GUILD = clergy CHARACTER = scope:laamp_clergy_character } + } + #How much gold is in the collect; and how difficult is it? + if = { + limit = { + NOT = { exists = scope:1043_collect_gold_value } + } + #Randomize the initial value + set_variable = { + name = 1043_collect_gold_difficulty + value = { + integer_range = { + min = 0 + max = 2 + } + } + } + #Then add difficulty based on how much gold is in the collect + random_list = { + 10 = { + save_scope_value_as = { + name = 1043_collect_gold_value + value = minor_gold_laamps_value + } + change_variable = { + name = 1043_collect_gold_difficulty + add = 1 + } + } + 10 = { + save_scope_value_as = { + name = 1043_collect_gold_value + value = medium_gold_laamps_value + } + change_variable = { + name = 1043_collect_gold_difficulty + add = 2 + } + } + 10 = { + save_scope_value_as = { + name = 1043_collect_gold_value + value = major_gold_laamps_value + } + change_variable = { + name = 1043_collect_gold_difficulty + add = 3 + } + } + } + #Did we go robbing a bunch of churches previously? + if = { + limit = { + has_variable = 1043_heightened_security + exists = var:1043_collect_gold_difficulty + } + change_variable = { + name = 1043_collect_gold_difficulty + add = var:1043_heightened_security + } + + } + #Set the difficulty + if = { + limit = { exists = var:1043_collect_gold_difficulty } + if = { + limit = { var:1043_collect_gold_difficulty >= 5 } + save_scope_value_as = { + name = 1043_collect_gold_difficulty_rating + value = monumentally_high_skill_rating #Had to invent a new difficulty, just for you :hmmyes: + } + } + else_if = { + limit = { var:1043_collect_gold_difficulty = 4 } + save_scope_value_as = { + name = 1043_collect_gold_difficulty_rating + value = extremely_high_skill_rating + } + } + else_if = { + limit = { var:1043_collect_gold_difficulty = 3 } + save_scope_value_as = { + name = 1043_collect_gold_difficulty_rating + value = high_skill_rating + } + } + else_if = { + limit = { var:1043_collect_gold_difficulty = 2 } + save_scope_value_as = { + name = 1043_collect_gold_difficulty_rating + value = medium_skill_rating + } + } + else = { + save_scope_value_as = { + name = 1043_collect_gold_difficulty_rating + value = low_skill_rating + } + } + } + } + } + #Donate some gold for piety + option = { + name = ep3_laamp_decision_event.1043.a + flavor = { + first_valid = { + triggered_desc = { + trigger = { 1043_is_unzealous_trigger = yes } + desc = ep3_laamp_decision_event.1043.a.flavor_unzealous + } + } + } + if = { + limit = { NOT = { exists = var:visit_settlement_church_donation } } + set_variable = { + name = visit_settlement_church_donation + years = visit_settlement_medium_cooldown_year + value = 1 + } + } + else = { + set_local_variable = { + name = visit_settlement_church_donation_temp + value = var:visit_settlement_church_donation + } + set_variable = { + name = visit_settlement_church_donation + years = visit_settlement_medium_cooldown_year + value = { + value = local_var:visit_settlement_church_donation_temp + add = 1 + } + } + } + #Pay gold, feel more pious + pay_short_term_gold = { + target = scope:laamp_clergy_character + gold = minor_gold_value + } + add_piety = visit_settlement_piety_gain_value + #Roll for epiphanous clergy + hidden_effect = { + scope:laamp_clergy_character = { + random_list = { + 95 = { + modifier = { + has_trait = possessed_1 + factor = 0.5 + } + #Nothing happens + } + 5 = { + modifier = { + piety_level = high_piety_level + add = 5 + } + modifier = { + piety_level = very_high_piety_level + add = 5 + } + modifier = { + piety_level = max_piety_level + add = 5 + } + set_variable = 1043_is_epiphanous + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + zealous = minor_stress_impact_loss + generous = minor_stress_impact_loss + improvident = medium_stress_impact_loss #Throw 'em a bone + } + trigger_event = ep3_laamp_decision_event.1044 + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + factor = 0 + } + modifier = { + short_term_gold < minor_gold_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Ask for blessing + option = { + name = ep3_laamp_decision_event.1043.b + trigger = { + NOR = { + has_character_modifier = laamp_decision_church_blessing_stress_loss_modifier + has_character_modifier = laamp_decision_church_blessing_stress_gain_modifier + piety_level < low_piety_level + } + } + show_as_unavailable = { always = yes } + reason = piety + #Pokémon blue? + add_character_modifier = { + modifier = laamp_decision_church_blessing_stress_loss_modifier + years = 5 + } + #Set the variables and redirect us back to the Church Grounds + 1043_churched_effect = yes + ai_chance = { + base = 200 + modifier = { + piety_level > medium_piety_level + add = 300 + } + } + } + #'Borrow' gold from the collect + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:visiting_partner ?= { has_court_position = master_thief_camp_officer } + } + desc = ep3_laamp_decision_event.1043.c_master_thief + } + triggered_desc = { + trigger = { has_variable = 1043_heightened_security } + desc = ep3_laamp_decision_event.1043.c_guarded + } + desc = ep3_laamp_decision_event.1043.c + } + } + } + trigger = { is_ai = no } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + has_variable = 1043_heightened_security + var:1043_heightened_security != 0 + } + desc = ep3_laamp_decision_event.1043.c.flavor_guarded + } + desc = ep3_laamp_decision_event.1043.c.flavor + } + } + duel = { + skill = intrigue + value = scope:1043_collect_gold_difficulty_rating + #Success: Coin! + 50 = { + modifier = { + scope:visiting_partner ?= { has_court_position = master_thief_camp_officer } + factor = 2 + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 10 + desc = ep3_laamp_decision_event.1043.c.thievery_success.desc + send_interface_toast = { + title = ep3_laamp_decision_event.1043.c.thievery_success.t + left_icon = root + add_gold = scope:1043_collect_gold_value + } + hidden_effect = { + #... fool me twice; shame on you. + if = { + limit = { has_variable = 1043_heightened_security } + random_list = { + 50 = { + #Nothing + } + 50 = { + #Save old value as temp + set_variable = { + name = 1043_heightened_security_temp + value = var:1043_heightened_security + } + #Remove the variable we'll refresh + remove_variable ?= 1043_heightened_security + #Set the new proper variable and add the old value as well + set_variable = { + name = 1043_heightened_security + value = { + value = var:1043_heightened_security_temp + add = 1 + } + years = visit_settlement_medium_cooldown_year + } + #Then remove the temp + remove_variable ?= 1043_heightened_security_temp + } + } + } + #Fool me once, shame on me... + else = { + set_variable = { + name = 1043_heightened_security + value = 0 + years = visit_settlement_medium_cooldown_year + } + } + } + } + #Failure: Banished! + 50 = { + modifier = { + scope:visiting_partner ?= { has_court_position = master_thief_camp_officer } + factor = 0.5 + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + desc = ep3_laamp_decision_event.1043.c.thievery_failure.desc + send_interface_toast = { + type = event_toast_text_bad + title = ep3_laamp_decision_event.1043.c.thievery_failure.t + desc = ep3_laamp_decision_event.1043.c.thievery_failure.desc + left_icon = root + custom_tooltip = ep3_laamp_decision_event.1041.return.tt + #Shame on you + add_piety = medium_piety_loss + #Shame shame + if = { + limit = { + NOT = { has_trait = gallowsbait } + } + add_trait = gallowsbait + } + else_if = { + limit = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = thief + value < 100 + } + } + add_trait_xp = { + trait = gallowsbait + track = thief + value = small_lifestyle_random_xp_low + } + } + } + #You will not be going back to the church any time soon + set_variable = { + name = 1040_caught_stealing + days = visit_settlement_small_cooldown_days + } + } + #Critical Failure: The local guards are summoned + 10 = { + trigger = { + trigger_if = { + limit = { exists = scope:visiting_partner } + NOT = { + scope:visiting_partner = { has_court_position = master_thief_camp_officer } + } + } + trigger_else = { always = yes } + } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + min = 5 + desc = ep3_laamp_decision_event.1043.c.thievery_critical_failure.desc + send_interface_toast = { + title = ep3_laamp_decision_event.1043.c.thievery_critical_failure.t + left_icon = root + #Quite the tussle + increase_wounds_effect = { REASON = fight } + #Shame on you + add_piety = medium_piety_loss + #Violent shame, even + if = { + limit = { + NOT = { has_trait = gallowsbait } + } + add_trait = gallowsbait + } + else_if = { + limit = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = bandit + value < 100 + } + } + add_trait_xp = { + trait = gallowsbait + track = bandit + value = small_lifestyle_random_xp_mid + } + } + } + #You will not be going back to the church any time soon + set_variable = { + name = 1040_caught_stealing + days = visit_settlement_small_cooldown_days + } + } + } + #Super-stressful for honest characters and zealous characters, IF you share faith + if = { + limit = { scope:visiting_location.county.faith = root.faith } + stress_impact = { + honest = major_stress_impact_gain + zealous = major_stress_impact_gain + deceitful = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + } + else = { + stress_impact = { + honest = major_stress_impact_gain + deceitful = minor_stress_impact_loss + } + } + #Set the variables and redirect us back to the Church Grounds + 1043_churched_effect = yes + } + #I want to go back + option = { + name = ep3_laamp_decision_event.1043.d + #Sets variables and returns us to church grounds screen + 1031_been_to_effect = { GUILD = church } + ai_chance = { base = 200 } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:church } + } +} + +#Post-Donation +ep3_laamp_decision_event.1044 = { + type = character_event + title = ep3_laamp_decision_event.1043.t + window = visit_settlement_window + desc = { + first_valid = { + #Strange person thinks you're a reincarnation or something? Why not. + triggered_desc = { + trigger = { + scope:laamp_clergy_character = { has_variable = 1043_is_epiphanous } + } + desc = ep3_laamp_decision_event.1044.desc_epiphany + } + desc = ep3_laamp_decision_event.1044.desc + } + } + theme = faith + override_sound = { + trigger = { + scope:laamp_clergy_character = { has_variable = 1043_is_epiphanous } + } + reference = "event:/DLC/FP4/MUSIC/Stingers/mx_stinger_legends_lvl_03" + } + override_sound = { reference = "event:/MUSIC/Cues/Events/Low Key Positive/mx_cue_low_key_postive" } + override_background = { reference = temple } + override_effect_2d = { + trigger = { + scope:laamp_clergy_character = { has_variable = 1043_is_epiphanous } + } + reference = legend_glow #Too much? + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:laamp_clergy_character = { has_variable = 1043_is_epiphanous } + } + animation = disbelief + } + triggered_animation = { + trigger = { 1043_is_unzealous_trigger = yes } + animation = shock + } + animation = admiration + } + right_portrait = { + character = scope:laamp_clergy_character + triggered_animation = { + trigger = { has_variable = 1043_is_epiphanous } + animation = shock + } + animation = happiness + } + #Do we have someone to display? + lower_left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + hidden_effect = { + scope:laamp_clergy_character = { + if = { + limit = { has_variable = 1043_is_epiphanous } + add_trait = loyal + add_trait = holy_warrior + } + } + } + } + #Ask for blessing + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:laamp_clergy_character = { has_variable = 1043_is_epiphanous } + } + desc = ep3_laamp_decision_event.1044.a_epiphany + } + desc = ep3_laamp_decision_event.1044.a + } + } + } + trigger = { + NOR = { + has_character_modifier = laamp_decision_church_blessing_stress_loss_modifier + has_character_modifier = laamp_decision_church_blessing_stress_gain_modifier + piety_level < low_piety_level + } + } + show_as_unavailable = { always = yes } + reason = piety + #Or Pokémon red? + add_character_modifier = { + modifier = laamp_decision_church_blessing_stress_gain_modifier + years = 5 + } + ai_chance = { + base = 100 + modifier = { + piety_level > medium_piety_level + add = 300 + } + } + } + #Triggered Option: Clergy Person wants to join your camp + option = { + name = ep3_laamp_decision_event.1044.b + trigger = { + scope:laamp_clergy_character = { has_variable = 1043_is_epiphanous } + } + add_courtier = scope:laamp_clergy_character + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 0 + } + } + } + #Nah + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:laamp_clergy_character = { has_variable = 1043_is_epiphanous } + } + desc = ep3_laamp_decision_event.1044.c_epiphany + } + desc = ep3_laamp_decision_event.1044.c + } + } + } + #Tooltip so we know where we're going + custom_tooltip = ep3_laamp_decision_event.1041.return.tt + ai_chance = { + base = 100 + } + } + after = { + #Set the variables and redirect us back to the Church Grounds + 1043_churched_effect = yes + } +} + + +#Set the correct variable to block off the Garden option and remove the desc flavor variable +scripted_effect 1045_gardened_effect = { + save_scope_as = laamp_decision_has_gardened + #Go back to church grounds + hidden_effect = { 1041_return_to_church_grounds_effect = yes } +} + +#Right? +scripted_trigger 1045_probably_knows_gardening_trigger = { + OR = { + has_trait = lifestyle_gardener + has_trait = lifestyle_herbalist + learning > high_skill_rating + } +} + +#Used in enough places to warrant a trigger +scripted_trigger 1045_could_harvest_garden_trigger = { + OR = { + trigger_if = { + limit = { exists = scope:visiting_partner } + scope:visiting_partner = { 1045_probably_knows_gardening_trigger = yes } + } + 1045_probably_knows_gardening_trigger = yes + } +} + +#Ditto +scripted_trigger 1045_could_unwind_in_garden_trigger = { + scope:visiting_partner ?= { + OR = { + AND = { + has_relation_potential_lover = root + root = { might_cheat_on_every_partner_trigger = yes } + } + has_relation_lover = root + } + } +} + + +#Visit Garden +ep3_laamp_decision_event.1045 = { + type = character_event + title = ep3_laamp_decision_event.1045.t + window = visit_settlement_window + desc = { + #What's going down in the garden + first_valid = { + #We've returned to this scene, now what + #RETURN: Generics + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_garden + scope:garden_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1045.desc_returned_01 + } + triggered_desc = { + trigger = { scope:garden_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1045.desc_returned_02 + } + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_garden } + } + desc = ep3_laamp_decision_event.1045.desc + } + } + #Hey look, some plants + first_valid = { + #RETURN: Still partner plants + triggered_desc = { + trigger = { + scope:visiting_partner ?= { 1045_probably_knows_gardening_trigger = yes } + exists = scope:been_to_garden + } + desc = ep3_laamp_decision_event.1045.desc_outro_return_partner + } + #RETURN: Still plants + triggered_desc = { + trigger = { + 1045_probably_knows_gardening_trigger = yes + exists = scope:been_to_garden + } + desc = ep3_laamp_decision_event.1045.desc_outro_return_gardener + } + #FIRST TIME: Partner PLAAANTSSS + triggered_desc = { + trigger = { + scope:visiting_partner ?= { 1045_probably_knows_gardening_trigger = yes } + NOT = { exists = scope:been_to_garden } + } + desc = ep3_laamp_decision_event.1045.desc_outro_partner + } + #FIRST TIME: PLAAANTSSS + triggered_desc = { + trigger = { + 1045_probably_knows_gardening_trigger = yes + NOT = { exists = scope:been_to_garden } + } + desc = ep3_laamp_decision_event.1045.desc_outro_gardener + } + } + } + theme = faith + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_health_good" } + override_background = { reference = garden } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + triggered_animation = { + trigger = { + NOT = { has_variable = 1045_has_harvested_recently } + 1045_probably_knows_gardening_trigger = yes + } + animation = survey + } + animation = happiness + } + center_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { has_variable = 1045_has_harvested_recently } + scope:visiting_partner ?= { 1045_probably_knows_gardening_trigger = yes } + } + animation = interested + } + triggered_animation = { + trigger = { 1045_probably_knows_gardening_trigger = yes } + animation = survey + } + triggered_animation = { + trigger = { faith != scope:visiting_location.faith } + animation = stress + } + animation = thinking + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #For the background + scope:visiting_location.county.holder = { save_scope_as = bg_override_char } + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = garden } + } + #Convert / contemplate faith + option = { + name = { + text = { + first_valid = { + #Convert to faith + triggered_desc = { + trigger = { + faith != scope:visiting_location.faith + } + desc = ep3_laamp_decision_event.1045.a_convert + } + #Contemplate faith + desc = ep3_laamp_decision_event.1045.a + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1045.a.cooldown.tt + NOT = { has_variable = 1045_contemplated_garden_recently } + } + } + show_as_unavailable = { always = yes } + #Convert + if = { + limit = { + faith != scope:visiting_location.faith + } + set_character_faith = scope:visiting_location.faith + stress_impact = { + base = minor_stress_impact_loss + zealous = major_stress_impact_gain + } + } + #Contemplate faith + else = { + stress_impact = { + base = medium_stress_impact_loss + content = minor_stress_impact_loss + zealous = medium_stress_impact_loss + } + } + #Cooldown for the action + set_variable = { + name = 1045_contemplated_garden_recently + days = visit_settlement_minimum_cooldown_days + } + #Set the variables and redirect us back to the Church Grounds + 1045_gardened_effect = yes + ai_chance = { + base = 100 + modifier = { + faith != scope:visiting_location.faith + has_trait = zealous + factor = 0 + } + modifier = { + faith != scope:visiting_location.faith + any_secret ?= { secret_type = secret_non_believer } + add = 300 + } + } + } + #Triggered Option: Those plants look edible + option = { + name = { + text = { + first_valid = { + #Gardener friend + triggered_desc = { + trigger = { + scope:visiting_partner ?= { 1045_probably_knows_gardening_trigger = yes } + } + desc = ep3_laamp_decision_event.1045.b_partner + } + #Gardener self + desc = ep3_laamp_decision_event.1045.b + } + } + } + trigger = { + trigger_if = { + limit = { has_variable = 1045_has_harvested_recently } + custom_tooltip = { + text = ep3_laamp_decision_event.1045.b.cooldown.tt + always = no + } + } + trigger_else = { 1045_could_harvest_garden_trigger = yes } + } + show_as_unavailable = { + #Only show it if you could've actually done it + trigger_if = { + limit = { 1045_could_harvest_garden_trigger = yes } + always = yes + } + trigger_else = { always = no } + } + #Get some provisions + if = { + limit = { + domicile ?= { provisions < max_provisions } + } + domicile ?= { + change_provisions = { + value = { + value = root.minor_gold_laamps_value + multiply = { + value = max_provisions + divide = 250 + round = yes + min = 1 + } + } + } + } + } + #... or sell the morsels, if capped + else = { add_gold = minor_gold_laamps_value } + #Probably holy somewhere + if = { + limit = { + faith = { + OR = { + has_doctrine = tenet_sanctity_of_nature + trait_is_virtue = lifestyle_gardener + trait_is_virtue = lifestyle_herbalist + } + } + } + add_piety = medium_piety_gain + } + #Cooldown for the action + set_variable = { + name = 1045_has_harvested_recently + days = visit_settlement_minimum_cooldown_days + } + #Set the variables and redirect us back to the Church Grounds + 1045_gardened_effect = yes + ai_chance = { + base = 1000 #Just do it + } + } + #Triggered Option: Stress relief? Stress relief. + option = { + name = ep3_laamp_decision_event.1045.c + trigger = { + trigger_if = { + limit = { has_variable = 1045_garden_unwinded_recently } + custom_tooltip = { + text = ep3_laamp_decision_event.1045.c.cooldown.tt + always = no + } + } + trigger_else = { 1045_could_unwind_in_garden_trigger = yes } + } + show_as_unavailable = { + #Only show it if you could've actually done it + trigger_if = { + limit = { 1045_could_unwind_in_garden_trigger = yes } + always = yes + } + trigger_else = { always = no } + } + #Stress relief + had_sex_with_effect = { CHARACTER = scope:visiting_partner PREGNANCY_CHANCE = pregnancy_chance } + progress_towards_lover_effect = { + CHARACTER = scope:visiting_partner + REASON = lover_contemplative_sex + OPINION = default_lover_opinion + } + #Probably holy to some? + if = { + limit = { + faith = { has_doctrine = tenet_carnal_exaltation } + } + add_piety = medium_piety_gain + } + #Or not + else_if = { + limit = { + faith = { + OR = { + trait_is_sin = lustful + trait_is_sin = rakish + trait_is_sin = seducer + } + } + } + add_piety = minor_piety_loss + } + #Cooldown for the action + set_variable = { + name = 1045_garden_unwinded_recently + days = visit_settlement_minimum_cooldown_days + } + #Stress loss with some factors + stress_impact = { + base = medium_stress_impact_loss + rakish = medium_stress_impact_loss + seducer = minor_stress_impact_loss + lustful = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + chaste = minor_stress_impact_gain + } + #Set the variables and redirect us back to the Church Grounds + 1045_gardened_effect = yes + ai_chance = { + base = 100 + modifier = { + has_trait = lustful + add = 500 + } + modifier = { + has_trait = rakish + add = 500 + } + modifier = { + has_trait = chaste + factor = 0 + } + } + } + #I want to go back + option = { + name = ep3_laamp_decision_event.1045.d + #Everything is on cooldown, I guess + if = { + limit = { + has_variable = 1045_contemplated_garden_recently + trigger_if = { + limit = { 1045_could_harvest_garden_trigger = yes } + has_variable = 1045_has_harvested_recently + } + trigger_if = { + limit = { 1045_could_unwind_in_garden_trigger = yes } + has_variable = 1045_garden_unwinded_recently + } + } + 1045_gardened_effect = yes + } + else = { + #Sets variables and returns us to church grounds screen + 1031_been_to_effect = { GUILD = garden } + } + ai_chance = { base = 100 } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:garden } + } +} + + +#Hire the Physician, show/set the effects and variables +scripted_effect 1047_hire_physician_effect = { + hidden_effect = { + reverse_add_opinion = { + target = scope:laamp_physician_recruit + modifier = recruited_me_opinion + opinion = 30 + } + } + add_courtier = scope:laamp_physician_recruit + #The actual effect happens in after + show_as_tooltip = { + court_position_grant_effect = { + EMPLOYER = root + POS = court_physician + CANDIDATE = scope:laamp_physician_recruit + } + } + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_recruited_physician + value = flag:yes + } + #Go back to church grounds + hidden_effect = { 1041_return_to_church_grounds_effect = yes } +} + + +#Visit Physician +ep3_laamp_decision_event.1047 = { + type = character_event + title = ep3_laamp_decision_event.1047.t + window = visit_settlement_window + desc = { + #What're they doing? + first_valid = { + #We've returned to this scene, now what + #RETURN: + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_physician + scope:physician_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1047.desc_returned_01 + } + triggered_desc = { + trigger = { scope:physician_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1047.desc_returned_02 + } + triggered_desc = { + trigger = { scope:physician_loc_tracker ?= 2 } + desc = ep3_laamp_decision_event.1047.desc_returned_03 + } + } + #FIRST TIME: We've seen this physician before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_physician + NOT = { exists = scope:been_to_physician } + } + desc = ep3_laamp_decision_event.1047.desc_reused_physician + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_physician } + } + desc = ep3_laamp_decision_event.1047.desc + } + } + } + theme = learning + override_sound = { reference = "event:/MUSIC/Cues/Events/Positive/mx_cue_postive_effect" } + override_background = { reference = location_study } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + triggered_animation = { + trigger = { 1041_physician_partner_trigger = yes } + animation = interested + } + animation = personality_compassionate + } + center_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:laamp_physician_recruit + camera = camera_event_scheme_far_right + animation = reading + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Run this once: Re-save the portrait so the Physician is not the 1040_third_character (since they narratively moved to their study) + if = { + limit = { scope:1040_third_character = scope:laamp_physician_recruit } + #Overwrite with ROOT to block off the portrait + save_scope_as = 1040_third_character + #Remember the bodyguard + 1010_remember_vendor_character_effect = { GUILD = physician CHARACTER = scope:laamp_physician_recruit } + } + #Can we _not_ repeat the loc? + 1025_set_and_check_hub_loc_tracker_scope_effect = { HUB = physician } + } + #Pay gold + option = { + name = ep3_laamp_decision_event.1047.a + pay_short_term_gold = { + target = scope:laamp_physician_recruit + gold = minor_gold_value + } + #Wrap effect to hire 'em, set scope & return to church + 1047_hire_physician_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < minor_gold_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Have x piety + option = { + name = ep3_laamp_decision_event.1047.b + trigger = { piety >= 1000 } + show_as_unavailable = { always = yes } + reason = piety + #Wrap effect to hire 'em, set scope & return to church + 1047_hire_physician_effect = yes + ai_chance = { + base = 1000 #Just do it + } + } + #Learning duel + option = { + name = ep3_laamp_decision_event.1047.c + duel = { + skill = learning + value = average_skill_rating + #Success: Hire 'em up + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + OR = { + has_trait = scholar + has_trait = whole_of_body + has_trait = crusader_king + } + factor = 2 + } + desc = ep3_laamp_decision_event.1047.c.success + send_interface_toast = { + title = ep3_laamp_decision_event.1047.c.success + left_icon = root + right_icon = scope:laamp_physician_recruit + #Yippee! + 1047_hire_physician_effect = yes + } + } + #Failure: Bye, now + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + modifier = { + has_trait = zealous + factor = 0.5 + } + desc = ep3_laamp_decision_event.1047.c.failure + send_interface_toast = { + type = event_toast_text_bad + title = ep3_laamp_decision_event.1047.c.failure + desc = ep3_laamp_decision_event.1047.c.failure.tt + left_icon = root + right_icon = scope:laamp_physician_recruit + #Oh well + custom_tooltip = ep3_laamp_decision_event.1047.c.failure.tt + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_recruited_physician + value = flag:no + } + 1041_return_to_church_grounds_effect = yes + } + } + } + ai_chance = { + base = 100 + modifier = { + piety >= 1000 + factor = 0 + } + } + } + #I want to go back + option = { + name = ep3_laamp_decision_event.1047.d + #Sets variables and returns us to church grounds screen + 1031_been_to_effect = { GUILD = physician } + ai_chance = { + base = 100 + modifier = { + employs_court_position = court_physician_court_position + factor = 2 + } + } + } + after = { + if = { + limit = { scope:laamp_decision_recruited_physician ?= flag:yes } + #Appoint them + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:laamp_physician_recruit + COURT_POS = court_physician_court_position + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = court_physician + CANDIDATE = scope:laamp_physician_recruit + } + } + } + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:physician } + } +} + + + +###################################################################### +# CASTLE GROUNDS +# ep3_laamp_decision_event.1050 +###################################################################### + +#Set the correct variable to block off the Castle option and remove the desc flavor variable +scripted_effect 1050_finished_castle_effect = { + remove_list_variable = { + name = list_of_options + target = flag:has_castle_option + } + save_scope_as = laamp_decision_finished_castle_option +} + +#Can reinforce MaA +scripted_trigger 1050_has_maa_to_reinforce_trigger = { + any_maa_regiment ?= { maa_current_troops_count < maa_max_troops_count } +} + +#Nothing left for us to do +scripted_trigger 1050_done_with_castle_trigger = { + exists = scope:laamp_decision_has_trained + exists = scope:laamp_decision_has_garrisoned + trigger_if = { + limit = { 1050_has_maa_to_reinforce_trigger = yes } + exists = scope:laamp_decision_has_reinforced + } + trigger_if = { + limit = { exists = scope:laamp_bodyguard_recruit } + exists = scope:laamp_decision_recruited_bodyguard + } +} + + +#Castle Holding: Visit the local castle grounds +ep3_laamp_decision_event.1050 = { + type = character_event + title = ep3_laamp_decision_event.1050.t + window = visit_settlement_window + desc = { + #Intro + first_valid = { + #We've returned to this scene, now what + #RETURN: We've returned from Main Square + random_valid = { + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + exists = scope:been_to_castle_grounds + OR = { + scope:castle_loc_tracker ?= 0 + scope:castle_loc_tracker ?= 2 + } + } + desc = ep3_laamp_decision_event.1050.desc_returned_01 + } + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + scope:castle_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1050.desc_returned_02 + } + } + #RETURN: We've returned from the Training ground + triggered_desc = { + trigger = { var:return_from_location ?= flag:training } + desc = ep3_laamp_decision_event.1050.desc_returned_from_training + } + #RETURN: We've returned from the Garrison + triggered_desc = { + trigger = { var:return_from_location ?= flag:garrison } + desc = ep3_laamp_decision_event.1050.desc_returned_from_garrison + } + #RETURN: We've returned from the Reinforcers + triggered_desc = { + trigger = { var:return_from_location ?= flag:reinforcers } + desc = ep3_laamp_decision_event.1050.desc_returned_from_reinforcers + } + #RETURN: We've returned from the Bodyguard + triggered_desc = { + trigger = { var:return_from_location ?= flag:bodyguard } + desc = ep3_laamp_decision_event.1050.desc_returned_from_bodyguard + } + #FIRST TIME: First time here + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_castle_grounds } + } + desc = ep3_laamp_decision_event.1050.desc + } + } + #Mid - MaA option or not? + first_valid = { + #FIRST TIME: Yup, we can reinforce MaA + triggered_desc = { + trigger = { + 1050_has_maa_to_reinforce_trigger = yes + NOT = { exists = scope:been_to_castle_grounds } + } + desc = ep3_laamp_decision_event.1050.mid_maa + } + #FIRST TIME: Nope, no MaA to reinforce + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_castle_grounds } + } + desc = ep3_laamp_decision_event.1050.mid_no_maa + } + } + #Outro + first_valid = { + #FIRST TIME: First time here, look at the bodyguard + triggered_desc = { + trigger = { + exists = scope:laamp_bodyguard_recruit + NOT = { exists = scope:been_to_castle_grounds } + } + desc = ep3_laamp_decision_event.1050.desc_outro_bodyguard + } + #FIRST TIME: First time here, curious partner + triggered_desc = { + trigger = { + exists = scope:visiting_partner + NOT = { exists = scope:been_to_castle_grounds } + } + desc = ep3_laamp_decision_event.1050.desc_outro_partner + } + #FIRST TIME: First time here + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_castle_grounds } + } + desc = ep3_laamp_decision_event.1050.desc_outro + } + #RETURN: Partner - there is nothing left for us here + triggered_desc = { + trigger = { + exists = scope:visiting_partner + 1050_done_with_castle_trigger = yes + } + desc = ep3_laamp_decision_event.1050.desc_outro_return_partner_finished + } + #RETURN: There is nothing left for us here + triggered_desc = { + trigger = { 1050_done_with_castle_trigger = yes } + desc = ep3_laamp_decision_event.1050.desc_outro_return_finished + } + #RETURN: Bodyguard did not deviate, yet + triggered_desc = { + trigger = { + exists = scope:laamp_bodyguard_recruit + NOR = { + exists = scope:been_to_bodyguard + exists = scope:laamp_decision_recruited_bodyguard + } + } + desc = ep3_laamp_decision_event.1050.desc_outro_bodyguard_return + } + #RETURN: We've been here before + random_valid = { + #RETURN: Partner flavor + triggered_desc = { + trigger = { + exists = scope:visiting_partner + exists = scope:been_to_castle_grounds + scope:castle_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1050.desc_outro_return_partner_01 + } + triggered_desc = { + trigger = { + exists = scope:visiting_partner + scope:castle_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1050.desc_outro_return_partner_02 + } + triggered_desc = { + trigger = { + exists = scope:visiting_partner + scope:castle_loc_tracker ?= 2 + } + desc = ep3_laamp_decision_event.1050.desc_outro_return_partner_03 + } + #RETURN: Generics + triggered_desc = { + trigger = { + exists = scope:been_to_castle_grounds + scope:castle_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1050.desc_outro_return_01 + } + triggered_desc = { + trigger = { scope:castle_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1050.desc_outro_return_02 + } + triggered_desc = { + trigger = { scope:castle_loc_tracker ?= 2 } + desc = ep3_laamp_decision_event.1050.desc_outro_return_03 + } + } + } + } + theme = martial + #Get outta here already + override_effect_2d = { + trigger = { + 1050_done_with_castle_trigger = yes + scope:visiting_location = { is_drylands_or_desert_trigger = no } + } + reference = rain + } + override_background = { + trigger = { + scope:visiting_location = { + geographical_region = world_europe + NOT = { geographical_region = world_europe_west_iberia } + } + } + reference = gallows + } + override_background = { reference = ep3_city_gate } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #If it's our (tired) visiting partner + triggered_animation = { + trigger = { 1050_done_with_castle_trigger = yes } + animation = boredom + } + animation = survey + } + center_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:laamp_bodyguard_recruit + NOR = { + exists = scope:been_to_bodyguard + exists = scope:laamp_decision_recruited_bodyguard + } + } + animation = interested + } + triggered_animation = { + trigger = { prowess < average_skill_rating } + animation = personality_coward + } + animation = personality_bold + } + #Do we have someone to display? + right_portrait = { + trigger = { + exists = scope:1050_third_character + #If this is root, then that means we have talked to the Bodyguard, so let's disappear the portrait + scope:1050_third_character != root + } + character = scope:1050_third_character + camera = camera_event_scheme_vs_extra_right_look_right + #We've returned here and it's still the bodyguard + triggered_animation = { + trigger = { exists = scope:been_to_castle_grounds } + animation = disapproval + } + #Otherwise some seething to go + animation = rage + } + lower_left_portrait = { + trigger = { + exists = scope:1050_fourth_character + scope:1050_fourth_character != root + } + character = scope:1050_fourth_character + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Set up the ancillary portraits to remind the player of the characters + if = { + #Bodyguard exists + limit = { + #We've been to them at least once + exists = scope:been_to_bodyguard + #We're not done with them yet + AND = { + exists = scope:laamp_bodyguard_recruit + NOT = { exists = scope:laamp_decision_recruited_bodyguard } + } + #This isn't already the state + NAND = { + exists = scope:1050_fourth_character + scope:1050_fourth_character ?= scope:laamp_bodyguard_recruit + } + } + scope:laamp_bodyguard_recruit = { save_scope_as = 1050_fourth_character } + } + #Clear out the ancillary portrait(s) + if = { + limit = { + exists = scope:1050_fourth_character + scope:laamp_bodyguard_recruit ?= scope:1050_fourth_character + exists = scope:laamp_decision_recruited_bodyguard + } + #Overwrite with ROOT to hide that portrait + save_scope_as = 1050_fourth_character + } + #Can we _not_ repeat the loc? + 1025_set_and_check_hub_loc_tracker_scope_effect = { HUB = castle } + #Rare: Spawn a spectacular Bodyguard + if = { + limit = { + NOT = { has_variable = laamp_decision_1000_checked_for_bodyguard } + } + random_list = { + 80 = { + #No Bodyguard + } + 20 = { + #Has this person been our bodyguard in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_bodyguard_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:saved_character_check } + } + save_scope_as = laamp_bodyguard_recruit + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_bodyguard + } + #Otherwise find a bodyguard in the pool + if = { + limit = { + NOT = { exists = scope:laamp_bodyguard_recruit } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + is_available_healthy_adult = yes + prowess > 15 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this } + } + save_scope_as = laamp_bodyguard_recruit + } + } + #Otherwise create a bodyguard + if = { + limit = { + NOT = { exists = scope:laamp_bodyguard_recruit } + } + #Create bodyguard to stuff in pool + create_character = { + template = bp1_yearly_2021_martial_person_template + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + prowess = { decent_skill_rating high_skill_rating } + save_scope_as = laamp_bodyguard_recruit + } + scope:laamp_bodyguard_recruit ?= { + #Chance to add a malus trait to this spectatular being + if = { + limit = { + NOR = { + has_trait = possessed_1 + has_trait = lunatic_1 + has_trait = depressed_1 + has_trait = drunkard + has_trait = hashishiyah + has_trait = irritable + } + } + hidden_effect = { + random = { + chance = 20 + random_list = { + 10 = { add_trait = possessed_1 } + 10 = { add_trait = lunatic_1 } + 10 = { add_trait = depressed_1 } + 10 = { add_trait = drunkard } + 10 = { add_trait = hashishiyah } + 10 = { add_trait = irritable } + } + } + } + } + } + } + scope:laamp_bodyguard_recruit = { save_scope_as = 1050_third_character } + } + } + #No decision-scumming + set_variable = { + name = laamp_decision_1000_checked_for_bodyguard + days = visit_settlement_cooldown_days + } + } + } + #Train prowess + option = { + name = { + text = { + first_valid = { + #Return to the training grounds + triggered_desc = { + trigger = { exists = scope:been_to_training } + desc = ep3_laamp_decision_event.1050.a_second + } + #First time at the training grounds + desc = ep3_laamp_decision_event.1050.a + } + } + } + trigger = { + #Recruited the Master of Arms + trigger_if = { + limit = { + exists = scope:laamp_disgruntled_moa + scope:laamp_decision_has_trained ?= flag:no + } + custom_tooltip = { + text = recruited_maa.tt + always = no + } + } + #Been there, done that + trigger_else_if = { + limit = { scope:laamp_decision_has_trained ?= flag:yes } + custom_tooltip = { + text = ep3_laamp_decision_event.1050.a.cooldown.tt + always = no + } + } + trigger_else = { always = yes } + } + show_as_unavailable = { always = yes } + reason = visit_training_grounds + custom_tooltip = ep3_laamp_decision_event.1050.a.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = castle_grounds } + #Go to the training grounds + trigger_event = ep3_laamp_decision_event.1051 + ai_chance = { base = 100 } + } + #Scout knights at the garrison + option = { + name = { + text = { + first_valid = { + #Return to the garrison + triggered_desc = { + trigger = { exists = scope:been_to_garrison } + desc = ep3_laamp_decision_event.1050.b_second + } + #First time at the garrison + desc = ep3_laamp_decision_event.1050.b + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1050.b.cooldown.tt + NOT = { exists = scope:laamp_decision_has_garrisoned } + } + } + show_as_unavailable = { always = yes } + reason = visit_garrison + custom_tooltip = ep3_laamp_decision_event.1050.b.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = castle_grounds } + #Go to the garrison screen + trigger_event = ep3_laamp_decision_event.1053 + ai_chance = { base = 100 } + } + #Check out the demoralized soldiers + option = { + name = { + text = { + first_valid = { + #Already scoped out contract + triggered_desc = { + trigger = { exists = scope:been_to_reinforcers } + desc = ep3_laamp_decision_event.1050.c_second + } + #First time reading contract + desc = ep3_laamp_decision_event.1050.c + } + } + } + trigger = { + trigger_if = { + limit = { exists = scope:laamp_decision_has_reinforced } + custom_tooltip = { + text = ep3_laamp_decision_event.1050.c.cooldown.tt + NOT = { exists = scope:laamp_decision_has_reinforced } + } + } + trigger_else_if = { + limit = { + any_in_list = { + variable = 1055_reinforced_recently + this = scope:visiting_location + } + } + custom_tooltip = { + text = ep3_laamp_decision_event.1050.c.cooldown_province.tt + NOT = { + any_in_list = { + variable = 1055_reinforced_recently + this = scope:visiting_location + } + } + } + } + trigger_else = { 1050_has_maa_to_reinforce_trigger = yes } + } + show_as_unavailable = { + OR = { + 1050_has_maa_to_reinforce_trigger = yes + exists = scope:laamp_decision_has_reinforced + } + } + reason = reinforce_maa + custom_tooltip = ep3_laamp_decision_event.1050.c.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = castle_grounds } + #Go to the Town Crier + trigger_event = ep3_laamp_decision_event.1055 + ai_chance = { base = 100 } + } + #Rare Option: Hire cheaper, skilled, Bodyguard + option = { + name = { + text = { + first_valid = { + #Return to the Bodyguard + triggered_desc = { + trigger = { exists = scope:been_to_bodyguard } + desc = ep3_laamp_decision_event.1050.d_second + } + #First time at the Bodyguard + desc = ep3_laamp_decision_event.1050.d + } + } + } + trigger = { + exists = scope:laamp_bodyguard_recruit + NOT = { exists = scope:laamp_decision_recruited_bodyguard } + } + reason = recruit_bodyguard + #Been there once already + if = { + limit = { exists = scope:been_to_bodyguard } + custom_tooltip = ep3_laamp_decision_event.1050.d.tt_second + } + else = { + custom_tooltip = ep3_laamp_decision_event.1050.d.tt + } + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = castle_grounds } + #Go to the bodyguard screen + trigger_event = ep3_laamp_decision_event.1057 + ai_chance = { + base = 500 + } + } + #I want to do something else + option = { + name = { + text = { + first_valid = { + #Nothing left to do + triggered_desc = { + trigger = { 1050_done_with_castle_trigger = yes } + desc = ep3_laamp_decision_event.1050.e_second + } + #Back to main square + desc = ep3_laamp_decision_event.1050.e + } + } + } + #Have we done everything? Are we closing off the option? + if = { + limit = { 1050_done_with_castle_trigger = yes } + #Clean up unnecessary variables and close off the option + 1050_finished_castle_effect = yes + } + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = castle_grounds } + #Go back to the main event + 1000_return_to_main_effect = yes + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = greedy + has_trait = paranoid + } + add = 300 + } + } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:castle_grounds } + } +} + + +#We return to the castle event to peruse other options +scripted_effect 1051_return_to_castle_effect = { + custom_tooltip = ep3_laamp_decision_event.1051.return.tt + trigger_event = ep3_laamp_decision_event.1050 +} + +#One, two, one, two, hepp-hepp-hepp +scripted_effect 1051_actual_training_effect = { + #Pay for training if it ain't scope:visiting_partner + if = { + limit = { $TRAINER$ = scope:laamp_disgruntled_moa } + pay_short_term_gold = { + target = scope:laamp_disgruntled_moa + gold = visit_settlement_paid_training_value + } + } + #Add the prowess + random_list = { + #Athletisism! + 10 = { + trigger = { + has_trait = athletic + 1051_skill_cap_trigger = no + } + desc = ep3_laamp_decision_event.1051.a_athletic.desc + send_interface_toast = { + type = event_toast_effect_good + title = travel_events.2007.a_success_tt + desc = ep3_laamp_decision_event.1051.a_athletic.desc + left_icon = root + #Increase skill + add_prowess_skill = 2 + } + hidden_effect = { 1051_increment_skill_gain_effect = yes } + } + #Regular prowess + 25 = { + trigger = { 1051_skill_cap_trigger = no } + desc = ep3_laamp_decision_event.1051.a.desc + send_interface_toast = { + type = event_toast_effect_good + title = travel_events.2032.a_learning.tt + desc = ep3_laamp_decision_event.1051.a.desc + left_icon = root + #Increase skill + add_prowess_skill = 1 + } + hidden_effect = { 1051_increment_skill_gain_effect = yes } + } + #Blademaster + 25 = { + trigger = { + 1051_skill_cap_trigger = yes + 1051_maxed_blademaster_trigger = no + } + desc = ep3_laamp_decision_event.1051.a.desc + send_interface_toast = { + type = event_toast_effect_good + title = travel_events.2007.a_soft_success_tt + desc = ep3_laamp_decision_event.1051.a.desc + left_icon = root + #Gain trait + if = { + limit = { + NOT = { has_trait = lifestyle_blademaster } + } + add_trait = lifestyle_blademaster + add_trait_xp = { + trait = lifestyle_blademaster + value = scope:blademaster_xp + } + } + #Or be educated + else = { + add_trait_xp = { + trait = lifestyle_blademaster + value = scope:blademaster_xp + } + } + } + } + #... fallback. + 25 = { + trigger = { + 1051_skill_cap_trigger = yes + 1051_maxed_blademaster_trigger = yes + } + desc = ep3_laamp_decision_event.1051.a.desc + send_interface_toast = { + type = event_toast_effect_good + title = travel_events.2003.b_success_tt + desc = ep3_laamp_decision_event.1051.a.desc + left_icon = root + #Gain martial lifestyle xp + add_martial_lifestyle_xp = medium_lifestyle_xp + #... and some stress relief? + stress_impact = { + base = medium_stress_impact_loss + } + } + } + #Too much joshing around + 25 = { + trigger = { scope:visiting_partner ?= $TRAINER$ } + desc = ep3_laamp_decision_event.1051.c_joshing.desc + send_interface_toast = { + type = event_toast_text_neutral + title = ep3_laamp_decision_event.1051.c_joshing.t + desc = ep3_laamp_decision_event.1051.c_joshing.desc + left_icon = root + right_icon = scope:visiting_partner + } + } + #Too much joshing around + 5 = { + trigger = { scope:visiting_partner ?= $TRAINER$ } + min = 5 + desc = ep3_laamp_decision_event.1051.c_wounded.desc + send_interface_toast = { + type = event_toast_text_neutral + title = ep3_laamp_decision_event.1051.c_wounded.t + desc = ep3_laamp_decision_event.1051.c_wounded.desc + left_icon = root + right_icon = scope:visiting_partner + scope:visiting_partner = { + increase_wounds_effect = { REASON = training_accident } + } + } + } + } + #Set the variables and redirect us back to the Castle + 1051_finished_training_effect = yes +} + +scripted_effect 1051_increment_skill_gain_effect = { + #We cap the max amount of skill points gained + if = { + limit = { + NOT = { has_variable = 1051_skill_gain_variable } + } + set_variable = { + name = 1051_skill_gain_variable + value = 1 + } + } + else_if = { + limit = { + has_variable = 1051_skill_gain_variable + var:1051_skill_gain_variable != visit_settlement_skill_gain_cap_value + } + change_variable = { + name = 1051_skill_gain_variable + add = 1 + } + } + else = { + #Nothing happens + } +} + +#Set the correct variable to block off the Training option and remove the desc flavor variable +scripted_effect 1051_finished_training_effect = { + save_scope_value_as = { + name = laamp_decision_has_trained + value = flag:yes + } + #Go back to castle grounds + hidden_effect = { 1051_return_to_castle_effect = yes } +} + +#Find someone who isn't saved, doesn't dislike you and is pretty martial +scripted_trigger 1051_random_martial_character_trigger = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:saved_character_check } + OR = { + martial >= average_skill_rating + prowess >= high_skill_rating + } +} + +scripted_trigger 1051_can_sparr_trigger = { + is_adult = yes + scope:visiting_partner ?= { + is_adult = yes + is_healthy = yes + martial >= high_skill_rating + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } +} + +scripted_trigger 1051_skill_cap_trigger = { + has_variable = 1051_skill_gain_variable + var:1051_skill_gain_variable >= visit_settlement_skill_gain_cap_value +} + +scripted_trigger 1051_maxed_blademaster_trigger = { + has_trait = lifestyle_blademaster + has_trait_xp = { + trait = lifestyle_blademaster + value = 100 #Max + } +} + +#Training Grounds +ep3_laamp_decision_event.1051 = { + type = character_event + title = ep3_laamp_decision_event.1051.t + window = visit_settlement_window + desc = { + #What're they doing? + first_valid = { + #We've returned to this scene, now what + #RETURN: + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_training + scope:training_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1051.desc_returned_01 + } + triggered_desc = { + trigger = { scope:training_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1051.desc_returned_02 + } + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_training } + } + desc = ep3_laamp_decision_event.1051.desc + } + } + #Martial partner outro + first_valid = { + #RETURN: + triggered_desc = { + trigger = { + exists = scope:been_to_training + 1051_can_sparr_trigger = yes + } + desc = ep3_laamp_decision_event.1051.desc_outro_return_martial_partner + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_training } + 1051_can_sparr_trigger = yes + } + desc = ep3_laamp_decision_event.1051.desc_outro_martial_partner + } + } + } + theme = martial + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_activity" } + override_background = { reference = ep2_tournament } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + triggered_animation = { + trigger = { 1051_can_sparr_trigger = yes } + animation = marshal_shield + } + animation = thinking + } + center_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:laamp_disgruntled_moa + camera = camera_event_scheme_far_right + animation = disapproval + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = training } + #Find our potential Master of Arms (MoA) character + if = { + #Do we already have a MoA? + limit = { + NOT = { exists = scope:laamp_disgruntled_moa } + } + #Don't really care about saving this character in a list + random_pool_character = { + province = scope:visiting_location + limit = { + 1051_random_martial_character_trigger = yes + has_trait = overseer + has_trait = disloyal + } + alternative_limit = { + 1051_random_martial_character_trigger = yes + has_trait = overseer + } + alternative_limit = { + 1051_random_martial_character_trigger = yes + has_trait = disloyal + } + alternative_limit = { 1051_random_martial_character_trigger = yes } + save_scope_as = laamp_disgruntled_moa + } + #Otherwise create a suiting candidate + if = { + limit = { + NOT = { exists = scope:laamp_disgruntled_moa } + } + #Create MoA to stuff in pool + create_character = { + template = new_warrior_character + location = scope:visiting_location + dynasty = none + trait = disloyal + gender_female_chance = root_soldier_female_chance + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_disgruntled_moa + } + } + hidden_effect = { + scope:laamp_disgruntled_moa = { + if = { + limit = { + NOT = { has_trait = overseer } + } + random_list = { + 75 = { + #No trait + } + 25 = { + add_trait = overseer + } + } + } + } + } + if = { + limit = { 1051_can_sparr_trigger = yes } + scope:visiting_partner ?= { save_scope_as = fighting_child } + } + } + #Save the xp trait as a static number + if = { + limit = { + NOR = { + 1051_maxed_blademaster_trigger = yes + exists = scope:blademaster_xp + } + } + save_scope_value_as = { + name = blademaster_xp + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_mid + } + } + } + } + } + #RAAAH TRAINING + option = { + name = ep3_laamp_decision_event.1051.a + trigger = { + gold >= visit_settlement_paid_training_value + } + show_as_unavailable = { always = yes } + #Cue training montage + 1051_actual_training_effect = { TRAINER = scope:laamp_disgruntled_moa } + ai_chance = { + base = 100 + modifier = { + prowess < low_skill_rating + short_term_gold < tiny_gold_laamps_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + prowess < mediocre_skill_rating + short_term_gold < minor_gold_laamps_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + prowess < decent_skill_rating + short_term_gold < medium_gold_laamps_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + prowess < high_skill_rating + short_term_gold < major_gold_laamps_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + prowess < extremely_high_skill_rating + short_term_gold < massive_gold_laamps_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Hire the guy as Master of Arms? + option = { + name = ep3_laamp_decision_event.1051.b + trigger = { + custom_description = { + text = not_have_master_of_arms_building + OR = { + can_employ_court_position_type = master_of_arms_camp_officer + employs_court_position = master_of_arms_camp_officer + } + } + } + reason = unlocked_master_of_arms + show_as_unavailable = { always = yes } + #Pay up + pay_short_term_gold = { + target = scope:laamp_disgruntled_moa + gold = medium_gold_laamps_value + } + hidden_effect = { + reverse_add_opinion = { + target = scope:laamp_disgruntled_moa + modifier = recruited_me_opinion + opinion = 30 + } + } + add_courtier = scope:laamp_disgruntled_moa + #The actual effect happens in after + show_as_tooltip = { + camp_officer_grant_effect = { + EMPLOYER = root + POS = master_of_arms + CANDIDATE = scope:laamp_disgruntled_moa + } + } + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_has_trained + value = flag:no + } + #Go back to castle grounds + hidden_effect = { 1051_return_to_castle_effect = yes } + ai_chance = { + base = 100 + modifier = { + short_term_gold < medium_gold_laamps_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + employs_court_position = master_of_arms_camp_officer + factor = 0 + } + } + } + #Triggered Option: Sparr with your martial partner + option = { + name = ep3_laamp_decision_event.1051.c + trigger = { 1051_can_sparr_trigger = yes } + #This erroneously claims that the option is available because of ROOT's martial + show_unlock_reason = no + #Training? Hopefully. + 1051_actual_training_effect = { TRAINER = scope:visiting_partner } + #Do some bonding + progress_towards_friend_effect = { + CHARACTER = scope:visiting_partner + REASON = friend_castle_sparring + OPINION = 15 + } + ai_chance = { + base = 400 + } + } + #I want to do something else + option = { + name = ep3_laamp_decision_event.1051.d + #Sets variables and returns us to castle grounds screen + 1031_been_to_effect = { GUILD = training } + ai_chance = { + base = 200 + modifier = { + has_trait = greedy + factor = 2 + } + } + } + after = { + if = { + limit = { scope:laamp_decision_has_trained ?= flag:no } + #Appoint them + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:laamp_disgruntled_moa + COURT_POS = master_of_arms_camp_officer + } + } + camp_officer_grant_effect = { + EMPLOYER = root + POS = master_of_arms + CANDIDATE = scope:laamp_disgruntled_moa + } + } + } + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:training } + } +} + + +#Set the correct variable to block off the Garrison option and remove the desc flavor variable +scripted_effect 1053_finished_garrison_effect = { + save_scope_as = laamp_decision_has_garrisoned + #Go back to castle grounds + hidden_effect = { 1051_return_to_castle_effect = yes } +} + +#Add the guard to your camp +scripted_effect 1053_add_guard_effect = { + hidden_effect = { + reverse_add_opinion = { + target = $GUARD$ + modifier = recruited_me_opinion + opinion = 30 + } + } + add_courtier = $GUARD$ + #Go back to castle grounds + 1053_finished_garrison_effect = yes +} + +#Find someone who isn't saved, doesn't dislike you and is worse martial +scripted_trigger 1053_random_martial_character_trigger = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:saved_character_check } + OR = { + martial >= average_skill_rating + prowess >= average_skill_rating + } +} + +#Find someone who isn't saved, doesn't dislike you and is less martial +scripted_trigger 1053_worse_martial_character_trigger = { + 1010_basic_merchant_checks_trigger = yes + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:saved_character_check } + 1033_has_interesting_skillset_trigger = no +} + +#Garrison +ep3_laamp_decision_event.1053 = { + type = character_event + title = ep3_laamp_decision_event.1053.t + window = visit_settlement_window + desc = { + #What're they doing? + first_valid = { + #We've returned to this scene, now what + #RETURN: + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_garrison + scope:garrison_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1053.desc_returned_01 + } + triggered_desc = { + trigger = { scope:garrison_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1053.desc_returned_02 + } + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_garrison } + } + desc = ep3_laamp_decision_event.1053.desc + } + } + } + theme = landless_adventurer + override_icon = { reference = "gfx/interface/icons/event_types/type_duty.dds" } + override_background = { reference = armory } + left_portrait = { + character = scope:1053_first_character + #PARTNER: + triggered_animation = { + trigger = { scope:1053_first_character ?= scope:visiting_partner } + animation = interested + } + #ROOT: Return + triggered_animation = { + trigger = { + scope:1053_first_character = root + exists = scope:been_to_garrison + } + animation = chess_cocky + } + #ROOT + animation = admiration + } + center_portrait = { + character = scope:laamp_talented_guard + #They're counting coins + triggered_animation = { + trigger = { scope:garrison_loc_tracker ?= 1 } + animation = steward + } + #They just won a game of cards + triggered_animation = { + trigger = { + exists = scope:been_to_garrison + scope:garrison_loc_tracker ?= 0 + } + animation = personality_dishonorable + } + animation = hero_flex + } + right_portrait = { + character = scope:laamp_plain_guard + camera = camera_event_scheme_far_right + #They were just asleep + triggered_animation = { + trigger = { scope:garrison_loc_tracker ?= 1 } + animation = boredom + } + #They're tending their wounds + triggered_animation = { + trigger = { + exists = scope:been_to_garrison + scope:garrison_loc_tracker ?= 0 + } + animation = pain + } + animation = disapproval + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = garrison } + #Find our garrison guards + if = { + #Do we already have the guards? + limit = { + NOT = { exists = scope:laamp_plain_guard } + } + #Don't really care about saving this character in a list + random_pool_character = { + province = scope:visiting_location + limit = { 1053_worse_martial_character_trigger = yes } + save_scope_as = laamp_plain_guard + } + #Otherwise create a suiting plain guard + if = { + limit = { + NOT = { exists = scope:laamp_plain_guard } + } + #Create guard character to stuff in pool + create_character = { + template = bandit_character + location = scope:visiting_location + dynasty = none + gender_female_chance = root_soldier_female_chance + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_plain_guard + } + } + #Set their cost + 1033_set_cost_effect = { CHARACTER = scope:laamp_plain_guard VALUE_NAME = plain_guard_cost } + #Don't really care about saving this character in a list + random_pool_character = { + province = scope:visiting_location + limit = { 1053_random_martial_character_trigger = yes } + save_scope_as = laamp_plain_guard + } + #Otherwise create a suiting talented guard + if = { + limit = { + NOT = { exists = scope:laamp_talented_guard } + } + #Create guard character to stuff in pool + create_character = { + template = new_warrior_character + location = scope:visiting_location + dynasty = none + gender_female_chance = root_soldier_female_chance + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_talented_guard + } + } + #Set their cost + 1033_set_cost_effect = { CHARACTER = scope:laamp_talented_guard VALUE_NAME = talented_guard_cost } + } + #Set up the portrait + if = { + limit = { + NOT = { exists = scope:1053_first_character } + } + #Partner first + if = { + limit = { exists = scope:visiting_partner } + scope:visiting_partner = { save_scope_as = 1053_first_character } + } + #Otherwise ROOT + else = { save_scope_as = 1053_first_character } + } + #For the background + scope:laamp_plain_guard = { + if = { + limit = { + is_ruler = no + exists = court_owner + } + court_owner = { save_scope_as = bg_override_char } + } + else = { + save_scope_as = bg_override_char + } + } + } + #Hey, FirstPerson, want to join us? + option = { + name = ep3_laamp_decision_event.1053.a + pay_short_term_gold = { + target = scope:laamp_plain_guard + gold = scope:plain_guard_cost + } + #The actual adding of the guard and redirecting to castle grounds + 1053_add_guard_effect = { GUARD = scope:laamp_plain_guard } + ai_chance = { + base = 200 + modifier = { + short_term_gold > scope:plain_guard_cost + factor = 2 + } + } + } + #How about you, more skilled SecondPerson? + option = { + name = ep3_laamp_decision_event.1053.b + pay_short_term_gold = { + target = scope:laamp_talented_guard + gold = scope:talented_guard_cost + } + #The actual adding of the guard and redirecting to castle grounds + 1053_add_guard_effect = { GUARD = scope:laamp_talented_guard } + ai_chance = { + base = 100 + modifier = { + short_term_gold > scope:talented_guard_cost + factor = 2 + } + } + } + #I just wanna play some dice. + option = { + name = ep3_laamp_decision_event.1053.c + random_list = { + 35 = { + desc = ep3_laamp_decision_event.1053.c.plain_wins + send_interface_toast = { + title = ep3_laamp_decision_event.1053.c.plain_wins + left_icon = root + right_icon = scope:laamp_plain_guard + pay_short_term_gold = { + target = scope:laamp_plain_guard + gold = minor_gold_value + } + } + } + 35 = { + desc = ep3_laamp_decision_event.1053.c.talented_wins + send_interface_toast = { + title = ep3_laamp_decision_event.1053.c.talented_wins + left_icon = root + right_icon = scope:laamp_talented_guard + pay_short_term_gold = { + target = scope:laamp_talented_guard + gold = minor_gold_value + } + } + } + 30 = { + desc = ep3_laamp_decision_event.1053.c.you_win + send_interface_toast = { + title = ep3_laamp_decision_event.1053.c.you_win + left_icon = root + scope:laamp_plain_guard = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + scope:laamp_talented_guard = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + } + } + } + stress_impact = { + base = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + improvident = minor_stress_impact_loss + } + #Go back to castle grounds + 1053_finished_garrison_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < minor_gold_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + has_trait = greedy + factor = 0 + } + } + } + #I want to do something else + option = { + name = ep3_laamp_decision_event.1053.d + #Sets variables and returns us to castle grounds screen + 1031_been_to_effect = { GUILD = garrison } + ai_chance = { + base = 200 + modifier = { + has_trait = greedy + factor = 2 + } + } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:garrison } + } +} + + +#Set the correct scopes, and transfer us back to main +scripted_effect 1055_finished_reinforcers_effect = { + save_scope_as = laamp_decision_has_reinforced + add_to_variable_list = { + name = 1055_reinforced_recently + target = root.location + days = visit_settlement_minimum_cooldown_days + } + #Go back to castle grounds + hidden_effect = { 1051_return_to_castle_effect = yes } +} + +#Pretty self-explanatory +scripted_effect 1055_calculate_reinforcements_effect = { + if = { + limit = { $RESOURCE$_level >= max_$RESOURCE$_level } + custom_tooltip = { + text = ep3_laamp_decision_event.1055.$RESOURCE$_full.tt + every_in_list = { + list = damaged_maa_regiments + change_maa_troops_count = replenishable_troops_value + } + } + } + # 80% + else_if = { + limit = { $RESOURCE$_level >= very_high_$RESOURCE$_level } + custom_tooltip = { + text = ep3_laamp_decision_event.1055.$RESOURCE$_partial_80.tt + every_in_list = { + list = damaged_maa_regiments + change_maa_troops_count = { + value = replenishable_troops_value + multiply = 0.8 + } + } + } + } + # 60% + else_if = { + limit = { $RESOURCE$_level >= high_$RESOURCE$_level } + custom_tooltip = { + text = ep3_laamp_decision_event.1055.$RESOURCE$_partial_60.tt + every_in_list = { + list = damaged_maa_regiments + change_maa_troops_count = { + value = replenishable_troops_value + multiply = 0.6 + } + } + } + } + # 40% + else_if = { + limit = { $RESOURCE$_level >= medium_$RESOURCE$_level } + custom_tooltip = { + text = ep3_laamp_decision_event.1055.$RESOURCE$_partial_40.tt + every_in_list = { + list = damaged_maa_regiments + change_maa_troops_count = { + value = replenishable_troops_value + multiply = 0.4 + } + } + } + } + # 20% + else = { + custom_tooltip = { + text = ep3_laamp_decision_event.1055.$RESOURCE$_partial_20.tt + every_in_list = { + list = damaged_maa_regiments + change_maa_troops_count = { + value = replenishable_troops_value + multiply = 0.2 + } + } + } + } +} + +#Well, are ya, punk? +scripted_trigger 1055_is_famous_trigger = { + OR = { + AND = { + prestige_level = max_prestige_level + NOT = { has_variable = 1055_reinforced_with_prestige_recently } + } + AND = { + piety_level = max_piety_level + NOT = { has_variable = 1055_reinforced_with_piety_recently } + } + AND = { + has_trait = knight_errant + has_trait_xp = { + trait = knight_errant + value = 100 #Max XP + } + NOT = { has_variable = 1055_reinforced_with_knight_errant_recently } + } + } +} + + +#Reinforcers +ep3_laamp_decision_event.1055 = { + type = character_event + title = ep3_laamp_decision_event.1055.t + window = visit_settlement_window + desc = { + #What're they doing? + first_valid = { + #We've returned to this scene, now what + #RETURN: Maxed prestige or piety + triggered_desc = { + trigger = { + exists = scope:been_to_reinforcers + 1055_is_famous_trigger = yes + } + desc = ep3_laamp_decision_event.1055.desc_maxed_out_returned + } + #RETURN: + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_reinforcers + scope:reinforcers_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1055.desc_returned_01 + } + triggered_desc = { + trigger = { scope:reinforcers_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1055.desc_returned_02 + } + } + #FIRST TIME: Maxed prestige or piety + triggered_desc = { + trigger = { 1055_is_famous_trigger = yes } + desc = ep3_laamp_decision_event.1055.desc_maxed_out + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_reinforcers } + } + desc = ep3_laamp_decision_event.1055.desc + } + } + } + theme = landless_adventurer + override_sound = { + trigger = { 1055_is_famous_trigger = yes } + reference = "event:/DLC/FP4/MUSIC/Stingers/mx_stinger_legends_lvl_03" + } + override_icon = { reference = "gfx/interface/icons/event_types/type_martial.dds" } + override_background = { reference = ep3_camp } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + triggered_animation = { + trigger = { + root = { 1055_is_famous_trigger = yes } + } + animation = happiness + } + animation = survey + } + center_portrait = { + character = root + #Defender + triggered_animation = { + trigger = { + has_trait = knight_errant + has_trait_xp = { + trait = knight_errant + value = 100 #Max XP + } + NOT = { has_variable = 1055_reinforced_with_knight_errant_recently } + } + animation = marshal_shield + } + #Zealous + triggered_animation = { + trigger = { + piety_level = max_piety_level + NOT = { has_variable = 1055_reinforced_with_piety_recently } + } + animation = personality_zealous + } + #Prestigious + triggered_animation = { + trigger = { + prestige_level = max_prestige_level + NOT = { has_variable = 1055_reinforced_with_prestige_recently } + } + animation = hero_flex + } + triggered_animation = { + trigger = { has_trait = greedy } + animation = thinking + } + animation = betting + } + right_portrait = { + character = scope:laamp_maa_reinforcer + camera = camera_event_scheme_far_right + triggered_animation = { + trigger = { + root = { 1055_is_famous_trigger = yes } + } + animation = personality_coward + } + animation = dismissal + } + #Am I overusing this? + override_effect_2d = { + trigger = { 1055_is_famous_trigger = yes } + reference = legend_glow + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = reinforcers } + #Find a spokesperson + if = { + #Do we already have a spokesperson? + limit = { + NOT = { exists = scope:laamp_maa_reinforcer } + } + #Don't really care about saving this character in a list + random_pool_character = { + province = scope:visiting_location + limit = { 1053_random_martial_character_trigger = yes } + save_scope_as = laamp_maa_reinforcer + } + #Otherwise create a spokesperson + if = { + limit = { + NOT = { exists = scope:laamp_plain_guard } + } + #Create spokesperson to stuff in pool + create_character = { + template = bandit_character + location = scope:visiting_location + dynasty = none + gender_female_chance = root_soldier_female_chance + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_maa_reinforcer + } + } + } + scope:laamp_maa_reinforcer = { + add_character_flag = { + flag = wear_armor + weeks = 1 + } + } + #Run this once + if = { + limit = { + NOT = { exists = scope:least_damaged_maa_missing_soldiers } + } + every_maa_regiment = { + limit = { maa_current_troops_count < maa_max_troops_count } + add_to_list = damaged_maa_regiments + } + ordered_in_list = { + list = damaged_maa_regiments + order_by = { + value = replenishable_troops_value + multiply = -1 + } + save_scope_value_as = { + name = least_damaged_maa_missing_soldiers + value = this.replenishable_troops_value + } + } + save_scope_value_as = { + name = num_damaged_maa_regiments + value = list_size:damaged_maa_regiments + } + } + } + #Based on Prestige level + option = { + name = ep3_laamp_decision_event.1055.a + trigger = { #This could be upgraded to diminishing returns + custom_tooltip = { + text = ep3_laamp_decision_event.1055.a.cooldown.tt + NOT = { has_variable = 1055_reinforced_with_prestige_recently } + } + } + show_as_unavailable = { always = yes } + flavor = ep3_laamp_decision_event.1055.a.flavor + reason = prestige_level + #Basically the same as piety + 1055_calculate_reinforcements_effect = { RESOURCE = prestige } + #Le cooldown + set_variable = { + name = 1055_reinforced_with_prestige_recently + days = visit_settlement_minimum_cooldown_days + } + #Checkmark and block off the option + 1055_finished_reinforcers_effect = yes + ai_chance = { + base = 200 + } + } + #Based on Piety level + option = { + name = ep3_laamp_decision_event.1055.b + trigger = { + piety_level >= low_piety_level + } + show_as_unavailable = { always = yes } + flavor = ep3_laamp_decision_event.1055.b.flavor + reason = piety_level + #Basically the same as prestige + 1055_calculate_reinforcements_effect = { RESOURCE = piety } + #Le cooldown + set_variable = { + name = 1055_reinforced_with_piety_recently + days = visit_settlement_minimum_cooldown_days + } + #Checkmark and block off the option + 1055_finished_reinforcers_effect = yes + ai_chance = { + base = 200 + } + } + #Scrounging for desperate soldiers with lower cost Provisions + option = { + name = ep3_laamp_decision_event.1055.c + trigger = { + domicile ?= { provisions >= scope:least_damaged_maa_missing_soldiers } + } + #Pick a random MaA to reinforce, fully + custom_tooltip = { + text = ep3_laamp_decision_event.1055.c.tt + random_in_list = { + list = damaged_maa_regiments + change_maa_troops_count = replenishable_troops_value + } + } + #For a cheaper sandwich + domicile ?= { + change_provisions = { + subtract = scope:least_damaged_maa_missing_soldiers + divide = visit_settlement_provision_refill_value + } + } + #No cooldown. For now. + #Checkmark and block off the option + 1055_finished_reinforcers_effect = yes + ai_chance = { + base = 100 + modifier = { + domicile ?= { provisions < sixty_percent_provisions_value } + factor = 0 + } + } + } + #I am a Knight-Errant, you _fool_! Bask in my righteousness. + option = { + name = ep3_laamp_decision_event.1055.d + trigger = { + has_trait = knight_errant + has_trait_xp = { + trait = knight_errant + value = 100 #Max XP + } + NOT = { has_variable = 1055_reinforced_with_knight_errant_recently } + } + show_as_unavailable = { has_variable = 1055_reinforced_with_knight_errant_recently } + flavor = ep3_laamp_decision_event.1055.d.flavor + reason = knight_errant + #You're just that _good_ + custom_tooltip = { + text = ep3_laamp_decision_event.1055.d.tt + every_in_list = { + list = damaged_maa_regiments + change_maa_troops_count = replenishable_troops_value + } + } + #Le cooldown + set_variable = { + name = 1055_reinforced_with_knight_errant_recently + days = visit_settlement_minimum_cooldown_days + } + #Checkmark and block off the option + 1055_finished_reinforcers_effect = yes + ai_chance = { + base = 1000 #Just do it + } + } + #I want to do something else + option = { + name = ep3_laamp_decision_event.1055.e + #Sets variables and returns us to castle grounds screen + 1031_been_to_effect = { GUILD = reinforcers } + ai_chance = { base = 200 } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:reinforcers } + } +} + +#Hire the Bodyguard, show/set the effects and variables +scripted_effect 1057_hire_bodyguard_effect = { + hidden_effect = { + reverse_add_opinion = { + target = scope:laamp_bodyguard_recruit + modifier = recruited_me_opinion + opinion = 30 + } + } + add_courtier = scope:laamp_bodyguard_recruit + #The actual effect happens in after + show_as_tooltip = { + court_position_grant_effect = { + EMPLOYER = root + POS = bodyguard + CANDIDATE = scope:laamp_bodyguard_recruit + } + } + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_recruited_bodyguard + value = flag:yes + } + #Go back to castle grounds + hidden_effect = { 1051_return_to_castle_effect = yes } +} + + +#Visit Bodyguard +ep3_laamp_decision_event.1057 = { + type = character_event + title = ep3_laamp_decision_event.1057.t + window = visit_settlement_window + desc = { + #What're they doing? + first_valid = { + #We've returned to this scene, now what + #RETURN: + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_bodyguard + scope:bodyguard_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1057.desc_returned_01 + } + triggered_desc = { + trigger = { scope:bodyguard_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1057.desc_returned_02 + } + triggered_desc = { + trigger = { scope:bodyguard_loc_tracker ?= 2 } + desc = ep3_laamp_decision_event.1057.desc_returned_03 + } + } + #FIRST TIME: We've seen this bodyguard before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_bodyguard + NOT = { exists = scope:been_to_bodyguard } + } + desc = ep3_laamp_decision_event.1057.desc_reused_bodyguard + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_bodyguard } + } + desc = ep3_laamp_decision_event.1057.desc + } + } + } + theme = landless_adventurer + override_sound = { reference = "event:/MUSIC/Cues/Events/Positive/mx_cue_postive_effect" } + override_background = { reference = alley_day } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #Slicing up carcasses + triggered_animation = { + trigger = { scope:bodyguard_loc_tracker ?= 1 } + animation = disbelief + } + animation = worry + } + center_portrait = { + character = root + camera = camera_event_scheme_vs_extra_right_look_right + #Slicing up carcasses + triggered_animation = { + trigger = { scope:bodyguard_loc_tracker ?= 1 } + animation = fear + } + #Literal *flex* + triggered_animation = { + trigger = { + OR = { + has_trait = gallant + prowess > high_skill_rating + } + } + animation = hero_flex + } + animation = flirtation + } + right_portrait = { + character = scope:laamp_bodyguard_recruit + camera = camera_event_scheme_far_right + #Still angry + triggered_animation = { + trigger = { + NOT = { exists = scope:been_to_bodyguard } + } + animation = rage + } + #Had a pleasant conversation prior to interaction + triggered_animation = { + trigger = { + exists = scope:been_to_bodyguard + scope:bodyguard_loc_tracker ?= 0 + } + animation = personality_compassionate + } + #Slicing up carcasses + triggered_animation = { + trigger = { scope:bodyguard_loc_tracker ?= 1 } + animation = hunting_knife_start + } + #State of life + animation = disappointed + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Run this once: Re-save the portrait so the Bodyguard is not the 1050_third_character (since they narratively moved to the alley) + if = { + limit = { scope:1050_third_character = scope:laamp_bodyguard_recruit } + #Overwrite with ROOT to block off the portrait + save_scope_as = 1050_third_character + #Remember the bodyguard + 1010_remember_vendor_character_effect = { GUILD = bodyguard CHARACTER = scope:laamp_bodyguard_recruit } + } + #Can we _not_ repeat the loc? + 1025_set_and_check_hub_loc_tracker_scope_effect = { HUB = bodyguard } + } + #Pay gold + option = { + name = ep3_laamp_decision_event.1057.a + pay_short_term_gold = { + target = scope:laamp_bodyguard_recruit + gold = minor_gold_value + } + #Wrap effect to hire 'em, set scope & return to castle + 1057_hire_bodyguard_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < minor_gold_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + OR = { + prowess > high_skill_rating + has_trait = gallant + } + factor = 0 + } + } + } + #Flex Prowess + option = { + name = ep3_laamp_decision_event.1057.b + trigger = { + prowess > high_skill_rating + NOT = { has_trait = gallant } + } + #Wrap effect to hire 'em, set scope & return to castle + 1057_hire_bodyguard_effect = yes + ai_chance = { + base = 1000 #Just do it + } + } + #Diplomacy duel + option = { + name = ep3_laamp_decision_event.1057.c + duel = { + skill = diplomacy + value = average_skill_rating + #Success: Hire 'em up + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + OR = { + has_trait = overseer + has_trait = strategist + } + factor = 2 + } + desc = ep3_laamp_decision_event.1057.c.success + send_interface_toast = { + title = ep3_laamp_decision_event.1057.c.success + left_icon = root + right_icon = scope:laamp_bodyguard_recruit + #Yippee! + 1057_hire_bodyguard_effect = yes + } + } + #Failure: Bye, now + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + modifier = { + has_trait = zealous + factor = 0.5 + } + desc = ep3_laamp_decision_event.1057.c.failure + send_interface_toast = { + type = event_toast_text_bad + title = ep3_laamp_decision_event.1057.c.failure + desc = ep3_laamp_decision_event.1057.c.failure.tt + left_icon = root + right_icon = scope:laamp_bodyguard_recruit + #Oh well + custom_tooltip = ep3_laamp_decision_event.1057.c.failure.tt + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_recruited_bodyguard + value = flag:no + } + 1051_return_to_castle_effect = yes + } + } + } + ai_chance = { + base = 100 + modifier = { + OR = { + prowess > high_skill_rating + has_trait = gallant + } + factor = 0 + } + } + } + #Triggered Option: Gallant-flex them + option = { + name = ep3_laamp_decision_event.1057.d + trigger = { has_trait = gallant } + show_as_unavailable = { always = yes } + reason = gallant + #Have a cherry on top + scope:laamp_bodyguard_recruit = { + hidden_effect = { + if = { + limit = { has_trait = disloyal } + remove_trait = disloyal + } + } + if = { + limit = { + NOT = { has_trait = loyal } + } + add_trait = loyal + } + } + #Wrap effect to hire 'em, set scope & return to castle + 1057_hire_bodyguard_effect = yes + ai_chance = { + base = 1000 #Just do it + } + } + #I want to do something else + option = { + name = ep3_laamp_decision_event.1057.e + #Saves scopes and returns us to castle grounds screen + 1031_been_to_effect = { GUILD = bodyguard } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = greedy + has_trait = paranoid + } + add = 300 + } + } + } + after = { + if = { + limit = { scope:laamp_decision_recruited_bodyguard ?= flag:yes } + #Appoint them + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:laamp_bodyguard_recruit + COURT_POS = bodyguard_court_position + } + } + court_position_grant_effect = { + EMPLOYER = root + POS = bodyguard + CANDIDATE = scope:laamp_bodyguard_recruit + } + } + } + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:bodyguard } + } +} + + +###################################################################### +# CRAFTSMEN +# ep3_laamp_decision_event.1060 +###################################################################### + +#Set the correct variable to block off the Craftsmen option and remove the desc flavor variable +scripted_effect 1060_finished_craftsmen_effect = { + remove_list_variable = { + name = list_of_options + target = flag:has_craftsman_option + } + save_scope_as = laamp_decision_finished_craftsmen_option +} + +#Nothing left for us to do +scripted_trigger 1060_done_with_craftsmen_trigger = { + exists = scope:laamp_decision_bought_weapon + exists = scope:laamp_decision_bought_armor + exists = scope:laamp_decision_bought_accessory + trigger_if = { + limit = { exists = scope:laamp_quartermaster_recruit } + exists = scope:laamp_decision_recruited_quartermaster + } +} + +scripted_trigger 1060_is_quartermaster_available_trigger = { + #They exist + exists = scope:laamp_quartermaster_recruit + #We've been there + exists = scope:been_to_quartermaster + #But we're not done with 'em + NOT = { exists = scope:laamp_decision_recruited_quartermaster } +} + + +#City Holding: Visit the local city craftsmen +ep3_laamp_decision_event.1060 = { + type = character_event + title = ep3_laamp_decision_event.1060.t + window = visit_settlement_window + desc = { + #Intro + first_valid = { + #We've returned to this scene, now what + #RETURN: We've returned from Main Square + random_valid = { + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + exists = scope:been_to_craftsmen + OR = { + scope:craftsmen_loc_tracker ?= 0 + scope:craftsmen_loc_tracker ?= 2 + } + } + desc = ep3_laamp_decision_event.1060.desc_returned_01 + } + triggered_desc = { + trigger = { + var:return_from_location ?= flag:main_square + scope:craftsmen_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1060.desc_returned_02 + } + } + #RETURN: We've returned from the Weaponsmith + triggered_desc = { + trigger = { var:return_from_location ?= flag:weaponsmith } + desc = ep3_laamp_decision_event.1060.desc_returned_from_weaponsmith + } + #RETURN: We've returned from the Armorer + triggered_desc = { + trigger = { var:return_from_location ?= flag:armorer } + desc = ep3_laamp_decision_event.1060.desc_returned_from_armorer + } + #RETURN: We've returned from the Jeweler + triggered_desc = { + trigger = { var:return_from_location ?= flag:jeweler } + desc = ep3_laamp_decision_event.1060.desc_returned_from_jeweler + } + #RETURN: We've returned from the Quartermaster + triggered_desc = { + trigger = { var:return_from_location ?= flag:quartermaster } + desc = ep3_laamp_decision_event.1060.desc_returned_from_quartermaster + } + #FIRST TIME: First time here + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_craftsmen } + } + desc = ep3_laamp_decision_event.1060.desc + } + } + #Outro + first_valid = { + #FIRST TIME: First time here, look at the quartermaster + triggered_desc = { + trigger = { + exists = scope:laamp_quartermaster_recruit + NOT = { exists = scope:been_to_craftsmen } + } + desc = ep3_laamp_decision_event.1060.desc_outro_quartermaster + } + #FIRST TIME: First time here, curious partner + triggered_desc = { + trigger = { + exists = scope:visiting_partner + NOT = { exists = scope:been_to_craftsmen } + } + desc = ep3_laamp_decision_event.1060.desc_outro_partner + } + #FIRST TIME: First time here + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_craftsmen } + } + desc = ep3_laamp_decision_event.1060.desc_outro + } + #RETURN: Partner - there is nothing left for us here + triggered_desc = { + trigger = { + exists = scope:visiting_partner + 1060_done_with_craftsmen_trigger = yes + } + desc = ep3_laamp_decision_event.1060.desc_outro_return_partner_finished + } + #RETURN: There is nothing left for us here + triggered_desc = { + trigger = { 1060_done_with_craftsmen_trigger = yes } + desc = ep3_laamp_decision_event.1060.desc_outro_return_finished + } + #RETURN: Quartermaster did not move to the tavern, yet + triggered_desc = { + trigger = { + exists = scope:laamp_quartermaster_recruit + NOR = { + exists = scope:been_to_quartermaster + exists = scope:laamp_decision_recruited_quartermaster + } + } + desc = ep3_laamp_decision_event.1060.desc_outro_quartermaster_return + } + #RETURN: We've been here before + random_valid = { + #RETURN: Partner flavor + triggered_desc = { + trigger = { + exists = scope:visiting_partner + exists = scope:been_to_craftsmen + scope:craftsmen_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1060.desc_outro_return_partner_01 + } + triggered_desc = { + trigger = { + exists = scope:visiting_partner + scope:craftsmen_loc_tracker ?= 1 + } + desc = ep3_laamp_decision_event.1060.desc_outro_return_partner_02 + } + triggered_desc = { + trigger = { + exists = scope:visiting_partner + scope:craftsmen_loc_tracker ?= 2 + } + desc = ep3_laamp_decision_event.1060.desc_outro_return_partner_03 + } + #RETURN: Generics + triggered_desc = { + trigger = { + exists = scope:been_to_craftsmen + scope:craftsmen_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1060.desc_outro_return_01 + } + triggered_desc = { + trigger = { scope:craftsmen_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1060.desc_outro_return_02 + } + triggered_desc = { + trigger = { scope:craftsmen_loc_tracker ?= 2 } + desc = ep3_laamp_decision_event.1060.desc_outro_return_03 + } + } + } + } + theme = stewardship + #Get outta here already + override_effect_2d = { + trigger = { + 1060_done_with_craftsmen_trigger = yes + scope:visiting_location = { is_drylands_or_desert_trigger = no } + } + reference = rain + } + override_background = { reference = market } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #If it's our (tired) visiting partner + triggered_animation = { + trigger = { 1060_done_with_craftsmen_trigger = yes } + animation = boredom + } + #If it's our visiting partner + animation = survey + } + center_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = greedy } + animation = stress + } + animation = personality_forgiving + } + #Do we have someone to display? + right_portrait = { + trigger = { + exists = scope:1060_third_character + #If this is root, then that means we have talked to the Quartermaster so let's disappear the portrait + scope:1060_third_character != root + } + character = scope:1060_third_character + #Le Quartermaster + animation = eyeroll + } + #The craftsmen + lower_left_portrait = { + #Let's remove them when the option is no longer available + trigger = { + scope:1060_fourth_character != root + } + character = scope:1060_fourth_character + } + lower_center_portrait = { + #Let's remove them when the option is no longer available + trigger = { + scope:1060_fifth_character != root + } + character = scope:1060_fifth_character + } + lower_right_portrait = { + #Let's remove them when the option is no longer available + trigger = { + scope:1060_sixth_character != root + } + character = scope:1060_sixth_character + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Can we _not_ repeat the loc? + 1025_set_and_check_hub_loc_tracker_scope_effect = { HUB = craftsmen } + #Find our weaponsmith + if = { + #Do we already have a weaponsmith? + limit = { + NOT = { exists = scope:laamp_weaponsmith_craftsman } + } + #Has this person been our weaponsmith in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_weaponsmith_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_weaponsmith_craftsman + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_weaponsmith_craftsman + } + #Otherwise find a weaponsmith in the pool + if = { + limit = { + NOT = { exists = scope:laamp_weaponsmith_craftsman } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + } + save_scope_as = laamp_weaponsmith_craftsman + } + } + #Otherwise create a weaponsmith + if = { + limit = { + NOT = { exists = scope:laamp_weaponsmith_craftsman } + } + #Create weaponsmith to stuff in pool + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_weaponsmith_craftsman + } + } + scope:laamp_weaponsmith_craftsman = { save_scope_as = 1060_fourth_character } + } + #And our armorer + if = { + #Do we already have an armorer? + limit = { + NOT = { exists = scope:laamp_armorer_craftsman } + } + #Has this person been our armorer in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_armorer_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_jeweler_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_armorer_craftsman + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_armorer_craftsman + } + #Otherwise find an armorer in the pool + if = { + limit = { + NOT = { exists = scope:laamp_armorer_craftsman } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + } + save_scope_as = laamp_armorer_craftsman + } + } + #Otherwise create an armorer + if = { + limit = { + NOT = { exists = scope:laamp_armorer_craftsman } + } + #Create armorer to stuff in pool + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_armorer_craftsman + } + } + scope:laamp_armorer_craftsman = { save_scope_as = 1060_fifth_character } + } + #And finally, our jeweler + if = { + #Do we already have a jeweler? + limit = { + NOT = { exists = scope:laamp_jeweler_craftsman } + } + #Has this person been our jeweler in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_jeweler_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_quartermaster_trigger = no + } + save_scope_as = laamp_jeweler_craftsman + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_jeweler_craftsman + } + #Otherwise find a jeweler in the pool + if = { + limit = { + NOT = { exists = scope:laamp_jeweler_craftsman } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + } + save_scope_as = laamp_jeweler_craftsman + } + } + #Otherwise create a jeweler + if = { + limit = { + NOT = { exists = scope:laamp_jeweler_craftsman } + } + #Create jeweler to stuff in pool + create_character = { + template = generic_peasant_character + location = scope:visiting_location + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + save_scope_as = laamp_jeweler_craftsman + } + } + scope:laamp_jeweler_craftsman = { save_scope_as = 1060_sixth_character } + } + #Rare: Spawn a spectacular Quartermaster + if = { + limit = { + can_employ_court_position_type = quartermaster_camp_officer + NOT = { has_variable = laamp_decision_1000_checked_for_quartermaster } + } + random_list = { + 80 = { + #No Quartermaster + } + 20 = { + trigger = { can_employ_court_position_type = quartermaster_camp_officer } + #Has this person been our quartermaster in the past 10 years? + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + save_temporary_scope_as = saved_character_check + #Let's avoid double-dipping + 1010_is_a_saved_quartermaster_trigger = yes + 1010_is_a_saved_merchant_trigger = no + 1010_is_a_saved_peddler_trigger = no + 1010_is_a_saved_crier_trigger = no + 1010_is_a_saved_storyteller_trigger = no + 1010_is_a_saved_thief_trigger = no + 1010_is_a_saved_healer_trigger = no + 1010_is_a_saved_clergy_trigger = no + 1010_is_a_saved_physician_trigger = no + 1010_is_a_saved_bodyguard_trigger = no + 1010_is_a_saved_weaponsmith_trigger = no + 1010_is_a_saved_armorer_trigger = no + 1010_is_a_saved_jeweler_trigger = no + } + save_scope_as = laamp_quartermaster_recruit + #Some more loc flavor shenanigans for these saved scopes + save_scope_as = laamp_recurring_quartermaster + } + #Otherwise find a quartermaster in the pool + if = { + limit = { + NOT = { exists = scope:laamp_quartermaster_recruit } + } + random_pool_character = { + province = scope:visiting_location + limit = { + 1010_basic_merchant_checks_trigger = yes + NOT = { has_trait = devoted } #Look, I like weaponsmith nuns as much as the next person, but it looked _slightly_ off + stewardship >= 15 + NOR = { + has_trait = generous + has_trait = profligate + has_trait = improvident + } + } + save_scope_as = laamp_quartermaster_recruit + } + } + #Or create a quartermaster + if = { + limit = { + NOT = { exists = scope:laamp_quartermaster_recruit } + } + #Create quartermaster to stuff in pool + create_character = { + template = bp1_yearly_2021_stewardship_person_template + location = scope:visiting_location + trait = arrogant + dynasty = none + culture = scope:visiting_location.culture + faith = scope:visiting_location.faith + stewardship = { decent_skill_rating high_skill_rating } + save_scope_as = laamp_quartermaster_recruit + } + scope:laamp_quartermaster_recruit ?= { + #Chance to add a malus trait to this spectatular being + if = { + limit = { + NOR = { + has_trait = possessed_1 + has_trait = lunatic_1 + has_trait = depressed_1 + has_trait = drunkard + has_trait = hashishiyah + has_trait = irritable + } + } + hidden_effect = { + random = { + chance = 20 + random_list = { + 10 = { add_trait = possessed_1 } + 10 = { add_trait = lunatic_1 } + 10 = { add_trait = depressed_1 } + 10 = { add_trait = drunkard } + 10 = { add_trait = hashishiyah } + 10 = { add_trait = irritable } + } + } + } + } + } + } + scope:laamp_quartermaster_recruit = { save_scope_as = 1060_third_character } + } + } + #No decision-scumming + set_variable = { + name = laamp_decision_1000_checked_for_quartermaster + days = visit_settlement_cooldown_days + } + } + #Fourth portrait + if = { + limit = { + OR = { + #If we've already finished off the Weaponsmith + AND = { + scope:1060_fourth_character = scope:laamp_weaponsmith_craftsman + exists = scope:laamp_decision_bought_weapon + } + #And we did that before talking to the Quartermaster + AND = { + 1060_is_quartermaster_available_trigger = yes + scope:1060_fourth_character = root + } + } + } + #Put the Quartermaster in the slot, if they exist + if = { + limit = { 1060_is_quartermaster_available_trigger = yes } + scope:laamp_quartermaster_recruit = { save_scope_as = 1060_fourth_character } + #Hide the portrait with ROOT if they already are saved somewhere else + if = { + limit = { scope:1060_fifth_character ?= scope:laamp_quartermaster_recruit } + save_scope_as = 1060_fifth_character + } + #Hide the portrait with ROOT if they already are saved somewhere else + if = { + limit = { scope:1060_sixth_character ?= scope:laamp_quartermaster_recruit } + save_scope_as = 1060_sixth_character + } + } + #Otherwise hide the portrait with ROOT + else = { save_scope_as = 1060_fourth_character } + } + #Fifth portrait + if = { + limit = { + OR = { + #If we've already finished off the Armorer + AND = { + scope:1060_fifth_character = scope:laamp_armorer_craftsman + exists = scope:laamp_decision_bought_armor + } + #And we did that before talking to the Quartermaster + AND = { + 1060_is_quartermaster_available_trigger = yes + scope:1060_fifth_character = root + } + } + } + #Put the Quartermaster in the slot, if they exist + if = { + limit = { + 1060_is_quartermaster_available_trigger = yes + NOR = { + scope:1060_fourth_character ?= scope:laamp_quartermaster_recruit + scope:1060_sixth_character ?= scope:laamp_quartermaster_recruit + } + } + scope:laamp_quartermaster_recruit = { save_scope_as = 1060_fifth_character } + } + #Otherwise hide the portrait with ROOT + else = { save_scope_as = 1060_fifth_character } + } + #Sixth portrait + if = { + limit = { + OR = { + #If we've already finished off the Jeweler + AND = { + scope:1060_sixth_character = scope:laamp_jeweler_craftsman + exists = scope:laamp_decision_bought_accessory + } + #And we did that before talking to the Quartermaster + AND = { + 1060_is_quartermaster_available_trigger = yes + scope:1060_sixth_character = root + } + } + } + #Put the Quartermaster in the slot, if they exist + if = { + limit = { + 1060_is_quartermaster_available_trigger = yes + NOR = { + scope:1060_fourth_character ?= scope:laamp_quartermaster_recruit + scope:1060_fifth_character ?= scope:laamp_quartermaster_recruit + } + } + scope:laamp_quartermaster_recruit = { save_scope_as = 1060_sixth_character } + } + #Otherwise hide the portrait with ROOT + else = { save_scope_as = 1060_sixth_character } + } + } + #Visit Weaponsmith + option = { + name = { + text = { + first_valid = { + #Return to look at the weapons + triggered_desc = { + trigger = { exists = scope:been_to_weaponsmith } + desc = ep3_laamp_decision_event.1060.a_second + } + #First time looking at weapons + desc = ep3_laamp_decision_event.1060.a + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1060.a.cooldown.tt + NOT = { exists = scope:laamp_decision_bought_weapon } + } + } + show_as_unavailable = { always = yes } + reason = visit_weaponsmith + highlight_portrait = scope:laamp_weaponsmith_craftsman + custom_tooltip = ep3_laamp_decision_event.1060.a.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = craftsmen } + #Go to the Weaponsmith screen + trigger_event = ep3_laamp_decision_event.1061 + ai_chance = { base = 100 } + } + #Visit Armorer + option = { + name = { + text = { + first_valid = { + #Return to look at the armor + triggered_desc = { + trigger = { exists = scope:been_to_armorer } + desc = ep3_laamp_decision_event.1060.b_second + } + #First time looking at armor + desc = ep3_laamp_decision_event.1060.b + } + } + } + trigger = { + #Recruited the armorer + trigger_if = { + limit = { scope:laamp_decision_bought_armor ?= flag:no } + custom_tooltip = { + text = recruited_armorer.tt + always = no + } + } + #Been there, done that + trigger_else_if = { + limit = { scope:laamp_decision_bought_armor ?= flag:yes } + custom_tooltip = { + text = ep3_laamp_decision_event.1060.b.cooldown.tt + always = no + } + } + trigger_else = { exists = scope:laamp_armorer_craftsman } + } + show_as_unavailable = { always = yes } + reason = visit_armorsmith + highlight_portrait = scope:laamp_armorer_craftsman + custom_tooltip = ep3_laamp_decision_event.1060.b.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = craftsmen } + #Go to the Armorer screen + trigger_event = ep3_laamp_decision_event.1063 + ai_chance = { base = 100 } + } + #Visit Jeweler + option = { + name = { + text = { + first_valid = { + #Return to look at the accessories + triggered_desc = { + trigger = { exists = scope:been_to_jeweler } + desc = ep3_laamp_decision_event.1060.c_second + } + #First time looking at accessories + desc = ep3_laamp_decision_event.1060.c + } + } + } + trigger = { + custom_tooltip = { + text = ep3_laamp_decision_event.1060.c.cooldown.tt + NOT = { exists = scope:laamp_decision_bought_accessory } + } + } + show_as_unavailable = { always = yes } + reason = visit_jeweler + highlight_portrait = scope:laamp_jeweler_craftsman + custom_tooltip = ep3_laamp_decision_event.1060.c.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = craftsmen } + #Go to the Jeweler screen + trigger_event = ep3_laamp_decision_event.1065 + ai_chance = { base = 100 } + } + #Rare Option: Hire cheaper, skilled, Quartermaster + option = { + name = { + text = { + first_valid = { + #Return to talk to the Quartermaster + triggered_desc = { + trigger = { exists = scope:been_to_quartermaster } + desc = ep3_laamp_decision_event.1060.d_second + } + #First time talking to the Quartermaster + desc = ep3_laamp_decision_event.1060.d + } + } + } + trigger = { + exists = scope:laamp_quartermaster_recruit + NOT = { exists = scope:laamp_decision_recruited_quartermaster } + } + reason = unlocked_quartermaster + highlight_portrait = scope:laamp_quartermaster_recruit + custom_tooltip = ep3_laamp_decision_event.1060.d.tt + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = craftsmen } + #For the Quartermaster screen + trigger_event = ep3_laamp_decision_event.1067 + ai_chance = { base = 500 } + } + #I want to do something else + option = { + name = { + text = { + first_valid = { + #Nothing left to do + triggered_desc = { + trigger = { 1060_done_with_craftsmen_trigger = yes } + desc = ep3_laamp_decision_event.1060.e_second + } + #Back to main square + desc = ep3_laamp_decision_event.1060.e + } + } + } + #Have we done everything? Are we closing off the option? + if = { + limit = { 1060_done_with_craftsmen_trigger = yes } + #Clean up unnecessary variables and close off the option + 1060_finished_craftsmen_effect = yes + } + #*Withered* - This needs to be done manually because the scope isn't saved before the next event is triggered if it's run in After = { ... } + 1030_save_hub_scope_effect = { HUB = craftsmen } + #Go back to the main event + 1000_return_to_main_effect = yes + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = greedy + has_trait = paranoid + } + add = 300 + } + } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:craftsmen } + } +} + + +#Identify the weapon artifacts +scripted_effect 1061_set_weapon_variable_effect = { + set_variable = { + name = 1061_laamp_decision_weapon + days = visit_settlement_cooldown_days + } +} + +#Simple enough +scripted_trigger 1061_is_rare_item_trigger = { + OR = { + rarity = masterwork + rarity = famed + rarity = illustrious + } +} + +#Chance to flush the inventory to simulate someone else buying the item or similar. Refresh the stock. +scripted_effect 1061_chance_to_flush_inventory_effect = { + hidden_effect = { + random_list = { + #We didn't buy this one + 50 = { + trigger = { + $FIRST_ITEM$ = { artifact_owner = $VENDOR$ } + } + #Less chance to destroy premium stuff + modifier = { + $FIRST_ITEM$ = { 1061_is_rare_item_trigger = yes } + factor = 0.5 + } + destroy_artifact = $FIRST_ITEM$ + } + #Or this one + 50 = { + trigger = { + $SECOND_ITEM$ = { artifact_owner = $VENDOR$ } + } + #Less chance to destroy premium stuff + modifier = { + $SECOND_ITEM$ = { 1061_is_rare_item_trigger = yes } + factor = 0.5 + } + destroy_artifact = $SECOND_ITEM$ + } + #Nor this one? + 50 = { + trigger = { + $THIRD_ITEM$ = { artifact_owner = $VENDOR$ } + } + #Less chance to destroy premium stuff + modifier = { + $THIRD_ITEM$ = { 1061_is_rare_item_trigger = yes } + factor = 0.5 + } + destroy_artifact = $THIRD_ITEM$ + } + } + } +} + +#Chance for the vendor to have a real gem, once in a while +scripted_effect 1061_buff_item_modifiers_effect = { + #Masterwork modifiers + if = { + limit = { rarity = masterwork } + if = { + limit = { has_variable = 1061_laamp_decision_weapon } + add_scaled_artifact_modifier_prowess_effect = yes + add_scaled_artifact_modifier_combat_effect = yes + } + if = { + limit = { has_variable = 1063_laamp_decision_armor } + add_scaled_artifact_modifier_negate_prowess_penalty_effect = yes + add_scaled_artifact_modifier_terrain_advantage_effect = yes + } + if = { + limit = { has_variable = 1065_laamp_decision_accessory } + add_scaled_artifact_modifier_hire_mercenary_effect = yes + add_scaled_artifact_modifier_prestige_effect = yes + } + } +} + +#We return to the craftsmen event to peruse other options +scripted_effect 1061_return_to_craftsmen_effect = { + custom_tooltip = ep3_laamp_decision_event.1061.return.tt + trigger_event = ep3_laamp_decision_event.1060 +} + +#Set the correct variable to block off the Weaponsmith option and remove the desc flavor variable +scripted_effect 1061_bought_weapon_effect = { + scope:1061_first_weapon = { remove_variable ?= 1061_weapon_value } + scope:1061_second_weapon = { remove_variable ?= 1061_weapon_value } + scope:1061_third_weapon = { remove_variable ?= 1061_weapon_value } + save_scope_as = laamp_decision_bought_weapon + #Simulate shifting inventory + 1061_chance_to_flush_inventory_effect = { + FIRST_ITEM = scope:1061_first_weapon + SECOND_ITEM = scope:1061_second_weapon + THIRD_ITEM = scope:1061_third_weapon + VENDOR = scope:laamp_weaponsmith_craftsman + } + #Go back to craftsmen district + hidden_effect = { 1061_return_to_craftsmen_effect = yes } +} + +#The actual transfer +scripted_effect 1061_buy_item_effect = { + #Weapon + if = { + limit = { has_variable = 1061_laamp_decision_weapon } + root = { + pay_short_term_gold = { + target = scope:laamp_weaponsmith_craftsman + gold = prev.var:1061_weapon_value #Is set via the 1041_set_item_value_effect on the artifact itself + } + } + } + #Armor + if = { + limit = { has_variable = 1063_laamp_decision_armor } + root = { + pay_short_term_gold = { + target = scope:laamp_armorer_craftsman + gold = prev.var:1063_armor_value + } + } + } + #Accessory + if = { + limit = { has_variable = 1065_laamp_decision_accessory } + root = { + pay_short_term_gold = { + target = scope:laamp_jeweler_craftsman + gold = prev.var:1065_accessory_value + } + } + } + set_owner = root +} + + +#Visit Weaponsmith +ep3_laamp_decision_event.1061 = { + type = character_event + title = ep3_laamp_decision_event.1061.t + window = visit_settlement_window + desc = { + first_valid = { + #We've returned to this scene, now what + #RETURN: Generics + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_weaponsmith + scope:weaponsmith_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1061.desc_returned_01 + } + triggered_desc = { + trigger = { scope:weaponsmith_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1061.desc_returned_02 + } + } + #FIRST TIME: We've seen this weaponsmith before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_weaponsmith_craftsman + NOT = { exists = scope:been_to_weaponsmith } + } + desc = ep3_laamp_decision_event.1061.desc_reused_weaponsmith + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_weaponsmith } + } + desc = ep3_laamp_decision_event.1061.desc + } + } + } + theme = stewardship + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_martial" } + override_background = { reference = armory } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + animation = marshal_random_weapon + } + center_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:laamp_weaponsmith_craftsman + camera = camera_event_scheme_far_right + animation = inspect_weapon + } + artifact = { + target = scope:1061_first_weapon + position = lower_left_portrait + } + artifact = { + target = scope:1061_second_weapon + position = lower_center_portrait + } + artifact = { + target = scope:1061_third_weapon + position = lower_right_portrait + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + location.province_owner = { save_scope_as = bg_override_char } + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = weaponsmith } + #Find our weapons + if = { + limit = { + NOT = { exists = scope:1061_first_weapon } + } + scope:laamp_weaponsmith_craftsman = { + #Have we created weapons recently, which we can pull? + if = { + limit = { + any_character_artifact ?= { has_variable = 1061_laamp_decision_weapon } + } + every_character_artifact = { + limit = { has_variable = 1061_laamp_decision_weapon } + add_to_list = list_of_potential_weapons + } + random_in_list = { + list = list_of_potential_weapons + save_scope_as = 1061_first_weapon + } + random_in_list = { + list = list_of_potential_weapons + limit = { + this != scope:1061_first_weapon + } + save_scope_as = 1061_second_weapon + } + random_in_list = { + list = list_of_potential_weapons + limit = { + NOR = { + this = scope:1061_first_weapon + this = scope:1061_second_weapon + } + } + save_scope_as = 1061_third_weapon + } + } + #If we don't have any old weapons; generate new ones! + hidden_effect_new_object = { #HAZMAT SUIT OF ERROR SUPRESSION + if = { + limit = { + NOT = { exists = scope:1061_first_weapon } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_weaponsmith_craftsman } + #Generate weapon + create_artifact_weapon_effect = { + OWNER = scope:laamp_weaponsmith_craftsman + CREATOR = scope:laamp_weaponsmith_craftsman + SET_WEAPON_TYPE = flag:no + } + #Finalization + scope:newly_created_artifact ?= { + 1061_set_weapon_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1061_first_weapon + } + } + if = { + limit = { + NOT = { exists = scope:1061_second_weapon } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_weaponsmith_craftsman } + #Generate weapon + create_artifact_weapon_effect = { + OWNER = scope:laamp_weaponsmith_craftsman + CREATOR = scope:laamp_weaponsmith_craftsman + SET_WEAPON_TYPE = flag:no + } + #Finalization + scope:newly_created_artifact ?= { + 1061_set_weapon_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1061_second_weapon + } + } + if = { + limit = { + NOT = { exists = scope:1061_third_weapon } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_weaponsmith_craftsman } + #Generate weapon + create_artifact_weapon_effect = { + OWNER = scope:laamp_weaponsmith_craftsman + CREATOR = scope:laamp_weaponsmith_craftsman + SET_WEAPON_TYPE = flag:no + } + #Finalization + scope:newly_created_artifact ?= { + 1061_set_weapon_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1061_third_weapon + } + } + #Set the value of the weapons + scope:1061_first_weapon = { 1041_set_item_value_effect = yes } + scope:1061_second_weapon = { 1041_set_item_value_effect = yes } + scope:1061_third_weapon = { 1041_set_item_value_effect = yes } + } + } + #Remember the weaponsmith + 1010_remember_vendor_character_effect = { GUILD = weaponsmith CHARACTER = scope:laamp_weaponsmith_craftsman } + } + } + #Weapon #1 + option = { + name = ep3_laamp_decision_event.1061.a + #Pay gold, transfer weapon + scope:1061_first_weapon = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1061_bought_weapon_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1061_first_weapon.var:1061_weapon_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Weapon #2 + option = { + name = ep3_laamp_decision_event.1061.b + #Pay gold, transfer weapon + scope:1061_second_weapon = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1061_bought_weapon_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1061_second_weapon.var:1061_weapon_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Weapon #3 + option = { + name = ep3_laamp_decision_event.1061.c + #Pay gold, transfer weapon + scope:1061_third_weapon = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1061_bought_weapon_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1061_third_weapon.var:1061_weapon_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #I want to visit another craftsman + option = { + name = ep3_laamp_decision_event.1061.d + #Sets variables and returns us to craftman screen + 1031_been_to_effect = { GUILD = weaponsmith } + ai_chance = { + base = 200 + modifier = { + has_trait = greedy + factor = 2 + } + } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:weaponsmith } + } +} + + +#Identify the armor artifacts +scripted_effect 1063_set_armor_variable_effect = { + set_variable = { + name = 1063_laamp_decision_armor + days = visit_settlement_cooldown_days + } +} + +#Set the correct variable to block off the Armorer option and remove the desc flavor variable +scripted_effect 1063_bought_armor_effect = { + scope:1063_first_armor = { remove_variable ?= 1063_armor_value } + scope:1063_second_armor = { remove_variable ?= 1063_armor_value } + scope:1063_third_armor = { remove_variable ?= 1063_armor_value } + save_scope_value_as = { + name = laamp_decision_bought_armor + value = flag:yes + } + #Simulate shifting inventory + 1061_chance_to_flush_inventory_effect = { + FIRST_ITEM = scope:1063_first_armor + SECOND_ITEM = scope:1063_second_armor + THIRD_ITEM = scope:1063_third_armor + VENDOR = scope:laamp_armorer_craftsman + } + #Go back to craftsmen district + hidden_effect = { 1061_return_to_craftsmen_effect = yes } +} + + +#Visit Armorer +ep3_laamp_decision_event.1063 = { + type = character_event + title = ep3_laamp_decision_event.1063.t + window = visit_settlement_window + desc = { + first_valid = { + #We've returned to this scene, now what + #RETURN: Generics + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_armorer + scope:armorer_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1063.desc_returned_01 + } + triggered_desc = { + trigger = { scope:armorer_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1063.desc_returned_02 + } + } + #FIRST TIME: We've seen this armorer before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_armorer_craftsman + NOT = { exists = scope:been_to_armorer } + } + desc = ep3_laamp_decision_event.1063.desc_reused_armorer + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_armorer } + } + desc = ep3_laamp_decision_event.1063.desc + } + } + } + theme = stewardship + override_sound = { reference = "event:/SFX/Events/Themes/sfx_event_theme_type_generic" } + override_background = { reference = armory } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + animation = personality_content + } + center_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:laamp_armorer_craftsman + camera = camera_event_scheme_far_right + animation = personality_bold + } + artifact = { + target = scope:1063_first_armor + position = lower_left_portrait + } + artifact = { + target = scope:1063_second_armor + position = lower_center_portrait + } + artifact = { + target = scope:1063_third_armor + position = lower_right_portrait + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + location.province_owner = { save_scope_as = bg_override_char } + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = armorer } + #Find our armors + if = { + limit = { + NOT = { exists = scope:1063_first_armor } + } + scope:laamp_armorer_craftsman = { + #Have we created armors recently, which we can pull? + if = { + limit = { + any_character_artifact ?= { has_variable = 1063_laamp_decision_armor } + } + every_character_artifact = { + limit = { has_variable = 1063_laamp_decision_armor } + add_to_list = list_of_potential_armors + } + random_in_list = { + list = list_of_potential_armors + save_scope_as = 1063_first_armor + } + random_in_list = { + list = list_of_potential_armors + limit = { + this != scope:1063_first_armor + } + save_scope_as = 1063_second_armor + } + random_in_list = { + list = list_of_potential_armors + limit = { + NOR = { + this = scope:1063_first_armor + this = scope:1063_second_armor + } + } + save_scope_as = 1063_third_armor + } + } + #If we don't have any old armors; generate new ones! + hidden_effect_new_object = { #HAZMAT SUIT OF ERROR SUPRESSION + if = { + limit = { + NOT = { exists = scope:1063_first_armor } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_armorer_craftsman } + #Generate armor + create_artifact_armor_effect = { + OWNER = scope:laamp_armorer_craftsman + CREATOR = scope:laamp_armorer_craftsman + SET_ARMOR_TYPE = flag:no + } + #Finalization + scope:newly_created_artifact ?= { + 1063_set_armor_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1063_first_armor + } + } + if = { + limit = { + NOT = { exists = scope:1063_second_armor } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_armorer_craftsman } + #Generate armor + create_artifact_armor_effect = { + OWNER = scope:laamp_armorer_craftsman + CREATOR = scope:laamp_armorer_craftsman + SET_ARMOR_TYPE = flag:armor_type_lamellar + } + #Finalization + scope:newly_created_artifact ?= { + 1063_set_armor_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1063_second_armor + } + } + if = { + limit = { + NOT = { exists = scope:1063_third_armor } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_armorer_craftsman } + #Generate armor + create_artifact_armor_effect = { + OWNER = scope:laamp_armorer_craftsman + CREATOR = scope:laamp_armorer_craftsman + SET_ARMOR_TYPE = flag:armor_type_scale + } + #Finalization + scope:newly_created_artifact ?= { + 1063_set_armor_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1063_third_armor + } + } + #Set the value of the armors + scope:1063_first_armor = { 1041_set_item_value_effect = yes } + scope:1063_second_armor = { 1041_set_item_value_effect = yes } + scope:1063_third_armor = { 1041_set_item_value_effect = yes } + } + } + #Remember the armorer + 1010_remember_vendor_character_effect = { GUILD = armorer CHARACTER = scope:laamp_armorer_craftsman } + } + } + #Armor #1 + option = { + name = ep3_laamp_decision_event.1063.a + #Pay gold, transfer armor + scope:1063_first_armor = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1063_bought_armor_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1063_first_armor.var:1063_armor_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Armor #2 + option = { + name = ep3_laamp_decision_event.1063.b + #Pay gold, transfer armor + scope:1063_second_armor = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1063_bought_armor_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1063_second_armor.var:1063_armor_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Armor #3 + option = { + name = ep3_laamp_decision_event.1063.c + #Pay gold, transfer armor + scope:1063_third_armor = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1063_bought_armor_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1063_third_armor.var:1063_armor_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #TRIGGERED OPTION: Attempt to recruit the armorer + option = { + name = ep3_laamp_decision_event.1063.d + trigger = { + custom_description = { + text = not_have_armorer_building + can_employ_court_position_type = armorer_camp_officer + } + } + reason = unlocked_armorer + pay_short_term_gold = { + target = scope:laamp_armorer_craftsman + gold = minor_gold_value + } + hidden_effect = { + reverse_add_opinion = { + target = scope:laamp_armorer_craftsman + modifier = recruited_me_opinion + opinion = 30 + } + } + add_courtier = scope:laamp_armorer_craftsman + #The actual effect happens in after + show_as_tooltip = { + camp_officer_grant_effect = { + EMPLOYER = root + POS = armorer + CANDIDATE = scope:laamp_armorer_craftsman + } + } + #Sets variables and returns us to craftman screen + save_scope_value_as = { + name = laamp_decision_bought_armor + value = flag:no + } + #Go back to craftsmen district + hidden_effect = { 1061_return_to_craftsmen_effect = yes } + ai_chance = { + base = 100 + modifier = { + short_term_gold < minor_gold_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + modifier = { + employs_court_position = armorer_camp_officer + factor = 0 + } + } + } + #I want to visit another craftsman + option = { + name = ep3_laamp_decision_event.1063.e + #Sets variables and returns us to craftman screen + 1031_been_to_effect = { GUILD = armorer } + ai_chance = { + base = 200 + modifier = { + has_trait = greedy + factor = 2 + } + } + } + after = { + if = { + limit = { scope:laamp_decision_bought_armor ?= flag:no } + #Appoint them + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:laamp_armorer_craftsman + COURT_POS = armorer_camp_officer + } + } + camp_officer_grant_effect = { + EMPLOYER = root + POS = armorer + CANDIDATE = scope:laamp_armorer_craftsman + } + } + } + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:armorer } + } +} + + +#Identify the accessory artifacts +scripted_effect 1065_set_accessory_variable_effect = { + set_variable = { + name = 1065_laamp_decision_accessory + days = visit_settlement_cooldown_days + } +} + +#Set the correct variable to block off the Jeweler option and remove the desc flavor variable +scripted_effect 1065_bought_accessory_effect = { + scope:1065_first_accessory = { remove_variable ?= 1065_accessory_value } + scope:1065_second_accessory = { remove_variable ?= 1065_accessory_value } + scope:1065_third_accessory = { remove_variable ?= 1065_accessory_value } + save_scope_as = laamp_decision_bought_accessory + #Simulate shifting inventory + 1061_chance_to_flush_inventory_effect = { + FIRST_ITEM = scope:1065_first_accessory + SECOND_ITEM = scope:1065_second_accessory + THIRD_ITEM = scope:1065_third_accessory + VENDOR = scope:laamp_jeweler_craftsman + } + #Go back to craftsmen district + hidden_effect = { 1061_return_to_craftsmen_effect = yes } +} + + +#Visit Jeweler +ep3_laamp_decision_event.1065 = { + type = character_event + title = ep3_laamp_decision_event.1065.t + window = visit_settlement_window + desc = { + first_valid = { + #We've returned to this scene, now what + #RETURN: Generics + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_jeweler + scope:jeweler_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1065.desc_returned_01 + } + triggered_desc = { + trigger = { scope:jeweler_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1065.desc_returned_02 + } + } + #FIRST TIME: We've seen this jeweler before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_jeweler_craftsman + NOT = { exists = scope:been_to_jeweler } + } + desc = ep3_laamp_decision_event.1065.desc_reused_jeweler + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_jeweler } + } + desc = ep3_laamp_decision_event.1065.desc + } + } + } + theme = stewardship + override_background = { reference = physicians_study } + left_portrait = { + trigger = { exists = scope:visiting_partner } + character = scope:visiting_partner + #It kinda makes sense, doesn't it? + triggered_animation = { + trigger = { + exists = scope:been_to_jeweler + scope:jeweler_loc_tracker ?= 0 + } + animation = interested + } + animation = war_over_tie + } + center_portrait = { + character = root + #It kinda makes sense, doesn't it? + triggered_animation = { + trigger = { + exists = scope:been_to_jeweler + scope:jeweler_loc_tracker ?= 0 + } + animation = disbelief + } + animation = thinking + } + right_portrait = { + character = scope:laamp_jeweler_craftsman + camera = camera_event_scheme_vs_center_look_left + #It kinda makes sense, doesn't it? + triggered_animation = { + trigger = { + exists = scope:been_to_jeweler + scope:jeweler_loc_tracker ?= 0 + } + animation = paranoia + } + triggered_animation = { + trigger = { scope:jeweler_loc_tracker ?= 1 } + animation = writing + } + animation = chess_cocky + } + artifact = { + target = scope:1065_first_accessory + position = lower_left_portrait + } + artifact = { + target = scope:1065_second_accessory + position = lower_center_portrait + } + artifact = { + target = scope:1065_third_accessory + position = lower_right_portrait + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + location.province_owner = { save_scope_as = bg_override_char } + #Can we _not_ repeat the loc? + 1025_set_and_check_scene_loc_tracker_scope_effect = { SCENE = jeweler } + #Find our accessories + if = { + limit = { + NOT = { exists = scope:1065_first_accessory } + } + scope:laamp_jeweler_craftsman = { + #Have we created accessories recently, which we can pull? + if = { + limit = { + any_character_artifact ?= { has_variable = 1065_laamp_decision_accessory } + } + every_character_artifact = { + limit = { has_variable = 1065_laamp_decision_accessory } + add_to_list = list_of_potential_accessories + } + random_in_list = { + list = list_of_potential_accessories + save_scope_as = 1065_first_accessory + } + random_in_list = { + list = list_of_potential_accessories + limit = { + this != scope:1065_first_accessory + } + save_scope_as = 1065_second_accessory + } + random_in_list = { + list = list_of_potential_accessories + limit = { + NOR = { + this = scope:1065_first_accessory + this = scope:1065_second_accessory + } + } + save_scope_as = 1065_third_accessory + } + } + #If we don't have any old accessories; generate new ones! + hidden_effect_new_object = { #HAZMAT SUIT OF ERROR SUPRESSION + if = { + limit = { + NOT = { exists = scope:1065_first_accessory } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_armorer_craftsman } + #Generate accessory + random_list = { + 50 = { + create_artifact_brooch_effect = { + OWNER = scope:laamp_jeweler_craftsman + SMITH = scope:laamp_jeweler_craftsman + } + } + 50 = { + create_artifact_ring_effect = { + OWNER = scope:laamp_jeweler_craftsman + SMITH = scope:laamp_jeweler_craftsman + } + } + 50 = { + create_artifact_necklace_effect = { + OWNER = scope:laamp_jeweler_craftsman + SMITH = scope:laamp_jeweler_craftsman + } + } + } + #Finalization + scope:newly_created_artifact ?= { + 1065_set_accessory_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1065_first_accessory + } + } + if = { + limit = { + NOT = { exists = scope:1065_second_accessory } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_armorer_craftsman } + #Generate accessory + random_list = { + 50 = { + create_artifact_crown_effect = { + OWNER = scope:laamp_jeweler_craftsman + SMITH = scope:laamp_jeweler_craftsman + } + } + 50 = { + create_artifact_regalia_effect = { + OWNER = scope:laamp_jeweler_craftsman + SMITH = scope:laamp_jeweler_craftsman + } + } + } + #Finalization + scope:newly_created_artifact ?= { + 1065_set_accessory_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1065_second_accessory + } + } + if = { + limit = { + NOT = { exists = scope:1065_third_accessory } + } + #Set rarity, maybe + 1041_chance_to_buff_item_rarity_effect = { VENDOR = scope:laamp_armorer_craftsman } + #Generate accessory + random_list = { + #Don't need two rings etc + 50 = { + trigger = { + NOT = { + scope:1065_first_accessory = { artifact_type = brooch } + } + } + create_artifact_brooch_effect = { + OWNER = scope:laamp_jeweler_craftsman + SMITH = scope:laamp_jeweler_craftsman + } + } + 50 = { + trigger = { + NOT = { + scope:1065_first_accessory = { artifact_type = ring } + } + } + create_artifact_ring_effect = { + OWNER = scope:laamp_jeweler_craftsman + SMITH = scope:laamp_jeweler_craftsman + } + } + 50 = { + trigger = { + NOT = { + scope:1065_first_accessory = { artifact_type = necklace } + } + } + create_artifact_necklace_effect = { + OWNER = scope:laamp_jeweler_craftsman + SMITH = scope:laamp_jeweler_craftsman + } + } + } + #Finalization + scope:newly_created_artifact ?= { + 1065_set_accessory_variable_effect = yes + 1061_buff_item_modifiers_effect = yes + #Don't need no notification about this + 1020_suppress_artifact_notifications_effect = yes + save_scope_as = 1065_third_accessory + } + } + #Set the value of the accessories + scope:1065_first_accessory = { 1041_set_item_value_effect = yes } + scope:1065_second_accessory = { 1041_set_item_value_effect = yes } + scope:1065_third_accessory = { 1041_set_item_value_effect = yes } + } + #Remember the jeweler + 1010_remember_vendor_character_effect = { GUILD = jeweler CHARACTER = scope:laamp_jeweler_craftsman } + } + } + } + #Accessory #1 + option = { + name = ep3_laamp_decision_event.1065.a + #Pay gold, transfer Accessory + scope:1065_first_accessory = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1065_bought_accessory_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1065_first_accessory.var:1065_accessory_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Accessory #2 + option = { + name = ep3_laamp_decision_event.1065.b + #Pay gold, transfer Accessory + scope:1065_second_accessory = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1065_bought_accessory_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1065_second_accessory.var:1065_accessory_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #Accessory #3 + option = { + name = ep3_laamp_decision_event.1065.c + #Pay gold, transfer Accessory + scope:1065_third_accessory = { 1061_buy_item_effect = yes } + #Then set correct variables and reroute us to the craftsmen + 1065_bought_accessory_effect = yes + ai_chance = { + base = 100 + modifier = { + short_term_gold < scope:1065_third_accessory.var:1065_accessory_value + short_term_gold < laamp_ai_spending_pants_value + factor = 0 + } + } + } + #I want to visit another craftsman + option = { + name = ep3_laamp_decision_event.1065.d + #Sets variables and returns us to craftman screen + 1031_been_to_effect = { GUILD = jeweler } + ai_chance = { + base = 200 + modifier = { + has_trait = greedy + factor = 2 + } + } + } + after = { + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:jeweler } + } +} + + +#Hire the Quartermaster, show/set the effects and variables +scripted_effect 1067_hire_quartermaster_effect = { + hidden_effect = { + reverse_add_opinion = { + target = scope:laamp_quartermaster_recruit + modifier = recruited_me_opinion + opinion = 30 + } + } + add_courtier = scope:laamp_quartermaster_recruit + #The actual effect happens in after + show_as_tooltip = { + camp_officer_grant_effect = { + EMPLOYER = root + POS = quartermaster + CANDIDATE = scope:laamp_quartermaster_recruit + } + } + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_recruited_quartermaster + value = flag:yes + } + #Go back to craftsmen district + hidden_effect = { 1061_return_to_craftsmen_effect = yes } +} + + +#Visit Quartermaster +ep3_laamp_decision_event.1067 = { + type = character_event + title = ep3_laamp_decision_event.1067.t + window = visit_settlement_window + desc = { + first_valid = { + #We've returned to this scene, now what + #RETURN: + random_valid = { + triggered_desc = { + trigger = { + exists = scope:been_to_quartermaster + scope:quartermaster_loc_tracker ?= 0 + } + desc = ep3_laamp_decision_event.1067.desc_returned_01 + } + triggered_desc = { + trigger = { scope:quartermaster_loc_tracker ?= 1 } + desc = ep3_laamp_decision_event.1067.desc_returned_02 + } + triggered_desc = { + trigger = { scope:quartermaster_loc_tracker ?= 2 } + desc = ep3_laamp_decision_event.1067.desc_returned_03 + } + } + #FIRST TIME: We've seen this quartermaster before + triggered_desc = { + trigger = { + exists = scope:laamp_recurring_quartermaster + NOT = { exists = scope:been_to_quartermaster } + } + desc = ep3_laamp_decision_event.1067.desc_reused_quartermaster + } + #FIRST TIME: + triggered_desc = { + trigger = { + NOT = { exists = scope:been_to_quartermaster } + } + desc = ep3_laamp_decision_event.1067.desc + } + } + } + theme = landless_adventurer + override_sound = { reference = "event:/MUSIC/Cues/Events/Positive/mx_cue_postive_effect" } + override_background = { reference = tavern } + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:laamp_quartermaster_recruit + animation = drink_goblet + } + immediate = { + #To prevent the character, for whatever reason, managing to not have the variable be removed when exiting VS + temporarily_lock_visit_settlement_effect = yes + #Run this once: Re-save the portrait so the Quartermaster is not the 1060_third_character (since they narratively moved to the tavern) + if = { + limit = { scope:1060_third_character = scope:laamp_quartermaster_recruit } + #Overwrite the portrait with ROOT to disable it + save_scope_as = 1060_third_character + #Remember the Quartermaster + 1010_remember_vendor_character_effect = { GUILD = quartermaster CHARACTER = scope:laamp_quartermaster_recruit } + } + #Can we _not_ repeat the loc? + 1025_set_and_check_hub_loc_tracker_scope_effect = { HUB = quartermaster } #This is only a hub because it has 3 random locs + } + #Pay up + option = { + name = ep3_laamp_decision_event.1067.a + pay_short_term_gold = { + target = scope:laamp_quartermaster_recruit + gold = minor_gold_value + } + #Wrap effect to hire 'em and also set up variables + 1067_hire_quartermaster_effect = yes + ai_chance = { + base = 100 + modifier = { + any_courtier = { count >= many_followers_value } + factor = 0 + } + } + } + #I have a sizeable camp for you to manage + option = { + name = ep3_laamp_decision_event.1067.b + trigger = { + custom_tooltip = { + text = not_enough_followers.tt + any_courtier = { count >= many_followers_value } + } + } + reason = many_followers + #_Oh noes_ + show_as_unavailable = { always = yes } + #Wrap effect to hire 'em and also set up variables + 1067_hire_quartermaster_effect = yes + ai_chance = { + base = 1000 #Just do it + } + } + #Intrigue duel + option = { + name = ep3_laamp_decision_event.1067.c + duel = { + skill = intrigue + value = average_skill_rating + #Success: Hire 'em up + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamp_decision_event.1067.c.success + send_interface_toast = { + title = ep3_laamp_decision_event.1067.c.success + left_icon = root + right_icon = scope:laamp_quartermaster_recruit + #Yippee! + 1067_hire_quartermaster_effect = yes + } + } + #Failure: Bye, now + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -20 + } + desc = ep3_laamp_decision_event.1067.c.failure + send_interface_toast = { + type = event_toast_text_bad + title = ep3_laamp_decision_event.1067.c.failure + desc = ep3_laamp_decision_event.1067.c.failure.tt + left_icon = root + right_icon = scope:laamp_quartermaster_recruit + #Oh well + custom_tooltip = ep3_laamp_decision_event.1067.c.failure.tt + #This 'finished' is different since it changes between flag:yes and flag:no + save_scope_value_as = { + name = laamp_decision_recruited_quartermaster + value = flag:no + } + 1061_return_to_craftsmen_effect = yes + } + } + } + ai_chance = { + base = 100 + modifier = { + any_courtier = { count >= many_followers_value } + factor = 0 + } + } + } + #Let's not + option = { + name = ep3_laamp_decision_event.1067.d + #Sets variables and returns us to craftman screen + 1031_been_to_effect = { GUILD = quartermaster } + ai_chance = { + base = 100 + modifier = { + any_courtier = { count >= many_followers_value } + factor = 0 + } + } + } + after = { + if = { + limit = { scope:laamp_decision_recruited_quartermaster ?= flag:yes } + #Appoint them + if = { + limit = { + can_appoint_char_to_court_position = { + CHAR = scope:laamp_quartermaster_recruit + COURT_POS = quartermaster_camp_officer + } + } + camp_officer_grant_effect = { + EMPLOYER = root + POS = quartermaster + CANDIDATE = scope:laamp_quartermaster_recruit + } + } + } + #What was our last location + 1000_update_last_location_effect = { LOCATION_FLAG = flag:quartermaster } + } +} + + +###################################################################### +# END +###################################################################### + + +#Seasoned Visitor Decision + +scripted_effect 1100_book_creation_effect = { + if = { + limit = { + has_variable = poi_visited + } + if = { + limit = { + artifacts_use_indian_books_trigger = yes + } + create_artifact = { + name = marco_polo_book_title + type = journal + template = marco_polo_book + creator = root + description = marco_polo_book_desc + visuals = indian_book + save_scope_as = newly_created_artifact + modifier = artifact_monthly_prestige_1_modifier + wealth = 50 + quality = 10 + } + } + else = { + create_artifact = { + name = marco_polo_book_title + type = journal + template = marco_polo_book + creator = root + description = marco_polo_book_desc + visuals = book + save_scope_as = newly_created_artifact + modifier = artifact_monthly_prestige_1_modifier + wealth = 50 + quality = 10 + } + } + hidden_effect = { + if = { + limit = { + var:poi_visited >= 60 + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_lifestyle_xp_4_modifier + set_artifact_rarity = illustrious + } + } + else_if = { + limit = { + var:poi_visited >= 48 + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_lifestyle_xp_3_modifier + set_artifact_rarity = famed + } + } + else_if = { + limit = { + var:poi_visited >= 36 + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_lifestyle_xp_2_modifier + set_artifact_rarity = masterwork + } + } + else_if = { + limit = { + var:poi_visited >= 24 + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_monthly_lifestyle_xp_1_modifier + set_artifact_rarity = common + } + } + + scope:newly_created_artifact = { + remove_artifact_modifier = artifact_monthly_prestige_1_modifier + } + } + } +} + +scripted_effect 1100_lifestyle_perk_effect = { + if = { + limit = { + has_variable = poi_visited + } + if = { + limit = { + var:poi_visited >= 56 + } + add_relevant_lifestyle_perk_point_effect = { NUMBER = 5 } + } + else_if = { + limit = { + var:poi_visited >= 48 + } + add_relevant_lifestyle_perk_point_effect = { NUMBER = 4 } + } + else_if = { + limit = { + var:poi_visited >= 40 + } + add_relevant_lifestyle_perk_point_effect = { NUMBER = 3 } + } + else_if = { + limit = { + var:poi_visited >= 32 + } + add_relevant_lifestyle_perk_point_effect = { NUMBER = 2 } + } + else_if = { + limit = { + var:poi_visited >= 24 + } + add_relevant_lifestyle_perk_point_effect = { NUMBER = 1 } + } + } +} + +ep3_laamp_decision_event.1100 = { + type = character_event + title = ep3_laamp_decision_event.1100.t + desc = ep3_laamp_decision_event.1100.desc + window = visit_settlement_window + theme = travel + override_background = { reference = relaxing_room } + + left_portrait = { + character = root + animation = writing + } + + immediate = { + add_character_flag = had_seasoned_visitor_decision + } + + option = { #I will take it to my grave + name = ep3_laamp_decision_event.1100.a + flavor = ep3_laamp_decision_event.1100.a.flavor + custom_tooltip = ep3_laamp_decision_event.1100.a.desc + 1100_lifestyle_perk_effect = yes + + ai_chance = { + base = 50 + } + } + + option = { #I will write it down for future generations + name = ep3_laamp_decision_event.1100.b + flavor = ep3_laamp_decision_event.1100.b.flavor + 1100_book_creation_effect = yes + custom_tooltip = ep3_laamp_decision_event.1100.b.desc + + ai_chance = { + base = 100 + } + } + + option = { #Postpone the decision + name = ep3_laamp_decision_event.1100.c + flavor = ep3_laamp_decision_event.1100.c.flavor + custom_tooltip = ep3_laamp_decision_event.1100.c.desc + + remove_character_flag = had_seasoned_visitor_decision + + hidden_effect = { + add_prestige_no_experience = 1500 + add_gold = 500 + } + + ai_chance = { + base = 0 + } + } +} + +#Zealous Missionary Decision + +ep3_laamp_decision_event.1101 = { + type = character_event + title = ep3_laamp_decision_event.1101.t + desc = ep3_laamp_decision_event.1101.desc + window = visit_settlement_window + theme = faith + override_background = { reference = holy_site_generic } + + left_portrait = { + character = root + animation = prayer + } + + override_effect_2d = { + reference = legend_glow + } + + immediate = { + location = { + save_scope_as = holy_site_location + } + set_variable = { + name = holy_site_ascension + value = scope:holy_site_location + } + } + + option = { + name = ep3_laamp_decision_event.1101.a + custom_tooltip = ep3_laamp_decision_event.1101.a.desc + } +} + +ep3_laamp_decision_event.1102 = { + type = character_event + title = ep3_laamp_decision_event.1102.t + desc = ep3_laamp_decision_event.1102.desc + window = visit_settlement_window + theme = faith + override_background = { reference = terrain } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + learning >= 12 + } + animation = prayer + } + animation = personality_zealous + } + + immediate = { + add_character_flag = zealous_missionary_start + } + + trigger = { + has_variable = holy_site_ascension + } + + option = { + name = ep3_laamp_decision_event.1102.a + give_nickname = nick_the_missionary + custom_tooltip = ep3_laamp_decision_event.1102.a.desc + add_character_flag = { + flag = zealous_missionary_timer + years = 10 + } + trigger_event = ep3_laamp_decision_event.1103 + trigger_event = { + id = ep3_laamp_decision_event.1104 + months = 122 #2 months after the timer runs out + } + set_variable = { + name = num_counties_converted + value = 0 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = ep3_laamp_decision_event.1102.b + custom_tooltip = ep3_laamp_decision_event.1102.b.desc + remove_character_flag = zealous_missionary_start + ai_chance = { + base = 0 + } + } + +} +ep3_laamp_decision_event.1103 = { + type = character_event + title = ep3_laamp_decision_event.1103.t + window = visit_settlement_window + desc = { + random_valid = { + triggered_desc = { + trigger = { scope:current_location.county.faith = scope:current_location.county.holder.faith } + desc = ep3_laamp_decision_event.1103.desc + } + desc = ep3_laamp_decision_event.1103.desc.alternative + } + } + theme = faith + override_background = { reference = terrain } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + martial >= 12 + } + animation = inspect_weapon + } + triggered_animation = { + trigger = { + learning >= 12 + } + animation = prayer + } + triggered_animation = { + trigger = { + always = yes + } + animation = personality_zealous + } + } + + immediate = { + location = { + save_scope_as = current_location + } + } + + trigger = { #Double safeguard + has_character_flag = zealous_missionary_timer + government_has_flag = government_is_landless_adventurer + location ?= { + has_holding = yes + } + NOT = { + location.faith = root.faith + is_ai = yes + any_player = { + OR = { + this = location.county.holder + this = location.county.holder.top_liege + } + } + } + } + + option = { #pray very hard + name = { + text = { + random_valid = { + desc = ep3_laamp_decision_event.1103.a + desc = ep3_laamp_decision_event.1103.a.alternative + } + } + } + custom_tooltip = ep3_laamp_decision_event.1103.difficulty.desc + custom_tooltip = ep3_laamp_decision_event.1103.a.desc + + duel = { + skills = { diplomacy learning } + value = very_high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = { + subtract = location.county.county_opinion + } + } + modifier = { + factor = 0.75 + location.county.faith.religion = root.religion + } + modifier = { + factor = 0.75 + knows_language_of_culture = location.county.culture + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamp_decision_event.1103.a.success + left_icon = root + right_icon = location.county + location.county = { + set_county_faith = root.faith + } + ep3_hasan_advance_radicalism = yes + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = location.county.development_level + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamp_decision_event.1103.a.failure + left_icon = root + right_icon = location.county + add_stress = major_stress_gain + } + } + } + add_stress = miniscule_stress_gain + add_piety = { + value = 10 + multiply = location.county.development_level + min = 20 + } + + reverse_add_opinion = { + modifier = vengeful_opinion + opinion = -75 + target = location.county.holder + } + + ai_chance = { + base = 25 + modifier = { + add = root.learning + } + } + } + + option = { + trigger = { + root.faith = { + NOR = { + has_doctrine = tenet_dharmic_pacifism + has_doctrine = tenet_pacifism + } + } + + } + name = { + text = { + random_valid = { + desc = ep3_laamp_decision_event.1103.b + desc = ep3_laamp_decision_event.1103.b.alternative + } + } + } + flavor = ep3_laamp_decision_event.1103.b.flavor + custom_tooltip = ep3_laamp_decision_event.1103.difficulty.desc + custom_tooltip = ep3_laamp_decision_event.1103.b.desc + + duel = { + skills = { martial intrigue } + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = { + value = root.number_of_knights + multiply = 10 + } + } + modifier = { + add = root.current_military_strength + } + modifier = { + factor = 1.2 + root.faith = { + has_doctrine = tenet_armed_pilgrimages + } + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamp_decision_event.1103.a.success + left_icon = root + right_icon = location.county + location.county = { + set_county_faith = root.faith + } + ep3_hasan_advance_radicalism = yes + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = location.county.development_level + } + modifier = { + add = location.barony.building_max_garrison + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamp_decision_event.1103.a.failure + left_icon = root + right_icon = location.county + increase_wounds_effect = { REASON = fight } + random_courtier ?= { + increase_wounds_effect = { REASON = fight } + } + } + } + } + + add_piety = 50 + reverse_add_opinion = { + modifier = vengeful_opinion + opinion = -75 + target = location.county.holder + } + + + ai_chance = { + base = 50 + modifier = { + add = { + value = root.current_military_strength + multiply = 0.1 + } + } + modifier = { + add = { + value = location.barony.building_max_garrison + multiply = -0.1 + } + } + modifier = { + add = root.martial + } + } + } + + option = { + name = { + text = { + random_valid = { + desc = ep3_laamp_decision_event.1103.c + desc = ep3_laamp_decision_event.1103.c.alternative + } + } + } + flavor = ep3_laamp_decision_event.1103.c.flavor + + custom_tooltip = ep3_laamp_decision_event.1103.c.desc + + add_stress = minor_stress_gain + + ai_chance = { + base = 0 + } + } + + after = { + hidden_effect = { + if = { + limit = { + location.county.faith ?= root.faith + exists = var:num_counties_converted + } + change_variable = { + name = num_counties_converted + add = 1 + } + } + } + } +} + +ep3_laamp_decision_event.1104 = { + type = character_event + title = ep3_laamp_decision_event.1104.t + window = visit_settlement_window + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:success + } + desc = ep3_laamp_decision_event.1104.desc + } + triggered_desc = { + trigger = { + exists = scope:failure + } + desc = ep3_laamp_decision_event.1104.desc.failure + } + } + } + theme = faith + override_background = { reference = terrain } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:success + } + animation = happiness + } + triggered_animation = { + trigger = { + exists = scope:failure + } + animation = shame + } + } + + override_effect_2d = { + trigger = { + exists = scope:success + } + reference = legend_glow + } + + override_effect_2d = { + trigger = { + exists = scope:failure + } + reference = rain + } + + trigger = { + has_variable = zealous_missionary_start + NOT = { + has_variable = zealous_missionary_timer + } + } + + immediate = { + if = { + limit = { + has_variable = num_counties_converted + var:num_counties_converted >= 3 + } + save_scope_as = success + } + else = { + save_scope_as = failure + } + } + + option = { + trigger = { + exists = scope:success + } + name = ep3_laamp_decision_event.1104.a + add_piety = omega_piety_gain + add_trait = saint + } + + option = { + trigger = { + exists = scope:failure + } + name = ep3_laamp_decision_event.1104.b + + add_stress = monumental_stress_gain + add_piety_level = -5 + if = { + limit = { + has_nickname = nick_the_missionary + } + remove_nickname = yes + give_nickname = nick_the_unworthy + } + } + +} + +ep3_laamp_decision_event.1110 = { + type = character_event + title = ep3_laamp_decision_event.1110.t + window = visit_settlement_window + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:first_kill } + desc = ep3_laamp_decision_event.1110.desc.has_kill + } + desc = ep3_laamp_decision_event.1110.desc.hasnt_kill + } + desc = ep3_laamp_decision_event.1110.desc.outro + } + + theme = war + + left_portrait = { + character = root + animation = celebrate_sword + } + + override_background = { reference = battlefield } + + override_effect_2d = { + reference = legend_glow + } + + immediate = { + ordered_killed_character = { + order_by = days_since_death + save_scope_as = first_kill + } + } + + option = { + name = ep3_laamp_decision_event.1110.a + flavor = ep3_laamp_decision_event.1110.a.flavor + custom_tooltip = ep3_laamp_decision_event.1110.a.desc + add_character_flag = had_laamp_conq_decision + trigger_event = { + id = conqueror.0001 + months = 4 + } + spawn_army = { + men_at_arms = { + type = accolade_maa_vanguards + stacks = 2 + } + men_at_arms = { + type = accolade_maa_lancers + stacks = 2 + } + men_at_arms = { + type = accolade_maa_archers + stacks = 4 + } + inheritable = no + uses_supply = no + location = root.location + name = event_troop_default_name + } + if = { + limit = { + exists = location.kingdom.holder + } + add_pressed_claim = location.kingdom + start_war = { + cb = ep3_laamp_adventurer_kingdom_invasion + target = location.kingdom.holder + claimant = root + target_title = location.kingdom + target_title = location.kingdom.title_capital_county + } + } + else_if = { + limit = { + exists = location.duchy.holder + } + add_pressed_claim = location.duchy + start_war = { + cb = claim_cb + target = location.duchy.holder + claimant = root + target_title = location.duchy + target_title = location.duchy.title_capital_county + } + } + else_if = { + limit = { + exists = location.county.holder + } + add_pressed_claim = location.county + start_war = { + cb = claim_cb + target = location.county.holder + claimant = root + target_title = location.county + } + } + if = { + limit = { has_dlc_feature = legends } + create_legend_seed = { + type = heroic + quality = famed + chronicle = conqueror_chronicle + } + } + } +} + +ep3_laamp_decision_event.1120 = { + type = character_event + title = ep3_laamp_decision_event.1120.t + window = visit_settlement_window + desc = ep3_laamp_decision_event.1120.desc + + theme = intrigue + + left_portrait = { + character = root + animation = personality_dishonorable + } + + override_background = { reference = alley_night } + + override_effect_2d = { + reference = fog + } + + + immediate = { + become_bandit_king_decision_effect = yes + set_variable = { + name = maa_number + value = 0 + } + } + + option = { + name = ep3_laamp_decision_event.1120.a + flavor = ep3_laamp_decision_event.1120.a.flavor + + set_variable = { #error spam prevention + name = maa_number + value = 0 + } + + bandit_king_maa_spawn_effect = yes + } +} + +ep3_laamp_decision_event.1130 = { #begin city construction + type = character_event + title = ep3_laamp_decision_event.1130.t + window = visit_settlement_window + desc = ep3_laamp_decision_event.1130.desc + + theme = stewardship + + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = survey + } + + immediate = { + location = { + save_scope_as = city_location + } + } + + option = { #less go + name = ep3_laamp_decision_event.1130.a + custom_tooltip = ep3_laamp_decision_event.1130.a.desc + add_character_flag = laamp_city_builder + scope:city_location = { + begin_create_holding = { + type = castle_holding + } + set_variable = laamp_city_construction + } + + trigger_event = { + id = ep3_laamp_decision_event.1131 + months = 1 # Checked monthly in trigger_fail for event + } + trigger_event = { + id = ep3_laamp_decision_event.1133 + months = { 4 6 } + } + + ai_chance = { + base = 10 + } + } + + option = { #I'm a silly goose, nvm + name = ep3_laamp_decision_event.1130.b + add_gold = 400 + + ai_chance = { + base = 0 + } + } +} + +ep3_laamp_decision_event.1131 = { #city is finished, wat do + type = character_event + title = ep3_laamp_decision_event.1131.t + desc = ep3_laamp_decision_event.1131.desc + + theme = stewardship + + override_background = { reference = alley_day } + + left_portrait = { + character = root + animation = happiness + } + + trigger = { + scope:city_location = { + has_holding_type = castle_holding + } + } + + immediate = { #reward building spawn + save_scope_value_as = { + name = year_of_construction + value = current_year + } + + 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 = guilds + BUILDING = guild_halls + } + + laamp_city_builder_construction_effect = { + FLAG = prayer_hall + BUILDING = monastic_schools + } + } + + on_trigger_fail = { + if = { + limit = { + scope:city_location = { #somehow, the city is still being built + has_ongoing_construction = yes + NOT = { + has_holding = yes + } + } + } + trigger_event = { + id = ep3_laamp_decision_event.1131 + months = 1 + } + } + } + + option = { #well, actually imma get the whole county + name = ep3_laamp_decision_event.1131.a + + add_pressed_claim = scope:city_location.county + add_pressed_claim = scope:city_location.barony + start_war = { + cb = claim_cb + target = scope:city_location.county.holder + claimant = root + target_title = scope:city_location.county + target_title = scope:city_location.barony + } + + ai_chance = { + base = 0 + } + } + + option = { #the city existence is a reward enough + name = ep3_laamp_decision_event.1131.b + add_prestige = 2000 + give_nickname = nick_the_city_builder + custom_tooltip = ep3_laamp_decision_event.1131.b.desc + trigger_event = { + id = ep3_laamp_decision_event.1140 + months = { 1 1 } + } + remove_character_flag = laamp_city_builder + + ai_chance = { + base = 10 + } + } + + after = { + remove_character_flag = laamp_city_builder_guilds + remove_character_flag = laamp_city_builder_guilds_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_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 + } + +} + +ep3_laamp_decision_event.1133 = { #get a mill + type = character_event + title = ep3_laamp_decision_event.1133.t + window = visit_settlement_window + desc = ep3_laamp_decision_event.1133.desc + + theme = stewardship + + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = survey + } + + trigger = { + scope:city_location = { + has_ongoing_construction = yes + NOT = { + has_holding_type = castle_holding + } + } + OR = { + stewardship >= 18 + has_trait = architect + } + } + + on_trigger_fail = { + trigger_event = { + id = ep3_laamp_decision_event.1134 + months = { 4 6 } + } + } + + option = { #cool + name = ep3_laamp_decision_event.1133.a + add_character_flag = laamp_city_builder_mill + show_as_tooltip = { + scope:city_location = { + add_building = watermills_01 + } + } + remove_short_term_gold = 80 + + ai_chance = { + base = 0 + } + + } + + option = { #go for it! + name = ep3_laamp_decision_event.1133.b + add_character_flag = laamp_city_builder_mill_upgrade + show_as_tooltip = { + scope:city_location = { + add_building = watermills_03 + } + } + remove_short_term_gold = 200 + + ai_chance = { + base = 10 + } + } + + option = { #nah + name = ep3_laamp_decision_event.1133.c + + ai_chance = { + base = 0 + } + } + + after = { + trigger_event = { + id = ep3_laamp_decision_event.1134 + months = { 4 6 } + } + } + +} + +ep3_laamp_decision_event.1134 = { #get more settlers, main building upgrade + type = character_event + title = ep3_laamp_decision_event.1134.t + window = visit_settlement_window + desc = ep3_laamp_decision_event.1134.desc + + theme = stewardship + + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = survey + } + + trigger = { + scope:city_location = { + has_ongoing_construction = yes + NOT = { + has_holding_type = castle_holding + } + } + OR = { + piety_level >= 3 + prestige_level >= 3 + } + } + + on_trigger_fail = { + trigger_event = { + id = ep3_laamp_decision_event.1135 + months = { 4 6 } + } + } + + 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 } + } + remove_short_term_gold = 20 + if = { + limit = { + piety_level >= 3 + } + add_piety = -300 + } + else = { + add_prestige = -300 + } + + ai_chance = { + base = 0 + } + + } + + 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 } + } + remove_short_term_gold = 40 + if = { + limit = { + piety_level >= 3 + } + add_piety = -500 + } + else = { + add_prestige = -500 + } + + ai_chance = { + base = 10 + } + } + + option = { #nah + name = ep3_laamp_decision_event.1134.c + + ai_chance = { + base = 0 + } + } + + after = { + trigger_event = { + id = ep3_laamp_decision_event.1135 + months = { 4 6 } + } + } + +} + +ep3_laamp_decision_event.1135 = { #argue for more favorable land assigment from county ruler, get manor houses building + type = character_event + title = ep3_laamp_decision_event.1135.t + window = visit_settlement_window + desc = ep3_laamp_decision_event.1135.desc + + theme = stewardship + + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = survey + } + + right_portrait = { + character = scope:city_location.county.holder + animation = thinking + } + + trigger = { + scope:city_location = { + has_ongoing_construction = yes + NOT = { + has_holding_type = castle_holding + } + } + scope:city_location.county.holder = { + reverse_opinion = { + target = root + value >= 40 + } + } + NOR = { + scope:city_location = { + terrain = desert + terrain = desert_mountains + } + } + } + + option = { #cool + name = ep3_laamp_decision_event.1135.a + add_character_flag = laamp_city_builder_manor + show_as_tooltip = { + scope:city_location = { + add_building = farm_estates_01 + } + } + pay_short_term_gold = { + target = scope:city_location.county.holder + gold = 80 + } + remove_short_term_gold = 60 + + ai_chance = { + base = 0 + } + } + + option = { #go for it! + name = ep3_laamp_decision_event.1135.b + add_character_flag = laamp_city_builder_manor_upgrade + show_as_tooltip = { + scope:city_location = { + add_building = farm_estates_03 + } + } + pay_short_term_gold = { + target = scope:city_location.county.holder + gold = 120 + } + remove_short_term_gold = 220 + + ai_chance = { + base = 10 + } + } + + option = { #nah + name = ep3_laamp_decision_event.1135.c + + ai_chance = { + base = 0 + } + } + +} + +ep3_laamp_decision_event.1136 = { #utilize connections, get guildhall + type = character_event + title = ep3_laamp_decision_event.1136.t + window = visit_settlement_window + desc = ep3_laamp_decision_event.1136.desc + + orphan = yes + + theme = stewardship + + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = survey + } + + trigger = { + scope:city_location = { + has_ongoing_construction = yes + NOT = { + has_holding_type = castle_holding + } + } + prestige_level >= 3 + } + + on_trigger_fail = { + trigger_event = { + id = ep3_laamp_decision_event.1137 + months = { 4 6 } + } + } + + option = { #cool + name = ep3_laamp_decision_event.1136.a + add_character_flag = laamp_city_builder_guilds + show_as_tooltip = { + scope:city_location = { + add_building = guild_halls_01 + } + } + add_prestige = -400 + remove_short_term_gold = 120 + + ai_chance = { + base = 0 + } + + } + + option = { #go for it! + name = ep3_laamp_decision_event.1136.b + add_character_flag = laamp_city_builder_guilds_upgrade + show_as_tooltip = { + scope:city_location = { + add_building = guild_halls_03 + } + } + add_prestige = -600 + remove_short_term_gold = 200 + + ai_chance = { + base = 10 + } + } + + option = { #nah + name = ep3_laamp_decision_event.1136.c + + ai_chance = { + base = 0 + } + } + + after = { + trigger_event = { + id = ep3_laamp_decision_event.1137 + months = { 4 6 } + } + } + +} + +ep3_laamp_decision_event.1137 = { #utilize connections, get prayer hall + type = character_event + title = ep3_laamp_decision_event.1137.t + window = visit_settlement_window + desc = ep3_laamp_decision_event.1137.desc + + theme = stewardship + + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = survey + } + + trigger = { + scope:city_location = { + has_ongoing_construction = yes + NOT = { + has_holding_type = castle_holding + } + } + piety_level >= 3 + } + + option = { #cool + name = ep3_laamp_decision_event.1137.a + add_character_flag = laamp_city_builder_prayer_hall + show_as_tooltip = { + scope:city_location = { + add_building = monastic_schools_01 + } + } + add_piety = -400 + remove_short_term_gold = 120 + + ai_chance = { + base = 0 + } + + } + + option = { #go for it! + name = ep3_laamp_decision_event.1137.b + add_character_flag = laamp_city_builder_prayer_hall_upgrade + show_as_tooltip = { + scope:city_location = { + add_building = monastic_schools_03 + } + } + add_piety = -600 + remove_short_term_gold = 200 + + ai_chance = { + base = 10 + } + } + + option = { #nah + name = ep3_laamp_decision_event.1137.c + + ai_chance = { + base = 0 + } + } + +} + +ep3_laamp_decision_event.1140 = { #city pays dividend + hidden = yes + + trigger = { + has_government = landless_adventurer_government + current_year <= laamp_city_construction_year_value + } + + immediate = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamp_decision_event.1140.toast + left_icon = scope:city_location.barony + add_gold = { + value = 0 + add = { + value = 4 + multiply = scope:city_location.combined_building_level + } + add = { + value = 3 + multiply = scope:city_location.county.development_level + } + multiply = { # Slowly decrease over time, by 1% every year + value = { + value = laamp_city_construction_year_value + subtract = current_year + divide = 100 + } + } + min = 25 + max = 200 + } + } + primary_title.holder ?= { + trigger_event = { + id = ep3_laamp_decision_event.1140 + months = { 11 13 } + } + } + } +} + +################################################## +# Butcher Animals +# by Ewan Cowhig Croft +# 1201 - 1210 +################################################## + +scripted_effect 1201_prune_dog_stories_effect = { + remove_dog_story_modifiers_effect = yes + random_owned_story = { + type = story_cycle_pet_dog + hidden_effect = { end_story = yes } + } +} + + +# Your camp eats its dogs. +ep3_laamp_decision_event.1201 = { + type = character_event + title = ep3_laamp_decision_event.1201.t + desc = { + desc = ep3_laamp_decision_event.1201.desc.intro + first_valid = { + # There's a whole kennels being eaten, including our dog. + triggered_desc = { + trigger = { + exists = scope:kennels_gone + has_character_modifier = dog_story_modifier + } + desc = ep3_laamp_decision_event.1201.desc.eaten.kennels.have_dog + } + # There's a whole kennels being eaten, but we lack a dog. + triggered_desc = { + trigger = { exists = scope:kennels_gone } + desc = ep3_laamp_decision_event.1201.desc.eaten.kennels.no_dog + } + # There's one dog being eaten, and it's ours. + triggered_desc = { + trigger = { + scope:dogs_killed = 1 + has_character_modifier = dog_story_modifier + } + desc = ep3_laamp_decision_event.1201.desc.eaten.one.have_dog + } + # There's one dog being eaten, and it's someone else's. + triggered_desc = { + trigger = { scope:dogs_killed = 1 } + desc = ep3_laamp_decision_event.1201.desc.eaten.one.no_dog + } + # There's many dogs being eaten, one of them ours. + triggered_desc = { + trigger = { + scope:dogs_killed >= 4 + has_character_modifier = dog_story_modifier + } + desc = ep3_laamp_decision_event.1201.desc.eaten.many.have_dog + } + # There's many dogs being eaten, none of them ours. + triggered_desc = { + trigger = { scope:dogs_killed >= 4 } + desc = ep3_laamp_decision_event.1201.desc.eaten.many.no_dog + } + # There's a bare handful of dogs being eaten, one of them ours. + triggered_desc = { + trigger = { + scope:dogs_killed <= 3 + has_character_modifier = dog_story_modifier + } + desc = ep3_laamp_decision_event.1201.desc.eaten.some.have_dog + } + # There's a bare handful of dogs being eaten, none of them ours. + desc = ep3_laamp_decision_event.1201.desc.eaten.some.no_dog + } + desc = ep3_laamp_decision_event.1201.desc.outro + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = callous } + animation = dismissal + } + animation = stress + } + right_portrait = { + character = scope:portrait_char + animation = fear + } + + immediate = { + # Apply cooldown. + add_character_flag = { + flag = recently_ate_dogs + years = butcher_animals_decision_regular_cooldown_value + } + # Register how many provisions we'll get. + domicile = { + change_provisions = { + value = { + value = 0 + root = { + every_courtier = { + limit = { has_character_modifier = dog_story_modifier } + add = butcher_animals_decision_dog_provision_value + } + if = { + limit = { has_character_modifier = dog_story_modifier } + add = butcher_animals_decision_dog_provision_value + } + } + if = { + limit = { has_domicile_building = baggage_train_kennel } + add = butcher_animals_decision_dog_building_provision_value + } + } + } + } + # Sort our aesthetics. + ## How many dogs are we losing? + save_scope_value_as = { + name = dogs_killed + value = { + every_courtier = { + limit = { has_character_modifier = dog_story_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = dog_story_modifier } + add = 1 + } + } + } + ## Grab a portrait if possible. + random_courtier = { + limit = { + NOT = { has_trait = callous } + has_character_modifier = dog_story_modifier + } + weight = { + modifier = { + add = 1000 + OR = { + is_close_family_of = root + is_consort_of = root + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + } + save_scope_as = portrait_char + } + # Aaaand remove our dogs. + ## We do this separately in various blocks for proper tooltipping & linking. + every_courtier = { + custom = ep3_laamp_decision_event.1201.tt.followers_with_dogs + limit = { + NOT = { has_trait = callous } + has_character_modifier = dog_story_modifier + } + add_opinion = { + target = root + modifier = butcher_opinion + opinion = -25 + } + } + every_courtier = { + limit = { has_character_modifier = dog_story_modifier } + custom_tooltip = { + text = ep3_laamp_decision_event.1201.tt.dog_lost + subject = this + } + } + hidden_effect = { + every_courtier = { 1201_prune_dog_stories_effect = yes } + } + # Liquidate the kennels. + domicile = { + if = { + limit = { has_domicile_building = baggage_train_kennel } + remove_domicile_building = baggage_train_kennel + # Flag that this happened. + save_scope_value_as = { + name = kennels_gone + value = yes + } + } + } + } + + # Non-callous. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { has_character_modifier = dog_story_modifier } + desc = ep3_laamp_decision_event.1201.a.own_dog + } + desc = ep3_laamp_decision_event.1201.a + } + } + } + + # We do stress first because it's more if you eat your own pets. + if = { + limit = { has_character_modifier = dog_story_modifier } + # Goodbye, good boy. + custom_tooltip = { + text = ep3_laamp_decision_event.1201.tt.your_dog_lost + 1201_prune_dog_stories_effect = yes + } + stress_impact = { + base = massive_stress_gain + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = major_stress_gain + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + } + + # The AI only takes this if they have no other option. + ai_chance = { base = 0 } + } + + # Callous. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { has_character_modifier = dog_story_modifier } + desc = ep3_laamp_decision_event.1201.b.own_dog + } + desc = ep3_laamp_decision_event.1201.b + } + } + } + trigger = { has_trait = callous } + trait = callous + + # Eh, I can get another. + if = { + limit = { has_character_modifier = dog_story_modifier } + custom_tooltip = { + text = ep3_laamp_decision_event.1201.tt.your_dog_lost + 1201_prune_dog_stories_effect = yes + } + } + + stress_impact = { callous = massive_stress_impact_loss } + # If the AI is callous, they should always take this. + ai_chance = { base = 1000 } + } +} + +scripted_effect 1202_prune_cat_stories_effect = { + remove_cat_story_modifiers_effect = yes + random_owned_story = { + type = story_cycle_pet_cat + hidden_effect = { end_story = yes } + } +} + +# Your camp eats its cats. +ep3_laamp_decision_event.1202 = { + type = character_event + title = ep3_laamp_decision_event.1202.t + desc = { + desc = ep3_laamp_decision_event.1202.desc.intro + first_valid = { + # There's one cat being eaten, and it's ours. + triggered_desc = { + trigger = { + scope:cats_killed = 1 + has_character_modifier = cat_story_modifier + } + desc = ep3_laamp_decision_event.1202.desc.eaten.one.have_cat + } + # There's one cat being eaten, and it's someone else's. + triggered_desc = { + trigger = { scope:cats_killed = 1 } + desc = ep3_laamp_decision_event.1202.desc.eaten.one.no_cat + } + # There's many cats being eaten, one of them ours. + triggered_desc = { + trigger = { + scope:cats_killed >= 4 + has_character_modifier = cat_story_modifier + } + desc = ep3_laamp_decision_event.1202.desc.eaten.many.have_cat + } + # There's many cats being eaten, none of them ours. + triggered_desc = { + trigger = { scope:cats_killed >= 4 } + desc = ep3_laamp_decision_event.1202.desc.eaten.many.no_cat + } + # There's a bare handful of cats being eaten, one of them ours. + triggered_desc = { + trigger = { has_character_modifier = cat_story_modifier } + desc = ep3_laamp_decision_event.1202.desc.eaten.some.have_cat + } + # There's a bare handful of cats being eaten, none of them ours. + desc = ep3_laamp_decision_event.1202.desc.eaten.some.no_cat + } + desc = ep3_laamp_decision_event.1202.desc.outro + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = callous } + animation = dismissal + } + animation = stress + } + right_portrait = { + character = scope:portrait_char + animation = fear + } + + immediate = { + # Apply cooldown. + add_character_flag = { + flag = recently_ate_cats + years = butcher_animals_decision_regular_cooldown_value + } + # Register how many provisions we'll get. + domicile = { + change_provisions = { + value = { + value = 0 + root = { + every_courtier = { + limit = { has_character_modifier = cat_story_modifier } + add = butcher_animals_decision_cat_provision_value + } + if = { + limit = { has_character_modifier = cat_story_modifier } + add = butcher_animals_decision_cat_provision_value + } + } + } + } + } + # Sort our aesthetics. + ## How many cats are we losing? + save_scope_value_as = { + name = cats_killed + value = { + every_courtier = { + limit = { has_character_modifier = cat_story_modifier } + add = 1 + } + if = { + limit = { has_character_modifier = cat_story_modifier } + add = 1 + } + } + } + ## Grab a portrait if possible. + random_courtier = { + limit = { + NOT = { has_trait = callous } + has_character_modifier = cat_story_modifier + } + weight = { + modifier = { + add = 1000 + OR = { + is_close_family_of = root + is_consort_of = root + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + } + save_scope_as = portrait_char + } + # Aaaand remove our cats. + ## We do this separately in various blocks for proper tooltipping & linking. + every_courtier = { + custom = ep3_laamp_decision_event.1201.tt.followers_with_cats + limit = { + NOT = { has_trait = callous } + has_character_modifier = cat_story_modifier + } + add_opinion = { + target = root + modifier = butcher_opinion + opinion = -25 + } + } + every_courtier = { + limit = { has_character_modifier = cat_story_modifier } + custom_tooltip = { + text = ep3_laamp_decision_event.1202.tt.cat_lost + subject = this + } + } + hidden_effect = { + every_courtier = { 1202_prune_cat_stories_effect = yes } + } + } + + # Non-callous. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { has_character_modifier = cat_story_modifier } + desc = ep3_laamp_decision_event.1202.a.own_cat + } + desc = ep3_laamp_decision_event.1202.a + } + } + } + + # We do stress first because it's more if you eat your own pets. + if = { + limit = { has_character_modifier = cat_story_modifier } + # Our regal companionship is ended. + custom_tooltip = { + text = ep3_laamp_decision_event.1202.tt.your_cat_lost + 1202_prune_cat_stories_effect = yes + } + stress_impact = { + base = massive_stress_gain + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = major_stress_gain + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + } + + # The AI only takes this if they have no other option. + ai_chance = { base = 0 } + } + + # Callous. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { has_character_modifier = cat_story_modifier } + desc = ep3_laamp_decision_event.1202.b.own_cat + } + desc = ep3_laamp_decision_event.1202.b + } + } + } + trigger = { has_trait = callous } + trait = callous + + # A cat is a cat. + if = { + limit = { has_character_modifier = cat_story_modifier } + # Our regal companionship is ended. + custom_tooltip = { + text = ep3_laamp_decision_event.1202.tt.your_cat_lost + 1202_prune_cat_stories_effect = yes + } + } + + stress_impact = { callous = massive_stress_impact_loss } + # If the AI is callous, they should always take this. + ai_chance = { base = 1000 } + } +} + + +scripted_effect 1203_prune_horse_stories_effect = { + remove_horse_story_modifiers_effect = yes + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + end_story = yes + } +} + +# Your camp eats its horses. +ep3_laamp_decision_event.1203 = { + type = character_event + title = ep3_laamp_decision_event.1203.t + desc = { + desc = ep3_laamp_decision_event.1203.desc.intro + first_valid = { + # Both your horse and your reserve steeds are getting eaten. + triggered_desc = { + trigger = { + has_character_modifier = horse_story_modifier + exists = scope:horses_gone + } + desc = ep3_laamp_decision_event.1203.desc.eaten.both + } + # Just your horse is getting eaten. + triggered_desc = { + trigger = { has_character_modifier = horse_story_modifier } + desc = ep3_laamp_decision_event.1203.desc.eaten.own_horse + } + # Just the reserve steeds are getting eaten. + triggered_desc = { + trigger = { exists = scope:horses_gone } + desc = ep3_laamp_decision_event.1203.desc.eaten.reserve_steeds + } + } + desc = ep3_laamp_decision_event.1203.desc.outro + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = callous } + animation = dismissal + } + animation = stress + } + + immediate = { + # Apply cooldown. + add_character_flag = { + flag = recently_ate_horses + years = butcher_animals_decision_regular_cooldown_value + } + # Make it look like we've killed our horse, but hold them till after for loc. + show_as_tooltip = { 1203_prune_horse_stories_effect = yes } + # Register how many provisions we'll get. + domicile = { + change_provisions = { + root = { + if = { + limit = { has_character_modifier = horse_story_modifier } + add = butcher_animals_decision_horse_provision_value + } + } + if = { + limit = { has_domicile_building = baggage_train_ample_steeds } + add = butcher_animals_decision_horse_building_provision_value + } + } + # Liquidate the horses. + if = { + limit = { has_domicile_building = baggage_train_ample_steeds } + remove_domicile_building = baggage_train_ample_steeds + # Flag that this happened. + save_scope_value_as = { + name = horses_gone + value = yes + } + } + } + } + + # Non-callous: even in death, they carry us forward.. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:horses_gone } + desc = ep3_laamp_decision_event.1203.a.many_steeds + } + desc = ep3_laamp_decision_event.1203.a.single_steed + } + } + } + + stress_impact = { + base = major_stress_gain + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + # The AI only takes this if they have no other option. + ai_chance = { base = 0 } + } + + # Callous: you know, this isn't that bad actually... + option = { + name = ep3_laamp_decision_event.1203.b + trigger = { has_trait = callous } + trait = callous + + stress_impact = { callous = massive_stress_impact_loss } + # If the AI is callous, they should always take this. + ai_chance = { base = 1000 } + } + + after = { + hidden_effect = { 1203_prune_horse_stories_effect = yes } + } +} + +# Your camp eats its elephants. +ep3_laamp_decision_event.1204 = { + type = character_event + title = ep3_laamp_decision_event.1204.t + desc = ep3_laamp_decision_event.1204.desc + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = callous } + animation = dismissal + } + animation = stress + } + + immediate = { + # Apply cooldown. + add_character_flag = { + flag = recently_ate_elephants + years = butcher_animals_decision_elephant_cooldown_value + } + # Register how many provisions we'll get. + domicile = { + change_provisions = butcher_animals_decision_elephant_building_provision + # Liquidate the elephants. + if = { + limit = { has_domicile_building = proving_grounds_elephantry_reserve } + remove_domicile_building = proving_grounds_elephantry_reserve + } + } + } + + # Non-callous. + option = { + name = ep3_laamp_decision_event.1204.a + + stress_impact = { + base = major_stress_gain + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + # The AI only takes this if they have no other option. + ai_chance = { base = 0 } + } + + # Callous. + option = { + name = ep3_laamp_decision_event.1204.b + trigger = { has_trait = callous } + trait = callous + + stress_impact = { callous = massive_stress_impact_loss } + # If the AI is callous, they should always take this. + ai_chance = { base = 1000 } + } + + # Will there be additional consequences? + after = { + if = { + limit = { + any_maa_regiment = { is_unit_type = elephant_cavalry } + } + trigger_event = { + id = ep3_laamp_decision_event.1205 + years = 1 + } + } + } +} + +# Elephant survivors never forget. +ep3_laamp_decision_event.1205 = { + type = character_event + title = ep3_laamp_decision_event.1205.t + desc = ep3_laamp_decision_event.1205.desc + theme = laamp + left_portrait = { + character = root + animation = shock + } + + immediate = { add_character_modifier = ep3_laamp_decision_event_1205_modifier } + + # Damn and blast these recalcitrant beasts! + option = { + name = ep3_laamp_decision_event.1205.a + + custom_tooltip = ep3_laamp_decision_event.1205.a.tt + + # No stress, no AI. + } +} + +scripted_trigger ep3_laamp_decision_event_1300_age_diff_trigger = { + OR = { + age <= { + value = scope:char_current.age + add = 5 + } + scope:char_current.age >= { + value = age + add = 5 + } + } +} + +#Youths of LAAMP-prone cultures consider becoming LAAMPs +ep3_laamp_decision_event.1300 = { + hidden = yes + trigger = { + laamp_youth_cultural_tradition_trigger = yes + #Looser skill reqs for eager-ass Normans + trigger_if = { + limit = { + culture = { + has_cultural_parameter = much_more_likely_to_be_laamps + } + } + OR = { + prowess >= 8 + martial >= 8 + } + } + trigger_else = { + OR = { + prowess >= 10 + martial >= 10 + } + } + ai_boldness > 0 + ai_energy > 0 + } + immediate = { + random = { + chance = 0 + modifier = { add = ep3_laamp_chance_score_value } + #Counteract bonus in above value somewhat + modifier = { + always = yes + add = -50 + } + create_landless_adventurer_title_effect = { + REASON = flag:runaway_allowed + FLAVOR_CHAR = liege + } + # Create a bunch of secondary chars to go on their adventure with them (so that Norman/Turkish bands don't immediately de-Normanify/Turkify). + while = { + count = 3 + create_character = { + template = soldier_friend_character + employer = root + culture = root.culture + faith = root.faith + age = root.age + gender_female_chance = root_soldier_female_chance + after_creation = { add_to_list = created_chars_list } + } + } + while = { + count = 3 + create_character = { + template = mercenary + employer = root + culture = root.culture + faith = root.faith + gender_female_chance = root_soldier_female_chance + after_creation = { add_to_list = created_chars_list } + } + } + ## Plus add starting drama. + every_in_list = { + list = created_chars_list + save_scope_as = char_current + random_list = { + 100 = { + trigger = { + any_in_list = { + list = created_chars_list + can_set_relation_friend_trigger = { CHARACTER = scope:char_current } + } + } + random_in_list = { + list = created_chars_list + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:char_current } + } + set_random_friendship_reason = { TARGET = scope:char_current } + } + } + 100 = { + trigger = { + any_in_list = { + list = created_chars_list + can_set_relation_rival_trigger = { CHARACTER = scope:char_current } + } + } + random_in_list = { + list = created_chars_list + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:char_current } + } + set_random_rivalry_reason = { + TARGET = scope:char_current + RELATION = rival + } + } + } + 100 = { + trigger = { + any_in_list = { + list = created_chars_list + ep3_laamp_decision_event_1300_age_diff_trigger = yes + can_set_relation_lover_trigger = { CHARACTER = scope:char_current } + } + } + random_in_list = { + list = created_chars_list + limit = { + ep3_laamp_decision_event_1300_age_diff_trigger = yes + can_set_relation_lover_trigger = { CHARACTER = scope:char_current } + } + set_random_lover_reason = { TARGET = scope:char_current } + } + } + } + } + trigger_event = ep3_laamps.0003 + if = { # Debug AI tracking + limit = { debug_only = yes } + if = { + limit = { exists = global_var:ai_birthday_cultrad_laamp_count } + change_global_variable = { + name = ai_birthday_cultrad_laamp_count + add = 1 + } + } + else = { + set_global_variable = { + name = ai_birthday_cultrad_laamp_count + value = 1 + } + } + debug_log = "AI became adventurer due to cultural tradition" + debug_log_scopes = yes + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_laamp_events.txt b/N3OW/events/dlc/ep3/ep3_laamp_events.txt new file mode 100644 index 00000000..967db813 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_laamp_events.txt @@ -0,0 +1,9054 @@ +namespace = ep3_laamps + +#### +# ep3_laamps.0001-0003 - Become Adventurer - Conquest +# ep3_laamps.0010-0012 - Become Adventurer - Succession +# ep3_laamps.0020-0021 - Become Adventurer - Exile +# ep3_laamps.0030-0032 - Become Adventurer - Voluntary +# ep3_laamps.0040-0042 - Become Adventurer - Revocation +# ep3_laamps.0050-0051 - Become Adventurer - Runaway +# ep3_laamps.0100-0102 - Become Landed - Purchase +# ep3_laamps.0200-0201 - Become Landed - Sponsored Invasion +# ep3_laamps.0300-0302 - Become Landed - Negotiated +# ep3_laamps.0400-0412 - Become Landed - Seize Realm +## +# 5000-5998 - Generalist LAAMP events +### + +# //\ /\\ +# || * \ . . / * || +# \\____\X/____// +# / * /O\ * \ +# \__/ " \__/ +# BRÖTHER +# I CRAVE THE LAAMP + +scripted_effect adventurer_prestige_reset_effect = { + hidden_effect = { + #Save Prestige + save_scope_value_as = { + name = prestige_amount + value = { + value = prestige + add = -100 + } + } + #Invert it, then take it away + add_prestige = { + value = scope:prestige_amount + multiply = -1 + } + #Take away 3 prestige levels + add_prestige_level = -3 + } + # Tooltips + custom_tooltip = lose_all_prestige_tt + custom_tooltip = lose_all_prestige_level_tt +} + +################################################## +# Become Adventurer - Conquest +# by Joe Parkin +# 0001-0002 +################################################## + +# Big comeback + +scripted_trigger ep3_laamp_conquest_title_trigger = { + OR = { + recent_history = { type = conquest days = 1 } + recent_history = { type = conquest_holy_war days = 1 } + recent_history = { type = conquest_claim days = 1 } + recent_history = { type = conquest_populist days = 1 } + } + previous_holder ?= scope:adventurer +} + +# Conquest loser event +ep3_laamps.0001 = { + type = character_event + window = fullscreen_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { is_female = yes } + desc = ep3_laamps.0001.t.female + } + desc = ep3_laamps.0001.t.male + } + } + } + desc = { + desc = ep3_laamps.0001.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:war_memory } + desc = ep3_laamps.0001.memory + } + desc = ep3_laamps.0001.fallback + } + desc = ep3_laamps.0001.desc + } + theme = realm + left_portrait = { + character = root + animation = stress + } + lower_left_portrait = scope:alt_1 + lower_center_portrait = scope:alt_2 + lower_right_portrait = scope:alt_3 + override_background = { reference = ep3_fullscreen_adventurer_negative } + cooldown = { days = 5 } + + trigger = { + is_ai = no + NOT = { has_character_flag = become_laamp_event_cooldown } + } + + immediate = { + add_character_flag = { + flag = become_laamp_event_cooldown + days = 5 + } + # Save highest lost title for loc + ordered_in_list = { + list = target_titles + limit = { ep3_laamp_conquest_title_trigger = yes } + order_by = tier + position = 0 + save_scope_as = lost_primary_title + } + if = { + limit = { + NOT = { exists = scope:lost_primary_title } + exists = scope:conquered + } + scope:conquered = { save_scope_as = lost_primary_title } + } + # Find alternative rulers to play as + find_playable_relatives_effect = yes + # Portrait scopes + if = { + limit = { + NOR = { + exists = scope:alt_3 + scope:alt_1 ?= scope:winner + scope:alt_2 ?= scope:winner + } + } + scope:winner = { save_scope_as = alt_3 } + } + # Make Adventurer + create_landless_adventurer_title_effect = { + REASON = flag:conquest + FLAVOR_CHAR = scope:attacker + } + adventurer_prestige_reset_effect = yes + } + + option = { + name = ep3_laamps.0001.a + add_unpressed_claim = scope:lost_primary_title + add_internal_flag = special + if = { + limit = { + NOT = { has_relation_rival = scope:winner } + } + set_relation_rival = { + target = scope:winner + reason = rival_conquered_me + } + } + scope:winner = { trigger_event = ep3_laamps.0003 } + } + option = { + name = ep3_laamps.0001.b + trigger = { exists = scope:alt_1 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_1 } + } + option = { + name = ep3_laamps.0001.c + trigger = { exists = scope:alt_2 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_2 } + } + option = { + name = ep3_laamps.0001.d + trigger = { + scope:alt_3 ?= { playable_relative_trigger = yes } + } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_3 } + } + option = { + name = ep3_laamps.0001.e + laamp_game_over_option_effect = yes + } +} + +# Setup event +ep3_laamps.0002 = { + type = character_event + hidden = yes + + trigger = { + has_ep3_dlc_trigger = yes + is_valid_for_laampdom = yes + } + + on_trigger_fail = { + if = { # Ensures depose_effect always deposes, while other event origins do not + limit = { exists = scope:allow_imprisoned_landless } + depose = yes + } + } + + immediate = { + save_scope_as = adventurer + # AI chance + if = { + limit = { + is_ai = yes + ai_can_valid_to_create_laamp_trigger = yes + } + if = { + limit = { is_landed = yes } + depose = yes + } + save_scope_value_as = { + name = ai_laamp_chance + value = ep3_laamp_chance_score_value + } + random = { + chance = scope:ai_laamp_chance + # Plus for our memory variable. + ordered_in_list = { + list = target_titles + order_by = tier + position = 0 + save_scope_as = lost_primary_title + } + if = { + limit = { exists = var:deposed_primary_title } + create_landless_adventurer_title_effect = { + REASON = flag:deposition + FLAVOR_CHAR = scope:attacker + } + } + else = { + create_landless_adventurer_title_effect = { + REASON = flag:conquest + FLAVOR_CHAR = scope:attacker + } + } + scope:winner = { trigger_event = ep3_laamps.0003 } + } + } + # Player event + else = { + if = { + limit = { + scope:new_holder ?= { + any_held_title = { ep3_laamp_conquest_title_trigger = yes } + } + } + trigger_event = { id = ep3_laamps.0001 } + } + else_if = { # Land already taken (e.g. by a war) + limit = { is_landed = no } + trigger_event = { id = ep3_laamps.0004 } + } + else = { # Still have land (e.g. in an event) + trigger_event = { id = ep3_laamps.0005 } + } + } + } +} + +# Winner event +ep3_laamps.0003 = { + type = letter_event + opening = ep3_laamps.0003.opening + desc = ep3_laamps.0003.desc + sender = scope:adventurer + + trigger = { is_ai = no } + + immediate = { + if = { + limit = { + NOT = { has_relation_rival = scope:adventurer } + } + scope:adventurer = { + set_relation_rival = { + target = root + reason = rival_conquered_me + } + } + } + scope:adventurer = { create_landless_adventurer_title_tooltip_effect = yes } + } + + option = { + name = ep3_laamps.0003.a + } +} + +# Deposition loser event +ep3_laamps.0004 = { + type = character_event + window = fullscreen_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { is_female = yes } + desc = ep3_laamps.0001.t.female + } + desc = ep3_laamps.0001.t.male + } + } + } + desc = ep3_laamps.0004.desc + theme = realm + left_portrait = { + character = root + animation = stress + } + lower_left_portrait = scope:alt_1 + lower_center_portrait = scope:alt_2 + lower_right_portrait = scope:alt_3 + override_background = { reference = ep3_fullscreen_adventurer_negative } + + trigger = { + is_ai = no + exists = var:deposed_primary_title + NOT = { has_character_flag = become_laamp_event_cooldown } + } + + immediate = { + add_character_flag = { + flag = become_laamp_event_cooldown + days = 5 + } + var:deposed_primary_title ?= { + # Save highest lost title for loc + save_scope_as = conquered + # And for memory variables. + save_scope_as = lost_primary_title + save_scope_as = heir + } + # Create Adventurer + hidden_effect = { + create_landless_adventurer_title_effect = { + REASON = flag:deposition + FLAVOR_CHAR = scope:attacker + } + } + # Find alternative rulers to play as + find_playable_relatives_effect = yes + # Portrait scopes + if = { + limit = { + NOT = { exists = scope:alt_3 } + } + if = { + limit = { exists = scope:conquered.holder } + scope:conquered.holder = { save_scope_as = alt_3 } + } + else_if = { + limit = { + NOR = { + scope:alt_1 ?= scope:winner + scope:alt_2 ?= scope:winner + } + } + scope:winner ?= { save_scope_as = alt_3 } + } + } + } + + option = { + name = ep3_laamps.0001.a + create_landless_adventurer_title_tooltip_effect = yes + add_internal_flag = special + scope:winner = { trigger_event = ep3_laamps.0003 } + } + option = { + name = ep3_laamps.0001.b + trigger = { exists = scope:alt_1 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_1 } + } + option = { + name = ep3_laamps.0001.c + trigger = { exists = scope:alt_2 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_2 } + } + option = { + name = ep3_laamps.0001.d + trigger = { + scope:alt_3 ?= { playable_relative_trigger = yes } + } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_3 } + } + option = { + name = ep3_laamps.0001.e + laamp_game_over_option_effect = yes + hidden_effect = { move_to_pool = yes } + } +} + +# Depose loser event +ep3_laamps.0005 = { + type = character_event + window = fullscreen_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { is_female = yes } + desc = ep3_laamps.0001.t.female + } + desc = ep3_laamps.0001.t.male + } + } + } + desc = ep3_laamps.0004.desc + theme = realm + left_portrait = { + character = root + animation = stress + } + lower_left_portrait = scope:alt_1 + lower_center_portrait = scope:alt_2 + lower_right_portrait = scope:alt_3 + override_background = { reference = ep3_fullscreen_adventurer_negative } + + trigger = { + is_ai = no + exists = var:deposed_primary_title + NOT = { has_character_flag = become_laamp_event_cooldown } + } + + immediate = { + add_character_flag = { + flag = become_laamp_event_cooldown + days = 5 + } + var:deposed_primary_title ?= { + # Save highest lost title for loc + save_scope_as = conquered + # And for memory variables. + save_scope_as = lost_primary_title + } + # Find alternative rulers to play as + find_playable_relatives_effect = yes + # Portrait scopes + if = { + limit = { + NOT = { exists = scope:alt_3 } + } + if = { + limit = { exists = scope:conquered.holder } + scope:conquered.holder = { save_scope_as = alt_3 } + } + else_if = { + limit = { + NOR = { + scope:alt_1 ?= scope:winner + scope:alt_2 ?= scope:winner + } + } + scope:winner ?= { save_scope_as = alt_3 } + } + } + scope:conquered.current_heir = { save_scope_as = heir } + } + + option = { + name = ep3_laamps.0001.a + show_as_tooltip = { depose = yes } # depose not actually used as it is immediate gameover + hidden_effect = { + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + every_held_title = { + title_tier >= county + change_title_holder_include_vassals = { + holder = scope:heir + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + # Create Adventurer + create_landless_adventurer_title_effect = { + REASON = flag:deposition + FLAVOR_CHAR = scope:attacker + } + } + create_landless_adventurer_title_tooltip_effect = yes + add_internal_flag = special + scope:winner = { trigger_event = ep3_laamps.0003 } + } + option = { + name = ep3_laamps.0001.b + trigger = { exists = scope:alt_1 } + show_as_tooltip = { depose = yes } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_1 } + hidden_effect = { + depose = yes + move_to_pool = yes + } + } + option = { + name = ep3_laamps.0001.c + trigger = { exists = scope:alt_2 } + show_as_tooltip = { depose = yes } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_2 } + hidden_effect = { + depose = yes + move_to_pool = yes + } + } + option = { + name = ep3_laamps.0001.d + trigger = { + scope:alt_3 ?= { playable_relative_trigger = yes } + } + show_as_tooltip = { depose = yes } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_3 } + hidden_effect = { + depose = yes + move_to_pool = yes + } + } + option = { + name = ep3_laamps.0001.e + show_as_tooltip = { depose = yes } + laamp_game_over_option_effect = yes + hidden_effect = { + depose = yes + move_to_pool = yes + } + } +} + +################################################## +# Become Adventurer - Succession +# by Joe Parkin +# 0010-0012 +################################################## + +# My sibling is more interesting than me + +scripted_trigger ep3_laamp_inheritor_title_trigger = { + recent_history = { + type = inheritance + days = 5 + } + previous_holder = scope:deceased +} + +# Player event +ep3_laamps.0010 = { + type = character_event + window = fullscreen_event + title = ep3_laamps.0010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + any_sibling = { count >= 2 } + } + desc = ep3_laamps.0010.multi + } + desc = ep3_laamps.0010.single + } + desc = ep3_laamps.0010.desc + triggered_desc = { + trigger = { exists = scope:inheritor_1 } + desc = ep3_laamps.0010.inheritor_1 + } + triggered_desc = { + trigger = { exists = scope:inheritor_2 } + desc = ep3_laamps.0010.inheritor_2 + } + triggered_desc = { + trigger = { exists = scope:inheritor_3 } + desc = ep3_laamps.0010.inheritor_3 + } + desc = ep3_laamps.0010.laamp + } + theme = realm + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:potential_laamp + animation = marshal + outfit_tags = { military_outfit } + } + lower_right_portrait = scope:deceased + override_background = { reference = ep3_fullscreen_adventurer_positive } + cooldown = { years = 25 } + + trigger = { + is_ai = no + NOT = { has_character_flag = become_laamp_event_cooldown } + } + + immediate = { + add_character_flag = { + flag = become_laamp_event_cooldown + days = 5 + } + # Save highest inherited title + ordered_held_title = { + limit = { ep3_laamp_inheritor_title_trigger = yes } + order_by = tier + position = 0 + save_scope_as = inherited + } + # Save inheritors for loc + every_sibling = { + limit = { + any_held_title = { ep3_laamp_inheritor_title_trigger = yes } + } + add_to_list = inheritors + } + ordered_in_list = { + list = inheritors + order_by = age + max = 3 + check_range_bounds = no + if = { + limit = { exists = scope:inheritor_2 } + save_scope_as = inheritor_3 + } + else_if = { + limit = { exists = scope:inheritor_1 } + save_scope_as = inheritor_2 + } + else = { save_scope_as = inheritor_1 } + ordered_held_title = { + limit = { ep3_laamp_inheritor_title_trigger = yes } + order_by = tier + position = 0 + if = { + limit = { exists = scope:inherited_2 } + save_scope_as = inherited_3 + } + else_if = { + limit = { exists = scope:inherited_1 } + save_scope_as = inherited_2 + } + else = { save_scope_as = inherited_1 } + } + } + scope:potential_laamp = { + create_landless_adventurer_title_effect = { + REASON = flag:succession + FLAVOR_CHAR = root + } + adventurer_prestige_reset_effect = yes + } + } + + option = { + name = ep3_laamps.0010.a + } + + option = { + name = ep3_laamps.0010.b + add_internal_flag = special + set_player_character = scope:potential_laamp + } +} + +# Setup event - heir +ep3_laamps.0011 = { + type = character_event + hidden = yes + + trigger = { + save_temporary_scope_as = heir_temp + any_sibling = { + ep3_laamp_interesting_sibling_trigger = { COMPARISON = scope:heir_temp } + } + } + + immediate = { + save_scope_as = heir + # Save potential laamp + ordered_sibling = { + limit = { + ep3_laamp_interesting_sibling_trigger = { COMPARISON = scope:heir } + } + order_by = ep3_laamp_chance_score_value + save_scope_as = potential_laamp + } + random = { + chance = 0 + modifier = { # Bonus for players + is_ai = no + add = 25 + } + modifier = { add = scope:potential_laamp.ep3_laamp_chance_score_value } + if = { + limit = { + is_ai = yes + ai_can_valid_to_create_laamp_trigger = yes + } + scope:potential_laamp = { + create_landless_adventurer_title_effect = { + REASON = flag:succession + FLAVOR_CHAR = scope:heir + } + } + if = { # Debug tracking + limit = { exists = global_var:ai_succession_laamp_count } + change_global_variable = { + name = ai_succession_laamp_count + add = 1 + } + } + else = { + set_global_variable = { + name = ai_succession_laamp_count + value = 1 + } + } + debug_log = "AI became adventurer by succession" + debug_log_scopes = yes + } + else = { trigger_event = ep3_laamps.0010 } + } + } +} + +# Setup event - deceased +ep3_laamps.0012 = { + hidden = yes + type = character_event + + trigger = { + has_ep3_dlc_trigger = yes + is_landed = yes + player_heir ?= { + save_temporary_scope_as = heir_temp + any_sibling = { + ep3_laamp_interesting_sibling_trigger = { COMPARISON = scope:heir_temp } + } + } + } + + immediate = { + save_scope_as = deceased + player_heir = { + trigger_event = { + id = ep3_laamps.0011 + days = 5 + } + } + } +} + +################################################## +# Become Adventurer - Banish +# by Joe Parkin +# 0020-0021 +################################################## + +# I have been banished + +# Banished event +ep3_laamps.0020 = { + type = character_event + window = fullscreen_event + title = ep3_laamps.0020.t + desc = ep3_laamps.0020.desc + theme = realm + left_portrait = { + character = root + animation = marshal + } + lower_left_portrait = scope:alt_1 + lower_center_portrait = scope:alt_2 + lower_right_portrait = scope:alt_3 + override_background = { reference = ep3_fullscreen_adventurer_negative } + cooldown = { days = 5 } + + trigger = { + NOT = { has_character_flag = become_laamp_event_cooldown } + } + + immediate = { + add_character_flag = { + flag = become_laamp_event_cooldown + days = 5 + } + save_scope_as = adventurer + liege = { save_scope_as = liege } + # Save highest lost title for loc + ordered_held_title = { + order_by = tier + position = 0 + save_scope_as = revoked + # Plus for our memory variable. + save_scope_as = lost_primary_title + } + find_playable_relatives_effect = yes + # Portrait scopes + if = { + limit = { + NOR = { + exists = scope:alt_3 + scope:alt_1 ?= scope:banisher + scope:alt_2 ?= scope:banisher + } + } + scope:banisher = { save_scope_as = alt_3 } + } + adventurer_prestige_reset_effect = yes + } + + option = { + name = ep3_laamps.0020.a + show_as_tooltip = { banish = yes } + hidden_effect = { + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + every_held_title = { + title_tier >= county + change_title_holder_include_vassals = { + holder = scope:liege + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + # Create Adventurer + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = scope:banisher + } + } + create_landless_adventurer_title_tooltip_effect = yes + add_internal_flag = special + add_unpressed_claim = scope:lost_primary_title + scope:banisher = { + trigger_event = { + id = ep3_laamps.0022 + days = 5 + } + } + scope:liege = { + if = { + limit = { + this != scope:banisher + } + trigger_event = { + id = ep3_laamps.0022 + days = 5 + } + } + } + } + + option = { + name = ep3_laamps.0001.b + trigger = { exists = scope:alt_1 } + show_as_tooltip = { banish = yes } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_1 } + hidden_effect = { + if = { + limit = { + government_allows = administrative + } + force_step_down_landed_titles = yes + } + banish = yes + } + } + option = { + name = ep3_laamps.0001.c + trigger = { exists = scope:alt_2 } + show_as_tooltip = { banish = yes } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_2 } + hidden_effect = { + if = { + limit = { + government_allows = administrative + } + force_step_down_landed_titles = yes + } + banish = yes + } + } + option = { + name = ep3_laamps.0001.d + trigger = { + scope:alt_3 ?= { playable_relative_trigger = yes } + } + show_as_tooltip = { banish = yes } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_3 } + hidden_effect = { + if = { + limit = { + government_allows = administrative + } + force_step_down_landed_titles = yes + } + banish = yes + } + } + option = { + name = ep3_laamps.0001.e + show_as_tooltip = { banish = yes } + laamp_game_over_option_effect = yes + hidden_effect = { + if = { + limit = { + government_allows = administrative + } + force_step_down_landed_titles = yes + } + banish = yes + } + } +} + +# Setup event +ep3_laamps.0021 = { + type = character_event + hidden = yes + + trigger = { + has_ep3_dlc_trigger = yes + is_valid_for_laampdom = yes + } + + on_trigger_fail = { + if = { + limit = { + government_allows = administrative + } + force_step_down_landed_titles = yes + } + banish = yes + } + + immediate = { + save_scope_as = adventurer + liege = { save_scope_as = liege } + # Save highest lost title for loc + ordered_held_title = { + order_by = tier + position = 0 + save_scope_as = revoked + # Plus for our memory variable. + save_scope_as = lost_primary_title + } + add_character_flag = { + flag = block_for_prison_release_notification + days = 1 + } + # AI chance + if = { + limit = { + is_ai = yes + ai_can_valid_to_create_laamp_trigger = yes + } + random = { + chance = 0 + modifier = { add = ep3_laamp_chance_score_value } + # Plus for our memory variable. + add_character_flag = { + flag = block_for_prison_release_message + days = 1 + } + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = no + } + every_held_title = { + title_tier >= county + change_title_holder_include_vassals = { + holder = scope:liege + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = scope:actor + } + adventurer_prestige_reset_effect = yes + add_unpressed_claim = scope:lost_primary_title + scope:banisher = { + trigger_event = { + id = ep3_laamps.0022 + days = 5 + } + } + scope:liege = { + if = { + limit = { + this != scope:banisher + } + trigger_event = { + id = ep3_laamps.0022 + days = 5 + } + } + } + } + if = { + limit = { + NOT = { + government_has_flag = government_is_landless_adventurer + } + } + if = { + limit = { + government_allows = administrative + } + force_step_down_landed_titles = yes + } + banish = yes + } + } + # Player event + else = { + trigger_event = { id = ep3_laamps.0020 } + } + } +} + +# Banisher event +ep3_laamps.0022 = { + type = letter_event + opening = ep3_laamps.0003.opening + desc = ep3_laamps.0022.desc + sender = scope:adventurer + + trigger = { is_ai = no } + + immediate = { + scope:adventurer = { create_landless_adventurer_title_tooltip_effect = yes } + } + + option = { + name = ep3_laamps.0022.a + } +} + +################################################## +# Become Adventurer - Voluntary +# by Joe Parkin +# 0030-0031 +################################################## + +# Adventure awaits + +ep3_laamps.0030 = { + type = character_event + window = fullscreen_event + title = ep3_laamps.0030.t + desc = { + desc = ep3_laamps.0030.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:laamp_heir } + desc = ep3_laamps.0030.heir + } + triggered_desc = { + trigger = { exists = scope:laamp_liege } + desc = ep3_laamps.0030.liege + } + desc = ep3_laamps.0030.new + } + } + theme = realm + left_portrait = { + character = root + animation = marshal + } + lower_right_portrait = scope:laamp_inheritor + override_background = { reference = ep3_fullscreen_adventurer_positive } + cooldown = { days = 5 } + + trigger = { exists = scope:laamp_inheritor } + + immediate = { + # Save scopes for loc + primary_title = { save_scope_as = old_primary_title } + capital_province = { save_scope_as = old_capital_province } + if = { + limit = { top_liege != this } + liege = { save_scope_as = old_liege } + } + # Transfer landed titles + every_held_title = { + title_tier > barony + limit = { + OR = { + is_landless_type_title = no + is_nomad_title = yes + } + } + add_to_list = target_titles + } + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = no + } + hidden_effect = { + every_in_list = { + list = target_titles + change_title_holder_include_vassals = { + holder = scope:laamp_inheritor + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + # Create Adventurer + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = scope:laamp_inheritor + } + scope:laamp_inheritor = { + # Tooltip for player + custom_tooltip = become_landless_adventurer_decision_title_scope_tt + # Create a loving family so inheritance isn't so borked + if = { + limit = { has_character_flag = new_laamp_inheritor } + trigger_event = game_rule.1001 + remove_character_flag = new_laamp_inheritor + } + } + scope:old_liege ?= { trigger_event = ep3_laamps.0032 } + adventurer_prestige_reset_effect = yes + hidden_effect = { + every_held_title = { + limit = { + is_noble_family_title = yes + } + root = { destroy_title = prev } + } + } + } + + option = { + name = ep3_laamps.0030.a + create_landless_adventurer_title_tooltip_effect = yes + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = ep3_voluntary_laamp_character_modifier + years = 5 + } + } +} + +# Liege event +ep3_laamps.0032 = { + type = letter_event + opening = ep3_laamps.0032.opening + desc = ep3_laamps.0032.desc + sender = scope:adventurer + + trigger = { is_ai = no } + + immediate = { + scope:adventurer = { create_landless_adventurer_title_tooltip_effect = yes } + } + + option = { + name = ep3_laamps.0032.a + } +} + +################################################## +# Become Adventurer - Revocation +# by Joe Parkin +# 0040-0041 +################################################## + +# Come back + +scripted_trigger ep3_laamp_revoked_title_trigger = { + recent_history = { type = revoked days = 1 } + previous_holder = root +} + +ep3_laamps.0040 = { + type = character_event + window = fullscreen_event + title = ep3_laamps.0040.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:actor = { is_close_family_of = root } + } + desc = ep3_laamps.0040.family + } + desc = ep3_laamps.0040.other + } + desc = ep3_laamps.0040.desc + } + theme = realm + left_portrait = { + character = root + animation = marshal + } + lower_left_portrait = scope:alt_1 + lower_center_portrait = scope:alt_2 + lower_right_portrait = scope:alt_3 + override_background = { reference = ep3_fullscreen_adventurer_negative } + cooldown = { days = 5 } + + # The AI was managing to get this event somehow. + trigger = { + is_ai = no + NOT = { has_character_flag = become_laamp_event_cooldown } + } + + immediate = { + add_character_flag = { + flag = become_laamp_event_cooldown + days = 5 + } + # Find alternative rulers to play as + find_playable_relatives_effect = yes + # Portrait scopes + if = { + limit = { + NOR = { + exists = scope:alt_3 + scope:alt_1 ?= scope:actor + scope:alt_2 ?= scope:actor + } + } + scope:actor = { save_scope_as = alt_3 } + } + # Create Adventurer + hidden_effect = { + create_landless_adventurer_title_effect = { + REASON = flag:revocation + FLAVOR_CHAR = scope:actor + } + } + adventurer_prestige_reset_effect = yes + } + + option = { + name = ep3_laamps.0040.a + create_landless_adventurer_title_tooltip_effect = yes + add_internal_flag = special + scope:actor = { trigger_event = ep3_laamps.0042 } + } + + option = { + name = ep3_laamps.0001.b + trigger = { exists = scope:alt_1 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_1 } + } + option = { + name = ep3_laamps.0001.c + trigger = { exists = scope:alt_2 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_2 } + } + option = { + name = ep3_laamps.0001.d + trigger = { + exists = scope:alt_3 + scope:alt_3 = { playable_relative_trigger = yes } + } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_3 } + } + option = { + name = ep3_laamps.0001.e + laamp_game_over_option_effect = yes + } +} + +# Setup event +ep3_laamps.0041 = { + type = character_event + hidden = yes + + trigger = { + has_ep3_dlc_trigger = yes + is_landed = no + is_valid_for_laampdom = yes + } + + immediate = { + save_scope_as = adventurer + # AI chance + if = { + limit = { + is_ai = yes + ai_can_valid_to_create_laamp_trigger = yes + trigger_if = { # Don't fill the adventurer pool with revoked counts + limit = { + scope:lost_primary_title.tier <= tier_county + } + global_variable_list_size = { + name = laamps_tally + value < seventyfive_percent_of_max_desired_laamps_value + } + } + } + random = { + chance = 0 + modifier = { add = ep3_laamp_chance_score_value } + create_landless_adventurer_title_effect = { + REASON = flag:revocation + FLAVOR_CHAR = scope:actor + } + scope:actor = { trigger_event = ep3_laamps.0042 } + } + } + # Player event + else = { + trigger_event = { id = ep3_laamps.0040 } + } + } +} + +# Revoker event +ep3_laamps.0042 = { + type = letter_event + opening = ep3_laamps.0003.opening + desc = ep3_laamps.0042.desc + sender = scope:adventurer + + trigger = { is_ai = no } + + immediate = { + create_landless_adventurer_title_tooltip_effect = yes + } + + option = { + name = ep3_laamps.0042.a + } +} + +################################################## +# Become Adventurer - Runaway +# by Joe Parkin +# 0050-0051 +################################################## + +# Close family + +scripted_trigger ep3_laamp_runaway_child_trigger = { + is_ai = yes + liege ?= { + this = root + is_landed = yes + highest_held_title_tier >= tier_duchy + } + NOT = { root.primary_heir ?= this } + is_valid_for_laampdom = yes + age <= 25 + NOT = { has_character_flag = failed_laamp_runaway } + save_temporary_scope_as = runaway_temp + # Less important kids as rank increases + liege ?= { + primary_title = { + trigger_if = { + limit = { tier = tier_empire } + place_in_line_of_succession = { target = scope:runaway_temp value < 6 } + } + trigger_else_if = { + limit = { tier = tier_kingdom } + place_in_line_of_succession = { target = scope:runaway_temp value < 4 } + } + trigger_else = { + place_in_line_of_succession = { target = scope:runaway_temp value < 2 } + } + } + } +} + +ep3_laamps.0050 = { + type = character_event + title = ep3_laamps.0050.t + desc = ep3_laamps.0050.desc + theme = family + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:potential_laamp + animation = war_over_win + } + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + is_landed_or_landless_administrative = yes + any_close_family_member = { ep3_laamp_runaway_child_trigger = yes } + OR = { + is_ai = no + ai_can_valid_to_create_laamp_trigger = yes + } + NOT = { has_character_flag = become_laamp_event_cooldown } + } + + weight_multiplier = { + base = 1 + modifier = { + is_ai = no + add = 1 + } + modifier = { + highest_held_title_tier > tier_county # 2 + add = { + value = 2 + subtract = highest_held_title_tier + } + } + modifier = { + any_child = { + ep3_laamp_runaway_child_trigger = yes + ep3_laamp_interesting_enough_to_be_a_laamp_trigger = { COMPARISON = root } + } + add = 1 + } + modifier = { + add = 1 + exists = var:runaway_laamp_encourager + } + } + + immediate = { + add_character_flag = { + flag = become_laamp_event_cooldown + days = 5 + } + var:runaway_laamp_encourager ?= { save_scope_as = encouraged_laamp } + every_close_family_member = { + limit = { ep3_laamp_runaway_child_trigger = yes } + add_to_list = potential_runaways + } + ordered_in_list = { + list = potential_runaways + order_by = ep3_laamp_chance_score_value + save_scope_as = potential_laamp + save_scope_as = adventurer + } + } + + option = { # Encourage + name = ep3_laamps.0050.a + trigger = { is_ai = no } + hidden_effect = { + scope:potential_laamp = { + create_landless_adventurer_title_effect = { + REASON = flag:runaway_allowed + FLAVOR_CHAR = root + } + } + } + add_internal_flag = special + set_player_character = scope:potential_laamp + scope:potential_laamp = { + create_landless_adventurer_title_tooltip_effect = yes + } + stress_impact = { + arrogant = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + } + + option = { # Allow + name = ep3_laamps.0050.b + reverse_add_opinion = { + target = scope:potential_laamp + modifier = allowed_runaway_laamp_opinion + } + scope:potential_laamp = { + create_landless_adventurer_title_effect = { + REASON = flag:runaway_allowed + FLAVOR_CHAR = root + } + adventurer_prestige_reset_effect = yes + } + set_variable = { + name = runaway_laamp_encourager + value = scope:potential_laamp + } + stress_impact = { + arrogant = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_boldness = 0.25 + ai_energy = 0.25 + } + opinion_modifier = { + opinion_target = scope:potential_laamp + multiplier = -0.25 + } + modifier = { + add = 50 + culture = { + has_cultural_parameter = more_likely_to_be_laamps + } + } + modifier = { + add = 150 + culture = { + has_cultural_parameter = much_more_likely_to_be_laamps + } + } + } + } + + option = { # Forbid + name = ep3_laamps.0050.c + reverse_add_opinion = { + target = scope:potential_laamp + modifier = forbidden_runaway_laamp_opinion + } + duel = { + target = scope:potential_laamp + skill = intrigue + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + add_prestige = minor_prestige_loss + scope:potential_laamp = { add_character_flag = failed_laamp_runaway } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + scope:potential_laamp = { create_landless_adventurer_title_tooltip_effect = yes } + trigger_event = { + id = ep3_laamps.0051 + days = 1 + } + } + } + stress_impact = { + brave = medium_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:potential_laamp + multiplier = 0.25 + } + } + } +} + +ep3_laamps.0051 = { + type = character_event + title = ep3_laamps.0050.t + desc = ep3_laamps.0051.desc + theme = family + left_portrait = { + character = root + animation = stress + } + lower_right_portrait = scope:potential_laamp + + trigger = { + has_ep3_dlc_trigger = yes + scope:potential_laamp = { ep3_laamp_runaway_child_trigger = yes } + } + + immediate = { + # Create Adventurer + scope:potential_laamp = { + create_landless_adventurer_title_effect = { + REASON = flag:runaway_forbidden + FLAVOR_CHAR = root + } + adventurer_prestige_reset_effect = yes + } + add_prestige = minor_prestige_loss + } + + option = { + name = ep3_laamps.0051.a + } + + option = { + name = ep3_laamps.0051.b + trigger = { + is_ai = no + scope:potential_laamp = { is_playable_character = yes } # For Safety + } + add_internal_flag = special + set_player_character = scope:potential_laamp + } +} + +################################################## +# Become Landed - Purchase +# by Joe Parkin +# 0100-0102 +################################################## + +ep3_laamps.0100 = { + type = character_event + title = ep3_laamps.0100.t + desc = { + desc = ep3_laamps.0100.desc + first_valid = { + triggered_desc = { + trigger = { scope:new_liege ?= scope:recipient } + desc = ep3_laamps.0100.liege + } + triggered_desc = { + trigger = { exists = scope:new_liege } + desc = ep3_laamps.0100.fellow_vassal + } + desc = ep3_laamps.0100.independent + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:new_liege } + desc = ep3_laamps.0100.unpopular + } + desc = ep3_laamps.0100.fallback + } + } + theme = realm + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:recipient + animation = steward + } + lower_left_portrait = { + trigger = { + scope:recipient != scope:new_liege + } + character = scope:new_liege + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + purchase_land_interaction_effect = yes + scope:recipient = { trigger_event = ep3_laamps.0101 } + } + + option = { + name = ep3_laamps.0100.a + if = { # Vassal obligations + limit = { scope:vassal_obligation = yes } + vassal_contract_set_obligation_level = { type = feudal_government_taxes level = 4 } + vassal_contract_set_obligation_level = { type = feudal_government_levies level = 4 } + } + } +} + +ep3_laamps.0101 = { + type = letter_event + opening = ep3_laamps.0101.opening + desc = { + desc = ep3_laamps.0101.desc + first_valid = { + triggered_desc = { + trigger = { scope:new_liege ?= scope:recipient } + desc = ep3_laamps.0101.liege + } + triggered_desc = { + trigger = { exists = scope:new_liege } + desc = ep3_laamps.0101.fellow_vassal + } + desc = ep3_laamps.0100.independent + } + } + sender = scope:actor + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + show_as_tooltip = { purchase_land_interaction_effect = yes } + if = { + limit = { + top_liege != this + scope:actor.liege != root + } + hidden_effect = { + liege = { + send_interface_message = { + type = event_landless_adventurer_neutral + title = ep3_laamps.0101.liege_message.title + left_icon = scope:actor + right_icon = scope:recipient + show_as_tooltip = { purchase_land_interaction_effect = yes } + } + } + } + } + } + + option = { + name = ep3_laamps.0101.a + trigger = { scope:new_liege ?= scope:recipient } + } + + option = { + name = ep3_laamps.0101.b + trigger = { + exists = scope:new_liege + NOT = { scope:new_liege ?= scope:recipient } + } + } + + option = { + name = ep3_laamps.0101.c + trigger = { + NOT = { exists = scope:new_liege } + } + } +} + +ep3_laamps.0102 = { + type = letter_event + opening = ep3_laamps.0102.opening + desc = ep3_laamps.0102.desc + sender = scope:actor + + trigger = { + has_ep3_dlc_trigger = yes + } + + option = { + name = ep3_laamps.0102.a + } +} + +################################################## +# Become Landed - Invasion +# by Joe Parkin +# 0200-0201 +################################################## + +# Interaction + +ep3_laamps.0200 = { + type = letter_event + opening = ep3_laamps.0101.opening + desc = ep3_laamps.0200.desc + sender = scope:recipient + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + if = { + limit = { scope:offer_gold = yes } + show_as_tooltip = { + pay_short_term_gold = { + gold = scope:recipient.request_laamp_invasion_sponsorship_gold_cost + target = scope:recipient + } + } + hidden_effect = { + scope:recipient = { add_short_term_gold = scope:recipient.request_laamp_invasion_sponsorship_gold_cost } + } + } + scope:recipient = { + if = { + limit = { + scope:request_soldiers = yes + scope:join_war = yes + } + custom_tooltip = adventurer_invasion_supporter_tt + } + else_if = { + limit = { scope:request_soldiers = yes } + custom_tooltip = adventurer_invasion_supporter_soldiers_tt + } + else = { custom_tooltip = adventurer_invasion_supporter_join_tt } + } + scope:actor = { custom_tooltip = adventurer_invasion_supporter_victory_tt } + } + + option = { + name = ep3_laamps.0200.a + } +} + +ep3_laamps.0201 = { + type = letter_event + opening = ep3_laamps.0201.opening + desc = ep3_laamps.0201.desc + sender = scope:recipient + + trigger = { + has_ep3_dlc_trigger = yes + } + + option = { + name = ep3_laamps.0201.a + } +} + +################################################## +# Become Landed - Negotiated +# by Joe Parkin +# 0300-0302 +################################################## + +ep3_laamps.0300 = { + type = character_event + title = ep3_laamps.0300.t + desc = { + desc = ep3_laamps.0300.desc + first_valid = { + triggered_desc = { + trigger = { scope:new_liege ?= scope:actor } + desc = ep3_laamps.0300.liege + } + triggered_desc = { + trigger = { exists = scope:new_liege } + desc = ep3_laamps.0300.fellow_vassal + } + desc = ep3_laamps.0300.independent + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:new_liege } + desc = ep3_laamps.0300.unpopular + } + desc = ep3_laamps.0300.fallback + } + } + theme = realm + left_portrait = { + character = root + animation = worry + } + lower_right_portrait = scope:recipient + lower_left_portrait = { + trigger = { + scope:actor != scope:new_liege + } + character = scope:new_liege + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + negotiate_settlement_interaction_effect = yes + scope:recipient = { trigger_event = ep3_laamps.0301 } + } + + option = { + name = ep3_laamps.0300.a + } +} + +ep3_laamps.0301 = { + type = letter_event + opening = ep3_laamps.0301.opening + desc = { + desc = ep3_laamps.0301.desc + first_valid = { + triggered_desc = { + trigger = { scope:new_liege ?= scope:actor } + desc = ep3_laamps.0301.liege + } + triggered_desc = { + trigger = { exists = scope:new_liege } + desc = ep3_laamps.0301.fellow_vassal + } + desc = ep3_laamps.0300.independent + } + } + sender = scope:actor + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + show_as_tooltip = { negotiate_settlement_interaction_effect = yes } + if = { + limit = { + top_liege != this + scope:recipient.liege != scope:actor + } + hidden_effect = { + liege = { + send_interface_message = { + type = event_landless_adventurer_neutral + title = ep3_laamps.0301.liege_message.title + left_icon = scope:actor + right_icon = scope:recipient + show_as_tooltip = { negotiate_settlement_interaction_effect = yes } + } + } + } + } + } + + option = { + name = ep3_laamps.0301.a + trigger = { scope:new_liege ?= scope:actor } + } + + option = { + name = ep3_laamps.0301.b + trigger = { + exists = scope:new_liege + NOT = { scope:new_liege ?= scope:actor } + } + } + + option = { + name = ep3_laamps.0301.c + trigger = { + NOT = { exists = scope:new_liege } + } + } +} + +ep3_laamps.0302 = { + type = letter_event + opening = ep3_laamps.0302.opening + desc = ep3_laamps.0302.desc + sender = scope:actor + + trigger = { + has_ep3_dlc_trigger = yes + } + + option = { + name = ep3_laamps.0302.a + } +} + +################################################## +# Become Landed - Seize Realm +# by Joe Parkin +# 0401-0412 +################################################## + +### SUCCESS +ep3_laamps.0401 = { + type = character_event + title = ep3_laamps.0401.t + desc = { + desc = ep3_laamps.0401.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:imprison } + desc = ep3_laamps.0401.imprison + } + triggered_desc = { + trigger = { exists = scope:death } + desc = ep3_laamps.0401.death + } + desc = ep3_laamps.0401.outro + } + } + theme = claim_throne_scheme + override_background = { reference = throne_room_scope } + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:target + animation = prisonhouse + override_imprisonment_visuals = yes + } + + trigger = { exists = scope:scheme_successful } + + immediate = { + scope:target = { trigger_event = ep3_laamps.0410 } + seize_realm_scheme_success_effect = yes + } + + option = { + name = ep3_laamps.0401.a + } + + after = { + + } +} + +### FAILURE +ep3_laamps.0402 = { + type = character_event + title = ep3_laamps.0402.t + desc = { + desc = ep3_laamps.0402.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:imprison } + desc = ep3_laamps.0402.imprison + } + triggered_desc = { + trigger = { exists = scope:death } + desc = ep3_laamps.0402.death + } + desc = ep3_laamps.0402.outro + } + } + theme = claim_throne_scheme + override_background = { + trigger = { exists = scope:imprison } + reference = dungeon_scope + } + override_background = { + trigger = { exists = scope:death } + reference = throne_room_scope + } + override_background = { + trigger = { + NOR = { + exists = scope:imprison + exists = scope:death + } + } + reference = army_camp + } + left_portrait = { + character = root + triggered_animation = { + trigger = { exists = scope:imprison } + animation = prisonhouse + } + triggered_animation = { + trigger = { exists = scope:death } + animation = loss_1 + } + triggered_animation = { + trigger = { + NOR = { + exists = scope:imprison + exists = scope:death + } + } + animation = stress + } + override_imprisonment_visuals = yes + outfit_tags = { prison } + } + right_portrait = { + character = scope:target + animation = war_over_win + trigger = { + OR = { + exists = scope:imprison + exists = scope:death + } + } + } + lower_right_portrait = { + character = scope:target + trigger = { + NOR = { + exists = scope:imprison + exists = scope:death + } + } + } + + trigger = { + NOT = { exists = scope:scheme_successful } + } + + immediate = { + scope:target = { trigger_event = ep3_laamps.0411 } + seize_realm_scheme_failure_effect = yes + } + + option = { + name = ep3_laamps.0402.a + trigger = { + NOR = { + exists = scope:imprison + exists = scope:death + } + } + stress_impact = { + base = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + diligent = minor_stress_impact_gain + impatient = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_loss + craven = minor_stress_impact_loss + honest = minor_stress_impact_loss + } + } + + option = { + name = ep3_laamps.0402.b + trigger = { exists = scope:imprison } + stress_impact = { + base = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + diligent = minor_stress_impact_gain + impatient = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_loss + craven = minor_stress_impact_loss + honest = minor_stress_impact_loss + } + } + + option = { + name = ep3_laamps.0402.c + trigger = { exists = scope:death } + } +} + +### SUCCESS - TARGET +ep3_laamps.0410 = { + type = character_event + title = ep3_laamps.0410.t + desc = { + desc = ep3_laamps.0410.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:death } + desc = ep3_laamps.0410.death + } + triggered_desc = { + trigger = { exists = scope:imprison } + desc = ep3_laamps.0410.imprison + } + desc = ep3_laamps.0410.outro + } + } + theme = claim_throne_scheme + override_background = { + trigger = { exists = scope:imprison } + reference = dungeon_scope + } + override_background = { + trigger = { NOT = { exists = scope:imprison } } + reference = throne_room_scope + } + + left_portrait = { + character = scope:owner + animation = war_over_win + } + right_portrait = { + character = scope:target + animation = fear + override_imprisonment_visuals = yes + trigger = { + OR = { + exists = scope:imprison + exists = scope:death + } + } + } + lower_right_portrait = { + character = scope:target + trigger = { + NOR = { + exists = scope:imprison + exists = scope:death + } + } + } + + immediate = { + show_as_tooltip = { seize_realm_scheme_success_effect = yes } + } + + option = { + name = ep3_laamps.0410.a + trigger = { exists = scope:imprison } + } + + option = { + name = ep3_laamps.0410.b + trigger = { exists = scope:death } + } + + option = { + name = ep3_laamps.0410.c + trigger = { + NOR = { + exists = scope:imprison + exists = scope:death + } + } + } +} + +### FAILURE - TARGET +ep3_laamps.0411 = { + type = character_event + title = ep3_laamps.0411.t + desc = { + desc = ep3_laamps.0411.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:imprison } + desc = ep3_laamps.0411.imprison + } + desc = ep3_laamps.0411.outro + } + } + theme = claim_throne_scheme + override_background = { + trigger = { exists = scope:imprison } + reference = dungeon_scope + } + override_background = { + trigger = { NOT = { exists = scope:imprison } } + reference = throne_room_scope + } + left_portrait = { + character = scope:target + animation = war_over_win + } + right_portrait = { + character = scope:owner + animation = fear + override_imprisonment_visuals = yes + trigger = { + OR = { + exists = scope:imprison + exists = scope:death + } + } + } + lower_right_portrait = { + character = scope:owner + trigger = { + NOR = { + exists = scope:imprison + exists = scope:death + } + } + } + + immediate = { + show_as_tooltip = { seize_realm_scheme_failure_effect = yes } + } + + option = { + name = ep3_laamps.0411.a + trigger = { exists = scope:imprison } + } + + option = { + name = ep3_laamps.0411.b + trigger = { exists = scope:death } + } + + option = { + name = ep3_laamps.0411.c + trigger = { + NOR = { + exists = scope:imprison + exists = scope:death + } + } + } +} + +################################################## +# Become Landed - Maintenance +# by Joe Parkin +# 0800 +################################################## + +scripted_trigger grantable_close_family_trigger = { + is_adult = yes + is_playable_character = no + is_ai = yes + house = scope:adventurer.house + is_imprisoned = no + trigger_if = { + limit = { is_clergy = yes } + faith = { has_doctrine_parameter = theocracy_temple_ownership } + } + NOR = { + has_trait = incapable + has_trait = devoted + has_trait = order_member + this = scope:adventurer + this = scope:adventurer.player_heir + is_spouse_of = scope:adventurer + scope:alt_1 ?= this + scope:alt_2 ?= this + scope:alt_3 ?= this + scope:previous_holder ?= this + } +} + +scripted_trigger grantable_claimant_trigger = { + is_adult = yes + is_playable_character = no + is_ai = yes + is_imprisoned = no + trigger_if = { + limit = { is_clergy = yes } + faith = { has_doctrine_parameter = theocracy_temple_ownership } + } + NOR = { + has_trait = incapable + has_trait = devoted + has_trait = order_member + this = scope:adventurer + is_spouse_of = scope:adventurer + is_close_family_of = scope:adventurer + scope:alt_1 ?= this + scope:alt_2 ?= this + scope:alt_3 ?= this + scope:previous_holder ?= this + } +} + +scripted_trigger grantable_gender_preference_trigger = { + trigger_if = { + limit = { is_male = yes } + scope:adventurer = { + OR = { + has_realm_law = male_only_law + has_realm_law = male_preference_law + } + } + } + trigger_else_if = { + limit = { is_female = yes } + scope:adventurer = { + OR = { + has_realm_law = female_only_law + has_realm_law = female_preference_law + } + } + } + trigger_else = { always = yes } +} + +scripted_effect grant_land_to_beneficiary_effect = { + save_scope_as = beneficiary + if = { + limit = { is_close_family_of = scope:adventurer } + add_opinion = { + target = scope:adventurer + modifier = renounced_land_to_me_opinion + opinion = 25 + } + every_in_list = { + list = family_list + limit = { + this != scope:beneficiary + } + if = { + limit = { + has_strong_claim_on = scope:new_title + NOT = { + scope:beneficiary = { has_strong_claim_on = scope:new_title } + } + } + add_opinion = { + target = scope:adventurer + modifier = renounced_land_to_weaker_claim_opinion + opinion = -30 + } + } + else = { + add_opinion = { + target = scope:adventurer + modifier = renounced_land_to_other_opinion + opinion = -15 + } + } + } + } + else = { + add_opinion = { + target = scope:adventurer + modifier = renounced_land_to_me_opinion + opinion = 50 + } + if = { + limit = { scope:beneficiary.house != scope:adventurer.house } + every_in_list = { + list = family_list + add_opinion = { + target = scope:adventurer + modifier = renounced_land_outside_family_opinion + opinion = -50 + } + } + } + every_in_list = { + list = claimant_list + limit = { + this != scope:beneficiary + } + if = { + limit = { + has_strong_claim_on = scope:new_title + NOT = { + scope:beneficiary = { has_strong_claim_on = scope:new_title } + } + } + add_opinion = { + target = root + modifier = renounced_land_to_weaker_claim_opinion + opinion = -50 + } + } + else = { + add_opinion = { + target = root + modifier = renounced_land_to_other_opinion + opinion = -25 + } + } + } + } + send_interface_message = { + type = msg_titles_renounced_to_me + title = adventurer_titles_renounced_title + desc = adventurer_titles_renounced_to_me_desc + left_icon = scope:adventurer + scope:adventurer = { + send_interface_message = { + type = msg_titles_renounced_by_me + title = adventurer_titles_renounced_title + desc = adventurer_titles_renounced_by_me_desc + left_icon = scope:beneficiary + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:new_capital = { + change_title_holder_include_vassals = { + holder = scope:beneficiary + change = scope:change + take_baronies = no + } + } + hidden_effect = { + scope:beneficiary = { + becomes_independent = { change = scope:change } + } + } + every_held_title = { + limit = { + NOT = { has_variable = adventurer_creation_reason } + is_noble_family_title = no + is_landless_type_title = no + this != scope:new_capital + } + if = { + limit = { tier >= scope:new_title.tier } + change_title_holder_include_vassals = { + holder = scope:beneficiary + change = scope:change + take_baronies = no + } + } + else = { + hidden_effect = { + change_title_holder_include_vassals = { + holder = scope:beneficiary + change = scope:change + take_baronies = no + } + } + } + } + } + } + resolve_title_and_vassal_change = scope:change + } + scope:adventurer = { custom_tooltip = ep3_laamps.0800.claim.tt } +} + +scripted_effect transfer_crusader_king_trait_effect = { + if = { + limit = { + has_character_flag = laamp_is_crusader_king + has_trait = crusader_king + } + remove_trait = crusader_king + $BENEFICIARY$ = { add_trait = crusader_king } + } +} + +ep3_laamps.0800 = { # Player adventurer has gained a landed title + type = character_event + title = ep3_laamps.0800.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:transfer_type = flag:inheritance } + desc = ep3_laamps.0800.inherited + } + triggered_desc = { + trigger = { scope:transfer_type = flag:abdication } + desc = ep3_laamps.0800.abdication + } + triggered_desc = { + trigger = { scope:transfer_type = flag:granted } + desc = ep3_laamps.0800.granted + } + triggered_desc = { + trigger = { scope:transfer_type = flag:election } + desc = ep3_laamps.0800.election + } + triggered_desc = { + trigger = { scope:transfer_type = flag:faction_demand } + desc = ep3_laamps.0800.faction + } + triggered_desc = { + trigger = { scope:transfer_type = flag:conquest_claim } + desc = ep3_laamps.0800.claim_war + } + triggered_desc = { + trigger = { scope:transfer_type = flag:conquest_holy_war } + desc = ep3_laamps.0800.holy_war + } + desc = ep3_laamps.0800.conquest + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:new_liege } + desc = ep3_laamps.0800.vassal + } + desc = ep3_laamps.0800.independent + } + desc = ep3_laamps.0800.desc + } + theme = realm + left_portrait = { + character = scope:adventurer + animation = war_over_win + } + lower_left_portrait = scope:alt_1 + lower_center_portrait = scope:alt_2 + lower_right_portrait = scope:portrait_scope + cooldown = { days = 1 } # Do not change this + orphan = yes + + trigger = { + has_ep3_dlc_trigger = yes + is_landed = yes + government_has_flag = government_is_landless_adventurer + NOT = { has_variable = became_landed_through_separatist_uprising_var } # It feels repetitive to get this event after choosing to become landed + NOT = { #Used in the New England event chain + has_character_flag = siward_flag + } + } + + immediate = { + save_scope_as = adventurer + # SAVE LANDED TITLES + every_held_title = { + title_tier >= county + limit = { + NOR = { + has_variable = adventurer_creation_reason + is_landless_type_title = yes + } + } + add_to_list = landed_titles + } + # SAVE TITLES + ordered_in_list = { + list = landed_titles + order_by = tier + save_scope_as = new_title + save_scope_as = target + previous_holder ?= { save_scope_as = previous_holder } + } + capital_county = { save_scope_as = new_capital } + every_in_list = { + list = landed_titles + limit = { tier = scope:new_title.tier } + save_scope_as = tooltip_title + show_as_tooltip = { + scope:adventurer = { get_title = scope:tooltip_title } + } + } + # SAVE LIEGE IF RELEVANT + if = { + limit = { top_liege != this } + liege = { save_scope_as = new_liege } + } + # FIND RELATIVES TO GRANT TO + hidden_effect = { + if = { + limit = { + any_close_family_member = { grantable_close_family_trigger = yes } + } + while = { + count = 3 + random_close_family_member = { + limit = { + grantable_close_family_trigger = yes + OR = { + has_relation_friend = scope:adventurer + has_relation_lover = scope:adventurer + } + grantable_gender_preference_trigger = yes + } + alternative_limit = { + grantable_close_family_trigger = yes + has_strong_claim_on = scope:new_title + grantable_gender_preference_trigger = yes + } + alternative_limit = { + grantable_close_family_trigger = yes + OR = { + has_relation_friend = scope:adventurer + has_relation_lover = scope:adventurer + } + } + alternative_limit = { + grantable_close_family_trigger = yes + has_strong_claim_on = scope:new_title + } + alternative_limit = { + grantable_close_family_trigger = yes + grantable_gender_preference_trigger = yes + } + alternative_limit = { grantable_close_family_trigger = yes } + weight = { + base = 1 + modifier = { + is_child_of = scope:adventurer + add = 10 + } + modifier = { + is_sibling_of = scope:adventurer + add = 5 + } + } + if = { + limit = { NOT = { exists = scope:alt_1 } } + save_scope_as = alt_1 + } + else_if = { + limit = { NOT = { exists = scope:alt_2 } } + save_scope_as = alt_2 + } + else_if = { + limit = { NOT = { exists = scope:alt_3 } } + save_scope_as = alt_3 + } + add_to_list = family_list + } + } + } + ### FIND CLAIMANTS TO GRANT TO + if = { + limit = { + NOT = { exists = scope:alt_3 } + } + scope:new_title = { + while = { + count = 3 + random_claimant = { + limit = { + grantable_claimant_trigger = yes + OR = { + has_relation_friend = scope:adventurer + has_relation_lover = scope:adventurer + is_extended_family_of = scope:adventurer + } + grantable_gender_preference_trigger = yes + } + alternative_limit = { + grantable_claimant_trigger = yes + has_strong_claim_on = scope:new_title + grantable_gender_preference_trigger = yes + } + alternative_limit = { + grantable_claimant_trigger = yes + OR = { + has_relation_friend = scope:adventurer + has_relation_lover = scope:adventurer + is_extended_family_of = scope:adventurer + } + } + alternative_limit = { + grantable_claimant_trigger = yes + has_strong_claim_on = scope:new_title + grantable_gender_preference_trigger = yes + } + alternative_limit = { + grantable_claimant_trigger = yes + grantable_gender_preference_trigger = yes + } + alternative_limit = { grantable_claimant_trigger = yes } + if = { + limit = { NOT = { exists = scope:alt_1 } } + save_scope_as = alt_1 + } + else_if = { + limit = { NOT = { exists = scope:alt_2 } } + save_scope_as = alt_2 + } + else_if = { + limit = { NOT = { exists = scope:alt_3 } } + save_scope_as = alt_3 + } + add_to_list = claimant_list + } + } + } + } + } + # Portrait scopes + if = { + limit = { + exists = scope:new_liege + NOT = { exists = scope:alt_3 } + } + scope:new_liege = { save_scope_as = portrait_scope } + } + else = { + scope:alt_3 ?= { save_scope_as = portrait_scope } + } + } + + option = { # Become Landed + name = ep3_laamps.0800.a + if = { + limit = { + NOT = { has_trait = adventurer } + } + add_trait = adventurer + } + hidden_effect = { + every_courtier = { + set_variable = { + name = former_camp_leader + value = root + } + add_trait = adventurer_follower + } + } + ep3_become_landed_transfer_effect = { + TITLE_RECEIVER = root + TITLE_LIST = landed_titles + TYPE = granted + REASON = flag:granted + } + if = { + limit = { + has_character_modifier = ep3_lust_for_land_modifier + } + remove_character_modifier = ep3_lust_for_land_modifier + } + } + option = { # Give to 1 + name = { + text = ep3_laamps.0800.b + trigger = { scope:alt_1 = { is_close_family_of = scope:adventurer } } + } + name = { + text = ep3_laamps.0800.b.claimant + trigger = { NOT = { scope:alt_1 = { is_close_family_of = scope:adventurer } } } + } + trigger = { exists = scope:alt_1 } + scope:alt_1 = { grant_land_to_beneficiary_effect = yes } + transfer_crusader_king_trait_effect = { BENEFICIARY = scope:alt_1 } + } + option = { # Give to 2 + name = { + text = ep3_laamps.0800.c + trigger = { scope:alt_2 = { is_close_family_of = scope:adventurer } } + } + name = { + text = ep3_laamps.0800.c.claimant + trigger = { NOT = { scope:alt_2 = { is_close_family_of = scope:adventurer } } } + } + trigger = { exists = scope:alt_2 } + scope:alt_2 = { grant_land_to_beneficiary_effect = yes } + transfer_crusader_king_trait_effect = { BENEFICIARY = scope:alt_2 } + } + option = { # Give to 3 + name = { + text = ep3_laamps.0800.d + trigger = { scope:alt_3 = { is_close_family_of = scope:adventurer } } + } + name = { + text = ep3_laamps.0800.d.claimant + trigger = { NOT = { scope:alt_3 = { is_close_family_of = scope:adventurer } } } + } + trigger = { exists = scope:alt_3 } + scope:alt_3 = { grant_land_to_beneficiary_effect = yes } + transfer_crusader_king_trait_effect = { BENEFICIARY = scope:alt_3 } + } + option = { # Give to liege/random dude + name = { + text = ep3_laamps.0800.e.liege + trigger = { exists = scope:new_liege } + } + name = { + text = ep3_laamps.0800.e + trigger = { NOT = { exists = scope:new_liege } } + } + trigger = { + OR = { + NOT = { exists = scope:alt_1 } + exists = scope:new_liege + } + } + if = { + limit = { exists = scope:new_liege } + scope:new_liege = { grant_land_to_beneficiary_effect = yes } + transfer_crusader_king_trait_effect = { BENEFICIARY = scope:new_liege } + } + else = { + hidden_effect_new_object = { + create_character = { + template = laamp_inheritor_template + culture = scope:new_capital.culture + faith = scope:new_capital.faith + dynasty = generate + location = scope:new_capital.title_province + after_creation = { save_scope_as = land_grantee } + } + scope:land_grantee = { grant_land_to_beneficiary_effect = yes } + } + custom_tooltip = become_landless_adventurer_decision_title_created_tt + } + transfer_crusader_king_trait_effect = { BENEFICIARY = scope:land_grantee } + } + + after = { remove_character_flag = laamp_is_crusader_king } +} + +################################################## +# The Roads We Walk +# by Ewan Cowhig Croft +# 1001 - 1010 +################################################## + +scripted_effect ep3_laamps_1001_pick_best_skill_effect = { + if = { + limit = { + NOT = { exists = scope:pick_$PICK$ } + calc_true_if = { + amount >= $POSITION$ + $SKILL_1$ >= $SKILL_2$ + $SKILL_1$ >= $SKILL_3$ + $SKILL_1$ >= $SKILL_4$ + $SKILL_1$ >= $SKILL_5$ + $SKILL_1$ >= $SKILL_6$ + } + } + save_scope_value_as = { + name = $SKILL_1$_char + value = yes + } + save_scope_value_as = { + name = pick_$PICK$ + value = flag:$SKILL_1$ + } + } +} + +scripted_effect ep3_laamps_1001_pick_best_skill_wrapper_effect = { + # Diplomacy. + if = { + limit = { + NOR = { + exists = scope:diplomacy_char + scope:pick_1 ?= flag:diplomacy + scope:pick_2 ?= flag:diplomacy + scope:pick_3 ?= flag:diplomacy + } + } + ep3_laamps_1001_pick_best_skill_effect = { + SKILL_1 = diplomacy + POSITION = $POSITION$ + SKILL_2 = martial + SKILL_3 = stewardship + SKILL_4 = intrigue + SKILL_5 = learning + SKILL_6 = prowess + PICK = $PICK$ + } + } + # Martial. + if = { + limit = { + NOR = { + exists = scope:martial_char + scope:pick_1 ?= flag:martial + scope:pick_2 ?= flag:martial + scope:pick_3 ?= flag:martial + } + } + ep3_laamps_1001_pick_best_skill_effect = { + SKILL_1 = martial + POSITION = $POSITION$ + SKILL_2 = diplomacy + SKILL_3 = stewardship + SKILL_4 = intrigue + SKILL_5 = learning + SKILL_6 = prowess + PICK = $PICK$ + } + } + # Stewardship. + if = { + limit = { + NOR = { + exists = scope:stewardship_char + scope:pick_1 ?= flag:stewardship + scope:pick_2 ?= flag:stewardship + scope:pick_3 ?= flag:stewardship + } + } + ep3_laamps_1001_pick_best_skill_effect = { + SKILL_1 = stewardship + POSITION = $POSITION$ + SKILL_2 = diplomacy + SKILL_3 = martial + SKILL_4 = intrigue + SKILL_5 = learning + SKILL_6 = prowess + PICK = $PICK$ + } + } + # Intrigue. + if = { + limit = { + NOR = { + exists = scope:intrigue_char + scope:pick_1 ?= flag:intrigue + scope:pick_2 ?= flag:intrigue + scope:pick_3 ?= flag:intrigue + } + } + ep3_laamps_1001_pick_best_skill_effect = { + SKILL_1 = intrigue + POSITION = $POSITION$ + SKILL_2 = diplomacy + SKILL_3 = martial + SKILL_4 = stewardship + SKILL_5 = learning + SKILL_6 = prowess + PICK = $PICK$ + } + } + # Learning. + if = { + limit = { + NOR = { + exists = scope:learning_char + scope:pick_1 ?= flag:learning + scope:pick_2 ?= flag:learning + scope:pick_3 ?= flag:learning + } + } + ep3_laamps_1001_pick_best_skill_effect = { + SKILL_1 = learning + POSITION = $POSITION$ + SKILL_2 = diplomacy + SKILL_3 = martial + SKILL_4 = stewardship + SKILL_5 = intrigue + SKILL_6 = prowess + PICK = $PICK$ + } + } + # Prowess. + if = { + limit = { + NOR = { + exists = scope:prowess_char + scope:pick_1 ?= flag:prowess + scope:pick_2 ?= flag:prowess + scope:pick_3 ?= flag:prowess + } + } + ep3_laamps_1001_pick_best_skill_effect = { + SKILL_1 = prowess + POSITION = $POSITION$ + SKILL_2 = diplomacy + SKILL_3 = martial + SKILL_4 = stewardship + SKILL_5 = intrigue + SKILL_6 = learning + PICK = $PICK$ + } + } +} + +scripted_effect ep3_laamps_1001_generate_diplomacy_char_effect = { + create_character = { + template = pool_repopulate_diplomacy + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = diplomacy_1 + diplomacy = { + min_template_high_skill + max_template_high_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } + create_character = { + template = pool_repopulate_diplomacy + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = diplomacy_2 + diplomacy = { + min_template_high_skill + max_template_high_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } +} +scripted_effect ep3_laamps_1001_generate_martial_char_effect = { + create_character = { + template = pool_repopulate_martial + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = martial_1 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_high_skill + max_template_high_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } + create_character = { + template = pool_repopulate_martial + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = martial_2 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_high_skill + max_template_high_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } +} +scripted_effect ep3_laamps_1001_generate_stewardship_char_effect = { + create_character = { + template = pool_repopulate_stewardship + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = stewardship_1 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_high_skill + max_template_high_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } + create_character = { + template = pool_repopulate_stewardship + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = stewardship_2 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_high_skill + max_template_high_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } +} +scripted_effect ep3_laamps_1001_generate_intrigue_char_effect = { + create_character = { + template = pool_repopulate_intrigue + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = intrigue_1 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_high_skill + max_template_high_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } + create_character = { + template = pool_repopulate_intrigue + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = intrigue_2 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_high_skill + max_template_high_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } +} +scripted_effect ep3_laamps_1001_generate_learning_char_effect = { + create_character = { + template = pool_repopulate_learning + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = learning_1 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_high_skill + max_template_high_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } + create_character = { + template = pool_repopulate_learning + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = learning_2 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_high_skill + max_template_high_skill + } + prowess = { + min_template_average_skill + max_template_average_skill + } + after_creation = { add_to_list = spawned_chars_list } + } +} +scripted_effect ep3_laamps_1001_generate_prowess_char_effect = { + create_character = { + template = pool_repopulate_prowess + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = prowess_1 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_high_skill + max_template_high_skill + } + after_creation = { add_to_list = spawned_chars_list } + } + create_character = { + template = pool_repopulate_prowess + dynasty = none + culture = root.location.culture + faith = root.location.faith + location = root.location + save_scope_as = prowess_2 + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_average_skill + max_template_average_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + prowess = { + min_template_high_skill + max_template_high_skill + } + after_creation = { add_to_list = spawned_chars_list } + } +} + +scripted_effect ep3_laamps_1001_boost_courtier_opinion_effect = { + hidden_effect = { + # Improve their opinion of us. + reverse_add_opinion = { + target = scope:$SKILL$_1 + modifier = respect_opinion + opinion = 100 + } + reverse_add_opinion = { + target = scope:$SKILL$_2 + modifier = respect_opinion + opinion = 100 + } + # And, just in case, make sure we like them. + add_opinion = { + target = scope:$SKILL$_1 + modifier = respect_opinion + opinion = 100 + } + add_opinion = { + target = scope:$SKILL$_2 + modifier = respect_opinion + opinion = 100 + } + } +} + +scripted_effect ep3_laamps_1001_add_courtiers_effect = { + # Nab our dudes. + add_courtier = scope:$SKILL$_1 + add_courtier = scope:$SKILL$_2 +} + +scripted_trigger ep3_laamps_1001_basic_trigger = { + NOR = { + has_character_flag = special_laamp_char + has_character_flag = got_starting_courtiers + } + # In case you become a laamp then immediately become landed again. + has_government = landless_adventurer_government +} + +# We generate some starting courtiers for you so that you don't get irredeemably screwed at a basic laamp. +ep3_laamps.1001 = { + type = character_event + title = ep3_laamps.1001.t + desc = { + desc = ep3_laamps.1001.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_trait = blind } + desc = ep3_laamps.1001.desc.blind + } + desc = ep3_laamps.1001.desc.at_least_one_working_eye + } + } + theme = friendly + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = wilderness } + + trigger = { + ep3_laamps_1001_basic_trigger = yes + # Must be on land or else we don't know where to take our locals from. + exists = location.county + } + + on_trigger_fail = { + if = { + limit = { ep3_laamps_1001_basic_trigger = yes } + trigger_event = { + id = ep3_laamps.1001 + months = { 1 3 } + } + } + } + + cooldown = { years = 20 } + + immediate = { + # Alright, let's grab our best skills — we care about prowess so we need to do this the manual way. + ## First best. + ep3_laamps_1001_pick_best_skill_wrapper_effect = { POSITION = 5 PICK = 1 } + ## Second best. + ep3_laamps_1001_pick_best_skill_wrapper_effect = { POSITION = 4 PICK = 2 } + ## Third best. + ep3_laamps_1001_pick_best_skill_wrapper_effect = { POSITION = 3 PICK = 3 } + # Cool, now if we're the player, we generate our characters straight away so that we can display them in tooltips. + if = { + limit = { is_ai = no } + if = { + limit = { exists = scope:diplomacy_char } + ep3_laamps_1001_generate_diplomacy_char_effect = yes + ep3_laamps_1001_boost_courtier_opinion_effect = { SKILL = diplomacy } + } + if = { + limit = { exists = scope:martial_char } + ep3_laamps_1001_generate_martial_char_effect = yes + ep3_laamps_1001_boost_courtier_opinion_effect = { SKILL = martial } + } + if = { + limit = { exists = scope:stewardship_char } + ep3_laamps_1001_generate_stewardship_char_effect = yes + ep3_laamps_1001_boost_courtier_opinion_effect = { SKILL = stewardship } + } + if = { + limit = { exists = scope:intrigue_char } + ep3_laamps_1001_generate_intrigue_char_effect = yes + ep3_laamps_1001_boost_courtier_opinion_effect = { SKILL = intrigue } + } + if = { + limit = { exists = scope:learning_char } + ep3_laamps_1001_generate_learning_char_effect = yes + ep3_laamps_1001_boost_courtier_opinion_effect = { SKILL = learning } + } + if = { + limit = { exists = scope:prowess_char } + ep3_laamps_1001_generate_prowess_char_effect = yes + ep3_laamps_1001_boost_courtier_opinion_effect = { SKILL = prowess } + } + } + add_character_flag = got_starting_courtiers + # Plus, nicknamify as many as we can. + hidden_effect = { + every_in_list = { + list = spawned_chars_list + assign_random_nickname_effect = yes + } + } + } + + # Diplomacy. + option = { + name = ep3_laamps.1001.a + trigger = { exists = scope:diplomacy_char } + skill = diplomacy + + # Label what this means. + custom_tooltip = ep3_laamps.1001.a.tt + # For the player, we just add their pregenerated courtiers. + if = { + limit = { is_ai = no } + ep3_laamps_1001_add_courtiers_effect = { SKILL = diplomacy } + } + # For the AI, generate their characters here. + else = { + ep3_laamps_1001_generate_diplomacy_char_effect = yes + ep3_laamps_1001_add_courtiers_effect = { SKILL = diplomacy } + ep3_laamps_1001_boost_courtier_opinion_effect = { SKILL = diplomacy } + } + + # No stress for mechanical events. + ai_chance = { + base = 1 + # AI pick best skill, always. + modifier = { + add = 1000 + highest_skill = diplomacy + diplomacy >= prowess + } + } + } + + # Martial. + option = { + name = ep3_laamps.1001.b + trigger = { exists = scope:martial_char } + skill = martial + + # Label what this means. + custom_tooltip = ep3_laamps.1001.b.tt + # For the player, we just add their pregenerated courtiers. + if = { + limit = { is_ai = no } + ep3_laamps_1001_add_courtiers_effect = { SKILL = martial } + } + # For the AI, generate their characters here. + else = { + ep3_laamps_1001_generate_martial_char_effect = yes + ep3_laamps_1001_add_courtiers_effect = { SKILL = martial } + } + + # No stress for mechanical events. + ai_chance = { + base = 1 + # AI pick best skill, always. + modifier = { + add = 1000 + highest_skill = martial + martial >= prowess + } + modifier = { + add = 150 + culture = { + has_cultural_parameter = much_more_likely_to_be_laamps + } + } + modifier = { + add = 50 + culture = { + has_cultural_parameter = more_likely_to_be_laamps + } + } + } + } + + # Stewardship. + option = { + name = ep3_laamps.1001.c + trigger = { exists = scope:stewardship_char } + skill = stewardship + + # Label what this means. + custom_tooltip = ep3_laamps.1001.c.tt + # For the player, we just add their pregenerated courtiers. + if = { + limit = { is_ai = no } + ep3_laamps_1001_add_courtiers_effect = { SKILL = stewardship } + } + # For the AI, generate their characters here. + else = { + ep3_laamps_1001_generate_stewardship_char_effect = yes + ep3_laamps_1001_add_courtiers_effect = { SKILL = stewardship } + } + + # No stress for mechanical events. + ai_chance = { + base = 1 + # AI pick best skill, always. + modifier = { + add = 1000 + highest_skill = stewardship + stewardship >= prowess + } + } + } + + # Intrigue. + option = { + name = ep3_laamps.1001.d + trigger = { exists = scope:intrigue_char } + skill = intrigue + + # Label what this means. + custom_tooltip = ep3_laamps.1001.d.tt + # For the player, we just add their pregenerated courtiers. + if = { + limit = { is_ai = no } + ep3_laamps_1001_add_courtiers_effect = { SKILL = intrigue } + } + # For the AI, generate their characters here. + else = { + ep3_laamps_1001_generate_intrigue_char_effect = yes + ep3_laamps_1001_add_courtiers_effect = { SKILL = intrigue } + } + + # No stress for mechanical events. + ai_chance = { + base = 1 + # AI pick best skill, always. + modifier = { + add = 1000 + highest_skill = intrigue + intrigue >= prowess + } + } + } + + # Learning. + option = { + name = ep3_laamps.1001.e + trigger = { exists = scope:learning_char } + skill = learning + + # Label what this means. + custom_tooltip = ep3_laamps.1001.e.tt + # For the player, we just add their pregenerated courtiers. + if = { + limit = { is_ai = no } + ep3_laamps_1001_add_courtiers_effect = { SKILL = learning } + } + # For the AI, generate their characters here. + else = { + ep3_laamps_1001_generate_learning_char_effect = yes + ep3_laamps_1001_add_courtiers_effect = { SKILL = learning } + } + + # No stress for mechanical events. + ai_chance = { + base = 1 + # AI pick best skill, always. + modifier = { + add = 1000 + highest_skill = learning + learning >= prowess + } + } + } + + # Prowess. + option = { + name = ep3_laamps.1001.f + trigger = { exists = scope:prowess_char } + skill = prowess + + # Label what this means. + custom_tooltip = ep3_laamps.1001.f.tt + # For the player, we just add their pregenerated courtiers. + if = { + limit = { is_ai = no } + ep3_laamps_1001_add_courtiers_effect = { SKILL = prowess } + } + # For the AI, generate their characters here. + else = { + ep3_laamps_1001_generate_prowess_char_effect = yes + ep3_laamps_1001_add_courtiers_effect = { SKILL = prowess } + } + + # No stress for mechanical events. + ai_chance = { + base = 1 + # AI pick best skill, always. + modifier = { + add = 1000 + prowess >= diplomacy + prowess >= martial + prowess >= stewardship + prowess >= intrigue + prowess >= learning + } + modifier = { + add = 150 + culture = { + has_cultural_parameter = much_more_likely_to_be_laamps + } + } + modifier = { + add = 50 + culture = { + has_cultural_parameter = more_likely_to_be_laamps + } + } + } + } + + # Larry Loner of the Clan McNoMates. + option = { + name = ep3_laamps.1001.g + + if = { + limit = { + any_courtier = { count <= 0 } + } + custom_tooltip = ep3_laamps.1001.g.tt.difficulty + } + else = { custom_tooltip = ep3_laamps.1001.g.tt.followers } + + # No stress for mechanical events. + ai_chance = { + # Player opt out. + base = 0 + } + } +} + +# Error suppression for the history files. +ep3_laamps.1002 = { + hidden = yes + orphan = yes + + immediate = { set_variable = special_laamp_char } +} + +################################################## +# Sworn by the Sword +# by Ewan Cowhig Croft +# 1011 - 1020 +################################################## + +# You extract an oath of loyalty from one of your knights. +ep3_laamps.1011 = { + type = character_event + title = ep3_laamps.1011.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:tiles_misc } + desc = ep3_laamps.1011.desc.four_plus_titles + } + triggered_desc = { + trigger = { exists = scope:title_3 } + desc = ep3_laamps.1011.desc.three_titles + } + triggered_desc = { + trigger = { exists = scope:title_2 } + desc = ep3_laamps.1011.desc.two_titles + } + triggered_desc = { + trigger = { exists = scope:title_1 } + desc = ep3_laamps.1011.desc.one_title + } + } + desc = ep3_laamps.1011.desc.midtro + first_valid = { + triggered_desc = { + trigger = { has_character_flag = has_sworn_sword_before } + desc = ep3_laamps.1011.desc.prior_swords + } + desc = ep3_laamps.1011.desc.first_sword + } + desc = ep3_laamps.1011.desc.outro + } + theme = realm + left_portrait = { + character = scope:actor + animation = personality_bold + } + right_portrait = { + character = scope:recipient + animation = throne_room_kneel_1 + } + override_background = { reference = feast } + + immediate = { + # Grab our random claims, as appropriate. + if = { + # We don't care about doing this for the robots. + limit = { is_ai = no } + ordered_claim = { + limit = { tier >= tier_kingdom } + order_by = { + # Our basics. + value = tier + # If we once held them, boost them up the rankings. + if = { + limit = { + any_past_holder = { this = root } + } + multiply = 10 + } + # And if a relative holds them, boost those up too. + else_if = { + limit = { + holder ?= { is_close_or_extended_family_of = root } + } + multiply = 5 + } + } + max = 4 + check_range_bounds = no + # First title. + if = { + limit = { + NOT = { exists = scope:title_1 } + } + save_scope_as = title_1 + } + # Second title. + else_if = { + limit = { + NOT = { + this = scope:title_1 + exists = scope:title_2 + } + } + save_scope_as = title_2 + } + # Third title. + else_if = { + limit = { + NOT = { + this = scope:title_1 + this = scope:title_2 + exists = scope:title_3 + } + } + save_scope_as = title_3 + } + # Are there any other titles? + else_if = { + limit = { + NOT = { + this = scope:title_1 + this = scope:title_2 + this = scope:title_3 + } + } + save_scope_value_as = { + name = tiles_misc + value = yes + } + } + } + } + # Add our hook. + add_hook = { + type = loyalty_hook + target = scope:recipient + } + # And register that we've taken the event once before. + add_character_flag = has_sworn_sword_before + } + + # Mutual loyalty hook. + option = { + name = ep3_laamps.1011.a + + scope:recipient = { + add_hook = { + type = follower_oath_strong_hook + target = scope:actor + } + add_opinion = { + target = scope:actor + modifier = trust_opinion + opinion = 100 + } + } + + stress_impact = { + just = major_stress_impact_loss + arbitrary = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 2 } + } + } + + # One-way + weak hook. + option = { + name = ep3_laamps.1011.b + + scope:recipient = { + add_hook = { + type = follower_oath_hook + target = scope:actor + } + add_opinion = { + target = scope:actor + modifier = respect_opinion + opinion = 30 + } + } + + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 2 } + } + } +} + +################################################## +# Camp Purpose Maintenance +# by Ewan Cowhig Croft +# 1021 - 1030 +################################################## + +# Destroy any inappropriate buildings and upgrades. +ep3_laamps.1021 = { + hidden = yes + + immediate = { + if = { + limit = { + domicile = { + OR = { + has_domicile_building = supply_tent_reserve_provisions + has_domicile_construction = supply_tent_reserve_provisions + } + } + NOT = { has_realm_law_flag = unlocks_supply_tent_reserve_provisions } + } + domicile = { remove_domicile_building = supply_tent_reserve_provisions } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = supply_tent_reserve_water + has_domicile_construction = supply_tent_reserve_water + } + } + NOT = { has_realm_law_flag = unlocks_supply_tent_reserve_water } + } + domicile = { remove_domicile_building = supply_tent_reserve_water } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = supply_tent_climbing_gear + has_domicile_construction = supply_tent_climbing_gear + } + } + NOT = { has_realm_law_flag = unlocks_supply_tent_climbing_gear } + } + domicile = { remove_domicile_building = supply_tent_climbing_gear } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = supply_tent_subdued_gear + has_domicile_construction = supply_tent_subdued_gear + } + } + NOT = { has_realm_law_flag = unlocks_supply_tent_subdued_gear } + } + domicile = { remove_domicile_building = supply_tent_subdued_gear } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = barber_tent_reference_corpus + has_domicile_construction = barber_tent_reference_corpus + } + } + NOT = { has_realm_law_flag = unlocks_barber_tent_reference_corpus } + } + domicile = { remove_domicile_building = barber_tent_reference_corpus } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = barber_tent_morticians_tools + has_domicile_construction = barber_tent_morticians_tools + } + } + NOT = { has_realm_law_flag = unlocks_barber_tent_morticians_tools } + } + domicile = { remove_domicile_building = barber_tent_morticians_tools } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = baggage_train_siege_engineers + has_domicile_construction = baggage_train_siege_engineers + } + } + NOT = { has_realm_law_flag = unlocks_baggage_train_siege_engineers } + } + domicile = { remove_domicile_building = baggage_train_siege_engineers } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = baggage_train_scribes + has_domicile_construction = baggage_train_scribes + } + } + NOT = { has_realm_law_flag = unlocks_baggage_train_scribes } + } + domicile = { remove_domicile_building = baggage_train_scribes } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = baggage_train_proof_of_claims + has_domicile_construction = baggage_train_proof_of_claims + } + } + NOT = { has_realm_law_flag = unlocks_baggage_train_proof_of_claims } + } + domicile = { remove_domicile_building = baggage_train_proof_of_claims } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = baggage_train_ransom_cages + has_domicile_construction = baggage_train_ransom_cages + } + } + NOT = { has_realm_law_flag = unlocks_baggage_train_ransom_cages } + } + domicile = { remove_domicile_building = baggage_train_ransom_cages } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = baggage_train_negotiators + has_domicile_construction = baggage_train_negotiators + } + } + NOT = { has_realm_law_flag = unlocks_baggage_train_negotiators } + } + domicile = { remove_domicile_building = baggage_train_negotiators } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = baggage_train_ascetics + has_domicile_construction = baggage_train_ascetics + } + } + NOT = { has_realm_law_flag = unlocks_baggage_train_ascetics } + } + domicile = { remove_domicile_building = baggage_train_ascetics } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = camp_fire_local_hangers_on + has_domicile_construction = camp_fire_local_hangers_on + } + } + NOT = { has_realm_law_flag = unlocks_camp_fire_local_hangers_on } + } + domicile = { remove_domicile_building = camp_fire_local_hangers_on } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = camp_fire_future_dreams + has_domicile_construction = camp_fire_future_dreams + } + } + NOT = { has_realm_law_flag = unlocks_camp_fire_future_dreams } + } + domicile = { remove_domicile_building = camp_fire_future_dreams } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = camp_fire_nightly_debates + has_domicile_construction = camp_fire_nightly_debates + } + } + NOT = { has_realm_law_flag = unlocks_camp_fire_nightly_debates } + } + domicile = { remove_domicile_building = camp_fire_nightly_debates } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = camp_fire_juicy_rumors + has_domicile_construction = camp_fire_juicy_rumors + } + } + NOT = { has_realm_law_flag = unlocks_camp_fire_juicy_rumors } + } + domicile = { remove_domicile_building = camp_fire_juicy_rumors } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = proving_grounds_lockwagon + has_domicile_construction = proving_grounds_lockwagon + } + } + NOT = { has_realm_law_flag = unlocks_proving_grounds_lockwagon } + } + domicile = { remove_domicile_building = proving_grounds_lockwagon } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = proving_grounds_martial_study + has_domicile_construction = proving_grounds_martial_study + } + } + NOT = { has_realm_law_flag = unlocks_proving_grounds_martial_study } + } + domicile = { remove_domicile_building = proving_grounds_martial_study } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = proving_grounds_the_stick_game + has_domicile_construction = proving_grounds_the_stick_game + } + } + NOT = { has_realm_law_flag = unlocks_proving_grounds_the_stick_game } + } + domicile = { remove_domicile_building = proving_grounds_the_stick_game } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = proving_grounds_bodyguard_drills + has_domicile_construction = proving_grounds_bodyguard_drills + } + } + NOT = { has_realm_law_flag = unlocks_proving_grounds_bodyguard_drills } + } + domicile = { remove_domicile_building = proving_grounds_bodyguard_drills } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = camp_perimeter_extra_watch + has_domicile_construction = camp_perimeter_extra_watch + } + } + NOT = { has_realm_law_flag = unlocks_camp_perimeter_extra_watch } + } + domicile = { remove_domicile_building = camp_perimeter_extra_watch } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = camp_perimeter_palisade + has_domicile_construction = camp_perimeter_palisade + } + } + NOT = { has_realm_law_flag = unlocks_camp_perimeter_palisade } + } + domicile = { remove_domicile_building = camp_perimeter_palisade } + } + if = { + limit = { + domicile = { + OR = { + has_domicile_building = camp_perimeter_ditch + has_domicile_construction = camp_perimeter_ditch + } + } + NOT = { has_realm_law_flag = unlocks_camp_perimeter_ditch } + } + domicile = { remove_domicile_building = camp_perimeter_ditch } + } + } +} + +################################################## +# General LAAMP events +# by Nick Meredith +# 5000-5998 +################################################## + +# Poach for food +ep3_laamps.5000 = { + type = character_event + title = ep3_laamps.5000.t + desc = { + desc = ep3_laamps.5000.desc + first_valid = { + triggered_desc = { + trigger = { + domicile = { + provisions < provisions_privation_threshold_low + } + } + desc = ep3_laamps.5000.provisionslow + } + desc = ep3_laamps.5000.provisionsok + } + desc = ep3_laamps.5000.ending + } + theme = landless_adventurer + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:hunter + animation = personality_rational + } + lower_center_portrait = { + character = scope:local_lord + } + cooldown = { years = 10 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_available = yes + + #Ensure we have a hunter + any_courtier = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + age > 16 + } + is_location_valid_for_travel_event_on_land = yes + #Ensure we're in a place that's held by someone + exists = location.county.holder + + is_vegetarian_trigger = no + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + domicile = { + provisions < provisions_privation_threshold_low + } + } + modifier = { + factor = 3 + location = { + has_building_or_higher = royal_forest_01 + } + } + modifier = { + factor = 1.5 + location = { + has_holding = yes + } + } + } + + immediate = { + random_courtier = { + limit = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + age > 16 + } + save_scope_as = hunter + } + location.county.holder = { + save_scope_as = local_lord + } + location = { + save_scope_as = location + } + } + + #Petition them for rights to hunt + option = { + name = ep3_laamps.5000.a + + flavor = ep3_laamps.5000.a.tt + + duel = { + target = scope:local_lord + skill = diplomacy + + 40 = { #They agree + desc = ep3_laamps.5000.a.success + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5000.a.success + left_icon = root + right_icon = scope:local_lord + + domicile ?= { + change_provisions = medium_provisions_gain + } + } + } + + 40 = { #They agree, but insist on you paying + desc = ep3_laamps.5000.a.failure + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5000.a.failure + left_icon = root + right_icon = scope:local_lord + + pay_short_term_gold = { + target = scope:local_lord + gold = 10 + } + + domicile ?= { + change_provisions = medium_provisions_gain + } + } + } + + 10 = { #They refuse + desc = ep3_laamps.5000.a.critfailure + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5000.a.critfailure + left_icon = root + right_icon = scope:local_lord + + add_prestige = minor_prestige_loss + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + #Risk it for the biscuit + option = { + name = ep3_laamps.5000.b + + scope:hunter = { + duel = { + value = decent_skill_rating + skill = prowess + + 45 = { #They poach successfully + desc = ep3_laamps.5000.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + root = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5000.b.success + left_icon = root + right_icon = scope:local_lord + domicile ?= { change_provisions = medium_provisions_gain } + } + } + } + + 45 = { #They are caught and fined + desc = ep3_laamps.5000.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5000.b.failure + left_icon = root + right_icon = scope:local_lord + pay_short_term_gold = { + target = scope:local_lord + gold = 10 + } + domicile ?= { change_provisions = minor_provisions_gain } + } + } + } + + 10 = { #They are caught and imprisoned! + desc = ep3_laamps.5000.b.critfailure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 1 + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5000.b.critfailure + left_icon = root + right_icon = scope:local_lord + + scope:local_lord = { + imprison = { + target = scope:hunter + type = dungeon + } + } + } + } + } + } + } + + stress_impact = { + honest = medium_stress_impact_gain + deceitful = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + #Forage for berries n stuff + option = { + name = ep3_laamps.5000.c + + random_list = { + 10 = { #You find provisions + desc = ep3_laamps.5000.c.success + + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5000.c.success + left_icon = root + right_icon = scope:hunter + + domicile ?= { + change_provisions = { + value = { miniscule_provisions_gain minor_provisions_gain } + } + } + } + } + + 5 = { #You don't find provisions + desc = ep3_laamps.5000.c.failure + + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5000.c.failure + left_icon = root + right_icon = scope:hunter + + add_stress = minor_stress_gain + add_character_modifier = { + modifier = ep3_supply_issues_modifier + years = 5 + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } +} + +# Meet a wandering priest +ep3_laamps.5005 = { + type = character_event + title = ep3_laamps.5005.t + desc = { + desc = ep3_laamps.5005.desc + first_valid = { + triggered_desc = { + trigger = { + scope:priest.faith = root.faith + } + desc = ep3_laamps.5005.samefaith + } + desc = ep3_laamps.5005.difffaith + } + } + theme = landless_adventurer + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:priest + animation = obsequious_bow + } + cooldown = { years = 10 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_location_valid_for_travel_event_on_land = yes + #Ensure we're in a place that's held by someone + exists = location.county.holder + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 3 + OR = { + faith = { has_doctrine = tenet_mendicant_preachers } + location.county.holder.faith = { has_doctrine = tenet_mendicant_preachers } + } + } + } + + immediate = { + create_character = { + template = mendicant_mystic_character + gender_female_chance = root_soldier_female_chance + age = { 35 65 } + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + save_scope_as = priest + after_creation = { + add_character_flag = created + } + } + location.county.holder = { + save_scope_as = location_holder + } + location = { + save_scope_as = location + } + # Plus give 'em a nickname. + hidden_effect = { + scope:priest = { assign_random_nickname_effect = yes } + } + } + + #Ask him to join your followers + option = { + name = ep3_laamps.5005.a + + duel = { + target = scope:priest + skill = diplomacy + + 50 = { #They agree + desc = ep3_laamps.5005.a.success + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5005.a.success + left_icon = root + right_icon = scope:priest + + add_courtier = scope:priest + + if = { + limit = { + scope:priest.faith = root.faith + } + add_character_modifier = { + modifier = ep3_priest_friend_same_modifier + years = 5 + } + } + else = { + add_character_modifier = { + modifier = ep3_priest_friend_different_modifier + years = 5 + } + } + } + } + + 50 = { #They don't want to stay + desc = ep3_laamps.5005.a.failure + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5005.a.failure + left_icon = root + right_icon = scope:priest + + add_stress = miniscule_stress_gain + } + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + #Invite him to sit and stay a night + option = { + name = ep3_laamps.5005.b + + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = { + integer_range = { + min = 10 + max = 25 + } + } + } + } + else = { + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = { + integer_range = { + min = 10 + max = 25 + } + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + trusting = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Turn him away + option = { + name = ep3_laamps.5005.c + + trigger = { + scope:priest.faith = root.faith + } + + flavor = ep3_laamps.5005.c.tt + + every_courtier = { + limit = { + faith != scope:priest.faith + } + custom = every_non_faith_follower + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + } + + add_character_modifier = { + modifier = ep3_ungodly_hospitality_modifier + years = 5 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + #Turn him away, since he's a heretic + option = { + name = ep3_laamps.5005.d + + trigger = { + scope:priest.faith != root.faith + } + + add_piety = medium_piety_value + + add_character_modifier = { + modifier = ep3_inflexible_worshipper_modifier + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + after = { + scope:priest ?= { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# The rough life begins to hurt +ep3_laamps.5010 = { + type = character_event + title = ep3_laamps.5010.t + desc = ep3_laamps.5010.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:follower + animation = pain + } + cooldown = { years = 10 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + age < 65 #Just for loc tonality + is_location_valid_for_travel_event_on_land = yes + any_courtier = { + is_valid_active_event_recurrer_trigger = { LIEGE = ROOT } + is_adult = yes # is an adult + age < 65 # but not too old, so wincing in pain isn't just from being real old + } + } + + immediate = { + random_courtier = { + limit = { + is_valid_active_event_recurrer_trigger = { LIEGE = ROOT } + is_adult = yes # is an adult + age < 65 # but not too old, so wincing in pain isn't just from being real old + } + save_scope_as = follower + } + location = { + save_scope_as = location + } + if = { + limit = { + domicile = { has_domicile_building = camp_main_01 } + } + save_scope_value_as = { + name = gold_cost + value = { + value = camp_main_02_domicile_building_gold_cost_value + multiply = 0.5 + ceiling = yes + } + } + } + else_if = { + limit = { + domicile = { has_domicile_building = camp_main_02 } + } + save_scope_value_as = { + name = gold_cost + value = { + value = camp_main_03_domicile_building_gold_cost_value + multiply = 0.5 + ceiling = yes + } + } + } + else = { + save_scope_value_as = { + name = gold_cost + value = { + value = camp_main_04_domicile_building_gold_cost_value + multiply = 0.5 + ceiling = yes + } + } + } + } + + #Buy some beds at an inn for the night + option = { + name = ep3_laamps.5010.a + + remove_short_term_gold = minor_gold_value + + add_character_modifier = { + modifier = ep3_rested_and_refreshed_modifier + years = 5 + } + + every_courtier = { + custom = every_follower_custom + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + add_character_modifier = { + modifier = ep3_rested_and_refreshed_modifier + years = 5 + } + } + + stress_impact = { + base = medium_stress_impact_loss + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + compassionate = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Build a Pavilion upgrade at a discount + option = { + name = ep3_laamps.5010.b + trigger = { + NOT = { + domicile = { has_domicile_building = camp_main_04 } + } + gold >= scope:gold_cost + } + show_as_unavailable = { + NOT = { + domicile = { has_domicile_building = camp_main_04 } + } + gold <= scope:gold_cost + } + custom_tooltip = ep3_laamps.5010.b.tt + remove_short_term_gold = scope:gold_cost + domicile = { + if = { + limit = { has_domicile_building_or_higher = camp_main_01 } + 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 } + } + } + } + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Soldier on + option = { + name = ep3_laamps.5010.c + + random_list = { + 10 = { #It works out + desc = ep3_laamps.5010.c.success + modifier = { + add = 2 + scope:location = { + OR = { + terrain = farmlands + terrain = plains + terrain = oasis + terrain = forest + } + } + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5010.c.success + left_icon = root + right_icon = scope:follower + + add_stress = minor_stress_loss + } + } + + 5 = { #It doesn't work out + desc = ep3_laamps.5010.c.failure + modifier = { + add = 5 + age > 35 + } + modifier = { + add = 5 + age > 50 + } + modifier = { + add = 2 + scope:location = { + OR = { + terrain = desert + terrain = mountains + terrain = desert_mountains + terrain = wetlands + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5010.c.failure + left_icon = root + right_icon = scope:hunter + + add_stress = minor_stress_gain + add_character_modifier = { + modifier = ep3_cricked_neck_modifier + years = 5 + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + +# Offer a life to hardened fighters +ep3_laamps.5015 = { + type = character_event + title = ep3_laamps.5015.t + desc = ep3_laamps.5015.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:knight + animation = beg + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + cooldown = { years = 35 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_location_valid_for_travel_event_on_land = yes + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + domicile = { + provisions > provisions_threshold_good_value + } + } + modifier = { + factor = 2 + location.county = { + county_control < full_county_control + } + } + } + + immediate = { + location = { + save_scope_as = location + } + if = { + limit = { + any_pool_character = { + province = root.location + is_available_ai_adult = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = knight + } + } + else = { + create_character = { + template = honorable_soldier_character + location = root.location + culture = location.culture + faith = location.faith + gender_female_chance = root_soldier_female_chance + dynasty = none + save_scope_as = knight + after_creation = { + add_character_flag = created + } + } + } + hidden_effect = { + if = { + limit = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = gallowsbait + } + } + scope:knight = { + create_artifact_brooch_effect = { + OWNER = scope:knight + SMITH = scope:knight + } + add_gold = { 15 35 } + } + scope:newly_created_artifact = { + add_artifact_modifier = artifact_prowess_2_modifier + add_artifact_modifier = artifact_knight_effectiveness_2_modifier + set_artifact_rarity = masterwork + } + } + scope:knight = { + change_current_weight = -100 + # Plus give 'em a nickname. + assign_random_nickname_effect = yes + } + } + } + + #Rob him + option = { + name = ep3_laamps.5015.a + + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = gallowsbait + } + } + + flavor = ep3_laamps.5015.a.tt + + scope:knight = { + pay_short_term_gold = { + target = root + gold = { + value = scope:knight.gold + min = 5 + } + } + } + + scope:newly_created_artifact = { + set_owner = root + } + + if = { + limit = { + has_trait = gallowsbait + } + add_trait_xp = { + trait = gallowsbait + track = bandit + value = { + integer_range = { + min = 5 + max = 15 + } + } + } + } + else = { + add_trait = gallowsbait + add_trait_xp = { + trait = gallowsbait + track = bandit + value = { + integer_range = { + min = 5 + max = 15 + } + } + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -1 + } + } + } + + #Bring 'em all + option = { + name = ep3_laamps.5015.b + + trigger = { + maa_regiments_count >= 1 + } + + domicile = { + change_provisions = minor_provisions_loss + } + + reinforce_soldiers_regiment_effect = yes + + add_courtier = scope:knight + scope:knight = { + set_knight_status = force + } + + remove_short_term_gold = { 10 30 } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = medium_stress_impact_gain + compassionate = miniscule_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Hire the fella as a knight + option = { + name = ep3_laamps.5015.c + + add_courtier = scope:knight + scope:knight = { + set_knight_status = force + } + + stress_impact = { + generous = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Offer them a place to rest, but only that + option = { + name = ep3_laamps.5015.d + + domicile = { + change_provisions = microscopic_provisions_loss + } + + random = { + chance = 25 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5015.c.success + left_icon = root + + add_character_modifier = { + modifier = ep3_friend_to_old_soldiers_modifier + years = 30 + } + } + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + generous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + after = { + scope:knight = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Learn new local recipes +ep3_laamps.5020 = { + type = character_event + title = ep3_laamps.5020.t + desc = ep3_laamps.5020.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:cook + animation = personality_compassionate + } + cooldown = { years = 10 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_location_valid_for_travel_event_on_land = yes + culture != location.culture + any_courtier = { + is_available_ai_adult = yes + count >= 1 + } + culture = { + cultural_acceptance = { + target = root.location.culture + value <= 75 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + domicile = { + provisions < provisions_threshold_good_value + } + } + } + + immediate = { + location = { + save_scope_as = location + } + location.culture = { + save_scope_as = local_culture + } + culture = { + save_scope_as = culture + } + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = cook + } + save_scope_value_as = { + name = food_range + value = { + integer_range = { + min = 1 + max = 20 + } + } + } + } + + #Suggest a *special* new addition + option = { + name = ep3_laamps.5020.a + + trigger = { + has_trait = cannibal + } + + flavor = ep3_laamps.5020.a.tt + + random = { + chance = 50 + + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5020.a.tt + left_icon = root + right_icon = scope:cook + + scope:cook = { + add_secret = { type = secret_cannibal } + random_secret = { + type = secret_cannibal + reveal_to = root + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 40 + } + } + random_secret = { + type = secret_cannibal + reveal_to = scope:cook + } + } + } + + add_character_modifier = { + modifier = ep3_new_tastes_cannibal_modifier + years = 10 + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Suggest fusion cuisine + option = { + name = ep3_laamps.5020.b + + trigger = { + custom_tooltip = { + text = ep3_laamps.5020.tt + OR = { + has_trait = lifestyle_traveler + has_trait = eccentric + has_trait = gluttonous + } + } + } + + show_as_unavailable = { + always = yes + } + + trait = lifestyle_traveler + trait = eccentric + trait = gluttonous + + domicile = { + change_provisions = medium_provisions_gain + } + + add_character_modifier = { + modifier = ep3_expanded_culinary_horizons_modifier + years = 15 + } + + every_courtier = { + custom = every_follower_custom + add_character_modifier = { + modifier = ep3_new_tastes_modifier + years = 10 + } + } + + stress_impact = { + base = minor_stress_impact_loss + gluttonous = medium_stress_impact_loss + inappetetic = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + #Try some of this local cuisine + option = { + name = ep3_laamps.5020.c + + random_list = { + 45 = { + desc = ep3_laamps.5020.c.success + modifier = { #This is for fuzzying up the random list so it randomises it a bit + add = scope:food_range + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5020.c.success + left_icon = root + + domicile = { + change_provisions = medium_provisions_gain + } + add_character_modifier = { + modifier = ep3_new_tastes_modifier + years = 10 + } + scope:cook = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + culture = { + change_cultural_acceptance = { + target = scope:local_culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_food_acceptance + } + } + } + } + 55 = { + desc = ep3_laamps.5020.c.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5020.c.failure + left_icon = root + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + gluttonous = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + humble = miniscule_stress_impact_loss + inappetetic = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Refuse to try it + option = { + name = ep3_laamps.5020.d + + random = { + chance = 30 + modifier = { + is_ai = yes + add = -29 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5020.d.tt + left_icon = root + + give_nickname = nick_the_narrow_minded + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } +} + + +scripted_trigger 5025_can_spawn_contract_trigger = { + can_create_criminal_contract_trigger = { LAAMP = $LAAMP$ EMPLOYER = $EMPLOYER$ } + can_create_diplomacy_contract_trigger = { LAAMP = $LAAMP$ EMPLOYER = $EMPLOYER$ } + can_create_hireling_contract_trigger = { LAAMP = $LAAMP$ EMPLOYER = $EMPLOYER$ } + can_create_justicar_contract_trigger = { LAAMP = $LAAMP$ EMPLOYER = $EMPLOYER$ } + can_create_learning_contract_trigger = { LAAMP = $LAAMP$ EMPLOYER = $EMPLOYER$ } + can_create_intrigue_contract_trigger = { LAAMP = $LAAMP$ EMPLOYER = $EMPLOYER$ } + can_create_stewardship_contract_trigger = { LAAMP = $LAAMP$ EMPLOYER = $EMPLOYER$ } + can_create_transport_contract_trigger = { LAAMP = $LAAMP$ EMPLOYER = $EMPLOYER$ } +} + +# What is your purpose? +ep3_laamps.5025 = { + type = character_event + title = ep3_laamps.5025.t + desc = ep3_laamps.5025.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = thinking + } + cooldown = { years = 30 } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + } + + immediate = { + if = { + limit = { exists = location.barony.holder } + location.barony.holder = { + save_scope_as = local_lord + save_scope_as = bg_override_char + #Find potential employers + if = { + limit = { + 5025_can_spawn_contract_trigger = { LAAMP = root EMPLOYER = scope:local_lord } + } + add_to_temporary_list = potential_employers_list + } + every_vassal_or_below ?= { + limit = { + save_temporary_scope_as = vassal_check + 5025_can_spawn_contract_trigger = { LAAMP = root EMPLOYER = scope:vassal_check } + } + add_to_temporary_list = potential_contract_employers + } + } + #Can we _actually_ spawn two contracts? + if = { + limit = { + any_in_list = { + list = potential_contract_employers + count >= 2 + } + } + save_scope_as = spawn_task_contract_option_available + } + } + } + + #I wanna be landed! + option = { + name = ep3_laamps.5025.a + + add_character_modifier = { + modifier = ep3_lust_for_land_modifier + years = 35 + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + ambitious = minor_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + ai_value_modifier = { + ai_greed = 1 + } + } + } + + #I like being landless :) + option = { + name = ep3_laamps.5025.b + flavor = ep3_laamps.5025.b.flavor + + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = { + integer_range = { + min = 10 + max = 30 + } + } + } + } + else = { + add_trait_xp = { + trait = lifestyle_traveler + track = travel + value = { + integer_range = { + min = 10 + max = 30 + } + } + } + } + + #Can we _actually_ spawn contracts... + if = { + limit = { exists = scope:spawn_task_contract_option_available } + add_prestige = minor_prestige_gain + custom_tooltip = ep3_laamps.5025.b.tt + contract_passive_spawn_effect = { + SPAWN_CONTRACTS = 2 + } + } + else = { + add_prestige = medium_prestige_gain + } + + stress_impact = { + ambitious = medium_stress_impact_gain + humble = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + #It's best to keep options open + option = { + name = ep3_laamps.5025.c + + flavor = ep3_laamps.5025.c.flavor + + if = { + limit = { + NOT = { + has_trait = flexible_leader + } + } + random = { + chance = 65 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5025.c.toast + left_icon = root + + add_trait = flexible_leader + } + } + } + else = { + add_stress = medium_stress_loss + } + + domicile = { + change_provisions = medium_provisions_gain + } + + stress_impact = { + fickle = medium_stress_impact_loss + stubborn = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +# Local tavern owner disrespects you +ep3_laamps.5030 = { + type = character_event + title = ep3_laamps.5030.t + desc = ep3_laamps.5030.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:innkeeper + animation = dismissal + } + cooldown = { years = 10 } + override_background = { reference = tavern } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_location_valid_for_travel_event_on_land = yes + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + domicile = { + provisions < provisions_threshold_good_value + } + } + } + + immediate = { + location = { + save_scope_as = location + } + if = { + limit = { + any_pool_character = { + province = root.location + is_available_ai_adult = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + } + save_scope_as = innkeeper + } + } + else = { + create_character = { + template = servant_character + location = root.location + culture = location.culture + faith = location.faith + gender_female_chance = { + if = { + limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 100 + } + else_if = { + limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 0 + } + else = { + add = 50 + } + } + dynasty = none + save_scope_as = innkeeper + after_creation = { + add_character_flag = created + } + } + } + } + + #Ah, forget about it, give me a drink + option = { + name = ep3_laamps.5030.a + + trigger = { + has_trait = drunkard + } + + remove_short_term_gold = tiny_gold_value + + add_character_modifier = { + modifier = legend_hangover_modifier + years = 3 + } + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + #Don't you know who I am? + option = { + name = ep3_laamps.5030.b + + trigger = { + dynasty = { + dynasty_prestige_level >= medium_dynasty_prestige_level + } + } + + reason = ep3_laamps.5030.a.tt + + flavor = ep3_laamps.5030.b.tt + + add_internal_flag = special + + add_prestige = medium_prestige_gain + + add_character_modifier = { + modifier = ep3_comfortable_bed_modifier + years = 10 + } + + every_courtier = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 35 + } + } + + stress_impact = { + base = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Threaten them + option = { + name = ep3_laamps.5030.c + + add_internal_flag = dangerous + + add_dread = medium_dread_gain + + random_list = { + 55 = { #They hand it over + desc = ep3_laamps.5030.c.success + + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5030.c.success + left_icon = root + right_icon = scope:innkeeper + + remove_short_term_gold = tiny_gold_value + add_character_modifier = { + modifier = ep3_comfortable_bed_modifier + years = 10 + } + } + } + 25 = { #You have to threaten them further + desc = ep3_laamps.5030.c.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5030.c.failure + left_icon = root + right_icon = scope:innkeeper + + if = { + limit = { + has_trait = gallowsbait + } + add_trait_xp = { + trait = gallowsbait + track = bandit + value = { + integer_range = { + min = 10 + max = 20 + } + } + } + } + else = { + add_trait = gallowsbait + add_trait_xp = { + trait = gallowsbait + track = bandit + value = { + integer_range = { + min = 10 + max = 20 + } + } + } + } + } + } + 5 = { #It goes a little too far + desc = ep3_laamps.5030.c.critfailure + + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5030.c.critfailure + left_icon = root + right_icon = scope:innkeeper + + scope:innkeeper = { + death = { killer = ROOT death_reason = death_murder } + } + + add_secret = { + type = secret_murder + target = scope:innkeeper + } + + if = { + limit = { + has_trait = gallowsbait + } + add_trait_xp = { + trait = gallowsbait + track = marauder + value = { + integer_range = { + min = 25 + max = 40 + } + } + } + } + else = { + add_trait = gallowsbait + add_trait_xp = { + trait = gallowsbait + track = marauder + value = { + integer_range = { + min = 25 + max = 40 + } + } + } + } + } + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + #Try to barter + option = { + name = ep3_laamps.5030.d + + duel = { + target = scope:innkeeper + skill = diplomacy + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamps.5030.d.success + min = 5 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5030.d.success + left_icon = root + right_icon = scope:innkeeper + + remove_short_term_gold = minor_gold_value + add_character_modifier = { + modifier = ep3_comfortable_bed_modifier + years = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_laamps.5030.d.failure + min = 5 + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5030.d.failure + left_icon = root + right_icon = scope:innkeeper + + add_stress = minor_stress_gain + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Take the insult + option = { + name = tournament_events.0161.c + + stress_impact = { + base = minor_stress_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + after = { + scope:innkeeper = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Hire a local guide +ep3_laamps.5035 = { + type = character_event + title = ep3_laamps.5035.t + desc = ep3_laamps.5035.desc + theme = landless_adventurer + override_background = { + reference = terrain + } + left_portrait = { + character = root + animation = chancellor + } + right_portrait = { + character = scope:guide + animation = scheme + } + artifact = { + target = scope:newly_created_map + position = lower_right_portrait + } + artifact = { + trigger = { + exists = scope:random_artifact + } + target = scope:random_artifact + position = lower_left_portrait + } + cooldown = { years = 50 } + + trigger = { + static_group_filter = { + group = ep3_laamps.5035 + match = 0.75 + } + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_location_valid_for_travel_event_on_land = yes + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + location = { + OR = { + terrain = mountains + terrain = wetlands + terrain = desert_mountains + terrain = jungle + } + } + } + } + + immediate = { + location = { + save_scope_as = location + } + if = { #Grab a random, inexpensive artifact if you have it + limit = { + any_character_artifact = { + NOT = { + has_artifact_modifier = artifact_guide_map_modifier + } + } + } + random_character_artifact = { + limit = { + NOT = { + has_artifact_modifier = artifact_guide_map_modifier + } + } + weight = { + base = 1 + modifier = { + rarity = common + add = 2 + } + } + save_scope_as = random_artifact + } + } + if = { + limit = { + any_pool_character = { + province = root.location + is_available_ai_adult = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + } + save_scope_as = guide + } + } + else = { + create_character = { + template = anatolian_guide_character + location = root.location + culture = location.culture + faith = location.faith + gender_female_chance = 50 + dynasty = none + save_scope_as = guide + after_creation = { + add_character_flag = created + } + } + # Plus give 'em a nickname. + hidden_effect = { + scope:guide = { assign_random_nickname_effect = yes } + } + } + hidden_effect = { + scope:guide = { + create_artifact = { + name = guide_map + description = guide_map_desc + modifier = artifact_guide_map_modifier + type = miscellaneous + visuals = pocket_map + history = { + type = created_before_history + actor = scope:guide + } + save_scope_as = newly_created_map + } + } + scope:newly_created_map = { + set_artifact_rarity = masterwork + set_max_durability = 25 + } + } + } + + #Recruit them permanently + option = { + name = ep3_laamps.5035.a + + pay_short_term_gold = { + target = scope:guide + gold = medium_gold_value + } + + add_courtier = scope:guide + + court_position_grant_effect = { + EMPLOYER = root + POS = travel_leader + CANDIDATE = scope:guide + } + + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + #Buy maps off them + option = { + name = ep3_laamps.5035.b + + pay_short_term_gold = { + target = scope:guide + gold = medium_gold_value + } + + scope:newly_created_map = { + set_owner = root + } + + stress_impact = { + trusting = minor_stress_impact_gain + paranoid = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + + #Trust their guidance + option = { + name = ep3_laamps.5035.c + + pay_short_term_gold = { + target = scope:guide + gold = tiny_gold_value + } + + random_list = { + 60 = { #The guide's info is correct + desc = ep3_laamps.5035.c.success + + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5035.c.success + left_icon = root + right_icon = scope:guide + + add_character_modifier = { + modifier = ep3_well_guided_modifier + years = 10 + } + } + } + 40 = { #The guide's info is sketchy + desc = ep3_laamps.5035.c.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5035.c.failure + left_icon = root + right_icon = scope:guide + + add_character_modifier = { + modifier = ep3_sketchy_guides_modifier + years = 3 + } + } + } + 10 = { #The guide's info leads you into a trap! + desc = ep3_laamps.5035.c.critfailure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5035.c.critfailure + left_icon = root + right_icon = scope:guide + + increase_wounds_no_death_effect = { REASON = fight } + remove_short_term_gold = minor_gold_value + scope:random_artifact ?= { + set_owner = scope:guide + } + } + } + } + + stress_impact = { + generous = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + } + } + } + + #Reject them + option = { + name = ep3_laamps.5035.d + + flavor = ep3_laamps.5035.d.tt + + random = { + chance = 45 + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5035.d.toast + left_icon = root + + domicile = { + change_provisions = minor_provisions_loss + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + +# Scouting reveals some potential hidden treasures +ep3_laamps.5040 = { + type = character_event + title = ep3_laamps.5040.t + desc = ep3_laamps.5040.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_very_left + } + cooldown = { years = 10 } + override_background = { reference = ep3_campfire } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_location_valid_for_travel_event_on_land = yes + } + + immediate = { + location = { + save_scope_as = location + } + if = { + limit = { + any_pool_character = { + province = root.location + is_available_ai_adult = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + } + } + random_pool_character = { + province = root.location + limit = { + is_available_ai_adult = yes + NOT = { + has_any_good_relationship_with_root_trigger = yes + } + } + save_scope_as = merchant + } + } + else = { + create_character = { + template = anatolian_guide_character + location = root.location + culture = location.culture + faith = location.faith + dynasty = none + save_scope_as = merchant + after_creation = { + add_character_flag = created + } + } + # Plus give 'em a nickname. + hidden_effect = { + scope:merchant = { assign_random_nickname_effect = yes } + } + } + } + + #Go searching in the ruins + option = { + name = ep3_laamps.5040.a + + random_list = { + 37 = { #You uncover a dusty sword + desc = ep3_laamps.5040.a.bigsuccess + random_dummy_gender_effect = yes + create_artifact_weapon_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:artifact_weapon_type_sword + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5040.a.bigsuccess + left_icon = root + right_icon = scope:newly_created_artifact + custom_tooltip = ep3_laamps.5040.a.bigsuccess.tt + } + } + 64 = { #You discover a small trinket + desc = ep3_laamps.5040.a.success + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = root + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = discovered + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5040.a.success + left_icon = root + right_icon = scope:new_trinket + custom_tooltip = ep3_laamps.5040.a.success.tt + } + } + 43 = { #You come up with nothing + desc = ep3_laamps.5040.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5040.a.failure + left_icon = root + + custom_tooltip = ep3_laamps.5040.a.failure.tt + } + } + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + brave = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Buy supplies + option = { + name = ep3_laamps.5040.b + + domicile = { + change_provisions = { + value = { minor_provisions_gain medium_provisions_gain } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + after = { + scope:merchant = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Meet local lord +ep3_laamps.5045 = { + type = character_event + title = ep3_laamps.5045.t + desc = ep3_laamps.5045.desc + theme = landless_adventurer + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:local_lord + animation = scheme + } + cooldown = { years = 10 } + override_background = { reference = council_chamber } + + trigger = { + #Standard checks + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + is_location_valid_for_travel_event_on_land = yes + location.barony.holder ?= { + is_available_ai_adult = yes + highest_held_title_tier <= root.prestige_level + } + NOT = { #Just ensure _you_ aren't a bandit for loc reasons + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 30 + } + } + } + + immediate = { + location = { + save_scope_as = location + } + location.barony = { + save_scope_as = location_title + } + location.barony.holder = { + save_scope_as = local_lord + save_scope_as = bg_override_char + #Find potential employers + if = { + limit = { + 5025_can_spawn_contract_trigger = { LAAMP = root EMPLOYER = scope:local_lord } + } + add_to_temporary_list = potential_employers_list + } + every_vassal_or_below ?= { + limit = { + save_temporary_scope_as = vassal_check + 5025_can_spawn_contract_trigger = { LAAMP = root EMPLOYER = scope:vassal_check } + } + add_to_temporary_list = potential_contract_employers + } + } + #Can we _actually_ spawn two contracts? + if = { + limit = { + any_in_list = { + list = potential_contract_employers + count >= 2 + } + } + save_scope_as = spawn_task_contract_option_available + } + if = { + limit = { + scope:local_lord = { + highest_held_title_tier > tier_duchy + any_held_title = { + title_tier = county + is_landless_type_title = no + count >= 1 + } + } + } + scope:local_lord = { + ordered_county = { + limit = { + tier = tier_county + holder = scope:local_lord + is_landless_type_title = no + } + #Least developed county as a rough approximation of backwaters + order_by = { + value = development_level + multiply = -1 + } + + save_scope_as = lord_title + } + } + } + } + + #Ask for land + option = { + name = ep3_laamps.5045.a + + trigger = { + scope:local_lord = { + highest_held_title_tier > tier_duchy + any_held_title = { + title_tier = county + count >= 1 + } + } + prestige_level >= 2 + has_character_modifier = ep3_lust_for_land_modifier + } + + custom_tooltip = ep3_laamps.5045.a.tt + + add_internal_flag = special + + duel = { + target = scope:local_lord + skill = diplomacy + + 300 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamps.5045.a.success + min = 5 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamps.5045.a.success + left_icon = root + right_icon = scope:local_lord + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + + change_liege = { + liege = scope:local_lord + change = scope:change + } + + scope:lord_title = { + change_title_holder = { + holder = root + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + scope:local_lord = { + add_hook = { + target = root + type = loyalty_hook + } + } + } + } + + 70 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_laamps.5045.a.failure + min = 5 + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.5045.a.failure + left_icon = root + right_icon = scope:local_lord + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Ask for gold + option = { + name = ep3_laamps.5045.b + + add_gold = { 5 20 } + + scope:local_lord = { + add_hook = { + target = root + type = favor_hook + } + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + #Ask for provisions + option = { + name = ep3_laamps.5045.c + + domicile = { + change_provisions = { + value = { miniscule_provisions_gain minor_provisions_gain } + } + } + + scope:local_lord = { + add_hook = { + target = root + type = favor_hook + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + content = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + #Ask for work + option = { + name = ep3_laamps.5045.d + trigger = { exists = scope:spawn_task_contract_option_available } + reverse_add_opinion = { + target = scope:local_lord + modifier = impressed_opinion + opinion = 40 + } + + custom_tooltip = ep3_laamps.5025.b.tt #Re-used + contract_passive_spawn_effect = { + SPAWN_CONTRACTS = 2 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } +} + +################################################## +# Hereweard embarks on his destiny +# by Nick Meredith +# 5999-6999 +################################################## + +# Hereward hears of trouble in England +ep3_laamps.5999 = { + type = character_event + title = ep3_laamps.5999.t + desc = ep3_laamps.5999.desc + theme = realm + left_portrait = { + character = root + animation = interested + } + lower_right_portrait = scope:william + lower_center_portrait = scope:harald + lower_left_portrait = scope:harold + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + character:140 = { + if = { + limit = { + is_alive = yes + } + save_scope_as = william + } + } + character:122 = { + if = { + limit = { + is_alive = yes + } + save_scope_as = harold + } + } + character:102531 = { + if = { + limit = { + is_alive = yes + } + save_scope_as = harald + } + } + character:364 = { + if = { + limit = { + is_alive = yes + } + save_scope_as = flanders #I can't be bothered spelling Boujewijingjn ok + } + } + character:114 = { + save_scope_as = edward + } + location = { + save_scope_as = location + } + } + + option = { #Let's wait and see + name = ep3_laamps.5999.a + + add_character_modifier = { + modifier = ep3_foreign_affairs_modifier + years = 5 + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { #England concerns me no longer + name = ep3_laamps.5999.b + custom_tooltip = ep3_laamps.5999.b.tt + contract_passive_spawn_effect = { + SPAWN_CONTRACTS = 1 + } + + stress_impact = { + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } +} + +# Hereward sets off +ep3_laamps.6000 = { + type = character_event + title = ep3_laamps.6000.t + desc = { + desc = ep3_laamps.6000.intro + first_valid = { + triggered_desc = { + trigger = { scope:brother = { is_alive = yes } } + desc = ep3_laamps.6000.body.alive + } + desc = ep3_laamps.6000.body.dead + } + desc = ep3_laamps.6000.desc + first_valid = { + triggered_desc = { + trigger = { scope:brother = { is_alive = yes } } + desc = ep3_laamps.6000.closing.alive + } + desc = ep3_laamps.6000.closing.dead + } + } + theme = realm + left_portrait = { + character = root + animation = chancellor + } + lower_right_portrait = scope:william + lower_center_portrait = scope:brother + lower_left_portrait = scope:harold + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + character:140 = { + save_scope_as = william + } + character:122 = { + save_scope_as = harold + } + father = { + save_scope_as = father + } + random_sibling = { #Hereweard only has one sibling + even_if_dead = yes + save_scope_as = brother + } + province:1537 = { + save_scope_as = ely + } + } + + option = { #Set sail at once! + name = { + text = ep3_laamps.6000.a.dead + trigger = { + scope:brother = { is_alive = no } + } + } + name = { + text = ep3_laamps.6000.a + trigger = { + scope:brother = { is_alive = yes } + } + } + + flavor = ep3_laamps.6000.a.flavor + + custom_tooltip = ep3_laamps.6000.a.tt + + every_character_active_contract = { invalidate_contract = yes } + add_character_flag = laamp_stay_same_kingdom + + start_travel_plan = { + destination = province:1537 #Ely + players_use_planner = no + on_start_on_action = on_travel_relocation_start + on_arrival_on_action = on_travel_relocation_end + on_arrival_event = ep3_laamps.6001 + on_arrival_destinations = last + return_trip = no # One way + travel_with_domicile = yes + } + + stress_impact = { + ambitious = minor_stress_impact_loss + } + + ai_chance = { + # Hereward will always do the thing. + base = 1000 + } + } + + option = { #It is time to forget + name = ep3_laamps.6000.b + + custom_tooltip = ep3_laamps.6000.b.tt + + add_character_modifier = { + modifier = ep3_the_restful_modifier + years = 15 + } + add_opinion = { + target = scope:william + modifier = demanded_eviction_opinion + } + + stress_impact = { + ambitious = minor_stress_impact_gain + } + + ai_chance = { + # Hereward will always do the thing. + base = 0 + } + } +} + +# Hereward arrives, finds his brother dead +ep3_laamps.6001 = { + type = character_event + title = ep3_laamps.6001.t + desc = ep3_laamps.6001.desc + theme = death + left_portrait = { + character = root + animation = random_weapon_aggressive + } + right_portrait = { + character = scope:frederick + animation = inspect_weapon + } + lower_center_portrait = scope:brother + override_effect_2d = { + reference = fog + } + override_effect_2d = { + reference = fog + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + random_sibling = { #Hereweard only has one sibling + limit = { + is_alive = yes + } + save_scope_as = brother + } + province:1537 = { + save_scope_as = ely + } + if = { #Either grab Frederick de Warenne, real-life killer of Hereward's brother... + limit = { + character:175 = { + is_alive = yes + is_available_healthy_ai_adult = yes + } + } + character:175 = { + save_scope_as = frederick + } + } + else = { #...or make another Frederick + create_character = { + location = scope:ely + template = knight + culture = culture:norman + faith = faith:catholic + save_scope_as = frederick + } + } + hidden_effect = { #Finally, kill Oslac + scope:brother = { + death = { + death_reason = death_murder + killer = scope:frederick + } + } + } + } + + option = { #Initiate the duel + name = ep3_laamps.6001.a + + custom_tooltip = ep3_laamps.6001.b.two.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:frederick + FATALITY = always + FIXED = sc_attacker #Hereward should _always_ win + LOCALE = wilderness_scope + OUTPUT_EVENT = ep3_laamps.6002 + INVALIDATION_EVENT = fp1_yearly.2002 #Re-use this, though SHOULD never invalidate + } + + stress_impact = { + vengeful = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { #Give them a chance to run + name = ep3_laamps.6001.b + + random_list = { + 1 = { + desc = ep3_laamps.6001.b.one + show_chance = no + + custom_tooltip = ep3_laamps.6001.b.one.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:frederick + FATALITY = always + FIXED = sc_attacker #We win these, boys + LOCALE = wilderness_scope + OUTPUT_EVENT = ep3_laamps.6002 + INVALIDATION_EVENT = fp1_yearly.2002 #Re-use this, though SHOULD never invalidate + } + } + 1 = { + desc = ep3_laamps.6001.b.two + show_chance = no + + custom_tooltip = ep3_laamps.6001.b.two.tt + + configure_start_single_combat_effect = { #Ah, the illusion of choice! + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:frederick + FATALITY = always + FIXED = sc_attacker #We win these, boys + LOCALE = wilderness_scope + OUTPUT_EVENT = ep3_laamps.6002 + INVALIDATION_EVENT = fp1_yearly.2002 #Re-use this, though SHOULD never invalidate + } + } + } + + stress_impact = { + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } + + after = { trigger_event = ep3_laamps.9983 } +} + +ep3_laamps.6002 = { + type = character_event + hidden = yes + + immediate = { + trigger_event = { id = ep3_laamps.6003 days = 1 } + } +} + +# Hereward swears revenge +ep3_laamps.6003 = { + type = character_event + title = ep3_laamps.6003.t + desc = ep3_laamps.6003.desc + theme = death + left_portrait = { + character = root + animation = grief + } + lower_right_portrait = { + trigger = { + character:172 = { + is_alive = yes + } + } + character = character:172 + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + if = { #If Frederick's brother still exists, Nemesis'em + limit = { + character:172 = { + is_alive = yes + } + } + character:172 = { + set_relation_nemesis = { + target = root + reason = nemesis_killed_brother + } + } + } + } + + option = { #Swear vengeance + name = ep3_laamps.6003.a + + add_trait_xp = { + trait = the_wake + value = 15 + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { #Rifle through Fred's pockets + name = ep3_laamps.6003.b + + flavor = ep3_laamps.6003.b.flavor + + add_gold = minor_gold_value + + random = { + chance = 50 + + create_artifact = { + name = warenne_coin + description = warenne_coin_description + history = { + type = created_before_history + } + type = miscellaneous + visuals = brooch + modifier = artifact_knight_effectiveness_2_modifier + modifier = artifact_raid_speed_4_modifier + modifier = artifact_pursue_efficiency_1_modifier + save_scope_as = new_trinket + } + + + send_interface_toast = { + title = stewardship_general.2001.tt #Re-using this + left_icon = root + right_icon = scope:new_trinket + show_as_tooltip = { + scope:new_trinket = { set_owner = root } + } + } + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } + + after = { + trigger_event = { + id = ep3_laamps.6005 + days = { 25 45 } + } + } +} + +# Hereward sets up a camp in the fens near Ely +ep3_laamps.6005 = { + type = character_event + title = ep3_laamps.6005.t + desc = ep3_laamps.6005.desc + theme = realm + override_background = { reference = wilderness_wetlands } + left_portrait = { + character = root + animation = personality_honorable + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + #Save William + character:140 = { + save_scope_as = william + } + + #Save our location; should be Ely + location = { save_scope_as = location } + + #Set up The Fens + ep3_the_fens_list_effect = yes + + every_in_list = { + list = the_fens + custom = every_fenland_holding + add_province_modifier = { + modifier = ep3_dangerous_fenland_modifier + years = 15 + } + } + + #Create the character here + create_character = { + location = root.capital_province + template = wetlands_commander_character + culture = root.culture + faith = root.faith + save_scope_as = wetlands_commander + } + + ## Used in the after: + # Make a list of every Anglo-Saxon lord + scope:william = { + every_vassal = { + limit = { + has_culture = culture:anglo_saxon + } + add_to_list = aethelings + } + } + + # Pick the most powerful Anglo-Saxon lord + # Most likely Eadwin Aelfgarson + ordered_in_list = { + list = aethelings + order_by = max_military_strength + save_scope_as = powerful_vassal + } + + domicile = { + change_provisions = minor_provisions_gain + } + } + + option = { #Raid to acquire wealth + name = ep3_laamps.6005.a + + flavor = ep3_laamps.6005.a.tt + + add_gold = medium_gold_value + + scope:ely = { + add_province_modifier = { + modifier = ep3_plundered_modifier + years = 5 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } + + option = { #Recruit a local knight + name = ep3_laamps.6005.b + + flavor = ep3_laamps.6005.b.tt + + add_courtier = scope:wetlands_commander + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + after = { + if = { + limit = { + exists = scope:powerful_vassal + } + trigger_event = { + id = ep3_laamps.6010 + days = { 60 120 } + } + } + } +} + +# The Aethelings are disgruntled; go to visit the most powerful one? +ep3_laamps.6010 = { + type = letter_event + opening = ep3_laamps.6010.t + desc = ep3_laamps.6010.desc + sender = scope:powerful_vassal + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + # Make a list of every Anglo-Saxon lord + scope:william = { + every_vassal = { + limit = { + has_culture = culture:anglo_saxon + } + add_to_list = aethelings + } + } + + # Pick the most powerful Anglo-Saxon lord + # Most likely Eadwin Aelfgarson + ordered_in_list = { + list = aethelings + order_by = max_military_strength + save_scope_as = powerful_vassal + } + + scope:powerful_vassal.capital_province = { + save_scope_as = powerful_vassal_capital + } + } + + option = { #Yes! + name = ep3_laamps.6010.a + + flavor = ep3_laamps.6010.a.flavor + + custom_tooltip = ep3_laamps.6010.a.tt + + every_character_active_contract = { invalidate_contract = yes } + + start_travel_plan = { + destination = scope:powerful_vassal_capital + players_use_planner = no + on_arrival_event = ep3_laamps.6015 + on_arrival_destinations = last + return_trip = no + } + + #Just to ensure we get the right one + scope:powerful_vassal = { + add_character_flag = temp_powerful_vassal_flag + } + + ai_chance = { + base = 100 + } + } + + option = { #...no. + name = ep3_laamps.6010.b + + reverse_add_opinion = { + target = scope:powerful_vassal + modifier = annoyed_opinion + opinion = -35 + } + + ai_chance = { + base = 0 + } + } +} + +# You meet with the Aetheling +ep3_laamps.6015 = { + type = character_event + title = ep3_laamps.6015.t + desc = ep3_laamps.6015.desc + theme = realm + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:powerful_vassal + animation = worry + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + character:140 = { + save_scope_as = william + } + + scope:william = { + random_vassal = { + limit = { + has_character_flag = temp_powerful_vassal_flag + } + save_scope_as = powerful_vassal + } + } + } + + option = { #You have my support + name = ep3_laamps.6015.a + + scope:william = { + every_vassal = { + limit = { + culture = culture:norman + } + custom = every_direct_vassal_william + add_opinion = { + target = root + modifier = revanchist_opinion + opinion = -35 + } + } + every_vassal_or_below = { + limit = { + culture = culture:anglo_saxon + } + custom = every_anglo_noble + add_opinion = { + target = root + modifier = revanchist_opinion + opinion = 35 + } + } + } + + scope:powerful_vassal = { + add_character_flag = happy_flag + } + + add_diplomacy_skill = 1 + + reverse_add_opinion = { + target = scope:powerful_vassal + modifier = pleased_opinion + opinion = 50 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { #I need time to decide + name = ep3_laamps.6015.b + + scope:powerful_vassal = { + add_character_flag = annoyed_flag + } + + add_character_modifier = { + modifier = ep3_hereward_caution_modifier + years = 5 + } + + reverse_add_opinion = { + target = scope:powerful_vassal + modifier = annoyed_opinion + opinion = -5 + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = 0.5 + } + } + } + + after = { + trigger_event = { + id = ep3_laamps.6016 + days = 1 + } + } +} + +# Bad news arrives +ep3_laamps.6016 = { + type = character_event + title = ep3_laamps.6016.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:powerful_vassal = { + has_character_flag = annoyed_flag + } + } + desc = ep3_laamps.6016.frustrated + } + triggered_desc = { + trigger = { + scope:powerful_vassal = { + has_character_flag = happy_flag + } + } + desc = ep3_laamps.6016.happy + } + } + desc = ep3_laamps.6016.ending + } + theme = realm + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:powerful_vassal + animation = worry + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + character:140 = { + save_scope_as = william + } + } + + option = { #You have my support + name = ep3_laamps.6016.a + + custom_tooltip = ep3_laamps.6016.a.tt + + ai_chance = { + base = 100 + } + } + + after = { + trigger_event = ep3_laamps.6020 #Start the Harrying of the North + + if = { + limit = { + scope:william = { + is_ai = no + } + } + scope:william = { + trigger_event = ep3_laamps.6021 + } + } + if = { + limit = { + exists = domicile + location != domicile.domicile_location + } + start_travel_plan = { + destination = root.domicile.domicile_location + players_use_planner = no + on_start_on_action = on_travel_relocation_start + on_arrival_on_action = on_travel_relocation_end + on_arrival_destinations = last + return_trip = no # One way + } + } + } +} + +# The Harrying of the North begins +ep3_laamps.6020 = { + type = character_event + window = fullscreen_event + title = ep3_laamps.6020.t + desc = ep3_laamps.6020.desc + theme = realm + override_background = { reference = ep3_fullscreen_harrying_of_the_north } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + play_music_cue = mx_cue_war_declared + + character:140 = { + save_scope_as = william + } + + # Make a list of every Anglo-Saxon lord + scope:william = { + every_vassal = { + limit = { + has_culture = culture:anglo_saxon + } + add_to_list = aethelings + } + } + } + + option = { #Oh lort here we go + name = ep3_laamps.6020.a + + every_in_list = { + list = aethelings + custom = every_aetheling + every_realm_county = { + custom = every_county + change_county_control = 25 + add_county_modifier = { + modifier = ep3_harried_modifier + years = 15 + } + } + } + + scope:william = { + add_character_modifier = { + modifier = ep3_the_conqueror_modifier + years = 15 + } + create_story = story_cycle_harrying_of_the_north + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } +} + +# The Harrying of the North begins - William perspective +# This one doesn't trigger the harrying story cycle, that's held within .6020 +ep3_laamps.6021 = { + type = character_event + window = fullscreen_event + title = ep3_laamps.6020.t + desc = ep3_laamps.6021.desc + theme = realm + override_background = { reference = ep3_fullscreen_harrying_of_the_north } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + play_music_cue = mx_cue_war_declared + + character:140 = { + save_scope_as = william + } + + # Make a list of every Anglo-Saxon lord + scope:william = { + every_vassal = { + limit = { + has_culture = culture:anglo_saxon + } + add_to_list = aethelings + } + } + } + + option = { #Oh lort here we go + name = ep3_laamps.6020.a + + show_as_tooltip = { + every_in_list = { + list = aethelings + custom = every_aetheling + every_realm_county = { + custom = every_county + change_county_control = 25 + add_county_modifier = { + modifier = ep3_harried_modifier + years = 15 + } + } + } + } + + show_as_tooltip = { + scope:william = { + add_character_modifier = { + modifier = ep3_the_conqueror_modifier + years = 15 + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } +} + +################################################## +# Unique LAAMP Events +# by Nick Meredith +# 7000 - 7999 +################################################## + +# Eadgar becomes a LAAMP +ep3_laamps.7000 = { + type = character_event + title = ep3_laamps.7000.t + desc = ep3_laamps.7000.desc + theme = realm + left_portrait = { + character = root + animation = thinking + } + lower_center_portrait = scope:william + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + title:k_england = { + save_scope_as = england + holder = { save_scope_as = william } + } + location = { + save_scope_as = location + } + primary_heir = { + save_scope_as = heir + } + } + + option = { #I'll go to Scotland + name = ep3_laamps.7000.a + + hidden_effect = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + every_held_title = { + change_title_holder_include_vassals = { + holder = scope:heir + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = scope:heir + } + + add_trait = gallivanter + + start_travel_plan = { + destination = province:1741 #St Johnston + players_use_planner = no + on_start_on_action = on_travel_relocation_start + on_arrival_on_action = on_travel_relocation_end + on_arrival_destinations = last + travel_with_domicile = yes + return_trip = no # One way + } + + stress_impact = { + ambitious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 0.5 + } + } + } + + option = { #Norman Italy sounds like fun + name = ep3_laamps.7000.b + + hidden_effect = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + every_held_title = { + change_title_holder_include_vassals = { + holder = scope:heir + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = scope:heir + } + + add_trait = gallivanter + + start_travel_plan = { + destination = province:2619 #Trani + players_use_planner = no + on_start_on_action = on_travel_relocation_start + on_arrival_on_action = on_travel_relocation_end + on_arrival_destinations = last + travel_with_domicile = yes + return_trip = no # One way + } + + stress_impact = { + ambitious = minor_stress_impact_loss + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { #Maybe I'll stay + name = ep3_laamps.7000.c + + add_prestige = major_prestige_gain + + stress_impact = { + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } +} + +# Siward Barn turns up at Hereward's camp +# From Hereward's perspective +ep3_laamps.7001 = { + type = character_event + title = ep3_laamps.7001.t + desc = ep3_laamps.7001.desc + theme = realm + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:siward + animation = marshal + } + cooldown = { years = 200 } #Should never happen again + + trigger = { + has_ep3_dlc_trigger = yes + has_government = landless_adventurer_government + character:90028 = { + exists = this + } + character:161266 = { + exists = this + } + } + + immediate = { + character:161266 = { + save_scope_as = siward + move_to_pool_at = root.location + } + location = { + save_scope_as = location + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Of course, come on in! + name = ep3_laamps.7001.a + + add_courtier = scope:siward + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + + random = { + chance = { + value = 5 + if = { + limit = { is_ai = no } + add = 95 + } + } + trigger_event = { + id = ep3_laamps.7002 + days = { 150 200 } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { #We're full + name = ep3_laamps.7001.b + + reverse_add_opinion = { + target = scope:siward + modifier = annoyed_opinion + opinion = -20 + } + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } +} + +scripted_effect ep3_laamps_7002_ai_siward_leaves_effect = { + scope:siward = { + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = scope:siward + } + start_travel_plan = { + destination = province:5296 #Bata + players_use_planner = no + on_start_on_action = on_travel_relocation_start + on_arrival_on_action = on_travel_relocation_end + on_arrival_destinations = last + on_arrival_event = ep3_laamps.7003 + travel_with_domicile = yes + return_trip = no # One way + } + } +} + +# Siward Barn leaves Hereward's camp +# From Hereward's perspective +ep3_laamps.7002 = { + type = character_event + title = ep3_laamps.7002.t + desc = ep3_laamps.7002.desc + theme = realm + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:siward + animation = personality_honorable + } + + trigger = { + has_ep3_dlc_trigger = yes + character:90028 = { + exists = this + } + character:161266 = { + exists = this + location = root.location + } + title:e_byzantium = { + exists = this + } + title:k_england = { + exists = this + } + title:c_zichia.holder = { + NOT = { + this = title:e_byzantium.holder + } + } + } + + immediate = { + hidden_effect = { + scope:siward = { #Give him some gold so he can buy land + add_gold = 300 + } + } + title:e_byzantium.holder = { + save_scope_as = emperor + } + title:k_england.holder = { + save_scope_as = king_england + } + } + + option = { #Go with my blessing + name = ep3_laamps.7002.a + + ep3_laamps_7002_ai_siward_leaves_effect = yes + + stress_impact = { + compassionate = minor_stress_impact_loss + } + + ai_chance = { + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + option = { #I SHALL BECOME YOU + name = ep3_laamps.7002.b + + trigger = { + is_ai = no + } + + add_internal_flag = dangerous + + scope:siward = { + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = scope:siward + } + start_travel_plan = { + destination = province:496 #Constantinople + players_use_planner = no + on_start_on_action = on_travel_relocation_start + on_arrival_on_action = on_travel_relocation_end + on_arrival_destinations = last + on_arrival_event = ep3_laamps.7003 + travel_with_domicile = yes + return_trip = no # One way + } + } + + set_player_character = scope:siward + + ai_chance = { + base = 0 + } + } + + option = { #Duel to stay. + name = bp1_yearly.1020.a + + duel = { + skill = diplomacy + target = scope:siward + # He stays. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamps.7002.c.success + send_interface_toast = { + title = ep3_laamps.7002.c.success + left_icon = scope:siward + reverse_add_opinion = { + target = scope:siward + modifier = respect_opinion + opinion = 30 + } + } + } + # He goes. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamps.7002.c.failure + send_interface_toast = { + title = ep3_laamps.7002.c.failure + left_icon = scope:siward + ep3_laamps_7002_ai_siward_leaves_effect = yes + } + } + } + + ai_chance = { + ai_value_modifier = { + ai_sociability = 1 + ai_rationality = 1 + } + } + } + + after = { + scope:siward = { add_character_modifier = laamp_provisions_forgiveness_travel_modifier } + } +} + +# Siward Barn arrives in Constantinople +ep3_laamps.7003 = { + type = character_event + title = ep3_laamps.7003.t + desc = ep3_laamps.7003.desc + theme = realm + override_background = { reference = ep3_constantinople } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:emperor + animation = scheme + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + title:e_byzantium.holder = { + save_scope_as = emperor + } + title:c_zichia = { + save_scope_as = zichia + } + } + + option = { #Oh boy I'd love to do a realmy thing! + name = ep3_laamps.7003.a + + custom_tooltip = ep3_laamps.7003.a.tt + + start_travel_plan = { + destination = province:5296 #Bata + players_use_planner = no + on_start_on_action = on_travel_relocation_start + on_arrival_on_action = on_travel_relocation_end + on_arrival_destinations = last + on_arrival_event = ep3_laamps.7004 + travel_with_domicile = yes + return_trip = no # One way + } + + stress_impact = { + ambitious = minor_stress_impact_loss + } + + ai_chance = { #50% chance for AI + base = 50 + } + } + + option = { #Nah I'd rather stay here + name = ep3_laamps.7003.b + + add_character_modifier = { + modifier = ep3_culturally_greek_modifier + years = 20 + } + + reverse_add_opinion = { + target = scope:emperor + modifier = disappointed_opinion + opinion = -5 + } + + ai_chance = { #50% chance for AI + base = 50 + } + } +} + +scripted_effect new_england_holding_names_effect = { + random_list = { + 100 = { set_title_name = b_london } + 100 = { set_title_name = b_southwark } + 100 = { set_title_name = b_woxbrigge } + 100 = { set_title_name = b_gore } + 100 = { set_title_name = b_brentford } + 100 = { set_title_name = b_colchester } + 100 = { set_title_name = b_maldon } + 100 = { set_title_name = b_chelmsford } + 100 = { set_title_name = b_dunmow } + 100 = { set_title_name = b_bedford } + 100 = { set_title_name = b_ampthill } + 100 = { set_title_name = b_luton } + 100 = { set_title_name = b_berkhamsted } + 100 = { set_title_name = b_saint_albans } + 100 = { set_title_name = b_hertford } + 100 = { set_title_name = b_buckingham } + 100 = { set_title_name = b_aylesbury } + 100 = { set_title_name = b_newport } + 100 = { set_title_name = b_wycombe } + 100 = { set_title_name = b_bamburgh } + 100 = { set_title_name = b_rothbury } + 100 = { set_title_name = b_lindisfarne } + 100 = { set_title_name = b_hexham } + 100 = { set_title_name = b_durham } + 100 = { set_title_name = b_hartlepool } + 100 = { set_title_name = b_darlington } + 100 = { set_title_name = b_carlisle } + 100 = { set_title_name = b_whitehaven } + 100 = { set_title_name = b_furness } + 100 = { set_title_name = b_wigton } + 100 = { set_title_name = b_lancaster } + 100 = { set_title_name = b_salford } + 100 = { set_title_name = b_west_derby } + 100 = { set_title_name = b_kendal } + 100 = { set_title_name = b_appleby } + 100 = { set_title_name = b_chester } + 100 = { set_title_name = b_northwich } + 100 = { set_title_name = b_macclesfield } + 100 = { set_title_name = b_derby } + 100 = { set_title_name = b_chesterfield } + 100 = { set_title_name = b_castleton } + 100 = { set_title_name = b_york } + 100 = { set_title_name = b_scarborough } + 100 = { set_title_name = b_whitby } + 100 = { set_title_name = b_richmond } + 100 = { set_title_name = b_yarlestre } + 100 = { set_title_name = b_pockington } + 100 = { set_title_name = b_cottingham } + 100 = { set_title_name = b_bridlington } + 100 = { set_title_name = b_leeds } + 100 = { set_title_name = b_doncaster } + 100 = { set_title_name = b_halifax } + 100 = { set_title_name = b_sheffield } + 100 = { set_title_name = b_bolton } + 100 = { set_title_name = b_ripon } + 100 = { set_title_name = b_lincoln } + 100 = { set_title_name = b_stamford } + 100 = { set_title_name = b_boston } + 100 = { set_title_name = b_bolingsbroke } + 100 = { set_title_name = b_grimsby } + 100 = { set_title_name = b_norwich } + 100 = { set_title_name = b_thetford } + 100 = { set_title_name = b_walsingham } + 100 = { set_title_name = b_lynn } + 100 = { set_title_name = b_ipswich } + 100 = { set_title_name = b_sudbury } + 100 = { set_title_name = b_blything } + 100 = { set_title_name = b_beodericsworth } + 100 = { set_title_name = b_cambridge } + 100 = { set_title_name = b_radfield } + 100 = { set_title_name = b_papworth } + 100 = { set_title_name = b_ely } + 100 = { set_title_name = b_warwick } + 100 = { set_title_name = b_coventry } + 100 = { set_title_name = b_birmingham } + 100 = { set_title_name = b_leicester } + 100 = { set_title_name = b_melton } + 100 = { set_title_name = b_bosworth } + 100 = { set_title_name = b_rutland } + 100 = { set_title_name = b_nottingham } + 100 = { set_title_name = b_newark } + 100 = { set_title_name = b_retford } + 100 = { set_title_name = b_stafford } + 100 = { set_title_name = b_wolverhampton } + 100 = { set_title_name = b_stoke_on_trent } + 100 = { set_title_name = b_worcester } + 100 = { set_title_name = b_evesham } + 100 = { set_title_name = b_kidderminster } + 100 = { set_title_name = b_hurstingstone } + 100 = { set_title_name = b_norman_cross } + 100 = { set_title_name = b_leightonstone } + 100 = { set_title_name = b_northampton } + 100 = { set_title_name = b_peterborough } + 100 = { set_title_name = b_kettering } + 100 = { set_title_name = b_shrewsbury } + 100 = { set_title_name = b_ludlow } + 100 = { set_title_name = b_bishops_castle } + 100 = { set_title_name = b_gloucester } + 100 = { set_title_name = b_bristol } + 100 = { set_title_name = b_winchcombe } + 100 = { set_title_name = b_salisbury } + 100 = { set_title_name = b_wilton } + 100 = { set_title_name = b_ramsbury } + 100 = { set_title_name = b_malmesbury } + 100 = { set_title_name = b_oxford } + 100 = { set_title_name = b_banbury } + 100 = { set_title_name = b_witney } + 100 = { set_title_name = b_reading } + 100 = { set_title_name = b_newbury } + 100 = { set_title_name = b_abingdon } + 100 = { set_title_name = b_dover } + 100 = { set_title_name = b_canterbury } + 100 = { set_title_name = b_rochester } + 100 = { set_title_name = b_tonbridge } + 100 = { set_title_name = b_chertsey } + 100 = { set_title_name = b_guildford } + 100 = { set_title_name = b_kingston } + 100 = { set_title_name = b_tandbridge } + 100 = { set_title_name = b_lewes } + 100 = { set_title_name = b_chichester } + 100 = { set_title_name = b_arun } + 100 = { set_title_name = b_hastings } + 100 = { set_title_name = b_winchester } + 100 = { set_title_name = b_southampton } + 100 = { set_title_name = b_portsmouth } + 100 = { set_title_name = b_basingstoke } + 100 = { set_title_name = b_christchurch } + 100 = { set_title_name = b_carisbrooke } + 100 = { set_title_name = b_wareham } + 100 = { set_title_name = b_poole } + 100 = { set_title_name = b_shaftesbury } + 100 = { set_title_name = b_lyme } + 100 = { set_title_name = b_bath } + 100 = { set_title_name = b_winterstoke } + 100 = { set_title_name = b_ilchester } + 100 = { set_title_name = b_taunton } + 100 = { set_title_name = b_exeter } + 100 = { set_title_name = b_totnes } + 100 = { set_title_name = b_okehampton } + 100 = { set_title_name = b_barnstaple } + 100 = { set_title_name = b_launceston } + 100 = { set_title_name = b_tintagel } + 100 = { set_title_name = b_helston } + } +} + +# Siward Barn arrives in Bata +ep3_laamps.7004 = { + type = character_event + title = ep3_laamps.7004.t + desc = ep3_laamps.7004.desc + theme = realm + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:title_holder + animation = scheme + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + scope:zichia.holder.top_liege = { + save_scope_as = title_holder + } + hidden_effect = { + add_unpressed_claim = title:c_zichia + } + title:c_zichia = { + add_to_list = landed_titles + } + scope:zichia.holder = { + every_realm_province = { + barony = { add_to_list = zichia_names } + } + } + } + + option = { #OK, I'll pay + name = ep3_laamps.7004.a + + add_character_flag = { #Bypass usual event + flag = siward_flag + years = 1 + } + + pay_short_term_gold = { + target = scope:title_holder + gold = 100 + } + + hidden_effect = { #For tooltip reasons + ep3_become_landed_transfer_effect = { + TITLE_RECEIVER = root + TITLE_LIST = landed_titles + TYPE = granted + REASON = flag:granted + } + every_in_list = { + list = zichia_names + new_england_holding_names_effect = yes + } + } + + custom_tooltip = destroy_laamp_effect.tt.domicile_liquidated + + show_as_tooltip = { + get_title = title:c_zichia + add_character_modifier = { + modifier = ep3_ennobled_adventurer_modifier_1 + years = 10 + } + ## Nomad. + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + scope:new_liege ?= { government_has_flag = government_is_nomadic } + scope:old_government ?= flag:nomad + scope:new_capital.capital_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + change_government = nomad_government + } + ## Administrative. + else_if = { + limit = { + scope:new_liege ?= { government_has_flag = government_is_administrative } + } + change_government = administrative_government + } + ## Clan. + else_if = { + limit = { + scope:new_liege ?= { government_has_flag = government_is_clan } + } + change_government = clan_government + } + ## Tribal. + else_if = { + limit = { + scope:new_liege ?= { government_has_flag = government_is_tribal } + } + change_government = tribal_government + } + ## Else feudal. + else = { change_government = feudal_government } + } + + hidden_effect = { + ## Nomad. + if = { + limit = { + OR = { + government_has_flag = government_is_nomadic + scope:new_liege ?= { government_has_flag = government_is_nomadic } + scope:old_government ?= flag:nomad + scope:new_capital.capital_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + } + } + change_government = nomad_government + } + ## Administrative. + else_if = { + limit = { + scope:new_liege ?= { government_has_flag = government_is_administrative } + } + change_government = administrative_government + } + ## Clan. + else_if = { + limit = { + scope:new_liege ?= { government_has_flag = government_is_clan } + } + change_government = clan_government + } + ## Tribal. + else_if = { + limit = { + scope:new_liege ?= { government_has_flag = government_is_tribal } + } + change_government = tribal_government + } + ## Else feudal. + else = { change_government = feudal_government } + } + + scope:zichia = { + set_title_name = c_new_england + set_color_from_title = title:k_england + } + + stress_impact = { + ambitious = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { #50% chance for AI + base = 50 + } + } + + option = { #I'll take it by force! + name = ep3_laamps.7004.b + + start_war = { + cb = county_conquest_cb + target = title:c_zichia.holder + target_title = title:c_zichia + } + + stress_impact = { + ambitious = minor_stress_impact_loss + greedy = minor_stress_impact_loss + craven = medium_stress_impact_gain + } + + ai_chance = { #50% chance for AI + base = 50 + } + } +} + + +################################################## +# Pool Weightings +# by Ewan Cowhig Croft +# 9971 - 9979 +################################################## + +# The way pool population works causes a massive over-bias of Jewish (and certain other minority) characters in the first couple of decades, and those then get pulled in as assorted criminals and such by a lot of laamp content. This can lead to chains of rather unfortunate numbers of said-chars put into the role of Designated Bastard time after time, which looks dodgy as all hell. Thus, whenever the player moves from place to place as a laamp in the very early game, we need to flood their local pool with characters until the world fills up suitably with actual random gen characters. +ep3_laamps.9971 = { + hidden = yes + + trigger = { + is_ai = no + has_government = landless_adventurer_government + years_from_game_start <= 25 + } + + immediate = { + while = { + count = 5 + create_character = { + template = default_mystic_character + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + } + create_character = { + template = wise_woman_character + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + } + create_character = { + template = merchant_template + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + } + create_character = { + template = hunter_template + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + } + create_character = { + template = bandit_character_generic + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 50 + } + } + } +} + +################################################## +# Passive Contract Spawn +# by Ewan Cowhig Croft +# 9981 - 9989 +################################################## + +# Spawn a contract every now and then whilst we remain in the same location, up to a reasonable limit. +ep3_laamps.9981 = { + hidden = yes + + trigger = { + var:contract_passive_spawn_location ?= location.kingdom + trigger_if = { + limit = { has_variable = contract_passive_spawn_tally } + var:contract_passive_spawn_tally < 3 + } + # Make sure we don't do this if we've got lots of contracts already spawned here. + any_character_task_contract = { + count <= 4 + task_contract_location = { + "squared_distance(root.location)" <= squared_distance_medium + } + } + } + + on_trigger_fail = { + if = { + limit = { var:contract_passive_spawn_location ?= location.kingdom } + trigger_event = { + id = ep3_laamps.9981 + months = { 8 12 } + } + } + } + + immediate = { + # spawn a contract + contract_passive_spawn_effect = { + SPAWN_CONTRACTS = 1 + } + # And fire us again in a bit. + if = { + limit = { + var:contract_passive_spawn_tally < 2 + } + trigger_event = { + id = ep3_laamps.9981 + months = 1 + } + } + else = { + trigger_event = { + id = ep3_laamps.9981 + months = 2 + } + } + } +} + +# Populate adventurer contracts on succession. +ep3_laamps.9982 = { + hidden = yes + + trigger = { + is_ai = no + government_has_flag = government_is_landless_adventurer + } + + immediate = { + populate_location_with_contracts_effect = { + AREA_CHAR = root + AMOUNT = 3 + } + } +} + + + +# Keep giving Hereward regular work within England. +ep3_laamps.9983 = { + hidden = yes + + trigger = { + # Must be within England. + domicile.domicile_location.county = { + save_temporary_scope_as = title_temp + title:k_england = { is_de_jure_liege_or_above_target = scope:title_temp } + } + # Make sure we don't do this if we've got lots of contracts already spawned here. + any_character_task_contract = { + count <= 6 + task_contract_location = { "squared_distance(root.location)" <= squared_distance_medium } + } + } + + on_trigger_fail = { + if = { + limit = { var:contract_passive_spawn_location ?= location.kingdom } + trigger_event = { + id = ep3_laamps.9981 + months = 6 + } + } + } + + immediate = { + # Spawn some contracts. + contract_passive_spawn_effect = { + SPAWN_CONTRACTS = 2 + } + # And fire us again in a bit. + trigger_event = { + id = ep3_laamps.9981 + months = { 8 12 } + } + } +} + +################################################## +# Become Landed - Maintenance +# by Joe Parkin +# 9991 - 9999 +################################################## + +ep3_laamps.9999 = { # Error suppression + scope = none + orphan = yes + hidden = yes + trigger = { + exists = var:ascended_throne_reason + exists = var:lost_title_reason + } + immediate = { + set_variable = { + name = lost_title_reason + value = flag:negotiated + } + # Contract animations. + if = { + limit = { exists = var:animation } + # Nothing. + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_laamp_events_8.txt b/N3OW/events/dlc/ep3/ep3_laamp_events_8.txt new file mode 100644 index 00000000..b6b34ad5 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_laamp_events_8.txt @@ -0,0 +1,3979 @@ +namespace = ep3_laamps + +#### +# ep3_laamps.8000 The Truth +# ep3_laamps.8010 Loyal Companion +# ep3_laamps.8020 The Trip of a Lifetime +# ep3_laamps.8030 A Rare Orepportunity +# ep3_laamps.8040 Let Sleeping Dogs Lie +# ep3_laamps.8050 Without Friends or Protection +# ep3_laamps.8060 Nary a Drop +# ep3_laamps.8070 Foreign Fruits +# ep3_laamps.8080 A Strange Sailor +# ep3_laamps.8090 The Distant Shores +# by James Beaumont + +# The Truth +# Come back to lands you claim, begin rallying support! +# 8000 +ep3_laamps.8000 = { + type = character_event + title = ep3_laamps.8000.t + desc = { + desc = ep3_laamps.8000.desc + first_valid = { + triggered_desc = { + trigger = { + num_sinful_traits >= 1 + num_virtuous_traits < 1 + } + desc = ep3_laamps.8000.desc.outro.sinner + } + desc = ep3_laamps.8000.desc.outro + } + } + theme = laamp + left_portrait = { + character = root + animation = personality_bold + } + + cooldown = { years = 25 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + any_memory = { + memory_type = lost_title_memory + memory_age_years >= 10 + var:landed_title = { + tier >= tier_duchy + save_temporary_scope_as = title_temp + } + } + current_travel_plan.departure_location.county = { + NOR = { + target_is_de_jure_liege_or_above = scope:title_temp + target_is_de_facto_liege_or_above = scope:title_temp + } + } + exists = location.county + location.county = { + target_is_de_jure_liege_or_above = scope:title_temp + OR = { + root = { has_claim_on = prev } + holder = { + any_held_title = { + is_de_facto_liege_or_above_target = root.location.county + root = { has_claim_on = prev } + } + } + holder = { + any_liege_or_above = { + any_held_title = { + is_de_facto_liege_or_above_target = root.location.county + root = { has_claim_on = prev } + } + } + } + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8000 + VAL = 1 + } + } + if = { + limit = { + location.county.holder = { + any_held_title = { + title_tier >= duchy + is_de_facto_liege_or_above_target = root.location.county + root = { has_claim_on = prev } + } + } + } + location.county.holder = { + random_held_title = { + title_tier >= duchy + limit = { + is_de_facto_liege_or_above_target = root.location.county + root = { has_claim_on = prev } + } + holder = { save_scope_as = claim_holder } + save_scope_as = claimed_land + } + } + } + else_if = { + limit = { + location.county.holder = { + any_liege_or_above = { + any_held_title = { + is_de_facto_liege_or_above_target = root.location.county + root = { has_claim_on = prev } + } + } + } + } + location.county.holder = { + random_liege_or_above = { + limit = { + any_held_title = { + is_de_facto_liege_or_above_target = root.location.county + root = { has_claim_on = prev } + } + } + random_held_title = { + limit = { + is_de_facto_liege_or_above_target = root.location.county + root = { has_claim_on = prev } + } + holder = { save_scope_as = claim_holder } + save_scope_as = claimed_land + } + } + } + } + else = { + root.location.county = { + holder = { save_scope_as = claim_holder } + save_scope_as = claimed_land + } + } + } + + option = { # I'm here to get my title back! + name = ep3_laamps.8000.a + add_character_modifier = { + modifier = laamp_prepping_for_invasion + years = 15 + } + reverse_add_opinion = { + modifier = laamp_claimant_opinion + target = scope:claim_holder + years = 10 + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 1.5 + } + } + } + + option = { # I'm just here to have a wander + name = ep3_laamps.8000.b + add_character_modifier = { + modifier = laamp_familiar_lands + years = 15 + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -1.5 + } + } + } +} + +# The Loyal Companion +# Adopt a puppy +# 8010 +# Loyal Companion +ep3_laamps.8010 = { + type = character_event + title = ep3_laamps.8010.t + desc = ep3_laamps.8010.desc + theme = laamp + override_background = { reference = terrain } + left_portrait = { + character = root + animation = personality_compassionate + } + + # Come along puppy + option = { + name = ep3_laamps.8010.a + start_dog_story_cycle_effect = yes + ai_chance = { + base = 10 + } + } +} + +# The Adventure of a Lifetime +# Courtier at your location wants to join you +# 8020 +scripted_trigger valid_adventurous_character = { + NOR = { + # They got that adventuring spirit in em + has_trait = craven + has_trait = lazy + # Don't steal people super important to the realm + is_child_of = root.location.county.holder + is_player_heir_of = root.location.county.holder + is_consort_of = root.location.county.holder + } + # They're at least somewhat in control of their own life + OR = { + AND = { + is_married = no + is_concubine = no + } + AND = { + is_married = yes + is_female = yes + matrilinear_marriage = yes + } + AND = { + is_married = yes + is_male = yes + patrilinear_marriage = yes + } + } + # Someone the player will care about + has_any_high_skill_rating = yes + # And make sure there's more than just animosity here. + opinion = { + target = root + value >= -40 + } + NOT = { + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = root } + } + # Plus must be eligible for one of your officer positions. + OR = { + camp_officer_generator_pickable_trigger = { POS = second EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = quartermaster EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = armorer EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = chief_forager EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = master_thief EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = head_porter EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = head_groom EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = huntperson EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = kennelperson EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = chief_engineer EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = witness EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = person_haggler EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = camp_cook EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = master_bard EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = stooge EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = master_of_arms EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = light_cavalry_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = camelry_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = elephantry_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = heavy_cavalry_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = horse_archer_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = archer_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = heavy_infantry_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = light_infantry_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = pike_captain EMPLOYER = root } + camp_officer_generator_pickable_trigger = { POS = master_of_spoils EMPLOYER = root } + } +} +ep3_laamps.8020 = { + type = character_event + title = ep3_laamps.8020.t + desc = ep3_laamps.8020.desc + theme = laamp + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:wouldbe_companion + triggered_animation = { + trigger = { + ai_boldness <= ai_compassion + } + animation = beg + } + triggered_animation = { + trigger = { + ai_boldness > ai_compassion + } + animation = personality_bold + } + } + + cooldown = { years = 20 } + + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + static_group_filter = { + group = ep3_laamps.8020 + match = 0.2 + } + } + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + location.county.holder ?= { + is_ai = yes + any_courtier = { + valid_adventurous_character = yes + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8020 + VAL = 1 + } + } + location.county.holder = { + save_scope_as = holder + random_courtier = { + limit = { + valid_adventurous_character = yes + } + save_scope_as = wouldbe_companion + camp_officer_generator_effect = { + VAR = target + EMPLOYER = root + } + } + } + } + + # Come with me + option = { + name = ep3_laamps.8020.a + set_relation_friend = { + target = scope:wouldbe_companion + reason = friend_trip_of_a_lifetime + } + add_courtier = scope:wouldbe_companion + reverse_add_opinion = { + target = scope:wouldbe_companion + modifier = grateful_opinion + opinion = 100 + } + camp_officer_generator_assignment_effect = { + VAR = target + CANDIDATE = scope:wouldbe_companion + EMPLOYER = root + } + stress_impact = { + shy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_sociability = 2.5 + ai_honor = -2.5 + } + } + } + + # I'll take you on gladly. + option = { + name = ep3_laamps.8020.a.2 + add_courtier = scope:wouldbe_companion + reverse_add_opinion = { + target = scope:wouldbe_companion + modifier = grateful_opinion + opinion = 70 + } + add_prestige = minor_prestige_gain + stress_impact = { + shy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = 2.5 + ai_honor = -2.5 + } + } + } + + option = { + name = ep3_laamps.8020.b + progress_towards_friend_effect = { + REASON = friend_returned_my_companion + CHARACTER = root.location.county.holder + OPINION = default_friend_opinion + } + stress_impact = { + gregarious = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_sociability = -2.5 + ai_honor = 2.5 + } + } + } +} + +# A Rare Orepportunity +# Local materials are high quality, use them to improve your artifact? +# 8030 +ep3_laamps.8030 = { + type = character_event + title = ep3_laamps.8030.t + desc = ep3_laamps.8030.desc + theme = laamp + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:armorer + animation = personality_bold + } + artifact = { + target = scope:artifact + position = lower_left_portrait + } + + cooldown = { years = 15 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + employs_court_position = armorer_camp_officer + any_equipped_character_artifact = { + OR = { + artifact_slot_type = armor + artifact_slot_type = primary_armament + } + } + location = { + OR = { + is_mountainous_trigger = yes + has_building_or_higher = royal_armory_01 + has_building_or_higher = blacksmiths_01 + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8030 + VAL = 1 + } + } + location = { save_scope_as = location } + court_position:armorer_camp_officer = { + save_scope_as = armorer + } + random_equipped_character_artifact = { + limit = { + OR = { + artifact_slot_type = armor + artifact_slot_type = primary_armament + } + } + save_scope_as = artifact + } + } + + # Improve my artifact! + option = { + name = ep3_laamps.8030.a + scope:armorer = { + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_laamps.8030.a.win + left_icon = scope:armorer + right_icon = scope:artifact + scope:artifact = { + add_artifact_modifier = artifact_durable_materials_02 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_laamps.8030.a.lose + left_icon = scope:armorer + right_icon = scope:artifact + scope:artifact = { + add_durability = -10 + } + } + } + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + fickle = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_sociability = 2.5 + ai_rationality = 2.5 + ai_greed = -2.5 + } + } + } + + # Use the materials to repair my damaged artifacts + option = { + name = ep3_laamps.8030.b + trigger = { + any_character_artifact = { + OR = { + artifact_slot_type = armor + artifact_slot_type = primary_armament + } + artifact_durability <= 75 + } + } + every_character_artifact = { + limit = { + OR = { + artifact_slot_type = armor + artifact_slot_type = primary_armament + } + artifact_durability <= 75 + } + add_durability = 25 + } + stress_impact = { + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_sociability = -2.5 + ai_rationality = 2.5 + } + } + } + + # Gather the materials, and sell them! + option = { + name = ep3_laamps.8030.c + add_gold = medium_gold_value + stress_impact = { + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_sociability = -2.5 + ai_greed = 2.5 + } + } + } +} + +# Let Sleeping Dogs Lie +# A pregnant wolf is giving birth in one of your tents +# 8040 +ep3_laamps.8040 = { + type = character_event + title = ep3_laamps.8040.t + desc = ep3_laamps.8040.desc + theme = laamp + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:frightened_courtier + animation = fear + } + + cooldown = { years = 15 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + location = { + is_wooded_trigger = yes + } + any_courtier = { + NOT = { is_child_of = root } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8040 + VAL = 1 + } + } + random_courtier = { + limit = { + NOT = { is_child_of = root } + } + weight = { + base = 1 + modifier = { + add = { + subtract = ai_boldness + } + } + } + save_scope_as = frightened_courtier + } + } + + # Oh hush, I'll slay the beast + option = { + name = ep3_laamps.8040.a + duel = { + skill = prowess + value = medium_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + send_interface_toast = { + title = ep3_laamps.8040.a.win + left_icon = root + add_prestige = major_prestige_gain + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + if = { + limit = { + is_ai = yes + } + random = { + chance = 5 + give_nickname = nick_wolf_slayer + } + } + else = { + give_nickname = nick_wolf_slayer + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + send_interface_toast = { + title = ep3_laamps.8040.a.lose + left_icon = root + add_prestige = minor_prestige_gain + increase_wounds_effect = { REASON = wolf } + } + } + } + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_rationality = -2.5 + } + } + } + + # Slay the mother and give the pups to my kids + option = { + name = ep3_laamps.8040.b + trigger = { + any_child = { + is_courtier_of = root + } + } + every_child = { + limit = { + is_courtier_of = root + } + custom = every_child_in_camp + root = { + progress_towards_friend_effect = { + REASON = friend_gave_them_a_dog + CHARACTER = prev + OPINION = default_friend_opinion + } + } + start_dog_story_cycle_effect = yes + } + if = { + limit = { + is_male = yes + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + if = { + limit = { + is_ai = yes + } + random = { + chance = 5 + give_nickname = nick_wolf_father + } + } + else = { + give_nickname = nick_wolf_father + } + } + else_if = { + limit = { + is_female = yes + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + if = { + limit = { + is_ai = yes + } + random = { + chance = 5 + give_nickname = nick_wolf_mother + } + } + else = { + give_nickname = nick_wolf_mother + } + } + stress_impact = { + brave = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 2.5 + ai_rationality = 1.5 + } + } + } + + # Looks like we have the beginnings of a kennel! + option = { + name = ep3_laamps.8040.c + trigger = { + domicile = { + NOT = { + has_domicile_building = baggage_train_kennel + } + } + OR = { + has_trait = eccentric + has_trait = avaricious + } + } + domicile = { + if = { + limit = { + NOT = { + has_domicile_building = baggage_train_01 + } + } + add_domicile_building = baggage_train_01 + } + add_domicile_building = baggage_train_kennel + } + stress_impact = { + brave = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + callous = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 2.5 + ai_rationality = 1.5 + } + } + } + + # We'll get you a new tent + option = { + name = ep3_laamps.8040.d + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 2.5 + ai_rationality = 1.5 + } + } + } +} + +# Without Friends or Protection +# A talented minority wishes to join you +# 8050 +scripted_trigger laamp_8050_valid_minority = { + save_temporary_scope_as = courtier_to_check + # Someone the player will care about + has_any_high_skill_rating = yes + # Ruling class hates their faith + root.location.county.holder.faith = { + faith_hostility_level = { + target = scope:courtier_to_check.faith + value >= faith_hostile_level + } + } + OR = { + root.location.county.holder = { + OR = { + has_trait = zealous + has_trait = callous + has_trait = sadistic + has_trait = torturer + has_trait = holy_warrior + ai_zeal > ai_compassion + } + } + # Locals hate their faith + root.location.faith = { + faith_hostility_level = { + target = scope:courtier_to_check.faith + value >= faith_hostile_level + } + } + } +} + +ep3_laamps.8050 = { + type = character_event + title = ep3_laamps.8050.t + desc = { + desc = ep3_laamps.8050.desc.intro + first_valid = { + triggered_desc = { + trigger = { + faith = scope:minority.faith + } + desc = ep3_laamps.8050.desc.mid.samefaith + } + triggered_desc = { + trigger = { + root.location.county.holder.faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } + } + desc = ep3_laamps.8050.desc.mid.alsohated + } + desc = ep3_laamps.8050.desc.mid.fallback + } + desc = ep3_laamps.8050.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:minority + animation = beg + } + lower_right_portrait = { + character = root.location.county.holder + } + + cooldown = { years = 15 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + is_location_valid_for_travel_event_on_land = yes + OR = { + any_pool_character = { + province = root.location + laamp_8050_valid_minority = yes + } + AND = { + location.county.holder = { is_ai = yes } + location.county.holder = { + any_courtier_or_guest = { + laamp_8050_valid_minority = yes + } + } + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8050 + VAL = 1 + } + } + if = { + limit = { + any_pool_character = { + province = root.location + laamp_8050_valid_minority = yes + } + } + random_pool_character = { + province = root.location + limit = { + laamp_8050_valid_minority = yes + } + weight = { + base = 1 + modifier = { + add = 2 + OR = { + # Smaller religions unlikely to have a *homeland* to return to + religion = religion:dualism_religion + religion = religion:judaism_religion + religion = religion:yazidi_religion + religion = religion:zoroastrianism_religion + religion = religion:zunism_religion + } + } + } + save_scope_as = minority + } + } + else = { + location.county.holder = { + random_courtier_or_guest = { + limit = { + laamp_8050_valid_minority = yes + } + weight = { + base = 1 + modifier = { + add = 2 + OR = { + # Smaller religions unlikely to have a *homeland* to return to + religion = religion:dualism_religion + religion = religion:judaism_religion + religion = religion:yazidi_religion + religion = religion:zoroastrianism_religion + religion = religion:zunism_religion + } + } + } + save_scope_as = minority + } + } + } + } + + # Of course, join me as my companion! + option = { + name = ep3_laamps.8050.a + set_relation_friend = { + target = scope:minority + reason = friend_trip_of_a_lifetime + } + add_courtier = scope:minority + if = { + limit = { + scope:minority.faith = root.faith + } + add_piety = medium_piety_gain + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + } + else = { + stress_impact = { + zealous = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_sociability = 2.5 + ai_rationality = 2.5 + ai_honor = 2.5 + ai_vengefulness = -2.5 + ai_zeal = -2.5 + } + } + } + + # I shall help you flee to safer lands + option = { + name = ep3_laamps.8050.b + trigger = { + culture = { this != scope:minority.culture } + } + scope:minority = { + if = { + limit = { + is_pool_character = no + } + move_to_pool = yes + } + } + root.culture = { + change_cultural_acceptance = { + target = scope:minority.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_fled_persecution + } + } + if = { + limit = { + scope:minority.faith = root.faith + } + add_piety = medium_piety_gain + stress_impact = { + sadistic = medium_stress_impact_gain + callous = minor_stress_impact_gain + } + } + else = { + stress_impact = { + sadistic = medium_stress_impact_gain + callous = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = -2.5 + ai_sociability = -2.5 + ai_rationality = 2.5 + ai_zeal = -2.5 + } + } + } + + # Run home to your master now. Go on. Get. + option = { + name = ep3_laamps.8050.c + #Oppression is fun, I guess + if = { + limit = { faith = root.location.county.holder.faith } + add_piety = medium_piety_gain + } + else = { add_prestige = medium_prestige_gain } + stress_impact = { + gregarious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + callous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_sociability = -2.5 + ai_honor = 2.5 + } + } + } +} + +# Nary a Drop +# Your water supplies spring a leak +# 8060 +ep3_laamps.8060 = { + type = character_event + title = ep3_laamps.8060.t + desc = ep3_laamps.8060.desc + theme = laamp + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:idiot + animation = beg + } + + cooldown = { years = 15 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + domicile ?= { + domicile_location = { + # Water should be precious + is_desert_trigger = yes + NOT = { terrain = oasis } + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8060 + VAL = 1 + } + } + random_courtier = { + weight = { + base = 100 + modifier = { + add = { + subtract = learning + subtract = prowess + } + } + # Clumsy + modifier = { + add = 50 + has_trait = intellect_bad + } + # Clumsy + modifier = { + add = 50 + has_trait = physique_bad + } + modifier = { + factor = 0 + is_adult = no + } + } + save_scope_as = idiot + } + } + + # Quickly, we must find some! + option = { + name = ep3_laamps.8060.a + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { + desc = ep3_laamps.8060.a.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_laamps.8060.a.win + left_icon = root + domicile ?= { change_provisions = minor_provisions_gain } + } + } + 50 = { + desc = ep3_laamps.8060.a.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_laamps.8060.a.lose + left_icon = root + domicile ?= { change_provisions = minor_provisions_loss } + } + } + } + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_sociability = 2.5 + ai_rationality = 2.5 + ai_honor = 2.5 + ai_vengefulness = -5 + } + } + } + + # Maybe we need to... recycle + option = { + name = ep3_laamps.8060.b + trigger = { has_trait = eccentric } + every_courtier = { + custom = every_camp_member + random = { + chance = 15 + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } + } + } + hidden_effect = { + random = { + chance = 15 + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + stress_impact = { + base = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_rationality = -2.5 + ai_vengefulness = -5 + } + } + } + + # You blundering imbecile! You fix this! + option = { + name = ep3_laamps.8060.c + scope:idiot = { + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { + desc = ep3_laamps.8060.c.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_laamps.8060.c.win + left_icon = root + domicile ?= { change_provisions = minor_provisions_gain } + } + } + } + 50 = { + desc = ep3_laamps.8060.c.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_laamps.8060.c.lose + left_icon = root + domicile ?= { change_provisions = minor_provisions_loss } + } + } + } + } + } + stress_impact = { + fickle = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = medium_stress_impact_gain + vengeful = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_rationality = 2.5 + ai_vengefulness = 5 + } + } + } + + # Time to ransack some local caravans + option = { + name = ep3_laamps.8060.d + add_gold = medium_gold_value + random = { + chance = 15 + send_interface_toast = { + title = ep3_laamps.8060.d.lose + left_icon = root + right_icon = root.location.county.holder + reverse_add_opinion = { + modifier = theft_opinion + target = root.location.county.holder + } + } + } + stress_impact = { + fickle = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = medium_stress_impact_gain + vengeful = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_greed = 2.5 + ai_vengefulness = 5 + } + } + } + + # We can live without it + option = { + name = ep3_laamps.8060.e + domicile = { change_provisions = medium_provisions_loss } + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_sociability = 2.5 + ai_rationality = -2.5 + ai_honor = 2.5 + ai_vengefulness = -5 + } + } + } +} + +# Foreign Fruits +# You find some strange looking fruit, eat it? +# 8070 +ep3_laamps.8070 = { + type = character_event + title = ep3_laamps.8070.t + desc = ep3_laamps.8070.desc + theme = laamp + left_portrait = { + character = root + animation = thinking + } + lower_left_portrait = { + character = scope:forager + } + + override_background = { + reference = terrain_scope + } + + cooldown = { years = 15 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + location = { is_sea_province = no } + domicile ?= { + domicile_location = { + is_likely_to_contain_trees_trigger = yes + } + NOT = { provisions >= max_provisions } + } + } + + immediate = { + domicile.domicile_location ?= { save_scope_as = background_terrain_scope } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8070 + VAL = 1 + } + } + court_position:chief_forager_camp_officer ?= { save_scope_as = forager } + } + + # Forager, what say you? + option = { + name = ep3_laamps.8070.a + trigger = { + exists = scope:forager + scope:forager = { + aptitude = { + court_position = chief_forager_camp_officer + value >= 2 + } + } + } + domicile = { change_provisions = medium_provisions_gain } + ai_chance = { # This is just the best option + base = 1000 + } + } + + # Ah, I know these plants! + option = { + name = ep3_laamps.8070.b + trigger = { + has_trait = lifestyle_herbalist + } + domicile = { change_provisions = medium_provisions_gain } + add_prestige = minor_prestige_gain + ai_chance = { # This is the other best option + base = 1000 + } + } + + # Let's just try... + option = { + name = ep3_laamps.8070.c + random_list = { + 75 = { + send_interface_toast = { + title = ep3_laamps.8070.c.win + domicile = { change_provisions = medium_provisions_gain } + } + } + 25 = { + send_interface_toast = { + title = ep3_laamps.8070.c.lose + hidden_effect = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + every_courtier = { + custom = every_camp_member + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_rationality = -2.5 + } + } + } + + # I think we'll survive without them + option = { + name = ep3_laamps.8070.d + stress_impact = { + brave = medium_stress_impact_gain + eccentric = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_rationality = 2.5 + } + } + } +} + +# A Strange Sailor +# You find Tom Baker sitting at a bar missing most of his body parts +# 8080 +scripted_trigger valid_weird_sailor = { + is_adult = yes + has_trait = eccentric + has_any_high_skill_rating = yes + would_be_valid_for_court_position = { + court_position = quartermaster_camp_officer + employer = root + } +} +ep3_laamps.8080 = { + type = character_event + title = ep3_laamps.8080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + location = { + is_sea_province = yes + } + } + desc = ep3_laamps.8080.desc.intro_sea + } + desc = ep3_laamps.8080.desc.intro + } + desc = ep3_laamps.8080.desc.outro + } + theme = laamp + override_background = { + reference = tavern + } + left_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:sailor + animation = eccentric + } + + cooldown = { years = 15 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + location = { + OR = { + is_coastal = yes + any_neighboring_province = { is_river_province = yes } + } + } + NOT = { employs_court_position = quartermaster_camp_officer } + can_employ_court_position_type = quartermaster_camp_officer + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8080 + VAL = 1 + } + } + root.location = { + random_neighboring_province = { + limit = { + is_sea_province = no + } + save_scope_as = sailor_home + } + } + hidden_effect = { + random_pool_character = { + province = scope:sailor_home + limit = { valid_weird_sailor = yes } + if = { + limit = { + has_permanent_physical_injury = no + } + add_trait = one_legged + } + save_scope_as = sailor + } + random_memory = { + limit = { + has_memory_category = positive + has_memory_category = martial + } + save_scope_as = memory + } + } + if = { + limit = { + NOT = { exists = scope:sailor } + } + create_character = { + location = scope:sailor_home + template = weird_sailor_template + culture = scope:sailor_home.culture + faith = scope:sailor_home.faith + save_scope_as = sailor + after_creation = { + random_list = { + 1 = { set_nickname_effect = { NICKNAME = nick_the_mad } } + 1 = { set_nickname_effect = { NICKNAME = nick_the_red } } + 1 = { set_nickname_effect = { NICKNAME = nick_the_drunkard } } + 1 = { set_nickname_effect = { NICKNAME = nick_the_jolly } } + 1 = { set_nickname_effect = { NICKNAME = nick_the_jovial } } + 1 = { set_nickname_effect = { NICKNAME = nick_the_bellower } } + 1 = { set_nickname_effect = { NICKNAME = nick_twistedbeard } } + 1 = { set_nickname_effect = { NICKNAME = nick_foul_fart } } + 1 = { set_nickname_effect = { NICKNAME = nick_the_flash } } + 1 = { set_nickname_effect = { NICKNAME = nick_the_insane } } + 1 = { set_nickname_effect = { NICKNAME = nick_ale_lover } } + 1 = { set_nickname_effect = { NICKNAME = nick_the_gambler } } + } + } + } + } + } + + # AAAAHHHHAAAAAAAAAAHAAHAAAAAAAAA... me laddy! + option = { + name = ep3_laamps.8080.a + trigger = { + has_trait = eccentric + } + set_relation_friend = { + target = scope:sailor + reason = friend_eccentric + } + add_courtier = scope:sailor + camp_officer_grant_effect = { + EMPLOYER = root + POS = second + CANDIDATE = scope:sailor + } + stress_impact = { + eccentric = medium_stress_impact_loss + shy = minor_stress_impact_loss + cynical = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_sociability = 2.5 + ai_rationality = -10 + } + } + } + + # Do... do you wanna come with me? + option = { + name = ep3_laamps.8080.b + add_courtier = scope:sailor + camp_officer_grant_effect = { + EMPLOYER = root + POS = quartermaster + CANDIDATE = scope:sailor + } + pay_short_term_gold = { + target = scope:sailor + gold = minor_gold_value + } + stress_impact = { + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + shy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_sociability = 2.5 + ai_rationality = -2.5 + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + # Try to out-macho him + option = { + name = ep3_laamps.8080.c + duel = { + skills = { martial diplomacy } + target = scope:sailor + 50 = { + desc = ep3_laamps.8080.c.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_laamps.8080.c.win + left_icon = root + right_icon = scope:sailor + add_prestige = medium_prestige_gain + every_courtier = { + custom = every_camp_member + add_opinion = { + modifier = impressed_opinion + target = root + opinion = 15 + } + } + } + } + 50 = { + desc = ep3_laamps.8080.c.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_laamps.8080.c.lose + left_icon = root + right_icon = scope:sailor + add_prestige = medium_prestige_loss + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_sociability = 2.5 + ai_rationality = -2.5 + } + } + } + + # Get away from me you mad old sea dog + option = { + name = ep3_laamps.8080.d + stress_impact = { + humble = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + eccentric = major_stress_impact_gain + shy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_sociability = -2.5 + ai_rationality = 2.5 + } + } + } +} + +# The Distant Shores +# You have an out-of-body experience in a strange land and question your identity +# 8090 +ep3_laamps.8090 = { + type = character_event + title = ep3_laamps.8090.t + desc = { + desc = ep3_laamps.8090.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_minor + } + } + } + desc = ep3_laamps.8090.desc.world_europe + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_middle_east + } + } + desc = ep3_laamps.8090.desc.world_middle_east + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_india + } + } + desc = ep3_laamps.8090.desc.world_india + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_africa + } + } + desc = ep3_laamps.8090.desc.world_africa + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_steppe + } + } + desc = ep3_laamps.8090.desc.world_steppe + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_tibet + } + } + desc = ep3_laamps.8090.desc.world_tibet + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_burma + } + } + desc = ep3_laamps.8090.desc.world_burma + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_asia_china + } + } + desc = ep3_laamps.8090.desc.world_asia_china + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_asia_japan + } + } + desc = ep3_laamps.8090.desc.world_asia_japan + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_asia_korea + } + } + desc = ep3_laamps.8090.desc.world_asia_korea + } + triggered_desc = { + trigger = { + root.domicile.domicile_location = { + geographical_region = world_asia_southeast + } + } + desc = ep3_laamps.8090.desc.world_asia_southeast + } + } + desc = ep3_laamps.8090.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = admiration + } + override_background = { reference = market } + + cooldown = { years = 15 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + is_location_valid_for_travel_event_on_land = yes + OR = { + AND = { + root.domicile.domicile_location = { + OR = { + geographical_region = world_europe + geographical_region = world_asia_minor + } + } + NOR = { + root.culture = { culture_overlaps_geographical_region = world_europe } + root.culture = { culture_overlaps_geographical_region = world_asia_minor } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_middle_east } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_middle_east } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_india } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_india } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_africa } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_africa } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_steppe } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_steppe } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_tibet } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_tibet } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_burma } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_burma } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_asia_china } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_asia_china } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_asia_japan } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_asia_japan } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_asia_korea } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_asia_korea } + } + } + AND = { + root.domicile.domicile_location = { geographical_region = world_asia_southeast } + NOT = { + root.culture = { culture_overlaps_geographical_region = world_asia_southeast } + } + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_nimbo_8090 + VAL = 1 + } + } + root.domicile.domicile_location.county = { save_scope_as = county } + root.domicile.domicile_location.county.culture = { save_scope_as = culture } + } + + # Can a man not be both one culture AND another? + option = { + name = ep3_laamps.8090.a + culture = { + change_cultural_acceptance = { + target = scope:culture + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_distant_hero + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2.5 + ai_sociability = 2.5 + ai_rationality = 2.5 + } + } + } + + # I think it's time I embrace my place here + option = { + name = ep3_laamps.8090.b + every_courtier = { + custom = every_relative_in_camp_your_culture + limit = { + is_close_family_of = root + culture = root.culture + } + set_culture = scope:culture + } + set_culture = scope:culture + stress_impact = { + gregarious = medium_stress_impact_loss + eccentric = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 0 # Player only + } + } + + # Maybe I should build a new home here! + option = { + name = ep3_laamps.8090.c + add_character_modifier = { + modifier = laamps_8090_preparing_invasion + years = 15 + } + stress_impact = { + gregarious = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2.5 + ai_sociability = -2.5 + ai_rationality = -2.5 + } + } + } +} + +# LEGITIMIST SUPPORT NEGOTIATION EVENTS +# Choose your title for support +ep3_laamps.8101 = { + type = character_event + title = ep3_laamps.8101.t + desc = ep3_laamps.8101.desc + + theme = diplomacy + + override_background = { reference = study } + + left_portrait = { + character = root + animation = debating + } + + right_portrait = { + character = scope:petitioned_ruler + animation = admiration + } + + trigger = { + any_claim = { + count > 1 + tier >= tier_kingdom + } + NOT = { + has_variable = legitimist_claimed_title + } + } + + immediate = { + ordered_claim = { + limit = { + tier >= tier_kingdom + } + order_by = tier + max = 4 + + # First title. + if = { + limit = { + NOT = { exists = scope:title_1 } + } + save_scope_as = title_1 + } + # Second title. + else_if = { + limit = { + NOT = { + this = scope:title_1 + exists = scope:title_2 + } + } + save_scope_as = title_2 + } + # Third title. + else_if = { + limit = { + NOT = { + this = scope:title_1 + this = scope:title_2 + exists = scope:title_3 + } + } + save_scope_as = title_3 + } + # Fourth title + else_if = { + limit = { + NOT = { + this = scope:title_1 + this = scope:title_2 + this = scope:title_3 + exists = scope:title_4 + } + } + save_scope_as = title_4 + } + } + } + + on_trigger_fail = { + trigger_event = ep3_laamps.8102 + } + + option = { + name = ep3_laamps.8101.a + custom_tooltip = ep3_laamps.8101.a.desc + trigger = { + exists = scope:title_1 + } + scope:title_1 = { + save_scope_as = claimed_title + } + + ai_chance = { + base = 100 + } + } + + option = { + name = ep3_laamps.8101.b + custom_tooltip = ep3_laamps.8101.a.desc + trigger = { + exists = scope:title_2 + } + scope:title_2 = { + save_scope_as = claimed_title + } + } + + option = { + name = ep3_laamps.8101.c + custom_tooltip = ep3_laamps.8101.a.desc + trigger = { + exists = scope:title_3 + } + scope:title_3 = { + save_scope_as = claimed_title + } + } + + option = { + name = ep3_laamps.8101.d + custom_tooltip = ep3_laamps.8101.a.desc + trigger = { + exists = scope:title_4 + } + scope:title_4 = { + save_scope_as = claimed_title + } + } + + after = { + trigger_event = ep3_laamps.8102 + } +} + +#Negotiations intro +ep3_laamps.8102 = { + type = character_event + title = ep3_laamps.8102.t + desc = ep3_laamps.8102.desc + + theme = diplomacy + + override_background = { reference = study } + + left_portrait = { + character = root + animation = debating + } + + right_portrait = { + character = scope:petitioned_ruler + animation = bribing + } + + immediate = { + #save the claim + if = { + limit = { + NOT = { + exists = scope:claimed_title + has_variable = legitimist_claimed_title + } + } + random_claim = { + limit = { + tier >= tier_kingdom + } + save_scope_as = claimed_title + } + } + scope:claimed_title.holder.capital_barony = { save_scope_as = capital_barony } + if = { + limit = { + NOT = { + has_variable = legitimist_claimed_title + } + } + set_variable = { + name = legitimist_claimed_title + value = scope:claimed_title + } + } + else = { + var:legitimist_claimed_title = { + save_scope_as = claimed_title + } + } + + #setup turns + + set_variable = { + name = legitimist_turns + value = { + value = 4 + if = { + limit = { + scope:claimed_title = { + tier = tier_empire + } + } + add = 4 + } + if = { + limit = { + scope:petitioned_ruler.faith = root.faith + } + add = { + value = root.piety_level + subtract = 2 + max = 2 + min = 0 + } + } + add = { + value = root.prestige_level + subtract = 2 + max = 2 + min = 0 + } + add = { + value = root.dynasty.dynasty_prestige_level + subtract = 2 + max = 3 + min = 0 + } + } + } + + #setup support and obligations level + + set_variable = { + name = legitimist_support + value = 1 + } + + set_variable = { + name = legitimist_obligations + value = 2 + } + + } + + option = { #Let us dicuss the deal-o + name = ep3_laamps.8102.a + custom_tooltip = ep3_laamps.8102.a.desc + + if = { + limit = { + is_ai = yes + } + change_variable = { + name = legitimist_support + add = 2 + } + change_variable = { + name = legitimist_obligations + add = 1 + } + } + ai_chance = { + base = 100 + } + } + + option = { #Try to dazzle them with brilliance - more turns + name = ep3_laamps.8102.b + trigger = { + NOT = { + has_relation_friend = scope:petitioned_ruler + } + } + duel = { + target = scope:petitioned_ruler + skill = diplomacy + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = ep3_laamps.8102.b.desc + send_interface_toast = { + title = ep3_laamps.8102.b.success + left_icon = scope:petitioned_ruler + } + change_variable = { + name = legitimist_support + add = 1 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_laamps.8102.b.failure + send_interface_toast = { + title = ep3_laamps.8102.b.failure + left_icon = scope:petitioned_ruler + } + add_prestige = medium_prestige_loss + change_variable = { + name = legitimist_turns + subtract = 1 + } + } + } + } + + option = { #Or baffle them with bs - more turns + name = ep3_laamps.8102.c + trigger = { + NOT = { + has_relation_friend = scope:petitioned_ruler + } + } + duel = { + target = scope:petitioned_ruler + skill = intrigue + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = ep3_laamps.8102.c.desc + send_interface_toast = { + title = ep3_laamps.8102.b.success + left_icon = scope:petitioned_ruler + } + change_variable = { + name = legitimist_turns + add = 4 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_laamps.8102.b.failure + send_interface_toast = { + title = ep3_laamps.8102.b.failure + left_icon = scope:petitioned_ruler + } + add_prestige = medium_prestige_loss + change_variable = { + name = legitimist_turns + subtract = 1 + } + } + } + } + + option = { #we are friends, more turns + name = ep3_laamps.8102.d + custom_tooltip = ep3_laamps.8102.d.desc + trigger = { + has_relation_friend = scope:petitioned_ruler + + } + change_variable = { + name = legitimist_turns + add = 4 + } + change_variable = { + name = legitimist_support + add = 1 + } + + } + + option = { #spend hook - more support! + name = ep3_laamps.8102.e + custom_tooltip = ep3_laamps.8102.e.desc + trigger = { + has_hook = scope:petitioned_ruler + } + remove_hook = { target = scope:petitioned_ruler } + change_variable = { + name = legitimist_support + add = 2 + } + } + + after = { + trigger_event = ep3_laamps.8103 + } +} + +#Negotiations for the level of support +ep3_laamps.8103 = { + type = character_event + title = ep3_laamps.8103.t + desc = { + random_valid = { + desc = ep3_laamps.8103.intro_1 + desc = ep3_laamps.8103.intro_2 + desc = ep3_laamps.8103.intro_3 + } + first_valid = { + triggered_desc = { + trigger = { var:legitimist_turns = 0 } + desc = ep3_laamps.8103.no_more_turns_flavor + } + random_valid = { + desc = ep3_laamps.8103.mid_1 + desc = ep3_laamps.8103.mid_2 + desc = ep3_laamps.8103.mid_3 + } + } + + desc = ep3_laamp.8103.turns_left + first_valid = { + triggered_desc = { + trigger = { var:legitimist_support >= 6 } + desc = ep3_laamps.8103.support_6 + } + triggered_desc = { + trigger = { var:legitimist_support >= 5 } + desc = ep3_laamps.8103.support_5 + } + triggered_desc = { + trigger = { var:legitimist_support >= 4 } + desc = ep3_laamps.8103.support_4 + } + triggered_desc = { + trigger = { var:legitimist_support >= 3 } + desc = ep3_laamps.8103.support_3 + } + triggered_desc = { + trigger = { var:legitimist_support >= 2 } + desc = ep3_laamps.8103.support_2 + } + triggered_desc = { + trigger = { var:legitimist_support >= 1 } + desc = ep3_laamps.8103.support_1 + } + } + first_valid = { + triggered_desc = { + trigger = { var:legitimist_obligations = 1 } + desc = ep3_laamps.8103.one_obligations + } + desc = ep3_laamps.8103.obligations + } + } + + theme = diplomacy + override_background = { reference = study } + + left_portrait = { + character = root + animation = debating + } + + right_portrait = { + character = scope:petitioned_ruler + animation = personality_forgiving + } + + trigger = { + var:legitimist_turns >= 1 + } + + on_trigger_fail = { + trigger_event = ep3_laamps.8105 + } + + option = { #Moar troops! + name = ep3_laamps.8103.a + custom_tooltip = ep3_laamps.8103.a.desc + trigger = { + var:legitimist_support < 6 + var:legitimist_turns >= 1 + } + change_variable = { + name = legitimist_support + add = 1 + } + change_variable = { + name = legitimist_obligations + add = 1 + } + trigger_event = ep3_laamps.8103 + } + + option = { #Moar troops, but without obligations increase. harder with obligations/support imbalance + name = ep3_laamps.8103.b + + trigger = { + var:legitimist_support < 6 + var:legitimist_turns >= 1 + } + duel = { + target = scope:petitioned_ruler + skill = diplomacy + + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = ep3_laamps.8103.b.desc + send_interface_toast = { + title = ep3_laamps.8103.b.success + left_icon = scope:petitioned_ruler + } + change_variable = { + name = legitimist_support + add = 1 + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = { + value = var:legitimist_support + add = 1 + subtract = var:legitimist_obligations + multiply = 10 + } + } + desc = ep3_laamps.8103.b.failure + send_interface_toast = { + title = ep3_laamps.8103.b.failure + left_icon = scope:petitioned_ruler + } + add_prestige = minor_prestige_loss + } + } + trigger_event = ep3_laamps.8103 + } + + option = { #Try to get the level of obligations down. harder with obligations/support imbalance + name = ep3_laamps.8103.c + custom_tooltip = ep3_laamps.8103.c.desc + trigger = { + var:legitimist_obligations > 1 + var:legitimist_turns >= 1 + } + duel = { + target = scope:petitioned_ruler + skill = stewardship + + 70 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamps.8103.c.success + send_interface_toast = { + title = ep3_laamps.8103.c.success + left_icon = scope:petitioned_ruler + } + change_variable = { + name = legitimist_obligations + subtract = 1 + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = { + value = var:legitimist_support + add = 1 + subtract = var:legitimist_obligations + multiply = 10 + } + } + desc = ep3_laamps.8103.c.failure + send_interface_toast = { + title = ep3_laamps.8103.c.failure + left_icon = scope:petitioned_ruler + } + add_prestige = minor_prestige_loss + } + } + trigger_event = ep3_laamps.8103 + } + + option = { #I'm good + name = ep3_laamps.8103.d + custom_tooltip = ep3_laamps.8103.d.desc + trigger_event = ep3_laamps.8105 + + ai_chance = { + base = 100 + } + } + + after = { + change_variable = { + name = legitimist_turns + subtract = 1 + } + } +} + +#End on negotiations - spit on it + +scripted_effect legitimist_support_add_effect = { + add_gold = { + value = 300 + multiply = var:legitimist_support + } + spawn_army = { + men_at_arms = { + type = accolade_maa_vanguards + stacks = { + value = 2 + multiply = var:legitimist_support + } + } + men_at_arms = { + type = accolade_maa_archers + stacks = { + value = 2 + multiply = var:legitimist_support + } + } + men_at_arms = { + type = accolade_maa_lancers + stacks = { + value = var:legitimist_support + min = 1 + } + } + inheritable = no + uses_supply = no + location = root.location + name = ep3_legitimist_army + } + scope:petitioned_ruler = { + add_hook = { + target = root + type = favor_hook + } + } +} + +ep3_laamps.8105 = { + type = character_event + title = ep3_laamps.8105.t + desc = ep3_laamps.8105.desc + + theme = diplomacy + override_background = { reference = study } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:petitioned_ruler + animation = toast_goblet + } + + option = { #ask for time extension + name = ep3_laamps.8105.a + custom_tooltip = ep3_laamps.8105.invalidations_reasons + custom_tooltip = ep3_laamps.8105.a.desc + duel = { + target = scope:petitioned_ruler + skill = martial + + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamps.8105.a.success + send_interface_toast = { + title = ep3_laamps.8105.a.success + left_icon = scope:petitioned_ruler + } + trigger_event = { + id = ep3_laamps.8106 + years = 8 + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamps.8105.a.failure + send_interface_toast = { + title = ep3_laamps.8105.a.failure + left_icon = scope:petitioned_ruler + } + trigger_event = { + id = ep3_laamps.8106 + years = 4 + } + add_prestige = medium_prestige_loss + } + } + + legitimist_support_add_effect = yes + + add_to_variable_list = { #used to handle root death + name = legitimist_supporters + target = scope:petitioned_ruler + } + + scope:petitioned_ruler = { + set_variable = { + name = legitimist_obligations_left + value = root.var:legitimist_obligations + } + } + hidden_effect = { + scope:task_contract = { + complete_task_contract = success_standard + } + } + } + + option = { #spit on it + name = ep3_laamps.8105.b + custom_tooltip = ep3_laamps.8105.invalidations_reasons + custom_tooltip = ep3_laamps.8105.b.desc + trigger_event = { + id = ep3_laamps.8106 + years = 4 + } + + scope:petitioned_ruler = { + set_variable = { + name = legitimist_obligations_left + value = root.var:legitimist_obligations + } + } + add_prestige = medium_prestige_gain + + legitimist_support_add_effect = yes + + add_to_variable_list = { #used to handle root death + name = legitimist_supporters + target = scope:petitioned_ruler + } + hidden_effect = { + scope:task_contract = { + complete_task_contract = success_standard + } + } + + ai_chance = { + base = 100 + } + } + + option = { #actually, nvm, byeeee + name = ep3_laamps.8105.c + custom_tooltip = ep3_laamps.8105.c.desc + trigger_event = { + id = ep3_laamps.8107 + months = { 1 2 } + } + hidden_effect = { + scope:task_contract = { + complete_task_contract = failure_standard + } + } + } + + after = { + remove_variable = legitimist_turns + remove_variable = legitimist_support + remove_variable = legitimist_obligations + } +} + +scripted_effect ep3_laamps_8106_designate_targets_effect = { + if = { + limit = { + NOT = { exists = scope:target_1 } + } + save_scope_as = target_1 + } + else_if = { + limit = { + NOT = { exists = scope:target_2 } + } + save_scope_as = target_2 + } + else_if = { + limit = { + NOT = { exists = scope:target_3 } + } + save_scope_as = target_3 + } + else_if = { + limit = { + NOT = { exists = scope:target_4 } + } + save_scope_as = target_4 + } + else_if = { + limit = { + NOT = { exists = scope:target_5 } + } + save_scope_as = target_5 + } + else_if = { + limit = { + NOT = { exists = scope:target_6 } + } + save_scope_as = target_6 + } + else_if = { + limit = { + NOT = { exists = scope:target_7 } + } + save_scope_as = target_7 + } + else_if = { + limit = { + NOT = { exists = scope:target_8 } + } + save_scope_as = target_8 + } + else_if = { + limit = { + NOT = { exists = scope:target_9 } + } + save_scope_as = target_9 + } + else_if = { + limit = { + NOT = { exists = scope:target_10 } + } + save_scope_as = target_10 + } +} + +#Reminder about the timer! + +ep3_laamps.8106 = { + type = character_event + title = ep3_laamps.8106.t + desc = ep3_laamps.8106.desc + + theme = diplomacy + override_background = { reference = army_camp } + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:petitioned_ruler + animation = personality_vengeful + } + + trigger = { + government_has_flag = government_is_landless_adventurer + has_realm_law = camp_purpose_legitimists + NOT = { + is_at_war = yes + any_held_title = { + this = scope:claimed_title + } + } + scope:petitioned_ruler = { + is_alive = yes + is_landed = yes + NOR = { + is_imprisoned_by = root + AND = { + is_at_war = yes + any_character_war = { + OR = { + primary_attacker = root + primary_defender = root + } + } + } + } + } + } + + on_trigger_fail = { + if = { + limit = { + is_at_war = yes + } + trigger_event = { #let us try again later + id = ep3_laamps.8106 + months = { 2 4 } + } + } + else_if = { + limit = { + any_held_title = { + this = scope:claimed_title + } + } + trigger_event = { #payup buddy boi + id = ep3_laamps.8111 + months = { 18 20 } + } + } + else_if = { + limit = { + scope:petitioned_ruler = { + OR = { + is_alive = no + is_landed = no + is_imprisoned_by = root + AND = { + is_at_war = yes + any_character_war = { + OR = { + primary_attacker = root + primary_defender = root + } + } + } + } + } + } + trigger_event = { + id = ep3_laamps.8110 + } + } + else = { + trigger_event = { #you failed + id = ep3_laamps.8107 + months = { 1 2 } + } + } + } + + option = { #go to war + name = ep3_laamps.8106.a + flavor = ep3_laamps.8106.a.desc + #it is ugly, but it seems there is no other way + every_claim = { + limit = { + OR = { + holder = scope:claimed_title.holder + holder.top_liege = scope:claimed_title.holder + } + } + ep3_laamps_8106_designate_targets_effect = yes + } + + # Ugly war targeting. + ## 10 targets. + if = { + limit = { exists = scope:target_10 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + target_title = scope:target_3 + target_title = scope:target_4 + target_title = scope:target_5 + target_title = scope:target_6 + target_title = scope:target_7 + target_title = scope:target_8 + target_title = scope:target_9 + target_title = scope:target_10 + } + } + ## 09 targets. + else_if = { + limit = { exists = scope:target_9 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + target_title = scope:target_3 + target_title = scope:target_4 + target_title = scope:target_5 + target_title = scope:target_6 + target_title = scope:target_7 + target_title = scope:target_8 + target_title = scope:target_9 + } + } + ## 08 targets. + else_if = { + limit = { exists = scope:target_8 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + target_title = scope:target_3 + target_title = scope:target_4 + target_title = scope:target_5 + target_title = scope:target_6 + target_title = scope:target_7 + target_title = scope:target_8 + } + } + ## 07 targets. + else_if = { + limit = { exists = scope:target_7 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + target_title = scope:target_3 + target_title = scope:target_4 + target_title = scope:target_5 + target_title = scope:target_6 + target_title = scope:target_7 + } + } + ## 06 targets. + else_if = { + limit = { exists = scope:target_6 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + target_title = scope:target_3 + target_title = scope:target_4 + target_title = scope:target_5 + target_title = scope:target_6 + } + } + ## 05 targets. + else_if = { + limit = { exists = scope:target_5 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + target_title = scope:target_3 + target_title = scope:target_4 + target_title = scope:target_5 + } + } + ## 04 targets. + else_if = { + limit = { exists = scope:target_4 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + target_title = scope:target_3 + target_title = scope:target_4 + } + } + ## 03 targets. + else_if = { + limit = { exists = scope:target_3 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + target_title = scope:target_3 + } + } + ## 02 targets. + else_if = { + limit = { exists = scope:target_2 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + target_title = scope:target_2 + } + } + ## 01 targets. + else_if = { + limit = { exists = scope:target_1 } + start_war = { + casus_belli = claim_cb + target = scope:claimed_title.holder + claimant = root + target_title = scope:target_1 + } + } + + ai_chance = { + base = 100 + } + + trigger_event = { + id = ep3_laamps.8106 + months = { 11 13 } + } + } + + option = { #ask for a delay + name = ep3_laamps.8106.b + custom_tooltip = ep3_laamps.8106.b.desc + #diplo/martial duel - the time is not right for war you see + #trigger this event after next 2 years + #obligations increase if you don't succeed + duel = { + target = scope:petitioned_ruler + skill = martial + + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = ep3_laamps.8106.b.success + send_interface_toast = { + title = ep3_laamps.8106.b.success + left_icon = scope:petitioned_ruler + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = ep3_laamps.8106.b.failure + send_interface_toast = { + title = ep3_laamps.8106.b.failure + left_icon = scope:petitioned_ruler + } + scope:petitioned_ruler = { + change_variable = { + name = legitimist_obligations_left + add = 1 + } + } + trigger_event = { + id = ep3_laamps.8106 + years = 2 + } + } + } + } + + option = { #actually, nvm, I have other plans now + name = ep3_laamps.8106.c + custom_tooltip = ep3_laamps.8106.c.desc + + trigger_event = { + id = ep3_laamps.8107 + months = { 1 2 } + } + } +} + +#Invalidation upon changing the camp type or becoming landed + +ep3_laamps.8107 = { + type = letter_event + opening = ep3_laamps.8107.t + desc = ep3_laamps.8107.desc + sender = scope:petitioned_ruler + + option = { #well, fate had another things in mind + name = ep3_laamps.8107.a + add_prestige_level = -1 + if = { + limit = { + NOT = { + has_relation_rival = scope:petitioned_ruler + } + } + set_relation_rival = { + target = scope:petitioned_ruler + reason = rival_nithing + } + } + scope:petitioned_ruler = { + remove_variable = legitimist_obligations_left + remove_character_flag = legitimist_supporter + } + add_to_variable_list = { + name = legitimist_payed_supporters + target = scope:petitioned_ruler + } + scope:petitioned_ruler = { + remove_hook = { + target = root + } + } + } + +} + +#Obligations payment + +ep3_laamps.8108 = { + type = character_event + title = ep3_laamps.8108.t + desc = ep3_laamps.8108.desc + + theme = stewardship + override_background = { reference = study } + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:petitioned_ruler + animation = personality_greedy + } + + trigger = { + scope:petitioned_ruler = { + is_alive = yes + is_landed = yes + NOR = { + is_imprisoned_by = root + AND = { + is_at_war = yes + any_character_war = { + OR = { + primary_attacker = root + primary_defender = root + } + } + } + } + } + } + + immediate = { + add_to_variable_list = { #error suppresion + name = legitimist_supporters + target = root + } + } + + on_trigger_fail = { + trigger_event = { + id = ep3_laamps.8110 + days = { 1 2 } + } + } + + option = { #gimmie ur lunch monies, pacta sunt servanta + name = ep3_laamps.8108.a + if = { + limit = { + scope:petitioned_ruler.var:legitimist_obligations_left > 1 + } + custom_tooltip = ep3_laamps.8108.payments_left + } + else = { + custom_tooltip = ep3_laamps.8108.no_payments_left + scope:petitioned_ruler = { + remove_variable = legitimist_obligations_left + remove_character_flag = legitimist_supporter + } + add_to_variable_list = { + name = legitimist_payed_supporters + target = scope:petitioned_ruler + } + scope:petitioned_ruler = { + remove_hook = { + target = root + } + } + } + + if = { + limit = { + monthly_character_income <= 50 + } + custom_tooltip = ep3_laamps.8108.legitimist_too_poor + } + + pay_short_term_gold = { + target = scope:petitioned_ruler + gold = { + value = monthly_character_income + multiply = 6 + min = 300 + } + } + add_legitimacy = medium_legitimacy_gain + scope:petitioned_ruler = { + change_variable = { + name = legitimist_obligations_left + subtract = 1 + } + } + + if = { + limit = { + scope:petitioned_ruler.var:legitimist_obligations_left > 1 + } + trigger_event = { + id = ep3_laamps.8111 + months = { 18 20 } + } + } + + ai_chance = { + base = 100 + } + } + + option = { #Alas, I cannot pay you now, but I will in the future + name = ep3_laamps.8108.b + custom_tooltip = ep3_laamps.8108.b.desc + + duel = { + target = scope:petitioned_ruler + skill = stewardship + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamps.8108.b.success + send_interface_toast = { + title = ep3_laamps.8108.b.success + left_icon = scope:petitioned_ruler + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_laamps.8108.b.failure + send_interface_toast = { + title = ep3_laamps.8108.b.failure + left_icon = scope:petitioned_ruler + add_legitimacy = medium_legitimacy_loss + } + } + } + trigger_event = { + id = ep3_laamps.8111 + months = { 6 7 } + } + if = { + limit = { + scope:petitioned_ruler.var:legitimist_obligations_left > 1 + } + custom_tooltip = ep3_laamps.8108.payments_left + } + else = { + custom_tooltip = ep3_laamps.8108.no_payments_left + } + } + + option = { #GET REKKED + name = ep3_laamps.8108.c + custom_tooltip = ep3_laamps.8108.c.desc + add_legitimacy = massive_legitimacy_loss + add_prestige_level = -1 + trigger_event = { + id = ep3_laamps.8107 + months = { 1 2 } + } + } +} + +#you have died, but you still have obligations to pay - reminder - ??? +ep3_laamps.8109 = { + type = letter_event + opening = ep3_laamps.8109.t + desc = ep3_laamps.8109.desc + sender = scope:petitioned_ruler + + option = { #gulp + name = ep3_laamps.8109.a + custom_tooltip = ep3_laamps.8109.a.desc + + trigger_event = { + id = ep3_laamps.8111 + months = { 6 7 } + } + } +} + +#something has happened to your benefactor, the debt has disappeared in the midst of time + +ep3_laamps.8110 = { + type = character_event + title = ep3_laamps.8110.t + desc = { + desc = ep3_laamps.8110.desc_intro + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:petitioned_ruler = { + is_at_war = yes + any_character_war = { + OR = { + primary_attacker = root + primary_defender = root + } + } + } + } + desc = ep3_laamps.8110.desc_war + } + triggered_desc = { + trigger = { scope:petitioned_ruler = { is_imprisoned_by = root } } + desc = ep3_laamps.8110.desc_imprisoned + } + triggered_desc = { + trigger = { + scope:petitioned_ruler = { + is_alive = no + killer ?= root + } + } + desc = ep3_laamps.8110.desc_killer_root + } + triggered_desc = { + trigger = { scope:petitioned_ruler = { is_alive = no } } + desc = ep3_laamps.8110.desc_dead + } + triggered_desc = { + trigger = { scope:petitioned_ruler = { is_landed = no } } + desc = ep3_laamps.8110.desc_unlanded + } + } + } + desc = ep3_laamps.8110.desc_outro + } + + theme = stewardship + override_background = { reference = study } + + left_portrait = { + character = root + animation = manic + } + + lower_right_portrait = { + character = scope:petitioned_ruler + } + + option = { #huzzah! + name = ep3_laamps.8110.a + stress_impact = { + base = medium_stress_loss + greedy = massive_stress_loss + } + add_to_variable_list = { + name = legitimist_payed_supporters + target = scope:petitioned_ruler + } + } +} + +ep3_laamps.8111 = { + hidden = yes + + immediate = { + trigger_event = { + id = ep3_laamps.8108 + months = 6 + } + save_scope_value_as = { + name = incoming_payment_value + value = { + value = monthly_character_income + multiply = 6 + min = 300 + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps.8111.t + left_icon = scope:petitioned_ruler + custom_tooltip = ep3_laamps.8111.desc + } + } +} + +#Interesting Personas LAAMP buildings assorted event + +ep3_laamps.8200 = { + type = character_event + title = ep3_laamps.8200.t + desc = { + random_valid = { + triggered_desc = { + trigger = { scope:char_spawn_type = flag:porters } #porters - himbos + desc = ep3_laamps.8200.desc_1 + } + triggered_desc = { + trigger = { scope:char_spawn_type = flag:fools } #capering fools - fools + desc = ep3_laamps.8200.desc_2 + } + triggered_desc = { + trigger = { scope:char_spawn_type = flag:locals } #hangers on - local ethos people + desc = ep3_laamps.8200.desc_3 + } + } + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:porters + } + animation = admiration + } + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:fools + } + animation = laugh + } + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:locals + } + animation = personality_rational + } + } + right_portrait = { + character = scope:new_person + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:porters + } + animation = hero_flex + } + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:fools + } + animation = dancing + } + triggered_animation = { + trigger = { + scope:char_spawn_type = flag:locals + } + animation = beg + } + triggered_outfit = { + trigger = { scope:char_spawn_type = flag:porters } + outfit_tags = { beggar_rags } + } + triggered_outfit = { + trigger = { scope:char_spawn_type = flag:fools } + outfit_tags = { jester_outfit } + } + } + + override_background = { + reference = bp1_bonfire + } + + trigger = { + NOT = { + has_character_flag = had_ep3_laamps_8200 + } + has_government = landless_adventurer_government + is_available_adult = yes + domicile ?= { + OR = { + has_domicile_parameter = camp_recruit_porters_events + has_domicile_parameter = camp_recruit_fool_events + has_domicile_parameter = camp_recruit_locals_events + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + domicile ?= { + has_domicile_parameter = camp_recruit_porters_events + } + } + modifier = { + add = 0.5 + domicile ?= { + has_domicile_parameter = camp_recruit_fool_events + } + } + modifier = { + add = 0.5 + domicile ?= { + has_domicile_parameter = camp_recruit_locals_events + } + } + } + + immediate = { + location = { + save_scope_as = location + } + location.county = { + save_scope_as = location_county + } + location.county.holder.top_liege = { + save_scope_as = location_top_liege + } + if = { + limit = { + domicile ?= { + has_domicile_parameter = camp_recruit_porters_events + } + } + save_scope_value_as = { + name = porters + value = flag:porters + } + scope:porters = { + add_to_temporary_list = spawn_type_selection + } + } + if = { + limit = { + domicile ?= { + has_domicile_parameter = camp_recruit_fool_events + } + } + save_scope_value_as = { + name = fools + value = flag:fools + } + scope:fools = { + add_to_temporary_list = spawn_type_selection + } + } + if = { + limit = { + domicile ?= { + has_domicile_parameter = camp_recruit_locals_events + } + } + save_scope_value_as = { + name = locals + value = flag:locals + } + scope:locals = { + add_to_temporary_list = spawn_type_selection + } + } + random_in_list = { + list = spawn_type_selection + save_scope_as = char_spawn_type + } + if = { + limit = { + scope:char_spawn_type = flag:porters + } + #create a porter himbo + create_character = { + location = scope:location + age = { 18 28 } + random_traits_list = { + count = 1 + education_martial_prowess_2 = {} + education_martial_prowess_3 = {} + } + random_traits_list = { + count = 1 + brave = {} + diligent = {} + humble = {} + } + random_traits_list = { + honest = {} + gregarious = {} + trusting = {} + compassionate = {} + generous = {} + calm = {} + } + random_traits_list = { + count = 1 + lustful = {} + chaste = {} + wrathful = {} + arrogant = {} + impatient = {} + patient = {} + impatient = {} + ambitious = {} + cynical = {} + zealous = {} + stubborn = {} + } + random_traits = no + martial = { + min_template_low_skill + max_template_low_skill + } + prowess = { + min_template_high_skill + max_template_high_skill + } + faith = location.faith + culture = location.culture + gender_female_chance = { + add = 25 + } + save_scope_as = new_person + } + + hidden_effect = { + scope:new_person = { + random_list = { + 2 = { + add_trait = intellect_bad_2 + add_trait = physique_good_1 + add_trait = strong + } + 2 = { + add_trait = strong + } + 2 = { + add_trait = strong + add_trait = giant + } + 2 = { + add_trait = intellect_bad_1 + add_trait = giant + } + 1 = { + add_trait = giant + add_trait = physique_good_2 + add_trait = strong + } + } + } + } + } + else_if = { + limit = { + scope:char_spawn_type = flag:fools + } + create_character = { + template = poet_template + location = root.location + save_scope_as = new_person + } + hidden_effect = { + scope:new_person = { + add_trait = fecund + add_trait = lifestyle_traveler + add_trait = loyal + } + } + } + else_if = { + limit = { + scope:char_spawn_type = flag:locals + } + create_character = { + template = merchant_template + location = root.location + save_scope_as = new_person + } + hidden_effect = { + scope:new_person = { + random_list = { + 8 = { + add_trait = shrewd + } + 1 = { + add_trait = intellect_good_1 + } + 1 = { + add_trait = intellect_good_2 + } + } + } + } + } + + add_character_flag = { + flag = had_ep3_laamps_8200 + years = 4 + } + } + + option = { #welcome, weary traveler + name = ep3_laamps.8200.a + add_courtier = scope:new_person + add_character_flag = { + flag = had_ep3_laamps_8200 + years = 4 + } + + ai_chance = 100 + + stress_impact = { + compassionate = minor_stress_loss + } + } + + option = { #please go away + name = ep3_laamps.8200.b + add_character_flag = { + flag = had_ep3_laamps_8200 + years = 2 + } + scope:new_person = { + silent_disappearance_effect = yes + } + + stress_impact = { + paranoid = medium_stress_loss + shy = medium_stress_loss + } + } + + option = { #don't bother me again for the next 20 years! + name = ep3_laamps.8200.c + add_character_flag = { + flag = had_ep3_laamps_8200 + years = 20 + } + scope:new_person = { + silent_disappearance_effect = yes + } + stress_impact = { + wrathful = medium_stress_loss + paranoid = major_stress_loss + shy = major_stress_loss + } + } +} + + diff --git a/N3OW/events/dlc/ep3/ep3_laamp_flavor.txt b/N3OW/events/dlc/ep3/ep3_laamp_flavor.txt new file mode 100644 index 00000000..3e16fda5 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_laamp_flavor.txt @@ -0,0 +1,1118 @@ +namespace = ep3_laamp_flavor + +#### +# ep3_laamp_flavor.0001-0010 - Carrion Eaters +# ep3_laamp_flavor.0020-0029 - Thief! +# ep3_laamp_flavor.0030-0039 - Pleasant Dream +# ep3_laamp_flavor.0040-0049 - Stray Prince +# ep3_laamp_flavor.0050-0059 - Necromancer +# ep3_laamp_flavor.0060-0069 - Dead Weight +#### + +################################################## +# Carrion Eaters +# by Daniel Tolman +################################################## + +scripted_trigger ep3_laamp_flavor_0001_is_in_desert = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } +} + +# Carrion Eaters +ep3_laamp_flavor.0001 = { + type = character_event + title = { + first_valid = { + # Carrion Eaters + triggered_desc = { + trigger = { + OR = { + ep3_laamp_flavor_0001_is_in_desert = yes + location = { + is_sea_province = yes + } + } + } + desc = ep3_laamp_flavor.0001.t1 + } + # Eating Crow + desc = ep3_laamp_flavor.0001.t2 + } + } + desc = { + first_valid = { + # Vultures in the desert + triggered_desc = { + trigger = { + ep3_laamp_flavor_0001_is_in_desert = yes + } + desc = ep3_laamp_flavor.0001.desc1 + } + # Gulls in the ocean + triggered_desc = { + trigger = { + location = { + is_sea_province = yes + } + } + desc = ep3_laamp_flavor.0001.desc2 + } + # Generic crows + desc = ep3_laamp_flavor.0001.desc + } + } + theme = travel_danger + left_portrait = { + character = root + animation = sick_stomach + } + right_portrait = { + character = scope:vulture_shooter + scripted_animation = bow_drawn + camera = camera_event_right_forward + } + cooldown = { years = 10 } + + trigger = { + government_has_flag = government_is_landless_adventurer + faith = { + NOR = { + religion = religion:jainism_religion + religion = religion:islam_religion + } + } + domicile ?= { provisions <= provisions_low_value } + is_available_travelling_adult = yes + NOT = { has_trait = ill } + any_courtier = { + is_available_travelling_ai_adult = yes + } + } + + immediate = { + hidden_effect = { + change_current_weight = -25 + every_courtier = { + change_current_weight = -25 + } + } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_tolman_0001 + VAL = 1 + } + } + ordered_courtier = { + limit = { + is_available_travelling_ai_adult = yes + is_valid_active_event_recurrer_trigger = { LIEGE = ROOT } + } + alternative_limit = { + is_available_travelling_ai_adult = yes + } + order_by = prowess + save_scope_as = vulture_shooter + } + } + + option = { # good idea + name = { + trigger = { + NOT = { has_trait = cannibal } + } + text = ep3_laamp_flavor.0001.a + } + name = { + trigger = { has_trait = cannibal } + text = ep3_laamp_flavor.0001.a.cannibal + } + trait = cannibal + progress_towards_friend_effect = { + REASON = agreed_to_shoot_vultures + CHARACTER = scope:vulture_shooter + OPINION = default_friend_opinion + } + random_list = { + 1 = { # get sick + desc = ep3_laamp_flavor.0001.sick + send_interface_toast = { + title = ep3_laamp_flavor.0001.a.sick + left_icon = root + right_icon = scope:vulture_shooter + + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + scope:vulture_shooter = { contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } } + domicile = { change_provisions = miniscule_provisions_gain } + } + } + 1 = { # don't get sick + desc = ep3_laamp_flavor.0001.notsick + send_interface_toast = { + title = ep3_laamp_flavor.0001.a.fine + left_icon = root + right_icon = scope:vulture_shooter + domicile = { change_provisions = minor_provisions_gain } + } + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + option = { # this will make us sick + name = ep3_laamp_flavor.0001.c + trigger = { + learning >= decent_skill_rating + } + skill = learning + add_learning_lifestyle_xp = medium_lifestyle_experience + add_character_modifier = { + modifier = emaciated_modifier + years = 3 + } + ai_chance = { # AI should generally pick this if able + base = 100 + } + } + option = { # no that sounds gross + name = ep3_laamp_flavor.0001.b + progress_towards_rival_effect = { + REASON = no_vulture_eating + CHARACTER = scope:vulture_shooter + OPINION = default_rival_opinion + } + add_character_modifier = { + modifier = emaciated_modifier + years = 3 + } + ai_chance = { # Even if not especially learned, this is gross and sensible people should have some innate resistance to this idea + base = 1 + ai_value_modifier = { + ai_rationality = 2 + } + } + } +} + +################################################## +# Thief! +# by Daniel Tolman +################################################## + +scripted_trigger ep3_laamp_flavor_0020_valid_courtier = { + NOR = { + has_trait = just + has_trait = honest + } + OR = { + has_trait = greedy + has_trait = deceitful + has_trait = arbitrary + has_trait = eccentric + has_trait = profligate + has_trait = fickle + has_trait = callous + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 10 + } + } +} + +# Follower caught stealing in local town +ep3_laamp_flavor.0020 = { + type = character_event + title = ep3_laamp_flavor.0020.t + desc = { + desc = ep3_laamp_flavor.0020.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = gallowsbait + } + desc = ep3_laamp_flavor.0020.desc1 + } + desc = ep3_laamp_flavor.0020.desc + } + } + theme = unfriendly + left_portrait = { + character = scope:thieving_follower + animation = fear + } + right_portrait = { + character = scope:town_leader + animation = disapproval + } + lower_right_portrait = { + character = scope:duelist + trigger = { + this != scope:town_leader + } + } + override_background = { reference = gallows } + + cooldown = { years = 10 } + + trigger = { + has_government = landless_adventurer_government + location = { + has_holding = yes + } + is_available_at_peace_adult = yes + any_courtier = { + is_available_ai_adult = yes + ep3_laamp_flavor_0020_valid_courtier = yes + } + location.barony.holder = { + is_available_at_peace_ai_adult = yes + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_tolman_0020 + VAL = 1 + } + } + random_courtier = { + limit = { + is_valid_active_event_recurrer_trigger = { LIEGE = ROOT } + is_available_at_peace_adult = yes + ep3_laamp_flavor_0020_valid_courtier = yes + } + alternative_limit = { + is_available_ai_adult = yes + ep3_laamp_flavor_0020_valid_courtier = yes + } + save_scope_as = thieving_follower + } + location.barony.holder = { + save_scope_as = town_leader + if = { + limit = { exists = court_position:champion_court_position } + court_position:champion_court_position = { save_scope_as = duelist } + } + else = { save_scope_as = duelist } + } + location = { + save_scope_as = town_location + } + } + + # Pay the fine + option = { + name = ep3_laamp_flavor.0020.a + if = { + limit = { + has_trait = gallowsbait + } + pay_short_term_gold = { + target = scope:town_leader + gold = major_gold_value + } + stress_impact = { + greedy = major_stress_impact_gain + } + } + else = { + pay_short_term_gold = { + target = scope:town_leader + gold = medium_gold_value + } + stress_impact = { + greedy = medium_stress_impact_gain + } + } + progress_towards_friend_effect = { + REASON = thievery_helper_opinion + CHARACTER = scope:thieving_follower + OPINION = default_friend_opinion + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -1 + } + } + } + + # Thief must accept physical punishment + option = { + name = ep3_laamp_flavor.0020.b + if = { + limit = { + has_trait = gallowsbait + } + scope:thieving_follower = { + apply_maimed_trait_and_modifier_effect = yes + } + } + else = { + scope:thieving_follower = { + add_trait = wounded_1 + } + } + progress_towards_rival_effect = { + REASON = thievery_rivalry_opinion + CHARACTER = scope:thieving_follower + OPINION = default_rival_opinion + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + # Plead with town_leader + option = { + name = ep3_laamp_flavor.0020.c + trigger = { + scope:town_leader = { + opinion = { + target = root + value >= low_negative_opinion + } + } + } + if = { + limit = { + scope:town_leader = { + can_add_hook = { + target = root + type = indebted_hook + } + } + } + scope:town_leader = { + add_hook = { + target = root + type = indebted_hook + } + } + } + if = { + limit = { + has_trait = gallowsbait + } + add_prestige = major_prestige_loss + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + } + else = { + add_prestige = medium_prestige_loss + stress_impact = { + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + callous = medium_stress_impact_gain + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = -1 + } + } + } + # Demand a trial by combat + option = { + name = ep3_laamp_flavor.0020.d + duel = { + skill = prowess + target = scope:duelist + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavor.0020.d.tt.success + send_interface_toast = { + title = ep3_laamp_flavor.0020.d.tt.success + left_icon = scope:thieving_follower + progress_towards_friend_effect = { + REASON = thievery_helper_opinion + CHARACTER = scope:thieving_follower + OPINION = default_friend_opinion + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavor.0020.d.tt.fail + send_interface_toast = { + title = ep3_laamp_flavor.0020.d.tt.fail + left_icon = scope:thieving_follower + add_prestige = medium_prestige_loss + scope:thieving_follower = { + scope:thieving_follower = { + apply_maimed_trait_and_modifier_effect = yes + } + } + } + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 2 + } + } + } +} + +################################################## +# Sweet Dreams +# by Daniel Tolman +################################################## + +# Sweet Dreams +ep3_laamp_flavor.0030 = { + type = character_event + title = ep3_laamp_flavor.0030.t + desc = ep3_laamp_flavor.0030.desc + theme = court + left_portrait = { + character = scope:dream_friend + animation = toast_goblet + } + right_portrait = { + character = scope:dream_rival + animation = paranoia + outfit_tags = { beggar_rags } + } + override_background = { reference = feast } + + cooldown = { years = 10 } + + trigger = { + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + any_relation = { + type = friend + } + any_relation = { + type = rival + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_tolman_0030 + VAL = 1 + } + } + random_relation = { + type = friend + save_scope_as = dream_friend + } + random_relation = { + type = rival + save_scope_as = dream_rival + } + } + + # I will make my dream a reality + option = { + name = ep3_laamp_flavor.0030.a + # Stress gain but more lifestyle xp + add_character_modifier = { + modifier = dream_ambitious + years = 10 + } + stress_impact = { + base = miniscule_stress_impact_loss + ambitious = minor_stress_impact_loss + impatient = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + # I long for the comforts of nobility + option = { + name = ep3_laamp_flavor.0030.b + # Stress but more diplomacy + add_character_modifier = { + modifier = dream_envious + years = 10 + } + stress_impact = { + base = miniscule_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + lazy = minor_stress_impact_loss + greedy = minor_stress_impact_loss + avaricious = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = -0.5 + } + } + } + + # I'm glad I'm free of that life + option = { + name = ep3_laamp_flavor.0030.c + # less stress, you're happy with your life + add_character_modifier = { + modifier = dream_content + years = 10 + } + stress_impact = { + base = miniscule_stress_impact_loss + temperate = minor_stress_impact_loss + calm = minor_stress_impact_loss + humble = minor_stress_impact_loss + content = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +################################################## +# Lost Lordling +# by Daniel Tolman +################################################## + +# Lost Lordling +ep3_laamp_flavor.0040 = { + type = character_event + title = ep3_laamp_flavor.0040.t + desc = ep3_laamp_flavor.0040.desc + theme = landless_adventurer + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:runaway_child + animation = crying + } + + cooldown = { years = 20 } + + trigger = { + has_government = landless_adventurer_government + is_available_at_peace_adult = yes + exists = location.barony.holder.capital_province + location = location.barony.holder.capital_province + location.barony.holder = { + save_temporary_scope_as = local_ruler_temp + highest_held_title_tier <= tier_county + is_available_at_peace_ai_adult = yes + any_courtier = { + is_child_of = scope:local_ruler_temp + NOT = { is_primary_heir_of = scope:local_ruler_temp } + age >= 12 + age < 23 + is_available_allow_travelling = yes + is_physically_able = yes + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_tolman_0040 + VAL = 1 + } + } + location = { + save_scope_as = location_scope + } + location.barony.holder = { + save_scope_as = local_ruler + random_courtier = { + limit = { + is_child_of = scope:local_ruler + NOT = { is_primary_heir_of = scope:local_ruler } + age >= 12 + age < 23 + is_available_allow_travelling = yes + is_physically_able = yes + } + save_scope_as = runaway_child + } + } + } + + # Join our merry band + option = { + name = ep3_laamp_flavor.0040.b + add_courtier = scope:runaway_child + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = -0.25 + } + } + } + + # Capture the child, they might be worth a good ransom + option = { + name = ep3_laamp_flavor.0040.c + imprison = { + target = scope:runaway_child + type = house_arrest + } + reverse_add_opinion = { + target = scope:local_ruler + modifier = stole_my_child_opinion + opinion = -50 + } + laamp_rewards_apply_criminal_xp_effect = { + TRACK = marauder + XP_MIN = gallowsbait_xp_minor_gain + XP_MAX = gallowsbait_xp_minor_gain + } + stress_impact = { + callous = minor_stress_impact_loss + greedy = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -1 + ai_greed = 1 + } + } + } + + # We're taking you home + option = { + name = ep3_laamp_flavor.0040.a + reverse_add_opinion = { + target = scope:local_ruler + modifier = returned_my_child_opinion + opinion = 50 + } + if = { + limit = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 1 + } + } + laamp_rewards_apply_criminal_xp_effect = { + TRACK = marauder + XP_MIN = negative_small_lifestyle_random_xp_low + XP_MAX = negative_small_lifestyle_random_xp_low + } + } + add_prestige = minor_prestige_gain + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = 0.25 + ai_honor = 0.75 + ai_greed = 0.25 + } + } + } +} + +################################################## +# Necromancer +# by Daniel Tolman +################################################## + +# Necromancer +ep3_laamp_flavor.0050 = { + type = character_event + title = ep3_laamp_flavor.0050.t + desc = ep3_laamp_flavor.0050.desc + theme = landless_adventurer + right_portrait = { + character = root + animation = shock + } + left_portrait = { + character = scope:necromancer + animation = page_flipping + } + override_background = { reference = bp1_bonfire } + + cooldown = { years = 30 } + + trigger = { + location = { is_sea_province = no } + static_group_filter = { + group = ep3_laamp_flavor.0050 + match = 0.5 + } + has_government = landless_adventurer_government + is_adult = yes + is_available_allow_travelling = yes + faith = { religion_tag = christianity_religion } + location.faith = { religion_tag = christianity_religion } + NOR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_tolman_0050 + VAL = 1 + } + } + location = { + save_scope_as = location_scope + } + create_character = { + template = priest_character_template + culture = root.location.culture + faith = root.location.faith + dynasty = none + location = root.location + gender = male + save_scope_as = necromancer + } + hidden_effect = { + scope:necromancer = { + add_trait = devoted + remove_character_flag = need_priest_outfit + } + } + if = { + limit = { + player_heir ?= { + is_courtier_of = root + is_child_of = root + } + } + player_heir = { + save_scope_as = player_heir_scope + } + } + } + + # Your foul sorcery ends here + option = { + name = ep3_laamp_flavor.0050.a + add_piety = minor_piety_gain + duel = { + skill = prowess + target = scope:necromancer + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavor.0050.d.tt.success + send_interface_toast = { + title = ep3_laamp_flavor.0050.d.tt.success + left_icon = scope:necromancer + add_prestige = minor_prestige_gain + add_piety = minor_piety_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavor.0050.d.tt.fail + send_interface_toast = { + title = ep3_laamp_flavor.0050.d.tt.fail + left_icon = scope:necromancer + add_trait = wounded_1 + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -0.75 + } + } + } + + # Teach me magic + option = { + name = ep3_laamp_flavor.0050.b + add_character_modifier = { + modifier = learned_in_demonology + years = 10 + } + stress_impact = { + zealous = medium_stress_impact_gain + cynical = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = 0.25 + ai_zeal = -1 + ai_rationality = -0.5 + } + } + } + + # Teach my heir magic + option = { + name = ep3_laamp_flavor.0050.c + trigger = { + exists = scope:player_heir_scope + } + stress_impact = { + zealous = medium_stress_impact_gain + cynical = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + scope:player_heir_scope = { + add_character_modifier = { + modifier = learned_in_demonology + years = 10 + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = 0.25 + ai_zeal = -1 + ai_rationality = -0.5 + } + } + } + + # 3spooky5me + option = { + name = ep3_laamp_flavor.0050.d + stress_impact = { + craven = minor_stress_impact_loss + } + add_prestige = minor_prestige_loss + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -1 + } + } + } + after = { + if = { + limit = { + is_ai = yes + } + scope:necromancer = { + silent_disappearance_effect = yes + } + } + } +} + +################################################## +# Dead Weight +# by Daniel Tolman +################################################## + +# Dead Weight +ep3_laamp_flavor.0060 = { + type = character_event + title = ep3_laamp_flavor.0060.t + desc = ep3_laamp_flavor.0060.desc + theme = travel_danger + right_portrait = { + character = scope:follower + animation = anger + } + left_portrait = { + character = scope:prisoner + animation = prisonhouse + } + + cooldown = { years = 10 } + + trigger = { + has_government = landless_adventurer_government + domicile ?= { provisions <= provisions_threshold_low_value } + is_available_travelling_adult = yes + any_courtier = { is_available_travelling_ai_adult = yes } + any_prisoner = { + age >= 6 + is_ai = yes + } + } + + immediate = { + hidden_effect = { + change_current_weight = -25 + every_courtier = { + change_current_weight = -25 + } + } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_tolman_0060 + VAL = 1 + } + } + random_courtier = { + # Get a recurring character if one exists that is suitably angry + limit = { + is_available_travelling_ai_adult = yes + is_valid_active_event_recurrer_trigger = { LIEGE = ROOT } + OR = { + has_trait = vengeful + has_trait = wrathful + } + } + # Otherwise, a random follower just snaps + alternative_limit = { is_available_travelling_ai_adult = yes } + save_scope_as = follower + } + random_prisoner = { + limit = { + age >= 6 + is_ai = yes + } + save_scope_as = prisoner + } + } + + # Execute the prisoner + option = { + name = ep3_laamp_flavor.0060.a + execute_prisoner_effect = { + VICTIM = scope:prisoner + EXECUTIONER = root + } + reverse_add_opinion = { + target = scope:follower + modifier = grateful_opinion + opinion = 25 + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -2 + ai_honor = -2 + } + } + } + + # You don't have to go home but you can't stay here + option = { + name = ep3_laamp_flavor.0060.b + scope:prisoner = { release_from_prison = yes } + # you experience a loss of kidnapper street cred + if = { + limit = { + has_trait = gallowsbait + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 1 + } + } + laamp_rewards_apply_criminal_xp_effect = { + TRACK = marauder + XP_MIN = negative_small_lifestyle_random_xp_low + XP_MAX = negative_small_lifestyle_random_xp_low + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_compassion = 1 + } + } + } + + # The prisoner is too valuable + option = { + name = ep3_laamp_flavor.0060.c + # your followers don't like giving the prisoner rations + add_character_modifier = { + modifier = burdensome_prisoner_modifier + years = 10 + } + # follower is especially annoyed + reverse_add_opinion = { + modifier = unfriendly_opinion + target = scope:follower + opinion = -35 + } + domicile = { change_provisions = minor_provisions_loss } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_laamp_flavor_oltner.txt b/N3OW/events/dlc/ep3/ep3_laamp_flavor_oltner.txt new file mode 100644 index 00000000..0d20460c --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_laamp_flavor_oltner.txt @@ -0,0 +1,328 @@ +namespace = ep3_laamp_flavor_oltner + +scripted_trigger suitable_pool_marriage_trigger = { + save_temporary_scope_as = pool_marriage_target + is_physically_able_adult = yes + allowed_to_marry_character_gender_trigger = { CHARACTER = $FOLLOWER_TARGET$ } + $FOLLOWER_TARGET$ ?= { allowed_to_marry_character_gender_trigger = { CHARACTER = prev } } + are_characters_sensible_lovers_trigger = { INSTIGATING_LOVER = $FOLLOWER_TARGET$ TARGET_OF_LOVE = scope:pool_marriage_target } + is_married = no + can_marry_trigger = yes + is_concubine = no + NOT = { + exists = betrothed + } + has_no_particular_noble_roots_trigger = yes +} + +scripted_trigger suitable_follower_marriage_character_trigger = { + is_physically_able_adult = yes + this != root + is_married = no + can_marry_trigger = yes + is_concubine = no + age <= 50 + health >= fine_health + NOR = { + house = root.house + is_close_family_of = root + exists = betrothed + has_relation_rival = root + } + save_temporary_scope_as = entourage_member + any_pool_character = { + province = root.location + age <= 40 + health >= fine_health + suitable_pool_marriage_trigger = { FOLLOWER_TARGET = scope:entourage_member } + } +} + +# A Follower's Heart +ep3_laamp_flavor_oltner.0001 = { + type = character_event + title = ep3_laamp_flavor_oltner.3001.t + desc = ep3_laamp_flavor_oltner.3001.desc + theme = marriage + override_background = { reference = market_scope } + left_portrait = { + character = scope:entourage_to_marry_2 + animation = beg + camera = camera_event_very_left + } + right_portrait = { + character = scope:marriage_material + animation = dismissal + camera = camera_event_right_pointing_left + } + cooldown = { years = 10 } + + trigger = { + has_government = landless_adventurer_government + location = { + has_holding = yes + } + any_courtier = { + suitable_follower_marriage_character_trigger = yes + } + } + + immediate = { + save_scope_as = root_char + random_courtier = { + limit = { + suitable_follower_marriage_character_trigger = yes + } + save_scope_as = entourage_to_marry_2 + } + random_pool_character = { + province = root.location + limit = { + suitable_pool_marriage_trigger = { FOLLOWER_TARGET = scope:entourage_to_marry_2 } + } + save_scope_as = marriage_material + } + location.county.title_province = { save_scope_as = background_market_scope } + } + + option = { # Tell them to pay it themselves + name = ep3_laamp_flavor_oltner.0001.a + + trigger = { + scope:entourage_to_marry_2.gold >= { + add = scope:marriage_material.sum_of_all_skills_and_prowess_value + } + } + + scope:entourage_to_marry_2 = { + remove_short_term_gold = { + add = scope:marriage_material.sum_of_all_skills_value + add = scope:marriage_material.prowess + } + } + + add_courtier = scope:marriage_material + scope:entourage_to_marry_2 = { + if = { + limit = { + is_female = yes + is_lowborn = no + scope:marriage_material = { + is_lowborn = yes + } + } + marry_matrilineal = scope:marriage_material + } + else_if = { + limit = { + is_male = yes + is_lowborn = yes + scope:marriage_material = { + is_lowborn = no + } + } + marry_matrilineal = scope:marriage_material + } + else = { + marry = scope:marriage_material + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Pay the dowry + name = ep3_laamp_flavor_oltner.0001.b + stress_impact = { + generous = massive_stress_impact_loss + greedy = medium_stress_impact_gain + } + + remove_short_term_gold = { + add = scope:marriage_material.sum_of_all_skills_and_prowess_value + } + + add_courtier = scope:marriage_material + scope:entourage_to_marry_2 = { + if = { + limit = { + is_female = yes + is_lowborn = no + scope:marriage_material = { + is_lowborn = yes + } + } + marry_matrilineal = scope:marriage_material + } + else_if = { + limit = { + is_male = yes + is_lowborn = yes + scope:marriage_material = { + is_lowborn = no + } + } + marry_matrilineal = scope:marriage_material + } + else = { + marry = scope:marriage_material + } + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 0 + REASON = friend_helped_me_marry + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + } + + scope:marriage_material = { save_scope_as = relationship_reason_involved_character } + + clear_saved_scope = relationship_reason_involved_character + + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + has_trait = greedy + gold <= { + add = scope:marriage_material.sum_of_all_skills_and_prowess_value + multiply = 2 + } + } + } + } + } + + option = { # Convince them to run away with you + name = ep3_laamp_flavor_oltner.0001.c + skill = intrigue + stress_impact = { + generous = medium_stress_impact_gain + } + + duel = { + skill = intrigue + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_laamp_flavor_oltner.0001.c.success + send_interface_toast = { + title = ep3_laamp_flavor_oltner.0001.c.success + left_icon = scope:entourage_to_marry_2 + right_icon = scope:marriage_material + add_courtier = scope:marriage_material + scope:entourage_to_marry_2 = { + if = { + limit = { + is_female = yes + is_lowborn = no + scope:marriage_material = { + is_lowborn = yes + } + } + marry_matrilineal = scope:marriage_material + } + else_if = { + limit = { + is_male = yes + is_lowborn = yes + scope:marriage_material = { + is_lowborn = no + } + } + marry_matrilineal = scope:marriage_material + } + else = { + marry = scope:marriage_material + } + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 0 + REASON = friend_helped_me_marry + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + } + + scope:marriage_material = { save_scope_as = relationship_reason_involved_character } + clear_saved_scope = relationship_reason_involved_character + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_laamp_flavor_oltner.0001.c.failure + send_interface_toast = { + title = ep3_laamp_flavor_oltner.0001.c.failure + left_icon = scope:entourage_to_marry_2 + right_icon = scope:marriage_material + scope:entourage_to_marry_2 = { + add_stress = medium_stress_gain + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + } + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 0 + has_trait = generous + } + } + } + + option = { # Ignore your follower + name = ep3_laamp_flavor_oltner.0001.d + stress_impact = { + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + chaste = minor_stress_impact_loss + shy = minor_stress_impact_loss + } + scope:entourage_to_marry_2 = { + add_opinion = { + target = root + modifier = heartbroken_opinion + opinion = -30 + } + } + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + } + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt b/N3OW/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt new file mode 100644 index 00000000..78bafad7 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_laamp_flavour_ewan_events.txt @@ -0,0 +1,23648 @@ +@ep3_laamp_flavour_ewan_event_cooldown = 10 +@ep3_laamp_flavour_ewan_event_cooldown_shorter = 2 +@ep3_laamp_flavour_ewan_event_cooldown_short = 5 +@ep3_laamp_flavour_ewan_event_cooldown_long = 20 +@ep3_laamp_flavour_ewan_event_cooldown_longer = 35 +@ep3_laamp_flavour_ewan_event_cooldown_longest = 70 + +@ep3_laamp_flavour_ewan_baggage_train_has_significant_armed_force = 2000 +@ep3_laamp_flavour_ewan_baggage_train_has_very_significant_armed_force = 4000 + +@ep3_laamp_flavour_ewan_1001_dynasty_prestige_level = 3 +@ep3_laamp_flavour_ewan_1041_years_since_rule = 5 +@ep3_laamp_flavour_ewan_1103_age_threshold_young = 6 +@ep3_laamp_flavour_ewan_1103_age_threshold_older = 12 +@ep3_laamp_flavour_ewan_4000_min_provisions_worth_attacking = 75 +@ep3_laamp_flavour_ewan_4051_minimum_provisions_count = 150 + +namespace = ep3_laamp_flavour_ewan + +################################################## +# #SIMPLE JOYS +# 0001 - 0010 Pinkish Hues - Watching the sunrise/sunset. +# 0011 - 0020 Fire & Friends - Larks at the campfire. +# 0021 - 0030 A Little Follower - Happy cat or dog follows you. +# 0031 - 0040 Tumbling Down - Stooge falls down hill. +# 0041 - 0050 Travails of a Cook - Recipes on the road. +# 0051 - 0060 A Friendly Clamour - A pleasant evening buzz as the camp settles down. +# 0061 - 0070 An Unexpected Faire - Locals react with impromptu faire. +# 0071 - 0080 Pounding Hooves - Riding with a hangover-stricken friend. +# +# #CHILDREARING +# 1001 - 1010 Friends in Low Places - Highborn befriends a lowborn. +# 1011 - 1020 Learning from Example - Learning from officer. +# 1021 - 1030 Love at First Camp - Crush on a local girl/boy. +# 1031 - 1040 Nurture - Taking after camp purpose. +# 1041 - 1050 The Old Country - Child too young to remember asks what old home was like. +# 1051 - 1060 It Isn't Fair - Child unhappy with life on the road. +# 1061 - 1070 Quick Study - Child picks up local language quickly. +# 1071 - 1080 At the Edge of Camp - Children playing in local terrain. +# 1081 - 1090 Growing Up - Child demands own tent. +# 1091 - 1100 Every Parent's Duty - Teaching a youngling how to ride. +# 1101 - 1110 Helping Out - Child helps with packing. +# 1111 - 1120 A Nose for Trouble - Child adopts puppy. +# +# #PERSONAL TENSIONS +# 2001 - 2010 Plenty in Common - Friendship blooms over shared traits. +# 2011 - 2020 Camp Gossip - Someone shagged someone else's spouse. +# 2021 - 2030 Bound Together - Marriage/concubinage at camp. +# 2031 - 2040 Through with You - Someone who hates you up and leaves. +# 2041 - 2050 Closer Quarters - Lover developing from various sources. +# 2051 - 2060 What's the Point? - Someone abandons bathing. +# 2061 - 2070 My Spot - Fight at dinner over tent pitch location. +# 2071 - 2080 Second-in-Command - People scrabble for empty/ineffectual SiC position. +# 2081 - 2090 A Well-Oiled Machine - Helping each other out at pitch time. +# 2091 - 2100 Crimes of Passion - Followers attack each other. +# +# #CAMP PURPOSE +# 3001 - 3010 Heard of You - Brigands attract cool local criminals, scaled to prestige level. +# 3011 - 3020 Arguing the Toss - Scholars debate a learned follower. +# 3021 - 3030 Over the Horizon - Explorer gets a passion for stories of a distant land, populating contracts there & learning the local language. +# 3031 - 3040 Mine by Right - Legitimist broods & extends their claims. +# 3041 - 3050 People from a Better Time - Old loyalists join legitimist. +# 3051 - 3060 Map Painting - Explorer writes/draws map of local area. +# 3061 - 3070 A Guide to ... - Scholar writes book on local subject. +# 3071 - 3080 The Law in Location.GetNameNoTier - Law attacks criminal gang. +# 3081 - 3090 Wrestle for It - Merc challenged to a wrastlin'. +# +# #TRAVEL DANGER / SUPPLIES +# 4001 - 4010 Bandits! - Bandit raid. +# 4011 - 4020 A Land of Milk & Honey - Bountiful hunting/foraging. +# 4021 - 4030 Parched - Difficulty finding water. +# 4031 - 4040 Sickness in the Herd - Pack animals are sick or wounded. +# 4041 - 4050 Fortuna's Tithe - Bad weather destroys wagons or pack animals. +# 4051 - 4060 Supplies Unaccounted For - Supplies go missing in large armies. +# 4061 - 4070 Eyes in the Night - local predator picking off people each evening. +# 4071 - 4080 Slavers - bastards try to kidnap people from the edges of your train. +# 4081 - 4090 Born of Desperation - hungry locals swarm at you, searching for food. +# 4091 - 4100 Night Attack - unknown group assaults your camp one evening. +# +# #MISC MINOR EVENTS +# 9501 - 9510 Core Tombola - Takes care of returning to camp after a period away. +# 9511 - 9520 Follower Returned - follower comes back to you, mostly the same. +# 9521 - 9530 Not As I Remember You - follower comes back to you, having taken on a local culture/faith. +# 9531 - 9540 Missing Follower - follower fails to come back after a loan. +# 9541 - 9550 Camp Activity Feed Message - something minor happens at camp. +# +# #MAINTENANCE +# 9801 - 9810 General Maintenance - Reserved for w/e turns up. +################################################## + + + + + + + + + + +################################################## +# MISC SCRIPTED TRIGGERS & EFFECTS + +scripted_trigger ep3_laamp_flavour_ewan_available_courtier_trigger = { + is_adult = yes + is_courtier_of = root + location = root.location + is_available_allow_travelling = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_available_child_trigger = { + child_can_have_full_conversations_trigger = yes + is_courtier_of = root + location = root.location + is_available_allow_travelling = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_available_anybody_trigger = { + OR = { + is_adult = yes + child_can_have_full_conversations_trigger = yes + } + is_courtier_of = root + location = root.location + is_available_allow_travelling = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = { + is_adult = yes + location = root.location +} + +scripted_trigger ep3_laamp_flavour_ewan_no_dog_trigger = { + NOR = { + any_owned_story = { type = story_cycle_pet_dog } + has_character_modifier = dog_story_modifier + } +} + +scripted_trigger ep3_laamp_flavour_ewan_no_cat_trigger = { + NOR = { + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } +} + +scripted_effect ep3_laamp_flavour_ewan_clean_up_excess_childhood_traits_effect = { + if = { + limit = { number_of_personality_traits >= 3 } + remove_trait = rowdy + remove_trait = charming + remove_trait = curious + remove_trait = pensive + remove_trait = bossy + } +} + +scripted_effect ep3_laamp_flavour_ewan_register_terrain_effect = { + location = { + switch = { + trigger = terrain + plains = { + save_scope_value_as = { + name = terrain_type + value = flag:plains + } + } + farmlands = { + save_scope_value_as = { + name = terrain_type + value = flag:farmlands + } + } + hills = { + save_scope_value_as = { + name = terrain_type + value = flag:hills + } + } + mountains = { + save_scope_value_as = { + name = terrain_type + value = flag:mountains + } + } + desert = { + save_scope_value_as = { + name = terrain_type + value = flag:desert + } + } + desert_mountains = { + save_scope_value_as = { + name = terrain_type + value = flag:desert_mountains + } + } + oasis = { + save_scope_value_as = { + name = terrain_type + value = flag:oasis + } + } + jungle = { + save_scope_value_as = { + name = terrain_type + value = flag:jungle + } + } + forest = { + save_scope_value_as = { + name = terrain_type + value = flag:forest + } + } + taiga = { + save_scope_value_as = { + name = terrain_type + value = flag:taiga + } + } + wetlands = { + save_scope_value_as = { + name = terrain_type + value = flag:wetlands + } + } + steppe = { + save_scope_value_as = { + name = terrain_type + value = flag:steppe + } + } + floodplains = { + save_scope_value_as = { + name = terrain_type + value = flag:floodplains + } + } + drylands = { + save_scope_value_as = { + name = terrain_type + value = flag:drylands + } + } + } + } +} + + + + + + + + + + + +################################################## +# SIMPLE JOYS + +################################################## +# Pinkish Hues +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_0001_watch_partner_trigger = { + ep3_laamp_flavour_ewan_available_$CONFIG$_trigger = yes + NOT = { has_trait = blind } + opinion = { + target = root + value >= 40 + } + trigger_if = { + limit = { + root = { is_ai = yes } + } + reverse_opinion = { + target = root + value >= 40 + } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_0002_watch_partner_trigger = { + ep3_laamp_flavour_ewan_0001_watch_partner_trigger = { CONFIG = courtier } + NOR = { + is_close_family_of = root + is_consort_of = root + trigger_if = { + limit = { exists = scope:watch_partner_1 } + this = scope:watch_partner_1 + } + } +} + +# Watching the sunset. +ep3_laamp_flavour_ewan.0001 = { + type = character_event + title = ep3_laamp_flavour_ewan.0001.t + desc = { + desc = ep3_laamp_flavour_ewan.0001.desc.intro.preamble + first_valid = { + triggered_desc = { + trigger = { has_trait = lazy } + desc = ep3_laamp_flavour_ewan.0001.desc.intro.lazy + } + triggered_desc = { + trigger = { has_trait = diligent } + desc = ep3_laamp_flavour_ewan.0001.desc.intro.diligent + } + desc = ep3_laamp_flavour_ewan.0001.desc.intro.fallback + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:terrain_type = flag:plains + scope:terrain_type = flag:farmlands + scope:terrain_type = flag:hills + } + } + desc = ep3_laamp_flavour_ewan.0001.desc.midtro.small_hill + } + triggered_desc = { + trigger = { + OR = { + scope:terrain_type = flag:jungle + scope:terrain_type = flag:forest + scope:terrain_type = flag:taiga + } + } + desc = ep3_laamp_flavour_ewan.0001.desc.midtro.tree_covered_hill + } + triggered_desc = { + trigger = { scope:terrain_type = flag:mountains } + desc = ep3_laamp_flavour_ewan.0001.desc.midtro.small_ridge + } + triggered_desc = { + trigger = { + OR = { + scope:terrain_type = flag:desert + scope:terrain_type = flag:oasis + } + } + desc = ep3_laamp_flavour_ewan.0001.desc.midtro.small_dune + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert_mountains } + desc = ep3_laamp_flavour_ewan.0001.desc.midtro.dusty_ridge + } + triggered_desc = { + trigger = { + OR = { + scope:terrain_type = flag:wetlands + scope:terrain_type = flag:floodplains + scope:terrain_type = flag:steppe + } + } + desc = ep3_laamp_flavour_ewan.0001.desc.midtro.stubby_hillock + } + triggered_desc = { + trigger = { scope:terrain_type = flag:drylands } + desc = ep3_laamp_flavour_ewan.0001.desc.midtro.dusty_hill + } + } + first_valid = { + triggered_desc = { + trigger = { scope:terrain_type = flag:plains } + desc = ep3_laamp_flavour_ewan.0001.desc.plains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:farmlands } + desc = ep3_laamp_flavour_ewan.0001.desc.farmlands + } + triggered_desc = { + trigger = { scope:terrain_type = flag:hills } + desc = ep3_laamp_flavour_ewan.0001.desc.hills + } + triggered_desc = { + trigger = { scope:terrain_type = flag:mountains } + desc = ep3_laamp_flavour_ewan.0001.desc.mountains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert } + desc = ep3_laamp_flavour_ewan.0001.desc.desert + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert_mountains } + desc = ep3_laamp_flavour_ewan.0001.desc.desert_mountains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:oasis } + desc = ep3_laamp_flavour_ewan.0001.desc.oasis + } + triggered_desc = { + trigger = { scope:terrain_type = flag:jungle } + desc = ep3_laamp_flavour_ewan.0001.desc.jungle + } + triggered_desc = { + trigger = { scope:terrain_type = flag:forest } + desc = ep3_laamp_flavour_ewan.0001.desc.forest + } + triggered_desc = { + trigger = { scope:terrain_type = flag:taiga } + desc = ep3_laamp_flavour_ewan.0001.desc.taiga + } + triggered_desc = { + trigger = { scope:terrain_type = flag:wetlands } + desc = ep3_laamp_flavour_ewan.0001.desc.wetlands + } + triggered_desc = { + trigger = { scope:terrain_type = flag:steppe } + desc = ep3_laamp_flavour_ewan.0001.desc.steppe + } + triggered_desc = { + trigger = { scope:terrain_type = flag:floodplains } + desc = ep3_laamp_flavour_ewan.0001.desc.floodplains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:drylands } + desc = ep3_laamp_flavour_ewan.0001.desc.drylands + } + } + desc = ep3_laamp_flavour_ewan.0001.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = admiration + } + lower_center_portrait = scope:watch_partner_2 + lower_right_portrait = scope:watch_partner_1 + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_0001 } + # And check that we've had this title for a decent amount of time, so that we don't get this immediately every time. + title_held_years >= 10 + } + # And uhhh. Unfortunately. + NOT = { has_trait = blind } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_0001 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_0001 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_longest + } + } + # Grab our terrain. + ep3_laamp_flavour_ewan_register_terrain_effect = yes + # Flag a consort or child to watch it with. + ## Consorts. + every_consort = { + limit = { + ep3_laamp_flavour_ewan_0001_watch_partner_trigger = { CONFIG = courtier } + } + add_to_list = possible_watch_partner_1_list + } + ## Children. + every_child = { + limit = { + ep3_laamp_flavour_ewan_0001_watch_partner_trigger = { CONFIG = child } + } + add_to_list = possible_watch_partner_1_list + } + ## Now, sort through them to find our best candidate. + ordered_in_list = { + list = possible_watch_partner_1_list + order_by = { + value = "opinion(root)" + # If we're already friends/lovers, lower the score, as this should be for making new ones. + if = { + limit = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + multiply = 0.5 + } + } + save_scope_as = watch_partner_1 + } + # Flag a potential friend or friend to watch it with. + ## Potential friends. + every_relation = { + type = potential_friend + limit = { ep3_laamp_flavour_ewan_0002_watch_partner_trigger = yes } + add_to_list = possible_watch_partner_2_list + } + ## Friends & best friends. + every_relation = { + type = friend + limit = { ep3_laamp_flavour_ewan_0002_watch_partner_trigger = yes } + add_to_list = possible_watch_partner_2_list + } + ## Now, sort through them to find our best candidate. + ordered_in_list = { + list = possible_watch_partner_2_list + order_by = "opinion(root)" + save_scope_as = watch_partner_2 + } + } + + # Appreciate the solitude. + option = { + name = ep3_laamp_flavour_ewan.0001.a + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0001_the_little_things_modifier + years = 10 + } + + stress_impact = { + base = medium_stress_loss + shy = medium_stress_impact_loss + gregarious = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -1 } + } + } + + # Call up consort or child. + option = { + name = ep3_laamp_flavour_ewan.0001.b + trigger = { exists = scope:watch_partner_1 } + + progress_towards_friend_effect = { + REASON = friend_adventurer_watched_sunset + CHARACTER = scope:watch_partner_1 + OPINION = 30 + } + + stress_impact = { gregarious = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { opinion_target = scope:watch_partner_1 } + } + } + + # Call up friend/potential friend. + option = { + name = ep3_laamp_flavour_ewan.0001.c + trigger = { exists = scope:watch_partner_2 } + + progress_towards_friend_effect = { + REASON = friend_adventurer_watched_sunset + CHARACTER = scope:watch_partner_2 + OPINION = 40 + } + + stress_impact = { gregarious = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + opinion_modifier = { opinion_target = scope:watch_partner_2 } + } + } + + # Get on with the evening/morning's work. + option = { + name = ep3_laamp_flavour_ewan.0001.d + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0001_all_business_modifier + years = 10 + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 2 } + } + } +} + +################################################## +# Fire & Friends +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_0011_mocker_trigger = { + has_trait = gregarious + ep3_laamp_flavour_ewan_available_courtier_trigger = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_0011_mockee_trigger = { + NOT = { has_trait = gregarious } + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + # Filter out anyone that most folks'd be _reluctant_ to criticise. + NOR = { + is_close_or_extended_family_of = root + is_consort_of = root + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } +} + +# Larks at the campfire. +ep3_laamp_flavour_ewan.0011 = { + type = character_event + title = ep3_laamp_flavour_ewan.0011.t + desc = { + desc = ep3_laamp_flavour_ewan.0011.desc.intro + random_valid = { + triggered_desc = { + trigger = { + scope:mockee = { has_trait = lustful } + } + desc = ep3_laamp_flavour_ewan.0011.desc.lustful + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = chaste } + } + desc = ep3_laamp_flavour_ewan.0011.desc.chaste + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = gluttonous } + } + desc = ep3_laamp_flavour_ewan.0011.desc.gluttonous + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = temperate } + } + desc = ep3_laamp_flavour_ewan.0011.desc.temperate + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = greedy } + } + desc = ep3_laamp_flavour_ewan.0011.desc.greedy + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = generous } + } + desc = ep3_laamp_flavour_ewan.0011.desc.generous + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = lazy } + } + desc = ep3_laamp_flavour_ewan.0011.desc.lazy + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = diligent } + } + desc = ep3_laamp_flavour_ewan.0011.desc.diligent + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = wrathful } + } + desc = ep3_laamp_flavour_ewan.0011.desc.wrathful + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = calm } + } + desc = ep3_laamp_flavour_ewan.0011.desc.calm + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = patient } + } + desc = ep3_laamp_flavour_ewan.0011.desc.patient + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = impatient } + } + desc = ep3_laamp_flavour_ewan.0011.desc.impatient + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = arrogant } + } + desc = ep3_laamp_flavour_ewan.0011.desc.arrogant + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = humble } + } + desc = ep3_laamp_flavour_ewan.0011.desc.humble + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = deceitful } + } + desc = ep3_laamp_flavour_ewan.0011.desc.deceitful + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = honest } + } + desc = ep3_laamp_flavour_ewan.0011.desc.honest + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = craven } + } + desc = ep3_laamp_flavour_ewan.0011.desc.craven + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = brave } + } + desc = ep3_laamp_flavour_ewan.0011.desc.brave + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = shy } + } + desc = ep3_laamp_flavour_ewan.0011.desc.shy + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = gregarious } + } + desc = ep3_laamp_flavour_ewan.0011.desc.gregarious + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = ambitious } + } + desc = ep3_laamp_flavour_ewan.0011.desc.ambitious + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = content } + } + desc = ep3_laamp_flavour_ewan.0011.desc.content + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = arbitrary } + } + desc = ep3_laamp_flavour_ewan.0011.desc.arbitrary + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = just } + } + desc = ep3_laamp_flavour_ewan.0011.desc.just + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = cynical } + } + desc = ep3_laamp_flavour_ewan.0011.desc.cynical + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = zealous } + } + desc = ep3_laamp_flavour_ewan.0011.desc.zealous + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = paranoid } + } + desc = ep3_laamp_flavour_ewan.0011.desc.paranoid + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = trusting } + } + desc = ep3_laamp_flavour_ewan.0011.desc.trusting + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = compassionate } + } + desc = ep3_laamp_flavour_ewan.0011.desc.compassionate + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = callous } + } + desc = ep3_laamp_flavour_ewan.0011.desc.callous + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = sadistic } + } + desc = ep3_laamp_flavour_ewan.0011.desc.sadistic + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = stubborn } + } + desc = ep3_laamp_flavour_ewan.0011.desc.stubborn + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = fickle } + } + desc = ep3_laamp_flavour_ewan.0011.desc.fickle + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = vengeful } + } + desc = ep3_laamp_flavour_ewan.0011.desc.vengeful + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = forgiving } + } + desc = ep3_laamp_flavour_ewan.0011.desc.forgiving + } + triggered_desc = { + trigger = { + scope:mockee = { has_trait = eccentric } + } + desc = ep3_laamp_flavour_ewan.0011.desc.eccentric + } + } + desc = ep3_laamp_flavour_ewan.0011.desc.outro + } + theme = laamp + left_portrait = { + character = scope:mocker + animation = laugh + } + right_portrait = { + character = scope:mockee + animation = disapproval + } + override_background = { reference = ep3_campfire } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_0011 } + } + # Make sure we've got at least one mocker & one mockee. + any_courtier = { ep3_laamp_flavour_ewan_0011_mocker_trigger = yes } + any_courtier = { ep3_laamp_flavour_ewan_0011_mockee_trigger = yes } + } + + weight_multiplier = { + modifier = { + add = -0.5 + has_trait = shy + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_0011 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_0011 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Grab our courtiers. + random_courtier = { + limit = { ep3_laamp_flavour_ewan_0011_mocker_trigger = yes } + save_scope_as = mocker + } + random_courtier = { + limit = { ep3_laamp_flavour_ewan_0011_mockee_trigger = yes } + save_scope_as = mockee + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + } + + # Join in the ribbing of scope:mockee. + option = { + name = ep3_laamp_flavour_ewan.0011.a + + duel = { + skill = diplomacy + target = scope:mockee + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0011.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0011.a.tt.success + left_icon = scope:mockee + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = proper_jokes_opinion + opinion = 20 + } + } + } + } + # Defeat! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0011.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0011.a.tt.failure + left_icon = scope:mockee + scope:mockee = { + reverse_add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -30 + } + } + } + } + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -0.25 } + opinion_modifier = { + opinion_target = scope:mockee + multiplier = -1 + } + } + } + + # Turn the tables on scope:mocker. + option = { + name = ep3_laamp_flavour_ewan.0011.b + + duel = { + skill = diplomacy + target = scope:mocker + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0011.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0011.b.tt.success + left_icon = scope:mocker + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = proper_jokes_opinion + opinion = 20 + } + } + } + } + # Defeat! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0011.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0011.b.tt.failure + left_icon = scope:mocker + scope:mocker = { + reverse_add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -30 + } + } + } + } + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 0.5 } + opinion_modifier = { opinion_target = scope:mocker } + } + } + + # Tell a joke of your own. + option = { + name = ep3_laamp_flavour_ewan.0011.c + + duel = { + skill = diplomacy + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0011.c.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0011.c.tt.success + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = proper_jokes_opinion + opinion = 20 + } + } + } + } + # Defeat! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0011.c.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0011.c.tt.failure + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 0.5 } + } + } + + # Soak it all in. + option = { + name = ep3_laamp_flavour_ewan.0011.d + + # Main effect is stress loss. + stress_impact = { + base = medium_stress_loss + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -1 } + } + } +} + +################################################## +# A Little Follower +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# Happy cat or dog follows you. +ep3_laamp_flavour_ewan.0021 = { + type = character_event + title = ep3_laamp_flavour_ewan.0021.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:animal_type = flag:cat } + desc = ep3_laamp_flavour_ewan.0021.desc.intro.cat + } + triggered_desc = { + trigger = { scope:animal_type = flag:dog } + desc = ep3_laamp_flavour_ewan.0021.desc.intro.dog + } + } + random_valid = { + triggered_desc = { + trigger = { scope:animal_type = flag:cat } + desc = ep3_laamp_flavour_ewan.0021.desc.cat.1 + } + triggered_desc = { + trigger = { scope:animal_type = flag:cat } + desc = ep3_laamp_flavour_ewan.0021.desc.cat.2 + } + triggered_desc = { + trigger = { scope:animal_type = flag:cat } + desc = ep3_laamp_flavour_ewan.0021.desc.cat.3 + } + triggered_desc = { + trigger = { scope:animal_type = flag:cat } + desc = ep3_laamp_flavour_ewan.0021.desc.cat.4 + } + triggered_desc = { + trigger = { scope:animal_type = flag:cat } + desc = ep3_laamp_flavour_ewan.0021.desc.cat.5 + } + triggered_desc = { + trigger = { scope:animal_type = flag:dog } + desc = ep3_laamp_flavour_ewan.0021.desc.dog.1 + } + triggered_desc = { + trigger = { scope:animal_type = flag:dog } + desc = ep3_laamp_flavour_ewan.0021.desc.dog.2 + } + triggered_desc = { + trigger = { scope:animal_type = flag:dog } + desc = ep3_laamp_flavour_ewan.0021.desc.dog.3 + } + triggered_desc = { + trigger = { scope:animal_type = flag:dog } + desc = ep3_laamp_flavour_ewan.0021.desc.dog.4 + } + triggered_desc = { + trigger = { scope:animal_type = flag:dog } + desc = ep3_laamp_flavour_ewan.0021.desc.dog.5 + } + } + desc = ep3_laamp_flavour_ewan.0021.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = admiration + } + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_0021 } + } + # This one won't make sense if you could just get a dog at any point, so rule that out. + NOT = { + domicile = { has_domicile_building = baggage_train_kennel } + } + # Plus make sure that we don't _already_ have both dog & cat. + OR = { + ep3_laamp_flavour_ewan_no_dog_trigger = no + ep3_laamp_flavour_ewan_no_cat_trigger = no + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_0021 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_0021 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + # Pick whether this'll be a cat or a dog. + random_list = { + # Prefer cats over dogs because: + # A) You can get dogs via the kennels. + # B) They are innately superior. + 50 = { + trigger = { ep3_laamp_flavour_ewan_no_dog_trigger = yes } + save_scope_value_as = { + name = animal_type + value = flag:dog + } + } + 150 = { + trigger = { ep3_laamp_flavour_ewan_no_cat_trigger = yes } + save_scope_value_as = { + name = animal_type + value = flag:cat + } + } + } + } + + # Adopt the animal. + option = { + name = ep3_laamp_flavour_ewan.0021.a + + if = { + limit = { scope:animal_type = flag:cat } + start_cat_story_cycle_effect = yes + } + else = { start_dog_story_cycle_effect = yes } + + # Everyone likes a pet. + add_stress = medium_stress_impact_loss + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Low on provisions: that's... a meal... + option = { + name = ep3_laamp_flavour_ewan.0021.b + trigger = { domicile.provisions <= provisions_privation_threshold_start } + + domicile = { change_provisions = microscopic_provisions_gain } + + stress_impact = { + gluttonous = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = miniscule_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 2 } + } + } + + # Sadistic: kick the animal. + option = { + name = ep3_laamp_flavour_ewan.0021.c + trigger = { has_trait = sadistic } + trait = sadistic + + # Remember that time + random = { + chance = 1 + increase_wounds_effect = { REASON = wild_animal } + } + + # Main effect is the stress loss. + stress_impact = { sadistic = major_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -3 } + } + } + + # It's just a fellow traveller, leave it be. + option = { + name = ep3_laamp_flavour_ewan.0021.d + + if = { + limit = { scope:animal_type = flag:cat } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0021_respected_cat_modifier + years = 10 + } + } + else = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0021_respected_dog_modifier + years = 10 + } + } + + stress_impact = { shy = minor_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -1 } + } + } +} + +################################################## +# Tumbling Down +# by Ewan Cowhig Croft +# 0031 - 0040 +################################################## + +# Stooge falls down hill. +ep3_laamp_flavour_ewan.0031 = { + type = character_event + title = ep3_laamp_flavour_ewan.0031.t + desc = { + desc = ep3_laamp_flavour_ewan.0031.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:terrain_type = flag:plains } + desc = ep3_laamp_flavour_ewan.0031.desc.plains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:farmlands } + desc = ep3_laamp_flavour_ewan.0031.desc.farmlands + } + triggered_desc = { + trigger = { scope:terrain_type = flag:hills } + desc = ep3_laamp_flavour_ewan.0031.desc.hills + } + triggered_desc = { + trigger = { scope:terrain_type = flag:mountains } + desc = ep3_laamp_flavour_ewan.0031.desc.mountains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert } + desc = ep3_laamp_flavour_ewan.0031.desc.desert + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert_mountains } + desc = ep3_laamp_flavour_ewan.0031.desc.desert_mountains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:oasis } + desc = ep3_laamp_flavour_ewan.0031.desc.oasis + } + triggered_desc = { + trigger = { scope:terrain_type = flag:jungle } + desc = ep3_laamp_flavour_ewan.0031.desc.jungle + } + triggered_desc = { + trigger = { scope:terrain_type = flag:forest } + desc = ep3_laamp_flavour_ewan.0031.desc.forest + } + triggered_desc = { + trigger = { scope:terrain_type = flag:taiga } + desc = ep3_laamp_flavour_ewan.0031.desc.taiga + } + triggered_desc = { + trigger = { scope:terrain_type = flag:wetlands } + desc = ep3_laamp_flavour_ewan.0031.desc.wetlands + } + triggered_desc = { + trigger = { scope:terrain_type = flag:steppe } + desc = ep3_laamp_flavour_ewan.0031.desc.steppe + } + triggered_desc = { + trigger = { scope:terrain_type = flag:floodplains } + desc = ep3_laamp_flavour_ewan.0031.desc.floodplains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:drylands } + desc = ep3_laamp_flavour_ewan.0031.desc.drylands + } + } + desc = ep3_laamp_flavour_ewan.0031.desc.midtro + first_valid = { + triggered_desc = { + trigger = { + scope:stooge = { is_alive = no } + } + desc = ep3_laamp_flavour_ewan.0031.desc.outro.dead + } + desc = ep3_laamp_flavour_ewan.0031.desc.outro.fallback + } + } + theme = laamp + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:stooge + animation = fear + } + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_0031 } + } + # This event'll be pointless if we don't have some stress, so make sure we're a little tense. + stress >= 25 + # Make sure we've got a stooge. + court_position:stooge_camp_officer ?= { is_available_allow_travelling = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_0031 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_0031 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + # Grab our stooge. + court_position:stooge_camp_officer = { save_scope_as = stooge } + # Grab our terrain. + ep3_laamp_flavour_ewan_register_terrain_effect = yes + ## Plus, this means injury. + scope:stooge = { + increase_wounds_effect = { REASON = fell_wilderness } + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + } + + # Laugh. + option = { + name = ep3_laamp_flavour_ewan.0031.a + + scope:stooge = { + if = { + limit = { is_alive = yes } + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -40 + } + } + # Acknowledge that this is a wee bit ghoulish if they've died. + else = { + root = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0031_grisly_modifier + years = 5 + } + } + } + } + + # Main effect comes from stress loss. + stress_impact = { + base = major_stress_loss + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } + + # Snicker, but leave it at that. + option = { + name = ep3_laamp_flavour_ewan.0031.b + + scope:stooge = { + if = { + limit = { is_alive = yes } + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + # Acknowledge that this is a wee bit ghoulish if they've died. + else = { + root = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0031_macabre_modifier + years = 5 + } + } + } + } + + # Main effect comes from stress loss. + stress_impact = { + base = medium_stress_loss + sadistic = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = -0.5 + ai_sociability = 0.5 + } + } + } + + # Move on, this is beneath you. + option = { + name = ep3_laamp_flavour_ewan.0031.c + + add_prestige = miniscule_prestige_gain + + stress_impact = { arrogant = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } +} + +################################################## +# Travails of a Cook +# by Ewan Cowhig Croft +# 0041 - 0050 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_0041_access_high_provision_options_trigger = { + domicile.provisions >= domicile.max_provisions + ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = no +} + +scripted_trigger ep3_laamp_flavour_ewan_0041_access_medium_provision_options_trigger = { + domicile.provisions < domicile.max_provisions + domicile.provisions > provisions_privation_threshold_start + ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = no +} + +scripted_trigger ep3_laamp_flavour_ewan_0041_access_low_provision_options_trigger = { + domicile.provisions <= provisions_privation_threshold_start + ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = no +} + +scripted_trigger ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = { + location = { + geographical_region = custom_sahara_proper + # If we're in an oasis, we should act like it. + NOT = { terrain = oasis } + } +} + +# Recipes on the road. +ep3_laamp_flavour_ewan.0041 = { + type = character_event + title = ep3_laamp_flavour_ewan.0041.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:camp_cook } + desc = ep3_laamp_flavour_ewan.0041.desc.has_cook + } + desc = ep3_laamp_flavour_ewan.0041.desc.nameless_cook + } + first_valid = { + triggered_desc = { + trigger = { scope:terrain_type = flag:plains } + desc = ep3_laamp_flavour_ewan.0041.desc.plains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:farmlands } + desc = ep3_laamp_flavour_ewan.0041.desc.farmlands + } + triggered_desc = { + trigger = { scope:terrain_type = flag:hills } + desc = ep3_laamp_flavour_ewan.0041.desc.hills + } + triggered_desc = { + trigger = { scope:terrain_type = flag:mountains } + desc = ep3_laamp_flavour_ewan.0041.desc.mountains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert } + desc = ep3_laamp_flavour_ewan.0041.desc.desert + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert_mountains } + desc = ep3_laamp_flavour_ewan.0041.desc.desert_mountains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:oasis } + desc = ep3_laamp_flavour_ewan.0041.desc.oasis + } + triggered_desc = { + trigger = { scope:terrain_type = flag:jungle } + desc = ep3_laamp_flavour_ewan.0041.desc.jungle + } + triggered_desc = { + trigger = { scope:terrain_type = flag:forest } + desc = ep3_laamp_flavour_ewan.0041.desc.forest + } + triggered_desc = { + trigger = { scope:terrain_type = flag:taiga } + desc = ep3_laamp_flavour_ewan.0041.desc.taiga + } + triggered_desc = { + trigger = { scope:terrain_type = flag:wetlands } + desc = ep3_laamp_flavour_ewan.0041.desc.wetlands + } + triggered_desc = { + trigger = { scope:terrain_type = flag:steppe } + desc = ep3_laamp_flavour_ewan.0041.desc.steppe + } + triggered_desc = { + trigger = { scope:terrain_type = flag:floodplains } + desc = ep3_laamp_flavour_ewan.0041.desc.floodplains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:drylands } + desc = ep3_laamp_flavour_ewan.0041.desc.drylands + } + } + desc = ep3_laamp_flavour_ewan.0041.desc.outro + first_valid = { + triggered_desc = { + trigger = { ep3_laamp_flavour_ewan_0041_access_high_provision_options_trigger = yes } + desc = ep3_laamp_flavour_ewan.0041.desc.provisions.high + } + triggered_desc = { + trigger = { ep3_laamp_flavour_ewan_0041_access_medium_provision_options_trigger = yes } + desc = ep3_laamp_flavour_ewan.0041.desc.provisions.medium + } + triggered_desc = { + trigger = { ep3_laamp_flavour_ewan_0041_access_low_provision_options_trigger = yes } + desc = ep3_laamp_flavour_ewan.0041.desc.provisions.low + } + triggered_desc = { + trigger = { ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = yes } + desc = ep3_laamp_flavour_ewan.0041.desc.provisions.sahara + } + } + } + theme = laamp + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:camp_cook + animation = anger + } + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_0041 } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = yes + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_0041 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_0041 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Grab our terrain. + ep3_laamp_flavour_ewan_register_terrain_effect = yes + # If we've got a camp cook, nab them. + court_position:camp_cook_camp_officer ?= { + if = { + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + save_scope_as = camp_cook + } + } + } + + # High prov: what're you even complaining about? + option = { + name = ep3_laamp_flavour_ewan.0041.a + trigger = { ep3_laamp_flavour_ewan_0041_access_high_provision_options_trigger = yes } + + scope:camp_cook ?= { + add_opinion = { + target = root + modifier = piqued_opinion + opinion = -25 + } + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0041_well_provided_camp_modifier + years = 10 + } + + stress_impact = { + temperate = minor_stress_impact_loss + gluttonous = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } + + # High prov: fine, we can restock. + option = { + name = ep3_laamp_flavour_ewan.0041.b + trigger = { ep3_laamp_flavour_ewan_0041_access_high_provision_options_trigger = yes } + + duel = { + skill = stewardship + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.b.tt.success + left_icon = scope:camp_cook + remove_short_term_gold = minor_gold_laamps_value + domicile = { change_provisions = medium_provisions_gain } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.b.tt.failure + left_icon = scope:camp_cook + remove_short_term_gold = minor_gold_laamps_value + domicile = { change_provisions = miniscule_provisions_gain } + } + } + } + if = { + limit = { exists = scope:camp_cook } + scope:camp_cook ?= { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + add_favour_hook_if_possible_simple_effect = { TARGET = scope:camp_cook } + } + + stress_impact = { + gluttonous = minor_stress_impact_loss + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + modifier = { + factor = 0 + gold <= major_gold_laamps_value + } + } + } + + # High prov: absolutely not, work with what you've got. + option = { + name = ep3_laamp_flavour_ewan.0041.c + trigger = { ep3_laamp_flavour_ewan_0041_access_high_provision_options_trigger = yes } + + scope:camp_cook ?= { + add_opinion = { + target = root + modifier = frustrated_opinion + opinion = -40 + } + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0041_stern_camp_modifier + years = 10 + } + + stress_impact = { + temperate = minor_stress_impact_loss + gluttonous = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = -1 } + } + } + + # mess_tent_cooks: I'm sure you can come up with something between you. + option = { + name = ep3_laamp_flavour_ewan.0041.d + trigger = { + ep3_laamp_flavour_ewan_0041_access_high_provision_options_trigger = yes + domicile = { has_domicile_building = mess_tent_cooks } + } + reason = has_building_mess_tent_cooks + + if = { + limit = { exists = scope:camp_cook } + reverse_add_opinion = { + target = scope:camp_cook + modifier = flattered_opinion + opinion = 30 + } + } + add_prestige = medium_prestige_gain + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Med prov: we can probably find something. + option = { + name = ep3_laamp_flavour_ewan.0041.e + trigger = { ep3_laamp_flavour_ewan_0041_access_medium_provision_options_trigger = yes } + + duel = { + skill = learning + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.e.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.e.tt.success + left_icon = scope:camp_cook + domicile = { change_provisions = medium_provisions_gain } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.e.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.e.tt.failure + left_icon = scope:camp_cook + domicile = { change_provisions = miniscule_provisions_gain } + } + } + } + + stress_impact = { + gluttonous = miniscule_stress_impact_loss + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } + + # Med prov: restocking would be a good idea anyway, let's make some deals. + option = { + name = ep3_laamp_flavour_ewan.0041.f + trigger = { ep3_laamp_flavour_ewan_0041_access_medium_provision_options_trigger = yes } + + duel = { + skill = stewardship + value = very_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.f.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.f.tt.success + left_icon = scope:camp_cook + remove_short_term_gold = medium_gold_laamps_value + domicile = { change_provisions = major_provisions_gain } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.f.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.f.tt.failure + left_icon = scope:camp_cook + remove_short_term_gold = medium_gold_laamps_value + domicile = { change_provisions = medium_provisions_gain } + } + } + } + if = { + limit = { exists = scope:camp_cook } + scope:camp_cook ?= { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + add_favour_hook_if_possible_simple_effect = { TARGET = scope:camp_cook } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + modifier = { + factor = 0 + gold <= massive_gold_laamps_value + } + } + } + + # Med prov: it's not in the budget. + option = { + name = ep3_laamp_flavour_ewan.0041.g + trigger = { ep3_laamp_flavour_ewan_0041_access_medium_provision_options_trigger = yes } + + scope:camp_cook ?= { + add_opinion = { + target = root + modifier = frustrated_opinion + opinion = -40 + } + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0041_quite_stern_camp_modifier + years = 10 + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + generous = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = 1 } + } + } + + # mess_tent_brewers: just double the beer rations and call it a day. + option = { + name = ep3_laamp_flavour_ewan.0041.h + trigger = { + ep3_laamp_flavour_ewan_0041_access_medium_provision_options_trigger = yes + domicile = { has_domicile_building = mess_tent_brewers } + } + reason = has_building_mess_tent_brewers + + scope:camp_cook ?= { + add_opinion = { + target = root + modifier = piqued_opinion + opinion = -20 + } + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0041_doubled_beer_rations_camp_modifier + years = 10 + } + + stress_impact = { + gluttonous = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Low prov: we can stop to forage. + option = { + name = ep3_laamp_flavour_ewan.0041.i + trigger = { ep3_laamp_flavour_ewan_0041_access_low_provision_options_trigger = yes } + + current_travel_plan = { + delay_travel_plan = { months = 1 } + } + duel = { + skill = learning + value = very_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.i.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.i.tt.success + left_icon = scope:camp_cook + domicile = { change_provisions = major_provisions_gain } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.i.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.i.tt.failure + left_icon = scope:camp_cook + domicile = { change_provisions = medium_provisions_gain } + } + } + } + + # No stress — regardless of your opinions on food, you're at a stage where you recognise what's necessary. + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } + + # Low prov: we'll buy what extra provisions we can... + option = { + name = ep3_laamp_flavour_ewan.0041.j + trigger = { ep3_laamp_flavour_ewan_0041_access_low_provision_options_trigger = yes } + + duel = { + skill = stewardship + value = extremely_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.j.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.j.tt.success + left_icon = scope:camp_cook + remove_short_term_gold = medium_gold_laamps_value + domicile = { change_provisions = major_provisions_gain } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.0041.j.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.0041.j.tt.failure + left_icon = scope:camp_cook + remove_short_term_gold = medium_gold_laamps_value + domicile = { change_provisions = medium_provisions_gain } + } + } + } + if = { + limit = { exists = scope:camp_cook } + scope:camp_cook ?= { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + add_favour_hook_if_possible_simple_effect = { TARGET = scope:camp_cook } + } + + # No stress — regardless of your opinions on food, you're at a stage where you recognise what's necessary. + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + modifier = { + factor = 0 + gold <= massive_gold_laamps_value + } + } + } + + # Low prov: we _have_ to push on. + option = { + name = ep3_laamp_flavour_ewan.0041.k + trigger = { ep3_laamp_flavour_ewan_0041_access_low_provision_options_trigger = yes } + + scope:camp_cook ?= { + add_opinion = { + target = root + modifier = frustrated_opinion + opinion = -40 + } + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0041_very_stern_camp_modifier + years = 10 + } + + # No stress — regardless of your opinions on food, you're at a stage where you recognise what's necessary. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } + + # supply_tent_reserve_provisions: hmm, we might have _something_ reserved. + option = { + name = ep3_laamp_flavour_ewan.0041.l + trigger = { + ep3_laamp_flavour_ewan_0041_access_low_provision_options_trigger = yes + domicile = { has_domicile_building = supply_tent_reserve_provisions } + } + reason = has_building_supply_tent_reserve_provisions + + if = { + limit = { exists = scope:camp_cook } + reverse_add_opinion = { + target = scope:camp_cook + modifier = grateful_opinion + opinion = 20 + } + } + add_prestige = medium_prestige_gain + + stress_impact = { gluttonous = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = -1 } + } + } + + # Sahara: do you _see_ anywhere to buy provisions you idiot? + option = { + name = ep3_laamp_flavour_ewan.0041.m + trigger = { ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = yes } + + if = { + limit = { exists = scope:camp_cook } + reverse_add_opinion = { + target = scope:camp_cook + modifier = frustrated_opinion + opinion = -40 + } + } + else = { add_prestige = minor_prestige_loss } + + stress_impact = { + base = medium_stress_gain + temperate = minor_stress_impact_loss + gluttonous = medium_stress_impact_gain + } + ai_chance = { + # This'll generally be your only option, so we don't care about modifiers. + base = 1 + } + } + + # Sahara + supply_tent_reserve_water: I don't care if we're eating gruel till we're through this. + option = { + name = ep3_laamp_flavour_ewan.0041.n + trigger = { + ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = yes + domicile = { has_domicile_building = supply_tent_reserve_water } + } + reason = has_building_supply_tent_reserve_water + + if = { + limit = { exists = scope:camp_cook } + reverse_add_opinion = { + target = scope:camp_cook + modifier = frustrated_opinion + opinion = -20 + } + } + add_prestige = medium_prestige_gain + + # No stress gain here — narratively appropriate but we don't want you to feel like you're punished for planning ahead. + ai_chance = { + # If you've got this, take it. + base = 1000 + } + } +} + +################################################## +# A Friendly Clamour +# by Ewan Cowhig Croft +# 0051 - 0060 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_0051_camp_has_food_to_burn_trigger = { + provisions >= max_provisions +} + +scripted_effect ep3_laamp_flavour_ewan_0051_roll_camp_visit_locations_effect = { + random_list = { + # Supply Tent + 100 = { + trigger = { + domicile = { has_domicile_building_or_higher = supply_tent_01 } + NOT = { exists = scope:supply_tent } + } + save_scope_value_as = { + name = supply_tent + value = yes + } + } + # Barber Tent + 100 = { + trigger = { + domicile = { has_domicile_building_or_higher = barber_tent_01 } + NOT = { exists = scope:barber_tent } + } + save_scope_value_as = { + name = barber_tent + value = yes + } + } + # Baggage Train + 100 = { + trigger = { + domicile = { has_domicile_building_or_higher = baggage_train_01 } + NOT = { exists = scope:baggage_train } + } + save_scope_value_as = { + name = baggage_train + value = yes + } + } + # Mess Tent + 100 = { + trigger = { + domicile = { has_domicile_building_or_higher = mess_tent_01 } + NOT = { exists = scope:mess_tent } + } + save_scope_value_as = { + name = mess_tent + value = yes + } + } + # Camp Fire + 100 = { + trigger = { + domicile = { has_domicile_building_or_higher = camp_fire_01 } + NOT = { exists = scope:camp_fire } + } + save_scope_value_as = { + name = camp_fire + value = yes + } + } + # Proving Grounds + 100 = { + trigger = { + domicile = { has_domicile_building_or_higher = proving_grounds_01 } + NOT = { exists = scope:proving_grounds } + } + save_scope_value_as = { + name = proving_grounds + value = yes + } + } + # Camp Perimeter + 100 = { + trigger = { + domicile = { has_domicile_building_or_higher = camp_perimeter_01 } + NOT = { exists = scope:camp_perimeter } + } + save_scope_value_as = { + name = camp_perimeter + value = yes + } + } + } +} + +# A pleasant evening buzz as the camp settles down. +ep3_laamp_flavour_ewan.0051 = { + type = character_event + title = ep3_laamp_flavour_ewan.0051.t + desc = { + desc = ep3_laamp_flavour_ewan.0051.desc.intro + # Purpose. + random_valid = { + triggered_desc = { + trigger = { has_realm_law = camp_purpose_wanderers } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.wanderers.1 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_wanderers } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.wanderers.2 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_wanderers } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.wanderers.3 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_mercenaries } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.mercenaries.1 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_mercenaries } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.mercenaries.2 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_mercenaries } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.mercenaries.3 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_scholars } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.scholars.1 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_scholars } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.scholars.2 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_scholars } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.scholars.3 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_explorers } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.explorers.1 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_explorers } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.explorers.2 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_explorers } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.explorers.3 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_brigands } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.brigands.1 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_brigands } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.brigands.2 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_brigands } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.brigands.3 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_legitimists } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.legitimists.1 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_legitimists } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.legitimists.2 + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_legitimists } + desc = ep3_laamp_flavour_ewan.0051.desc.purpose.legitimists.3 + } + } + # Buildings. + random_valid = { + triggered_desc = { + trigger = { + domicile = { has_domicile_building_or_higher = supply_tent_01 } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.supply_tent_01 + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = supply_tent_sutler } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.supply_tent_sutler + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = supply_tent_smithy } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.supply_tent_smithy + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = supply_tent_arsenal } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.supply_tent_arsenal + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building_or_higher = barber_tent_01 } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.barber_tent_01 + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = barber_tent_surgeons_tools } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.barber_tent_surgeons_tools + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = barber_tent_dentists_tools } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.barber_tent_dentists_tools + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = barber_tent_torturers_tools } + any_prisoner = { } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.barber_tent_torturers_tools + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building_or_higher = baggage_train_01 } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_01 + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_ample_steeds } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_ample_steeds + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_porters } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_porters + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_trackers } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_trackers + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_kennel } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_kennel + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_siege_engineers } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_siege_engineers + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_shrine } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_shrine + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_scribes } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_scribes + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_bartering_grounds } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_bartering_grounds + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_ransom_cages } + any_prisoner = { } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_ransom_cages + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_pleasure_tents } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.baggage_train_pleasure_tents + } + triggered_desc = { + trigger = { + domicile = { + has_domicile_building_or_higher = mess_tent_01 + ep3_laamp_flavour_ewan_0051_camp_has_food_to_burn_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.mess_tent_01 + } + triggered_desc = { + trigger = { + domicile = { + has_domicile_building = mess_tent_herbalists + ep3_laamp_flavour_ewan_0051_camp_has_food_to_burn_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.mess_tent_herbalists + } + triggered_desc = { + trigger = { + domicile = { + has_domicile_building = mess_tent_brewers + ep3_laamp_flavour_ewan_0051_camp_has_food_to_burn_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.mess_tent_brewers + } + triggered_desc = { + trigger = { + domicile = { + has_domicile_building = mess_tent_bakers + ep3_laamp_flavour_ewan_0051_camp_has_food_to_burn_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.mess_tent_bakers + } + triggered_desc = { + trigger = { + domicile = { + has_domicile_building = mess_tent_cooks + ep3_laamp_flavour_ewan_0051_camp_has_food_to_burn_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.mess_tent_cooks + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building_or_higher = camp_fire_01 } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_fire_01 + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = camp_fire_trailing_musicians } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_fire_trailing_musicians + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = camp_fire_wandering_poets } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_fire_wandering_poets + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = camp_fire_capering_fools } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_fire_capering_fools + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = camp_fire_local_hangers_on } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_fire_local_hangers_on + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = camp_fire_juicy_rumors } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_fire_juicy_rumors + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building_or_higher = proving_grounds_01 } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_01 + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_horse_run } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_horse_run + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_camel_run } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_camel_run + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_elephantry_reserve } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_elephantry_reserve + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_nightly_barding_drills } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_nightly_barding_drills + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_the_stump } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_the_stump + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_personal_bouts } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_personal_bouts + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_training_circle } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_training_circle + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_mock_battle_drills } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_mock_battle_drills + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_the_stick_game } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_the_stick_game + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = proving_grounds_bodyguard_drills } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.proving_grounds_bodyguard_drills + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building_or_higher = camp_perimeter_01 } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_perimeter_01 + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = camp_perimeter_fixed_layout } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_perimeter_fixed_layout + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = camp_perimeter_palisade } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_perimeter_palisade + } + triggered_desc = { + trigger = { + domicile = { has_domicile_building = camp_perimeter_ditch } + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.camp_perimeter_ditch + } + desc = ep3_laamp_flavour_ewan.0051.desc.buildings.fallback + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.connector + # Courtiers. + random_valid = { + # Their relations. + triggered_desc = { + trigger = { + OR = { + exists = scope:courtier_friend_1 + exists = scope:courtier_best_friend_1 + exists = scope:courtier_rival_1 + exists = scope:courtier_nemesis_1 + exists = scope:courtier_lover_1 + exists = scope:courtier_soulmate_1 + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { exists = scope:courtier_friend_1 } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_relations.friends + } + triggered_desc = { + trigger = { exists = scope:courtier_best_friend_1 } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_relations.best_friends + } + triggered_desc = { + trigger = { exists = scope:courtier_rival_1 } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_relations.rivals + } + triggered_desc = { + trigger = { exists = scope:courtier_nemesis_1 } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_relations.nemeses + } + triggered_desc = { + trigger = { exists = scope:courtier_lover_1 } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_relations.lovers + } + triggered_desc = { + trigger = { exists = scope:courtier_soulmate_1 } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_relations.soulmates + } + } + } + } + # How many you have of different kinds. + triggered_desc = { + trigger = { + OR = { + exists = scope:leading_child + exists = scope:leading_knight + exists = scope:culture_1 + exists = scope:faith_1 + } + } + desc = { + random_valid = { + triggered_desc = { + trigger = { exists = scope:leading_child } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_count.many_children + } + triggered_desc = { + trigger = { exists = scope:leading_knight } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_count.many_knights + } + triggered_desc = { + trigger = { exists = scope:culture_1 } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_count.many_languages + } + triggered_desc = { + trigger = { exists = scope:faith_1 } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.courtier_count.many_faiths + } + } + } + } + # Notable characters. + triggered_desc = { + trigger = { exists = scope:notable_char } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = lustful } + # Rule this out if it might be narratively upsetting, as we don't want to deal with that headache. + OR = { + NOR = { + is_consort_of = root + has_relation_lover = root + } + accepts_adultery_without_penalty_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.lustful + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = gluttonous } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.gluttonous + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = temperate } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.temperate + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = greedy } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.greedy + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = generous } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.generous + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = lazy } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.lazy + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = diligent } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.diligent + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = wrathful } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.wrathful + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = calm } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.calm + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = patient } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.patient + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = impatient } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.impatient + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = arrogant } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.arrogant + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = humble } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.humble + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = deceitful } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.deceitful + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = honest } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.honest + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = gregarious } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.gregarious + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = arbitrary } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.arbitrary + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = just } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.just + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = cynical } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.cynical + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = zealous } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.zealous + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = paranoid } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.paranoid + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = trusting } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.trusting + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = compassionate } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.compassionate + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = callous } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.callous + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = sadistic } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.sadistic + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = stubborn } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.stubborn + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = fickle } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.fickle + } + triggered_desc = { + trigger = { + scope:notable_char = { has_trait = vengeful } + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.vengeful + } + desc = ep3_laamp_flavour_ewan.0051.desc.followers.notable_char.fallback + } + } + } + # Fallbacks. + ## Wrap these up so that their weighting doesn't get all weird. + desc = { + random_valid = { + desc = ep3_laamp_flavour_ewan.0051.desc.followers.fallback.1 + desc = ep3_laamp_flavour_ewan.0051.desc.followers.fallback.2 + desc = ep3_laamp_flavour_ewan.0051.desc.followers.fallback.3 + } + } + } + desc = ep3_laamp_flavour_ewan.0051.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = happiness + } + override_background = { reference = corridor_night } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_0051 } + } + # Make sure that we've got at least one mainline building built outside of our pavillion, so that our options aren't totally boring. + domicile = { + OR = { + has_domicile_building_or_higher = supply_tent_01 + has_domicile_building_or_higher = barber_tent_01 + has_domicile_building_or_higher = baggage_train_01 + has_domicile_building_or_higher = mess_tent_01 + has_domicile_building_or_higher = camp_fire_01 + has_domicile_building_or_higher = proving_grounds_01 + has_domicile_building_or_higher = camp_perimeter_01 + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_0051 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_0051 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + # Roll which camp options we want to show. + ep3_laamp_flavour_ewan_0051_roll_camp_visit_locations_effect = yes + ep3_laamp_flavour_ewan_0051_roll_camp_visit_locations_effect = yes + ep3_laamp_flavour_ewan_0051_roll_camp_visit_locations_effect = yes + # If we're a player, grab our courtier desc. + ## Camp relations. + ### Friends. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + any_relation = { + type = friend + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { has_relation_best_friend = prev } + } + } + save_scope_as = courtier_friend_1 + random_relation = { + type = friend + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { has_relation_best_friend = prev } + } + save_scope_as = courtier_friend_2 + } + } + ### Best friends. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + any_relation = { + type = best_friend + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + } + } + save_scope_as = courtier_best_friend_1 + random_relation = { + type = best_friend + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + save_scope_as = courtier_best_friend_2 + } + } + ### Rivals. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + any_relation = { + type = rival + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { has_relation_nemesis = prev } + } + } + save_scope_as = courtier_rival_1 + random_relation = { + type = rival + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { has_relation_nemesis = prev } + } + save_scope_as = courtier_rival_2 + } + } + ### Nemeses. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + any_relation = { + type = nemesis + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + } + } + save_scope_as = courtier_nemesis_1 + random_relation = { + type = nemesis + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + save_scope_as = courtier_nemesis_2 + } + } + ### Lovers. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + any_relation = { + type = lover + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { has_relation_soulmate = prev } + } + } + save_scope_as = courtier_lover_1 + random_relation = { + type = lover + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { has_relation_soulmate = prev } + } + save_scope_as = courtier_lover_2 + } + } + ### Soulmates. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + any_relation = { + type = soulmate + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + } + } + save_scope_as = courtier_soulmate_1 + random_relation = { + type = soulmate + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + save_scope_as = courtier_soulmate_2 + } + } + ## Follower states. + ### Lots of children. + if = { + limit = { + any_courtier = { + count >= 8 + ep3_laamp_flavour_ewan_available_child_trigger = yes + } + } + # Nab a suitable child to be leading play. + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_available_child_trigger = yes } + order_by = { + value = age + if = { + limit = { has_trait = rowdy } + add = 3 + } + if = { + limit = { has_trait = charming } + add = 2 + } + if = { + limit = { has_trait = pensive } + add = -5 + } + if = { + limit = { has_trait = bossy } + add = 5 + } + } + save_scope_as = leading_child + } + } + ### Lots of knights. + if = { + limit = { + any_knight = { + count >= 10 + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + } + } + ordered_knight = { + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + order_by = prowess + save_scope_as = leading_knight + } + } + ### Lots of different languages being spoken. + #### First, assemble our list. + culture = { add_to_list = cultures_with_unique_languages_list } + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_anybody_trigger = yes } + culture = { + save_scope_as = culture_temp + if = { + limit = { + NOT = { + any_in_list = { + list = cultures_with_unique_languages_list + has_same_culture_language = scope:culture_temp + } + } + } + add_to_list = cultures_with_unique_languages_list + } + } + } + #### Then, check how long it is. + if = { + limit = { "list_size(cultures_with_unique_languages_list)" >= 8 } + random_in_list = { + list = cultures_with_unique_languages_list + limit = { + this != root.culture + } + save_scope_as = culture_1 + } + random_in_list = { + list = cultures_with_unique_languages_list + limit = { + NOR = { + this = root.culture + this = scope:culture_1 + } + } + save_scope_as = culture_2 + } + random_in_list = { + list = cultures_with_unique_languages_list + limit = { + NOR = { + this = root.culture + this = scope:culture_1 + this = scope:culture_2 + } + } + save_scope_as = culture_3 + } + } + ### Lots of different faiths around. + #### First, assemble our list. + faith = { add_to_list = unique_faiths_list } + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_anybody_trigger = yes } + faith = { add_to_list = unique_faiths_list } + } + #### Then, check how long it is. + if = { + limit = { "list_size(unique_faiths_list)" >= 5 } + random_in_list = { + list = unique_faiths_list + limit = { + this != root.faith + } + save_scope_as = faith_1 + } + random_in_list = { + list = unique_faiths_list + limit = { + NOR = { + this = root.faith + this = scope:faith_1 + } + } + save_scope_as = faith_2 + } + random_in_list = { + list = unique_faiths_list + limit = { + NOR = { + this = root.faith + this = scope:faith_1 + this = scope:faith_2 + } + } + save_scope_as = faith_3 + } + } + ## Notable character traits. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + OR = { + is_close_family_of = root + is_consort_of = root + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_court_position = yes + } + } + save_scope_as = notable_char + } + } + + # camp_main_01: retire to my own tent. + option = { + name = ep3_laamp_flavour_ewan.0051.a + + # Consolation prestige. + add_prestige = minor_prestige_gain + + stress_impact = { + base = medium_stress_loss + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -1 } + } + } + + # supply_tent_01: visit the supply tent, check the stores. + option = { + name = ep3_laamp_flavour_ewan.0051.b + trigger = { exists = scope:supply_tent } + reason = has_building_supply_tent_01_or_higher + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0051_check_building_supply_tent_modifier + years = 10 + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = 1 } + } + } + + # barber_tent_01: go for a check-up and a shave/trim at the barbers + option = { + name = { + text = { + first_valid = { + # Bald woman. + triggered_desc = { + trigger = { + is_female = yes + is_bald_trigger = yes + } + desc = ep3_laamp_flavour_ewan.0051.c.bald.female + } + # Bald man. + triggered_desc = { + trigger = { + is_male = yes + is_bald_trigger = yes + } + desc = ep3_laamp_flavour_ewan.0051.c.bald.male + } + # Non-bald man. + triggered_desc = { + trigger = { is_male = yes } + desc = ep3_laamp_flavour_ewan.0051.c.hairy.male + } + # Non-bald woman. + desc = ep3_laamp_flavour_ewan.0051.c.fallback + } + } + } + trigger = { exists = scope:barber_tent } + reason = has_building_barber_tent_01_or_higher + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0051_check_building_barber_tent_modifier + years = 10 + } + + stress_impact = { arrogant = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # baggage_train_01: organise the chaos of the baggage train. + option = { + name = ep3_laamp_flavour_ewan.0051.d + trigger = { exists = scope:baggage_train } + reason = has_building_baggage_train_01_or_higher + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0051_check_building_baggage_train_modifier + years = 10 + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } + + # mess_tent_01: get some grub before a line forms. + option = { + name = ep3_laamp_flavour_ewan.0051.e + trigger = { exists = scope:mess_tent } + reason = has_building_mess_tent_01_or_higher + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0051_check_building_mess_tent_modifier + years = 10 + } + + stress_impact = { + gluttonous = miniscule_stress_impact_loss + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + # Anyone who's ever worked in a field knows that this is the only logical thing to do AQAP. + ai_value_modifier = { ai_rationality = 5 } + } + } + + # camp_fire_01: nab a good seat at the fire. + option = { + name = ep3_laamp_flavour_ewan.0051.f + trigger = { exists = scope:camp_fire } + reason = has_building_camp_fire_01_or_higher + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0051_check_building_camp_fire_modifier + years = 10 + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + # Don't bully the shies here, they can enjoy a nice fire too. + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = -0.5 + } + } + } + + # proving_grounds_01: check the soldiery are being diligent. + option = { + name = ep3_laamp_flavour_ewan.0051.g + trigger = { exists = scope:proving_grounds } + reason = has_building_proving_grounds_01_or_higher + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0051_check_building_proving_grounds_modifier + years = 10 + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } + + # camp_perimeter_01: walk the perimeter, check we're being vigilant. + option = { + name = ep3_laamp_flavour_ewan.0051.h + trigger = { exists = scope:camp_perimeter } + reason = has_building_camp_perimeter_01_or_higher + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_0051_check_building_camp_perimeter_modifier + years = 10 + } + + stress_impact = { + paranoid = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } +} + +################################################## +# An Unexpected Faire +# by Ewan Cowhig Croft +# 0061 - 0070 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_0061_sahara_trigger = { + geographical_region = custom_sahara_proper + # If we're in an oasis, we should act like it. + NOT = { terrain = oasis } +} + +scripted_trigger ep3_laamp_flavour_ewan_0061_steppe_trigger = { + geographical_region = world_steppe + # We only lack cities on the steppe _proper_. + terrain = steppe +} + +# Locals react with impromptu faire. +ep3_laamp_flavour_ewan.0061 = { + type = character_event + title = ep3_laamp_flavour_ewan.0061.t + desc = ep3_laamp_flavour_ewan.0061.desc + theme = laamp + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:local_merchant + animation = admiration + } + override_background = { reference = market_scope } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_0061 } + } + # No one likes brigands. + NOT = { has_realm_law = camp_purpose_brigands } + # Make sure the location is suitable for there to be a fair. + location = { + # Gotta have somewhere hosting us. + has_holding = yes + # And some infrastructure. + county = { + # We should have some level of urbanisation. + development_level >= 20 + # And be fully secure. + county_control >= 100 + } + # Plus no plagues. + any_province_epidemic = { count <= 0 } + # Finally, no major regional blockers. + ep3_laamp_flavour_ewan_0061_sahara_trigger = no + ep3_laamp_flavour_ewan_0061_steppe_trigger = no + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_0061 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_0061 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Everyone's a little happier whatever we do. + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_anybody_trigger = yes } + custom = ep3_laamp_flavour_ewan.0061.tt.everyone_loves_faires + add_opinion = { + target = root + modifier = spirits_lifted_opinion + opinion = 20 + } + add_stress = massive_stress_loss + } + # Generate our local dude. + create_character = { + template = merchant_template + location = root.location + culture = root.location.culture + faith = root.location.faith + save_scope_as = local_merchant + } + ## Plus give 'em a nickname. + hidden_effect = { + scope:local_merchant = { assign_random_nickname_effect = yes } + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + # And our location for our background. + location = { save_scope_as = background_market_scope } + } + + # What a welcome surprise! + option = { + name = ep3_laamp_flavour_ewan.0061.a + + add_prestige = medium_prestige_gain + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Enroll a talented local. + option = { + name = ep3_laamp_flavour_ewan.0061.b + + add_courtier = scope:local_merchant + reverse_add_opinion = { + target = scope:local_merchant + modifier = grateful_opinion + opinion = 80 + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } + + # Pick up some provisions. + option = { + name = ep3_laamp_flavour_ewan.0061.c + + remove_short_term_gold = minor_gold_laamps_value + domicile = { change_provisions = medium_provisions_gain } + + stress_impact = { + gluttonous = miniscule_stress_impact_loss + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + modifier = { + factor = 0 + gold <= medium_gold_laamps_value + } + } + } + + # Stay at camp. + option = { + name = ep3_laamp_flavour_ewan.0061.d + + # Mostly just stress loss. + stress_impact = { + base = medium_stress_loss + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -1 } + } + } + + after = { + # Clean up our local if we're not a player. + if = { + limit = { + is_ai = yes + this != scope:local_merchant.liege + } + scope:local_merchant = { + death = { death_reason = death_vanished } + } + } + } +} + +################################################## +# Pounding Hooves +# by Ewan Cowhig Croft +# 0071 - 0080 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_0071_drinking_follower_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + drinks_alcohol_trigger = yes + NOR = { + has_trait = temperate + has_trait = shy + } +} + +# Riding with a hangover-stricken friend. +ep3_laamp_flavour_ewan.0071 = { + type = character_event + title = ep3_laamp_flavour_ewan.0071.t + desc = ep3_laamp_flavour_ewan.0071.desc + theme = laamp + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:hanger + animation = stress + } + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_0071 } + } + # And we've got a suitable follower. + any_courtier = { ep3_laamp_flavour_ewan_0071_drinking_follower_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_0071 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_0071 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Try to nab our most party-prone follower. + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_0071_drinking_follower_trigger = yes } + order_by = { + value = diplomacy + if = { + limit = { has_trait = drunkard } + add = 50 + } + if = { + limit = { has_trait = gluttonous } + add = 20 + } + if = { + limit = { has_trait = gregarious } + add = 10 + } + } + save_scope_as = hanger + add_character_modifier = { + modifier = legend_hangover_modifier + months = 3 + } + } + } + + # Slow down for herhim. + option = { + name = ep3_laamp_flavour_ewan.0071.a + + reverse_add_opinion = { + target = scope:hanger + modifier = grateful_opinion + opinion = 30 + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 2 } + } + } + + # Laugh at herhis predicament. + option = { + name = ep3_laamp_flavour_ewan.0071.b + + reverse_add_opinion = { + target = scope:hanger + modifier = annoyed_opinion + opinion = -15 + } + + # Plus stress loss. + stress_impact = { + base = medium_stress_loss + sadistic = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } + + # Kick herhis horse into gear. + option = { + name = ep3_laamp_flavour_ewan.0071.c + + reverse_add_opinion = { + target = scope:hanger + modifier = angry_opinion + opinion = -30 + } + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + this != scope:hanger + } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = proper_jokes_opinion + opinion = 20 + } + } + + stress_impact = { + sadistic = major_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = -0.5 + } + } + } + + # Speed up and leave herhim to his misery. + option = { + name = ep3_laamp_flavour_ewan.0071.d + + reverse_add_opinion = { + target = scope:hanger + modifier = hurt_opinion + opinion = -10 + } + + stress_impact = { + callous = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -1 } + } + } +} + + + + + + + + + + + + +################################################## +# CHILDREARING + +################################################## +# Friends in Low Places +# by Ewan Cowhig Croft +# 1001 - 1010 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1001_valid_other_child_trigger = { + age >= scope:lower_age_bound_temp + age <= scope:upper_age_bound_temp + ep3_laamp_flavour_ewan_available_child_trigger = yes + OR = { + is_lowborn = yes + dynasty.dynasty_prestige_level < @ep3_laamp_flavour_ewan_1001_dynasty_prestige_level + } + NOR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:char_temp } + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:char_temp } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_1001_valid_own_child_trigger = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + num_of_relation_friend <= 1 + # Your child must also be suitably posh (since bastards'n'diff-house children exist). + dynasty ?= { dynasty_prestige_level >= @ep3_laamp_flavour_ewan_1001_dynasty_prestige_level } + save_temporary_scope_as = char_temp + save_temporary_scope_value_as = { + name = lower_age_bound_temp + value = { + add = age + add = -3 + } + } + save_temporary_scope_value_as = { + name = upper_age_bound_temp + value = { + add = age + add = 3 + } + } + root = { + any_courtier = { ep3_laamp_flavour_ewan_1001_valid_other_child_trigger = yes } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_1001_parent_is_important_at_camp_trigger = { + liege = root + OR = { + has_any_court_position = yes + has_important_relationship_with_character_trigger = { CHARACTER = root } + } +} + +# Highborn befriends a lowborn. +ep3_laamp_flavour_ewan.1001 = { + type = character_event + title = ep3_laamp_flavour_ewan.1001.t + desc = ep3_laamp_flavour_ewan.1001.desc + theme = laamp + left_portrait = { + character = scope:own_child + animation = admiration + } + right_portrait = { + character = scope:other_child + animation = happiness + } + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1001 } + } + # You've gotta be suitably posh. + dynasty ?= { dynasty_prestige_level >= @ep3_laamp_flavour_ewan_1001_dynasty_prestige_level } + # You have at least one valid child. + ## This includes checking for a partner child. + any_child = { ep3_laamp_flavour_ewan_1001_valid_own_child_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1001 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1001 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Grab a random child of ours who fits the criteria. + random_child = { + limit = { ep3_laamp_flavour_ewan_1001_valid_own_child_trigger = yes } + save_scope_as = own_child + } + # Ok, now let's sort a partner child. + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_1001_valid_other_child_trigger = yes } + order_by = { + value = diplomacy + # Boost lowborns. + if = { + limit = { is_lowborn = yes } + add = 1000 + } + # And anyone who isn't the spawn of someone important. + if = { + limit = { + NOR = { + mother ?= { ep3_laamp_flavour_ewan_1001_parent_is_important_at_camp_trigger = yes } + father ?= { ep3_laamp_flavour_ewan_1001_parent_is_important_at_camp_trigger = yes } + } + } + add = 100 + } + } + save_scope_as = other_child + } + } + + # Run along then, you two. + option = { + name = ep3_laamp_flavour_ewan.1001.a + + random_list = { + 50 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1001.set_friendship + left_icon = scope:own_child + right_icon = scope:other_child + scope:own_child = { + set_relation_friend = { + reason = friend_children_grew_up_in_same_camp + target = scope:other_child + } + add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 50 + } + } + } + } + 50 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1001.set_hidden_potential_friendship + left_icon = scope:own_child + right_icon = scope:other_child + scope:own_child = { + add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 25 + } + reverse_add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 25 + } + hidden_effect = { set_relation_potential_friend = scope:other_child } + } + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # I think you've made a friend for life there, my DaughterSon. + option = { + name = ep3_laamp_flavour_ewan.1001.b + trigger = { + scope:own_child = { num_of_relation_best_friend <= 0 } + } + + random_list = { + 70 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1001.set_best_friendship + left_icon = scope:own_child + right_icon = scope:other_child + scope:own_child = { + set_relation_best_friend = { + reason = friend_children_grew_up_in_same_camp + target = scope:other_child + } + add_mutual_gendered_blood_sibling_hook_effect = { TARGET = scope:other_child } + } + } + scope:own_child = { + add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 50 + } + } + } + 20 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1001.set_friendship + left_icon = scope:own_child + right_icon = scope:other_child + scope:own_child = { + set_relation_friend = { + reason = friend_children_grew_up_in_same_camp + target = scope:other_child + } + add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 50 + } + } + } + } + 10 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1001.friendship_fizzles + left_icon = scope:own_child + right_icon = scope:other_child + scope:own_child = { + add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 10 + } + reverse_add_opinion = { + target = scope:other_child + modifier = friendliness_opinion + opinion = 10 + } + } + } + } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Child.GetFirstName, GetSheHe's beneath you. + option = { + name = ep3_laamp_flavour_ewan.1001.c + + scope:own_child = { + add_opinion = { + target = scope:other_child + modifier = estranged_opinion + opinion = -25 + } + reverse_add_opinion = { + target = scope:other_child + modifier = hurt_opinion + opinion = -50 + } + hidden_effect = { set_relation_potential_rival = scope:other_child } + } + hidden_effect = { + # Scope:other_child will remember this. + reverse_add_opinion = { + target = scope:other_child + modifier = respect_opinion + opinion = -50 + } + } + + stress_impact = { + arrogant = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } +} + +################################################## +# Learning from Example +# by Ewan Cowhig Croft +# 1011 - 1020 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + # This'll give us a range of 1:2:3 for 1-2:3-4:5 aptitudes. + $OFFICER_CHAR$ = { + save_scope_value_as = { + name = aptitude_gain + value = { + if = { + limit = { has_court_position = second_camp_officer } + add = "aptitude(second_camp_officer)" + } + else_if = { + limit = { has_court_position = quartermaster_camp_officer } + add = "aptitude(quartermaster_camp_officer)" + } + else_if = { + limit = { has_court_position = armorer_camp_officer } + add = "aptitude(armorer_camp_officer)" + } + else_if = { + limit = { has_court_position = chief_forager_camp_officer } + add = "aptitude(chief_forager_camp_officer)" + } + else_if = { + limit = { has_court_position = master_thief_camp_officer } + add = "aptitude(master_thief_camp_officer)" + } + else_if = { + limit = { has_court_position = head_porter_camp_officer } + add = "aptitude(head_porter_camp_officer)" + } + else_if = { + limit = { has_court_position = head_groom_camp_officer } + add = "aptitude(head_groom_camp_officer)" + } + else_if = { + limit = { has_court_position = huntperson_camp_officer } + add = "aptitude(huntperson_camp_officer)" + } + else_if = { + limit = { has_court_position = kennelperson_camp_officer } + add = "aptitude(kennelperson_camp_officer)" + } + else_if = { + limit = { has_court_position = chief_engineer_camp_officer } + add = "aptitude(chief_engineer_camp_officer)" + } + else_if = { + limit = { has_court_position = witness_camp_officer } + add = "aptitude(witness_camp_officer)" + } + else_if = { + limit = { has_court_position = person_haggler_camp_officer } + add = "aptitude(person_haggler_camp_officer)" + } + else_if = { + limit = { has_court_position = camp_cook_camp_officer } + add = "aptitude(camp_cook_camp_officer)" + } + else_if = { + limit = { has_court_position = master_bard_camp_officer } + add = "aptitude(master_bard_camp_officer)" + } + else_if = { + limit = { has_court_position = master_of_arms_camp_officer } + add = "aptitude(master_of_arms_camp_officer)" + } + multiply = 0.5 + ceiling = yes + min = 1 + } + } + } + # Log which skills we want to adjust. + save_scope_value_as = { + name = add_diplomacy + value = $DIPLOMACY$ + } + save_scope_value_as = { + name = add_martial + value = $MARTIAL$ + } + save_scope_value_as = { + name = add_stewardship + value = $STEWARDSHIP$ + } + save_scope_value_as = { + name = add_intrigue + value = $INTRIGUE$ + } + save_scope_value_as = { + name = add_learning + value = $LEARNING$ + } + save_scope_value_as = { + name = add_prowess + value = $PROWESS$ + } + # Finally, increment the appropriate skills. + scope:child = { + if = { + limit = { scope:add_diplomacy = yes } + add_diplomacy_skill = scope:aptitude_gain + } + if = { + limit = { scope:add_martial = yes } + add_martial_skill = scope:aptitude_gain + } + if = { + limit = { scope:add_stewardship = yes } + add_stewardship_skill = scope:aptitude_gain + } + if = { + limit = { scope:add_intrigue = yes } + add_intrigue_skill = scope:aptitude_gain + } + if = { + limit = { scope:add_learning = yes } + add_learning_skill = scope:aptitude_gain + } + if = { + limit = { scope:add_prowess = yes } + add_prowess_skill = scope:aptitude_gain + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { + court_position:$POSITION$_camp_officer ?= { + if = { + limit = { is_available_allow_travelling = yes } + save_scope_as = $POSITION$ + add_to_list = prospective_positions_list + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = { + add_opinion = { + target = scope:child + modifier = little_helper_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = 30 + } +} + +# Learning from officer. +ep3_laamp_flavour_ewan.1011 = { + type = character_event + title = ep3_laamp_flavour_ewan.1011.t + desc = ep3_laamp_flavour_ewan.1011.desc + theme = laamp + left_portrait = { + character = scope:child + animation = admiration + } + lower_left_portrait = scope:portrait_1 + lower_center_portrait = scope:portrait_2 + lower_right_portrait = scope:portrait_3 + override_background = { reference = army_camp } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1011 } + } + any_child = { ep3_laamp_flavour_ewan_available_child_trigger = yes } + OR = { + court_position:second_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:quartermaster_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:armorer_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:chief_forager_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:master_thief_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:head_porter_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:head_groom_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:huntperson_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:kennelperson_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:chief_engineer_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:witness_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:person_haggler_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:camp_cook_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:master_bard_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + court_position:master_of_arms_camp_officer ?= { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1011 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1011 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Pick a suitable child. + ordered_child = { + limit = { ep3_laamp_flavour_ewan_available_child_trigger = yes } + order_by = age + save_scope_as = child + } + # Now process our available court positions. + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = second } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = quartermaster } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = armorer } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = chief_forager } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = master_thief } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = head_porter } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = head_groom } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = huntperson } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = kennelperson } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = chief_engineer } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = witness } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = person_haggler } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = camp_cook } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = master_bard } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = master_of_arms } + ep3_laamp_flavour_ewan_1011_nab_court_position_effect = { POSITION = master_of_spoils } + ## Ok, now that we've got them, go over the list and check who's best at their job. + ordered_in_list = { + list = prospective_positions_list + order_by = { + if = { + limit = { has_court_position = second_camp_officer } + add = "aptitude(second_camp_officer)" + } + else_if = { + limit = { has_court_position = quartermaster_camp_officer } + add = "aptitude(quartermaster_camp_officer)" + } + else_if = { + limit = { has_court_position = armorer_camp_officer } + add = "aptitude(armorer_camp_officer)" + } + else_if = { + limit = { has_court_position = chief_forager_camp_officer } + add = "aptitude(chief_forager_camp_officer)" + } + else_if = { + limit = { has_court_position = master_thief_camp_officer } + add = "aptitude(master_thief_camp_officer)" + } + else_if = { + limit = { has_court_position = head_porter_camp_officer } + add = "aptitude(head_porter_camp_officer)" + } + else_if = { + limit = { has_court_position = head_groom_camp_officer } + add = "aptitude(head_groom_camp_officer)" + } + else_if = { + limit = { has_court_position = huntperson_camp_officer } + add = "aptitude(huntperson_camp_officer)" + } + else_if = { + limit = { has_court_position = kennelperson_camp_officer } + add = "aptitude(kennelperson_camp_officer)" + } + else_if = { + limit = { has_court_position = chief_engineer_camp_officer } + add = "aptitude(chief_engineer_camp_officer)" + } + else_if = { + limit = { has_court_position = witness_camp_officer } + add = "aptitude(witness_camp_officer)" + } + else_if = { + limit = { has_court_position = person_haggler_camp_officer } + add = "aptitude(person_haggler_camp_officer)" + } + else_if = { + limit = { has_court_position = camp_cook_camp_officer } + add = "aptitude(camp_cook_camp_officer)" + } + else_if = { + limit = { has_court_position = master_bard_camp_officer } + add = "aptitude(master_bard_camp_officer)" + } + else_if = { + limit = { has_court_position = master_of_arms_camp_officer } + add = "aptitude(master_of_arms_camp_officer)" + } + else_if = { + limit = { has_court_position = master_of_spoils_camp_officer } + add = "aptitude(master_of_spoils_camp_officer)" + } + } + max = 3 + check_range_bounds = no + if = { + limit = { + NOT = { is_in_list = best_positions_list } + } + add_to_list = best_positions_list + } + } + # Plus sort our portraits. + random_in_list = { + list = best_positions_list + save_scope_as = portrait_1 + } + random_in_list = { + list = best_positions_list + limit = { + this != scope:portrait_1 + } + save_scope_as = portrait_2 + } + random_in_list = { + list = best_positions_list + limit = { + NOR = { + this = scope:portrait_1 + this = scope:portrait_2 + } + } + save_scope_as = portrait_3 + } + } + + # second: picks up diplo + a little of everything. + option = { + name = ep3_laamp_flavour_ewan.1011.a + trigger = { + scope:second ?= { is_in_list = best_positions_list } + } + reason = have_second + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:second + DIPLOMACY = yes + MARTIAL = yes + STEWARDSHIP = no + INTRIGUE = no + LEARNING = no + PROWESS = no + } + scope:second = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # quartermaster: picks up stewardship. + option = { + name = ep3_laamp_flavour_ewan.1011.b + trigger = { + scope:quartermaster ?= { is_in_list = best_positions_list } + } + reason = have_quartermaster + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:quartermaster + DIPLOMACY = no + MARTIAL = no + STEWARDSHIP = yes + INTRIGUE = no + LEARNING = no + PROWESS = no + } + scope:quartermaster = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # armorer: picks up stewardship & learning. + option = { + name = ep3_laamp_flavour_ewan.1011.c + trigger = { + scope:armorer ?= { is_in_list = best_positions_list } + } + reason = have_armorer + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:armorer + DIPLOMACY = no + MARTIAL = no + STEWARDSHIP = yes + INTRIGUE = no + LEARNING = yes + PROWESS = no + } + scope:armorer = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # chief_forager: picks up prowess & learning. + option = { + name = ep3_laamp_flavour_ewan.1011.d + trigger = { + scope:chief_forager ?= { is_in_list = best_positions_list } + } + reason = have_chief_forager + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:chief_forager + DIPLOMACY = no + MARTIAL = no + STEWARDSHIP = no + INTRIGUE = no + LEARNING = yes + PROWESS = yes + } + scope:chief_forager = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # master_thief: picks up intrigue & prowess. + option = { + name = ep3_laamp_flavour_ewan.1011.e + trigger = { + scope:master_thief ?= { is_in_list = best_positions_list } + } + reason = have_master_thief + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:master_thief + DIPLOMACY = no + MARTIAL = no + STEWARDSHIP = no + INTRIGUE = yes + LEARNING = no + PROWESS = yes + } + scope:master_thief = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # head_porter: picks up martial & stewardship. + option = { + name = ep3_laamp_flavour_ewan.1011.f + trigger = { + scope:head_porter ?= { is_in_list = best_positions_list } + } + reason = have_head_porter + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:head_porter + DIPLOMACY = no + MARTIAL = yes + STEWARDSHIP = yes + INTRIGUE = no + LEARNING = no + PROWESS = no + } + scope:head_porter = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # head_groom: picks up learning & stewardship. + option = { + name = ep3_laamp_flavour_ewan.1011.g + trigger = { + scope:head_groom ?= { is_in_list = best_positions_list } + } + reason = have_head_groom + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:head_groom + DIPLOMACY = no + MARTIAL = no + STEWARDSHIP = yes + INTRIGUE = no + LEARNING = yes + PROWESS = no + } + scope:head_groom = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # huntperson: picks up prowess & learning. + option = { + name = ep3_laamp_flavour_ewan.1011.h + trigger = { + scope:huntperson ?= { is_in_list = best_positions_list } + } + reason = have_huntperson + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:huntperson + DIPLOMACY = no + MARTIAL = no + STEWARDSHIP = no + INTRIGUE = no + LEARNING = yes + PROWESS = yes + } + scope:huntperson = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # kennelperson: picks up martial & prowess. + option = { + name = ep3_laamp_flavour_ewan.1011.i + trigger = { + scope:kennelperson ?= { is_in_list = best_positions_list } + } + reason = have_kennelperson + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:kennelperson + DIPLOMACY = no + MARTIAL = yes + STEWARDSHIP = no + INTRIGUE = no + LEARNING = no + PROWESS = yes + } + scope:kennelperson = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # chief_engineer: picks up learning & martial. + option = { + name = ep3_laamp_flavour_ewan.1011.j + trigger = { + scope:chief_engineer ?= { is_in_list = best_positions_list } + } + reason = have_chief_engineer + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:chief_engineer + DIPLOMACY = no + MARTIAL = yes + STEWARDSHIP = no + INTRIGUE = no + LEARNING = yes + PROWESS = no + } + scope:chief_engineer = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # witness: picks up diplomacy. + option = { + name = ep3_laamp_flavour_ewan.1011.k + trigger = { + scope:witness ?= { is_in_list = best_positions_list } + } + reason = have_witness + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:witness + DIPLOMACY = yes + MARTIAL = no + STEWARDSHIP = no + INTRIGUE = no + LEARNING = no + PROWESS = no + } + scope:witness = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # person_haggler: picks up diplomacy, plus a little intrigue + stewardship. + option = { + name = ep3_laamp_flavour_ewan.1011.l + trigger = { + scope:person_haggler ?= { is_in_list = best_positions_list } + } + reason = have_person_haggler + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:person_haggler + DIPLOMACY = yes + MARTIAL = no + STEWARDSHIP = yes + INTRIGUE = yes + LEARNING = no + PROWESS = no + } + scope:person_haggler = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # camp_cook: picks up intrigue. + option = { + name = ep3_laamp_flavour_ewan.1011.m + trigger = { + scope:camp_cook ?= { is_in_list = best_positions_list } + } + reason = have_camp_cook + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:camp_cook + DIPLOMACY = no + MARTIAL = no + STEWARDSHIP = no + INTRIGUE = yes + LEARNING = no + PROWESS = no + } + scope:camp_cook = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # master_bard: picks up diplomacy + learning. + option = { + name = ep3_laamp_flavour_ewan.1011.n + trigger = { + scope:master_bard ?= { is_in_list = best_positions_list } + } + reason = have_master_bard + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:master_bard + DIPLOMACY = yes + MARTIAL = no + STEWARDSHIP = no + INTRIGUE = no + LEARNING = yes + PROWESS = no + } + scope:master_bard = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # master_of_arms: picks up martial + prowess. + option = { + name = ep3_laamp_flavour_ewan.1011.o + trigger = { + scope:master_of_arms ?= { is_in_list = best_positions_list } + } + reason = have_master_of_arms + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:master_of_arms + DIPLOMACY = no + MARTIAL = yes + STEWARDSHIP = no + INTRIGUE = no + LEARNING = no + PROWESS = yes + } + scope:master_of_arms = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } + + # master_of_spoils: picks up martial + prowess. + option = { + name = ep3_laamp_flavour_ewan.1011.o + trigger = { + scope:master_of_spoils ?= { is_in_list = best_positions_list } + } + reason = have_master_of_spoils + + ep3_laamp_flavour_ewan_1011_random_skill_gain_effect = { + OFFICER_CHAR = scope:master_of_spoils + DIPLOMACY = no + MARTIAL = yes + STEWARDSHIP = yes + INTRIGUE = no + LEARNING = no + PROWESS = yes + } + scope:master_of_spoils = { ep3_laamp_flavour_ewan_1011_apply_little_helper_opinion_effect = yes } + + # No stress here. + ai_chance = { + # Pick an option at random, they're all good. + base = 1 + } + } +} + +################################################## +# Love at First Camp +# by Ewan Cowhig Croft +# 1021 - 1030 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1021_valid_child_trigger = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + num_of_relation_crush <= 0 + NOR = { + has_sexuality = none + # Not that you can't have a crush as a young asexual, we're just not really equipped to deal well with that complexity here. + has_sexuality = asexual + } +} + +# Crush on a local girl/boy. +ep3_laamp_flavour_ewan.1021 = { + type = character_event + title = ep3_laamp_flavour_ewan.1021.t + desc = ep3_laamp_flavour_ewan.1021.desc + theme = laamp + left_portrait = { + character = scope:child + animation = flirtation_left + } + right_portrait = { + character = scope:crush_child + animation = admiration + } + lower_center_portrait = scope:crush_mother + lower_right_portrait = scope:crush_father + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1021 } + } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Make sure we have suitable children. + any_child = { ep3_laamp_flavour_ewan_1021_valid_child_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1021 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1021 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_longer + } + } + # Now let's grab a suitable child. + ordered_child = { + limit = { ep3_laamp_flavour_ewan_1021_valid_child_trigger = yes } + order_by = { + value = age + if = { + limit = { has_trait = lustful } + add = 10 + } + else_if = { + limit = { has_trait = chaste } + add = -10 + } + } + save_scope_as = child + # For determining crush gender. + save_scope_as = attraction_check + } + # And create a suitable local family. + ## Mother. + create_character = { + template = generic_peasant_character + age = 35 + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 100 + save_scope_as = crush_mother + after_creation = { + save_scope_value_as = { + name = crush_parents_age_diff + value = { + value = age + add = { + integer_range = { + min = -5 + max = 5 + } + } + } + } + } + } + ## Father. + create_character = { + template = generic_peasant_character + age = scope:crush_parents_age_diff + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = 0 + save_scope_as = crush_father + } + ## Marry these two up — we can't be having children out of wedlock, after all. The very idea! + hidden_effect = { + scope:crush_mother = { + if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + marry_matrilineal = scope:crush_father + } + else = { marry = scope:crush_father } + } + } + ## Child. + create_character = { + location = root.location + age = { + value = scope:child.age + add = 1 + } + culture = root.location.culture + faith = root.location.faith + gender_female_chance = scope_attraction_based_female_chance + mother = scope:crush_mother + father = scope:crush_father + dynasty = none + # Try to duplicate scope:child's personality. + random_traits_list = { + count = 3 + lustful = { + trigger = { + scope:child = { has_trait = lustful } + } + } + chaste = { + trigger = { + scope:child = { has_trait = chaste } + } + } + gluttonous = { + trigger = { + scope:child = { has_trait = gluttonous } + } + } + temperate = { + trigger = { + scope:child = { has_trait = temperate } + } + } + greedy = { + trigger = { + scope:child = { has_trait = greedy } + } + } + generous = { + trigger = { + scope:child = { has_trait = generous } + } + } + lazy = { + trigger = { + scope:child = { has_trait = lazy } + } + } + diligent = { + trigger = { + scope:child = { has_trait = diligent } + } + } + wrathful = { + trigger = { + scope:child = { has_trait = wrathful } + } + } + calm = { + trigger = { + scope:child = { has_trait = calm } + } + } + patient = { + trigger = { + scope:child = { has_trait = patient } + } + } + impatient = { + trigger = { + scope:child = { has_trait = impatient } + } + } + arrogant = { + trigger = { + scope:child = { has_trait = arrogant } + } + } + humble = { + trigger = { + scope:child = { has_trait = humble } + } + } + deceitful = { + trigger = { + scope:child = { has_trait = deceitful } + } + } + honest = { + trigger = { + scope:child = { has_trait = honest } + } + } + craven = { + trigger = { + scope:child = { has_trait = craven } + } + } + brave = { + trigger = { + scope:child = { has_trait = brave } + } + } + shy = { + trigger = { + scope:child = { has_trait = shy } + } + } + gregarious = { + trigger = { + scope:child = { has_trait = gregarious } + } + } + ambitious = { + trigger = { + scope:child = { has_trait = ambitious } + } + } + content = { + trigger = { + scope:child = { has_trait = content } + } + } + arbitrary = { + trigger = { + scope:child = { has_trait = arbitrary } + } + } + just = { + trigger = { + scope:child = { has_trait = just } + } + } + cynical = { + trigger = { + scope:child = { has_trait = cynical } + } + } + zealous = { + trigger = { + scope:child = { has_trait = zealous } + } + } + paranoid = { + trigger = { + scope:child = { has_trait = paranoid } + } + } + trusting = { + trigger = { + scope:child = { has_trait = trusting } + } + } + compassionate = { + trigger = { + scope:child = { has_trait = compassionate } + } + } + callous = { + trigger = { + scope:child = { has_trait = callous } + } + } + sadistic = { + trigger = { + scope:child = { has_trait = sadistic } + } + } + stubborn = { + trigger = { + scope:child = { has_trait = stubborn } + } + } + fickle = { + trigger = { + scope:child = { has_trait = fickle } + } + } + vengeful = { + trigger = { + scope:child = { has_trait = vengeful } + } + } + forgiving = { + trigger = { + scope:child = { has_trait = forgiving } + } + } + eccentric = { + trigger = { + scope:child = { has_trait = eccentric } + } + } + } + # Including childhood traits, if necessary. + random_traits_list = { + count = 1 + rowdy = { + trigger = { + number_of_personality_traits < 3 + scope:child = { has_trait = rowdy } + } + } + charming = { + trigger = { + number_of_personality_traits < 3 + scope:child = { has_trait = charming } + } + } + curious = { + trigger = { + number_of_personality_traits < 3 + scope:child = { has_trait = curious } + } + } + pensive = { + trigger = { + number_of_personality_traits < 3 + scope:child = { has_trait = pensive } + } + } + bossy = { + trigger = { + number_of_personality_traits < 3 + scope:child = { has_trait = bossy } + } + } + } + # And then, for good measure, we apply a fallback. + random_traits = yes + martial = { + min_template_medium_skill + max_template_medium_skill + } + stewardship = { + min_template_medium_skill + max_template_medium_skill + } + diplomacy = { + min_template_medium_skill + max_template_medium_skill + } + intrigue = { + min_template_medium_skill + max_template_medium_skill + } + learning = { + min_template_medium_skill + max_template_medium_skill + } + prowess = { + min_template_medium_skill + max_template_medium_skill + } + save_scope_as = crush_child + after_creation = { + random_list = { + 200 = { + # Character is of average weight, nothing happens + } + 25 = { change_current_weight = -25 } + 25 = { change_current_weight = -75 } + 25 = { change_current_weight = 25 } + 25 = { change_current_weight = 75 } + } + add_character_flag = peasant_outfit + } + } + # Tooltips are borked and can't be fixed without loc (even if we launder the event's immediate so that the spawned chars don't screw things up, it looks dodgy), so we hide the actual crush effect. + hidden_effect = { + scope:child = { + set_relation_crush = scope:crush_child + add_relation_flag = { + relation = crush + target = scope:crush_child + flag = auto_progress_to_lover + } + } + scope:crush_child = { + if = { + limit = { is_adult = no } + set_relation_crush = scope:child + } + else = { + add_opinion = { + target = scope:child + modifier = compliment_opinion + opinion = 20 + } + } + } + } + } + + # I suppose we could accommodate another family. + option = { + name = ep3_laamp_flavour_ewan.1021.a + + domicile = { change_provisions = major_provisions_loss } + + scope:child = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + add_opinion = { + target = scope:crush_child + modifier = childhood_crush + opinion = 100 + } + reverse_add_opinion = { + target = scope:crush_child + modifier = childhood_crush + opinion = 100 + } + } + add_courtier = scope:crush_child + add_courtier = scope:crush_mother + reverse_add_opinion = { + target = scope:crush_mother + modifier = grateful_opinion + opinion = 20 + } + add_courtier = scope:crush_father + reverse_add_opinion = { + target = scope:crush_father + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # You will stop seeing them this instant! + option = { + name = ep3_laamp_flavour_ewan.1021.b + + scope:child = { + remove_relation_crush = scope:crush_child + add_opinion = { + target = root + modifier = overreaction_opinion + opinion = -40 + } + } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } + + # Surely just a GetSeason fling. + option = { + name = ep3_laamp_flavour_ewan.1021.c + + random_list = { + 100 = { + desc = ep3_laamp_flavour_ewan.1021.c.crush_endures + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1021.c.crush_endures + left_icon = scope:child + right_icon = scope:crush_child + scope:child = { + add_opinion = { + target = scope:crush_child + modifier = childhood_crush + opinion = 50 + } + reverse_add_opinion = { + target = scope:crush_child + modifier = childhood_crush + opinion = 50 + } + } + } + } + 100 = { + desc = ep3_laamp_flavour_ewan.1021.c.crush_fades + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1021.c.crush_fades + left_icon = scope:child + right_icon = scope:crush_child + scope:child = { remove_relation_crush = scope:crush_child } + } + } + } + + # No stress here, you just don't involve yourself. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -1 } + } + } + + after = { + # If we've no connexion left, dispose of our peasants. + if = { + limit = { + scope:child = { + NOT = { has_relation_crush = scope:crush_child } + } + } + scope:crush_mother = { + death = { death_reason = death_vanished } + } + scope:crush_father = { + death = { death_reason = death_vanished } + } + scope:crush_child = { + death = { death_reason = death_vanished } + } + } + } +} + +################################################## +# Nurture +# by Ewan Cowhig Croft +# 1031 - 1040 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + # Gain a certain childhood personality trait. + scope:child = { + if = { + limit = { + number_of_personality_traits < 3 + NOR = { + has_trait = rowdy + has_trait = charming + has_trait = curious + has_trait = pensive + has_trait = bossy + } + } + add_trait = $CHILDHOOD_TRAIT$ + } + # Else, gain a certain trait. + else_if = { + limit = { + number_of_personality_traits < 3 + NOR = { + has_trait = $TRAIT_1$ + has_trait = $TRAIT_2$ + has_trait = $TRAIT_3$ + has_trait = $TRAIT_4$ + has_trait = $TRAIT_5$ + } + } + random_list = { + 100 = { + trigger = { + NOT = { has_trait = $TRAIT_1$ } + } + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1031.tt.trait_adopted + left_icon = scope:child + scope:child = { add_trait = $TRAIT_1$ } + } + } + } + 100 = { + trigger = { + NOT = { has_trait = $TRAIT_2$ } + } + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1031.tt.trait_adopted + left_icon = scope:child + scope:child = { add_trait = $TRAIT_2$ } + } + } + } + 100 = { + trigger = { + NOT = { has_trait = $TRAIT_3$ } + } + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1031.tt.trait_adopted + left_icon = scope:child + scope:child = { add_trait = $TRAIT_3$ } + } + } + } + 100 = { + trigger = { + NOT = { has_trait = $TRAIT_4$ } + } + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1031.tt.trait_adopted + left_icon = scope:child + scope:child = { add_trait = $TRAIT_4$ } + } + } + } + 100 = { + trigger = { + NOT = { has_trait = $TRAIT_5$ } + } + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1031.tt.trait_adopted + left_icon = scope:child + scope:child = { add_trait = $TRAIT_5$ } + } + } + } + } + # Clean up our childhood traits if we've just capped out. + hidden_effect = { ep3_laamp_flavour_ewan_clean_up_excess_childhood_traits_effect = yes } + } + # Else, gain skill points. + else = { + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1031.tt.skill_gain + left_icon = scope:child + scope:child = { add_$SKILL$_skill = scope:fallback_skill_gain } + } + } + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_1031_roll_duel_effect = { + duel = { + skill = $EDUCATION$ + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1031.g.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1031.g.tt.success + left_icon = scope:child + scope:child = { add_$EDUCATION$_skill = 2 } + } + } + # Defeat! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1031.g.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1031.g.tt.failure + left_icon = scope:child + scope:child = { add_$EDUCATION$_skill = -1 } + } + } + } +} + +# Taking after camp purpose. +ep3_laamp_flavour_ewan.1031 = { + type = character_event + title = ep3_laamp_flavour_ewan.1031.t + desc = { + desc = ep3_laamp_flavour_ewan.1031.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_realm_law = camp_purpose_wanderers } + desc = ep3_laamp_flavour_ewan.1031.desc.purpose.wanderers + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_mercenaries } + desc = ep3_laamp_flavour_ewan.1031.desc.purpose.mercenaries + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_scholars } + desc = ep3_laamp_flavour_ewan.1031.desc.purpose.scholars + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_explorers } + desc = ep3_laamp_flavour_ewan.1031.desc.purpose.explorers + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_brigands } + desc = ep3_laamp_flavour_ewan.1031.desc.purpose.brigands + } + triggered_desc = { + trigger = { has_realm_law = camp_purpose_legitimists } + desc = ep3_laamp_flavour_ewan.1031.desc.purpose.legitimists + } + } + desc = ep3_laamp_flavour_ewan.1031.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:child + triggered_animation = { + trigger = { + root = { + OR = { + has_realm_law = camp_purpose_mercenaries + has_realm_law = camp_purpose_brigands + } + } + } + animation = marshal_wooden_sword + } + animation = personality_bold + } + override_background = { reference = army_camp } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1031 } + } + # Must have a suitable child. + any_child = { ep3_laamp_flavour_ewan_available_child_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1031 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1031 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_short + } + } + random_child = { + limit = { ep3_laamp_flavour_ewan_available_child_trigger = yes } + weight = { + modifier = { + add = age + always = yes + } + modifier = { + add = 10 + has_trait = diligent + } + modifier = { + add = -10 + has_trait = lazy + } + } + save_scope_as = child + } + # Roll our fallback skill gain, so that it's set for the final tooltip. + save_scope_value_as = { + name = fallback_skill_gain + value = { + integer_range = { + min = 1 + max = 3 + } + } + } + } + + # Wanderers: Ahhh, the wanderlust has got 'er'im. + option = { + name = ep3_laamp_flavour_ewan.1031.a + trigger = { has_realm_law = camp_purpose_wanderers } + reason = purpose_wanderers + + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = curious + TRAIT_1 = diligent + TRAIT_2 = calm + TRAIT_3 = humble + TRAIT_4 = brave + TRAIT_5 = eccentric + SKILL = diplomacy + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Mercenaries: SheHe'll be a warrior some day. + option = { + name = ep3_laamp_flavour_ewan.1031.b + trigger = { has_realm_law = camp_purpose_mercenaries } + reason = purpose_mercenaries + + if = { + limit = { has_trait = education_martial } + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = rowdy + TRAIT_1 = brave + TRAIT_2 = wrathful + TRAIT_3 = content + TRAIT_4 = callous + TRAIT_5 = gregarious + SKILL = prowess + } + } + else = { + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = rowdy + TRAIT_1 = brave + TRAIT_2 = wrathful + TRAIT_3 = content + TRAIT_4 = callous + TRAIT_5 = gregarious + SKILL = martial + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Scholars: such enthusiasm in one so young! + option = { + name = ep3_laamp_flavour_ewan.1031.c + trigger = { has_realm_law = camp_purpose_scholars } + reason = purpose_scholars + + if = { + limit = { has_trait = education_learning } + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = pensive + TRAIT_1 = temperate + TRAIT_2 = patient + TRAIT_3 = calm + TRAIT_4 = shy + TRAIT_5 = stubborn + SKILL = diplomacy + } + } + else = { + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = pensive + TRAIT_1 = temperate + TRAIT_2 = patient + TRAIT_3 = calm + TRAIT_4 = shy + TRAIT_5 = stubborn + SKILL = learning + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Explorers: I wonder what sights SheHe'll see... + option = { + name = ep3_laamp_flavour_ewan.1031.d + trigger = { has_realm_law = camp_purpose_explorers } + reason = purpose_explorers + + if = { + limit = { has_trait = education_diplomacy } + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = charming + TRAIT_1 = gregarious + TRAIT_2 = brave + TRAIT_3 = ambitious + TRAIT_4 = fickle + TRAIT_5 = eccentric + SKILL = stewardship + } + } + else = { + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = charming + TRAIT_1 = gregarious + TRAIT_2 = brave + TRAIT_3 = ambitious + TRAIT_4 = fickle + TRAIT_5 = eccentric + SKILL = diplomacy + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Brigands: it'll serve HerHim well. + option = { + name = ep3_laamp_flavour_ewan.1031.e + trigger = { has_realm_law = camp_purpose_brigands } + reason = purpose_brigands + + if = { + limit = { has_trait = education_intrigue } + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = rowdy + TRAIT_1 = deceitful + TRAIT_2 = arbitrary + TRAIT_3 = callous + TRAIT_4 = sadistic + TRAIT_5 = paranoid + SKILL = prowess + } + } + else = { + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = rowdy + TRAIT_1 = deceitful + TRAIT_2 = arbitrary + TRAIT_3 = callous + TRAIT_4 = sadistic + TRAIT_5 = paranoid + SKILL = intrigue + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Legitimists: such ambition is only natural. + option = { + name = ep3_laamp_flavour_ewan.1031.f + trigger = { has_realm_law = camp_purpose_legitimists } + reason = purpose_legitimists + + if = { + limit = { has_trait = education_diplomacy } + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = bossy + TRAIT_1 = ambitious + TRAIT_2 = arrogant + TRAIT_3 = diligent + TRAIT_4 = patient + TRAIT_5 = vengeful + SKILL = prowess + } + } + else = { + ep3_laamp_flavour_ewan_1031_apply_changes_effect = { + CHILDHOOD_TRAIT = bossy + TRAIT_1 = ambitious + TRAIT_2 = arrogant + TRAIT_3 = diligent + TRAIT_4 = patient + TRAIT_5 = vengeful + SKILL = diplomacy + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Perhaps we could consider another path? + option = { + name = ep3_laamp_flavour_ewan.1031.g + trait = education_diplomacy_1 + trait = education_diplomacy_2 + trait = education_diplomacy_3 + trait = education_diplomacy_4 + trait = education_diplomacy_5 + trait = education_martial_1 + trait = education_martial_2 + trait = education_martial_3 + trait = education_martial_4 + trait = education_martial_5 + trait = education_stewardship_1 + trait = education_stewardship_2 + trait = education_stewardship_3 + trait = education_stewardship_4 + trait = education_stewardship_5 + trait = education_intrigue_1 + trait = education_intrigue_2 + trait = education_intrigue_3 + trait = education_intrigue_4 + trait = education_intrigue_5 + trait = education_learning_1 + trait = education_learning_2 + trait = education_learning_3 + trait = education_learning_4 + trait = education_learning_5 + + # Roll a different duel depending on our education. + switch = { + trigger = has_trait + education_diplomacy = { + ep3_laamp_flavour_ewan_1031_roll_duel_effect = { EDUCATION = diplomacy } + } + education_martial = { + ep3_laamp_flavour_ewan_1031_roll_duel_effect = { EDUCATION = martial } + } + education_stewardship = { + ep3_laamp_flavour_ewan_1031_roll_duel_effect = { EDUCATION = stewardship } + } + education_intrigue = { + ep3_laamp_flavour_ewan_1031_roll_duel_effect = { EDUCATION = intrigue } + } + education_learning = { + ep3_laamp_flavour_ewan_1031_roll_duel_effect = { EDUCATION = learning } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 2 } + } + } + + # *sigh* Stop that, GirlBoy. + option = { + name = ep3_laamp_flavour_ewan.1031.h + + scope:child = { add_stress = medium_stress_gain } + add_prestige = minor_prestige_gain + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -0.5 } + } + } +} + +################################################## +# The Old Country +# by Ewan Cowhig Croft +# 1041 - 1050 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1041_valid_memory_trigger = { + has_memory_type = became_landless_adventurer_memory + memory_age_years >= { + value = @ep3_laamp_flavour_ewan_1041_years_since_rule + add = $CHILD$.age + } +} + +# Child too young to remember asks what old home was like. +ep3_laamp_flavour_ewan.1041 = { + type = character_event + title = ep3_laamp_flavour_ewan.1041.t + desc = ep3_laamp_flavour_ewan.1041.desc + theme = laamp + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:child + animation = admiration + } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1041 } + } + # We must've actually ruled somewhere — if we're a player. The AI won't care for this verisimilitude. + trigger_if = { + limit = { is_ai = no } + any_claim = { + any_past_holder_reversed = { this = root } + } + } + # And have a suitable child available. + ## This _should_ go in order of available children by the trigger, so it _should_ be ordered by age already. + any_child = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + save_temporary_scope_as = child_temp + } + # Finally, check that enough time has passed that the child might not remember the Old Country. + any_memory = { + ep3_laamp_flavour_ewan_1041_valid_memory_trigger = { CHILD = scope:child_temp } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1041 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1041 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Grab our child. + ordered_child = { + limit = { ep3_laamp_flavour_ewan_available_child_trigger = yes } + order_by = age + save_scope_as = child + } + # Grab our memory. + random_memory = { + limit = { + ep3_laamp_flavour_ewan_1041_valid_memory_trigger = { CHILD = scope:child } + } + save_scope_as = memory + } + } + + # It was beautiful, little one. + option = { + name = ep3_laamp_flavour_ewan.1041.a + + random_list = { + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1041.a.tt.diplomacy + left_icon = scope:child + scope:child = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_1041_beautiful_home_diplomacy_modifier + years = 10 + } + } + } + } + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1041.a.tt.stewardship + left_icon = scope:child + scope:child = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_1041_beautiful_home_stewardship_modifier + years = 10 + } + } + } + } + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1041.a.tt.learning + left_icon = scope:child + scope:child = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_1041_beautiful_home_learning_modifier + years = 10 + } + } + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 2 } + } + } + + # A horrid place that spurned us. + option = { + name = ep3_laamp_flavour_ewan.1041.b + + random_list = { + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1041.b.tt.martial + left_icon = scope:child + scope:child = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_1041_horrible_home_martial_modifier + years = 10 + } + } + } + } + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1041.b.tt.intrigue + left_icon = scope:child + scope:child = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_1041_horrible_home_intrigue_modifier + years = 10 + } + } + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -2 } + } + } + + # legitimists: some day, you'll know it for yourself. + option = { + name = ep3_laamp_flavour_ewan.1041.c + trigger = { has_realm_law = camp_purpose_legitimists } + reason = purpose_legitimists + + scope:child = { + # Try to give them the ambitious trait. + if = { + limit = { + number_of_personality_traits <= 3 + NOT = { has_trait = ambitious } + } + add_trait = ambitious + hidden_effect = { ep3_laamp_flavour_ewan_clean_up_excess_childhood_traits_effect = yes } + } + # Else, give them a nice modifier. + else = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_1041_rightful_home_modifier + years = 10 + } + } + add_opinion = { + target = root + modifier = stories_of_righteous_return_opinion + opinion = 30 + } + } + + stress_impact = { + base = minor_stress_loss + ambitious = medium_stress_impact_loss + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # not legitimists: maybe we'll return some day. Ask me then. + option = { + name = ep3_laamp_flavour_ewan.1041.d + trigger = { + NOT = { has_realm_law = camp_purpose_legitimists } + } + + reverse_add_opinion = { + target = scope:child + modifier = stories_of_righteous_return_opinion + opinion = 30 + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # I won't speak of it. + option = { + name = ep3_laamp_flavour_ewan.1041.e + + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -10 + } + + # Most of the effect here is in the stress loss. + stress_impact = { + base = medium_stress_loss + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -2 } + } + } +} + +################################################## +# It Isn't Fair +# by Ewan Cowhig Croft +# 1051 - 1060 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1051_valid_memory_trigger = { + has_memory_type = became_landless_adventurer_memory + memory_age_years >= 5 +} + +scripted_trigger ep3_laamp_flavour_ewan_1051_valid_child_trigger = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + NOR = { + has_trait = humble + has_trait = content + } +} + +scripted_effect ep3_laamp_flavour_ewan_1051_roll_duel_effect = { + save_scope_value_as = { + name = duel_diff + value = { + value = scope:child.$SKILL$ + add = 7 + max = very_high_skill_rating + } + } + duel = { + skill = $SKILL$ + value = scope:duel_diff + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1051.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1051.tt.success + left_icon = scope:child + scope:child = { + add_$SKILL$_lifestyle_perk_points = 1 + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + add_stress = major_stress_loss + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1051.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1051.tt.failure + left_icon = scope:child + reverse_add_opinion = { + target = scope:child + modifier = hate_opinion + opinion = -30 + } + random = { + chance = 35 + add_trait = depressed_1 + } + } + } + } +} + +# Child unhappy with life on the road. +ep3_laamp_flavour_ewan.1051 = { + type = character_event + title = ep3_laamp_flavour_ewan.1051.t + desc = ep3_laamp_flavour_ewan.1051.desc + theme = laamp + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:child + animation = rage + } + override_background = { reference = corridor_night } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1051 } + } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Valid child. + any_child = { ep3_laamp_flavour_ewan_1051_valid_child_trigger = yes } + # Valid memory. + any_memory = { ep3_laamp_flavour_ewan_1051_valid_memory_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1051 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1051 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Grab our best child. + random_child = { + limit = { ep3_laamp_flavour_ewan_1051_valid_child_trigger = yes } + weight = { + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 10 + has_trait = ambitious + } + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 10 + has_trait = impatient + } + modifier = { + add = 10 + has_trait = wrathful + } + modifier = { + add = -10 + has_trait = diligent + } + modifier = { + add = -10 + has_trait = patient + } + modifier = { + add = -10 + has_trait = calm + } + } + save_scope_as = child + add_stress = major_stress_gain + } + # And our memory. + random_memory = { + limit = { ep3_laamp_flavour_ewan_1051_valid_memory_trigger = yes } + save_scope_as = memory + } + } + + # Come here, my GirlBoy. + option = { + name = ep3_laamp_flavour_ewan.1051.a + + ep3_laamp_flavour_ewan_1051_roll_duel_effect = { SKILL = diplomacy } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 2 } + } + } + + # Fair? You're a House.GetName! Stand up straight! + option = { + name = ep3_laamp_flavour_ewan.1051.b + + ep3_laamp_flavour_ewan_1051_roll_duel_effect = { SKILL = martial } + + stress_impact = { + arrogant = minor_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + } + } + + # I know, but it is what it is. + option = { + name = ep3_laamp_flavour_ewan.1051.c + + ep3_laamp_flavour_ewan_1051_roll_duel_effect = { SKILL = learning } + + stress_impact = { + content = minor_stress_impact_loss + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -2 } + } + } + + # Leave HerHim to tantrum. + option = { + name = ep3_laamp_flavour_ewan.1051.d + + random_list = { + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1051.d.tt.annoyance_fades + left_icon = scope:child + scope:child = { add_stress = major_stress_loss } + } + } + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1051.d.tt.grudge_held + left_icon = scope:child + reverse_add_opinion = { + target = scope:child + modifier = grudge_opinion + opinion = -35 + } + random = { + chance = 50 + add_trait = depressed_1 + } + } + } + } + + stress_impact = { + callous = minor_stress_impact_loss + lazy = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + opinion_modifier = { + opinion_target = scope:child + multiplier = -1 + } + } + } +} + +################################################## +# Quick Study +# by Ewan Cowhig Croft +# 1061 - 1070 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1061_valid_child_trigger = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + NOT = { knows_language_of_culture = root.location.culture } + current_extra_languages < language_soft_cap +} + +# Child picks up local language quickly. +ep3_laamp_flavour_ewan.1061 = { + type = character_event + title = ep3_laamp_flavour_ewan.1061.t + desc = ep3_laamp_flavour_ewan.1061.desc + theme = laamp + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:child + animation = personality_bold + } + override_background = { reference = ep3_campfire } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1061 } + } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Must have a suitable child. + any_child = { ep3_laamp_flavour_ewan_1061_valid_child_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1061 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1061 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_short + } + } + # Grab a suitable child. + random_child = { + limit = { ep3_laamp_flavour_ewan_1061_valid_child_trigger = yes } + weight = { + modifier = { + add = learning + always = yes + } + } + save_scope_as = child + } + # Teach them the language. + scope:child = { learn_language_of_culture = root.location.culture } + # Save our county for loc. + location.county = { save_scope_as = current_county } + } + + # Hmm, smart GirlBoy. + option = { + name = ep3_laamp_flavour_ewan.1061.a + + add_prestige = minor_prestige_gain + scope:child = { add_prestige = medium_prestige_gain } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -1 } + } + } + + # Maybe they could teach me... + option = { + name = ep3_laamp_flavour_ewan.1061.b + trigger = { + NOT = { knows_language_of_culture = root.location.culture } + current_extra_languages < language_soft_cap + } + + duel = { + skill = learning + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1061.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1061.b.tt.success + left_icon = scope:child + learn_language_of_culture = root.location.culture + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1061.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1061.b.tt.failure + left_icon = scope:child + add_stress = medium_stress_gain + } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } + + # Get that foreign muck out of your mouth! + option = { + name = ep3_laamp_flavour_ewan.1061.c + trigger = { + NOT = { + root.culture = { has_same_culture_language = root.location.culture } + } + } + + scope:child = { + unlearn_language_of_culture = root.location.culture + add_opinion = { + target = root + modifier = kindness_opinion + opinion = -10 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 1 + modifier = { + add = { + value = "culture.cultural_acceptance(root.location.culture)" + multiply = -2 + } + always = yes + } + } + } +} + +################################################## +# At the Edge of Camp +# by Ewan Cowhig Croft +# 1071 - 1080 +################################################## + +# Children playing in local terrain. +ep3_laamp_flavour_ewan.1071 = { + type = character_event + title = ep3_laamp_flavour_ewan.1071.t + desc = { + desc = ep3_laamp_flavour_ewan.1071.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:terrain_type = flag:plains } + desc = ep3_laamp_flavour_ewan.1071.desc.plains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:farmlands } + desc = ep3_laamp_flavour_ewan.1071.desc.farmlands + } + triggered_desc = { + trigger = { scope:terrain_type = flag:hills } + desc = ep3_laamp_flavour_ewan.1071.desc.hills + } + triggered_desc = { + trigger = { scope:terrain_type = flag:mountains } + desc = ep3_laamp_flavour_ewan.1071.desc.mountains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert } + desc = ep3_laamp_flavour_ewan.1071.desc.desert + } + triggered_desc = { + trigger = { scope:terrain_type = flag:desert_mountains } + desc = ep3_laamp_flavour_ewan.1071.desc.desert_mountains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:oasis } + desc = ep3_laamp_flavour_ewan.1071.desc.oasis + } + triggered_desc = { + trigger = { scope:terrain_type = flag:jungle } + desc = ep3_laamp_flavour_ewan.1071.desc.jungle + } + triggered_desc = { + trigger = { scope:terrain_type = flag:forest } + desc = ep3_laamp_flavour_ewan.1071.desc.forest + } + triggered_desc = { + trigger = { scope:terrain_type = flag:taiga } + desc = ep3_laamp_flavour_ewan.1071.desc.taiga + } + triggered_desc = { + trigger = { scope:terrain_type = flag:wetlands } + desc = ep3_laamp_flavour_ewan.1071.desc.wetlands + } + triggered_desc = { + trigger = { scope:terrain_type = flag:steppe } + desc = ep3_laamp_flavour_ewan.1071.desc.steppe + } + triggered_desc = { + trigger = { scope:terrain_type = flag:floodplains } + desc = ep3_laamp_flavour_ewan.1071.desc.floodplains + } + triggered_desc = { + trigger = { scope:terrain_type = flag:drylands } + desc = ep3_laamp_flavour_ewan.1071.desc.drylands + } + } + desc = ep3_laamp_flavour_ewan.1071.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:own_child + animation = happiness + } + lower_left_portrait = scope:extra_child_3 + lower_center_portrait = scope:extra_child_2 + lower_right_portrait = scope:extra_child_1 + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1071 } + } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Don't let the children out to play during a plague. + location = { + any_province_epidemic = { count <= 0 } + } + # And have a suitable named child of our own. + any_child = { ep3_laamp_flavour_ewan_available_child_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1071 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1071 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Grab our terrain. + ep3_laamp_flavour_ewan_register_terrain_effect = yes + # Sort our child scopes. + random_child = { + limit = { ep3_laamp_flavour_ewan_available_child_trigger = yes } + save_scope_as = own_child + add_to_list = playing_children_list + add_stress = major_stress_loss + } + ordered_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + this != scope:own_child + } + # Grab the children closest in age to our chosen child. + order_by = { + value = 100 + if = { + limit = { age > scope:own_child.age } + add = { + value = scope:own_child.age + subtract = age + } + } + else_if = { + limit = { age < scope:own_child.age } + add = { + value = scope:own_child.age + subtract = age + multiply = -1 + } + } + } + max = 3 + check_range_bounds = no + if = { + limit = { + NOT = { exists = scope:extra_child_1 } + } + save_scope_as = extra_child_1 + add_to_list = playing_children_list + add_stress = major_stress_loss + } + else_if = { + limit = { + NOT = { + this = scope:extra_child_1 + exists = scope:extra_child_2 + } + } + save_scope_as = extra_child_2 + add_to_list = playing_children_list + add_stress = major_stress_loss + } + else_if = { + limit = { + NOT = { + this = scope:extra_child_1 + this = scope:extra_child_2 + exists = scope:extra_child_3 + } + } + save_scope_as = extra_child_3 + add_to_list = playing_children_list + add_stress = major_stress_loss + } + # Set up future friendships. + hidden_effect = { + every_in_list = { + list = playing_children_list + save_scope_as = char_temp + every_in_list = { + list = playing_children_list + if = { + limit = { + this != scope:char_temp + can_set_relation_potential_friend_trigger = { CHARACTER = scope:char_temp } + } + set_relation_potential_friend = scope:char_temp + } + } + } + } + } + } + + # Stay within sight! + option = { + name = ep3_laamp_flavour_ewan.1071.a + + random_list = { + 100 = { + every_in_list = { + list = playing_children_list + custom = ep3_laamp_flavour_ewan.1071.tt.every_playing_child + add_diplomacy_lifestyle_perk_points = 1 + } + } + 100 = { + every_in_list = { + list = playing_children_list + custom = ep3_laamp_flavour_ewan.1071.tt.every_playing_child + add_stewardship_lifestyle_perk_points = 1 + } + } + 100 = { + every_in_list = { + list = playing_children_list + custom = ep3_laamp_flavour_ewan.1071.tt.every_playing_child + add_intrigue_lifestyle_perk_points = 1 + } + } + } + + stress_impact = { + paranoid = medium_stress_impact_loss + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } + + # Go on, explore. + option = { + name = ep3_laamp_flavour_ewan.1071.b + + random_list = { + 100 = { + every_in_list = { + list = playing_children_list + custom = ep3_laamp_flavour_ewan.1071.tt.every_playing_child + add_martial_lifestyle_perk_points = 1 + } + } + 100 = { + every_in_list = { + list = playing_children_list + custom = ep3_laamp_flavour_ewan.1071.tt.every_playing_child + add_learning_lifestyle_perk_points = 1 + } + } + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # Children, excited for the simplest things... + option = { + name = ep3_laamp_flavour_ewan.1071.c + + # Major effect is stress loss. + add_stress = major_stress_loss + + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -0.5 } + } + } +} + +################################################## +# Growing Up +# by Ewan Cowhig Croft +# 1081 - 1090 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1081_valid_child_trigger = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + age <= 12 + NOT = { has_character_flag = demanded_own_tent } + OR = { + has_trait = bossy + has_trait = rowdy + has_trait = greedy + has_trait = diligent + has_trait = impatient + has_trait = arrogant + has_trait = shy + has_trait = ambitious + has_trait = paranoid + has_trait = stubborn + has_trait = eccentric + } +} + +scripted_effect ep3_laamp_flavour_ewan_1081_roll_duel_effect = { + scope:child = { + duel = { + skill = $EDUCATION$ + value = medium_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1081.b.tt.success + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1081.b.tt.success + left_icon = scope:child + scope:child = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 40 + } + add_prestige = medium_prestige_gain + } + } + } + } + # Defeat! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1081.b.tt.failure + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1081.b.tt.failure + left_icon = scope:child + scope:child = { + add_opinion = { + target = root + modifier = frustrated_opinion + opinion = -40 + } + add_stress = major_stress_gain + } + } + } + } + } + } +} + +# Child demands own tent. +ep3_laamp_flavour_ewan.1081 = { + type = character_event + title = ep3_laamp_flavour_ewan.1081.t + desc = ep3_laamp_flavour_ewan.1081.desc + theme = laamp + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:child + animation = anger + } + override_background = { reference = corridor_night } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1081 } + } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # And that we've got a suitable child. + any_child = { ep3_laamp_flavour_ewan_1081_valid_child_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1081 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1081 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Grab a suitable child. + ordered_child = { + limit = { ep3_laamp_flavour_ewan_1081_valid_child_trigger = yes } + order_by = age + save_scope_as = child + add_character_flag = { + flag = demanded_own_tent + # Let the flag clean itself up some time after we become an adult, as it'll no longer be relevant. + years = 16 + } + } + } + + # Hmm, okay. You're a WomanMan now. + option = { + name = ep3_laamp_flavour_ewan.1081.a + + add_prestige = minor_prestige_loss + scope:child = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 25 + } + add_prestige = minor_prestige_gain + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = -2 } + } + } + + # You want it? Earn it. + option = { + name = ep3_laamp_flavour_ewan.1081.b + flavor = ep3_laamp_flavour_ewan.1081.b.f + trait = education_diplomacy_1 + trait = education_diplomacy_2 + trait = education_diplomacy_3 + trait = education_diplomacy_4 + trait = education_diplomacy_5 + trait = education_martial_1 + trait = education_martial_2 + trait = education_martial_3 + trait = education_martial_4 + trait = education_martial_5 + trait = education_stewardship_1 + trait = education_stewardship_2 + trait = education_stewardship_3 + trait = education_stewardship_4 + trait = education_stewardship_5 + trait = education_intrigue_1 + trait = education_intrigue_2 + trait = education_intrigue_3 + trait = education_intrigue_4 + trait = education_intrigue_5 + trait = education_learning_1 + trait = education_learning_2 + trait = education_learning_3 + trait = education_learning_4 + trait = education_learning_5 + + # Roll a different duel depending on our education. + switch = { + trigger = has_trait + education_diplomacy = { + ep3_laamp_flavour_ewan_1081_roll_duel_effect = { EDUCATION = diplomacy } + } + education_martial = { + ep3_laamp_flavour_ewan_1081_roll_duel_effect = { EDUCATION = martial } + } + education_stewardship = { + ep3_laamp_flavour_ewan_1081_roll_duel_effect = { EDUCATION = stewardship } + } + education_intrigue = { + ep3_laamp_flavour_ewan_1081_roll_duel_effect = { EDUCATION = intrigue } + } + education_learning = { + ep3_laamp_flavour_ewan_1081_roll_duel_effect = { EDUCATION = learning } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # Bah, you're a child till I say otherwise. + option = { + name = ep3_laamp_flavour_ewan.1081.c + + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:child + modifier = frustrated_opinion + opinion = -20 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -0.5 } + } + } +} + +################################################## +# Every Parent's Duty +# by Ewan Cowhig Croft +# 1091 - 1100 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1091_valid_child_trigger = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + NOT = { has_character_flag = taught_to_ride } + # If you have Horse Lords, this _has_ to be taught much earlier. + trigger_if = { + limit = { + root = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + mpo_can_recruit_nomad_maa_trigger = yes + } + } + } + age <= 8 + } +} + +scripted_effect ep3_laamp_flavour_ewan_1091_roll_duel_effect = { + duel = { + skill = $SKILL$ + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1091.tt.success + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1091.tt.success + left_icon = scope:child + scope:child = { + add_opinion = { + target = root + modifier = amazed_opinion + opinion = 40 + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_1091_confidence_gained_modifier + years = 10 + } + } + } + } + } + # Defeat! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.1091.tt.failure + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1091.tt.failure + left_icon = scope:child + scope:child = { + increase_wounds_no_death_effect = { REASON = horse_riding_accident } + add_opinion = { + target = root + modifier = let_me_down_opinion + opinion = -20 + } + } + } + } + } + } +} + +# Teaching a youngling how to ride. +ep3_laamp_flavour_ewan.1091 = { + type = character_event + title = ep3_laamp_flavour_ewan.1091.t + desc = ep3_laamp_flavour_ewan.1091.desc + theme = laamp + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:child + animation = worry + } + override_background = { reference = army_camp } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1091 } + } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # And have a suitable child + any_child = { ep3_laamp_flavour_ewan_1091_valid_child_trigger = yes } + } + + weight_multiplier = { + # Weight up for Horse Lords, for whom this is especially vital (yes, over and above western knights). + modifier = { + add = 2 + culture = { culture_has_archer_cavalry_maa = yes } + } + + modifier = { + add = 2 + has_trait = nomadic_philosophy + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1091 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1091 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Grab a suitable child. + ordered_child = { + limit = { ep3_laamp_flavour_ewan_1091_valid_child_trigger = yes } + order_by = age + save_scope_as = child + add_character_flag = { + flag = taught_to_ride + # Let the flag clean itself up some time after we become an adult, as it'll no longer be relevant. + years = 16 + } + } + } + + # Diplo duel: remember, be firm, but respectful. + option = { + name = ep3_laamp_flavour_ewan.1091.a + + ep3_laamp_flavour_ewan_1091_roll_duel_effect = { SKILL = diplomacy } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Martial duel: don't be afraid to crack the whip! + option = { + name = ep3_laamp_flavour_ewan.1091.b + + ep3_laamp_flavour_ewan_1091_roll_duel_effect = { SKILL = martial } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_loss + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + patient = minor_stress_impact_gain + calm = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # Prowess duel: master the horse or it'll toss you. + option = { + name = ep3_laamp_flavour_ewan.1091.c + + ep3_laamp_flavour_ewan_1091_roll_duel_effect = { SKILL = prowess } + + stress_impact = { + calm = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_vengefulness = 1 } + } + } + + # Say nothing. + option = { + name = ep3_laamp_flavour_ewan.1091.d + + random_list = { + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1091.d.tt.success + left_icon = scope:child + scope:child = { + add_opinion = { + target = root + modifier = amazed_opinion + opinion = 20 + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_1091_confidence_gained_modifier + years = 10 + } + } + } + } + 100 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.1091.d.tt.failure + left_icon = scope:child + scope:child = { + increase_wounds_no_death_effect = { REASON = horse_riding_accident } + add_opinion = { + target = root + modifier = let_me_down_opinion + opinion = -10 + } + } + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -0.5 } + } + } +} + +################################################## +# Helping Out +# by Ewan Cowhig Croft +# 1101 - 1110 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1101_valid_starting_child_trigger = { + child_is_infant_trigger = yes + is_courtier_of = root + location = root.location + is_available_allow_travelling = yes +} + +scripted_effect ep3_laamp_flavour_ewan_1101_increment_affection_effect = { + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 20 + } + hidden_effect = { + add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 20 + } + } +} + +# Child helps with packing. +ep3_laamp_flavour_ewan.1101 = { + type = character_event + title = ep3_laamp_flavour_ewan.1101.t + desc = ep3_laamp_flavour_ewan.1101.desc + theme = laamp + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:child + animation = admiration + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1101 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1101 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_longest + } + } + # Nab a suitable child. + random_child = { + limit = { ep3_laamp_flavour_ewan_1101_valid_starting_child_trigger = yes } + save_scope_as = child + } + } + + # What're you doing there, little LassLad? + option = { + name = ep3_laamp_flavour_ewan.1101.a + + ep3_laamp_flavour_ewan_1101_increment_affection_effect = yes + # Set us up for our future events. + set_variable = { + name = packing_assistant + value = scope:child + } + # Account for how many times we've helped. + increment_variable_effect = { + VAR = helped_packing + VAL = 1 + } + + stress_impact = { + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Shoo, you menace! + option = { + name = ep3_laamp_flavour_ewan.1101.b + + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -10 + } + + stress_impact = { + callous = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } +} + +# Pre-filter event, so that we can keep the spamminess down. +ep3_laamp_flavour_ewan.1102 = { + hidden = yes + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Only valid for Laamps + has_government = landless_adventurer_government + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1101 } + } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Plus that we haven't started this chain once already. + NOT = { has_variable = packing_assistant } + # And that we have a suitable child. + any_child = { ep3_laamp_flavour_ewan_1101_valid_starting_child_trigger = yes } + } + + immediate = { + # We keep this _quite_ low, as it's otherwise able to trigger any time you start a travel. + random = { + chance = 1 + random = { + chance = 75 + trigger_event = ep3_laamp_flavour_ewan.1101 + } + } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_1103_child_younger_trigger = { + age <= @ep3_laamp_flavour_ewan_1103_age_threshold_young + root = { + NOT = { has_character_flag = had_packing_assistant_chain_stage_younger } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_1103_child_older_trigger = { + age > @ep3_laamp_flavour_ewan_1103_age_threshold_young + age <= @ep3_laamp_flavour_ewan_1103_age_threshold_older + root = { + NOT = { has_character_flag = had_packing_assistant_chain_stage_older } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_1103_child_teen_trigger = { + age > @ep3_laamp_flavour_ewan_1103_age_threshold_older + is_adult = no + root = { + NOT = { has_character_flag = had_packing_assistant_chain_stage_teen } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_1103_child_adult_trigger = { + is_adult = yes + root = { + NOT = { has_character_flag = had_packing_assistant_chain_stage_adult } + # And they have to done it several times. + var:helped_packing >= 3 + } +} + +scripted_trigger ep3_laamp_flavour_ewan_1103_proceed_to_failure_event_trigger = { + OR = { + is_alive = no + has_relation_rival = root + opinion = { + target = root + value <= -75 + } + } +} + +# Child helps with packing. +ep3_laamp_flavour_ewan.1103 = { + type = character_event + title = ep3_laamp_flavour_ewan.1103.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + var:packing_assistant = { + ep3_laamp_flavour_ewan_1103_child_younger_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.1103.desc.child_younger + } + triggered_desc = { + trigger = { + var:packing_assistant = { + ep3_laamp_flavour_ewan_1103_child_older_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.1103.desc.child_older + } + triggered_desc = { + trigger = { + var:packing_assistant = { + ep3_laamp_flavour_ewan_1103_child_teen_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.1103.desc.child_teen + } + triggered_desc = { + trigger = { + var:packing_assistant = { + ep3_laamp_flavour_ewan_1103_child_adult_trigger = yes + } + } + desc = ep3_laamp_flavour_ewan.1103.desc.child_adult + } + } + } + theme = laamp + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:child + animation = admiration + } + + trigger = { + has_variable = packing_assistant + NOR = { + has_character_flag = aborted_packing_chain + has_variable = had_ep3_laamp_flavour_ewan_1104 + } + is_available_allow_travelling = yes + var:packing_assistant = { + is_courtier_of = root + location = root.location + is_available_allow_travelling = yes + OR = { + ep3_laamp_flavour_ewan_1103_child_younger_trigger = yes + ep3_laamp_flavour_ewan_1103_child_older_trigger = yes + ep3_laamp_flavour_ewan_1103_child_teen_trigger = yes + ep3_laamp_flavour_ewan_1103_child_adult_trigger = yes + } + ep3_laamp_flavour_ewan_1103_proceed_to_failure_event_trigger = no + } + } + + on_trigger_fail = { trigger_event = ep3_laamp_flavour_ewan.1104 } + + immediate = { + # Nab our assistant for ease of reference. + var:packing_assistant = { save_scope_as = child } + } + + # Very young child helps a little. + option = { + name = ep3_laamp_flavour_ewan.1103.a + trigger = { + scope:child = { ep3_laamp_flavour_ewan_1103_child_younger_trigger = yes } + } + + ep3_laamp_flavour_ewan_1101_increment_affection_effect = yes + # Account for how many times we've helped. + increment_variable_effect = { + VAR = helped_packing + VAL = 1 + } + + add_stress = miniscule_stress_loss + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 3 } + } + } + + # Older child is quite helpful. + option = { + name = ep3_laamp_flavour_ewan.1103.b + trigger = { + scope:child = { ep3_laamp_flavour_ewan_1103_child_older_trigger = yes } + } + + ep3_laamp_flavour_ewan_1101_increment_affection_effect = yes + # Account for how many times we've helped. + increment_variable_effect = { + VAR = helped_packing + VAL = 1 + } + + add_stress = minor_stress_loss + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 3 } + } + } + + # Teen is very helpful. + option = { + name = ep3_laamp_flavour_ewan.1103.c + trigger = { + scope:child = { ep3_laamp_flavour_ewan_1103_child_teen_trigger = yes } + } + + ep3_laamp_flavour_ewan_1101_increment_affection_effect = yes + # Account for how many times we've helped. + increment_variable_effect = { + VAR = helped_packing + VAL = 1 + } + + add_stress = medium_stress_loss + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 3 } + } + } + + # Adult might become your best friend over this simple activity. + option = { + name = ep3_laamp_flavour_ewan.1103.d + trigger = { + scope:child = { ep3_laamp_flavour_ewan_1103_child_adult_trigger = yes } + } + + # Best friends, if possible. + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:child } + } + set_relation_best_friend = { + reason = best_friend_childhood_ritual + target = scope:child + } + } + # Loyalty hook, if possible. + if = { + limit = { + can_add_hook = { + target = scope:child + type = loyalty_hook + } + } + add_hook = { + target = scope:child + type = loyalty_hook + } + } + # Oodles of opinion. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 50 + } + + add_stress = major_stress_loss + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 3 } + } + } + + # I can do it myself, scope:child. + option = { + name = ep3_laamp_flavour_ewan.1103.e + + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = { + value = -10 + multiply = var:helped_packing + } + } + add_character_flag = aborted_packing_chain + + stress_impact = { + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } + + after = { + if = { + limit = { + scope:child = { ep3_laamp_flavour_ewan_1103_child_younger_trigger = yes } + } + add_character_flag = had_packing_assistant_chain_stage_younger + } + if = { + limit = { + scope:child = { ep3_laamp_flavour_ewan_1103_child_older_trigger = yes } + } + add_character_flag = had_packing_assistant_chain_stage_older + } + if = { + limit = { + scope:child = { ep3_laamp_flavour_ewan_1103_child_teen_trigger = yes } + } + add_character_flag = had_packing_assistant_chain_stage_teen + } + if = { + limit = { + scope:child = { ep3_laamp_flavour_ewan_1103_child_adult_trigger = yes } + } + add_character_flag = had_packing_assistant_chain_stage_adult + } + } +} + +# Child will no longer help with packing — for one reason or another. +ep3_laamp_flavour_ewan.1104 = { + type = character_event + title = ep3_laamp_flavour_ewan.1104.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:child = { is_alive = no } + } + desc = ep3_laamp_flavour_ewan.1104.desc.child_dead + } + desc = ep3_laamp_flavour_ewan.1104.desc.child_rival + } + } + theme = laamp + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:child + triggered_animation = { + animation = map_fear + trigger = { + scope:child = { is_alive = no } + } + } + triggered_animation = { + animation = dismissal + trigger = { + scope:child = { is_alive = yes } + } + } + } + + trigger = { + has_variable = packing_assistant + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1104 } + # Must've had at least one instance of the follow-up event, so that there's a pattern. + var:helped_packing >= 2 + # Aaaand make sure we should actually be firing _this_ event. + var:packing_assistant = { ep3_laamp_flavour_ewan_1103_proceed_to_failure_event_trigger = yes } + } + + immediate = { + # Limit this event to firing once. + set_variable = { + name = had_ep3_laamp_flavour_ewan_1104 + value = yes + } + # Nab our (former) assistant for ease of reference. + var:packing_assistant = { save_scope_as = child } + } + + # Dead: you killed them. + option = { + name = ep3_laamp_flavour_ewan.1104.a + trigger = { scope:child.killer ?= root } + + # Most of the effect is in the stress impact. + stress_impact = { + base = major_stress_gain + compassionate = minor_stress_impact_gain + # We don't account for callous here, because they get a special option. + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Dead: you do know who killed them and it wasn't you. + option = { + name = ep3_laamp_flavour_ewan.1104.b + trigger = { + scope:child = { + killer ?= { + is_alive = yes + this != root + } + } + } + + progress_towards_rival_effect = { + REASON = rival_killed_heir + CHARACTER = scope:child.killer + OPINION = default_rival_opinion + } + + stress_impact = { + vengeful = major_stress_impact_loss + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Callous: _eh_. + option = { + name = ep3_laamp_flavour_ewan.1104.c + trigger = { has_trait = callous } + trait = callous + + # Entire effect is in the stress impact. + stress_impact = { callous = massive_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -2 } + } + } + + # Try to move on. + option = { + name = ep3_laamp_flavour_ewan.1104.d + trigger = { + NOT = { exists = scope:child.killer } + } + + # Most of the effect is in the stress impact. + stress_impact = { + base = major_stress_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } +} + +################################################## +# A Nose for Trouble +# by Ewan Cowhig Croft +# 1111 - 1120 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_1111_valid_child_trigger = { + ep3_laamp_flavour_ewan_available_child_trigger = yes + ep3_laamp_flavour_ewan_no_dog_trigger = yes +} + +# Child adopts puppy. +ep3_laamp_flavour_ewan.1111 = { + type = character_event + title = ep3_laamp_flavour_ewan.1111.t + desc = { + desc = ep3_laamp_flavour_ewan.1111.desc.intro + first_valid = { + triggered_desc = { + trigger = { + domicile = { has_domicile_building = baggage_train_kennel } + } + desc = ep3_laamp_flavour_ewan.1111.desc.has_kennels + } + desc = ep3_laamp_flavour_ewan.1111.desc.no_kennels + } + desc = ep3_laamp_flavour_ewan.1111.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:child + animation = happiness + } + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_1111 } + } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # And have a suitable child. + any_child = { ep3_laamp_flavour_ewan_1111_valid_child_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_1111 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_1111 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + random_child = { + limit = { ep3_laamp_flavour_ewan_1111_valid_child_trigger = yes } + save_scope_as = child + } + } + + # A GirlBoy and HerHis dog. + option = { + name = ep3_laamp_flavour_ewan.1111.a + + scope:child = { + start_dog_story_cycle_effect = yes + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 50 + } + add_stress = massive_stress_loss + } + + # Everyone loves pets! + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Sadistic: drown the dog. + option = { + name = ep3_laamp_flavour_ewan.1111.b + trigger = { has_trait = sadistic } + trait = sadistic + + scope:child = { + set_relation_rival = { + reason = rival_drowned_dog + target = root + } + } + + # Mostly stress loss for the positives here. + stress_impact = { sadistic = 200 } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -3 } + } + } + + # Low on provisions: My, what a fat hound. Good find, LassLad! + option = { + name = ep3_laamp_flavour_ewan.1111.c + trigger = { domicile.provisions <= provisions_privation_threshold_start } + + domicile = { change_provisions = microscopic_provisions_gain } + scope:child = { + progress_towards_rival_effect = { + REASON = rival_ate_dog + CHARACTER = root + OPINION = default_rival_opinion + } + } + + stress_impact = { + callous = miniscule_stress_impact_loss + gluttonous = miniscule_stress_impact_loss + temperate = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 2 } + } + } + + # Scope:child! Stop playing with that filthy mutt! + option = { + name = ep3_laamp_flavour_ewan.1111.d + + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -25 + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 1 + opinion_modifier = { + opinion_target = scope:child + multiplier = -1 + } + } + } +} + + + + + + + + + + + +################################################## +# PERSONAL TENSIONS + +################################################## +# Plenty in Common +# by Ewan Cowhig Croft +# # 2001 - 2010 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2001_courtier_1_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_2001_courtier_2_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { this = $TARGET$ } + OR = { + number_of_personality_traits_in_common = { + target = $TARGET$ + value >= 2 + } + AND = { + number_of_personality_traits_in_common = { + target = $TARGET$ + value >= 1 + } + opinion = { + target = $TARGET$ + value >= 1 + } + } + } + number_of_opposing_personality_traits = { + target = $TARGET$ + value <= 0 + } + opinion = { + target = $TARGET$ + value >= -40 + } + NOR = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $TARGET$ } + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = $TARGET$ } + } + can_set_relation_friend_trigger = { CHARACTER = $TARGET$ } +} + +scripted_effect ep3_laamp_flavour_ewan_2001_make_friends_or_best_friends_effect = { + scope:follower_1 = { + # If the stars align, become best friends. + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:follower_2 } + opinion = { + target = scope:follower_2 + value >= 100 + } + reverse_opinion = { + target = scope:follower_2 + value >= 100 + } + } + set_relation_best_friend = { + reason = friend_mutual_traits + target = scope:follower_2 + } + } + # Otherwise, regular friends will do. + else = { + set_relation_friend = { + reason = friend_mutual_traits + target = scope:follower_2 + } + } + } +} + +# Friendship blooms over shared traits. +ep3_laamp_flavour_ewan.2001 = { + type = character_event + title = ep3_laamp_flavour_ewan.2001.t + desc = { + desc = ep3_laamp_flavour_ewan.2001.desc.intro + random_valid = { + # Lustful + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = lustful } + scope:follower_2 = { has_trait = lustful } + } + desc = ep3_laamp_flavour_ewan.2001.desc.lustful + } + # Chaste + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = chaste } + scope:follower_2 = { has_trait = chaste } + } + desc = ep3_laamp_flavour_ewan.2001.desc.chaste + } + # Gluttonous + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = gluttonous } + scope:follower_2 = { has_trait = gluttonous } + } + desc = ep3_laamp_flavour_ewan.2001.desc.gluttonous + } + # Temperate + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = temperate } + scope:follower_2 = { has_trait = temperate } + } + desc = ep3_laamp_flavour_ewan.2001.desc.temperate + } + # Greedy + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = greedy } + scope:follower_2 = { has_trait = greedy } + } + desc = ep3_laamp_flavour_ewan.2001.desc.greedy + } + # Generous + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = generous } + scope:follower_2 = { has_trait = generous } + } + desc = ep3_laamp_flavour_ewan.2001.desc.generous + } + # Lazy + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = lazy } + scope:follower_2 = { has_trait = lazy } + } + desc = ep3_laamp_flavour_ewan.2001.desc.lazy + } + # Diligent + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = diligent } + scope:follower_2 = { has_trait = diligent } + } + desc = ep3_laamp_flavour_ewan.2001.desc.diligent + } + # Wrathful + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = wrathful } + scope:follower_2 = { has_trait = wrathful } + } + desc = ep3_laamp_flavour_ewan.2001.desc.wrathful + } + # Calm + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = calm } + scope:follower_2 = { has_trait = calm } + } + desc = ep3_laamp_flavour_ewan.2001.desc.calm + } + # Patient + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = patient } + scope:follower_2 = { has_trait = patient } + } + desc = ep3_laamp_flavour_ewan.2001.desc.patient + } + # Impatient + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = impatient } + scope:follower_2 = { has_trait = impatient } + } + desc = ep3_laamp_flavour_ewan.2001.desc.impatient + } + # Arrogant + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = arrogant } + scope:follower_2 = { has_trait = arrogant } + } + desc = ep3_laamp_flavour_ewan.2001.desc.arrogant + } + # Humble + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = humble } + scope:follower_2 = { has_trait = humble } + } + desc = ep3_laamp_flavour_ewan.2001.desc.humble + } + # Deceitful + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = deceitful } + scope:follower_2 = { has_trait = deceitful } + } + desc = ep3_laamp_flavour_ewan.2001.desc.deceitful + } + # Honest + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = honest } + scope:follower_2 = { has_trait = honest } + } + desc = ep3_laamp_flavour_ewan.2001.desc.honest + } + # Craven + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = craven } + scope:follower_2 = { has_trait = craven } + } + desc = ep3_laamp_flavour_ewan.2001.desc.craven + } + # Brave + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = brave } + scope:follower_2 = { has_trait = brave } + } + desc = ep3_laamp_flavour_ewan.2001.desc.brave + } + # Shy + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = shy } + scope:follower_2 = { has_trait = shy } + } + desc = ep3_laamp_flavour_ewan.2001.desc.shy + } + # Gregarious + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = gregarious } + scope:follower_2 = { has_trait = gregarious } + } + desc = ep3_laamp_flavour_ewan.2001.desc.gregarious + } + # Ambitious + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = ambitious } + scope:follower_2 = { has_trait = ambitious } + } + desc = ep3_laamp_flavour_ewan.2001.desc.ambitious + } + # Content + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = content } + scope:follower_2 = { has_trait = content } + } + desc = ep3_laamp_flavour_ewan.2001.desc.content + } + # Arbitrary + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = arbitrary } + scope:follower_2 = { has_trait = arbitrary } + } + desc = ep3_laamp_flavour_ewan.2001.desc.arbitrary + } + # Just + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = just } + scope:follower_2 = { has_trait = just } + } + desc = ep3_laamp_flavour_ewan.2001.desc.just + } + # Cynical + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = cynical } + scope:follower_2 = { has_trait = cynical } + } + desc = ep3_laamp_flavour_ewan.2001.desc.cynical + } + # Zealous + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = zealous } + scope:follower_2 = { has_trait = zealous } + # Just for ease of loc. + scope:follower_1.faith = scope:follower_2.faith + } + desc = ep3_laamp_flavour_ewan.2001.desc.zealous + } + # Paranoid + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = paranoid } + scope:follower_2 = { has_trait = paranoid } + } + desc = ep3_laamp_flavour_ewan.2001.desc.paranoid + } + # Trusting + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = trusting } + scope:follower_2 = { has_trait = trusting } + } + desc = ep3_laamp_flavour_ewan.2001.desc.trusting + } + # Compassionate + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = compassionate } + scope:follower_2 = { has_trait = compassionate } + } + desc = ep3_laamp_flavour_ewan.2001.desc.compassionate + } + # Callous + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = callous } + scope:follower_2 = { has_trait = callous } + } + desc = ep3_laamp_flavour_ewan.2001.desc.callous + } + # Sadistic + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = sadistic } + scope:follower_2 = { has_trait = sadistic } + } + desc = ep3_laamp_flavour_ewan.2001.desc.sadistic + } + # Stubborn + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = stubborn } + scope:follower_2 = { has_trait = stubborn } + } + desc = ep3_laamp_flavour_ewan.2001.desc.stubborn + } + # Fickle + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = fickle } + scope:follower_2 = { has_trait = fickle } + } + desc = ep3_laamp_flavour_ewan.2001.desc.fickle + } + # Vengeful + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = vengeful } + scope:follower_2 = { has_trait = vengeful } + } + desc = ep3_laamp_flavour_ewan.2001.desc.vengeful + } + # Forgiving + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = forgiving } + scope:follower_2 = { has_trait = forgiving } + } + desc = ep3_laamp_flavour_ewan.2001.desc.forgiving + } + # Eccentric + triggered_desc = { + trigger = { + scope:follower_1 = { has_trait = eccentric } + scope:follower_2 = { has_trait = eccentric } + } + desc = ep3_laamp_flavour_ewan.2001.desc.eccentric + } + } + desc = ep3_laamp_flavour_ewan.2001.desc.outro + } + theme = laamp + left_portrait = { + character = scope:follower_1 + animation = admiration + } + right_portrait = { + character = scope:follower_2 + animation = happiness + } + override_background = { reference = ep3_campfire } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2001 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2001 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_short + } + } + # Now, let's make them like each other a bit more. + scope:follower_1 = { + add_opinion = { + target = scope:follower_2 + modifier = friendliness_opinion + opinion = 80 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = friendliness_opinion + opinion = 80 + } + } + } + + # Encourage the friendship. + option = { + name = ep3_laamp_flavour_ewan.2001.a + + ep3_laamp_flavour_ewan_2001_make_friends_or_best_friends_effect = yes + duel = { + skill = diplomacy + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2001.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2001.a.tt.success + left_icon = scope:follower_1 + right_icon = scope:follower_2 + reverse_add_opinion = { + target = scope:follower_1 + modifier = respect_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = respect_opinion + opinion = 40 + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2001.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2001.a.tt.failure + left_icon = scope:follower_1 + right_icon = scope:follower_2 + reverse_add_opinion = { + target = scope:follower_1 + modifier = annoyed_opinion + opinion = -20 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = annoyed_opinion + opinion = -20 + } + } + } + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Try to break up that friendship. + option = { + name = ep3_laamp_flavour_ewan.2001.b + + duel = { + skill = diplomacy + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2001.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2001.b.tt.success + left_icon = scope:follower_1 + right_icon = scope:follower_2 + reverse_add_opinion = { + target = scope:follower_1 + modifier = respect_opinion + opinion = 20 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = respect_opinion + opinion = 20 + } + } + scope:follower_1 = { + remove_opinion = { + target = scope:follower_2 + modifier = friendliness_opinion + } + } + scope:follower_2 = { + remove_opinion = { + target = scope:follower_1 + modifier = friendliness_opinion + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2001.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2001.b.tt.failure + left_icon = scope:follower_1 + right_icon = scope:follower_2 + ep3_laamp_flavour_ewan_2001_make_friends_or_best_friends_effect = yes + reverse_add_opinion = { + target = scope:follower_1 + modifier = annoyed_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = annoyed_opinion + opinion = -30 + } + } + } + } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } + + # Good for them. + option = { + name = ep3_laamp_flavour_ewan.2001.c + + ep3_laamp_flavour_ewan_2001_make_friends_or_best_friends_effect = yes + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -1 } + } + } +} + +# Pre-filtering event to set up scopes. +ep3_laamp_flavour_ewan.2002 = { + hidden = yes + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2001 } + } + # Make sure we have suitable courtiers. + any_courtier = { + 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 } + } + } + } + } + + immediate = { + while = { + count = 10 + 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 } + } + 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 + } + } + } + # 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.2001 + } + } +} + +################################################## +# Camp Gossip +# by Ewan Cowhig Croft +# # 2011 - 2020 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + # Filter out anyone who matters to us, we want petty people. + ## This is partially for tone, partially so we can be less rigorous with checks'n'effects. + NOR = { + is_consort_of = root + is_close_family_of = root + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = root } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_2011_secret_lover_would_be_affair_trigger = { + is_married = yes + NOT = { + trait_is_shunned_or_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = root + } + } + accepts_adultery_without_penalty_trigger = no +} + +scripted_trigger ep3_laamp_flavour_ewan_2011_might_steal_trigger = { + OR = { + has_trait = greedy + has_trait = arbitrary + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 50 + } + calc_true_if = { + amount >= 2 + has_trait = eccentric + has_trait = cynical + has_trait = impatient + } + } + NOR = { + has_trait = generous + has_trait = just + } +} + +scripted_trigger ep3_laamp_flavour_ewan_2011_might_prank_trigger = { + OR = { + has_trait = gregarious + has_trait = arbitrary + has_trait = deceitful + has_trait = eccentric + } + NOR = { + has_trait = honest + has_trait = just + } +} + +scripted_trigger ep3_laamp_flavour_ewan_2011_might_rumourmonger_trigger = { + OR = { + has_trait = gregarious + has_trait = arbitrary + has_trait = deceitful + has_trait = eccentric + } + NOR = { + has_trait = honest + has_trait = shy + has_trait = just + } +} + +scripted_trigger ep3_laamp_flavour_ewan_2011_might_feud_trigger = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = diligent + calc_true_if = { + amount >= 2 + has_trait = patient + has_trait = arrogant + has_trait = ambitious + } + } + NOR = { + has_trait = forgiving + has_trait = lazy + } +} + +# It's only one line, but these are held in different events hundreds of lines of script apart, so good hygiene demands it. +scripted_effect ep3_laamp_flavour_ewan_2011_duel_loss_effect = { + add_prestige = minor_prestige_loss +} + +# Someone shagged someone else's spouse/petty theft/series of cruel pranks/nasty rumours spread. +ep3_laamp_flavour_ewan.2011 = { + type = character_event + title = ep3_laamp_flavour_ewan.2011.t + desc = { + desc = ep3_laamp_flavour_ewan.2011.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:gossip_type = flag:affair } + desc = ep3_laamp_flavour_ewan.2011.desc.affair + } + triggered_desc = { + trigger = { scope:gossip_type = flag:petty_theft } + desc = ep3_laamp_flavour_ewan.2011.desc.petty_theft + } + triggered_desc = { + trigger = { scope:gossip_type = flag:cruel_pranks } + desc = ep3_laamp_flavour_ewan.2011.desc.cruel_pranks + } + triggered_desc = { + trigger = { scope:gossip_type = flag:nasty_rumours } + desc = ep3_laamp_flavour_ewan.2011.desc.nasty_rumours + } + triggered_desc = { + trigger = { scope:gossip_type = flag:hidden_feud } + desc = ep3_laamp_flavour_ewan.2011.desc.hidden_feud + } + } + desc = ep3_laamp_flavour_ewan.2011.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:victim + animation = stress + } + override_background = { reference = ep3_campfire } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2011 } + } + # Must have enough courtiers for this to be a possibility. + any_courtier = { + count >= 5 + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + OR = { + ep3_laamp_flavour_ewan_2011_secret_lover_would_be_affair_trigger = yes + ep3_laamp_flavour_ewan_2011_might_steal_trigger = yes + ep3_laamp_flavour_ewan_2011_might_prank_trigger = yes + ep3_laamp_flavour_ewan_2011_might_rumourmonger_trigger = yes + ep3_laamp_flavour_ewan_2011_might_feud_trigger = yes + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2011 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2011 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Alright, which gossip will we be going with? + random_list = { + # Affair. + 100 = { + # Register our result. + save_scope_value_as = { + name = gossip_type + value = flag:affair + } + # Try to find a suitable candidate to make this true. + ## First by sorting everyone for whom it'd be shocking to have an affair into a list. + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_secret_lover_would_be_affair_trigger = yes + } + add_to_list = possible_affair_candidates_list + } + ## Then nabbing any valid pair. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_secret_lover_would_be_affair_trigger = yes + save_temporary_scope_as = char_temp + any_in_list = { + list = possible_affair_candidates_list + this != scope:char_temp + has_secret_relation_lover = scope:char_temp + save_temporary_scope_as = root_secret_check_temp + root = { + NOR = { + any_known_secret = { + secret_type = secret_lover + secret_owner = scope:root_secret_check_temp + secret_target = scope:char_temp + } + any_known_secret = { + secret_type = secret_lover + secret_owner = scope:char_temp + secret_target = scope:root_secret_check_temp + } + } + } + save_temporary_scope_as = lover_temp + } + } + # Grab our scopes. + save_scope_as = lover_1 + scope:lover_temp = { save_scope_as = lover_2 } + # And note that the story was true. + save_scope_value_as = { + name = gossip_veracity + value = flag:true + } + } + # If we don't have any lovers yet, see if we've got anyone we could nudge. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_secret_lover_would_be_affair_trigger = yes + might_cheat_on_every_partner_trigger = yes + save_temporary_scope_as = char_temp + any_in_list = { + list = possible_affair_candidates_list + this != scope:char_temp + has_relation_potential_lover = scope:char_temp + opinion = { + target = scope:char_temp + value >= 60 + } + reverse_opinion = { + target = scope:char_temp + value >= 60 + } + might_cheat_on_every_partner_trigger = yes + can_set_relation_lover_trigger = { CHARACTER = scope:char_temp } + save_temporary_scope_as = lover_temp + } + } + # Grab our scopes. + save_scope_as = lover_1 + scope:lover_temp = { save_scope_as = lover_2 } + # Now, randomise whether the story was true or false. + random = { + chance = 50 + # Ok, exacerbate our love story. + hidden_effect = { + scope:lover_1 = { + add_secret = { + target = scope:lover_2 + type = secret_lover + } + } + } + # And note that the story was true. + save_scope_value_as = { + name = gossip_veracity + value = flag:true + } + } + } + # Otherwise, we register it as false. + if = { + limit = { + NOT = { exists = scope:gossip_veracity } + } + save_scope_value_as = { + name = gossip_veracity + value = flag:false + } + } + } + # Petty theft. + 100 = { + # Register our result. + save_scope_value_as = { + name = gossip_type + value = flag:petty_theft + } + # Try to find a suitable candidate to make this true. + ## First, grab anyone/everyone who'd steal. + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_might_steal_trigger = yes + } + add_to_list = possible_thieves_list + } + ## Then try to find anyone they'd steal from. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + save_temporary_scope_as = char_temp + any_in_list = { + list = possible_thieves_list + this != scope:char_temp + opinion = { + target = scope:char_temp + value <= -50 + } + save_temporary_scope_as = thief_temp + } + } + # Grab our scopes. + save_scope_as = victim + scope:thief_temp = { save_scope_as = thief } + # And note that the story was true. + save_scope_value_as = { + name = gossip_veracity + value = flag:true + } + } + # Otherwise, we register it as false. + if = { + limit = { + NOT = { exists = scope:gossip_veracity } + } + save_scope_value_as = { + name = gossip_veracity + value = flag:false + } + } + } + # Series of cruel pranks. + 100 = { + trigger = { + any_courtier = { + count >= 2 + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_might_prank_trigger = yes + } + } + # Register our result. + save_scope_value_as = { + name = gossip_type + value = flag:cruel_pranks + } + # Try to find a suitable candidate to make this true. + ## First, grab anyone/everyone who'd play harsh jokes. + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_might_prank_trigger = yes + } + add_to_list = possible_pranksters_list + } + ## Then try to find anyone they'd be cruel to. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + save_temporary_scope_as = char_temp + any_in_list = { + list = possible_pranksters_list + this != scope:char_temp + opinion = { + target = scope:char_temp + value <= -50 + } + save_temporary_scope_as = prankster_temp + } + } + # Grab our scopes. + save_scope_as = victim + scope:prankster_temp = { save_scope_as = prankster } + # And note that the story was true. + save_scope_value_as = { + name = gossip_veracity + value = flag:true + } + } + # Otherwise, we register it as false. + if = { + limit = { + NOT = { exists = scope:gossip_veracity } + } + save_scope_value_as = { + name = gossip_veracity + value = flag:false + } + # If we don't have a scope:victim by now, create one. + random_courtier = { + limit = { ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes } + save_scope_as = victim + } + } + # Plus stress out our victim a little. + scope:victim = { add_stress = medium_stress_gain } + } + # Nasty rumours. + 100 = { + trigger = { + any_courtier = { + count >= 2 + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_might_rumourmonger_trigger = yes + } + } + # Register our result. + save_scope_value_as = { + name = gossip_type + value = flag:nasty_rumours + } + # Try to find a suitable candidate to make this true. + ## First, grab anyone/everyone who'd spread evil rumours. + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_might_rumourmonger_trigger = yes + } + add_to_list = possible_rumourmongers_list + } + ## Then try to find anyone they'd lie about. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + save_temporary_scope_as = char_temp + any_in_list = { + list = possible_rumourmongers_list + this != scope:char_temp + opinion = { + target = scope:char_temp + value <= -50 + } + save_temporary_scope_as = rumourmonger_temp + } + } + # Grab our scopes. + save_scope_as = victim + scope:rumourmonger_temp = { save_scope_as = rumourmonger } + # And note that the story was true. + save_scope_value_as = { + name = gossip_veracity + value = flag:true + } + } + # Otherwise, we register it as false. + if = { + limit = { + NOT = { exists = scope:gossip_veracity } + } + save_scope_value_as = { + name = gossip_veracity + value = flag:false + } + # If we don't have a scope:victim by now, create one. + random_courtier = { + limit = { ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes } + save_scope_as = victim + } + } + # Plus stress out our victim a little. + scope:victim = { add_stress = medium_stress_gain } + } + # Hidden feud. + 100 = { + # Register our result. + save_scope_value_as = { + name = gossip_type + value = flag:hidden_feud + } + # Try to find a suitable candidate to make this true. + ## First, grab anyone/everyone who'd start shit over nothing. + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + ep3_laamp_flavour_ewan_2011_might_feud_trigger = yes + } + add_to_list = possible_feuds_list + } + ## Then try to find anyone they'd steal from. + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_2011_valid_courtier_for_gossip_trigger = yes + save_temporary_scope_as = char_temp + any_in_list = { + list = possible_feuds_list + this != scope:char_temp + has_relation_potential_rival = scope:char_temp + opinion = { + target = scope:char_temp + value <= -25 + } + save_temporary_scope_as = rival_temp + } + } + # Grab our scopes. + save_scope_as = rival_1 + scope:rival_temp = { save_scope_as = rival_2 } + # Now, randomise whether the story was true or false. + random = { + chance = 50 + # Ok, exacerbate our rivalry. + hidden_effect = { + scope:rival_1 = { + add_opinion = { + target = scope:rival_2 + modifier = irritated_opinion + opinion = -50 + } + reverse_add_opinion = { + target = scope:rival_2 + modifier = irritated_opinion + opinion = -50 + } + } + } + # And note that the story was true. + save_scope_value_as = { + name = gossip_veracity + value = flag:true + } + } + } + # Otherwise, we register it as false. + if = { + limit = { + NOT = { exists = scope:gossip_veracity } + } + save_scope_value_as = { + name = gossip_veracity + value = flag:false + } + } + } + } + # Error suppression. + if = { + limit = { scope:gossip_veracity = flag:false } + } + } + + # Investigate the truth of the matter. + option = { + name = ep3_laamp_flavour_ewan.2011.a + + custom_tooltip = ep3_laamp_flavour_ewan.2011.a.tt.explanation + duel = { + skill = intrigue + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2011.a.tt.success + # Alright, what event do we want to see? + ## Affair actually happening. + if = { + limit = { + scope:gossip_type = flag:affair + scope:gossip_veracity = flag:true + } + trigger_event = ep3_laamp_flavour_ewan.2012 + } + ## Petty theft actually happened. + else_if = { + limit = { + scope:gossip_type = flag:petty_theft + scope:gossip_veracity = flag:true + } + trigger_event = ep3_laamp_flavour_ewan.2013 + } + ## Cruel pranks actually happening. + else_if = { + limit = { + scope:gossip_type = flag:cruel_pranks + scope:gossip_veracity = flag:true + } + trigger_event = ep3_laamp_flavour_ewan.2014 + } + ## Nasty rumours actually happening. + else_if = { + limit = { + scope:gossip_type = flag:nasty_rumours + scope:gossip_veracity = flag:true + } + trigger_event = ep3_laamp_flavour_ewan.2015 + } + ## Hidden feud actually on-going. + else_if = { + limit = { + scope:gossip_type = flag:hidden_feud + scope:gossip_veracity = flag:true + } + trigger_event = ep3_laamp_flavour_ewan.2016 + } + ## Otherwise, nothing was really happening. + else = { + # Which means we won the duel but there was nothing to see. + save_scope_value_as = { + name = duel_result + value = flag:won + } + trigger_event = ep3_laamp_flavour_ewan.2017 + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2011.a.tt.failure + # Flag that we failed the skill check & proceed to part 2. + save_scope_value_as = { + name = duel_result + value = flag:lost + } + trigger_event = ep3_laamp_flavour_ewan.2017 + show_as_tooltip = { ep3_laamp_flavour_ewan_2011_duel_loss_effect = yes } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 2 } + } + } + + # Agree with the accusations baselessly. + option = { + name = ep3_laamp_flavour_ewan.2011.b + + # Give us a minor modifier. + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_source_of_truth_modifier + years = 3 + } + # At the cost of annoying scope:victim, if they exist. + scope:victim ?= { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -30 + } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = -1 + } + } + } + + # Leave well enough alone. + option = { + name = ep3_laamp_flavour_ewan.2011.c + + # Consolation prestige for staying aloof. + add_prestige = minor_prestige_gain + + stress_impact = { + shy = minor_stress_impact_loss + honest = miniscule_stress_impact_loss + deceitful = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } +} + +# Discovered affair. +ep3_laamp_flavour_ewan.2012 = { + type = character_event + title = ep3_laamp_flavour_ewan.2012.t + desc = ep3_laamp_flavour_ewan.2012.desc + theme = laamp + left_portrait = { + character = scope:lover_1 + animation = shock + } + right_portrait = { + character = scope:lover_2 + animation = worry + } + override_background = { reference = ep3_campfire } + + immediate = { + # Nab our secret lover relationship. + scope:lover_1 = { + random_secret = { + type = secret_lover + limit = { + OR = { + AND = { + secret_owner = scope:lover_1 + secret_target = scope:lover_2 + } + AND = { + secret_owner = scope:lover_2 + secret_target = scope:lover_1 + } + } + } + save_scope_as = secret + } + } + # And reveal it to root. + scope:secret = { reveal_to = root } + } + + # Reveal it immediately for bonuses. + option = { + name = ep3_laamp_flavour_ewan.2012.a + + scope:secret = { expose_secret = root } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_truth_hound_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:lover_1 + modifier = cruelty_opinion + opinion = -40 + } + reverse_add_opinion = { + target = scope:lover_2 + modifier = cruelty_opinion + opinion = -40 + } + + stress_impact = { + honest = minor_stress_impact_loss + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 1 } + } + } + + # Keep it — for now. + option = { + name = ep3_laamp_flavour_ewan.2012.b + + reverse_add_opinion = { + target = scope:lover_1 + modifier = grateful_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:lover_2 + modifier = grateful_opinion + opinion = 50 + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } +} + +# Discovered theft. +ep3_laamp_flavour_ewan.2013 = { + type = character_event + title = ep3_laamp_flavour_ewan.2013.t + desc = ep3_laamp_flavour_ewan.2013.desc + theme = laamp + left_portrait = { + character = scope:victim + animation = anger + } + right_portrait = { + character = scope:thief + animation = disbelief + } + override_background = { reference = ep3_campfire } + + immediate = { + scope:victim = { + pay_short_term_gold = { + target = scope:thief + gold = minor_gold_laamps_value + } + } + } + + # Punish scope:thief. + option = { + name = ep3_laamp_flavour_ewan.2013.a + + # Scope:victim is happy. + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_truth_hound_modifier + years = 10 + } + scope:victim = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + progress_towards_rival_effect = { + REASON = rival_stole_petty_sum + CHARACTER = scope:thief + OPINION = default_rival_opinion + } + } + # Apply consequences. + scope:thief = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -30 + } + # Plus some stress. + add_stress = major_stress_gain + # Apply some gallowsbait XP for scope:thief. + laamp_rewards_apply_criminal_xp_effect = { + TRACK = thief + XP_MAX = gallowsbait_xp_minor_gain + XP_MIN = gallowsbait_xp_minor_gain + } + } + + stress_impact = { + honest = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 1 } + } + } + + # Cover for scope:thief. + option = { + name = ep3_laamp_flavour_ewan.2013.b + + # Scope:thief is happy. + add_favour_hook_if_possible_simple_effect = { TARGET = scope:thief } + reverse_add_opinion = { + target = scope:thief + modifier = grateful_opinion + opinion = 40 + } + # Apply consequences. + scope:victim = { + add_opinion = { + target = root + modifier = failure_opinion + opinion = -20 + } + # Plus some stress. + add_stress = major_stress_gain + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -11 } + } + } + + # Let it be known, but leave it at that. + option = { + name = ep3_laamp_flavour_ewan.2013.c + + # Neither party is too happy. + scope:victim = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -10 + } + progress_towards_rival_effect = { + REASON = rival_stole_petty_sum + CHARACTER = scope:thief + OPINION = default_rival_opinion + } + } + scope:thief = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -10 + } + # Apply some gallowsbait XP for scope:thief. + laamp_rewards_apply_criminal_xp_effect = { + TRACK = thief + XP_MAX = gallowsbait_xp_minor_gain + XP_MIN = gallowsbait_xp_minor_gain + } + } + # But you do seem quite impartial. + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_truth_hound_modifier + years = 10 + } + + # No stress for opt out. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -2 } + } + } +} + +# Discovered cruel pranks. +ep3_laamp_flavour_ewan.2014 = { + type = character_event + title = ep3_laamp_flavour_ewan.2014.t + desc = ep3_laamp_flavour_ewan.2014.desc + theme = laamp + left_portrait = { + character = scope:victim + animation = anger + } + right_portrait = { + character = scope:prankster + animation = disbelief + } + override_background = { reference = ep3_campfire } + + # Punish scope:prankster. + option = { + name = ep3_laamp_flavour_ewan.2014.a + + # Scope:victim is happy. + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_truth_hound_modifier + years = 10 + } + scope:victim = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + progress_towards_rival_effect = { + REASON = rival_played_cruel_pranks + CHARACTER = scope:prankster + OPINION = default_rival_opinion + } + } + # Apply consequences. + scope:prankster = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + # Plus some stress. + add_stress = medium_stress_gain + } + + stress_impact = { + honest = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 1 } + } + } + + # Cover for scope:prankster. + option = { + name = ep3_laamp_flavour_ewan.2014.b + + # Scope:prankster is happy. + add_favour_hook_if_possible_simple_effect = { TARGET = scope:prankster } + reverse_add_opinion = { + target = scope:prankster + modifier = grateful_opinion + opinion = 30 + } + # Apply consequences. + scope:victim = { + add_opinion = { + target = root + modifier = failure_opinion + opinion = -20 + } + # Plus some stress. + add_stress = medium_stress_gain + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -11 } + } + } + + # Let it be known, but leave it at that. + option = { + name = ep3_laamp_flavour_ewan.2014.c + + # Neither party is too happy. + scope:victim = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -10 + } + progress_towards_rival_effect = { + REASON = rival_played_cruel_pranks + CHARACTER = scope:prankster + OPINION = default_rival_opinion + } + } + reverse_add_opinion = { + target = scope:prankster + modifier = upset_opinion + opinion = -10 + } + # But you do seem quite impartial. + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_truth_hound_modifier + years = 10 + } + + # No stress for opt out. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -2 } + } + } +} + +# Discovered source of rumours. +ep3_laamp_flavour_ewan.2015 = { + type = character_event + title = ep3_laamp_flavour_ewan.2015.t + desc = ep3_laamp_flavour_ewan.2015.desc + theme = laamp + left_portrait = { + character = scope:victim + animation = anger + } + right_portrait = { + character = scope:rumourmonger + animation = disbelief + } + override_background = { reference = ep3_campfire } + + # Punish scope:rumourmonger. + option = { + name = ep3_laamp_flavour_ewan.2015.a + + # Scope:victim is happy. + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_truth_hound_modifier + years = 10 + } + scope:victim = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + progress_towards_rival_effect = { + REASON = rival_spread_rumours + CHARACTER = scope:rumourmonger + OPINION = default_rival_opinion + } + } + # Apply consequences. + scope:rumourmonger = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + # Plus some stress. + add_stress = medium_stress_gain + } + + stress_impact = { + honest = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 1 } + } + } + + # Cover for scope:rumourmonger. + option = { + name = ep3_laamp_flavour_ewan.2015.b + + # Scope:rumourmonger is happy. + add_favour_hook_if_possible_simple_effect = { TARGET = scope:rumourmonger } + reverse_add_opinion = { + target = scope:rumourmonger + modifier = grateful_opinion + opinion = 30 + } + # Apply consequences. + scope:victim = { + add_opinion = { + target = root + modifier = failure_opinion + opinion = -20 + } + # Plus some stress. + add_stress = medium_stress_gain + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -11 } + } + } + + # Let it be known, but leave it at that. + option = { + name = ep3_laamp_flavour_ewan.2015.c + + # Neither party is too happy. + scope:victim = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -10 + } + progress_towards_rival_effect = { + REASON = rival_spread_rumours + CHARACTER = scope:rumourmonger + OPINION = default_rival_opinion + } + } + reverse_add_opinion = { + target = scope:rumourmonger + modifier = upset_opinion + opinion = -10 + } + # But you do seem quite impartial. + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_truth_hound_modifier + years = 10 + } + + # No stress for opt out. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -2 } + } + } +} + +# Discovered hidden feud. +ep3_laamp_flavour_ewan.2016 = { + type = character_event + title = ep3_laamp_flavour_ewan.2016.t + desc = ep3_laamp_flavour_ewan.2016.desc + theme = laamp + left_portrait = { + character = scope:rival_1 + animation = anger + } + right_portrait = { + character = scope:rival_2 + animation = dismissal + } + override_background = { reference = ep3_campfire } + + immediate = { + scope:rival_1 = { + set_random_rivalry_reason = { + TARGET = scope:rival_2 + RELATION = rival + } + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2011_truth_hound_modifier + years = 10 + } + add_prestige = minor_prestige_gain + } + + # Try to reconcile them. + option = { + name = ep3_laamp_flavour_ewan.2016.a + + # Nab whichever rival has the higher diplomacy to be the duel target. + if = { + limit = { scope:rival_1.diplomacy >= scope:rival_2.diplomacy } + scope:rival_1 = { save_scope_as = duel_target } + } + else = { + scope:rival_2 = { save_scope_as = duel_target } + } + # Then roll the duel. + duel = { + skill = diplomacy + target = scope:duel_target + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2016.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2016.a.tt.success + left_icon = scope:rival_1 + right_icon = scope:rival_2 + scope:rival_1 = { remove_relation_rival = scope:rival_2 } + add_favour_hook_if_possible_simple_effect = { TARGET = scope:rival_1 } + add_favour_hook_if_possible_simple_effect = { TARGET = scope:rival_2 } + } + reverse_add_opinion = { + target = scope:rival_1 + modifier = respect_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:rival_2 + modifier = respect_opinion + opinion = 30 + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2016.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2016.a.tt.failure + left_icon = scope:rival_1 + right_icon = scope:rival_2 + reverse_add_opinion = { + target = scope:rival_1 + modifier = respect_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:rival_2 + modifier = respect_opinion + opinion = -30 + } + } + } + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 2 } + } + } + + # Instruct them that they will not allow their rivalry to hurt the camp. + option = { + name = ep3_laamp_flavour_ewan.2016.b + + reverse_add_opinion = { + target = scope:rival_1 + modifier = respect_opinion + opinion = 20 + } + reverse_add_opinion = { + target = scope:rival_2 + modifier = respect_opinion + opinion = 20 + } + + # No stress for opt out. + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } +} + +# No discovery. +ep3_laamp_flavour_ewan.2017 = { + type = character_event + title = ep3_laamp_flavour_ewan.2017.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:gossip_type = flag:affair } + desc = ep3_laamp_flavour_ewan.2017.desc.affair + } + triggered_desc = { + trigger = { scope:gossip_type = flag:petty_theft } + desc = ep3_laamp_flavour_ewan.2017.desc.petty_theft + } + triggered_desc = { + trigger = { scope:gossip_type = flag:cruel_pranks } + desc = ep3_laamp_flavour_ewan.2017.desc.cruel_pranks + } + triggered_desc = { + trigger = { scope:gossip_type = flag:nasty_rumours } + desc = ep3_laamp_flavour_ewan.2017.desc.nasty_rumours + } + triggered_desc = { + trigger = { scope:gossip_type = flag:hidden_feud } + desc = ep3_laamp_flavour_ewan.2017.desc.hidden_feud + } + } + first_valid = { + triggered_desc = { + trigger = { scope:duel_result = flag:won } + desc = ep3_laamp_flavour_ewan.2017.desc.duel.won + } + desc = ep3_laamp_flavour_ewan.2017.desc.duel.lost + } + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + animation = boredom + trigger = { scope:duel_result = flag:won } + } + triggered_animation = { + animation = shame + trigger = { scope:duel_result = flag:lost } + } + } + right_portrait = { + character = scope:victim + animation = paranoia + } + override_background = { reference = ep3_campfire } + + immediate = { + # If we have a victim, they're none too happy. + scope:victim ?= { add_stress = major_stress_gain } + } + + # Duel won. + option = { + name = ep3_laamp_flavour_ewan.2017.a + trigger = { scope:duel_result = flag:won } + + add_prestige = minor_prestige_gain + + stress_impact = { diligent = minor_stress_impact_loss } + ai_chance = { + # No logic needed for notification event. + base = 1 + } + } + + # Duel lost. + option = { + name = ep3_laamp_flavour_ewan.2017.b + trigger = { scope:duel_result = flag:lost } + + ep3_laamp_flavour_ewan_2011_duel_loss_effect = yes + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + # No logic needed for notification event. + base = 1 + } + } +} + +################################################## +# Bound Together +# by Ewan Cowhig Croft +# # 2021 - 2030 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_general_trigger = { + NOT = { has_character_flag = marriage_request_turned_down } + NOT = { has_trait = celibate } + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + # Make sure they either don't have complex relationships already, or else don't care about them. + any_consort = { count <= 0 } + might_cheat_on_every_partner_trigger = yes + # Filter out anyone who matters to us (excepting friends, who it's nice to approve, and rivals, who it's nice to turn down), we want mostly petty people. + NOR = { + is_close_family_of = root + has_relation_lover = root + } +} + +scripted_trigger ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_precise_trigger = { + ep3_laamp_flavour_ewan_2021_valid_courtier_for_own_marriage_general_trigger = yes + NOT = { this = $TARGET$ } + # 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$ } + # 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 + add = -15 + } + age <= { + value = $TARGET$.age + add = 15 + } + # Try to see how well they get along. + OR = { + AND = { + # Something in common. + number_of_personality_traits_in_common = { + target = $TARGET$ + value >= 1 + } + # Mutual positive opinions. + opinion = { + target = $TARGET$ + value >= 1 + } + reverse_opinion = { + target = $TARGET$ + value >= 1 + } + } + AND = { + # Lots in common. + number_of_personality_traits_in_common = { + target = $TARGET$ + value >= 2 + } + # They don't hate each other completely. + opinion = { + target = $TARGET$ + value >= -30 + } + reverse_opinion = { + target = $TARGET$ + value >= -30 + } + } + # Everything in common. + number_of_personality_traits_in_common = { + target = $TARGET$ + value >= 3 + } + } + # Make sure we're not already lovers. + NOT = { has_relation_lover = $TARGET$ } + # Filter out any rivals that somehow made it this far. + NOT = { + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = $TARGET$ } + } +} + +# Marriage/concubinage at camp. +ep3_laamp_flavour_ewan.2021 = { + type = character_event + title = ep3_laamp_flavour_ewan.2021.t + desc = ep3_laamp_flavour_ewan.2021.desc + theme = laamp + left_portrait = { + character = scope:follower_1 + animation = flirtation_left + } + right_portrait = { + character = scope:follower_2 + animation = admiration + } + override_background = { reference = ep3_campfire } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2021 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2021 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_short + } + } + # Make sure they like each other. + scope:follower_1 = { + add_opinion = { + target = scope:follower_2 + modifier = love_opinion + opinion = 100 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = love_opinion + opinion = 100 + } + } + # Plus, check if we should be matrilineal or patrilineal. + random_list = { + 100 = { + trigger = { + scope:follower_1 = { + faith = { + OR = { + has_doctrine = doctrine_gender_female_dominated + has_doctrine = doctrine_gender_equal + } + } + is_female = yes + } + } + save_scope_value_as = { + name = dominant_partner + value = flag:matrilineal + } + } + 100 = { + trigger = { + scope:follower_1 = { + faith = { + OR = { + has_doctrine = doctrine_gender_male_dominated + has_doctrine = doctrine_gender_equal + } + } + is_male = yes + } + } + save_scope_value_as = { + name = dominant_partner + value = flag:patrilineal + } + } + 100 = { + trigger = { + scope:follower_2 = { + faith = { + OR = { + has_doctrine = doctrine_gender_female_dominated + has_doctrine = doctrine_gender_equal + } + } + is_female = yes + } + } + save_scope_value_as = { + name = dominant_partner + value = flag:matrilineal + } + } + 100 = { + trigger = { + scope:follower_2 = { + faith = { + OR = { + has_doctrine = doctrine_gender_male_dominated + has_doctrine = doctrine_gender_equal + } + } + is_male = yes + } + } + save_scope_value_as = { + name = dominant_partner + value = flag:patrilineal + } + } + } + } + + # Permit the union. + option = { + name = ep3_laamp_flavour_ewan.2021.a + + if = { + limit = { + scope:dominant_partner = flag:matrilineal + scope:follower_1 = { is_female = yes } + } + scope:follower_1 = { marry_matrilineal = scope:follower_2 } + } + else = { + scope:follower_2 = { marry = scope:follower_1 } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Allow, but require only concubinage. + option = { + name = ep3_laamp_flavour_ewan.2021.b + trigger = { + OR = { + AND = { + scope:dominant_partner = flag:matrilineal + OR = { + scope:follower_1 = { + is_female = yes + faith = { has_doctrine = doctrine_concubines } + } + scope:follower_2 = { + is_female = yes + faith = { has_doctrine = doctrine_concubines } + } + } + } + AND = { + scope:dominant_partner = flag:patrilineal + OR = { + scope:follower_1 = { + is_male = yes + faith = { has_doctrine = doctrine_concubines } + } + scope:follower_2 = { + is_male = yes + faith = { has_doctrine = doctrine_concubines } + } + } + } + } + } + + # Apply the concubinage. + if = { + limit = { + scope:dominant_partner = flag:matrilineal + scope:follower_1 = { is_female = yes } + } + scope:follower_1 = { make_concubine = scope:follower_2 } + } + else = { + scope:follower_2 = { make_concubine = scope:follower_1 } + } + # If your faith doesn't allow concubinage, pay piety for this. + if = { + limit = { + NOT = { + faith = { has_doctrine = doctrine_concubines } + } + } + add_piety = major_piety_loss + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_vengefulness = 0.25 } + } + } + + # Forbid them. + option = { + name = ep3_laamp_flavour_ewan.2021.c + + custom_tooltip = ep3_laamp_flavour_ewan.2021.c.tt + reverse_add_opinion = { + target = scope:follower_1 + modifier = angry_opinion + opinion = -50 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = angry_opinion + opinion = -50 + } + # Decent chance this won't stop 'em. + hidden_effect = { + random = { + chance = 25 + scope:follower_1 = { + add_secret = { + target = scope:follower_2 + type = secret_lover + } + } + } + } + # Stop either of them from asking again for a _while_. + scope:follower_1 = { + add_character_flag = { + flag = marriage_request_turned_down + years = 30 + } + } + scope:follower_2 = { + add_character_flag = { + flag = marriage_request_turned_down + years = 30 + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } +} + +# Pre-filtering event to set up scopes. +ep3_laamp_flavour_ewan.2022 = { + hidden = yes + + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + static_group_filter = { + group = ep3_laamp_flavour_ewan.2022 + match = 0.2 + } + } + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2021 } + } + # Must have suitable courtiers around and about. + any_courtier = { + 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 } + } + } + } + } + + immediate = { + while = { + count = 10 + 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 } + } + 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 + } + } + } + # 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.2021 + } + } +} + +################################################## +# Through with You +# by Ewan Cowhig Croft +# # 2031 - 2040 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2031_valid_hating_courtier_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + # Make sure they hate us. + opinion = { + target = root + value <= -95 + } + # And wouldn't suck in the resultant duel. + diplomacy >= high_skill_rating + # Plus stop the stooge from leaving. + NOT = { has_court_position = stooge_camp_officer } + # Filter out characters who've tried this and failed. + NOT = { has_character_flag = failed_to_quit_camp } +} + +# Someone who hates you up and leaves. +ep3_laamp_flavour_ewan.2031 = { + type = character_event + title = ep3_laamp_flavour_ewan.2031.t + desc = { + desc = ep3_laamp_flavour_ewan.2031.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:waverers_check = flag:some } + desc = ep3_laamp_flavour_ewan.2031.desc.waverers.some + } + desc = ep3_laamp_flavour_ewan.2031.desc.waverers.none + } + } + theme = laamp + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:firebrand + animation = rage + } + override_background = { reference = ep3_campfire } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2031 } + } + # Make sure we have at least one firebrand troublemaker. + any_courtier = { ep3_laamp_flavour_ewan_2031_valid_hating_courtier_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2031 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2031 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_longer + } + } + # Grab a suitable firebrand. + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_2031_valid_hating_courtier_trigger = yes } + order_by = diplomacy + save_scope_as = firebrand + } + # See if we have anyone else who'd leave with them. + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + opinion = { + target = root + value <= -60 + } + # Not the stooge. + NOT = { has_court_position = stooge_camp_officer } + # Nor scope:firebrand themselves. + this != scope:firebrand + } + add_to_list = wavering_courtiers_list + save_scope_value_as = { + name = waverers_check + value = flag:some + } + } + # If we've got not waverers, flag that for loc. + if = { + limit = { "list_size(wavering_courtiers_list)" <= 0 } + save_scope_value_as = { + name = waverers_check + value = flag:none + } + } + } + + # Perhaps I can persuade you... + option = { + name = ep3_laamp_flavour_ewan.2031.a + + duel = { + skill = diplomacy + target = scope:firebrand + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2031.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2031.a.tt.success + left_icon = scope:firebrand + scope:firebrand = { + add_stress = major_stress_gain + hidden_effect = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 30 + } + } + } + every_in_list = { + list = wavering_courtiers_list + custom = ep3_laamp_flavour_ewan.2031.tt.success.wavering_courtiers + add_opinion = { + target = root + modifier = respect_opinion + opinion = 30 + } + } + } + scope:firebrand = { add_character_flag = failed_to_quit_camp } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2031.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2031.a.tt.failure + left_icon = scope:firebrand + add_prestige = medium_prestige_loss + scope:firebrand = { select_and_move_to_pool_effect = yes } + every_in_list = { + list = wavering_courtiers_list + custom = ep3_laamp_flavour_ewan.2031.tt.failure.wavering_courtiers_move_to_pool + select_and_move_to_pool_effect = yes + } + } + } + } + + stress_impact = { + calm = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # You're going nowhere, clap HerHim in irons! + option = { + name = ep3_laamp_flavour_ewan.2031.b + + # If you don't have a good reason, then yeah, this'll make you look like a douche. + imprison_character_effect = { + TARGET = scope:firebrand + IMPRISONER = root + } + scope:firebrand = { add_character_flag = failed_to_quit_camp } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + forgiving = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -2 } + } + } + + # Leave if you wish, but you'll take no one and nothing. + option = { + name = ep3_laamp_flavour_ewan.2031.c + trigger = { scope:waverers_check = flag:some } + + duel = { + skill = prowess + target = scope:firebrand + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2031.c.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2031.c.tt.success + left_icon = scope:firebrand + scope:firebrand = { select_and_move_to_pool_effect = yes } + every_in_list = { + list = wavering_courtiers_list + custom = ep3_laamp_flavour_ewan.2031.tt.success.wavering_courtiers + add_opinion = { + target = root + modifier = respect_opinion + opinion = 30 + } + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2031.c.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2031.c.tt.failure + left_icon = scope:firebrand + add_prestige = medium_prestige_loss + scope:firebrand = { select_and_move_to_pool_effect = yes } + every_in_list = { + list = wavering_courtiers_list + custom = ep3_laamp_flavour_ewan.2031.tt.failure.wavering_courtiers_move_to_pool + select_and_move_to_pool_effect = yes + } + } + } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + forgiving = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } + + # Go then, all of you. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:waverers_check = flag:some } + desc = ep3_laamp_flavour_ewan.2031.d.multi + } + desc = ep3_laamp_flavour_ewan.2031.d.solo + } + } + } + + # Consolation prestige. + if = { + limit = { scope:waverers_check = flag:some } + add_prestige = medium_prestige_gain + } + else = { add_prestige = minor_prestige_gain } + # And we lose _everyone_. + scope:firebrand = { select_and_move_to_pool_effect = yes } + every_in_list = { + list = wavering_courtiers_list + select_and_move_to_pool_effect = yes + } + + stress_impact = { + shy = medium_stress_impact_loss + calm = medium_stress_impact_loss + forgiving = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + vengeful = major_stress_impact_gain + wrathful = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -2 } + } + } +} + +################################################## +# Closer Quarters +# by Ewan Cowhig Croft +# # 2041 - 2050 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2041_valid_courtier_to_gain_lover_general_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { has_trait = celibate } + # Make sure they either don't have complex relationships already, or else don't care about them. + might_cheat_on_every_partner_trigger = yes + # One lover at a time (for most), just to keep the complexity down. + OR = { + num_of_relation_lover <= 0 + has_trait = lustful + has_trait = seducer + has_trait = rakish + } + # Filter out anyone we're in a relationship with, so that there's no weird complexities to account for there. + NOR = { + is_consort_of = root + has_relation_lover = root + } + # If it'd be criminal for us to cheat/fornicate, then at least make sure we'd chance it. + trigger_if = { + limit = { + OR = { + trait_is_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = this + } + AND = { + is_male = yes + faith = { has_doctrine_parameter = homosexuality_illegal } + } + } + } + NOR = { + has_trait = zealous + has_trait = craven + has_trait = just + } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_2041_valid_courtier_to_gain_lover_precise_trigger = { + ep3_laamp_flavour_ewan_2041_valid_courtier_to_gain_lover_general_trigger = yes + NOT = { this = $TARGET$ } + # Must have matching sexualities & the right legalities in place. + is_attracted_to_gender_of = $TARGET$ + $TARGET$ = { is_attracted_to_gender_of = prev } + # 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 + add = -8 + } + age <= { + value = $TARGET$.age + add = 8 + } + # Try to see how well they get along. + OR = { + AND = { + # Something in common. + number_of_personality_traits_in_common = { + target = $TARGET$ + value >= 1 + } + # Mutual positive opinions. + opinion = { + target = $TARGET$ + value >= 1 + } + reverse_opinion = { + target = $TARGET$ + value >= 1 + } + } + AND = { + # Lots in common. + number_of_personality_traits_in_common = { + target = $TARGET$ + value >= 2 + } + # They don't hate each other completely. + opinion = { + target = $TARGET$ + value >= -30 + } + reverse_opinion = { + target = $TARGET$ + value >= -30 + } + } + # Everything in common. + number_of_personality_traits_in_common = { + target = $TARGET$ + value >= 3 + } + # Allow the terminally horny to hook up. + AND = { + has_trait = lustful + $TARGET$ = { has_trait = lustful } + } + } + # Filter out any rivals that somehow made it this far. + NOT = { + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = $TARGET$ } + } +} + +# Lover developing from various sources. +ep3_laamp_flavour_ewan.2041 = { + type = character_event + title = ep3_laamp_flavour_ewan.2041.t + desc = ep3_laamp_flavour_ewan.2041.desc + theme = laamp + left_portrait = { + character = scope:follower_1 + animation = love + } + right_portrait = { + character = scope:follower_2 + animation = flirtation + } + override_background = { reference = ep3_campfire } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2041 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2041 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Make sure they like each other. + scope:follower_1 = { + add_opinion = { + target = scope:follower_2 + modifier = tryst_opinion + opinion = 75 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = tryst_opinion + opinion = 75 + } + } + } + + # Have them split up. + option = { + name = ep3_laamp_flavour_ewan.2041.a + + # Nab whichever follower has the higher diplomacy to be the duel target. + if = { + limit = { scope:follower_1.diplomacy >= scope:follower_2.diplomacy } + scope:follower_1 = { save_scope_as = duel_target } + } + else = { + scope:follower_2 = { save_scope_as = duel_target } + } + duel = { + skill = diplomacy + target = scope:duel_target + # Victory! + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2041.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2041.a.tt.success + left_icon = scope:follower_1 + right_icon = scope:follower_2 + add_prestige = minor_prestige_gain + scope:follower_1 = { + stress_impact = { + base = medium_stress_gain + chaste = minor_stress_impact_loss + lustful = minor_stress_impact_gain + } + } + scope:follower_2 = { + stress_impact = { + base = medium_stress_gain + chaste = minor_stress_impact_loss + lustful = minor_stress_impact_gain + } + } + } + } + # Defeat. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2041.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2041.a.tt.failure + left_icon = scope:follower_1 + right_icon = scope:follower_2 + scope:follower_1 = { + set_random_lover_reason = { TARGET = scope:follower_2 } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -40 + } + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = annoyed_opinion + opinion = -40 + } + } + scope:follower_1 = { + remove_opinion = { + target = scope:follower_2 + modifier = tryst_opinion + } + } + scope:follower_2 = { + remove_opinion = { + target = scope:follower_1 + modifier = tryst_opinion + } + } + } + } + + stress_impact = { + sadistic = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -2 } + opinion_modifier = { + opinion_target = scope:follower_1 + multiplier = -0.5 + } + opinion_modifier = { + opinion_target = scope:follower_2 + multiplier = -0.5 + } + } + } + + # None of my business. + option = { + name = ep3_laamp_flavour_ewan.2041.b + + scope:follower_1 = { + set_random_lover_reason = { TARGET = scope:follower_2 } + } + + # No stress for opt out. + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 2 } + opinion_modifier = { + opinion_target = scope:follower_1 + multiplier = 0.5 + } + opinion_modifier = { + opinion_target = scope:follower_2 + multiplier = 0.5 + } + } + } +} + +# Pre-filtering event to set up scopes. +ep3_laamp_flavour_ewan.2042 = { + hidden = yes + + trigger = { + trigger_if = { + limit = { + is_ai = yes + } + static_group_filter = { + group = ep3_laamp_flavour_ewan.2042 + match = 0.2 + } + } + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2041 } + } + # Must have suitable courtiers around and about. + any_courtier = { + 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 } + } + } + } + } + + immediate = { + while = { + count = 10 + 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 } + } + 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 + } + } + } + # 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 + } + } +} + +################################################## +# What's the Point? +# by Ewan Cowhig Croft +# # 2051 - 2060 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2051_suitably_lazy_courtier_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + OR = { + has_trait = lazy + has_trait = eccentric + has_trait = athletic + AND = { + has_trait = diligent + has_trait = humble + } + } + NOR = { + has_trait = arrogant + has_trait = gregarious + culture = { has_cultural_parameter = better_disease_resistance } + } +} + +# Someone abandons bathing. +ep3_laamp_flavour_ewan.2051 = { + type = character_event + title = ep3_laamp_flavour_ewan.2051.t + desc = { + desc = ep3_laamp_flavour_ewan.2051.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:smelly = { + has_trait = diligent + has_trait = humble + } + } + desc = ep3_laamp_flavour_ewan.2051.desc.diligent_and_humble + } + triggered_desc = { + trigger = { + scope:smelly = { has_trait = athletic } + } + desc = ep3_laamp_flavour_ewan.2051.desc.athletic + } + triggered_desc = { + trigger = { + scope:smelly = { has_trait = gregarious } + } + desc = ep3_laamp_flavour_ewan.2051.desc.gregarious + } + desc = ep3_laamp_flavour_ewan.2051.desc.lazy + } + desc = ep3_laamp_flavour_ewan.2051.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:smelly + animation = personality_bold + } + override_background = { reference = wilderness } + override_effect_2d = { reference = flies } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2051 } + } + # Must have at least one potential scope:smelly. + any_courtier = { ep3_laamp_flavour_ewan_2051_suitably_lazy_courtier_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2051 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2051 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_longer + } + } + # Nab our scope:smelly. + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_2051_suitably_lazy_courtier_trigger = yes } + order_by = { + # We want the least socially competent person available. + value = 100 + subtract = diplomacy + } + save_scope_as = smelly + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2051_is_stinker_modifier + years = 10 + } + } + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_anybody_trigger = yes + this != scope:smelly + } + custom = custom.every_follower + add_opinion = { + target = scope:smelly + modifier = disgusted_opinion + opinion = -30 + } + } + } + + # Scope:smelly, you _reek_! + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:smelly = { + has_trait = diligent + has_trait = humble + } + } + desc = ep3_laamp_flavour_ewan.2051.a.diligent_and_humble + } + triggered_desc = { + trigger = { + scope:smelly = { has_trait = athletic } + } + desc = ep3_laamp_flavour_ewan.2051.a.athletic + } + triggered_desc = { + trigger = { + scope:smelly = { has_trait = gregarious } + } + desc = ep3_laamp_flavour_ewan.2051.a.gregarious + } + desc = ep3_laamp_flavour_ewan.2051.a.lazy + } + } + } + + reverse_add_opinion = { + target = scope:smelly + modifier = upset_opinion + opinion = -20 + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2051_disciplined_stinker_modifier + years = 10 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + honest = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 2 } + } + } + + # Join HerHim in filthy freedom. + option = { + name = ep3_laamp_flavour_ewan.2051.b + + reverse_add_opinion = { + target = scope:smelly + modifier = pleased_opinion + opinion = 35 + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2051_joined_stinker_modifier + years = 10 + } + + stress_impact = { + content = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_sociability = -1 + ai_boldness = 1 + } + } + } + + # Leave this petty drama to play out. + option = { + name = ep3_laamp_flavour_ewan.2051.c + + # Consolation prestige. + add_prestige = minor_prestige_gain + + stress_impact = { + shy = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -2 } + } + } +} + +################################################## +# My Spot +# by Ewan Cowhig Croft +# # 2061 - 2070 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2061_valid_angry_courtier_general_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOR = { + has_trait = patient + has_trait = calm + has_trait = humble + } +} + +scripted_trigger ep3_laamp_flavour_ewan_2061_valid_angry_courtier_precise_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOT = { this = $TARGET$ } + # Make sure we've got poor relations with our target. + opinion = { + target = $TARGET$ + value <= -20 + } + reverse_opinion = { + target = $TARGET$ + value <= -20 + } + NOT = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $TARGET$ } + } + save_temporary_scope_as = char_temp2 +} + +# Fight at dinner over tent pitch location. +ep3_laamp_flavour_ewan.2061 = { + type = character_event + title = ep3_laamp_flavour_ewan.2061.t + desc = ep3_laamp_flavour_ewan.2061.desc + theme = laamp + left_portrait = { + character = scope:victim + animation = anger + } + right_portrait = { + character = scope:thief + animation = dismissal + } + override_background = { reference = corridor_night } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2061 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2061 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Now, make them upset with one another. + scope:thief = { + add_opinion = { + target = scope:victim + modifier = overreaction_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:victim + modifier = annoyed_opinion + opinion = -30 + } + } + } + + # Side with scope:victim. + option = { + name = ep3_laamp_flavour_ewan.2061.a + + add_favour_hook_if_possible_simple_effect = { TARGET = scope:victim } + reverse_add_opinion = { + target = scope:victim + modifier = respect_opinion + opinion = 20 + } + reverse_add_opinion = { + target = scope:thief + modifier = upset_opinion + opinion = -20 + } + + stress_impact = { + honest = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 1 } + opinion_modifier = { opinion_target = scope:victim } + } + } + + # Side with scope:thief. + option = { + name = ep3_laamp_flavour_ewan.2061.b + + add_favour_hook_if_possible_simple_effect = { TARGET = scope:thief } + reverse_add_opinion = { + target = scope:thief + modifier = respect_opinion + opinion = 20 + } + reverse_add_opinion = { + target = scope:victim + modifier = upset_opinion + opinion = -20 + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -1 } + opinion_modifier = { opinion_target = scope:thief } + } + } + + # Fixed Layout: we have rules for a reason, scope:thief. + option = { + name = ep3_laamp_flavour_ewan.2061.c + trigger = { + domicile = { has_domicile_building = camp_perimeter_fixed_layout } + } + reason = has_building_camp_perimeter_fixed_layout + + add_favour_hook_if_possible_simple_effect = { TARGET = scope:victim } + reverse_add_opinion = { + target = scope:victim + modifier = respect_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:thief + modifier = respect_opinion + opinion = 20 + } + add_prestige = medium_prestige_gain + + stress_impact = { + honest = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + } + ai_chance = { + # Just a good option for the AI to take if they can. + base = 1000 + } + } + + # Figure it out amongst yourselves. + option = { + name = ep3_laamp_flavour_ewan.2061.d + + # Consolation prestige. + add_prestige = minor_prestige_gain + + stress_impact = { + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -1 } + } + } +} + +# Pre-filtering event to set up scopes. +ep3_laamp_flavour_ewan.2062 = { + hidden = yes + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2061 } + } + # Make sure we've got suitable courtiers available. + any_courtier = { + 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 } + } + } + } + } + + immediate = { + while = { + count = 10 + 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 } + } + 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 + } + } + } + # If we've actually got our dudes, proceed to the event. + if = { + limit = { + exists = scope:victim + exists = scope:thief + } + trigger_event = ep3_laamp_flavour_ewan.2061 + } + } +} + +################################################## +# Second-in-Command +# by Ewan Cowhig Croft +# # 2071 - 2080 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2071_better_possible_sics_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + can_be_employed_as = second_camp_officer + "aptitude(second_camp_officer)" >= 2 + # Plus make sure they'd actually want the job. + NOR = { + has_trait = lazy + has_trait = humble + has_trait = content + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = root } + } + opinion = { + target = root + value >= 20 + } + # For tonal reasons, it's easiest to just avoid disloyal/loyalty-hooked characters getting in here for any reason. + NOR = { + has_trait = disloyal + root = { has_strong_hook = prev } + } +} + +scripted_effect ep3_laamp_flavour_ewan_2071_apply_appointment_effect = { + camp_officer_grant_effect = { + EMPLOYER = root + POS = second + CANDIDATE = $CHOSEN$ + } + reverse_add_opinion = { + target = $CHOSEN$ + modifier = grateful_opinion + opinion = 50 + } +} + +scripted_effect ep3_laamp_flavour_ewan_2071_apply_trio_annoyed_opinions_effect = { + # If we have a scope:current_sic, then they're upset too. + scope:current_sic ?= { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -50 + } + } + # Whilst everyone else is just annoyed. + reverse_add_opinion = { + target = $CANDIDATE_A$ + modifier = insult_opinion + opinion = -30 + } + reverse_add_opinion = { + target = $CANDIDATE_B$ + modifier = insult_opinion + opinion = -30 + } +} + +# People scrabble for empty/ineffectual SiC position. +ep3_laamp_flavour_ewan.2071 = { + type = character_event + title = ep3_laamp_flavour_ewan.2071.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:current_sic } + desc = ep3_laamp_flavour_ewan.2071.desc.sic_exists + } + desc = ep3_laamp_flavour_ewan.2071.desc.sic_vacant + } + desc = ep3_laamp_flavour_ewan.2071.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:current_sic + animation = worry + } + lower_left_portrait = scope:candidate_1 + lower_center_portrait = scope:candidate_2 + lower_right_portrait = scope:candidate_3 + override_background = { reference = armory } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2071 } + } + # Either you don't have a SiC, or your SiC sucks. + OR = { + NOT = { employs_court_position = second_camp_officer } + court_position:second_camp_officer = { "aptitude(second_camp_officer)" <= 1 } + } + # You have at least three characters who'd be better. + any_courtier = { + count >= 3 + ep3_laamp_flavour_ewan_2071_better_possible_sics_trigger = yes + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2071 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2071 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Is the spot vacant, or merely incompetent? + if = { + limit = { employs_court_position = second_camp_officer } + court_position:second_camp_officer = { save_scope_as = current_sic } + } + # Alright, process out our possible SiCs. + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_2071_better_possible_sics_trigger = yes } + order_by = { + # Ok, first we group by aptitude. + value = "aptitude(second_camp_officer)" + # Then we want to use diplomacy as a tiebreaker... + ## ... so make it a decimal of aptitude... + multiply = 100 + ## ... and _then_ add it. + add = diplomacy + } + max = 3 + check_range_bounds = no + # We place these in order of how much they'll offer you, which means we actually want to invert our count for how we save the scopes (so 3 -> 2 -> 1). + if = { + limit = { + NOT = { exists = scope:candidate_3 } + } + save_scope_as = candidate_3 + } + else_if = { + limit = { + NOT = { + this = scope:candidate_3 + exists = scope:candidate_2 + } + } + save_scope_as = candidate_2 + } + else_if = { + limit = { + NOT = { + this = scope:candidate_3 + this = scope:candidate_2 + exists = scope:candidate_1 + } + } + save_scope_as = candidate_1 + } + } + } + + # Accept scope:candidate_1, and their offer of complete loyalty. + option = { + name = ep3_laamp_flavour_ewan.2071.a + + ep3_laamp_flavour_ewan_2071_apply_appointment_effect = { CHOSEN = scope:candidate_1 } + add_hook = { + target = scope:candidate_1 + type = loyalty_hook + } + # Flag that the loyalty hook is dependent on this court position. + scope:candidate_1 = { + set_variable = { + name = loyalty_dependent_on_position + value = root + } + } + # Everyone else is upset. + ep3_laamp_flavour_ewan_2071_apply_trio_annoyed_opinions_effect = { + CANDIDATE_A = scope:candidate_2 + CANDIDATE_B = scope:candidate_3 + } + + # No stress here. + ai_chance = { + base = 1 + opinion_modifier = { opinion_target = scope:candidate_1 } + } + } + + # Take scope:candidate_2, who says they'll work themselves to death. + option = { + name = ep3_laamp_flavour_ewan.2071.b + + ep3_laamp_flavour_ewan_2071_apply_appointment_effect = { CHOSEN = scope:candidate_2 } + scope:candidate_2 = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2071_b_work_self_to_death_modifier + years = 20 + } + } + # Everyone else is upset. + ep3_laamp_flavour_ewan_2071_apply_trio_annoyed_opinions_effect = { + CANDIDATE_A = scope:candidate_1 + CANDIDATE_B = scope:candidate_3 + } + + # No stress here. + ai_chance = { + base = 1 + opinion_modifier = { opinion_target = scope:candidate_2 } + } + } + + # Mmmm, scope:candidate_3, please: HerHis skills are self-evident. + option = { + name = ep3_laamp_flavour_ewan.2071.c + + ep3_laamp_flavour_ewan_2071_apply_appointment_effect = { CHOSEN = scope:candidate_3 } + # Everyone else is upset. + ep3_laamp_flavour_ewan_2071_apply_trio_annoyed_opinions_effect = { + CANDIDATE_A = scope:candidate_1 + CANDIDATE_B = scope:candidate_2 + } + + # No stress here. + ai_chance = { + base = 1 + opinion_modifier = { opinion_target = scope:candidate_3 } + } + } + + # It shall remain vacant/scope:sic shall keep HerHis post. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:current_sic } + desc = ep3_laamp_flavour_ewan.2071.d.post_filled + } + desc = ep3_laamp_flavour_ewan.2071.d.post_empty + } + } + } + + # If we have a scope:current_sic, then they're duly grateful. + scope:current_sic ?= { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + # Whilst everyone else is just annoyed. + reverse_add_opinion = { + target = scope:candidate_1 + modifier = insult_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:candidate_2 + modifier = insult_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:candidate_3 + modifier = insult_opinion + opinion = -30 + } + # Consolation prestige. + add_prestige = minor_prestige_gain + + # Lose stress if we're playing to our reputation + it's appropriate. + if = { + limit = { exists = scope:current_sic } + stress_impact = { loyal = medium_stress_loss } + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -2 } + } + } +} + +################################################## +# A Well-Oiled Machine +# by Ewan Cowhig Croft +# # 2081 - 2090 +################################################## + +# Helping each other out at pitch time. +ep3_laamp_flavour_ewan.2081 = { + type = character_event + title = ep3_laamp_flavour_ewan.2081.t + desc = { + desc = ep3_laamp_flavour_ewan.2081.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:follower_1 = { + OR = { + opinion = { + target = scope:follower_2 + value <= -25 + } + reverse_opinion = { + target = scope:follower_2 + value <= -25 + } + } + } + } + desc = ep3_laamp_flavour_ewan.2081.desc.dislike + } + triggered_desc = { + trigger = { + scope:follower_1 = { + OR = { + opinion = { + target = scope:follower_2 + value >= 25 + } + reverse_opinion = { + target = scope:follower_2 + value >= 25 + } + } + } + } + desc = ep3_laamp_flavour_ewan.2081.desc.like + } + desc = ep3_laamp_flavour_ewan.2081.desc.neutral + } + desc = ep3_laamp_flavour_ewan.2081.desc.outro + } + theme = laamp + left_portrait = { + character = scope:follower_1 + animation = laugh + } + right_portrait = { + character = scope:follower_2 + animation = personality_bold + } + override_background = { reference = corridor_night } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2081 } + } + # Must have suitable courtiers available. + any_courtier = { + count >= 2 + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2081 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2081 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_longer + } + } + # Nab our two courtiers. + random_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_trigger = yes } + weight = { + modifier = { + add = stewardship + always = yes + } + modifier = { + add = 10 + has_trait = diligent + } + modifier = { + add = -10 + has_trait = lazy + } + } + save_scope_as = follower_1 + } + random_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + this != scope:follower_1 + } + weight = { + modifier = { + add = stewardship + always = yes + } + modifier = { + add = 10 + has_trait = diligent + } + modifier = { + add = -10 + has_trait = lazy + } + } + save_scope_as = follower_2 + } + } + + # Do you need another hand? + option = { + name = ep3_laamp_flavour_ewan.2081.a + + reverse_add_opinion = { + target = scope:follower_1 + modifier = one_of_us_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = one_of_us_opinion + opinion = 30 + } + add_prestige = minor_prestige_loss + + stress_impact = { + diligent = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + ambitious = minor_stress_impact_gain + lazy = minor_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Legitimist: after you're done here, go help raise my pavillion. + option = { + name = ep3_laamp_flavour_ewan.2081.b + trigger = { has_realm_law = camp_purpose_legitimists } + reason = purpose_legitimists + + add_prestige = medium_prestige_gain + + stress_impact = { + arrogant = medium_stress_impact_loss + lazy = minor_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Hmmm... don't like that, better move them apart. + option = { + name = ep3_laamp_flavour_ewan.2081.c + trigger = { + NOT = { has_realm_law = camp_purpose_legitimists } + } + + reverse_add_opinion = { + target = scope:follower_1 + modifier = annoyed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = annoyed_opinion + opinion = -10 + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -1 } + } + } + + # Fixed Layout: as it should be. + option = { + name = ep3_laamp_flavour_ewan.2081.d + trigger = { + domicile = { has_domicile_building = camp_perimeter_fixed_layout } + } + reason = has_building_camp_perimeter_fixed_layout + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_2081_d_well_oiled_operation_modifier + years = 10 + } + + # No stress here, + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } + + # Good to see those two getting on! + option = { + name = ep3_laamp_flavour_ewan.2081.e + + scope:follower_1 = { + add_opinion = { + target = scope:follower_2 + modifier = respect_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = respect_opinion + opinion = 30 + } + } + + # No stress here, + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } +} + +################################################## +# Crimes of Passion +# by Ewan Cowhig Croft +# # 2091 - 2100 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_2091_valid_angry_courtier_general_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + # Mustn't have a deescalatory personality. + NOR = { + has_trait = patient + has_trait = calm + has_trait = forgiving + } + # And make sure a fight is conceivable. + prowess >= 7 + can_start_single_combat_trigger = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_2091_valid_angry_courtier_precise_trigger = { + NOT = { this = $TARGET$ } + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + # Make sure we've got poor relations with our target. + opinion = { + target = $TARGET$ + value <= -25 + } + reverse_opinion = { + target = $TARGET$ + value <= -25 + } + NOT = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = $TARGET$ } + } + save_temporary_scope_as = char_temp2 +} + +scripted_effect ep3_laamp_flavour_ewan_2091_start_duel_to_death_effect = { + configure_start_single_combat_effect = { + SC_INITIATOR = scope:attacker + SC_ATTACKER = scope:attacker + SC_DEFENDER = scope:defender + FATALITY = always + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = single_combat.1006 + OUTPUT_EVENT = ep3_laamp_flavour_ewan.2092 + } +} + +# Followers attack each other. +ep3_laamp_flavour_ewan.2091 = { + type = character_event + title = ep3_laamp_flavour_ewan.2091.t + desc = ep3_laamp_flavour_ewan.2091.desc + theme = laamp + left_portrait = { + character = scope:attacker + animation = random_weapon_aggressive + } + right_portrait = { + character = scope:defender + animation = shock + } + override_background = { reference = ep3_campfire } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_2091 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_2091 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Now, make them upset with one another. + scope:attacker = { + add_opinion = { + target = scope:defender + modifier = hate_opinion + opinion = -50 + } + reverse_add_opinion = { + target = scope:defender + modifier = hate_opinion + opinion = -50 + } + } + # Plus make sure we _definitely_ know who root is, for the after-toasts. + save_scope_as = og_root + } + + # Intervene. + option = { + name = ep3_laamp_flavour_ewan.2091.a + + duel = { + skill = diplomacy + target = scope:attacker + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2091.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2091.a.tt.success + left_icon = scope:attacker + right_icon = scope:defender + reverse_add_opinion = { + target = scope:attacker + modifier = respect_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:defender + modifier = respect_opinion + opinion = 40 + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.2091.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2091.a.tt.failure + left_icon = scope:attacker + right_icon = scope:defender + reverse_add_opinion = { + target = scope:attacker + modifier = respect_opinion + opinion = -20 + } + reverse_add_opinion = { + target = scope:defender + modifier = respect_opinion + opinion = -20 + } + } + scope:attacker = { + increase_wounds_no_death_effect = { REASON = fight } + } + scope:defender = { + increase_wounds_no_death_effect = { REASON = fight } + } + } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Freebooters/S4H: invite them to settle their grievances with a formal duel. + option = { + name = ep3_laamp_flavour_ewan.2091.b + trigger = { + OR = { + has_realm_law = camp_purpose_mercenaries + has_realm_law = camp_purpose_brigands + } + } + reason = purpose_brigands_and_mercenaries + + add_prestige = medium_prestige_gain + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + NOR = { + this = scope:attacker + this = scope:defender + } + } + custom = custom.every_adult_follower + add_stress = major_stress_loss + add_opinion = { + target = root + modifier = entertained_opinion + opinion = 30 + } + } + save_scope_value_as = { + name = duel_legal + value = yes + } + custom_tooltip = ep3_laamp_flavour_ewan.2091.tt.duel_commences + ep3_laamp_flavour_ewan_2091_start_duel_to_death_effect = yes + + # For once, all sides of the Calm/Just axes are happy! Blood and justice on the right terms! + ## ... or something. + stress_impact = { + calm = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -2 } + } + } + + # Have the attacker arrested and thrown in the stocks. + option = { + name = ep3_laamp_flavour_ewan.2091.c + + rightfully_imprison_character_effect = { + TARGET = scope:attacker + IMPRISONER = root + } + reverse_add_opinion = { + target = scope:defender + modifier = grateful_opinion + opinion = 50 + } + + stress_impact = { + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 1 } + } + } + + # Let them play it out. + option = { + name = ep3_laamp_flavour_ewan.2091.d + + custom_tooltip = ep3_laamp_flavour_ewan.2091.tt.duel_commences + ep3_laamp_flavour_ewan_2091_start_duel_to_death_effect = yes + + stress_impact = { + wrathful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + just = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } +} + +ep3_laamp_flavour_ewan.2092 = { + hidden = yes + + immediate = { + if = { + limit = { scope:sc_victor = scope:attacker } + scope:og_root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2092.tt.attacker_won + left_icon = scope:attacker + right_icon = scope:defender + custom_tooltip = ep3_laamp_flavour_ewan.2092.tt.attacker_won.tt + scope:attacker = { + if = { + limit = { + NOT = { exists = scope:duel_legal } + } + laamp_rewards_apply_criminal_xp_effect = { + TRACK = marauder + XP_MAX = gallowsbait_xp_medium_gain + XP_MIN = gallowsbait_xp_medium_gain + } + } + } + } + } + } + else = { + scope:og_root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.2092.tt.defender_won + left_icon = scope:defender + right_icon = scope:attacker + custom_tooltip = ep3_laamp_flavour_ewan.2092.tt.defender_won.tt + } + } + } + } +} + +# Pre-filtering event to set up scopes. +ep3_laamp_flavour_ewan.2093 = { + hidden = yes + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_2091 } + } + # Make sure we've got suitable courtiers available. + any_courtier = { + 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 } + } + } + } + } + + immediate = { + while = { + count = 10 + 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 } + } + 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 + } + } + } + # If we've actually got our dudes, proceed to the event. + if = { + limit = { + exists = scope:defender + exists = scope:attacker + } + trigger_event = ep3_laamp_flavour_ewan.2091 + } + } +} + + + + + + + + + + + +################################################## +# CAMP PURPOSE + +################################################## +# Heard of You +# by Ewan Cowhig Croft +# # 3001 - 3010 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_3001_spawn_appropriate_characters_effect = { + create_character = { + template = criminal_brains_character + location = root.location + save_scope_as = brains + diplomacy = { + $OVERRIDE_SKILL_LOW$ + $OVERRIDE_SKILL_HIGH$ + } + stewardship = { + min_template_medium_skill + max_template_medium_skill + } + } + create_character = { + template = criminal_brawn_character + location = root.location + save_scope_as = brawn + prowess = { + $OVERRIDE_SKILL_LOW$ + $OVERRIDE_SKILL_HIGH$ + } + } + create_character = { + template = criminal_fingers_character + location = root.location + save_scope_as = fingers + intrigue = { + $OVERRIDE_SKILL_LOW$ + $OVERRIDE_SKILL_HIGH$ + } + } + # Plus try to give 'em all fun nicknames. + hidden_effect = { + scope:brains = { assign_random_nickname_effect = yes } + scope:brawn = { assign_random_nickname_effect = yes } + scope:fingers = { assign_random_nickname_effect = yes } + } +} + +scripted_effect ep3_laamp_flavour_ewan_3001_recruit_characters_effect = { + add_courtier = scope:brains + add_courtier = scope:brawn + add_courtier = scope:fingers + reverse_add_opinion = { + target = scope:brains + modifier = grateful_opinion + opinion = $OPINION$ + } + reverse_add_opinion = { + target = scope:brawn + modifier = grateful_opinion + opinion = $OPINION$ + } + reverse_add_opinion = { + target = scope:fingers + modifier = grateful_opinion + opinion = $OPINION$ + } +} + +# Brigands attract cool local criminals, scaled to prestige level. +ep3_laamp_flavour_ewan.3001 = { + type = character_event + title = ep3_laamp_flavour_ewan.3001.t + desc = { + desc = ep3_laamp_flavour_ewan.3001.desc.intro + first_valid = { + triggered_desc = { + trigger = { prestige_level >= 5 } + desc = ep3_laamp_flavour_ewan.3001.desc.legendary + } + triggered_desc = { + trigger = { prestige_level >= 4 } + desc = ep3_laamp_flavour_ewan.3001.desc.exalted + } + triggered_desc = { + trigger = { prestige_level >= 3 } + desc = ep3_laamp_flavour_ewan.3001.desc.illustrious + } + triggered_desc = { + trigger = { prestige_level >= 2 } + desc = ep3_laamp_flavour_ewan.3001.desc.distinguished + } + triggered_desc = { + trigger = { prestige_level >= 1 } + desc = ep3_laamp_flavour_ewan.3001.desc.established + } + desc = ep3_laamp_flavour_ewan.3001.desc.disgraced + } + } + theme = laamp + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:brains + animation = admiration + } + lower_center_portrait = scope:brawn + lower_right_portrait = scope:fingers + override_background = { reference = armory } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3001 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_brigands + # And can't have more than a certain amount of courtiers already. + any_courtier = { count <= 20 } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3001 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3001 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + # Spawn our lil dudes. + if = { + limit = { prestige_level = 0 } + ep3_laamp_flavour_ewan_3001_spawn_appropriate_characters_effect = { + OVERRIDE_SKILL_LOW = min_template_low_skill + OVERRIDE_SKILL_HIGH = max_template_low_skill + } + } + else_if = { + limit = { prestige_level = 1 } + ep3_laamp_flavour_ewan_3001_spawn_appropriate_characters_effect = { + OVERRIDE_SKILL_LOW = min_template_average_skill + OVERRIDE_SKILL_HIGH = max_template_average_skill + } + } + else_if = { + limit = { prestige_level = 2 } + ep3_laamp_flavour_ewan_3001_spawn_appropriate_characters_effect = { + OVERRIDE_SKILL_LOW = min_template_medium_skill + OVERRIDE_SKILL_HIGH = max_template_medium_skill + } + } + else_if = { + limit = { prestige_level = 3 } + ep3_laamp_flavour_ewan_3001_spawn_appropriate_characters_effect = { + OVERRIDE_SKILL_LOW = min_template_decent_skill + OVERRIDE_SKILL_HIGH = max_template_decent_skill + } + } + else_if = { + limit = { prestige_level = 4 } + ep3_laamp_flavour_ewan_3001_spawn_appropriate_characters_effect = { + OVERRIDE_SKILL_LOW = min_template_high_skill + OVERRIDE_SKILL_HIGH = max_template_high_skill + } + } + else_if = { + limit = { prestige_level = 5 } + ep3_laamp_flavour_ewan_3001_spawn_appropriate_characters_effect = { + OVERRIDE_SKILL_LOW = min_template_very_high_skill + OVERRIDE_SKILL_HIGH = max_template_very_high_skill + } + } + ## Shouldn't happen, but just in case, leave a fallback equivalent to the bottom rung. + else = { + ep3_laamp_flavour_ewan_3001_spawn_appropriate_characters_effect = { + OVERRIDE_SKILL_LOW = min_template_low_skill + OVERRIDE_SKILL_HIGH = max_template_low_skill + } + } + # Plus make sure they get on. + hidden_effect = { + scope:brains = { + set_relation_friend = { + reason = friend_petty_criminals_together + target = scope:fingers + } + set_relation_friend = { + reason = friend_petty_criminals_together + target = scope:brawn + } + } + scope:brawn = { + set_relation_friend = { + reason = friend_petty_criminals_together + target = scope:fingers + } + } + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + } + + # Sure, we'll take you on... + option = { + name = ep3_laamp_flavour_ewan.3001.a + + ep3_laamp_flavour_ewan_3001_recruit_characters_effect = { OPINION = 100 } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 2 } + } + } + + # Stewardship duel: ... but you've gotta pay into the _pot_ first. + option = { + name = ep3_laamp_flavour_ewan.3001.b + + duel = { + skill = stewardship + target = scope:brains + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3001.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3001.b.tt.success + left_icon = scope:brains + scope:brains = { + pay_short_term_gold = { + target = root + gold = medium_gold_laamps_value + } + # Don't actually charge scope:brains, though. + hidden_effect = { add_gold = medium_gold_laamps_value } + } + } + ep3_laamp_flavour_ewan_3001_recruit_characters_effect = { OPINION = 40 } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3001.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3001.b.tt.failure + left_icon = scope:brains + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + generous = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = 2 } + } + } + + # Heh, get out of here y'curs. + option = { + name = ep3_laamp_flavour_ewan.3001.c + + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:brains + modifier = disappointed_opinion + opinion = -20 + } + reverse_add_opinion = { + target = scope:brawn + modifier = disappointed_opinion + opinion = -20 + } + reverse_add_opinion = { + target = scope:fingers + modifier = disappointed_opinion + opinion = -20 + } + + stress_impact = { + paranoid = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -2 } + } + } + + after = { + # If we're an AI & didn't recruit them, clean up our criminals. + if = { + limit = { + is_ai = yes + NOR = { + this = scope:brains.liege + this = scope:brawn.liege + this = scope:fingers.liege + } + } + scope:brains = { + death = { death_reason = death_vanished } + } + scope:brawn = { + death = { death_reason = death_vanished } + } + scope:fingers = { + death = { death_reason = death_vanished } + } + + } + } +} + +################################################## +# Arguing the Toss +# by Ewan Cowhig Croft +# # 3011 - 3020 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_3011_eloquent_courtier_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + diplomacy >= decent_skill_rating +} + +scripted_trigger ep3_laamp_flavour_ewan_3011_wise_courtier_trigger = { + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + learning >= decent_skill_rating +} + +# Scholars debate a learned follower. +ep3_laamp_flavour_ewan.3011 = { + type = character_event + title = ep3_laamp_flavour_ewan.3011.t + desc = ep3_laamp_flavour_ewan.3011.desc + theme = laamp + left_portrait = { + character = scope:eloquent_follower + animation = toast_goblet + } + right_portrait = { + character = scope:wise_follower + animation = writing + } + override_background = { reference = bp1_bonfire } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3011 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_scholars + # And some suitable courtiers. + any_courtier = { ep3_laamp_flavour_ewan_3011_eloquent_courtier_trigger = yes } + ## Check for at least two, if we only have one valid courtier for diplo, them also being the best courtier for learning doesn't cause a hole in the script. + any_courtier = { + count >= 2 + ep3_laamp_flavour_ewan_3011_wise_courtier_trigger = yes + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3011 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3011 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + # Set up our courtiers. + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_3011_eloquent_courtier_trigger = yes } + order_by = diplomacy + save_scope_as = eloquent_follower + } + ordered_courtier = { + limit = { + ep3_laamp_flavour_ewan_3011_wise_courtier_trigger = yes + this != scope:eloquent_follower + } + order_by = learning + save_scope_as = wise_follower + } + } + + # Diplo duel the eloquent follower for prestige. + option = { + name = ep3_laamp_flavour_ewan.3011.a + + duel = { + skill = diplomacy + target = scope:eloquent_follower + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3011.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3011.a.tt.success + left_icon = scope:eloquent_follower + add_prestige = { + if = { + limit = { scope:eloquent_follower.diplomacy >= 32 } + add = major_prestige_gain + } + else = { add = medium_prestige_gain } + } + reverse_add_opinion = { + target = scope:eloquent_follower + modifier = respect_opinion + opinion = 40 + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3011.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3011.a.tt.failure + left_icon = scope:eloquent_follower + reverse_add_opinion = { + target = scope:eloquent_follower + modifier = respect_opinion + opinion = 20 + } + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Learning duel the wise follower for prestige. + option = { + name = ep3_laamp_flavour_ewan.3011.b + + duel = { + skill = learning + target = scope:wise_follower + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3011.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3011.b.tt.success + left_icon = scope:wise_follower + add_prestige = { + if = { + limit = { scope:wise_follower.learning >= 32 } + add = major_prestige_gain + } + else = { add = medium_prestige_gain } + } + reverse_add_opinion = { + target = scope:wise_follower + modifier = respect_opinion + opinion = 40 + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3011.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3011.b.tt.failure + left_icon = scope:wise_follower + reverse_add_opinion = { + target = scope:wise_follower + modifier = respect_opinion + opinion = 20 + } + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 2 } + } + } + + # Nightly Debates: better version of the usual modifier. + option = { + name = ep3_laamp_flavour_ewan.3011.c + trigger = { + domicile = { has_domicile_building = camp_fire_nightly_debates } + } + reason = has_building_camp_fire_nightly_debates + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_3011_d_presiding_over_lively_debates_modifier + years = 10 + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -2 } + } + } + + # Nod along for a positive modifier. + option = { + name = ep3_laamp_flavour_ewan.3011.d + trigger = { + NOT = { + domicile = { has_domicile_building = camp_fire_nightly_debates } + } + } + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_3011_d_presiding_over_debates_modifier + years = 10 + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = -1 } + } + } +} + +################################################## +# Over the Horizon +# by Ewan Cowhig Croft +# # 3021 - 3030 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_3021_suitable_kingdom_to_dream_about_trigger = { + save_temporary_scope_as = title_temp + holder ?= { + OR = { + prestige_level >= high_prestige_level + court_grandeur_current_level >= 6 + } + root = { + NOR = { + knows_language_of_culture = prev.culture + knows_language_of_culture = capital_county.culture + current_extra_languages >= language_soft_cap + } + OR = { + NOT = { has_variable = laamp_recently_visited_kingdoms } + NOT = { + is_target_in_variable_list = { + name = laamp_recently_visited_kingdoms + target = scope:title_temp + } + } + } + } + NOT = { + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = root } + } + # Put our performance-intensive checks riiiiight at the back, so we've ruled out as many places as possible by the time we get to these. + ## First a bunch of mass county-counting, but we only care about this for players. + root = { + trigger_if = { + limit = { is_ai = no } + NOT = { + culture = { + any_culture_kingdom = { this = scope:title_temp } + } + } + } + } + ## Then distance. + capital_county.title_province = { "squared_distance(root.location)" >= squared_distance_massive } + } +} + +scripted_effect ep3_laamp_flavour_ewan_3021_choose_kingdom_effect = { + # Make sure the contracts we're about to generate won't disappear. + save_scope_value_as = { + name = toggle_distance_ignore + value = yes + } + # Now create our actual contracts. + populate_location_with_special_contracts_effect = { + AREA_CHAR = $KINGDOM$.holder + AMOUNT = 5 + } + # Then, an easier-than-usual learning duel to try to pick up the language from afar. + duel = { + skill = learning + value = very_high_skill_rating + # Victory! + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 10 + desc = ep3_laamp_flavour_ewan.3021.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3021.tt.success + learn_language_of_culture = $KINGDOM$.title_capital_county.culture + } + } + # Defeat. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3021.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3021.tt.failure + add_stress = medium_stress_gain + } + } + } +} + +# Explorer gets a passion for stories of a distant land, populating contracts there & learning the local language.number. +ep3_laamp_flavour_ewan.3021 = { + type = character_event + title = ep3_laamp_flavour_ewan.3021.t + desc = ep3_laamp_flavour_ewan.3021.desc + theme = laamp + left_portrait = { + character = root + animation = admiration + } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3021 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_explorers + any_kingdom = { + count >= 3 + ep3_laamp_flavour_ewan_3021_suitable_kingdom_to_dream_about_trigger = yes + } + } + + weight_multiplier = { + # Weight this down for the AI, as we're doing a bunch of distance checks. + modifier = { + add = -0.9 + is_ai = yes + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3021 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3021 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Alright, let's pick some kingdoms. + ## First, put all the valid ones in a list. + every_kingdom = { + limit = { ep3_laamp_flavour_ewan_3021_suitable_kingdom_to_dream_about_trigger = yes } + add_to_list = potential_kingdoms_list + } + ordered_in_list = { + list = potential_kingdoms_list + order_by = { + holder = { + # Go by CGV level first. + add = { + value = court_grandeur_current_level + multiply = 1000 + } + # Then prestige level. + add = { + value = prestige_level + multiply = 100 + } + # Then add diplomacy as a tie-breaker. + add = diplomacy + } + } + max = 3 + check_range_bounds = no + if = { + limit = { + NOT = { exists = scope:kingdom_1 } + } + save_scope_as = kingdom_1 + } + else_if = { + limit = { + NOT = { + this = scope:kingdom_1 + exists = scope:kingdom_2 + } + } + save_scope_as = kingdom_2 + } + else_if = { + limit = { + NOT = { + this = scope:kingdom_1 + this = scope:kingdom_2 + exists = scope:kingdom_3 + } + } + save_scope_as = kingdom_3 + } + } + } + + # Scope:kingdom_1. + option = { + name = ep3_laamp_flavour_ewan.3021.a + + custom_tooltip = ep3_laamp_flavour_ewan.3021.tt.kingdom_1.contracts_appear + ep3_laamp_flavour_ewan_3021_choose_kingdom_effect = { KINGDOM = scope:kingdom_1 } + + # No stress here. + ai_chance = { + base = 1 + modifier = { + add = { + value = "scope:kingdom_1.holder.capital_county.culture.cultural_acceptance(root.culture)" + multiply = 2 + } + always = yes + } + } + } + + # Scope:kingdom_2. + option = { + name = ep3_laamp_flavour_ewan.3021.b + + custom_tooltip = ep3_laamp_flavour_ewan.3021.tt.kingdom_2.contracts_appear + ep3_laamp_flavour_ewan_3021_choose_kingdom_effect = { KINGDOM = scope:kingdom_2 } + + # No stress here. + ai_chance = { + base = 1 + modifier = { + add = { + value = "scope:kingdom_2.holder.capital_county.culture.cultural_acceptance(root.culture)" + multiply = 2 + } + always = yes + } + } + } + + # Scope:kingdom_3. + option = { + name = ep3_laamp_flavour_ewan.3021.c + + custom_tooltip = ep3_laamp_flavour_ewan.3021.tt.kingdom_3.contracts_appear + ep3_laamp_flavour_ewan_3021_choose_kingdom_effect = { KINGDOM = scope:kingdom_3 } + + # No stress here. + ai_chance = { + base = 1 + modifier = { + add = { + value = "scope:kingdom_3.holder.capital_county.culture.cultural_acceptance(root.culture)" + multiply = 2 + } + always = yes + } + } + } + + # I have places to ponder yet... + option = { + name = ep3_laamp_flavour_ewan.3021.d + + # Consolation prestige. + add_prestige = minor_prestige_gain + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -3 } + } + } +} + +################################################## +# Mine by Right +# by Ewan Cowhig Croft +# # 3031 - 3040 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_3031_family_title_trigger = { + any_held_title = { + title_tier >= kingdom + save_temporary_scope_as = title_temp + root = { + NOT = { has_claim_on = scope:title_temp } + } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_3031_claim_adjacent_title_trigger = { + holder ?= { + any_held_title = { + title_tier >= kingdom + save_temporary_scope_as = title_temp2 + root = { + NOR = { + scope:title_temp ?= scope:title_temp2 + has_claim_on = scope:title_temp2 + } + } + } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_3031_formerly_claimed_title_trigger = { + has_memory_type = became_landless_adventurer_memory + var:old_primary_title ?= { + tier >= tier_kingdom + save_temporary_scope_as = title_temp3 + root = { + NOR = { + scope:title_temp ?= this + scope:title_temp2 ?= this + has_claim_on = scope:title_temp3 + } + } + } +} + +# Legitimist broods & extends their claims. +ep3_laamp_flavour_ewan.3031 = { + type = character_event + title = ep3_laamp_flavour_ewan.3031.t + desc = { + desc = ep3_laamp_flavour_ewan.3031.desc.intro + triggered_desc = { + trigger = { exists = scope:family_title } + desc = ep3_laamp_flavour_ewan.3031.desc.family_title + } + triggered_desc = { + trigger = { exists = scope:adjacent_title } + desc = ep3_laamp_flavour_ewan.3031.desc.adjacent_title + } + triggered_desc = { + trigger = { exists = scope:memory_title } + desc = ep3_laamp_flavour_ewan.3031.desc.memory_title + } + desc = ep3_laamp_flavour_ewan.3031.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = spymaster + } + lower_left_portrait = scope:portrait_3 + lower_center_portrait = scope:portrait_2 + lower_right_portrait = scope:portrait_1 + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3031 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_legitimists + # Then make sure that we could populate at least one specific option. + OR = { + any_close_or_extended_family_member = { ep3_laamp_flavour_ewan_3031_family_title_trigger = yes } + any_claim = { ep3_laamp_flavour_ewan_3031_claim_adjacent_title_trigger = yes } + any_memory = { ep3_laamp_flavour_ewan_3031_formerly_claimed_title_trigger = yes } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3031 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3031 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_short + } + } + # Try to nab our titles. + ordered_close_or_extended_family_member = { + limit = { ep3_laamp_flavour_ewan_3031_family_title_trigger = yes } + order_by = { + # If we're a player, order it by their opinion of us. + if = { + limit = { is_ai = no } + value = "reverse_opinion(root)" + } + # Otherwise, order by our opinion of them. + else = { value = "opinion(root)" } + } + scope:title_temp = { save_scope_as = family_title } + } + ordered_claim = { + limit = { ep3_laamp_flavour_ewan_3031_claim_adjacent_title_trigger = yes } + order_by = { + # If we're a player, order it by their opinion of us. + if = { + limit = { holder = { is_ai = no } } + value = "holder.reverse_opinion(root)" + } + # Otherwise, order by our opinion of them. + else = { value = "holder.opinion(root)" } + } + save_scope_as = adjacent_title + } + random_memory = { + limit = { ep3_laamp_flavour_ewan_3031_formerly_claimed_title_trigger = yes } + var:old_primary_title = { save_scope_as = memory_title } + } + # Sort our portrait scopes. + scope:family_title ?= { + holder = { save_scope_as = portrait_1 } + } + scope:adjacent_title ?= { + if = { + limit = { exists = scope:portrait_1 } + holder = { save_scope_as = portrait_2 } + } + else = { + holder = { save_scope_as = portrait_1 } + } + } + scope:memory_title ?= { + if = { + limit = { exists = scope:portrait_2 } + holder = { save_scope_as = portrait_3 } + } + else_if = { + limit = { exists = scope:portrait_1 } + holder = { save_scope_as = portrait_2 } + } + else = { + holder = { save_scope_as = portrait_1 } + } + } + # Account for some stress that'd apply in every option. + stress_impact = { + ambitious = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + } + } + + # Add the best extant title held by up to an extended family member. + option = { + name = ep3_laamp_flavour_ewan.3031.a + trigger = { exists = scope:family_title } + + add_pressed_claim = scope:family_title + reverse_add_opinion = { + target = scope:family_title.holder + modifier = audacity_opinion + opinion = -30 + } + + stress_impact = { + arbitrary = medium_stress_impact_loss + just = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = 1 } + opinion_modifier = { + opinion_target = scope:family_title.holder + multiplier = -1 + } + } + } + + # Add another same-tier-or-higher title held by someone who holds a kingdom+title you have a claim on. + option = { + name = ep3_laamp_flavour_ewan.3031.b + trigger = { exists = scope:adjacent_title } + + add_pressed_claim = scope:adjacent_title + reverse_add_opinion = { + target = scope:adjacent_title.holder + modifier = audacity_opinion + opinion = -30 + } + + stress_impact = { + arbitrary = medium_stress_impact_loss + just = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = 1 } + opinion_modifier = { + opinion_target = scope:adjacent_title.holder + multiplier = -1 + } + } + } + + # Regain claims to a title you have a memory of losing but don't have a claim on. + option = { + name = ep3_laamp_flavour_ewan.3031.c + trigger = { exists = scope:memory_title } + + add_pressed_claim = scope:memory_title + reverse_add_opinion = { + target = scope:memory_title.holder + modifier = audacity_opinion + opinion = -30 + } + + stress_impact = { + arbitrary = medium_stress_impact_loss + just = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = 1 } + opinion_modifier = { + opinion_target = scope:memory_title.holder + multiplier = -1 + } + } + } + + # Fixate on future gains. + option = { + name = ep3_laamp_flavour_ewan.3031.d + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_3031_d_brooding_over_titles_modifier + years = 10 + } + + # No stress for opt out. + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = 2 } + } + } +} + +################################################## +# People from a Better Time +# by Ewan Cowhig Croft +# # 3041 - 3050 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_3041_valid_memory_trigger = { + has_memory_type = became_landless_adventurer_memory + memory_age_years >= 5 + var:old_primary_title ?= { tier >= tier_kingdom } +} + +scripted_effect ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = { + random_de_jure_county = { + limit = { + holder = { + any_liege_or_above = { this = scope:former_title.holder } + } + NOT = { is_in_list = partisan_titles_list } + # Make sure players don't get caught in the crossfire. + trigger_if = { + limit = { + holder = { is_ai = no } + } + holder = scope:former_title.holder + } + } + weight = { + # Weight up stuff directly held by the usurper. + modifier = { + add = 10000 + holder = scope:former_title.holder + } + # And stuff adjacent to the capital, just to cluster the effects in large realms. + modifier = { + add = 100 + kingdom.title_capital_county = scope:former_title.capital_county + } + } + add_to_list = partisan_titles_list + } +} + +# Old loyalists join legitimist. +ep3_laamp_flavour_ewan.3041 = { + type = character_event + title = ep3_laamp_flavour_ewan.3041.t + desc = { + desc = ep3_laamp_flavour_ewan.3041.desc.intro + random_valid = { + triggered_desc = { + trigger = { has_trait = compassionate } + desc = ep3_laamp_flavour_ewan.3041.desc.compassionate + } + triggered_desc = { + trigger = { has_trait = sadistic } + desc = ep3_laamp_flavour_ewan.3041.desc.sadistic + } + triggered_desc = { + trigger = { has_trait = callous } + desc = ep3_laamp_flavour_ewan.3041.desc.callous + } + triggered_desc = { + trigger = { has_trait = wrathful } + desc = ep3_laamp_flavour_ewan.3041.desc.wrathful + } + triggered_desc = { + trigger = { has_trait = calm } + desc = ep3_laamp_flavour_ewan.3041.desc.calm + } + triggered_desc = { + trigger = { has_trait = arrogant } + desc = ep3_laamp_flavour_ewan.3041.desc.arrogant + } + triggered_desc = { + trigger = { has_trait = humble } + desc = ep3_laamp_flavour_ewan.3041.desc.humble + } + triggered_desc = { + trigger = { has_trait = ambitious } + desc = ep3_laamp_flavour_ewan.3041.desc.ambitious + } + triggered_desc = { + trigger = { has_trait = content } + desc = ep3_laamp_flavour_ewan.3041.desc.content + } + triggered_desc = { + trigger = { has_trait = arbitrary } + desc = ep3_laamp_flavour_ewan.3041.desc.arbitrary + } + triggered_desc = { + trigger = { has_trait = just } + desc = ep3_laamp_flavour_ewan.3041.desc.just + } + triggered_desc = { + trigger = { + NOR = { + has_trait = compassionate + has_trait = sadistic + has_trait = callous + has_trait = wrathful + has_trait = calm + has_trait = arrogant + has_trait = humble + has_trait = ambitious + has_trait = content + has_trait = arbitrary + has_trait = just + } + } + desc = ep3_laamp_flavour_ewan.3041.desc.fallback + } + } + first_valid = { + triggered_desc = { + trigger = { has_claim_on = scope:former_title } + desc = ep3_laamp_flavour_ewan.3041.desc.title_claimed + } + desc = ep3_laamp_flavour_ewan.3041.desc.title_forsaken + } + } + theme = laamp + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:commander + animation = marshal + } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3041 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_legitimists + # And we have to be doing something with our lives. + prestige_level >= 2 + # Must have held a title some years ago. + any_memory = { ep3_laamp_flavour_ewan_3041_valid_memory_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3041 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3041 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_short + } + } + # Nab our title. + random_memory = { + limit = { ep3_laamp_flavour_ewan_3041_valid_memory_trigger = yes } + var:old_primary_title = { save_scope_as = former_title } + } + ## Plus pick titles to be affected by our partisans. + scope:former_title = { + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + ep3_laamp_flavour_ewan_3041_sort_partisan_titles_list_effect = yes + } + # Create a commander for the troops. + create_character = { + template = new_commander_character + culture = scope:former_title.capital_county.culture + faith = scope:former_title.capital_county.faith + location = root.location + gender_female_chance = root_soldier_female_chance + dynasty = none + save_scope_as = commander + after_creation = { + add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 300 + } + } + } + ## Give 'em a nickname. + hidden_effect = { + scope:commander = { assign_random_nickname_effect = yes } + } + } + + # More troops for the royal army-in-exile! + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + any_claim = { tier >= tier_empire } + } + desc = ep3_laamp_flavour_ewan.3041.a.imperial + } + desc = ep3_laamp_flavour_ewan.3041.a.royal + } + } + } + + add_courtier = scope:commander + add_hook = { + type = loyalty_hook + target = scope:commander + } + spawn_army = { + name = legitimist_loyalists + levies = { + value = 200 + # Increase this by a step for every prestige level we have beyond the minimum. + add = { + value = prestige_level + add = -1 + } + } + men_at_arms = { + type = armored_footmen + men = { + value = 200 + # Increase this by a step for every prestige level we have beyond the minimum. + add = { + value = prestige_level + add = -1 + } + } + } + location = root.location + origin = scope:former_title.capital_county.title_province + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Your loyalty is noted, but best used to subvert scope:usurper's rule [go reinforce peasant faction]. + option = { + name = ep3_laamp_flavour_ewan.3041.b + trigger = { + NOT = { has_trait = deceitful } + # Can't be used against players unless it's _both_ players. + OR = { + scope:former_title.holder = { is_ai = yes } + AND = { + is_ai = no + scope:former_title.holder = { is_ai = no } + } + } + } + + every_in_list = { + list = partisan_titles_list + custom = ep3_laamp_flavour_ewan.3041.tt.up_to_ten_usurper_held_counties + change_county_control = -30 + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -2 } + } + } + + # Deceitful: as above, but better. + option = { + name = ep3_laamp_flavour_ewan.3041.c + trigger = { + has_trait = deceitful + # Can't be used against players unless it's _both_ players. + OR = { + scope:former_title.holder = { is_ai = yes } + AND = { + is_ai = no + scope:former_title.holder = { is_ai = no } + } + } + } + trait = deceitful + + every_in_list = { + list = partisan_titles_list + custom = ep3_laamp_flavour_ewan.3041.tt.up_to_ten_usurper_held_counties + change_county_control = -50 + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + honest = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -2 } + } + } + + # I thank you, but I do not _need_ you. + option = { + name = ep3_laamp_flavour_ewan.3041.d + + add_prestige = medium_prestige_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + # The AI should virtually never turn down free troops. + base = 1 + } + } + + after = { + # Clean up our captain if we're not a player. + if = { + limit = { + is_ai = yes + this != scope:captain.liege + } + scope:captain = { + death = { death_reason = death_vanished } + } + } + } +} + +################################################## +# Map Painting +# by Ewan Cowhig Croft +# # 3051 - 3060 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_3051_duel_and_spawn_artefact = { + duel = { + skill = diplomacy + value = $DUEL_DIFF$ + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3051.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3051.tt.success + create_artifact = { + name = handcrafted_map + description = { + random_valid = { + desc = handcrafted_map_desc.mythic_beasts + desc = handcrafted_map_desc.geography + desc = handcrafted_map_desc.settlements + desc = handcrafted_map_desc.people.urban + desc = handcrafted_map_desc.fauna + desc = handcrafted_map_desc.flora + desc = handcrafted_map_desc.government + desc = handcrafted_map_desc.tourism_sites + desc = handcrafted_map_desc.routes + desc = handcrafted_map_desc.people.rural + } + } + modifier = artifact_learning_$TIER$_modifier + modifier = artifact_diplomacy_$TIER$_modifier + type = miscellaneous + rarity = $RARITY$ + visuals = pocket_map + max_durability = 100 + save_scope_as = newly_created_map + } + scope:newly_created_map = { + set_variable = { + name = map_subject_title + value = root.location.empire + } + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3051.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3051.tt.failure + add_stress = medium_stress_gain + } + } + } +} + +# Explorer writes/draws map of local area. +ep3_laamp_flavour_ewan.3051 = { + type = character_event + title = ep3_laamp_flavour_ewan.3051.t + desc = ep3_laamp_flavour_ewan.3051.desc + theme = laamp + left_portrait = { + character = root + animation = writing + } + artifact = { + target = scope:newly_created_map + position = lower_center_portrait + trigger = { exists = scope:newly_created_map } + } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3051 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_explorers + # For tonal reasons, you can't be blind. + NOT = { has_trait = blind } + # Can't already have a map of this empire. + NOT = { + any_artifact = { + artifact_type = miscellaneous + # Deliberately not using ?= in case the NOT makes it go wonky. + has_variable = map_subject_title + var:map_subject_title = root.location.empire + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3051 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3051 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + # Nab our location for loc. + location.kingdom = { save_scope_as = kingdom } + } + + # Go for an illustrious artefact. + option = { + name = ep3_laamp_flavour_ewan.3051.a + + ep3_laamp_flavour_ewan_3051_duel_and_spawn_artefact = { + DUEL_DIFF = extremely_high_skill_rating + RARITY = illustrious + TIER = 3 + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 3 } + } + } + + # Go for a famed artefact. + option = { + name = ep3_laamp_flavour_ewan.3051.b + + ep3_laamp_flavour_ewan_3051_duel_and_spawn_artefact = { + DUEL_DIFF = very_high_skill_rating + RARITY = famed + TIER = 2 + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 2 } + } + } + + # Go for a masterwork artefact. + option = { + name = ep3_laamp_flavour_ewan.3051.c + + ep3_laamp_flavour_ewan_3051_duel_and_spawn_artefact = { + DUEL_DIFF = high_skill_rating + RARITY = masterwork + TIER = 1 + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } + + # Simply have fun with it. + option = { + name = ep3_laamp_flavour_ewan.3051.d + + # Consolation prestige. + add_prestige = medium_prestige_gain + + # Plus some solid stress loss. + add_stress = medium_stress_loss + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -1 } + } + } +} + +################################################## +# A Guide to ... +# by Ewan Cowhig Croft +# # 3061 - 3070 +################################################## + +# Scholar writes book on local subject. +ep3_laamp_flavour_ewan.3061 = { + type = character_event + title = ep3_laamp_flavour_ewan.3061.t + desc = ep3_laamp_flavour_ewan.3061.desc + theme = laamp + left_portrait = { + character = root + animation = writing + } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3061 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_scholars + # For tonal reasons, you can't be blind. + NOT = { has_trait = blind } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3061 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3061 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown + } + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + } + + # Write on peoples & places. + option = { + name = ep3_laamp_flavour_ewan.3061.a + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_3061_peoples_and_places_modifier + years = 10 + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Write on prose & poetry. + option = { + name = ep3_laamp_flavour_ewan.3061.b + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_3061_prose_and_poetry_modifier + years = 10 + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # Write on plants & animals. + option = { + name = ep3_laamp_flavour_ewan.3061.c + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_3061_plants_and_animals_modifier + years = 10 + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = 1 } + } + } + + # Simply doodle some thoughts. + option = { + name = ep3_laamp_flavour_ewan.3061.d + + # Mostly just stress relief. + add_stress = major_stress_loss + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -1 } + } + } +} + +################################################## +# The Law in Scope:location +# by Ewan Cowhig Croft +# # 3071 - 3080 +################################################## + +# Law attacks criminal gang. +ep3_laamp_flavour_ewan.3071 = { + type = character_event + title = ep3_laamp_flavour_ewan.3071.t + desc = ep3_laamp_flavour_ewan.3071.desc + theme = laamp + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:local_soldier + animation = random_weapon_aggressive + } + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3071 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_brigands + # Sheriffs'll still try even against an army, just picking their moment, but even they have their limits. + current_military_strength < @ep3_laamp_flavour_ewan_baggage_train_has_very_significant_armed_force + # Plus make sure that we're kind of a dick. + calc_true_if = { + amount >= 2 + # We'll either take moderate progress in at least two tracks... + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 30 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 30 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 30 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 30 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 30 + } + ## Or getting significant progress in any one track (since this'll count the prior increment as a separate validated trigger). + has_trait_xp = { + trait = gallowsbait + track = bandit + value >= 60 + } + has_trait_xp = { + trait = gallowsbait + track = trickster + value >= 60 + } + has_trait_xp = { + trait = gallowsbait + track = thief + value >= 60 + } + has_trait_xp = { + trait = gallowsbait + track = poacher + value >= 60 + } + has_trait_xp = { + trait = gallowsbait + track = marauder + value >= 60 + } + } + # County checks. + location.county = { + # Must be in both a high-security area. + county_control >= 100 + # And not currently doing a job for the land's ruler. + holder = { save_temporary_scope_as = holder_temp } + NOT = { + root = { + any_character_active_contract = { + task_contract_employer ?= { + save_temporary_scope_as = employer_temp + OR = { + this = scope:holder_temp + scope:holder_temp = { + any_liege_or_above = { this = scope:employer_temp } + } + } + } + } + } + } + # Plus make sure that the holder doesn't actually think we're pretty chill. + holder = { + opinion = { + target = root + value <= 35 + } + NOT = { + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3071 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3071 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + # Create a local soldier. + hidden_effect_new_object = { + create_character = { + template = new_warrior_character + location = root.location + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = local_soldier + } + location.county.holder = { add_courtier = scope:local_soldier } + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + } + + # SCE: duel the lead attacker. + option = { + name = ep3_laamp_flavour_ewan.3071.a + trigger = { can_start_single_combat_trigger = yes } + + custom_tooltip = { + text = duel_to_the_death.tt + configure_start_single_combat_effect = { + SC_INITIATOR = scope:local_soldier + SC_ATTACKER = scope:local_soldier + SC_DEFENDER = root + FATALITY = always + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = single_combat.1006 + OUTPUT_EVENT = ep3_laamp_flavour_ewan.3072 + } + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Intrigue insta-win: bring in your ambush immediately. + option = { + name = ep3_laamp_flavour_ewan.3071.b + trigger = { intrigue >= extremely_high_skill_rating } + skill = intrigue + + scope:local_soldier = { + death = { death_reason = death_battle } + } + add_prestige = medium_prestige_gain + + stress_impact = { deceitful = minor_stress_impact_loss } + ai_chance = { + # Honour or no, if you can insta-win, do it. + base = 1000 + } + } + + # Intrigue duel: you've got men nearby who can help. + option = { + name = ep3_laamp_flavour_ewan.3071.c + trigger = { intrigue < extremely_high_skill_rating } + + duel = { + skill = intrigue + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3071.c.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3071.c.tt.success + left_icon = scope:local_soldier + scope:local_soldier = { + death = { death_reason = death_battle } + } + add_prestige = medium_prestige_gain + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3071.c.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3071.c.tt.failure + left_icon = scope:local_soldier + increase_wounds_effect = { REASON = battle } + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { deceitful = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -2 } + } + } + + # Martial insta-win: your party easily counter-attacks. + option = { + name = ep3_laamp_flavour_ewan.3071.d + trigger = { martial >= extremely_high_skill_rating } + skill = martial + + scope:local_soldier = { + death = { death_reason = death_battle } + } + add_prestige = medium_prestige_gain + + # No stress here. + ai_chance = { + # Honour or no, if you can insta-win, do it. + base = 1000 + } + } + + # Martial duel: rally your small party against them. + option = { + name = ep3_laamp_flavour_ewan.3071.e + trigger = { martial < extremely_high_skill_rating } + + duel = { + skill = martial + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3071.e.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3071.e.tt.success + left_icon = scope:local_soldier + scope:local_soldier = { + death = { death_reason = death_battle } + } + add_prestige = medium_prestige_gain + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3071.e.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3071.e.tt.failure + left_icon = scope:local_soldier + increase_wounds_effect = { REASON = battle } + add_prestige = medium_prestige_loss + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = 1 + } + } + } + + # Flee. + option = { + name = ep3_laamp_flavour_ewan.3071.f + + random_list = { + 100 = { + desc = ep3_laamp_flavour_ewan.3071.f.success + add_prestige = minor_prestige_loss + } + 100 = { + desc = ep3_laamp_flavour_ewan.3071.f.failure + increase_wounds_effect = { REASON = battle } + add_prestige = medium_prestige_loss + } + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = -2 } + } + } +} + +ep3_laamp_flavour_ewan.3072 = { + hidden = yes + + immediate = { + if = { + limit = { scope:sc_victor = root } + root = { + trigger_event = { + id = ep3_laamp_flavour_ewan.3073 + days = 1 + } + } + } + # No else: doesn't really matter if root is dead now, does it? + } +} + +# You won the single combat! +ep3_laamp_flavour_ewan.3073 = { + type = character_event + title = ep3_laamp_flavour_ewan.3073.t + desc = ep3_laamp_flavour_ewan.3073.desc + theme = laamp + left_portrait = { + character = root + animation = random_weapon_celebrate + } + override_background = { reference = battlefield } + + # Victory! + option = { + name = ep3_laamp_flavour_ewan.3073.a + + # We give you a bit more than the usual amount, since you risked your life overtly. + add_prestige = 250 + + # No stress here. + ai_chance = { + # No logic needed for notification event. + base = 1 + } + } +} + +################################################## +# Wrestle for It +# by Ewan Cowhig Croft +# # 3081 - 3090 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_3081_challenging_courtier_trigger = { + can_start_single_combat_trigger = yes + ep3_laamp_flavour_ewan_available_courtier_trigger = yes + prowess >= medium_skill_rating + is_knight = yes + NOR = { + has_trait = shy + has_trait = humble + has_trait = lazy + } + # This is a friendly challenge, so make sure we're not getting an utter bastard to do it. + opinion = { + target = root + value >= 1 + } +} + +# Merc challenged to a wrastlin'. +ep3_laamp_flavour_ewan.3081 = { + type = character_event + title = ep3_laamp_flavour_ewan.3081.t + desc = ep3_laamp_flavour_ewan.3081.desc + theme = laamp + left_portrait = { + character = root + animation = stayback + } + right_portrait = { + character = scope:challenger + animation = wrestling_victory + } + override_background = { reference = army_camp } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_3081 } + } + # Must have the correct camp purpose. + has_realm_law = camp_purpose_mercenaries + # We're not _actually_ going to use the SCE, but it's a good benchmark for whether wrestling would even make sense. + can_start_single_combat_trigger = yes + # And we should have at least one courtier who'd be game to try. + any_courtier = { ep3_laamp_flavour_ewan_3081_challenging_courtier_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_3081 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_3081 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_long + } + } + # Grab a suitable courtier. + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_3081_challenging_courtier_trigger = yes } + order_by = { + value = prowess + # A few traits let you skip the queue (partially). + if = { + limit = { has_trait = wrathful } + add = 5 + } + if = { + limit = { has_trait = arrogant } + add = 5 + } + if = { + limit = { has_trait = athletic } + add = 5 + } + } + save_scope_as = challenger + } + } + + # Sure. + option = { + name = ep3_laamp_flavour_ewan.3081.a + + duel = { + skill = prowess + target = scope:challenger + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3081.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3081.a.tt.success + left_icon = scope:challenger + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:challenger + modifier = respect_opinion + opinion = 40 + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.3081.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.3081.a.tt.failure + left_icon = scope:challenger + add_prestige = miniscule_prestige_gain + reverse_add_opinion = { + target = scope:challenger + modifier = respect_opinion + opinion = 20 + } + } + } + } + + stress_impact = { + humble = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + opinion_modifier = { opinion_target = scope:challenger } + } + } + + # Have HerHim beaten for even asking. + option = { + name = ep3_laamp_flavour_ewan.3081.b + + add_dread = 30 + reverse_add_opinion = { + target = scope:challenger + modifier = overreaction_opinion + opinion = -50 + } + scope:challenger = { increase_wounds_effect = { REASON = beaten } } + + stress_impact = { + sadistic = medium_stress_impact_loss + arrogant = minor_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_vengefulness = 2 } + opinion_modifier = { + opinion_target = scope:challenger + multiplier = -1 + } + } + } + + # Hah, no. + option = { + name = ep3_laamp_flavour_ewan.3081.c + + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:challenger + modifier = haughty_opinion + opinion = -20 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 2 } + } + } +} + + + + + + + + + + + +################################################## +# TRAVEL DANGER / SUPPLIES + + +################################################## +# Bandits! +# by Ewan Cowhig Croft +# 4001 - 4010 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_4001_duel_victory_effect = { + add_prestige = { + value = medium_prestige_gain + if = { + limit = { scope:sc_victor ?= root } + # If you win the duel, we give you a bit more than the usual amount, since you risked your life overtly. + add = 100 + } + } + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4001_duel_defeat_effect = { + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = bandit_attack } + domicile = { + change_provisions = { + value = scope:provisions_loss + multiply = -1 + } + } +} + +# Bandit raid whilst moving. +ep3_laamp_flavour_ewan.4001 = { + type = character_event + title = ep3_laamp_flavour_ewan.4001.t + desc = ep3_laamp_flavour_ewan.4001.desc + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:bandit_leader + animation = threatening + } + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4001 } + } + # Must have the correct travel danger type. + location = { + travel_danger_type = { + travel_plan = root.current_travel_plan + type = county_control + } + } + # Bandits won't attack forces over a certain size, even assuming you're spread out in a long line. + current_military_strength < @ep3_laamp_flavour_ewan_baggage_train_has_significant_armed_force + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4001 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4001 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + # Nab this as a scope, as we may need it if the duel finishes up. + save_scope_as = laamp_title + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # Create a hostile bandit. + create_character = { + template = bandit_character + location = root.location + culture = root.location.culture + faith = root.location.faith + martial = { + min_template_decent_skill + max_template_high_skill + } + prowess = { + min_template_decent_skill + max_template_high_skill + } + save_scope_as = bandit_leader + } + # How many provisions do we need to surrender? + save_scope_value_as = { + name = provisions_loss + value = { + add = domicile.provisions + multiply = 0.33 + floor = yes + min = @ep3_laamp_flavour_ewan_4000_min_provisions_worth_attacking + } + } + } + + # Martial duel to repel them. + option = { + name = ep3_laamp_flavour_ewan.4001.a + + duel = { + skill = martial + target = scope:bandit_leader + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4001.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4001.a.tt.success + left_icon = scope:bandit_leader + ep3_laamp_flavour_ewan_4001_duel_victory_effect = yes + scope:bandit_leader = { + death = { death_reason = death_attacking_laamp_train } + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4001.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4001.a.tt.failure + left_icon = scope:bandit_leader + ep3_laamp_flavour_ewan_4001_duel_defeat_effect = yes + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = 1 + } + } + } + + # SCE: tackle the bandit leader head-on. + option = { + name = ep3_laamp_flavour_ewan.4001.b + trigger = { can_start_single_combat_trigger = yes } + + custom_tooltip = { + text = duel_to_the_death.tt + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:bandit_leader + FATALITY = always + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = single_combat.1006 + OUTPUT_EVENT = ep3_laamp_flavour_ewan.4002 + } + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # Brigands: back off, little fish. + option = { + name = ep3_laamp_flavour_ewan.4001.c + trigger = { has_realm_law = camp_purpose_brigands } + reason = purpose_brigands + + duel = { + skill = intrigue + target = scope:bandit_leader + # Victory! + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4001.c.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4001.c.tt.success + left_icon = scope:bandit_leader + ep3_laamp_flavour_ewan_4001_duel_victory_effect = yes + } + } + # Defeat. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4001.c.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4001.c.tt.failure + left_icon = scope:bandit_leader + ep3_laamp_flavour_ewan_4001_duel_defeat_effect = yes + } + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -2 } + } + } + + # Surrender an amount of provisions to them. + option = { + name = ep3_laamp_flavour_ewan.4001.d + trigger = { domicile.provisions >= scope:provisions_loss } + show_as_unavailable = { always = yes } + + add_prestige = miniscule_prestige_loss + domicile = { + change_provisions = { + value = scope:provisions_loss + multiply = -1 + } + } + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = -2 } + } + } + + # If we're slowed due to multi, resume travel. + after = { mp_resume_travel_plan = yes } +} + +ep3_laamp_flavour_ewan.4002 = { + hidden = yes + + immediate = { + if = { + limit = { scope:sc_victor = root } + root = { + trigger_event = { + id = ep3_laamp_flavour_ewan.4003 + days = 1 + } + } + } + else = { + # Otherwise, remember to have the bandits loot. + scope:laamp_title.holder.domicile = { + change_provisions = { + value = scope:provisions_loss + multiply = -1 + } + } + } + } +} + +# You won the single combat! +ep3_laamp_flavour_ewan.4003 = { + type = character_event + title = ep3_laamp_flavour_ewan.4003.t + desc = ep3_laamp_flavour_ewan.4003.desc + theme = laamp + left_portrait = { + character = root + animation = random_weapon_celebrate + } + override_background = { reference = battlefield } + + # Victory! + option = { + name = ep3_laamp_flavour_ewan.4003.a + + ep3_laamp_flavour_ewan_4001_duel_victory_effect = yes + + # No stress here. + ai_chance = { + # No logic needed for notification event. + base = 1 + } + } +} + +################################################## +# A Land of Milk & Honey +# by Ewan Cowhig Croft +# 4011 - 4020 +################################################## + +# Bountiful hunting/foraging. +ep3_laamp_flavour_ewan.4011 = { + type = character_event + title = ep3_laamp_flavour_ewan.4011.t + desc = ep3_laamp_flavour_ewan.4011.desc + theme = widgetless_travel + left_portrait = { + character = root + animation = happiness + } + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4011 } + } + # Must be in a nice, safe area with plentiful food. + current_travel_plan.current_danger_value <= 0 + location = { + county.county_control >= 100 + OR = { + terrain = farmlands + AND = { + terrain = floodplains + county.development_level >= 25 + } + } + } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4011 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4011 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Everyone loses stress. + stress_impact = { + base = medium_stress_loss + lazy = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + } + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + custom = custom.every_adult_follower + # No complex impact because it'll make the tooltips wonky. + add_stress = medium_stress_loss + } + # How many provisions do we take on? + random_list = { + 100 = { + save_scope_value_as = { + name = provisions_gain + value = medium_provisions_gain + } + } + 100 = { + save_scope_value_as = { + name = provisions_gain + value = major_provisions_gain + } + } + 100 = { + save_scope_value_as = { + name = provisions_gain + value = massive_provisions_gain + } + } + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + } + + # Enjoy the fruits. + option = { + name = ep3_laamp_flavour_ewan.4011.a + + domicile = { change_provisions = scope:provisions_gain } + + # Stress handled in the immediate. + ai_chance = { + # Only one option, so no logic needed. + base = 1 + } + } +} + +################################################## +# Parched +# by Ewan Cowhig Croft +# 4021 - 4030 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_4021_camp_avoids_dehydration_effect = { + add_prestige = minor_prestige_gain + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = saviour_opinion + opinion = 20 + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4021_increment_dehydration_effect = { + if = { + limit = { has_character_modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t3_modifier } + custom_tooltip = ep3_laamp_flavour_ewan.4021.tt.dehydration_already_at_worst + } + else_if = { + limit = { has_character_modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t2_modifier } + hidden_effect = { remove_character_modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t2_modifier } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t3_modifier + years = 10 + } + } + else_if = { + limit = { has_character_modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t1_modifier } + hidden_effect = { remove_character_modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t1_modifier } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t2_modifier + years = 10 + } + } + else = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t1_modifier + years = 10 + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4021_camp_suffers_dehydration_effect = { + if = { + limit = { health <= good_health } + ep3_laamp_flavour_ewan_4021_increment_dehydration_effect = yes + } + every_courtier = { + limit = { + location = root.location + health <= good_health + } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + custom_tooltip = ep3_laamp_flavour_ewan.4021.tt.dehydration_increments + hidden_effect = { ep3_laamp_flavour_ewan_4021_increment_dehydration_effect = yes } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4021_delegate_search_to_officer_effect = { + custom_tooltip = ep3_laamp_flavour_ewan.4021.tt.officer_aptitude + random_list = { + 0 = { + desc = ep3_laamp_flavour_ewan.4021.tt.delegated_to_officer.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4021.tt.delegated_to_officer.success + left_icon = $OFFICER$ + ep3_laamp_flavour_ewan_4021_camp_avoids_dehydration_effect = yes + } + modifier = { + add = { + value = $APTITUDE$ + multiply = 20 + min = 5 + max = 95 + } + always = yes + } + } + 0 = { + desc = ep3_laamp_flavour_ewan.4021.tt.delegated_to_officer.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4021.tt.delegated_to_officer.failure + left_icon = $OFFICER$ + ep3_laamp_flavour_ewan_4021_camp_suffers_dehydration_effect = yes + } + modifier = { + add = { + value = 100 + add = { + add = $APTITUDE$ + multiply = -20 + } + min = 5 + max = 95 + } + always = yes + } + } + } +} + +# Difficulty finding water. +ep3_laamp_flavour_ewan.4021 = { + type = character_event + title = ep3_laamp_flavour_ewan.4021.t + desc = ep3_laamp_flavour_ewan.4021.desc + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = stress + } + lower_left_portrait = scope:portrait_1 + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4021 } + } + # If we've already got the parched modifier, don't stack it past the max. + NOT = { has_character_modifier = ep3_laamp_flavour_ewan_4021_extended_period_of_dehydration_t3_modifier } + # Make sure we're not somewhere where we could credibly source water. + location = { + any_neighboring_province = { is_river_province = no } + # You can't drink coastal ocean water except for some inland freshwater seas, but they will tend to have tributaries flowing into them so we allow it. + is_coastal = no + } + # And make sure we're not absolutely swimming in supplies. + domicile ?= { provisions <= sixty_percent_provisions_value } + # Must have the correct travel danger type. + location = { + OR = { + travel_danger_type = { + travel_plan = root.current_travel_plan + terrain = desert + } + travel_danger_type = { + travel_plan = root.current_travel_plan + terrain = desert_mountains + } + # Some terrains depend on season. + AND = { + is_nice_season_to_be_outside_trigger = { LOCATION = root.location } + travel_danger_type = { + travel_plan = root.current_travel_plan + terrain = steppe + } + } + AND = { + is_nice_season_to_be_outside_trigger = { LOCATION = root.location } + travel_danger_type = { + travel_plan = root.current_travel_plan + terrain = drylands + } + } + } + } + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4021 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4021 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # If we have a forager or a huntsman, grab whichever is better at their job. + court_position:chief_forager_camp_officer ?= { + if = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + save_scope_as = forager + # We'll want their aptitude later. + save_scope_value_as = { + name = forager_apt + value = "aptitude(chief_forager_camp_officer)" + } + # Plus, register who we're showing a portrait of. + save_scope_as = portrait_1 + } + } + court_position:huntperson_camp_officer ?= { + if = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + save_scope_as = hunter + # We'll want their aptitude later. + save_scope_value_as = { + name = hunter_apt + value = "aptitude(huntperson_camp_officer)" + } + # Plus, register who we're showing a portrait of. + save_scope_as = portrait_1 + } + } + # Sort whose event option will be displayed. + ## If we have both, pick whichever is better (preferring the forager). + if = { + limit = { + exists = scope:forager + exists = scope:hunter + } + if = { + limit = { scope:forager_apt >= scope:hunter_apt } + save_scope_value_as = { + name = preferred_officer + value = flag:forager + } + } + else = { + save_scope_value_as = { + name = preferred_officer + value = flag:hunter + } + } + } + else_if = { + limit = { exists = scope:forager } + save_scope_value_as = { + name = preferred_officer + value = flag:forager + } + } + else_if = { + limit = { exists = scope:hunter } + save_scope_value_as = { + name = preferred_officer + value = flag:hunter + } + } + # Sort our duel diff according to what terrain we're in. + save_scope_value_as = { + name = duel_diff + value = { + if = { + limit = { + location = { terrain = desert } + } + add = very_high_skill_rating + } + if = { + limit = { + location = { terrain = desert_mountains } + } + add = extremely_high_skill_rating + } + if = { + limit = { + location = { terrain = steppe } + } + add = high_skill_rating + } + if = { + limit = { + location = { terrain = drylands } + } + add = decent_skill_rating + } + } + } + } + + weight_multiplier = { + modifier = { + add = 1 + ep3_laamp_flavour_ewan_0041_access_sahara_provision_options_trigger = yes + } + } + + # Learning duel: there must be _something_ around here... + option = { + name = ep3_laamp_flavour_ewan.4021.a + + duel = { + skill = intrigue + value = scope:duel_diff + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4021.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4021.a.tt.success + left_icon = scope:CHANGE_ME + ep3_laamp_flavour_ewan_4021_camp_avoids_dehydration_effect = yes + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4021.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4021.a.tt.failure + left_icon = scope:CHANGE_ME + ep3_laamp_flavour_ewan_4021_camp_suffers_dehydration_effect = yes + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } + + # Chief forager: send them out searching. + option = { + name = ep3_laamp_flavour_ewan.4021.b + trigger = { scope:preferred_officer ?= flag:forager } + reason = have_chief_forager + + ep3_laamp_flavour_ewan_4021_delegate_search_to_officer_effect = { + OFFICER = scope:forager + APTITUDE = scope:forager_apt + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Huntsman: send them out searching. + option = { + name = ep3_laamp_flavour_ewan.4021.c + trigger = { scope:preferred_officer ?= flag:hunter } + reason = have_huntperson + + ep3_laamp_flavour_ewan_4021_delegate_search_to_officer_effect = { + OFFICER = scope:hunter + APTITUDE = scope:hunter_apt + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Reserve water: ration your way through this. + option = { + name = ep3_laamp_flavour_ewan.4021.d + trigger = { + domicile = { has_domicile_building = supply_tent_reserve_water } + } + reason = has_building_supply_tent_reserve_water + + add_prestige = minor_prestige_gain + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + + # No stress here. + ai_chance = { + # If you have the good option, take the good option. + base = 1000 + } + } + + # Let's hope we're out of this hell soon. + option = { + name = ep3_laamp_flavour_ewan.4021.e + + random_list = { + 30 = { + desc = ep3_laamp_flavour_ewan.4021.e.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4021.e.tt.success + # Consolation prestige, since you took the "I'm inept and I did no planning" option. + add_prestige = minor_prestige_gain + } + modifier = { + add = -20 + location = { terrain = desert_mountains } + } + modifier = { + add = 25 + location = { terrain = drylands } + } + } + 70 = { + desc = ep3_laamp_flavour_ewan.4021.e.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4021.e.tt.failure + ep3_laamp_flavour_ewan_4021_camp_suffers_dehydration_effect = yes + } + modifier = { + add = 20 + location = { terrain = desert_mountains } + } + modifier = { + add = -25 + location = { terrain = drylands } + } + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -1 } + } + } + + # If we're slowed due to multi, resume travel. + after = { mp_resume_travel_plan = yes } +} + +################################################## +# Sickness in the Herd +# by Ewan Cowhig Croft +# 4031 - 4040 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_4031_animals_treated_effect = { + add_prestige = minor_prestige_gain + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4031_sickness_spreads_through_herd_effect = { + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4031_sickness_spreads_through_herd_modifier + years = 10 + } +} + +scripted_effect ep3_laamp_flavour_ewan_4031_cull_sick_animals_apply_opinions_effect = { + every_courtier = { + limit = { + location = root.location + has_trait = callous + } + custom = custom.every_callous_follower + add_opinion = { + target = root + modifier = practical_opinion + opinion = 40 + } + } + every_courtier = { + limit = { + location = root.location + has_trait = compassionate + } + custom = custom.every_compassionate_follower + add_opinion = { + target = root + modifier = callous_opinion + opinion = -40 + } + } +} + +# Pack animals are sick or wounded. +ep3_laamp_flavour_ewan.4031 = { + type = character_event + title = ep3_laamp_flavour_ewan.4031.t + desc = ep3_laamp_flavour_ewan.4031.desc + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = stress + } + lower_left_portrait = scope:groom + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4031 } + } + # Make sure we're not already suffering from the previous effects of sickness amongst the animals. + NOR = { + has_character_modifier = ep3_laamp_flavour_ewan_4031_sickness_affects_some_of_herd_modifier + has_character_modifier = ep3_laamp_flavour_ewan_4031_sickness_spreads_through_herd_modifier + has_character_modifier = ep3_laamp_flavour_ewan_4031_sickness_spreads_wildly_through_herd_modifier + has_character_modifier = ep3_laamp_flavour_ewan_4031_callous_culled_herd_modifier + has_character_modifier = ep3_laamp_flavour_ewan_4031_plentiful_steeds_culled_herd_modifier + has_character_modifier = ep3_laamp_flavour_ewan_4031_callous_and_plentiful_steeds_culled_herd_modifier + } + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4031 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4031 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # If we have a groom, nab 'em. + court_position:head_groom_camp_officer ?= { + if = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + save_scope_as = groom + # We'll want their aptitude later. + save_scope_value_as = { + name = groom_apt + value = "aptitude(head_groom_camp_officer)" + } + } + } + } + + # Learning duel to treat them. + option = { + name = ep3_laamp_flavour_ewan.4031.a + + duel = { + skill = learning + value = very_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4031.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.a.tt.success + ep3_laamp_flavour_ewan_4031_animals_treated_effect = yes + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4031.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.a.tt.failure + ep3_laamp_flavour_ewan_4031_sickness_spreads_through_herd_effect = yes + } + } + } + + stress_impact = { compassionate = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + modifier = { + add = 50 + highest_skill = learning + } + } + } + + # Martial duel to treat them. + option = { + name = ep3_laamp_flavour_ewan.4031.b + + duel = { + skill = martial + value = very_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4031.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.b.tt.success + ep3_laamp_flavour_ewan_4031_animals_treated_effect = yes + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4031.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.b.tt.failure + ep3_laamp_flavour_ewan_4031_sickness_spreads_through_herd_effect = yes + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + modifier = { + add = 50 + highest_skill = martial + } + } + } + + # Head groom: up & at 'em m'droog. + option = { + name = ep3_laamp_flavour_ewan.4031.c + trigger = { exists = scope:groom } + + random_list = { + 0 = { + desc = ep3_laamp_flavour_ewan.4031.tt.delegated_to_officer.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.tt.delegated_to_officer.success + left_icon = scope:groom + ep3_laamp_flavour_ewan_4031_animals_treated_effect = yes + } + modifier = { + add = { + value = scope:groom_apt + multiply = 20 + min = 5 + max = 95 + } + always = yes + } + } + 0 = { + desc = ep3_laamp_flavour_ewan.4031.tt.delegated_to_officer.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.tt.delegated_to_officer.failure + left_icon = scope:groom + ep3_laamp_flavour_ewan_4031_sickness_spreads_through_herd_effect = yes + } + modifier = { + add = { + value = 100 + add = { + add = scope:groom_apt + multiply = -20 + } + min = 5 + max = 95 + } + always = yes + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Callous: slaughter and toss the sick ones, save the rest. + option = { + name = ep3_laamp_flavour_ewan.4031.d + trigger = { + has_trait = callous + NOT = { + domicile = { has_domicile_building = baggage_train_ample_steeds } + } + } + trait = callous + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4031_callous_culled_herd_modifier + years = 10 + } + ep3_laamp_flavour_ewan_4031_cull_sick_animals_apply_opinions_effect = yes + + stress_impact = { callous = medium_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -2 } + } + } + + # Plentiful Steeds: slaughter and toss the sick ones, save the rest. + option = { + name = ep3_laamp_flavour_ewan.4031.e + trigger = { + NOT = { has_trait = callous } + domicile = { has_domicile_building = baggage_train_ample_steeds } + } + reason = has_building_baggage_train_ample_steeds + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4031_plentiful_steeds_culled_herd_modifier + years = 10 + } + ep3_laamp_flavour_ewan_4031_cull_sick_animals_apply_opinions_effect = yes + + stress_impact = { + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -2 } + } + } + + # Callous & Plentiful Steeds: slaughter and toss the sick ones, save the rest. + option = { + name = ep3_laamp_flavour_ewan.4031.f + trigger = { + has_trait = callous + domicile = { has_domicile_building = baggage_train_ample_steeds } + } + reason = is_callous_has_building_baggage_train_ample_steeds + + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4031_callous_and_plentiful_steeds_culled_herd_modifier + years = 10 + } + ep3_laamp_flavour_ewan_4031_cull_sick_animals_apply_opinions_effect = yes + + stress_impact = { callous = major_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = -2 } + } + } + + # Carry on & pray to HealthGodName for mercy. + option = { + name = ep3_laamp_flavour_ewan.4031.g + + random_list = { + 10 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.g.tt.sickness_fades + custom_tooltip = ep3_laamp_flavour_ewan.4031.g.tt.some_of_herd.tt + } + } + 30 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.g.tt.sickness_contained + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4031_sickness_affects_some_of_herd_modifier + years = 10 + } + } + } + 40 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.g.tt.sickness_spreads + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4031_sickness_spreads_through_herd_modifier + years = 10 + } + } + } + 20 = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4031.g.tt.sickness_spreads_wildly + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4031_sickness_spreads_wildly_through_herd_modifier + years = 10 + } + } + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_zeal = 1 } + } + } + + # If we're slowed due to multi, resume travel. + after = { mp_resume_travel_plan = yes } +} + +################################################## +# Fortuna's Tithe +# by Ewan Cowhig Croft +# 4041 - 4050 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = { + location = root.location + health <= good_health +} + +scripted_trigger ep3_laamp_flavour_ewan_4041_valid_regiment_trigger = { + maa_current_troops_count >= 2 + root = { + OR = { + is_at_war = no + AND = { + is_at_war = yes + prev = { is_raised = no } + } + } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_4041_use_snowy_forest_backdrop_trigger = { + OR = { + scope:weather_type = flag:storm_snow + scope:weather_type = flag:frozen_water + } +} + +scripted_effect ep3_laamp_flavour_ewan_4041_train_rallies_effect = { + add_prestige = medium_prestige_gain + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = saviour_opinion + opinion = $OPINION$ + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = { + if = { + limit = { has_character_modifier = ep3_laamp_flavour_ewan_4041_hypothermia_t3_modifier } + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.hypothermia_already_at_worst + } + else_if = { + limit = { has_character_modifier = ep3_laamp_flavour_ewan_4041_hypothermia_t2_modifier } + hidden_effect = { remove_character_modifier = ep3_laamp_flavour_ewan_4041_hypothermia_t2_modifier } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4041_hypothermia_t3_modifier + years = 8 + } + } + else_if = { + limit = { has_character_modifier = ep3_laamp_flavour_ewan_4041_hypothermia_t1_modifier } + hidden_effect = { remove_character_modifier = ep3_laamp_flavour_ewan_4041_hypothermia_t1_modifier } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4041_hypothermia_t2_modifier + years = 8 + } + } + else = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4041_hypothermia_t1_modifier + years = 8 + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4041_process_consequences_by_weather_type_effect = { + switch = { + trigger = scope:weather_type + flag:storm_thunder = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 40 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.hypothermia_increments + hidden_effect = { ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes } + } + if = { + limit = { + NOR = { + exists = scope:lightning_strike_happened + root.primary_title = { has_variable = had_ep3_laamp_flavour_ewan_4041_lightning_strike } + } + } + random = { + chance = 1 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.struck_by_lightning + hidden_effect = { + random_list = { + 60 = { + increase_wounds_effect = { REASON = struck_by_lightning } + increase_wounds_effect = { REASON = struck_by_lightning } + increase_wounds_effect = { REASON = struck_by_lightning } + } + 40 = { + death = { death_reason = death_struck_by_lightning } + } + } + save_scope_as = lightning_strike_happened + root = { + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4041_lightning_strike + value = scope:lightning_strike_happened + years = 50 + } + } + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.tt.struck_by_lightning + if = { + limit = { + scope:lightning_strike_happened = { is_alive = no } + } + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.struck_by_lightning.dead + } + else = { custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.struck_by_lightning.alive } + } + } + } + } + } + } + } + flag:storm_wind = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 25 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.hypothermia_increments + hidden_effect = { ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes } + } + } + } + flag:storm_snow = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 60 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.hypothermia_increments_twice + hidden_effect = { + ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes + ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes + } + } + } + } + flag:storm_sand = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 50 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.modifier_worse_for_vulnerable_characters + hidden_effect = { + if = { + limit = { + OR = { + is_adult = no + AND = { + is_female = yes + age >= Define:NCharacter|FEMALE_ELDERLY_AGE + } + AND = { + is_male = yes + age >= Define:NCharacter|MALE_ELDERLY_AGE + } + } + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4041_sandstorm_lungs_vulnerable_modifier + years = 10 + } + } + else = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4041_sandstorm_lungs_adult_modifier + years = 5 + } + } + } + } + } + } + flag:wild_fires = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 30 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.modifier_worse_for_vulnerable_characters + hidden_effect = { + if = { + limit = { + OR = { + is_adult = no + AND = { + is_female = yes + age >= Define:NCharacter|FEMALE_ELDERLY_AGE + } + AND = { + is_male = yes + age >= Define:NCharacter|MALE_ELDERLY_AGE + } + } + } + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4041_wildfire_lungs_vulnerable_modifier + years = 10 + } + } + else = { + add_character_modifier = { + modifier = ep3_laamp_flavour_ewan_4041_wildfire_lungs_adult_modifier + years = 5 + } + } + } + } + if = { + limit = { + # Some people can always outrun the flames... + trigger_if = { + limit = { + # ... unless fate has been especially cruel. + NOT = { has_trait = one_legged } + } + NOR = { + has_trait = athletic + has_trait = strong + has_trait = physique_good + } + } + } + random = { + chance = 5 + death = { death_reason = death_burnt_in_wild_fire } + } + } + } + every_maa_regiment = { + limit = { ep3_laamp_flavour_ewan_4041_valid_regiment_trigger = yes } + custom = ep3_laamp_flavour_ewan.4041.tt.every_regiment + random = { + chance = 40 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.regiments_take_damage_range.wildfire + hidden_effect = { + change_maa_troops_count = { + value = maa_current_troops_count + multiply = { + integer_range = { + min = ep3_laamp_flavour_ewan_4041_regiment_damage_wildfires_min + max = ep3_laamp_flavour_ewan_4041_regiment_damage_wildfires_max + } + } + multiply = -1 + } + } + } + } + } + flag:avalanches = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 60 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.hypothermia_increments_twice + hidden_effect = { + ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes + ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes + } + } + if = { + limit = { + NOR = { + has_trait = winter_soldier + has_trait = rough_terrain_expert + } + } + random = { + chance = 5 + death = { death_reason = death_swept_away_by_avalanche } + } + } + } + every_maa_regiment = { + limit = { ep3_laamp_flavour_ewan_4041_valid_regiment_trigger = yes } + custom = ep3_laamp_flavour_ewan.4041.tt.every_regiment + random = { + chance = { + value = 40 + # Big ups to the Barcas. + if = { + limit = { is_unit_type = elephant_cavalry } + add = 40 + } + } + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.regiments_take_damage_range.avalanche + hidden_effect = { + change_maa_troops_count = { + value = maa_current_troops_count + multiply = { + integer_range = { + min = ep3_laamp_flavour_ewan_4041_regiment_damage_avalanches_min + max = ep3_laamp_flavour_ewan_4041_regiment_damage_avalanches_max + } + } + multiply = -1 + } + } + } + } + } + flag:flash_floods = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 30 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.hypothermia_increments + hidden_effect = { ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes } + } + if = { + limit = { + # Except strong/veteran swimmers... + trigger_if = { + limit = { + # ... unless fate has been especially cruel. + NOT = { has_trait = one_legged } + } + NOR = { + has_trait = forder + has_trait = athletic + has_trait = strong + has_trait = physique_good + } + } + } + random = { + chance = 5 + death = { death_reason = death_swept_away_by_flash_flood } + } + } + } + every_maa_regiment = { + limit = { ep3_laamp_flavour_ewan_4041_valid_regiment_trigger = yes } + custom = ep3_laamp_flavour_ewan.4041.tt.every_regiment + random = { + chance = { + value = 40 + # Big ups to the Barcas. + if = { + limit = { is_unit_type = elephant_cavalry } + add = 40 + } + } + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.regiments_take_damage_range.flash_floods + hidden_effect = { + change_maa_troops_count = { + value = maa_current_troops_count + multiply = { + integer_range = { + min = ep3_laamp_flavour_ewan_4041_regiment_damage_flash_floods_min + max = ep3_laamp_flavour_ewan_4041_regiment_damage_flash_floods_max + } + } + multiply = -1 + } + } + } + } + } + flag:frozen_water = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 50 + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.hypothermia_increments_twice + hidden_effect = { + ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes + ep3_laamp_flavour_ewan_4041_increment_hypothermia_effect = yes + } + } + if = { + limit = { + NOT = { has_trait = winter_soldier } + # No swimming exception on this one: the shock of it, especially in thick winter clothing, is gonna paralyse you. + } + random = { + chance = 5 + death = { death_reason = death_drowned_in_hidden_icy_water } + } + } + } + every_maa_regiment = { + limit = { ep3_laamp_flavour_ewan_4041_valid_regiment_trigger = yes } + custom = ep3_laamp_flavour_ewan.4041.tt.every_regiment + random = { + chance = { + value = 30 + # Heavier MaA types & cavalry are screwed. + if = { + limit = { + OR = { + is_unit_type = elephant_cavalry + is_unit_type = camel_cavalry + is_unit_type = heavy_cavalry + is_unit_type = light_cavalry + is_unit_type = heavy_infantry + is_unit_type = siege_weapon + } + } + add = 30 + } + # Anything lighter, or at least not mounted, can at least _try_ to bolt. + else_if = { + limit = { + OR = { + is_unit_type = skirmishers + is_unit_type = archers + is_unit_type = pikemen + } + } + add = -20 + } + } + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.regiments_take_damage_range.frozen_water + hidden_effect = { + change_maa_troops_count = { + value = maa_current_troops_count + multiply = { + integer_range = { + min = ep3_laamp_flavour_ewan_4041_regiment_damage_frozen_water_min + max = ep3_laamp_flavour_ewan_4041_regiment_damage_frozen_water_max + } + } + multiply = -1 + } + } + } + } + } + flag:earthquake = { + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4041_here_and_not_peak_health_trigger = yes } + custom = ep3_laamp_flavour_ewan.4021.tt.every_courtier_at_your_location_with_less_than_excellent_health + random = { + chance = 25 + death = { death_reason = death_consumed_by_earthquake } + } + } + every_maa_regiment = { + limit = { ep3_laamp_flavour_ewan_4041_valid_regiment_trigger = yes } + custom = ep3_laamp_flavour_ewan.4041.tt.every_regiment + random = { + chance = { + value = 50 + # Heavier MaA types are screwed. + if = { + limit = { + OR = { + is_unit_type = elephant_cavalry + is_unit_type = heavy_infantry + is_unit_type = siege_weapon + is_unit_type = heavy_cavalry + } + } + add = 30 + } + # Anything lighter can at least _try_ to bolt. + else_if = { + limit = { + OR = { + is_unit_type = skirmishers + is_unit_type = archers + } + } + add = -30 + } + } + custom_tooltip = ep3_laamp_flavour_ewan.4041.tt.regiments_take_damage_range.earthquake + hidden_effect = { + change_maa_troops_count = { + value = maa_current_troops_count + multiply = { + integer_range = { + min = ep3_laamp_flavour_ewan_4041_regiment_damage_earthquake_min + max = ep3_laamp_flavour_ewan_4041_regiment_damage_earthquake_max + } + } + multiply = -1 + } + } + } + } + } + } +} + +# Bad weather destroys wagons or pack animals. +ep3_laamp_flavour_ewan.4041 = { + type = character_event + title = ep3_laamp_flavour_ewan.4041.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:weather_type = flag:storm_thunder } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.storm.thunder + } + triggered_desc = { + trigger = { scope:weather_type = flag:storm_wind } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.storm.wind + } + triggered_desc = { + trigger = { scope:weather_type = flag:storm_snow } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.storm.snow + } + triggered_desc = { + trigger = { scope:weather_type = flag:storm_sand } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.storm.sand + } + triggered_desc = { + trigger = { scope:weather_type = flag:wild_fires } + desc = { + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.wild_fires.intro + first_valid = { + triggered_desc = { + trigger = { + location = { + OR = { + terrain = steppe + terrain = drylands + } + } + } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.wild_fires.scrub + } + triggered_desc = { + trigger = { + location = { + OR = { + terrain = hills + terrain = mountains + } + } + } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.wild_fires.slopes + } + triggered_desc = { + trigger = { + location = { + OR = { + terrain = jungle + terrain = forest + terrain = taiga + } + } + } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.wild_fires.treeline + } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.wild_fires.fallback + } + } + } + triggered_desc = { + trigger = { scope:weather_type = flag:avalanches } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.avalanche + } + triggered_desc = { + trigger = { scope:weather_type = flag:flash_floods } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.flood + } + triggered_desc = { + trigger = { scope:weather_type = flag:frozen_water } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.frozen_water + } + triggered_desc = { + trigger = { scope:weather_type = flag:earthquake } + desc = ep3_laamp_flavour_ewan.4041.desc.weather_type.earthquake + } + } + desc = ep3_laamp_flavour_ewan.4041.desc.outro + } + theme = widgetless_travel_danger + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + scope:weather_type = flag:storm_thunder + scope:weather_type = flag:storm_snow + scope:weather_type = flag:storm_wind + } + } + animation = shiver + } + animation = shock + } + override_background = { + trigger = { ep3_laamp_flavour_ewan_4041_use_snowy_forest_backdrop_trigger = yes } + reference = wilderness + } + override_background = { + trigger = { ep3_laamp_flavour_ewan_4041_use_snowy_forest_backdrop_trigger = no } + reference = wilderness + } + # ALL THE VFX! + override_effect_2d = { + trigger = { scope:weather_type = flag:wild_fires } + reference = smoke + } + widgets = { + widget = { + is_shown = { + OR = { + scope:weather_type = flag:storm_snow + scope:weather_type = flag:avalanches + scope:weather_type = flag:frozen_water + } + } + gui = "event_window_widget_vfx_snowstorm" + container = "foreground_shader_vfx_container" + } + widget = { + is_shown = { scope:weather_type = flag:storm_thunder } + gui = "event_window_widget_vfx_lightning_storm" + container = "foreground_shader_vfx_container" + } + widget = { + is_shown = { scope:weather_type = flag:storm_wind } + gui = "event_window_widget_vfx_rain_storm" + container = "foreground_shader_vfx_container" + } + widget = { + is_shown = { scope:weather_type = flag:storm_sand } + gui = "event_window_widget_vfx_sandstorm" + container = "foreground_shader_vfx_container" + } + widget = { + is_shown = { scope:weather_type = flag:wild_fires } + gui = "event_window_widget_vfx_heavy_smoke" + container = "foreground_shader_vfx_container" + } + widget = { + is_shown = { scope:weather_type = flag:flash_floods } + gui = "event_window_widget_vfx_rainy_fog" + container = "foreground_shader_vfx_container" + } + widget = { + is_shown = { scope:weather_type = flag:earthquake } + gui = "event_window_widget_vfx_earthquake" + container = "foreground_shader_vfx_container" + } + } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4041 } + } + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4041 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4041 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # Roll our severe weather type. + random_list = { + # Some storms can happen anywhere. + ## Thunder. + 250 = { + trigger = { + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + } + } + } + save_scope_value_as = { + name = weather_type + value = flag:storm_thunder + } + } + ## Wind. + 250 = { + trigger = { + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + } + } + } + save_scope_value_as = { + name = weather_type + value = flag:storm_wind + } + } + # Snow storms. + 100 = { + trigger = { + location_has_normal_or_worse_winter_trigger = yes + # Some people won't consider this excessive hardship. + NOR = { + culture_uses_frequent_winter_transportation_trigger = yes + has_trait = winter_soldier + } + } + save_scope_value_as = { + name = weather_type + value = flag:storm_snow + } + } + # Sand storms. + 100 = { + trigger = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + } + } + } + save_scope_value_as = { + name = weather_type + value = flag:storm_sand + } + } + # Wild fires. + 100 = { + trigger = { + # Is it summer where we are? + is_nice_season_to_be_outside_trigger = { LOCATION = root.location } + # If so, proceed. + location = { + # Just in case, since winter may retreat late in Siberia but wild fires do happen. + county = { county_has_winter_trigger = no } + # Suitable terrains. + OR = { + terrain = plains + terrain = farmlands + terrain = hills + terrain = mountains + terrain = jungle + terrain = forest + terrain = taiga + terrain = steppe + terrain = drylands + } + # And places where they occur. + OR = { + geographical_region = world_europe_south + geographical_region = world_europe_east + geographical_region = world_asia_minor + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_africa + geographical_region = world_steppe + geographical_region = world_burma + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + save_scope_value_as = { + name = weather_type + value = flag:wild_fires + } + } + # Avalanches. + 200 = { + trigger = { + location_has_normal_or_worse_winter_trigger = yes + location = { terrain = mountains } + # Some people won't consider this excessive hardship. + NOR = { + has_trait = rough_terrain_expert + culture = { has_cultural_parameter = mountain_trait_bonuses } + } + } + save_scope_value_as = { + name = weather_type + value = flag:avalanches + } + } + # Flood. + 200 = { + trigger = { + OR = { + location = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + AND = { + current_season_wet = yes + location = { + OR = { + is_coastal = yes + any_neighboring_province = { is_river_province = yes } + terrain = plains + terrain = hills + terrain = farmlands + terrain = jungle + terrain = forest + } + # Some places will never have floods — not that they mightn't IRL, but they'd be potentially verisimilitude-breaking at a glance IG. + NOR = { + terrain = mountains + terrain = desert + terrain = desert_mountains + terrain = oasis + } + } + } + } + # Some people won't consider this excessive hardship. + NOT = { has_trait = forder } + } + save_scope_value_as = { + name = weather_type + value = flag:flash_floods + } + } + # Frozen water. + 200 = { + trigger = { + location_has_normal_or_worse_winter_trigger = yes + location = { + OR = { + terrain = plains + terrain = forest + terrain = taiga + } + } + # Rule out anyone who wouldn't be fooled by this. + NOR = { + culture_uses_frequent_winter_transportation_trigger = yes + has_trait = winter_soldier + } + } + save_scope_value_as = { + name = weather_type + value = flag:frozen_water + } + } + # Earthquakes. + 10 = { + trigger = { + location = { + OR = { + geographical_region = world_europe_south_east + geographical_region = world_europe_south_italy + geographical_region = world_asia_minor + geographical_region = world_middle_east_persia + geographical_region = world_tibet + geographical_region = world_himalaya + geographical_region = world_burma + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + # Plus some places but _only_ in their mountainous/hilly areas. + AND = { + geographical_region = ghw_region_iberia + OR = { + terrain = mountains + terrain = desert_mountains + terrain = hills + } + } + AND = { + geographical_region = ghw_region_north_africa + OR = { + terrain = mountains + terrain = desert_mountains + terrain = hills + } + } + AND = { + geographical_region = ghw_region_horn_of_africa + OR = { + terrain = mountains + terrain = desert_mountains + terrain = hills + } + } + } + } + } + save_scope_value_as = { + name = weather_type + 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 + } + } + change_county_control = -100 + } + random = { + chance = 20 + death = { death_reason = death_consumed_by_earthquake } + } + } + } + } + } + } + + # Martial duel to get things going. + option = { + name = ep3_laamp_flavour_ewan.4041.a + + duel = { + skill = martial + value = very_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4041.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.a.tt.success + ep3_laamp_flavour_ewan_4041_train_rallies_effect = { OPINION = 30 } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4041.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.a.tt.failure + ep3_laamp_flavour_ewan_4041_process_consequences_by_weather_type_effect = yes + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # Stewardship duel to get things going. + option = { + name = ep3_laamp_flavour_ewan.4041.b + + duel = { + skill = stewardship + value = very_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4041.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.b.tt.success + ep3_laamp_flavour_ewan_4041_train_rallies_effect = { OPINION = 30 } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4041.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.b.tt.failure + ep3_laamp_flavour_ewan_4041_process_consequences_by_weather_type_effect = yes + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = 1 } + } + } + + # Stubborn: come on, _heave_! + option = { + name = ep3_laamp_flavour_ewan.4041.c + trigger = { has_trait = stubborn } + trait = stubborn + + random_list = { + 50 = { + desc = ep3_laamp_flavour_ewan.4041.c.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.c.tt.success + ep3_laamp_flavour_ewan_4041_train_rallies_effect = { OPINION = 40 } + } + } + 50 = { + desc = ep3_laamp_flavour_ewan.4041.c.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.c.tt.failure + ep3_laamp_flavour_ewan_4041_process_consequences_by_weather_type_effect = yes + } + } + } + + stress_impact = { stubborn = minor_stress_impact_loss } + ai_chance = { + # If you're stubborn, you're quite likely to uhhh... be stubborn. + base = 100 + } + } + + # Pray to FateGodName & hope. + option = { + name = ep3_laamp_flavour_ewan.4041.d + trigger = { + NOT = { has_trait = stubborn } + } + + random_list = { + 25 = { + desc = ep3_laamp_flavour_ewan.4041.d.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.d.tt.success + add_prestige = minor_prestige_gain + } + } + 75 = { + desc = ep3_laamp_flavour_ewan.4041.d.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4041.d.tt.failure + add_piety = minor_piety_loss + ep3_laamp_flavour_ewan_4041_process_consequences_by_weather_type_effect = yes + } + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_zeal = 1 } + } + } + + # If we're slowed due to multi, resume travel. + after = { mp_resume_travel_plan = yes } +} + +################################################## +# Supplies Unaccounted For +# by Ewan Cowhig Croft +# 4051 - 4060 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_4051_roll_duel_effect = { + duel = { + skill = $SKILL$ + value = very_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = $VICTORY_LOC$ + send_interface_toast = { + title = $VICTORY_LOC$ + add_prestige = minor_prestige_gain + custom_tooltip = ep3_laamp_flavour_ewan.4051.tt.most_provisions_regained + domicile = { + change_provisions = { + value = scope:provisions_tally + multiply = 0.8 + ceiling = yes + } + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = $DEFEAT_LOC$ + send_interface_toast = { + title = $DEFEAT_LOC$ + random_list = { + 40 = { + custom_tooltip = ep3_laamp_flavour_ewan.4051.tt.some_provisions_regained + domicile = { + change_provisions = { + value = scope:provisions_tally + multiply = 0.2 + ceiling = yes + } + } + } + 60 = { custom_tooltip = ep3_laamp_flavour_ewan.4051.tt.provisions_lost } + } + } + } + } +} + +# Supplies go missing in large armies. +ep3_laamp_flavour_ewan.4051 = { + type = character_event + title = ep3_laamp_flavour_ewan.4051.t + desc = ep3_laamp_flavour_ewan.4051.desc + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = anger + } + override_background = { reference = army_camp } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4051 } + } + # No one would seriously try this in a smaller baggage train. + ## Outside of that one gallowsbait event, of course. + current_military_strength >= @ep3_laamp_flavour_ewan_baggage_train_has_significant_armed_force + # Plus make sure we've got enough provisions for someone to try it on. + domicile.provisions >= @ep3_laamp_flavour_ewan_4051_minimum_provisions_count + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4051 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4051 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # Lose an amount of provisions scaling to how many we currently have. + domicile = { + if = { + limit = { provisions >= 1000 } + # Register how many we're expending so we can try to get most of them back. + save_scope_value_as = { + name = provisions_tally + value = 300 + } + change_provisions = { + value = scope:provisions_tally + multiply = -1 + } + } + else_if = { + limit = { provisions >= 750 } + # Register how many we're expending so we can try to get most of them back. + save_scope_value_as = { + name = provisions_tally + value = 250 + } + change_provisions = { + value = scope:provisions_tally + multiply = -1 + } + } + else_if = { + limit = { provisions >= 500 } + # Register how many we're expending so we can try to get most of them back. + save_scope_value_as = { + name = provisions_tally + value = 150 + } + change_provisions = { + value = scope:provisions_tally + multiply = -1 + } + } + else_if = { + limit = { provisions >= 250 } + # Register how many we're expending so we can try to get most of them back. + save_scope_value_as = { + name = provisions_tally + value = 75 + } + change_provisions = { + value = scope:provisions_tally + multiply = -1 + } + } + else = { + # Register how many we're expending so we can try to get most of them back. + save_scope_value_as = { + name = provisions_tally + value = 50 + } + change_provisions = { + value = scope:provisions_tally + multiply = -1 + } + } + } + } + + # Martial duel to find who's responsible. + option = { + name = ep3_laamp_flavour_ewan.4051.a + + ep3_laamp_flavour_ewan_4051_roll_duel_effect = { + SKILL = martial + VICTORY_LOC = ep3_laamp_flavour_ewan.4051.a.tt.success + DEFEAT_LOC = ep3_laamp_flavour_ewan.4051.a.tt.failure + } + + stress_impact = { wrathful = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # Stewardship duel to find who's responsible. + option = { + name = ep3_laamp_flavour_ewan.4051.b + + ep3_laamp_flavour_ewan_4051_roll_duel_effect = { + SKILL = stewardship + VICTORY_LOC = ep3_laamp_flavour_ewan.4051.b.tt.success + DEFEAT_LOC = ep3_laamp_flavour_ewan.4051.b.tt.failure + } + + stress_impact = { diligent = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_greed = 1 } + } + } + + # Intrigue duel to find who's responsible. + option = { + name = ep3_laamp_flavour_ewan.4051.c + + ep3_laamp_flavour_ewan_4051_roll_duel_effect = { + SKILL = intrigue + VICTORY_LOC = ep3_laamp_flavour_ewan.4051.c.tt.success + DEFEAT_LOC = ep3_laamp_flavour_ewan.4051.c.tt.failure + } + + stress_impact = { deceitful = miniscule_stress_impact_loss } + ai_chance = { + base = 1 + ai_value_modifier = { ai_honor = -1 } + } + } + + # If we're slowed due to multi, resume travel. + after = { mp_resume_travel_plan = yes } +} + +################################################## +# Eyes in the Night +# by Ewan Cowhig Croft +# 4061 - 4070 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_4061_local_cannibal_trigger = { + OR = { + has_trait = cannibal + any_secret = { type = secret_cannibal } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + # Alright, figure out how big our size mult'll be. + save_scope_value_as = { + name = hunter_size + value = { + integer_range = { + min = $MIN$ + max = $MAX$ + } + } + } + # And set up our duel diffs. + save_scope_value_as = { + name = duel_diff_safe + value = { + value = scope:hunter_size + multiply = 2.5 + floor = yes + min = 10 + max = 20 + } + } + save_scope_value_as = { + name = duel_diff_risky + value = { + value = scope:hunter_size + multiply = 3.5 + floor = yes + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4061_roll_courtier_deaths_effect = { + if = { + limit = { scope:hunter_size >= 9 } + random_courtier = { + limit = { location = root.location } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + save_scope_as = death_1 + death = { death_reason = death_hunted_by_wild_beast } + } + random_courtier = { + limit = { + location = root.location + this != scope:death_1 + } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + save_scope_as = death_2 + death = { death_reason = death_hunted_by_wild_beast } + } + random_courtier = { + limit = { + location = root.location + NOR = { + this = scope:death_1 + this = scope:death_2 + } + } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + save_scope_as = death_3 + death = { death_reason = death_hunted_by_wild_beast } + } + random_courtier = { + limit = { + location = root.location + NOR = { + this = scope:death_1 + this = scope:death_2 + this = scope:death_3 + } + } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + death = { death_reason = death_hunted_by_wild_beast } + } + } + else_if = { + limit = { scope:hunter_size >= 6 } + random_courtier = { + limit = { location = root.location } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + save_scope_as = death_1 + death = { death_reason = death_hunted_by_wild_beast } + } + random_courtier = { + limit = { + location = root.location + this != scope:death_1 + } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + save_scope_as = death_2 + death = { death_reason = death_hunted_by_wild_beast } + } + random_courtier = { + limit = { + location = root.location + NOR = { + this = scope:death_1 + this = scope:death_2 + } + } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + death = { death_reason = death_hunted_by_wild_beast } + } + } + else_if = { + limit = { scope:hunter_size >= 3 } + random_courtier = { + limit = { location = root.location } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + save_scope_as = death_1 + death = { death_reason = death_hunted_by_wild_beast } + } + random_courtier = { + limit = { + location = root.location + this != scope:death_1 + } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + save_scope_as = death_2 + death = { death_reason = death_hunted_by_wild_beast } + } + } + else = { + random_courtier = { + limit = { location = root.location } + weight = { + base = 50 + modifier = { + add = { + add = prowess + add = { + value = martial + multiply = 0.5 + } + multiply = -1 + } + } + } + death = { death_reason = death_hunted_by_wild_beast } + } + } +} + +# Local predator picking off people each evening. +ep3_laamp_flavour_ewan.4061 = { + type = character_event + title = ep3_laamp_flavour_ewan.4061.t + desc = { + desc = ep3_laamp_flavour_ewan.4061.desc.intro + # Animal size. + first_valid = { + triggered_desc = { + trigger = { scope:hunter_size >= 12 } + desc = ep3_laamp_flavour_ewan.4061.desc.size.titanic + } + triggered_desc = { + trigger = { scope:hunter_size >= 10 } + desc = ep3_laamp_flavour_ewan.4061.desc.size.colossal + } + triggered_desc = { + trigger = { scope:hunter_size >= 8 } + desc = ep3_laamp_flavour_ewan.4061.desc.size.mammoth + } + triggered_desc = { + trigger = { scope:hunter_size >= 6 } + desc = ep3_laamp_flavour_ewan.4061.desc.size.huge + } + triggered_desc = { + trigger = { scope:hunter_size >= 4 } + desc = ep3_laamp_flavour_ewan.4061.desc.size.large + } + desc = ep3_laamp_flavour_ewan.4061.desc.size.nimble + } + desc = ep3_laamp_flavour_ewan.4061.desc.midtro + # Sight. + first_valid = { + triggered_desc = { + trigger = { has_trait = blind } + desc = ep3_laamp_flavour_ewan.4061.desc.sight.blind + } + desc = ep3_laamp_flavour_ewan.4061.desc.sight.sighted + } + # Terrain + first_valid = { + triggered_desc = { + trigger = { + location = { + any_neighboring_province = { is_river_province = yes } + } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.major_river + } + triggered_desc = { + trigger = { + location = { terrain = farmlands } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.farmlands + } + triggered_desc = { + trigger = { + location = { terrain = hills } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.hills + } + triggered_desc = { + trigger = { + location = { terrain = mountains } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.mountains + } + triggered_desc = { + trigger = { + location = { terrain = desert } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.desert + } + triggered_desc = { + trigger = { + location = { terrain = desert_mountains } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.desert_mountains + } + triggered_desc = { + trigger = { + location = { terrain = oasis } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.oasis + } + triggered_desc = { + trigger = { + location = { terrain = jungle } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.jungle + } + triggered_desc = { + trigger = { + location = { terrain = forest } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.forest + } + triggered_desc = { + trigger = { + location = { terrain = taiga } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.taiga + } + triggered_desc = { + trigger = { + location = { terrain = wetlands } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.wetlands + } + triggered_desc = { + trigger = { + location = { terrain = steppe } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.steppe + } + triggered_desc = { + trigger = { + location = { terrain = floodplains } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.floodplains + } + triggered_desc = { + trigger = { + location = { terrain = drylands } + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.drylands + } + desc = ep3_laamp_flavour_ewan.4061.desc.terrain.plains + } + desc = ep3_laamp_flavour_ewan.4061.desc.outro + } + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = worry + } + # Night would be more dramatic, but the follow-up wilderness events _have_ to be during the day due to art constraints, so we start off in the morning instead. + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4061 } + } + # Narrative'll break if you don't have _some_ available courtiers. + any_courtier = { location = root.location } + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4061 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4061 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_short + } + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # Roll our large Old World man-eater. + random_list = { + # Feral Dog (fallback) + 25 = { + save_scope_value_as = { + name = hunter_type + value = flag:dog + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 1 + MAX = 4 + } + } + # Wolf + 250 = { + trigger = { + location = { hunt_animal_wolf_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:wolf + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 2 + MAX = 4 + } + } + # Hyena + 200 = { + trigger = { + location = { hunt_animal_hyena_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:hyena + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 1 + MAX = 4 + } + } + # Lion + 200 = { + trigger = { + location = { hunt_animal_lion_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:lion + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 2 + MAX = 6 + } + } + # Tiger + 300 = { + trigger = { + location = { hunt_animal_tiger_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:tiger + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 4 + MAX = 7 + } + } + # Leopard + 150 = { + trigger = { + location = { hunt_animal_leopard_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:leopard + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 3 + MAX = 5 + } + } + # Panther (black leopards) + 1 = { + trigger = { + location = { hunt_animal_leopard_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:panther + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 3 + MAX = 5 + } + } + # Lynx + 75 = { + trigger = { + location = { hunt_animal_lynx_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:lynx + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 2 + MAX = 4 + } + } + # Caracal + 75 = { + trigger = { + location = { hunt_animal_caracal_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:caracal + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 1 + MAX = 3 + } + } + # Bear + 150 = { + trigger = { + location = { hunt_animal_bear_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:bear + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 4 + MAX = 9 + } + } + # Hippo + ## This one goes out to Dog: he was the best, deadliest pet an Arisen could ever ask for. + ## Yes, hippos do eat meat, though in the ordinary course of things they wouldn't _hunt_ per se. Not like this — basically this'd have to be a hippo that's maybe desperate for food, likely extra territorial, and probably just has a certain taste for meat. + 25 = { + trigger = { + location = { hunt_animal_hippo_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:hippo + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 8 + MAX = 12 + } + } + # Crocodile + 100 = { + trigger = { + ## + location = { hunt_animal_crocodile_trigger = yes } + # Just to be safe, try to ensure we're at least intending to step near their habitat for longer than a day. + current_travel_plan.next_location = { hunt_animal_crocodile_trigger = yes } + } + save_scope_value_as = { + name = hunter_type + value = flag:crocodile + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 3 + MAX = 8 + } + } + # Cannibal (generated) + 1 = { + trigger = { can_start_single_combat_trigger = yes } + save_scope_value_as = { + name = hunter_type + value = flag:cannibal_generated + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 1 + MAX = 1 + } + # Create & nab our cannibal. + create_character = { + template = criminal_brawn_character + location = root.location + save_scope_as = cannibal + trait = cannibal + prowess = { + max_template_medium_skill + max_template_very_high_skill + } + } + } + # Cannibal (existing) + 10 = { + trigger = { + can_start_single_combat_trigger = yes + any_pool_character = { + province = root.location + ep3_laamp_flavour_ewan_4061_local_cannibal_trigger = yes + } + } + save_scope_value_as = { + name = hunter_type + value = flag:cannibal_existing + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 1 + MAX = 1 + } + # Nab our cannibal. + random_pool_character = { + province = root.location + limit = { ep3_laamp_flavour_ewan_4061_local_cannibal_trigger = yes } + save_scope_as = cannibal + } + } + # Cannibal (Chad) + 50 = { + trigger = { + can_start_single_combat_trigger = yes + character:easteregg_chad_uhl ?= { + is_alive = yes + location ?= root.location + is_pool_character = yes + } + } + save_scope_value_as = { + name = hunter_type + value = flag:cannibal_chad + } + ep3_laamp_flavour_ewan_4061_roll_animal_size_effect = { + MIN = 1 + MAX = 1 + } + # Nab our cannibal. + character:easteregg_chad_uhl = { save_scope_as = cannibal } + } + } + # Apply our local modifier. + location.county = { + if = { + limit = { + # But not to hapless players who don't know what's happening. + NOT = { + holder = { is_ai = no } + } + } + switch = { + trigger = scope:hunter_size + 12 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_12_modifier + years = 3 + } + } + 11 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_11_modifier + years = 3 + } + } + 10 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_10_modifier + years = 3 + } + } + 9 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_09_modifier + years = 3 + } + } + 8 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_08_modifier + years = 3 + } + } + 7 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_07_modifier + years = 3 + } + } + 6 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_06_modifier + years = 3 + } + } + 5 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_05_modifier + years = 3 + } + } + 4 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_04_modifier + years = 3 + } + } + 3 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_03_modifier + years = 3 + } + } + 2 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_02_modifier + years = 3 + } + } + 1 = { + add_county_modifier = { + modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_01_modifier + years = 3 + } + } + } + } + } + } + + # Martial duel to try and organise better watches. + option = { + name = ep3_laamp_flavour_ewan.4061.a + + custom_tooltip = ep3_laamp_flavour_ewan.4061.a.tt.duel.safe + duel = { + skill = martial + value = scope:duel_diff_safe + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4061.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_laamp_flavour_ewan.4061.a.tt.success + add_prestige = minor_prestige_gain + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = saviour_opinion + opinion = 20 + } + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4061.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamp_flavour_ewan.4061.a.tt.failure + ep3_laamp_flavour_ewan_4061_roll_courtier_deaths_effect = yes + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 2 } + } + } + + # Go after it yourself. + option = { + name = ep3_laamp_flavour_ewan.4061.b + + custom_tooltip = ep3_laamp_flavour_ewan.4061.a.tt.duel.risky + custom_tooltip = ep3_laamp_flavour_ewan.4061.a.tt.duel.risky.are_you_sure + trigger_event = ep3_laamp_flavour_ewan.4062 + + # Flag not to clean up our cannibal, if we made one. + save_scope_value_as = { + name = dont_clean_cannibal + value = yes + } + + stress_impact = { + lifestyle_hunter = minor_stress_impact_loss + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 2 } + } + } + + # As long as it doesn't eat anyone important. + option = { + name = ep3_laamp_flavour_ewan.4061.c + + random_list = { + 50 = { + desc = ep3_laamp_flavour_ewan.4061.c.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4061.c.tt.success + add_prestige = miniscule_prestige_gain + } + } + 50 = { + desc = ep3_laamp_flavour_ewan.4061.c.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4061.c.tt.failure + ep3_laamp_flavour_ewan_4061_roll_courtier_deaths_effect = yes + } + } + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_energy = -2 } + } + } + + after = { + # If we're slowed due to multi, resume travel. + mp_resume_travel_plan = yes + # Clean up our cannibal, if necessary. + if = { + limit = { + scope:hunter_type = flag:cannibal_generated + NOT = { exists = scope:dont_clean_cannibal } + } + scope:cannibal = { + death = { death_reason = death_vanished } + } + } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_4062_cannibal_options_trigger = { + OR = { + scope:hunter_type = flag:cannibal_generated + scope:hunter_type = flag:cannibal_existing + scope:hunter_type = flag:cannibal_chad + } +} + +scripted_trigger ep3_laamp_flavour_ewan_4062_animal_group_canine_trigger = { + OR = { + scope:hunter_type = flag:dog + scope:hunter_type = flag:wolf + scope:hunter_type = flag:hyena + } +} + +scripted_trigger ep3_laamp_flavour_ewan_4062_animal_group_feline_trigger = { + OR = { + scope:hunter_type = flag:lion + scope:hunter_type = flag:tiger + scope:hunter_type = flag:leopard + scope:hunter_type = flag:panther + scope:hunter_type = flag:lynx + scope:hunter_type = flag:caracal + } +} + +scripted_trigger ep3_laamp_flavour_ewan_4062_animal_group_human_trigger = { + OR = { + scope:hunter_type = flag:cannibal_generated + scope:hunter_type = flag:cannibal_existing + scope:hunter_type = flag:cannibal_chad + } +} + +scripted_effect ep3_laamp_flavour_ewan_4062_animal_duel_effect = { + duel = { + skill = $SKILL$ + value = scope:duel_diff_risky + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4062.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4062.tt.success + add_prestige = { + value = medium_prestige_gain + add = { + value = scope:hunter_size + multiply = 50 + } + } + every_courtier = { + limit = { location = root.location } + custom = custom.every_follower + add_opinion = { + target = root + modifier = saviour_opinion + opinion = { + value = 30 + add = { + value = scope:hunter_size + multiply = 2 + } + } + } + } + } + ep3_laamp_flavour_ewan_4062_clean_man_eater_effect = yes + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4062.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4062.tt.failure + ep3_laamp_flavour_ewan_4062_animal_duel_loss_effect = yes + } + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4062_animal_duel_loss_effect = { + switch = { + trigger = scope:hunter_type + flag:dog = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = dog + SUCCESS_% = 90 + FAILURE_% = 10 + WOUNDS = 1 + } + } + flag:wolf = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = wolf + SUCCESS_% = 80 + FAILURE_% = 20 + WOUNDS = 1 + } + } + flag:hyena = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = hyena + SUCCESS_% = 85 + FAILURE_% = 15 + WOUNDS = 1 + } + } + flag:lion = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = lion + SUCCESS_% = 60 + FAILURE_% = 40 + WOUNDS = 2 + } + } + flag:tiger = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = tiger + SUCCESS_% = 40 + FAILURE_% = 60 + WOUNDS = 3 + } + } + flag:leopard = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = leopard + SUCCESS_% = 60 + FAILURE_% = 40 + WOUNDS = 2 + } + } + flag:panther = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = panther + SUCCESS_% = 60 + FAILURE_% = 40 + WOUNDS = 2 + } + } + flag:lynx = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = lynx + SUCCESS_% = 80 + FAILURE_% = 20 + WOUNDS = 1 + } + } + flag:caracal = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = caracal + SUCCESS_% = 80 + FAILURE_% = 20 + WOUNDS = 1 + } + } + flag:bear = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = bear + SUCCESS_% = 30 + FAILURE_% = 70 + WOUNDS = 3 + } + } + flag:hippo = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = hippo + SUCCESS_% = 10 + FAILURE_% = 90 + WOUNDS = 3 + } + } + flag:crocodile = { + ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + ANIMAL = crocodile + SUCCESS_% = 40 + FAILURE_% = 60 + WOUNDS = 3 + } + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4062_animal_duel_loss_guts_effect = { + save_scope_value_as = { + name = wounds_tally + value = $WOUNDS$ + } + random_list = { + $SUCCESS_%$ = { + increase_wounds_effect = { REASON = killed_by_monstrous_$ANIMAL$ } + if = { + limit = { scope:wounds_tally = 2 } + increase_wounds_effect = { REASON = killed_by_monstrous_$ANIMAL$ } + } + else_if = { + limit = { scope:wounds_tally >= 3 } + increase_wounds_effect = { REASON = killed_by_monstrous_$ANIMAL$ } + increase_wounds_effect = { REASON = killed_by_monstrous_$ANIMAL$ } + } + } + $FAILURE_%$ = { + death = { death_reason = death_killed_by_monstrous_$ANIMAL$ } + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4062_clean_man_eater_effect = { + hidden_effect = { + location.county = { + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_12_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_11_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_10_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_09_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_08_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_07_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_06_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_05_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_04_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_03_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_02_modifier + remove_county_modifier = ep3_laamp_flavour_ewan_4061_hungry_maneater_size_01_modifier + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4062_engagement_stress_effect = { + # vs. cannibals. + if = { + limit = { + OR = { + scope:hunter_type = flag:cannibal_generated + scope:hunter_type = flag:cannibal_existing + scope:hunter_type = flag:cannibal_chad + } + } + stress_impact = { + base = 10 + lifestyle_hunter = -10 + brave = -20 + craven = 10 + } + } + # vs. size. + ## 12. + else_if = { + limit = { scope:hunter_size >= 12 } + stress_impact = { + base = 50 + lifestyle_hunter = -30 + brave = -30 + craven = 30 + } + } + ## 10. + else_if = { + limit = { scope:hunter_size >= 10 } + stress_impact = { + base = 40 + lifestyle_hunter = -25 + brave = -25 + craven = 25 + } + } + ## 08. + else_if = { + limit = { scope:hunter_size >= 8 } + stress_impact = { + base = 20 + lifestyle_hunter = -20 + brave = -20 + craven = 20 + } + } + ## 06. + else_if = { + limit = { scope:hunter_size >= 6 } + stress_impact = { + base = 10 + lifestyle_hunter = -15 + brave = -15 + craven = 15 + } + } + ## 04. + else_if = { + limit = { scope:hunter_size >= 4 } + stress_impact = { + lifestyle_hunter = -10 + brave = -10 + craven = 10 + } + } + ## 02. + else_if = { + limit = { scope:hunter_size >= 2 } + stress_impact = { + lifestyle_hunter = -7 + brave = -7 + craven = 7 + } + } + ## 01. + else = { + stress_impact = { + lifestyle_hunter = -5 + brave = -5 + craven = 5 + } + } + # If we're over a certain size, we take base stress. + # Set up our animal stress. + save_scope_value_as = { + name = brave_size_stress + value = { + add = scope:hunter_size + multiply = -3 + } + } + save_scope_value_as = { + name = craven_size_stress + value = { + add = scope:hunter_size + multiply = 4 + } + } +} + +# Alright, time to fight! +ep3_laamp_flavour_ewan.4062 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { scope:hunter_type = flag:dog } + desc = ep3_laamp_flavour_ewan.4062.t.dog + } + triggered_desc = { + trigger = { scope:hunter_type = flag:wolf } + desc = ep3_laamp_flavour_ewan.4062.t.wolf + } + triggered_desc = { + trigger = { scope:hunter_type = flag:hyena } + desc = ep3_laamp_flavour_ewan.4062.t.hyena + } + triggered_desc = { + trigger = { scope:hunter_type = flag:lion } + desc = ep3_laamp_flavour_ewan.4062.t.lion + } + triggered_desc = { + trigger = { scope:hunter_type = flag:tiger } + desc = ep3_laamp_flavour_ewan.4062.t.tiger + } + triggered_desc = { + trigger = { scope:hunter_type = flag:leopard } + desc = ep3_laamp_flavour_ewan.4062.t.leopard + } + triggered_desc = { + trigger = { scope:hunter_type = flag:panther } + desc = ep3_laamp_flavour_ewan.4062.t.panther + } + triggered_desc = { + trigger = { scope:hunter_type = flag:lynx } + desc = ep3_laamp_flavour_ewan.4062.t.lynx + } + triggered_desc = { + trigger = { scope:hunter_type = flag:caracal } + desc = ep3_laamp_flavour_ewan.4062.t.caracal + } + triggered_desc = { + trigger = { scope:hunter_type = flag:bear } + desc = ep3_laamp_flavour_ewan.4062.t.bear + } + triggered_desc = { + trigger = { scope:hunter_type = flag:hippo } + desc = ep3_laamp_flavour_ewan.4062.t.hippo + } + triggered_desc = { + trigger = { scope:hunter_type = flag:crocodile } + desc = ep3_laamp_flavour_ewan.4062.t.crocodile + } + triggered_desc = { + trigger = { scope:hunter_type = flag:cannibal_generated } + desc = ep3_laamp_flavour_ewan.4062.t.cannibal_generated + } + triggered_desc = { + trigger = { scope:hunter_type = flag:cannibal_existing } + desc = ep3_laamp_flavour_ewan.4062.t.cannibal_existing + } + triggered_desc = { + trigger = { scope:hunter_type = flag:cannibal_chad } + desc = ep3_laamp_flavour_ewan.4062.t.cannibal_chad + } + } + } + desc = { + desc = ep3_laamp_flavour_ewan.4062.desc.intro + # Tracks. + first_valid = { + triggered_desc = { + trigger = { ep3_laamp_flavour_ewan_4062_animal_group_canine_trigger = yes } + desc = ep3_laamp_flavour_ewan.4062.desc.tracks.canine + } + triggered_desc = { + trigger = { ep3_laamp_flavour_ewan_4062_animal_group_feline_trigger = yes } + desc = ep3_laamp_flavour_ewan.4062.desc.tracks.feline + } + triggered_desc = { + trigger = { scope:hunter_type = flag:bear } + desc = ep3_laamp_flavour_ewan.4062.desc.tracks.ursine + } + triggered_desc = { + trigger = { scope:hunter_type = flag:hippo } + desc = ep3_laamp_flavour_ewan.4062.desc.tracks.hippopotomine + } + triggered_desc = { + trigger = { scope:hunter_type = flag:crocodile } + desc = ep3_laamp_flavour_ewan.4062.desc.tracks.crocodyline + } + triggered_desc = { + trigger = { ep3_laamp_flavour_ewan_4062_animal_group_human_trigger = yes } + desc = ep3_laamp_flavour_ewan.4062.desc.tracks.human + } + } + desc = ep3_laamp_flavour_ewan.4062.desc.tracks.connector + # Terrain + first_valid = { + triggered_desc = { + trigger = { + location = { + any_neighboring_province = { is_river_province = yes } + } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.major_river + } + triggered_desc = { + trigger = { + location = { terrain = farmlands } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.farmlands + } + triggered_desc = { + trigger = { + location = { terrain = hills } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.hills + } + triggered_desc = { + trigger = { + location = { terrain = mountains } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.mountains + } + triggered_desc = { + trigger = { + location = { terrain = desert } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.desert + } + triggered_desc = { + trigger = { + location = { terrain = desert_mountains } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.desert_mountains + } + triggered_desc = { + trigger = { + location = { terrain = oasis } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.oasis + } + triggered_desc = { + trigger = { + location = { terrain = jungle } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.jungle + } + triggered_desc = { + trigger = { + location = { terrain = forest } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.forest + } + triggered_desc = { + trigger = { + location = { terrain = taiga } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.taiga + } + triggered_desc = { + trigger = { + location = { terrain = wetlands } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.wetlands + } + triggered_desc = { + trigger = { + location = { terrain = steppe } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.steppe + } + triggered_desc = { + trigger = { + location = { terrain = floodplains } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.floodplains + } + triggered_desc = { + trigger = { + location = { terrain = drylands } + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.drylands + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.plains + } + desc = ep3_laamp_flavour_ewan.4062.desc.terrain.connector + # Animal + first_valid = { + triggered_desc = { + trigger = { scope:hunter_type = flag:dog } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.dog + } + triggered_desc = { + trigger = { scope:hunter_type = flag:wolf } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.wolf + } + triggered_desc = { + trigger = { scope:hunter_type = flag:hyena } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.hyena + } + triggered_desc = { + trigger = { scope:hunter_type = flag:lion } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.lion + } + triggered_desc = { + trigger = { scope:hunter_type = flag:tiger } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.tiger + } + triggered_desc = { + trigger = { scope:hunter_type = flag:leopard } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.leopard + } + triggered_desc = { + trigger = { scope:hunter_type = flag:panther } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.panther + } + triggered_desc = { + trigger = { scope:hunter_type = flag:lynx } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.lynx + } + triggered_desc = { + trigger = { scope:hunter_type = flag:caracal } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.caracal + } + triggered_desc = { + trigger = { scope:hunter_type = flag:bear } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.bear + } + triggered_desc = { + trigger = { + scope:hunter_type = flag:hippo + scope:hunter_size >= 10 + } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.hippo.largest + } + triggered_desc = { + trigger = { scope:hunter_type = flag:hippo } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.hippo.fallback + } + triggered_desc = { + trigger = { scope:hunter_type = flag:crocodile } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.crocodile + } + triggered_desc = { + trigger = { scope:hunter_type = flag:cannibal_generated } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.cannibal_generated + } + triggered_desc = { + trigger = { scope:hunter_type = flag:cannibal_existing } + desc = { + first_valid = { + triggered_desc = { + trigger = { character:easteregg_anna_johansson ?= scope:cannibal } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.cannibal_existing.anna + } + triggered_desc = { + trigger = { + scope:cannibal = { + any_secret = { type = secret_cannibal } + } + } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.cannibal_existing.secret + } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.cannibal_existing.fallback + } + } + } + triggered_desc = { + trigger = { scope:hunter_type = flag:cannibal_chad } + desc = ep3_laamp_flavour_ewan.4062.desc.animal.cannibal_chad + } + } + } + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:cannibal + animation = random_weapon_aggressive + } + override_background = { reference = wilderness } + + immediate = { + # Plus, we'll need to know how big our animal is. + set_variable = { + name = 4061_size_adjective + value = scope:hunter_size + } + # Sort our sacrifices. + court_position:huntperson_camp_officer ?= { + if = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + save_scope_as = huntsperson + } + } + court_position:kennelperson_camp_officer ?= { + if = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + save_scope_as = kenneler + } + } + } + + # Animal: martial duel. + option = { + name = ep3_laamp_flavour_ewan.4062.a + trigger = { ep3_laamp_flavour_ewan_4062_cannibal_options_trigger = no } + + ep3_laamp_flavour_ewan_4062_animal_duel_effect = { SKILL = martial } + + ep3_laamp_flavour_ewan_4062_engagement_stress_effect = yes + ai_chance = { + base = 1 + modifier = { + add = { + value = martial + multiply = 10 + } + martial > prowess + } + } + } + + # Animal: prowess duel. + option = { + name = ep3_laamp_flavour_ewan.4062.b + trigger = { ep3_laamp_flavour_ewan_4062_cannibal_options_trigger = no } + + ep3_laamp_flavour_ewan_4062_animal_duel_effect = { SKILL = prowess } + + ep3_laamp_flavour_ewan_4062_engagement_stress_effect = yes + ai_chance = { + base = 1 + modifier = { + add = { + value = prowess + multiply = 10 + } + prowess > martial + } + } + } + + # Huntperson: shoot her, SHOOOOT HERRRR! + option = { + name = ep3_laamp_flavour_ewan.4062.c + trigger = { + ep3_laamp_flavour_ewan_4062_cannibal_options_trigger = no + exists = scope:huntsperson + } + reason = have_huntperson + + scope:huntsperson = { + duel = { + skill = prowess + value = scope:duel_diff_risky + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4062.c.tt.success + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4062.c.tt.success + left_icon = scope:huntsperson + add_prestige = { + value = medium_prestige_gain + add = { + value = scope:hunter_size + multiply = 50 + } + multiply = 0.5 + } + every_courtier = { + limit = { location = root.location } + custom = custom.every_follower + add_opinion = { + target = scope:huntsperson + modifier = saviour_opinion + opinion = { + value = 30 + add = { + value = scope:hunter_size + multiply = 2 + } + } + } + } + } + ep3_laamp_flavour_ewan_4062_clean_man_eater_effect = yes + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4062.c.tt.failure + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4062.c.tt.failure + left_icon = scope:huntsperson + scope:huntsperson = { ep3_laamp_flavour_ewan_4062_animal_duel_loss_effect = yes } + } + } + } + } + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Dog: kennelmaster, bring me that hound! + option = { + name = ep3_laamp_flavour_ewan.4062.d + trigger = { + ep3_laamp_flavour_ewan_4062_cannibal_options_trigger = no + scope:hunter_type = flag:dog + exists = scope:kenneler + NOT = { has_character_modifier = dog_story_modifier } + } + + scope:kenneler = { + duel = { + skill = prowess + value = scope:duel_diff_risky + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4062.d.tt.success + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4062.d.tt.success + left_icon = scope:kenneler + add_prestige = medium_prestige_gain + start_dog_story_cycle_effect = yes + every_courtier = { + limit = { location = root.location } + custom = custom.every_follower + add_opinion = { + target = scope:kenneler + modifier = impressed_opinion + opinion = { + value = 15 + add = { + value = scope:hunter_size + multiply = 2 + } + } + } + } + } + ep3_laamp_flavour_ewan_4062_clean_man_eater_effect = yes + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4062.d.tt.failure + root = { + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4062.d.tt.failure + left_icon = scope:kenneler + scope:kenneler = { ep3_laamp_flavour_ewan_4062_animal_duel_loss_effect = yes } + } + } + } + } + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + lustful = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_sociability = 1 } + } + } + + # Cannibal: single combat. + option = { + name = ep3_laamp_flavour_ewan.4062.e + trigger = { ep3_laamp_flavour_ewan_4062_cannibal_options_trigger = yes } + + # In case death would change it (say, losing an artefact), register scope:cannibal's prowess. + save_scope_value_as = { + name = cannibal_prowess + value = scope:cannibal.prowess + } + # Then, into the actual duel we go! + custom_tooltip = { + text = duel_to_the_death.tt + configure_start_single_combat_effect = { + SC_INITIATOR = scope:cannibal + SC_ATTACKER = scope:cannibal + SC_DEFENDER = root + FATALITY = always + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = single_combat.1006 + OUTPUT_EVENT = ep3_laamp_flavour_ewan.4063 + } + } + + # No stress here. + ai_chance = { + # You don't get a choice here, you're fightin'. + base = 1 + } + } + + after = { + # If we're slowed due to multi, resume travel. + mp_resume_travel_plan = yes + # Clean up our animal size. + if = { + # The AI can get killed here _real_ fast, so we make sure to check that they're not gonna fire an error. + limit = { is_alive = yes } + remove_variable = 4061_size_adjective + } + } +} + +ep3_laamp_flavour_ewan.4063 = { + hidden = yes + + immediate = { + if = { + limit = { scope:sc_victor = root } + root = { + trigger_event = { + id = ep3_laamp_flavour_ewan.4064 + days = 1 + } + } + # Log if it was Chad who lost. + if = { + limit = { character:easteregg_chad_uhl ?= scope:sc_loser } + trigger_event = ep3_laamp_flavour_ewan.4065 + } + # Or Anna. + else_if = { + limit = { character:easteregg_anna_johansson ?= scope:sc_loser } + trigger_event = ep3_laamp_flavour_ewan.4067 + } + } + # Log if it was Chad who won. + else_if = { + limit = { character:easteregg_chad_uhl ?= scope:sc_victor } + trigger_event = ep3_laamp_flavour_ewan.4066 + } + # Or Anna. + else_if = { + limit = { character:easteregg_anna_johansson ?= scope:sc_loser } + trigger_event = ep3_laamp_flavour_ewan.4068 + } + } +} + +# You won the single combat! +ep3_laamp_flavour_ewan.4064 = { + type = character_event + title = ep3_laamp_flavour_ewan.4064.t + desc = ep3_laamp_flavour_ewan.4064.desc + theme = laamp + left_portrait = { + character = root + animation = random_weapon_celebrate + } + override_background = { reference = wilderness } + + immediate = { + add_prestige = { + value = medium_prestige_gain + add = { + value = scope:cannibal_prowess + multiply = 25 + } + } + ep3_laamp_flavour_ewan_4062_clean_man_eater_effect = yes + } + + # Victory! + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + any_secret = { type = secret_cannibal } + has_trait = cannibal + } + } + desc = ep3_laamp_flavour_ewan.4064.a.is_cannibal + } + desc = ep3_laamp_flavour_ewan.4064.a.not_cannibal + } + } + } + + every_courtier = { + limit = { location = root.location } + custom = custom.every_follower + add_opinion = { + target = root + modifier = saviour_opinion + opinion = { + value = 30 + add = scope:cannibal_prowess + } + } + } + + # No stress here. + ai_chance = { + # No logic needed for notification event. + base = 1 + } + } +} + +# Gather our ultimate fighter statistics. +ep3_laamp_flavour_ewan.4065 = { hidden = yes } +ep3_laamp_flavour_ewan.4066 = { hidden = yes } +ep3_laamp_flavour_ewan.4067 = { hidden = yes } +ep3_laamp_flavour_ewan.4068 = { hidden = yes } + +################################################## +# Slavers +# by Ewan Cowhig Croft +# 4071 - 4080 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_4071_valid_courtiers_to_lose_trigger = { + ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes + NOR = { + is_close_family_of = root + is_consort_of = root + has_important_relationship_with_character_trigger = { CHARACTER = root } + highest_skill_value >= very_high_skill_rating + prowess >= very_high_skill_rating + average_of_all_skills_and_prowess >= sum_of_all_skills_threshold_excellent + has_trait_with_flag = illness + has_wounds_trigger = yes + } +} + +scripted_effect ep3_laamp_flavour_ewan_4071_won_duel_effect = { + add_prestige = { + value = medium_prestige_gain + if = { + limit = { scope:sc_victor ?= root } + # If you win the duel, we give you a bit more than the usual amount, since you risked your life overtly. + add = 100 + } + } + every_courtier = { + limit = { location = root.location } + custom = custom.every_follower + add_opinion = { + target = root + modifier = saviour_opinion + opinion = 30 + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4071_lose_courtiers_effect = { + scope:follower_1 = { + death = { death_reason = death_disappeared_into_slave_markets } + } + scope:follower_2 = { + death = { death_reason = death_disappeared_into_slave_markets } + } + scope:follower_3 = { + death = { death_reason = death_disappeared_into_slave_markets } + } +} + +# Bastards try to kidnap people from the edges of your train. +ep3_laamp_flavour_ewan.4071 = { + type = character_event + title = ep3_laamp_flavour_ewan.4071.t + desc = ep3_laamp_flavour_ewan.4071.desc + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:slaver + animation = schadenfreude + } + lower_left_portrait = scope:follower_1 + lower_center_portrait = scope:follower_2 + lower_right_portrait = scope:follower_3 + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4071 } + } + # Must have the correct travel danger type. + location = { + travel_danger_type = { + travel_plan = root.current_travel_plan + type = county_control + } + } + # And you won't see slavers literally outside someone important's capital, just openly kidnapping travellers. + NOT = { + location.county = { + holder.highest_held_title_tier >= tier_duchy + this = holder.capital_county + } + } + # Must have enough courtiers to lose in a duel. + any_courtier = { + count >= 3 + ep3_laamp_flavour_ewan_4071_valid_courtiers_to_lose_trigger = yes + } + # Slavers won't attack forces over a certain size, even assuming you're spread out in a long line. + current_military_strength < @ep3_laamp_flavour_ewan_baggage_train_has_significant_armed_force + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4071 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4071 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # Nab our available courtiers. + ## First sorting them to a list. + every_courtier = { + limit = { ep3_laamp_flavour_ewan_4071_valid_courtiers_to_lose_trigger = yes } + add_to_list = loseable_courtiers_list + } + ## Then sorting who we'll lose if we lose a duel. + ordered_in_list = { + list = loseable_courtiers_list + order_by = sum_of_all_skills_and_prowess_value + max = 3 + check_range_bounds = no + if = { + limit = { + NOT = { exists = scope:follower_1 } + } + save_scope_as = follower_1 + } + else_if = { + limit = { + NOT = { + this = scope:follower_1 + exists = scope:follower_2 + } + } + save_scope_as = follower_2 + } + else_if = { + limit = { + NOT = { + this = scope:follower_1 + this = scope:follower_2 + exists = scope:follower_3 + } + } + save_scope_as = follower_3 + } + } + ## Then sorting who we'll lose if we sell people. + if = { + # Which means making sure we've got enough people; we want 5, we have three taken from us, so we need at least 8 in the list. + limit = { "list_size(loseable_courtiers_list)" >= 8 } + ordered_in_list = { + list = loseable_courtiers_list + order_by = { + value = sum_of_all_skills_and_prowess_value + multiply = -1 + } + max = 5 + check_range_bounds = no + # We're gonna save these as individual scopes for easier tooltipping, but also put them in a list for less verbose checking in some specific script later. + if = { + limit = { + NOT = { exists = scope:follower_4 } + } + save_scope_as = follower_4 + add_to_list = sellable_courtiers_list + } + else_if = { + limit = { + NOT = { + this = scope:follower_4 + exists = scope:follower_5 + } + } + save_scope_as = follower_5 + add_to_list = sellable_courtiers_list + } + else_if = { + limit = { + NOT = { + this = scope:follower_4 + this = scope:follower_5 + exists = scope:follower_6 + } + } + save_scope_as = follower_6 + add_to_list = sellable_courtiers_list + } + else_if = { + limit = { + NOT = { + this = scope:follower_4 + this = scope:follower_5 + this = scope:follower_6 + exists = scope:follower_7 + } + } + save_scope_as = follower_7 + add_to_list = sellable_courtiers_list + } + else_if = { + limit = { + NOT = { + this = scope:follower_4 + this = scope:follower_5 + this = scope:follower_6 + this = scope:follower_7 + exists = scope:follower_8 + } + } + save_scope_as = follower_8 + add_to_list = sellable_courtiers_list + } + } + } + # Create a hostile slaver. + create_character = { + template = bandit_character + location = root.location + culture = root.location.culture + faith = root.location.faith + trait = gallowsbait + martial = { + min_template_decent_skill + max_template_high_skill + } + stewardship = { + min_template_decent_skill + max_template_high_skill + } + prowess = { + min_template_decent_skill + max_template_high_skill + } + save_scope_as = slaver + after_creation = { + # Make sure we telegraph that they're a dick. + ## First, level up their gallowsbait + laamp_rewards_apply_criminal_xp_effect = { + TRACK = bandit + XP_MAX = gallowsbait_xp_massive_gain + XP_MIN = gallowsbait_xp_massive_gain + } + laamp_rewards_apply_criminal_xp_effect = { + TRACK = marauder + XP_MAX = gallowsbait_xp_massive_gain + XP_MIN = gallowsbait_xp_massive_gain + } + ## Then make sure they've got a suitably horrid personality. + if = { + limit = { number_of_personality_traits < 3 } + add_trait = callous + } + if = { + limit = { number_of_personality_traits < 3 } + add_trait = greedy + } + if = { + limit = { number_of_personality_traits < 3 } + add_trait = arbitrary + } + if = { + limit = { number_of_personality_traits < 3 } + add_trait = wrathful + } + if = { + limit = { number_of_personality_traits < 3 } + add_trait = vengeful + } + } + } + } + + # Martial duel to fight them off. + option = { + name = ep3_laamp_flavour_ewan.4071.a + + duel = { + skill = martial + target = scope:slaver + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4071.a.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4071.a.tt.success + left_icon = scope:slaver + ep3_laamp_flavour_ewan_4071_won_duel_effect = yes + scope:slaver = { + death = { death_reason = death_attacking_laamp_train } + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4071.a.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4071.a.tt.failure + left_icon = scope:slaver + add_prestige = minor_prestige_loss + ep3_laamp_flavour_ewan_4071_lose_courtiers_effect = yes + } + } + } + + # No stress here, + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 2 } + } + } + + # SCE: launch yourself at the largest and fiercest of them. + option = { + name = ep3_laamp_flavour_ewan.4071.b + trigger = { can_start_single_combat_trigger = yes } + + custom_tooltip = { + text = duel_to_the_death.tt + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:slaver + FATALITY = always + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = single_combat.1006 + OUTPUT_EVENT = ep3_laamp_flavour_ewan.4072 + } + } + save_scope_value_as = { + name = duel_begun + value = yes + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # Haggle & sell some lesser courtiers yourself. + option = { + name = ep3_laamp_flavour_ewan.4071.c + trigger = { exists = scope:follower_4 } + + # Alright, explain how this works. + custom_tooltip = ep3_laamp_flavour_ewan.4071.c.sale_explanation.profit + custom_tooltip = ep3_laamp_flavour_ewan.4071.c.sale_explanation.limitations + custom_tooltip = ep3_laamp_flavour_ewan.4071.c.sale_explanation.death + # Then sum it up. + scope:slaver = { + pay_short_term_gold = { + target = root + gold = { + add = scope:follower_4.sum_of_all_skills_and_prowess_value + add = scope:follower_5.sum_of_all_skills_and_prowess_value + add = scope:follower_6.sum_of_all_skills_and_prowess_value + add = scope:follower_7.sum_of_all_skills_and_prowess_value + add = scope:follower_8.sum_of_all_skills_and_prowess_value + } + } + } + # And we'd lose the listed courtiers, permanently. + scope:follower_4 = { + death = { + death_reason = death_disappeared_into_slave_markets + killer = root + } + } + scope:follower_5 = { + death = { + death_reason = death_disappeared_into_slave_markets + killer = root + } + } + scope:follower_6 = { + death = { + death_reason = death_disappeared_into_slave_markets + killer = root + } + } + scope:follower_7 = { + death = { + death_reason = death_disappeared_into_slave_markets + killer = root + } + } + scope:follower_8 = { + death = { + death_reason = death_disappeared_into_slave_markets + killer = root + } + } + # Sort out opinions. + ## We make a fake version first for easier tooltipping. + show_as_tooltip = { + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes + has_trait = callous + } + custom = custom.every_callous_follower + add_opinion = { + target = root + modifier = practical_opinion + opinion = 30 + } + } + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes + has_trait = compassionate + } + custom = custom.every_compassionate_follower + add_opinion = { + target = root + modifier = callous_opinion + opinion = -100 + } + } + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes + NOR = { + has_trait = compassionate + has_trait = callous + } + } + custom = custom.every_other_follower + add_opinion = { + target = root + modifier = outraged_opinion + opinion = -50 + } + } + } + ## Then we process the actual list. + hidden_effect = { + every_courtier = { + # Compassionates. + if = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes + has_trait = compassionate + } + add_opinion = { + target = root + modifier = callous_opinion + opinion = -100 + } + } + # Callous courtiers who didn't lose friends, consorts, or spouses. + else_if = { + limit = { + has_trait = callous + save_temporary_scope_as = char_temp + NOT = { + any_in_list = { + list = sellable_courtiers_list + OR = { + AND = { + reverse_opinion = { + target = scope:char_temp + value >= 30 + } + OR = { + is_consort_of = scope:char_temp + is_close_or_extended_family_of = scope:char_temp + } + } + has_any_moderate_good_relationship_with_character_trigger = { CHARACTER = scope:char_temp } + } + } + } + } + add_opinion = { + target = root + modifier = practical_opinion + opinion = 30 + } + } + else_if = { + limit = { + save_temporary_scope_as = char_temp + NOT = { + any_in_list = { + list = sellable_courtiers_list + count = all + OR = { + reverse_opinion = { + target = scope:char_temp + value <= -80 + } + has_any_moderate_bad_relationship_with_character_trigger = { CHARACTER = scope:char_temp } + } + } + } + } + add_opinion = { + target = root + modifier = outraged_opinion + opinion = -50 + } + } + } + } + # Last, but by no means least, gallowsbait. + laamp_rewards_apply_criminal_xp_effect = { + TRACK = marauder + XP_MAX = gallowsbait_xp_major_gain + XP_MIN = gallowsbait_xp_major_gain + } + + stress_impact = { + callous = major_stress_impact_loss + arbitrary = medium_stress_impact_loss + just = massive_stress_impact_gain + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = -3 + } + } + } + + # Ignore the cries and hope for the best. + option = { + name = ep3_laamp_flavour_ewan.4071.d + + random_list = { + 25 = { + desc = ep3_laamp_flavour_ewan.4071.d.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4071.d.tt.success + scope:slaver = { + death = { death_reason = death_attacking_laamp_train } + } + } + } + 75 = { + desc = ep3_laamp_flavour_ewan.4071.d.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4071.d.tt.failure + add_prestige = medium_prestige_loss + ep3_laamp_flavour_ewan_4071_lose_courtiers_effect = yes + } + } + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_energy = 1 + ai_honor = -0.5 + } + } + } + + after = { + # If we're slowed due to multi, resume travel. + mp_resume_travel_plan = yes + # Whatever else happens, our slaver is gone. + hidden_effect = { + scope:slaver = { + if = { + limit = { + is_alive = yes + NOT = { exists = scope:duel_begun } + } + death = { death_reason = death_vanished } + } + } + } + } +} + +ep3_laamp_flavour_ewan.4072 = { + hidden = yes + + immediate = { + if = { + limit = { scope:sc_victor = root } + root = { trigger_event = ep3_laamp_flavour_ewan.4073 } + } + else = { ep3_laamp_flavour_ewan_4071_lose_courtiers_effect = yes } + } +} + +# You won the single combat! +ep3_laamp_flavour_ewan.4073 = { + type = character_event + title = ep3_laamp_flavour_ewan.4073.t + desc = ep3_laamp_flavour_ewan.4073.desc + theme = laamp + left_portrait = { + character = root + animation = random_weapon_celebrate + } + override_background = { reference = battlefield } + + # Victory! + option = { + name = ep3_laamp_flavour_ewan.4073.a + + ep3_laamp_flavour_ewan_4071_won_duel_effect = yes + + # No stress here. + ai_chance = { + # No logic needed for notification event. + base = 1 + } + } +} + +################################################## +# Born of Desperation +# by Ewan Cowhig Croft +# 4081 - 4090 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_4081_duel_loss_effect = { + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = starving_peasant_horde } + domicile = { + change_provisions = { + value = scope:provisions_loss + multiply = -1 + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_4081_roll_non_financial_duel_effect = { + duel = { + skill = $SKILL$ + value = high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = $VICTORY_LOC$ + send_interface_toast = { + title = $VICTORY_LOC$ + add_prestige = medium_prestige_gain + every_courtier = { + limit = { ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes } + custom = custom.every_adult_follower + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = $DEFEAT_LOC$ + send_interface_toast = { + title = $DEFEAT_LOC$ + ep3_laamp_flavour_ewan_4081_duel_loss_effect = yes + } + } + } +} + +# Hungry locals swarm at you, searching for food. +ep3_laamp_flavour_ewan.4081 = { + type = character_event + title = ep3_laamp_flavour_ewan.4081.t + desc = { + desc = ep3_laamp_flavour_ewan.4081.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:hunger_type = flag:epidemic } + desc = ep3_laamp_flavour_ewan.4081.desc.epidemic + } + triggered_desc = { + trigger = { scope:hunger_type = flag:mundane } + desc = ep3_laamp_flavour_ewan.4081.desc.mundane + } + } + desc = ep3_laamp_flavour_ewan.4081.desc.outro + } + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:local_peasant + animation = aggressive_spear + outfit_tags = { beggar_rags } + hide_info = yes + } + override_background = { reference = wilderness } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4081 } + } + # Must have the correct travel danger type. + location = { + OR = { + travel_danger_type = { + travel_plan = root.current_travel_plan + type = county_control + } + travel_danger_type = { + travel_plan = root.current_travel_plan + type = epidemic + } + } + } + # A mob won't attack forces over a certain size, even assuming you're spread out in a long line. + current_military_strength < @ep3_laamp_flavour_ewan_baggage_train_has_significant_armed_force + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4081 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4081 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # Check to see if this is a generic famine or an epidemic-induced one. + if = { + limit = { + location = { + any_province_epidemic = { } + } + } + save_scope_value_as = { + name = hunger_type + value = flag:epidemic + } + } + else ={ + save_scope_value_as = { + name = hunger_type + value = flag:mundane + } + } + # How many provisions do we need to surrender? + save_scope_value_as = { + name = provisions_loss + value = { + add = domicile.provisions + multiply = 0.2 + floor = yes + min = @ep3_laamp_flavour_ewan_4000_min_provisions_worth_attacking + } + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + # Create a peasant to look annoyed for players. + if = { + limit = { is_ai = no } + hidden_effect = { + random_list = { + 90 = { + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.culture + faith = root.location.faith + prowess = 16 + save_scope_as = local_peasant + after_creation = { + change_current_weight = -100 + add_character_flag = no_headgear + } + } + } + 10 = { + create_character = { + template = diseased_peasant_character + location = root.location + culture = root.location.culture + faith = root.location.faith + prowess = 16 + save_scope_as = local_peasant + after_creation = { + change_current_weight = -100 + add_character_flag = no_headgear + } + } + } + } + } + } + } + + # Diplomacy duel to try and calm them. + option = { + name = ep3_laamp_flavour_ewan.4081.a + + ep3_laamp_flavour_ewan_4081_roll_non_financial_duel_effect = { + SKILL = diplomacy + VICTORY_LOC = ep3_laamp_flavour_ewan.4081.a.tt.success + DEFEAT_LOC = ep3_laamp_flavour_ewan.4081.a.tt.failure + } + + stress_impact = { + calm = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_compassion = 1 } + } + } + + # Stewardship duel to try and force them to pay. + option = { + name = ep3_laamp_flavour_ewan.4081.b + + duel = { + skill = stewardship + value = high_skill_rating + # Victory! + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4081.b.tt.success + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4081.b.tt.success + add_gold = medium_gold_laamps_value + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes + OR = { + has_trait = compassionate + has_trait = generous + } + # Compassionate overrules greedy, but callous and sadistic overrule generous. + NOR = { + has_trait = callous + has_trait = sadistic + } + } + custom = ep3_laamp_flavour_ewan.4081.b.tt.success.every_compassionate_or_generous_follower + add_opinion = { + target = root + modifier = callous_opinion + opinion = -30 + } + } + every_courtier = { + limit = { + ep3_laamp_flavour_ewan_available_courtier_travel_danger_trigger = yes + OR = { + has_trait = callous + has_trait = sadistic + has_trait = greedy + } + # Callous and sadistic overrule generous, but compassionate overrules greedy. + NOT = { has_trait = compassionate } + } + custom = ep3_laamp_flavour_ewan.4081.b.tt.success.every_callous_greedy_or_sadistic_follower + add_opinion = { + target = root + modifier = practical_opinion + opinion = 30 + } + } + } + } + # Defeat. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = ep3_laamp_flavour_ewan.4081.b.tt.failure + send_interface_toast = { + title = ep3_laamp_flavour_ewan.4081.b.tt.failure + ep3_laamp_flavour_ewan_4081_duel_loss_effect = yes + } + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + generous = major_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + } + } + } + + # Martial duel to force them back. + option = { + name = ep3_laamp_flavour_ewan.4081.c + + ep3_laamp_flavour_ewan_4081_roll_non_financial_duel_effect = { + SKILL = martial + VICTORY_LOC = ep3_laamp_flavour_ewan.4081.c.tt.success + DEFEAT_LOC = ep3_laamp_flavour_ewan.4081.c.tt.failure + } + + stress_impact = { + wrathful = medium_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + calm = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_compassion = -0.5 + } + } + } + + # Accept and let them take X provisions. + option = { + name = ep3_laamp_flavour_ewan.4081.d + trigger = { domicile.provisions >= scope:provisions_loss } + show_as_unavailable = { always = yes } + + add_prestige = miniscule_prestige_loss + domicile = { + change_provisions = { + value = scope:provisions_loss + multiply = -1 + } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + generous = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + greedy = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = -1 } + } + } + + # If we're slowed due to multi, resume travel. + after = { + mp_resume_travel_plan = yes + # Clean up our peasant. + scope:local_peasant ?= { silent_disappearance_effect = yes } + } +} + +################################################## +# Night Attack +# by Ewan Cowhig Croft +# 4091 - 4100 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_4091_roll_duel_effect = { + duel = { + skill = $SKILL$ + value = very_high_skill_rating + # Victory! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = $SUCCESS_LOC$ + send_interface_toast = { + title = $SUCCESS_LOC$ + add_prestige = medium_prestige_gain + } + } + # Defeat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = $FAILURE_LOC$ + send_interface_toast = { + title = $FAILURE_LOC$ + increase_wounds_effect = { REASON = battle } + random_courtier = { + limit = { location = root.location } + increase_wounds_effect = { REASON = battle } + save_temporary_scope_as = courtier_1 + } + random_courtier = { + limit = { + location = root.location + this != scope:courtier_1 + } + increase_wounds_effect = { REASON = battle } + save_temporary_scope_as = courtier_2 + } + random_courtier = { + limit = { + location = root.location + this != scope:courtier_1 + this != scope:courtier_2 + } + increase_wounds_effect = { REASON = battle } + } + } + } + } +} + +# Unknown group assaults your camp one evening. +ep3_laamp_flavour_ewan.4091 = { + type = character_event + title = ep3_laamp_flavour_ewan.4091.t + desc = ep3_laamp_flavour_ewan.4091.desc + theme = widgetless_travel_danger + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:retainer + animation = aggressive_sword + outfit_tags = { military_outfit } + hide_info = yes + } + override_background = { reference = ep3_campfire } + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_available_travelling_adult = yes + current_travel_plan = { is_travel_with_domicile = yes } + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_4091 } + } + # Must have the correct travel danger type. + location = { + OR = { + travel_danger_type = { + travel_plan = root.current_travel_plan + type = owner_opinion + } + travel_danger_type = { + travel_plan = root.current_travel_plan + type = county_control + } + } + } + # Plus rule out anyone who'd have likely have a palisade. + NOT = { + domicile = { has_domicile_building = camp_perimeter_palisade } + } + } + + immediate = { + # Slow down in MP. + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_4091 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_4091 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Increment XP. + traveler_danger_xp_effect = { + MIN = 1 + MAX = 3 + } + # Save our county for loc. + location.county = { save_scope_as = current_county } + # Create a bandit to look annoyed for players. + if = { + limit = { is_ai = no } + hidden_effect = { + create_character = { + template = mercenary + employer = root.location.county.holder + culture = root.location.culture + faith = root.location.county.holder.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = retainer + } + } + } + } + + # Martial duel to fight them off. + option = { + name = ep3_laamp_flavour_ewan.4091.a + + ep3_laamp_flavour_ewan_4091_roll_duel_effect = { + SKILL = martial + SUCCESS_LOC = ep3_laamp_flavour_ewan.4091.a.tt.success + FAILURE_LOC = ep3_laamp_flavour_ewan.4091.a.tt.failure + } + + # No stress here. + ai_chance = { + base = 1 + ai_value_modifier = { ai_rationality = 1 } + } + } + + # Prowess duel to launch yourself into the frey. + option = { + name = ep3_laamp_flavour_ewan.4091.b + + ep3_laamp_flavour_ewan_4091_roll_duel_effect = { + SKILL = prowess + SUCCESS_LOC = ep3_laamp_flavour_ewan.4091.b.tt.success + FAILURE_LOC = ep3_laamp_flavour_ewan.4091.b.tt.failure + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = 1 } + } + } + + # Hide from the chaos. + option = { + name = ep3_laamp_flavour_ewan.4091.c + + every_courtier = { + limit = { + location = root.location + NOT = { has_trait = craven } + } + custom = ep3_laamp_flavour_ewan.4091.c.every_non_craven_follower + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -25 + } + } + + stress_impact = { + craven = minor_stress_impact_loss + brave = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { ai_boldness = -1 } + } + } + + # If we're slowed due to multi, resume travel. + after = { mp_resume_travel_plan = yes } +} + + + + + + + + + + + +################################################## +# LOANED COURTIER RETURNS + +################################################## +# Core Tombola +# by Ewan Cowhig Croft +# 9501 - 9510 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_9501_culture_to_adopt_trigger = { + culture = { + OR = { + this != prev.host.culture + this != prev.host.capital_county.culture + } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_9501_faith_sin_virtue_check_trigger = { + num_sinful_traits = { + value <= 0 + target = $FAITH$ + } + num_virtuous_traits = { + value >= 1 + target = $FAITH$ + } +} + +scripted_trigger ep3_laamp_flavour_ewan_9501_character_would_go_idea_shopping_trigger = { + NOT = { has_character_flag = ai_will_not_convert } + faith = { + NOR = { + this = prev.host.faith + this = prev.host.capital_county.faith + } + } + # Cynics don't care enough to switch + ## Or rather, they switch for entirely cynical reasons and we're portraying this as more of a finding-your-true-self thing. + NOT = { has_trait = cynical } + # Religious characters compare what faiths fit them best. + OR = { + # Non-zealous characters will consider a switch if they're not virtuous but would be in a new faith. + AND = { + NOT = { has_trait = zealous } + num_virtuous_traits = { + value <= 0 + target = faith + } + OR = { + ep3_laamp_flavour_ewan_9501_faith_sin_virtue_check_trigger = { FAITH = host.faith } + ep3_laamp_flavour_ewan_9501_faith_sin_virtue_check_trigger = { FAITH = host.capital_county.faith } + } + } + # Zealous characters will _also_ switch, but also need to feel like they're sinful in their current faith. + AND = { + has_trait = zealous + num_sinful_traits = { + value >= 1 + target = faith + } + num_virtuous_traits = { + value <= 0 + target = faith + } + OR = { + ep3_laamp_flavour_ewan_9501_faith_sin_virtue_check_trigger = { FAITH = host.faith } + ep3_laamp_flavour_ewan_9501_faith_sin_virtue_check_trigger = { FAITH = host.capital_county.faith } + } + } + } +} + +# Takes care of returning to camp after a period away. +ep3_laamp_flavour_ewan.9501 = { + hidden = yes + + trigger = { + is_imprisoned = no + scope:visitor = { + is_alive = yes + is_imprisoned = no + is_incapable = no + } + } + + on_trigger_fail = { + # Dead. + if = { + limit = { + scope:visitor = { is_alive = no } + } + trigger_event = ep3_laamp_flavour_ewan.9531 + } + # Imprisoned. + else_if = { + limit = { + scope:visitor = { is_imprisoned = yes } + } + trigger_event = ep3_laamp_flavour_ewan.9532 + } + # Incapable. + else_if = { + limit = { + scope:visitor = { is_incapable = yes } + } + trigger_event = ep3_laamp_flavour_ewan.9533 + } + # If we're imprisoned, just return them to camp with no fanfare. + else_if = { + limit = { is_imprisoned = yes } + scope:visitor = { return_to_court = yes } + } + # Fallback (we don't know what's happened to them). + else = { trigger_event = ep3_laamp_flavour_ewan.9534 } + } + + immediate = { + # Wherever they were, we give them the language of the place & their soon-to-be-former host if they didn't speak them already. + scope:visitor = { + # Prio the host's language. + if = { + limit = { + NOT = { knows_language_of_culture = host.culture } + current_extra_languages < language_soft_cap + } + learn_language_of_culture = host.culture + } + # Then the local tongue. + if = { + limit = { + NOT = { knows_language_of_culture = host.capital_county.culture } + current_extra_languages < language_soft_cap + } + learn_language_of_culture = host.capital_county.culture + } + # Nab our host scopes so we can reference them in loc. + host = { + save_scope_as = host + capital_county = { save_scope_as = capital } + } + } + # Next, determine what event we get when they return. + ## Try to have these add up to 100%. + random_list = { + # They're the same as ever. + 60 = { + trigger_event = ep3_laamp_flavour_ewan.9511 + # Boosts for other entries come out of this one, so we reduce the likelihood based on modifiers further down. + modifier = { + add = -20 + scope:visitor = { has_trait = gregarious } + } + modifier = { + add = -60 + scope:visitor = { + has_trait = zealous + ep3_laamp_flavour_ewan_9501_character_would_go_idea_shopping_trigger = yes + } + } + } + # They've learnt a thing or two. + 25 = { + trigger_event = ep3_laamp_flavour_ewan.9512 + } + # They have taken on the local culture. + 5 = { + trigger = { + scope:visitor = { + ep3_laamp_flavour_ewan_9501_culture_to_adopt_trigger = yes + NOT = { has_character_flag = laamp_follower_tombola_changed_culture_flag } + } + } + scope:visitor = { add_character_flag = laamp_follower_tombola_changed_culture_flag } + trigger_event = ep3_laamp_flavour_ewan.9521 + # More likely for gregarious characters. + modifier = { + add = 20 + scope:visitor = { has_trait = gregarious } + } + # Less likely for shy characters. + modifier = { + add = -5 + scope:visitor = { has_trait = shy } + } + } + # They have adopted the local faith. + 5 = { + # Zealous characters won't ever consider this unless they have a sin-virtue mismatch. + trigger = { + scope:visitor = { + ep3_laamp_flavour_ewan_9501_character_would_go_idea_shopping_trigger = yes + NOT = { has_character_flag = laamp_follower_tombola_changed_faith_flag } + } + } + scope:visitor = { add_character_flag = laamp_follower_tombola_changed_faith_flag } + trigger_event = ep3_laamp_flavour_ewan.9522 + # If zealous characters are valid for this, then it means the new faith is a much better fit, so we weight them up drastically. + modifier = { + add = 60 + scope:visitor = { has_trait = zealous } + } + } + # They've taken both the culture and the faith + 5 = { + trigger = { + scope:visitor = { + ep3_laamp_flavour_ewan_9501_culture_to_adopt_trigger = yes + # Zealous characters won't ever consider this unless they have a sin-virtue mismatch. + ep3_laamp_flavour_ewan_9501_character_would_go_idea_shopping_trigger = yes + NOR = { + has_character_flag = laamp_follower_tombola_changed_culture_flag + has_character_flag = laamp_follower_tombola_changed_faith_flag + } + } + } + scope:visitor = { + add_character_flag = laamp_follower_tombola_changed_culture_flag + add_character_flag = laamp_follower_tombola_changed_faith_flag + } + trigger_event = ep3_laamp_flavour_ewan.9523 + # More likely for gregarious characters. + modifier = { + add = 20 + scope:visitor = { has_trait = gregarious } + } + # Less likely for shy characters. + modifier = { + add = -5 + scope:visitor = { has_trait = shy } + } + # If zealous characters are valid for this, then it means the new faith is a much better fit, so we weight them up drastically. + modifier = { + add = 60 + scope:visitor = { has_trait = zealous } + } + } + } + } +} + +################################################## +# Follower Returned +# by Ewan Cowhig Croft +# 9511 - 9520 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_9511_standard_drive_away_char_stress_effect = { + stress_impact = { + sadistic = minor_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + } +} + +# Follower returns, the same as when they left. +ep3_laamp_flavour_ewan.9511 = { + type = character_event + title = ep3_laamp_flavour_ewan.9511.t + desc = { + desc = ep3_laamp_flavour_ewan.9511.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:visitor_spouse } + desc = ep3_laamp_flavour_ewan.9511.desc.spouse.got_married + } + desc = ep3_laamp_flavour_ewan.9511.desc.spouse.nope + } + desc = ep3_laamp_flavour_ewan.9511.desc.outro + } + theme = laamp + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:visitor + animation = happiness + } + lower_right_portrait = scope:visitor_spouse + override_background = { reference = ep3_campfire } + + immediate = { + scope:visitor = { + # Have they have gotten married to a local? + if = { + limit = { + can_marry_trigger = yes + OR = { + NOT = { has_sexuality = homosexual } + allowed_to_marry_same_sex_trigger = yes + } + might_cheat_on_every_partner_trigger = yes + } + random = { + chance = { + value = 20 + # Reduce this a little for each existing marriage. + every_spouse = { add = -5 } + # Gregarious characters go out more. + if = { + limit = { has_trait = gregarious } + add = 10 + } + # Lustful characters are potentially in the market. + if = { + limit = { has_trait = gregarious } + add = 5 + } + } + # Create our new char. + save_scope_as = attraction_check + create_character = { + employer = root + age = { + value = scope:visitor.age + integer_range = { + min = -5 + max = 5 + } + min = 20 + max = 85 + } + gender_female_chance = scope_attraction_based_female_chance + culture = scope:visitor.host.capital_county.culture + faith = scope:visitor.host.capital_county.faith + dynasty = none + diplomacy = { + min_template_low_skill + max_template_medium_skill + } + martial = { + min_template_low_skill + max_template_medium_skill + } + stewardship = { + min_template_low_skill + max_template_medium_skill + } + intrigue = { + min_template_low_skill + max_template_medium_skill + } + learning = { + min_template_low_skill + max_template_medium_skill + } + prowess = { + min_template_low_skill + max_template_medium_skill + } + random_traits = no + # Education + random_traits_list = { + count = 1 + education_diplomacy_2 = {} + education_martial_2 = {} + education_stewardship_2 = {} + education_intrigue_2 = {} + education_learning_2 = {} + } + # Personality traits that match their partner + random_traits_list = { + count = 2 + lustful = { + trigger = { + scope:visitor = { has_trait = lustful } + } + } + chaste = { + trigger = { + scope:visitor = { has_trait = chaste } + } + } + gluttonous = { + trigger = { + scope:visitor = { has_trait = gluttonous } + } + } + temperate = { + trigger = { + scope:visitor = { has_trait = temperate } + } + } + greedy = { + trigger = { + scope:visitor = { has_trait = greedy } + } + } + generous = { + trigger = { + scope:visitor = { has_trait = generous } + } + } + lazy = { + trigger = { + scope:visitor = { has_trait = lazy } + } + } + diligent = { + trigger = { + scope:visitor = { has_trait = diligent } + } + } + wrathful = { + trigger = { + scope:visitor = { has_trait = wrathful } + } + } + calm = { + trigger = { + scope:visitor = { has_trait = calm } + } + } + patient = { + trigger = { + scope:visitor = { has_trait = patient } + } + } + impatient = { + trigger = { + scope:visitor = { has_trait = impatient } + } + } + arrogant = { + trigger = { + scope:visitor = { has_trait = arrogant } + } + } + humble = { + trigger = { + scope:visitor = { has_trait = humble } + } + } + deceitful = { + trigger = { + scope:visitor = { has_trait = deceitful } + } + } + honest = { + trigger = { + scope:visitor = { has_trait = honest } + } + } + craven = { + trigger = { + scope:visitor = { has_trait = craven } + } + } + brave = { + trigger = { + scope:visitor = { has_trait = brave } + } + } + shy = { + trigger = { + scope:visitor = { has_trait = shy } + } + } + gregarious = { + trigger = { + scope:visitor = { has_trait = gregarious } + } + } + ambitious = { + trigger = { + scope:visitor = { has_trait = ambitious } + } + } + content = { + trigger = { + scope:visitor = { has_trait = content } + } + } + arbitrary = { + trigger = { + scope:visitor = { has_trait = arbitrary } + } + } + just = { + trigger = { + scope:visitor = { has_trait = just } + } + } + cynical = { + trigger = { + scope:visitor = { has_trait = cynical } + } + } + zealous = { + trigger = { + scope:visitor = { has_trait = zealous } + } + } + paranoid = { + trigger = { + scope:visitor = { has_trait = paranoid } + } + } + trusting = { + trigger = { + scope:visitor = { has_trait = trusting } + } + } + compassionate = { + trigger = { + scope:visitor = { has_trait = compassionate } + } + } + callous = { + trigger = { + scope:visitor = { has_trait = callous } + } + } + sadistic = { + trigger = { + scope:visitor = { has_trait = sadistic } + } + } + stubborn = { + trigger = { + scope:visitor = { has_trait = stubborn } + } + } + fickle = { + trigger = { + scope:visitor = { has_trait = fickle } + } + } + vengeful = { + trigger = { + scope:visitor = { has_trait = vengeful } + } + } + forgiving = { + trigger = { + scope:visitor = { has_trait = forgiving } + } + } + eccentric = { + trigger = { + scope:visitor = { has_trait = eccentric } + } + } + } + # +1 random personality trait + random_traits_list = { + count = 1 + lustful = {} + chaste = {} + gluttonous = {} + temperate = {} + greedy = {} + generous = {} + lazy = {} + diligent = {} + wrathful = {} + calm = {} + patient = {} + impatient = {} + arrogant = {} + humble = {} + deceitful = {} + honest = {} + craven = {} + brave = {} + shy = {} + gregarious = {} + ambitious = {} + content = {} + arbitrary = {} + just = {} + cynical = {} + zealous = {} + paranoid = {} + trusting = {} + compassionate = {} + callous = {} + sadistic = {} + stubborn = {} + fickle = {} + vengeful = {} + forgiving = {} + eccentric = {} + } + # Somethings to spice 'em up. + random_traits_list = { + count = { 1 2 } + # Lifestyles + lifestyle_reveler = {} + lifestyle_blademaster = {} + lifestyle_hunter = {} + lifestyle_mystic = {} + lifestyle_physician = {} + lifestyle_herbalist = {} + lifestyle_gardener = {} + # Stress + drunkard = {} + rakish = {} + reclusive = {} + irritable = {} + flagellant = {} + profligate = {} + improvident = {} + contrite = {} + comfort_eater = {} + inappetetic = {} + journaller = {} + confider = {} + athletic = {} + # Fame + lifestyle_poet = {} + loyal = {} + disloyal = {} + gallowsbait = {} + # Health + depressed_genetic = {} + lunatic_genetic = {} + possessed_genetic = {} + one_eyed = {} + one_legged = {} + disfigured = {} + # Genetic + beauty_bad_1 = {} + beauty_good_1 = {} + intellect_bad_1 = {} + intellect_good_1 = {} + physique_bad_1 = {} + physique_good_1 = {} + clubfooted = {} + hunchbacked = {} + lisping = {} + stuttering = {} + dwarf = {} + giant = {} + spindly = {} + scaly = {} + albino = {} + wheezing = {} + bleeder = {} + infertile = {} + # Natural + fecund = {} + strong = {} + shrewd = {} + } + save_scope_as = visitor_spouse + after_creation = { set_sexuality = bisexual } + } + # Alright, now let's marry 'em up. + if = { + limit = { is_female = yes } + marry_matrilineal = scope:visitor_spouse + } + else = { marry = scope:visitor_spouse } + # Aaaand make sure that the marriage is a happy one. + hidden_effect = { + set_random_lover_reason = { TARGET = scope:visitor_spouse } + add_opinion = { + target = scope:visitor_spouse + modifier = love_opinion + opinion = 100 + } + reverse_add_opinion = { + target = scope:visitor_spouse + modifier = love_opinion + opinion = 100 + } + } + } + } + # And send 'em home. + return_to_court = yes + } + } + + # Welcome, welcome! + option = { + name = ep3_laamp_flavour_ewan.9511.a + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # _Married?_ I think not! + option = { + name = ep3_laamp_flavour_ewan.9511.b + trigger = { exists = scope:visitor_spouse } + + # Divorce. + scope:visitor = { divorce = scope:visitor_spouse } + # Banish them. + remove_courtier_or_guest = { + character = scope:visitor_spouse + new_location = scope:host.capital_county.title_province + } + # And apply some opinions. + scope:visitor = { + add_opinion = { + modifier = forced_divorce_opinion + target = root + } + } + scope:visitor_spouse = { + add_opinion = { + modifier = forced_divorce_opinion + target = root + } + } + + stress_impact = { + sadistic = major_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = major_stress_impact_gain + } + # The AI should never take this option. + ai_chance = { base = 0 } + } + + # You are no longer welcome with us. + option = { + name = ep3_laamp_flavour_ewan.9511.c + + scope:visitor = { select_and_move_to_pool_effect = yes } + + ep3_laamp_flavour_ewan_9511_standard_drive_away_char_stress_effect = yes + # The AI should never take this option. + ai_chance = { base = 0 } + } +} + +# Follower returns and they've learnt a thing or two. +ep3_laamp_flavour_ewan.9512 = { + type = character_event + title = ep3_laamp_flavour_ewan.9512.t + desc = ep3_laamp_flavour_ewan.9512.desc + theme = laamp + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:visitor + triggered_animation = { + trigger = { scope:skill = flag:diplomacy } + animation = chancellor + } + triggered_animation = { + trigger = { + OR = { + scope:skill = flag:martial + scope:skill = flag:prowess + } + } + animation = marshal + } + triggered_animation = { + trigger = { scope:skill = flag:stewardship } + animation = steward + } + triggered_animation = { + trigger = { scope:skill = flag:intrigue } + animation = spymaster + } + triggered_animation = { + trigger = { scope:skill = flag:learning } + animation = chaplain + } + animation = hero_flex + } + override_background = { reference = ep3_campfire } + + immediate = { + scope:visitor = { + # Sort how much skill we'll be adding. + save_scope_value_as = { + name = skill_gain + value = { + integer_range = { + min = 2 + max = 4 + } + if = { + limit = { has_trait = diligent } + add = 1 + } + else_if = { + limit = { has_trait = lazy } + add = -1 + } + } + } + # Now add it to the highest skill that scope:visitor has. + switch = { + trigger = highest_skill + diplomacy = { add_diplomacy_skill = scope:skill_gain } + martial = { add_martial_skill = scope:skill_gain } + stewardship = { add_stewardship_skill = scope:skill_gain } + intrigue = { add_intrigue_skill = scope:skill_gain } + learning = { add_learning_skill = scope:skill_gain } + } + # Finally, return them to court. + return_to_court = yes + } + } + + # How you've improved, scope:visitor! + option = { + name = ep3_laamp_flavour_ewan.9512.a + + # No effect. + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Begone, vagabond. + option = { + name = ep3_laamp_flavour_ewan.9512.b + + scope:visitor = { select_and_move_to_pool_effect = yes } + + ep3_laamp_flavour_ewan_9511_standard_drive_away_char_stress_effect = yes + # The AI should never take this option. + ai_chance = { base = 0 } + } +} + +################################################## +# Not As I Remember You +# by Ewan Cowhig Croft +# 9521 - 9530 +################################################## + +scripted_effect ep3_laamp_flavour_ewan_9521_change_visitor_culture_effect = { + scope:visitor = { + culture = { save_scope_as = old_culture } + random_list = { + 100 = { + trigger = { + this != host.culture + } + set_culture = host.culture + save_scope_value_as = { + name = culture_change + value = flag:host + } + } + 100 = { + trigger = { + this != host.capital_county.culture + } + set_culture = host.capital_county.culture + save_scope_value_as = { + name = culture_change + value = flag:capital + } + } + } + culture = { save_scope_as = new_culture } + } +} + +scripted_effect ep3_laamp_flavour_ewan_9521_register_culture_change_reaction_effect = { + # Sort our reactions. + ## They changed away from our culture. + if = { + limit = { culture = scope:old_culture } + save_scope_value_as = { + name = culture_reaction + value = flag:changed_away + } + } + ## They changed _to_ our culture. + else_if = { + limit = { culture = scope:new_culture } + save_scope_value_as = { + name = culture_reaction + value = flag:changed_to + } + } + ## They simply changed culture. + else = { + save_scope_value_as = { + name = culture_reaction + value = flag:uninvolved + } + } +} + +scripted_effect ep3_laamp_flavour_ewan_9521_apply_ethos_skill_bonuses_effect = { + # They've learnt a lot from their new ethos (even if it was the same as their old one). + ## First, randomise our values. + save_scope_value_as = { + name = skill_2 + value = { + integer_range = { + min = 2 + max = 5 + } + } + } + save_scope_value_as = { + name = skill_1 + value = { + integer_range = { + min = { + value = scope:skill_2 + add = 1 + } + max = 6 + } + } + } + ## Then apply them. + switch = { + trigger = has_cultural_pillar + ethos_bellicose = { + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.primary_skill.martial + add_martial_skill = scope:skill_1 + } + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.secondary_skill.prowess + add_prowess_skill = scope:skill_2 + } + } + ethos_stoic = { + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.primary_skill.martial + add_martial_skill = scope:skill_1 + } + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.secondary_skill.stewardship + add_stewardship_skill = scope:skill_2 + } + } + ethos_bureaucratic = { + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.primary_skill.stewardship + add_stewardship_skill = scope:skill_1 + } + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.secondary_skill.learning + add_learning_skill = scope:skill_2 + } + } + ethos_spiritual = { + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.primary_skill.learning + add_learning_skill = scope:skill_1 + } + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.secondary_skill.diplomacy + add_diplomacy_skill = scope:skill_2 + } + } + ethos_courtly = { + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.primary_skill.diplomacy + add_diplomacy_skill = scope:skill_1 + } + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.secondary_skill.intrigue + add_intrigue_skill = scope:skill_2 + } + } + ethos_egalitarian = { + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.primary_skill.diplomacy + add_diplomacy_skill = scope:skill_1 + } + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.secondary_skill.stewardship + add_stewardship_skill = scope:skill_2 + } + } + ethos_communal = { + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.primary_skill.stewardship + add_stewardship_skill = scope:skill_1 + } + custom_tooltip = { + text = ep3_laamp_flavour_ewan.9521.tt.secondary_skill.learning + add_learning_skill = scope:skill_2 + } + } + } +} + +# Follower has taken on the culture of the place they stayed at. +ep3_laamp_flavour_ewan.9521 = { + type = character_event + title = ep3_laamp_flavour_ewan.9521.t + desc = { + desc = ep3_laamp_flavour_ewan.9521.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:culture_change = flag:host } + desc = ep3_laamp_flavour_ewan.9521.desc.source.host + } + triggered_desc = { + trigger = { scope:culture_change = flag:capital } + desc = ep3_laamp_flavour_ewan.9521.desc.source.capital + } + } + first_valid = { + triggered_desc = { + trigger = { scope:culture_reaction = flag:changed_away } + desc = ep3_laamp_flavour_ewan.9521.desc.reaction.changed_away + } + triggered_desc = { + trigger = { scope:culture_reaction = flag:changed_to } + desc = ep3_laamp_flavour_ewan.9521.desc.reaction.changed_to + } + triggered_desc = { + trigger = { scope:culture_reaction = flag:uninvolved } + desc = ep3_laamp_flavour_ewan.9521.desc.reaction.uninvolved + } + } + desc = ep3_laamp_flavour_ewan.9521.desc.outro + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { scope:culture_reaction = flag:changed_away } + animation = shock + } + triggered_animation = { + trigger = { scope:culture_reaction = flag:changed_to } + animation = admiration + } + triggered_animation = { + trigger = { scope:culture_reaction = flag:uninvolved } + animation = personality_forgiving + } + } + right_portrait = { + character = scope:visitor + animation = personality_bold + } + override_background = { reference = ep3_campfire } + + immediate = { + # Configure scope:visitor's culture change. + ep3_laamp_flavour_ewan_9521_change_visitor_culture_effect = yes + # Sort our reactions. + ep3_laamp_flavour_ewan_9521_register_culture_change_reaction_effect = yes + # They've learnt a lot from their new ethos (even if it was the same as their old one). + ep3_laamp_flavour_ewan_9521_apply_ethos_skill_bonuses_effect = yes + # Bring them home. + scope:visitor = { return_to_court = yes } + } + + # Accept them back. + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:culture_reaction = flag:changed_away } + desc = ep3_laamp_flavour_ewan.9521.a.changed_away + } + triggered_desc = { + trigger = { scope:culture_reaction = flag:changed_to } + desc = ep3_laamp_flavour_ewan.9521.a.changed_to + } + triggered_desc = { + trigger = { scope:culture_reaction = flag:uninvolved } + desc = ep3_laamp_flavour_ewan.9521.a.uninvolved + } + } + } + } + + # No effects. + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # You're not wanted any more, scope:visitor. + option = { + name = ep3_laamp_flavour_ewan.9521.b + + scope:visitor = { select_and_move_to_pool_effect = yes } + + ep3_laamp_flavour_ewan_9511_standard_drive_away_char_stress_effect = yes + # The AI should never take this option. + ai_chance = { base = 0 } + } +} + +scripted_effect ep3_laamp_flavour_ewan_9522_change_visitor_faith_effect = { + scope:visitor = { + faith = { save_scope_as = old_faith } + random_list = { + 100 = { + trigger = { + this != host.faith + } + set_character_faith = host.faith + save_scope_value_as = { + name = faith_change + value = flag:host + } + } + 100 = { + trigger = { + this != host.capital_county.faith + } + set_character_faith = host.capital_county.faith + save_scope_value_as = { + name = faith_change + value = flag:capital + } + } + } + faith = { save_scope_as = new_faith } + } +} + +scripted_effect ep3_laamp_flavour_ewan_9522_register_faith_change_reaction_effect = { + # Sort our reactions. + ## We are cynical. + if = { + limit = { has_trait = cynical } + save_scope_value_as = { + name = faith_reaction + value = flag:give_a_shit + } + } + ## They changed away from our faith. + if = { + limit = { faith = scope:old_faith } + save_scope_value_as = { + name = faith_reaction + value = flag:changed_away + } + } + ## They changed _to_ our faith. + else_if = { + limit = { faith = scope:new_faith } + save_scope_value_as = { + name = faith_reaction + value = flag:changed_to_ours + } + } + ## They changed to a faith we love. + else_if = { + limit = { faith = scope:new_faith } + save_scope_value_as = { + name = faith_reaction + value = flag:changed_to_lovable + } + } + ## They changed to a faith we tolerate. + else_if = { + limit = { faith = scope:new_faith } + save_scope_value_as = { + name = faith_reaction + value = flag:changed_to_acceptable + } + } + ## They simply changed faith. + else = { + save_scope_value_as = { + name = faith_reaction + value = flag:uninvolved + } + } +} + +# Follower has taken on the faith of the place they stayed at. +ep3_laamp_flavour_ewan.9522 = { + type = character_event + title = ep3_laamp_flavour_ewan.9522.t + desc = { + desc = ep3_laamp_flavour_ewan.9522.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:faith_change = flag:host } + desc = ep3_laamp_flavour_ewan.9522.desc.source.host + } + triggered_desc = { + trigger = { scope:faith_change = flag:capital } + desc = ep3_laamp_flavour_ewan.9522.desc.source.capital + } + } + desc = ep3_laamp_flavour_ewan.9522.desc.source.bridge + first_valid = { + triggered_desc = { + trigger = { scope:faith_reaction = flag:give_a_shit } + desc = ep3_laamp_flavour_ewan.9522.desc.reaction.give_a_shit + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:changed_away } + desc = ep3_laamp_flavour_ewan.9522.desc.reaction.changed_away + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:changed_to_ours } + desc = ep3_laamp_flavour_ewan.9522.desc.reaction.changed_to_ours + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:changed_to_lovable } + desc = ep3_laamp_flavour_ewan.9522.desc.reaction.changed_to_lovable + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:changed_to_acceptable } + desc = ep3_laamp_flavour_ewan.9522.desc.reaction.changed_to_acceptable + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:uninvolved } + desc = ep3_laamp_flavour_ewan.9522.desc.reaction.uninvolved + } + } + desc = ep3_laamp_flavour_ewan.9522.desc.outro + } + theme = laamp + left_portrait = { + character = root + triggered_animation = { + trigger = { scope:faith_reaction = flag:give_a_shit } + animation = dismissal + } + triggered_animation = { + trigger = { scope:faith_reaction = flag:changed_away } + animation = shock + } + triggered_animation = { + trigger = { + OR = { + scope:faith_reaction = flag:changed_to_ours + scope:faith_reaction = flag:changed_to_lovable + scope:faith_reaction = flag:changed_to_acceptable + } + } + animation = admiration + } + triggered_animation = { + trigger = { scope:faith_reaction = flag:uninvolved } + animation = personality_forgiving + } + } + right_portrait = { + character = scope:visitor + animation = personality_zealous + } + override_background = { reference = ep3_campfire } + + immediate = { + # Configure scope:visitor's faith change. + ep3_laamp_flavour_ewan_9522_change_visitor_faith_effect = yes + # Sort our reactions. + ep3_laamp_flavour_ewan_9522_register_faith_change_reaction_effect = yes + # The conversion process involves a lot of education. + scope:visitor = { + add_learning_skill = { + integer_range = { + min = 3 + max = 8 + } + } + } + # Bring them home. + scope:visitor = { return_to_court = yes } + } + + # Zealous, same faith: welcome, SisterBrother! + option = { + name = ep3_laamp_flavour_ewan.9522.a + trigger = { + has_trait = zealous + faith = scope:visitor.faith + } + trait = zealous + + add_piety = minor_piety_gain + + stress_impact = { zealous = minor_stress_impact_loss } + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Zealous, other: But why convert to scope:new_faith... + option = { + name = ep3_laamp_flavour_ewan.9522.b + trigger = { + has_trait = zealous + NOR = { + faith = scope:visitor.faith + faith = scope:old_faith + } + } + trait = zealous + + # No effects. + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Zealous, converted away: What have you done, you fool?! + option = { + name = ep3_laamp_flavour_ewan.9522.c + trigger = { + has_trait = zealous + faith = scope:old_faith + } + trait = zealous + + # No effects. + + stress_impact = { zealous = minor_stress_impact_gain } + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Cynical: scope:old_faith, scope:new_faith, you're still scope:visitor to me. + option = { + name = ep3_laamp_flavour_ewan.9522.d + trigger = { has_trait = cynical } + + reverse_add_opinion = { + target = scope:visitor + modifier = respect_opinion + opinion = 50 + } + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:visitor } + } + set_relation_potential_friend = scope:visitor + } + + stress_impact = { cynical = medium_stress_impact_loss } + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Good to have you back, scope:visitor. + option = { + name = ep3_laamp_flavour_ewan.9522.e + trigger = { + NOR = { + has_trait = zealous + has_trait = cynical + } + } + + # No effect. + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # You are no longer welcome here. + option = { + name = ep3_laamp_flavour_ewan.9522.f + + scope:visitor = { select_and_move_to_pool_effect = yes } + + ep3_laamp_flavour_ewan_9511_standard_drive_away_char_stress_effect = yes + # The AI should never take this option. + ai_chance = { base = 0 } + } +} + +# Follower has taken on the faith and culture of the place they stayed at. +ep3_laamp_flavour_ewan.9523 = { + type = character_event + title = ep3_laamp_flavour_ewan.9523.t + desc = { + desc = ep3_laamp_flavour_ewan.9523.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:faith_change = flag:host } + desc = ep3_laamp_flavour_ewan.9523.desc.source.host + } + triggered_desc = { + trigger = { scope:faith_change = flag:capital } + desc = ep3_laamp_flavour_ewan.9523.desc.source.capital + } + } + desc = ep3_laamp_flavour_ewan.9523.desc.source.bridge + first_valid = { + triggered_desc = { + trigger = { scope:faith_reaction = flag:give_a_shit } + desc = ep3_laamp_flavour_ewan.9523.desc.reaction.give_a_shit + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:changed_away } + desc = ep3_laamp_flavour_ewan.9523.desc.reaction.changed_away + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:changed_to_ours } + desc = ep3_laamp_flavour_ewan.9523.desc.reaction.changed_to_ours + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:changed_to_lovable } + desc = ep3_laamp_flavour_ewan.9523.desc.reaction.changed_to_lovable + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:changed_to_acceptable } + desc = ep3_laamp_flavour_ewan.9523.desc.reaction.changed_to_acceptable + } + triggered_desc = { + trigger = { scope:faith_reaction = flag:uninvolved } + desc = ep3_laamp_flavour_ewan.9523.desc.reaction.uninvolved + } + } + desc = ep3_laamp_flavour_ewan.9523.desc.outro + } + theme = laamp + # We dupe the faith logic for portraits, because it's the more important of the two & because _Jesus H. Christ_ the permutations otherwise. + left_portrait = { + character = root + triggered_animation = { + trigger = { scope:faith_reaction = flag:give_a_shit } + animation = dismissal + } + triggered_animation = { + trigger = { scope:faith_reaction = flag:changed_away } + animation = shock + } + triggered_animation = { + trigger = { + OR = { + scope:faith_reaction = flag:changed_to_ours + scope:faith_reaction = flag:changed_to_lovable + scope:faith_reaction = flag:changed_to_acceptable + } + } + animation = admiration + } + triggered_animation = { + trigger = { scope:faith_reaction = flag:uninvolved } + animation = personality_forgiving + } + } + right_portrait = { + character = scope:visitor + animation = personality_zealous + } + override_background = { reference = ep3_campfire } + + immediate = { + # Configure scope:visitor's changes. + ## Culture. + ep3_laamp_flavour_ewan_9521_change_visitor_culture_effect = yes + ## Faith. + ep3_laamp_flavour_ewan_9522_change_visitor_faith_effect = yes + # Sort our reactions. + ## Culture. + ep3_laamp_flavour_ewan_9521_register_culture_change_reaction_effect = yes + ## Faith. + ep3_laamp_flavour_ewan_9522_register_faith_change_reaction_effect = yes + # They've learnt a lot from their new ethos (even if it was the same as their old one). + ## Ignore a bonus from conversion — they're already getting a substantial one from this change that's more flavourful. + ep3_laamp_flavour_ewan_9521_apply_ethos_skill_bonuses_effect = yes + # Bring them home. + scope:visitor = { return_to_court = yes } + } + + # Zealous, same faith: welcome, SisterBrother! + option = { + name = ep3_laamp_flavour_ewan.9523.a + trigger = { + has_trait = zealous + faith = scope:visitor.faith + } + trait = zealous + + add_piety = minor_piety_gain + + stress_impact = { zealous = minor_stress_impact_loss } + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Zealous, other: But why convert to scope:new_faith... + option = { + name = ep3_laamp_flavour_ewan.9523.b + trigger = { + has_trait = zealous + NOR = { + faith = scope:visitor.faith + faith = scope:old_faith + } + } + trait = zealous + + # No effects. + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Zealous, converted away: What have you done, you fool?! + option = { + name = ep3_laamp_flavour_ewan.9523.c + trigger = { + has_trait = zealous + faith = scope:old_faith + } + trait = zealous + + # No effects. + + stress_impact = { zealous = minor_stress_impact_gain } + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Cynical: scope:old_faith, scope:new_faith, you're still scope:visitor to me. + option = { + name = ep3_laamp_flavour_ewan.9523.d + trigger = { has_trait = cynical } + + reverse_add_opinion = { + target = scope:visitor + modifier = respect_opinion + opinion = 50 + } + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:visitor } + } + set_relation_potential_friend = scope:visitor + } + + stress_impact = { cynical = medium_stress_impact_loss } + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Good to have you back, scope:visitor. + option = { + name = ep3_laamp_flavour_ewan.9523.e + trigger = { + NOR = { + has_trait = zealous + has_trait = cynical + } + } + + # No effect. + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # You are no longer welcome here. + option = { + name = ep3_laamp_flavour_ewan.9523.f + + scope:visitor = { select_and_move_to_pool_effect = yes } + + ep3_laamp_flavour_ewan_9511_standard_drive_away_char_stress_effect = yes + # The AI should never take this option. + ai_chance = { base = 0 } + } +} + +################################################## +# Missing Follower +# by Ewan Cowhig Croft +# 9531 - 9540 +################################################## + +# Follower has died whilst away from camp. +ep3_laamp_flavour_ewan.9531 = { + type = character_event + title = ep3_laamp_flavour_ewan.9531.t + desc = ep3_laamp_flavour_ewan.9531.desc + theme = laamp + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:visitor + animation = map_fear + } + override_background = { reference = ep3_campfire } + + trigger = { + # Make sure that this isn't a character who we would've been informed about the death of already (i.e., a spouse or family — relations are lost on death already so we have to bite the bullet there without doing something awful with variables). + NOR = { + is_spouse_of_even_if_dead = scope:visitor + is_close_or_extended_family_of = scope:visitor + } + } + + immediate = { + custom_tooltip = ep3_laamp_flavour_ewan.9531.tt.follower_is_dead + hidden_effect = { + scope:visitor = { return_to_court = yes } + } + } + + # To think we shall never see HerHim again... + option = { + name = ep3_laamp_flavour_ewan.9531.a + + # No effect. + + # No stress here. + # The AI should only take this if it's the _only_ option. + ai_chance = { base = 0 } + } + + # Callous: eh. + option = { + name = ep3_laamp_flavour_ewan.9531.b + trigger = { has_trait = callous } + trait = callous + + stress_impact = { callous = major_stress_impact_loss } + # If you're callous, take the stress loss. + ai_chance = { base = 100 } + } +} + +# Follower has been imprisoned away from camp. +ep3_laamp_flavour_ewan.9532 = { + type = character_event + title = ep3_laamp_flavour_ewan.9532.t + desc = ep3_laamp_flavour_ewan.9532.desc + theme = laamp + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:visitor + animation = prisondungeon + } + override_background = { reference = ep3_campfire } + + trigger = { + root != scope:visitor.imprisoner + } + + on_trigger_fail = { + scope:visitor = { return_to_court = yes } + } + + immediate = { + scope:visitor.imprisoner = { save_scope_as = imprisoner } + show_as_tooltip = { + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:visitor + IMPRISONER = scope:imprisoner + } + } + hidden_effect = { + scope:visitor = { return_to_court = yes } + } + } + + # We must free scope:visitor! + option = { + name = ep3_laamp_flavour_ewan.9532.a + + # No effects. + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Scope:imprisoner can keep HerHim for all I care. + option = { + name = ep3_laamp_flavour_ewan.9532.b + + remove_courtier_or_guest = scope:visitor + + ep3_laamp_flavour_ewan_9511_standard_drive_away_char_stress_effect = yes + # The AI should never take this option. + ai_chance = { base = 0 } + } +} + +# Follower has become incapable whilst away from camp. +ep3_laamp_flavour_ewan.9533 = { + type = character_event + title = ep3_laamp_flavour_ewan.9533.t + desc = ep3_laamp_flavour_ewan.9533.desc + theme = laamp + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:visitor + animation = paranoia + } + override_background = { reference = ep3_campfire } + + immediate = { + custom_tooltip = ep3_laamp_flavour_ewan.9533.tt.follower_is_incapable + scope:visitor = { return_to_court = yes } + } + + # What on Earth happened to HerHim? + option = { + name = ep3_laamp_flavour_ewan.9533.a + trigger = { + NOT = { has_trait = compassionate } + } + + # No effect. + + # No stress here. + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Compassionate: worry not, scope:visitor, we shall care for you. + option = { + name = ep3_laamp_flavour_ewan.9533.b + trigger = { has_trait = compassionate } + trait = compassionate + + reverse_add_opinion = { + target = scope:visitor + modifier = feast_helped_me_opinion + opinion = 50 + } + every_courtier = { + custom = custom.every_non_callous_or_sadistic_follower + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + + stress_impact = { compassionate = major_stress_impact_loss } + # The AI should always just uncritically take people back. + ai_chance = { base = 100 } + } + + # Drive this imbecile away. + option = { + name = ep3_laamp_flavour_ewan.9533.c + + scope:visitor = { select_and_move_to_pool_effect = yes } + + ep3_laamp_flavour_ewan_9511_standard_drive_away_char_stress_effect = yes + # The AI should never take this option. + ai_chance = { base = 0 } + } +} + +# Follower never comes home. +ep3_laamp_flavour_ewan.9534 = { + type = character_event + title = ep3_laamp_flavour_ewan.9534.t + desc = ep3_laamp_flavour_ewan.9534.desc + theme = laamp + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:visitor + animation = map_disbelief + } + override_background = { reference = ep3_campfire } + + immediate = { + custom_tooltip = ep3_laamp_flavour_ewan.9534.tt.follower_is_lost + hidden_effect = { + remove_courtier_or_guest = { + character = scope:visitor + new_location = scope:visitor.location + } + } + } + + # I wonder what could have happened to HerHim... + option = { + name = ep3_laamp_flavour_ewan.9534.a + + # No effects. + + # No stress, no AI. + } +} + +################################################## +# Camp Activity Feed Message +# by Ewan Cowhig Croft +# 9541 - 9550 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = { + is_adult = yes + is_available_allow_travelling = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_9541_valid_nicknameable_courtier_trigger = { + ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes + has_any_nickname = no +} + +scripted_trigger ep3_laamp_flavour_ewan_9541_valid_dog_courtier_trigger = { + ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes + ep3_laamp_flavour_ewan_no_dog_trigger = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_9541_valid_cat_courtier_trigger = { + ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes + ep3_laamp_flavour_ewan_no_cat_trigger = yes +} + +scripted_trigger ep3_laamp_flavour_ewan_9541_valid_potential_friend_courtier_trigger = { + this != scope:follower_1 + ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes + "trait_compatibility(scope:follower_1)" >= low_positive_trait_compatibility + NOT = { + has_important_relationship_with_character_trigger = { CHARACTER = scope:follower_1 } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_9541_valid_potential_rival_courtier_trigger = { + this != scope:follower_1 + ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes + "trait_compatibility(scope:follower_1)" <= low_negative_trait_compatibility + NOT = { + has_important_relationship_with_character_trigger = { CHARACTER = scope:follower_1 } + } +} + +scripted_trigger ep3_laamp_flavour_ewan_9541_valid_stressed_courtier_trigger = { + ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes + stress >= 1 +} + +# Something minor happens at camp. +ep3_laamp_flavour_ewan.9541 = { + hidden = yes + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_9541 } + } + # Plus make sure _someone_ is valid for something. + any_courtier = { ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes } + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_9541 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_9541 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_shorter + } + } + # Grab a courtier for our relation effect triggers. + random_courtier = { + limit = { ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes } + save_scope_as = follower_1 + } + # Right, determine what's going to be happening. + random_list = { + # Nicknames. + 500 = { + trigger = { + any_courtier = { ep3_laamp_flavour_ewan_9541_valid_nicknameable_courtier_trigger = yes } + } + random_courtier = { + limit = { ep3_laamp_flavour_ewan_9541_valid_nicknameable_courtier_trigger = yes } + weight = { laamp_weight_up_minor_chars_modifier = yes } + save_scope_as = eponymee + } + hidden_effect = { + scope:eponymee = { + assign_random_nickname_effect = yes + hidden_effect = { + if = { + limit = { + has_any_nickname = no + } + set_random_negative_nickname_effect = yes + } + } + } + } + send_interface_message = { + type = event_camp_follower_with_text + title = ep3_laamp_flavour_ewan.9541.t.nickname_gained + desc = ep3_laamp_flavour_ewan.9541.desc.nickname_gained + left_icon = scope:eponymee + } + } + # Dogs. + 75 = { + trigger = { + any_courtier = { ep3_laamp_flavour_ewan_9541_valid_dog_courtier_trigger = yes } + } + random_courtier = { + limit = { ep3_laamp_flavour_ewan_9541_valid_dog_courtier_trigger = yes } + weight = { laamp_weight_up_minor_chars_modifier = yes } + save_scope_as = pet_owner + } + send_interface_message = { + type = event_camp_follower_with_text + title = ep3_laamp_flavour_ewan.9541.t.dog_gained + desc = ep3_laamp_flavour_ewan.9541.desc.dog_gained + left_icon = scope:pet_owner + scope:pet_owner = { start_dog_story_cycle_effect = yes } + } + } + # Cats. + 100 = { + trigger = { + any_courtier = { ep3_laamp_flavour_ewan_9541_valid_cat_courtier_trigger = yes } + } + random_courtier = { + limit = { ep3_laamp_flavour_ewan_9541_valid_cat_courtier_trigger = yes } + weight = { laamp_weight_up_minor_chars_modifier = yes } + save_scope_as = pet_owner + } + send_interface_message = { + type = event_camp_follower_with_text + title = ep3_laamp_flavour_ewan.9541.t.cat_gained + desc = ep3_laamp_flavour_ewan.9541.desc.cat_gained + left_icon = scope:pet_owner + scope:pet_owner = { start_cat_story_cycle_effect = yes } + } + } + # Opinions & potential friends. + 100 = { + trigger = { + any_courtier = { ep3_laamp_flavour_ewan_9541_valid_potential_friend_courtier_trigger = yes } + } + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_9541_valid_potential_friend_courtier_trigger = yes } + order_by = "trait_compatibility(scope:follower_1)" + save_scope_as = follower_2 + } + send_interface_message = { + type = event_camp_follower_with_text + title = ep3_laamp_flavour_ewan.9541.t.opinion_gained + desc = ep3_laamp_flavour_ewan.9541.desc.opinion_gained + left_icon = scope:follower_1 + right_icon = scope:follower_2 + scope:follower_1 = { + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:follower_2 } + } + set_relation_potential_friend = scope:follower_2 + } + add_opinion = { + target = scope:follower_2 + modifier = friendliness_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = friendliness_opinion + opinion = 30 + } + } + } + } + # Opinions & potential rivals. + 100 = { + trigger = { + any_courtier = { ep3_laamp_flavour_ewan_9541_valid_potential_rival_courtier_trigger = yes } + } + ordered_courtier = { + limit = { ep3_laamp_flavour_ewan_9541_valid_potential_rival_courtier_trigger = yes } + order_by = "trait_compatibility(scope:follower_1)" + save_scope_as = follower_2 + } + send_interface_message = { + type = event_camp_follower_with_text + title = ep3_laamp_flavour_ewan.9541.t.opinion_lost + desc = ep3_laamp_flavour_ewan.9541.desc.opinion_lost + left_icon = scope:follower_1 + right_icon = scope:follower_2 + scope:follower_1 = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:follower_2 } + } + set_relation_potential_rival = scope:follower_2 + } + add_opinion = { + target = scope:follower_2 + modifier = irritated_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:follower_2 + modifier = irritated_opinion + opinion = -30 + } + } + } + } + # Gain stress. + ## Largely here as a fallback — not that interesting so we weight it down reaaaalll good. + 5 = { + trigger = { + any_courtier = { ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes } + } + random_courtier = { + limit = { ep3_laamp_flavour_ewan_9541_suitable_courtier_trigger = yes } + weight = { laamp_weight_up_minor_chars_modifier = yes } + save_scope_as = stressee + } + send_interface_message = { + type = event_camp_follower_with_text + title = ep3_laamp_flavour_ewan.9541.t.stress_gained + desc = ep3_laamp_flavour_ewan.9541.desc.stress_gained + left_icon = scope:stressee + scope:stressee = { + random_list = { + 20 = { add_stress = minor_stress_gain } + 60 = { add_stress = medium_stress_gain } + 20 = { add_stress = major_stress_gain } + } + } + } + } + # Lose stress. + 120 = { + trigger = { + any_courtier = { ep3_laamp_flavour_ewan_9541_valid_stressed_courtier_trigger = yes } + } + random_courtier = { + limit = { ep3_laamp_flavour_ewan_9541_valid_stressed_courtier_trigger = yes } + save_scope_as = stressee + } + send_interface_message = { + type = event_camp_follower_with_text + title = ep3_laamp_flavour_ewan.9541.t.stress_lost + desc = ep3_laamp_flavour_ewan.9541.desc.stress_lost + left_icon = scope:stressee + scope:stressee = { + random_list = { + 10 = { add_stress = minor_stress_loss } + 60 = { add_stress = medium_stress_loss } + 30 = { add_stress = major_stress_loss } + } + } + } + } + } + } +} + +################################################## +# AI Laamp Converts +# by Ewan Cowhig Croft +# 9551 - 9560 +################################################## + +scripted_trigger ep3_laamp_flavour_ewan_9551_character_would_go_idea_shopping_trigger = { + NOR = { + has_character_flag = ai_will_not_convert + has_trait = faith_warrior + has_trait = crusader_king + has_trait = stubborn + faith = location.faith + } + # Religious characters compare what faiths fit them best. + OR = { + # Non-zealous characters will consider a switch if they're not virtuous but would be in a new faith. + AND = { + NOT = { has_trait = zealous } + num_virtuous_traits = { + value <= 0 + target = faith + } + ep3_laamp_flavour_ewan_9501_faith_sin_virtue_check_trigger = { FAITH = location.faith } + } + # Zealous characters will _also_ switch, but also need to feel like they're sinful in their current faith. + AND = { + has_trait = zealous + num_sinful_traits = { + value >= 1 + target = faith + } + num_virtuous_traits = { + value <= 0 + target = faith + } + ep3_laamp_flavour_ewan_9501_faith_sin_virtue_check_trigger = { FAITH = location.faith } + } + # Cynical characters will gladly convert to whatever, provided they feel it suits them. + AND = { + has_trait = cynical + NOR = { + has_trait = arrogant + has_trait = stubborn + } + } + } + # Just rule out the inevitable modded HoF laamps from trying to abandon their faith. + NOT = { faith.religious_head ?= root } +} + +# AI laamps convert to various local faiths. +ep3_laamp_flavour_ewan.9551 = { + hidden = yes + + trigger = { + # DLC check. + has_ep3_dlc_trigger = yes + # Standard checks. + is_adult = yes + is_available_allow_travelling = yes + # Make sure we're on dry land. + is_location_valid_for_travel_event_on_land = yes + # Laamps use title cooldowns, to help trim down repeats when succession happens. + primary_title = { + NOT = { has_variable = had_ep3_laamp_flavour_ewan_9551 } + } + # Now make sure that we'd actually convert. + ## Never convert reformed to unreformed without good reason. + location.faith = { + OR = { + NOT = { has_doctrine_parameter = unreformed } + AND = { + has_doctrine_parameter = unreformed + root.faith = { has_doctrine_parameter = unreformed } + } + root = { has_trait = eccentric } + } + } + ## General validity checks. + ep3_laamp_flavour_ewan_9551_character_would_go_idea_shopping_trigger = yes + # AI-only. + is_ai = yes + } + + immediate = { + if = { + limit = { enable_debug_laamp_event_logging_toggle_trigger = yes } + increment_global_variable_effect = { + VAR = tally_lfe_9551 + VAL = 1 + } + } + # Set our cooldown. + primary_title = { + set_variable = { + name = had_ep3_laamp_flavour_ewan_9551 + value = yes + years = @ep3_laamp_flavour_ewan_event_cooldown_longest + } + } + # And convert our character. + set_character_faith_with_conversion = location.faith + } +} + + + + + + + + + + + +################################################## +# MAINTENANCE + +# Range 9801+ reserved for w/e lil management events might turn up. diff --git a/N3OW/events/dlc/ep3/ep3_laamps_provisions.txt b/N3OW/events/dlc/ep3/ep3_laamps_provisions.txt new file mode 100644 index 00000000..2d6d3431 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_laamps_provisions.txt @@ -0,0 +1,1157 @@ +namespace = ep3_laamps_provisions + +scripted_trigger domicile_provisions_medium_to_low_trigger = { + domicile = { + provisions <= provisions_privation_threshold_start + provisions > provisions_privation_threshold_low + } +} +scripted_trigger domicile_provisions_low_to_very_low_trigger = { + domicile = { + provisions <= provisions_privation_threshold_low + provisions > provisions_privation_threshold_very_low + } +} +scripted_trigger domicile_provisions_very_low_to_zero_trigger = { + domicile = { + provisions <= provisions_privation_threshold_very_low + provisions > provisions_privation_threshold_empty + } +} + +scripted_trigger char_resistant_to_privation_in_desert_trigger = { + OR = { + has_trait = desert_warrior + culture = { has_cultural_parameter = resistant_to_desert_privation } + } +} +scripted_trigger char_resistant_to_privation_in_mountains_trigger = { + OR = { + has_trait = rough_terrain_expert + culture = { has_cultural_parameter = resistant_to_mountain_privation } + } +} +scripted_trigger char_resistant_to_privation_in_desert_mountains_trigger = { + OR = { + # Desert mountains are especially harsh, so yes, you need both. + AND = { + has_trait = desert_warrior + has_trait = rough_terrain_expert + } + culture = { + has_cultural_parameter = resistant_to_desert_privation + has_cultural_parameter = resistant_to_mountain_privation + } + } +} +scripted_trigger char_resistant_to_privation_in_winter_trigger = { + OR = { + has_trait = winter_soldier + culture = { has_cultural_parameter = resistant_to_winter_privation } + } +} + +scripted_effect apply_privation_event_cooldown_effect = { + # In a desert. + if = { + limit = { + location = { terrain = desert } + # Some characters give you a _degree_ of immunity. + char_resistant_to_privation_in_desert_trigger = no + scope:host.court_position:quartermaster_camp_officer ?= { char_resistant_to_privation_in_desert_trigger = no } + } + } + # In the mountains. + else_if = { + limit = { + location = { terrain = mountains } + # Some characters give you a _degree_ of immunity. + char_resistant_to_privation_in_mountains_trigger = no + scope:host.court_position:quartermaster_camp_officer ?= { char_resistant_to_privation_in_mountains_trigger = no } + } + } + # In desert mountains. + else_if = { + limit = { + location = { terrain = desert_mountains } + # Some characters give you a _degree_ of immunity. + char_resistant_to_privation_in_desert_mountains_trigger = no + scope:host.court_position:quartermaster_camp_officer ?= { char_resistant_to_privation_in_desert_mountains_trigger = no } + } + } + # In extreme winter. + else_if = { + limit = { + location = { has_province_modifier = winter_harsh_modifier } + # Some characters give you a _degree_ of immunity. + char_resistant_to_privation_in_winter_trigger = no + scope:host.court_position:quartermaster_camp_officer ?= { char_resistant_to_privation_in_winter_trigger = no } + } + } + # Aaaaand if we pass through all those, _then_ add our cooldown. + else = { + add_character_flag = { + flag = provision_events_cooldown + months = 3 + } + } +} + +# Medium provisions - people are concerned +ep3_laamps_provisions.1000 = { + type = character_event + title = ep3_laamps_provisions.1000.t + desc = ep3_laamps_provisions.1000.desc + theme = travel + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:concerned + animation = worry + } + + trigger = { + domicile_provisions_medium_to_low_trigger = yes + NOT = { + has_character_flag = provision_events_cooldown + } + any_courtier_or_guest = { + age >= 12 + NOT = { has_character_flag = concerned_cooldown } + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + random_courtier_or_guest = { + limit = { + age >= 12 + NOT = { has_character_flag = concerned_cooldown } + is_of_major_interest_trigger = { CHARACTER = root } + } + alternative_limit = { + age >= 12 + NOT = { has_character_flag = concerned_cooldown } + is_of_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { + age >= 12 + NOT = { has_character_flag = concerned_cooldown } + } + save_scope_as = concerned + add_character_flag = { + flag = concerned_cooldown + months = 12 + } + } + } + + #Option A: lose opinion + option = { + name = ep3_laamps_provisions.1000.a + scope:concerned = { + add_opinion = { + target = root + modifier = worried_opinion + opinion = -15 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #Option B: give them money + option = { + name = ep3_laamps_provisions.1000.b + pay_short_term_gold = { + target = scope:concerned + gold = tiny_gold_value + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + } + } +} + +# Low provisions - MaA take a hit +ep3_laamps_provisions.1010 = { + type = character_event + title = ep3_laamps_provisions.1010.t + desc = ep3_laamps_provisions.1010.desc + theme = travel + left_portrait = { + character = root + animation = worry + } + + trigger = { + domicile_provisions_low_to_very_low_trigger = yes + current_military_strength >= 100 + NOT = { + has_character_flag = provision_events_cooldown + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + } + + #Option A: + option = { + name = ep3_laamps_provisions.1010.a + # 15% of your MaA desert + every_maa_regiment = { + limit = { + maa_current_troops_count >= 7 + } + change_maa_troops_count = { + value = { + value = this.maa_current_troops_count + multiply = -0.15 + } + } + } + stress_impact = { + base = minor_stress_impact_gain + } + } +} + +# Low provisions - someone leaves +ep3_laamps_provisions.1020 = { + type = character_event + title = ep3_laamps_provisions.1020.t + desc = ep3_laamps_provisions.1020.desc + theme = travel + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:leaver + animation = rage + } + + trigger = { + domicile_provisions_low_to_very_low_trigger = yes + NOT = { + has_character_flag = provision_events_cooldown + } + any_courtier_or_guest = { + is_available_ai_adult = yes + NOR = { + is_close_family_of = root + has_any_court_position = yes + } + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOR = { + is_close_family_of = root + has_any_court_position = yes + } + } + save_scope_as = leaver + } + } + + #Option A: + option = { + name = ep3_laamps_provisions.1020.a + current_travel_plan ?= { remove_character = scope:leaver } + scope:leaver = { move_to_pool = yes } + stress_impact = { + base = medium_stress_impact_gain + } + } +} + +# Very Low provisions - someone important leaves +ep3_laamps_provisions.1025 = { + type = character_event + title = ep3_laamps_provisions.1025.t + desc = ep3_laamps_provisions.1025.desc + theme = travel + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:leaver + animation = rage + } + + trigger = { + domicile_provisions_very_low_to_zero_trigger = yes + NOT = { + has_character_flag = provision_events_cooldown + } + any_courtier_or_guest = { + is_available_ai_adult = yes + OR = { + is_close_family_of = root + has_any_court_position = yes + } + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + random_courtier_or_guest = { + limit = { + OR = { + is_close_family_of = root + has_any_court_position = yes + } + } + save_scope_as = leaver + } + } + + #Option A: + option = { + name = ep3_laamps_provisions.1025.a + current_travel_plan ?= { remove_character = scope:leaver } + scope:leaver = { move_to_pool = yes } + every_courtier_or_guest = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = starving_opinion + opinion = -15 + } + } + stress_impact = { + base = major_stress_impact_gain + } + } +} + +# Very Low provisions - MaA are hit hard/desertions +ep3_laamps_provisions.1030 = { + type = character_event + title = ep3_laamps_provisions.1030.t + desc = ep3_laamps_provisions.1030.desc + theme = travel + left_portrait = { + character = root + animation = worry + } + + trigger = { + domicile_provisions_very_low_to_zero_trigger = yes + NOT = { + has_character_flag = provision_events_cooldown + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + } + + #Option A: + option = { + name = ep3_laamps_provisions.1030.a + # 35% of your MaA desert + every_maa_regiment = { + limit = { + maa_current_troops_count >= 3 + } + change_maa_troops_count = { + value = { + value = this.maa_current_troops_count + multiply = -0.35 + } + } + } + every_courtier_or_guest = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = starving_opinion + opinion = -15 + } + } + stress_impact = { + base = major_stress_impact_gain + } + } +} + +# Very Low provisions - You get sick +ep3_laamps_provisions.1040 = { + type = character_event + title = ep3_laamps_provisions.1040.t + desc = ep3_laamps_provisions.1040.desc + theme = travel + left_portrait = { + character = root + animation = sick + } + + trigger = { + domicile_provisions_very_low_to_zero_trigger = yes + NOR = { + has_character_flag = provision_events_cooldown + has_trait = ill + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + } + + #Option A: + option = { + name = ep3_laamps_provisions.1040.a + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + every_courtier_or_guest = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = starving_opinion + opinion = -15 + } + } + stress_impact = { + base = major_stress_impact_gain + } + } +} + +# Very Low provisions - someone dies/pet dies +ep3_laamps_provisions.1050 = { + type = character_event + title = ep3_laamps_provisions.1050.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_variable = story_cycle_horse_name + } + desc = ep3_laamps_provisions.1050.desc_pet_horse + } + triggered_desc = { + trigger = { + has_variable = story_cycle_dog_name + } + desc = ep3_laamps_provisions.1050.desc_pet_dog + } + triggered_desc = { + trigger = { + has_variable = story_cycle_cat_name + } + desc = ep3_laamps_provisions.1050.desc_pet_cat + } + desc = ep3_laamps_provisions.1050.desc_pet_no + } + first_valid = { + triggered_desc = { + trigger = { + exists = scope:pet_story + } + desc = ep3_laamps_provisions.1050.desc_pet + } + desc = ep3_laamps_provisions.1050.desc_follower + } + } + theme = death + left_portrait = { + character = root + animation = crying + } + right_portrait = { + trigger = { + exists = scope:dead + } + character = scope:dead + animation = dead + } + + trigger = { + domicile_provisions_very_low_to_zero_trigger = yes + NOT = { + has_character_flag = provision_events_cooldown + } + OR = { + any_owned_story = { type = story_cycle_pet_cat } + any_owned_story = { type = story_cycle_pet_dog } + any_owned_story = { type = story_cycle_martial_lifestyle_warhorse } + any_courtier_or_guest = { + is_available_ai = yes + } + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + save_scope_as = pet_story + } + if = { + limit = { + NOT = { exists = scope:pet_story } + } + random_owned_story = { + type = story_cycle_pet_dog + save_scope_as = pet_story + } + } + if = { + limit = { + NOT = { exists = scope:pet_story } + } + random_owned_story = { + type = story_cycle_pet_cat + save_scope_as = pet_story + } + } + if = { + limit = { + NOT = { exists = scope:pet_story } + } + random_courtier_or_guest = { + limit = { + is_available_ai = yes + } + weight = { + base = 1 + modifier = { + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + add = 9 + } + modifier = { + is_player_heir_of = root + factor = 0 + } + modifier = { + is_adult = yes + add = 4 + } + modifier = { + health <= 4 + add = 1 + } + modifier = { + health <= 3 + add = 1.5 + } + modifier = { + health <= 2.5 + add = 2 + } + modifier = { + health <= 2 + add = 3.5 + } + modifier = { + health <= 1.5 + add = 5 + } + } + save_scope_as = dead + } + } + scope:dead ?= { + death = { + death_reason = death_starved + } + } + } + + #Option A: + option = { + name = { + trigger = { + exists = scope:dead + } + text = ep3_laamps_provisions.1050.a_1 + } + name = ep3_laamps_provisions.1050.a + if = { + limit = { + exists = scope:pet_story + } + scope:pet_story = { end_story = yes } + custom_tooltip = ep3_laamps_provisions.1050.a_tt + } + every_courtier_or_guest = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = starving_opinion + opinion = -15 + } + } + stress_impact = { + base = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + #Option B: cannibal only + option = { + trigger = { + exists = scope:dead + is_cannibal_trigger = yes + } + name = ep3_laamps_provisions.1050.b + every_courtier_or_guest = { + limit = { + NOT = { has_trait = cannibal } + } + custom = every_follower_custom + add_opinion = { + target = root + modifier = absolutely_horrified_opinion + opinion = -30 + } + } + ai_chance = { + # If available, do it + base = 500 + } + } + + #Option C: become cannibal + option = { + trigger = { + exists = scope:dead + is_cannibal_trigger = no + } + name = ep3_laamps_provisions.1050.c + add_secret = { type = secret_cannibal } + ai_chance = { + base = 0 + } + } + + #Option D: eat the pet... :( + option = { + trigger = { + NOT = { exists = scope:dead } + } + name = ep3_laamps_provisions.1050.d + custom_tooltip = ep3_laamps_provisions.1050.d.tt + if = { + limit = { + scope:pet_story = { + story_type = story_cycle_martial_lifestyle_warhorse + } + } + domicile = { + change_provisions = miniscule_provisions_gain + } + } + else = { + domicile = { + change_provisions = { + value = miniscule_provisions_gain + multiply = 0.5 + } + } + } + scope:pet_story = { end_story = yes } + stress_impact = { + base = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + has_trait = callous + add = 10 + } + modifier = { + has_trait = sadistic + add = 10 + } + modifier = { + has_trait = cannibal + add = 10 + } + } + } +} + +# Very Low provisions - a pestilence spreads +ep3_laamps_provisions.1060 = { + type = character_event + title = ep3_laamps_provisions.1060.t + desc = ep3_laamps_provisions.1060.desc + theme = travel + left_portrait = { + character = root + animation = worry + } + + trigger = { + domicile_provisions_very_low_to_zero_trigger = yes + NOR = { + has_character_flag = provision_events_cooldown + has_game_rule = epidemic_frequency_disabled + } + location = { + NOR = { + any_province_epidemic = { } + has_variable = epidemic_cooldown_general + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_ai = yes + factor = 0.2 + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + } + + #Option A: + option = { + name = ep3_laamps_provisions.1060.a + location = { + create_epidemic_outbreak = { + type = typhus + intensity = minor + } + } + random_courtier_or_guest = { + limit = { can_contract_disease_trigger = { DISEASE = typhus } } + contract_disease_effect = { DISEASE = typhus TREATMENT_EVENT = no } + } + # 25% of your MaA die + every_maa_regiment = { + limit = { + maa_current_troops_count >= 4 + } + change_maa_troops_count = { + value = { + value = this.maa_current_troops_count + multiply = -0.25 + } + } + } + every_courtier_or_guest = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = starving_opinion + opinion = -15 + } + } + stress_impact = { + base = major_stress_impact_gain + } + } +} + +# ZERO provisions - chance to die or develop very bad modifiers/traits +ep3_laamps_provisions.1070 = { + type = character_event + title = ep3_laamps_provisions.1070.t + desc = ep3_laamps_provisions.1070.desc + theme = death + left_portrait = { + character = root + animation = sick_stomach + } + + trigger = { + domicile.provisions <= provisions_privation_threshold_empty + NOT = { + has_character_flag = provision_events_cooldown + } + # give them a chance to stop first + current_travel_plan = { + has_variable = 1080_no_provisions_stop + } + } + + immediate = { + apply_privation_event_cooldown_effect = yes + # 50% of your MaA die/desert + every_maa_regiment = { + limit = { + maa_current_troops_count >= 2 + } + change_maa_troops_count = { + value = { + value = this.maa_current_troops_count + multiply = -0.5 + } + } + } + every_courtier_or_guest = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = starving_opinion + opinion = -25 + } + } + } + + #Option A: + option = { + name = ep3_laamps_provisions.1070.a + random_list = { + 1 = { + # die + custom_tooltip = ep3_laamps_provisions.1070.a1 + hidden_effect = { + death = { + death_reason = death_starved + } + } + } + 1 = { + # bad health modifier + trigger = { + NOT = { has_character_modifier = weak_stomach_modifier } + } + custom_tooltip = ep3_laamps_provisions.1070.a2 + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps_provisions.1070.tt + left_icon = root + add_character_modifier = weak_stomach_modifier + } + } + } + 1 = { + # lose prowess + trigger = { + prowess >= 2 + } + custom_tooltip = ep3_laamps_provisions.1070.a3 + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps_provisions.1070.tt + left_icon = root + add_prowess_skill = -2 + } + } + } + 1 = { + # become cannibal + trigger = { + NOR = { + has_trait = cannibal + any_secret = { + type = secret_cannibal + } + } + } + custom_tooltip = ep3_laamps_provisions.1070.a4 + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps_provisions.1070.tt + left_icon = root + add_trait = cannibal + } + } + } + 1 = { + # other bad health modifier + trigger = { + NOR = { + has_trait = disfigured + has_character_modifier = hunger_sickness_modifier + } + } + custom_tooltip = ep3_laamps_provisions.1070.a5 + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps_provisions.1070.tt + left_icon = root + add_character_modifier = hunger_sickness_modifier + add_trait = disfigured + } + } + } + 1 = { + # become lunatic + trigger = { + NOR = { + has_trait = lunatic_1 + has_trait = lunatic_genetic + } + } + custom_tooltip = ep3_laamps_provisions.1070.a6 + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps_provisions.1070.tt + left_icon = root + add_trait = lunatic_1 + } + } + } + 1 = { + # become blind + trigger = { + NOT = { + has_trait = blind + } + } + custom_tooltip = ep3_laamps_provisions.1070.a7 + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps_provisions.1070.tt + left_icon = root + add_trait = blind + } + } + } + 1 = { + # become infirm + trigger = { + NOT = { + has_trait = infirm + } + } + custom_tooltip = ep3_laamps_provisions.1070.a8 + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_laamps_provisions.1070.tt + left_icon = root + add_trait = infirm + } + } + } + } + stress_impact = { + base = massive_stress_impact_gain + } + } +} + +# ZERO provisions - JUST STOP! +ep3_laamps_provisions.1080 = { + type = character_event + title = ep3_laamps_provisions.1080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:complainer + } + desc = ep3_laamps_provisions.1080.desc_companion + } + desc = ep3_laamps_provisions.1080.desc_alone + } + } + theme = travel + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + trigger = { + exists = scope:complainer + } + character = scope:complainer + animation = sick_stomach + } + + trigger = { + domicile.provisions <= provisions_privation_threshold_empty + current_travel_plan = { + NOT = { + has_variable = 1080_no_provisions_stop + } + } + } + + immediate = { + current_travel_plan = { + set_variable = 1080_no_provisions_stop + hidden_effect = { + pause_travel_plan = yes + } + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + } + weight = { + base = 1 + modifier = { + is_of_minor_interest_trigger = { CHARACTER = root } + add = 100 + } + modifier = { + is_of_major_interest_trigger = { CHARACTER = root } + add = 1000 + } + } + save_scope_as = complainer + } + location = { + if = { + limit = { is_sea_province = yes } + ordered_neighboring_province = { + limit = { exists = county } + alternative_limit = { + any_neighboring_province = { exists = county } + } + alternative_limit = { + any_neighboring_province = { + any_neighboring_province = { exists = county } + } + } + order_by = { + value = 0 + subtract = "squared_distance(root.location)" + } + if = { + limit = { exists = county } + save_scope_as = landfall + } + else = { + ordered_neighboring_province = { + limit = { exists = county } + alternative_limit = { + any_neighboring_province = { exists = county } + } + order_by = { + value = 0 + subtract = "squared_distance(root.location)" + } + if = { + limit = { exists = county } + save_scope_as = landfall + } + else = { + ordered_neighboring_province = { + limit = { exists = county } + order_by = { + value = 0 + subtract = "squared_distance(root.location)" + } + save_scope_as = landfall + } + } + } + } + } + } + } + } + + #Option A: we press on + option = { + name = ep3_laamps_provisions.1080.a + current_travel_plan = { + resume_travel_plan = yes + } + every_courtier_or_guest = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = starving_opinion + opinion = -25 + } + } + + # Special, for the AI - start starving or succeed!? + if = { + limit = { + is_ai = yes + } + random = { + chance = { + value = 10 + add = root.sum_of_all_skills_value + } + domicile = { + change_provisions = max_provisions + } + } + } + ai_chance = { + base = 100 + } + } + + #Option B: take a break + option = { + name = ep3_laamps_provisions.1080.b + trigger = { + custom_tooltip = { + text = ep3_laamps_provisions.1080.sea + location = { + is_sea_province = no + } + } + } + show_as_unavailable = { + always = yes + } + #inform about moving the domicile + show_as_tooltip = { + domicile = { + move_domicile = root.location + } + } + current_travel_plan = { + abort_travel_plan = yes + } + ai_chance = { + base = 0 + } + } + + #Option C: make land!!!!!!! + option = { + name = ep3_laamps_provisions.1080.c + trigger = { exists = scope:landfall } + add_internal_flag = special + custom_tooltip = { + text = ep3_laamps_provisions.1080.c.tt + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + start_travel_plan = { + destination = scope:landfall + travel_with_domicile = yes + return_trip = no + players_use_planner = no + } + } + ai_chance = { + base = 0 + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_landless_admin_events.txt b/N3OW/events/dlc/ep3/ep3_landless_admin_events.txt new file mode 100644 index 00000000..53148d90 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_landless_admin_events.txt @@ -0,0 +1,2280 @@ +namespace = ep3_landless_admin + +################################################## +# EP3 Landless Admin +# by Veronica Pazos +# 1000 On the Door +# 1010 In Good Estate +# 1020 For a Bit of Gold +# 1030 A Secret for a Secret +# 1040 Next in Line +# 1050 Just Below Us + +# On the Door +# This guy could be a cool councillor +# 1000 + +ep3_landless_admin.1000 = { + type = character_event + title = ep3_landless_admin.1000.t + desc = ep3_landless_admin.1000.desc + theme = administrative + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = gregarious + has_trait = generous + } + } + animation = ecstasy + } + animation = thinking + } + right_portrait = { + character = scope:proposed_councillor + animation = scheme + } + cooldown = { years = 5 } + + trigger = { + is_landless_administrative = yes + is_available = yes + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + NOT = { + any_courtier = { + has_any_high_skill_rating = yes + count < 3 + } + } + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + is_available_healthy_ai_adult = yes + has_any_high_skill_rating = yes + } + } + random_pool_character = { + province = root.location + limit = { + is_available_healthy_ai_adult = yes + has_any_high_skill_rating = yes + } + save_scope_as = proposed_councillor + } + } + else = { + create_character = { + template = administrator_character + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + dynasty = none + location = root.location + faith = root.location.faith + culture = root.location.culture + save_scope_as = proposed_councillor + } + } + } + + # You're hired! + option = { + name = ep3_landless_admin.1000.a + add_courtier = scope:proposed_councillor + pay_short_term_gold = { + target = scope:proposed_councillor + gold = medium_gold_value + } + stress_impact = { # You feel like you're getting robbed + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = arrogant + } + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + # Try to recruit them for free + option = { + name = ep3_landless_admin.1000.b + duel = { + skill = stewardship + target = scope:proposed_councillor + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 1 + } + modifier = { + influence_level >= 3 + add = 10 + } + desc = ep3_landless_admin.1000.b.success + send_interface_toast = { + title = ep3_landless_admin.1000.b.success + left_icon = scope:proposed_councillor + add_courtier = scope:proposed_councillor + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 2 + } + desc = ep3_landless_admin.1000.b.mid + send_interface_toast = { + title = ep3_landless_admin.1000.b.mid + left_icon = scope:proposed_councillor + add_courtier = scope:proposed_councillor + custom_tooltip = obligation_hook_tt + add_hook = { + target = scope:proposed_councillor + type = obligation_hook + } + pay_short_term_gold = { + target = scope:proposed_councillor + gold = minor_gold_value + } + } + } + 20 = { + desc = ep3_landless_admin.1000.b.failure + send_interface_toast = { + title = ep3_landless_admin.1000.b.failure + left_icon = scope:proposed_councillor + reverse_add_opinion = { + target = scope:proposed_councillor + modifier = insulted_opinion + opinion = -15 + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -25 + has_trait = greedy + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + + # I'm good, thanks + option = { + name = ep3_landless_admin.1000.c + stress_impact = { # Why wouldn't you hire this poor person + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = generous + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } +} + +# In Good Estate +# You have upgraded your estate a bunch, locals are impressed +# 1010 + +ep3_landless_admin.1010 = { + type = character_event + title = ep3_landless_admin.1010.t + desc = ep3_landless_admin.1010.desc + theme = administrative + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = paranoid + } + animation = paranoia + } + triggered_animation = { + trigger = { + has_trait = arrogant + } + animation = laugh + } + animation = personality_content + } + right_portrait = { + character = scope:local + animation = admiration + } + lower_right_portrait = scope:child + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + is_landed_or_landless_administrative = yes + domicile ?= { + has_domicile_building_or_higher = estate_main_03 + } + is_available = yes + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + domicile ?= { + has_domicile_building_or_higher = estate_main_05 + } + } + } + + immediate = { + domicile = { save_scope_as = my_estate } + if = { + limit = { + any_pool_character = { + province = root.location + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + any_child = { + is_adult = no + } + } + } + random_pool_character = { + province = root.location + limit = { + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + any_child = { + is_adult = no + } + } + save_scope_as = local + random_child = { + limit = { is_adult = no } + save_scope_as = child + } + } + } + else = { + create_character = { + template = generic_peasant_character + dynasty = none + location = root.location + faith = root.location.faith + culture = root.location.culture + save_scope_as = local + } + hidden_effect = { + scope:local = { + move_to_pool = yes + } + } + create_character = { + template = peasant_toddler_character + culture = root.culture + faith = root.faith + location = root.location + save_scope_as = child + } + if = { #Set the previous character as their parent + limit = { + scope:local ?= { + is_female = no + } + } + hidden_effect = { + scope:child = { + set_father = scope:local + } + } + } + else = { + hidden_effect = { + scope:child = { + set_mother = scope:local + } + } + } + } + } + + # Paranoid - they're clearly spying on me! + option = { + name = ep3_landless_admin.1010.a + trigger = { + has_trait = paranoid + } + add_character_modifier = { + modifier = ep3_extra_security_modifier + years = 10 + } + scope:local = { + add_opinion = { + target = root + modifier = confused_opinion + opinion = -20 + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = paranoid + } + } + } + + # Thanks friend, would you like to contribute? + option = { + name = ep3_landless_admin.1010.b + add_character_modifier = { + modifier = ep3_good_estate_modifier + years = 10 + } + + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = greedy + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = gregarious + } + } + } + } + + # Tell everyone pls + option = { + name = ep3_landless_admin.1010.c + change_influence = minor_influence_gain + + stress_impact = { + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + influence_level <= 2 + } + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + modifier = { + factor = 0 + has_trait = humble + } + } + } + + # That's sick, do you wanna join me? + option = { + name = ep3_landless_admin.1010.d + add_courtier = scope:local + add_courtier = scope:child + add_piety = miniscule_piety_gain + stress_impact = { + gregarious = medium_stress_impact_loss + generous = medium_stress_impact_loss + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = generous + has_trait = gregarious + } + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = callous + } + } + } + } +} + +# For a Bit of Gold +# Upgrade a building in your estate +# 1020 + +scripted_trigger ep3_landless_admin_1020_can_upgrade_market_trigger = { + has_domicile_building_or_higher = market_01 + NOT = { has_domicile_building_or_higher = market_06 } + trigger_if = { + limit = { has_domicile_building_or_higher = market_05 } + root = { estate_can_construct_market_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = market_04 } + root = { estate_can_construct_market_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = market_03 } + root = { estate_can_construct_market_04_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = market_02 } + root = { estate_can_construct_market_03_trigger = yes } + } + trigger_else = { always = yes } +} + +scripted_trigger ep3_landless_admin_1020_can_upgrade_garden_trigger = { + has_domicile_building_or_higher = garden_01 + NOR = { + has_domicile_building_or_higher = garden_leisure_06 + has_domicile_building_or_higher = garden_fruit_06 + } + trigger_if = { + limit = { has_domicile_building_or_higher = garden_leisure_05 } + root = { estate_can_construct_garden_leisure_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = garden_leisure_04 } + root = { estate_can_construct_garden_leisure_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = garden_03 } + root = { estate_can_construct_garden_leisure_04_trigger = yes } + } + trigger_else = { always = yes } + trigger_if = { + limit = { has_domicile_building_or_higher = garden_fruit_05 } + root = { estate_can_construct_garden_fruit_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = garden_fruit_04 } + root = { estate_can_construct_garden_fruit_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = garden_03 } + root = { estate_can_construct_garden_fruit_04_trigger = yes } + } + trigger_else = { always = yes } +} + +scripted_trigger ep3_landless_admin_1020_can_upgrade_guardhouse_trigger = { + has_domicile_building_or_higher = guardhouse_01 + NOT = { has_domicile_building_or_higher = guardhouse_04 } + trigger_if = { + limit = { has_domicile_building_or_higher = guardhouse_03 } + root = { estate_can_construct_guardhouse_04_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = guardhouse_02 } + root = { estate_can_construct_guardhouse_03_trigger = yes } + } + trigger_else = { always = yes } +} + +scripted_trigger ep3_landless_admin_1020_can_upgrade_workshop_trigger = { + has_domicile_building_or_higher = workshop_01 + NOR = { + has_domicile_building_or_higher = workshop_carpenter_06 + has_domicile_building_or_higher = workshop_mason_06 + } + trigger_if = { + limit = { has_domicile_building_or_higher = workshop_carpenter_05 } + root = { estate_can_construct_workshop_carpenter_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = workshop_carpenter_04 } + root = { estate_can_construct_workshop_carpenter_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = workshop_carpenter_03 } + root = { estate_can_construct_workshop_carpenter_04_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = workshop_02 } + root = { estate_can_construct_workshop_carpenter_03_trigger = yes } + } + trigger_else = { always = yes } + trigger_if = { + limit = { has_domicile_building_or_higher = workshop_mason_05 } + root = { estate_can_construct_workshop_mason_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = workshop_mason_04 } + root = { estate_can_construct_workshop_mason_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = workshop_mason_03 } + root = { estate_can_construct_workshop_mason_04_trigger = yes } + } + # No workshop_02 here, as we default to building a carpenter. + trigger_else = { always = yes } + trigger_if = { + limit = { has_domicile_building_or_higher = workshop_textile_05 } + root = { estate_can_construct_workshop_textile_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = workshop_textile_04 } + root = { estate_can_construct_workshop_textile_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = workshop_textile_03 } + root = { estate_can_construct_workshop_textile_04_trigger = yes } + } + # No workshop_02 here, as we default to building a carpenter. + trigger_else = { always = yes } +} + +scripted_trigger ep3_landless_admin_1020_can_upgrade_barracks_trigger = { + has_domicile_building_or_higher = barracks_01 + NOT = { has_domicile_building_or_higher = barracks_06 } + trigger_if = { + limit = { has_domicile_building_or_higher = barracks_05 } + root = { estate_can_construct_barracks_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = barracks_04 } + root = { estate_can_construct_barracks_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = barracks_03 } + root = { estate_can_construct_barracks_04_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = barracks_02 } + root = { estate_can_construct_barracks_03_trigger = yes } + } + trigger_else = { always = yes } +} + +scripted_trigger ep3_landless_admin_1020_can_upgrade_vineyard_trigger = { + has_domicile_building_or_higher = vineyard_01 + NOT = { has_domicile_building_or_higher = vineyard_06 } + trigger_if = { + limit = { has_domicile_building_or_higher = vineyard_05 } + root = { estate_can_construct_vineyard_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = vineyard_04 } + root = { estate_can_construct_vineyard_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = vineyard_03 } + root = { estate_can_construct_vineyard_04_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = vineyard_02 } + root = { estate_can_construct_vineyard_03_trigger = yes } + } + trigger_else = { always = yes } +} + +scripted_trigger ep3_landless_admin_1020_can_upgrade_olive_trigger = { + has_domicile_building_or_higher = olive_01 + NOT = { has_domicile_building_or_higher = olive_06 } + trigger_if = { + limit = { has_domicile_building_or_higher = olive_05 } + root = { estate_can_construct_olive_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = olive_04 } + root = { estate_can_construct_olive_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = olive_03 } + root = { estate_can_construct_olive_04_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = olive_02 } + root = { estate_can_construct_olive_03_trigger = yes } + } + trigger_else = { always = yes } +} + +scripted_trigger ep3_landless_admin_1020_can_upgrade_tea_trigger = { + has_domicile_building_or_higher = japanese_tea_plantation_01 + NOT = { has_domicile_building_or_higher = japanese_tea_plantation_06 } + trigger_if = { + limit = { has_domicile_building_or_higher = japanese_tea_plantation_05 } + root = { estate_can_construct_japanese_tea_plantation_06_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = japanese_tea_plantation_04 } + root = { estate_can_construct_japanese_tea_plantation_05_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = japanese_tea_plantation_03 } + root = { estate_can_construct_japanese_tea_plantation_04_trigger = yes } + } + trigger_else_if = { + limit = { has_domicile_building_or_higher = japanese_tea_plantation_02 } + root = { estate_can_construct_japanese_tea_plantation_03_trigger = yes } + } + trigger_else = { always = yes } +} + +ep3_landless_admin.1020 = { + type = character_event + title = ep3_landless_admin.1020.t + desc = { + desc = ep3_landless_admin.1020.desc.intro + first_valid = { + triggered_desc = { + trigger = { + var:domicile_building = flag:market + } + desc = ep3_landless_admin.1020.desc.market + } + triggered_desc = { + trigger = { + var:domicile_building = flag:garden + } + desc = ep3_landless_admin.1020.desc.garden + } + triggered_desc = { + trigger = { + var:domicile_building = flag:guardhouse + } + desc = ep3_landless_admin.1020.desc.guardhouse + } + triggered_desc = { + trigger = { + var:domicile_building = flag:workshop + } + desc = ep3_landless_admin.1020.desc.workshop + } + triggered_desc = { + trigger = { + var:domicile_building = flag:barracks + } + desc = ep3_landless_admin.1020.desc.barracks + } + triggered_desc = { + trigger = { + var:domicile_building = flag:vineyard + } + desc = ep3_landless_admin.1020.desc.vineyard + } + triggered_desc = { + trigger = { + var:domicile_building = flag:olive + } + desc = ep3_landless_admin.1020.desc.olive + } + triggered_desc = { + trigger = { + var:domicile_building = flag:tea + } + desc = ep3_landless_admin.1020.desc.tea + } + } + desc = ep3_landless_admin.1020.desc.outro + } + theme = administrative + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = callous + } + animation = dismissal + } + animation = happiness + } + right_portrait = { + character = scope:steward + animation = steward + } + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + is_landed_or_landless_administrative = yes + is_available = yes + # I'm sorry + ## ^Original source of shame removed on charges of [redacted]. The Council disapproves of such... lacking hygiene. + domicile ?= { + OR = { + ep3_landless_admin_1020_can_upgrade_market_trigger = yes + ep3_landless_admin_1020_can_upgrade_garden_trigger = yes + ep3_landless_admin_1020_can_upgrade_guardhouse_trigger = yes + ep3_landless_admin_1020_can_upgrade_workshop_trigger = yes + ep3_landless_admin_1020_can_upgrade_barracks_trigger = yes + ep3_landless_admin_1020_can_upgrade_vineyard_trigger = yes + ep3_landless_admin_1020_can_upgrade_olive_trigger = yes + } + } + domicile.domicile_location = { + has_ongoing_construction = no + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + NOT = { + any_courtier = { + has_any_high_skill_rating = yes + count < 3 + } + } + } + } + + immediate = { + random_list = { + 1 = { + trigger = { + domicile = { ep3_landless_admin_1020_can_upgrade_market_trigger = yes } + } + set_variable = { + name = domicile_building + value = flag:market + } + } + 1 = { + trigger = { + domicile = { ep3_landless_admin_1020_can_upgrade_garden_trigger = yes } + } + set_variable = { + name = domicile_building + value = flag:garden + } + } + 1 = { + trigger = { + domicile = { ep3_landless_admin_1020_can_upgrade_guardhouse_trigger = yes } + } + set_variable = { + name = domicile_building + value = flag:guardhouse + } + } + 1 = { + trigger = { + domicile = { ep3_landless_admin_1020_can_upgrade_workshop_trigger = yes } + } + set_variable = { + name = domicile_building + value = flag:workshop + } + } + 1 = { + trigger = { + domicile = { ep3_landless_admin_1020_can_upgrade_barracks_trigger = yes } + } + set_variable = { + name = domicile_building + value = flag:barracks + } + } + 1 = { + trigger = { + domicile = { ep3_landless_admin_1020_can_upgrade_vineyard_trigger = yes } + } + set_variable = { + name = domicile_building + value = flag:vineyard + } + } + 1 = { + trigger = { + domicile = { ep3_landless_admin_1020_can_upgrade_olive_trigger = yes } + } + set_variable = { + name = domicile_building + value = flag:olive + } + } + 1 = { + trigger = { + domicile = { ep3_landless_admin_1020_can_upgrade_tea_trigger = yes } + } + set_variable = { + name = domicile_building + value = flag:tea + } + } + } + if = { + limit = { + exists = cp:councillor_steward + } + cp:councillor_steward = { save_scope_as = steward } + } + else_if = { + limit = { + any_courtier = { + is_available_healthy_ai_adult = yes + this != root + } + } + ordered_courtier = { + limit = { + is_available_healthy_ai_adult = yes + this != root + } + order_by = stewardship + save_scope_as = steward + } + } + else = { + create_character = { + template = stewardship_court_position_holder_template + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + dynasty = none + location = root.location + faith = root.location.faith + culture = root.location.culture + save_scope_as = steward + } + } + scope:steward = { assign_quirk_effect = yes } + } + + # Market + option = { + name = ep3_landless_admin.1020.a + trigger = { var:domicile_building = flag:market } + domicile = { + switch = { + trigger = has_domicile_building + market_01 = { add_domicile_building = market_02 } + market_02 = { add_domicile_building = market_03 } + market_03 = { add_domicile_building = market_04 } + market_04 = { add_domicile_building = market_05 } + market_05 = { add_domicile_building = market_06 } + } + } + remove_short_term_gold = major_gold_value + change_influence = medium_influence_loss + stress_impact = { + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = arrogant + } + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + # Garden + option = { + name = ep3_landless_admin.1020.b + trigger = { var:domicile_building = flag:garden } + domicile = { + switch = { + trigger = has_domicile_building + garden_01 = { add_domicile_building = garden_02 } + garden_02 = { add_domicile_building = garden_03 } + garden_03 = { add_domicile_building = garden_leisure_04 } + garden_leisure_04 = { add_domicile_building = garden_leisure_05 } + garden_leisure_05 = { add_domicile_building = garden_leisure_06 } + garden_fruit_04 = { add_domicile_building = garden_fruit_05 } + garden_fruit_05 = { add_domicile_building = garden_fruit_06 } + } + } + remove_short_term_gold = major_gold_value + change_influence = medium_influence_loss + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -25 + has_trait = greedy + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + # Guardhouse + option = { + name = ep3_landless_admin.1020.c + trigger = { var:domicile_building = flag:guardhouse } + domicile = { + switch = { + trigger = has_domicile_building + guardhouse_01 = { add_domicile_building = guardhouse_02 } + guardhouse_02 = { add_domicile_building = guardhouse_03 } + guardhouse_03 = { add_domicile_building = guardhouse_04 } + } + } + remove_short_term_gold = major_gold_value + change_influence = medium_influence_loss + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = generous + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + # Workshop + option = { + name = ep3_landless_admin.1020.d + trigger = { var:domicile_building = flag:workshop } + domicile = { + switch = { + trigger = has_domicile_building + workshop_01 = { add_domicile_building = workshop_02 } + workshop_02 = { add_domicile_building = workshop_carpenter_03 } + workshop_carpenter_03 = { add_domicile_building = workshop_carpenter_04 } + workshop_carpenter_04 = { add_domicile_building = workshop_carpenter_05 } + workshop_carpenter_05 = { add_domicile_building = workshop_carpenter_06 } + workshop_mason_03 = { add_domicile_building = workshop_mason_04 } + workshop_mason_04 = { add_domicile_building = workshop_mason_05 } + workshop_mason_05 = { add_domicile_building = workshop_mason_06 } + workshop_textile_03 = { add_domicile_building = workshop_textile_04 } + workshop_textile_04 = { add_domicile_building = workshop_textile_05 } + workshop_textile_05 = { add_domicile_building = workshop_textile_06 } + } + } + remove_short_term_gold = major_gold_value + change_influence = medium_influence_loss + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = generous + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + # Barracks + option = { + name = ep3_landless_admin.1020.e + trigger = { var:domicile_building = flag:barracks } + domicile = { + switch = { + trigger = has_domicile_building + barracks_01 = { add_domicile_building = barracks_02 } + barracks_02 = { add_domicile_building = barracks_03 } + barracks_03 = { add_domicile_building = barracks_04 } + barracks_04 = { add_domicile_building = barracks_05 } + barracks_05 = { add_domicile_building = barracks_06 } + } + } + remove_short_term_gold = major_gold_value + change_influence = medium_influence_loss + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = generous + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + # Vineyard + option = { + name = ep3_landless_admin.1020.f + trigger = { var:domicile_building = flag:vineyard } + domicile = { + switch = { + trigger = has_domicile_building + vineyard_01 = { add_domicile_building = vineyard_02 } + vineyard_02 = { add_domicile_building = vineyard_03 } + vineyard_03 = { add_domicile_building = vineyard_04 } + vineyard_04 = { add_domicile_building = vineyard_05 } + vineyard_05 = { add_domicile_building = vineyard_06 } + } + } + remove_short_term_gold = major_gold_value + change_influence = medium_influence_loss + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = generous + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + # Olive + option = { + name = ep3_landless_admin.1020.g + trigger = { var:domicile_building = flag:olive } + domicile = { + switch = { + trigger = has_domicile_building + olive_01 = { add_domicile_building = olive_02 } + olive_02 = { add_domicile_building = olive_03 } + olive_03 = { add_domicile_building = olive_04 } + olive_04 = { add_domicile_building = olive_05 } + olive_05 = { add_domicile_building = olive_06 } + } + } + remove_short_term_gold = major_gold_value + change_influence = medium_influence_loss + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = generous + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + + + # Tea + option = { + name = ep3_landless_admin.1020.j + trigger = { var:domicile_building = flag:tea } + domicile = { + switch = { + trigger = has_domicile_building + olive_01 = { add_domicile_building = japanese_tea_plantation_02 } + olive_02 = { add_domicile_building = japanese_tea_plantation_03 } + olive_03 = { add_domicile_building = japanese_tea_plantation_04 } + olive_04 = { add_domicile_building = japanese_tea_plantation_05 } + olive_05 = { add_domicile_building = japanese_tea_plantation_06 } + } + } + remove_short_term_gold = major_gold_value + change_influence = medium_influence_loss + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = generous + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + + # There's other stuff I want to build + option = { + name = ep3_landless_admin.1020.h + flavor = ep3_landless_admin.1020.h.flavor + add_gold = medium_gold_value + + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { remove_variable = domicile_building } +} + +# A Secret for a Secret +# You get offered a hook on your liege +# 1030 + +scripted_trigger ep3_landless_admin_1030_courtier_trigger = { + is_available_healthy_ai_adult = yes + OR = { + has_relation_rival = root.liege + opinion = { + target = root.liege + value <= -50 + } + AND = { + OR = { + has_trait = disloyal + has_trait = deceitful + has_trait = callous + } + NOT = { is_spouse_of = root.liege } # It'd look weird for their spouse to just rock up to you + } + } +} + +ep3_landless_admin.1030 = { + type = character_event + title = ep3_landless_admin.1030.t + desc = ep3_landless_admin.1030.desc + theme = administrative + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = paranoid + } + animation = paranoia + } + triggered_animation = { + trigger = { + OR = { + has_trait = loyal + has_trait = just + has_trait = honest + } + } + animation = dismissal + } + animation = thinking + } + right_portrait = { + character = scope:courtier + animation = scheme + } + lower_right_portrait = scope:liege + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + is_landed_or_landless_administrative = yes + is_available = yes + liege ?= { + is_ai = yes + any_secret = { + NOT = { + any_secret_knower = { this = root } + } + } + any_courtier_or_guest = { + ep3_landless_admin_1030_courtier_trigger = yes + } + } + can_add_hook = { + target = root.liege + type = strong_blackmail_hook + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + liege = { + save_scope_as = liege + random_secret = { + limit = { + NOT = { + any_secret_knower = { this = root } + } + } + save_scope_as = secret + } + random_courtier_or_guest = { + limit = { ep3_landless_admin_1030_courtier_trigger = yes } + weight = { + base = 1 + modifier = { + add = 5 + has_relation_nemesis = root.liege + } + modifier = { + add = 5 + has_relation_rival = root.liege + } + modifier = { + add = 2 + has_trait = deceitful + } + modifier = { + add = 2 + has_trait = disloyal + } + modifier = { + add = 2 + has_trait = callous + } + } + save_scope_as = courtier + } + } + scope:courtier = { get_quirk_character_effect = yes } + } + + # Paranoid - WHAT DO YOU THINK YOU'RE DOING??? + option = { + name = ep3_landless_admin.1030.a + trigger = { + has_trait = paranoid + } + add_character_modifier = { + modifier = ep3_no_secrets_modifier + years = 15 + } + stress_impact = { + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = paranoid + } + } + } + + # Honorable - How dare you? + option = { + name = ep3_landless_admin.1030.b + trigger = { + OR = { + has_trait = loyal + has_trait = just + has_trait = honest + } + NOT = { has_trait = paranoid } + } + add_character_modifier = { + modifier = ep3_no_secrets_modifier + years = 15 + } + stress_impact = { + loyal = medium_stress_impact_loss + just = medium_stress_impact_loss + honest = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + disloyal = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = loyal + has_trait = just + has_trait = honest + } + } + modifier = { + factor = 0 + OR = { + has_trait = disloyal + has_trait = deceitful + has_trait = callous + } + } + } + } + + # Sure! + option = { + name = ep3_landless_admin.1030.c + add_hook = { + target = scope:liege + type = strong_blackmail_hook + secret = scope:secret + } + if = { + limit = { + any_secret = { + NOT = { + any_secret_knower = { this = scope:liege } + } + } + } + random_secret = { + limit = { + NOT = { + any_secret_knower = { this = scope:liege } + } + } + expose_secret = scope:courtier + } + } + else = { + scope:courtier = { + add_hook = { + type = favor_hook + target = root + } + } + } + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = greedy + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = gregarious + } + } + } + } + + # Try to get it for free hihi + option = { + name = ep3_landless_admin.1030.d + duel = { + target = scope:courtier + skill = intrigue + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + modifier = { + influence_level >= 3 + add = 10 + } + desc = ep3_landless_admin.1030.d.success + send_interface_toast = { + title = ep3_landless_admin.1030.d.success + left_icon = scope:courtier + add_hook = { + target = scope:liege + type = strong_blackmail_hook + secret = scope:secret + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + desc = ep3_landless_admin.1030.d.failure + send_interface_toast = { + title = ep3_landless_admin.1030.d.failure + left_icon = scope:courtier + scope:courtier = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + influence_level <= 2 + } + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + modifier = { + factor = 0 + has_trait = humble + } + } + } + + # I'm good ty + option = { + name = ep3_landless_admin.1030.e + + stress_impact = { + gregarious = medium_stress_impact_loss + generous = medium_stress_impact_loss + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = generous + has_trait = gregarious + } + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = callous + } + } + } + } +} + +# Next in Line +# Lie about a rival candidate +# 1040 + +scripted_trigger ep3_landless_admin_1040_spymaster_trigger = { + is_available_healthy_ai_adult = yes +} + +ep3_landless_admin.1040 = { + type = character_event + title = ep3_landless_admin.1040.t + desc = { + desc = ep3_landless_admin.1040.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:rival = { is_child_of = root } + } + desc = ep3_landless_admin.1040.desc.child + } + triggered_desc = { + trigger = { + scope:rival = { is_spouse_of = root } + } + desc = ep3_landless_admin.1040.desc.spouse + } + triggered_desc = { + trigger = { + scope:rival = { is_close_or_extended_family_of = root } + } + desc = ep3_landless_admin.1040.desc.family + } + } + } + theme = administrative + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = paranoid + } + animation = paranoia + } + triggered_animation = { + trigger = { + OR = { + has_trait = loyal + has_trait = just + has_trait = honest + } + } + animation = dismissal + } + animation = schadenfreude + } + right_portrait = { + character = scope:spymaster + animation = scheme + } + lower_right_portrait = scope:rival + cooldown = { years = 5 } + override_background = { reference = garden } + + trigger = { + is_governor = yes + NOT = { government_has_flag = government_has_merit } + is_available = yes + exists = location.county.duchy.holder + location.county.duchy.holder ?= { # There's a governor in your location, doesn't matter whether it's you or not + is_governor = yes + } + primary_title = { + is_noble_family_title = no + } + OR = { + exists = cp:councillor_spymaster + any_courtier = { + ep3_landless_admin_1040_spymaster_trigger = yes + } + } + OR = { + AND = { + exists = root.player_heir + primary_title.current_heir = { + NOT = { this = root.player_heir } + } + } + primary_title = { + any_title_heir = { + count >= 1 + NOR = { + this = root.top_liege + this = root.player_heir + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + exists = root.player_heir + primary_title.current_heir = { + this != root.player_heir + } + } + } + + immediate = { + primary_title = { save_scope_as = my_title } + if = { # If the next sucessor is not your player heir we grab them + limit = { + exists = root.player_heir + primary_title.current_heir = { + this != root.player_heir + } + } + primary_title.current_heir = { save_scope_as = rival } + } + else_if = { # If you're a governor we grab your current title + limit = { + is_governor = yes + } + primary_title = { + ordered_title_heir = { + limit = { + NOR = { + this = root.top_liege + this = root.player_heir + } + } + order_by = "appointment_candidate_score(root.primary_title)" + save_scope_as = rival + } + } + } + else = { # If you are landless we grab the governor of your location + location.county.duchy.holder = { + save_scope_as = rival + } + } + if = { + limit = { exists = cp:councillor_spymaster } + cp:councillor_spymaster = { save_scope_as = spymaster } + } + else = { + ordered_courtier = { + limit = { ep3_landless_admin_1040_spymaster_trigger = yes } + order_by = intrigue + save_scope_as = spymaster + } + } + } + + # Deceitful - Harm them for free + option = { + name = ep3_landless_admin.1040.a + trigger = { + has_trait = deceitful + } + custom_tooltip = ep3_landless_admin.1040.tt + hidden_effect = { + scope:my_title = { + change_appointment_investment = { + investor = root + target = scope:rival + value = { + subtract = appointment_score_medium_value + } + } + } + } + stress_impact = { + deceitful = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = deceitful + } + } + } + + # Lazy - I'd rather take a nap + option = { + name = ep3_landless_admin.1040.b + trigger = { + has_trait = lazy + } + add_character_modifier = { + modifier = ep3_well_rested_modifier + years = 2 + } + stress_impact = { + lazy = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = lazy + } + modifier = { + factor = 0 + OR = { + has_trait = deceitful + has_trait = ambitious + } + } + } + } + + # Spend influence to harm them + option = { + name = ep3_landless_admin.1040.c + trigger = { + NOT = { has_trait = deceitful } + } + change_influence = medium_influence_loss + custom_tooltip = ep3_landless_admin.1040.tt + hidden_effect = { + scope:my_title = { + change_appointment_investment = { + investor = root + target = scope:rival + value = { + subtract = appointment_score_medium_value + } + } + } + } + stress_impact = { + ambitious = medium_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = ambitious + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + } + } + } + } + + # Duel them to harm them for free + option = { + name = ep3_landless_admin.1040.d + trigger = { + NOT = { has_trait = deceitful } + } + duel = { + target = scope:rival + skills = { diplomacy intrigue } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + desc = ep3_landless_admin.1040.d.success + send_interface_toast = { + title = ep3_landless_admin.1040.d.success + left_icon = scope:rival + custom_tooltip = ep3_landless_admin.1040.tt + hidden_effect = { + scope:my_title = { + change_appointment_investment = { + investor = root + target = scope:rival + value = { + subtract = appointment_score_medium_value + } + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + desc = ep3_landless_admin.1040.d.failure + send_interface_toast = { + title = ep3_landless_admin.1040.d.failure + left_icon = scope:rival + change_influence = minor_influence_loss + } + } + } + ai_chance = { + base = 100 + } + } + + # Nah + option = { + name = ep3_landless_admin.1040.e + + stress_impact = { + gregarious = medium_stress_impact_loss + generous = medium_stress_impact_loss + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + influence_level <= 1 + } + } + } +} + +# Just Below Us +# There's something in your basement +# 1050 + +scripted_trigger ep3_landless_admin_1050_servant_trigger = { + is_available_healthy_ai_adult = yes + has_no_particular_noble_roots_trigger = yes + NOT = { is_close_or_extended_family_of = root } + NOT = { is_spouse_of = root } +} + +ep3_landless_admin.1050 = { + type = character_event + title = ep3_landless_admin.1050.t + desc = { + desc = ep3_landless_admin.1050.desc.intro + first_valid = { + triggered_desc = { + trigger = { + var:domicile_building = flag:prison + } + desc = ep3_landless_admin.1050.desc.prison + } + triggered_desc = { + trigger = { + var:domicile_building = flag:servants + } + desc = ep3_landless_admin.1050.desc.servants + } + triggered_desc = { + trigger = { + var:domicile_building = flag:wine + } + desc = ep3_landless_admin.1050.desc.wine + } + } + desc = ep3_landless_admin.1050.desc.outro + } + theme = administrative + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = paranoid + } + animation = paranoia + } + triggered_animation = { + trigger = { + has_trait_schemy_trigger = yes + } + animation = scheme + } + triggered_animation = { + trigger = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = reckless + } + } + animation = laugh + } + animation = thinking + } + right_portrait = { + character = scope:servant + animation = lantern + } + cooldown = { years = 25 } + override_background = { reference = ce1_catacombs } + override_effect_2d = { + reference = fog + } + + trigger = { + government_allows = administrative + is_landed_or_landless_administrative = yes + is_available = yes + domicile ?= { + OR = { + has_domicile_building_or_higher = prison_01 + has_domicile_building_or_higher = servants_quarters_01 + has_domicile_building_or_higher = wine_cellar_01 + } + } + } + + weight_multiplier = { + base = 1 + + } + + immediate = { + random_list = { + 1 = { + trigger = { + domicile ?= { + has_domicile_building_or_higher = prison_01 + } + } + set_variable = { + name = domicile_building + value = flag:prison + } + } + 1 = { + trigger = { + domicile ?= { + has_domicile_building_or_higher = servants_quarters_01 + } + } + set_variable = { + name = domicile_building + value = flag:servants + } + } + 1 = { + trigger = { + domicile ?= { + has_domicile_building_or_higher = wine_cellar_01 + } + } + set_variable = { + name = domicile_building + value = flag:wine + } + } + } + if = { # If you have an appropriate courtier we grab them + limit = { + any_courtier_or_guest = { + ep3_landless_admin_1050_servant_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + ep3_landless_admin_1050_servant_trigger = yes + } + save_scope_as = servant + } + } + else_if = { # Otherwise we grab a pool character + limit = { + any_pool_character = { + province = root.domicile.domicile_location + ep3_landless_admin_1050_servant_trigger = yes + } + } + random_pool_character = { + province = root.domicile.domicile_location + limit = { + ep3_landless_admin_1050_servant_trigger = yes + } + save_scope_as = servant + } + } + else = { # And if not we create them + create_character = { + template = servant_character + culture = root.domicile.domicile_location.culture + faith = root.domicile.domicile_location.faith + location = root.domicile.domicile_location + save_scope_as = servant + } + } + } + + # Paranoid - Who built this!? + option = { + name = ep3_landless_admin.1050.a + trigger = { + has_trait = paranoid + } + add_character_modifier = { + modifier = ep3_tunnel_investigation_modifier + years = 15 + } + stress_impact = { + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = paranoid + } + } + } + + # Deceitful - A perfect opportunity + option = { + name = ep3_landless_admin.1050.b + trigger = { + has_trait_schemy_trigger = yes + } + custom_tooltip = ep3_secret_tunnels_abduct + set_variable = ep3_secret_tunnels_var + stress_impact = { + deceitful = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + disloyal = medium_stress_impact_loss + callous = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = deceitful + has_trait = ambitious + has_trait = disloyal + has_trait = callous + has_trait = vengeful + } + } + modifier = { + factor = 0 + has_trait = honest + } + } + } + + # Prison - Fill it up + option = { + name = ep3_landless_admin.1050.c + trigger = { + var:domicile_building = flag:prison + } + duel = { + value = medium_skill_rating + skill = prowess + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + modifier = { + dread >= 75 + add = 10 + } + desc = ep3_landless_admin.1050.c.success + send_interface_toast = { + title = ep3_landless_admin.1050.c.success + left_icon = root + add_character_modifier = { + modifier = ep3_tunnel_prison_modifier + years = 15 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + desc = ep3_landless_admin.1050.c.failure + send_interface_toast = { + title = ep3_landless_admin.1050.c.failure + left_icon = root + remove_short_term_gold = minor_gold_value + } + } + } + stress_impact = { + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + has_trait = ambitious + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + + # Wine Cellar - Treasure? + option = { + name = ep3_landless_admin.1050.d + trigger = { + var:domicile_building = flag:wine + } + duel = { + value = medium_skill_rating + skill = stewardship + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + modifier = { + influence_level >= 3 + add = 10 + } + desc = ep3_landless_admin.1050.d.success + send_interface_toast = { + title = ep3_landless_admin.1050.d.success + left_icon = root + add_short_term_gold = minor_gold_value + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + desc = ep3_landless_admin.1050.c.failure + send_interface_toast = { + title = ep3_landless_admin.1050.c.failure + left_icon = root + remove_short_term_gold = minor_gold_value + } + } + } + stress_impact = { + gregarious = medium_stress_impact_loss + generous = medium_stress_impact_loss + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = generous + has_trait = gregarious + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + + # Servants Quarters - Use it for our agents + option = { + name = ep3_landless_admin.1050.e + trigger = { + var:domicile_building = flag:servants + } + duel = { + value = medium_skill_rating + skill = intrigue + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + desc = ep3_landless_admin.1050.e.success + send_interface_toast = { + title = ep3_landless_admin.1050.e.success + left_icon = root + add_character_modifier = { + modifier = ep3_tunnel_servants_modifier + years = 15 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + desc = ep3_landless_admin.1050.c.failure + send_interface_toast = { + title = ep3_landless_admin.1050.c.failure + left_icon = root + remove_short_term_gold = minor_gold_value + } + } + } + stress_impact = { + gregarious = medium_stress_impact_loss + generous = medium_stress_impact_loss + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = 50 + OR = { + has_trait = generous + has_trait = gregarious + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + + # Opt out + option = { + name = ep3_landless_admin.1050.f + + stress_impact = { + lazy = medium_stress_impact_loss + trusting = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = lazy + has_trait = trusting + } + } + } + } + + after = { remove_variable = domicile_building } +} diff --git a/N3OW/events/dlc/ep3/ep3_powerful_families_8.txt b/N3OW/events/dlc/ep3/ep3_powerful_families_8.txt new file mode 100644 index 00000000..4e51b56b --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_powerful_families_8.txt @@ -0,0 +1,2038 @@ +namespace = ep3_powerful_families + +################################################## +# EP3 Powerful Families +# by James Beaumont +# 8000 In High Places +# 8010 Emperor in Distress +# 8020 In the Bud +# 8030 Families That Scheme Together... +# 8040 Cordially +# 8050 An Atrocious Appointment +# 8060 A Villainous Villa +# 8070 Folly +# 8080 Stammering Silence + + + +# In High Places +# 8000 +ep3_powerful_families.8000 = { + type = character_event + title = ep3_powerful_families.8000.t + desc = ep3_powerful_families.8000.desc + theme = administrative + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:influential_family_member + animation = scheme + } + lower_right_portrait = { + character = liege + } + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = yes + } + # No Emperors + top_liege != this + liege = { is_ai = yes } + house = { + any_house_member = { + this != root + any_court_position_employer = { this = root.liege } + ai_rationality > ai_honor + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + house = { + random_house_member = { + limit = { + this != root + any_court_position_employer = { this = root.liege } + ai_rationality > ai_honor + } + save_scope_as = influential_family_member + } + } + liege = { save_scope_as = liege } # for loc + } + + # Spread our influence like a weed + option = { + name = ep3_powerful_families.8000.a + scope:influential_family_member = { + duel = { + skill = intrigue + target = root.liege + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_powerful_families.8000.a.win + left_icon = root + right_icon = scope:influential_family_member + change_influence = medium_influence_gain + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_powerful_families.8000.a.win + left_icon = root + right_icon = scope:influential_family_member + change_influence = minor_influence_gain + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_powerful_families.8000.a.lose + left_icon = root + right_icon = scope:influential_family_member + liege = { + progress_towards_rival_effect = { + REASON = rival_abused_power + CHARACTER = root + OPINION = default_rival_opinion + } + } + } + } + } + } + } + + stress_impact = { + honest = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 1.5 + ai_honor = -1.5 + } + } + } + + # Discover the Empire's dirty secrets + option = { + name = ep3_powerful_families.8000.b + scope:influential_family_member = { + duel = { + skill = intrigue + target = root.liege + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + custom_tooltip = ep3_powerful_families.8000.b.tt + hidden_effect = { + root = { + random_list = { + 75 = { + trigger = { + liege = { + any_secret = { + NOT = { + is_known_by = root + } + } + } + } + send_interface_toast = { + title = ep3_powerful_families.8000.b.win.secret + left_icon = root + right_icon = scope:influential_family_member + liege = { + random_secret = { + limit = { + NOT = { + is_known_by = root + } + } + reveal_to_without_events_effect = { + CHARACTER = root + } + } + } + } + } + 25 = { + send_interface_toast = { + title = ep3_powerful_families.8000.b.win.no_secret + left_icon = root + right_icon = scope:influential_family_member + change_influence = minor_influence_gain + } + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_powerful_families.8000.a.lose + left_icon = root + right_icon = scope:influential_family_member + liege = { + progress_towards_rival_effect = { + REASON = rival_abused_power + CHARACTER = root + OPINION = default_rival_opinion + } + } + } + } + } + } + } + + stress_impact = { + honest = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 1.5 + ai_honor = -1.5 + } + } + } + + # Curry favor with the emperor + option = { + name = ep3_powerful_families.8000.c + liege = { + progress_towards_friend_effect = { + REASON = friend_loyal_servant + CHARACTER = root + OPINION = default_friend_opinion + } + } + stress_impact = { + ambitious = medium_stress_impact_gain + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -1.5 + ai_honor = 1.5 + ai_compassion = 1.5 + } + } + } +} + +# Emperor in Distress +# 8010-8019 +scripted_effect ep3_pf_8010_a_effect = { + scope:generous_family = { + pay_short_term_gold = { + target = liege + gold = medium_gold_value + } + change_influence = medium_influence_gain + } +} +scripted_effect ep3_pf_8010_b_accept_effect = { + scope:war = { + if = { + limit = { + is_attacker = scope:liege + } + add_attacker = scope:generous_family + } + else_if = { + limit = { + is_defender = scope:liege + } + add_defender = scope:generous_family + } + } + scope:generous_family = { + change_influence = major_influence_gain + } +} + +ep3_powerful_families.8010 = { + type = character_event + title = ep3_powerful_families.8010.t + desc = ep3_powerful_families.8010.desc + theme = administrative + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = liege + animation = stress + } + cooldown = { years = 10 } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = yes + } + # No Emperors + top_liege != this + is_at_war_with_liege = no + liege = { + NOT = { has_character_flag = ep3_pf_8010 } + any_character_war = { + OR = { + AND = { + is_attacker = root.liege + attacker_war_score < defender_war_score + } + AND = { + is_defender = root.liege + defender_war_score < attacker_war_score + } + } + NOT = { + is_participant = root + } + } + } + } + + immediate = { + save_scope_as = generous_family + liege = { + save_scope_as = liege # for loc + random_character_war = { + limit = { + OR = { + AND = { + is_attacker = root.liege + attacker_war_score < defender_war_score + } + AND = { + is_defender = root.liege + defender_war_score < attacker_war_score + } + } + NOT = { + is_participant = root + } + } + save_scope_as = war + } + add_character_flag = { + flag = ep3_pf_8010 + years = 15 + } + } + } + + # Send gold for influence + option = { + name = ep3_powerful_families.8010.a + show_as_tooltip = { + ep3_pf_8010_a_effect = yes + } + hidden_effect = { + liege = { + trigger_event = { + id = ep3_powerful_families.8011 + days = 1 + } + } + } + stress_impact = { + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + content = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_rationality = 1.5 + ai_greed = -1.5 + } + } + } + + # Join the war directly + option = { + name = ep3_powerful_families.8010.b + show_as_tooltip = { + random_list = { + 50 = { + show_chance = no + desc = tour_grounds_if_liege_accepts_tt + ep3_pf_8010_b_accept_effect = yes + } + 50 = { + show_chance = no + desc = tour_grounds_if_liege_rejects_tt + change_influence = minor_influence_gain + } + } + } + hidden_effect = { + liege = { + trigger_event = { + id = ep3_powerful_families.8012 + days = 1 + } + } + } + stress_impact = { + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + craven = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 1.5 + ai_honor = 1.5 + ai_boldness = 1.5 + } + } + } + + # Take advantage of the Emperor's weakness + option = { + name = ep3_powerful_families.8010.c + duel = { + skill = intrigue + target = root.liege + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8010.a.win + left_icon = root + right_icon = scope:liege + change_influence = medium_influence_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8010.a.lose + left_icon = root + right_icon = scope:liege + liege = { + progress_towards_rival_effect = { + REASON = rival_abused_power + CHARACTER = root + OPINION = default_rival_opinion + } + } + } + } + } + stress_impact = { + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + content = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -1.5 + ai_honor = -1.5 + } + } + } + + # Not my problem + option = { + name = ep3_powerful_families.8010.d + hidden_effect = { + scope:liege = { + remove_character_flag = ep3_pf_8010 + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1.5 + ai_boldness = -1.5 + } + } + } +} + +ep3_powerful_families.8011 = { + type = letter_event + opening = ep3_powerful_families.8011.t + desc = ep3_powerful_families.8011.desc + sender = scope:generous_family + + # Thanks! + option = { + name = ep3_powerful_families.8011.a + ep3_pf_8010_a_effect = yes + } +} + +ep3_powerful_families.8012 = { + type = character_event + title = ep3_powerful_families.8012.t + desc = ep3_powerful_families.8012.desc + theme = administrative + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:generous_family + animation = personality_honorable + } + + # Accept their offer to help! + option = { + name = ep3_powerful_families.8012.a + scope:generous_family = { + send_interface_toast = { + title = ep3_powerful_families.8012.a.toast + left_icon = scope:generous_family + right_icon = scope:liege + ep3_pf_8010_b_accept_effect = yes + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + greedy = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_rationality = 1.5 + ai_boldness = -1.5 + } + } + } + + # Refuse their help + option = { + name = ep3_powerful_families.8012.b + scope:generous_family = { + send_interface_toast = { + title = ep3_powerful_families.8012.b.toast + left_icon = scope:generous_family + right_icon = scope:liege + change_influence = minor_influence_gain + } + } + stress_impact = { + arbitrary = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + craven = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = -1.5 + ai_boldness = 1.5 + } + } + } +} + +# In the Bud +# You are from a Powerful Family - react to a new Powerful Family emerging +# 8020 +ep3_powerful_families.8020 = { + type = character_event + title = ep3_powerful_families.8020.t + desc = ep3_powerful_families.8020.desc + theme = administrative + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:new_family + animation = personality_honorable + } + + trigger = { + has_ep3_dlc_trigger = yes + government_allows = administrative + house ?= { + is_powerful_family = yes + } + NOT = { + #cooldown + has_character_flag = 8020_powerful_family_cooldown + } + } + + immediate = { + add_character_flag = { + flag = 8020_powerful_family_cooldown + years = 10 + } + } + + # Stifle their influence + option = { + name = ep3_powerful_families.8020.a + duel = { + skills = { intrigue stewardship } + target = scope:new_family + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8020.a.win + left_icon = root + right_icon = scope:new_family + scope:new_family = { + set_relation_rival = { + target = root + reason = rival_stifled_my_influence + } + } + change_influence = major_influence_gain + scope:new_family = { + change_influence = major_influence_loss + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8020.a.lose + left_icon = root + right_icon = scope:new_family + scope:new_family = { + progress_towards_rival_effect = { + CHARACTER = root + REASON = rival_stifled_my_influence + OPINION = default_rival_opinion + } + } + } + } + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1.5 + ai_rationality = -1.5 + ai_boldness = 1.5 + ai_greed = 1.5 + ai_vengefulness = 1.5 + } + } + } + + # Reach out an olive branch + option = { + name = ep3_powerful_families.8020.b + duel = { + skill = diplomacy + target = scope:new_family + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8020.b.win + left_icon = root + right_icon = scope:new_family + scope:new_family = { + set_relation_friend = { + target = root + reason = friend_aided_my_family + } + } + change_influence = medium_influence_loss + scope:new_family = { + change_influence = medium_influence_gain + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8020.b.lose + left_icon = root + right_icon = scope:new_family + change_influence = medium_influence_loss + } + } + } + stress_impact = { + arbitrary = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + shy = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 1.5 + ai_honor = 1.5 + ai_rationality = 1.5 + ai_sociability = 1.5 + ai_greed = 1.5 + ai_vengefulness = -1.5 + } + } + } + + # I don't care + option = { + name = ep3_powerful_families.8020.c + stress_impact = { + ambitious = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + lazy = minor_stress_impact_loss + shy = minor_stress_impact_loss + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -1.5 + ai_sociability = -1.5 + ai_greed = -1.5 + } + } + } +} + +# Families That Scheme Together... +# 8030 +ep3_powerful_families.8030 = { + type = character_event + title = ep3_powerful_families.8030.t + desc = ep3_powerful_families.8030.desc + theme = administrative + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:friendly_family + animation = personality_honorable + } + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = yes + } + # No Emperors + top_liege != this + is_a_faction_member = yes + any_relation = { + type = friend + is_ai = yes + liege = root.liege + house ?= { + is_powerful_family = yes + } + can_join_faction = root.joined_faction + OR = { + NOT = { exists = joined_faction } + joined_faction != root.joined_faction + } + } + } + + immediate = { + random_relation = { + type = friend + limit = { + is_ai = yes + liege = root.liege + house ?= { + is_powerful_family = yes + } + can_join_faction = root.joined_faction + OR = { + NOT = { exists = joined_faction } + joined_faction != root.joined_faction + } + } + save_scope_as = friendly_family + } + joined_faction = { save_scope_as = faction } + } + + # Coax them into the faction + option = { + name = ep3_powerful_families.8030.a + change_influence = medium_influence_loss + duel = { + skill = diplomacy + target = scope:friendly_family + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8030.a.win + left_icon = root + right_icon = scope:friendly_family + scope:friendly_family = { + join_faction_forced = { + faction = scope:faction + forced_by = root + years = 10 + } + + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8030.a.lose + left_icon = root + right_icon = scope:friendly_family + } + } + } + stress_impact = { + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1.5 + ai_rationality = 1.5 + ai_boldness = 1.5 + ai_vengefulness = 1.5 + } + } + } + + # This is not what friends do + option = { + name = ep3_powerful_families.8030.b + change_influence = minor_influence_gain + stress_impact = { + ambitious = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + schemer = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 1.5 + ai_rationality = -1.5 + ai_boldness = -1.5 + ai_vengefulness = -1.5 + } + } + } +} + +# Cordially +# Your estate is on someone else's lands, invite them round for tea? +# 8040 +ep3_powerful_families.8040 = { + type = character_event + title = ep3_powerful_families.8040.t + desc = ep3_powerful_families.8040.desc + theme = administrative + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:other_family + animation = personality_honorable + } + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + is_available = yes + house ?= { + is_powerful_family = yes + } + domicile ?= { + is_domicile_type = estate + trigger_if = { + limit = { + root = { top_liege != this } + } + domicile_location.county.holder.liege != root + } + domicile_location.county.holder.house.house_head = { + this != root + exists = house + house != root.house + house = { + is_powerful_family = yes + } + is_available_ai_adult = yes + } + } + } + + immediate = { + domicile ?= { + domicile_location.county = { + save_scope_as = location + holder.house.house_head = { + save_scope_as = other_family + } + } + } + } + + # Have them over for a good dinner + option = { + name = ep3_powerful_families.8040.a + change_influence = minor_influence_loss + duel = { + skill = diplomacy + target = scope:other_family + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8040.a.win + left_icon = root + right_icon = scope:other_family + scope:other_family = { + progress_towards_friend_effect = { + REASON = friend_dinner + CHARACTER = root + OPINION = default_friend_opinion + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8040.a.lose + left_icon = root + right_icon = scope:other_family + } + } + } + stress_impact = { + ambitious = minor_stress_impact_gain + shy = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:other_family + multiplier = 0.1 + } + ai_value_modifier = { + ai_sociability = 1.5 + ai_rationality = 1.5 + ai_boldness = -1.5 + ai_vengefulness = -1.5 + } + } + } + + # Spread your influence in their lands + option = { + name = ep3_powerful_families.8040.b + scope:other_family = { + progress_towards_rival_effect = { + REASON = rival_plotting_against_me + CHARACTER = root + OPINION = default_rival_opinion + } + } + duel = { + skills = { intrigue stewardship } + target = scope:other_family + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8040.b.win + left_icon = root + right_icon = scope:other_family + change_influence = medium_influence_gain + scope:other_family = { + change_influence = minor_influence_loss + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8040.b.lose + left_icon = root + right_icon = scope:other_family + change_influence = medium_influence_loss + scope:other_family = { + change_influence = minor_influence_gain + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1.5 + ai_rationality = -1.5 + ai_boldness = 1.5 + ai_vengefulness = 1.5 + } + } + } + + # Keep a low profile + option = { + name = ep3_powerful_families.8040.c + stress_impact = { + ambitious = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = -1.5 + ai_boldness = -2 + ai_vengefulness = -1.5 + } + } + } +} + +# A Villainous Villa +# A rival family's estate is on your lands, try and mess with them? +# 8060 +ep3_powerful_families.8060 = { + type = character_event + title = ep3_powerful_families.8060.t + desc = ep3_powerful_families.8060.desc + theme = administrative + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:other_family + animation = schadenfreude + } + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + is_available = yes + house ?= { + is_powerful_family = yes + } + any_relation = { + type = rival + top_liege = root.top_liege + exists = house + house != root.house + house = { + is_powerful_family = yes + } + is_available_ai_adult = yes + domicile ?= { + is_domicile_type = estate + domicile_location.county.holder = root + } + } + } + + immediate = { + random_relation = { + type = rival + limit = { + top_liege = root.top_liege + exists = house + house != root.house + house = { + is_powerful_family = yes + } + is_available_ai_adult = yes + domicile ?= { + is_domicile_type = estate + domicile_location.county.holder = root + } + } + domicile.domicile_location.county = { save_scope_as = location } + save_scope_as = other_family + } + } + + # Try to steal their stuff! + option = { + name = ep3_powerful_families.8060.a + scope:other_family = { + progress_towards_rival_effect = { + REASON = rival_plotting_against_me + CHARACTER = root + OPINION = default_rival_opinion + } + } + duel = { + skill = intrigue + target = scope:other_family + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8060.a.win + left_icon = root + right_icon = scope:other_family + scope:other_family = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8060.a.lose + left_icon = root + right_icon = scope:other_family + scope:other_family = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + add_opinion = { + modifier = theft_opinion + target = root + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8060.a.lose + left_icon = root + right_icon = scope:other_family + scope:other_family = { + add_opinion = { + modifier = theft_opinion + target = root + } + } + } + } + } + stress_impact = { + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:other_family + multiplier = 0.1 + } + ai_value_modifier = { + ai_honor = -1.5 + ai_boldness = 1.5 + ai_vengefulness = 3.5 + ai_greed = 1.5 + } + } + } + + # Bribe their servants + option = { + name = ep3_powerful_families.8060.b + remove_short_term_gold = minor_gold_value + change_influence = minor_influence_gain + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + short_term_gold <= minor_gold_value + } + ai_value_modifier = { + ai_rationality = 1.5 + ai_boldness = 1.5 + ai_vengefulness = -1.5 + ai_greed = -1.5 + } + } + } + + # Nah nah nah + option = { + name = ep3_powerful_families.8060.c + stress_impact = { + ambitious = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = -1.5 + ai_boldness = -2 + ai_vengefulness = -1.5 + } + } + } +} + +# Folly +# One of your young house members has been hanging out at a rival family's estate +# 8070 +ep3_powerful_families.8070 = { + type = character_event + title = ep3_powerful_families.8070.t + desc = ep3_powerful_families.8070.desc + theme = administrative + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:child + animation = fear + } + lower_right_portrait = { + character = scope:other_family + } + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + is_available = yes + house ?= { + is_powerful_family = yes + } + exists = domicile + house = { + any_house_member = { + top_liege = root.top_liege + is_available_ai = yes + is_adult = no + child_not_infant_trigger = yes # Should generally only be teens + } + } + top_liege = { + any_powerful_family = { + this != root.house + house_head = { + is_available_ai_adult = yes + domicile ?= { + is_domicile_type = estate + domicile_location.county = root.domicile.domicile_location.county + } + OR = { + has_relation_rival = root + root = { + house_has_feud_relation_with_trigger = { TARGET = prev } + } + } + } + } + } + } + + immediate = { + house = { + random_house_member = { + limit = { + top_liege = root.top_liege + is_available_ai = yes + is_adult = no + child_not_infant_trigger = yes + } + save_scope_as = child + } + } + top_liege = { + random_powerful_family = { + limit = { + this != root.house + house_head = { + is_available_ai_adult = yes + domicile ?= { + is_domicile_type = estate + domicile_location.county = root.domicile.domicile_location.county + } + OR = { + has_relation_rival = root + root = { + house_has_feud_relation_with_trigger = { TARGET = prev } + } + } + } + } + house_head = { save_scope_as = other_family } + } + } + } + + # Convince them to give you info on the family + option = { + name = ep3_powerful_families.8070.a + duel = { + skills = { intrigue diplomacy } + target = scope:child + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8070.a.win + left_icon = root + right_icon = scope:child + scope:other_family = { + change_influence = medium_influence_loss + } + change_influence = medium_influence_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8070.a.lose + left_icon = root + right_icon = scope:child + scope:other_family = { + progress_towards_rival_effect = { + REASON = rival_plotting_against_me + CHARACTER = root + OPINION = default_rival_opinion + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8070.a.lose + left_icon = root + right_icon = scope:child + scope:other_family = { + progress_towards_rival_effect = { + REASON = rival_plotting_against_me + CHARACTER = root + OPINION = default_rival_opinion + } + } + scope:other_family = { + change_influence = medium_influence_gain + } + change_influence = minor_influence_loss + } + } + } + stress_impact = { + content = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:other_family + multiplier = -0.1 + } + ai_value_modifier = { + ai_honor = -1.5 + ai_boldness = 1.5 + ai_vengefulness = 3.5 + ai_greed = 1.5 + } + } + } + + # Try to leverage them to break the rivalry + option = { + name = ep3_powerful_families.8070.b + scope:child = { + duel = { + skill = diplomacy + target = scope:other_family + 15 = { # Crit success, rivalry is gone + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + send_interface_toast = { + title = ep3_powerful_families.8070.b.crit_win + left_icon = root + right_icon = scope:child + upgrade_to_friend_effect = { + CHARACTER = scope:other_family + REASON = friend_making_ammends + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8070.b.win + left_icon = root + right_icon = scope:child + scope:other_family = { + progress_towards_friend_effect = { + REASON = friend_making_ammends + CHARACTER = root + OPINION = default_rival_opinion + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8070.b.lose + left_icon = root + right_icon = scope:child + scope:other_family = { + progress_towards_rival_effect = { + REASON = rival_plotting_against_me + CHARACTER = root + OPINION = default_rival_opinion + } + } + scope:other_family = { + change_influence = medium_influence_gain + } + change_influence = minor_influence_loss + } + } + } + } + stress_impact = { + vengeful = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:other_family + multiplier = 0.1 + } + ai_value_modifier = { + ai_compassion = 1.5 + ai_rationality = 1.5 + ai_vengefulness = -1.5 + } + } + } + + # Just let the kid do as the kid do + option = { + name = ep3_powerful_families.8070.c + stress_impact = { + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -2 + } + } + } +} + +# Stammering Silence +# Another rival family is giving a speech and chokes up +# 8080 +ep3_powerful_families.8080 = { + type = activity_event + title = ep3_powerful_families.8080.t + desc = ep3_powerful_families.8080.desc + theme = feast_activity + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:other_family + animation = pain + } + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + house ?= { + OR = { + is_powerful_family = yes + is_dominant_family = yes + } + } + scope:activity = { + any_attending_character = { + OR = { + this = root.liege + liege = root.liege + } + house ?= { + this != root.house + is_powerful_family = yes + is_dominant_family = yes + } + is_ai = yes + } + } + } + + immediate = { + house = { + random_house_member = { + limit = { + top_liege = root.top_liege + is_available_ai_adult = yes + is_adult = no + child_not_infant_trigger = yes + } + save_scope_as = child + } + } + scope:activity = { + random_attending_character = { + limit = { + OR = { + this = root.liege + liege = root.liege + } + house ?= { + this != root.house + is_powerful_family = yes + is_dominant_family = yes + } + is_ai = yes + } + save_scope_as = other_family + } + } + } + + # Steal their thunder! + option = { + name = ep3_powerful_families.8080.a + progress_towards_rival_effect = { + REASON = rival_humiliated_at_feast + CHARACTER = scope:other_family + OPINION = default_rival_opinion + } + change_influence = minor_influence_gain + add_prestige = medium_prestige_gain + stress_impact = { + content = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:other_family + multiplier = -0.1 + } + ai_value_modifier = { + ai_honor = -1.5 + ai_boldness = 1.5 + ai_vengefulness = 3.5 + } + } + } + + # Support them + option = { + name = ep3_powerful_families.8080.b + progress_towards_friend_effect = { + REASON = friend_supported_at_feast + CHARACTER = scope:other_family + OPINION = default_friend_opinion + } + stress_impact = { + ambitious = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:other_family + multiplier = 0.1 + } + ai_value_modifier = { + ai_sociability = 1.5 + ai_honor = 1.5 + ai_vengefulness = -3.5 + } + } + } +} + +# Civil Savagery +# You're forced to sit next to someone from a rival family as they schmooze the liege +# 8090 +scripted_trigger ep3_pf_rival_fam_trigger = { + house ?= { + is_powerful_family = yes + } + top_liege != this + top_liege = root.top_liege + house != root.house + OR = { + house.house_head = { + has_relation_rival = root.house.house_head + } + has_relation_rival = root + } + is_ai = yes +} + +ep3_powerful_families.8090 = { + type = activity_event + title = ep3_powerful_families.8090.t + desc = ep3_powerful_families.8090.desc + theme = feast_activity + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:other_family + animation = rage + } + lower_right_portrait = { + character = scope:liege + } + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = yes + } + top_liege != this + scope:activity = { + any_attending_character = { + this = root.liege + } + any_attending_character = { + ep3_pf_rival_fam_trigger = yes + } + } + } + + immediate = { + scope:activity = { + random_attending_character = { + limit = { + ep3_pf_rival_fam_trigger = yes + } + save_scope_as = other_family + } + } + top_liege = { save_scope_as = liege } + } + + # Steal their thunder! + option = { + name = ep3_powerful_families.8090.a + progress_towards_rival_effect = { + REASON = rival_humiliated_at_feast + CHARACTER = scope:other_family + OPINION = default_rival_opinion + } + duel = { + skills = { stewardship diplomacy } + target = scope:liege + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8090.a.win + left_icon = root + right_icon = scope:liege + scope:other_family = { + change_influence = medium_influence_loss + } + change_influence = medium_influence_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8090.a.lose + left_icon = root + right_icon = scope:liege + scope:other_family = { + progress_towards_rival_effect = { + REASON = rival_plotting_against_me + CHARACTER = root + OPINION = default_rival_opinion + } + } + scope:other_family = { + change_influence = medium_influence_gain + } + change_influence = minor_influence_loss + } + } + } + stress_impact = { + content = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:other_family + multiplier = -0.1 + } + ai_value_modifier = { + ai_honor = -1.5 + ai_boldness = 1.5 + ai_sociability = 1.5 + ai_vengefulness = 3.5 + } + } + } + + # Shut up and sit tight + option = { + name = ep3_powerful_families.8090.b + scope:other_family = { + change_influence = medium_influence_gain + } + stress_impact = { + ambitious = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:other_family + multiplier = 0.1 + } + ai_value_modifier = { + ai_sociability = 1.5 + ai_honor = 1.5 + ai_vengefulness = -3.5 + } + } + } +} + +# Civil Service +# Try to convince your liege to hire your relative +# 8100 +scripted_trigger ep3_relative_valid_for_court_position_trigger = { + is_adult = yes + is_ruler = no + has_any_court_position = no + is_councillor = no + top_liege = root.top_liege + OR = { + liege = { is_ai = yes } + liege = root + liege = root.liege + } + can_be_employed_as = court_poet_court_position +} + +ep3_powerful_families.8100 = { + type = activity_event + title = ep3_powerful_families.8100.t + desc = ep3_powerful_families.8100.desc + theme = feast_activity + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:liege + animation = toast_goblet + } + lower_left_portrait = { + character = scope:cp_fam + } + cooldown = { years = 15 } + + trigger = { + government_allows = administrative + house ?= { + is_powerful_family = yes + } + top_liege != this + house = { + any_house_member = { + ep3_relative_valid_for_court_position_trigger = yes + } + } + liege = { is_ai = yes } + scope:activity = { + any_attending_character = { + this = root.liege + } + } + } + + immediate = { + hidden_effect = { + house = { + random_house_member = { + limit = { + ep3_relative_valid_for_court_position_trigger = yes + } + add_trait = lifestyle_poet + save_scope_as = cp_fam + } + } + liege = { + save_scope_as = liege + add_courtier = scope:cp_fam + } + } + } + + # My family member should be your poet! + option = { + name = ep3_powerful_families.8100.a + duel = { + skill = diplomacy + target = scope:liege + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8100.a.win + left_icon = root + right_icon = scope:liege + scope:liege = { + court_position_grant_effect = { + EMPLOYER = scope:liege + POS = court_poet + CANDIDATE = scope:cp_fam + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_powerful_families.8100.a.lose + left_icon = root + right_icon = scope:liege + change_influence = minor_influence_loss + } + } + } + stress_impact = { + content = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 1.5 + ai_sociability = 1.5 + } + } + } + + # Make pleasant conversation + option = { + name = ep3_powerful_families.8100.b + reverse_add_opinion = { + modifier = feast_had_good_talk + target = scope:liege + } + + change_influence = minor_influence_gain + stress_impact = { + ambitious = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = -1.5 + ai_honor = -1.5 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_roman_restoration_events.txt b/N3OW/events/dlc/ep3/ep3_roman_restoration_events.txt new file mode 100644 index 00000000..3ea6103d --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_roman_restoration_events.txt @@ -0,0 +1,521 @@ +namespace = ep3_roman_restoration + +####################################### +### +### EP3 RESTORE ROME STORY CYCLE EVENTS +### by Chad Uhl +### +### 0100 Justinian's Dream +### 0101-0109 Rome Reformed Notifications +### 0300-0590 Post-Restoration Difficulties +### +####################################### + +# Justinian's Dream +# Event fired on story cycle setup informing the player that they can form the roman empire +ep3_roman_restoration.0001 = { + type = character_event + title = ep3_roman_restoration.0001.t + desc = ep3_roman_restoration.0001.desc + theme = emperor + + override_background = { + trigger = { capital_county = title:c_byzantion } + reference = ep3_constantinople + } + + left_portrait = { + character = root + animation = emotion_thinking_scepter + } + + trigger = { + NOT = { has_global_variable = flag_restored_roman_empire } + } + + option = { + name = ep3_roman_restoration.0001.a + custom_tooltip = ep3_roman_restoration.0001.a.tt + decision:restore_roman_empire_decision = { + open_view_data = { + view = decision_detail + player = root + } + } + } +} + +# Should I LARP or nah? +ep3_roman_restoration.0100 = { + type = character_event + window = fullscreen_event + title = ep3_roman_restoration.0100.t + desc = ep3_roman_restoration.0100.desc + theme = emperor + override_background = { reference = ep3_fullscreen_restore_rome } + + immediate = { + save_scope_as = scoped_emperor + } + + option = { # LARP (Hard Mode) + name = ep3_roman_restoration.0100.a + custom_tooltip = ep3_roman_restoration.hard_mode + custom_tooltip = ep3_roman_restoration.end_hard_mode + custom_tooltip = ep3_roman_restoration.invasion_cb + every_held_title = { + limit = { + is_head_of_faith = yes + } + root = { + destroy_title = prev + } + } + set_character_faith = faith:hellenic_pagan + primary_title = { set_state_faith = faith:hellenic_pagan } + every_held_title = { + custom = custom.every_held_county + title_tier = county + set_county_faith = faith:hellenic_pagan + } + every_vassal = { + custom = custom.every_vassal + limit = { + NOT = { + any_held_title = { + is_head_of_faith = yes # you cannot convert the Ecumenical Patriarch, sorry + } + } + } + custom_tooltip = { + text = may_choose_to_convert_hellenic_desc + run_interaction = { # We use the same interaction as when creating a new faith to keep a consistent behaviour, since that is essentially what you're doing here + interaction = ask_for_conversion_interaction + actor = root + recipient = this + execute_threshold = accept + } + } + } + custom_tooltip = { + text = ep3_roman_restoration.household_gods_tenet + set_global_variable = household_gods_tenet_unlocked + } + custom_tooltip = { + text = uses_custom_caesar_flavourization_tt + set_variable = uses_custom_caesar_flavourization + } + if = { + limit = { + any_owned_story = { type = ep3_story_cycle_restoring_rome } + } + random_owned_story = { + type = ep3_story_cycle_restoring_rome + set_variable = roman_empire_hard_mode + } + } + } + + option = { # Roleplay option (become Hellenic without Hard Mode) + name = ep3_roman_restoration.0100.c + custom_tooltip = ep3_roman_restoration.easy_mode + every_held_title = { + limit = { + is_head_of_faith = yes + } + root = { + destroy_title = prev + } + } + set_character_faith = faith:hellenic_pagan + primary_title = { set_state_faith = faith:hellenic_pagan } + every_held_title = { + custom = custom.every_held_county + title_tier = county + set_county_faith = faith:hellenic_pagan + } + every_vassal = { + custom = custom.every_vassal + limit = { + NOT = { + any_held_title = { + is_head_of_faith = yes # you cannot convert the Ecumenical Patriarch, sorry + } + } + } + custom_tooltip = { + text = may_choose_to_convert_hellenic_desc + run_interaction = { # We use the same interaction as when creating a new faith to keep a consistent behaviour, since that is essentially what you're doing here + interaction = ask_for_conversion_interaction + actor = root + recipient = this + execute_threshold = accept + } + } + } + custom_tooltip = { + text = ep3_roman_restoration.household_gods_tenet + set_global_variable = household_gods_tenet_unlocked + } + custom_tooltip = { + text = uses_custom_caesar_flavourization_tt + set_variable = uses_custom_caesar_flavourization + } + } + + option = { # Easy Mode + name = ep3_roman_restoration.0100.b + custom_tooltip = ep3_roman_restoration.easy_mode + } + + after = { + create_roman_empire_scripted_effect = yes + set_nickname_effect = { NICKNAME = nick_the_glorious } + # Send narrative fluff to other players (if any). + every_player = { + limit = { this != root } + trigger_event = ep3_roman_restoration.0101 + } + } +} + +# Some chucklefuck restored Rome +ep3_roman_restoration.0101 = { + type = character_event + window = fullscreen_event + title = roman_restoration.0002.t + desc = { + desc = ep3_roman_restoration.0101.intro + first_valid = { + triggered_desc = { + trigger = { scope:scoped_emperor.primary_title.state_faith ?= faith:hellenic_pagan } + desc = ep3_roman_restoration.0101.hellenic + } + triggered_desc = { + trigger = { scope:scoped_emperor.primary_title.state_faith ?= faith:orthodox } + desc = ep3_roman_restoration.0101.orthodox + } + desc = ep3_roman_restoration.0101.fallback + } + desc = ep3_roman_restoration.0101.outro + } + theme = emperor + override_background = { reference = ep3_fullscreen_restore_rome } + + immediate = { + #Same-faith non-empire tier rulers are over-awed. + if = { + limit = { faith = scope:scoped_emperor.primary_title.state_faith } + play_music_cue = "mx_cue_epic_sacral_moment" + } + #Otherwise, this is a tacit statement of imperial threat. + else = { play_music_cue = "mx_cue_combat_2" } + } + + option = { + name = ep3_roman_restoration.0101.a + } +} + + +####################################### +### POST-ROME DIFFICULTIES + +# Your inefficient governor messed up, causing mass loss in popular opinion. Can you fix it? +ep3_roman_restoration.0300 = { + type = character_event + title = ep3_roman_restoration.0300.t + desc = ep3_roman_restoration.0300.desc + theme = emperor + + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:inefficient_governor + animation = shock + } + + cooldown = { years = 20 } + + immediate = { + ordered_vassal = { + limit = { + is_governor = yes + is_ai = yes + } + order_by = { # Mostly sort by governor efficiency + value = governor_efficiency + multiply = -10 + # Prefer governors with a larger realm size for more difficulty + add = sub_realm_size + } + save_scope_as = inefficient_governor + } + custom_tooltip = ep3_roman_restoration.0300.efficiency + } + + option = { # Stewardship Challenge + name = ep3_roman_restoration.0300.a + duel = { + skill = stewardship + value = excellent_skill_level + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_roman_restoration.0300.a.success + left_icon = scope:inefficient_governor + right_icon = scope:inefficient_governor.primary_title + + scope:inefficient_governor = { + every_sub_realm_county = { + custom = ep3_roman_restoration.0300.every_sub_realm_county + add_county_modifier = { + modifier = restore_rome_recuperated_county_opinion_modifier + years = 10 + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_roman_restoration.0300.a.failure + left_icon = scope:inefficient_governor + right_icon = scope:inefficient_governor.primary_title + + scope:inefficient_governor = { + every_sub_realm_county = { + custom = ep3_roman_restoration.0300.every_sub_realm_county + add_county_modifier = { + modifier = restore_rome_devastated_county_opinion_modifier + years = 10 + } + } + } + } + } + } + } + + option = { # Fire the Governor + name = ep3_roman_restoration.0300.b + change_influence = massive_influence_loss + save_scope_as = actor + scope:inefficient_governor = { + save_scope_as = recipient + primary_title = { save_scope_as = landed_title } + } + save_scope_value_as = { + name = hook + value = no + } + scope:inefficient_governor = { + every_sub_realm_county = { + custom = ep3_roman_restoration.0300.every_sub_realm_county + add_county_modifier = { + modifier = restore_rome_recuperated_county_opinion_modifier + years = 10 + } + } + force_step_down_landed_titles = yes + } + } + + option = { # Opt-Out + name = ep3_roman_restoration.0300.c + + scope:inefficient_governor = { + every_sub_realm_county = { + custom = ep3_roman_restoration.0300.every_sub_realm_county + add_county_modifier = { + modifier = restore_rome_lowered_county_opinion_modifier + years = 10 + } + } + } + + stress_impact = { + base = medium_stress_impact_loss + lazy = minor_stress_impact_loss + diligent = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } +} + +# Every 10-30 years, a random kingdom will raid you +ep3_roman_restoration.0500 = { + type = character_event + title = ep3_roman_restoration.0500.t + desc = ep3_roman_restoration.0500.desc + theme = emperor + + left_portrait = { + character = root + animation = emotion_thinking_scepter + } + + right_portrait = { + character = scope:marshal + animation = inspect_weapon + } + + lower_center_portrait = scope:target_kingdom + + cooldown = { years = { 10 30 } } + + trigger = { + exists = cp:councillor_marshal + any_neighboring_top_liege_realm_owner = { + is_ai = yes + is_at_war = no + primary_title = { tier >= tier_kingdom } + NOR = { + is_allied_to = root + any_truce_target = { this = root } + has_relation_friend = root + has_relation_lover = root + } + any_top_realm_border_county = { + any_neighboring_county = { + holder.top_liege = root + NOT = { + title_province = { has_province_modifier = recently_looted_modifier } + } + } + } + } + } + + immediate = { + cp:councillor_marshal = { save_scope_as = marshal } + ordered_neighboring_top_liege_realm_owner = { + limit = { + is_ai = yes + is_at_war = no + primary_title = { tier >= tier_kingdom } + any_top_realm_border_county = { + any_neighboring_county = { + holder.top_liege = root + NOT = { + title_province = { has_province_modifier = recently_looted_modifier } + } + } + } + } + order_by = { + value = 1 + add = { # inverted opinion since we're looking for ppl who hate you + value = "opinion(root)" + multiply = -1 + } + if = { + limit = { can_raid_trigger = yes } + add = 50 + } + } + save_scope_as = target_kingdom + } + scope:target_kingdom = { + random_top_realm_border_county = { + limit = { + any_neighboring_county = { + holder.top_liege = root + NOT = { + title_province = { has_province_modifier = recently_looted_modifier } + } + } + } + random_neighboring_county = { + limit = { + holder.top_liege = root + NOT = { + title_province = { has_province_modifier = recently_looted_modifier } + } + } + save_scope_as = target_county + } + } + } + } + + option = { + name = ep3_roman_restoration.0500.a + } + + after = { + scope:target_kingdom = { + start_war = { + cb = ep3_roman_empire_border_war + target = root + target_title = scope:target_county + } + } + } +} + +# Special Bubonic Plague Spawns - Commented out and disabled because this is not very fun +#ep3_roman_restoration.0510 = { +# hidden = yes +# +# immediate = { +# random_realm_county = { +# limit = { exists = holder } +# holder = { save_scope_as = target_holder } +# save_scope_as = infected_county +# title_province = { +# save_scope_as = target_province +# create_epidemic_outbreak = { +# type = bubonic_plague +# intensity = major +# save_scope_as = epidemic +# } +# } +# } +# trigger_event = epidemic_events.1100 +# } +#} + +# Mongol Invasion Spawns +ep3_roman_restoration.0520 = { + scope = none + hidden = yes + + trigger = { + NOR = { + has_global_variable = mongols_have_appeared + any_player = { + THIS = culture:mongol.culture_head + realm_size >= 100 + } + } + } + + immediate = { + set_global_variable = { + name = mongols_have_appeared + value = yes + } + debug_log = "Mongols appeared!" + debug_log_date = yes + spawn_temujin_character_effect = yes + scope:temujin = { + save_scope_as = story_owner + create_story = story_mongol_invasion + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt b/N3OW/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt new file mode 100644 index 00000000..26ce7e17 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_story_cycle_admin_eunuch_events.txt @@ -0,0 +1,6578 @@ +namespace = ep3_story_cycle_admin_eunuch + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_event_trigger = { + scope:eunuch_temp ?= { + is_available = yes + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_save_scopes_effect = { + random_owned_story = { + type = story_cycle_admin_eunuch + save_scope_as = story + story_owner = { save_scope_as = emperor } + var:eunuch ?= { save_scope_as = eunuch } + var:admin_title ?= { save_scope_as = admin_title } + var:protege ?= { save_scope_as = protege } + var:student ?= { save_scope_as = student } + var:rival ?= { save_scope_as = rival } + var:seducer ?= { save_temporary_scope_as = seducer } + var:spouse ?= { save_temporary_scope_as = spouse } + var:puppet ?= { save_temporary_scope_as = puppet } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_realm_trigger = { + is_ai = no + highest_held_title_tier >= tier_empire + top_liege = this + government_allows = administrative + culture = { has_cultural_parameter = can_appoint_chief_eunuch } + NOR = { + has_diarchy_type = co_emperorship + any_owned_story = { type = story_cycle_admin_eunuch } + exists = primary_title.var:story_cycle_admin_eunuch_cooldown + } + NAND = { + has_active_diarchy = yes + is_ai = yes + diarch = { is_ai = no } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = { + is_adult = yes + is_ruler = no + is_available = yes + is_healthy = yes + top_liege ?= root.top_liege + is_eunuch_trigger = yes + NOR = { + has_trait = content + has_trait = humble + has_trait = honest + has_relation_friend = root + has_relation_lover = root + } + trigger_if = { + limit = { exists = house } + house != root.top_liege.house + } + sum_of_all_skills_value >= 20 +} + +scripted_trigger ep3_story_cycle_admin_eunuch_noble_family_trigger = { + holder = { + top_liege = root.top_liege + house ?= { + this != root.top_liege.house + any_house_member = { + count >= 1 + ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = yes + } + any_house_member = { + count >= 3 + top_liege = root.top_liege + is_eunuch_trigger = no + } + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_create_story_effect = { + create_story = { + type = story_cycle_admin_eunuch + save_scope_as = story + } + scope:story = { + set_variable = { name = eunuch value = scope:eunuch } + } + scope:eunuch = { + if = { + limit = { employer != root } + set_employer = root + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_save_origin_effect = { + random = { + chance = 50 + random_neighboring_top_liege_realm_owner = { save_scope_as = origin_liege } + } + if = { + limit = { NOT = { exists = scope:origin_liege } } + save_scope_as = origin_liege + } + scope:origin_liege ?= { + random_sub_realm_county = { + limit = { duchy != root.capital_county.duchy } + alternative_limit = { always = yes } + random = { + chance = 50 + random_neighboring_county = { + limit = { duchy != root.capital_county.duchy } + alternative_limit = { always = yes } + save_scope_as = origin + } + } + if = { + limit = { NOT = { exists = scope:origin } } + save_scope_as = origin + } + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_create_eunuch_effect = { + ep3_story_cycle_admin_eunuch_save_origin_effect = yes + hidden_effect = { + create_character = { + culture = scope:origin.culture + faith = root.faith + employer = root + gender = male + age = { + integer_range = { + min = 25 + max = 45 + } + } + diplomacy = { + min_template_average_skill + max_template_average_skill + } + martial = { + min_template_low_skill + max_template_low_skill + } + stewardship = { + min_template_average_skill + max_template_average_skill + } + intrigue = { + min_template_average_skill + max_template_average_skill + } + learning = { + min_template_average_skill + max_template_average_skill + } + random_traits_list = { + count = 1 + education_diplomacy_3 = { weight = { base = 30 } } + education_stewardship_3 = { weight = { base = 30 } } + education_intrigue_3 = { weight = { base = 30 } } + education_diplomacy_4 = { weight = { base = 10 } } + education_stewardship_4 = { weight = { base = 10 } } + education_intrigue_4 = { weight = { base = 10 } } + } + random_traits_list = { + count = 1 + beardless_eunuch = { weight = { base = 90 } } + eunuch_1 = { weight = { base = 10 } } + } + random_traits_list = { + count = 3 + ambitious = {} + arrogant = {} + stubborn = {} + deceitful = {} + diligent = {} + callous = {} + greedy = {} + } + random_traits = yes + dynasty = none + save_scope_as = eunuch + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_create_family_children_effect = { + save_scope_value_as = { + name = count + value = { + value = { 2 3 } + round = yes + } + } + save_scope_value_as = { + name = min_age + value = $MIN_AGE$ + } + save_scope_value_as = { + name = max_age + value = { + value = $PARENT$.age + add = -20 + } + } + while = { + count = scope:count + create_character = { + culture = $PARENT$.culture + faith = $PARENT$.faith + employer = root + age = { + integer_range = { + min = scope:min_age + max = scope:max_age + } + } + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + dynasty_house = scope:parent.house + save_scope_as = newly_created_character + } + $PARENT$ = { + if = { + limit = { is_female = yes } + scope:newly_created_character = { set_mother = $PARENT$ } + } + else = { + scope:newly_created_character = { set_father = $PARENT$ } + } + } + scope:newly_created_character = { + if = { + limit = { has_trait = infertile } + remove_trait = infertile + } + if = { + limit = { is_male = yes } + random = { + chance = 20 + random_list = { + 90 = { add_trait = beardless_eunuch } + 10 = { add_trait = eunuch_1 } + } + } + } + add_to_list = eunuch_$TYPE$ + add_to_list = new_arrivals + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_create_family_effect = { + scope:eunuch ?= { + hidden_effect = { + if = { + limit = { + is_lowborn = yes + any_close_family_member = { count < 3 } + NOT = { has_character_flag = eunuch_family_generated } + } + father ?= { save_scope_as = eunuch_father } + mother ?= { save_scope_as = eunuch_mother } + every_sibling = { + add_to_list = eunuch_siblings + every_child = { add_to_list = eunuch_niblings } + } + add_character_flag = eunuch_family_generated + # Parents + if = { + limit = { + NOR = { + exists = scope:eunuch_father + exists = scope:eunuch_mother + } + } + save_scope_value_as = { + name = parent_min_age + value = { + value = scope:eunuch.age + add = 20 + } + } + save_scope_value_as = { + name = parent_max_age + value = { + value = scope:eunuch.age + add = 40 + max = 80 + } + } + create_character = { + culture = scope:eunuch.culture + faith = scope:eunuch.faith + employer = root + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + age = { + integer_range = { + min = scope:parent_min_age + max = scope:parent_max_age + } + } + dynasty = generate + save_scope_as = parent + } + scope:parent ?= { + add_to_list = new_arrivals + if = { + limit = { is_female = yes } + save_scope_as = eunuch_mother + scope:eunuch ?= { set_mother = scope:parent } + } + else = { + save_scope_as = eunuch_father + scope:eunuch ?= { set_father = scope:parent } + } + scope:eunuch ?= { set_house = scope:parent.house } + if = { + limit = { age > 65 } + death = { death_reason = death_natural_causes } + } + } + } + if = { + limit = { NOT = { exists = scope:parent } } + if = { + limit = { exists = scope:eunuch_mother } + scope:eunuch_mother ?= { save_scope_as = parent } + } + else = { + scope:eunuch_father ?= { save_scope_as = parent } + } + } + if = { + limit = { exists = scope:parent.house } + # Siblings + ep3_story_cycle_admin_eunuch_create_family_children_effect = { TYPE = sibling PARENT = scope:parent MIN_AGE = 16 } + # Niblings + every_in_list = { + list = new_arrivals + limit = { + is_in_list = eunuch_sibling + age > 20 + is_eunuch_trigger = no + NOT = { has_trait = infertile } + } + save_scope_as = eunuch_sibling + ep3_story_cycle_admin_eunuch_create_family_children_effect = { TYPE = nibling PARENT = scope:eunuch_sibling MIN_AGE = 1 } + } + } + } + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_upgrade_effect = { + custom_description_no_bullet = { + text = ep3_story_cycle_admin_eunuch_upgrade_modifier_tt + object = scope:eunuch + } + scope:story.story_owner = { + ep3_story_cycle_admin_eunuch_upgrade_modifier_effect = { TYPE = liege } + if = { + limit = { + has_active_diarchy = yes + diarch = scope:eunuch + } + change_diarchy_swing = minor_sop_swing_diarch_gain + } + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_upgrade_modifier_effect = { TYPE = eunuch } + } + ep3_story_cycle_admin_eunuch_score_effect = { VALUE = 1 } +} + +scripted_effect ep3_story_cycle_admin_eunuch_downgrade_effect = { + custom_description_no_bullet = { + text = ep3_story_cycle_admin_eunuch_downgrade_modifier_tt + object = scope:eunuch + } + scope:story.story_owner = { + ep3_story_cycle_admin_eunuch_downgrade_modifier_effect = { TYPE = liege } + if = { + limit = { + has_active_diarchy = yes + diarch = scope:eunuch + } + change_diarchy_swing = minor_sop_swing_liege_gain + } + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_downgrade_modifier_effect = { TYPE = eunuch } + } + ep3_story_cycle_admin_eunuch_score_effect = { VALUE = -1 } + scope:story = { + change_variable = { + name = eunuch_refusals + add = 1 + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_upset_courtier_effect = { + scope:eunuch = { + hidden_effect = { + progress_towards_rival_effect = { + REASON = rival_admin_eunuch + CHARACTER = $COURTIER$ + OPINION = default_rival_opinion + } + } + } + $COURTIER$ = { + custom_tooltip = admin_eunuch_rivalry_tt + } + scope:story = { + add_to_variable_list = { + name = upset_courtiers + target = $COURTIER$ + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_add_ally_effect = { + scope:story = { + add_to_variable_list = { + name = eunuch_allies + target = $ALLY$ + } + } + $ALLY$ = { + progress_towards_friend_effect = { + REASON = friend_admin_eunuch_vassal + CHARACTER = scope:eunuch + OPINION = default_friend_opinion + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_score_effect = { + scope:story ?= { + change_variable = { + name = eunuch_score + add = $VALUE$ + } + change_variable = { + name = eunuch_total + add = 1 + } + } +} + +################################################## +# Start +# by Joe Parkin +# 1000 +################################################## + +# Start maintenance +ep3_story_cycle_admin_eunuch.1000 = { + hidden = yes + type = character_event + cooldown = { years = 10 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_realm_trigger = yes + } + + weight_multiplier = { + base = 1 + modifier = { + is_adult = no + add = 1 + } + modifier = { + has_diarchy_type = regency + add = 1 + } + modifier = { + any_courtier = { ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = yes } + add = 1 + } + modifier = { + any_noble_family = { ep3_story_cycle_admin_eunuch_noble_family_trigger = yes } + add = 1 + } + } + + immediate = { + primary_title = { + set_variable = { + name = story_cycle_admin_eunuch_cooldown + years = 25 + } + } + every_noble_family = { # Eunuch of a Noble Family + limit = { ep3_story_cycle_admin_eunuch_noble_family_trigger = yes } + holder.house = { + every_house_member = { + limit = { ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = yes } + add_to_list = nf_eunuchs + } + } + } + every_courtier = { # Other Eunuchs + limit = { + NOT = { is_in_list = nf_eunuchs } + ep3_story_cycle_admin_eunuch_valid_eunuch_trigger = yes + } + add_to_list = eunuchs + } + ordered_in_list = { + list = nf_eunuchs + order_by = sum_of_all_skills_value + save_scope_as = eunuch + } + if = { + limit = { NOT = { exists = scope:eunuch } } + ordered_in_list = { + list = eunuchs + order_by = sum_of_all_skills_value + save_scope_as = eunuch + } + } + if = { + limit = { NOT = { exists = scope:eunuch } } + ep3_story_cycle_admin_eunuch_create_eunuch_effect = yes + } + else = { + random_sub_realm_county = { + limit = { + culture = scope:eunuch.culture + duchy != root.capital_county.duchy + } + alternative_limit = { duchy != root.capital_county.duchy } + alternative_limit = { culture = scope:eunuch.culture } + alternative_limit = { always = yes } + save_scope_as = origin + } + } + ep3_story_cycle_admin_eunuch_create_family_effect = yes + ep3_story_cycle_admin_eunuch_create_story_effect = yes + trigger_event = { + id = ep3_story_cycle_admin_eunuch.1001 + delayed = yes + } + } +} + +# Emperor start +ep3_story_cycle_admin_eunuch.1001 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.1001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_title = title:e_byzantium } + desc = ep3_story_cycle_admin_eunuch.1001.intro_byz + } + desc = ep3_story_cycle_admin_eunuch.1001.intro + } + desc = ep3_story_cycle_admin_eunuch.1001.desc + triggered_desc = { + trigger = { any_in_list = { list = new_arrivals } } + desc = ep3_story_cycle_admin_eunuch.1001.arrivals + } + } + theme = administrative + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:eunuch + animation = writing + } + lower_center_portrait = scope:noble_family_head + + immediate = { + play_music_cue = "mx_cue_succession" + # Noble Family + scope:eunuch.house ?= { + if = { + limit = { + NOT = { + any_house_member = { + any_held_title = { is_noble_family_title = yes } + } + } + } + ordered_house_member = { + limit = { + exists = this + this != scope:eunuch + } + order_by = age + save_scope_as = family_head + } + } + } + scope:family_head ?= { + if = { + limit = { + this != house.house_head + } + hidden_effect = { + house = { set_house_head = scope:family_head } + } + } + create_noble_family_effect = { GOVERNMENT_GIVER = scope:family_head } + if = { + limit = { + NOT = { government_has_flag = government_is_administrative } + } + hidden_effect = { change_government = administrative_government } + } + } + every_in_list = { + list = new_arrivals + limit = { + is_ruler = no + is_alive = yes + NOR = { + this = scope:eunuch + employer = scope:family_head + } + } + hidden_effect = { set_employer = scope:family_head } + } + save_scope_as = liege + scope:eunuch ?= { + save_scope_as = candidate + change_influence = major_influence_gain + hidden_effect = { + if = { + limit = { employer != root } + set_employer = root + } + } + } + # Starting bonus to lure you in + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + } + + option = { + name = ep3_story_cycle_admin_eunuch.1001.a + flavor = admin_eunuch_flavor_tt + trigger = { can_employ_court_position_type = chief_eunuch_court_position } + scope:eunuch = { + set_variable = { name = target_court_position value = flag:chief_eunuch years = 1 } + } + court_position_old_holder_effect = { POS = chief_eunuch EMPLOYER = root } + court_position_grant_effect = { POS = chief_eunuch CANDIDATE = scope:eunuch EMPLOYER = root } + reverse_add_opinion = { + target = scope:eunuch + modifier = grateful_opinion + opinion = 15 + } + } + + + option = { + name = ep3_story_cycle_admin_eunuch.1001.b + flavor = admin_eunuch_flavor_tt + } +} + +################################################## +# Demand Regent +# by Joe Parkin +# 2010 +################################################## + +ep3_story_cycle_admin_eunuch.2010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2010.t + desc = ep3_story_cycle_admin_eunuch.2010.desc + theme = administrative + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:eunuch + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_center_portrait = { + character = scope:diarch_successor + trigger = { + scope:diarch_successor != scope:eunuch + } + } + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 1 + has_active_diarchy = no + NOR = { + diarch ?= { + this = scope:eunuch_temp + is_designated_diarch = yes + } + designated_diarch ?= scope:eunuch_temp + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_adult = no + add = 1 + } + modifier = { + age > 50 + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + ordered_diarchy_succession_character = { + limit = { + is_diarchy_successor = yes + this != scope:eunuch + } + order_by = diarchy_regent_succession_score_value + save_scope_as = diarch_successor + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2010.a + scope:diarch_successor = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:emperor = { designate_diarch = scope:eunuch } + } + } + if = { + limit = { scope:diarch_successor != scope:eunuch } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:diarch_successor } + reverse_add_opinion = { + target = scope:diarch_successor + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2010.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:diarch_successor ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = medium_stress_impact_gain + lazy = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Demand Regency +# by Joe Parkin +# 2015 +################################################## + +ep3_story_cycle_admin_eunuch.2015 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2015.t + desc = { + desc = ep3_story_cycle_admin_eunuch.2015.desc + first_valid = { + triggered_desc = { + trigger = { is_at_war = yes } + desc = ep3_story_cycle_admin_eunuch.2015.war + } + triggered_desc = { + trigger = { has_trait = lifestyle_hunter } + desc = ep3_story_cycle_admin_eunuch.2015.hunter + } + desc = ep3_story_cycle_admin_eunuch.2015.fallback + } + desc = ep3_story_cycle_admin_eunuch.2015.outro + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 1 + OR = { + designated_diarch ?= scope:eunuch_temp + diarchy_successor ?= scope:eunuch_temp + } + has_active_diarchy = no + } + + weight_multiplier = { + base = 1 + modifier = { + is_at_war = yes + add = 1 + } + modifier = { + has_trait = lazy + add = 1 + } + modifier = { + has_trait = lifestyle_hunter + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + primary_title.current_heir = { save_scope_as = title_heir } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2015.a + if = { + limit = { exists = scope:title_heir } + scope:title_heir = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + } + scope:emperor = { try_start_diarchy = regency } + } + } + else = { try_start_diarchy = regency } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + if = { + limit = { exists = scope:title_heir } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:title_heir } + reverse_add_opinion = { + target = scope:title_heir + modifier = angry_opinion + opinion = -15 + } + } + stress_impact = { + base = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2015.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:title_heir ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + base = medium_stress_impact_gain + trusting = medium_stress_impact_gain + lazy = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Demand Governorship +# by Joe Parkin +# 2020 +################################################## + +# Family +scripted_trigger ep3_story_cycle_admin_eunuch_valid_family_member_trigger = { + is_adult = yes + top_liege ?= root.top_liege + is_ruler = no + is_landed = no + is_healthy = yes + save_temporary_scope_as = family_temp +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { + tier < root.primary_title.tier + tier >= tier_duchy + tier <= tier_kingdom + is_noble_family_title = no + is_landless_type_title = no + title_capital_county.duchy != root.capital_county.duchy + save_temporary_scope_as = title_temp + $GOVERNOR$ = { can_appoint_for_title = scope:title_temp } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { + is_governor = yes + NOR = { + is_close_family_of = root + is_close_family_of = $EUNUCH$ + is_close_family_of = $GOVERNOR$ + is_consort_of = root + is_consort_of = $EUNUCH$ + is_consort_of = $GOVERNOR$ + has_relation_lover = root + has_relation_lover = $EUNUCH$ + has_relation_lover = $GOVERNOR$ + has_relation_friend = root + has_relation_friend = $EUNUCH$ + has_relation_friend = $GOVERNOR$ + } + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = $GOVERNOR$ } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { + tier >= tier_duchy + tier <= tier_kingdom + is_noble_family_title = no + is_landless_type_title = no + NOT = { exists = var:petition_house_rights } + title_capital_county.duchy != root.capital_county.duchy + save_temporary_scope_as = title_temp + $GOVERNOR$ = { can_appoint_for_title = scope:title_temp } +} + +ep3_story_cycle_admin_eunuch.2021 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2021.t + desc = ep3_story_cycle_admin_eunuch.2021.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:eunuch + animation = admiration + } + right_portrait = { + character = scope:governor + animation = obsequious_bow + } + lower_right_portrait = { + character = scope:title.holder + trigger = { + scope:title.holder != root + scope:governor ?= { + this != scope:title.holder + } + scope:title_heir ?= { + this != scope:title.holder + } + } + } + lower_center_portrait = scope:title_heir + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + is_at_war = no + # Valid eunuch family member + scope:eunuch_temp ?= { + any_close_family_member = { ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes } + } + # Valid grantable or candidacy governorship + OR = { + custom_tooltip = { + text = ep3_story_cycle_admin_eunuch.2021.t # Dummy, to suppress a "scope dependent values in localization" error + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:family_temp } + } + } + any_vassal = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:family_temp EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes } + } + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:family_temp } + } + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + # Family member + scope:eunuch = { + random_close_family_member = { + limit = { ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes } + weight = { + base = 1 + modifier = { + is_sibling_of = scope:eunuch + add = 1 + } + modifier = { + is_nibling_of = scope:eunuch + add = 1 + } + modifier = { + has_character_flag = admin_eunuch_family_boon_flag + factor = 0 + } + } + save_scope_as = governor + } + } + # Grantable governorship + random_held_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:governor } + } + save_scope_as = title + } + # Candidacy governorship + if = { + limit = { NOT = { exists = scope:title } } + scope:governor = { + ordered_heir_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = scope:governor } + } + order_by = "place_in_line_of_succession(scope:governor)" + save_scope_as = title + } + } + } + if = { + limit = { NOT = { exists = scope:title } } + ordered_vassal = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:governor EUNUCH = scope:eunuch } + } + order_by = { + value = age + if = { + limit = { health < fine_health } + add = 25 + } + if = { + limit = { health <= poor_health } + add = 25 + } + } + random_held_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = scope:governor } + } + save_scope_as = title + } + } + } + scope:title = { + ordered_title_heir = { + limit = { + NOR = { + this = root + this = scope:eunuch + this = scope:governor + } + } + save_scope_as = title_heir + } + } + } + + option = { + name = { + text = ep3_story_cycle_admin_eunuch.2021.a.grant + trigger = { scope:title.holder = root } + } + name = { + text = ep3_story_cycle_admin_eunuch.2021.a + trigger = { scope:title.holder != root } + } + scope:title_heir = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:title = { + if = { + limit = { holder = scope:emperor } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:governor + change = scope:change + take_baronies = no + } + resolve_title_and_vassal_change = scope:change + } + else = { + change_appointment_investment = { + target = scope:governor + value = appointment_score_major_value + } + } + } + } + } + if = { + limit = { exists = scope:title_heir } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:title_heir } + reverse_add_opinion = { + target = scope:title_heir + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + scope:governor = { + add_character_flag = { flag = admin_eunuch_family_boon_flag years = 5 } + } + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2021.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:title_heir ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +# Vassal +scripted_trigger ep3_story_cycle_admin_eunuch_valid_vassal_governor_trigger = { + holder = { + NOR = { + has_character_flag = eunuch_vassal_offer_cooldown + has_relation_rival = $EUNUCH$ + $EUNUCH$ ?= this + } + reverse_opinion = { + target = $EUNUCH$ + value >= -50 + } + any_held_title = { + count = all + OR = { + is_landless_type_title = yes + is_noble_family_title = yes + } + } + house ?= { + NOT = { $EUNUCH$.house ?= this } + } + save_temporary_scope_as = governor_temp + } +} + +ep3_story_cycle_admin_eunuch.2022 = { + type = character_event + hidden = yes + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + is_at_war = no + any_noble_family = { + ep3_story_cycle_admin_eunuch_valid_vassal_governor_trigger = { EUNUCH = scope:eunuch_temp } + } + # Valid grantable or candidacy governorship + OR = { + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:governor_temp } + } + any_vassal = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:governor_temp EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_as = liege + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + random_noble_family = { + limit = { + ep3_story_cycle_admin_eunuch_valid_vassal_governor_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { + holder = { is_ai = no } + factor = 4 + } + modifier = { + exists = holder.house + add = { + value = holder.house.house_power_score + divide = 2 + } + } + } + holder = { + save_scope_as = governor + add_character_flag = { + flag = eunuch_vassal_offer_cooldown + years = 2 + } + trigger_event = ep3_story_cycle_admin_eunuch.2023 + } + } + } +} + +ep3_story_cycle_admin_eunuch.2023 = { + type = letter_event + opening = char_interaction.0010.opening + desc = ep3_story_cycle_admin_eunuch.2023.desc + sender = { + character = scope:eunuch + animation = scheme + } + + trigger = { + scope:eunuch ?= { is_alive = yes } + scope:governor ?= { is_alive = yes } + } + + immediate = { + scope:eunuch = { save_scope_as = actor } + save_scope_as = recipient + } + + option = { # Accept + name = ep3_story_cycle_admin_eunuch.2023.a + pay_short_term_gold = { + gold = minor_gold_value + target = scope:eunuch + } + custom_tooltip = ep3_story_cycle_admin_eunuch.2023.a.tt + scope:eunuch = { change_influence = medium_influence_gain } + ep3_story_cycle_admin_eunuch_add_ally_effect = { ALLY = root } + scope:emperor = { + trigger_event = { + id = ep3_story_cycle_admin_eunuch.2024 + days = 5 + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + } + opinion_modifier = { + opinion_target = root.top_liege + multiplier = -0.25 + } + } + } + + option = { # Refuse + name = ep3_story_cycle_admin_eunuch.2023.b + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:eunuch + opinion = -15 + } + add_character_flag = { + flag = eunuch_vassal_offer_cooldown + years = 5 + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + } + opinion_modifier = { + opinion_target = root.top_liege + multiplier = 0.25 + } + } + } +} + +ep3_story_cycle_admin_eunuch.2024 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2024.t + desc = ep3_story_cycle_admin_eunuch.2024.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:emperor + animation = admiration + } + right_portrait = { + character = scope:eunuch + animation = happiness + } + lower_left_portrait = scope:title_heir + lower_right_portrait = scope:governor + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + # Valid grantable or candidacy governorship + OR = { + any_held_title = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:governor } + } + any_vassal = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:governor EUNUCH = scope:eunuch_temp } + } + } + scope:governor = { + is_alive = yes + is_landed = no + } + } + + immediate = { + # Grantable governorship + random_held_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_grantable_governorship_trigger = { GOVERNOR = scope:governor } + } + save_scope_as = title + } + # Candidacy governorship + if = { + limit = { NOT = { exists = scope:title } } + scope:governor = { + ordered_heir_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = scope:governor } + } + order_by = "place_in_line_of_succession(scope:governor)" + save_scope_as = title + } + } + } + if = { + limit = { NOT = { exists = scope:title } } + ordered_vassal = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_vassal_trigger = { GOVERNOR = scope:governor EUNUCH = scope:eunuch } + } + order_by = { + value = age + if = { + limit = { health < fine_health } + add = 25 + } + if = { + limit = { health <= poor_health } + add = 25 + } + } + random_held_title = { + limit = { + ep3_story_cycle_admin_eunuch_valid_appointment_governorship_trigger = { GOVERNOR = scope:governor } + } + save_scope_as = title + } + } + } + scope:title = { + ordered_title_heir = { + limit = { + NOR = { + this = root + this = scope:eunuch + this = scope:governor + } + } + save_scope_as = title_heir + } + } + } + + option = { + name = { + text = ep3_story_cycle_admin_eunuch.2021.a.grant + trigger = { scope:title.holder = root } + } + name = { + text = ep3_story_cycle_admin_eunuch.2021.a + trigger = { scope:title.holder != root } + } + scope:governor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:title_heir = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:title = { + if = { + limit = { holder = scope:emperor } + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + change_title_holder = { + holder = scope:governor + change = scope:change + take_baronies = no + } + resolve_title_and_vassal_change = scope:change + } + else = { + change_appointment_investment = { + target = scope:governor + value = appointment_score_major_value + } + } + } + } + } + } + } + reverse_add_opinion = { + target = scope:governor + modifier = grateful_opinion + opinion = 15 + } + if = { + limit = { exists = scope:title_heir } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:title_heir } + reverse_add_opinion = { + target = scope:title_heir + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + scope:governor = { + add_character_flag = { flag = admin_eunuch_family_boon_flag years = 5 } + } + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2021.b + scope:governor = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.2023.b.toast + left_icon = scope:eunuch + right_icon = scope:emperor + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + } + } + reverse_add_opinion = { + target = scope:governor + modifier = disappointed_opinion + opinion = -15 + } + scope:title_heir ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Demand Patriarchate +# by Joe Parkin +# 2030-31 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_want_patriarch_trigger = { + faith.religious_head_title.holder = { + is_vassal_of = root + NOR = { + this = root + this = scope:eunuch_temp + is_close_family_of = scope:eunuch_temp + } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = { + faith = root.faith + ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes + NOR = { + scope:protege_temp ?= this + scope:protege ?= this + } + trigger_if = { + limit = { root.faith = { has_doctrine = doctrine_clerical_gender_male_only } } + is_male = yes + } + trigger_else_if = { + limit = { root.faith = { has_doctrine = doctrine_clerical_gender_female_only } } + is_female = yes + } + trigger_else = { always = yes } + trigger_if = { + limit = { root.faith = { has_doctrine = doctrine_clerical_marriage_disallowed } } + is_married = no + is_betrothed = no + } +} + +ep3_story_cycle_admin_eunuch.2031 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2031.t + desc = { + desc = ep3_story_cycle_admin_eunuch.2031.intro + first_valid = { + triggered_desc = { + trigger = { location = title:c_byzantion.title_province } + desc = ep3_story_cycle_admin_eunuch.2031.intro_byz + } + desc = ep3_story_cycle_admin_eunuch.2031.intro_fallback + } + desc = ep3_story_cycle_admin_eunuch.2031.desc + } + theme = administrative + override_background = { reference = temple_scope } + left_portrait = { + character = scope:eunuch + animation = debating + } + right_portrait = { + character = scope:new_patriarch + animation = prayer + } + lower_center_portrait = scope:old_patriarch + + trigger = { + NOT = { has_character_flag = admin_eunuch_patriarch_flag } + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 3 + ep3_story_cycle_admin_eunuch_want_patriarch_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = yes + is_clergy = yes + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + save_scope_as = root_scope + add_character_flag = { + flag = admin_eunuch_patriarch_flag + years = 15 + } + faith.religious_head_title.holder = { + save_scope_as = old_patriarch + save_scope_as = background_temple_scope + } + scope:eunuch = { + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = yes + is_clergy = yes + } + alternative_limit = { ep3_story_cycle_admin_eunuch_valid_patriarch_trigger = yes } + save_scope_as = new_patriarch + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2031.a + add_piety = major_piety_loss + add_hook = { + type = influence_hook + target = scope:new_patriarch + } + create_title_and_vassal_change = { + type = granted + save_scope_as = title_change + add_claim_on_loss = no + } + hidden_effect = { + faith.religious_head_title = { + change_title_holder = { + holder = scope:new_patriarch + change = scope:title_change + } + } + } + every_player = { + limit = { faith = scope:emperor.faith } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:new_patriarch + show_as_tooltip = { + faith.religious_head_title = { + change_title_holder = { + holder = scope:new_patriarch + change = scope:title_change + } + } + } + } + } + resolve_title_and_vassal_change = scope:title_change + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + if = { + limit = { exists = scope:old_patriarch } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:old_patriarch } + scope:old_patriarch = { + add_opinion = { + target = scope:new_patriarch + modifier = angry_opinion + opinion = -50 + } + house ?= { + every_house_member = { + limit = { + NOR = { + this = scope:eunuch + this = scope:old_patriarch + this = scope:new_patriarch + } + } + reverse_add_opinion = { + target = scope:old_patriarch + modifier = angry_opinion + opinion = -25 + } + } + } + } + } + every_vassal = { + vassal_stance = zealot + limit = { + NOR = { + this = scope:eunuch + this = scope:old_patriarch + this = scope:new_patriarch + house ?= scope:old_patriarch.house + } + } + custom = every_zealot_vassal + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + stress_impact = { + zealous = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:old_patriarch + multiplier = -0.25 + } + ai_value_modifier = { + ai_rationality = -0.5 + ai_zeal = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2031.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:old_patriarch ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + cynical = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:old_patriarch + multiplier = 0.25 + } + ai_value_modifier = { + ai_rationality = 0.5 + ai_zeal = 0.5 + } + } + } +} + +################################################## +# Demand Council Seat +# by Joe Parkin +# 2040-41 +################################################## + +# Eunuch +scripted_effect ep3_story_cycle_admin_eunuch_save_council_position_effect = { + random_list = { # Pick best position, even if occupied + 2 = { + trigger = { + petition_liege_councillor_blocked_trigger = { + ROLE = chancellor + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = diplomacy ROLE = chancellor JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_chancellor + $JOB_TAKER$.cp:councillor_chancellor = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = chancellor JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + 2 = { + trigger = { + petition_liege_councillor_blocked_trigger = { + ROLE = marshal + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = martial ROLE = marshal JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_marshal + $JOB_TAKER$.cp:councillor_marshal = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = marshal JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + 2 = { + trigger = { + petition_liege_councillor_blocked_trigger = { + ROLE = steward + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = stewardship ROLE = steward JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_steward + $JOB_TAKER$.cp:councillor_steward = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = steward JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + 20 = { + trigger = { + petition_liege_councillor_blocked_trigger = { + ROLE = spymaster + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = intrigue ROLE = spymaster JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_spymaster + $JOB_TAKER$.cp:councillor_spymaster = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = spymaster JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + 2 = { + trigger = { + petition_liege_council_chaplain_appointable_trigger = { + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + petition_liege_councillor_blocked_trigger = { + ROLE = court_chaplain + JOB_TAKER = $JOB_TAKER$ + LIEGE = $LIEGE$ + } + } + petition_liege_councillor_compare_modifier = { SKILL = learning ROLE = court_chaplain JOB_TAKER = $JOB_TAKER$ } + modifier = { + exists = $JOB_TAKER$.cp:councillor_court_chaplain + $JOB_TAKER$.cp:councillor_court_chaplain = { is_close_family_of = $EUNUCH$ } + factor = 0 + } + petition_liege_0101_councillor_scope_first_effect = { ROLE = court_chaplain JOB_TAKER = $JOB_TAKER$ LIEGE = $LIEGE$ } + } + } +} + +ep3_story_cycle_admin_eunuch.2040 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2040.t + desc = ep3_story_cycle_admin_eunuch.2040.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + lower_center_portrait = scope:second_party + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { is_councillor = no } + petition_liege_council_seat_liege_trigger = yes + NAND = { + diarch ?= scope:eunuch_temp + has_active_diarchy = yes + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + save_scope_as = petition_liege + scope:eunuch = { + save_scope_as = petition_vassal + ep3_story_cycle_admin_eunuch_save_council_position_effect = { + JOB_TAKER = scope:eunuch + LIEGE = root + EUNUCH = scope:eunuch + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2040.a + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2040.a.toast + left_icon = scope:eunuch + right_icon = scope:second_party + if = { + limit = { exists = scope:second_party } + scope:second_party = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:emperor = { fire_councillor = scope:second_party } + } + } + } + switch = { + trigger = scope:eunuch.var:petition_liege_council_first + flag:chancellor = { + assign_councillor_type = { + type = councillor_chancellor + target = scope:petition_vassal + } + } + flag:marshal = { + assign_councillor_type = { + type = councillor_marshal + target = scope:petition_vassal + } + } + flag:steward = { + assign_councillor_type = { + type = councillor_steward + target = scope:petition_vassal + } + } + flag:spymaster = { + assign_councillor_type = { + type = councillor_spymaster + target = scope:petition_vassal + } + } + flag:court_chaplain = { + assign_councillor_type = { + type = councillor_court_chaplain + target = scope:petition_vassal + } + } + } + petition_liege_block_firing_councillor_effect = { + COURT_OWNER = root + JOB_TAKER = scope:eunuch + } + } + if = { + limit = { exists = scope:second_party } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:second_party } + reverse_add_opinion = { + target = scope:second_party + modifier = angry_opinion + opinion = -15 + } + } + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:second_party + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2040.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:second_party ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +# Family +scripted_trigger ep3_story_cycle_admin_eunuch_valid_family_councillor_trigger = { + ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes + highest_skill_value >= 8 + NOT = { this = $EUNUCH$ } + is_councillor = no + save_temporary_scope_as = councillor_temp +} + +ep3_story_cycle_admin_eunuch.2041 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2041.t + desc = ep3_story_cycle_admin_eunuch.2041.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:eunuch + animation = admiration + } + right_portrait = { + character = scope:councillor + animation = happiness + } + lower_center_portrait = scope:second_party + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + petition_liege_council_seat_liege_trigger = yes + scope:eunuch_temp.house ?= { + any_house_member = { + ep3_story_cycle_admin_eunuch_valid_family_councillor_trigger = { EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { + liege = root + is_councillor = yes + } + } + factor = 0.25 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + save_scope_as = petition_liege + scope:eunuch.house = { + random_house_member = { + limit = { + ep3_story_cycle_admin_eunuch_valid_family_councillor_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { + has_character_flag = admin_eunuch_family_boon_flag + factor = 0 + } + } + save_scope_as = councillor + save_scope_as = petition_vassal + if = { + limit = { + employer != root + } + root = { add_courtier = scope:councillor } + } + ep3_story_cycle_admin_eunuch_save_council_position_effect = { + JOB_TAKER = scope:councillor + LIEGE = root + EUNUCH = scope:eunuch + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2041.a + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2040.a.toast + left_icon = scope:councillor + right_icon = scope:second_party + if = { + limit = { exists = scope:second_party } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:emperor = { fire_councillor = scope:second_party } + } + } + switch = { + trigger = scope:councillor.var:petition_liege_council_first + flag:chancellor = { + assign_councillor_type = { + type = councillor_chancellor + target = scope:councillor + } + } + flag:marshal = { + assign_councillor_type = { + type = councillor_marshal + target = scope:councillor + } + } + flag:steward = { + assign_councillor_type = { + type = councillor_steward + target = scope:councillor + } + } + flag:spymaster = { + assign_councillor_type = { + type = councillor_spymaster + target = scope:councillor + } + } + flag:court_chaplain = { + assign_councillor_type = { + type = councillor_court_chaplain + target = scope:councillor + } + } + } + petition_liege_block_firing_councillor_effect = { + COURT_OWNER = root + JOB_TAKER = scope:councillor + } + scope:second_party ?= { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + scope:councillor = { + add_character_flag = { flag = admin_eunuch_family_boon_flag years = 5 } + } + if = { + limit = { exists = scope:second_party } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:second_party } + reverse_add_opinion = { + target = scope:second_party + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:second_party + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2041.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:second_party ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +# Vassal +scripted_trigger ep3_story_cycle_admin_eunuch_valid_vassal_councillor_trigger = { + is_ruler = no + NOR = { + has_character_flag = eunuch_vassal_offer_cooldown + has_relation_rival = $EUNUCH$ + this = $EUNUCH$ + } + reverse_opinion = { + target = $EUNUCH$ + value >= -50 + } + any_held_title = { is_noble_family_title = yes } + is_councillor = no + highest_skill_value >= 8 + house ?= { + NOT = { $EUNUCH$.house ?= this } + } + save_temporary_scope_as = councillor_temp +} + +ep3_story_cycle_admin_eunuch.2042 = { + type = character_event + hidden = yes + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + petition_liege_council_seat_liege_trigger = yes + any_vassal = { + ep3_story_cycle_admin_eunuch_valid_vassal_councillor_trigger = { EUNUCH = scope:eunuch_temp } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + save_scope_as = liege + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + random_vassal = { + limit = { + ep3_story_cycle_admin_eunuch_valid_vassal_councillor_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { + is_ai = no + factor = 4 + } + modifier = { + exists = house + add = { + value = house.house_power_score + divide = 2 + } + } + modifier = { add = highest_skill_value } + } + save_scope_as = councillor + add_character_flag = { + flag = eunuch_vassal_offer_cooldown + years = 2 + } + trigger_event = ep3_story_cycle_admin_eunuch.2043 + } + } +} + +ep3_story_cycle_admin_eunuch.2043 = { + type = letter_event + opening = char_interaction.0010.opening + desc = ep3_story_cycle_admin_eunuch.2043.desc + sender = { + character = scope:eunuch + animation = scheme + } + + trigger = { + scope:eunuch ?= { is_alive = yes } + scope:councillor ?= { is_alive = yes } + } + + immediate = { + scope:eunuch = { save_scope_as = actor } + save_scope_as = recipient + } + + option = { # Accept + name = ep3_story_cycle_admin_eunuch.2043.a + pay_short_term_gold = { + gold = minor_gold_value + target = scope:eunuch + } + custom_tooltip = ep3_story_cycle_admin_eunuch.2043.a.tt + scope:eunuch = { change_influence = medium_influence_gain } + ep3_story_cycle_admin_eunuch_add_ally_effect = { ALLY = root } + scope:emperor = { + trigger_event = { + id = ep3_story_cycle_admin_eunuch.2044 + days = 5 + } + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + } + opinion_modifier = { + opinion_target = root.top_liege + multiplier = -0.25 + } + } + } + + option = { # Refuse + name = ep3_story_cycle_admin_eunuch.2043.b + reverse_add_opinion = { + modifier = annoyed_opinion + target = scope:eunuch + opinion = -15 + } + add_character_flag = { + flag = eunuch_vassal_offer_cooldown + years = 5 + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + } + opinion_modifier = { + opinion_target = root.top_liege + multiplier = 0.25 + } + } + } +} + +ep3_story_cycle_admin_eunuch.2044 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2044.t + desc = ep3_story_cycle_admin_eunuch.2044.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:emperor + animation = admiration + } + right_portrait = { + character = scope:eunuch + animation = happiness + } + lower_left_portrait = scope:second_party + lower_right_portrait = scope:councillor + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + petition_liege_council_seat_liege_trigger = yes + scope:councillor = { + is_alive = yes + is_councillor = no + } + } + + immediate = { + save_scope_as = petition_liege + scope:councillor = { save_scope_as = petition_vassal } + ep3_story_cycle_admin_eunuch_save_council_position_effect = { + JOB_TAKER = scope:councillor + LIEGE = root + EUNUCH = scope:eunuch + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2041.a + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2040.a.toast + left_icon = scope:councillor + right_icon = scope:second_party + scope:councillor = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2040.a.toast + left_icon = scope:eunuch + right_icon = scope:emperor + if = { + limit = { exists = scope:second_party } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:councillor + scope:emperor = { fire_councillor = scope:second_party } + } + } + scope:emperor = { + switch = { + trigger = scope:councillor.var:petition_liege_council_first + flag:chancellor = { + assign_councillor_type = { + type = councillor_chancellor + target = scope:councillor + } + } + flag:marshal = { + assign_councillor_type = { + type = councillor_marshal + target = scope:councillor + } + } + flag:steward = { + assign_councillor_type = { + type = councillor_steward + target = scope:councillor + } + } + flag:spymaster = { + assign_councillor_type = { + type = councillor_spymaster + target = scope:councillor + } + } + flag:court_chaplain = { + assign_councillor_type = { + type = councillor_court_chaplain + target = scope:councillor + } + } + } + petition_liege_block_firing_councillor_effect = { + COURT_OWNER = scope:emperor + JOB_TAKER = scope:councillor + } + } + } + } + scope:second_party ?= { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + reverse_add_opinion = { + target = scope:councillor + modifier = grateful_opinion + opinion = 15 + } + if = { + limit = { exists = scope:second_party } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:second_party } + reverse_add_opinion = { + target = scope:second_party + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:second_party + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2041.b + scope:councillor = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.2043.b.toast + left_icon = scope:eunuch + right_icon = scope:emperor + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + } + } + reverse_add_opinion = { + target = scope:councillor + modifier = disappointed_opinion + opinion = -15 + } + scope:second_party ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Boon +# by Joe Parkin +# 2050 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = { + OR = { + is_councillor = no + has_relation_rival = root + opinion = { + target = root + value < 25 + } + } + save_temporary_scope_as = hookee_temp + root = { + can_add_hook = { + target = scope:hookee_temp + type = fabrication_hook + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_select_boon_effect = { + random_list = { + 25 = { # Debase + trigger = { + NOT = { has_character_flag = eunuch_boon_debase_cooldown } + } + modifier = { + gold < minor_gold_value + factor = 2 + } + modifier = { + gold < 0 + factor = 2 + } + save_scope_value_as = { + name = eunuch_boon + value = flag:debase + } + } + 25 = { # Raise taxes + trigger = { + NOR = { + has_character_modifier = admin_eunuch_raise_taxes_modifier + has_character_flag = eunuch_boon_raise_taxes_cooldown + } + } + save_scope_value_as = { + name = eunuch_boon + value = flag:raise_taxes + } + } + 25 = { # Increase succession + trigger = { + player_heir ?= { is_ruler = no } + any_vassal = { + primary_title = { + any_title_heir = { house = root.house } + } + } + NOT = { has_character_flag = eunuch_boon_candidacy_cooldown } + } + random_vassal = { + limit = { + primary_title = { + any_title_heir = { this = root.player_heir } + current_heir != root.player_heir + } + } + alternative_limit = { + primary_title = { + any_title_heir = { house ?= root.house } + NOT = { current_heir.house ?= root.house } + } + } + alternative_limit = { + primary_title = { + any_title_heir = { this = root.player_heir } + } + } + alternative_limit = { + primary_title = { + any_title_heir = { house ?= root.house } + } + } + primary_title = { save_scope_as = boon_title } + save_scope_as = boon_victim + root.player_heir = { save_scope_as = boon_target } + } + save_scope_value_as = { + name = eunuch_boon + value = flag:candidacy + } + } + 25 = { # Fabricate hook + trigger = { + OR = { + any_powerful_vassal = { ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = yes } + any_councillor = { ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = yes } + } + NOT = { has_character_flag = eunuch_boon_fabricate_hook_cooldown } + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { + OR = { + has_trait = schemer + has_trait = education_intrigue + has_council_position = councillor_spymaster + } + } + factor = 2 + } + random_powerful_vassal = { + limit = { ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = yes } + save_scope_as = boon_victim + } + if = { + limit = { NOT = { exists = scope:boon_victim } } + random_councillor = { + limit = { ep3_story_cycle_admin_eunuch_fabricate_hook_trigger = yes } + save_scope_as = boon_victim + } + } + save_scope_value_as = { + name = eunuch_boon + value = flag:fabricate_hook + } + } + 25 = { # Imprison rebel + trigger = { + any_targeting_faction = { exists = faction_leader } + NOT = { has_character_flag = eunuch_boon_imprison_rebel_cooldown } + } + ordered_targeting_faction = { + limit = { exists = faction_leader } + order_by = faction_discontent + save_scope_as = boon_faction + faction_leader = { save_scope_as = boon_victim } + } + save_scope_value_as = { + name = eunuch_boon + value = flag:imprison_rebel + } + } + 5 = { # Gain influence - fallback + save_scope_value_as = { + name = eunuch_boon + value = flag:influence + } + } + } +} + +scripted_effect ep3_story_cycle_admin_eunuch_award_boon_effect = { + switch = { + trigger = scope:eunuch_boon + flag:debase = { + add_character_flag = { + flag = eunuch_boon_debase_cooldown + years = 5 + } + add_short_term_gold = major_gold_value + add_prestige = major_prestige_loss + } + flag:raise_taxes = { + add_character_flag = { + flag = eunuch_boon_raise_taxes_cooldown + years = 5 + } + add_character_modifier = { + modifier = admin_eunuch_raise_taxes_modifier + years = 5 + } + } + flag:candidacy = { + add_character_flag = { + flag = eunuch_boon_candidacy_cooldown + years = 5 + } + scope:boon_target = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:boon_title + scope:boon_title = { + change_appointment_investment = { + target = scope:boon_target + value = appointment_score_major_value + } + } + } + } + } + flag:fabricate_hook = { + add_character_flag = { + flag = eunuch_boon_fabricate_hook_cooldown + years = 5 + } + scope:boon_victim = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:emperor = { + add_hook = { + type = fabrication_hook + target = scope:boon_victim + } + } + } + } + } + flag:imprison_rebel = { + add_character_flag = { + flag = eunuch_boon_imprison_rebel_cooldown + years = 5 + } + scope:boon_victim = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:boon_victim + IMPRISONER = scope:emperor + } + } + } + } + flag:influence = { change_influence = major_influence_gain } + } + if = { + limit = { exists = scope:boon_victim } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:boon_victim } + } +} + +ep3_story_cycle_admin_eunuch.2050 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2050.t + desc = { + desc = ep3_story_cycle_admin_eunuch.2050.desc + first_valid = { + triggered_desc = { + trigger = { scope:eunuch_boon = flag:debase } + desc = ep3_story_cycle_admin_eunuch.2050.debase + } + triggered_desc = { + trigger = { scope:eunuch_boon = flag:raise_taxes } + desc = ep3_story_cycle_admin_eunuch.2050.raise_taxes + } + triggered_desc = { + trigger = { scope:eunuch_boon = flag:candidacy } + desc = ep3_story_cycle_admin_eunuch.2050.candidacy + } + triggered_desc = { + trigger = { scope:eunuch_boon = flag:fabricate_hook } + desc = ep3_story_cycle_admin_eunuch.2050.fabricate_hook + } + triggered_desc = { + trigger = { scope:eunuch_boon = flag:imprison_rebel } + desc = ep3_story_cycle_admin_eunuch.2050.imprison_rebel + } + desc = ep3_story_cycle_admin_eunuch.2050.influence + } + desc = ep3_story_cycle_admin_eunuch.2050.outro + } + theme = administrative + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:eunuch + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_left_portrait = scope:boon_target + lower_right_portrait = scope:boon_victim + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = { + value = scope:story_temp.var:eunuch_score + min = 0 + } + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + ep3_story_cycle_admin_eunuch_select_boon_effect = yes + } + + option = { + name = ep3_story_cycle_admin_eunuch.2050.a + ep3_story_cycle_admin_eunuch_award_boon_effect = yes + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2050.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Secret +# by Joe Parkin +# 2051 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_secret_trigger = { + NOR = { + is_known_by = root + secret_owner = { is_close_family_of = $EUNUCH$ } + secret_owner = root + secret_target ?= { is_close_family_of = $EUNUCH$ } + secret_target ?= root + any_secret_participant = { is_close_family_of = $EUNUCH$ } + any_secret_participant = { this = root } + } + any_secret_participant = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + } +} + +ep3_story_cycle_admin_eunuch.2051 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2051.t + desc = ep3_story_cycle_admin_eunuch.2051.desc + theme = administrative + left_portrait = { + character = scope:eunuch + animation = schadenfreude + } + right_portrait = { + character = scope:secret_owner + animation = worry + } + lower_center_portrait = scope:secret_target + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + OR = { + scope:eunuch_temp ?= { + any_known_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch_temp } + } + } + any_vassal_or_below = { + any_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch_temp } + } + } + any_courtier = { + any_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch_temp } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = { + value = scope:story_temp.var:eunuch_score + min = 0 + } + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { + OR = { + has_trait = schemer + has_trait = education_intrigue + has_council_position = councillor_spymaster + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + random_known_secret = { + limit = { + secret_target ?= { is_of_major_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + secret_target ?= { is_of_minor_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + save_scope_as = secret + } + } + if = { + limit = { NOT = { exists = scope:secret } } + every_vassal_or_below = { + limit = { + any_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + } + add_to_list = secret_havers + } + every_courtier = { + limit = { + any_secret = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + } + add_to_list = secret_havers + } + random_in_list = { + list = secret_havers + limit = { is_of_major_interest_to_root_trigger = yes } + alternative_limit = { is_of_minor_interest_to_root_trigger = yes } + alternative_limit = { always = yes } + weight = { + base = 1 + modifier = { add = highest_held_title_tier } + } + random_secret = { + limit = { + secret_target ?= { is_of_major_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + secret_target ?= { is_of_minor_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + ep3_story_cycle_admin_eunuch_secret_trigger = { EUNUCH = scope:eunuch } + } + save_scope_as = secret + } + } + } + scope:secret ?= { + secret_owner = { save_scope_as = secret_owner } + secret_target ?= { save_scope_as = secret_target } + hidden_effect = { + if = { + limit = { NOT = { is_known_by = scope:eunuch } } + reveal_to = scope:eunuch + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2051.a + custom_tooltip = { + text = ep3_story_cycle_admin_eunuch.2051.a.tt + send_interface_toast = { + type = event_toast_effect_neutral + left_icon = scope:secret_owner + right_icon = scope:secret_target + title = playdate_revealed_secret_log_title + scope:secret_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:secret = { reveal_to = scope:emperor } + } + } + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:secret_owner } + reverse_add_opinion = { + target = scope:secret_owner + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + trusting = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2051.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + reverse_add_opinion = { + target = scope:secret_owner + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + deceitful = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:secret_owner + multiplier = 0.25 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.5 + } + } + } +} + +################################################## +# Scheme +# by Joe Parkin +# 2052 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_scheme_trigger = { + is_hostile = yes + is_scheme_exposed = no + NOR = { + scheme_is_character_agent = $EUNUCH$ + scheme_is_character_agent = root + scheme_owner = $EUNUCH$ + scheme_owner = root + scheme_defender = $EUNUCH$ + scheme_defender = root + } +} + +ep3_story_cycle_admin_eunuch.2052 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2052.t + desc = ep3_story_cycle_admin_eunuch.2052.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = scope:eunuch + animation = schadenfreude + } + right_portrait = { + character = scope:scheme_owner + animation = worry + } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + OR = { + any_vassal_or_below = { + any_scheme = { ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch_temp } } + } + any_courtier = { + any_scheme = { ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch_temp } } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = { + value = scope:story_temp.var:eunuch_score + min = 0 + } + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { + OR = { + has_trait = schemer + has_trait = education_intrigue + has_council_position = councillor_spymaster + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + every_vassal_or_below = { + limit = { + any_scheme = { ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } } + } + add_to_list = scheme_havers + } + every_courtier = { + limit = { + any_scheme = { ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } } + } + add_to_list = scheme_havers + } + random_in_list = { + list = scheme_havers + limit = { is_of_major_interest_to_root_trigger = yes } + alternative_limit = { is_of_minor_interest_to_root_trigger = yes } + alternative_limit = { always = yes } + random_scheme = { + limit = { + scheme_defender = { is_of_major_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + scheme_defender = { is_of_minor_interest_to_root_trigger = yes } + ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } + } + alternative_limit = { + ep3_story_cycle_admin_eunuch_scheme_trigger = { EUNUCH = scope:eunuch } + } + save_scope_as = scheme + scheme_owner = { save_scope_as = scheme_owner } + scheme_defender ?= { save_scope_as = scheme_target } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2052.a + custom_tooltip = { + text = ep3_story_cycle_admin_eunuch.2052.a.tt + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.2052.a.tt + left_icon = scope:scheme_owner + right_icon = scope:scheme_target + scope:scheme_owner = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.toast + left_icon = scope:eunuch + right_icon = scope:emperor + scope:scheme = { expose_scheme = yes } + } + } + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:scheme_owner } + stress_impact = { + trusting = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2052.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + reverse_add_opinion = { + target = scope:scheme_owner + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + deceitful = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:scheme_owner + multiplier = 0.25 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.5 + } + } + } +} + +################################################## +# Demand Court Position +# by Joe Parkin +# 2060-61 +################################################## + +ep3_story_cycle_admin_eunuch.2060 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2060.t + desc = ep3_story_cycle_admin_eunuch.2060.desc + theme = administrative + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + lower_center_portrait = scope:second_party + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { has_any_court_position = no } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + court_position_generator_effect = { + VAR = target + EMPLOYER = root + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2060.a + scope:eunuch = { + court_position_generator_assignment_effect = { + VAR = target + EMPLOYER = root + CANDIDATE = scope:eunuch + } + } + if = { + limit = { exists = scope:old_holder } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:old_holder } + reverse_add_opinion = { + target = scope:old_holder + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2060.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:old_holder ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_valid_family_position_trigger = { + ep3_story_cycle_admin_eunuch_valid_family_member_trigger = yes + has_any_court_position = no + save_temporary_scope_as = position_temp +} + +ep3_story_cycle_admin_eunuch.2061 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2061.t + desc = ep3_story_cycle_admin_eunuch.2061.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:eunuch + animation = admiration + } + right_portrait = { + character = scope:positioner + animation = happiness + } + lower_center_portrait = scope:second_party + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { ep3_story_cycle_admin_eunuch_valid_family_position_trigger = yes } + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + random_close_family_member = { + limit = { ep3_story_cycle_admin_eunuch_valid_family_position_trigger = yes } + weight = { + base = 1 + modifier = { + is_house_head = yes + factor = 0 + } + } + save_scope_as = positioner + hidden_effect = { + set_employer = root + } + court_position_generator_effect = { + VAR = target + EMPLOYER = root + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2061.a + scope:positioner = { + court_position_generator_assignment_effect = { + VAR = target + EMPLOYER = root + CANDIDATE = scope:positioner + } + } + if = { + limit = { exists = scope:old_holder } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:old_holder } + reverse_add_opinion = { + target = scope:old_holder + modifier = angry_opinion + opinion = -15 + } + } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2061.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:old_holder ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + scope:positioner = { + hidden_effect = { + if = { + limit = { + scope:eunuch.house.house_head = { + is_landed_or_landless_administrative = yes + } + } + set_employer = scope:eunuch.house.house_head + } + else = { + move_to_pool = yes + } + } + } + } +} + +################################################## +# Demand Family Marriage +# by Joe Parkin +# 2070 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_marry_trigger = { + is_available = yes + is_playable_character = no + is_adult = yes + is_married = no + is_ruler = no + is_betrothed = no + save_temporary_scope_as = marriage_temp +} + +scripted_trigger ep3_story_cycle_admin_eunuch_emperor_marry_trigger = { + age < $MARRY$.age_plus_10 + age >= $MARRY$.age_minus_10 + is_available = yes + is_playable_character = no + is_adult = yes + is_married = no + is_betrothed = no + scriptedtests_can_marry_character = $MARRY$ +} + +ep3_story_cycle_admin_eunuch.2070 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.2070.t + desc = ep3_story_cycle_admin_eunuch.2070.desc + theme = administrative + override_background = { reference = council_chamber } + left_portrait = { + character = scope:eunuch + animation = debating + } + right_portrait = { + character = scope:eunuch_marry + animation = war_over_tie + } + lower_left_portrait = scope:emperor_marry + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_marry_trigger = yes + root = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_emperor_marry_trigger = { MARRY = scope:marriage_temp } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:eunuch_temp ?= { + any_close_family_member = { + OR = { + primary_spouse ?= { is_close_family_of = root } + betrothed ?= { is_close_family_of = root } + } + } + } + factor = 0.25 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch ?= { + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_marry_trigger = yes + root = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_emperor_marry_trigger = { MARRY = scope:marriage_temp } + } + } + } + save_scope_as = eunuch_marry + root = { + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_emperor_marry_trigger = { MARRY = scope:eunuch_marry } + } + save_scope_as = emperor_marry + } + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2070.a + scope:eunuch_marry = { marry = scope:emperor_marry } + ep3_story_cycle_admin_eunuch_upgrade_effect = yes + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:emperor_marry } + reverse_add_opinion = { + target = scope:emperor_marry + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + paranoid = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.2070.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + scope:emperor_marry ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch_marry + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } +} + +################################################## +# Protégé +# by Joe Parkin +# 3000 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_family_protege_trigger = { + age >= 8 + is_ruler = no + is_available = yes + is_healthy = yes + top_liege ?= root.top_liege + age < $EUNUCH$.age + is_eunuch_trigger = no + OR = { + AND = { + is_male = yes + root.faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + root.faith = { has_doctrine = doctrine_gender_female_dominated } + } + root.faith = { has_doctrine = doctrine_gender_equal } + } +} + +ep3_story_cycle_admin_eunuch.3000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.3000.t + desc = ep3_story_cycle_admin_eunuch.3000.desc + theme = administrative + override_background = { reference = garden } + left_portrait = { + character = scope:eunuch + animation = admiration + } + right_portrait = { + character = scope:protege + animation = personality_bold + } + cooldown = { years = 15 } + + trigger = { + primary_title = { + has_title_law_flag = appointment_type_succession + } + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 3 + } + NOR = { + exists = scope:protege_temp + exists = scope:puppet_temp + } + scope:eunuch_temp = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_family_protege_trigger = { EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = scope:story_temp.var:eunuch_total + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_family_protege_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { add = sum_of_all_skills_value } + modifier = { + is_nibling_of = scope:eunuch + add = 20 + } + } + save_scope_as = protege + } + } + scope:protege ?= { + if = { + limit = { + employer != root + } + set_employer = root + } + } + scope:story = { + set_variable = { + name = protege + value = scope:protege + } + } + scope:protege = { + add_stewardship_skill = 1 + add_intrigue_skill = 1 + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.3000.a + primary_title = { + change_appointment_investment = { + target = scope:protege + value = appointment_score_major_value + } + } + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_student_trigger = { + is_adult = yes + is_ruler = no + is_male = yes + is_available = yes + is_healthy = yes + top_liege ?= root.top_liege + age < scope:eunuch.age + is_eunuch_trigger = yes + NOR = { + has_relation_rival = scope:eunuch + scope:puppet ?= this + scope:protege ?= this + scope:rival ?= this + } +} + +ep3_story_cycle_admin_eunuch.3001 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.3001.t + desc = ep3_story_cycle_admin_eunuch.3001.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = scope:eunuch + animation = scheme + } + right_portrait = { + character = scope:student + animation = writing + } + cooldown = { years = 15 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + NOT = { exists = scope:student_temp } + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 5 + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = scope:story_temp.var:eunuch_total + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { + if = { + limit = { + any_close_family_member = { ep3_story_cycle_admin_eunuch_student_trigger = yes } + } + random_close_family_member = { + limit = { ep3_story_cycle_admin_eunuch_student_trigger = yes } + save_scope_as = student + } + } + else_if = { + limit = { + root = { + any_courtier = { ep3_story_cycle_admin_eunuch_student_trigger = yes } + } + } + random_courtier = { + limit = { ep3_story_cycle_admin_eunuch_student_trigger = yes } + save_scope_as = student + } + } + else = { + ep3_story_cycle_admin_eunuch_save_origin_effect = yes + create_character = { + culture = scope:origin.culture + faith = root.faith + location = root.location + gender = male + age = { + value = { + add = { + integer_range = { + min = 18 + max = 45 + } + } + max = { + value = { + value = scope:eunuch.age + add = -5 + } + } + } + } + random_traits_list = { + count = 1 + education_diplomacy_3 = { weight = { base = 30 } } + education_stewardship_3 = { weight = { base = 30 } } + education_intrigue_3 = { weight = { base = 30 } } + education_diplomacy_4 = { weight = { base = 10 } } + education_stewardship_4 = { weight = { base = 10 } } + education_intrigue_4 = { weight = { base = 10 } } + } + random_traits_list = { + count = 1 + beardless_eunuch = { weight = { base = 90 } } + eunuch_1 = { weight = { base = 10 } } + } + random_traits = yes + dynasty = none + save_scope_as = student + } + } + } + scope:student ?= { + if = { + limit = { employer != root } + set_employer = root + } + hidden_effect = { set_relation_mentor = scope:eunuch } + add_stewardship_skill = 1 + add_intrigue_skill = 1 + } + scope:story = { + set_variable = { name = student value = scope:student } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.3001.a + } +} + +################################################## +# Rival +# by Joe Parkin +# 3010 +################################################## + +ep3_story_cycle_admin_eunuch.3010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.3010.t + desc = ep3_story_cycle_admin_eunuch.3010.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = scope:eunuch + animation = dismissal + } + right_portrait = { + character = scope:rival + animation = disapproval + } + cooldown = { years = 15 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + NOT = { exists = scope:rival_temp } + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 3 + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = scope:story_temp.var:eunuch_total + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + ep3_story_cycle_admin_eunuch_save_origin_effect = yes + random_courtier = { + limit = { + is_available = yes + is_adult = yes + is_eunuch_trigger = yes + NOR = { + scope:eunuch ?= this + scope:protege ?= this + scope:student ?= this + has_relation_friend = scope:eunuch + has_relation_lover = scope:eunuch + is_close_family_of = root + is_close_family_of = scope:eunuch + } + trigger_if = { + limit = { exists = house } + NOR = { + house = root.top_liege.house + house = scope:eunuch.house + } + } + } + save_scope_as = rival + } + if = { + limit = { NOT = { exists = scope:rival } } + create_character = { + culture = scope:origin.culture + faith = root.faith + location = root.location + gender = male + age = { + value = { + add = { + integer_range = { + min = 25 + max = 55 + } + } + } + } + random_traits_list = { + count = 1 + education_diplomacy_3 = { weight = { base = 30 } } + education_stewardship_3 = { weight = { base = 30 } } + education_intrigue_3 = { weight = { base = 30 } } + education_diplomacy_4 = { weight = { base = 10 } } + education_stewardship_4 = { weight = { base = 10 } } + education_intrigue_4 = { weight = { base = 10 } } + } + random_traits_list = { + count = 1 + beardless_eunuch = { weight = { base = 90 } } + eunuch_1 = { weight = { base = 10 } } + } + random_traits = yes + dynasty = none + save_scope_as = rival + } + } + scope:story = { + set_variable = { + name = rival + value = scope:rival + } + } + scope:rival ?= { + if = { + limit = { employer != root } + root = { add_courtier = scope:rival } + } + set_relation_rival = { + target = scope:eunuch + reason = rival_admin_eunuch + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.3010.a + show_as_tooltip = { + scope:rival ?= { + set_relation_rival = { + target = scope:eunuch + reason = rival_admin_eunuch + } + } + } + } +} + +################################################## +# Affair Accusation +# by Joe Parkin +# 4000 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { + is_adult = yes + is_attracted_to_gender_of = $SPOUSE$ + NOR = { + is_close_family_of = $EUNUCH$ + is_close_family_of = root + is_close_family_of = $SPOUSE$ + } + trigger_if = { + limit = { is_married = yes } + might_cheat_on_every_partner_trigger = yes + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_spouse_accusation_trigger = { + is_adult = yes + reverse_opinion = { + target = $EUNUCH$ + value < 25 + } + opinion = { + target = $EUNUCH$ + value < 25 + } + NOR = { + has_relation_friend = $EUNUCH$ + has_relation_lover = $EUNUCH$ + any_relation = { + type = lover + is_close_family_of = $EUNUCH$ + } + } + save_temporary_scope_as = spouse_temp + OR = { + any_secret = { + type = secret_lover + secret_target != root + } + root = { + OR = { + any_courtier = { + ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { EUNUCH = $EUNUCH$ SPOUSE = scope:spouse_temp } + } + any_vassal_or_below = { + ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { EUNUCH = $EUNUCH$ SPOUSE = scope:spouse_temp } + } + } + } + } +} + +ep3_story_cycle_admin_eunuch.4000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.4000.t + desc = ep3_story_cycle_admin_eunuch.4000.desc + theme = administrative + override_background = { reference = corridor_night } + left_portrait = { + character = scope:eunuch + animation = scheme + } + right_portrait = { + character = root + animation = eavesdrop + } + lower_left_portrait = scope:spouse + lower_center_portrait = scope:cuckolder + cooldown = { years = 10 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 3 + any_spouse = { + ep3_story_cycle_admin_eunuch_spouse_accusation_trigger = { EUNUCH = scope:eunuch_temp } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_spouse = { + any_secret = { + type = secret_lover + secret_target != root + } + } + add = 1 + } + modifier = { + any_spouse = { might_cheat_on_every_partner_trigger = yes } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + any_spouse = { has_relation_rival = scope:eunuch_temp } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + any_spouse = { + ep3_story_cycle_admin_eunuch_spouse_accusation_trigger = { EUNUCH = scope:eunuch_temp } + has_trait = lustful + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + play_music_cue = "mx_cue_secret" + random_spouse = { + limit = { + ep3_story_cycle_admin_eunuch_spouse_accusation_trigger = { EUNUCH = scope:eunuch } + } + weight = { + base = 1 + modifier = { + has_trait = lustful + add = 1 + } + modifier = { + any_secret = { type = secret_lover } + add = 1 + } + modifier = { + has_relation_rival = scope:eunuch + add = 1 + } + } + save_scope_as = spouse + if = { + limit = { + any_secret = { + type = secret_lover + secret_target != root + } + } + random_secret = { + type = secret_lover + limit = { + secret_target != root + } + save_scope_as = secret + hidden_effect = { reveal_to = scope:eunuch } + } + } + else = { + root = { + every_courtier = { + limit = { + ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { EUNUCH = scope:eunuch SPOUSE = scope:spouse } + } + add_to_list = potential_cuckolders + } + every_vassal_or_below = { + limit = { + ep3_story_cycle_admin_eunuch_spouse_cuckolder_trigger = { EUNUCH = scope:eunuch SPOUSE = scope:spouse } + } + add_to_list = potential_cuckolders + } + } + random_in_list = { + list = potential_cuckolders + weight = { + base = 1 + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = cuckolder + } + } + } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:spouse } + ep3_story_cycle_admin_eunuch_upset_courtier_effect = { COURTIER = scope:cuckolder } + } + + option = { # Discover + name = ep3_story_cycle_admin_eunuch.4000.a + trigger = { + NOT = { + any_known_secret = { + secret_owner = scope:spouse + secret_type = secret_lover + secret_target != root + } + } + } + duel = { + target = scope:eunuch + skill = intrigue + 10 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_admin_eunuch.4000.success + custom_tooltip = ep3_story_cycle_admin_eunuch.4000.success.tt + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.4000.success + left_icon = scope:eunuch + right_icon = scope:spouse + if = { + limit = { exists = scope:secret } + scope:secret ?= { reveal_to = root } + } + else = { custom_tooltip = ep3_story_cycle_admin_eunuch.4000.innocent } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + show_chance = no + desc = ep3_story_cycle_admin_eunuch.4000.failure + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.4000.failure + left_icon = scope:eunuch + right_icon = scope:spouse + custom_tooltip = ep3_story_cycle_admin_eunuch.4010.failure.tt + } + } + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:cuckolder + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.4000.b + trigger = { + any_known_secret = { + secret_owner = scope:spouse + secret_type = secret_lover + secret_target != root + } + } + reason = ep3_story_cycle_admin_eunuch.4000.b.reason + stress_impact = { + vengeful = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:spouse + multiplier = 0.25 + } + } + } + + option = { # Imprison + name = ep3_story_cycle_admin_eunuch.4000.c + add_tyranny = medium_tyranny_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:spouse + IMPRISONER = root + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:cuckolder + IMPRISONER = root + } + stress_impact = { + forgiving = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:spouse + multiplier = -0.25 + } + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } +} + +################################################## +# Seduction +# by Joe Parkin +# 4010 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_cheating_spouse_trigger = { + is_ai = yes + might_cheat_on_every_partner_trigger = yes + trigger_if = { + limit = { is_male = yes } + NOT = { + root.faith = { has_doctrine_parameter = adultery_male_accepted } + } + } + trigger_else = { + NOT = { + root.faith = { has_doctrine_parameter = adultery_female_accepted } + } + } + opinion = { + target = root + value < 25 + } +} + +scripted_trigger ep3_story_cycle_admin_eunuch_seducer_trigger = { + is_attracted_to_gender_of = $SPOUSE$ + is_eunuch_trigger = no + NOR = { + has_trait = celibate + is_close_family_of = $SPOUSE$ + has_relation_rival = $SPOUSE$ + } + save_temporary_scope_as = seducer_temp +} + +ep3_story_cycle_admin_eunuch.4010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.4010.t + desc = ep3_story_cycle_admin_eunuch.4010.desc + theme = administrative + override_background = { reference = bedchamber } + cooldown = { years = 15 } + left_portrait = { + character = root + animation = stress + } + lower_left_portrait = scope:seducer + lower_center_portrait = scope:spouse + lower_right_portrait = scope:eunuch + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:story_temp.var:eunuch_total >= 3 + scope:eunuch_temp = { + opinion = { + target = root + value < 25 + } + } + any_spouse = { + ep3_story_cycle_admin_eunuch_cheating_spouse_trigger = yes + save_temporary_scope_as = spouse_temp + scope:eunuch_temp = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_seducer_trigger = { SPOUSE = scope:spouse_temp } + } + } + is_attracted_to_gender_of = scope:seducer_temp + } + } + + weight_multiplier = { + base = 1 + modifier = { + is_ai = yes + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { has_relation_rival = root } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + play_music_cue = "mx_cue_secret" + random_spouse = { + limit = { + ep3_story_cycle_admin_eunuch_cheating_spouse_trigger = yes + save_temporary_scope_as = spouse_temp + scope:eunuch = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_seducer_trigger = { SPOUSE = scope:spouse_temp } + } + } + is_attracted_to_gender_of = scope:seducer_temp + } + save_scope_as = spouse + scope:eunuch = { + ordered_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_seducer_trigger = { SPOUSE = scope:spouse } + scope:spouse = { is_attracted_to_gender_of = scope:seducer_temp } + } + order_by = attraction + save_scope_as = seducer + } + } + } + scope:story = { + set_variable = { name = spouse value = scope:spouse } + set_variable = { name = seducer value = scope:seducer } + } + hidden_effect = { + random = { + chance = 50 + scope:seducer ?= { + set_relation_lover = scope:spouse + had_sex_with_effect = { + CHARACTER = scope:spouse + PREGNANCY_CHANCE = seduce_pregnancy_chance + } + random_secret = { + type = secret_lover + limit = { + secret_target = scope:spouse + } + save_scope_as = secret + } + } + scope:eunuch = { + if = { + limit = { + OR = { + can_start_scheme = { type = murder target_character = root } + is_scheming_against = { type = murder target = root } + } + } + if = { + limit = { + can_start_scheme = { type = murder target_character = root } + } + start_scheme = { type = murder target_character = root } + } + random_scheme = { + type = murder + limit = { + scheme_target_character = root + } + save_scope_as = scheme + } + scope:scheme ?= { + if = { + limit = { NOT = { scheme_is_character_agent = scope:spouse } } + add_agent_slot = agent_lookout + random_scheme_agent_slot = { + limit = { + is_filled = no + save_temporary_scope_as = slot_temp + scope:spouse = { is_valid_as_agent_in_slot = scope:slot_temp } + } + save_scope_as = spouse_slot + } + scope:spouse = { + force_add_to_agent_slot = { + agent_slot = scope:spouse_slot + years = 1 + } + } + } + if = { + limit = { NOT = { scheme_is_character_agent = scope:spouse } } + add_agent_slot = agent_assassin + random_scheme_agent_slot = { + limit = { + is_filled = no + save_temporary_scope_as = slot_temp + scope:seducer = { is_valid_as_agent_in_slot = scope:slot_temp } + } + save_scope_as = seducer_slot + } + scope:seducer = { + force_add_to_agent_slot = { + agent_slot = scope:seducer_slot + years = 1 + } + } + } + } + } + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.4010.a + duel = { + skill = intrigue + target = scope:eunuch + 10 = { + show_chance = no + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_admin_eunuch.4000.success + custom_tooltip = ep3_story_cycle_admin_eunuch.4000.success.tt + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + title = ep3_story_cycle_admin_eunuch.4000.success + left_icon = scope:eunuch + right_icon = scope:spouse + scope:secret ?= { reveal_to = root } + scope:scheme ?= { + expose_scheme = yes + if = { + limit = { scheme_is_character_agent = scope:spouse } + expose_scheme_agent = scope:spouse + } + if = { + limit = { scheme_is_character_agent = scope:seducer } + expose_scheme_agent = scope:seducer + } + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + show_chance = no + desc = ep3_story_cycle_admin_eunuch.4000.failure + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.4000.failure + left_icon = scope:eunuch + right_icon = scope:spouse + custom_tooltip = ep3_story_cycle_admin_eunuch.4010.failure.tt + } + } + } + } + stress_impact = { + trusting = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } + + option = { # Imprison + name = ep3_story_cycle_admin_eunuch.4010.c + add_tyranny = major_tyranny_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:spouse + IMPRISONER = root + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:seducer + IMPRISONER = root + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:eunuch + IMPRISONER = root + } + stress_impact = { + forgiving = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:spouse + multiplier = -0.25 + } + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.4010.d + add_prestige = medium_prestige_loss + stress_impact = { + vengeful = minor_stress_impact_gain + trusting = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:spouse + multiplier = 0.25 + } + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_boldness = -0.5 + ai_honor = -0.25 + } + } + } +} + +################################################## +# Upset Courtiers +# by Joe Parkin +# 5000 +################################################## + +ep3_story_cycle_admin_eunuch.5000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.5000.t + desc = ep3_story_cycle_admin_eunuch.5000.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:whinger + animation = debating + } + lower_center_portrait = scope:eunuch + cooldown = { years = 2 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:story_temp ?= { + var:eunuch_score >= 2 + any_in_list = { + variable = upset_courtiers + count >= 2 + } + any_in_list = { + variable = upset_courtiers + is_available = yes + top_liege ?= root.top_liege + NOT = { has_character_flag = admin_rival_whinger_cooldown } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:story_temp ?= { + any_in_list = { + variable = upset_courtiers + count >= 4 + } + } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:story_temp ?= { + any_in_list = { + variable = upset_courtiers + count >= 6 + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:story = { + every_in_list = { + variable = upset_courtiers + limit = { + is_available = yes + top_liege ?= root.top_liege + NOT = { has_character_flag = admin_rival_whinger_cooldown } + } + add_to_list = upset_courtiers + } + } + ordered_in_list = { + list = upset_courtiers + limit = { + is_available = yes + top_liege ?= root.top_liege + NOT = { has_character_flag = admin_rival_whinger_cooldown } + } + order_by = highest_held_title_tier + save_scope_as = whinger + add_character_flag = { flag = admin_rival_whinger_cooldown years = 5 } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5000.a + reverse_add_opinion = { + target = scope:whinger + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5000.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + reverse_add_opinion = { + target = scope:whinger + modifier = pleased_opinion + opinion = 15 + } + stress_impact = { + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:whinger + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } +} + +################################################## +# Upset Family +# by Joe Parkin +# 5010 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_rival_family_trigger = { + age >= 8 + top_liege = root.top_liege + NOR = { + has_trait = fickle + has_trait = humble + has_trait = content + has_trait = trusting + has_any_scripted_relation = $EUNUCH$ + this = $EUNUCH$ + has_character_flag = admin_rival_whinger_cooldown + } +} + +ep3_story_cycle_admin_eunuch.5010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.5010.t + desc = ep3_story_cycle_admin_eunuch.5010.desc + theme = administrative + left_portrait = { + character = scope:rival + animation = dismissal + } + right_portrait = { + character = scope:eunuch + animation = debating + } + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp.var:eunuch_total >= 3 + OR = { + any_close_family_member = { + ep3_story_cycle_admin_eunuch_rival_family_trigger = { EUNUCH = scope:eunuch_temp } + } + any_spouse = { + ep3_story_cycle_admin_eunuch_rival_family_trigger = { EUNUCH = scope:eunuch_temp } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_active_diarchy = yes + add = 1 + } + modifier = { + exists = player_heir + primary_title.current_heir != player_heir + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + exists = primary_title.current_heir + scope:eunuch_temp ?= { is_close_family_of = root.primary_title.current_heir } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + scope:story_temp ?= { + any_in_list = { + variable = upset_courtiers + OR = { + is_close_family_of = root + is_spouse_of = root + } + } + } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + every_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_rival_family_trigger = { EUNUCH = scope:eunuch } + } + add_to_list = potential_rivals + } + every_spouse = { + limit = { + ep3_story_cycle_admin_eunuch_rival_family_trigger = { EUNUCH = scope:eunuch } + } + add_to_list = potential_rivals + } + random_in_list = { + list = potential_rivals + weight = { + base = 1 + modifier = { + this = root.player_heir + add = 1 + } + } + save_scope_as = rival + set_relation_rival = { reason = rival_admin_eunuch_family target = scope:eunuch } + add_character_flag = { + flag = admin_rival_whinger_cooldown + years = 6 + } + scope:story = { + add_to_variable_list = { + name = upset_courtiers + target = scope:rival + } + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5010.a + reverse_add_opinion = { + target = scope:rival + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = -0.25 + } + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5010.b + ep3_story_cycle_admin_eunuch_downgrade_effect = yes + reverse_add_opinion = { + target = scope:rival + modifier = pleased_opinion + opinion = 15 + } + stress_impact = { + lazy = minor_stress_impact_gain + fickle = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 10 + opinion_modifier = { + opinion_target = scope:rival + multiplier = 0.25 + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } +} + +################################################## +# Puppet Heir +# by Joe Parkin +# 5020 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_puppet_heir_trigger = { + this != root.primary_title.current_heir + age >= 8 + top_liege = root.top_liege + is_playable_character = no + OR = { + is_adult = no + has_trait = intellect_bad + has_trait = incapable + has_relation_friend = $EUNUCH$ + NAND = { + has_trait = ambitious + has_trait = diligent + has_trait = paranoid + } + } + sum_of_all_skills_value < root.primary_title.current_heir.sum_of_all_skills_value + save_temporary_scope_as = puppet_temp +} + +ep3_story_cycle_admin_eunuch.5020 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.5020.t + desc = ep3_story_cycle_admin_eunuch.5020.desc + theme = administrative + left_portrait = { + character = scope:puppet + animation = happiness + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + override_background = { reference = garden } + cooldown = { years = 5 } + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 3 + } + NOR = { + exists = scope:protege_temp + exists = scope:puppet_temp + } + any_close_family_member = { + ep3_story_cycle_admin_eunuch_puppet_heir_trigger = { EUNUCH = scope:eunuch_temp } + } + } + + weight_multiplier = { + base = 1 + modifier = { + has_active_diarchy = yes + add = 1 + } + modifier = { + player_heir ?= primary_title.current_heir + add = 1 + } + modifier = { + player_heir ?= { is_adult = no } + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + primary_title.current_heir = { save_scope_as = current_heir } + random_close_family_member = { + limit = { + ep3_story_cycle_admin_eunuch_puppet_heir_trigger = { EUNUCH = scope:eunuch } + } + save_scope_as = puppet + set_relation_friend = { reason = friend_admin_eunuch_puppet target = scope:eunuch } + } + scope:story = { set_variable = { name = puppet value = scope:puppet } } + } + + option = { + name = ep3_story_cycle_admin_eunuch.5020.a + scope:puppet = { + add_character_modifier = { + modifier = admin_eunuch_puppet_modifier + years = 10 + } + } + primary_title = { + change_appointment_investment = { + target = scope:puppet + value = appointment_score_major_value + } + } + } +} + +################################################## +# Coup +# by Joe Parkin +# 6000 +################################################## + +scripted_trigger ep3_story_cycle_admin_eunuch_coup_trigger = { + opinion = { + target = root + value < 50 + } + NOR = { + has_relation_friend = root + is_spouse_of = root + has_trait = eunuch_1 + has_trait = beardless_eunuch + has_trait = blind + } + save_temporary_scope_as = coupist_temp +} + +scripted_effect ep3_story_cycle_admin_eunuch_coup_effect = { + create_title_and_vassal_change = { + type = conquest + save_scope_as = title_change + add_claim_on_loss = yes + } + primary_title = { + change_title_holder = { + holder = scope:coupist + change = scope:title_change + } + } + hidden_effect = { + every_held_title = { + title_tier >= county + limit = { + is_noble_family_title = no + is_landless_type_title = no + this != scope:emperor.primary_title + } + change_title_holder = { + holder = scope:coupist + change = scope:title_change + } + } + } + resolve_title_and_vassal_change = scope:title_change +} + +ep3_story_cycle_admin_eunuch.6000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.6000.t + desc = { + desc = ep3_story_cycle_admin_eunuch.6000.desc + first_valid = { + triggered_desc = { + trigger = { scope:coupist ?= { is_close_family_of = root } } + desc = ep3_story_cycle_admin_eunuch.6000.family + } + } + desc = ep3_story_cycle_admin_eunuch.6000.body + first_valid = { + triggered_desc = { + trigger = { scope:coupist.house ?= scope:emperor.house } + desc = ep3_story_cycle_admin_eunuch.6000.family + } + triggered_desc = { + trigger = { + has_diarchy_type = co_emperorship + has_active_diarchy = yes + scope:coupist ?= diarch + } + desc = ep3_story_cycle_admin_eunuch.6000.co_caesar + } + triggered_desc = { + trigger = { scope:coupist.house ?= scope:eunuch.house } + desc = ep3_story_cycle_admin_eunuch.6000.eunuch_family + } + triggered_desc = { + trigger = { + has_diarchy_type = regency + has_active_diarchy = yes + scope:coupist ?= diarch + } + desc = ep3_story_cycle_admin_eunuch.6000.regent + } + desc = ep3_story_cycle_admin_eunuch.6000.fallback + } + } + theme = administrative + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:eunuch + animation = war_over_win + } + lower_center_portrait = scope:coupist + lower_right_portrait = scope:bodyguard + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + is_at_war = no + trigger_if = { + limit = { exists = scope:story_temp.var:eunuch_total } + scope:story_temp.var:eunuch_total >= 5 + } + scope:eunuch_temp ?= { + opinion = { + target = root + value < 25 + } + OR = { + has_relation_rival = root + has_trait = ambitious + opinion = { + target = root + value <= -50 + } + scope:story_temp.var:eunuch_refusals >= 3 + } + NOR = { + has_relation_friend = root + is_spouse_of = root + } + } + OR = { + scope:puppet_temp ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + scope:seducer_temp ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + scope:protege_temp ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + } + OR = { + any_targeting_faction = { + faction_type = claimant_faction + special_character = scope:coupist_temp + } + any_vassal = { + is_landed = yes + can_create_faction = { + type = claimant_faction + target = scope:emperor_temp + } + NOR = { + is_allied_to = scope:emperor_temp + is_close_family_of = scope:emperor_temp + is_spouse_of = scope:emperor_temp + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + add = { + value = scope:story_temp.var:eunuch_score + min = 0 + } + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + OR = { + diarch ?= scope:puppet_temp + diarch ?= scope:seducer_temp + diarch ?= scope:protege_temp + } + has_active_diarchy = yes + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + OR = { + diarch ?= scope:puppet_temp + diarch ?= scope:seducer_temp + diarch ?= scope:protege_temp + } + add = 1 + } + modifier = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + scope:eunuch_temp ?= { + OR = { + has_trait = schemer + has_trait = education_intrigue + has_council_position = councillor_spymaster + has_court_position = chief_eunuch_court_position + } + } + add = 1 + } + modifier = { + any_targeting_faction = { count > 1 } + add = 1 + } + modifier = { + age >= 50 + add = 1 + } + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + hidden_effect = { + random_list = { + 10 = { + trigger = { + scope:puppet ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + } + modifier = { add = scope:puppet.sum_of_all_skills_value } + scope:puppet = { save_scope_as = coupist } + } + 10 = { + trigger = { + scope:seducer ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + } + modifier = { add = scope:seducer.sum_of_all_skills_value } + scope:seducer = { save_scope_as = coupist } + } + 10 = { + trigger = { + scope:protege ?= { ep3_story_cycle_admin_eunuch_coup_trigger = yes } + } + modifier = { add = scope:protege.sum_of_all_skills_value } + scope:protege = { save_scope_as = coupist } + } + } + } + scope:coupist = { + if = { + limit = { + NOT = { has_claim_on = root.primary_title } + } + add_unpressed_claim = root.primary_title + } + } + random_court_position_holder = { + limit = { + has_court_position = bodyguard_court_position + is_available = yes + NOR = { + this = scope:coupist + this = scope:eunuch + } + } + save_scope_as = bodyguard + } + random_targeting_faction = { + faction_type = claimant_faction + limit = { + special_character = scope:coupist + } + save_scope_as = faction + } + if = { + limit = { + NOT = { exists = scope:faction } + } + scope:story = { + ordered_in_list = { + variable = eunuch_allies + limit = { + can_create_faction = { + type = claimant_faction + target = scope:emperor + } + } + order_by = current_military_strength + save_scope_as = faction_starter + } + } + if = { + limit = { NOT = { exists = scope:faction_starter } } + ordered_vassal = { + limit = { + is_landed = yes + can_create_faction = { + type = claimant_faction + target = scope:emperor + } + NOR = { + has_relation_rival = scope:emperor + is_allied_to = scope:emperor + is_close_family_of = scope:emperor + } + } + save_scope_as = faction_starter + } + } + scope:faction_starter ?= { + create_faction = { + type = claimant_faction + target = scope:emperor + } + hidden_effect = { + joined_faction ?= { + save_scope_as = faction + set_special_character = scope:coupist + set_special_title = root.primary_title + } + } + } + } + scope:eunuch ?= { + if = { + limit = { + NOT = { + scope:faction = { any_faction_member = { this = scope:eunuch } } + } + can_join_faction = scope:faction + } + join_faction = scope:faction + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.6000.a + duel = { + skills = { diplomacy intrigue } + value = decent_skill_rating + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + scope:bodyguard ?= { + opinion = { + target = scope:emperor + value > 50 + } + } + add = 5 + } + modifier = { + has_character_modifier = admin_eunuch_liege_1_modifier + add = 2 + } + modifier = { + has_character_modifier = admin_eunuch_liege_2_modifier + add = 4 + } + modifier = { + has_character_modifier = admin_eunuch_liege_3_modifier + add = 6 + } + min = 1 + desc = ep3_story_cycle_admin_eunuch.6000.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_admin_eunuch.6000.a.success + left_icon = scope:eunuch + right_icon = scope:coupist + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:eunuch + IMPRISONER = scope:emperor + } + reverse_add_opinion = { + target = scope:coupist + modifier = angry_opinion + opinion = -25 + } + } + scope:story = { + if = { + limit = { + any_in_list = { + variable = upset_courtiers + is_alive = yes + top_liege = root + NOT = { scope:coupist ?= this } + } + } + every_in_list = { + variable = upset_courtiers + limit = { + is_alive = yes + top_liege = root + NOT = { scope:coupist ?= this } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + } + end_story = yes + } + } + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + modifier = { + scope:bodyguard ?= { + opinion = { + target = scope:emperor + value < -50 + } + } + add = 5 + } + modifier = { + has_character_modifier = admin_eunuch_liege_4_modifier + add = 2 + } + modifier = { + has_character_modifier = admin_eunuch_liege_5_modifier + add = 4 + } + modifier = { + has_character_modifier = admin_eunuch_liege_6_modifier + add = 6 + } + modifier = { + has_character_modifier = admin_eunuch_liege_7_modifier + add = 8 + } + modifier = { + has_character_modifier = admin_eunuch_liege_8_modifier + add = 10 + } + min = 1 + desc = ep3_story_cycle_admin_eunuch.6000.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_admin_eunuch.6000.a.failure + left_icon = scope:eunuch + right_icon = scope:coupist + ep3_story_cycle_admin_eunuch_coup_effect = yes + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:emperor + IMPRISONER = scope:coupist + } + } + } + } + stress_impact = { + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + humble = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.6000.c + add_legitimacy = major_legitimacy_loss + every_targeting_faction = { add_faction_discontent = 25 } + stress_impact = { + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = -0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.6000.d + ep3_story_cycle_admin_eunuch_coup_effect = yes + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = -1 + } + } + } +} + +################################################## +# Accession +# by Joe Parkin +# 8000 +################################################## + +scripted_trigger ep3_admin_story_cycle_valid_switch_character_trigger = { + is_alive = yes + employer = root + is_playable_character = no + trigger_if = { + limit = { is_imprisoned = yes } + is_imprisoned_by = root + } +} + +ep3_story_cycle_admin_eunuch.8000 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_title = title:e_byzantium } + desc = ep3_story_cycle_admin_eunuch.8000.intro_byz + } + desc = ep3_story_cycle_admin_eunuch.8000.intro + } + first_valid = { + triggered_desc = { + trigger = { is_close_family_of = scope:previous_story_owner } + desc = ep3_story_cycle_admin_eunuch.8000.intro_family + } + triggered_desc = { + trigger = { + OR = { + scope:previous_story_owner.killer ?= root + primary_title = { + recent_history = { type = conquest days = 5 } + } + } + } + desc = ep3_story_cycle_admin_eunuch.8000.intro_enemy + } + desc = ep3_story_cycle_admin_eunuch.8000.intro_fallback + } + desc = ep3_story_cycle_admin_eunuch.8000.desc + } + theme = administrative + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:eunuch + animation = admiration + } + lower_center_portrait = scope:previous_story_owner + + trigger = { + ep3_story_cycle_admin_eunuch_valid_story_trigger = yes + ep3_story_cycle_admin_eunuch_valid_event_trigger = yes + } + + immediate = { + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch ?= { + if = { + limit = { + is_alive = yes + is_playable_character = no + employer != root + } + set_employer = root + } + } + scope:student ?= { + if = { + limit = { + is_alive = yes + is_playable_character = no + employer != root + } + set_employer = root + } + } + scope:rival ?= { + if = { + limit = { + is_alive = yes + is_playable_character = no + employer != root + } + set_employer = root + } + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.8000.a + trigger = { + OR = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + scope:eunuch ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + } + flavor = admin_eunuch_flavor_tt + change_influence = medium_influence_loss + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + move_to_pool = yes + } + scope:protege ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:student ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:rival ?= { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + scope:story = { + if = { + limit = { + any_in_list = { + variable = upset_courtiers + is_alive = yes + top_liege = root + NOR = { + scope:protege ?= this + scope:student ?= this + scope:rival ?= this + } + } + } + every_in_list = { + variable = upset_courtiers + limit = { + is_alive = yes + top_liege = root + NOR = { + scope:protege ?= this + scope:student ?= this + scope:rival ?= this + } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + } + end_story = yes + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.8000.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:student = { + if = { + limit = { employer != root } + set_employer = root + } + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = scope:student + SECOND_TYPE = eunuch + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = root + SECOND_TYPE = liege + } + scope:eunuch ?= { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + scope:protege ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.8000.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:rival = { + if = { + limit = { employer != root } + set_employer = root + } + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = scope:rival + SECOND_TYPE = eunuch + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = root + SECOND_TYPE = liege + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + scope:protege ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + } + + option = { + name = ep3_story_cycle_admin_eunuch.8000.d + trigger = { + scope:eunuch ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:eunuch = { + if = { + limit = { employer != root } + set_employer = root + } + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = scope:eunuch + FIRST_TYPE = eunuch + SECOND = root + SECOND_TYPE = liege + } + scope:rival ?= { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -25 + } + } + scope:story = { + every_in_list = { + list = upset_courtiers + limit = { top_liege = root.top_liege } + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + } + } +} + +################################################## +# Eunuch Dead +# by Joe Parkin +# 8010 +################################################## + +ep3_story_cycle_admin_eunuch.8010 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8010.t + desc = ep3_story_cycle_admin_eunuch.8010.desc + theme = administrative + override_background = { reference = ce1_catacombs } + left_portrait = { + character = scope:eunuch + animation = dead + } + right_portrait = { + character = scope:protege + animation = grief + trigger = { is_alive = yes } + } + lower_right_portrait = { + character = scope:student + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + lower_center_portrait = { + character = scope:rival + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + trigger = { + any_owned_story = { + type = story_cycle_admin_eunuch + var:eunuch ?= { is_alive = no } + } + } + immediate = { + play_music_cue = mx_cue_death + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + scope:student = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:student + SECOND_TYPE = eunuch + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + scope:rival = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:rival + SECOND_TYPE = eunuch + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8010.d + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:story = { end_story = yes } + } +} + +################################################## +# Eunuch Jailed +# by Joe Parkin +# 8020 +################################################## + +ep3_story_cycle_admin_eunuch.8020 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8020.t + desc = ep3_story_cycle_admin_eunuch.8020.desc + theme = administrative + override_background = { reference = dungeon_scope } + left_portrait = { + character = scope:background_dungeon_scope + animation = war_over_tie + } + right_portrait = { + character = scope:eunuch + animation = prisonhouse + } + lower_right_portrait = { + character = scope:student + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + lower_center_portrait = { + character = scope:rival + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + trigger = { + any_owned_story = { + type = story_cycle_admin_eunuch + var:eunuch ?= { is_imprisoned = yes } + } + } + immediate = { + play_music_cue = "mx_cue_prison" + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch.imprisoner = { save_scope_as = background_dungeon_scope } + } + cooldown = { days = 1 } + option = { + name = ep3_story_cycle_admin_eunuch.8020.a + trigger = { scope:background_dungeon_scope = root } + scope:eunuch = { release_from_prison = yes } + stress_impact = { + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8020.a + trigger = { scope:background_dungeon_scope != root } + scope:eunuch = { save_scope_as = prisoner } + save_scope_as = payer + scope:background_dungeon_scope = { save_scope_as = imprisoner } + pay_short_term_gold = { + gold = scope:prisoner.ransom_cost_value + target = scope:imprisoner + } + scope:prisoner = { release_from_prison = yes } + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.25 + } + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + scope:student = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:student + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + stress_impact = { + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:student + multiplier = 0.25 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + scope:rival = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:rival + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + stress_impact = { + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + opinion_modifier = { + opinion_target = scope:rival + multiplier = 0.25 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8020.d + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + scope:story = { end_story = yes } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } +} + +################################################## +# Eunuch Moved +# by Joe Parkin +# 8030 +################################################## + +ep3_story_cycle_admin_eunuch.8030 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8030.t + desc = ep3_story_cycle_admin_eunuch.8030.desc + theme = administrative + override_background = { reference = throne_room_scope } + left_portrait = { + character = scope:eunuch + animation = writing + } + right_portrait = { + character = scope:background_throne_room_scope + animation = idle + trigger = { + NOR = { + this = root + this = scope:eunuch + } + } + } + lower_right_portrait = { + character = scope:student + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + lower_center_portrait = { + character = scope:rival + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + trigger = { + any_owned_story = { + type = story_cycle_admin_eunuch + exists = var:eunuch.employer + var:eunuch.employer != story_owner + } + } + immediate = { + play_music_cue = "mx_cue_negative" + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch.liege = { save_scope_as = background_throne_room_scope } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.a + pay_short_term_gold = { + target = scope:eunuch + gold = minor_gold_value + } + add_courtier = scope:eunuch + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + gold < medium_gold_value + factor = 0 + } + opinion_modifier = { + opinion_target = scope:eunuch + multiplier = 0.5 + } + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + scope:student = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:student + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:student + multiplier = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + scope:rival = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:rival + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:rival + multiplier = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.d + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + scope:story = { end_story = yes } + ai_chance = { + base = 25 + } + } +} + +################################################## +# Eunuch Ruler +# by Joe Parkin +# 8040 +################################################## + +ep3_story_cycle_admin_eunuch.8040 = { + type = character_event + title = ep3_story_cycle_admin_eunuch.8040.t + desc = { + desc = ep3_story_cycle_admin_eunuch.8040.desc + first_valid = { + triggered_desc = { + trigger = { scope:eunuch = { has_government = landless_adventurer_government } } + desc = ep3_story_cycle_admin_eunuch.8040.laamp + } + triggered_desc = { + trigger = { scope:eunuch.primary_title ?= { is_noble_family_title = yes } } + desc = ep3_story_cycle_admin_eunuch.8040.noble_family + } + desc = ep3_story_cycle_admin_eunuch.8040.ruler + } + } + theme = administrative + override_background = { reference = throne_room_scope } + left_portrait = { + character = scope:eunuch + animation = war_over_win + } + lower_right_portrait = { + character = scope:student + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + lower_center_portrait = { + character = scope:rival + trigger = { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + trigger = { + any_owned_story = { + type = story_cycle_admin_eunuch + var:eunuch ?= { is_playable_character = yes } + } + } + immediate = { + play_music_cue = "mx_cue_negative" + ep3_story_cycle_admin_eunuch_save_scopes_effect = yes + scope:eunuch = { save_scope_as = background_throne_room_scope } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.b + trigger = { + scope:student ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:student } + remove_variable = student + } + scope:student = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:student + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:student + multiplier = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8030.c + trigger = { + scope:rival ?= { ep3_admin_story_cycle_valid_switch_character_trigger = yes } + } + scope:story = { + set_variable = { name = eunuch value = scope:rival } + remove_variable = rival + } + scope:rival = { + if = { + limit = { is_imprisoned_by = root } + release_from_prison = yes + } + } + ep3_story_cycle_admin_eunuch_matching_modifier_effect = { + FIRST = root + FIRST_TYPE = liege + SECOND = scope:rival + SECOND_TYPE = eunuch + } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + ai_chance = { + base = 50 + opinion_modifier = { + opinion_target = scope:rival + multiplier = 0.5 + } + } + } + option = { + name = ep3_story_cycle_admin_eunuch.8040.d + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = liege } + scope:eunuch = { + ep3_story_cycle_admin_eunuch_clear_modifier_effect = { TYPE = eunuch } + } + scope:story = { end_story = yes } + ai_chance = { + base = 25 + } + } +} + +################################################## +# Maintenance +# by Joe Parkin +# 9000-9999 +################################################## + +ep3_story_cycle_admin_eunuch.9980 = { # Story cycle inheritance + scope = landed_title + hidden = yes + trigger = { exists = scope:story } + immediate = { + # Should be inherited, so transfer to heir + if = { + limit = { exists = holder } + holder = { save_scope_as = new_story_owner } + scope:story = { + make_story_owner = scope:new_story_owner + story_owner = { + trigger_event = { + id = ep3_story_cycle_admin_eunuch.8000 + days = 3 + } + } + } + } + # Or end + else = { scope:story = { end_story = yes } } + debug_log_scopes = yes + } +} diff --git a/N3OW/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt b/N3OW/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt new file mode 100644 index 00000000..8cc4a3b4 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_story_cycle_grand_ambitions_events.txt @@ -0,0 +1,4234 @@ +namespace = grand_ambitions + +####################################### +### +### ONGOING STORY CYCLE EVENTS +### +### 0001-0099 Story Entry Points +### 0100-0149 Claimant Faction Route +### 0150-0199 Depose Scheme Route +### 0200-0290 Conclusion +### 0300-0390 Follow-Ups +### 0500-0599 Maintenance +### +####################################### + +####################################### +### +### ENTRY POINTS TO THE STORY +### +### 0001 Powerful Family Coup +### 0002 Claimant Faction Wins +### 0003 Prev Emperor Becomes LAAMP +### 0004 LAAMP Creation (Hidden) +### +####################################### + +scripted_effect create_grand_ambitions_story = { + # VARIABLE OPTIONS + # method = coup / scheme + create_story = { + type = grand_ambitions_story_cycle + save_scope_as = new_story + } + random_owned_story = { + type = grand_ambitions_story_cycle + save_scope_as = grand_ambitions_story + set_variable = { + name = method + value = flag:$METHOD$ + } + set_variable = { + name = target_char + value = root.top_liege + } + set_variable = { + name = target_title + value = var:target_char.primary_title + } + } + + # Create or increment global variable to track how many of these are going on at once + if = { + limit = { exists = global_var:current_grand_ambitions_counter } + change_global_variable = { + name = current_grand_ambitions_counter + add = 1 + } + } + else = { + set_global_variable = { + name = current_grand_ambitions_counter + value = 1 + } + } +} + +# You're the head of a powerful family and you have a chance to stage a coup +grand_ambitions.0001 = { + type = character_event + title = grand_ambitions.0001.t + desc = grand_ambitions.0001.desc + theme = administrative + override_background = { + reference = estate + } + + left_portrait = { + character = root + animation = thinking + } + lower_right_portrait = root.top_liege + + cooldown = { years = 20 } + + trigger = { + # Keep the number of these down to a reasonable level + trigger_if = { + limit = { + is_ai = yes + exists = global_var:current_grand_ambitions_counter + } + global_var:current_grand_ambitions_counter <= 2 + } + # is the house head of a powerful family + house ?= { + house_head ?= root + OR = { + is_powerful_family = yes + is_dominant_family = yes + } + } + influence_level >= 3 + top_liege != this + highest_held_title_tier >= tier_duchy + government_allows = administrative + top_liege ?= { + primary_title.tier = tier_empire + government_allows = administrative + NOR = { + legitimacy_level >= 4 + influence_level >= 4 + } + } + NOT = { any_owned_story = { type = grand_ambitions_story_cycle } } + NOR = { + has_trait = humble + has_trait = content + has_trait = loyal + } + years_from_game_start >= 1 + #Should be able to actually afford one of the options + OR = { + AND = { + gold >= massive_gold_value + influence >= medium_influence_value + } + prestige >= major_prestige_value + } + } + + weight_multiplier = { + base = 0 + modifier = { + add = influence_level + } + } + + immediate = { + top_liege = { + save_scope_as = target_char + primary_title = { + save_scope_as = target_title + } + } + } + + option = { # Start a claimant faction + name = grand_ambitions.0001.a + flavor = grand_ambitions.0001.a.flavor + + create_grand_ambitions_story = { METHOD = coup } + if = { + limit = { NOT = { has_claim_on = top_liege.primary_title } } + add_unpressed_claim = top_liege.primary_title + } + # Add a secret "staging a coup" + give_coup_plotter_secret_effect = { TARGET = root.top_liege } + + add_prestige = major_prestige_loss + + stress_impact = { + brave = medium_stress_impact_loss + honest = minor_stress_impact_loss + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = { + value = martial + multiply = 2 + } + } + modifier = { + prestige < major_prestige_value + factor = 0 + } + } + } + + option = { # Start a Depose scheme + name = grand_ambitions.0001.b + flavor = grand_ambitions.0001.b.flavor + + create_grand_ambitions_story = { METHOD = scheme } + # Start Depose Scheme w/ nice modifier + send_interface_toast = { + type = event_toast_effect_neutral + title = grand_ambitions.0001.b.toast + left_icon = root.top_liege + right_icon = root.top_liege.primary_title + + custom_tooltip = { + text = grand_ambitions_start_depose_scheme_tt + # start le scheme + ## Balanced configuration. + begin_scheme_with_agents_effect = { + SCHEME_TYPE = depose + TARGET_TYPE = target_character + TARGET_SCOPE = root.top_liege + # Success. + AGENT_1 = agent_diplomat + AGENT_2 = agent_tumbler + # Speed. + AGENT_3 = agent_infiltrator + AGENT_4 = agent_socialite + # Secrecy. + AGENT_5 = agent_decoy + } + # Add a bussin scheme modifier + random_scheme = { + type = depose + limit = { + scheme_target_character = root.top_liege + } + add_scheme_modifier = { + type = scheme_grand_ambitions_modifier + } + } + } + } + + remove_treasury_or_gold = massive_treasury_or_gold_value + change_influence = medium_influence_loss + + stress_impact = { + craven = minor_stress_impact_loss + ambitious = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + add = { + value = intrigue + multiply = 2 + } + } + modifier = { + OR = { + influence < medium_influence_value + short_term_Gold < massive_gold_value + } + factor = 0 + } + } + } + + option = { # I'm happy just how I am (lame) + name = grand_ambitions.0001.c + + stress_impact = { + ambitious = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + } + } +} + +# You took over an Admin Empire, decide what to do with the prev emperor +# Fired from on_war_won_attacker +grand_ambitions.0002 = { + type = character_event + title = grand_ambitions.0202.t + desc = grand_ambitions.0202.desc + theme = administrative + override_background = { + trigger = { scope:defender.capital_county = title:c_byzantion } + reference = ep3_constantinople_riot + } + + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:defender + animation = beg + override_imprisonment_visuals = yes + } + + immediate = { + # Saving these scopes for the follow-up (grand_ambitions.0003) for the old emp which references the lost title + save_scope_as = actor + save_scope_as = root_scope # for loc + primary_title = { save_scope_as = revoked } + scope:defender = { + save_scope_as = recipient + save_scope_as = old_emp + add_character_flag = { + flag = no_hat + days = 5 + } + } + + if = { + limit = { + any_owned_story = { + type = grand_ambitions_story_cycle + has_variable = method + var:method = flag:coup + } + } + } + random_owned_story = { + type = grand_ambitions_story_cycle + limit = { + has_variable = method + var:method = flag:coup + } + save_scope_as = story + } + } + + option = { # Do not banish or de-nose the loser + name = grand_ambitions.0202.a + flavor = grand_ambitions.0202.a.flavor + add_dread = minor_dread_loss + change_influence = minor_influence_gain + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + target = root + modifier = weak_opinion + opinion = -10 + } + } + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + if = { + limit = { + has_any_nickname = no + } + random = { + chance = 10 + give_nickname = nick_the_merciful + } + } + scope:defender = { + add_opinion = { + target = root + modifier = mercy_opinion + opinion = 30 + } + release_from_prison = yes + } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = patient + has_trait = forgiving + has_trait = humble + } + add = 50 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.75 + } + } + } + + option = { # Just de-nose the loser + name = grand_ambitions.0202.b + flavor = grand_ambitions.0202.b.flavor + disfigure_recipient_effect = yes + blind_castrate_and_disfigure_effect = yes #Stress & dread + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + scope:defender = { release_from_prison = yes } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = sadistic + has_trait = callous + } + add = 50 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.25 + } + } + } + + option = { # De-nose and Banish the scoundrel! + name = grand_ambitions.0202.c + flavor = grand_ambitions.0202.c.flavor + + disfigure_recipient_effect = yes + blind_castrate_and_disfigure_effect = yes #Stress & dread + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + + scope:defender = { + banish_effect = { BANISHER = root } + # Trigger Succession on the Noble Family Title of the prev emp + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + random_held_title = { + limit = { + has_title_law = noble_family_succession_law + } + change_title_holder = { + holder = scope:defender.primary_heir + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + # Make the prev emp become a LAAMP + show_as_tooltip = { + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = root + } + } + if = { + limit = { is_ai = no } + trigger_event = grand_ambitions.0003 + } + else = { + trigger_event = grand_ambitions.0004 + } + release_from_prison = yes + } + + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = vengeful + has_trait = diligent + has_trait = wrathful + has_trait = paranoid + } + add = 60 + } + ai_value_modifier = { + ai_boldness = 1.5 + ai_zeal = 0.25 + } + } + } + + option = { + name = grand_ambitions.0202.d + custom_tooltip = grand_ambitions.0202.d.tt + + ai_chance = { + base = 10 + } + } + + after = { + if = { + limit = { + scope:story ?= { + has_variable = hof_support + var:hof_support = yes + } + } + trigger_event = { # Coronation by the patriarch + id = grand_ambitions.0201 + days = 2 + } + } + if = { + limit = { + scope:story ?= { has_variable = promised_foreign_ruler_claim } + } + trigger_event = { + id = grand_ambitions.0300 + days = 5 + } + } + if = { + limit = { + scope:story ?= { + NAND = { + has_variable = hof_support + has_variable = promised_foreign_ruler_claim + } + } + } + scope:story = { end_story = yes } + } + } +} + +# (Player) Prev Emperor Becomes LAAMP +grand_ambitions.0003 = { + type = character_event + title = ep3_laamps.0020.t + desc = ep3_laamps.0020.desc + theme = administrative + left_portrait = { + character = root + animation = marshal + } + lower_left_portrait = scope:alt_1 + lower_center_portrait = scope:alt_2 + lower_right_portrait = scope:alt_3 + override_background = { reference = ep3_city_gate } + cooldown = { days = 5 } + + immediate = { + # Create Adventurer + save_scope_as = adventurer + hidden_effect = { + # Plus for our memory variable. + scope:story.var:target_title = { save_scope_as = lost_primary_title } + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = scope:actor + } + } + find_playable_relatives_effect = yes + # Portrait scopes + if = { + limit = { + NOR = { + exists = scope:alt_3 + scope:alt_1 ?= scope:actor + scope:alt_2 ?= scope:actor + } + } + scope:actor = { save_scope_as = alt_3 } + } + } + + option = { + name = ep3_laamps.0020.a + create_landless_adventurer_title_tooltip_effect = yes + add_internal_flag = special + scope:actor = { + trigger_event = { + id = ep3_laamps.0022 + days = 5 + } + } + } + + option = { + name = ep3_laamps.0001.b + trigger = { exists = scope:alt_1 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_1 } + } + option = { + name = ep3_laamps.0001.c + trigger = { exists = scope:alt_2 } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_2 } + } + option = { + name = ep3_laamps.0001.d + trigger = { + scope:alt_3 ?= { playable_relative_trigger = yes } + } + laamp_switch_playable_character_effect = { NEW_CHARACTER = scope:alt_3 } + } + option = { + name = ep3_laamps.0001.e + laamp_game_over_option_effect = yes + } +} + +# LAAMP Creation (Hidden) +grand_ambitions.0004 = { + hidden = yes + immediate = { + # Create Adventurer + save_scope_as = adventurer + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = scope:actor + } + add_internal_flag = special + } +} + + +####################################### +### +### CLAIMANT FACTION ROUTE +### +### 0100 A Bold Proposition +### 0110 Call to Arms +### 0120 Fortified Foundations +### 0130 Whispers in the Wind +### 0131 Follow-up letter event +### 0140 A Fellow Governor +### 0170 A Powerful Alliance +### 0180 A Proper Coronation +### +### Success Events +### 0200 The Fateful Night +### 0201 The Road to Power +### 0202 The Fate of the Fallen +### +### Failure Event +### 0250 End of the Road +### +### Follow-Up Event +### 0300 Reap What You Sow +### +### Invalidation Event +### 0500 Target Emperor Dies/No longer holds title +### +####################################### + +# Find an interlocutor for the following events +scripted_effect find_coup_interlocutor_effect = { + random_list = { + 1 = { + trigger = { exists = cp:councillor_chancellor } + cp:councillor_chancellor = { save_scope_as = interlocutor } + } + 1 = { + trigger = { exists = court_position:chief_eunuch_court_position } + court_position:chief_eunuch_court_position = { save_scope_as = interlocutor } + } + 1 = { + trigger = { exists = cp:councillor_steward } + cp:councillor_steward = { save_scope_as = interlocutor } + } + } + if = { + limit = { NOT = { exists = scope:interlocutor } } + ordered_courtier = { + order_by = intrigue + save_scope_as = interlocutor + } + } + if = { + limit = { NOT = { exists = scope:interlocutor } } + ordered_pool_character = { + province = root.location + order_by = intrigue + save_scope_as = interlocutor + } + } +} + +# Find a scheme interlocutor for the following events +scripted_effect find_scheme_interlocutor_effect = { + if = { + limit = { exists = cp:councillor_spymaster } + cp:councillor_spymaster = { save_scope_as = interlocutor } + } + else_if = { + limit = { exists = court_position:chief_eunuch_court_position } + court_position:chief_eunuch_court_position = { save_scope_as = interlocutor } + } + if = { + limit = { NOT = { exists = scope:interlocutor } } + ordered_courtier = { + order_by = intrigue + save_scope_as = interlocutor + } + } + if = { + limit = { NOT = { exists = scope:interlocutor } } + ordered_pool_character = { + province = root.location + order_by = intrigue + save_scope_as = interlocutor + } + } +} + +scripted_effect set_powerful_family_story_variables_effect = { + scope:story = { + set_variable = { + name = powerful_family + value = $POWERFUL_HOUSE_SCOPE$ + } + set_variable = { + name = powerful_family_method + value = flag:$METHOD_FLAG$ + } + } +} + +scripted_effect send_bethrothal_notifications_and_apply_opinions_effect = { + hidden_effect = { + $SPOUSE_1$ = { save_scope_as = secondary_actor } + $SPOUSE_2$ = { save_scope_as = secondary_recipient } + $HOST$ = { save_scope_as = actor } + $PROMISEE$ = { save_scope_as = recipient } + + scope:actor = { + if = { + limit = { this != scope:recipient } + trigger_event = marriage_interaction.0010 + } + else_if = { #In my own court + limit = { #Betrothal? + OR = { + scope:secondary_actor = { is_adult = no } + scope:secondary_recipient = { is_adult = no } + scope:secondary_actor = { has_been_promised_grand_wedding = yes } + scope:secondary_recipient = { has_been_promised_grand_wedding = yes } + } + } + send_interface_toast = { + type = event_toast_effect_good + title = arrange_marriage_interaction_accept_betrothal_toast + left_icon = scope:secondary_actor + right_icon = scope:secondary_recipient + custom_tooltip = arrange_marriage_interaction_accept_betrothal_toast_desc + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = arrange_marriage_interaction_accept_toast + left_icon = scope:secondary_actor + right_icon = scope:secondary_recipient + custom_tooltip = arrange_marriage_interaction_accept_toast_desc + } + } + } + + # Apply any relevant opinion penalties for relatives of spouse. + scope:secondary_actor = { + if = { # Polygamy + limit = { + any_consort = { + count >= 2 + } + } + every_consort = { + # If the spouse themselves does not believe in polygamy... + limit = { + NOR = { + culture = { has_cultural_tradition = tradition_polygamous } + faith = { has_doctrine = doctrine_polygamy } + faith = { has_doctrine = doctrine_concubines } + } + } + + #... then family members who also do not believe in polygamy aren't happy about having a relative forced into polygamous union with you. + every_close_family_member = { + if = { + limit = { + NOR = { + culture = { has_cultural_tradition = tradition_polygamous } + faith = { has_doctrine = doctrine_polygamy } + faith = { has_doctrine = doctrine_concubines } + } + } + add_opinion = { + target = scope:secondary_actor + modifier = relative_in_blasphemous_union_opinion + } + } + } + + # NOTE: Spouse's own opinions handled in the 'on_marriage' code on_action inside of marriage_concubinage.txt, and are not included here. + } + } + } + scope:secondary_recipient = { + if = { #Same-sex relations + limit = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:secondary_actor + } + every_close_family_member = { + if = { + limit = { + allowed_to_marry_same_sex_trigger = no + } + add_opinion = { + target = scope:secondary_actor + modifier = relative_in_blasphemous_union_opinion + } + } + } + } + } + # Courtly vassals like grand weddings + scope:secondary_actor = { + if = { + limit = { + any_vassal = { + vassal_stance = courtly + } + } + if = { + limit = { + has_been_promised_grand_wedding = yes + } + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:secondary_actor + modifier = prestigious_wedding_opinion + } + } + } + } + } + scope:secondary_recipient = { + if = { + limit = { + any_vassal = { + vassal_stance = courtly + } + } + if = { + limit = { + has_been_promised_grand_wedding = yes + } + every_vassal = { + vassal_stance = courtly + add_opinion = { + target = scope:secondary_recipient + modifier = prestigious_wedding_opinion + } + } + } + } + } + } +} + +scripted_effect swear_to_join_claimant_faction_effect = { + save_scope_as = recruit + custom_tooltip = { + text = grand_ambitions.0100.powerful_family_joins_faction + if = { + limit = { + scope:target_char = { + any_targeting_faction = { + faction_leader = root + faction_type = claimant_faction + any_faction_member = { + this != scope:recruit + } + } + } + } + scope:target_char = { + random_targeting_faction = { + faction_type = claimant_faction + limit = { + faction_leader = root + any_faction_member = { + this != scope:recruit + } + } + save_scope_as = joined_faction + } + } + show_as_tooltip = { join_faction = scope:joined_faction } + hidden_effect = { + join_faction_forced = { + faction = scope:joined_faction + forced_by = root + years = 25 + } + } + } + scope:story = { + add_to_variable_list = { + name = promised_to_join_faction + target = scope:powerful_family_head + } + } + } +} + +scripted_trigger foreign_ruler_has_any_interest_in_coup_trigger = { + save_temporary_scope_as = foreign_ruler_temp + is_at_war = no + # They must _at least_ not like the current emperor + opinion = { + target = scope:target_char + value <= 0 + } + NOR = { + has_relation_friend = scope:target_char + has_relation_best_friend = scope:target_char + has_relation_lover = scope:target_char + has_relation_soulmate = scope:target_char + } + OR = { + # They have a claim on something within the empire that you could help them with + any_claim = { + tier = tier_duchy + any_de_jure_top_liege = { + this = scope:target_char + } + } + # there is a bordering county + any_realm_border_county = { + any_neighboring_county = { + holder.top_liege = scope:target_char + } + } + # You have a coastal county to give away + scope:target_char = { + any_realm_county = { + has_coastal_province = yes + } + } + } +} + +# A Bold Proposition +# Gain a foreign ally; limited to foreign ai characters +grand_ambitions.0100 = { + type = character_event + title = grand_ambitions.0100.t + desc = { + desc = grand_ambitions.0100.intro + desc = grand_ambitions.0100.claim + desc = grand_ambitions.0100.conclusion + } + theme = administrative + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:interlocutor + animation = chancellor + } + lower_center_portrait = scope:foreign_ruler + + trigger = { + NOT = { has_character_flag = had_event_ga_0100 } + any_neighboring_and_across_water_top_liege_realm_owner = { + is_ai = yes + foreign_ruler_has_any_interest_in_coup_trigger = yes + save_temporary_scope_as = temp_foreign_caller + trigger_if = { + limit = { scope:story = { has_variable_list = foreign_callers } } + NOT = { + scope:story = { + any_in_list = { + variable = foreign_callers + this = scope:temp_foreign_caller + } + } + } + } + } + } + + immediate = { + find_coup_interlocutor_effect = yes + # Find the ruler we wanna nab + ordered_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + is_ai = yes + foreign_ruler_has_any_interest_in_coup_trigger = yes + save_temporary_scope_as = temp_foreign_caller + trigger_if = { + limit = { scope:story = { has_variable_list = foreign_callers } } + NOT = { + scope:story = { + any_in_list = { + variable = foreign_callers + this = scope:temp_foreign_caller + } + } + } + } + } + order_by = ep3_foreign_ruler_interest_in_coup_value + save_scope_as = foreign_ruler + } + # Determine the demand + scope:foreign_ruler = { + save_scope_as = comparator + if = { # Look for a claim first + limit = { + any_claim = { + tier = tier_duchy + any_de_jure_top_liege = { + this = scope:target_char + } + } + } + # Pick the closest claim to the foreign ruler's capital + ordered_claim = { + limit = { + tier = tier_duchy + any_de_jure_top_liege = { + this = scope:target_char + } + } + order_by = ep3_distance_to_comparator_claim + save_scope_as = foreign_claim + } + } + else_if = { # Then pick a neighboring duchy + limit = { + any_realm_border_county = { + any_neighboring_county = { + holder.top_liege = scope:target_char + } + } + } + random_realm_border_county = { + random_neighboring_county = { + limit = { holder.top_liege = scope:target_char } + duchy = { save_scope_as = foreign_claim } + } + } + } + else = { # If all else fails, just pick a coastal duchy + scope:target_char = { + random_realm_county = { + limit = { + has_coastal_province = yes + } + duchy = { save_scope_as = foreign_claim } + } + } + } + scope:story = { + set_variable = { + name = foreign_ruler_demand + value = scope:foreign_claim + } + } + } + + # Find a counter-offer target + scope:target_char = { + if = { + limit = { + any_realm_border_county = { + any_neighboring_county = { + holder.top_liege = scope:foreign_ruler + } + } + } + ordered_realm_border_county = { + limit = { + any_neighboring_county = { + holder.top_liege = scope:foreign_ruler + } + } + order_by = ep3_distance_to_comparator_capital_county + save_scope_as = compromise_county + } + } + else = { # Take the closest coastal province + ordered_realm_county = { + limit = { + has_coastal_province = yes + } + order_by = ep3_distance_to_comparator_capital_county + save_scope_as = compromise_county + } + } + } + + # Log that we talked to this foreign ruler so they don't ask again + scope:story = { + add_to_variable_list = { + name = foreign_callers + target = scope:foreign_ruler + } + } + } + + option = { # Agree to their offer + name = grand_ambitions.0100.a + custom_tooltip = grand_ambitions.0100.a.claim + if = { + limit = { + any_claim = { + this = scope:foreign_claim + } + } + remove_claim = scope:foreign_claim + } + custom_tooltip = grand_ambitions.0100.a.faction_tooltip + + scope:story = { + set_variable = { + name = promised_foreign_ruler_claim + value = scope:foreign_ruler + } + } + + add_character_flag = had_event_ga_0100 + + stress_impact = { + base = minor_stress_impact_gain + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = -0.25 + } + modifier = { + OR = { + has_trait = ambitious + has_trait = craven + } + add = 40 + } + } + } + + option = { # Propose a counter-offer + name = grand_ambitions.0100.b + duel = { + skill = diplomacy + target = scope:foreign_ruler + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = grand_ambitions.0100.b.success + send_interface_toast = { + type = event_generic_good_text + title = grand_ambitions.0100.b.success + left_icon = scope:foreign_ruler + custom_tooltip = grand_ambitions.0100.b.success.tt + if = { + limit = { + any_claim = { + this = scope:foreign_claim + } + } + remove_claim = scope:foreign_claim + } + custom_tooltip = grand_ambitions.0100.a.faction_tooltip + } + scope:story = { + set_variable = { + name = promised_foreign_ruler_claim + value = scope:foreign_ruler + } + } + add_character_flag = had_event_ga_0100 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = grand_ambitions.0100.b.failure + send_interface_toast = { + type = event_generic_bad_text + title = grand_ambitions.0100.b.failure + left_icon = scope:foreign_ruler + + add_prestige = medium_prestige_gain + } + } + } + + stress_impact = { + humble = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.75 + } + modifier = { + OR = { + has_trait = diligent + has_trait = ambitious + } + add = 50 + } + } + } + + option = { # Deny their offer + name = grand_ambitions.0100.c + + stress_impact = { + arrogant = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_greed = 1 + } + modifier = { + OR = { + has_trait = stubborn + has_trait = arrogant + has_trait = greedy + has_trait = content + } + add = 50 + } + } + } +} + +# A Call to Arms +# Event to increase your MAA +grand_ambitions.0110 = { + type = character_event + title = grand_ambitions.0110.t + desc = grand_ambitions.0110.desc + theme = administrative + + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:interlocutor + animation = personality_honorable + } + + cooldown = { years = 10 } + + immediate = { + find_coup_interlocutor_effect = yes + ep3_pick_random_maa_regiment_effect = { + OWNER = root + INCLUDE_BASIC_MAA = no + INCLUDE_SIEGE_MAA = no + } + } + + option = { # Spawn a free MAA + name = grand_ambitions.0110.a + ep3_create_random_maa_regiment_effect = { + OWNER = root + SIZE = 4 + } + + ai_chance = { + base = 50 + modifier = { + number_of_maa_regiments <= 3 + factor = 3 + } + } + } + + option = { # Get a modifier to reduce MAA cost + name = grand_ambitions.0110.b + add_character_modifier = { + modifier = ep3_grand_ambitions_cheaper_maa_modifier + years = 5 + } + + ai_chance = { + base = 40 + } + } + + option = { # No thanks + name = grand_ambitions.0110.c + change_influence = minor_influence_gain + + ai_chance = { + base = 20 + modifier = { + influence <= minor_influence_value + factor = 3 + } + } + } +} + +# Fortified Foundations +# Event to increase your estate buildings +grand_ambitions.0120 = { + type = character_event + title = grand_ambitions.0120.t + desc = grand_ambitions.0120.desc + theme = administrative + override_background = { reference = estate } + + left_portrait = { + character = root + animation = survey + } + right_portrait = { + character = scope:interlocutor + animation = debating + } + + cooldown = { years = 10 } + + trigger = { + has_domicile = yes + domicile = { + is_domicile_type = estate + num_domicile_buildings < 6 + } + OR = { + number_maa_regiments_of_base_type:skirmishers > 0 + number_maa_regiments_of_base_type:heavy_infantry > 0 + number_maa_regiments_of_base_type:pikemen > 0 + number_maa_regiments_of_base_type:light_cavalry > 0 + number_maa_regiments_of_base_type:heavy_cavalry > 0 + number_maa_regiments_of_base_type:archers > 0 + } + } + + immediate = { + find_coup_interlocutor_effect = yes + domicile = { save_scope_as = estate } + # Pick the best building for the MaA type they have the most of + random_list = { + 0 = { # Barracks for Skirmishers, Heavy Infantry, and Spearmen + trigger = { + NOT = { + domicile = { has_domicile_building = barracks_06 } + } + } + modifier = { + add = number_maa_regiments_of_base_type:skirmishers + add = number_maa_regiments_of_base_type:heavy_infantry + add = number_maa_regiments_of_base_type:pikemen + } + save_scope_value_as = { + name = estate_building + value = flag:barracks + } + random_maa_regiment = { + limit = { + OR = { + is_unit_type = skirmishers + is_unit_type = heavy_infantry + is_unit_type = pikemen + } + } + save_scope_as = maa_flavor + } + } + 0 = { # Pasteurs for Cavalry + trigger = { + NOT = { + domicile = { has_domicile_building = grazing_land_06 } + } + } + modifier = { + add = number_maa_regiments_of_base_type:light_cavalry + add = number_maa_regiments_of_base_type:heavy_cavalry + } + save_scope_value_as = { + name = estate_building + value = flag:grazing_land + } + random_maa_regiment = { + limit = { + OR = { + is_unit_type = light_cavalry + is_unit_type = heavy_cavalry + } + } + save_scope_as = maa_flavor + } + } + 0 = { # Watchtower for Archers + trigger = { + NOT = { + domicile = { has_domicile_building = watchtower_06 } + } + } + modifier = { + add = number_maa_regiments_of_base_type:archers + } + save_scope_value_as = { + name = estate_building + value = flag:watchtower + } + random_maa_regiment = { + limit = { is_unit_type = archers } + save_scope_as = maa_flavor + } + } + } + } + + option = { # Construct Barracks + name = grand_ambitions.0120.a + trigger = { + scope:estate_building ?= flag:barracks + number_maa_regiments_of_base_type:pikemen >=1 + } + # Build or upgrade barracks building + domicile = { + if = { + limit = { has_domicile_building_or_higher = barracks_01 } + switch = { + trigger = has_domicile_building + barracks_01 = { add_domicile_building = barracks_02 } + barracks_02 = { add_domicile_building = barracks_03 } + barracks_03 = { add_domicile_building = barracks_04 } + barracks_04 = { add_domicile_building = barracks_05 } + barracks_05 = { add_domicile_building = barracks_06 } + } + } + else = { + add_domicile_building = barracks_01 + } + } + } + + option = { # Construct Pasteur + name = grand_ambitions.0120.b + trigger = { scope:estate_building ?= flag:grazing_land } + # Build or upgrade pasteurs building + domicile = { + if = { + limit = { has_domicile_building_or_higher = grazing_land_01 } + switch = { + trigger = has_domicile_building + grazing_land_01 = { add_domicile_building = grazing_land_02 } + grazing_land_02 = { add_domicile_building = grazing_land_03 } + grazing_land_03 = { add_domicile_building = grazing_land_04 } + grazing_land_04 = { add_domicile_building = grazing_land_05 } + grazing_land_05 = { add_domicile_building = grazing_land_06 } + } + } + else = { + add_domicile_building = grazing_land_01 + } + } + } + + option = { # Construct Watchtower + name = grand_ambitions.0120.c + trigger = { scope:estate_building ?= flag:watchtower } + # Build or upgrade watchtower building + domicile = { + if = { + limit = { has_domicile_building_or_higher = watchtower_01 } + switch = { + trigger = has_domicile_building + watchtower_01 = { add_domicile_building = watchtower_02 } + watchtower_02 = { add_domicile_building = watchtower_03 } + watchtower_03 = { add_domicile_building = watchtower_04 } + watchtower_04 = { add_domicile_building = watchtower_05 } + watchtower_05 = { add_domicile_building = watchtower_06 } + } + } + else = { + add_domicile_building = watchtower_01 + } + } + } + + option = { # Fallback Estate Upgrade + name = grand_ambitions.0120.d + remove_short_term_gold = medium_gold_value + add_character_modifier = { + modifier = ep3_grand_ambitions_local_labor_modifier + years = 10 + } + } +} + +# Whispers in the Wind +# Event to decrease popular opinion of the emperor +grand_ambitions.0130 = { + type = character_event + title = grand_ambitions.0130.t + desc = { + desc = grand_ambitions.0130.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 6 } + desc = grand_ambitions.0130.desc.legitimacy.6 + } + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 5 } + desc = grand_ambitions.0130.desc.legitimacy.5 + } + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 4 } + desc = grand_ambitions.0130.desc.legitimacy.4 + } + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 3 } + desc = grand_ambitions.0130.desc.legitimacy.3 + } + triggered_desc = { + trigger = { scope:story.var:target_char.legitimacy_level >= 2 } + desc = grand_ambitions.0130.desc.legitimacy.2 + } + desc = grand_ambitions.0130.desc.legitimacy.1 + } + desc = grand_ambitions.0130.desc.outro + } + theme = administrative + override_background = { reference = ep3_medi_study } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:interlocutor + animation = scheme + } + lower_center_portrait = scope:story.var:target_char + + cooldown = { years = 10 } + + immediate = { + find_coup_interlocutor_effect = yes + if = { + limit = { + any_secret = { + type = secret_coup_plotter + secret_target = scope:story.var:target_char + } + } + random_secret = { + type = secret_coup_plotter + limit = { + secret_target = scope:story.var:target_char + } + save_scope_as = secret + } + } + } + + option = { # Spend Influence + name = grand_ambitions.0130.a + show_as_unavailable = { influence <= medium_influence_value } + change_influence = medium_influence_loss + scope:story.var:target_char = { + capital_county = { + add_county_modifier = { + modifier = ep3_grand_ambitions_rioting_county_modifier + years = 10 + } + } + } + random = { + chance = 15 + # Expose your secret + scope:secret ?= { reveal_to = scope:story.var:target_char } + # Show that this gives your liege an imprisonment reason + show_as_tooltip = { + reverse_add_opinion = { + target = scope:target_char + modifier = coup_plotter_opinion + } + } + } + add_character_flag = { + flag = successful_riot + days = 1 + } + + ai_chance = { + base = 30 + modifier = { + influence <= medium_influence_value + factor = 0 + } + } + } + + option = { # Spend Gold + name = grand_ambitions.0130.c + show_as_unavailable = { short_term_gold <= major_gold_value } + remove_short_term_gold = major_gold_value + scope:story.var:target_char = { + capital_county = { + add_county_modifier = { + modifier = ep3_grand_ambitions_rioting_county_modifier + years = 10 + } + } + } + random = { + chance = 30 + # Expose your secret + scope:secret ?= { reveal_to = scope:story.var:target_char } + # Show that this gives your liege an imprisonment reason + show_as_tooltip = { + reverse_add_opinion = { + target = scope:target_char + modifier = coup_plotter_opinion + } + } + } + add_character_flag = { + flag = successful_riot + days = 1 + } + + ai_chance = { + base = 30 + modifier = { + short_term_gold <= major_gold_value + factor = 0 + } + } + } + + option = { # Intrigue Challenge + name = grand_ambitions.0130.b + change_influence = minor_influence_loss + duel = { + skill = intrigue + value = high_skill_rating + 30 = { # Succeed + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -29 + } + desc = grand_ambitions.0130.b.success + send_interface_toast = { + type = event_toast_effect_good + title = grand_ambitions.0130.b.success + left_icon = scope:story.var:target_char + right_icon = scope:story.var:target_title + scope:story.var:target_char = { + capital_county = { + add_county_modifier = { + modifier = ep3_grand_ambitions_rioting_county_modifier + years = 10 + } + } + } + } + add_character_flag = { + flag = successful_riot + days = 1 + } + } + 50 = { # Fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = grand_ambitions.0130.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = grand_ambitions.0130.b.failure + left_icon = scope:story.var:target_char + right_icon = scope:story.var:target_title + } + } + 20 = { # Crit Fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -19 + } + desc = grand_ambitions.0130.b.crit_failure + send_interface_toast = { + type = event_toast_effect_bad + title = grand_ambitions.0130.b.crit_failure + left_icon = scope:story.var:target_char + right_icon = scope:story.var:target_title + # Expose your secret + scope:secret ?= { reveal_to = scope:story.var:target_char } + # Show that this gives your liege an imprisonment reason + show_as_tooltip = { + reverse_add_opinion = { + target = scope:target_char + modifier = coup_plotter_opinion + } + } + } + } + } + + ai_chance = { + base = 30 + modifier = { + add = { + value = intrigue + multiply = 2 + } + } + modifier = { + influence <= minor_influence_value + factor = 0 + } + } + } + + option = { # Opt-out + name = grand_ambitions.0130.d + + ai_chance = { + base = 10 + } + } + + after = { + save_scope_as = schemer + scope:story.var:target_char = { + if = { + limit = { + is_ai = no + root = { has_character_flag = successful_riot } + } + trigger_event = grand_ambitions.0131 + } + } + } +} + +# Whispers in the Wind Follow-Up +# Mirror Event for the emperor if they are a player +grand_ambitions.0131 = { + type = letter_event + opening = grand_ambitions.0131.opening + desc = { + desc = grand_ambitions.0131.desc + triggered_desc = { + trigger = { + any_known_secret = { + scope:secret ?= this + } + } + desc = grand_ambitions.0131.desc_secret + } + desc = grand_ambitions.0131.conclusion + } + sender = scope:interlocutor + + immediate = { + find_scheme_interlocutor_effect = yes + if = { # secret revealed in previous event, but shown here for consistency + limit = { + any_known_secret = { + scope:secret ?= this + } + } + show_as_tooltip = { + scope:secret ?= { reveal_to = root } + } + } + } + + option = { # Intrigue Option: Kill the rumors + name = grand_ambitions.0131.a + trigger = { + OR = { + intrigue >= high_skill_rating + has_trait = schemer + } + } + + capital_county = { + remove_county_modifier = ep3_grand_ambitions_rioting_county_modifier + } + + ai_chance = { + base = 100 + } + } + + option = { # Spend Influence to get people on your side + name = grand_ambitions.0131.b + trigger = { + NOR = { + intrigue >= high_skill_rating + has_trait = schemer + } + } + + change_influence = medium_influence_loss + capital_county = { + remove_county_modifier = ep3_grand_ambitions_rioting_county_modifier + add_county_modifier = { + modifier = ep3_grand_ambitions_hushed_rumors + years = 10 + } + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + influence < medium_influence_value + } + } + } + + option = { # Opt Out + name = grand_ambitions.0131.c + trigger = { + NOR = { + intrigue >= high_skill_rating + has_trait = schemer + } + } + + add_prestige = minor_prestige_loss + + stress_impact = { + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + prestige <= minor_prestige_value + } + } + } +} + +# A Fellow Governor +# Get a hook on a powerful fellow governor +grand_ambitions.0140 = { + type = character_event + title = grand_ambitions.0140.t + desc = { + desc = grand_ambitions.0140.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:story_faction } + desc = grand_ambitions.0140.faction + } + desc = grand_ambitions.0140.no_faction + } + } + theme = administrative + + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:target_gov + animation = spymaster + } + + cooldown = { years = 3 } + + trigger = { + scope:target_char = { # Is there another vassal we can get a hook on + any_powerful_vassal = { + save_temporary_scope_as = temp_vassal + NOR = { + has_vassal_stance = courtly + root = { has_hook = prev } + scope:story = { + trigger_if = { + limit = { has_variable_list = promised_to_join_faction} + is_target_in_variable_list = { + name = promised_to_join_faction + target = scope:temp_vassal + } + } + trigger_if = { + limit = { has_variable_list = governor_callers } + is_target_in_variable_list = { + name = governor_callers + target = scope:temp_vassal + } + } + } + scope:story_faction ?= { + any_faction_member = { + this = scope:temp_vassal + } + faction_is_at_war = no + } + } + root = { + can_add_hook = { + target = prev + type = strong_influence_hook + } + } + } + } + } + + immediate = { + find_coup_interlocutor_effect = yes + scope:target_char = { + ordered_powerful_vassal = { + limit = { + save_temporary_scope_as = temp_vassal + NOR = { + has_vassal_stance = courtly + root = { has_hook = prev } + scope:story = { + trigger_if = { + limit = { has_variable_list = promised_to_join_faction} + is_target_in_variable_list = { + name = promised_to_join_faction + target = scope:temp_vassal + } + } + trigger_if = { + limit = { has_variable_list = governor_callers } + is_target_in_variable_list = { + name = governor_callers + target = scope:temp_vassal + } + } + } + scope:story_faction ?= { + any_faction_member = { + this = scope:temp_vassal + } + faction_is_at_war = no + } + } + root = { + can_add_hook = { + target = prev + type = strong_influence_hook + } + } + } + order_by = "opinion(root)" + save_scope_as = target_gov + } + } + } + + option = { # Accept + name = grand_ambitions.0140.a + if = { + limit = { + exists = scope:story_faction + } + scope:target_gov = { + show_as_tooltip = { join_faction = scope:story_faction } + hidden_effect = { + join_faction_forced = { + faction = scope:story_faction + forced_by = root + years = 25 + } + } + } + } + else = { + add_hook = { + target = scope:target_gov + type = strong_influence_hook + } + } + scope:story = { + add_to_variable_list = { + name = promised_to_join_faction + target = scope:target_gov + } + } + + ai_chance = { + base = 90 + } + } + + option = { # Reject + name = grand_ambitions.0140.b + scope:story = { + add_to_variable_list = { + name = governor_callers + target = scope:target_gov + } + } + + ai_chance = { + base = 10 + } + } +} + + +####################################### +### +### SCHEME ROUTE +### +### 0150 An Additional Agent +### 0151 A Master of Whispers +### 0155 Calling in Favors +### 0160 Threads of Subterfuge +### 0170 A Powerful Alliance +### 0180 A Proper Coronation +### 0190 Keep Your Friends Close... +### 0191 A Fateful Offer +### +### Success Events +### 0200 The Fateful Night +### 0201 The Road to Power +### 0202 The Fate of the Fallen +### +### Failure Event +### 0250 End of the Road +### +### Invalidation Event +### 0500 Target Emperor Dies/No longer holds title +### +####################################### + +# Chances to gain scheme agents +grand_ambitions.0150 = { + type = character_event + title = grand_ambitions.0150.t + desc = grand_ambitions.0150.desc + theme = administrative + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + + trigger = { + scope:story = { + NOT = { has_variable = had_event_ga_0150 } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + } + + option = { # Add an infiltrator (speed agent) + name = grand_ambitions.0150.a + scope:depose_scheme_scope = { + add_agent_slot = agent_infiltrator + } + } + + option = { # Add a decoy (secrecy agent) + name = grand_ambitions.0150.b + scope:depose_scheme_scope = { + add_agent_slot = agent_decoy + } + } + + option = { # Add a socialite (success chance agent) + name = grand_ambitions.0150.c + scope:depose_scheme_scope = { + add_agent_slot = agent_socialite + } + } + + after = { + scope:story = { + set_variable = { + name = had_event_ga_0150 + value = yes + } + } + } +} + +scripted_trigger can_steal_eunuch_trigger = { + scope:target_char = { is_ai = yes } + can_employ_court_position_type = chief_eunuch_court_position + NOR = { + scope:eunuch = { has_trait = loyal } + employs_court_position = chief_eunuch_court_position + } + intrigue >= high_skill_rating +} + +# Special eunuch agent slot +grand_ambitions.0151 = { + type = character_event + title = grand_ambitions.0151.t + desc = grand_ambitions.0151.desc + theme = administrative + override_background = { reference = relaxing_room } + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + lower_center_portrait = scope:eunuch + + trigger = { + any_scheme = { + type = depose + NOT = { + any_scheme_agent_slot = { + is_agent_slot_type = agent_eunuch + } + } + } + scope:target_char = { + any_court_position_holder = { + type = chief_eunuch_court_position + } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + scope:target_char = { + random_court_position_holder = { + type = chief_eunuch_court_position + save_scope_as = eunuch + } + } + hidden_effect = { + scope:depose_scheme_scope = { + add_agent_slot = agent_eunuch + } + scope:depose_scheme_scope = { + random_scheme_agent_slot = { + limit = { + is_filled = no + is_agent_slot_type = agent_eunuch + } + save_scope_as = eunuch_slot + } + } + } + } + + option = { # Yes add the eunuch to the scheme + name = grand_ambitions.0151.a + change_influence = major_influence_loss + + show_as_tooltip = { + scope:depose_scheme_scope = { + add_agent_slot = agent_eunuch + } + } + scope:eunuch = { + force_add_to_agent_slot = { + agent_slot = scope:eunuch_slot + years = 3 + } + } + scope:story = { + set_variable = { + name = eunuch + value = yes + } + } + + ai_chance = { + base = 100 + modifier = { + influence <= major_influence_value + factor = 0 + } + } + } + + option = { # I'd rather have him for myself + name = grand_ambitions.0151.b + trigger = { + can_steal_eunuch_trigger = yes + } + change_influence = massive_influence_loss + remove_short_term_gold = major_gold_value + # Steal the eunuch + court_position_grant_effect = { + CANDIDATE = scope:eunuch + POS = chief_eunuch + EMPLOYER = root + } + show_as_tooltip = { + scope:depose_scheme_scope = { + add_agent_slot = agent_eunuch + } + } + scope:eunuch = { + force_add_to_agent_slot = { + agent_slot = scope:eunuch_slot + years = 3 + } + } + scope:story = { + set_variable = { + name = eunuch + value = yes + } + } + + ai_chance = { + base = 80 + modifier = { + influence <= massive_influence_value + factor = 0 + } + } + } + + option = { # No thanks + name = grand_ambitions.0151.c + hidden_effect = { + scope:depose_scheme_scope = { + remove_agent_slot = scope:eunuch_slot + } + } + + ai_chance = { + base = 10 + } + } +} + +# Spymaster offers you 3 choices for an unfilled scheme agent slot +grand_ambitions.0155 = { + type = character_event + title = grand_ambitions.0155.t + desc = grand_ambitions.0155.desc + theme = administrative + + left_portrait = { + character = root + animation = spymaster + } + right_portrait = { + character = scope:interlocutor + animation = scheme + } + lower_left_portrait = scope:agent_choice_2 + lower_center_portrait = scope:agent_choice_1 + lower_right_portrait = scope:agent_choice_3 + + trigger = { + # Scheme must have unfilled agent slots + any_scheme = { + type = depose + any_scheme_agent_slot = { + is_filled = no + save_temporary_scope_as = temp_agent_slot + } + # The eunuch agent slot gets a bespoke event + scope:temp_agent_slot = { + NOT = { is_agent_slot_type = agent_eunuch } + } + } + # target_char must have at least one valid courtier to fill the position + any_courtier_or_guest = { + NOT = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + } + is_valid_as_agent_in_slot = scope:temp_agent_slot + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + + # Pick an empty agent slot + scope:depose_scheme_scope = { + random_scheme_agent_slot = { + limit = { + is_filled = no + } + save_scope_as = agent_slot + } + } + + # Find 3 characters with which to fill the agent slot + scope:target_char = { + random_courtier_or_guest = { + limit = { + NOT = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + } + is_valid_as_agent_in_slot = scope:agent_slot + } + save_scope_as = agent_choice_1 + } + if = { + limit = { + any_courtier_or_guest = { + NOR = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + this = scope:agent_choice_1 + } + is_valid_as_agent_in_slot = scope:agent_slot + } + } + random_courtier_or_guest = { + limit = { + NOR = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + this = scope:agent_choice_1 + } + is_valid_as_agent_in_slot = scope:agent_slot + } + save_scope_as = agent_choice_2 + } + } + if = { + limit = { + any_courtier_or_guest = { + NOR = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + this = scope:agent_choice_1 + this ?= scope:agent_choice_2 + } + is_valid_as_agent_in_slot = scope:agent_slot + } + } + random_courtier_or_guest = { + limit = { + NOR = { + scope:depose_scheme_scope = { + scheme_is_character_agent = prev + } + this = scope:agent_choice_1 + this ?= scope:agent_choice_2 + } + is_valid_as_agent_in_slot = scope:agent_slot + } + save_scope_as = agent_choice_3 + } + } + } + } + + option = { # Agent Choice 1 + name = grand_ambitions.0155.a + scope:agent_choice_1 = { + force_add_to_agent_slot = { + agent_slot = scope:agent_slot + years = 3 + } + } + } + + option = { # Agent Choice 2 + name = grand_ambitions.0155.b + trigger = { exists = scope:agent_choice_2 } + scope:agent_choice_2 = { + force_add_to_agent_slot = { + agent_slot = scope:agent_slot + years = 3 + } + } + } + + option = { # Agent Choice 3 + name = grand_ambitions.0155.c + trigger = { exists = scope:agent_choice_3 } + scope:agent_choice_3 = { + force_add_to_agent_slot = { + agent_slot = scope:agent_slot + years = 3 + } + } + } + + option = { # None of these + name = grand_ambitions.0155.d + } +} + +# Chance to gain scheme modifiers +grand_ambitions.0160 = { + type = character_event + title = grand_ambitions.0160.t + desc = grand_ambitions.0160.desc + theme = administrative + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + lower_center_portrait = scope:target_char + + trigger = { + scope:story = { + NOT = { has_variable = had_event_ga_0160 } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + } + + option = { # Bribe the palace functionaries + name = grand_ambitions.0160.a + change_influence = minor_influence_loss + random_scheme = { + type = depose + add_scheme_modifier = { + type = scheme_grand_ambitions_bribed_functionaries_modifier + } + } + } + + option = { # Bribe some merchants + name = grand_ambitions.0160.b + remove_short_term_gold = major_gold_value + random_scheme = { + type = depose + add_scheme_modifier = { + type = scheme_grand_ambitions_bribed_merchants_modifier + } + } + } + + option = { # Bribe the scribes + name = grand_ambitions.0160.c + remove_short_term_gold = medium_gold_value + random_scheme = { + type = depose + add_scheme_modifier = { + type = scheme_grand_ambitions_bribed_scribes_modifier + } + } + } + + after = { + scope:story = { + set_variable = { + name = had_event_ga_0160 + value = yes + } + } + } +} + +# Another Powerful Family could support you +grand_ambitions.0170 = { + type = character_event + title = grand_ambitions.0170.t + desc = grand_ambitions.0170.desc + theme = administrative + override_background = { reference = relaxing_room } + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + lower_center_portrait = scope:powerful_family_head + lower_right_portrait = scope:marriage_proposal + + cooldown = { months = 12 } + + trigger = { + scope:story = { + NOT = { has_variable = powerful_family } + } + scope:target_char = { + any_vassal = { + primary_title.tier >= tier_duchy + this = house.house_head + this != root + house = { is_powerful_family = yes } + } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + scope:target_char = { + random_vassal = { + limit = { + primary_title.tier >= tier_duchy + this = house.house_head + this != root + is_imprisoned = no + opinion = { # they can dislike you if it's a beneficial deal + target = root + value >= -30 + } + } + weight = { # Prefer picking a vassal that has a child ready for marriage and has high military strength + base = 1 + modifier = { + add = 100 + any_child = { + can_marry_character_trigger = { + CHARACTER = root + } + } + } + modifier = { + add = this.current_military_strength + } + } + save_scope_as = powerful_family_head + house = { save_scope_as = powerful_house } + } + } + + save_scope_as = comparator # used in age_different script value below + if = { + limit = { + scope:powerful_family_head = { + any_child = { + can_marry_character_trigger = { + CHARACTER = root + } + } + } + } + scope:powerful_family_head = { + ordered_child = { + order_by = age_difference + limit = { + can_marry_character_trigger = { + CHARACTER = root + } + } + save_scope_as = marriage_proposal + } + } + } + } + + option = { # Gold, Influence, and Prestige + name = grand_ambitions.0170.a + change_influence = major_influence_loss + pay_short_term_gold = { + target = scope:powerful_family_head + gold = major_gold_value + } + add_prestige = massive_prestige_loss + + if = { # Scheme Track + limit = { + scope:story.var:method ?= flag:scheme + exists = scope:depose_scheme_scope + } + scope:depose_scheme_scope = { + add_scheme_modifier = { + type = scheme_grand_ambitions_powerful_family_modifier + } + } + } + else = { # Coup Track + # House head promises to join your faction + scope:powerful_family_head = { + swear_to_join_claimant_faction_effect = yes + } + } + + set_powerful_family_story_variables_effect = { + POWERFUL_HOUSE_SCOPE = scope:powerful_house + METHOD_FLAG = currency + } + + ai_chance = { + base = 30 + modifier = { + OR = { + prestige <= massive_prestige_value + short_term_gold <= major_gold_value + influence <= major_influence_value + } + factor = 0 + } + } + } + + option = { # Hook + name = grand_ambitions.0170.b + scope:powerful_family_head = { + add_hook = { + target = root + type = favor_hook + } + } + + if = { # Scheme Track + limit = { + scope:story.var:method ?= flag:scheme + exists = scope:depose_scheme_scope + } + scope:depose_scheme_scope = { + add_scheme_modifier = { + type = scheme_grand_ambitions_powerful_family_modifier + } + } + } + else = { # Coup Track + # House head promises to join your faction + scope:powerful_family_head = { + swear_to_join_claimant_faction_effect = yes + } + } + + set_powerful_family_story_variables_effect = { + POWERFUL_HOUSE_SCOPE = scope:powerful_house + METHOD_FLAG = hook + } + + stress_impact = { + paranoid = minor_stress_impact_gain + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 30 + } + } + + option = { # Betrothal + name = grand_ambitions.0170.c + trigger = { + trigger_if = { + limit = { + NOR = { + faith = { has_doctrine = doctrine_polygamy } + allowed_more_spouses = yes + } + } + is_married = no + } + is_betrothed = no + exists = scope:marriage_proposal + } + + if = { + limit = { + has_ep2_dlc_trigger = yes + } + create_grand_wedding_betrothal = { + SPOUSE_1 = root + SPOUSE_2 = scope:marriage_proposal + HOST = root + PROMISEE = scope:powerful_family_head + } + } + else = { + create_betrothal = scope:marriage_proposal + } + + send_bethrothal_notifications_and_apply_opinions_effect = { + SPOUSE_1 = root + SPOUSE_2 = scope:marriage_proposal + HOST = root + PROMISEE = scope:powerful_family_head + } + + if = { # Scheme Track + limit = { + scope:story.var:method ?= flag:scheme + exists = scope:depose_scheme_scope + } + scope:depose_scheme_scope = { + add_scheme_modifier = { + type = scheme_grand_ambitions_powerful_family_modifier + } + } + } + else = { # Coup Track + # House head promises to join your faction + scope:powerful_family_head = { + swear_to_join_claimant_faction_effect = yes + } + } + + set_powerful_family_story_variables_effect = { + POWERFUL_HOUSE_SCOPE = scope:powerful_house + METHOD_FLAG = marriage + } + + stress_impact = { + chaste = medium_stress_impact_gain + } + + ai_chance = { + base = 60 + } + } + + option = { # My ambitions will not be shackled by debts + name = grand_ambitions.0170.d + change_influence = minor_influence_gain + + ai_chance = { + base = 10 + } + } +} + +# Secure support from the patriarch to crown you (legitimacy) +grand_ambitions.0180 = { + type = character_event + title = grand_ambitions.0180.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:target_char.capital_county = title:e_byzantium } + desc = grand_ambitions.0180.intro_hagia_sofia + } + } + desc = grand_ambitions.0180.desc + } + theme = administrative + + override_background = { + reference = temple_scope + } + + left_portrait = { + character = root + animation = prayer + } + right_portrait = { + character = root.faith.religious_head + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + + trigger = { + any_owned_story = { + type = grand_ambitions_story_cycle + NOT = { has_variable = hof_support } + } + } + + immediate = { + root.faith.religious_head = { + save_scope_as = hof + save_scope_as = background_temple_scope + } + } + + option = { + name = grand_ambitions.0180.a + trigger = { piety_level >= max_piety_level } + flavor = grand_ambitions.0180.a.flavor + reason = piety_level + custom_tooltip = grand_ambitions.0180.b.success.tt + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + } + + option = { # You have a massive influence level + name = grand_ambitions.0180.d + trigger = { + influence_level >= 4 + } + flavor = grand_ambitions.0180.d.flavor + reason = influence_level + custom_tooltip = grand_ambitions.0180.b.success.tt + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Convince the Patriarch to crown you + name = grand_ambitions.0180.b + + change_influence = major_influence_loss + duel = { + skills = { learning intrigue } + value = very_high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 5 + min = -49 + } + modifier = { + num_virtuous_traits >= 1 + add = 10 + } + desc = grand_ambitions.0180.b.success + send_interface_toast = { + type = event_generic_good + title = grand_ambitions.0180.b.success + left_icon = scope:hof + right_icon = scope:target_title + + custom_tooltip = grand_ambitions.0180.b.success.tt + } + if = { + limit = { + can_add_hook = { + target = scope:hof + type = manipulation_hook + } + } + add_hook = { + target = scope:hof + type = manipulation_hook + } + } + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -5 + min = -49 + } + modifier = { + num_sinful_traits >= 1 + add = 15 + } + desc = grand_ambitions.0180.b.failure + send_interface_toast = { + type = event_generic_bad + title = grand_ambitions.0180.b.failure + left_icon = scope:hof + right_icon = scope:target_title + + reverse_add_opinion = { + target = scope:hof + modifier = disgusted_opinion + opinion = -30 + } + + scope:story = { + set_variable = { + name = hof_support + value = no + } + } + } + } + } + + ai_chance = { + base = 50 + modifier = { + add = intrigue + } + modifier = { + add = learning + } + } + } + + option = { # Try to bribe the patriarch + name = grand_ambitions.0180.c + + scope:hof = { + random_list = { + 50 = { # Success + desc = grand_ambitions.0180.b.success + root = { + send_interface_toast = { + type = event_generic_good + title = grand_ambitions.0180.b.success + left_icon = scope:hof + right_icon = scope:target_title + + custom_tooltip = grand_ambitions.0180.b.success.tt + remove_treasury_or_gold = massive_treasury_or_gold_value + } + } + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + + # Traits + modifier = { + has_trait = greedy + add = 50 + } + modifier = { + has_trait = deceitful + add = 20 + } + modifier = { + has_trait = fickle + add = 15 + } + modifier = { + has_trait = arbitrary + add = 10 + } + modifier = { + has_trait = ambitious + add = 10 + } + + # Relationships + modifier = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:target_char } + add = 40 + } + opinion_modifier = { + opinion_target = root + multiplier = 1.0 + } + opinion_modifier = { + opinion_target = root + multiplier = -1.0 + } + } + 50 = { # Failure + desc = grand_ambitions.0180.b.failure + root = { + send_interface_toast = { + type = event_generic_good + title = grand_ambitions.0180.b.success + left_icon = scope:hof + right_icon = scope:target_title + + add_piety = medium_piety_loss + prev = { + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -30 + } + } + } + } + scope:story = { + set_variable = { + name = hof_support + value = no + } + } + + # Traits + modifier = { + has_trait = just + add = 50 + } + modifier = { + has_trait = honest + add = 20 + } + modifier = { + has_trait = content + add = 10 + } + + # Relationships + modifier = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:target_char } + add = 40 + } + + # Opinion + opinion_modifier = { + opinion_target = root + multiplier = -1.0 + } + opinion_modifier = { + opinion_target = root + multiplier = 1.0 + } + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + option = { # You happen to have a hook + name = grand_ambitions.0180.e + trigger = { + OR = { + has_strong_hook = scope:hof + has_weak_hook = scope:hof + } + } + custom_tooltip = grand_ambitions.0180.b.success.tt + if = { + limit = { + has_weak_hook = scope:hof + } + remove_hook = { + target = scope:hof + type = weak_hook + } + } + else = { + remove_hook = { + target = scope:hof + type = strong_hook + } + } + scope:story = { + set_variable = { + name = hof_support + value = yes + } + } + ai_chance = { + base = 100 + } + } + + option = { # Back out of the deal + name = grand_ambitions.0180.f + ai_chance = { + base = 10 + } + } +} + +# You found out a vassal has the Grand Ambitions story cycle, offer them co-emperorship? +grand_ambitions.0190 = { + type = character_event + title = grand_ambitions.0190.t + desc = grand_ambitions.0190.desc + theme = emperor + + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:interlocutor + animation = spymaster + } + lower_center_portrait = scope:secret_owner + + trigger = { + # Ensure root is not already the co-emperor + NAND = { + has_diarchy_type = co_emperorship + diarch = scope:secret_owner + } + # Ensure the secret owner is viable for co-emperorship + scope:secret_owner = { + age >= 16 + } + } + + immediate = { + save_scope_as = emperor + if = { # Grab spymaster first + limit = { + exists = cp:councillor_spymaster + cp:councillor_spymaster != scope:secret_owner + } + cp:councillor_spymaster = { save_scope_as = interlocutor } + } + else_if = { # then chief eunuch + limit = { + exists = court_position:chief_eunuch_court_position + court_position:chief_eunuch_court_position != scope:secret_owner + } + court_position:chief_eunuch_court_position = { save_scope_as = interlocutor } + } + else_if = { # then chancellor + limit = { + exists = cp:councillor_chancellor + cp:councillor_chancellor != scope:secret_owner + } + cp:councillor_chancellor = { save_scope_as = interlocutor } + } + else_if = { # fallback is random family member + limit = { + any_close_family_member = { + this != scope:secret_owner + age >= 16 + } + } + ordered_close_family_member = { + limit = { + this != scope:secret_owner + age >= 16 + } + order_by = intrigue + save_scope_as = interlocutor + } + } + else_if = { + limit = { + any_courtier = { + this != scope:secret_owner + age >= 16 + } + } + ordered_courtier = { + limit = { + this != scope:secret_owner + age >= 16 + } + order_by = intrigue + save_scope_as = interlocutor + } + } + else = { + ordered_pool_character = { + limit = { this != scope:secret_owner } + province = root.location + order_by = intrigue + save_scope_as = interlocutor + } + } + } + + option = { # Offer them Co-Emperorship + name = grand_ambitions.0190.a + custom_tooltip = grand_ambitions.0190.a.tt + random_list = { + 50 = { + show_chance = no + desc = co_emperor_accepts + show_as_tooltip = { + scope:emperor = { + custom_tooltip = { + text = grand_ambitions.0190.a.tt.1 + try_start_diarchy = co_emperorship + set_diarch = scope:secret_owner + } + } + scope:secret_owner = { + custom_tooltip = { + text = grand_ambitions.0190.a.tt.2 + random_secret = { + type = secret_coup_plotter + remove_secret = yes + } + random_owned_story = { + type = grand_ambitions_story_cycle + end_story = yes + } + } + change_influence = major_influence_gain + } + } + } + 50 = { + show_chance = no + desc = co_emperor_rejects + show_as_tooltip = { + change_influence = major_influence_loss + scope:secret_owner = { change_influence = major_influence_gain } + } + } + } + scope:secret_owner = { + trigger_event = { + id = grand_ambitions.0191 + days = 5 + } + } + + ai_chance = { + base = 50 + modifier = { + scope:secret_owner = { is_ai = no } + add = 50 + } + modifier = { + OR = { + has_trait = deceitful + has_trait = craven + has_trait = humble + has_trait = trusting + } + add = 100 + } + } + } + + option = { # Imprison them + name = grand_ambitions.0190.b + add_tyranny = massive_tyranny_gain + add_dread = major_dread_gain + imprison = { target = scope:secret_owner type = dungeon } + scope:secret_owner = { + add_opinion = { + target = root + modifier = imprisoned_me_dungeon + } + every_close_family_member = { + custom = every_family_member_of_secret_owner + add_opinion = { + target = root + modifier = imprisoned_family_member_dungeon + } + } + random = { + chance = 30 + house_feud_start_effect = { + # Feuding House Head + ACTOR = scope:secret_owner + # Target House Head + TARGET = scope:emperor + # Feud Reason + REASON = head_imprisoned + # House Member attacker if relevant + ATTACKER = scope:emperor + # House Member victim if relevant + VICTIM = scope:secret_owner + } + } + } + + ai_chance = { + base = 50 + modifier = { + scope:secret_owner = { is_ai = no } + add = -50 + } + modifier = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = ambitious + has_trait = paranoid + } + add = 100 + } + } + } + + option = { # Opt-Out + name = grand_ambitions.0190.c + + ai_chance = { + base = 0 + } + } +} + +# Current Emperor offers to make you their Co-Emperor +grand_ambitions.0191 = { + type = character_event + title = grand_ambitions.0191.t + desc = grand_ambitions.0191.desc + theme = emperor + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:interlocutor + animation = obsequious_bow + } + lower_center_portrait = scope:emperor + + trigger = { + age >= 16 + scope:emperor = { + # Ensure root is not already the co-emperor + NAND = { + has_diarchy_type = co_emperorship + diarch = root + } + } + # The Emperor knows your secret + any_secret = { + type = secret_coup_plotter + secret_target = scope:emperor + is_known_by = scope:emperor + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + } + + option = { # Accept + name = grand_ambitions.0191.a + scope:emperor = { + custom_tooltip = { + text = grand_ambitions.0190.a.tt.1 + try_start_diarchy = co_emperorship + set_diarch = prev + } + } + scope:secret_owner = { + random_secret = { + type = secret_coup_plotter + remove_secret = yes + } + random_owned_story = { + type = grand_ambitions_story_cycle + end_story = yes + } + change_influence = major_influence_gain + } + } + + option = { # Decline + name = grand_ambitions.0191.b + scope:emperor = { change_influence = major_influence_loss } + change_influence = major_influence_gain + } +} + + +####################################### +### +### CONCLUSION EVENTS +### +### 0200 Success +### 0201 Coronation by HoF +### 0202 Deposed Emperor +### +### 0250 Failure +### +####################################### + +### SUCCESS (0200-0240) +# Congrats, you're emperor now (riffs off event 0002) +grand_ambitions.0200 = { + type = character_event + title = grand_ambitions.0200.t + desc = { + desc = grand_ambitions.0200.opening + triggered_desc = { + trigger = { + scope:scheme = { + any_scheme_agent_slot = { + is_agent_slot_type = agent_eunuch + } + } + scope:story.var:eunuch ?= yes + } + desc = grand_ambitions.0200.eunuch + } + first_valid = { + triggered_desc = { + trigger = { + scope:story ?= { has_variable = powerful_family_method } + } + desc = grand_ambitions.0200.powerful_family + } + } + first_valid = { + triggered_desc = { + trigger = { scope:story.var:powerful_family_method ?= flag:currency } + desc = grand_ambitions.0200.powerful_family.currency + } + triggered_desc = { + trigger = { scope:story.var:powerful_family_method ?= flag:hook } + desc = grand_ambitions.0200.powerful_family.hook + } + triggered_desc = { + trigger = { scope:story.var:powerful_family_method ?= flag:marriage } + desc = grand_ambitions.0200.powerful_family.marriage + } + desc = grand_ambitions.0200.desc + } + desc = grand_ambitions.0200.conclusion + } + theme = administrative + override_background = { + trigger = { scope:target.capital_county = title:c_byzantion } + reference = ep3_constantinople_riot + } + + left_portrait = { + character = root + animation = celebrate_dagger + } + right_portrait = { + character = scope:target + animation = fear + } + + immediate = { + if = { + limit = { + any_owned_story = { + type = grand_ambitions_story_cycle + var:target_char ?= scope:target + } + } + random_owned_story = { + type = grand_ambitions_story_cycle + limit = { + var:target_char ?= scope:target + } + save_scope_as = story + } + } + else_if = { + limit = { + any_scheme = { + type = depose + } + } + random_scheme = { + type = depose + scheme_target_character = { + save_scope_as = recipient + save_scope_as = old_emp + } + } + } + } + + option = { + name = grand_ambitions.0200.a + imprison = { + target = scope:target + type = dungeon + } + # Root becomes next in line for the empire title + if = { + limit = { + scope:target = { + has_realm_law_flag = appointment_type_succession + } + } + scope:target.primary_title = { + current_heir = { save_scope_as = next_heir } + change_appointment_investment = { + target = root + value = { + value = "scope:next_heir.appointment_candidate_score(scope:target.primary_title)" + add = 100 + } + } + } + scope:target = { depose = yes } + } + else = { + scope:target = { + every_vassal = { add_to_list = target_vassals_list } + add_to_list = target_vassals_list + every_held_title = { + limit = { + is_noble_family_title = no + tier >= tier_county + } + add_to_list = target_held_titles + } + capital_county = { + save_temporary_scope_as = new_capital + } + } + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = yes + } + scope:target.primary_title = { + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + } + # We hide some of the effects, since they are all implicit + hidden_effect = { + every_in_list = { + list = target_held_titles + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + } + every_in_list = { + list = target_vassals_list + limit = { + NOT = { this = root } + } + change_liege = { + liege = root + change = scope:change + } + } + set_realm_capital = scope:new_capital + } + resolve_title_and_vassal_change = scope:change + } + change_influence_level = 1 + reverse_add_opinion = { + target = scope:target + modifier = deposed_me_opinion + } + + stress_impact = { + base = major_stress_impact_loss + } + } + + after = { + create_character_memory = { + type = deposed_liege_memory + participants = { liege = scope:target } + } + trigger_event = grand_ambitions.0202 + if = { + limit = { + scope:story ?= { + has_variable = hof_support + var:hof_support = yes + } + } + trigger_event = { # Coronation by the patriarch + id = grand_ambitions.0201 + days = 2 + } + } + if = { + limit = { + scope:story ?= { has_variable = promised_foreign_ruler_claim } + } + trigger_event = { + id = grand_ambitions.0300 + days = 5 + } + } + } +} + +# Coronation by the HoF +grand_ambitions.0201 = { + type = character_event + title = grand_ambitions.0201.t + desc = { + desc = grand_ambitions.0201.desc + triggered_desc = { + trigger = { + knows_language = language_greek + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = grand_ambitions.0201.conc_greek + } + } + theme = administrative + + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = scepter # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = root.faith.religious_head + animation = obsequious_bow + } + + immediate = { save_scope_as = root_scope } + + option = { + name = grand_ambitions.0201.a + add_legitimacy = 1000 + add_piety = medium_piety_gain + every_vassal = { + vassal_stance = zealot + custom = every_zealot_vassal + add_opinion = { + target = root + modifier = admiration_opinion + opinion = 20 + } + } + } + + after = { + scope:story ?= { + if = { + limit = { + NOT = { has_variable = promised_foreign_ruler_claim } + } + end_story = yes + } + } + } +} + +# What to do with the deposed emperor? +grand_ambitions.0202 = { + type = character_event + title = grand_ambitions.0202.t + desc = grand_ambitions.0202.desc + theme = administrative + override_background = { + trigger = { scope:county_location = title:c_byzantion } + reference = ep3_constantinople_riot + } + + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:old_emp + animation = beg + override_imprisonment_visuals = yes + } + + immediate = { + # Saving these scopes for the follow-up (grand_ambitions.0003) for the old emp which references the lost title + save_scope_as = actor + save_scope_as = new_emp + save_scope_as = root_scope # for loc + primary_title = { save_scope_as = revoked } + capital_county = { save_scope_as = county_location } + + random_owned_story = { + type = grand_ambitions_story_cycle + save_scope_as = story + } + + # save the proper scopes depending on how we got to this event + switch = { + trigger = scope:story.var:method + flag:coup = { + scope:defender = { + save_scope_as = recipient + save_scope_as = old_emp + } + } + flag:scheme = { + scope:target = { + save_scope_as = recipient + save_scope_as = old_emp + } + } + } + scope:target ?= { + save_scope_as = recipient + save_scope_as = old_emp + } + scope:old_emp = { + add_character_flag = { + flag = no_hat + days = 5 + } + } + } + + option = { # Do not banish or de-nose the loser + name = grand_ambitions.0202.a + flavor = grand_ambitions.0202.a.flavor + add_dread = minor_dread_loss + change_influence = minor_influence_gain + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + target = root + modifier = weak_opinion + opinion = -10 + } + } + every_vassal = { + vassal_stance = courtly + custom = every_courtly_vassal + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + if = { + limit = { + has_any_nickname = no + } + random = { + chance = 10 + give_nickname = nick_the_merciful + } + } + scope:target = { + add_opinion = { + target = root + modifier = mercy_opinion + opinion = 30 + } + release_from_prison = yes + } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = patient + has_trait = forgiving + has_trait = humble + } + add = 50 + } + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.75 + } + } + } + + option = { # Just de-nose the loser + name = grand_ambitions.0202.b + flavor = grand_ambitions.0202.b.flavor + disfigure_recipient_effect = yes + blind_castrate_and_disfigure_effect = yes #Stress & dread + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + scope:target = { release_from_prison = yes } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = sadistic + has_trait = callous + } + add = 50 + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.25 + } + } + } + + option = { # De-nose and Banish the scoundrel! + name = grand_ambitions.0202.c + flavor = grand_ambitions.0202.c.flavor + + disfigure_recipient_effect = yes + blind_castrate_and_disfigure_effect = yes #Stress & dread + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + + scope:target = { + banish_effect = { BANISHER = root } + # Trigger Succession on the Noble Family Title of the prev emp + create_title_and_vassal_change = { + type = revoked + save_scope_as = change + add_claim_on_loss = yes + } + random_held_title = { + limit = { + has_title_law = noble_family_succession_law + } + change_title_holder = { + holder = scope:target.primary_heir + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + # Make the prev emp become a LAAMP + show_as_tooltip = { + create_landless_adventurer_title_effect = { + REASON = flag:exile + FLAVOR_CHAR = root + } + } + if = { + limit = { is_ai = no } + trigger_event = grand_ambitions.0003 + } + else = { + trigger_event = grand_ambitions.0004 + } + release_from_prison = yes + } + + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = vengeful + has_trait = diligent + has_trait = wrathful + has_trait = paranoid + } + add = 60 + } + ai_value_modifier = { + ai_boldness = 1.5 + ai_zeal = 0.25 + } + } + } + + option = { + name = grand_ambitions.0202.d + custom_tooltip = grand_ambitions.0202.d.tt + } + + after = { + if = { + limit = { + scope:story ?= { + NOR = { + has_variable = hof_support + has_variable = promised_foreign_ruler_claim + } + } + } + scope:story = { end_story = yes } + } + } +} + +### FAILURE (0250-0290) +grand_ambitions.0250 = { + type = character_event + title = grand_ambitions.0250.t + desc = grand_ambitions.0250.desc + theme = administrative + override_background = { reference = ep3_city_gate } + + left_portrait = { + character = root + animation = disappointed + } + right_portrait = { + character = scope:interlocutor + animation = shame + } + lower_center_portrait = scope:target + + immediate = { + find_scheme_interlocutor_effect = yes + } + + option = { # Acknowledge your failure + name = grand_ambitions.0250.a + scope:scheme = { end_scheme = yes } + random_owned_story = { + type = grand_ambitions_story_cycle + end_story = yes + } + + stress_impact = { + base = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + diligent = minor_stress_impact_gain + impatient = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_loss + craven = minor_stress_impact_loss + honest = minor_stress_impact_loss + } + } + + after = { scope:story = { end_story = yes } } +} + + +####################################### +### +### FOLLOW-UP EVENTS +### +### 0300 Reap What You Sow +### +####################################### + +# Reap What You Sow +# Event where the person you made a promise to comes to cash in +grand_ambitions.0300 = { + type = character_event + title = grand_ambitions.0300.t + desc = grand_ambitions.0300.desc + theme = emperor + + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = scope:foreign_ruler + animation = personality_honorable + } + + trigger = { + any_owned_story = { + type = grand_ambitions_story_cycle + var:promised_foreign_ruler_claim ?= { + is_ai = yes + NOT = { + any_held_title = { + this = scope:story.var:foreign_ruler_demand + } + } + } + } + } + + immediate = { + scope:story.var:promised_foreign_ruler_claim = { save_scope_as = foreign_ruler } + scope:story.var:foreign_ruler_demand ?= { save_scope_as = demand } + } + + option = { # Grant them the title + name = grand_ambitions.0300.a + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + scope:demand = { + change_title_holder_include_vassals = { + holder = scope:foreign_ruler + change = scope:change + } + holder = { + every_held_title = { + limit = { + is_landless_type_title = no + target_is_de_facto_liege_or_above = scope:demand + } + change_title_holder_include_vassals = { + holder = scope:foreign_ruler + change = scope:change + } + } + } + } + resolve_title_and_vassal_change = scope:change + + add_legitimacy = major_legitimacy_loss + } + + option = { # Find a diplomatic out + name = grand_ambitions.0300.b + trigger = { + NOT = { + is_allied_to = scope:foreign_ruler + is_at_war_with = scope:foreign_ruler + } + } + duel = { + skill = diplomacy + target = scope:foreign_ruler + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = grand_ambitions.0300.b.success + send_interface_toast = { + type = event_generic_good_text + title = grand_ambitions.0300.b.success + left_icon = scope:foreign_ruler + create_alliance = scope:foreign_ruler + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = grand_ambitions.0300.b.failure + send_interface_toast = { + type = event_generic_bad_text + title = grand_ambitions.0300.b.failure + left_icon = scope:foreign_ruler + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + scope:demand = { + change_title_holder_include_vassals = { + holder = scope:foreign_ruler + change = scope:change + } + holder = { + every_held_title = { + limit = { + is_landless_type_title = no + target_is_de_facto_liege_or_above = scope:demand + } + change_title_holder_include_vassals = { + holder = scope:foreign_ruler + change = scope:change + } + } + } + } + resolve_title_and_vassal_change = scope:change + } + } + } + } + + option = { # Deny their claim + name = grand_ambitions.0300.c + add_legitimacy = minor_legitimacy_gain + if = { + limit = { + NOT = { + any_character_war = { + OR = { + primary_attacker = scope:foreign_ruler + primary_defender = scope:foreign_ruler + } + } + } + } + random_list = { + 1 = { + show_chance = no + scope:foreign_ruler = { + start_war = { + casus_belli = claim_cb + target = root + claimant = scope:foreign_ruler + target_title = scope:demand + } + } + } + 1 = { show_chance = no } + } + } + } + + after = { + scope:story ?= { end_story = yes } + } +} + + +####################################### +### +### MAINTENANCE EVENTS +### +### 0500 Invalid Story Target (dead or no longer holds target title) +### +####################################### + +# While you're still scheming or claimant-ing, the target emperor dies or no longer holds the title +grand_ambitions.0500 = { + type = letter_event + opening = grand_ambitions.0500.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:story.var:target_char ?= { + is_alive = no + } + } + desc = grand_ambitions.0500.dead + } + triggered_desc = { + trigger = { + scope:story.var:target_char ?= { + NOT = { any_held_title = { this = scope:story.var:target_title } } + } + } + desc = grand_ambitions.0500.wrong_title + } + } + } + sender = scope:interlocutor + + trigger = { + any_owned_story = { + type = grand_ambitions_story_cycle + save_temporary_scope_as = temp_story + exists = var:target_char + var:target_char = { + NOT = { any_held_title = { this = scope:temp_story.var:target_title } } + } + } + NOT = { + any_held_title = { + this = scope:story.var:target_title + } + } + } + + immediate = { + find_scheme_interlocutor_effect = yes + random_owned_story = { + type = grand_ambitions_story_cycle + save_scope_as = story + } + } + + option = { + name = grand_ambitions.0500.a + trigger = { # Do you still meet the criteria for this story cycle? + house = { + house_head ?= root + is_powerful_family = yes + } + top_liege != this + highest_held_title_tier <= tier_kingdom + government_allows = administrative + top_liege = { + primary_title.tier = tier_empire + government_allows = administrative + } + } + if = { + limit = { scope:story.var:method ?= flag:scheme } + custom_tooltip = { + text = grand_ambitions_start_depose_scheme_tt + # start le scheme + ## Balanced configuration. + begin_scheme_with_agents_effect = { + SCHEME_TYPE = depose + TARGET_TYPE = target_character + TARGET_SCOPE = root.top_liege + # Success. + AGENT_1 = agent_diplomat + AGENT_2 = agent_tumbler + # Speed. + AGENT_3 = agent_infiltrator + AGENT_4 = agent_socialite + # Secrecy. + AGENT_5 = agent_decoy + } + # Add a bussin scheme modifier + random_scheme = { + type = depose + add_scheme_modifier = { + type = scheme_grand_ambitions_modifier + } + } + } + } + # Update the story variables + scope:story = { + set_variable = { + name = target_char + value = root.top_liege + } + set_variable = { + name = target_title + value = root.top_liege.primary_title + } + } + } + + option = { + name = grand_ambitions.0500.b + custom_tooltip = grand_ambitions.0500.b.tt + scope:story = { end_story = yes } + top_liege = { + if = { + limit = { + scope:story.var:method ?= flag:coup + any_targeting_faction = { + faction_leader = root + faction_type = claimant_faction + } + } + random_targeting_faction = { + faction_type = claimant_faction + limit = { + faction_leader = root + } + destroy_faction = yes + } + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt b/N3OW/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt new file mode 100644 index 00000000..b7efe9c0 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_story_cycle_harrying_of_the_north_events.txt @@ -0,0 +1,4688 @@ +namespace = ep3_story_cycle_harrying + +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⠀⠀ +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣴⣿⣀⣀⣤⣴⡞⠀⠀⣀⣴⣿⠀⠀ +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣸⣿⠿⣿⣿⢿⣿⣷⣶⣿⣿⣿⡟⠀⠀ +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣿⡏⠀⠈⠁⠘⠿⠟⠛⢉⣽⣿⠃⠀⠀ +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⡘⠃⠀⠀⠀⠀⠀⠀⢰⣿⣿⣋⣀⡄⠀ +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣾⣿⣿⣦⠀⠀⠀⠀⠀⣀⣬⣿⣿⡿⠋⠀⠀ +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣷⣄⠀⣀⣀⣻⣿⣏⣉⠀⠀⠀⠀ +#⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣦⡙⢿⣿⣿⣿⣿⣿⡷⠈⠙⠛⠛⠋⠁⠀⠀⠀⠀ +#⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣄⠙⢿⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣿⡿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠀⠀⢠⣾⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⢀⣴⣿⣿⣿⠿⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠠⣿⣿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ +#⠀⠀⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ + +### Maintenance events +## 0001-0999 +# by Nick Meredith + +# Harrying ends - the Aethelings are no more +ep3_story_cycle_harrying.0001 = { + type = character_event + title = ep3_story_cycle_harrying.0001.t + desc = { + desc = ep3_story_cycle_harrying.0001.desc + first_valid = { + triggered_desc = { + trigger = { + this = scope:ruler_england + } + desc = ep3_story_cycle_harrying.0001.desc.william + } + triggered_desc = { + trigger = { + this = character:90028 + } + desc = ep3_story_cycle_harrying.0001.desc.hereward + } + desc = ep3_story_cycle_harrying.0001.desc.therest + } + } + + theme = harrying + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + trigger = { root != this } + character = scope:ruler_england + animation = personality_honorable + } + + immediate = { + title:k_england.holder = { + save_scope_as = ruler_england + } + title:k_england = { + save_scope_as = england + } + custom_tooltip = harrying_end + } + + option = { # Hereward + name = ep3_story_cycle_harrying.0001.a + + trigger = { + this = character:90028 + } + + stress_impact = { + base = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { #William + name = ep3_story_cycle_harrying.0001.b + + trigger = { + this = scope:ruler_england + } + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #All others + name = ep3_story_cycle_harrying.0001.b + + trigger = { + NOR = { + this = scope:ruler_england + this = character:90028 + } + } + + ai_chance = { + base = 100 + } + } +} + +# Harrying ends - an Aetheling rules +ep3_story_cycle_harrying.0002 = { + type = character_event + title = ep3_story_cycle_harrying.0002.t + desc = { + desc = ep3_story_cycle_harrying.0002.desc + first_valid = { + triggered_desc = { + trigger = { + this = scope:ruler_england + } + desc = ep3_story_cycle_harrying.0002.desc.ruler + } + triggered_desc = { + trigger = { + this = character:90028 + } + desc = ep3_story_cycle_harrying.0002.desc.hereward + } + desc = ep3_story_cycle_harrying.0002.desc.therest + } + } + theme = harrying + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + trigger = { root != this } + character = scope:ruler_england + animation = personality_honorable + } + + immediate = { + title:k_england.holder = { + save_scope_as = ruler_england + } + title:k_england = { + save_scope_as = england + } + custom_tooltip = harrying_end + } + + option = { # Hereward + name = ep3_story_cycle_harrying.0002.a + + trigger = { + this = character:90028 + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { # Ruler + name = ep3_story_cycle_harrying.0002.b + + trigger = { + this = scope:ruler_england + } + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #All others + name = ep3_story_cycle_harrying.0002.b + + trigger = { + NOR = { + this = scope:ruler_england + this = character:90028 + } + } + + ai_chance = { + base = 100 + } + } +} + +# Harrying ends - neither Normans nor Aethelings rule +ep3_story_cycle_harrying.0003 = { + type = character_event + title = ep3_story_cycle_harrying.0003.t + desc = ep3_story_cycle_harrying.0003.desc + theme = harrying + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + trigger = { root != this } + character = scope:ruler_england + animation = personality_honorable + } + + immediate = { + title:k_england.holder = { + save_scope_as = ruler_england + } + title:k_england = { + save_scope_as = england + } + custom_tooltip = harrying_end + } + + option = { # Hereward + name = ep3_story_cycle_harrying.0003.a + + trigger = { + this = character:90028 + } + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { # Ruler + name = ep3_story_cycle_harrying.0003.b + + trigger = { + this = scope:ruler_england + } + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #All others + name = ep3_story_cycle_harrying.0003.b + + trigger = { + NOR = { + this = scope:ruler_england + this = character:90028 + } + } + + ai_chance = { + base = 100 + } + } +} + +# Harrying ends - 100 years have passed +ep3_story_cycle_harrying.0004 = { + type = character_event + title = ep3_story_cycle_harrying.0004.t + desc = { + desc = ep3_story_cycle_harrying.0004.desc + first_valid = { + triggered_desc = { + trigger = { + this = scope:ruler_england + } + desc = ep3_story_cycle_harrying.0004.desc.ruler + } + triggered_desc = { + trigger = { + this.culture = culture:anglo_saxon + } + desc = ep3_story_cycle_harrying.0004.desc.anglo_saxon + } + desc = ep3_story_cycle_harrying.0004.desc.therest + } + } + theme = harrying + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + trigger = { root != this } + character = scope:ruler_england + animation = personality_honorable + } + + immediate = { + title:k_england.holder = { + save_scope_as = ruler_england + } + title:k_england = { + save_scope_as = england + } + custom_tooltip = harrying_end + } + + option = { # Anglo-Saxons + name = ep3_story_cycle_harrying.0004.a + + trigger = { + this.culture = culture:anglo_saxon + } + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { # Ruler + name = ep3_story_cycle_harrying.0004.b + + trigger = { + this = scope:ruler_england + } + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #All others + name = ep3_story_cycle_harrying.0004.b + + trigger = { + NOR = { + this = scope:ruler_england + this.culture = culture:anglo_saxon + } + } + + ai_chance = { + base = 100 + } + } +} + +################################################## +# William Events +# by Nick Meredith +# 1000-1999 +################################################## + +#Burn crops +#Burn down villages +#Construct castles +#Improve infrastructure North/South +#Revoke titles +#Slaughter supposed conspirators +#Build spy network +#Rebuild villages in grids +#Decide the fate of a captive Aetheling +#Receive a desperate northerner +#Mutilate a captive + +# Burn crops +ep3_story_cycle_harrying.1000 = { + type = character_event + title = ep3_story_cycle_harrying.1000.t + desc = ep3_story_cycle_harrying.1000.desc + theme = harrying + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:aetheling + animation = anger + } + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + any_vassal = { + culture = culture:anglo_saxon + highest_held_title_tier > tier_county + } + } + + immediate = { + random_vassal = { + limit = { + culture = culture:anglo_saxon + highest_held_title_tier > tier_county + } + save_scope_as = aetheling + } + scope:aetheling.primary_title = { + save_scope_as = crop_duchy + } + ep3_harrying_widget_setup_effect = yes + + save_scope_as = root_scope + } + + option = { #Burn all the crops + name = ep3_story_cycle_harrying.1000.a + + add_dread = medium_dread_gain + + add_tyranny = minor_tyranny_gain + + ep3_increase_pacification_effect = { AMOUNT = harrying_medium_increase_value } + + scope:crop_duchy = { + change_county_control = 15 + every_direct_de_jure_vassal_title = { + custom = every_county_in_duchy_aetheling + add_county_modifier = { + modifier = all_crops_burned + years = 5 + } + } + } + + culture = { + change_cultural_acceptance = { + target = scope:aetheling.culture + value = minor_cultural_acceptance_loss + desc = harrying_of_the_north_tt + } + } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + vengeful = minor_stress_impact_loss + compassionate = major_stress_impact_gain + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + option = { #Burn most of them, leaving enough for subsistence + name = ep3_story_cycle_harrying.1000.b + + add_dread = minor_dread_gain + + scope:crop_duchy = { + change_county_control = 5 + every_direct_de_jure_vassal_title = { + custom = every_county_in_duchy_aetheling + add_county_modifier = { + modifier = crops_burned + years = 5 + } + } + } + + culture = { + change_cultural_acceptance = { + target = scope:aetheling.culture + value = miniscule_cultural_acceptance_loss + desc = harrying_of_the_north_tt + } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + wrathful = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + } + } + } + + option = { #Exact a levy of crops + name = ep3_story_cycle_harrying.1000.c + + add_treasury_or_gold = medium_treasury_or_gold_value + + scope:crop_duchy = { + change_county_control = -10 + every_direct_de_jure_vassal_title = { + custom = every_county_in_duchy_aetheling + add_county_modifier = { + modifier = crop_levy + years = 5 + } + } + } + + every_vassal = { + custom = every_minority_vassal + vassal_stance = minority + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -15 + } + } + + stress_impact = { + sadistic = medium_stress_impact_gain + vengeful = major_stress_impact_gain + compassionate = miniscule_stress_impact_loss + forgiving = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_compassion = 1 + } + } + } + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +# Build on the Great North Road +ep3_story_cycle_harrying.1005 = { + type = character_event + title = ep3_story_cycle_harrying.1005.t + desc = ep3_story_cycle_harrying.1005.desc + theme = harrying + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:marshal + animation = chancellor + } + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + any_vassal = { + culture = culture:anglo_saxon + } + OR = { #Ensure owns at least one county on the route + has_title = title:c_middlesex + has_title = title:c_hertfordshire + has_title = title:c_bedford + has_title = title:c_northamptonshire + has_title = title:c_leicestershire + has_title = title:c_nottinghamshire + has_title = title:c_west_riding + } + exists = cp:councillor_marshal + } + + immediate = { + every_county_in_region = { + region = world_europe_west_britannia + limit = { # All counties along the Great North Road...ish + OR = { + this = title:c_middlesex + this = title:c_hertfordshire + this = title:c_bedford + this = title:c_northamptonshire + this = title:c_leicestershire + this = title:c_nottinghamshire + this = title:c_west_riding + } + OR = { + holder = root + holder.top_liege = root + } + } + add_to_list = great_north_road + } + cp:councillor_marshal = { + save_scope_as = marshal + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Rebuild and stock the road with armed guards + name = ep3_story_cycle_harrying.1005.a + + remove_treasury_or_gold = major_treasury_or_gold_value + + every_in_list = { + list = great_north_road + custom = ep3_story_cycle_harrying.1005.a.tt + add_county_modifier = { + modifier = ep3_gnr_guards_modifier + years = 15 + } + } + + stress_impact = { + craven = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -1 + } + } + } + + option = { #Rebuild the road + name = ep3_story_cycle_harrying.1005.b + + remove_treasury_or_gold = major_treasury_or_gold_value + + every_in_list = { + list = great_north_road + custom = ep3_story_cycle_harrying.1005.a.tt + add_county_modifier = { + modifier = ep3_gnr_modifier + years = 10 + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + option = { #Destroy the northern parts of the road; deny them the passage + name = ep3_story_cycle_harrying.1005.c + + ep3_increase_pacification_effect = { AMOUNT = harrying_medium_increase_value } + + every_in_list = { + list = great_north_road + custom = ep3_story_cycle_harrying.1005.c.tt1 + limit = { + holder.culture = culture:anglo_saxon + } + add_county_modifier = { + modifier = ep3_gnr_negative_modifier + years = 10 + } + } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + vengeful = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +# Decide the fate of a captive Aetheling +ep3_story_cycle_harrying.1010 = { + type = character_event + title = ep3_story_cycle_harrying.1010.t + desc = ep3_story_cycle_harrying.1010.desc + theme = harrying + override_background = { reference = dungeon } + left_portrait = { + character = root + animation = spymaster + } + right_portrait = { + character = scope:captured + animation = prisondungeon + } + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + any_prisoner = { + is_ai = yes + is_adult = yes + culture = culture:anglo_saxon + is_lowborn = no + } + } + + immediate = { + save_scope_as = actor + random_prisoner = { + limit = { + is_ai = yes + is_adult = yes + culture = culture:anglo_saxon + is_lowborn = no + } + save_scope_as = captured + save_scope_as = recipient + } + save_scope_as = root_scope #for tooltip + ep3_harrying_widget_setup_effect = yes + } + + option = { #Kill him + name = ep3_story_cycle_harrying.1010.a + + execute_prisoner_effect = { + VICTIM = scope:captured + EXECUTIONER = root + } + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + ep3_increase_pacification_effect = { AMOUNT = harrying_medium_increase_value } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_honor = -1 + } + } + } + + option = { #Mutilate and release him + name = ep3_story_cycle_harrying.1010.b + + add_dread = miniscule_dread_gain + + disfigure_recipient_effect = yes + torture_blind_castrate_disfigure_opinion_effect = { VERB = disfigured } + + stress_impact = { + sadistic = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -0.5 + } + } + } + + option = { #You will be a Norman, now + name = ep3_story_cycle_harrying.1010.c + + duel = { + skills = { diplomacy intrigue } + target = scope:captured + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.1010.c.success + + show_as_tooltip = { #To resolve in follow-up, due to learn language scheme + scope:captured = { + set_culture = culture:norman + } + } + + trigger_event = { + id = ep3_story_cycle_harrying.1011 + days = { 1 2 } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.1010.c.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.1010.c.failure + + add_prestige = medium_prestige_loss + every_vassal = { + vassal_stance = glory_hound + custom = every_glory_hound_vassal + add_opinion = { + modifier = tournament_mocked_opinion #Re-using + target = root + opinion = -15 + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_compassion = 1 + } + } + } + + option = { #Let them rot + name = ep3_story_cycle_harrying.1010.d + + add_character_modifier = { + modifier = ep3_honourable_jailor_modifier + years = 15 + } + + stress_impact = { + base = miniscule_stress_impact_loss + sadistic = major_stress_impact_gain + compassionate = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_compassion = 1 + } + } + } + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +#Follow-up on acceptance +ep3_story_cycle_harrying.1011 = { + type = character_event + title = ep3_story_cycle_harrying.1011.t + desc = { + desc = ep3_story_cycle_harrying.1011.desc + triggered_desc = { + trigger = { + scope:spouse_courtier = { + exists = this + } + } + desc = ep3_story_cycle_harrying.1011.desc.spouse + } + } + theme = harrying + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:captured + animation = happiness + } + lower_center_portrait = { + trigger = { + scope:spouse_courtier = { + exists = this + } + } + character = scope:spouse_courtier + } + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + immediate = { + if = { #Ugly if/else block starts here! + limit = { + scope:captured = { + is_married = no + 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 + } + } + } + random_courtier = { + limit = { + 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 + } + weight = { + base = 1 + modifier = { + factor = 10 + is_lowborn = no #Always good to do noble marriages where possible + } + modifier = { + factor = 5 + is_close_or_extended_family_of = root #And what nobler than the king? + } + } + 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 = { + location = root.location + random_traits = yes + faith = root.faith + culture = culture:norman + age = scope:captured.age + gender_female_chance = { + if = { + limit = { scope:captured = { is_female = yes } } + add = 0 + } + else = { add = 100 } + } + save_scope_as = spouse_courtier + } + } + } + } + + if = { #Just to ensure she's actually part of your court, if generated + limit = { + scope:spouse_courtier = { + exists = this + NOT = { + is_courtier_of = root + } + } + } + hidden_effect = { + add_courtier = scope:spouse_courtier + } + } + + ep3_harrying_widget_setup_effect = yes + + ep3_increase_pacification_effect = { AMOUNT = harrying_medium_increase_value } + } + + option = { #You'll get married to a nice Norman lad/lass! Also learn the language + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:spouse_courtier = { + exists = this + } + } + desc = ep3_story_cycle_harrying.1011.a.spouselanguage + } + desc = ep3_story_cycle_harrying.1011.a.language + } + } + } + + scope:captured = { + if = { + limit = { + scope:spouse_courtier = { + exists = this + } + } + marry = scope:spouse_courtier + } + if = { + limit = { + can_start_scheme = { + type = learn_language + target_character = root + } + } + start_scheme = { + type = learn_language + target_character = root + } + } + release_from_prison = yes + if = { + limit = { + highest_held_title_tier = tier_unlanded + } + change_liege = { + liege = root + change = scope:change + } + add_courtier = scope:captured + } + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:captured + opinion = 35 + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_compassion = 1 + } + } + } + + option = { #Go now, and be free + name = ep3_story_cycle_harrying.1011.b + + scope:captured = { + release_from_prison = yes + if = { + limit = { + highest_held_title_tier = tier_unlanded + } + change_liege = { + liege = root + change = scope:change + } + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + patient = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:captured + opinion = 50 + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 1 + } + } + } + + after = { + hidden_effect = { + scope:captured = { + set_culture = culture:norman + } + } + ep3_harrying_widget_clear_effect = yes + } +} + +# Punish a village +ep3_story_cycle_harrying.1015 = { + type = character_event + title = ep3_story_cycle_harrying.1015.t + desc = ep3_story_cycle_harrying.1015.desc + theme = harrying + override_background = { reference = burning_building } + override_effect_2d = smoke + left_portrait = { + character = root + animation = rage + } + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + any_vassal = { + culture = culture:anglo_saxon + highest_held_title_tier > tier_county + any_county = { + any_province = { + has_holding = yes + num_buildings > 0 + } + } + } + } + + immediate = { + random_vassal = { + limit = { culture = culture:anglo_saxon } + save_scope_as = vassal + random_realm_province = { + limit = { + has_holding = yes + num_buildings >= 1 + } + 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 + ep3_harrying_widget_setup_effect = yes + } + + option = { #Burn it to cinders + name = ep3_story_cycle_harrying.1015.a + + ep3_increase_pacification_effect = { AMOUNT = harrying_medium_increase_value } + + scope:offending_village = { + destroy_random_building_effect = yes + add_province_modifier = { + modifier = ep3_smouldering_village + years = 15 + } + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_honor = -1 + } + } + } + + option = { #Resettle the residents + name = ep3_story_cycle_harrying.1015.b + + scope:offending_village = { + add_province_modifier = { + modifier = ep3_resettled_village + years = 15 + } + } + + every_in_list = { + list = resettlement_villages + custom = all_neighbouring_villages + add_province_modifier = { + modifier = ep3_population_boost + years = 15 + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -0.5 + } + } + } + + option = { #Leave it be + name = ep3_story_cycle_harrying.1015.c + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + + add_tyranny = minor_tyranny_loss + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_compassion = 1 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +################################################## +# Aetheling Events +# by Nick Meredith +# 2000-2999 +################################################## + +#Appeal for Scottish help +#Bleddyn allies with Anglo-Saxons +#Welsh raids into Herefordshire +#Send messages to Europe for knights +#Stoke flames across the country + +# Recruit levies from starving men +ep3_story_cycle_harrying.2000 = { + type = character_event + title = ep3_story_cycle_harrying.2000.t + desc = { + desc = ep3_story_cycle_harrying.2000.desc + triggered_desc = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + desc = ep3_story_cycle_harrying.2000.notcallous + } + } + theme = harrying + override_background = { reference = alley_day } + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:starving_man + animation = beg + } + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + location = root.capital_province + exists = root.cp:councillor_marshal + } + + immediate = { + location = { + save_scope_as = location + } + top_liege = { + save_scope_as = william + } + hidden_effect = { + random_dummy_gender_effect = yes + create_character = { + template = new_warrior_character + location = root.location + culture = culture:anglo_saxon + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = starving_man + } + scope:starving_man = { + change_current_weight = -50 + } + } + root.cp:councillor_marshal = { + save_scope_as = marshal + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #All of you; you're all hired. + name = ep3_story_cycle_harrying.2000.a + + remove_short_term_gold = major_gold_value + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + + add_prestige = medium_prestige_gain + + scope:location.county = { + add_county_modifier = { + modifier = ep3_paid_grains + years = 10 + } + } + + trigger_event = { + id = ep3_story_cycle_harrying.2001 + days = { 3 6 } + } + + stress_impact = { + greedy = medium_stress_impact_gain + callous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + generous = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + } + } + + option = { #I'll hire you, fine gentleman + name = ep3_story_cycle_harrying.2000.b + + remove_short_term_gold = minor_gold_value + + add_courtier = scope:starving_man + + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + generous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 1 + } + } + } + + option = { #Maybe I can try intervening myself? + name = ep3_story_cycle_harrying.2000.c + + duel = { + skill = stewardship + value = decent_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.2000.c.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.2000.c.success + + ep3_decrease_pacification_effect = yes + + scope:location.county = { + add_county_modifier = { + modifier = ep3_innovative_farming_techniques + years = 10 + } + } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.2000.c.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.2000.c.failure + + add_prestige = minor_prestige_loss + ep3_decrease_resistance_effect = yes + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + generous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.5 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +#You gain event troops! +ep3_story_cycle_harrying.2001 = { + type = letter_event + opening = ep3_story_cycle_harrying.2001.opening + desc = ep3_story_cycle_harrying.2001.desc + sender = scope:marshal + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + add_stress = minor_stress_loss + } + + option = { # Wooo! + name = ep3_story_cycle_harrying.2001.a + + spawn_army = { + name = event_troop_default_name + levies = 1000 + location = scope:location + origin = scope:location + } + + ai_chance = { + base = 100 + } + } + + option = { # Reject them for now + name = ep3_story_cycle_harrying.2001.b + + flavor = ep3_story_cycle_harrying.2001.b.tt + + scope:location.county = { + add_county_modifier = { + modifier = ep3_surplus_manpower + years = 10 + } + } + + ai_chance = { + base = 100 + } + } +} + +# Recruit murderers to kill Normans +ep3_story_cycle_harrying.2005 = { + type = character_event + title = ep3_story_cycle_harrying.2005.t + desc = ep3_story_cycle_harrying.2005.desc + theme = harrying + override_background = { reference = armory } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:murderer + animation = spymaster + } + lower_center_portrait = { + character = scope:spymaster + } + cooldown = { years = 20 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + exists = root.cp:councillor_spymaster + title:k_england.holder = { + culture = culture:norman + any_vassal = { + culture = culture:norman + capital_province = { + geographical_region = world_europe_west_britannia + } + } + } + } + + immediate = { + location = { + save_scope_as = location + } + top_liege = { + save_scope_as = william + } + scope:william = { + random_vassal = { + limit = { + culture = culture:norman + capital_province = { + geographical_region = world_europe_west_britannia + } + } + capital_province.county = { + save_scope_as = willy_vassal + } + } + } + hidden_effect = { + create_character = { + template = ep3_murderer_template + location = root.location + culture = culture:anglo_saxon + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = murderer + } + } + root.cp:councillor_spymaster = { + save_scope_as = spymaster + } + scope:william = { + random_close_family_member = { + limit = { + location = { geographical_region = world_europe_west_britannia } + } + save_scope_as = willy_family + } + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Perhaps we need to aim higher... + name = ep3_story_cycle_harrying.2005.a + + trigger = { + scope:william = { + any_close_family_member = { + location = { geographical_region = world_europe_west_britannia } + } + } + } + + add_internal_flag = special + + pay_short_term_gold = { + target = scope:murderer + gold = medium_gold_value + } + + start_scheme = { type = murder target_character = scope:willy_family } + + custom_tooltip = diplomacy_family.2250.b.tt + hidden_effect = { + random_scheme = { + type = murder + limit = { + scheme_target_character = scope:willy_family + } + add_scheme_modifier = { + type = extra_success_chance_modifier + } + } + } + + hidden_effect = { + scope:murderer = { + silent_disappearance_effect = yes + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + sadistic = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { #Go off and murder some Normans, wouldja? + name = ep3_story_cycle_harrying.2005.b + + flavor = ep3_story_cycle_harrying.2005.b.tt + + pay_short_term_gold = { + target = scope:murderer + gold = medium_gold_value + } + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + + scope:willy_vassal = { + add_county_modifier = { + modifier = ep3_murderers_loose + years = 20 + } + } + + hidden_effect = { + scope:murderer = { + silent_disappearance_effect = yes + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + generous = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + option = { #Well, you might be handy to have around... + name = ep3_story_cycle_harrying.2005.c + + add_courtier = scope:murderer + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +# Gather support amongst the minor nobles +ep3_story_cycle_harrying.2010 = { + type = character_event + title = ep3_story_cycle_harrying.2010.t + desc = ep3_story_cycle_harrying.2010.desc + theme = harrying + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = chancellor + } + cooldown = { years = 15 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + title:k_england.holder = { + culture = culture:norman + any_duchy = { + count > 1 + } + } + } + + immediate = { + top_liege = { + save_scope_as = william + } + scope:william = { + every_sub_realm_county = { #Choose first one of two random counties + limit = { + holder = { + culture = culture:norman + } + } + add_to_list = county_list + } + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Rally general support + name = ep3_story_cycle_harrying.2010.a + + duel = { + skill = diplomacy + value = decent_skill_rating + + 10 = { #It really works + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.2010.a.critsuccess + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_harrying.2010.a.critsuccess + left_icon = root + + ep3_increase_resistance_large_effect = yes + } + } + + 50 = { #It works + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = ep3_story_cycle_harrying.2010.a.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_harrying.2010.a.success + left_icon = root + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + } + } + + 50 = { #It doesn't work + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = ep3_story_cycle_harrying.2010.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_harrying.2010.a.failure + left_icon = root + + add_prestige = medium_prestige_loss + } + } + + 10 = { #Message is intercepted and more troops sent + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.2010.a.critfailure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_harrying.2010.a.critfailure + left_icon = root + + ep3_increase_pacification_effect = { AMOUNT = harrying_medium_increase_value } + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + content = medium_stress_impact_gain + greedy = miniscule_stress_impact_gain + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { #Appeal for extra tax revenue + name = ep3_story_cycle_harrying.2010.b + + duel = { + skills = { stewardship diplomacy } + value = decent_skill_rating + + 50 = { #Yes! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.2010.b.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.2010.b.success + left_icon = root + + add_gold = medium_gold_value + } + } + 50 = { #...no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.2010.b.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.2010.b.failure + left_icon = root + + add_prestige = minor_prestige_loss + ep3_decrease_resistance_effect = yes + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { #Tell them to save their strength + name = ep3_story_cycle_harrying.2010.c + + + scope:william = { + every_sub_realm_county = { + limit = { + is_in_list = county_list + } + custom = county_list_tt + random = { + chance = 5 + add_county_modifier = { + modifier = ep3_counties_restless_modifier + years = 15 + } + } + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +#Forge documents strengthening Aetheling positions +ep3_story_cycle_harrying.2015 = { + type = character_event + title = ep3_story_cycle_harrying.2015.t + desc = ep3_story_cycle_harrying.2015.desc + theme = harrying + override_background = { reference = study } + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:chancellor + animation = chancellor + } + lower_center_portrait = { + trigger = { + scope:other_vassal = { + is_alive = yes + } + } + character = scope:other_vassal + } + cooldown = { years = 15 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + primary_title.tier >= tier_duchy + } + + immediate = { + top_liege = { + save_scope_as = william + } + primary_title = { + save_scope_as = primary_title + } + if = { + limit = { + scope:william = { + any_vassal = { + this != root + culture = culture:anglo_saxon + } + } + } + scope:william = { + random_vassal = { + limit = { + this != root + culture = culture:anglo_saxon + } + save_scope_as = other_vassal + primary_title = { + save_scope_as = other_vassal_primary_title + } + } + } + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Ensure your titles cannot be revoked + name = ep3_story_cycle_harrying.2015.a + + duel = { + skills = { diplomacy intrigue } + target = scope:william + + 60 = { #Yes! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.2015.a.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.2015.a.success + left_icon = root + right_icon = scope:william + + if = { + limit = { + vassal_contract_obligation_level_can_be_decreased = title_revocation_rights + } + vassal_contract_set_obligation_level = { + type = title_revocation_rights + level = 1 + } + } + else = { + if = { + limit = { + can_add_hook = { + target = scope:william + type = fabrication_hook + } + } + add_hook = { + target = scope:william + type = fabrication_hook + } + } + } + + if = { + limit = { + scope:other_vassal = { + is_alive = yes + vassal_contract_obligation_level_can_be_decreased = title_revocation_rights + } + } + scope:other_vassal = { + vassal_contract_set_obligation_level = { + type = title_revocation_rights + level = 1 + } + } + } + } + } + 40 = { #...no + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.2015.a.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.2015.a.failure + left_icon = root + right_icon = scope:william + + if = { + limit = { + can_add_hook = { + target = scope:william + type = favor_hook + } + } + add_hook = { + target = scope:william + type = favor_hook + } + } + if = { + limit = { + scope:other_vassal = { + is_alive = yes + } + } + scope:other_vassal = { + add_hook = { + target = scope:william + type = favor_hook + } + } + } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + content = medium_stress_impact_gain + deceitful = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { #Reduce Feudal Levies/Taxes + name = ep3_story_cycle_harrying.2015.b + + if = { + limit = { + vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes + } + vassal_contract_decrease_obligation_level = feudal_government_taxes + } + if = { + limit = { + vassal_contract_obligation_level_can_be_decreased = feudal_government_levies + } + vassal_contract_decrease_obligation_level = feudal_government_levies + } + if = { + limit = { + scope:other_vassal = { + is_alive = yes + } + } + scope:other_vassal = { + if = { + limit = { + vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes + } + vassal_contract_decrease_obligation_level = feudal_government_taxes + } + if = { + limit = { + vassal_contract_obligation_level_can_be_decreased = feudal_government_levies + } + vassal_contract_decrease_obligation_level = feudal_government_levies + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + generous = medium_stress_impact_gain + just = miniscule_stress_impact_gain + arbitrary = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { #Gain Marcher Lord status + name = ep3_story_cycle_harrying.2015.c + + vassal_contract_set_obligation_level = { + type = special_contract + level = 2 + } + + scope:other_vassal = { + vassal_contract_set_obligation_level = { + type = special_contract + level = 2 + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +################################################## +# Hereward Events +# by Nick Meredith +# 3000-3999 +################################################## + +#Rob local church +#William offers to parcel out Cambridgeshire to you +#Call in Danish help +#Heist an artifact from a local noble +#Downgrade local building +#Travel to other areas of the country to gather support + +# Rob local church +ep3_story_cycle_harrying.3000 = { + type = character_event + title = ep3_story_cycle_harrying.3000.t + desc = ep3_story_cycle_harrying.3000.desc + theme = harrying + override_background = { reference = temple } + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:bishop + animation = beg + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + location = { save_temporary_scope_as = current_temp } + scope:current_temp = { + any_neighboring_province = { + has_holding_type = church_holding + } + } + } + + immediate = { + location = { + random_neighboring_province = { + limit = { + has_holding_type = church_holding + } + save_scope_as = neighboring_church + } + } + hidden_effect = { + create_character = { + template = priest_character_template + location = scope:neighboring_church + save_scope_as = bishop + } + random_dummy_gender_effect = yes + scope:bishop = { + create_artifact_brooch_effect = { + OWNER = scope:bishop + SMITH = scope:dummy_gender + } + } + scope:newly_created_artifact = { + set_artifact_name = artifact_church_saint_brooch_name + set_artifact_description = artifact_church_saint_brooch_description + add_artifact_modifier = artifact_monthly_piety_4_modifier + add_artifact_modifier = artifact_same_faith_opinion_4_modifier + add_artifact_modifier = artifact_clergy_opinion_penalty_5_modifier + set_artifact_rarity = famed + } + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Relics, you say? + name = ep3_story_cycle_harrying.3000.a + + add_piety = medium_piety_loss + + add_prestige = minor_prestige_loss + + scope:newly_created_artifact = { + set_owner = root + } + + scope:neighboring_church = { + add_province_modifier = { + modifier = ep3_church_bereft + years = 15 + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -1 + } + } + } + + option = { #This gold is needed for the war effort, but we'll leave any relics + name = ep3_story_cycle_harrying.3000.b + + flavor = ep3_story_cycle_harrying.3000.b.tt + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + + add_gold = medium_gold_value + + stress_impact = { + calm = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + generous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.5 + } + } + } + + option = { #I am a man of god, I would never. + name = ep3_story_cycle_harrying.3000.c + + add_piety = medium_piety_gain + + add_character_modifier = { + modifier = ep3_man_of_god + years = 10 + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = 1 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +# Interdict supply lines +ep3_story_cycle_harrying.3005 = { + type = character_event + title = ep3_story_cycle_harrying.3005.t + desc = ep3_story_cycle_harrying.3005.desc + theme = harrying + override_background = { reference = ep2_hunt_foggy_forest } + override_effect_2d = fog + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:norman_soldier + animation = survey + } + artifact = { + target = scope:newly_created_artifact + position = lower_right_portrait + } + + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + } + + immediate = { + location = { + save_scope_as = location + } + random_dummy_gender_effect = yes + create_character = { + template = new_warrior_character + location = root.location + culture = culture:norman + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = norman_soldier + } + hidden_effect = { + scope:norman_soldier = { + create_artifact = { #Scripted effect didn't like this, so custom weapon it is + name = norman_sword_name + description = stolen_norman_sword_description + type = sword + visuals = sword + modifier = artifact_prowess_4_modifier + modifier = artifact_knight_effectiveness_3_modifier + modifier = artifact_hard_casualty_modifier_4_modifier + rarity = masterwork + save_scope_as = newly_created_artifact + } + } + } + global_var:harrying_of_the_north.story_owner = { + save_scope_as = william + random_vassal = { + limit = { + location = { geographical_region = world_europe_west_britannia } #To ensure they're not getting sent to Normandy + } + primary_title = { + save_scope_as = vassal_county + } + } + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Grab the equipment for yourself + name = ep3_story_cycle_harrying.3005.a + + duel = { + skills = { martial prowess } + target = scope:norman_soldier + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3005.a.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3005.a.success + + ep3_decrease_pacification_effect = yes + + add_character_modifier = { + modifier = ep3_stolen_equipment + years = 5 + } + + scope:newly_created_artifact = { + set_owner = root + set_artifact_name = stolen_norman_sword_name + } + + scope:vassal_county = { + add_county_modifier = { + modifier = ep3_missing_supplies + years = 15 + } + } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3005.a.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.3005.a.failure + + add_prestige = medium_prestige_loss + increase_wounds_no_death_effect = { REASON = battle } + every_knight = { + custom = every_knight + add_opinion = { + modifier = botched_ambush_opinion + target = root + opinion = -15 + } + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 0.5 + } + } + } + + option = { #Take the equipment for allies + name = ep3_story_cycle_harrying.3005.b + + flavor = ep3_story_cycle_harrying.3005.b.tt + + duel = { + skills = { martial prowess } + target = scope:norman_soldier + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3005.a.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3005.a.success + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + ep3_decrease_pacification_effect = yes + + scope:vassal_county = { + add_county_modifier = { + modifier = ep3_missing_supplies + years = 15 + } + } + global_var:harrying_of_the_north.story_owner = { + every_vassal = { + limit = { + culture = culture:anglo_saxon + } + custom = every_anglo_vassal + add_character_modifier = { + modifier = ep3_redistributed_equipment + years = 5 + } + } + } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3005.a.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.3005.a.failure + + add_prestige = medium_prestige_loss + increase_wounds_no_death_effect = { REASON = battle } + every_knight = { + custom = every_knight + add_opinion = { + modifier = botched_ambush_opinion + target = root + opinion = -15 + } + } + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + generous = medium_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 0.5 + } + } + } + + option = { #Sabotage the road ahead + name = ep3_story_cycle_harrying.3005.c + + flavor = ep3_story_cycle_harrying.3005.c.tt + + scope:location = { + add_province_modifier = { + modifier = ep3_sabotaged_roads + years = 10 + } + } + + scope:vassal_county = { + add_county_modifier = { + modifier = ep3_delayed_supplies + years = 10 + } + } + + stress_impact = { + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + scope:norman_soldier = { + silent_disappearance_effect = yes + } + } +} + +scripted_trigger ep3_story_cycle_harrying_3010_ambushable_noble_trigger = { + location = { + geographical_region = world_europe_west_britannia + duchy = root.location.duchy #Same duchy as Hereward + } + culture = culture:norman + is_theocratic_lessee = no #No dueling priests! + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = $WILLIAM$ } + NOT = { has_character_flag = hereward_ambushed } +} + +#Ambush Norman noble +ep3_story_cycle_harrying.3010 = { + type = character_event + title = ep3_story_cycle_harrying.3010.t + desc = ep3_story_cycle_harrying.3010.desc + theme = harrying + override_background = { reference = ep2_travel_bridge } + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:norman_noble + animation = aggressive_sword + } + artifact = { + target = scope:newly_created_artifact + position = lower_right_portrait + } + + cooldown = { years = 5 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + is_healthy = yes + global_var:harrying_of_the_north.story_owner = { + save_temporary_scope_as = william_temp + any_vassal_or_below = { + ep3_story_cycle_harrying_3010_ambushable_noble_trigger = { WILLIAM = scope:william_temp } + } + } + } + + immediate = { + location = { save_scope_as = location } + global_var:harrying_of_the_north.story_owner = { + save_scope_as = william + random_vassal_or_below = { + limit = { + ep3_story_cycle_harrying_3010_ambushable_noble_trigger = { WILLIAM = scope:william } + } + primary_title = { save_scope_as = noble_county } + save_scope_as = norman_noble + add_character_flag = hereward_ambushed + } + } + hidden_effect = { + random_dummy_gender_effect = yes + scope:norman_noble = { + create_artifact_ring_effect = { + OWNER = scope:norman_noble + SMITH = scope:dummy_gender + } + } + } + root = { save_scope_as = root_for_loc } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Fight them + name = ep3_story_cycle_harrying.3010.a + + custom_tooltip = ep3_story_cycle_harrying.3010.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:norman_noble + FIXED = no + FATALITY = always + LOCALE = ep2_travel_bridge + OUTPUT_EVENT = ep3_story_cycle_harrying.3011 + INVALIDATION_EVENT = fp1_yearly.2002 #Re-use this + } + + stress_impact = { + brave = medium_stress_impact_loss + wrathful = miniscule_stress_impact_loss + calm = miniscule_stress_impact_gain + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { #Simply rob them + name = ep3_story_cycle_harrying.3010.b + + add_short_term_gold = medium_gold_value + + scope:newly_created_artifact = { + set_owner = root + } + + ep3_decrease_pacification_effect = yes + + stress_impact = { + brave = medium_stress_impact_gain + wrathful = miniscule_stress_impact_gain + calm = miniscule_stress_impact_loss + craven = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = -0.5 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +#Followup, post-duel +ep3_story_cycle_harrying.3011 = { + type = character_event + title = ep3_story_cycle_harrying.3011.t + desc = ep3_story_cycle_harrying.3011.desc + theme = harrying + override_background = { reference = ep2_travel_bridge } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:saxon_soldier_1 + animation = thinking + } + lower_center_portrait = { + character = scope:saxon_soldier_2 + } + + cooldown = { years = 5 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + is_healthy = yes + } + + immediate = { + ep3_harrying_widget_setup_effect = yes + ep3_decrease_pacification_effect = yes + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + scope:newly_created_artifact = { + set_owner = root + } + hidden_effect = { + random_dummy_gender_effect = yes + create_character = { + template = new_warrior_character + location = root.location + culture = culture:anglo_saxon + faith = root.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = saxon_soldier_1 + } + create_character = { + template = new_warrior_character + location = root.location + culture = culture:anglo_saxon + faith = root.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = saxon_soldier_2 + } + } + } + + option = { #Would you boys like a job? + name = ep3_story_cycle_harrying.3011.a + + add_courtier = scope:saxon_soldier_1 + add_courtier = scope:saxon_soldier_2 + + stress_impact = { + forgiving = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_vengefulness = -1 + } + } + } + + option = { #Let them return to their families + name = ep3_story_cycle_harrying.3011.b + + hidden_effect = { + scope:saxon_soldier_1 = { + silent_disappearance_effect = yes + } + scope:saxon_soldier_2 = { + silent_disappearance_effect = yes + } + } + + add_character_modifier = { + modifier = ep3_defender_of_families + years = 10 + } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +#Call in Danish help +ep3_story_cycle_harrying.3015 = { + type = character_event + title = ep3_story_cycle_harrying.3015.t + desc = ep3_story_cycle_harrying.3015.desc + theme = harrying + left_portrait = { + character = root + animation = writing + } + right_portrait = { + character = scope:danish_king + animation = thinking + } + cooldown = { years = 50 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + is_healthy = yes + title:k_denmark.holder = { + is_at_war = no + is_available_healthy_ai_adult = yes + } + title:k_england.holder = { + is_ai = yes #Just to ensure we don't screw players over + } + } + + immediate = { + location = { + save_scope_as = location + } + title:k_denmark.holder = { + save_scope_as = danish_king + } + hidden_effect = { + create_character = { + location = scope:danish_king.location + template = new_warrior_character + faith = scope:danish_king.faith + culture = scope:danish_king.culture + gender_female_chance = root_soldier_female_chance + save_scope_as = knight_1 + } + create_character = { + location = scope:danish_king.location + template = new_berserker_character + faith = scope:danish_king.faith + culture = scope:danish_king.culture + gender_female_chance = root_soldier_female_chance + save_scope_as = knight_2 + } + create_character = { + location = scope:danish_king.location + template = new_commander_character + faith = scope:danish_king.faith + culture = scope:danish_king.culture + gender_female_chance = root_soldier_female_chance + save_scope_as = knight_3 + } + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Send them a letter begging for them to be your new liege + name = ep3_story_cycle_harrying.3015.a + + duel = { + skill = diplomacy + value = decent_skill_rating + + 50 = { #He agrees + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3015.a.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3015.a.success + left_icon = root + right_icon = scope:danish_king + + scope:danish_king = { + add_unpressed_claim = title:k_england + } + create_alliance = { + target = scope:danish_king + allied_through_owner = root + allied_through_target = scope:danish_king + } + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + ep3_decrease_pacification_effect = yes + add_stress = medium_stress_loss + } + } + + 50 = { #He disagrees + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3015.a.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.3015.a.failure + + add_prestige = miniscule_prestige_loss + ep3_increase_pacification_effect = { AMOUNT = harrying_medium_increase_value } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + brave = miniscule_stress_impact_loss + content = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { #Send them a letter begging for soldiers + name = ep3_story_cycle_harrying.3015.b + + duel = { + skills = { diplomacy martial } + value = decent_skill_rating + + 75 = { #He agrees + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3015.b.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3015.b.success + left_icon = root + right_icon = scope:danish_king + + add_character_flag = soldiers_accepted_flag + + add_courtier = scope:knight_1 + add_courtier = scope:knight_2 + add_courtier = scope:knight_3 + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + } + } + + 25 = { #He disagrees + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3015.b.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.3015.b.failure + + add_prestige = miniscule_prestige_loss + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { #We fight this battle alone + name = ep3_story_cycle_harrying.3015.c + + add_character_modifier = { + modifier = ep3_standing_alone_modifier + years = 10 + } + + every_courtier_or_guest = { + custom = every_follower_custom + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 25 + } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_energy = -0.5 + } + } + } + + after = { + if = { + limit = { + NOT = { + has_character_flag = soldiers_accepted_flag + } + } + scope:knight_1 = { silent_disappearance_effect = yes } + scope:knight_2 = { silent_disappearance_effect = yes } + scope:knight_3 = { silent_disappearance_effect = yes } + } + ep3_harrying_widget_clear_effect = yes + } +} + +#Travel to another area of the country to intimidate a Norman sympathiser +ep3_story_cycle_harrying.3020 = { + type = character_event + title = ep3_story_cycle_harrying.3020.t + desc = ep3_story_cycle_harrying.3020.desc + theme = harrying + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:willy_vassal + animation = dismissal + } + cooldown = { years = 10 } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + is_healthy = yes + title:k_england.holder = { + save_temporary_scope_as = willy_temp + any_vassal = { + culture = culture:anglo_saxon + capital_province = { geographical_region = world_europe_west_britannia } + highest_held_title_tier > tier_barony + opinion = { + target = scope:willy_temp + value >= neutral_opinion + } + any_courtier = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + culture = culture:anglo_saxon + } + } + } + } + + immediate = { + location = { + save_scope_as = location + } + title:k_england.holder = { + save_scope_as = willy + random_vassal = { + limit = { + culture = culture:anglo_saxon + capital_province = { geographical_region = world_europe_west_britannia } + highest_held_title_tier > tier_barony + opinion = { + target = scope:willy + value >= neutral_opinion + } + any_courtier = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + culture = culture:anglo_saxon + } + } + save_scope_as = willy_vassal + location = { + save_scope_as = willy_vassal_capital + } + } + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Travel there, raise hell + name = ep3_story_cycle_harrying.3020.a + + custom_tooltip = ep3_story_cycle_harrying.3020.a.tt + + start_travel_plan = { + destination = scope:willy_vassal_capital + players_use_planner = no + on_arrival_destinations = last + on_arrival_event = ep3_story_cycle_harrying.3021 + return_trip = no + } + + stress_impact = { + ambitious = minor_stress_impact_loss + brave = miniscule_stress_impact_loss + content = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { #Leave it + name = ep3_story_cycle_harrying.3020.b + + ep3_decrease_resistance_effect = yes + + stress_impact = { + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +#You arrive and ambush him +ep3_story_cycle_harrying.3021 = { + type = character_event + title = ep3_story_cycle_harrying.3021.t + desc = ep3_story_cycle_harrying.3021.desc + theme = harrying + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:willy_vassal + animation = beg + } + cooldown = { years = 5 } + override_background = { reference = alley_night } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_available = yes + is_healthy = yes + title:k_england.holder = { + save_temporary_scope_as = willy_temp + any_vassal = { + culture = culture:anglo_saxon + capital_province = { geographical_region = world_europe_west_britannia } + highest_held_title_tier > tier_barony + opinion = { + target = scope:willy_temp + value >= neutral_opinion + } + location = root.location + any_courtier = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + culture = culture:anglo_saxon + } + } + } + } + + immediate = { + save_scope_as = root_for_loc + title:k_england.holder = { + save_scope_as = willy + random_vassal = { + limit = { + culture = culture:anglo_saxon + capital_province = { geographical_region = world_europe_west_britannia } + highest_held_title_tier > tier_barony + opinion = { + target = scope:willy + value >= neutral_opinion + } + location = root.location + any_courtier = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + culture = culture:anglo_saxon + } + } + save_scope_as = willy_vassal + } + } + scope:willy_vassal = { + random_courtier = { + limit = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + culture = culture:anglo_saxon + } + save_scope_as = knight_1 + } + } + hidden_effect = { + create_character = { + template = new_warrior_character + location = scope:willy_vassal.location + culture = scope:willy_vassal.culture + faith = scope:willy_vassal.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = knight_2 + } + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Kill him and steal his stuff + name = ep3_story_cycle_harrying.3021.a + + custom_tooltip = ep3_story_cycle_harrying.3021.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:willy_vassal + FIXED = no + FATALITY = always + LOCALE = ep2_travel_bridge + OUTPUT_EVENT = ep3_story_cycle_harrying.3022 + INVALIDATION_EVENT = fp1_yearly.2002 #Re-use this + } + + stress_impact = { + calm = medium_stress_impact_gain + just = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 1 + ai_compassion = -1 + } + } + } + + option = { #Reason with him + name = ep3_story_cycle_harrying.3021.b + + duel = { + skill = diplomacy + target = scope:willy_vassal + + 50 = { #You reason successfully + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3021.b.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3021.b.success + left_icon = root + right_icon = scope:willy_vassal + + scope:willy_vassal = { + add_opinion = { + target = scope:willy + modifier = revanchist_opinion + opinion = -120 + } + } + scope:willy = { + add_character_modifier = { + modifier = ep3_disgruntled_vassals_modifier + years = 10 + } + } + ep3_decrease_pacification_effect = yes + } + } + + 50 = { #You are unable to reason with him + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3021.b.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.3021.b.failure + + add_stress = miniscule_stress_gain + ep3_decrease_resistance_effect = yes + } + } + } + + stress_impact = { + calm = minor_stress_impact_loss + just = miniscule_stress_impact_loss + wrathful = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { #Threaten him + name = ep3_story_cycle_harrying.3021.c + + duel = { + skill = prowess + target = scope:willy_vassal + + 60 = { #Your threats work + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3021.c.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3021.c.success + left_icon = root + right_icon = scope:willy_vassal + + scope:willy_vassal = { + add_opinion = { + target = scope:willy + modifier = revanchist_opinion + opinion = -120 + } + } + scope:willy = { + add_dread = major_dread_loss + add_character_modifier = { + modifier = ep3_disgruntled_vassals_modifier + years = 10 + } + } + ep3_decrease_pacification_effect = yes + } + } + + 40 = { #Your threats don't work + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3021.c.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.3021.c.failure + + add_dread = minor_dread_loss + add_prestige = minor_prestige_loss + ep3_decrease_resistance_effect = yes + } + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + content = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + option = { #Take some loyalists and leave him to it + name = ep3_story_cycle_harrying.3021.d + + flavor = ep3_story_cycle_harrying.3021.d.flavour + + add_courtier = scope:knight_1 + add_courtier = scope:knight_2 + + ep3_decrease_resistance_effect = yes + + stress_impact = { + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + just = miniscule_stress_impact_loss + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +#Duel resolution +ep3_story_cycle_harrying.3022 = { + type = character_event + title = ep3_story_cycle_harrying.3022.t + desc = ep3_story_cycle_harrying.3022.desc + theme = harrying + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:willy_vassal + animation = dead + } + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + artifact = { + target = scope:traitors_head_artifact + position = lower_right_portrait + } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + ep3_harrying_widget_setup_effect = yes + capital_province = { save_scope_as = domicile } + + random_dummy_gender_effect = yes + + add_gold = { 50 100 } + + hidden_effect = { + scope:willy_vassal = { + create_artifact_brooch_effect = { + OWNER = scope:willy_vassal + SMITH = scope:dummy_gender + } + } + create_artifact = { + name = traitors_head + description = traitors_head_description + type = miscellaneous + visuals = small_box + durability = 10 + max_durability = 10 + decaying = yes + modifier = artifact_health_penalty_1_modifier + modifier = artifact_stress_gain_1_penalty_modifier + modifier = artifact_attraction_opinion_negative_2_modifier + creator = root + rarity = famed + save_scope_as = traitors_head_artifact + } + } + + scope:newly_created_artifact = { + set_owner = root + } + } + + option = { #Send his head to William + name = ep3_story_cycle_harrying.3022.a + + scope:traitors_head_artifact = { + set_owner = scope:willy + } + + scope:willy = { + add_character_modifier = { + modifier = ep3_life_threatened_modifier + years = 10 + } + } + + stress_impact = { + calm = minor_stress_impact_gain + just = minor_stress_impact_gain + wrathful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 1 + ai_compassion = -1 + } + } + } + + option = { #Let everyone know what happens to turncoats + name = ep3_story_cycle_harrying.3022.b + + ep3_increase_resistance_large_effect = yes + + if = { + limit = { + scope:willy = { + any_sub_realm_duchy = { + count > 1 + holder.culture = culture:norman + } + } + } + scope:willy = { + random_sub_realm_duchy = { + limit = { + holder.culture = culture:norman + } + show_as_tooltip = { + add_county_modifier = { + modifier = ep3_impassioned_populace_modifier + years = 10 + } + } + hidden_effect = { + every_de_jure_county = { + add_county_modifier = { + modifier = ep3_impassioned_populace_modifier + years = 10 + } + } + } + save_scope_as = saved_duchy + } + random_sub_realm_duchy = { + limit = { + holder.culture = culture:norman + this != scope:saved_duchy + } + show_as_tooltip = { + add_county_modifier = { + modifier = ep3_impassioned_populace_modifier + years = 10 + } + } + hidden_effect = { + every_de_jure_county = { + add_county_modifier = { + modifier = ep3_impassioned_populace_modifier + years = 10 + } + } + } + } + } + } + + hidden_effect = { + destroy_artifact = scope:traitors_head_artifact + } + + stress_impact = { + calm = minor_stress_impact_loss + just = miniscule_stress_impact_loss + wrathful = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + start_travel_plan = { + destination = scope:domicile + players_use_planner = no + on_arrival_destinations = last + return_trip = no + } + } +} + +### EVENT CHAIN: +## Dealing with the Devil + +#William sends you a letter +ep3_story_cycle_harrying.3050 = { + type = letter_event + opening = ep3_story_cycle_harrying.3050.opening + desc = ep3_story_cycle_harrying.3050.desc + sender = scope:william + cooldown = { years = 100 } + + trigger = { + has_ep3_dlc_trigger = yes + is_ai = no #Don't even trigger this for AI + is_imprisoned = no + is_incapable = no + global_var:harrying_of_the_north.story_owner = { #King of England + is_ai = yes + OR = { #But needs to either have Cambridgeshire or be able to take it off a Norman vassal + has_title = title:c_cambridgeshire + any_vassal = { + culture = culture:norman + has_title = title:c_cambridgeshire + } + } + } + } + + immediate = { + global_var:harrying_of_the_north.story_owner = { + save_scope_as = william + capital_province.barony = { save_scope_as = london } + } + } + + option = { # Grimly accept + name = ep3_story_cycle_harrying.3050.a + + custom_tooltip = ep3_story_cycle_harrying.3050.a.tt + + every_character_active_contract = { invalidate_contract = yes } + + start_travel_plan = { + destination = scope:william.capital_province + players_use_planner = no + on_arrival_event = ep3_story_cycle_harrying.3051 + on_arrival_destinations = last + return_trip = no + } + + ai_chance = { #Just in case + base = 0 + } + } + + option = { # Refuse + name = ep3_story_cycle_harrying.3050.b + + reverse_add_opinion = { + target = scope:william + modifier = disrespect_opinion + opinion = -40 + } + + ai_chance = { + base = 100 + } + } +} + +#You meet William +ep3_story_cycle_harrying.3051 = { + type = character_event + title = ep3_story_cycle_harrying.3051.t + desc = ep3_story_cycle_harrying.3051.desc + theme = harrying + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:william + animation = thinking + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + location = { + save_scope_as = location + } + } + + option = { #Greet him cheekily + name = ep3_story_cycle_harrying.3051.a + + duel = { + skill = diplomacy + value = decent_skill_rating + + 70 = { #He's lets it slide + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3051.a.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3051.a.success + left_icon = root + right_icon = scope:william + + if = { + limit = { + scope:william = { + this = character:140 + } + } + scope:william = { + add_legitimacy = miniscule_legitimacy_loss + every_vassal = { + limit = { + culture = culture:anglo_saxon + } + custom = every_anglo_vassal + add_opinion = { + modifier = bantered_with_the_bastard_opinion + target = root + opinion = 10 + } + } + } + } + else = { + scope:william = { + add_legitimacy = miniscule_legitimacy_loss + every_vassal = { + limit = { + culture = culture:anglo_saxon + } + custom = every_anglo_vassal + add_opinion = { + modifier = bantered_with_the_devil_opinion + target = root + opinion = 10 + } + } + } + } + } + } + + 30 = { #He's annoyed by your levity + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3051.a.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.3051.a.failure + + add_prestige = miniscule_prestige_loss + } + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 0.5 + } + } + } + + option = { #Stay silent + name = ep3_story_cycle_harrying.3051.b + + flavor = ep3_story_cycle_harrying.3051.b.tt + + stress_impact = { + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + generous = medium_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 0.5 + } + } + } + + + after = { + trigger_event = { + id = ep3_story_cycle_harrying.3052 + days = 1 + } + } +} + +#William offers to give you Cambridgeshire +ep3_story_cycle_harrying.3052 = { + type = character_event + title = ep3_story_cycle_harrying.3052.t + desc = ep3_story_cycle_harrying.3052.desc + theme = harrying + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:william + animation = disapproval + } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + location = { + save_scope_as = location + } + title:c_cambridgeshire = { save_scope_as = cambridgeshire } + father = { + save_scope_as = father + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Take his offer + name = ep3_story_cycle_harrying.3052.a + + flavor = ep3_story_cycle_harrying.3052.a.flavor + custom_tooltip = ep3_story_cycle_harrying.3052.a.tt + + add_prestige = medium_prestige_loss + + if = { + limit = { + scope:cambridgeshire.holder = { + this != scope:william + } + } + scope:cambridgeshire.holder = { + add_opinion = { + target = scope:william + modifier = angry_opinion + opinion = -40 + } + } + } + + trigger_event = { + id = ep3_story_cycle_harrying.3053 + days = 1 + } + + stress_impact = { + greedy = medium_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 0.5 + } + } + } + + option = { #Turn down his offer + name = ep3_story_cycle_harrying.3052.b + + ep3_increase_resistance_effect = { AMOUNT = harrying_medium_increase_value } + + reverse_add_opinion = { + target = scope:william + modifier = angry_opinion + opinion = -65 + } + + trigger_event = { + id = ep3_story_cycle_harrying.3054 + days = 1 + } + + stress_impact = { + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + generous = medium_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 0.5 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + } +} + +scripted_effect ep3_story_cycle_harrying_3053_process_vassalisation_effect = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + if = { + limit = { + scope:duke_norfolk ?= { is_vassal_of = scope:william } + } + change_liege = { + liege = scope:duke_norfolk + change = scope:change + } + add_truce_both_ways = { + character = scope:william + years = 100 + name = fp3_landed_zanj_reason #Re-using this + } + add_truce_both_ways = { + character = scope:duke_norfolk + years = 100 + name = fp3_landed_zanj_reason #Re-using this + } + } + else = { + change_liege = { + liege = scope:william + change = scope:change + } + add_truce_both_ways = { + character = scope:william + years = 100 + name = fp3_landed_zanj_reason #Re-using this + } + } + resolve_title_and_vassal_change = scope:change +} + +#You accept his offer +ep3_story_cycle_harrying.3053 = { + type = character_event + title = ep3_story_cycle_harrying.3053.t + desc = ep3_story_cycle_harrying.3053.desc + theme = harrying + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:william + animation = disapproval + } + lower_right_portrait = scope:duke_norfolk + cooldown = { years = 10 } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + scope:cambridgeshire.duchy.holder ?= { save_scope_as = duke_norfolk } + } + + option = { #Recant your decision + name = ep3_story_cycle_harrying.3053.a + + add_prestige = medium_prestige_gain + + trigger_event = { + id = ep3_story_cycle_harrying.3054 + days = 1 + } + + ai_chance = { + base = 100 + } + } + + option = { #Accept + name = ep3_story_cycle_harrying.3053.b + + custom_tooltip = ep3_story_cycle_harrying.3053.b.tt + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + scope:cambridgeshire = { + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + # We need to do this here to account for you already being duke tier. + show_as_tooltip = { ep3_story_cycle_harrying_3053_process_vassalisation_effect = yes } + save_scope_value_as = { + name = settled_option + value = yes + } + add_character_flag = hereward_settled_flag + + ep3_decrease_resistance_effect = yes + ep3_increase_pacification_large_effect = yes + + if = { + limit = { + has_nickname = nick_the_wake + } + remove_nickname = yes + } + + give_nickname = nick_iscariot + + remove_trait = the_wake + + start_travel_plan = { + destination = root.capital_province + players_use_planner = no + on_arrival_destinations = last + return_trip = no + } + + scope:william = { + add_stress = major_stress_loss + } + + ai_chance = { + base = 0 + } + } + + after = { + # We need to do this here to account for you already being duke tier. + hidden_effect = { + if = { + limit = { exists = scope:settled_option } + ep3_story_cycle_harrying_3053_process_vassalisation_effect = yes + } + } + } +} + +#You decline his offer +ep3_story_cycle_harrying.3054 = { + type = character_event + title = ep3_story_cycle_harrying.3054.t + desc = ep3_story_cycle_harrying.3054.desc + theme = harrying + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:william + animation = rage + } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + location = { + save_scope_as = location + } + ep3_harrying_widget_setup_effect = yes + } + + option = { #Try to fight your way out + name = ep3_story_cycle_harrying.3054.a + + duel = { + skill = prowess + value = very_high_skill_rating + + 25 = { #You escape! + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3054.a.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3054.a.success + left_icon = root + + add_prestige = major_prestige_gain + + scope:william = { + add_prestige = major_prestige_loss + } + } + + start_travel_plan = { + destination = root.domicile.domicile_location + players_use_planner = no + on_arrival_destinations = last + return_trip = no + } + } + 75 = { #You are caught, beaten, and carted down to the cells + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3054.a.failure + + trigger_event = { + id = ep3_story_cycle_harrying.3055 + days = 1 + } + + send_interface_toast = { + title = ep3_story_cycle_harrying.3054.a.failure + + ep3_decrease_resistance_effect = yes + + add_prestige = medium_prestige_loss + + increase_wounds_no_death_effect = { REASON = fight } + + scope:william = { + imprison = { + target = root + type = dungeon + } + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + callous = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 0.5 + } + } + } + + option = { #Allow yourself to be taken to the dungeons + name = ep3_story_cycle_harrying.3054.b + + flavor = ep3_story_cycle_harrying.3054.b.tt + + ep3_decrease_resistance_effect = yes + + add_prestige = minor_prestige_loss + + scope:william = { + imprison = { + target = root + type = dungeon + } + } + + trigger_event = { + id = ep3_story_cycle_harrying.3055 + days = 1 + } + + stress_impact = { + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + generous = medium_stress_impact_loss + humble = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_energy = 0.5 + } + } + } + + after = { + ep3_harrying_widget_clear_effect = yes + # Since we sent custom imprisonment events, we want to block the default ones. + hidden_effect = { + add_character_flag = { + flag = block_imprisonment_event + days = 2 + } + } + } +} + +#You are thrown in the dungeon +ep3_story_cycle_harrying.3055 = { + type = character_event + title = ep3_story_cycle_harrying.3055.t + desc = ep3_story_cycle_harrying.3055.desc + theme = harrying + override_background = { reference = dungeon } + left_portrait = { + character = root + animation = prisondungeon + outfit_tags = { beggar_rags } + } + right_portrait = { + character = scope:william + animation = schadenfreude + } + lower_center_portrait = { + character = scope:sympathetic_courtier + } + + trigger = { + has_ep3_dlc_trigger = yes + is_imprisoned = yes + imprisoner = scope:william + } + + immediate = { + if = { + limit = { + scope:william = { + any_courtier = { + culture = culture:anglo_saxon + } + } + } + scope:william = { + random_courtier = { + limit = { + culture = culture:anglo_saxon + } + save_scope_as = sympathetic_courtier + } + } + } + else = { + hidden_effect = { + create_character = { + employer = scope:william + template = servant_character + gender_female_chance = 50 + culture = culture:anglo_saxon + faith = root.faith + save_scope_as = sympathetic_courtier + } + scope:william = { + add_courtier = scope:sympathetic_courtier + } + } + } + add_character_flag = harrying_imprisoned_flag + } + + option = { #You look around your cell + name = ep3_story_cycle_harrying.3055.a + + stress_impact = { + base = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + after = { + trigger_event = { + id = ep3_story_cycle_harrying.3056 + days = { 30 40 } + } + } +} + +# A mysterious letter appears +ep3_story_cycle_harrying.3056 = { + type = character_event + window = anonymous_letter_event + title = debug.0002.t + desc = ep3_story_cycle_harrying.3056.desc + theme = harrying + + trigger = { + has_ep3_dlc_trigger = yes + is_imprisoned = yes + imprisoner = scope:william + } + + option = { # A lifeline! + name = ep3_story_cycle_harrying.3056.a + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + after = { + trigger_event = { + id = ep3_story_cycle_harrying.3057 + days = { 2 4 } + } + } +} + +#You are sprung free! +ep3_story_cycle_harrying.3057 = { + type = character_event + title = ep3_story_cycle_harrying.3057.t + desc = ep3_story_cycle_harrying.3057.desc + theme = harrying + override_background = { reference = alley_night } + + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:sympathetic_courtier + animation = survey + outfit_tags = { western_stealth_hood } + } + widget = { + gui = "event_window_widget_harrying" + container = "custom_widgets_container" + } + + trigger = { + has_ep3_dlc_trigger = yes + is_imprisoned = yes + imprisoner = scope:william + } + + immediate = { + ep3_harrying_widget_setup_effect = yes + } + + option = { #Come with me! + name = ep3_story_cycle_harrying.3057.a + + duel = { + skill = diplomacy + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3057.a.success + + send_interface_toast = { + title = ep3_story_cycle_harrying.3057.a.success + left_icon = root + right_icon = scope:sympathetic_courtier + + add_courtier = scope:sympathetic_courtier + + reverse_add_opinion = { + target = scope:sympathetic_courtier + modifier = pleased_opinion + opinion = 15 + } + + hidden_effect = { + start_travel_plan = { + destination = root.domicile.domicile_location + players_use_planner = no + on_arrival_destinations = last + return_trip = no + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_story_cycle_harrying.3057.a.failure + + send_interface_toast = { + title = ep3_story_cycle_harrying.3057.a.failure + left_icon = root + right_icon = scope:sympathetic_courtier + + add_stress = miniscule_stress_gain + } + } + } + + release_from_prison = yes #Used here for event order reasons + + ai_chance = { + base = 100 + } + } + + option = { #I will always remember you. + name = ep3_story_cycle_harrying.3057.b + + #scope:sympathetic_courtier = { #In case we ever wanna use him for something + # add_character_flag = sympathetic_courtier_flag + #} + + stress_impact = { + base = minor_stress_impact_loss + } + + release_from_prison = yes #Used here for event order reasons + + ai_chance = { + base = 100 + } + } + + after = { + start_travel_plan = { + destination = root.domicile.domicile_location + players_use_planner = no + on_arrival_destinations = last + return_trip = no + } + scope:sympathetic_courtier = { + add_stress = medium_stress_loss #Prevent errors + } + ep3_harrying_widget_clear_effect = yes + remove_character_flag = harrying_imprisoned_flag + } +} diff --git a/N3OW/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt b/N3OW/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt new file mode 100644 index 00000000..4c88e764 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_story_cycle_violet_poet_events.txt @@ -0,0 +1,2639 @@ +namespace = ep3_story_cycle_violet_poet + +################################################## +# Maintenance events +# 0001-0999 +################################################## + +#andalusian_0003 +#Visit Orphanage + +#Lead-in event +ep3_story_cycle_violet_poet.0001 = { + type = character_event + title = ep3_story_cycle_violet_poet.0001.t + desc = ep3_story_cycle_violet_poet.0001.desc + theme = violet_poet + left_portrait = { + character = root + animation = thinking + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + cooldown = { years = 100 } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + title:c_toledo.holder = { + save_scope_as = toledo_owner + } + title:c_toledo = { + save_scope_as = toledo + } + location = { + save_scope_as = cordoba + } + create_story = story_cycle_violet_poet + create_artifact = { + name = artifact_double_moon_book + description = artifact_double_moon_book_description + type = journal + visuals = book + modifier = double_moon_modifier + save_scope_as = double_moon_book + } + hidden_effect = { + scope:double_moon_book = { + set_artifact_rarity = illustrious + } + #Error log suppression, the variable is set in the 01_laamp_titles.txt and checked in 00_succession_laws.txt + if = { + limit = { always = no } + primary_title = { + set_variable = { + name = can_keep_realm_law + value = flag:equal_law + } + } + } + } + } + + option = { #Stay in Cordoba + name = ep3_story_cycle_violet_poet.0001.a + + flavor = ep3_story_cycle_violet_poet.0001.a.tt + + stress_impact = { + content = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #Leave for pastures new + name = ep3_story_cycle_violet_poet.0001.b + + flavor = ep3_story_cycle_violet_poet.0001.b.tt + + custom_tooltip = ep3_story_cycle_violet_poet.0001.b.travel + + start_travel_plan = { + destination = scope:toledo_owner.capital_province + travel_with_domicile = yes + players_use_planner = no + return_trip = no + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + } + + ai_chance = { + base = 0 #Prioritise her staying in Cordoba for AI + } + } + + after = { + hidden_effect = { + scope:double_moon_book = { + set_artifact_description = artifact_double_moon_book_description_append + } + } + if = { + limit = { + NOT = { + has_character_flag = violet_poet_designated_heir + } + } + trigger_event = { + id = ep3_story_cycle_violet_poet.0002 + years = { 4 5 } + } + } + } +} + +#Heir designation event two-parter +#Triggered within the first five years of violet_poet's life +ep3_story_cycle_violet_poet.0002 = { + type = character_event + title = ep3_story_cycle_violet_poet.0002.t + desc = ep3_story_cycle_violet_poet.0002.desc + theme = violet_poet + left_portrait = { + character = root + animation = worry + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + trigger = { + has_ep3_dlc_trigger = yes + any_courtier = { + count > 1 + } + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Go for it + name = ep3_story_cycle_violet_poet.0002.a + + flavor = ep3_story_cycle_violet_poet.0002.a.tt + + trigger_event = { + id = ep3_story_cycle_violet_poet.0003 + days = { 1 2 } + } + + add_character_flag = violet_poet_designated_heir + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #Do not designate an heir + name = ep3_story_cycle_violet_poet.0002.b + + flavor = ep3_story_cycle_violet_poet.0002.b.flavor + custom_tooltip = ep3_story_cycle_violet_poet.0002.b.tt + + if = { + limit = { + NOT = { + has_character_flag = violet_poet_designated_heir + } + } + trigger_event = { + id = ep3_story_cycle_violet_poet.0002 + years = 5 + } + } + + stress_impact = { + base = miniscule_stress_impact_gain + } + + ai_chance = { + base = 0 #We want her to designate an heir + } + } +} + +#Heir designation event +ep3_story_cycle_violet_poet.0003 = { + type = character_event + title = ep3_story_cycle_violet_poet.0003.t + desc = { + desc = ep3_story_cycle_violet_poet.0003.opening + first_valid = { + triggered_desc = { + trigger = { + scope:heir1 = { + has_trait = lifestyle_poet + } + } + desc = ep3_story_cycle_violet_poet.0003.poet + } + desc = ep3_story_cycle_violet_poet.0003.diplomat + } + first_valid = { + triggered_desc = { + trigger = { + scope:heir2 = { + is_female = yes + } + } + desc = ep3_story_cycle_violet_poet.0003.woman + } + desc = ep3_story_cycle_violet_poet.0003.young + } + desc = ep3_story_cycle_violet_poet.0003.heir3 + first_valid = { + triggered_desc = { + trigger = { + scope:heir3 = { + has_trait = intellect_good + } + } + desc = ep3_story_cycle_violet_poet.0003.intelligent + } + triggered_desc = { + trigger = { + scope:heir3 = { + has_trait = beauty_good + } + } + desc = ep3_story_cycle_violet_poet.0003.beautiful + } + } + desc = ep3_story_cycle_violet_poet.0003.ending + } + + theme = violet_poet + left_portrait = { + character = root + animation = thinking + } + lower_left_portrait = { + character = scope:heir1 + } + lower_center_portrait = { + character = scope:heir2 + } + lower_right_portrait = { + character = scope:heir3 + } + + trigger = { + has_ep3_dlc_trigger = yes + this = character:andalusian_0003 + any_courtier = { + count > 1 + } + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + + #Heir 1 + #Prefers poets and high diplo, fallback is created + if = { + limit = { + any_courtier = { + OR = { + has_trait = lifestyle_poet + diplomacy > 20 + } + } + } + random_courtier = { + limit = { + OR = { + has_trait = lifestyle_poet + diplomacy > 20 + } + } + weight = { + base = 1 + modifier = { + factor = 4 + has_trait = lifestyle_poet + } + modifier = { + factor = 2 + diplomacy > 20 + } + } + save_scope_as = heir1 + } + } + else = { + hidden_effect = { + create_character = { + template = generic_peasant_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 50 + location = root.location + save_scope_as = heir1 + } + } + } + + #Heir 2 + #Prefers women and also young people, fallback is created + if = { + limit = { + any_courtier = { + OR = { + is_female = yes + age < 25 + } + } + } + random_courtier = { + limit = { + OR = { + is_female = yes + age < 25 + } + } + weight = { + base = 1 + modifier = { + factor = 4 + is_female = yes + } + modifier = { + factor = 2 + age < 25 + } + } + save_scope_as = heir2 + } + } + else = { + hidden_effect = { + create_character = { + template = generic_peasant_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 100 + location = root.location + save_scope_as = heir2 + } + } + } + + hidden_effect = { + create_character = { + template = ep3_wallada_heir_template + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 100 + location = root.location + save_scope_as = heir3 + } + } + } + + option = { #Choose heir 1 + name = ep3_story_cycle_violet_poet.0003.a + + set_designated_heir = scope:heir1 + if = { + limit = { + scope:heir1 = { + NOT = { is_courtier_of = root } + } + } + add_courtier = scope:heir1 + } + + adopt_effect = { + CHILD = scope:heir1 + ADOPTER = root + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 25 + } + } + + option = { #Choose heir 2 + name = ep3_story_cycle_violet_poet.0003.b + + set_designated_heir = scope:heir2 + if = { + limit = { + scope:heir2 = { + NOT = { is_courtier_of = root } + } + } + add_courtier = scope:heir2 + } + + adopt_effect = { + CHILD = scope:heir2 + ADOPTER = root + } + + stress_impact = { + base = miniscule_stress_impact_gain + } + + ai_chance = { + base = 25 + } + } + + option = { #Choose heir 3 + name = ep3_story_cycle_violet_poet.0003.c + + set_designated_heir = scope:heir3 + if = { + limit = { + scope:heir3 = { + NOT = { is_courtier_of = root } + } + } + add_courtier = scope:heir3 + } + + adopt_effect = { + CHILD = scope:heir3 + ADOPTER = root + } + + stress_impact = { + base = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 #Prefer the cool one + } + } +} + +#Passing over things +ep3_story_cycle_violet_poet.0004 = { + type = character_event + title = ep3_story_cycle_violet_poet.0004.t + desc = ep3_story_cycle_violet_poet.0004.desc + theme = violet_poet + left_portrait = { + character = root + animation = grief + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + trigger = { + has_ep3_dlc_trigger = yes + } + + immediate = { + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Pass over things + name = ep3_story_cycle_violet_poet.0004.a + + add_trait = violet_poet + + hidden_effect = { #To avoid redundancy + if = { + limit = { + has_trait = lifestyle_poet + } + remove_trait = lifestyle_poet + } + + ###Give them XP in the trait based off a few factors + #If they're, you know, living up to her standards + if = { + limit = { + any_memory = { + memory_type = had_sex + count > 4 + } + } + add_trait_xp = { + trait = violet_poet + value = { 4 8 } + } + } + #If they're bi + if = { + limit = { + has_sexuality = bisexual + } + add_trait_xp = { + trait = violet_poet + value = { 6 10 } + } + } + #If they're not tied down + if = { + limit = { + is_married = no + } + add_trait_xp = { + trait = violet_poet + value = { 2 4 } + } + } + } + + ai_chance = { + base = 100 + } + } +} + +## Maintenance events for Write Muwashshah Poem +# Sell Poem +ep3_story_cycle_violet_poet.0010 = { + hidden = yes + + immediate = { + send_interface_message = { + type = event_title_good + title = ep3_story_cycle_violet_poet.0010.title + left_icon = root + + if = { + limit = { + has_character_modifier = ep3_quality_control_modifier + } + add_gold = { medium_gold_laamps_value major_gold_laamps_value } + } + else = { + add_gold = { minor_gold_laamps_value medium_gold_laamps_value } + } + } + } +} + +# Keep Poem +ep3_story_cycle_violet_poet.0011 = { + hidden = yes + + immediate = { + if = { + limit = { + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + send_interface_message = { + type = msg_poem_kept + title = ep3_story_cycle_violet_poet.0011.title + desc = ep3_story_cycle_violet_poet.0011.message + left_icon = root + right_icon = scope:double_moon_book + + add_randomised_double_moon_modifier_effect = yes + } + } +} + +# Distribute Poem +ep3_story_cycle_violet_poet.0012 = { + hidden = yes + + immediate = { + send_interface_message = { + type = event_title_good + title = ep3_story_cycle_violet_poet.0012.title + left_icon = root + + if = { + limit = { + has_character_modifier = ep3_focused_on_studies_modifier + } + add_prestige = { minor_prestige_gain medium_prestige_gain } + } + else = { + add_prestige = { minor_prestige_gain major_prestige_gain } + } + } + } +} + +################################################## +# Violet poet Events +# by Nick Meredith & Eilidh MacRuaidhri +################################################## + +# Nature's Bounty +# Travel event +ep3_story_cycle_violet_poet.1000 = { + type = character_event + title = ep3_story_cycle_violet_poet.1000.t + desc = ep3_story_cycle_violet_poet.1000.desc + theme = travel + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = thinking + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + is_landless_ruler = yes + is_available_travelling = yes + has_trait = violet_poet + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + province:1995 = { save_scope_as = cordoba } # b_cordoba + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Write a poem + name = ep3_story_cycle_violet_poet.1000.a + + add_learning_lifestyle_xp = minor_lifestyle_experience + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1000.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_independent_ruler_opinion_2_modifier + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + content = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + option = { #Forage for wild plants + name = ep3_story_cycle_violet_poet.1000.b + + add_character_modifier = { + modifier = ep3_foraged_plants + years = 10 + } + + if = { + limit = { + NOT = { + has_trait = lifestyle_herbalist + } + } + random = { + chance = 30 + add_trait = lifestyle_herbalist + } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + brave = miniscule_stress_impact_loss + craven = miniscule_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# A Fine Apprentice +ep3_story_cycle_violet_poet.1005 = { + type = character_event + title = ep3_story_cycle_violet_poet.1005.t + desc = ep3_story_cycle_violet_poet.1005.desc + theme = violet_poet + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = eavesdrop + } + right_portrait = { + character = scope:child + animation = throne_room_conversation_1 + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + hidden_effect = { + create_character = { + template = peasant_child_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 100 + learning = 14 + diplomacy = 16 + age = { 12 14 } + location = root.location + save_scope_as = child + } + } + } + + option = { #Take them in + name = ep3_story_cycle_violet_poet.1005.a + + flavor = ep3_story_cycle_violet_poet.1005.a.tt + + remove_short_term_gold = minor_gold_value + + add_courtier = scope:child + + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 1 + } + } + } + + option = { #Write a poem about it + name = ep3_story_cycle_violet_poet.1005.b + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1005.b.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_child_opinion_2_modifier + } + } + + hidden_effect = { + scope:child = { + move_to_pool = yes + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_loss + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 1 + } + } + } + + option = { #Pay for their tuition + name = ep3_story_cycle_violet_poet.1005.c + + flavor = ep3_story_cycle_violet_poet.1005.c.tt + + remove_short_term_gold = medium_gold_value + + add_character_modifier = { + modifier = ep3_tuition_paid + years = 10 + } + + hidden_effect = { + scope:child = { + move_to_pool = yes + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +# The Romance of Poetry +ep3_story_cycle_violet_poet.1010 = { + type = character_event + title = ep3_story_cycle_violet_poet.1010.t + desc = ep3_story_cycle_violet_poet.1010.desc + theme = violet_poet + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:ruler_spouse + animation = admiration + } + lower_center_portrait = { + character = scope:ruler + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + location.barony.holder = { + any_spouse = { + is_attracted_to_gender_of = root + } + } + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + location.barony.holder = { + random_spouse = { + limit = { + is_attracted_to_gender_of = root + } + save_scope_as = ruler_spouse + } + save_scope_as = ruler + } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Offer 'private poetry reading' + name = ep3_story_cycle_violet_poet.1010.a + + duel = { + skill = intrigue + value = decent_skill_rating + + 50 = { #She's down + desc = ep3_story_cycle_violet_poet.1010.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + attraction >= low_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= medium_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= high_positive_attraction + factor = 1.2 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1010.a.success + left_icon = root + right_icon = scope:ruler_spouse + + had_sex_with_effect = { + CHARACTER = scope:ruler_spouse + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + + 50 = { #She ain't down + desc = ep3_story_cycle_violet_poet.1010.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1010.a.failure + left_icon = root + right_icon = scope:ruler_spouse + + add_stress = medium_stress_gain + + reverse_add_opinion = { + target = scope:ruler + modifier = suspicious_opinion + opinion = -5 + } + } + } + } + + stress_impact = { + lustful = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + seducer = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { #Write about it + name = ep3_story_cycle_violet_poet.1010.b + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1010.b.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_seduce_scheme_phase_duration_add_2_modifier + } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + base = miniscule_stress_impact_loss + shy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_sociability = -1 + } + } + } + + option = { #Start romance scheme + name = ep3_story_cycle_violet_poet.1010.c + + trigger = { + can_start_scheme = { + type = courting + target_character = scope:ruler_spouse + } + } + + start_scheme = { + type = courting + target_character = scope:ruler_spouse + } + + custom_tooltip = ep3_story_cycle_violet_poet.1010.c.tt + + hidden_effect = { + random_scheme = { + type = courting + limit = { + scheme_target_character = scope:ruler_spouse + } + add_scheme_modifier = { + type = extra_success_chance_modifier + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 1 + } + } + } +} + +# A Follower, Enamored +ep3_story_cycle_violet_poet.1015 = { + type = character_event + title = ep3_story_cycle_violet_poet.1015.t + desc = ep3_story_cycle_violet_poet.1015.desc + theme = violet_poet + override_background = { reference = bp1_bonfire } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:stranger + animation = admiration + } + + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + } + + immediate = { + location = { save_scope_as = location } + create_character = { + template = beautiful_peasant_character #Make 'em pretty, just for fun + age = { 30 70 } + gender_female_chance = root_attraction_based_female_chance + location = root.location + faith = root.faith + culture = root.culture + + after_creation = { + set_sexuality = bisexual #Screw it + } + + save_scope_as = stranger + } + } + + option = { #Dang, you sit with that ass? + name = ep3_story_cycle_violet_poet.1015.a + + trigger = { + has_trait = lustful + } + + duel = { + skill = intrigue + value = decent_skill_rating + + 50 = { #They're down + desc = ep3_story_cycle_violet_poet.1015.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + attraction >= low_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= medium_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= high_positive_attraction + factor = 1.2 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1015.a.success + left_icon = root + right_icon = scope:stranger + + had_sex_with_effect = { + CHARACTER = scope:stranger + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + + 50 = { #They ain't down + desc = ep3_story_cycle_violet_poet.1015.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1015.a.failure + left_icon = root + right_icon = scope:stranger + + hidden_effect = { + scope:stranger = { + move_to_pool = yes + } + } + + add_stress = minor_stress_gain + } + } + } + + stress_impact = { + lustful = minor_stress_impact_loss + gregarious = miniscule_stress_impact_loss + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { #Offer them a place in your camp + name = ep3_story_cycle_violet_poet.1015.b + + reverse_add_opinion = { + target = scope:stranger + modifier = grateful_opinion + opinion = 35 + } + + add_courtier = scope:stranger + + if = { + limit = { + NOT = { + employs_court_position = travel_leader_court_position + } + } + court_position_grant_effect = { + CANDIDATE = scope:stranger + POS = travel_leader + EMPLOYER = root + } + } + + stress_impact = { + lustful = minor_stress_impact_gain + gregarious = miniscule_stress_impact_loss + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = 1 + } + } + } + + option = { #Take the compliment + name = ep3_story_cycle_violet_poet.1015.c + + add_character_modifier = { + modifier = ep3_from_far_and_wide + years = 10 + } + + scope:stranger = { + silent_disappearance_effect = yes + } + + stress_impact = { + base = minor_stress_impact_loss + humble = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_sociability = 1 + } + } + } +} + +# The Fog that Clouds All +ep3_story_cycle_violet_poet.1020 = { + type = character_event + title = ep3_story_cycle_violet_poet.1020.t + desc = ep3_story_cycle_violet_poet.1020.desc + theme = violet_poet + left_portrait = { + character = root + animation = stress + } + lower_right_portrait = { + trigger = { scope:poet = { is_alive = yes } } + character = scope:poet + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + if = { + limit = { + any_courtier = { + diplomacy > 20 + } + } + random_courtier = { + limit = { + diplomacy > 20 + } + save_scope_as = poet + } + } + } + + option = { #Ask another poet to help + name = ep3_story_cycle_violet_poet.1020.a + reason = skilled_follower + + trigger = { + custom_description = { + text = followers_over_diplomacy + any_courtier = { + diplomacy > 20 + } + } + } + show_as_unavailable = { + custom_description = { + text = followers_over_diplomacy + NOT = { + any_courtier = { + diplomacy > 20 + } + } + } + } + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1020.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_personal_scheme_phase_duration_add_2_modifier + } + } + + progress_towards_friend_effect = { + REASON = friend_helped_poetry + CHARACTER = scope:poet + OPINION = default_friend_opinion + } + + stress_impact = { + base = minor_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Try and persevere + name = ep3_story_cycle_violet_poet.1020.b + + duel = { + skill = learning + value = decent_skill_rating + + 50 = { #It works + desc = ep3_story_cycle_violet_poet.1020.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1020.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_personal_scheme_phase_duration_add_2_modifier + } + } + } + + 50 = { #She ain't down + desc = ep3_story_cycle_violet_poet.1020.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1020.b.failure + left_icon = root + + add_character_modifier = { + modifier = ep3_pushed_too_hard + years = 5 + } + } + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + diligent = miniscule_stress_impact_loss + ambitious = miniscule_stress_impact_loss + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + } + } + + option = { #Take a break and enjoy life + name = ep3_story_cycle_violet_poet.1020.c + + random_list = { + 10 = { #It works + desc = ep3_story_cycle_violet_poet.1020.c.success + modifier = { + trigger = { + has_trait = lazy + } + add = 5 + } + modifier = { + trigger = { + has_trait = content + } + add = 3 + } + modifier = { + trigger = { + has_trait = calm + } + add = 2 + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_violet_poet.1020.c.success + left_icon = root + + add_character_modifier = ep3_refreshed_and_relaxed + } + } + + 10 = { #Didn't work + desc = ep3_story_cycle_violet_poet.1020.c.failure + modifier = { + trigger = { + has_trait = diligent + } + add = 5 + } + modifier = { + trigger = { + has_trait = ambitious + } + add = 3 + } + modifier = { + trigger = { + has_trait = wrathful + } + add = 2 + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_story_cycle_violet_poet.1020.c.failure + left_icon = root + + add_stress = medium_stress_gain + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +scripted_effect save_the_orphans_effect = { + add_to_list = list_of_orphans + if = { + limit = { exists = scope:orphan3 } + save_scope_as = orphan4 + } + else_if = { + limit = { exists = scope:orphan2 } + save_scope_as = orphan3 + } + else = { save_scope_as = orphan2 } +} + +#Adopt orphans +ep3_story_cycle_violet_poet.1025 = { + type = character_event + title = ep3_story_cycle_violet_poet.1025.t + desc = ep3_story_cycle_violet_poet.1025.desc + theme = violet_poet + override_background = { reference = courtyard } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:orphan + animation = clutching_toy + } + lower_center_portrait = { + character = scope:orphan2 + } + lower_left_portrait = { + character = scope:orphan3 + } + lower_right_portrait = { + character = scope:orphan4 + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + } + + immediate = { + location = { save_scope_as = location } + scope:location.county.holder = { save_scope_as = holder } + # Orphan 1 + create_character = { + template = fp1_capital_county_orphan_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 100 #For protege purposes + location = root.location + save_scope_as = orphan + } + hidden_effect = { + scope:orphan = { + add_learning_skill = 5 #Make her an interesting choice + add_to_list = list_of_orphans + } + } + # Orphans 2-4 + ordered_pool_character = { + province = root.location + limit = { + age < 11 + location = root.location + is_lowborn = yes + NOT = { is_in_list = list_of_orphans } + } + order_by = age + max = 3 + check_range_bounds = no + save_the_orphans_effect = yes + } + while = { + limit = { + any_in_list = { + list = list_of_orphans + count < 4 + } + } + create_character = { + template = fp1_capital_county_orphan_character + culture = location.county.culture + faith = location.county.faith + gender_female_chance = 50 + location = root.location + save_scope_as = new_orphan + } + scope:new_orphan = { save_the_orphans_effect = yes } + } + } + + option = { #I'll take them all! + name = ep3_story_cycle_violet_poet.1025.a + + flavor = ep3_story_cycle_violet_poet.1025.a.tt + + remove_short_term_gold = major_gold_value + + add_courtier = scope:orphan + add_courtier = scope:orphan2 + add_courtier = scope:orphan3 + add_courtier = scope:orphan4 + + every_in_list = { + list = list_of_orphans + custom = 1025_every_orphan + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 35 + } + random = { + chance = 50 + add_trait = loyal + } + } + + add_character_modifier = { + modifier = ep3_friend_to_orphans + years = 30 + } + + stress_impact = { + generous = minor_stress_loss + compassionate = minor_stress_loss + greedy = medium_stress_gain + callous = medium_stress_gain + sadistic = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_greed = -1 + } + } + } + + option = { #Take the actually talented one lol + name = ep3_story_cycle_violet_poet.1025.b + + flavor = ep3_story_cycle_violet_poet.1025.b.tt + + remove_short_term_gold = minor_gold_value + + add_character_flag = one_orphan_taken_flag + + add_courtier = scope:orphan + + reverse_add_opinion = { + target = scope:orphan + modifier = grateful_opinion + opinion = 45 + } + + random = { + chance = 50 + send_interface_toast = { + type = event_toast_effect_good + title = ep3_story_cycle_violet_poet.1025.b.success + left_icon = root + right_icon = scope:orphan + scope:orphan = { + add_diplomacy_skill = { 1 3 } + } + } + } + + stress_impact = { + generous = medium_stress_gain + compassionate = medium_stress_gain + greedy = minor_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_greed = -0.5 + } + } + } + + option = { #Try to shame the local lord into paying + name = ep3_story_cycle_violet_poet.1025.c + + trigger = { + scope:holder = { + is_ai = yes + } + } + + flavor = ep3_story_cycle_violet_poet.1025.c.tt + + add_character_flag = no_orphans_taken_flag + + duel = { + skill = diplomacy + target = scope:holder + + 50 = { #He accepts + desc = ep3_story_cycle_violet_poet.1025.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + min = 10 + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1025.c.success + left_icon = root + right_icon = scope:holder + + scope:holder = { + remove_short_term_gold = minor_gold_value + } + + scope:location.county = { + add_county_modifier = { + modifier = ep3_healthy_orphanages_modifier + years = 20 + } + } + } + } + + 50 = { #He declines + desc = ep3_story_cycle_violet_poet.1025.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + min = 10 + send_interface_toast = { + title = ep3_story_cycle_violet_poet.1025.c.failure + left_icon = root + right_icon = scope:holder + + add_stress = medium_stress_gain + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + + after = { + if = { + limit = { + OR = { + has_character_flag = one_orphan_taken_flag + has_character_flag = no_orphans_taken_flag + } + } + every_in_list = { + list = list_of_orphans + limit = { + trigger_if = { + limit = { + root = { has_character_flag = one_orphan_taken_flag } + } + NOT = { scope:orphan ?= this } + } + } + silent_disappearance_effect = yes + } + } + remove_character_flag = one_orphan_taken_flag + remove_character_flag = no_orphans_taken_flag + } +} + +#Tutor a local noblewoman +ep3_story_cycle_violet_poet.1030 = { + type = character_event + title = ep3_story_cycle_violet_poet.1030.t + desc = ep3_story_cycle_violet_poet.1030.desc + theme = violet_poet + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:noblewoman + animation = ecstasy + } + lower_center_portrait = { + trigger = { scope:courtier_poet = { is_alive = yes} } + character = scope:courtier_poet + } + cooldown = { years = 30 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + location.county = { #Take the county you're in + any_neighboring_county = { #Now scope to a neighbouring county + holder = { #and their holder + OR = { + any_courtier_or_guest = { #and finally their noble courtiers/guests + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + any_close_family_member = { #in case there are none, take their family member + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + } + } + } + } + } + + immediate = { + location = { save_scope_as = location } + location.county.holder = { save_scope_as = holder } + location.county = { #Take the county you're in + random_neighboring_county = { #Now scope to a neighbouring county + limit = { + holder = { + OR = { + any_courtier_or_guest = { #and finally their noble courtiers/guests + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + any_close_family_member = { #in case there are none, take their family member + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + } + } + } + save_scope_as = neighbouring_county + holder = { #and their holder + if = { + limit = { + any_courtier_or_guest = { + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + } + random_courtier_or_guest = { #and finally their noble courtiers/guests + limit = { + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + save_scope_as = noblewoman + } + } + else = { + random_close_family_member = { #in case there are none, take their family member + limit = { + is_lowborn = no + is_available = yes + is_healthy = yes + is_female = yes + is_physically_able_ai_adult = yes + } + save_scope_as = noblewoman + } + } + } + } + } + if = { + limit = { + any_courtier = { + is_physically_able_ai_adult = yes + has_trait = lifestyle_poet + } + } + random_courtier = { + limit = { + is_physically_able_ai_adult = yes + has_trait = lifestyle_poet + } + save_scope_as = courtier_poet + } + } + } + + option = { #I'll do it! + name = ep3_story_cycle_violet_poet.1030.a + + scope:noblewoman = { + pay_short_term_gold = { + target = root + gold = major_gold_value + } + } + + add_character_modifier = { + modifier = ep3_tutoring_noblewoman_modifier + years = 5 + } + + reverse_add_opinion = { + target = scope:noblewoman + modifier = pleased_opinion + opinion = 25 + } + + stress_impact = { + compassionate = minor_stress_loss + greedy = minor_stress_loss + callous = medium_stress_gain + sadistic = medium_stress_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = 1 + } + } + } + + option = { #I cannot spare the time + name = ep3_story_cycle_violet_poet.1030.b + + add_character_modifier = { + modifier = ep3_focused_on_studies_modifier + years = 5 + } + + reverse_add_opinion = { + target = scope:noblewoman + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + compassionate = medium_stress_gain + greedy = medium_stress_gain + callous = minor_stress_loss + sadistic = minor_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + } + } + + option = { #Perhaps I can offer you a replacement? + name = ep3_story_cycle_violet_poet.1030.c + + trigger = { + exists = scope:courtier_poet + } + + flavor = ep3_story_cycle_violet_poet.1030.c.tt + + scope:noblewoman = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + pay_short_term_gold = { + target = scope:courtier_poet + gold = minor_gold_value + } + } + + reverse_add_opinion = { + target = scope:noblewoman + modifier = pleased_opinion + opinion = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +### Ibn Zaydun chain +# Whenever darkness falls +ep3_story_cycle_violet_poet.2000 = { + type = character_event + title = ep3_story_cycle_violet_poet.2000.t + desc = ep3_story_cycle_violet_poet.2000.desc + theme = violet_poet + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:zaydun + animation = love + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + cooldown = { years = 100 } + + trigger = { + has_ep3_dlc_trigger = yes + has_trait = violet_poet + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + } + + immediate = { + location = { save_scope_as = location } + character:andalusian_0004 = { + save_scope_as = zaydun + } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + scope:zaydun.location = { + save_scope_as = zaydun_original_location + } + } + + option = { #Perhaps I should write him a letter... + name = ep3_story_cycle_violet_poet.2000.a + + custom_tooltip = ep3_story_cycle_violet_poet.2000.a.tt + + trigger_event = { #Since Ibn Zaydun is AI, just fake the interaction + id = ep3_story_cycle_violet_poet.2001 + days = { 11 15 } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + lustful = miniscule_stress_impact_loss + chaste = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Write a poem in memory of a lost love + name = ep3_story_cycle_violet_poet.2000.b + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.2000.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_courting_scheme_phase_duration_add_3_modifier + } + } + + stress_impact = { + content = miniscule_stress_impact_loss + vengeful = miniscule_stress_impact_loss + forgiving = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = -1 + } + } + } + + option = { #The time has passed + name = ep3_story_cycle_violet_poet.2000.c + + add_character_modifier = { + modifier = ep3_star_crossed_modifier + years = 5 + } + + scope:zaydun = { + add_character_modifier = { + modifier = ep3_star_crossed_modifier + years = 5 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +ep3_story_cycle_violet_poet.2001 = { + type = letter_event + opening = ep3_story_cycle_violet_poet.2001.t + desc = ep3_story_cycle_violet_poet.2001.desc + sender = scope:zaydun + + trigger = { + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + } + + immediate = { + location = { save_scope_as = location } + character:andalusian_0004 = { + save_scope_as = zaydun + } + } + + option = { + name = ep3_story_cycle_violet_poet.2001.a + flavor = ep3_story_cycle_violet_poet.2001.a.flavor + custom_tooltip = ep3_story_cycle_violet_poet.2001.a.tt + + + hidden_effect = { + scope:zaydun = { + trigger_event = { + id = ep3_story_cycle_violet_poet.2002 + days = { 7 14 } + } + } + } + } + + option = { + name = ep3_story_cycle_violet_poet.2001.b + scope:zaydun = { + add_stress = major_stress_gain + } + } +} + +ep3_story_cycle_violet_poet.2002 = { + type = character_event + hidden = yes + + immediate = { + character:andalusian_0003 = { + add_courtier = scope:zaydun + trigger_event = ep3_story_cycle_violet_poet.2005 + } + } +} + +#He arrives +ep3_story_cycle_violet_poet.2005 = { + type = character_event + title = ep3_story_cycle_violet_poet.2005.t + desc = ep3_story_cycle_violet_poet.2005.desc + theme = love + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = love + } + right_portrait = { + character = scope:zaydun + animation = flirtation + } + + trigger = { + has_ep3_dlc_trigger = yes + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + } + + immediate = { + location = { save_scope_as = location } + character:andalusian_0004 = { + save_scope_as = zaydun + } + } + + option = { #It's him! + name = ep3_story_cycle_violet_poet.2005.a + + flavor = ep3_story_cycle_violet_poet.2005.a.tt + + add_character_modifier = { + modifier = ep3_reunited_modifier + years = 3 + } + + scope:zaydun = { + add_character_modifier = { + modifier = ep3_reunited_modifier + years = 3 + } + } + + stress_impact = { + lustful = minor_stress_impact_loss + chaste = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #How useful to me! + name = ep3_story_cycle_violet_poet.2005.b + + add_character_modifier = { + modifier = ep3_famous_connections_modifier + years = 5 + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = annoyed_opinion + opinion = -25 + } + + stress_impact = { + ambitious = minor_stress_impact_loss + content = medium_stress_impact_gain + lustful = minor_stress_impact_gain + chaste = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + after = { + trigger_event = { + id = ep3_story_cycle_violet_poet.2010 + days = { 12 18 } + } + } +} + +#He offers to collaborate on some poetry with you +ep3_story_cycle_violet_poet.2010 = { + type = character_event + title = ep3_story_cycle_violet_poet.2010.t + desc = ep3_story_cycle_violet_poet.2010.desc + theme = violet_poet + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:zaydun + animation = flirtation + } + artifact = { + target = scope:double_moon_book + position = lower_center_portrait + } + + trigger = { + has_ep3_dlc_trigger = yes + any_character_artifact = { + has_artifact_modifier = double_moon_modifier + } + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + } + + immediate = { + location = { save_scope_as = location } + random_character_artifact = { + limit = { + has_artifact_modifier = double_moon_modifier + } + save_scope_as = double_moon_book + } + } + + option = { #Agree + name = ep3_story_cycle_violet_poet.2010.a + + scope:double_moon_book = { + set_artifact_description = ep3_story_cycle_violet_poet.1020.a.book + custom_tooltip = ep3_story_cycle_violet_poet.book.tt + hidden_effect = { + add_artifact_modifier = artifact_learning_per_prestige_level_modifier + } + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = pleased_opinion + opinion = 10 + } + + stress_impact = { + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + } + } + } + + option = { #Disagree + name = ep3_story_cycle_violet_poet.2010.b + + add_character_modifier = { + modifier = ep3_quality_control_modifier + years = 10 + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + callous = minor_stress_impact_loss + vengeful = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + after = { + trigger_event = { + id = ep3_story_cycle_violet_poet.2015 + days = { 12 18 } + } + } +} + +#Ibn Zaydun is about to leave +ep3_story_cycle_violet_poet.2015 = { + type = character_event + title = ep3_story_cycle_violet_poet.2015.t + desc = ep3_story_cycle_violet_poet.2015.desc + theme = violet_poet + override_background = { reference = garden } + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:zaydun + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + has_ep3_dlc_trigger = yes + character:andalusian_0003 = this + character:andalusian_0004 = { #Ibn Zaydun + is_alive = yes + is_available_ai_adult = yes + } + } + + immediate = { + location = { save_scope_as = location } + + hidden_effect = { + random_dummy_gender_effect = yes + create_artifact_ring_effect = { + OWNER = scope:zaydun + SMITH = scope:dummy_gender + } + scope:newly_created_artifact = { + set_artifact_description = ep3_story_cycle_violet_poet.2015.artifact + set_artifact_rarity = famed + add_artifact_modifier = artifact_learn_language_scheme_phase_duration_add_2_modifier + add_artifact_modifier = artifact_health_gain_1_modifier + add_artifact_modifier = artifact_stress_gain_3_modifier + set_owner = root + } + } + } + + option = { #Beg him to stay + name = ep3_story_cycle_violet_poet.2015.a + + duel = { + skill = intrigue + value = decent_skill_rating + + 75 = { #He accepts + desc = ep3_story_cycle_violet_poet.2015.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + add = 5 + opinion = { + target = root + value >= 25 + } + } + modifier = { + add = 10 + opinion = { + target = root + value >= 45 + } + } + modifier = { + add = 15 + opinion = { + target = root + value >= 65 + } + } + + modifier = { + attraction >= low_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= medium_positive_attraction + factor = 1.2 + } + modifier = { + attraction >= high_positive_attraction + factor = 1.2 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.2015.a.success + left_icon = root + right_icon = scope:zaydun + + add_character_modifier = { + modifier = ep3_power_couple_modifier + } + + set_relation_lover = { + target = scope:zaydun + reason = lover_old_flame + } + + scope:zaydun = { + remove_trait = depressed_1 + } + + add_courtier = scope:zaydun + } + } + + 25 = { #He declines + desc = ep3_story_cycle_violet_poet.2015.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + + send_interface_toast = { + title = ep3_story_cycle_violet_poet.2015.a.failure + left_icon = root + right_icon = scope:zaydun + + scope:zaydun = { + start_travel_plan = { + destination = scope:zaydun_original_location + players_use_planner = no + return_trip = no + } + } + + add_stress = major_stress_gain + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } + + option = { #Wish him a fond farewell + name = ep3_story_cycle_violet_poet.2015.b + + flavor = ep3_story_cycle_violet_poet.2015.b.tt + + scope:zaydun = { + start_travel_plan = { + destination = scope:zaydun_original_location + players_use_planner = no + return_trip = no + } + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + callous = minor_stress_impact_loss + vengeful = miniscule_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + } + } + } + + option = { #Wish him an unfond farewell + name = ep3_story_cycle_violet_poet.2015.c + + scope:zaydun = { + start_travel_plan = { + destination = scope:zaydun_original_location + players_use_planner = no + return_trip = no + } + add_trait = reclusive + add_stress = major_stress_gain + } + + random = { + chance = 20 + send_interface_toast = { + title = ep3_story_cycle_violet_poet.2015.c.tt + left_icon = root + right_icon = scope:zaydun + + add_trait = contrite + } + } + + reverse_add_opinion = { + target = scope:zaydun + modifier = emotionally_devastated_opinion + opinion = -70 + } + + stress_impact = { + callous = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_travel_events_3.txt b/N3OW/events/dlc/ep3/ep3_travel_events_3.txt new file mode 100644 index 00000000..6a6a570a --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_travel_events_3.txt @@ -0,0 +1,1429 @@ +namespace = ep3_travel_events + +################################################## +# EP3 Travel Events +# by Jason Cantalini +# +# 3000 Waters of the Jordan +# 3001 The Cilician Gates +# 3002-3 Where Armenians Govern +# 3010 Anatolian Silence + +scripted_trigger ep3_travel_events_3000_enraptured_trigger = { + #every kind of personality which wouldn't mind or self-delude about the river being a bit icky + OR = { + has_trait = zealous + has_trait = stubborn + has_trait = trusting + has_trait = humble + has_trait = peasant_leader + } +} + +# You enter a province which your faith is syncretic with +ep3_travel_events.3000 = { + type = character_event + title = ep3_travel_events.3000.t + desc = { + desc = ep3_travel_events.3000.desc + first_valid = { + triggered_desc = { + trigger = { + religion = religion:judaism_religion + } + desc = ep3_travel_events.3000.israel + } + triggered_desc = { + trigger = { + religion = religion:islam_religion + } + desc = ep3_travel_events.3000.muslim + } + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + culture = { has_cultural_pillar = language_greek } + } + desc = ep3_travel_events.3000.greek_christian + } + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = ep3_travel_events.3000.christian + } + } + first_valid = { + triggered_desc = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = yes + } + desc = ep3_travel_events.3000.outro_rapture + } + desc = ep3_travel_events.3000.outro + } + + } + theme = travel + override_background = { + reference = wilderness_wetlands + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = yes + } + animation = wedding_happy_cry + } + triggered_animation = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = no + } + animation = disgust + } + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { nightgown } + } + } + cooldown = { years = 75 } + trigger = { + age >= 14 + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + OR = { + barony = title:b_maab + barony = title:b_jarash + barony = title:b_irbid + barony = title:b_zurra + barony = title:b_baniyas + barony = title:b_tiberias + barony = title:b_nablus + } + } + + NOT = { + has_trait = cynical + } + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:judaism_religion + religion = religion:islam_religion + } + } + immediate = { + hidden_effect_new_object = { + root = { + save_scope_as = owner + #Create fancy regalia + set_artifact_rarity_masterwork = yes + create_artifact = { + name = artifact_water_of_the_jordan + description = placeholder # Will be updated in the post-creation effects + creator = root + visuals = flask + type = miscellaneous + modifier = artifact_monthly_piety_gain_per_legitimacy_level_mult_3_modifier + modifier = artifact_legitimacy_gain_mult_3_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = newly_created_artifact_1 + history = { + type = created_before_history + } + } + scope:newly_created_artifact_1 = { + set_artifact_description = artifact_water_of_the_jordan_desc + } + } + } + } + # I'm here looking for holiness, cleanliness be damned! Taking some water with me + option = { + trigger = { + OR = { + has_trait = zealous + trigger_if = { + limit = { + involved_activity ?= { + has_activity_type = activity_pilgrimage + } + } + has_activity_intent = zealot_intent + } + } + } + name = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + text = ep3_travel_events.3000.a_christian + } + name = { + trigger = { + religion = religion:judaism_religion + } + text = ep3_travel_events.3000.a_jewish + } + name = { + trigger = { + religion = religion:islam_religion + } + text = ep3_travel_events.3000.a_muslim + } + show_as_tooltip = { + scope:newly_created_artifact_1 = { + set_owner = { + target = root + history = { type = created_before_history } + } + } + } + add_character_modifier = { + modifier = holy_water_mortal_stomach_modifier + years = 5 + } + + stress_impact = { + content = minor_stress_impact_gain + zealous = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = paranoid + } + } + } + } + # A cleansing rite! + option = { + name = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = yes + } + text = ep3_travel_events.3000.b_zealot + } + name = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = no + } + text = ep3_travel_events.3000.b + } + flavor = ep3_travel_events.3000.b.flavor + + add_piety = medium_piety_gain + add_stress = miniscule_stress_impact_loss + add_character_modifier = { + modifier = holy_water_mortal_stomach_modifier + years = 5 + } + stress_impact = { + honest = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + craven = miniscule_stress_impact_gain + arrogant = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = honest + has_trait = craven + has_trait = paranoid + } + } + } + } + # This doesn't taste good... I should take precautions + option = { + name = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = yes + } + text = ep3_travel_events.3000.c_zealot + } + name = { + trigger = { + ep3_travel_events_3000_enraptured_trigger = no + } + text = ep3_travel_events.3000.c + } + flavor = ep3_travel_events.3000.c_flavor + stress_impact = { + zealous = medium_stress_impact_gain + brave = miniscule_stress_impact_gain + stubborn = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = stubborn + has_trait = brave + has_trait = zealous + } + } + modifier = { + health <= poor_health + add = 100 + } + modifier = { + health <= dying_health + add = 100 + } + } + } +} + +scripted_trigger ep3_travel_events_3001_is_foe_trigger = { + #every kind of personality which wouldn't mind or self-delude about the river being a bit icky + OR = { + faith = { + faith_hostility_level = { + target = scope:lords_liege.faith + value >= faith_hostile_level + } + } + is_at_war_with = scope:lord_of_passes + liege ?= { + is_at_war_with = scope:lord_of_passes + } + top_liege ?= { + is_at_war_with = scope:lord_of_passes + } + scope:lord_of_passes = { + liege ?= { + is_at_war_with = root + } + } + scope:lord_of_passes = { + top_liege ?= { + is_at_war_with = root + } + } + } +} + +# You enter the Cilician Gates +ep3_travel_events.3001 = { + type = character_event + title = ep3_travel_events.3001.t + desc = { + desc = ep3_travel_events.3001.intro + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_greek } + ep3_travel_events_3001_is_foe_trigger = no + } + desc = ep3_travel_events.3001.greek + } + triggered_desc = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = no + } + desc = ep3_travel_events.3001.friend + } + triggered_desc = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = yes + knows_language = language_arabic + religion = religion:islam_religion + } + desc = ep3_travel_events.3001.islamic_arabic + } + desc = ep3_travel_events.3001.foe + } + first_valid = { + triggered_desc = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = no + } + desc = ep3_travel_events.3001.praise_outro + } + triggered_desc = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = yes + } + desc = ep3_travel_events.3001.distrust_outro + } + } + } + theme = travel + + override_background = { + reference = ep2_travel_settlement_mountains + } + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left + } + trigger = { + age >= 12 + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + barony = title:b_tyana + is_occupied = no + } + location.county.holder != root #If I own it then it does not make sense to visit it. + NOT = { has_character_flag = had_ep3_travel_events.3001 } + } + immediate = { + #Make sure the same person doesn't get this twice + add_character_flag = had_ep3_travel_events.3001 + location = { + save_scope_as = current_location + } + location.county.holder = { + save_scope_as = lord_of_passes + } + if = { + limit = { + exists = scope:lord_of_passes.top_liege + } + scope:lord_of_passes.top_liege = { + save_scope_as = lords_liege + } + } + else = { + scope:lord_of_passes = { + save_scope_as = lords_liege + } + } + show_as_tooltip = { + add_martial_lifestyle_xp = travel_medium_xp + } + } + # These are our defenders and I am proud + option = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = no + } + name = { + trigger = { + culture = { has_cultural_pillar = language_greek } + } + text = ep3_travel_events.3001.a_greek + } + name = { + trigger = { + NOT = { culture = { has_cultural_pillar = language_greek } } + } + text = ep3_travel_events.3001.a_non_greek + } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:lord_of_passes.faith + value < faith_hostile_level + } + } + NOT = { + is_at_war_with = scope:lord_of_passes + } + #Need to be in same realm + OR = { + liege ?= { + OR = { + AND = { + exists = scope:lord_of_passes.liege + this = scope:lord_of_passes.liege + } + this = scope:lord_of_passes + } + } + scope:lord_of_passes = { + is_vassal_of = root + } + } + culture = { has_cultural_pillar = language_greek } + } + add_opinion = { + target = scope:lord_of_passes + opinion = 10 + modifier = impressed_opinion + } + } + stress_impact = { + trusting = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + # These are our foes and it's ominous + option = { + trigger = { + ep3_travel_events_3001_is_foe_trigger = yes + } + name = ep3_travel_events.3001.b + add_character_modifier = { + modifier = haunted_by_hostile_troops_modifier + years = 1 + } + + stress_impact = { + paranoid = miniscule_stress_impact_gain + craven = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +scripted_trigger ep3_travel_events_3002_byzantine_root_trigger = { + culture = { + has_cultural_pillar = heritage_byzantine + OR = { + any_parent_culture_or_above = { this = culture:greek } + this = culture:greek + } + } +} + +# You visit the capital of a ruler who belongs to a neighboring culture +ep3_travel_events.3002 = { + type = character_event + title = ep3_travel_events.3002.t + desc = { + desc = ep3_travel_events.3002.intro + #One desc for admin, one for non-admins + first_valid = { + triggered_desc = { + trigger = { + scope:local_lord = { + government_allows = administrative + } + } + desc = ep3_travel_events.3002.admin + } + desc = ep3_travel_events.3002.non_admin + } + #Different descs for historic flavor + first_valid = { + #Armenian + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:armenian } + this = culture:armenian + } + } + } + desc = ep3_travel_events.3002.armenian + } + #Georgian + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:georgian } + this = culture:georgian + } + } + } + desc = ep3_travel_events.3002.georgian + } + #Bulgarian + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:bulgarian } + this = culture:bulgarian + } + } + } + desc = ep3_travel_events.3002.bulgarian + } + #Serbian + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:serbian } + this = culture:serbian + } + } + } + desc = ep3_travel_events.3002.serbian + } + #Latin + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + has_cultural_pillar = heritage_latin + } + } + desc = ep3_travel_events.3002.latin + } + #Vlach + triggered_desc = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + scope:local_lord.culture = { + OR = { + any_parent_culture_or_above = { this = culture:vlach } + this = culture:vlach + } + } + } + desc = ep3_travel_events.3002.vlach + } + desc = ep3_travel_events.3002.generic + } + } + theme = travel + + override_background = { + reference = holy_site_generic + } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_left + } + lower_right_portrait = { + character = scope:local_lord + } + trigger = { + #check root is an eligible travelling person + age >= 12 + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + government_allows = administrative + OR = { + NOT = { exists = top_liege } + top_liege.culture = { + this = root.culture + } + } + location.county.holder = { + highest_held_title_tier >= tier_duchy + culture = { + this != root.culture + } + faith = { + faith_hostility_level = { + target = root.faith + value <= faith_hostile_level + } + } + #shouldn't loath root + opinion = { + target = root + value >= -60 + } + NOR = { + #If I own it then it does not make sense to visit it. + this = root + AND = { + exists = root.liege + this = root.liege + } + AND = { + exists = root.top_liege + this = root.top_liege + } + } + #check that this is actually a neighbour + OR = { + #neighbour + any_neighboring_top_liege_realm_owner = { + this = root + } + #same realm + liege ?= root.liege + liege ?= root.top_liege + liege = root + #within de jure empire + OR = { + AND = { + exists = root.top_liege + root.top_liege.primary_title = { + any_de_jure_county = { + this = root.location.county + } + } + } + root.primary_title = { + any_de_jure_county = { + this = root.location.county + } + } + } + #Also the special named cultures for Byzantines + AND = { + root = { ep3_travel_events_3002_byzantine_root_trigger = yes } + culture = { + OR = { + has_cultural_pillar = heritage_latin + any_parent_culture_or_above = { this = culture:armenian } + this = culture:armenian + any_parent_culture_or_above = { this = culture:georgian } + this = culture:georgian + any_parent_culture_or_above = { this = culture:serbian } + this = culture:serbian + any_parent_culture_or_above = { this = culture:vlach } + this = culture:vlach + any_parent_culture_or_above = { this = culture:bulgarian } + this = culture:bulgarian + } + } + } + } + #The cultures should sorta like each other (more than just sharing a religion) + culture = { + OR = { + #exception for former romans + has_cultural_pillar = heritage_latin + cultural_acceptance = { + target = ROOT.culture + value >= 10 + } + } + } + save_temporary_scope_as = location_holder + } + location.county = { + this = scope:location_holder.capital_county + culture = { + this != root.culture + } + } + location = { + is_occupied = no + OR = { + is_county_capital = yes + any_neighboring_province = { + is_county_capital = yes + county = root.location.county + + } + } + } + } + + cooldown = { days = 30 } + + immediate = { + location.county.holder = { + save_scope_as = local_lord + } + location = { + save_scope_as = current_location + } + scope:local_lord.capital_county = { + save_scope_as = local_lord_capital + } + } + # This is an opportunity to represent the majesty of the empire + option = { + name = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = yes + } + text = ep3_travel_events.3002.a_byzantine + } + name = { + trigger = { + ep3_travel_events_3002_byzantine_root_trigger = no + } + text = ep3_travel_events.3002.a + } + flavor = ep3_travel_events.3002.a.flavor + + #I am an impressive imperial Greek!!!!! + duel = { + skill = diplomacy + target = scope:local_lord + 50 = { #The local lord is in awe + desc = ep3_travel_events.3002.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + OR = { + AND = { + highest_held_title_tier >= tier_empire + scope:local_lord = { highest_held_title_tier < tier_empire } + } + AND = { + highest_held_title_tier >= tier_kingdom + scope:local_lord = { highest_held_title_tier < tier_kingdom } + } + } + add = 25 + } + modifier = { + OR = { + AND = { + highest_held_title_tier >= tier_empire + scope:local_lord = { highest_held_title_tier = tier_empire } + } + AND = { + highest_held_title_tier >= tier_kingdom + scope:local_lord = { highest_held_title_tier = tier_kingdom } + } + } + add = 10 + } + + send_interface_toast = { + title = ep3_travel_events.3002.a_success + left_icon = root + right_icon = scope:local_lord + + add_prestige = minor_prestige_gain + if = { + limit = { + highest_held_title_tier >= tier_empire + scope:local_lord = { + NOR = { + top_liege = root + liege = root + } + } + } + custom_tooltip = impressive_visit_vassalization_acceptance_bonus + scope:local_lord = { + add_character_flag = cowed_increased_vassalization_acceptance + trigger_event = { + id = ep3_travel_events.3003 + years = 5 + } + } + } + else_if = { + #de jure integration bonus on vassal's land if in progress + limit = { + is_liege_or_above_of = scope:local_lord + scope:local_lord_capital = { + de_jure_drifting_towards = root.primary_title + } + } + scope:local_lord_capital = { + change_de_jure_drift_progress = { + target = scope:councillor_liege.primary_title + value = 10 + } + } + } + else = { + change_influence = minor_influence_gain + } + } + } + 50 = { #The local lord is irked + desc = ep3_travel_events.3002.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + prestige_level <= 1 + add = 10 + } + send_interface_toast = { + title = ep3_travel_events.3002.a_failure + left_icon = root + right_icon = scope:local_lord + if = { + limit = { + scope:local_lord = { + liege ?= root + } + } + scope:local_lord = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + } + #The relationship is less useful, might as well toss more opinion + else = { + scope:local_lord = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + if = { + limit = { + this = root.culture.culture_head + } + culture = { + change_cultural_acceptance = { + target = scope:local_lord.culture + value = minor_cultural_acceptance_loss + desc = cultural_acceptance_loss_insulted_by_visiting_emperor + } + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + shy = miniscule_stress_impact_gain + craven = miniscule_stress_impact_gain + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = shy + has_trait = craven + has_trait = compassionate + } + } + modifier = { + add = -50 + diplomacy < decent_skill_rating + } + modifier = { + add = -20 + prestige_level <= 1 + } + modifier = { + add = -20 + NOR = { + AND = { + highest_held_title_tier >= tier_empire + scope:local_lord = { highest_held_title_tier < tier_empire } + } + AND = { + highest_held_title_tier >= tier_kingdom + scope:local_lord = { highest_held_title_tier < tier_kingdom } + } + } + } + ai_value_modifier = { + ai_compassion = -1 + ai_boldness = 1 + } + } + } + + # I should visit their local places of worship + option = { + name = ep3_travel_events.3002.b + flavor = ep3_travel_events.3002.b.flavor + + add_piety = minor_piety_gain + if = { + limit = { + highest_held_title_tier >= tier_empire + scope:local_lord_capital.faith = { + this != root.faith + } + faith = { + NOT = { has_doctrine = doctrine_pluralism_pluralistic } + } + } + faith = { + change_fervor = { + value = -5 + desc = fervor_loss_emperor_pluralistic_act + } + } + } + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = miniscule_stress_impact_gain + gregarious = minor_stress_impact_gain + impatient = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = gregarious + has_trait = impatient + } + } + ai_value_modifier = { + ai_energy = -1 + ai_zeal = 1 + } + } + } + # I should pay tribute to our neighbours + option = { + name = { + trigger = { + scope:local_lord = { + NOR = { + liege ?= root.liege + liege ?= root.top_liege + liege = root + } + } + } + text = ep3_travel_events.3002.c_foreign + } + name = { + trigger = { + scope:local_lord = { + is_liege_or_above_of = root + } + } + text = ep3_travel_events.3002.c + } + if = { + limit = { + scope:local_lord = { + liege ?= root + } + } + scope:local_lord = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + } + #The relationship is less useful, might as well toss more opinion + else = { + scope:local_lord = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + } + + if = { + limit = { + this = root.culture.culture_head + } + root.culture = { + change_cultural_acceptance = { + target = scope:local_lord.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_gain_honored_by_visiting_emperor + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_gain + callous = miniscule_stress_impact_gain + sadistic = miniscule_stress_impact_gain + stubborn = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = callous + has_trait = sadistic + has_trait = stubborn + } + } + ai_value_modifier = { + ai_energy = -1 + ai_zeal = 1 + } + } + } +} + +#follow up event that removes vassalization acceptance effect from the local lord +ep3_travel_events.3003 = { + hidden = yes + trigger = { + is_alive = yes + } + immediate = { + remove_character_flag = cowed_increased_vassalization_acceptance + } +} + +scripted_trigger ep3_travel_events_3010_anatolian_native_trigger = { + OR = { + has_cultural_pillar = heritage_byzantine + AND = { + has_cultural_pillar = heritage_caucasian + any_parent_culture_or_above = { this = culture:armenian } + this = culture:armenian + } + } + OR = { + any_parent_culture_or_above = { this = culture:greek } + this = culture:greek + any_parent_culture_or_above = { this = culture:armenian } + this = culture:armenian + } +} + + +#you arrive in a low control anatolian province and the locals hide, mistaking you for tax-collectors/raiders +ep3_travel_events.3010 = { + type = character_event + title = ep3_travel_events.3010.t + desc = { + desc = ep3_travel_events.3010 + #Alternate loc if you're in the fairy tower county + first_valid = { + triggered_desc = { + trigger = { + location = { + barony = title:b_kaisereia + } + } + desc = ep3_travel_events.3010.fairy_towers + } + desc = ep3_travel_events.3010.normal_holes + } + #Alternate desc for fellow Greeks/Armenians + first_valid = { + triggered_desc = { + trigger = { + culture = { ep3_travel_events_3010_anatolian_native_trigger = yes } + } + desc = ep3_travel_events.3010.native_knowledge + } + desc = ep3_travel_events.3010.foreigners + } + } + theme = travel + + override_background = { + reference = terrain_travel + } + left_portrait = { + character = root + animation = eyeroll + } + right_portrait = { + character = scope:hornblower + animation = hunting_horn + } + trigger = { + #check root is an eligible travelling person + age >= 6 + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + #check local people are greeks, armenians or products thereof + culture = { + ep3_travel_events_3010_anatolian_native_trigger = yes + } + county_control <= 90 + duchy = { + OR = { + this = title:d_anatolia + this = title:d_cappadocia + this = title:d_charsianon + this = title:d_sebasteia + this = title:d_mesopotamia + this = title:d_diyarbakr + this = title:d_vaspurakan + this = title:d_cilicia + this = title:d_cibyrrhaeot + this = title:d_edessa + } + } + holder = { + is_ai = yes + } + } + } + } + + cooldown = { days = 60 } + + immediate = { + location.county.holder = { + save_scope_as = local_lord + } + location = { + save_scope_as = current_location + } + if = { + limit = { + current_travel_plan ?= { + any_entourage_character = { + age >= 10 + } + } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { + age >= 10 + } + save_scope_as = hornblower + } + } + } + create_character = { + template = anatolian_guide_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + dynasty = none + save_scope_as = anatolian_guide + } + } + #Well... let's see what's left for the taking these empty houses + option = { + name = ep3_travel_events.3010.a + flavor = ep3_travel_events.3010.a.flavor + + random_list = { + 10 = { + send_interface_toast = { + title = ep3_travel_events.3010.a_success + left_icon = root + add_gold = minor_gold_value + } + } + 10 = { + send_interface_toast = { + title = ep3_travel_events.3010.a_failure + left_icon = root + } + } + } + location.county = { + change_development_progress = minimal_development_progress_loss + change_county_control = miniscule_county_control_loss + } + stress_impact = { + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = just + has_trait = compassionate + has_trait = generous + } + } + ai_value_modifier = { + ai_compassion = -1 + ai_greed = 1 + ai_honor = -1 + } + } + } + #Convince them to come out and get a local guide + option = { + name = ep3_travel_events.3010.b + flavor = ep3_travel_events.3010.b.flavor + + + duel = { + skill = diplomacy + value = decent_skill_rating + 60 = { #The locals come out + desc = ep3_travel_events.3010.b_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + location.county.holder = { + OR = { + this = root + any_liege_or_above = { + this = root + } + } + } + add = 25 + } + + send_interface_toast = { + title = ep3_travel_events.3010.b_success + left_icon = root + + add_diplomacy_lifestyle_xp = miniscule_lifestyle_xp + current_travel_plan = { + add_companion = scope:anatolian_guide + } + add_character_modifier = { + modifier = ep3_guide_from_the_borderlands_modifier + years = 1 + } + if = { + limit = { + NOT = { scope:anatolian_guide = { is_courtier_of = root } } + } + add_courtier = scope:anatolian_guide + } + } + } + 40 = { #The locals ignore you + desc = ep3_travel_events.3010.b_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = ep3_travel_events.3010.b_failure + left_icon = root + add_stress = miniscule_stress_impact_gain + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + diplomacy < decent_skill_rating + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = arrogant + has_trait = content + } + } + ai_value_modifier = { + ai_sociability = 1 + } + } + } + #Let's just appreciate the quiet, no commoners bustling around (and beauty of the fairy towers) + option = { + name = { + trigger = { + location = { + barony = title:b_kaisereia + } + } + text = ep3_travel_events.3010.c_fairy_towers + } + name = { + trigger = { + NOT = { + location = { + barony = title:b_kaisereia + } + } + } + text = ep3_travel_events.3010.c + } + flavor = ep3_travel_events.3010.c.flavor + + if = { + limit = { + location = { + barony = title:b_kaisereia + } + } + stress_impact = { + base = minor_stress_impact_loss + impatient = minor_stress_impact_gain + stubborn = miniscule_stress_impact_gain + vengeful = miniscule_stress_impact_gain + wrathful = minor_stress_impact_gain + } + } + else = { + stress_impact = { + base = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + stubborn = miniscule_stress_impact_gain + vengeful = miniscule_stress_impact_gain + wrathful = minor_stress_impact_gain + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = stubborn + has_trait = wrathful + has_trait = vengeful + } + } + ai_value_modifier = { + ai_vengefulness = -1 + ai_energy = -1 + } + } + } + after = { + if = { + limit = { + is_ai = yes + } + scope:anatolian_guide = { silent_disappearance_effect = yes } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_travel_events_8.txt b/N3OW/events/dlc/ep3/ep3_travel_events_8.txt new file mode 100644 index 00000000..08d79416 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_travel_events_8.txt @@ -0,0 +1,528 @@ +namespace = ep3_travel_events + +################################################## +# EP3 Travel Events +# by James Beaumont +# +# 8000-8009 To Belong Somewhere + +scripted_trigger ep3_travel_8000_valid_prince = { + is_courtier_of = $PARENT$ + is_adult = yes + age <= 25 + is_married = no + could_marry_character_trigger = { CHARACTER = $CHILD$ } + save_temporary_scope_as = temp_prospective_prince + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:temp_prospective_prince + CHARACTER_2 = $CHILD$ + } + trait_compatibility = { + target = $CHILD$ + value >= medium_positive_trait_compatibility + } +} + +scripted_effect ep3_travel_8000_a = { + scope:prince_parent = { add_courtier = scope:romantic_child } + marry_on_realm_law = { + SPOUSE_1 = scope:prospective_prince + SPOUSE_2 = scope:romantic_child + } +} + +# To Belong Somewhere +# Young adult child falls in love and wants to stop travelling with you +ep3_travel_events.8000 = { + type = character_event + title = ep3_travel_events.8000.t + desc = { + desc = ep3_travel_events.8000.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:romantic_child = { + ai_boldness >= medium_positive_ai_value + } + } + desc = ep3_travel_events.8000.desc.mid2.bold_child + } + desc = ep3_travel_events.8000.desc.mid2.timid_child + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_relation_rival = scope:romantic_child + opinion = { + target = scope:romantic_child + value = low_negative_opinion + } + } + } + desc = ep3_travel_events.8000.outro.dislikes_child + } + desc = ep3_travel_events.8000.outro + } + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = family_first + has_trait = diligent + has_trait = stubborn + } + } + animation = anger + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = gallant + } + } + animation = wedding_happy_cry + } + animation = worry + } + right_portrait = { + character = scope:romantic_child + triggered_animation = { + trigger = { + ai_boldness >= medium_positive_ai_value + } + animation = beg + } + triggered_animation = { + trigger = { + ai_boldness < medium_positive_ai_value + } + animation = sadness + } + } + lower_right_portrait = { + character = scope:prospective_prince + } + cooldown = { years = 75 } + trigger = { + has_government = landless_adventurer_government + is_available_travelling = yes + is_location_valid_for_travel_event_on_land = yes + root.location.county.holder = { save_temporary_scope_as = temp_prince_parent } + any_child = { + is_courtier_of = root + is_adult = yes + age <= 25 # An adult but still young + save_temporary_scope_as = temp_child + scope:temp_prince_parent = { + any_child = { + ep3_travel_8000_valid_prince = { + PARENT = scope:temp_prince_parent + CHILD = scope:temp_child + } + } + } + } + } + immediate = { + save_scope_as = laamp + location = { + save_scope_as = location + county.holder = { save_scope_as = prince_parent } + } + random_child = { + limit = { + is_courtier_of = root + is_adult = yes + age <= 25 + save_temporary_scope_as = temp_child + scope:prince_parent = { + any_child = { + ep3_travel_8000_valid_prince = { + PARENT = scope:prince_parent + CHILD = scope:temp_child + } + } + } + } + save_scope_as = romantic_child + scope:prince_parent = { + random_child = { + limit = { + ep3_travel_8000_valid_prince = { + PARENT = scope:prince_parent + CHILD = scope:romantic_child + } + } + save_scope_as = prospective_prince + } + } + } + scope:romantic_child = { + set_relation_soulmate = { + target = scope:prospective_prince + reason = soulmate_laamp_adventure + } + } + } + # Goodbye Susan + option = { + name = ep3_travel_events.8000.a + show_as_tooltip = { + ep3_travel_8000_a = yes + } + hidden_effect = { + scope:prince_parent = { + trigger_event = { + id = ep3_travel_events.8001 + days = 1 + } + } + } + scope:romantic_child = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 50 + REASON = friend_let_me_go + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + family_first = minor_stress_impact_gain + diligent = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + content = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1.5 + ai_compassion = 1.5 + } + } + } + # Convince the young prince/princess to come with you! + option = { + name = ep3_travel_events.8000.b + trigger = { + scope:prince_parent = { is_ai = yes } + has_trait = eccentric + } + add_courtier = scope:prospective_prince + marry_spouse_1_dominant = { + SPOUSE_1 = scope:romantic_child + SPOUSE_2 = scope:prospective_prince + } + scope:prince_parent = { + progress_towards_rival_effect = { + CHARACTER = root + OPINION = -50 + REASON = rival_laamp_stole_my_child + } + } + scope:romantic_child = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = 50 + REASON = friend_let_me_go + } + } + stress_impact = { + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + gallant = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1.5 + ai_vengefulness = 1.5 + ai_compassion = 1.5 + } + } + } + # Come along now child + option = { + name = ep3_travel_events.8000.c + if = { + limit = { + scope:romantic_child = { + ai_boldness >= medium_positive_ai_value + } + } + reverse_add_opinion = { + target = scope:romantic_child + modifier = hate_opinion + opinion = -25 + } + } + else = { + reverse_add_opinion = { + target = scope:romantic_child + modifier = disappointed_opinion + opinion = -10 + } + } + stress_impact = { + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + gallant = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1.5 + ai_vengefulness = 1.5 + ai_compassion = -1.5 + } + } + } +} + +# Roots of My Own +# Holder response +ep3_travel_events.8001 = { + type = character_event + title = ep3_travel_events.8001.t + desc = ep3_travel_events.8001.desc + theme = family + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = family_first + has_trait = diligent + has_trait = stubborn + } + } + animation = anger + } + triggered_animation = { + trigger = { + OR = { + has_trait = compassionate + has_trait = gallant + } + } + animation = wedding_happy_cry + } + animation = worry + } + right_portrait = { + character = scope:prospective_prince + animation = beg + } + lower_right_portrait = { + character = scope:romantic_child + } + immediate = { + show_as_tooltip = { + scope:romantic_child = { + set_relation_soulmate = { + target = scope:prospective_prince + reason = soulmate_laamp_adventure + } + } + } + } + # A fine match! + option = { + name = ep3_travel_events.8001.a + ep3_travel_8000_a = yes + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + family_first = minor_stress_impact_gain + diligent = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + content = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1.5 + ai_compassion = 1.5 + } + } + } + # I forbid this wedding! + option = { + name = ep3_travel_events.8001.b + if = { + limit = { + scope:prospective_prince = { + ai_boldness >= medium_positive_ai_value + } + } + reverse_add_opinion = { + target = scope:prospective_prince + modifier = hate_opinion + opinion = -25 + } + } + else = { + reverse_add_opinion = { + target = scope:prospective_prince + modifier = disappointed_opinion + opinion = -10 + } + } + hidden_effect = { + scope:laamp = { + trigger_event = { + id = ep3_travel_events.8002 + days = 1 + } + } + } + stress_impact = { + content = minor_stress_impact_gain + honest = minor_stress_impact_gain + gallant = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1.5 + ai_vengefulness = 1.5 + ai_compassion = -1.5 + } + } + } +} + +# In Another Time +# Laamp notification +ep3_travel_events.8002 = { + type = character_event + title = ep3_travel_events.8002.t + desc = ep3_travel_events.8002.desc + theme = family + left_portrait = { + character = root + animation = disappointed + } + right_portrait = { + character = scope:romantic_child + animation = grief + } + # I'm sorry my dear + option = { + name = ep3_travel_events.8002.a + reverse_add_opinion = { + target = scope:romantic_child + modifier = love_opinion + opinion = 25 + } + } +} + +# Won't Be Missed +# Do some graverobbing? +ep3_travel_events.8010 = { + type = character_event + title = ep3_travel_events.8010.t + desc = ep3_travel_events.8010.desc + theme = travel + left_portrait = { + character = root + animation = survey + } + override_background = { reference = ce1_catacombs } + cooldown = { years = 15 } + trigger = { + is_landless_ruler = yes + is_available_travelling = yes + location = { has_holding = no } + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + location = { save_scope_as = location } + } + # Oh boy, goodies! + option = { + name = ep3_travel_events.8010.a + duel = { + skill = intrigue + value = medium_skill_rating + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + send_interface_toast = { + title = ep3_travel_events.8010.a.win + left_icon = root + add_gold = medium_gold_value + } + } + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + send_interface_toast = { + title = ep3_travel_events.8010.a.lose + left_icon = root + reverse_add_opinion = { + target = location.county.holder + modifier = graverobber_opinion + years = 20 + } + } + } + } + stress_impact = { + eccentric = medium_stress_impact_gain + lazy = minor_stress_impact_gain + ambitious = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1.5 + ai_rationality = 1.5 + ai_greed = 1.5 + } + } + } + # I'm not risking that! + option = { + name = ep3_travel_events.8010.b + stress_impact = { + content = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + } + add_piety = miniscule_piety_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1.5 + ai_rationality = -1.5 + ai_greed = -1.5 + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_travel_option_events.txt b/N3OW/events/dlc/ep3/ep3_travel_option_events.txt new file mode 100644 index 00000000..4e487fde --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_travel_option_events.txt @@ -0,0 +1,4301 @@ +namespace = ep3_travel_option_events + +# Recruit Wanderer +ep3_travel_option_events.0001 = { + type = character_event + title = ep3_travel_option_events.0001.t + desc = { + desc = ep3_travel_option_events.0001.intro + first_valid = { # What they are + triggered_desc = { + trigger = { + exists = scope:court_physician_court_position + } + desc = ep3_travel_option_events.0001.court_physician_court_position + } + triggered_desc = { + trigger = { + exists = scope:bodyguard_court_position + } + desc = ep3_travel_option_events.0001.bodyguard_court_position + } + triggered_desc = { + trigger = { + exists = scope:travel_leader_court_position + } + desc = ep3_travel_option_events.0001.travel_leader_court_position + } + triggered_desc = { + trigger = { + exists = scope:second_camp_officer + } + desc = ep3_travel_option_events.0001.second_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:quartermaster_camp_officer + } + desc = ep3_travel_option_events.0001.quartermaster_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:armorer_camp_officer + } + desc = ep3_travel_option_events.0001.armorer_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:chief_forager_camp_officer + } + desc = ep3_travel_option_events.0001.chief_forager_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:master_thief_camp_officer + } + desc = ep3_travel_option_events.0001.master_thief_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:head_porter_camp_officer + } + desc = ep3_travel_option_events.0001.head_porter_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:head_groom_camp_officer + } + desc = ep3_travel_option_events.0001.head_groom_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:huntperson_camp_officer + } + desc = ep3_travel_option_events.0001.huntperson_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:kennelperson_camp_officer + } + desc = ep3_travel_option_events.0001.kennelperson_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:chief_engineer_camp_officer + } + desc = ep3_travel_option_events.0001.chief_engineer_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:witness_camp_officer + } + desc = ep3_travel_option_events.0001.witness_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:person_haggler_camp_officer + } + desc = ep3_travel_option_events.0001.person_haggler_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:camp_cook_camp_officer + } + desc = ep3_travel_option_events.0001.camp_cook_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:master_bard_camp_officer + } + desc = ep3_travel_option_events.0001.master_bard_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:stooge_camp_officer + } + desc = ep3_travel_option_events.0001.stooge_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:master_of_arms_camp_officer + } + desc = ep3_travel_option_events.0001.master_of_arms_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:light_cavalry_captain_camp_officer + } + desc = ep3_travel_option_events.0001.light_cavalry_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:camelry_captain_camp_officer + } + desc = ep3_travel_option_events.0001.camelry_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:elephantry_captain_camp_officer + } + desc = ep3_travel_option_events.0001.elephantry_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:heavy_cavalry_captain_camp_officer + } + desc = ep3_travel_option_events.0001.heavy_cavalry_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:horse_archer_captain_camp_officer + } + desc = ep3_travel_option_events.0001.horse_archer_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:archer_captain_camp_officer + } + desc = ep3_travel_option_events.0001.archer_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:heavy_infantry_captain_camp_officer + } + desc = ep3_travel_option_events.0001.heavy_infantry_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:light_infantry_captain_camp_officer + } + desc = ep3_travel_option_events.0001.light_infantry_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:pike_captain_camp_officer + } + desc = ep3_travel_option_events.0001.pike_captain_camp_officer + } + triggered_desc = { + trigger = { + exists = scope:master_of_spoils_camp_officer + } + desc = ep3_travel_option_events.0001.master_of_spoils_camp_officer + } + desc = ep3_travel_option_events.0001.fallback + } + first_valid = { # How good they are/salary expectations + triggered_desc = { + trigger = { + exists = scope:excellent_aptitude + } + desc = ep3_travel_option_events.0001.excellent + } + triggered_desc = { + trigger = { + exists = scope:good_aptitude + } + desc = ep3_travel_option_events.0001.good + } + triggered_desc = { + trigger = { + exists = scope:average_aptitude + } + desc = ep3_travel_option_events.0001.average + } + triggered_desc = { + trigger = { + exists = scope:poor_aptitude + } + desc = ep3_travel_option_events.0001.poor + } + desc = ep3_travel_option_events.0001.terrible + } + } + theme = travel + left_portrait = { + character = root + animation = steward + } + right_portrait = { + character = scope:local_character + triggered_animation = { + trigger = { + exists = scope:bodyguard_court_position + OR = { + exists = scope:excellent_aptitude + exists = scope:good_aptitude + exists = scope:average_aptitude + } + } + animation = hero_flex + } + triggered_animation = { + trigger = { + exists = scope:pike_captain_camp_officer + OR = { + exists = scope:excellent_aptitude + exists = scope:good_aptitude + exists = scope:average_aptitude + } + } + animation = celebrate_spear + } + triggered_animation = { + trigger = { + exists = scope:master_of_spoils_camp_officer + OR = { + exists = scope:excellent_aptitude + exists = scope:good_aptitude + exists = scope:average_aptitude + } + } + animation = spymaster + } + triggered_animation = { + trigger = { + OR = { + exists = scope:light_cavalry_captain_camp_officer + exists = scope:light_infantry_captain_camp_officer + exists = scope:heavy_infantry_captain_camp_officer + exists = scope:heavy_cavalry_captain_camp_officer + } + OR = { + exists = scope:excellent_aptitude + exists = scope:good_aptitude + exists = scope:average_aptitude + } + } + animation = marshal + } + triggered_animation = { + trigger = { + exists = scope:master_bard_camp_officer + } + animation = instrument_active + } + triggered_animation = { + trigger = { + exists = scope:stooge_camp_officer + } + animation = anger + } + triggered_animation = { + trigger = { + exists = scope:huntperson_camp_officer + } + animation = hunting_knife_start + } + triggered_animation = { + trigger = { + OR = { + exists = scope:archer_captain_camp_officer + exists = scope:horse_archer_captain_camp_officer + } + } + animation = hunting_longbow_aim_arrow_default + } + triggered_animation = { + trigger = { + exists = scope:master_thief_camp_officer + OR = { + exists = scope:excellent_aptitude + exists = scope:good_aptitude + exists = scope:average_aptitude + } + } + animation = scheme + } + triggered_animation = { + trigger = { + exists = scope:court_physician_court_position + OR = { + exists = scope:excellent_aptitude + exists = scope:good_aptitude + exists = scope:average_aptitude + } + } + animation = physician + } + triggered_animation = { + trigger = { + exists = scope:travel_leader_court_position + OR = { + exists = scope:excellent_aptitude + exists = scope:good_aptitude + exists = scope:average_aptitude + } + } + animation = survey + } + triggered_animation = { + trigger = { + exists = scope:excellent_aptitude + OR = { + exists = scope:excellent_aptitude + exists = scope:good_aptitude + } + } + animation = obsequious_bow + } + triggered_animation = { + trigger = { + OR = { + exists = scope:good_aptitude + exists = scope:average_aptitude + } + } + animation = debating + } + animation = beg + } + + trigger = { + NOT = { has_character_flag = had_talent_event } + has_government = landless_adventurer_government + any_pool_character = { + province = root.location + is_available_healthy_ai_adult = yes + NOR = { + has_character_flag = denied_recruitment + has_relation_rival = root + } + OR = { + AND = { + root = { can_employ_court_position_type = court_physician_court_position } + would_be_valid_for_court_position = { + court_position = court_physician_court_position + employer = root + } + } + AND = { + root = { can_employ_court_position_type = bodyguard_court_position } + would_be_valid_for_court_position = { + court_position = bodyguard_court_position + employer = root + } + } + AND = { + root = { can_employ_court_position_type = travel_leader_court_position } + would_be_valid_for_court_position = { + court_position = travel_leader_court_position + employer = root + } + } + AND = { + root = { can_employ_court_position_type = second_camp_officer } + would_be_valid_for_court_position = { + court_position = second_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = quartermaster_camp_officer } + would_be_valid_for_court_position = { + court_position = quartermaster_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = armorer_camp_officer } + would_be_valid_for_court_position = { + court_position = armorer_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = chief_forager_camp_officer } + would_be_valid_for_court_position = { + court_position = chief_forager_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = master_thief_camp_officer } + would_be_valid_for_court_position = { + court_position = master_thief_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = head_porter_camp_officer } + would_be_valid_for_court_position = { + court_position = head_porter_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = head_groom_camp_officer } + would_be_valid_for_court_position = { + court_position = head_groom_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = huntperson_camp_officer } + would_be_valid_for_court_position = { + court_position = huntperson_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = kennelperson_camp_officer } + would_be_valid_for_court_position = { + court_position = kennelperson_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = chief_engineer_camp_officer } + would_be_valid_for_court_position = { + court_position = chief_engineer_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = witness_camp_officer } + would_be_valid_for_court_position = { + court_position = witness_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = person_haggler_camp_officer } + would_be_valid_for_court_position = { + court_position = person_haggler_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = camp_cook_camp_officer } + would_be_valid_for_court_position = { + court_position = camp_cook_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = master_bard_camp_officer } + would_be_valid_for_court_position = { + court_position = master_bard_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = stooge_camp_officer } + would_be_valid_for_court_position = { + court_position = stooge_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = master_of_arms_camp_officer } + would_be_valid_for_court_position = { + court_position = master_of_arms_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = light_cavalry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = light_cavalry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = camelry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = camelry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = elephantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = elephantry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = heavy_cavalry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = heavy_cavalry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = horse_archer_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = horse_archer_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = archer_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = archer_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = heavy_infantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = heavy_infantry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = light_infantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = light_infantry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = pike_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = pike_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = master_of_spoils_camp_officer } + would_be_valid_for_court_position = { + court_position = master_of_spoils_camp_officer + employer = root + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 5 + domicile ?= { has_domicile_parameter = camp_better_scout_for_talent } + } + modifier = { + factor = 3 + any_courtier = { + count <= 3 + } + } + modifier = { + factor = 0.025 + NOT = { + any_pool_character = { + province = root.location + is_available_healthy_ai_adult = yes + NOR = { + has_character_flag = denied_recruitment + has_relation_rival = root + } + OR = { + AND = { + root = { can_employ_court_position_type = court_physician_court_position } + would_be_valid_for_court_position = { + court_position = court_physician_court_position + employer = root + } + aptitude:court_physician_court_position >= 2 + } + AND = { + root = { can_employ_court_position_type = bodyguard_court_position } + would_be_valid_for_court_position = { + court_position = bodyguard_court_position + employer = root + } + aptitude:bodyguard_court_position >= 2 + } + AND = { + root = { can_employ_court_position_type = travel_leader_court_position } + would_be_valid_for_court_position = { + court_position = travel_leader_court_position + employer = root + } + aptitude:travel_leader_court_position >= 2 + } + AND = { + root = { can_employ_court_position_type = second_camp_officer } + would_be_valid_for_court_position = { + court_position = second_camp_officer + employer = root + } + aptitude:second_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = quartermaster_camp_officer } + would_be_valid_for_court_position = { + court_position = quartermaster_camp_officer + employer = root + } + aptitude:quartermaster_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = armorer_camp_officer } + would_be_valid_for_court_position = { + court_position = armorer_camp_officer + employer = root + } + aptitude:armorer_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = chief_forager_camp_officer } + would_be_valid_for_court_position = { + court_position = chief_forager_camp_officer + employer = root + } + aptitude:chief_forager_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = master_thief_camp_officer } + would_be_valid_for_court_position = { + court_position = master_thief_camp_officer + employer = root + } + aptitude:master_thief_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = head_porter_camp_officer } + would_be_valid_for_court_position = { + court_position = head_porter_camp_officer + employer = root + } + aptitude:head_porter_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = head_groom_camp_officer } + would_be_valid_for_court_position = { + court_position = head_groom_camp_officer + employer = root + } + aptitude:head_groom_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = huntperson_camp_officer } + would_be_valid_for_court_position = { + court_position = huntperson_camp_officer + employer = root + } + aptitude:huntperson_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = kennelperson_camp_officer } + would_be_valid_for_court_position = { + court_position = kennelperson_camp_officer + employer = root + } + aptitude:kennelperson_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = chief_engineer_camp_officer } + would_be_valid_for_court_position = { + court_position = chief_engineer_camp_officer + employer = root + } + aptitude:chief_engineer_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = witness_camp_officer } + would_be_valid_for_court_position = { + court_position = witness_camp_officer + employer = root + } + aptitude:witness_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = person_haggler_camp_officer } + would_be_valid_for_court_position = { + court_position = person_haggler_camp_officer + employer = root + } + aptitude:person_haggler_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = camp_cook_camp_officer } + would_be_valid_for_court_position = { + court_position = camp_cook_camp_officer + employer = root + } + aptitude:camp_cook_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = master_bard_camp_officer } + would_be_valid_for_court_position = { + court_position = master_bard_camp_officer + employer = root + } + aptitude:master_bard_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = stooge_camp_officer } + would_be_valid_for_court_position = { + court_position = stooge_camp_officer + employer = root + } + aptitude:stooge_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = master_of_arms_camp_officer } + would_be_valid_for_court_position = { + court_position = master_of_arms_camp_officer + employer = root + } + aptitude:master_of_arms_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = light_cavalry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = light_cavalry_captain_camp_officer + employer = root + } + aptitude:light_cavalry_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = camelry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = camelry_captain_camp_officer + employer = root + } + aptitude:camelry_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = elephantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = elephantry_captain_camp_officer + employer = root + } + aptitude:elephantry_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = heavy_cavalry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = heavy_cavalry_captain_camp_officer + employer = root + } + aptitude:heavy_cavalry_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = horse_archer_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = horse_archer_captain_camp_officer + employer = root + } + aptitude:horse_archer_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = archer_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = archer_captain_camp_officer + employer = root + } + aptitude:archer_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = heavy_infantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = heavy_infantry_captain_camp_officer + employer = root + } + aptitude:heavy_infantry_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = light_infantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = light_infantry_captain_camp_officer + employer = root + } + aptitude:light_infantry_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = pike_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = pike_captain_camp_officer + employer = root + } + aptitude:pike_captain_camp_officer >= 2 + } + AND = { + root = { can_employ_court_position_type = master_of_spoils_camp_officer } + would_be_valid_for_court_position = { + court_position = master_of_spoils_camp_officer + employer = root + } + aptitude:master_of_spoils_camp_officer >= 2 + } + } + } + } + } + } + + immediate = { + location = { save_scope_as = location } + random_pool_character = { + province = root.location + limit = { + is_available_healthy_ai_adult = yes + NOR = { + has_relation_rival = root + has_character_flag = denied_recruitment + } + OR = { + AND = { + root = { can_employ_court_position_type = court_physician_court_position } + would_be_valid_for_court_position = { + court_position = court_physician_court_position + employer = root + } + } + AND = { + root = { can_employ_court_position_type = bodyguard_court_position } + would_be_valid_for_court_position = { + court_position = bodyguard_court_position + employer = root + } + } + AND = { + root = { can_employ_court_position_type = travel_leader_court_position } + would_be_valid_for_court_position = { + court_position = travel_leader_court_position + employer = root + } + } + AND = { + root = { can_employ_court_position_type = second_camp_officer } + would_be_valid_for_court_position = { + court_position = second_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = quartermaster_camp_officer } + would_be_valid_for_court_position = { + court_position = quartermaster_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = armorer_camp_officer } + would_be_valid_for_court_position = { + court_position = armorer_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = chief_forager_camp_officer } + would_be_valid_for_court_position = { + court_position = chief_forager_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = master_thief_camp_officer } + would_be_valid_for_court_position = { + court_position = master_thief_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = head_porter_camp_officer } + would_be_valid_for_court_position = { + court_position = head_porter_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = head_groom_camp_officer } + would_be_valid_for_court_position = { + court_position = head_groom_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = huntperson_camp_officer } + would_be_valid_for_court_position = { + court_position = huntperson_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = kennelperson_camp_officer } + would_be_valid_for_court_position = { + court_position = kennelperson_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = chief_engineer_camp_officer } + would_be_valid_for_court_position = { + court_position = chief_engineer_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = witness_camp_officer } + would_be_valid_for_court_position = { + court_position = witness_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = person_haggler_camp_officer } + would_be_valid_for_court_position = { + court_position = person_haggler_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = camp_cook_camp_officer } + would_be_valid_for_court_position = { + court_position = camp_cook_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = master_bard_camp_officer } + would_be_valid_for_court_position = { + court_position = master_bard_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = stooge_camp_officer } + would_be_valid_for_court_position = { + court_position = stooge_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = master_of_arms_camp_officer } + would_be_valid_for_court_position = { + court_position = master_of_arms_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = light_cavalry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = light_cavalry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = camelry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = camelry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = elephantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = elephantry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = heavy_cavalry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = heavy_cavalry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = horse_archer_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = horse_archer_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = archer_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = archer_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = heavy_infantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = heavy_infantry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = light_infantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = light_infantry_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = pike_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = pike_captain_camp_officer + employer = root + } + } + AND = { + root = { can_employ_court_position_type = master_of_spoils_camp_officer } + would_be_valid_for_court_position = { + court_position = master_of_spoils_camp_officer + employer = root + } + } + } + } + weight = { + base = 1 + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = court_physician_court_position } + court_physician_validity_trigger = { EMPLOYER = root } + aptitude:court_physician_court_position >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = court_physician_court_position } + court_physician_validity_trigger = { EMPLOYER = root } + aptitude:court_physician_court_position >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = bodyguard_court_position } + bodyguard_validity_trigger = { EMPLOYER = root } + aptitude:bodyguard_court_position >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = bodyguard_court_position } + bodyguard_validity_trigger = { EMPLOYER = root } + aptitude:bodyguard_court_position >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = travel_leader_court_position } + aptitude:travel_leader_court_position >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = travel_leader_court_position } + aptitude:travel_leader_court_position >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = second_camp_officer } + aptitude:second_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = second_camp_officer } + aptitude:second_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = quartermaster_camp_officer } + aptitude:quartermaster_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = quartermaster_camp_officer } + aptitude:quartermaster_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = armorer_camp_officer } + aptitude:armorer_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = armorer_camp_officer } + aptitude:armorer_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = chief_forager_camp_officer } + aptitude:chief_forager_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = chief_forager_camp_officer } + aptitude:chief_forager_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = master_thief_camp_officer } + aptitude:master_thief_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = master_thief_camp_officer } + aptitude:master_thief_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = head_porter_camp_officer } + aptitude:head_porter_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = head_porter_camp_officer } + aptitude:head_porter_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = head_groom_camp_officer } + aptitude:head_groom_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = head_groom_camp_officer } + aptitude:head_groom_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = huntperson_camp_officer } + aptitude:huntperson_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = huntperson_camp_officer } + aptitude:huntperson_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = kennelperson_camp_officer } + aptitude:kennelperson_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = kennelperson_camp_officer } + aptitude:kennelperson_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = chief_engineer_camp_officer } + aptitude:chief_engineer_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = chief_engineer_camp_officer } + aptitude:chief_engineer_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = witness_camp_officer } + aptitude:witness_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = witness_camp_officer } + aptitude:witness_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = person_haggler_camp_officer } + aptitude:person_haggler_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = person_haggler_camp_officer } + aptitude:person_haggler_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = camp_cook_camp_officer } + aptitude:camp_cook_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = camp_cook_camp_officer } + aptitude:camp_cook_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = master_bard_camp_officer } + aptitude:master_bard_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = master_bard_camp_officer } + aptitude:master_bard_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = stooge_camp_officer } + aptitude:stooge_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = stooge_camp_officer } + aptitude:stooge_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = master_of_arms_camp_officer } + aptitude:master_of_arms_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = master_of_arms_camp_officer } + aptitude:master_of_arms_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = light_cavalry_captain_camp_officer } + aptitude:light_cavalry_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = light_cavalry_captain_camp_officer } + aptitude:light_cavalry_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = camelry_captain_camp_officer } + aptitude:camelry_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = camelry_captain_camp_officer } + aptitude:camelry_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = elephantry_captain_camp_officer } + aptitude:elephantry_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = elephantry_captain_camp_officer } + aptitude:elephantry_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = heavy_cavalry_captain_camp_officer } + aptitude:heavy_cavalry_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = heavy_cavalry_captain_camp_officer } + aptitude:heavy_cavalry_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = horse_archer_captain_camp_officer } + aptitude:horse_archer_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = horse_archer_captain_camp_officer } + aptitude:horse_archer_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = archer_captain_camp_officer } + aptitude:archer_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = archer_captain_camp_officer } + aptitude:archer_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = heavy_infantry_captain_camp_officer } + aptitude:heavy_infantry_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = heavy_infantry_captain_camp_officer } + aptitude:heavy_infantry_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = light_infantry_captain_camp_officer } + aptitude:light_infantry_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = light_infantry_captain_camp_officer } + aptitude:light_infantry_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = pike_captain_camp_officer } + aptitude:pike_captain_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = pike_captain_camp_officer } + aptitude:pike_captain_camp_officer >= 3 + } + } + modifier = { + add = 10 + AND = { + root = { can_employ_court_position_type = master_of_spoils_camp_officer } + aptitude:master_of_spoils_camp_officer >= 4 + } + } + modifier = { + add = 5 + AND = { + root = { can_employ_court_position_type = master_of_spoils_camp_officer } + aptitude:master_of_spoils_camp_officer >= 3 + } + } + } + save_scope_as = local_character + assign_quirk_effect = yes + random_list = { + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = court_physician_court_position } + court_physician_validity_trigger = { EMPLOYER = root } + } + } + modifier = { + factor = 10 + aptitude:court_physician_court_position >= 4 + } + modifier = { + factor = 5 + aptitude:court_physician_court_position >= 3 + } + modifier = { + factor = 2 + aptitude:court_physician_court_position >= 2 + } + save_scope_as = court_physician_court_position + if = { + limit = { aptitude:court_physician_court_position >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:court_physician_court_position >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:court_physician_court_position >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:court_physician_court_position >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = bodyguard_court_position } + bodyguard_validity_trigger = { EMPLOYER = root } + } + } + modifier = { + factor = 10 + aptitude:bodyguard_court_position >= 4 + } + modifier = { + factor = 5 + aptitude:bodyguard_court_position >= 3 + } + modifier = { + factor = 2 + aptitude:bodyguard_court_position >= 2 + } + save_scope_as = bodyguard_court_position + if = { + limit = { aptitude:bodyguard_court_position >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:bodyguard_court_position >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:bodyguard_court_position >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:bodyguard_court_position >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = travel_leader_court_position } + travel_leader_validity_trigger = { EMPLOYER = root } + } + } + modifier = { + factor = 10 + aptitude:travel_leader_court_position >= 4 + } + modifier = { + factor = 5 + aptitude:travel_leader_court_position >= 3 + } + modifier = { + factor = 2 + aptitude:travel_leader_court_position >= 2 + } + save_scope_as = travel_leader_court_position + if = { + limit = { aptitude:travel_leader_court_position >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:travel_leader_court_position >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:travel_leader_court_position >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:travel_leader_court_position >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = second_camp_officer } + would_be_valid_for_court_position = { + court_position = second_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:second_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:second_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:second_camp_officer >= 2 + } + save_scope_as = second_camp_officer + if = { + limit = { aptitude:second_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:second_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:second_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:second_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = quartermaster_camp_officer } + would_be_valid_for_court_position = { + court_position = quartermaster_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:quartermaster_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:quartermaster_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:quartermaster_camp_officer >= 2 + } + save_scope_as = quartermaster_camp_officer + if = { + limit = { aptitude:quartermaster_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:quartermaster_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:quartermaster_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:quartermaster_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = armorer_camp_officer } + would_be_valid_for_court_position = { + court_position = armorer_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:armorer_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:armorer_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:armorer_camp_officer >= 2 + } + save_scope_as = armorer_camp_officer + if = { + limit = { aptitude:armorer_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:armorer_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:armorer_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:armorer_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = chief_forager_camp_officer } + would_be_valid_for_court_position = { + court_position = chief_forager_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:chief_forager_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:chief_forager_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:chief_forager_camp_officer >= 2 + } + save_scope_as = chief_forager_camp_officer + if = { + limit = { aptitude:chief_forager_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:chief_forager_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:chief_forager_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:chief_forager_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = master_thief_camp_officer } + would_be_valid_for_court_position = { + court_position = master_thief_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:master_thief_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:master_thief_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:master_thief_camp_officer >= 2 + } + save_scope_as = master_thief_camp_officer + if = { + limit = { aptitude:master_thief_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:master_thief_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:master_thief_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:master_thief_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = head_porter_camp_officer } + would_be_valid_for_court_position = { + court_position = head_porter_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:head_porter_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:head_porter_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:head_porter_camp_officer >= 2 + } + save_scope_as = head_porter_camp_officer + if = { + limit = { aptitude:head_porter_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:head_porter_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:head_porter_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:head_porter_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = head_groom_camp_officer } + would_be_valid_for_court_position = { + court_position = head_groom_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:head_groom_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:head_groom_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:head_groom_camp_officer >= 2 + } + save_scope_as = head_groom_camp_officer + if = { + limit = { aptitude:head_groom_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:head_groom_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:head_groom_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:head_groom_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = huntperson_camp_officer } + would_be_valid_for_court_position = { + court_position = huntperson_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:huntperson_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:huntperson_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:huntperson_camp_officer >= 2 + } + save_scope_as = huntperson_camp_officer + if = { + limit = { aptitude:huntperson_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:huntperson_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:huntperson_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:huntperson_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = kennelperson_camp_officer } + would_be_valid_for_court_position = { + court_position = kennelperson_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:kennelperson_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:kennelperson_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:kennelperson_camp_officer >= 2 + } + save_scope_as = kennelperson_camp_officer + if = { + limit = { aptitude:kennelperson_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:kennelperson_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:kennelperson_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:kennelperson_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = chief_engineer_camp_officer } + would_be_valid_for_court_position = { + court_position = chief_engineer_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:chief_engineer_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:chief_engineer_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:chief_engineer_camp_officer >= 2 + } + save_scope_as = chief_engineer_camp_officer + if = { + limit = { aptitude:chief_engineer_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:chief_engineer_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:chief_engineer_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:chief_engineer_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = witness_camp_officer } + would_be_valid_for_court_position = { + court_position = witness_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:witness_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:witness_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:witness_camp_officer >= 2 + } + save_scope_as = witness_camp_officer + if = { + limit = { aptitude:witness_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:witness_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:witness_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:witness_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = person_haggler_camp_officer } + would_be_valid_for_court_position = { + court_position = person_haggler_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:person_haggler_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:person_haggler_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:person_haggler_camp_officer >= 2 + } + save_scope_as = person_haggler_camp_officer + if = { + limit = { aptitude:person_haggler_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:person_haggler_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:person_haggler_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:person_haggler_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = camp_cook_camp_officer } + would_be_valid_for_court_position = { + court_position = camp_cook_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:camp_cook_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:camp_cook_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:camp_cook_camp_officer >= 2 + } + save_scope_as = camp_cook_camp_officer + if = { + limit = { aptitude:camp_cook_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:camp_cook_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:camp_cook_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:camp_cook_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = master_bard_camp_officer } + would_be_valid_for_court_position = { + court_position = master_bard_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:master_bard_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:master_bard_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:master_bard_camp_officer >= 2 + } + save_scope_as = master_bard_camp_officer + if = { + limit = { aptitude:master_bard_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:master_bard_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:master_bard_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:master_bard_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = stooge_camp_officer } + would_be_valid_for_court_position = { + court_position = stooge_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:stooge_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:stooge_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:stooge_camp_officer >= 2 + } + save_scope_as = stooge_camp_officer + if = { + limit = { aptitude:stooge_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:stooge_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:stooge_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:stooge_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = master_of_arms_camp_officer } + would_be_valid_for_court_position = { + court_position = master_of_arms_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:master_of_arms_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:master_of_arms_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:master_of_arms_camp_officer >= 2 + } + save_scope_as = master_of_arms_camp_officer + if = { + limit = { aptitude:master_of_arms_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:master_of_arms_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:master_of_arms_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:master_of_arms_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = light_cavalry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = light_cavalry_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:light_cavalry_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:light_cavalry_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:light_cavalry_captain_camp_officer >= 2 + } + save_scope_as = light_cavalry_captain_camp_officer + if = { + limit = { aptitude:light_cavalry_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:light_cavalry_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:light_cavalry_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:light_cavalry_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = camelry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = camelry_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:camelry_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:camelry_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:camelry_captain_camp_officer >= 2 + } + save_scope_as = camelry_captain_camp_officer + if = { + limit = { aptitude:camelry_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:camelry_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:camelry_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:camelry_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = elephantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = elephantry_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:elephantry_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:elephantry_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:elephantry_captain_camp_officer >= 2 + } + save_scope_as = elephantry_captain_camp_officer + if = { + limit = { aptitude:elephantry_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:elephantry_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:elephantry_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:elephantry_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = heavy_cavalry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = heavy_cavalry_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:heavy_cavalry_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:heavy_cavalry_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:heavy_cavalry_captain_camp_officer >= 2 + } + save_scope_as = heavy_cavalry_captain_camp_officer + if = { + limit = { aptitude:heavy_cavalry_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:heavy_cavalry_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:heavy_cavalry_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:heavy_cavalry_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = horse_archer_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = horse_archer_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:horse_archer_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:horse_archer_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:horse_archer_captain_camp_officer >= 2 + } + save_scope_as = horse_archer_captain_camp_officer + if = { + limit = { aptitude:horse_archer_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:horse_archer_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:horse_archer_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:horse_archer_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = archer_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = archer_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:archer_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:archer_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:archer_captain_camp_officer >= 2 + } + save_scope_as = archer_captain_camp_officer + if = { + limit = { aptitude:archer_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:archer_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:archer_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:archer_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = heavy_infantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = heavy_infantry_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:heavy_infantry_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:heavy_infantry_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:heavy_infantry_captain_camp_officer >= 2 + } + save_scope_as = heavy_infantry_captain_camp_officer + if = { + limit = { aptitude:heavy_infantry_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:heavy_infantry_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:heavy_infantry_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:heavy_infantry_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = light_infantry_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = light_infantry_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:light_infantry_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:light_infantry_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:light_infantry_captain_camp_officer >= 2 + } + save_scope_as = light_infantry_captain_camp_officer + if = { + limit = { aptitude:light_infantry_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:light_infantry_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:light_infantry_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:light_infantry_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = pike_captain_camp_officer } + would_be_valid_for_court_position = { + court_position = pike_captain_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:pike_captain_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:pike_captain_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:pike_captain_camp_officer >= 2 + } + save_scope_as = pike_captain_camp_officer + if = { + limit = { aptitude:pike_captain_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:pike_captain_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:pike_captain_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:pike_captain_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + 10 = { + trigger = { + AND = { + root = { can_employ_court_position_type = master_of_spoils_camp_officer } + would_be_valid_for_court_position = { + court_position = master_of_spoils_camp_officer + employer = root + } + } + } + modifier = { + factor = 10 + aptitude:master_of_spoils_camp_officer >= 4 + } + modifier = { + factor = 5 + aptitude:master_of_spoils_camp_officer >= 3 + } + modifier = { + factor = 2 + aptitude:master_of_spoils_camp_officer >= 2 + } + save_scope_as = master_of_spoils_camp_officer + if = { + limit = { aptitude:master_of_spoils_camp_officer >= 4 } + save_scope_as = excellent_aptitude + } + else_if = { + limit = { aptitude:master_of_spoils_camp_officer >= 3 } + save_scope_as = good_aptitude + } + else_if = { + limit = { aptitude:master_of_spoils_camp_officer >= 2 } + save_scope_as = average_aptitude + } + else_if = { + limit = { aptitude:master_of_spoils_camp_officer >= 1 } + save_scope_as = poor_aptitude + } + else = { save_scope_as = terrible_aptitude } + } + } + } + if = { + limit = { + domicile ?= { has_domicile_parameter = camp_better_scout_for_talent } + } + add_character_flag = { + flag = had_talent_event + months = 2 + } + } + else = { + add_character_flag = { + flag = had_talent_event + months = 4 + } + } + } + + option = { + name = ep3_travel_option_events.0001.a + hidden_effect = { + scope:local_character = { add_to_court_and_entourage_effect = yes } + } + show_as_tooltip = { + add_courtier = scope:local_character + } + if = { + limit = { + has_perk = benevolent_intent_perk + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:local_character + opinion = 60 + } + } + else = { + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:local_character + opinion = 35 + } + } + if = { + limit = { + exists = scope:court_physician_court_position + } + appoint_court_position = { + recipient = scope:local_character + court_position = court_physician_court_position + } + } + else_if = { + limit = { + exists = scope:bodyguard_court_position + } + appoint_court_position = { + recipient = scope:local_character + court_position = bodyguard_court_position + } + } + else_if = { + limit = { + exists = scope:travel_leader_court_position + } + appoint_court_position = { + recipient = scope:local_character + court_position = travel_leader_court_position + } + } + else_if = { + limit = { + exists = scope:second_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = second_camp_officer + } + } + else_if = { + limit = { + exists = scope:quartermaster_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = quartermaster_camp_officer + } + } + else_if = { + limit = { + exists = scope:armorer_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = armorer_camp_officer + } + } + else_if = { + limit = { + exists = scope:chief_forager_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = chief_forager_camp_officer + } + } + else_if = { + limit = { + exists = scope:master_thief_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = master_thief_camp_officer + } + } + else_if = { + limit = { + exists = scope:head_porter_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = head_porter_camp_officer + } + } + else_if = { + limit = { + exists = scope:head_groom_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = head_groom_camp_officer + } + } + else_if = { + limit = { + exists = scope:huntperson_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = huntperson_camp_officer + } + } + else_if = { + limit = { + exists = scope:kennelperson_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = kennelperson_camp_officer + } + } + else_if = { + limit = { + exists = scope:chief_engineer_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = chief_engineer_camp_officer + } + } + else_if = { + limit = { + exists = scope:witness_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = witness_camp_officer + } + } + else_if = { + limit = { + exists = scope:person_haggler_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = person_haggler_camp_officer + } + } + else_if = { + limit = { + exists = scope:camp_cook_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = camp_cook_camp_officer + } + } + else_if = { + limit = { + exists = scope:master_bard_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = master_bard_camp_officer + } + } + else_if = { + limit = { + exists = scope:stooge_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = stooge_camp_officer + } + } + else_if = { + limit = { + exists = scope:master_of_arms_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = master_of_arms_camp_officer + } + } + else_if = { + limit = { + exists = scope:light_cavalry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = light_cavalry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:camelry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = camelry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:elephantry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = elephantry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:heavy_cavalry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = heavy_cavalry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:horse_archer_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = horse_archer_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:archer_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = archer_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:heavy_infantry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = heavy_infantry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:light_infantry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = light_infantry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:pike_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = pike_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:master_of_spoils_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = master_of_spoils_camp_officer + } + } + + # Aptitude + if = { + limit = { + exists = scope:excellent_aptitude + } + custom_tooltip = excellent.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + pay_short_term_gold = { + target = scope:local_character + gold = 65 + } + } + else = { + pay_short_term_gold = { + target = scope:local_character + gold = 125 + } + } + } + else_if = { + limit = { + exists = scope:good_aptitude + } + custom_tooltip = good.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + pay_short_term_gold = { + target = scope:local_character + gold = 35 + } + } + else = { + pay_short_term_gold = { + target = scope:local_character + gold = 75 + } + } + } + else_if = { + limit = { + exists = scope:average_aptitude + } + custom_tooltip = average.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + pay_short_term_gold = { + target = scope:local_character + gold = 25 + } + } + else = { + pay_short_term_gold = { + target = scope:local_character + gold = 50 + } + } + } + else_if = { + limit = { + exists = scope:poor_aptitude + } + custom_tooltip = poor.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + pay_short_term_gold = { + target = scope:local_character + gold = 10 + } + } + else = { + pay_short_term_gold = { + target = scope:local_character + gold = 20 + } + } + } + else = { + custom_tooltip = terrible.aptitude_tt + pay_short_term_gold = { + target = scope:local_character + gold = 1 + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + gold <= 500 + } + } + } + option = { + name = ep3_travel_option_events.0001.provisions + show_as_unavailable = { always = yes } + trigger = { + trigger_if = { + limit = { + exists = scope:excellent_aptitude + } + trigger_if = { + limit = { + has_perk = large_levies_perk + } + domicile.provisions >= 500 + } + trigger_else = { + domicile.provisions >= 1000 + } + } + trigger_else_if = { + limit = { + exists = scope:good_aptitude + } + trigger_if = { + limit = { + has_perk = large_levies_perk + } + domicile.provisions >= 400 + } + trigger_else = { + domicile.provisions >= 800 + } + } + trigger_else_if = { + limit = { + exists = scope:average_aptitude + } + trigger_if = { + limit = { + has_perk = large_levies_perk + } + domicile.provisions >= 300 + } + trigger_else = { + domicile.provisions >= 600 + } + } + trigger_else_if = { + limit = { + exists = scope:poor_aptitude + } + trigger_if = { + limit = { + has_perk = large_levies_perk + } + domicile.provisions >= 150 + } + trigger_else = { + domicile.provisions >= 300 + } + } + trigger_else = { + trigger_if = { + limit = { + has_perk = large_levies_perk + } + domicile.provisions >= 50 + } + trigger_else = { + domicile.provisions >= 100 + } + } + } + + hidden_effect = { + scope:local_character = { add_to_court_and_entourage_effect = yes } + } + show_as_tooltip = { + add_courtier = scope:local_character + } + if = { + limit = { + has_perk = benevolent_intent_perk + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:local_character + opinion = 35 + } + } + else = { + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:local_character + opinion = 10 + } + } + if = { + limit = { + exists = scope:court_physician_court_position + } + appoint_court_position = { + recipient = scope:local_character + court_position = court_physician_court_position + } + } + else_if = { + limit = { + exists = scope:bodyguard_court_position + } + appoint_court_position = { + recipient = scope:local_character + court_position = bodyguard_court_position + } + } + else_if = { + limit = { + exists = scope:travel_leader_court_position + } + appoint_court_position = { + recipient = scope:local_character + court_position = travel_leader_court_position + } + } + else_if = { + limit = { + exists = scope:second_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = second_camp_officer + } + } + else_if = { + limit = { + exists = scope:quartermaster_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = quartermaster_camp_officer + } + } + else_if = { + limit = { + exists = scope:armorer_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = armorer_camp_officer + } + } + else_if = { + limit = { + exists = scope:chief_forager_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = chief_forager_camp_officer + } + } + else_if = { + limit = { + exists = scope:master_thief_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = master_thief_camp_officer + } + } + else_if = { + limit = { + exists = scope:head_porter_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = head_porter_camp_officer + } + } + else_if = { + limit = { + exists = scope:head_groom_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = head_groom_camp_officer + } + } + else_if = { + limit = { + exists = scope:huntperson_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = huntperson_camp_officer + } + } + else_if = { + limit = { + exists = scope:kennelperson_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = kennelperson_camp_officer + } + } + else_if = { + limit = { + exists = scope:chief_engineer_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = chief_engineer_camp_officer + } + } + else_if = { + limit = { + exists = scope:witness_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = witness_camp_officer + } + } + else_if = { + limit = { + exists = scope:person_haggler_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = person_haggler_camp_officer + } + } + else_if = { + limit = { + exists = scope:camp_cook_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = camp_cook_camp_officer + } + } + else_if = { + limit = { + exists = scope:master_bard_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = master_bard_camp_officer + } + } + else_if = { + limit = { + exists = scope:stooge_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = stooge_camp_officer + } + } + else_if = { + limit = { + exists = scope:master_of_arms_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = master_of_arms_camp_officer + } + } + else_if = { + limit = { + exists = scope:light_cavalry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = light_cavalry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:camelry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = camelry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:elephantry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = elephantry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:heavy_cavalry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = heavy_cavalry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:horse_archer_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = horse_archer_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:archer_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = archer_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:heavy_infantry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = heavy_infantry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:light_infantry_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = light_infantry_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:pike_captain_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = pike_captain_camp_officer + } + } + else_if = { + limit = { + exists = scope:master_of_spoils_camp_officer + } + appoint_court_position = { + recipient = scope:local_character + court_position = master_of_spoils_camp_officer + } + } + + # Aptitude + if = { + limit = { + exists = scope:excellent_aptitude + } + custom_tooltip = excellent.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + domicile = { + change_provisions = -500 + } + } + else = { + domicile = { + change_provisions = -1000 + } + } + } + else_if = { + limit = { + exists = scope:good_aptitude + } + custom_tooltip = good.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + domicile = { + change_provisions = -400 + } + } + else = { + domicile = { + change_provisions = -800 + } + } + } + else_if = { + limit = { + exists = scope:average_aptitude + } + custom_tooltip = average.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + domicile = { + change_provisions = -300 + } + } + else = { + domicile = { + change_provisions = -600 + } + } + } + else_if = { + limit = { + exists = scope:poor_aptitude + } + custom_tooltip = poor.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + domicile = { + change_provisions = -150 + } + } + else = { + domicile = { + change_provisions = -300 + } + } + } + else = { + custom_tooltip = terrible.aptitude_tt + if = { + limit = { + has_perk = large_levies_perk + } + domicile = { + change_provisions = -50 + } + } + else = { + domicile = { + change_provisions = -100 + } + } + } + ai_chance = { + base = 100 + } + } + option = { + name = ep3_travel_option_events.0001.b + scope:local_character = { + add_character_flag = { + flag = denied_recruitment + years = 5 + } + } + ai_chance = { + base = 0 + } + } +} + +ep3_travel_option_events.0002 = { # Entourage member gets married + hidden = yes + + cooldown = { months = 3 } + + trigger = { + any_courtier = { + is_physically_able_adult = yes + is_married = no + is_concubine = no + can_marry_trigger = yes + can_have_children = yes + NOR = { + is_close_family_of = root + has_relation_lover = root + } + save_temporary_scope_as = lonely_courtier + } + OR = { + scope:lonely_courtier = { + any_relation = { + type = lover + is_courtier_of = root + is_physically_able_adult = yes + is_married = no + is_concubine = no + can_marry_trigger = yes + can_have_children = yes + can_marry_character_trigger = { CHARACTER = scope:lonely_courtier } + NOR = { + is_close_family_of = root + has_relation_lover = root + } + this != scope:lonely_courtier + } + } + any_pool_character = { + province = root.location + can_have_children_with = { CHARACTER = scope:lonely_courtier } + is_physically_able_adult = yes + age <= 35 + is_married = no + can_marry_trigger = yes + can_have_children = yes + can_marry_character_trigger = { CHARACTER = scope:lonely_courtier } + is_concubine = no + } + } + } + + immediate = { + random_courtier = { + limit = { + is_physically_able_adult = yes + is_married = no + is_concubine = no + can_marry_trigger = yes + can_have_children = yes + NOR = { + is_close_family_of = root + has_relation_lover = root + } + save_temporary_scope_as = lonely_courtier + OR = { + any_relation = { + type = lover + is_courtier_of = root + is_physically_able_adult = yes + is_married = no + is_concubine = no + can_marry_trigger = yes + can_have_children = yes + can_marry_character_trigger = { CHARACTER = scope:lonely_courtier } + NOR = { + is_close_family_of = root + has_relation_lover = root + } + this != scope:lonely_courtier + } + any_pool_character = { + province = root.location + can_have_children_with = { CHARACTER = scope:lonely_courtier } + is_physically_able_adult = yes + age <= 35 + is_married = no + can_marry_trigger = yes + can_have_children = yes + can_marry_character_trigger = { CHARACTER = scope:lonely_courtier } + is_concubine = no + } + } + } + save_scope_as = courtier_to_marry + if = { + limit = { + any_relation = { + type = lover + is_courtier_of = root + is_physically_able_adult = yes + is_married = no + is_concubine = no + can_marry_trigger = yes + can_have_children = yes + can_marry_character_trigger = { CHARACTER = scope:courtier_to_marry } + NOR = { + is_close_family_of = root + has_relation_lover = root + } + this != scope:courtier_to_marry + } + } + random_relation = { + type = lover + limit = { + is_courtier_of = root + is_physically_able_adult = yes + is_married = no + is_concubine = no + can_marry_trigger = yes + can_have_children = yes + can_marry_character_trigger = { CHARACTER = scope:courtier_to_marry } + NOR = { + is_close_family_of = root + has_relation_lover = root + } + this != scope:courtier_to_marry + } + save_scope_as = marriage_material + } + } + else = { + random_pool_character = { + province = root.location + limit = { + can_have_children_with = { CHARACTER = scope:courtier_to_marry } + is_physically_able_adult = yes + age <= 35 + is_married = no + can_marry_trigger = yes + can_have_children = yes + can_marry_character_trigger = { CHARACTER = scope:courtier_to_marry } + is_concubine = no + } + save_scope_as = marriage_material + } + } + } + send_interface_message = { + type = send_interface_message_good + title = ep3_travel_option_events.0002.title + + left_icon = scope:courtier_to_marry + right_icon = scope:marriage_material + + scope:courtier_to_marry = { + if = { + limit = { + is_female = yes + is_lowborn = no + } + marry_matrilineal = scope:marriage_material + } + else = { + marry = scope:marriage_material + } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 30 + } + } + scope:marriage_material = { + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 30 + } + } + add_prestige = minor_prestige_gain + } + } +} + +ep3_travel_option_events.0003 = { # Entourage member friendship + hidden = yes + + cooldown = { months = 2 } + + trigger = { + any_courtier = { + is_physically_able = yes + age >= 8 + num_of_relation_friend = 0 + save_temporary_scope_as = courtier_searching_for_friend + } + any_courtier = { + is_physically_able = yes + age >= 8 + num_of_relation_friend = 0 + this != scope:courtier_searching_for_friend + can_set_relation_friend_trigger = { CHARACTER = scope:courtier_searching_for_friend } + OR = { + NOR = { + is_close_family_of = root + is_consort_of = root + } + AND = { + is_close_family_of = root + scope:courtier_searching_for_friend = { is_close_family_of = root } + } + AND = { + is_consort_of = root + scope:courtier_searching_for_friend = { is_consort_of = root } + } + } + OR = { + AND = { + is_adult = yes + scope:courtier_searching_for_friend = { is_adult = yes } + } + AND = { + is_adult = no + scope:courtier_searching_for_friend = { is_adult = no } + } + } + OR = { + number_of_personality_traits_in_common = { + target = scope:courtier_searching_for_friend + value >= 2 + } + trait_compatibility = { + target = scope:courtier_searching_for_friend + value >= 50 + } + opinion = { + target = scope:courtier_searching_for_friend + value >= 35 + } + number_of_opposing_personality_traits = { + target = scope:courtier_searching_for_friend + value <= 0 + } + } + } + } + + immediate = { + random_courtier = { + limit = { + is_physically_able = yes + age >= 8 + num_of_relation_friend = 0 + save_temporary_scope_as = courtier_searching_for_friend + root = { + any_courtier = { + is_physically_able = yes + age >= 8 + num_of_relation_friend = 0 + this != scope:courtier_searching_for_friend + can_set_relation_friend_trigger = { CHARACTER = scope:courtier_searching_for_friend } + OR = { + NOR = { + is_close_family_of = root + is_consort_of = root + } + AND = { + is_close_family_of = root + scope:courtier_searching_for_friend = { is_close_family_of = root } + } + AND = { + is_consort_of = root + scope:courtier_searching_for_friend = { is_consort_of = root } + } + } + OR = { + AND = { + is_adult = yes + scope:courtier_searching_for_friend = { is_adult = yes } + } + AND = { + is_adult = no + scope:courtier_searching_for_friend = { is_adult = no } + } + } + OR = { + number_of_personality_traits_in_common = { + target = scope:courtier_searching_for_friend + value >= 2 + } + trait_compatibility = { + target = scope:courtier_searching_for_friend + value >= 50 + } + opinion = { + target = scope:courtier_searching_for_friend + value >= 35 + } + number_of_opposing_personality_traits = { + target = scope:courtier_searching_for_friend + value <= 0 + } + } + } + } + } + save_scope_as = courtier_to_befriend + root = { + random_courtier = { + limit = { + is_physically_able = yes + age >= 8 + num_of_relation_friend = 0 + this != scope:courtier_to_befriend + can_set_relation_friend_trigger = { CHARACTER = scope:courtier_to_befriend } + OR = { + NOR = { + is_close_family_of = root + is_consort_of = root + } + AND = { + is_close_family_of = root + scope:courtier_to_befriend = { is_close_family_of = root } + } + AND = { + is_consort_of = root + scope:courtier_to_befriend = { is_consort_of = root } + } + } + OR = { + AND = { + is_adult = yes + scope:courtier_to_befriend = { is_adult = yes } + } + AND = { + is_adult = no + scope:courtier_to_befriend = { is_adult = no } + } + } + OR = { + number_of_personality_traits_in_common = { + target = scope:courtier_to_befriend + value >= 2 + } + trait_compatibility = { + target = scope:courtier_to_befriend + value >= 50 + } + opinion = { + target = scope:courtier_to_befriend + value >= 35 + } + number_of_opposing_personality_traits = { + target = scope:courtier_to_befriend + value <= 0 + } + } + } + save_scope_as = friend_target + } + } + } + send_interface_message = { + type = send_interface_message_good + title = ep3_travel_option_events.0003.title + + left_icon = scope:courtier_to_befriend + right_icon = scope:friend_target + + scope:courtier_to_befriend = { + set_random_friendship_reason = { TARGET = scope:friend_target } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 15 + } + } + scope:friend_target = { + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 15 + } + } + add_prestige = minor_prestige_gain + } + } +} + +ep3_travel_option_events.0004 = { # Entourage member lovers + hidden = yes + + cooldown = { months = 2 } + + trigger = { + any_courtier = { + is_physically_able_adult = yes + might_cheat_on_every_partner_trigger = yes + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + } + NOR = { + is_close_family_of = root + has_relation_lover = root + } + save_temporary_scope_as = loving_courtier + } + OR = { + any_courtier = { + this != scope:loving_courtier + is_physically_able_adult = yes + trigger_if = { + limit = { + scope:loving_courtier = { is_married = yes } + } + is_consort_of = scope:loving_courtier + } + trigger_else = { + is_married = no + is_concubine = no + might_cheat_on_every_partner_trigger = yes + trait_compatibility = { + target = scope:loving_courtier + value >= medium_positive_trait_compatibility + } + #age <= scope:loving_courtier.age_plus_5 + #age >= scope:loving_courtier.age_minus_10 + } + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + is_consort_of = scope:loving_courtier + } + NOR = { + is_close_family_of = root + has_relation_lover = root + is_close_or_extended_family_of = scope:loving_courtier + } + can_set_relation_lover_trigger = { CHARACTER = scope:loving_courtier } + is_attracted_to_gender_of = scope:loving_courtier + scope:loving_courtier = { is_attracted_to_gender_of = prev } + } + any_pool_character = { + province = root.location + this != scope:loving_courtier + is_physically_able_adult = yes + trigger_if = { + limit = { + scope:loving_courtier = { is_married = yes } + } + is_consort_of = scope:loving_courtier + } + trigger_else = { + is_married = no + is_concubine = no + might_cheat_on_every_partner_trigger = yes + trait_compatibility = { + target = scope:loving_courtier + value >= medium_positive_trait_compatibility + } + #age <= scope:loving_courtier.age_plus_5 + #age >= scope:loving_courtier.age_minus_10 + } + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + is_consort_of = scope:loving_courtier + } + NOR = { + is_close_family_of = root + has_relation_lover = root + is_close_or_extended_family_of = scope:loving_courtier + } + can_set_relation_lover_trigger = { CHARACTER = scope:loving_courtier } + is_attracted_to_gender_of = scope:loving_courtier + scope:loving_courtier = { is_attracted_to_gender_of = prev } + } + } + } + + immediate = { + random_courtier = { + limit = { + is_physically_able_adult = yes + might_cheat_on_every_partner_trigger = yes + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + } + NOR = { + is_close_family_of = root + has_relation_lover = root + } + save_temporary_scope_as = loving_courtier + OR = { + root = { + any_courtier = { + this != scope:loving_courtier + is_physically_able_adult = yes + trigger_if = { + limit = { + scope:loving_courtier = { is_married = yes } + } + is_consort_of = scope:loving_courtier + } + trigger_else = { + is_married = no + is_concubine = no + might_cheat_on_every_partner_trigger = yes + trait_compatibility = { + target = scope:loving_courtier + value >= medium_positive_trait_compatibility + } + #age <= scope:loving_courtier.age_plus_5 + #age >= scope:loving_courtier.age_minus_10 + } + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + is_consort_of = scope:loving_courtier + } + NOR = { + is_close_family_of = root + has_relation_lover = root + is_close_or_extended_family_of = scope:loving_courtier + } + can_set_relation_lover_trigger = { CHARACTER = scope:loving_courtier } + is_attracted_to_gender_of = scope:loving_courtier + scope:loving_courtier = { is_attracted_to_gender_of = prev } + } + } + any_pool_character = { + province = root.location + this != scope:loving_courtier + is_physically_able_adult = yes + trigger_if = { + limit = { + scope:loving_courtier = { is_married = yes } + } + is_consort_of = scope:loving_courtier + } + trigger_else = { + is_married = no + is_concubine = no + might_cheat_on_every_partner_trigger = yes + trait_compatibility = { + target = scope:loving_courtier + value >= medium_positive_trait_compatibility + } + #age <= scope:loving_courtier.age_plus_5 + #age >= scope:loving_courtier.age_minus_10 + } + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + is_consort_of = scope:loving_courtier + } + NOR = { + is_close_family_of = root + has_relation_lover = root + is_close_or_extended_family_of = scope:loving_courtier + } + can_set_relation_lover_trigger = { CHARACTER = scope:loving_courtier } + is_attracted_to_gender_of = scope:loving_courtier + scope:loving_courtier = { is_attracted_to_gender_of = prev } + } + } + } + save_scope_as = courtier_to_love + if = { + limit = { + root = { + any_courtier = { + this != scope:courtier_to_love + is_physically_able_adult = yes + trigger_if = { + limit = { + scope:courtier_to_love = { is_married = yes } + } + is_consort_of = scope:courtier_to_love + } + trigger_else = { + is_married = no + is_concubine = no + might_cheat_on_every_partner_trigger = yes + trait_compatibility = { + target = scope:courtier_to_love + value >= medium_positive_trait_compatibility + } + #age <= scope:courtier_to_love.age_plus_5 + #age >= scope:courtier_to_love.age_minus_10 + } + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + is_consort_of = scope:courtier_to_love + } + NOR = { + is_close_family_of = root + has_relation_lover = root + is_close_or_extended_family_of = scope:courtier_to_love + } + can_set_relation_lover_trigger = { CHARACTER = scope:courtier_to_love } + is_attracted_to_gender_of = scope:courtier_to_love + scope:courtier_to_love = { is_attracted_to_gender_of = prev } + } + } + } + root = { + random_courtier = { + limit = { + this != scope:courtier_to_love + is_physically_able_adult = yes + trigger_if = { + limit = { + scope:courtier_to_love = { is_married = yes } + } + is_consort_of = scope:courtier_to_love + } + trigger_else = { + is_married = no + is_concubine = no + might_cheat_on_every_partner_trigger = yes + trait_compatibility = { + target = scope:courtier_to_love + value >= medium_positive_trait_compatibility + } + #age <= scope:courtier_to_love.age_plus_5 + #age >= scope:courtier_to_love.age_minus_10 + } + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + is_consort_of = scope:courtier_to_love + } + NOR = { + is_close_family_of = root + has_relation_lover = root + is_close_or_extended_family_of = scope:courtier_to_love + } + can_set_relation_lover_trigger = { CHARACTER = scope:courtier_to_love } + is_attracted_to_gender_of = scope:courtier_to_love + scope:courtier_to_love = { is_attracted_to_gender_of = prev } + } + save_scope_as = pls_love_me + } + } + } + else = { + random_pool_character = { + province = root.location + limit = { + this != scope:courtier_to_love + is_physically_able_adult = yes + trigger_if = { + limit = { + scope:courtier_to_love = { is_married = yes } + } + is_consort_of = scope:courtier_to_love + } + trigger_else = { + is_married = no + is_concubine = no + might_cheat_on_every_partner_trigger = yes + trait_compatibility = { + target = scope:courtier_to_love + value >= medium_positive_trait_compatibility + } + #age <= scope:courtier_to_love.age_plus_5 + #age >= scope:courtier_to_love.age_minus_10 + } + NOR = { + has_sexuality = asexual + has_trait = celibate + has_trait = chaste + } + OR = { + num_of_relation_lover = 0 + has_trait = lustful + is_consort_of = scope:courtier_to_love + } + NOR = { + is_close_family_of = root + has_relation_lover = root + is_close_or_extended_family_of = scope:courtier_to_love + } + can_set_relation_lover_trigger = { CHARACTER = scope:courtier_to_love } + is_attracted_to_gender_of = scope:courtier_to_love + scope:courtier_to_love = { is_attracted_to_gender_of = prev } + } + save_scope_as = pls_love_me + } + } + } + send_interface_message = { + type = send_interface_message_good + title = ep3_travel_option_events.0004.title + + left_icon = scope:courtier_to_love + right_icon = scope:pls_love_me + + scope:courtier_to_love = { + set_random_lover_reason = { TARGET = scope:pls_love_me } + hidden_effect = { + random_secret = { + type = secret_lover + limit = { + secret_target = scope:pls_love_me + } + reveal_to_without_events_effect = { CHARACTER = root } + } + } + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 15 + } + } + if = { + limit = { + scope:pls_love_me = { + NOT = { + is_courtier_of = root + } + } + } + hidden_effect = { + scope:pls_love_me = { add_to_court_and_entourage_effect = yes } + } + show_as_tooltip = { + add_courtier = scope:pls_love_me + } + } + scope:pls_love_me = { + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 15 + } + } + add_prestige = minor_prestige_gain + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_wedding_events.txt b/N3OW/events/dlc/ep3/ep3_wedding_events.txt new file mode 100644 index 00000000..4739d58f --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_wedding_events.txt @@ -0,0 +1,2616 @@ +namespace = ep3_wedding + +################################################## +# #Banquet Phase +# 0001 - 003 Almost the Bride + +################################################## +# Almost the Bride +# by Jason Cantalini +# 0001 +################################################## + +scripted_trigger ep3_wedding_0001_flirter_trigger = { + save_temporary_scope_as = flirter_temp + #Shouldn't get the event multiple times with the same character + trigger_if = { + limit = { + root = { + has_variable = had_ep3_wedding_0001_var + } + } + root = { + var:had_ep3_wedding_0001_var = { + this = scope:flirter_temp + } + } + } + trigger_if = { + limit = { + has_variable = had_ep3_wedding_0001_var + } + var:had_ep3_wedding_0001_var = { + this = root + } + } + is_physically_able_ai_adult = yes + #Needs to be a member of the other family + OR = { + AND = { + root = scope:activity.special_guest:spouse_1 + is_close_family_of = scope:activity.special_guest:spouse_2 + } + AND = { + root = { + is_close_family_of = scope:activity.special_guest:spouse_1 + } + is_close_family_of = scope:activity.special_guest:spouse_2 + } + AND = { + root = scope:activity.special_guest:spouse_2 + is_close_family_of = scope:activity.special_guest:spouse_1 + } + AND = { + root = { + is_close_family_of = scope:activity.special_guest:spouse_2 + } + is_close_family_of = scope:activity.special_guest:spouse_1 + } + } + #Either willing to do adultery or not in relationship + might_cheat_on_every_partner_trigger = yes + is_attracted_to_gender_of = root + NOR = { + has_trait = chaste + has_trait = celibate + this = scope:activity.special_guest:spouse_1 + this = scope:activity.special_guest:spouse_2 + } +} + +scripted_trigger ep3_wedding_0001_pervert_trigger = { + OR = { + has_trait = lustful + has_trait = seducer + has_trait = rakish + is_deviant_trigger = yes + has_focus = intrigue_temptation_focus + has_trait = drunkard + has_activity_intent = woo_attendee_intent + } +} + +scripted_trigger ep3_wedding_0001_relative_ages_trigger = { + OR = { + #Both people aren't old + AND = { + age <= 55 + root = { + age <= 55 + } + } + #Both people are old + AND = { + age > 55 + root = { + age > 55 + } + } + #Root is old + AND = { + root = { + age > 55 + } + OR = { + age > 40 + is_deviant_trigger = yes + } + } + #Target is old + AND = { + root = { + OR = { + age > 40 + is_deviant_trigger = yes + } + } + age > 55 + } + } +} + +#A family member of someone getting married is flirting with you +ep3_wedding.0001 = { + type = activity_event + title = ep3_wedding.0001.t + desc = { + desc = ep3_wedding.0001.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + desc = ep3_wedding.0001.desc_own_wedding + } + desc = ep3_wedding.0001.desc_guest + } + } + theme = wedding_banquet_activity + left_portrait = { + character = root + triggered_animation = { + trigger = { + drinks_alcohol_trigger = yes + } + animation = wedding_drunk + } + triggered_animation = { + trigger = { + drinks_alcohol_trigger = no + } + animation = admiration + } + } + right_portrait = { + character = scope:flirting_in_law + animation = dancing + } + lower_right_portrait = { + character = scope:other_family_spouse + } + lower_left_portrait = { + character = scope:same_family_spouse + } + + trigger = { + is_adult = yes + is_healthy = yes + #Prevent event happening back to back + NOT = { + has_character_flag = had_ep3_wedding_0001_flag + } + #Either has to be a player or is open to this shizz + might_cheat_on_every_partner_trigger = yes + OR = { + NOR = { + has_trait = chaste + has_trait = celibate + } + is_ai = no + } + OR = { + #Random flirting + scope:activity = { + any_attending_character = { + NOT = { + has_character_flag = had_ep3_wedding_0001 + } + ep3_wedding_0001_flirter_trigger = yes + #At least one person has to be horny + OR = { + ep3_wedding_0001_pervert_trigger = yes + attraction > medium_positive_attraction + root = { attraction > medium_positive_attraction } + root = { ep3_wedding_0001_pervert_trigger = yes } + } + ###incest check + OR = { + NOT = { is_close_family_of = root } + AND = { + ep3_wedding_0001_pervert_trigger = yes + root = { ep3_wedding_0001_pervert_trigger = yes } + } + } + root = { is_attracted_to_gender_of = prev } + NOT = { + attraction < 0 + } + ep3_wedding_0001_relative_ages_trigger = yes + } + } + #Being targeted by wooing + scope:activity = { + any_attending_character = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target = root + is_ai = yes + OR = { + AND = { + root = scope:activity.special_guest:spouse_1 + is_close_family_of = scope:activity.special_guest:spouse_2 + } + AND = { + root = { + is_close_family_of = scope:activity.special_guest:spouse_1 + } + is_close_family_of = scope:activity.special_guest:spouse_2 + } + AND = { + root = scope:activity.special_guest:spouse_2 + is_close_family_of = scope:activity.special_guest:spouse_1 + } + AND = { + root = { + is_close_family_of = scope:activity.special_guest:spouse_2 + } + is_close_family_of = scope:activity.special_guest:spouse_1 + } + } + } + } + #Targeting with wooing + AND = { + has_activity_intent = woo_attendee_intent + exists = scope:host.intent_target + scope:host.intent_target = { + ep3_wedding_0001_flirter_trigger = yes + ###incest check + OR = { + NOT = { is_close_family_of = root } + ep3_wedding_0001_pervert_trigger = yes + } + NOR = { + #Root is old + AND = { + root = { + age > 55 + } + OR = { + age < 40 + NOT = { is_deviant_trigger = yes } + } + + } + #Target is old + AND = { + root = { + OR = { + age < 40 + NOT = { is_deviant_trigger = yes } + } + } + age > 55 + } + } + } + } + } + } + + weight_multiplier = { + base = 1 + + # Weight up for pervs + modifier = { + add = 9 + ep3_wedding_0001_pervert_trigger = yes + NOR = { + has_trait = chaste + has_trait = celibate + } + } + modifier = { + add = 4 + OR = { + is_married = no + AND = { + is_male = yes + faith = { has_doctrine = doctrine_adultery_men_accepted } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + } + modifier = { + add = 2 + attraction > 0 + } + modifier = { + add = 2 + attraction >= 10 + } + modifier = { + add = 2 + attraction >= 25 + } + modifier = { + add = 2 + any_relation = { type = lover } + } + modifier = { + factor = 0.5 + OR = { + attraction < 0 + has_trait = chaste + has_trait = celibate + has_trait = devoted + AND = { + is_married = yes + ai_honor > medium_positive_ai_value + } + AND = { + is_married = yes + any_spouse = { + has_relation_soulmate = root + } + } + } + } + } + + immediate = { + if = { + limit = { + has_activity_intent = woo_attendee_intent + exists = scope:host.intent_target + scope:host.intent_target = { + ep3_wedding_0001_flirter_trigger = yes + ###incest check + OR = { + NOT = { is_close_family_of = root } + ep3_wedding_0001_pervert_trigger = yes + } + NOR = { + #Root is old + AND = { + root = { + age > 55 + } + OR = { + age < 40 + NOT = { is_deviant_trigger = yes } + } + + } + #Target is old + AND = { + root = { + OR = { + age < 40 + NOT = { is_deviant_trigger = yes } + } + } + age > 55 + } + } + } + } + scope:host.intent_target = { + save_scope_as = flirting_in_law + } + } + else_if = { + limit = { + scope:activity = { + any_attending_character = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target = root + is_ai = yes + OR = { + AND = { + root = scope:activity.special_guest:spouse_1 + is_close_family_of = scope:activity.special_guest:spouse_2 + } + AND = { + root = { + is_close_family_of = scope:activity.special_guest:spouse_1 + } + is_close_family_of = scope:activity.special_guest:spouse_2 + } + AND = { + root = scope:activity.special_guest:spouse_2 + is_close_family_of = scope:activity.special_guest:spouse_1 + } + AND = { + root = { + is_close_family_of = scope:activity.special_guest:spouse_2 + } + is_close_family_of = scope:activity.special_guest:spouse_1 + } + } + } + } + } + scope:activity = { + random_attending_character = { + limit = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target = root + is_ai = yes + OR = { + AND = { + root = scope:activity.special_guest:spouse_1 + is_close_family_of = scope:activity.special_guest:spouse_2 + } + AND = { + root = { + is_close_family_of = scope:activity.special_guest:spouse_1 + } + is_close_family_of = scope:activity.special_guest:spouse_2 + } + AND = { + root = scope:activity.special_guest:spouse_2 + is_close_family_of = scope:activity.special_guest:spouse_1 + } + AND = { + root = { + is_close_family_of = scope:activity.special_guest:spouse_2 + } + is_close_family_of = scope:activity.special_guest:spouse_1 + } + } + } + save_scope_as = flirting_in_law + } + } + } + else = { + scope:activity = { + random_attending_character = { + limit = { + ep3_wedding_0001_flirter_trigger = yes + NOT = { + has_character_flag = had_ep3_wedding_0001 + } + #At least one person has to be horny + OR = { + ep3_wedding_0001_pervert_trigger = yes + attraction > medium_positive_attraction + root = { attraction > medium_positive_attraction } + root = { ep3_wedding_0001_pervert_trigger = yes } + } + ###incest check + OR = { + NOT = { is_close_family_of = root } + AND = { + ep3_wedding_0001_pervert_trigger = yes + root = { ep3_wedding_0001_pervert_trigger = yes } + } + } + root = { is_attracted_to_gender_of = prev } + NOT = { + attraction < 0 + } + ep3_wedding_0001_relative_ages_trigger = yes + } + save_scope_as = flirting_in_law + } + } + } + scope:flirting_in_law = { + add_character_flag = { + flag = had_ep3_wedding_0001 + months = 3 + } + } + #Save the marrying person you ain't related to + if = { + limit = { + OR = { + root = scope:activity.special_guest:spouse_1 + AND = { + is_close_family_of = scope:activity.special_guest:spouse_1 + root != scope:activity.special_guest:spouse_2 + } + + } + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = other_family_spouse + } + } + if = { + limit = { + OR = { + root = scope:activity.special_guest:spouse_2 + AND = { + is_close_family_of = scope:activity.special_guest:spouse_2 + root != scope:activity.special_guest:spouse_1 + } + } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = other_family_spouse + } + } + #If you're not getting married, save the marrying person you're related to + if = { + limit = { + is_close_family_of = scope:activity.special_guest:spouse_1 + NOR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + scope:activity.special_guest:spouse_1 = { + save_scope_as = same_family_spouse + } + } + if = { + limit = { + is_close_family_of = scope:activity.special_guest:spouse_2 + NOR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + scope:activity.special_guest:spouse_2 = { + save_scope_as = same_family_spouse + } + } + set_variable = { + name = had_ep3_wedding_0001_var + value = scope:flirting_in_law + months = 6 + } + add_character_flag = { + flag = had_ep3_wedding_0001_flag + days = 20 + } + } + + # I should really warn my beloved spouse/family member + option = { + name = { + trigger = { + NOR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + text = ep3_wedding.0001.a_non_spouse + } + name = { + trigger = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + text = ep3_wedding.0001.a_spouse + } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + NOR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + desc = ep3_wedding.0001.a.flavor_non_spouse + } + desc = ep3_wedding.0001.a.flavor_spouse + } + } + trigger = { + OR = { + has_relation_friend = scope:other_family_spouse + has_relation_best_friend = scope:other_family_spouse + has_relation_lover = scope:other_family_spouse + has_relation_soulmate = scope:other_family_spouse + has_trait = loyal + has_trait = just + has_trait = honest + } + } + if = { + limit = { + NOT = { has_trait = loyal } + } + random = { + chance = 50 + modifier = { + OR = { + has_trait = honest + has_trait = just + has_trait = chaste + has_trait = compassionate + } + add = 40 + } + modifier = { + OR = { + has_trait = trusting + has_trait = humble + has_trait = content + } + NOR = { + has_trait = honest + has_trait = just + has_trait = chaste + has_trait = compassionate + } + add = 25 + } + modifier = { + OR = { + has_trait = arbitrary + has_trait = deceitful + has_trait = callous + has_trait = fickle + has_trait = lustful + has_trait = arrogant + } + add = -25 + } + add_trait = loyal + } + } + else = { + add_piety = medium_piety_gain + } + if = { + limit = { + NOR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + reverse_add_opinion = { + modifier = loyalty_opinion + target = scope:same_family_spouse + opinion = 20 + } + } + else = { + reverse_add_opinion = { + modifier = love_opinion + target = scope:other_family_spouse + opinion = 20 + } + } + + stress_impact = { + loyal = miniscule_stress_impact_loss + just = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + lustful = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + fickle = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + modifier = { + add = 50 + has_relation_soulmate = scope:other_family_spouse + } + modifier = { + add = 50 + any_relation = { type = soulmate } + } + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = arbitrary + has_trait = fickle + has_trait = deceitful + } + } + } + } + + # HORNINESS ACTIVATED + option = { + name = ep3_wedding.0001.b + flavor = ep3_wedding.0001.b.flavor + + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + custom_tooltip = own_wedding_difficulty_tooltip + } + duel = { + skill = intrigue + value = { + value = mediocre_skill_rating + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + add = 7 + } + } + 50 = { #Success. + desc = ep3_wedding.0001.b.success.desc.tt + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 1 + #Fire sexy follow up + trigger_event = ep3_wedding.0002 + show_as_tooltip = { + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + add_intrigue_skill = 1 + add_intrigue_lifestyle_xp = medium_lifestyle_xp + + } + had_sex_with_effect = { + CHARACTER = scope:flirting_in_law + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + 10 = { #Succeed, but get caught + desc = ep3_wedding.0001.b.caught.desc.tt + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -9 + } + trigger = { + scope:other_family_spouse = { is_ai = yes } + } + min = 2 + modifier = { + add = 10 + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + modifier = { + add = 15 + intrigue <= medium_skill_rating + } + modifier = { + add = 15 + intrigue < average_skill_rating + } + modifier = { + add = 30 + intrigue < low_skill_rating + } + custom_tooltip = ep3_wedding.001.b.got_caught + show_as_tooltip = { + had_sex_with_effect = { + CHARACTER = scope:flirting_in_law + PREGNANCY_CHANCE = pregnancy_chance + } + } + + #Fire tragically sexy followup + trigger_event = ep3_wedding.0003 + } + 40 = { #Fail. + desc = ep3_wedding.0001.b.fail.desc.tt + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + min = 1 + modifier = { + add = -25 + scope:flirting_in_law = { + opinion = { + target = root + value >= 80 + } + } + } + modifier = { + add = -25 + scope:flirting_in_law = { + opinion = { + target = root + value >= 40 + } + } + } + modifier = { + add = 25 + scope:flirting_in_law = { + opinion = { + target = root + value <= 0 + } + } + } + modifier = { + add = 25 + scope:flirting_in_law = { + opinion = { + target = root + value <= -40 + } + } + } + modifier = { + add = 25 + scope:flirting_in_law = { + opinion = { + target = root + value <= -80 + } + } + } + modifier = { + add = 10 + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + scope:other_family_spouse = { + is_ai = no + } + } + modifier = { + add = 25 + scope:other_family_spouse = { + is_ai = no + } + } + modifier = { + add = 15 + intrigue <= medium_skill_rating + scope:other_family_spouse = { + is_ai = no + } + } + modifier = { + add = 15 + intrigue < average_skill_rating + scope:other_family_spouse = { + is_ai = no + } + } + modifier = { + add = 30 + intrigue < low_skill_rating + scope:other_family_spouse = { + is_ai = no + } + } + + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_wedding.0001.b.fail.desc.tt + left_icon = scope:flirting_in_law + + add_stress = minor_stress_gain + reverse_add_opinion = { + modifier = disrespect_opinion + target = scope:flirting_in_law + opinion = -10 + } + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + reverse_add_opinion = { + modifier = disrespect_opinion + target = scope:other_family_spouse + opinion = -30 + } + } + } + } + } + + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + stress_impact = { + fickle = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + impatient = minor_stress_impact_loss + chaste = massive_stress_impact_gain + just = massive_stress_impact_gain + patient = major_stress_impact_gain + honest = massive_stress_impact_gain + compassionate = major_stress_impact_gain + shy = minor_stress_impact_gain + } + } + else = { + stress_impact = { + fickle = minor_stress_impact_loss + arrogant = miniscule_stress_impact_loss + impatient = minor_stress_impact_loss + chaste = major_stress_impact_gain + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = -1 + } + modifier = { + add = 100 + ep3_wedding_0001_pervert_trigger = yes + } + modifier = { + add = -100 + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + modifier = { + add = -50 + OR = { + has_trait = shy + intrigue <= medium_skill_rating + } + } + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = just + has_trait = honest + intrigue <= low_skill_rating + AND = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + OR = { + has_trait = patient + has_trait = compassionate + } + } + } + } + } + } + + # Just a harmless little dance + option = { + name = ep3_wedding.0001.c + flavor = ep3_wedding.0001.c.flavor + + reverse_add_opinion = { + modifier = friendliness_opinion + target = scope:flirting_in_law + opinion = 30 + } + + stress_impact = { + base = medium_stress_impact_loss + shy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + chaste = minor_stress_impact_gain + } + + ai_chance = { + base = 200 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 0.5 + } + modifier = { + add = -50 + OR = { + has_trait = shy + has_trait = lazy + has_trait = chaste + } + } + } + } +} + +#You and the member of the marital family have some sex +ep3_wedding.0002 = { + type = activity_event + title = ep3_wedding.0002.t + desc = { + desc = ep3_wedding.0002.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + desc = ep3_wedding.0002.own_wedding + } + desc = ep3_wedding.0002.others_wedding + } + first_valid = { + triggered_desc = { + trigger = { + scope:other_family_spouse = { + is_lowborn = yes + } + } + desc = ep3_wedding.0002.lowborn + } + desc = ep3_wedding.0002.highborn + } + } + theme = wedding_banquet_activity + override_background = { + reference = corridor_night + } + center_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:flirting_in_law + animation = dancing + camera = camera_event_very_right + } + lower_right_portrait = { + character = scope:other_family_spouse + } + lower_left_portrait = { + character = scope:same_family_spouse + } + immediate = { + add_character_flag = { + flag = is_naked + days = 30 + } + scope:flirting_in_law = { + add_character_flag = { + flag = is_naked + days = 30 + } + } + if = { + limit = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target ?= scope:flirting_in_law + } + complete_activity_intent = yes + } + if = { + limit = { + scope:flirting_in_law = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target ?= root + } + } + scope:flirting_in_law = { complete_activity_intent = yes } + } + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + add_intrigue_skill = 1 + add_intrigue_lifestyle_xp = medium_lifestyle_xp + + } + had_sex_with_effect = { + CHARACTER = scope:flirting_in_law + PREGNANCY_CHANCE = pregnancy_chance + } + } + #Holy shit, you're the one I'm really meant to be with + option = { + name = ep3_wedding.0002.a + flavor = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + desc = ep3_wedding.0002.a.flavor + } + desc = ep3_wedding.0002.a.flavor_non_spouse + } + + } + trigger = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:flirting_in_law } + } + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { #Success + desc = ep3_wedding.0002.a.success.desc.tt + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = -10 + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + modifier = { + add = 10 + scope:flirting_in_law = { + OR = { + has_trait = trusting + has_trait = eccentric + has_trait = stubborn + } + } + } + modifier = { + add = 25 + reverse_opinion = { + target = scope:flirting_in_law + value >= 80 + } + } + modifier = { + add = 25 + reverse_opinion = { + target = scope:flirting_in_law + value >= 50 + } + } + modifier = { + add = 25 + reverse_opinion = { + target = scope:flirting_in_law + value > 20 + } + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_wedding.0002.a.success.desc.tt + left_icon = scope:flirting_in_law + + set_relation_soulmate = { + target = scope:flirting_in_law + reason = soulmate_absconded_during_wedding + } + } + } + 50 = { #They're not into it + desc = ep3_wedding.0002.a.fail.desc.tt + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 20 + scope:flirting_in_law = { + OR = { + has_trait = lustful + has_trait = callous + has_trait = fickle + has_trait = sadistic + has_trait = deceitful + has_trait = arbitrary + has_trait = content + } + } + } + modifier = { + add = 25 + reverse_opinion = { + target = scope:flirting_in_law + value <= -60 + } + } + modifier = { + add = 25 + reverse_opinion = { + target = scope:flirting_in_law + value <= -30 + } + } + modifier = { + add = 25 + reverse_opinion = { + target = scope:flirting_in_law + value <= 0 + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_wedding.0002.a.fail.desc.tt + left_icon = scope:flirting_in_law + + reverse_add_opinion = { + modifier = flattered_opinion + target = scope:flirting_in_law + opinion = 20 + } + + } + } + } + stress_impact = { + lustful = minor_stress_impact_gain + fickle = medium_stress_impact_gain + callous = medium_stress_impact_gain + deceitful = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 1 + } + modifier = { + add = -50 + OR = { + has_trait = deceitful + has_trait = arbitrary + } + } + modifier = { + add = 50 + opinion = { + target = scope:flirting_in_law + value >= 50 + } + } + modifier = { + add = -50 + opinion = { + target = scope:flirting_in_law + value < 0 + } + } + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = fickle + has_trait = callous + } + } + } + } + #Let's be lovers + option = { + name = ep3_wedding.0002.b + trigger = { + can_set_relation_lover_trigger = { CHARACTER = scope:flirting_in_law } + } + set_relation_lover = { + target = scope:flirting_in_law + reason = lover_absconded_during_wedding + } + stress_impact = { + lustful = miniscule_stress_impact_loss + fickle = minor_stress_impact_gain + chaste = major_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + modifier = { + add = -50 + has_trait = fickle + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + has_trait = chaste + } + } + modifier = { + add = 50 + opinion = { + target = scope:flirting_in_law + value >= 50 + } + } + modifier = { + add = -50 + opinion = { + target = scope:flirting_in_law + value < 0 + } + } + } + } + #Well that was nice sex... gotta go back now + option = { + name = ep3_wedding.0002.c + if = { + limit = { + scope:flirting_in_law = { + NOR = { + has_trait = lustful + has_trait = callous + has_trait = fickle + has_trait = sadistic + has_trait = deceitful + has_trait = arbitrary + has_trait = content + } + } + } + reverse_add_opinion = { + modifier = angry_opinion + target = scope:flirting_in_law + opinion = -30 + } + } + if = { + limit = { + has_activity_intent = reduce_stress_intent + } + if = { + limit = { + has_trait = lifestyle_reveler + } + add_trait_xp = { + trait = lifestyle_reveler + value = 20 + } + } + else = { + add_trait = lifestyle_reveler + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_boldness = -1 + } + modifier = { + add = -50 + OR = { + has_trait = lustful + has_trait = loyal + has_trait = stubborn + } + } + modifier = { + add = -50 + opinion = { + target = scope:flirting_in_law + value >= 50 + } + } + modifier = { + add = 50 + opinion = { + target = scope:flirting_in_law + value < 0 + } + } + } + } + after = { + remove_character_flag = is_naked + scope:flirting_in_law = { + remove_character_flag = is_naked + } + } +} + +#You are caught having sex with the relative +ep3_wedding.0003 = { + type = activity_event + title = ep3_wedding.0003.t + desc = { + desc = ep3_wedding.0003.desc_intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + desc = ep3_wedding.0003.desc_own_wedding + } + desc = ep3_wedding.0003.desc_guest + } + } + theme = wedding_banquet_activity + override_background = { + reference = corridor_night + } + left_portrait = { + character = root + animation = stayback + camera = camera_event_very_left + } + center_portrait = { + character = scope:flirting_in_law + triggered_animation = { + trigger = { + OR = { + AND = { + faith_dominant_gender_male_or_equal = yes + is_female = yes + } + AND = { + faith_dominant_gender_male_or_equal = no + is_male = yes + } + } + } + animation = crying + } + triggered_animation = { + trigger = { + OR = { + AND = { + faith_dominant_gender_male_or_equal = yes + is_male = yes + } + AND = { + faith_dominant_gender_male_or_equal = no + is_female = yes + } + } + } + animation = shame + } + } + right_portrait = { + character = scope:other_family_spouse + animation = shock + camera = camera_event_very_right + } + lower_right_portrait = scope:same_family_spouse + immediate = { + add_character_flag = { + flag = is_naked + days = 30 + } + scope:flirting_in_law = { + add_character_flag = { + flag = is_naked + days = 30 + } + } + if = { + limit = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target ?= scope:flirting_in_law + } + complete_activity_intent = yes + } + if = { + limit = { + scope:flirting_in_law = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target ?= root + } + } + scope:flirting_in_law = { complete_activity_intent = yes } + } + had_sex_with_effect = { + CHARACTER = scope:flirting_in_law + PREGNANCY_CHANCE = pregnancy_chance + } + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + } + create_character_memory = { + type = wedding_infidelity_spouse + participants = { + in_law = scope:flirting_in_law + other_spouse = scope:other_family_spouse + } + } + scope:flirting_in_law = { + create_character_memory = { + type = wedding_infidelity_kin + participants = { + sex_spouse = root + kin_spouse = scope:other_family_spouse + } + } + } + scope:other_family_spouse = { + create_character_memory = { + type = wedding_infidelity_victim + participants = { + other_spouse = root + in_law = scope:flirting_in_law + } + } + } + } + } + #Join us, it definitely isn't weird + option = { + name = ep3_wedding.0003.a + flavor = ep3_wedding.0003.a.flavor + trigger = { + #other family spouse is either attracted to root or their own family member + scope:other_family_spouse = { + NOR = { + has_trait = chaste + has_trait = celibate + } + } + OR = { + AND = { + #attracted to root + OR = { + has_trait = seducer + attraction > 0 + scope:other_family_spouse = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target = root + } + has_relation_lover = scope:other_family_spouse + scope:other_family_spouse = { + opinion = { + target = root + value >= 80 + } + } + } + scope:other_family_spouse = { + is_attracted_to_gender_of = root + ep3_wedding_0001_relative_ages_trigger = yes + } + } + AND = { + #attracted to own family member + scope:flirting_in_law = { + OR = { + has_trait = seducer + attraction > 0 + scope:other_family_spouse = { + has_activity_intent = woo_attendee_intent + scope:host.intent_target = scope:flirting_in_law + } + has_relation_lover = scope:other_family_spouse + scope:other_family_spouse = { + opinion = { + target = scope:flirting_in_law + value >= 80 + } + } + } + scope:other_family_spouse = { + is_attracted_to_gender_of = scope:flirting_in_law + OR = { + #Both people aren't old + AND = { + age <= 55 + scope:flirting_in_law = { + age <= 55 + } + } + #Both people are old + AND = { + age > 55 + scope:flirting_in_law = { + age > 55 + } + } + #Root is old + AND = { + scope:flirting_in_law = { + age > 55 + } + OR = { + age > 40 + is_deviant_trigger = yes + } + } + #Target is old + AND = { + scope:flirting_in_law = { + OR = { + age > 40 + is_deviant_trigger = yes + } + } + age > 55 + } + } + } + } + } + } + #Down to rashly do incest + scope:other_family_spouse = { + OR = { + 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 } + } + has_trait = lustful + has_trait = drunkard + #Will overlook scruples if root is really hot or persuasive + root = { + OR = { + has_trait = seducer + has_relation_lover = scope:other_family_spouse + has_trait = beauty_good_3 + attraction >= 30 + reverse_opinion = { + target = scope:other_family_spouse + value >= 100 + } + } + } + } + } + + #in law is down to rashly do incest + scope:flirting_in_law = { + OR = { + 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 } + } + has_trait = lustful + has_trait = drunkard + #Will overlook scruples if root is really hot or persuasive + root = { + OR = { + has_trait = seducer + has_relation_lover = scope:flirting_in_law + has_trait = beauty_good_3 + attraction >= 30 + reverse_opinion = { + target = scope:flirting_in_law + value >= 100 + } + } + } + } + } + } + add_internal_flag = special + if = { + limit = { + scope:other_family_spouse = { + is_attracted_to_gender_of = root + } + is_attracted_to_gender_of = scope:other_family_spouse + } + had_sex_with_effect = { + CHARACTER = scope:other_family_spouse + PREGNANCY_CHANCE = pregnancy_chance + } + } + had_sex_with_effect = { + CHARACTER = scope:flirting_in_law + PREGNANCY_CHANCE = pregnancy_chance + } + + if = { + limit = { + scope:flirting_in_law = { + is_attracted_to_gender_of = scope:other_family_spouse + } + scope:other_family_spouse = { + is_attracted_to_gender_of = scope:flirting_in_law + } + } + scope:other_family_spouse = { + had_sex_with_effect = { + CHARACTER = scope:flirting_in_law + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:flirting_in_law } + scope:flirting_in_law = { + is_attracted_to_gender_of = root + } + is_attracted_to_gender_of = scope:flirting_in_law + } + set_relation_lover = { + target = scope:flirting_in_law + reason = lover_absconded_during_wedding + } + } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:other_family_spouse } + scope:other_family_spouse = { + is_attracted_to_gender_of = root + } + is_attracted_to_gender_of = scope:other_family_spouse + } + set_relation_lover = { + target = scope:other_family_spouse + reason = lover_incestuous_wedding_threesome + } + } + + if = { + limit = { + NOT = { + has_trait = lifestyle_reveler + } + } + add_trait = lifestyle_reveler + } + else = { + add_trait_xp = { + trait = lifestyle_reveler + value = 50 + } + } + if = { + limit = { + NOT = { + has_trait = seducer + } + } + add_trait = seducer + } + else = { + add_diplomacy_skill = 1 + } + stress_impact = { + chaste = major_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 300 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = 0.5 + } + modifier = { + add = -250 + NOR = { + is_deviant_trigger = yes + is_incestuous_trigger = yes + has_trait = lustful + has_trait = drunkard + } + } + modifier = { + factor = 0 + OR = { + has_trait = chaste + #attracted to root + NOT = { is_attracted_to_gender_of = scope:other_family_spouse } + NOR = { + #Both people aren't old + AND = { + age <= 55 + scope:other_family_spouse = { + age <= 55 + } + } + #Both people are old + AND = { + age > 55 + scope:other_family_spouse = { + age > 55 + } + } + #Root is old + AND = { + scope:other_family_spouse = { + age > 55 + } + OR = { + age > 40 + is_deviant_trigger = yes + } + } + #Target is old + AND = { + scope:other_family_spouse = { + OR = { + age > 40 + is_deviant_trigger = yes + } + } + age > 55 + } + } + } + } + } + } + + #We will never speak of this again... or else + option = { + name = ep3_wedding.0003.b + trigger = { + OR = { + dread >= 80 + has_trait = torturer + scope:other_family_spouse = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + } + } + scope:other_family_spouse = { + add_stress = major_stress_impact_gain + } + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + NOR = { + AND = { + scope:other_family_spouse.faith = { + has_doctrine = doctrine_adultery_men_accepted + } + is_male = yes + } + AND = { + scope:other_family_spouse.faith = { + has_doctrine = doctrine_adultery_women_accepted + } + is_female = yes + } + } + } + scope:other_family_spouse = { + add_opinion = { + modifier = cheater_opinion + target = root + opinion = -100 + } + } + } + else = { + scope:other_family_spouse = { + add_opinion = { + modifier = threatened_opinion + target = root + opinion = -25 + } + } + } + if = { + limit = { + has_relation_soulmate = scope:other_family_spouse + } + remove_relation_soulmate = scope:other_family_spouse + } + stress_impact = { + compassionate = major_stress_impact_gain + forgiving = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_compassion = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = trusting + } + } + } + } + + #AN EVIL SPIRIT CAME OVER ME OR SOMETHING + option = { + name = ep3_wedding.0003.c + flavor = ep3_wedding.0003.c.flavor + trigger = { + OR = { + has_trait = possessed + has_trait = lunatic + has_trait = witch + has_trait = lifestyle_mystic + has_trait = deceitful + has_trait = schemer + has_trait = arbitrary + has_trait = zealous + has_trait = eccentric + } + } + duel = { + skills = { diplomacy intrigue } + target = scope:other_family_spouse + 50 = { #They agree not to speak of this horrible affliction + desc = ep3_wedding.0003.c.success.desc + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = 20 + has_trait = possessed + } + modifier = { + add = 20 + has_trait = lunatic + } + modifier = { + add = 20 + has_trait = witch + } + modifier = { + add = 20 + has_trait = lifestyle_mystic + } + modifier = { + add = 10 + reverse_opinion = { + target = scope:other_family_spouse + value >= 80 + } + } + modifier = { + add = 10 + reverse_opinion = { + target = scope:other_family_spouse + value >= 50 + } + } + modifier = { + add = 10 + reverse_opinion = { + target = scope:other_family_spouse + value > 25 + } + } + modifier = { + add = 50 + scope:other_family_spouse = { + OR = { + has_trait = zealous + has_trait = trusting + has_trait = eccentric + } + } + } + modifier = { + add = 25 + scope:other_family_spouse = { + OR = { + has_trait = forgiving + has_trait = lifestyle_mystic + has_trait = witch + has_trait = possessed + has_trait = lunatic + } + } + } + send_interface_toast = { + type = event_toast_effect_good + title = ep3_wedding.0003.c.success.desc + left_icon = scope:other_family_spouse + + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = 25 + } + } + add_character_modifier = { + modifier = possessed_by_lust_demon_modifier + years = 10 + desc = lust_demon_success_chance + } + custom_tooltip = lust_demon_success_chance_tt + hidden_effect = { + if = { + limit = { + scope:flirting_in_law = { + is_female = yes + age <= 45 + is_pregnant = no + } + is_male = yes + } + scope:flirting_in_law = { + make_pregnant = { + father = root + number_of_children = 1 + } + } + } + else_if = { + limit = { + is_female = yes + age <= 45 + is_pregnant = no + scope:flirting_in_law = { + is_male = yes + } + } + make_pregnant = { + father = scope:flirting_in_law + number_of_children = 3 + } + } + } + } + } + 50 = { #They don't buy this bullshit + desc = ep3_wedding.0003.c.fail.desc + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = 20 + scope:other_family_spouse = { + OR = { + has_trait = lustful + has_trait = paranoid + has_trait = sadistic + has_trait = deceitful + has_trait = schemer + } + } + } + modifier = { + add = 20 + reverse_opinion = { + target = scope:other_family_spouse + value <= -60 + } + } + modifier = { + add = 20 + reverse_opinion = { + target = scope:other_family_spouse + value <= -30 + } + } + modifier = { + add = 10 + reverse_opinion = { + target = scope:other_family_spouse + value <= 0 + } + } + modifier = { + add = 50 + scope:other_family_spouse = { + OR = { + has_trait = cynical + has_trait = vengeful + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_wedding.0003.c.fail.desc + left_icon = scope:other_family_spouse + + if = { + limit = { + scope:other_family_spouse = { + can_add_hook = { + target = root + type = manipulation_hook + } + } + } + scope:other_family_spouse = { + add_hook = { + type = manipulation_hook + target = root + } + } + } + if = { + limit = { + scope:other_family_spouse = { + can_add_hook = { + target = scope:flirting_in_law + type = manipulation_hook + } + } + } + scope:other_family_spouse = { + add_hook = { + type = manipulation_hook + target = scope:flirting_in_law + } + } + } + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + NOR = { + AND = { + scope:other_family_spouse.faith = { + has_doctrine = doctrine_adultery_men_accepted + } + is_male = yes + } + AND = { + scope:other_family_spouse.faith = { + has_doctrine = doctrine_adultery_women_accepted + } + is_female = yes + } + } + } + scope:other_family_spouse = { + add_opinion = { + modifier = cheater_opinion + target = root + opinion = -100 + } + } + } + else = { + scope:other_family_spouse = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + } + add_piety = major_piety_loss + } + + } + } + if = { + limit = { + has_relation_soulmate = scope:other_family_spouse + } + remove_relation_soulmate = scope:other_family_spouse + } + stress_impact = { + zealous = minor_stress_impact_gain + just = medium_stress_impact_gain + honest = major_stress_impact_gain + + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_honor = -1 + ai_zeal = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = honest + diplomacy < low_skill_rating + intrigue < low_skill_rating + AND = { + diplomacy < mediocre_skill_rating + intrigue < mediocre_skill_rating + } + } + } + modifier = { + add = -100 + OR = { + diplomacy < mediocre_skill_rating + intrigue < mediocre_skill_rating + AND = { + diplomacy < medium_skill_rating + intrigue < medium_skill_rating + } + } + } + modifier = { + add = 100 + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = lifestyle_mystic + } + } + } + } + #I don't even care, this just makes me look cool + option = { + name = ep3_wedding.0003.d + flavor = ep3_wedding.0003.d.flavor + if = { + limit = { + NOT = { + has_trait = lifestyle_reveler + } + } + add_trait = lifestyle_reveler + } + else = { + add_trait_xp = { + trait = lifestyle_reveler + value = 25 + } + } + add_character_modifier = { + modifier = unflappable_boudoir_confidence_modifier + years = 10 + } + if = { + limit = { + is_male = yes + scope:flirting_in_law = { + is_male = yes + } + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = sodomite + GENDER_CHARACTER = root + FAITH = root.faith + } + NOT = { has_trait = sodomite } + } + add_trait = sodomite + } + if = { + limit = { + relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:flirting_in_law } + NOT = { has_trait = incestuous } + } + add_trait = incestuous + } + if = { + limit = { + is_married = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = adulterer + GENDER_CHARACTER = root + FAITH = root.faith + } + NOT = { has_trait = adulterer } + } + add_trait = adulterer + } + if = { + limit = { + is_married = no + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = fornicator + GENDER_CHARACTER = root + FAITH = root.faith + } + NOT = { has_trait = fornicator } + } + add_trait = fornicator + } + if = { + limit = { + scope:flirting_in_law = { + is_married = yes + } + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = adulterer + GENDER_CHARACTER = scope:flirting_in_law + FAITH = scope:flirting_in_law.faith + } + scope:flirting_in_law = { + NOT = { has_trait = adulterer } + } + } + scope:flirting_in_law = { add_trait = adulterer } + } + if = { + limit = { + scope:flirting_in_law = { + is_married = no + } + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = fornicator + GENDER_CHARACTER = scope:flirting_in_law + FAITH = scope:flirting_in_law.faith + } + scope:flirting_in_law = { + NOT = { has_trait = fornicator } + } + } + scope:flirting_in_law = { add_trait = fornicator } + } + if = { + limit = { + is_male = yes + scope:flirting_in_law = { + is_male = yes + } + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = sodomite + GENDER_CHARACTER = scope:flirting_in_law + FAITH = scope:flirting_in_law.faith + } + scope:flirting_in_law = { + NOT = { has_trait = sodomite } + } + } + scope:flirting_in_law = { add_trait = sodomite } + } + if = { + limit = { + scope:flirting_in_law = { + relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = root } + NOT = { has_trait = incestuous } + } + } + scope:flirting_in_law = { add_trait = incestuous } + } + if = { + limit = { + OR = { + this = scope:activity.special_guest:spouse_2 + this = scope:activity.special_guest:spouse_1 + } + NOR = { + AND = { + scope:other_family_spouse.faith = { + has_doctrine = doctrine_adultery_men_accepted + } + is_male = yes + } + AND = { + scope:other_family_spouse.faith = { + has_doctrine = doctrine_adultery_women_accepted + } + is_female = yes + } + } + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:other_family_spouse } + } + scope:other_family_spouse = { + set_relation_rival = { + target = root + reason = rival_wedding_infidelity + } + } + } + else_if = { + limit = { + can_set_relation_nemesis_trigger = { CHARACTER = scope:other_family_spouse } + } + scope:other_family_spouse = { + set_relation_nemesis = { + target = root + reason = rival_wedding_infidelity + } + } + } + } + else = { + scope:other_family_spouse = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + } + if = { + limit = { + scope:flirting_in_law = { + OR = { + is_married = yes + is_concubine = yes + } + } + } + scope:flirting_in_law = { + every_consort = { + limit = { + this != root + NOR = { + AND = { + faith = { + has_doctrine = doctrine_adultery_men_accepted + } + scope:flirting_in_law = { + is_male = yes + } + } + AND = { + faith = { + has_doctrine = doctrine_adultery_women_accepted + } + scope:flirting_in_law = { + is_female = yes + } + } + } + } + add_opinion = { + modifier = cheater_opinion + target = scope:flirting_in_law + opinion = -100 + } + } + } + } + if = { + limit = { + has_relation_soulmate = scope:other_family_spouse + } + remove_relation_soulmate = scope:other_family_spouse + } + stress_impact = { + paranoid = minor_stress_impact_gain + just = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_boldness = 1 + } + modifier = { + add = -75 + OR = { + AND = { + faith = { + has_doctrine = doctrine_adultery_men_shunned + } + is_male = yes + } + AND = { + faith = { + has_doctrine = doctrine_adultery_women_shunned + } + is_female = yes + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = just + AND = { + faith = { + has_doctrine = doctrine_adultery_men_crime + } + is_male = yes + } + AND = { + faith = { + has_doctrine = doctrine_adultery_women_crime + } + is_female = yes + } + } + } + } + } + #I'm sorry!!! Please don't tell anyone!!! + option = { + name = ep3_wedding.0003.e + flavor = ep3_wedding.0003.e.flavor + if = { + limit = { + scope:other_family_spouse = { + can_add_hook = { + target = root + type = manipulation_hook + } + } + } + scope:other_family_spouse = { + add_hook = { + type = manipulation_hook + target = root + } + } + } + if = { + limit = { + scope:other_family_spouse = { + can_add_hook = { + target = scope:flirting_in_law + type = manipulation_hook + } + } + } + scope:other_family_spouse = { + add_hook = { + type = manipulation_hook + target = scope:flirting_in_law + } + } + } + scope:other_family_spouse = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -75 + } + } + if = { + limit = { + has_relation_soulmate = scope:other_family_spouse + } + remove_relation_soulmate = scope:other_family_spouse + } + stress_impact = { + arrogant = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = -0.5 + ai_honor = 0.5 + } + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + after = { + remove_character_flag = is_naked + scope:flirting_in_law = { + remove_character_flag = is_naked + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_yearly_1.txt b/N3OW/events/dlc/ep3/ep3_yearly_1.txt new file mode 100644 index 00000000..528ca641 --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_yearly_1.txt @@ -0,0 +1,267 @@ +namespace = ep3_yearly + +scripted_effect transfer_warhorse_story_effect = { + $OWNER$ = { + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + make_story_owner = $TARGET$ + } + } + $TARGET$ = { + add_character_modifier = { modifier = horse_story_modifier } + add_character_flag = had_warhorse_story + set_variable = { + name = warhorse_modifier_level + value = $OWNER$.var:warhorse_modifier_level + } + } + $OWNER$ = { + hidden_effect = { + remove_character_modifier = horse_story_modifier + remove_variable = warhorse_modifier_level + } + } +} + +# Jealous of another governor with the Warhorse event chain +ep3_yearly.1010 = { + type = character_event + title = ep3_yearly.1010.t + desc = { + desc = ep3_yearly.1010.intro + triggered_desc = { + trigger = { culture = culture:greek } + desc = ep3_yearly.1010.greek_flavor + } + desc = ep3_yearly.1010.outro + } + theme = administrative + override_background = { reference = courtyard } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:horse_owner + animation = jockey_walk + camera = camera_event_horse_right + } + lower_left_portrait = cp:councillor_spymaster + + trigger = { + is_ai = no + is_governor = yes + NOT = { owns_story_of_type = story_cycle_martial_lifestyle_warhorse } + liege = { + any_vassal = { + this != root + is_available_ai_adult = yes + is_governor = yes + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + exists = var:horse_gender + exists = var:story_cycle_horse_name + } + } + } + } + + immediate = { + liege = { + random_vassal = { + limit = { + this != root + is_available_ai_adult = yes + owns_story_of_type = story_cycle_martial_lifestyle_warhorse + } + save_scope_as = horse_owner + } + } + cp:councillor_spymaster ?= { save_scope_as = spymaster } + } + + option = { # Offer to buy the horse + name = ep3_yearly.1010.a + show_as_unavailable = { + gold >= 75 + } + random_list = { + 50 = { + show_chance = no + desc = ep3_yearly.1010.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_yearly.1010.a.tt.success + left_icon = root + right_icon = scope:horse_owner + remove_short_term_gold = major_gold_value + custom_tooltip = ep3_yearly.1010.tt + transfer_warhorse_story_effect = { + OWNER = scope:horse_owner + TARGET = root + } + } + } + 50 = { + show_chance = no + desc = ep3_yearly.1010.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_yearly.1010.a.tt.failure + left_icon = root + right_icon = scope:horse_owner + change_influence = medium_influence_loss + add_prestige = medium_prestige_loss + } + } + } + } + + option = { # Convince the governor that you deserve the horse because of your influence + name = ep3_yearly.1010.b + change_influence = massive_influence_loss + if = { + limit = { influence_level >= 3 } + transfer_warhorse_story_effect = { + OWNER = scope:horse_owner + TARGET = root + } + } + else = { + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_yearly.1010.b.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_yearly.1010.b.tt.success + left_icon = root + right_icon = scope:horse_owner + custom_tooltip = ep3_yearly.1010.tt + transfer_warhorse_story_effect = { + OWNER = scope:horse_owner + TARGET = root + } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_yearly.1010.b.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_yearly.1010.b.tt.failure + left_icon = root + right_icon = scope:horse_owner + } + } + } + } + } + + option = { # Ask your spymaster to steal the horse for you + trigger = { exists = cp:councillor_spymaster } + name = ep3_yearly.1010.c + flavor = ep3_yearly.1010.c.flavor + cp:councillor_spymaster = { + duel = { + skill = intrigue + value = scope:horse_owner.intrigue + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = ep3_yearly.1010.c.tt.success + root = { + send_interface_toast = { + type = event_toast_effect_good + title = ep3_yearly.1010.c.tt.success + left_icon = root + right_icon = scope:horse_owner + custom_tooltip = ep3_yearly.1010.tt + transfer_warhorse_story_effect = { + OWNER = scope:horse_owner + TARGET = root + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + } + } + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = ep3_yearly.1010.c.tt.failure + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_yearly.1010.c.tt.failure + left_icon = root + right_icon = scope:horse_owner + progress_towards_rival_effect = { + REASON = rival_lands_stolen + CHARACTER = scope:horse_owner + OPINION = default_rival_opinion + } + } + } + } + } + } + } + + option = { # If I can't have it, neither can you + name = ep3_yearly.1010.d + flavor = ep3_yearly.1010.d.tt + random_list = { + 50 = { + desc = ep3_yearly.1010.d.success + send_interface_toast = { + type = event_toast_effect_good + title = ep3_yearly.1010.d.success + custom_tooltip = ep3_yearly.1010.d.dead_horse + scope:horse_owner = { + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + end_story = yes + } + } + } + } + 50 = { + desc = ep3_yearly.1010.d.failure + send_interface_toast = { + type = event_toast_effect_bad + title = ep3_yearly.1010.d.failure + custom_tooltip = ep3_yearly.1010.d.dead_horse + scope:horse_owner = { + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + end_story = yes + } + } + progress_towards_rival_effect = { + REASON = rival_lands_stolen + CHARACTER = scope:horse_owner + OPINION = default_rival_opinion + } + } + } + } + } +} diff --git a/N3OW/events/dlc/ep3/ep3_yearly_3.txt b/N3OW/events/dlc/ep3/ep3_yearly_3.txt new file mode 100644 index 00000000..91bbd38c --- /dev/null +++ b/N3OW/events/dlc/ep3/ep3_yearly_3.txt @@ -0,0 +1,9 @@ +namespace = ep3_yearly + +ep3_yearly.3000 = { + hidden = yes + + immediate = { + ep3_ai_castration_effect = yes + } +} diff --git a/N3OW/events/dlc/fp1/fp1_jomsvikings_events.txt b/N3OW/events/dlc/fp1/fp1_jomsvikings_events.txt new file mode 100644 index 00000000..82740096 --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_jomsvikings_events.txt @@ -0,0 +1,2222 @@ +namespace = fp1_jomsvikings + +################################################## +# #Standard Events +# 0001 - 0010 Jomsvikings offer a Retainer +# 0011 - 0020 Jomsvikings terrorise their neighbours +# 0021 - 0030 Jomsvikings send Event Troops +# 0031 - 0040 SPARE +# 0041 - 0050 Jomsvikings challenge a Dishonourable Norse Pagan Ruler to Holmgang +# +# #Special Events +# 1001 - 1010 Jomsvikings Destroyed +# 1011 - 1020 Jomsvikings Formed Autonomously +################################################## + + + + + +################################################## +# #Generic Scripted Triggers + +scripted_trigger fp1_pious_enough_for_jomsvikings_reward_trigger = { + # You must share their faith. + faith = global_var:jomsvikings_title.holder.faith + # Piety level minimum. + piety_level >= high_piety_level + # Sin maximum. + num_sinful_traits <= 1 + # Piety to spend. + piety >= major_piety_value + # The Grandmaster needs to not hate you also. + global_var:jomsvikings_title.holder = { + has_any_bad_relationship_with_root_trigger = no + opinion = { + target = root + value >= low_negative_opinion + } + } +} + +scripted_trigger fp1_jomsvikings_exist_in_range_trigger = { + # Do they exist at all? + exists = global_var:jomsvikings_title + # Are they within diplomatic range? + exists = global_var:jomsvikings_title.holder + in_diplomatic_range = global_var:jomsvikings_title.holder +} + +################################################## +# #Standard Events + +################################################## +# Jomsvikings offer a Retainer +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# You are rewarded for your piety with a loyal warrior. +fp1_jomsvikings.0001 = { + type = character_event + title = fp1_jomsvikings.0001.t + desc = { + desc = fp1_jomsvikings.0001.desc.intro + # Describe scope:retainer_a. + first_valid = { + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:zealous } + desc = fp1_jomsvikings.0001.desc.zealous + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:wrathful } + desc = fp1_jomsvikings.0001.desc.wrathful + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:impatient } + desc = fp1_jomsvikings.0001.desc.impatient + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:arrogant } + desc = fp1_jomsvikings.0001.desc.arrogant + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:brave } + desc = fp1_jomsvikings.0001.desc.brave + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:ambitious } + desc = fp1_jomsvikings.0001.desc.ambitious + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:diligent } + desc = fp1_jomsvikings.0001.desc.diligent + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:gregarious } + desc = fp1_jomsvikings.0001.desc.gregarious + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:stubborn } + desc = fp1_jomsvikings.0001.desc.stubborn + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:fickle } + desc = fp1_jomsvikings.0001.desc.fickle + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:vengeful } + desc = fp1_jomsvikings.0001.desc.vengeful + } + triggered_desc = { + trigger = { scope:retainer_a_descriptor = flag:viking } + desc = fp1_jomsvikings.0001.desc.viking + } + } + desc = fp1_jomsvikings.0001.desc.connector + # Describe scope:retainer_b. + first_valid = { + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:zealous } + desc = fp1_jomsvikings.0001.desc.zealous + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:wrathful } + desc = fp1_jomsvikings.0001.desc.wrathful + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:impatient } + desc = fp1_jomsvikings.0001.desc.impatient + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:arrogant } + desc = fp1_jomsvikings.0001.desc.arrogant + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:brave } + desc = fp1_jomsvikings.0001.desc.brave + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:ambitious } + desc = fp1_jomsvikings.0001.desc.ambitious + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:diligent } + desc = fp1_jomsvikings.0001.desc.diligent + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:gregarious } + desc = fp1_jomsvikings.0001.desc.gregarious + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:stubborn } + desc = fp1_jomsvikings.0001.desc.stubborn + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:fickle } + desc = fp1_jomsvikings.0001.desc.fickle + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:vengeful } + desc = fp1_jomsvikings.0001.desc.vengeful + } + triggered_desc = { + trigger = { scope:retainer_b_descriptor = flag:viking } + desc = fp1_jomsvikings.0001.desc.viking + } + } + desc = fp1_jomsvikings.0001.desc.outro + } + theme = faith + left_portrait = { + character = scope:retainer_a + animation = personality_zealous + } + right_portrait = { + character = scope:retainer_b + animation = admiration + } + lower_center_portrait = scope:leader + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # The Jomsvikings must exist; check this before the usual standard checks for best efficiency. + fp1_jomsvikings_exist_in_range_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_jomsvikings_0001 } + # You must fulfill their generic piety requirements. + fp1_pious_enough_for_jomsvikings_reward_trigger = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for excess levels of piety & high levels of prestige. + fp1_jomsvikings_approve_of_extra_piety_and_prestige_modifier = yes + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_jomsvikings_0001 + days = 1825 + } + # Grab the Grandmaster. + global_var:jomsvikings_title.holder = { save_scope_as = leader } + # Generate a brace of possible retainers. + ## First a martial-focused character. + create_character = { + location = root.capital_province + template = fp1_jomsviking_retainer_martial + save_scope_as = retainer_a + } + ## Then a prowess-focused character. + create_character = { + location = root.capital_province + template = fp1_jomsviking_retainer_prowess + save_scope_as = retainer_b + } + # Generate a descriptive string for each retainer. + ## Twelve options of 8.3% each. + ## First, retainer_a. + scope:retainer_a = { + random_list = { + # Zealous + 100 = { + trigger = { has_trait = zealous } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:zealous + } + } + # Wrathful + 100 = { + trigger = { has_trait = wrathful } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:wrathful + } + } + # Impatient + 100 = { + trigger = { has_trait = impatient } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:impatient + } + } + # Arrogant + 100 = { + trigger = { has_trait = arrogant } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:arrogant + } + } + # Brave + 100 = { + trigger = { has_trait = brave } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:brave + } + } + # Ambitious + 100 = { + trigger = { has_trait = ambitious } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:ambitious + } + } + # Diligent + 100 = { + trigger = { has_trait = diligent } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:diligent + } + } + # Gregarious + 100 = { + trigger = { has_trait = gregarious } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:gregarious + } + } + # Stubborn + 100 = { + trigger = { has_trait = stubborn } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:stubborn + } + } + # Fickle + 100 = { + trigger = { has_trait = fickle } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:fickle + } + } + # Vengeful + 100 = { + trigger = { has_trait = vengeful } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:vengeful + } + } + # Viking + 100 = { + trigger = { has_trait = viking } + save_scope_value_as = { + name = retainer_a_descriptor + value = flag:viking + } + } + } + } + ## Then, retainer_b. + scope:retainer_b = { + random_list = { + # Zealous + 100 = { + trigger = { + has_trait = zealous + NOT = { scope:retainer_a_descriptor = flag:zealous } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:zealous + } + } + # Wrathful + 100 = { + trigger = { + has_trait = wrathful + NOT = { scope:retainer_a_descriptor = flag:wrathful } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:wrathful + } + } + # Impatient + 100 = { + trigger = { + has_trait = impatient + NOT = { scope:retainer_a_descriptor = flag:impatient } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:impatient + } + } + # Arrogant + 100 = { + trigger = { + has_trait = arrogant + NOT = { scope:retainer_a_descriptor = flag:arrogant } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:arrogant + } + } + # Brave + 100 = { + trigger = { + has_trait = brave + NOT = { scope:retainer_a_descriptor = flag:brave } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:brave + } + } + # Ambitious + 100 = { + trigger = { + has_trait = ambitious + NOT = { scope:retainer_a_descriptor = flag:ambitious } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:ambitious + } + } + # Diligent + 100 = { + trigger = { + has_trait = diligent + NOT = { scope:retainer_a_descriptor = flag:diligent } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:diligent + } + } + # Gregarious + 100 = { + trigger = { + has_trait = gregarious + NOT = { scope:retainer_a_descriptor = flag:gregarious } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:gregarious + } + } + # Stubborn + 100 = { + trigger = { + has_trait = stubborn + NOT = { scope:retainer_a_descriptor = flag:stubborn } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:stubborn + } + } + # Fickle + 100 = { + trigger = { + has_trait = fickle + NOT = { scope:retainer_a_descriptor = flag:fickle } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:fickle + } + } + # Vengeful + 100 = { + trigger = { + has_trait = vengeful + NOT = { scope:retainer_a_descriptor = flag:vengeful } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:vengeful + } + } + # Viking + 100 = { + trigger = { + has_trait = viking + NOT = { scope:retainer_a_descriptor = flag:viking } + } + save_scope_value_as = { + name = retainer_b_descriptor + value = flag:viking + } + } + } + } + } + + # Scope:retainer_a looks formidable! + option = { + name = fp1_jomsvikings.0001.a + + # Spend the piety cost. + add_piety = major_piety_loss + # Gain the courtier. + add_courtier = scope:retainer_a + # Send the other lad packing back to the Jomsvikings. + hidden_effect = { + scope:leader = { add_courtier = scope:retainer_b } + } + + stress_impact = { + trusting = minor_stress_impact_loss + zealous = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.75 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # Scope:retainer_b shall serve me well. + option = { + name = fp1_jomsvikings.0001.b + + # Spend the piety cost. + add_piety = major_piety_loss + # Gain the courtier. + add_courtier = scope:retainer_b + # Send the other lad packing back to the Jomsvikings. + hidden_effect = { + scope:leader = { add_courtier = scope:retainer_a } + } + + stress_impact = { + trusting = minor_stress_impact_loss + zealous = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.75 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # I'm fine, thanks. + option = { + name = fp1_jomsvikings.0001.c + + # Gain a little consolation prestige. + add_prestige = minor_prestige_gain + # Send both lads packing. + scope:leader = { + hidden_effect = { + add_courtier = scope:retainer_a + add_courtier = scope:retainer_b + } + } + # The Grandmaster considers this an insult. + scope:leader = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -30 + } + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + } + } + + stress_impact = { + paranoid = medium_stress_impact_loss + cynical = major_stress_impact_loss + trusting = minor_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_rationality = -0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -10 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } +} + +################################################## +# Jomsvikings terrorise their neighbours +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +scripted_trigger fp1_viable_target_for_jomsviking_aggression_trigger = { + holder = root + + # The Jomsvikings won't pillage faithful non-reformist Asatru. Much. + NOT = { faith = faith:norse_pagan } + + # Otherwise, they need something coastal or nearby. + OR = { + title_province = { is_coastal = yes } + + # TIT-25456 + any_neighboring_county = { + save_temporary_scope_as = current_county + exists = global_var:jomsvikings_title.holder.faith + global_var:jomsvikings_title.holder.faith = { + any_faith_holy_order = { + title = global_var:jomsvikings_title + any_leased_title = { county = scope:current_county } + } + } + } + } +} + +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 + } + } +} + +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 + } + } +} + +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 + } + } +} + +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 + } + } +} + +# You are singled out as a traitor/viable target. +fp1_jomsvikings.0011 = { + type = character_event + title = { + first_valid = { + # Reformed Asatruans. + triggered_desc = { + trigger = { + religion = religion:germanic_religion + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + desc = fp1_jomsvikings.0011.t.reformed_norse + } + # Reformed non-Asatruans. + triggered_desc = { + trigger = { + NAND = { + religion = religion:germanic_religion + faith = { has_doctrine_parameter = unreformed } + } + } + desc = fp1_jomsvikings.0011.t.reformed_other + } + # Unreformed/fallback. + desc = fp1_jomsvikings.0011.t.fallback + } + } + desc = { + desc = fp1_jomsvikings.0011.desc.intro + # Is this an ideological raid or an economic one? + first_valid = { + # Ideological, reformist. + triggered_desc = { + trigger = { + religion = religion:germanic_religion + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + desc = fp1_jomsvikings.0011.desc.ideological_reformist + } + # Ideological, other. + triggered_desc = { + trigger = { + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + desc = fp1_jomsvikings.0011.desc.ideological_other + } + # Economic. + desc = fp1_jomsvikings.0011.desc.economic + } + desc = fp1_jomsvikings.0011.desc.outro + } + theme = war + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:leader + animation = rage + } + lower_left_portrait = scope:benefactor + override_background = { reference = burning_building } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # The Jomsvikings must exist; check this before the usual standard checks for best efficiency. + fp1_jomsvikings_exist_in_range_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_jomsvikings_0011 } + # Must not be following the unreformed version of Norse paganism. + NOT = { faith = global_var:jomsvikings_title.holder.faith } + # Out of fairness/for performance, restrict this to dukes & above. + highest_held_title_tier >= tier_duchy + # You must either hold a valid coastal province, or else border someone who hosts the Jomsvikings. + any_sub_realm_county = { fp1_viable_target_for_jomsviking_aggression_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Extra rage is reserved for Germanic reformists, as they're the traitoriest traitors. + modifier = { + add = 1 + religion = religion:germanic_religion + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + } + + immediate = { + play_music_cue = "mx_cue_combat_2" + # Set up a cooldowns. + ## Reformed Germanics get a shorter cooldown. + if = { + limit = { + religion = religion:germanic_religion + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + add_character_flag = { + flag = had_event_fp1_jomsvikings_0011 + days = 1825 + } + } + ## Everyone else gets a decent breather. + else = { + add_character_flag = { + flag = had_event_fp1_jomsvikings_0011 + days = 5475 + } + } + # Grab the Grandmaster. + global_var:jomsvikings_title.holder = { save_scope_as = leader } + # Flag a suitable target. + ## First, add everything to a list. + every_sub_realm_county = { + limit = { fp1_viable_target_for_jomsviking_aggression_trigger = yes } + add_to_list = viable_jomsviking_targets_list + } + ## Then, sort through that list and pick out a painful target. + ordered_in_list = { + list = viable_jomsviking_targets_list + order_by = fp1_jomvsvikings_raid_value + save_scope_as = target_county + } + # And an origin for the Jomsvikings. + scope:leader.faith = { + random_faith_holy_order = { + limit = { leader = scope:leader } + # Preferring something closer. + ## First, we check to see if it's even necessary to look at distance, since distance is an expensive check. + if = { + limit = { + # Since this is purely for loc, we can just flat rule it out for non-players. + root = { is_ai = no } + # Otherwise, we're just looking to see if the Jomsvikings have more than two leased holdings. + num_leased_titles >= 2 + } + # Try successive distances. + ## About a Wales or so away. + if = { + limit = { fp1_jomsviking_raid_source_one_wales_trigger = yes } + random_leased_title = { + limit = { fp1_jomsviking_raid_source_one_wales_trigger = yes } + save_scope_as = raid_source + } + } + ## About an Ireland away. + if = { + limit = { fp1_jomsviking_raid_source_one_ireland_trigger = yes } + random_leased_title = { + limit = { fp1_jomsviking_raid_source_one_ireland_trigger = yes } + save_scope_as = raid_source + } + } + ## About a France away. + if = { + limit = { fp1_jomsviking_raid_source_one_france_trigger = yes } + random_leased_title = { + limit = { fp1_jomsviking_raid_source_one_france_trigger = yes } + save_scope_as = raid_source + } + } + ## About an HRE away. + if = { + limit = { fp1_jomsviking_raid_source_one_hre_trigger = yes } + random_leased_title = { + limit = { fp1_jomsviking_raid_source_one_hre_trigger = yes } + save_scope_as = raid_source + } + } + ## Still nothing? Uhhhh, sod it, just pick at random. + else = { + random_leased_title = { save_scope_as = raid_source } + } + } + # But otherwise we just grab their capital or w/e. + else = { + random_leased_title = { save_scope_as = raid_source } + } + } + } + # Check to see if there's a good neighbour to import clergy from. + ## Only necessary if root is reformed, since unreformed don't have this option. + if = { + limit = { + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + faith = root.faith + # Filter out anyone who sincerely hates you. + has_any_bad_relationship_with_root_trigger = no + opinion = { + target = root + value >= very_high_negative_opinion + } + } + save_scope_as = benefactor + } + } + } + + # Try to out-strategise the pirates. + option = { + name = fp1_jomsvikings.0011.a + + # Martial duel to fend off the lightning assault. + duel = { + skill = martial + target = scope:leader + # You outmanoeuvre the pirates. + ## Really gotta balance in the player's favour, as the Jomsvikings tend to have OP leaders. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_jomsvikings.0011.a.tt_success + send_interface_toast = { + title = fp1_jomsvikings.0011.a.tt_success + left_icon = scope:leader + # Tiny control loss. + scope:target_county = { change_county_control = miniscule_county_control_loss } + # Decent prestige gain for unreformed. + if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + } + add_prestige = medium_prestige_gain + } + # Decent piety gain for reformed. + else = { add_piety = medium_piety_gain } + } + } + # The Jomsvikings sack *everything*. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_jomsvikings.0011.a.tt_failure + send_interface_toast = { + title = fp1_jomsvikings.0011.a.tt_failure + left_icon = scope:leader + # Colossal control loss. + scope:target_county = { change_county_control = massive_county_control_loss } + # Minor prestige loss for unreformed. + if = { + limit = { + faith = { has_doctrine_parameter = unreformed } + } + add_prestige = minor_prestige_loss + } + # Minor piety loss for reformed. + else = { add_piety = minor_piety_loss } + } + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + vengeful = major_stress_impact_loss + lazy = minor_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -30 + has_trait = forgiving + } + } + } + + # Pay to import foreign clergy. + option = { + name = { + trigger = { exists = scope:benefactor } + text = fp1_jomsvikings.0011.b.benefactor + } + name = { + trigger = { + NOT = { exists = scope:benefactor } + } + text = fp1_jomsvikings.0011.b.fallback + } + # Must be some flavour of reformed for this to be an issue. + trigger = { + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + # As there's gold involved, the character should either be a player or have enough to spend. + OR = { + is_ai = no + short_term_gold >= medium_gold_value + } + } + + # Deduct gold. + ## This goes to scope:benefactor if they exist. + if = { + limit = { exists = scope:benefactor } + pay_short_term_gold = { + target = scope:benefactor + gold = medium_gold_value + } + } + ## And otherwise is just vomited into the ether. + remove_short_term_gold = medium_gold_value + # If they exist, improve scope:benefactor's opinion of you. + if = { + limit = { exists = scope:benefactor } + reverse_add_opinion = { + target = scope:benefactor + modifier = pleased_opinion + opinion = 30 + } + } + # Lose control, but not that much. + scope:target_county = { change_county_control = medium_county_control_loss } + + stress_impact = { + generous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + greedy = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_vengefulness = -0.75 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } + + # Pay a gafol to stop the attacks. + option = { + name = fp1_jomsvikings.0011.c + # The Jomsvikings will only accept tribute from non-threatening unreformeds. + trigger = { + faith = { has_doctrine_parameter = unreformed } + # As there's gold involved, the character should either be a player or have enough to spend. + OR = { + is_ai = no + short_term_gold >= medium_gold_value + } + } + + # Inform root that they won't lose any control. + custom_tooltip = fp1_jomsvikings.0011.c.tt + # Pay the gold straight to scope:leader. + pay_treasury_or_gold = { + target = scope:leader + value = medium_treasury_or_gold_value + } + + stress_impact = { + generous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + greedy = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_vengefulness = -0.75 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } + + # How is this anything but a local problem? + option = { + name = fp1_jomsvikings.0011.d + + # Inform root that they let the county burn. + custom_tooltip = fp1_jomsvikings.0011.d.tt + # Reduce control. + scope:target_county = { change_county_control = extreme_county_control_loss } + + stress_impact = { + lazy = medium_stress_impact_loss + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + diligent = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -30 + has_trait = vengeful + } + } + } +} + +################################################## +# Jomsvikings send Event Troops +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# The Jomsvikings offer you a force of loyal pirates. +fp1_jomsvikings.0021 = { + type = character_event + title = fp1_jomsvikings.0021.t + desc = fp1_jomsvikings.0021.desc + theme = faith + right_portrait = { + character = scope:leader + animation = admiration + } + override_background = { reference = fp1_beached_longships } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # The Jomsvikings must exist; check this before the usual standard checks for best efficiency. + fp1_jomsvikings_exist_in_range_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_jomsvikings_0021 } + # You must fulfill their generic piety requirements. + fp1_pious_enough_for_jomsvikings_reward_trigger = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for excess levels of piety & high levels of prestige. + fp1_jomsvikings_approve_of_extra_piety_and_prestige_modifier = yes + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_jomsvikings_0021 + days = 1825 + } + # Grab the Grandmaster. + global_var:jomsvikings_title.holder = { save_scope_as = leader } + } + + # Pirates? In *my* good Asatru household? It's more likely than you'd think! + option = { + name = fp1_jomsvikings.0021.a + + # Spend the piety cost. + add_piety = major_piety_loss + # Explanatory tooltip. + custom_tooltip = fp1_jomsvikings.0021.a.tt + # Give the actual troops. + spawn_army = { + levies = 250 + men_at_arms = { + type = jomsviking_pirates + stacks = 4 + } + location = root.capital_province + origin = scope:leader.capital_province + name = fp1_jomsvikings_event_troops + } + + stress_impact = { + ambitious = medium_stress_impact_loss + zealous = medium_stress_impact_loss + content = medium_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.75 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = ambitious + } + modifier = { # Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = content + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # Perhaps some more reputable volunteers? + option = { + name = fp1_jomsvikings.0021.b + + # Spend the piety cost. + add_piety = major_piety_loss + # Explanatory tooltip. + custom_tooltip = fp1_jomsvikings.0021.b.tt + # Give the actual troops. + spawn_army = { + levies = 250 + men_at_arms = { + type = bondi + stacks = 4 + } + location = root.capital_province + origin = scope:leader.capital_province + name = fp1_jomsvikings_event_troops + } + + stress_impact = { + ambitious = medium_stress_impact_loss + zealous = medium_stress_impact_loss + content = medium_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.75 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = ambitious + } + modifier = { # Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = content + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # I'm fine, thanks. + option = { + name = fp1_jomsvikings.0021.c + + # Gain a little consolation prestige. + add_prestige = minor_prestige_gain + # The Grandmaster considers this an insult. + scope:leader = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -30 + } + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + } + } + + stress_impact = { + paranoid = medium_stress_impact_loss + cynical = major_stress_impact_loss + trusting = minor_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_rationality = -0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -10 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } +} + +################################################## +# Jomsvikings challenge a Dishonourable Norse Pagan Ruler to Holmgang +# by Ewan Cowhig Croft +# 0041 - 0050 +################################################## + +scripted_trigger fp1_majorly_irked_jomsvikings_trigger = { + OR = { + ## Trucebreaker. + has_character_modifier = broke_truce + ## High tyranny. + tyranny >= high_tyranny + } +} + +# Considering you a blight on the faith, the Grandmaster of the Jomsvikings challenges you to the death. +fp1_jomsvikings.0041 = { + type = character_event + title = fp1_jomsvikings.0041.t + desc = fp1_jomsvikings.0041.desc + theme = death + left_portrait = { + character = root + # Craven characters are terrifed. + triggered_animation = { + trigger = { has_trait = craven } + animation = fear + } + # Everyone else is just shocked. + triggered_animation = { + trigger = { + NOT = { has_trait = craven } + } + animation = shock + } + } + right_portrait = { + character = scope:leader + animation = rage + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # The Jomsvikings must exist; check this before the usual standard checks for best efficiency. + fp1_jomsvikings_exist_in_range_trigger = yes + # Standard checks; make sure that scope:leader is available also. + is_landed = yes + is_available_at_peace_adult = yes + global_var:jomsvikings_title.holder = { is_available_at_peace_adult = yes } + NOT = { has_character_flag = had_event_fp1_jomsvikings_0041 } + # Must be following the unreformed version of Norse paganism. + faith = global_var:jomsvikings_title.holder.faith + # Eligibility checks. + ## For holmgangs in general. + ### Root. + can_start_single_combat_trigger = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = global_var:jomsvikings_title.holder } + ### Scope:leader. + global_var:jomsvikings_title.holder = { + can_start_single_combat_trigger = yes + # No need to check whether scope:leader is an eligible warrior, as they're already the head of a warrior order. + } + ## Is scope:leader either actually at all competent in a fight or dumb enough to think they are? + global_var:jomsvikings_title.holder = { + OR = { + prowess >= medium_scsk + has_trait = intellect_bad + } + } + # You must unequivocally a bastard for them to think you need to be removed. + OR = { + # Any serious reason is valid. + fp1_majorly_irked_jomsvikings_trigger = yes + # But a large amount of minor reasons are also good. + calc_true_if = { + amount >= 4 + # The sinful. + num_sinful_traits >= 2 + has_trait = cynical + # The shameful. + prestige_level <= 0 + piety_level <= 0 + tyranny >= medium_tyranny + dread >= high_dread + # Criminals. + ## Kinslayer. + AND = { + has_trait = kinslayer_1 + faith = { has_doctrine_parameter = kinslaying_any_dynasty_member_crime } + } + AND = { + has_trait = kinslayer_2 + faith = { has_doctrine_parameter = kinslaying_extended_family_crime } + } + AND = { + has_trait = kinslayer_3 + faith = { has_doctrine_parameter = kinslaying_close_kin_crime } + } + ## Deviant. + AND = { + has_trait = deviant + faith = { has_doctrine_parameter = deviancy_illegal } + } + ## Cannibal. + AND = { + has_trait = cannibal + NOT = { + faith = { has_doctrine_parameter = cannibalism_legal } + } + } + ## Sodomite. + AND = { + has_trait = sodomite + faith = { has_doctrine_parameter = homosexuality_illegal } + } + ## Incestuous. + AND = { + has_trait = incestuous + NOT = { + faith = { has_doctrine_parameter = consanguinity_unrestricted_incest } + } + } + ## Adulterer/Fornicator + AND = { + OR = { + has_trait = adulterer + has_trait = fornicator + } + trait_is_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = this + } + } + ## Murderer. + has_trait = murderer + ## Witch. + AND = { + has_trait = witch + faith = { has_doctrine_parameter = witchcraft_illegal } + } + } + } + } + + weight_multiplier = { + base = 1 + + # We don't want to see this in the wild too much, so weight down against AI. + modifier = { + add = -0.5 + is_ai = yes + } + + # Weight it down a bit more if you lack any of the major reasons. + modifier = { + add = -0.25 + fp1_majorly_irked_jomsvikings_trigger = no + } + } + + immediate = { + play_music_cue = "mx_cue_murder" + add_character_flag = { + flag = had_event_fp1_jomsvikings_0041 + days = 7300 + } + # Grab the Grandmaster. + global_var:jomsvikings_title.holder = { save_scope_as = leader } + # Rip the Grandmaster's shirt off. + scope:leader = { add_character_flag = single_combat_stripped_to_waist } + # Is the Grandmaster hopelessly outmatched? Try to boost them up a little if so. + hidden_effect = { + if = { + limit = { + prowess_diff = { + target = scope:leader + value >= 10 + } + } + scope:leader = { + # Give them berserker. + if = { + limit = { + NOT = { has_trait = berserker } + } + add_trait = berserker + } + # Or, failing that, raider. + else_if = { + limit = { + NOT = { has_trait = viking } + } + add_trait = viking + } + # Or else just a slight base prowess boost. + else = { add_prowess_skill = 4 } + } + } + } + } + + # I'll send you to Valhöll with a smile. + option = { + name = fp1_jomsvikings.0041.a + + # First, strip to the waist. + add_character_flag = single_combat_stripped_to_waist + # It's time to d-d-d-duel! + custom_tooltip = fp1_jomsvikings.0041.a.tt + configure_start_single_combat_effect = { + SC_INITIATOR = scope:leader + SC_ATTACKER = scope:leader + SC_DEFENDER = root + FATALITY = always + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = fp1_jomsvikings.0043 + INVALIDATION_EVENT = fp1_jomsvikings.0042 + } + # Show possible results. + show_as_tooltip = { + random_list = { + # Root wins. + 50 = { + show_chance = no + desc = fp1_jomsvikings.0041.a.tt_success + scope:leader = { + death = { + killer = root + death_reason = death_duel + } + } + add_prestige = major_prestige_gain + add_kinslayer_trait_or_nothing_effect = { VICTIM = scope:leader } + } + # Scope:leader wins. + 50 = { + show_chance = no + desc = fp1_jomsvikings.0041.a.tt_failure + death = { + killer = scope:leader + death_reason = death_duel + } + scope:leader = { + add_prestige = major_prestige_gain + add_kinslayer_trait_or_nothing_effect = { VICTIM = root } + } + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.25 + ai_boldness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # You were a fool to come alone. Guards! + option = { + name = fp1_jomsvikings.0041.b + + # If possible, scope:leader immediately becomes your nemesis. + if = { + limit = { + NOT = { has_relation_nemesis = scope:leader } + } + # No matter what relationship you had or didn't have, they become your nemesis. + if = { + limit = { has_relation_best_friend = scope:leader } + remove_relation_best_friend = scope:leader + set_relation_nemesis = { + target = scope:leader + reason = nemesis_refused_holmgang + } + } + # If you have no relation or were friends, they become your rival. + else_if = { + limit = { has_relation_friend = scope:leader } + remove_relation_friend = scope:leader + set_relation_nemesis = { + target = scope:leader + reason = nemesis_refused_holmgang + } + } + else = { + set_relation_nemesis = { + target = scope:leader + reason = nemesis_refused_holmgang + } + } + } + else = { + reverse_add_opinion = { + target = scope:leader + modifier = hate_opinion + opinion = -50 + } + } + # You attempt to capture scope:leader. + duel = { + skill = martial + target = scope:leader + # Scope:leader is shackled & hauled off to the dungeon. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -40 + } + desc = fp1_jomsvikings.0041.b.tt_success + send_interface_toast = { + title = fp1_jomsvikings.0041.b.tt_success + left_icon = scope:leader + # Scope:leader is tossed straight into the dungeon. + rightfully_imprison_character_effect = { + TARGET = scope:leader + IMPRISONER = root + } + hidden_effect = { + scope:leader = { change_prison_type = dungeon } + } + # You still lose a prestige level, since you're being an utter bastard. + add_prestige_level = -1 + # But you do gain a good chunk of dread. + add_dread = medium_dread_gain + } + } + # Scope:leader effects a daring escape. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -40 + } + desc = fp1_jomsvikings.0041.b.tt_failure + send_interface_toast = { + title = fp1_jomsvikings.0041.b.tt_failure + left_icon = scope:leader + # You lose a prestige level *and* take heftier penalties for your dishonour. + add_prestige_level = -1 + add_prestige = monumental_prestige_loss + } + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + arbitrary = major_stress_impact_loss + forgiving = medium_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -30 + has_trait = just + } + } + } + + # Hah, right, because I just fight any random pirate that walks into my castle? + option = { + name = fp1_jomsvikings.0041.c + + # If possible, scope:leader immediately becomes your rival. + if = { + limit = { + NOR = { + has_relation_rival = scope:leader + has_relation_nemesis = scope:leader + } + } + # If you were best friends, they become your nemesis. + if = { + limit = { has_relation_best_friend = scope:leader } + remove_relation_best_friend = scope:leader + set_relation_nemesis = { + target = scope:leader + reason = rival_refused_holmgang + } + } + # If you have no relation or were friends, they become your rival. + else_if = { + limit = { has_relation_friend = scope:leader } + remove_relation_friend = scope:leader + set_relation_rival = { + target = scope:leader + reason = rival_refused_holmgang + } + } + else = { + set_relation_rival = { + target = scope:leader + reason = rival_refused_holmgang + } + } + } + else = { + reverse_add_opinion = { + target = scope:leader + modifier = hate_opinion + opinion = -50 + } + } + # And you take some hefty prestige penalties for your refusal. + add_prestige_level = -1 + add_prestige = massive_prestige_loss + + stress_impact = { + craven = major_stress_impact_loss + arrogant = minor_stress_impact_gain + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_vengefulness = -0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Bout has invalidated, inform affected parties. +fp1_jomsvikings.0042 = { + hidden = yes + + immediate = { + # Inform root that the duel has invalidated. + root = { + send_interface_toast = { + title = fp1_jomsvikings.0042.trigger_failure + left_icon = scope:leader + } + } + } +} + +# Bout ended, sort after effects. +fp1_jomsvikings.0043 = { + hidden = yes + + immediate = { + # If scope:leader won, give them their prestige/clothes and apply kinslayer stuff. + if = { + limit = { scope:sc_victor = scope:leader } + add_prestige = major_prestige_gain + remove_character_flag = single_combat_stripped_to_waist + single_combat_have_slain_kin_effect = { + ATTACKER = scope:leader + DEFENDER = root + } + } + # Otherwise, root won. + else = { + # Nothing complex here, just put your shirt back on & send out the event after a small delay (for layering). + root = { + remove_character_flag = single_combat_stripped_to_waist + trigger_event = { + id = fp1_jomsvikings.0044 + days = 1 + } + } + } + } +} + +# Root won the bout, process their ending. +fp1_jomsvikings.0044 = { + type = character_event + title = fp1_jomsvikings.0044.t + desc = fp1_jomsvikings.0044.desc + theme = death + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:leader + animation = fear + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + play_music_cue = "mx_cue_combat_stinger" + # Mention the death of scope:leader. + show_as_tooltip = { + scope:leader = { + death = { + killer = root + death_reason = death_duel + } + } + } + # Hand out root's prestige. + add_prestige = major_prestige_gain + scope:leader = { + add_character_flag = is_naked + } + } + + # Anyone *else* want to have a go? + option = { + name = fp1_jomsvikings.0044.a + + # And a fair amount of stress loss for coming through that. + add_stress = massive_stress_loss + + # No stress impact for the standard option. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.25 + } + } + } + + # And the justness of my rule is proven again. + option = { + name = fp1_jomsvikings.0044.b + # No point reducing tyranny if you don't have any. + trigger = { tyranny >= 1 } + + # Get a decent tyranny reduction for your troubles. + add_tyranny = massive_tyranny_loss + + stress_impact = { + deceitful = major_stress_impact_loss + arbitrary = major_stress_impact_loss + honest = major_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = deceitful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = 30 + has_trait = honest + } + modifier = { # Weight down for stress. + add = 30 + has_trait = just + } + } + } + + # This simply shows that Asatru is an unworthy faith... + option = { + name = fp1_jomsvikings.0044.c + # AI doesn't use this functionality, so we don't want them taking this option. + trigger = { is_ai = no } + + # Gain a modifier making it substantially cheaper to convert to other faiths. + add_character_modifier = { + modifier = fp1_jomsvikings_caused_faith_crisis_modifier + years = 10 + } + + stress_impact = { + cynical = major_stress_impact_loss + zealous = major_stress_impact_gain + } + ai_chance = { + # AI is banned, so this is unimportant. + base = 0 + } + } + after = { + scope:leader = { + remove_character_flag = is_naked + } + } +} + + +################################################## +# #Special Events + +################################################## +# Jomsvikings Destroyed +# by Ewan Cowhig Croft +# 1001 - 1010 +################################################## + +fp1_jomsvikings.1001 = { + type = character_event + title = fp1_jomsvikings.1001.t + desc = { + desc = fp1_jomsvikings.1001.desc.intro + first_valid = { + # If someone reformed Norse paganism, the Jomsvikings lament it. + triggered_desc = { + trigger = { + religion:germanic_religion = { + any_faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + } + desc = fp1_jomsvikings.1001.desc.reformed_asatru_exists + } + # Otherwise, just a general big RIP. + desc = fp1_jomsvikings.1001.desc.fallback + } + desc = fp1_jomsvikings.1001.desc.outro + } + theme = faith + override_background = { reference = fp1_tribal_temple } + left_portrait = { + character = scope:leader + animation = shame + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + # Huehuehue. + play_music_cue = "mx_cue_peace_ensues" + custom_tooltip = fp1_jomsvikings.1001.holy_order_destroyed + } + + # The gods forsake us! + option = { + name = fp1_jomsvikings.1001.a + trigger = { faith = faith:norse_pagan } + + # No more benefits for pious Norse pagans. + custom_tooltip = fp1_jomsvikings.1001.a.tt + + # No stress for a notification event. + ai_chance = { + # Notification event needs no AI chance. + base = 100 + } + } + + # Good riddance to bad rubbish! + option = { + name = fp1_jomsvikings.1001.b + trigger = { + NOT = { faith = faith:norse_pagan } + } + + # No more Jomsviking piracy! + custom_tooltip = fp1_jomsvikings.1001.b.tt + + # No stress for a notification event. + ai_chance = { + # Notification event needs no AI chance. + base = 100 + } + } + + # Yhomz-who? + option = { + name = fp1_jomsvikings.1001.c + trigger = { + NOT = { faith = faith:norse_pagan } + } + + # No more Jomsviking piracy! + custom_tooltip = fp1_jomsvikings.1001.c.tt + + # No stress for a notification event. + ai_chance = { + # Notification event needs no AI chance. + base = 100 + } + } +} + + +################################################## +# Jomsvikings Formed Autonomously +# by Ewan Cowhig Croft +# 1011 - 1020 +################################################## + +# The Jomsvikings are founded automagically. +fp1_jomsvikings.1011 = { + scope = none + hidden = yes + + # Trigger block handled in yearly_on_actions. + + immediate = { + # Collate eligible targets in the region. + every_county_in_region = { + region = dlc_fp1_region_non_scandinavian_southern_baltic + limit = { + holder = { fp1_ruler_eligible_for_jomsviking_coup = yes } + } + add_to_list = jomsvikings_coup_targets_list + } + # Sort through to pick the best. + ordered_in_list = { + list = jomsvikings_coup_targets_list + order_by = fp1_jomsvikings_coup_priority_value + save_scope_as = coup_target + } + ## Grab the soon-to-be former holder for loc. + scope:coup_target.holder = { save_scope_as = victim } + # Transfer the target title to its new owner. + ## First, create said-owner. + create_character = { + template = fp1_jomsviking_bigwig + location = scope:coup_target.title_province + save_scope_as = founder + } + ## Second, give that owner the actual title. + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + scope:coup_target = { + change_title_holder = { + holder = scope:founder + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + ## Third, give scope:founder their independence if they lacked it. + scope:founder = { + if = { + limit = { top_liege != this } + create_title_and_vassal_change = { + type = independency + save_scope_as = change + } + change_liege_or_become_independent = { + CHANGE = scope:change + VASSAL = this + } + resolve_title_and_vassal_change = scope:change + } + } + ## Fourth, give the owner some event troops & cash to keep them afloat. + scope:founder = { + spawn_army = { + levies = { add = 1000 } + inheritable = yes + uses_supply = yes + location = scope:coup_target.title_province + name = fp1_jomsvikings_event_troops + } + forge_the_jomsvikings_maa_reward_effect = yes + } + # Create the Jomsvikings. + scope:founder = { forge_the_jomsvikings_scripted_effect = yes } + # Send out notification events. + save_scope_value_as = { + name = jomsvikings_autofounded + value = yes + } + every_player = { + limit = { + OR = { + religion = religion:germanic_religion + save_temporary_scope_as = neighbouring_players + scope:founder = { + any_neighboring_and_across_water_top_liege_realm_owner = { this = scope:neighbouring_players } + } + } + # No need to exempt scope:founder, as they're always an AI in this variant. + } + trigger_event = fp1_major_decisions.0033 + } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_major_decision_events.txt b/N3OW/events/dlc/fp1/fp1_major_decision_events.txt new file mode 100644 index 00000000..dd4873eb --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_major_decision_events.txt @@ -0,0 +1,1423 @@ +namespace = fp1_major_decisions + +################################################## +# #Standard Events +# 0001 - 0010 Secure the High Kingdom of the North Sea - Bind England, Denmark, and Norway into one mighty de jure. +# 0011 - 0020 Found the Capital of the Rus' - Semi-dynamic founding of Kiev. +# 0021 - 0030 Elevate the Kingdom of the Isles - Make the Petty Kingdom of Mann & the Isles into the Perfectly Regular Kingdom of Mann & the Isles. +# 0031 - 0040 Forge the Jomsvikings - Sponsor the creation of a conservative Asatru holy fighting force. +# +# +# #Special Events +# 1001 - 1010 Canute-'em-Up +# 1011 - 1020 The True King of Norway - Harald Tanglehair earns his haircut. +################################################## + + + + + +################################################## +# Securing the High Kingdom of the North Sea +# by Ewan Cowhig Croft +# 0001-0010 +################################################## + +# Founder event +fp1_major_decisions.0001 = { + type = character_event + title = fp1_major_decisions.0001.t + desc = fp1_major_decisions.0001.desc + theme = realm + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = fp1_ocean_norse } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + #Apply decision effects. + secure_high_kingdom_north_sea_scripted_effect = yes + legend_seed_new_title_effect = yes + } + + #I'm the besterest! + option = { + name = fp1_major_decisions.0001.a + + add_prestige_experience = 1000 + + ai_chance = { + #Only option. + base = 100 + } + } +} + +# Vassal notification event +fp1_major_decisions.0002 = { + type = character_event + title = fp1_major_decisions.0002.t + desc = fp1_major_decisions.0002.desc + theme = realm + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = fp1_ocean_norse } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + show_as_tooltip = { secure_high_kingdom_north_sea_scripted_effect = yes } + } + + #Huzzah! + option = { + name = fp1_major_decisions.0002.a + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } + + #This bodes ill... + option = { + name = fp1_major_decisions.0002.b + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } +} + +# Distant players notification event +fp1_major_decisions.0003 = { + type = character_event + title = fp1_major_decisions.0003.t + desc = fp1_major_decisions.0003.desc + theme = realm + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = fp1_ocean_norse } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + show_as_tooltip = { secure_high_kingdom_north_sea_scripted_effect = yes } + } + + #We're the best! + option = { + name = fp1_major_decisions.0003.a + trigger = { faith = scope:founder.faith } + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } + + #Foul Heathens/Christmen! + option = { + name = fp1_major_decisions.0003.b + trigger = { + faith != scope:founder.faith + } + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } + + #Emperors get antsy. + option = { + name = fp1_major_decisions.0003.c + trigger = { highest_held_title_tier >= tier_empire } + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } +} + +################################################## +# Founding the Capital of the Rus' +# by Ewan Cowhig Croft +# 0011-0020 +################################################## + +# Founder event +fp1_major_decisions.0011 = { + type = character_event + title = fp1_major_decisions.0011.t + desc = fp1_major_decisions.0011.desc + theme = realm + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = fp1_runestone } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + } + + #Kiev shall be my capital. + option = { + name = fp1_major_decisions.0011.a + + trigger = { + #Must have title:c_kiev in order to make it your capital. + any_sub_realm_county = { this = title:c_kiev } + #And Kiev cannot be held by a player who has _only_ title:c_kiev, unless that player is you. + title:c_kiev.holder = { + OR = { + is_ai = yes + any_held_title = { + count >= 1 + title_tier = county + NOT = { this = title:c_kiev } + } + this = scope:founder + } + } + } + + #Organise the usurpation/capital move of title:c_kiev if appropriate. + if = { + limit = { + NOT = { title:c_kiev.holder = scope:founder } + } + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = yes + } + title:c_kiev = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + set_realm_capital = title:c_kiev + #Otherwise, set title:c_kiev to be scope:new_rus_capital & go through with the effect. + title:c_kiev = { + save_scope_as = new_rus_capital + found_capital_of_rus_scripted_effect = yes + } + + ai_chance = { + #AI should always take this option if it's available. + base = 100 + } + } + + #My current capital shall be my capital! + option = { + name = fp1_major_decisions.0011.b + + #Not generally necessary, but just to stop some weird loc eventualities. + trigger = { + NOT = { capital_county = title:c_kiev } + } + + #We try to use the player's current capital, but if they've moved it outside of e_russia, then we go with the default set in the standard decision entry. + if = { + limit = { capital_county.empire = title:e_russia } + #Formatted a little inefficiently for readability. + capital_county = { save_scope_as = new_rus_capital } + } + #Then enact the actual effects. + found_capital_of_rus_scripted_effect = yes + + ai_chance = { + #AI will only take this option if they have no other choice (i.e., can't get Kiev). + base = 0 + } + } + + after = { + #Take care of notification events. + every_player = { + limit = { + capital_province = { + OR = { + geographical_region = world_europe_east + geographical_region = world_europe_north + } + } + #Obviously, we exempt scope:founder themselves. + this != scope:founder + } + #Vassal players get a separate event. + if = { + limit = { + any_liege_or_above = { this = scope:founder } + } + trigger_event = fp1_major_decisions.0012 + } + #Everyone else within range gets a less personal version. + else = { trigger_event = fp1_major_decisions.0013 } + } + } +} + +# Vassal notification event +fp1_major_decisions.0012 = { + type = character_event + title = fp1_major_decisions.0012.t + desc = fp1_major_decisions.0012.desc + theme = realm + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = fp1_runestone } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + show_as_tooltip = { found_capital_of_rus_scripted_effect = yes } + } + + #A worthy capital! + option = { + name = fp1_major_decisions.0012.a + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } + + #Bah, ain't no city of mine. + option = { + name = fp1_major_decisions.0012.b + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } +} + +# Distant players notification event +fp1_major_decisions.0013 = { + type = character_event + title = fp1_major_decisions.0013.t + desc = fp1_major_decisions.0013.desc + theme = realm + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = fp1_runestone } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + show_as_tooltip = { found_capital_of_rus_scripted_effect = yes } + } + + #This scope:new_rus_capital sounds intriguingly rich... + option = { + name = fp1_major_decisions.0013.a + trigger = { + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + culture = { has_cultural_pillar = heritage_east_slavic } + } + } + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } + + #They're still just backwards foreigners. + option = { + name = fp1_major_decisions.0013.b + trigger = { + NOR = { + culture = { has_cultural_pillar = heritage_north_germanic } + culture = { has_cultural_pillar = heritage_east_slavic } + } + } + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } + + #I don't really see how this concerns me? + option = { + name = fp1_major_decisions.0013.c + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } +} + +################################################## +# Elevating the Kingdom of the Isles +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# Founder event +fp1_major_decisions.0021 = { + type = character_event + title = fp1_major_decisions.0021.t + desc = fp1_major_decisions.0021.desc + theme = war + left_portrait = { + character = root + animation = personality_honorable + } + override_background = { reference = fp1_beached_longships } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + play_music_cue = "mx_cue_war_declared" + # Apply effects + elevate_mann_and_the_isles_scripted_effect = yes + legend_seed_new_title_effect = yes + } + + # I am the Lady/Lord of Blood and Gold! + option = { + name = fp1_major_decisions.0021.a + + # Add a unique nickname. + give_nickname = nick_the_great_and_terrible + + # No stress impact necessary. + ai_chance = { + # AI should always choose this option. + base = 100 + } + } + + # At last my dream is achieved... + option = { + name = fp1_major_decisions.0021.b + + # Minor stress loss for turning down the nickname. + add_stress = minor_stress_loss + + # No stress impact necessary. + ai_chance = { + # AI should, if it somehow makes it here, never opt out of the nickname. + base = 0 + } + } +} + +# Vassal notification event +fp1_major_decisions.0022 = { + type = character_event + title = fp1_major_decisions.0022.t + desc = fp1_major_decisions.0022.desc + theme = war + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = fp1_beached_longships } + + immediate = { + play_music_cue = "mx_cue_war_declared" + # Apply effects + scope:founder = { + show_as_tooltip = { elevate_mann_and_the_isles_scripted_effect = yes } + } + } + + # Just think of all the gold we're going to make! + option = { + name = fp1_major_decisions.0022.a + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } + + # A _queen/king_? They're little better than a robber baron! + option = { + name = fp1_major_decisions.0022.b + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } +} + +# Distant players notification event +fp1_major_decisions.0023 = { + type = character_event + title = fp1_major_decisions.0023.t + desc = fp1_major_decisions.0023.desc + theme = war + left_portrait = { + character = scope:founder + animation = personality_honorable + } + override_background = { reference = fp1_beached_longships } + + immediate = { + play_music_cue = "mx_cue_war_declared" + # Apply effects + scope:founder = { + show_as_tooltip = { elevate_mann_and_the_isles_scripted_effect = yes } + } + } + + # They're not going to raid *us*, right? + option = { + name = fp1_major_decisions.0023.a + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } + + # No more than a Queen/King of Thieves! + option = { + name = fp1_major_decisions.0023.b + + ai_chance = { + #Doesn't especially matter. + base = 100 + } + } +} + +################################################## +# Forge the Jomsvikings +# by Ewan Cowhig Croft +# 0031-0041 +################################################## + +# Founder event +fp1_major_decisions.0031 = { + type = character_event + title = fp1_major_decisions.0031.t + desc = fp1_major_decisions.0031.desc + theme = faith + left_portrait = { + character = scope:founder + animation = personality_honorable + } + right_portrait = { + character = scope:leader + animation = personality_zealous + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + play_music_cue = "mx_cue_crusade_starts" + # Found the Jomsvikings. + forge_the_jomsvikings_scripted_effect = yes + #Notify other players. + every_player = { + limit = { + OR = { + religion = religion:germanic_religion + save_temporary_scope_as = neighbouring_players + scope:founder = { + any_neighboring_and_across_water_top_liege_realm_owner = { this = scope:neighbouring_players } + } + } + #Obviously, we exempt scope:founder themselves. + this != scope:founder + } + #Vassal players get a separate event. + if = { + limit = { + any_liege_or_above = { this = scope:founder } + } + trigger_event = fp1_major_decisions.0032 + } + #Everyone else within range gets a less personal version. + else = { trigger_event = fp1_major_decisions.0033 } + } + } + + # For our ancestors! + option = { + name = { + trigger = { has_trait = cynical } + text = fp1_major_decisions.0031.a.cynical + } + name = { + trigger = { + NOT = { has_trait = cynical } + } + text = fp1_major_decisions.0031.a.fallback + } + + # Get your bonus troops. + forge_the_jomsvikings_maa_reward_effect = yes + + stress_impact = { + # Usually bad form to give stress impact on single event options, but if you're cynical and taking this option, you *know* you're doing it for purely cynical reasons. + zealous = massive_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + # Single option event doesn't need ai_chance sorted. + base = 100 + } + } +} + +# Vassal notification event +fp1_major_decisions.0032 = { + type = character_event + title = fp1_major_decisions.0032.t + desc = fp1_major_decisions.0032.desc + theme = faith + left_portrait = { + character = scope:founder + animation = personality_honorable + } + right_portrait = { + character = scope:leader + # Same-faith characters see them as zealous. + triggered_animation = { + trigger = { faith = scope:leader.faith } + animation = personality_zealous + } + # Everyone else sees them as pirates. + triggered_animation = { + trigger = { + faith != scope:leader.faith + } + animation = schadenfreude + } + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + play_music_cue = "mx_cue_crusade_starts" + # Jomsvikings founded. + scope:founder = { + show_as_tooltip = { forge_the_jomsvikings_scripted_effect = yes } + } + } + + # Huzzah! + option = { + name = fp1_major_decisions.0032.a + trigger = { faith = scope:founder.faith } + + # Scope:founder gets a boost. + scope:founder = { + show_as_tooltip = { forge_the_jomsvikings_maa_reward_effect = yes } + } + + # No stress impact for notification event. + ai_chance = { + # Player-only, AI choice irrelevant. + base = 100 + } + } + + # So, they're pirates? + option = { + name = fp1_major_decisions.0032.b + + # Scope:founder gets a boost. + scope:founder = { + show_as_tooltip = { forge_the_jomsvikings_maa_reward_effect = yes } + } + + # No stress impact for notification event. + ai_chance = { + # Player-only, AI choice irrelevant. + base = 100 + } + } +} + +# Distant players notification event +fp1_major_decisions.0033 = { + type = character_event + title = fp1_major_decisions.0033.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:jomsvikings_autofounded } + desc = fp1_major_decisions.0033.desc.autofounded + } + desc = fp1_major_decisions.0033.desc.decision_founded + } + desc = fp1_major_decisions.0033.desc.outro + } + theme = faith + left_portrait = { + character = scope:founder + animation = personality_bold + } + right_portrait = { + character = scope:leader + # Same-faith characters see them as zealous. + triggered_animation = { + trigger = { faith = scope:leader.faith } + animation = personality_zealous + } + # Everyone else sees them as pirates. + triggered_animation = { + trigger = { + faith != scope:leader.faith + } + animation = schadenfreude + } + } + lower_center_portrait = scope:victim + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + play_music_cue = "mx_cue_crusade_starts" + # Jomsvikings founded. + custom_tooltip = fp1_founder_founded_the_jomsviking_tt + show_as_tooltip = { + scope:founder.faith = { + change_fervor = { + value = 10 + desc = fervor_gain_holy_order_founded + } + } + } + } + + # Wonderous news! + option = { + name = fp1_major_decisions.0033.a + trigger = { faith = scope:founder.faith } + + # Scope:founder gets a boost. + scope:founder = { + show_as_tooltip = { forge_the_jomsvikings_maa_reward_effect = yes } + } + + # No stress impact for notification event. + ai_chance = { + # Player-only, AI choice irrelevant. + base = 100 + } + } + + # Just another band of raiders. + option = { + name = { + trigger = { + religion = { is_in_family = rf_pagan } + } + text = fp1_major_decisions.0033.b.competition + } + name = { + trigger = { + NOT = { + religion = { is_in_family = rf_pagan } + } + } + text = fp1_major_decisions.0033.b.heathens + } + + # Scope:founder gets a boost. + scope:founder = { + show_as_tooltip = { forge_the_jomsvikings_maa_reward_effect = yes } + } + + # No stress impact for notification event. + ai_chance = { + # Player-only, AI choice irrelevant. + base = 100 + } + } +} + + + + + +################################################## +# Canute-'em-Up +# by Ewan Cowhig Croft +# 1001-1010 +################################################## + +scripted_trigger fp1_major_decisions_1001_valid_sycophant_trigger = { + # Has to be around. + is_available_ai_adult = yes + # And have an outrageously positive opinion of root... + opinion = { + target = root + value >= very_high_positive_opinion + } + # _Without_ actually having any good reason to. + has_any_good_relationship_with_root_trigger = no + # Plus gotta filter out some general traits. + NOR = { + has_trait = honest + has_trait = brave + has_trait = shy + has_trait = content + has_trait = just + has_trait = zealous + has_trait = trusting + } +} + +# So you think you're _truly_ the High King of the North Sea, eh? +## Ok, so this probably didn't *actually* happen, but we can't have a North Sea title without the myth, right? +fp1_major_decisions.1001 = { + type = character_event + title = fp1_major_decisions.1001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:type = flag:canute_dumb } + desc = fp1_major_decisions.1001.desc.dumb + } + desc = fp1_major_decisions.1001.desc.smart + } + } + theme = crown + left_portrait = { + character = root + # Smart Canute. + triggered_animation = { + trigger = { scope:type = flag:canute_smart } + animation = disapproval + } + # And, tragically, dumb-Canute. + triggered_animation = { + trigger = { scope:type = flag:canute_dumb } + animation = personality_bold + } + } + right_portrait = { + character = scope:sycophant + animation = admiration + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Since this is a once-only event for e_north_sea, we can early-out by checking if we're even looking at them. + has_title = title:e_north_sea + # And that this even has never happened before. + NOT = { exists = global_var:had_event_fp1_major_decisions_1001 } + # Then, that we're within -ish the legendary frame. + current_date <= 1050.1.1 + # And might actually have a problem with all this deceit. + NOR = { + has_trait = arrogant + has_trait = trusting + has_trait = deceitful + } + # Finally (for once), standard checks. + is_available_at_peace_adult = yes + # And at least one sycophantic courtier. + any_courtier_or_guest = { fp1_major_decisions_1001_valid_sycophant_trigger = yes } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + set_global_variable = { + name = had_event_fp1_major_decisions_1001 + value = yes + } + # Are we dealing with an idiotic Canute? + if = { + limit = { + OR = { + learning <= low_skill_rating + has_trait = intellect_bad + has_trait = dull + } + } + save_scope_value_as = { + name = type + value = flag:canute_dumb + } + } + # If not, assume they're smart. + else = { + save_scope_value_as = { + name = type + value = flag:canute_smart + } + } + # And grab a chief sycophant. + random_courtier_or_guest = { + limit = { fp1_major_decisions_1001_valid_sycophant_trigger = yes } + save_scope_as = sycophant + } + } + + # To the beach! + option = { + name = fp1_major_decisions.1001.a + + # Onwards! + custom_tooltip = fp1_major_decisions.1001.a.tt + trigger_event = fp1_major_decisions.1002 + + stress_impact = { + humble = major_stress_impact_loss + paranoid = major_stress_impact_loss + honest = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = humble + } + modifier = { # Weight up for stress. + add = 30 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = honest + } + } + } + + # They're probably correct, right? + option = { + name = fp1_major_decisions.1001.b + + # Gain some very minor stress loss for opting out. + ## Stress loss handled in stress_impact. + + stress_impact = { + base = minor_stress_loss + vengeful = minor_stress_impact_gain + impatient = minor_stress_impact_gain + humble = medium_stress_impact_gain + cynical = medium_stress_impact_gain + zealous = medium_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_boldness = -0.5 + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -20 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -20 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = paranoid + } + } + } +} + +scripted_effect fp1_major_decisions_1002_courtiers_terrified_effect = { + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + add_opinion = { + target = root + modifier = respect_opinion + opinion = -30 + } + } +} + +fp1_major_decisions.1002 = { + type = character_event + title = fp1_major_decisions.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:type = flag:canute_dumb } + desc = fp1_major_decisions.1002.desc.dumb + } + desc = fp1_major_decisions.1002.desc.smart + } + } + theme = crown + left_portrait = { + character = root + # Smart Canute. + triggered_animation = { + trigger = { scope:type = flag:canute_smart } + animation = disapproval + } + # And, tragically, dumb-Canute. + triggered_animation = { + trigger = { scope:type = flag:canute_dumb } + animation = shock + } + } + right_portrait = { + character = scope:sycophant + # Reacting to smart Canute. + triggered_animation = { + trigger = { scope:type = flag:canute_smart } + animation = shame + } + # And, tragically, reacting to dumb-Canute. + triggered_animation = { + trigger = { scope:type = flag:canute_dumb } + animation = fear + } + } + override_background = { reference = docks } + + # Smart: shame the simpering courtiers. + option = { + name = fp1_major_decisions.1002.a + trigger = { scope:type = flag:canute_smart } + + # Gain a colossal amount of opinion with your court. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + add_opinion = { + target = root + modifier = respect_opinion + opinion = 75 + } + } + + stress_impact = { + cynical = medium_stress_impact_loss + humble = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_sociability = 0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = cynical + } + modifier = { # Weight up for stress. + add = 30 + has_trait = humble + } + } + } + + # Smart: abase yourself before HighGod. + option = { + name = fp1_major_decisions.1002.b + trigger = { scope:type = flag:canute_smart } + + # Gain a modifier trading piety for prestige. + add_character_modifier = { modifier = fp1_abased_before_highgod_modifier } + # And also a fairly-substantial amount of opinion with your court. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + add_opinion = { + target = root + modifier = respect_opinion + opinion = 50 + } + } + + stress_impact = { + humble = major_stress_impact_loss + zealous = massive_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_sociability = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = humble + } + modifier = { # Weight up for stress. + add = 40 + has_trait = zealous + } + } + } + + # Dumb: develop crippling thalassaphobia. + option = { + name = fp1_major_decisions.1002.c + trigger = { scope:type = flag:canute_dumb } + + # Gain stress. + ## More stress if you have neither modifier to lose. + if = { + limit = { + NOR = { + has_character_modifier = high_king_of_the_seas_fp1_modifier + has_character_modifier = high_queen_of_the_seas_fp1_modifier + } + } + stress_impact = { + base = massive_stress_gain + paranoid = major_stress_impact_loss + honest = major_stress_impact_gain + } + } + ## Ordinary stress otherwise. + else = { + stress_impact = { + paranoid = major_stress_impact_loss + honest = major_stress_impact_gain + } + } + # If you've got one, lose your beneficial modifier. + if = { + limit = { + OR = { + has_character_modifier = high_king_of_the_seas_fp1_modifier + has_character_modifier = high_queen_of_the_seas_fp1_modifier + } + } + remove_character_modifier = high_king_of_the_seas_fp1_modifier + remove_character_modifier = high_queen_of_the_seas_fp1_modifier + } + # The court is confused and afraid. + fp1_major_decisions_1002_courtiers_terrified_effect = yes + + # Stress impact handled above due to variability. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.25 + ai_rationality = -0.75 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = honest + } + } + } + + # Dumb: have the ocean whipped. No shade, Xerxes. + option = { + name = fp1_major_decisions.1002.d + trigger = { + scope:type = flag:canute_dumb + NOT = { has_trait = lunatic } + } + + # Welp, you're having a bit of a time. + custom_tooltip = fp1_major_decisions.1002.d.tt + add_trait = lunatic_1 + # The court is confused and afraid. + fp1_major_decisions_1002_courtiers_terrified_effect = yes + + stress_impact = { + vengeful = major_stress_impact_loss + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.75 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + } + } + + # Dumb: dedicate yourself to learning spellcraft. + option = { + name = fp1_major_decisions.1002.e + trigger = { + scope:type = flag:canute_dumb + is_witch_trigger = no + } + + # Become a witch. + give_witch_secret_or_trait_effect = yes + # The court is confused and afraid. + fp1_major_decisions_1002_courtiers_terrified_effect = yes + + stress_impact = { + cynical = medium_stress_impact_loss + craven = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -20 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -20 + has_trait = zealous + } + } + } +} + +################################################## +# The True King of Norway +# by Ewan Cowhig Croft +# 1011-1020 +################################################## + +scripted_effect fp1_1011_gib_pretty_hair_effect = { + # Gain the famous nickname. + give_nickname = nick_fairhair + # And a bit of diplomacy for your long vow. + add_diplomacy_skill = 2 + # Plus that haircut. + remove_character_modifier = harald_tanglehairs_vow_modifier +} + +# Tanglehair becomes Fairhair. +fp1_major_decisions.1011 = { + type = character_event + title = fp1_major_decisions.1011.t + desc = { + desc = fp1_major_decisions.1011.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:gyda } + desc = fp1_major_decisions.1011.desc.gyda + } + desc = fp1_major_decisions.1011.desc.oath + } + desc = fp1_major_decisions.1011.desc.outro + } + theme = crown + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:gyda + animation = admiration + } + 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 + } + 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 = { + name = fp1_major_decisions.1011.b + trigger = { + # Gyda must have been valid. + exists = scope:gyda + # And, for MP, remain valid. + can_marry_character_trigger = { CHARACTER = scope:gyda } + } + + # Apply standard haircut effects. + fp1_1011_gib_pretty_hair_effect = yes + # Harald & Gyda are wed. + if = { + limit = { + has_ep2_dlc_trigger = yes + } + create_grand_wedding_betrothal = { + SPOUSE_1 = root + SPOUSE_2 = scope:gyda + HOST = root + PROMISEE = scope:gyda + } + } + else = { marry = scope:gyda } + # And rather happy about it. + add_opinion = { + target = scope:gyda + modifier = love_opinion + opinion = 50 + } + reverse_add_opinion = { + target = scope:gyda + modifier = love_opinion + opinion = 50 + } + + ai_chance = { + # AI should always select this option if it's present. + base = 100 + } + } + + # Leave it; it is a mark of the struggles I have been through. + option = { + name = fp1_major_decisions.1011.c + trigger = { is_ai = no } + + # Harald Tanglehair keeps his wild locks. + custom_tooltip = fp1_major_decisions.1011.c.tt + ## We swap the modifiers out so the copy responds correctly. + hidden_effect = { + remove_character_modifier = harald_tanglehairs_vow_modifier + add_character_modifier = harald_tanglehairs_reminder_modifier + } + # And a bit of learning for the lessons you've endured. + add_learning_skill = 2 + + ai_chance = { + # Option here for player choice. + base = 0 + } + } +} + +# Check Norway's creation status. +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 = { + name = norway_created + value = yes + } + # And if it's not Harald Fairhair who did it, shame him. + if = { + limit = { + exists = character:144000 + NOT = { this = character:144000 } + character:144000 = { is_alive = yes } + } + hidden_effect = { + # Save the current King of Norway. + save_scope_as = king_of_norway + # And message Harald with the bad news. + character:144000 = { + send_interface_toast = { + title = fp1_major_decisions.1012.t + left_icon = scope:king_of_norway + hidden_effect = { remove_character_modifier = harald_tanglehairs_vow_modifier } + add_character_modifier = harald_tanglehairs_vow_broken_modifier + } + } + } + } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_other_decision_events.txt b/N3OW/events/dlc/fp1/fp1_other_decision_events.txt new file mode 100644 index 00000000..ecc8c398 --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_other_decision_events.txt @@ -0,0 +1,2726 @@ +namespace = fp1_other_decisions + +################################################## +# #Religious Events +# 0001 - 0020 Gruesome Festivals - hold a mighty sacrifice dedicated to your divinities. +# 0021 - 0040 GF Consequences - events resulting from GFs, e.g., the world freaking out at the sacrifice of a HoF. +# 0041 - 0060 Unreserved +# 0061 - 0080 GF Maintenance Events - invalidation events & Chief Sacrifice resets. +# +# 0101 - 0120 Stele Setup Events - select type & location. +################################################## + +################################################## +# Gruesome Festivals +# by Ewan Cowhig Croft +# 0001 - 0020 +################################################## + +# Human Sacrifice will be referred to as HumSac throughout. I make no apologies for whatever you envision as a result. + +# Clean up declining guest list: we track this separately, since we don't always want to fire it at the same time. +scripted_effect gruesome_sacrifices_clean_up_declining_guests_effect = { + #Shouldn't ever need to be more complicated than this, but might be. + clear_variable_list = gf_guests_rejecting_invite_list +} + +scripted_trigger sacrifice_method_hang_n_fang_trigger = { + scope:activity.var:gf_faith = { + religion = religion:germanic_religion + has_doctrine_parameter = cannibalism_legal + } +} +scripted_trigger sacrifice_method_eat_em_trigger = { + scope:activity.var:gf_faith = { has_doctrine_parameter = cannibalism_legal } +} +scripted_trigger sacrifice_method_hang_em_trigger = { + scope:activity.var:gf_faith.religion = religion:germanic_religion +} + +scripted_trigger gruesome_festivals_available_impressable_nobles = { + highest_held_title_tier >= tier_county + # Exempt priests, who have their own option. + NOT = { government_has_flag = government_is_theocracy } +} + +scripted_trigger gruesome_festivals_available_impressable_clergy = { + highest_held_title_tier >= tier_county + government_has_flag = government_is_theocracy +} + +scripted_trigger dislikes_humsac_trigger = { + NOR = { + has_doctrine_parameter = flower_war_cb_active + has_doctrine_parameter = human_sacrifice_active + has_doctrine_parameter = gruesome_festivals_active + } +} + +scripted_effect gruesome_festivals_blotter_opinion_gain_of_guests_effect = { + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:blotter + opinion = 30 + } +} + +# Let the sacrifice begin! +fp1_other_decisions.0003 = { + type = activity_event + title = fp1_other_decisions.0003.t + desc = { + # How big is the whole affair? + first_valid = { + triggered_desc = { + trigger = { scope:activity.var:blot_scale = flag:small } + desc = fp1_other_decisions.0003.desc.intro.small + } + triggered_desc = { + trigger = { scope:activity.var:blot_scale = flag:medium } + desc = fp1_other_decisions.0003.desc.intro.medium + } + triggered_desc = { + trigger = { scope:activity.var:blot_scale = flag:large } + desc = fp1_other_decisions.0003.desc.intro.large + } + } + # What's on the menu? + first_valid = { + # Adequate animal sacrifice. + triggered_desc = { + trigger = { scope:activity.var:blot_sacrifice = flag:animals_regular } + desc = fp1_other_decisions.0003.desc.animals.regular + } + # Magnificent animal sacrifice. + triggered_desc = { + trigger = { scope:activity.var:blot_sacrifice = flag:animals_magnificent } + desc = fp1_other_decisions.0003.desc.animals.magnificent + } + # Adequate HumSac, sans chief sacrifice. + triggered_desc = { + trigger = { + scope:activity.var:blot_sacrifice = flag:humans_regular + NOT = { exists = scope:unlucky_guest } + } + desc = fp1_other_decisions.0003.desc.humans.regular.sans_chief + } + # Magnificent HumSac, sans chief sacrifice. + triggered_desc = { + trigger = { + scope:activity.var:blot_sacrifice = flag:humans_magnificent + NOT = { exists = scope:unlucky_guest } + } + desc = fp1_other_decisions.0003.desc.humans.magnificent.sans_chief + } + # Adequate HumSac, plus chief sacrifice. + triggered_desc = { + trigger = { + scope:activity.var:blot_sacrifice = flag:humans_regular + exists = scope:unlucky_guest + } + desc = fp1_other_decisions.0003.desc.humans.regular.plus_chief + } + # Magnificent HumSac, plus chief sacrifice. + triggered_desc = { + trigger = { + scope:activity.var:blot_sacrifice = flag:humans_magnificent + exists = scope:unlucky_guest + } + desc = fp1_other_decisions.0003.desc.humans.magnificent.plus_chief + } + } + # How is it getting to the menu? + ## Named sacrifice is present. + triggered_desc = { + trigger = { exists = scope:unlucky_guest } + desc = { + first_valid = { + # Norse pagans cannibals hang their sacrifices, *then* eat them. + triggered_desc = { + trigger = { sacrifice_method_hang_n_fang_trigger = yes } + desc = fp1_other_decisions.0003.desc.sacrifice.named.norse_cannibals + } + # Cannibals execute them, then eat them them. + triggered_desc = { + trigger = { sacrifice_method_eat_em_trigger = yes } + desc = fp1_other_decisions.0003.desc.sacrifice.named.cannibals + } + # Norse pagans hang their sacrifices. + triggered_desc = { + trigger = { sacrifice_method_hang_em_trigger = yes } + desc = fp1_other_decisions.0003.desc.sacrifice.named.norse + } + # Fallback: disembowl the sacrifice. + desc = fp1_other_decisions.0003.desc.sacrifice.named.fallback + } + } + } + ## Humans are present. + triggered_desc = { + trigger = { + NOT = { exists = scope:unlucky_guest } + OR = { + scope:activity.var:blot_sacrifice = flag:humans_regular + scope:activity.var:blot_sacrifice = flag:humans_magnificent + } + } + desc = { + first_valid = { + # Norse pagans cannibals hang their sacrifices, *then* eat them. + triggered_desc = { + trigger = { sacrifice_method_hang_n_fang_trigger = yes } + desc = fp1_other_decisions.0003.desc.sacrifice.unnamed.norse_cannibals + } + # Cannibals execute them, then eat them them. + triggered_desc = { + trigger = { sacrifice_method_eat_em_trigger = yes } + desc = fp1_other_decisions.0003.desc.sacrifice.unnamed.cannibals + } + # Norse pagans hang their sacrifices. + triggered_desc = { + trigger = { sacrifice_method_hang_em_trigger = yes } + desc = fp1_other_decisions.0003.desc.sacrifice.unnamed.norse + } + # Fallback: disembowl the sacrifice. + desc = fp1_other_decisions.0003.desc.sacrifice.unnamed.fallback + } + } + } + ## Only animal sacrifices. + triggered_desc = { + trigger = { + OR = { + scope:activity.var:blot_sacrifice = flag:animals_regular + scope:activity.var:blot_sacrifice = flag:animals_magnificent + } + } + desc = { + first_valid = { + # No special Norse-cannibal or cannibal variants for animals, as they're just animals. + # Norse pagans hang their sacrifices. + triggered_desc = { + trigger = { sacrifice_method_hang_em_trigger = yes } + desc = fp1_other_decisions.0003.desc.sacrifice.animal.norse + } + # Fallback: disembowl the sacrifice. + desc = fp1_other_decisions.0003.desc.sacrifice.animal.fallback + } + } + } + # And what's your basic take on affairs? + first_valid = { + # If you don't share the faith, then this is a political ceremony. + triggered_desc = { + trigger = { + faith != scope:gf_faith + } + desc = fp1_other_decisions.0003.desc.outro.political + } + # Otherwise, you're faithful, and it's not. + desc = fp1_other_decisions.0003.desc.outro.faithful + } + } + theme = party + left_portrait = { + character = scope:blotter + animation = personality_rational + } + right_portrait = { + character = scope:unlucky_guest + animation = fear + } + override_background = { reference = temple } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Generic can-continue check. + #gruesome_sacrifices_grand_blot_can_continue_trigger = yes + # Already-started can-continue check. + #gruesome_sacrifices_grand_blot_in_progress_trigger = yes + } + + on_trigger_fail = { + # # If you have a prisoner marked for sacrifice, relieve them. + # every_prisoner = { + # limit = { has_character_modifier = gruesome_festivals_designated_sacrifice_fp1_modifier } + # designate_gruesome_festivals_sacrifice_modifier_removed_effect = { DESIGNATOR = scope:blotter } + # } + } + + immediate = { + involved_activity = { save_scope_as = activity } + # Get the party (audibly) started. + play_music_cue = "mx_cue_banquet" + + # Is it somebody specific's death day? + if = { + limit = { + # We don't actually need to check these scopes, but it's a convenient early out if your dungeon is huge for some reason. + OR = { + scope:activity.var:blot_sacrifice = flag:humans_regular + scope:activity.var:blot_sacrifice = flag:humans_magnificent + } + any_prisoner = { has_character_modifier = gruesome_festivals_designated_sacrifice_fp1_modifier } + } + # Ahhh, it is! Nab 'em for the murderising & calculate piety to be gained. + random_prisoner = { + limit = { has_character_modifier = gruesome_festivals_designated_sacrifice_fp1_modifier } + # Once for the portrait. + save_scope_as = unlucky_guest + # And once for loc. + save_scope_as = sacrifice + #To give accurate death notifications + add_character_flag = { + flag = is_currently_being_sacrificed + days = 1 + } + } + } + # If someone is dying but we don't care who, generate a dummy sacrifice. + else_if = { + limit = { + NOT = { exists = scope:unlucky_guest } + OR = { + scope:activity.var:blot_sacrifice = flag:humans_regular + scope:activity.var:blot_sacrifice = flag:humans_magnificent + } + } + random_dummy_gender_soldier_effect = { SCOPE_NAME = sacrifice } + } + # Take care of happy subjects. + ## Build a list of affected happy subjects. + ### Small first. + if = { + limit = { scope:activity.var:blot_scale = flag:small } + # Nab all courtiers & guests. + every_courtier_or_guest = { + limit = { faith = scope:gf_faith } + add_to_list = happified_character_subjects_list + } + } + ### Then try a medium list. + else_if = { + limit = { scope:activity.var:blot_scale = flag:medium } + # Nab all courtiers & guests. + every_courtier_or_guest = { + limit = { faith = scope:gf_faith } + add_to_list = happified_character_subjects_list + } + # Also nab all barons in your domain. + every_vassal = { + limit = { + highest_held_title_tier = tier_barony + faith = scope:gf_faith + } + add_to_list = happified_character_subjects_list + } + # Nab your domain titles. + every_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + faith = scope:gf_faith + } + add_to_list = happified_title_subjects_list + } + } + ### Finally, try a large list. + else_if = { + limit = { scope:activity.var:blot_scale = flag:large } + # Nab all courtiers & guests. + every_courtier_or_guest = { + limit = { faith = scope:gf_faith } + add_to_list = happified_character_subjects_list + } + # Also nab all vassals and sub-vassals. + every_vassal_or_below = { + limit = { faith = scope:gf_faith } + add_to_list = happified_character_subjects_list + } + # Nab all sub-realm titles. + every_sub_realm_county = { + limit = { faith = scope:gf_faith } + add_to_list = happified_title_subjects_list + } + } + ### Aaaand remove anyone who spurned the invitation explicitly. + if = { + limit = { + has_variable_list = gf_guests_rejecting_invite_list + any_in_list = { + variable = gf_guests_rejecting_invite_list + count >= 1 + # Account for people who might have converted in the meanwhilst. + faith = scope:gf_faith + } + } + every_in_list = { + variable = gf_guests_rejecting_invite_list + # TIT-25457 + remove_from_list = happified_title_subjects_list + } + } + # Set up var:gf_faith for custom loc to work; not used in strictly every permutation, but doesn't really need an if gate on it. + set_variable = { + name = gf_faith + value = scope:gf_faith + } + + scope:activity = { + add_activity_log_entry = { + key = gruesome_festival_immediate_log + score = 1000 + show_in_conclusion = yes + character = root + # Piety based on value calculated from the selected activity option + activity_host = { + if = { + limit = { exists = var:gf_piety_value } + add_piety = var:gf_piety_value + remove_variable = gf_piety_value + } + } + ## Big RIP, scope:unlucky_guest. + if = { + limit = { exists = scope:unlucky_guest } + # Sort opinions and kinslaying. + add_kinslayer_trait_or_nothing_effect = { VICTIM = scope:unlucky_guest} + execute_opinion_effect = { + VICTIM = scope:unlucky_guest + EXECUTIONER = scope:blotter + } + # Are you HumSac'ing the HoF of a faith that doesn't practice HumSac? + ## We hide this, since it's too late for you to do anything about now and it's more fun/terrifying to find out about it *after* the sacrifice. + hidden_effect = { + humsacd_a_hof_effect = { + SACRIFICER = scope:blotter + SACRIFICED_HOF = scope:unlucky_guest + } + } + ## And are you actually humsac'ing your *OWN* HoF? + if = { + limit = { scope:blotter.faith.religious_head = scope:unlucky_guest } + # Inform players that they're an abysmal, abysmal faith adherent. + every_player = { + limit = { + this != scope:blotter + faith = scope:unlucky_guest.faith + } + trigger_event = fp1_other_decisions.0023 + } + # Update scope:blotter's HumSac'd HoFs kill tally manually, since we're not going through the usual effect. + add_to_variable_list = { + name = humsacd_hofs + target = scope:unlucky_guest.faith + } + # And tell scope:blotter they dun goofed. + trigger_event = { + id = fp1_other_decisions.0024 + # We give it a day's delay, since they _might_ have taken a conversion option in the event itself, in which case the follow-up event is invalid. + days = 1 + } + } + # How exactly do they die? + scope:unlucky_guest = { + # Cannibalist Germanic pagans will hang them, then eat them. + trigger_event = fp1_other_decisions.1000 + if = { + limit = { sacrifice_method_hang_n_fang_trigger = yes } + death = { + killer = scope:blotter + death_reason = death_ritually_hung_then_eaten + } + } + # All other Germanic pagans will hang them. + else_if = { + limit = { sacrifice_method_eat_em_trigger = yes } + death = { + killer = scope:blotter + death_reason = death_ritually_eaten + } + } + # All other cannibals will just eat them. + else_if = { + limit = { sacrifice_method_hang_em_trigger = yes } + death = { + killer = scope:blotter + death_reason = death_ritually_hung + } + } + # Fallback deaths go here; variants should be added above this point. + else = { + death = { + killer = scope:blotter + death_reason = death_sacrificed_to_gods + } + } + } + } + ## Naturally, if appropriate, you become a cannibal. + activity_host = { + if = { + limit = { + OR = { + scope:activity.var:blot_sacrifice = flag:humans_regular + scope:activity.var:blot_sacrifice = flag:humans_magnificent + } + scope:gf_faith = { has_doctrine_parameter = cannibalism_legal } + NOT = { has_trait = cannibal } + } + add_trait = cannibal + } + } + ## Happify them appropriately. + ### First we do characters. + if = { + limit = { + any_in_list = { + list = happified_character_subjects_list + count >= 1 + } + } + every_in_list = { + list = happified_character_subjects_list + custom = fp1_other_decisions.0003.happy_characters_list + add_opinion = { + target = scope:blotter + modifier = fp1_held_grand_sacrifice_opinion + } + # And gain some opinion back from scope:blotter for turning up. + hidden_effect = { gruesome_festivals_blotter_opinion_gain_of_guests_effect = yes } + } + } + ### Then we do titles. + if = { + limit = { + any_in_list = { + list = happified_title_subjects_list + count >= 1 + } + } + every_in_list = { + list = happified_title_subjects_list + custom = fp1_other_decisions.0003.happy_titles_list + add_county_modifier = { + modifier = held_grand_sacrifice_fp1_modifier + years = 7 + } + } + } + # Take care of unhappy subjects. + ## Is building a list of unhappy subjects necessary? + activity_host = { + if = { + limit = { + OR = { + scope:activity.var:blot_sacrifice = flag:humans_regular + scope:activity.var:blot_sacrifice = flag:humans_magnificent + } + } + # If so, then we build one. + ## Grabbing all sub-realm characters who dislike HumSac. + every_courtier_or_guest = { + limit = { + faith = { dislikes_humsac_trigger = yes } + } + add_to_list = unhappified_character_subjects_list + } + every_vassal_or_below = { + limit = { + faith = { dislikes_humsac_trigger = yes } + } + add_to_list = unhappified_character_subjects_list + } + ## Then all sub-realm counties. + every_sub_realm_county = { + limit = { + faith = { dislikes_humsac_trigger = yes } + } + add_to_list = unhappified_title_subjects_list + } + # Before unhappifying them to taste. + ## Again, first characters. + if = { + limit = { + any_in_list = { + list = unhappified_character_subjects_list + count >= 1 + } + } + every_in_list = { + list = unhappified_character_subjects_list + custom = fp1_other_decisions.0003.unhappy_characters_list + add_opinion = { + target = scope:blotter + modifier = fp1_held_human_sacrifice_opinion + } + } + } + ## Then counties. + if = { + limit = { + any_in_list = { + list = unhappified_title_subjects_list + count >= 1 + } + } + every_in_list = { + list = unhappified_title_subjects_list + custom = fp1_other_decisions.0003.unhappy_titles_list + add_county_modifier = { + modifier = held_human_sacrifice_fp1_modifier + years = 7 + } + } + # Flag this character as having upset people. + set_variable = { + name = offended_counties_with_humsac + value = yes + years = 7 + } + } + } + } + } + } + # Cannibalism cleanup. + ## Specifically, we want every ranking guest who might have gotten some human meat reserved to become a cannibal. We do this later in the block so that we've already built a solid list of invited vassals. + if = { + limit = { + OR = { + scope:activity.var:blot_sacrifice = flag:humans_regular + scope:activity.var:blot_sacrifice = flag:humans_magnificent + } + scope:gf_faith = { has_doctrine_parameter = cannibalism_legal } + } + hidden_effect = { + every_in_list = { + list = happified_title_subjects_list + limit = { + # Filter out lowborns. + exists = dynasty + NOT = { has_trait = cannibal } + } + send_interface_toast = { + title = fp1_other_decisions.0003.attendee_became_cannibal + left_icon = scope:blotter + add_trait = cannibal + } + } + } + } + } + + # Faithful: focus on the faith. + option = { + name = fp1_other_decisions.0003.a + # Only available if you follow the scope:gf_faith & have priests to impress at all. + trigger = { + faith = { + this = scope:gf_faith + has_doctrine = doctrine_theocracy_temporal + } + } + + scope:activity = { + add_activity_log_entry = { + key = gruesome_festival_faithful_faith_option_log + score = 900 + show_in_conclusion = yes + character = root + activity_host = { + # Your commitment to ritual earns you opinion with the priestly classes. + if = { + limit = { + any_learning_councillor = { exists = this } + } + every_learning_councillor = { + add_opinion = { + target = scope:blotter + modifier = pleased_opinion + opinion = 50 + } + } + } + if = { + limit = { + any_in_list = { + list = happified_character_subjects_list + gruesome_festivals_available_impressable_clergy = yes + } + } + every_in_list = { + list = happified_character_subjects_list + custom = fp1_other_decisions.0003.b.clergy_list + limit = { gruesome_festivals_available_impressable_clergy = yes } + add_opinion = { + target = scope:blotter + modifier = pleased_opinion + opinion = 40 + } + } + } + } + } + } + + stress_impact = { + zealous = major_stress_impact_loss + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_sociability = -0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = 10 + has_trait = cynical + } + } + } + + # Faithful: focus on the nobility. + option = { + name = fp1_other_decisions.0003.b + # Must have actually got some other landed nobility coming, and be of the faith and able to take part fully. + trigger = { + faith = scope:gf_faith + any_in_list = { + list = happified_character_subjects_list + gruesome_festivals_available_impressable_nobles = yes + } + } + + scope:activity = { + add_activity_log_entry = { + key = gruesome_festival_faithful_nobility_option_log + score = 900 + show_in_conclusion = yes + character = root + # The nobles appreciate the extra attention you grace them with. + every_in_list = { + list = happified_character_subjects_list + custom = fp1_other_decisions.0003.b.nobility_list + limit = { gruesome_festivals_available_impressable_nobles = yes } + add_opinion = { + target = scope:blotter + modifier = pleased_opinion + opinion = 20 + } + } + } + } + + stress_impact = { + arrogant = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = -0.25 # Just because there's a lot fewer nobles than peasants. + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -20 + has_trait = humble + } + } + } + + # Faithful: focus on the commoners. + option = { + name = fp1_other_decisions.0003.c + # Must be of the faith and able to take part fully. + trigger = { faith = scope:gf_faith } + + scope:activity = { + add_activity_log_entry = { + key = gruesome_festival_faithful_commoners_option_log + score = 900 + show_in_conclusion = yes + character = root + # The commoners appreciate the extra attention. + every_in_list = { + list = happified_title_subjects_list + custom = fp1_other_decisions.0003.happy_titles_list + remove_county_modifier = held_grand_sacrifice_fp1_modifier + add_county_modifier = { + modifier = commoners_grand_sacrifice_fp1_modifier + years = 7 + } + } + } + } + + stress_impact = { + humble = major_stress_impact_loss + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.25 # Just because there's a lot fewer nobles than peasants. + } + modifier = { # Weight up for stress. + add = 30 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -30 + has_trait = arrogant + } + } + } + + # Political: engage no more than is necessary. + option = { + name = fp1_other_decisions.0003.d + # Must be an outsider. + trigger = { + faith != scope:gf_faith + } + + scope:activity = { + add_activity_log_entry = { + key = gruesome_festival_faithful_nobility_option_log + score = 900 + show_in_conclusion = yes + character = root + activity_host = { + # You console yourself with a minor moral victory. + add_stress = medium_stress_loss + } + } + } + + + stress_impact = { + arrogant = major_stress_impact_loss + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = humble + } + } + } + + # Political: engage wholeheartedly. + option = { + name = fp1_other_decisions.0003.e + # Must be an outsider. + trigger = { + faith != scope:gf_faith + } + + scope:activity = { + add_activity_log_entry = { + key = gruesome_festival_faithful_nobility_option_log + score = 900 + show_in_conclusion = yes + character = root + # The commoners appreciate the extra attention. + every_in_list = { + list = happified_title_subjects_list + custom = fp1_other_decisions.0003.happy_titles_list + remove_county_modifier = held_grand_sacrifice_fp1_modifier + add_county_modifier = { + modifier = commoners_grand_sacrifice_fp1_modifier + years = 10 + } + } + } + } + + stress_impact = { + humble = major_stress_impact_loss + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_zeal = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -30 + has_trait = arrogant + } + } + } + + # Political: you know, they make some good points... + option = { + name = fp1_other_decisions.0003.f + # Must be an outsider. + trigger = { + faith != scope:gf_faith + # We only allow this under certain circumstances. + OR = { + # The vast majority of your sub-realm follows their faith. + any_sub_realm_county = { + percent >= 0.75 + faith = scope:gf_faith + } + # Their fervour is high, your fervour is low. + ## Normal people require a very stark difference. + AND = { + faith = { fervor <= 10 } + scope:gf_faith = { fervor >= 90 } + } + ## Cynics are a bit less fussed. + AND = { + faith = { fervor <= 25 } + scope:gf_faith = { fervor >= 75} + } + } + } + + # First, we save your old faith for reference. + faith = { save_scope_as = old_faith } + # Next, we convert your faith. + set_character_faith_with_conversion = scope:gf_faith + + scope:activity = { + add_activity_log_entry = { + key = gruesome_festival_faithful_nobility_option_log + score = 900 + show_in_conclusion = yes + character = root + activity_host = { + # Then charge piety for the transition. + ## A sensible fee if they're reformed or you're both unreformed. + if = { + limit = { + OR = { + NOT = { + scope:gf_faith = { has_doctrine_parameter = unreformed } + } + AND = { + scope:old_faith = { has_doctrine_parameter = unreformed } + scope:gf_faith = { has_doctrine_parameter = unreformed } + } + } + } + add_piety = -500 + } + ## A reasonable, though still extremely high, fee otherwise, as then you're reformed & they're unreformed. + else = { add_piety = -2000 } + # Finally, you get a nickname. + if = { + limit = { + OR = { + has_bad_nickname = yes + has_any_nickname = no + } + } + # Converting within your religion, you're a heretic. + if = { + limit = { scope:old_faith.religion = scope:gf_faith.religion } + give_nickname = nick_the_heretic + } + # Converting outside of your religious family, you're a heathen. + else_if = { + limit = { + OR = { + AND = { + scope:old_faith.religion = { is_in_family = rf_eastern } + NOT = { + scope:gf_faith.religion = { is_in_family = rf_eastern } + } + } + AND = { + scope:old_faith.religion = { is_in_family = rf_pagan } + NOT = { + scope:gf_faith.religion = { is_in_family = rf_pagan } + } + } + AND = { + scope:old_faith.religion = { is_in_family = rf_abrahamic } + NOT = { + scope:gf_faith.religion = { is_in_family = rf_abrahamic } + } + } + } + } + give_nickname = nick_the_heathen + } + # And otherwise, you're an apostate. + else = { give_nickname = nick_the_apostate } + } + } + } + } + + stress_impact = { + trusting = medium_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_zeal = -1 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = arrogant + } + } + } + + after = { + # Take care of anyone who insulted you by not showing up. + trigger_event = { + id = fp1_other_decisions.0012 + months = 3 + } + } +} + +scripted_trigger gruesome_festivals_will_gain_cannibal_trait_trigger = { + # Is human flesh potentially on the menu? + scope:activity.var:gf_faith = { has_doctrine_parameter = cannibalism_legal } + # Are you already a cannibal? + NOT = { has_trait = cannibal } + # Is HumSac taking place to give meat to serve? + OR = { + scope:activity.var:blot_sacrifice = flag:humans_regular + scope:activity.var:blot_sacrifice = flag:humans_magnificent + } +} + +scripted_effect gruesome_festivals_turn_down_invitation_effect = { + # Add this character to scope:blotter's list of non-attendees. + save_temporary_scope_as = current_rejecter + scope:blotter = { + add_to_variable_list = { + name = gf_guests_rejecting_invite_list + target = scope:current_rejecter + } + } + #This removes the character from the activity and reroutes them homeward + root.current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } +} + +# Vassal: chance to decline invitation. +fp1_other_decisions.0011 = { + type = character_event + title = fp1_other_decisions.0011.t + desc = { + desc = fp1_other_decisions.0011.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:activity.var:gf_faith = { has_doctrine_parameter = cannibalism_legal } + } + desc = fp1_other_decisions.0011.desc.cannibal_blot + } + desc = fp1_other_decisions.0011.desc.fallback + } + desc = fp1_other_decisions.0011.desc.outro + } + theme = party + left_portrait = { + character = scope:blotter + animation = personality_honorable + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + # We divide our options between gaining the cannibal trait and not gaining the cannibal trait. + ## If gaining the cannibal trait, we make a bigger deal about attending, since we don't want the player to accidentally become a cannibal because they weren't paying attention. + ## If not gaining the cannibal trait (because no human flesh is being served or because you're already a cannibal), our options are a bit more varied. + + # Non-Cannibal Gain: go graciously. + option = { + name = fp1_other_decisions.0011.a + trigger = { gruesome_festivals_will_gain_cannibal_trait_trigger = no } + + # Get some opinion with scope:blotter for turning up. + show_as_tooltip = { gruesome_festivals_blotter_opinion_gain_of_guests_effect = yes } + + stress_impact = { + forgiving = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = shy + } + } + } + + # Non-Cannibal Gain: tell 'em to get stuffed. + option = { + name = fp1_other_decisions.0011.b + trigger = { gruesome_festivals_will_gain_cannibal_trait_trigger = no } + + # Scope:blotter will doubtless notice you failed to turn up. + custom_tooltip = fp1_other_decisions.0011.b.tt + gruesome_festivals_turn_down_invitation_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + shy = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = gregarious + } + } + } + + # Will Become Cannibal: go, and enjoy the HumSac to the fullest. + option = { + name = fp1_other_decisions.0011.c + trigger = { gruesome_festivals_will_gain_cannibal_trait_trigger = yes } + + # You'll eventually gain the cannibal trait, too. + show_as_tooltip = { add_trait = cannibal } + # Get some opinion with scope:blotter for turning up. + show_as_tooltip = { gruesome_festivals_blotter_opinion_gain_of_guests_effect = yes } + + stress_impact = { + forgiving = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + shy = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_vengefulness = -0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 20 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + } + } + + # Will Become Cannibal: go, but refuse to partake in human flesh. + option = { + name = fp1_other_decisions.0011.d + trigger = { gruesome_festivals_will_gain_cannibal_trait_trigger = yes } + + # Costs you a bit of extra piety, but you do opt out of the cannibal option. + add_piety = medium_piety_loss + # Get some opinion with scope:blotter for turning up. + show_as_tooltip = { gruesome_festivals_blotter_opinion_gain_of_guests_effect = yes } + + stress_impact = { + forgiving = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + shy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = sadistic + } + } + } + + # Will Become Cannibal: not a chance in GetFaith.GetNegativeAfterLife! + option = { + name = fp1_other_decisions.0011.e + trigger = { gruesome_festivals_will_gain_cannibal_trait_trigger = yes } + + # Costs you a bit of extra piety, but you do opt out of the cannibal option. + add_piety = medium_piety_loss + # Scope:blotter will doubtless notice you failed to turn up. + custom_tooltip = fp1_other_decisions.0011.e.tt + gruesome_festivals_turn_down_invitation_effect = yes + + stress_impact = { + vengeful = minor_stress_impact_loss + shy = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = gregarious + } + } + } +} + +# Blotter: at least one vassal declined your invitation. +fp1_other_decisions.0012 = { + type = character_event + title = fp1_other_decisions.0012.t + desc = { + desc = fp1_other_decisions.0012.desc.intro + first_valid = { + triggered_desc = { + trigger = { exists= scope:decliner_2 } + desc = fp1_other_decisions.0012.desc.multiple_decliners + } + desc = fp1_other_decisions.0012.desc.single_decliner + } + desc = fp1_other_decisions.0012.desc.outro + } + theme = party + left_portrait = { + character = scope:decliner_1 + animation = personality_honorable + } + right_portrait = { + character = scope:decliner_2 + animation = personality_honorable + } + lower_left_portrait = { character = scope:decliner_3 } + lower_center_portrait = { character = scope:decliner_4 } + lower_right_portrait = { character = scope:decliner_5 } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Do you have the appropriate variable list, and is there anyone actually in it? + has_variable_list = gf_guests_rejecting_invite_list + any_in_list = { + variable = gf_guests_rejecting_invite_list + is_alive = yes + is_imprisoned = no + count >= 1 + } + } + + immediate = { + # Work out which of our decliners is the worst and why. + ordered_in_list = { + variable = gf_guests_rejecting_invite_list + max = gruesome_festival_gf_guests_rejecting_invite_list_max_value + order_by = { + value = 0 + + # Weight up players a little. + if = { + limit = { is_ai = no } + add = 10 + } + # Then weight up by rank. + ## Kings. + if = { + limit = { highest_held_title_tier >= tier_kingdom } + add = 25 + } + ## Dukes. + if = { + limit = { highest_held_title_tier = tier_duchy } + add = 10 + } + # And add a little for every held county. + every_held_title = { + title_tier = county + add = 1 + } + #If they somehow die or are imprisoned before this event + if = { + limit = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + multiply = 0 + } + } + if = { + limit = { + NOT = { exists = scope:decliner_1 } + } + save_scope_as = decliner_1 + } + else_if = { + limit = { + NOT = { + this = scope:decliner_1 + exists = scope:decliner_2 + } + } + save_scope_as = decliner_2 + } + else_if = { + limit = { + NOT = { + this = scope:decliner_1 + this = scope:decliner_2 + exists = scope:decliner_3 + } + } + save_scope_as = decliner_3 + } + else_if = { + limit = { + NOT = { + this = scope:decliner_1 + this = scope:decliner_2 + this = scope:decliner_3 + exists = scope:decliner_4 + } + } + save_scope_as = decliner_4 + } + else_if = { + limit = { + NOT = { + this = scope:decliner_1 + this = scope:decliner_2 + this = scope:decliner_3 + this = scope:decliner_4 + exists = scope:decliner_5 + } + } + save_scope_as = decliner_5 + } + } + # Add them to a list for easy general management if there's more than one. + scope:decliner_1 = { add_to_list = decliners_list } + if = { + limit = { exists = scope:decliner_2 } + add_to_list = decliners_list + } + if = { + limit = { exists = scope:decliner_3 } + add_to_list = decliners_list + } + if = { + limit = { exists = scope:decliner_4 } + add_to_list = decliners_list + } + if = { + limit = { exists = scope:decliner_5 } + add_to_list = decliners_list + } + # Clean up the variable list. + gruesome_sacrifices_clean_up_declining_guests_effect = yes + } + + # Only the arch-offender annoys me! + option = { + name = fp1_other_decisions.0012.a + + # Inform scope:decliner_1. + hidden_effect = { + scope:decliner_1 = { + send_interface_toast = { + title = fp1_other_decisions.0012.a.decliner_toast.t + left_icon = scope:blotter + show_as_tooltip = { + progress_towards_rival_effect = { + REASON = rival_blotter_declined + CHARACTER = scope:blotter + OPINION = -30 + } + } + } + } + } + # Then actual rivalry/opinion loss. + progress_towards_rival_effect = { + REASON = rival_blotter_declined + CHARACTER = scope:decliner_1 + OPINION = -30 + } + + stress_impact = { + forgiving = minor_stress_impact_loss + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_rationality = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + } + } + + # Damn and blast the whole lot of them! + option = { + name = fp1_other_decisions.0012.b + # Only available if more than one of them turned you down. + trigger = { exists = scope:decliner_2 } + + # Inform the decliners. + hidden_effect = { + every_in_list = { + list = decliners_list + send_interface_toast = { + title = fp1_other_decisions.0012.a.decliner_toast.t + left_icon = scope:blotter + show_as_tooltip = { + progress_towards_rival_effect = { + REASON = rival_blotter_declined + CHARACTER = scope:blotter + OPINION = -30 + } + } + } + } + } + # Then actual rivalry/opinion loss. + every_in_list = { + list = decliners_list + limit = { + this != scope:blotter + } + custom = fp1_other_decisions.0012.b.all_decliners_list + progress_towards_rival_effect = { + REASON = rival_blotter_declined + CHARACTER = scope:blotter + OPINION = -30 + } + } + + stress_impact = { + forgiving = major_stress_impact_loss + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_rationality = -0.50 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -30 + has_trait = vengeful + } + } + } + + # Bah, who cares about a bunch of no-shows? + option = { + name = { + trigger = { + NOT = { exists = scope:decliner_2 } + } + text = fp1_other_decisions.0012.c.singular + } + name = { + trigger = { exists = scope:decliner_2 } + text = fp1_other_decisions.0012.c.plural + } + + # Carefreeeeeeee! + add_stress = medium_stress_loss + # But it was still a slight. + add_prestige = minor_prestige_loss + + stress_impact = { + forgiving = medium_stress_impact_loss + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } +} + +################################################## +# GF Consequences +# by Ewan Cowhig Croft +# 0021 - 0040 +################################################## + +scripted_effect gruesome_festivals_martyred_a_hof_effect = { + # We only show this here, actual effects are applied in the humsacd_a_hof_effect. + show_as_tooltip = { + $SACRIFICED_HOF$ = { + faith = { + change_fervor = { + value = hof_humsacd_fervour_gain + desc = fervor_gain_sacrficed_head_of_faith + } + } + # Since the nickname is assigned elsewhere, if they've already gotten it, it's safe to show it again. + if = { + limit = { has_nickname = nick_the_martyr } + give_nickname = nick_the_martyr + } + } + } +} + +# Your HoF was sacrificed. +fp1_other_decisions.0021 = { + type = character_event + title = fp1_other_decisions.0021.t + desc = { + desc = fp1_other_decisions.0021.desc + first_valid = { + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = holy_wars_forbidden } + } + desc = fp1_other_decisions.0021.desc.disallows_holy_wars + } + desc = fp1_other_decisions.0021.desc.allows_holy_wars + } + } + theme = skull + left_portrait = { + character = scope:sacrificer + animation = personality_dishonorable + } + right_portrait = { + character = scope:sacrificed_hof + animation = fear + } + override_background = { reference = throne_room } + + immediate = { + play_music_cue = "mx_cue_murder" + gruesome_festivals_martyred_a_hof_effect = { SACRIFICED_HOF = scope:sacrificed_hof } + } + + # What blasphemy is this?! + option = { + name = { + trigger = { has_trait = zealous } + text = fp1_other_decisions.0021.a.zealous + } + name = { + trigger = { has_trait = cynical } + text = fp1_other_decisions.0021.a.cynical + } + name = { + trigger = { + NOR = { + has_trait = zealous + has_trait = cynical + } + } + text = fp1_other_decisions.0021.a.fallback + } + + # Scope:hof_sacrificer has become immensely cheaper to holy war. + if = { + limit = { + NOT = { + scope:sacrificed_hof.faith = { has_doctrine_parameter = holy_wars_forbidden } + } + } + custom_tooltip = fp1_other_decisions.0021.cheaper_holy_wars.tt + custom_tooltip = fp1_other_decisions.0021.easier_holy_wars.tt + custom_tooltip = fp1_other_decisions.0021.ghw_target_preference.tt + } + + ai_chance = { + # Only one option, so it doesn't much matter. + base = 100 + } + } +} + +# You sacrificed a HoF & people are pissed. +fp1_other_decisions.0022 = { + type = character_event + title = fp1_other_decisions.0022.t + desc = { + desc = fp1_other_decisions.0022.desc + first_valid = { + triggered_desc = { + trigger = { + scope:sacrificed_hof.faith = { has_doctrine_parameter = holy_wars_forbidden } + } + desc = fp1_other_decisions.0022.desc.disallows_holy_wars + } + desc = fp1_other_decisions.0022.desc.allows_holy_wars + } + } + theme = skull + left_portrait = { + character = scope:sacrificer + animation = personality_honorable + } + right_portrait = { + character = scope:sacrificed_hof + animation = fear + } + override_background = { reference = throne_room } + + trigger = { + # We only want to get this event once per faith, since the effects don't really stack (except for fervour). + NAND = { + has_variable_list = humsacd_hofs_notified + is_target_in_variable_list = { + name = humsacd_hofs_notified + target = scope:sacrificed_hof.faith + } + } + } + + immediate = { + play_music_cue = "mx_cue_murder" + gruesome_festivals_martyred_a_hof_effect = { SACRIFICED_HOF = scope:sacrificed_hof } + # Stop repeats of the same event per person per faith. + add_to_variable_list = { + name = humsacd_hofs_notified + target = scope:sacrificed_hof.faith + } + scope:sacrificed_hof = { + save_scope_as = unlucky_guest + } + } + + # Oops and/or meh. + option = { + name = { + trigger = { + scope:sacrificed_hof.faith = { has_doctrine_parameter = holy_wars_forbidden } + } + text = fp1_other_decisions.0022.a.pacifists + } + name = { + trigger = { + NOT = { + scope:sacrificed_hof.faith = { has_doctrine_parameter = holy_wars_forbidden } + } + has_trait = craven + } + text = fp1_other_decisions.0022.a.craven + } + name = { + trigger = { + NOR = { + scope:sacrificed_hof.faith = { has_doctrine_parameter = holy_wars_forbidden } + has_trait = craven + } + } + text = fp1_other_decisions.0022.a.fallback + } + + # Scope:hof_sacrificer has become immensely cheaper to holy war. + if = { + limit = { + NOT = { + scope:sacrificed_hof.faith = { has_doctrine_parameter = holy_wars_forbidden } + } + } + custom_tooltip = fp1_other_decisions.0021.cheaper_holy_wars.tt + custom_tooltip = fp1_other_decisions.0021.easier_holy_wars.tt + custom_tooltip = fp1_other_decisions.0021.ghw_target_preference.tt + } + + ai_chance = { + # Only one option, so it doesn't much matter. + base = 100 + } + } +} + +scripted_effect gruesome_festivals_own_faith_martyred_own_hof_effect = { + add_piety_level = -5 + add_character_modifier = { modifier = ultimate_blasphemer_modifier } + if = { + limit = { + faith = { has_doctrine_parameter = excommunication_active } + } + # Add excommunication directly, since no one specific requested this. + add_excommunication_actual_effect = yes + } +} + +# Your HoF was sacrificed by someone sharing your faith for the sake of someone else's faith. +fp1_other_decisions.0023 = { + type = character_event + title = fp1_other_decisions.0023.t + desc = { + desc = fp1_other_decisions.0023.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:unlucky_guest.faith = { has_doctrine_parameter = excommunication_active } + } + desc = fp1_other_decisions.0023.desc.has_excommunication + } + desc = fp1_other_decisions.0023.desc.does_not_have_excommunication + } + desc = fp1_other_decisions.0023.desc.outro + } + theme = skull + left_portrait = { + character = scope:blotter + animation = paranoia + } + right_portrait = { + character = scope:unlucky_guest + animation = fear + } + override_background = { reference = throne_room } + + immediate = { + gruesome_festivals_martyred_a_hof_effect = { SACRIFICED_HOF = scope:unlucky_guest } + } + + # This is unforgiveable! + option = { + name = fp1_other_decisions.0023.a + trigger = { + NOT = { has_trait = cynical } + } + + # Indicate that scope:blotter is about to get the slap-down. + scope:blotter = { + show_as_tooltip = { gruesome_festivals_own_faith_martyred_own_hof_effect = yes } + } + + ai_chance = { + # Only one option, so it doesn't much matter. + base = 100 + } + } + + # What kind of a person are they? + option = { + name = fp1_other_decisions.0023.b + trigger = { has_trait = cynical } + + # Indicate that scope:blotter is about to get the slap-down. + scope:blotter = { + show_as_tooltip = { gruesome_festivals_own_faith_martyred_own_hof_effect = yes } + } + + ai_chance = { + # Only one option, so it doesn't much matter. + base = 100 + } + } +} + +# You sacrificed your OWN HoF, despite not even believing in the HumSac faith. +fp1_other_decisions.0024 = { + type = character_event + title = fp1_other_decisions.0024.t + desc = { + desc = fp1_other_decisions.0024.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:unlucky_guest.faith = { has_doctrine_parameter = excommunication_active } + } + desc = fp1_other_decisions.0024.desc.has_excommunication + } + desc = fp1_other_decisions.0024.desc.does_not_have_excommunication + } + desc = fp1_other_decisions.0024.desc.outro + } + theme = skull + left_portrait = { + character = scope:blotter + animation = paranoia + } + right_portrait = { + character = scope:unlucky_guest + animation = fear + } + override_background = { reference = throne_room } + + trigger = { + # If you converted away, you're golden. + scope:blotter.faith = scope:unlucky_guest.faith + } + + immediate = { + gruesome_festivals_martyred_a_hof_effect = { SACRIFICED_HOF = scope:unlucky_guest } + gruesome_festivals_own_faith_martyred_own_hof_effect = yes + } + + # _What have I done?!_ + option = { + name = fp1_other_decisions.0024.a + trigger = { has_trait = zealous } + + # Naturally, this will cause a lot of stress. + add_stress = monumental_stress_gain + + ai_chance = { + # Only one option, so it doesn't much matter. + base = 100 + } + } + + # They're only a human, not divinity itself! + option = { + name = fp1_other_decisions.0024.b + trigger = { has_trait = cynical } + + # Naturally, this will cause a lot of stress. + add_stress = major_stress_gain + + ai_chance = { + # Only one option, so it doesn't much matter. + base = 100 + } + } + + # It was my subjects, not me! + option = { + name = fp1_other_decisions.0024.c + trigger = { + NOR = { + has_trait = zealous + has_trait = cynical + } + } + + # Naturally, this will cause a lot of stress. + add_stress = massive_stress_gain + + ai_chance = { + # Only one option, so it doesn't much matter. + base = 100 + } + } +} + +fp1_other_decisions.1000 = { + type = character_event + title = fp1_other_decisions.1000.t + desc = fp1_other_decisions.1000.desc + theme = skull + left_portrait = { + character = scope:blotter + animation = personality_zealous + } + override_background = { + trigger = { + scope:blotter = { + religion = religion:germanic_religion + } + } + reference = fp1_tribal_temple + } + override_background = { + trigger = { + scope:blotter = { + NOT = { + religion = religion:germanic_religion + } + } + } + reference = temple_scope + } + + option = { + name = fp1_other_decisions.1000.a + + show_as_tooltip = { + death = { + killer = scope:blotter + death_reason = death_sacrificed_to_gods + } + } + } +} + +################################################## +# GF Maintenance Events +# by Ewan Cowhig Croft +# 0061 - 0080 +################################################## + +# Someone intending to sacrifice you has died +fp1_other_decisions.0062 = { + hidden = yes + + immediate = { + # If preparing a grand sacrifice, make sure your prisoners are relieved. + if = { + limit = { has_character_flag = gruesome_festivals_can_pick_human_sacrifice } + every_prisoner = { + limit = { has_character_modifier = gruesome_festivals_designated_sacrifice_fp1_modifier } + designate_gruesome_festivals_sacrifice_modifier_removed_effect = { DESIGNATOR = root } + } + } + } +} + +# Designated sacrifice has died +fp1_other_decisions.0063 = { + hidden = yes + + immediate = { + if = { + limit = { + has_character_modifier = gruesome_festivals_designated_sacrifice_fp1_modifier + NOT = { has_character_flag = is_currently_being_sacrificed } + } + save_scope_as = designated_sacrifice + if = { + # Should always have an imprisoner, but just in case. + limit = { exists = imprisoner } + imprisoner = { + send_interface_message = { + type = event_religious_bad_with_text + title = fp1_other_decisions.0063.t + desc = fp1_other_decisions.0063.desc + right_icon = scope:designated_sacrifice + } + } + } + } + } +} + +# Someone with offended counties has lost them (via death or independence). +fp1_other_decisions.0064 = { + hidden = yes + + trigger = { has_variable = offended_counties_with_humsac } + + immediate = { fp1_remove_humsac_offended_counties_effect = yes } +} + +################################################## +# Stele Setup Events +# by Ewan Cowhig Croft & Linnéa Thimrén +# 0101 - 0120 +################################################## + +# Select which type of stele you'll be raising. +fp1_other_decisions.0101 = { + type = character_event + title = fp1_other_decisions.0101.t + desc = fp1_other_decisions.0101.desc + theme = faith + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:ancestor + animation = personality_zealous + } + lower_right_portrait = scope:foe + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + # Save some variables as scopes for easy loc. + if = { + limit = { exists = var:ancestor_to_bury } + var:ancestor_to_bury = { save_scope_as = ancestor } + } + if = { + limit = { exists = var:recent_conquest_victory } + var:recent_conquest_victory = { save_scope_as = foe } + } + if = { + limit = { exists = var:recent_rank_increase } + var:recent_rank_increase = { save_scope_as = new_title } + } + } + + # Bury an ancestor. + option = { + name = fp1_other_decisions.0101.a + # For family. + trigger = { has_variable = ancestor_to_bury } + + # Note the type going forwards. + save_scope_value_as = { + name = stele_type + value = flag:ancestor + } + # Inform root & proceed. + custom_tooltip = fp1_other_decisions.0101.a.tt + trigger_event = fp1_other_decisions.0111 + + stress_impact = { + humble = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -20 + has_trait = arrogant + } + } + } + + # Commemorate a conquest. + option = { + name = fp1_other_decisions.0101.b + # Won a war that gained them territory. + trigger = { has_variable = recent_conquest_victory } + + # Note the type going forwards. + save_scope_value_as = { + name = stele_type + value = flag:conquest + } + # Inform root & proceed. + custom_tooltip = fp1_other_decisions.0101.b.tt + trigger_event = fp1_other_decisions.0111 + + stress_impact = { + arrogant = minor_stress_impact_loss + vengeful = medium_stress_impact_loss + humble = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } + + # Memorialise an increase in rank. + option = { + name = fp1_other_decisions.0101.c + # Marking going up a rank. + trigger = { has_variable = recent_rank_increase } + + # Note the type going forwards. + save_scope_value_as = { + name = stele_type + value = flag:promotion + } + # Inform root & proceed. + custom_tooltip = fp1_other_decisions.0101.c.tt + trigger_event = fp1_other_decisions.0111 + + stress_impact = { + arrogant = major_stress_impact_loss + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = humble + } + } + } + + # Actually, nahhhhhh. + option = { + name = fp1_other_decisions.0101.d + + # Give 'em their deposit back. + add_gold = var:raise_stele_refund + # Clear the cooldown. + remove_decision_cooldown = raise_stele_decision + + # No stress impact for opting out. + ai_chance = { + # If the AI has opened the interface, it should pick an option. + base = 0 + } + } + + # Run some mild clean-up. + after = { + # Clean-up the refund value. + remove_variable = raise_stele_refund + } +} + +scripted_effect fp1_apply_stele_effects = { + # Apply content-specific effects. + # Save ancillary characters. + ## Save the commissioning character. + $LOCATION$ = { + save_temporary_scope_as = stele_location + set_variable = { + name = stele_commissioner + value = root + years = fp1_stele_duration_value + } + } + ## Create a hidden dummy character from the local area to ascribe the carvings to. + hidden_effect = { + # Make the character. + create_character = { + age = 25 + random_traits = yes + gender_female_chance = 50 + dynasty = none + faith = $LOCATION$.faith + culture = $LOCATION$.culture + location = $LOCATION$.title_province + save_scope_as = carver + } + # Save them in the designated county. + $LOCATION$ = { + set_variable = { + name = stele_carver + value = scope:carver + years = fp1_stele_duration_value + } + } + # Kill them off. + scope:carver = { + death = { death_reason = death_vanished } + } + } + ## Ancestor effects. + if = { + limit = { scope:stele_type = flag:ancestor } + $LOCATION$ = { + # Set up the container for loc. + set_variable = { + name = stele_container + value = root.var:ancestor_to_bury + years = fp1_stele_duration_value + } + # Plus we want to remember the _type_ of stele we've got, so we can check if it's a character or title in there later. + set_variable = { + name = stele_scope_type + value = flag:character + years = fp1_stele_duration_value + } + # Add the actual modifier. + ## Stronger version for counties with stele-liking cultures. + if = { + limit = { fp1_can_raise_stele_title_scope_trigger = yes } + add_county_modifier = { + modifier = fp1_stele_ancestors_strong + years = fp1_stele_duration_value + desc = fp1_stele_ancestors_strong_custom_desc + } + } + ## Weaker version for counties with cultures that don't. + else = { + add_county_modifier = { + modifier = fp1_stele_ancestors_weak + years = fp1_stele_duration_value + desc = fp1_stele_ancestors_strong_custom_desc + } + } + # Add a generic flag for easy value adjustments elsewhere. + set_variable = { + name = stele_slot_occupied + value = yes + years = fp1_stele_duration_value + } + } + } + ## Conquest effects. + if = { + limit = { scope:stele_type = flag:conquest } + $LOCATION$ = { + # Set up the container for loc. + set_variable = { + name = stele_container + value = root.var:recent_conquest_victory + years = fp1_stele_duration_value + } + # Plus we want to remember the _type_ of stele we've got, so we can check if it's a character or title in there later. + set_variable = { + name = stele_scope_type + value = flag:character + years = fp1_stele_duration_value + } + # Add the actual modifier. + ## Stronger version for counties with stele-liking cultures. + if = { + limit = { fp1_can_raise_stele_title_scope_trigger = yes } + add_county_modifier = { + modifier = fp1_stele_conquest_strong + years = fp1_stele_duration_value + desc = fp1_stele_conquest_strong_custom_desc + } + } + ## Weaker version for counties with cultures that don't. + else = { + add_county_modifier = { + modifier = fp1_stele_conquest_weak + years = fp1_stele_duration_value + desc = fp1_stele_conquest_strong_custom_desc + } + } + # Add a generic flag for easy value adjustments elsewhere. + set_variable = { + name = stele_slot_occupied + value = yes + years = fp1_stele_duration_value + } + } + } + ## Promotion effects. + if = { + limit = { scope:stele_type = flag:promotion } + $LOCATION$ = { + # Set up the container for loc. + set_variable = { + name = stele_container + value = root.var:recent_rank_increase + years = fp1_stele_duration_value + } + # Plus we want to remember the _type_ of stele we've got, so we can check if it's a character or title in there later. + set_variable = { + name = stele_scope_type + value = flag:title + years = fp1_stele_duration_value + } + # Add the actual modifier. + ## Stronger version for counties with stele-liking cultures. + if = { + limit = { fp1_can_raise_stele_title_scope_trigger = yes } + add_county_modifier = { + modifier = fp1_stele_promotion_strong + years = fp1_stele_duration_value + desc = fp1_stele_promotion_strong_custom_desc + } + } + ## Weaker version for counties with cultures that don't. + else = { + add_county_modifier = { + modifier = fp1_stele_promotion_weak + years = fp1_stele_duration_value + desc = fp1_stele_promotion_strong_custom_desc + } + } + # Add a generic flag for easy value adjustments elsewhere. + set_variable = { + name = stele_slot_occupied + value = yes + years = fp1_stele_duration_value + } + } + } +} + +# With type chosen, select a specific location. +fp1_other_decisions.0111 = { + type = character_event + title = fp1_other_decisions.0111.t + desc = { + desc = fp1_other_decisions.0111.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:stele_type = flag:ancestor } + desc = fp1_other_decisions.0111.desc.ancestor + } + triggered_desc = { + trigger = { scope:stele_type = flag:conquest } + desc = fp1_other_decisions.0111.desc.conquest + } + triggered_desc = { + trigger = { scope:stele_type = flag:promotion } + desc = fp1_other_decisions.0111.desc.promotion + } + } + desc = fp1_other_decisions.0111.desc.outro + } + theme = faith + left_portrait = { + character = root + # We grieve ancestors. + triggered_animation = { + trigger = { scope:stele_type = flag:ancestor } + animation = grief + } + # And celebrate successes. + triggered_animation = { + trigger = { + NOT = { scope:stele_type = flag:ancestor } + } + animation = personality_bold + } + } + right_portrait = { + character = scope:secondary_portrait + # Ancestors show piety. + triggered_animation = { + trigger = { scope:stele_type = flag:ancestor } + animation = personality_zealous + } + # Foes show disgust. + triggered_animation = { + trigger = { scope:stele_type = flag:conquest } + animation = disgust + } + } + override_background = { reference = fp1_runestone } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + # First, we need to grab all of root's personally held counties. + every_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + } + add_to_list = personally_held_counties_list + } + # Then we sort them out according to the effectiveness of the modifiers. + ## Ancestor stelae want stele-valid areas with low popular opinion. + if = { + limit = { scope:stele_type = flag:ancestor } + ordered_in_list = { + list = personally_held_counties_list + max = raise_stele_county_preference_cap_value + order_by = raise_stele_variant_ancestor_value + # Grab three options. + if = { + limit = { + NOT = { exists = scope:location_a } + } + save_scope_as = location_a + } + else_if = { + limit = { + NOR = { + this = scope:location_a + exists = scope:location_b + } + } + save_scope_as = location_b + } + else_if = { + limit = { + NOR = { + this = scope:location_a + this = scope:location_b + exists = scope:location_c + } + } + save_scope_as = location_c + } + } + } + ## Conquest stelae want stele-valid areas with low control. + else_if = { + limit = { scope:stele_type = flag:conquest } + ordered_in_list = { + list = personally_held_counties_list + max = raise_stele_county_preference_cap_value + order_by = raise_stele_variant_conquest_value + # Grab three options. + if = { + limit = { + NOT = { exists = scope:location_a } + } + save_scope_as = location_a + } + else_if = { + limit = { + NOR = { + this = scope:location_a + exists = scope:location_b + } + } + save_scope_as = location_b + } + else_if = { + limit = { + NOR = { + this = scope:location_a + this = scope:location_b + exists = scope:location_c + } + } + save_scope_as = location_c + } + } + } + ## Promotion stelae want stele-valid areas with high development. + else_if = { + limit = { scope:stele_type = flag:promotion } + ordered_in_list = { + list = personally_held_counties_list + max = raise_stele_county_preference_cap_value + order_by = raise_stele_variant_promotion_value + # Grab three options. + if = { + limit = { + NOT = { exists = scope:location_a } + } + save_scope_as = location_a + } + else_if = { + limit = { + NOR = { + this = scope:location_a + exists = scope:location_b + } + } + save_scope_as = location_b + } + else_if = { + limit = { + NOR = { + this = scope:location_a + this = scope:location_b + exists = scope:location_c + } + } + save_scope_as = location_c + } + } + } + # If, for some reason, we have no designated county, just pick their capital. + else_if = { + limit = { + NOT = { exists = scope:location_a } + } + capital_county = { save_scope_as = location_a } + } + # Next, try to set up a secondary portrait. + ## Ancestors can be shown. + if = { + limit = { scope:stele_type = flag:ancestor } + var:ancestor_to_bury = { save_scope_as = secondary_portrait } + } + ## As can beaten foes. + else_if = { + limit = { scope:stele_type = flag:conquest } + var:recent_conquest_victory = { save_scope_as = secondary_portrait } + } + ## But there's no secondary character available for promotion steles. + # Finally, take care of generic stele effects. + fp1_apply_generic_stele_bonuses_effect = yes + } + + # Scope:location_a sounds good. + option = { + name = fp1_other_decisions.0111.a + + # Sort the local stele. + fp1_apply_stele_effects = { LOCATION = scope:location_a } + + # No stress impact for arbitrary choice. + ai_chance = { + # AI should always pick the best option. + base = 100 + } + } + + # Scope:location_b is a decent spot. + option = { + name = fp1_other_decisions.0111.b + trigger = { exists = scope:location_b } + + # Sort the local stele. + fp1_apply_stele_effects = { LOCATION = scope:location_b } + + # No stress impact for arbitrary choice. + ai_chance = { + # AI should always pick the best option; the first one. + base = 0 + } + } + + # Scope:location_c makes a fine choice. + option = { + name = fp1_other_decisions.0111.c + trigger = { exists = scope:location_c } + + # Sort the local stele. + fp1_apply_stele_effects = { LOCATION = scope:location_c } + + # No stress impact for arbitrary choice. + ai_chance = { + # AI should always pick the best option; the first one. + base = 0 + } + } + + # Run some mild clean-up. + after = { + # Remove used variables. + if = { + limit = { scope:stele_type = flag:ancestor } + remove_variable = ancestor_to_bury + } + else_if = { + limit = { scope:stele_type = flag:conquest } + remove_variable = recent_conquest_victory + } + else_if = { + limit = { scope:stele_type = flag:promotion } + remove_variable = recent_rank_increase + } + } +} + +# Error suppression. +fp1_other_decisions.0112 = { + hidden = yes + orphan = yes + + immediate = { + if = { + limit = { + exists = var:stele_scope_type + exists = var:stele_container + exists = var:stele_commissioner + exists = var:stele_carver + } + # TIT-23473 + # No effect needed. + } + } +} + +# New holder for a county with a stele. +fp1_other_decisions.0113 = { + hidden = yes + orphan = yes + + trigger = { + # Use expanded version if we have FP1. + has_fp1_dlc_trigger = yes + # Using a scripted effect here so we can look at the same trigger in the grant title interaction + fp1_remove_stele_new_holder_trigger = { + TITLE = scope:title + PREVIOUS_HOLDER = scope:previous_holder + NEW_HOLDER = root + } + } + + immediate = { + # Blanket remove all types. + scope:title = { + remove_variable = stele_scope_type + remove_variable = stele_container + remove_variable = stele_carver + remove_variable = stele_commissioner + remove_variable = stele_slot_occupied + remove_county_modifier = fp1_stele_ancestors_strong + remove_county_modifier = fp1_stele_ancestors_weak + remove_county_modifier = fp1_stele_conquest_strong + remove_county_modifier = fp1_stele_conquest_weak + remove_county_modifier = fp1_stele_promotion_strong + remove_county_modifier = fp1_stele_promotion_weak + } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_scandinavian_adventurer_events.txt b/N3OW/events/dlc/fp1/fp1_scandinavian_adventurer_events.txt new file mode 100644 index 00000000..7c2ab436 --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_scandinavian_adventurer_events.txt @@ -0,0 +1,1113 @@ +namespace = fp1_scandinavian_adventurers + +################################################## +# Scandinavian Adventurer Events +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_trigger valid_scandinavian_adventurer = { + is_available_ai_adult = yes + is_alive = yes + is_ruler = no + any_heir_title = { count = 0 } +} + +scripted_trigger significant_north_germanic_presence_trigger = { + holder = { + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + has_culture = culture:norman + has_character_modifier = embraced_local_traditions_modifier + dynasty ?= { + has_dynasty_modifier = settled_norse_dynasty_modifier + } + } + OR = { + AND = { + highest_held_title_tier >= tier_duchy + any_held_title = { + count >= 3 + title_tier = county + title_province = { geographical_region = $SCANDI_ADV_TARGET_REGION$ } + } + } + dynasty ?= { + has_dynasty_modifier = settled_norse_dynasty_modifier + } + } + } +} + +scripted_trigger scattered_north_germanic_presence_trigger = { + holder = { + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + has_culture = culture:norman + has_character_modifier = embraced_local_traditions_modifier + dynasty ?= { + has_dynasty_modifier = settled_norse_dynasty_modifier + } + } + } +} + +scripted_trigger valid_adventurer_target_trigger = { + holder = { + NOR = { + #Filter out North Germanics & Normans. + culture = { has_cultural_pillar = heritage_north_germanic } + has_culture = culture:norman + has_character_modifier = embraced_local_traditions_modifier + dynasty ?= { + has_dynasty_modifier = settled_norse_dynasty_modifier + } + #Plus any places already being attacked. + top_liege = { + any_character_war = { using_cb = fp1_scandi_adventurer_conquest } + } + #Or which have already earnt a ceasefire with this particular adventurer. Or any of their liege + OR = { + any_truce_holder = { this = scope:scandi_adventurer } + any_liege_or_above = { + any_truce_holder = { this = scope:scandi_adventurer } + } + } + #And finally anywhere that has earnt a little peace. + OR = { + has_character_modifier = fp1_reprieve_from_sa_modifier + any_liege_or_above = { has_character_modifier = fp1_reprieve_from_sa_modifier } + } + } + OR = { + is_ai = yes + #Filter out players, unless they're large enough to take the hit. + AND = { + is_ai = no + sub_realm_size >= 8 + } + } + } +} + +scripted_trigger valid_scandinavian_county_trigger = { + #Should be simple enough, but might want to make it more complex in future. + culture = { has_cultural_pillar = heritage_north_germanic } +} + +scripted_trigger valid_scandinavian_county_for_embark_trigger = { + is_coastal_county = yes + holder = { fp1_is_norse = yes } +} + +scripted_effect scandinavian_adventurer_start_war_effect = { + #Give the adventurer a dynamic title to tide them over. + create_dynamic_title = { + tier = duchy + name = { + first_valid = { + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_gender_male_dominated } + } + desc = VIKING_ARMY_MEN_NAME + } + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + desc = VIKING_ARMY_WOMEN_NAME + } + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_gender_equal } + } + desc = VIKING_ARMY_NEUTRAL_NAME + } + #Fallback, just in case. + desc = VIKING_ARMY_NEUTRAL_NAME + } + } + adj = VIKING_ARMY_adj + } + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + scope:new_title = { + set_capital_county = scope:adventurer_target + set_landless_title = yes + set_destroy_on_gain_same_tier = yes + set_no_automatic_claims = yes + set_can_be_named_after_dynasty = no + set_can_use_nomadic_naming = no + change_title_holder = { + holder = scope:scandi_adventurer + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:new_title = { + generate_coa = yes + set_variable = { + name = temporary_title + value = yes + } + } + #Declare the war. + scope:scandi_adventurer = { + start_war = { + casus_belli = fp1_scandi_adventurer_conquest + target = scope:adventurer_target.holder.top_liege + target_title = scope:adventurer_target.duchy + } + } + # Setup event troops. + scope:scandi_adventurer = { + # Set a random spawn location. + ## Try to pick a good spot in Scandinavia. + if = { + limit = { + any_county_in_region = { + region = world_europe_north + valid_scandinavian_county_for_embark_trigger = yes + } + } + random_county_in_region = { + region = world_europe_north + limit = { valid_scandinavian_county_for_embark_trigger = yes } + # Weight up according to development, so armies tend to spawn in places where more randos would congregate. + weight = { + modifier = { + add = { + value = development_level + multiply = 10 + } + } + } + save_temporary_scope_as = selected_county + scope:scandi_adventurer = { + set_variable = { + name = random_location + value = scope:selected_county.title_province + days = 365 + } + } + } + } + ## Otherwise, we used our backup of Lister, the last Scandinavian province left alive, three million miles into deep space. + else = { + set_variable = { + name = random_location + value = title:b_lister.title_province + days = 365 + } + } + # Work out how many event troops we should give the adventurer for a 60:40 fight. + spawn_army = { + levies = { + add = { + #Base of 400. + add = scope:adventurer_target.holder.top_liege.max_military_strength + #Multiply that by the realm size of the target's top_liege. + multiply = 1.5 + #Account for allies, adding more without just nullifying them. + scope:adventurer_target.holder.top_liege = { + every_ally = { add = this.max_military_strength } + } + #Cut it off so things don't get too ridiculous. + max = 8000 + #Make sure all adventurers have a moderately respectable force. + min = 1000 + } + } + inheritable = no + location = scope:scandi_adventurer.var:random_location + name = scandi_adventurer_event_troops + } + spawn_army = { + men_at_arms = { + type = huscarl + stacks = { + value = 1 + multiply = scope:adventurer_target.holder.top_liege.primary_title.tier + } + } + inheritable = yes + location = scope:scandi_adventurer.var:random_location + name = scandi_adventurer_event_troops + } + spawn_army = { + men_at_arms = { + type = light_footmen + stacks = { + value = 1 + multiply = scope:adventurer_target.holder.top_liege.primary_title.tier + } + } + inheritable = yes + location = scope:scandi_adventurer.var:random_location + name = scandi_adventurer_event_troops + } + # Suppress startup error false-positive + if = { + limit = { has_variable = random_location } + # Do nothing. + } + } + # Loan a little gold in case they're in debt/to keep them going. + scope:scandi_adventurer = { add_gold = scandinavian_adventurer_efficacy_loan_value } +} + +# Pre-filter event, check to see if we should keep sending out adventurers. +fp1_scandinavian_adventurers.0001 = { + scope = none + hidden = yes + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + NOT = { has_game_rule = fp1_scandi_adventurers_off } + OR = { + culture:norse = { + NOT = { has_cultural_era_or_later = culture_era_early_medieval } + } + culture:norwegian = { + NOT = { has_cultural_era_or_later = culture_era_early_medieval } + } + culture:danish = { + NOT = { has_cultural_era_or_later = culture_era_early_medieval } + } + culture:swedish = { + NOT = { has_cultural_era_or_later = culture_era_early_medieval } + } + } + } + + immediate = { + #We prefer to use actual characters, but if there aren't any, we try to generate a fallback. + ##Populate Western list backup. + if = { + limit = { + NOT = { + any_in_global_list = { + variable = western_scandinavian_adventurer_list + count >= 1 + valid_scandinavian_adventurer = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_western_scandinavia_pool + valid_scandinavian_county_trigger = yes + } + } + random_county_in_region = { + region = dlc_fp1_region_western_scandinavia_pool + limit = { valid_scandinavian_county_trigger = yes } + save_scope_as = scandinavian_county + } + create_character = { + location = scope:scandinavian_county.title_province + template = fp1_western_warrior_character + save_scope_as = backup_adventurer + } + scope:backup_adventurer = { + add_to_global_variable_list = { + name = western_scandinavian_adventurer_list + target = this + } + } + } + ##Populate Eastern list backup. + if = { + limit = { + NOT = { + any_in_global_list = { + variable = eastern_scandinavian_adventurer_list + count >= 1 + valid_scandinavian_adventurer = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_scandinavia_pool + valid_scandinavian_county_trigger = yes + } + } + random_county_in_region = { + region = dlc_fp1_region_eastern_scandinavia_pool + limit = { valid_scandinavian_county_trigger = yes } + save_scope_as = scandinavian_county + } + create_character = { + location = scope:scandinavian_county.title_province + template = fp1_eastern_warrior_character + save_scope_as = backup_adventurer + } + scope:backup_adventurer = { + add_to_global_variable_list = { + name = eastern_scandinavian_adventurer_list + target = this + } + } + } + #Launch the adventurer spawning events. + trigger_event = { + id = fp1_scandinavian_adventurers.0002 + days = { 0 365 } + } + trigger_event = { + id = fp1_scandinavian_adventurers.0003 + days = { 0 365 } + } + #Trigger the next wave of events. + if = { + limit = { has_game_rule = fp1_scandi_adventurers_apocalyptic } + trigger_event = { + id = fp1_scandinavian_adventurers.0001 + days = { 300 420 } + } + } + if = { + limit = { has_game_rule = fp1_scandi_adventurers_frequent } + trigger_event = { + id = fp1_scandinavian_adventurers.0001 + days = { 1725 1910 } + } + } + if = { + limit = { has_game_rule = fp1_scandi_adventurers_occasional } + trigger_event = { + id = fp1_scandinavian_adventurers.0001 + days = { 3540 3725 } + } + } + if = { + limit = { has_game_rule = fp1_scandi_adventurers_rare } + trigger_event = { + id = fp1_scandinavian_adventurers.0001 + days = { 5350 5600 } + } + } + } +} + +# General processing event, Western Europe. +fp1_scandinavian_adventurers.0002 = { + scope = none + hidden = yes + + trigger = { + #At least one valid adventurer. Should always be the case, but just to be sure. + any_in_global_list = { + variable = western_scandinavian_adventurer_list + count >= 1 + valid_scandinavian_adventurer = yes + } + } + + immediate = { + #SORT ACTORS + ##Grab the most eligible candidate from the western list. + ordered_in_global_list = { + variable = western_scandinavian_adventurer_list + limit = { valid_scandinavian_adventurer = yes } + order_by = { value = scandinavian_adventurer_priority_value } + save_scope_as = scandi_adventurer + add_character_modifier = scandinavian_adventurer_fp1_modifier + add_trait = adventurer + } + ##Check through the ordered western targets to see if a region needs a few more Norsemen. + ###Iceland & the Northern Isles + if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_iceland_isles + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_western_adventure_targets_iceland_isles } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_iceland_isles + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_iceland_isles + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_iceland_isles + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = western_scandi_targets_list + } + random_in_list = { + list = western_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Western Scotland & the Isles + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_scotland_isles + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_western_adventure_targets_scotland_isles } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_scotland_isles + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_scotland_isles + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_scotland_isles + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = western_scandi_targets_list + } + random_in_list = { + list = western_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Ireland + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_ireland + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_western_adventure_targets_ireland } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_ireland + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_ireland + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_ireland + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = western_scandi_targets_list + } + random_in_list = { + list = western_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Northern England + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_northern_england + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_western_adventure_targets_northern_england } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_northern_england + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_northern_england + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_northern_england + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = western_scandi_targets_list + } + random_in_list = { + list = western_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Northern France & Brittany + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_northern_france_brittany + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_western_adventure_targets_northern_france_brittany } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_northern_france_brittany + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_northern_france_brittany + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_northern_france_brittany + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = western_scandi_targets_list + } + random_in_list = { + list = western_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Pomerania & Prussia + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_pomerania_prussia + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_western_adventure_targets_pomerania_prussia } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_pomerania_prussia + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_pomerania_prussia + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_pomerania_prussia + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = western_scandi_targets_list + } + random_in_list = { + list = western_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Frisia + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_frisia + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_western_adventure_targets_frisia } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_frisia + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_frisia + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_western_adventure_targets_frisia + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = western_scandi_targets_list + } + random_in_list = { + list = western_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + + #SORT WAR + if = { + limit = { exists = scope:adventurer_target } + scope:scandi_adventurer = { trigger_event = fp1_scandinavian_adventurers.0005 } + } + } +} + +# General processing event, Eastern Europe. +fp1_scandinavian_adventurers.0003 = { + scope = none + hidden = yes + + trigger = { + #At least one valid adventurer. Should always be the case, but just to be sure. + any_in_global_list = { + variable = eastern_scandinavian_adventurer_list + count >= 1 + valid_scandinavian_adventurer = yes + } + } + + immediate = { + #SORT ACTORS + ##Grab the most eligible candidate from the eastern list. + ordered_in_global_list = { + variable = eastern_scandinavian_adventurer_list + limit = { valid_scandinavian_adventurer = yes } + order_by = { value = scandinavian_adventurer_priority_value } + save_scope_as = scandi_adventurer + add_character_modifier = scandinavian_adventurer_fp1_modifier + add_trait = adventurer + } + ##Check through the ordered eastern targets to see if a region needs a few more Norsemen. + ###Novgorod + if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_novgorod + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_eastern_adventure_targets_novgorod } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_novgorod + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_novgorod + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_novgorod + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = eastern_scandi_targets_list + } + random_in_list = { + list = eastern_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###White Rus' + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_white_rus + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_eastern_adventure_targets_white_rus } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_white_rus + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_white_rus + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_white_rus + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = eastern_scandi_targets_list + } + random_in_list = { + list = eastern_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Vladimir + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_vladimir + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_eastern_adventure_targets_vladimir } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_vladimir + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_vladimir + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_vladimir + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = eastern_scandi_targets_list + } + random_in_list = { + list = eastern_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Ruthenia + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_ruthenia + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_eastern_adventure_targets_ruthenia } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_ruthenia + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_ruthenia + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_ruthenia + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = eastern_scandi_targets_list + } + random_in_list = { + list = eastern_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Estonia + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_estonia + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_eastern_adventure_targets_estonia } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_estonia + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_estonia + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_estonia + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = eastern_scandi_targets_list + } + random_in_list = { + list = eastern_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + ###Zaporizhia + else_if = { + limit = { + NOR = { + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_zaporizhia + significant_north_germanic_presence_trigger = { SCANDI_ADV_TARGET_REGION = dlc_fp1_region_eastern_adventure_targets_zaporizhia } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_zaporizhia + count >= 3 + scattered_north_germanic_presence_trigger = yes + } + } + any_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_zaporizhia + valid_adventurer_target_trigger = yes + } + } + every_county_in_region = { + region = dlc_fp1_region_eastern_adventure_targets_zaporizhia + limit = { + NOT = { + holder = { is_in_list = western_scandi_targets_list } + } + valid_adventurer_target_trigger = yes + } + add_to_list = eastern_scandi_targets_list + } + random_in_list = { + list = eastern_scandi_targets_list + weight = { + modifier = { add = scandinavian_adventurer_target_title_priority_value } + } + save_scope_as = adventurer_target + } + } + + #SORT WAR + if = { + limit = { exists = scope:adventurer_target } + scope:scandi_adventurer = { trigger_event = fp1_scandinavian_adventurers.0005 } + } + } +} + +# Startup event, delaying the initial cycle. +fp1_scandinavian_adventurers.0004 = { + scope = none + hidden = yes + + immediate = { + trigger_event = { + id = fp1_scandinavian_adventurers.0001 + years = 5 + } + } +} + +# Start the war (separate event to config scopes correctly). +fp1_scandinavian_adventurers.0005 = { + hidden = yes + + immediate = { scandinavian_adventurer_start_war_effect = yes } +} + +# Drag in famous landless Norse characters if they haven't become landed after twenty years. +fp1_scandinavian_adventurers.0011 = { + scope = none + hidden = yes + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # No point in later starts. + game_start_date = 867.1.1 + } + + immediate = { + trigger_event = { + id = fp1_scandinavian_adventurers.0012 + years = 20 + } + } +} + +scripted_effect scandi_adventurers_grab_famous_character_effect = { + $CHARACTER$ ?= { + if = { + limit = { + # Still kickin'. + is_physically_able_adult = yes + # Shouldn't ever really be an issue, but y'never know. + is_ai = yes + # Hasn't got anything dynastic of note going on. + is_ruler = no + any_heir_title = { count = 0 } + # And is free and clear to go. + is_imprisoned = no + OR = { + is_married = no + AND = { + is_female = yes + matrilinear_marriage = yes + } + AND = { + is_male = yes + patrilinear_marriage = yes + } + } + # And is still North Germanic/not in either of the lists. + culture = { has_cultural_pillar = heritage_north_germanic } + NOR = { + save_temporary_scope_as = character + any_in_global_list = { + variable = western_scandinavian_adventurer_list + this = scope:character + } + any_in_global_list = { + variable = eastern_scandinavian_adventurer_list + this = scope:character + } + } + } + # Norse, Norwegians, & Danes go into the western adventurer list. + if = { + limit = { + OR = { + has_culture = culture:norse + has_culture = culture:norwegian + has_culture = culture:danish + } + } + add_to_global_variable_list = { + name = western_scandinavian_adventurer_list + target = this + } + } + # Norse & Swedes go into the eastern adventurer list. + if = { + limit = { + OR = { + has_culture = culture:norse + has_culture = culture:swedish + } + } + add_to_global_variable_list = { + name = eastern_scandinavian_adventurer_list + target = this + } + } + # Either way, flag 'em for priority in the system. + add_character_flag = prioritised_scandinavian_adventurer + } + } +} + +fp1_scandinavian_adventurers.0012 = { + hidden = yes + scope = none + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # No point in later starts. + game_start_date = 867.1.1 + + OR = { + exists = character:242 + exists = character:163119 + } + + } + + immediate = { + # Nab Rollo. + scandi_adventurers_grab_famous_character_effect = { CHARACTER = character:242 } + # Nab Ubbe. + scandi_adventurers_grab_famous_character_effect = { CHARACTER = character:163119 } + } +} + +fp1_scandinavian_adventurers.0021 = { + hidden = yes + scope = none + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # No point in later starts. + game_start_date = 867.1.1 + } + + immediate = { + # Haesteinn. + character:6878 = { add_character_flag = prioritised_scandinavian_adventurer } + # Ivar the Boneless. + character:163111 = { add_character_flag = prioritised_scandinavian_adventurer } + # Halfdan Whiteshirt. + character:163112 = { add_character_flag = prioritised_scandinavian_adventurer } + # Sigurdr Snake-in-the-Eye. + character:163110 = { add_character_flag = prioritised_scandinavian_adventurer } + # Bjorn Ironside. + character:163108 = { add_character_flag = prioritised_scandinavian_adventurer } + # Rurik the Troublemaker. + character:40605 = { add_character_flag = prioritised_scandinavian_adventurer } + # Dyre the Stranger. + character:6811 = { add_character_flag = prioritised_scandinavian_adventurer } + # Harald Fairhair. + character:144000 = { add_character_flag = prioritised_scandinavian_adventurer } + # Audr the Deep-Minded. + character:168609 = { add_character_flag = prioritised_scandinavian_adventurer } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_shieldmaiden_events.txt b/N3OW/events/dlc/fp1/fp1_shieldmaiden_events.txt new file mode 100644 index 00000000..6855c032 --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_shieldmaiden_events.txt @@ -0,0 +1,1426 @@ +namespace = fp1_shieldmaiden + +scripted_trigger wrong_gender_for_fighting_in_faith_trigger = { + #Has access to the appropriate cultural parameter. + culture = { has_cultural_parameter = has_access_to_shieldmaidens } + trigger_if = { # Has the Royal Court and thus can modify pillars + limit = { + has_dlc_feature = diverge_culture # Can modify pillars + } + OR = { + AND = { + culture = { has_cultural_parameter = martial_custom_male_only_combatant } + is_female = yes + } + AND = { + culture = { has_cultural_parameter = martial_custom_female_only_combatant } + is_male = yes + } + } + } + trigger_else = { # Does not have the Royal Court and thus combatant is governed by faith + OR = { + AND = { + faith = { has_doctrine_parameter = combatant_must_be_male_if_no_roco } + is_female = yes + } + AND = { + faith = { has_doctrine_parameter = combatant_must_be_female_if_no_roco } + is_male = yes + } + } + } +} + +################################################## +# Shieldmaiden Challenges You +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_trigger likely_to_be_offended_list_trigger = { + trigger_if = { # Has the Royal Court and thus can modify pillars + limit = { has_dlc_feature = diverge_culture } + culture = { + NOT = { has_cultural_parameter = martial_custom_equal_combatant } + } + } + trigger_else = { + #Separate religions already think your ways are terrible already, co-religionists think you're making them look bad. + religion = root.religion + #No bias, no problem. + faith = { + NOT = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco } + } + } + culture = { + # Warrior by merit, if strong enought you can be a warrior regardless of gender + NOT = { has_cultural_parameter = high_prowess_ignores_knight_restrictions } + } + #Existing shieldmaidens cut slack. + NOT = { has_trait = shieldmaiden } + age >= childhood_education_start_age +} + +scripted_trigger valid_to_become_shieldperson_trigger = { + wrong_gender_for_fighting_in_faith_trigger = yes + is_available_ai_adult = yes + prowess >= decent_skill_rating + NOT = { has_trait = shieldmaiden } + NOT = { has_trait = craven } +} + +scripted_trigger child_dreams_of_shieldpersonhood_trigger = { + valid_to_become_shieldperson_trigger = yes + is_courtier_of = root + location = root.location + has_character_flag = fp1_dreams_of_shieldpersondom +} + +# A wrong-gender courtier wishes to fight for you +fp1_shieldmaiden.0001 = { + type = character_event + title = fp1_shieldmaiden.0001.t + desc = fp1_shieldmaiden.0001.desc + theme = martial + left_portrait = { + character = scope:shieldmaiden + animation = personality_bold + } + right_portrait = { + character = scope:challenged_knight + animation = dismissal + } + override_background = { reference = throne_room } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_at_peace_adult = yes + is_landed = yes + NOT = { has_character_flag = had_event_fp1_shieldmaiden_0001 } + #Has access to the appropriate cultural parameter. + culture = { has_cultural_parameter = has_access_to_shieldmaidens } + #Your society must consider one gender or the other lesser. + trigger_if = { # Has the Royal Court and thus can modify pillars + limit = { has_dlc_feature = diverge_culture } + culture = { NOT = { has_cultural_parameter = martial_custom_equal_combatant } } + } + trigger_else = { + faith = { NOT = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco } } + } + #You've got to have at least one suitable courtier or guest. + any_courtier_or_guest = { valid_to_become_shieldperson_trigger = yes } + #Aaaand you need a decent knight to be challenged. + any_knight = { + is_available_ai_adult = yes + is_ruler = no + wrong_gender_for_fighting_in_faith_trigger = no + NOT = { has_trait = shieldmaiden } + } + } + + weight_multiplier = { + base = 1 + + #More likely if you're a ruling wrong-gender person yourself. + modifier = { + add = 1 + wrong_gender_for_fighting_in_faith_trigger = yes + } + #Even more so if you're actually a shieldmaiden yourself. + modifier = { + add = 1 + has_trait = shieldmaiden + } + # Weight up drastically if one of your children wishes to become a shieldmaiden. + modifier = { + add = 10 + any_child = { child_dreams_of_shieldpersonhood_trigger = yes } + } + } + + immediate = { + #Put the event on cooldown for a decade. + add_character_flag = { + flag = had_event_fp1_shieldmaiden_0001 + days = 3650 + } + #Sort the best possible shieldmaiden. + ordered_courtier_or_guest = { + # Grab children who were promised first. + limit = { + is_child_of = root + child_dreams_of_shieldpersonhood_trigger = yes + } + # Otherwise, look down available courtiers. + alternative_limit = { + valid_to_become_shieldperson_trigger = yes + #Check that it makes sense for this character to ask to be your shieldmaiden. + OR = { + #Meaning they should either not be one already... + NOT = { has_trait = shieldmaiden } + #... or be a wandering shieldmaiden. + is_pool_guest = yes + } + } + order_by = { + value = prowess + if = { + limit = { has_trait = brave } + add = 10 + } + if = { + limit = { has_trait = craven } + add = -10 + } + if = { + limit = { has_trait = ambitious } + add = 10 + } + if = { + limit = { has_trait = content } + add = -10 + } + if = { + limit = { has_trait = arrogant } + add = 5 + } + if = { + limit = { has_trait = humble } + add = -5 + } + if = { + limit = { has_trait = gregarious } + add = 5 + } + if = { + limit = { has_trait = shy } + add = -5 + } + } + save_scope_as = shieldmaiden + } + #And a suitable knight. + ordered_knight = { + limit = { + is_available_ai_adult = yes + is_ruler = no + wrong_gender_for_fighting_in_faith_trigger = no + NOT = { has_trait = shieldmaiden } + } + order_by = prowess + save_scope_as = challenged_knight + } + #For reference, add all courtiers & vassals who are likely to be offended if you just let any old wrong-gender human defy societal gender norms. + every_courtier = { + limit = { likely_to_be_offended_list_trigger = yes } + add_to_list = prejudiced_courtiers_list + } + every_vassal = { + limit = { likely_to_be_offended_list_trigger = yes } + add_to_list = prejudiced_courtiers_list + } + #Finally, if scope:shieldmaiden has dreamt of this day, clear the dream. Hopefully it went positively! + scope:shieldmaiden = { + if = { + limit = { has_character_flag = fp1_dreams_of_shieldpersondom } + remove_character_flag = fp1_dreams_of_shieldpersondom + } + } + } + + #You allow them to fight your knight. + option = { + name = fp1_shieldmaiden.0001.a + + scope:challenged_knight = { + #Your knight may hurt the prospective shieldmaiden. + scope:shieldmaiden = { + random = { + chance = scope:challenged_knight.prowess + increase_wounds_no_death_effect = { REASON = duel } + } + } + #And, depending on how fearsome they were, your knight may have been hurt right back. + random = { + chance = scope:shieldmaiden.prowess + increase_wounds_no_death_effect = { REASON = duel } + } + + #Sort the duel. + duel = { + skill = prowess + target = scope:shieldmaiden + #Your knight defeats the prospective shieldmaiden. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_shieldmaiden.0001.a.tt_success + root = { + send_interface_toast = { + title = fp1_shieldmaiden.0001.a.tt_success + left_icon = scope:shieldmaiden + scope:shieldmaiden = { + #scope:shieldmaiden is a tad miffed. + add_opinion = { + target = scope:challenged_knight + modifier = angry_opinion + opinion = -20 + } + } + #For your trouble, you and the knight split the prestige. + add_prestige = minor_prestige_gain + scope:challenged_knight = { add_prestige = minor_prestige_gain } + } + } + } + #Your knight is defeated. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_shieldmaiden.0001.a.tt_failure + root = { + send_interface_toast = { + title = fp1_shieldmaiden.0001.a.tt_failure + left_icon = scope:shieldmaiden + scope:shieldmaiden = { + #Officially designated a shieldmaiden! + add_trait = shieldmaiden + #Happy with the outcome of the duel. + add_opinion = { + target = scope:challenged_knight + modifier = pleased_opinion + opinion = 20 + } + #If scope:shieldmaiden is a guest, you get them for free. + if = { + limit = { is_pool_guest = yes } + root = { add_courtier = scope:shieldmaiden } + } + } + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_energy = -0.25 + ai_boldness = -0.25 + } + modifier = { #Cowardly shieldmaidens don't see the necessity of a fight. + add = -40 + has_trait = shieldmaiden + has_trait = craven + } + modifier = { #Brave shieldmaidens, on the other hand, will insist you earn it (either way). + add = 20 + has_trait = shieldmaiden + has_trait = brave + } + } + } + + #You take the challenge yourself. + option = { + name = fp1_shieldmaiden.0001.b + + #You may have hurt the prospective shieldmaiden in the duel. + scope:shieldmaiden = { + random = { + chance = root.prowess + increase_wounds_no_death_effect = { REASON = duel } + } + } + #Plus they may have hurt you right back. + random = { + chance = scope:shieldmaiden.prowess + increase_wounds_no_death_effect = { REASON = duel } + } + + #Sort the duel. + duel = { + skill = prowess + target = scope:shieldmaiden + #You defeat the prospective shieldmaiden. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_shieldmaiden.0001.b.tt_success + send_interface_toast = { + title = fp1_shieldmaiden.0001.b.tt_success + left_icon = scope:shieldmaiden + scope:shieldmaiden = { + #scope:shieldmaiden is a tad miffed. + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + #Since you fought yourself, you get all the prestige. + add_prestige = medium_prestige_gain + } + } + #You are defeated. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_shieldmaiden.0001.b.tt_failure + send_interface_toast = { + title = fp1_shieldmaiden.0001.b.tt_failure + left_icon = scope:shieldmaiden + scope:shieldmaiden = { + #Officially designated a shieldmaiden! + add_trait = shieldmaiden + #Happy with the outcome of the duel. + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + #If scope:shieldmaiden is a guest, you get them for free. + if = { + limit = { is_pool_guest = yes } + root = { add_courtier = scope:shieldmaiden } + } + } + } + } + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -20 + has_trait = craven + } + modifier = { #Cowardly shieldmaidens don't see the necessity of a fight. + add = -40 + has_trait = shieldmaiden + has_trait = craven + } + modifier = { #Brave shieldmaidens, on the other hand, will insist you earn it (either way). + add = 20 + has_trait = shieldmaiden + has_trait = brave + } + } + } + + #Accept them outright. + option = { + name = fp1_shieldmaiden.0001.c + + scope:shieldmaiden = { + #Grant the shieldmaiden trait. + add_trait = shieldmaiden + #Opinion gain with new shieldmaiden. + add_opinion = { + target = root + modifier = fp1_accepted_my_sword_opinion + } + #If scope:shieldmaiden is a guest, you get them for free. + if = { + limit = { is_pool_guest = yes } + root = { add_courtier = scope:shieldmaiden } + } + } + #Loyalty hook on the new shieldmaiden for your trust. + if = { + limit = { + NOR = { + has_hook_of_type = { + target = scope:shieldmaiden + type = loyalty_hook + } + has_hook_of_type = { + target = scope:shieldmaiden + type = ritual_best_friend_hook + } + } + } + if = { + limit = { + has_hook = scope:shieldmaiden + } + hidden_effect = { remove_hook = { target = scope:shieldmaiden } } + } + add_hook = { + type = loyalty_hook + target = scope:shieldmaiden + } + } + #Opinion loss with all courtiers who do not feel they should be able to fight. + if = { + limit = { + any_in_list = { + list = prejudiced_courtiers_list + count >= 1 + } + } + every_in_list = { + list = prejudiced_courtiers_list + limit = { + #Exempt shieldmaidens; we do this at this point, otherwise the shieldmaiden themself will objet to their own shieldmaidenry. + NOT = { has_trait = shieldmaiden } + } + custom = fp1_accepted_shieldmaiden_without_question + add_opinion = { + target = root + modifier = fp1_defied_religious_traditions_opinion + } + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.25 + ai_zeal = -0.25 + } + modifier = { #Weight down for stress. + add = 10 + has_trait = arbitrary + } + modifier = { #Weight up for stress. + add = -10 + has_trait = just + } + modifier = { #Weight up for stress. + add = -20 + has_trait = arrogant + } + modifier = { #Cowardly shieldmaidens don't see the necessity of a fight. + add = 40 + has_trait = shieldmaiden + has_trait = craven + } + modifier = { #Brave shieldmaidens, on the other hand, will insist you earn it. + add = -40 + has_trait = shieldmaiden + has_trait = brave + } + } + } + + #Reject them outright. + option = { + name = fp1_shieldmaiden.0001.d + + #Hefty opinion loss. + reverse_add_opinion = { + target = scope:shieldmaiden + modifier = fp1_rejected_my_sword_opinion + } + + #Stepped rivalry between you and the potential shieldmaiden. + progress_towards_rival_effect = { + REASON = rival_shieldmaiden_declined + CHARACTER = scope:shieldmaiden + OPINION = 0 + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + just = minor_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.25 + ai_compassion = -0.25 + ai_honor = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { #Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -10 + has_trait = just + } + modifier = { #Weight down for stress. + add = -20 + has_trait = humble + } + modifier = { #Shieldmaidens are, themselves, more likely to give someone a shot. + add = -40 + has_trait = shieldmaiden + } + } + } +} + +################################################## +# Shieldmaiden Stymies an Escape Attempt +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +# A shieldmaiden stops your escape attempt in its tracks. +fp1_shieldmaiden.0011 = { + type = character_event + title = fp1_shieldmaiden.0011.t + desc = fp1_shieldmaiden.0011.desc + theme = prison + left_portrait = { + character = scope:prisoner + animation = fear + } + right_portrait = { + character = scope:shieldmaiden + animation = disapproval + } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Requires a shieldmaiden to get going. + imprisoner = { + any_courtier = { suitable_shieldmaiden_gaoler_trigger = yes } + } + } + + immediate = { + play_music_cue = "mx_cue_prison" + save_scope_as = prisoner + imprisoner = { + #Grab an appropriate shieldmaiden. + random_courtier = { + limit = { suitable_shieldmaiden_gaoler_trigger = yes } + save_scope_as = shieldmaiden + } + #Inform the imprisoner so that they're aware they're getting value for money. + trigger_event = fp1_shieldmaiden.0012 + } + scope:imprisoner = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + } + } + + #The shieldmaiden lays the smackdown. + option = { + name = fp1_shieldmaiden.0011.a + increase_wounds_no_death_effect = { REASON = beaten } + } +} + +# A shieldmaiden has stopped one of your prisoners escaping. +fp1_shieldmaiden.0012 = { + type = character_event + title = fp1_shieldmaiden.0012.t + desc = fp1_shieldmaiden.0012.desc + theme = prison + left_portrait = { + character = scope:prisoner + animation = fear + } + right_portrait = { + character = scope:shieldmaiden + animation = disapproval + } + + trigger = { + scope:prisoner = { + is_of_major_or_minor_interest_trigger = { CHARACTER = scope:imprisoner } + } + } + + immediate = { + play_music_cue = "mx_cue_prison" + #Show the wounds. + show_as_tooltip = { + scope:prisoner = { + increase_wounds_effect = { REASON = beaten } + } + } + } + + #Good job! + option = { + name = fp1_shieldmaiden.0012.a + scope:shieldmaiden = { + add_opinion = { + target = scope:imprisoner + modifier = compliment_opinion + opinion = 10 + } + } + } + + #Bad job! [in case this was an overreaction] + option = { + name = fp1_shieldmaiden.0012.b + scope:shieldmaiden = { + add_opinion = { + target = scope:imprisoner + modifier = annoyed_opinion + opinion = -10 + } + } + } +} + +################################################## +# Shieldmaiden saves you from Murder Attempt +# by Petter Vilberg & Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +scripted_trigger suitable_shieldmaiden_savior_trigger = { + has_trait = shieldmaiden + bodyguard_will_actually_do_job_trigger = yes +} + +# Scheme owner: shieldmaiden intervenes in murder. +fp1_shieldmaiden.0021 = { + type = character_event + window = scheme_failed_event + title = fp1_shieldmaiden.0021.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:murder_method = flag:hired_thugs } + desc = fp1_shieldmaiden.0021.desc.thugs + } + triggered_desc = { + trigger = { scope:murder_method = flag:riled_up_mob } + desc = fp1_shieldmaiden.0021.desc.mob + } + triggered_desc = { + trigger = { scope:murder_method = flag:lured_into_forest } + desc = fp1_shieldmaiden.0021.desc.lured_into_forest + } + triggered_desc = { + trigger = { scope:murder_method = flag:child_pushed } + desc = fp1_shieldmaiden.0021.desc.child_pushed + } + desc = fp1_shieldmaiden.0021.desc.assassin + } + triggered_desc = { + trigger = { exists = local_var:shieldmaiden_dies } + desc = fp1_shieldmaiden.0021.shieldmaiden_dies + } + } + theme = murder_scheme + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = fear + } + animation = stress + } + center_portrait = { + character = scope:bodyguard + triggered_animation = { + trigger = { is_alive = no } + animation = map_fear + } + animation = random_weapon_aggressive + camera = camera_event_center_pointing_left + } + right_portrait = { + character = scope:target + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = rage + } + animation = paranoia + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + scope:target = { + any_court_position_holder = { + type = bodyguard_court_position + suitable_shieldmaiden_savior_trigger = yes + } + } + } + + immediate = { + # Select a murder method. + random_list = { + 100 = { + save_scope_value_as = { + name = murder_method + value = flag:hired_assassin + } + } + 100 = { + save_scope_value_as = { + name = murder_method + value = flag:hired_thugs + } + } + 100 = { + save_scope_value_as = { + name = murder_method + value = flag:riled_up_mob + } + } + 100 = { + save_scope_value_as = { + name = murder_method + value = flag:lured_into_forest + } + } + 100 = { + save_scope_value_as = { + name = murder_method + value = flag:child_pushed + } + # Try to grab a suitable thing to lure them in with too. + rooftop_murder_lure_for_child_effect = yes + } + } + # Sort our shieldmaiden + scope:target = { + ordered_court_position_holder = { + type = bodyguard_court_position + limit = { suitable_shieldmaiden_savior_trigger = yes } + order_by = { value = murder_weight_best_bodyguard_value } + save_scope_as = shieldmaiden + } + } + hidden_effect = { + if = { + limit = { + # Shieldmaidens can't die from some murder methods. + NOR = { + scope:murder_method = flag:lured_into_forest + scope:murder_method = flag:child_pushed + } + } + random = { + chance = { + value = 75 + subtract = scope:shieldmaiden.prowess + } + set_local_variable = { + name = shieldmaiden_dies + value = yes + } + } + } + } + if = { + limit = { exists = local_var:shieldmaiden_dies } + show_as_tooltip = { + murder_interception_handle_extra_deaths_effect = { + VICTIM = scope:shieldmaiden + REASON = death_murder + } + } + } + random_dummy_gender_assassin_effect = yes + murder_failure_effect = yes + } + + #It's over. + option = { name = fp1_shieldmaiden.0021.a } + + #It's not over till I say it's over! + option = { + name = fp1_shieldmaiden.0021.b + trigger = { + NOT = { exists = scope:scheme_discovered } + } + restart_murder_scheme_effect = yes + } + + # Fire the rest of the outcome. + after = { + scope:target = { trigger_event = fp1_shieldmaiden.0022 } + } +} + +# Shieldmaiden saves you from murder +fp1_shieldmaiden.0022 = { + type = character_event + window = scheme_target_event + title = fp1_shieldmaiden.0022.t + desc = { + # This block is only for the setup of child_pushed. + first_valid = { + triggered_desc = { + trigger = { + scope:murder_method = flag:child_pushed + exists = scope:child_pushed_dog + } + desc = murder_outcome.5001.child_pushed_dog + } + triggered_desc = { + trigger = { + scope:murder_method = flag:child_pushed + exists = scope:child_pushed_cat + } + desc = murder_outcome.5001.child_pushed_cat + } + triggered_desc = { + trigger = { + scope:murder_method = flag:child_pushed + exists = scope:child_pushed_toy + } + desc = murder_outcome.5001.child_pushed_toy + } + triggered_desc = { + trigger = { + scope:murder_method = flag:child_pushed + } + desc = murder_outcome.5001.child_pushed + } + } + # Shieldmaided saves you! + first_valid = { + triggered_desc = { + trigger = { scope:murder_method = flag:hired_thugs } + desc = fp1_shieldmaiden.0022.desc.thugs + } + triggered_desc = { + trigger = { scope:murder_method = flag:riled_up_mob } + desc = fp1_shieldmaiden.0022.desc.mob + } + triggered_desc = { + trigger = { scope:murder_method = flag:lured_into_forest } + desc = fp1_shieldmaiden.0022.desc.lured_into_forest + } + triggered_desc = { + trigger = { scope:murder_method = flag:child_pushed } + desc = fp1_shieldmaiden.0022.desc.child_pushed + } + desc = fp1_shieldmaiden.0022.desc.assassin + } + # ...but did they pay the ultimate price? + first_valid = { + triggered_desc = { + trigger = { + exists = local_var:shieldmaiden_dies + scope:murder_method = flag:hired_assassin + } + desc = fp1_shieldmaiden.0022.desc.assassin.shieldmaiden_dies + } + triggered_desc = { + trigger = { + exists = local_var:shieldmaiden_dies + scope:murder_method = flag:hired_thugs + } + desc = fp1_shieldmaiden.0022.desc.thugs.shieldmaiden_dies + } + triggered_desc = { + trigger = { + exists = local_var:shieldmaiden_dies + scope:murder_method = flag:riled_up_mob + } + desc = fp1_shieldmaiden.0022.desc.mob.shieldmaiden_dies + } + triggered_desc = { + trigger = { + NOT = { exists = local_var:shieldmaiden_dies } + scope:murder_method = flag:riled_up_mob + } + desc = fp1_shieldmaiden.0022.desc.mob.shieldmaiden_lives + } + } + # And who was responsible!? + triggered_desc = { + trigger = { exists = scope:scheme_discovered } + desc = fp1_shieldmaiden.0022.owner_discovered + } + } + theme = murder_scheme + override_background = { + trigger = { scope:murder_method = flag:hired_thugs } + reference = wilderness_scope + } + override_background = { + trigger = { + OR = { + scope:murder_method = flag:riled_up_mob + scope:murder_method = flag:child_pushed + } + } + reference = courtyard + } + override_background = { + trigger = { scope:murder_method = flag:lured_into_forest } + reference = wilderness_forest + } + left_portrait = { + character = scope:target + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = rage + } + animation = paranoia + } + center_portrait = { + character = scope:bodyguard + triggered_animation = { + trigger = { is_alive = no } + animation = map_fear + } + animation = random_weapon_aggressive + } + right_portrait = { + character = scope:owner_to_reveal + triggered_animation = { + trigger = { exists = scope:scheme_discovered } + animation = fear + } + animation = stress + } + + immediate = { + if = { + limit = { scope:murder_method = flag:hired_thugs } + scope:home_province = { save_scope_as = background_wilderness_scope } + } + # Handle the death of the Shieldmaiden if necessary + if = { + limit = { exists = local_var:shieldmaiden_dies } + murder_interception_handle_extra_deaths_effect = { + VICTIM = scope:shieldmaiden + REASON = death_murder + } + } + } + + #Who could do such a thing? + option = { + name = fp1_shieldmaiden.0022.a + trigger = { + NOT = { exists = scope:scheme_discovered } + } + custom_tooltip = murder_save.failure_unknown_owner_tt + } + + #Vengeance! + option = { + name = fp1_shieldmaiden.0022.b + trigger = { exists = scope:scheme_discovered } + custom_tooltip = murder_save.failure_known_owner_tt + } + + after = { + add_character_modifier = { + modifier = watchful_modifier + days = watchful_modifier_duration + } + } +} + +################################################## +# Shieldmaiden has Developed Mad Skills +# by Ewan Cowhig Croft +# 0031 - 0040 +################################################## + +scripted_trigger valid_for_shieldmaiden_veterancy = { + # Must actually have the shieldmaiden trait. + has_trait = shieldmaiden + # Must still be in a situation where shieldmaidenhood is exceptional. + wrong_gender_for_fighting_in_faith_trigger = yes +} + +scripted_trigger valid_for_shieldmaiden_level_up = { + # Are they an eligible shieldmaiden? + valid_for_shieldmaiden_veterancy = yes + # Have they met the level up requirements? + has_variable = shieldmaiden_veterancy + this.var:shieldmaiden_veterancy >= shieldmaiden_veterancy_cap + # Already checked for a root shieldmaiden, but we re-check for courtiers. + is_available_at_peace_adult = yes + # Finally, they mustn't have all the shieldmaiden modifiers maxed out already. + NAND = { + has_character_modifier = shieldmaiden_level_martial_3_fp1_modifier + has_character_modifier = shieldmaiden_level_prowess_3_fp1_modifier + has_character_modifier = shieldmaiden_level_intrigue_3_fp1_modifier + } +} + +# Track the number of valid battles as a shieldmaiden a character has been in. +fp1_shieldmaiden.0031 = { + hidden = yes + scope = combat_side + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + OR = { + any_side_commander = { valid_for_shieldmaiden_veterancy = yes } + any_side_knight = { valid_for_shieldmaiden_veterancy = yes } + } + } + + immediate = { + # Sort side commander shieldmaidens. + every_side_commander = { + limit = { valid_for_shieldmaiden_veterancy = yes } + # Boost their veterancy if they already have it. + if = { + limit = { exists = var:shieldmaiden_veterancy } + change_variable = { + name = shieldmaiden_veterancy + add = 1 + } + } + # Or else set it up otherwise. + else = { + set_variable = { + name = shieldmaiden_veterancy + value = 1 + } + } + } + # Sort side knight shieldmaidens. + every_side_knight = { + limit = { valid_for_shieldmaiden_veterancy = yes } + if = { + limit = { exists = var:shieldmaiden_veterancy } + change_variable = { + name = shieldmaiden_veterancy + add = 1 + } + } + else = { + set_variable = { + name = shieldmaiden_veterancy + value = 1 + } + } + } + } +} + +# Your shieldmaiden improves their skills. +fp1_shieldmaiden.0032 = { + type = character_event + title = fp1_shieldmaiden.0032.t + desc = { + first_valid = { + # Am *I* the shieldmaiden in question? + triggered_desc = { + trigger = { scope:shieldmaiden = root } + desc = fp1_shieldmaiden.0032.desc.root + } + # Or is it a courtier? + desc = fp1_shieldmaiden.0032.desc.courtier + } + } + theme = martial + left_portrait = { + character = scope:shieldmaiden + animation = rage + } + override_background = { reference = army_camp } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_shieldmaiden_0032 } + # Must either be or have a shieldmaiden who's at veterancy cap. + OR = { + valid_for_shieldmaiden_level_up = yes + any_courtier = { valid_for_shieldmaiden_level_up = yes } + } + } + + weight_multiplier = { + base = 1 + + # Much more likely if you're a shieldmaiden yourself. + modifier = { + add = 2 + has_trait = shieldmaiden + } + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + add_character_flag = { + flag = had_event_fp1_shieldmaiden_0032 + days = 1825 + } + # Designate a valid shieldmaiden. + ## First, we always level up root, if possible. + if = { + limit = { valid_for_shieldmaiden_level_up = yes } + save_scope_as = shieldmaiden + } + ## Otherwise, we grab all relevant courtiers. + else = { + every_courtier = { + limit = { valid_for_shieldmaiden_level_up = yes } + add_to_list = veteran_shieldmaidens + } + } + ## Select a suitable one from the list to be scope:shieldmaiden, prioritising the most veteran. + if = { + limit = { + NOT = { exists = scope:shieldmaiden } + } + ordered_in_list = { + list = veteran_shieldmaidens + order_by = var:shieldmaiden_veterancy + save_scope_as = shieldmaiden + } + } + # Next, we reduce scope:shieldmaiden's veterancy, as they'll be levelling it up in the event. + scope:shieldmaiden = { + change_variable = { + name = shieldmaiden_veterancy + subtract = shieldmaiden_veterancy_cap + } + } + } + + # Martial: look how they command the shieldwall! + option = { + # Separate loc for first person POV. + name = { + trigger = { scope:shieldmaiden = root } + text = fp1_shieldmaiden.0032.a.root + } + # Aaaaand third person POV. + name = { + trigger = { + scope:shieldmaiden != root + } + text = fp1_shieldmaiden.0032.a.courtier + } + # Can't have the max-level version of this modifier. + trigger = { + NOT = { + scope:shieldmaiden = { has_character_modifier = shieldmaiden_level_martial_3_fp1_modifier } + } + } + + # Process the level-up modifier for this stat block. + scope:shieldmaiden = { + # If we have no level on this path, give us the first rank. + if = { + limit = { + NOR = { + has_character_modifier = shieldmaiden_level_martial_1_fp1_modifier + has_character_modifier = shieldmaiden_level_martial_2_fp1_modifier + has_character_modifier = shieldmaiden_level_martial_3_fp1_modifier + } + } + add_character_modifier = shieldmaiden_level_martial_1_fp1_modifier + } + # If have the first level, quietly remove it and add the second. + else_if = { + limit = { has_character_modifier = shieldmaiden_level_martial_1_fp1_modifier } + hidden_effect = { remove_character_modifier = shieldmaiden_level_martial_1_fp1_modifier } + add_character_modifier = shieldmaiden_level_martial_2_fp1_modifier + } + # If we have the second level, quietly remove it and add the third. + else_if = { + limit = { has_character_modifier = shieldmaiden_level_martial_2_fp1_modifier } + hidden_effect = { remove_character_modifier = shieldmaiden_level_martial_2_fp1_modifier } + add_character_modifier = shieldmaiden_level_martial_3_fp1_modifier + } + + } + + # No stress involved. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_rationality = 0.25 + } + } + } + + # Prowess: see how they swing that sword! + option = { + # Separate loc for first person POV. + name = { + trigger = { scope:shieldmaiden = root } + text = fp1_shieldmaiden.0032.b.root + } + # Aaaaand third person POV. + name = { + trigger = { + scope:shieldmaiden != root + } + text = fp1_shieldmaiden.0032.b.courtier + } + # Can't have the max-level version of this modifier. + trigger = { + NOT = { + scope:shieldmaiden = { has_character_modifier = shieldmaiden_level_prowess_3_fp1_modifier } + } + } + + # Process the level-up modifier for this stat block. + scope:shieldmaiden = { + # If we have no level on this path, give us the first rank. + if = { + limit = { + NOR = { + has_character_modifier = shieldmaiden_level_prowess_1_fp1_modifier + has_character_modifier = shieldmaiden_level_prowess_2_fp1_modifier + has_character_modifier = shieldmaiden_level_prowess_3_fp1_modifier + } + } + add_character_modifier = shieldmaiden_level_prowess_1_fp1_modifier + } + # If have the first level, quietly remove it and add the second. + else_if = { + limit = { has_character_modifier = shieldmaiden_level_prowess_1_fp1_modifier } + hidden_effect = { remove_character_modifier = shieldmaiden_level_prowess_1_fp1_modifier } + add_character_modifier = shieldmaiden_level_prowess_2_fp1_modifier + } + # If we have the second level, quietly remove it and add the third. + else_if = { + limit = { has_character_modifier = shieldmaiden_level_prowess_2_fp1_modifier } + hidden_effect = { remove_character_modifier = shieldmaiden_level_prowess_2_fp1_modifier } + add_character_modifier = shieldmaiden_level_prowess_3_fp1_modifier + } + + } + + # No stress involved. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_honor = 0.25 + } + } + } + + # Intrigue: never a finer backstabber! + option = { + # Separate loc for first person POV. + name = { + trigger = { scope:shieldmaiden = root } + text = fp1_shieldmaiden.0032.c.root + } + # Aaaaand third person POV. + name = { + trigger = { + scope:shieldmaiden != root + } + text = fp1_shieldmaiden.0032.c.courtier + } + # Can't have the max-level version of this modifier. + trigger = { + NOT = { + scope:shieldmaiden = { has_character_modifier = shieldmaiden_level_intrigue_3_fp1_modifier } + } + } + + # Process the level-up modifier for this stat block. + scope:shieldmaiden = { + # If we have no level on this path, give us the first rank. + if = { + limit = { + NOR = { + has_character_modifier = shieldmaiden_level_intrigue_1_fp1_modifier + has_character_modifier = shieldmaiden_level_intrigue_2_fp1_modifier + has_character_modifier = shieldmaiden_level_intrigue_3_fp1_modifier + } + } + add_character_modifier = shieldmaiden_level_intrigue_1_fp1_modifier + } + # If have the first level, quietly remove it and add the second. + else_if = { + limit = { has_character_modifier = shieldmaiden_level_intrigue_1_fp1_modifier } + hidden_effect = { remove_character_modifier = shieldmaiden_level_intrigue_1_fp1_modifier } + add_character_modifier = shieldmaiden_level_intrigue_2_fp1_modifier + } + # If we have the second level, quietly remove it and add the third. + else_if = { + limit = { has_character_modifier = shieldmaiden_level_intrigue_2_fp1_modifier } + hidden_effect = { remove_character_modifier = shieldmaiden_level_intrigue_2_fp1_modifier } + add_character_modifier = shieldmaiden_level_intrigue_3_fp1_modifier + } + } + + # Minor stress revolving around paranoia: what if they backstab *YOU*, after all? + if = { + limit = { + scope:shieldmaiden != root + } + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + scope:shieldmaiden != root + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + scope:shieldmaiden != root + has_trait = paranoid + } + } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_trade_events.txt b/N3OW/events/dlc/fp1/fp1_trade_events.txt new file mode 100644 index 00000000..e0917b00 --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_trade_events.txt @@ -0,0 +1,2494 @@ +namespace = fp1_trade_events + +################################################## +# #Standard Trade Events +# 0001 - 0010 Raid or Trade - a raid potentially becomes a trading mission instead +# 0011 - 0020 A Comfortable Accomodation - a trade ceasefire has expired and can be renewed. +# 0021 - 0040 Visitors from Afar - courtiers swap between two places that trade with each other. +# 0041 - 0060 Belligerents with Benefits - beneficial modifiers are swapped between the capital and a foreign trade location. +# +# #Special Trade Events +# 1101 - 1130 An Alternative Arrangement - offer land to a raid-trade partner +# 1131 - 1170 The Northerner Menace - you buy off an SA's troops, or offer them a position under you. +# 1171 - 1180 A Holy Helping Hand - someone you have a raid-trade agreement with offers the hand of a child and conversion aid. +################################################## + + + + + + + + + + +################################################## +# STANDARD TRADE EVENTS + +################################################## +# Take or Trade? +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# Hidden setup: could this raid become a trade mission instead? +fp1_trade_events.0001 = { + hidden = yes + scope = army + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Make sure that the army hasn't landed straight into combat or w/e. + is_army_in_combat = no + # Various checks related to scope:raider, including most of the stuff for fp1_trade_events.0002's trigger block. + scope:raider = { + #You must be leading your own forces. + this = root.army_commander + # Standard checks. + is_available_adult_or_is_commanding = yes + NOT = { has_character_flag = had_event_fp1_trade_events_0002 } + # Must be either river-capable raiders, or have invested in a suitable dynasty legacy. + OR = { + culture = { has_innovation = innovation_longboats } + dynasty ?= { has_dynasty_perk = fp1_adventure_legacy_2 } + } + # Must be at peace; not strictly, but this is the easiest way to reduce edge cases. + is_at_war = no + # Shouldn't hypothetically need to check whether or not scope:raider can actually raid the target, since that should be handled code-side before the on_action even fires. + } + # Is the target intimidating to this raid army? + army_size < fp1_trade_events_eligible_settlement_value + } + + immediate = { + random = { + chance = 20 + modifier = { + add = 20 + scope:raider = { + culture = { has_cultural_pillar = heritage_north_germanic } + dynasty = { has_dynasty_perk = fp1_adventure_legacy_2 } + } + } + save_scope_as = raid_army + scope:raider = { trigger_event = fp1_trade_events.0002 } + } + } +} + +scripted_effect fp1_trade_events_offer_trade_deal_raider_perspective_effect = { + # Add the truce. + add_truce_both_ways = { + character = scope:raider + days = fp1_trade_events_truce_length_value + name = TRUCE_TRADE_DEAL + } + # Add some mutual opinion gain. + add_opinion = { + target = scope:raider + modifier = pleased_opinion + opinion = 20 + } + # Raid loot for the army. + scope:raid_army = { add_loot = fp1_trade_events_cash_settlement_value } +} + +scripted_effect fp1_trade_events_offer_trade_deal_defender_perspective_effect = { + # Add the truce. + show_as_tooltip = { + add_truce_both_ways = { + character = scope:raider + days = fp1_trade_events_truce_length_value + name = TRUCE_TRADE_DEAL + } + } + # Add some mutual opinion gain. + reverse_add_opinion = { + target = scope:raider + modifier = pleased_opinion + opinion = 20 + } + # Minor beneficial modifier gain for the county. + scope:county = { + add_county_modifier = { + modifier = trade_instead_of_raid_fp1_modifier + days = fp1_trade_events_truce_length_value + } + } +} + +# You have the chance to trade peacefully instead of raiding. +fp1_trade_events.0002 = { + type = character_event + title = fp1_trade_events.0002.t + desc = fp1_trade_events.0002.desc + theme = raid + left_portrait = { + character = scope:raider + animation = personality_honorable + } + right_portrait = { + character = scope:county.holder + animation = disapproval + } + lower_right_portrait = scope:top_liege + override_background = { reference = burning_building } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_trade_events_0002 + days = 365 + } + # Grab top_liege, if they're a separate character. + if = { + limit = { + scope:county.holder != scope:county.holder.top_liege + } + scope:county.holder.top_liege = { save_scope_as = top_liege } + } + } + + # Offer trade: local holder. + option = { + name = fp1_trade_events.0002.a + + # Show offer results. + show_as_tooltip = { + random_list = { + # We only want to show the two possibilities, actual percentages don't matter, since the results are decided in the recipient's event. + 100 = { + show_chance = no + desc = fp1_trade_events.0002.a.accepted + scope:county.holder = { fp1_trade_events_offer_trade_deal_raider_perspective_effect = yes } + } + 100 = { + show_chance = no + desc = fp1_trade_events.0002.a.rejected + custom_tooltip = fp1_trade_events.0002.a.tt + } + } + } + # Send the actual offer. + scope:county.holder = { trigger_event = fp1_trade_events.0003 } + # Charge a little prestige to make it a trade-off. + add_prestige = minor_prestige_loss + + stress_impact = { + calm = medium_stress_impact_loss + compassionate = major_stress_impact_loss + wrathful = medium_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + opinion_modifier = { opinion_target = scope:county.holder.top_liege } + modifier = { # Weight up for stress. + add = 20 + has_trait = calm + } + modifier = { # Weight up for stress. + add = 30 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = wrathful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = sadistic + } + } + } + + # Offer trade: top liege. + option = { + name = fp1_trade_events.0002.b + trigger = { + scope:county.holder != scope:county.holder.top_liege + } + + # Show offer results. + show_as_tooltip = { + random_list = { + # We only want to show the two possibilities, actual percentages don't matter, since the results are decided in the recipient's event. + 100 = { + show_chance = no + desc = fp1_trade_events.0002.a.accepted + scope:county.holder.top_liege = { fp1_trade_events_offer_trade_deal_raider_perspective_effect = yes } + } + 100 = { + show_chance = no + desc = fp1_trade_events.0002.a.rejected + custom_tooltip = fp1_trade_events.0002.a.tt + } + } + } + # Send the actual offer. + scope:county.holder.top_liege = { trigger_event = fp1_trade_events.0003 } + # Charge a little prestige to make it a trade-off. + add_prestige = minor_prestige_loss + + stress_impact = { + calm = medium_stress_impact_loss + compassionate = major_stress_impact_loss + wrathful = medium_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + opinion_modifier = { opinion_target = scope:county.holder.top_liege } + modifier = { # Weight up for stress. + add = 20 + has_trait = calm + } + modifier = { # Weight up for stress. + add = 30 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = wrathful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = sadistic + } + } + } + + # Pillage it anyway. + option = { + name = fp1_trade_events.0002.c + + # Nahhhhh, screw it. + custom_tooltip = fp1_trade_events.0002.c.tt + + stress_impact = { + wrathful = medium_stress_impact_loss + callous = major_stress_impact_loss + sadistic = major_stress_impact_loss + calm = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = wrathful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -20 + has_trait = calm + } + modifier = { # Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + # Pillage & don't poke me about this again. + option = { + name = fp1_trade_events.0002.d + # AI don't need an opt-out. + trigger = { is_ai = no } + + # Furthermore, screw it for a very long time. + custom_tooltip = fp1_trade_events.0002.d.tt + add_character_flag = { flag = had_event_fp1_trade_events_0002 } + + stress_impact = { + wrathful = medium_stress_impact_loss + callous = major_stress_impact_loss + sadistic = major_stress_impact_loss + calm = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = wrathful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -20 + has_trait = calm + } + modifier = { # Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } +} + +scripted_effect fp1_set_prime_trade_partner_effect = { + # Store the variable for general tracking. + set_variable = { + name = fp1_prime_trade_deal + value = scope:recipient + days = fp1_trade_events_truce_length_value + } + # Fire off the renewal event from the date of expiry. + trigger_event = { + id = fp1_trade_events.0011 + days = fp1_trade_events_truce_renewal_date_value + } + # Trigger the on_action. + if = { + limit = { + NOT = { has_character_flag = fp1_trade_events_cycle_start } + } + add_character_flag = fp1_trade_events_cycle_start + trigger_event = { on_action = fp1_trade_events_cycle } + } +} + +# A raider in your lands would prefer commerce to pillage. +fp1_trade_events.0003 = { + type = character_event + title = fp1_trade_events.0003.t + desc = fp1_trade_events.0003.desc + theme = raid + left_portrait = { + character = scope:raider + animation = personality_bold + } + right_portrait = { + character = scope:recipient + animation = disapproval + } + override_background = { reference = burning_building } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + # Grab a scope:recipient for the portraits, since this may have gone to two different characters. + save_scope_as = recipient + } + + # Unexpected, but highly welcome. + option = { + name = fp1_trade_events.0003.a + + # Apply effects & inform scope:raider. + hidden_effect = { + scope:raider = { + send_interface_toast = { + title = fp1_trade_events.0003.a.tt_success + left_icon = scope:recipient + scope:recipient = { fp1_trade_events_offer_trade_deal_raider_perspective_effect = yes } + } + # Quietly work out if this would become their pre-eminent trade deal. + ## Due to no existing prime trade deal. + if = { + limit = { + NOT = { has_variable = fp1_prime_trade_deal } + } + fp1_set_prime_trade_partner_effect = yes + } + ## Due to a dead/landless prime trade deal or cancelled truces. + else_if = { + limit = { + has_variable = fp1_prime_trade_deal + var:fp1_prime_trade_deal = { + OR = { + is_alive = no + is_landed = no + NOR = { + has_truce = scope:raider + scope:raider = { has_truce = var:fp1_prime_trade_deal } + } + } + } + } + fp1_set_prime_trade_partner_effect = yes + } + ## Due to scope:recipient being of a higher tier than their current one. + else_if = { + limit = { + has_variable = fp1_prime_trade_deal + scope:recipient.primary_title.tier > var:fp1_prime_trade_deal.primary_title.tier + } + fp1_set_prime_trade_partner_effect = yes + } + } + } + fp1_trade_events_offer_trade_deal_defender_perspective_effect = yes + + stress_impact = { + compassionate = medium_stress_impact_loss + forgiving = major_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = compassionate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -40 + has_trait = vengeful + } + } + } + + # *Trade*? With these murderers?! + option = { + name = fp1_trade_events.0003.b + + # Gain some prestige for turning down these marauders. + add_prestige = minor_prestige_gain + # Inform scope:raider that negotiations have failed. + hidden_effect = { + scope:raider = { + send_interface_toast = { + title = fp1_trade_events.0003.b.tt_failure + left_icon = scope:recipient + custom_tooltip = fp1_trade_events.0003.b.tt_failure + } + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = major_stress_impact_gain + callous = medium_stress_impact_loss + sadistic = major_stress_impact_loss + vengeful = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = sadistic + } + modifier = { # Weight up for stress. + add = 40 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -30 + has_trait = forgiving + } + } + } +} + +################################################## +# Comfortable Accomodation +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +scripted_trigger fp1_prime_trade_partner_still_valid_trigger = { + exists = $RAIDER$.var:fp1_prime_trade_deal + $RAIDER$.var:fp1_prime_trade_deal = { + this = $RECIPIENT$ + is_alive = yes + is_landed = yes + # Make sure the truce hasn't been cancelled. + has_truce = $RAIDER$ + $RAIDER$ = { has_truce = var:fp1_prime_trade_deal } + # And that the characters haven't wound up in the same realm somehow. + NOT = { top_liege = $RAIDER$.top_liege } + } +} + +scripted_effect fp1_trade_events_trade_renewed_raider_perspective_effect = { + # Add the truce. + add_truce_both_ways = { + character = scope:recipient + days = fp1_trade_events_truce_length_value + name = TRUCE_TRADE_DEAL + } + # Nudge towards friendship. + progress_towards_friend_effect = { + CHARACTER = scope:recipient + OPINION = 30 + REASON = friend_fp1_renewed_trade_deal + } + # Gain some prestige. + add_prestige = major_prestige_gain + # Sort deal veterancy. + set_variable = { + name = fp1_renewed_trade_deal + value = scope:recipient + days = fp1_trade_events_truce_length_value + } +} + +scripted_effect fp1_trade_events_trade_renewed_defender_perspective_effect = { + # Truce added in scope:raider's perspective. + show_as_tooltip = { + add_truce_both_ways = { + character = scope:raider + days = fp1_trade_events_truce_length_value + name = TRUCE_TRADE_DEAL + } + } + # Nudge towards friendship. + show_as_tooltip = { + progress_towards_friend_effect = { + CHARACTER = scope:raider + OPINION = 30 + REASON = friend_fp1_renewed_trade_deal + } + } + # Since prestige is the independence reward, we give a little bit of static cash. + add_gold = 50 +} + +scripted_effect fp1_trade_events_trade_renewal_rejected_effect = { + add_prestige = minor_prestige_loss + custom_tooltip = fp1_trade_events.0011.b.tt +} + +# A trade ceasefire has expired and can be renewed. +fp1_trade_events.0011 = { + type = character_event + title = fp1_trade_events.0011.t + desc = { + first_valid = { + # Not your first renewal. + triggered_desc = { + trigger = { + exists = var:fp1_renewed_trade_deal + var:fp1_renewed_trade_deal = var:fp1_prime_trade_deal + } + desc = fp1_trade_events.0011.desc.subsequent_renewal + } + # First time renewing this particular deal. + desc = fp1_trade_events.0011.desc.first_renewal + } + desc = fp1_trade_events.0011.desc.outro + } + theme = stewardship + left_portrait = { + character = scope:raider + animation = personality_rational + } + right_portrait = { + character = scope:recipient + animation = personality_bold + } + override_background = { reference = market } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_landed = yes + # Scope:raider's prime trade deal must still be valid. + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = scope:recipient + RAIDER = scope:raider + } + } + + # A grand offer! + option = { + name = fp1_trade_events.0011.a + # Make sure players in MP don't cheese anything. + trigger = { + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = scope:recipient + RAIDER = scope:raider + } + } + + # You offer a renewal to scope:recipient. + random_list = { + 100 = { + show_chance = no + desc = fp1_trade_events.0011.a.accepted + show_as_tooltip = { fp1_trade_events_trade_renewed_raider_perspective_effect = yes } + } + 100 = { + show_chance = no + desc = fp1_trade_events.0011.a.rejected + show_as_tooltip = { fp1_trade_events_trade_renewal_rejected_effect = yes } + } + } + scope:recipient = { trigger_event = fp1_trade_events.0012 } + + stress_impact = { + honest = minor_stress_impact_loss + arbitrary = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_sociability = 0.25 + ai_rationality = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -20 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -20 + has_trait = fickle + } + } + } + + # This has run its course... + option = { + name = fp1_trade_events.0011.b + + # A bit of consolation prestige for your hard-work. + add_prestige = minor_prestige_gain + # Confirm that the deal will lapse as expected. + custom_tooltip = fp1_trade_events.0011.b.tt + + stress_impact = { + arbitrary = minor_stress_impact_loss + fickle = minor_stress_impact_loss + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_sociability = -0.25 + ai_rationality = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 10 + has_trait = fickle + } + modifier = { # Weight down for stress. + add = -10 + has_trait = honest + } + } + } +} + +# A trading partner proposes an extension. +fp1_trade_events.0012 = { + type = character_event + title = fp1_trade_events.0012.t + desc = { + first_valid = { + # Not your first renewal. + triggered_desc = { + trigger = { + exists = var:fp1_renewed_trade_deal + var:fp1_renewed_trade_deal = var:fp1_prime_trade_deal + } + desc = fp1_trade_events.0012.desc.subsequent_renewal + } + # First time renewing this particular deal. + desc = fp1_trade_events.0012.desc.first_renewal + } + desc = fp1_trade_events.0012.desc.outro + } + theme = stewardship + left_portrait = { + character = scope:recipient + animation = personality_rational + } + right_portrait = { + character = scope:raider + animation = admiration + } + override_background = { reference = market } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Scope:raider's prime trade deal must still be valid. + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = scope:recipient + RAIDER = scope:raider + } + } + + # A most agreeable proposal. + option = { + name = fp1_trade_events.0012.a + # Make sure players in MP don't cheese anything. + trigger = { + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = scope:recipient + RAIDER = scope:raider + } + } + + # You agree to a renewal with scope:raider. + fp1_trade_events_trade_renewed_defender_perspective_effect = yes + # Inform scope:raider. + scope:raider = { + hidden_effect = { + send_interface_toast = { + title = fp1_trade_events.0012.a.tt_success + left_icon = scope:recipient + fp1_trade_events_trade_renewed_raider_perspective_effect = yes + } + } + } + + stress_impact = { + honest = minor_stress_impact_loss + arbitrary = medium_stress_impact_gain + fickle = medium_stress_impact_gain + } + ai_chance = { + base = 100 + opinion_modifier = { opinion_target = scope:raider} + ai_value_modifier = { + ai_honor = 0.5 + ai_sociability = 0.25 + ai_rationality = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -20 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -20 + has_trait = fickle + } + } + } + + # I'm done with this GetWomanMan. + option = { + name = fp1_trade_events.0012.b + + # A bit of consolation prestige for your independence. + add_prestige = minor_prestige_gain + # Confirm that the deal will lapse as expected. + custom_tooltip = fp1_trade_events.0012.b.tt + # Inform scope:raider, who is disappointed. + scope:raider = { + add_opinion = { + target = scope:recipient + modifier = disappointed_opinion + opinion = -20 + } + hidden_effect = { + send_interface_toast = { + title = fp1_trade_events.0012.b.tt_failure + left_icon = scope:recipient + fp1_trade_events_trade_renewal_rejected_effect = yes + } + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + fickle = minor_stress_impact_loss + honest = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_sociability = -0.25 + ai_rationality = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 10 + has_trait = fickle + } + modifier = { # Weight down for stress. + add = -10 + has_trait = honest + } + } + } +} + +################################################## +# Visitors from Afar +# by Ewan Cowhig Croft +# 0021 - 0040 +################################################## + +scripted_effect fp1_trade_events_0021_acquire_courtier_effect = { + # Acquire selection and boost opinion. + add_courtier = $SELECTION$ + progress_towards_friend_effect = { + CHARACTER = $SELECTION$ + OPINION = 100 + REASON = friend_accepted_courtier + } + # Ditch the rest. + hidden_effect = { + scope:merchant = { + if = { + limit = { + NOT = { this = $SELECTION$ } + } + death = { death_reason = death_vanished } + } + } + scope:priest = { + if = { + limit = { + NOT = { this = $SELECTION$ } + } + death = { death_reason = death_vanished } + } + } + if = { + limit = { + exists = scope:spy + NOT = { scope:spy = $SELECTION$ } + } + scope:spy = { + death = { death_reason = death_vanished } + } + } + } +} + +# Courtiers swap between two places that trade with each other. +fp1_trade_events.0021 = { + type = character_event + title = fp1_trade_events.0021.t + desc = fp1_trade_events.0021.desc + theme = alliance + left_portrait = { + character = scope:merchant + animation = personality_greedy + } + right_portrait = { + character = scope:priest + animation = personality_zealous + } + lower_center_portrait = scope:spy + lower_right_portrait = var:fp1_prime_trade_deal + override_background = { reference = docks } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + ## Allow when commanding to be fairer to people out raiding, which we incentivise you to do personally to get pacts to begin with. + is_available_adult_or_is_commanding = yes + NOT = { has_character_flag = had_event_fp1_trade_events_0021 } + is_landed = yes + # Scope:raider's prime trade deal must still be valid. + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = root.var:fp1_prime_trade_deal + RAIDER = root + } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for certain lifestyle traits, as these spread stories of your success and accomplishments. + modifier = { + add = 0.25 + has_trait = diplomat + } + modifier = { + add = 0.25 + has_trait = avaricious + } + # Weight up for this being a renewed treaty. + modifier = { + add = 1 + exists = root.var:fp1_renewed_trade_deal + exists = root.var:fp1_prime_trade_deal + root.var:fp1_prime_trade_deal = root.var:fp1_renewed_trade_deal + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_trade_events_0021 + days = 1825 + } + # Save some things for loc & future events. + save_scope_as = raider + var:fp1_prime_trade_deal = { save_scope_as = partner } + # Create our players. + ## A merchant. + create_character = { + template = fp1_trade_partner_merchant + location = root.capital_province + save_scope_as = merchant + } + ## A priest. + create_character = { + template = fp1_trade_partner_priest + location = root.capital_province + save_scope_as = priest + } + ## And a spy, if appropriate. + if = { + limit = { + NOT = { has_trait = trusting } + intrigue >= high_skill_rating + } + create_character = { + template = fp1_trade_partner_spy + location = root.capital_province + save_scope_as = spy + } + } + } + + # I could use someone to count my coin... + option = { + name = fp1_trade_events.0021.a + + # Select the merchant. + fp1_trade_events_0021_acquire_courtier_effect = { SELECTION = scope:merchant } + + stress_impact = { + trusting = minor_stress_impact_loss + generous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + } + } + + # Welcome to my service, [priest.GetFirstName]! + option = { + name = fp1_trade_events.0021.b + + # Select the priest. + fp1_trade_events_0021_acquire_courtier_effect = { SELECTION = scope:priest } + + stress_impact = { + trusting = minor_stress_impact_loss + zealous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.25 + ai_zeal = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -20 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + } + } + + # And who is this accompanying you? + option = { + name = fp1_trade_events.0021.c + trigger = { exists = scope:spy } + skill = intrigue + + fp1_trade_events_0021_acquire_courtier_effect = { SELECTION = scope:spy } + + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + } + } + + # Move along, foreigners, my agreement is with [recipient.GetFirstName]. + option = { + name = fp1_trade_events.0021.d + + # Gain some prestige for your haughtiness. + add_prestige = medium_prestige_gain + # But annoy your trading partner. + reverse_add_opinion = { + target = var:fp1_prime_trade_deal + modifier = annoyed_opinion + opinion = -40 + } + # Dispose of the guests. + hidden_effect = { + scope:merchant = { + death = { death_reason = death_vanished } + } + scope:priest = { + death = { death_reason = death_vanished } + } + if = { + limit = { exists = scope:spy } + scope:spy = { + death = { death_reason = death_vanished } + } + } + } + + stress_impact = { + paranoid = medium_stress_impact_loss + shy = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.25 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -30 + has_trait = gregarious + } + } + } + + after = { + # Send a companion event to var:fp1_prime_trade_deal. + #var:fp1_prime_trade_deal = { trigger_event = fp1_trade_events.0031 } + var:fp1_prime_trade_deal = { + trigger_event = { + id = fp1_trade_events.0031 + days = 1 + } + } + } +} + +fp1_trade_events.0031 = { + type = character_event + title = fp1_trade_events.0031.t + desc = fp1_trade_events.0031.desc + theme = alliance + left_portrait = { + character = scope:warrior + animation = personality_bold + } + lower_right_portrait = scope:raider + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + ## Allow when commanding - we want to make trading compacts a bit more equal. + is_available_adult = yes + NOT = { has_character_flag = had_event_fp1_trade_events_0031 } + is_landed = yes + # Scope:raider's prime trade deal must still be valid. + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = scope:raider.var:fp1_prime_trade_deal + RAIDER = scope:raider + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_trade_events_0031 + days = 1825 + } + # Create scope:warrior. + create_character = { + template = fp1_trade_partner_warrior + location = scope:raider.var:fp1_prime_trade_deal.capital_province + save_scope_as = warrior + } + } + + # We can always use another sword! + option = { + name = fp1_trade_events.0031.a + + # Gain the warrior, who's understandably pretty hyped. + add_courtier = scope:warrior + progress_towards_friend_effect = { + CHARACTER = scope:warrior + OPINION = 100 + REASON = friend_accepted_courtier + } + + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + } + } + + # Be gone, bandit. + option = { + name = fp1_trade_events.0031.b + + # Gain some prestige for your haughtiness. + add_prestige = medium_prestige_gain + # But annoy your trading partner, though not as much as snubbing an open delegation on the inverse. + reverse_add_opinion = { + target = scope:raider + modifier = annoyed_opinion + opinion = -20 + } + # Dispose of the guest. + hidden_effect = { + scope:warrior = { + death = { death_reason = death_vanished } + } + } + + stress_impact = { + paranoid = medium_stress_impact_loss + shy = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.25 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -30 + has_trait = gregarious + } + } + } +} + +################################################## +# Belligerents with Benefits +# by Ewan Cowhig Croft +# 0041 - 0060 +################################################## + +scripted_trigger fp1_trade_events_0041_advanced_culture_comparison_trigger = { + scope:raider.culture = { + # Must have separate cultures for one to be more advanced. + this != scope:partner.culture + # And scope:partner's must be in a later era than scope:raider's. + ## Tribal. + trigger_if = { + limit = { + NOT = { has_cultural_era_or_later = culture_era_early_medieval } + } + scope:partner.culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + ## Early Medieval. + trigger_if = { + limit = { + NOT = { has_cultural_era_or_later = culture_era_high_medieval } + } + scope:partner.culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + ## High Medieval. + trigger_if = { + limit = { + NOT = { has_cultural_era_or_later = culture_era_late_medieval } + } + scope:partner.culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + ## And you can't be later than the Late Medieval, so we ignore that'un. + } +} + +scripted_trigger fp1_trade_events_0041_valid_partner_counties_trigger = { + has_county_modifier = recently_looted_modifier + NOT = { has_county_modifier = fp1_trade_events_raid_consultants_modifier } +} + +scripted_effect fp1_trade_events_0041_offer_consultation_deal_raider_perspective_effect = { + # You pay coin and get discounts to construction in your domain. + remove_treasury_or_gold = massive_gold_value + # Give a modifier with development growth to underdeveloped holdings. + every_held_title = { + title_tier = county + limit = { + development_level <= 15 + } + custom = fp1_trade_events.0041.foreign_architects_growth.tt + add_county_modifier = { + modifier = fp1_trade_events_foreign_architects_modifier + years = 20 + } + } + # And one without it to holdings that are adequately developed. + every_held_title = { + title_tier = county + limit = { + development_level >= 16 + } + custom = fp1_trade_events.0041.foreign_architects_no_growth.tt + add_county_modifier = { + modifier = fp1_trade_events_foreign_architects_no_growth_modifier + years = 20 + } + } + # Plus stepped friendship with scope:partner. + progress_towards_friend_effect = { + CHARACTER = scope:partner + OPINION = 30 + REASON = friend_fp1_renewed_trade_deal + } + # Scope:partner gets some help with raiding. + custom_tooltip = fp1_trade_events.0041.partner_gets_raid_aid.tt +} + +scripted_effect fp1_trade_events_0041_offer_consultation_deal_partner_perspective_effect = { + # You pay coin and get raid protection increases in one duchy. + remove_treasury_or_gold = scandinavian_adventurer_fp1_0041_gold_value + # Give modifiers that make that duchy better able to withstand raids. + $TARGET_DUCHY$ = { + save_scope_as = target_duchy + every_in_de_jure_hierarchy = { + limit = { + tier = tier_county + holder = { + OR = { + any_liege_or_above = { this = scope:partner } + this = scope:partner + } + } + } + custom = fp1_trade_events.0041.partner.benefiting_counties.tt + add_county_modifier = { + modifier = fp1_trade_events_raid_consultants_modifier + years = 20 + } + # Grab the holders for happiness purposes. + holder = { + if = { + limit = { + this != scope:partner + } + add_to_list = happy_with_raid_proofing_list + } + } + } + } + # Anyone who holds lands here other than you is duly grateful. + every_in_list = { + list = happy_with_raid_proofing_list + add_opinion = { + target = scope:partner + modifier = grateful_opinion + opinion = 30 + } + } + # Plus, stepped friendship with scope:raider (actual effect handled scope:raider-side). + show_as_tooltip = { + progress_towards_friend_effect = { + CHARACTER = scope:raider + OPINION = 30 + REASON = friend_fp1_renewed_trade_deal + } + } + # Scope:raider gets help with civic works. + custom_tooltip = fp1_trade_events.0041.raider_gets_civic_aid.tt +} + +scripted_effect fp1_trade_events_0041_consultation_rejected_effect = { + # Lose a fair bit of prestige. + add_prestige = medium_prestige_loss +} + +# Beneficial modifiers are swapped between the capital and a foreign trade location. +fp1_trade_events.0041 = { + type = character_event + title = fp1_trade_events.0041.t + desc = fp1_trade_events.0041.desc + theme = alliance + left_portrait = { + character = scope:raider + animation = personality_forgiving + } + right_portrait = { + character = scope:partner + animation = personality_content + } + override_background = { reference = docks } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + ## Allow when commanding to be fairer to people out raiding, which we incentivise you to do personally to get pacts to begin with. + is_available_adult_or_is_commanding = yes + NOT = { has_character_flag = had_event_fp1_trade_events_0041 } + is_landed = yes + # Scope:raider's prime trade deal must still be valid & available. + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = root.var:fp1_prime_trade_deal + RAIDER = root + } + root.var:fp1_prime_trade_deal = { is_available_adult_or_is_commanding = yes } + # And they've gotta be able to take the deal in some fashion. + root.var:fp1_prime_trade_deal = { + any_sub_realm_county = { fp1_trade_events_0041_valid_partner_counties_trigger = yes } + } + # Plus, there must be a trade to be made. + ## Meaning one must be tribal, the other feudal. + government_has_flag = government_is_tribal + root.var:fp1_prime_trade_deal = { + NOT = { government_has_flag = government_is_tribal } + } + ## And that scope:partner can't raid for some other reason. + root.var:fp1_prime_trade_deal = { can_raid_trigger = no } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for certain lifestyle traits, as these spread stories of your success and accomplishments. + modifier = { + add = 0.25 + has_trait = diplomat + } + modifier = { + add = 0.25 + has_trait = avaricious + } + # Weight up for this being a renewed treaty. + modifier = { + add = 1 + exists = root.var:fp1_renewed_trade_deal + exists = root.var:fp1_prime_trade_deal + root.var:fp1_prime_trade_deal = root.var:fp1_renewed_trade_deal + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_trade_events_0041 + days = 3625 + } + # Save some things for loc & future events. + save_scope_as = raider + var:fp1_prime_trade_deal = { save_scope_as = partner } + } + + # Could they build me a palace in the [partner.GetCulture] style? + option = { + name = { + trigger = { fp1_trade_events_0041_advanced_culture_comparison_trigger = yes } + text = fp1_trade_events.0041.a.advanced + } + name = { + trigger = { fp1_trade_events_0041_advanced_culture_comparison_trigger = no } + text = fp1_trade_events.0041.a.fallback + } + trigger = { + can_make_expensive_purchase_trigger = { PRICE = scandinavian_adventurer_fp1_0041_gold_value } + } + + # Show possible results depending on scope:partner's response. + random_list = { + 100 = { + show_chance = no + desc = fp1_trade_events.0041.a.offer_accepted + show_as_tooltip = { fp1_trade_events_0041_offer_consultation_deal_raider_perspective_effect = yes } + } + 100 = { + show_chance = no + desc = fp1_trade_events.0041.a.offer_rejected + show_as_tooltip = { fp1_trade_events_0041_consultation_rejected_effect = yes } + } + } + # And send scope:partner their event. + scope:partner = { trigger_event = fp1_trade_events.0051 } + + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + } + } + + # Let's keep this informal. + option = { + name = fp1_trade_events.0041.b + + # Stress loss; handled in stress_impact block. + + stress_impact = { + base = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.25 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = gregarious + } + } + } +} + +scripted_effect fp1_trade_events_0051_inform_scope_raider_effect = { + hidden_effect = { + scope:raider = { + send_interface_toast = { + title = fp1_trade_events.0051.offer_accepted + left_icon = scope:partner + fp1_trade_events_0041_offer_consultation_deal_raider_perspective_effect = yes + } + } + } +} + +fp1_trade_events.0051 = { + type = character_event + title = fp1_trade_events.0051.t + desc = fp1_trade_events.0051.desc + theme = alliance + left_portrait = { + character = scope:partner + animation = personality_forgiving + } + right_portrait = { + character = scope:raider + animation = personality_content + } + override_background = { reference = docks } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks done scope:raider's side. + # Scope:raider's prime trade deal must still be valid. + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = scope:raider.var:fp1_prime_trade_deal + RAIDER = scope:raider + } + } + + immediate = { + # Build a list of valid duchies. + ## First, we sort through all valid counties and add their duchies to a list. + every_sub_realm_county = { + limit = { fp1_trade_events_0041_valid_partner_counties_trigger = yes } + duchy = { add_to_list = duchies_valid_for_raid_proofing_list } + } + ## Then we order the list to pick the largest duchies. + ordered_in_list = { + list = duchies_valid_for_raid_proofing_list + max = 3 + order_by = { + value = 0 + + # Then we add a point for every de jure county that's also de facto part of the sub-realm. + every_in_de_jure_hierarchy = { + limit = { + tier = tier_county + holder = { + OR = { + this = scope:partner + any_liege_or_above = { this = scope:partner } + } + } + } + add = 1 + + # 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 } + add = 1 + } + } + } + if = { + limit = { + NOT = { exists = scope:option_1 } + } + save_scope_as = option_1 + } + if = { + limit = { + NOT = { + this = scope:option_1 + exists = scope:option_2 + } + } + save_scope_as = option_2 + } + if = { + limit = { + NOT = { + this = scope:option_1 + this = scope:option_2 + exists = scope:option_3 + } + } + save_scope_as = option_3 + } + } + } + + # Scope:option_1 could use some experts... + option = { + name = fp1_trade_events.0051.a + + # Apply effects to scope:option_1. + fp1_trade_events_0041_offer_consultation_deal_partner_perspective_effect = { TARGET_DUCHY = scope:option_1 } + # Inform scope:raider of the decision. + fp1_trade_events_0051_inform_scope_raider_effect = yes + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_rationality = 0.5 + ai_greed = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # Scope:option_2 might be a good place for them? + option = { + name = fp1_trade_events.0051.b + trigger = { exists = scope:option_2 } + + # Apply effects to scope:option_2. + fp1_trade_events_0041_offer_consultation_deal_partner_perspective_effect = { TARGET_DUCHY = scope:option_2 } + # Inform scope:raider of the decision. + fp1_trade_events_0051_inform_scope_raider_effect = yes + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + # AI should always pick the first & mostly-best option. + base = 0 + } + } + + # I think I'd prefer to shore up scope:option_3. + option = { + name = fp1_trade_events.0051.c + trigger = { exists = scope:option_3 } + + # Apply effects to scope:option_3. + fp1_trade_events_0041_offer_consultation_deal_partner_perspective_effect = { TARGET_DUCHY = scope:option_3 } + # Inform scope:raider of the decision. + fp1_trade_events_0051_inform_scope_raider_effect = yes + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + # AI should always pick the first & mostly-best option. + base = 0 + } + } + + # What an outrageous proposal! + option = { + name = fp1_trade_events.0051.d + + # Gain a little consolation prestige. + add_prestige = minor_prestige_gain + # Inform scope:raider of the decision. + hidden_effect = { + scope:raider = { + send_interface_toast = { + title = fp1_trade_events.0051.offer_rejected + left_icon = scope:partner + fp1_trade_events_0041_consultation_rejected_effect = yes + } + } + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.25 + ai_rationality = -0.25 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } +} + + + + + + + + + + +################################################## +# SPECIAL TRADE EVENTS + +################################################## +# The Northerner Menace +# by Ewan Cowhig Croft +# 1131 - 1170 +################################################## + +# You buy off an SA's troops, or offer them a position under you. +fp1_trade_events.1131 = { + type = character_event + title = fp1_trade_events.1131.t + desc = fp1_trade_events.1131.desc + theme = war + left_portrait = { + character = scope:defender + animation = worry + } + right_portrait = { + character = scope:attacker + animation = personality_greedy + } + override_background = { reference = fp1_beached_longships } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Make sure the war is still ongoing + any_character_war = { + using_cb = fp1_scandi_adventurer_conquest + primary_attacker = scope:attacker + primary_defender = scope:defender + } + } + + immediate = { + # Grab the CB for general reference. + random_character_war = { + limit = { + using_cb = fp1_scandi_adventurer_conquest + primary_attacker = scope:attacker + primary_defender = scope:defender + } + save_scope_as = sa_war + } + } + + # Never! Back to your frozen hellscape of a home, scum! + option = { + name = fp1_trade_events.1131.a + + # Gain a bit of prestige for your boasting. + add_prestige = medium_prestige_gain + # Stress gain trade-off handled in stress impact. + # Clarify that this is merely another trade-off option. + custom_tooltip = fp1_trade_events.1131.d.tt + + stress_impact = { + base = medium_stress_gain + arrogant = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + fickle = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_energy = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 10 + has_trait = ambitious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = stubborn + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -20 + has_trait = content + } + modifier = { # Weight down for stress. + add = -20 + has_trait = fickle + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } + + # Well, if it's land they want... + option = { + name = fp1_trade_events.1131.b + trigger = { + # Must be able to vassalise a duke. + highest_held_title_tier >= tier_kingdom + # Target duchy doesn't contain a player that isn't scope:defender. + NOT = { + any_player = { + # First, see if they're a vassal of scope:defender. + any_liege_or_above = { this = scope:defender } + # And if they are, make sure they have no titles held within the appropriate lands. + save_temporary_scope_as = vassal_player + any_in_list = { + list = target_titles + holder = scope:vassal_player + } + } + } + # Scope:defender must control at least some lands outside of the target duchy. + any_held_title = { + NOT = { is_in_list = target_titles } + } + } + + # You allow them to win the war... + scope:sa_war = { end_war = attacker } + add_prestige = major_prestige_loss + # ... but then immediately vassalise them. + create_title_and_vassal_change = { + type = swear_fealty + save_scope_as = change + } + scope:attacker = { + change_liege = { + liege = scope:defender + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + # This also gives a nice long truce so that they can't immediately usurp you. + hidden_effect = { + cancel_truce_both_ways = scope:attacker + } + add_truce_both_ways = { + character = scope:attacker + days = 7300 + name = FP1_SCANDINAVIAN_ADVENTURER_VASSAL_TRUCE_NAME + } + # Plus we whack some opinion in there for good measure. + progress_towards_friend_effect = { + CHARACTER = scope:attacker + OPINION = 50 + REASON = friend_fp1_renewed_trade_deal + } + # Finally, add a breather before the next SA. + fp1_add_realm_size_appropriate_sa_reprieve_effect = yes + + stress_impact = { + generous = minor_stress_impact_loss + humble = minor_stress_impact_loss + content = minor_stress_impact_loss + fickle = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + greedy = major_stress_impact_gain + arrogant = major_stress_impact_gain + ambitious = major_stress_impact_gain + stubborn = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + # Base 0 so that only a particular kind of AI will go for this. + base = 0 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = -0.5 + ai_vengefulness = -0.75 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { # Weight up for stress. + add = 10 + has_trait = content + } + modifier = { # Weight up for stress. + add = 10 + has_trait = fickle + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -30 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = ambitious + } + modifier = { # Weight down for stress. + add = -30 + has_trait = stubborn + } + modifier = { # Weight down for stress. + add = -30 + has_trait = vengeful + } + } + } + + # In my experience, soldiers prefer gold to glory. + option = { + name = fp1_trade_events.1131.c + trigger = { + can_make_expensive_purchase_trigger = { PRICE = monumental_gold_value } + } + + # Pay scope:attacker's troops to sod off... + 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 } + reverse_add_opinion = { + target = scope:attacker + modifier = humiliated_opinion + opinion = -50 + } + # Add a breather before the next SA. + fp1_add_realm_size_appropriate_sa_reprieve_effect = yes + + stress_impact = { + generous = minor_stress_impact_loss + humble = minor_stress_impact_loss + content = minor_stress_impact_loss + fickle = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + greedy = major_stress_impact_gain + arrogant = major_stress_impact_gain + ambitious = major_stress_impact_gain + stubborn = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + # Base allowed to stay high, since the fiscal purchase here is pretty high and the AI usually won't make it anyway. + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = -0.5 + ai_vengefulness = -0.75 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { # Weight up for stress. + add = 10 + has_trait = content + } + modifier = { # Weight up for stress. + add = 10 + has_trait = fickle + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -30 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = ambitious + } + modifier = { # Weight down for stress. + add = -30 + has_trait = stubborn + } + modifier = { # Weight down for stress. + add = -30 + has_trait = vengeful + } + } + } + + # Then we'll banish these Nords to the sea. + option = { + name = fp1_trade_events.1131.d + + # Opt-out. + custom_tooltip = fp1_trade_events.1131.d.tt + + # No stress impact for the opt-out. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + ai_vengefulness = -0.25 + } + } + } +} + +################################################## +# A Holy Helping Hand +# by Ewan Cowhig Croft +# 1171 - 1180 +################################################## + +scripted_trigger fp1_trade_events_1171_child_can_marry_trigger = { + # Rule out some unlikely candidates. + is_available_healthy_ai_adult = yes + is_ruler = no + OR = { + is_courtier_of = root.var:fp1_prime_trade_deal + host ?= root.var:fp1_prime_trade_deal + + } + # Make sure they're compatible. + could_marry_character_trigger = { CHARACTER = root } +} + +scripted_effect fp1_trade_events_1171_marry_partner_child_effect = { + # Marry scope:prospective_spouse. + ## First, we divorce the old one. No need for checks, since we're basically regarding that marriage as invalid under the new faith. + if = { + limit = { is_married = yes } + every_spouse = { + save_temporary_scope_as = current_spouse + scope:raider = { + divorce_effect = { + DIVORCER = scope:raider + DIVORCEE = scope:current_spouse + } + } + } + } + ## Then we perform the new marriage. + if = { + limit = { + has_ep2_dlc_trigger = yes + } + create_grand_wedding_betrothal = { + SPOUSE_1 = root + SPOUSE_2 = scope:prospective_spouse + HOST = root + PROMISEE = scope:partner + } + } + else = { marry = scope:prospective_spouse } + create_alliance = { + target = scope:partner + allied_through_owner = scope:raider + allied_through_target = scope:prospective_spouse + } + # Convert to scope:partner's faith. + set_character_faith_with_conversion = scope:partner.faith + # Do so in a very public and celebrated manner, gaining piety. + add_piety = massive_piety_gain + # Paid a dowry by scope:partner. + scope:partner = { + pay_short_term_gold = { + target = scope:raider + gold = massive_gold_value + } + } +} + +# Someone you have a raid-trade agreement with offers the hand of a child and conversion aid. +fp1_trade_events.1171 = { + type = character_event + title = fp1_trade_events.1171.t + desc = fp1_trade_events.1171.desc + theme = alliance + left_portrait = { + character = scope:raider + animation = personality_rational + } + right_portrait = { + character = scope:partner + animation = admiration + } + lower_center_portrait = scope:prospective_spouse + override_background = { reference = docks } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + ## Allow when commanding to be fairer to people out raiding, which we incentivise you to do personally to get pacts to begin with. + is_available_adult_or_is_commanding = yes + NOT = { has_character_flag = had_event_fp1_trade_events_1171 } + is_landed = yes + # Scope:raider's prime trade deal must still be valid & available. + fp1_prime_trade_partner_still_valid_trigger = { + RECIPIENT = root.var:fp1_prime_trade_deal + RAIDER = root + } + root.var:fp1_prime_trade_deal = { is_available_adult_or_is_commanding = yes } + # Must be of a disorganised faith and separate religion. + faith = { + has_doctrine_parameter = unreformed + NOT = { religion = root.var:fp1_prime_trade_deal.religion } + # For that matter, either root must be unmarried, or scope:partner can't have syncretic folk traditions (and so respect for their marriage.) + OR = { + root = { is_married = no } + NOT = { has_doctrine = tenet_unreformed_syncretism } + } + } + # Plus, general considerations. + root.var:fp1_prime_trade_deal = { + # They must really like scope:raider. + opinion = { + target = root + value >= high_positive_opinion + } + # Have a free child. + any_child = { fp1_trade_events_1171_child_can_marry_trigger = yes } + # Not be cynical, so they may care about souls. + NOT = { has_trait = cynical } + # For the sake of sanity, filter out players. + is_ai = yes + # Since it's AI, and specific enough already, we're happy to let them plunge into debt over this. + } + # Finally, just double check the + NAND = { + has_variable_list = humsacd_hofs + is_target_in_variable_list = { + name = humsacd_hofs + target = root.var:fp1_prime_trade_deal.faith + } + } + } + weight_multiplier = { + base = 1 + + # Weight up a little for certain lifestyle traits, as these spread stories of your success and accomplishments. + modifier = { + add = 0.25 + has_trait = diplomat + } + modifier = { + add = 0.25 + has_trait = avaricious + } + # Weight up for this being a renewed treaty. + modifier = { + add = 1 + exists = root.var:fp1_renewed_trade_deal + exists = root.var:fp1_prime_trade_deal + root.var:fp1_prime_trade_deal = root.var:fp1_renewed_trade_deal + } + } + + immediate = { + # Once per lifetime. + add_character_flag = { flag = had_event_fp1_trade_events_1171 } + # Grab our actors. + save_scope_as = raider + var:fp1_prime_trade_deal = { save_scope_as = partner } + ## Including a suitable spouse. + scope:partner = { + random_child = { + limit = { fp1_trade_events_1171_child_can_marry_trigger = yes } + save_scope_as = prospective_spouse + } + } + } + + # SheHe _does_ make quite a compelling case... + option = { + name = fp1_trade_events.1171.a + + # Gain assorted mixed awesome benefits. + fp1_trade_events_1171_marry_partner_child_effect = yes + # Step friendship. + progress_towards_friend_effect = { + CHARACTER = scope:partner + OPINION = 50 + REASON = friend_fp1_converted_faith_married + } + + stress_impact = { + cynical = minor_stress_impact_loss + trusting = minor_stress_impact_loss + greedy = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + ai_zeal = -0.75 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 10 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + # Let us swear an oath of fraternity! + option = { + name = fp1_trade_events.1171.b + trigger = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:partner } + } + + # Gain assorted mixed awesome benefits. + hidden_effect = { fp1_trade_events_1171_marry_partner_child_effect = yes } + custom_tooltip = fp1_trade_events.1171.b.tt + # Also, become best friends. + set_relation_best_friend = { reason = best_friend_coverted_and_saved_my_soul copy_reason = friend target = scope:partner } + + stress_impact = { + cynical = minor_stress_impact_loss + trusting = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + shy = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.5 + ai_zeal = -0.75 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { # Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight down for stress. + add = -20 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + # No manner of bribes can tempt me away. + option = { + name = { + trigger = { has_trait = cynical } + text = fp1_trade_events.1171.c.cynical + } + name = { + trigger = { + NOT = { has_trait = cynical } + } + text = fp1_trade_events.1171.c.fallback + } + + # Needless to say, scope:partner is offended. + reverse_add_opinion = { + target = scope:partner + modifier = insulted_opinion + opinion = -40 + } + # But hey, what a thing to turn down, amirite? + add_prestige = major_prestige_gain + + # No stress for the opt-out. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_sociability = -0.5 + } + } + } +} + diff --git a/N3OW/events/dlc/fp1/fp1_trial_by_combat_events.txt b/N3OW/events/dlc/fp1/fp1_trial_by_combat_events.txt new file mode 100644 index 00000000..4a1f60d7 --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_trial_by_combat_events.txt @@ -0,0 +1,971 @@ +namespace = fp1_tbc + +################################################## +# #Scope:actor-side Events +# 0001 - 0040 Bout Maintenance & Setup +# 0041 - 0060 Scope:actor Results +# +# #Scope:recipient-side Events +# 0101 - 0110 Champion Selection +# 0111 - 0130 Scope:recipient Results +################################################## + + + + + +################################################## +# SCOPE:ACTOR-SIDE EVENTS + +################################################## +# Bout Maintenance & Setup +# by Ewan Cowhig Croft +# 0001 - 0040 +################################################## + +# Everything is set for the bout to begin! +fp1_tbc.0001 = { + type = character_event + window = duel_event + title = fp1_tbc.0001.t + desc = { + desc = fp1_tbc.0001.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:champion = scope:recipient } + desc = fp1_tbc.0001.desc.recipient_fighting + } + desc = fp1_tbc.0001.desc.recipient_has_champion + } + desc = fp1_tbc.0001.desc.outro + } + theme = prison + left_portrait = { + character = scope:actor + scripted_animation = duel_wield_weapon + } + right_portrait = { + character = scope:champion + scripted_animation = duel_wield_weapon + } + override_background = { reference = terrain_scope } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # If, for any reason, scope:recipient has died or been imprisoned, then the bout is cancelled. + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + # Check that scope:actor is still in a valid state to fight. + trial_by_combat_shown_and_not_invalid_trigger = yes + # And scope:champion likewise. + scope:champion = { + OR = { + this = scope:recipient + eligible_knight_to_champion_trial_by_combat_trigger = yes + } + } + } + + on_trigger_fail = { + # Inform both parties that the duel has invalidated. + scope:actor = { + send_interface_toast = { + title = fp1_tbc.0001.trigger_failure.actor + left_icon = scope:recipient + } + } + scope:recipient = { + send_interface_toast = { + title = fp1_tbc.0001.trigger_failure.recipient + left_icon = scope:actor + } + } + # Reset scope:actor's cooldowns against scope:recipient. + scope:actor = { + remove_interaction_cooldown = challenge_to_trial_by_combat_interaction + remove_interaction_cooldown_against = { + interaction = challenge_to_trial_by_combat_interaction + target = scope:recipient + } + } + } + + immediate = { + play_music_cue = "mx_cue_combat_stinger" + # Nab scope:champion's location for terrain. + scope:champion.location = { + save_scope_as = background_terrain_scope + # And scope:champion's location name for loc. + barony = { save_scope_as = duel_location } + } + } + + # Almost there. + option = { + name = fp1_tbc.0001.a + + # Inform scope:actor that the bout will begin immediately. + custom_tooltip = fp1_tbc.0001.a.tt + # Configure the bout. + ## Tribals strip to the waist. + single_combat_apply_default_shirtlessness_effect = { + ATTACKER = scope:actor + DEFENDER = scope:champion + } + ## Deadly fights. + if = { + limit = { scope:tbc_death = yes } + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:actor + SC_DEFENDER = scope:champion + FATALITY = always + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = fp1_tbc.0011 + INVALIDATION_EVENT = fp1_tbc.0021 + } + } + ## Non-deadly fights. + else = { + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:actor + SC_DEFENDER = scope:champion + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = fp1_tbc.0011 + INVALIDATION_EVENT = fp1_tbc.0021 + } + } + # No stress for single-option events. + ai_chance = { + # AI will always choose single option. + base = 100 + } + } +} + +scripted_effect fp1_tbc_non_lethal_results_effect = { + if = { + limit = { + scope:recipient = { is_alive = yes } + } + # TbC ends in cash settlement. + if = { + limit = { scope:tbc_gold = yes } + fp1_tbc_gold_effect = { + TBC_VICTOR = scope:actor + TBC_LOSER = scope:recipient + } + } + # TbC ends in favour settlement. + if = { + limit = { scope:tbc_weak_hook = yes } + fp1_tbc_hook_effect = { + TBC_VICTOR = scope:actor + TBC_LOSER = scope:recipient + } + } + # TbC ends in mandated humiliation. + if = { + limit = { scope:tbc_humiliation = yes } + fp1_tbc_humiliation_effect = { + TBC_LOSER = scope:recipient + TBC_VICTOR = scope:actor + } + } + } +} + +scripted_effect fp1_tbc_consume_imprisonment_reasons_effect = { + if = { + limit = { + scope:actor = { is_alive = yes } + scope:recipient = { is_alive = yes } + } + scope:actor = { consume_imprisonment_reasons = scope:recipient } + } +} + +# Bout has ended, inform affected parties. +fp1_tbc.0011 = { + hidden = yes + + immediate = { + # If any clothes were stripped, put 'em back on. + single_combat_clean_shirtlessness_effect = { + ATTACKER = scope:actor + DEFENDER = scope:champion + } + # Did scope:actor win? + if = { + limit = { scope:sc_victor = scope:actor } + # Apply effects; we do this separately so that there's not a weird day's delay. + fp1_tbc_non_lethal_results_effect = yes + # And send out the ending events. + scope:actor = { + trigger_event = { + id = fp1_tbc.0041 + days = 1 + } + } + scope:recipient = { + trigger_event = { + id = fp1_tbc.0121 + days = 1 + } + } + } + # Or was it scope:champion? + else_if = { + limit = { scope:sc_victor = scope:champion } + # If scope:actor is still alive, they gain stress. + if = { + limit = { + scope:actor = { is_alive = yes } + } + fp1_tbc_actor_defeated_effect = { + TBC_LOSER = scope:actor + TBC_VICTOR = scope:recipient + } + } + # And send out the ending events. + scope:actor = { + trigger_event = { + id = fp1_tbc.0051 + days = 1 + } + } + scope:recipient = { + trigger_event = { + id = fp1_tbc.0111 + days = 1 + } + } + } + # If both parties are alive, and aren't good losers/don't have good reasons to forgive each other, then we mark them as potential rivals. + if = { + limit = { + scope:actor = { + is_alive = yes + NOR = { + has_trait = humble + has_trait = content + has_trait = just + has_trait = forgiving + } + } + scope:recipient = { + is_alive = yes + NOR = { + has_trait = humble + has_trait = content + has_trait = just + has_trait = forgiving + } + can_set_relation_potential_rival_trigger = { CHARACTER = scope:actor } + } + } + scope:actor = { set_relation_potential_rival = scope:recipient } + } + } +} + +# Bout has invalidated, inform affected parties. +fp1_tbc.0021 = { + hidden = yes + + immediate = { + # Put your shirts back on. + single_combat_clean_shirtlessness_effect = { + ATTACKER = scope:actor + DEFENDER = scope:recipient + } + # Inform both parties that the duel has invalidated. + scope:actor = { + send_interface_toast = { + title = fp1_tbc.0021.trigger_failure.actor + left_icon = scope:recipient + } + } + scope:recipient = { + send_interface_toast = { + title = fp1_tbc.0021.trigger_failure.recipient + left_icon = scope:actor + } + } + # Reset scope:actor's cooldowns against scope:recipient. + scope:actor = { + remove_interaction_cooldown = challenge_to_trial_by_combat_interaction + remove_interaction_cooldown_against = { + interaction = challenge_to_trial_by_combat_interaction + target = scope:recipient + } + } + } +} + +# Scope:recipient has declined. +fp1_tbc.0031 = { + type = letter_event + opening = fp1_tbc.0031.opening + desc = fp1_tbc.0031.desc + sender = scope:recipient + + option = { name = fp1_tbc.0031.a } +} + +################################################## +# Scope:actor Results +# by Ewan Cowhig Croft +# 0041 - 0060 +################################################## + +# Scope:actor has won the bout. +fp1_tbc.0041 = { + type = character_event + title = fp1_tbc.0041.t + desc = { + desc = fp1_tbc.0041.desc.intro + # Scope:champion died in the fighting; no need to loc for a separate scope:champion, as they can't fight to the death. + triggered_desc = { + trigger = { + scope:champion = { is_alive = no } + } + desc = fp1_tbc.0041.desc.opponent_died + } + # Scope:champion is still alive. + triggered_desc = { + trigger = { + scope:champion = { is_alive = yes} + } + desc = { + first_valid = { + # Scope:recipient fought for themselves. + triggered_desc = { + trigger = { scope:champion = scope:recipient } + desc = fp1_tbc.0041.desc.opponent_lives.recipient_fighting + } + # Scope:recipient had a designated champion instead. + desc = fp1_tbc.0041.desc.opponent_lives.recipient_has_champion + } + } + } + # Reward, if anything. + first_valid = { + # Gold. + triggered_desc = { + trigger = { scope:tbc_gold = yes } + desc = fp1_tbc.0041.desc.reward.gold + } + # Weak hook. + triggered_desc = { + trigger = { scope:tbc_weak_hook = yes } + desc = fp1_tbc.0041.desc.reward.weak_hook + } + # Humiliation. + triggered_desc = { + trigger = { scope:tbc_humiliation = yes } + desc = fp1_tbc.0041.desc.reward.humiliation + } + # No outcome for death, since that's handled more succinctly above. + } + desc = fp1_tbc.0041.desc.outro + } + theme = prison + left_portrait = { + character = scope:actor + animation = personality_bold + } + right_portrait = { + character = scope:recipient + animation = shock + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Juuuust need to double-check that they're actually alive. + is_alive = yes + } + + immediate = { + # Show duel results from the player's POV. + show_as_tooltip = { fp1_tbc_non_lethal_results_effect = yes } + # Sadly, we have to apply some effects here instead of in the initial output event in order to not break tooltips. + single_combat_have_slain_kin_effect = { + ATTACKER = scope:actor + DEFENDER = scope:champion + } + fp1_tbc_consume_imprisonment_reasons_effect = yes + } + + # The bout closes. + option = { + name = fp1_tbc.0041.a + + # No stress for single-option events. + ai_chance = { + # AI will always choose single option. + base = 100 + } + } +} + +# Scope:actor has lost the bout. +fp1_tbc.0051 = { + type = character_event + title = fp1_tbc.0051.t + desc = { + desc = fp1_tbc.0051.desc.intro + # Scope:actor is still alive (alternatives not included because, well...). + first_valid = { + # Scope:recipient fought for themselves. + triggered_desc = { + trigger = { scope:champion = scope:recipient } + desc = fp1_tbc.0051.desc.opponent_lives.recipient_fighting + } + # Scope:recipient had a designated champion instead. + desc = fp1_tbc.0051.desc.opponent_lives.recipient_has_champion + } + desc = fp1_tbc.0051.desc.outro + } + theme = prison + left_portrait = { + character = scope:actor + animation = shock + } + right_portrait = { + character = scope:recipient + animation = personality_bold + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Juuuust need to double-check that they're actually alive. + is_alive = yes + } + + immediate = { + # Show duel results from the player's POV. + if = { + limit = { + scope:actor = { is_alive = yes } + } + fp1_tbc_actor_defeated_effect = { + TBC_LOSER = scope:actor + TBC_VICTOR = scope:recipient + } + } + show_as_tooltip = { + fp1_tbc_consume_imprisonment_reasons_effect = yes + single_combat_have_slain_kin_effect = { + ATTACKER = scope:actor + DEFENDER = scope:champion + } + } + } + + # The bout closes. + option = { + name = fp1_tbc.0051.a + + # No stress for single-option events. + ai_chance = { + # AI will always choose single option. + base = 100 + } + } +} + +################################################## +# SCOPE:RECIPIENT-SIDE EVENTS + +################################################## +# Champion Selection +# by Ewan Cowhig Croft +# 0101 - 0110 +################################################## + +scripted_trigger fp1_tbc_knights_with_high_opinion_filter_trigger = { + # Has a ludicrously high opinion of scope:recipient. + opinion = { + target = scope:recipient + value >= 95 + } + # And isn't one of the other knights presented. + NOR = { + AND = { + exists = scope:knight_best + this = scope:knight_best + } + AND = { + exists = scope:knight_exotic + this = scope:knight_exotic + } + AND = { + exists = scope:knight_alternative + this = scope:knight_alternative + } + } +} + +# Scope:recipient has accepted a challenge to a Trial-by-Combat & must designate a champion due to ineligibility. +fp1_tbc.0101 = { + type = character_event + title = fp1_tbc.0101.t + desc = fp1_tbc.0101.desc + theme = prison + left_portrait = { + character = scope:recipient + animation = disbelief + } + right_portrait = { + character = scope:knight_best + animation = personality_honorable + } + lower_left_portrait = scope:knight_alternative + lower_center_portrait = scope:knight_exotic + lower_right_portrait = scope:knight_opinion + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + } + + immediate = { + play_music_cue = "mx_cue_prison" + + # First, grab all available knights that are suitable for the Trial-by-Combat. + every_knight = { + limit = { + eligible_knight_to_champion_trial_by_combat_trigger = yes + NOT = { + has_court_position = champion_court_position #EP1: Pluck out the champion title holder + } + } + add_to_list = fp1_tbc_valid_knights_list + } + # Then, sort through the list, selecting the knight with the highest prowess. + ordered_in_list = { + list = fp1_tbc_valid_knights_list + order_by = prowess + save_scope_as = knight_best + } + # After that, we grab the most interesting knight (looking at assorted prowess-ish pecial traits and factoring for those) who isn't scope:knight_best. + ordered_in_list = { + list = fp1_tbc_valid_knights_list + limit = { + NOT = { + exists = scope:knight_best + this = scope:knight_best + } + has_relevant_special_single_combat_trait_trigger = yes + } + order_by = sce_has_single_combat_special_traits_value + save_scope_as = knight_exotic + } + #EP1: Fetch your champion if they exist + if = { + limit = { + employs_court_position = champion_court_position + any_court_position_holder = { + type = champion_court_position + is_physically_able_adult = yes # eligible_knight_to_champion_trial_by_combat_trigger checks for prowess, and its not mandatory that the champ has high value + } + } + random_court_position_holder = { + type = champion_court_position + save_scope_as = knight_alternative #same scope name is used due to limited portrait logic + } + } + # Then take the second highest-prowess knight who isn't scope:knight_best or scope:knight_exotic. + # EP1: Only do this if the court position of champion isn't already filled + ordered_in_list = { + list = fp1_tbc_valid_knights_list + limit = { + NOR = { + this = scope:knight_best + AND = { + exists = scope:knight_exotic + this = scope:knight_exotic + } + } + NOT = { employs_court_position = champion_court_position } + } + order_by = prowess + save_scope_as = knight_alternative + } + # Next, if we've got any knight who isn't scope:knight_best, scope:knight_exotic, or scope:knight_alternative, and who would literally murder for you, we grab them. + if = { + limit = { + any_in_list = { + list = fp1_tbc_valid_knights_list + fp1_tbc_knights_with_high_opinion_filter_trigger = yes + } + } + # First, add them to a sub-list. + every_in_list = { + list = fp1_tbc_valid_knights_list + limit = { fp1_tbc_knights_with_high_opinion_filter_trigger = yes } + add_to_list = fp1_tbc_high_opinion_knights_list + } + # Next, try to pluck out knightly soulmates. + if = { + limit = { + any_in_list = { + list = fp1_tbc_high_opinion_knights_list + any_relation = { + type = soulmate + this = scope:recipient + } + } + } + random_in_list = { + list = fp1_tbc_high_opinion_knights_list + limit = { + any_relation = { + type = soulmate + this = scope:recipient + } + } + save_scope_as = knight_opinion + } + } + # Otherwise, order by prowess and select the best. + else = { + ordered_in_list = { + list = fp1_tbc_high_opinion_knights_list + order_by = prowess + save_scope_as = knight_opinion + } + } + } + # Finally, if shenanigans have somehow deprived us of a scope:knight_best, then we want to generate someone to fill that minimum slot. + if = { + limit = { + NOT = { exists = scope:knight_best } + } + create_character = { + gender_female_chance = root_soldier_female_chance + location = scope:recipient.capital_province + template = new_warrior_character + faith = scope:recipient.capital_county.faith + culture = scope:recipient.capital_county.culture + save_scope_as = knight_best + } + add_courtier = scope:knight_best + } + } + + # Take the most skilled knight. + option = { + name = fp1_tbc.0101.a + + trigger = { + exists = scope:knight_best + } + + # Select scope:knight_best to represent you in the bout. + scope:knight_best = { save_scope_as = champion } + custom_tooltip = fp1_tbc.0101.a.tt + custom_tooltip = fp1_tbc.0101.bout_moves_forward + highlight_portrait = scope:knight_best + + # RP/functional choice: no stress charge. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.75 + ai_boldness = -0.5 + } + } + } + + # EP1: Take your already designated champion + option = { + name = fp1_ep1_tbc.0101.e + trigger = { + exists = scope:knight_alternative + scope:knight_alternative = { has_court_position = champion_court_position } + } + + # Select scope:knight_best to represent you in the bout. + scope:knight_alternative = { save_scope_as = champion } + custom_tooltip = fp1_ep1_tbc.0101.e.tt + custom_tooltip = fp1_tbc.0101.bout_moves_forward + highlight_portrait = scope:knight_alternative + + # RP/functional choice: no stress charge. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.75 + ai_boldness = -0.5 + } + } + } + + # Take the next most skilled knight. + option = { + name = fp1_tbc.0101.b + trigger = { + exists = scope:knight_alternative + scope:knight_alternative = { NOT = { has_court_position = champion_court_position } } + } + + # Select scope:knight_best to represent you in the bout. + scope:knight_alternative = { save_scope_as = champion } + custom_tooltip = fp1_tbc.0101.b.tt + custom_tooltip = fp1_tbc.0101.bout_moves_forward + highlight_portrait = scope:knight_alternative + + # RP/functional choice: no stress charge. + ai_chance = { + # There's no reason for the AI to ever take this option, we offer it entirely for players who dislike/wish to preserve their best knight. + base = 0 + } + } + + # Take the knight with the most special traits that *isn't* the most skilled knight. + option = { + name = fp1_tbc.0101.c + trigger = { exists = scope:knight_opinion } + + # Select scope:knight_best to represent you in the bout. + scope:knight_exotic = { save_scope_as = champion } + custom_tooltip = fp1_tbc.0101.c.tt + custom_tooltip = fp1_tbc.0101.bout_moves_forward + highlight_portrait = scope:knight_exotic + + # RP/functional choice: no stress charge. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = 0.25 + } + } + } + + # Take the knight who likes me the most. + option = { + name = fp1_tbc.0101.d + trigger = { exists = scope:knight_opinion} + + # Select scope:knight_best to represent you in the bout. + scope:knight_opinion = { save_scope_as = champion } + custom_tooltip = fp1_tbc.0101.d.tt + custom_tooltip = fp1_tbc.0101.bout_moves_forward + highlight_portrait = scope:knight_opinion + + # RP/functional choice: no stress charge. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_rationality = -0.75 + } + } + } + + # Then, we skip over to scope:actor to inform them what's up. + after = { + # Clean up any errant scopes we no longer need to avoid debug bloat. + clear_saved_scope = knight_best + if = { + limit = { exists = scope:knight_exotic } + clear_saved_scope = knight_exotic + } + if = { + limit = { exists = scope:knight_alternative } + clear_saved_scope = knight_alternative + } + if = { + limit = { exists = scope:knight_opinion } + clear_saved_scope = knight_opinion + } + # And transition. + scope:actor = { trigger_event = fp1_tbc.0001 } + } +} + +fp1_tbc.0102 = { + desc = debug_main + theme = prison + + option = { + name = interaction_debug_main + } +} + +################################################## +# Scope:recipient Results +# by Ewan Cowhig Croft +# 0111 - 0130 +################################################## + +# Scope:recipient has won the bout. +fp1_tbc.0111 = { + type = character_event + title = fp1_tbc.0111.t + desc = { + desc = fp1_tbc.0111.desc.intro + # Scope:actor died in the fighting; we don't account for + triggered_desc = { + trigger = { + scope:actor = { is_alive = no } + } + desc = fp1_tbc.0111.desc.opponent_died.recipient_fighting + } + # Scope:actor is still alive. + triggered_desc = { + trigger = { + scope:actor = { is_alive = yes} + } + desc = { + first_valid = { + # Scope:recipient fought for themselves. + triggered_desc = { + trigger = { scope:champion = scope:recipient } + desc = fp1_tbc.0111.desc.opponent_lives.recipient_fighting + } + # Scope:recipient had a designated champion instead. + desc = fp1_tbc.0111.desc.opponent_lives.recipient_has_champion + } + } + } + desc = fp1_tbc.0111.desc.outro + } + theme = prison + left_portrait = { + character = scope:recipient + animation = personality_bold + } + right_portrait = { + character = scope:actor + animation = shock + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Juuuust need to double-check that they're actually alive. + is_alive = yes + } + + immediate = { + # Show duel results from the player's POV. + if = { + limit = { + scope:actor = { is_alive = yes } + } + fp1_tbc_actor_defeated_effect = { + TBC_LOSER = scope:actor + TBC_VICTOR = scope:recipient + } + } + # Sadly, we have to apply some effects here instead of in the initial output event in order to not break tooltips. + single_combat_have_slain_kin_effect = { + ATTACKER = scope:actor + DEFENDER = scope:champion + } + fp1_tbc_consume_imprisonment_reasons_effect = yes + } + + # The bout closes. + option = { + name = fp1_tbc.0111.a + + # No stress for single-option events. + ai_chance = { + # AI will always choose single option. + base = 100 + } + } +} + +# Scope:recipient has lost the bout. +fp1_tbc.0121 = { + type = character_event + title = fp1_tbc.0121.t + desc = { + desc = fp1_tbc.0121.desc.intro + # We don't need to account for scope:champion dying in the fighting; if it was scope:recipient, then they're dead, and a separate champion cannot be challenged to a fight to the death. + # Scope:champion is still alive. + first_valid = { + # Scope:recipient fought for themselves. + triggered_desc = { + trigger = { scope:champion = scope:recipient } + desc = fp1_tbc.0121.desc.champion_lives.recipient_fighting + } + # Scope:recipient had a designated champion instead. + desc = fp1_tbc.0121.desc.champion_lives.recipient_has_champion + } + # Reward, if anything. + first_valid = { + # Gold. + triggered_desc = { + trigger = { scope:tbc_gold = yes } + desc = fp1_tbc.0121.desc.reward.gold + } + # Weak hook. + triggered_desc = { + trigger = { scope:tbc_weak_hook = yes } + desc = fp1_tbc.0121.desc.reward.weak_hook + } + # Humiliation. + triggered_desc = { + trigger = { scope:tbc_humiliation = yes } + desc = fp1_tbc.0121.desc.reward.humiliation + } + # No outcome for death, since that's handled more succinctly above. + } + desc = fp1_tbc.0121.desc.outro + } + theme = prison + left_portrait = { + character = scope:recipient + animation = shock + } + right_portrait = { + character = scope:actor + animation = personality_bold + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Juuuust need to double-check that they're actually alive. + is_alive = yes + } + + immediate = { + # Show duel results from the player's POV. + show_as_tooltip = { fp1_tbc_non_lethal_results_effect = yes } + # Sadly, we have to apply some effects here instead of in the initial output event in order to not break tooltips. + fp1_tbc_consume_imprisonment_reasons_effect = yes + } + + # The bout closes. + option = { + name = fp1_tbc.0121.a + + # No stress for single-option events. + ai_chance = { + # AI will always choose single option. + base = 100 + } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_varangian_adventure_events.txt b/N3OW/events/dlc/fp1/fp1_varangian_adventure_events.txt new file mode 100644 index 00000000..451e2eb8 --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_varangian_adventure_events.txt @@ -0,0 +1,29 @@ +namespace = fp1_varangian_adventures + +################################################## +# #Maintenance Events +# 0001 - 0010 Boost attacker control after the war. +################################################## + + + + + + +################################################## +# #Maintenance Events + +################################################## +# Boost Attacker Control +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# Boost control in newly conquered lands. +fp1_varangian_adventures.0001 = { + hidden = yes + + immediate = { + every_realm_county = { change_county_control = 50 } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_yearly_events.txt b/N3OW/events/dlc/fp1/fp1_yearly_events.txt new file mode 100644 index 00000000..b727bbcd --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_yearly_events.txt @@ -0,0 +1,16884 @@ +namespace = fp1_yearly + +################################################## +# #Standard Yearlies +# 0001 - 0010 An Escaping Thrall Robs You +# 0011 - 0020 Locals Call for Courtier to be Declared Nithing +# 0021 - 0030 Two of your Knights wish to Holmgang over a Dispute +# 0031 - 0040 A Mighty Warrior with a Big Personality Arrives +# 0041 - 0050 [Russia/Steppe] Islamic Explorer Visits Court +# 0051 - 0070 [Rural] A Dead Character is Rumoured to have become a Draugr +# 0071 - 0090 [Rural] A Troll has been sighted & is attacking villages/peasants +# 0091 - 0100 Commissioning a Longship for Yourself +# 0101 - 0110 A Guest/Courtier Challenges you to Riddles +# 0111 - 0120 Nithing Pole Raised Against Courtier +# +# #Flavour Yearlies +# 0501 - 0510 Out for a Sail - you spot a ship in distress. +# 0511 - 0520 The Stench of Success - a courtier won't let an old trophy go. +# 0521 - 0530 Blood on the Snow - your child wishes to snowball fight. +# 0531 - 0540 [Dynasty] on Ice - your child wants to learn how to ice skate. +# 0541 - 0550 The Beast of [Capital] - your child is playing pranks on courtiers. +# 0551 - 0560 Fishy Business - a courtier won't stop eating rotten fish. +# 0561 - 0570 My Arm Against Yours - a knight challenges you to arm-wrestling. +# 0571 - 0580 Petty Vandalism - your child has vandalised a runestone. +# 0581 - 0590 When I Grow Up - your child wishes to be a shieldperson. +# 0591 - 0600 Raised Voices at the Thing - two of your counties are fighting at a regional thing. +# 0601 - 0610 The Hardest Part of Ruling - you're incredibly bored in a protracted thing session. +# 0611 - 0620 Leading by Example - one of your children hurts another whilst imitating you. +# 0621 - 0630 A Shiny New Toy - your child wants a specific piece of loot from a raid. +# 0631 - 0640 A Cynical Bent - you notice a knight not sacrificing after a raid. +# 0641 - 0650 Worthy of the Ocean - your longships are in disrepair. +# 0651 - 0660 Leviathan - you spot a whale whilst sailing. +# 0661 - 0670 A Novel Challenge - a knight challenges you to skiing. +# 0671 - 0680 A Slippery Slope - your child wants to go sledding. +# 0681 - 0690 Why Can't I Come? - your child wants to come raiding. +# 0691 - 0700 Attempted Atonement - a knight has converted after raiding a reformed faith. +# +# #Special Yearlies +# 1001 - 1030 A Mysterious Stranger Stays at Court +# 1031 - 1060 RIP +# 1061 - 1071 Commissioning a Longship for a Funeral +# 1071 - 1080 Sparklingly Clean +# 1081 - 1090 Explorer from Phantom Islands +################################################## + + + + + + + + + + +################################################## +# STANDARD YEARLIES + +################################################## +# An Escaping Thrall Robs You +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_trigger suitably_terrible_knight_trigger = { + is_available_ai = yes + is_ruler = no + # Just make sure they have at least one knight with believably-bad prowess. Deliberately "<", rather than "<=". + prowess < high_skill_rating + # And uhh, for obvious reasons... + NOT = { has_trait = blind } +} + +# A thrall leaves your court in the night. +fp1_yearly.0001 = { + type = character_event + title = fp1_yearly.0001.t + desc = fp1_yearly.0001.desc + theme = stewardship + left_portrait = { + character = scope:scapegoat + animation = shame + } + override_background = { reference = throne_room } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0001 } + is_landed = yes + #Must be able to raid, or else your thrall economy is being phased out. + can_raid_trigger = yes + #Should be North Germanic, or the flavour won't make sense. + culture = { has_cultural_pillar = heritage_north_germanic } + #Needs a knight for scapegoating. + any_knight = { + count >= 1 + suitably_terrible_knight_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + #Weight up a little for rulers that thralls are desperate to escape from. + modifier = { + add = 0.5 + has_trait = sadistic + } + modifier = { + add = 0.25 + has_trait = callous + } + + #And weight down for anyone who's a bit nicer. Not to suggest that the thralls are treated particularly well, but they're not being casually murdered for fun like a sadist might. + modifier = { + add = -0.5 + has_trait = compassionate + } + modifier = { + add = -0.25 + has_trait = forgiving + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0001 + days = 1825 + } + # Pick a fall guy. + random_knight = { + limit = { suitably_terrible_knight_trigger = yes } + weight = { + # Every point of prowess a knight has lowers the chance for it to be them by 2%. + base = 0 + modifier = { + add = { + value = 50 + subtract = prowess + } + } + # And every point of compassion another 1%. + modifier = { add = ai_compassion } + } + save_scope_as = scapegoat + } + # Give the escaped thrall a gender for loc. + random_dummy_gender_effect = yes + # Remove the stolen jewels. + remove_short_term_gold = medium_gold_value + } + + # Send out descriptions of the thrall and the stolen goods. + option = { + name = fp1_yearly.0001.a + + duel = { + skill = stewardship + value = decent_skill_rating + # The thrall is spotted and captured several villages away. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0001.a.tt_success + send_interface_toast = { + title = fp1_yearly.0001.a.tt_success + left_icon = root + add_prestige = medium_prestige_gain + add_gold = medium_gold_value + } + } + # The thrall slips the net, with your stolen goods. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0001.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0001.a.tt_failure + left_icon = root + custom_tooltip = fp1_yearly.0001.gold_stays_lost.tt + } + } + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + #Start a manhunt. + option = { + name = fp1_yearly.0001.b + + duel = { + skill = martial + value = decent_skill_rating + #The thrall is caught before they can get far. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0001.b.tt_success + send_interface_toast = { + title = fp1_yearly.0001.b.tt_success + left_icon = root + add_prestige = medium_prestige_gain + add_gold = medium_gold_value + } + } + #The thrall slips the net, with your stolen goods. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0001.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0001.b.tt_failure + left_icon = root + custom_tooltip = fp1_yearly.0001.gold_stays_lost.tt + } + } + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + #Fine scope:scapegoat. + option = { + name = fp1_yearly.0001.c + + #And no money was lost after all. + add_prestige = medium_prestige_gain + + #Unless you're scope:scapegoat. + scope:scapegoat = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + #Who is, understandably, a bit miffed. + progress_towards_rival_effect = { + REASON = rival_thrall_scapegoat + CHARACTER = root + OPINION = 0 + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + greedy = medium_stress_impact_loss + vengeful = major_stress_impact_loss + calm = minor_stress_impact_gain + generous = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = wrathful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { #Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -10 + has_trait = calm + } + modifier = { #Weight down for stress. + add = -20 + has_trait = generous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = forgiving + } + } + } + + #Not your fault, scope:scapegoat. These things happen. + option = { + name = fp1_yearly.0001.d + + #Some assets are gone for good. + custom_tooltip = fp1_yearly.0001.gold_stays_lost.tt + + #Welp, you _did_ show clemency. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:scapegoat + } + } + add_hook = { + type = favor_hook + target = scope:scapegoat + } + } + scope:scapegoat = { + add_opinion = { + target = root + modifier = relieved_opinion + opinion = 20 + } + } + + stress_impact = { + calm = minor_stress_impact_loss + generous = medium_stress_impact_loss + forgiving = major_stress_impact_loss + wrathful = minor_stress_impact_gain + greedy = medium_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = calm + } + modifier = { #Weight up for stress. + add = 20 + has_trait = generous + } + modifier = { #Weight up for stress. + add = 30 + has_trait = forgiving + } + modifier = { #Weight down for stress. + add = -10 + has_trait = wrathful + } + modifier = { #Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -30 + has_trait = vengeful + } + } + } +} + +################################################## +# Locals Call for Courtier to be Declared Nithing +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +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. + 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 + #Legitimately being a witch, and a Germanic Pagan one at that, is a good reason, though all parties have to agree on that being a bad thing first. + AND = { + faith = { has_doctrine_parameter = witchcraft_illegal } + root.faith = { has_doctrine_parameter = witchcraft_illegal } + root.capital_county.faith = { has_doctrine_parameter = witchcraft_illegal } + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + #Irritating personality traits can be cause for suspicion. + has_trait = wrathful + has_trait = deceitful + has_trait = craven + has_trait = ambitious + has_trait = arbitrary + has_trait = paranoid + has_trait = sadistic + has_trait = stubborn + has_trait = vengeful + #And really anyone dealing with herbs, potions, poisons, or alchemy. + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + } + #If they're heir to a player, then they should only be the heir of the player making the decision. + OR = { + #Plus we need to filter out anyone who isn't an heir at all. + any_heir_title = { count = 0 } + any_heir_title = { + is_title_created = yes + holder = { + is_ai = no + this != root + } + } + } +} + +scripted_effect agree_to_courtier_becoming_nithing_effect = { + # First, we remove any legal relations. + ## Specifically marriage. + if = { + limit = { + any_spouse = { this = root } + root.faith = { + # _Technically_ they're 'dead' and this isn't a divorce, but if divorce was as easy as declaring your spouse legally dead, Henry VIII would've remained a good Catholic boi till the end of his days. + NOT = { has_doctrine = doctrine_divorce_disallowed } + } + } + divorce_effect = { + DIVORCER = root + DIVORCEE = scope:offensive_courtier + } + } + ## And concubinage. + if = { + limit = { + scope:offensive_courtier = { is_concubine_of = root } + } + root = { remove_concubine = scope:offensive_courtier } + } + # Then we evict them. + banish = yes # banish_effect not used for unlanded + # Which naturally causes some friction. + add_opinion = { + target = root + modifier = hate_opinion + opinion = -75 + } + ## Including some ramifications later, potentially. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:offensive_courtier } + } + set_relation_potential_rival = scope:offensive_courtier + } + } + # And, finally, let the whole world know. + add_character_modifier = { + modifier = nithing_fp1_modifier + years = 20 + } +} + +# Locals call for one of your courtiers to be exiled as a nithing. +fp1_yearly.0011 = { + type = character_event + title = fp1_yearly.0011.t + desc = { + desc = fp1_yearly.0011.desc + # And if they have a hard-to-live with virtue... + triggered_desc = { + trigger = { exists = scope:priest } + desc = fp1_yearly.0011.desc.priest + } + } + theme = realm + left_portrait = { + character = scope:offensive_courtier + animation = shock + } + right_portrait = { + character = scope:priest + animation = dismissal + } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0011 } + is_landed = yes + #Must have at least one suitable courtier. + any_courtier = { offensive_courtier_candidate_trigger = yes } + #Both yourself and your capital must be Germanic Pagans. + religion = religion:germanic_religion + capital_county.religion = religion:germanic_religion + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0011 + days = 3650 + } + # Save the capital for loc. + capital_barony = { save_scope_as = capital_barony } + # Pick a suitable courtier to be the nithing. + random_courtier = { + limit = { offensive_courtier_candidate_trigger = yes } + # Make sure we grab someone interesting. + weight = { + base = 1 + + # Claimants are good picks. + modifier = { + add = 10 + is_claimant = yes + } + # Highly-skilled characters are good picks. + modifier = { + add = 5 + diplomacy >= decent_skill_rating + } + modifier = { + add = 5 + martial >= decent_skill_rating + } + modifier = { + add = 5 + stewardship >= decent_skill_rating + } + modifier = { + add = 5 + intrigue >= decent_skill_rating + } + modifier = { + add = 5 + learning >= decent_skill_rating + } + modifier = { + add = 5 + prowess >= decent_skill_rating + } + # Characters with some relation to root are adequate picks. + modifier = { + add = 10 + has_important_relationship_trigger = { CHARACTER = root } + } + } + # Nab them for use elsewhere. + save_scope_as = offensive_courtier + } + # Does scope:offensive_courtier have any virtuous traits that are offensive to the commonfolk? If so, designate a priest to defend them. + if = { + limit = { + scope:offensive_courtier = { + OR = { + # wrathful + AND = { + has_trait = wrathful + faith = { trait_is_virtue = wrathful } + } + # deceitful + AND = { + has_trait = deceitful + faith = { trait_is_virtue = deceitful } + } + # craven + AND = { + has_trait = craven + faith = { trait_is_virtue = craven } + } + # ambitious + AND = { + has_trait = ambitious + faith = { trait_is_virtue = ambitious } + } + # arbitrary + AND = { + has_trait = arbitrary + faith = { trait_is_virtue = arbitrary } + } + # paranoid + AND = { + has_trait = paranoid + faith = { trait_is_virtue = paranoid } + } + # sadistic + AND = { + has_trait = sadistic + faith = { trait_is_virtue = sadistic } + } + # stubborn + AND = { + has_trait = stubborn + faith = { trait_is_virtue = stubborn } + } + # vengeful + AND = { + has_trait = vengeful + faith = { trait_is_virtue = vengeful } + } + } + } + any_learning_councillor = { exists = this } + } + random_learning_councillor = { save_scope_as = priest } + } + } + + # Family: disinherit & banish. + option = { + name = fp1_yearly.0011.a + trigger = { house = scope:offensive_courtier.house } + + # The nithing is exiled utterly. + scope:offensive_courtier = { + disinherit_effect = { DISINHERITOR = root } + agree_to_courtier_becoming_nithing_effect = yes + } + + # Your capital is pretty happy about the nithing being given the boot. + capital_county = { + add_county_modifier = { + modifier = nithing_exiled_fp1_modifier + years = 10 + } + } + + stress_impact = { + vengeful = major_stress_impact_loss + forgiving = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -40 + has_trait = forgiving + } + } + } + + # Non-family: banish them. + option = { + name = fp1_yearly.0011.b + trigger = { + house != scope:offensive_courtier.house + } + + # The nithing is exiled utterly. + scope:offensive_courtier = { agree_to_courtier_becoming_nithing_effect = yes } + + # Your capital is pretty happy about the nithing being given the boot. + capital_county = { + add_county_modifier = { + modifier = nithing_exiled_fp1_modifier + years = 10 + } + } + + stress_impact = { + vengeful = major_stress_impact_loss + forgiving = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -40 + has_trait = forgiving + } + } + } + + # Harbour them against the angry mob. + option = { + name = fp1_yearly.0011.c + + # Get a favour, or at least some opinion. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:offensive_courtier + } + } + add_hook = { + type = favor_hook + target = scope:offensive_courtier + } + } + else = { + reverse_add_opinion = { + modifier = fp1_saved_me_from_the_mob_opinion + target = scope:offensive_courtier + } + } + + # Your capital county isn't super happy about this, though. + capital_county = { + add_county_modifier = { + modifier = nithing_harboured_fp1_modifier + years = 10 + } + } + + stress_impact = { + forgiving = major_stress_impact_loss + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight down for stress. + add = 30 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } + + # Refuse to rule. + option = { + name = fp1_yearly.0011.d + + # Not your circus, not your trained dancing bears. + add_stress = massive_stress_loss + + # Both capital_county & scope:offensive_courtier are unhappy with your inaction. + reverse_add_opinion = { + modifier = fp1_abandoned_me_to_the_mob_opinion + target = scope:offensive_courtier + } + capital_county = { + add_county_modifier = { + modifier = nithing_in_limbo_fp1_modifier + years = 10 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_energy = -0.5 + } + } + } +} + +################################################## +# Two of your Knights wish to Holmgang over a Dispute +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +scripted_trigger suitable_knight_for_dispute_trigger = { + is_available_ai_adult = yes + #Nab them for checking various things later in the event. + save_temporary_scope_as = current_knight + #Filter out rulers, as the loc mismatches such tonally. + is_ruler = no + #They have to be at least not non-argumentative. + NOR = { + has_trait = forgiving + has_trait = craven + } + #For the sake of ease, they shouldn't have a positive special relationship with any other knight. + NOT = { + root = { + any_knight = { + has_friendly_relationship_trigger = { CHARACTER = scope:current_knight } + } + } + } + #Is the character hookable for the event results? + root = { + can_add_hook = { + type = favor_hook + target = scope:current_knight + } + } +} + +scripted_trigger deviant_knight_trigger = { + OR = { + has_trait = deviant + any_secret = { type = secret_deviant } + } +} + +scripted_effect holmgang_results_effect = { + if = { + limit = { government_has_flag = government_is_tribal } + $LOSER$ = { + death = { + killer = $WINNER$ + death_reason = death_duel + } + } + } + else = { + $LOSER$ = { + increase_wounds_effect = { REASON = duel } + } + } +} + +# Two knights fight to the death over nothing. +fp1_yearly.0021 = { + type = character_event + title = fp1_yearly.0021.t + desc = { + desc = fp1_yearly.0021.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:dispute_nature = flag:doggo } + desc = fp1_yearly.0021.desc.doggo + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:spit_of_land } + desc = fp1_yearly.0021.desc.spit_of_land + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:unrepeatable_insult } + desc = fp1_yearly.0021.desc.unrepeatable_insult + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:escalating_prank_war } + desc = fp1_yearly.0021.desc.escalating_prank_war + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:religious_differences } + desc = fp1_yearly.0021.desc.religious_differences + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:stolen_pig } + desc = fp1_yearly.0021.desc.stolen_pig + } + # Female Variant. + triggered_desc = { + trigger = { + scope:dispute_nature = flag:defiled_longboat + scope:defiling_knight = { is_female = yes } + } + desc = fp1_yearly.0021.desc.defiled_longboat.woman + } + # Male Variant. + triggered_desc = { + trigger = { + scope:dispute_nature = flag:defiled_longboat + scope:defiling_knight = { is_male = yes } + } + desc = fp1_yearly.0021.desc.defiled_longboat + } + triggered_desc = { + trigger = { scope:dispute_nature = flag:board_game } + desc = fp1_yearly.0021.desc.board_game + } + } + desc = fp1_yearly.0021.desc.outro + } + theme = unfriendly + left_portrait = { + character = scope:first_knight + animation = anger + } + right_portrait = { + character = scope:second_knight + animation = disgust + } + override_background = { reference = wilderness } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0021 } + is_landed = yes + #Must be North Germanic. + culture = { has_cultural_pillar = heritage_north_germanic } + #Holmgangs must still be in fashion. + NOT = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + #Must have at least two knights available who can get into a dispute. + any_knight = { + count >= 2 + suitable_knight_for_dispute_trigger = yes + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0021 + days = 1825 + } + #Sort Actors. + ##Grab capital barony for loc. + capital_barony = { save_scope_as = capital_barony } + ##Grab the first knight. + random_knight = { + limit = { suitable_knight_for_dispute_trigger = yes } + save_scope_as = first_knight + } + ##Grab the second knight. + random_knight = { + limit = { + suitable_knight_for_dispute_trigger = yes + this != scope:first_knight + } + save_scope_as = second_knight + } + ##Just make them hate each other a little. + scope:first_knight = { + add_opinion = { + target = scope:second_knight + modifier = respect_opinion + opinion = -40 + } + reverse_add_opinion = { + target = scope:second_knight + modifier = respect_opinion + opinion = -40 + } + progress_towards_rival_effect = { + REASON = rival_knights_slapfight + CHARACTER = scope:second_knight + OPINION = 0 + } + } + #Pick which dispute type they'll have. + ##Eight options of 12.5% chance each. + random_list = { + #Dispute over a pet killed in an accident. + 125 = { + #No trigger, fallback. + save_scope_value_as = { + name = dispute_nature + value = flag:doggo + } + select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + # And, if scope:second_knight actually has a doggo, kill it. + scope:second_knight = { + if = { + limit = { + any_owned_story = { + type = story_cycle_pet_dog + exists = story_owner.var:story_cycle_dog_name + } + } + random_owned_story = { + type = story_cycle_pet_dog + limit = { + exists = story_owner.var:story_cycle_dog_name + } + story_owner = { + add_character_flag = { + flag = dog_is_dying + } + trigger_event = pet_animal.1199 + } + } + } + } + } + #Dispute over a spit of land that grows the best cabbages. + 125 = { + #Both knights must care at least a little about money, and at least one a little too much. + trigger = { + NOR = { + scope:first_knight = { + OR = { + has_trait = generous + has_trait = profligate + has_trait = improvident + } + } + scope:second_knight = { + OR = { + has_trait = generous + has_trait = profligate + has_trait = improvident + } + } + } + OR = { + scope:first_knight = { has_trait = greedy } + scope:second_knight = { has_trait = greedy } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:spit_of_land + } + } + #Dispute over an unrepeatable insult involving a goat & a good drinking horn. + 125 = { + #Both knights must be the type to let the insult escalate, and at least one to take it too far. + trigger = { + NOR = { + scope:first_knight = { has_trait = calm } + scope:second_knight = { has_trait = calm } + } + OR = { + scope:first_knight = { has_trait = wrathful } + scope:first_knight = { has_trait = wrathful} + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:unrepeatable_insult + } + } + #Dispute resulting from an escalating prank war. + 125 = { + #Both knights must be people who might get involved in such a thing, and one should be the type to take it too far. + trigger = { + NOR = { + scope:first_knight = { + OR = { + has_trait = shy + has_trait = reclusive + } + } + scope:second_knight = { + OR = { + has_trait = shy + has_trait = reclusive + } + } + } + OR = { + scope:first_knight = { has_trait = vengeful } + scope:second_knight = { has_trait = vengeful } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:escalating_prank_war + } + } + #Dispute over religious differences. + 125 = { + #Both knights must find each other's faiths disagreeable. + trigger = { + scope:first_knight.faith = { + faith_hostility_level = { + target = scope:second_knight.faith + value >= faith_hostile_level + } + } + scope:second_knight.faith = { + faith_hostility_level = { + target = scope:first_knight.faith + value >= faith_hostile_level + } + } + #Quietly exclude sceptics also. + NOR = { + scope:first_knight = { has_trait = cynical } + scope:second_knight = { has_trait = cynical } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:religious_differences + } + } + #Dispute over a stolen pig. + 125 = { + trigger = { + #Exempt faiths that don't eat pork: technically the pig could be as a pet or for non-edible purposes, but it scans best if we just don't bring this up. + NOR = { + scope:first_knight = { + OR = { + religion = religion:judaism_religion + religion = religion:islam_religion + } + } + scope:second_knight = { + OR = { + religion = religion:judaism_religion + religion = religion:islam_religion + } + } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:stolen_pig + } + } + #Dispute resulting from someone making a sea-going vessel a bit saltier. + 125 = { + #Requires at least one knight to be a deviant. + trigger = { + OR = { + scope:first_knight = { deviant_knight_trigger = yes } + scope:second_knight = { deviant_knight_trigger = yes } + } + } + save_scope_value_as = { + name = dispute_nature + value = flag:defiled_longboat + } + #Specify who defiled who's longboat. + if = { + limit = { + scope:first_knight = { deviant_knight_trigger = yes } + } + scope:first_knight = { save_scope_as = defiling_knight } + scope:second_knight = { save_scope_as = unfortunate_knight } + } + else = { + scope:second_knight = { save_scope_as = defiling_knight } + scope:first_knight = { save_scope_as = unfortunate_knight } + } + } + #Dispute resulting from the mysterious Viking board game. + 125 = { + #No trigger, fallback. + save_scope_value_as = { + name = dispute_nature + value = flag:board_game + } + } + } + } + + #Strictly forbid them. + option = { + name = fp1_yearly.0021.b + + #Then, we see if your rule is feared or jeered. + duel = { + skill = intrigue + value = 12 + #You successfully terrify them into not fighting. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0021.b.tt_success + send_interface_toast = { + title = fp1_yearly.0021.b.tt_success + left_icon = scope:first_knight + add_dread = medium_dread_gain + add_prestige = minor_prestige_gain + } + } + #They begrudgingly agree not to fight, but shit-talk you for it. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0021.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0021.b.tt_failure + left_icon = scope:first_knight + add_dread = medium_dread_loss + add_prestige = minor_prestige_loss + } + } + } + + #Regardless of outcome, they dislike you for this. + reverse_add_opinion = { + target = scope:first_knight + modifier = respect_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:second_knight + modifier = respect_opinion + opinion = -30 + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_vengefulness = -0.25 + ai_rationality = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -10 + has_trait = just + } + } + } + + #Bet on scope:first_knight. + option = { + name = fp1_yearly.0021.c + + #Sort the duel. + scope:first_knight = { + duel = { + skill = prowess + target = scope:second_knight + #scope:first_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0021.c.tt_success + root = { + send_interface_toast = { + title = fp1_yearly.0021.c.tt_success + left_icon = scope:first_knight + add_gold = minor_gold_value + holmgang_results_effect = { + WINNER = scope:first_knight + LOSER = scope:second_knight + } + } + } + } + #scope:second_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0021.c.tt_failure + root = { + send_interface_toast = { + title = fp1_yearly.0021.c.tt_failure + left_icon = scope:second_knight + remove_short_term_gold = minor_gold_value + holmgang_results_effect = { + WINNER = scope:second_knight + LOSER = scope:first_knight + } + } + } + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = greedy + } + } + } + + #Bet on scope:second_knight. + option = { + name = fp1_yearly.0021.d + + #Sort the duel. + scope:first_knight = { + duel = { + skill = prowess + target = scope:second_knight + #scope:first_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0021.d.tt_failure + root = { + send_interface_toast = { + title = fp1_yearly.0021.d.tt_failure + left_icon = scope:first_knight + remove_short_term_gold = minor_gold_value + holmgang_results_effect = { + WINNER = scope:first_knight + LOSER = scope:second_knight + } + } + } + } + #scope:second_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0021.d.tt_success + root = { + send_interface_toast = { + title = fp1_yearly.0021.d.tt_success + left_icon = scope:second_knight + add_gold = minor_gold_value + holmgang_results_effect = { + WINNER = scope:second_knight + LOSER = scope:first_knight + } + } + } + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = greedy + } + } + } + + #Grant them permission. + option = { + name = fp1_yearly.0021.a + + #Sort the duel. + scope:first_knight = { + duel = { + skill = prowess + target = scope:second_knight + #scope:first_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0021.a.tt_success + root = { + send_interface_toast = { + title = fp1_yearly.0021.a.tt_success + left_icon = scope:first_knight + add_hook = { + type = favor_hook + target = scope:first_knight + } + holmgang_results_effect = { + WINNER = scope:first_knight + LOSER = scope:second_knight + } + } + } + } + #scope:second_knight wins! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0021.a.tt_failure + root = { + send_interface_toast = { + title = fp1_yearly.0021.a.tt_failure + left_icon = scope:second_knight + add_hook = { + type = favor_hook + target = scope:second_knight + } + holmgang_results_effect = { + WINNER = scope:second_knight + LOSER = scope:first_knight + } + } + } + } + } + } + + stress_impact = { + just = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = just + } + } + } +} + +################################################## +# A Mighty Warrior with a Big Personality Arrives +# by Ewan Cowhig Croft +# 0031 - 0040 +################################################## + +scripted_trigger fp1_0031_any_valid_king_trigger = { + #Make sure it's a kingdom that's known about. + in_diplomatic_range = root + #And that the warrior isn't lying about someone the friend cares for. + NOR = { + any_close_or_extended_family_member = { this = root } + any_spouse = { this = root } + } + #We're quite happy to suggest that the warrior is lying, but make sure that it's not an excessively dodgy lie. + OR = { + any_child = { count = 0 } + any_child = { + count = all + is_physically_able_adult = yes + } + } +} + +# A deceitful warrior is telling tall-tales at court. +fp1_yearly.0031 = { + type = character_event + title = fp1_yearly.0031.t + desc = { + desc = fp1_yearly.0031.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:lie_nature = flag:sunk_longboat } + desc = fp1_yearly.0031.desc.sunk_longboat + } + triggered_desc = { + trigger = { scope:lie_nature = flag:wrestled_whale } + desc = fp1_yearly.0031.desc.wrestled_whale + } + triggered_desc = { + trigger = { + scope:lie_nature = flag:charged_city + exists = scope:fruit_knife + } + desc = fp1_yearly.0031.desc.charged_city_fruit_knife + } + triggered_desc = { + trigger = { + scope:lie_nature = flag:charged_city + NOT = { exists = scope:fruit_knife } + } + desc = fp1_yearly.0031.desc.charged_city + } + triggered_desc = { + trigger = { scope:lie_nature = flag:kept_iceland_afloat } + desc = fp1_yearly.0031.desc.kept_iceland_afloat + } + triggered_desc = { + trigger = { scope:lie_nature = flag:wooed_heir } + desc = fp1_yearly.0031.desc.wooed_heir + } + triggered_desc = { + trigger = { scope:lie_nature = flag:hunted_troll } + desc = fp1_yearly.0031.desc.hunted_troll + } + } + desc = fp1_yearly.0031.desc.outro + } + theme = intrigue + left_portrait = { + character = root + animation = toast + triggered_animation = { + trigger = { + has_trait = impatient + } + animation = boredom + } + } + right_portrait = { + character = scope:lying_warrior + animation = storyteller + } + override_background = { reference = feast } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0031 } + is_landed = yes + #Must be some form of North Germanic culture. + culture = { has_cultural_pillar = heritage_north_germanic } + #And that culture must not be too advanced. + culture = { + NOT = { has_cultural_era_or_later = culture_era_high_medieval } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0031 + days = 1825 + } + #Save the capital for loc. + capital_barony = { save_scope_as = capital_barony } + #Create our lying warrior. + create_character = { + location = root.capital_province + template = fp1_deceitful_warrior_character + save_scope_as = lying_warrior + } + #Create our actual lie. + ##Six options for roughly 16.6% chance apiece. + random_list = { + #Swam home after their longboat sank from too much plunder. + 166 = { + #Fallback: always available. + save_scope_value_as = { + name = lie_nature + value = flag:sunk_longboat + } + } + #Wrestled a wounded whale ashore single-handed. + 166 = { + #Fallback: always available. + save_scope_value_as = { + name = lie_nature + value = flag:wrestled_whale + } + } + #Lead the charge on the walls of a great city. + 166 = { + #Fallback: always available. + save_scope_value_as = { + name = lie_nature + value = flag:charged_city + } + #And an Easter egg for Nick. + random = { + chance = 1 + save_scope_value_as = { + name = fruit_knife + value = yes + } + scope:lying_warrior = { give_nickname = nick_the_blessed } + } + } + #Averted giant holmgang that would have sunk Iceland. + 166 = { + trigger = { + #Must not have any counties in Iceland, as the news'd travel otherwise. + NOT = { + any_realm_de_jure_duchy = { this = title:d_iceland } + } + } + save_scope_value_as = { + name = lie_nature + value = flag:kept_iceland_afloat + } + } + #Wooed the child of a foreign king. + 166 = { + trigger = { + any_kingdom = { + is_title_created = yes + holder = { fp1_0031_any_valid_king_trigger = yes } + } + } + save_scope_value_as = { + name = lie_nature + value = flag:wooed_heir + } + #Designate a suitable kingdom. + random_kingdom = { + limit = { + is_title_created = yes + holder = { fp1_0031_any_valid_king_trigger = yes } + } + holder = { save_scope_as = disparaged_king } + } + #Set dummy appropriate gender. + ## If the faith is generally intolerant, then we invent a heterosexual target. + if = { + limit = { + faith = { + OR = { + has_doctrine_parameter = homosexuality_illegal + has_doctrine_parameter = homosexuality_shunned + } + } + } + # Then females get a male invention. + if = { + limit = { + scope:lying_warrior = { is_female = yes } + } + dummy_male = { save_scope_as = invented_heir } + } + # And males get a female invention. + if = { + limit = { + scope:lying_warrior = { is_male = yes } + } + dummy_female = { save_scope_as = invented_heir } + } + } + ## Otherwise, we randomise. + else = { + random_list = { + 100 = { + dummy_female = { save_scope_as = invented_heir } + } + 100 = { + dummy_male = { save_scope_as = invented_heir } + } + } + } + ## Ensure that scope:lying_warrior's preferences line up with their invented target. + ### Note: asexuals not specifically accounted for, since we can't reliably say which way(s) their preferences go, as we don't store that information. + scope:lying_warrior = { + if = { + limit = { + # Orthodox couplings. + OR = { + AND = { + is_female = yes + scope:invented_heir = { is_female = yes } + } + AND = { + is_male = yes + scope:invented_heir = { is_male = yes } + } + } + # But a heterodox preference. + has_sexuality = heterosexual + } + # Randomise scope:lying_warrior's sexuality to match their stories. + random_list = { + 100 = { set_sexuality = bisexual } + 100 = { set_sexuality = homosexual } + } + } + } + } + #Hunted troll. + 166 = { + #Fallback: always available. + save_scope_value_as = { + name = lie_nature + value = flag:hunted_troll + } + #Gotta make it believable. + scope:lying_warrior = { + hidden_effect = { + increase_wounds_effect = { REASON = fight } + } + } + } + } + } + + #Invite them to stay permanently. + option = { + name = fp1_yearly.0031.a + + add_courtier = scope:lying_warrior + + stress_impact = { + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_sociability = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } + + #Question their veracity. + option = { + name = fp1_yearly.0031.b + + #Standard intrigue duel; we make it a little easier, since you do have the choice of just gaining a courtier. + duel = { + skill = intrigue + target = scope:lying_warrior + #You expose their lies. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0031.b.tt_success + send_interface_toast = { + title = fp1_yearly.0031.b.tt_success + left_icon = scope:lying_warrior + add_prestige = minor_prestige_gain + scope:lying_warrior = { + #Dispose of scope:lying_warrior. + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } + } + #They run circles around your questions. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0031.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0031.b.tt_failure + left_icon = scope:lying_warrior + add_prestige = minor_prestige_loss + scope:lying_warrior = { + #Dispose of scope:lying_warrior. + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } + } + } + + stress_impact = { + paranoid = medium_stress_impact_loss + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_sociability = -0.5 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -20 + has_trait = trusting + } + } + } + + #Tell them to tell people of your generous halls. + option = { + name = fp1_yearly.0031.c + + #Get a nice little bonus/negate a negative for being talked up. + if = { + limit = { has_character_modifier = stingy_host_fp1_modifier } + remove_character_modifier = stingy_host_fp1_modifier + } + else = { + add_character_modifier = { + modifier = generous_host_fp1_modifier + years = 10 + } + } + + #Dispose of scope:lying_warrior. + hidden_effect = { + scope:lying_warrior = { + death = { death_reason = death_vanished } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + shy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_sociability = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = humble + } + } + } +} + +################################################## +# [Russia/Steppe] Islamic Explorer Visits Court +# by Ewan Cowhig Croft +# 0041 - 0050 +################################################## + +scripted_trigger suitable_islamic_realm_trigger = { + #First off, we need people who will consider root a savage. + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + #Next, filter down to the correct religion. + religion = religion:islam_religion + #Making sure to only grab rulers from the Middle East. + capital_province = { + OR = { + geographical_region = world_asia_minor + geographical_region = world_middle_east_jerusalem + geographical_region = world_middle_east_arabia + geographical_region = world_middle_east_persia + geographical_region = world_india_rajastan + } + } + #And then misc checks to make sure that the tone is correct. + top_liege = { + NOR = { + #Such as the liege not having much contact with Germanic Paganism. + religion = religion:germanic_religion + any_vassal_or_below = { religion = religion:germanic_religion } + #The realm not being positioned next door to root. + character_is_realm_neighbor = root.top_liege + #And the realm generally not being inside the same (admittedly large) area. + any_realm_county = { + title_province = { geographical_region = dlc_fp1_region_russian_steppe } + } + } + } +} + +# An Islamic explorer stops by for a visit. +fp1_yearly.0041 = { + type = character_event + title = fp1_yearly.0041.t + desc = fp1_yearly.0041.desc + theme = stewardship + left_portrait = { + character = scope:explorer + animation = disapproval + } + right_portrait = { + character = scope:sponsoring_liege + animation = personality_rational + } + override_background = { reference = throne_room } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0041 } + is_landed = yes + #Must be a Norse pagan tribal. + government_has_flag = government_is_tribal + religion = religion:germanic_religion + #With a capital in the steppe/Russia. + capital_province = { geographical_region = dlc_fp1_region_russian_steppe } + #Just for good measure, you should probably be a small-ish realm. + realm_size <= medium_realm_size + #No same-realm Muslims. + top_liege = { + NOR = { + religion = religion:islam_religion + any_vassal_or_below = { religion = religion:islam_religion } + } + } + #A suitable Islamic realm for the explorer to have come from must exists. + any_kingdom = { + holder ?= { suitable_islamic_realm_trigger = yes } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0041 + days = 3650 + } + #Grab home barony for loc. + capital_barony = { save_scope_as = capital_barony } + #Assign a home realm for the explorer. + random_kingdom = { + limit = { + holder ?= { suitable_islamic_realm_trigger = yes} + } + holder = { save_scope_as = sponsoring_liege } + } + #Create the Islamic explorer. + create_character = { + location = root.capital_province + template = fp1_islamic_explorer_character + save_scope_as = explorer + } + hidden_effect = { + scope:explorer = { + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_mystic + LEVEL_1 = yes + LEVEL_3 = yes + } + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = yes + LEVEL_3 = yes + } + } + } + } + + #Host a small blot. + option = { + name = fp1_yearly.0041.a + + #Diplomacy duel to see how well you present yourself. + duel = { + skill = diplomacy + value = decent_skill_rating + #Your blot impresses the explorer. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0041.a.tt_success + send_interface_toast = { + title = fp1_yearly.0041.a.tt_success + left_icon = scope:explorer + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = exotic_foreign_lord_fp1_modifier + years = 10 + } + } + } + #Your pagan ways disgust the explorer. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0041.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0041.a.tt_failure + left_icon = scope:explorer + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = horrifying_foreign_lord_fp1_modifier + years = 5 + } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_sociability = 0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -20 + has_trait = cynical + } + } + } + + #Invite them to stay and convert you. + option = { + name = fp1_yearly.0041.b + #Prohibit the AI from converting to far-away religions unless they're genuinely very interested in scope:explorer's faith. + trigger = { + OR = { + is_ai = no + AND = { + NOR = { + has_trait = zealous #Zealous characters never convert on a whim. + has_trait = cynical #Cynical characters aren't really interested in what anyone is selling. + has_trait = arrogant #Arrogant characters believe their faith is already the best, even if they don't care much about it. + has_trait = paranoid #Paranoid characters don't trust scope:explorer's tales. + } + OR = { + has_trait = humble #Humble characters like to give everyone a fair chance to explain their POV. + has_trait = trusting #Trusting characters can be talked into many things, given time & charisma. + } + } + } + } + + #Get scope:explorer as a courtier. + add_courtier = scope:explorer + #Sort conversion. + set_character_faith_with_conversion = scope:explorer.faith + #Get scope:sponsoring_liege as a friend, if possible. + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:sponsoring_liege } + } + set_relation_friend = { reason = friend_converted_explorer target = scope:sponsoring_liege } + reverse_add_opinion = { + target = scope:sponsoring_liege + modifier = pious_opinion + opinion = 50 + } + } + + stress_impact = { + humble = medium_stress_impact_loss + trusting = major_stress_impact_loss + paranoid = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + zealous = massive_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_zeal = -0.75 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = humble + } + modifier = { #Weight up for stress. + add = 30 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -20 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -50 + has_trait = zealous + } + } + } + + #Give them the boot. + option = { + name = fp1_yearly.0041.c + + #Consolation prize for giving them the boot. + ## Stress loss handled in stress_impact. + + stress_impact = { + base = minor_stress_loss + zealous = minor_stress_impact_loss + shy = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.25 + ai_sociability = -0.5 + } + modifier = { #Weight down for stress. + add = -10 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = shy + } + } + } + + #Clean-up characters, if appropriate. + after = { + # We use a separate event delayed by a day so that scope:explorer isn't dead in the toasts. + trigger_event = { + id = fp1_yearly.0042 + days = 1 + } + } +} + +# Clean up unused explorer. +fp1_yearly.0042 = { + hidden = yes + + immediate = { + #Get rid of scope:explorer, unless they've decided to stay. + scope:explorer = { + if = { + limit = { + NOT = { is_courtier_of = root } + } + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } + } +} + +################################################## +# [Rural] A Dead Character is Rumoured to have become a Draugr +# by Ewan Cowhig Croft +# 0051 - 0070 +################################################## + +# You are informed of the reputed-draugr. +fp1_yearly.0051 = { + type = character_event + title = fp1_yearly.0051.t + desc = fp1_yearly.0051.desc + theme = unfriendly + left_portrait = { + character = scope:draugr + animation = personality_vengeful + } + override_background = { reference = throne_room } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0051 } + is_landed = yes + #Must have a draugr candidate ready; this is set on the on_death on_action. + has_variable = potential_draugr + #Must be a tribal... + government_has_flag = government_is_tribal + #With a rural, North Germanic capital. + capital_county = { + #Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0051 + days = 7300 + } + #Grab our capital for loc. + capital_county = { save_scope_as = capital_county } + #Then grab our draugr. + var:potential_draugr = { save_scope_as = draugr } + } + + #Investigate in person. + option = { + name = fp1_yearly.0051.a + + #You go off to investigate in person. + custom_tooltip = fp1_yearly.0051.a.tt + ##5 possible outcomes, weighing down the chance of nothing happening slightly due to low value, gives us x4 options of 22.5% & one of 10%. + hidden_effect = { + random_list = { + #A pack of wolves! + 225 = { + trigger_event = { + id = fp1_yearly.0061 + months = 1 + } + } + #A fearsome bear! + 225 = { + trigger_event = { + id = fp1_yearly.0062 + months = 1 + } + } + #A nithing living in the mound! + 225 = { + trigger_event = { + id = fp1_yearly.0063 + months = 1 + } + } + #An orphan living in the mound! + 225 = { + trigger_event = { + id = fp1_yearly.0064 + months = 1 + } + } + #Absolutely bugger-all! + 100 = { + trigger_event = { + id = fp1_yearly.0065 + months = 1 + } + } + } + } + + stress_impact = { + diligent = medium_stress_impact_loss + brave = medium_stress_impact_loss + lazy = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { #Weight down for stress. + add = 20 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -20 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -20 + has_trait = craven + } + } + } + + #Try various folk solutions. + option = { + name = fp1_yearly.0051.c + + #Let's see how your hearth wisdom is, chummer. + duel = { + skill = learning + value = decent_skill_rating + #Your potions and spells reassure the locals. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0051.c.tt_success + send_interface_toast = { + title = fp1_yearly.0051.c.tt_success + left_icon = scope:draugr + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + add_stress = medium_stress_loss + } + } + #Your rituals are insufficient. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0051.c.tt_failure + send_interface_toast = { + title = fp1_yearly.0051.c.tt_failure + left_icon = scope:draugr + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_failed_fp1_modifier + years = 10 + } + } + add_stress = medium_stress_gain + } + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + #Have them exhumed and the corpse destroyed. + option = { + name = fp1_yearly.0051.b + + #Peasants are happy. + send_interface_toast = { + title = fp1_yearly.0051.b.body_destroyed + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + } + + #But either the family of the deceased are not... + if = { + limit = { + scope:draugr = { + OR = { + #Nab their entire house. + AND = { + house ?= { + any_house_member = { + count >= 1 + is_alive = yes + } + } + } + #Any close family outside of that house (bastards, house-founder siblings, etc). + any_close_or_extended_family_member = { + count >= 1 + is_alive = yes + } + #And any spouses still kicking around. + any_former_spouse = { + count >= 1 + is_alive = yes + } + } + } + } + #Nab scope:draugr's nearest'n'dearest. + scope:draugr = { + if = { + limit = { exists = house } + house = { + every_house_member = { + limit = { is_alive = yes } + add_to_list = close_to_draugr_list + } + } + } + every_close_or_extended_family_member = { + limit = { is_alive = yes } + add_to_list = close_to_draugr_list + } + every_former_spouse = { + limit = { is_alive = yes } + add_to_list = close_to_draugr_list + } + } + #And make them unhappy at the thing wot u dun. + every_in_list = { + list = close_to_draugr_list + custom = fp1_yearly.0051.b.list + add_opinion = { + target = root + modifier = fp1_desecrated_corpse_of_loved_one + } + } + } + #... Or you have to spend a little prestige for defiling the dead. + else = { add_prestige = medium_prestige_loss } + + stress_impact = { + vengeful = minor_stress_impact_loss + callous = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.25 + ai_honor = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = callous + } + modifier = { #Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { #Weight down for stress. + add = -20 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -20 + has_trait = just + } + } + } +} + +# The draugr is earmarked. +fp1_yearly.0052 = { + hidden = yes + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Must be within the player's court. + is_knight = yes + court_owner = { is_ai = no } + #Must be an intimidating fighter. + prowess >= extremely_high_skill_rating + #Aaaaand must have a personality that makes people think they'd come back to harass the living. + calc_true_if = { + amount >= 2 + has_trait = wrathful + has_trait = arrogant + has_trait = deceitful + has_trait = craven + has_trait = ambitious + has_trait = arbitrary + has_trait = cynical + has_trait = vengeful + has_trait = sadistic + } + } + + immediate = { + save_scope_as = potential_draugr + court_owner = { + set_variable = { + name = potential_draugr + value = scope:potential_draugr + years = 5 + } + } + } +} + +# The draugr was a pack of wolves! +fp1_yearly.0061 = { + type = character_event + title = fp1_yearly.0061.t + desc = fp1_yearly.0061.desc + theme = martial + left_portrait = { + character = root + animation = shock + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + #Fight the wolves. + option = { + name = fp1_yearly.0061.a + + #You rally your soldiers to fight off the pack! + duel = { + skill = martial + value = high_skill_rating + #You slaughter the pack! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0061.a.tt_success + send_interface_toast = { + title = fp1_yearly.0061.a.tt_success + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + add_prestige = medium_prestige_gain + } + } + #You barely escape with your life! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0061.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0061.a.tt_failure + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_monstrous_wolfpack_fp1_modifier + years = 10 + } + } + increase_wounds_effect = { REASON = wolves } + } + } + } + + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.25 + } + modifier = { #Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + #Retreat! + option = { + name = fp1_yearly.0061.b + + #The wolves will be eating people for some time to come. + capital_county = { + add_county_modifier = { + modifier = draugr_monstrous_wolfpack_fp1_modifier + years = 10 + } + } + #And e'eryone knows why. + add_prestige = medium_prestige_loss + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_boldness = -0.5 + } + modifier = { #Weight up for stress. + add = 30 + has_trait = craven + } + modifier = { #Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# The draugr was a bear! +fp1_yearly.0062 = { + type = character_event + title = fp1_yearly.0062.t + desc = fp1_yearly.0062.desc + theme = martial + left_portrait = { + character = root + animation = shock + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + #Fight the bear. + option = { + name = fp1_yearly.0062.a + + #You meet the bear's challenge! + duel = { + skill = prowess + value = high_skill_rating + #You kill the bear! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0062.a.tt_success + send_interface_toast = { + title = fp1_yearly.0062.a.tt_success + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + add_prestige = medium_prestige_gain + } + } + #You only just escape with your life! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0062.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0062.a.tt_failure + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_monstrous_bear_fp1_modifier + years = 10 + } + } + increase_wounds_effect = { REASON = bear } + } + } + } + + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.25 + } + modifier = { #Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + #Retreat! + option = { + name = fp1_yearly.0062.b + + #The bear will be eating people for some time to come. + capital_county = { + add_county_modifier = { + modifier = draugr_monstrous_bear_fp1_modifier + years = 10 + } + } + #And e'eryone knows why. + add_prestige = medium_prestige_loss + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_boldness = -0.5 + } + modifier = { #Weight up for stress. + add = 30 + has_trait = craven + } + modifier = { #Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# The draugr was a nithing! +fp1_yearly.0063 = { + type = character_event + title = fp1_yearly.0063.t + desc = fp1_yearly.0063.desc + theme = intrigue + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:draugr_nithing + animation = shock + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + immediate = { + #Create us a nithing! + create_character = { + location = root.capital_province + template = fp1_capital_county_nithing_character + save_scope_as = draugr_nithing + } + hidden_effect = { + scope:draugr_nithing = { nithing_character_creation_scripted_effect = yes } + } + } + + #Try to catch the nithing before they slip away. + option = { + name = fp1_yearly.0063.a + + #You attempt to catch the criminal. + duel = { + skill = intrigue + value = high_skill_rating + #Your trap works! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0063.a.tt_success + send_interface_toast = { + title = fp1_yearly.0063.a.tt_success + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + add_prestige = medium_prestige_gain + #To the dungeon with you, m'nithing. + imprison = { + target = scope:draugr_nithing + type = dungeon + } + } + } + #The nithing slips the net! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0063.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0063.a.tt_failure + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_nithing_fp1_modifier + years = 10 + } + } + custom_tooltip = fp1_yearly.0063.a.tt_failure.draugr_nithing_escapes + hidden_effect = { + scope:draugr_nithing = { + death = { death_reason = death_vanished } + } + } + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + vengeful = medium_stress_impact_loss + just = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = paranoid + } + modifier = { #Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = just + } + modifier = { #Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } + + #Leave them to it. + option = { + name = fp1_yearly.0063.b + + #The nithing will continue to do your capital a mischief for quite a while. + capital_county = { + add_county_modifier = { + modifier = draugr_nithing_fp1_modifier + years = 10 + } + } + #But at least it's less ignoble than running from wild animals. + add_prestige = minor_prestige_loss + + stress_impact = { + just = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + arbitrary = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_honor = -0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = just + } + modifier = { #Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -10 + has_trait = arbitrary + } + modifier = { #Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } +} + +# The draugr was an orphan! +fp1_yearly.0064 = { + type = character_event + title = fp1_yearly.0064.t + desc = fp1_yearly.0064.desc + theme = friendly + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:draugr_orphan + animation = fear + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + immediate = { + #Create us an orphan! + create_character = { + location = root.capital_province + template = fp1_capital_county_orphan_character + save_scope_as = draugr_orphan + } + #And every possible result sorts the issue for you. + capital_county = { + add_county_modifier = { + modifier = draugr_remedies_succeeded_fp1_modifier + years = 10 + } + } + } + + #Move them on. + option = { + name = fp1_yearly.0064.a + + #The orphan disappears. + custom_tooltip = fp1_yearly.0064.a.tt + hidden_effect = { + scope:draugr_orphan = { + death = { death_reason = death_vanished } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + callous = major_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_compassion = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { #Weight up for stress. + add = 30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + #Fling them into prison. + option = { + name = fp1_yearly.0064.b + + #You uhh, you get a prisoner. + imprison = { + target = scope:draugr_orphan + type = dungeon + } + reverse_add_opinion = { + target = scope:draugr_orphan + modifier = imprisoned_me + } + #... Just for good measure, let's make sure they won't forget this. + hidden_effect = { set_relation_potential_rival = scope:draugr_orphan } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = major_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.75 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { #Weight up for stress. + add = 30 + has_trait = sadistic + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + } + } + + #Take them to court. + option = { + name = fp1_yearly.0064.c + + #One shiny new child for you. + add_courtier = scope:draugr_orphan + #And they're pretty happy about being whisked out of the grave they were living in. + reverse_add_opinion = { + target = scope:draugr_orphan + modifier = loyal_servant + } + add_hook = { + target = scope:draugr_orphan + type = loyalty_hook + } + + stress_impact = { + trusting = minor_stress_impact_loss + compassionate = major_stress_impact_loss + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.75 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 30 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -20 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -20 + has_trait = sadistic + } + } + } + + #Adopt them. + option = { + name = fp1_yearly.0064.d + #And, if you've no kids of your own right now... + trigger = { + any_child = { + count = 0 + is_alive = yes + } + } + + #One shiny new child for you. + if = { + limit = { is_female = yes } + scope:draugr_orphan = { set_mother = root } + } + else = { + scope:draugr_orphan = { set_father = root } + } + hidden_effect = { + #We take care of the sundries in a hidden effect so as not to put too much into the tooltip. + scope:draugr_orphan = { set_house = root.house } + add_courtier = scope:draugr_orphan + } + #And they're pretty happy about being the child of a lord all of a sudden. + reverse_add_opinion = { + target = scope:draugr_orphan + modifier = love_opinion + opinion = 100 + } + add_hook = { + target = scope:draugr_orphan + type = loyalty_hook + } + + stress_impact = { + trusting = medium_stress_impact_loss + compassionate = massive_stress_impact_loss + paranoid = medium_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_compassion = -0.75 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 50 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = 20 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -30 + has_trait = callous + } + modifier = { #Weight down for stress. + add = -30 + has_trait = sadistic + } + } + } +} + +# The draugr was... didn't exist! +fp1_yearly.0065 = { + type = character_event + title = fp1_yearly.0065.t + desc = fp1_yearly.0065.desc + theme = physical_health + left_portrait = { + character = root + animation = boredom + } + override_background = { reference = wilderness } + + trigger = { + is_available_even_at_war_adult = yes + } + + #Must have been the wind? + option = { + name = fp1_yearly.0065.a + + #Welp, at least the fresh air does you good! + add_character_modifier = { + modifier = draugr_healthy_hiking_fp1_modifier + years = 10 + } + + + #The locals grumble a little regardless. + send_interface_toast = { + title = fp1_yearly.0065.a.locals_grumble + left_icon = root + capital_county = { + add_county_modifier = { + modifier = draugr_nothing_found_fp1_modifier + years = 10 + } + } + } + + stress_impact = { + #Usually bad form to give stress in one-event options, but it's a little funny to see your character's reaction to there being literally nothing to see. + trusting = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + #Only option. + base = 100 + } + } +} + +################################################## +# The Deep Places of the World +# by Ewan Cowhig Croft +# 0071 - 0090 +################################################## + +scripted_trigger fp1_0071_loveli_lakes_trigger = { + has_trait = shieldmaiden + is_courtier_of = root + is_available_ai_adult = yes + is_healthy = yes +} + +scripted_trigger fp1_0071_valid_marshal_for_delegation_trigger = { + exists = this + is_available_ai_adult = yes +} + +scripted_effect fp1_0071_apply_hungry_troll_modifier_effect = { + capital_county = { + add_county_modifier = { + modifier = fp1_yearly_0071_troll_attacks_modifier + years = 30 + } + } +} + +# [Rural] A Troll has been sighted & is attacking villages/peasants +fp1_yearly.0071 = { + type = character_event + title = fp1_yearly.0071.t + desc = { + desc = fp1_yearly.0071.desc.intro + # Troll type. + first_valid = { + # A towering bear. + triggered_desc = { + trigger = { scope:troll_type = flag:bear } + desc = fp1_yearly.0071.desc.troll_type.bear + } + # An ancient wolf. + triggered_desc = { + trigger = { scope:troll_type = flag:wolf } + desc = fp1_yearly.0071.desc.troll_type.wolf + } + # A colossal wolverine. + triggered_desc = { + trigger = { scope:troll_type = flag:wolverine } + desc = fp1_yearly.0071.desc.troll_type.wolverine + } + # A stealthy lynx. + triggered_desc = { + trigger = { scope:troll_type = flag:lynx } + desc = fp1_yearly.0071.desc.troll_type.lynx + } + # An enraged moose. + triggered_desc = { + trigger = { scope:troll_type = flag:moose } + desc = fp1_yearly.0071.desc.troll_type.moose + } + } + # Outro type. + first_valid = { + triggered_desc = { + trigger = { exists = scope:loveli_lakes } + desc = fp1_yearly.0071.desc.outro.loveli_lakes + } + desc = fp1_yearly.0071.desc.outro.fallback + } + } + theme = hunting + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:marshal + animation = dismissal + } + lower_left_portrait = scope:loveli_lakes + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0071 } + is_landed = yes + # Must be a tribal in Scandinavia. + government_has_flag = government_is_tribal + fp1_is_in_scandinavia = yes + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + # And ensure it doesn't already have a troll problem. + NOT = { has_county_modifier = fp1_yearly_0071_troll_attacks_modifier } + } + } + + weight_multiplier = { + base = 1 + + # Weight down a little if you're a hunter, since it means you're probably trimming the local wildlife down quite dramatically. + modifier = { + add = -0.5 + has_trait = lifestyle_hunter + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0071 + days = 1825 + } + # Roll to determine what type of beast we get. + ## Five options of 20% each. + random_list = { + # A towering bear. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:bear + } + } + # An ancient wolf. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:wolf + } + } + # A colossal wolverine. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:wolverine + } + } + # A stealthy lynx. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:lynx + } + } + # An enraged moose. + 200 = { + save_scope_value_as = { + name = troll_type + value = flag:moose + } + } + } + ## Did a møøse bite root's sister? + if = { + limit = { + scope:troll_type = flag:moose + # We could go for a more complex implementation, but as we want to keep the meme rare (and therefore less stale), we hard-lock it down to just shieldmaidens. + any_sibling = { fp1_0071_loveli_lakes_trigger = yes } + } + random_sibling = { + limit = { fp1_0071_loveli_lakes_trigger = yes } + save_scope_as = loveli_lakes + } + } + # Grab the martial, if possible, for delegation. + if = { + limit = { + any_martial_councillor = { fp1_0071_valid_marshal_for_delegation_trigger = yes } + } + random_martial_councillor = { + limit = { fp1_0071_valid_marshal_for_delegation_trigger = yes } + save_scope_as = marshal + } + } + } + + # I'll kill the beast myself! + option = { + name = fp1_yearly.0071.a + + # Inform root that they'll get a follow-up event. + custom_tooltip = fp1_yearly.0071.a.tt + # Calc which event to send out. + ## A towering bear. + if = { + limit = { scope:troll_type = flag:bear } + trigger_event = { + id = fp1_yearly.0081 + days = 14 + } + } + ## An ancient wolf. + else_if = { + limit = { scope:troll_type = flag:wolf } + trigger_event = { + id = fp1_yearly.0082 + days = 14 + } + } + ## A colossal wolverine. + else_if = { + limit = { scope:troll_type = flag:wolverine } + trigger_event = { + id = fp1_yearly.0083 + days = 14 + } + } + ## A stealthy lynx. + else_if = { + limit = { scope:troll_type = flag:lynx } + trigger_event = { + id = fp1_yearly.0084 + days = 14 + } + } + ## An enraged moose. + else = { + trigger_event = { + id = fp1_yearly.0085 + days = 14 + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -10 + has_trait = craven + } + } + } + + # Scope:marshal, take care of this. + option = { + name = fp1_yearly.0071.b + trigger = { exists = scope:marshal } + + # Martial duel for the marshal. + scope:marshal = { + duel = { + skill = martial + value = very_high_skill_rating + # Your marshal and their troops hunt down the beast. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0071.b.tt_success + root = { + send_interface_toast = { + title = fp1_yearly.0071.b.tt_success + left_icon = scope:marshal + # Huzzah! Everyone's a hero! + scope:marshal = { add_prestige = major_prestige_gain } + add_prestige = medium_prestige_gain + } + } + } + # The beast eludes scope:marshal and continues to stalk the province. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0071.b.tt_failure + root = { + send_interface_toast = { + title = fp1_yearly.0071.b.tt_failure + left_icon = scope:marshal + # Welp, that's a lot of failure involved for everyone. + scope:marshal = { add_prestige = major_prestige_loss } + add_prestige = medium_prestige_loss + # Capital_county isn't happy. + fp1_0071_apply_hungry_troll_modifier_effect = yes + } + } + } + } + } + + stress_impact = { + craven = minor_stress_impact_loss + lazy = medium_stress_impact_loss + brave = minor_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = craven + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } + + # It's probably just a bear. Deal with it yourselves, cravens. + option = { + name = fp1_yearly.0071.c + + # Gain some prestige for your toughness. + add_prestige = minor_prestige_gain + # But your capital county is upset. + fp1_0071_apply_hungry_troll_modifier_effect = yes + + stress_impact = { + cynical = minor_stress_impact_loss + craven = medium_stress_impact_loss + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { # Weight up for stress. + add = 20 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -20 + has_trait = brave + } + } + } +} + +scripted_effect fp1_0081_invalidation_toast_effect = { + send_interface_toast = { + title = fp1_yearly.0081.hunt_invalidated + left_icon = root + custom_tooltip = fp1_yearly.0081.hunt_invalidated.tt + } +} + +scripted_effect fp1_0081_troll_duel_victory_effect = { + # Add unique character modifier. + add_character_modifier = { + modifier = $MODIFIER$ + years = 20 + } + # And prestige. + add_prestige = major_prestige_gain + # Low chance for characters to become styled "Troll-Slayer". + if = { + limit = { + has_any_nickname = no + AND = { + has_bad_nickname = yes + is_ai = yes + } + } + random = { + chance = 25 + give_nickname = nick_troll_slayer + } + } + # Or automatically if they're players with bad nicknames. + else_if = { + limit = { + has_bad_nickname = yes + is_ai = no + } + give_nickname = nick_troll_slayer + } +} + +scripted_effect fp1_0081_troll_duel_effect = { + duel = { + skill = prowess + value = high_skill_rating + # You murderise the animal. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = $SUCCESS_TITLE$ + send_interface_toast = { + title = $SUCCESS_TITLE$ + left_icon = root + # Apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = $MODIFIER$ } + } + } + # The animal wounds you and your retinue carries you off. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = $FAILURE_TITLE$ + send_interface_toast = { + title = $FAILURE_TITLE$ + left_icon = root + # Capital_county is unhappy. + fp1_0071_apply_hungry_troll_modifier_effect = yes + # The beast kills you. + death = { death_reason = $REASON$ } + } + } + } +} + +scripted_effect fp1_0081_troll_duel_alternate_effect = { + duel = { + skill = $SKILL$ + value = high_skill_rating + # You murderise the animal. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = $SUCCESS_TITLE$ + send_interface_toast = { + title = $SUCCESS_TITLE$ + left_icon = root + # Apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = $MODIFIER$ } + } + } + # The animal wounds you and your retinue carries you off. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = $FAILURE_TITLE$ + send_interface_toast = { + title = $FAILURE_TITLE$ + left_icon = root + # The beast merely maims you. + custom_tooltip = $FAILURE_TITLE$.tt + hidden_effect = { maimed_in_battle_effect = yes } + # Capital_county is unhappy. + fp1_0071_apply_hungry_troll_modifier_effect = yes + } + } + } +} + +scripted_effect fp1_0081_flee_option_effect = { + # Lose prestige. + add_prestige = medium_prestige_loss + # Your capital county doesn't do too well, either. + fp1_0071_apply_hungry_troll_modifier_effect = yes +} + +# Troll: towering bear. +fp1_yearly.0081 = { + type = character_event + title = fp1_yearly.0081.t + desc = fp1_yearly.0081.desc + theme = hunting + left_portrait = { + character = root + animation = shock + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0081.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0081.a.tt_success + FAILURE_TITLE = fp1_yearly.0081.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_bear_modifier + REASON = death_bear + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0081.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0081.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_bear_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Diplomacy: at it, Wolves of [Capital]! + option = { + name = fp1_yearly.0081.c + + # Risky diplomacy duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = diplomacy + SUCCESS_TITLE = fp1_yearly.0081.c.tt_success + FAILURE_TITLE = fp1_yearly.0081.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_bear_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0081.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Troll: ancient wolf. +fp1_yearly.0082 = { + type = character_event + title = fp1_yearly.0082.t + desc = fp1_yearly.0082.desc + theme = hunting + left_portrait = { + character = root + animation = shock + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0082.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0082.a.tt_success + FAILURE_TITLE = fp1_yearly.0082.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_wolf_modifier + REASON = death_wolf + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0082.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0082.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_wolf_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Martial: rally! Form a circle! + option = { + name = fp1_yearly.0082.c + + # Risky martial duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = martial + SUCCESS_TITLE = fp1_yearly.0082.c.tt_success + FAILURE_TITLE = fp1_yearly.0082.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_wolf_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0082.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Troll: colossal wolverine. +fp1_yearly.0083 = { + type = character_event + title = fp1_yearly.0083.t + desc = fp1_yearly.0083.desc + theme = hunting + left_portrait = { + character = root + animation = shock + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0083.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0083.a.tt_success + FAILURE_TITLE = fp1_yearly.0083.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_wolverine_modifier + REASON = death_wolverine + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0083.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0083.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_wolverine_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Stewardship: there's a lodge near here, fall back for reinforcements! + option = { + name = fp1_yearly.0083.c + + # Risky stewardship duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = stewardship + SUCCESS_TITLE = fp1_yearly.0083.c.tt_success + FAILURE_TITLE = fp1_yearly.0083.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_wolverine_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0083.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Troll: stealthy lynx. +fp1_yearly.0084 = { + type = character_event + title = fp1_yearly.0084.t + desc = fp1_yearly.0084.desc + theme = hunting + left_portrait = { + character = root + animation = shock + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0084.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0084.a.tt_success + FAILURE_TITLE = fp1_yearly.0084.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_lynx_modifier + REASON = death_lynx + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0084.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0084.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_lynx_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Intrigue: quiet; you two flank it, we'll flush it towards you... + option = { + name = fp1_yearly.0084.c + + # Risky diplomacy duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = intrigue + SUCCESS_TITLE = fp1_yearly.0084.c.tt_success + FAILURE_TITLE = fp1_yearly.0084.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_lynx_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0084.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +# Troll: enraged moose. +fp1_yearly.0085 = { + type = character_event + title = fp1_yearly.0085.t + desc = { + # Account for sibling violence. + first_valid = { + triggered_desc = { + trigger = { exists = scope:loveli_lakes } + desc = fp1_yearly.0085.desc.loveli_lakes + } + desc = fp1_yearly.0085.desc.fallback + } + } + theme = hunting + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:loveli_lakes + animation = anger + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + # Must be a tribal... + government_has_flag = government_is_tribal + # With a rural, North Germanic capital. + capital_county = { + # Checking the capital, not the character, since it's a local superstition rather than something ye're insisiting on. + culture = { has_cultural_pillar = heritage_north_germanic } + development_level <= terrible_development_level + } + } + + on_trigger_fail = { fp1_0081_invalidation_toast_effect = yes } + + immediate = { play_music_cue = "mx_cue_combat_stinger" } + + # Charge in, blade swinging. + option = { + name = fp1_yearly.0085.a + trigger = { + NOT = { has_trait = berserker } + } + + # Risky prowess duel. + fp1_0081_troll_duel_effect = { + SUCCESS_TITLE = fp1_yearly.0085.a.tt_success + FAILURE_TITLE = fp1_yearly.0085.a.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_moose_modifier + REASON = death_moose + } + + #We need to check that they didn't die - if we apply stress to a dead character the error-log complains + if = { + limit = { + is_alive = yes + } + stress_impact = { + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # (Berserker) Auto-win due to Hulkery. + option = { + name = fp1_yearly.0085.b + trigger = { has_trait = berserker } + trait = berserker + + # Explain what's happening. + custom_tooltip = fp1_yearly.0085.b.tt + # And apply victory effects. + fp1_0081_troll_duel_victory_effect = { MODIFIER = fp1_yearly_0071_troll_victory_moose_modifier } + + stress_impact = { + berserker = massive_stress_impact_loss + wrathful = major_stress_impact_loss + calm = major_stress_impact_gain + } + ai_chance = { + # The AI should basically always take this option, since it's both an automatic win and something representing a sudden & total loss of control. + base = 10000 + } + } + + # Learning: remember its weak spot, spears and bows only! + option = { + name = fp1_yearly.0085.c + + # Risky learning duel. + fp1_0081_troll_duel_alternate_effect = { + SKILL = learning + SUCCESS_TITLE = fp1_yearly.0085.c.tt_success + FAILURE_TITLE = fp1_yearly.0085.c.tt_failure + MODIFIER = fp1_yearly_0071_troll_victory_moose_modifier + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # FLEE! + option = { + name = fp1_yearly.0085.d + + # Apply flee effects. + fp1_0081_flee_option_effect = yes + + stress_impact = { + craven = major_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress; weight up even further for cravens not wanting to immediately die. + add = 1000 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +################################################## +# A Ship fit for a [ROOT.Char.GetTitleAsName] +# by Ewan Cowhig Croft +# 0090 - 0100 +################################################## + +# Commissioning a Longship for Yourself +fp1_yearly.0091 = { + type = character_event + title = fp1_yearly.0091.t + desc = fp1_yearly.0091.desc + theme = martial + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = fp1_beached_longships } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0091 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for having sea-faring traits. + modifier = { + add = 0.5 + has_trait = viking + } + modifier = { + add = 0.5 + has_trait = adventurer + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0091 + days = 10950 + } + } + + # A leviathan, to carry my spoils! + option = { + name = fp1_yearly.0091.a + trigger = { + can_make_expensive_purchase_trigger = { PRICE = fp1_0091_standard_ship_gold_cost } + } + + # Get a modifier enhancing loot capacity. + add_character_modifier = { + modifier = fp1_flagship_leviathan_modifier + years = 10 + } + # And charge the gold cost. + remove_short_term_gold = major_gold_value + + stress_impact = { + profligate = massive_stress_impact_loss + ambitious = major_stress_impact_loss + content = major_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 50 + has_trait = profligate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = ambitious + } + modifier = { # Weight down for stress. + add = -30 + has_trait = content + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # A monster, to intimidate my vassals! + option = { + name = fp1_yearly.0091.b + trigger = { + can_make_expensive_purchase_trigger = { PRICE = fp1_0091_standard_ship_gold_cost } + } + + # Get a modifier giving more tax from cowed vassals. + add_character_modifier = { + modifier = fp1_flagship_monster_modifier + years = 10 + } + # And charge the gold cost. + remove_short_term_gold = major_gold_value + + stress_impact = { + profligate = massive_stress_impact_loss + callous = major_stress_impact_loss + sadistic = major_stress_impact_loss + compassionate = major_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 50 + has_trait = profligate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # A dragon, to roar my name! + option = { + name = fp1_yearly.0091.c + trigger = { + can_make_expensive_purchase_trigger = { PRICE = fp1_0091_standard_ship_gold_cost } + } + + # Get a modifier granting diplomacy per prestige level + add_character_modifier = { + modifier = fp1_flagship_dragon_modifier + years = 10 + } + # And charge the gold cost. + remove_short_term_gold = major_gold_value + + stress_impact = { + profligate = massive_stress_impact_loss + arrogant = major_stress_impact_loss + humble = major_stress_impact_gain + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 50 + has_trait = profligate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # These are all ludicrously costly... + option = { + name = fp1_yearly.0091.d + + # Consiliatory stress loss for hanging on to your cash. + ## Stress loss handled in stress impact. + + stress_impact = { + base = minor_stress_loss + greedy = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = -0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + } + } +} + +################################################## +# A Guest/Courtier Challenges you to Riddles +# by Ewan Cowhig Croft +# 0101 - 0110 +################################################## + +scripted_trigger fp1_valid_riddler_at_court_trigger = { + # We want characters of minor or major interest, ideally. + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + # And we want to make sure they're available and can speak. + is_available_ai_adult = yes +} + +# Someone in your court challenges you to an idle game of riddles. +fp1_yearly.0101 = { + type = character_event + title = fp1_yearly.0101.t + desc = fp1_yearly.0101.desc + theme = diplomacy + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:riddler + animation = schadenfreude + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0101 } + is_landed = yes + # Valid for North Germanics only. + culture = { has_cultural_pillar = heritage_north_germanic } + # Has a valid courtier/guest who can quiz you. + any_courtier_or_guest = { fp1_valid_riddler_at_court_trigger = yes } + # Doesn't have an established extreme hatred of riddles. + NOT = { has_character_flag = fp1_yearly_0101_really_hates_riddles } + } + + weight_multiplier = { + base = 1 + + # Weight up for traits that make you a known woman/man of letters. + modifier = { + add = 0.5 + has_trait = journaller + } + modifier = { + add = 0.5 + has_trait = scholar + } + modifier = { + add = 0.5 + has_trait = theologian + } + modifier = { + add = 0.5 + has_trait = administrator + } + modifier = { + add = 0.5 + has_trait = architect + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0101 + days = 1825 + } + # Designate a suitable riddler. + ## First, we grab all possibles & sort them into a list. + every_courtier_or_guest = { + limit = { fp1_valid_riddler_at_court_trigger = yes } + add_to_list = potential_valid_riddlers_list + } + ## Then, we order that list appropriately. + ordered_in_list = { + list = potential_valid_riddlers_list + order_by = { value = fp1_best_available_riddler_value } + save_scope_as = riddler + } + } + + # Entertaining, I'll play! [diplo] + option = { + name = fp1_yearly.0101.a + + # Duel the courtier for it. + duel = { + skill = diplomacy + target = scope:riddler + # You win the game! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0101.a.tt_success + send_interface_toast = { + title = fp1_yearly.0101.a.tt_success + left_icon = scope:riddler + # Gain opinion with your court for participating. + every_courtier_or_guest = { + limit = { is_available_adult = yes } + custom = fp1_yearly.0101.a.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 20 + } + } + # And a little prestige as a side-prize. + add_prestige = miniscule_prestige_gain + } + } + # You lose the game! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0101.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0101.a.tt_failure + left_icon = scope:riddler + # Gain opinion with your court for participating. + every_courtier_or_guest = { + limit = { is_available_adult = yes } + custom = fp1_yearly.0101.a.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 20 + } + } + # And lose a little prestige. + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + shy = minor_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.75 + ai_boldness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = impatient + } + } + } + + # Entertaining, I'll play! [learning] + option = { + name = fp1_yearly.0101.b + + duel = { + skill = learning + target = scope:riddler + # You win the game! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0101.a.tt_success + send_interface_toast = { + title = fp1_yearly.0101.a.tt_success + left_icon = scope:riddler + # Gain opinion with your court for participating. + every_courtier_or_guest = { + limit = { is_available_adult = yes } + custom = fp1_yearly.0101.a.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 20 + } + } + # And a little prestige as a side-prize. + add_prestige = miniscule_prestige_gain + } + } + # You lose the game! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0101.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0101.a.tt_failure + left_icon = scope:riddler + # Gain opinion with your court for participating. + every_courtier_or_guest = { + limit = { is_available_adult = yes } + custom = fp1_yearly.0101.a.every_courtier_and_guest + add_opinion = { + target = root + modifier = amused_opinion + opinion = 20 + } + } + # And lose a little prestige. + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_loss + shy = minor_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.75 + ai_boldness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = impatient + } + } + } + + # Here's one: who has no brain and belongs in the dungeon? + option = { + name = fp1_yearly.0101.c + + # Toss them in the dungeon. + imprison_character_effect = { + IMPRISONER = root + TARGET = scope:riddler + } + hidden_effect = { + # Make sure that it's _definitely_ the dungeon. + scope:riddler = { change_prison_type = dungeon } + # And that no one will ever try to get you involved in a game ever again. + add_character_flag = fp1_yearly_0101_really_hates_riddles + } + # Gain some dread to balance out that tyranny. + add_dread = medium_dread_gain + # People may remember your over-reaction... + if = { + limit = { has_any_nickname = no } + custom_tooltip = fp1_yearly.0101.c.tt + hidden_effect = { + random_list = { + 60 = { + # The court dares not mock you. + } + 40 = { + # You hear a whispered nickname behind your back... + random_list = { + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_the_stonefaced + } + } + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_the_dry + } + } + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_the_joyless + } + } + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_lacks_laughs + } + } + 20 = { + send_interface_toast = { + title = fp1_yearly.0101.c.tt_nickname + left_icon = root + give_nickname = nick_the_dull + } + } + } + } + } + } + } + + stress_impact = { + sadistic = minor_stress_impact_loss + impatient = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight up for stress. + add = 20 + has_trait = impatient + } + modifier = { # Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = gregarious + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = patient + } + } + } + + # Thanks, but I'm a [title], and have things to do. + option = { + name = fp1_yearly.0101.d + + # Lose a little prestige, but less than if you were beaten. + add_prestige = miniscule_prestige_loss + # Scope:riddler is disappointed in you. + scope:riddler = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + shy = minor_stress_impact_loss + impatient = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = shy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -20 + has_trait = gregarious + } + } + } +} + +################################################## +# Accursed +# by Ewan Cowhig Croft +# 0111 - 0120 +################################################## + +scripted_trigger fp1_0111_superstitious_courtier_trigger = { + # Basic checks. + is_available_ai_adult = yes + OR = { + fp1_is_norse = yes + religion = religion:germanic_religion + } + # Rule out a few key traits. + NOR = { + # Cynical characters don't believe. + has_trait = cynical + # Brave characters don't succumb to threats. + has_trait = brave + # Trusting characters believe the gods or their friends will help them. + has_trait = trusting + } + # Witches aren't fussed: they're confident in their counterspells. + NOR = { + has_trait = witch + any_secret = { type = secret_witch } + } + # Anyone who's already been cursed is about as screwed as they can be. + NOT = { has_character_modifier = fp1_cursed_by_nithing_pole_modifier } + # And we ideally want to be able to add a strong hook, at least. + save_temporary_scope_as = current_courtier + root = { + can_add_hook = { + target = scope:current_courtier + type = loyalty_hook + } + } +} + +scripted_trigger fp1_0111_suspicious_courtier_trigger = { + # Basic checks. + is_available_ai_adult = yes + this != scope:accursed + OR = { + fp1_is_norse = yes + religion = religion:germanic_religion + } + # Would-be sorcerers need to either know what they're doing, or else have absolutely no clue. + OR = { + intrigue >= fp1_0111_sorcerer_intrigue_high + learning >= fp1_0111_sorcerer_learning_high + intrigue <= fp1_0111_sorcerer_intrigue_low + learning <= fp1_0111_sorcerer_learning_low + } + # ... and to have at least two of various pairs of matched traits. + calc_true_if = { + amount >= 2 + OR = { + has_trait = lazy + has_trait = arbitrary + } + OR = { + has_trait = wrathful + has_trait = impatient + } + OR = { + has_trait = calm + has_trait = patient + } + OR = { + has_trait = sadistic + has_trait = arrogant + } + OR = { + has_trait = callous + has_trait = ambitious + } + OR = { + has_trait = deceitful + has_trait = craven + } + OR = { + has_trait = brave + has_trait = trusting + } + OR = { + has_trait = paranoid + has_trait = vengeful + } + } + # Filter out known witches: *way* too obvious. + NOT = { has_trait = witch } +} + +scripted_trigger fp1_0111_discountable_courtier_trigger = { + # Basic checks. + is_available_ai_adult = yes + this != scope:accursed + OR = { + fp1_is_norse = yes + religion = religion:germanic_religion + } + # Discountables must not meet minimum requirements to be suspicious. + fp1_0111_suspicious_courtier_trigger = no + # On top of that, as long as they have at least one disqualifying statistic, they're gucci. + OR = { + has_trait = gallant + has_trait = honest + has_trait = just + has_trait = compassionate + has_trait = forgiving + # Zealous characters require witchcraft to be at least somewhat shameful. + AND = { + has_trait = zealous + faith = { + NOT = { has_doctrine_parameter = witchcraft_accepted } + } + } + } + # Ensure that no witches are thrown into the discountables pile, as that's just cruel. + NOR = { + has_trait = witch + any_secret = { type = secret_witch } + } +} + +scripted_effect fp1_0111_randomise_sorcerer_identity_effect = { + random_list = { + 100 = { + trigger = { + NOT = { exists = scope:suspect_a } + } + save_scope_as = suspect_a + } + 100 = { + trigger = { + NOT = { exists = scope:suspect_b } + } + save_scope_as = suspect_b + } + 100 = { + trigger = { + NOT = { exists = scope:suspect_c } + } + save_scope_as = suspect_c + } + } +} + +scripted_effect fp1_0111_accursed_receives_curse_effect = { + # Firstly, they gain a *colossal* amount of stress. + add_stress = monumental_stress_gain + # Then they take a negative modifier. + add_character_modifier = { + modifier = fp1_cursed_by_nithing_pole_modifier + years = 20 + } + # And become paranoid if possible. + if = { + limit = { + number_of_personality_traits < personality_trait_limit + NOR = { + has_trait = trusting + has_trait = paranoid + } + } + add_trait = paranoid + } +} + +scripted_effect fp1_0111_correct_accusation_effect = { + # Give $CHARACTER$ a witch secret & expose it. + $CHARACTER$ = { + # Hide the witch effect, so that you can't just *see* who the witch is by who'll be exposed. + hidden_effect = { + random_secret = { + type = secret_witch + expose_secret = root + } + } + # Simply show a nice, easy tooltip. + show_as_tooltip = { add_trait = witch } + } + # Rightfully imprison them. + rightfully_imprison_character_effect = { + TARGET = $CHARACTER$ + IMPRISONER = root + } + # Gain a nicely chonky chunk of prestige. + add_prestige = medium_prestige_gain + # Receive a strong hook on, and oodles of opinion with, scope:accursed. + add_hook = { + type = loyalty_hook + target = scope:accursed + } + reverse_add_opinion = { + target = scope:accursed + modifier = relieved_opinion + opinion = 75 + } +} + +scripted_effect fp1_0111_false_accusation_effect = { + # $CHARACTER$ is, understandably, upset. + reverse_add_opinion = { + target = $CHARACTER$ + modifier = falsely_accused + } + # And you lose some prestige for your failure. + add_prestige = medium_prestige_loss + # Scope:accursed has a melt-down. + scope:accursed = { fp1_0111_accursed_receives_curse_effect = yes } +} + +scripted_effect fp1_0111_select_accusation_effect = { + # Inform root about the potential consequences of their guess. + show_as_tooltip = { + random_list = { + # Guessed correctly. + 100 = { + show_chance = no + desc = fp1_yearly.0111.tt.correct_guess + fp1_0111_correct_accusation_effect = { CHARACTER = $CHARACTER$ } + } + # Guessed incorrectly. + 100 = { + show_chance = no + desc = fp1_yearly.0111.tt.wrong_guess + fp1_0111_false_accusation_effect = { CHARACTER = $CHARACTER$ } + } + } + } + # And handle the actual results. + ## Guessed correctly! + if = { + limit = { $CHARACTER$ = scope:culprit } + send_interface_toast = { + title = fp1_yearly.0111.tt.correct_accusation + left_icon = $CHARACTER$ + right_icon = scope:accursed + # Calculate actual effects: we have to keep these hidden so as not to spoil the mystery. + hidden_effect = { + fp1_0111_correct_accusation_effect = { CHARACTER = $CHARACTER$ } + } + # And throw in a tooltip to make the toast seem less empty. + custom_tooltip = fp1_yearly.0111.tt.correct_accusation.tt + } + } + ## Otherwise, you dun goofed. + else = { + send_interface_toast = { + title = fp1_yearly.0111.tt.false_accusation + left_icon = $CHARACTER$ + right_icon = scope:accursed + # Calculate actual effects: we have to keep these hidden so as not to spoil the mystery. + hidden_effect = { + fp1_0111_false_accusation_effect = { CHARACTER = $CHARACTER$ } + } + # And throw in a tooltip to make the toast seem less empty. + custom_tooltip = fp1_yearly.0111.tt.false_accusation.tt + } + } +} + +# Nithing Pole Raised Against Courtier +fp1_yearly.0111 = { + type = character_event + title = fp1_yearly.0111.t + desc = { + desc = fp1_yearly.0111.desc.intro + # Skill clue. + first_valid = { + triggered_desc = { + trigger = { + scope:clue_skill = flag:intrigue + intrigue >= fp1_0111_sorcerer_intrigue_high + } + desc = fp1_yearly.0111.desc.skill.intrigue_high + } + triggered_desc = { + trigger = { + scope:clue_skill = flag:learning + learning >= fp1_0111_sorcerer_learning_high + } + desc = fp1_yearly.0111.desc.skill.learning_high + } + triggered_desc = { + trigger = { + scope:clue_skill = flag:intrigue + intrigue <= fp1_0111_sorcerer_intrigue_low + } + desc = fp1_yearly.0111.desc.skill.intrigue_low + } + triggered_desc = { + trigger = { + scope:clue_skill = flag:learning + learning <= fp1_0111_sorcerer_learning_low + } + desc = fp1_yearly.0111.desc.skill.learning_low + } + desc = fp1_yearly.0111.desc.skill.fallback + } + # Grammatical stop. + desc = fp1_yearly.0111.desc.first_connector + # Trait clue #1. + first_valid = { + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:lazy_or_arbitrary } + desc = fp1_yearly.0111.desc.trait_1.lazy_or_arbitrary + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:wrathful_or_impatient } + desc = fp1_yearly.0111.desc.trait_1.wrathful_or_impatient + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:calm_or_patient } + desc = fp1_yearly.0111.desc.trait_1.calm_or_patient + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:sadistic_or_arrogant } + desc = fp1_yearly.0111.desc.trait_1.sadistic_or_arrogant + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:callous_or_ambitious } + desc = fp1_yearly.0111.desc.trait_1.callous_or_ambitious + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:deceitful_or_craven } + desc = fp1_yearly.0111.desc.trait_1.deceitful_or_craven + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:brave_or_trusting } + desc = fp1_yearly.0111.desc.trait_1.brave_or_trusting + } + triggered_desc = { + trigger = { scope:clue_trait_1 = flag:paranoid_or_vengeful } + desc = fp1_yearly.0111.desc.trait_1.paranoid_or_vengeful + } + desc = fp1_yearly.0111.desc.trait_1.fallback + } + # Grammatical stop. + desc = fp1_yearly.0111.desc.second_connector + # Trait clue #2. + first_valid = { + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:lazy_or_arbitrary } + desc = fp1_yearly.0111.desc.trait_2.lazy_or_arbitrary + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:wrathful_or_impatient } + desc = fp1_yearly.0111.desc.trait_2.wrathful_or_impatient + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:calm_or_patient } + desc = fp1_yearly.0111.desc.trait_2.calm_or_patient + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:sadistic_or_arrogant } + desc = fp1_yearly.0111.desc.trait_2.sadistic_or_arrogant + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:callous_or_ambitious } + desc = fp1_yearly.0111.desc.trait_2.callous_or_ambitious + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:deceitful_or_craven } + desc = fp1_yearly.0111.desc.trait_2.deceitful_or_craven + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:brave_or_trusting } + desc = fp1_yearly.0111.desc.trait_2.brave_or_trusting + } + triggered_desc = { + trigger = { scope:clue_trait_2 = flag:paranoid_or_vengeful } + desc = fp1_yearly.0111.desc.trait_2.paranoid_or_vengeful + } + desc = fp1_yearly.0111.desc.trait_2.fallback + } + desc = fp1_yearly.0111.desc.outro + } + theme = intrigue + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:accursed + animation = fear + } + lower_left_portrait = scope:suspect_a + lower_center_portrait = scope:suspect_b + lower_right_portrait = scope:suspect_c + override_background = { reference = corridor_night } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0111 } + is_landed = yes + # Filter to flavour-appropriate characters. + faith = { + NOT = { has_doctrine_parameter = witchcraft_accepted } + } + OR = { + fp1_is_norse_tribal = yes + # Allow this after feudalisation, but not for kings and emperors with more important things going on. + AND = { + fp1_is_norse = yes + highest_held_title_tier <= tier_duchy + } + } + # Make sure we have a suitably superstitious character for scope:courtier. + any_courtier = { + fp1_0111_superstitious_courtier_trigger = yes + save_temporary_scope_as = accursed + } + # And that they've got enemies available. + any_courtier_or_guest = { + # Count one more than we need so that we've still got a valid scope:accursed even if they accidentally take up a suspect slot. + count >= 4 + fp1_0111_suspicious_courtier_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Witches see more of this type of thing in their court. + modifier = { + add = 1 + has_trait = witch + } + # And zealots are more likely to be appealed to by terrified courtiers. + modifier = { + add = 0.5 + has_trait = zealous + } + } + + immediate = { + play_music_cue = "mx_cue_murder" + add_character_flag = { + flag = had_event_fp1_yearly_0111 + days = 7300 + } + # Designate a suitable superstitious courtier. + random_courtier = { + limit = { fp1_0111_superstitious_courtier_trigger = yes } + weight = { + base = 0 + # Weigh up the paranoid. + modifier = { + add = 100 + has_trait = paranoid + } + # Weigh up zealots. + modifier = { + add = 50 + has_trait = zealous + } + # And the vengeful, just a little, for assuming everyone thinks like them. + modifier = { + add = 25 + has_trait = vengeful + } + } + save_scope_as = accursed + } + # Next, grab all valid suspicious courtiers + every_courtier_or_guest = { + limit = { + fp1_0111_suspicious_courtier_trigger = yes + } + add_to_list = suspicious_courtiers_list + } + # And all valid discountables. + every_courtier_or_guest = { + limit = { fp1_0111_discountable_courtier_trigger = yes } + add_to_list = discountable_courtiers_list + } + # Process candidates. + ## First, scope:culprit. + random_in_list = { + list = suspicious_courtiers_list + weight = { + base = 1 + # Weight up anyone with the witch secret for the main suspect. + modifier = { + add = 1000 + any_secret = { type = secret_witch } + } + } + save_scope_as = culprit + } + ## Then, scope:red_herring. + random_in_list = { + list = suspicious_courtiers_list + limit = { + NOR = { + this = scope:culprit + # Forbid secret witches: that's *too* much of a red herring. + any_secret = { type = secret_witch } + } + } + save_scope_as = red_herring + } + ## Try for a scope:discountable. + if = { + limit = { + any_in_list = { + list = discountable_courtiers_list + count >= 1 + } + } + random_in_list = { + list = discountable_courtiers_list + save_scope_as = discountable + } + } + ## If no scope:discountable is available, pick a scope:scarlet_herring. + else = { + random_in_list = { + list = suspicious_courtiers_list + limit = { + NOR = { + this = scope:culprit + this = scope:red_herring + # Forbid secret witches: that's *too* much of a red herring. + any_secret = { type = secret_witch } + } + } + save_scope_as = scarlet_herring + } + } + # Then hand out suspect tags at random, so that it's not just always scope:suspect_a. + ## First, sort scope:culprit. + scope:culprit = { fp1_0111_randomise_sorcerer_identity_effect = yes } + ## Next, scope:red_herring. + scope:red_herring = { fp1_0111_randomise_sorcerer_identity_effect = yes } + ## If we have a scope:discountable, finish with them. + if = { + limit = { exists = scope:discountable } + scope:discountable = { fp1_0111_randomise_sorcerer_identity_effect = yes } + } + ## Otherwise, it's scope:scarlet_herring's turn. + else = { + scope:scarlet_herring = { fp1_0111_randomise_sorcerer_identity_effect = yes } + } + # Process clues. + scope:culprit = { + # First, we pick one of scope:culprit's skills to examine. + ## The base is just a straight 50:50 shot between intrigue & learning, but we weight it a list by education. + random_list = { + # Intrigue. + 1000 = { + save_scope_value_as = { + name = clue_skill + value = flag:intrigue + } + # Weight up for education. + modifier = { + add = 250 + has_trait_rank = { + trait = education_intrigue + rank = 1 + } + } + modifier = { + add = 500 + has_trait_rank = { + trait = education_intrigue + rank = 2 + } + } + modifier = { + add = 750 + has_trait_rank = { + trait = education_intrigue + rank = 3 + } + } + modifier = { + add = 1000 + has_trait_rank = { + trait = education_intrigue + rank >= 4 + } + } + } + # Learning. + 1000 = { + save_scope_value_as = { + name = clue_skill + value = flag:learning + } + # Weight up for education. + modifier = { + add = 250 + has_trait_rank = { + trait = education_learning + rank = 1 + } + } + modifier = { + add = 500 + has_trait_rank = { + trait = education_learning + rank = 2 + } + } + modifier = { + add = 750 + has_trait_rank = { + trait = education_learning + rank = 3 + } + } + modifier = { + add = 1000 + has_trait_rank = { + trait = education_learning + rank >= 4 + } + } + } + } + # Then, we want to look through their traits and pick a first pair to comment on. + ## Eight options of 12.5% each. + random_list = { + # Lazy or arbitrary + 125 = { + trigger = { + OR = { + has_trait = lazy + has_trait = arbitrary + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:lazy_or_arbitrary + } + } + # Wrathful or impatient. + 125 = { + trigger = { + OR = { + has_trait = wrathful + has_trait = impatient + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:wrathful_or_impatient + } + } + # Calm or patient. + 125 = { + trigger = { + OR = { + has_trait = calm + has_trait = patient + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:calm_or_patient + } + } + # Sadistic or arrogant. + 125 = { + trigger = { + OR = { + has_trait = sadistic + has_trait = arrogant + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:sadistic_or_arrogant + } + } + # Callous or ambitious. + 125 = { + trigger = { + OR = { + has_trait = callous + has_trait = ambitious + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:callous_or_ambitious + } + } + # Deceitful or craven. + 125 = { + trigger = { + OR = { + has_trait = deceitful + has_trait = craven + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:deceitful_or_craven + } + } + # Brave or trusting. + 125 = { + trigger = { + OR = { + has_trait = brave + has_trait = trusting + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:brave_or_trusting + } + } + # Paranoid or vengeful. + 125 = { + trigger = { + OR = { + has_trait = paranoid + has_trait = vengeful + } + } + save_scope_value_as = { + name = clue_trait_1 + value = flag:paranoid_or_vengeful + } + } + } + # Finally, pick a secondary trait pairing. + ## Technically eight options of 12.5% each, but one of these is discounted for the first pairing, so it's actually seven pairings of 14.3% each. + random_list = { + # Lazy or arbitrary + 125 = { + trigger = { + OR = { + has_trait = lazy + has_trait = arbitrary + } + NOT = { scope:clue_trait_1 = flag:lazy_or_arbitrary } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:lazy_or_arbitrary + } + } + # Wrathful or impatient. + 125 = { + trigger = { + OR = { + has_trait = wrathful + has_trait = impatient + } + NOT = { scope:clue_trait_1 = flag:wrathful_or_impatient } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:wrathful_or_impatient + } + } + # Calm or patient. + 125 = { + trigger = { + OR = { + has_trait = calm + has_trait = patient + } + NOT = { scope:clue_trait_1 = flag:calm_or_patient } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:calm_or_patient + } + } + # Sadistic or arrogant. + 125 = { + trigger = { + OR = { + has_trait = sadistic + has_trait = arrogant + } + NOT = { scope:clue_trait_1 = flag:sadistic_or_arrogant } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:sadistic_or_arrogant + } + } + # Callous or ambitious. + 125 = { + trigger = { + OR = { + has_trait = callous + has_trait = ambitious + } + NOT = { scope:clue_trait_1 = flag:callous_or_ambitious } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:callous_or_ambitious + } + } + # Deceitful or craven. + 125 = { + trigger = { + OR = { + has_trait = deceitful + has_trait = craven + } + NOT = { scope:clue_trait_1 = flag:deceitful_or_craven } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:deceitful_or_craven + } + } + # Brave or trusting. + 125 = { + trigger = { + OR = { + has_trait = brave + has_trait = trusting + } + NOT = { scope:clue_trait_1 = flag:brave_or_trusting } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:brave_or_trusting + } + } + # Paranoid or vengeful. + 125 = { + trigger = { + OR = { + has_trait = paranoid + has_trait = vengeful + } + NOT = { scope:clue_trait_1 = flag:paranoid_or_vengeful } + } + save_scope_value_as = { + name = clue_trait_2 + value = flag:paranoid_or_vengeful + } + } + } + } + # Aaaaaaand make scope:culprit an actual witch. + hidden_effect = { + scope:culprit = { give_witch_secret_or_trait_effect = yes } + } + } + + # Scope:suspect_a, clearly. + option = { + name = fp1_yearly.0111.a + + # Display tooltip & apply effects. + fp1_0111_select_accusation_effect = { CHARACTER = scope:suspect_a } + + stress_impact = { + paranoid = major_stress_impact_loss + zealous = major_stress_impact_loss + trusting = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # Scope:suspect_b, I think... + option = { + name = fp1_yearly.0111.b + + # Display tooltip & apply effects. + fp1_0111_select_accusation_effect = { CHARACTER = scope:suspect_b } + + stress_impact = { + paranoid = major_stress_impact_loss + zealous = major_stress_impact_loss + trusting = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # Sounds like scope:suspect_c! + option = { + name = fp1_yearly.0111.c + + # Display tooltip & apply effects. + fp1_0111_select_accusation_effect = { CHARACTER = scope:suspect_c } + + stress_impact = { + paranoid = major_stress_impact_loss + zealous = major_stress_impact_loss + trusting = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = paranoid + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # Scope:accursed, it's all in your mind, alright? + option = { + name = fp1_yearly.0111.d + trigger = { + NOT = { has_trait = witch } + } + + # Diplomacy challenge to convince scope:accursed that the nithing pole means nothing. + duel = { + skill = diplomacy + target = scope:accursed + # You talk them down. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0111.d.tt_success + send_interface_toast = { + title = fp1_yearly.0111.d.tt_success + left_icon = scope:accursed + # Gain a favour if possible. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:accursed + } + } + add_hook = { + type = favor_hook + target = scope:accursed + years = 20 + } + } + # And always a lot of opinion. + reverse_add_opinion = { + target = scope:accursed + modifier = trust_opinion + opinion = 50 + } + # Plus a decent chunk of prestige. + add_prestige = medium_prestige_gain + } + } + # They freak the hell out. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0111.d.tt_failure + send_interface_toast = { + title = fp1_yearly.0111.d.tt_failure + left_icon = scope:accursed + # Scope:accursed has a melt-down. + scope:accursed = { fp1_0111_accursed_receives_curse_effect = yes } + } + } + } + + stress_impact = { + trusting = major_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_zeal = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -30 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + # (Witch) Worry not, I have a counter-spell. + option = { + name = fp1_yearly.0111.e + trigger = { has_trait = witch } + trait = witch + + # Gain a favour if possible. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:accursed + } + } + add_hook = { + type = favor_hook + target = scope:accursed + years = 20 + } + } + # And always a lot of opinion. + reverse_add_opinion = { + target = scope:accursed + modifier = trust_opinion + opinion = 50 + } + # Plus a decent chunk of prestige. + add_prestige = medium_prestige_gain + + stress_impact = { + trusting = major_stress_impact_loss + cynical = major_stress_impact_loss + paranoid = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_zeal = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = trusting + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -30 + has_trait = paranoid + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } +} + + + + + + + + + + + + +################################################## +# FLAVOUR YEARLIES + +################################################## +# FLAVOUR YEARLIES EFFECTS + +scripted_effect fp1_pick_outdoorsy_child_for_winter_effect = { + random_child = { + # Try to pick an outdoorsy child first. + limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + OR = { + childhood_loud_child_trigger = yes + childhood_nice_child_trigger = yes + } + } + # Otherwise, any is good. + alternative_limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + } + save_scope_as = child + } +} + +################################################## +# Out for a Sail +# by Ewan Cowhig Croft +# 0501 - 0510 +################################################## + +# You encounter a distressed raiding vessel whilst out sailing. +fp1_yearly.0501 = { + type = character_event + title = fp1_yearly.0501.t + desc = fp1_yearly.0501.desc + theme = realm + left_portrait = { + character = root + animation = shock + } + override_background = { reference = fp1_ocean_norse } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0501 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for having sea-faring traits. + modifier = { + add = 0.5 + has_trait = viking + } + modifier = { + add = 0.5 + has_trait = adventurer + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0501 + days = 1825 + } + # Generate a gender for the fisher people. + random_dummy_gender_soldier_effect = { SCOPE_NAME = fisherpeople } + } + + # Stop and try to help them! + option = { + name = fp1_yearly.0501.a + + # Martial duel to organise your sailors. + duel = { + skill = martial + value = 10 + # You succeed in saving the crew and some of their haul! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0501.a.tt_success + send_interface_toast = { + title = fp1_yearly.0501.a.tt_success + left_icon = root + add_prestige = medium_prestige_gain + } + } + # You fail, and many are lost to the storm. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0501.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0501.a.tt_failure + left_icon = root + add_prestige = miniscule_prestige_loss + } + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + lazy = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.75 + ai_energy = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight up for stress. + add = 20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = sadistic + } + } + } + + # Salvage the cargo, kill the survivors. + option = { + name = fp1_yearly.0501.b + + # Prowess duel to storm the boat. + duel = { + skill = prowess + value = 10 + # You storm the boat easily. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0501.b.tt_success + send_interface_toast = { + title = fp1_yearly.0501.b.tt_success + left_icon = root + add_gold = minor_gold_value + } + } + # Survivors slip to shore. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0501.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0501.b.tt_failure + left_icon = root + add_gold = minor_gold_value + add_tyranny = minor_tyranny_gain + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.25 + ai_compassion = -0.5 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = greedy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } + + # Sail on by. + option = { + name = fp1_yearly.0501.c + + # Minor dread gain from your crew. + add_dread = miniscule_dread_gain + + stress_impact = { + lazy = minor_stress_impact_loss + callous = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + diligent = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + } + } +} + +################################################## +# The Stench of Success +# by Ewan Cowhig Croft +# 0511 - 0520 +################################################## + +scripted_trigger fp1_keeps_stinking_hunting_trophy = { + # Standard checks. + is_available_ai_adult = yes + # Do they have the right personality? + calc_true_if = { + amount >= 2 + has_trait = greedy + has_trait = lazy + has_trait = wrathful + has_trait = arrogant + has_trait = brave + has_trait = gregarious + has_trait = ambitious + has_trait = callous + has_trait = sadistic + has_trait = stubborn + has_trait = vengeful + } + NOR = { + has_trait = diligent + has_trait = humble + has_trait = shy + has_trait = fickle + } + # Filter out anyone who'd be a better hunter than this. + NOR = { + has_trait = lifestyle_hunter + has_court_position = master_of_hunt_court_position + } + # Finally, remove people who are currently hurt, so that berserkers can smash 'em up. + NOT = { has_trait = wounded } +} + +# One of your courtiers is extremely proud of a hunting trophy and won't let it go. +fp1_yearly.0511 = { + type = character_event + title = fp1_yearly.0511.t + desc = fp1_yearly.0511.desc + theme = hunting + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:stinker + animation = personality_honorable + } + override_background = { reference = study } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0511 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + fp1_is_in_scandinavia_or_colonies = yes + # Must have a suitable random courtier. + any_courtier = { fp1_keeps_stinking_hunting_trophy = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for special traits. + modifier = { + add = 0.5 + has_trait = lifestyle_hunter + } + modifier = { + add = 0.5 + has_trait = berserker + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0511 + days = 1825 + } + # Designate a suitable courtier. + random_courtier = { + # Try to grab someone relevant. + limit = { + fp1_keeps_stinking_hunting_trophy = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + # Otherwise, any valid character will do. + alternative_limit = { fp1_keeps_stinking_hunting_trophy = yes } + save_scope_as = stinker + } + # Pick a local animal for the head to be from. + select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + # Give them the trophy. + scope:stinker = { + add_character_modifier = { + modifier = fp1_0511_carries_stinking_trophy_modifier + years = 5 + } + } + } + + # It's very nice, scope:stinker. So very, very nice. + option = { + name = fp1_yearly.0511.a + + # Scope:stinker is very happy with you. + reverse_add_opinion = { + target = scope:stinker + modifier = pleased_opinion + opinion = 75 + } + # Everyone else is not. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + this != scope:stinker + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + patient = minor_stress_impact_loss + shy = medium_stress_impact_loss + impatient = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_sociability = -0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = deceitful + } + modifier = { # Weight up for stress. + add = 10 + has_trait = patient + } + modifier = { # Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = honest + } + } + } + + # [HighGod], [HealthGod], and [FortuneGod] too, get *rid* of it! + option = { + name = fp1_yearly.0511.b + + # Scope:stinker is incredibly upset. + reverse_add_opinion = { + target = scope:stinker + modifier = cruelty_opinion + opinion = -50 + } + scope:stinker = { remove_character_modifier = fp1_0511_carries_stinking_trophy_modifier } + # Everyone else is not. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + this != scope:stinker + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + impatient = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + patient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_sociability = 0.25 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = wrathful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -20 + has_trait = patient + } + } + } + + # (Berserker) root SMASH! + option = { + name = fp1_yearly.0511.c + trigger = { has_trait = berserker } + trait = berserker + + # Scope:stinker is incredibly upset. + reverse_add_opinion = { + target = scope:stinker + modifier = cruelty_opinion + opinion = -75 + } + scope:stinker = { remove_character_modifier = fp1_0511_carries_stinking_trophy_modifier } + # Scope:stinker will remember this. + progress_towards_rival_effect = { + REASON = rival_berserker_smash + CHARACTER = scope:stinker + OPINION = 0 + } + # But man, wasn't that *therapeutic*? + ## Stress loss handled in stress_impact. + + stress_impact = { + berserker = massive_stress_loss + impatient = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = impatient + } + modifier = { # Weight up for stress. + add = 10 + has_trait = wrathful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = calm + } + } + } + + # (Hunter) How about we get you a *new* trophy this eve? + option = { + name = fp1_yearly.0511.d + # Elite hunters who don't fly off the handle. + trigger = { + has_trait = lifestyle_hunter + NOT = { has_trait = berserker } + } + trait = lifestyle_hunter + + # Scope:stinker benefits. + scope:stinker = { + # They're happy with you. + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 50 + } + # And won't make the same mistake. + add_trait = lifestyle_hunter + # Plus they ditch the old trophy. + remove_character_modifier = fp1_0511_carries_stinking_trophy_modifier + } + # Best friends? + progress_towards_friend_effect = { + CHARACTER = scope:stinker + OPINION = 0 + REASON = friend_fp1_stink_new_trophy + } + # Everyone else is just glad the stink is gone. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + this != scope:stinker + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + + + stress_impact = { + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + patient = medium_stress_impact_loss + impatient = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + ai_honor = 0.25 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = compassionate + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 20 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # Yes, scope:stinker, it's rank, now please leave. + option = { + name = fp1_yearly.0511.e + + # Scope:stinker is quite upset. + reverse_add_opinion = { + target = scope:stinker + modifier = cruelty_opinion + opinion = -25 + } + # But people respect you telling it like it is. + add_prestige = minor_prestige_gain + + stress_impact = { + honest = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -20 + has_trait = deceitful + } + } + } + + after = { + remove_variable = animal_type + } +} + +################################################## +# Blood on the Snow +# by Ewan Cowhig Croft +# 0521 - 0530 +################################################## + +# Your child challenges your mastery of snowball warfare. +fp1_yearly.0521 = { + type = character_event + title = fp1_yearly.0521.t + desc = fp1_yearly.0521.desc + theme = war + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:child + animation = personality_bold + } + override_background = { reference = market } + widget = { + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0521 } + is_playable_character = yes + # Must have at least one suitable child. + any_child = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + } + # Gotta have snow in the capital. + character_capital_has_winter_trigger = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for outdoorsy kids. + modifier = { + add = 1 + any_child = { childhood_loud_child_trigger = yes } + } + modifier = { + add = 1 + any_child = { childhood_nice_child_trigger = yes } + } + + # Weight according to winter scale. + character_capital_has_snow_suitable_for_activities = { CHARACTER = root } + } + + immediate = { + play_music_cue = "mx_cue_war_declared" + add_character_flag = { + flag = had_event_fp1_yearly_0521 + days = 1825 + } + # Designate a suitable child. + fp1_pick_outdoorsy_child_for_winter_effect = yes + } + + # Good shot! Come here y'little rascal! + option = { + name = fp1_yearly.0521.a + + # You get into a friendly snowball fight. + custom_tooltip = fp1_yearly.0521.a.tt + # Gain some opinion with them. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 20 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_energy = 0.25 + ai_vengefulness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + } + } + + # Throw a match against them. + option = { + name = fp1_yearly.0521.b + + # You take a dive. + custom_tooltip = fp1_yearly.0521.b.tt + # Gain more opinion. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 40 + } + # But lose a little prestige. + add_prestige = minor_prestige_loss + + stress_impact = { + forgiving = minor_stress_impact_loss + humble = minor_stress_impact_loss + vengeful = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.25 + ai_honor = -0.1 + ai_vengefulness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + } + } + + # Beat them into the ground with superior martial know-how. + option = { + name = fp1_yearly.0521.c + # If you've got berserker, you flip out when taking things too seriously instead. + trigger = { + NOR = { + has_trait = berserker + has_trait = strategist + } + } + + # Confirm to the player. + custom_tooltip = fp1_yearly.0521.c.tt + # Sure would be embarrassing if you lost this snowball fight your voluntarily taking too seriously, amirite? + duel = { + skill = martial + target = scope:child + # You successfully beat the child. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0521.c.tt_success + send_interface_toast = { + title = fp1_yearly.0521.c.tt_success + left_icon = scope:child + # Minor prestige for uhh... your ruthlessness? + add_prestige = minor_prestige_gain + # Scope:child is a bit upset. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -30 + } + } + } + # Scope:child trounces you. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0521.c.tt_failure + send_interface_toast = { + title = fp1_yearly.0521.c.tt_failure + left_icon = scope:child + # Clearly you're taking this *way* too seriously. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = -40 + } + } + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = 0.25 + ai_honor = 0.1 + ai_compassion = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = humble + } + } + } + + # (Strategist) Insta-beat 'em. + option = { + name = fp1_yearly.0521.d + trigger = { + has_trait = strategist + NOT = { has_trait = berserker } + } + trait = strategist + + # Confirm to the player. + custom_tooltip = fp1_yearly.0521.d.tt + # Minor prestige for uhh... your ruthlessness? + add_prestige = minor_prestige_gain + # Scope:child is a bit awed. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = 20 + } + + stress_impact = { + vengeful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + forgiving = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = 0.25 + ai_honor = 0.1 + ai_compassion = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = humble + } + } + } + + # (Berserker) RRRAAAAARRRGGGHHH! + option = { + name = fp1_yearly.0521.e + trigger = { has_trait = berserker } + trait = berserker + + # The snowball triggers your berserk rage. + custom_tooltip = fp1_yearly.0521.e.tt + # Berserkergang relieves stress. + ## Stress loss handled in stress impact. + # Scope:child is *terrified*. + reverse_add_opinion = { + target = scope:child + modifier = scared_opinion + opinion = -100 + } + + stress_impact = { + berserker = massive_stress_loss + impatient = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_compassion = -1 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = impatient + } + modifier = { # Weight up for stress. + add = 10 + has_trait = wrathful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = calm + } + } + } + + # Don't bother parent whilst they're working. Run along. + option = { + name = fp1_yearly.0521.f + + # Welp, that's that dealt with. + add_stress = minor_stress_loss + # Scope:child is mildly hurt. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -10 + } + + # Too gentle a response to give stress, to be honest. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.25 + ai_energy = -0.5 + ai_sociability = -0.75 + } + } + } +} + +################################################## +# [Dynasty] on Ice +# by Ewan Cowhig Croft +# 0531 - 0540 +################################################## + +scripted_trigger fp1_child_not_had_decisive_skating_lessons_trigger = { + NOR = { + has_character_flag = child_had_event_fp1_yearly_0531 + has_character_modifier = fp1_avoiding_the_snow_modifier + } +} + +# Teaching your Child to Ice Skate +fp1_yearly.0531 = { + type = character_event + title = fp1_yearly.0531.t + desc = fp1_yearly.0531.desc + theme = education + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:child + animation = shame + } + override_background = { reference = courtyard } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0531 } + is_playable_character = yes + # Must be a suitable culture. + culture_uses_frequent_winter_transportation_trigger = yes + # Must have at least one suitable child. + any_child = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # Can't have successfully learnt/been encouraged away from already. + fp1_child_not_had_decisive_skating_lessons_trigger = yes + } + # Gotta have snow in the capital. + character_capital_has_winter_trigger = yes + } + + weight_multiplier = { + base = 1 + + # Weight up for outdoorsy kids. + modifier = { + add = 1 + any_child = { childhood_loud_child_trigger = yes } + } + modifier = { + add = 1 + any_child = { childhood_nice_child_trigger = yes } + } + + # Weight according to winter scale. + character_capital_has_snow_suitable_for_activities = { CHARACTER = root } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0531 + days = 1825 + } + # Pick a suitable child; this is a slightly modified fp1_pick_outdoorsy_child_for_winter, as we need to filter out a few things. + random_child = { + # Try to pick an outdoorsy child first. + limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + OR = { + has_trait = rowdy + childhood_loud_child_trigger = yes + childhood_nice_child_trigger = yes + } + # Can't have successfully learnt/been encouraged away from already. + fp1_child_not_had_decisive_skating_lessons_trigger = yes + } + # Otherwise, any is good. + alternative_limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # Can't have successfully learnt/been encouraged away from already. + fp1_child_not_had_decisive_skating_lessons_trigger = yes + } + save_scope_as = child + } + } + + # It's easy! Alright, you can watch me... + option = { + name = fp1_yearly.0531.a + + duel = { + skill = diplomacy + value = 10 + # You successfully explain what's up to scope:child. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0531.a.tt_success + send_interface_toast = { + title = fp1_yearly.0531.a.tt_success + left_icon = scope:child + scope:child = { + # Gain some opinion with them. + add_opinion = { + target = root + modifier = love_opinion + opinion = 20 + } + # And this boosts their confidence & balance. + add_prowess_skill = medium_skill_bonus + add_diplomacy_skill = medium_skill_bonus + # Flag them as having learnt and not needing to learn again. + add_character_flag = { + flag = child_had_event_fp1_yearly_0531 + years = 20 + } + } + } + } + # You just frustrate them further. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0531.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0531.a.tt_failure + left_icon = scope:child + # They grow frustrated. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = -20 + } + scope:child = { add_stress = major_stress_gain } + } + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_energy = 0.5 + ai_compassion = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + } + } + + # Don't we have maids for you to pester? + option = { + name = fp1_yearly.0531.b + + # You focus on your work. + add_character_modifier = { + modifier = fp1_focusing_on_rule_modifier + years = 10 + } + # They grow frustrated. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -40 + } + # And will remember this in later life. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:child } + } + set_relation_potential_rival = scope:child + } + } + + stress_impact = { + callous = minor_stress_impact_loss + lazy = major_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_energy = -0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Play indoors, you'll catch the cold. + option = { + name = fp1_yearly.0531.c + + # Your advice is taken. + scope:child = { + add_character_modifier = { + modifier = fp1_avoiding_the_snow_modifier + years = 10 + } + } + # They're a tad bummed though. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -20 + } + + stress_impact = { + cynical = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } +} + +################################################## +# The Beast of [Capital] +# by Ewan Cowhig Croft +# 0541 - 0550 +################################################## + +scripted_trigger fp1_0541_valid_child_prankster_trigger = { + # Is available for events. + is_available_ai_child = yes + # Child is in the correct age bracket. + child_not_infant_trigger = yes + child_not_teen_trigger = yes + # Must not be a quiet child. + childhood_quiet_child_trigger = no +} + +scripted_trigger fp1_0541_valid_courtier_victim_trigger = { + # Is available for events. + is_available_ai_adult = yes + # Isn't especially brave or good at dealing with kids. + NOR = { + has_trait = calm + has_trait = patient + has_trait = humble + has_trait = brave + has_trait = shy + has_trait = gregarious + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + } + # And, in case you act disproportionately, they aren't a good relationship. + has_friendly_relationship_with_root_trigger = no +} + +# Young child with animal furs is pretending to be a large animal. +fp1_yearly.0541 = { + type = character_event + title = fp1_yearly.0541.t + desc = fp1_yearly.0541.desc + theme = family + left_portrait = { + character = scope:courtier + animation = rage + } + right_portrait = { + character = scope:child + animation = schadenfreude + } + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0541 } + is_landed = yes + # Intended for Norse-ish tribals. + fp1_is_norse_tribal = yes + fp1_is_in_scandinavia_or_colonies = yes + # Has a valid child. + any_child = { fp1_0541_valid_child_prankster_trigger = yes } + # Has a valid courtier. + any_courtier = { fp1_0541_valid_courtier_victim_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up for active/mean kids. + modifier = { + add = 1 + any_child = { childhood_loud_child_trigger = yes } + } + modifier = { + add = 1 + any_child = { childhood_mean_child_trigger = yes } + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0541 + days = 1825 + } + # Pick an appropriate child. + random_child = { + # Prefer rowdy or mean-spirited children. + limit = { + fp1_0541_valid_child_prankster_trigger = yes + OR = { + childhood_loud_child_trigger = yes + childhood_mean_child_trigger = yes + } + } + # Though otherwise any valid child is acceptable. + alternative_limit = { fp1_0541_valid_child_prankster_trigger = yes } + save_scope_as = child + } + # And an appropriate courtier. + random_courtier = { + limit = { + fp1_0541_valid_courtier_victim_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { fp1_0541_valid_courtier_victim_trigger = yes } + save_scope_as = courtier + } + select_local_animal_effect = { TYPE = dangerous } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + + # This is honestly just bloody hilarious. + option = { + name = fp1_yearly.0541.a + + # Scope:child is pretty damned happy. + reverse_add_opinion = { + target = scope:child + modifier = amused_opinion + opinion = 40 + } + # Scope:courtier loses opinion, though. + reverse_add_opinion = { + target = scope:courtier + modifier = respect_opinion + opinion = -50 + } + # Other courtiers are sceptical. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + NOR = { + this = scope:child + this = scope:courtier + } + } + add_opinion = { + target = root + modifier = amused_opinion + opinion = -10 + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_vengefulness = 0.25 + ai_sociability = 0.25 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + } + } + + # Punish scope:child. + option = { + name = fp1_yearly.0541.b + + # Scope:courtier is happy, and you gain a favour hook if possible. + if = { + limit = { + can_add_hook = { + type = favor_hook + target = scope:courtier + } + } + add_hook = { + type = favor_hook + target = scope:courtier + years = 5 + } + } + reverse_add_opinion = { + target = scope:courtier + modifier = pleased_opinion + opinion = 20 + } + # Scope:child is upset. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -30 + } + + stress_impact = { + just = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_honor = 0.25 + ai_vengefulness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = just + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + } + } + + # Evict scope:courtier. + option = { + name = fp1_yearly.0541.c + + # Scope:child is very happy. + reverse_add_opinion = { + target = scope:child + modifier = amused_opinion + opinion = 30 + } + # Scope:courtier is gobsmacked, might become a rival, and leaves. + reverse_add_opinion = { + target = scope:courtier + modifier = respect_opinion + opinion = -30 + } + scope:child = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_harassed_exiled + CHARACTER = scope:courtier + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + scope:courtier = { select_and_move_to_pool_effect = yes } + + stress_impact = { + arbitrary = major_stress_impact_loss + just = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -0.5 + ai_rationality = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + } + } + + # I really, profoundly do not care. + option = { + name = fp1_yearly.0541.d + + # Gain a little prestige for telling them to sod off. + add_prestige = minor_prestige_gain + # Both scope:child & scope:courtier are a tad upset. + reverse_add_opinion = { + target = scope:courtier + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + lazy = medium_stress_impact_loss + just = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } +} + +################################################## +# Fishy Business +# by Ewan Cowhig Croft +# 0551 - 0560 +################################################## + +scripted_trigger fp1_0551_appropriately_smelly_courtier_trigger = { + # Standard checks. + is_available_ai_adult = yes + # Must have some quality that's inspired this odd attitude. + OR = { + # Enjoys eating oddities. + has_trait = lifestyle_hunter + has_trait = gluttonous + has_trait = vengeful + # Weird health foods. + has_trait = whole_of_body + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + # Refuses to admit wrong-doing. + has_trait = arrogant + has_trait = stubborn + has_trait = sadistic + } + # And nothing that would rule it out. + NOR = { + has_trait = temperate + has_trait = fickle + has_trait = compassionate + } +} + +# One of your courtiers has taken a liking to foul food stuffs. +fp1_yearly.0551 = { + type = character_event + title = fp1_yearly.0551.t + desc = fp1_yearly.0551.desc + theme = unfriendly + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:antisocialite + animation = personality_greedy + } + override_background = { reference = feast } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0551 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + fp1_is_in_scandinavia = yes + # Has a suitable courtier. + any_courtier = { fp1_0551_appropriately_smelly_courtier_trigger = yes } + } + + weight_multiplier = { base = 1 } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0551 + days = 1825 + } + # Grab an appropriate courtier. + random_courtier = { + limit = { + fp1_0551_appropriately_smelly_courtier_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { fp1_0551_appropriately_smelly_courtier_trigger = yes } + save_scope_as = antisocialite + } + } + + # Let's have a chat. + option = { + name = fp1_yearly.0551.a + + # See if you can politely convince scope:antisocialite to be a bit more respectful. + duel = { + skill = diplomacy + target = scope:antisocialite + # You put your point across eloquently. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -45 + } + desc = fp1_yearly.0551.a.tt_success + send_interface_toast = { + title = fp1_yearly.0551.a.tt_success + left_icon = scope:antisocialite + reverse_add_opinion = { + target = scope:antisocialite + modifier = respect_opinion + opinion = 20 + } + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + # And a bit of prestige to sweeten the pot. + add_prestige = minor_prestige_gain + } + } + # Scope:socialite is incredibly insulted. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -45 + } + desc = fp1_yearly.0551.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0551.a.tt_failure + left_icon = scope:antisocialite + reverse_add_opinion = { + target = scope:antisocialite + modifier = insult_opinion + opinion = -40 + } + progress_towards_rival_effect = { + REASON = rival_smells_of_fish + CHARACTER = scope:antisocialite + OPINION = 0 + } + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + honest = minor_stress_impact_loss + shy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + ai_rationality = 0.25 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + } + } + + # Perhaps I could simply move my quarters further away? + option = { + name = fp1_yearly.0551.b + trigger = { + NOT = { has_trait = gluttonous } + } + + # Make it clear that scope:antisocialite will continue their smelly rampage. + custom_tooltip = fp1_yearly.0551.b.tt + # Gain a weak hook on the courtier. + if = { + limit = { + can_add_hook = { + target = scope:antisocialite + type = favor_hook + years = 5 + } + } + add_hook = { + target = scope:antisocialite + type = favor_hook + years = 5 + } + } + # And some opinion. + reverse_add_opinion = { + target = scope:antisocialite + modifier = grateful_opinion + opinion = 30 + } + # Lose a bit of respect with everyone else. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + # Speedily filter out the root cause. + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + } + + stress_impact = { + arbitrary = medium_stress_impact_loss + shy = major_stress_impact_loss + honest = minor_stress_impact_gain + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_rationality = -0.5 + ai_sociability = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 30 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -30 + has_trait = gregarious + } + } + } + + # (Gluttonous) Do... do you have any more of that? + option = { + name = fp1_yearly.0551.b_alt + trigger = { has_trait = gluttonous } + trait = gluttonous + + # Make it clear that scope:antisocialite will continue their smelly rampage. + custom_tooltip = fp1_yearly.0551.b_alt.tt + # Gain a strong hook on the courtier. + if = { + limit = { + can_add_hook = { + target = scope:antisocialite + type = loyalty_hook + } + } + add_hook = { + target = scope:antisocialite + type = loyalty_hook + } + } + # Become friends, if possible. + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:antisocialite } + } + set_relation_friend = { reason = friend_delectable_herring target = scope:antisocialite } + } + # And some opinion. + reverse_add_opinion = { + target = scope:antisocialite + modifier = respect_opinion + opinion = 50 + } + # Lose a *fair* of respect with everyone else. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + # Speedily filter out the root cause. + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -40 + } + } + + stress_impact = { + arbitrary = medium_stress_impact_loss + shy = major_stress_impact_loss + honest = minor_stress_impact_gain + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_rationality = -0.5 + ai_sociability = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 30 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -30 + has_trait = gregarious + } + } + } + + # You know what? Dungeon. *Now*. + option = { + name = fp1_yearly.0551.c + + # No one objects to the imprisonment. + rightfully_imprison_character_effect = { + TARGET = scope:antisocialite + IMPRISONER = root + } + hidden_effect = { + scope:antisocialite = { change_prison_type = dungeon } + } + # Immediate gratitude from your courtiers et al. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + # Speedily filter out the root cause. + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -0.5 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + modifier = { # Weight down for stress. + add = -20 + has_trait = compassionate + } + } + } + + # What a shame, it seems my attention is required *far* away. + option = { + name = fp1_yearly.0551.d + + # What a relief. + ## Stress loss handled in stress_impact. + # Lose a bit of respect with everyone else. + every_courtier_or_guest = { + custom = custom.every_courtier_and_guest + # Speedily filter out the root cause. + limit = { + this != scope:antisocialite + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -10 + } + } + # Gain a mild modifier. + add_character_modifier = { + modifier = fp1_yearly_0551_absent_lord_modifier + years = 5 + } + + stress_impact = { + base = major_stress_loss + shy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = -0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = gregarious + } + } + } +} + +################################################## +# My Arm Against Yours +# by Ewan Cowhig Croft +# 0561 - 0570 +################################################## + +scripted_trigger fp1_0561_is_friendly_knight_trigger = { + # Standard checks. + is_available_ai_adult = yes + is_landed = no + # Has some sociable qualities. + OR = { + ai_sociability >= low_positive_ai_value + ai_boldness >= low_positive_ai_value + ai_energy >= low_positive_ai_value + ai_honor >= low_positive_ai_value + has_trait = wrathful + has_trait = arrogant + has_trait = brave + has_trait = gregarious + has_trait = ambitious + has_trait = lifestyle_reveler + } + # No special relationship with root. + has_any_good_relationship_with_root_trigger = no + has_any_bad_relationship_with_root_trigger = no + # Doesn't absolutely hate root. + opinion = { + target = root + value >= low_negative_opinion + } +} + +# One of your knights challenges you to a friendly arm wrestle. +fp1_yearly.0561 = { + type = character_event + title = fp1_yearly.0561.t + desc = fp1_yearly.0561.desc + theme = friendly + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:knight + animation = admiration + } + override_background = { reference = tavern } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0561 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + # Has an appropriate available knight. + any_knight = { fp1_0561_is_friendly_knight_trigger = yes } + # Must be a suitable challengee. + prowess >= mediocre_skill_rating + is_healthy = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + + weight_multiplier = { + base = 1 + + # Weight down/up a little according to prowess. + modifier = { + add = -0.25 + prowess <= low_skill_rating + } + modifier = { + add = -0.25 + prowess <= mediocre_skill_rating + } + modifier = { + add = 0.25 + prowess >= high_skill_rating + } + modifier = { + add = 0.25 + prowess >= very_high_skill_rating + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0561 + days = 1825 + } + # Grab an appropriate knight to wrassle. + random_knight = { + limit = { + fp1_0561_is_friendly_knight_trigger = yes + is_of_major_or_minor_interest_trigger = { CHARACTER = root } + } + alternative_limit = { fp1_0561_is_friendly_knight_trigger = yes } + # We want to weight up higher prowess knights, but not that dramatically. + weight = { + base = 0 + modifier = { + add = { + value = prowess + multiply = 0.5 + } + } + } + save_scope_as = knight + } + } + + # Accept the challenge. + option = { + name = fp1_yearly.0561.a + trigger = { + NOR = { + has_trait = strong + has_trait = physique_good + } + } + + # Basic prowess challenge. + duel = { + skill = prowess + target = scope:knight + # You win: some minor prestige, more opinion. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0561.a.tt_success + send_interface_toast = { + title = fp1_yearly.0561.a.tt_success + left_icon = scope:knight + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:knight + modifier = impressed_opinion + opinion = 30 + } + } + } + # You lose: well, not a huge deal, and still good fun. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0561.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0561.a.tt_failure + left_icon = scope:knight + add_prestige = miniscule_prestige_loss + reverse_add_opinion = { + target = scope:knight + modifier = amused_opinion + opinion = 10 + } + } + } + } + # Either way you step friendship. + progress_towards_friend_effect = { + CHARACTER = scope:knight + OPINION = 0 + REASON = friend_arm_wrestled + } + + stress_impact = { + gregarious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_honor = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + } + } + + # (Strong/Physique_Good) *cracks knuckles* + option = { + name = fp1_yearly.0561.b + trigger = { + OR = { + has_trait = strong + has_trait = physique_good + } + } + trait = strong + trait = physique_good_1 + trait = physique_good_2 + trait = physique_good_3 + + # Effortless victory grants prestige & opinion. + custom_tooltip = fp1_yearly.0561.b.tt + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:knight + modifier = impressed_opinion + opinion = 30 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_honor = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = shy + } + } + } + + # Attempt to cheat. + option = { + name = fp1_yearly.0561.c + + # Modest intrigue challenge. + duel = { + skill = intrigue + target = scope:knight + # You win, making it look *dramatic*! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0561.c.tt_success + send_interface_toast = { + title = fp1_yearly.0561.c.tt_success + left_icon = scope:knight + # Gain prestige for your win! + add_prestige = medium_prestige_gain + # But your foe might know something... + reverse_add_opinion = { + target = scope:knight + modifier = suspicion_opinion + opinion = -5 + } + } + } + # Your cheating is discovered... + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0561.c.tt_failure + send_interface_toast = { + title = fp1_yearly.0561.c.tt_failure + left_icon = scope:knight + # This is embarrassing. + add_prestige = minor_prestige_loss + # Welp, scope:knight is pissed. + reverse_add_opinion = { + target = scope:knight + modifier = weak_opinion + opinion = -40 + } + progress_towards_rival_effect = { + REASON = rival_cheated_at_armwrestle + CHARACTER = scope:knight + OPINION = 0 + } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = deceitful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = honest + } + } + } + + # Ignore scope:knight and continue eating. + option = { + name = fp1_yearly.0561.d + + # Gain minor prestige for just not bothering. + add_prestige = miniscule_prestige_gain + # Hurt the knight's feelings a little. + reverse_add_opinion = { + target = scope:knight + modifier = hurt_opinion + opinion = -10 + } + + stress_impact = { + arrogant = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + shy = medium_stress_impact_loss + lazy = medium_stress_impact_loss + humble = minor_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -0.75 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gluttonous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = humble + } + modifier = { # Weight down for stress. + add = -20 + has_trait = gregarious + } + } + } +} + +################################################## +# Petty Vandalism +# by Ewan Cowhig Croft +# 0571 - 0580 +################################################## + +scripted_trigger fp1_0571_suitable_vandal_child_available_trigger = { + # Is available for events. + is_available_ai_child = yes + # Child is old enough to have travelled that far. + age >= 10 + # Must not be a quiet child. + childhood_quiet_child_trigger = no +} + +scripted_trigger fp1_0571_suitable_annoyed_courtier_trigger = { + # Is available for events. + is_available_ai_adult = yes + # Likely to be annoyed at the vandalism. + NOR = { + has_trait = calm + has_trait = patient + has_trait = shy + has_trait = craven + has_trait = arbitrary + has_trait = fickle + has_trait = lazy + has_trait = trusting + } +} + +scripted_trigger fp1_0571_suitable_vandal_site_trigger = { + tier = tier_county + fp1_county_has_stele_trigger = yes + squared_distance = { + target = root.capital_county + value <= squared_distance_small + } +} + +# A runestone in your lands has been damaged by one of your children. +fp1_yearly.0571 = { + type = character_event + title = fp1_yearly.0571.t + desc = fp1_yearly.0571.desc + theme = family + left_portrait = { + character = scope:courtier + animation = disapproval + } + right_portrait = { + character = scope:child + animation = shame + } + override_background = { reference = fp1_runestone } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0571 } + is_landed_or_landless_administrative = yes + # Filter to flavour-appropriate characters. + fp1_is_norse = yes + # Must have an appropriate runestone in your territory. + any_held_title = { fp1_0571_suitable_vandal_site_trigger = yes } + # A valid child. + any_child = { fp1_0571_suitable_vandal_child_available_trigger = yes } + # And a courtier who might not appreciate things. + any_courtier = { fp1_0571_suitable_annoyed_courtier_trigger = yes } + + } + + weight_multiplier = { + base = 1 + + # If you're setting a good example, kids are less likely to imitate. + modifier = { + add = 0.5 + has_trait = just + } + # And the reverse. + modifier = { + add = -0.5 + has_trait = arbitrary + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0571 + days = 1825 + } + # Select a runestone location. + random_held_title = { + limit = { fp1_0571_suitable_vandal_site_trigger = yes } + save_scope_as = vandal_site + } + # Grab a suitable child. + random_child = { + # Prefer rowdy or mean-spirited children. + limit = { + fp1_0541_valid_child_prankster_trigger = yes + OR = { + childhood_loud_child_trigger = yes + childhood_mean_child_trigger = yes + } + } + # Though otherwise any valid child is acceptable. + alternative_limit = { fp1_0571_suitable_vandal_child_available_trigger = yes } + save_scope_as = child + } + # And the courtier. + random_courtier = { + # Try to get someone who dislikes the child first. + limit = { + fp1_0571_suitable_annoyed_courtier_trigger = yes + opinion = { + target = scope:child + value <= neutral_opinion + } + } + # Otherwise, whoever is fine. + alternative_limit = { fp1_0571_suitable_annoyed_courtier_trigger = yes } + save_scope_as = courtier + } + # Quietly make the two potential rivals for later. + hidden_effect = { + if = { + limit = { + scope:child = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:courtier } + } + } + scope:child = { set_relation_potential_rival = scope:courtier } + } + } + } + + # Look, you can't be defacing expensive monuments, 'kay? + option = { + name = fp1_yearly.0571.a + + # Diplomacy challenge to persuade the child. + duel = { + skill = diplomacy + target = scope:child + # Child sees how they've gone wrong. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0571.tt_success + send_interface_toast = { + title = fp1_yearly.0571.tt_success + left_icon = scope:child + # If the child's personality can accept it, make them honourable. + scope:child = { + if = { + limit = { + number_of_personality_traits < personality_trait_standard + NOR = { + has_trait = arbitrary + has_trait = just + } + } + add_trait = just + } + } + # Otherwise, just give opinion. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = 30 + } + } + } + # Child doesn't understand what the issue even is. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0571.tt_failure + send_interface_toast = { + title = fp1_yearly.0571.tt_failure + left_icon = scope:child + # If the child's personality can accept it, make them arbitrary. + scope:child = { + if = { + limit = { + number_of_personality_traits < personality_trait_standard + NOT = { has_trait = just } + } + add_trait = arbitrary + } + } + # Otherwise, just give opinion. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = -20 + } + } + } + } + # Courtier is satisfied that something has been done. + reverse_add_opinion = { + target = scope:courtier + modifier = impressed_opinion + opinion = 30 + } + # The runestone is destroyed. + scope:vandal_site = { fp1_remove_stele_effect = yes } + + stress_impact = { + trusting = medium_stress_impact_loss + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_greed = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = trusting + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } + + # I'll be fining the cost of the runestone from your things. + option = { + name = fp1_yearly.0571.b + + # Gain opinion with the courtier. + reverse_add_opinion = { + target = scope:courtier + modifier = pleased_opinion + opinion = 30 + } + # The runestone is repaired. + custom_tooltip = fp1_yearly.0571.b.tt + # Lose opinion with the child, and fine them gold. + scope:child = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -40 + } + remove_short_term_gold = root.raise_stele_gold_cost + } + + stress_impact = { + vengeful = minor_stress_impact_loss + greedy = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } + + # Look, you can't be defacing expensive monuments, 'kay? + option = { + name = fp1_yearly.0571.b.2 + + # Gain lots of opinion with your child. + reverse_add_opinion = { + target = scope:child + modifier = pleased_opinion + opinion = 70 + } + # Lose some with your courtier. + reverse_add_opinion = { + target = scope:courtier + modifier = respect_opinion + opinion = -40 + } + # The runestone is repaired. + custom_tooltip = fp1_yearly.0571.b.tt + remove_short_term_gold = root.raise_stele_gold_cost + # If your child is still growing, this may leave a mark. + scope:child = { + ## Making them more arbitrary. + if = { + limit = { + # If they have room. + number_of_personality_traits < personality_trait_standard + # And don't already feel strongly either way. + NOR = { + has_trait = just + has_trait = arbitrary + } + } + add_trait = arbitrary + } + ## And less attached to money. + if = { + limit = { + NOR = { + has_trait = profligate + has_trait = greedy + } + } + add_trait = profligate + } + } + + stress_impact = { + forgiving = minor_stress_impact_loss + generous = minor_stress_impact_loss + lazy = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + greedy = medium_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + } + } + + # *Sigh* This isn't worth the bother. + option = { + name = fp1_yearly.0571.c + + # Gain lots of opinion with your child. + reverse_add_opinion = { + target = scope:child + modifier = pleased_opinion + opinion = 50 + } + # Lose some with your courtier. + reverse_add_opinion = { + target = scope:courtier + modifier = respect_opinion + opinion = -30 + } + # Lose the runestone. + scope:vandal_site = { fp1_remove_stele_effect = yes } + + stress_impact = { + forgiving = minor_stress_impact_loss + lazy = medium_stress_impact_loss + arbitrary = medium_stress_impact_loss + vengeful = minor_stress_impact_gain + diligent = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + } + } +} + +################################################## +# When I Grow Up +# by Ewan Cowhig Croft +# 0581 - 0590 +################################################## + +scripted_trigger fp1_0581_wrong_gender_child_wishes_to_fight_trigger = { + NOT = { has_character_flag = fp1_dreams_of_shieldpersondom } + trigger_if = { # Has the Royal Court and thus can modify pillars + limit = { has_dlc_feature = diverge_culture } + # For ease, they must share your faith or your culture. + OR = { + culture = root.culture + faith = root.faith + } + } + trigger_else = { + # For ease, they must share your faith. + faith = root.faith + } + # Have an appropriate matching personality. + OR = { + childhood_loud_child_trigger = yes + childhood_mean_child_trigger = yes + } + # Be the wrong gender to fight. + NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + # Aaaand be available to play. + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } +} + +scripted_trigger fp1_0581_valid_courtier_to_bully_trigger = { + # No positive relationship with root. + has_any_good_relationship_with_root_trigger = no + # And they have a negative opinion of you; player only action, so we only care about making sure the player might dislike this character. + opinion = { + target = root + value <= medium_negative_opinion + } +} + +# Your wrong-gender child wants to fight and raid in a few years. +fp1_yearly.0581 = { + type = character_event + title = fp1_yearly.0581.t + desc = { + desc = fp1_yearly.0581.desc.intro + # Currently causes too much risk of scrolling copy. + triggered_desc = { + trigger = { always = no } + desc = fp1_yearly.0581.desc.victim + } + desc = fp1_yearly.0581.desc.outro + } + theme = martial + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:child + animation = admiration + } + lower_right_portrait = scope:victim + override_background = { reference = corridor_day } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0581 } + # Filter to shieldmaiden-having culture. + culture = { has_cultural_parameter = has_access_to_shieldmaidens } + trigger_if = { # Has the Royal Court and thus can modify pillars + limit = { has_dlc_feature = diverge_culture } + culture = { NOT = { has_cultural_parameter = martial_custom_equal_combatant } } + } + trigger_else = { + # Can't be following an equal faith. + faith = { NOT = { has_doctrine_parameter = combatant_can_be_either_gender_if_no_roco } } + } + # Any child of yours might want to be a shieldperson when they grow up. + any_child = { fp1_0581_wrong_gender_child_wishes_to_fight_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Shieldmaidens are something of an inspiration, and thus + modifier = { + add = 1 + has_trait = shieldmaiden + } + + # If you're of low prowess, then there's less to aspire to. + modifier = { + add = -0.5 + prowess <= medium_skill_rating + } + # But if you're of high prowess, then there's plenty. + modifier = { + add = 0.5 + prowess >= very_high_skill_rating + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0581 + days = 1825 + } + # Nab an appropriate child. + random_child = { + limit = { fp1_0581_wrong_gender_child_wishes_to_fight_trigger = yes } + # Weight up the most promising fighter amongst your valid children. + weight = { + base = 0 + modifier = { + add = { + value = prowess + multiply = 100 + } + } + } + save_scope_as = child + } + # See if there's someone at court you can set the child to bully. + if = { + limit = { + # Keep this player-specific for ease of presentation. + is_ai = no + any_courtier_or_guest = { fp1_0581_valid_courtier_to_bully_trigger = yes } + } + random_courtier_or_guest = { + # Try to pick rivals et al first. + limit = { + has_any_bad_relationship_with_root_trigger = yes + fp1_0581_valid_courtier_to_bully_trigger = yes + } + # Otherwise just any random dick will do. + alternative_limit = { fp1_0581_valid_courtier_to_bully_trigger = yes } + save_scope_as = victim + } + } + } + + # My child, you shall make the world itself *tremble*. + option = { + name = fp1_yearly.0581.a + trigger = { has_trait = shieldmaiden } + trait = shieldmaiden + + # Scope:child is significantly more likely to try to become a shieldmaiden. + custom_tooltip = fp1_yearly.0581.a.tt + scope:child = { add_character_flag = fp1_dreams_of_shieldpersondom } + # Scope:child gains prowess. + scope:child = { add_prowess_skill = massive_skill_bonus } + # Scope:child gains opinion. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 60 + } + + stress_impact = { + shieldmaiden = major_stress_impact_loss + brave = major_stress_impact_loss + ambitious = major_stress_impact_loss + compassionate = major_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.75 + ai_zeal = 0.5 + ai_energy = 0.25 + } + modifier = { # Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -30 + has_trait = humble + } + # Raiders & adventurers want their prodigy to follow in their footsteps. + modifier = { + add = 20 + has_trait = viking + } + modifier = { + add = 20 + has_trait = adventurer + } + modifier = { + add = 20 + has_trait = brave + } + modifier = { + add = 20 + has_trait = shieldmaiden + } + modifier = { + add = 20 + has_trait = ambitious + } + } + } + + # A noble goal! Have at thee, rogue! + option = { + name = fp1_yearly.0581.b + trigger = { + NOT = { has_trait = shieldmaiden } + } + + # Scope:child is significantly more likely to try to become a shieldmaiden. + custom_tooltip = fp1_yearly.0581.b.tt + scope:child = { add_character_flag = fp1_dreams_of_shieldpersondom } + # Scope:child gains prowess. + scope:child = { add_prowess_skill = medium_skill_bonus } + # Scope:child gains opinion. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 30 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = compassionate + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + # Raiders & adventurers want their prodigy to follow in their footsteps. + modifier = { + add = 20 + has_trait = viking + } + modifier = { + add = 20 + has_trait = adventurer + } + modifier = { + add = 20 + has_trait = brave + } + modifier = { + add = 20 + has_trait = shieldmaiden + } + modifier = { + add = 20 + has_trait = ambitious + } + } + } + + # Perhaps. You should practice by ambushing scope:victim. + option = { + name = fp1_yearly.0581.c + trigger = { exists = scope:victim } + + # Scope:child gains prowess. + scope:child = { add_prowess_skill = medium_skill_bonus } + # Scope:victim gains wounded. + scope:victim = { + increase_wounds_no_death_effect = { REASON = duel } + } + # Scope:victim loses opinion of you. + reverse_add_opinion = { + target = scope:victim + modifier = angry_opinion + opinion = -20 + } + # Scope:child adds scope:victim as a potential rival. + hidden_effect = { + scope:child = { + progress_towards_rival_effect = { + REASON = rival_hit_with_stick + CHARACTER = scope:victim + OPINION = -30 + } + } + } + + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.25 + ai_compassion = -0.25 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Stop troubling me with foolish dreams. + option = { + name = fp1_yearly.0581.d + + # Gain a minor beneficial modifier for having your child avoid you. + add_character_modifier = { + modifier = fp1_ignoring_annoyances_modifier + years = 10 + } + # Scope:child loses opinion of you. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -30 + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + impatient = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + patient = minor_stress_impact_gain + shieldmaiden = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight up for stress. + add = 10 + has_trait = impatient + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -50 + has_trait = shieldmaiden + } + } + } + + # Hah! We shall see, little one. + option = { + name = fp1_yearly.0581.e + + reverse_add_opinion = { + target = scope:child + modifier = pleased_opinion + opinion = 15 + } + + # Fairly mild option, so doesn't incur stress. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.5 + } + } + } +} + +################################################## +# Raised Voices at the Thing +# by Ewan Cowhig Croft +# 0591 - 0600 +################################################## + +scripted_trigger fp1_0591_secondary_county_trigger = { + holder = root + culture = { has_innovation = innovation_all_things } +} + +scripted_trigger fp1_0591_fighting_counties_at_thing_trigger = { + tier = tier_county + culture = { has_innovation = innovation_all_things } + any_neighboring_county = { fp1_0591_secondary_county_trigger = yes } +} + +# One of your counties is engaged in an argument with another. +fp1_yearly.0591 = { + type = character_event + title = fp1_yearly.0591.t + desc = { + desc = fp1_yearly.0591.desc + random_valid = { + desc = fp1_yearly.0591.desc.border_dispute # + desc = fp1_yearly.0591.desc.stolen_flocks # + desc = fp1_yearly.0591.desc.kidnapped_child # + desc = fp1_yearly.0591.desc.drunken_arson # + desc = fp1_yearly.0591.desc.lost_dog # + desc = fp1_yearly.0591.desc.disrupted_wedding + desc = fp1_yearly.0591.desc.suspicious_will # + desc = fp1_yearly.0591.desc.sheltered_criminal # + desc = fp1_yearly.0591.desc.bad_luck # + desc = fp1_yearly.0591.desc.fly_tipping # + } + } + theme = realm + left_portrait = { + character = root + animation = disgust + } + override_background = { reference = fp1_runestone_circle } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0591 } + is_landed_or_landless_administrative = yes + # Filter to flavour-appropriate characters. + culture = { has_innovation = innovation_all_things } + # Ensure you have at least two counties that can fight with each other. + any_held_title = { fp1_0591_fighting_counties_at_thing_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for mainland Scandinavia. + modifier = { + add = 0.5 + fp1_is_in_scandinavia = yes + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0591 + days = 1825 + } + # Grab the counties. + random_held_title = { + limit = { fp1_0591_fighting_counties_at_thing_trigger = yes } + save_scope_as = county_a + random_neighboring_county = { + limit = { fp1_0591_secondary_county_trigger = yes } + save_scope_as = county_b + } + } + # Set a dummy gender for loc. + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + # Side with scope:county_a. + option = { + name = fp1_yearly.0591.a + + # Levy bonus county modifier. + scope:county_a = { + add_county_modifier = { + modifier = fp1_yearly_0591_levy_modifier + years = 10 + } + } + # And spurn the other county. + scope:county_b = { + add_county_modifier = { + modifier = fp1_yearly_0591_spurned_modifier + years = 10 + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # Side with scope:county_b. + option = { + name = fp1_yearly.0591.b + + # Building cost county modifier. + scope:county_b = { + add_county_modifier = { + modifier = fp1_yearly_0591_building_modifier + years = 10 + } + } + # And spurn the other county. + scope:county_a = { + add_county_modifier = { + modifier = fp1_yearly_0591_spurned_modifier + years = 10 + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_honor = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # Deliberately wind them both up. + option = { + name = fp1_yearly.0591.c + + # Popular opinion bonus modifiers in both (as they're too busy fighting each other). + scope:county_a = { + add_county_modifier = { + modifier = fp1_yearly_0591_otherwise_occupied_modifier + years = 10 + } + } + scope:county_b = { + add_county_modifier = { + modifier = fp1_yearly_0591_otherwise_occupied_modifier + years = 10 + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + arbitrary = medium_stress_impact_loss + honest = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_vengefulness = 0.25 + ai_honor = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = deceitful + } + modifier = { # Weight up for stress. + add = 20 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -20 + has_trait = just + } + } + } + + # Let them fight it out. + option = { + name = fp1_yearly.0591.d + + # Stress loss: not your problem, honestly. + ## Covered in stress impact. + + stress_impact = { + base = major_stress_loss + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } +} + +################################################## +# The Hardest Part of Ruling +# by Ewan Cowhig Croft +# 0601 - 0610 +################################################## + +scripted_trigger fp1_0601_valid_county_for_things_trigger = { + tier = tier_county + culture = { has_innovation = innovation_all_things } +} + +# An incredibly boring local assembly tries your patience. +fp1_yearly.0601 = { + type = character_event + title = fp1_yearly.0601.t + desc = fp1_yearly.0601.desc + theme = realm + left_portrait = { + character = root + animation = boredom + } + override_background = { reference = fp1_runestone_circle } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0601 } + is_landed = yes + # Filter to flavour-appropriate characters. + culture = { has_innovation = innovation_all_things } + any_held_title = { fp1_0601_valid_county_for_things_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for mainland Scandinavia. + modifier = { + add = 0.5 + fp1_is_in_scandinavia = yes + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0601 + days = 1825 + } + # Designate a suitable random county. + random_held_title = { + limit = { fp1_0601_valid_county_for_things_trigger = yes } + save_scope_as = county + } + # Set a dummy gender for loc. + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + # Fight to stay awake. + option = { + name = fp1_yearly.0601.a + + # Diplomacy duel to see how well you disguise it. + duel = { + skill = diplomacy + value = decent_skill_rating + # You power through and remain composed. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0601.a.tt_success + send_interface_toast = { + title = fp1_yearly.0601.a.tt_success + left_icon = root + add_prestige = medium_prestige_gain + } + } + # You slump right out of your seat. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0601.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0601.a.tt_failure + left_icon = root + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + just = minor_stress_impact_loss + diligent = medium_stress_impact_loss + arbitrary = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = just + } + modifier = { # Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arbitrary + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # (Diplomacy) Daydream of more interesting diplomatic problems. + option = { + name = fp1_yearly.0601.b + trigger = { has_trait = education_diplomacy } + trait = education_diplomacy_1 + trait = education_diplomacy_2 + trait = education_diplomacy_3 + trait = education_diplomacy_4 + trait = education_diplomacy_5 + + # Gain a minor modifier boosting diplomacy. + add_character_modifier = { + modifier = fp1_daydreaming_about_diplomacy_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # (Martial) Daydream up new strategies. + option = { + name = fp1_yearly.0601.c + trigger = { has_trait = education_martial } + trait = education_martial_1 + trait = education_martial_2 + trait = education_martial_3 + trait = education_martial_4 + trait = education_martial_5 + + # Gain a minor modifier boosting martial. + add_character_modifier = { + modifier = fp1_daydreaming_about_martial_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # (Stewardship) Daydream up new taxes to charge them. + option = { + name = fp1_yearly.0601.d + trigger = { has_trait = education_stewardship } + trait = education_stewardship_1 + trait = education_stewardship_2 + trait = education_stewardship_3 + trait = education_stewardship_4 + trait = education_stewardship_5 + + # Gain a minor modifier boosting stewardship. + add_character_modifier = { + modifier = fp1_daydreaming_about_stewardship_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # (Intrigue) Daydream up new ways to keep them under control. + option = { + name = fp1_yearly.0601.e + trigger = { has_trait = education_intrigue } + trait = education_intrigue_1 + trait = education_intrigue_2 + trait = education_intrigue_3 + trait = education_intrigue_4 + trait = education_intrigue_5 + + # Gain a minor modifier boosting intrigue. + add_character_modifier = { + modifier = fp1_daydreaming_about_intrigue_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # (Learning) Daydream of your favourite book. + option = { + name = fp1_yearly.0601.f + trigger = { has_trait = education_learning } + trait = education_learning_1 + trait = education_learning_2 + trait = education_learning_3 + trait = education_learning_4 + trait = education_learning_5 + + # Gain a minor modifier boosting learning. + add_character_modifier = { + modifier = fp1_daydreaming_about_learning_modifier + years = 5 + } + + stress_impact = { + lazy = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + } + } + + # Give in and doze off. + option = { + name = fp1_yearly.0601.g + + # Lose stress since... I mean, who cares? + ## Stress loss handled in stress_impact. + # Buuuuut also lose prestige. + add_prestige = minor_prestige_loss + # Low-random chance for players to occasionally become known as "the Snorer" here. + hidden_effect = { + if = { + limit = { + is_ai = no + has_any_nickname = no + } + random = { + chance = 1 + send_interface_toast = { + title = fp1_yearly.0601.g.nickname + left_icon = root + give_nickname = nick_the_snorer + } + } + } + } + + stress_impact = { + base = major_stress_loss + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_sociability = -0.5 + ai_energy = -1 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } +} + +################################################## +# Leading by Example +# by Ewan Cowhig Croft +# 0611 - 0620 +################################################## + +scripted_trigger fp1_0611_aggressive_child_candidate_trigger = { + # Age gate so that they're never the same as scope:child_b. + age >= 10 + # Must be around. + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # And have the right personality for this. + OR = { + childhood_mean_child_trigger = yes + childhood_loud_child_trigger = yes + } +} + +scripted_trigger fp1_0611_victim_child_candidate_trigger = { + # Age gate so that they're never the same as scope:child_a. + age < 10 + # Must be around. + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # We're not fussed about personality here, anything is good. +} + +# One of your children wounds another whilst imitating you. +fp1_yearly.0611 = { + type = character_event + title = fp1_yearly.0611.t + desc = fp1_yearly.0611.desc + theme = education + left_portrait = { + character = scope:child_a + animation = shame + } + right_portrait = { + character = scope:child_b + animation = anger + } + override_background = { reference = bedchamber } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0611 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + # You must qualify for imitation in some way. + OR = { + has_trait = viking + has_trait = berserker + has_trait = adventurer + has_character_flag = has_recently_performed_raid + } + # Gotta have one child who qualifies as the aggressor. + any_child = { fp1_0611_aggressive_child_candidate_trigger = yes } + # And one child who qualifies as the bully. + any_child = { fp1_0611_victim_child_candidate_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for each qualifying trait. + modifier = { + add = 0.25 + has_trait = viking + } + modifier = { + add = 0.25 + has_trait = berserker + } + modifier = { + add = 0.25 + has_trait = adventurer + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0611 + days = 1825 + } + # Grab the first child. + random_child = { + limit = { fp1_0611_aggressive_child_candidate_trigger = yes } + save_scope_as = child_a + } + # And the second. + random_child = { + limit = { fp1_0611_victim_child_candidate_trigger = yes } + save_scope_as = child_b + } + # Wound scope:child_b. + scope:child_b = { + increase_wounds_no_death_effect = { REASON = duel } + } + } + + # Explain to scope:child_a that they need to wait till they're older. + option = { + name = fp1_yearly.0611.a + + # Diplomacy duel to see if you manage the feelings involved. + duel = { + skill = diplomacy + value = high_skill_rating + # You successfully explain that fighting is not playing. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0611.a.tt_success + send_interface_toast = { + title = fp1_yearly.0611.a.tt_success + left_icon = scope:child_a + right_icon = scope:child_b + scope:child_b = { + progress_towards_friend_effect = { + CHARACTER = scope:child_a + OPINION = 50 + REASON = friend_child_apologize + } + } + } + } + # You only engender feelings of bitterness between the two. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0611.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0611.a.tt_failure + left_icon = scope:child_a + right_icon = scope:child_b + scope:child_b = { + progress_towards_rival_effect = { + REASON = rival_hit_with_sharp_stick + CHARACTER = scope:child_a + OPINION = -50 + } + } + } + } + } + + stress_impact = { + honest = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.25 + ai_vengefulness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = honest + } + modifier = { # Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + } + } + + # Laud scope:child_a for their goals. + option = { + name = fp1_yearly.0611.b + + # Scope:child_a is very happy & gains some prowess. + scope:child_a = { add_prowess_skill = medium_skill_bonus } + reverse_add_opinion = { + target = scope:child_a + modifier = love_opinion + opinion = 40 + } + # Scope:child_b is very unhappy and grows close to a rivalry with scope:child_a. + scope:child_b = { + progress_towards_rival_effect = { + REASON = rival_hit_with_sharp_stick + CHARACTER = scope:child_a + OPINION = -20 + } + } + reverse_add_opinion = { + target = scope:child_b + modifier = trust_opinion + opinion = -20 + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Teach scope:child_b how to deal with bullies. + option = { + name = fp1_yearly.0611.c + + # Scope:child_b is very happy & gains some prowess. + scope:child_b = { add_prowess_skill = medium_skill_bonus } + reverse_add_opinion = { + target = scope:child_b + modifier = love_opinion + opinion = 40 + } + # Scope:child_a is unhappy. + reverse_add_opinion = { + target = scope:child_a + modifier = trust_opinion + opinion = -20 + } + + stress_impact = { + fickle = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + ai_vengefulness = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = fickle + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Tell them to take it to their nurse. + option = { + name = fp1_yearly.0611.d + + # Lose stress. + ## Stress loss handled in stress_impact. + # But also opinion with both children. + reverse_add_opinion = { + target = scope:child_a + modifier = trust_opinion + opinion = -20 + } + reverse_add_opinion = { + target = scope:child_b + modifier = hurt_opinion + opinion = -20 + } + # And we set up a hidden rivalry anyway. + hidden_effect = { + scope:child_b = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:child_a } + } + set_relation_potential_rival = scope:child_a + } + } + } + + stress_impact = { + base = medium_stress_loss + lazy = minor_stress_impact_loss + callous = minor_stress_impact_loss + diligent = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_energy = -0.5 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } +} + +################################################## +# A Shiny New Toy +# by Ewan Cowhig Croft +# 0621 - 0630 +################################################## + +scripted_trigger fp1_0621_valid_child_wants_loot_trigger = { + # Must be around. + child_suitable_to_play_with_character_one_sided = { CHARACTER = scope:raider } + # Quiet children aren't going to come down to the beach. + childhood_quiet_child_trigger = no +} + +# Your child asks you which piece of raid loot is theirs. +fp1_yearly.0621 = { + type = character_event + title = fp1_yearly.0621.t + desc = fp1_yearly.0621.desc + theme = war + left_portrait = { + character = scope:raider + animation = personality_rational + } + right_portrait = { + character = scope:child + animation = admiration + } + override_background = { reference = fp1_beached_longships } + + # Triggers handled in the setup event. + + # Weight multipliers handled in the setup event. + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0621 + days = 1825 + } + # Grab a suitable child. + random_child = { + limit = { fp1_0621_valid_child_wants_loot_trigger = yes } + # Weight up greedier children. + weight = { + base = 0 + modifier = { add = ai_greed } + } + save_scope_as = child + } + # Save a dummy gender for raid victims; reflects your child's biases rather than your actual experiences. + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + # Of course you can take the big trophy. + option = { + name = fp1_yearly.0621.a + + # Scope:child gains lots of opinion of you. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 50 + } + # But you lose some gold. + remove_short_term_gold = minor_gold_value + + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = generous + } + } + } + + # Nothing now: maybe when you're older, you can earn your own. + option = { + name = fp1_yearly.0621.b + + # Scope:child gains some opinion of you. + reverse_add_opinion = { + target = scope:child + modifier = respect_opinion + opinion = 10 + } + + # A fairly mild response, so no stress to be garnered. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + } + } + } + + # Away with you! This is for the adults. + option = { + name = fp1_yearly.0621.c + + # Gain some prestige. + add_prestige = minor_prestige_gain + # Scope:child is upset. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -20 + } + + stress_impact = { + impatient = minor_stress_impact_loss + greedy = medium_stress_impact_loss + patient = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_compassion = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = impatient + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = patient + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } +} + +# Setup event to sort triggers, scopes, etc. +fp1_yearly.0622 = { + hidden = yes + scope = army + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Root must have been leading the army personally. + army_commander = scope:raider + # And some actual loot must have been recovered. + raid_loot >= 10 + # In which case we take a look at scope:raider & see how they stack up. + scope:raider = { + # Standard checks. + is_available_adult_or_is_commanding = yes + NOT = { has_character_flag = had_event_fp1_yearly_0621 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + # And must have a valid child laying about. + any_child = { fp1_0621_valid_child_wants_loot_trigger = yes} + } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for dedicated raiders. + modifier = { + add = 1 + scope:raider = { has_trait = viking } + } + # Or if you've brought home a truly excessive amount of loot. + modifier = { + add = 1 + raid_loot >= 200 + } + } + + immediate = { + save_scope_as = raiding_army + scope:raider = { trigger_event = fp1_yearly.0621 } + } +} + +################################################## +# A Cynical Bent +# by Ewan Cowhig Croft +# 0631 - 0640 +################################################## + +scripted_trigger fp1_0631_suitable_cynical_knight_trigger = { + # Must be in the correct army. + knight_army ?= $ARMY$ + # Has to share scope:raider's faith. + faith = scope:raider.faith + # Can't be zealous. + NOT = { has_trait = zealous } + # And must have at least decent learning. + learning >= decent_skill_rating +} + +# You notice a courtier refuses to sacrifice after a raid. +fp1_yearly.0631 = { + type = character_event + title = fp1_yearly.0631.t + desc = fp1_yearly.0631.desc + theme = faith + left_portrait = { + character = scope:cynic + animation = personality_cynical + } + override_background = { reference = fp1_beached_longships } + + # Triggers handled in the setup event. + + # Weight multipliers handled in the setup event. + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0631 + days = 1825 + } + # Grab an appropriate knight. + random_knight = { + limit = { + fp1_0631_suitable_cynical_knight_trigger = { ARMY = scope:raiding_army } + } + # Weight up cynical knights. + weight = { + base = 0 + modifier = { + add = { + value = ai_zeal + multiply = -1 + } + } + } + save_scope_as = cynic + } + } + + # Lecture them for their impiety. + option = { + name = fp1_yearly.0631.a + + # Learning duel over piety. + duel = { + skill = learning + target = scope:cynic + # You succeed in shaming scope:knight. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0631.a.tt_success + send_interface_toast = { + title = fp1_yearly.0631.a.tt_success + left_icon = scope:cynic + add_piety = medium_piety_gain + reverse_add_opinion = { + target = scope:cynic + modifier = annoyed_opinion + opinion = -20 + } + } + } + # Scope:knight makes you look like a fool. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0631.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0631.a.tt_failure + left_icon = scope:cynic + add_piety = minor_piety_loss + reverse_add_opinion = { + target = scope:cynic + modifier = respect_opinion + opinion = -30 + } + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + generous = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + zealous = major_stress_impact_loss + greedy = major_stress_impact_loss + shy = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + # Event cannot be triggered if you have cynical. + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight up for stress. + add = 30 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = shy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } + + # Quietly keep your own tribute too. + option = { + name = fp1_yearly.0631.b + + # Gain a little gold. + add_gold = tiny_gold_value + # Lose a little piety. + add_piety = miniscule_piety_loss + + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_zeal = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + # Shrug and move on. + option = { + name = fp1_yearly.0631.c + + # Gain opinion with scope:knight. + reverse_add_opinion = { + target = scope:cynic + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + forgiving = medium_stress_impact_loss + vengeful = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.25 + ai_greed = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -20 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } +} + +# Setup event to sort triggers, scopes, etc. +fp1_yearly.0632 = { + hidden = yes + scope = army + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Root must have been leading the army personally. + army_commander = scope:raider + # And some actual loot must have been recovered. + raid_loot >= 10 + # In which case we take a look at scope:raider & see how they stack up. + scope:raider = { + # Standard checks. + is_available_adult_or_is_commanding = yes + NOT = { has_character_flag = had_event_fp1_yearly_0631 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + # And there's an appropriate knightly target. + any_knight = { + fp1_0631_suitable_cynical_knight_trigger = { ARMY = root } + } + # And remove any dedicated cynics. + NOT = { has_trait = cynical } + } + } + + weight_multiplier = { + base = 1 + + # Weight up a little for the zealous, who are more likely to notice. + modifier = { + add = 1 + scope:raider = { has_trait = zealous } + } + } + + immediate = { + save_scope_as = raiding_army + scope:raider = { trigger_event = fp1_yearly.0631 } + } +} + +################################################## +# Worthy of the Ocean +# by Ewan Cowhig Croft +# 0641 - 0650 +################################################## + +scripted_trigger fp1_0641_raider_with_longships_trigger = { + can_raid_trigger = yes + culture = { has_innovation = innovation_longboats } + any_sub_realm_county = { is_coastal_county = yes } +} + +scripted_trigger fp1_0641_neighbouring_ruler_with_stealable_ships_trigger = { + # Doesn't have a friendly relationship with root. + has_friendly_relationship_with_root_trigger = no + # Has stealable longboats. + fp1_0641_raider_with_longships_trigger = yes +} + +# Your longships seem to be in poor nick. +fp1_yearly.0641 = { + type = character_event + title = fp1_yearly.0641.t + desc = fp1_yearly.0641.desc + theme = intrigue + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:neighbour + animation = dismissal + } + override_background = { reference = fp1_beached_longships } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0641 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_0641_raider_with_longships_trigger = yes + } + + weight_multiplier = { + base = 1 + + # Weight down a little if you're a raider or diligent, used to keeping your longships in tip-top condition. + modifier = { + add = -0.5 + has_trait = viking + } + modifier = { + add = -0.5 + has_trait = diligent + } + # And up a little for adventurers and the lazy, who wear their ships hard & can't be arsed respectively. + modifier = { + add = 0.5 + has_trait = adventurer + } + modifier = { + add = 0.5 + has_trait = lazy + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0641 + days = 1825 + } + # Try to grab a suitable neighbour. + if = { + limit = { + any_neighboring_and_across_water_realm_same_rank_owner = { fp1_0641_neighbouring_ruler_with_stealable_ships_trigger = yes } + } + random_neighboring_and_across_water_realm_same_rank_owner = { + # Prefer rivals first. + limit = { + any_neighboring_and_across_water_realm_same_rank_owner = { + any_relation = { + type = rival + this = root + } + fp1_0641_neighbouring_ruler_with_stealable_ships_trigger = yes + } + } + # Otherwise, just whoever. + alternative_limit = { + any_neighboring_and_across_water_realm_same_rank_owner = { fp1_0641_neighbouring_ruler_with_stealable_ships_trigger = yes } + } + save_scope_as = neighbour + } + } + } + + # Pay to fix them. + option = { + name = fp1_yearly.0641.a + trigger = { + can_make_expensive_purchase_trigger = { PRICE = minor_gold_value } + } + + # The boat are repaired without issue. + custom_tooltip = fp1_yearly.0641.a.tt + # Lose a little gold. + remove_treasury_or_gold = minor_treasury_or_gold_value + + stress_impact = { + generous = minor_stress_impact_loss + honest = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = honest + } + modifier = { # Weight down for stress. + add = -10 + has_trait = greedy + } + } + } + + # Steal some from a neighbouring ruler. + option = { + name = fp1_yearly.0641.b + trigger = { exists = scope:neighbour } + + # Intrigue duel to nab the boats in the night. + duel = { + skill = intrigue + target = scope:neighbour + # You heist the longships gleefully. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0641.b.tt_success + send_interface_toast = { + title = fp1_yearly.0641.b.tt_success + left_icon = scope:neighbour + add_character_modifier = { + modifier = fp1_excellent_longships_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:neighbour + modifier = angry_opinion + opinion = -50 + } + } + } + # You're caught and have to leg it. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0641.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0641.b.tt_failure + left_icon = scope:neighbour + add_character_modifier = { + modifier = fp1_rotting_longships_modifier + years = 10 + } + reverse_add_opinion = { + target = scope:neighbour + modifier = annoyed_opinion + opinion = -20 + } + } + } + } + # Try to earmark scope:neighbour as a potential rival. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:neighbour } + } + set_relation_potential_rival = scope:neighbour + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + greedy = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + just = minor_stress_impact_gain + generous = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_rationality = 0.25 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = deceitful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = honest + } + } + } + + # Commission new vessels from a fancy shipwright. + option = { + name = fp1_yearly.0641.c + trigger = { + can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } + } + + # Gain a modifier boosting naval speed & reducing embark cost. + add_character_modifier = { + modifier = fp1_excellent_longships_modifier + years = 10 + } + # Lose a bit more gold. + remove_treasury_or_gold = medium_treasury_or_gold_value + + stress_impact = { + diligent = minor_stress_impact_loss + generous = medium_stress_impact_loss + lazy = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = -1 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight up for stress. + add = 20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + } + } + + # Bah, let them rot. What's the harm? + option = { + name = fp1_yearly.0641.d + + # Gain a modifier reducing naval speed & increasing embark cost. + add_character_modifier = { + modifier = fp1_rotting_longships_modifier + years = 10 + } + # Someone else's problem, right? + ## Stress loss handled in stress impact. + + stress_impact = { + base = major_stress_loss + lazy = medium_stress_impact_loss + greedy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = -0.5 + ai_energy = -0.75 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } +} + +################################################## +# Leviathan +# by Ewan Cowhig Croft +# 0651 - 0660 +################################################## + +# You're out sailing when you spot a whale. +fp1_yearly.0651 = { + type = character_event + title = fp1_yearly.0651.t + desc = fp1_yearly.0651.desc + theme = hunt_activity + left_portrait = { + character = root + animation = shock + } + override_background = { reference = fp1_ocean_norse } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0651 } + is_playable_character = yes + is_landed = yes + # Must have a coastal capital. + capital_county = { is_coastal_county = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up for the Norse a bit. + modifier = { + add = 1 + fp1_is_norse = yes + } + # Raiders spend more time at sea. Probably. Vikings do at least. + modifier = { + add = 1 + has_trait = viking + } + # Adventurers spend more time at sea. Also probably. + modifier = { + add = 1 + has_trait = adventurer + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0651 + years = 50 + } + } + + # Static gold is used rather than dynamic throughout this event. This is to account for whale value not adjusting with your scale (even if it probably should with region): a gold mine for a poor tribal is a month's tax for a highly developed king. + + # Get the harpoons! + option = { + name = fp1_yearly.0651.a + + # Prowess challenge to slaughter the whale. + duel = { + skill = prowess + value = decent_skill_rating + # You haul the whale to shore and butcher it. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0651.a.tt_success + send_interface_toast = { + title = fp1_yearly.0651.a.tt_success + left_icon = root + # Per the comment below the immediate block, the static gold is deliberate. + add_gold = 100 + } + } + # The beast escapes you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0651.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0651.a.tt_failure + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss # From Hell's Heart I stab at thee, etc. + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 5 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # Just bring me the carcass. + option = { + name = fp1_yearly.0651.b + + # Gain some minor gold. + ## Per the comment below the immediate block, the static gold is deliberate. + add_gold = 50 + + stress_impact = { + greedy = minor_stress_impact_loss + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.25 + ai_energy = -0.25 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -10 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # (Hunter) A *grand* quarry! + option = { + name = fp1_yearly.0651.c + trigger = { has_trait = lifestyle_hunter } + trait = lifestyle_hunter + # You face a *true* leviathan. + custom_tooltip = fp1_yearly.0651.c.tt + # More difficult prowess challenge for greater rewards. + duel = { + skill = prowess + value = very_high_skill_rating + # You haul the whale to shore and butcher it. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0651.c.tt_success + send_interface_toast = { + title = fp1_yearly.0651.c.tt_success + left_icon = root + # Per the comment below the immediate block, the static gold is deliberate. + add_gold = 300 + } + } + # The beast escapes you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0651.c.tt_failure + send_interface_toast = { + title = fp1_yearly.0651.c.tt_failure + left_icon = root + increase_wounds_effect = { REASON = hunting_accident } + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss # From Hell's Heart I stab at thee, etc. + brave = major_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.75 + ai_energy = 0.75 + ai_compassion = -0.25 + } + modifier = { # Weight up for stress. + add = 5 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -30 + has_trait = craven + } + } + } + + # A creature of fearsome majesty, leave it. + option = { + name = fp1_yearly.0651.d + + # The whale goes free. + custom_tooltip = fp1_yearly.0651.d.tt + # You gain a little prestige for your kindness. + add_prestige = minor_prestige_gain + + stress_impact = { + generous = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + craven = major_stress_impact_loss + greedy = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight up for stress. + add = 20 + has_trait = compassionate + } + modifier = { # Weight up for stress. + add = 30 + has_trait = craven + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -30 + has_trait = brave + } + } + } +} + +################################################## +# A Novel Challenge +# by Ewan Cowhig Croft +# 0661 - 0670 +################################################## + +scripted_trigger fp1_0661_knight_appropriate_for_skiing_trigger = { + # Has to be around. + is_available_ai_adult = yes + # And in the capital. + location = root.location + # And have no disqualifying traits. + NOR = { + # Personality blockers. + has_trait = shy + has_trait = lazy + has_trait = humble + has_trait = craven + # Not that it's impossible, just unlikely for the period & tech level. + has_trait = one_legged + } + # Finally, no negative relationship with root. + has_any_bad_relationship_with_root_trigger = no +} + +# One of your knights challenges you to skiing. +fp1_yearly.0661 = { + type = character_event + title = fp1_yearly.0661.t + desc = fp1_yearly.0661.desc + theme = friendly + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:knight + animation = personality_bold + } + override_background = { reference = feast } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0661 } + is_playable_character = yes + # Must be a suitable culture. + culture_uses_frequent_winter_transportation_trigger = yes + # Gotta have snow in the capital. + character_capital_has_winter_trigger = yes + # And have an available knight. + any_knight = { fp1_0661_knight_appropriate_for_skiing_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight according to winter scale. + character_capital_has_snow_suitable_for_activities = { CHARACTER = root } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0661 + days = 1825 + } + # Grab an appropriate knight. + random_knight = { + limit = { fp1_0661_knight_appropriate_for_skiing_trigger = yes } + save_scope_as = knight + } + } + + # How unusual! I accept! + option = { + name = fp1_yearly.0661.a + trigger = { + NOT = { has_trait = winter_soldier } + } + + # Prowess duel vs. scope:knight. + duel = { + skill = prowess + target = scope:knight + # It's close, but you win! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0661.a.tt_success + send_interface_toast = { + title = fp1_yearly.0661.a.tt_success + left_icon = scope:knight + add_prestige = minor_prestige_gain + progress_towards_friend_effect = { + CHARACTER = scope:knight + OPINION = 30 + REASON = friend_ski_race + } + } + } + # Scope:knight skids to victory. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0661.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0661.a.tt_failure + left_icon = scope:knight + add_prestige = minor_prestige_loss + progress_towards_friend_effect = { + CHARACTER = scope:knight + OPINION = 10 + REASON = friend_ski_race + } + } + } + } + + stress_impact = { + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + ai_honor = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = brave + } + modifier = { # Weight down for stress. + add = -20 + has_trait = craven + } + } + } + + # Winter Soldier: Out in the snow? I accept. + option = { + name = fp1_yearly.0661.a.2 + trigger = { has_trait = winter_soldier } + trait = winter_soldier + + custom_tooltip = fp1_yearly.0661.a.2.tt + add_prestige = minor_prestige_gain + progress_towards_friend_effect = { + CHARACTER = scope:knight + OPINION = 50 + REASON = friend_ski_race + } + + stress_impact = { + diligent = minor_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + ai_honor = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # Hobble the competition, then race. + option = { + name = fp1_yearly.0661.b + + # Intrigue duel vs. scope:knight. + duel = { + skill = intrigue + target = scope:knight + # My, what an *effortless* win you have there. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0661.b.tt_success + send_interface_toast = { + title = fp1_yearly.0661.b.tt_success + left_icon = scope:knight + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:knight + modifier = suspicion_opinion + opinion = -5 + } + } + } + # Scope:knight discovers you in the act. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0661.b.tt_failure + send_interface_toast = { + title = fp1_yearly.0661.b.tt_failure + left_icon = scope:knight + add_prestige = medium_prestige_loss + progress_towards_rival_effect = { + REASON = rival_attempted_to_cheat_race + CHARACTER = scope:knight + OPINION = -40 + } + } + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + deceitful = medium_stress_impact_loss + just = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 0.5 + ai_sociability = 0.25 + ai_honor = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = arbitrary + } + modifier = { # Weight up for stress. + add = 20 + has_trait = deceitful + } + modifier = { # Weight down for stress. + add = -10 + has_trait = just + } + modifier = { # Weight down for stress. + add = -20 + has_trait = honest + } + } + } + + # *Competitive* skiing? With no hunting? Get lost. + option = { + name = fp1_yearly.0661.c + + # Some minor opt-out prestige. + add_prestige = miniscule_prestige_gain + # You upset scope:knight a bit, though. + reverse_add_opinion = { + target = scope:knight + modifier = disappointed_opinion + opinion = -10 + } + + stress_impact = { + lazy = minor_stress_impact_loss + craven = minor_stress_impact_loss + lifestyle_hunter = medium_stress_impact_loss + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_boldness = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = craven + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lifestyle_hunter + } + modifier = { # Weight down for stress. + add = -10 + has_trait = brave + } + } + } +} + +################################################## +# A Slippery Slope +# by Ewan Cowhig Croft +# 0671 - 0680 +################################################## + +scripted_trigger fp1_0671_available_older_sibling_trigger = { + this != scope:child + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # Should be older than scope:child. + age > scope:child.age + # Mustn't have a terribly negative relationship with scope:child. + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:child } + } + opinion = { + target = scope:child + value >= medium_negative_opinion + } +} + +# Your child wants you to go sledding with them. +fp1_yearly.0671 = { + type = character_event + title = fp1_yearly.0671.t + desc = fp1_yearly.0671.desc + theme = family + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:child + animation = admiration + } + lower_right_portrait = scope:sibling + override_background = { reference = bedchamber } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0671 } + is_landed = yes + # Gotta have snow in the capital. + character_capital_has_winter_trigger = yes + # And an available child. + any_child = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + } + } + + weight_multiplier = { + base = 1 + + # Weight according to winter scale. + character_capital_has_snow_suitable_for_activities = { CHARACTER = root } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0671 + days = 1825 + } + # Grab a suitable child. + random_child = { + limit = { + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + } + save_scope_as = child + } + # If there's a suitable sibling, nab them for later. + if = { + limit = { + any_child = { fp1_0671_available_older_sibling_trigger = yes } + } + random_child = { + limit = { fp1_0671_available_older_sibling_trigger = yes } + save_scope_as = sibling + } + } + add_character_flag = { + flag = use_sickness_clothes + days = 1 + } + } + + # (Strong/Physique_Good) Hah, let me just haul this table out for us! + option = { + name = fp1_yearly.0671.a + trigger = { + OR = { + has_trait = strong + has_trait = physique_good + } + } + trait = strong + trait = physique_good_1 + trait = physique_good_2 + trait = physique_good_3 + + # Gain huge opinion boost with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 50 + } + # Grow closer to becoming friends with scope:child, if possible. + progress_towards_friend_effect = { + CHARACTER = scope:child + OPINION = 0 + REASON = friend_sledding + } + + stress_impact = { + gregarious = minor_stress_impact_loss + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + } + } + + # Come on, let's get a tray from the kitchen. + option = { + name = fp1_yearly.0671.b + trigger = { + NOR = { + has_trait = strong + has_trait = physique_good + } + } + + # Gain large opinion boost with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = love_opinion + opinion = 25 + } + + stress_impact = { + gregarious = minor_stress_impact_loss + diligent = minor_stress_impact_loss + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { # Weight up for stress. + add = 10 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -10 + has_trait = lazy + } + } + } + + # Go ask your [sibling]. + option = { + name = fp1_yearly.0671.c + trigger = { exists = scope:sibling } + + # Scope:child & scope:sibling both gain opinion of each other. + scope:child = { + progress_towards_friend_effect = { + CHARACTER = scope:sibling + OPINION = 30 + REASON = friend_sledding + } + } + + # Quite a mild response, so no stress involved. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = -0.25 + ai_sociability = -0.25 + } + } + } + + # Away with you, I'm busy. + option = { + name = fp1_yearly.0671.d + + # Lose stress. + ## Stress loss handled in stress_impact. + # But also opinion with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -20 + } + + stress_impact = { + base = major_stress_loss + lazy = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_sociability = -0.25 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = lazy + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # Get out of your pajamas. + after = { remove_character_flag = use_sickness_clothes } +} + +################################################## +# Why Can't I Come? +# by Ewan Cowhig Croft +# 0681 - 0690 +################################################## + +scripted_trigger fp1_0681_haughty_knights_trigger = { + # Has enough prowess that they're proud of it. + prowess >= medium_skill_rating + # And lacks any humbling traits. + NOR = { + has_trait = humble + has_trait = compassionate + has_trait = forgiving + } +} + +scripted_trigger fp1_0681_child_that_might_like_raiding_trigger = { + # Must be around. + child_suitable_to_play_with_character_one_sided = { CHARACTER = root } + # We want basically anyone who might think it's exciting. + NOT = { has_trait = pensive } +} + +# One of your children wants to know why they can't come raiding. +fp1_yearly.0681 = { + type = character_event + title = fp1_yearly.0681.t + desc = fp1_yearly.0681.desc + theme = war + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:child + animation = admiration + } + override_background = { reference = study } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0681 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_coastal_norse_tribal = yes + # Raiding must be recent or ever-present. + OR = { + has_trait = viking + has_character_flag = has_recently_performed_raid + } + # At least some of your knights should be snobbish. + any_knight = { fp1_0681_haughty_knights_trigger = yes } + # And you must have a suitable child. + any_child = { fp1_0681_child_that_might_like_raiding_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Weight up a bit for adventurers & vikings. + modifier = { + add = 0.5 + has_trait = adventurer + } + modifier = { + add = 0.5 + has_trait = viking + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0681 + days = 1825 + } + # Grab a suitable child. + random_child = { + limit = { fp1_0681_child_that_might_like_raiding_trigger = yes } + save_scope_as = child + } + } + + # I'm leaving you to guard [capital], ok? + option = { + name = fp1_yearly.0681.a + + # Gain opinion with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = trust_opinion + opinion = 20 + } + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.75 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = compassionate + } + modifier = { # Weight down for stress. + add = -10 + has_trait = callous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = sadistic + } + } + } + + # _Hah_! You'll never be a true warrior, child. + option = { + name = fp1_yearly.0681.b + + # Gain opinion with all of your haughty knights. + every_knight = { + limit = { fp1_0681_haughty_knights_trigger = yes } + custom = fp1_yearly.0681.b.haughty_knights + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + # Lose opinion with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = hurt_opinion + opinion = -30 + } + # Add hidden potential rivalry if possible. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:child } + } + set_relation_potential_rival = scope:child + } + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.25 + ai_compassion = -0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = callous + } + modifier = { # Weight up for stress. + add = 10 + has_trait = sadistic + } + modifier = { # Weight down for stress. + add = -10 + has_trait = compassionate + } + } + } + + # We'll talk about it when you're older. + option = { + name = fp1_yearly.0681.c + + # Gain some minor opinion with your knights. + every_knight = { + custom = custom.every_knight + add_opinion = { + target = root + modifier = respect_opinion + opinion = 5 + } + } + # But lose opinion with scope:child. + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -10 + } + + # Mild response, incurs no stress. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + ai_boldness = -0.25 + ai_sociability = -0.25 + } + } + } +} + +################################################## +# Attempted Atonement +# by Ewan Cowhig Croft +# 0691 - 0700 +################################################## + +scripted_trigger fp1_0692_valid_convertable_knight_trigger = { + # Must be in the army's location. + location = root.location + # & share scope:raider's faith, which isn't reformed. + faith = { + this = scope:raider.faith + has_doctrine_parameter = unreformed + } + # Shouldn't have anything that might block them from converting. + NOR = { + has_trait = arrogant + has_trait = content + has_trait = cynical + has_trait = zealous + has_trait = paranoid + # Sadists are too busy for introspection. + has_trait = sadistic + } + # And should be landless. + is_courtier_of = scope:raider + # Children can be rebellious, but we should probably filter them out too. + NOT = { + any_parent = { this = scope:raider } + } +} + +scripted_trigger fp1_0691_knight_still_valid_convertable_trigger = { + # Has all the appropriate variables; they come as a matched pair, but just in case. + has_variable = raid_convert_county + has_variable = raid_convert_faith + # Standard checks. + is_available_ai_adult = yes + is_courtier_of = root + # Make sure that they're still of root's faith, and that root hasn't converted to their new faith. + faith = root.faith + NOT = { this.var:raid_convert_faith = root.faith } + # Shouldn't have become committed to a religious stance, but just check they've not managed to sneak-acquire traits in the meanwhilst. + NOR = { + has_trait = zealous + has_trait = cynical + } +} + +# One of your knights finds new faith after a raid. +fp1_yearly.0691 = { + type = character_event + title = fp1_yearly.0691.t + desc = fp1_yearly.0691.desc + theme = war + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:knight + animation = personality_zealous + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_0691 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse_tribal = yes + # There must be at least one knight who's had a crisis of conscience. + any_knight = { fp1_0691_knight_still_valid_convertable_trigger = yes } + } + + weight_multiplier = { + base = 1 + + # Knights feel more comfortable converting away if you're not particularly religious. + modifier = { + add = 0.5 + has_trait = cynical + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_0691 + days = 3650 + } + # Grab a suitable knight. + random_knight = { + limit = { fp1_0691_knight_still_valid_convertable_trigger = yes } + weight = { + base = 0 + # Weight up fickle & trusting characters. + ## Fickle characters are more likely to heel-face-turn on their pillaging faith. + modifier = { + add = 100 + has_trait = fickle + } + ## Trusting characters are more gullible, and they *did* take thralls. + modifier = { + add = 100 + has_trait = trusting + } + } + save_scope_as = knight + } + # Convert them & boost their zeal. + scope:knight = { + set_character_faith = this.var:raid_convert_faith + add_trait = zealous + } + # Grab the source county for loc. + scope:knight.var:raid_convert_county = { save_scope_as = county } + } + + # Surely I can talk you out of this foreign faith? + option = { + name = fp1_yearly.0691.a + + # Learning duel to get them to recant & stay. + duel = { + skill = learning + target = scope:knight + # You bring them back to the light. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp1_yearly.0691.a.tt_success + send_interface_toast = { + title = fp1_yearly.0691.a.tt_success + left_icon = scope:knight + # They reconvert. + scope:knight = { set_character_faith = root.faith } + # And you either get a hook on them... + if = { + limit = { + can_add_hook = { + target = scope:knight + type = favor_hook + } + } + add_hook = { + target = scope:knight + type = favor_hook + } + } + # Or a goodly chunk of opinion. + else = { + reverse_add_opinion = { + target = scope:knight + modifier = grateful_opinion + opinion = 30 + } + } + } + } + # They refuse and leave. + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp1_yearly.0691.a.tt_failure + send_interface_toast = { + title = fp1_yearly.0691.a.tt_failure + left_icon = scope:knight + # They leave. + scope:knight = { select_and_move_to_pool_effect = yes } + # And they're none too happy with you. + reverse_add_opinion = { + target = scope:knight + modifier = insult_opinion + opinion = -25 + } + } + } + } + + stress_impact = { + humble = minor_stress_impact_loss + zealous = major_stress_impact_loss + arrogant = minor_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.75 + ai_boldness = 0.5 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = arrogant + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # GetFaith.GetReligion.GetName? You've gone mad. Guards! + option = { + name = fp1_yearly.0691.b + + # Quietly move scope:knight to the pool so you're no longer their liege. + hidden_effect = { + scope:knight = { move_to_pool = yes } + } + # Throw scope:knight in the dungeon immediately. + rightfully_imprison_character_effect = { + TARGET = scope:knight + IMPRISONER = root + } + hidden_effect = { + scope:knight = { change_prison_type = dungeon } + } + # Scope:knight is understandably angry. + reverse_add_opinion = { + target = scope:knight + modifier = hate_opinion + opinion = -50 + } + # Quietly mark them for future rivalry. + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:knight } + } + set_relation_potential_rival = scope:knight + } + } + # But, hey, piety & same-faith courtier & guest opinion. + every_courtier_or_guest = { + limit = { + faith = root.faith + NOT = { has_trait = cynical } + } + custom = fp1_yearly.0691.b.same_faith_courtiers_and_guests + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + + stress_impact = { + vengeful = major_stress_impact_loss + zealous = major_stress_impact_loss + forgiving = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.5 + ai_energy = -0.25 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = vengeful + } + modifier = { # Weight up for stress. + add = 30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = forgiving + } + modifier = { # Weight down for stress. + add = -30 + has_trait = cynical + } + } + } + + # You may go if you wish. + option = { + name = fp1_yearly.0691.c + + # Gain a little prestige. + add_prestige = minor_prestige_gain + # And the knight's gratitude. + reverse_add_opinion = { + target = scope:knight + modifier = grateful_opinion + opinion = 35 + } + # But lose the knight. + scope:knight = { select_and_move_to_pool_effect = yes } + + stress_impact = { + forgiving = major_stress_impact_loss + cynical = major_stress_impact_loss + vengeful = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = forgiving + } + modifier = { # Weight up for stress. + add = 30 + has_trait = cynical + } + modifier = { # Weight down for stress. + add = -30 + has_trait = vengeful + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + } + } +} + +# Set-up event for raiding. +fp1_yearly.0692 = { + hidden = yes + scope = army + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # We only want to convert to reformed faiths. + scope:county.faith = { + NOT = { has_doctrine_parameter = unreformed } + } + # Check various prerequisites with scope:raider. + scope:raider = { + # Scope:raider shouldn't have had this event recently either. + #NOT = { has_character_flag = had_event_fp1_yearly_0691 } + # We don't want all raiding to result in tons of variables floating about. + fp1_is_norse_tribal = yes + # There must be at least one eligible knight in the raid army. + any_knight = { fp1_0692_valid_convertable_knight_trigger = yes } + } + } + + immediate = { + # Designate a suitable knight. + scope:raider = { + random_knight = { + # Preferring those who might be more open to new ideas. + limit = { + fp1_0692_valid_convertable_knight_trigger = yes + OR = { + has_trait = humble + has_trait = honest + has_trait = ambitious + has_trait = gregarious + has_trait = arbitrary + has_trait = trusting + has_trait = fickle + } + } + # But otherwise just anyone valid. + alternative_limit = { fp1_0692_valid_convertable_knight_trigger = yes } + # Remember the county it happened in. + set_variable = { + name = raid_convert_county + value = scope:county + years = 5 + } + # And the faith they'd like to convert to. + set_variable = { + name = raid_convert_faith + value = scope:county.faith + years = 5 + } + } + } + } +} + + + + + + + + + + +################################################## +# SPECIAL YEARLIES + +################################################## +# A Mysterious Stranger Stays at Court +# by Ewan Cowhig Croft +# 1001 - 1030 +################################################## + +scripted_trigger valid_germanic_faith_trigger = { + #Small enough that it probably doesn't need a trigger, but might need to be more complex in future. + religion = religion:germanic_religion +} + +scripted_trigger valid_non_germanic_reformed_faith_trigger = { + NOR = { + faith = { has_doctrine_parameter = unreformed } + religion = religion:germanic_religion + } +} + +scripted_effect fp1_mysterious_stranger_follow_up_event_picker_effect = { + if = { + limit = { scope:ms_type = flag:godi } + trigger_event = fp1_yearly.1011 + } + else_if = { + limit = { scope:ms_type = flag:missionary } + trigger_event = fp1_yearly.1012 + } + else_if = { + limit = { scope:ms_type = flag:nithing } + trigger_event = fp1_yearly.1013 + } + else_if = { + limit = { scope:ms_type = flag:warrior } + trigger_event = fp1_yearly.1014 + } + #Trigger vagrant as the last possible thing. + else = { trigger_event = fp1_yearly.1015 } +} + +scripted_effect mysterious_stranger_disappears_effect = { + custom_tooltip = fp1_yearly.1001.mysterious_stranger_disappears.tt + hidden_effect = { + scope:stranger = { + death = { death_reason = death_vanished } + } + } +} + +# You notice a stranger has been hanging around the court. +fp1_yearly.1001 = { + type = character_event + title = fp1_yearly.1001.t + desc = { + desc = fp1_yearly.1001.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:sneaks } + desc = fp1_yearly.1001.desc.behaviour_1.sneaks + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:leaves_early } + desc = fp1_yearly.1001.desc.behaviour_1.leaves_early + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:earnest } + desc = fp1_yearly.1001.desc.behaviour_1.earnest + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:confident } + desc = fp1_yearly.1001.desc.behaviour_1.confident + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:talkative } + desc = fp1_yearly.1001.desc.behaviour_1.talkative + } + triggered_desc = { + trigger = { scope:ms_behaviour_1 = flag:eats_their_fill } + desc = fp1_yearly.1001.desc.behaviour_1.eats_their_fill + } + } + first_valid = { + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:sneaks } + desc = fp1_yearly.1001.desc.behaviour_2.sneaks + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:leaves_early } + desc = fp1_yearly.1001.desc.behaviour_2.leaves_early + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:earnest } + desc = fp1_yearly.1001.desc.behaviour_2.earnest + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:confident } + desc = fp1_yearly.1001.desc.behaviour_2.confident + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:talkative } + desc = fp1_yearly.1001.desc.behaviour_2.talkative + } + triggered_desc = { + trigger = { scope:ms_behaviour_2 = flag:eats_their_fill } + desc = fp1_yearly.1001.desc.behaviour_2.eats_their_fill + } + } + desc = fp1_yearly.1001.desc.outro + } + theme = intrigue + left_portrait = { + character = scope:stranger + animation = personality_honorable + } + override_background = { reference = feast } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #Standard checks. + is_available_even_at_war_adult = yes + is_landed = yes + NOT = { has_character_flag = had_event_fp1_yearly_1001 } + #Scandinavian culture group, and within Scandinavia (plus a few other places). + culture = { has_cultural_pillar = heritage_north_germanic } + capital_province ?= { geographical_region = dlc_fp1_region_mysterious_stranger_locations } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_1001 + days = 7300 + } + #Spawn a suitable mysterious stranger. + ##Each of these has a list of traits that overlap with 1-2 other spawnable categories, as well as some unique tells. + ##The idea is that they're structured enough to be able to guess (sorta) first time, but random enough that you won't always guess correctly. At the same time, learning the tells over time, and what makes a character definitely/definitely not a specific type of stranger, rewards repeated play. + random_list = { + #Spawn a godi. + 100 = { + #Requires some contact with Germanic Paganism. + trigger = { + OR = { + valid_germanic_faith_trigger = yes + any_sub_realm_county = { valid_germanic_faith_trigger = yes } + any_neighboring_top_liege_realm_owner = { valid_germanic_faith_trigger = yes } + } + } + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_godi_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:godi + } + #Figure out what faith the godi would actually have. + ##Only a random chance for now: this is to give same-religion separate-faith godis a chance to spawn if you're Germanic Pagan yourself. + random = { + chance = 50 + if = { + limit = { valid_germanic_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + if = { + limit = { + NOT = { exists = scope:ms_faith } + any_sub_realm_county = { valid_germanic_faith_trigger = yes } + } + random_sub_realm_county = { + limit = { valid_germanic_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { valid_germanic_faith_trigger = yes } + } + random_neighboring_top_liege_realm_owner = { + limit = { valid_germanic_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + else = { + #If you hit this stage, go back to your own Germanic Pagan faith. + faith = { save_scope_as = ms_faith } + } + } + #Spawn a missionary from a reformed faith. + 100 = { + #Requires some contact with a reformed faith that isn't Germanic Pagan. + trigger = { + OR = { + valid_non_germanic_reformed_faith_trigger = yes + any_sub_realm_county = { valid_non_germanic_reformed_faith_trigger = yes } + any_neighboring_top_liege_realm_owner = { valid_non_germanic_reformed_faith_trigger = yes } + } + } + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_reformed_missionary_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:missionary + } + #Figure out what faith the missionary would actually have. + if = { + limit = { valid_non_germanic_reformed_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + else_if = { + limit = { + any_sub_realm_county = { valid_non_germanic_reformed_faith_trigger = yes } + } + random_sub_realm_county = { + limit = { valid_non_germanic_reformed_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + else = { + random_neighboring_top_liege_realm_owner = { + limit = { valid_non_germanic_reformed_faith_trigger = yes } + faith = { save_scope_as = ms_faith } + } + } + } + #Spawn a nithing. + 100 = { + #No requirements. + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_nithing_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:nithing + } + } + #Spawn a warrior. + 100 = { + #No requirements. + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_warrior_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:warrior + } + } + #Spawn an ordinary vagrant. + ##These guys are the wild cards: they have no restrictions on anything, save that they suck at everything. Their job is to be confusing and make you uncertain. + 100 = { + #No requirements. + #Create the character & set up details for later. + create_character = { + location = root.capital_province + template = fp1_ms_vagrant_character + save_scope_as = stranger + } + save_scope_value_as = { + name = ms_type + value = flag:vagrant + } + } + } + #Set behaviours. + ##Each stranger type exhibits two of three possible behaviour patterns in the event description. All behaviour patterns overlap with at least one other stranger type, with the vagrant having access to all of them. + random_list = { + #Godi + 100 = { + trigger = { scope:ms_type = flag:godi } + random_list = { + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:sneaks + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:leaves_early + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:earnest + } + } + } + random_list = { + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:sneaks } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:sneaks + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:leaves_early } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:leaves_early + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:earnest } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:earnest + } + } + } + } + #Missionary + 100 = { + trigger = { scope:ms_type = flag:missionary } + random_list = { + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:confident + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:leaves_early + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:talkative + } + } + } + random_list = { + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:confident } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:confident + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:leaves_early } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:leaves_early + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:talkative } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:talkative + } + } + } + } + #Nithing + 100 = { + trigger = { scope:ms_type = flag:nithing } + random_list = { + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:sneaks + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:eats_their_fill + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:earnest + } + } + } + random_list = { + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:sneaks } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:sneaks + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:eats_their_fill } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:eats_their_fill + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:earnest } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:earnest + } + } + } + } + #Warrior + 100 = { + trigger = { scope:ms_type = flag:warrior } + random_list = { + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:confident + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:eats_their_fill + } + } + 33 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:talkative + } + } + } + random_list = { + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:confident } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:confident + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:eats_their_fill } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:eats_their_fill + } + } + 33 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:talkative } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:talkative + } + } + } + } + #Vagrant + 100 = { + trigger = { scope:ms_type = flag:vagrant } + random_list = { + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:sneaks + } + } + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:leaves_early + } + } + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:earnest + } + } + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:confident + } + } + 20 = { + save_scope_value_as = { + name = ms_behaviour_1 + value = flag:talkative + } + } + } + random_list = { + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:sneaks } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:sneaks + } + } + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:leaves_early } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:leaves_early + } + } + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:earnest } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:earnest + } + } + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:confident } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:confident + } + } + 20 = { + trigger = { + NOT = { scope:ms_behaviour_1 = flag:talkative } + } + save_scope_value_as = { + name = ms_behaviour_2 + value = flag:talkative + } + } + } + } + } + #And sometimes just remove an eye for funsies. + random = { + chance = 5 + scope:stranger = { add_trait = one_eyed } + } + } + + #Ignore them: they're probably harmless. + ##This leads to a standardised effect: something mildly beneficial/annoying, if the player is unsure or doesn't want to gamble much. + option = { + name = fp1_yearly.1001.a + + #Let the player know that something will happen. + custom_tooltip = fp1_yearly.1001.probably_harmless.tt + + #Configure for standard effects. + save_scope_value_as = { + name = ms_effect + value = flag:standard + } + + #Figure out which follow-up event to send. + fp1_mysterious_stranger_follow_up_event_picker_effect = yes + + stress_impact = { + trusting = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } + + #Make them a guest of honour! + ##This leads to a critical effect: we dial up the consequences, in case the player is certain they know who the stranger is/wants to risk it for a biscuit. + option = { + name = fp1_yearly.1001.b + + #Warn the player that they're signing up for a dramatic event. + custom_tooltip = fp1_yearly.1001.guest_of_honour.tt + + #Configure for critical effects. + save_scope_value_as = { + name = ms_effect + value = flag:critical + } + + #Figure out which follow-up event to send. + fp1_mysterious_stranger_follow_up_event_picker_effect = yes + + stress_impact = { + trusting = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 20 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -20 + has_trait = paranoid + } + } + } + + #Give 'em the boot. + ##Opt-out with mild consequence. + option = { + name = fp1_yearly.1001.c + + #The mysterious stranger vanishes. + mysterious_stranger_disappears_effect = yes + + #Everyone thinks you're a bit mean-spirited, but that's it. + if = { + limit = { has_character_modifier = generous_host_fp1_modifier } + remove_character_modifier = generous_host_fp1_modifier + } + else = { + add_character_modifier = { + modifier = stingy_host_fp1_modifier + years = 5 + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + shy = medium_stress_impact_loss + trusting = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = paranoid + } + modifier = { #Weight up for stress. + add = 20 + has_trait = shy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + has_trait = gregarious + } + } + } +} + +scripted_trigger mysterious_stranger_godi_same_faith_trigger = { + #Small enough that it probably doesn't need a trigger, but might need to be more complex in future. + faith = scope:ms_faith +} + +scripted_trigger mysterious_stranger_godi_same_religion_trigger = { + NOT = { mysterious_stranger_godi_same_faith_trigger = yes } + religion = scope:ms_faith.religion +} + +scripted_effect mysterious_stranger_add_possible_converts_to_specific_list_effect = { + random_in_list = { + list = possible_converts_pool_list + limit = { + NOT = { is_in_list = possible_converts_specific_list } + } + weight = { + base = 0 + #Give a base percentage chance, scale down 2% per point of learning. + modifier = { + add = { + value = 50 + subtract = learning + } + } + #Weight up assorted traits that make you more likely to believe the godi. + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 5 + has_trait = fickle + } + modifier = { + add = 10 + has_trait = trusting + } + } + add_to_list = possible_converts_specific_list + } +} + +scripted_effect mysterious_stranger_different_religion_convert_courtiers_effect = { + #Firstly, nab all the courtiers who might be susceptible to conversion, excepting any who'd mess you up too much. + every_courtier = { + limit = { + is_available_ai_adult = yes + #We only want to look at people of root's faith. + faith = root.faith + NOR = { + #Exclude the self-righteous. + has_trait = zealous + has_trait = faith_warrior + has_trait = heresiarch + has_trait = crusader_king + #Aaaand exclude the actually-righteous. + piety_level >= medium_piety_level + #We also don't want council conversions, since that could make for some awkward chaplains. + is_councillor_of = root + #Filter out likely heirs, so that we don't mess up succession too much. + is_primary_heir_of = root + is_player_heir_of = root + } + } + add_to_list = possible_converts_pool_list + } + #Nab specific courtiers for conversion. + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + #Nab even more if it's a a critical effect. + if = { + limit = { scope:ms_effect = flag:critical } + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + mysterious_stranger_add_possible_converts_to_specific_list_effect = yes + } +} + +# Results: Godi. +fp1_yearly.1011 = { + type = character_event + title = fp1_yearly.1011.t + desc = { + first_valid = { + #Critical - separate religion. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + NOR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + desc = fp1_yearly.1011.desc.separate_religion.critical + } + #Standard - separate religion. + triggered_desc = { + trigger = { + scope:ms_effect = flag:standard + NOR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + desc = fp1_yearly.1011.desc.separate_religion.standard + } + #Critical - same religion, separate faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + mysterious_stranger_godi_same_religion_trigger = yes + } + desc = fp1_yearly.1011.desc.same_religion.critical + } + #Standard - same religion, separate faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:standard + mysterious_stranger_godi_same_religion_trigger = yes + } + desc = fp1_yearly.1011.desc.same_religion.standard + } + #Critical - same faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + mysterious_stranger_godi_same_faith_trigger = yes + } + desc = fp1_yearly.1011.desc.same_faith.critical + } + #Standard - same faith (fallback). + desc = fp1_yearly.1011.desc.same_faith.standard + } + } + theme = intrigue + left_portrait = { + character = scope:stranger + #The Godi respects fellow Germanic Pagans. + triggered_animation = { + trigger = { + root = { + OR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + } + animation = personality_zealous + } + #Less so those outside their religion. + triggered_animation = { + trigger = { + root = { + NAND = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + } + animation = anger + } + } + override_background = { reference = bedchamber } + + immediate = { + scope:stranger = { + #Boost education by a step. + ##Ordered backwards so that they don't sequentially overwrite each other. + if = { + limit = { has_trait = education_learning_3 } + hidden_effect = { remove_trait = education_learning_3 } + add_trait = education_learning_4 + } + if = { + limit = { has_trait = education_learning_2 } + hidden_effect = { remove_trait = education_learning_2 } + add_trait = education_learning_3 + } + if = { + limit = { has_trait = education_learning_1 } + hidden_effect = { remove_trait = education_learning_1 } + add_trait = education_learning_2 + } + if = { + limit = { has_trait = education_intrigue_3 } + hidden_effect = { remove_trait = education_intrigue_3 } + add_trait = education_intrigue_4 + } + if = { + limit = { has_trait = education_intrigue_2 } + hidden_effect = { remove_trait = education_intrigue_2 } + add_trait = education_intrigue_3 + } + if = { + limit = { has_trait = education_intrigue_1 } + hidden_effect = { remove_trait = education_intrigue_1 } + add_trait = education_intrigue_2 + } + #Boost stats. + add_diplomacy_skill = { 5 10 } + add_martial_skill = { 5 10 } + add_stewardship_skill = { 3 8 } + add_intrigue_skill = { 10 15 } + add_learning_skill = { 10 15 } + add_prowess_skill = { 5 10 } + #Change faith. + hidden_effect = { set_character_faith = scope:ms_faith } + #Finally: give them an eye-patch, assuming they're going to impersonate Odin. And aren't already missing an eye. + if = { + limit = { + religion = root.religion + NOT = { has_trait = one_eyed } + } + add_character_flag = wears_fake_eye_patch + } + #Reveal the godi's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + #Organise a list of courtiers who might be affected for conversion. + mysterious_stranger_different_religion_convert_courtiers_effect = yes + #Godi is not even of your religion, giving negative effects. + if = { + limit = { + NOR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + #If the godi is not of your religion, they convert a bunch of your courtiers. + every_in_list = { + list = possible_converts_specific_list + custom = fp1_yearly.1011.possible_converts_specific_list + set_character_faith = scope:ms_faith + } + #You also lose some piety, or realm priest opinion if appropriate. Amount depends on whether you endorsed the godi or not. + if = { + limit = { scope:ms_effect = flag:critical } + if = { + limit = { + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + #Double-check that they actually have a realm priest at the moment. + any_learning_councillor = { exists = this } + } + add_piety = medium_piety_loss + every_learning_councillor = { + add_opinion = { + target = root + modifier = fp1_honoured_heathen_opinion + } + } + } + else = { add_piety = major_piety_loss } + } + else = { add_piety = medium_piety_loss } + } + #Godi is of your religion, but not of your faith. + else_if = { + limit = { mysterious_stranger_godi_same_religion_trigger = yes } + #Better piety gain if you endorsed them. + if = { + limit = { scope:ms_effect = flag:critical } + add_piety = medium_piety_gain + } + else = { add_piety = minor_piety_gain } + } + #Otherwise, the godi is of your faith. + else = { + #As elsewhere, better piety gain if you endorsed them. + if = { + limit = { scope:ms_effect = flag:critical } + add_piety = major_piety_gain + } + else = { add_piety = medium_piety_gain } + } + } + + #Surely that cannot *truly* have been the Allfather? [spoilers: it wasn't] + option = { + name = fp1_yearly.1011.a + trigger = { + OR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + + #The godi vanishes. + mysterious_stranger_disappears_effect = yes + + ai_chance = { + #Only option. + base = 100 + } + } + + #Bastard! + option = { + name = fp1_yearly.1011.b + trigger = { + NOR = { + mysterious_stranger_godi_same_faith_trigger = yes + mysterious_stranger_godi_same_religion_trigger = yes + } + } + + #The godi vanishes. + mysterious_stranger_disappears_effect = yes + + ai_chance = { + #Only option. + base = 100 + } + } +} + +# Results: Reformed Missionary. +fp1_yearly.1012 = { + type = character_event + title = fp1_yearly.1012.t + desc = { + first_valid = { + #Critical - different faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + faith != scope:ms_faith + } + desc = fp1_yearly.1012.desc.different_faith.critical + } + #Standard - different faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:standard + faith != scope:ms_faith + } + desc = fp1_yearly.1012.desc.different_faith.standard + } + #Critical - same faith. + triggered_desc = { + trigger = { + scope:ms_effect = flag:critical + faith = scope:ms_faith + } + desc = fp1_yearly.1012.desc.same_faith.critical + } + #Standard - same faith (fallback). + desc = fp1_yearly.1012.desc.same_faith.standard + } + } + theme = intrigue + left_portrait = { + character = scope:stranger + #The missionary is pleased if they share your faith. + triggered_animation = { + trigger = { + root = { faith = scope:ms_faith } + } + animation = happiness + } + #Otherwise, they'll pray for you. + triggered_animation = { + trigger = { + NOT = { + root = { faith = scope:ms_faith } + } + } + animation = personality_zealous + } + } + override_background = { reference = bedchamber } + + immediate = { + scope:stranger = { + #Boost education by a step. + ##Ordered backwards so that they don't sequentially overwrite each other. + if = { + limit = { has_trait = education_learning_3 } + hidden_effect = { remove_trait = education_learning_3 } + add_trait = education_learning_4 + } + if = { + limit = { has_trait = education_learning_2 } + hidden_effect = { remove_trait = education_learning_2 } + add_trait = education_learning_3 + } + if = { + limit = { has_trait = education_learning_1 } + hidden_effect = { remove_trait = education_learning_1 } + add_trait = education_learning_2 + } + #Boost stats. + add_diplomacy_skill = { 5 10 } + add_martial_skill = { 5 10 } + add_stewardship_skill = { 3 8 } + add_intrigue_skill = { 5 10 } + add_learning_skill = { 10 15 } + add_prowess_skill = { 5 10 } + add_trait = theologian + #Change faith. + hidden_effect = { set_character_faith = scope:ms_faith } + #If scope:stranger's faith allows monks, make them a monk. + if = { + limit = { + faith = { has_doctrine_parameter = take_vows_active } + } + add_trait = devoted + #Huahua! Don't you see, they were wearing a toupee the whole time! + } + #Reveal the missionary's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + #Organise a list of courtiers who might be affected for conversion. + mysterious_stranger_different_religion_convert_courtiers_effect = yes + #The missionary does not share your faith. + if = { + limit = { + faith != scope:ms_faith + } + #They convert a bunch of your courtiers. + every_in_list = { + list = possible_converts_specific_list + custom = fp1_yearly.1012.possible_converts_specific_list + set_character_faith = scope:ms_faith + } + #You also lose some piety, or realm priest opinion if appropriate. Amount depends on whether you endorsed the missionary or not. + if = { + limit = { scope:ms_effect = flag:critical } + if = { + limit = { + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + #Double-check that they actually have a realm priest at the moment. + any_learning_councillor = { exists = this } + } + add_piety = medium_piety_loss + every_learning_councillor = { + add_opinion = { + target = root + modifier = fp1_honoured_heathen_opinion + } + } + } + else = { add_piety = major_piety_loss } + } + else = { add_piety = medium_piety_loss } + } + #Otherwise, the missionary has the same faith as you. + else = { + #If endorsed, they offers you a hook on & opinion with your realm priest (assuming such is valid). + if = { + limit = { + scope:ms_effect = flag:critical + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + #Double-check that you actually have a realm priest, and that a weak hook can be added. + any_learning_councillor = { + exists = this + save_temporary_scope_as = learning_councillor + root = { + can_add_hook = { + type = favor_hook + target = scope:learning_councillor + } + } + } + } + random_learning_councillor = { + limit = { + can_add_hook = { + type = favor_hook + target = root + } + } + save_temporary_scope_as = learning_councillor + root = { + add_hook = { + type = favor_hook + target = scope:learning_councillor + } + } + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + add_piety = medium_piety_gain + } + #Otherwise, they just offers you more piety when endorsed. + else_if = { + limit = { scope:ms_effect = flag:critical } + add_piety = major_piety_gain + } + #Otherwise, you just get a bit of piety. + else = { add_piety = medium_piety_gain } + } + } + + #Different faith: they offer to convert you, you accept. + option = { + name = fp1_yearly.1012.a + trigger = { + faith != scope:ms_faith + #Block the AI from making stupid conversions. + OR = { + is_ai = no + AND = { + scope:ms_faith.fervor >= 30 + OR = { + AND = { + faith.fervor <= 25 + has_trait = cynical + } + AND = { + faith.fervor <= 15 + NOT = { has_trait = zealous } + } + faith.fervor <= 5 + } + } + } + } + + #Perform the conversion. + set_character_faith_with_conversion = scope:ms_faith + + #Recoup lost piety, and get paid a little extra. + custom_tooltip = fp1_yearly.1012.a.recoup_lost_piety.tt + hidden_effect = { + if = { + limit = { scope:ms_effect = flag:critical } + add_piety_no_experience = major_piety_gain + #^Technically, you gain a little extra here if you have a theocratic faith, but adding another scripted trigger in just these two spots would make the event very hard to read. + } + else = { add_piety_no_experience = medium_piety_gain } + } + if = { + limit = { scope:ms_effect = flag:critical } + add_piety = medium_piety_gain + } + else = { add_piety = minor_piety_gain } + + stress_impact = { + cynical = minor_stress_impact_loss + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -30 + has_trait = zealous + } + } + } + + #Different faith: they offer to convert you, you turn them down, they leave. + option = { + name = fp1_yearly.1012.b + trigger = { + faith != scope:ms_faith + } + + #The missionary vanishes. + mysterious_stranger_disappears_effect = yes + + stress_impact = { + forgiving = minor_stress_impact_loss + cynical = minor_stress_impact_loss + vengeful = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_vengefulness = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = forgiving + } + modifier = { #Weight up for stress. + add = 10 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -10 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -10 + has_trait = zealous + } + } + } + + #Different faith: they offer to convert you, you have them tossed in the dungeon. + option = { + name = fp1_yearly.1012.c + trigger = { + faith != scope:ms_faith + } + + imprison = { + target = scope:stranger + type = dungeon + } + + stress_impact = { + vengeful = minor_stress_impact_loss + zealous = medium_stress_impact_loss + forgiving = minor_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.25 + ai_vengefulness = 0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = vengeful + } + modifier = { #Weight up for stress. + add = 20 + has_trait = zealous + } + modifier = { #Weight down for stress. + add = -10 + has_trait = forgiving + } + modifier = { #Weight down for stress. + add = -20 + has_trait = cynical + } + } + } + + #Same faith: offers to stay, you accept. + option = { + name = fp1_yearly.1012.d + trigger = { faith = scope:ms_faith } + + #Add the (rather chuffed) courtier to your court. + add_courtier = scope:stranger + reverse_add_opinion = { + target = scope:stranger + modifier = pleased_opinion + opinion = 30 + } + + stress_impact = { + trusting = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_zeal = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } + + #Same faith: offers to stay, you decline. + option = { + name = fp1_yearly.1012.e + trigger = { faith = scope:ms_faith} + + #The missionary vanishes. + mysterious_stranger_disappears_effect = yes + + stress_impact = { + paranoid = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.25 + ai_rationality = -0.25 + } + modifier = { #Weight up for stress. + add = 20 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -10 + has_trait = gregarious + } + } + } +} + +# Results: Nithing. +fp1_yearly.1013 = { + type = character_event + title = fp1_yearly.1013.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:ms_effect = flag:critical } + desc = fp1_yearly.1013.desc.critical + } + desc = fp1_yearly.1013.desc.standard + } + first_valid = { + triggered_desc = { + trigger = { + scope:stranger = { has_trait = sodomite } + } + desc = fp1_yearly.1013.desc.outro.sodomite + } + desc = fp1_yearly.1013.desc.outro + } + } + theme = intrigue + left_portrait = { + character = scope:stranger + triggered_animation = { + trigger = { + scope:stranger = { has_trait = sodomite } + } + animation = stress + } + triggered_animation = { + trigger = { + NOT = { + scope:stranger = { has_trait = sodomite } + } + } + animation = schadenfreude + } + } + override_background = { reference = study } + + immediate = { + scope:stranger = { + #Boost education by two steps. + if = { + limit = { has_trait = education_martial_1 } + hidden_effect = { remove_trait = education_martial_1 } + add_trait = education_martial_3 + } + if = { + limit = { has_trait = education_intrigue_1 } + hidden_effect = { remove_trait = education_intrigue_1 } + add_trait = education_intrigue_3 + } + #Boost stats. + add_diplomacy_skill = { 3 5 } + add_martial_skill = { 8 12 } + add_stewardship_skill = { 3 5 } + add_intrigue_skill = { 8 12 } + add_learning_skill = { 3 5 } + add_prowess_skill = { 5 10 } + #Add nithing things. + nithing_character_creation_scripted_effect = yes + #Give them a suitable crime. + random_list = { + 65 = { add_trait = murderer } + 25 = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + add_trait = witch + } + 10 = { + trigger = { + is_male = yes + faith = { has_doctrine = doctrine_homosexuality_crime } + } + add_trait = sodomite + } + } + #Reveal the nithing's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + #The nithing robs you, with a harsher effect if you endorsed them! + if = { + limit = { scope:ms_effect = flag:critical } + save_scope_value_as = { + name = nithing_stolen_loot + value = massive_gold_value + } + } + else = { + save_scope_value_as = { + name = nithing_stolen_loot + value = major_gold_value + } + } + remove_short_term_gold = scope:nithing_stolen_loot + } + + #Curses! + option = { + name = { + trigger = { + NOT = { + scope:stranger = { has_trait = sodomite } + } + } + text = fp1_yearly.1013.a + } + name = { + trigger = { + scope:stranger = { has_trait = sodomite } + } + text = fp1_yearly.1013.a.sodomite + } + + #The nithing vanishes. + mysterious_stranger_disappears_effect = yes + + #No stress: the player has just eaten a nasty result. + ai_chance = { + #Only option. + base = 100 + } + } + + #I will not rest till that nithing is found! (rage outlet for angry players) + option = { + name = fp1_yearly.1013.b + trigger = { is_ai = no } + + #Make the nithing a wanted individual. + scope:stranger = { + #The nithing runs for it. + hidden_effect = { + move_to_pool = yes + # And give them their ill-gotten earnings. + ## We do this here so that their dying doesn't just give you or anyone else the cash back otherwise. + add_gold = scope:nithing_stolen_loot + } + #But they've made a powerful enemy! + set_relation_rival = { + target = root + reason = rival_nithing + } + } + + + stress_impact = { + #Minor penalty for RP reasons: we've already given the player a hefty negative, no need to pile on. + forgiving = minor_stress_impact_loss + vengeful = major_stress_impact_loss + } + ai_chance = { + #Irrelevant option. + base = 100 + } + } +} + +# Results: Warrior. +fp1_yearly.1014 = { + type = character_event + title = fp1_yearly.1014.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:ms_effect = flag:critical } + desc = fp1_yearly.1014.desc.critical + } + desc = fp1_yearly.1014.desc.standard + } + desc = fp1_yearly.1014.desc.outro + } + theme = intrigue + left_portrait = { + character = scope:stranger + animation = personality_bold + } + override_background = { reference = corridor_night } + + immediate = { + #If they were endorsed, the warrior gets better stats than they would otherwise. + if = { + limit = { scope:ms_effect = flag:critical } + scope:stranger = { + #Boost education by two steps. + if = { + limit = { has_trait = education_martial_1 } + hidden_effect = { remove_trait = education_martial_1 } + add_trait = education_martial_3 + } + if = { + limit = { has_trait = education_intrigue_1 } + hidden_effect = { remove_trait = education_intrigue_1 } + add_trait = education_intrigue_3 + } + #Boost stats. + add_diplomacy_skill = { 3 5 } + add_martial_skill = { 10 12 } + add_stewardship_skill = { 3 5 } + add_intrigue_skill = { 3 5 } + add_learning_skill = { 3 5 } + add_prowess_skill = { 14 18 } + #Give him a reputation. + add_prestige_level = 2 + #Slight chance to add an additional trait or two. + random_list = { + 25 = { + trigger = { exists = title:e_byzantium.holder } + add_trait = varangian + } + 25 = { add_trait = berserker } + 25 = { add_trait = physique_good_2 } + 25 = { + add_trait = lifestyle_blademaster + add_trait_xp = { + trait = lifestyle_blademaster + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + } + #Reveal the warrior's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + } + else = { + scope:stranger = { + #Boost education by one step. + if = { + limit = { has_trait = education_martial_1 } + hidden_effect = { remove_trait = education_martial_1 } + add_trait = education_martial_2 + } + if = { + limit = { has_trait = education_intrigue_1 } + hidden_effect = { remove_trait = education_intrigue_1 } + add_trait = education_intrigue_2 + } + #Boost stats. + add_diplomacy_skill = { 3 5 } + add_martial_skill = { 5 10 } + add_stewardship_skill = { 3 5 } + add_intrigue_skill = { 3 5 } + add_learning_skill = { 3 5 } + add_prowess_skill = { 8 12 } + #Slight chance to add an additional trait or two. + random_list = { + 50 = {} + 12 = { + trigger = { exists = title:e_byzantium.holder } + add_trait = varangian + } + 12 = { add_trait = berserker } + 12 = { add_trait = physique_good_1 } + 14 = { + add_trait = lifestyle_blademaster + add_trait_xp = { + trait = lifestyle_blademaster + value = { + integer_range = { + min = small_lifestyle_random_xp_low + max = small_lifestyle_random_xp_high + } + } + } + } + } + #Reveal the warrior's true stats. + hidden_effect = { force_character_skill_recalculation = yes } + } + } + } + + #I'll certainly hire you! + option = { + name = fp1_yearly.1014.a + + #Gain the warrior, who is also pretty happy to be here. + add_courtier = scope:stranger + reverse_add_opinion = { + target = scope:stranger + modifier = loyal_servant + } + + #And pay the price. + if = { + limit = { scope:ms_effect = flag:critical } + remove_short_term_gold = medium_gold_value + } + else = { remove_short_term_gold = minor_gold_value } + + stress_impact = { + gregarious = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + #Always a no if the AI can't afford the warrior. + base = -1000 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = -0.5 + } + #Enable option for the AI if they've the gold to spare. + modifier = { + add = 1000 + scope:ms_effect = flag:critical + short_term_gold >= medium_gold_value + } + modifier = { + add = 1000 + scope:ms_effect = flag:standard + short_term_gold >= minor_gold_value + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -20 + has_trait = greedy + } + } + } + + #Pass. Move along, Conan. + option = { + name = fp1_yearly.1014.b + + #The warrior vanishes. + mysterious_stranger_disappears_effect = yes + + #Have some mild consolation prestige + add_prestige = minor_prestige_gain + + stress_impact = { + greedy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_sociability = -0.5 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = greedy + } + modifier = { #Weight down for stress. + add = -10 + has_trait = gregarious + } + } + } +} + +# Results: Vagrant. +fp1_yearly.1015 = { + type = character_event + title = fp1_yearly.1015.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:ms_effect = flag:critical } + desc = fp1_yearly.1015.desc.critical + } + desc = fp1_yearly.1015.desc.standard + } + desc = fp1_yearly.1015.desc.outro + } + theme = intrigue + #The vagrant's reaction varies a bit depending on your treatment of them. + left_portrait = { + character = scope:stranger + triggered_animation = { + trigger = { scope:ms_effect = flag:critical } + animation = ecstasy + } + triggered_animation = { + trigger = { scope:ms_effect = flag:standard } + animation = happiness + } + } + override_background = { reference = corridor_night } + + immediate = { + #Vagrants get no stat reveal, as they genuinely suck. + #Lose a bit of prestige for letting them hang around so long, losing more if you endorsed them. + if = { + limit = { scope:ms_effect = flag:critical } + add_prestige = medium_prestige_loss + } + else = { add_prestige = minor_prestige_loss } + } + + #Eh, I guess you can stay here. + option = { + name = fp1_yearly.1015.a + + #You gain the vagrant as a courtier + add_courtier = scope:stranger + #And a hook on them: weak if you didn't endorse them, strong if you did. + if = { + limit = { scope:ms_effect = flag:critical } + add_hook = { + type = loyalty_hook + target = scope:stranger + } + } + else = { + add_hook = { + type = favor_hook + target = scope:stranger + years = 50 #You did literally scoop them up off the streets. They won't soon forget that. + } + } + #Either way, they think more of you for it. + reverse_add_opinion = { + target = scope:stranger + modifier = loyal_servant + } + + stress_impact = { + gregarious = minor_stress_impact_loss + humble = medium_stress_impact_loss + shy = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = gregarious + } + modifier = { #Weight up for stress. + add = 20 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -10 + has_trait = shy + } + modifier = { #Weight down for stress. + add = -20 + has_trait = arrogant + } + } + } + + #What?! Get out! + option = { + name = fp1_yearly.1015.b + + #The vagrant vanishes. + mysterious_stranger_disappears_effect = yes + + stress_impact = { + shy = minor_stress_impact_loss + arrogant = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.5 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = shy + } + modifier = { #Weight up for stress. + add = 20 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -10 + has_trait = gregarious + } + modifier = { #Weight down for stress. + add = -20 + has_trait = humble + } + } + } +} + +# Big RIP to fp1_yearly.1031 through fp1_yearly.1061: it would have been the greatest and bestest event chain ever, but alas, it has been cut, and now no one shall know of its grandeur. It was too beautiful for this world. + +################################################## +# Commissioning a Longship for a Funeral +# by Ewan Cowhig Croft +# 1061 - 1070 +################################################## + +scripted_trigger fp1_funeral_longship_generic_mourner_trigger = { + is_landed = yes + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_1062 } + faith = root.faith + NOR = { + any_relation = { + type = rival + this = root + } + AND = { + is_ai = yes + opinion = { + target = root + value >= low_negative_opinion + } + } + } +} + +scripted_trigger fp1_funeral_longship_likes_parties = { + has_trait = lifestyle_reveler + has_trait_xp = { + trait = lifestyle_reveler + value >= 100 + } + # Faith must not consider this a bad thing. + faith = { + NOT = { trait_is_virtue = shy } + } +} + +scripted_trigger fp1_funeral_longship_likes_duels = { + has_trait = lifestyle_blademaster + has_trait_xp = { + trait = lifestyle_blademaster + value >= 100 + } + # Faith must not consider this a bad thing. + faith = { + NOT = { has_doctrine_parameter = holy_wars_forbidden } + } +} + +scripted_trigger fp1_funeral_longship_likes_hunting = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + # Faith must not consider this a bad thing. + faith = { + NOT = { has_doctrine_parameter = holy_wars_forbidden } + } +} + +scripted_trigger fp1_funeral_longship_likes_magic = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + # Faith must consider this an actively good thing (since Norse paganism's complicated relationship with witchcraft _tended_ towards the negative). + faith = { has_doctrine_parameter = witchcraft_accepted } +} + + +# The family member is earmarked. +fp1_yearly.1061 = { + hidden = yes + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # 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 = { + faith = { has_doctrine_parameter = sky_burials_active } + } + # And we shouldn't really be erecting glorious mounds to long lives that were actually cut short too early. + age >= 30 + # Must be significant in some way. + OR = { + highest_held_title_tier >= tier_duchy + piety_level >= high_prestige_level + prestige_level >= high_piety_level + # Monarch of Parties. + fp1_funeral_longship_likes_parties = yes + # Monarch of Duels. + fp1_funeral_longship_likes_duels = yes + # Monarch of Hunting. + fp1_funeral_longship_likes_hunting = yes + # Monarch of Magic. + fp1_funeral_longship_likes_magic = yes + } + # With a landed player heir of at least duchy tier, or close family, a soulmate, or best friend who's the same. + OR = { + player_heir ?= { fp1_funeral_longship_generic_mourner_trigger = yes } + any_close_family_member = { fp1_funeral_longship_generic_mourner_trigger = yes } + any_relation = { + type = soulmate + fp1_funeral_longship_generic_mourner_trigger = yes + } + any_relation = { + type = best_friend + fp1_funeral_longship_generic_mourner_trigger = yes + } + } + } + + immediate = { + save_scope_as = ship_funeral_candidate + # Determine why they were a big deal. + ## First check their title tier. + if = { + limit = { highest_held_title_tier = tier_duchy } + save_scope_value_as = { + name = reason_title + value = flag:duchy + } + } + else_if = { + limit = { highest_held_title_tier = tier_kingdom } + save_scope_value_as = { + name = reason_title + value = flag:kingdom + } + } + else_if = { + limit = { highest_held_title_tier = tier_empire } + save_scope_value_as = { + name = reason_title + value = flag:empire + } + } + ## Then look at their prestige/piety levels. + if = { + limit = { prestige_level = high_prestige_level } + save_scope_value_as = { + name = reason_prestige + value = flag:high + } + } + else_if = { + limit = { prestige_level = very_high_prestige_level } + save_scope_value_as = { + name = reason_prestige + value = flag:very_high + } + } + else_if = { + limit = { prestige_level >= max_prestige_level } + save_scope_value_as = { + name = reason_prestige + value = flag:max + } + } + if = { + limit = { prestige_level = high_prestige_level } + save_scope_value_as = { + name = reason_piety + value = flag:high + } + } + else_if = { + limit = { prestige_level = very_high_prestige_level } + save_scope_value_as = { + name = reason_piety + value = flag:very_high + } + } + else_if = { + limit = { prestige_level >= max_prestige_level } + save_scope_value_as = { + name = reason_piety + value = flag:max + } + } + ## And finally their aptness at certain lifestyles. + ### Partying. + if = { + limit = { fp1_funeral_longship_likes_parties = yes } + save_scope_value_as = { + name = reason_lifestyle_partying + value = yes + } + } + ### Hunting. + if = { + limit = { fp1_funeral_longship_likes_duels = yes } + save_scope_value_as = { + name = reason_lifestyle_duelling + value = yes + } + } + ### Duels. + if = { + limit = { fp1_funeral_longship_likes_hunting = yes } + save_scope_value_as = { + name = reason_lifestyle_hunting + value = yes + } + } + ### Magic. + if = { + limit = { fp1_funeral_longship_likes_magic = yes } + save_scope_value_as = { + name = reason_lifestyle_magickerationing + value = yes + } + } + # Next, determine who gets to hold the funeral. + ## First, we compile a list. + if = { + limit = { + player_heir ?= { fp1_funeral_longship_generic_mourner_trigger = yes } + } + player_heir = { add_to_list = potential_mourners_list } + } + every_close_family_member = { + limit = { fp1_funeral_longship_generic_mourner_trigger = yes } + add_to_list = potential_mourners_list + } + every_relation = { + type = soulmate + limit = { fp1_funeral_longship_generic_mourner_trigger = yes } + add_to_list = potential_mourners_list + } + every_relation = { + type = best_friend + limit = { fp1_funeral_longship_generic_mourner_trigger = yes } + add_to_list = potential_mourners_list + } + ## Then, we grab the person in the list with the most direct connection, preferring player heirs, levelled relationships, then close family, in that order. Players get a generic boost up this list. + ordered_in_list = { + list = potential_mourners_list + order_by = { value = fp1_funeral_longship_preferred_mourner_value } + save_scope_as = mourner + } + # Finally, fire an event for scope:mourner to inform them that a ship burial is available. + if = { + limit = { exists = scope:mourner } + scope:mourner = { + # Set the used character flag here rather than later, so that scope:mourner doesn't queue up multiple ship funerals due to a wave of sudden bereavements. + add_character_flag = { + flag = had_event_fp1_yearly_1062 + days = 7300 + } + trigger_event = { + id = fp1_yearly.1062 + months = 2 + } + } + } + } +} + +# Inform scope:mourner of a valid ship burial. +fp1_yearly.1062 = { + type = character_event + title = fp1_yearly.1062.t + desc = fp1_yearly.1062.desc + theme = death + left_portrait = { + character = scope:mourner + animation = sadness + } + right_portrait = { + character = scope:ship_funeral_candidate + animation = personality_zealous + } + override_background = { reference = temple } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + 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 + } + + # A small stone ship. + option = { + name = fp1_yearly.1062.a + trigger = { + can_make_expensive_purchase_trigger = { PRICE = medium_gold_value } + } + + # Remove the appropriate amount of coin. + set_variable = { + name = ship_burial_reimbursement + value = medium_gold_value + } + remove_short_term_gold = medium_gold_value + # Set up the ship burial type scope. + save_scope_value_as = { + name = burial_type + value = flag:stone_small + } + # Inform & trigger next event. + custom_tooltip = fp1_yearly.1062.a.tt + trigger_event = { + id = fp1_yearly.1063 + months = 2 + } + + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.25 + ai_greed = -0.25 + ai_boldness = -0.25 + } + modifier = { # Weight up for stress. + add = 10 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -10 + has_trait = greedy + } + } + } + + # A grand stone ship. + option = { + name = fp1_yearly.1062.b + trigger = { + can_make_expensive_purchase_trigger = { PRICE = major_gold_value } + } + + # Remove the appropriate amount of coin. + set_variable = { + name = ship_burial_reimbursement + value = major_gold_value + } + remove_short_term_gold = major_gold_value + # Set up the ship burial type scope. + save_scope_value_as = { + name = burial_type + value = flag:stone_grand + } + # Inform & trigger next event. + custom_tooltip = fp1_yearly.1062.a.tt + trigger_event = { + id = fp1_yearly.1063 + months = 2 + } + + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_boldness = 0.25 + ai_zeal = 0.25 + ai_greed = -0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -20 + has_trait = greedy + } + } + } + + # An purpose-built ornate grave ship. + option = { + name = fp1_yearly.1062.c + trigger = { + can_make_expensive_purchase_trigger = { PRICE = massive_gold_value } + } + + # Remove the appropriate amount of coin. + set_variable = { + name = ship_burial_reimbursement + value = massive_gold_value + } + remove_treasury_or_gold = massive_treasury_or_gold_value + # Set up the ship burial type scope. + save_scope_value_as = { + name = burial_type + value = flag:wooden_ornate + } + # Inform & trigger next event. + custom_tooltip = fp1_yearly.1062.a.tt + trigger_event = { + id = fp1_yearly.1063 + months = 2 + } + + stress_impact = { + generous = major_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 0.5 + ai_greed = -0.75 + } + modifier = { # Weight up for stress. + add = 30 + has_trait = generous + } + modifier = { # Weight down for stress. + add = -30 + has_trait = greedy + } + } + } + + # This is all *outrageously* expensive. + option = { + name = fp1_yearly.1062.d + + # Lose prestige if you're related to scope:ship_funeral_candidate. + if = { + limit = { + OR = { + scope:ship_funeral_candidate.dynasty = scope:mourner.dynasty + scope:ship_funeral_candidate = { is_close_family_of = scope:mourner } + } + } + add_prestige = medium_prestige_loss + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + } + } + # Else, take a stress hit. + else = { + stress_impact = { + base = medium_stress_gain + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + } + } + + # Stress_impact handled in above if statements. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_boldness = -0.25 + ai_zeal = -0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = greedy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = generous + } + } + } +} + +scripted_effect fp1_funeral_longship_clear_variables_effect = { + remove_variable = candidate_achievement_count + remove_variable = ship_burial_reimbursement +} + +fp1_yearly.1063 = { + type = character_event + title = fp1_yearly.1063.t + desc = { + desc = fp1_yearly.1063.desc.intro + # Notable features of scop:ship_burial_candidate block. + ## Single achievement. + triggered_desc = { + trigger = { var:candidate_achievement_count = 1 } + desc = { + desc = fp1_yearly.1063.desc.achievements.single.intro + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_partying } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_duelling } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_hunting } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_magickerationing } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.single.outro + } + } + ## Two achievements. + triggered_desc = { + trigger = { var:candidate_achievement_count = 2 } + desc = { + desc = fp1_yearly.1063.desc.achievements.double.intro + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_partying } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_duelling } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_hunting } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_magickerationing } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.double.connector + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_partying + NOT = { scope:primary_reason = flag:reason_partying } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_duelling + NOT = { scope:primary_reason = flag:reason_duelling } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_hunting + NOT = { scope:primary_reason = flag:reason_hunting } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_magickerationing + NOT = { scope:primary_reason = flag:reason_magickerationing } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.double.outro + } + } + ## Three or more achievements. + triggered_desc = { + trigger = { var:candidate_achievement_count >= 3 } + desc = { + desc = fp1_yearly.1063.desc.achievements.triple.intro + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_partying } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_duelling } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_hunting } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { exists = scope:reason_lifestyle_magickerationing } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + NOT = { scope:primary_reason = flag:reason_title } + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + NOT = { scope:primary_reason = flag:reason_prestige } + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + NOT = { scope:primary_reason = flag:reason_piety } + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_partying + NOT = { scope:primary_reason = flag:reason_partying } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_duelling + NOT = { scope:primary_reason = flag:reason_duelling } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_hunting + NOT = { scope:primary_reason = flag:reason_hunting } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_magickerationing + NOT = { scope:primary_reason = flag:reason_magickerationing } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.triple.connector + first_valid = { + # Title tier. + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:duchy + NOR = { + scope:primary_reason = flag:reason_title + scope:secondary_reason = flag:reason_title + } + } + desc = fp1_yearly.1063.desc.achievements.title.duchy + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:kingdom + NOR = { + scope:primary_reason = flag:reason_title + scope:secondary_reason = flag:reason_title + } + } + desc = fp1_yearly.1063.desc.achievements.title.kingdom + } + triggered_desc = { + trigger = { + exists = scope:reason_title + scope:reason_title = flag:empire + NOR = { + scope:primary_reason = flag:reason_title + scope:secondary_reason = flag:reason_title + } + } + desc = fp1_yearly.1063.desc.achievements.title.empire + } + # Prestige level. + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:high + NOR = { + scope:primary_reason = flag:reason_prestige + scope:secondary_reason = flag:reason_prestige + } + } + desc = fp1_yearly.1063.desc.achievements.prestige.high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:very_high + NOR = { + scope:primary_reason = flag:reason_prestige + scope:secondary_reason = flag:reason_prestige + } + } + desc = fp1_yearly.1063.desc.achievements.prestige.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_prestige + scope:reason_prestige = flag:max + NOR = { + scope:primary_reason = flag:reason_prestige + scope:secondary_reason = flag:reason_prestige + } + } + desc = fp1_yearly.1063.desc.achievements.prestige.max + } + # Piety level. + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:high + NOR = { + scope:primary_reason = flag:reason_piety + scope:secondary_reason = flag:reason_piety + } + } + desc = fp1_yearly.1063.desc.achievements.piety.high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:very_high + NOR = { + scope:primary_reason = flag:reason_piety + scope:secondary_reason = flag:reason_piety + } + } + desc = fp1_yearly.1063.desc.achievements.piety.very_high + } + triggered_desc = { + trigger = { + exists = scope:reason_piety + scope:reason_piety = flag:max + NOR = { + scope:primary_reason = flag:reason_piety + scope:secondary_reason = flag:reason_piety + } + } + desc = fp1_yearly.1063.desc.achievements.piety.max + } + # Lifestyles. + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_partying + NOR = { + scope:primary_reason = flag:reason_partying + scope:secondary_reason = flag:reason_partying + } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.partying + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_duelling + NOR = { + scope:primary_reason = flag:reason_duelling + scope:secondary_reason = flag:reason_duelling + } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.duelling + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_hunting + NOR = { + scope:primary_reason = flag:reason_hunting + scope:secondary_reason = flag:reason_hunting + } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.hunting + } + triggered_desc = { + trigger = { + exists = scope:reason_lifestyle_magickerationing + NOR = { + scope:primary_reason = flag:reason_magickerationing + scope:secondary_reason = flag:reason_magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.lifestyles.magickerationing + } + } + desc = fp1_yearly.1063.desc.achievements.triple.outro + } + } + # Burial type block. + ## Small stone ship. + triggered_desc = { + trigger = { scope:burial_type = flag:stone_small } + desc = fp1_yearly.1063.desc.ship_stone_small + } + ## Grand stone ship. + triggered_desc = { + trigger = { scope:burial_type = flag:stone_grand } + desc = fp1_yearly.1063.desc.ship_stone_grand + } + ## Ornate wooden ship. + triggered_desc = { + trigger = { scope:burial_type = flag:wooden_ornate } + desc = fp1_yearly.1063.desc.ship_wood_ornate + } + desc = fp1_yearly.1063.desc.outro + } + theme = death + left_portrait = { + character = scope:mourner + animation = grief + } + right_portrait = { + character = scope:ship_funeral_candidate + animation = sadness + } + override_background = { reference = temple } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + 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 + } + + on_trigger_fail = { + # Return invested monies. + send_interface_toast = { + title = fp1_yearly.1063.trigger_failure.tt + left_icon = scope:ship_funeral_candidate + add_gold = var:ship_burial_reimbursement + } + # Clear up variables. + fp1_funeral_longship_clear_variables_effect = yes + } + + immediate = { + # Work out how many achievements scope:ship_funeral_candidate actually had. + set_variable = { + name = candidate_achievement_count + value = 0 + } + ## First, tier. + if = { + limit = { exists = scope:reason_title } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + ## Then, prestige. + if = { + limit = { exists = scope:reason_prestige } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + ## Next, piety. + if = { + limit = { exists = scope:reason_piety } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + ## Finally, lifestyles. + if = { + limit = { exists = scope:reason_lifestyle_partying } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + if = { + limit = { exists = scope:reason_lifestyle_duelling } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + if = { + limit = { exists = scope:reason_lifestyle_hunting } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + if = { + limit = { exists = scope:reason_lifestyle_magickerationing } + change_variable = { + name = candidate_achievement_count + add = 1 + } + } + # Flag reasons so that they don't repeat; due to variable issues, we just calc this every time. + # Primary reason. + ## comment_folder = { + # Cycle through tier. + if = { + limit = { exists = scope:reason_title } + save_scope_value_as = { + name = primary_reason + value = flag:reason_title + } + } + # Then prestige. + else_if = { + limit = { exists = scope:reason_prestige } + save_scope_value_as = { + name = primary_reason + value = flag:reason_prestige + } + } + # Piety. + else_if = { + limit = { exists = scope:reason_piety } + save_scope_value_as = { + name = primary_reason + value = flag:reason_piety + } + } + # And lifestyles. + else_if = { + limit = { exists = scope:reason_lifestyle_partying } + save_scope_value_as = { + name = primary_reason + value = flag:reason_partying + } + } + else_if = { + limit = { exists = scope:reason_lifestyle_duelling } + save_scope_value_as = { + name = primary_reason + value = flag:reason_duelling + } + } + else_if = { + limit = { exists = scope:reason_lifestyle_hunting } + save_scope_value_as = { + name = primary_reason + value = flag:reason_hunting + } + } + else_if = { + limit = { exists = scope:reason_lifestyle_magickerationing } + save_scope_value_as = { + name = primary_reason + value = flag:reason_magickerationing + } + } + ##} + # Secondary reason. + ## Comment folder for easy organisation = { + # Cycle through tier. + if = { + limit = { + exists = scope:reason_title + NOT = { scope:primary_reason = flag:reason_title } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_title + } + } + # Then prestige. + else_if = { + limit = { + exists = scope:reason_prestige + NOT = { scope:primary_reason = flag:reason_prestige } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_prestige + } + } + # Piety. + else_if = { + limit = { + exists = scope:reason_piety + NOT = { scope:primary_reason = flag:reason_piety } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_piety + } + } + # And lifestyles. + else_if = { + limit = { + exists = scope:reason_lifestyle_partying + NOT = { scope:primary_reason = flag:reason_partying } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_partying + } + } + else_if = { + limit = { + exists = scope:reason_lifestyle_duelling + NOT = { scope:primary_reason = flag:reason_duelling } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_duelling + } + } + else_if = { + limit = { + exists = scope:reason_lifestyle_hunting + NOT = { scope:primary_reason = flag:reason_hunting } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_hunting + } + } + else_if = { + limit = { + exists = scope:reason_lifestyle_magickerationing + NOT = { scope:primary_reason = flag:reason_magickerationing } + } + save_scope_value_as = { + name = secondary_reason + value = flag:reason_magickerationing + } + } + ##} + # If scope:ship_funeral_candidate is a hunter, set up a suitable place for them to have been hunting (for loc). + scope:ship_funeral_candidate = { + if = { + limit = { + hunt_lifestyle_track_greater_equal_trigger = { TRACK = hunter GREATER_EQUAL = 100 } + } + if = { + limit = { highest_held_title_tier >= tier_county } + primary_title = { save_scope_as = hunting_lands } + } + else = { + scope:mourner.primary_title = { save_scope_as = hunting_lands } + } + } + } + } + + # Boats to boats, tumuli to tumuli. + option = { + name = fp1_yearly.1063.a + + # Small stone ships give a modest chunk. + if = { + limit = { scope:burial_type = flag:stone_small } + add_prestige = minor_prestige_gain + } + # Grand stone ships give a decent chunk. + if = { + limit = { scope:burial_type = flag:stone_grand } + add_prestige = medium_prestige_gain + } + # Ornate wooden ships give a large chunk. + if = { + limit = { scope:burial_type = flag:wooden_ornate } + add_prestige = major_prestige_gain + } + # Stress relief is the same regardless of what level you opted for. + add_stress = major_stress_loss + + # No extra stress impact for single-option events, usually. + ai_chance = { + # Only option. + base = 100 + } + } + + after = { + # Clear up remaining values on the character. + fp1_funeral_longship_clear_variables_effect = yes + } +} + +################################################## +# Sparklingly Clean +# by Ewan Cowhig Croft +# 1071 - 1080 +################################################## + +# You decide to put a little extra effort into your appearance. +fp1_yearly.1071 = { + type = character_event + title = fp1_yearly.1071.t + desc = fp1_yearly.1071.desc + theme = physical_health + left_portrait = { + character = root + animation = happiness + } + override_background = { reference = bedchamber } + + trigger = { + # DLC check. + has_fp1_dlc_trigger = yes + # Standard checks. + is_available_at_peace_adult = yes + is_healthy = yes + NOT = { has_character_flag = had_event_fp1_yearly_1071 } + is_landed = yes + # Filter to flavour-appropriate characters. + fp1_is_norse = yes + } + + weight_multiplier = { + base = 1 + + # Weight up a bit for the healthy types. + modifier = { + add = 0.5 + has_trait = diligent + } + modifier = { + add = 0.5 + has_trait = whole_of_body + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_1071 + days = 3650 + } + } + + # Hygiene is the key to a long life! + option = { + name = fp1_yearly.1071.a + + # Add a modifier boosting health. + add_character_modifier = { + modifier = fp1_bathing_health_modifier + years = 10 + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.75 + ai_sociability = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # I suppose I could take a little extra care... + option = { + name = fp1_yearly.1071.b + + # Add a modifier boosting attraction. + add_character_modifier = { + modifier = fp1_bathing_attraction_modifier + years = 10 + } + + stress_impact = { + diligent = medium_stress_impact_loss + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.75 + ai_energy = 0.25 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = diligent + } + modifier = { # Weight down for stress. + add = -20 + has_trait = lazy + } + } + } + + # Just the usual is fine. + option = { + name = fp1_yearly.1071.c + + # Lose a bit of stress for taking it easy. + ## Stress loss handled in stress_impact. + + stress_impact = { + base = medium_stress_loss + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -0.1 + ai_energy = -0.5 + } + modifier = { # Weight up for stress. + add = 20 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -20 + has_trait = diligent + } + } + } +} + +################################################## +# Explorer from Phantom Islands +# by Ewan Cowhig Croft +# 1081 - 1090 +################################################## + +# An explorer of the Atlantic wishes to share their tales with you. +fp1_yearly.1081 = { + type = character_event + title = fp1_yearly.1081.t + desc = { + desc = fp1_yearly.1081.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:phantom_island = flag:greenland } + desc = fp1_yearly.1081.desc.greenland + } + triggered_desc = { + trigger = { scope:phantom_island = flag:vinland } + desc = fp1_yearly.1081.desc.vinland + } + triggered_desc = { + trigger = { scope:phantom_island = flag:antilia } + desc = fp1_yearly.1081.desc.antilia + } + triggered_desc = { + trigger = { + scope:phantom_island = flag:fortunate_isles + religion = religion:hellenism_religion + } + desc = fp1_yearly.1081.desc.fortunate_isles.hellenist + } + triggered_desc = { + trigger = { scope:phantom_island = flag:fortunate_isles } + desc = fp1_yearly.1081.desc.fortunate_isles.other + } + triggered_desc = { + trigger = { scope:phantom_island = flag:st_brendans_island } + desc = fp1_yearly.1081.desc.st_brendans_island + } + triggered_desc = { + trigger = { + scope:phantom_island = flag:isle_of_the_blessed + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = fp1_yearly.1081.desc.isle_of_the_blessed.christian + } + triggered_desc = { + trigger = { scope:phantom_island = flag:isle_of_the_blessed } + desc = fp1_yearly.1081.desc.isle_of_the_blessed.other + } + triggered_desc = { + trigger = { scope:phantom_island = flag:ard_majhulah } + desc = fp1_yearly.1081.desc.ard_majhulah + } + triggered_desc = { + trigger = { scope:phantom_island = flag:the_sticky_sea } + desc = fp1_yearly.1081.desc.the_sticky_sea + } + triggered_desc = { + trigger = { scope:phantom_island = flag:purple_islands } + desc = fp1_yearly.1081.desc.purple_islands + } + triggered_desc = { + trigger = { scope:phantom_island = flag:hy_brasil } + desc = fp1_yearly.1081.desc.hy_brasil + } + triggered_desc = { + trigger = { scope:phantom_island = flag:thule } + desc = fp1_yearly.1081.desc.thule + } + triggered_desc = { + trigger = { + scope:phantom_island = flag:great_ireland + religion = { is_in_family = rf_abrahamic } + } + desc = fp1_yearly.1081.desc.great_ireland.abrahamic + } + triggered_desc = { + trigger = { scope:phantom_island = flag:great_ireland } + desc = fp1_yearly.1081.desc.great_ireland.other + } + triggered_desc = { + trigger = { scope:phantom_island = flag:sunset_empire } + desc = fp1_yearly.1081.desc.sunset_empire + } + } + desc = fp1_yearly.1081.desc.outro + } + theme = friendly + left_portrait = { + character = root + animation = toast + triggered_animation = { + trigger = { + scope:phantom_island = flag:sunset_empire + has_trait = craven + } + animation = fear + } + } + right_portrait = { + character = scope:norse_explorer + animation = storyteller + } + override_background = { reference = study } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + #No need for these character modifiers to appear in the wild and feel less unique. + is_ai = no + #Standard checks. + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_1081 } + #Must be North Germanic. + culture = { has_cultural_pillar = heritage_north_germanic } + #Has to keep their capital in general Scandinavian core sphere of influence. + capital_province = { + OR = { + geographical_region = world_europe_west + geographical_region = world_europe_north + geographical_region = world_europe_east + } + } + #The Norse must still be in their hyper-exploratory phase. + NOT = { + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + } + + weight_multiplier = { + base = 1 + + #Learned characters attract people with curious stories. + modifier = { + add = 1 + has_trait = scholar + } + modifier = { + add = 1 + learning >= very_high_skill_rating + } + } + + immediate = { + #Once per lifetime. + add_character_flag = { flag = had_event_fp1_yearly_1081 } + #Select which phantom island we're looking at! + ##12 items with an 8.3% chance each to be selected, with the remaining 0.4% going to the thirteenth item: Sunset Invasion. + random_list = { + #Greenland + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:greenland + } + } + #Vinland + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:vinland + } + } + #Antilia + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:antilia + } + #If Portugal exists, then obviously they were time-travelling Portuguese. + if = { + limit = { + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:form_portugal_decision + } + } + culture:portuguese = { save_scope_as = antilia_culture } + } + #If Galician exists, they must have been from Galicia! + else_if = { + limit = { has_global_variable = visigothic_culture_split } + culture:galician = { save_scope_as = antilia_culture } + } + #Otherwise, bog-standard Visigoths. + else = { + culture:visigothic = { save_scope_as = antilia_culture } + } + } + #Fortunate Isles + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:fortunate_isles + } + } + #St. Brendan's Island + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:st_brendans_island + } + } + #Isle of the Blessed + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:isle_of_the_blessed + } + } + #Ard Majhūlah + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:ard_majhulah + } + } + #The Sticky Sea + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:the_sticky_sea + } + } + #Purple Islands + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:purple_islands + } + } + #Hy Brasil + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:hy_brasil + } + } + #Thule + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:thule + } + } + #Great Ireland + 83 = { + save_scope_value_as = { + name = phantom_island + value = flag:great_ireland + } + } + #Sunset Empire + 4 = { + save_scope_value_as = { + name = phantom_island + value = flag:sunset_empire + } + } + } + #Create an explorer, selecting an appropriate template according to whether or not their story is truthful. + if = { + limit = { + OR = { + scope:phantom_island = flag:greenland + scope:phantom_island = flag:purple_islands + scope:phantom_island = flag:sunset_empire #Mostly here just to freak people out for funsies. + } + #Technically, Vinland & the Sargasso Sea are real locations as well, but our loc clearly indicates that the explorer has never been there, and is repeating second-hand tales at best. + } + create_character = { + location = root.capital_province + template = fp1_truthful_explorer_character + save_scope_as = norse_explorer + } + } + else = { + create_character = { + location = root.capital_province + template = fp1_deceitful_explorer_character + save_scope_as = norse_explorer + } + } + } + + #Memorise the interesting trivia. + option = { + name = fp1_yearly.1081.a + + #Nice little diplo modifier. + add_character_modifier = { + modifier = phantom_island_trivia_fp1_modifier + years = 20 + } + + stress_impact = { + humble = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_boldness = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -10 + has_trait = arrogant + } + } + } + + #Poke holes in the story. + option = { + name = fp1_yearly.1081.b + + #Nice little intrigue modifier. + add_character_modifier = { + modifier = phantom_island_critique_fp1_modifier + years = 20 + } + + stress_impact = { + paranoid = minor_stress_impact_loss + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.25 + ai_compassion = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = paranoid + } + modifier = { #Weight down for stress. + add = -10 + has_trait = trusting + } + } + } + + #Wish them well and on their way. + option = { + name = { + trigger = { + NOT = { scope:phantom_island = flag:sunset_empire } + } + text = fp1_yearly.1081.c + } + name = { + trigger = { scope:phantom_island = flag:sunset_empire } + text = fp1_yearly.1081.c.sunset_empire + } + + # Assuming you don't have Aztecs, then get a solid bit of stress relief. + if = { + limit = { + NOT = { scope:phantom_island = flag:sunset_empire } + } + stress_impact = { + base = major_stress_loss + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + # Otherwise... + else = { + stress_impact = { + base = major_stress_gain + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + } + } + + # Stress impact handled in above if blocks. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.25 + ai_energy = -0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = trusting + } + modifier = { #Weight down for stress. + add = -10 + has_trait = paranoid + } + } + } + + after = { + #Dispose of our explorer. + scope:norse_explorer = { + hidden_effect = { + death = { death_reason = death_vanished } + } + } + } +} diff --git a/N3OW/events/dlc/fp1/fp1_yearly_events_oltner.txt b/N3OW/events/dlc/fp1/fp1_yearly_events_oltner.txt new file mode 100644 index 00000000..c7356814 --- /dev/null +++ b/N3OW/events/dlc/fp1/fp1_yearly_events_oltner.txt @@ -0,0 +1,2687 @@ +namespace = fp1_yearly + +################################################## +# #Standard Yearlies +# 2000 - 2004 A Child wants to run away to marry their beloved +# 2100 - 2101 Two lovers duel for your love +# 2200 - 2204 Berserker rampages though court +# 2300 - 2300 Convince a group of soldiers to join you +# 2400 - 2400 Invest in something that'll aid in your hunts +# 2500 - 2500 What's that deviant up to this time!? +# 2600 - 2601 Become a Berserker +################################################## + +# A Child wants to run away to marry their beloved + +scripted_trigger suitable_child_to_leave = { + is_physically_able_adult = yes + has_personality_introverted_trigger = no + is_courtier_of = root + age <= 40 + is_concubine = no + NOR = { + has_trait = celibate + has_trait = chaste + has_sexuality = asexual + has_character_modifier = mellowed_spirit + root = { + has_strong_hook = prev + } + } + can_be_knight_trigger = { + ARMY_OWNER = root + } +} + +scripted_trigger suitable_lover_for_child = { + is_physically_able_adult = yes + allowed_to_marry_character_gender_trigger = { CHARACTER = scope:child_to_leave } + scope:child_to_leave = { allowed_to_marry_character_gender_trigger = { CHARACTER = prev } } + is_physically_able_adult = yes + age <= 35 + is_married = no + can_marry_trigger = yes + is_concubine = no + is_attracted_to_gender_of = scope:child_to_leave + OR = { + can_set_relation_lover_trigger = { CHARACTER = scope:child_to_leave } + has_relation_lover = scope:child_to_leave + } +} + +scripted_effect child_leaves_effect = { + hidden_effect = { + if = { + limit = { + is_betrothed = yes + } + break_betrothal = betrothed + } + scope:lover_of_child = { + if = { + limit = { + is_betrothed = yes + } + break_betrothal = scope:lover_of_child.betrothed + } + } + } + if = { + limit = { + scope:lover_of_child = { + is_alive = yes + } + is_married = yes + exists = scope:child_to_leave.primary_spouse + NOT = { + is_spouse_of = scope:lover_of_child + } + } + scope:child_to_leave.primary_spouse = { + save_scope_as = child_to_leave_divorcee + } + less_verbose_divorce_effect = { + DIVORCER = scope:child_to_leave + DIVORCEE = scope:child_to_leave_divorcee + } + } + if = { + limit = { + scope:child_to_leave = { + is_alive = yes + } + scope:lover_of_child = { + is_alive = yes + is_married = yes + exists = scope:lover_of_child.primary_spouse + NOT = { + is_spouse_of = scope:child_to_leave + } + } + } + hidden_effect = { + scope:lover_of_child.primary_spouse = { + save_scope_as = lover_of_child_divorcee + } + scope:lover_of_child = { + less_verbose_divorce_effect = { + DIVORCER = scope:lover_of_child + DIVORCEE = scope:lover_of_child_divorcee + } + } + } + } + if = { + limit = { + is_female = yes + is_lowborn = no + scope:lover_of_child = { + is_lowborn = yes + } + } + marry_matrilineal = scope:lover_of_child + } + else_if = { + limit = { + is_male = yes + is_lowborn = yes + scope:lover_of_child = { + is_lowborn = no + } + } + marry_matrilineal = scope:lover_of_child + } + else = { + marry = scope:lover_of_child + } + move_to_pool_at = scope:somewhere_else + hidden_effect = { + scope:lover_of_child = { + move_to_pool_at = scope:somewhere_else + } + } + scope:parent = { + if = { + limit = { + has_hook = scope:child_to_leave + } + remove_hook = { + target = scope:child_to_leave + } + } + } + add_character_modifier = { + modifier = lust_for_adventure + years = 20 + } +} + +# A Child wants to run away to marry their beloved +fp1_yearly.2000 = { + type = character_event + title = fp1_yearly.2000.t + desc = fp1_yearly.2000.desc + theme = family + left_portrait = { + character = scope:child_to_leave + animation = personality_bold + } + right_portrait = { + character = scope:lover_of_child + animation = flirtation + } + override_background = { reference = market } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_2000 } + is_landed_or_landless_administrative = yes + + any_child = { + suitable_child_to_leave = yes + save_temporary_scope_as = child_to_leave + } + any_pool_character = { + province = root.capital_province + suitable_lover_for_child = yes + } + + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_2000 + days = 1825 + } + random_child = { + limit = { + suitable_child_to_leave = yes + has_personality_dominant_trigger = yes + is_primary_heir_of = root + } + alternative_limit = { + suitable_child_to_leave = yes + has_personality_dominant_trigger = yes + } + alternative_limit = { + suitable_child_to_leave = yes + } + save_scope_as = child_to_leave + } + random_pool_character = { + province = root.capital_province + limit = { + suitable_lover_for_child = yes + } + if = { + limit = { + NOT = { + has_relation_lover = scope:child_to_leave + } + } + hidden_effect = { + set_random_lover_reason = { TARGET = scope:child_to_leave } + } + } + save_scope_as = lover_of_child + } + random_independent_ruler = { + limit = { + is_landed_or_landless_administrative = yes + in_diplomatic_range = root + } + capital_province = { + save_scope_as = somewhere_else + } + } + save_scope_as = parent + } + + option = { # Fight them to make them stay + name = fp1_yearly.2000.a + + trigger = { + can_start_single_combat_trigger = yes + scope:child_to_leave = { + can_start_single_combat_trigger = yes + } + } + custom_tooltip = fp1_yearly.2000.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:parent + SC_ATTACKER = scope:parent + SC_DEFENDER = scope:child_to_leave + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = fp1_yearly.2001 + INVALIDATION_EVENT = fp1_yearly.2002 + } + + stress_impact = { + craven = major_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = medium_stress_impact_gain + temperate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + + modifier = { + factor = 2 + prowess > scope:child_to_leave.prowess + } + + modifier = { + factor = 0.1 + ai_compassion >= medium_positive_ai_value + } + + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = forgiving + has_trait = calm + } + } + } + } + + option = { # Remind them of their duties + name = fp1_yearly.2000.b + + stress_impact = { + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = medium_stress_impact_gain + fickle = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + duel = { + skill = diplomacy + value = scope:child_to_leave.diplomacy + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = fp1_yearly.2000.b.success + send_interface_toast = { + title = fp1_yearly.2000.b.success + left_icon = scope:child_to_leave + + + add_prestige = medium_prestige_gain + + scope:child_to_leave = { + custom_tooltip = fp1_yearly.2000.b.tt + add_character_modifier = { + modifier = mellowed_spirit + years = 20 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fp1_yearly.2000.b.failure + send_interface_toast = { + title = fp1_yearly.2000.b.failure + left_icon = scope:child_to_leave + + add_prestige = major_prestige_loss + + scope:child_to_leave = { + child_leaves_effect = yes + } + } + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 2 + diplomacy > scope:child_to_leave.diplomacy + } + + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = forgiving + has_trait = calm + } + } + } + } + + option = { # Bribe them + name = fp1_yearly.2000.c + + stress_impact = { + greedy = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + custom_tooltip = fp1_yearly.2000.c.tt + pay_short_term_gold = { + target = scope:child_to_leave + gold = minor_gold_value + } + + add_prestige = minor_prestige_loss + + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Let them go, the fool... + name = fp1_yearly.2000.d + + stress_impact = { + arrogant = medium_stress_impact_gain + stubborn = major_stress_impact_gain + wrathful = major_stress_impact_gain + vengeful = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + custom_tooltip = fp1_yearly.2000.d.tt + + add_prestige = medium_prestige_loss + + scope:child_to_leave = { + child_leaves_effect = yes + } + + ai_chance = { + base = 100 + + modifier = { + factor = 2 + ai_compassion >= medium_positive_ai_value + } + + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = wrathful + } + } + } + } +} + +fp1_yearly.2001 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:parent = scope:sc_victor + } + trigger_event = { id = fp1_yearly.2003 days = 1 } + } + else = { + trigger_event = { id = fp1_yearly.2004 days = 1 } + } + } +} + +# Bout has invalidated, inform affected parties. +fp1_yearly.2002 = { + hidden = yes + + immediate = { + # Inform both parties that the duel has invalidated. + scope:parent = { + send_interface_toast = { + title = fp1_yearly.2000.trigger_failure + left_icon = scope:child_to_leave + } + } + } +} + +# Beat child in combat +fp1_yearly.2003 = { + type = character_event + title = fp1_yearly.2003.t + desc = fp1_yearly.2003.desc + theme = family + left_portrait = { + character = scope:child_to_leave + animation = pain + } + right_portrait = { + character = scope:lover_of_child + animation = disapproval + } + override_background = { reference = market_tribal } + + trigger = { + + } + + immediate = { + + } + + option = { # Father/Mother knows best! + name = fp1_yearly.2003.a + + add_prestige = medium_prestige_gain + scope:child_to_leave = { + add_character_modifier = { + modifier = mellowed_spirit + years = 20 + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Break it off! + name = fp1_yearly.2003.b + + add_prestige = medium_prestige_gain + + scope:child_to_leave = { + add_character_modifier = { + modifier = mellowed_spirit + years = 20 + } + remove_relation_lover = scope:lover_of_child + } + + ai_chance = { + base = 100 + } + } +} + +# Beaten by child in combat +fp1_yearly.2004 = { + type = character_event + title = fp1_yearly.2004.t + desc = fp1_yearly.2004.desc + theme = family + left_portrait = { + character = scope:child_to_leave + animation = personality_honorable + } + right_portrait = { + character = scope:lover_of_child + animation = ecstasy + } + override_background = { reference = market_tribal } + + trigger = { + + } + + immediate = { + + } + + option = { # Ouch... + name = fp1_yearly.2004.a + + pay_short_term_gold = { + target = scope:child_to_leave + gold = minor_gold_value + } + + add_prestige = medium_prestige_loss + + scope:child_to_leave = { + child_leaves_effect = yes + } + + ai_chance = { + base = 100 + } + } +} + +scripted_trigger fighting_lover_trigger = { + is_ai = yes + has_personality_introverted_trigger = no + is_physically_able_adult = yes + NOT = { + any_consort = { + is_ai = no + this != root + } + } + OR = { + is_ruler = no + top_liege = root.top_liege + } +} + +# Two lovers duel for your love +fp1_yearly.2100 = { + type = character_event + title = fp1_yearly.2100.t + desc = fp1_yearly.2100.desc + theme = seduction + left_portrait = { + character = scope:lover_2 + animation = aggressive_sword + } + right_portrait = { + character = scope:lover_1 + animation = rage + } + override_background = { reference = market } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_2100 } + is_playable_character = yes + + # You need two lovers + any_relation = { + type = lover + fighting_lover_trigger = yes + count >= 2 + } + + # Only one needs to be of a fighty culture + any_relation = { + type = lover + fighting_lover_trigger = yes + basic_can_have_trial_by_combat_trigger = yes + } + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_2100 + days = 1825 + } + + random_relation = { + type = lover + limit = { + fighting_lover_trigger = yes + } + save_scope_as = lover_2 + set_signature_weapon_effect = yes + } + + random_relation = { + type = lover + limit = { + fighting_lover_trigger = yes + this != scope:lover_2 + } + save_scope_as = lover_1 + set_signature_weapon_effect = yes + } + + save_scope_as = lover_quarrel_target + + hidden_effect = { + scope:lover_1 = { + if = { + limit = { + any_known_secret = { + secret_type = secret_lover + secret_target = scope:lover_quarrel_target + NOT = { is_known_by = scope:lover_2 } + } + } + + random_known_secret = { + limit = { + secret_type = secret_lover + secret_target = scope:lover_quarrel_target + NOT = { is_known_by = scope:lover_2 } + } + save_scope_as = secret + reveal_to_without_events_effect = { + CHARACTER = scope:lover_2 + } + } + } + } + + scope:lover_2 = { + if = { + limit = { + any_known_secret = { + secret_type = secret_lover + secret_target = scope:lover_quarrel_target + NOT = { is_known_by = scope:lover_1 } + } + } + + random_known_secret = { + limit = { + secret_type = secret_lover + secret_target = scope:lover_quarrel_target + NOT = { is_known_by = scope:lover_1 } + } + save_scope_as = secret + reveal_to_without_events_effect = { + CHARACTER = scope:lover_1 + } + } + } + if = { + limit = { + has_relation_friend = scope:lover_1 + } + remove_relation_friend = scope:lover_1 + } + else_if = { + limit = { + has_relation_best_friend = scope:lover_1 + } + remove_relation_best_friend = scope:lover_1 + } + if = { + limit = { + NOR = { + has_relation_rival = scope:lover_1 + has_relation_nemesis = scope:lover_1 + } + } + if = { + limit = { + can_set_relation_nemesis_trigger = { CHARACTER = scope:lover_1 } + } + set_relation_nemesis = { + target = scope:lover_1 + reason = rival_competing_lovers + } + } + else = { + set_relation_rival = { + target = scope:lover_1 + reason = rival_competing_lovers + } + } + } + } + } + } + + option = { + name = fp1_yearly.2100.a + + custom_tooltip = fp1_yearly.2100.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:lover_quarrel_target + SC_ATTACKER = scope:lover_1 + SC_DEFENDER = scope:lover_2 + FATALITY = always + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = fp1_yearly.2002 + OUTPUT_EVENT = fp1_yearly.2101 + } + + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = major_stress_impact_gain + calm = medium_stress_impact_gain + content = medium_stress_impact_gain + just = medium_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = -1 + } + } + } + + option = { + name = fp1_yearly.2100.b + + duel = { + skill = diplomacy + value = 12 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = fp1_yearly.2100.b.success + send_interface_toast = { + title = fp1_yearly.2100.b.success + left_icon = scope:child_to_leave + + custom_tooltip = fp1_yearly.2100.b.tt + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fp1_yearly.2100.b.failure + send_interface_toast = { + title = fp1_yearly.2100.b.failure + left_icon = scope:lover_1 + right_icon = scope:lover_2 + + custom_tooltip = fp1_yearly.2100.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:lover_quarrel_target + SC_ATTACKER = scope:lover_1 + SC_DEFENDER = scope:lover_2 + FATALITY = always + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = fp1_yearly.2002 + OUTPUT_EVENT = fp1_yearly.2101 + } + } + } + } + + stress_impact = { + arrogant = major_stress_impact_gain + sadistic = major_stress_impact_gain + callous = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_rationality = 0.5 + } + } + } + + option = { + name = fp1_yearly.2100.c + + duel = { + skill = prowess + value = { + add = scope:lover_1.prowess + add = scope:lover_2.prowess + divide = 2 + } + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = fp1_yearly.2100.c.success + send_interface_toast = { + title = fp1_yearly.2100.c.success + left_icon = scope:child_to_leave + + custom_tooltip = fp1_yearly.2100.c.tt + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fp1_yearly.2100.c.failure + send_interface_toast = { + title = fp1_yearly.2100.c.failure + left_icon = scope:lover_1 + right_icon = scope:lover_2 + + custom_tooltip = fp1_yearly.2100.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:lover_quarrel_target + SC_ATTACKER = scope:lover_1 + SC_DEFENDER = scope:lover_2 + FATALITY = always + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = fp1_yearly.2002 + OUTPUT_EVENT = fp1_yearly.2101 + } + } + } + } + + stress_impact = { + craven = major_stress_impact_gain + arrogant = minor_stress_impact_gain + sadistic = major_stress_impact_gain + callous = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = 0.5 + } + } + } +} + +fp1_yearly.2101 = { + type = character_event + title = fp1_yearly.2101.t + desc = fp1_yearly.2101.desc + theme = seduction + left_portrait = { + character = scope:lover_1 + triggered_animation = { + trigger = { is_alive = yes } + animation = flirtation + } + triggered_animation = { + trigger = { is_alive = no } + animation = shock + } + } + right_portrait = { + character = scope:lover_2 + triggered_animation = { + trigger = { is_alive = yes } + animation = flirtation + } + triggered_animation = { + trigger = { is_alive = no } + animation = shock + } + } + override_background = { reference = market_tribal } + + immediate = { + if = { + limit = { + scope:lover_1 = { + is_alive = yes + } + } + scope:lover_1 = { + save_scope_as = winning_lover + } + scope:lover_2 = { + save_scope_as = losing_lover + } + } + else = { + scope:lover_2 = { + save_scope_as = winning_lover + } + scope:lover_1 = { + save_scope_as = losing_lover + } + } + } + + option = { + name = fp1_yearly.2101.a + + if = { + limit = { + num_of_relation_soulmate <= 0 + } + hidden_effect = { + scope:winning_lover = { + every_relation = { + type = soulmate + remove_relation_soulmate = scope:winning_lover + } + } + } + set_relation_soulmate = { reason = soulmate_won_love_in_duel_2 copy_reason = lover target = scope:winning_lover } + } + else = { + scope:winning_lover = { + add_opinion = { + target = scope:lover_quarrel_target + modifier = love_opinion + opinion = 30 + } + } + } + + had_sex_with_effect = { + CHARACTER = scope:winning_lover + PREGNANCY_CHANCE = pregnancy_chance + } + + stress_impact = { + forgiving = major_stress_impact_gain + compassionate = major_stress_impact_gain + humble = major_stress_impact_gain + just = medium_stress_impact_gain + chaste = major_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { + name = fp1_yearly.2101.b + + remove_relation_lover = scope:winning_lover + + scope:winning_lover = { + add_opinion = { + target = scope:lover_quarrel_target + modifier = lover_hurt_me_opinion + years = 30 + } + } + + add_opinion = { + target = scope:winning_lover + modifier = murdered_someone_close_to_me_crime + years = 30 + } + + stress_impact = { + forgiving = major_stress_impact_gain + vengeful = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + trusting = medium_stress_impact_gain + lustful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { + name = fp1_yearly.2101.c + + scope:winning_lover = { + add_opinion = { + target = scope:lover_quarrel_target + modifier = pleased_opinion + opinion = 10 + } + } + + stress_impact = { + forgiving = major_stress_impact_gain + compassionate = major_stress_impact_gain + humble = major_stress_impact_gain + just = medium_stress_impact_gain + chaste = major_stress_impact_gain + } + + had_sex_with_effect = { + CHARACTER = scope:winning_lover + PREGNANCY_CHANCE = pregnancy_chance + } + + ai_chance = { + base = 100 + } + } + + option = { + name = fp1_yearly.2101.d + + scope:winning_lover = { + add_opinion = { + target = scope:lover_quarrel_target + modifier = lover_being_mean_opinion + years = 10 + } + } + + stress_impact = { + vengeful = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + trusting = medium_stress_impact_gain + lustful = major_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +scripted_effect court_berserkergang_effect = { + custom_tooltip = fp1_yearly.2200.fail.tt + hidden_effect = { + scope:potential_victim = { + increase_wounds_effect = { REASON = duel } + } + } + add_opinion = { + target = scope:new_berserker + modifier = hurt_someone_close_to_me_crime + years = 30 + } +} + +# Berserker rampages though court +fp1_yearly.2200 = { + type = character_event + title = fp1_yearly.2200.t + desc = fp1_yearly.2200.desc + theme = battle + left_portrait = { + character = scope:new_berserker + animation = rage + } + override_background = { reference = market_tribal } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_2200 } + + is_landed_or_landless_administrative = yes + + faith = { + has_doctrine = tenet_warmonger + } + + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + religion = religion:germanic_religion + } + + OR = { + is_ai = no + number_of_knights < max_number_of_knights + } + + any_courtier = { + is_of_major_interest_to_root_trigger = yes + age > 12 + } + } + + immediate = { + hidden_effect = { + add_character_flag = { + flag = had_event_fp1_yearly_2200 + days = 1825 + } + + create_character = { + gender_female_chance = root_soldier_female_chance + template = new_berserker_character + faith = root.faith + culture = root.culture + dynasty = none + location = root.location + save_scope_as = new_berserker + } + + scope:new_berserker = { + set_favorite_treat_effect = yes + random_list = { + 10 = { + change_current_weight = 150 + } + 10 = { + change_current_weight = 100 + } + 10 = { + change_current_weight = 50 + } + } + if = { + limit = { + has_sexuality = asexual + } + random_list = { + 10 = { + set_sexuality = heterosexual + } + 10 = { + set_sexuality = bisexual + } + 10 = { + set_sexuality = homosexual + } + } + } + } + } + random_courtier = { + limit = { + is_of_major_interest_to_root_trigger = yes + age > 12 + prowess < scope:new_berserker.prowess + } + alternative_limit = { + is_of_major_interest_to_root_trigger = yes + age > 12 + } + save_scope_as = potential_victim + } + save_scope_as = potential_employer + } + + option = { + name = fp1_yearly.2200.a + + trigger = { + can_start_single_combat_trigger = yes + scope:new_berserker = { + can_start_single_combat_trigger = yes + } + } + custom_tooltip = fp1_yearly.2200.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = scope:new_berserker + SC_DEFENDER = root + FATALITY = no + FIXED = no + LOCALE = market + OUTPUT_EVENT = fp1_yearly.2201 + INVALIDATION_EVENT = fp1_yearly.2202 + } + + stress_impact = { + forgiving = medium_stress_impact_gain + calm = medium_stress_impact_gain + patient = medium_stress_impact_gain + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + } + } + } + + option = { + name = fp1_yearly.2200.b + + stress_impact = { + brave = major_stress_impact_gain + arrogant = medium_stress_impact_gain + greedy = major_stress_impact_gain + gluttonous = minor_stress_impact_gain + } + + pay_short_term_gold = { + target = scope:new_berserker + gold = minor_gold_value + } + + add_courtier = scope:new_berserker + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -1 + } + } + } + + option = { + name = fp1_yearly.2200.c + + duel = { + skill = diplomacy + value = 10 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + + desc = fp1_yearly.2200.c.success + send_interface_toast = { + title = fp1_yearly.2200.c.success + left_icon = scope:new_berserker + + add_courtier = scope:new_berserker + add_prestige = minor_prestige_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fp1_yearly.2200.c.failure + send_interface_toast = { + title = fp1_yearly.2200.c.failure + left_icon = scope:new_berserker + right_icon = scope:potential_victim + + court_berserkergang_effect = yes + } + } + } + + stress_impact = { + brave = major_stress_impact_gain + wrathful = major_stress_impact_gain + impatient = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { + name = fp1_yearly.2200.d + + duel = { + skill = martial + value = scope:new_berserker.martial + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + + desc = fp1_yearly.2200.d.success + send_interface_toast = { + title = fp1_yearly.2200.d.success + left_icon = scope:new_berserker + + scope:new_berserker = { + death = { death_reason = death_attacked } + } + add_prestige = major_prestige_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fp1_yearly.2200.c.failure + send_interface_toast = { + title = fp1_yearly.2200.c.failure + left_icon = scope:new_berserker + right_icon = scope:potential_victim + + court_berserkergang_effect = yes + } + } + } + + stress_impact = { + brave = major_stress_impact_gain + trusting = medium_stress_impact_gain + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } +} + +fp1_yearly.2201 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:potential_employer = scope:sc_victor + } + trigger_event = { id = fp1_yearly.2203 days = 1 } + } + else = { + trigger_event = { id = fp1_yearly.2204 days = 1 } + } + } +} + +# Bout has invalidated, inform affected parties. +fp1_yearly.2202 = { + hidden = yes + + immediate = { + # Inform both parties that the duel has invalidated. + scope:potential_employer = { + send_interface_toast = { + title = fp1_yearly.2200.trigger_failure + left_icon = scope:new_berserker + } + } + } +} + +fp1_yearly.2203 = { + type = character_event + title = fp1_yearly.2203.t + desc = fp1_yearly.2203.desc + theme = battle + left_portrait = { + character = scope:new_berserker + animation = fear + } + override_background = { reference = market_tribal } + + trigger = { + scope:new_berserker = { + is_alive = yes + } + } + + option = { + name = fp1_yearly.2203.a + + add_dread = major_dread_gain + add_prestige = medium_prestige_gain + add_prowess_skill = 2 + + scope:new_berserker = { + death = { + death_reason = death_duel + killer = scope:potential_employer + } + } + + stress_impact = { + trusting = major_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = major_stress_impact_gain + calm = medium_stress_impact_gain + content = medium_stress_impact_gain + just = medium_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = -1 + } + modifier = { + factor = 0 + prowess < scope:new_berserker.prowess + } + } + } + + option = { + name = fp1_yearly.2203.b + + stress_impact = { + arrogant = major_stress_impact_gain + vengeful = major_stress_impact_gain + cynical = major_stress_impact_gain + } + + add_prestige = medium_prestige_gain + add_prowess_skill = 2 + add_courtier = scope:new_berserker + set_relation_potential_friend = scope:new_berserker + + ai_chance = { + base = 100 + } + } + + option = { + name = fp1_yearly.2203.c + + stress_impact = { + arrogant = major_stress_impact_gain + vengeful = major_stress_impact_gain + trusting = major_stress_impact_gain + } + + add_prestige = medium_prestige_gain + add_prowess_skill = 2 + + ai_chance = { + base = 0 + } + } +} + +fp1_yearly.2204 = { + type = character_event + title = fp1_yearly.2204.t + desc = fp1_yearly.2204.desc + theme = battle + left_portrait = { + character = scope:new_berserker + animation = worry + } + override_background = { reference = market_tribal } + + trigger = { + scope:new_berserker = { + is_alive = yes + } + } + + option = { + name = fp1_yearly.2204.a + + add_prestige = medium_prestige_loss + add_courtier = scope:new_berserker + set_relation_friend = { reason = friend_rousing_fight target = scope:new_berserker } + + stress_impact = { + arrogant = major_stress_impact_gain + vengeful = major_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 1 + } + } + } + + option = { + name = fp1_yearly.2204.b + + stress_impact = { + trusting = major_stress_impact_gain + forgiving = major_stress_impact_gain + humble = major_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + add_prestige = medium_prestige_loss + + ai_chance = { + base = 0 + } + } +} + +# Convince a group of soldiers to join you +fp1_yearly.2300 = { + type = character_event + title = fp1_yearly.2300.t + desc = fp1_yearly.2300.desc + theme = feast_activity + left_portrait = { + character = scope:recruiting_character + animation = personality_rational + } + override_background = { reference = tavern } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_2300 } + + is_landed_or_landless_administrative = yes + + any_sub_realm_barony = { + title_province = { + is_coastal = yes + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + add = 0.5 + prestige_level > 2 + } + + modifier = { + add = 0.5 + prestige_level > 4 + } + + modifier = { + add = -1 + prestige_level < 0 + } + } + + immediate = { + hidden_effect = { + add_character_flag = { + flag = had_event_fp1_yearly_2300 + days = 1825 + } + } + + random_sub_realm_barony = { + limit = { + title_province = { + is_coastal = yes + } + } + save_scope_as = tavern_location + } + save_scope_as = recruiting_character + } + + option = { + name = fp1_yearly.2300.a + + flavor = huscarls_tt + + remove_short_term_gold = huscarls_gold_value + + spawn_army = { + levies = 25 + men_at_arms = { + type = huscarl + men = number_of_huscarls + } + location = scope:recruiting_character.capital_province + inheritable = no + name = grizzled_veterans + } + + custom_tooltip = MILITARY_VIEW_EVENT_TROOPS_NOT_INHERITABLE + + stress_impact = { + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { + name = fp1_yearly.2300.b + + flavor = bondi_tt + + remove_short_term_gold = bondi_gold_value + + spawn_army = { + levies = 50 + men_at_arms = { + type = bondi + men = number_of_bondi + } + location = scope:recruiting_character.capital_province + inheritable = no + name = glory_seekers + } + + custom_tooltip = MILITARY_VIEW_EVENT_TROOPS_NOT_INHERITABLE + + stress_impact = { + humble = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { + name = fp1_yearly.2300.c + + add_gold = medium_gold_value + + stress_impact = { + generous = major_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { + name = fp1_yearly.2300.d + + trigger = { + has_trait = viking + } + trait = viking + + spawn_army = { + levies = 25 + men_at_arms = { + type = huscarl + men = number_of_huscarls + } + location = scope:recruiting_character.capital_province + inheritable = no + name = grizzled_veterans + } + + spawn_army = { + levies = 50 + men_at_arms = { + type = bondi + men = number_of_bondi + } + location = scope:recruiting_character.capital_province + inheritable = no + name = glory_seekers + } + + custom_tooltip = MILITARY_VIEW_EVENT_TROOPS_NOT_INHERITABLE + + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +# Invest in something that'll aid in your hunts +fp1_yearly.2400 = { + type = character_event + title = fp1_yearly.2400.t + desc = fp1_yearly.2400.desc + theme = hunt_activity + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = fp1_runestone } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_2400 } + + is_landed_or_landless_administrative = yes + + NOR = { + has_trait = lazy + } + } + + immediate = { + hidden_effect = { + add_character_flag = { + flag = had_event_fp1_yearly_2400 + days = 1825 + } + } + + select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + + capital_province = { + save_scope_as = hunting_province + } + } + + option = { + name = fp1_yearly.2400.a + trigger = { + NOT = { location = { geographical_region = world_steppe } } + NOT = { + any_owned_story = { + story_type = story_cycle_pet_dog + } + } + } + + start_dog_story_cycle_effect = yes + remove_short_term_gold = minor_gold_value + + stress_impact = { + greedy = major_stress_impact_gain + shy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { + name = fp1_yearly.2400.eagle + trigger = { + location = { geographical_region = world_steppe } + NOT = { + any_owned_story = { + story_type = story_cycle_pet_eagle + } + } + } + + start_eagle_story_cycle_effect = yes + remove_short_term_gold = minor_gold_value + + stress_impact = { + greedy = major_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { + name = fp1_yearly.2400.b + + add_character_modifier = { + modifier = brand_new_hunting_tools + years = 25 + } + remove_short_term_gold = minor_gold_value + + stress_impact = { + greedy = major_stress_impact_gain + temperate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { + name = fp1_yearly.2400.c + + custom_tooltip = fp1_yearly.2400.free_hunt + hidden_effect = { + add_character_flag = { + flag = free_hunt + } + } + + stress_impact = { + impatient = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { remove_variable = animal_type } +} + +scripted_trigger fp1_yearly_2500_guest_trigger = { + is_available_ai_adult = yes + is_pool_guest = yes + NOR = { + has_trait = deviant + any_secret = { + type = secret_deviant + is_known_by = root + } + } + save_temporary_scope_as = deviant_guest + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = scope:deviant_guest.faith GENDER_CHARACTER = scope:deviant_guest } +} + +scripted_trigger fp1_yearly_2500_court_target_trigger = { + exists = capital_province + OR = { + any_targeting_scheme = { + OR = { + scheme_type = murder + scheme_type = abduct + } + scheme_owner = root + } + has_relation_rival = root + } +} + +# What's that deviant up to this time!? +fp1_yearly.2500 = { + type = character_event + title = fp1_yearly.2500.t + desc = fp1_yearly.2500.desc + theme = seduction + left_portrait = { + character = scope:deviant_guest + animation = shock + } + override_background = { reference = fp1_runestone } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + + #Standard checks. + is_landed = yes + is_available_at_peace_adult = yes + + NOT = { has_character_flag = had_event_fp1_yearly_2500 } + is_capable_adult = yes + + any_courtier_or_guest = { + fp1_yearly_2500_guest_trigger = yes + } + + trait_is_criminal_in_faith_trigger = { TRAIT = deviant FAITH = root.faith GENDER_CHARACTER = scope:deviant_guest } + + any_held_title = { + title_tier = county + OR = { + has_county_modifier = fp1_stele_ancestors_strong + has_county_modifier = fp1_stele_ancestors_weak + has_county_modifier = fp1_stele_conquest_strong + has_county_modifier = fp1_stele_conquest_weak + has_county_modifier = fp1_stele_promotion_strong + has_county_modifier = fp1_stele_promotion_weak + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_fp1_yearly_2500 + } + random_held_title = { + title_tier = county + limit = { + OR = { + has_county_modifier = fp1_stele_ancestors_strong + has_county_modifier = fp1_stele_ancestors_weak + has_county_modifier = fp1_stele_conquest_strong + has_county_modifier = fp1_stele_conquest_weak + has_county_modifier = fp1_stele_promotion_strong + has_county_modifier = fp1_stele_promotion_weak + } + } + save_scope_as = runestone_location + } + hidden_effect = { + random_courtier_or_guest = { + limit = { + fp1_yearly_2500_guest_trigger = yes + } + if = { + limit = { + NOT = { + any_secret = { + type = secret_deviant + } + } + } + give_deviant_secret_or_trait_effect = yes + } + save_scope_as = deviant_guest + random_secret = { + type = secret_deviant + limit = { + NOT = { is_known_by = root } + } + save_scope_as = deviant_guest_secret + } + if = { + limit = { + root = { is_ai = no } + } + add_character_flag = is_naked + } + } + } + + if = { + limit = { + is_ai = no + } + if = { + limit = { + any_ruler = { + fp1_yearly_2500_court_target_trigger = yes + } + } + random_ruler = { + limit = { + fp1_yearly_2500_court_target_trigger = yes + } + save_scope_as = appropriate_court_target_owner + } + } + } + create_character_memory = { + type = deviant_defiled_my_object + participants = { deviant = scope:deviant_guest } + } + } + + option = { # Learn of the secret and force them to leave + name = { + trigger = { NOT = { exists = scope:appropriate_court_target_owner } } + text = yearly.8400.a + } + name = { + trigger = { exists = scope:appropriate_court_target_owner } + text = yearly.8400.special + } + + scope:deviant_guest_secret = { + reveal_to = root + } + + scope:deviant_guest = { + if = { + limit = { + exists = scope:appropriate_court_target_owner + } + hidden_effect = { + visit_court_of = scope:appropriate_court_target_owner + } + custom_tooltip = yearly.8400.a.tt + } + else = { + select_and_move_to_pool_effect = yes + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = compassionate + has_trait = just + } + } + } + + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + just = medium_stress_impact_gain + } + } + + option = { # Expose and throw them in jail + name = yearly.8400.b + + add_piety = major_piety_gain + + scope:deviant_guest_secret = { + expose_secret = root + } + + rightfully_imprison_character_effect = { + TARGET = scope:deviant_guest + IMPRISONER = root + } + + ai_chance = { + base = 25 + + modifier = { + factor = 0 + ai_zeal < 0 + } + + modifier = { + factor = 0 + has_trait = forgiving + } + + modifier = { + factor = 5 + ai_zeal >= medium_positive_ai_value + } + } + + stress_impact = { + forgiving = major_stress_impact_gain + deviant = massive_stress_impact_gain + } + } + + option = { # Learn of the secret and let them stay + name = yearly.8400.c + + scope:deviant_guest_secret = { + reveal_to = root + } + + scope:deviant_guest = { + add_opinion = { + modifier = kindness_opinion + target = root + opinion = 25 + } + } + + ai_chance = { + base = 100 + } + + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + } + } + + option = { # Learn of the secret, and... join in on the fun + name = yearly.8400.d + + scope:deviant_guest_secret = { + reveal_to = root + } + + give_deviant_secret_or_trait_effect = yes + + if = { + limit = { + stress > 0 + } + add_stress = monumental_stress_loss + } + + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:deviant_guest } + } + set_relation_friend = { reason = friend_deviant_fun target = scope:deviant_guest } + } + + ai_chance = { + base = 5 + modifier = { + add = 995 + has_trait = lustful + } + } + + stress_impact = { + chaste = major_stress_impact_gain + temperate = major_stress_impact_gain + } + } + + after = { + scope:deviant_guest = { + if = { + limit = { has_character_flag = is_naked } + remove_character_flag = is_naked + } + } + } +} + +# Become a Berserker +fp1_yearly.2600 = { + type = character_event + title = fp1_yearly.2600.t + desc = fp1_yearly.2600.desc + theme = war + left_portrait = { + character = scope:berserker_teacher + animation = marshal + } + override_background = { reference = fp1_tribal_temple } + + trigger = { + #DLC check. + has_fp1_dlc_trigger = yes + + #Standard checks. + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_fp1_yearly_2600 } + + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + religion = religion:germanic_religion + } + + faith = { + has_doctrine = tenet_warmonger + } + + NOR = { + has_trait = craven + has_trait = berserker + } + + prowess >= 8 + + any_knight = { + is_ai = yes + is_physically_able_adult = yes + has_trait = berserker + NOT = { + has_relation_rival = root + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + add = 0.5 + has_trait = impatient + } + modifier = { + add = 0.5 + has_trait = wrathful + } + modifier = { + add = 0.5 + prowess >= 12 + } + } + + immediate = { + hidden_effect = { + add_character_flag = { + flag = had_event_fp1_yearly_2600 + days = 1825 + } + } + + random_knight = { + limit = { + is_ai = yes + is_physically_able_adult = yes + has_trait = berserker + NOT = { + has_relation_rival = root + } + } + save_scope_as = berserker_teacher + } + } + + option = { + name = fp1_yearly.2600.a + + custom_tooltip = fp1_yearly.2600.a.tt + + hidden_effect = { + random_list = { + 10 = { # Succeed, no one harmed + set_variable = { + name = success_no_one_harmed + value = yes + } + } + 5 = { # Succeed, harm someone close to you + trigger = { + any_courtier = { + is_of_major_interest_to_root_trigger = yes + is_ai = yes + age > 12 + this != scope:berserker_teacher + } + } + set_variable = { + name = success_harm_close_one + value = yes + } + } + 3 = { # Succeed, kill the berserker who taught you + set_variable = { + name = success_kill_berserker + value = yes + } + } + 1 = { # Succeed, kill everyone at court + trigger = { + is_ai = no + any_courtier = { + is_of_major_interest_to_root_trigger = yes + is_ai = yes + age > 12 + } + } + set_variable = { + name = success_kill_everyone + value = yes + } + } + 3 = { # Fail, fall asleep + set_variable = { + name = fail_fall_asleep + value = yes + } + modifier = { + add = 10 + has_trait = lazy + } + } + } + trigger_event = fp1_yearly.2601 + } + + stress_impact = { + calm = massive_stress_impact_gain + lazy = massive_stress_impact_gain + patient = major_stress_impact_gain + temperate = major_stress_impact_gain + } + ai_chance = { + base = 90 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = patient + has_trait = lazy + } + } + } + } + + option = { + name = fp1_yearly.2600.b + + custom_tooltip = fp1_yearly.2600.b.tt + + stress_impact = { + impatient = massive_stress_impact_gain + wrathful = massive_stress_impact_gain + sadistic = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } +} + +scripted_effect berserker_killing_spree_effect = { + random_list = { + 10 = { + death = { + death_reason = death_head_ripped_off + killer = root + } + } + 10 = { + death = { + death_reason = death_cloven_in_half + killer = root + } + } + 10 = { + death = { + death_reason = death_viciously_dismembered + killer = root + } + } + 10 = { + death = { + death_reason = death_ripped_apart_limb_by_limb + killer = root + } + } + 10 = { + death = { + death_reason = death_chopped_to_pieces + killer = root + } + } + 10 = { + death = { + death_reason = death_heart_ripped_out + killer = root + } + } + 1 = { + trigger = { + NOT = { + has_trait = brave + } + } + death = { + death_reason = death_fear + killer = root + } + } + 10 = { + death = { + death_reason = death_skull_cracked_open + killer = root + } + } + 10 = { + death = { + death_reason = death_strangled_with_own_intestines + killer = root + } + } + } +} + +fp1_yearly.2601 = { + type = character_event + title = fp1_yearly.2600.t + desc = { + desc = fp1_yearly.2601.desc + first_valid = { + triggered_desc = { + trigger = { + exists = var:success_no_one_harmed + } + desc = fp1_yearly.2601.success_no_one_harmed + } + triggered_desc = { + trigger = { + exists = var:success_harm_close_one + } + desc = fp1_yearly.2601.success_harm_close_one + } + triggered_desc = { + trigger = { + exists = var:success_kill_berserker + } + desc = fp1_yearly.2601.success_kill_berserker + } + triggered_desc = { + trigger = { + exists = var:success_kill_everyone + } + desc = fp1_yearly.2601.success_kill_everyone + } + triggered_desc = { + trigger = { + exists = var:fail_fall_asleep + } + desc = fp1_yearly.2601.fail_fall_asleep + } + } + } + theme = war + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = var:success_no_one_harmed + } + animation = rage + } + triggered_animation = { + trigger = { + OR = { + exists = var:success_harm_close_one + exists = var:success_kill_berserker + exists = var:success_kill_everyone + } + } + animation = shock + } + triggered_animation = { + trigger = { + exists = var:fail_fall_asleep + } + animation = personality_irrational + } + } + right_portrait = { + character = scope:harmed_victim + triggered_animation = { + trigger = { + root = { + exists = var:success_no_one_harmed + } + } + animation = happiness + } + triggered_animation = { + trigger = { + root = { + OR = { + exists = var:success_harm_close_one + exists = var:success_kill_berserker + exists = var:success_kill_everyone + } + } + } + animation = fear + } + triggered_animation = { + trigger = { + root = { + exists = var:fail_fall_asleep + } + } + animation = disapproval + } + } + override_background = { reference = fp1_tribal_temple } + + trigger = { + + } + + immediate = { + scope:berserker_teacher = { + save_scope_as = harmed_victim + } + if = { + limit = { + exists = var:success_no_one_harmed + } + add_trait = berserker + } + else_if = { + limit = { + exists = var:success_harm_close_one + } + random_courtier = { + limit = { + is_of_major_interest_to_root_trigger = yes + is_ai = yes + age > 12 + this != scope:berserker_teacher + } + increase_wounds_effect = { REASON = duel } + add_opinion = { + modifier = cruelty_opinion + target = root + opinion = -20 + } + save_scope_as = harmed_victim + } + add_trait = berserker + add_dread = minor_dread_gain + + create_character_memory = { + type = hurt_someone_close_to_me + participants = { close_relation = scope:harmed_victim } + } + } + else_if = { + limit = { + exists = var:success_kill_berserker + } + scope:berserker_teacher = { + berserker_killing_spree_effect = yes + } + add_trait = berserker + add_dread = minor_dread_gain + + create_character_memory = { + type = hurt_someone_close_to_me + participants = { close_relation = scope:berserker_teacher } + } + } + else_if = { + limit = { + exists = var:success_kill_everyone + } + every_courtier = { + limit = { + is_ai = yes + } + berserker_killing_spree_effect = yes + } + add_trait = berserker + add_dread = 100 + + create_character_memory = { + type = killed_everyone + } + } + } + + option = { + name = fp1_yearly.2601.a + + trigger = { + exists = var:success_no_one_harmed + } + + ai_chance = { + base = 100 + } + } + + option = { + name = fp1_yearly.2601.b + + trigger = { + OR = { + exists = var:success_harm_close_one + exists = var:success_kill_berserker + exists = var:success_kill_everyone + } + } + + if = { + limit = { + NOT = { + has_trait = sadistic + } + } + add_stress = massive_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { + name = fp1_yearly.2601.c + + trigger = { + exists = var:fail_fall_asleep + } + + add_prestige = minor_prestige_loss + add_stress = minor_stress_loss + + ai_chance = { + base = 100 + } + } + + after = { + remove_variable = success_no_one_harmed + remove_variable = success_harm_close_one + remove_variable = success_kill_berserker + remove_variable = success_kill_everyone + remove_variable = fail_fall_asleep + } +} diff --git a/N3OW/events/dlc/fp2/fp2_el_cid_events.txt b/N3OW/events/dlc/fp2/fp2_el_cid_events.txt new file mode 100644 index 00000000..0804a832 --- /dev/null +++ b/N3OW/events/dlc/fp2/fp2_el_cid_events.txt @@ -0,0 +1,552 @@ +namespace = fp2_struggle + +###################################### +# EL CID'S BIZARRE ADVENTURE SYSTEM +# By Hugo Cortell +###################################### +fp2_struggle.2045 = { + hidden = yes + + trigger = { + is_landless_adventurer = no + } + + immediate = { + if = { # Startup changes (give the cid his full nickname when he starts adventuring) + limit = { NOT = { has_character_flag = has_already_begun_travelling } } + + remove_nickname = yes + give_nickname = nick_the_cid_campeador + add_character_flag = has_already_begun_travelling # Prevents yearly pulse from stacking up requests + add_character_flag = blocked_from_leaving # Prevents el cid from vacationing in far away lands + } + + if = { + limit = { NOT = { has_character_flag = finished_el_cids_travels } } # In case several requests for the event are stacked up + if = { # Being a guest is used as a boolean to check if the character is in an "evaluation" phase or already in a court. DO NOT USE THE GUEST SYSTEM FOR THIS. + limit = { + OR = { + is_pool_guest = yes + is_pool_character = yes + is_foreign_court_guest = yes + } + } + random_county_in_region = { # Naturally biased in favor of larger states + limit = { exists = holder.liege } + weight = { + base = 1 + modifier = { + add = 10 + holder.liege = { has_relation_friend = root } + } + modifier = { + add = 30 + holder.liege = { has_relation_best_friend = root } + } + compare_modifier = { + value = holder.prestige_level + multiplier = 1.5 + } + } + region = world_europe_west_iberia # Locks el cid's forced travels to iberia + holder.liege = { trigger_event = fp2_struggle.2051 } + } + } + else = { + if = { + limit = { exists = liege } + liege = { trigger_event = fp2_struggle.2050 } # This is you, you get the event, while el cid gets the "system event" + } + else = { + employer = { trigger_event = fp2_struggle.2050 } # ditto + } + } + } + } +} + + +############################################################# +# Unease About El Sidi +# By The Content Design Team (And scripted by Hugo Cortell) +############################################################# + +scripted_trigger el_cid_too_important_trigger = { + OR = { + any_extended_family_member = { this = scope:fp2_2050_el_cid } + scope:fp2_2050_el_cid = { is_vassal_of = ROOT } + has_relation_best_friend = scope:fp2_2050_el_cid + is_spouse_of = scope:fp2_2050_el_cid + } +} + +fp2_struggle.2050 = { + type = character_event + title = { + random_valid = { + triggered_desc = { # Muslim Titles + trigger = { religion = religion:islam_religion } + desc = { + random_valid = { + desc = fp2_struggle.2050.t_muslim_one + desc = fp2_struggle.2050.t_muslim_two + desc = fp2_struggle.2050.t_muslim_three + desc = fp2_struggle.2050.t_muslim_four + } + } + } + + triggered_desc = { # Generic (Christian, nickname-like) Titles + trigger = { NOT = { religion = religion:islam_religion } } + desc = { + random_valid = { + desc = fp2_struggle.2050.t_generic_one + desc = fp2_struggle.2050.t_generic_two + desc = fp2_struggle.2050.t_generic_three + desc = fp2_struggle.2050.t_generic_four + } + } + } + } + } + desc = { # See immediate for flags + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2050_reason_for_kicking_out_el_cid = flag:generic_court } + desc = fp2_struggle.2050.desc_court + } + triggered_desc = { + trigger = { scope:fp2_2050_reason_for_kicking_out_el_cid = flag:jelly_knights } + desc = fp2_struggle.2050.desc_knights + } + triggered_desc = { + trigger = { scope:fp2_2050_reason_for_kicking_out_el_cid = flag:upset_nobles } + desc = fp2_struggle.2050.desc_nobles + } + triggered_desc = { + trigger = { scope:fp2_2050_reason_for_kicking_out_el_cid = flag:faith_discomfort } + desc = fp2_struggle.2050.desc_faith + } + desc = board_games.0001.desc.i_am_winning.trait.rowdy # Theoretically impossible to trigger, but if something breaks, players will see this and report it for sure + } + } + + theme = corruption + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_2050_el_cid + animation = throne_room_two_handed_passive_1 + } + + immediate = { + character:107590 = { save_scope_as = fp2_2050_el_cid } + + random_list = { # Spin the wheel to decide who and why wishes ill on el cid + 10 = { # Generic "the court thinks he is bad" + save_scope_value_as = { + name = fp2_2050_reason_for_kicking_out_el_cid + value = flag:generic_court + } + } + 10 = { # Your knights are all sore losers + modifier = { + add = 30 + any_knight = { + OR = { + has_relation_rival = scope:fp2_2050_el_cid + has_relation_nemesis = scope:fp2_2050_el_cid + } + } + } + save_scope_value_as = { + name = fp2_2050_reason_for_kicking_out_el_cid + value = flag:jelly_knights + } + } + 10 = { # Nobles dislike upstart poor people + modifier = { + add = 30 + any_vassal = { + OR = { + has_relation_rival = scope:fp2_2050_el_cid + has_relation_nemesis = scope:fp2_2050_el_cid + } + } + } + save_scope_value_as = { + name = fp2_2050_reason_for_kicking_out_el_cid + value = flag:upset_nobles + } + } + 10 = { # Generic faith concerns from your bishop + save_scope_value_as = { + name = fp2_2050_reason_for_kicking_out_el_cid + value = flag:faith_discomfort + } + } + } + } + + option = { # Family, Friend or Vassal + name = fp2_struggle.2050.a + + trigger = { el_cid_too_important_trigger = yes } + + hidden_effect = { + scope:fp2_2050_el_cid = { add_character_flag = finished_el_cids_travels } # At this point we can imagine that this character has settled, this stops the cycle to prevent spam + } + + custom_tooltip = fp2_struggle.2050.a.serve_tooltip + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2050.a.notif.t + right_icon = scope:fp2_2050_el_cid + + reverse_add_opinion = { + target = scope:fp2_2050_el_cid + modifier = stood_by_me_opinion + opinion = 10 + years = 20 + } + } + + stress_impact = { + fickle = minor_stress_impact_gain + } + + ai_chance = { base = 1000 } + } + + option = { # No, I stand by my knight and he can stay! + name = fp2_struggle.2050.b + + trigger = { + is_ai = no + NOT = { scope:fp2_2050_el_cid = { is_vassal_of = ROOT } } + } + + custom_tooltip = fp2_struggle.2050.a.serve_tooltip + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2050.a.notif.t + right_icon = scope:fp2_2050_el_cid + + if = { + limit = { scope:fp2_2050_reason_for_kicking_out_el_cid = flag:generic_court } + add_character_modifier = { + modifier = fp2_kept_accused_traitor_in_court_modifier + years = 10 + } + } + else_if = { + limit = { scope:fp2_2050_reason_for_kicking_out_el_cid = flag:jelly_knights } + add_character_modifier = { + modifier = fp2_kept_op_knight_in_court_modifier + years = 10 + } + } + else_if = { + limit = { scope:fp2_2050_reason_for_kicking_out_el_cid = flag:upset_nobles } + add_character_modifier = { + modifier = fp2_kept_upstart_knight_in_court_modifier + years = 10 + } + } + else_if = { + limit = { scope:fp2_2050_reason_for_kicking_out_el_cid = flag:faith_discomfort } + add_character_modifier = { + modifier = fp2_kept_godless_mercenary_in_court_modifier + years = 10 + } + } + + reverse_add_opinion = { + target = scope:fp2_2050_el_cid + modifier = stood_by_me_opinion + opinion = 10 + years = 20 + } + scope:fp2_2050_el_cid = { + trigger_event = { + id = fp2_struggle.2045 + years = { 4 12 } + } + } + } + + stress_impact = { + fickle = minor_stress_impact_gain + } + } + + option = { # Okay, please do not give me malus + name = fp2_struggle.2050.c + + trigger = { + NOT = { scope:fp2_2050_el_cid = { is_vassal_of = ROOT } } + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2051.t + right_icon = scope:fp2_2050_el_cid + + scope:fp2_2050_el_cid = { + move_to_pool = yes + trigger_event = { + id = fp2_struggle.2045 + days = { 1 4 } + } + } + } + + stress_impact = { + generous = minor_stress_impact_gain + } + + ai_chance = { base = 1 } + } + + option = { # Vanish el cid, even though he is your vassal (suggested by Max) + name = fp2_struggle.2050.c + + trigger = { + is_ai = no + scope:fp2_2050_el_cid = { is_vassal_of = ROOT } + } + + # The only reason to ever select this option is to gain those "repossessed" lands, but it is very mean. + # It will give you tyranny, but it won't directly anger your vassals as they are *narratively* the reason why this is happening. + # The primary reason this exists is to prevent ludonarrative dissonance with the event's description. It is less resource intensive than making new loc. + + # We set the tyranny and opinion loss based on how much was lost (Placed outside the toast to prevent clutter) + add_tyranny = { + value = medium_tyranny_gain + multiply = scope:fp2_2050_el_cid.primary_title.tier + } + + if = { + limit = { can_set_relation_rival_trigger = { CHARACTER = scope:fp2_2050_el_cid } } + set_relation_rival = scope:fp2_2050_el_cid + } + if = { # This is not out of order, it is WAD. If can_set_relation_rival_trigger fails, you just lose a friend but not gain a rival. + limit = { has_relation_friend = scope:fp2_2050_el_cid } + remove_relation_friend = scope:fp2_2050_el_cid + } + + if = { + limit = { scope:fp2_2050_el_cid.primary_title.tier < tier_kingdom } + scope:fp2_2050_el_cid = { + add_opinion = { + modifier = betrayed_me_opinion + target = root + opinion = -100 + } + } + } + else = { + scope:fp2_2050_el_cid = { + add_opinion = { + modifier = betrayed_me_opinion + target = root + opinion = -200 + } + } + } + + create_title_and_vassal_change = { # This tells the engine to start paying closer attention to title changes (and not butt in) + type = revoked + save_scope_as = change + } + scope:fp2_2050_el_cid = { + every_held_title = { + change_title_holder = { + holder = root + change = scope:change + } + } + } + resolve_title_and_vassal_change = scope:change # Tells the engine that it is safe to go about its buisness with titles + + show_as_tooltip = { scope:fp2_2050_el_cid = { move_to_pool = yes } } # Just jomini things~ + hidden_effect = { # Prevents rendering of toast on option highlight + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2051.t + right_icon = scope:fp2_2050_el_cid + + show_as_tooltip = { # Condensed version to fit into the toast + if = { + limit = { scope:fp2_2050_el_cid.primary_title.tier > tier_duchy } + scope:fp2_2050_el_cid = { + if = { + limit = { has_relation_nemesis = ROOT } + set_relation_nemesis = ROOT + } + add_opinion = { + modifier = betrayed_me_opinion + target = root + opinion = -200 + } + } + } + else = { + if = { + limit = { has_relation_rival = ROOT } + set_relation_rival = ROOT + } + add_opinion = { + modifier = betrayed_me_opinion + target = root + opinion = -100 + } + } + } + + # Standard stuff + scope:fp2_2050_el_cid = { + move_to_pool = yes + trigger_event = { + id = fp2_struggle.2045 + days = { 1 4 } + } + } + } + } + + stress_impact = { # This kind of action comes with quite a bit of stress + generous = minor_stress_impact_gain + brave = medium_stress_impact_gain + forgiving = major_stress_impact_gain + gregarious = medium_stress_impact_gain + honest = minor_stress_impact_gain + humble = medium_stress_impact_gain + just = major_stress_impact_gain + trusting = medium_stress_impact_gain + compassionate = major_stress_impact_gain + august = minor_stress_impact_gain + gallant = medium_stress_impact_gain + } + } +} + + +############################################################ +# El Cid Arrives At Your Court +# By The Content Design Team (And scripted by Hugo Cortell) +############################################################ +fp2_struggle.2051 = { + type = character_event + title = fp2_struggle.2051.t + desc = fp2_struggle.2051.desc + + theme = vassal + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_2050_el_cid + animation = throne_room_one_handed_passive_1 + } + + immediate = { + character:107590 = { save_scope_as = fp2_2050_el_cid } + add_visiting_courtier = scope:fp2_2050_el_cid + } + + option = { # You will enjoy a high position at my court! + name = fp2_struggle.2051.a + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2050.a.notif.t + right_icon = scope:fp2_2050_el_cid + + pay_treasury_or_gold = { + target = scope:fp2_2050_el_cid + value = medium_treasury_or_gold_value + } + add_courtier = scope:fp2_2050_el_cid + } + + if = { + limit = { exists = cp:councillor_marshal } + fire_councillor = cp:councillor_marshal + } + assign_councillor_type = { + type = councillor_marshal + target = scope:fp2_2050_el_cid + } + + scope:fp2_2050_el_cid = { + add_opinion = { + target = root + modifier = hired_me_opinion + opinion = 20 + } + add_opinion = { + target = root + modifier = given_luxuries_opinion + opinion = 10 + } + + trigger_event = { + id = fp2_struggle.2045 + years = { 4 12 } + } + } + + trigger = { is_ai = no } + } + + option = { # Welcome or whatever + name = fp2_struggle.2051.b + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2050.a.notif.t + right_icon = scope:fp2_2050_el_cid + + pay_treasury_or_gold = { + target = scope:fp2_2050_el_cid + value = minor_treasury_or_gold_value + } + add_courtier = scope:fp2_2050_el_cid + } + scope:fp2_2050_el_cid = { + trigger_event = { + id = fp2_struggle.2045 + years = { 4 10 } + } + } + + ai_chance = { base = 65 } + } + + option = { # Away with you vile beggar! + name = fp2_struggle.2051.c + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2051.t + right_icon = scope:fp2_2050_el_cid + + custom_tooltip = fp2_struggle.2050.c.notif + scope:fp2_2050_el_cid = { + move_to_pool = yes + trigger_event = { + id = fp2_struggle.2045 + days = { 1 4 } + } + } + } + + ai_chance = { base = 45 } + } +} diff --git a/N3OW/events/dlc/fp2/fp2_lyonese_monk_events.txt b/N3OW/events/dlc/fp2/fp2_lyonese_monk_events.txt new file mode 100644 index 00000000..38d68f62 --- /dev/null +++ b/N3OW/events/dlc/fp2/fp2_lyonese_monk_events.txt @@ -0,0 +1,4800 @@ +namespace = fp2_lyonese_monk + +################################################## +# #Setup & Misc +# We're starting, invalidating, or prematurely ending the chain. +# 0001 - 0010 A Storm-Tossed Night - a learned holy person arrives at court, begging for succour. +# 0011 - 0020 A Former Friend - you have died, and scope:acolyte wishes to continue. +# 0021 - 0030 Gone and Done - scope:acolyte has died or is no longer your courtier. +# 0031 - 0040 Shattered Faith - you or scope:acolyte are no longer the correct faith. +# 0041 - 0050 # - # +# +# #Private Teachings +# The event chain is in stealth mode, with no continuation tooltips. +# 0201 - 0210 Just a Few Friends - scope:acolyte asks for permission to start a study group. +# 0211 - 0220 But Why? - one of your barons retires to become a monk spontaneously. +# 0221 - 0230 A Rictus Grin - a courtier is looking dopey and happy due to how at peace with themselves they are. +# 0231 - 0240 Booing the Bishop - a bishop in your realm is booed by a crowd of people. +# 0241 - 0250 All HerHis Fault - your court chaplain comes to you complaining, begging for an end to all of this. +# +# #Public Controversy +# Something is afoot! Important figures are getting involved, and you get continuation tooltips to let you know something is up. +# 0401 - 0410 Scope:pope's Epistle - the Pope writes you an advisory, reprimanding you and asking you to boot the monk. +# 0411 - 0420 Space to Teach - scope:acolyte asks you for a county (or barony, if you're still a count) in which to spread HerHis teachings. +# 0421 - 0430 High Tempers - your court chaplain and scope:acolyte get into a fight. +# 0431 - 0440 Scope:pope's Second Epistle - the Pope writes you *another* advisory, demanding that you boot scope:acolyte plus veiled threats. +# 0441 - 0450 The Council of scope:bishopric - the clergy of the region gather for a minor church council, featuring scope:acolyte defending their claims. +# +# #Schism +# Ho-boi, time for a shake-up! You recant or you suffer. +# 0601 - 0610 Scope:pope's Third Epistle - whatever the council's results, the Pope condemns it. You are given a final demand to repent & turn over scope:acolyte or face excommunication. +# 0611 - 0620 High Tensions - an angry mob in your capital turn up to demand scope:acolyte's head, countered by *another* angry mob that hates the first mob. +# 0621 - 0630 A Formal Complaint - zealous vassals protest your heresy. +# 0631 - 0640 Just Church Business - a neighbouring ruler has purchased claims on your land from your HoF. +# 0641 - 0650 No More than a Man - scope:acolyte suggests you embrace the heresy. +# +# #Council +# You've stuck with things, and now it's time to decide the course of your faith. +# 0801 - 0810 The Second Council of scope:bishopric - clergy from all over your realm gather, wanting to contribute their thoughts and notes. +# 0811 - 0820 Elipandics - clergy argue over whether you're all really adoptionists or just nuanced Catholics. +# 0821 - 0830 Felicians - clergy argue over the degree to which expedience is required. +# 0831 - 0840 Radicals - clergy argue over *how* monotheistic to be. +# 0841 - 0850 From the Ashes - the church council arrives at their final important doctrinal conclusions. +################################################## + + + + + + + + + + +################################################## +# GENERAL SCRIPTED TRIGGERS & EFFECTS + +scripted_trigger fp2_suitable_base_convert_trigger = { + # We only want same-faith characters. + faith = scope:story.var:base_faith + # They should be old enough to attend a meeting. + age >= 14 + # Cynics, non-believers, and the chronically short of zeal don't attend such meetings voluntarily. + NOR = { + has_trait = cynical + ai_zeal <= high_negative_ai_value + any_secret = { type = secret_non_believer } + } + # Exclude characters that might turn up as scope:irate_theocrat. + NOR = { + # Court chaplains. + AND = { + exists = scope:acolyte_host.cp:councillor_court_chaplain + this = scope:acolyte_host.cp:councillor_court_chaplain + } + # Landed theocrats - we've already pre-filtered for faith. + government_has_flag = government_is_theocracy + # Landless monks at court - we've already pre-filtered for faith. + AND = { + is_courtier_of = scope:acolyte + has_trait = devoted + } + } + # And not already players or the the heir of a player. + is_ai = yes + NOT = { is_player_heir_of = scope:acolyte_host } +} + +scripted_trigger fp2_suitable_strict_convert_trigger = { + fp2_suitable_base_convert_trigger = yes + # Plus exclude both characters already in the list & the landed. + NOR = { + is_landed = yes + save_temporary_scope_as = current_temp + any_in_list = { + list = hidden_converts + this = scope:current_temp + } + } +} + +scripted_trigger fp2_suitable_semi_strict_convert_trigger = { + fp2_suitable_base_convert_trigger = yes + # Plus exclude characters already in the list. + NOT = { + save_temporary_scope_as = current_temp + any_in_list = { + list = hidden_converts + this = scope:current_temp + } + } +} + +scripted_trigger fp2_lyonese_monk_suitable_annoyed_theocrat_landed_vassal_trigger = { + government_has_flag = government_is_theocracy + faith = scope:story.var:base_faith + is_available_ai_adult = yes +} + +scripted_trigger fp2_lyonese_monk_suitable_annoyed_theocrat_landless_monk_trigger = { + has_trait = devoted + faith = scope:story.var:base_faith + is_available_ai_adult = yes + this != scope:acolyte +} + +scripted_trigger fp2_lyonese_monk_has_suitable_annoyed_theocrat_trigger = { + # This should always be synced with fp2_lyonese_monk_select_suitable_annoyed_theocrat_effect. + OR = { + AND = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + any_vassal = { fp2_lyonese_monk_suitable_annoyed_theocrat_landed_vassal_trigger = yes } + any_courtier_or_guest = { fp2_lyonese_monk_suitable_annoyed_theocrat_landless_monk_trigger = yes } + } +} + +scripted_effect fp2_add_random_characters_to_converts_list_effect = { + hidden_effect = { + $COURT$ = { + while = { + count = 5 + limit = { + any_courtier_or_guest = { fp2_suitable_strict_convert_trigger = yes } + } + random_courtier_or_guest = { + limit = { fp2_suitable_strict_convert_trigger = yes } + add_to_list = hidden_converts + } + } + } + } +} + +scripted_effect fp2_add_random_vassals_to_converts_list_effect = { + hidden_effect = { + $LIEGE$ = { + while = { + count = 3 + limit = { + any_vassal = { fp2_suitable_semi_strict_convert_trigger = yes } + } + random_vassal = { + limit = { fp2_suitable_semi_strict_convert_trigger = yes } + add_to_list = hidden_converts + } + } + } + } +} + +scripted_effect fp2_lyonese_monk_select_suitable_annoyed_theocrat_effect = { + # This should always be synced with fp2_lyonese_monk_has_suitable_annoyed_theocrat_trigger. + # Grab a suitable annoyed var:base_faith character. + ## We prefer the chaplain... + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + } + cp:councillor_court_chaplain = { save_scope_as = irate_theocrat } + } + ## ... or else a landed theocrat... + else_if = { + limit = { + any_vassal = { fp2_lyonese_monk_suitable_annoyed_theocrat_landed_vassal_trigger = yes } + } + random_vassal = { + limit = { fp2_lyonese_monk_suitable_annoyed_theocrat_landed_vassal_trigger = yes } + save_scope_as = irate_theocrat + } + } + ## ... but in a pinch a monk will do. + ### We should know from the sync'd trigger that we've definitely got one of these hanging about if we've gotten to this point, so no need to check twice. + else_if = { + limit = { + any_courtier_or_guest = { fp2_lyonese_monk_suitable_annoyed_theocrat_landless_monk_trigger = yes } + } + random_courtier_or_guest = { + limit = { fp2_lyonese_monk_suitable_annoyed_theocrat_landless_monk_trigger = yes } + save_scope_as = irate_theocrat + } + } + ## And, in an emergency, a backup. + else = { + create_character = { + location = scope:acolyte_host.capital_province + template = monk_character_template + culture = scope:acolyte_host.culture + faith = scope:story.var:base_faith + save_scope_as = irate_theocrat + } + } +} + +scripted_effect fp2_lyonese_monk_make_acolyte_and_irate_theocrat_rivals_effect = { + scope:acolyte = { + if = { + limit = { + NOT = { has_relation_rival = scope:irate_theocrat } + } + set_relation_rival = { + target= scope:irate_theocrat + reason = rival_blamed_by_mentor + } + } + } +} + +scripted_effect fp2_lyonese_monk_grab_and_update_pope_effect = { + # If this is our first time, just nab the current one. + if = { + limit = { + NOT = { exists = scope:pope } + } + scope:story.var:base_faith.religious_head = { save_scope_as = pope } + } + # Otherwise, check to see if the current Pope is the same as the last Pope. + else_if = { + limit = { + scope:story.var:base_faith.religious_head != scope:pope + } + scope:pope = { save_scope_as = old_pope } + scope:story.var:base_faith.religious_head = { save_scope_as = pope } + } + # Update the capital. + ## If scope:pope has a specific one, take that. + if = { + limit = { + scope:pope = { is_landed = yes } + } + scope:pope.capital_barony = { save_scope_as = papal_capital } + } + ## Otherwise, we default to Rome on principal. + else = { + title:b_roma = { save_scope_as = papal_capital } + } +} + + + + + + + + + + + +################################################## +# SETUP & MISC + +################################################## +# A Storm-Tossed Night +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# A learned holy person arrives at court, begging for succour. +fp2_lyonese_monk.0001 = { + type = character_event + title = fp2_lyonese_monk.0001.t + desc = fp2_lyonese_monk.0001.desc + theme = faith + left_portrait = { + character = scope:acolyte_host + animation = personality_rational + } + right_portrait = { + character = scope:acolyte + animation = chaplain + } + override_background = { reference = corridor_night } + cooldown = { years = 100 } + + trigger = { + #Not for landless + is_landed = yes + } + + immediate = { + play_music_cue = "mx_cue_general_crusade_event_3" + # Create scope:acolyte. + ## A pupil of Felix of Urgell, acting as a sort of do-over for the character. + create_character = { + location = root.capital_province + #General + age = fp2_lyonese_monk_age_value + faith = root.faith + culture = culture:french + dynasty = generate + #Education + trait = education_learning_4 + #Personality + trait = deceitful + trait = stubborn + trait = zealous + trait = brave + #Misc + trait = theologian + trait = scholar + trait = whole_of_body + trait = devoted + health = 5 + random_traits = no + gender_female_chance = root_faith_clergy_gender_female_chance + #Skills + ## These include the two "hidden" traits of scope:acolyte's buffs - heresiarch & education_intrigue_4. + diplomacy = 14 + martial = 2 + stewardship = 7 + intrigue = 12 + learning = 8 + prowess = 2 + save_scope_as = acolyte + } + scope:acolyte.house = { set_house_name = "dynn_d__Lyon" } + scope:acolyte.dynasty = { set_dynasty_name = "dynn_d__Lyon" } + } + + # Of course, what's mine is yours! + option = { + name = fp2_lyonese_monk.0001.a + + # Sort scope:acolyte. + ## Add them as a courtier. + add_courtier = scope:acolyte + ## & tell 'em to stay put. + scope:acolyte = { add_character_flag = blocked_from_leaving } + # Set up our tracking stuff. + ## Including a story cycle. + create_story = { + type = story_lyonese_monk + save_scope_as = story + } + ## A variable within that cycle that wants to be special. + if = { + limit = { exists = scope:story } + scope:story = { + # Set our one true OG faith. Till the other one. + set_variable = { + name = base_faith + value = scope:acolyte.faith + } + } + } + ## And, in case of death, a back-up scope:acolyte. + if = { + limit = { exists = scope:story } + scope:story = { + set_variable = { + name = acolyte + value = scope:acolyte + } + } + } + # Start the chain. + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + days = 7 + } + + stress_impact = { + generous = miniscule_stress_impact_loss + greedy = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = -1 + } + } + } + + # We have no room, but you can stay for a night. + option = { + name = fp2_lyonese_monk.0001.b + + # Opt out, with some consolation currency. + add_piety = minor_piety_gain + scope:acolyte = { silent_disappearance_effect = yes } + + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.5 + ai_sociability = -0.25 + } + } + } + + # No beggars in GetPrimaryTitle. *Out*. + option = { + name = fp2_lyonese_monk.0001.c + + # Opt out, with some consolation currency. + add_prestige = miniscule_prestige_gain + scope:acolyte = { silent_disappearance_effect = yes } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 0.25 + ai_sociability = -0.5 + ai_compassion = -1 + } + } + } +} + +# Select a candidate. +fp2_lyonese_monk.0002 = { + scope = none + hidden = yes + + trigger = { + # DLC check. + has_fp2_dlc_trigger = yes + } + + immediate = { + # First, mark this as done. + add_to_global_variable_list = { + name = unavailable_unique_events + target = flag:lyonese_monk_event + } + # Now we try to grab eligible candidates. + every_county_in_region = { + region = dlc_fp2_lyonese_monk_region + holder = { + if = { + limit = { fp2_lyonese_monk_0002_valid_court_trigger = yes } + add_to_list = potential_monk_court_list + } + } + } + # Then sort within them. + random_in_list = { + list = potential_monk_court_list + # Prioritise scholastic Iberian players. + limit = { + is_ai = no + capital_province = { geographical_region = world_europe_west_iberia } + } + # Otherwise, random roll it. + alternative_limit = { always = yes } + # We want to weight up a few things. + weight = { + base = 0 + # Learning gives our basic order, since it's reflective of how stimulating a theologian you are. + modifier = { add = learning } + # Weight up a bit for certain traits, those that make it more likely to allow shenanigans. + modifier = { + add = 10 + has_trait = trusting + } + modifier = { + add = 10 + has_trait = stubborn + } + modifier = { + add = 10 + has_trait = arrogant + } + # Weight up a bit for characters who are actively impious, as they're less likely to heed the Pope's demands. + modifier = { + add = 30 + piety_level <= 0 + } + # We want an Iberian pick over an Aquitanian one, ideally. + modifier = { + add = 50 + capital_province = { geographical_region = world_europe_west_iberia } + } + } + save_scope_as = acolyte_host + trigger_event = fp2_lyonese_monk.0001 + } + } +} + +################################################## +# A Former Friend +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +# You have died, and scope:acolyte wishes to continue. +fp2_lyonese_monk.0011 = { + type = character_event + title = fp2_lyonese_monk.0011.t + desc = fp2_lyonese_monk.0011.desc + theme = faith + left_portrait = { + character = scope:acolyte + animation = flirtation + } + override_background = { reference = sitting_room } + + trigger = { + is_imprisoned = no + is_adult = yes + exists = faith.religious_head + faith.religious_head = scope:story.var:base_faith.religious_head + } + + on_trigger_fail = { + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + scope:story = { end_story = yes } + } + + immediate = { + # Nab scope:acolyte a-fresh. + scope:story.var:acolyte = { save_scope_as = acolyte } + } + + # Well, I suppose... + option = { + name = fp2_lyonese_monk.0011.a + + # Notify scope:acolyte_host that they're opting in. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + # Give the story cycle its new host. + scope:story = { make_story_owner = scope:acolyte_host } + # Spawn the next event in the cycle. + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = 1 + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_sociability = 0.5 + } + } + } + + # Pack your belongings, vagrant. + option = { + name = fp2_lyonese_monk.0011.b + + # Clean house. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + scope:story = { end_story = yes } + # Everything ends. + custom_tooltip = fp2_lyonese_monk.0000.tt.teachings_fade + + stress_impact = { + paranoid = miniscule_stress_impact_loss + shy = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = -0.5 + ai_zeal = -1 + } + } + } +} + +################################################## +# Gone and Done +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# Scope:acolyte has died or is no longer your courtier or vassal. +fp2_lyonese_monk.0021 = { + type = character_event + title = fp2_lyonese_monk.0021.t + desc = { + desc = fp2_lyonese_monk.0021.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:acolyte = { is_alive = no } + } + desc = fp2_lyonese_monk.0021.desc.dead + } + triggered_desc = { + trigger = { + scope:acolyte = { is_imprisoned = yes } + } + desc = fp2_lyonese_monk.0021.desc.imprisoned + } + desc = fp2_lyonese_monk.0021.desc.gone + } + } + theme = faith + left_portrait = { + character = scope:acolyte_host + animation = disapproval + } + right_portrait = { + character = scope:acolyte + animation = disbelief + } + override_background = { reference = throne_room } + + # Private Teachings: they can't have been that important... + option = { + name = fp2_lyonese_monk.0021.a + trigger = { + NOR = { + has_character_flag = fp2_lyonese_monk_entered_controversy_flag + has_character_flag = fp2_lyonese_monk_entered_schism_flag + } + } + + # Everything ends. + custom_tooltip = fp2_lyonese_monk.0000.tt.teachings_fade + # Clean house. + scope:story = { end_story = yes } + + # No stress impact for notification option. + ai_chance = { + # Every option's a good option. + base = 100 + } + } + + # Public Controversy: they were clearly more trouble than they're worth... + option = { + name = fp2_lyonese_monk.0021.b + trigger = { + has_character_flag = fp2_lyonese_monk_entered_controversy_flag + NOT = { has_character_flag = fp2_lyonese_monk_entered_schism_flag } + } + + # Everything ends. + custom_tooltip = fp2_lyonese_monk.0000.tt.teachings_fade + # Clean house. + scope:story = { end_story = yes } + + # No stress impact for notification option. + ai_chance = { + # Every option's a good option. + base = 100 + } + } + + # Schism: all this for nothing? + option = { + name = fp2_lyonese_monk.0021.c + trigger = { has_character_flag = fp2_lyonese_monk_entered_schism_flag } + + # Everything ends. + custom_tooltip = fp2_lyonese_monk.0000.tt.teachings_fade + # Clean house. + scope:story = { end_story = yes } + + # No stress impact for notification option. + ai_chance = { + # Every option's a good option. + base = 100 + } + } + + # Is scope:acolyte still alive somewhere? SheHe shouldn't be. + after = { + # ... so let's just clean that up. + scope:acolyte = { + if = { + limit = { is_alive = yes } + silent_disappearance_effect = yes + } + } + } +} + +################################################## +# Shattered Faith +# by Ewan Cowhig Croft +# 0031 - 0040 +################################################## + +# You or scope:acolyte are no longer the correct faith. +fp2_lyonese_monk.0031 = { + type = character_event + title = fp2_lyonese_monk.0031.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:acolyte.faith = scope:story.var:base_faith } + desc = fp2_lyonese_monk.0031.desc.acolyte_host + } + desc = fp2_lyonese_monk.0031.desc.acolyte + } + } + theme = faith + left_portrait = { + character = scope:acolyte_host + animation = disapproval + } + right_portrait = { + character = scope:acolyte + animation = shame + } + override_background = { reference = temple } + + # Me: I don't need scope:acolyte when I have HighGodName. + option = { + name = fp2_lyonese_monk.0031.a + trigger = { + faith != scope:story.var:base_faith + } + + # Clean house. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + scope:story = { end_story = yes } + # Everything ends. + custom_tooltip = fp2_lyonese_monk.0000.tt.teachings_fade + + # No stress impact for notification option. + ai_chance = { + # Every option's a good option. + base = 100 + } + } + + # Them: they clearly weren't all that committed. + option = { + name = fp2_lyonese_monk.0031.b + trigger = { + scope:acolyte.faith != scope:story.var:base_faith + } + + # Clean house. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + scope:story = { end_story = yes } + # Everything ends. + custom_tooltip = fp2_lyonese_monk.0000.tt.teachings_fade + + # No stress impact for notification option. + ai_chance = { + # Every option's a good option. + base = 100 + } + } +} + +################################################## +# Bigger Crises +# by Ewan Cowhig Croft +# 0041 - 0050 +################################################## + +# The destruction of the Papacy leaves little room in everyone's hearts for the minutiae of doctrine. +fp2_lyonese_monk.0041 = { + type = character_event + title = fp2_lyonese_monk.0041.t + desc = { + first_valid = { + # Either Rome is gone... + triggered_desc = { + trigger = { + NOT = { exists = title:k_papal_state.holder } + } + desc = fp2_lyonese_monk.0041.desc.pope_hope_is_nope + } + # ... or else we've likely just split off from them, probably due to Mozarab shenanigans. + desc = fp2_lyonese_monk.0041.desc.schism + } + } + theme = faith + left_portrait = { + character = scope:acolyte_host + animation = disbelief + } + right_portrait = { + character = scope:acolyte + animation = stress + } + override_background = { reference = burning_building } + + # We are all alone without the Vicar of Christ! + option = { + name = { + trigger = { + NOT = { exists = title:k_papal_state.holder } + } + text = fp2_lyonese_monk.0041.a.pope_hope_is_nope + } + name = { + trigger = { always = yes } + text = fp2_lyonese_monk.0041.a.backup + } + + # Clean house. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + scope:story = { end_story = yes } + # Everything ends. + custom_tooltip = fp2_lyonese_monk.0000.tt.teachings_fade + + # No stress impact for notification option. + ai_chance = { + # Every option's a good option. + base = 100 + } + } +} + +################################################## +# It Is a Mystery +# by Ewan Cowhig Croft +# 0051 - 0060 +################################################## + +# Your incarceration causes scope:acolyte to disappear - and the story along with HerHim. +fp2_lyonese_monk.0051 = { + type = character_event + title = fp2_lyonese_monk.0051.t + desc = fp2_lyonese_monk.0051.desc + theme = faith + left_portrait = { + character = scope:acolyte_host + triggered_animation = { + trigger = { is_in_prison_type = house_arrest } + animation = prisonhouse + } + triggered_animation = { + trigger = { is_in_prison_type = dungeon } + animation = prisondungeon + } + } + right_portrait = { + character = scope:acolyte + animation = dismissal + } + override_background = { reference = dungeon } + + # What could have happened to HerHim? + option = { + name = fp2_lyonese_monk.0051.a + + # Clean house. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + scope:story = { end_story = yes } + # Everything ends. + custom_tooltip = fp2_lyonese_monk.0000.tt.teachings_fade + + # No stress impact for notification option. + ai_chance = { + # Every option's a good option. + base = 100 + } + } +} + + + + + + + + + + +################################################## +# PRIVATE TEACHINGS + +################################################## +# Just a Few Friends +# by Ewan Cowhig Croft +# 0201 - 0210 +################################################## + +# Scope:acolyte asks for permission to start a study group. +fp2_lyonese_monk.0201 = { + type = character_event + title = fp2_lyonese_monk.0201.t + desc = fp2_lyonese_monk.0201.desc + theme = learning_theology_focus + left_portrait = { + character = scope:acolyte_host + animation = personality_rational + } + right_portrait = { + character = scope:acolyte + animation = flirtation + } + override_background = { reference = sitting_room } + + trigger = { fp2_lyonese_monk_0000_valid_for_events_trigger = yes } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + } + + # I guess it couldn't hurt... + option = { + name = fp2_lyonese_monk.0201.a + + # Scope:acolyte is happy. + reverse_add_opinion = { + target = scope:acolyte + modifier = pleased_opinion + opinion = 25 + } + # We nab a few early adopters. + fp2_add_random_characters_to_converts_list_effect = { COURT = scope:acolyte_host } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0201.a.tt + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 4 8 } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_sociability = 0.5 + } + } + } + + # A group of conspirators? I don't think so! + option = { + name = fp2_lyonese_monk.0201.b + + # Boot the monk. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + # Stress loss applied in the stress impact. + + stress_impact = { + base = medium_stress_loss + paranoid = minor_stress_impact_loss + trusting = medium_stress_impact_gain + zealous = medium_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = -0.5 + ai_rationality = -1 + } + } + } + + # I think you've outstayed your welcome, scope:acolyte. + option = { + name = fp2_lyonese_monk.0201.c + + # Boot the monk. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + # Lil bit o'consolation prestige. + add_prestige = miniscule_prestige_gain + + stress_impact = { + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + zealous = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = -0.5 + ai_energy = -0.5 + } + } + } +} + +################################################## +# But Why? +# by Ewan Cowhig Croft +# 0211 - 0220 +################################################## + +scripted_trigger fp2_lyonese_monk_0211_suitable_baron_trigger = { + # Meets the basic requirements. + fp2_suitable_base_convert_trigger = yes + # Plus: is only a baron. + highest_held_title_tier = tier_barony +} + +# One of your barons retires to become a monk spontaneously. +fp2_lyonese_monk.0211 = { + type = letter_event + sender = scope:baron + opening = fp2_lyonese_monk.0211.t + desc = fp2_lyonese_monk.0211.desc + cooldown = { years = 100 } + + trigger = { + fp2_lyonese_monk_0000_valid_for_events_trigger = yes + # Must have a suitable baron. + any_vassal = { fp2_lyonese_monk_0211_suitable_baron_trigger = yes } + } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Select a suitable baron. + random_vassal = { + # Try to nab a councillor, to make it more impactful. + limit = { + is_councillor_of = scope:acolyte_host + fp2_lyonese_monk_0211_suitable_baron_trigger = yes + } + # But otherwise yeah, just anyone is fine. + alternative_limit = { fp2_lyonese_monk_0211_suitable_baron_trigger = yes } + add_to_list = hidden_converts + save_scope_as = baron + primary_title = { save_scope_as = baron_holding} + } + # Now, they resign and become a NunMonk. + scope:baron = { + depose = yes # depose_effect not used for opted abdication + add_trait = devoted + } + # Nab some more converts. + fp2_add_random_characters_to_converts_list_effect = { COURT = scope:acolyte_host } + } + + # Can SheHe #EMP do#! that? + option = { + name = fp2_lyonese_monk.0211.a + + # No extra effects. + # Spawn the next event in the cycle. + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 4 8 } + } + + # No extra stress for a single-option event. + ai_chance = { + # Not relevant for a single-option event. + base = 100 + } + } +} + +################################################## +# A Rictus Grin +# by Ewan Cowhig Croft +# 0221 - 0230 +################################################## + +scripted_trigger fp2_lyonese_monk_0221_suitable_courtier_trigger = { + # We use the base version because we don't care if they're already a secret convert. + fp2_suitable_base_convert_trigger = yes + # Now, we want to make sure they're not already zealous and have room for an extra personality trait. + number_of_personality_traits < personality_trait_limit + NOR = { + has_trait = zealous + # They also should generally be precluded from cynical, but hey, just in case... + has_trait = cynical + } +} + +# A courtier is looking dopey and happy due to how at peace with themselves they are. +fp2_lyonese_monk.0221 = { + type = character_event + title = fp2_lyonese_monk.0221.t + desc = fp2_lyonese_monk.0221.desc + theme = friendly + left_portrait = { + character = scope:acolyte_host + animation = worry + } + right_portrait = { + character = scope:courtier + animation = admiration + } + override_background = { reference = corridor_day } + cooldown = { years = 100 } + + trigger = { + fp2_lyonese_monk_0000_valid_for_events_trigger = yes + any_courtier = { fp2_lyonese_monk_0221_suitable_courtier_trigger = yes } + } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Select a suitable courtier. + random_courtier = { + limit = { fp2_lyonese_monk_0221_suitable_courtier_trigger = yes } + add_to_list = hidden_converts + save_scope_as = courtier + } + # Give 'em a new lease on life. + scope:courtier = { add_trait = zealous } + # Nab some more converts. + fp2_add_random_characters_to_converts_list_effect = { COURT = scope:acolyte_host } + } + + # Glad you're doing well, scope:courtier! + option = { + name = fp2_lyonese_monk.0221.a + + # They like you a little more. + reverse_add_opinion = { + target = scope:courtier + modifier = compliment_opinion + opinion = 20 + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + # I've got a bad feeling about this... + option = { + name = fp2_lyonese_monk.0221.b + + # They like you a little less. + reverse_add_opinion = { + target = scope:courtier + modifier = disappointed_opinion + opinion = -20 + } + + stress_impact = { + paranoid = miniscule_stress_impact_loss + trusting = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_sociability = -1 + } + } + } + + after = { + # Spawn the next event in the cycle. + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 4 8 } + } + } +} + +################################################## +# Booing the Bishop +# by Ewan Cowhig Croft +# 0231 - 0240 +################################################## + +# A bishop in your realm is booed by a crowd of people. +fp2_lyonese_monk.0231 = { + type = character_event + title = fp2_lyonese_monk.0231.t + desc = fp2_lyonese_monk.0231.desc + theme = faith + left_portrait = { + character = scope:irate_theocrat + animation = fear + } + cooldown = { years = 100 } + + trigger = { + fp2_lyonese_monk_0000_valid_for_events_trigger = yes + fp2_lyonese_monk_has_suitable_annoyed_theocrat_trigger = yes + } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Process a suitable annoyed theocrat. + fp2_lyonese_monk_select_suitable_annoyed_theocrat_effect = yes + scope:irate_theocrat = { add_stress = major_stress_gain } + # Nab some more converts. + fp2_add_random_characters_to_converts_list_effect = { COURT = scope:acolyte_host } + } + + # People need to show the Church more *respect*. + option = { + name = fp2_lyonese_monk.0231.a + + # Scope:irate_theocrat appreciates your kind words. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = pious_opinion + opinion = 20 + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = -1 + } + } + } + + # Clearly SheHe's got to work on HerHis sermons. + option = { + name = fp2_lyonese_monk.0231.b + + # You gain a little piety. + add_piety = minor_piety_gain + # But you frustrate and hurt scope:irate_theocrat. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = cruelty_opinion + opinion = -10 + } + scope:irate_theocrat = { add_stress = minor_stress_gain } + + stress_impact = { + cynical = miniscule_stress_impact_loss + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -0.5 + ai_zeal = -1 + } + } + } + + after = { + # Spawn the next event in the cycle. + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 4 8 } + } + } +} + +################################################## +# All HerHis Fault +# by Ewan Cowhig Croft +# 0241 - 0250 +################################################## + +# Your court chaplain comes to you complaining, begging for an end to all of this. +fp2_lyonese_monk.0241 = { + type = character_event + title = fp2_lyonese_monk.0241.t + desc = fp2_lyonese_monk.0241.desc + theme = rival_relation + left_portrait = { + character = scope:irate_theocrat + animation = rage + } + right_portrait = { + character = scope:acolyte + animation = shock + } + override_background = { reference = council_chamber } + + trigger = { fp2_lyonese_monk_0000_valid_for_events_trigger = yes } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Process a suitable annoyed theocrat. + fp2_lyonese_monk_select_suitable_annoyed_theocrat_effect = yes + # Make it clear they're pissed. + fp2_lyonese_monk_make_acolyte_and_irate_theocrat_rivals_effect = yes + } + + # Very well — pack your things, scope:acolyte. + option = { + name = fp2_lyonese_monk.0241.a + + # Opinion gain with scope:irate_theocrat. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = pleased_opinion + opinion = 20 + } + # Scope:acolyte leaves. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -0.5 + } + } + } + + # GUARDS! Seize the heterodox bastard! + option = { + name = fp2_lyonese_monk.0241.b + + # A sprinkle of piety for your orthodoxy! + add_piety = minor_piety_gain + # Scope:acolyte is dispatched. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = scuffle } + # Scope:irate_theocrat is horrified though. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = overreaction_opinion + opinion = -10 + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 1 + } + } + } + + # You're the troublemaker here, scope:irate_theocrat + option = { + name = fp2_lyonese_monk.0241.c + + # Scope:irate_theocrat is *not* happy. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = refusal_opinion + opinion = -30 + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0241.c.tt + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 4 8 } + } + + stress_impact = { + cynical = miniscule_stress_impact_loss + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -1 + } + } + } +} + + + + + + + + + + + +################################################## +# PUBLIC CONTROVERSY + +################################################## +# Scope:pope's Epistle +# by Ewan Cowhig Croft +# 0401 - 0410 +################################################## + +# The Pope writes you an advisory, reprimanding you and asking you to boot the monk. +fp2_lyonese_monk.0401 = { + type = letter_event + sender = scope:pope + opening = fp2_lyonese_monk.0401.t + desc = fp2_lyonese_monk.0401.desc + + trigger = { fp2_lyonese_monk_0000_valid_for_events_trigger = yes } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + play_music_cue = "mx_cue_general_crusade_event_1" + # Sort our Pope scope. + fp2_lyonese_monk_grab_and_update_pope_effect = yes + # Mark that we've entered the second phase. + add_character_flag = fp2_lyonese_monk_entered_controversy_flag + } + + # The Holy See compels me. + option = { + name = fp2_lyonese_monk.0401.a + + # Boot the monk. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + # Gain a favour hook on scope:pope. + add_hook = { + type = favor_hook + target = scope:pope + } + # Plus some opinion. + reverse_add_opinion = { + target = scope:pope + modifier = pious_opinion + opinion = 20 + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = 0.5 + } + } + } + + # I don't remember asking for Rome's permission. + option = { + name = fp2_lyonese_monk.0401.b + + # Scope:pope is more upset. + reverse_add_opinion = { + target = scope:pope + modifier = impious_opinion + opinion = -15 + } + # Plus - lose a little piety. + add_piety = minor_piety_loss + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + cynical = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_zeal = -1 + } + } + } +} + +################################################## +# Space to Teach +# by Ewan Cowhig Croft +# 0411 - 0420 +################################################## + +scripted_trigger fp2_lyonese_monk_0411_county_to_give_trigger = { + tier = tier_county + is_landless_type_title = no + NOT = { this = scope:acolyte_host.capital_county } + # Within the prime region. + title_province = { geographical_region = dlc_fp2_lyonese_monk_region } +} + +# Scope:acolyte asks you for a county in which to spread HerHis teachings. +fp2_lyonese_monk.0411 = { + type = character_event + title = fp2_lyonese_monk.0411.t + desc = fp2_lyonese_monk.0411.desc + theme = learning_theology_focus + left_portrait = { + character = scope:acolyte_host + animation = disbelief + } + right_portrait = { + character = scope:acolyte + animation = admiration + } + cooldown = { years = 100 } + + trigger = { + fp2_lyonese_monk_0000_valid_for_events_trigger = yes + # If you're just a count yourself, this isn't relevant for you. + highest_held_title_tier >= tier_duchy + # Must have a suitable county to hand over. + any_held_title = { fp2_lyonese_monk_0411_county_to_give_trigger = yes } + } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Pick a county to ask for. + ordered_held_title = { + limit = { fp2_lyonese_monk_0411_county_to_give_trigger = yes } + # Pick the least valuable county. + order_by = { + value = development_level + multiply = -1 + } + save_scope_as = acolyte_fief + } + } + + # I suppose... I suppose I could allow this... + option = { + name = fp2_lyonese_monk.0411.a + + # You turn over the county. + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + scope:acolyte_fief = { + change_title_holder = { + holder = scope:acolyte + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + # Make sure the place spawns as a theocracy. + hidden_effect = { + scope:acolyte = { change_government = theocracy_government } + } + # Nab some converts. + fp2_add_random_vassals_to_converts_list_effect = { LIEGE = scope:acolyte_host } + # Spawn the next event in the cycle. + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + generous = minor_stress_impact_loss + greedy = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 0.5 + ai_greed = -2 + } + } + } + + # Don't be ridiculous! + option = { + name = fp2_lyonese_monk.0411.b + flavor = fp2_lyonese_monk.0411.b.tt + + # Boot the monk. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + # Gain a little prestige for putting your foot down. + add_prestige = minor_prestige_gain + + stress_impact = { + greedy = miniscule_stress_impact_loss + generous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_greed = 2 + ai_zeal = -0.5 + } + } + } +} + +################################################## +# High Tempers +# by Ewan Cowhig Croft +# 0421 - 0430 +################################################## + +# Your court chaplain and scope:acolyte get into a fight. +fp2_lyonese_monk.0421 = { + type = character_event + title = fp2_lyonese_monk.0421.t + desc = fp2_lyonese_monk.0421.desc + theme = unfriendly + left_portrait = { + character = scope:irate_theocrat + animation = war_attacker + } + right_portrait = { + character = scope:acolyte + animation = war_over_win + } + override_background = { reference = feast } + cooldown = { years = 100 } + + trigger = { fp2_lyonese_monk_0000_valid_for_events_trigger = yes } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Grab a theocrat. + fp2_lyonese_monk_select_suitable_annoyed_theocrat_effect = yes + # Piss them off. + fp2_lyonese_monk_make_acolyte_and_irate_theocrat_rivals_effect = yes + } + + # Scope:irate_theocrat, show some decorum! + option = { + name = fp2_lyonese_monk.0421.a + + # Lose opinion with scope:irate_theocrat. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = humiliated_opinion + opinion = -10 + } + # Gain opinion with scope:acolyte. + reverse_add_opinion = { + target = scope:acolyte + modifier = trust_opinion + opinion = 20 + } + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_emboldened + scope:story = { + change_variable = { + name = school_radical + add = 1 + } + } + + stress_impact = { + cynical = miniscule_stress_impact_loss + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 1 + ai_zeal = -1 + } + } + } + + # Scope:acolyte, you *will* respect HerHis authority! + option = { + name = fp2_lyonese_monk.0421.b + + # Gain opinion with scope:irate_theocrat. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = trust_opinion + opinion = 20 + } + # Lose opinion with scope:acolyte. + reverse_add_opinion = { + target = scope:acolyte + modifier = humiliated_opinion + opinion = -10 + } + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_paused + scope:story = { + change_variable = { + name = school_felicitous + add = 1 + } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_sociability = -1 + } + } + } + + # Don't you two have more in common than not? + option = { + name = fp2_lyonese_monk.0421.c + + # Lose opinion with scope:irate_theocrat. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = annoyed_opinion + opinion = -5 + } + # Lose opinion with scope:acolyte. + reverse_add_opinion = { + target = scope:acolyte + modifier = annoyed_opinion + opinion = -5 + } + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_humbled + scope:story = { + change_variable = { + name = school_elipandic + add = 1 + } + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + zealous = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_vengefulness = -1 + } + } + } + + after = { + # Spawn the next event in the cycle. + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + } +} + +################################################## +# Scope:pope's Second Epistle +# by Ewan Cowhig Croft +# 0431 - 0440 +################################################## + +# The Pope writes you *another* advisory, demanding that you boot scope:acolyte plus +fp2_lyonese_monk.0431 = { + type = letter_event + sender = scope:pope + opening = fp2_lyonese_monk.0431.t + desc = { + # Check whether the Pope has switched. + first_valid = { + triggered_desc = { + trigger = { + exists = scope:old_pope + scope:old_pope != scope:pope + } + desc = fp2_lyonese_monk.0431.desc.pope.different + } + desc = fp2_lyonese_monk.0431.desc.pope.same + } + desc = fp2_lyonese_monk.0431.desc.outro + } + cooldown = { years = 100 } + + trigger = { fp2_lyonese_monk_0000_valid_for_events_trigger = yes } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Sort our Pope scope. + fp2_lyonese_monk_grab_and_update_pope_effect = yes + } + + # It's not wise to aggravate the throne of St. Peter... + option = { + name = fp2_lyonese_monk.0431.a + + # Boot the monk. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + # A bit less opinion now, as you've had one chance. + reverse_add_opinion = { + target = scope:pope + modifier = pious_opinion + opinion = 10 + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = -1 + } + } + } + + # Perhaps there's a middle ground here. + option = { + name = fp2_lyonese_monk.0431.b + + # You try to argue for a better result. + duel = { + skill = diplomacy + value = very_high_skill_rating + # You mollify scope:pope. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0431.b.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0431.b.tt.success + left_icon = scope:pope + reverse_add_opinion = { + target = scope:pope + modifier = impious_opinion + opinion = -5 + } + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_humbled + scope:story = { + change_variable = { + name = school_elipandic + add = 1 + } + } + } + } + # Scope:pope is even *more* angry. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0431.b.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0431.b.tt.failure + left_icon = scope:pope + ## We use the same value as last time since, by definition, this is now stacking. + reverse_add_opinion = { + target = scope:pope + modifier = angry_opinion + opinion = -30 + } + # And some *more* piety loss! + add_piety = medium_piety_loss + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_paused + scope:story = { + change_variable = { + name = school_felicitous + add = 1 + } + } + } + } + } + + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_sociability = 0.75 + ai_zeal = 0.5 + ai_vengefulness = -0.5 + } + } + } + + # Damn it, I'm the GetTitleAsName! + option = { + name = fp2_lyonese_monk.0431.c + + # Scope:pope is more upset. + ## We use the same value as last time since, by definition, this is now stacking. + reverse_add_opinion = { + target = scope:pope + modifier = impious_opinion + opinion = -15 + } + # And some *more* piety loss! + add_piety = medium_piety_loss + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_emboldened + scope:story = { + change_variable = { + name = school_radical + add = 1 + } + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + cynical = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_sociability = -0.5 + ai_zeal = -1 + } + } + } +} + +################################################## +# The Council of scope:bishopric +# by Ewan Cowhig Croft +# 0441 - 0450 +################################################## + +# The clergy of the region gather for a minor church council, featuring scope:acolyte defending their claims. +fp2_lyonese_monk.0441 = { + type = character_event + title = fp2_lyonese_monk.0441.t + desc = fp2_lyonese_monk.0441.desc + theme = faith + left_portrait = { + character = scope:acolyte + animation = schadenfreude + } + right_portrait = { + character = scope:irate_theocrat + animation = stress + } + + trigger = { fp2_lyonese_monk_0000_valid_for_events_trigger = yes } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Grab a theocrat. + fp2_lyonese_monk_select_suitable_annoyed_theocrat_effect = yes + # Escalate the scope:acolyte - scope:irate_theocrat relationship if we can. + scope:acolyte = { + # We should become rivals if we're not already. + if = { + limit = { + NOT = { has_relation_rival = scope:irate_theocrat } + } + scope:irate_theocrat = { + set_relation_rival = { + target = scope:acolyte + reason = rival_blamed_by_mentor + } + } + } + # But if we _are_, then it's nemesis time. + else_if = { + limit = { has_relation_rival = scope:irate_theocrat } + set_relation_nemesis = { + target = scope:irate_theocrat + copy_reason = rival + reason = rival_blamed_by_mentor + } + } + # Plus, this shows off their ecclesiastic chops! + add_piety_level = 2 + } + # Pick a venue. + scope:acolyte = { + if = { + limit = { is_landed = yes } + capital_barony = { save_scope_as = council_1_venue } + } + else = { + scope:acolyte_host.capital_barony = { save_scope_as = council_1_venue } + } + } + # The whole event preemptively gives scope:acolyte a fresh audience. + fp2_add_random_vassals_to_converts_list_effect = { LIEGE = scope:acolyte_host } + } + + # This council has my full support. + option = { + name = fp2_lyonese_monk.0441.a + + # Gain piety. + add_piety = medium_piety_gain + # Scope:irate_theocrat has a bad time. + scope:irate_theocrat = { + add_opinion = { + target = scope:acolyte_host + modifier = humiliated_opinion + opinion = -50 + } + add_stress = major_stress_gain + } + # Scope:acolyte is happy. + scope:acolyte = { + add_opinion = { + target = scope:acolyte_host + modifier = pious_opinion + opinion = 20 + } + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 1 + } + } + } + + # Matters of theology are not my concern. + option = { + name = fp2_lyonese_monk.0441.b + + # Gain prestige. + add_prestige = medium_prestige_gain + # Scope:irate_theocrat has a less-bad time. + scope:irate_theocrat = { + add_opinion = { + target = scope:acolyte_host + modifier = abandoned_me_opinion + opinion = -20 + } + add_stress = medium_stress_gain + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_zeal = -1 + } + } + } + + # I've let this go too far! + option = { + name = fp2_lyonese_monk.0441.c + + # Boot the monk. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + # Scope:irate_theocrat is incredibly thankful. + reverse_add_opinion = { + target = scope:irate_theocrat + modifier = relieved_opinion + opinion = 75 + } + scope:irate_theocrat = { add_stress = major_stress_loss } + # Gain some piety out of it. Even though you're likely at a net loss by this point. + add_piety = medium_piety_gain + + stress_impact = { + zealous = miniscule_stress_impact_loss + cynical = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = 0.25 + } + } + } +} + + + + + + + + + + + +################################################## +# SCHISM + +################################################## +# Scope:pope's Third Epistle +# by Ewan Cowhig Croft +# 0601 - 0610 +################################################## + +# Whatever the council's results, the Pope condemns it. You are given a final demand demand to repent & turn over scope:acolyte or face excommunication. +fp2_lyonese_monk.0601 = { + type = letter_event + sender = scope:pope + opening = fp2_lyonese_monk.0601.t + desc = fp2_lyonese_monk.0601.desc + + trigger = { fp2_lyonese_monk_0000_valid_for_events_trigger = yes } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + play_music_cue = "mx_cue_combat_stinger" + # Sort our Pope scope. + fp2_lyonese_monk_grab_and_update_pope_effect = yes + # Mark that we've entered the second phase. + remove_character_flag = fp2_lyonese_monk_entered_controversy_flag + add_character_flag = fp2_lyonese_monk_entered_schism_flag + } + + # I can only beg for St. Peter's forgiveness. + option = { + name = fp2_lyonese_monk.0601.a + + # Hand the monk over to Rome. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = pope } + # Scope:pope forgives you your trespasses. + add_piety = medium_piety_gain + reverse_add_opinion = { + target = scope:pope + modifier = relieved_opinion + opinion = 50 + } + + stress_impact = { + zealous = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + cynical = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + # If we've made it to this point, the AI should be committed to backing scope:acolyte. + base = 0 + } + } + + # I am appointed by HighGodName! + option = { + name = fp2_lyonese_monk.0601.b + + # Welp, don't say you weren't warned. + excommunicate_character = { + REQUESTING_CHARACTER = scope:pope + TARGET_CHARACTER = scope:acolyte_host + } + add_piety_level = -2 + + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + cynical = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + zealous = major_stress_impact_gain + humble = major_stress_impact_gain + } + ai_chance = { + # If we've made it to this point, the AI should be committed to backing scope:acolyte. + base = 100 + } + } +} + +################################################## +# High Tensions +# by Ewan Cowhig Croft +# 0611 - 0620 +################################################## + +scripted_effect fp2_lyonese_monk_0611_diplomatic_defusal_effect = { + scope:rioting_county = { + add_county_modifier = { + modifier = fp2_religious_riots_defused_modifier + years = 10 + } + } +} + +# An angry mob in your capital turn up to demand scope:acolyte's head, countered by *another* angry mob that hates the first mob. +fp2_lyonese_monk.0611 = { + type = character_event + title = fp2_lyonese_monk.0611.t + desc = fp2_lyonese_monk.0611.desc + theme = war + left_portrait = { + character = scope:peasant_1 + animation = aggressive_spear + outfit_tags = { beggar_rags } + hide_info = yes + } + right_portrait = { + character = scope:peasant_2 + animation = aggressive_axe + outfit_tags = { beggar_rags } + hide_info = yes + } + lower_center_portrait = scope:acolyte + override_background = { reference = courtyard } + cooldown = { years = 100 } + + trigger = { + fp2_lyonese_monk_0000_valid_for_events_trigger = yes + any_held_title = { + title_tier = county + faith = scope:story.var:base_faith + } + } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Pick a suitable county. + if = { + limit = { capital_county.faith = scope:story.var:base_faith } + capital_county = { save_scope_as = rioting_county } + } + else = { + random_held_title = { + title_tier = county + limit = { + faith = scope:story.var:base_faith + } + save_scope_as = rioting_county + } + } + # Create some peasants. + create_character = { + template = generic_peasant_character + location = scope:rioting_county.title_province + save_scope_as = peasant_1 + } + create_character = { + template = generic_peasant_character + location = scope:rioting_county.title_province + save_scope_as = peasant_2 + } + } + + # Diplomacy: I can defuse this situation. + option = { + name = fp2_lyonese_monk.0611.a + trigger = { diplomacy >= very_high_skill_rating } + skill = diplomacy + + # Apply defusal effect immediately. + fp2_lyonese_monk_0611_diplomatic_defusal_effect = yes + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_humbled + scope:story = { + change_variable = { + name = school_elipandic + add = 1 + } + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + wrathful = medium_stress_impact_gain + shy = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + # Please, my subjects, calm! + option = { + name = fp2_lyonese_monk.0611.b + trigger = { diplomacy < very_high_skill_rating } + + # You try to talk things out. + duel = { + skill = diplomacy + value = high_skill_rating + # You defuse the situation. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0611.b.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0611.b.tt.success + left_icon = scope:rioting_county + fp2_lyonese_monk_0611_diplomatic_defusal_effect = yes + } + } + # Violence erupts anyway. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0611.b.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0611.b.tt.failure + left_icon = scope:rioting_county + scope:rioting_county = { + add_county_modifier = { + modifier = fp2_religious_riots_modifier + years = 20 + } + } + } + } + } + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_humbled + scope:story = { + change_variable = { + name = school_elipandic + add = 1 + } + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + calm = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + wrathful = medium_stress_impact_gain + shy = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + # Fetch my sword, we'll disperse these *rebels*. + option = { + name = fp2_lyonese_monk.0611.c + flavor = fp2_lyonese_monk.0611.c.tt + + # You choose violence. + scope:rioting_county = { + add_county_modifier = { + modifier = fp2_religious_riots_suppressed_modifier + years = 20 + } + } + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_emboldened + scope:story = { + change_variable = { + name = school_radical + add = 1 + } + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + wrathful = miniscule_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + # Heretics? At my very *door*? + option = { + name = fp2_lyonese_monk.0611.d + flavor = fp2_lyonese_monk.0611.d.tt + + # You've had enough of this event chain. + scope:rioting_county = { + add_county_modifier = { + modifier = fp2_religious_riots_suppressed_modifier + years = 20 + } + } + # Scope:acolyte is dispatched. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = scuffle } + # Take a nice chunk o'piety for your zeal! + add_piety = major_piety_gain + + stress_impact = { + wrathful = miniscule_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + # If we've made it to this point, the AI should be committed to backing scope:acolyte. + base = 0 + } + } + + # Lock the gates. + option = { + name = fp2_lyonese_monk.0611.e + + # Riots outside, not your problem. + scope:rioting_county = { + add_county_modifier = { + modifier = fp2_religious_riots_modifier + years = 20 + } + } + # Stress loss in the stress_impact block. + # Mark this for school calcs later. + custom_tooltip = fp2_lyonese_monk.0000.tt.is_paused + scope:story = { + change_variable = { + name = school_felicitous + add = 1 + } + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + base = major_stress_loss + shy = minor_stress_impact_loss + gregarious = minor_stress_impact_gain + wrathful = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_sociability = -1 + } + } + } + + after = { + # Clean up the peasants. + scope:peasant_1 = { silent_disappearance_effect = yes } + scope:peasant_2 = { silent_disappearance_effect = yes } + } +} + +################################################## +# A Formal Complaint +# by Ewan Cowhig Croft +# 0621 - 0630 +################################################## + +scripted_trigger fp2_lyonese_monk_0621_suitable_vassal_trigger = { + # Same faith. + faith = scope:acolyte_host.faith + # Not a cynic. + NOT = { has_trait = cynical } + # Available for narrative purposes. + is_available_ai_adult = yes + # And uhhh... make sure they don't nab themselves. + this != scope:acolyte +} + +# Zealous vassals protest your heresy. +fp2_lyonese_monk.0621 = { + type = character_event + title = fp2_lyonese_monk.0621.t + desc = fp2_lyonese_monk.0621.desc + theme = vassal + left_portrait = { + character = scope:acolyte_host + animation = worry + } + right_portrait = { + character = scope:zealous_vassal + animation = anger + } + lower_left_portrait = scope:acolyte + cooldown = { years = 100 } + + trigger = { + fp2_lyonese_monk_0000_valid_for_events_trigger = yes + any_vassal = { fp2_lyonese_monk_0621_suitable_vassal_trigger = yes } + } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # Nab a suitable vassal. + ordered_vassal = { + limit = { fp2_lyonese_monk_0621_suitable_vassal_trigger = yes } + order_by = { value = max_military_strength } + save_scope_as = zealous_vassal + } + # Sort the Pope. + fp2_lyonese_monk_grab_and_update_pope_effect = yes + } + + # Scope:pope couldn't persuade me, what makes you think you can? + option = { + name = fp2_lyonese_monk.0621.a + + # You engage them in serious debate. + duel = { + skill = learning + target = scope:zealous_vassal + # You shatter their world view. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0621.a.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0621.a.tt.success + left_icon = scope:zealous_vassal + scope:zealous_vassal = { + add_opinion = { + target = scope:acolyte_host + modifier = impious_opinion + opinion = -25 + } + add_stress = major_stress_gain + } + } + } + # They're even *more* infuriated with you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0621.a.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0621.a.tt.failure + left_icon = scope:zealous_vassal + reverse_add_opinion = { + target = scope:zealous_vassal + modifier = respect_opinion + opinion = -50 + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:zealous_vassal } + } + set_relation_rival = { + target = scope:zealous_vassal + reason = rival_refused_to_see_reason + } + } + } + } + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + fickle = major_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_rationality = 1 + ai_zeal = -0.5 + } + } + } + + # Vassal? You're naught but a malcontent! + option = { + name = fp2_lyonese_monk.0621.b + + # Scope:zealous_vassal is annoyed. + reverse_add_opinion = { + target = scope:zealous_vassal + modifier = respect_opinion + opinion = -25 + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:zealous_vassal } + } + set_relation_rival = { + target = scope:zealous_vassal + reason = rival_refused_to_see_reason + } + } + # Spawn the next event in the cycle. + custom_tooltip = fp2_lyonese_monk.0000.tt.continues_to_teach + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.75 + ai_compassion = -0.5 + } + } + } + + # Scope:vassal is right, this has gone too far. + option = { + name = fp2_lyonese_monk.0621.c + + # Boot the monk. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = banished } + # Gain some piety. + add_piety = medium_piety_gain + # Scope:zealous_vassal is very happy! + reverse_add_opinion = { + target = scope:zealous_vassal + modifier = pleased_opinion + opinion = 50 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + arrogant = minor_stress_impact_gain + stubborn = major_stress_impact_gain + } + ai_chance = { + # If we've made it to this point, the AI should be committed to backing scope:acolyte. + base = 0 + } + } +} + +################################################## +# Just Church Business +# by Ewan Cowhig Croft +# 0631 - 0640 +################################################## + +scripted_trigger fp2_lyonese_monk_0631_valid_neighbour_trigger = { + # Same religious head. + faith.religious_head = scope:story.var:base_faith.religious_head + # Neither allied nor has a ceasefire. + NOR = { + any_ally = { this = scope:acolyte_host } + any_truce_target = { this = scope:acolyte_host } + } + # Doesn't *already* have a claim. + NOT = { + any_claim = { this = scope:acolyte_host.primary_title } + } +} + +# A neighbouring ruler has purchased claims on your land from your HoF. +fp2_lyonese_monk.0631 = { + type = letter_event + sender = scope:neighbouring_ruler + opening = fp2_lyonese_monk.0631.t + desc = fp2_lyonese_monk.0631.desc + cooldown = { years = 100 } + + trigger = { + fp2_lyonese_monk_0000_valid_for_events_trigger = yes + any_neighboring_and_across_water_realm_same_rank_owner = { fp2_lyonese_monk_0631_valid_neighbour_trigger = yes } + } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + # Boost the tallied events score by +1. + scope:story = { + change_variable = { + name = lm_phase_tally + add = 1 + } + } + # First, we'll need to make sure our HoF is up to date. + fp2_lyonese_monk_grab_and_update_pope_effect = yes + # Now let's pick a solid neighbour. + ## First gathering candidates. + every_neighboring_and_across_water_realm_same_rank_owner = { + limit = { fp2_lyonese_monk_0631_valid_neighbour_trigger = yes } + add_to_list = claims_donated_neighbouring_ruler_list + } + ## Then processing them. + ordered_in_list = { + list = claims_donated_neighbouring_ruler_list + # Scope:pope, naturally, has a type. + limit = { has_trait = zealous } + alternative_limit = { always = yes } + order_by = { value = max_military_strength } + save_scope_as = neighbouring_ruler + } + # Now we fork over a claim on scope:acolyte_host's primary title. + scope:neighbouring_ruler = { add_pressed_claim = scope:acolyte_host.primary_title } + } + + # Outrageous! + option = { + name = fp2_lyonese_monk.0631.a + + # Well, that's a sure sign of an escalation. + ## Stress gain handled in stress_impact block. + + # Spawn the next event in the cycle. + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle + months = { 6 12 } + } + + stress_impact = { + base = medium_stress_gain + greedy = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + # Single option event, AI chance irrelevant. + base = 100 + } + } +} + +################################################## +# No More than a Man +# by Ewan Cowhig Croft +# 0641 - 0650 +################################################## + +# Scope:acolyte suggests you embrace the heresy. +fp2_lyonese_monk.0641 = { + type = character_event + title = fp2_lyonese_monk.0641.t + desc = fp2_lyonese_monk.0641.desc + theme = faith + left_portrait = { + character = scope:acolyte_host + animation = stress + } + right_portrait = { + character = scope:acolyte + animation = scheme + } + lower_center_portrait = scope:pope + override_background = { reference = study } + + trigger = { fp2_lyonese_monk_0000_valid_for_events_trigger = yes } + + on_trigger_fail = { + trigger_event = { + on_action = fp2_lyonese_monk_events_cycle_no_valid_events_fallback + months = { 4 8 } + } + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + # Scope:acolyte's *real* traits & faith are revealed. + ## These include the two "hidden" traits of scope:acolyte's buffs - heresiarch & education_intrigue_4. + scope:acolyte = { + set_character_faith = faith:adoptionist + hidden_effect = { + # Swap educations & adjust stats to match. + remove_trait = education_learning_4 + add_learning_skill = 8 + add_trait = education_intrigue_4 + add_intrigue_skill = -8 + # Reduce down the stats that'll increased by heresiarch. + add_martial_skill = -2 + add_learning_skill = -2 + add_prowess_skill = -2 + } + add_heresiarch_trait_effect = yes + # Make this clear too. + hidden_effect = { force_character_skill_recalculation = yes } + # _Small_ diplo-immunity. + add_character_flag = { + flag = flag_hostile_actions_disabled_delay + days = 10 + } + } + # Nab a scope:pope, so that they can welcome you back. + fp2_lyonese_monk_grab_and_update_pope_effect = yes + } + + # Yes... yes, why not, if they're so set on accusing us? + option = { + name = fp2_lyonese_monk.0641.a + + # Conversion time! + ## You switch faith. + add_character_flag = { + flag = delay_player_faith_conversion_notification_event + days = 1 + } + set_character_faith_with_conversion = faith:adoptionist + add_heresiarch_trait_effect = yes + ## The hidden character's list gets used. + every_in_list = { + list = hidden_converts + limit = { fp2_suitable_base_convert_trigger = yes } + custom = fp2_lyonese_monk.0641.a.tt.hidden_convert.character + set_character_faith_with_conversion = faith:adoptionist + } + ## Every county in your realm bordering scope:acolyte's stronghold converts. + ### We don't just give you everything scope:acolyte holds plus _their_ neighbours so that you can't game-convert half of Europe with some clever pimpling. + scope:acolyte_fief = { + if = { + limit = { holder = scope:acolyte } + set_county_faith = faith:adoptionist + # Plus nab the neighbours. + every_neighboring_county = { + limit = { + faith = scope:story.var:base_faith + holder = { + any_liege_or_above = { this = scope:acolyte_host } + } + } + set_county_faith = faith:adoptionist + } + } + } + # We unblock adoptionism being converted to from this point onwards. + ## No need to notify the player; it's not strictly relevant for them for gameplay purposes. + faith:adoptionist = { remove_variable = block_conversion_till_nebulous_circumstances } + # And a large gathering of nerds is held. + custom_tooltip = fp2_lyonese_monk.0641.a.tt + # Trigger the conclave. + trigger_event = { + id = fp2_lyonese_monk.0801 + months = 1 + } + + stress_impact = { + trusting = miniscule_stress_impact_loss + cynical = miniscule_stress_impact_loss + paranoid = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + # If we've made it to this point, the AI should be committed to backing scope:acolyte. + base = 100 + } + } + + # Snake! You've been planning this all along! + option = { + name = fp2_lyonese_monk.0641.b + + # Scope:acolyte is dispatched. + fp2_lyonese_monk_cancel_chain_effect = { REMOVAL = scuffle } + # Scope:pope is happy. + reverse_add_opinion = { + target = scope:pope + modifier = relieved_opinion + opinion = 50 + } + ## If you're still excommunicated (which: let's face it), then SheHe'll recommunicate you. + if = { + limit = { has_trait = excommunicated } + lift_character_excommunication_effect = { + TARGET_CHARACTER = scope:acolyte_host + REQUESTING_CHARACTER = scope:pope + } + } + + stress_impact = { + paranoid = miniscule_stress_impact_loss + zealous = miniscule_stress_impact_loss + cynical = medium_stress_impact_gain + trusting = major_stress_impact_gain + } + ai_chance = { + # If we've made it to this point, the AI should be committed to backing scope:acolyte. + base = 0 + } + } +} + + + + + + + + + + + +################################################## +# COUNCIL + +################################################## +# The Second Council of scope:bishopric +# by Ewan Cowhig Croft +# 0801 - 0810 +################################################## + +# Clergy from all over your realm gather, wanting to contribute their thoughts and notes. +fp2_lyonese_monk.0801 = { + type = character_event + title = { + first_valid = { + # Is this our second council here? + triggered_desc = { + trigger = { scope:council_1_venue = scope:council_2_venue } + desc = fp2_lyonese_monk.0801.t.second + } + # Or our first? + desc = fp2_lyonese_monk.0801.t.first + } + } + desc = { + desc = fp2_lyonese_monk.0801.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:acolyte_stance = flag:school_elipandic } + desc = fp2_lyonese_monk.0801.desc.elipandic + } + triggered_desc = { + trigger = { scope:acolyte_stance = flag:school_felicitous } + desc = fp2_lyonese_monk.0801.desc.felicitous + } + triggered_desc = { + trigger = { scope:acolyte_stance = flag:school_radical } + desc = fp2_lyonese_monk.0801.desc.radical + } + } + } + theme = learning + left_portrait = { + character = scope:acolyte_host + animation = personality_rational + } + right_portrait = { + character = scope:acolyte_at_council + animation = chancellor + } + override_background = { reference = temple_scope } + + immediate = { + # Refund the piety levels you lost earlier. + add_piety_level = 2 + # Give you a fun trait because... I mean, well. + add_heresiarch_trait_effect = yes + # Sort our locale. + ## First, whether this is a repeater. + scope:council_1_venue = { + ## Preferring to chill at scope:acolyte's place. + if = { + limit = { holder = scope:acolyte } + save_scope_as = council_2_venue + } + ## But otherwise we take your capital. + else = { + scope:acolyte_host.capital_barony = { save_scope_as = council_2_venue } + } + } + ## Then the background scope. + scope:council_2_venue = { save_scope_as = background_temple_scope } + # Work out what scope:acolyte's stance is. + scope:story = { + # They're an Elipandic. + if = { + limit = { + var:school_elipandic > var:school_felicitous + var:school_elipandic > var:school_radical + } + save_scope_value_as = { + name = acolyte_stance + value = flag:school_elipandic + } + } + # They're Felicitous. + else_if = { + limit = { + var:school_felicitous > var:school_elipandic + var:school_felicitous > var:school_radical + } + save_scope_value_as = { + name = acolyte_stance + value = flag:school_felicitous + } + } + # They're a Radical. + else_if = { + limit = { + var:school_radical > var:school_elipandic + var:school_radical > var:school_felicitous + } + save_scope_value_as = { + name = acolyte_stance + value = flag:school_radical + } + } + # If we've somehow ended up with a draw, we have a Felicitous base, so we go with that for the tie-breaker. + else = { + save_scope_value_as = { + name = acolyte_stance + value = flag:school_felicitous + } + } + } + # Aaaaand is scope:acolyte around for the pictures. + scope:acolyte = { + if = { + limit = { is_physically_able = yes } + save_scope_as = acolyte_at_council + } + } + } + + # Naturally, I'll take a leading role in the discussions. + option = { + name = fp2_lyonese_monk.0801.a + + # You'll engage in learning debates. + custom_tooltip = fp2_lyonese_monk.0801.a.tt + save_scope_value_as = { + name = conclave_engagement + value = flag:debate + } + # Progress the conclave. + custom_tooltip = fp2_lyonese_monk.0801.tt.invalidation_warning + trigger_event = { + id = fp2_lyonese_monk.0811 + months = 2 + } + + stress_impact = { + gregarious = miniscule_stress_impact_loss + shy = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # My influence will be more felt than seen... + option = { + name = fp2_lyonese_monk.0801.b + + # You'll spend piety. + custom_tooltip = fp2_lyonese_monk.0801.b.tt + save_scope_value_as = { + name = conclave_engagement + value = flag:piety + } + # Progress the conclave. + custom_tooltip = fp2_lyonese_monk.0801.tt.invalidation_warning + trigger_event = { + id = fp2_lyonese_monk.0811 + months = 2 + } + + stress_impact = { + shy = miniscule_stress_impact_loss + gregarious = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # This is a matter for the clergy alone. + option = { + name = fp2_lyonese_monk.0801.c + + # You leave the clergy to their discussions. + custom_tooltip = fp2_lyonese_monk.0801.c.tt + # Gain a decent chunk of piety for letting this go ahead. + add_piety = major_piety_gain + # Progress the chain. + save_scope_value_as = { + name = defaulted_on_conclave + value = yes + } + trigger_event = { + id = fp2_lyonese_monk.0841 + months = 2 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = major_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 100 + } + } +} + +################################################## +# Council: Father & Son +# by Ewan Cowhig Croft +# 0811 - 0820 +################################################## + +# Become Righteous. +scripted_effect fp2_lyonese_monk_0811_elipandic_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_elipandics + faith:adoptionist = { + hidden_effect = { remove_doctrine = doctrine_pluralism_fundamentalist } + add_doctrine = doctrine_pluralism_righteous + } +} + +# Become Pluralist. +scripted_effect fp2_lyonese_monk_0811_felicitous_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_felicians + faith:adoptionist = { + hidden_effect = { remove_doctrine = doctrine_pluralism_fundamentalist } + add_doctrine = doctrine_pluralism_pluralistic + } +} + +# Stay Fundamentalist. +scripted_effect fp2_lyonese_monk_0811_radical_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_radicals + show_as_tooltip = { + faith:adoptionist = { + add_doctrine = doctrine_pluralism_fundamentalist + } + } +} + +# Clergy argue over whether you're all really adoptionists or just nuanced Catholics. +fp2_lyonese_monk.0811 = { + type = character_event + title = fp2_lyonese_monk.0811.t + desc = fp2_lyonese_monk.0811.desc + theme = diplomacy + left_portrait = { + character = scope:acolyte_host + animation = personality_bold + } + right_portrait = { + character = scope:acolyte_at_council + animation = personality_bold + } + override_background = { reference = temple_scope } + + trigger = { is_imprisoned = no } + + on_trigger_fail = { + # Progress the chain. + save_scope_value_as = { + name = defaulted_on_conclave + value = yes + } + trigger_event = { + id = fp2_lyonese_monk.0841 + months = 2 + } + } + + immediate = { + # Check to see if scope:acolyte around for the pictures. + ## Clear the old scope if applicable. + if = { + limit = { exists = scope:acolyte_at_council } + clear_saved_scope = acolyte_at_council + } + ## Now try to refresh it. + scope:acolyte = { + if = { + limit = { is_physically_able = yes } + save_scope_as = acolyte_at_council + } + } + } + + # Elipandic: the situation is nuanced... + option = { + name = fp2_lyonese_monk.0811.a + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0811_elipandic_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0811.a.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0811.a.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0811_elipandic_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0811.a.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0811.a.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0811_felicitous_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0811_radical_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + stubborn = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # Felician: it is no mark of shame to be chosen by HighGodName. + option = { + name = fp2_lyonese_monk.0811.b + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0811_felicitous_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0811.b.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0811.b.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0811_felicitous_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0811.b.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0811.b.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0811_elipandic_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0811_radical_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + deceitful = miniscule_stress_impact_loss + stubborn = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # Radical: once a man, never fully God. + option = { + name = fp2_lyonese_monk.0811.c + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0811_radical_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0811.c.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0811.c.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0811_radical_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0811.c.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0811.c.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0811_elipandic_school_effect = yes + } + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0811_felicitous_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + arrogant = miniscule_stress_impact_loss + stubborn = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # I have no opinion on this matter. + option = { + name = fp2_lyonese_monk.0811.d + + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0811_elipandic_school_effect = yes + } + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0811_felicitous_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0811_radical_school_effect = yes + } + + # We don't charge stress for the opt-outs, not least because their results are variable. + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 100 + } + } + + after = { + # Progress the conclave. + trigger_event = { + id = fp2_lyonese_monk.0821 + months = 2 + } + } +} + +################################################## +# Council: Practicality vs. Principle +# by Ewan Cowhig Croft +# 0821 - 0830 +################################################## + +# Keep Religious Law. +scripted_effect fp2_lyonese_monk_0821_elipandic_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_elipandics + show_as_tooltip = { + faith:adoptionist = { add_doctrine = tenet_religious_legal_pronouncements } + } +} + +# Gain Sanctioned False Conversions. +scripted_effect fp2_lyonese_monk_0821_felicitous_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_felicians + faith:adoptionist = { + remove_doctrine = tenet_religious_legal_pronouncements + add_doctrine = tenet_false_conversion_sanction + } +} + +# Gain Pursuit of Power. +scripted_effect fp2_lyonese_monk_0821_radical_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_radicals + faith:adoptionist = { + remove_doctrine = tenet_religious_legal_pronouncements + add_doctrine = tenet_pursuit_of_power + } +} + +# Clergy argue over the degree to which expedience is required. +fp2_lyonese_monk.0821 = { + type = character_event + title = fp2_lyonese_monk.0821.t + desc = fp2_lyonese_monk.0821.desc + theme = intrigue + left_portrait = { + character = scope:acolyte_host + animation = personality_cynical + } + right_portrait = { + character = scope:acolyte_at_council + animation = personality_honorable + } + override_background = { reference = temple_scope } + + trigger = { is_imprisoned = no } + + on_trigger_fail = { + # Progress the chain. + save_scope_value_as = { + name = defaulted_on_conclave + value = yes + } + trigger_event = { + id = fp2_lyonese_monk.0841 + months = 2 + } + } + + immediate = { + # Check to see if scope:acolyte around for the pictures. + ## Clear the old scope if applicable. + if = { + limit = { exists = scope:acolyte_at_council } + clear_saved_scope = acolyte_at_council + } + ## Now try to refresh it. + scope:acolyte = { + if = { + limit = { is_physically_able = yes } + save_scope_as = acolyte_at_council + } + } + } + + # Elipandic: accommodation with the rest of Christendom is vital. + option = { + name = fp2_lyonese_monk.0821.a + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0821_elipandic_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0821.a.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0821.a.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0821_elipandic_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0821.a.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0821.a.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0821_felicitous_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0821_radical_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + stubborn = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # Felician: practicality is innately principled. + option = { + name = fp2_lyonese_monk.0821.b + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0821_felicitous_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0821.b.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0821.b.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0821_felicitous_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0821.b.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0821.b.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0821_elipandic_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0821_radical_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + deceitful = miniscule_stress_impact_loss + stubborn = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # Radical: hidden faith is faith without fire! + option = { + name = fp2_lyonese_monk.0821.c + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0821_radical_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0821.c.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0821.c.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0821_radical_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0821.c.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0821.c.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0821_elipandic_school_effect = yes + } + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0821_felicitous_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + arrogant = miniscule_stress_impact_loss + stubborn = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # This seems circumstantial. + option = { + name = fp2_lyonese_monk.0821.d + + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0821_elipandic_school_effect = yes + } + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0821_felicitous_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0821_radical_school_effect = yes + } + + # We don't charge stress for the opt-outs, not least because their results are variable. + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 100 + } + } + + after = { + # Progress the conclave. + trigger_event = { + id = fp2_lyonese_monk.0831 + months = 2 + } + } +} + +################################################## +# Council: One God +# by Ewan Cowhig Croft +# 0831 - 0840 +################################################## + +# Follow the Elipandic school. +scripted_effect fp2_lyonese_monk_0831_elipandic_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_elipandics + faith:adoptionist = { add_doctrine = special_doctrine_adoptionist_school_elipandic_doctrine } +} + +# Follow the Felicitous school. +scripted_effect fp2_lyonese_monk_0831_felicitous_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_felicians + faith:adoptionist = { add_doctrine = special_doctrine_adoptionist_school_felicitous_doctrine } +} + +# Follow the Radical school. +scripted_effect fp2_lyonese_monk_0831_radical_school_effect = { + custom_tooltip = fp2_lyonese_monk.0000.tt.favour_radicals + faith:adoptionist = { add_doctrine = special_doctrine_adoptionist_school_radical_doctrine } +} + +# Clergy argue over *how* monotheistic to be. +fp2_lyonese_monk.0831 = { + type = character_event + title = fp2_lyonese_monk.0831.t + desc = fp2_lyonese_monk.0831.desc + theme = martial + left_portrait = { + character = scope:acolyte_host + animation = personality_honorable + } + right_portrait = { + character = scope:acolyte_at_council + animation = chaplain + } + override_background = { reference = temple_scope } + + trigger = { is_imprisoned = no } + + on_trigger_fail = { + # Progress the chain. + save_scope_value_as = { + name = defaulted_on_conclave + value = yes + } + trigger_event = { + id = fp2_lyonese_monk.0841 + months = 2 + } + } + + immediate = { + # Check to see if scope:acolyte around for the pictures. + ## Clear the old scope if applicable. + if = { + limit = { exists = scope:acolyte_at_council } + clear_saved_scope = acolyte_at_council + } + ## Now try to refresh it. + scope:acolyte = { + if = { + limit = { is_physically_able = yes } + save_scope_as = acolyte_at_council + } + } + } + + # Elipandic: the Father, the Son, and the Holy Ghost are still one being. + option = { + name = fp2_lyonese_monk.0831.a + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0831_elipandic_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0831.a.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0831.a.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0831_elipandic_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0831.a.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0831.a.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0831_felicitous_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0831_radical_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + stubborn = miniscule_stress_impact_loss + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # Felician: a separation between Father and Son does not diminish either. + option = { + name = fp2_lyonese_monk.0831.b + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0831_felicitous_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0831.b.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0831.b.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0831_felicitous_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0831.b.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0831.b.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0831_elipandic_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0831_radical_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + deceitful = miniscule_stress_impact_loss + stubborn = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # Radical: the primacy of the Father is immutable. + option = { + name = fp2_lyonese_monk.0831.c + trigger = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety >= fp2_lyonese_monk_conclave_cost_value + } + } + show_as_unavailable = { + # Piety path costing. + trigger_if = { + limit = { scope:conclave_engagement = flag:piety } + piety < fp2_lyonese_monk_conclave_cost_value + } + } + + # Piety path. + if = { + limit = { scope:conclave_engagement = flag:piety } + # Pay the piety tax. + add_piety = { + value = fp2_lyonese_monk_conclave_cost_value + multiply = -1 + } + # Get your results. + fp2_lyonese_monk_0831_radical_school_effect = yes + } + # Debate path. + if = { + limit = { scope:conclave_engagement = flag:debate } + duel = { + skill = learning + value = high_skill_rating + # You sway the priests. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_lyonese_monk.0831.c.tt.success + send_interface_toast = { + title = fp2_lyonese_monk.0831.c.tt.success + left_icon = scope:council_1_venue + fp2_lyonese_monk_0831_radical_school_effect = yes + } + } + # The clergy ignore you. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_lyonese_monk.0831.c.tt.failure + send_interface_toast = { + title = fp2_lyonese_monk.0831.c.tt.failure + left_icon = scope:council_1_venue + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0831_elipandic_school_effect = yes + } + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0831_felicitous_school_effect = yes + } + } + } + } + } + + # Stress impacts here based on the virtues lionised by each school. + stress_impact = { + arrogant = miniscule_stress_impact_loss + stubborn = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + } + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 0 + } + } + + # Have we shattered on dogma already? + option = { + name = fp2_lyonese_monk.0831.d + + # We take scope:acolyte's preference. + ## Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + fp2_lyonese_monk_0831_elipandic_school_effect = yes + } + ## Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + fp2_lyonese_monk_0831_felicitous_school_effect = yes + } + ## Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + fp2_lyonese_monk_0831_radical_school_effect = yes + } + + # We don't charge stress for the opt-outs, not least because their results are variable. + ai_chance = { + # The AI should just let the scope:acolyte pick. + base = 100 + } + } + + after = { + # Progress the conclave. + trigger_event = { + id = fp2_lyonese_monk.0841 + months = 2 + } + } +} + +################################################## +# From the Ashes +# by Ewan Cowhig Croft +# 0841 - 0850 +################################################## + +# The church council arrives at their final important doctrinal conclusions. +fp2_lyonese_monk.0841 = { + type = character_event + title = fp2_lyonese_monk.0841.t + desc = { + desc = fp2_lyonese_monk.0841.desc.intro + # Pluralism. + first_valid = { + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = doctrine_pluralism_pluralistic } + } + desc = fp2_lyonese_monk.0841.desc.pluralist + } + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = doctrine_pluralism_righteous } + } + desc = fp2_lyonese_monk.0841.desc.righteous + } + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = doctrine_pluralism_fundamentalist } + } + desc = fp2_lyonese_monk.0841.desc.fundamentalist + } + } + # Tenets. + first_valid = { + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = tenet_false_conversion_sanction } + } + desc = fp2_lyonese_monk.0841.desc.sanctioned_false_conversions + } + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = tenet_religious_legal_pronouncements } + } + desc = fp2_lyonese_monk.0841.desc.religious_law + } + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = tenet_pursuit_of_power } + } + desc = fp2_lyonese_monk.0841.desc.pursuit_of_power + } + } + # School. + first_valid = { + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = special_doctrine_adoptionist_school_felicitous_doctrine } + } + desc = fp2_lyonese_monk.0841.desc.felicitous + } + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = special_doctrine_adoptionist_school_elipandic_doctrine } + } + desc = fp2_lyonese_monk.0841.desc.elipandic + } + triggered_desc = { + trigger = { + faith:adoptionist = { has_doctrine = special_doctrine_adoptionist_school_radical_doctrine } + } + desc = fp2_lyonese_monk.0841.desc.radical + } + } + # Outro. + desc = fp2_lyonese_monk.0841.desc.outro + } + theme = faith + left_portrait = { + character = scope:acolyte_host + animation = personality_bold + } + right_portrait = { + character = scope:acolyte_at_council + animation = chancellor + } + override_background = { reference = temple_scope } + + immediate = { + # Music! + ## Elipandics won out. + if = { + limit = { + faith = { has_doctrine = special_doctrine_adoptionist_school_elipandic_doctrine } + } + play_music_cue = "mx_cue_sacredrite" + } + ## Felicians won out. + if = { + limit = { + faith = { has_doctrine = special_doctrine_adoptionist_school_felicitous_doctrine } + } + play_music_cue = "mx_cue_murder" + } + ## Radicals won out. + if = { + limit = { + faith = { has_doctrine = special_doctrine_adoptionist_school_radical_doctrine } + } + play_music_cue = "mx_cue_war_declared" + } + # Now let's display our choices. + faith:adoptionist = { + # If we defaulted, then we need to work these out. + if = { + limit = { exists = scope:defaulted_on_conclave } + # Elipandics. + if = { + limit = { scope:acolyte_stance = flag:school_elipandic } + # The one we've already got. + show_as_tooltip = { add_doctrine = tenet_religious_legal_pronouncements } + # And the two we can genuinely add. + add_doctrine = doctrine_pluralism_righteous + add_doctrine = special_doctrine_adoptionist_school_elipandic_doctrine + } + # Felicians. + if = { + limit = { scope:acolyte_stance = flag:school_felicitous } + # Remove some inappropriate ones. + hidden_effect = { remove_doctrine = doctrine_pluralism_fundamentalist } + remove_doctrine = tenet_religious_legal_pronouncements + # Add our new ones. + add_doctrine = doctrine_pluralism_pluralistic + add_doctrine = tenet_false_conversion_sanction + add_doctrine = special_doctrine_adoptionist_school_felicitous_doctrine + } + # Radicals. + if = { + limit = { scope:acolyte_stance = flag:school_radical } + # Remove the inappropriate ones. + remove_doctrine = tenet_religious_legal_pronouncements + # Add our new ones. + show_as_tooltip = { add_doctrine = doctrine_pluralism_fundamentalist } + # Add our new ones. + add_doctrine = tenet_pursuit_of_power + add_doctrine = special_doctrine_adoptionist_school_radical_doctrine + } + } + # Otherwise, we can use a tooltip. + else = { + show_as_tooltip = { + # Pluralism. + ## Elipandics - + if = { + limit = { has_doctrine = doctrine_pluralism_fundamentalist } + add_doctrine = doctrine_pluralism_fundamentalist + } + ## Felicians - + if = { + limit = { has_doctrine = doctrine_pluralism_pluralistic } + add_doctrine = doctrine_pluralism_pluralistic + } + ## Radicals - + if = { + limit = { has_doctrine = doctrine_pluralism_righteous } + add_doctrine = doctrine_pluralism_righteous + } + # Tenets. + ## Elipandics - + if = { + limit = { has_doctrine = tenet_religious_legal_pronouncements } + add_doctrine = tenet_religious_legal_pronouncements + } + ## Felicians - + if = { + limit = { has_doctrine = tenet_false_conversion_sanction } + add_doctrine = tenet_false_conversion_sanction + } + ## Radicals - + if = { + limit = { has_doctrine = tenet_pursuit_of_power } + add_doctrine = tenet_pursuit_of_power + } + # School. + ## Elipandics - + if = { + limit = { has_doctrine = special_doctrine_adoptionist_school_elipandic_doctrine } + add_doctrine = special_doctrine_adoptionist_school_elipandic_doctrine + } + ## Felicians - + if = { + limit = { has_doctrine = special_doctrine_adoptionist_school_felicitous_doctrine } + add_doctrine = special_doctrine_adoptionist_school_felicitous_doctrine + } + ## Radicals - + if = { + limit = { has_doctrine = special_doctrine_adoptionist_school_radical_doctrine } + add_doctrine = special_doctrine_adoptionist_school_radical_doctrine + } + } + } + } + # And try to create a HoF. + ## Assuming you've not shenaniganed, this should generally grab scope:acolyte. + if = { + limit = { scope:acolyte_host.highest_held_title_tier >= tier_kingdom } + set_up_dynamic_spiritual_hof_title_effect = { CREATOR = scope:acolyte_host } + } + } + + # Elipandic: let them call us heretics. We simply have nuance they lack. + option = { + name = fp2_lyonese_monk.0841.a + trigger = { + faith:adoptionist = { has_doctrine = special_doctrine_adoptionist_school_elipandic_doctrine } + } + + # You choose piety. + add_piety = major_piety_gain + + # No stress impact for choosing a flavour option. + ai_chance = { + # Any option is as good as any other here. + base = 100 + } + } + + # Felician: our words are sensible, our actions likewise. + option = { + name = fp2_lyonese_monk.0841.b + trigger = { + faith:adoptionist = { has_doctrine = special_doctrine_adoptionist_school_felicitous_doctrine } + } + + # You choose piety. + add_piety = major_piety_gain + + # No stress impact for choosing a flavour option. + ai_chance = { + # Any option is as good as any other here. + base = 100 + } + } + + # Radical: see these false Christians and their polytheism laid bare! + option = { + name = fp2_lyonese_monk.0841.c + trigger = { + faith:adoptionist = { has_doctrine = special_doctrine_adoptionist_school_radical_doctrine } + } + + # You choose piety. + add_piety = major_piety_gain + + # No stress impact for choosing a flavour option. + ai_chance = { + # Any option is as good as any other here. + base = 100 + } + } + + # I only hope we've made the right choice. + option = { + name = fp2_lyonese_monk.0841.d + + # You choose prestige. + add_prestige = medium_prestige_gain + + # No stress impact for choosing a flavour option. + ai_chance = { + # Any option is as good as any other here. + base = 100 + } + } + + after = { + # Clean up the story. + scope:story = { end_story = yes } + } +} diff --git a/N3OW/events/dlc/fp2/fp2_other_decision_events.txt b/N3OW/events/dlc/fp2/fp2_other_decision_events.txt new file mode 100644 index 00000000..616e994f --- /dev/null +++ b/N3OW/events/dlc/fp2/fp2_other_decision_events.txt @@ -0,0 +1,2572 @@ +namespace = fp2_other_decisions + +################################################## +# #Dynasty Decision Events +# 0001 - manage invite following the Celebration Decision +# 0002 - Feedback on the festival +################################################## + + + + + +################################################## +# Celebration - Inviting guests +# by Maxence Voleau +# 0001 Invite guest in the background +################################################## + +#Inviting guest from Celebration +fp2_other_decisions.0001 = { + hidden = yes + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + # Standard check + exists = var:number_prestigious_new_guests + } + + immediate = { + save_scope_as = host #Must be permanent for courtier_guest_management.1001 + + # create list of available faith / culture + every_sub_realm_county = { + faith = { + if = { + limit = { + NOT = { + any_in_list = { + list = potential_faiths + } + } + } + add_to_list = potential_faiths + } + } + culture = { + if = { + limit = { + NOT = { + any_in_list = { + list = potential_cultures + } + } + } + add_to_list = potential_cultures + } + } + } + + # If the festival is grandiose, add faith / culture from neighbouring realms + if = { + limit = { + exists = var:holding_quality + var:holding_quality > 1 + } + every_neighboring_and_across_water_realm_same_rank_owner = { + every_sub_realm_county = { + faith = { + if = { + limit = { + NOT = { + any_in_list = { + list = potential_faiths + } + } + } + add_to_list = potential_faiths + } + } + culture = { + if = { + limit = { + NOT = { + any_in_list = { + list = potential_cultures + } + } + } + add_to_list = potential_cultures + } + } + } + } + } + + + # If the festival is at max level, add faith and culture from the whole diplomatic range + if = { + limit = { + exists = var:holding_quality + var:holding_quality > 2 + } + every_ruler = { + limit = { + in_diplomatic_range = scope:host + } + every_sub_realm_county = { + faith = { + if = { + limit = { + NOT = { + any_in_list = { + list = potential_faiths + } + } + } + add_to_list = potential_faiths + } + } + culture = { + if = { + limit = { + NOT = { + any_in_list = { + list = potential_cultures + } + } + } + add_to_list = potential_cultures + } + } + } + } + } + + # Pick a faith and a culture from the list to forward it to the template + random_in_list = { + list = potential_faiths + save_scope_as = guest_faith + } + + random_in_list = { + list = potential_cultures + save_scope_as = guest_culture + } + + + #Randomly select a type of character and generate it + random_list = { + # Skilled Martial / Commander + 100 = { + # lower the value for each commander already generated + modifier = { + exists = var:nb_commander_generated + add = { + value = var:nb_commander_generated + multiply = -20 + } + } + + if = { + limit = { exists = var:nb_commander_generated } + change_variable = { + name = nb_commander_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_commander_generated + value = 1 + } + } + + # Generate the actual character + create_character = { + template = celebration_martial_character + location = root.capital_province + save_scope_as = new_guest + } + } + + # Skilled Diplomat + 100 = { + + # lower the value for each diplomat already generated + modifier = { + exists = var:nb_diplomat_generated + add = { + value = var:nb_diplomat_generated + multiply = -20 + } + } + + if = { + limit = { exists = var:nb_diplomat_generated } + change_variable = { + name = nb_diplomat_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_diplomat_generated + value = 1 + } + } + + # Generate the actual character + create_character = { + template = celebration_diplomat_character + location = root.capital_province + save_scope_as = new_guest + } + } + + # Skilled Spy + 100 = { + + # lower the value for each spy already generated + modifier = { + exists = var:nb_spy_generated + add = { + value = var:nb_spy_generated + multiply = -20 + } + } + + if = { + limit = { exists = var:nb_spy_generated } + change_variable = { + name = nb_spy_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_spy_generated + value = 1 + } + } + + # Generate the actual character + create_character = { + template = celebration_spy_character + location = root.capital_province + save_scope_as = new_guest + } + } + + # Skilled Steward + 100 = { + + # lower the value for each spy already generated + modifier = { + exists = var:nb_steward_generated + add = { + value = var:nb_steward_generated + multiply = -20 + } + } + + if = { + limit = { exists = var:nb_steward_generated } + change_variable = { + name = nb_steward_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_steward_generated + value = 1 + } + } + + # Generate the actual character + create_character = { + template = celebration_steward_character + location = root.capital_province + save_scope_as = new_guest + } + } + + # Skilled Hunter + 100 = { + # lower the value for each hunter already generated + modifier = { + exists = var:nb_hunter_generated + add = { + value = var:nb_hunter_generated + multiply = -20 + } + } + + if = { + limit = { exists = var:nb_hunter_generated } + change_variable = { + name = nb_hunter_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_hunter_generated + value = 1 + } + } + + # Generate the actual character + create_character = { + template = celebration_hunter_character + location = root.capital_province + save_scope_as = new_guest + } + } + + # Skilled Priest + 100 = { + trigger = { + # can replace the court chaplain + faith = { + OR = { + has_doctrine = doctrine_clerical_succession_temporal_fixed_appointment + has_doctrine = doctrine_clerical_succession_spiritual_fixed_appointment + } + } + } + + # lower the value for each priest already generated + modifier = { + exists = var:nb_priest_generated + add = { + value = var:nb_priest_generated + multiply = -20 + } + } + + if = { + limit = { exists = var:nb_priest_generated } + change_variable = { + name = nb_priest_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_priest_generated + value = 1 + } + } + + # Generate the actual character + create_character = { + template = celebration_martial_character + location = root.capital_province + save_scope_as = new_guest + } + } + + # Skilled Scholar + 100 = { + # lower the value for each scholar already generated + modifier = { + exists = var:nb_scholar_generated + add = { + value = var:nb_scholar_generated + multiply = -20 + } + } + + if = { + limit = { exists = var:nb_scholar_generated } + change_variable = { + name = nb_scholar_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_scholar_generated + value = 1 + } + } + + create_character = { + template = celebration_scholar_character + location = root.capital_province + save_scope_as = new_guest + } + } + + # Skilled Artisan - default wait is lower has they are going to be inspired + 50 = { + trigger = { + # Only for RoCo owners + has_ep1_dlc_trigger = yes + # has_royal_court = yes # Should check royal court? + } + + # lower the value for each artisan already generated + modifier = { + exists = var:nb_artisan_generated + add = { + value = var:nb_artisan_generated + multiply = -20 + } + } + + if = { + limit = { exists = var:nb_artisan_generated } + change_variable = { + name = nb_artisan_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_artisan_generated + value = 1 + } + } + + # Generate the actual character + create_character = { + template = celebration_artisan_character + location = root.capital_province + save_scope_as = new_guest + } + } + + + # Chess Master + 100 = { + trigger = { + # As the Strategy game tradition + } + + # lower the value for each priest already generated + modifier = { + exists = var:nb_chessmaster_generated + add = { + value = var:nb_chessmaster_generated + multiply = -5 + } + } + + if = { + limit = { exists = var:nb_chessmaster_generated } + change_variable = { + name = nb_chessmaster_generated + add = 1 + } + } + else = { + set_variable = { + name = nb_chessmaster_generated + value = 1 + } + } + + # Generate the actual character + create_character = { + template = celebration_chessmaster_character + location = root.capital_province + save_scope_as = new_guest + } + } + } + + + #Does claimant exist? Send it my way and count down the variable + if = { + limit = { exists = scope:new_guest } + + add_visiting_courtier = scope:new_guest + + scope:new_guest = { + save_scope_as = guest #For courtier_guest_management.1001 + trigger_event = courtier_guest_management.1001 #For message + } + change_variable = { + name = number_prestigious_new_guests + subtract = 1 + } + } + + #Either end the chain or resend this event + if = { + limit = { var:number_prestigious_new_guests = 0 } + remove_variable = number_prestigious_new_guests + remove_variable = holding_quality + + if = { limit = { exists = var:nb_commander_generated } remove_variable = nb_commander_generated } + if = { limit = { exists = var:nb_diplomat_generated } remove_variable = nb_diplomat_generated } + if = { limit = { exists = var:nb_spy_generated } remove_variable = nb_spy_generated } + if = { limit = { exists = var:nb_steward_generated } remove_variable = nb_steward_generated } + if = { limit = { exists = var:nb_hunter_generated } remove_variable = nb_hunter_generated } + if = { limit = { exists = var:nb_priest_generated } remove_variable = nb_priest_generated } + if = { limit = { exists = var:nb_scholar_generated } remove_variable = nb_scholar_generated } + if = { limit = { exists = var:nb_artisan_generated } remove_variable = nb_artisan_generated } + if = { limit = { exists = var:nb_chessmaster_generated } remove_variable = nb_chessmaster_generated } + } + else = { + trigger_event = { + id = fp2_other_decisions.0001 + days = { 10 20 } + } + } + } +} + +################################################## +# Council of Toledo - Organization +# by Joe Parkin and Ola Jentzsch +# 0700 Decide who to invite +################################################## + +scripted_effect fetch_council_toledo_priest_effect = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = council_priest } + } + else = { + random_vassal_or_below = { + limit = { + NOR = { + government_has_flag = government_is_republic + government_has_flag = government_is_feudal + } + OR = { + has_trait = devoted + has_education_learning_trigger = yes + } + } + save_scope_as = council_priest + } + } +} + +scripted_effect fp2_struggle_council_toledo_attendee_effect = { + hidden_effect = { + if = { + limit = { government_has_flag = government_is_theocracy } + random = { + chance = 25 + fp2_council_toledo_attendee_modifier = yes + add_to_list = $LIST$ + } + } + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { fp2_struggle_council_toledo_attendee_trigger = yes } + } + cp:councillor_court_chaplain = { + random = { + chance = 25 + fp2_council_toledo_attendee_modifier = yes + add_to_list = $LIST$ + } + } + } + } +} + +scripted_effect fp2_council_toledo_guest_populate_effect = { + while = { + limit = { + any_in_list = { + list = $LIST$ + NOT = { is_in_list = council_toledo_guest_list } + } + any_in_list = { + list = $LIST$ + count < 10 + is_in_list = council_toledo_guest_list + } + } + random_in_list = { + list = $LIST$ + limit = { + NOT = { is_in_list = council_toledo_guest_list } + } + weight = { + modifier = { factor = learning } + modifier = { + factor = 10 + is_landed = yes + } + modifier = { + factor = 10 + has_trait = theologian + } + } + add_to_list = council_toledo_guest_list + } + } +} + +fp2_other_decisions.0700 = { + type = character_event + title = fp2_other_decisions.0700.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = global_var:council_of_toledo_counter + global_var:council_of_toledo_counter = 19 + } + desc = fp2_other_decisions.0700.19 + } + desc = fp2_other_decisions.0700.desc + } + } + theme = faith + override_background = { reference = temple_church } + left_portrait = { + character = scope:council_priest + animation = chaplain + } + lower_right_portrait = { + trigger = { + exists = faith.religious_head + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + religious_head != root + } + } + character = faith.religious_head + } + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + # Decision triggers + fp2_struggle_council_toledo_decision_trigger = yes + + } + + immediate = { + save_scope_as = council_toledo_host + fetch_council_toledo_priest_effect = yes + scope:council_priest = { add_to_list = council_toledo_guest_list } + hidden_effect = { + religion = { + every_faith = { + limit = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + every_faith_ruler = { + limit = { + primary_title.tier >= tier_county + exists = capital_county + capital_county.title_province = { geographical_region = world_europe_west_iberia } + } + fp2_struggle_council_toledo_attendee_effect = { LIST = council_toledo_mozarab_list } + } + } + every_faith = { + limit = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + every_faith_ruler = { + limit = { + in_diplomatic_range = root + primary_title.tier >= tier_county + faith = { + OR = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:catholic } + } + } + } + fp2_struggle_council_toledo_attendee_effect = { LIST = council_toledo_regional_list } + } + } + } + } + custom_tooltip = fp2_other_decisions.0700.tt + } + + # Default option: Local council + option = { + name = fp2_other_decisions.0700.a + # Attendees + show_as_tooltip = { + title:c_toledo = { + add_county_modifier = { + modifier = fp2_small_council_modifier + years = 5 + } + } + } + religion = { + every_faith = { + limit = { + this != root.faith + religious_head ?= { in_diplomatic_range = root } + } + religious_head = { add_to_list = hof_list } + } + } + every_in_list = { + list = hof_list + custom = excluded_from_council_toledo_tt + add_opinion = { + target = root + modifier = fp2_excluded_from_council_toledo_opinion + opinion = -10 + } + } + ai_chance = { + base = 100 + } + } + + # Default option: Regional council + option = { + name = fp2_other_decisions.0700.b + add_character_flag = { + flag = regional_toledo_council + months = 2 + } + remove_treasury_or_gold = medium_treasury_or_gold_value + hidden_effect = { + while = { + count = 10 + random_in_list = { + list = council_toledo_regional_list + limit = { + NOT = { is_in_list = council_toledo_guest_list } + } + weight = { + modifier = { factor = learning } + modifier = { + factor = 10 + is_landed = yes + } + modifier = { + factor = 10 + has_trait = theologian + } + } + add_to_list = council_toledo_guest_list + } + } + } + show_as_tooltip = { + title:c_toledo = { + random_list = { + 1 = { + desc = fp2_other_decisions.0700.b.success + show_chance = no + add_county_modifier = { + modifier = fp2_big_council_modifier + years = 5 + } + } + 1 = { + desc = fp2_other_decisions.0700.b.failure + show_chance = no + add_county_modifier = { + modifier = fp2_disappointing_council_modifier + years = 5 + } + } + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + after = { + # Attendees + # Populate guest list + hidden_effect = { + while = { + count = 10 + random_in_list = { + list = council_toledo_mozarab_list + limit = { + NOT = { is_in_list = council_toledo_guest_list } + } + weight = { + modifier = { factor = learning } + modifier = { + factor = 10 + is_landed = yes + } + modifier = { + factor = 10 + has_trait = theologian + } + } + add_to_list = council_toledo_guest_list + } + } + if = { + limit = { + any_in_list = { list = council_toledo_mozarab_list } + } + every_in_list = { + list = council_toledo_mozarab_list + remove_from_list = council_toledo_mozarab_list + } + } + if = { + limit = { + any_in_list = { list = council_toledo_regional_list } + } + every_in_list = { + list = council_toledo_regional_list + remove_from_list = council_toledo_regional_list + } + } + } + trigger_event = { + on_action = fp2_struggle_council_toledo_attend + days = { 14 21 } + } + } +} + +################################################## +# Council of Toledo - Arrival +# by Joe Parkin and Ola Jentzsch +# 0701 See who turned up +################################################## + +scripted_trigger fp2_council_toledo_successful_regional_trigger = { + has_character_flag = regional_toledo_council + any_in_list = { + list = council_toledo_guest_list + count > council_toledo_success_guest_value + faith = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } +} + +scripted_trigger fp2_council_toledo_failure_regional_trigger = { + has_character_flag = regional_toledo_council + any_in_list = { + list = council_toledo_guest_list + count <= council_toledo_success_guest_value + faith = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } +} + +scripted_trigger fp2_council_toledo_flavor_bishop_trigger = { + exists = scope:portrait_bishop + exists = scope:$TYPE$_bishop + scope:portrait_bishop = scope:$TYPE$_bishop +} + +fp2_other_decisions.0701 = { + type = character_event + title = fp2_other_decisions.0701.t + desc = { + first_valid = { + triggered_desc = { + trigger = { fp2_council_toledo_successful_regional_trigger = yes } + desc = fp2_other_decisions.0701.opening.success + } + triggered_desc = { + trigger = { fp2_council_toledo_failure_regional_trigger = yes } + desc = fp2_other_decisions.0701.opening.failure + } + triggered_desc = { + trigger = { has_character_flag = regional_toledo_council } + desc = fp2_other_decisions.0701.opening.catastrophe + } + desc = fp2_other_decisions.0701.opening + } + # Attendee flavor + random_valid = { + triggered_desc = { + trigger = { + exists = scope:portrait_bishop + scope:portrait_bishop = root.faith.religious_head + } + desc = fp2_other_decisions.0701.religious_head_bishop + } + triggered_desc = { + trigger = { + fp2_council_toledo_flavor_bishop_trigger = { TYPE = powerful } + } + desc = fp2_other_decisions.0701.powerful_bishop + } + triggered_desc = { + trigger = { + fp2_council_toledo_flavor_bishop_trigger = { TYPE = saint } + } + desc = fp2_other_decisions.0701.saint_bishop + } + triggered_desc = { + trigger = { + fp2_council_toledo_flavor_bishop_trigger = { TYPE = theologian } + } + desc = fp2_other_decisions.0701.theologian_bishop + } + triggered_desc = { + trigger = { + fp2_council_toledo_flavor_bishop_trigger = { TYPE = bad } + } + desc = fp2_other_decisions.0701.bad_bishop + } + triggered_desc = { + trigger = { + fp2_council_toledo_flavor_bishop_trigger = { TYPE = senior } + } + desc = fp2_other_decisions.0701.senior_bishop + } + } + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = regional_toledo_council + any_in_list = { + list = council_toledo_guest_list + count < council_toledo_success_guest_value + faith = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } + } + desc = fp2_other_decisions.0701.failure + } + desc = fp2_other_decisions.0701.desc + } + } + theme = faith + override_background = { reference = temple_church } + left_portrait = scope:portrait_bishop + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + # Decision triggers + fp2_struggle_council_toledo_decision_trigger = yes + } + + immediate = { + # Attendee flavor + if = { + limit = { + any_in_list = { + list = council_toledo_guest_list + this = root.faith.religious_head + } + } + random_in_list = { + list = council_toledo_guest_list + limit = { this = root.faith.religious_head } + save_scope_as = religious_head_bishop + } + } + if = { + limit = { + any_in_list = { + list = council_toledo_guest_list + primary_title.tier > tier_county + } + } + ordered_in_list = { + list = council_toledo_guest_list + limit = { primary_title.tier > tier_county } + order_by = primary_title.tier + save_scope_as = powerful_bishop + } + } + if = { + limit = { + any_in_list = { + list = council_toledo_guest_list + has_trait = saint + } + } + ordered_in_list = { + list = council_toledo_guest_list + limit = { has_trait = saint } + order_by = piety_level + save_scope_as = saint_bishop + } + } + if = { + limit = { + any_in_list = { + list = council_toledo_guest_list + has_trait = theologian + } + } + ordered_in_list = { + list = council_toledo_guest_list + limit = { has_trait = theologian } + order_by = learning + save_scope_as = theologian_bishop + } + } + if = { + limit = { + any_in_list = { + list = council_toledo_guest_list + num_sinful_traits > 0 + } + } + ordered_in_list = { + list = council_toledo_guest_list + limit = { num_sinful_traits > 1 } + order_by = num_sinful_traits + save_scope_as = bad_bishop + } + } + if = { + limit = { + OR = { + exists = scope:powerful_bishop + exists = scope:saint_bishop + exists = scope:theologian_bishop + exists = scope:bad_bishop + } + } + hidden_effect = { + random_list = { + 10 = { + trigger = { exists = scope:religious_head_bishop } + scope:religious_head_bishop = { save_scope_as = portrait_bishop } + } + 1 = { + trigger = { exists = scope:powerful_bishop } + modifier = { + add = 4 + scope:powerful_bishop.primary_title.tier >= tier_kingdom + } + scope:powerful_bishop = { save_scope_as = portrait_bishop } + } + 5 = { + trigger = { exists = scope:saint_bishop } + scope:saint_bishop = { save_scope_as = portrait_bishop } + } + 5 = { + trigger = { exists = scope:theologian_bishop } + scope:theologian_bishop = { save_scope_as = portrait_bishop } + } + 1 = { + trigger = { exists = scope:bad_bishop } + scope:bad_bishop = { save_scope_as = portrait_bishop } + } + } + } + } + else = { + ordered_in_list = { + list = council_toledo_guest_list + order_by = age + save_scope_as = senior_bishop + save_scope_as = portrait_bishop + } + } + } + + # Default option: Local council + option = { + name = { + trigger = { fp2_council_toledo_successful_regional_trigger = yes } + text = fp2_other_decisions.0701.a + } + name = { + trigger = { fp2_council_toledo_failure_regional_trigger = yes } + text = fp2_other_decisions.0701.b + } + name = { + trigger = { + NOT = { has_character_flag = regional_toledo_council } + } + text = fp2_other_decisions.0701.c + } + if = { + limit = { fp2_council_toledo_successful_regional_trigger = yes } + title:c_toledo = { + add_county_modifier = { + modifier = fp2_big_council_modifier + years = 5 + } + } + } + else_if = { + limit = { has_character_flag = regional_toledo_council } + title:c_toledo = { + add_county_modifier = { + modifier = fp2_disappointing_council_modifier + years = 5 + } + } + } + else = { + title:c_toledo = { + add_county_modifier = { + modifier = fp2_small_council_modifier + years = 5 + } + } + } + } + + after = { + custom_tooltip = fp2_other_decisions.0701.tt + trigger_event = { + on_action = fp2_struggle_council_toledo_debate + days = { 3 6 } + } + } +} + +################################################## +# Council of Toledo - Debate +# by Joe Parkin and Ola Jentzsch +# 0702 Bicker with them +################################################## + +scripted_effect fp2_council_toledo_debate_bishop_effect = { + save_scope_value_as = { + name = mozarabic + value = flag:$MOZARABIC$ + } + random_in_list = { + list = council_toledo_guest_list + limit = { + this != scope:council_priest + faith = { + trigger_if = { + limit = { scope:mozarabic = flag:yes } + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + trigger_else = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } + } + weight = { + modifier = { + factor = 4 + has_trait = theologian + } + } + save_scope_as = debate_bishop + } + if = { + limit = { + NOT = { + exists = scope:debate_bishop + } + } + create_character = { + age = { 35 75 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + trait = zealous + faith = faith:mozarabic_church + culture = root.culture + learning = { + min_template_high_skill + max_template_high_skill + } + + save_scope_as = debate_bishop + + after_creation = { + add_character_flag = { + flag = need_priest_outfit + } + add_character_flag = { + flag = need_a_ruler + } + } + } + } + random_in_list = { + list = council_toledo_guest_list + limit = { + trigger_if = { + limit = { + exists = scope:debate_bishop + } + this != scope:debate_bishop + trigger_if = { + limit = { + scope:debate_bishop.faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + NOT = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } + trigger_else = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } + } + alternative_limit = { + NOR = { + this = scope:council_priest + trigger_if = { + limit = { + exists = scope:debate_bishop + } + this = scope:debate_bishop + } + } + } + weight = { + modifier = { + factor = 4 + has_trait = theologian + } + } + save_scope_as = counter_bishop + } +} + +scripted_effect fp2_council_opinion_mozarabic_effect = { + hidden_effect = { + every_in_list = { + list = council_toledo_guest_list + limit = { + NOR = { + this = scope:debate_bishop + this = scope:counter_bishop + } + liege = root + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + add_opinion = { + target = root + modifier = fp2_council_toledo_opinion + opinion = $VALUE$ + } + } + every_in_list = { + list = council_toledo_guest_list + limit = { + NOR = { + this = scope:debate_bishop + this = scope:counter_bishop + liege = root + } + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + custom = fp2_council_opinion_mozarabic_effect_tt + add_opinion = { + target = root + modifier = fp2_council_toledo_opinion + opinion = $VALUE$ + } + } + } +} + +scripted_effect fp2_council_opinion_other_effect = { + if = { + limit = { + any_in_list = { + list = council_toledo_guest_list + faith = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } + } + hidden_effect = { + every_in_list = { + list = council_toledo_guest_list + limit = { + NOR = { + this = scope:debate_bishop + this = scope:counter_bishop + } + liege = root + faith = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } + add_opinion = { + target = root + modifier = fp2_council_toledo_opinion + opinion = $VALUE$ + } + } + every_in_list = { + list = council_toledo_guest_list + limit = { + NOR = { + this = scope:debate_bishop + this = scope:counter_bishop + liege = root + } + faith = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } + custom = fp2_council_opinion_other_effect_tt + add_opinion = { + target = root + modifier = fp2_council_toledo_opinion + opinion = $VALUE$ + } + } + } + } +} + +scripted_effect fp2_council_modifier_effect = { + scope:council_toledo_faith = { + every_faith_ruler = { + limit = { primary_title.tier >= tier_county } + custom = council_of_toledo_ruler_effect_tt + add_character_modifier = { + modifier = $MODIFIER$ + years = council_toledo_modifier_duration_value + } + if = { + limit = { + is_ai = no + this != root + } + trigger_event = fp2_other_decisions.0704 + } + } + } +} + +scripted_effect fp2_council_strife_catalyst_effect = { + struggle:iberian_struggle = { + if = { + limit = { is_struggle_phase = struggle_iberia_phase_compromise } + change_struggle_phase = struggle_iberia_phase_opportunity + } + else_if = { + limit = { + is_struggle_phase = struggle_iberia_phase_opportunity + + } + change_struggle_phase = struggle_iberia_phase_hostility + } + } +} + +scripted_effect fp2_council_peace_catalyst_effect = { + struggle:iberian_struggle = { + if = { + limit = { is_struggle_phase = struggle_iberia_phase_compromise } + change_struggle_phase = struggle_iberia_phase_conciliation + } + else_if = { + limit = { + is_struggle_phase = struggle_iberia_phase_hostility + + } + change_struggle_phase = struggle_iberia_phase_compromise + } + } +} + +fp2_other_decisions.0702 = { + type = character_event + title = fp2_other_decisions.0702.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = global_var:council_of_toledo_counter + global_var:council_of_toledo_counter = 19 + } + desc = fp2_other_decisions.0702.19 + } + desc = fp2_other_decisions.0702.opening + } + first_valid = { # Conversion + triggered_desc = { + trigger = { var:council_toledo_issue = 1 } + desc = fp2_other_decisions.0702.conversion + } + triggered_desc = { # Reform + trigger = { var:council_toledo_issue = 2 } + desc = fp2_other_decisions.0702.reform + } + triggered_desc = { # Tolerance + trigger = { var:council_toledo_issue = 3 } + desc = fp2_other_decisions.0702.tolerance + } + triggered_desc = { # Clergy Rights + trigger = { var:council_toledo_issue = 4 } + desc = fp2_other_decisions.0702.rights + } + triggered_desc = { # New HoF + trigger = { var:council_toledo_issue = 5 } + desc = fp2_other_decisions.0702.hof + } + triggered_desc = { # Closer to Pope + trigger = { var:council_toledo_issue = 6 } + desc = fp2_other_decisions.0702.pope + } + triggered_desc = { # Target Heresy + trigger = { var:council_toledo_issue = 7 } + desc = fp2_other_decisions.0702.heresy + } + } + first_valid = { + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_theocracy_lay_clergy } + } + desc = fp2_other_decisions.0702.present + } + desc = fp2_other_decisions.0702.second_hand + } + } + theme = faith + override_background = { reference = temple_church } + left_portrait = scope:debate_bishop + right_portrait = scope:counter_bishop + lower_right_portrait = scope:rival_scope + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + # Decision triggers + fp2_struggle_council_toledo_decision_trigger = yes + } + + immediate = { + fetch_council_toledo_priest_effect = yes + faith = { save_scope_as = council_toledo_faith } + hidden_effect = { + random_list = { + 10 = { # Conversion + trigger = { + NOT = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + root = { + any_realm_county = { + religion != root.religion + } + } + } + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = yes } + set_variable = { + name = council_toledo_issue + value = 1 + } + } + 5 = { # Reform + trigger = { + NOT = { exists = faith.var:foundational_faith } # set on reform + } + modifier = { + factor = 2 + has_perk = prophet_perk + } + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = yes } + set_variable = { + name = council_toledo_issue + value = 2 + } + } + 10 = { # Tolerance + trigger = { + NOT = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + } + } + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = yes } + every_culture_global = { + limit = { + this != root.culture + NOT = { has_same_culture_heritage = root.culture } + save_temporary_scope_as = this_culture + trigger_if = { + limit = { + struggle:iberian_struggle = { is_culture_involved_in_struggle = scope:this_culture } + } + struggle:iberian_struggle = { is_culture_involved_in_struggle = scope:this_culture } + } + trigger_else = { + any_culture_duchy = { + title_province ?= { geographical_region = world_europe_west_iberia } + } + } + culture_number_of_counties > 0 + } + add_to_list = fp2_council_culture_list + } + set_variable = { + name = council_toledo_issue + value = 3 + } + } + 5 = { # Clergy Opinion + modifier = { + factor = 2 + any_vassal = { + count >= 2 + government_has_flag = government_is_theocracy + } + } + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = yes } + set_variable = { + name = council_toledo_issue + value = 4 + } + } + 5 = { # New HoF + trigger = { + any_in_list = { + list = council_toledo_guest_list + percent >= 0.5 + is_in_list = council_toledo_mozarab_list + } + faith != faith.religious_head.faith + } + modifier = { + factor = 2 + faith.religious_head.faith.num_county_followers < root.faith.num_county_followers + } + modifier = { + factor = 2 + has_trait = excommunicated + } + modifier = { + factor = 2 + reverse_opinion = { + target = faith.religious_head + value < -25 + } + } + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = yes } + set_variable = { + name = council_toledo_issue + value = 5 + } + } + 5 = { # Closer to Pope + trigger = { + faith = { has_doctrine = special_doctrine_ecumenical_christian } + NOT = { has_trait = excommunicated } + faith != faith.religious_head.faith + } + modifier = { + factor = 2 + reverse_opinion = { + target = title:k_papal_state.holder + value > 25 + } + } + modifier = { + factor = 2 + faith.religious_head.faith.num_county_followers > root.faith.num_county_followers + } + random_list = { + 1 = { + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = yes } + } + 50 = { + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = no } + } + } + # if the priest is in no court + if = { + limit = { + exists = scope:debate_bishop + scope:debate_bishop = { + has_character_flag = need_a_ruler + } + } + root = { add_courtier = scope:debate_bishop } + } + set_variable = { + name = council_toledo_issue + value = 6 + } + } + 10 = { # Target Heresy + trigger = { + any_county_in_region = { + region = world_europe_west_iberia + faith = { + religion = root.faith.religion + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + NOT = { exists = religious_head } + } + } + } + random_county_in_region = { + region = world_europe_west_iberia + limit = { + faith = { + religion = root.faith.religion + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + NOT = { exists = religious_head } + } + } + faith = { save_scope_as = heretic_faith } + } + random_list = { + 1 = { + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = yes } + } + 1 = { + fp2_council_toledo_debate_bishop_effect = { MOZARABIC = no } + } + } + set_variable = { + name = council_toledo_issue + value = 7 + } + } + } + } + if = { + limit = { + any_relation = { + type = rival + faith = root.faith + } + } + save_scope_as = rival_scope + } + custom_tooltip = fp2_council_end_tt + } + + option = { # Accept + name = fp2_other_decisions.0702.a + add_piety = medium_piety_value + scope:debate_bishop = { + add_opinion = { + target = root + modifier = fp2_council_toledo_opinion + opinion = { + value = 10 + multiply = 2 + } + } + } + scope:counter_bishop = { + add_opinion = { + target = root + modifier = fp2_council_toledo_opinion + opinion = { + value = -10 + multiply = 2 + } + } + } + switch = { + trigger = var:council_toledo_issue + 1 = { # Conversion + fp2_council_modifier_effect = { MODIFIER = fp2_council_conversion_modifier } + custom_tooltip = fp2_council_conversion_modifier_tt + fp2_council_opinion_mozarabic_effect = { VALUE = 10 } + fp2_council_opinion_other_effect = { VALUE = 5 } + fp2_council_strife_catalyst_effect = yes + stress_impact = { + cynical = minor_stress_impact_gain + } + } + 2 = { # Reform + fp2_council_modifier_effect = { MODIFIER = fp2_council_reform_modifier } + fp2_council_opinion_mozarabic_effect = { VALUE = 10 } + fp2_council_opinion_other_effect = { VALUE = -10 } + stress_impact = { + zealous = minor_stress_impact_gain + } + } + 3 = { # Tolerance + fp2_council_modifier_effect = { MODIFIER = fp2_council_tolerance_modifier } + fp2_council_opinion_mozarabic_effect = { VALUE = 10 } + fp2_council_opinion_other_effect = { VALUE = 10 } + hidden_effect = { + every_in_list = { + list = fp2_council_culture_list + root.culture = { + change_cultural_acceptance = { + target = prev + value = council_toledo_culture_acceptance_value + desc = fp2_council_toledo_culture_acceptance_desc + } + } + } + } + custom_tooltip = fp2_council_culture_tt + fp2_council_peace_catalyst_effect = yes + stress_impact = { + arrogant = minor_stress_impact_gain + } + } + 4 = { # Clergy Rights + fp2_council_modifier_effect = { MODIFIER = fp2_council_rights_modifier } + fp2_council_opinion_mozarabic_effect = { VALUE = 10 } + fp2_council_opinion_other_effect = { VALUE = 5 } + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + } + 5 = { # New HoF + reverse_add_opinion = { + target = faith.religious_head + modifier = fp2_council_toledo_new_hof_opinion + } + fp2_council_modifier_effect = { MODIFIER = fp2_council_hof_modifier } + fp2_council_opinion_mozarabic_effect = { VALUE = 10 } + fp2_council_opinion_other_effect = { VALUE = -10 } + stress_impact = { + humble = minor_stress_impact_gain + } + } + 6 = { # Closer to Pope + reverse_add_opinion = { + target = faith.religious_head + modifier = fp2_council_toledo_pope_opinion + } + fp2_council_modifier_effect = { MODIFIER = fp2_council_pope_modifier } + fp2_council_opinion_mozarabic_effect = { VALUE = -10 } + fp2_council_opinion_other_effect = { VALUE = 10 } + stress_impact = { + arrogant = minor_stress_impact_gain + } + } + 7 = { # Target Heresy + custom_tooltip = fp2_council_heresies_modifier_tt + fp2_council_modifier_effect = { MODIFIER = fp2_council_heresy_modifier } + fp2_council_opinion_mozarabic_effect = { VALUE = 10 } + fp2_council_opinion_other_effect = { VALUE = 10 } + stress_impact = { + cynical = minor_stress_impact_gain + } + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + var:council_toledo_issue = 1 + var:council_toledo_issue = 4 + var:council_toledo_issue = 7 + } + has_trait = cynical + } + modifier = { + factor = 0.5 + var:council_toledo_issue = 2 + has_trait = zealous + } + modifier = { + factor = 0.5 + OR = { + var:council_toledo_issue = 3 + var:council_toledo_issue = 6 + } + has_trait = arrogant + } + modifier = { + factor = 0.5 + var:council_toledo_issue = 4 + has_trait = greedy + } + modifier = { + factor = 0.5 + var:council_toledo_issue = 5 + has_trait = humble + } + } + } + + option = { # Veto + name = { + trigger = { faith.religious_head = root } + text = fp2_other_decisions.0702.b.hof + } + name = { + trigger = { + faith.religious_head != root + } + text = fp2_other_decisions.0702.b + } + add_piety = minor_piety_loss + add_character_modifier = { + modifier = fp2_stifled_council_modifier + years = 5 + } + scope:debate_bishop = { + add_opinion = { + target = root + modifier = fp2_council_toledo_opinion + opinion = { + value = -10 + multiply = 2 + } + } + } + scope:counter_bishop = { + add_opinion = { + target = root + modifier = fp2_council_toledo_opinion + opinion = { + value = 10 + multiply = 2 + } + } + } + switch = { + trigger = var:council_toledo_issue + 1 = { # Conversion + fp2_council_opinion_mozarabic_effect = { VALUE = -10 } + fp2_council_opinion_other_effect = { VALUE = -5 } + fp2_council_peace_catalyst_effect = yes + stress_impact = { + zealous = minor_stress_impact_gain + } + } + 2 = { # Reform + fp2_council_opinion_mozarabic_effect = { VALUE = -10 } + fp2_council_opinion_other_effect = { VALUE = 10 } + stress_impact = { + cynical = minor_stress_impact_gain + } + } + 3 = { # Tolerance + fp2_council_opinion_mozarabic_effect = { VALUE = -10 } + fp2_council_opinion_other_effect = { VALUE = -10 } + fp2_council_strife_catalyst_effect = yes + stress_impact = { + humble = minor_stress_impact_gain + } + } + 4 = { # Clergy Rights + fp2_council_opinion_mozarabic_effect = { VALUE = -10 } + fp2_council_opinion_other_effect = { VALUE = -5 } + stress_impact = { + zealous = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + } + 5 = { # New HoF + fp2_council_opinion_mozarabic_effect = { VALUE = -10 } + fp2_council_opinion_other_effect = { VALUE = 10 } + stress_impact = { + arrogant = minor_stress_impact_gain + } + } + 6 = { # Closer to Pope + fp2_council_opinion_mozarabic_effect = { VALUE = 10 } + fp2_council_opinion_other_effect = { VALUE = -10 } + stress_impact = { + humble = minor_stress_impact_gain + } + } + 7 = { # Target Heresy + fp2_council_opinion_mozarabic_effect = { VALUE = -10 } + fp2_council_opinion_other_effect = { VALUE = -10 } + stress_impact = { + zealous = minor_stress_impact_gain + } + } + } + stress_impact = { + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + var:council_toledo_issue = 1 + var:council_toledo_issue = 4 + var:council_toledo_issue = 7 + } + has_trait = zealous + } + modifier = { + factor = 0.5 + var:council_toledo_issue = 2 + has_trait = cynical + } + modifier = { + factor = 0.5 + OR = { + var:council_toledo_issue = 3 + var:council_toledo_issue = 6 + } + has_trait = humble + } + modifier = { + factor = 0.5 + var:council_toledo_issue = 4 + has_trait = generous + } + modifier = { + factor = 0.5 + var:council_toledo_issue = 5 + has_trait = arrogant + } + } + } + + after = { remove_variable = council_toledo_issue } +} + +# Cancellation due to loss of control or war +fp2_other_decisions.0703 = { + type = character_event + title = fp2_other_decisions.0703.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_at_war = yes } + desc = fp2_other_decisions.0703.war + } + desc = fp2_other_decisions.0703.control + } + desc = fp2_other_decisions.0703.desc + } + theme = learning_theology_focus + override_background = { reference = temple_church } + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:council_priest + animation = chaplain + } + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + # Decision triggers + fp2_struggle_council_toledo_decision_trigger = no + } + + immediate = { + fetch_council_toledo_priest_effect = yes + change_global_variable = { + name = council_of_toledo_counter + add = -1 + } + if = { + limit = { is_at_war = yes } + ordered_character_war = { + order_by = { + value = 0 + subtract = war_days + } + save_scope_as = council_war + } + } + title:c_toledo = { + if = { + limit = { has_county_modifier = fp2_small_council_modifier } + remove_county_modifier = fp2_small_council_modifier + } + else_if = { + limit = { has_county_modifier = fp2_big_council_modifier } + remove_county_modifier = fp2_big_council_modifier + } + else_if = { + limit = { has_county_modifier = fp2_disappointing_council_modifier } + remove_county_modifier = fp2_disappointing_council_modifier + } + } + add_gold = council_of_toledo_gold_cost_value + add_piety = council_of_toledo_piety_cost_value + } + + option = { + name = fp2_other_decisions.0703.a + remove_decision_cooldown = council_of_toledo_decision + } +} + +fp2_other_decisions.0704 = { + type = character_event + title = fp2_other_decisions.0704.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = global_var:council_of_toledo_counter + global_var:council_of_toledo_counter = 19 + } + desc = fp2_other_decisions.0702.19 + } + desc = fp2_other_decisions.0702.opening + } + first_valid = { + triggered_desc = { # Conversion + trigger = { has_character_modifier = fp2_council_conversion_modifier } + desc = fp2_other_decisions.0702.conversion + } + triggered_desc = { # Reform + trigger = { has_character_modifier = fp2_council_tolerance_modifier } + desc = fp2_other_decisions.0702.reform + } + triggered_desc = { # Tolerance + trigger = { has_character_modifier = fp2_council_reform_modifier } + desc = fp2_other_decisions.0702.tolerance + } + triggered_desc = { # Clergy Rights + trigger = { has_character_modifier = fp2_council_rights_modifier } + desc = fp2_other_decisions.0702.rights + } + triggered_desc = { # Ecumenical dialogue + trigger = { has_character_modifier = fp2_council_pope_modifier } + desc = fp2_other_decisions.0702.pope + } + triggered_desc = { # New HoF + trigger = { has_character_modifier = fp2_council_hof_modifier } + desc = fp2_other_decisions.0702.hof + } + triggered_desc = { # Target Heresy + trigger = { has_character_modifier = fp2_council_heresy_modifier } + desc = fp2_other_decisions.0702.heresy + } + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_character_modifier = fp2_council_conversion_modifier + has_character_modifier = fp2_council_tolerance_modifier + has_character_modifier = fp2_council_reform_modifier + has_character_modifier = fp2_council_rights_modifier + has_character_modifier = fp2_council_hof_modifier + has_character_modifier = fp2_council_pope_modifier + has_character_modifier = fp2_council_heresy_modifier + } + } + desc = fp2_other_decisions.0704.success + } + desc = fp2_other_decisions.0704.failure + } + } + theme = learning_theology_focus + override_background = { reference = temple_church } + left_portrait = { + character = scope:council_toledo_host + triggered_animation = { + trigger = { + NOT = { has_character_modifier = fp2_stifled_council_modifier } + } + animation = personality_zealous + } + triggered_animation = { + trigger = { has_character_modifier = fp2_stifled_council_modifier } + animation = anger + } + } + right_portrait = { + character = scope:council_priest + animation = chaplain + } + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + } + + option = { + name = fp2_other_decisions.0704.a + show_as_tooltip = { + if = { + limit = { + OR = { + has_character_modifier = fp2_council_conversion_modifier + has_character_modifier = fp2_council_tolerance_modifier + has_character_modifier = fp2_council_reform_modifier + has_character_modifier = fp2_council_rights_modifier + has_character_modifier = fp2_council_hof_modifier + has_character_modifier = fp2_council_pope_modifier + has_character_modifier = fp2_council_heresy_modifier + } + } + switch = { + trigger = has_character_modifier + fp2_council_conversion_modifier = { + custom_tooltip = fp2_council_conversion_modifier_tt + add_character_modifier = { + modifier = fp2_council_conversion_modifier + years = council_toledo_modifier_duration_value + } + } + fp2_council_tolerance_modifier = { + add_character_modifier = { + modifier = fp2_council_tolerance_modifier + years = council_toledo_modifier_duration_value + } + } + fp2_council_reform_modifier = { + add_character_modifier = { + modifier = fp2_council_reform_modifier + years = council_toledo_modifier_duration_value + } + } + fp2_council_rights_modifier = { + add_character_modifier = { + modifier = fp2_council_rights_modifier + years = council_toledo_modifier_duration_value + } + } + fp2_council_pope_modifier = { + add_character_modifier = { + modifier = fp2_council_pope_modifier + years = council_toledo_modifier_duration_value + } + } + fp2_council_hof_modifier = { + add_character_modifier = { + modifier = fp2_council_hof_modifier + years = council_toledo_modifier_duration_value + } + } + fp2_council_pope_modifier = { + add_character_modifier = { + modifier = fp2_council_pope_modifier + years = council_toledo_modifier_duration_value + } + } + fp2_council_heresy_modifier = { + custom_tooltip = fp2_council_heresies_modifier_tt + add_character_modifier = { + modifier = fp2_council_heresy_modifier + years = council_toledo_modifier_duration_value + } + } + } + } + else = { + scope:council_toledo_host = { + add_character_modifier = { + modifier = fp2_stifled_council_modifier + years = council_toledo_modifier_duration_value + } + } + } + } + } +} +################################################## +# Secure Iberian Foothold - Notification +# by Joe Parkin and Ola Jentzsch +# 1000 Decision taker event +################################################## + +fp2_other_decisions.1000 = { + type = character_event + title = fp2_other_decisions.1000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + religion = { + any_faith = { + struggle:iberian_struggle = { is_faith_involved_in_struggle = prev } + } + } + } + desc = fp2_other_decisions.1000.involved_religion + } + desc = fp2_other_decisions.1000.desc + } + first_valid = { + triggered_desc = { + trigger = { + struggle:iberian_struggle = { is_faith_involved_in_struggle = root.faith } + } + desc = fp2_other_decisions.1000.involved_faith + } + triggered_desc = { + trigger = { + religion = { + any_faith = { + struggle:iberian_struggle = { is_faith_involved_in_struggle = prev } + } + } + } + desc = fp2_other_decisions.1000.uninvolved_faith + } + desc = fp2_other_decisions.1000.closing + } + } + theme = realm + left_portrait = { + character = root + animation = war_over_win + } + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + } + + immediate = { + save_scope_as = iberian_footholder + every_held_title = { + limit = { + # Any de jure kingdom of Iberia is completely controlled + fp2_struggle_secure_iberian_foothold_iberian_kingdom_trigger = yes + # That kingdom is mostly my faith + fp2_struggle_secure_iberian_foothold_faith_trigger = yes + scope:iberian_kingdom_temp = { title_held_years >= fp2_struggle_secure_iberian_foothold_years_value } + } + add_to_list = iberian_footholder_list + } + hidden_effect = { + while = { + limit = { + any_in_list = { + list = iberian_footholder_list + # Borders held lands in a non-Iberian kingdom you hold + any_de_jure_county = { + any_title_to_title_neighboring_and_across_water_county = { fp2_struggle_secure_iberian_foothold_outsider_kingdom_trigger = yes } + } + NOT = { is_in_list = iberian_footholder_transfer_list } + } + } + random_in_list = { + list = iberian_footholder_list + limit = { + # Borders held lands in a non-Iberian kingdom you hold + any_de_jure_county = { + any_title_to_title_neighboring_and_across_water_county = { fp2_struggle_secure_iberian_foothold_outsider_kingdom_trigger = yes } + } + NOT = { is_in_list = iberian_footholder_transfer_list } + } + random_de_jure_county = { + limit = { + any_title_to_title_neighboring_and_across_water_county = { fp2_struggle_secure_iberian_foothold_outsider_kingdom_trigger = yes } + } + random_title_to_title_neighboring_and_across_water_county = { + limit = { fp2_struggle_secure_iberian_foothold_outsider_kingdom_trigger = yes } + empire = { save_scope_as = transfer_empire } + } + } + add_to_list = iberian_footholder_transfer_list + set_de_jure_liege_title = scope:transfer_empire + custom_tooltip = iberian_footholder_transfer_tt + } + } + } + show_as_tooltip = { + every_in_list = { + list = iberian_footholder_transfer_list + set_de_jure_liege_title = scope:transfer_empire + } + } + } + + option = { + name = fp2_other_decisions.1000.a + } + + after = { + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { is_ai = no } + trigger_event = fp2_other_decisions.1001 + } + } + # End Struggle + struggle:iberian_struggle = { + end_struggle = secure_iberian_foothold_decision_title + } + } +} + +################################################## +# Secure Iberian Foothold - Notification +# by Joe Parkin and Ola Jentzsch +# 1001 Info event +################################################## + +fp2_other_decisions.1001 = { + type = character_event + title = fp2_other_decisions.1000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:iberian_footholder.religion = { + any_faith = { + struggle:iberian_struggle = { is_faith_involved_in_struggle = prev } + } + } + } + desc = fp2_other_decisions.1001.involved_religion + } + desc = fp2_other_decisions.1001.desc + } + first_valid = { + triggered_desc = { + trigger = { + struggle:iberian_struggle = { is_faith_involved_in_struggle = scope:iberian_footholder.faith } + } + desc = fp2_other_decisions.1001.involved_faith + } + triggered_desc = { + trigger = { + scope:iberian_footholder.religion = { + any_faith = { + struggle:iberian_struggle = { is_faith_involved_in_struggle = prev } + } + } + religion = scope:iberian_footholder.religion + } + desc = fp2_other_decisions.1001.same_uninvolved_faith + } + triggered_desc = { + trigger = { + scope:iberian_footholder.religion = { + any_faith = { + struggle:iberian_struggle = { is_faith_involved_in_struggle = prev } + } + } + } + desc = fp2_other_decisions.1001.uninvolved_faith + } + desc = fp2_other_decisions.1001.closing + } + } + theme = realm + left_portrait = { + character = scope:iberian_footholder + animation = war_over_win + } + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + } + + immediate = { + show_as_tooltip = { + every_in_list = { + list = iberian_footholder_transfer_list + set_de_jure_liege_title = scope:transfer_empire + } + } + } + + option = { + name = fp2_other_decisions.1001.a + + } +} + + +################################################## +# Found Kingdom of Toledo +# by Joe Parkin +# 1100 Decision taker event +################################################## + +fp2_other_decisions.1100 = { + type = character_event + title = fp2_other_decisions.1100.t + desc = fp2_other_decisions.1100.desc + theme = realm + left_portrait = { + character = root + animation = war_over_win + } + lower_right_portrait = scope:de_jure_anger_1 + lower_center_portrait = scope:de_jure_anger_2 + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + } + + immediate = { + show_as_tooltip = { fp2_struggle_found_kingdom_toledo_empire_effect = yes } + hidden_effect = { + if = { + limit = { + any_in_list = { list = kingdom_toledo_opinion_list } + } + while = { + count = 2 + ordered_in_list = { + list = kingdom_toledo_opinion_list + limit = { + trigger_if = { + limit = { exists = scope:de_jure_anger_1 } + this != scope:de_jure_anger_1 + } + } + if = { + limit = { + NOT = { exists = scope:de_jure_anger_1 } + } + save_scope_as = de_jure_anger_1 + } + else = { save_scope_as = de_jure_anger_2 } + } + } + } + } + legend_seed_new_title_effect = yes + } + + option = { + name = fp2_other_decisions.1100.a + } + + after = { + every_player = { + limit = { + this != scope:toledo_former + is_within_diplo_range = { CHARACTER = scope:toledo_former } + } + trigger_event = fp2_other_decisions.1101 + } + } +} + +fp2_other_decisions.1101 = { + type = character_event + title = fp2_other_decisions.1100.t + desc = { + desc = fp2_other_decisions.1101.desc + first_valid = { + triggered_desc = { + trigger = { + trigger_if = { + limit = { exists = scope:de_jure_anger_1 } + this = scope:de_jure_anger_1 + } + trigger_else_if = { + limit = { exists = scope:de_jure_anger_2 } + this = scope:de_jure_anger_2 + } + trigger_else = { always = no } + } + desc = fp2_other_decisions.1101.stolen + } + triggered_desc = { + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + desc = fp2_other_decisions.1101.mozarab + } + } + } + theme = realm + override_background = { reference = throne_room_scope } + left_portrait = { + character = scope:toledo_former + animation = war_over_win + } + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + } + + immediate = { + scope:toledo_former = { save_scope_as = background_throne_room_scope } + show_as_tooltip = { + scope:toledo_former = { get_title = title:k_toledo } + title:k_toledo = { + every_in_de_jure_hierarchy = { + limit = { tier = tier_duchy } + set_de_jure_liege_title = title:k_toledo + } + } + } + } + + option = { + name = { + trigger = { + trigger_if = { + limit = { exists = scope:de_jure_anger_1 } + this = scope:de_jure_anger_1 + } + trigger_else_if = { + limit = { exists = scope:de_jure_anger_2 } + this = scope:de_jure_anger_2 + } + trigger_else = { always = no } + } + text = fp2_other_decisions.1101.a + } + name = { + trigger = { + trigger_if = { + limit = { exists = scope:de_jure_anger_1 } + this != scope:de_jure_anger_1 + } + trigger_if = { + limit = { exists = scope:de_jure_anger_2 } + this != scope:de_jure_anger_2 + } + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + text = fp2_other_decisions.1101.b + } + name = { + trigger = { + trigger_if = { + limit = { exists = scope:de_jure_anger_1 } + this != scope:de_jure_anger_1 + } + trigger_if = { + limit = { exists = scope:de_jure_anger_2 } + this != scope:de_jure_anger_2 + } + faith = { + NOT = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:mozarabic_church } + } + } + } + text = fp2_other_decisions.1101.c + } + } +} diff --git a/N3OW/events/dlc/fp2/fp2_struggle_events.txt b/N3OW/events/dlc/fp2/fp2_struggle_events.txt new file mode 100644 index 00000000..fd8140b6 --- /dev/null +++ b/N3OW/events/dlc/fp2/fp2_struggle_events.txt @@ -0,0 +1,11749 @@ +namespace = fp2_struggle + +### SYSTEM EVENTS ################################################################# +## # Parameter Events +## 0001 - 0010 VIP spontaneous relationship management. +## 0011 - 0040 Struggle VIPs spontaneously develop negative relationships with each other. +## 0041 - 0070 Struggle VIPs spontaneously develop postive relationships with each other. +## # Other Events +## 0501 - 0510 Struggle Intro Events +## 0900 - 0999 Struggle ending decision events +### EVENT LIST #################################################################### +## XXXX - XXXX YYY by ZZZ +## 1000 - 1000 Stoking the Fire by Ola Jentzsch +## 1001 - 1001 War Widows by Ola Jentzsch +## 1002 - 1002 Andalusian Advancements by Ola Jentzsch +## 1010 - 1012 Soul of Iron by Ola Jentzsch +## 1020 - 1020 Death of a Councilman by Ola Jentzsch +## 1050 - 1050 The Vision by Ola Jentzsch +## 2000 - 2000 Disorderly Market by Hugo Cortell +## 2001 - 2002 Desperate Villagers Seek New Lord by Hugo Cortell +## 2003 - 2003 Lost Migratory Birds by Hugo Cortell +## 2004 - 2005 Ship building event by Hugo Cortell +## 2006 - 2006 The Borders of Faith by Hugo Cortell +## 2007 - 2007 Castle Worthy of Iberia by Hugo Cortell +## 2008 - 2008 Misdeeds of The Chaplain by Hugo Cortell +## 2009 - 2012 Catching Thieves of Myth by Hugo Cortell +## 2013 - 2014 The Secret to Freedom by Hugo Cortell +## 2015 - 2016 Letter on The Back by Hugo Cortell +## 2021 - 2022 RETURN OF THE THIEF KING by Hugo Cortell +## 3001 - 3010 The Price of War by Veronica Pazos +## 3011 - 3020 Order of the Hatchet by Veronica Pazos +## 3021 - 3030 The Wrath of Heaven by Veronica Pazos +################################################################################### + +# Setting AI Intent +fp2_struggle.0003 = { + hidden = yes + scope = none + scope = struggle + + trigger = { # Should not need this, but, redundancy check! + exists = struggle:iberian_struggle + struggle:iberian_struggle = { any_involved_ruler = { } } # For when the conflict is ongoing but nobody is left to fight it + } + + immediate = { + # prepare needed variables; they will be destroyed at the end of the immediate + set_variable = { + name = agents_for_escalation + value = 0 + } + set_variable = { + name = agents_for_deescalation + value = 0 + } + + # Go through the characters to distribute them between the potential transitions + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { is_alive = yes } + ####################### + # Play cue track + ###################### + if = { + limit = { is_ai = no } + play_music_cue = "mx_Struggle_Opening" + } + + ####################### + # Check existing flags + ###################### + if = { + limit = { has_character_flag = agenda_towards_escalation } + root = { + change_variable = { + name = agents_for_escalation + add = 1 + } + } + } + else_if = { + limit = { has_character_flag = agenda_towards_deescalation } + root = { + change_variable = { + name = agents_for_deescalation + add = 1 + } + } + } + else = { # Set a flag + ############################# + # Current Phase: Opportunity + ############################# + if = { + limit = { root = { is_struggle_phase = struggle_iberia_phase_opportunity } } + random_list = { + # Working towards Hostility + # It should be for characters looking for direct conflicts and domination, with the will and ability to expand their realms + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = hostility + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Conciliation + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = conciliation + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Hostility + ############################# + if = { + limit = { root = { is_struggle_phase = struggle_iberia_phase_hostility } } + random_list = { + # Working towards Hostility: it means that the character wants to stay in + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = hostility + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Compromise + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Compromise + ############################# + if = { + limit = { root = { is_struggle_phase = struggle_iberia_phase_compromise } } + random_list = { + + # Working towards Opportunity + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = opportunity + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Compromise: they want to stay in the same phase + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Conciliation + ############################# + if = { + limit = { root = { is_struggle_phase = struggle_iberia_phase_conciliation } } + random_list = { + # Working towards Compromise + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Conciliation: they want to stay in the same phase + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = conciliation + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + } + } + } + + # Clean variables + remove_variable = agents_for_escalation + remove_variable = agents_for_deescalation + } +} + +# Set AI Intent on join +fp2_struggle.004 = { + hidden = yes + scope = none + + immediate = { + set_variable = { + name = agents_for_escalation + value = 0 + } + set_variable = { + name = agents_for_deescalation + value = 0 + } + + ############################ + # Update the variables + ############################ + every_character_struggle = { + every_involved_ruler = { + limit = { is_alive = yes } + if = { + limit = { has_character_flag = agenda_towards_escalation } + root = { + change_variable = { + name = agents_for_escalation + add = 1 + } + } + } + else_if = { + limit = { has_character_flag = agenda_towards_deescalation } + root = { + change_variable = { + name = agents_for_deescalation + add = 1 + } + } + } + } + } + + if = { + limit = { + NOR = { + has_character_flag = agenda_towards_escalation + has_character_flag = agenda_towards_deescalation + } + } + + ############################# + # Current Phase: Opportunity + ############################# + if = { + limit = { any_character_struggle = { is_struggle_phase = struggle_iberia_phase_opportunity } } + random_list = { + # Working towards Hostility + # It should be for characters looking for direct conflicts and domination, with the will and ability to expand their realms + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = hostility + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Conciliation + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = conciliation + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Hostility + ############################# + if = { + limit = { any_character_struggle = { is_struggle_phase = struggle_iberia_phase_hostility } } + random_list = { + # Working towards Hostility: it means that the character wants to stay in + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = hostility + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Compromise + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Compromise + ############################# + if = { + limit = { any_character_struggle = { is_struggle_phase = struggle_iberia_phase_compromise } } + random_list = { + + # Working towards Opportunity + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = opportunity + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Compromise: they want to stay in the same phase + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + + ############################# + # Current Phase: Conciliation + ############################# + if = { + limit = { any_character_struggle = { is_struggle_phase = struggle_iberia_phase_conciliation } } + random_list = { + # Working towards Compromise + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = compromise + INTENT = escalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = escalation + } + } + # Working towards Conciliation: they want to stay in the same phase + 100 = { + # Odds modifiers + fp2_struggle_set_ai_agenda_common_modifiers = { + PHASE = conciliation + INTENT = deescalation + } + + # Apply effects + fp2_struggle_apply_ai_agenda_effect = { + INTENT = deescalation + } + } + } + } + } + + # Clean variables + remove_variable = agents_for_escalation + remove_variable = agents_for_deescalation + } +} + +################################### +# Iberian Struggle Intro Events +# 0501 - 599 +################################### +fp2_struggle.0501 = { # Fullscreen Intro Event + type = character_event + window = fullscreen_event + title = fp2_struggle.0501.t + desc = { + desc = fp2_struggle.0501.desc + first_valid = { + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = involved + is_struggle_type = iberian_struggle + } + } + desc = fp2_struggle.0501.desc.involved + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = interloper + is_struggle_type = iberian_struggle + } + } + desc = fp2_struggle.0501.desc.interloper + } + } + } + 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_character_flag = fp2_struggle_intro_event_flag } + fp2_character_any_involvement_iberian_struggle_trigger = yes + } + override_background = { reference = fp2_fullscreen_intro } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + cooldown = { years = 100 } + + widgets = { + widget = { + gui = "event_window_widget_struggle_info" + container = "dynamic_content_widget" + controller = struggle_info + setup_scope = { struggle:iberian_struggle = { save_scope_as = struggle } } + } + } + immediate = { + play_music_cue = "mx_Struggle_Opening" + add_character_flag = fp2_struggle_intro_event_flag + save_scope_value_as = { + name = start + value = yes + } + } + option = { + name = fp2_struggle.0501.a + clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select" + } +} + +################################### +# Struggle Endings +# by Joe Parkin +# 0900-0912 +################################### +fp2_struggle.0900 = { # Hostility + type = character_event + window = fullscreen_event + title = fp2_struggle.0900.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:basque + any_parent_culture = { this = culture:basque } + has_cultural_pillar = language_basque + } + } + } + desc = fp2_struggle.0900.opening.basque + } + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:andalusian + any_parent_culture = { this = culture:andalusian } + has_cultural_pillar = language_arabic + } + } + } + desc = fp2_struggle.0900.opening.andalusian + } + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_iberian } + } + desc = fp2_struggle.0900.opening.iberian + } + desc = fp2_struggle.0900.opening + } + desc = fp2_struggle.0900.desc + } + theme = court + override_background = { reference = fp2_fullscreen_hostility } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + 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 + give_nickname = nick_the_conquistador + dynasty = { add_dynasty_prestige = 10000 } + } + + # Faith victory + option = { + name = fp2_struggle.0900.a + if = { + limit = { exists = house } + house = { + add_house_modifier = { + modifier = fp2_struggle_hostility_house_faith_modifier + } + } + } + # Piety reward for faith victory + add_piety = 1000 + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_holy_cb_tt + custom_tooltip = fp2_struggle_hostility_conversion_holy_tt + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + # Culture victory + option = { + name = fp2_struggle.0900.b + # Renown reward for culture victory + if = { + limit = { exists = house } + dynasty = { add_dynasty_prestige = 1000 } + house = { + add_house_modifier = { + modifier = fp2_struggle_hostility_house_culture_modifier + } + } + } + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_culture_cb_tt + custom_tooltip = fp2_struggle_hostility_conversion_culture_tt + # All Involved cultures lose acceptance of each other + custom_tooltip = { + text = fp2_struggle_hostility_culture_tt + fp2_struggle_hostility_cultural_acceptance_effect = yes + } + stress_impact = { + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + # Combined victory + option = { + name = fp2_struggle.0900.c + # Reduced renown and piety rewards for combined + if = { + limit = { exists = house } + house = { + add_house_modifier = { + modifier = fp2_struggle_hostility_house_combined_modifier + years = 200 + } + } + } + add_prestige = 3000 + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_holy_cb_tt + custom_tooltip = culture_parameter_cb_lower_piety_level_requirement + custom_tooltip = fp2_struggle_hostility_culture_cb_tt + custom_tooltip = fp2_struggle_hostility_conversion_holy_tt + custom_tooltip = fp2_struggle_hostility_conversion_culture_tt + # All Involved cultures lose acceptance of each other + custom_tooltip = { + text = fp2_struggle_hostility_culture_large_tt + fp2_struggle_hostility_cultural_acceptance_large_effect = yes + } + stress_impact = { + humble = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + ai_boldness = 1 + } + } + } + + after = { + # Notify & End Struggle + save_scope_as = fp2_loc_struggle_ender # Loc used to use root, this fixes it + every_player = { + limit = { fp2_does_this_player_care_about_the_fate_of_iberia = yes } # Needs to be checked before the struggle ends due to race condition issues + add_to_list = player_to_notify # Making a list so stuff is tiggered after the struggle ends, to make extra sure I don't break anything. + } + + struggle:iberian_struggle = { end_struggle = struggle_iberia_ending_hostility_decision } + every_in_list = { # Then we *actually* notify palyers, making sure the struggle has already ended + list = player_to_notify + trigger_event = fp2_struggle.0910 + } + } +} + +fp2_struggle.0910 = { + type = character_event + window = fullscreen_event + title = fp2_struggle.0900.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_in_list = struggle_involvees } + desc = fp2_struggle.0910.opening.involved + } + desc = fp2_struggle.0910.opening + } + desc = fp2_struggle.0910.desc + first_valid = { + triggered_desc = { + trigger = { + scope:struggle_ender.house = { has_house_modifier = fp2_struggle_hostility_house_faith_modifier } + } + desc = fp2_struggle.0910.closing.faith + } + triggered_desc = { + trigger = { + scope:struggle_ender.house = { has_house_modifier = fp2_struggle_hostility_house_culture_modifier } + } + desc = fp2_struggle.0910.closing.culture + } + desc = fp2_struggle.0910.closing.combined + } + } + theme = court + override_background = { reference = fp2_fullscreen_hostility } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_hostility" + ##### Major Effects ##### + show_as_tooltip = { + scope:struggle_ender = { + #dynasty = { add_dynasty_prestige = 10000 } + fp2_struggle_hostility_ender_effect = yes + } + } + # Hispania is available! + custom_tooltip = fp2_struggle_can_create_empire_of_hispania_tt + # Choose Holy War boost, Culture War boost, or both + scope:struggle_ender.house = { + switch = { + trigger = has_house_modifier + fp2_struggle_hostility_house_faith_modifier = { + show_as_tooltip = { add_house_modifier = fp2_struggle_hostility_house_faith_modifier } + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_holy_cb_tt + } + fp2_struggle_hostility_house_culture_modifier = { + show_as_tooltip = { add_house_modifier = fp2_struggle_hostility_house_culture_modifier } + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_culture_cb_tt + custom_tooltip = fp2_struggle_hostility_culture_tt + } + fp2_struggle_hostility_house_combined_modifier = { + show_as_tooltip = { add_house_modifier = fp2_struggle_hostility_house_combined_modifier } + custom_description_no_bullet = { text = fp2_struggle_house_tt } + custom_tooltip = fp2_struggle_hostility_holy_cb_tt + custom_tooltip = fp2_struggle_hostility_culture_cb_tt + custom_tooltip = fp2_struggle_hostility_culture_large_tt + } + } + } + } + + # Ok + option = { + name = { + text = fp2_struggle.0910.a + trigger = { is_in_list = struggle_involvees } + } + name = { + text = fp2_struggle.0910.b + trigger = { + NOT = { is_in_list = struggle_involvees } + } + } + } +} + +fp2_struggle.0901 = { # Compromise + type = character_event + window = fullscreen_event + title = fp2_struggle.0901.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:basque + any_parent_culture = { this = culture:basque } + has_cultural_pillar = language_basque + } + } + } + desc = fp2_struggle.0900.opening.basque + } + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:andalusian + any_parent_culture = { this = culture:andalusian } + has_cultural_pillar = language_arabic + } + } + } + desc = fp2_struggle.0900.opening.andalusian + } + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_iberian } + } + desc = fp2_struggle.0900.opening.iberian + } + desc = fp2_struggle.0900.opening + } + desc = fp2_struggle.0901.desc + } + theme = court + override_background = { reference = fp2_fullscreen_compromise } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_compromise" + # Independent/Split De Jure Duchies will become De Jure Kingdoms + if = { + limit = { + title:e_spain = { + any_in_de_jure_hierarchy = { fp2_struggle_ending_compromise_independent_duchy_trigger = yes } + } + } + custom_tooltip = { + text = fp2_struggle_compromise_create_new_kingdoms_tt + fp2_struggle_compromise_duchies_to_kingdoms_effect = yes + } + } + # Move duchies to right kingdoms + fp2_struggle_compromise_transfer_duchies_effect = yes + # Turn kingdoms to empires + fp2_struggle_compromise_kingdoms_to_empires_effect = yes + # distribute small kingdoms + fp2_struggle_compromise_distribute_kingdoms_to_neighbouring_empires_effect = yes + # assign the new title to existing characters + fp2_struggle_compromise_distribute_the_actual_titles = yes + + # Set up truces + fp2_struggle_compromise_truce_effect = yes + + ##### Major Effects ##### + fp2_struggle_compromise_ender_effect = yes + + # Tooltips! + fp2_struggle_compromise_tooltip_effect = yes + + ##### Minor Effects ##### + # Self-sufficiency modifiers for each independent realm + fp2_struggle_compromise_modifier_rewards_effect = yes + set_global_variable = { + name = fp2_struggle_compromise_ending + value = yes + } + # Add all involved rulers to a list, for ping event + fp2_stuggle_ending_involved_list_effect = yes + } + + # Ok + option = { + name = fp2_struggle.0901.a + if = { + limit = { + any_in_list = { + list = kingdom_empire + this = root.primary_title + } + } + custom_tooltip = fp2_struggle.0901.tt + } + } + + after = { + stress_impact = { + arrogant = medium_stress_impact_gain + } + + # Notify & End Struggle + save_scope_as = fp2_loc_struggle_ender # Loc used to use root, this fixes it + every_player = { + limit = { fp2_does_this_player_care_about_the_fate_of_iberia = yes } # Needs to be checked before the struggle ends due to race condition issues + add_to_list = player_to_notify # Making a list so stuff is tiggered after the struggle ends, to make extra sure I don't break anything. + } + + struggle:iberian_struggle = { end_struggle = struggle_iberia_ending_compromise_decision } + every_in_list = { # Then we *actually* notify palyers, making sure the struggle has already ended + list = player_to_notify + trigger_event = fp2_struggle.0911 + } + } +} + +fp2_struggle.0911 = { + type = character_event + window = fullscreen_event + title = fp2_struggle.0901.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_in_list = struggle_involvees } + desc = fp2_struggle.0910.opening.involved + } + desc = fp2_struggle.0910.opening + } + desc = fp2_struggle.0911.desc + } + theme = court + override_background = { reference = fp2_fullscreen_compromise } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_compromise" + ##### Major Effects ##### + show_as_tooltip = { + scope:struggle_ender = { fp2_struggle_compromise_ender_effect = yes } + } + # Independent/Split De Jure Duchies will become De Jure Kingdoms + custom_tooltip = fp2_struggle_compromise_create_new_kingdoms_tt + # RIP Hispania + fp2_struggle_compromise_tooltip_effect = yes + + ##### Minor Effects ##### + if = { + limit = { + any_in_list = { + list = kingdom_empire + OR = { + this = root.primary_title + this = root.primary_title.de_jure_liege + this = root.primary_title.de_jure_liege.de_jure_liege + } + } + } + custom_tooltip = fp2_struggle.0901.tt + } + if = { + limit = { is_in_list = struggle_involvees } + show_as_tooltip = { + fp2_struggle_compromise_modifier_rewards_personal_house_effect = yes + fp2_struggle_compromise_modifier_rewards_personal_county_effect = yes + } + } + } + + # Ok + option = { + name = { + text = fp2_struggle.0911.a + trigger = { is_in_list = struggle_involvees } + } + name = { + text = fp2_struggle.0910.b + trigger = { + NOT = { is_in_list = struggle_involvees } + } + } + } +} + +fp2_struggle.0902 = { # Conciliation + type = character_event + window = fullscreen_event + title = fp2_struggle.0902.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:basque + any_parent_culture = { this = culture:basque } + has_cultural_pillar = language_basque + } + } + } + desc = fp2_struggle.0900.opening.basque + } + triggered_desc = { + trigger = { + culture = { + OR = { + this = culture:andalusian + any_parent_culture = { this = culture:andalusian } + has_cultural_pillar = language_arabic + } + } + } + desc = fp2_struggle.0900.opening.andalusian + } + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_iberian } + } + desc = fp2_struggle.0900.opening.iberian + } + desc = fp2_struggle.0900.opening + } + desc = fp2_struggle.0902.desc + } + theme = court + override_background = { reference = fp2_fullscreen_conciliation } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_conciliation" + set_global_variable = { + name = fp2_struggle_conciliation_ending + value = yes + } + # Add all involved rulers to a list, for ping event + fp2_stuggle_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 + + # Change cultural acceptance + fp2_struggle_conciliation_cultural_acceptance_effect = yes + + ##### Major Effects ##### + fp2_struggle_conciliation_ender_effect = yes + fp2_struggle_conciliation_tooltip_effect = yes + fp2_struggle_conciliation_modifier_rewards_effect = yes + } + + # + option = { + name = fp2_struggle.0902.a + } + + after = { + stress_impact = { + arrogant = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + + # Notify & End Struggle + save_scope_as = fp2_loc_struggle_ender # Loc used to use root, this fixes it + every_player = { + limit = { fp2_does_this_player_care_about_the_fate_of_iberia = yes } # Needs to be checked before the struggle ends due to race condition issues + add_to_list = player_to_notify # Making a list so stuff is tiggered after the struggle ends, to make extra sure I don't break anything. + } + + struggle:iberian_struggle = { end_struggle = struggle_iberia_ending_conciliation_decision } + every_in_list = { # Then we *actually* notify palyers, making sure the struggle has already ended + list = player_to_notify + trigger_event = fp2_struggle.0912 + } + } +} + +fp2_struggle.0912 = { + type = character_event + window = fullscreen_event + title = fp2_struggle.0902.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_in_list = struggle_involvees } + desc = fp2_struggle.0910.opening.involved + } + desc = fp2_struggle.0910.opening + } + desc = fp2_struggle.0912.desc + } + theme = court + override_background = { reference = fp2_fullscreen_conciliation } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_end_animate" } + + immediate = { + play_music_cue = "mx_Struggle_ending_conciliation" + ##### Major Effects ##### + show_as_tooltip = { + scope:struggle_ender = { fp2_struggle_conciliation_ender_effect = yes } + } + fp2_struggle_conciliation_tooltip_effect = yes + + ##### Minor Effects ##### + # All involved rulers gain diff culture opinion and learn language scheme power + if = { + limit = { is_in_list = struggle_involvees } + show_as_tooltip = { fp2_struggle_conciliation_modifier_rewards_personal_effect = yes } + } + } + + # Ok + option = { + name = { + text = fp2_struggle.0912.a + trigger = { is_in_list = struggle_involvees } + } + name = { + text = fp2_struggle.0910.b + trigger = { + NOT = { is_in_list = struggle_involvees } + } + } + } +} + +################################### +# Stoking the Fire +# By Ola Jentzsch +################################### +scripted_trigger fp2_struggle_1000_tension_county_trigger = { + is_landless_type_title = no + any_county_province = { geographical_region = world_europe_west_iberia } + faith = { save_temporary_scope_as = compare_faith } + root = { + faith = { + faith_hostility_level = { target = scope:compare_faith value > faith_astray_level } + } + } +} +scripted_trigger fp2_struggle_1000_tension_councillor_trigger = { + faith = { this = root.faith } + is_available_healthy_ai_adult = yes + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = deceitful + has_trait = sadistic + has_trait = holy_warrior + has_trait = callous + } + NOR = { + has_trait = compassionate + has_trait = just + } +} + +fp2_struggle.1000 = { + type = character_event + title = fp2_struggle.1000.t + desc = fp2_struggle.1000.desc + theme = dread + + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:tension_councillor + animation = scheme + } + + + trigger = { + has_fp2_dlc_trigger = yes + fp2_character_involved_in_struggle_trigger = yes + custom_description = { + text = empty_spooky_trigger #This is entirely pointless, but code likes it, so ghost away! + any_held_county = { fp2_struggle_1000_tension_county_trigger = yes } + OR = { + any_councillor = { fp2_struggle_1000_tension_councillor_trigger = yes } + any_vassal = { fp2_struggle_1000_tension_councillor_trigger = yes } + exists = cp:councillor_marshal + } + } + OR = { + capital_province = { geographical_region = world_europe_west_iberia } + culture = { has_cultural_pillar = heritage_iberian } + } + } + + cooldown = { #this shouldn't fire too often + years = 50 + } + + immediate = { #We need a province and a suitable councillor; this fixes that. + random_held_county = { + limit = { fp2_struggle_1000_tension_county_trigger = yes } + save_scope_as = tension_county + } + if = { + limit = { + any_councillor = { + fp2_struggle_1000_tension_councillor_trigger = yes + } + } + random_councillor = { + limit = { + fp2_struggle_1000_tension_councillor_trigger = yes + } + save_scope_as = tension_councillor + } + } + else_if = { + limit = { + any_vassal = { + fp2_struggle_1000_tension_councillor_trigger = yes + } + } + random_vassal = { + limit = { + fp2_struggle_1000_tension_councillor_trigger = yes + } + save_scope_as = tension_councillor + } + } + else = { + random_councillor = { + limit = { + has_council_position = councillor_marshal + } + save_scope_as = tension_councillor + } + } + + if = { #this code checks if there is an eligible person for the 4th option + limit = { + any_vassal = { + is_available_healthy_ai_adult = yes + faith = scope:tension_county.faith + } + } + random_vassal = { + limit = { + is_available_healthy_ai_adult = yes + faith = scope:tension_county.faith + } + save_scope_as = minority_courtier + } + } + else_if = { + limit = { + any_courtier = { + is_available_healthy_ai_adult = yes + faith = scope:tension_county.faith + } + } + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + faith = scope:tension_county.faith + } + save_scope_as = minority_courtier + } + } + } + + option = { #Let us spread some hatred...discreetly. + name = fp2_struggle.1000.a + + ai_chance = { #Cruel and fanatical characters pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 0.5 + ai_compassion = -1 + ai_honor = -1 + } + } + + stress_impact = { + # Righteous characters find this a very unappealing option. + compassionate = medium_stress_impact_gain + gallant = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + paragon = medium_stress_impact_gain + # As do lazy ones. + lazy = minor_stress_impact_gain + } + + scope:tension_councillor = { + add_opinion = { + target = root + opinion = 10 + modifier = took_my_advice_opinion + } + } + + + add_character_modifier = { + modifier = fanatical_recruits_modifier + years = 10 + } + + duel = { #You try to create a hate campaign - and get away with it. + skill = intrigue + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = stoke_tension_toast.success + left_icon = root + + add_dread = minor_dread_gain + + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = stoke_tension_toast.failure + left_icon = root + add_character_modifier = { + modifier = hate_monger_modifier + years = 10 + } + + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + } + } + + option = { #I trust you to handle it + name = fp2_struggle.1000.b + + trigger = { + intrigue <= medium_skill_rating + } + + show_unlock_reason = no + + ai_chance = { #Cruel and fanatical characters pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.5 + ai_rationality = 0.2 + ai_compassion = -0.5 + ai_honor = -1 + } + } + + stress_impact = { + # Righteous characters find this a very unappealing option. + compassionate = medium_stress_impact_gain + gallant = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = medium_stress_impact_gain + paragon = medium_stress_impact_gain + # As do lazy ones. + lazy = miniscule_stress_impact_gain + } + + if = { + limit = { + intrigue <= medium_skill_rating + } + custom_tooltip = bad_intrigue.tt + } + + scope:tension_councillor = { + if = { + limit = { + intrigue >= average_skill_level + } + add_opinion = { + target = root + opinion = 10 + modifier = trusted_me_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -10 + modifier = unfair_expectations_opinion + } + } + } + + add_character_modifier = { + modifier = fanatical_recruits_modifier + years = 10 + } + + + + scope:tension_councillor = { + duel = { + skill = intrigue + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = delegated_stoke_tension_toast.success + left_icon = scope:tension_councillor + + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = stoke_tension_toast.failure + left_icon = scope:tension_councillor + + root = { + add_character_modifier = { + modifier = hate_monger_modifier + years = 10 + } + } + scope:tension_councillor = { + add_character_modifier = { + modifier = hate_monger_modifier + years = 10 + } + } + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + } + } + } + } + + option = { #"No, I shall try to ease the tensions." + name = fp2_struggle.1000.c + + ai_chance = { #just and compassionate characters pick this option + base = 10 + ai_value_modifier = { + ai_honor = 0.8 + ai_compassion = 0.7 + ai_rationality = 0.2 + ai_zeal = -0.8 + ai_vengefulness = -0.7 + } + } + + stress_impact = { + # Aggressive characters find this an unappealing option. + wrathful = minor_stress_impact_gain + zealous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + scope:tension_councillor = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + duel = { + skill = diplomacy + value = high_skill_rating + + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = ease_tension_toast.success + left_icon = root + + add_character_modifier = { + modifier = tolerance_gospel_modifier + years = 10 + } + + scope:tension_county = { + add_county_modifier = { + modifier = tensions_eased_province_modifier + years = 5 + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = ease_tension_toast.failure + left_icon = root + scope:tension_county = { + add_county_modifier = { + modifier = riots_and_murders_province_modifier + years = 5 + } + } + } + } + } + } + + option = { #"If I cannot stop this madness... + name = fp2_struggle.1000.d + + trigger = { + exists = scope:minority_courtier + + scope:tension_county = { + this != root.capital_county + } + } + + ai_chance = { #just and compassionate characters pick this option + base = 10 + ai_value_modifier = { + ai_honor = 0.3 + ai_compassion = 0.3 + ai_rationality = 0.8 + ai_zeal = -0.8 + ai_vengefulness = -0.7 + ai_greed = -1 + } + } + + stress_impact = { + # Aggressive characters find this unappealing + wrathful = minor_stress_impact_gain + zealous = major_stress_impact_gain + sadistic = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + + #As do power-mongers, you're giving away a whole province! + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + + } + + scope:minority_courtier = { + add_opinion = { + target = root + opinion = 20 + modifier = received_title_county + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + + scope:tension_county = { + change_title_holder = { + holder = scope:minority_courtier + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + add_stress = medium_stress_loss + + scope:tension_councillor = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + scope:tension_county = { + add_county_modifier = { + modifier = tensions_eased_province_modifier + years = 10 + } + } + } +} + +################################### +# War Widows +# By Ola Jentzsch +################################### +# Idea by Isabella welch +################################### + +scripted_trigger fp2_struggle.1001_weird_option_traits = { # These, presumably, makes you even more sympathethic to widows and orphans, or likely to take an ill-thought out decision. + OR = { + has_character_modifier = associates_with_strange_peasants_modifier + has_trait = bastard + has_trait = legitimized_bastard + has_trait = intellect_bad_3 + has_trait = intellect_bad_2 + has_trait = improvident + has_trait = lifestyle_reveler + has_trait = pregnant + has_trait = lunatic + has_trait = eccentric + } +} + +scripted_trigger fp2_struggle.1001_expectant_vassal_or_courtier_traits = { # This is about the personality the pregnant courtier should have to get this idea to begin with + has_trait = pregnant + is_available_ai = yes + NOR = { + has_trait = callous + has_trait = content + has_trait = arrogant + has_trait = dull + } +} + +fp2_struggle.1001 = { + type = character_event + title = fp2_struggle.1001.t + desc = fp2_struggle.1001.desc + theme = faith + cooldown = { years = 50 } + + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:expectant_courtier + animation = happiness + } + + trigger = { + has_fp2_dlc_trigger = yes + OR = { + any_vassal = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + } + any_courtier = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + } + } + gold >= medium_gold_value_check + + any_truce_target = { } + } + + immediate = { + random_vassal = { + limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_spouse_of = root + } + + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + any_player_heir = { is_spouse_of = prev } + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_councillor = yes + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_powerful_vassal = yes + } + + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + } + + save_scope_as = expectant_courtier + } + + if = { + limit = { + NOT = { + exists = scope:expectant_courtier + } + } + random_courtier = { + limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_spouse_of = root + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + any_player_heir = { is_spouse_of = prev } + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + is_councillor = yes + } + alternative_limit = { + fp2_struggle.1001_expectant_vassal_or_courtier_traits = yes + } + save_scope_as = expectant_courtier + } + } + } + + + + option = { #A good idea! I shall create such a fund. + name = fp2_struggle.1001.a + + stress_impact = { + # Arrogant or cruel characters find this an unappealing option. + arbitrary = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + + # As do, of course, greedy ones. + greedy = medium_stress_impact_gain + + # As do callous and content ones, to an extent. + callous = minor_stress_impact_gain + content = minor_stress_impact_gain + + # But generous and compassionate characters like it. + compassionate = minor_stress_impact_loss + generous = medium_stress_impact_loss + } + + ai_chance = { #Just and compassionate characters pick this option + base = 10 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 1 + ai_vengefulness = -0.2 + ai_greed = -0.5 + } + } + + remove_treasury_or_gold = major_treasury_or_gold_value + + scope:expectant_courtier = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + + add_character_modifier = { + modifier = nursing_salaries_for_single_mothers_modifier + years = 20 + } + } + + option = { #Widows I will support, but not whores! + name = fp2_struggle.1001.b + flavor = fp2_struggle.1001.b.tt + trigger = { + fp2_struggle.1001_weird_option_traits = no + trait_is_shunned_or_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = dummy_female + } + } + + stress_impact = { + # Truly righteous characters wouldn't say this. + compassionate = minor_stress_impact_gain + gallant = minor_stress_impact_gain + generous = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + + # And greedy ones still don't wanna pay up + greedy = minor_stress_impact_gain + } + + ai_chance = { #Zealous AI characters pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_compassion = -0.8 + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + add_piety = minor_piety_gain + add_character_modifier = { + modifier = widows_and_widowers_amazing_funds_modifier + years = 20 + } + + scope:expectant_courtier = { + if = { + limit = { + has_trait = zealous + } + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -10 + modifier = slightly_disappointed_opinion + } + } + } + } + + + option = { #But they can come stay at my court! We have food in abundance! + name = fp2_struggle.1001.c + flavor = fp2_struggle.1001.c.tt + trigger = { + fp2_struggle.1001_weird_option_traits = yes + } + + stress_impact = { + # Cheap or shy character's don't like this + greedy = medium_stress_impact_gain + shy = medium_stress_impact_gain + + #Nor do those wo really care about the appearance and glory of their courts + + ambitious = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + temperate = medium_stress_impact_gain + august = medium_stress_impact_gain + born_in_the_purple = minor_stress_impact_gain + + # But hypersocial hippies love it + + humble = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + ai_chance = { #Deranged or hypersocial but irrational AI characters pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.8 + ai_rationality = -0.8 + } + } + + scope:expectant_courtier = { + if = { + limit = { + OR = { + has_character_modifier = associates_with_strange_peasants_modifier + has_trait = bastard + has_trait = legitimized_bastard + has_trait = intellect_bad_3 + has_trait = intellect_bad_2 + has_trait = improvident + has_trait = gregarious + } has_trait = lunatic + } + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -10 + modifier = perplexed_opinion + } + } + } + if = { + limit = { + root = { + faith = { + OR = { + trait_is_virtue = gregarious + trait_is_virtue = humble + trait_is_virtue = generous + } + } + } + } + add_piety = medium_piety_gain + } + else = { + add_piety = minor_piety_gain + } + add_character_modifier = { + modifier = destitute_single_mothers_modifier + years = 15 + } + } + + option = { #Surely, my benevolent vassals can help funding this. + name = fp2_struggle.1001.d + + trigger = { + any_vassal = { + count = all + is_ai = yes + } + } + + stress_impact = { + # Careful or dilpomatically minded characters won't do this. + content = medium_stress_impact_gain + diplomat = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { #Economic AI characters pick this option, while the careful don't. + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = 0.5 + ai_rationality = -0.5 + } + } + + remove_treasury_or_gold = minor_treasury_or_gold_value + + custom_tooltip = fp2_struggle.1001.specialdescpositive + custom_tooltip = fp2_struggle.1001.specialdescnegative + hidden_effect = { + every_vassal = { + IF = { + limit = { + NOT = { + has_trait = pregnant + } + } + IF = { + limit = { + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + } + } + add_opinion = { + target = root + opinion = 10 + modifier = funded_righteous_cause_opinion + } + } + ELSE = { + add_opinion = { + target = root + opinion = -10 + modifier = extorted_me_opinion + } + } + } + } + } + + scope:expectant_courtier = { + IF = { + limit = { + is_vassal_of = root #if she is, she gets angry because now SHE is expected to pay for this... + } + add_opinion = { + target = root + opinion = -20 + modifier = extorted_me_opinion + } + } + ELSE = { + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + } + + add_character_modifier = { + modifier = nursing_salaries_for_single_mothers_modifier + years = 20 + } + } + + option = { #I am your king, not a wet nurse! + name = fp2_struggle.1001.e + + stress_impact = { + # Benevolent characters wouldn't ignore this. + compassionate = medium_stress_impact_gain + gallant = medium_stress_impact_gain + generous = medium_stress_impact_gain + + # nor would those who are truly competent or just. + administrator = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + + ai_chance = { #Callous or cheap AI characters pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = 0.5 + ai_honor = -0.7 + ai_compassion = -0.7 + } + } + + scope:expectant_courtier = { + add_opinion = { + target = root + opinion = -20 + modifier = hurt_opinion + } + } + + random = { + chance = 50 + send_interface_toast = { + left_icon = root + title = not_my_problem_toast + add_character_modifier = { + modifier = starving_single_mothers_and_children_modifier + years = 15 + } + } + } + } +} + +################################### +# Andalusian Advancements +# By Ola Jentzsch +################################### +# Inspired by an idea by Isabella welch +######################################### +scripted_trigger neighboring_ruler_proper_culture_trigger = { + OR = { + culture = culture:andalusian + culture = culture:bedouin + culture = culture:baranis + culture = culture:butr + culture = culture:levantine + culture = culture:sephardi + } +} + +fp2_struggle.1002 = { + type = character_event + title = fp2_struggle.1002.t + desc = { #Different flavor depending on time period + first_valid = { + triggered_desc = { + trigger = { current_date <= 1030.1.1 } + desc = fp2_struggle.1002.desc_early_golden_age + } + triggered_desc = { + trigger = { + current_year >= 1250 + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + } + desc = fp2_struggle.1002.desc_post_golden_age_christian #this triggers the latinized names of the polymaths + } + triggered_desc = { + trigger = { current_year >= 1250 } + desc = fp2_struggle.1002.desc_post_golden_age_unchristian #or their arabic ones + } + triggered_desc = { + trigger = { current_year >= 1030 } + desc = fp2_struggle.1002.desc_late_golden_age + } + } + first_valid = { + triggered_desc = { #tests if the event would fire one of the historical physicians + trigger = { + AND = { + current_year > 976 + current_year < 1010 + } + exists = global_var:albucasis_created + exists = scope:albucasis_physician + scope:great_physician = scope:albucasis_physician #this is a measure taken so that the loc gets tied to the appropriate character + } + desc = fp2_struggle.1002.desc_albucasis #this is the dialogue text if Albucasis spawns + } + triggered_desc = { #tests if the event would fire one of the historical physicians + trigger = { + AND = { + current_year > 1125 + current_year < 1165 + } + exists = global_var:avenzoar_created + exists = scope:avenzoar_physician + scope:great_physician = scope:avenzoar_physician + } + desc = fp2_struggle.1002.desc_avenzoar #this is the dialogue if Avenzoar spawns + } + triggered_desc = { #tests if the event would fire one of the historical physicians + trigger = { + AND = { + current_year > 1140 + current_year < 1180 + } + exists = global_var:tufail_created + exists = scope:tufail_physician + scope:great_physician = scope:tufail_physician + } + desc = fp2_struggle.1002.desc_tufail #this is the dialogue if Ibn Tufail spawns + } + triggered_desc = { #this defaults to a random Andalusian physician + trigger = { current_year >= 1050 } ## + desc = fp2_struggle.1002.desc_no_historical_physician_late + } + desc = fp2_struggle.1002.desc_no_historical_physician_early + } + first_valid = { #if root has a court physician, it changes the narrative a bit. + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + } + desc = fp2_struggle.1002.desc_has_physician_and_is_christian #in this case, the slur "heathen" is used + } + triggered_desc = { + trigger = { court_physician_available_trigger = yes } + desc = fp2_struggle.1002.desc_has_physician_but_not_christian #in this case, the slur "eccentric" is used + } + triggered_desc = { + trigger = { OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } } + desc = fp2_struggle.1002.desc_has_no_physician_but_is_christian #in this case, the slur "heathen" is used + } + desc = fp2_struggle.1002.desc_has_no_physician #default option should all else fail + } + } + + theme = medicine + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:great_physician + animation = personality_rational #polymaths should always have this pose :D + } + + lower_left_portrait = scope:neighboring_ruler #this is the ruler that's angry with the polymath + + lower_right_portrait = scope:scoped_physician #this is your court physician if you have one + + cooldown = { years = 100 } + + trigger = { + has_fp2_dlc_trigger = yes + #any_character_to_title_neighboring_county = { #this searches for a neighboring province that has the xenophilic tradition, which is this event's dynamic way of checking for Andalusian culture or cultures derived from it. + any_neighboring_and_across_water_top_liege_realm_owner = { + culture = { + OR = { + has_cultural_tradition = tradition_xenophilic + has_cultural_tradition = tradition_medicinal_plants + has_cultural_tradition = tradition_fp2_malleable_subjects + } + } + } + + root.capital_province = { #so that it only triggers for people close to Andalusia + OR = { + geographical_region = world_europe_west_iberia + geographical_region = world_europe_west_francia + geographical_region = world_europe_south_italy + } + } + + NOT = { #So that it doesn't fire for the Andalusians themselves, because that'd make the narrative weird + culture = culture:andalusian + } + + NOT = { #So that it doesn't fire for the Umayyads when they control Iberia + AND = { + culture = culture:levantine + root.capital_province = { geographical_region = world_europe_west_iberia } + } + } + + any_neighboring_and_across_water_top_liege_realm_owner = { + is_ai = yes + } + } + + weight_multiplier = { + base = 0.4 + modifier = { + OR = { + AND = { + current_year > 976 + current_year < 1010 + } + AND = { + current_year > 1125 + current_year < 1180 + } + } + add = 1.6 + } + modifier = { + neighboring_ruler_proper_culture_trigger = yes + add = 0.5 + } + } + + + immediate = { + + random_neighboring_and_across_water_top_liege_realm_owner = { #this searches for a neighboring ruler with the proper cultural tradition, which is this event's dynamic way of checking for Andalusian culture or cultures derived from it. + limit = { + culture = { + OR = { + has_cultural_tradition = tradition_xenophilic + has_cultural_tradition = tradition_medicinal_plants + has_cultural_tradition = tradition_fp2_malleable_subjects + } + } + } + culture = { save_scope_as = xenophilic_culture } #this is mostly used for error-checking because the debug log is unclear. + } + + if = { #This looks to see if one of three historical physicians will be used in the event + limit = { #their rough period of activity + AND = { + current_year > 976 + current_year < 1010 + } + NOT = { exists = global_var:albucasis_created } #makes sure that he wasn't already spawned by the event elsewhere + is_ai = no + scope:xenophilic_culture = culture:andalusian + } + create_character = { + age = { 40 70 } #their rough age during the period of their flourishing + location = root.capital_province + name = "Abu al-Qasim Al-Zahrawi" #Albucasis + gender = male + template = scholar_character + trait = intellect_good_3 #He was one of the Middle Ages' greatest geniuses + trait = lifestyle_herbalist + trait = lifestyle_physician + trait = education_learning_4 + random_traits_list = { #his personality, extrapolated from my research + count = 3 + ambitious = {} + compassionate = {} + calm = {} + diligent = {} + humble = {} + patient = {} + } + random_traits_list = { #this is to hint to the player why he was exiled from the previous court + count = 1 + fornicator = {} + deviant = {} + sodomite = {} + } + culture = culture:andalusian + dynasty = none + faith = faith:muwalladi + save_scope_as = albucasis_physician #this is needed to get the loc right + } + set_global_variable = albucasis_created + scope:albucasis_physician = { + save_scope_as = great_physician #this is to create one easy, generic scope for use in the rest of the event + } + } + + else_if = { + limit = { #their rough period of activity + AND = { + current_year > 1125 + current_year < 1165 + } + NOT = { exists = global_var:avenzoar_created } #makes sure that he wasn't already spawned by the event elsewhere + is_ai = no + scope:xenophilic_culture = culture:andalusian + } + create_character = { + age = { 31 71 } #their rough age during the period of their flourishing + location = root.capital_province + name = "Abū Marwān ibn Zuhr" #Avenzoar + gender = male + template = scholar_character + trait = intellect_good_2 + trait = scholar + trait = lifestyle_physician + trait = education_learning_4 + random_traits_list = { #his personality, extrapolated from my research + count = 3 + diligent = {} + cynical = {} + humble = {} + vengeful = {} #He was bitter over having been exiled from Morocco + } + random_traits_list = { #this is to hint to the player why he was exiled from the previous court + count = 1 + fornicator = {} + deviant = {} + sodomite = {} + murderer = {} + } + culture = culture:andalusian + dynasty = none + faith = faith:muwalladi + save_scope_as = avenzoar_physician + } + + set_global_variable = avenzoar_created + scope:avenzoar_physician = { + save_scope_as = great_physician + } + } + + else_if = { + limit = { #their rough period of activity + AND = { + current_year > 1140 + current_year < 1180 + } + NOT = { exists = global_var:tufail_created } #makes sure that he wasn't already spawned by the event elsewhere + is_ai = no + scope:xenophilic_culture = culture:andalusian + } + create_character = { + age = { 35 75 } #their rough age during the period of their flourishing + location = root.capital_province + name = "Abū Bakr ibn Tufail" #Ibn Tufail + gender = male + template = scholar_character + trait = intellect_good_2 + trait = theologian + trait = lifestyle_physician + trait = education_learning_3 + trait = journaller #He was an avid writer + random_traits_list = { #his personality, extrapolated from my research + count = 3 + diligent = {} + calm = {} + humble = {} + trusting = {} + } + random_traits_list = { #this is to hint to the player why he was exiled from the previous court + count = 1 + fornicator = {} + deviant = {} + sodomite = {} + witch = {} + } + culture = culture:andalusian + dynasty = none + faith = faith:muwalladi + save_scope_as = tufail_physician + } + set_global_variable = tufail_created + scope:tufail_physician = { + save_scope_as = great_physician + } + } + + + else = { #or it defaults to a random one + create_character = { + age = { 32 50 } + location = root.capital_province + template = scholar_character + trait = intellect_good_1 + trait = education_learning_3 + trait = lifestyle_physician + random_traits_list = { + count = 3 + ambitious = {} + calm = {} + diligent = {} + cynical = {} + humble = {} + patient = {} + } + random_traits_list = { ##his is to hint to the player why he was exiled from the previous court + count = 1 + fornicator = {} + deviant = {} + sodomite = {} + incestuous = {} + witch = {} + } + culture = scope:xenophilic_culture + faith = faith:muwalladi + save_scope_as = great_physician + } + } + + hidden_effect = { + scope:great_physician = { + add_trait_xp = { + trait = lifestyle_physician + value = 100 + } + } + } + + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + AND = { + neighboring_ruler_proper_culture_trigger = yes #the event prefers the neighboring ruler to be of these cultures, since it makes the most sense histrically for the scholar to have been at that court. + is_ai = yes + } + } + alternative_limit = { is_ai = yes} + save_scope_as = neighboring_ruler + } + + if = { #if you have a court physician already, he has a stake in this! + limit = { + court_physician_available_trigger = yes + } + save_court_physician_as_effect = { SCOPE_NAME = scoped_physician } + } + } + + option = { #I could use a new physician... + name = fp2_struggle.1002.a + + ai_chance = { #rational AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.7 + ai_zeal = -0.7 + } + } + + stress_impact = { + # Conservative characters don't want to do this. + content = minor_stress_impact_gain + + # Nor do self-absorbed ones + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + + remove_treasury_or_gold = major_treasury_or_gold_value #this guy is expensive! + + add_courtier = scope:great_physician #he's added to root's court + + court_position_grant_effect = { + EMPLOYER = root + CANDIDATE = scope:great_physician + POS = court_physician + } + + scope:great_physician = { #naturally, the polymath likes to get a new job + add_opinion = { + target = root + opinion = 10 + modifier = hired_me_opinion + } + } + + scope:neighboring_ruler = { #but the neighboring ruler gets angry that you harbor him + progress_towards_rival_effect = { + REASON = rival_harbored_polymath + CHARACTER = root + OPINION = 0 + } + } + + add_character_modifier = { #while you get inspired! + modifier = inspired_medicine_modifier + years = 20 + } + } + + option = { #I do not need you, I can read myself. + name = fp2_struggle.1002.b + flavor = fp2_struggle.1002.b.tt + + trigger = { #This only fires after Avicenna's life, as his books are referenced. + current_year >= 1030 + learning >= medium_skill_rating #and you have to be at least somewhat learned to have this option appear, otherwise it'd be superflous + NOT = { + exists = scope:scoped_physician + } + } + + ai_chance = { #energetic, overconfident AI chooses this + base = 10 + ai_value_modifier = { + ai_energy = 0.7 + ai_boldness = 0.6 + ai_rationality = 0.4 + ai_zeal = -0.6 + ai_greed = -0.6 + } + } + + stress_impact = { + # Conservative, dull or cheap characters won't do this + content = minor_stress_impact_gain + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + dull = medium_stress_impact_gain + } + + custom_tooltip = fp2_struggle.1002.physicianleaves + + remove_short_term_gold = minor_gold_value #books are expensive! + + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = medium_lifestyle_experience + } + + if = { #your physician gets disappointed for your lack of trust in them + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + } + + duel = { #you try to read Arabic books + skill = learning + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { #you succeed! + title = reading_avicenna_toast.success + left_icon = root + root = { + add_character_modifier = { + modifier = inspired_medicine_modifier + years = 20 + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { #you misunderstod something! + title = reading_avicenna_toast.failure + left_icon = root + root = { + add_character_modifier = { + modifier = misread_medicine_incompetence_modifier + years = 20 + } + } + } + } + } + } + + + option = { #What do I need you for? I can read Greek myself + name = fp2_struggle.1002.c + flavor = fp2_struggle.1002.c.tt + + trigger = { #This triggers for the early period, before the Canon of Medicine was published. + current_date <= 1030.1.1 + learning >= medium_skill_rating + NOT = { + exists = scope:scoped_physician + } + } + + ai_chance = { #energetic AI are the most likely to attempt this in this early time period + base = 10 + ai_value_modifier = { + ai_energy = 0.8 + ai_rationality = 0.2 + ai_zeal = -0.2 + } + } + + stress_impact = { + # Conservative, dull or cheap characters won't do this + content = minor_stress_impact_gain + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + dull = medium_stress_impact_gain + } + + custom_tooltip = fp2_struggle.1002.physicianleaves + + remove_short_term_gold = minor_gold_value #books are really expensive in this early period + + if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_xp = medium_lifestyle_experience + } + + if = { + limit = { exists = scope:scoped_physician } #your physician still gets disappointed in you + scope:scoped_physician = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + } + + duel = { #this duel is difficult - it's mostly an option for extremely learned or overconfident rulers. + skill = learning + value = high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = reading_hippocrates_toast.success #You can read greek! + left_icon = root + root = { + add_character_modifier = { + modifier = medical_insights_modifier + years = 20 + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = reading_hippocrates_toast.failure #apparently, your Greek skills aren't all you cranked them up to be. + left_icon = root + root = { + add_character_modifier = { + modifier = cannot_read_greek_modifier + years = 20 + } + } + } + } + } + } + + option = { #I will send you back from whence you came...in chains. + name = fp2_struggle.1002.d + + ai_chance = { #but vengeful ones sure love it! + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.8 + ai_honor = -0.2 + } + } + + stress_impact = { + #Caring, carefree or just characters won't do this + generous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + just = minor_stress_impact_gain + trusting = minor_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + + #But arbitrary bastards love it + arbitrary = minor_stress_impact_loss + } + + scope:great_physician = { #the polymath, naturally, gets sad that you send him back to his disgruntled former employer. + add_opinion = { + target = root + opinion = -40 + modifier = left_me_to_wolves_opinion + } + } + + if = { #but your current physician is very happy! + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = 20 + modifier = let_me_keep_my_job_opinion + } + } + } + + scope:neighboring_ruler = { #as is the neighboring ruler, especially if he is your friend + if = { + limit = { + has_relation_friend = root + } + add_opinion = { + target = root + modifier = strengthened_friendship_opinion + } + } + else = { + progress_towards_friend_effect = { + REASON = friend_returned_refugee + CHARACTER = root + OPINION = 0 + } + } + } + + add_dread = minor_dread_gain #you gain some dread for doing this, naturally + + custom_tooltip = fp2_struggle.1001.physician_imprisoned + hidden_effect = { + if = { + limit = { + scope:neighboring_ruler = { + is_ruler = yes + } + } + scope:great_physician = { #while the polymath gets to languish in a dungeon + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = scope:neighboring_ruler + } + } + } + else = { + scope:great_physician = { + silent_disappearance_effect = yes + } + } + } + } + + option = { #Wash my hands? Are you insane?" + name = fp2_struggle.1002.e + + trigger = { #This only triggers for Christianity and similar faiths + faith = { + has_doctrine_parameter = theocracy_temple_lease + NOR = { + has_doctrine_parameter = legalism_modified_law_costs + has_doctrine_parameter = literalist_debate_enabled + } + } + NOT = { has_lifestyle = learning_lifestyle } #So that this doesn't fire if you have the "Wash your hands" perk + } + + ai_chance = { #and fanatics don't care about hygiene...apparently + base = 10 + ai_value_modifier = { + ai_zeal = 0.8 + ai_rationality = -0.8 + } + } + + stress_impact = { + # Innovative or nervous chracters wouldn't pick this option. + ambitious = minor_stress_impact_gain + craven = minor_stress_impact_gain + + #But stubborn or content ones would + content = minor_stress_impact_loss + lazy = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + custom_tooltip = fp2_struggle.1002.physicianleaves + + if = { #your physician, again, loves that they get to keep their job + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = 20 + modifier = let_me_keep_my_job_opinion + } + } + } + + add_piety = medium_piety_gain #and your faith rewards you for turning away the heathen + + add_character_modifier = { #but you're rolling in filth + modifier = rolling_in_filth_modifier + years = 5 + } + } + + + + option = { #Begone, innovation should only come from God. + name = fp2_struggle.1002.f + + trigger = { + current_year >= 1065 #because this option refers to developments in islam that happened within the Seljuk empire + faith = { #it checks for doctrines, rather than islam itself, to make the event more dynamic + OR = { + has_doctrine_parameter = legalism_modified_law_costs + has_doctrine_parameter = literalist_debate_enabled + has_doctrine_parameter = religious_legal_pronouncements_law_cost_reduction + } + } + } + + ai_chance = { #zealous AIs pick this, but it's not entirely unrational - just hostile to new ideas. + base = 10 + ai_value_modifier = { + ai_zeal = 0.8 + ai_rationality = -0.2 + } + } + + stress_impact = { + #True rationalists abhor this option + ambitious = medium_stress_impact_gain + diligent = medium_stress_impact_gain + + #But stubborn and fanatical ones like it + content = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + zealous = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + custom_tooltip = fp2_struggle.1002.physicianleaves + + if = { #your physician, again, loves that they get to keep their job + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = 20 + modifier = let_me_keep_my_job_opinion + } + } + } + + scope:neighboring_ruler = { #the neighboring ruler likes that you rebuked the polymath, at least + add_opinion = { + target = root + opinion = 10 + modifier = rejected_my_enemy_opinion + } + } + + add_character_modifier = { #but you draw closer to the Nizamiyah movement, rejecting innovation. + modifier = anti_innovation_muslim_modifier + years = 15 + } + } +} + +################################### +# Soul of Iron +# By Ola Jentzsch +################################### +fp2_struggle.1010 = { # Soul of Iron, by Ola Jentzsch + type = character_event + title = fp2_struggle.1010.t + desc = fp2_struggle.1010.desc + theme = realm + + left_portrait = { + character = root + animation = happiness #root smells an opportunity! + } + right_portrait = { + character = scope:great_swordsmith + animation = scheme #he's a scheming bastard, kinda + } + + + trigger = { #The province must also be involved in the Iberian struggle + is_ai = no + has_fp2_dlc_trigger = yes + any_held_county = { + any_county_province = { + has_building_or_higher = blacksmiths_01 #This event needs ROOT to have a blacksmith building + } + } + fp2_character_involved_in_struggle_trigger = yes + } + + cooldown = { years = 100 } + + immediate = { + + random_held_county = { #this is to find the county that has the blacksmith + limit = { + any_county_province = { + has_building_or_higher = blacksmiths_01 + } + } + save_scope_as = blacksmith_county #this scopes it - note that it might be the same county as toledo_county; that is intentional. + } + + title:b_toledo = { save_scope_as = toledo_holding } #this is used in the localization + + title:c_toledo = { save_scope_as = toledo_county } #this is used in option c, as well as the localization + + create_character = { #this is the mighty blacksmith that the event needs + age = { 45 55 } #he's experienced and aging, but not old + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance #could be female, if given the right context. + trait = intellect_good_3 #he's a genius craftsman + trait = strong #and a blacksmith... + trait = arrogant #he's supremely gifted, but also extremely arrogant, Fëanor basically + random_traits_list = { #the rest of his questionable personality + count = 2 + ambitious = {} + diligent = {} + callous = {} + greedy = {} + patient = {} + stubborn = {} + vengeful = {} + } + random_traits_list = { #something fun to give him character! + count = 1 + one_eyed = {} + scarred = {} + } + culture = scope:toledo_county.culture + faith = faith:catholic + dynasty = none + save_scope_as = great_swordsmith #this saves him as a scope so we can get nice effects to bounce off him! + } + + hidden_effect = { + scope:great_swordsmith = { + add_character_modifier = { + modifier = master_smith_npc_modifier #this is a neat modifier he gets as a master smith. it's pretty powerful, giving a boost to Stewardship and gold income, but since he's an NPC, it doesn't matter much. It's mostly to create flavor if the player actually examines his stats. + } + } + } + } + + + option = { #Let us make a compromise + name = fp2_struggle.1010.a + flavor = toledo_compromise_flavor + + trigger = { #root needs to control Toledo, and it needs to have a blacksmith building. + any_held_county = { + any_county_province = { + barony = title:b_toledo + has_building_or_higher = blacksmiths_01 + } + } + scope:toledo_county = { #so that this option doesn't fire twice + NOT = { has_county_modifier = toledo_steel_county_modifier } + } + } + + ai_chance = { #Smart, patient AIs pick this option, others are more likely to go for a bolder approach. + base = 10 + ai_value_modifier = { + ai_rationality = 1 + ai_honor = 0.5 + ai_boldness = -0.5 + ai_zeal = -0.5 + } + } + + stress_impact = { #arrogant or visionless rulers dislike this option + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + content = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + remove_short_term_gold = major_gold_value #someone still has to be bribed here + + scope:toledo_county = { + add_county_modifier = { + modifier = toledo_steel_county_modifier + } + } + + scope:toledo_county = { + add_county_modifier = { + modifier = governance_1041_quarreling_guilds_modifier + years = 20 + } + } + } + + option = { #Whatever knowledge you possess, I shall draw it out. + name = fp2_struggle.1010.b + flavor = fp2_struggle.1010.swordsmith_imprisoned + + trigger = { + OR = { + has_trait = schemer + has_trait = torturer + has_trait = paranoid + dread >= high_dread + } + NAND = { + any_held_county = { + any_county_province = { + barony = title:b_toledo + has_building_or_higher = blacksmiths_01 + } + } + scope:toledo_county = { #so that this option doesn't fire twice + NOT = { has_county_modifier = toledo_steel_county_modifier } + } + } + } + + + scope:great_swordsmith = { #while the great swordsmiths gets to languish in a dungeon + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + + ai_chance = { #Compassionate or just AI wouldn't do this, but hateful paranoid psychopats, sure! Perhaps the smith even deserved it... + base = 10 + ai_value_modifier = { + ai_vengefulness = 1 + ai_honor = -1 + } + } + + stress_impact = { #this is not what a Buddha would do + compassionate = major_stress_impact_gain + generous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + add_dread = minor_dread_gain #you gain some dread for doing this, naturally + + scope:great_swordsmith = { + add_character_modifier = { + modifier = recently_tortured + years = 5 + } + } + + + add_character_modifier = { + modifier = tortured_smith_spilling_secrets_modifier + years = 25 + } + + custom_tooltip = fp2_struggle.1010.compassionate_courtiers + hidden_effect = { #Compassionate or righteous courtiers will secretly dislike this + every_courtier = { + IF = { + limit = { + OR = { + has_trait = compassionate + has_trait = just + } + } + add_opinion = { + target = root + opinion = -10 + modifier = cruelty_opinion + } + } + } + } + } + + option = { #You shall have it, if you make swords for my armies + name = fp2_struggle.1010.c + flavor = fp2_struggle.1010.smithgoesaway + + ai_chance = { #ambitious AIs pick this option + base = 10 + ai_value_modifier = { + ai_energy = 0.7 + ai_vengefulness = 0.7 + } + } + + stress_impact = { + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + greedy = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + remove_treasury_or_gold = major_treasury_or_gold_value #this guy is expensive! + + add_character_modifier = { #as promised, your armies gets equipped with Toledo steel! + modifier = toledo_steel_armaments_modifier + years = 50 + } + + scope:blacksmith_county = { #the great smith usurps the blacksmiths' guild, with your blessing + add_county_modifier = { + modifier = county_corruption_uncooperative_guilds_modifier + years = 10 + } + } + + custom_tooltip = fp2_struggle.1010.paranoid_rivals #your neighbors gets really paranoid when they learn about this + hidden_effect = { + struggle:iberian_struggle = { + every_involved_ruler = { + limit = { + NOT = { is_allied_to = root } + character_is_realm_neighbor = root + } + add_opinion = { + target = root + opinion = -20 + modifier = threatened_by_buildup_opinion + } + } + } + } + } + + option = { #Make me Iberia's finest blade, and all the smithies shall be yours + name = fp2_struggle.1010.d + + flavor = fp2_struggle.1010.smithmakesweapon #the master swordsmiths stays in your court for the time being, to make the great sword he promised you. + + add_courtier = scope:great_swordsmith + + hidden_effect = { + scope:great_swordsmith = { + set_knight_status = forbid #this is to prevent him being auto-turned into a knight during his stay, as he tends to get quite high prowess. The player can still make him a knight manually if they insist on it. + } + } + + ai_chance = { #Self-absorbed AIs pick this option + base = 10 + ai_value_modifier = { + ai_greed = 0.7 + ai_boldness = 0.7 + } + } + + stress_impact = { #this is an extravagant option, not for the humble or temperate - but just people don't like it either, since it still lets the blacksmith usurp the guilds. + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + + remove_short_term_gold = major_gold_value #this guy knows what he's worth! + + scope:blacksmith_county = { #the guild gets usurped by the arrogant master smith! + add_county_modifier = { + modifier = county_corruption_uncooperative_guilds_modifier + years = 10 + } + } + + hidden_effect = { #this looks weird in the tooltip otherwise! + random_list = { #I recommend increasing the odds for the special cool sword when testing this event! + 25 = { #You have a 25% chance of getting a really cool sword here! + trigger = { is_ai = no } #this option is just for players, to create less inflation on awesume swords. + trigger_event = { + id = fp2_struggle.1011 + days = { 30 60 } + } + } + 75 = { #but you can still get a nice toledo blade! + trigger_event = { + id = fp2_struggle.1012 + days = { 30 60 } + } + } + } + } + } + + option = { #I will not anger the guilds for your vanity. + name = fp2_struggle.1010.e + + flavor = fp2_struggle.1010.swordsmith_leaves + + ai_chance = { #Lazy or worried AI pick this option + base = 10 + ai_value_modifier = { + ai_energy = -0.7 + ai_greed = 0.3 + ai_boldness = -0.5 + } + } + + stress_impact = { #this is not the option for opportunists, but a good option for some humble stress loss + ambitious = major_stress_impact_gain + diligent = medium_stress_impact_gain + content = minor_stress_impact_loss + humble = minor_stress_impact_loss + temperate = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + + scope:blacksmith_county = { #You curry favor with the blacksmith's guild + add_county_modifier = { + modifier = guild_rights_protected_modifier + years = 20 + } + } + + scope:great_swordsmith = { + add_opinion = { + target = root + modifier = insulted_opinion + } + } + } +} + +fp2_struggle.1011 = { # The Masterwork, by Ola Jentzsch + type = character_event + title = fp2_struggle.1011.t + desc = fp2_struggle.1011.desc + theme = realm + + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:great_swordsmith + animation = marshal + } + + artifact = { # To display the artifact in the event-window + target = scope:amazing_toledo_sword + position = lower_right_portrait + } + + trigger = { + has_fp2_dlc_trigger = yes + scope:great_swordsmith = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + + save_scope_as = owner + set_artifact_rarity_illustrious = yes + + create_artifact = { + name = awesome_toledo_sword_name + creator = scope:great_swordsmith + description = awesome_toledo_sword_desc + visuals = sword + type = sword + modifier = artifact_amazing_toledo_sword_modifier + wealth = scope:wealth # This comes from the scripted effect above + quality = scope:quality # This comes from the scripted effect above + save_scope_as = amazing_toledo_sword # Allows the sword to be accessed via scope after its creation + } + } + + option = { #Martiello, the hammer + name = fp2_struggle.1011.a + + trigger = { + root = { + culture = { has_cultural_pillar = language_iberian } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = martiello_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Tiniebra, the darkness + name = fp2_struggle.1011.b + + trigger = { + root = { + culture = { has_cultural_pillar = language_iberian } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = tiniebra_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Vermejo, the red + name = fp2_struggle.1011.c + + trigger = { + root = { + culture = { has_cultural_pillar = language_iberian } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = vermejo_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Jargonça, like the blue gemstone. + name = fp2_struggle.1011.d + + trigger = { + root = { + culture = { has_cultural_pillar = language_iberian } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = jargonca_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Suhayl, the glorious. + name = fp2_struggle.1011.e + + trigger = { + root = { + culture = { has_cultural_pillar = language_arabic } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = suhayl_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #al-Battar, the cutter + name = fp2_struggle.1011.f + + trigger = { + root = { + culture = { has_cultural_pillar = language_arabic } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = albattar_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Qazeeb, of the strong handle + name = fp2_struggle.1011.g + + trigger = { + root = { + culture = { has_cultural_pillar = language_arabic } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = qazeeb_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Zumurrud, like the blinding emerald + name = fp2_struggle.1011.h + + trigger = { + root = { + culture = { has_cultural_pillar = language_arabic } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = zumurrud_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Ortzi, like the thunder + name = fp2_struggle.1011.i + + trigger = { + root = { + culture = { has_cultural_pillar = language_basque } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = ortzi_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Gaueko, the night spirit + name = fp2_struggle.1011.j + + trigger = { + root = { + culture = { has_cultural_pillar = language_basque } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = gaueko_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Gorri, the red one + name = fp2_struggle.1011.k + + trigger = { + root = { + culture = { has_cultural_pillar = language_basque } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = gorri_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Aiztoto, the little knife + name = fp2_struggle.1011.l + + trigger = { + root = { + culture = { has_cultural_pillar = language_basque } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = aiztoto_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Escremire, the fencer + name = fp2_struggle.1011.m + + trigger = { + root = { + culture = { has_cultural_pillar = language_occitano_romance } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = escremire_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Folha, the leaf + name = fp2_struggle.1011.n + + trigger = { + root = { + culture = { has_cultural_pillar = language_occitano_romance } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = folha_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Proeza, valour + name = fp2_struggle.1011.o + + trigger = { + root = { + culture = { has_cultural_pillar = language_occitano_romance } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = proeza_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Trebalhar, the tormenter + name = fp2_struggle.1011.p + + trigger = { + root = { + culture = { has_cultural_pillar = language_occitano_romance } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = trebalhar_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Sufax, like the great hero in days of old + name = fp2_struggle.1011.q + + trigger = { + root = { + culture = { has_cultural_pillar = language_berber } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = sufax_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Toumellalt, the white one. + name = fp2_struggle.1011.r + + trigger = { + root = { + culture = { has_cultural_pillar = language_berber } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = toumellalt_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Ayugu, the yoke. + name = fp2_struggle.1011.s + + trigger = { + root = { + culture = { has_cultural_pillar = language_berber } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = ayugu_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Well, "Ironsoul" of course + name = fp2_struggle.1011.u + + trigger = { + root = { + culture = { + NOT = { + has_cultural_pillar = language_iberian + has_cultural_pillar = language_arabic + has_cultural_pillar = language_basque + has_cultural_pillar = language_occitano_romance + has_cultural_pillar = language_berber + } + } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = ironsoul_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #I quite like "Mistletoe"... + name = fp2_struggle.1011.v + + trigger = { + root = { + culture = { + NOT = { + has_cultural_pillar = language_iberian + has_cultural_pillar = language_arabic + has_cultural_pillar = language_basque + has_cultural_pillar = language_occitano_romance + has_cultural_pillar = language_berber + } + } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = mistletoe_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Moor-cleaver, what else? + name = fp2_struggle.1011.w + + trigger = { + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + root = { + culture = { + NOT = { + has_cultural_pillar = language_iberian + has_cultural_pillar = language_arabic + has_cultural_pillar = language_basque + has_cultural_pillar = language_occitano_romance + has_cultural_pillar = language_berber + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + } + + scope:amazing_toledo_sword = { set_artifact_name = moormurder_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } + + option = { #Usurper's blade seem fitting, giving what we did to the guilds... + name = fp2_struggle.1011.x + + trigger = { + root = { + culture = { + NOT = { + has_cultural_pillar = language_iberian + has_cultural_pillar = language_arabic + has_cultural_pillar = language_basque + has_cultural_pillar = language_occitano_romance + has_cultural_pillar = language_berber + } + } + } + } + + scope:amazing_toledo_sword = { set_artifact_name = usurperblade_name } + + custom_tooltip = fp2_struggle.1011.swordsmith_leaves + hidden_effect = { + remove_courtier_or_guest = scope:great_swordsmith + } + } +} + +fp2_struggle.1012 = { # Soul of Iron (3), by Ola Jentzsch + type = character_event + title = fp2_struggle.1012.t + desc = fp2_struggle.1012.desc + theme = realm + + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:great_swordsmith + animation = marshal + } + + artifact = { # To display the artifact in the event-window + target = scope:toledo_sword + position = lower_right_portrait + } + + trigger = { + has_fp2_dlc_trigger = yes + scope:great_swordsmith = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + + save_scope_as = owner + set_artifact_rarity_masterwork = yes + + create_artifact = { + name = toledo_sword_name + creator = scope:great_swordsmith + description = toledo_sword_desc + visuals = sword + type = sword + modifier = artifact_masterwork_toledo_sword_modifier + wealth = scope:wealth # This comes from the scripted effect above + quality = scope:quality # This comes from the scripted effect above + save_scope_as = toledo_sword # Allows the sword to be accessed via scope after its creation + } + } + + option = { #It is...exquisite. You may go in peace. + name = fp2_struggle.1012.a + flavor = fp2_struggle.1012.swordsmith_leaves + + ai_chance = { #Only greedy AI wouldn't pick this option. + base = 10 + ai_value_modifier = { + ai_greed = -1 + } + } + + remove_courtier_or_guest = scope:great_swordsmith + } + + option = { #It is as promised. May I not convince you to stay and serve me? + name = fp2_struggle.1012.b + + ai_chance = { #Only greedy would pick this option. + base = 10 + ai_value_modifier = { + ai_greed = 1 + } + } + + custom_tooltip = fp2_struggle.1012_swordsmith_stays + + remove_treasury_or_gold = major_treasury_or_gold_value #this guy is expensive! + } +} + +################################### +# Death of a Councilman +# By Ola Jentzsch +################################### +scripted_trigger fp2_struggle.1020_minority_councillor_faith_trigger = { + save_temporary_scope_as = fp2_struggle_1020_temp_councillor + is_ai = yes + NOT = { is_spouse_of = root } + root.capital_county.faith = { + faith_hostility_level = { + target = scope:fp2_struggle_1020_temp_councillor.faith + value >= faith_hostile_level + } + } +} + +fp2_struggle.1020 = { + type = character_event + title = fp2_struggle.1020.t + desc = { + desc = fp2_struggle.1020_desc_opening + first_valid = { + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_beaten_by_mob + } + } + desc = fp2_struggle.1020_desc_beaten_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_burned_by_mob + } + } + desc = fp2_struggle.1020_desc_burned_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_hanged_and_disemboweled_by_mob + } + } + desc = fp2_struggle.1020_desc_hanged_and_disemboweled_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_crucified_by_mob + } + } + desc = fp2_struggle.1020_desc_crucified_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_defenestrated_by_mob + } + } + desc = fp2_struggle.1020_desc_defenestrated_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_molten_silver_by_mob + } + } + desc = fp2_struggle.1020_desc_molten_silver_by_mob + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + death_reason = death_torn_to_pieces_by_mob + } + } + desc = fp2_struggle.1020_desc_torn_to_pieces_by_mob + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:councillor_executor = { + exists = var:relative_created + } + } + desc = fp2_struggle.1020_desc_councillor_had_family + } + triggered_desc = { + trigger = { + scope:minority_councillor = { + fp2_struggle.1020_minority_councillor_faith_trigger = yes + } + } + desc = fp2_struggle.1020_desc_councillor_had_no_family_faith + } + } + } + + theme = dread + cooldown = { years = 15 } + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:councillor_executor + animation = anger + } + + lower_left_portrait = scope:minority_councillor + + + trigger = { + has_fp2_dlc_trigger = yes + + any_councillor = { fp2_struggle.1020_minority_councillor_faith_trigger = yes } + + capital_county = { county_control < low_county_control_limit } #root's capital having low control isn't strictly necessary, but adds to the emergent feeling here + } + + immediate = { + + random_councillor = { #this is the dead councillor + limit = { fp2_struggle.1020_minority_councillor_faith_trigger = yes } + save_scope_as = minority_councillor + } + + capital_county = { save_scope_as = unrest_capital } #so we can use the capital for loc + + scope:minority_councillor = { #and this is how they met their untimely end + random_list = { + 10 = { + death = { + death_reason = death_beaten_by_mob + } + } + 10 = { + death = { + death_reason = death_burned_by_mob + } + } + 20 = { + death = { + death_reason = death_hanged_and_disemboweled_by_mob + } + } + 20 = { + death = { + death_reason = death_crucified_by_mob + } + } + 10 = { + death = { + death_reason = death_defenestrated_by_mob + } + } + 20 = { + death = { + death_reason = death_molten_silver_by_mob + } + } + 10 = { + death = { + death_reason = death_torn_to_pieces_by_mob + } + } + } + } + + if = { #now let's see if there's any relative of the late councillor that could be considered relevant! + limit = { + any_powerful_vassal = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + is_powerful_vassal = yes + } + } + random_powerful_vassal = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + is_powerful_vassal = yes + } + save_scope_as = councillor_executor + set_variable = relative_created #this variable is for use in triggers later + } + } + + else_if = { + limit = { + any_powerful_vassal = { + is_ai = yes + is_close_family_of = scope:minority_councillor + } + } + random_powerful_vassal = { + limit = { + is_ai = yes + is_close_family_of = scope:minority_councillor + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else_if = { + limit = { + any_powerful_vassal = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + } + random_powerful_vassal = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else_if = { + limit = { + any_neighboring_and_across_water_top_liege_realm_owner = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + OR = { + fp2_character_involved_in_struggle_trigger = yes + fp2_character_interloper_in_struggle_trigger = yes + } + } + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + OR = { + fp2_character_involved_in_struggle_trigger = yes + fp2_character_interloper_in_struggle_trigger = yes + } + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else_if = { + limit = { + any_ruler = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + } + random_ruler = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else_if = { + limit = { + any_courtier = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + } + random_courtier = { + limit = { + is_ai = yes + is_close_or_extended_family_of = scope:minority_councillor + } + save_scope_as = councillor_executor + set_variable = relative_created + } + } + + else = { #if no relevant relative was found, we instead create a community leader to fire option b with! + create_character = { + age = { 20 80 } + location = root.capital_province + template = merchant_template + culture = scope:minority_councillor.culture + faith = scope:minority_councillor.faith + save_scope_as = councillor_executor + } + hidden_effect = { + scope:councillor_executor = { #just because, I want more rotund people + add_character_modifier = { + modifier = obese_modifier + } + } + } + } + + scope:minority_councillor = { + every_close_or_extended_family_member = { + custom = all_family_members + if = { + limit = { is_ai = yes } + add_opinion = { + target = root + opinion = -20 + modifier = blames_for_death_of_relative_opinion + } + } + } + } + } + + + option = { #Make amends to councillor's dynasty + name = fp2_struggle.1020.a + + trigger = { + scope:councillor_executor = { + exists = var:relative_created + } + } + + ai_chance = { #rational and somewhat honorable AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_honor = 0.3 + #but bold and vengeful ones do not + ai_boldness = -0.5 + ai_vengefulness = -0.5 + } + } + + stress_impact = { + #arrogant characters don't care for this + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + + #socially awkward ones aren't fond of it either + paranoid = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + add_character_modifier = { + modifier = compelling_apology_modifier + years = 10 + } + + scope:minority_councillor = { + every_close_or_extended_family_member = { + custom = all_family_members + if = { + limit = { is_ai = yes } + add_opinion = { + target = root + opinion = 10 + modifier = made_amends_opinion + } + } + } + } + } + + option = { #Pay restitution to councillor's people + name = fp2_struggle.1020.b + + trigger = { + scope:councillor_executor = { + NOT = { exists = var:relative_created } + } + } + + ai_chance = { #compassionate AIs takes this option + base = 10 + ai_value_modifier = { + ai_compassion = 0.7 + ai_honor = 0.3 + #but zealous and vengeful ones do not + ai_zeal = -0.5 + ai_vengefulness = -0.5 + } + } + + stress_impact = { + #arrogant characters don't wanna do this + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + + #nor those who hate the people + paranoid = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + remove_treasury_or_gold = medium_treasury_or_gold_value #restitution isn't free! + + add_character_modifier = { + modifier = restitution_to_minorities_modifier + years = 15 + } + } + + option = { #Hunt down the perpetrators + name = fp2_struggle.1020.c + + ai_chance = { #energetic and vengeful AI picks this option. + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_vengefulness = 0.7 + #but compassionate ones might not + ai_compassion = -0.7 + } + } + + stress_impact = { #this is cruel and a lot of effort... + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + + add_character_modifier = { + modifier = memorable_public_execution_modifier + years = 10 + } + + + add_prestige = minor_prestige_gain + + if = { + limit = { exists = var:relative_created } + scope:councillor_executor = { + add_opinion = { + target = root + opinion = 20 + modifier = avenged_relative_opinion + + } + } + } + } + + option = { #Restore order in the capital + name = fp2_struggle.1020.d + + ai_chance = { #rational and compassionate AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.9 + ai_compassion = 0.3 + #but bold and zealous ones do not + ai_boldness = -0.5 + ai_zeal = -0.5 + } + } + + stress_impact = { + #cruel or lazy characters don't bother with this + callous = minor_stress_impact_gain + lazy = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + + #and vengeful ones would rather pursue revenge. + vengeful = minor_stress_impact_gain + } + + if = { + limit = { exists = var:relative_created } + scope:councillor_executor = { + add_opinion = { + target = root + opinion = -10 + modifier = ignored_demands_opinion + } + } + } + + add_prestige = minor_prestige_gain + + root.capital_county = { change_county_control = medium_county_control_gain } + } +} + +################################### +# The Vision +# By Ola Jentzsch +################################### +fp2_struggle.1050 = { + type = character_event + title = fp2_struggle.1050.t + desc = { + first_valid = { + desc = fp2_struggle.1050.desc_opening + } + first_valid = { + triggered_desc = { + trigger = { + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + scope:visionary_spouse= { + has_OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + } + desc = fp2_struggle.1050.desc_christian + } + triggered_desc = { + trigger = { + has_religion = religion:islam_religion + scope:visionary_spouse= { + has_religion = religion:islam_religion + } + } + desc = fp2_struggle.1050.desc_islamic + } + triggered_desc = { + trigger = { + has_religion = religion:germanic_religion + scope:visionary_spouse= { + has_religion = religion:germanic_religion + } + } + desc = fp2_struggle.1050.desc_rampaging_barbarian_heathen + } + desc = fp2_struggle.1050.desc_non_barbarian_heathen + } + first_valid = { + triggered_desc = { + trigger = { + root = { + OR = { + culture = culture:andalusian + culture = culture:bedouin + } + } + scope:visionary_spouse = { + OR = { + culture = culture:andalusian + culture = culture:bedouin + } + } + } + desc = fp2_struggle.1050.desc_islamic_heritage + } + triggered_desc = { + trigger = { + has_faith = faith:catholic + scope:visionary_spouse= { + has_faith = faith:catholic + } + } + desc = fp2_struggle.1050.desc_christian_bling_reference_drop + } + desc = fp2_struggle.1050.desc_middle_neutral_version + } + first_valid = { + triggered_desc = { + trigger = { + scope:visionary_spouse = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + } + desc = fp2_struggle.1050.desc_love_and_warmth_ending + } + desc = fp2_struggle.1050.desc_no_love_and_warmth_ending + } + } + + theme = death + override_background = { reference = battlefield } ## + + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:visionary_spouse + animation = paranoia + } + + + trigger = { + has_fp2_dlc_trigger = yes + + is_landed_or_landless_administrative = yes + + any_spouse = { is_courtier = yes } + + fp2_character_involved_in_struggle_trigger = yes + + struggle:iberian_struggle = { is_struggle_phase = struggle_iberia_phase_hostility } + } + + cooldown = { #this event shouldn't fire too often, since the context with the spouse's dream is pretty specific. + years = 100 + } + + + immediate = { + + random_spouse = { + weight = { + base = 1 + modifier = { + factor = 5 + this = primary_spouse + } + } + save_scope_as = visionary_spouse + } + + scope:visionary_spouse = { + add_character_modifier = { + modifier = foreboding_visions_modifier + years = 10 + } + } + + hidden_effect = { + scope:visionary_spouse = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } + } + } + } + + option = { + name = fp2_struggle.1050.a + + trigger = { + faith = { + OR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + } + } + + ai_chance = { #bold, vengeful and zealous AI goes for this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 0.7 + ai_zeal = 0.7 + ai_compassion = -1 #whereas compassionate, rational and honorable ones really, really doesn't + ai_rationality = -1 + ai_honor = -0.5 + } + } + + stress_impact = { + compassionate = major_stress_impact_gain #compassionate people don't accuse their spouse of being a witch + craven = minor_stress_impact_gain #cravens don't dare throw her in jail + trusting = medium_stress_impact_gain #and trusting people don't accuse her either + eccentric = minor_stress_impact_loss + } + + custom_tooltip = fp2_struggle.1050.spouse_imprisoned #you throw your spouse into the dungeon for being a suspected witch + hidden_effect = { + scope:visionary_spouse = { + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + } + } + + option = { + name = fp2_struggle.1050.b + + ai_chance = { #lazy zealous AI pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.8 + ai_energy = -0.7 + ai_vengefulness = -0.7 + } + } + + stress_impact = { + cynical = minor_stress_impact_gain #cynics don't really put their faith in God + } + + duel = { #this duel is root trying to make their spouse feel better. + skill = diplomacy + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = 15 + has_trait = compassionate + } + modifier = { + add = 20 + has_trait = zealous + } + send_interface_toast = { + title = comforting_spouse_visionary_toast.success + left_icon = root + right_icon = scope:visionary_spouse + + scope:visionary_spouse = { + add_opinion = { + target = root + modifier = comforted_opinion + } + } + custom_tooltip = fp2_struggle.1050.condition_might_improve + hidden_effect = { + scope:visionary_spouse = { + recover_from_disease_effect = { DISEASE = ill } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + modifier = { + add = 20 + has_trait = callous + } + modifier = { + add = 10 + has_trait = sadistic + } + send_interface_toast = { + title = comforting_spouse_visionary.failure + left_icon = root + right_icon = scope:visionary_spouse + + scope:visionary_spouse = { + add_opinion = { + target = root + modifier = failed_comfort_opinion + } + } + + custom_tooltip = fp2_struggle.1050.condition_might_get_worse + hidden_effect = { + scope:visionary_spouse = { + add_character_modifier = { + modifier = mysterious_prophetess_illness_modifier + years = 5 + } + } + } + } + } + } + } + + option = { #Come, tell me more of your visions + name = fp2_struggle.1050.c + + ai_chance = { #compassionate AIs pick this option + base = 10 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 0.5 + ai_vengefulness = -0.5 + } + } + + stress_impact = { #unpleasant types don't pick this option... + arrogant = minor_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + eccentric = minor_stress_impact_loss + } + + scope:visionary_spouse = { + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + add_opinion = { + target = root + modifier = listened_opinion + } + } + else = { + progress_towards_lover_effect = { + CHARACTER = root + REASON = lover_comforted_nightmare + OPINION = 0 + } + } + } + + custom_tooltip = fp2_struggle.1050.condition_might_improve + hidden_effect = { + scope:visionary_spouse = { + recover_from_disease_effect = { DISEASE = ill } + } + } + + add_character_modifier = { + modifier = frightened_by_portent_modifier + years = 10 + } + } + + option = { #Leave me be, I am planning my next conquest + name = fp2_struggle.1050.d + + ai_chance = { #Ambitious AIs pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.7 + ai_greed = 0.5 + ai_compassion = -0.7 + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + + scope:visionary_spouse = { + add_opinion = { + target = root + modifier = failed_comfort_opinion + } + } + + custom_tooltip = fp2_struggle.1050.condition_might_get_very_worse + hidden_effect = { + random = { + chance = 90 + scope:visionary_spouse = { + add_character_modifier = { + modifier = mysterious_prophetess_illness_modifier + years = 5 + } + add_trait = depressed_1 + } + } + } + } +} + +################################### +# Disorderly Market +# By Hugo Cortell +################################### VSCODE: Use control + / to comment/uncomment entire blocks of code. And control + shift + [ (or ]) to fold/unfold a block! +scripted_trigger fp2_struggle_2000_check_holds_city_scripted_trigger = { + title_province = { has_holding_type = city_holding } + exists = holder + holder != root +} + +fp2_struggle.2000 = { + type = character_event + title = fp2_struggle.2000.t + desc = fp2_struggle.2000.desc + theme = stewardship + cooldown = { years = 5 } + override_background = { reference = market } + left_portrait = root + right_portrait = { + character = scope:fp2_2000_market_inspector + animation = anger + } + + trigger = { + has_fp2_dlc_trigger = yes + has_religion = religion:islam_religion + faith = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + has_doctrine = tenet_religious_legal_pronouncements + has_doctrine = tenet_legalism + } + } + + exists = cp:councillor_steward + cp:councillor_steward = { is_available_ai_adult = yes } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_ai_adult = yes } + + any_sub_realm_barony = { + fp2_struggle_2000_check_holds_city_scripted_trigger = yes + } + + any_pool_character = { + province = root.capital_province + has_no_particular_noble_roots_trigger = yes + is_available_healthy_ai_adult = yes + } + } + + immediate = { + random_sub_realm_barony = { + limit = { fp2_struggle_2000_check_holds_city_scripted_trigger = yes } + county = { save_scope_as = se_2000_county } + } + + cp:councillor_steward = { save_scope_as = 2000_scoped_steward } + cp:councillor_court_chaplain = { save_scope_as = 2000_scoped_chaplain } + + create_character = { + age = { 20 50 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + trait = just + trait = craven + trait = patient + trait = temperate + culture = root.culture + faith = root.faith + + dynasty = none + after_creation = { + add_gold = { minor_gold_value medium_gold_value } + add_prestige = { minor_prestige_gain medium_prestige_gain } + add_piety = { medium_piety_gain major_piety_gain } + } + + save_scope_as = fp2_2000_market_inspector + } + if = { # RoCo + limit = { + has_dlc_feature = royal_court + employs_court_position = chief_qadi_court_position + any_court_position_holder = { + type = chief_qadi_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = chief_qadi_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = fp2_2000_chief_qadi + } + } + } + + option = { # Mandatory lunatic option (now rakish) + name = fp2_struggle.2000.f + trigger = { has_trait = rakish } + stress_impact = { + chaste = major_stress_impact_gain + zealous = major_stress_impact_gain + } + + flavor = fp2_struggle.2000.f.desc + send_interface_toast = { + type = event_stewardship_good_with_text + title = fp2_struggle.2000.f.notif + desc = fp2_struggle.2000.f.notif.desc + + stress_impact = { chaste = medium_stress_impact_gain } + + scope:2000_scoped_chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -25 + } + } + + add_piety = major_piety_loss + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_free_market_boom_modifier + years = 5 + } + } + add_character_modifier = { + modifier = fp2_lenient_towards_foreign_merchants_modifier + years = 5 + } + } + + ai_chance = { + base = 15 + } + } + + option = { # Guards! Purge! + name = fp2_struggle.2000.e + + trigger = { + OR = { + has_trait = reaver + has_trait = order_member + has_trait = aggressive_attacker + } + } + stress_impact = { + just = major_stress_impact_gain + forgiving = major_stress_impact_gain + calm = minor_stress_impact_gain + trusting = medium_stress_impact_gain + } + + if = { + limit = { has_trait = sadistic } # Small detail + send_interface_toast = { + type = event_toast_effect_good + title = fp2_ruthless_market_oversight_modifier + left_icon = root + + add_dread = medium_dread_gain + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_ruthless_market_oversight_modifier + years = 5 + } + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_ruthless_market_oversight_modifier + left_icon = root + + add_dread = medium_dread_gain + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_ruthless_market_oversight_modifier + years = 5 + } + } + } + } + + ai_chance = { + base = 5 + modifier = { + add = 15 + OR = { + has_trait = sadistic + has_trait = zealous + has_trait = wrathful + } + } + modifier = { + add = -40 + has_trait = compassionate + } + } + } + + option = { # Intervene with threat of calling judge + name = fp2_struggle.2000.a + flavor = fp2_struggle.2000.a.desc + + duel = { + skill = diplomacy + value = medium_skill_rating + + 30 = { + desc = fp2_struggle.2000.a.a + + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + modifier = { + add = 5 + has_trait = fickle + } + modifier = { + add = 20 + has_trait = craven + } + modifier = { + add = 3 + has_trait = lazy + } + modifier = { + add = 3 + has_trait = arbitrary + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2000.a.a.notif + + if = { # RoCo + limit = { + exists = scope:fp2_2000_chief_qadi + } + reverse_add_opinion = { + target = scope:fp2_2000_chief_qadi + modifier = respect_opinion + opinion = 15 + } + } + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_inefficient_market_oversight_modifier + years = 5 + } + } + } + } + 70 = { + desc = fp2_struggle.2000.a.b + + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + add = 5 + has_trait = humble + } + modifier = { + add = 5 + has_trait = ambitious + } + modifier = { + add = 10 + has_trait = gregarious + } + modifier = { + add = 15 + has_trait = just + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2000.a.b.notif + left_icon = scope:2000_scoped_steward + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_smooth_market_oversight_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 60 + modifier = { + add = 25 + has_trait = just + } + modifier = { + add = -25 + has_trait = arbitrary + } + modifier = { + add = -15 + has_trait = lazy + } + modifier = { + add = -5 + has_trait = arrogant + } + } + } + + option = { # Let the free market decide, free from tradition + name = fp2_struggle.2000.d + flavor = fp2_struggle.2000.d.desc + + stress_impact = { + zealous = major_stress_impact_gain + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + just = minor_stress_impact_gain + temperate = medium_stress_impact_gain + } + + reverse_add_opinion = { + target = scope:2000_scoped_chaplain + modifier = impious_opinion + opinion = -30 + } + reverse_add_opinion = { + target = scope:2000_scoped_steward + modifier = respect_opinion + opinion = 15 + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_free_market_boom_modifier + left_icon = scope:2000_scoped_steward + + add_piety = medium_piety_loss + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_free_market_boom_modifier + years = 6 + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 15 + has_trait = greedy + } + modifier = { + add = -40 + has_trait = zealous + } + } + } + + option = { # Reprimand the inspector + name = fp2_struggle.2000.b + flavor = fp2_struggle.2000.b.desc + + stress_impact = { compassionate = medium_stress_impact_gain } + add_dread = miniscule_dread_gain + + send_interface_toast = { + type = event_stewardship_good_with_text + title = fp2_struggle.2000.b.notif + desc = fp2_struggle.2000.b.notif.desc + + scope:se_2000_county = { + add_county_modifier = { + modifier = fp2_smooth_market_oversight_modifier + years = 5 + } + } + + scope:2000_scoped_chaplain = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -15 + } + } + } + + ai_chance = { + base = 34 + modifier = { + add = 15 + OR = { + has_trait = sadistic + has_trait = callous + } + } + modifier = { + add = 5 + has_trait = impatient + } + modifier = { + add = 3 + has_trait = diligent + } + modifier = { + add = -25 + has_trait = compassionate + } + modifier = { + add = -15 + OR = { + has_trait = trusting + has_trait = calm + has_trait = forgiving + } + } + modifier = { + add = -5 + has_trait = humble + } + } + } + + after = { scope:fp2_2000_market_inspector = { silent_disappearance_effect = yes } } +} + +################################### +# Desperate Villagers Seek New Lord +# By Hugo Cortell +################################### +scripted_trigger fp2_struggle_2001_desperate_county_scripted_trigger = { + NOT = { root = { has_claim_on = prev } } + trigger_if = { # Checking that we are not offering up the capital of a duke or higher + limit = { + holder = { + highest_held_title_tier >= tier_duchy + } + } + this != holder.capital_county + } + + holder = { # Balance, malus must not affect players + is_ai = yes + top_liege = { is_ai = yes } + } + + OR = { + county_opinion < 0 + county_control < 81 # Note: if considered too restrictive for normal play, update to != 100 + } + + squared_distance = { + target = root.capital_province + value < squared_distance_medium + } +} + +fp2_struggle.2001 = { + type = character_event + title = fp2_struggle.2001.t + desc = { + desc = fp2_struggle.2001.desc + triggered_desc = { + trigger = { + is_allied_to = scope:fp2_2001_desperate_county.holder + } + desc = fp2_struggle.2001.desc.extra.a + } + triggered_desc = { + trigger = { + has_truce = scope:fp2_2001_desperate_county.holder + } + desc = fp2_struggle.2001.desc.extra.b + } + } + + theme = vassal + cooldown = { years = 20 } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_2001_desperate_elder + animation = beg + } + lower_right_portrait = scope:fp2_2001_desperate_county.holder.top_liege + + trigger = { + has_fp2_dlc_trigger = yes + struggle:iberian_struggle = { + is_struggle_phase = struggle_iberia_phase_hostility + + } + + any_neighboring_and_across_water_top_liege_realm_owner = { + fp2_character_involved_in_struggle_trigger = yes + any_sub_realm_county = { + fp2_struggle_2001_desperate_county_scripted_trigger = yes + } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = 2001_scoped_chaplain } + } + + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + fp2_character_involved_in_struggle_trigger = yes + any_sub_realm_county = { fp2_struggle_2001_desperate_county_scripted_trigger = yes } + } + random_sub_realm_county = { + limit = { fp2_struggle_2001_desperate_county_scripted_trigger = yes } + save_scope_as = fp2_2001_desperate_county + } + } + + create_character = { + age = { 38 71 } + location = scope:fp2_2001_desperate_county.title_province + gender_female_chance = root_faith_dominant_gender_female_chance + trait = peasant_leader + random_traits = yes + culture = scope:fp2_2001_desperate_county.culture + random_faith = { + root.faith = { trigger = { always = yes } } + scope:fp2_2001_desperate_county.faith = { trigger = { always = yes } } + } + dynasty = none + after_creation = { add_gold = medium_gold_value } + + save_scope_as = fp2_2001_desperate_elder + } + + # AI war-savviness calc variables + scope:fp2_2001_desperate_county.holder.top_liege = { save_temporary_scope_as = target_military } + set_variable = { + name = ai_strength_multiplier # This is how much stronger root has to be (could even be used for custom loc! but the script is complex enough as it is) + value = 1.25 + } + if = { # Calculate if AI can win war, decision of war requires traits AND for it to be favourable. This calcs if it is favourable + limit = { + is_ai = yes # Are you AI? + scope:fp2_2001_desperate_county.holder.top_liege = { + NOT = { + is_at_war_with = root + is_ai = no # Enemy must be AI (prevents AI from attacking player characters, otherwise it would feel as if the attack was random) + } + } + + # Actual strength is calc below, thanks to joe + root_military_strength_higher_than_military_target_value > target_military_strength_root_value + } + save_scope_as = fp2_se_2001_ai_war_winnable # Acts as boolean for wether or not the AI has a chance at winning + } + remove_variable = ai_strength_multiplier + + # Option exclusivity stuffs, easier to keep track of logic + if = { # Faith + limit = { + OR = { + has_trait = holy_warrior + has_trait = devoted + has_trait = heresiarch + has_trait = order_member + has_trait = crusader_king + has_trait = faith_warrior + } + NOT = { + faith = scope:fp2_2001_desperate_elder.faith + has_trait = excommunicated + } + } + save_scope_as = fp2_2001_exclusive_option_faith + } + else_if = { # Greedy + limit = { + OR = { + has_trait = greedy + has_trait = avaricious + has_trait = logistician + } + } + save_scope_as = fp2_2001_exclusive_option_greed + } + } + + option = { # Pay tribute to me + name = fp2_struggle.2001.d + custom_tooltip = fp2_struggle.2001.a.desc + + trigger = { + exists = scope:fp2_2001_exclusive_option_greed + NOT = { exists = scope:fp2_2001_exclusive_option_faith } + + OR = { # Tricks autoformatter into showing trait icons (wasteful) + has_trait = greedy + has_trait = avaricious + has_trait = logistician + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + save_scope_value_as = { + name = fp2_se_2001_eventchoiceramifications + value = flag:demand_tribute + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2001.a.notif + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_unpressed_claim = scope:fp2_2001_desperate_county + } + + send_interface_toast = { + type = event_stewardship_good_with_text + title = fp2_struggle.2001.d.notif + desc = fp2_struggle.2001.d.notif.desc + left_icon = scope:fp2_2001_desperate_elder + + scope:fp2_2001_desperate_elder = { + pay_treasury_or_gold = { + target = root + value = medium_treasury_or_gold_value + } + } + } + + if = { + limit = { exists = cp:councillor_steward } + cp:councillor_steward = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + + hidden_effect = { + trigger_event = { + id = fp2_struggle.2002 + years = 5 + } + } + add_character_modifier = { + modifier = fp2_2001_promise_reminder + years = 5 + } + + ai_chance = { + base = 0 + modifier = { + add = 10 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = brave + } + modifier = { + add = 5 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = compassionate + } + modifier = { + add = 40 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = greedy + } + } + } + + option = { # Are you willing to give up your god for it? + trigger = { + exists = scope:fp2_2001_exclusive_option_faith + + OR = { + has_trait = holy_warrior # Tricking the autoformatter into showing relevant trait + has_trait = devoted + has_trait = heresiarch + has_trait = order_member + has_trait = crusader_king + has_trait = faith_warrior + } + } + name = fp2_struggle.2001.b + + custom_tooltip = fp2_struggle.2001.a.desc + if = { + limit = { exists = scope:2001_scoped_chaplain } + custom_tooltip = fp2_struggle.2001.a.a.desc + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2001.a.notif + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_unpressed_claim = scope:fp2_2001_desperate_county + } + + send_interface_toast = { + type = event_stewardship_good_with_text + title = fp2_struggle.2001.b.notif + desc = fp2_struggle.2001.b.notif.desc + left_icon = scope:fp2_2001_desperate_elder + + if = { + limit = { exists = scope:2001_scoped_chaplain } + scope:2001_scoped_chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 40 + } + } + save_scope_value_as = { + name = fp2_se_2001_eventchoiceramifications + value = flag:demand_conversion_chap # yes + } + } + else = { + save_scope_value_as = { + name = fp2_se_2001_eventchoiceramifications + value = flag:demand_conversion_no_chap # no + } + } + } + + every_powerful_vassal = { + limit = { faith = root.faith } + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + + scope:fp2_2001_desperate_county = { set_county_faith = root.faith } + + hidden_effect = { + scope:fp2_2001_desperate_elder = { set_character_faith_with_conversion = root.faith } + trigger_event = { + id = fp2_struggle.2002 + years = 5 + } + } + add_character_modifier = { + modifier = fp2_2001_promise_reminder + years = 5 + } + + ai_chance = { + base = 0 + modifier = { + add = 15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = brave + } + modifier = { + add = 5 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = just + } + modifier = { + add = 50 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = zealous + } + modifier = { + add = -5 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = lazy + } + } + } + + option = { # You have my word + name = fp2_struggle.2001.a + custom_tooltip = fp2_struggle.2001.b.desc # Three extra years for not attaching any strings + + stress_impact = { + craven = minor_stress_impact_gain + shy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + arrogant = major_stress_impact_gain + } + if = { + limit = { + exists = scope:fp2_2001_exclusive_option_greed + NOT = { exists = scope:fp2_2001_exclusive_option_faith } + } + stress_impact = { + greedy = medium_stress_impact_gain + avaricious = minor_stress_impact_gain + } + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2001.a.notif + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_unpressed_claim = scope:fp2_2001_desperate_county + } + + every_powerful_vassal = { + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + + hidden_effect = { + trigger_event = { + id = fp2_struggle.2002 + years = 10 + } + } + add_character_modifier = { + modifier = fp2_2001_promise_reminder + years = 10 + } + + ai_chance = { + base = 0 + modifier = { + add = 25 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = brave + } + modifier = { + add = 15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = just + } + modifier = { + add = 15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = compassionate + } + modifier = { + add = -35 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = arrogant + } + modifier = { + add = -15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = lazy + } + } + } + + option = { # Prove it to me, point your spears at your liege (rise up) + name = fp2_struggle.2001.c + custom_tooltip = fp2_struggle.2001.a.desc + + trigger = { + scope:fp2_2001_desperate_county = { + can_title_create_faction = { + type = peasant_faction + target = scope:fp2_2001_desperate_county.holder + } + } + + NOT = { + exists = scope:fp2_2001_exclusive_option_greed + exists = scope:fp2_2001_exclusive_option_faith + } + } + + stress_impact = { + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + } + + save_scope_value_as = { + name = fp2_se_2001_eventchoiceramifications + value = flag:peasant_revolt + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2001.a.notif + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_unpressed_claim = scope:fp2_2001_desperate_county + } + + every_powerful_vassal = { + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + + scope:fp2_2001_desperate_county = { # Create faction + title_create_faction = { + type = peasant_faction + target = scope:fp2_2001_desperate_county.holder + } + holder = { + every_targeting_faction = { # go through all existing factions + if = { + limit = { + any_faction_county_member = { this = scope:fp2_2001_desperate_county } # check if least one member belongs to the county + } + save_scope_as = fp2_se_2001_peasant_faction + } + } + } + } + + hidden_effect = { + trigger_event = { + id = fp2_struggle.2002 + years = 5 + } + } + add_character_modifier = { + modifier = fp2_2001_promise_reminder + years = 5 + } + + ai_chance = { + base = 0 + modifier = { + add = 15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = brave + } + modifier = { + add = 25 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = ambitious + } + modifier = { + add = 10 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = just + } + modifier = { + add = -15 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = arrogant + } + modifier = { + add = -5 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = lazy + } + } + } + + option = { # Betray and inform ruler of treachery + name = fp2_struggle.2001.f + + stress_impact = { + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + + scope:fp2_2001_desperate_elder = { + death = { + death_reason = death_execution + killer = root + } + } + + if = { + limit = { is_allied_to = scope:fp2_2001_desperate_county.holder } # You stood by your allies + every_powerful_vassal = { + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + + if = { + limit = { NOT = { has_trait = arrogant } } + scope:fp2_2001_desperate_county.holder = { + progress_towards_friend_effect = { + REASON = friend_informed_ally_of_betrayal + CHARACTER = root + OPINION = 0 + } + + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 25 + } + } + } + } + else = { + every_powerful_vassal = { # Your vassals question your integrity + custom = fp2_every_major_vassal_notifier + limit = { + NOR = { + has_trait = arbitrary + has_trait = sadistic + has_trait = arrogant + } + } + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -10 + } + } + + scope:fp2_2001_desperate_county.holder = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 40 + } + progress_towards_friend_effect = { + REASON = friend_informed_ally_of_betrayal + CHARACTER = root + OPINION = 0 + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 5 + has_trait = deceitful + is_allied_to = scope:fp2_2001_desperate_county.holder + } + + modifier = { + add = -25 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = brave + } + modifier = { + add = -15 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = just + } + modifier = { + add = -25 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = compassionate + } + modifier = { + add = 35 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = arrogant + } + modifier = { + add = 10 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = sadistic + } + modifier = { + add = 15 + NOT = { is_allied_to = scope:fp2_2001_desperate_county.holder } + has_trait = deceitful + } + } + } + + option = { # Dismiss + name = fp2_struggle.2001.e + custom_tooltip = fp2_struggle.2001.e.desc + stress_impact = { compassionate = minor_stress_impact_gain } + + scope:fp2_2001_desperate_county.holder.top_liege.capital_province.county = { + if = { + limit = { root = { is_allied_to = scope:fp2_2001_desperate_county.holder } } + hidden_effect = { # Hides effect if allied + add_county_modifier = { + modifier = fp2_forsaken_turned_levies_modifier + years = 6 + } + } + } + else = { + add_county_modifier = { + modifier = fp2_forsaken_turned_levies_modifier + years = 5 + } + } + } + + save_scope_as = did_not_call_next_event + + ai_chance = { + base = 100 + modifier = { + add = 25 + exists = scope:fp2_se_2001_ai_war_winnable + has_trait = craven + } + modifier = { + add = -45 + exists = scope:fp2_se_2001_ai_war_winnable + } + } + } + + after = { + if = { + limit = { exists = scope:fp2_se_2001_peasant_faction } + scope:fp2_2001_desperate_elder = { save_scope_as = peasant_leader } + scope:fp2_2001_desperate_county = { save_scope_as = peasant_county } + scope:fp2_se_2001_peasant_faction = { + + setup_peasant_leader_effect = yes + + faction_start_war = {} + faction_spawn_member_county_armies_effect = { + FACTION = scope:fp2_se_2001_peasant_faction + ARMY_OWNER = scope:fp2_2001_desperate_elder + PEASANT_ARMY_NAME = peasant_faction_event_troops + } + } + } + + if = { + limit = { + exists = scope:did_not_call_next_event + scope:fp2_2001_desperate_elder = { is_alive = yes } + } + scope:fp2_2001_desperate_elder = { + silent_disappearance_effect = yes + } + } + } +} + +# QUEST FUNCTION, check if player managed to complete objective +fp2_struggle.2002 = { + hidden = yes + + immediate = { # VICTORY STATE BELOW + if = { + limit = { scope:fp2_2001_desperate_county.holder.top_liege = root.top_liege } # check if lands belong to your state/kingdom/side + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2002.t.a + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + + if = { + limit = { exists = scope:fp2_se_2001_eventchoiceramifications } + if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_conversion_chap } # You keet your promise to god + add_piety = major_piety_gain + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_conversion_no_chap } # Without a chap, this is more impressive but less pious + add_piety = medium_piety_gain + add_prestige = medium_prestige_gain + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:peasant_revolt } # You lead peasants into battle and won + add_prestige = minor_prestige_gain + } + else = { + debug_log = "Scope fp2_se_2001_eventchoiceramifications exists but has not been assigned a valid value!" + debug_log_scopes = yes + } + } + + scope:fp2_2001_desperate_county = { + add_county_modifier = { + modifier = county_listened_to_locals_modifier + years = 12 + } + change_county_control = major_county_control_gain + } + } + } + else = { # FAILURE STATE BELOW + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2002.t.b + left_icon = root + right_icon = scope:fp2_2001_desperate_elder + + add_prestige = minor_prestige_loss + + if = { + limit = { exists = scope:fp2_se_2001_eventchoiceramifications } + if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_conversion_chap } # You failed to keep your promise to god + add_piety = medium_piety_loss + scope:2001_scoped_chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -40 + } + } + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_conversion_no_chap } # Without a chap, this is more impressive but less pious + add_piety = minor_piety_loss + add_prestige = minor_prestige_loss + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:demand_tribute } # Being a weasel makes you look petty + add_prestige = medium_prestige_loss + } + else_if = { + limit = { scope:fp2_se_2001_eventchoiceramifications = flag:peasant_revolt } # You took their lives in exchange for freedom, yet returned nothing + add_piety = minor_piety_loss + add_prestige = major_prestige_loss + show_as_tooltip = { + scope:fp2_2001_desperate_county = { # This will happen anyways, but showing it creates more impact + holder = { + top_liege.capital_province.county = { + add_county_modifier = { + modifier = fp2_forsaken_turned_levies_modifier + years = 8 + } + } + } + } + } + } + else = { + debug_log = "Scope fp2_se_2001_eventchoiceramifications exists but has not been assigned a valid value!" + debug_log_scopes = yes + } + } + + every_powerful_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + hidden_effect = { + scope:fp2_2001_desperate_county = { + change_county_control = medium_county_control_gain + holder = { + top_liege.capital_province.county = { + add_county_modifier = { + modifier = fp2_forsaken_turned_levies_modifier + years = 8 + } + } + } + } + } + } + } + + scope:fp2_2001_desperate_elder = { + silent_disappearance_effect = yes + } + } +} + +################################### +# Lost Migratory Birds +# By Hugo Cortell +################################### +scripted_trigger fp2_struggle_2003_check_has_city_scripted_trigger = { + title_province = { has_holding_type = city_holding } + exists = holder +} + +fp2_struggle.2003 = { + type = character_event + title = fp2_struggle.2003.t + desc = fp2_struggle.2003.desc + theme = stewardship + override_background = { reference = army_camp } + cooldown = { years = 50 } + left_portrait = root + right_portrait = { + character = scope:fp2_2003_merc_actor + animation = loss_1 # Note: two_handed_1_aggressive could also be used + } + + trigger = { + has_fp2_dlc_trigger = yes + struggle:iberian_struggle ?= { + OR = { + is_struggle_phase = struggle_iberia_phase_opportunity + is_struggle_phase = struggle_iberia_phase_hostility + } + } + + any_sub_realm_barony = { fp2_struggle_2003_check_has_city_scripted_trigger = yes } + } + + immediate = { + random_sub_realm_barony = { + limit = { fp2_struggle_2003_check_has_city_scripted_trigger = yes } + county = { save_scope_as = fp2_2003_county_town } + } + + create_character = { + age = { 20 50 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + trait = wrathful + trait = greedy + trait = impatient + trait = callous + trait = wounded_2 + culture = root.culture + faith = root.faith + + dynasty = none + after_creation = { + add_gold = { 0 minor_gold_value } + add_prestige = { minor_prestige_loss minor_prestige_gain } + add_piety = { medium_piety_loss minor_piety_gain } + add_character_flag = single_combat_duel_armor + } + + save_scope_as = fp2_2003_merc_actor + } + } + + option = { # Give them farming work + name = fp2_struggle.2003.d + flavor = fp2_struggle.2003.d.desc + + trigger = { + OR= { + has_trait = lunatic_genetic + has_trait = logistician + has_trait = comfort_eater + has_trait = improvident + stewardship > extremely_high_skill_rating + } + gold > medium_gold_value # Locals need to be paid in advance + } + stress_impact = { greedy = major_stress_impact_gain } + + send_interface_toast = { + title = fp2_struggle.2003.e.notif.c + desc = fp2_struggle.2003.e.notif.c.desc + + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_mercs_turned_farmers_modifier + years = 20 + } + holder = { + add_character_modifier = { + modifier = fp2_mercenary_acquaintances_modifier + years = 8 # Bonus effect + } + } + } + } + + ai_chance = { + base = 30 + modifier = { + add = 1000 + has_trait = possessed_genetic + } + } + } + + option = { # Offer them a stable job + name = fp2_struggle.2003.b + flavor = fp2_struggle.2003.b.desc + + trigger = { # Locks the lunatic option (remove this trigger if you want more than 4 options) + OR = { + NOR= { + has_trait = lunatic_genetic + has_trait = logistician + has_trait = comfort_eater + has_trait = improvident + stewardship > extremely_high_skill_rating + } + gold < medium_gold_value # Peasants might need to be paid real gold, but mercs do not mind working on debt money + } + } + + stress_impact = { greedy = minor_stress_impact_gain } + + remove_treasury_or_gold = medium_treasury_or_gold_value + send_interface_toast = { + type = event_toast_effect_good + title = fp2_veteran_mercenaries_as_instructors_modifier + left_icon = root + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_veteran_mercenaries_as_instructors_modifier + years = 12 + } + hidden_effect = { + holder = { + add_character_modifier = { + modifier = fp2_mercenary_acquaintances_modifier + years = 12 + } + } + } + } + } + + show_as_tooltip = { + scope:fp2_2003_county_town = { + holder = { + add_character_modifier = { + modifier = fp2_mercenary_acquaintances_modifier + years = 12 + } + } + } + } + + ai_chance = { + base = 25 + modifier = { + add = 5 + has_trait = ambitious + } + modifier = { + add = 5 + has_trait = generous + } + modifier = { + add = -50 + has_trait = greedy + } + } + } + + option = { # Implore them to leave + name = fp2_struggle.2003.a + stress_impact = { shy = minor_stress_impact_gain } + + trigger = { + NOT = { has_trait = lunatic_genetic } # Cuts down the options to four in case of lunacy event, lunatics do not negotiate. + } + + duel = { + skill = diplomacy + value = high_skill_rating + + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + modifier = { + add = 5 + has_trait = fickle + } + modifier = { + add = 20 + has_trait = craven + } + modifier = { + add = 15 + has_trait = lazy + } + modifier = { + add = 10 + has_trait = wrathful + } + modifier = { + add = 10 + has_trait = shy + } + modifier = { + add = 2 + has_trait = trusting + } + modifier = { + add = 3 + has_trait = stubborn + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2003.a.a.notif + left_icon = root + + add_prestige = medium_prestige_loss + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + } + } + 12 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + + modifier = { + add = 5 + has_trait = calm + } + modifier = { + add = 5 + has_trait = vengeful + } + modifier = { + add = 5 + has_trait = honest + } + modifier = { + add = 10 + has_trait = gregarious + } + modifier = { + add = 15 + has_trait = just + } + modifier = { + add = 15 + has_trait = brave + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2003.a.b.notif + left_icon = root + + add_prestige = medium_prestige_gain + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = county_listened_to_locals_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 60 + modifier = { + add = 5 + has_trait = just + } + modifier = { + add = 25 + has_trait = gregarious + } + modifier = { + add = -5 + has_trait = arrogant + } + } + } + + option = { # Preemptive strike + name = fp2_struggle.2003.c + flavor = fp2_struggle.2003.c.desc + + stress_impact = { trusting = minor_stress_impact_gain } # Craven do not suffer a penalty, because they only plan the fight, not partake in it + + duel = { + skill = martial + value = high_skill_rating + + 10 = { + desc = fp2_struggle.2003.c.a + + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + + modifier = { # Relevant skills are those that could be used in urban warfare + add = 5 + has_trait = fickle + } + modifier = { + add = 1 + has_trait = just + } + modifier = { + add = 1 + has_trait = arrogant + } + modifier = { + add = 3 + has_trait = wrathful + } + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 3 + has_trait = lazy + } + + modifier = { + add = 5 + has_trait = open_terrain_expert + } + modifier = { + add = 2 + has_trait = reckless + } + modifier = { # "what does an INN even look like anyway?" + add = 3 + has_trait = reclusive + } + + show_as_tooltip = { + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_local_garrison_slaughtered_modifier + years = 5 + } + add_county_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + } + + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_local_garrison_slaughtered_modifier + left_icon = root + + scope:fp2_2003_county_town = { # Failure outcome + add_county_modifier = { + modifier = fp2_local_garrison_slaughtered_modifier + years = 5 + } + hidden_effect = { + add_county_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + } + } + } + } + 10 = { + desc = fp2_struggle.2003.c.b + + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + + modifier = { + add = 5 + has_trait = calm + } + modifier = { + add = 5 + has_trait = diligent + } + modifier = { + add = 3 + has_trait = callous + } + + modifier = { + add = 7 + OR = { + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + modifier = { + add = -15 + OR = { + has_trait = intellect_bad_1 + has_trait = intellect_bad_2 + } + } + modifier = { + add = -25 + OR = { + has_trait = intellect_bad_3 + has_trait = dull + } + } + modifier = { + add = 10 + has_trait = shrewd + } + + + modifier = { + add = 20 + has_trait = strategist + } + modifier = { # If you know how buildings are structured, you can raid them better + add = 5 + has_trait = architect + } + modifier = { + add = 5 + has_trait = flexible_leader + } + modifier = { + add = 15 + has_trait = organizer + } + modifier = { + add = 3 + has_trait = cautious_leader + } + + add_gold = minor_gold_value + add_prestige = medium_prestige_gain + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2003.c.b.notif + left_icon = root + + scope:fp2_2003_county_town = { # Success + add_county_modifier = { + modifier = fp2_elite_tactics_for_civil_guards_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 15 + modifier = { + add = 5 + has_trait = brave + } + modifier = { + add = 15 + has_trait = wrathful + } + modifier = { + add = 5 + has_trait = deceitful + } + modifier = { + add = -25 + has_trait = trusting + } + modifier = { + add = -10 + has_trait = craven + } + } + } + + option = { # Let the local handle it + name = fp2_struggle.2003.e + flavor = fp2_struggle.2003.e.desc + + stress_impact = { + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + random_list = { + 50 = { # Looted + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2003.e.notif.a + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = recently_looted_modifier + years = 5 + } + } + } + } + 25 = { # Massacre + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2003.e.notif.b + desc = fp2_struggle.2003.e.notif.b.desc + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_mercs_slaughtered_populance_modifier + years = 5 + } + } + } + } + 25 = { # Farming outcome + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2003.e.notif.c + desc = fp2_struggle.2003.e.notif.c.desc + + scope:fp2_2003_county_town = { + add_county_modifier = { + modifier = fp2_mercs_turned_farmers_modifier + years = 15 + } + } + } + } + } + } + + after = { + scope:fp2_2003_merc_actor = { silent_disappearance_effect = yes } + } +} + +################################### +# Ship building event +# By Hugo Cortell +################################### +fp2_struggle.2004 = { + type = character_event + title = fp2_struggle.2004.t + desc = fp2_struggle.2004.desc + + theme = crown + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = cp:councillor_steward + animation = personality_content + } + lower_right_portrait = { character = cp:councillor_marshal } + cooldown = { years = 150 } + + trigger = { + has_fp2_dlc_trigger = yes + current_year > 1025 + top_liege = root + + realm_size >= minor_realm_size + + exists = cp:councillor_marshal + cp:councillor_marshal = { is_available_ai_adult = yes } + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + NOT = { has_character_flag = fp2_2004_critical_success_achieved } + } + + any_sub_realm_county = { + is_coastal_county = yes + NOT = { has_county_modifier = fp2_successful_shipyards_modifier } + } + } + + weight_multiplier = { + modifier = { + add = 5 + current_year > 1066 + } + modifier = { + add = 25 + current_year > 1450 # Caravel time + } + modifier = { + add = 25 + current_year > 1550 + } + } + immediate = { + cp:councillor_marshal = { save_scope_as = 2004_scoped_marshal } + cp:councillor_steward = { + save_scope_as = 2004_scoped_steward + if = { + limit = { has_character_flag = fp2_2004_critical_success_achieved } + remove_character_flag = fp2_2004_critical_success_achieved # For debug + } + } + + random_sub_realm_county = { + limit = { is_coastal_county = yes } + save_scope_as = fp2_2004_dockyards + } + } + option = { # WE WILL BUILD BOATS OF PURE SILVER (MR addition) + name = fp2_struggle.2004.c + flavor = fp2_struggle.2004.c.desc + + remove_treasury_or_gold = major_treasury_or_gold_value + scope:2004_scoped_steward = { + add_opinion = { + target = root + modifier = dismissive_opinion + opinion = -15 + } + } + scope:2004_scoped_marshal = { + add_opinion = { + target = root + modifier = dismissive_opinion + opinion = -20 + } + } + + scope:2004_scoped_steward = { + duel = { + skill = learning + value = high_skill_rating + + 25 = { # Failure Outcome + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -24 + } + modifier = { # Someone is sneaking in iron powder to cheap out! + add = 5 + has_trait = avaricious + } + + custom_tooltip = fp2_struggle.2005.desc.alt.a + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 20 + } + } + } + 5 = { # Success Outcome + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -4 + } + modifier = { + add = 5 + has_trait = calm + } + modifier = { + add = 15 + has_trait = diligent + } + modifier = { + add = 2 + has_trait = ambitious + } + modifier = { + add = 3 + has_trait = patient + } + modifier = { + add = 25 + has_trait = shrewd + } + modifier = { + add = 10 + has_trait = overseer + } + modifier = { + add = 8 + has_trait = strategist + } + modifier = { + add = 15 + has_trait = architect + } + modifier = { + add = 10 + has_trait = scholar + } + modifier = { + add = 15 + has_trait = military_engineer + } + modifier = { + add = 3 + has_trait = logistician + } + modifier = { + add = 6 + has_trait = journaller + } + modifier = { # Building a ship of silver means you must know your construction material + add = 5 + has_trait = education_stewardship_1 # You sorta know how silver operates + } + modifier = { + add = 8 + has_trait = education_stewardship_2 # You understand the properties of silver + } + modifier = { + add = 10 + has_trait = education_stewardship_3 # You can bite silver and tell if it is real or not (others can only do it with gold) + } + modifier = { + add = 15 + has_trait = education_stewardship_4 # Your tounge is capable of taking appart the anatomical structure of the silver thanks to your PhD in home economics + } + modifier = { + add = 20 + has_trait = education_stewardship_5 # Like the above, except cooler, and my script comment has better spelling + } + + root = { save_scope_as = fp2_2004_silver_boat_floats } + show_as_tooltip = { + root = { add_prestige = major_prestige_gain } + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 45 + } + } + } + } + } + } + save_scope_as = fp2_2004_alt_option + if = { + limit = { is_developer_testing_trigger = yes } + custom_tooltip = debug_generic_option_shortened_trigger_can_disable + trigger_event = { + id = fp2_struggle.2005 + days = 2 + } + } + else = { + trigger_event = { + id = fp2_struggle.2005 + years = { 4 10 } + } + } + } + + option = { # I will sponsor your endeavour - Side with Steward + name = fp2_struggle.2004.a + + remove_treasury_or_gold = major_treasury_or_gold_value + + scope:2004_scoped_steward = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 35 + } + } + scope:2004_scoped_marshal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + + scope:2004_scoped_steward = { + duel = { + desc = outcome_in_a_few_years + skill = learning + value = high_skill_rating + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + desc = fp2_struggle.2004.a.a.desc + + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 10 + has_trait = fickle + } + modifier = { + add = 5 + has_trait = stubborn + } + modifier = { + add = 2 + has_trait = gregarious + } + modifier = { + add = 30 + has_trait = dull + } + modifier = { + add = 5 + has_trait = drunkard + } + modifier = { + add = 7 + has_trait = irritable + } + modifier = { + add = 3 + has_trait = rakish + } + modifier = { + add = 10 + has_trait = profligate + } + + show_as_tooltip = { + root = { + add_character_modifier = { + modifier = fp2_advanced_maritime_technology_modifier + years = 50 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + desc = fp2_struggle.2004.a.b.desc + + modifier = { + add = 5 + has_trait = calm + } + modifier = { + add = 15 + has_trait = diligent + } + modifier = { + add = 2 + has_trait = ambitious + } + modifier = { + add = 3 + has_trait = patient + } + modifier = { + add = 25 + has_trait = shrewd + } + modifier = { + add = 10 + has_trait = overseer + } + modifier = { + add = 8 + has_trait = strategist + } + modifier = { + add = 15 + has_trait = architect + } + modifier = { + add = 10 + has_trait = scholar + } + modifier = { + add = 15 + has_trait = military_engineer + } + modifier = { + add = 3 + has_trait = logistician + } + modifier = { + add = 6 + has_trait = journaller + } + + add_character_flag = fp2_2004_critical_success_achieved + show_as_tooltip = { + root = { + add_character_modifier = { + modifier = fp2_advanced_maritime_technology_modifier + years = 60 + } + } + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 60 + } + } + } + } + } + } + hidden_effect = { + if = { + limit = { is_developer_testing_trigger = yes } + custom_tooltip = debug_generic_option_shortened_trigger_can_disable + trigger_event = { + id = fp2_struggle.2005 + days = 2 + } + } + else = { + trigger_event = { + id = fp2_struggle.2005 + years = { 5 9 } + } + } + } + + ai_chance = { + base = 0 + modifier = { + add = 50 + treasury_or_gold > medium_treasury_or_gold_value + } + ai_value_modifier = { + ai_boldness = 0.2 + ai_greed = -0.3 + ai_rationality = 0.2 + } + } + } + + option = { # No, it is a waste of money - Side with marshal + name = fp2_struggle.2004.b + flavor = fp2_struggle.2004.b.desc + + scope:2004_scoped_marshal = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + + scope:2004_scoped_steward = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + add_opinion = { + target = scope:2004_scoped_marshal + modifier = angry_opinion + opinion = -25 + } + } + + ai_chance = { base = 50 } + } +} + +fp2_struggle.2005 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fp2_2004_alt_option + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fp2_2004_silver_boat_floats + } + desc = fp2_struggle.2005.desc.alt.b + } + desc = fp2_struggle.2005.desc.alt.a + } + } + } + triggered_desc = { + trigger = { + scope:2004_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + desc = fp2_struggle.2005.t.alt + } + desc = fp2_struggle.2005.t + } + } + + immediate = { + if = { + limit = { root = root } # Check if scoped port town is still under your control + save_scope_as = port_under_control + } + + # MIA checks + if = { # Assign current steward + limit = { exists = cp:councillor_steward } + cp:councillor_steward = { save_scope_as = 2005_scoped_steward } + } + else_if = { # Otherwise assign chaplain + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = 2005_scoped_steward } + } + else = { # Fallback, get whoever is most qualified in court + random_courtier_or_guest = { + limit = { learning > high_skill_rating } + random = { + chance = 15 + add_character_flag = fp2_2004_critical_success_achieved + } + save_scope_as = 2005_scoped_steward + } + if = { + limit = { + NOT = { exists = scope:2005_scoped_steward } + } + random_courtier_or_guest = { save_scope_as = 2005_scoped_steward } + } + } + + if = { + limit = { + scope:2004_scoped_steward != scope:2005_scoped_steward + OR = { + scope:2005_scoped_steward = cp:councillor_steward + scope:2005_scoped_steward = cp:councillor_court_chaplain + } + } + if = { + limit = { learning > high_skill_rating } + random = { + chance = 25 + add_character_flag = fp2_2004_critical_success_achieved + } + save_scope_as = 2005_scoped_steward + } + } + } + + desc = { + triggered_desc = { # Alt option + trigger = { exists = scope:fp2_2004_alt_option } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fp2_2004_silver_boat_floats + } + desc = fp2_struggle.2005.desc.alt.b.desc + } + desc = fp2_struggle.2005.desc.alt.a.desc + } + triggered_desc = { # Lost dockyards + trigger = { scope:fp2_2004_dockyards.holder.top_liege != root.top_liege } + desc = fp2_struggle.2005.desc.cirt.a.notif + } + } + } + triggered_desc = { + trigger = { NOT = { exists = scope:fp2_2004_alt_option } } + desc = { + triggered_desc = { # Crtitical success explanation + trigger = { + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + desc = fp2_struggle.2005.desc.cirt.notif + } + triggered_desc = { # Lost dockyards + trigger = { + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + scope:fp2_2004_dockyards.holder.top_liege != root.top_liege + } + desc = fp2_struggle.2005.desc.cirt.a.notif + } + + # Original (Steward) designer is MIA + triggered_desc = { + trigger = { + scope:2004_scoped_steward != scope:2005_scoped_steward + } + desc = fp2_struggle.2005.desc.newdesigner.notif + } + + triggered_desc = { # Intro (non-crit) + trigger = { + NOT = { scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } } + } + desc = fp2_struggle.2005.desc.intro + } + + # Describe bottom of the ship + random_valid = { + desc = fp2_struggle.2005.desc.bottom.a + desc = fp2_struggle.2005.desc.bottom.b + desc = fp2_struggle.2005.desc.bottom.c + desc = fp2_struggle.2005.desc.bottom.d + } + + # Describe main feature(s) + random_valid = { + desc = fp2_struggle.2005.desc.unique.a + desc = fp2_struggle.2005.desc.unique.b + desc = fp2_struggle.2005.desc.unique.c + desc = fp2_struggle.2005.desc.unique.d + desc = fp2_struggle.2005.desc.unique.e + } + + # Describe sails (updated to propulsion) + random_valid = { + desc = fp2_struggle.2005.desc.sails.a + desc = fp2_struggle.2005.desc.sails.b + desc = fp2_struggle.2005.desc.sails.c + desc = fp2_struggle.2005.desc.sails.d + } + + first_valid = { + triggered_desc = { + trigger = { scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } } + desc = fp2_struggle.2005.desc.outro.crit + } + desc = fp2_struggle.2005.desc.outro + } + } + } + } + + theme = martial + override_background = { reference = docks } + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:fp2_2004_alt_option + NOT = { exists = scope:fp2_2004_silver_boat_floats } + } + animation = anger + } + triggered_animation = { + trigger = { exists = scope:fp2_2004_alt_option } + animation = ecstasy + } + animation = war_over_win + } + right_portrait = { + character = scope:2005_scoped_steward + animation = throne_room_writer + } + + option = { # ALT Accept + trigger = { + exists = scope:fp2_2004_alt_option + exists = scope:fp2_2004_silver_boat_floats + } + name = fp2_struggle.2005.a + + add_prestige = major_prestige_gain + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 45 + } + } + } + + option = { # ALT Accept (Failure Version) + trigger = { + exists = scope:fp2_2004_alt_option + NOT = { exists = scope:fp2_2004_silver_boat_floats } + } + name = artifact.4050.a # Reusage of loc key + + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 20 + } + } + } + + option = { # Accept + trigger = { + NOT = { + exists = scope:fp2_2004_alt_option + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + } + name = fp2_struggle.2005.a + + add_character_modifier = { + modifier = fp2_advanced_maritime_technology_modifier + years = 50 + } + } + + option = { # Crit Accept + trigger = { + NOT = { exists = scope:fp2_2004_alt_option } + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2004_dockyards.holder.top_liege = top_liege } + desc = fp2_struggle.2005.a + } + desc = fp2_struggle.2005.a.a + } + } + } + + add_character_modifier = { + modifier = fp2_advanced_maritime_technology_modifier + years = 60 + } + scope:fp2_2004_dockyards = { + add_county_modifier = { + modifier = fp2_successful_shipyards_modifier + years = 60 + } + } + } + + after = { + if = { + limit = { + OR = { + scope:2004_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + scope:2005_scoped_steward = { has_character_flag = fp2_2004_critical_success_achieved } + } + } + scope:2004_scoped_steward = { remove_character_flag = fp2_2004_critical_success_achieved } + scope:2005_scoped_steward = { remove_character_flag = fp2_2004_critical_success_achieved } + } + } +} + +################################### +# The Borders of Faith +# By Hugo Cortell +################################### +scripted_trigger fp2_event2006_check_if_right_vassal_target = { + holder != root + holder = { + is_available_ai_adult = yes + faith = root.faith + NOT = { has_trait = cynical } + OR = { + any_secret = { type = secret_non_believer } + AND = { # Fallback, get non-devout follower + piety < 51 + NOT = { has_trait = zealous } + } + } + } +} + +fp2_struggle.2006 = { + type = character_event + title = fp2_struggle.2006.t + desc = fp2_struggle.2006.desc + cooldown = { years = 20 } + + theme = faith + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:fp2_2006_vassal_in_crisis + animation = stress + } + lower_left_portrait = { + trigger = { exists = scope:2006_scoped_chaplain } + character = scope:2006_scoped_chaplain + } + + trigger = { + has_fp2_dlc_trigger = yes + root.top_liege = root + any_sub_realm_county = { + fp2_event2006_check_if_right_vassal_target = yes + + holder = { + any_neighboring_top_liege_realm_owner = { + faith != root.faith + } + } + } + } + + immediate = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = 2006_scoped_chaplain } + } + random_sub_realm_county = { + limit = { fp2_event2006_check_if_right_vassal_target = yes } + holder = { + save_scope_as = fp2_2006_vassal_in_crisis + random_neighboring_top_liege_realm_owner = { + limit = { faith != root.faith } + faith = { save_scope_as = fp2_2006_foreign_faith } + } + } + } + } + + option = { # Im a witch! And you can be one too! + trigger = { + has_trait = witch + OR = { + NOT = { # Not witch + scope:fp2_2006_vassal_in_crisis = { + any_secret = { type = secret_witch } + } + } + scope:fp2_2006_vassal_in_crisis = { # Witch but does not walk the path of witchery with you + any_secret = { + type = secret_witch + NOT = { is_known_by = root } + } + } + } + } + name = fp2_struggle.2006.e + + if = { + limit = { + any_secret = { + type = secret_witch + } + } + random_secret = { + type = secret_witch + reveal_to = scope:fp2_2006_vassal_in_crisis + } + } + send_interface_toast = { + type = event_witchcraft_good + title = fp2_struggle.2006.e.notif.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + if = { + limit = { + any_secret = { type = secret_witch } + has_trait = witch + } + custom_tooltip = fp2_struggle.2006.e.alreadywitch + } + else = { + hidden_effect = { give_witch_secret_or_trait_effect = yes } + show_as_tooltip = { add_trait = witch } + } + show_as_tooltip = { + random_secret = { + type = secret_witch + reveal_to = root + } + } + if = { + limit = { can_set_relation_friend_trigger = { CHARACTER = root } } + set_relation_friend = { reason = friend_guided_right_path target = root } + } + add_opinion = { + target = root + modifier = fp2_tolerated_me_opinion + } + if = { + limit = { + trait_is_criminal_in_faith_trigger = { + 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 + GENDER_CHARACTER = scope:fp2_2006_vassal_in_crisis + FAITH = scope:fp2_2006_foreign_faith + } + } + } + hidden_effect = { set_character_faith_with_conversion = scope:fp2_2006_foreign_faith } + custom_tooltip = fp2_struggle.2006.e.tacticalwitchfaithchange + } + + hidden_effect = { + if = { + limit = { + any_secret = { + type = secret_witch + } + } + random_secret = { + type = secret_witch + reveal_to = root + } + } + root = { + random_secret = { + type = secret_witch + reveal_to = scope:fp2_2006_vassal_in_crisis + } + } + } + } + } + + ai_chance = { + base = 80 + ai_value_modifier = { + ai_honor = -0.3 + ai_rationality = 0.5 + ai_zeal = -0.9 + } + } + } + + option = { # (Threaten to) Denounce heretic + trigger = { + OR = { + has_trait = schemer + has_trait = devoted + intrigue > medium_skill_rating + } + } + name = fp2_struggle.2006.d + stress_impact = { + compassionate = medium_stress_impact_gain + gallant = medium_stress_impact_gain + } + + add_dread = miniscule_dread_gain + hidden_effect = { + scope:fp2_2006_vassal_in_crisis = { + if = { + limit = { any_secret = { NOT = { secret_type = secret_non_believer } } } + add_secret = { type = secret_non_believer } + } + } + } + + add_hook = { + target = scope:fp2_2006_vassal_in_crisis + type = threat_hook + } + random_secret = { + type = secret_non_believer + reveal_to = root + } + + scope:fp2_2006_vassal_in_crisis = { + add_opinion = { + target = root + modifier = betrayed_me_opinion + opinion = -40 + } + } + + ai_chance = { + base = 30 + ai_value_modifier = { + ai_compassion = -0.5 + ai_honor = -0.8 + ai_rationality = 0.1 + ai_zeal = 0.3 + ai_vengefulness = 0.3 + ai_greed = 0.2 + } + } + } + + option = { # I will fix him myself + name = fp2_struggle.2006.b + stress_impact = { + cynical = minor_stress_impact_gain + } + + duel = { + skill = learning + value = medium_skill_rating + + 15 = { + desc = fp2_struggle.2006.b.a.desc + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + modifier = { + add = 10 + has_trait = fickle + } + modifier = { + add = 10 + has_trait = heresiarch + } + modifier = { + add = 2 + has_trait = impotent + } + modifier = { + add = 5 + has_trait = irritable + } + modifier = { + add = 5 + has_trait = dull + } + modifier = { + add = 10 + has_trait = depressed_genetic + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 2 + has_trait = stubborn + } + modifier = { + add = 5 + has_trait = craven + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2006.generic.notif.a.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + hidden_effect = { set_character_faith_with_conversion = scope:fp2_2006_foreign_faith } + show_as_tooltip = { set_character_faith = scope:fp2_2006_foreign_faith } + + progress_towards_rival_effect = { + REASON = rival_fraternising_enemy + CHARACTER = root + OPINION = 0 + } + add_opinion = { + target = root + modifier = fp2_questioned_my_faith_opinion + } + } + } + } + 15 = { + desc = fp2_struggle.2006.b.b.desc + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + modifier = { + add = 10 + has_trait = calm + } + modifier = { + add = 10 + has_trait = humble + } + modifier = { + add = 3 + has_trait = forgiving + } + modifier = { + add = 5 + has_trait = honest + } + modifier = { + add = 10 + has_trait = humble + } + modifier = { + add = 3 + has_trait = patient + } + modifier = { + add = 20 + has_trait = zealous + } + modifier = { + add = 4 + has_trait = compassionate + } + modifier = { + add = 20 + has_trait = theologian # Could be it's own option, but I can't think of what argument could be used... + } + modifier = { + add = 10 + has_trait = devoted + } + modifier = { + add = 2 + has_trait = lifestyle_poet + } + modifier = { + add = 10 + has_trait = saint + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2006.generic.notif.b.t + left_icon = scope:fp2_2006_vassal_in_crisis + + add_piety = medium_piety_gain + progress_towards_friend_effect = { + REASON = friend_guided_right_path + CHARACTER = scope:fp2_2006_vassal_in_crisis + OPINION = 0 + } + if = { + limit = { + this != root + } + add_opinion = { + target = root + modifier = fp2_reassured_faith_opinion + } + } + } + } + } + + ai_chance = { + base = 45 + ai_value_modifier = { + ai_compassion = 0.2 + ai_sociability = 0.3 + ai_zeal = 0.2 + } + } + } + + option = { # One-on-One time + name = fp2_struggle.2006.c + flavor = fp2_struggle.2006.c.desc + + trigger = { + NAND = { + has_trait = witch + OR = { + has_trait = schemer + has_trait = devoted + intrigue > medium_skill_rating + } + } + } + stress_impact = { zealous = minor_stress_impact_gain } + + scope:fp2_2006_vassal_in_crisis = { + progress_towards_friend_effect = { + REASON = friend_religious_tolerance + CHARACTER = root + OPINION = 0 + } + add_opinion = { + target = root + modifier = fp2_tolerated_me_opinion + } + random = { + chance = 50 + hidden_effect = { set_character_faith_with_conversion = scope:fp2_2006_foreign_faith } + show_as_tooltip = { set_character_faith = scope:fp2_2006_foreign_faith } + } + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_compassion = 0.1 + ai_rationality = 0.6 + ai_zeal = -0.7 + } + } + } + + option = { # Someone call a priest! + name = fp2_struggle.2006.a + flavor = fp2_struggle.2006.a.desc + show_as_unavailable = { NOT = { exists = scope:2006_scoped_chaplain } } # Replaces trigger, teases player to possibility. + stress_impact = { + honest = medium_stress_impact_gain + humble = minor_stress_impact_gain + trusting = medium_stress_impact_gain + } + + scope:fp2_2006_vassal_in_crisis = { + add_opinion = { + target = root + modifier = betrayed_me_opinion + opinion = -20 + } + } + scope:2006_scoped_chaplain = { + duel = { + skill = learning + value = medium_skill_rating + + 10 = { + desc = fp2_struggle.2006.a.a + compare_modifier = { + value = scope:duel_value + multiplier = -1.25 + } + modifier = { + add = 15 + scope:fp2_2006_vassal_in_crisis = { has_trait = paranoid } + } + modifier = { + add = 10 + has_trait = fickle + } + modifier = { + add = 10 + has_trait = heresiarch + } + modifier = { + add = 2 + has_trait = impotent + } + modifier = { + add = 5 + has_trait = irritable + } + modifier = { + add = 5 + has_trait = dull + } + modifier = { + add = 10 + has_trait = depressed_genetic + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 2 + has_trait = stubborn + } + modifier = { + add = 5 + has_trait = craven + } + modifier = { + factor = 2 + scope:fp2_2006_vassal_in_crisis = { has_trait = paranoid } + } + + root = { + hidden_effect = { + scope:fp2_2006_vassal_in_crisis = { + if = { + limit = { any_secret = { type = secret_non_believer } } + progress_towards_rival_effect = { # "HE MUST BE ON TO ME!" + REASON = rival_faith_tested + CHARACTER = scope:2006_scoped_chaplain + OPINION = 0 + } + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_questioned_my_faith_opinion + } + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2006.generic.notif.a.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + show_as_tooltip = { set_character_faith = scope:fp2_2006_foreign_faith } + hidden_effect = { set_character_faith_with_conversion = scope:fp2_2006_foreign_faith } + + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_questioned_my_faith_opinion + opinion = -35 + } + } + } + } + } + 5 = { + trigger = { + scope:fp2_2006_vassal_in_crisis = { + NOT = { has_trait = paranoid } + } + } + desc = fp2_struggle.2006.a.b + compare_modifier = { + value = scope:duel_value + multiplier = -1.25 + } + modifier = { + add = 10 + has_trait = fickle + } + modifier = { + add = 10 + has_trait = heresiarch + } + modifier = { + add = 2 + has_trait = impotent + } + modifier = { + add = 5 + has_trait = irritable + } + modifier = { + add = 5 + has_trait = dull + } + modifier = { + add = 10 + has_trait = depressed_genetic + } + modifier = { + add = 10 + has_trait = arrogant + } + modifier = { + add = 5 + has_trait = arbitrary + } + modifier = { + add = 10 + has_trait = lazy + } + modifier = { + add = 2 + has_trait = stubborn + } + modifier = { + add = 5 + has_trait = craven + } + + root = { + hidden_effect = { + scope:fp2_2006_vassal_in_crisis = { + if = { + limit = { any_secret = { type = secret_non_believer } } + progress_towards_rival_effect = { # "HE MUST BE ON TO ME!" + REASON = rival_faith_tested + CHARACTER = scope:2006_scoped_chaplain + OPINION = 0 + } + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_questioned_my_faith_opinion + } + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2006.generic.notif.a.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + remove_trait = trusting + if = { + limit = { is_ai = yes } + add_stress = monumental_stress_gain # Unbalanced for players, fun when seeing it happen to unrelated AI + } + else = { add_stress = medium_stress_gain } # (there is no notification) + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_questioned_my_faith_opinion + opinion = -25 + } + } + } + } + } + 20 = { + desc = fp2_struggle.2006.a.c + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + modifier = { + add = 10 + has_trait = calm + } + modifier = { + add = 10 + has_trait = humble + } + modifier = { + add = 3 + has_trait = forgiving + } + modifier = { + add = 5 + has_trait = honest + } + modifier = { + add = 10 + has_trait = humble + } + modifier = { + add = 3 + has_trait = patient + } + modifier = { + add = 20 + has_trait = zealous + } + modifier = { + add = 4 + has_trait = compassionate + } + modifier = { + add = 15 + has_trait = theologian + } + modifier = { + add = 10 + has_trait = devoted + } + modifier = { + add = 2 + has_trait = lifestyle_poet + } + modifier = { + add = 10 + has_trait = saint + } + + hidden_effect = { + scope:fp2_2006_vassal_in_crisis = { add_piety = minor_piety_gain } + scope:2006_scoped_chaplain = { add_piety = medium_piety_gain } + } + root = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2006.generic.notif.b.t + left_icon = scope:fp2_2006_vassal_in_crisis + + scope:fp2_2006_vassal_in_crisis = { + progress_towards_friend_effect = { + REASON = friend_guided_right_path + CHARACTER = scope:2006_scoped_chaplain + OPINION = 0 + } + add_opinion = { + target = scope:2006_scoped_chaplain + modifier = fp2_reassured_faith_opinion + } + } + } + } + } + } + } + + ai_chance = { + base = 45 + ai_value_modifier = { + ai_compassion = -0.1 + ai_energy = -0.1 + ai_honor = -0.1 + ai_rationality = 0.2 + ai_sociability = -0.2 + ai_zeal = 0.3 + } + } + } +} + +################################### +# A Castle Worthy of Iberia +# By Hugo Cortell +################################### +scripted_trigger fp2_struggle_2007_can_build_castle_trigger = { # Ensures that the selected building spot adheres to the game's rules on holding placement. + any_county_province = { has_holding = no } + trigger_if = { + limit = { any_county_province = { has_holding_type = castle_holding } } + any_county_province = { has_holding_type = church_holding } + any_county_province = { has_holding_type = city_holding } + } + exists = holder + holder != scope:fp2_2007_scoped_steward +} + +fp2_struggle.2007 = { + type = character_event + title = fp2_struggle.2007.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2007_castle_holder = ROOT } + desc = fp2_struggle.2007.desc.a + } + desc = fp2_struggle.2007.desc.b + } + } + + theme = realm + cooldown = { years = 20 } + override_background = { reference = garden } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_2007_scoped_steward + animation = chancellor + } + lower_left_portrait = scope:2007_vassal_sponsor + lower_right_portrait = scope:fp2_2007_castle_holder + + trigger = { + has_fp2_dlc_trigger = yes + is_ai = no # Overpowered for AI, player only. + struggle:iberian_struggle = { + is_struggle_phase = struggle_iberia_phase_hostility + + } + + root.top_liege = root + exists = cp:councillor_steward + cp:councillor_steward = { is_available_ai_adult = yes } + + any_vassal = { # Last minute pre RC fixes + NOT = { + religion = root.religion + this = cp:councillor_steward + } + } + any_realm_county = { fp2_struggle_2007_can_build_castle_trigger = yes } + + save_temporary_scope_value_as = { + name = fp2_2007_wealth_barrier + value = { + value = main_building_tier_1_cost + multiply = 0.8 + round = yes + } + } + OR = { + gold > scope:fp2_2007_wealth_barrier + OR = { + has_trait = architect + AND = { + has_royal_court = yes + employs_court_position = royal_architect_court_position + any_court_position_holder = { + type = royal_architect_court_position + is_available_ai_adult = yes + } + } + } + } + } + + immediate = { + cp:councillor_steward = { save_scope_as = fp2_2007_scoped_steward } + if = { + limit = { + any_court_position_holder = { + type = royal_architect_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = royal_architect_court_position + save_scope_as = fp2_2007_roco_architect + } + } + random_vassal = { + limit = { + NOT = { + religion = root.religion + this = scope:fp2_2007_scoped_steward + } + } + save_scope_as = 2007_vassal_sponsor + } + + random_realm_county = { + limit = { fp2_struggle_2007_can_build_castle_trigger = yes } + random_county_province = { + limit = { has_holding = no } + save_scope_as = fp2_2007_free_real_estate + } + holder = { save_scope_as = fp2_2007_castle_holder } + } + + # Get Different Faith (updated to whole religion) + struggle:iberian_struggle = { + random_involved_ruler = { + limit = { + religion != root.religion + faith = { save_temporary_scope_as = temp_involved_faith } + struggle:iberian_struggle = { is_faith_involved_in_struggle = scope:temp_involved_faith } + } + religion = { save_scope_as = fp2_2007_foreign_faith } + } + if = { # Fallback + limit = { NOT = { exists = scope:fp2_2007_foreign_faith } } + get_random_faith_effect = { FORBIDROOTFAITH = yes } + scope:random_faith.religion = { save_scope_as = fp2_2007_foreign_faith } + } + } + + # Get castileans or proto-castileans + if = { + limit = { culture = { has_cultural_parameter = architect_trait_prestige } } + culture = { save_scope_as = fp2_2007_allegedprotocastilean } + } + + save_scope_value_as = { + name = fp2_2007_same_faith_construction_cost + value = { + value = main_building_tier_1_cost + multiply = 0.75 + round = yes + } + } + save_scope_value_as = { + name = fp2_2007_different_faith_construction_cost + value = { + value = main_building_tier_1_cost + multiply = 0.65 + round = yes + } + } + save_scope_value_as = { + name = fp2_2007_diy_construction_cost + value = { + value = main_building_tier_1_cost + multiply = 0.6 + round = yes + } + } + + # Set dynamic loc keys for powerful vassals + religion = { save_scope_as = dyloc_powerful_vassal_faith } + culture = { save_scope_as = dyloc_powerful_vassal_culture } + } + + option = { # Same Faith (or) Castilean architect + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:fp2_2007_allegedprotocastilean } + desc = fp2_struggle.2007.a.castile + } + desc = fp2_struggle.2007.a + } + } + } + flavor = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:fp2_2007_allegedprotocastilean } + desc = fp2_struggle.2007.a.castile.favor + } + desc = fp2_struggle.2007.a.major_vassal_flavor + } + } + show_as_unavailable = { gold < scope:fp2_2007_same_faith_construction_cost } + + if = { # Proto-Castilean + limit = { exists = scope:fp2_2007_allegedprotocastilean } + every_powerful_vassal = { + limit = { culture = root.culture } + custom = fp2_every_major_same_culture_vassal_notifier + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + } + show_as_tooltip = { + remove_treasury_or_gold = scope:fp2_2007_same_faith_construction_cost + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = 95 + } + } + } + add_hook_if_possible_effect = { # General effect + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } # Hooks get their own notifications, therefore I will not show them on the main effect + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2007.t + left_icon = root + right_icon = scope:fp2_2007_castle_holder + + remove_treasury_or_gold = scope:fp2_2007_same_faith_construction_cost + custom_tooltip = fp2_struggle.2007.a.notif + hidden_effect = { + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = 95 + } + } + } + add_hook_if_possible_effect = { # General effect + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + } + } + } + + option = { # Foreign (different faith) architect + name = fp2_struggle.2007.b + flavor = fp2_struggle.2007.b.flavor + show_as_unavailable = { gold < scope:fp2_2007_different_faith_construction_cost } + hidden_effect = { scope:2007_vassal_sponsor = { remove_treasury_or_gold = medium_treasury_or_gold_value } } + + every_powerful_vassal = { + custom = fp2_every_major_same_faith_vassal_notifier + limit = { religion = root.religion } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + every_powerful_vassal = { + custom = fp2_every_major_different_faith_vassal_notifier + limit = { religion != root.religion } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + scope:fp2_2007_free_real_estate.county = { + if = { + limit = { religion = scope:fp2_2007_foreign_faith } + add_county_modifier = { + modifier = modifier_religious_understanding_modifier + years = 12 + } + } + else_if = { + limit = { religion != root.religion } + add_county_modifier = { + modifier = invested_in_province_modifier + years = 5 + } + } + } + + show_as_tooltip = { + remove_treasury_or_gold = scope:fp2_2007_different_faith_construction_cost + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = 95 + } + } + } + add_hook_if_possible_effect = { + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2007.t + left_icon = scope:2007_vassal_sponsor + right_icon = scope:fp2_2007_castle_holder + + remove_treasury_or_gold = scope:fp2_2007_different_faith_construction_cost + custom_tooltip = fp2_struggle.2007.a.notif + hidden_effect = { + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = 95 + } + } + } + add_hook_if_possible_effect = { # General effect + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + } + } + } + + option = { # I will build it myself + name = fp2_struggle.2007.c + flavor = fp2_struggle.2007.c.flavor + + trigger = { has_trait = architect } + + duel = { + skill = learning + value = very_high_skill_rating + + 60 = { + desc = fp2_struggle.2007.c.notif.a.desc + compare_modifier = { + value = scope:duel_value + multiplier = 1 # Should be -1 but it has already been balanced + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2007.c.notif.a.t + left_icon = root + right_icon = scope:fp2_2007_castle_holder + + add_prestige = major_prestige_loss + reverse_add_opinion = { + target = scope:fp2_2007_scoped_steward + modifier = disappointed_opinion + opinion = -10 + } + } + } + 40 = { + desc = fp2_struggle.2007.c.notif.b.desc + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + add = fp2_2007_calculate_architect_competence + always = yes + } + + show_as_tooltip = { + remove_treasury_or_gold = scope:fp2_2007_diy_construction_cost + if = { + limit = { exists = scope:fp2_2007_allegedprotocastilean } + add_prestige = minor_prestige_gain + } + + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = medium_gold_value + } + } + } + add_hook_if_possible_effect = { # General effect + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2007.t + left_icon = root + right_icon = scope:fp2_2007_castle_holder + + remove_treasury_or_gold = scope:fp2_2007_diy_construction_cost + if = { + limit = { exists = scope:fp2_2007_allegedprotocastilean } + add_prestige = minor_prestige_gain + } + custom_tooltip = fp2_struggle.2007.a.notif + } + hidden_effect = { + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = medium_gold_value + } + } + } + add_hook_if_possible_effect = { + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + } + } + } + } + + option = { # RoCo + name = fp2_struggle.2007.c.roco + + trigger = { + NOT = { has_trait = architect } + exists = scope:fp2_2007_roco_architect + } + scope:fp2_2007_roco_architect = { + duel = { + skill = learning + value = very_high_skill_rating + + 55 = { + desc = fp2_struggle.2007.c.notif.a.desc + + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2007.c.notif.a.t + left_icon = scope:fp2_2007_roco_architect + right_icon = scope:fp2_2007_castle_holder + + add_prestige = medium_prestige_loss + } + } + hidden_effect = { add_prestige = medium_prestige_loss } + } + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + add = fp2_2007_calculate_architect_competence + always = yes + } + + root = { + show_as_tooltip = { + remove_treasury_or_gold = scope:fp2_2007_diy_construction_cost + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = minor_gold_value + } + } + } + add_hook_if_possible_effect = { + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2007.t + left_icon = scope:fp2_2007_roco_architect + right_icon = scope:fp2_2007_castle_holder + + remove_treasury_or_gold = scope:fp2_2007_diy_construction_cost + custom_tooltip = fp2_struggle.2007.a.notif + } + hidden_effect = { + scope:fp2_2007_free_real_estate = { + begin_create_holding = { + type = castle_holding + refund_cost = { + gold = minor_gold_value + } + } + } + add_hook_if_possible_effect = { + TARGET = scope:fp2_2007_castle_holder + TYPE = indebted_hook + YEARS = 8 + } + } + } + } + } + } + } + } + + option = { # Leave it be + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2007_castle_holder = root } + desc = fp2_struggle.2007.d.alt + } + desc = fp2_struggle.2007.d + } + } + } + + if = { + limit = { scope:fp2_2007_castle_holder != root } + reverse_add_opinion = { + target = scope:fp2_2007_scoped_steward + modifier = disappointed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:fp2_2007_castle_holder + modifier = disappointed_opinion + opinion = -20 + } + } + if = { + limit = { exists = cp:councillor_marshal } + reverse_add_opinion = { + target = cp:councillor_marshal + modifier = disappointed_opinion + opinion = -10 + } + } + } +} + +################################### +# Misdeeds of The Chaplain +# By Hugo Cortell +################################### +scripted_trigger fp2_struggle_2008_check_actor_eligibility_scripted_trigger = { + is_available_ai_adult = yes + intrigue > low_skill_rating + + NOT = { + has_trait = just + has_trait = compassionate + has_trait = generous + has_trait = content + has_trait = honest + has_relation_soulmate = root + } + + trigger_if = { # Instead of an event weight, we just increase the reqs for friends to dicrease overhead + limit = { + has_relation_friend = root + has_relation_lover = root + } + OR = { + has_trait = greedy + has_trait = deceitful + has_trait = callous + } + } +} + +fp2_struggle.2008 = { + type = character_event + title = fp2_struggle.2008.t + desc = fp2_struggle.2008.desc + + theme = secret + cooldown = { years = 30 } + override_background = { reference = study } + left_portrait = { + character = scope:fps_2008_misdeed_actor + animation = fear + } + right_portrait = { + character = root + animation = disapproval + } + + trigger = { + has_fp2_dlc_trigger = yes + root.top_liege = root + + trigger_if = { + limit = { exists = struggle:iberian_struggle } + struggle:iberian_struggle = { + is_struggle_phase = struggle_iberia_phase_hostility + + } + } + + OR = { # This play changes depending on the actor + AND = { # Chaplain + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { fp2_struggle_2008_check_actor_eligibility_scripted_trigger = yes } + } + AND = { # Steward + exists = cp:councillor_steward + cp:councillor_steward = { fp2_struggle_2008_check_actor_eligibility_scripted_trigger = yes } + } + AND = { # Spymaster + exists = cp:councillor_spymaster + cp:councillor_spymaster = { fp2_struggle_2008_check_actor_eligibility_scripted_trigger = yes } + } + } + } + + immediate = { + random_councillor = { + limit = { + OR = { + this = root.cp:councillor_court_chaplain + this = root.cp:councillor_steward + this = root.cp:councillor_spymaster + } + fp2_struggle_2008_check_actor_eligibility_scripted_trigger = yes + } + weight = { # Weight based on personality. In combination with the scripted trigger this means: Must be greedy, dishonourable, not incompetent. + base = 1 + modifier = { + ai_greed > 0 + factor = 1 + } + modifier = { + ai_honor < 0 + factor = 1 + } + } + save_scope_as = fps_2008_misdeed_actor + } + + scope:fps_2008_misdeed_actor = { + if = { + limit = { has_council_position = councillor_steward } + add_gold = medium_gold_value # Small detail + } + else = { add_gold = minor_gold_value } + + if = { + limit = { + faith = { + exists = religious_head + NOT = { + religious_head = root + religious_head = scope:fps_2008_misdeed_actor + } + } + } + faith.religious_head = { + save_scope_as = fp2_2008_relevant_head_of_faith + } + } + } + root.capital_county = { save_scope_as = fp2_2008_capital } + } + + option = { # Special (thanks QA!) option, denounce publicly (might get killed by mob) + name = fp2_struggle.2008.d + flavor = fp2_struggle.2008.d.flavor + trigger = { + OR = { + has_trait = sadistic + has_trait = schemer + has_trait = peasant_leader + has_trait = augustus + has_trait = contrite + has_trait = august + has_trait = diplomat + } + } + stress_impact = { + just = medium_stress_impact_gain + trusting = minor_stress_impact_gain + temperate = minor_stress_impact_gain + patient = minor_stress_impact_gain + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + every_powerful_vassal = { + limit = { faith = root.faith } + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + + random_list = { + 85 = { + hidden_effect = { + scope:fps_2008_misdeed_actor = { save_temporary_scope_as = assassin } # Used for loc + send_interface_toast = { + type = event_toast_effect_good + title = char_interaction.0050.a + left_icon = scope:fps_2008_misdeed_actor + + capital_county = { + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 15 + } + } + scope:assassin = { custom_tooltip = hold_court.8221.imprison_alone } # This uses that loc + hidden_effect = { + rightfully_imprison_character_effect = { # The autoformatter was a bit (very, very) fiddly with this + TARGET = scope:fps_2008_misdeed_actor + IMPRISONER = root + } + } + } + } + scope:fps_2008_misdeed_actor = { + add_opinion = { + target = root + modifier = publicly_ridiculed + opinion = -30 + } + } + show_as_tooltip = { + rightfully_imprison_character_effect = { + TARGET = scope:fps_2008_misdeed_actor + IMPRISONER = root + } + capital_county = { + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 15 + } + } + } + } + 15 = { + scope:fps_2008_misdeed_actor = { + add_opinion = { + target = root + modifier = publicly_ridiculed + opinion = -80 + } + } + if = { + limit = { has_trait = sadistic } # Once again, rewarding physcos with little details + send_interface_toast = { + type = event_toast_effect_good + title = char_interaction.0050.a + left_icon = scope:fps_2008_misdeed_actor + + scope:fps_2008_misdeed_actor = { death = { death_reason = death_beaten_by_mob } } + capital_county = { + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 30 + } + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_bad + title = char_interaction.0050.a + left_icon = scope:fps_2008_misdeed_actor + + scope:fps_2008_misdeed_actor = { death = { death_reason = death_beaten_by_mob } } + capital_county = { + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 30 + } + } + } + } + } + } + } + + option = { # Imprison chaplain outright + name = fp2_struggle.2008.a + stress_impact = { trusting = minor_stress_impact_gain } + + rightfully_imprison_character_effect = { + TARGET = scope:fps_2008_misdeed_actor + IMPRISONER = root + } + if = { + limit = { + scope:fps_2008_misdeed_actor = cp:councillor_court_chaplain + exists = scope:fp2_2008_relevant_head_of_faith + } + scope:fps_2008_misdeed_actor.faith = { + religious_head = { + add_opinion = { + target = root + modifier = rude_opinion + opinion = -10 + } + } + } + } + + scope:fp2_2008_capital = { + add_county_modifier = { + modifier = fp2_improved_administrative_checks_modifier + years = 15 + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.85 + ai_zeal = 0.3 + } + } + } + + + # Threaten, gain hook and modifier for work harder + option = { # Combined general output (threaten into teaching you how to forge like they do) + name = fp2_struggle.2008.b.a + flavor = fp2_struggle.2008.b.flavor + stress_impact = { + just = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + + send_interface_toast = { + type = event_toast_effect_good + title = yearly_0001_improved_intrigue + left_icon = ROOT + right_icon = scope:fps_2008_misdeed_actor + + add_intrigue_lifestyle_xp = major_lifestyle_experience # Originally it gave you the accomplished forger perk. Was removed because it let you bypass the learning tree. + } + reverse_add_opinion = { + target = scope:fps_2008_misdeed_actor + modifier = extorted_me_opinion + opinion = -25 + years = 10 + } + + scope:fps_2008_misdeed_actor = { + progress_towards_rival_effect = { + REASON = rival_defrauded_realm + CHARACTER = root + OPINION = 0 + } + } + + if = { # Has its own notification + limit = { + can_add_hook = { + target = scope:fps_2008_misdeed_actor + type = threat_hook + } + } + add_hook = { + target = scope:fps_2008_misdeed_actor + type = threat_hook + years = 7 + } + } + + ai_chance = { base = 0 } # AI should never use these OP options + } + + + option = { # Go hand in hand stealing state money + name = fp2_struggle.2008.c + flavor = fp2_struggle.2008.c.flavor + + stress_impact = { + just = medium_stress_impact_gain + zealous = minor_stress_impact_gain + } + + scope:fp2_2008_capital = { + add_county_modifier = { + modifier = county_corruption_inefficient_tax_collection_modifier + years = 15 + } + } + + scope:fps_2008_misdeed_actor = { + if = { + limit = { + can_add_hook = { + target = root + type = minor_crime_accomplice_hook + } + } + + if = { + limit = { root = { scope:fps_2008_misdeed_actor = cp:councillor_steward } } # CPs cannot have CPs, therefore must be rescoped into root to access + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + add_hook = { + target = root + type = minor_crime_accomplice_hook + years = 15 + } + } + } + if = { + limit = { + can_add_hook = { + target = scope:fps_2008_misdeed_actor + type = minor_crime_accomplice_hook + } + } + add_hook = { + target = scope:fps_2008_misdeed_actor + type = minor_crime_accomplice_hook + years = 15 + } + } + add_gold = medium_gold_value + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.95 + ai_energy = 0.25 + } + } + } +} + +################################### +# Thiefs of Garduna / Catching Thieves of Myth +# By Hugo Cortell +################################### +fp2_struggle.2009 = { + type = character_event + title = fp2_struggle.2009.t + desc = fp2_struggle.2009.desc + + theme = intrigue_skulduggery_focus + cooldown = { years = 150 } # Not actually necessary but adding anyway + override_background = { reference = corridor_night } + left_portrait = { + character = scope:fp2_2009_marshal + animation = marshal + outfit_tags = { emotion_angry_decal } # WAD, the decal does render and functions as intended + } + lower_left_portrait = { + character = root + } + right_portrait = { + character = scope:fp2_2009_garduna_young_thief + animation = fear + hide_info = yes + outfit_tags = { + mena_stealth_hood + religious_zoroastrian_high_clothes + } + } + + trigger = { + is_ai = no + has_fp2_dlc_trigger = yes + top_liege = this + exists = cp:councillor_marshal + fp2_character_any_involvement_iberian_struggle_trigger = yes + + exists = struggle:iberian_struggle + exists = primary_title + struggle:iberian_struggle = { + any_involved_ruler = { # Redundancy check in response to errors on automated tests, should (theoretically) not be necessary + this != root # Alternative point of failure could be "this" being null, but that would cause errors outside my event. + exists = primary_title + top_liege = this + primary_title = { is_mercenary_company = no } + is_landed = yes + count > 1 # Redundancy check in response to more errors on nigtly. Now on the bottom of the block. Reduced by one to total 3. + } + + OR = { + is_struggle_phase = struggle_iberia_phase_opportunity + is_struggle_phase = struggle_iberia_phase_conciliation + } + } + + realm_size > 3 # Needed to get all the realms where corruption can happen + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + is_ai = no + } + } + + immediate = { + struggle:iberian_struggle = { # Struggle existance is already verified by event trigger + random_involved_ruler = { + limit = { + this != root # Otherwise you might be the other involved ruler + exists = primary_title + top_liege = this + primary_title = { is_mercenary_company = no } + is_landed = yes + } + save_scope_as = fp2_2009_involved_ruler + } + } + cp:councillor_marshal = { save_scope_as = fp2_2009_marshal } + create_character = { + age = { 16 27 } + location = root.location + gender_female_chance = 30 + trait = education_intrigue_2 + trait = shy + trait = honest + trait = paranoid + random_traits = yes + diplomacy = { 2 7 } + martial = { 3 6 } + stewardship = { 4 7 } + intrigue = { 8 22 } + culture = culture:basque + faith = faith:catholic + dynasty = none + after_creation = { add_gold = minor_gold_value } + + save_scope_as = fp2_2009_garduna_young_thief + } + + if = { + limit = { + exists = global_var:fp2_struggle_2009_thief_king_char + global_var:fp2_struggle_2009_thief_king_char = { is_available_ai_adult = yes } + } + global_var:fp2_struggle_2009_thief_king_char = { save_scope_as = fp2_2009_garduna_guild_master } + } + else = { + create_character = { # Guild Master + age = { 24 52 } + location = scope:fp2_2009_involved_ruler.location + gender_female_chance = { + if = { + limit = { scope:fp2_2009_involved_ruler.location.county.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:fp2_2009_involved_ruler.location.county.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + trait = education_intrigue_4 + trait = deceitful + trait = shrewd + random_traits = yes + diplomacy = { 6 16 } + martial = { 8 15 } + stewardship = { 10 17 } + intrigue = { 8 16 } + culture = culture:basque + faith = faith:catholic + dynasty = none + after_creation = { + add_gold = major_gold_value + add_prestige = major_prestige_gain + add_piety = minor_piety_gain + random = { + chance = 10 + add_trait = one_eyed + } + random = { + chance = 10 + add_trait = one_legged + } + random = { + chance = 5 + add_trait = schemer + } + random = { + chance = 33 + add_trait = wild_oat + } + if = { + limit = { is_female = yes } + give_nickname = nick_the_Queen_of_Thieves + } + else = { give_nickname = nick_the_King_of_Thieves } + } + + save_scope_as = fp2_2009_garduna_guild_master + } + } + set_global_variable = { + name = fp2_struggle_2009_thief_king_char + value = scope:fp2_2009_garduna_guild_master + } + + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = fp2_2009_roco_executioner + } + } + + # Get locations + root.capital_county = { save_scope_as = fp2_2009_capital_county } + scope:fp2_2009_involved_ruler.capital_county = { save_scope_as = fp2_2009_involved_capital_county } + random_sub_realm_county = { + limit = { this != scope:fp2_2009_capital_county } + save_scope_as = fp2_2009_random_flavor_county_ichi + } + random_sub_realm_county = { + limit = { + NOT = { + this = scope:fp2_2009_capital_county + this = scope:fp2_2009_random_flavor_county_ichi + } + } + save_scope_as = fp2_2009_random_flavor_county_ni + } + + # Logic for "Hire the guild" option, prevents the AI from acting un-wise + if = { # Player has access by default + limit = { is_ai = no } + save_scope_as = fp2_2009_hire_guild_unlocked + } + else_if = { # Forbid AI on AI agression + limit = { + NOT = { + is_ai = yes + scope:fp2_2009_involved_ruler = { is_ai = yes } + } + } + save_scope_as = fp2_2009_hire_guild_unlocked + } + else_if = { # Ensure AI on Player agression is justified + limit = { + is_ai = yes + scope:fp2_2009_involved_ruler = { + is_ai = no + save_temporary_opinion_value_as = { + name = opinion_of_root_temp_value + target = root + } + } + + # AI behaviour must be on brand with personality and/or circumstance to ensure narrative cohesion + scope:opinion_of_root_temp_value < -10 + OR = { + has_trait = deceitful + has_trait = wrathful + has_trait = ambitious + has_trait = vengeful + has_trait = arrogant + has_trait = callous + is_at_war_with = scope:fp2_2009_involved_ruler + has_relation_nemesis = scope:fp2_2009_involved_ruler + } + } + save_scope_as = fp2_2009_hire_guild_unlocked + } + } + + option = { # BECOME THE KING OF PIRA- err THIEVES!!1! + name = fp2_struggle.2009.a + flavor = fp2_struggle.2009.a.flavor + trigger = { + NOT = { age < 14 } + OR = { + has_trait = gallant + has_trait = adventurer + has_trait = berserker + has_trait = peasant_leader + has_trait = viking + has_trait = reaver + prowess > very_high_skill_rating + has_trait = lunatic_genetic + } + } + scope:fp2_2009_marshal = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + trigger_event = { + id = fp2_struggle.2010 + days = { 6 31 } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + craven = minor_stress_impact_gain + content = medium_stress_impact_gain + eccentric = medium_stress_impact_loss + } + + ai_chance = { + base = 8 # Prevents too many kings of thieves from showing up + modifier = { + add = 25 + has_trait = just + } + ai_value_modifier = { + ai_boldness = 0.7 + ai_compassion = -0.1 + ai_greed = 0.3 + ai_energy = 0.5 + ai_honor = -0.1 + ai_rationality = -0.2 + ai_sociability = 0.3 + ai_vengefulness = 0.5 + } + } + } + + option = { # Demand info + name = fp2_struggle.2009.b + + hidden_effect = { + scope:fp2_2009_garduna_young_thief = { add_trait = depressed_1 } + save_scope_as = fp2_2009_thief_permanence_scope + } + + every_sub_realm_county = { + limit = { + county_control < 100 + } + custom = all_realm_county + change_county_control = 5 + } + add_courtier = scope:fp2_2009_garduna_young_thief + scope:fp2_2009_garduna_young_thief = { + custom_tooltip = fp2_struggle.2009.b.blues + add_opinion = { + target = root + modifier = was_spared + opinion = 20 + } + } + + stress_impact = { + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 45 + ai_value_modifier = { + ai_boldness = -0.1 + ai_compassion = 0.65 + ai_honor = 0.2 + ai_rationality = 0.9 + } + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:cleared_out + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } + + option = { # Ask for a cut + name = fp2_struggle.2009.c + trigger = { + is_ai = no # Option disabled for AI rulers + NOR = { + has_trait = gallant + has_trait = adventurer + has_trait = berserker + has_trait = peasant_leader + has_trait = viking + has_trait = reaver + prowess > very_high_skill_rating + has_trait = lunatic_genetic + } + } + + add_gold = medium_gold_value + scope:fp2_2009_capital_county = { add_thieves_guild_modifier_effect = yes } + scope:fp2_2009_random_flavor_county_ichi = { change_county_control = -15 } + scope:fp2_2009_random_flavor_county_ni = { change_county_control = -15 } + + scope:fp2_2009_marshal = { + if = { + limit = { has_trait = just } + add_opinion = { + target = root + modifier = disgusted_opinion + opinion = -35 + } + } + else = { + if = { + limit = { has_trait = greedy } + add_opinion = { + target = root + modifier = respect_opinion # Greedy people respect "the grind" + opinion = 10 + } + } + else = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + } + + stress_impact = { + generous = medium_stress_impact_gain + content = minor_stress_impact_gain + just = major_stress_impact_gain + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:paid_off + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } + + option = { # Hire the guild to mess with a foreign ruler (work for me) + name = fp2_struggle.2009.d + trigger = { exists = scope:fp2_2009_hire_guild_unlocked } # Prevents AI from acting un-intelligently + + scope:fp2_2009_involved_capital_county = { add_thieves_guild_modifier_effect = yes } + pay_short_term_gold = { + target = scope:fp2_2009_garduna_young_thief + gold = minor_gold_value + + } + + # Notifies the player on the recieving end of an event outcome that involves them. + scope:fp2_2009_involved_ruler = { # Hopefuly this will encoureage interaction in MP games. + trigger_event = { + id = fp2_struggle.2012 + days = { 1 2 } + } + } + + stress_impact = { + brave = minor_stress_impact_gain + honest = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + add = 45 + is_at_war_with = scope:fp2_2009_involved_ruler + } + modifier = { + add = 100 # hatred can cloud the mind + has_relation_nemesis = scope:fp2_2009_involved_ruler + } + ai_value_modifier = { + ai_boldness = 0.7 + ai_compassion = -0.2 + ai_greed = -0.1 + ai_honor = -0.4 + ai_rationality = 0.7 + ai_vengefulness = 0.95 + } + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:worked_together + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } + + option = { # Gift the thieve's the head to the foreign ruler + name = fp2_struggle.2009.e + + scope:fp2_2009_garduna_young_thief = { + if = { + limit = { exists = scope:fp2_2009_roco_executioner } # ROCO flaire + death = { + death_reason = death_execution + killer = scope:fp2_2009_roco_executioner + } + } + else = { + death = { + death_reason = death_execution + killer = scope:fp2_2009_marshal + } + } + save_scope_as = fp2_2009_thief_permanence_scope + } + custom_tooltip = fp2_struggle.2009.e.a + hidden_effect = { + random_list = { + 55 = {} # nothing happens + 45 = { + random_list = { + 33 = { scope:fp2_2009_random_flavor_county_ichi = { change_county_control = -15 } } + 33 = { scope:fp2_2009_random_flavor_county_ni = { change_county_control = -15 } } + 33 = { scope:fp2_2009_capital_county = { change_county_control = -15 } } + } + } + } + } + + scope:fp2_2009_involved_ruler = { + if = { + limit = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = sadistic + } + } + add_opinion = { + target = root + modifier = gift_opinion + opinion = 40 + } + progress_towards_friend_effect = { # very nice + REASON = friend_gave_severed_head + CHARACTER = root + OPINION = 0 + } + } + else = { + add_opinion = { + target = root + modifier = gift_opinion # nice + opinion = 30 + } + } + } + + # Notifies the player on the recieving end that they have recieved a delightful gift + root = { save_scope_as = fp2_2009_has_gifted_head } + scope:fp2_2009_involved_ruler = { + trigger_event = { + id = fp2_struggle.2012 + days = { 1 2 } + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 35 + ai_value_modifier = { + ai_boldness = 0.2 + ai_compassion = -0.45 + ai_honor = 0.8 + ai_rationality = 0.1 + ai_sociability = 0.5 + } + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:lobbed_head + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } + + option = { # Debug option to quickly trigger 2021 + name = debug_generic_option + trigger = { is_developer_testing_trigger = yes } + + custom_tooltip = debug_generic_option_shortened_trigger_can_disable + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:cleared_out # modify this with the flag you need + } + trigger_event = { id = fp2_struggle.2021 } + } + } + + after = { + if = { + limit = { NOT = { exists = scope:fp2_2009_thief_permanence_scope } } + scope:fp2_2009_garduna_young_thief = { silent_disappearance_effect = yes } + } + } +} + +fp2_struggle.2010 = { # 2009 duel follow-up + type = character_event + title = fp2_struggle.2010.t + desc = fp2_struggle.2010.desc + trigger = { scope:fp2_2009_garduna_guild_master = { is_available_ai_adult = yes } } + + theme = battle + override_background = { reference = corridor_night } + left_portrait = { + character = root + animation = throne_room_one_handed_passive_1 + } + right_portrait = { + character = scope:fp2_2009_garduna_guild_master + animation = war_over_win + outfit_tags = { + western_stealth_hood + sub_saharan_high_nobility + mena_war_legwear + } + } + + option = { # Duel + name = fp2_struggle.2010.b + + root = { save_scope_as = fp2_2010_root_in_duel } # Used in invalidation check for player's death + scope:fp2_2009_garduna_guild_master = { + set_variable = { + name = signature_weapon + value = flag:dagger + } + } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = temple + OUTPUT_EVENT = fp2_struggle.2011 + INVALIDATION_EVENT = fp2_struggle.2011 # If the thief dies, you still win. If you die, 2011 runs a check and fails to trigger. + } + + ai_chance = { # Stress for craven was already taken when setting off in this quest + base = 50 + ai_value_modifier = { ai_boldness = 0.5 } + } + } + + option = { # Pay protection money + name = fp2_struggle.2010.c + + pay_treasury_or_gold = { # Cowardice tax (costs more than hireing them) + target = scope:fp2_2009_garduna_guild_master + value = major_treasury_or_gold_value + } + + stress_impact = { + brave = major_stress_impact_gain + just = major_stress_impact_gain + arrogant = major_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { # Nobody wants to be indebted to a thief + add = -25 + gold < major_gold_value + } + ai_value_modifier = { ai_greed = -0.5 } + } + + hidden_effect = { + save_scope_value_as = { + name = fp2_2009_event_outcome + value = flag:paid_off + } + trigger_event = { + id = fp2_struggle.2021 + days = { 450 3000 } + } + } + } +} + +fp2_struggle.2011 = { # You become the KING OF THIEVES + hidden = yes + immediate = { + if = { + limit = { + exists = scope:fp2_2011_reuse_gate + root = scope:fp2_2010_root_in_duel + } + send_interface_toast = { + type = event_toast_effect_good + desc = fp2_struggle.2011.desc + title = fp2_struggle.2011.a + right_icon = ROOT + + if = { # Standard practice from EP1 onwards dictates that we ought not to overwrite positive nicknames (?) + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + give_nickname = nick_the_Thief_Slayer + } + add_prestige = major_prestige_gain + add_gold = minor_gold_value + } + } + else = { + save_scope_as = fp2_2011_reuse_gate + trigger_event = { + id = fp2_struggle.2011 + days = 1 + } + } + } +} + +fp2_struggle.2012 = { # Displays letter notifying involved player/character that an action taken by 2009's root is affecting them + type = letter_event + sender = scope:fp2_2012_sender # Animation is WAD + opening = { + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:fp2_2009_has_gifted_head } + desc = fp2_struggle.2012.t.alt + } + desc = fp2_struggle.2012.t + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:fp2_2009_has_gifted_head } + desc = fp2_struggle.2012.desc.alt + } + desc = fp2_struggle.2012.desc + } + } + + immediate = { + # Logic for deciding who is the author of the letter + if = { + limit = { exists = scope:fp2_2009_has_gifted_head } # If the event is the alt version where you gift the head + scope:fp2_2009_has_gifted_head = { save_scope_as = fp2_2012_sender } + } + else_if = { + limit = { exists = cp:councillor_spymaster } # Else cycle through possible chancellors + cp:councillor_spymaster = { save_scope_as = fp2_2012_sender } + } + else_if = { + limit = { exists = cp:councillor_marshal } + cp:councillor_marshal = { save_scope_as = fp2_2012_sender } + } + else_if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = fp2_2012_sender } + } + else = { root = { save_scope_as = fp2_2012_sender } } # If all fails, you wrote the report yourself, about yourself, for yourself. + } + + option = { + name = fp2_struggle.2012.a + trigger = { NOT = { exists = scope:fp2_2009_has_gifted_head } } + + show_as_tooltip = { scope:fp2_2009_involved_capital_county = { add_thieves_guild_modifier_effect = yes } } # Has already happened, only to display info + } + + option = { + name = fp2_struggle.2012.a.alt + trigger = { exists = scope:fp2_2009_has_gifted_head } + + scope:fp2_2009_involved_capital_county = { change_county_control = 10 } + } +} + +################################### +# The Secret to Freedom +# By Hugo Cortell +################################### +fp2_struggle.2013 = { + type = character_event + title = fp2_struggle.2013.t + desc = fp2_struggle.2013.desc + theme = secret + cooldown = { years = 2 } + override_background = { + trigger = { scope:fp2_2013_prisoner_with_a_secret = { is_in_prison_type = house_arrest } } + reference = sitting_room + } + override_background = { + trigger = { always = yes } + reference = dungeon + } + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:fp2_2013_prisoner_with_a_secret + triggered_animation = { + trigger = { scope:fp2_2013_prisoner_with_a_secret = { is_in_prison_type = house_arrest } } + animation = beg + } + animation = prisondungeon + override_imprisonment_visuals = yes + } + + trigger = { + has_fp2_dlc_trigger = yes + any_prisoner = { + save_temporary_scope_as = temp_prisoner_with_secret # Prevents prisoner from revealing their own secret, which would be cool, but would require new loc + any_known_secret = { + secret_owner = { + this != scope:temp_prisoner_with_secret + top_liege = this + fp2_character_any_involvement_iberian_struggle_trigger = yes + } + NOT = { is_known_by = root } + } + } + } + + immediate = { + random_prisoner = { + limit = { + save_temporary_scope_as = temp_prisoner_with_secret + any_known_secret = { + secret_owner = { + this != scope:temp_prisoner_with_secret + top_liege = this + fp2_character_any_involvement_iberian_struggle_trigger = yes + } + NOT = { is_known_by = root } + } + } + save_scope_as = fp2_2013_prisoner_with_a_secret + every_known_secret = { + limit = { + secret_owner = { + this != scope:fp2_2013_prisoner_with_a_secret + top_liege = this + } + NOT = { is_known_by = root } + } + secret_owner = { save_scope_as = fp2_2013_secret_owner } + save_scope_as = fp2_2013_secret_to_tell + } + + stress_impact = { + brave = medium_stress_impact_gain + gallant = medium_stress_impact_gain + confider = major_stress_impact_gain + } + } + } + + option = { # Agree + name = fp2_struggle.2013.a + + show_as_tooltip = { + custom_tooltip = fp2_struggle.2013.a.a + scope:fp2_2013_prisoner_with_a_secret = { release_from_prison = yes } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = witch.2010.message + left_icon = ROOT + right_icon = scope:fp2_2013_secret_owner + + scope:fp2_2013_secret_to_tell = { reveal_to = root } + scope:fp2_2013_prisoner_with_a_secret = { release_from_prison = yes } + } + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_boldness = -0.1 + ai_compassion = 0.2 + ai_honor = 0.1 + ai_rationality = 0.4 + ai_sociability = 0.1 + ai_vengefulness = 0.1 + } + } + } + + option = { # Torture + name = fp2_struggle.2013.b + + add_dread = minor_dread_gain + duel = { + skill = intrigue + value = medium_skill_rating + + 40 = { # Success + modifier = { + add = intrigue # Your intrigue level should make up for most of the 10 missing points to make this a 50 50 + always = yes + } + modifier = { + add = 15 # Enjoy your job and it wont feel like work! + has_trait = sadistic + } + modifier = { + add = 35 + has_trait = torturer + } + modifier = { + add = 5 # Iberia is home to many plants you should not rub against your skin, great for tickle-torture :D + has_trait = lifestyle_herbalist + } + modifier = { + add = 5 + scope:fp2_2013_prisoner_with_a_secret = { has_trait = lazy } + } + modifier = { + add = 15 # Quickly changes their mind about wanting to resist torture + scope:fp2_2013_prisoner_with_a_secret = { has_trait = fickle } + } + + custom_tooltip = fp2_struggle.2013.a.a + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_good + title = witch.2010.message + left_icon = ROOT + right_icon = scope:fp2_2013_secret_owner + + scope:fp2_2013_secret_to_tell = { reveal_to = root } + } + } + } + 60 = { # You fail + desc = fp2_struggle.2013.b.b + modifier = { + add = scope:fp2_2013_prisoner_with_a_secret.prowess # This is a battle of your skill in torture (intrigue) against the will of your oponent (prowess, usually lower) + always = yes + } + modifier = { + add = 5 + scope:fp2_2013_prisoner_with_a_secret = { has_trait = brave } + } + modifier = { + add = 5 # Being stubborn is as much a blessing as it is a curse, in this case, it is the former + scope:fp2_2013_prisoner_with_a_secret = { has_trait = stubborn } + } + modifier = { + add = 5 + scope:fp2_2013_prisoner_with_a_secret = { has_trait = diligent } + } + modifier = { + add = 5 # They know nothing good can come from revealing information, what will the bargain with otherwise? + scope:fp2_2013_prisoner_with_a_secret = { has_trait = paranoid } + } + modifier = { + add = 2 # Maybe god is still on your side? Maybe it is a test? + scope:fp2_2013_prisoner_with_a_secret = { has_trait = zealous } + } + modifier = { + add = 2 + scope:fp2_2013_prisoner_with_a_secret = { has_trait = callous } + } + modifier = { + add = 15 # I imagine this is sort of a lalatina moment + scope:fp2_2013_prisoner_with_a_secret = { has_trait = flagellant } + } + modifier = { + add = 10 # They are used to not revealing info under preassure, though torture is a bit more than they are used to... + scope:fp2_2013_prisoner_with_a_secret = { has_trait = confider } + } + + send_interface_toast = { + type = event_toast_effect_bad + title = ease_tension_toast.failure + left_icon = ROOT + right_icon = scope:fp2_2013_prisoner_with_a_secret + } + } + } + reverse_add_opinion = { + target = scope:fp2_2013_prisoner_with_a_secret + modifier = tortured_me + opinion = -60 # 15 point reduction because there was a weak justification + years = 30 + } + scope:fp2_2013_prisoner_with_a_secret = { + add_character_modifier = { + modifier = recently_tortured + years = 5 + } + } + + stress_impact = { + compassionate = major_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 15 + modifier = { + add = 25 + has_trait = torturer + } + modifier = { + add = 15 + has_trait = sadistic + } + ai_value_modifier = { + ai_boldness = 0.8 + ai_compassion = -0.5 + ai_greed = 0.6 + ai_honor = -0.9 + ai_vengefulness = 0.2 + } + } + } + + option = { # Send as gift + name = fp2_struggle.2013.c + flavor = fp2_struggle.2013.c.desc + trigger = { scope:fp2_2013_secret_owner = { is_ai = yes } } + + custom_tooltip = fp2_struggle.2013.c.a + scope:fp2_2013_prisoner_with_a_secret = { release_from_prison = yes } + trigger_event = { + id = fp2_struggle.2014 + days = { 1 4 } + } + + ai_chance = { + base = 5 + ai_value_modifier = { + ai_boldness = -0.1 + ai_compassion = 0.2 + ai_greed = -0.5 + ai_energy = -0.1 + ai_honor = 0.3 + ai_sociability = 0.3 + ai_vengefulness = -0.2 + ai_zeal = -0.1 + } + } + } + + option = { # Dismiss + name = fp2_struggle.2013.d + + random = { + chance = 5 + modifier = { + add = 10 + has_trait = depressed + } + modifier = { + add = 5 + health < fine_health + } + show_as_tooltip = { custom_tooltip = fp2_struggle.2013.a.a } + hidden_effect = { + if = { + limit = { is_ai = no } + send_interface_toast = { + type = event_toast_effect_good + title = witch.2010.message + left_icon = ROOT + right_icon = scope:fp2_2013_secret_owner + + scope:fp2_2013_secret_to_tell = { reveal_to = root } + } + } + } + } + + ai_chance = { + base = 65 + ai_value_modifier = { + ai_boldness = -0.2 + ai_greed = -0.15 + ai_energy = -0.1 + ai_honor = 0.6 + ai_sociability = 0.1 + ai_vengefulness = -0.1 + } + } + } +} + +fp2_struggle.2014 = { + type = letter_event + sender = scope:fp2_2013_secret_owner + opening = fp2_struggle.2014.t + desc = { + desc = fp2_struggle.2014.desc.start + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2014_ai_secret_outcome = flag:prison } + desc = fp2_struggle.2014.desc.heavy.outcome.prison + } + triggered_desc = { + trigger = { scope:fp2_2014_ai_secret_outcome = flag:death } + desc = fp2_struggle.2014.desc.heavy.outcome.death + } + desc = fp2_struggle.2014.desc.light + } + } + + trigger = { + scope:fp2_2013_secret_owner = { is_available_ai_adult = yes } + scope:fp2_2013_prisoner_with_a_secret = { is_available_ai_adult = yes } + } + + on_trigger_fail = { + if = { + limit = { # Fallback - foreign ruler has died! + NOT = { + scope:fp2_2013_secret_owner = { + is_alive = yes + is_available_ai_adult = yes + } + } + } + send_interface_toast = { + type = event_death_neutral + desc = death_management.1007.t + left_icon = scope:fp2_2013_secret_owner + } + } + if = { + limit = { # Fallback - prisoner has died! + NOT = { scope:fp2_2013_prisoner_with_a_secret = { is_alive = yes } } + } + send_interface_toast = { + scope:fp2_2013_prisoner_with_a_secret = { save_temporary_scope_as = dead_character } + type = event_death_neutral + desc = death_management.1006.desc + left_icon = scope:fp2_2013_prisoner_with_a_secret + } + } + } + + immediate = { # LOGIC FOR AI RESPONSE + save_scope_value_as = { # Calculate how "strong" a secret is + name = fp2_2014_secret_strength + value = { + value = 0 + if = { + limit = { scope:fp2_2013_secret_to_tell = { is_criminal_for = scope:fp2_2013_secret_owner } } + add = 10 + } + if = { + limit = { scope:fp2_2013_secret_to_tell = { is_shunned_for = scope:fp2_2013_secret_owner } } + add = 5 + } + if = { + limit = { scope:fp2_2013_secret_to_tell = { secret_is_always_interesting_trigger = yes } } + add = 5 + } + } + } + if = { # IS THIS SECRET A THREAT TO ME? + limit = { scope:fp2_2014_secret_strength >= 10 } + scope:fp2_2013_secret_owner = { + hidden_effect = { + add_opinion = { + target = scope:fp2_2013_prisoner_with_a_secret + modifier = betrayed_me_opinion + opinion = -50 + } + } + add_opinion = { + target = root + modifier = did_not_tell_my_secret + opinion = 45 + } + progress_towards_friend_effect = { + REASON = friend_kept_my_secret + CHARACTER = root + OPINION = 0 + } + if = { + limit = { + has_dlc_feature = court_artifacts + any_character_artifact = { + NOT = { has_variable = historical_unique_artifact } + artifact_high_rarity_trigger = yes + } + } + random_character_artifact = { + limit = { + NOT = { has_variable = historical_unique_artifact } + artifact_high_rarity_trigger = yes + } + set_owner = root # If it breaks, use set_artifact_owner + } + } + + save_opinion_value_as = { + name = fp2_2014_opinion_of_swine + target = scope:fp2_2013_prisoner_with_a_secret + } + } + if = { # YES, AND I MUST HIDE IT (prison outcome) + limit = { + scope:fp2_2013_secret_owner = { + NAND = { + has_trait = paranoid + ai_compassion < 30 + } + } + } + save_scope_value_as = { + name = fp2_2014_ai_secret_outcome + value = flag:prison + } + scope:fp2_2013_secret_owner = { + rightfully_imprison_character_effect = { + TARGET = scope:fp2_2013_prisoner_with_a_secret + IMPRISONER = scope:fp2_2013_secret_owner + } + } + } + else = { # YES, AND I WILL TAKE NO CHANCES (execution outcome) + save_scope_value_as = { + name = fp2_2014_ai_secret_outcome + value = flag:death + } + + scope:fp2_2013_prisoner_with_a_secret = { + death = { + death_reason = death_torture + killer = scope:fp2_2013_secret_owner + } + } + } + } + else = { # NO, ACTUALLY THIS IS NOT A BIG DEAL (release outcome) + scope:fp2_2013_secret_owner = { + hidden_effect = { + add_opinion = { + target = scope:fp2_2013_prisoner_with_a_secret + modifier = betrayed_me_opinion + opinion = -25 + } + } + add_opinion = { + target = root + modifier = did_not_tell_my_secret + opinion = 25 + } + if = { + limit = { + has_dlc_feature = court_artifacts + any_character_artifact = { + NOT = { has_variable = historical_unique_artifact } + artifact_low_rarity_trigger = yes + } + } + random_character_artifact = { + limit = { + NOT = { has_variable = historical_unique_artifact } + artifact_low_rarity_trigger = yes + } + set_owner = root + } + } + else = { + progress_towards_friend_effect = { + REASON = friend_protected_secrets + CHARACTER = root + OPINION = 0 + } + } + } + save_scope_value_as = { + name = fp2_2014_ai_secret_outcome + value = flag:release + } + } + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { NOT = { scope:fp2_2014_ai_secret_outcome = flag:release } } + desc = south_asia.0039.a + } + desc = fp2_struggle.2014.b + } + } + } + } +} + +################################### +# Letter on The Back +# By Hugo Cortell +################################### +# (a post-it saying kick me) +################################### +scripted_trigger fp2_struggle_2015_vassal_check_trigger = { + is_available_ai_adult = yes + exists = location # Under no circumstance should it be necessary to need to check this + NOT = { has_trait = compassionate } +} + +fp2_struggle.2015 = { + type = character_event + title = fp2_struggle.2015.t + desc = fp2_struggle.2015.desc + cooldown = { years = 25 } + + theme = murder_scheme + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = chancellor + } + right_portrait = { + character = scope:fp2_struggle_2015_peasant_to_murder + animation = personality_forgiving + } + lower_right_portrait = scope:fp2_struggle_2015_murder_requester_vassal + + trigger = { + is_ai = no # Murder schemes are heavy for performance + has_fp2_dlc_trigger = yes + root.top_liege = root + + any_powerful_vassal = { + fp2_struggle_2015_vassal_check_trigger = yes + opinion = { # Redundant second time around + target = root + value < 30 + } + } + } + + immediate = { + random_vassal = { # From joe + limit = { + is_powerful_vassal = yes + fp2_struggle_2015_vassal_check_trigger = yes + opinion = { + target = root + value < 30 + } + } + save_opinion_value_as = { + name = liege_opinion + target = root + } + + save_scope_as = fp2_struggle_2015_murder_requester_vassal # Makes sure that one exists, even if [ThreadIndex != UINT32_MAX] causes the loop to skip a beat + } + while = { + limit = { + any_powerful_vassal = { + fp2_struggle_2015_vassal_check_trigger = yes + opinion = { + target = root + value < scope:liege_opinion + } + } + } + random_vassal = { + limit = { + is_powerful_vassal = yes + fp2_struggle_2015_vassal_check_trigger = yes + opinion = { + target = root + value < scope:liege_opinion + } + } + save_opinion_value_as = { + name = liege_opinion + target = root + } + save_scope_as = fp2_struggle_2015_murder_requester_vassal + } + } + + create_character = { + location = scope:fp2_struggle_2015_murder_requester_vassal.location + template = generic_peasant_character + diplomacy = { 8 13 } # High stat + trait = trusting + random_traits = yes + faith = scope:fp2_struggle_2015_murder_requester_vassal.location.county.faith + culture = scope:fp2_struggle_2015_murder_requester_vassal.location.county.culture + save_scope_as = fp2_struggle_2015_peasant_to_murder + } + + hidden_effect = { + scope:fp2_struggle_2015_peasant_to_murder = { + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = annoyed_opinion + opinion = -100 + } + } + + add_courtier = scope:fp2_struggle_2015_peasant_to_murder + } + } + + option = { # Comply and kill the unsuspecting courtier + name = fp2_struggle.2015.a + + trigger = { is_ai = no } + duel = { + skill = intrigue + value = average_skill_rating + + 10 = { + desc = fp2_struggle.2015.a.a + compare_modifier = { + value = scope:duel_value + multiplier = -1.25 + } + + send_interface_toast = { + type = event_intrigue_bad + title = murder_outcome.2302.t + left_icon = scope:fp2_struggle_2015_peasant_to_murder + + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = disappointed_opinion + opinion = -15 + } + + remove_courtier_or_guest = scope:fp2_struggle_2015_peasant_to_murder + custom_tooltip = fp2_struggle.2015.a.murder_scheme + hidden_effect = { + scope:fp2_struggle_2015_murder_requester_vassal = { + start_scheme = { + type = murder + target_character = scope:fp2_struggle_2015_peasant_to_murder + } + } + } + } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_peasant_to_murder + modifier = suspicion_opinion + opinion = -20 + } + + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.25 + } + + modifier = { + add = { + value = intrigue + multiply = 2 + round = yes + } + always = yes + } + modifier = { + add = 35 + has_trait = lifestyle_herbalist + } + modifier = { + add = 5 + has_trait = drunkard # You know how to disguise drinks + } + modifier = { + add = 15 + has_perk = swift_execution_perk + } + modifier = { + add = 10 # They add up + has_perk = a_job_done_right_perk + } + + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2015.a.b + left_icon = scope:fp2_struggle_2015_murder_requester_vassal + + scope:fp2_struggle_2015_peasant_to_murder = { + death = { + killer = ROOT + death_reason = death_poison + } + } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = helped_me_in_time_of_need + opinion = 40 + } + } + add_secret = { + type = secret_murder + target = scope:fp2_struggle_2015_peasant_to_murder + } + random_secret = { + type = secret_murder + limit = { + secret_target = scope:fp2_struggle_2015_peasant_to_murder + } + save_scope_as = fp2_2015_murder_secret + } + + if = { # AHA! YOU FOOL! I TRICKED YOU INTO COMMITING A CRIME! + limit = { + scope:fp2_struggle_2015_murder_requester_vassal = { + OR = { + has_relation_rival = ROOT + has_secret_relation_rival = ROOT # ??? + has_relation_nemesis = ROOT + + AND = { + has_dread_level_towards = { + target = ROOT + level <= 1 + } + OR = { + AND = { + has_trait = deceitful + opinion = { + target = root + value < -25 + } + } + AND = { + ai_boldness > 9 + ai_compassion < 1 + ai_honor < -29 + ai_vengefulness > -1 + } + } + } + } + } + } + + trigger_event = { # Usually I would use a notification but... + id = fp2_struggle.2016 # The narrative impact of a full letter is greater, it makes sure the betrayal stings. This vassal wrote just to rub salt in your eyes. + days = { 3 4 } + } + } + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + gallant = minor_stress_impact_gain + } + } + + option = { # Ignore the letter + name = fp2_struggle.2015.b + + trigger = { is_ai = no } + send_interface_toast = { + type = event_toast_effect_good + title = murder_outcome.4302.t + left_icon = scope:fp2_struggle_2015_murder_requester_vassal + right_icon = scope:fp2_struggle_2015_peasant_to_murder + + show_as_tooltip = { add_courtier = scope:fp2_struggle_2015_peasant_to_murder } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = broke_promise + } + } + + custom_tooltip = fp2_struggle.2015.a.murder_scheme + hidden_effect = { + scope:fp2_struggle_2015_murder_requester_vassal = { + start_scheme = { + type = murder + target_character = scope:fp2_struggle_2015_peasant_to_murder + } + } + } + } + + option = { # Warn the courtier about this (vassal may find out) + name = fp2_struggle.2015.c + + random_list = { + 75 = { + desc = fp2_struggle.2015.c.b + + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2015.c.b + left_icon = scope:fp2_struggle_2015_peasant_to_murder + right_icon = scope:fp2_struggle_2015_murder_requester_vassal + + scope:fp2_struggle_2015_peasant_to_murder = { silent_disappearance_effect = yes } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = helped_me_in_time_of_need + opinion = 25 # -15 points for suspicion (where is the body?) + } + } + } + 25 = { + desc = fp2_struggle.2015.c.a + send_interface_toast = { + type = event_intrigue_bad + title = fp2_struggle.2015.c.a + left_icon = scope:fp2_struggle_2015_peasant_to_murder + right_icon = scope:fp2_struggle_2015_murder_requester_vassal + + scope:fp2_struggle_2015_peasant_to_murder = { death = { death_reason = death_mysterious } } + reverse_add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = broke_promise + } + + stress_impact = { + forgiving = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + gallant = minor_stress_impact_gain + } + } + } + } + } +} + +fp2_struggle.2016 = { + type = letter_event + sender = scope:fp2_struggle_2015_murder_requester_vassal + opening = fp2_struggle.2016.t + desc = fp2_struggle.2016.desc + + option = { # Tricked, backstabbed and quite possibly, out-smarted by your cunning vassal/rival + name = fp2_struggle.2016.a + + hidden_effect = { scope:fp2_2015_murder_secret = { reveal_to = scope:fp2_struggle_2015_murder_requester_vassal } } + scope:fp2_struggle_2015_murder_requester_vassal = { + blackmail_target_with_secret_effect = { + SECRET = scope:fp2_2015_murder_secret + TARGET = ROOT + } + } + progress_towards_rival_effect = { + CHARACTER = scope:fp2_struggle_2015_murder_requester_vassal + REASON = rival_tricked_murder + OPINION = default_rival_opinion + } + add_opinion = { + target = scope:fp2_struggle_2015_murder_requester_vassal + modifier = betrayed_me_opinion + opinion = -60 + } + } +} + +################################### +# RETURN OF THE THIEF KING +# By Hugo Cortell +################################### +# Directors liked the original very much +########################################## +fp2_struggle.2021 = { # Main event + type = character_event + title = fp2_struggle.2021.t + desc = { + desc = fp2_struggle.2021.desc + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:cleared_out } + desc = fp2_struggle.2021.desc.alt.cutout + } + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:paid_off } + desc = fp2_struggle.2021.desc.alt.paidoff + } + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:worked_together } + desc = fp2_struggle.2021.desc.alt.work + } + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:lobbed_head } + desc = fp2_struggle.2021.desc.alt.behead + } + } + desc = { desc = fp2_struggle.2021.desc.outro } + } + theme = secret + override_background = { + trigger = { scope:fp2_2009_event_outcome = flag:cleared_out } + reference = alley_day + } + override_background = { + trigger = { scope:fp2_2009_event_outcome = flag:paid_off } + reference = tavern + } + override_background = { + trigger = { scope:fp2_2009_event_outcome = flag:worked_together } + reference = throne_room + } + override_background = { + trigger = { scope:fp2_2009_event_outcome = flag:lobbed_head } + reference = alley_night + } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fp2_2009_garduna_guild_master + animation = scheme + outfit_tags = { + western_stealth_hood + sub_saharan_high_nobility + mena_war_legwear + } + } + + trigger = { + fp2_character_involved_in_struggle_trigger = yes # To check that the struggle is still going on + exists = primary_title + scope:fp2_2009_garduna_guild_master = { + is_available_ai_adult = yes + OR = { # Is this char still looking for adventure or have they settled down? + is_pool_character = yes + is_pool_guest = yes + } + } + } + + immediate = { + title:c_napoli.title_province = { # Originally, the thieves were going to set up a guild there, but thats not very nice. + county = { + save_scope_as = fp2_2021_old_napoly + holder.top_liege = { + save_scope_as = fp2_2021_angry_italian # So instead you just get an opinion debuff for narrative impact. + } # If this were not such a strange event, I would actually make it affect the character mechanically. But there is little excuse here. + } + } + + # Spy Network Logic, once upon a time used to be elegant. + if = { + limit = { exists = struggle:iberian_struggle } + struggle:iberian_struggle = { + if = { + limit = { # Theoretically, effects which do not meet its conditions (the limit) are skipped over. However, the nightly has proven that wrong. + any_involved_ruler = { # As such we take a _much_ more conservative approach of triple checking everything. + exists = primary_title + has_any_secrets = yes + this != root + } + } + random_involved_ruler = { + limit = { + exists = primary_title + has_any_secrets = yes + this != root + } + random_secret = { save_scope_as = fp2_2021_secreto_numero_ichi } + } + + if = { + limit = { + any_involved_ruler = { + exists = primary_title + has_any_secrets = yes + NOT = { + this = root + any_secret = { this = scope:fp2_2021_secreto_numero_ichi } + } + } + } + random_involved_ruler = { + limit = { + exists = primary_title + has_any_secrets = yes + NOT = { + this = root + any_secret = { this = scope:fp2_2021_secreto_numero_ichi } + } + } + random_secret = { save_scope_as = fp2_2021_secreto_numero_ni } + } + } + } + } + } + + if = { + limit = { exists = cp:councillor_spymaster } + cp:councillor_spymaster = { save_scope_as = fp2_2021_spymaster } + } + + hidden_effect = { # Hides exceptions from players, fix is not necessary + scope:fp2_2009_garduna_guild_master = { + save_scope_as = dueltarget # For Loc + move_to_pool_at = root.location # Fixes endless loop where the thief gets stretched across half the map + } + } + } + + option = { # Send off to italy + name = fp2_struggle.2021.a + + scope:fp2_2009_garduna_guild_master = { + pay_short_term_gold = { + target = ROOT + gold = minor_gold_value + } + } + custom_tooltip = fp2_struggle.2021.a.a + scope:fp2_2021_angry_italian = { + add_opinion = { + target = root + modifier = raided_me_opinion + opinion = -40 + } + } + + hidden_effect = { # Possible random outcomes + random_list = { + 10 = { # "Retires", buys a house in italy and lives as an old man happily ever after (just like your dog went to a farm when it got old) + scope:fp2_2009_garduna_guild_master = { silent_disappearance_effect = yes } + + modifier = { + add = 30 + scope:fp2_2009_event_outcome = flag:lobbed_head + } + modifier = { + add = 20 + scope:fp2_2009_event_outcome = flag:worked_together + } + } + 30 = { # He just sorta roams around italy + scope:fp2_2009_garduna_guild_master = { move_to_pool_at = scope:fp2_2021_angry_italian.location } + + modifier = { + add = 10 + scope:fp2_2009_event_outcome = flag:cleared_out + } + } + 10 = { # Joins napolitan court + scope:fp2_2009_garduna_guild_master = { remove_nickname = yes } # Becomes a functional member of society + scope:fp2_2021_angry_italian = { + add_courtier = scope:fp2_2009_garduna_guild_master + + add_opinion = { + target = scope:fp2_2009_garduna_guild_master + modifier = impressed_opinion + opinion = 20 + } + reverse_add_opinion = { + target = scope:fp2_2009_garduna_guild_master + modifier = opinion_welcomed_with_tea + } + } + + modifier = { + add = 20 + scope:fp2_2009_event_outcome = flag:paid_off + } + } + } + } + } + + option = { # Recruit into court (cures courtier's depression if they were a member of the thief-king's gang) + name = fp2_struggle.2021.b + + pay_short_term_gold = { + target = scope:fp2_2009_garduna_guild_master + gold = medium_gold_value + } + every_powerful_vassal = { + limit = { NOT = { has_trait = forgiving } } + custom = fp2_every_major_vassal_notifier + add_opinion = { + target = root + modifier = suspicion_opinion + opinion = -15 + } + } + add_courtier = scope:fp2_2009_garduna_guild_master + if = { + limit = { exists = scope:fp2_2009_garduna_young_thief } + remove_trait = depressed_1 # My old boss survived! (though the rest are dead but shhh) + } + + hidden_effect = { + scope:fp2_2009_garduna_guild_master = { + add_opinion = { + target = root + modifier = hired_me_opinion + opinion = 15 + } + + if = { # There can only be one top dog, one master of the shadows. + limit = { scope:fp2_2021_spymaster != scope:fp2_2009_garduna_young_thief } + random = { + chance = 25 + set_relation_rival = { + target = scope:fp2_2021_spymaster + reason = rival_garduna_young_thief + } + } + } + } + } + } + + option = { # Establish a spy network + name = fp2_struggle.2021.c + flavor = fp2_struggle.2021.c.flavor + + trigger = { + OR = { + exists = scope:fp2_2021_secreto_numero_ichi + exists = scope:fp2_2021_secreto_numero_ni + } + } + + pay_short_term_gold = { + target = scope:fp2_2009_garduna_guild_master + gold = major_gold_value + } + + custom_tooltip = fp2_struggle.2021.c.a # Perhaps it can mention the spymaster? + hidden_effect = { # Note: You might end up learning secrets you already know, this is WAD + if = { + limit = { + exists = scope:fp2_2021_secreto_numero_ichi + exists = scope:fp2_2021_secreto_numero_ni + } + + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2021.c.spynet.a + + scope:fp2_2021_secreto_numero_ichi = { reveal_to = root } + scope:fp2_2021_secreto_numero_ni = { reveal_to = root } + } + } + else = { + if = { + limit = { exists = scope:fp2_2021_secreto_numero_ichi } + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2021.c.spynet.a + + scope:fp2_2021_secreto_numero_ichi = { reveal_to = root } + } + } + else_if = { + limit = { exists = scope:fp2_2021_secreto_numero_ni } + send_interface_toast = { + type = event_intrigue_good + title = fp2_struggle.2021.c.spynet.a + + scope:fp2_2021_secreto_numero_ni = { reveal_to = root } + } + } + } + } + + scope:fp2_2009_garduna_guild_master = { silent_disappearance_effect = yes } + } + + option = { # Duel option (get title late) + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:fp2_2009_event_outcome = flag:lobbed_head } + desc = fp2_struggle.2021.d.alt + } + desc = fp2_struggle.2021.d + } + } + } + trigger = { NOT = { age < 14 } } + + custom_tooltip = fp2_struggle.2021.d.b + show_as_tooltip = { + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + give_nickname = nick_the_Thief_Slayer + } + } + ROOT = { save_scope_as = fp2_2021_root_in_duel } + scope:fp2_2009_garduna_guild_master = { + set_variable = { + name = signature_weapon + value = flag:dagger + } + } + + if = { # Changes the background to match, you cannot use conditional values on scripted effects + limit = { scope:fp2_2009_event_outcome = flag:cleared_out } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = alley_day + OUTPUT_EVENT = fp2_struggle.2022 + INVALIDATION_EVENT = fp2_struggle.2022 + } + } + else_if = { + limit = { scope:fp2_2009_event_outcome = flag:paid_off } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = tavern + OUTPUT_EVENT = fp2_struggle.2022 + INVALIDATION_EVENT = fp2_struggle.2022 + } + } + else_if = { + limit = { scope:fp2_2009_event_outcome = flag:worked_together } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = fp2_struggle.2022 + INVALIDATION_EVENT = fp2_struggle.2022 + } + } + else_if = { + limit = { scope:fp2_2009_event_outcome = flag:lobbed_head } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fp2_2009_garduna_guild_master + FATALITY = always + FIXED = no + LOCALE = alley_night + OUTPUT_EVENT = fp2_struggle.2022 + INVALIDATION_EVENT = fp2_struggle.2022 + } + } + } + + after = { remove_global_variable = fp2_struggle_2009_thief_king_char } +} + +fp2_struggle.2022 = { # You become the KING OF THIEVES again, well, late is better than never... + hidden = yes + immediate = { + if = { + limit = { + exists = scope:fp2_2022_reuse_gate + root = scope:fp2_2021_root_in_duel + } + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2021.d.a + right_icon = ROOT + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + give_nickname = nick_the_Thief_Slayer + } + add_prestige = medium_prestige_gain # Penalty for finishing the job late + add_gold = minor_gold_value + } + } + else = { + save_scope_as = fp2_2022_reuse_gate + trigger_event = { + id = fp2_struggle.2022 + days = 1 + } + } + } +} + +################################### +# The Price of War +# by Veronica Pazos +################################### +# You pawn your crown to get some gold to help in your war +############################################################## +fp2_struggle.3001 = { + type = character_event + title = fp2_struggle.3001.t + desc = { + desc = fp2_struggle.3001.desc + first_valid = { + triggered_desc = { + trigger = { + is_at_war = yes + } + desc = fp2_struggle.3001.desc_war_intro + } + triggered_desc = { + trigger = { + is_at_war = no + } + desc = fp2_struggle.3001.desc_no_war_intro + } + } + desc = fp2_struggle.3001.desc_outro + } + + theme = crown + cooldown = { years = 5 } #in case you don't sell your crown you'll have to wait to get the chance again + override_background = { reference = council_chamber } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = cp:councillor_steward + animation = personality_rational + } + + trigger = { + has_fp2_dlc_trigger = yes #dlc check + is_available_even_at_war_adult = yes + primary_title.tier >= tier_kingdom #so we make sure you have an actual crown + OR = { #someone has to suggest this + exists = cp:councillor_steward + any_courtier = { + stewardship >= medium_skill_rating + } + } + gold < minor_gold_value #you don't have much gold + NOT = { has_character_flag = sold_crown_charmod } #you haven't sold your crown before + struggle:iberian_struggle = { + NOT = { is_struggle_phase = struggle_iberia_phase_compromise } #you're not in the compromise phase + } + } + + weight_multiplier = { #more likely to trigger the poorer you are + modifier = { + add = 0.25 + gold <= 25 + } + modifier = { + add = 0.25 + gold <= 20 + } + modifier = { + add = 0.5 + gold <= 15 + } + modifier = { + add = 0.5 + gold <= 10 + } + } + + immediate = { + play_music_cue = "mx_cue_touching_moment" + if = { + limit = { + exists = cp:councillor_steward + } + cp:councillor_steward = { save_scope_as = struggle_3001_steward } + } + else = { + random_courtier = { + limit = { + stewardship >= medium_skill_rating + } + save_scope_as = struggle_3001_steward + } + } + if = { + limit = { + has_any_artifact = yes + any_character_artifact = { artifact_type = helmet } #we check if you have a crown artifact + } + random_character_artifact = { + limit = { artifact_type = helmet } + save_scope_as = struggle_3001_crown_artifact + } + } + if = { + limit = { + is_married = yes + } + primary_spouse = { + save_scope_as = struggle_3001_spouse + } + } + } + + option = { #sell your own crown + name = fp2_struggle.3001.a + flavor = fp2_struggle.3001.a_flavour + add_character_flag = sold_crown_charmod #you lose your crown + give_nickname = nick_the_crownless #now everyone knows + add_gold = medium_gold_max_value + add_prestige = major_prestige_loss + stress_impact = { + arrogant = medium_stress_impact_gain + humble = minor_stress_loss + } + + ai_chance = { + base = 5 + modifier = { + add = 5 + gold <= 15 + } + ai_value_modifier = { + ai_greed = 0.15 + ai_rationality = 0.2 + } + } + } + + option = { #sell artifact crown instead + name = fp2_struggle.3001.b + trigger = { #triggers if you actually have one + any_character_artifact = { + artifact_slot_type = helmet + } + } + add_gold = medium_gold_value + add_prestige = minor_prestige_loss + destroy_artifact = scope:struggle_3001_crown_artifact + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + modifier = { + add = 5 + gold <= 15 + } + ai_value_modifier = { + ai_greed = -0.3 + ai_rationality = 0.2 + } + } + } + + option = { #but my spouse also has a crown... + name = fp2_struggle.3001.c + flavor = fp2_struggle.3001.c_flavour + trigger = { + is_married = yes #you have a spouse + scope:struggle_3001_spouse = { + NOT = { has_character_flag = sold_crown_charmod } #and you didn't sell their crown + } + } + add_gold = medium_gold_value + add_prestige = minor_prestige_loss + if = { + limit = { + scope:struggle_3001_spouse = { + has_trait = humble + } + } + scope:struggle_3001_spouse = { + add_opinion = { + target = ROOT + opinion = -25 #they are displeased + modifier = struggle_3001_spouse_crown_modifier + } + add_character_flag = sold_crown_charmod #your spouse loses their crown + } + } + else = { + scope:struggle_3001_spouse = { + add_opinion = { + target = ROOT + opinion = -75 #they REALLY hate you + modifier = struggle_3001_spouse_crown_modifier + } + add_character_flag = sold_crown_charmod #your spouse loses their crown + } + } + stress_impact = { + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = 5 + gold <= 15 + } + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { #I'll be dead before losing my crown + name = fp2_struggle.3001.d + stress_impact = { + base = medium_stress_gain #you really need money + } + + ai_chance = { + base = 5 + } + } +} + +################################### +# Order of the Hatchet +# By Veronica Pazos +################################### +# Order of the Hachet - Woman are defending your city +####################################################### +fp2_struggle.3011 = { + type = character_event + title = fp2_struggle.3011.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + desc = fp2_struggle.3011.desc_men #reverse genre event + } + desc = fp2_struggle.3011.desc + } + desc = fp2_struggle.3011.desc_outro + } + + theme = realm + cooldown = { years = 20 } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = cp:councillor_marshal + animation = marshal + } + lower_right_portrait = scope:bishop + + trigger = { + has_fp2_dlc_trigger = yes + fp2_character_any_involvement_iberian_struggle_trigger = yes #there's an ongoing struggle (includes dlc check) + is_available_even_at_war_adult = yes + is_landed_or_landless_administrative = yes + any_character_war = { + war_days >= 30 #a battle has likely happened + } + exists = cp:councillor_marshal #someone tells you about the incident + exists = cp:councillor_court_chaplain + faith = { + NOT = { has_doctrine = doctrine_gender_equal } #checks that this is unusual + } + OR = { #checks again that this makes sense, Ola Jentzsch's note + has_game_rule = default_gender_equality + has_game_rule = inversed_gender_equality + } + struggle:iberian_struggle = { #there's a struggle going on + OR = { + is_struggle_phase = struggle_iberia_phase_hostility + is_struggle_phase = struggle_iberia_phase_opportunity + } + } + any_sub_realm_barony = { + exists = holder + title_province = { has_holding_type = city_holding } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + cp:councillor_marshal = { save_scope_as = struggle_3011_marshal } + cp:councillor_court_chaplain = { save_scope_as = bishop } + random_sub_realm_barony = { + limit = { + exists = holder + title_province = { has_holding_type = city_holding } + } + county = { save_scope_as = struggle_3011_county_town } + } + } + + option = { #that's dope + name = fp2_struggle.3011.a + scope:struggle_3011_county_town = { + add_county_modifier = { + modifier = fp2_order_of_the_hachet_modifier + years = 5 + } + } + scope:bishop = { + add_opinion = { + target = ROOT + opinion = -25 + modifier = angry_opinion + } + } + every_vassal = { + custom = custom.every_zealous_callous_or_sadistic_vassal + limit = { + OR = { + has_trait = zealous + has_trait = callous + } + } + add_opinion = { + target = ROOT + opinion = -10 + modifier = annoyed_opinion + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = -1 #zealous AI will never pick this + ai_compassion = 0.2 + ai_honor = 0.2 + } + } + } + + option = { #ridiculous + name = { + trigger = { + faith = { has_doctrine = doctrine_gender_male_dominated } + } + text = fp2_struggle.3011.b + } + name = { + trigger = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + text = fp2_struggle.3011.b_men + } + scope:bishop = { + add_opinion = { + target = ROOT + opinion = 10 + modifier = grateful_opinion + } + } + if = { + limit = { + faith = { has_doctrine = doctrine_gender_male_dominated } + } + every_courtier = { + custom = custom.every_female_courtier + limit = { + is_female = yes + } + add_opinion = { + target = ROOT + opinion = -10 + modifier = insult_opinion + } + } + } + else_if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + every_courtier = { + custom = custom.every_male_courtier + limit = { + is_male = yes + } + add_opinion = { + target = ROOT + opinion = -10 + modifier = insult_opinion + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 0.2 + ai_rationality = -0.2 + } + } + } + + option = { #witches! + name = fp2_struggle.3011.c + trigger = { + has_trait = zealous + } + add_dread = medium_dread_gain + add_character_modifier = { + modifier = fp2_punished_order_of_the_hachet_modifier + years = 5 + } + + ai_chance = { #zealous AI will pick this option + base = 1 + ai_value_modifier = { + ai_zeal = 0.8 + ai_energy = -0.7 + ai_vengefulness = 0.5 + } + } + } + + option = { #I shall save these damsels in distress! + name = fp2_struggle.3011.d + trigger = { + faith = { has_doctrine = doctrine_gender_male_dominated } + OR = { + has_trait = gallant + has_trait = arrogant + culture = { + has_cultural_tradition = tradition_chanson_de_geste + } + } + } + random_list = { #how does that go + 75 = { + add_stress = medium_stress_gain + } + 25 = { + add_stress = medium_stress_impact_loss + } + } + + ai_chance = { + base = 10 + } + } +} + +################################### +# The Wrath of Heaven +# By Veronica Pazos +################################### +# "Lightning stones" in a siege +################################### +fp2_struggle.3021 = { + type = character_event + title = fp2_struggle.3021.t + desc = fp2_struggle.3021.desc + + theme = martial + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:struggle_3021_knight + animation = shock + } + lower_right_portrait = scope:struggle_3021_courtier + + trigger = { + has_fp2_dlc_trigger = yes + fp2_character_any_involvement_iberian_struggle_trigger = yes + is_available_even_at_war_adult = yes + NOT = { has_character_flag = had_event_struggle_3021 } #so you don't research the same thing again + struggle:iberian_struggle = { #there's some kind of hostility going on + is_struggle_phase = struggle_iberia_phase_hostility + + } + any_knight = { #someone sees this + is_available_healthy_ai_adult = yes + } + any_courtier = { #someone will research this + is_available_healthy_ai_adult = yes + count > 0 + } + any_directly_owned_province = { #we have a castle to use it on + has_holding_type = castle_holding + NOT = { has_province_modifier = fp2_lightning_stones_modifier } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_at_war = yes + } + } + + immediate = { + add_character_flag = had_event_struggle_3021 + random_knight = { + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = struggle_3021_knight + } + every_courtier = { #get your courtiers + limit = { + is_available_ai_adult = yes + this != root.primary_spouse #you shouldn't lose your spouse or heir because of this + this != root.player_heir + } + add_to_list = struggle_3021_courtier_list + } + ordered_in_list = { #sort through to pick the one with highest learning + list = struggle_3021_courtier_list + order_by = learning + max = 1 + save_scope_as = struggle_3021_courtier + } + random_directly_owned_province = { #this is where we can try it + limit = { + has_holding_type = castle_holding + } + save_scope_as = lightning_stones_province + } + } + + option = { #we need to research this stuff + name = fp2_struggle.3021.a + + scope:struggle_3021_courtier = { #This is who is doing the research + duel = { + skill = learning #The skill needed for research + value = average_skill_rating #Found in 00_basic_values.txt - An 8 in this case + 12 = { #Success - We keep the weight values fairly close to our skill values so they can be affected. 20 is a good max. + compare_modifier = { + value = scope:duel_value + multiplier = 2 #This multiplies the *difference* between the skill and the target. Meaning folks with good skills will be much more likely to get it. + min = -5 #This prevents truly terrible people from completely losing the chance to succeed. + } + desc = good_struggle_3021_courtier_desc + root = { + send_interface_toast = { + title = good_stone_research_title + left_icon = scope:struggle_3021_courtier + scope:lightning_stones_province = { + add_province_modifier = { + modifier = fp2_lightning_stones_modifier + } + } + } + } + } + 14 = { #Failure! + compare_modifier = { + value = scope:duel_value + multiplier = -2 #This multiplies and inverts the *difference* between the skill and the target. Meaning folks with bad skills will be much more likely to get this. + } + desc = bad_struggle_3021_courtier_desc + root = { + send_interface_toast = { #send a toast + title = bad_stone_research_title + desc = bad_struggle_3021_courtier_desc + left_icon = scope:struggle_3021_courtier + scope:struggle_3021_courtier = { + death = { death_reason = death_accident } + } + } + } + } + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + } + + option = { #this is not the greatest idea + name = fp2_struggle.3021.b + reverse_add_opinion = { + target = scope:struggle_3021_courtier + modifier = insulted_opinion + opinion = -15 + } + stress_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_gain + craven = minor_stress_impact_loss + brave = medium_stress_impact_gain + } + } + + option = { #we can maybe use this in a feast + name = fp2_struggle.3021.c + trigger = { + OR = { + has_trait = vengeful + has_trait = deceitful + has_trait = arbitrary + has_trait = callous + intrigue >= high_skill_rating + has_lifestyle = intrigue_lifestyle + } + } + + duel = { + skill = learning + target = scope:struggle_3021_courtier + 30 = { #it works + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + desc = good_struggle_3021_courtier_desc + root = { + send_interface_toast = { + title = good_stone_research_title + left_icon = scope:struggle_3021_courtier + + add_character_modifier = { + modifier = fp2_lightning_stones_poison_modifier + years = 5 + } + } + } + } + 70 = { #it doesnt work + compare_modifier = { + value = scope:duel_value + } + desc = bad_struggle_3021_courtier_desc + root = { + send_interface_toast = { #send a toast + title = bad_stone_research_title + desc = bad_struggle_3021_courtier_desc + left_icon = scope:struggle_3021_courtier + + scope:struggle_3021_courtier = { + death = { death_reason = death_accident } + } + } + } + } + } + + stress_impact = { + forgiving = medium_stress_impact_gain + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.2 + ai_vengefulness = 1 + } + } + } + + option = { #god's punihsment! + name = fp2_struggle.3021.d + trigger = { + OR = { + has_trait = zealous + stress >= high_medium_stress + } + } + add_piety = minor_piety_gain + stress_impact = { + zealous = minor_stress_loss + } + } + + option = { #lightning stones for the lightning stone god + name = fp2_struggle.3021.e + trigger = { + religion = { is_in_family = rf_pagan } + } + add_piety = medium_piety_gain + } +} diff --git a/N3OW/events/dlc/fp2/fp2_yearly_events.txt b/N3OW/events/dlc/fp2/fp2_yearly_events.txt new file mode 100644 index 00000000..9075d9a1 --- /dev/null +++ b/N3OW/events/dlc/fp2/fp2_yearly_events.txt @@ -0,0 +1,6882 @@ +namespace = fp2_yearly + +### EVENT LIST #################################################################### +## XXXX - XXXX YYY by ZZZ +## 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 +## 1005 - 1005 Lost Viking by Daniel Moore +## 1006 - 1007 Viking Cheese by Daniel Moore +## 1008 - 1008 Consuming the Cheese by Daniel Moore +## 2020 - 2020 Açò es or, xata! by Hugo Cortell +## 2025 - 2025 Suffering From Success by Hugo Cortell +## 3000 - 3000 Neighboring Muslims are growing rice by Alexander Oltner +## 3001 - 3001 You commission your epitaph by Veronica Pazos +## 3002 - 3002 Oh my god they were roommates by Veronica Pazos +## 3003 - 3003 Best friend throws a terrible party by Veronica Pazos +## 4001 - 4001 You fancy a little siesta by Nick Meredith +## 4002 - 4002 County is increasingly religiously intertwined by Nick Meredith +## 4003 - 4003 The road to Santiago is under threat from bandits by Nick Meredith +## 4004 - 4004 Talented Mozarab offers their services by Nick Meredith +## 4005 - 4005 Mozarabs in a city ask for their own quarter by Nick Meredith +## 4006 - 4006 Mozarabs ask for permission to build churches by Nick Meredith +## 4007 - 4007 Finding a shell on the road to Santiago by Nick Meredith +## 4008 - 4008 Folk stories around the fireside by Nick Meredith +## 4009 - 4009 Visiting the Malato Tree by Nick Meredith +## 4010 - 4010 Finding a Verraco by Nick Meredith +## 8000 - 8000 Destroying the Vineyards by Ola Jentzsch +## 8001 - 8001 Assembling the Cortes by Ola Jentzsch +## 8002 - 8002 Dietary Dilemma By Ola Jentzsch +## 8003 - 8003 Flight of Fancy By Ola Jentzsch +## 8004 - 8004 Trasnlation Schools By Ola Jentzsch +## 8005 - 8005 Under the Stone Pine by Ola Jentzsch +## 8006 - 8006 Saqaliba Settlers by Ola Jentzsch +## 9000 - 9002 Conversos and Jewish events By James Beaumont +## 9005 - 9005 Toledan Nights By James Beaumont +## 9006 - 9006 Local bishop mad his church faces the wrong way By James Beaumont +################################################################################### +# A lot of effort went into the readability of these lists and headers # +# In fact, now there have been two whole passes of file organization # +################################################################################### + +################################### +# Chess Two +# By Daniel Moore +################################### +fp2_yearly.1001 = { + type = character_event + title = fp2_yearly.1001.t + desc = fp2_yearly.1001.desc + theme = crown + left_portrait = { + character = root + animation = worry + + } + + trigger = { + #Strategy Games Culture Tradition + has_fp2_dlc_trigger = yes + is_landed_or_landless_administrative = yes + capital_province = { + geographical_region = world_europe_west_iberia + } + + NOT = { + has_character_flag = fp2_yearly.1001 + } + } + + immediate = { + add_character_flag = fp2_yearly.1001 + + } + + option = { #Torture the pawns + name = fp2_yearly.1001.c + + trigger = { + OR = { + has_trait = sadistic + has_trait = torturer + dread > medium_dread + } + } + + add_dread = minor_dread_gain + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + option = { #King should be stronger + name = fp2_yearly.1001.a + + add_prestige = medium_prestige_value + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + + } + + option = { #Bishop should be stronger + name = fp2_yearly.1001.b + + add_piety = medium_piety_value + + add_character_modifier = { + modifier = fp2_respected_clergy_chess + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } +} + +################################### +# Compromising Position +# By Daniel Moore +################################### +fp2_yearly.1002 = { + type = character_event + title = fp2_yearly.1002.t + desc = fp2_yearly.1002.desc + theme = seduction + left_portrait = { + character = root + animation = shock + + } + + right_portrait = { + character = scope:deviant_courtier + animation = prisondungeon + } + + trigger = { + has_fp2_dlc_trigger = yes + is_adult = yes + is_landed_or_landless_administrative = yes + any_courtier = { is_available_healthy_ai_adult = yes } + + NOT = { + has_character_flag = fp2_yearly.1002 + } + } + + immediate = { + add_character_flag = fp2_yearly.1002 + + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + OR = { + has_trait = deviant + any_secret = { + type = secret_deviant + } + } + } + + save_scope_as = deviant_courtier + } + + + if = { + limit = { + NOT = { exists = scope:deviant_courtier} + } + hidden_effect = { + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + + give_deviant_secret_or_trait_effect = yes + save_scope_as = deviant_courtier + } + } + } + + scope:deviant_courtier = { + + add_character_flag = { + flag = is_naked + days = 1 + } + + add_character_flag = { + flag = temporarily_blinded + days = 1 + } + } + } + + + option = { + name = fp2_yearly.1002.b + scope:deviant_courtier = { + random_secret = { + type = secret_deviant + reveal_to = root + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_honor = -1 + } + } + + stress_impact = { + deviant = medium_stress_gain + } + + } + + option = { + name = fp2_yearly.1002.c + stress_impact = { + deviant = medium_stress_loss + } + + if = { + limit = { + NOT = { + any_secret = { + type = secret_deviant + } + } + } + give_deviant_secret_or_trait_effect = yes + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_energy = 1 + ai_zeal = -1 + } + } + } + + option = { + name = fp2_yearly.1002.a + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + + stress_impact = { + deviant = medium_stress_gain + + } + } + + after = { + scope:deviant_courtier = { + remove_character_flag = is_naked + } + } +} + +################################### +# Tilting at Giants +# By Daniel Moore +################################### +fp2_yearly.1003 = { + type = character_event + title = fp2_yearly.1003.t + desc = fp2_yearly.1003.desc + theme = realm + right_portrait = { + character = scope:injured_knight + animation = paranoia + + } + + override_background = { reference = farmland } + + trigger = { + has_fp2_dlc_trigger = yes + any_knight = { + is_available_healthy_ai_adult = yes + } + + capital_province = { + geographical_region = world_europe_west_iberia + } + ROOT.culture = { + has_innovation = innovation_windmills + } + + NOT = { + has_character_flag = fp2_yearly.1003 + } + + + + + } + + immediate = { + + add_character_flag = fp2_yearly.1003 + random_knight = { + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = injured_knight + } + + scope:injured_knight = { + increase_wounds_effect = { REASON = fight } + } + + } + + option = { # + name = fp2_yearly.1003.a + remove_short_term_gold = medium_gold_value + root.capital_county = { + change_county_control = 5 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 1 + } + } + } + + option = { # + name = fp2_yearly.1003.b + root.capital_county = { + change_county_control = -10 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + } + } + } +} + +################################### +# The Hawk of Quarysh +# By Daniel Moore +################################### +fp2_yearly.1004 = { + type = character_event + title = fp2_yearly.1004.t + desc = fp2_yearly.1004.desc + theme = learning + left_portrait = { + character = root + animation = worry + } + + + trigger = { + has_fp2_dlc_trigger = yes + + has_religion = religion:islam_religion + + capital_province = { + geographical_region = world_europe_west_iberia + } + + NOT = { + has_character_flag = fp2_yearly.1004 + } + } + + cooldown = { + years = 50 + } + + immediate = { + add_character_flag = fp2_yearly.1004 + + character:73679 = { + save_scope_as = hawk_of_quraysh + } + + dynasty:597 = { + save_scope_as = hawk_dynasty + } + + dynasty:100721 = { + save_scope_as = abbasid_dynasty + } + } + + option = { #I'm related! + name = fp2_yearly.1004.c + trigger = { + dynasty = { + this = scope:hawk_dynasty + } + } + + ai_chance = { + base = 1000 + } + add_prestige = medium_prestige_value + } + + option = { #How he inspired soldiers + name = fp2_yearly.1004.a + add_character_modifier = { + modifier = fp2_hawk_of_quarysh_martial_modifier + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + } + } + + option = { #How diplomatic he was + name = fp2_yearly.1004.b + add_character_modifier = { + modifier = fp2_hawk_of_quarysh_diplomacy_modifier + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_compassion = 1 + } + } + } +} + +################################### +# Lost Viking +# By Daniel Moore +################################### +fp2_yearly.1005 = { + type = character_event + title = fp2_yearly.1005.t + desc = fp2_yearly.1005.desc + theme = realm + left_portrait = { + character = root + animation = worry + + } + + right_portrait = { + character = scope:hidden_viking + animation = anger + } + + trigger = { + has_fp2_dlc_trigger = yes + any_held_county = { + any_county_province = { + geographical_region = world_europe_west_iberia + } + } + + NOT = { + has_character_flag = fp2_yearly.1005 + } + } + + cooldown = { years = 50 } + + immediate = { + add_character_flag = fp2_yearly.1005 + + random_held_county = { + limit = { any_county_province = { geographical_region = world_europe_west_iberia } } + save_scope_as = viking_county + } + + + create_character = { + template = fp1_jomsviking_bigwig + location = root.capital_province + trait = compassionate + trait = scarred + save_scope_as = hidden_viking + } + } + + option = { + name = fp2_yearly.1005.a + add_courtier = scope:hidden_viking + + scope:viking_county = { + change_county_control = -5 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_compassion = 1 + } + } + } + + option = { + name = fp2_yearly.1005.b + + scope:hidden_viking = { + death = { + death_reason = death_execution + killer = root + } + } + + scope:viking_county = { + change_county_control = -10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + ai_compassion = -1 + } + } + } + + option = { + name = fp2_yearly.1005.c + scope:viking_county = { + change_county_control = 5 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +################################### +# Viking Cheese +# By Daniel Moore +################################### +fp2_yearly.1006 = { + type = character_event + title = fp2_yearly.1006.t + desc = fp2_yearly.1006.desc + theme = realm + override_background = { reference = wilderness_mountains } + left_portrait = { + character = root + animation = worry + + } + + right_portrait = { + character = scope:cheese_trader + animation = scheme + } + + + + trigger = { + has_fp2_dlc_trigger = yes + any_held_county = { + any_county_province = { + geographical_region = world_europe_west_iberia + } + } + + NOT = { + has_character_flag = fp2_yearly.1006 + } + + } + + immediate = { + add_character_flag = fp2_yearly.1006 + + random_held_county = { + limit = { + any_county_province = { + geographical_region = world_europe_west_iberia + } + } + save_scope_as = viking_county + } + + + create_character = { + template = generic_peasant_character + location = root.capital_province + + save_scope_as = cheese_trader + } + } + + option = { #Lose gold gain cheese + name = fp2_yearly.1006.a + remove_short_term_gold = minor_gold_value + #Cheese based bonus + stress_impact = { + base = miniscule_stress_impact_loss + gluttonous = minor_stress_impact_loss + comfort_eater = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + } + } + } + + option = { #You courageously chase the cheese + name = fp2_yearly.1006.b + + hidden_effect = { + random_list = { + 10 = { + trigger_event = { + id = fp2_yearly.1007 + days = { 10 20 } + } + } + + 5 = { + + } + } + } + + + custom_tooltip = fp2.1006.b.tt + } + + option = { #Nothing happens you hate cheese and having fun + name = fp2_yearly.1006.c + stress_impact = { + gluttonous = miniscule_stress_impact_gain + comfort_eater = miniscule_stress_impact_gain + eccentric = miniscule_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +fp2_yearly.1007 = { + type = character_event + title = fp2_yearly.1007.t + desc = fp2_yearly.1007.desc + theme = realm + left_portrait = { + character = root + animation = sadness + } + + right_portrait = { + character = scope:fake_cheese_viking + animation = beg + } + + trigger = { + has_fp2_dlc_trigger = yes + capital_province = { + geographical_region = world_europe_west_iberia + } + + NOT = { + has_character_flag = fp2_yearly.1007 + } + + } + + immediate = { + + add_character_flag = fp2_yearly.1007 + + root.capital_county = { + save_scope_as = viking_county + } + + create_character = { + template = generic_peasant_character + location = root.capital_province + + save_scope_as = fake_cheese_viking + } + } + + option = { + name = fp2_yearly.1007.a + + add_prestige = miniscule_prestige_value + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + option = { + name = fp2_yearly.1007.b + stress_impact = { + gluttonous = major_stress_loss + } + + add_gold = minor_gold_value + + create_artifact = { + name = fp2_cheese_artifact + description = fp2_cheese_artifact_desc + modifier = artifact_health_gain_1_modifier + modifier = artifact_attraction_opinion_negative_1_modifier + type = miscellaneous + visuals = pouch + + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + set_variable = has_cheese_artifact + + save_scope_as = cheese_artifact + } + } +} + +################################### +# Consuming the Cheese +# By Daniel Moore +################################### +fp2_yearly.1008 = { + type = character_event + title = fp2_yearly.1008.t + desc = fp2_yearly.1008.desc + theme = realm + override_background = { reference = bp1_wine_cellar } + left_portrait = { + character = root + animation = ecstasy + + } + + trigger = { + any_character_artifact = { + has_variable = has_cheese_artifact + } + + } + + immediate = { + + random_character_artifact = { + limit = { + has_variable = has_cheese_artifact + } + save_scope_as = cheese_artifact + } + + } + + option = { + name = fp2_yearly.1008.a + add_stress = scope:cheese_artifact.cheese_artifact_strength + + destroy_artifact = scope:cheese_artifact + + } + + option = { + name = fp2_yearly.1008.b + } + +} + +################################### +# Açò es or, xata! +# By Hugo Cortell +################################### +# (hurray for UTF8) +################################### +fp2_yearly.2020 = { + type = character_event + title = fp2_struggle.2020.t # Removed variation for Jaime I, as he is not in the game + desc = fp2_struggle.2020.desc # Breaks convention, usually events do not tell the player character how they feel. But it is fitting for this thematically tounge-and-cheek event. + + theme = recovery + override_background = { reference = farmland } + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:fp2_2020_laxatador + animation = beg + } + cooldown = { years = 100 } + + weight_multiplier = { + base = 1 + modifier = { + add = 5 + has_trait = gluttonous + } + } + trigger = { + has_fp2_dlc_trigger = yes + is_landed = yes + is_ai = no # The AI has no use for narrative-focused events + OR = { + has_title = title:c_valencia + title:c_valencia = { + holder = { + OR = { + liege = root + top_liege = root + } + } + } + } + title:c_valencia = { + NOR = { + has_county_modifier = fp2_horchata_colonialism_modifier + has_county_modifier = governance_1054_satisfied_peasants_modifier + has_county_modifier = fp2_funded_agriculture_modifier + } + } + } + + immediate = { + title:c_valencia.title_province = { save_scope_as = fp2_2020_valencia } + + create_character = { + age = { 19 36 } + location = scope:fp2_2020_valencia + gender = female + trait = beauty_good_2 # Chata, does not quite translate to beautiful, but english speakers might expect it to. + trait = logistician + trait = diligent + trait = temperate + trait = compassionate + random_traits = no + culture = scope:fp2_2020_valencia.culture + faith = scope:fp2_2020_valencia.faith + dynasty = none + save_scope_as = fp2_2020_laxatador + } + } + + option = { # Engage in resource extraction + name = fp2_struggle.2020.a + flavor = fp2_struggle.2020.a.desc + + trigger = { + OR = { + has_trait = gluttonous + has_trait = comfort_eater + } + } + + scope:fp2_2020_valencia.county = { + add_county_modifier = { + modifier = fp2_horchata_colonialism_modifier + years = 10 + } + } + + root.capital_county = { # The people love this + add_county_modifier = { + modifier = governance_1054_satisfied_peasants_modifier + years = 15 + } + } + } + + option = { # Give them money to make more + name = fp2_struggle.2020.d + + trigger = { + NOT = { + has_trait = gluttonous + has_trait = comfort_eater + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:fp2_2020_valencia.county = { + add_county_modifier = { + modifier = fp2_funded_agriculture_modifier + years = 15 + } + } + } + + option = { # Take a few barrels for the family (wholesome outcome) + name = fp2_struggle.2020.b + + every_close_family_member = { + custom = all_close_family_members + add_opinion = { + target = root + modifier = delicious_morsel_opinion + opinion = 10 + } + } + } + + option = { # NO! THE DEVIL MUST BE TEMPTING ME (evil outcome) + name = fp2_struggle.2020.c + flavor = fp2_struggle.2020.c.desc + + stress_impact = { gluttonous = minor_stress_impact_gain } # As you need to be glut to trigger the event, the stress is reduced to compensate + if = { + limit = { has_trait = gluttonous } + add_prestige = medium_prestige_gain # Resisting is very difficult + } + else = { add_prestige = minor_prestige_gain } + + } + + after = { scope:fp2_2020_laxatador = { silent_disappearance_effect = yes } } +} + +################################### +# Suffering From Success +# By Hugo Cortell +################################### +fp2_yearly.2025 = { + type = character_event + title = fp2_struggle.2025.t + desc = fp2_struggle.2025.desc + theme = realm + override_background = { reference = wilderness_mountains } + cooldown = { years = 4 } + left_portrait = { + character = scope:fp2_2025_marshal + animation = flirtation_left + } + right_portrait = { + character = root + triggered_animation = { + trigger = { # Is sad + OR ={ + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = compassionate + has_trait = gallant + has_trait = peasant_leader + } + } + animation = sadness + } + animation = war_defender + } + + trigger = { + gold > medium_gold_value + + any_held_county = { + any_county_province = { geographical_region = world_europe_west_iberia } + recent_history = { + type = conquest + years = 4 + } + } + + OR = { + exists = cp:councillor_steward + exists = cp:councillor_marshal + } + } + + immediate = { + random_held_county = { + limit = { + any_county_province = { geographical_region = world_europe_west_iberia } + recent_history = { + type = conquest + years = 4 + } + } + save_scope_as = fp2_2025_razed_land + } + + if = { + limit = { exists = cp:councillor_marshal } + cp:councillor_marshal = { save_scope_as = fp2_2025_marshal } + } + else = { cp:councillor_steward = { save_scope_as = fp2_2025_marshal } } + } + + option = { # No more war from them. Let them rebuild in peace. + name = fp2_struggle.2025.a + + trigger = { + OR ={ + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = compassionate + has_trait = gallant + has_trait = peasant_leader + } + } + + add_stress = minor_stress_impact_loss + send_interface_toast = { + type = event_toast_effect_good + title = fp2_vow_against_conscription_modifier + left_icon = ROOT + + scope:fp2_2025_razed_land = { + add_county_modifier = { + modifier = fp2_vow_against_conscription_modifier + years = 40 + } + } + } + } + + option = { # I will build a great monument + name = fp2_struggle.2025.b + + remove_treasury_or_gold = minor_treasury_or_gold_value + send_interface_toast = { + type = event_toast_effect_good + title = fp2_monument_to_war_modifier + left_icon = ROOT + + add_prestige = medium_prestige_gain + scope:fp2_2025_razed_land = { + add_county_modifier = { + modifier = fp2_monument_to_war_modifier + years = 20 + } + } + } + } + + option = { # We will restore this town back to what it was + name = fp2_struggle.2025.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + send_interface_toast = { + type = event_toast_effect_good + title = fp2_village_rebuiling_efforts_modifier + left_icon = ROOT + + scope:fp2_2025_razed_land = { + add_county_modifier = { + modifier = fp2_village_rebuiling_efforts_modifier + years = 10 + } + } + } + } + + option = { # I will establish a temporary outpost here + name = fp2_struggle.2025.d + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_border_encampments_modifier + left_icon = ROOT + + scope:fp2_2025_razed_land = { + add_county_modifier = { + modifier = fp2_border_encampments_modifier + years = 10 + } + } + } + } +} + +################################### +# Neighboring Muslims are growing rice +# By Alexander Oltner +################################### +scripted_trigger rice_field_potential = { + is_available_ai_adult = yes + faith.religion = religion:islam_religion + capital_county.faith.religion = religion:islam_religion + capital_province = { + geographical_region = world_europe_west_iberia + } + capital_county = { + county_control >= 100 + development_level >= root.capital_county.development_level + } +} + +fp2_yearly.3000 = { + type = character_event + title = fp2_flavor.0001.t + desc = fp2_flavor.0001.desc + theme = realm + override_background = { reference = farmland } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:rice_propagator + animation = happiness + } + + cooldown = { years = 30 } + + trigger = { + # DLC checking + has_fp2_dlc_trigger = yes + is_landed = yes + + trigger_if = { + limit = { + fp2_character_any_involvement_iberian_struggle_trigger = yes + } + struggle:iberian_struggle = { + OR = { + is_struggle_phase = struggle_iberia_phase_compromise + is_struggle_phase = struggle_iberia_phase_conciliation + is_struggle_phase = struggle_iberia_phase_opportunity + } + } + } + + capital_province = { + geographical_region = world_europe_west_iberia + } + + NOR = { # Non-muslim with non-muslim capital + capital_county.faith.religion = religion:islam_religion + faith.religion = religion:islam_religion + capital_county = { + has_county_modifier = terraced_hills_modifier + } + } + OR = { # Vassal, neighbor, or liege is muslim with muslim capital + any_neighboring_and_across_water_top_liege_realm_owner = { + rice_field_potential = yes + } + any_vassal = { + rice_field_potential = yes + } + liege = { + rice_field_potential = yes + } + } + } + + immediate = { + capital_county = { save_scope_as = capital_county_scope } + + every_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + rice_field_potential = yes + } + add_to_list = rice_propagators + } + every_vassal = { + limit = { + rice_field_potential = yes + } + add_to_list = rice_propagators + } + if = { + limit = { + liege = { + rice_field_potential = yes + } + } + liege = { + add_to_list = rice_propagators + } + } + + random_in_list = { + list = rice_propagators + weight = { + base = 1 + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + modifier = { + add = stewardship + } + } + save_scope_as = rice_propagator + capital_county = { + if = { + limit = { + NOT = { + has_county_modifier = terraced_hills_modifier + } + } + hidden_effect = { + add_county_modifier = { + modifier = terraced_hills_modifier + years = 20 + } + } + } + save_scope_as = rice_propagator_capital + } + } + } + + option = { + name = fp2_flavor.0001.a + + pay_treasury_or_gold = { + target = scope:rice_propagator + value = scope:rice_propagator.medium_treasury_or_gold_value # The costs/duels were updated to be higher for balance reasons + } + + scope:capital_county_scope = { + add_county_modifier = { + modifier = terraced_hills_modifier + years = 20 + } + } + + stress_impact = { + greedy = massive_stress_impact_gain + zealous = major_stress_impact_gain + deceitful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = zealous + has_trait = deceitful + has_trait = arrogant + has_trait = paranoid + } + } + } + } + + option = { + name = fp2_flavor.0001.b + + duel = { + skill = diplomacy + value = scope:rice_propagator.diplomacy + + 11 = { # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -5 + } + + desc = fp2_flavor.0001.b.failure + send_interface_toast = { + title = fp2_flavor.0001.b.failure + left_icon = scope:rice_propagator + + scope:rice_propagator = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -15 + } + + hidden_effect = { + random = { + chance = 50 + if = { + limit = { can_set_relation_potential_rival_trigger = { CHARACTER = root } } + set_relation_potential_rival = root + } + } + } + } + } + } + 10 = { # Success + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + + desc = fp2_flavor.0001.b.success + send_interface_toast = { + title = fp2_flavor.0001.b.success + left_icon = scope:rice_propagator + + scope:capital_county_scope = { + add_county_modifier = { + modifier = terraced_hills_modifier + years = 20 + } + } + } + } + } + + stress_impact = { + paranoid = massive_stress_impact_gain + impatient = major_stress_impact_gain + shy = major_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = impatient + has_trait = shy + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { + name = fp2_flavor.0001.c + + duel = { + skill = intrigue + value = scope:rice_propagator.intrigue + + 11 = { # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -5 + } + + desc = fp2_flavor.0001.c.failure + send_interface_toast = { + title = fp2_flavor.0001.c.failure + left_icon = scope:rice_propagator + + scope:rice_propagator = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -35 + } + + progress_towards_rival_effect = { + REASON = rival_rice_stolen + CHARACTER = root + OPINION = 0 + } + } + } + } + 10 = { # Success + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + + desc = fp2_flavor.0001.c.success + send_interface_toast = { + title = fp2_flavor.0001.c.success + left_icon = scope:rice_propagator + + scope:capital_county_scope = { + add_county_modifier = { + modifier = terraced_hills_modifier + years = 20 + } + } + } + } + } + + stress_impact = { + honest = massive_stress_impact_gain + generous = major_stress_impact_gain + craven = medium_stress_impact_gain + content = medium_stress_impact_gain + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = generous + has_trait = craven + has_trait = content + } + } + } + } + + option = { + name = fp2_flavor.0001.d + + stress_impact = { + diligent = major_stress_impact_gain + ambitious = major_stress_impact_gain + generous = medium_stress_impact_gain + trusting = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = ambitious + has_trait = generous + has_trait = trusting + } + } + } + } +} + +################################################## +# As I Lay Dying +# whether this title is a reference to Faulkner's novel or the metalcore band +# that I shall leave to the judgement of the reader +# by Veronica Pazos +# 3001 - 3001 +################################################## +fp2_yearly.3001 = { + type = character_event + title = fp2_flavor.3001.t + desc = fp2_flavor.3001.desc + + theme = death + left_portrait = { + character = ROOT + animation = worry + } + override_background = { reference = throne_room } + + trigger = { + has_fp2_dlc_trigger = yes + is_landed = yes + is_available_even_at_war_adult = yes + capital_province = { + geographical_region = world_europe_west_iberia + } + OR = { + AND = { + age >= 45 + has_trait = wounded_2 + } + AND = { + age >= 45 + has_trait = ill + } + has_trait = wounded_3 + has_trait = cancer + age >= 75 + } + NOT = { has_character_flag = had_event_fp2_flavor_3001 } + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:judaism_religion + religion = religion:islam_religion + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + add_character_flag = had_event_fp2_flavor_3001 + religion = { + save_scope_as = fp2_flavor_3001_religion + } + } + + option = { #your own official language (Latin/Hebrew/Arabic) + name = fp2_flavor.3001.a + add_piety = minor_piety_gain + add_prestige = minor_prestige_gain + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = zealous + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { #Vulgar (Romance) language + name = fp2_flavor.3001.b + add_piety = medium_piety_loss + every_vassal = { + limit = { + religion = root.religion + } + custom = custom.every_vassal + add_opinion = { + target = ROOT + modifier = reputation_opinion + opinion = 20 + } + } + + ai_chance = { + base = 5 + modifier = { + add = 10 + OR = { + has_trait = compassionate + has_trait = humble + } + } + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + option = { #your language + vulgar (Latin + Castillian / Hebrew + Sephardí / Arabic + Mozarabic ) + name = fp2_flavor.3001.c + stress_impact = { + base = minor_stress_loss + zealous = medium_stress_gain + } + + ai_chance = { + base = 20 + modifier = { + add = -10 + has_trait = zealous + } + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + option = { #all of them! (vulgar + Latin + Hebrew + Arabic) + name = fp2_flavor.3001.d + add_character_modifier = { + modifier = fp2_epitaph_modifier + years = 5 + } + add_piety = minor_piety_loss + stress_impact = { + base = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 5 + modifier = { + add = -10 + has_trait = zealous + } + modifier = { + add = 10 + has_trait = compassionate + } + ai_value_modifier = { + ai_zeal = -1 + ai_compassion = 1 + } + } + } +} + +################################################## +# And They Were Roommates +# (oh my god they were roommates) +# by Veronica Pazos +# (idea by Baudelaire Welch) +# 3002 - 3002 +################################################## +fp2_yearly.3002 = { + type = character_event + title = fp2_flavor.3011.t + desc = fp2_flavor.3011.desc + + theme = seduction + left_portrait = { + character = ROOT + animation = ecstasy + } + right_portrait = { + character = scope:fp2_flavor_3011_best_friend + animation = flirtation + } + override_background = { reference = bedchamber } + + trigger = { + has_fp2_dlc_trigger = yes + is_playable_character = yes + is_available_even_at_war_adult = yes + any_relation = { #you have a best friend! + type = best_friend + is_available_healthy_ai_adult = yes + can_set_relation_lover_trigger = { CHARACTER = ROOT } #you're attracted to each other's genre + NOT = { has_trait = celibate } + NOT = { is_consort_of = root } + might_cheat_on_every_partner_trigger = yes + trigger_if = { + limit = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = root } } + OR = { + has_perk = subtle_desire_perk + accepts_incest_with_trigger = { CHARACTER = root } + } + } + } + } + + weight_multiplier = { + modifier = { + add = 0.5 + has_trait = lustful + } + } + + immediate = { + random_relation = { + type = best_friend + limit = { + is_available_healthy_ai_adult = yes + can_set_relation_lover_trigger = { CHARACTER = ROOT } + NOT = { has_trait = celibate } + NOT = { is_consort_of = root } + might_cheat_on_every_partner_trigger = yes + trigger_if = { + limit = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = root } } + OR = { + has_perk = subtle_desire_perk + accepts_incest_with_trigger = { CHARACTER = root } + } + } + } + save_scope_as = fp2_flavor_3011_best_friend + } + } + + option = { #become their lover + name = fp2_flavor.3011.a + + trigger = { + NOT = { has_trait = celibate } + OR = { + has_perk = unshackled_lust_perk + is_attracted_to_gender_of = root + } + trigger_if = { + limit = { relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:fp2_flavor_3011_best_friend } } + OR = { + has_perk = subtle_desire_perk + accepts_incest_with_trigger = { CHARACTER = scope:fp2_flavor_3011_best_friend } + } + } + } + + set_relation_lover = scope:fp2_flavor_3011_best_friend + if = { #if you're in a homosexual relationship and your faith disapproves this stresses you + limit = { + OR = { + AND = { + is_female = yes + scope:fp2_flavor_3011_best_friend = { + is_female = yes + } + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + AND = { + is_male = yes + scope:fp2_flavor_3011_best_friend = { + is_male = yes + } + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + } + } + stress_impact = { + base = medium_stress_impact_gain + zealous = medium_stress_impact_gain #some extra stress + } + } + if = { #your spouse finds this weird + limit = { + exists = primary_spouse + } + primary_spouse = { + add_opinion = { + target = ROOT + modifier = suspicion_opinion + opinion = -25 + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = lustful + } + modifier = { + add = -5 + has_trait = chaste + } + modifier = { + add = -5 + exists = primary_spouse + } + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + option = { #allowe them to move in but stay as friends + name = fp2_flavor.3011.b + stress_impact = { + base = medium_stress_loss + lustful = medium_stress_impact_gain + } + if = { + limit = { + exists = primary_spouse + } + primary_spouse = { + add_opinion = { + target = ROOT + modifier = suspicion_opinion + opinion = -20 + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = -5 + has_trait = lustful + } + modifier = { + add = -2 + has_trait = chaste + } + modifier = { + add = 5 + has_trait = compassionate + } + modifier = { + add = -5 + exists = primary_spouse + } + ai_value_modifier = { + ai_compassion = 0.25 + } + } + } + + option = { #nah im good + name = { + trigger = { + exists = primary_spouse + } + text = fp2_flavor.3011.c_spouse + } + name = { + trigger = { + NOT = { exists = primary_spouse } + } + text = fp2_flavor.3011.c + } + stress_impact = { + base = medium_stress_impact_gain #you get stressed at losing your bff + lustful = minor_stress_impact_gain + callous = minor_stress_loss + chaste = minor_stress_loss + } + scope:fp2_flavor_3011_best_friend = { + add_opinion = { + target = ROOT + modifier = rejected_opinion + } + } + + ai_chance = { + base = 10 + modifier = { + add = -5 + has_trait = lustful + } + modifier = { + add = 10 + has_trait = chaste + } + modifier = { + add = -5 + has_trait = compassionate + } + modifier = { + add = 5 + exists = primary_spouse + } + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + +################################################## +# A Flavorful Evening +# by Veronica Pazos +# (idea by Ewan Cowhig Croft) +# 3003 - 3003 +################################################## +fp2_yearly.3003 = { + type = character_event + title = fp2_flavor.3021.t + desc = fp2_flavor.3021.desc + + theme = feast_activity + left_portrait = { + character = scope:fp2_flavor_3021_best_friend + animation = ecstasy + } + right_portrait = { + character = ROOT + animation = stress + } + override_background = { reference = feast } + + trigger = { + has_fp2_dlc_trigger = yes + is_available_for_activity_trigger = yes + any_relation = { #you have a best friend! + type = best_friend + is_available_healthy_ai_adult = yes + } + } + + weight_multiplier = { + modifier = { + add = 0.5 + trigger_if = { + limit = { exists = scope:fp2_flavor_3021_best_friend } + scope:fp2_flavor_3021_best_friend = { + OR = { + has_trait = gregarious + has_trait = gluttonous + } + } + } + } + } + + immediate = { + random_relation = { + type = best_friend + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = fp2_flavor_3021_best_friend + } + } + + option = { #pretend nothing's wrong + name = fp2_flavor.3021.a + stress_impact = { + base = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + deceitful = minor_stress_loss + } + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = deceitful + } + modifier = { + add = -10 + has_trait = honest + } + modifier = { + add = -5 + has_trait = brave + } + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = -0.5 + ai_compassion = 0.5 + } + } + } + + option = { #try to gently tell them + name = fp2_flavor.3021.b + duel = { + skill = diplomacy + value = 5 + 50 = { + desc = fp2_flavor.3021.b.success_tt + compare_modifier = { + value = { + value = scope:duel_value + if = { + limit = { has_trait = deceitful } + add = 5 + } + if = { + limit = { intrigue >= medium_skill_rating } + add = 5 + } + if = { + limit = { scope:fp2_flavor_3021_best_friend = { has_trait = forgiving } } + add = 5 + } + if = { + limit = { scope:fp2_flavor_3021_best_friend = { has_trait = trusting } } + add = 5 + } + if = { + limit = { scope:fp2_flavor_3021_best_friend = { opinion = { target = ROOT value >= high_positive_opinion } } } + add = 5 + } + } + } + send_interface_toast = { + title = fp2_flavor.3021.b.success + left_icon = ROOT + stress_impact = { + base = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + deceitful = minor_stress_loss + } + } + } + 50 = { #they don't + send_interface_toast = { + title = fp2_flavor.3021.b.fail + left_icon = ROOT + scope:fp2_flavor_3021_best_friend = { + add_opinion = { + target = ROOT + modifier = insult_opinion + opinion = -20 + } + } + stress_impact = { + base = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + deceitful = minor_stress_loss + } + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = compassionate + } + modifier = { + add = -5 + has_trait = deceitful + } + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = 0.5 + ai_compassion = 1 + } + } + } + + option = { #directly tell them + name = fp2_flavor.3021.c + random_list = { + 25 = { #they take it well + modifier = { + add = 5 + has_trait = honest + } + modifier = { + add = 5 + diplomacy >= medium_skill_rating + } + modifier = { + add = 5 + scope:fp2_flavor_3021_best_friend = { + has_trait = honest + } + } + } + 75 = { #they dont (and they think you're being rude + scope:fp2_flavor_3021_best_friend = { + add_opinion = { + target = ROOT + modifier = insult_opinion + opinion = -30 + } + } + stress_impact = { + base = medium_stress_impact_gain + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = 10 + has_trait = brave + } + modifier = { + add = -5 + has_trait = deceitful + } + ai_value_modifier = { + ai_boldness = 1 + ai_rationality = 0.5 + ai_compassion = -1 + } + } + } + + option = { #ghost them + name = fp2_flavor.3021.d + scope:fp2_flavor_3021_best_friend = { #they REALLY dislike you + add_opinion = { + target = ROOT + modifier = insult_opinion + opinion = -50 + } + } + stress_impact = { + base = minor_stress_loss + brave = minor_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + modifier = { + add = -10 + has_trait = brave + } + modifier = { + add = -5 + has_trait = honest + } + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = -0.5 + ai_compassion = -1 + } + } + } +} + +################################### +# You fancy a little siesta +# By Nick Meredith +################################### +# Look, this was inspired by our actual Spanish designer having a nap after lunch +# Don't look at me like that +################################### +fp2_yearly.4001 = { + type = character_event + title = fp2_yearly.4001.t + desc = fp2_yearly.4001.desc + theme = mental_health + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = boredom + } + + trigger = { + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_playable_character = yes + is_available_at_peace_adult = yes + + #is Iberian + culture = { has_cultural_pillar = heritage_iberian } + + #has more than 5 stress + stress > 5 + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + option = { #No, I have work to do! + name = fp2_yearly.4001.a + + add_prestige = minor_prestige_gain + + stress_impact = { + base = medium_stress_impact_gain + lazy = medium_stress_impact_gain + diligent = major_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + } + } + } + + option = { #a little nap can't hurt anyone + name = fp2_yearly.4001.b + + stress_impact = { + base = minor_stress_impact_loss + diligent = massive_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = diligent + } + } + } +} + +################################### +# County is increasingly religiously intertwined +# By Nick Meredith +################################### +fp2_yearly.4002 = { + type = character_event + title = fp2_yearly.4002.t + desc = fp2_yearly.4002.desc + theme = faith + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:realm_priest + animation = worry + } + + cooldown = { years = 30 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #is Iberian + culture = { has_cultural_pillar = heritage_iberian } + + #has a court chaplain + exists = cp:councillor_court_chaplain + + #has a county that doesn't match your faith + any_directly_owned_province = { + faith != root.faith + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + random_directly_owned_province = { + limit = { + faith != root.faith + } + save_scope_as = interfaith_province + } + cp:councillor_court_chaplain = { + save_scope_as = realm_priest + } + } + + option = { #I welcome a multifaith community. + name = fp2_yearly.4002.a + + add_character_modifier = { + modifier = fp2_multifaith_county_modifier + years = 10 + } + + scope:realm_priest = { + add_opinion = { + target = liege + modifier = annoyed_opinion + opinion = -30 + } + } + + stress_impact = { + zealous = major_stress_gain + cynical = minor_stress_loss + arrogant = medium_stress_gain + impatient = medium_stress_gain + arbitrary = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = impatient + has_trait = arrogant + } + } + } + } + + option = { #This must be stopped! + name = fp2_yearly.4002.b + + add_piety = minor_piety_gain + + scope:interfaith_province.county = { + change_county_control = medium_county_control_loss + set_county_faith = root.faith + add_county_modifier = { + modifier = fp2_religious_strife_modifier + years = 10 + } + } + + scope:realm_priest = { + add_opinion = { + target = liege + modifier = respect_opinion + opinion = 40 + } + } + + stress_impact = { + zealous = medium_stress_loss + cynical = medium_stress_gain + forgiving = major_stress_gain + just = medium_stress_gain + stubborn = minor_stress_gain + content = minor_stress_gain + patient = minor_stress_gain + trusting = minor_stress_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = forgiving + has_trait = just + } + } + } + } +} + +################################### +# The road to Santiago is under threat from bandits +# By Nick Meredith +################################### +fp2_yearly.4003 = { + type = character_event + title = fp2_yearly.4003.t + desc = fp2_yearly.4003.desc + theme = martial + override_background = { reference = terrain } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:steward + animation = worry + } + + trigger = { + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #is Iberian + culture = { has_cultural_pillar = heritage_iberian } + + #has a steward + exists = cp:councillor_steward + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + + #and is Christian + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + + #and owns at least one county on the road to Santiago + OR = { + has_title = title:c_santiago + has_title = title:c_astorga + has_title = title:c_leon + has_title = title:c_burgos + has_title = title:c_amaya + has_title = title:c_najera + has_title = title:c_navarra + } + } + + immediate = { + every_county_in_region = { + region = world_europe_west_iberia + limit = { # all counties on the road to Santiago + OR = { + this = title:c_santiago + this = title:c_astorga + this = title:c_leon + this = title:c_burgos + this = title:c_amaya + this = title:c_najera + this = title:c_navarra + } + OR = { + holder = root + holder.top_liege = root + } + } + add_to_list = camino_de_santiago + } + + faith = { + if = { + limit = { + any_faith_holy_order = { + any_leased_title = { + any_this_title_or_de_jure_above = { + is_in_list = camino_de_santiago + } + } + } + } + random_faith_holy_order = { + limit = { + any_leased_title = { + any_this_title_or_de_jure_above = { + is_in_list = camino_de_santiago + } + } + } + save_scope_as = santiago_defenders + } + scope:santiago_defenders = { + random_leased_title = { + limit = { + any_this_title_or_de_jure_above = { + is_in_list = camino_de_santiago + } + } + county = { save_scope_as = ho_province } + } + } + } + } + cp:councillor_steward = { + save_scope_as = steward + } + } + + option = { #Call upon a local Holy Order + name = fp2_yearly.4003.a + + trigger = { + exists = scope:ho_province + } + + scope:ho_province = { + add_county_modifier = { + modifier = fp2_camino_santiago_ho_protected_modifier + years = 10 + } + } + + custom_tooltip = fp2_yearly.4003.tt + + add_piety = minor_piety_gain + + remove_treasury_or_gold = minor_treasury_or_gold_value + + add_internal_flag = special + + ai_chance = { + base = 100 + } + } + + option = { #Pay for the protection of the road + name = fp2_yearly.4003.b + + random_in_list = { + list = camino_de_santiago + add_county_modifier = { + modifier = fp2_camino_santiago_protected_modifier + years = 10 + } + } + + add_piety = medium_piety_gain + + remove_treasury_or_gold = major_treasury_or_gold_value + + stress_impact = { + greedy = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + has_trait = arrogant + } + } + } + } + + option = { #Pilgrims will have to fend for themselves + name = fp2_yearly.4003.c + + add_piety = medium_piety_loss + + stress_impact = { + base = miniscule_stress_impact_gain + zealous = major_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = humble + has_trait = compassionate + } + } + } + } +} + +################################### +# Talented Mozarab offers their services +# By Nick Meredith +################################### +fp2_yearly.4004 = { + type = character_event + title = fp2_yearly.4004.t + desc = fp2_yearly.4004.desc + theme = vassal + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:mozarab_wanderer + animation = marshal + } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_landed = yes + is_available_at_peace_adult = yes + + #Mozarabic exists... + exists = faith:mozarabic_church + + #...but you are not Mozarabic + NOT = { + faith = faith:mozarabic_church + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + create_character = { + age = { 20 40 } + location = root.capital_province + gender_female_chance = { + if = { + limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + random_traits_list = { + count = 1 + education_martial_3 = {} + education_martial_4 = {} + } + random_traits_list = { #Something nice + count = 2 + brave = {} + honest = {} + gregarious = {} + trusting = {} + compassionate = {} + generous = {} + humble = {} + calm = {} + } + random_traits_list = { + count = 1 + lustful = {} + chaste = {} + wrathful = {} + arrogant = {} + impatient = {} + patient = {} + impatient = {} + ambitious = {} + cynical = {} + zealous = {} + stubborn = {} + } + + trait = lifestyle_blademaster + + random_traits = no + + diplomacy = { min_template_low_skill max_template_average_skill } + martial = { min_template_decent_skill max_template_high_skill } + stewardship = { min_template_low_skill max_template_average_skill } + intrigue = { min_template_low_skill max_template_average_skill } + learning = { min_template_low_skill max_template_average_skill } + prowess = { min_template_decent_skill max_template_high_skill } + + culture = root.culture + faith = faith:mozarabic_church + + dynasty = none + after_creation = { + add_gold = { minor_gold_value medium_gold_value } + add_prestige = { minor_prestige_gain medium_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + add_trait_xp = { + trait = lifestyle_blademaster + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + + save_scope_as = mozarab_wanderer + } + } + + option = { #Of course you may join my court! + name = fp2_yearly.4004.a + + add_piety = minor_piety_loss + + stress_impact = { + base = minor_stress_impact_gain + zealous = major_stress_impact_gain + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + add_courtier = scope:mozarab_wanderer + + scope:mozarab_wanderer = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + option = { #Yes; so long as you convert + name = fp2_yearly.4004.b + + random_list = { + + 40 = { + + add_courtier = scope:mozarab_wanderer + + modifier = { + scope:mozarab_wanderer = { + has_trait = stubborn + } + add = -10 + } + + modifier = { + scope:mozarab_wanderer = { + has_trait = zealous + } + add = -20 + } + + modifier = { + scope:mozarab_wanderer = { + has_trait = arrogant + } + add = -5 + } + + modifier = { + scope:mozarab_wanderer = { + has_trait = wrathful + } + add = -5 + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_yearly.4004.b.succ + + left_icon = root + right_icon = scope:mozarab_wanderer + + scope:mozarab_wanderer = { + set_character_faith = root.faith + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } + + 60 = { + + custom_tooltip = fp2_yearly.4004.tt + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_yearly.4004.b.fail + + left_icon = root + right_icon = scope:mozarab_wanderer + + scope:mozarab_wanderer = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -40 + } + } + } + } + } + + ai_chance = { + base = 100 + } + } + + option = { #Send them away + name = fp2_yearly.4004.c + + custom_tooltip = fp2_yearly.4004.c.tt + + scope:mozarab_wanderer = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -40 + } + } + ai_chance = { + base = 100 + } + } +} + +################################### +# Mozarabs in a city ask for their own quarter +# By Nick Meredith +################################### +fp2_yearly.4005 = { + type = character_event + title = fp2_yearly.4005.t + desc = { + first_valid = { + triggered_desc = { + trigger = { religion = religion:islam_religion } + desc = fp2_yearly.4005.desc.muslim + } + triggered_desc = { + trigger = { always = yes } + desc = fp2_yearly.4005.desc.christian + } + } + desc = fp2_yearly.4005.desc + } + theme = faith + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:mozarab_merchant + animation = worry + } + + cooldown = { years = 10 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #Mozarabic exists... + exists = faith:mozarabic_church + + #...but you are not Mozarabic + NOT = { + faith = faith:mozarabic_church + } + + #and you have a county that has a city holding + any_held_county= { + any_county_province = { + has_holding_type = city_holding + } + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + random_held_county = { + limit = { + any_county_province = { + has_holding_type = city_holding + } + } + save_scope_as = mozarab_quarter + } + + if = { + limit = { + any_pool_character = { + province = scope:mozarab_quarter.title_province + faith = faith:mozarabic_church + is_available_healthy_ai_adult = yes + } + } + random_pool_character = { + province = scope:mozarab_quarter.title_province + limit = { + faith = faith:mozarabic_church + is_available_healthy_ai_adult = yes + } + save_scope_as = mozarab_merchant + } + } + + else = { + create_character = { + age = { 20 40 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + random_traits_list = { + count = 1 + education_stewardship_3 = {} + education_stewardship_4 = {} + } + + random_traits = yes + + culture = scope:mozarab_quarter.culture + faith = faith:mozarabic_church + + dynasty = none + + save_scope_as = mozarab_merchant + } + } + } + + option = { #You may have a little enclave, as a treat + name = fp2_yearly.4005.a + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:mozarab_quarter = { + add_county_modifier = { + modifier = fp2_mozarab_quarter_modifier + years = 10 + } + } + + scope:mozarab_merchant = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + } + + every_vassal = { + limit = { + has_trait = zealous + } + add_opinion = { + target = liege + modifier = impious_opinion + opinion = -20 + } + } + + stress_impact = { + zealous = major_stress_impact_gain + greedy = major_stress_impact_gain + arrogant = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + has_trait = arrogant + } + } + } + } + + option = { #Begone, heathen! + name = fp2_yearly.4005.b + + add_piety = medium_piety_gain + + scope:mozarab_merchant = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -40 + } + } + + every_vassal = { + limit = { + has_trait = zealous + NOT = { + faith = faith:mozarabic_church + } + } + add_opinion = { + target = liege + modifier = pious_opinion + opinion = 20 + } + } + + every_vassal = { + limit = { + faith = faith:mozarabic_church + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + + stress_impact = { + zealous = medium_stress_loss + cynical = medium_stress_gain + forgiving = major_stress_gain + just = medium_stress_gain + stubborn = minor_stress_gain + content = minor_stress_gain + patient = minor_stress_gain + trusting = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = forgiving + has_trait = just + } + } + } + } +} + +################################### +# Mozarabs ask for permission to build churches +# By Nick Meredith +################################### +fp2_yearly.4006 = { + type = character_event + title = fp2_yearly.4006.t + desc = fp2_yearly.4006.desc + theme = faith + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:mozarab_priest + animation = beg + } + + cooldown = { years = 30 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #Mozarabic exists + exists = faith:mozarabic_church + + #You are not Christian at all + NOT = { + faith = { religion_tag = christianity_religion } + } + + #and you have a county that has a free holding slot + any_held_county = { + any_county_province = { + has_holding = no + } + } + + #and your capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + + exists = cp:councillor_court_chaplain + } + + immediate = { + random_sub_realm_county = { + limit = { + any_county_province = { + has_holding = no + } + } + save_scope_as = mozarab_church + } + + if = { + limit = { + any_pool_character = { + province = scope:mozarab_church.title_province + faith = faith:mozarabic_church + is_available_healthy_ai_adult = yes + has_trait = devoted + } + } + random_pool_character = { + province = scope:mozarab_church.title_province + limit = { + faith = faith:mozarabic_church + is_available_healthy_ai_adult = yes + } + save_scope_as = mozarab_priest + } + } + + else = { + create_character = { + age = { 20 40 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + random_traits_list = { + count = 1 + education_learning_3 = {} + education_learning_4 = {} + } + + trait = devoted + + random_traits = yes + + culture = scope:mozarab_church.culture + faith = faith:mozarabic_church + + dynasty = none + + save_scope_as = mozarab_priest + } + } + cp:councillor_court_chaplain = { + save_scope_as = realm_priest + } + } + + option = { #You can build a church + name = fp2_yearly.4006.a + + remove_treasury_or_gold = medium_treasury_or_gold_value + + root = { + add_character_modifier = { + modifier = fp2_mozarab_church_modifier + years = 30 + } + } + + scope:mozarab_priest = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + } + + scope:realm_priest = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + + stress_impact = { + zealous = major_stress_impact_gain + greedy = major_stress_impact_gain + arrogant = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + has_trait = arrogant + } + } + } + } + + option = { #You are not allowed to build a church + name = fp2_yearly.4006.b + + add_piety = minor_piety_gain + + root = { + add_character_modifier = { + modifier = fp2_mozarab_rejected_modifier + years = 30 + } + } + + scope:mozarab_priest = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -40 + } + } + + every_vassal = { + limit = { + faith = faith:mozarabic_church + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -30 + } + } + + stress_impact = { + zealous = medium_stress_loss + compassionate = massive_stress_gain + generous = major_stress_gain + just = major_stress_gain + forgiving = medium_stress_gain + cynical = medium_stress_gain + content = medium_stress_gain + patient = minor_stress_gain + trusting = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + has_trait = forgiving + has_trait = cynical + has_trait = content + } + } + } + } +} + +################################### +# Finding a shell on the road to Santiago +# By Nick Meredith +################################### +fp2_yearly.4007 = { + type = character_event + title = fp2_yearly.4007.t + desc = fp2_yearly.4007.desc + theme = faith + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:realm_priest + animation = disapproval + } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #You have a realm priest + exists = cp:councillor_court_chaplain + + #You are Christian + faith = { religion_tag = christianity_religion } + + #You can see sea shells on the sea shore + NOT = { + has_trait = blind + } + + #You own a county on the road to Santiago + OR = { + has_title = title:c_santiago + has_title = title:c_astorga + has_title = title:c_leon + has_title = title:c_burgos + has_title = title:c_amaya + has_title = title:c_najera + has_title = title:c_navarra + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = realm_priest + } + } + + option = { #I'm keeping it and you're keeping your mouth closed m8 + name = fp2_yearly.4007.a + + root = { + create_artifact = { + name = fp2_scallop_shell_artifact + description = fp2_scallop_shell_artifact_desc + type = miscellaneous + visuals = pouch + modifier = artifact_same_faith_opinion_1_modifier + modifier = artifact_monthly_piety_1_modifier + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + } + } + + add_piety = minor_piety_loss + + scope:realm_priest = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + stress_impact = { + zealous = massive_stress_impact_gain + honest = massive_stress_impact_gain + just = major_stress_impact_gain + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + generous = minor_stress_impact_gain + temperate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = honest + has_trait = just + has_trait = craven + } + } + } + } + + option = { #Ok fine I guess I won't keep the stolen valour shell + name = fp2_yearly.4007.b + + add_piety = miniscule_piety_value + + stress_impact = { + base = miniscule_stress_impact_loss + cynical = massive_stress_impact_gain + deceitful = massive_stress_impact_gain + greedy = major_stress_impact_gain + arbitrary = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = deceitful + has_trait = greedy + has_trait = arbitrary + } + } + } + } + + option = { #Who do you think they'll believe fam? + name = fp2_yearly.4007.c + + custom_tooltip = fp2_yearly.4007.c.tt.flavour + + scope:realm_priest = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + + stress_impact = { + base = miniscule_stress_impact_gain + zealous = massive_stress_impact_gain + honest = massive_stress_impact_gain + just = major_stress_impact_gain + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + generous = minor_stress_impact_gain + temperate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + cynical = minor_stress_impact_loss + deceitful = minor_stress_impact_loss + greedy = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + } + + duel = { + skill = intrigue + target = scope:realm_priest + + #You win the duel + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_yearly.4007.c.tt.success + send_interface_toast = { + title = fp2_yearly.4007.c.tt.success + left_icon = root + right_icon = scope:realm_priest + root = { + add_trait = pilgrim + add_piety = 500 + + create_artifact = { + name = fp2_scallop_shell_artifact + description = fp2_scallop_shell_artifact_desc + type = miscellaneous + visuals = pouch + modifier = artifact_same_faith_opinion_1_modifier + modifier = artifact_monthly_piety_1_modifier + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + } + } + } + } + + #You lose the duel + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_yearly.4007.c.tt.fail + send_interface_toast = { + title = fp2_yearly.4007.c.tt.fail + left_icon = root + right_icon = scope:realm_priest + root = { + add_piety = major_piety_loss + add_stress = medium_stress_gain + + create_artifact = { + name = fp2_fake_scallop_shell_artifact + description = fp2_fake_scallop_shell_artifact_desc + type = miscellaneous + visuals = pouch + modifier = artifact_same_faith_opinion_negative_1_modifier + modifier = artifact_monthly_piety_negative_1_modifier + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = deceitful + has_trait = greedy + has_trait = arbitrary + } + } + } + } +} + +################################### +# Folk stories around the fireside +# By Nick Meredith +################################### +fp2_yearly.4008 = { + type = character_event + title = fp2_yearly.4008.t + + override_background = { reference = bp1_bonfire } + + desc = { + desc = fp2_yearly.4008.desc.intro + random_valid = { + triggered_desc = { + trigger = { culture = culture:basque } + desc = fp2_yearly.4008.desc.basque.a + } + triggered_desc = { + trigger = { culture = culture:basque } + desc = fp2_yearly.4008.desc.basque.b + } + triggered_desc = { + trigger = { culture = culture:galician } + desc = fp2_yearly.4008.desc.galician.a + } + triggered_desc = { + trigger = { culture = culture:galician } + desc = fp2_yearly.4008.desc.galician.b + } + triggered_desc = { + trigger = { culture = culture:castilian } + desc = fp2_yearly.4008.desc.castilian.a + } + triggered_desc = { + trigger = { culture = culture:castilian } + desc = fp2_yearly.4008.desc.castilian.b + } + triggered_desc = { + trigger = { culture = culture:catalan } + desc = fp2_yearly.4008.desc.catalan.a + } + triggered_desc = { + trigger = { culture = culture:catalan } + desc = fp2_yearly.4008.desc.catalan.b + } + triggered_desc = { + trigger = { culture = culture:aragonese } + desc = fp2_yearly.4008.desc.aragonese.a + } + triggered_desc = { + trigger = { culture = culture:aragonese } + desc = fp2_yearly.4008.desc.aragonese.b + } + desc = fp2_yearly.4008.desc.spain.a + desc = fp2_yearly.4008.desc.spain.b + desc = fp2_yearly.4008.desc.spain.c + } + desc = fp2_yearly.4008.desc.ending + } + + theme = friendly + + left_portrait = { + character = root + animation = scheme + } + right_portrait = { + character = scope:old_crone + animation = throne_room_conversation_1 + } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_landed_or_landless_administrative = yes + is_available_at_peace_adult = yes + + #You are Iberian + culture = { has_cultural_pillar = heritage_iberian } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.capital_province + age = { 50 80 } + culture = { has_cultural_pillar = heritage_iberian } + is_available_healthy_ai_adult = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { + age = { 50 80 } + culture = { has_cultural_pillar = heritage_iberian } + is_available_healthy_ai_adult = yes + } + save_scope_as = old_crone + } + } + + else = { + create_character = { + age = { 50 80 } + location = root.capital_province + gender = female + + trait = lifestyle_poet + + random_traits = yes + + culture = root.culture + faith = root.faith + + dynasty = none + + save_scope_as = old_crone + } + } + } + + option = { #What a fun old story! + name = fp2_yearly.4008.a + + add_stress = minor_stress_loss + + ai_chance = { + base = 100 + } + } + + option = { #Gimme a lil prestige for not believe in ghosts + name = fp2_yearly.4008.b + + add_prestige = minor_prestige_value + + stress_impact = { + cynical = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + stubborn = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + has_trait = stubborn + } + } + } + } + + option = { #Invite her to your court + name = fp2_yearly.4008.c + + trigger = { #Make sure they have Royal Court but no poet + has_ep1_dlc_trigger = yes + can_appoint_char_to_court_position = { + CHAR = scope:old_crone + COURT_POS = court_poet_court_position + } + } + + hidden_effect = { + add_courtier = scope:old_crone + scope:old_crone = { + add_trait = whole_of_body + } + } + + court_position_grant_effect = { + EMPLOYER = root + CANDIDATE = scope:old_crone + POS = court_poet + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:old_crone + opinion = 50 + } + + ai_chance = { + base = 100 + } + } +} + +################################### +# Visiting the Malato Tree +# By Nick Meredith +################################### +fp2_yearly.4009 = { + type = character_event + title = fp2_yearly.4009.t + desc = fp2_yearly.4009.desc + theme = crown + override_background = { reference = wilderness_forest } + left_portrait = { + character = root + animation = admiration + } + + cooldown = { years = 30 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #You are Basque + culture = culture:basque + + #You own the county where the tree is + has_title = title:c_viscaya + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + title:c_viscaya = { save_scope_as = viscaya } + culture = {save_scope_as = root_culture} + } + + option = { #One day I too will shoot all their nobs! + name = fp2_yearly.4009.a + + every_vassal = { + custom = custom.every_same_culture_vassal + limit = { + culture = culture:basque + } + add_opinion = { + target = liege + modifier = respect_opinion + opinion = 20 + } + } + + every_vassal = { + custom = custom.every_different_culture_vassal + limit = { + NOT = { + culture = culture:basque + } + } + add_opinion = { + target = liege + modifier = scared_opinion + opinion = -20 + } + } + + stress_impact = { + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + content = major_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = craven + has_trait = content + has_trait = lazy + has_trait = impatient + } + } + } + } + + option = { #Perhaps I need to dream bigger + name = fp2_yearly.4009.b + + every_vassal = { + limit = { + culture = culture:basque + } + add_opinion = { + target = liege + modifier = disappointed_opinion + opinion = -20 + } + } + + every_vassal = { + limit = { + NOT = { + culture = culture:basque + } + } + add_opinion = { + target = liege + modifier = pleased_opinion + opinion = 20 + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + content = major_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = craven + has_trait = content + has_trait = lazy + has_trait = impatient + } + } + } + } + + option = { #Take some bark from the tree + name = fp2_yearly.4009.c + + root = { + create_artifact = { + name = fp2_malato_bark_artifact + description = fp2_malato_bark_artifact_desc + type = miscellaneous + visuals = pouch + modifier = artifact_vassal_limit_1_modifier + modifier = artifact_monthly_martial_lifestyle_xp_1_modifier + save_scope_as = newly_created_artifact + } + + scope:newly_created_artifact = { + flag_as_trash_artifact = yes + } + } + + ai_chance = { + base = 100 + } + } +} + +################################### +# Finding a Verraco +# By Nick Meredith +################################### +fp2_yearly.4010 = { + type = character_event + title = fp2_yearly.4010.t + desc = fp2_yearly.4010.desc + override_background = { reference = farmland } + theme = learning + left_portrait = { + character = root + animation = personality_rational + } + + cooldown = { years = 20 } + + trigger = { + + #DLC check + has_fp2_dlc_trigger = yes + + #Standard check + is_available_at_peace_adult = yes + + #owns land formerly inhabited by the Vettones + OR = { + has_title = title:c_plasencia + has_title = title:c_caceres + has_title = title:c_merida + has_title = title:c_malagon + has_title = title:c_almader + has_title = title:c_medellin + has_title = title:c_toledo + } + + #and capital is located in Iberia + capital_province = { + geographical_region = world_europe_west_iberia + } + } + + immediate = { + every_county_in_region = { + region = world_europe_west_iberia + limit = { # all relevant counties + OR = { + this = title:c_plasencia + this = title:c_caceres + this = title:c_merida + this = title:c_malagon + this = title:c_almader + this = title:c_medellin + this = title:c_toledo + } + } + add_to_list = verracos_counties + } + random_in_list = { + list = verracos_counties + save_scope_as = verraco_county + } + } + + option = { # Maybe these were tombs for religious figures? + name = fp2_yearly.4010.a + + trigger = { + faith = { religion_tag = christianity_religion } + } + + duel = { + skill = learning + value = decent_skill_rating + + #Sounds good to us! + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp2_yearly.4010.a.success + send_interface_toast = { + title = fp2_yearly.4010.a.success + type = event_toast_effect_good + left_icon = root + add_prestige = medium_prestige_value + } + scope:verraco_county = { + add_county_modifier = { + modifier = fp2_saints_tombs_modifier + years = 20 + } + } + } + + #What the hell are you talking about? + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp2_yearly.4010.a.fail + send_interface_toast = { + title = fp2_yearly.4010.a.fail + type = event_toast_effect_bad + left_icon = root + stress_impact = { + base = medium_stress_gain + ambitious = major_stress_impact_gain + zealous = medium_stress_impact_gain + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = zealous + } + } + } + } + + option = { # We can use these for buildings + name = fp2_yearly.4010.b + + trigger = { + NOT = { + faith = { religion_tag = islam_religion } + } + } + + scope:verraco_county = { + add_county_modifier = { + modifier = fp2_dismantling_verracos_modifier + years = 20 + } + } + + stress_impact = { + ambitious = miniscule_stress_impact_loss + calm = medium_stress_impact_gain + content = medium_stress_impact_gain + humble = medium_stress_impact_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = content + has_trait = lazy + has_trait = impatient + } + } + } + } + + option = { # Tear these blasphemous things down! + name = fp2_yearly.4010.c + + trigger = { + faith = { religion_tag = islam_religion } + } + + add_piety = minor_piety_gain + + scope:verraco_county = { + add_county_modifier = { + modifier = fp2_dismantling_verracos_modifier + years = 20 + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = lazy + } + } + } + } + + option = { # Kinda interesting, I guess + name = fp2_yearly.4010.d + + ai_chance = { + base = 100 + } + } +} + +################################### +# Destroying the Vineyards +# by Ola Jentzsch +################################### +fp2_yearly.8000 = { + type = character_event + title = fp2_yearly.8000.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_religion = religion:islam_religion + } + desc = fp2_yearly.8000.desc_muslim_opening + } + desc = fp2_yearly.8000.desc_jewish_opening + } + first_valid = { + triggered_desc = { + trigger = { + has_title = title:c_cadiz + } + desc = fp2_yearly.8000.desc_jerez + } + desc = fp2_yearly.8000.desc_not_jerez + } + } + + theme = realm + override_background = { reference = garden } + + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:hof_emissary + animation = chancellor + } + + lower_left_portrait = { + character = scope:vinoclast_caliph + } + + + + trigger = { + has_fp2_dlc_trigger = yes + + OR = { + has_religion = religion:islam_religion + has_religion = religion:judaism_religion + } + + root.faith = { + OR = { + has_doctrine = tenet_religious_legal_pronouncements + has_doctrine = tenet_literalism + has_doctrine = tenet_adaptive + } + } + + faith.religious_head != root + + exists = root.faith.religious_head + + root.faith.religious_head = { is_ai = yes } + + fp2_character_involved_in_struggle_trigger = yes + + any_held_county = { + county_has_province_with_terrain = { + terrain = farmlands + terrain = plains + terrain = hills + terrain = floodplains + } + } + } + + cooldown = { years = 50 } + + immediate = { + + + random_held_county = { + limit = { this = title:c_cadiz } + save_scope_as = vineyard_county + } + + IF = { + limit = { + NOT = { + exists = scope:vineyard_county + } + } + random_held_county = { + limit = { + county_has_province_with_terrain = { + terrain = farmlands + terrain = plains + terrain = hills + terrain = floodplains + } + } + save_scope_as = vineyard_county + } + } + + title:b_jerez = { + if = { + limit = { + OR = { + holder = root + holder = { + any_liege_or_above = { + this = root + } + } + } + } + save_scope_as = jerez_vineyards + } + } + + root.faith.religious_head = { save_scope_as = vinoclast_caliph } + + hidden_effect = { + scope:vinoclast_caliph = { + IF = { + limit = { + NOT = { + has_character_modifier = crusading_against_iberian_wine_modifier + } + } + } + add_character_modifier = { + modifier = crusading_against_iberian_wine_modifier + years = 30 + } + } + } + + create_character = { #this is the head of faith's emissary + age = { 25 75 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance #could be female, if given the right context. + trait = zealous + template = priest_character_template + save_scope_as = hof_emissary #this saves him as a scope so we can get nice effects to bounce off him! + } + } + + + option = { #Destroying fine wine? Have the caliph gone insane? + name = fp2_yearly.8000.a + trigger = { + NOT = { has_trait = zealous } + OR = { + has_trait = drunkard + has_trait = gregarious + has_trait = lifestyle_reveler + } + } + + ai_chance = { #hedonistic AI pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.2 + ai_energy = 0.7 + ai_greed = -0.5 + ai_zeal = -0.5 + } + } + + stress_impact = { + craven = minor_stress_impact_gain + temperate = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + + add_piety_level = -1 + + scope:vinoclast_caliph = { + progress_towards_rival_effect = { + REASON = rival_vineyard_burned + CHARACTER = root + OPINION = -25 + } + } + + add_character_modifier = { + modifier = wine_supply_secure_modifier + years = 30 + } + } + + + option = { #Let's burn 'em + name = fp2_yearly.8000.b + + ai_chance = { #radically zealous AIs pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 0.9 + ai_compassion = -0.5 + ai_greed = -0.5 + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + cynical = minor_stress_impact_gain + gluttonous = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + lifestyle_reveler = major_stress_impact_gain + drunkard = massive_stress_impact_gain + } + + add_piety = major_piety_gain + + scope:vinoclast_caliph = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + scope:vineyard_county = { + add_county_modifier = { + modifier = vineyards_burnt_county_modifier + years = 20 + } + } + + if = { + limit = { has_title = title:c_cadiz } + add_hook = { + type = favor_hook + target = scope:vinoclast_caliph + } + } + } + + + option = { #Never, I like wine + name = fp2_yearly.8000.c + + ai_chance = { #administrative or stubborn AI pick this option + base = 10 + ai_value_modifier = { + ai_honor = 0.2 + ai_energy = 0.5 + ai_greed = 0.5 + ai_compassion = 0.3 + ai_zeal = -0.8 + } + } + + stress_impact = { + craven = minor_stress_impact_gain + temperate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + + add_piety_level = -1 + + scope:vinoclast_caliph = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + scope:vineyard_county = { + add_county_modifier = { + modifier = vineyards_protected_county_modifier + years = 50 + } + } + } +} + +################################### +# Assembling the Cortes +# by Ola Jentzsch +################################### +scripted_trigger people_loving_councillor_trigger = { + is_available_healthy_ai_adult = yes + NOT = { is_vassal_of = root } +} + +fp2_yearly.8001 = { + type = character_event + title = fp2_yearly.8001.t + desc = fp2_yearly.8001.desc + theme = realm + + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:commoner_enthusiast + animation = chancellor + } + + trigger = { + has_fp2_dlc_trigger = yes + any_held_county = { any_county_province = { geographical_region = world_europe_west_iberia } } + + culture = { has_cultural_pillar = heritage_iberian } + + government_has_flag = government_is_feudal + + highest_held_title_tier >= tier_kingdom + + gold < medium_gold_value + + any_councillor = { people_loving_councillor_trigger = yes } + } + + cooldown = { years = 30 } + + immediate = { + random_councillor = { + limit = { people_loving_councillor_trigger = yes } + save_scope_as = commoner_enthusiast + } + } + + option = { #Invite the cities' representatives + name = fp2_yearly.8001.a + + add_character_modifier = { + modifier = cortes_modifier + years = 20 + } + + add_prestige = medium_prestige_loss + + scope:commoner_enthusiast = { + add_opinion = { + target = root + opinion = 10 + modifier = took_my_advice_opinion + } + } + + custom_tooltip = fp2_flavor.8001_vassal_opinion + hidden_effect = { + every_vassal = { + IF = { + limit = { + OR = { + has_trait = ambitious + has_trait = arrogant + has_trait = callous + has_trait = cynical + has_trait = wrathful + } + } + add_opinion = { + target = root + opinion = -10 + modifier = privileges_to_people_opinion + } + } + } + } + + ai_chance = { #Administrative or visionary characters pick this option, but it's also the Christian thing to do + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = 0.5 + ai_rationality = 0.6 + ai_zeal = 0.3 + } + } + + stress_impact = { + # Characters who are set in their ways or have no respect for common folk find this a very unappealing option. + arrogant = medium_stress_impact_gain + august = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + option = { #Invite everyone! I mean everyone. + name = fp2_yearly.8001.b + + trigger = { + NOT = { has_character_modifier = associates_with_strange_peasants_modifier } #since this modifier is a re-use from one of the learning lifestyle events, this is a safety measure to prevent root from getting a double of the same modifier + } + + add_character_modifier = { + modifier = associates_with_strange_peasants_modifier + years = 20 + } + + add_character_modifier = { + modifier = extra_large_cortes_modifier + years = 20 + } + + add_prestige = medium_prestige_loss + + scope:commoner_enthusiast = { + add_opinion = { + target = root + opinion = 10 + modifier = took_my_advice_opinion + } + } + + ai_chance = { #this is picked by AI who are hypersocial to the point of madness, or visionary way beyond their time + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_rationality = -0.5 + ai_greed = -0.5 + ai_vengefulness = -0.5 + ai_zeal = -0.3 + } + } + + stress_impact = { + # Characters who are careful or hate the masses find this a very unappealing option. + eccentric = minor_stress_impact_loss + craven = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + august = minor_stress_impact_gain + shy = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + option = { #No, the nobles knows best, as we always have. + name = fp2_yearly.8001.c + + add_prestige = medium_prestige_gain + + scope:commoner_enthusiast = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + ai_chance = { #this is picked by AI who want to safeguard their privileges. + base = 10 + ai_value_modifier = { + ai_greed = 1 + ai_vengefulness = 0.5 + ai_rationality = 0.2 + ai_compassion = -0.5 + ai_energy = -0.5 + } + } + + stress_impact = { + # Characters who likes efficiency and democracy dislikes this option + ambitious = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + } +} + +################################### +# Dietary Dilemma +# By Ola Jentzsch +################################### +fp2_yearly.8002 = { + type = character_event + title = fp2_yearly.8002.t + desc = fp2_yearly.8002.desc + theme = faith + override_background = { reference = council_chamber } + + left_portrait = { + character = root + animation = boredom + } + right_portrait = { + character = scope:preoccupied_ulama + animation = worry + } + + trigger = { + has_fp2_dlc_trigger = yes + any_realm_province = { is_coastal = yes } + + OR = { + has_religion = religion:islam_religion + has_religion = religion:judaism_religion + } + + faith = { + OR = { + has_doctrine = tenet_religious_legal_pronouncements + has_doctrine = tenet_literalism + has_doctrine = tenet_adaptive + } + } + + any_held_title = { is_head_of_faith = no } + + exists = cp:councillor_court_chaplain + } + + cooldown = { years = 50 } + + immediate = { + + cp:councillor_court_chaplain = { save_scope_as = preoccupied_ulama } + + random_realm_province = { + limit = { + is_coastal = yes + } + save_scope_as = beached_whale_province + } + } + + option = { #Make a ruling + name = fp2_yearly.8002.a + trigger = { + OR = { + has_trait = sayyid + has_trait = crusader_king + has_trait = order_member + piety_level >= 4 + learning >= very_high_skill_rating + } + } + + add_character_modifier = { + modifier = lay_ruler_issued_fatwa_modifier + years = 10 + } + + scope:preoccupied_ulama = { + add_opinion = { + target = root + opinion = -10 + modifier = dismissed_me_opinion + } + } + + ai_chance = { #rational AIs pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = 0.9 + ai_zeal = -0.7 + } + } + + stress_impact = { + # Craven character's don't wanna take the risk, and humble and trusting doesn't want to undermine the ulama + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + } + + option = { #Just go to town on it + name = fp2_yearly.8002.b + + scope:preoccupied_ulama = { + add_opinion = { + target = root + opinion = -10 + modifier = dismissed_me_opinion + } + } + + random_list = { + 60 = { + modifier = { + add = 30 + has_trait = whole_of_body + } + send_interface_toast = { + left_icon = root + title = healthy_whale_toast + add_character_modifier = { + modifier = mystery_meat_health_benefits_modifier + years = 10 + } + } + } + 40 = { + send_interface_toast = { + left_icon = root + title = unhealthy_whale_toast + add_character_modifier = { + modifier = mystery_meat_unhealth_benefits_modifier + years = 10 + } + } + } + } + + ai_chance = { #hungry AI pick this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = -0.8 + } + } + + stress_impact = { #temperate or cautious characters don't wanna eat strange blobs washed up from the Atlantic + inappetetic = medium_stress_impact_gain + temperate = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + + # but gluttons really wanna try it! + comfort_eater = medium_stress_impact_loss + gluttonous = medium_stress_impact_loss + lifestyle_reveler = minor_stress_impact_loss + } + } + + option = { #Be cautious and wait for official ruling + name = fp2_yearly.8002.c + + scope:preoccupied_ulama = { + add_opinion = { + target = root + opinion = 20 + modifier = took_my_advice_opinion + } + } + + ai_chance = { #cautious but faithful AIs pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.7 + ai_boldness = -0.5 + } + } + + stress_impact = { + # Ambitious or Impatient characters don't wanna wait for the ulama + ambitious = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + impatient = medium_stress_impact_gain + } + } + + option = { #Burn the carcass, just to be safe + name = fp2_yearly.8002.d + + add_dread = minor_dread_gain + + scope:preoccupied_ulama = { + add_opinion = { + target = root + opinion = 10 + modifier = admires_resolve_opinion + } + } + + + random = { + chance = 10 + custom_tooltip = exploding_whale.tt + send_interface_toast = { + left_icon = root + title = exploding_whale_toast + root = { + increase_wounds_effect = { REASON = by_exploding_whale } #it can happen... :D + } + } + } + + ai_chance = { #overly zealous AIs pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 0.5 + } + } + + stress_impact = { + # Rational characters find this to be total overkill + cynical = minor_stress_impact_gain + + #but zealous truly prefer to burn things + zealous = medium_stress_impact_loss + } + } +} + +################################### +# Flight of Fancy +# By Ola Jentzsch +################################### +# Inspired by an idea by Isabella welch +########################################## +fp2_yearly.8003 = { + type = character_event + title = fp2_yearly.8003.t + desc = fp2_yearly.8003.desc + theme = family + left_portrait = { + character = scope:enthusiastic_child + animation = admiration + } + right_portrait = { + character = scope:flying_polymath + animation = beg + } + + cooldown = { years = 125 } # Should be replaced with a playthrough cooldown (but global vars are too heavy atm) + + trigger = { + has_fp2_dlc_trigger = yes + is_landed = yes + is_ai = no + any_child = { + is_available_child = yes + age >= 6 + age <= 13 + NOT = { has_trait = blind } + } + has_trait = eccentric + OR = { + capital_province = { geographical_region = world_europe_west_iberia } + culture = { has_cultural_pillar = heritage_iberian } + } + } + + weight_multiplier = { + base = 0.4 + modifier = { + AND = { + current_year > 866 + current_year < 890 + NOT = { exists = global_var:ibnfirnas_created } + } + add = 0.6 + } + } + + immediate = { + + random_child = { + limit = { + is_available_child = yes + age >= 6 + age <= 13 + NOT = { has_trait = blind} + } + save_scope_as = enthusiastic_child + } + + root.capital_province = { save_scope_as = flight_capital } + + if = { + limit = { #their rough period of activity + AND = { + current_year > 866 + current_year < 890 + } + NOT = { exists = global_var:ibnfirnas_created } #makes sure that he wasn't already spawned by the event elsewhere (mostly relevant in multiplayer, since this is a player-only event) + } + create_character = { + age = { 56 80 } #their rough age during the period of their flourishing + location = root.capital_province + name = "Abbas ibn Firnas" #Armen Firman + gender = male + template = scholar_character + trait = intellect_good_1 + trait = lifestyle_poet + trait = education_learning_4 + random_traits_list = { #his personality + count = 3 + ambitious = {} + brave = {} + diligent = {} + impatient = {} + } + culture = culture:baranis + dynasty = none + faith = faith:muwalladi + save_scope_as = flying_polymath + } + set_global_variable = ibnfirnas_created + } + + else = { #or it defaults to a random one + create_character = { + age = { 50 80 } + location = root.capital_province + template = scholar_character + trait = intellect_good_2 + trait = education_learning_3 + trait = architect + random_traits_list = { + count = 3 + brave = {} + calm = {} + diligent = {} + cynical = {} + humble = {} + patient = {} + } + culture = root.capital_province.culture + faith = root.faith + save_scope_as = flying_polymath + } + } + hidden_effect = { + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = no + LEVEL_3 = yes + } + } + } + + option = { #Very well, I shall allow it + name = fp2_yearly.8003.a + flavor = fp2_yearly.8003_child_reaction + + + scope:enthusiastic_child = { + add_opinion = { + target = root + opinion = 30 + modifier = pleased_opinion + } + } + + random_list = { + 30 = { + trigger = { + scope:enthusiastic_child = { + number_of_personality_traits <= 2 + NOT = { has_trait = brave } + } + } + send_interface_toast = { + title = polymath_flight_attempt_toast.success + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + add_prestige = medium_prestige_gain + add_courtier = scope:flying_polymath + scope:enthusiastic_child = { add_trait_force_tooltip = brave } + } + } + 30 = { + send_interface_toast = { + title = polymath_flight_attempt_toast.success + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + add_prestige = medium_prestige_gain + add_courtier = scope:flying_polymath + } + modifier = { + add = 30 + scope:enthusiastic_child = { + OR = { + number_of_personality_traits >= 3 + has_trait = brave + } + } + } + } + 20 = { + trigger = { + scope:enthusiastic_child = { + number_of_personality_traits <= 2 + NOT = { has_trait = sadistic } + } + } + send_interface_toast = { + title = polymath_flight_attempt_toast.failure + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + scope:flying_polymath = { + death = { death_reason = death_flight_attempt } + } + scope:enthusiastic_child = { add_trait_force_tooltip = sadistic} + } + } + 20 = { + trigger = { + scope:enthusiastic_child = { + NOT = { has_trait = depressed } + } + } + send_interface_toast = { + title = polymath_flight_attempt_toast.failure + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + scope:flying_polymath = { + death = { death_reason = death_flight_attempt } + } + scope:enthusiastic_child = { add_trait_force_tooltip = depressed_1 } + } + modifier = { + add = 20 + scope:enthusiastic_child = { + number_of_personality_traits >= 3 + } + } + } + 40 = { + trigger = { + scope:enthusiastic_child = { + has_trait = depressed + OR = { + has_trait = brave + has_trait = sadistic + } + } + } + send_interface_toast = { + title = polymath_flight_attempt_toast.failure + left_icon = scope:enthusiastic_child + right_icon = scope:flying_polymath + scope:flying_polymath = { + death = { death_reason = death_flight_attempt } + } + scope:enthusiastic_child = { add_stress = minor_stress_gain } + } + } + } + + stress_impact = { #Compassionate people worry about bystanders getting hurt + compassionate = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + } + + + + option = { #I too, want to fly! + name = fp2_yearly.8003.b + + duel = { #time to fly! + skill = learning + value = high_skill_rating + + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + send_interface_toast = { + title = flight_attempt_toast.success + left_icon = root + + add_character_modifier = { + modifier = saw_the_world_from_above_modifier + years = 30 + } + scope:enthusiastic_child = { + add_opinion = { + target = root + opinion = 30 + modifier = pleased_opinion + } + } + random = { + chance = 50 + root = { give_nickname = nick_the_flying } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = flight_attempt_toast.failure + left_icon = root + + increase_wounds_effect = { REASON = flight_attempt } + + scope:enthusiastic_child = { + add_opinion = { + target = root + opinion = -20 + modifier = scared_opinion + } + } + random = { + chance = 50 + root = { give_nickname = nick_the_flightless } + } + } + } + } + + stress_impact = { #cravens, contents and the bedridden don't wanna take the risk + craven = medium_stress_impact_gain + content = minor_stress_impact_gain + ill = minor_stress_impact_gain + infirm = medium_stress_impact_gain + brave = minor_stress_impact_loss + } + } + + option = { #No, this is madness! + name = fp2_yearly.8003.c + + scope:enthusiastic_child = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + curious = minor_stress_impact_gain + } + } +} + +################################### +# Translation Schools +# By Ola Jentzsch +################################### +scripted_trigger fp2_yearly.8004_court_chaplain_traits = { + has_council_position = councillor_court_chaplain + learning >= excellent_skill_level + is_available_ai_adult = yes + NOT = { + has_trait = dull + has_trait = vengeful + has_trait = zealous + } +} + +fp2_yearly.8004 = { + type = character_event + title = fp2_yearly.8004.t + + desc = { + first_valid = { + desc = fp2_yearly.8004.desc_opening + } + first_valid = { + triggered_desc = { + trigger = { + scope:translation_enthusiast = { fp2_yearly.8004_court_chaplain_traits = yes } + } + desc = fp2_yearly.8004.desc_chaplain + } + desc = fp2_yearly.8004.desc_wanderer + } + } + + + theme = learning + + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:translation_enthusiast + animation = chancellor + } + + trigger = { + has_fp2_dlc_trigger = yes + OR = { + AND = { + exists = struggle:iberian_struggle + struggle:iberian_struggle = { is_struggle_phase = struggle_iberia_phase_conciliation } + fp2_character_involved_in_struggle_trigger = yes + } + AND = { + has_global_variable = fp2_struggle_conciliation_ending + root.capital_province = { geographical_region = world_europe_west_iberia } + } + } + + culture = { has_cultural_era_or_later = culture_era_high_medieval } + } + + cooldown = { years = 100 } + + immediate = { + + if = { #This looks to see if Gerard of Cremona will be used in the event + limit = { #his rough period of activity + AND = { + current_year > 1144 + current_year < 1190 + } + NOT = { exists = global_var:gerard_of_cremona_created } #makes sure that he wasn't already spawned by the event elsewhere + is_ai = no + } + create_character = { + age = { 34 70 } #his rough age during the period of his flourishing + location = root.capital_province + name = "Gherardo da Cremona" #Gerard of Cremona + gender = male + template = scholar_character + trait = scholar + trait = education_learning_4 + random_traits_list = { #his personality + count = 3 + diligent = {} + impatient = {} + calm = {} + cynical = {} + } + culture = culture:italian + dynasty = none + faith = faith:catholic + save_scope_as = translation_enthusiast #this is needed to get the loc right + } + set_global_variable = gerard_of_cremona_created + } + + if = { #or a brilliant court chaplain, if you happen to have one + limit = { + NOT = { exists = scope:translation_enthusiast } + } + random_councillor = { + limit = { fp2_yearly.8004_court_chaplain_traits = yes } + save_scope_as = translation_enthusiast + } + } + + if = { #or it defaults to a random scholar + limit = { + NOT = { exists = scope:translation_enthusiast } + } + create_character = { + age = { 32 50 } + location = root.capital_province + template = scholar_character + trait = education_learning_3 + random_traits_list = { + count = 3 + ambitious = {} + calm = {} + diligent = {} + cynical = {} + humble = {} + patient = {} + } + culture = root.culture + faith = root.faith + save_scope_as = translation_enthusiast + } + } + + root.capital_county = { save_scope_as = translation_capital } + } + + option = { #I shall spare #italic no#! expense to find the most capable people + name = fp2_yearly.8004.a + + + remove_treasury_or_gold = monumental_treasury_or_gold_value #this is expensive! + + if = { + limit = { + NOT = { cp:councillor_court_chaplain = scope:translation_enthusiast } + } + add_courtier = scope:translation_enthusiast #he's added to root's court + } + + duel = { #you try to recruit a bunch of genius translators + skill = learning + value = very_high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + modifier = { + add = 40 + has_trait = scholar + } + modifier = { + add = 40 + has_trait = diligent + } + modifier = { + add = 40 + has_trait = gregarious + } + modifier = { + add = 40 + has_trait = diplomat + } + modifier = { + add = 40 + has_trait = administrator + } + modifier = { + add = 40 + culture = { has_cultural_tradition = tradition_xenophilic } + } + modifier = { + add = 60 + any_held_county = { + any_county_province = { + barony = title:b_toledo + } + } + } + modifier = { + add = 60 + prestige_level >= high_prestige_level + } + send_interface_toast = { #you succeed! + title = recruiting_brilliance_toast.success + left_icon = root + add_character_modifier = { + modifier = great_translation_school_modifier + years = 30 + } + add_prestige = major_prestige_gain + if = { + limit = { is_ai = no } + give_nickname = nick_the_wise + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = recruiting_mediocrity_toast.failure + left_icon = root + add_character_modifier = { + modifier = mediocre_translation_school_modifier + years = 30 + } + add_prestige = minor_prestige_gain + } + } + } + + ai_chance = { #rational and ambitious AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 1 + ai_boldness = 0.7 + ai_zeal = -0.3 + ai_vengefulness = -0.5 + } + } + + stress_impact = { + # Content or lazy characters don't want to make the effort + content = minor_stress_impact_gain + lazy = minor_stress_impact_gain + + # Nor do self-absorbed ones + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + + #and impatient ones don't wanna wait + impatient = minor_stress_impact_gain + } + } + + option = { #If you are so capable, #italic you#! can do all the translations + name = fp2_yearly.8004.b + + remove_treasury_or_gold = medium_treasury_or_gold_value #this is expensive! + + + if = { + limit = { + NOT = { cp:councillor_court_chaplain = scope:translation_enthusiast } + } + add_courtier = scope:translation_enthusiast #he's added to root's court + } + + scope:translation_enthusiast = { + add_opinion = { + target = root + opinion = -20 + modifier = unfair_expectations_opinion + } + } + + add_character_modifier = { + modifier = translation_effort_modifier + years = 30 + } + + ai_chance = { #rational and cautious AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = -0.4 + } + } + + stress_impact = { + # self-absorbed cheapskates still don't want to pay for this + arrogant = minor_stress_impact_gain + greedy = minor_stress_impact_gain + + #and ambitious and diligent feel it's not enough + ambitious = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + } + + option = { #I would rather have the books collecting dust..." + name = fp2_yearly.8004.c + + add_character_modifier = { + modifier = dusty_libraries_modifier + years = 30 + } + + + if = { + limit = { cp:councillor_court_chaplain = scope:translation_enthusiast } + scope:translation_enthusiast = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + } + + if = { + limit = { + NOT = { cp:councillor_court_chaplain = scope:translation_enthusiast } + } + scope:translation_enthusiast = { silent_disappearance_effect = yes } + } + + ai_chance = { #zealous or ignorant AI pick this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.4 + ai_energy = -0.7 + } + } + + stress_impact = { + # ambitious or learned characters cry from this + ambitious = minor_stress_impact_gain + diligent = minor_stress_impact_gain + generous = minor_stress_impact_gain + scholar = major_stress_impact_gain + } + } +} + +################################### +# Under the Stone Pine +# by Ola Jentzsch +################################### +fp2_yearly.8005 = { + type = character_event + title = fp2_yearly.8005.t + desc = { + desc = fp2_yearly.8005.desc_opening + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_iberian } + } + desc = fp2_yearly.8005.desc_iberian + } + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = language_arabic } + } + desc = fp2_yearly.8005.desc_arabic + } + desc = fp2_yearly.8005.desc_language_neutral + } + desc = fp2_yearly.8005.desc_middle_part + first_valid = { + triggered_desc = { + trigger = { current_year >= 1120 } + desc = fp2_yearly.8005.desc_post_troubadours + } + desc = fp2_yearly.8005.desc_pre_troubadours + } + } + theme = love + left_portrait = { + character = root + animation = sadness + } + + cooldown = { years = 50 } + + trigger = { + has_fp2_dlc_trigger = yes + is_landed_or_landless_administrative = yes + OR = { + capital_province = { geographical_region = world_europe_west_iberia } + culture = { has_cultural_pillar = heritage_iberian } + } + } + + immediate = { + + random_relation = { + type = lover + save_scope_as = courtly_lover + } + + capital_county = { save_scope_as = tree_capital } + } + + option = { #Embrace the love in your heart + name = fp2_yearly.8005.a + + trigger = { + any_relation = { type = lover } + NOT = { has_trait = lifestyle_poet } + } + + add_trait = lifestyle_poet + + scope:courtly_lover = { + add_opinion = { + target = root + opinion = 10 + modifier = flattered_opinion + } + } + + ai_chance = { #energetic, honorable and compassionate AI goes for this option + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_compassion = 0.6 + ai_honor = 0.5 + ai_rationality = -0.5 + } + } + + stress_impact = { + chaste = major_stress_impact_gain + content = minor_stress_impact_gain + arrogant = major_stress_impact_gain + callous = major_stress_impact_gain + } + } + + option = { #Feel something + name = fp2_yearly.8005.b + + ai_chance = { #humble AI goes for this option + base = 10 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.5 + ai_honor = 0.5 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + add_character_modifier = { + modifier = felt_something_modifier + years = 10 + } + } + + + + option = { #Sponsor more musicians + name = fp2_yearly.8005.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + + add_character_modifier = { + modifier = investing_in_music_modifier + years = 25 + } + + ai_chance = { #energetic, constructive AI goes for this option + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_compassion = 0.5 + ai_rationality = 0.5 + ai_greed = -1 + } + } + + stress_impact = { + content = minor_stress_impact_gain + greedy = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + + option = { #Chop down the damned tree + name = fp2_yearly.8005.d + + add_character_modifier = { + modifier = aversion_to_joy_modifier + years = 20 + } + + scope:tree_capital = { + add_county_modifier = { + modifier = great_pine_chopped_down_county_modifier + years = 10 + } + } + + ai_chance = { #vengeful and uncompassionate AI goes for this option + base = 10 + ai_value_modifier = { + ai_vengefulness = 0.7 + ai_zeal = 0.3 + ai_compassion = -1 + ai_rationality = -0.5 + } + } + + stress_impact = { + base = minor_stress_impact_gain + calm = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + humble = minor_stress_impact_gain + arrogant = medium_stress_impact_loss + callous = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + } + } +} + +################################### +# Saqaliba Settlers +# by Ola Jentzsch +################################### +scripted_trigger fp2_yearly.8006_province_trigger = { + has_holding_type = city_holding + barony = { + is_under_holy_order_lease = no + is_capital_barony = no + } +} + +scripted_trigger fp2_yearly.8006_ruler_trigger = { + has_religion = religion:islam_religion + is_ai = yes +} + +fp2_yearly.8006 = { + type = character_event + title = fp2_yearly.8006.t + desc = fp2_yearly.8006.desc + theme = crown + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:saqaliba_leader + animation = happiness + } + + lower_left_portrait = { + character = scope:former_master + } + + trigger = { + is_ai = no + has_fp2_dlc_trigger = yes + is_landed = yes + any_neighboring_top_liege_realm_owner = { fp2_yearly.8006_ruler_trigger = yes } + any_held_county = { any_county_province = { fp2_yearly.8006_province_trigger = yes } } + + OR = { #implemented for FP3 to prevent triggering in Iran + capital_province = { geographical_region = world_europe_west_iberia } + culture = { has_cultural_pillar = heritage_iberian } + } + } + + cooldown = { years = 50 } + + immediate = { + + random_neighboring_top_liege_realm_owner = { + limit = { fp2_yearly.8006_ruler_trigger = yes } + save_scope_as = former_master + } + + random_held_county = { + limit = { + any_county_province = { fp2_yearly.8006_province_trigger = yes } + } + save_scope_as = saqaliba_county #for use in the claim the former_master might get + } + + scope:saqaliba_county = { + random_county_province = { + limit = { fp2_yearly.8006_province_trigger = yes } + barony = { save_scope_as = saqaliba_barony } + } + } + + create_character = { #this is the saqaliba refugee's leader + age = { 20 50 } + location = root.capital_province + gender_female_chance = 50 + random_traits_list = { + count = 3 + ambitious = {} + brave = {} + stubborn = {} + honest = {} + cynical = {} + } + random_traits_list = { #something fun to give them character! + count = 2 + beauty_good_3 = {} + overseer = {} + shrewd = {} + scarred = {} + } + culture = culture:russian + faith = scope:former_master.faith + dynasty = none + save_scope_as = saqaliba_leader + + after_creation = { + if = { + limit = { is_female = no } + add_trait = beardless_eunuch + } + } + } + + hidden_effect = { + scope:saqaliba_leader = { + add_character_modifier = former_slave_npc_modifier + } + } + } + + option = { #Give them what they want + name = fp2_yearly.8006.a + + scope:saqaliba_leader = { + add_opinion = { + target = root + opinion = 20 + modifier = received_title_barony + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = yes + } + + scope:saqaliba_barony = { + change_title_holder = { + holder = scope:saqaliba_leader + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + + scope:former_master = { + if = { + limit = { has_relation_rival = root } + custom_tooltip = { + text = furious_rival_8006.desc + hidden_effect = { add_unpressed_claim = scope:saqaliba_county } + } + } + else = { + progress_towards_rival_effect = { + REASON = rival_saqalibas_refuge + CHARACTER = root + OPINION = 0 + } + } + } + + scope:saqaliba_county = { + add_county_modifier = { + modifier = saqaliba_settlers_county_modifier + years = 30 + } + } + + ai_chance = { #ambitious or compassionate AI goes for this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.8 + ai_greed = 0.5 + ai_honor = 0.6 + ai_compassion = 0.6 + } + } + + stress_impact = { + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + } + + option = { #You can stay, but your friends must go elsewhere + name = fp2_yearly.8006.b + flavor = fp2_yearly.8006.flavor.b.tt + + + scope:former_master = { + add_opinion = { + target = root + opinion = -10 + modifier = harbored_a_fugitive_opinion + } + } + + add_courtier = scope:saqaliba_leader + + ai_chance = { #cautious AI goes for this option + base = 10 + ai_value_modifier = { + ai_boldness = -0.5 + ai_rationality = 0.5 + ai_compassion = -0.3 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = major_stress_impact_gain + } + } + + + option = { #Send them back to their former master + name = fp2_yearly.8006.c + flavor = fp2_yearly.8006.flavor.c.tt + + + if = { + limit = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:former_master } + } + add_character_modifier = { + modifier = obligations_fulfilled_modifier + years = 10 + } + } + else = { + add_hook = { + type = favor_hook + target = scope:former_master + } + } + + #Flag that scope:saqaliba_leader should leave. + save_scope_as = disappear_saqaliba + + ai_chance = { #cruel AI go for this option + base = 10 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = 0.5 + ai_greed = 0.5 + ai_vengefulness = 0.5 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + compassionate = massive_stress_impact_gain + generous = massive_stress_impact_gain + } + } + + after = { + if = { + limit = { exists = scope:disappear_saqaliba } + scope:saqaliba_leader = { silent_disappearance_effect = yes } + } + } +} + +################################### +# 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 = { + OR = { root.religion = religion:eastern_orthodox_religion root.religion = religion:catholic_religion root.religion = religion:protestant_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 +################################### +fp2_yearly.9005 = { + type = character_event + title = fp2_james.0004.t + desc = fp2_james.0004.desc + theme = secret + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:fp2_james_0004_murder_baron + animation = scheme + } + + trigger = { + any_sub_realm_county = { # Are any of my realm's counties a hostile faith that is not governed by someone with protected religious rights? + is_unprotected_hostile_faith = yes + is_landless_type_title = no + } + OR = { # You have to be a bit of a monster to even consider this + has_trait = zealous + has_trait = sadistic + has_trait = callous + dread >= medium_dread + } + } + + immediate = { + create_character = { + template = toledan_night_character + location = root.capital_province + save_scope_as = fp2_james_0004_murder_baron + } + random_sub_realm_county = { + limit = { + is_unprotected_hostile_faith = yes + is_landless_type_title = no + } + save_scope_as = fp2_james_0004_place_of_murder + # If the holder is of that same hostile faith, murder them! + if = { + limit = { + faith = holder.faith + holder = { + is_ai = yes + } + } + holder = { save_scope_as = fp2_james_0004_murder_victim } + } + } + } + + option = { # Go ahead and have some people murdered + name = fp2_james.0004.a + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:fp2_james_0004_place_of_murder = { + change_title_holder = { + holder = scope:fp2_james_0004_murder_baron + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + hidden_effect = { + add_opinion = { + target = scope:fp2_james_0004_murder_baron + modifier = received_title_county + } + } + scope:fp2_james_0004_place_of_murder = { + change_county_control = major_county_control_gain + set_county_faith = root.faith + add_county_modifier = { + modifier = fp2_toledo_nights_modifier + years = 10 + } + } + every_sub_realm_county = { + limit = { + faith = scope:fp2_james_0004_place_of_murder.faith + } + add_county_modifier = fp2_toledo_nights_fallout_modifier + } + add_hook = { + type = favor_hook + target = scope:fp2_james_0004_murder_baron + } + + stress_impact = { + just = massive_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + NOR = { + has_trait = zealous + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { + name = fp2_james.0004.b + scope:fp2_james_0004_murder_baron = { silent_disappearance_effect = yes } + ai_chance = { + base = 10 + modifier = { + factor = 0.5 + OR = { + has_trait = zealous + has_trait = sadistic + has_trait = callous + } + } + } + } +} + +################################################### +# Local bishop mad his church faces the wrong way # +# By James Beaumont # +################################################### +fp2_yearly.9006 = { + type = character_event + title = fp2_james.0005.t + desc = { + desc = fp2_james.0005.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = fp2_james.0005.desc.christian + } + triggered_desc = { + trigger = { + religion = religion:islam_religion + } + desc = fp2_james.0005.desc.muslim + } + } + desc = fp2_james.005.desc.outro + } + theme = faith + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:fp2_james_angry_priest + animation = personality_zealous + } + + trigger = { + any_sub_realm_barony = { # There's a church held by a right-faith bishop in a wrong-faith province + holder != root # Ensure it's not a lay-clergy player + holder.faith = root.faith + holder.capital_province = { has_holding_type = church_holding } + is_unprotected_hostile_faith = yes + OR = { # Mosque is now church or church is now mosque + AND = { + OR = { root.religion = religion:eastern_orthodox_religion root.religion = religion:catholic_religion root.religion = religion:protestant_religion } + faith = { religion = religion:islam_religion } + } + AND = { + root.religion = religion:islam_religion + faith = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + } + } + } + + immediate = { + random_sub_realm_barony = { + limit = { + holder != root + holder.faith = root.faith + holder.capital_province = { has_holding_type = church_holding } + is_unprotected_hostile_faith = yes + OR = { + AND = { + OR = { root.religion = religion:eastern_orthodox_religion root.religion = religion:catholic_religion root.religion = religion:protestant_religion } + faith = { religion = religion:islam_religion } + } + AND = { + root.religion = religion:islam_religion + faith = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + } + } + } + save_scope_as = fp2_james_wrong_temple + holder = { save_scope_as = fp2_james_angry_priest } + } + } + + option = { # Change the orientation of the church + name = fp2_james.0005.a + remove_treasury_or_gold = medium_treasury_or_gold_value + add_piety = medium_piety_gain + scope:fp2_james_wrong_temple.county ={ + set_county_faith = root.faith + add_county_modifier = { + modifier = fp2_correctly_facing_church + years = 15 + } + } + reverse_add_opinion = { + target = scope:fp2_james_angry_priest + modifier = grateful_opinion + opinion = 20 + } + + stress_impact = { + greedy = medium_stress_impact_gain + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Tell the baron it's not worth the cost are you insane + name = fp2_james.0005.b + add_piety = minor_piety_loss + reverse_add_opinion = { + target = scope:fp2_james_angry_priest + modifier = hate_opinion + opinion = -25 + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = zealous + } + } + } +} diff --git a/N3OW/events/dlc/fp2/neutral_struggle_events.txt b/N3OW/events/dlc/fp2/neutral_struggle_events.txt new file mode 100644 index 00000000..4ea3a58b --- /dev/null +++ b/N3OW/events/dlc/fp2/neutral_struggle_events.txt @@ -0,0 +1,365 @@ +namespace = neutral_struggle + +################################################## +# MAINTENANCE EVENTS + +################################################## +# Activate Passing of Time +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +neutral_struggle.0001 = { + hidden = yes + scope = struggle + + immediate = { + # Passage of Time catalyst ticks towards default phases. + if = { + limit = { phase_has_catalyst = catalyst_passing_of_time } + activate_struggle_catalyst = catalyst_passing_of_time + } + # Other time-based catalysts. + ## Missing the Arabian Empire or Sunni Caliphate. + if = { + limit = { + OR = { + NOT = { exists = title:e_arabia.holder } + NOT = { exists = title:d_sunni.holder } + } + } + if = { + limit = { phase_has_catalyst = catalyst_missing_caliphate_or_arabian_empire } + activate_struggle_catalyst = catalyst_missing_caliphate_or_arabian_empire + log_debug_variable_for_persian_struggle_effect = { VAR = concession_catalyst_missing_caliphate_or_arabian_empire } + } + } + # House Unity catalysts. + ## Disharmonious houses. + if = { + limit = { + OR = { + phase_has_catalyst = catalyst_yearly_influential_house_is_antagonistic_major + phase_has_catalyst = catalyst_yearly_influential_house_is_antagonistic_medium + phase_has_catalyst = catalyst_yearly_influential_house_is_antagonistic_minor + phase_has_catalyst = catalyst_yearly_influential_house_is_antagonistic_minimal + } + } + # Calc how many relevant houses are in a bit of a state. + save_scope_value_as = { + name = antagonistic_influential_house_check + value = { + every_involved_ruler = { + limit = { + house ?= { + house_head = prev + has_house_unity_stage = antagonistic + } + } + add = 1 + } + } + } + # Right, now we activate different sizes of catalyst depending on how many affected houses we have. + ## Major + if = { + limit = { scope:antagonistic_influential_house_check >= catalyst_yearly_influential_house_is_antagonistic_major_control_value } + activate_struggle_catalyst = catalyst_yearly_influential_house_is_antagonistic_major + log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_yearly_influential_house_is_antagonistic_major } + } + ## Medium + else_if = { + limit = { scope:antagonistic_influential_house_check >= catalyst_yearly_influential_house_is_antagonistic_medium_control_value } + activate_struggle_catalyst = catalyst_yearly_influential_house_is_antagonistic_medium + log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_yearly_influential_house_is_antagonistic_medium } + } + ## Minor + else_if = { + limit = { scope:antagonistic_influential_house_check >= catalyst_yearly_influential_house_is_antagonistic_minor_control_value } + activate_struggle_catalyst = catalyst_yearly_influential_house_is_antagonistic_minor + log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_yearly_influential_house_is_antagonistic_minor } + } + ## Minimal + else_if = { + limit = { scope:antagonistic_influential_house_check >= catalyst_yearly_influential_house_is_antagonistic_minimal_control_value } + activate_struggle_catalyst = catalyst_yearly_influential_house_is_antagonistic_minimal + log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_yearly_influential_house_is_antagonistic_minimal } + } + } + ## Harmonious houses. + if = { + limit = { + OR = { + phase_has_catalyst = catalyst_yearly_influential_house_is_harmonious_major + phase_has_catalyst = catalyst_yearly_influential_house_is_harmonious_medium + phase_has_catalyst = catalyst_yearly_influential_house_is_harmonious_minor + phase_has_catalyst = catalyst_yearly_influential_house_is_harmonious_minimal + } + } + every_involved_ruler = { + limit = { + house ?= { + house_head = prev + has_house_unity_stage = harmonious + } + } + house = { add_to_list = harmonious_houses } + } + # Calc how many relevant houses are in a bit of a state. + save_scope_value_as = { + name = harmonious_influential_house_check + value = { + value = 0 + every_in_list = { + list = harmonious_houses + add = 1 + } + } + } + # Right, now we activate different sizes of catalyst depending on how many affected houses we have. + ## Major + if = { + limit = { scope:harmonious_influential_house_check >= catalyst_yearly_influential_house_is_harmonious_major_control_value } + activate_struggle_catalyst = catalyst_yearly_influential_house_is_harmonious_major + log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_yearly_influential_house_is_harmonious_major } + } + ## Medium + else_if = { + limit = { scope:harmonious_influential_house_check >= catalyst_yearly_influential_house_is_harmonious_medium_control_value } + activate_struggle_catalyst = catalyst_yearly_influential_house_is_harmonious_medium + log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_yearly_influential_house_is_harmonious_medium } + } + ## Minor + else_if = { + limit = { scope:harmonious_influential_house_check >= catalyst_yearly_influential_house_is_harmonious_minor_control_value } + activate_struggle_catalyst = catalyst_yearly_influential_house_is_harmonious_minor + log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_yearly_influential_house_is_harmonious_minor } + } + ## Minimal + else_if = { + limit = { scope:harmonious_influential_house_check >= catalyst_yearly_influential_house_is_harmonious_minimal_control_value } + activate_struggle_catalyst = catalyst_yearly_influential_house_is_harmonious_minimal + log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_yearly_influential_house_is_harmonious_minimal } + } + } + # Silk Road + tgp_silk_road_iranian_intermezzo_yearly_effect = yes + + # Finally, queue the event up again for a year hence. + trigger_event = { + id = neutral_struggle.0001 + years = 1 + } + } +} + +################################################## +# MAINTENANCE FOR SITUATIONS +# + +namespace = neutral_situation + +neutral_situation.0001 = { # CHINA + hidden = yes + scope = situation + trigger = { exists = situation:silk_road_situation } + immediate = { + situation:silk_road_situation.situation_sub_region:region_silk_road_proper_china = { tgp_silk_road_downstream_effect = yes } + # Finally, queue the event up again for a year hence. + trigger_event = { + id = neutral_situation.0002 # Tibet + months = 2 + } + } +} + +neutral_situation.0002 = { # TIBET + hidden = yes + scope = situation + trigger = { exists = situation:silk_road_situation } + immediate = { + situation:silk_road_situation.situation_sub_region:region_silk_road_proper_tibet = { tgp_silk_road_downstream_effect = yes } + # Finally, queue the event up again for a year hence. + trigger_event = { + id = neutral_situation.0005 # Transcaspia + months = 2 + } + } +} + +neutral_situation.0003 = { # INDIA + hidden = yes + scope = situation + trigger = { exists = situation:silk_road_situation } + immediate = { + situation:silk_road_situation.situation_sub_region:region_silk_road_proper_india = { tgp_silk_road_downstream_effect = yes } + # Finally, queue the event up again for a year hence. + trigger_event = { + id = neutral_situation.0004 # Central Asia + months = 2 + } + } +} + +neutral_situation.0004 = { # CENTRAL ASIA + hidden = yes + scope = situation + trigger = { exists = situation:silk_road_situation } + immediate = { + situation:silk_road_situation.situation_sub_region:region_silk_road_proper_central_asia = { tgp_silk_road_downstream_effect = yes } + # Finally, queue the event up again for a year hence. + trigger_event = { + id = neutral_situation.0003 # Tibet + months = 2 + } + } +} + +neutral_situation.0005 = { # TRANSCASPIA + hidden = yes + scope = situation + trigger = { exists = situation:silk_road_situation } + immediate = { + situation:silk_road_situation.situation_sub_region:region_silk_road_proper_transcaspia = { tgp_silk_road_downstream_effect = yes } + # Finally, queue the event up again for a year hence. + trigger_event = { + id = neutral_situation.0006 # Occident + months = 2 + } + } +} + +neutral_situation.0006 = { # OCCIDENT + hidden = yes + scope = situation + trigger = { exists = situation:silk_road_situation } + immediate = { + situation:silk_road_situation.situation_sub_region:region_silk_road_proper_occident = { tgp_silk_road_downstream_effect = yes } + # Finally, queue the event up again for a year hence. + trigger_event = { + id = neutral_situation.0001 # China + months = 2 + } + } +} + +neutral_situation.0007 = { # INNOVATION SETUP + hidden = yes + scope = situation + trigger = { exists = situation:silk_road_situation } + immediate = { + if = { + limit = { has_game_rule = silk_road_starting_innovations_random } + while = { + count = 4 + random_culture_innovation = { + limit = { + has_innovation_parameter = silk_road_innovation_parameter + is_known_by_culture = title:c_jingzhao.culture + NOR = { + scope:innovation_1 ?= this + scope:innovation_2 ?= this + scope:innovation_3 ?= this + } + } + if = { + limit = { exists = scope:innovation_3 } + save_scope_as = innovation_4 + } + else_if = { + limit = { exists = scope:innovation_2 } + save_scope_as = innovation_3 + } + else_if = { + limit = { exists = scope:innovation_1 } + save_scope_as = innovation_2 + } + else = { save_scope_as = innovation_1 } + } + } + situation_sub_region:region_silk_road_proper_china = { + set_variable = { name = innovation value = scope:innovation_1 } + } + situation_sub_region:region_silk_road_proper_tibet = { + set_variable = { name = innovation value = scope:innovation_2 } + } + situation_sub_region:region_silk_road_proper_central_asia = { + set_variable = { name = innovation value = scope:innovation_2 } + } + situation_sub_region:region_silk_road_proper_india = { + set_variable = { name = innovation value = scope:innovation_3 } + } + situation_sub_region:region_silk_road_proper_transcaspia = { + set_variable = { name = innovation value = scope:innovation_3 } + } + situation_sub_region:region_silk_road_proper_occident = { + set_variable = { name = innovation value = scope:innovation_4 } + } + } + else = { + if = { + limit = { game_start_date = 867.1.1 } + situation_sub_region:region_silk_road_proper_china = { + set_variable = { name = innovation value = culture_innovation:innovation_dragon_kiln } + } + situation_sub_region:region_silk_road_proper_tibet = { + set_variable = { name = innovation value = culture_innovation:innovation_block_printing } + } + situation_sub_region:region_silk_road_proper_central_asia = { + set_variable = { name = innovation value = culture_innovation:innovation_block_printing } + } + situation_sub_region:region_silk_road_proper_india = { + set_variable = { name = innovation value = culture_innovation:innovation_waterworks } + } + situation_sub_region:region_silk_road_proper_transcaspia = { + set_variable = { name = innovation value = culture_innovation:innovation_waterworks } + } + situation_sub_region:region_silk_road_proper_occident = { + set_variable = { name = innovation value = culture_innovation:innovation_cupellation } + } + } + else_if = { + limit = { game_start_date = 1066.9.15 } + situation_sub_region:region_silk_road_proper_china = { + set_variable = { name = innovation value = culture_innovation:innovation_compass } + } + situation_sub_region:region_silk_road_proper_tibet = { + set_variable = { name = innovation value = culture_innovation:innovation_fire_medicine } + } + situation_sub_region:region_silk_road_proper_central_asia = { + set_variable = { name = innovation value = culture_innovation:innovation_fire_medicine } + } + situation_sub_region:region_silk_road_proper_india = { + set_variable = { name = innovation value = culture_innovation:innovation_champa_rice } + } + situation_sub_region:region_silk_road_proper_transcaspia = { + set_variable = { name = innovation value = culture_innovation:innovation_champa_rice } + } + situation_sub_region:region_silk_road_proper_occident = { + set_variable = { name = innovation value = culture_innovation:innovation_pharmacopoeia } + } + } + else_if = { + limit = { game_start_date = 1178.10.1 } + situation_sub_region:region_silk_road_proper_china = { + set_variable = { name = innovation value = culture_innovation:innovation_grenades } + } + situation_sub_region:region_silk_road_proper_tibet = { + set_variable = { name = innovation value = culture_innovation:innovation_pharmacopoeia } + } + situation_sub_region:region_silk_road_proper_central_asia = { + set_variable = { name = innovation value = culture_innovation:innovation_pharmacopoeia } + } + situation_sub_region:region_silk_road_proper_india = { + set_variable = { name = innovation value = culture_innovation:innovation_coking } + } + situation_sub_region:region_silk_road_proper_transcaspia = { + set_variable = { name = innovation value = culture_innovation:innovation_coking } + } + situation_sub_region:region_silk_road_proper_occident = { + set_variable = { name = innovation value = culture_innovation:innovation_bulkheads } + } + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_clan_events_2000.txt b/N3OW/events/dlc/fp3/fp3_clan_events_2000.txt new file mode 100644 index 00000000..de71d756 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_clan_events_2000.txt @@ -0,0 +1,1493 @@ +################################ +# Clan Events 2000 +################################ + +namespace = clan_event + +# 2000 - Learning on the Job +# 2001 - Educational Taxation +# 2002 - Overworked Tax Collector +# 2005 - Offering a Replacement +# 2007 - A Troublesome Ledger + +################################ +# Learning on the Job +# by Emil Tisander +################################ +scripted_trigger clan_event_2000_suitable_tax_collector_trigger = { + is_ai = yes + NOR = { + has_trait = lazy + has_trait = dull + } + any_tax_collector_vassal = { } +} + +clan_event.2000 = { + type = character_event + title = clan_event.2000.t + desc = clan_event.2000.desc + theme = stewardship + override_background = { reference = study } + left_portrait = { + character = scope:improved_tax_collector + animation = personality_honorable + } + right_portrait = { + character = root + animation = thinking + } + + cooldown = { years = 5 } + + trigger = { + has_fp3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_commanding_army = no + any_tax_collector = { + clan_event_2000_suitable_tax_collector_trigger = yes + } + } + + immediate = { + # First, let's find a tax collector. + random_tax_collector = { + limit = { + clan_event_2000_suitable_tax_collector_trigger = yes + } + weight = { + base = 1 + modifier = { # Let's prioritize any close family members (cause that's more interesting) + add = 25 + is_close_family_of = root + } + modifier = { # Add a small bump if they are of the same house + add = 10 + exists = house + exists = root.house + house = root.house + } + modifier = { # Diligent or Ambitious tax collectors are more likely + add = 10 + OR = { + has_trait = diligent + has_trait = ambitious + } + } + modifier = { # Being patient is also useful + add = 5 + has_trait = patient + } + modifier = { # And so is being stubborn + add = 5 + has_trait = stubborn + } + } + save_scope_as = improved_tax_collector + save_scope_as = tax_collector_name # For localization + } + + # Let's randomize which skills the Tax Collector may improve. Weighted slightly on personality and education. + random_list = { + pick = 2 + unique = yes + + 20 = { # Diplomacy + save_scope_value_as = { + name = clan_event_2000_diplomacy + value = yes + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = gregarious + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = trusting + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_education_diplomacy_trigger = yes + } + } + } + 20 = { # Martial + save_scope_value_as = { + name = clan_event_2000_martial + value = yes + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = wrathful + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = brave + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_education_martial_trigger = yes + } + } + } + 20 = { # Stewardship + save_scope_value_as = { + name = clan_event_2000_stewardship + value = yes + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = greedy + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = just + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_education_stewardship_trigger = yes + } + } + } + 20 = { # Intrigue + save_scope_value_as = { + name = clan_event_2000_intrigue + value = yes + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = deceitful + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = vengeful + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_education_intrigue_trigger = yes + } + } + } + 20 = { # Learning + save_scope_value_as = { + name = clan_event_2000_learning + value = yes + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = humble + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_trait = patient + } + } + modifier = { + factor = 1.5 + scope:improved_tax_collector = { + has_education_learning_trigger = yes + } + } + } + } + + scope:improved_tax_collector = { + if = { + limit = { # If the tax collector doesn't have a maxed out education trait, let's make it more likely for them to be picked in clan_event.2001, should it trigger + NOR = { + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + has_trait = education_martial_4 + has_trait = education_martial_5 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = education_intrigue_4 + has_trait = education_intrigue_5 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + add_character_flag = clan_event_2000_bonus + } + } + } + + option = { # Attend to the needs of the people. + name = clan_event.2000.a + + trigger = { exists = scope:clan_event_2000_diplomacy } + + scope:improved_tax_collector = { + add_diplomacy_skill = 1 + } + random = { # Chance to increase vassal opinion slightly + chance = { + value = 10 + add = { + value = scope:improved_tax_collector.diplomacy + multiply = 2 + } + max = 75 + } + + send_interface_toast = { + title = clan_event.2000.a.success + left_icon = scope:improved_tax_collector + + scope:improved_tax_collector = { + every_tax_collector_vassal = { + custom = every_taxed_vassal_tt + add_opinion = { + modifier = fp3_diplomatic_tax_collection_opinion + years = 10 + target = root + } + } + } + } + } + + stress_impact = { + impatient = medium_stress_impact_gain + arbitrary = major_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = gregarious + } + modifier = { + factor = 5 + has_trait = trusting + } + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = arbitrary + has_trait = arrogant + } + } + } + } + + option = { # Arrange guard patrols. That will keep the vassals in line. + name = clan_event.2000.b + + trigger = { exists = scope:clan_event_2000_martial } + + scope:improved_tax_collector = { + add_martial_skill = 1 + } + random = { # Chance to gain some Dread + chance = { + value = 10 + add = { + value = scope:improved_tax_collector.martial + multiply = 2 + } + max = 75 + } + + send_interface_toast = { + title = clan_event.2000.b.success + left_icon = scope:improved_tax_collector + add_dread = minor_dread_gain + } + } + + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = wrathful + } + modifier = { + factor = 5 + has_trait = callous + } + modifier = { + factor = 0 + OR = { + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + option = { # Keep a ledger, and organize your work. + name = clan_event.2000.c + + trigger = { exists = scope:clan_event_2000_stewardship } + + scope:improved_tax_collector = { + add_stewardship_skill = 1 + } + random = { # Chance to gain slightly increased taxes from clan obligations + chance = { + value = 10 + add = { + value = scope:improved_tax_collector.stewardship + multiply = 2 + } + max = 75 + } + + send_interface_toast = { + title = clan_event.2000.c.success + left_icon = scope:improved_tax_collector + add_character_modifier = { + modifier = fp3_efficient_tax_collector + years = 10 + } + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_stewardship + } + modifier = { + factor = 0 + has_trait = lazy + } + } + } + + option = { # Spy on my subjects. You'll learn much by keeping a watchful eye. + name = clan_event.2000.d + + trigger = { exists = scope:clan_event_2000_intrigue } + + scope:improved_tax_collector = { + add_intrigue_skill = 1 + } + random = { + chance = { + value = 10 + add = { + value = scope:improved_tax_collector.intrigue + multiply = 2 + } + max = 75 + } + + custom_tooltip = clan_event.2000.d.tt + + send_interface_toast = { + title = clan_event.2000.d.success + left_icon = scope:improved_tax_collector + + if = { + limit = { + scope:improved_tax_collector = { + any_tax_collector_vassal = { + any_secret = { + NOT = { is_known_by = root } + } + } + } + } + scope:improved_tax_collector = { + random_tax_collector_vassal = { + random_secret = { + limit = { + NOT = { is_known_by = root } + } + #save_scope_as = vassal_secret_to_reveal + reveal_to = root + } + } + } + #scope:vassal_secret_to_reveal = { reveal_to = root } + } + } + } + + stress_impact = { + honest = major_stress_impact_gain + trusting = major_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = deceitful + } + modifier = { + factor = 5 + has_trait = paranoid + } + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = trusting + } + } + } + } + + option = { # Devote your time to matters of faith/scholarly studies. + name = { + trigger = { always = yes } + text = clan_event.2000.e1 + } + name = { + trigger = { scope:improved_tax_collector.faith = root.faith } + text = clan_event.2000.e2 + } + + trigger = { exists = scope:clan_event_2000_learning } + + scope:improved_tax_collector = { + add_learning_skill = 1 + } + if = { + limit = { + scope:improved_tax_collector.faith = root.faith + } + add_piety = minor_piety_gain + } + else_if = { + limit = { + scope:improved_tax_collector.religion = root.religion + } + add_piety = miniscule_piety_gain + } + + stress_impact = { + zealous = medium_stress_impact_loss + cynical = major_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = zealous + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # You are here to collect taxes, yes? Then GET me taxes! + name = clan_event.2000.option_f + + # First, let's add a sizable amount of gold + add_treasury_or_gold = { + value = 0 + scope:improved_tax_collector = { # Let's add gold based on the vassals the tax collector has assigned + every_tax_collector_vassal = { + add = { + value = monthly_character_income + multiply = 0.3 + } + } + } + min = minor_gold_value # But we don't want the amount to be too small + } + + # Now, let's make the affected vassals upset + scope:improved_tax_collector = { + every_tax_collector_vassal = { + custom = every_taxed_vassal_tt + add_opinion = { + modifier = fp3_outrageous_tax_collection_opinion + target = root + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + just = major_stress_impact_gain + generous = major_stress_impact_gain + } + + ai_chance = { + base = 20 + + modifier = { + factor = 0 + NOR = { + has_trait = greedy + has_trait = callous + } + } + } + } + + option = { # Speak favourably of ME. + name = clan_event.2000.g + + if = { + limit = { + scope:improved_tax_collector = { + house ?= root.house + } + } + dynasty ?= { add_dynasty_prestige = minor_dynasty_prestige_gain } + add_prestige = minor_prestige_gain + } + else = { + add_prestige = medium_prestige_gain + } + + stress_impact = { + arrogant = medium_stress_impact_loss + humble = major_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 5 + has_trait = arrogant + } + modifier = { + factor = 0 + has_trait = humble + } + } + } +} + +################################ +# Educational Taxation +# by Emil Tisander +################################ +clan_event.2001 = { + type = character_event + title = clan_event.2001.t + desc = { + desc = clan_event.2001.opening_desc + first_valid = { + triggered_desc = { + trigger = { + scope:educational_tax_collector = { has_trait = education_diplomacy } + } + desc = clan_event.2001.education_diplomacy + } + triggered_desc = { + trigger = { + scope:educational_tax_collector = { has_trait = education_martial } + } + desc = clan_event.2001.education_martial + } + triggered_desc = { + trigger = { + scope:educational_tax_collector = { has_trait = education_stewardship } + } + desc = clan_event.2001.education_stewardship + } + triggered_desc = { + trigger = { + scope:educational_tax_collector = { has_trait = education_intrigue } + } + desc = clan_event.2001.education_intrigue + } + triggered_desc = { + trigger = { + scope:educational_tax_collector = { has_trait = education_learning } + } + desc = clan_event.2001.education_learning + } + } + } + theme = stewardship + override_background = { reference = throne_room } + left_portrait = { + character = scope:educational_tax_collector + animation = happiness + } + right_portrait = { + character = root + animation = personality_content + } + + cooldown = { years = 10 } + + trigger = { + has_fp3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_commanding_army = no + any_tax_collector = { + is_ai = yes + NOR = { + # Cannot have a maxed out education already + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + has_trait = education_martial_4 + has_trait = education_martial_5 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = education_intrigue_4 + has_trait = education_intrigue_5 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + } + + immediate = { + random_tax_collector = { + limit = { + is_ai = yes + NOR = { + # Cannot have any a maxed out education already + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + has_trait = education_martial_4 + has_trait = education_martial_5 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = education_intrigue_4 + has_trait = education_intrigue_5 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + weight = { + base = 1 + modifier = { # Let's prioritize any close family members (cause that's more interesting) + add = 10 + is_close_family_of = root + } + modifier = { # If we have a tax collector who has improved their skills already (in clan_event.2000) that character is more likely + add = 20 + has_character_flag = clan_event_2000_bonus + } + } + save_scope_as = educational_tax_collector + } + + scope:educational_tax_collector = { + if = { + limit = { + has_character_flag = clan_event_2000_bonus + } + remove_character_flag = clan_event_2000_bonus + } + } + } + + option = { # Taxes are great for the both of us! + name = clan_event.2001.a + + scope:educational_tax_collector = { + rank_up_education_effect = yes + } + + ai_chance = { + base = 20 + + modifier = { + factor = 10 + has_trait = content + } + modifier = { + factor = 2 + has_trait = temperate + } + } + } + + option = { # Push them to do even more + name = clan_event.2001.b + + scope:educational_tax_collector = { + rank_up_education_effect = yes + + # Chance to increase the skill matching their education. Chance is affected by their energy. + if = { + limit = { has_trait = education_diplomacy } + random = { + chance = { + value = 50 + add = { + value = ai_energy + divide = 2 + } + max = 90 + min = 10 + } + + root = { + send_interface_toast = { + title = clan_event.2001.success + left_icon = scope:educational_tax_collector + + scope:educational_tax_collector = { add_diplomacy_skill = 2 } + } + } + } + } + else_if = { + limit = { has_trait = education_martial } + random = { + chance = { + value = 50 + add = { + value = ai_energy + divide = 2 + } + max = 90 + min = 10 + } + + root = { + send_interface_toast = { + title = clan_event.2001.success + left_icon = scope:educational_tax_collector + + scope:educational_tax_collector = { add_martial_skill = 2 } + } + } + } + } + else_if = { + limit = { has_trait = education_stewardship } + random = { + chance = { + value = 50 + add = { + value = ai_energy + divide = 2 + } + max = 90 + min = 10 + } + + root = { + send_interface_toast = { + title = clan_event.2001.success + left_icon = scope:educational_tax_collector + + scope:educational_tax_collector = { add_stewardship_skill = 2 } + } + } + } + } + else_if = { + limit = { has_trait = education_intrigue } + random = { + chance = { + value = 50 + add = { + value = ai_energy + divide = 2 + } + max = 90 + min = 10 + } + + root = { + send_interface_toast = { + title = clan_event.2001.success + left_icon = scope:educational_tax_collector + + scope:educational_tax_collector = { add_intrigue_skill = 2 } + } + } + } + } + else_if = { + limit = { has_trait = education_learning } + random = { + chance = { + value = 50 + add = { + value = ai_energy + divide = 2 + } + max = 90 + min = 10 + } + + root = { + send_interface_toast = { + title = clan_event.2001.success + left_icon = scope:educational_tax_collector + + scope:educational_tax_collector = { add_learning_skill = 2 } + } + } + } + } + + stress_impact = { + base = massive_stress_impact_gain + } + } + + progress_towards_rival_effect = { + CHARACTER = scope:educational_tax_collector + REASON = rival_grave_insult + OPINION = -30 + } + + add_prestige = medium_prestige_loss + + stress_impact = { + patient = medium_stress_impact_gain + just = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 0 + OR = { + has_trait = patient + has_trait = just + has_trait = compassionate + has_trait = shy + has_trait = craven + } + } + } + } +} + +################################ +# Overworked Tax Collector +# by Emil Tisander +################################ +clan_event.2002 = { + type = character_event + title = clan_event.2002.t + desc = clan_event.2002.desc + theme = stewardship + override_background = { reference = corridor_night } + left_portrait = { + character = scope:troubled_tax_collector + animation = stressed_teacher + } + right_portrait = { + character = root + animation = personality_compassionate + } + + cooldown = { years = 15 } + + trigger = { + has_fp3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_commanding_army = no + any_tax_collector = { # Any tax collector with at least one tax payer will do + is_ai = yes + any_tax_collector_vassal = { } + } + } + + immediate = { + random_tax_collector = { + limit = { + is_ai = yes + any_tax_collector_vassal = { } + } + save_scope_as = troubled_tax_collector + save_scope_as = tax_collector_name # For localization + } + } + + option = { # Allow me to help! + name = clan_event.2002.a + # While the event offers you the choice to increase opinion with your tax collector or the assigned vassals, you get both if your stewardship is high! + trigger = { + stewardship >= high_skill_rating + } + + scope:troubled_tax_collector = { + add_opinion = { + modifier = fp3_thankful_tax_collector_opinion + opinion = 25 + years = 10 + target = root + } + + every_tax_collector_vassal = { + custom = every_taxed_vassal_tt + add_opinion = { + modifier = fp3_diplomatic_tax_collection_opinion + years = 15 + target = root + } + } + } + + ai_chance = { + base = 50 + + modifier = { + factor = 2 + has_trait = diligent + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = content + } + } + } + } + + option = { # Why don't you take a break? + name = clan_event.2002.b + + scope:troubled_tax_collector = { + add_opinion = { + modifier = fp3_thankful_tax_collector_opinion + opinion = 20 + years = 10 + target = root + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = gregarious + } + } + } + } + + option = { # Good. My vassals expects their taxes to be handled efficiently... + name = clan_event.2002.c + + scope:troubled_tax_collector = { + every_tax_collector_vassal = { + custom = every_taxed_vassal_tt + add_opinion = { + modifier = fp3_diplomatic_tax_collection_opinion + years = 10 + target = root + } + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + OR = { + has_trait = just + has_trait = cynical + } + } + } + } +} + +################################ +# Offering a Replacement +# by Emil Tisander +################################ +clan_event.2005 = { + type = character_event + title = clan_event.2005.t + desc = clan_event.2005.desc + theme = stewardship + override_background = { reference = throne_room } + left_portrait = { + character = scope:loyal_vassal + animation = disbelief + } + right_portrait = { + character = scope:tax_collector_replacement + animation = reading + } + + cooldown = { years = 20 } + + trigger = { + is_ai = no + has_fp3_dlc_trigger = yes + basic_is_valid_for_yearly_events_trigger = yes + is_commanding_army = no + + # We need to have a tax collector with fairly low aptitude, as to have someone to replace + any_tax_collector = { + is_ai = yes + tax_collector_aptitude = { + target = clan_tax_slot + value <= 2 + } + } + + # We also need a vassal who, in some shape or form, would like to help you + any_vassal = { + is_ai = yes + OR = { + has_trait = loyal + opinion = { + target = root + value >= 50 + } + } + NOT = { has_relation_rival = root } + is_available_ai_adult = yes + government_has_flag = government_is_clan + } + } + + immediate = { + # First, let's find that bad tax collector the vassal wants to replace + random_tax_collector = { + limit = { + is_ai = yes + tax_collector_aptitude = { + target = clan_tax_slot + value <= 2 + } + } + save_scope_as = bad_tax_collector + } + + # Then find an appropiate vassal + random_vassal = { + limit = { + is_ai = yes + OR = { + has_trait = loyal + opinion = { + target = root + value >= 50 + } + } + NOT = { has_relation_rival = root } + is_available_ai_adult = yes + government_has_flag = government_is_clan + } + weight = { + base = 1 + modifier = { # Prioritize any vassal with the Loyal trait + add = 10 + has_trait = loyal + } + modifier = { # And vassals with very high opinion of you + add = 10 + opinion = { + target = root + value >= 80 + } + } + modifier = { # And if they are a powerful vassal + add = 5 + is_powerful_vassal = yes + } + modifier = { # Finally, if there is a suitable vassal actually taxed by the same tax collector, we should REALLY want to pick them + add = 200 + save_temporary_scope_as = suitable_vassal + scope:bad_tax_collector = { + any_tax_collector_vassal = { + this = scope:suitable_vassal + } + } + } + } + save_scope_as = loyal_vassal + } + + # Let's create the character the vassal is offering us as a tax collector + create_character = { + template = administrator_character + employer = scope:loyal_vassal + faith = scope:loyal_vassal.faith + culture = scope:loyal_vassal.culture + gender_female_chance = { + if = { + limit = { root.faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { root.faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = tax_collector_replacement + } + } + + option = { # A most appreciated gift! + name = clan_event.2005.a + + # Recruit the courtier to your own court + add_courtier = scope:tax_collector_replacement + + # And let's add some extra opinion to make sure the character likes you (which also increase their potential aptitude as tax collector) + hidden_effect = { + scope:tax_collector_replacement = { + add_opinion = { + modifier = loyal_servant + years = 20 + target = root + } + } + } + + ai_chance = { + base = 50 + + modifier = { + factor = 2 + OR = { + has_trait = diligent + has_trait = ambitious + } + } + modifier = { + factor = 3 + has_trait = trusting + } + } + } + + option = { # You may keep your servant. Your loyalty is enough. + name = clan_event.2005.b + + # Instead of the courtier, you can choose to get a hook + if = { + limit = { + can_add_hook = { + type = loyalty_hook + target = scope:loyal_vassal + } + } + add_hook = { + type = loyalty_hook + target = scope:loyal_vassal + } + } + else = { # If we can't get a hook, get some prestige instead + add_prestige = medium_prestige_gain + } + + ai_chance = { + base = 20 + + modifier = { + factor = 3 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = gregarious + } + } + modifier = { + factor = 2 + OR = { + has_trait = paranoid + has_trait = cynical + } + } + } + } + + option = { # My tax collector will simply have to work harder... + name = clan_event.2005.c + + # You may also make your existing tax collector SLIGHTLY better + scope:bad_tax_collector = { + add_stewardship_skill = 1 + + stress_impact = { + base = massive_stress_impact_gain + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + has_trait = stubborn + } + } + } +} + + +################################ +# A Troublesome Ledger +# by Emil Tisander +################################ +#This is a clan specific Stewardship Lifestyle event, where your tax collector can help you. +clan_event.2007 = { + type = character_event + title = clan_event.2007.t + desc = clan_event.2007.desc + theme = stewardship + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + right_portrait = { + character = scope:helping_tax_collector + animation = thinking + } + + cooldown = { years = 10 } + + trigger = { + has_fp3_dlc_trigger = yes + is_available_adult = yes + government_has_flag = government_is_clan + + # We need to have a tax collector with decent to high aptitude + any_tax_collector = { + is_ai = yes + tax_collector_aptitude = { + target = clan_tax_slot + value >= 2 + } + } + } + + immediate = { + # We'll start by finding our tax collector + random_tax_collector = { + limit = { + is_ai = yes + tax_collector_aptitude = { + target = clan_tax_slot + value >= 2 + } + } + weight = { # Let's make a higher skilled tax collector more likely, but not guaranteed + base = 20 + modifier = { + add = 30 + tax_collector_aptitude = { + target = clan_tax_slot + value >= 3 + } + } + modifier = { + add = 50 + tax_collector_aptitude = { + target = clan_tax_slot + value >= 4 + } + } + } + save_scope_as = helping_tax_collector + } + } + + option = { # Maybe you could help me finish this? + name = clan_event.2007.a + + # Gain stewardship lifestyle XP scaled on the aptitude of the tax collector + if = { + limit = { + scope:helping_tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value >= 4 + } + } + } + add_stewardship_lifestyle_xp = massive_lifestyle_xp + } + else_if = { + limit = { + scope:helping_tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value >= 3 + } + } + } + add_stewardship_lifestyle_xp = major_lifestyle_xp + } + else = { + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + + stress_impact = { + stubborn = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + OR = { + has_trait = gregarious + has_trait = trusting + } + } + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = paranoid + } + } + } + } + + option = { # I can do this myself, thank you very much. + name = clan_event.2007.b + + # Let's do a skill duel here to see how likely you are to manage it yourself - If successful, get a perk point + duel = { + skill = stewardship + value = decent_skill_rating + 50 = { # Success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + min = -49 + } + desc = clan_event.2007.success_tt + send_interface_toast = { + title = clan_event.2007.success + left_icon = root + add_stewardship_lifestyle_perk_points = 1 + } + } + 50 = { # Failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -49 + } + desc = clan_event.2007.failure_tt + send_interface_toast = { + title = clan_event.2007.failure + left_icon = root + add_prestige = medium_prestige_loss + stress_impact = { base = major_stress_impact_gain } + } + } + } + + stress_impact = { + lazy = major_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + OR = { + has_trait = diligent + has_trait = ambitious + has_trait = patient + } + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = impatient + } + } + } + } + + option = { # Did you just volunteer to take care of it? Thank you! + name = clan_event.2007.c + + # Lose some opinion in exchange for a chance to get some extra gold + scope:helping_tax_collector = { + add_opinion = { + modifier = annoyed_opinion + opinion = -20 + target = root + } + } + random = { + chance = 25 + + custom_tooltip = clan_event.2007.tt + send_interface_toast = { + title = clan_event.2007.successful_tax_collector + left_icon = root + add_treasury_or_gold = medium_treasury_or_gold_value + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 4 + OR = { + has_trait = wrathful + has_trait = callous + has_trait = arbitrary + } + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_clan_events_hugo.txt b/N3OW/events/dlc/fp3/fp3_clan_events_hugo.txt new file mode 100644 index 00000000..1af1d426 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_clan_events_hugo.txt @@ -0,0 +1,196 @@ +namespace = fp3_clan + +### EVENT LIST #################################################################### +## 3000 - 3000 Ravaged Tulips by Hugo Cortell +################################################################################### + +################################### +# Ravaged Tulips +# By Hugo Cortell +################################### +scripted_trigger is_bad_tulip_stealing_child = { + age > 4 # Baby no steal flower + is_adult = no + is_available = yes + any_close_or_extended_family_member = { + is_available_ai_adult = yes + house = root.house + this != root + } +} + +fp3_clan.3000 = { + type = character_event + title = fp3_clan.3000.t + desc = fp3_clan.3000.desc + + theme = mental_break + override_background = { reference = garden } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:fp3_clan_3000_bad_child + animation = war_over_win + } + + cooldown = { years = 5 } + + weight_multiplier = { # Greatly lower chances if you have no garden + base = 0.4 + + modifier = { + add = 0.6 + capital_province = { has_building_or_higher = royal_garden_01 } + } + } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed_or_landless_administrative = yes + culture = { has_cultural_parameter = can_appoint_court_gardener } + house = { any_house_member = { is_bad_tulip_stealing_child = yes } } + } + + immediate = { + capital_province = { save_scope_as = fp3_clan_3000_loc_loc } # the loc-ation for loc-alization usage + house = { + random_house_member = { + limit = { is_bad_tulip_stealing_child = yes } + save_scope_as = fp3_clan_3000_bad_child + + random_close_or_extended_family_member = { + limit = { this != root } + save_scope_as = fp3_clan_3000_random_family_member + } + } + } + } + + option = { # You can keep them, and I'll pay to plant new ones + name = fp3_clan.3000.a + + stress_impact = { + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + scope:fp3_clan_3000_random_family_member = { + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 20 + } + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:fp3_clan_3000_random_family_member + VALUE = minor_unity_gain + DESC = clan_unity_generic_increased_fallback.desc + REVERSE_NON_HOUSE_TARGET = no + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + option = { # GIVE THEM BACK YOU BUGGER + name = fp3_clan.3000.b + + stress_impact = { + compassionate = minor_stress_impact_gain + patient = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + scope:fp3_clan_3000_random_family_member = { + add_opinion = { + target = root + modifier = scolded_my_child_opinion # Not exact, but close + } + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:fp3_clan_3000_random_family_member + VALUE = minor_unity_loss + DESC = clan_unity_generic_decreased_fallback.desc + REVERSE_NON_HOUSE_TARGET = no + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = 1 + } + } + } + + option = { # Alright, time to work the fields, kid + name = fp3_clan.3000.c + flavor = fp3_clan.3000.c.flavor + + trigger = { has_trait = lifestyle_gardener } + stress_impact = { lazy = minor_stress_impact_loss } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:fp3_clan_3000_random_family_member + VALUE = minor_unity_gain + DESC = clan_unity_generic_increased_fallback.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:fp3_clan_3000_random_family_member = { + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 10 + } + } + + if = { # In the very rare case that the child already knows about plants and stuff + limit = { scope:fp3_clan_3000_bad_child = { has_trait = lifestyle_gardener } } + add_opinion = { + target = root + modifier = fp3_taught_me_gardening_opinion + } + } + else = { + random = { + chance = { + value = 25 + add = { + value = learning + multiply = 2 + } + } + send_interface_toast = { + type = event_toast_effect_good + title = vassal.2001.t + left_icon = ROOT + right_icon = scope:fp3_clan_3000_bad_child + + scope:fp3_clan_3000_bad_child = { add_trait = lifestyle_gardener } + } + scope:fp3_clan_3000_bad_child = { + add_opinion = { + target = root + modifier = fp3_taught_me_gardening_opinion + } + } + } + } + + ai_chance = { base = 1000 } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_clan_events_ola.txt b/N3OW/events/dlc/fp3/fp3_clan_events_ola.txt new file mode 100644 index 00000000..2a664ec8 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_clan_events_ola.txt @@ -0,0 +1,2515 @@ +namespace = fp3_clan + +########EVENT INDEX############ +#fp3_clan.8000 - Usury against Unity, by Ola Jentzsch +#fp3_clan.8001 - Clan Quarrel, by Ola Jentzsch +#fp3_clan.8002 - Bonds of Faith, by Ola Jentzsch +#fp3_clan.8003 - The Power of a Name, by Ola Jentzsch +#fp3_clan.8004 - Bonds of Fear, by Ola Jentzsch +#fp3_clan.8005 - A Proper Position, by Ola Jentzsch +#fp3_clan.8006 - Small Spies, by Ola Jentzsch + +scripted_trigger fp3_usury_trigger = { + ai_compassion <= low_positive_ai_value + OR = { + has_trait = greedy + has_trait = deceitful + ai_greed > medium_positive_ai_value + } +} + +scripted_trigger concerned_character_trigger = { + fp3_usury_trigger = no + house != root.house + is_available_ai_adult = yes + OR = { + opinion = { + target = scope:usurer + value < 25 + } + AND = { + faith = { trait_is_sin = greedy } + ai_zeal >= medium_positive_ai_value + } + ai_greed < medium_positive_ai_value + } +} + +scripted_trigger usurer_character_trigger = { + is_available_ai_adult = yes + NOR = { + this = root + is_liege_or_above_of = root + } + fp3_usury_trigger = yes +} + +fp3_clan.8000 = { # Usury against Unity + type = character_event + title = fp3_clan.8000.t + desc = fp3_clan.8000.desc + theme = corruption + + left_portrait = { + character = root + animation = disbelief + triggered_animation = { + trigger = { + OR = { + has_trait = vengeful + has_trait = wrathful + AND = { + faith = { trait_is_sin = greedy } + has_trait = zealous + } + } + } + animation = anger + } + } + right_portrait = { + character = scope:usurer + animation = personality_greedy + triggered_animation = { + trigger = { + ai_boldness < low_positive_ai_value + } + animation = beg + } + } + lower_left_portrait = { + character = scope:concerned_one + } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed = yes + government_has_flag = government_is_clan + house ?= { + prev = house_head + house_unity_value >= critical_house_unity + + any_house_unity_member = { + usurer_character_trigger = yes + save_temporary_scope_as = usurer + } + } + + any_vassal_or_below = { + concerned_character_trigger = yes + } + + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + } + + cooldown = { + years = 25 + } + + immediate = { + house = { + random_house_unity_member = { + limit = { + usurer_character_trigger = yes + } + save_scope_as = usurer + } + } + + random_vassal_or_below = { + limit = { + concerned_character_trigger = yes + } + weight = { + base = 1 + modifier = { + factor = 10 + OR = { + has_relation_friend = root + is_powerful_vassal_of = root + is_child_of = root + has_council_position = councillor_spouse + AND = { + has_council_position = councillor_steward + employer = root + } + } + } + } + save_scope_as = concerned_one + } + + hidden_effect = { + scope:usurer = { + add_gold = major_gold_value + } + } + } + + option = { + name = fp3_clan.8000.a + + scope:usurer = { + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + + add_opinion = { + target = root + modifier = imprisoned_me + } + } + + custom_tooltip = fp3_relations_reaction_to_imprisonment.tt + hidden_effect = { + scope:usurer = { + every_close_family_member = { + limit = { + this != root + } + if = { + limit = { + this != root + opinion = { + target = scope:usurer + value > 25 + } + } + add_opinion = { + target = root + modifier = imprisoned_family_member + } + } + } + } + every_vassal = { + if = { + limit = { + opinion = { + target = scope:usurer + value > 25 + } + } + add_opinion = { + target = root + modifier = fp3_wrongful_imprisonment_opinion + } + } + } + } + + scope:concerned_one = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + + hidden_effect = { #his ill-gotten gains seep back to his debtors, so the player can't cheese it and steal them by banishing him + scope:usurer = { + remove_short_term_gold = major_gold_value + } + } + + if = { + limit = { + faith = { + OR = { + trait_is_sin = greedy + trait_is_virtue = generous + } + } + } + add_piety = medium_piety_gain + } + else = { + add_dread = minor_dread_gain + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:usurer + VALUE = medium_unity_loss + DESC = clan_unity_imprisoned_usurer.desc + REVERSE_NON_HOUSE_TARGET = no + } + + stress_impact = { + arbitrary = medium_stress_impact_loss + just = minor_stress_impact_gain + trusting = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_vengefulness = 1 + ai_zeal = 1 + ai_compassion = -1 + } + } + } + + option = { + name = fp3_clan.8000.b + + scope:usurer = { + pay_short_term_gold = { + gold = medium_gold_value + target = root + } + } + + scope:usurer = { + add_opinion = { + target = root + modifier = extorted_me_opinion + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + honest = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -0.5 + } + } + } + + option = { + name = fp3_clan.8000.c + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:usurer + VALUE = minor_unity_gain + DESC = clan_unity_defended_usurer.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:concerned_one = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + forgiving = minor_stress_impact_loss + trusting = medium_stress_impact_loss + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.5 + ai_vengefulness = 0.5 + ai_honor = -1 + } + } + } +} + +scripted_trigger bickerer_2_character_trigger = { + is_available_ai_adult = yes + NOT = { this ?= scope:$SCOPE$ } + opinion = { + target ?= scope:$SCOPE$ + value < $VALUE$ + } +} + +fp3_clan.8001 = { #Clan Quarrel + type = character_event + title = fp3_clan.8001.t + desc = { + desc = fp3_clan.8001_beginning + first_valid = { + triggered_desc = { + trigger = { + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + OR = { + scope:bickerer_1 = { + ai_zeal >= high_positive_ai_value + NOT = { has_trait = cynical } + } + scope:bickerer_2 = { + ai_zeal >= medium_positive_ai_value + NOT = { has_trait = cynical } + } + } + } + desc = fp3_clan.8001_faith_schism + } + desc = fp3_clan.8001_generic_fallback + } + } + theme = diplomacy_family_focus + + left_portrait = { + character = scope:bickerer_1 + animation = disgust + triggered_animation = { + trigger = { + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = zealous + ai_vengefulness >= high_positive_ai_value + } + } + animation = war_over_win + } + } + right_portrait = { + character = scope:bickerer_2 + animation = disapproval + triggered_animation = { + trigger = { + OR = { + has_trait = vengeful + has_trait = wrathful + has_trait = zealous + ai_vengefulness >= high_positive_ai_value + } + } + animation = anger + } + } + lower_left_portrait = { + character = root + } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed = yes + government_has_flag = government_is_clan + is_house_head = yes + + house = { + house_unity_value > critical_house_unity + + any_house_unity_member = { + is_available_ai_adult = yes + NOT = { ai_vengefulness < low_positive_ai_value } + save_temporary_scope_as = bickerer_1_temp + house = { + any_house_unity_member = { + this != scope:bickerer_1_temp + is_available_adult = yes + opinion = { + target = scope:bickerer_1_temp + value < 20 + } + } + } + } + + any_house_unity_member = { + bickerer_2_character_trigger = { + VALUE = 20 + SCOPE = bickerer_1_temp + } + } + } + } + + cooldown = { years = 10 } + + immediate = { + house = { + random_house_unity_member = { + limit = { + is_available_ai_adult = yes + NOT = { ai_vengefulness < low_positive_ai_value } + save_temporary_scope_as = bickerer_1_temp + house = { + any_house_unity_member = { + this != scope:bickerer_1_temp + is_available_adult = yes + opinion = { + target = scope:bickerer_1_temp + value < 20 + } + } + } + } + save_scope_as = bickerer_1 + } + + random_house_unity_member = { + limit = { + is_available_ai_adult = yes + this != scope:bickerer_1 + } + weight = { + base = 1 + modifier = { + factor = 10 + OR = { + has_relation_rival = scope:bickerer_1 + bickerer_2_character_trigger = { + VALUE = 0 + SCOPE = bickerer_1 + } + } + } + } + save_scope_as = bickerer_2 + } + } + + if = { + limit = { + scope:bickerer_1 = { + NOT = { has_relation_rival = scope:bickerer_2 } + } + } + scope:bickerer_1 = { + progress_towards_rival_effect = { + CHARACTER = scope:bickerer_2 + REASON = rival_generic_history + OPINION = -25 + } + } + } + } + + option = { + name = fp3_clan.8001.a + + duel = { + skill = diplomacy + target = scope:bickerer_1 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8001.a.success + send_interface_toast = { + title = fp3_clan.8001.a.success.tt + left_icon = root + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:bickerer_1 + VALUE = medium_unity_gain + DESC = clan_unity_mediated_btw_clan_members.desc + REVERSE_NON_HOUSE_TARGET = no + } + + add_prestige = minor_prestige_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8001.a.failure + send_interface_toast = { + title = fp3_clan.8001.a.failure.tt + left_icon = root + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:bickerer_1 + VALUE = minor_unity_loss + DESC = clan_unity_caused_rift.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + } + } + + stress_impact = { + forgiving = medium_stress_impact_loss + callous = medium_stress_impact_gain + shy = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_honor = 0.5 + ai_rationality = 0.5 + ai_energy = 0.5 + } + } + } + + option = { + name = fp3_clan.8001.b + flavor = fp3_clan_making_conflict_worse_flavor + + duel = { + skill = intrigue + target = scope:bickerer_1 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8001.b.success + send_interface_toast = { + title = fp3_clan.8001.b.success.tt + left_icon = root + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:bickerer_1 + VALUE = medium_unity_loss + DESC = clan_unity_caused_rift.desc + REVERSE_NON_HOUSE_TARGET = no + } + + add_prestige = minor_prestige_gain + + if = { + limit = { + scope:bickerer_1 = { + NOT = { has_relation_rival = scope:bickerer_2 } + } + } + scope:bickerer_1 = { + progress_towards_rival_effect = { + CHARACTER = scope:bickerer_2 + REASON = rival_generic_history + OPINION = -25 + } + } + } + + if = { + limit = { has_lifestyle = intrigue_lifestyle } + add_intrigue_lifestyle_xp = minor_lifestyle_experience + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8001.b.failure + send_interface_toast = { + title = fp3_clan.8001.b.failure.tt + left_icon = root + + add_prestige = minor_prestige_loss + } + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + honest = major_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -1 + ai_vengefulness = 0.5 + } + } + } + + option = { + name = fp3_clan.8001.c + + trigger = { + OR = { + has_trait = diligent + has_trait = paranoid + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = -0.7 + ai_rationality = 0.5 + } + } + } + + option = { + name = fp3_clan.8001.d + + trigger = { + NOR = { + has_trait = diligent + has_trait = paranoid + } + } + + stress_impact = { + base = minor_stress_impact_loss + lazy = minor_stress_impact_loss + content = minor_stress_impact_loss + ambitious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_sociability = -0.5 + ai_rationality = 0.5 + } + } + } +} + +scripted_trigger fp3_vassal_8002_trigger = { + is_available_ai_adult = yes + is_powerful_vassal_of = root + faith = root.faith + opinion = { + target = root + value < 50 + } +} + +fp3_clan.8002 = { #Bonds of Faith + type = character_event + title = fp3_clan.8002.t + desc = fp3_clan.8002.desc + theme = faith + left_portrait = { + character = root + animation = stress + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = stubborn + has_trait = wrathful + has_trait = vengeful + has_trait = arrogant + } + } + animation = personality_cynical + } + } + right_portrait = { + character = scope:chaplain + animation = personality_rational + triggered_animation = { + trigger = { + OR = { + scope:chaplain = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + ai_boldness <= low_negative_ai_value + } + } + animation = personality_coward + } + } + + lower_left_portrait = { + character = scope:clan_member + } + + trigger = { + has_fp3_dlc_trigger = yes + government_has_flag = government_is_clan + + OR = { + num_sinful_traits >= 1 + piety_level < 3 + } + + scriptedtests_piety_income <= 2 + + house = { + house_unity_value < very_high_house_unity + any_house_unity_member = { + fp3_vassal_8002_trigger = yes + } + } + + exists = cp:councillor_court_chaplain + + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + NOR = { + has_trait = arrogant + opinion = { + target = root + value < -30 + } + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + house = { + random_house_unity_member = { + limit = { + fp3_vassal_8002_trigger = yes + } + weight = { + base = 1 + modifier = { + factor = 10 + ai_zeal >= high_positive_ai_value + } + modifier = { + factor = 10 + opinion = { + target = root + value < 0 + } + } + } + save_scope_as = clan_member + } + } + + cp:councillor_court_chaplain = { save_scope_as = chaplain } + } + + option = { + name = fp3_clan.8002.a + + add_character_modifier = { + modifier = fp3_praying_too_much_modifier + years = 10 + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:clan_member + VALUE = minor_unity_gain + DESC = clan_unity_proved_pious.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:chaplain = { + add_opinion = { + target = root + modifier = took_my_advice_opinion + opinion = 20 + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + humble = medium_stress_impact_loss + diligent = minor_stress_impact_gain + arrogant = massive_stress_impact_gain + cynical = major_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.3 + ai_rationality = 0.5 + ai_zeal = 0.7 + } + } + } + + option = { + name = fp3_clan.8002.b + + trigger = { #this is a bit of an arbitrary exclusion; just to make sure that noone gets more than four options + NOR = { + intrigue >= high_skill_rating + has_trait = deceitful + has_trait = cynical + } + } + + add_piety = medium_piety_gain + remove_short_term_gold = medium_gold_value + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:clan_member + VALUE = minor_unity_gain + DESC = clan_unity_founded_worshipful_house.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:chaplain = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + content = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = 0.5 + ai_zeal = 0.2 + } + } + } + + option = { + name = fp3_clan.8002.c + flavor = fp3_pretending_to_be_pious_flavor + + trigger = { + OR = { + intrigue >= high_skill_rating + has_trait = deceitful + has_trait = cynical + } + } + + duel = { + skill = intrigue + value = average_skill_rating + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8002.b.success + send_interface_toast = { + title = fp3_clan.8002.b.success.tt + left_icon = root + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:clan_member + VALUE = minor_unity_gain + DESC = clan_unity_proved_pious.desc + REVERSE_NON_HOUSE_TARGET = no + } + + add_piety = minor_piety_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8002.b.failure + send_interface_toast = { + title = fp3_clan.8002.b.failure.tt + left_icon = root + + add_piety = medium_piety_loss + } + } + } + + scope:chaplain = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + deceitful = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + zealous = major_stress_impact_gain + honest = massive_stress_impact_gain + humble = medium_stress_impact_gain + just = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_sociability = 0.7 + ai_rationality = 0.9 + ai_vengefulness = 0.7 + ai_zeal = -1 + } + } + } + + option = { + name = fp3_clan.8002.d + + trigger = { + scope:clan_member = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:clan_member + VALUE = minor_unity_loss + DESC = clan_unity_threatened_clan_member.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:chaplain = { + add_opinion = { + target = root + modifier = fp3_went_too_far_opinion + } + } + + scope:clan_member = { + add_opinion = { + target = root + modifier = fp3_fearing_retribution_opinion + opinion = -30 + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + forgiving = major_stress_impact_gain + craven = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.7 + ai_vengefulness = 1 + ai_compassion = -1 + ai_honor = -0.5 + } + } + } + + option = { + name = fp3_clan.8002.e + + stress_impact = { + honest = medium_stress_impact_loss + deceitful = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_honor = 0.5 + ai_rationality = 0.5 + } + } + } +} + +fp3_clan.8003 = { #The Power of a Name + type = character_event + title = fp3_clan.8003.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + dread >= 50 + } + desc = fp3_clan.8003_fear_opening + } + triggered_desc = { + trigger = { + faith.religious_head = { + opinion = { + target = root + value >= 50 + } + } + } + desc = fp3_clan.8003_respect_opening + } + } + desc = fp3_clan.8003_ending + } + theme = faith + + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = personality_honorable + triggered_animation = { + trigger = { + OR = { + has_trait = loyal + has_trait = greedy + has_trait = arrogant + has_trait = zealous + has_trait = trusting + } + } + animation = happiness + } + + } + right_portrait = { + character = scope:hof_emissary + animation = chancellor + } + + lower_left_portrait = { character = scope:righteous_caliph } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed = yes + has_religion = religion:islam_religion + + trigger_if = { + limit = { + government_has_flag = government_is_clan + } + house = { house_unity_value > decent_house_unity } + } + + exists = faith.religious_head + exists = faith.religious_head.location + + prestige_level >= 3 + + OR = { + faith.religious_head = { + opinion = { + target = root + value >= 50 + } + } + dread >= 50 + } + + faith.religious_head = { #If he already has a hook on you, there's no need for him to bestow upon you this honor + NOR = { + this = root + has_hook = root + } + } + + OR = { #You must either be independent, or a vassal of the HoF, or have him as your direct vassal + top_liege = this + faith.religious_head = { is_liege_or_above_of = root } + any_vassal = { this = root.faith.religious_head } + } + } + + cooldown = { + years = 25 + } + + immediate = { + faith.religious_head = { + location = { + save_scope_as = caliphal_location + } + save_scope_as = righteous_caliph + } + + create_character = { #this is the head of faith's emissary + age = { 25 75 } + location = root.capital_province + faith = root.faith.religious_head.faith + gender_female_chance = root_faith_dominant_gender_female_chance #could be female, if given the right context. + trait = diplomat + template = priest_character_template + save_scope_as = hof_emissary #this saves him as a scope so we can get nice effects to bounce off him! + } + } + + option = { + name = fp3_clan.8003.a + + trigger = { + NOR = { + has_trait = shy + has_trait = humble + + } + } + + add_character_modifier = { + modifier = fp3_honored_by_the_faithful_modifier + years = 10 + } + + if = { + limit = { + OR = { + faith.religious_head = { is_liege_or_above_of = root } + any_vassal = { this = root.faith.religious_head } + } + } + add_piety = major_piety_gain + } + else = { add_piety = minor_piety_gain } + + scope:righteous_caliph = { + add_hook = { + type = favor_hook + target = root + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + zealous = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 1 + ai_rationality = -0.4 + } + } + } + + option = { + name = fp3_clan.8003.b + + trigger = { + OR = { + has_trait = shy + has_trait = humble + } + } + + add_piety = medium_piety_gain + + stress_impact = { + zealous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.7 + ai_rationality = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { + name = fp3_clan.8003.c + + stress_impact = { + humble = major_stress_impact_loss + content = medium_stress_impact_loss + ambitious = major_stress_impact_gain + arrogant = medium_stress_impact_gain + greedy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_boldness = 0.5 + ai_honor = 1 + } + } + } +} + +scripted_trigger clan_member_paranoia_trigger = { + is_available_healthy_ai_adult = yes + NOR = { + has_council_position = councillor_spymaster + has_court_position = master_assassin_court_position + } + OR = { + AND = { + OR = { #we're looking for someone with ambition + has_trait = ambitious + has_trait = deceitful + has_trait = greedy + } + NOT = { + opinion = { + target = root + value >= 25 + } + } + } + opinion = { #or just someone who dislikes root + target = root + value < 0 + } + } +} + +fp3_clan.8004 = { #Bonds of Fear + type = character_event + title = fp3_clan.8004.t + desc = fp3_clan.8004.desc + theme = dread + left_portrait = { + character = root + animation = personality_cynical + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = vengeful + has_trait = arbitrary + has_trait = sadistic + has_trait = deceitful + } + } + animation = personality_dishonorable + } + } + right_portrait = { + character = scope:murder_enthusiast + animation = spymaster + } + + lower_left_portrait = { + character = scope:clan_member + } + + trigger = { + has_fp3_dlc_trigger = yes + government_has_flag = government_is_clan + + house = { + NOR = { + house_unity_value > very_high_house_unity + house_unity_value < critical_house_unity + } + house_head = root + + any_house_unity_member = { + clan_member_paranoia_trigger = yes + } + } + + OR = { + AND = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + is_available_healthy_ai_adult = yes + NOT = { ai_compassion >= low_positive_ai_value } + } + } + AND = { + employs_court_position = master_assassin_court_position + any_court_position_holder = { + type = master_assassin_court_position + is_available_healthy_ai_adult = yes + NOT = { ai_compassion >= low_positive_ai_value } + } + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + if = { + limit = { + employs_court_position = master_assassin_court_position + any_court_position_holder = { + has_court_position = master_assassin_court_position + is_available_healthy_ai_adult = yes + NOT = { ai_compassion >= low_positive_ai_value } + } + } + random_court_position_holder = { + limit = { + has_court_position = master_assassin_court_position + is_available_healthy_ai_adult = yes + NOT = { ai_compassion >= low_positive_ai_value } + } + save_scope_as = murder_enthusiast + } + } + else_if = { + limit = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + is_available_healthy_ai_adult = yes + NOT = { ai_compassion >= low_positive_ai_value } + } + } + cp:councillor_spymaster = { save_scope_as = murder_enthusiast } + } + + house = { + random_house_unity_member = { + limit = { + clan_member_paranoia_trigger = yes + has_relation_rival = scope:murder_enthusiast + } + alternative_limit = { + clan_member_paranoia_trigger = yes + is_powerful_vassal_of = root + } + alternative_limit = { + clan_member_paranoia_trigger = yes + is_close_family_of = root + } + alternative_limit = { + clan_member_paranoia_trigger = yes + is_claimant = yes + } + alternative_limit = { + clan_member_paranoia_trigger = yes + can_be_knight_trigger = { + ARMY_OWNER = root + } + } + alternative_limit = { + clan_member_paranoia_trigger = yes + } + save_scope_as = clan_member + } + } + } + + option = { + name = fp3_clan.8004.a #murder some peepl + + scope:murder_enthusiast = { + duel = { + skill = intrigue + value = scope:clan_member.intrigue + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8004.a.success + root = { + send_interface_toast = { + title = fp3_clan.8004.a.success.tt + left_icon = root + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:clan_member + VALUE = medium_unity_gain + DESC = clan_unity_scared_into_sub.desc + REVERSE_NON_HOUSE_TARGET = no + } + + add_dread = medium_dread_gain + + add_character_modifier = { + modifier = fp3_rule_by_fear_modifier + years = 20 + } + + scope:clan_member = { + if = { + limit = { + ai_boldness < high_positive_ai_value + } + add_opinion = { + target = root + modifier = scared_opinion + opinion = -10 + } + } + else = { + add_opinion = { + target = root + modifier = fp3_murdered_my_servants_opinion + opinion = -30 + } + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8004.a.failure + root = { + send_interface_toast = { + title = fp3_clan.8004.a.failure.tt + left_icon = root + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:clan_member + VALUE = minor_unity_loss + DESC = clan_unity_failed_scary.desc + REVERSE_NON_HOUSE_TARGET = no + } + + add_dread = minor_dread_gain + + if = { + limit = { + root.faith = { + NOR = { + has_doctrine_parameter = adherents_more_likely_to_join_schemes + has_doctrine = doctrine_kinslaying_accepted + } + } + } + add_piety_level = -1 + } + + scope:clan_member = { + if = { + limit = { + ai_boldness < high_positive_ai_value + NOT = { has_relation_rival = root } + } + add_opinion = { + target = root + modifier = scared_opinion + opinion = -10 + } + } + else_if = { + limit = { + NOT = { + has_relation_rival = root + } + } + root = { + progress_towards_rival_effect = { + CHARACTER = scope:clan_member + REASON = rival_murdered_servants + OPINION = -25 + } + } + } + else = { + add_opinion = { + target = root + modifier = fp3_murdered_my_servants_opinion + opinion = -30 + } + } + } + } + } + } + } + } + + scope:murder_enthusiast = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = massive_stress_impact_gain + just = major_stress_impact_gain + forgiving = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 0.5 + ai_greed = 0.5 + ai_honor = -1 + ai_compassion = -1 + } + } + } + + option = { #you know what...there's no need to be discreet. + name = fp3_clan.8004.b + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:clan_member + VALUE = minor_unity_loss + DESC = clan_unity_murdered_servants.desc + REVERSE_NON_HOUSE_TARGET = no + } + + add_dread = major_dread_gain + + if = { + limit = { + root.faith = { + NOR = { + has_doctrine_parameter = adherents_more_likely_to_join_schemes + has_doctrine = doctrine_kinslaying_accepted + } + } + } + root = { add_piety_level = -1 } + } + + scope:clan_member = { + if = { + limit = { + ai_boldness < high_positive_ai_value + NOT = { has_relation_rival = root } + } + add_opinion = { + target = root + modifier = scared_opinion + opinion = -10 + } + } + else_if = { + limit = { + NOT = { + has_relation_rival = root + } + } + root = { + progress_towards_rival_effect = { + CHARACTER = scope:clan_member + REASON = rival_murdered_servants + OPINION = -25 + } + } + } + else = { + add_opinion = { + target = root + modifier = fp3_murdered_my_servants_opinion + opinion = -30 + } + } + } + + + stress_impact = { + compassionate = massive_stress_impact_gain + just = major_stress_impact_gain + forgiving = medium_stress_impact_gain + honest = medium_stress_impact_gain + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 1 + ai_rationality = -0.8 + ai_compassion = -1 + } + } + } + + option = { + name = fp3_clan.8004.c #be horrified + + scope:murder_enthusiast = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + sadistic = major_stress_impact_gain + callous = major_stress_impact_gain + paranoid = medium_stress_impact_gain + forgiving = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_rationality = 0.3 + ai_vengefulness = -1 + ai_boldness = -0.3 + } + } + } +} + +################################### +# A Proper Position, by Ola Jentzsch +################################### + +scripted_trigger clan_harem_intrigue_parent_trigger = { + is_available_adult = yes + is_courtier = yes + NOT = { + has_trait = content + has_trait = craven + } + any_child = { + count > 0 + clan_harem_intrigue_child_trigger = yes + } +} + +scripted_trigger clan_harem_intrigue_child_trigger = { + is_available_child = yes + age > 5 + NOT = { is_primary_heir_of = root } + fp3_proper_gender_for_dynastic_ambition_trigger = yes + any_heir_title = { + count < 1 + tier >= tier_county + } +} + +fp3_clan.8005 = { #A Proper Position + type = character_event + title = fp3_clan.8005.t + desc = fp3_clan.8005.desc + theme = crown + + left_portrait = { + character = scope:ambitious_consort + animation = disapproval + triggered_animation = { + trigger = { + ai_vengefulness >= medium_positive_ai_value + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + ai_boldness < low_positive_ai_value + } + animation = beg + } + } + + right_portrait = { + character = root + animation = personality_cynical + } + lower_left_portrait = { character = scope:empowered_child } + + lower_center_portrait = { character = scope:heir_parent } + + lower_right_portrait = { character = scope:heir_child } + + trigger = { + has_fp3_dlc_trigger = yes + government_has_flag = government_is_clan + + NOT = { + house = { + house_unity_value > very_high_house_unity + } + } + + any_held_title = { + title_tier = county + is_landless_type_title = no + this != root.capital_county + } + + domain_size > 4 + + any_consort = { + clan_harem_intrigue_parent_trigger = yes + save_temporary_scope_as = consort_1 + any_child = { + clan_harem_intrigue_child_trigger = yes + } + NOT = { + any_child = { is_primary_heir_of = root } + } + } + + any_consort = { + this != scope:consort_1 + is_available_adult = yes + is_courtier = yes + any_child = { + is_child_of = root + is_primary_heir_of = root + } + } + } + + cooldown = { years = 10 } + + immediate = { + save_scope_as = special_root_scope #this is used to trigger a player-facing toast in the hidden follow-up event + + random_consort = { + limit = { + clan_harem_intrigue_parent_trigger = yes + any_child = { clan_harem_intrigue_child_trigger = yes } + NOT = { + any_child = { is_primary_heir_of = root } + } + } + random_child = { + limit = { + clan_harem_intrigue_child_trigger = yes + } + save_scope_as = empowered_child + } + save_scope_as = ambitious_consort + } + + random_consort = { + limit = { + this != scope:ambitious_consort + is_available_adult = yes + is_courtier = yes + any_child = { + is_child_of = root + is_primary_heir_of = root + } + } + random_child = { + limit = { + this != scope:empowered_child + is_child_of = root + is_primary_heir_of = root + } + save_scope_as = heir_child + } + save_scope_as = heir_parent + } + + random_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + this != root.capital_county + } + save_scope_as = title_to_grant + } + + scope:ambitious_consort = { + progress_towards_rival_effect = { + CHARACTER = scope:heir_parent + REASON = rival_harem_intrigue + OPINION = -25 + } + } + } + + option = { + name = fp3_clan.8005.a + + trigger = { #if you're a certain personality, you can scare them into submission + OR = { + dread >= high_dread + has_trait = vengeful + has_trait = wrathful + has_trait = arbitrary + } + } + + add_dread = minor_dread_gain + + scope:ambitious_consort = { + if = { + limit = { + OR = { + ai_vengefulness >= medium_positive_ai_value + ai_boldness >= medium_positive_ai_value + } + } + add_opinion = { + target = root + opinion = -40 + modifier = angry_opinion + } + scope:ambitious_consort = { + progress_towards_rival_effect = { + CHARACTER = scope:heir_parent + REASON = rival_harem_intrigue + OPINION = -25 + } + } + } + else = { + add_opinion = { + target = root + opinion = -25 + modifier = scared_opinion + } + } + } + + stress_impact = { + wrathful = minor_stress_impact_loss + calm = major_stress_impact_gain + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + ai_greed = 0.4 + } + } + } + + option = { #Give the child the title + name = fp3_clan.8005.b + flavor = original_heir_upset_flavor + + scope:title_to_grant.current_heir = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + scope:title_to_grant = { + change_title_holder = { + holder = scope:empowered_child + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + + scope:empowered_child = { + hidden_effect = { + trigger_event = { + id = fp3_clan.8007 + years = { 2 4 } + } + } + custom_tooltip = fp3_empowered_child.tt + } + + scope:ambitious_consort = { + add_opinion = { + target = root + opinion = 30 + modifier = happy_opinion + } + } + + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.6 + ai_compassion = 0.4 + ai_honor = 0.4 + } + } + } + + option = { #A bit young for a court position, don't you think? + name = fp3_clan.8005.d + + trigger = { + scope:empowered_child = { age <= 10 } + } + + scope:ambitious_consort = { + progress_towards_rival_effect = { + CHARACTER = scope:heir_parent + REASON = rival_harem_intrigue + OPINION = -25 + } + + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + stress_impact = { + generous = minor_stress_impact_gain + craven = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.8 + ai_compassion = -0.2 + } + } + } + + option = { #Reassure her + name = fp3_clan.8005.e + + duel = { + skill = diplomacy + value = scope:ambitious_consort.diplomacy + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 40 + min = -40 + } + + modifier = { + add = 100 + scope:ambitious_consort = { + opinion = { + target = root + value > 50 + } + } + } + + modifier = { + add = 50 + scope:ambitious_consort = { has_trait = trusting } + } + + desc = fp3_clan.8005.e.success + send_interface_toast = { + title = fp3_clan.8005.e.success.tt + left_icon = root + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:ambitious_consort + VALUE = minor_unity_gain + DESC = clan_unity_promise_inheritance.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:ambitious_consort = { + add_opinion = { + target = root + opinion = 20 + modifier = trust_opinion + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8005.e.failure + send_interface_toast = { + title = fp3_clan.8005.e.failure.tt + left_icon = root + + scope:ambitious_consort = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + scope:ambitious_consort = { + progress_towards_rival_effect = { + CHARACTER = scope:heir_parent + REASON = rival_harem_intrigue + OPINION = -25 + } + } + } + } + } + + stress_impact = { + wrathful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.7 + ai_honor = 0.4 + ai_sociability = 1 + ai_vengefulness = -1 + } + } + } +} + + +################################### +# Smaller Spies, by Ola Jentzsch +################################### + +scripted_trigger suitable_spy_child_trigger = { + is_child_of = root + is_available_child = yes + is_courtier_of = root + age >= 7 + age <= 14 + OR = { + has_trait = curious + has_trait = rowdy + has_trait = charming + has_trait = deceitful + has_trait = paranoid + has_trait = callous + } + NOT = { is_primary_heir_of = root } +} + +scripted_trigger assassin_spymaster_trigger = { + is_available_healthy_ai_adult = yes + ai_compassion <= low_positive_ai_value +} + +fp3_clan.8006 = { + type = character_event + title = fp3_clan.8006.t + desc = fp3_clan.8006.desc + theme = intrigue_skulduggery_focus + + left_portrait = { + character = scope:sneaky_child + animation = disapproval + triggered_animation = { + trigger = { + AND = { + ai_compassion < low_positive_ai_value + ai_vengefulness >= low_positive_ai_value + } + } + animation = personality_callous + } + triggered_animation = { + trigger = { + ai_compassion >= low_positive_ai_value + } + animation = paranoia + } + } + + right_portrait = { + character = scope:paranoia_enthusiast + animation = scheme + triggered_animation = { + trigger = { + ai_vengefulness >= medium_positive_ai_value + } + animation = schadenfreude + } + } + + lower_left_portrait = { character = root } + + cooldown = { years = 10 } + + trigger = { + has_fp3_dlc_trigger = yes + government_has_flag = government_is_clan + + house = { + house_unity_value <= mediocre_house_unity + any_house_unity_member = { #checking that a decent amount of other adult clan members exists, this event wouldn't make sense otherwise + is_adult = yes + count >= 4 + } + } + + any_child = { + is_available_ai = yes + suitable_spy_child_trigger = yes + } + + OR = { + AND = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + assassin_spymaster_trigger = yes + } + } + AND = { + employs_court_position = master_assassin_court_position + any_court_position_holder = { + type = master_assassin_court_position + assassin_spymaster_trigger = yes + } + } + } + } + + immediate = { + random_child = { + limit = { + is_available_ai = yes + suitable_spy_child_trigger = yes + } + save_scope_as = sneaky_child + } + + if = { + limit = { + employs_court_position = master_assassin_court_position + any_court_position_holder = { + has_court_position = master_assassin_court_position + assassin_spymaster_trigger = yes + } + } + random_court_position_holder = { + limit = { + has_court_position = master_assassin_court_position + assassin_spymaster_trigger = yes + } + save_scope_as = paranoia_enthusiast + } + } + else_if = { + limit = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + assassin_spymaster_trigger = yes + } + } + cp:councillor_spymaster = { save_scope_as = paranoia_enthusiast } + } + + scope:sneaky_child = { + if = { + limit = { + any_relation = { + type = guardian + } + } + random_relation = { + type = guardian + save_scope_as = little_sneakys_guardian + } + } + } + } + + option = { + name = fp3_clan.8006.a + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:sneaky_child + VALUE = minor_unity_gain + DESC = clan_unity_asserted_child_status.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:paranoia_enthusiast = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + scope:sneaky_child = { + add_opinion = { + target = root + opinion = -30 + modifier = fp3_denied_me_an_opportunity_opinion + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_sociability = 1 + ai_vengefulness = -1 + ai_boldness = 0.5 + } + } + } + + option = { + name = fp3_clan.8006.b + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:sneaky_child + VALUE = minor_unity_loss + DESC = clan_unity_let_child_become_spy.desc + REVERSE_NON_HOUSE_TARGET = no + } + + add_character_modifier = { + modifier = fp3_minor_child_spy_network_modifier + years = 15 + } + + if = { + limit = { + exists = scope:little_sneakys_guardian + scope:little_sneakys_guardian = { + OR = { + is_ai = yes + this = root + } + this != scope:paranoia_enthusiast + } + } + scope:sneaky_child = { + remove_relation_guardian = scope:little_sneakys_guardian + } + } + + scope:sneaky_child = { + if = { + limit = { + OR = { + num_of_relation_guardian < 1 + any_relation = { + type = guardian + OR = { + is_ai = yes + this = root + } + this != scope:paranoia_enthusiast + } + } + } + set_relation_guardian = scope:paranoia_enthusiast + add_intrigue_skill = 1 + } + else = { + add_intrigue_skill = 1 + } + } + + scope:sneaky_child = { + add_opinion = { + target = root + opinion = 20 + modifier = happy_opinion + } + } + + scope:paranoia_enthusiast = { + add_opinion = { + target = root + opinion = 15 + modifier = took_my_advice_opinion + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.3 + ai_sociability = 0.3 + ai_vengefulness = 1 + ai_honor = -0.5 + ai_compassion = -0.8 + } + } + } + + option = { + name = fp3_clan.8006.c + + pay_short_term_gold = { + target = scope:paranoia_enthusiast + gold = minor_gold_value + } + + add_character_modifier = { + modifier = fp3_minor_child_spy_network_modifier + years = 15 + } + + scope:sneaky_child = { + add_opinion = { + target = root + opinion = -30 + modifier = fp3_denied_me_an_opportunity_opinion + } + } + + stress_impact = { + deceitful = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_rationality = 0.5 + ai_vengefulness = -1 + ai_boldness = -0.5 + } + } + } +} + +scripted_effect random_skill_chance_effect = { + send_interface_toast = { + title = fp3_8007_studies_pay_off_toast + left_icon = scope:empowered_child + scope:empowered_child = { + add_stewardship_skill = 1 + add_$SKILL_2$_skill = 1 + } + } +} + +fp3_clan.8007 = { #Hidden event to set up child's traits + hidden = yes + + trigger = { + has_fp3_dlc_trigger = yes + exists = scope:empowered_child + any_held_title = { + this = scope:title_to_grant + } + } + + immediate = { + random_list = { + 25 = { + random_skill_chance_effect = { SKILL_2 = martial } + } + 25 = { + random_skill_chance_effect = { SKILL_2 = diplomacy } + } + 25 = { + random_skill_chance_effect = { SKILL_2 = learning } + } + 25 = { + random_skill_chance_effect = { SKILL_2 = intrigue } + } + } + } +} + + + + + diff --git a/N3OW/events/dlc/fp3/fp3_clan_events_persia_specific_ola.txt b/N3OW/events/dlc/fp3/fp3_clan_events_persia_specific_ola.txt new file mode 100644 index 00000000..761d43a7 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_clan_events_persia_specific_ola.txt @@ -0,0 +1,727 @@ +namespace = fp3_clan + +########EVENT INDEX############ +#fp3_clan.8015 - Scandalous Scion +#fp3_clan.8016 - Hammam Havoc +#fp3_clan_8017 - A Questionable Position +#################### + +################################### +# Scandalous Scion +# By Ola Jentzsch +################################### +scripted_trigger fp3_scandalous_scion_trigger = { + NOT = { liege ?= root } + is_available_ai_adult = yes + is_landed = no + age < 45 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + ai_sociability > low_negative_ai_value + ai_compassion < low_positive_ai_value + NOR = { + is_child_of = root + this = root + } + any_parent = { + is_available_ai_adult = yes + NOT = { is_close_family_of = root } + } +} + +fp3_clan.8015 = { + type = character_event + title = fp3_clan.8015.t + desc = fp3_clan.8015.desc + + theme = martial + + left_portrait = { + character = scope:scandalous_scion + animation = dismissal + triggered_animation = { + trigger = { + OR = { + has_trait = craven + has_trait = shy + ai_boldness <= low_positive_ai_value + } + } + animation = shame + } + outfit_tags = { + military_outfit + } + } + right_portrait = { + character = scope:concerned_parent + animation = stress + } + lower_left_portrait = root + + override_background = { reference = throne_room } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed = yes + government_has_flag = government_is_clan + is_available_adult = yes + is_house_head = yes + + #culture = { has_cultural_tradition = tradition_futuwaa } + + house = { + any_house_member = { + fp3_scandalous_scion_trigger = yes + } + } + } + + cooldown = { years = 10 } + + immediate = { + house = { + random_house_member = { + limit = { + fp3_scandalous_scion_trigger = yes + } + save_scope_as = scandalous_scion + random_parent = { + limit = { + is_available_ai_adult = yes + NOT = { is_close_family_of = root } + } + save_scope_as = concerned_parent + } + } + } + } + + option = { + name = fp3_clan.8015.a + + add_courtier = scope:scandalous_scion + + scope:scandalous_scion = { + add_character_modifier = { + modifier = fp3_better_company_modifier + years = 10 + } + } + + scope:concerned_parent = { + add_opinion = { + target = root + opinion = 25 + modifier = fp3_grateful_for_discretion_opinion + } + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:scandalous_scion + VALUE = minor_unity_gain + DESC = clan_unity_scandalous_scion_desc + REVERSE_NON_HOUSE_TARGET = no + } + + stress_impact = { + paranoid = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + ai_sociability = 1 + } + } + } + + option = { + name = fp3_clan.8015.b + + scope:concerned_parent = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:scandalous_scion + VALUE = minor_unity_loss + DESC = clan_unity_scandalous_scion_ignored_problem_desc + REVERSE_NON_HOUSE_TARGET = no + } + + stress_impact = { + generous = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = -0.5 + ai_sociability = -1 + } + } + } +} + +################################### +# Hammam Havoc +# By Ola Jentzsch +################################### +scripted_trigger fp3_scandalous_traits_trigger = { + OR = { + has_trait = deviant + has_trait = drunkard + has_trait = rakish + has_trait = hashishiyah + } +} + +scripted_trigger fp3_suitable_for_islamic_bathhouse_events_trigger = { + OR = { #checking for adherence to Islamic / Zoroastrian gender norms + AND = { + root = { is_male = yes } + is_male = yes + } + AND = { + root = { is_female = yes } + is_female = yes + } + } +} + +fp3_clan.8016 = { + type = character_event + title = fp3_clan.8016.t + desc = { + desc = fp3_clan.8016.opening_desc + first_valid = { + triggered_desc = { + trigger = { + scope:scandalous_clan_member = { + has_trait = deviant + } + } + desc = fp3_clan.8016.deviant_desc + } + triggered_desc = { + trigger = { + scope:scandalous_clan_member = { + has_trait = drunkard + } + } + desc = fp3_clan.8016.drunkard_desc + } + triggered_desc = { + trigger = { + scope:scandalous_clan_member = { + has_trait = rakish + } + } + desc = fp3_clan.8016.rakish_desc + } + triggered_desc = { + trigger = { + scope:scandalous_clan_member = { + has_trait = hashishiyah + } + } + desc = fp3_clan.8016.hashishiyah_desc + } + } + desc = fp3_clan.8016.ending_desc + } + + theme = faith + + left_portrait = { + character = root + animation = disbelief + triggered_animation = { + trigger = { + OR = { + has_trait = craven + has_trait = shy + has_trait = paranoid + stress > medium_stress + } + } + animation = worry + } + } + right_portrait = { + character = scope:chaplain + animation = eyeroll + } + lower_left_portrait = scope:scandalous_clan_member + + override_background = { reference = bath_house } + override_effect_2d = { + reference = smoke + } + + trigger = { + has_fp3_dlc_trigger = yes + is_available_adult = yes + is_dynast = yes + government_has_flag = government_is_clan + + faith = { + OR = { + has_doctrine_parameter = deviancy_illegal + has_doctrine_parameter = deviancy_shunned + } + } + + house = { + any_house_unity_member = { + this != root + is_available_ai_adult = yes + fp3_scandalous_traits_trigger = yes + fp3_suitable_for_islamic_bathhouse_events_trigger = yes + } + } + + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_healthy_ai_adult = yes + fp3_scandalous_traits_trigger = no + fp3_suitable_for_islamic_bathhouse_events_trigger = yes + } + } + + cooldown = { years = 10 } + + immediate = { + house = { + random_house_unity_member = { + limit = { + this != root + is_available_ai_adult = yes + fp3_scandalous_traits_trigger = yes + fp3_suitable_for_islamic_bathhouse_events_trigger = yes + } + save_scope_as = scandalous_clan_member + } + } + + cp:councillor_court_chaplain = { save_scope_as = chaplain } + + hidden_effect = { + scope:scandalous_clan_member = { + set_location = { location = root.location } + } + } + add_character_flag = is_naked + scope:chaplain = { + add_character_flag = is_naked + } + } + + option = { + name = fp3_clan.8016.a + + add_piety = medium_piety_gain + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:scandalous_clan_member + VALUE = minor_unity_loss + DESC = clan_unity_denouncement.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:scandalous_clan_member = { + denounce_effect = { ACTOR = root RECIPIENT = scope:scandalous_clan_member } + } + + scope:chaplain = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.9 + ai_vengefulness = 0.5 + ai_zeal = 1 + } + } + } + + option = { + name = fp3_clan.8016.b + + scope:chaplain = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:scandalous_clan_member + VALUE = minor_unity_gain + DESC = clan_unity_denouncement_refusal.desc + REVERSE_NON_HOUSE_TARGET = no + } + + stress_impact = { + zealous = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + ai_rationality = 0.8 + ai_sociability = 0.5 + } + } + } + after = { + remove_character_flag = is_naked + scope:chaplain = { + remove_character_flag = is_naked + } + } +} + +################################### +# A Questionable Position +# By Ola Jentzsch +################################### +#Tax collector acting as muhtasib +fp3_clan.8017 = { + type = character_event + title = fp3_clan.8017.t + + desc = { + desc = fp3_clan.8017.opening_desc + first_valid = { + triggered_desc = { + trigger = { + scope:tax_collector = { + OR = { + has_trait = diligent + has_trait = zealous + has_trait = chaste + has_trait = just + has_trait = ambitious + ai_zeal >= medium_positive_ai_value + } + } + } + desc = fp3_clan.8017.overly_eager.desc + } + triggered_desc = { + trigger = { + scope:tax_collector = { + OR = { + has_trait = drunkard + has_trait = greedy + has_trait = deceitful + has_trait = arbitrary + AND = { + ai_greed >= medium_positive_ai_value + ai_honor < low_positive_ai_value + } + } + } + } + desc = fp3_clan.8017.corrupt.desc + } + triggered_desc = { + trigger = { + scope:tax_collector = { + NOT = { ai_compassion >= low_positive_ai_value } + OR = { + has_trait = sadistic + has_trait = wrathful + has_trait = callous + ai_vengefulness >= medium_positive_ai_value + } + } + } + desc = fp3_clan.8017.cruel.desc + } + desc = fp3_clan.8017.generic.desc + } + desc = fp3_clan.8017.ending.desc + } + + theme = realm + + left_portrait = { + character = root + animation = disapproval + triggered_animation = { + trigger = { + OR = { + has_trait = generous + has_trait = compassionate + stress > low_stress + } + } + animation = worry + } + } + right_portrait = { + character = scope:unclan_taxpayer + animation = stress + } + lower_left_portrait = scope:tax_collector + + trigger = { + + has_fp3_dlc_trigger = yes + is_available_adult = yes + government_has_flag = government_is_clan + + has_religion = religion:islam_religion + + any_tax_collector = { + is_in_same_clan_as_trigger = { CHARACTER = root } + has_religion = religion:islam_religion + any_tax_collector_vassal = { + NOT = { + is_in_same_clan_as_trigger = { CHARACTER = root } + } + is_landed = yes + } + } + } + + immediate = { + + random_tax_collector = { + limit = { + is_in_same_clan_as_trigger = { CHARACTER = root } + has_religion = religion:islam_religion + any_tax_collector_vassal = { + NOT = { + is_in_same_clan_as_trigger = { CHARACTER = root } + + } + } + } + random_tax_collector_vassal = { + limit = { + NOT = { + is_in_same_clan_as_trigger = { CHARACTER = root } + } + is_landed = yes + } + save_scope_as = unclan_taxpayer + } + save_scope_as = tax_collector + } + } + + option = { + name = fp3_clan.8017.a + flavor = fp3_clan_protect_kinsman_flavor + + if = { + limit = { + root != house.house_head + } + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:tax_collector + VALUE = minor_unity_gain + DESC = clan_unity_protected_muhtasib_position.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + else = { + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:tax_collector + VALUE = medium_unity_gain + DESC = clan_unity_protected_muhtasib_position.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + + scope:unclan_taxpayer = { + add_opinion = { + target = root + opinion = -20 + modifier = frustrated_opinion + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + zealous = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + } + } + } + } + + option = { + name = fp3_clan.8017.b + flavor = fp3_clan_accuse_accuser_flavor + trigger = { + scope:unclan_taxpayer = { num_sinful_traits = { value > 0 target = root.faith } } + } + + add_dread = minor_dread_gain + + scope:unclan_taxpayer = { + add_opinion = { + target = root + opinion = -30 + modifier = shamed_me_opinion + } + } + + stress_impact = { + wrathful = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 2 + has_trait = zealous + } + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = compassionate + } + } + } + } + + option = { + name = fp3_clan.8017.c + + if = { + limit = { + root != house.house_head + } + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:tax_collector + VALUE = minor_unity_loss + DESC = clan_unity_fired_from_muhtasib_position.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + else = { + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:tax_collector + VALUE = medium_unity_loss + DESC = clan_unity_fired_from_muhtasib_position.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + + if = { + limit = { + NOT = { + has_hook_of_type = { + target = scope:unclan_taxpayer + type = favor_hook + } + } + } + add_hook = { + target = scope:unclan_taxpayer + type = favor_hook + } + } + + stress_impact = { + trusting = medium_stress_impact_loss + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -0.9 + ai_rationality = 0.9 + ai_sociability = 0.5 + } + } + } + + option = { + name = fp3_clan.8017.d + #Low effect opt out that is only needed if the taxpayer is not intimidated because of their sins + + trigger = { + scope:unclan_taxpayer = { num_sinful_traits = { value = 0 target = root.faith } } + } + + scope:unclan_taxpayer = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + stress_impact = { + trusting = major_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.4 + ai_greed = 0.6 + ai_compassion = -0.5 + } + } + } +} + diff --git a/N3OW/events/dlc/fp3/fp3_dynasty_decision_events.txt b/N3OW/events/dlc/fp3/fp3_dynasty_decision_events.txt new file mode 100644 index 00000000..7cc4e81e --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_dynasty_decision_events.txt @@ -0,0 +1,1376 @@ +namespace = fp3_dynasty_decision + +######################################### +# Embellish Capital Decision Events # +# By Ola Jentzsch # +# Reworked by Chad Uhl # +######################################### + +scripted_effect fp3_dynasty_decision_0003_fire_follow_up_event_effect = { + # Fire the event based on the option selected + if = { # Royal Architect + limit = { scope:embellish_capital_royal_architect = yes } + trigger_event = { + id = fp3_dynasty_decision.0004 + days = { 3 10 } + } + } + else_if = { # Consort or Courtier + limit = { scope:embellish_capital_consort_courtier = yes } + trigger_event = { + id = fp3_dynasty_decision.0005 + days = { 3 10 } + } + } + else_if = { # Court Chaplain + limit = { scope:embellish_capital_chaplain = yes } + trigger_event = { + id = fp3_dynasty_decision.0007 + days = { 3 10 } + } + } + else_if = { # Me + limit = { scope:embellish_capital_me = yes } + trigger_event = { + id = fp3_dynasty_decision.0008 + days = { 3 10 } + } + } +} + +# If you have both the gold and the recently conquered county for the Embellish Capital decision, we let you decide how to proceed here +fp3_dynasty_decision.0003 = { + type = character_event + title = fp3_dynasty_decision.0003.t + desc = { + desc = fp3_dynasty_decision.0003.intro + triggered_desc = { + trigger = { scope:chosen_architect != root } + desc = fp3_dynasty_decision.0003.char + } + desc = fp3_dynasty_decision.0003.desc + } + theme = realm + + left_portrait = { + character = root + animation = personality_greedy + } + right_portrait = { + trigger = { scope:chosen_architect != root } + character = scope:chosen_architect + animation = personality_honorable + } + + override_background = { reference = market_east } + + option = { # Pay by plundering the target conquered county + name = fp3_dynasty_decision.0003.a + + scope:target_county = { + add_county_modifier = { + modifier = fp3_plundered_county_modifier + years = 30 + } + } + + remove_variable = embellish_capital_cost + + # Fire the event based on the option selected + fp3_dynasty_decision_0003_fire_follow_up_event_effect = yes + + if = { + limit = { scope:chosen_architect != root } + reverse_add_opinion = { + target = scope:chosen_architect + modifier = trusted_me_opinion + opinion = 10 + } + } + + stress_impact = { + callous = minor_stress_impact_loss + } + + ai_chance = { #social AI prefer this option + base = 50 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { # Pay with gold + name = fp3_dynasty_decision.0003.b + + remove_treasury_or_gold = var:embellish_capital_cost + + # Fire the event based on the option selected + fp3_dynasty_decision_0003_fire_follow_up_event_effect = yes + + if = { + limit = { scope:chosen_architect != root } + reverse_add_opinion = { + target = scope:chosen_architect + modifier = trusted_me_opinion + opinion = 10 + } + } + + stress_impact = { + generous = minor_stress_impact_loss + } + + ai_chance = { #rational AI prefer this option + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + option = { #I'd rather wait + name = fp3_dynasty_decision.0003.c + + # Clear the cooldown. + remove_decision_cooldown = fp3_embellish_capital_decision + + # No stress impact for opting out. + } +} + +# Royal Architect +fp3_dynasty_decision.0004 = { + type = character_event + title = fp3_dynasty_decision.0004.t + desc = { + desc = fp3_dynasty_decision.0004.intro + triggered_desc = { + trigger = { has_variable = embellish_capital_cost } + desc = fp3_dynasty_decision.0004.plunder.desc + } + desc = fp3_dynasty_decision.0004.desc + } + theme = realm + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:chosen_architect + animation = steward + } + + immediate = { + scope:capital_county = { + add_county_modifier = { + modifier = fp3_architectural_splendor_county_modifier + years = 30 + } + } + } + + option = { #New fountains and aqueducts + name = fp3_dynasty_decision.0004.a + + scope:chosen_architect = { + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + dynasty = { add_dynasty_prestige = major_dynasty_prestige_value } + house = { + every_house_member = { + custom = every_house_member + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } + } + } + } + } + } + + ai_chance = { #ambitious AI prefer this option + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = 0.5 + } + } + } + + option = { #impress the local people + name = fp3_dynasty_decision.0004.b + + scope:chosen_architect = { + duel = { + skills = { stewardship diplomacy } + value = medium_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + + if = { + limit = { + scope:capital_county.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:capital_county.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_built_magnificent_capital + } + } + } + else = { + scope:capital_county = { + change_county_control = 20 + } + } + every_vassal = { + custom = every_minority_vassal + vassal_stance = minority + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + + if = { + limit = { + scope:capital_county.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:capital_county.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_built_magnificent_capital + } + } + } + else = { + scope:capital_county = { + change_county_control = 20 + } + } + } + } + } + } + } + + ai_chance = { #moderately ambitious, patient AI prefer this option + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = 0.5 + ai_sociability = 0.5 + } + } + } + + option = { #New fountains and aqueducts + name = fp3_dynasty_decision.0004.c + + scope:chosen_architect = { + duel = { + skills = { stewardship learning } + value = medium_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + + scope:capital_county = { change_development_progress = medium_development_progress_gain } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + + scope:capital_county = { change_development_progress = minor_development_progress_gain } + } + } + } + } + } + + ai_chance = { #pragmatic or compassionate AI prefer this option + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } +} + +# Courtier +fp3_dynasty_decision.0005 = { + type = character_event + title = fp3_dynasty_decision.0005.t + desc = fp3_dynasty_decision.0005.desc + theme = realm + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:chosen_architect + animation = happiness + } + + immediate = { + scope:capital_county = { + add_county_modifier = { + modifier = fp3_architectural_splendor_county_modifier + years = 30 + } + } + } + + option = { #Magnificent bathhouse + name = fp3_dynasty_decision.0005.a + + scope:chosen_architect = { + #before the duel, we're checking for opinion gains + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + add_opinion = { + target = root + modifier = happy_opinion + opinion = 20 + } + } + else_if = { + limit = { is_consort_of = root } + custom_tooltip = fp3_decisons_closer_to_love.tt + hidden_effect = { + root = { + progress_towards_lover_effect = { + CHARACTER = scope:chosen_architect + REASON = lover_let_me_build_steamy_bath_house + OPINION = 20 + } + } + } + } + else = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + + add_character_modifier = { + modifier = fp3_luxurious_bathhouse_modifier + years = 30 + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + + add_character_modifier = { + modifier = fp3_less_luxurious_bathhouse_modifier + years = 30 + } + } + } + } + } + } + + ai_chance = { #decadent or compassionate AI prefer this option + base = 100 + ai_value_modifier = { + ai_compassion = 0.3 + ai_greed = 0.8 + ai_sociability = 1 + } + } + + stress_impact = { #decadent characters loves this idea + lazy = minor_stress_impact_loss + lustful = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + shy = medium_stress_impact_gain + } + } + + option = { #A temple + name = fp3_dynasty_decision.0005.b + + scope:chosen_architect = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + duel = { + skills = { stewardship learning } + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + + add_piety = major_piety_gain + every_vassal = { + custom = every_zealot_vassal + vassal_stance = zealot + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + + add_piety = medium_piety_gain + } + } + } + } + } + + stress_impact = { + callous = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + + ai_chance = { #zealous antisocial AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_sociability = -1 + } + } + } + + option = { #A palace + name = fp3_dynasty_decision.0005.c + + scope:chosen_architect = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + duel = { + skills = { stewardship diplomacy } + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:royal_architect + + add_prestige = major_prestige_gain + every_vassal = { + custom = every_courtly_vassal + vassal_stance = courtly + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:royal_architect + + add_prestige = medium_prestige_gain + } + } + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + + ai_chance = { #rational AI, who kinda just wanna put the courtier down, picks this option + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.7 + ai_sociability = -1 + } + } + } +} + +# Chaplain +fp3_dynasty_decision.0007 = { + type = character_event + title = fp3_dynasty_decision.0007.t + desc = { + desc = { + desc = fp3_dynasty_decision.0007_desc_beginning + first_valid = { + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = sky_burials_active } + } + desc = fp3_dynasty_decision.0007_dakhma + } + triggered_desc = { + trigger = { + has_religion = religion:islam_religion + } + desc = fp3_dynasty_decision.0007_madrasa + } + } + } + desc = fp3_dynasty_decision.0007_outro + } + theme = realm + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:chosen_architect + animation = reading + } + + immediate = { + scope:capital_county = { + add_county_modifier = { + modifier = fp3_spiritual_splendor_county_modifier + years = 30 + } + } + } + + option = { #A great temple + name = fp3_dynasty_decision.0007.a + + scope:chosen_architect = { + duel = { + skills = { stewardship learning } + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + + add_piety = major_piety_gain + every_vassal = { + custom = every_zealot_vassal + vassal_stance = zealot + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + + add_piety = medium_piety_gain + } + } + } + } + } + + ai_chance = { #zealous AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { #A great dakhma + name = fp3_dynasty_decision.0007.b + + trigger = { + faith = { + has_doctrine_parameter = sky_burials_active + } + NOR = { #fallback for future content + has_character_modifier = fp3_great_tower_of_silence_modifier + has_character_modifier = fp3_less_great_tower_of_silence_modifier + } + } + + scope:capital_county = { + add_county_modifier = { + modifier = fp3_spiritual_splendor_county_modifier + years = 30 + } + } + + scope:chosen_architect = { + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + + add_character_modifier = { + modifier = fp3_great_tower_of_silence_modifier + years = 30 + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + + add_character_modifier = { + modifier = fp3_less_great_tower_of_silence_modifier + years = 30 + } + } + } + } + } + } + + ai_chance = { #zealous-hubris AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_greed = 0.5 + } + } + } + + option = { #A nice madrasa + name = fp3_dynasty_decision.0007.c + + trigger = { has_religion = religion:islam_religion } + + scope:chosen_architect = { + duel = { + skill = learning + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + + if = { + limit = { + scope:capital_county.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:capital_county.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_built_magnificent_capital + } + } + } + else = { + scope:capital_county = { + change_county_control = 20 + } + } + every_vassal = { + custom = every_minority_vassal + vassal_stance = minority + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + + if = { + limit = { + scope:capital_county.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:capital_county.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_built_magnificent_capital + } + } + } + else = { + scope:capital_county = { + change_county_control = 10 + } + } + } + } + } + } + } + + ai_chance = { #rational-sociable AI prefer this option + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_sociability = 0.5 + } + } + } + + option = { #A sweet fresco + name = fp3_dynasty_decision.0007.d + + scope:chosen_architect = { + duel = { + skills = { stewardship diplomacy } + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = scope:chosen_architect + + dynasty = { add_dynasty_prestige = major_dynasty_prestige_value } + house = { + every_house_member = { + custom = every_house_member + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = scope:chosen_architect + + dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } + } + } + } + } + } + + ai_chance = { #ambitious AI prefer this option + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_sociability = 0.5 + } + } + } +} + +# Myself +fp3_dynasty_decision.0008 = { + type = character_event + title = fp3_dynasty_decision.0008.t + desc = fp3_dynasty_decision.0008.desc + theme = realm + left_portrait = { + character = root + animation = reading + } + + override_background = { reference = relaxing_room } + + option = { #Roads and public works (Development bonus) + name = fp3_dynasty_decision.0008.a + + trigger = { has_lifestyle = stewardship_lifestyle } + + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = root + + scope:capital_county = { change_development_progress = medium_development_progress_gain } + add_stewardship_lifestyle_xp = massive_lifestyle_xp + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = root + + scope:capital_county = { change_development_progress = minor_development_progress_gain } + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + } + } + } + + ai_chance = { #compassionate-energetic AI prefer this option + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_energy = 0.5 + } + } + } + + option = { #Local monuments (Acceptance or Control) + name = fp3_dynasty_decision.0008.b + + trigger = { has_lifestyle = diplomacy_lifestyle } + + duel = { + skills = { stewardship diplomacy } + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = root + + if = { + limit = { + scope:capital_county.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:capital_county.culture + value = medium_positive_culture_acceptance + desc = cultural_acceptance_built_magnificent_capital + } + } + } + else = { + scope:capital_county = { + change_county_control = 20 + } + } + add_diplomacy_lifestyle_xp = massive_lifestyle_xp + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = root + + if = { + limit = { + scope:capital_county.culture != root.culture + } + culture = { + change_cultural_acceptance = { + target = scope:capital_county.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_built_magnificent_capital + } + } + } + else = { + scope:capital_county = { + change_county_control = 10 + } + } + add_diplomacy_lifestyle_xp = medium_lifestyle_xp + } + } + } + } + + ai_chance = { #rational AI prefer this option + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + option = { #Mausoleum (Renown) + name = fp3_dynasty_decision.0008.c + + trigger = { has_lifestyle = learning_lifestyle } + + duel = { + skills = { stewardship learning } + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = root + + dynasty = { add_dynasty_prestige = major_dynasty_prestige_value } + add_learning_lifestyle_xp = massive_lifestyle_xp + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = root + + dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + } + } + } + + + ai_chance = { #ambitious AI prefer this option + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { #Hammam (Stress Loss) + name = fp3_dynasty_decision.0008.d + + trigger = { has_lifestyle = intrigue_lifestyle } + + duel = { + skills = { stewardship intrigue } + value = medium_skill_rating + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = root + + add_character_modifier = { + modifier = fp3_luxurious_bathhouse_modifier + years = 30 + } + add_intrigue_lifestyle_xp = massive_lifestyle_xp + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = root + + add_character_modifier = { + modifier = fp3_less_luxurious_bathhouse_modifier + years = 30 + } + add_intrigue_lifestyle_xp = medium_lifestyle_xp + } + } + } + } + + + ai_chance = { #social AI prefer this option + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + option = { #Tower (Province improvement) + name = fp3_dynasty_decision.0008.e + + trigger = { has_lifestyle = martial_lifestyle } + + duel = { + skills = { stewardship martial } + value = medium_skill_rating + + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = root + + add_character_modifier = { + modifier = fp3_very_lofty_tower_modifier + years = 30 + } + add_martial_lifestyle_xp = massive_lifestyle_xp + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = root + + add_character_modifier = { + modifier = fp3_less_lofty_tower_modifier + years = 30 + } + add_martial_lifestyle_xp = medium_lifestyle_xp + } + } + } + } + + ai_chance = { #warlike AI prefer this option + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + option = { #Palace (Prestige) + name = fp3_dynasty_decision.0008.f + + duel = { + skill = stewardship + value = medium_skill_rating + + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = root + + add_prestige = major_prestige_gain + every_vassal = { + custom = every_courtly_vassal + vassal_stance = courtly + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = root + + add_prestige = medium_prestige_gain + } + } + } + } + + ai_chance = { #honor-focused AI prefer this option + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + + option = { #Temple (Piety) + name = fp3_dynasty_decision.0008.g + + duel = { + skills = { stewardship learning } + value = medium_skill_rating + + 50 = { + desc = splurge_above_expectations_toast + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + root = { + send_interface_toast = { + title = splurge_above_expectations_toast + left_icon = root + + add_piety = major_piety_gain + every_vassal = { + custom = every_zealot_vassal + vassal_stance = zealot + add_opinion = { + target = root + modifier = approving_opinion + } + } + } + } + } + 50 = { + desc = splurge_as_expected_toast + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + root = { + send_interface_toast = { + title = splurge_as_expected_toast + left_icon = root + + add_piety = medium_piety_gain + } + } + } + } + + ai_chance = { #pious AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + after = { + scope:capital_county = { + add_county_modifier = { + modifier = fp3_architectural_splendor_county_modifier + years = 30 + } + } + } +} + + + diff --git a/N3OW/events/dlc/fp3/fp3_extra_flavor_events.txt b/N3OW/events/dlc/fp3/fp3_extra_flavor_events.txt new file mode 100644 index 00000000..20817aaf --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_extra_flavor_events.txt @@ -0,0 +1,2221 @@ +namespace = fp3_yearly + +########EVENT INDEX############ +#fp3_yearly.8037 - A Cure for Acedia (the Melancholia Chain) + #fp3_yearly.8038 - Black Bile + #fp3_yearly.8039 - Herbs & Humors + #fp3_yearly.8040 - Psychic Potency + #fp3_yearly.8041 - The Solace of Silence + #fp3_yearly.8042 - The Undying Spirit + #fp3_yearly.8043 - Remedies' End + #fp3_yearly.8044 - The Light of the World +#fp3_yearly.8045 - The Mysterious Bundle (Chess-Playing Monkey Chain) + #fp3_yearly.8046 - Monkey Medicine + #fp3_yearly.8047 - Feeling Better? + #fp3_yearly.8048 - Hidden event, triggering toast about monkey's death +#fp3_yearly.8050 - The Fate of the Dead +#fp3_yearly.8051 - The Purest Fire + #fp3_yearly.8052 - Chasing the Clouds + #fp3_yearly.8053 - The Fire of Victory + + +################################## +# A Cure for Acedia - the Melancholica chain +# By Ola Jentzsch +################################### + +fp3_yearly.8037 = { #A Cure for Acedia + type = character_event + title = fp3_yearly.8037.t + desc = fp3_yearly.8037.desc + theme = mental_health + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:court_physician + animation = personality_bold + } + lower_left_portrait = { + character = scope:persian_polymath + } + + override_background = { reference = corridor_night } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_landed_or_landless_administrative = yes + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + root.capital_province = { geographical_region = world_persian_empire } + + OR = { + has_trait = depressed_1 #non-genetic melancholia + has_trait = depressed_genetic #or the genetic kind, but they won't be able to cure this one... + } + + employs_court_position = court_physician_court_position + + any_court_position_holder = { + type = court_physician_court_position + is_available_healthy_ai_adult = yes + NOT = { has_trait = arrogant } + learning < excellent_skill_level #he can't be too smart for this story to work + } + } + + cooldown = { years = 50 } + + weight_multiplier = { #more likely to trigger if historical scholars can be used + base = 0.4 + modifier = { + OR = { + AND = { #for Rhazes + current_year >= 895 + current_year < 935 + } + AND = { #for Al-Akhwayni + current_year >= 936 + current_year < 983 + } + AND = { #for Avicenna + current_year >= 1000 + current_year < 1040 + } + } + add = 1.6 + } + } + + immediate = { + + save_court_physician_as_effect = { SCOPE_NAME = court_physician } #so we can use him in the event + + if = { #This looks to see if one of two historical alchemists will be used in the event + limit = { #their rough period of activity + is_ai = no + AND = { + current_year >= 895 + current_year < 935 + } + NOT = { exists = global_var:rhazes_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_rhazes_template + save_scope_as = persian_polymath #this saves him as a scope so we can get nice effects to bounce off him! + } + set_global_variable = rhazes_created + } + else_if = { #This looks to see if one of two historical alchemists will be used in the event + limit = { #their rough period of activity + is_ai = no + AND = { + current_year >= 936 + current_year < 983 + } + NOT = { exists = global_var:al_akhwayni_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_al_akhwayni_template + save_scope_as = persian_polymath #this saves him as a scope so we can get nice effects to bounce off him! + } + set_global_variable = al_akhwayni_created + } + else_if = { + limit = { #their rough period of activity + is_ai = no + AND = { + current_year >= 1000 + current_year < 1040 + } + NOT = { exists = global_var:avicenna_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_avicenna_template + save_scope_as = persian_polymath #this saves him as a scope so we can get nice effects to bounce off him! + } + set_global_variable = avicenna_created + } + else = { + create_character = { + age = { 32 50 } + location = root.capital_province + template = scholar_character + trait = education_learning_3 + trait = lifestyle_herbalist + trait = lifestyle_physician + random_traits_list = { + count = 3 + diligent = {} + patient = {} + cynical = {} + humble = {} + greedy = {} + } + random_traits_list = { #for flavor + count = 1 + lunatic_1 = {} + deviant = {} + lifestyle_mystic = {} + hashishiyah = {} + witch = {} + } + culture = culture:persian + faith = root.faith + save_scope_as = persian_polymath + + after_creation = { + add_trait_xp = { + trait = lifestyle_physician + value = 100 + } + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_mystic + LEVEL_1 = yes + LEVEL_3 = no + } + } + } + } + } + + option = { + name = fp3_yearly.8037.a + + remove_short_term_gold = medium_gold_value + + trigger_event = { + id = fp3_yearly.8038 + days = { 5 10 } + } + + stress_impact = { + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = 0.5 + } + } + } + + option = { + name = fp3_yearly.8037.b + + stress_impact = { + base = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + shy = miniscule_stress_impact_loss + } + + ai_chance = { #most depressed AI would rather not deal with the situation + base = 150 + ai_value_modifier = { + ai_energy = -0.9 + ai_sociability = -0.5 + } + } + } +} + +fp3_yearly.8038 = { #Black Bile + type = character_event + title = fp3_yearly.8038.t + desc = fp3_yearly.8038.desc + theme = mental_health + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:persian_polymath + animation = personality_rational + } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + + OR = { + has_trait = depressed_1 #non-genetic melancholia + has_trait = depressed_genetic #or the genetic kind, but they won't be able to cure this one... + } + + exists = scope:persian_polymath + scope:persian_polymath = { is_alive = yes } + } + + immediate = { + + add_courtier = scope:persian_polymath + + hidden_effect = { + scope:persian_polymath = { + set_knight_status = forbid #this is to prevent him being auto-turned into a knight during his stay. The player can still make him a knight manually if they insist on it. + } + } + } + + option = { + name = fp3_yearly.8038.a + + add_character_modifier = { + modifier = fp3_lackluster_diet_modifier + years = 10 + } + + if = { + limit = { + has_trait = comfort_eater + } + custom_tooltip = lackluster_diet.tt + } + + trigger_event = { + id = fp3_yearly.8039 + days = { 200 400 } + } + + stress_impact = { + temperate = minor_stress_impact_loss + gluttonous = major_stress_impact_gain + comfort_eater = massive_stress_impact_gain + gregarious = medium_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = 0.5 + } + } + } + + option = { + name = fp3_yearly.8038.b + + if = { + limit = { + OR = { + exists = global_var:avicenna_created + exists = global_var:rhazes_created + exists = global_var:al_akhwayni_created + } + } + scope:persian_polymath = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:persian_polymath = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + diligent = minor_stress_impact_gain + stubborn = minor_stress_impact_loss + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = 0.5 + } + } + } +} + + +fp3_yearly.8039 = { #Herbs & Humors + type = character_event + title = fp3_yearly.8039.t + desc = fp3_yearly.8039.desc + theme = mental_health + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:persian_polymath + animation = personality_cynical + } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + + OR = { + has_trait = depressed_1 #non-genetic melancholia + has_trait = depressed_genetic #or the genetic kind, but they won't be able to cure this one... + } + + has_character_modifier = fp3_lackluster_diet_modifier + + exists = scope:persian_polymath + + scope:persian_polymath = { + is_courtier_of = root + } + } + + option = { + name = fp3_yearly.8039.a + + remove_character_modifier = fp3_lackluster_diet_modifier + + add_character_modifier = { + modifier = fp3_herbal_remedies_modifier + } + + trigger_event = { + id = fp3_yearly.8040 + days = { 200 400 } + } + + stress_impact = { + temperate = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = 1 + } + } + } + + option = { + name = fp3_yearly.8039.b + + trigger_event = { + id = fp3_yearly.8040 + days = { 200 400 } + } + + stress_impact = { + content = minor_stress_impact_loss + temperate = minor_stress_impact_loss + gluttonous = major_stress_impact_gain + comfort_eater = massive_stress_impact_gain + gregarious = medium_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_sociability = -0.1 + } + } + } + + option = { + name = fp3_yearly.8039.c + + if = { + limit = { + OR = { + exists = global_var:avicenna_created + exists = global_var:rhazes_created + exists = global_var:al_akhwayni_created + } + } + scope:persian_polymath = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:persian_polymath = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + impatient = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_vengefulness = 0.5 + } + } + } +} + +fp3_yearly.8040 = { #Psychic Potency + type = character_event + title = fp3_yearly.8040.t + desc = fp3_yearly.8040.desc + theme = mental_health + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:persian_polymath + animation = personality_compassionate + } + + lower_left_portrait = { + character = scope:court_chaplain + } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + + OR = { + has_trait = depressed_1 #non-genetic melancholia + has_trait = depressed_genetic #or the genetic kind, but they won't be able to cure this one... + } + + exists = scope:persian_polymath + + scope:persian_polymath = { + is_courtier_of = root + } + } + + immediate = { + + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + AND = { + is_available_healthy_ai_adult = yes + this != scope:persian_polymath + } + } + } + cp:councillor_court_chaplain = { save_scope_as = court_chaplain } + } + } + + option = { + name = fp3_yearly.8040.a + + trigger = { + AND = { + has_religion = religion:islam_religion + NOT = { has_character_modifier = fp3_sufi_initiate_modifier } + } + } + + trigger_event = { + id = fp3_yearly.8041 + days = { 5 15 } + } + + stress_impact = { + #none for this option + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.9 + ai_boldness = 0.9 + } + } + } + + + option = { + name = fp3_yearly.8040.b + + trigger = { exists = scope:court_chaplain } + + trigger_event = fp3_yearly.8042 + + stress_impact = { + #none for this option + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_sociability = 0.8 + ai_compassion = 0.5 + ai_vengefulness = -0.5 + } + } + } + + option = { + name = fp3_yearly.8040.c + flavor = fp3_refusing_faith_treatment_flavor + + trigger_event = { + id = fp3_yearly.8043 + days = { 150 250 } + } + + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { + name = fp3_yearly.8040.d + + if = { + limit = { + OR = { + exists = global_var:avicenna_created + exists = global_var:rhazes_created + exists = global_var:al_akhwayni_created + } + } + scope:persian_polymath = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:persian_polymath = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + impatient = minor_stress_impact_loss + forgiving = medium_stress_impact_gain + patient = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_vengefulness = 1 + } + } + } +} + + +############################################################### +# The Solace of Silence - by Ola Jentzsch +############################################################### + +fp3_yearly.8041 = { + type = character_event + title = fp3_yearly.8041.t + desc = fp3_yearly.8041.desc + theme = learning_theology_focus + + left_portrait = { + character = scope:sufi_mystic + animation = personality_zealous + } + + right_portrait = { + character = root + animation = worry + } + + override_background = { + reference = relaxing_room + } + + immediate = { + + if = { + limit = { + any_relation = { + type = friend + NOR = { + this = scope:persian_polymath + this = scope:court_chaplain + } + fp3_sufism_enthusiast_trigger = yes + } + } + random_relation = { + type = friend + limit = { + AND = { + fp3_sufism_enthusiast_trigger = yes + NOR = { + this = scope:persian_polymath + this = scope:court_chaplain + } + } + } + save_scope_as = sufi_mystic + } + } + else_if = { + limit = { + any_relation = { + type = lover + NOR = { + this = scope:persian_polymath + this = scope:court_chaplain + } + fp3_sufism_enthusiast_trigger = yes + } + } + random_relation = { + type = lover + limit = { + AND = { + fp3_sufism_enthusiast_trigger = yes + NOR = { + this = scope:persian_polymath + this = scope:court_chaplain + } + } + } + save_scope_as = sufi_mystic + } + } + else_if = { + limit = { + any_courtier_or_guest = { + fp3_sufism_enthusiast_trigger = yes + NOR = { + this = scope:persian_polymath + this = scope:court_chaplain + } + } + } + random_courtier_or_guest = { + limit = { + AND = { + fp3_sufism_enthusiast_trigger = yes + NOR = { + this = scope:persian_polymath + this = scope:court_chaplain + } + } + } + save_scope_as = sufi_mystic + } + } + else = { + create_character = { + location = root.capital_province + template = fp3_sufi_mystic + gender_female_chance = root_faith_dominant_gender_female_chance + culture = culture:persian + save_scope_as = sufi_mystic + + after_creation = { + hidden_effect = { + root = { + add_courtier = scope:sufi_mystic + } + } + } + } + } + + hidden_effect = { + + scope:sufi_mystic = { + add_character_modifier = { + modifier = fp3_sufi_initiate_modifier #Unlocks the "Meditate in Seclusion" decision if you are a ruler + } + } + } + } + + option = { + name = fp3_yearly.8041.a + + duel = { + skill = learning + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = learning_muraqaba_toast.success + left_icon = root + + custom_tooltip = fp3_unlock_meditation.tt + add_character_modifier = { + modifier = fp3_sufi_initiate_modifier #Unlocks the "Meditate in Seclusion" decision if you are a ruler + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = learning_muraqaba_toast.failure + left_icon = root + add_learning_lifestyle_xp = minor_lifestyle_experience + } + } + } + } + + scope:sufi_mystic = { + add_opinion = { + target = root + modifier = trusted_friend_opinion + } + } + + trigger_event = { + id = fp3_yearly.8043 + days = { 150 250 } + } + + stress_impact = { #while the stress mods here are low, note that they stack with the base modifier + base = medium_stress_impact_gain + zealous = minor_stress_impact_loss + patient = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + lazy = minor_stress_impact_gain + content = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = 0.5 + ai_energy = 0.5 + ai_zeal = 1 + } + } + } + + option = { + name = fp3_yearly.8041.b + + scope:sufi_mystic = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + + trigger_event = { + id = fp3_yearly.8043 + days = { 150 250 } + } + + stress_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + ai_zeal = -0.5 + } + } + } +} + +##### The Undying Spirit ##### + +fp3_yearly.8042 = { #The Undying Spirit + type = character_event + title = fp3_yearly.8042.t + desc = fp3_yearly.8042.desc + theme = faith + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:court_chaplain + animation = chancellor + } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + + OR = { + has_trait = depressed_1 #non-genetic melancholia + has_trait = depressed_genetic #or the genetic kind, but they won't be able to cure this one... + } + + exists = scope:court_chaplain + } + + option = { + name = fp3_yearly.8042.a + + scope:court_chaplain = { + add_opinion = { + target = root + modifier = trusted_me_opinion + opinion = 15 + } + } + + add_character_modifier = { + modifier = focused_reading_modifier + years = 10 + } + + trigger_event = { + id = fp3_yearly.8043 + days = { 150 250 } + } + + stress_impact = { + base = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + dull = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.5 + ai_zeal = 0.5 + } + } + } + + option = { + name = fp3_yearly.8042.b + + scope:court_chaplain = { + add_opinion = { + target = root + modifier = trusted_me_opinion + opinion = 15 + } + } + + add_character_modifier = { + modifier = fp3_worshipping_in_solitude_modifier + years = 10 + } + + trigger_event = { + id = fp3_yearly.8043 + days = { 150 250 } + } + + stress_impact = { + gregarious = medium_stress_impact_gain + cynical = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = 0.5 + ai_zeal = 0.5 + } + } + } + + option = { + name = fp3_yearly.8042.c + + scope:court_chaplain = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + + trigger_event = { + id = fp3_yearly.8043 + days = { 150 250 } + } + + stress_impact = { + base = minor_stress_impact_loss + humble = minor_stress_impact_gain + patient = medium_stress_impact_gain + trusting = medium_stress_impact_gain + zealous = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_vengefulness = 0.5 + } + } + } +} + +##### Remedies' End ##### + +fp3_yearly.8043 = { + type = character_event + title = fp3_yearly.8043.t + desc = fp3_yearly.8043.desc + theme = mental_health + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:persian_polymath + animation = personality_coward + } + + override_background = { reference = study } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + + OR = { + has_trait = depressed_1 #non-genetic melancholia + has_trait = depressed_genetic #or the genetic kind, but they won't be able to cure this one... + } + + exists = scope:persian_polymath + + scope:persian_polymath = { + is_courtier_of = root + } + } + + option = { + name = fp3_yearly.8043.a + flavor = fp3_polymath_stays_flavor + + remove_short_term_gold = medium_gold_value + + hidden_effect = { + if = { + limit = { has_trait = depressed_1 } + random = { + chance = 50 + trigger_event = { + id = fp3_yearly.8044 + days = { 300 500 } + } + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 1 + ai_boldness = -0.7 + } + } + } + + option = { + name = fp3_yearly.8043.b + + hidden_effect = { + if = { + limit = { has_trait = depressed_1 } + random = { + chance = 50 + trigger_event = { + id = fp3_yearly.8044 + days = { 300 500 } + } + } + } + } + + scope:persian_polymath = { #at this juncture, we want to keep the polymath around, and not disappeared, so the next event can trigger + move_to_pool = yes + } + + stress_impact = { + vengeful = minor_stress_impact_loss + generous = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_vengefulness = 1 + } + } + } +} + + +##### The Light of the World ##### + +fp3_yearly.8044 = { + type = character_event + title = fp3_yearly.8044.t + desc = fp3_yearly.8044.desc + theme = mental_health + left_portrait = { + character = root + animation = happiness + } + + override_background = { reference = wilderness } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + + has_trait = depressed_1 #non-genetic melancholia + + exists = scope:persian_polymath + + } + + immediate = { + + remove_trait = depressed_1 + } + + option = { + name = fp3_yearly.8044.a + + stress_impact = { + base = medium_stress_impact_loss + } + } +} + +################################## +# The Mysterious Bundle +# By Ola Jentzsch +################################### + +fp3_yearly.8045 = { #The Mysterious Bundle (sick monkey chain) + type = character_event + title = fp3_yearly.8045.t + desc = fp3_yearly.8045.desc + theme = pet + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:buzina_enthusiast + animation = newborn + } + lower_center_portrait = scope:court_physician + + override_background = { reference = fp3_courtyard_night } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed = yes + root.capital_province = { geographical_region = world_persian_empire } + is_available = yes + # Following checks that they are of the right age to play board games + can_start_board_game_eligibility_checks_trigger = yes + + employs_tax_collector = yes + any_tax_collector = { + is_available_healthy_ai_adult = yes + opinion = { + target = root + value >= 0 + } + save_temporary_scope_as = tax_collector_temp + } + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + is_available_healthy_ai_adult = yes + this != scope:tax_collector_temp + } + + NOR = { + has_character_flag = had_event_fp3_yearly_8045 + has_character_modifier = fp3_chess_playing_monkey_modifier + has_character_modifier = fp3_sickly_monkey_modifier + culture = { has_cultural_parameter = may_challenge_to_board_games } + } + } + + immediate = { + add_character_flag = had_event_fp3_yearly_8045 + random_tax_collector = { + limit = { + is_available_healthy_ai_adult = yes + opinion = { + target = root + value >= 0 + } + } + save_scope_as = buzina_enthusiast + } + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + } + + option = { #My court physician can nurse her + name = fp3_yearly.8045.a + flavor = sick_monkey_flavor_desc + + scope:buzina_enthusiast = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + + custom_tooltip = playing_with_monkey.tt + + add_character_modifier = { + modifier = fp3_sickly_monkey_modifier + years = 10 + } + + trigger_event = { + id = fp3_yearly.8046 + days = { 1 2 } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + generous = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_sociability = 0.5 + ai_vengefulness = -0.3 + } + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + + option = { # You got yourself into this mess, you can handle it + name = fp3_yearly.8045.b + + add_prestige = minor_prestige_gain + + scope:buzina_enthusiast = { + add_opinion = { + target = root + modifier = was_scolded_opinion + opinion = -15 + } + add_character_flag = { + flag = fp3_inspired_tax_collector + years = 10 + } + custom_tooltip = fp3_inspired_tax_collector + } + + stress_impact = { + compassionate = minor_stress_impact_gain + arrogant = medium_stress_impact_loss + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.2 + ai_boldness = 0.3 + ai_energy = 0.7 + } + modifier = { + has_trait = compassionate + factor = 0 + } + } + } + + option = { # Opt-out + name = fp3_yearly.8045.c + + stress_impact = { + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_energy = -0.5 + ai_boldness = -0.9 + } + } + } +} + + +fp3_yearly.8046 = { #Buzina + type = character_event + title = fp3_yearly.8046.t + desc = fp3_yearly.8046.desc + theme = medicine + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:court_physician + animation = newborn + } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + + has_character_modifier = fp3_sickly_monkey_modifier + + exists = scope:court_physician + } + + option = { + name = fp3_yearly.8046.a + flavor = fp3_wait_and_see.tt + remove_short_term_gold = minor_gold_value + custom_tooltip = monkey_recover_better_chances_tt + + hidden_effect = { + random_list = { + 80 = { + trigger_event = { + id = fp3_yearly.8047 + days = { 30 100 } + } + } + 20 = { + trigger_event = { + id = fp3_yearly.8048 + days = { 100 200 } + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + generous = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 1 + ai_greed = -0.5 + } + } + } + + option = { + name = fp3_yearly.8046.b + flavor = fp3_wait_and_see.tt + hidden_effect = { + random_list = { + 50 = { + trigger_event = { + id = fp3_yearly.8047 + days = { 30 100 } + } + } + 50 = { + trigger_event = { + id = fp3_yearly.8048 + days = { 100 200 } + } + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + +fp3_yearly.8047 = { + type = character_event + title = fp3_yearly.8047.t + desc = fp3_yearly.8047.desc + theme = pet + + left_portrait = { + character = root + animation = chess_cocky + } + right_portrait = { + character = scope:court_physician + animation = newborn + } + + trigger = { has_character_modifier = fp3_sickly_monkey_modifier } + + immediate = { + remove_character_modifier = fp3_sickly_monkey_modifier + } + + option = { + name = fp3_yearly.8047.a + add_character_modifier = { + modifier = fp3_chess_playing_monkey_modifier + years = 15 + } + custom_tooltip = playing_chess_with_monkey.tt + } +} + +fp3_yearly.8048 = { + hidden = yes + + trigger = { has_character_modifier = fp3_sickly_monkey_modifier } + + immediate = { + root = { + send_interface_toast = { + title = monkey_died_from_sickness_toast + left_icon = root + remove_character_modifier = fp3_sickly_monkey_modifier + } + } + + } +} + +################################## +# The Fate of the Dead +# By Ola Jentzsch +################################### + +fp3_yearly.8050 = { #The Fate of the Dead + type = character_event + title = fp3_yearly.8050.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_religion = religion:zoroastrianism_religion + } + desc = fp3_yearly.8050_zoroastrian.desc + } + desc = fp3_yearly.8050_unzoroastrian.desc + } + first_valid = { + triggered_desc = { + trigger = { + current_year < 950 + } + desc = fp3_yearly.8050_early_period.desc + } + desc = fp3_yearly.8050_late_period.desc + } + } + + theme = skull + override_background = { reference = temple } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:dakhma_enthusiast + animation = personality_bold + } + lower_left_portrait = { + character = scope:architect + } + + cooldown = { years = 5 } + + weight_multiplier = { #more likely if root is zoroastrian + base = 0.4 + modifier = { + has_religion = religion:zoroastrianism_religion + add = 0.6 + } + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + root.capital_province = { geographical_region = world_persian_empire } + + any_held_county = { + faith = { religion_tag = zoroastrianism_religion } + county_control <= 75 + any_county_province = { + has_holding_type = castle_holding + has_special_building_slot = no + has_special_building = no + NOR = { + has_building = tower_of_silence_01 + has_building = event_tower_of_silence_01 + } + } + } + + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_healthy_ai_adult = yes } + } + + immediate = { + + cp:councillor_court_chaplain = { save_scope_as = dakhma_enthusiast } + + if = { + limit = { + employs_court_position = royal_architect_court_position + any_court_position_holder = { + has_court_position = royal_architect_court_position + is_available_healthy_ai_adult = yes + } + } + random_court_position_holder = { + limit = { + has_court_position = royal_architect_court_position + is_available_healthy_ai_adult = yes + } + save_scope_as = architect + } + } + + random_held_county = { + limit = { + faith = { religion_tag = zoroastrianism_religion } + county_control < 75 + any_county_province = { + has_holding_type = castle_holding + has_special_building_slot = no + has_special_building = no + NOR = { + has_building = tower_of_silence_01 + has_building = event_tower_of_silence_01 + } + } + } + random_county_province = { + limit = { + has_holding_type = castle_holding + has_special_building_slot = no + has_special_building = no + } + save_scope_as = dakhma_province + } + save_scope_as = dakhma_county + } + } + + option = { + name = fp3_yearly.8050.a + + flavor = fp3_cheap_architecture_flavor + + trigger = { + exists = scope:architect + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:dakhma_province = { + hidden_effect = { add_special_building_slot = event_tower_of_silence_01 } + add_special_building = event_tower_of_silence_01 + } + + scope:architect = { + duel = { + skill = learning + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = building_a_dakhma.success + left_icon = scope:architect + custom_tooltip = fp3_silence_architecture_success_toast + + scope:dakhma_county = { change_county_control = 15 } + + if = { + limit = { + OR = { + faith = { religion_tag = zoroastrianism_religion } + faith = { has_doctrine_parameter = sky_burials_active } + } + } + add_piety = major_piety_gain + } + else = { + add_character_modifier = { + modifier = fp3_promoting_zoroastrianism_modifier + years = 20 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = building_a_dakhma.failure + left_icon = scope:architect + custom_tooltip = fp3_silence_architecture_failure_toast + + scope:dakhma_county = { + add_county_modifier = { + modifier = fp3_bad_tower_of_silence_county_modifier + years = 20 + } + } + } + } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + greedy = minor_stress_impact_loss + trusting = medium_stress_impact_loss + content = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.7 + ai_boldness = 0.7 + ai_vengefulness = -0.3 + } + } + } + + option = { + name = fp3_yearly.8050.b + + remove_treasury_or_gold = major_treasury_or_gold_value + + scope:dakhma_province = { + hidden_effect = { add_special_building_slot = event_tower_of_silence_01 } + add_special_building = event_tower_of_silence_01 + } + + scope:dakhma_county = { change_county_control = 15 } + + if = { #if you're zoroastrian or like sky burials in general, you earn piety for this, otherwise you might get an opinion bonus from zoroastrian subjects + limit = { + OR = { + faith = { religion_tag = zoroastrianism_religion } + faith = { has_doctrine_parameter = sky_burials_active } + } + } + add_piety = medium_piety_gain + } + else = { + custom_tooltip = fp3_zoroastrian_courtiers_and_vassals_happy + hidden_effect = { + every_courtier_or_guest = { + if = { + limit = { + AND = { + faith = { religion_tag = zoroastrianism_religion } + ai_zeal >= low_positive_ai_value + } + } + } + add_opinion = { + target = root + opinion = 15 + modifier = fp3_built_a_dakhma_opinion + } + } + every_vassal = { + if = { + limit = { + AND = { + faith = { religion_tag = zoroastrianism_religion } + ai_zeal >= low_positive_ai_value + } + } + } + add_opinion = { + target = root + opinion = 15 + modifier = fp3_built_a_dakhma_opinion + } + } + } + } + + stress_impact = { + generous = medium_stress_impact_loss + greedy = major_stress_impact_gain + callous = minor_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.9 + ai_compassion = 0.7 + ai_rationality = 0.3 + } + } + } + + option = { + name = fp3_yearly.8050.c + + trigger = { + NOT = { + faith = { religion_tag = zoroastrianism_religion } + } + } + + scope:dakhma_enthusiast = { + add_opinion = { + target = root + opinion = -15 + modifier = disappointed_opinion + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_rationality = -0.5 + ai_vengefulness = 1 + ai_zeal = 1 + } + } + } + + option = { #zoroastrian variant option, with slightly different stress gains and AI weights + name = fp3_yearly.8050.d + + trigger = { + faith = { religion_tag = zoroastrianism_religion } + } + + scope:dakhma_enthusiast = { + add_opinion = { + target = root + opinion = -15 + modifier = disappointed_opinion + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + cynical = minor_stress_impact_loss + greedy = medium_stress_impact_loss + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_zeal = -1 + ai_greed = 1 + ai_vengefulness = 1 + } + } + } +} + + +################################## +# The Purest Fire +# By Ola Jentzsch and Lucas Ribeiro Rodrigues +################################### + +fp3_yearly.8051 = { #The Purest Fire + type = character_event + title = fp3_yearly.8051.t + desc = { + desc = fp3_yearly.8051_opening.desc + random_valid = { + desc = fp3_yearly.8051_torrential_rain + desc = fp3_yearly.8051_earthquake + desc = fp3_yearly.8051_sandstorm + desc = fp3_yearly.8051_gust_of_wind + desc = fp3_yearly.8051_islamic_zealots + desc = fp3_yearly.8051_invisible_hand + } + desc = fp3_yearly.8051_ending.desc + } + + theme = faith + + left_portrait = { + character = root + animation = personality_honorable + triggered_animation = { + trigger = { + OR = { + has_trait = ambitious + has_trait = zealous + has_trait = arrogant + } + } + animation = personality_zealous + } + } + right_portrait = { + character = scope:magi + animation = worry + } + + cooldown = { years = 5 } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + root.capital_province = { geographical_region = world_persian_empire } + faith = { religion_tag = zoroastrianism_religion } + + any_held_county = { + faith = { religion_tag = zoroastrianism_religion } + any_county_province = { + has_holding_type = church_holding + } + } + + faith.religious_head != root + + NOT = { has_character_modifier = fp3_blessed_by_fire_modifier } #this would make some of the rewards redundant + + OR = { + AND = { + exists = root.faith.religious_head + root.faith.religious_head = { + is_available_healthy_ai_adult = yes + opinion = { + target = root + value > 0 + } + } + } + AND = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_healthy_ai_adult = yes + opinion = { + target = root + value > 0 + } + } + } + } + } + + immediate = { + random_held_county = { + limit = { + faith = { religion_tag = zoroastrianism_religion } + any_county_province = { + has_holding_type = church_holding + } + } + } + + if = { + limit = { + exists = root.faith.religious_head + root.faith.religious_head = { + is_available_healthy_ai_adult = yes + opinion = { + target = root + value > 0 + } + } + } + root.faith.religious_head = { save_scope_as = magi } + } + else = { + cp:councillor_court_chaplain = { save_scope_as = magi } + } + } + + option = { + name = fp3_yearly.8051.a + + scope:magi = { + add_opinion = { + target = root + opinion = 20 + modifier = happy_opinion + } + } + + custom_tooltip = fp3_yearly.8051_chasing_lightning.tt + + hidden_effect = { + random_list = { + 75 = { + trigger_event = { + id = fp3_yearly.8052 + days = { 25 100 } + } + } + 25 = { + trigger_event = { + id = fp3_yearly.8053 + days = { 25 100 } + } + } + } + } + + stress_impact = { + ambitious = medium_stress_impact_loss + content = medium_stress_impact_gain + cynical = medium_stress_impact_gain + lazy = major_stress_impact_gain + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.7 + ai_zeal = 1 + ai_rationality = -1 + } + } + } + + option = { + name = fp3_yearly.8051.b + + remove_short_term_gold = medium_gold_value + + add_piety = medium_piety_gain + + scope:magi = { + add_opinion = { + target = root + opinion = 10 + modifier = pleased_opinion + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.7 + ai_zeal = 1 + ai_rationality = -1 + } + } + } + + option = { + name = fp3_yearly.8051.c + + scope:magi = { + add_opinion = { + target = root + opinion = -15 + modifier = disappointed_opinion + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + generous = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.7 + ai_rationality = 0.4 + ai_zeal = -1 + ai_energy = -0.5 + } + } + } +} + + +fp3_yearly.8052 = { + type = character_event + title = fp3_yearly.8052.t + desc = fp3_yearly.8052.desc + theme = faith + + left_portrait = { + character = root + animation = sadness + triggered_animation = { + trigger = { + OR = { + has_trait = temperate + has_trait = patient + has_trait = calm + } + } + animation = stress + } + } + + + override_background = { reference = wilderness } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + } + + option = { + name = fp3_yearly.8052.a + + flavor = fp3_give_up_the_quest.flavor + + remove_short_term_gold = medium_gold_value + + add_piety = medium_piety_gain + + stress_impact = { + base = medium_stress_gain + patient = minor_stress_impact_loss + impatient = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_zeal = 0.5 + ai_boldness = 0.5 + ai_rationality = -1 + } + } + } + + option = { + name = fp3_yearly.8052.b + + flavor = fp3_give_up_the_quest.flavor + + stress_impact = { + impatient = minor_stress_impact_loss + lazy = minor_stress_impact_loss + content = minor_stress_impact_loss + ambitious = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_zeal = 0.5 + ai_boldness = -0.5 + ai_rationality = 1 + } + } + } +} + +fp3_yearly.8053 = { + type = character_event + title = fp3_yearly.8053.t + desc = fp3_yearly.8053.desc + theme = faith + + left_portrait = { + character = root + animation = lantern + triggered_animation = { + trigger = { + OR = { + has_trait = zealous + has_trait = ambitious + has_trait = calm + } + } + animation = disbelief + } + } + + + override_background = { reference = wilderness } + + trigger = { + + is_available = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + } + + option = { + name = fp3_yearly.8053.a + + add_character_modifier = { + modifier = fp3_blessed_by_fire_modifier + years = 15 + } + + stress_impact = { + base = medium_stress_loss + zealous = minor_stress_impact_loss + humble = minor_stress_impact_loss + trusting = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + + + + + + diff --git a/N3OW/events/dlc/fp3/fp3_frontier_story_cycle.txt b/N3OW/events/dlc/fp3/fp3_frontier_story_cycle.txt new file mode 100644 index 00000000..64a492bc --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_frontier_story_cycle.txt @@ -0,0 +1,2056 @@ +namespace = fp3_frontier_story_cycle + +fp3_frontier_story_cycle.0001 = { + type = letter_event + opening = fp3_frontier_story_cycle.0001_opening + desc = fp3_frontier_story_cycle.0001_letter + sender = scope:upset_vassal + + trigger = { + + NOR = { + has_character_flag = had_event_fp3_frontier_story_cycle.0001 + has_character_flag = had_event_fp3_frontier_story_cycle.0002 + } + + exists = scope:story.var:upset_vassal + + exists = scope:story.var:turkic_leader + + scope:story = { + var:upset_vassal = { + is_alive = yes + is_imprisoned = no + NOT = { + has_trait = forgiving + } + } + } + } + + immediate = { + + add_character_flag = { + flag = had_event_fp3_frontier_story_cycle.0001 + } + scope:story = { + var:upset_vassal = { + save_scope_as = upset_vassal + } + var:turkic_leader = { + save_scope_as = turkic_leader + } + } + } + + option = { + name = fp3_frontier_story_cycle.0001.a + + custom_tooltip = children_arriving_shortly.tt + + trigger_event = { + id = fp3_frontier_story_cycle.0004 + days = { 5 30 } + } + } +} + +fp3_frontier_story_cycle.0002 = { + type = letter_event + opening = fp3_frontier_story_cycle.0002_opening + desc = fp3_frontier_story_cycle.0002_letter + sender = scope:upset_vassal + + trigger = { + + NOT = { has_character_flag = had_event_fp3_frontier_story_cycle.0002 } + + + exists = scope:story.var:upset_vassal + + exists = scope:story.var:nomads_county + + scope:story = { + var:upset_vassal = { + is_alive = yes + is_imprisoned = no + is_vassal_of = root + NOT = { has_relation_rival = root } + OR = { + ai_vengefulness < medium_positive_ai_value + has_trait = craven + has_trait = forgiving + root = { + has_dread_level_towards = { + target = scope:story.var:upset_vassal + level = 2 + } + } + } + } + var:nomads_county = { + NOT = { has_county_modifier = fp3_nomad_friction_county_modifier } + } + } + } + + immediate = { + + add_character_flag = { + flag = had_event_fp3_frontier_story_cycle.0002 + } + scope:story = { + var:upset_vassal = { + save_scope_as = upset_vassal + } + var:nomads_county = { + save_scope_as = nomads_county + } + } + + scope:upset_vassal = { + pay_short_term_gold = { + gold = 50 + target = root + } + } + } + + option = { + name = fp3_frontier_story_cycle.0002.a + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = grateful_opinion + } + } + + stress_impact = { + forgiving = medium_stress_impact_loss + vengeful = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_honor = 0.7 + ai_greed = 0.5 + ai_compassion = 0.7 + } + } + } + + + option = { + name = fp3_frontier_story_cycle.0002.b + + pay_short_term_gold = { + gold = 50 + target = scope:upset_vassal + } + + add_dread = minor_dread_gain + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = -20 + modifier = scared_opinion + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_greed = -0.5 + ai_compassion = -0.5 + } + } + } +} + +fp3_frontier_story_cycle.0003 = { #Nomads story cycle + type = character_event + title = fp3_frontier_story_cycle.0003.t + desc = { + desc = fp3_frontier_story_cycle.0003_beginning + first_valid = { + triggered_desc = { + trigger = { + has_religion = religion:islam_religion + } + desc = fp3_frontier_story_cycle.0003_jizya + } + desc = fp3_frontier_story_cycle.0003_not_jizya + } + desc = fp3_frontier_story_cycle.0003_ending + } + + theme = vassal + left_portrait = { + character = scope:turkic_leader + animation = dismissal + } + right_portrait = { + character = scope:greedy_chaplain + animation = personality_dishonorable + triggered_animation = { + trigger = { + ai_greed > medium_positive_ai_value + } + animation = personality_greedy + } + } + lower_left_portrait = { + character = root + } + + trigger = { + #standard checks + is_available_adult = yes + NOT = { has_character_flag = had_event_fp3_frontier_story_cycle.0003 } + #event fluff triggers + faith = { + NOR = { + has_doctrine_parameter = unreformed + has_doctrine = pagan_hostility_doctrine + } + } + any_held_title = { is_head_of_faith = no } + exists = scope:story.var:turkic_leader + exists = scope:story.var:nomads_new_county + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + NOT = { has_trait = generous } + is_ai = yes + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = greedy_chaplain } + add_character_flag = { + flag = had_event_fp3_frontier_story_cycle.0003 + } + scope:story = { + var:turkic_leader = { + save_scope_as = turkic_leader + } + var:nomads_new_county = { + save_scope_as = nomads_new_county + } + } + } + + option = { + name = fp3_frontier_story_cycle.0003.a + trigger = { + OR = { + has_trait = greedy + has_trait = arbitrary + gold < 0 + } + } + if = { + limit = { + faith = { has_doctrine = doctrine_theocracy_temporal } + } + add_treasury_or_gold = medium_treasury_or_gold_value + scope:greedy_chaplain = { add_treasury_or_gold = major_treasury_or_gold_value } + } + else = { add_treasury_or_gold = major_treasury_or_gold_value } + if = { + limit = { + scope:turkic_leader = { + NOT = { + has_relation_rival = root + has_relation_nemesis = root + } + } + } + root = { + progress_towards_rival_effect = { + CHARACTER = scope:turkic_leader + REASON = rival_brutal_taxation + OPINION = -20 + } + } + } + else = { + scope:turkic_leader = { + add_opinion = { + target = root + opinion = -40 + modifier = hate_opinion + } + } + } + scope:nomads_new_county = { + add_county_modifier = { + modifier = fp3_resentful_nomads_county_modifier + years = 20 + } + } + stress_impact = { + generous = medium_stress_impact_gain + just = medium_stress_impact_gain + humble = medium_stress_impact_gain + arrogant = minor_stress_impact_loss + greedy = major_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 1 + ai_greed = 1 + ai_compassion = -0.5 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0003.b + + if = { + limit = { + faith = { has_doctrine = doctrine_theocracy_temporal } + } + add_treasury_or_gold = minor_treasury_or_gold_value + scope:greedy_chaplain = { add_treasury_or_gold = medium_treasury_or_gold_value } + } + else = { add_treasury_or_gold = medium_treasury_or_gold_value } + + scope:turkic_leader = { + add_opinion = { + target = root + opinion = -20 + modifier = fp3_resentful_opinion + } + } + + random = { + chance = 50 + send_interface_toast = { + left_icon = root + right_icon = scope:turkic_leader + title = resentful_nomads.toast + + scope:nomads_new_county = { + add_county_modifier = { + modifier = fp3_resentful_nomads_county_modifier + years = 20 + } + } + } + } + + stress_impact = { + generous = medium_stress_impact_gain + just = minor_stress_impact_gain + cynical = minor_stress_impact_gain + arbitrary = minor_stress_impact_loss + greedy = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_greed = 1 + ai_compassion = -0.3 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0003.c + + + scope:greedy_chaplain = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + add_hook = { + type = favor_hook + target = scope:turkic_leader + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.7 + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } +} + + +fp3_frontier_story_cycle.0004 = { #Nomads story cycle + type = character_event + title = fp3_frontier_story_cycle.0004.t + desc = fp3_frontier_story_cycle.0004.desc + theme = bastardy + left_portrait = { + character = scope:orphan_girl + animation = worry + } + right_portrait = { + character = scope:orphan_boy + animation = sick + } + lower_left_portrait = { + character = root + } + lower_center_portrait = { + character = scope:upset_vassal + } + lower_right_portrait = { + character = scope:turkic_leader + } + + trigger = { + + #event fluff triggers + + exists = scope:story.var:turkic_leader + + exists = scope:story.var:upset_vassal + } + + immediate = { + + scope:story = { + var:turkic_leader = { + save_scope_as = turkic_leader + } + var:upset_vassal = { + save_scope_as = upset_vassal + } + } + + create_character = { + age = { 35 40 } + gender = male + dynasty = none + faith = scope:upset_vassal.faith + culture = scope:upset_vassal.culture + location = scope:upset_vassal.capital_province + template = peasant_character + save_scope_as = orphan_baby_daddy + + after_creation = { + death = { + death_reason = death_starved + } + } + } + + create_character = { + age = { 30 33 } + gender = female + dynasty = none + faith = scope:upset_vassal.faith + culture = scope:upset_vassal.culture + location = scope:upset_vassal.capital_province + template = peasant_character + save_scope_as = orphan_baby_momma + + after_creation = { + death = { + death_reason = death_starved + } + } + } + + create_character = { + age = { 11 13 } + gender = female + dynasty = none + father = scope:orphan_baby_daddy + mother = scope:orphan_baby_momma + faith = scope:upset_vassal.faith + culture = scope:upset_vassal.culture + location = root.capital_province + template = fp3_adorable_orphan + save_scope_as = orphan_girl + } + + create_character = { + age = { 6 8 } + gender = male + dynasty = none + father = scope:orphan_baby_daddy + mother = scope:orphan_baby_momma + faith = scope:upset_vassal.faith + culture = scope:upset_vassal.culture + location = root.capital_province + template = fp3_adorable_orphan + save_scope_as = orphan_boy + + after_creation = { + increase_wounds_effect = { REASON = attacked } + } + } + } + + option = { + name = fp3_frontier_story_cycle.0004.a + flavor = fp3_pay_for_upkeep_flavor + + add_courtier = scope:orphan_girl + add_courtier = scope:orphan_boy + + remove_short_term_gold = minor_gold_value + + hidden_effect = { + reverse_add_opinion = { + target = scope:orphan_girl + modifier = grateful_opinion + opinion = 30 + } + add_hook = { + target = scope:orphan_girl + type = loyalty_hook + } + reverse_add_opinion = { + target = scope:orphan_boy + modifier = grateful_opinion + opinion = 30 + } + add_hook = { + target = scope:orphan_boy + type = loyalty_hook + } + } + + if = { + limit = { + faith = { + OR = { + trait_is_virtue = compassionate + trait_is_virtue = generous + } + } + } + add_piety = medium_piety_gain + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + ambitious = minor_stress_impact_loss #You can mold them to awesomeness + compassionate = massive_stress_impact_loss #Yay, a kid! + gregarious = medium_stress_impact_loss #The more the merrier! + arrogant = medium_stress_impact_gain #why would I? + callous = major_stress_impact_gain #ew, no + paranoid = major_stress_impact_gain #wat, no more strangers in my court + } + ai_chance = { + base = 30 + modifier = { + add = 50 + has_trait = generous + } + modifier = { + add = 50 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -20 + has_trait = paranoid + } + modifier = { + add = -100 + has_trait = callous + } + modifier = { + add = -100 + has_trait = arrogant + } + } + } + + option = { + name = fp3_frontier_story_cycle.0004.b + + #One shiny new child for you! + scope:turkic_leader = { + if = { + limit = { is_female = yes } + scope:orphan_girl = { set_mother = scope:turkic_leader } + scope:orphan_boy = { set_mother = scope:turkic_leader } + } + else = { + scope:orphan_girl = { set_father = scope:turkic_leader } + scope:orphan_boy = { set_father = scope:turkic_leader } + } + } + + if = { + limit = { + scope:turkic_leader = { + OR = { + has_relation_friend = root + ai_boldness < low_positive_ai_value + ai_compassion > medium_positive_ai_value + } + } + } + scope:turkic_leader = { + add_opinion = { + target = root + opinion = -20 + modifier = unfair_expectations_opinion + } + } + } + else = { + scope:turkic_leader = { + add_opinion = { + target = root + opinion = -40 + modifier = fp3_unjust_burden_opinion + } + } + } + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + hidden_effect = { + #We take care of the sundries in a hidden effect so as not to put too much into the tooltip. + scope:orphan_girl = { + set_house = scope:turkic_leader.house + add_trait = disputed_heritage + } + scope:orphan_boy = { + set_house = scope:turkic_leader.house + add_trait = disputed_heritage + } + add_courtier = scope:orphan_girl + add_courtier = scope:orphan_boy + + #And they're pretty happy about being stepping up in life. + reverse_add_opinion = { + target = scope:orphan_girl + modifier = grateful_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:orphan_boy + modifier = grateful_opinion + opinion = 30 + } + scope:turkic_leader = { + every_consort = { + custom = custom.every_opposite_sex_consort + limit = { + sex_opposite_of = scope:turkic_leader + } + add_opinion = { + modifier = ep1_disagreed_with_lowborn_adoption_opinion + target = scope:turkic_leader + opinion = -60 + } + } + } + } + + + stress_impact = { + vengeful = minor_stress_impact_loss + lazy = medium_stress_impact_loss + just = medium_stress_impact_loss #the accusations might be true, after all? + trusting = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { #Weight up for stress. + add = 20 + has_trait = just + } + modifier = { + add = 50 + has_trait = craven + } + modifier = { #Weight down for stress. + add = -20 + has_trait = trusting + } + modifier = { #We favour the other trait specific options for callous & sadistic + add = -100 + has_trait = callous + } + } + } + + option = { + name = fp3_frontier_story_cycle.0004.c + flavor = fp3_pay_for_upkeep_flavor + + + trigger = { + OR = { + faith = { + has_doctrine = tenet_monasticism + } + has_religion = religion:buddhism_religion #far from all buddhist religions have monastics, but this option would still make sense + } + } + + remove_short_term_gold = minor_gold_value + + if = { + limit = { + faith = { + OR = { + trait_is_virtue = compassionate + trait_is_virtue = generous + } + } + } + add_piety = major_piety_gain + } + else = { + add_prestige = medium_piety_gain + } + + scope:orphan_girl = { + select_and_move_to_pool_effect = yes + add_trait = devoted + } + scope:orphan_boy = { + select_and_move_to_pool_effect = yes + add_trait = devoted + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.9 + ai_rationality = 0.5 + ai_compassion = -0.5 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0004.d + + if = { + limit = { + faith = { + OR = { + trait_is_virtue = compassionate + trait_is_virtue = generous + } + } + } + add_piety = minor_piety_loss + } + + scope:orphan_girl = { + select_and_move_to_pool_effect = yes + } + scope:orphan_boy = { + select_and_move_to_pool_effect = yes + } + + stress_impact = { #many chances for stress loss here, to make this "opting out" option potentially more worthwile + compassionate = major_stress_impact_gain + generous = major_stress_impact_gain + callous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + cynical = medium_stress_impact_loss + lazy = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.3 + ai_compassion = -0.9 + } + } + } +} + + +fp3_frontier_story_cycle.0005 = { #Nomads story cycle + type = character_event + title = fp3_frontier_story_cycle.0005.t + desc = fp3_frontier_story_cycle.0005.desc + theme = war + left_portrait = { + character = scope:turkic_leader + animation = war_over_loss + triggered_animation = { + trigger = { + ai_boldness > medium_positive_ai_value + } + animation = personality_bold + } + } + right_portrait = { + character = root + animation = stress + triggered_animation = { + trigger = { + OR = { + has_trait = brave + has_trait = wrathful + has_trait = vengeful + has_trait = organizer + has_trait = strategist + } + } + animation = scheme + } + } + + + trigger = { + + #event fluff triggers + + NOT = { has_character_flag = had_event_fp3_frontier_story_cycle.0005 } + + exists = scope:story.var:turkic_leader + + NOT = { + scope:story.var:turkic_leader = { has_hook = root } + } + + is_at_war = yes + } + + immediate = { + + add_character_flag = { + flag = had_event_fp3_frontier_story_cycle.0005 + } + + scope:story = { + var:turkic_leader = { + save_scope_as = turkic_leader + } + } + } + + option = { + name = fp3_frontier_story_cycle.0005.a + + scope:turkic_leader = { + add_hook = { + type = favor_hook + target = root + } + } + + scope:turkic_leader = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + spawn_army = { + men_at_arms = { + type = horse_archers + stacks = 2 + } + location = root.capital_province + war_keep_on_attacker_victory = no + uses_supply = yes + inheritable = no + save_scope_as = new_horsemen_army + name = turkic_tribal_event_troops + } + + stress_impact = { + craven = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.7 + ai_sociability = 0.2 + ai_vengefulness = -0.5 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0005.b + + trigger = { + OR = { + has_trait = arrogant + has_trait = callous + has_trait = wrathful + has_trait = stubborn + } + } + + scope:turkic_leader = { + add_opinion = { + target = root + opinion = -40 + modifier = hurt_opinion + } + } + + stress_impact = { + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0005.c + + scope:turkic_leader = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + craven = medium_stress_impact_gain + trusting = medium_stress_impact_gain + paranoid = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } +} + +scripted_trigger suitable_one_eyed_child_trigger = { + NOT = { has_trait = wounded_3 } + OR = { + has_trait = rowdy + has_trait = curious + } + age >= 6 + is_adult = no + is_courtier_of = root + is_available = yes + NOR = { + has_trait = blind + has_trait = one_eyed + } +} + +fp3_frontier_story_cycle.0006 = { #Nomads story cycle + type = character_event + title = fp3_frontier_story_cycle.0006.t + desc = { + desc = fp3_frontier_story_cycle.0006_beginning + first_valid = { + triggered_desc = { + trigger = { + exists = scope:scoped_physician + } + desc = fp3_frontier_story_cycle.0006_has_court_physician + } + desc = fp3_frontier_story_cycle.0006_no_court_physician + } + desc = fp3_frontier_story_cycle.0006_ending + } + theme = family + left_portrait = { + character = scope:turkic_leader + animation = beg + triggered_animation = { + trigger = { + ai_boldness > medium_positive_ai_value + } + animation = worry + } + } + right_portrait = { + character = scope:one_eyed_child + animation = sadness + triggered_animation = { + trigger = { + ai_vengefulness > medium_positive_ai_value + } + animation = personality_vengeful + } + } + lower_left_portrait = root + + lower_right_portrait = scope:scoped_physician #this is your court physician if you have one + + + trigger = { + + #event fluff triggers + + NOT = { has_character_flag = had_event_fp3_frontier_story_cycle.0006 } + + exists = scope:story.var:turkic_leader + + any_close_family_member = { suitable_one_eyed_child_trigger = yes } + } + + immediate = { + + add_character_flag = { + flag = had_event_fp3_frontier_story_cycle.0006 + } + + scope:story = { + var:turkic_leader = { + save_scope_as = turkic_leader + } + } + + random_close_family_member = { + limit = { + suitable_one_eyed_child_trigger = yes + is_primary_heir_of = root + } + alternative_limit = { + suitable_one_eyed_child_trigger = yes + is_child_of = root + } + alternative_limit = { + suitable_one_eyed_child_trigger = yes + } + save_scope_as = one_eyed_child + } + + scope:one_eyed_child = { + increase_wounds_effect = { REASON = archery_accident } + add_trait = one_eyed + add_character_flag = { flag = had_event_fp3_frontier_story_cycle.0006 } #this is to make sure that the child cannot trigger this event themselves in the unlikely case that they become the story_owner of the same story cycle in the future, since it'd feel too weird + } + + if = { #if you have a court physician, he has a stake in this! + limit = { + court_physician_available_trigger = yes + } + save_court_physician_as_effect = { SCOPE_NAME = scoped_physician } + } + } + + option = { + name = fp3_frontier_story_cycle.0006.a + + add_dread = medium_dread_gain + + scope:turkic_leader = { + imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + if = { + limit = { + scope:one_eyed_child = { + ai_vengefulness > low_positive_ai_value + } + } + scope:one_eyed_child = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + if = { + limit = { + NOT = { has_trait = vengeful } + number_of_personality_traits < personality_trait_limit + root = { is_ai = no } + } + random = { + chance = 25 + add_trait = vengeful + } + } + } + } + else = { + scope:one_eyed_child = { + add_opinion = { + target = root + opinion = -10 + modifier = fp3_mildly_terrified_opinion + } + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + forgiving = major_stress_impact_gain + calm = minor_stress_impact_gain + trusting = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + ai_rationality = 0.2 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0006.b + + add_prestige = medium_prestige_gain + + add_character_modifier = { + modifier = fp3_banning_archery_modifier + } + + scope:turkic_leader = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + if = { + limit = { exists = scope:scoped_physician } + scope:scoped_physician = { + add_opinion = { + target = root + opinion = 30 + modifier = took_my_advice_opinion + } + } + } + + if = { + limit = { + scope:one_eyed_child = { + ai_vengefulness > medium_positive_ai_value + } + } + scope:one_eyed_child = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + if = { + limit = { + NOT = { has_trait = vengeful } + number_of_personality_traits < personality_trait_limit + root = { is_ai = no } + } + random = { + chance = 25 + add_trait = vengeful + } + } + } + } + else = { + scope:one_eyed_child = { + add_opinion = { + target = root + opinion = 20 + modifier = relieved_opinion + } + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + craven = medium_stress_impact_gain + trusting = medium_stress_impact_gain + paranoid = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0006.c + + scope:turkic_leader = { + add_opinion = { + target = root + opinion = 20 + modifier = grateful_opinion + } + } + + if = { + limit = { + scope:one_eyed_child = { + ai_vengefulness > medium_positive_ai_value + } + } + scope:one_eyed_child = { + add_opinion = { + target = scope:turkic_leader + opinion = -30 + modifier = hate_opinion + } + add_opinion = { + target = root + opinion = -20 + modifier = hurt_opinion + } + if = { + limit = { + NOT = { has_trait = vengeful } + number_of_personality_traits < personality_trait_limit + root = { is_ai = no } + } + random = { + chance = 50 + add_trait = vengeful + } + } + } + } + else = { + scope:one_eyed_child = { + add_opinion = { + target = root + opinion = -10 + modifier = neglected_opinion + } + } + } + + stress_impact = { + humble = medium_stress_impact_loss + vengeful = major_stress_impact_gain + wrathful = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + cynical = minor_stress_impact_gain + + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_compassion = 0.5 + } + } + } +} + +scripted_trigger suitable_turk_rival_councillor_trigger = { + is_ai = yes + NOT = { + has_trait = craven + } + opinion = { + target = scope:story.var:turkic_leader + value < 0 + } +} + +scripted_trigger bandit_infested_county_trigger = { + NOR = { + has_county_modifier = fp3_nomad_friction_county_modifier + has_county_modifier = fp3_vengeful_nomads_county_modifier + this = scope:story.var:nomads_new_county + } +} + + +fp3_frontier_story_cycle.0007 = { #Nomads story cycle + type = character_event + title = fp3_frontier_story_cycle.0007.t + desc = fp3_frontier_story_cycle.0007.desc + theme = realm + left_portrait = { + character = scope:turkic_leader + animation = personality_bold + triggered_animation = { + trigger = { + ai_greed > medium_positive_ai_value + } + animation = personality_callous + } + } + right_portrait = { + character = scope:warmonger_councillor + animation = personality_bold + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = wrathful + has_trait = vengeful + has_trait = organizer + has_trait = strategist + } + } + animation = disapproval + } + } + + trigger = { + + #event fluff triggers + + NOT = { has_character_flag = had_event_fp3_frontier_story_cycle.0007 } + + exists = scope:story.var:turkic_leader + + scope:story.var:turkic_leader = { + NOR = { + has_trait = content + has_trait = lazy + } + } + + any_councillor = { suitable_turk_rival_councillor_trigger = yes } + + any_held_county = { bandit_infested_county_trigger = yes } + } + + immediate = { + + add_character_flag = { + flag = had_event_fp3_frontier_story_cycle.0007 + } + + scope:story = { + var:turkic_leader = { + save_scope_as = turkic_leader + } + } + + random_councillor = { + limit = { + suitable_turk_rival_councillor_trigger = yes + has_council_position = councillor_marshal + } + alternative_limit = { + suitable_turk_rival_councillor_trigger = yes + has_lifestyle = martial_lifestyle + } + alternative_limit = { + suitable_turk_rival_councillor_trigger = yes + OR = { + has_trait = ambitious + ai_boldness >= high_positive_ai_value + } + } + alternative_limit = { + suitable_turk_rival_councillor_trigger = yes + opinion = { + target = scope:turkic_leader + value < -25 + } + } + alternative_limit = { suitable_turk_rival_councillor_trigger = yes } + save_scope_as = warmonger_councillor + } + + random_held_county = { + limit = { #finding the most suitable county for the story! + bandit_infested_county_trigger = yes + has_county_corruption_trigger = yes + } + alternative_limit = { + bandit_infested_county_trigger = yes + county_control < medium_county_control + } + alternative_limit = { + bandit_infested_county_trigger = yes + county_control < full_county_control + any_county_province = { geographical_region = dlc_fp3_eastern_persian_frontier_regions } + } + alternative_limit = { + bandit_infested_county_trigger = yes + any_county_province = { geographical_region = dlc_fp3_eastern_persian_frontier_regions } + } + alternative_limit = { + bandit_infested_county_trigger = yes + county_control < full_county_control + } + alternative_limit = { + bandit_infested_county_trigger = yes + } + save_scope_as = bandits_county + } + + scope:bandits_county = { + add_county_modifier = { + modifier = fp3_nomad_attacks_county_modifier + years = 20 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0007.a + + scope:bandits_county = { + add_county_modifier = { + modifier = fp3_nomad_friction_county_modifier + years = 30 + } + } + + scope:bandits_county = { + remove_county_modifier = fp3_nomad_attacks_county_modifier + add_county_modifier = { + modifier = fp3_silk_road_secure_county_modifier + years = 40 + } + } + + scope:turkic_leader = { + add_opinion = { + target = root + opinion = 30 + modifier = fp3_supports_my_tribe_opinion + } + } + + scope:warmonger_councillor = { + add_opinion = { + target = root + opinion = -20 + modifier = ignored_opinion + } + } + + stress_impact = { + ambitious = medium_stress_impact_loss + content = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.6 + ai_boldness = 1 + ai_compassion = -0.2 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0007.b + + scope:warmonger_councillor = { + add_opinion = { + target = root + opinion = 20 + modifier = trusted_me_opinion + } + } + + scope:turkic_leader = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + scope:warmonger_councillor = { + duel = { + skill = martial + value = high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + custom_tooltip = fp3_investigating_attacks_successful + send_interface_toast = { + title = fp3_investigating_attacks_toast_successful + left_icon = scope:warmonger_councillor + + scope:bandits_county = { + remove_county_modifier = fp3_nomad_attacks_county_modifier + } + + scope:warmonger_councillor = { + add_martial_skill = 1 + add_intrigue_skill = 1 + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + custom_tooltip = fp3_investigating_attacks_dismal_failure + send_interface_toast = { + title = fp3_investigating_attacks_toast_dismal_failure + left_icon = scope:possibly_capable_marshal + + scope:warmonger_councillor = { + add_character_modifier = { + modifier = fp3_crushed_by_failure_modifier + years = 20 + } + } + } + } + } + } + } + + stress_impact = { + trusting = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_compassion = 0.5 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0007.c + + random = { + chance = 25 + send_interface_toast = { + left_icon = root + title = attacks_abated.toast + + scope:bandits_county = { + remove_county_modifier = fp3_nomad_attacks_county_modifier + } + } + } + + stress_impact = { + content = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + just = medium_stress_impact_gain + impatient = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + + +fp3_frontier_story_cycle.0099 = { #Nomads story cycle + type = character_event + title = fp3_frontier_story_cycle.0099.t + desc = fp3_frontier_story_cycle.0099.desc + theme = realm + left_portrait = { + character = scope:turkic_leader + animation = marshal + triggered_animation = { + trigger = { + ai_greed > medium_positive_ai_value + } + animation = schadenfreude + } + } + right_portrait = { + character = root + animation = personality_rational + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + has_trait = shy + } + } + animation = disbelief + } + triggered_animation = { + trigger = { + OR = { + has_trait = greedy + has_trait = stubborn + has_trait = callous + } + } + animation = personality_cynical + } + } + + trigger = { + + exists = scope:story.var:turkic_leader + + scope:story.var:turkic_leader = { is_landed = no } + + has_character_flag = turkic_tribe_story_end + + any_held_title = { + title_tier = county + is_landless_type_title = no + this != root.capital_county + } + + domain_size > 4 + } + + immediate = { + + scope:story = { + var:turkic_leader = { + save_scope_as = turkic_leader + } + } + + random_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + this != root.capital_county + has_county_modifier = fp3_nomad_friction_county_modifier + } + alternative_limit = { + is_landless_type_title = no + this != root.capital_county + development_level <= bad_development_level + } + alternative_limit = { + is_landless_type_title = no + this != root.capital_county + development_level <= medium_development_level + } + alternative_limit = { + is_landless_type_title = no + this != root.capital_county + } + save_scope_as = title_to_grant + } + + if = { + limit = { + any_held_title = { + title_tier = county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + } + } + } + random_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + } + has_county_modifier = fp3_nomad_friction_county_modifier + } + alternative_limit = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + } + development_level <= bad_development_level + } + alternative_limit = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + } + development_level <= medium_development_level + } + alternative_limit = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + } + } + save_scope_as = extra_title_to_grant + } + } + + if = { + limit = { + any_held_title = { + title_tier = county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + this = scope:extra_title_to_grant + } + } + } + random_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + this = scope:extra_title_to_grant + } + has_county_modifier = fp3_nomad_friction_county_modifier + } + alternative_limit = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + this = scope:extra_title_to_grant + } + development_level <= bad_development_level + } + alternative_limit = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + this = scope:extra_title_to_grant + } + development_level <= medium_development_level + } + alternative_limit = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = scope:title_to_grant + this = scope:extra_title_to_grant + } + } + save_scope_as = extra_extra_title_to_grant + } + } + } + + option = { + name = fp3_frontier_story_cycle.0099.a + + dynasty = { + add_dynasty_modifier = { + modifier = fp3_nomad_recruits_modifier + years = 150 + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + scope:title_to_grant = { + change_title_holder = { + holder = scope:turkic_leader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + if = { + limit = { + NOT = { has_relation_friend = scope:turkic_leader } + } + progress_towards_friend_effect = { + REASON = friend_landed + CHARACTER = scope:turkic_leader + OPINION = default_friend_opinion + } + } + else = { + scope:turkic_leader = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 30 + } + } + } + stress_impact = { + generous = major_stress_impact_loss + trusting = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + greedy = massive_stress_impact_gain + } + + ai_chance = { + base = 100 #the dynasty modifier is intended to be pretty good, so the AI could feasibly do this + ai_value_modifier = { + ai_greed = -1 + ai_vengefulness = -0.5 + ai_rationality = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0099.b + + trigger = { + exists = scope:extra_title_to_grant + } + + dynasty = { + add_dynasty_modifier = { + modifier = fp3_nomad_recruits_modifier + years = 150 + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + scope:extra_title_to_grant = { + change_title_holder = { + holder = scope:turkic_leader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + if = { + limit = { + NOT = { has_relation_friend = scope:turkic_leader } + } + progress_towards_friend_effect = { + REASON = friend_landed + CHARACTER = scope:turkic_leader + OPINION = default_friend_opinion + } + } + else = { + scope:turkic_leader = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 30 + } + } + } + stress_impact = { + generous = major_stress_impact_loss + trusting = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + greedy = massive_stress_impact_gain + } + + ai_chance = { + base = 100 #the dynasty modifier is intended to be pretty good, so the AI could feasibly do this + ai_value_modifier = { + ai_greed = -1 + ai_vengefulness = -0.5 + ai_rationality = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0099.c + + trigger = { + exists = scope:extra_extra_title_to_grant + } + + dynasty = { + add_dynasty_modifier = { + modifier = fp3_nomad_recruits_modifier + years = 150 + } + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + scope:extra_extra_title_to_grant = { + change_title_holder = { + holder = scope:turkic_leader + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + if = { + limit = { + NOT = { has_relation_friend = scope:turkic_leader } + } + progress_towards_friend_effect = { + REASON = friend_landed + CHARACTER = scope:turkic_leader + OPINION = default_friend_opinion + } + } + else = { + scope:turkic_leader = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 30 + } + } + } + stress_impact = { + generous = major_stress_impact_loss + trusting = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + greedy = massive_stress_impact_gain + } + + ai_chance = { + base = 100 #the dynasty modifier is intended to be pretty good, so the AI could feasibly do this + ai_value_modifier = { + ai_greed = -1 + ai_vengefulness = -0.5 + ai_rationality = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { + name = fp3_frontier_story_cycle.0099.d + + scope:turkic_leader = { + add_opinion = { + target = root + modifier = spurned_opinion + opinion = -40 + } + } + + if = { + limit = { is_ai = yes } + scope:turkic_leader = { + silent_disappearance_effect = yes + } + } + else = { + scope:turkic_leader = { + select_and_move_to_pool_effect = yes + } + } + + every_sub_realm_county = { + if = { + limit = { has_county_modifier = fp3_nomad_friction_county_modifier } + remove_county_modifier = fp3_nomad_friction_county_modifier + } + } + + every_sub_realm_county = { + if = { + limit = { has_county_modifier = fp3_vengeful_nomads_county_modifier } + remove_county_modifier = fp3_vengeful_nomads_county_modifier + } + } + + stress_impact = { + stubborn = medium_stress_impact_loss + trusting = medium_stress_impact_gain + generous = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 #the dynasty modifier is intended to be pretty good, so the AI could feasibly do this + ai_value_modifier = { + ai_greed = 1 + ai_sociability = -0.5 + ai_boldness = 0.5 + } + } + } +} + + + diff --git a/N3OW/events/dlc/fp3/fp3_heritage_events.txt b/N3OW/events/dlc/fp3/fp3_heritage_events.txt new file mode 100644 index 00000000..274172ca --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_heritage_events.txt @@ -0,0 +1,3505 @@ +namespace = fp3_yearly + +########EVENT INDEX############ +#fp3_yearly.8019 - Refuge of Light, by Ola Jentzsch +#fp3_yearly.8020 - The Lady of the Land, by Ola Jentzsch +#fp3_yearly.8021 - An Acidic Accident (The Road to Disfigurement series), by Ola Jentzsch and Lucas Ribiero + #fp3_yearly.8022 - Vitriolic Visions (follow-up event) + #fp3_yearly.8023 - Corrosive Conundrums (follow-up event) +#fp3_yearly.8024 - The Return to the Sky, by Ola Jentzsch + #fp3_yearly.8025 - The Fourth Morning (follow-up event) + #fp3_yearly.8026 - The Secret Dakhma (follow-up event) +#fp3_yearly.8027 - Nine Hundred Ninety Chapters of Gold + #fp3_yearly.8028 - The Book of Kings (follow-up event) + #fp3_yearly.8029 - A Tale of Old Glory (follow-up event) + #fp3_yearly.8030 - Insulting Letter (letter event, follow-up) + #fp3_yearly.8031 - Grateful Letter (letter event, follow-up) +#fp3_yearly.8032 - The Ten Days of Death, by Ola Jentzsch +#fp3_yearly.8033 - Frozen Delights, by Ola Jentzsch +#fp3_yearly.8034 - The Hephthalite Hoard, by Ola Jentzsch +#fp3_yearly.8035 - The Heart and the Creator, by Ola Jentzsch +#fp3_yearly.8036 - The City of the Mouthless, by Ola Jentzsch + +################################### +# Refuge of Light +# by Ola Jentzsch +################################### +scripted_trigger fp3_hateful_ruler_trigger = { + is_ai = yes + NOR = { + target_is_liege_or_above = root + faith = { has_doctrine = special_doctrine_is_gnostic_faith } + faith = { has_doctrine = doctrine_pluralism_pluralistic } + has_trait = compassionate + has_trait = forgiving + } + OR = { + has_trait = callous + has_trait = wrathful + has_trait = vengeful + has_trait = zealous + has_trait = sadistic + has_trait = paranoid + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + } +} + +fp3_yearly.8019 = { + type = character_event + title = fp3_yearly.8019.t + desc = fp3_yearly.8019.desc + theme = faith + + left_portrait = { + character = root + animation = boredom + } + + right_portrait = { + character = scope:manichean_leader + animation = beg + } + + lower_left_portrait = { + character = scope:hateful_ruler + } + + trigger = { + is_ai = no + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + + + #checking that the premise makes sense + root.capital_province = { + OR = { + geographical_region = world_persian_empire + geographical_region = world_steppe + } + } + NOR = { + has_title = title:k_mesopotamia + has_title = title:k_jazira + } + + #checking for a ruler that would persecute the Manicheans in Mesopotamia. Ideally the caliph, but any ruler would do. + any_independent_ruler = { + in_diplomatic_range = root + any_realm_province = { + OR = { + geographical_region = world_mesopotamia #this is where the Manichean communities were originally concentrated + geographical_region = world_jazira + } + } + fp3_hateful_ruler_trigger = yes + } + + any_held_county = { } + } + + cooldown = { years = 100 } + + immediate = { + + random_independent_ruler = { + limit = { + in_diplomatic_range = root + any_realm_province = { + OR = { + geographical_region = world_mesopotamia + geographical_region = world_jazira + } + } + fp3_hateful_ruler_trigger = yes + } + weight = { #weighting for the most suitable candidate + modifier = { + factor = 40 + any_held_title = { is_head_of_faith = yes } + } + modifier = { + factor = 20 + has_title = title:k_mesopotamia + } + modifier = { + factor = 20 + has_title = title:c_baghdad + } + modifier = { + factor = 20 + has_trait = zealous + } + modifier = { + factor = 40 + has_relation_rival = root + } + } + save_scope_as = hateful_ruler + } + + random_held_county = { + weight = { + modifier = { + factor = 70 + any_county_province = { + barony = { + is_holy_site_of = faith:manichean #This will typically be Samarkand + } + } + } + modifier = { + factor = 50 + faith = faith:manichean + } + modifier = { + factor = 50 + any_county_province = { + geographical_region = dlc_fp3_greater_persian_frontier_regions + } + } + modifier = { + factor = -40 + any_county_province = { + this = root.capital_province + } + } + } + save_scope_as = refuge_of_light + } + + create_character = { #this is the Manichean leader + template = fp3_gnostic_paragon + location = root.capital_province + culture = scope:hateful_ruler.culture + gender_female_chance = { + if = { + limit = { + faith:manichean = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + faith:manichean = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = manichean_leader + } + } + + + option = { #By all means, stay + name = fp3_yearly.8019.a + + scope:manichean_leader = { + add_opinion = { + target = root + opinion = 20 + modifier = grateful_opinion + } + } + + scope:hateful_ruler = { + add_opinion = { + target = root + opinion = -30 + modifier = harbored_a_fugitive_opinion + } + } + + add_courtier = scope:manichean_leader + + scope:refuge_of_light = { + add_county_modifier = { + modifier = fp3_gnostic_fervor_county_modifier + years = 50 + } + } + + add_character_modifier = { + modifier = fp3_rare_books_modifier + years = 25 + } + + ai_chance = { #ambitious and sociable AI goes for this option + base = 10 + ai_value_modifier = { + ai_boldness = 0.8 + ai_greed = 0.5 + ai_honor = 0.6 + ai_sociability = 0.6 + } + } + + stress_impact = { + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + } + + option = { #stay and pay tax + name = fp3_yearly.8019.b + + trigger = { + faith = { + AND = { + OR = { + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + } + NOT = { has_doctrine = special_doctrine_is_gnostic_faith } + } + } + } + + scope:hateful_ruler = { + add_opinion = { + target = root + opinion = -20 + modifier = fp3_harbors_heretics_opinion + } + } + + scope:refuge_of_light = { + add_county_modifier = { + modifier = fp3_gnostic_fervor_county_modifier + years = 50 + } + add_county_modifier = { + modifier = hold_court_8120_tax_modifier + years = 50 + } + } + + #Flag that scope:manichean_leader should leave. + save_scope_as = disappear_manichean + + ai_chance = { #compassionate-greedy AI goes for this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_compassion = 0.8 + ai_greed = 0.5 + } + } + + stress_impact = { + generous = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + } + + option = { #Go where you may + name = fp3_yearly.8019.c + custom_tooltip = manicheans_sent_away.tt + + add_piety = minor_piety_gain + + scope:hateful_ruler = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + ai_chance = { #zealous-cruel AI goes for this option + base = 10 + ai_value_modifier = { + ai_zeal = 0.8 + ai_vengefulness = 0.8 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = major_stress_impact_gain + } + } + + after = { + if = { + limit = { exists = scope:disappear_manichean } + scope:manichean_leader = { silent_disappearance_effect = yes } + } + } +} + + +################################### +# The Lady of the Land +# by Ola Jentzsch +################################### + +scripted_trigger fp3_zealous_caliph_trigger = { + is_ai = yes + NOR = { + is_vassal_of = root + faith = { has_doctrine = doctrine_pluralism_pluralistic } + has_trait = compassionate + has_trait = forgiving + } + OR = { + has_trait = callous + has_trait = wrathful + has_trait = vengeful + has_trait = impatient + has_trait = zealous + has_trait = sadistic + has_trait = paranoid + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + } +} + +scripted_trigger fp3_bibi_shahrbanu_devotee_trigger = { + is_female = yes + top_liege != this + is_available_ai_adult = yes + has_religion = ROOT.religion + NOT = { + has_trait = cynical + } +} + +scripted_trigger fp3_assertive_female_believer_trigger = { + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = vengeful + has_trait = stubborn + has_trait = brave + has_trait = ambitious + } +} + +scripted_trigger fp3_zoroastrian_holy_sites_province_trigger = { + OR = { + is_holy_site_of = faith:mazdayasna + is_holy_site_of = faith:zurvanism + is_holy_site_of = faith:gayomarthianism + is_holy_site_of = faith:khurmazta + is_holy_site_of = faith:khurramism + is_holy_site_of = faith:mazdakism + is_holy_site_of = faith:urartuism + } +} + +fp3_yearly.8020 = { + type = character_event + title = fp3_yearly.8020.t + desc = fp3_yearly.8020.desc + theme = faith + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:pious_woman + animation = paranoia + } + + lower_left_portrait = { + character = scope:righteous_caliph + } + + + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + + #premise checks - we need ROOT's faith to not have been reformed into a matriarchal faith for this historical context + OR = { + has_religion = religion:islam_religion + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + } + + has_game_rule = default_gender_equality #this triggers an error. Suspected code issue. + + NOT = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + + #checking for approppriate county + any_held_county = { + OR = { + this = title:c_rayy + any_county_province = { + barony = { fp3_zoroastrian_holy_sites_province_trigger = yes } + } + } + } + + #checking that we have a HoF with the appropriate interests + faith.religious_head != root + + exists = root.faith.religious_head + + root.faith.religious_head = { + fp3_zealous_caliph_trigger = yes + #checking that his Islam hasn't been reformed into something that'd make the event's premise weird + faith = { + NOT = { + has_doctrine = doctrine_gender_female_dominated + } + } + } + + #checking that we have a spouse or daughter that would fit the scope + OR = { + any_spouse = { + fp3_bibi_shahrbanu_devotee_trigger = yes + } + any_concubine = { + fp3_bibi_shahrbanu_devotee_trigger = yes + } + any_child = { + fp3_bibi_shahrbanu_devotee_trigger = yes + } + any_courtier_or_guest = { + fp3_bibi_shahrbanu_devotee_trigger = yes + has_relation_friend = root + } + } + } + + immediate = { + + + #Saving relevant historical characters and faiths as scopes + character:180638 = { save_scope_as = bibi_shahrbanu } + + character:33912 = { save_scope_as = imam_husayn } + + religion:zoroastrianism_religion = { save_scope_as = anahita_faith } + + #saving the caliph as a scope + root.faith.religious_head = { + if = { + limit = { + fp3_zealous_caliph_trigger = yes + faith = { + NOT = { + has_doctrine = doctrine_gender_female_dominated + } + } + } + } + save_scope_as = righteous_caliph + } + + random_held_county = { + limit = { this = title:c_rayy } + save_scope_as = temple_county + } + + if = { + limit = { + NOT = { exists = scope:temple_county } + } + random_held_county = { + limit = { + any_county_province = { + barony = { fp3_zoroastrian_holy_sites_province_trigger = yes } + } + } + save_scope_as = temple_county + } + } + + #getting the best pious woman for our purposes + if = { + limit = { + any_spouse = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + random_spouse = { + limit = { + fp3_bibi_shahrbanu_devotee_trigger = yes + } + save_scope_as = pious_woman + } + } + else_if = { + limit = { + any_concubine = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + random_concubine = { + limit = { + any_concubine = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + save_scope_as = pious_woman + } + } + else_if = { + limit = { + any_child = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + random_child = { + limit = { + any_child = { fp3_bibi_shahrbanu_devotee_trigger = yes } + } + save_scope_as = pious_woman + } + } + else_if = { + limit = { + any_courtier_or_guest = { + fp3_bibi_shahrbanu_devotee_trigger = yes + has_relation_friend = root + } + } + random_courtier_or_guest = { + limit = { + any_courtier_or_guest = { + fp3_bibi_shahrbanu_devotee_trigger = yes + has_relation_friend = root + } + } + save_scope_as = pious_woman + } + } + } + + cooldown = { years = 100 } + + option = { + name = fp3_yearly.8020.a #triggered option if you like them very very much + + trigger = { + + reverse_opinion = { + target = scope:pious_woman + value >= 30 + } + } + + remove_short_term_gold = minor_gold_value + + scope:pious_woman = { + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + add_opinion = { + target = root + modifier = happy_opinion + opinion = 20 + } + } + else = { + root = { + progress_towards_lover_effect = { + CHARACTER = scope:pious_woman + REASON = lover_sided_with_me_against_hof + OPINION = 20 + } + } + } + } + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + stress_impact = { + callous = major_stress_impact_gain + shy = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 1 + ai_rationality = 1 + ai_compassion = 1 + } + } + } + + option = { + name = fp3_yearly.8020.b + flavor = supporting_womens_faith_flavor + + remove_short_term_gold = medium_gold_value + + scope:temple_county = { + add_county_modifier = { + modifier = fp3_persian_resurgence_county_modifier + years = 50 + } + } + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + scope:pious_woman = { + add_opinion = { + target = root + opinion = 20 + modifier = happy_opinion + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + cynical = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { + name = fp3_yearly.8020.c + + add_piety = major_piety_gain + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + scope:pious_woman = { + if = { + limit = { #if she has a forceful personality, she'll be galvanized in her faith by this + fp3_assertive_female_believer_trigger = yes + } + add_character_modifier = { + modifier = fp3_womens_faith_galvanized_modifier + years = 25 + } + } + else = { #otherwise, she'll just be sad or angry + add_opinion = { + target = root + opinion = -20 + modifier = fp3_persecuted_my_faith_opinion + } + } + } + + hidden_effect = { + custom_tooltip = fp3_sharhabanu_devotees_angry.tt + random_courtier = { #female courtiers might get galvanized too, depending on their personality + if = { + limit = { + fp3_bibi_shahrbanu_devotee_trigger = yes + fp3_assertive_female_believer_trigger = yes + this != scope:pious_woman + } + add_character_modifier = { + modifier = fp3_womens_faith_galvanized_modifier + years = 25 + } + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + content = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } +} + +################################### +# An Acidic Accident (The Path to Disfigurement, part 1) +# by Ola Jentzsch +################################### +scripted_trigger fp3_not_super_relevant_yet_suitable_person_trigger = { + is_ai = yes + is_adult = yes + OR = { + has_lifestyle = learning_lifestyle + learning > 4 + } + NOT = { + is_spouse_of = root + has_relation_friend = root + has_relation_lover = root + is_close_or_extended_family_of = root + has_trait = disfigured + } + NAND = { + is_female = yes + root.faith = { #this is basically checking for Islam, but in a more emergent way. In medieval Islam, it wouldn't generally make sense for a noble woman to work together with a man in the way this event presupposes. + AND = { + has_doctrine = doctrine_gender_male_dominated + has_doctrine = doctrine_polygamy + } + } + } +} + + +fp3_yearly.8021 = { + type = character_event + title = fp3_yearly.8021.t + desc = fp3_yearly.8021.desc + theme = learning_medicine_focus + + left_portrait = { + character = scope:upset_vassal + animation = war_attacker + } + + right_portrait = { + character = scope:enthusiastic_alchemist + animation = beg + } + + lower_left_portrait = { + character = scope:alchemy_enthusiast + } + + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + root.capital_province = { geographical_region = world_persian_empire } + + #checking for a vassal with an appropriate relation + any_powerful_vassal = { + is_ai = yes + NOT = { has_trait = forgiving } + any_close_family_member = { + fp3_not_super_relevant_yet_suitable_person_trigger = yes + } + } + + is_ai = no #in order to not spam disfigured characters and upset vassals, we reserve this event for players only. + } + + cooldown = { years = 100 } + + weight_multiplier = { + base = 0.4 + modifier = { + OR = { + AND = { #for Rhazes + current_year >= 895 + current_year < 935 + } + AND = { #for Avicenna + current_year >= 1000 + current_year < 1040 + } + } + add = 1.6 + } + } + + immediate = { + + random_powerful_vassal = { + limit = { + is_ai = yes + NOT = { has_trait = forgiving } + any_close_family_member = { + fp3_not_super_relevant_yet_suitable_person_trigger = yes + } + } + random_close_family_member = { + limit = { + fp3_not_super_relevant_yet_suitable_person_trigger = yes + } + save_scope_as = alchemy_enthusiast + } + save_scope_as = upset_vassal + } + + if = { #This looks to see if one of two historical alchemists will be used in the event + limit = { #their rough period of activity + AND = { + current_year >= 895 + current_year < 935 + } + NOT = { exists = global_var:rhazes_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_rhazes_template + save_scope_as = enthusiastic_alchemist #this saves him as a scope so we can get nice effects to bounce off him! + after_creation = { add_character_flag = fp3_historical_person_flag } + } + set_global_variable = rhazes_created + } + else_if = { + limit = { #their rough period of activity + AND = { + current_year >= 1000 + current_year < 1040 + } + NOT = { exists = global_var:avicenna_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_avicenna_template + save_scope_as = enthusiastic_alchemist #this saves him as a scope so we can get nice effects to bounce off him! + after_creation = { add_character_flag = fp3_historical_person_flag } + } + set_global_variable = avicenna_created + } + else = { + create_character = { + age = { 32 50 } + location = root.capital_province + template = scholar_character + trait = education_learning_3 + trait = lifestyle_herbalist + trait = lifestyle_physician + random_traits_list = { + count = 3 + ambitious = {} + impatient = {} + cynical = {} + humble = {} + } + random_traits_list = { #for flavor + count = 1 + lunatic_1 = {} + deviant = {} + lifestyle_mystic = {} + hashishiyah = {} + witch = {} + } + culture = scope:alchemy_enthusiast.culture + faith = root.faith + save_scope_as = enthusiastic_alchemist + + after_creation = { + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = yes + LEVEL_3 = no + } + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_mystic + LEVEL_1 = yes + LEVEL_3 = no + } + } + } + } + + scope:alchemy_enthusiast = { + add_trait = disfigured + add_learning_lifestyle_xp = major_lifestyle_experience + + hidden_effect = { + set_relation_rival = { + target = scope:enthusiastic_alchemist + reason = rival_disfigured_me_in_lab + } + } + } + } + + option = { #Please stay and tell me more about this substance + name = fp3_yearly.8021.a + custom_tooltip = fp3_acid_delving_deeper_tooltip + + trigger = { + OR = { + has_lifestyle = learning_lifestyle + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + has_trait = lifestyle_physician + has_character_modifier = inspired_medicine_modifier + has_character_modifier = medical_insights_modifier + has_character_modifier = inspiration_alchemy_condoned_by_church_modifier + } + } + + add_courtier = scope:enthusiastic_alchemist + + scope:upset_vassal = { + if = { + limit = { + NOT = { has_relation_rival = root } + } + root = { + progress_towards_rival_effect = { + CHARACTER = scope:upset_vassal + REASON = rival_disfigured_relative + OPINION = -25 + } + } + } + else = { + add_opinion = { + target = root + opinion = -40 + modifier = hate_opinion + } + } + } + + trigger_event = fp3_yearly.8022 + + stress_impact = { + fickle = minor_stress_impact_loss + vengeful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + option = { #the alchemist is executed + name = fp3_yearly.8021.b + + trigger = { + OR = { + tyranny >= medium_tyranny + dread >= high_dread + has_trait = sadistic + } + } + + add_dread = major_dread_gain + + add_tyranny = minor_tyranny_value + + scope:enthusiastic_alchemist = { + death = { + death_reason = death_execution + killer = root + } + } + + scope:upset_vassal = { + if = { + limit = { + OR = { + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + add_opinion = { + target = root + opinion = 30 + modifier = fp3_admires_resolve_opinion + } + } + else_if = { + limit = { + OR = { + has_trait = compassionate + has_trait = just + } + } + add_opinion = { + target = root + modifier = fp3_went_too_far_opinion + } + } + else = { + add_opinion = { + target = root + opinion = 20 + modifier = avenged_relative_opinion + } + } + } + + scope:alchemy_enthusiast = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + just = major_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + } + + option = { #the alchemist is merely imprisoned + name = fp3_yearly.8021.c + + trigger = { + NOR = { + tyranny >= medium_tyranny + dread >= high_dread + has_trait = sadistic + } + } + + add_dread = minor_dread_gain + + scope:enthusiastic_alchemist = { #the alchemist gets to languish in a dungeon + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = avenged_relative_opinion + } + } + + scope:alchemy_enthusiast = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + stress_impact = { + vengeful = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + } + + option = { + name = fp3_yearly.8021.d + + #Flag that scope:enthusiastic_alchemist should leave. + save_scope_as = disappear_alchemist + + add_prestige = minor_prestige_value + + scope:upset_vassal = { + if = { + limit = { + NOT = { has_relation_rival = root } + } + root = { + progress_towards_rival_effect = { + CHARACTER = scope:upset_vassal + REASON = rival_disfigured_relative + OPINION = -25 + } + } + } + else = { #otherwise, she'll just be sad or angry + add_opinion = { + target = root + opinion = -30 + modifier = vengeful_opinion + } + } + } + + stress_impact = { + vengeful = medium_stress_impact_gain + craven = minor_stress_impact_gain + forgiving = medium_stress_impact_loss + just = medium_stress_impact_loss + } + } + + after = { + if = { + limit = { + OR = { + AND = { + exists = scope:disappear_alchemist + exists = global_var:avicenna_created + scope:enthusiastic_alchemist = { has_character_flag = fp3_historical_person_flag } + } + AND = { + exists = scope:disappear_alchemist + exists = global_var:rhazes_created + scope:enthusiastic_alchemist = { has_character_flag = fp3_historical_person_flag } + } + } + } + scope:enthusiastic_alchemist = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else_if = { + limit = { exists = scope:disappear_alchemist } + scope:enthusiastic_alchemist = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + } +} + +################################### +# Vitriolic Visions (The Path to Disfigurement, part 2) +# by Ola Jentzsch +################################### + +fp3_yearly.8022 = { + type = character_event + title = fp3_yearly.8022.t + desc = fp3_yearly.8022.desc + theme = learning_medicine_focus + + left_portrait = { + character = root + animation = chancellor + } + + right_portrait = { + character = scope:enthusiastic_alchemist + animation = personality_cynical + } + + trigger = { exists = scope:enthusiastic_alchemist } #safety check + + immediate = {} + + option = { #fascinating, let's delve deeper + name = fp3_yearly.8022.a + custom_tooltip = fp3_studying_acid_ominously_tooltip + + trigger_event = fp3_yearly.8023 + + } + + option = { #might it have military uses? + name = fp3_yearly.8022.b + flavor = fp3_yearly.8022.b.flavor + + remove_treasury_or_gold = major_treasury_or_gold_value + + if = { + limit = { + faith = { + OR = { + has_doctrine = tenet_dharmic_pacifism + has_doctrine = tenet_pacifism + } + } + } + add_piety = minor_piety_loss + } + + add_character_modifier = { + modifier = fp3_oil_of_vitriol_modifier + years = 25 + } + + stress_impact = { + compassionate = medium_stress_impact_gain + } + } + + option = { #leave now + name = fp3_yearly.8022.c + flavor = fp3_yearly.8022.c.flavor + + + if = { + limit = { + AND = { + OR = { + exists = global_var:avicenna_created + exists = global_var:rhazes_created + } + scope:enthusiastic_alchemist = { has_character_flag = fp3_historical_person_flag } + } + } + scope:enthusiastic_alchemist = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:enthusiastic_alchemist = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + base = minor_stress_impact_loss + ambitious = medium_stress_impact_gain + } + } +} + +################################### +# Corrosive Conundrums (The Path to Disfigurement, part 3) +# by Ola Jentzsch +################################### + +fp3_yearly.8023 = { + type = character_event + title = fp3_yearly.8023.t + desc = fp3_yearly.8023.desc + theme = learning_medicine_focus + + left_portrait = { + character = root + animation = personality_greedy + } + + right_portrait = { + character = scope:enthusiastic_alchemist + animation = worry + } + + trigger = { exists = scope:enthusiastic_alchemist } #safety check + + immediate = {} + + option = { #I have come this far + name = fp3_yearly.8023.a + + + flavor = fp3_horrible_accident.flavor + if = { + limit = { + NOT = { has_trait = disfigured } + } + random = { + chance = 10 + add_trait = disfigured + } + } + + duel = { + skill = learning + value = high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = experimenting_with_acid_toast.success + left_icon = root + + add_character_modifier = { + modifier = fp3_alchemical_insights_modifier + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = experimenting_with_acid_toast.failure + left_icon = root + add_character_modifier = { + modifier = fp3_dabbling_in_alchemy_modifier + years = 25 + } + } + } + } + } + } + + option = { #At least I learned something + name = fp3_yearly.8023.b + + add_learning_lifestyle_xp = major_lifestyle_experience + + add_character_modifier = { + modifier = fp3_dabbling_in_alchemy_modifier + years = 25 + } + + stress_impact = { + #no stress for this event + } + } + + option = { #Go, and take your acid with you + name = fp3_yearly.8023.c + + add_learning_lifestyle_xp = major_lifestyle_experience + + if = { + limit = { + AND = { + OR = { + exists = global_var:avicenna_created + exists = global_var:rhazes_created + } + scope:enthusiastic_alchemist = { has_character_flag = fp3_historical_person_flag } + } + } + scope:enthusiastic_alchemist = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:enthusiastic_alchemist = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + #no stress for this event + } + } +} + +################################### +# The Return to the Sky +# by Ola Jentzsch +################################### + +scripted_trigger non_zoroastrian_faith_trigger = { + NOT = { + faith = { has_doctrine_parameter = sky_burials_active } + } +} + +scripted_trigger dakhma_nostalgic_trigger = { + culture = { has_cultural_pillar = heritage_iranian } + OR = { + faith = { has_doctrine_parameter = sky_burials_active } + has_trait = stubborn + learning > 14 + has_character_modifier = hallucinogenic_visions_uplifting_modifier + has_character_modifier = hallucinogenic_visions_terrifying_modifier + } + NAND = { + non_zoroastrian_faith_trigger = yes + has_trait = zealous + } +} + +scripted_trigger loyal_discreet_courtier_trigger = { + OR = { + faith = { has_doctrine_parameter = sky_burials_active } + has_trait = trusting + has_trait = compassionate + reverse_opinion = { + target = root + value >= 50 + } + } + NOR = { + has_trait = paranoid + has_trait = arrogant + has_trait = callous + has_trait = craven + } +} + +fp3_yearly.8024 = { + type = character_event + title = fp3_yearly.8024.t + desc = fp3_yearly.8024.desc + theme = death + + left_portrait = { + character = scope:dying_consort + animation = worry + } + + right_portrait = { + character = root + animation = sadness + triggered_animation = { + trigger = { + OR = { + has_trait = callous + reverse_opinion = { + target = scope:dying_consort + value < 0 + } + } + } + animation = schadenfreude + } + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_adult = yes + root.capital_province = { geographical_region = world_persian_empire } + + NOT = { + faith = { has_doctrine_parameter = sky_burials_active } + } + + any_consort = { #we need a dying consort + is_ai = yes + dakhma_nostalgic_trigger = yes + OR = { + health <= death_chance_dying_health + has_trait = infirm + } + } + } + + cooldown = { years = 100 } + + immediate = { + + random_consort = { #we need a dying consort + limit = { + is_ai = yes + dakhma_nostalgic_trigger = yes + OR = { + health <= death_chance_dying_health + has_trait = infirm + } + } + save_scope_as = dying_consort + } + + if = { + limit = { + any_courtier = { + is_ai = yes + NOR = { + is_close_or_extended_family_of = root + is_consort_of = root + } + loyal_discreet_courtier_trigger = yes + } + } + random_courtier = { + limit = { + is_ai = yes + NOR = { + is_close_or_extended_family_of = root + is_consort_of = root + } + loyal_discreet_courtier_trigger = yes + } + save_scope_as = helpful_courtier + } + } + + hidden_effect = { + if = { + limit = { + opinion = { + target = scope:dying_consort + value >= 50 + } + } + add_character_flag = fp3_love_for_consort_flag + } + } + } + + option = { + name = fp3_yearly.8024.a + + scope:dying_consort = { + death = natural + } + + add_piety = medium_piety_loss + + trigger_event = { + id = fp3_yearly.8025 + days = 3 + } + + custom_tooltip = fp3_relations_care_about_sky_burial.tt + hidden_effect = { + every_vassal_or_below = { + if = { + limit = { is_ai = yes } + opinion_based_on_sky_burial_viewpoint_scripted_effect = yes + } + } + every_courtier = { opinion_based_on_sky_burial_viewpoint_scripted_effect = yes } + every_close_family_member = { + if = { + limit = { is_ai = yes } + opinion_based_on_sky_burial_viewpoint_for_relatives_scripted_effect = yes + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + honest = medium_stress_impact_loss + callous = medium_stress_impact_gain + zealous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { #loving, non-zealous AI will do this + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 0.5 + ai_zeal = -1 + } + } + } + + + option = { + name = fp3_yearly.8024.b + + trigger = { + exists = scope:helpful_courtier + } + + scope:dying_consort = { + death = natural + } + + custom_tooltip = fp3_helpful_courtier.tt + + duel = { + skill = intrigue + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = hiding_sky_burial_toast.success + left_icon = root + + custom_tooltip = fp3_hidden_sky_burial.tt + trigger_event = fp3_yearly.8026 + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = hiding_sky_burial_toast.failure + left_icon = root + + custom_tooltip = fp3_unhidden_sky_burial.tt + trigger_event = fp3_yearly.8026 + + hidden_effect = { + every_vassal_or_below = { + if = { + limit = { is_ai = yes } + opinion_based_on_sky_burial_viewpoint_scripted_effect = yes + } + } + every_courtier = { opinion_based_on_sky_burial_viewpoint_scripted_effect = yes } + every_close_family_member = { + if = { + limit = { is_ai = yes } + opinion_based_on_sky_burial_viewpoint_for_relatives_scripted_effect = yes + } + } + } + } + } + } + } + + stress_impact = { + brave = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + + ai_chance = { #loving, non-zealous but craven AI will do this + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 0.5 + ai_boldness = -0.5 + ai_zeal = -1 + } + } + } + + option = { + name = fp3_yearly.8024.c + + add_piety = medium_piety_gain + + scope:dying_consort = { + death = natural + } + + stress_impact = { + zealous = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + loyal = medium_stress_impact_gain + cynical = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + + ai_chance = { #callous/zealous AI will do this + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_zeal = 1 + } + } + } +} + +fp3_yearly.8025 = { + type = character_event + title = fp3_yearly.8025.t + desc = fp3_yearly.8025.desc + theme = faith + + left_portrait = { + character = root + animation = sadness + triggered_animation = { + trigger = { + has_character_flag = fp3_love_for_consort_flag + } + animation = grief + } + } + + override_background = { + reference = bp1_bonfire + } + + option = { + + trigger = { has_character_flag = fp3_love_for_consort_flag } + + name = fp3_yearly.8025.a + } + + option = { + + name = fp3_yearly.8025.b + } +} + +fp3_yearly.8026 = { + type = character_event + title = fp3_yearly.8026.t + desc = fp3_yearly.8026.desc + theme = faith + + left_portrait = { + character = root + animation = paranoia + } + + right_portrait = { + character = scope:helpful_courtier + animation = sadness + } + + override_background = { + reference = wilderness + } + + option = { + name = fp3_yearly.8026.a + } + + option = { + name = fp3_yearly.8026.b + + trigger = { + OR = { + has_trait = callous + has_trait = paranoid + has_trait = sadistic + has_trait = lunatic + tyranny >= medium_tyranny + } + } + + scope:helpful_courtier = { + death = { + death_reason = death_murder + killer = root + } + } + + add_secret = { + type = secret_murder + target = scope:helpful_courtier + } + + stress_impact = { + base = minor_stress_impact_loss + paranoid = medium_stress_impact_loss + compassionate = massive_stress_impact_gain + just = massive_stress_impact_gain + } + } +} + + +############################################################### +# Nine Hundred Ninety Chapters of Gold # by Ola Jentzsch +############################################################### + +scripted_trigger fp3_rich_foreign_ruler_trigger = { + is_ai = yes + gold >= major_gold_value + NOT = { + reverse_opinion = { + target = root + value >= 50 + } + } + OR = { + culture = { has_cultural_pillar = heritage_iranian } + knows_language_of_culture = culture:persian + dynasty = { has_dynasty_perk = fp3_khvarenah_legacy_2 } + } +} + +fp3_yearly.8027 = { + type = character_event + title = fp3_yearly.8027.t + desc = fp3_yearly.8027.desc + theme = crown + + left_portrait = { + character = root + animation = personality_bold + } + + right_portrait = { + character = scope:snubbed_poet + animation = chancellor + } + + lower_left_portrait = { + character = scope:former_employer + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available_healthy_adult = yes + root.capital_province = { geographical_region = world_persian_empire } + + #Must know Persian for this event to make sense + knows_language_of_culture = culture:persian + + #Must have lots of gold to pay the poet + gold >= major_gold_value + + has_ep1_dlc_trigger = yes + has_royal_court = yes + + is_ai = no #since this event potentially spawns both artifacts and courtiers, let's keep it player-only in order to avoid spamming the game world with books and poets + + any_neighboring_top_liege_realm_owner = { fp3_rich_foreign_ruler_trigger = yes } + } + + weight_multiplier = { + base = 0.4 + modifier = { + AND = { #for Ferdowsi + current_year >= 980 + current_year < 1025 + } + add = 1.6 + } + } + + cooldown = { years = 20 } + + immediate = { + + random_neighboring_top_liege_realm_owner = { + limit = { fp3_rich_foreign_ruler_trigger = yes } + save_scope_as = former_employer + } + + if = { #This looks to see if Ferdowsi will be used in the event + limit = { #his rough period of activity + AND = { + current_year >= 980 + current_year < 1025 + } + NOT = { exists = global_var:ferdowsi_created } #makes sure that he wasn't already spawned by any event elsewhere + } + create_character = { + location = root.capital_province + template = fp3_ferdowsi_template + save_scope_as = snubbed_poet #this saves him as a scope so we can get nice effects to bounce off him! + } + set_global_variable = ferdowsi_created + } + else = { + create_character = { + location = root.capital_province + template = writer_character + gender_female_chance = root_faith_dominant_gender_female_chance + faith = faith:maturidi + culture = culture:persian + trait = lifestyle_poet + trait = shrewd + save_scope_as = snubbed_poet + } + } + } + + option = { + name = fp3_yearly.8027.a + + custom_tooltip = fp3_promise_to_pay_for_book.tt + + add_courtier = scope:snubbed_poet + + scope:former_employer = { + add_opinion = { + target = root + opinion = -30 + modifier = fp3_stole_my_court_poet_opinion + } + } + + if = { + limit = { exists = global_var:ferdowsi_created } + trigger_event = { + id = fp3_yearly.8028 + days = { 250 390 } + } + } + else = { + trigger_event = { + id = fp3_yearly.8029 + days = { 250 390 } + } + } + + stress_impact = { + generous = medium_stress_impact_loss + content = medium_stress_impact_gain + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + + option = { + name = fp3_yearly.8027.b + flavor = fp3_mediate_between_them.flavor + + trigger = { + NOT = { has_relation_rival = scope:former_employer } + } + + duel = { #this duel is root trying to mediate + skill = diplomacy + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = 40 + scope:former_employer = { + has_trait = forgiving + } + } + modifier = { + add = 20 + scope:former_employer = { + OR = { + has_trait = trusting + has_trait = generous + } + } + } + custom_tooltip = fp3_mediation_succeeds.tt + custom_tooltip = fp3_poet_leaves.tt + hidden_effect = { + trigger_event = fp3_yearly.8031 + + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + modifier = { + add = 40 + scope:former_employer = { + OR = { + has_trait = vengeful + has_trait = paranoid + } + } + } + modifier = { + add = 20 + scope:former_employer = { + OR = { + has_trait = wrathful + has_trait = arrogant + } + } + } + custom_tooltip = fp3_mediation_fails.tt + show_as_tooltip = { + if = { + limit = { exists = global_var:ferdowsi_created } + scope:snubbed_poet = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:snubbed_poet = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + } + hidden_effect = { + trigger_event = fp3_yearly.8030 + + } + } + } + + stress_impact = { + just = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + option = { + name = fp3_yearly.8027.c + + if = { + limit = { exists = global_var:ferdowsi_created } + scope:snubbed_poet = { #Let's keep the historical characters around, if they were created + move_to_pool = yes + } + } + else = { + scope:snubbed_poet = { #otherwise, let's just have him disappear + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + ambitious = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + } +} + +fp3_yearly.8028 = { + type = character_event + title = fp3_yearly.8028.t + desc = fp3_yearly.8028.desc + theme = crown + + left_portrait = { + character = root + animation = admiration + } + + right_portrait = { + character = scope:snubbed_poet + animation = chancellor + } + + artifact = { # To display the artifact in the event-window + target = scope:shahnameh + position = lower_left_portrait + } + + trigger = { + scope:snubbed_poet = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + + save_scope_as = owner + set_artifact_rarity_illustrious = yes + + create_artifact = { + name = shahnameh_name + creator = scope:snubbed_poet + description = shahnameh_desc + visuals = book + type = book + modifier = fp3_artifact_shahnameh_modifier + wealth = scope:wealth # This comes from the scripted effect above + quality = scope:quality # This comes from the scripted effect above + save_scope_as = shahnameh # Allows the BOOK to be accessed via scope after its creation + } + } + + option = { + name = fp3_yearly.8028.a + + pay_short_term_gold = { + gold = 495 + target = scope:snubbed_poet + } + } + + option = { + name = fp3_yearly.8028.b + + pay_short_term_gold = { + gold = 495 + target = scope:snubbed_poet + } + + scope:snubbed_poet = { + move_to_pool = yes + } + } + + option = { + name = fp3_yearly.8029.c + + add_character_modifier = { + modifier = fp3_reneged_on_promise_modifier + years = 10 + } + + scope:snubbed_poet = { + add_opinion = { + target = root + modifier = contempt_opinion + opinion = -30 + } + } + + scope:snubbed_poet = { + move_to_pool = yes + } + } +} + +fp3_yearly.8029 = { + type = character_event + title = fp3_yearly.8029.t + desc = fp3_yearly.8029.desc + theme = crown + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:snubbed_poet + animation = chancellor + } + + artifact = { # To display the artifact in the event-window + target = scope:persian_epic + position = lower_left_portrait + } + + immediate = { + + save_scope_as = owner + set_artifact_rarity_masterwork = yes + + create_artifact = { + name = persian_epic_name + creator = scope:snubbed_poet + description = persian_epic_desc + visuals = book + type = book + modifier = fp3_artifact_persian_epic_modifier + wealth = scope:wealth # This comes from the scripted effect above + quality = scope:quality # This comes from the scripted effect above + save_scope_as = persian_epic # Allows the sword to be accessed via scope after its creation + } + } + + option = { + name = fp3_yearly.8029.a + + pay_short_term_gold = { + gold = 495 + target = scope:snubbed_poet + } + } + + option = { + name = fp3_yearly.8029.b + + pay_short_term_gold = { + gold = 495 + target = scope:snubbed_poet + } + + scope:snubbed_poet = { + move_to_pool = yes + silent_disappearance_effect = yes + } + } + + option = { + name = fp3_yearly.8029.c + + add_character_modifier = { + modifier = fp3_reneged_on_promise_modifier + years = 10 + } + + scope:snubbed_poet = { + move_to_pool = yes + silent_disappearance_effect = yes + } + } +} + +fp3_yearly.8030 = { + type = letter_event + opening = fp3_yearly.8030.opening + desc = fp3_yearly.8030.desc + sender = scope:former_employer + + immediate = { + + scope:former_employer = { + add_opinion = { + target = root + opinion = -20 + modifier = angry_opinion + } + } + } + + option = { + name = fp3_yearly.8030.a + } +} + +fp3_yearly.8031 = { + type = letter_event + opening = fp3_yearly.8031.opening + desc = fp3_yearly.8031.desc + sender = scope:former_employer + + immediate = { + + scope:former_employer = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + add_courtier = scope:snubbed_poet + } + scope:snubbed_poet = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + + add_prestige = medium_prestige_value + } + + option = { + name = fp3_yearly.8031.a + } +} + + +############################################################### +# The Ten Days of the Dead # by Ola Jentzsch +############################################################### + +fp3_yearly.8032 = { + type = character_event + title = fp3_yearly.8032.t + desc = fp3_yearly.8032.desc + theme = death + + left_portrait = { + character = root + animation = personality_cynical + } + + right_portrait = { + character = scope:death_enthusiast + animation = sadness + } + + trigger = { #this event triggers from yearly_persian.1001, and in order to not mess that up, I decided to not demand a fp3_dlc_trigger for this one. + + is_available_adult = yes + OR = { + culture = { has_cultural_pillar = heritage_iranian } + AND = { + any_consort = { + culture = { has_cultural_pillar = heritage_iranian } + } + root.capital_province = { geographical_region = world_persian_empire } + } + } + + any_consort = { + is_ai = yes + culture = { has_cultural_pillar = heritage_iranian } + NOR = { + has_trait = arrogant + has_trait = cynical + has_trait = callous + } + } + + any_ancestor = { + even_if_dead = yes + house = root.house + } + } + + immediate = { + + add_character_flag = { + flag = had_event_yearly_persian_1002 #though counter-intuitively named, this will now block both this and yearly_persian_1002 for five years + years = 5 + } + + random_consort = { + limit = { + is_ai = yes + culture = { has_cultural_pillar = heritage_iranian } + NOR = { + has_trait = arrogant + has_trait = cynical + has_trait = callous + } + } + save_scope_as = death_enthusiast + } + + + random_ancestor = { + even_if_dead = yes + limit = { + house = root.house + } + save_scope_as = ancestor_1 + } + + scope:death_enthusiast = { + add_character_modifier = { + modifier = fp3_thinking_about_the_afterlife_modifier + years = 5 + } + } + } + + option = { #Say no to paganism + name = fp3_yearly.8032.a + + trigger = { + OR = { + has_religion = religion:islam_religion + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + } + } + + add_piety = medium_piety_gain + + scope:death_enthusiast = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + } + + option = { #of course my love + name = fp3_yearly.8032.b + + trigger = { + reverse_opinion = { + target = scope:death_enthusiast + value >= 30 + } + NOR = { + AND = { + has_religion = religion:islam_religion + has_trait = zealous + } + AND = { + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + has_trait = zealous + } + } + } + + scope:death_enthusiast = { + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + add_opinion = { + target = root + modifier = happy_opinion + opinion = 20 + } + } + else = { + root = { + progress_towards_lover_effect = { + CHARACTER = scope:death_enthusiast + REASON = lover_loves_death + OPINION = 20 + } + } + } + } + + stress_impact = { + base = medium_stress_impact_loss + shy = major_stress_impact_gain + } + } + + option = { #think of my dynasty + name = fp3_yearly.8032.c + + dynasty = { add_dynasty_prestige = minor_dynasty_prestige_value } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = medium_stress_impact_gain + } + } + + option = { #you're right, death awaits us all + name = fp3_yearly.8032.d + + trigger = { + NOT = { has_character_modifier = fp3_thinking_about_the_afterlife_modifier } + } + + add_character_modifier = { + modifier = fp3_thinking_about_the_afterlife_modifier + years = 15 + } + + stress_impact = { + base = medium_stress_impact_gain + craven = miniscule_stress_impact_gain + } + } +} + +############################################################### +# Frozen Treats - by Ola Jentzsch +############################################################### +scripted_trigger fp3_loves_faloodeh_trigger = { + is_available_ai = yes + is_healthy = yes + OR = { + has_trait = gluttonous + has_trait = gregarious + has_trait = comfort_eater + has_character_modifier = feast_life_reaffirmed_modifier + } + NOR = { + has_trait = temperate + has_trait = inappetetic + AND = { + faith = { has_doctrine = tenet_asceticism } + ai_zeal >= medium_positive_ai_value + } + } +} + +fp3_yearly.8033 = { + type = character_event + title = fp3_yearly.8033.t + desc = fp3_yearly.8033.desc + theme = realm + + left_portrait = { + character = root + animation = personality_compassionate + } + + right_portrait = { + character = scope:sorbet_enthusiast + animation = worry + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available = yes + is_healthy = yes + root.capital_province = { geographical_region = world_persian_empire } + + #checking that we have an interesting character that would fit the scope + OR = { + any_consort = { + fp3_loves_faloodeh_trigger = yes + } + any_powerful_vassal = { + fp3_loves_faloodeh_trigger = yes + } + any_councillor = { + fp3_loves_faloodeh_trigger = yes + } + any_child = { + fp3_loves_faloodeh_trigger = yes + age >= 10 + } + } + + #checking that we have fitting country for ice houses + + any_held_county = { + any_county_province = { + geographical_region = world_persian_empire + OR = { + terrain = desert + terrain = drylands + terrain = desert_mountains + terrain = oasis + } + } + } + } + + cooldown = { years = 100 } + + immediate = { + + #getting the best faloodeh lover for our purposes + if = { + limit = { + any_consort = { fp3_loves_faloodeh_trigger = yes } + } + random_consort = { + limit = { + fp3_loves_faloodeh_trigger = yes + } + save_scope_as = sorbet_enthusiast + } + } + else_if = { + limit = { + any_powerful_vassal = { fp3_loves_faloodeh_trigger = yes } + } + random_powerful_vassal = { + limit = { + fp3_loves_faloodeh_trigger = yes + } + save_scope_as = sorbet_enthusiast + } + } + else_if = { + limit = { + any_councillor = { fp3_loves_faloodeh_trigger = yes } + } + random_councillor = { + limit = { + fp3_loves_faloodeh_trigger = yes + } + save_scope_as = sorbet_enthusiast + } + } + else_if = { + limit = { + any_child = { + fp3_loves_faloodeh_trigger = yes + age >= 10 + } + } + random_child = { + limit = { + fp3_loves_faloodeh_trigger = yes + age >= 10 + } + save_scope_as = sorbet_enthusiast + } + } + + random_held_county = { + limit = { + any_county_province = { + geographical_region = world_persian_empire + OR = { + terrain = desert + terrain = drylands + terrain = desert_mountains + terrain = oasis + } + } + } + save_scope_as = yakhchal_county + } + + scope:yakhchal_county = { + add_county_modifier = { + modifier = fp3_broken_icehouses_county_modifier + years = 25 + } + } + } + + option = { + name = fp3_yearly.8033.a + + trigger = { + OR = { + has_trait = gluttonous + has_trait = gregarious + has_trait = comfort_eater + } + } + + add_character_modifier = { + modifier = fp3_securing_sorbet_supply_modifier + years = 25 + } + + scope:sorbet_enthusiast = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + just = medium_stress_impact_gain + temperate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + ai_sociability = 0.5 + } + } + } + + option = { + name = fp3_yearly.8033.b + + trigger = { + NOR = { + has_trait = gluttonous + has_trait = gregarious + has_trait = comfort_eater + } + } + + scope:sorbet_enthusiast = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + + add_character_modifier = { + modifier = fp3_court_austerity_modifier + years = 25 + } + + stress_impact = { + temperate = minor_stress_impact_loss + gluttonous = major_stress_impact_gain + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_sociability = -0.5 + } + } + } + + option = { + name = fp3_yearly.8033.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:yakhchal_county = { + remove_county_modifier = fp3_broken_icehouses_county_modifier + } + + scope:sorbet_enthusiast = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + + stress_impact = { + generous = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.7 + ai_greed = -0.5 + } + } + } + + option = { + name = fp3_yearly.8033.d + + scope:sorbet_enthusiast = { + add_opinion = { + target = root + modifier = insulted_opinion + } + } + + stress_impact = { + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.7 + ai_compassion = -0.5 + } + } + } +} + + + + +############################################################### +# The Hephthalite Hoard - by Ola Jentzsch +############################################################### +scripted_trigger hypothetical_hephthalite_heritage_trigger = { + OR = { + has_culture = culture:saka + has_culture = culture:tajik + has_culture = culture:sogdian + has_culture = culture:turkish + has_culture = culture:khwarezmian + has_culture = culture:afghan + has_culture = culture:tocharian + } +} + +scripted_trigger hephthalite_hoard_province_trigger = { + OR = { + geographical_region = dlc_fp3_eastern_persian_frontier_regions + geographical_region = custom_bactria + geographical_region = world_steppe_tarim + } +} + +fp3_yearly.8034 = { + type = character_event + title = fp3_yearly.8034.t + desc = fp3_yearly.8034.desc + theme = vassal + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:wronged_vassal + animation = beg + } + + lower_left_portrait = { + character = scope:greedy_vassal + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_ruler = yes + is_available = yes + is_healthy = yes + + any_vassal = { + is_ai = yes + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = deceitful + } + any_vassal_or_below = { + is_ai = yes + hypothetical_hephthalite_heritage_trigger = yes + any_held_county = { + any_county_province = { hephthalite_hoard_province_trigger = yes } + } + } + } + } + + cooldown = { years = 100 } + + immediate = { + + random_vassal = { + limit = { + is_ai = yes + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = deceitful + } + any_vassal_or_below = { + is_ai = yes + hypothetical_hephthalite_heritage_trigger = yes + any_held_county = { + any_county_province = { hephthalite_hoard_province_trigger = yes } + } + } + } + save_scope_as = greedy_vassal + } + + random_vassal_or_below = { + limit = { + is_vassal_of = scope:greedy_vassal + is_ai = yes + hypothetical_hephthalite_heritage_trigger = yes + any_held_county = { + any_county_province = { hephthalite_hoard_province_trigger = yes } + } + } + random_held_county = { + limit = { + any_county_province = { hephthalite_hoard_province_trigger = yes } + } + save_scope_as = hephthalite_hoard_province + } + save_scope_as = wronged_vassal + } + + scope:wronged_vassal = { + add_gold = massive_gold_value + } + + scope:greedy_vassal = { + add_opinion = { + target = scope:wronged_vassal + modifier = fp3_resentful_opinion + opinion = -20 + } + } + + scope:wronged_vassal = { + add_opinion = { + target = scope:greedy_vassal + modifier = bitter_rivalry_opinion + years = 10 + } + } + } + + option = { + name = fp3_yearly.8034.a + + scope:wronged_vassal = { + pay_short_term_gold = { + target = root + gold = massive_gold_value + } + } + + add_tyranny = medium_tyranny_value + + stress_impact = { + greedy = minor_stress_impact_loss + just = massive_stress_impact_gain + craven = medium_stress_impact_gain + content = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.7 + ai_greed = 1 + ai_compassion = -1 + } + } + } + + option = { + name = fp3_yearly.8034.b + + scope:wronged_vassal = { + pay_short_term_gold = { + target = scope:greedy_vassal + gold = massive_gold_value + } + } + + scope:wronged_vassal = { + add_opinion = { + target = root + modifier = fp3_dismayed_opinion + } + } + + scope:greedy_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + stress_impact = { + arbitrary = minor_stress_impact_loss + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_rationality = 0.5 + } + } + } + + option = { + name = fp3_yearly.8034.c + + scope:wronged_vassal = { + remove_short_term_gold = massive_gold_value + } + + if = { + limit = { + faith = { + OR = { + trait_is_virtue = compassionate + trait_is_virtue = generous + trait_is_virtue = peasant_leader + } + } + } + add_piety = medium_piety_value + } + else = { + add_prestige = minor_prestige_value + } + + scope:wronged_vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + scope:greedy_vassal = { + add_opinion = { + target = root + modifier = intrusive_liege_opinion + } + } + + stress_impact = { + just = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.5 + ai_greed = -0.5 + } + } + } + + option = { + name = fp3_yearly.8034.d + + scope:wronged_vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + + add_hook = { + type = indebted_hook + target = scope:wronged_vassal + } + + scope:greedy_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + stress_impact = { + generous = minor_stress_impact_loss + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.3 + ai_boldness = 0.5 + ai_rationality = 0.5 + ai_greed = -0.5 + } + } + } +} + +############################################################### +# The Heart and the Creator - by Ola Jentzsch +############################################################### + +fp3_yearly.8035 = { + type = character_event + title = fp3_yearly.8035.t + desc = fp3_yearly.8035.desc + theme = learning_theology_focus + + left_portrait = { + character = scope:sufi_mystic + animation = personality_zealous + } + + right_portrait = { + character = root + animation = personality_rational + } + + override_background = { + reference = corridor_night + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_available_healthy_adult = yes + learning >= average_skill_level + + NOT = { has_character_modifier = fp3_sufi_initiate_modifier } + + #checking that we have a suitable sufism mentor + OR = { + any_relation = { + type = friend + fp3_sufism_enthusiast_trigger = yes + } + any_relation = { + type = lover + fp3_sufism_enthusiast_trigger = yes + } + any_courtier_or_guest = { + fp3_sufism_enthusiast_trigger = yes + reverse_opinion = { + target = root + value >= 50 + } + } + } + } + + weight_multiplier = { + base = 0.4 + modifier = { + OR = { + fp3_sufism_enthusiast_trigger = yes + has_trait = lifestyle_mystic + } + add = 1.6 + } + modifier = { #Sufis don't get along with legalists, so legalist faiths are less likely to have sufi events + faith = { has_doctrine = tenet_legalism } + add = -0.2 + } + } + + cooldown = { years = 100 } + + immediate = { + + if = { + limit = { + any_relation = { + type = friend + fp3_sufism_enthusiast_trigger = yes + } + } + random_relation = { + type = friend + limit = { fp3_sufism_enthusiast_trigger = yes } + save_scope_as = sufi_mystic + } + } + else_if = { + limit = { + any_relation = { + type = lover + fp3_sufism_enthusiast_trigger = yes + } + } + random_relation = { + type = lover + limit = { fp3_sufism_enthusiast_trigger = yes } + save_scope_as = sufi_mystic + } + } + else_if = { + limit = { + any_courtier_or_guest = { fp3_sufism_enthusiast_trigger = yes } + } + random_courtier_or_guest = { + limit = { + fp3_sufism_enthusiast_trigger = yes + } + save_scope_as = sufi_mystic + } + } + + scope:sufi_mystic = { + add_character_modifier = { + modifier = fp3_sufi_initiate_modifier #Unlocks the "Meditate in Seclusion" decision if you are a ruler + } + } + } + + option = { + name = fp3_yearly.8035.a + + duel = { + skill = learning + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = learning_muraqaba_toast.success + left_icon = root + + custom_tooltip = fp3_unlock_meditation.tt + add_character_modifier = { + modifier = fp3_sufi_initiate_modifier #Unlocks the "Meditate in Seclusion" decision if you are a ruler + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = learning_muraqaba_toast.failure + left_icon = root + add_learning_lifestyle_xp = minor_lifestyle_experience + } + } + } + } + + scope:sufi_mystic = { + add_opinion = { + target = root + modifier = trusted_friend_opinion + } + } + + stress_impact = { #while the stress mods here are low, note that they stack with the base modifier + base = medium_stress_impact_gain + zealous = minor_stress_impact_loss + patient = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + callous = medium_stress_impact_gain + lazy = minor_stress_impact_gain + content = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = 0.5 + ai_energy = 0.5 + ai_zeal = 1 + } + } + } + + option = { + name = fp3_yearly.8035.b + + add_piety = medium_piety_value + + scope:sufi_mystic = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + + stress_impact = { + stubborn = minor_stress_impact_loss + zealous = minor_stress_impact_loss + ambitious = medium_stress_impact_gain + trusting = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_vengefulness = 0.5 + ai_zeal = 1 + } + } + } + + option = { + name = fp3_yearly.8035.c + + scope:sufi_mystic = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + + stress_impact = { + base = minor_stress_impact_loss + zealous = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + ai_zeal = -0.5 + } + } + } +} + +############################################################### +# The City of the Mouthless - by Ola Jentzsch +############################################################### +scripted_trigger superstitious_coward_trigger = { + is_available_healthy_ai_adult = yes + NOT = { + has_trait = brave + has_trait = cynical + has_trait = stubborn + learning >= good_skill_level + } +} + + +fp3_yearly.8036 = { + type = character_event + title = fp3_yearly.8036.t + desc = fp3_yearly.8036.desc + theme = skull + + left_portrait = { + character = root + animation = personality_content + } + + right_portrait = { + character = scope:superstitious_councillor + animation = paranoia + } + + override_background = { + reference = bp1_bonfire + } + + trigger = { + + #standard sanity checks + has_fp3_dlc_trigger = yes + is_available_healthy_adult = yes + is_ruler = yes + root.capital_province = { geographical_region = world_persian_empire } + + any_councillor = { superstitious_coward_trigger = yes } + + any_held_county = { + OR = { + this = title:c_ardabil + development_level <= medium_development_level + } + } + } + + cooldown = { years = 10 } + + immediate = { + + random_councillor = { + limit = { superstitious_coward_trigger = yes } + save_scope_as = superstitious_councillor + } + + random_held_county = { + if = { + limit = { this = title:c_ardabil } + save_scope_as = spooky_county + } + else_if = { + limit = { + development_level < medium_development_level + } + save_scope_as = spooky_county + } + } + } + + option = { + name = fp3_yearly.8036.a + + trigger = { has_lifestyle = learning_lifestyle } + + add_learning_lifestyle_xp = minor_lifestyle_experience + + scope:superstitious_councillor = { + add_opinion = { + target = root + modifier = perplexed_opinion + opinion = -15 + } + } + + stress_impact = { + craven = medium_stress_impact_gain + impatient = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_rationality = 0.5 + } + } + } + + option = { + name = fp3_yearly.8036.b + + scope:superstitious_councillor = { + add_opinion = { + target = root + modifier = took_my_advice_opinion + opinion = 15 + } + } + + add_character_modifier = { + modifier = fp3_avoiding_dark_places_modifier + years = 5 + } + + stress_impact = { + brave = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = -1 + ai_zeal = 0.5 + } + } + } + + option = { + name = fp3_yearly.8036.c + + add_character_modifier = { + modifier = fp3_relentless_skeptic_modifier + years = 5 + } + + scope:superstitious_councillor = { + add_opinion = { + target = root + modifier = stress_upset_councillor + } + } + + stress_impact = { + craven = medium_stress_impact_gain + callous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 0.5 + ai_rationality = 1 + } + } + } + + option = { + name = fp3_yearly.8036.d + + add_piety = minor_piety_value + + stress_impact = { + cynical = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -0.5 + ai_rationality = -0.5 + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_misc_decision_events.txt b/N3OW/events/dlc/fp3/fp3_misc_decision_events.txt new file mode 100644 index 00000000..a375899d --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_misc_decision_events.txt @@ -0,0 +1,2906 @@ +namespace = fp3_misc_decisions + +### EVENT LIST #################################################################### +## 0005 - 0009 Request Invasion by Hugo Cortell +## 0010 - 0014 Demand Submission letter events +## 0015 - 0015 Embrace Zoroastrianism faith selection event +## 0020 - 0030 Challenge House Head Events by Hugo Cortell +## 0031 - 0040 Favor Skilled Outsiders events by Ewan Cowhig Croft +## 0041 - 0050 Extra Challenge House Head Events +################################################################################### + +################################### +# Request Invasion +# By Hugo Cortell +################################### +fp3_misc_decisions.0005 = { + hidden = yes + + immediate = { + random_character_war = { # We need to locate the war we just created, since we can't save it on creation + limit = { + using_cb = fp3_turkic_invasion_cb + primary_attacker = scope:secondary_recipient # root + primary_defender = scope:recipient + } + add_attacker = scope:actor + } + } +} +fp3_misc_decisions.0006 = { + hidden = yes + + immediate = { + random_character_war = { # We need to locate the war we just created, since we can't save it on creation + limit = { + using_cb = fp3_turkic_invasion_cb + primary_attacker = scope:secondary_recipient # root + primary_defender = scope:recipient + } + save_scope_as = turkic_war + } + if = { + limit = { + has_mpo_dlc_trigger = yes + } + spawn_army = { + men_at_arms = { + type = horse_archers + stacks = fp3_request_invasion_troop_value_bonus_troops + } + men_at_arms = { + type = steppe_raiders + stacks = fp3_request_invasion_troop_value_bonus_troops + } + men_at_arms = { + type = nomadic_riders + stacks = fp3_request_invasion_troop_value_bonus_levy_nomads + } + location = capital_province + uses_supply = yes + war = scope:turkic_war + inheritable = no + name = turkic_tribal_event_troops + } + } + else = { + spawn_army = { + men_at_arms = { + type = horse_archers + stacks = fp3_request_invasion_troop_value_bonus_troops + } + men_at_arms = { + type = light_horsemen + stacks = fp3_request_invasion_troop_value_bonus_troops + } + levies = fp3_request_invasion_troop_value_bonus_levy_troops + location = capital_province + uses_supply = yes + war = scope:turkic_war + inheritable = no + name = turkic_tribal_event_troops + } + } + } +} + +# Demand Submission Letter Events +fp3_misc_decisions.0010 = { + type = letter_event + opening = fp3_misc_decisions.0010.opening + desc = { + desc = fp3_misc_decisions.0010.desc_intro + # If the Persian Struggle is still ongoing, comment on that + triggered_desc = { + trigger = { + exists = struggle:persian_struggle + scope:actor ?= title:d_sunni.holder + } + desc = fp3_misc_decisions.0010.desc_struggle + } + } + sender = scope:recipient + + immediate = { + show_as_tooltip = { + if = { + limit = { scope:piety_cost_reduction ?= yes } + add_piety = massive_piety_loss + } + add_hook = { + target = scope:recipient + type = caliphal_submission_hook + } + # Remove "rejected my authority" negative opinion, if valid + if = { + limit = { + has_opinion_modifier = { + modifier = fp3_rejected_my_authority_opinion + target = scope:recipient + } + } + remove_opinion = { + modifier = fp3_rejected_my_authority_opinion + target = scope:recipient + } + } + } + } + + option = { + name = fp3_misc_decisions.0010.a + } +} + +fp3_misc_decisions.0011 = { + type = letter_event + opening = fp3_misc_decisions.0010.opening + desc = fp3_misc_decisions.0011.desc + sender = scope:recipient + + immediate = { + show_as_tooltip = { + scope:recipient = { + add_piety = medium_piety_loss + reverse_add_opinion = { + target = scope:actor + modifier = fp3_rejected_my_authority_opinion + years = 30 + } + } + } + } + + option = { + name = fp3_misc_decisions.0011.a + } +} + +# Embrace Zoroastrianism faith selection event +fp3_misc_decisions.0015 = { + type = character_event + title = fp3_misc_decisions.0015.t + desc = fp3_misc_decisions.0015.desc + left_portrait = { + character = root + animation = worry + } + theme = faith + + immediate = { + # Gather what faiths we can choose to convert to (Zoroastrian faiths practiced by counties in our realm) + every_sub_realm_county = { + faith = { + if = { + limit = { + # Don't add the same faith to a list more than once + NOT = { + any_in_list = { + list = realm_zoroastrian_faiths + this = prev + } + } + religion = religion:zoroastrianism_religion + } + add_to_list = realm_zoroastrian_faiths + } + } + } + # Save the faiths with the most, 2nd most, and 3rd most fervor + # These are the faiths that we will be allowed to convert to + ordered_in_list = { + list = realm_zoroastrian_faiths + order_by = fervor + position = 0 + save_scope_as = zoroastrian_faith_1 + } + if = { + limit = { + list_size = { + name = realm_zoroastrian_faiths + value > 1 + } + } + ordered_in_list = { + list = realm_zoroastrian_faiths + order_by = fervor + position = 1 + save_scope_as = zoroastrian_faith_2 + } + } + if = { + limit = { + list_size = { + name = realm_zoroastrian_faiths + value > 2 + } + } + ordered_in_list = { + list = realm_zoroastrian_faiths + order_by = fervor + position = 2 + save_scope_as = zoroastrian_faith_3 + } + } + } + + option = { # Zoroastrian faith option 1 (faith with the most fervor) + name = fp3_misc_decisions.0015.a + make_character_crypto_religionist_effect = { CRYPTO_RELIGION = scope:zoroastrian_faith_1 } + } + + option = { # Zoroastrian faith option 2 + name = fp3_misc_decisions.0015.b + trigger = { + list_size = { + name = realm_zoroastrian_faiths + value > 1 + } + } + make_character_crypto_religionist_effect = { CRYPTO_RELIGION = scope:zoroastrian_faith_2 } + } + + option = { # Zoroastrian faith option 3 + name = fp3_misc_decisions.0015.c + trigger = { + list_size = { + name = realm_zoroastrian_faiths + value > 2 + } + } + make_character_crypto_religionist_effect = { CRYPTO_RELIGION = scope:zoroastrian_faith_3 } + } + + option = { # Don't switch to any secret faith + name = false_conversion.0020.b # "No, no, the time is not yet right." + add_piety = miniscule_piety_gain # Refund piety + } +} + +################################### +# Challenge House Head Events +# By Hugo Cortell +# 0020 - 0030 + 0041 - 0050 +################################### + +scripted_trigger fp3_clan_challenge_negotiate_age_health_trigger = { + OR = { + AND = { + scope:recipient.health < fine_health + scope:recipient.health < scope:actor.health + } + AND = { + scope:recipient.age >= 50 + scope:recipient.age >= root.age_plus_25 + } + OR = { + scope:recipient.age <= scope:actor.age_minus_10 + AND = { + scope:recipient = { is_sibling_of = scope:actor } + scope:recipient.age < scope:actor.age + } + } + } +} + +scripted_effect fp3_clan_challenge_negotiate_success_effect = { + save_scope_as = negotiate_success + save_scope_value_as = { + name = negotiate_reason + value = flag:$REASON$ + } + show_as_tooltip = { + scope:actor = { + add_prestige = medium_prestige_gain + house = { set_house_head = root } + } + } +} + +scripted_effect fp3_clan_challenge_negotiate_bargain_effect = { + save_scope_as = negotiate_bargain + save_scope_value_as = { + name = negotiate_reason + value = flag:$REASON$ + } + custom_tooltip = fp3_misc_decisions.0027.bargain.tt +} + +scripted_effect fp3_clan_challenge_negotiate_fail_effect = { + save_scope_as = negotiate_fail + save_scope_value_as = { + name = negotiate_reason + value = flag:$REASON$ + } + show_as_tooltip = { + scope:actor = { add_prestige = medium_prestige_loss } + scope:recipient = { + add_prestige = medium_piety_value + add_hook_no_toast = { + type = trial_by_combat_hook + target = scope:actor + } + } + } +} + +fp3_misc_decisions.0020 = { # Actor Duel Outcome(s) + type = character_event + title = fp3_misc_decisions.0020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sc_victor = scope:house_challenger + scope:sc_loser = { is_alive = no } + } + desc = fp3_misc_decisions.0020.desc.a.lethal + } + triggered_desc = { + trigger = { scope:sc_victor = scope:house_challenger } + desc = fp3_misc_decisions.0020.desc.a + } + desc = fp3_misc_decisions.0020.desc.b + } + } + + theme = dynasty + override_background = { reference = throne_room } + left_portrait = { + character = scope:house_challenger + animation = war_over_loss + + triggered_animation = { + trigger = { this = scope:sc_victor } + animation = war_over_win + } + } + right_portrait = { + character = scope:house_head + animation = war_over_loss + + triggered_animation = { + trigger = { is_alive = no } + animation = loss_1 + } + triggered_animation = { + trigger = { this = scope:sc_victor } + animation = war_over_win + } + } + + immediate = { + # Challenger lost + if = { + limit = { scope:sc_victor = scope:house_head } + show_as_tooltip = { fp3_challenge_house_head_duel_challenger_loss_effect = yes } # Prestige and hooks + } + # Challenger won + else = { + show_as_tooltip = { fp3_challenge_house_head_duel_challenger_win_prestige_effect = yes } # Prestige gain + } + } + + # OPTIONS FOR LOSER + option = { # Default option (goes on top, against design conventions) + name = fp3_misc_decisions.0020.lose.a + trigger = { scope:sc_loser = scope:house_challenger } + } + + option = { # Slay them to take the mantle + name = fp3_misc_decisions.0020.lose.b + trigger = { scope:sc_loser = root } + show_as_tooltip ={ + #Lose a ton of prestige for being so backhanded + add_prestige = massive_prestige_loss + add_prestige_level = -1 + } + duel = { + skills = { intrigue prowess } + target = scope:house_head + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 1 + show_as_tooltip = { + known_murder_hidden_opinion_effect = { VICTIM = scope:house_head MURDERER = scope:house_challenger EXPOSER = scope:house_challenger } + house = { set_house_head = root } + } + save_scope_as = challenge_murder_success + } + 9 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + scope:house_head = { + hidden_effect = { + random = { + chance = 50 + save_scope_as = challenge_wound + } + } + show_as_tooltip = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:house_challenger } + } + set_relation_rival = { + target = scope:house_challenger + reason = rival_tried_to_kill_me + } + } + add_opinion = { + target = scope:house_challenger + modifier = attempted_murder_me_crime + } + imprison = { + target = scope:house_challenger + type = house_arrest + } + } + } + } + } + trigger_event = fp3_misc_decisions.0041 + stress_impact = { + content = major_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + + option = { + name = fp3_misc_decisions.0025.b + trigger = { + can_set_relation_rival_trigger = { CHARACTER = scope:recipient } + scope:recipient = { is_alive = yes } + } + progress_towards_rival_effect = { + REASON = rival_house_head_rejected_challenge + CHARACTER = scope:recipient + OPINION = default_rival_opinion + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_boldness = 0.25 + ai_vengefulness = 0.5 + } + } + } + + # OPTIONS FOR WINNER + option = { # Default option + name = fp3_misc_decisions.0020.win.a + trigger = { scope:sc_victor = scope:house_challenger } + fp3_challenge_house_head_duel_challenger_win_house_effect = yes + ai_chance = { + base = 25 + } + } + + option = { # You fought well and deserve to be house head + name = fp3_misc_decisions.0020.win.b + trigger = { + scope:sc_victor = scope:house_challenger + has_trait = gallant + scope:lethal != yes + } + add_prestige = massive_prestige_gain + reverse_add_opinion = { + target = scope:recipient + modifier = honored_opinion + } + house = { + add_clan_unity_interaction_effect = { + CHARACTER = scope:actor + TARGET = scope:recipient + VALUE = miniscule_unity_gain # recover half of what was lost by challenge itself + DESC = clan_unity_gallant_after_duel.desc + REVERSE_NON_HOUSE_TARGET = yes + } + } + stress_impact = { + greedy = major_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 0.25 + ai_greed = -1 + } + opinion_modifier = { + opinion_target = scope:recipient + multiplier = 0.25 + } + } + } +} + +# Bout has ended, inform affected parties. +fp3_misc_decisions.0021 = { + hidden = yes + + immediate = { + if = { + limit = { scope:sc_victor = scope:house_challenger } + fp3_challenge_house_head_duel_challenger_win_prestige_effect = yes + } + else = { fp3_challenge_house_head_duel_challenger_loss_effect = yes } + scope:house_challenger = { + trigger_event = { + id = fp3_misc_decisions.0020 + days = 1 + } + } + scope:house_head = { + trigger_event = { + id = fp3_misc_decisions.0023 + days = 1 + } + # allow challenges again + if = { + limit = { is_alive = yes } + remove_character_flag = ongoing_house_head_challenge_flag + } + } + # If both parties are alive, and aren't good losers/don't have good reasons to forgive each other, then we mark them as potential rivals. + if = { + limit = { + scope:house_challenger = { + is_alive = yes + NOR = { + has_trait = humble + has_trait = content + has_trait = just + has_trait = forgiving + } + } + scope:house_head = { + is_alive = yes + NOR = { + has_trait = humble + has_trait = content + has_trait = just + has_trait = forgiving + } + can_set_relation_potential_rival_trigger = { CHARACTER = scope:house_challenger } + } + } + scope:house_challenger = { set_relation_potential_rival = scope:house_head } + } + } +} + +fp3_misc_decisions.0022 = { # Actor Duel opening + type = character_event + window = duel_event + title = fp3_misc_decisions.0022.t + desc = { + desc = fp3_misc_decisions.0022.desc.intro + desc = fp1_tbc.0001.desc.outro + desc = fp3_misc_decisions.0022.desc.body + } + theme = dynasty + left_portrait = { + character = scope:actor + animation = throne_room_one_handed_passive_1 + } + right_portrait = { + character = scope:recipient + animation = war_over_win + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # If, for any reason, scope:recipient has died or been imprisoned, then the bout is cancelled. + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + on_trigger_fail = { + # Inform both parties that the duel has invalidated. + scope:actor = { + send_interface_toast = { + title = fp3_misc_decisions.0022.trigger_failure.actor + left_icon = scope:recipient + } + } + scope:recipient = { + send_interface_toast = { + title = fp3_misc_decisions.0022.trigger_failure.recipient + left_icon = scope:actor + } + } + # Reset scope:actor's cooldowns against scope:recipient. + scope:actor = { + remove_interaction_cooldown = challenge_to_trial_by_combat_interaction + remove_interaction_cooldown_against = { + interaction = fp3_challenge_house_head_interaction + target = scope:recipient + } + } + scope:recipient = { + # allow challenges again + remove_character_flag = ongoing_house_head_challenge_flag + } + } + + immediate = { + play_music_cue = "mx_cue_combat_stinger" + # Nab scope:champion's location for terrain. + scope:recipient = { + # And scope:champion's location name for loc. + location.barony = { save_scope_as = duel_location } + } + } + + # Almost there. + option = { + name = fp3_misc_decisions.0022.a + + # Inform scope:actor that the bout will begin immediately. + custom_tooltip = fp3_misc_decisions.0022.a.tt + # Configure the bout. + switch = { + trigger = scope:lethal + yes = { + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:actor + SC_DEFENDER = scope:recipient + FATALITY = always + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = fp3_misc_decisions.0021 + INVALIDATION_EVENT = single_combat.1006 + } + } + no = { + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:actor + SC_DEFENDER = scope:recipient + FATALITY = no + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = fp3_misc_decisions.0021 + INVALIDATION_EVENT = single_combat.1006 + } + } + } + # No stress for single-option events. + ai_chance = { + # AI will always choose single option. + base = 100 + } + } +} + +fp3_misc_decisions.0023 = { # Recipient Duel Outcome(s) + type = character_event + title = fp3_misc_decisions.0020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sc_loser = { is_alive = no } + scope:sc_victor = scope:house_head + } + desc = fp3_misc_decisions.0023.desc.a.lethal + } + triggered_desc = { + trigger = { scope:sc_victor = scope:house_head } + desc = fp3_misc_decisions.0023.desc.a + } + desc = fp3_misc_decisions.0023.desc.b + } + } + + theme = dynasty + override_background = { reference = throne_room } + left_portrait = { + character = scope:house_head + animation = war_over_loss + + triggered_animation = { + trigger = { this = scope:sc_victor } + animation = war_over_win + } + } + right_portrait = { + character = scope:house_challenger + animation = war_over_loss + + triggered_animation = { + trigger = { is_alive = no } + animation = loss_1 + } + triggered_animation = { + trigger = { this = scope:sc_victor } + animation = war_over_win + } + } + + immediate = { + if = { + limit = { scope:sc_victor = scope:house_head } + show_as_tooltip = { fp3_challenge_house_head_duel_challenger_loss_effect = yes } # Prestige and hooks + } + else = { + show_as_tooltip = { + fp3_challenge_house_head_duel_challenger_win_prestige_effect = yes # Prestige gain + fp3_challenge_house_head_duel_challenger_win_house_effect = yes # House head change + } + } + } + + # OPTIONS FOR WINNER + option = { # Default option (goes on top, against design conventions) + name = fp3_misc_decisions.0023.win.a + trigger = { scope:sc_victor = scope:house_head } + } + + # OPTIONS FOR LOSER + option = { # Default option + name = fp3_misc_decisions.0023.lose.a + trigger = { scope:sc_victor = scope:house_challenger } + } +} + +fp3_misc_decisions.0025 = { # Interaction declined + type = letter_event + sender = scope:recipient + opening = fp3_misc_decisions.0025.t + desc = fp3_misc_decisions.0025.desc + + immediate = { + show_as_tooltip = { scope:recipient = { add_prestige = major_prestige_loss } } + } + + option = { + name = fp3_misc_decisions.0025.a + ai_chance = { + base = 25 + ai_value_modifier = { + ai_honor = 0.25 + } + } + } + + option = { + name = fp3_misc_decisions.0025.b + trigger = { + can_set_relation_rival_trigger = { CHARACTER = scope:recipient } + } + progress_towards_rival_effect = { + REASON = rival_house_head_rejected_challenge + CHARACTER = scope:recipient + OPINION = default_rival_opinion + } + ai_chance = { + base = 5 + ai_value_modifier = { + ai_boldness = 0.25 + ai_vengefulness = 0.5 + } + } + } +} + +fp3_misc_decisions.0026 = { # Actor Diplomacy opening + type = character_event + title = fp3_misc_decisions.0022.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + is_governor = yes + tgp_realm_has_ceremonial_liege_trigger = yes + } + } + desc = fp3_misc_decisions.0026.desc.no_court + } + desc = fp3_misc_decisions.0026.desc + } + } + theme = dynasty + left_portrait = { + character = scope:actor + animation = worry + } + right_portrait = { + character = scope:recipient + animation = war_over_win + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # If, for any reason, scope:recipient has died or been imprisoned, then the bout is cancelled. + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + on_trigger_fail = { + # Inform both parties that the duel has invalidated. + scope:actor = { + send_interface_toast = { + title = fp3_misc_decisions.0022.trigger_failure.actor + left_icon = scope:recipient + } + } + scope:recipient = { + send_interface_toast = { + title = fp3_misc_decisions.0022.trigger_failure.recipient + left_icon = scope:actor + } + } + # Reset scope:actor's cooldowns against scope:recipient. + scope:actor = { + remove_interaction_cooldown = challenge_to_trial_by_combat_interaction + remove_interaction_cooldown_against = { + interaction = fp3_challenge_house_head_interaction + target = scope:recipient + } + } + scope:recipient = { + # allow challenges again + remove_character_flag = ongoing_house_head_challenge_flag + } + } + + immediate = { + play_music_cue = "mx_cue_combat_stinger" + # Nab scope:champion's location for terrain. + scope:recipient = { + # And scope:champion's location name for loc. + location.barony = { save_scope_as = duel_location } + } + } + + # Almost there. + option = { + name = fp3_misc_decisions.0026.a + custom_tooltip = fp3_misc_decisions.0026.a.tt + trigger_event = { + id = fp3_misc_decisions.0027 + days = 1 + } + # No stress for single-option events. + ai_chance = { + # AI will always choose single option. + base = 100 + } + } +} + +fp3_misc_decisions.0027 = { # Actor reason choice + type = character_event + title = fp3_misc_decisions.0022.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:recipient.house.house_founder = scope:recipient } + desc = fp3_misc_decisions.0027.desc.founder + } + desc = fp3_misc_decisions.0027.desc + } + } + theme = dynasty + left_portrait = { + character = scope:actor + animation = admiration + } + right_portrait = { + character = scope:recipient + animation = thinking + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # Both parties alive and well + scope:actor = { + is_alive = yes + is_imprisoned = no + } + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + immediate = { + save_scope_value_as = { + name = recipient_skill_sum_75 + value = { + value = scope:recipient.sum_of_all_skills_value + multiply = 0.75 + round = yes + } + } + } + + # Age/health, a rational option + option = { + name = { + trigger = { + scope:recipient.health < fine_health + scope:recipient.health < scope:actor.health + } + text = fp3_misc_decisions.0027.a.sick + } + name = { + trigger = { + scope:recipient.age >= 50 + scope:recipient.age >= root.age_plus_25 + } + text = fp3_misc_decisions.0027.a.old + } + name = { + trigger = { + NOR = { + scope:recipient.age > scope:actor.age + AND = { + scope:recipient.health < fine_health + scope:recipient.health < scope:actor.health + } + AND = { + scope:recipient.age >= 50 + scope:recipient.age >= root.age_plus_25 + } + } + } + text = fp3_misc_decisions.0027.a.young + } + trigger = { + custom_tooltip = { + text = fp3_misc_decisions.0027.a.trigger + fp3_clan_challenge_negotiate_age_health_trigger = yes + } + } + show_as_unavailable = { always = yes } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient.health < fine_health + scope:recipient.health < scope:actor.health + } + desc = fp3_misc_decisions.0027.a.sick.tt + } + triggered_desc = { + trigger = { scope:recipient.age > scope:recipient.age } + desc = fp3_misc_decisions.0027.a.old.tt + } + triggered_desc = { + trigger = { scope:recipient.age < scope:actor.age } + desc = fp3_misc_decisions.0027.a.young.tt + } + } + } + duel = { + skills = { learning } + target = scope:recipient + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 2 + desc = fp3_misc_decisions.0027.accept + fp3_clan_challenge_negotiate_success_effect = { REASON = age } + } + 5 = { + # Personality + fp3_challenge_house_head_negotiation_bargain_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -49 + } + min = 2 + desc = fp3_misc_decisions.0027.bargain + fp3_clan_challenge_negotiate_bargain_effect = { REASON = age } + } + 20 = { + # Personality + fp3_challenge_house_head_negotiation_reject_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -49 + } + # Age + modifier = { + scope:recipient.age <= scope:actor.age_minus_10 + scope:recipient = { has_trait = arrogant } + add = 10 + } + # Health + modifier = { + add = { + value = scope:recipient.health + multiply = 2 + } + } + min = 15 + desc = fp3_misc_decisions.0027.reject + fp3_clan_challenge_negotiate_fail_effect = { REASON = age } + } + } + ai_chance = { + base = 100 + } + } + + # Strength, might makes right + option = { + name = { + trigger = { + scope:recipient = { is_vassal_or_below_of = scope:actor } + } + text = fp3_misc_decisions.0027.b.vassal + } + name = { + trigger = { scope:recipient.highest_held_title_tier < scope:actor.highest_held_title_tier } + text = fp3_misc_decisions.0027.b.tier + } + name = { + trigger = { scope:recipient.current_military_strength < scope:actor.current_strength_seventy_five_percent_value } + text = fp3_misc_decisions.0027.b.military + } + name = { + trigger = { + NOR = { + scope:recipient = { is_vassal_or_below_of = scope:actor } + scope:recipient.highest_held_title_tier < scope:actor.highest_held_title_tier + scope:recipient.current_military_strength < scope:actor.current_strength_seventy_five_percent_value + } + } + text = fp3_misc_decisions.0027.b.dread + } + trigger = { + custom_tooltip = { + text = fp3_misc_decisions.0027.b.trigger + OR = { + scope:recipient = { is_vassal_or_below_of = scope:actor } + scope:recipient.highest_held_title_tier < scope:actor.highest_held_title_tier + scope:recipient.current_military_strength < scope:actor.current_strength_seventy_five_percent_value + scope:recipient = { + has_dread_level_towards = { + target = scope:actor + level >= 1 + } + } + } + } + } + show_as_unavailable = { always = yes } + flavor = { + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { is_vassal_or_below_of = scope:actor } + } + desc = fp3_misc_decisions.0027.b.vassal.tt + } + triggered_desc = { + trigger = { scope:recipient.highest_held_title_tier < scope:actor.highest_held_title_tier } + desc = fp3_misc_decisions.0027.b.tier.tt + } + triggered_desc = { + trigger = { scope:recipient.current_military_strength < scope:actor.current_strength_seventy_five_percent_value } + desc = fp3_misc_decisions.0027.b.military.tt + } + desc = fp3_misc_decisions.0027.b.dread.tt + } + } + duel = { + skills = { martial } + target = scope:recipient + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 2 + desc = fp3_misc_decisions.0027.accept + fp3_clan_challenge_negotiate_success_effect = { REASON = strength } + } + 5 = { + # Personality + fp3_challenge_house_head_negotiation_bargain_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -49 + } + min = 2 + desc = fp3_misc_decisions.0027.bargain + fp3_clan_challenge_negotiate_bargain_effect = { REASON = strength } + } + 20 = { + fp3_challenge_house_head_negotiation_reject_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 15 + desc = fp3_misc_decisions.0027.reject + fp3_clan_challenge_negotiate_fail_effect = { REASON = strength } + } + } + ai_chance = { + base = 100 + } + } + + # Skill, just more qualified + option = { + name = fp3_misc_decisions.0027.c + trigger = { + custom_tooltip = { + text = fp3_misc_decisions.0027.c.trigger + scope:actor.sum_of_all_skills_value >= scope:recipient.sum_of_all_skills_value + } + } + show_as_unavailable = { always = yes } + flavor = fp3_misc_decisions.0027.c.tt + duel = { + skills = { diplomacy martial stewardship intrigue learning } + target = scope:recipient + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 2 + desc = fp3_misc_decisions.0027.accept + fp3_clan_challenge_negotiate_success_effect = { REASON = strength } + } + 5 = { + # Personality + fp3_challenge_house_head_negotiation_bargain_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -49 + } + min = 2 + desc = fp3_misc_decisions.0027.bargain + fp3_clan_challenge_negotiate_bargain_effect = { REASON = strength } + } + 20 = { + fp3_challenge_house_head_negotiation_reject_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 15 + desc = fp3_misc_decisions.0027.reject + fp3_clan_challenge_negotiate_fail_effect = { REASON = strength } + } + } + ai_chance = { + base = 100 + } + } + + # Fallback, pure charisma + option = { + name = fp3_misc_decisions.0027.d + duel = { + skills = { diplomacy intrigue } + target = scope:recipient + 1 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 2 + desc = fp3_misc_decisions.0027.accept + fp3_clan_challenge_negotiate_success_effect = { REASON = fallback } + } + 5 = { + fp3_challenge_house_head_negotiation_bargain_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -49 + } + min = 2 + desc = fp3_misc_decisions.0027.bargain + fp3_clan_challenge_negotiate_bargain_effect = { REASON = fallback } + } + 20 = { + fp3_challenge_house_head_negotiation_reject_modifier = yes + compare_modifier = { + value = scope:duel_value + multiplier = -5 + min = -49 + } + min = 15 + desc = fp3_misc_decisions.0027.reject + fp3_clan_challenge_negotiate_fail_effect = { REASON = fallback } + } + } + ai_chance = { + base = 25 + } + } + + after = { + scope:recipient = { + trigger_event = { + id = fp3_misc_decisions.0028 + days = 1 + } + } + } +} + +fp3_misc_decisions.0028 = { # Recipient response + type = character_event + title = fp3_misc_decisions.0022.t + desc = { + desc = fp3_misc_decisions.0028.desc + first_valid = { + triggered_desc = { + trigger = { scope:recipient.house.house_head = scope:recipient } + desc = fp3_misc_decisions.0028.desc.founder + } + desc = fp3_misc_decisions.0028.desc + } + first_valid = { + # Age + triggered_desc = { # Sick + trigger = { + scope:negotiate_reason = flag:age + scope:recipient.health < fine_health + scope:recipient.health < scope:actor.health + } + desc = fp3_misc_decisions.0028.sick + } + triggered_desc = { # Old + trigger = { + scope:negotiate_reason = flag:age + scope:recipient.age > scope:recipient.age + } + desc = fp3_misc_decisions.0028.old + } + triggered_desc = { # Young + trigger = { scope:negotiate_reason = flag:age } + desc = fp3_misc_decisions.0028.young + } + # Strength + triggered_desc = { + trigger = { + scope:negotiate_reason = flag:strength + scope:recipient = { is_vassal_or_below_of = scope:actor } + } + desc = fp3_misc_decisions.0028.vassal + } + triggered_desc = { + trigger = { + scope:negotiate_reason = flag:strength + scope:recipient.highest_held_title_tier < scope:actor.highest_held_title_tier + } + desc = fp3_misc_decisions.0028.tier + } + triggered_desc = { + trigger = { + scope:negotiate_reason = flag:strength + scope:recipient.current_military_strength < scope:actor.current_strength_seventy_five_percent_value + } + desc = fp3_misc_decisions.0028.military + } + triggered_desc = { + trigger = { scope:negotiate_reason = flag:strength } + desc = fp3_misc_decisions.0028.dread + } + # Skill + triggered_desc = { + trigger = { scope:negotiate_reason = flag:skill } + desc = fp3_misc_decisions.0028.skill + } + # Fallback + triggered_desc = { + trigger = { scope:negotiate_reason = flag:fallback } + desc = fp3_misc_decisions.0028.fallback + } + } + } + theme = dynasty + left_portrait = { + character = scope:recipient + animation = thinking + } + right_portrait = { + character = scope:actor + animation = admiration + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # Both parties alive and well + scope:actor = { + is_alive = yes + is_imprisoned = no + } + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + # Accept + option = { + name = fp3_misc_decisions.0028.a + save_scope_as = negotiate_accept + show_as_tooltip = { + house = { set_house_head = scope:actor } + } + add_character_flag = { + flag = accepted_house_head_challenge_flag + years = 10 + } + ai_chance = { + base = 0 + modifier = { + exists = scope:negotiate_success + add = 100 + } + modifier = { + exists = scope:negotiate_fail + factor = 0 + } + } + } + + # Bargain gold + option = { + name = fp3_misc_decisions.0028.c + save_scope_as = negotiate_gold + custom_tooltip = fp3_misc_decisions.0028.bargain.tt + show_as_tooltip = { + scope:actor = { + pay_short_term_gold = { + gold = scope:actor.medium_gold_value + target = scope:recipient + } + } + house = { set_house_head = scope:actor } + } + ai_chance = { + base = 0 + modifier = { + exists = scope:negotiate_bargain + add = 100 + } + modifier = { + exists = scope:negotiate_fail + factor = 0 + } + } + } + + # Bargain hook + option = { + name = fp3_misc_decisions.0028.d + save_scope_as = negotiate_hook + custom_tooltip = fp3_misc_decisions.0028.bargain.tt + show_as_tooltip = { + scope:recipient = { + add_hook_no_toast = { + target = scope:actor + type = predecessor_loyalty_hook + } + } + house = { set_house_head = scope:actor } + } + ai_chance = { + base = 0 + modifier = { + exists = scope:negotiate_bargain + add = 100 + } + modifier = { + exists = scope:negotiate_fail + factor = 0 + } + } + } + + # Reject + option = { + name = fp3_misc_decisions.0028.e + reverse_add_opinion = { + target = scope:actor + modifier = annoyed_opinion + opinion = -20 + } + ai_chance = { + base = 0 + modifier = { + exists = scope:negotiate_fail + add = 100 + } + } + } + + after = { + scope:actor = { + trigger_event = { + id = fp3_misc_decisions.0029 + days = 1 + } + } + } +} + +fp3_misc_decisions.0029 = { # Actor response + type = character_event + title = { + desc = { + first_valid = { + triggered_desc = { + trigger = { + calc_true_if = { + amount >= 1 + exists = scope:negotiate_gold + exists = scope:negotiate_hook + } + } + desc = fp3_misc_decisions.0022.t + } + desc = fp3_misc_decisions.0020.t + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + is_governor = yes + tgp_realm_has_ceremonial_liege_trigger = yes + } + } + desc = fp3_misc_decisions.0029.desc.no_court + } + desc = fp3_misc_decisions.0029.desc + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:negotiate_accept } + desc = fp3_misc_decisions.0029.accept + } + triggered_desc = { + trigger = { exists = scope:negotiate_gold } + desc = fp3_misc_decisions.0029.gold + } + triggered_desc = { + trigger = { exists = scope:negotiate_hook } + desc = fp3_misc_decisions.0029.hook + } + desc = fp3_misc_decisions.0029.fail + } + } + theme = dynasty + left_portrait = { + character = scope:actor + animation = war_over_loss + triggered_animation = { + trigger = { + OR = { + exists = scope:negotiate_gold + exists = scope:negotiate_hook + } + } + animation = war_over_tie + } + triggered_animation = { + trigger = { exists = scope:negotiate_accept } + animation = war_over_win + } + animation = war_over_loss + } + right_portrait = { + character = scope:recipient + animation = thinking + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # Both parties alive and well + scope:actor = { + is_alive = yes + is_imprisoned = no + } + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + immediate = { + if = { + limit = { + calc_true_if = { + amount = 0 + exists = scope:negotiate_gold + exists = scope:negotiate_hook + } + } + play_music_cue = "mx_cue_negative" + } + else_if = { + limit = { exists = scope:negotiate_accept } + play_music_cue = "mx_cue_positive_effect" + } + } + + # Accepted + option = { + name = fp3_misc_decisions.0029.a + trigger = { exists = scope:negotiate_accept } + save_scope_as = negotiate_accept + set_house_head_effect = { + NEW_HEAD = scope:actor + OLD_HEAD = scope:recipient + } + } + + # Accept bargain + option = { + name = fp3_misc_decisions.0029.b + trigger = { + calc_true_if = { + amount >= 1 + exists = scope:negotiate_gold + exists = scope:negotiate_hook + } + } + show_as_tooltip = { + switch = { + trigger = exists + scope:negotiate_gold = { + scope:actor = { + pay_short_term_gold = { + gold = scope:recipient.medium_gold_value + target = scope:recipient + } + } + } + scope:negotiate_hook = { + scope:recipient = { + add_hook_no_toast = { + target = scope:actor + type = predecessor_loyalty_hook + } + } + } + } + house = { set_house_head = scope:actor } + } + save_scope_as = negotiate_bargain_accept + scope:recipient = { trigger_event = fp3_misc_decisions.0030 } + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + content = minor_stress_impact_gain + } + } + + # Reject bargain + option = { + name = fp3_misc_decisions.0029.c + trigger = { + calc_true_if = { + amount >= 1 + exists = scope:negotiate_gold + exists = scope:negotiate_hook + } + } + save_scope_as = negotiate_bargain_reject + scope:recipient = { trigger_event = fp3_misc_decisions.0030 } + stress_impact = { + generous = minor_stress_impact_gain + humble = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } + + # Reject + option = { + name = fp3_misc_decisions.0029.d + trigger = { + calc_true_if = { + amount = 0 + exists = scope:negotiate_gold + exists = scope:negotiate_hook + exists = scope:negotiate_accept + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + exists = scope:negotiate_fail + add = 100 + } + } + } +} + +fp3_misc_decisions.0030 = { # Actor response + type = character_event + title = fp3_misc_decisions.0022.t + desc = { + desc = fp3_misc_decisions.0030.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:negotiate_bargain_accept } + desc = fp3_misc_decisions.0030.accept + } + desc = fp3_misc_decisions.0030.reject + } + } + theme = dynasty + left_portrait = { + character = scope:recipient + animation = war_over_win + } + right_portrait = { + character = scope:actor + animation = dismissal + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # Both parties alive and well + scope:actor = { + is_alive = yes + is_imprisoned = no + } + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + immediate = { + if = { + limit = { exists = scope:negotiate_bargain_accept } + switch = { + trigger = exists + scope:negotiate_gold = { + scope:actor = { + pay_short_term_gold = { + gold = scope:recipient.medium_gold_value + target = scope:recipient + } + } + } + scope:negotiate_hook = { + scope:recipient = { + add_hook_no_toast = { + target = scope:actor + type = predecessor_loyalty_hook + } + } + } + } + set_house_head_effect = { + NEW_HEAD = scope:actor + OLD_HEAD = scope:recipient + } + } + } + + # Accepted + option = { + name = fp3_misc_decisions.0030.a + trigger = { exists = scope:negotiate_bargain_accept } + } + + # Rejected + option = { + name = fp3_misc_decisions.0030.b + trigger = { exists = scope:negotiate_bargain_reject } + } +} + +fp3_misc_decisions.0041 = { # Murder attempt outcome + type = character_event + title = fp3_misc_decisions.0020.t + desc = { + desc = fp3_misc_decisions.0041.intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:challenge_murder_success } + desc = fp3_misc_decisions.0041.desc.success + } + desc = fp3_misc_decisions.0041.desc.failure + } + } + theme = dynasty + left_portrait = { + character = scope:house_challenger + animation = loss_1 + triggered_animation = { + trigger = { exists = scope:challenge_murder_success } + animation = assassin + } + } + right_portrait = { + character = scope:house_head + animation = anger + triggered_animation = { + trigger = { exists = scope:challenge_murder_success } + animation = fear + } + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # Both parties alive and well + scope:actor = { + is_alive = yes + is_imprisoned = no + } + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + immediate = { + add_prestige = massive_prestige_loss + add_prestige_level = -1 + if = { + limit = { exists = scope:challenge_murder_success } + set_house_head_effect = { + NEW_HEAD = scope:house_challenger + OLD_HEAD = scope:house_head + } + show_as_tooltip = { + known_murder_effect = { VICTIM = scope:house_head MURDERER = scope:house_challenger EXPOSER = scope:house_challenger } + } + scope:house_head = { trigger_event = fp3_misc_decisions.0043 } + } + else = { + scope:house_head = { + show_as_tooltip = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:house_challenger } + } + set_relation_rival = { + target = scope:house_challenger + reason = rival_tried_to_kill_me + } + } + } + if = { + limit = { exists = scope:challenge_wound } + show_as_tooltip = { + increase_wounds_no_death_effect = { REASON = murder } + } + } + } + show_as_tooltip = { + attempted_murder_opinion_effect = { + VICTIM = scope:house_head + MURDERER = scope:house_challenger + } + } + show_as_tooltip = { + scope:house_head = { + imprison = { + target = scope:house_challenger + type = house_arrest + } + } + } + scope:house_head = { trigger_event = fp3_misc_decisions.0042 } + } + } + + # Yay + option = { + name = fp3_misc_decisions.0041.a + trigger = { exists = scope:challenge_murder_success } + } + + # Curses + option = { + name = fp3_misc_decisions.0041.b + trigger = { + NOT = { exists = scope:challenge_murder_success } + } + } +} + +fp3_misc_decisions.0042 = { # Failed Murder ping + type = character_event + title = fp3_misc_decisions.0020.t + desc = fp3_misc_decisions.0042.desc + theme = dynasty + left_portrait = { + character = scope:house_head + animation = anger + } + right_portrait = { + character = scope:house_challenger + animation = fear + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # Both parties alive and well + scope:actor = { + is_alive = yes + is_imprisoned = no + } + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + immediate = { + if = { + limit = { exists = scope:challenge_wound } + increase_wounds_no_death_effect = { REASON = murder } + } + show_as_tooltip = { + scope:house_challenger = { + add_prestige = massive_prestige_loss + add_prestige_level = -1 + } + attempted_murder_opinion_effect = { + VICTIM = scope:house_head + MURDERER = scope:house_challenger + } + } + rightfully_imprison_character_effect = { + TARGET = scope:house_challenger + IMPRISONER = scope:house_head + } + } + + # Yay + option = { + name = fp3_misc_decisions.0042.a + trigger = { exists = scope:challenge_murder_success } + } +} + +fp3_misc_decisions.0043 = { # Succesful Murder ping + type = character_event + title = fp3_misc_decisions.0020.t + desc = fp3_misc_decisions.0043.desc + theme = dynasty + left_portrait = { + character = scope:house_head + animation = loss_1 + } + right_portrait = { + character = scope:house_challenger + animation = assassin + } + override_background = { reference = throne_room } + + trigger = { + # DLC check. + has_fp3_dlc_trigger = yes + # Both parties alive and well + scope:actor = { + is_alive = yes + is_imprisoned = no + } + scope:recipient = { + is_alive = yes + is_imprisoned = no + } + } + + immediate = { + show_as_tooltip = { + scope:house_challenger = { + add_prestige = massive_prestige_loss + add_prestige_level = -1 + } + } + known_murder_effect = { VICTIM = scope:house_head MURDERER = scope:house_challenger EXPOSER = scope:house_challenger } + } + + # Curses + option = { + name = fp3_misc_decisions.0043.a + } +} + +################################################## +# Favour Skilled Outsiders +# by Ewan Cowhig Croft +# 0031 - 0040 +################################################## + +scripted_trigger fp3_misc_decisions_0031_preferred_ethoses_trigger = { + # Eloquent Captains + trigger_if = { + limit = { scope:outsider_diplomacy_martial = yes } + # Cultures more likely to send people to this type of position. + culture = { + OR = { + has_cultural_pillar = ethos_bellicose + has_cultural_pillar = ethos_courtly + } + } + } + # Career Soldiers + trigger_if = { + limit = { scope:outsider_martial_prowess = yes } + # Cultures more likely to send people to this type of position. + culture = { + OR = { + has_cultural_pillar = ethos_bellicose + has_cultural_pillar = ethos_stoic + } + } + } + # Fringe Nobility + trigger_if = { + limit = { scope:outsider_prowess_learning = yes } + # Cultures more likely to send people to this type of position. + culture = { + OR = { + has_cultural_pillar = ethos_stoic + has_cultural_pillar = ethos_communal + } + } + } + # Dedicated Functionaries + trigger_if = { + limit = { scope:outsider_learning_intrigue = yes } + # Cultures more likely to send people to this type of position. + culture = { + OR = { + has_cultural_pillar = ethos_bureaucratic + has_cultural_pillar = ethos_spiritual + } + } + } + # Cunning Officials + trigger_if = { + limit = { scope:outsider_intrigue_stewardship = yes } + # Cultures more likely to send people to this type of position. + culture = { + OR = { + has_cultural_pillar = ethos_courtly + has_cultural_pillar = ethos_egalitarian + } + } + } + # Skilled Administrators + trigger_if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + # Cultures more likely to send people to this type of position. + culture = { + OR = { + has_cultural_pillar = ethos_bureaucratic + has_cultural_pillar = ethos_spiritual + } + } + } +} + +scripted_effect fp3_misc_decisions_0031_create_char_no_dynasty_effect = { + create_character = { + template = fp3_skilled_outsider_template + location = scope:batch_$BATCH$_county.title_province + dynasty = none + culture = scope:batch_$BATCH$_county.culture + faith = scope:batch_$BATCH$_county.faith + after_creation = { + add_to_list = batch_$BATCH$_characters_list + # Set an employer if there's a valid one available. + if = { + limit = { + scope:outsider_diplomacy_martial = yes + root.cp:councillor_chancellor ?= { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_chancellor + } + else_if = { + limit = { + scope:outsider_martial_prowess = yes + root.cp:councillor_steward ?= { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_steward + } + else_if = { + limit = { + scope:outsider_stewardship_diplomacy = yes + root.cp:councillor_marshal ?= { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_marshal + } + else_if = { + limit = { + scope:outsider_intrigue_stewardship = yes + root.cp:councillor_spymaster ?= { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_spymaster + } + else_if = { + limit = { + scope:outsider_learning_intrigue = yes + root.cp:councillor_court_chaplain ?= { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_court_chaplain + } + } + } +} + +scripted_effect fp3_misc_decisions_0031_create_char_with_dynasty_effect = { + create_character = { + template = fp3_skilled_outsider_template + location = scope:batch_$BATCH$_county.title_province + culture = scope:batch_$BATCH$_county.culture + faith = scope:batch_$BATCH$_county.faith + after_creation = { + add_to_list = batch_$BATCH$_characters_list + # Set an employer if there's a valid one available. + if = { + limit = { + scope:outsider_diplomacy_martial = yes + root.cp:councillor_chancellor = { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_chancellor + } + else_if = { + limit = { + scope:outsider_martial_prowess = yes + root.cp:councillor_steward = { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_steward + } + else_if = { + limit = { + scope:outsider_stewardship_diplomacy = yes + root.cp:councillor_marshal = { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_marshal + } + else_if = { + limit = { + scope:outsider_intrigue_stewardship = yes + root.cp:councillor_spymaster = { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_spymaster + } + else_if = { + limit = { + scope:outsider_learning_intrigue = yes + root.cp:councillor_court_chaplain = { + is_ruler = yes + is_ai = yes + } + } + set_employer = root.cp:councillor_court_chaplain + } + } + } +} + +scripted_effect fp3_misc_decisions_0031_pick_best_appropriate_char_effect = { + ordered_in_list = { + list = batch_$BATCH$_characters_list + order_by = { + if = { + limit = { scope:outsider_diplomacy_martial = yes } + add = diplomacy + } + if = { + limit = { scope:outsider_martial_prowess = yes } + add = martial + } + if = { + limit = { scope:outsider_prowess_learning = yes } + add = prowess + } + if = { + limit = { scope:outsider_learning_intrigue = yes } + add = learning + } + if = { + limit = { scope:outsider_intrigue_stewardship = yes } + add = intrigue + } + if = { + limit = { scope:outsider_stewardship_diplomacy = yes } + add = stewardship + } + } + save_scope_as = batch_$BATCH$_char1 + } +} + +scripted_effect fp3_misc_decisions_0031_apply_opinion_to_batch_effect = { + every_in_list = { + list = batch_$BATCH$_characters_list + custom = fp3_misc_decisions.0031.tt.all_outsiders + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 80 + } + # Since we're giving you a loyalty hook, we don't bother to take up option space with separate options for requesting their conversion - if you want it, you can always make 'em. + custom_tooltip = { + text = fp3_misc_decisions.0031.tt.all_outsiders.you_gain_hook + root = { + add_hook = { + type = loyalty_hook + target = prev + } + } + } + } +} + +# Recruit skilled outsiders from the lower ranks of your administration. +fp3_misc_decisions.0031 = { + type = character_event + title = favour_skilled_outsiders_decision + desc = { + desc = fp3_misc_decisions.0031.desc.intro + # How many cultures are we drawing from? + first_valid = { + # Are we taking all our guys from the same county? + triggered_desc = { + trigger = { scope:batch_a_county = scope:batch_b_county } + desc = fp3_misc_decisions.0031.desc.cultures.single + } + # Otherwise, use the multi-county loc. + desc = fp3_misc_decisions.0031.desc.cultures.fallback + } + } + theme = realm + left_portrait = { + character = scope:batch_a_char1 + animation = ecstasy + } + right_portrait = { + character = scope:batch_b_char1 + animation = personality_compassionate + } + lower_left_portrait = scope:batch_a_char2 + lower_center_portrait = scope:batch_a_char3 + lower_right_portrait = scope:batch_b_char2 + + immediate = { + # Finally, as we sorted ordered rankings out in the previous event, make sure that batch B is always higher quality. + hidden_effect = { + # Does scope:batch_b_char1 need elevating? + scope:batch_b_char1 = { + if = { + limit = { + scope:outsider_diplomacy_martial = yes + diplomacy < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + } + add_diplomacy_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + subtract = diplomacy + } + } + if = { + limit = { + scope:outsider_martial_prowess = yes + martial < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + } + add_martial_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + subtract = martial + } + } + if = { + limit = { + scope:outsider_prowess_learning = yes + prowess < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + } + add_prowess_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + subtract = prowess + } + } + if = { + limit = { + scope:outsider_learning_intrigue = yes + learning < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + } + add_learning_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + subtract = learning + } + } + if = { + limit = { + scope:outsider_intrigue_stewardship = yes + intrigue < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + } + add_intrigue_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + subtract = intrigue + } + } + if = { + limit = { + scope:outsider_stewardship_diplomacy = yes + stewardship < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + } + add_stewardship_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char1_value + subtract = stewardship + } + } + } + # Does scope:batch_b_char2 need a lil boost also? + scope:batch_b_char2 = { + if = { + limit = { + scope:outsider_diplomacy_martial = yes + diplomacy < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + } + add_diplomacy_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + subtract = diplomacy + } + } + if = { + limit = { + scope:outsider_martial_prowess = yes + martial < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + } + add_martial_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + subtract = martial + } + } + if = { + limit = { + scope:outsider_prowess_learning = yes + prowess < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + } + add_prowess_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + subtract = prowess + } + } + if = { + limit = { + scope:outsider_learning_intrigue = yes + learning < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + } + add_learning_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + subtract = learning + } + } + if = { + limit = { + scope:outsider_intrigue_stewardship = yes + intrigue < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + } + add_intrigue_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + subtract = intrigue + } + } + if = { + limit = { + scope:outsider_stewardship_diplomacy = yes + stewardship < scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + } + add_stewardship_skill = { + value = scope:batch_a_char1.fp3_skilled_outsider_minimum_main_skill_batch_b_char2_value + subtract = stewardship + } + } + } + # If we have a player, force a second skill recalc so that they can accurately see what they're getting. + if = { + limit = { + root = { is_ai = no } + } + scope:batch_b_char1 = { force_character_skill_recalculation = yes } + scope:batch_b_char2 = { force_character_skill_recalculation = yes } + } + } + } + + # Select batch A. + option = { + name = fp3_misc_decisions.0031.a + + # Gain the courtiers. + ## Added individually rather than through the same effect as opinion so you can easily see exactly who you get. + add_courtier = scope:batch_a_char1 + add_courtier = scope:batch_a_char2 + add_courtier = scope:batch_a_char3 + fp3_misc_decisions_0031_apply_opinion_to_batch_effect = { BATCH = a } + # Apply opinion maluses. + scope:batch_a_char1 = { save_scope_as = outsider_select } + favour_skilled_outsiders_decision_apply_opinions_effect = yes + + # No stress gain here. + ai_chance = { + base = 1 + # No AI value modifier - this is really just a pick you gut-feel as either a player or the AI. + # Though the AI is more likely to pick cultures you get on with better. + modifier = { + add = 75 + culture = { + cultural_acceptance = { + target = scope:batch_a_char1.culture + value >= 75 + } + } + } + modifier = { + add = 50 + culture = { + cultural_acceptance = { + target = scope:batch_a_char1.culture + value >= 50 + } + } + } + modifier = { + add = 25 + culture = { + cultural_acceptance = { + target = scope:batch_a_char1.culture + value >= 25 + } + } + } + } + } + + # Select batch B. + option = { + name = fp3_misc_decisions.0031.b + + # Gain the courtiers. + ## Added individually rather than through the same effect as opinion so you can easily see exactly who you get. + add_courtier = scope:batch_b_char1 + add_courtier = scope:batch_b_char2 + fp3_misc_decisions_0031_apply_opinion_to_batch_effect = { BATCH = b } + # Apply opinion maluses. + scope:batch_b_char1 = { save_scope_as = outsider_select } + favour_skilled_outsiders_decision_apply_opinions_effect = yes + + # No stress gain here. + ai_chance = { + base = 1 + # No AI value modifier - this is really just a pick you gut-feel as either a player or the AI. + # Though the AI is more likely to pick cultures you get on with better. + modifier = { + add = 75 + culture = { + cultural_acceptance = { + target = scope:batch_b_char1.culture + value >= 75 + } + } + } + modifier = { + add = 50 + culture = { + cultural_acceptance = { + target = scope:batch_b_char1.culture + value >= 50 + } + } + } + modifier = { + add = 25 + culture = { + cultural_acceptance = { + target = scope:batch_b_char1.culture + value >= 25 + } + } + } + } + } + + # Change your mind. + option = { + name = fp3_misc_decisions.0031.c + trigger = { is_ai = no } + + # RIP. + ## Job interviews suck. + custom_tooltip = fp3_misc_decisions.0031.c.tt + # Your prestige is refunded. + hidden_effect = { add_prestige_no_experience = scope:prestige_cost } + # We leave the decision on cooldown, though — otherwise you could just cycle through it repeatedly till you get the best conceivable recruits. + + # No stress gain here. + # No ai_chance; this is for the player to change their mind. If the AI gets this far, it should roll with it. + } + + after = { + # Remove the batch we didn't recruit. + hidden_effect = { + if = { + limit = { + NOT = { scope:batch_a_char1.liege ?= root } + } + every_in_list = { + list = batch_a_characters_list + silent_disappearance_effect = yes + } + } + if = { + limit = { + NOT = { scope:batch_b_char1.liege ?= root } + } + every_in_list = { + list = batch_b_characters_list + silent_disappearance_effect = yes + } + } + } + } +} + +# Laundering event to spawn the characters so that we can do some skill updating magic which'd otherwise error. +fp3_misc_decisions.0032 = { + hidden = yes + + immediate = { + # Alright, let's generate some characters! + ## First, we need to compile a list of valid cultures. + ### Sort our total possible candidates. + every_sub_realm_county = { + limit = { favour_skilled_outsiders_decision_valid_county_to_generate_trigger = yes } + # So we nab every valid county. + add_to_list = sub_realm_minority_cultures_county_pre_filter_list + # And every valid _culture_: we're gonna need to use these as a limit against the above list in a sec. + culture = { add_to_list = sub_realm_minority_cultures_tally_list } + } + ### Grab the tally of how many possible cultures we need for the final list. + #### This'll tell us how many times to iterate over the counties list total so that we end up with one county per valid culture instead of every county for every valid culture. + save_scope_value_as = { + name = while_count_value + value = { + every_in_list = { + list = sub_realm_minority_cultures_tally_list + add = 1 + } + } + } + ### Then we loop through and pick our finalists. + #### Hide the effect, because the while loop's tally will show even if nothing in it is visible to the player. + hidden_effect = { + while = { + count = scope:while_count_value + # First, nab a random culture we haven't used yet from the list of cultures to account for. + random_in_list = { + list = sub_realm_minority_cultures_tally_list + save_scope_as = current_culture + # We remove from the list so that we don't roll this culture again - effectively marking it as used. + remove_from_list = sub_realm_minority_cultures_tally_list + } + # Now, process through the complete list of counties to find the best possible fit that matches the valid culture. + ordered_in_list = { + list = sub_realm_minority_cultures_county_pre_filter_list + limit = { culture = scope:current_culture } + order_by = { + value = development_level + # Weight down for places that don't follow the same HoF. + if = { + limit = { + exists = root.faith.religious_head + faith.religious_head ?= root.faith.religious_head + } + add = { + value = development_level + multiply = -0.1 + } + } + # Weight down by root's hostility. + ## Righteous is perfect. + ## Astray, lose a little. + if = { + limit = { + root.faith = { + faith_hostility_level = { + target = prev.faith + value = faith_astray_level + } + } + } + add = { + value = development_level + multiply = -0.1 + } + } + ## Hostile, lose a little more. + if = { + limit = { + root.faith = { + faith_hostility_level = { + target = prev.faith + value = faith_hostile_level + } + } + } + add = { + value = development_level + multiply = -0.25 + } + } + ## Evil, lose a lottle more. + if = { + limit = { + root.faith = { + faith_hostility_level = { + target = prev.faith + value = faith_evil_level + } + } + } + add = { + value = development_level + multiply = -0.4 + } + } + } + add_to_list = sub_realm_minority_cultures_final_counties_list + } + } + } + ### For debug purposes: here so you can de-clog the tooltip if you need it to stop displaying _every_ valid county and just show you some selected appropriate scopes. + if = { + limit = { always = no } + every_in_list = { + list = sub_realm_minority_cultures_county_pre_filter_list + remove_from_list = sub_realm_minority_cultures_county_pre_filter_list + } + } + ## Sweet, now let's try to pick two from the list. + ### + if = { + limit = { + list_size = { + name = sub_realm_minority_cultures_final_counties_list + value >= 2 + } + } + # Try to grab a culture for batch A that matches our needs. + random_in_list = { + list = sub_realm_minority_cultures_final_counties_list + limit = { fp3_misc_decisions_0031_preferred_ethoses_trigger = yes } + alternative_limit = { always = yes } + weight = { fp3_misc_decisions_0031_preferred_cultrads_modifier = yes } + save_scope_as = batch_a_county + } + # And try to grab one for batch B that does the same whilst not being batch A. + random_in_list = { + list = sub_realm_minority_cultures_final_counties_list + limit = { + fp3_misc_decisions_0031_preferred_ethoses_trigger = yes + this != scope:batch_a_county + } + alternative_limit = { + this != scope:batch_a_county + } + weight = { fp3_misc_decisions_0031_preferred_cultrads_modifier = yes } + save_scope_as = batch_b_county + } + } + ### Otherwise, we've only got one item in the list, so just grab it twice. + else = { + random_in_list = { + list = sub_realm_minority_cultures_final_counties_list + save_scope_as = batch_a_county + } + scope:batch_a_county = { save_scope_as = batch_b_county } + } + ## Right, now let's generate batch A. + ### Slightly different parameters if we're using the fallback option. + if = { + limit = { scope:outsider_prowess_learning = yes } + fp3_misc_decisions_0031_create_char_with_dynasty_effect = { BATCH = a } + fp3_misc_decisions_0031_create_char_with_dynasty_effect = { BATCH = a } + fp3_misc_decisions_0031_create_char_with_dynasty_effect = { BATCH = a } + } + ### Otherwise, they're not nobles in any capacity, so remove their dynasties. + else = { + fp3_misc_decisions_0031_create_char_no_dynasty_effect = { BATCH = a } + fp3_misc_decisions_0031_create_char_no_dynasty_effect = { BATCH = a } + fp3_misc_decisions_0031_create_char_no_dynasty_effect = { BATCH = a } + } + ## Aaaaand batch B. + ### Slightly different parameters if we're using the fallback option. + if = { + limit = { scope:outsider_prowess_learning = yes } + fp3_misc_decisions_0031_create_char_with_dynasty_effect = { BATCH = b } + fp3_misc_decisions_0031_create_char_with_dynasty_effect = { BATCH = b } + } + ### Otherwise, they're not nobles in any capacity, so remove their dynasties. + else = { + fp3_misc_decisions_0031_create_char_no_dynasty_effect = { BATCH = b } + fp3_misc_decisions_0031_create_char_no_dynasty_effect = { BATCH = b } + } + ### Plus go over batch B & upgrade their education traits by +2. + every_in_list = { + list = batch_b_characters_list + hidden_effect = { + # Which education track are they on? + ## Diplomacy + if = { + limit = { has_trait = education_diplomacy_1 } + remove_trait = education_diplomacy_1 + add_trait = education_diplomacy_3 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + else_if = { + limit = { has_trait = education_diplomacy_2 } + remove_trait = education_diplomacy_2 + add_trait = education_diplomacy_4 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + ## Martial + if = { + limit = { has_trait = education_martial_1 } + remove_trait = education_martial_1 + add_trait = education_martial_3 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + else_if = { + limit = { has_trait = education_martial_2 } + remove_trait = education_martial_2 + add_trait = education_martial_4 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + ## Stewardship + if = { + limit = { has_trait = education_stewardship_1 } + remove_trait = education_stewardship_1 + add_trait = education_stewardship_3 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + else_if = { + limit = { has_trait = education_stewardship_2 } + remove_trait = education_stewardship_2 + add_trait = education_stewardship_4 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + ## Intrigue + if = { + limit = { has_trait = education_intrigue_1 } + remove_trait = education_intrigue_1 + add_trait = education_intrigue_3 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + else_if = { + limit = { has_trait = education_intrigue_2 } + remove_trait = education_intrigue_2 + add_trait = education_intrigue_4 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + ## Learning + if = { + limit = { has_trait = education_learning_1 } + remove_trait = education_learning_1 + add_trait = education_learning_3 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + else_if = { + limit = { has_trait = education_learning_2 } + remove_trait = education_learning_2 + add_trait = education_learning_4 + # Force a skill recalc so that we can evaluate who's in the lead later. + ## Remember that only two of these'll ever be applied in total, so it's not too bad to be using them like this. + force_character_skill_recalculation = yes + } + } + } + ## Select our representatives. + fp3_misc_decisions_0031_pick_best_appropriate_char_effect = { BATCH = a } + fp3_misc_decisions_0031_pick_best_appropriate_char_effect = { BATCH = b } + ## And fill out our fodder. + random_in_list ={ + list = batch_a_characters_list + limit = { + this != scope:batch_a_char1 + } + save_scope_as = batch_a_char2 + # Plus we make the characters within each group get on, as they're sorta local allies. + hidden_effect = { set_relation_friend = scope:batch_a_char1 } + } + random_in_list = { + list = batch_a_characters_list + limit = { + NOR = { + this = scope:batch_a_char1 + this = scope:batch_a_char2 + } + } + save_scope_as = batch_a_char3 + # Plus we make the characters within each group get on, as they're sorta local allies. + hidden_effect = { + set_relation_friend = scope:batch_a_char1 + set_relation_friend = scope:batch_a_char2 + } + } + random_in_list = { + list = batch_b_characters_list + limit = { + this != scope:batch_b_char1 + } + save_scope_as = batch_b_char2 + # Plus we make the characters within each group get on, as they're sorta local allies. + hidden_effect = { set_relation_best_friend = scope:batch_b_char1 } + } + # Now fire the actual event! + trigger_event = fp3_misc_decisions.0031 + } +} + +################################################## +# Adopt Clan Government +# by Joe Parkin +# 0051-0060 +################################################## + +fp3_misc_decisions.0051 = { # Adopt Clan Government through House + type = character_event + title = fp3_misc_decisions.0051.t + desc = fp3_misc_decisions.0051.desc + theme = dynasty + left_portrait = { + character = root + animation = personality_rational + } + lower_right_portrait = house.house_head + + immediate = { + change_government = clan_government + # Increase unity, uses this effect since both chars are not clan when script is evaluated + house.house_head = { + apply_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = root.house.house_head + DESC = clan_unity_adopt_clan.desc + VALUE = medium_unity_gain + VALUE_REVERSED = no + } + } + hidden_effect = { + house.house_head = { + send_interface_toast = { + title = fp3_become_clan_government_decision_toast + left_icon = root + right_icon = house.house_head + show_as_tooltip = { + root = { + # Change government type + change_government = clan_government + # Increase unity, uses this effect since both chars are not clan when script is evaluated + house.house_head = { + apply_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = root.house.house_head + DESC = clan_unity_adopt_clan.desc + VALUE = medium_unity_gain + VALUE_REVERSED = no + } + } + } + } + } + } + } + } + + option = { + name = fp3_misc_decisions.0051.a + } +} diff --git a/N3OW/events/dlc/fp3/fp3_religious_decision_events.txt b/N3OW/events/dlc/fp3/fp3_religious_decision_events.txt new file mode 100644 index 00000000..c560a0f5 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_religious_decision_events.txt @@ -0,0 +1,1362 @@ +namespace = fp3_decision + +################################################## +# #Zoroastrian Decision Events + +################################################## + +fp3_decision.0001 = { + type = character_event + title = fp3_decision.0001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_faith = faith:mazdakism + } + desc = fp3_decision.0001.desc_mazdakist + } + triggered_desc = { + trigger = { + has_faith = faith:khurramism + } + desc = fp3_decision.0001.desc_khurramite + } + desc = fp3_decision.0001.desc_general_zoroastrian + } + desc = fp3_decision.0001_desc_ending + } + + + + theme = crown + override_background = { reference = throne_room_east } + + left_portrait = { + character = root + animation = personality_bold + } + + option = { #If you're of the Mazdakite or Behafarid inclination, you might rather want to destroy the fires + name = fp3_decision.0001.a + flavor = fp3_decision.0001.a.tt + + trigger = { + OR = { + has_faith = faith:mazdakism + has_faith = faith:zurvanism #Behafaridism + faith = { + OR = { + has_doctrine_parameter = vows_of_poverty_active + has_doctrine = tenet_gnosticism + } + } + } + } + + add_piety = major_piety_gain + + custom_tooltip = fp3_decision.0001_pledged_to_quench_fire + hidden_effect = { + add_character_flag = { + flag = pledged_to_quench_fire + days = 7300 + } + } + + stress_impact = { + zealous = major_stress_loss + ambitious = minor_stress_loss + } + + ai_chance = { #ambitious, vengeful Mazdaki AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_energy = 1 + ai_vengefulness = 1 + ai_zeal = 1 + } + } + } + + option = { #Kindle the fire (elaborate ceremony) + name = fp3_decision.0001.b + + add_piety = massive_piety_loss + + dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } + + add_character_modifier = { + modifier = fp3_royal_fire_modifier + } + + custom_tooltip = fp3_decision.0001_vassal_and_courtier_opinion_impressed + hidden_effect = { + every_vassal = { + IF = { + limit = { + NOT = { + has_religion = religion:zoroastrianism_religion + } + OR = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + faith = { has_doctrine = doctrine_pluralism_righteous } + } + } + add_opinion = { + target = root + opinion = -20 + modifier = fp3_strange_rituals_opinion + } + } + ELSE = { + add_opinion = { + target = root + opinion = 15 + modifier = fp3_magnificent_fire_ritual_opinion + } + } + } + every_courtier = { + IF = { + limit = { + NOT = { + has_religion = religion:zoroastrianism_religion + } + OR = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + faith = { has_doctrine = doctrine_pluralism_righteous } + } + } + add_opinion = { + target = root + opinion = -20 + modifier = fp3_strange_rituals_opinion + } + } + ELSE = { + add_opinion = { + target = root + opinion = 15 + modifier = fp3_magnificent_fire_ritual_opinion + } + } + } + } + + ai_chance = { #ambitious and zealous AIs pick this option + base = 10 + ai_value_modifier = { + ai_energy = 0.5 + ai_zeal = 1 + } + } + + stress_impact = { #Ambitious rulers of course like this, but paranoid ones are worried about offending people. + ambitious = medium_stress_impact_loss + arrogant = medium_stress_impact_loss + zealous = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + august = medium_stress_impact_loss + gallant = medium_stress_impact_loss + content = miniscule_stress_impact_gain + cynical = minor_stress_impact_gain + temperate = miniscule_stress_impact_gain + paranoid = minor_stress_impact_gain + } + } + + option = { #Kindle the fire (less elaborate ceremony) + name = fp3_decision.0001.c + + + add_piety = major_piety_loss + + add_character_modifier = { + modifier = fp3_royal_fire_modifier + } + + custom_tooltip = fp3_decision.0001_vassal_and_courtier_opinion + hidden_effect = { + every_vassal = { + IF = { + limit = { + NOT = { + has_religion = religion:zoroastrianism_religion + } + OR = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + faith = { has_doctrine = doctrine_pluralism_righteous } + } + } + add_opinion = { + target = root + opinion = -20 + modifier = fp3_strange_rituals_opinion + } + } + ELSE = { + add_opinion = { + target = root + opinion = 10 + modifier = fp3_blessed_by_fire_opinion + } + } + } + every_courtier = { + IF = { + limit = { + NOT = { + has_religion = religion:zoroastrianism_religion + } + OR = { + faith = { has_doctrine = doctrine_pluralism_fundamentalist } + faith = { has_doctrine = doctrine_pluralism_righteous } + } + } + add_opinion = { + target = root + opinion = -20 + modifier = fp3_strange_rituals_opinion + } + } + ELSE = { + add_opinion = { + target = root + opinion = 10 + modifier = fp3_blessed_by_fire_opinion + } + } + } + } + + ai_chance = { #more cautious AIs pick this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.5 + ai_greed = 1 + } + } + + stress_impact = { #Wasteful or ambitious rulers loathe this more moderate option, but temperate and content rulers love it. + ambitious = minor_stress_impact_gain + zealous = miniscule_stress_impact_gain + august = minor_stress_impact_gain + gallant = miniscule_stress_impact_gain + paranoid = minor_stress_impact_gain + content = medium_stress_impact_loss + temperate = medium_stress_impact_loss + } + } + + option = { #Skip it for now + name = fp3_decision.0001.d + + ai_chance = { #the AI generally shouldn't pick this, as it's the opting-out-option + base = 1 + } + } +} + +fp3_decision.0002 = { + type = character_event + title = fp3_decision.0002.t + desc = fp3_decision.0002.desc + + theme = death + left_portrait = { + character = scope:occupant + animation = celebrate_sword + } + right_portrait = { + character = ROOT + animation = shock + } + override_background = { reference = battlefield } + + trigger = { + + is_ai = no + has_character_modifier = fp3_royal_fire_modifier + } + + cooldown = { years = 30 } + + immediate = { + + remove_character_modifier = fp3_royal_fire_modifier + + hidden_effect = { + add_character_flag = { + flag = fire_recently_quenched + days = 1825 + } + } + + if = { + limit = { + OR = { + has_trait = ambitious + has_trait = august + has_trait = craven + has_trait = gallant + has_trait = zealous + has_trait = arrogant + has_trait = paranoid + has_trait = lunatic + } + } + add_stress = major_stress_impact_gain + } + else = { add_stress = medium_stress_impact_gain } + + + custom_tooltip = fp3_decision.0002_fire_destroyed_tt + hidden_effect = { #Now they like you less because your royal fire got quenched + every_vassal = { + if = { + limit = { + NOR = { #but these personalities stand by you no matter what, or are less superstitious + has_trait = cynical + has_trait = trusting + has_trait = forgiving + has_trait = brave + } + } + add_opinion = { + target = root + opinion = -20 + modifier = fp3_bad_portent_opinion + } + } + } + every_courtier = { #but these personalities stand by you no matter what, or are less superstitious + if = { + limit = { + NOR = { + has_trait = brave + has_trait = cynical + has_trait = trusting + has_trait = forgiving + } + } + add_opinion = { + target = root + opinion = -20 + modifier = fp3_bad_portent_opinion + } + } + } + } + } + + option = { #It matters not, it was merely a symbol + name = fp3_decision.0002.a + + trigger = { + OR = { + has_trait = calm + has_trait = content + has_trait = cynical + has_trait = diplomat + has_trait = temperate + has_trait = saoshyant + } + } + + add_piety = minor_piety_loss + + add_stress = medium_stress_impact_loss + } + + option = { #This atrocity must be avenged! + name = fp3_decision.0002.b + trigger = { + scope:occupant = { + NOR = { + has_relation_rival = root + has_relation_nemesis = root + } + } + } + + set_relation_nemesis = scope:occupant + } + + option = { #What am I to do now? + name = fp3_decision.0002.c + } +} + + +fp3_decision.0003 = { #This is triggered from the restore_badd_fortress_decision, and is used to apply its effects. The options gives you a nickname. + type = character_event + title = fp3_decision.0003.t + desc = { + first_valid = { + triggered_desc = { + trigger = { current_date <= 900.1.1 } #The fortress was destroyed only recently + desc = fp3_decision.0003.desc_recently + } + triggered_desc = { + trigger = { current_date <= 1000.1.1 } #The fortress was destroyed a while ago + desc = fp3_decision.0001.desc_less_recently + } + triggered_desc = { + trigger = { current_date > 1000.1.1 } #The fortress was destroyed long ago + desc = fp3_decision.0001.desc_long_ago + } + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_faith = faith:khurramism + has_faith = faith:urartuism + } + } + desc = fp3_decision.0003.desc_khurramite + } + triggered_desc = { + trigger = { + faith = { has_doctrine = doctrine_heretic_branch_zandik } + } + desc = fp3_decision.0003.desc_zandik + } + desc = fp3_decision.0003.desc_fallback + } + desc = fp3_decision.0003.desc_ending + } + + + theme = realm + override_background = { reference = wilderness_mountains } + + left_portrait = { + character = root + animation = personality_bold + } + + immediate = { + play_music_cue = "mx_cue_war_declared" + # Apply effects + restore_badd_fortress_scripted_effect = yes + } + + option = { #I could recuperate some costs + name = fp3_decision.0003.a + + trigger = { + has_trait = architect + } + + add_gold = 100 + + # Add a unique nickname. + give_nickname = nick_the_fortress_builder + + stress_impact = { + ambitious = minor_stress_loss + diligent = minor_stress_loss + greedy = minor_stress_loss + } + + ai_chance = { + # AI should always choose this option, if it can. + base = 100 + } + } + + option = { #What a redoubt it shall be! + name = fp3_decision.0003.b + + # Add a unique nickname. + give_nickname = nick_the_eagle_of_arasbaran + + # No stress impact necessary. + ai_chance = { + # AI should always choose this option, if it can. + base = 100 + } + } + + option = { #I need no glory, just my fortress secure + name = fp3_decision.0003.c + + # Minor stress loss for turning down the nickname. + add_stress = minor_stress_loss + + # No stress impact necessary. + ai_chance = { + # AI should, if it somehow makes it here, never opt out of the nickname. + base = 0 + } + } +} + +fp3_decision.0004 = { #This is triggered from the destroy_the_magi_decision, and is used to apply its effects. The options gives you a nickname. + + type = character_event + + title = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_faith = faith:mazdakism + has_faith = faith:zurvanism + } + } + desc = fp3_decision.0004_alternate.t + } + desc = fp3_decision.0004.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_faith = faith:mazdakism + has_faith = faith:zurvanism + } + } + desc = fp3_decision.0004_alternate_desc + } + desc = fp3_decision.0004_desc + } + } + + theme = faith + override_background = { reference = temple } + + left_portrait = { + character = root + animation = schadenfreude + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + # Apply effects + destroy_the_magi_scripted_effect = yes + } + + #since the AI can't take this decision, AI chance is not needed here. + + option = { #Muwahaha + name = fp3_decision.0004.a + + trigger = { + OR = { + has_trait = vengeful + has_trait = arrogant + } + } + + give_nickname = nick_the_reformer + + stress_impact = { + ambitious = minor_stress_loss + arrogant = minor_stress_loss + vengeful = minor_stress_loss + sadistic = minor_stress_loss + } + } + + option = { #And may the embers turn to cold ash! + name = fp3_decision.0004.b + + trigger = { + OR = { + has_faith = faith:mazdakism + has_faith = faith:zurvanism + } + } + + give_nickname = nick_the_fire_quencher + } + + option = { #The people can handle this now + name = fp3_decision.0004.c + + trigger = { + NOR = { + has_faith = faith:mazdakism + has_faith = faith:zurvanism + } + } + + give_nickname = nick_the_firekeeper + } + + option = { #It is done! + name = fp3_decision.0004.d + + give_nickname = nick_the_heretic + } +} + +################################################## +# #Islamic Decision Events +# 0011-0012 - Avenge the Battle of Nahrawan +################################################## + +fp3_decision.0011 = { + type = character_event + title = fp3_decision.0011.t + desc = { + desc = fp3_decision.0011_opening.desc + first_valid = { + triggered_desc = { + trigger = { + faith = { + OR = { + has_doctrine = tenet_fp3_fedayeen + has_doctrine = tenet_warmonger + has_doctrine_parameter = pluralism_fundamentalist_proselytization_bonus + } + } + } + desc = fp3_decision.0011_fanatic_murderer.desc + } + desc = fp3_decision.0011_unfanatic_unmurderer.desc + } + } + + + theme = war + left_portrait = { + character = scope:avenger + animation = war_over_win + } + + override_background = { reference = battlefield } + + immediate = { + play_music_cue = "mx_cue_combat_2" + + character:33911 = { save_scope_as = ali } + character:163029 = { save_scope_as = muawiya } + } + + option = { + name = fp3_decision.0011.a + + avenge_the_battle_of_nahrawan_scripted_effect = yes + + stress_impact = { + zealous = major_stress_impact_loss + vengeful = major_stress_impact_loss + ambitious = medium_stress_impact_loss + } + } +} + +fp3_decision.0012 = { + type = character_event + title = fp3_decision.0012.t + desc = fp3_decision.0012.desc + theme = war + left_portrait = { + character = scope:avenger + animation = personality_vengeful + } + + override_background = { reference = battlefield } + + immediate = { + play_music_cue = "mx_cue_combat_3" + show_as_tooltip = { + scope:avenger = { + faith = { + change_fervor = { + value = major_fervor_gain + desc = fervor_gain_avenged_battle_of_nahrawan + } + } + } + if = { + limit = { exists = scope:sunni_faith } + scope:sunni_faith = { + change_fervor = { + value = major_fervor_loss + desc = fervor_loss_avenged_battle_of_nahrawan + } + } + } + if = { + limit = { exists = scope:shia_faith } + scope:shia_faith = { + change_fervor = { + value = major_fervor_loss + desc = fervor_loss_avenged_battle_of_nahrawan + } + } + } + } + } + + option = { + name = fp3_decision.0012.a + } + + option = { + name = fp3_decision.0012.b + + } +} + +fp3_decision.0013 = { + type = character_event + title = fp3_decision.0013.t + desc = fp3_decision.0013.desc + theme = faith + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = dismissal + } + + right_portrait = { + character = scope:hof_emissary + animation = chancellor + } + + lower_left_portrait = { character = scope:righteous_caliph } + + + immediate = { + + root.faith.religious_head = { save_scope_as = righteous_caliph } + + create_character = { #this is the head of faith's emissary + age = { 25 75 } + location = root.capital_province + faith = root.faith.religious_head.faith + gender_female_chance = root_faith_dominant_gender_female_chance #could be female, if given the right context. + trait = diplomat + template = priest_character_template + save_scope_as = hof_emissary #this saves him as a scope so we can get nice effects to bounce off him! + } + } + + option = { + name = fp3_decision.0013.a + + promote_persian_scripture_scripted_effect = yes + + if = { + limit = { + scope:righteous_caliph = { + NOR = { + has_relation_rival = root + has_relation_nemesis = root + } + } + } + scope:righteous_caliph = { + progress_towards_rival_effect = { + REASON = rival_promoting_blasphemous_translations + CHARACTER = root + OPINION = -30 + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + craven = medium_stress_impact_gain + trusting = medium_stress_impact_gain + greedy = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { #most AI prefer this option, once the decision is taken + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_zeal = 1 + ai_energy = 0.5 + ai_vengefulness = 1 + ai_rationality = 0.5 + } + } + } + + option = { + name = fp3_decision.0013.b + + add_gold = 400 + add_piety = var:promote_persian_scripture_piety_refund + + custom_tooltip = promote_persian_scripture_cannot_take_decision.tt + + set_variable = { + name = pledged_to_not_promote_persian + years = 30 + } + + remove_list_global_variable = { + name = unavailable_unique_decisions + target = flag:promote_persian_scripture_decision + } + + stress_impact = { + trusting = medium_stress_impact_loss + craven = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + + ai_chance = { #but cautious AI might cave in + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 0.5 + } + } + } + + after ={ + scope:hof_emissary = { silent_disappearance_effect = yes } + } +} + +fp3_decision.0014 = { + type = character_event + title = fp3_decision.0014.t + desc = { + desc = fp3_decision.0014_opening.desc + first_valid = { + triggered_desc = { + trigger = { + exists = root.faith.religious_head + this != root.faith.religious_head + } + desc = fp3_decision.0014_there_is_caliph.desc + } + desc = fp3_decision.0014_no_caliph.desc + } + } + theme = faith + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = personality_rational + } + + right_portrait = { + character = scope:persian_genius_ulama + animation = chancellor + } + + immediate = { + + if = { + limit = { exists = root.faith.religious_head } + root.faith.religious_head = { save_scope_as = uncaring_caliph } + } + + create_character = { + age = { 40 75 } + location = root.capital_province + faith = root.faith + gender_female_chance = root_faith_dominant_gender_female_chance #could be female, if given the right context. + trait = shrewd + trait = theologian + trait = diligent + template = priest_character_template + save_scope_as = persian_genius_ulama #this saves him as a scope so we can get nice effects to bounce off him! + } + } + + option = { + name = fp3_decision.0014.a + + promote_persian_scripture_scripted_effect = yes + + scope:persian_genius_ulama = { move_to_pool = yes } + + ai_chance = { #most AI prefer this option, once the decision is taken + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_zeal = 1 + ai_energy = 0.5 + ai_vengefulness = 1 + ai_rationality = 0.5 + } + } + } + + option = { + name = fp3_decision.0014.b + + promote_persian_scripture_scripted_effect = yes + + pay_short_term_gold = { + gold = minor_gold_value + target = scope:persian_genius_ulama + } + + add_courtier = scope:persian_genius_ulama + + ai_chance = { #but cautious AI might cave in + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = 0.5 + } + } + } +} + +################################################## +# #Islamic Decision Events +# 0015-0016 - Friday Prayer Politics +# by Ewan Cowhig Croft +################################################## + +scripted_effect fp3_decision_0015_apply_rebellious_stress_effect = { + stress_impact = { + arrogant = miniscule_stress_impact_loss + ambitious = minor_stress_impact_loss + disloyal = minor_stress_impact_loss + humble = minor_stress_impact_gain + content = medium_stress_impact_gain + loyal = major_stress_impact_gain + } +} + +scripted_effect fp3_decision_0015_apply_seditious_intent_effect = { + add_prestige = major_prestige_gain + save_scope_as = prestige_gained + reverse_add_opinion = { + target = liege + modifier = fp3_plotting_rebellion_opinion + opinion = -30 + } + # Notify the liege. + hidden_effect = { + liege = { + send_interface_toast = { + title = fp3_decision.0015.vassal_semi_rebel + left_icon = root + reverse_add_opinion = { + target = root + modifier = respect_opinion + opinion = -30 + } + } + } + } +} + +# Your name is read in the Friday Prayer +fp3_decision.0015 = { + type = character_event + title = fp3_decision.0015.t + desc = { + # Who are we switching to? + first_valid = { + # Supporter: switching to detractor. + triggered_desc = { + trigger = { has_trait = fp3_struggle_detractor } + desc = fp3_decision.0015.desc.switch.supporter_becoming_detractor + } + # Detractor: switching to supporter. + triggered_desc = { + trigger = { has_trait = fp3_struggle_supporter } + desc = fp3_decision.0015.desc.switch.detractor_becoming_supporter + } + # Neutral: switching to either. + desc = fp3_decision.0015.desc.switch.presently_neutral + } + # Do we have a liege to consider? + first_valid = { + # Yes, and we're making our alignment choice in the event. + triggered_desc = { + trigger = { + NOR = { + has_trait = fp3_struggle_supporter + has_trait = fp3_struggle_detractor + } + liege ?= { + this != root + OR = { + has_trait = fp3_struggle_supporter + has_trait = fp3_struggle_detractor + } + } + } + desc = fp3_decision.0015.desc.liege.presently_neutral + } + # Yes, and we'll be aligning with them. + triggered_desc = { + trigger = { + NOT = { liege ?= { this = root } } + OR = { + AND = { + has_trait = fp3_struggle_supporter + liege ?= { has_trait = fp3_struggle_supporter } + } + AND = { + has_trait = fp3_struggle_detractor + liege ?= { has_trait = fp3_struggle_detractor } + } + } + } + desc = fp3_decision.0015.desc.liege.aligning + } + # Yes, and we'll be contradicting them. + triggered_desc = { + trigger = { + NOT = { liege ?= { this = root } } + OR = { + AND = { + has_trait = fp3_struggle_supporter + liege ?= { has_trait = fp3_struggle_detractor } + } + AND = { + has_trait = fp3_struggle_detractor + liege ?= { has_trait = fp3_struggle_supporter } + } + } + } + desc = fp3_decision.0015.desc.liege.contradicting + } + # Yes, and they don't much care. + triggered_desc = { + trigger = { + liege ?= { + NOR = { + this = root + has_trait = fp3_struggle_supporter + has_trait = fp3_struggle_detractor + } + } + } + } + # Else no, and we need no loc. + } + } + theme = faith + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:right_portrait + triggered_animation = { + trigger = { + OR = { + AND = { + has_trait = fp3_struggle_supporter + scope:right_portrait = { has_trait = fp3_struggle_supporter } + } + AND = { + has_trait = fp3_struggle_detractor + scope:right_portrait = { has_trait = fp3_struggle_detractor } + } + } + } + animation = admiration + } + triggered_animation = { + trigger = { + OR = { + AND = { + has_trait = fp3_struggle_supporter + scope:right_portrait = { has_trait = fp3_struggle_detractor} + } + AND = { + has_trait = fp3_struggle_detractor + scope:right_portrait = { has_trait = fp3_struggle_supporter } + } + } + } + animation = anger + } + } + lower_center_portrait = { character = scope:lower_centre_portrait } + + + immediate = { + # Work out who goes in the righthand portrait slot. + ## Do we have a suitable liege? + if = { + limit = { + top_liege != this + liege = { + OR = { + has_trait = fp3_struggle_supporter + has_trait = fp3_struggle_detractor + } + NOT = { has_title = title:d_sunni } + } + } + liege = { save_scope_as = right_portrait } + # In which case, we try to put the caliph in the bottom slot. + title:d_sunni.holder = { + if = { + limit = { + this != root.liege + } + save_scope_as = lower_centre_portrait + } + } + } + ## If we don't, it's the caliph. + else = { + title:d_sunni.holder = { save_scope_as = right_portrait } + # If we still have a liege, we put them in the bottom slot as they're mentioned in the copy — even though it's for not much caring. + if = { + limit = { top_liege != this } + liege = { save_scope_as = lower_centre_portrait } + } + } + ## If we're flipflopping, apply base logic. + if = { + limit = { + OR = { + has_trait = fp3_struggle_supporter + has_trait = fp3_struggle_detractor + } + } + read_name_in_friday_prayer_scripted_effect = yes + # For ease of reference, we save a scope to avoid rechecking this constantly. + save_scope_value_as = { + name = change_type + value = flag:flipflop + } + } + ## If we're neutral, we only flag that — we'll make our actual choice in the options. + else = { + save_scope_value_as = { + name = change_type + value = flag:neutral + } + } + } + + # Neutral: become a supporter, irritate liege. + option = { + name = fp3_decision.0015.a + flavor = fp3_decision.0015.a.tt + trigger = { + scope:change_type = flag:neutral + liege ?= { + NOR = { + this = prev + this = title:d_sunni.holder + } + } + } + + # Switch traits. + read_name_in_friday_prayer_guts_become_supporter_effect = yes + # Annoy your liege. + fp3_decision_0015_apply_seditious_intent_effect = yes + # Apply the remainder effects. + read_name_in_friday_prayer_guts_apply_sundry_changes_effect = yes + read_name_in_friday_prayer_guts_apply_house_unity_changes_effect = yes + + fp3_decision_0015_apply_rebellious_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.25 + } + opinion_modifier = { + opinion_target = liege + multiplier = -1 + } + } + } + + # Neutral: become a supporter, ignore liege. + option = { + name = fp3_decision.0015.b + trigger = { scope:change_type = flag:neutral } + + # Switch traits. + read_name_in_friday_prayer_guts_become_supporter_effect = yes + # Apply the remainder effects. + read_name_in_friday_prayer_guts_apply_sundry_changes_effect = yes + read_name_in_friday_prayer_guts_apply_house_unity_changes_effect = yes + + # No extra stress on ignore. + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.25 + } + opinion_modifier = { + opinion_target = liege + multiplier = 1 + } + } + } + + # Neutral: become a detractor, irritate liege. + option = { + name = fp3_decision.0015.c + flavor = fp3_decision.0015.c.tt + trigger = { + scope:change_type = flag:neutral + liege ?= { + NOR = { + this = prev + this = title:d_sunni.holder + } + } + } + + # Switch traits. + read_name_in_friday_prayer_guts_become_detractor_effect = yes + # Annoy your liege. + fp3_decision_0015_apply_seditious_intent_effect = yes + # Apply the remainder effects. + read_name_in_friday_prayer_guts_apply_sundry_changes_effect = yes + read_name_in_friday_prayer_guts_apply_house_unity_changes_effect = yes + + fp3_decision_0015_apply_rebellious_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.25 + } + opinion_modifier = { + opinion_target = liege + multiplier = -1 + } + } + } + + # Neutral: become a detractor, ignore liege. + option = { + name = fp3_decision.0015.d + trigger = { scope:change_type = flag:neutral } + + # Switch traits. + read_name_in_friday_prayer_guts_become_detractor_effect = yes + # Apply the remainder effects. + read_name_in_friday_prayer_guts_apply_sundry_changes_effect = yes + read_name_in_friday_prayer_guts_apply_house_unity_changes_effect = yes + + # No extra stress on ignore. + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.25 + } + opinion_modifier = { + opinion_target = liege + multiplier = 1 + } + } + } + + # Flipflopped + irritate liege. + option = { + name = fp3_decision.0015.e + flavor = fp3_decision.0015.e.tt + trigger = { + scope:change_type = flag:flipflop + liege ?= { + NOR = { + this = prev + this = title:d_sunni.holder + } + } + } + + # Annoy your liege. + fp3_decision_0015_apply_seditious_intent_effect = yes + + fp3_decision_0015_apply_rebellious_stress_effect = yes + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = -0.25 + } + opinion_modifier = { + opinion_target = liege + multiplier = -1 + } + } + } + + # Flipflopped + ignore liege. + option = { + name = fp3_decision.0015.f + trigger = { scope:change_type = flag:flipflop } + + # No further effects. + + # No extra stress on ignore. + ai_chance = { + base = 1 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = -0.25 + } + opinion_modifier = { + opinion_target = liege + multiplier = 1 + } + } + } + + after = { + # Plus this can be a catalyst. + hidden_effect = { + if = { + limit = { + is_important_or_vip_struggle_character = yes + OR = { + AND = { + any_character_struggle = { phase_has_catalyst = catalyst_became_supporter_fp3 } + has_trait = fp3_struggle_supporter + } + AND = { + any_character_struggle = { phase_has_catalyst = catalyst_became_detractor_fp3 } + has_trait = fp3_struggle_detractor + } + } + } + ## Is the character now a supporter? Move towards stabilisation. + if = { + limit = { has_trait = fp3_struggle_supporter } + every_character_struggle = { + activate_struggle_catalyst = { + catalyst = catalyst_became_supporter_fp3 + character = root + } + log_debug_variable_for_persian_struggle_effect = { VAR = stabil_catalyst_became_supporter_fp3 } + } + } + ## Is the character now a detractor? Move towards unrest. + if = { + limit = { has_trait = fp3_struggle_detractor } + every_character_struggle = { + activate_struggle_catalyst = { + catalyst = catalyst_became_detractor_fp3 + character = root + } + log_debug_variable_for_persian_struggle_effect = { VAR = unrest_catalyst_became_detractor_fp3 } + } + } + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_scholarship_events.txt b/N3OW/events/dlc/fp3/fp3_scholarship_events.txt new file mode 100644 index 00000000..b68cafdd --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_scholarship_events.txt @@ -0,0 +1,1918 @@ +namespace = fp3_scholarship + +# ========================= Persian Scholarship Events ========================= +# = Events that relate to sponsoring scholars and innovation in your realm = +# ============================================================================== +# = +# 0000 – 0999: Hidden decision events = +# 1000 – 1999: Scholarship events that don't need a court scholar to trigger = +# 2000 – 2999: Events that fire when you employ a court scholar = +# 8000 – 8999: Research Project events = +# 9000 – 9999: Research Project conclusion events = +# = +# ============================================================================== + +# Sponsor Persian Scholars +fp3_scholarship.0001 = { + hidden = yes + + trigger = { + exists = var:number_of_invite_scholars_countdown + } + + immediate = { + #Set up a list of provinces, one per duchy in the realm, find all relevant pool characters there + every_realm_province = { + if = { + limit = { + save_temporary_scope_as = potential_province + NOT = { + any_in_list = { + list = pool_provinces + county.duchy = scope:potential_province.county.duchy + } + } + } + add_to_temporary_list = pool_provinces + } + } + + every_in_list = { + list = pool_provinces + save_temporary_scope_as = pool_province + + every_pool_character = { + province = scope:pool_province + limit = { + learning >= 10 + has_trait = education_learning + NOT = { has_trait = intellect_bad } + } + add_to_temporary_list = potential_scholars + } + } + + #Prioritize good scholars + random_in_list = { + list = potential_scholars + limit = { is_alive = yes } + weight = { + base = 1 + modifier = { + add = { + value = learning + subtract = 12 + multiply = 5 + } + } + } + save_scope_as = scholar + } + + #If no one was found, make a new scholar + if = { + limit = { NOT = { exists = scope:scholar } } + + # Can be either anywhere from a great to mediocre scholar + + create_character = { + location = root.capital_province + age = { 20 70 } + gender_female_chance = { + if = { + limit = { + faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { + add = 50 + } + } + culture = root.culture + faith = root.faith + + random_traits = yes + diplomacy = { 2 10 } + martial = { 0 8 } + stewardship = { 2 10 } + intrigue = { 2 10 } + learning = { 10 18 } + prowess = { 0 8 } + + random_traits_list = { + count = { 0 2 } + scholar = {} + theologian = {} + lifestyle_physician = {} + } + + dynasty = none + + after_creation = { + remove_any_education_traits_effect = yes + random_list = { + 10 = { add_trait = education_learning_1 } + 35 = { add_trait = education_learning_2 } + 35 = { add_trait = education_learning_3 } + 20 = { add_trait = education_learning_4 } + } + random = { + chance = 10 + add_trait = shrewd + } + random_list = { + 85 = {} + 20 = { + trigger = { + NOR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + add_trait = intellect_good_1 + } + 10 = { + trigger = { + NOR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + add_trait = intellect_good_2 + } + } + add_random_tiered_trait_xp_effect = { + TRAIT = lifestyle_physician + LEVEL_1 = yes + LEVEL_3 = yes + } + random = { + chance = 2 + add_trait = depressed_1 + } + random = { + chance = 2 + add_trait = reclusive + } + random = { + chance = 2 + add_trait = journaller + } + } + + save_scope_as = scholar + } + } + + #Add scholar to court + send_interface_message = { + type = event_learning_good_with_text + title = fp3_scholarship.0001.t + desc = fp3_scholarship.0001.desc + left_icon = scope:scholar + add_visiting_courtier = scope:scholar + } + + #Count down the number of extra scholars and either end the chain or resend this event + change_variable = { + name = number_of_invite_scholars_countdown + subtract = 1 + } + + if = { + limit = { var:number_of_invite_scholars_countdown = 0 } + remove_variable = number_of_invite_scholars_countdown + } + else = { + clear_saved_scope = scholar + trigger_event = { + id = fp3_scholarship.0001 + days = { 100 200 } + } + } + } +} + +########################################## +# 1000 - 1999: No Court Scholar Required # +########################################## + +# A Second Aryabhata +# Ask a neighboring Indo-Aryan ruler to send you some scholars + +scripted_trigger fp3_scholarship_1000_neighboring_ruler_is_valid = { + this != root + is_ai = yes + culture = { + OR = { + has_cultural_pillar = heritage_indo_aryan + has_cultural_pillar = heritage_dravidian + } + NOT = { has_cultural_pillar = ethos_bellicose } + } +} + +# A Second Aryabhata +# Contemplate asking a neighboring Indo-Aryan ruler for some mathematician courtiers +fp3_scholarship.1000 = { + type = character_event + title = fp3_scholarship.1000.t + desc = fp3_scholarship.1000.desc + theme = education + left_portrait = { + character = root + animation = personality_rational + } + lower_left_portrait = scope:nearby_indian_ruler + + cooldown = { years = 10 } + + trigger = { + has_fp3_dlc_trigger = yes + NOT = { employs_court_position = court_scholar_court_position } + can_employ_court_position_type = court_scholar_court_position + any_neighboring_top_liege_realm_owner = { + fp3_scholarship_1000_neighboring_ruler_is_valid = yes + } + } + + # Find an appropriate neighboring Indian ruler + immediate = { + save_scope_as = actor # Required for gift_value + random_neighboring_top_liege_realm_owner = { + limit = { + fp3_scholarship_1000_neighboring_ruler_is_valid = yes + } + save_scope_as = nearby_indian_ruler + save_scope_as = recipient # Required for gift_value + save_scope_value_as = { + name = bribe_value + value = { + value = gift_value + divide = 2 + } + } + } + } + + option = { # Ask nicely + name = fp3_scholarship.1000.a + duel = { + skill = diplomacy + target = scope:nearby_indian_ruler + 50 = { + desc = fp3_scholarship.1000.duel_success + min = 15 + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + opinion_modifier = { + who = scope:nearby_indian_ruler + opinion_target = root + multiplier = 1.5 + min = -49 + } + send_interface_toast = { + title = fp3_scholarship.1000.duel_success + left_icon = scope:nearby_indian_ruler + custom_tooltip = fp3_scholarship.1000.duel_success_tt + } + trigger_event = { + id = fp3_scholarship.1001 + days = { 7 14 } + } + hidden_effect = { + add_opinion = { + target = scope:nearby_indian_ruler + modifier = grateful_opinion + opinion = 20 + } + } + } + 50 = { + desc = fp3_scholarship.1000.duel_failure + min = 15 + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + opinion_modifier = { + who = scope:nearby_indian_ruler + opinion_target = root + multiplier = -1.5 + min = -49 + } + send_interface_toast = { + title = fp3_scholarship.1000.duel_failure + left_icon = scope:nearby_indian_ruler + reverse_add_opinion = { + target = scope:nearby_indian_ruler + modifier = fp3_disrespected_me_opinion + } + } + hidden_effect = { + add_opinion = { + target = scope:nearby_indian_ruler + modifier = disappointed_opinion + opinion = -10 + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + scholar = minor_stress_impact_loss + } + ai_chance = { + base = 10 #We don't want too many Indian mathematicians in Persia from this event + modifier = { + factor = 5 + has_trait = scholar + } + } + } + + option = { # Offer some gold + name = fp3_scholarship.1000.b + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + remove_short_term_gold = scope:bribe_value + custom_tooltip = fp3_scholarship.1000.duel_success_tt + reverse_add_opinion = { + target = scope:nearby_indian_ruler + modifier = grateful_opinion + opinion = 20 + } + trigger_event = { + id = fp3_scholarship.1001 + days = { 7 14 } + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + scholar = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { # Focus on improving local mathematics + name = fp3_scholarship.1000.c + remove_treasury_or_gold = medium_treasury_or_gold_value + custom_tooltip = fp3_scholarship.1000.native_tt + add_character_modifier = { + modifier = fp3_promoted_persian_mathematics_modifier + years = 10 + } + hidden_effect = { + create_character = { + location = root.capital_province + template = scholar_character + save_scope_as = mathematician + } + + send_interface_message = { + type = event_learning_good_with_text + title = fp3_scholarship.1001.t + desc = fp3_scholarship.1001.native.desc + left_icon = scope:mathematician + add_courtier = scope:mathematician + } + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + scholar = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + option = { # Complete Opt Out + name = fp3_scholarship.1000.d + stress_impact = { + scholar = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +scripted_effect fp3_scholarship_1001_create_indian_mathematician_effect = { + create_character = { + location = root.capital_province + age = { 20 70 } + gender_female_chance = { + if = { + limit = { + scope:nearby_indian_ruler.faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + scope:nearby_indian_ruler.faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { + add = 50 + } + } + culture = scope:nearby_indian_ruler.culture + faith = scope:nearby_indian_ruler.faith + + random_traits_list = { + count = 3 + chaste = {} + content = {} + ambitious = {} + diligent = {} + stubborn = {} + forgiving = {} + shy = {} + just = {} + patient = {} + cynical = {} + craven = {} + } + random_traits = no + diplomacy = { 2 10 } + martial = { 0 8 } + stewardship = { 2 10 } + intrigue = { 0 8 } + learning = { 8 14 } + prowess = { 0 8 } + + dynasty = none + + after_creation = { + remove_any_education_traits_effect = yes + random_list = { + 10 = { add_trait = education_learning_2 } + 30 = { add_trait = education_learning_3 } + 10 = { add_trait = education_learning_4 } + } + random = { + chance = 25 + add_trait = scholar + } + random = { + chance = 10 + add_trait = shrewd + } + random_list = { + 85 = {} + 20 = { + trigger = { + NOR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + add_trait = intellect_good_1 + } + 10 = { + trigger = { + NOR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + add_trait = intellect_good_2 + } + } + random = { + chance = 2 + add_trait = depressed_1 + } + random = { + chance = 2 + add_trait = reclusive + } + random = { + chance = 5 + add_trait = hashishiyah + } + random = { + chance = 2 + add_trait = journaller + } + } + + save_temporary_scope_as = mathematician + } + send_interface_message = { + type = event_learning_good_with_text + title = fp3_scholarship.1001.t + desc = fp3_scholarship.1001.desc + left_icon = scope:mathematician + add_courtier = scope:mathematician + } +} + +# 1-2 mathematician Indo-Aryan courtiers arrive +fp3_scholarship.1001 = { + hidden = yes + + trigger = { + exists = scope:nearby_indian_ruler # Sanity check + } + + immediate = { + fp3_scholarship_1001_create_indian_mathematician_effect = yes + fp3_scholarship_1001_create_indian_mathematician_effect = yes + } +} + +scripted_trigger fp3_scholarship_1010_is_valid_magus_county = { + county.holder = { #Holder must be ROOT or a direct vassal of ROOT in order for root to grant protection + OR = { + this = root + liege ?= root + } + } + faith = { + religion_tag = zoroastrianism_religion + faith_hostility_level = { + target = root.faith + value > faith_astray_level + } + } + # Don't target repeat counties + NOT = { has_variable = cannot_be_converted_by_value } +} + +# The Lone Magus +# You encounter an extant fire temple. Do you ignore it, destroy it, or recruit the Magus? +#Travel Event +fp3_scholarship.1010 = { + type = character_event + title = fp3_scholarship.1010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + # Consider the zoroastrian faith "dying" if it has no religious head of faith + NOT = { exists = scope:magus_faith.religious_head } + } + desc = fp3_scholarship.1010.desc_dying_faith + } + desc = fp3_scholarship.1010.desc_living_faith + } + } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:magus + animation = beg + } + theme = travel + override_background = { + reference = fp3_zoroastrian_temple + } + + cooldown = { years = 10 } + + trigger = { + has_fp3_dlc_trigger = yes + NOT = { employs_court_position = court_scholar_court_position } + can_employ_court_position_type = court_scholar_court_position + faith = { + NOT = { religion_tag = zoroastrianism_religion } + } + location = { fp3_scholarship_1010_is_valid_magus_county = yes } + NOT = { + has_character_modifier = fp3_denied_religious_protection_modifier + } + } + + immediate = { + # Grab scopes for the event + location = { + save_scope_as = magus_location + county = { save_scope_as = magus_county } + faith = { save_scope_as = magus_faith } + } + create_character = { + location = scope:magus_location + age = { 30 70 } + gender_female_chance = { + if = { + limit = { + scope:magus_faith = { has_doctrine = doctrine_clerical_gender_male_only } + } + add = 0 + } + else_if = { + limit = { + scope:magus_faith = { has_doctrine = doctrine_clerical_gender_female_only } + } + add = 100 + } + else = { + add = 50 + } + } + culture = scope:magus_county.culture + faith = scope:magus_county.faith + + trait = brave + trait = devoted + random_traits_list = { + count = 2 + zealous = {} + chaste = {} + diligent = {} + stubborn = {} + just = {} + patient = {} + impatient = {} + honest = {} + temperate = {} + humble = {} + calm = {} + wrathful = {} + forgiving = {} + } + random_traits = no + diplomacy = { 2 10 } + martial = { 0 8 } + stewardship = { 2 10 } + intrigue = { 0 8 } + learning = { 10 16 } + prowess = { 0 8 } + + dynasty = none + + after_creation = { + remove_any_education_traits_effect = yes + random_list = { + 5 = { add_trait = education_learning_2 } + 30 = { add_trait = education_learning_3 } + 15 = { add_trait = education_learning_4 } + } + random = { + chance = 15 + add_trait = scholar + } + random = { + chance = 60 + add_trait = theologian + } + random = { + chance = 10 + add_trait = shrewd + } + random_list = { + 85 = {} + 20 = { + trigger = { + NOR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + add_trait = intellect_good_1 + } + 10 = { + trigger = { + NOR = { + has_trait = intellect_good_1 + has_trait = intellect_good_2 + has_trait = intellect_good_3 + } + } + add_trait = intellect_good_2 + } + } + random = { + chance = 5 + add_trait = depressed_1 + } + random = { + chance = 90 + add_trait = celibate + } + random = { + chance = 25 + add_trait = infertile + } + random = { + chance = 2 + add_trait = contrite + } + random = { + chance = 5 + add_trait = reclusive + } + } + + save_scope_as = magus + } + } + option = { # Deny the request + name = fp3_scholarship.1010.a + add_character_modifier = { + modifier = fp3_denied_religious_protection_modifier + years = 10 + } + scope:magus = { + death = { + death_reason = death_execution + killer = root + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + generous = minor_stress_impact_gain + zealous = minor_stress_impact_loss + callous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0.25 + has_trait = just + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + option = { # Gain the magus as a courtier + name = fp3_scholarship.1010.b + trigger = { + is_ai = no + } + add_courtier = scope:magus + custom_tooltip = fp3_scholarship.1010.b.tt + scope:magus_county = { + set_variable = { + name = cannot_be_converted_by_value + value = root + years = 20 + } + } + scope:magus = { + set_variable = { + name = cannot_be_converted_by_value + value = root + years = 100 + } + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + callous = minor_stress_impact_gain + forgiving = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + } + + option = { # Just Leave + name = fp3_scholarship.1010.c + add_piety = minor_piety_loss + scope:magus = { + silent_disappearance_effect = yes + } + ai_chance = { + base = 100 + } + } +} + +######################################## +# 2000 - 2999: Court Scholar Required # +######################################## + +# Worth Its Weight +# Requisition paper for your court scholar? +fp3_scholarship.2000 = { + type = character_event + title = fp3_scholarship.2000.t + desc = fp3_scholarship.2000.desc + theme = education + left_portrait = { + character = scope:court_scholar + animation = reading + } + + cooldown = { years = 5 } + + trigger = { + # Don't give the court scholar multiple paper surpluses + any_court_position_holder = { + type = court_scholar_court_position + NOT = { has_character_modifier = fp3_paper_surplus_modifier } + } + # Paper should be abundant by the late medieval era + culture = { NOT = { has_cultural_era_or_later = culture_era_late_medieval } } + } + + immediate = { + random_court_position_holder = { + type = court_scholar_court_position + save_scope_as = court_scholar + } + } + + option = { # Requisition the paper + name = fp3_scholarship.2000.a + capital_county = { + change_county_control = -25 + } + scope:court_scholar = { + add_character_modifier = { + modifier = fp3_paper_surplus_modifier + years = 10 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + + option = { # Import the Paper + name = fp3_scholarship.2000.b + remove_treasury_or_gold = medium_treasury_or_gold_value + scope:court_scholar = { + add_character_modifier = { + modifier = fp3_paper_surplus_modifier + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { # We cannot afford it + name = fp3_scholarship.2000.c + scope:court_scholar = { + add_character_modifier = { + modifier = fp3_paper_shortage_modifier + years = 10 + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + stress_impact = { + diligent = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } +} + +# Liquid Wisdom +# Your court scholar is drinking with a foreign scholar, do you stop them in the name of piety? +fp3_scholarship.2010 = { + type = character_event + title = fp3_scholarship.2010.t + desc = fp3_scholarship.2010.desc + theme = education + override_background = { + reference = tavern + } + left_portrait = { + character = scope:court_scholar + animation = thinking + } + right_portrait = { + character = scope:foreign_scholar + animation = toast + } + + cooldown = { years = 10 } + + trigger = { + faith = { trait_is_sin = drunkard } + any_court_position_holder = { + type = court_scholar_court_position + NOT = { has_trait = zealous } + } + } + + immediate = { + random_court_position_holder = { + type = court_scholar_court_position + save_scope_as = court_scholar + } + # Find a random faraway county to pull a character from + random_county_in_region = { + region = world_india + limit = { + faith = { + NOT = { trait_is_sin = drunkard } + } + } + save_scope_as = foreign_county + } + create_character = { + age = { 35 50 } + random_traits_list = { + count = 1 + education_learning_2 = {} + education_learning_3 = {} + education_learning_4 = {} + } + random_traits = yes + location = root.capital_province + faith = scope:foreign_county.faith + culture = scope:foreign_county.culture + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + learning = { + min_template_high_skill + max_template_high_skill + } + save_scope_as = foreign_scholar + } + } + + option = { # Stop court scholar + name = fp3_scholarship.2010.a + add_piety = minor_piety_gain + reverse_add_opinion = { + target = scope:court_scholar + modifier = fp3_killjoy_opinion + opinion = -15 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # Let them continue drinking + name = fp3_scholarship.2010.b + add_piety = minor_piety_loss + random = { + chance = 50 + scope:court_scholar = { + add_learning_skill = 1 + } + } + scope:court_scholar = { + add_character_modifier = { + modifier = fp3_liquid_wisdom_modifier + years = 5 + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + } + } + } + + after = { + scope:foreign_scholar = { silent_disappearance_effect = yes } + } +} + +# Morbid Insights +# Give a prisoner to your court scholar to experiment on? +fp3_scholarship.2020 = { + type = character_event + title = fp3_scholarship.2020.t + desc = fp3_scholarship.2020.desc + theme = prison + left_portrait = { + character = scope:court_scholar + animation = thinking + } + right_portrait = { + character = scope:specimen + animation = fear + } + + cooldown = { years = 10 } + + trigger = { + any_prisoner = { + is_adult = yes + } + any_court_position_holder = { + type = court_scholar_court_position + ai_compassion < very_high_positive_ai_value # A compassionate person would not endanger another's life + } + } + + immediate = { + random_court_position_holder = { + type = court_scholar_court_position + save_scope_as = court_scholar + assign_quirk_effect = yes + } + random_prisoner = { + limit = { is_adult = yes } + # Try to pull an important person; this event is more interesting if the prisoner isn't Guy McNobody + weight = { + base = 1 + modifier = { + exists = dynasty + add = dynasty.dynasty_prestige_level + } + } + save_scope_as = specimen + } + } + + option = { # Allow the experimentation + name = fp3_scholarship.2020.a + random_list = { # 40% chance of prisoner death + 3 = { add_learning_skill = 2 } + 2 = { + scope:specimen = { + death = { + death_reason = death_treatment + killer = scope:court_scholar + } + } + } + } + scope:court_scholar = { + add_character_modifier = { + modifier = fp3_morbid_insights_modifier + years = 20 + } + } + stress_impact = { + compassionate = major_stress_impact_gain + sadistic = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + modifier = { + NOT = { has_execute_reason = scope:specimen } + ai_honor >= high_positive_ai_value + add = -50 + } + } + } + + option = { # Forbid experimentation + name = fp3_scholarship.2020.b + reverse_add_opinion = { + target = scope:court_scholar + modifier = disappointed_opinion + opinion = -15 + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +#Treatice Published (Your Scholar is levelling up) +#By Henrik Lohmander +fp3_scholarship.2030 = { + type = character_event + title = fp3_scholarship.2030.t + desc = fp3_scholarship.2030.desc + theme = education + left_portrait = { + character = scope:court_scholar + animation = reading + } + override_background = { + reference = bp2_study_indian + } + + cooldown = { years = 10 } #This will keep happening with regular intervals once the cooldown is over, if you keep a scholar on for long enough they will be increasingly learned + + trigger = { + any_court_position_holder = { + type = court_scholar_court_position + is_available_healthy_adult = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_realm_province = { + is_higher_studies_location = yes + } + } + } + + immediate = { + random_court_position_holder = { + type = court_scholar_court_position + save_scope_as = court_scholar + } + random_list = { + 33 = { + trigger = { + scope:court_scholar = { + NOT = { has_trait = scholar } + learning > 15 + } + } + save_scope_value_as = { + name = personal_development_time + value = flag:scholar_trait + } + } + 33 = { + trigger = { + scope:court_scholar = { + NOT = { has_trait = theologian } + learning > 20 + } + } + save_scope_value_as = { + name = personal_development_time + value = flag:theologian_trait + } + } + 33 = { + save_scope_value_as = { + name = personal_development_time + value = flag:learning + } + } + 33 = { + trigger = { + any_realm_province = { + is_higher_studies_location = yes + } + scope:court_scholar = { + has_education_learning_trigger = yes + NOT = { has_trait = education_learning_5 } + } + } + save_scope_value_as = { + name = personal_development_time + value = flag:learning_education + } + } + } + } + + option = { + name = fp3_scholarship.2030.a + switch = { + trigger = scope:personal_development_time + flag:learning = { + scope:court_scholar = { + add_learning_skill = 2 + } + } + flag:theologian_trait = { + scope:court_scholar = { + add_trait = theologian + } + } + flag:scholar_trait = { + scope:court_scholar = { + add_trait = scholar + } + } + flag:learning_education = { + custom_tooltip = fp3_scholarship.2030.tt + scope:court_scholar = { + switch = { + trigger = has_trait + education_learning_1 = { + remove_trait = education_learning_1 + add_trait_force_tooltip = education_learning_2 + } + education_learning_2 = { + remove_trait = education_learning_2 + add_trait_force_tooltip = education_learning_3 + } + education_learning_3 = { + remove_trait = education_learning_3 + add_trait_force_tooltip = education_learning_4 + } + education_learning_4 = { + remove_trait = education_learning_4 + add_trait_force_tooltip = education_learning_5 + } + } + } + } + } + } +} + +################################## +# 8000 - 8999: Innovation Events # +################################## + +# Determines whether the research project was a success or failure, given $SUCCESS_CHANCE$ +scripted_effect fp3_research_completion_effect = { + # For loc + if = { + limit = { NOT = { exists = scope:court_scholar } } + random_court_position_holder = { + type = court_scholar_court_position + save_scope_as = court_scholar + } + } + random_list = { + 65 = { # Failure + modifier = { + add = { + value = 0 + subtract = $SUCCESS_CHANCE$ + } + } + custom_tooltip = fp3_scholarship.8999.tt_failure + trigger_event = fp3_scholarship.9000 + } + 34 = { # Regular Success + modifier = { + add = { + value = $SUCCESS_CHANCE$ + multiply = 0.75 + } + } + custom_tooltip = fp3_scholarship.8999.tt_success + trigger_event = fp3_scholarship.9100 + } + 1 = { # Critical Success: Unlock Innovation + trigger = { + trigger_if = { + limit = { + NOT = { culture = { has_innovation = fp3_innovation_mural_sextant } } + } + culture = { has_cultural_era_or_later = culture_era_early_medieval } + } + trigger_if = { + limit = { + NOT = { culture = { has_innovation = fp3_innovation_fritware } } + } + culture = { has_cultural_era_or_later = culture_era_late_medieval } + } + } + modifier = { + add = { + value = $SUCCESS_CHANCE$ + multiply = 0.25 + } + } + custom_tooltip = fp3_scholarship.8999.tt_crit_success + trigger_event = fp3_scholarship.9200 + } + } +} + +scripted_effect add_research_cooldown_effect = { + add_character_flag = { + flag = fund_research_inspiration_event_cooldown + days = { 30 60 } + } +} + +scripted_trigger has_no_research_event_cooldown = { + NOT = { has_character_flag = fund_research_inspiration_event_cooldown } +} + +# Scholar announces initial plans to begin a research project +fp3_scholarship.8000 = { + type = character_event + title = fp3_scholarship.8000.t + desc = fp3_scholarship.8000.desc + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:court_scholar + animation = reading + } + theme = education + override_background = { + reference = bp2_university + } + + cooldown = { + years = 5 + } + + immediate = { + random_court_position_holder = { + type = court_scholar_court_position + limit = { + exists = inspiration + is_available_healthy_adult = yes + } + save_scope_as = court_scholar + } + } + + option = { + name = fp3_scholarship.8000.a + } +} + +# Scholar wants to begin an alchemy inspiration +fp3_scholarship.8500 = { + type = character_event + title = fp3_scholarship.8500.t + desc = fp3_scholarship.8500.desc + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:court_scholar + animation = reading + } + theme = education + override_background = { + reference = bp2_university + } + + cooldown = { + years = 5 + } + + immediate = { + random_court_position_holder = { + type = court_scholar_court_position + limit = { + NOT = { exists = inspiration } + is_available_healthy_adult = yes + } + save_scope_as = court_scholar + } + scope:court_scholar = { + save_scope_as = recipient + } + save_scope_as = actor + } + + trigger = { + has_fp3_dlc_trigger = yes + has_royal_court = yes #Yes, for this you need both fp3 and Royal Court + any_court_position_holder = { + type = court_scholar_court_position + NOT = { exists = inspiration } + is_available_healthy_adult = yes + has_completed_inspiration = no + learning > 20 + } + } + + option = { + name = fp3_scholarship.8000.a + remove_short_term_gold = fp3_research_base_cost + custom_tooltip = fp3_scholarship.8500.a.tt + hidden_effect = { + scope:court_scholar = { + create_inspiration = alchemy_inspiration + fund_inspiration_effect = yes + } + } + } + + option = { + name = fp3_scholarship.8000.b + add_prestige = minor_prestige_loss + reverse_add_opinion = { + target = scope:court_scholar + modifier = disappointed_opinion + opinion = -10 + } + } +} + +# Scholar wants to begin a book inspiration +fp3_scholarship.8600 = { + type = character_event + title = fp3_scholarship.8600.t + desc = fp3_scholarship.8600.desc + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:court_scholar + animation = throne_room_writer + } + theme = education + override_background = { + reference = study + } + + trigger = { + has_fp3_dlc_trigger = yes + has_royal_court = yes #Yes, for this you need both fp3 and Royal Court + any_court_position_holder = { + type = court_scholar_court_position + NOT = { exists = inspiration } + has_completed_inspiration = no + is_available_healthy_adult = yes + learning > 20 + } + } + + cooldown = { + years = 5 + } + + immediate = { + random_court_position_holder = { + type = court_scholar_court_position + limit = { + NOT = { exists = inspiration } + is_available_healthy_adult = yes + } + save_scope_as = court_scholar + } + scope:court_scholar = { + save_scope_as = recipient + } + save_scope_as = actor + } + + option = { + name = fp3_scholarship.8000.a + show_as_tooltip = { remove_short_term_gold = medium_gold_value } # gold is removed by sponsor_inspiration effect (inside fund_inspiration_effect) + custom_tooltip = fp3_scholarship.8600.a.tt + hidden_effect = { + scope:court_scholar = { + create_inspiration = { + type = book_inspiration + gold = root.medium_gold_value + } + fund_inspiration_effect = yes + } + } + } + + option = { + name = fp3_scholarship.8000.b + add_prestige = minor_prestige_loss + reverse_add_opinion = { + target = scope:court_scholar + modifier = disappointed_opinion + opinion = -10 + } + } +} + +# Scholar asks for more texts +fp3_scholarship.8100 = { + type = character_event + title = fp3_scholarship.8100.t + desc = fp3_scholarship.8100.desc + theme = education + left_portrait = scope:inspiration_owner + + cooldown = { years = 2 } + + trigger = { + exists = scope:inspiration + scope:inspiration_owner = { + is_available_ai_adult = yes + has_no_research_event_cooldown = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + scope:inspiration_owner = { + ai_energy >= medium_positive_ai_value + } + } + } + + immediate = { + scope:inspiration_owner = { + add_research_cooldown_effect = yes + } + } + + option = { # Furnish the library + name = fp3_scholarship.8100.a + if = { + limit = { exists = scope:inspiration } + scope:inspiration = { + invest_gold = 50 + } + } + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = 6 } + } + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -50 + short_term_gold < 50 + } + } + } + + option = { # The library is fine as-is + name = fp3_scholarship.8100.b + scope:inspiration_owner = { + change_artifact_quality_effect = { AMOUNT = -2 } + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -10 + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } +} + +# Roll for project outcome +fp3_scholarship.8999 = { + hidden = yes + + # Roll for success + immediate = { + if = { + limit = { exists = scope:inspiration_owner } + scope:inspiration_owner = { + if = { + limit = { has_variable = research_success_chance } + scope:inspiration_sponsor = { + fp3_research_completion_effect = { SUCCESS_CHANCE = prev.var:research_success_chance } + } + } + } + } + } + } + +# Research project was a failure +fp3_scholarship.9000 = { + type = character_event + title = fp3_scholarship.9000.t + desc = fp3_scholarship.9000.desc + theme = education + left_portrait = { + character = scope:inspiration_owner + animation = worry + } + + immediate = { + scope:inspiration_owner = { + add_character_flag = { + flag = research_invalidated + days = 1 + } + } + } + + option = { # These things happen + name = fp3_scholarship.9000.a + add_prestige = minor_prestige_loss + } +} + +# Research project minor success +scripted_effect fp3_scholarship_9100_reward_effect = { + house = { + add_house_modifier = { + modifier = $MODIFIER$ + years = 30 + } + } +} + +fp3_scholarship.9100 = { + type = character_event + title = fp3_scholarship.9100.t + desc = fp3_scholarship.9100.desc + theme = education + left_portrait = { + character = scope:inspiration_owner + animation = personality_honorable + } + + immediate = { + hidden_effect = { + random_list = { + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = civil_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_development_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_development_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = civil_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_building_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_building_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = civil_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_control_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_control_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = civil_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_mathematics_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_mathematics_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = civil_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_taxation_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_taxation_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = military_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_light_warfare_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_light_warfare_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = military_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_heavy_warfare_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_heavy_warfare_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = military_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_cavalry_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_cavalry_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = military_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_siege_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_siege_modifier + } + } + 30 = { + trigger = { + scope:inspiration_owner = { has_character_flag = military_research } + house = { + NOT = { has_house_modifier = fp3_treatise_on_strategy_modifier } + } + } + save_scope_value_as = { + name = researched_house_modifier + value = flag:fp3_treatise_on_strategy_modifier + } + } + 1 = { + save_scope_value_as = { + name = researched_house_modifier + value = flag:prestige + } + } + } + } + } + + option = { + name = fp3_scholarship.9100.a + ai_chance = { + base = 100 + } + switch = { + trigger = scope:researched_house_modifier + flag:fp3_treatise_on_development_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_development_modifier } + } + flag:fp3_treatise_on_building_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_building_modifier } + } + flag:fp3_treatise_on_control_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_control_modifier } + } + flag:fp3_treatise_on_mathematics_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_mathematics_modifier } + } + flag:fp3_treatise_on_taxation_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_taxation_modifier } + } + flag:fp3_treatise_on_light_warfare_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_light_warfare_modifier } + } + flag:fp3_treatise_on_heavy_warfare_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_heavy_warfare_modifier } + } + flag:fp3_treatise_on_cavalry_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_cavalry_modifier } + } + flag:fp3_treatise_on_siege_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_siege_modifier } + } + flag:fp3_treatise_on_strategy_modifier = { + fp3_scholarship_9100_reward_effect = { MODIFIER = fp3_treatise_on_strategy_modifier } + } + flag:prestige = { + custom_tooltip = patron_of_the_sciences + add_prestige = massive_prestige_value + } + } + } +} + +# Research project critical success! New innovation discovered +fp3_scholarship.9200 = { + type = character_event + title = fp3_scholarship.9200.t + desc = fp3_scholarship.9200.desc + theme = education + left_portrait = { + character = scope:inspiration_owner + animation = happiness + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + hidden_effect = { + random_list = { + 30 = { + trigger = { + culture = { + NOT = { has_innovation = fp3_innovation_mural_sextant } + has_cultural_era_or_later = culture_era_early_medieval + } + } + save_scope_value_as = { + name = research_cultural_innovation + value = flag:fp3_innovation_mural_sextant + } + } + 30 = { + trigger = { + culture = { + NOT = { has_innovation = fp3_innovation_fritware } + has_cultural_era_or_later = culture_era_late_medieval + } + } + save_scope_value_as = { + name = research_cultural_innovation + value = flag:fp3_innovation_fritware + } + } + } + } + } + + option = { + name = fp3_scholarship.9200.a + switch = { + trigger = scope:research_cultural_innovation + flag:fp3_innovation_mural_sextant = { + culture = { add_innovation = fp3_innovation_mural_sextant } + } + flag:fp3_innovation_fritware = { + culture = { add_innovation = fp3_innovation_fritware } + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt b/N3OW/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt new file mode 100644 index 00000000..858b4511 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_story_cycle_seljuks_invasion_events.txt @@ -0,0 +1,153 @@ +namespace = fp3_story_cycle_seljuks_invasion_events + +### RISE OF THE SELJUKS ############################################# +## 0001 Leader and Story Cycle Creation by Maxence Voleau +## 0002 The First Settlers by Hugo Cortell +##################################################################### + +################################### +# Setup: we create the leader and start the story cycle +# By Maxence Voleau +################################### +fp3_story_cycle_seljuks_invasion_events.0001 = { + scope = none + hidden = yes + + immediate = { + spawn_seljuk_character_effect = yes + scope:lead_seljuk = { + create_story = story_seljuk_invasion + } + } +} + +################################### +# The First Settlers +# By Hugo Cortell +################################### +fp3_story_cycle_seljuks_invasion_events.0002 = { + type = character_event + title = fp3_story_cycle_seljuks_invasion_events.0001.t + desc = { + desc = fp3_story_cycle_seljuks_invasion_events.0001.desc + first_valid = { + triggered_desc = { + trigger = { highest_held_title_tier > tier_duchy } + desc = fp3_story_cycle_seljuks_invasion_events.0001.desc_vassal + } + desc = fp3_story_cycle_seljuks_invasion_events.0001.desc_independent + } + } + theme = realm + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:lead_seljuk + animation = personality_honorable + } + + immediate = { + save_scope_as = seljuk_victim + random_sub_realm_county = { + limit = { + any_neighboring_county = { + exists = holder + holder.top_liege != scope:seljuk_victim + } + de_jure_liege = scope:fp3_seljuk_settle_target + } + alternative_limit = { + any_neighboring_county = { + exists = holder + holder.top_liege != scope:seljuk_victim + } + any_neighboring_county = { de_jure_liege = scope:fp3_seljuk_settle_target } + } + alternative_limit = { + any_neighboring_county = { + exists = holder + holder.top_liege != scope:seljuk_victim + } + } + random_county_province = { + limit = { + this != scope:fp3_seljuk_settle_target.title_capital_county.title_province + } + save_scope_as = spawn_location + } + } + save_scope_value_as = { + name = victim_strength_modifier + value = { + value = current_military_strength + divide = 10000 + add = 1.25 + } + } + scope:lead_seljuk = { + #move to the army spawn location, so it's less confusing when you want to see where they are + set_location = scope:spawn_location + var:seljuk_birthplace = { save_scope_as = seljuk_birthplace } + } + } + + option = { # Yes - Serve me well! + name = fp3_story_cycle_seljuks_invasion_events.0001.a_liege + + fp3_story_cycle_seljuks_invasion_events_grant_seljuks_land_effect = yes + scope:lead_seljuk = { + add_trait = loyal + culture = { + change_cultural_acceptance = { + target = scope:seljuk_victim.culture + value = 30 + desc = STEWARD_PROMOTE_CULTURE_ALLOWED_NOMAD_SETTLEMENT + } + } + } + create_seljuk_army_at_peace_effect = yes + debug_log = "Seljuk got the land and were vassalized" + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_boldness = -0.5 + ai_compassion = 0.2 + ai_greed = -0.5 + ai_energy = -0.5 + ai_rationality = 0.3 + ai_sociability = 0.3 + } + } + } + + option = { # No - To war with you! + name = fp3_story_cycle_seljuks_invasion_events.0001.b + + # Start war + scope:lead_seljuk = { + start_war = { + casus_belli = fp3_seljuk_invasion_cb + target = root + target_title = scope:fp3_seljuk_settle_target + } + random_character_war = { save_scope_as = war } + } + + create_seljuk_army_effect = yes + debug_log = "Seljuk have to win a war" + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + ai_energy = 0.5 + ai_vengefulness = 0.5 + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt b/N3OW/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt new file mode 100644 index 00000000..335509e4 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_story_cycle_zanj_rebellion_events.txt @@ -0,0 +1,726 @@ +namespace = fp3_story_cycle_zanj_rebellion_events + +### Ali Ibn Muhammad and Zanj Rebellion Setup +fp3_story_cycle_zanj_rebellion_events.0001 = { + scope = none + hidden = yes + + immediate = { + spawn_zanj_leader_character_effect = yes + scope:zanj_leader = { + save_scope_as = story_owner + create_story = story_zanj_rebellion + give_nickname = nick_albaghid + } + + title:c_basra.holder = { + add_visiting_courtier = scope:zanj_leader + } + title:c_basra.holder.top_liege = { + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0002 + } + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0005 + days = { 60 120 } + } + } + } +} + +### Ali Ibn Muhammad riling up locals in Basra +fp3_story_cycle_zanj_rebellion_events.0002 = { + type = character_event + theme = intrigue + override_background = { reference = wilderness_wetlands } + title = fp3_story_cycle_zanj_rebellion_events.0002.t + desc = fp3_story_cycle_zanj_rebellion_events.0002.desc + + left_portrait = { + character = root + animation = marshal + } + right_portrait = { + character = scope:zanj_leader + animation = scheme + } + + immediate = { + scope:zanj_leader = { + save_scope_as = outspoken_rebel + } + } + + #Try to arrest Ali + option = { + name = fp3_story_cycle_zanj_rebellion_events.0002.a + duel = { + skill = intrigue + target = scope:outspoken_rebel + 50 = { + # You arrest Ali Ibn Muhammad + desc = fp3_story_cycle_zanj_rebellion_events.0002.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = fp3_story_cycle_zanj_rebellion_events.0002.a.success + left_icon = root + right_icon = scope:outspoken_rebel + rightfully_imprison_character_effect = { + TARGET = scope:outspoken_rebel + IMPRISONER = root + } + } + inherit_zanj_rebellion_effect = yes + } + 50 = { + # Ali Ibn Muhammad escapes + desc = fp3_story_cycle_zanj_rebellion_events.0002.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = fp3_story_cycle_zanj_rebellion_events.0002.a.failure + custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_greatly_strengthened_tt + custom_tooltip = fp3_story_cycle_zanj_rebellion_leaves_for_baghdad + left_icon = root + right_icon = scope:outspoken_rebel + } + hidden_effect = { + scope:zanj_leader = { + change_variable = { + name = zanj_rebellion_strength_score + add = 4 + } + } + title:c_baghdad.holder = { + hidden_effect = { + title:c_baghdad.holder = { + add_visiting_courtier = scope:outspoken_rebel + } + } + } + title:c_basra.holder.top_liege = { + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0003 + days = { 30 60 } + } + } + } + } + } + root = { + progress_towards_rival_effect = { + REASON = fp3_zanj_rebellion_opressed_me + CHARACTER = scope:outspoken_rebel + OPINION = default_rival_opinion + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + just = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + trusting = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = trusting + has_trait = forgiving + has_trait = compassionate + } + } + } + } + + #Ignore Ali + option = { + name = fp3_story_cycle_zanj_rebellion_events.0002.c + custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_strengthened_tt + scope:zanj_leader = { + change_variable = { + name = zanj_rebellion_strength_score + add = 2 + } + } + custom_tooltip = fp3_story_cycle_zanj_rebellion_leaves_for_baghdad + hidden_effect = { + title:c_baghdad.holder = { + add_visiting_courtier = scope:outspoken_rebel + } + } + title:c_basra.holder.top_liege = { + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0003 + days = { 30 60 } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + just = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + trusting = medium_stress_impact_loss + forgiving = medium_stress_impact_loss + compassionate = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = paranoid + has_trait = just + has_trait = callous + has_trait = sadistic + } + } + } + } +} + +### Setup to find correct scope for event 0004 and check if Ali is dead or imprisoned +fp3_story_cycle_zanj_rebellion_events.0003 = { + scope = none + hidden = yes + + immediate = { + if ={ + #check if Ali is still alive and not in prison and is not an inheritor of the rebellion + limit = { + scope:zanj_leader = { + AND = { + is_alive = yes + is_imprisoned = no + NOT = { has_character_flag = new_zanj_leader } + } + } + } + title:c_baghdad.holder.top_liege = { + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0004 + } + } + } + } +} + +### Ali Ibn Muhammad claims divinity +fp3_story_cycle_zanj_rebellion_events.0004 = { + type = character_event + theme = faith + title = fp3_story_cycle_zanj_rebellion_events.0004.t + desc = fp3_story_cycle_zanj_rebellion_events.0004.desc + + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:zanj_leader + animation = personality_zealous + } + + #Contest Ali Ibn Muhammad's claims + option = { + name = fp3_story_cycle_zanj_rebellion_events.0004.a + duel = { + skill = learning + target = scope:zanj_leader + 50 = { + # You disprove Ali's claims + desc = fp3_story_cycle_zanj_rebellion_events.0004.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = fp3_story_cycle_zanj_rebellion_events.0004.a.success + add_piety = medium_piety_gain + add_prestige = minor_prestige_gain + left_icon = root + right_icon = scope:zanj_leader + } + } + 50 = { + # Ali Ibn Muhammad validates his claims + desc = fp3_story_cycle_zanj_rebellion_events.0004.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_greatly_strengthened_tt + send_interface_toast = { + title = fp3_story_cycle_zanj_rebellion_events.0004.a.failure + left_icon = root + right_icon = scope:zanj_leader + + scope:zanj_leader = { + add_trait = sayyid + add_pressed_claim = title:e_arabia + change_variable = { + name = zanj_rebellion_strength_score + add = 4 + } + } + } + } + } + root = { + progress_towards_rival_effect = { + REASON = fp3_zanj_rebellion_opressed_me + CHARACTER = scope:zanj_leader + OPINION = default_rival_opinion + } + } + stress_impact = { + paranoid = minor_stress_impact_loss + just = minor_stress_impact_loss + zealous = medium_stress_impact_loss + trusting = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = cynical + has_trait = trusting + has_trait = forgiving + } + } + } + } + + #Ignore Ali + option = { + name = fp3_story_cycle_zanj_rebellion_events.0004.b + custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_strengthened_tt + + scope:zanj_leader = { + add_trait = sayyid + add_pressed_claim = title:e_arabia + change_variable = { + name = zanj_rebellion_strength_score + add = 2 + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + just = minor_stress_impact_gain + zealous = medium_stress_impact_gain + trusting = minor_stress_impact_loss + forgiving = medium_stress_impact_loss + cynical = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = paranoid + has_trait = just + has_trait = zealous + } + } + } + } +} + +### Setup event to find the correct scope and check if Ali or the current Zanj Leader is dead or imprisoned +fp3_story_cycle_zanj_rebellion_events.0005 = { + scope = none + hidden = yes + immediate = { + if = { + limit = { + scope:zanj_leader = { + OR = { + is_imprisoned = yes + is_alive = no + is_landed = yes + } + } + } + inherit_zanj_rebellion_effect = yes + } + title:c_basra.holder.top_liege = { + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0006 + } + } + } +} + +### A Zanj Steps Forth +fp3_story_cycle_zanj_rebellion_events.0006 = { + type = character_event + theme = corruption + title = fp3_story_cycle_zanj_rebellion_events.0006.t + desc = { + desc = fp3_story_cycle_zanj_rebellion_events.0006.desc.a + + triggered_desc = { + trigger = { scope:zanj_leader = { NOT = { has_character_flag = new_zanj_leader } } } + desc = fp3_story_cycle_zanj_rebellion_events.0006.desc.b + } + + desc = fp3_story_cycle_zanj_rebellion_events.0006.desc.c + } + + left_portrait = { + character = root + animation = eyeroll + } + + right_portrait = { + character = scope:outspoken_rebel + animation = worry + } + + lower_left_portrait = { + trigger = { scope:zanj_leader = { NOT = { has_character_flag = new_zanj_leader } } } + character = scope:zanj_leader + } + + immediate = { + if = { + limit = { scope:zanj_leader = { NOT = { has_character_flag = new_zanj_leader } } } + spawn_zanj_representative_character_effect = yes + scope:zanj_representative = { save_scope_as = outspoken_rebel } + } + else = { + scope:zanj_leader = { save_scope_as = outspoken_rebel } + } + } + #Give Basra to the Zanj + option = { + name = fp3_story_cycle_zanj_rebellion_events.0006.a + + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + + title:c_basra = { + set_county_culture = culture:east_bantu + set_county_faith = faith:azariqa + } + + show_as_tooltip = { # UI/UX + title:c_basra = { + change_title_holder = { + holder = scope:outspoken_rebel + change = scope:change + } + } + } + + scope:outspoken_rebel = { + becomes_independent = { + change = scope:change + } + add_truce_both_ways = { + character = root + years = 10 + name = fp3_landed_zanj_reason + } + } + + if = { + limit = { + NOT = { title:c_basra.holder = root } + } + add_tyranny = 30 + set_relation_rival = { + reason = fp3_rival_gave_title_away + target = title:c_basra.holder + } + } + + hidden_effect = { + title:c_basra = { + change_title_holder = { + holder = scope:outspoken_rebel + change = scope:change + } + every_de_jure_county = { + change_title_holder = { + holder = scope:outspoken_rebel + change = scope:change + } + } + } + scope:zanj_leader = { + random_owned_story = { + type = story_zanj_rebellion + end_story = yes + } + } + } + resolve_title_and_vassal_change = scope:change + + stress_impact = { + compassionate = medium_stress_impact_loss + just = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + generous = medium_stress_impact_loss + content = medium_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = major_stress_impact_gain + ambitious = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = ambitious + has_trait = greedy + } + } + } + } + + #Make minor concessions to the Zanj + option = { + name = fp3_story_cycle_zanj_rebellion_events.0006.b + + scope:zanj_leader = { + change_variable = { + name = zanj_rebellion_strength_score + add = 3 + } + } + custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_strengthened_tt + hidden_effect = { + title:c_basra.holder = { + if = { + limit = { scope:zanj_leader != scope:outspoken_rebel} + add_visiting_courtier = scope:zanj_leader + } + add_visiting_courtier = scope:outspoken_rebel + } + } + + if = { + limit = { + NOT = { title:c_basra.holder = root } + } + progress_towards_rival_effect = { + REASON = fp3_zanj_rebellion_interfered_with_my_workers + CHARACTER = title:c_basra.holder + OPINION = default_rival_opinion + } + } + + title:c_basra = { + add_county_modifier = { + modifier = fp3_zanj_rebellion_work_concessions_modifier + years = 5 + } + } + + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0007 + days = { 30 60 } + } + stress_impact = { + compassionate = minor_stress_impact_loss + just = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + generous = minor_stress_impact_loss + content = minor_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = ambitious + has_trait = greedy + } + } + } + } + + #Ignore the Zanj + option = { + name = fp3_story_cycle_zanj_rebellion_events.0006.c + + scope:zanj_leader = { + change_variable = { + name = zanj_rebellion_strength_score + add = 5 + } + } + custom_tooltip = fp3_story_cycle_zanj_rebellion_events_cause_greatly_strengthened_tt + hidden_effect = { + title:c_basra.holder = { + add_visiting_courtier = scope:zanj_leader + add_visiting_courtier = scope:zanj_representative + } + } + + if = { + limit = { + NOT = { title:c_basra.holder = root } + } + + progress_towards_friend_effect = { + REASON = fp3_rival_stayed_out_of_my_business + CHARACTER = title:c_basra.holder + OPINION = default_friend_opinion + } + } + + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0007 + days = { 30 60 } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + generous = minor_stress_impact_gain + content = minor_stress_impact_gain + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + ambitious = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0.5 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = generous + } + } + } + } +} + +fp3_story_cycle_zanj_rebellion_events.0007 = { + scope = none + hidden = yes + immediate = { + if = { + limit = { + scope:zanj_leader = { + OR = { + is_imprisoned = yes + is_alive = no + is_landed = yes + } + } + } + inherit_zanj_rebellion_effect = yes + } + title:c_basra.holder.top_liege = { + trigger_event = { + id = fp3_story_cycle_zanj_rebellion_events.0008 + + } + } + } +} + +### The Zanj Rebellion +fp3_story_cycle_zanj_rebellion_events.0008 = { + type = character_event + theme = battle + override_background = { reference = wilderness_wetlands } + title = fp3_story_cycle_zanj_rebellion_events.0008.t + desc = { + desc = fp3_story_cycle_zanj_rebellion_events.0008.desc.a + triggered_desc = { + trigger = { + scope:zanj_leader = { NOT = { has_character_flag = new_zanj_leader}} + } + desc = fp3_story_cycle_zanj_rebellion_events.0008.desc.b + } + triggered_desc = { + trigger = { + scope:zanj_leader = { has_character_flag = new_zanj_leader } + } + desc = fp3_story_cycle_zanj_rebellion_events.0008.desc.c + } + desc = fp3_story_cycle_zanj_rebellion_events.0008.desc.d + } + + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:zanj_leader + animation = celebrate_sword + } + + immediate = { + scope:zanj_leader = { + give_nickname = nick_chief_of_the_zanj + hidden_effect = { + random_owned_story = { + type = story_zanj_rebellion + end_story = yes + } + } + } + hidden_effect = { + fp3_start_zanj_rebellion_effect = { + TARGET_COUNTY = title:c_basra + REBEL_LEADER = scope:zanj_leader + } + create_zanj_courtier_effect = { + EMPLOYER = scope:zanj_leader + LOCATION = scope:zanj_leader.location + } + create_zanj_courtier_effect = { + EMPLOYER = scope:zanj_leader + LOCATION = scope:zanj_leader.location + } + create_zanj_courtier_effect = { + EMPLOYER = scope:zanj_leader + LOCATION = scope:zanj_leader.location + } + create_zanj_courtier_effect = { + EMPLOYER = scope:zanj_leader + LOCATION = scope:zanj_leader.location + } + } + } + + option = { + name = fp3_story_cycle_zanj_rebellion_events.0008.a + } +} \ No newline at end of file diff --git a/N3OW/events/dlc/fp3/fp3_struggle_events.txt b/N3OW/events/dlc/fp3/fp3_struggle_events.txt new file mode 100644 index 00000000..3a9cd0f8 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_struggle_events.txt @@ -0,0 +1,1339 @@ +namespace = fp3_struggle + +### EVENT LIST #################################################################### +## 0001 - 0020 Internal Management Events by Hugo Cortell +## 0021 - 0030 Invalidation Events by Hugo Cortell +## 0031 - 0040 Empty block by Hugo Cortell +## 0051 - 0060 FP3 Struggle Intro Events by Hugo Cortell +## 0061 - 0070 Realm Shattering Events by Hugo Cortell +## 0071 - 0300 Struggle Endings by Thalassic Design Dept (Ola, Eren, Hugo) +## XXXX - XXXX Event Name Here by Author Name Here +## XXXX - XXXX Event Name Here by Author Name Here +## XXXX - XXXX Event Name Here by Author Name Here +## 9980 - 9999 Integrity Validation Tools by Hugo Cortell +################################################################################### + +################################### +# FP3 Maintenance Events +# By Ewan Cowhig Croft +################################### + +scripted_trigger fp3_struggle_0001_valid_ai_struggle_char_trigger = { + # Basic checks. + can_execute_decision = fp3_name_read_in_friday_prayer_decision + is_ai = yes + # Suitability for switchin' checks. + OR = { + # If they're gonna become a supporter, it should make sense. + AND = { + opinion = { + target = title:d_sunni.holder + value >= low_positive_opinion + } + OR = { + # We check for the opposite, since you're flipflopping. + has_trait = fp3_struggle_detractor + NOR = { + has_trait = fp3_struggle_supporter + has_trait = fp3_struggle_detractor + } + } + } + # If they're gonna become a detractor, that should make sense too. + AND = { + opinion = { + target = title:d_sunni.holder + value <= low_negative_opinion + } + OR = { + # We check for the opposite, since you're flipflopping. + has_trait = fp3_struggle_supporter + NOR = { + has_trait = fp3_struggle_supporter + has_trait = fp3_struggle_detractor + } + } + } + } +} + +fp3_struggle.0001 = { + hidden = yes + scope = none + scope = struggle + + # If the struggle ends, break the loop. + trigger = { exists = struggle:persian_struggle } + + immediate = { + if = { + # If there isn't a caliph at present, then stop trying to make people talk about them. + limit = { exists = title:d_sunni.holder } + struggle:persian_struggle = { + every_involved_ruler = { + limit = { fp3_struggle_0001_valid_ai_struggle_char_trigger = yes } + random = { + chance = fp3_struggle_switch_sides_value + execute_decision = fp3_name_read_in_friday_prayer_decision + } + } + every_interloper_ruler = { + limit = { fp3_struggle_0001_valid_ai_struggle_char_trigger = yes } + random = { + chance = fp3_struggle_switch_sides_value + execute_decision = fp3_name_read_in_friday_prayer_decision + } + } + } + } + + # Cue this event up again for the next time around. + trigger_event = { + id = fp3_struggle.0001 + years = { 3 5 } + } + } +} + +################################### +# FP3 Intro Events +# By Hugo Cortell, reworked by Ewan Cowhig Croft +################################### +fp3_struggle.0051 = { # BOOKMARK EVENT + type = character_event + window = fullscreen_event + title = fp3_struggle.0051.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + any_character_struggle = { + is_struggle_type = persian_struggle + is_struggle_phase = struggle_persia_phase_unrest + } + } + desc = fp3_struggle.0051.desc.unrest + } + desc = fp3_struggle.0051.desc.stabilization + } + first_valid = { + triggered_desc = { + trigger = { + any_character_struggle = { + is_struggle_type = persian_struggle + is_struggle_phase = struggle_persia_phase_stabilisation + } + } + desc = fp3_struggle.0051.desc.stabilization_actor + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_supporter + } + desc = fp3_struggle.0051.desc.supporter + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_detractor + } + desc = fp3_struggle.0051.desc.detractor + } + triggered_desc = { + trigger = { + fp3_struggle_is_the_caliph = yes + } + desc = fp3_struggle.0051.desc.caliph + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + desc = fp3_struggle.0051.desc.involved + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = interloper + is_struggle_type = persian_struggle + } + } + desc = fp3_struggle.0051.desc.interloper + } + } + } + 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_character_flag = fp3_struggle_intro_event_flag } + any_character_struggle = { is_struggle_type = persian_struggle } + } + override_background = { reference = fp3_fullscreen_intro } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + cooldown = { years = 100 } + + widgets = { + widget = { + gui = "event_window_widget_struggle_info" + container = "dynamic_content_widget" + controller = struggle_info + setup_scope = { struggle:persian_struggle = { save_scope_as = struggle } } + } + } + immediate = { + play_music_cue = strugglestart_cue + add_character_flag = fp3_struggle_intro_event_flag + add_to_global_variable_list = { # List is only checked for removal, comparing it in the trigger would be needlessly expensive + name = fp3_intro_flag_character_list + target = root + } + save_scope_value_as = { + name = start + value = yes + } + + # LOC SCOPES + character:34010 = { save_scope_as = Mutawakkil } # Stabbed by guards + character:34012 = { save_scope_as = Muntasir } # Poisoned probably + character:34013 = { save_scope_as = Mustain } # Betrayed by bookmark character (?) (Note: this char is listed as 3933 in some other files for some reason) + character:34014 = { save_scope_as = Mostaza } # Bookmark ruler + } + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + any_character_struggle = { is_struggle_type = persian_struggle } + has_title = character:34014.primary_title + } + desc = fp3_struggle.0051.b + } + desc = fp3_struggle.0051.a + } + } + } + clicksound = "event:/DLC/FP2/SFX/UI/fp2_struggle_start_select" + } +} + +################################################# +# Struggle Endings # +# By Hugo Cortell, Maxence Voleau, Ola Jentzsch & Eren Humphrey # +################################################################### +# Script is set up in this way to prevent out of order executions # +################################################################### + +### STRENGTHEN CALIPHATE ENDING ### 0071 = 0080 ### +fp3_struggle.0071 = { # Strengthen the Caliphate Ending + type = character_event + window = fullscreen_event + title = fp3_struggle.0071.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + fp3_struggle_is_the_caliph = yes + } + desc = fp3_struggle.0071.desc.caliph + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_supporter + } + desc = fp3_struggle.0071.desc.supporter + } + } + } + theme = court + override_background = { reference = fp3_fullscreen_strength } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + immediate = { + fp3_ending_effects_assertion = yes + character:34014 = { save_scope_as = Mostaza } # Bookmark ruler + play_music_cue = struggleend_cue + } + + option = { + name = fp3_struggle.0071.a + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + + ai_chance = { + base = 75 + + modifier = { + factor = 0.1 + realm_size >= 250 + } + } + } + + option = { + trigger = { + has_dlc_feature = roads_to_power + fp3_struggle_is_the_caliph = yes + NOT = { government_has_flag = government_is_administrative } + } + name = fp3_struggle.0071.b + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + + convert_to_administrative_from_feudalism_effect = { GOVERNMENT_TO_ADOPT = flag:administrative } + add_legitimacy_effect = { LEGITIMACY = admin_convert_legitimacy_value } #One Time Legitimacy Boost + + ai_chance = { + base = 0 + + modifier = { + add = 25 + realm_size >= 75 + } + modifier = { + add = 25 + realm_size >= 100 + } + modifier = { + add = 25 + realm_size >= 125 + } + modifier = { + add = 25 + realm_size >= 150 + } + modifier = { + add = 50 + realm_size >= 200 + } + } + } + + after = { + fp3_end_persian_struggle_effect = { + ENDING = struggle_persia_ending_assertion_decision + EVENT = fp3_struggle.0072 + FLAG = flag:fp3_struggle_strengthen_caliphate_ending + } + } +} + +fp3_struggle.0072 = { # Notification for relevant people + type = character_event + window = fullscreen_event + title = fp3_struggle.0071.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + fp3_struggle_is_the_caliph = yes + } + desc = fp3_struggle.0072.desc.caliph + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_supporter + } + desc = fp3_struggle.0072.desc.supporter + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_detractor + } + desc = fp3_struggle.0072.desc.detractor + } + + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + desc = fp3_struggle.0072.desc.involved + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = interloper + is_struggle_type = persian_struggle + } + } + desc = fp3_struggle.0072.desc.interloper + } + desc = fp3_struggle.0072.desc.uninvolved + } + } + theme = court + override_background = { reference = fp3_fullscreen_strength } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + trigger = { + NOT = { has_character_flag = struggle_end_notification } + } + + immediate = { + show_as_tooltip = { struggle:persian_struggle = { end_struggle = yes } } + add_character_flag = struggle_end_notification + + play_music_cue = struggleend_cue + } + + option = { + name = fp3_struggle.0072.a + trigger = { + OR = { + fp3_struggle_is_the_caliph = yes + has_trait = fp3_struggle_supporter + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + option = { + name = fp3_struggle.0072.a + trigger = { + NOR = { + fp3_struggle_is_the_caliph = yes + has_trait = fp3_struggle_supporter + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_negative" + } + after = { + remove_character_flag = struggle_end_notification + } +} + +### CONCESSION ENDING ### 0081 = 0090 ### + +fp3_struggle.0081 = { # + type = character_event + window = fullscreen_event + title = fp3_struggle.0082.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_trait = fp3_struggle_supporter } + desc = fp3_struggle.0082.desc.supporter + } + triggered_desc = { + trigger = { has_trait = fp3_struggle_detractor } + desc = fp3_struggle.0082.desc.detractor + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + desc = { + desc = fp3_struggle.0082.desc.intro + desc = fp3_struggle.0082.desc.involved + } + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = interloper + is_struggle_type = persian_struggle + } + } + desc = { + desc = fp3_struggle.0082.desc.intro + desc = fp3_struggle.0082.desc.interloper + } + } + desc = fp3_struggle.0082.desc.uninvolved + } + } + theme = court + override_background = { reference = fp3_fullscreen_concession } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + immediate = { + play_music_cue = struggleend_cue + } + + option = { + name = fp3_struggle.0082.a + show_as_tooltip = { + struggle:persian_struggle = { end_struggle = yes } + fp3_struggle_ending_concession_effects = yes + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_negative" + } + + after = { + fp3_end_persian_struggle_effect = { + ENDING = yes + EVENT = fp3_struggle.0082 + FLAG = flag:fp3_struggle_concession_ending + } + } +} + +fp3_struggle.0082 = { # Notification for relevant people + type = character_event + window = fullscreen_event + title = fp3_struggle.0082.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_trait = fp3_struggle_supporter } + desc = fp3_struggle.0082.desc.supporter + } + triggered_desc = { + trigger = { has_trait = fp3_struggle_detractor } + desc = fp3_struggle.0082.desc.detractor + } + triggered_desc = { + trigger = { exists = scope:involved } + desc = { + desc = fp3_struggle.0082.desc.intro + desc = fp3_struggle.0082.desc.involved + } + } + triggered_desc = { + trigger = { exists = scope:interloper } + desc = { + desc = fp3_struggle.0082.desc.intro + desc = fp3_struggle.0082.desc.interloper + } + } + desc = fp3_struggle.0082.desc.uninvolved + } + } + theme = court + override_background = { reference = fp3_fullscreen_concession } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + # There could, and should, be a event_window_widget_struggle_info widget here + + immediate = { + if = { + limit = { + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + save_scope_as = involved + } + else_if = { + limit = { + any_character_struggle = { + involvement = interloper + is_struggle_type = persian_struggle + } + } + save_scope_as = interloper + } + show_as_tooltip = { + struggle:persian_struggle ?= { end_struggle = yes } + fp3_struggle_ending_concession_effects = yes + } + play_music_cue = struggleend_cue + } + + option = { + name = fp3_struggle.0082.b + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_negative" + } +} + +### FOUNDATION ENDINGS ### 0091 = 0180 ### +fp3_struggle.0091 = { # Rekindle Iran + type = character_event + window = fullscreen_event + title = fp3_struggle.0091.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = fp3_struggle_supporter + } + desc = fp3_struggle.0091.desc.supporter + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_detractor + } + desc = fp3_struggle.0091.desc.detractor + } + } + } + theme = court + override_background = { reference = fp3_fullscreen_rekindle } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + immediate = { + save_scope_as = struggle_ender + # Save Sunni caliph or previous one as scope:struggle_liege + fp3_save_sunni_caliph_or_previous_effect = yes + title:e_persia = { save_scope_as = persia_loc } # Persia gets renamed under clan govs + + fp3_struggle_rekindle_iran_effects = yes + + play_music_cue = struggleend_cue + + dynasty:1029100 = { save_scope_as = sassanid_dynasty } + } + + option = { + name = fp3_struggle.0091.a + + show_as_tooltip = { struggle:persian_struggle = { end_struggle = yes } } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + after = { + fp3_end_persian_struggle_effect = { + ENDING = struggle_persia_ending_rekindle_iran_decision + EVENT = fp3_struggle.0092 + FLAG = flag:fp3_struggle_rekindle_iran_ending + } + } +} + +fp3_struggle.0092 = { # Notification for relevant people + type = character_event + window = fullscreen_event + title = fp3_struggle.0091.t + desc = { + desc = fp3_struggle.0092.intro + first_valid = { + triggered_desc = { + trigger = { + culture = { has_cultural_pillar = heritage_iranian } + } + desc = fp3_struggle.0092.desc.iranian + } + desc = fp3_struggle.0092.desc.non-iranian + } + } + theme = court + override_background = { reference = fp3_fullscreen_rekindle } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + # There could, and should, be a event_window_widget_struggle_info widget here + + immediate = { + show_as_tooltip = { + struggle:persian_struggle = { end_struggle = yes } + fp3_struggle_rekindle_iran_effects = yes + } + play_music_cue = struggleend_cue + } + + option = { + name = fp3_struggle.0092.a + trigger = { + culture = { has_cultural_pillar = heritage_iranian } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + option = { + name = fp3_struggle.0092.a + trigger = { + NOT = { + culture = { has_cultural_pillar = heritage_iranian } + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_negative" + } +} + +fp3_struggle.0095 = { # Temper the Caliphate, Shia Ending + type = character_event + window = fullscreen_event + title = fp3_struggle.0095.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + faith = { + OR = { + has_doctrine = muhammad_succession_shia_doctrine + has_doctrine = muhammad_succession_zandaqa_doctrine + } + } + } + desc = fp3_struggle.0095.desc.shia_and_zandaqa + } + triggered_desc = { + trigger = { + faith = { + has_doctrine = muhammad_succession_muhakkima_doctrine + } + } + desc = fp3_struggle.0095.desc.muhakkima + } + desc = fp3_struggle.0095.desc.fallback + } + } + theme = court + override_background = { reference = fp3_fullscreen_temper } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + immediate = { + root = { save_scope_as = struggle_ender } + # Save Sunni caliph or previous one as scope:struggle_liege + fp3_save_sunni_caliph_or_previous_effect = yes + character:34005 = { save_scope_as = harun_the_rightly_guided } + + fp3_struggle_ending_shia_caliphate_effects = yes + + play_music_cue = struggleend_cue + + character:33911 = { save_scope_as = ali } + + } + + option = { + name = fp3_struggle.0095.a + show_as_tooltip = { struggle:persian_struggle = { end_struggle = yes } } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + after = { + fp3_end_persian_struggle_effect = { + ENDING = struggle_persia_ending_foundation_decision + EVENT = fp3_struggle.0096 + FLAG = flag:fp3_struggle_shia_caliphate_ending + } + } +} + +fp3_struggle.0096 = { # Notification for relevant people + type = character_event + window = fullscreen_event + title = fp3_struggle.0095.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = fp3_struggle_supporter + } + desc = fp3_struggle.0096.desc.supporter + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_detractor + } + desc = fp3_struggle.0096.desc.detractor + } + + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + desc = fp3_struggle.0096.desc.involved + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = interloper + is_struggle_type = persian_struggle + } + } + desc = fp3_struggle.0096.desc.interloper + } + desc = fp3_struggle.0096.desc.uninvolved + } + } + theme = court + override_background = { reference = fp3_fullscreen_temper } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + # There could, and should, be a event_window_widget_struggle_info widget here + + immediate = { + play_music_cue = struggleend_cue + show_as_tooltip = { + fp3_struggle_ending_shia_caliphate_effects = yes + struggle:persian_struggle = { end_struggle = yes } + } + } + + option = { + name = fp3_struggle.0096.a + trigger = { + NOR = { + has_trait = fp3_struggle_supporter + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + option = { + name = fp3_struggle.0096.a + trigger = { + OR = { + has_trait = fp3_struggle_supporter + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_negative" + } +} + +fp3_struggle.0100 = { # Temper the Caliphate, Vassalize Caliphate Ending + type = character_event + window = fullscreen_event + title = fp3_struggle.0100.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + faith = { + OR = { + has_doctrine = muhammad_succession_shia_doctrine + has_doctrine = muhammad_succession_zandaqa_doctrine + } + } + } + desc = fp3_struggle.0100.desc.shia_and_zandaqa + } + triggered_desc = { + trigger = { + faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } + } + desc = fp3_struggle.0100.desc.muhakkima + } + desc = fp3_struggle.0100.desc + } + } + + theme = court + override_background = { reference = fp3_fullscreen_temper } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + immediate = { + root = { save_scope_as = struggle_ender } + title:d_sunni.holder = { save_scope_as = struggle_liege } + fp3_struggle_ending_vassalize_caliph_effects = yes + + play_music_cue = struggleend_cue + } + + option = { + name = fp3_struggle.0100.a + show_as_tooltip = { struggle:persian_struggle = { end_struggle = yes } } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + after = { + fp3_end_persian_struggle_effect = { + ENDING = struggle_persia_ending_foundation_decision + EVENT = fp3_struggle.0101 + FLAG = flag:fp3_struggle_vassalize_caliph_ending + } + } +} + +fp3_struggle.0101 = { # Notification for relevant people + type = character_event + window = fullscreen_event + title = fp3_struggle.0100.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = fp3_struggle_supporter + } + desc = fp3_struggle.0101.desc.supporter + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_detractor + } + desc = fp3_struggle.0101.desc.detractor + } + + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = involved + is_struggle_type = persian_struggle + } + } + desc = fp3_struggle.0101.desc.involved + } + triggered_desc = { + trigger = { + any_character_struggle = { + involvement = interloper + is_struggle_type = persian_struggle + } + } + desc = fp3_struggle.0101.desc.interloper + } + desc = fp3_struggle.0101.desc.uninvolved + } + } + theme = court + override_background = { reference = fp3_fullscreen_temper } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + immediate = { + show_as_tooltip = { struggle:persian_struggle = { end_struggle = yes } } + + play_music_cue = struggleend_cue + } + + option = { + name = fp3_struggle.0101.a + trigger = { + NOR = { + has_trait = fp3_struggle_supporter + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + option = { + name = fp3_struggle.0101.a + trigger = { + OR = { + has_trait = fp3_struggle_supporter + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_negative" + } +} + +### SUNDERING THE CALIPHATE ### 0191 = 0200 ### +fp3_struggle.0191 = { # Sunder the Caliphate + type = character_event + title = fp3_struggle.0191.t + desc = fp3_struggle.0191.desc + theme = court + left_portrait = { + character = scope:sunderer + animation = war_over_win + } + lower_right_portrait = scope:struggle_liege + + immediate = { + # Select the caliph and destroy their title + fp3_sundered_caliphate_effects = yes + } + + option = { + name = fp3_struggle.0191.a + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } +} + +fp3_struggle.0192 = { # Notification for relevant people + type = character_event + title = fp3_struggle.0192.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + fp3_struggle_is_the_caliph = yes + } + desc = fp3_struggle.0192.desc.caliph + } + triggered_desc = { + trigger = { + OR = { + has_trait = fp3_struggle_supporter + is_vassal_of = scope:struggle_liege + } + } + desc = fp3_struggle.0192.desc.supporter_or_vassal + } + triggered_desc = { + trigger = { + has_trait = fp3_struggle_detractor + } + desc = fp3_struggle.0192.desc.detractor + } + } + } + + + theme = court + override_background = { reference = fp3_fullscreen_sunder } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + left_portrait = { + character = scope:sunderer + animation = war_over_win + } + lower_right_portrait = scope:struggle_liege + + option = { + name = fp3_struggle.0192.c + trigger = { + NOR = { + fp3_struggle_is_the_caliph = yes + has_trait = fp3_struggle_supporter + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + option = { + name = fp3_struggle.0192.b + trigger = { + OR = { + fp3_struggle_is_the_caliph = yes + has_trait = fp3_struggle_supporter + } + } + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_negative" + } +} + +################################### +# FP3 casus belli events +# By Joe Parkin +################################### + +# Install loyal puppet - declared puppet ping +fp3_struggle.8000 = { + type = letter_event + opening = fp3_struggle.8000.t + desc = { + desc = fp3_struggle.8000.desc + } + sender = scope:attacker + + immediate = { + send_interface_message = { + type = event_struggle_neutral + title = install_loyalist_puppet_declared_puppet + left_icon = scope:attacker + right_icon = scope:defender + show_as_tooltip = { + scope:attacker = { + start_war = { + casus_belli = "fp3_install_loyalist_cb" + target = scope:defender + } + } + } + } + } + + # Indeed? + option = { + name = fp3_struggle.8000.a + } +} + +# Install loyal puppet - declared defender ping +fp3_struggle.8001 = { + type = letter_event + opening = fp3_struggle.8000.t + desc = { + desc = fp3_struggle.8001.desc + } + sender = scope:attacker + + immediate = { + send_interface_message = { + type = event_struggle_bad + title = install_loyalist_puppet_declared_defender + left_icon = scope:attacker + right_icon = scope:loyalist_puppet + show_as_tooltip = { + scope:attacker = { + start_war = { + casus_belli = "fp3_install_loyalist_cb" + target = scope:defender + } + } + } + } + } + + # Outrageous! + option = { + name = fp3_struggle.8001.a + } +} + +# Install loyal puppet - won puppet ping +fp3_struggle.8002 = { + type = letter_event + opening = fp3_struggle.8000.t + desc = { + desc = fp3_struggle.8002.desc + } + sender = scope:attacker + + immediate = { + send_interface_message = { + type = event_struggle_good + title = install_loyalist_puppet_won_puppet + left_icon = scope:attacker + right_icon = scope:defender + show_as_tooltip = { + every_in_list = { + list = title_to_steal + save_scope_as = stolen_title + root = { get_title = scope:stolen_title } + } + custom_tooltip = fp3_struggle.8002.alliance_tt + if = { + limit = { scope:defender.imprisoner ?= root } + imprison = { + target = scope:defender + type = house_arrest + } + } + } + } + } + + # Ok! + option = { + name = fp3_struggle.8002.a + } +} + + +################################### +# Integrity Validation Events +# By Hugo Cortell +################################### +fp3_struggle.9980 = { # Validation of title + type = character_event + orphan = yes + title = { + desc = Hugo + desc = game_concept_struggle_struggles + desc = number_two + desc = debug + } + desc = { + desc = historical_commander_trait.0003.d + desc = stress_threshold.3201.depressed.effect + } + + theme = mental_break + left_portrait = title:e_arabia.holder + + immediate = { title:e_arabia.holder = { add_piety = 30000 } } # Hard title validation + + option = { + name = { + text = { + desc = martial_chivalry.2015.a + desc = rivalry.1016.a.exposed + } + } + } +} + +fp3_struggle.9981 = { # Destroy e_arabia (used mostly for checking invalidations) + hidden = yes + orphan = yes + immediate = { destroy_title = title:e_arabia } +} + +fp3_struggle.9982 = { # Revision 2 nav event, to make QA's life easier and avoid unecessary crashes + type = character_event + title = { + desc = Hugo + desc = CHARACTER_POSS + desc = intrigue_broken_modifier + desc = game_concept_struggle + desc = MENU + } + desc = { + desc = bp1_yearly.9018.c + desc = double_line_break + desc = childhood.7400_mother_dead + desc = double_line_break + desc = yearly.7021.b + } + + orphan = yes + theme = mental_break + + option = { # Dynamically start a struggle + trigger = { NOT = { exists = struggle:persian_struggle } } + name = FRONTEND_MP_GAME_SETUP_HOST_NEW_GAME + + random_ruler = { + limit = { + top_liege = this + location ?= { geographical_region = world_persian_empire } + } + primary_title = { save_scope_as = debug_caliph } + } + start_struggle = { + struggle_type = persian_struggle + start_phase = struggle_persia_phase_stabilisation + } + + send_interface_message = { # Informs you of who the "debug caliph" is + type = event_martial_bad + title = trait_beauty_bad_1_desc + left_icon = scope:debug_caliph + right_icon = scope:debug_caliph.holder + } + } + option = { # Go forward in the struggle flow + name = dynn_Daflos_motto + trigger = { exists = struggle:persian_struggle } + + if = { + limit = { struggle:persian_struggle = { is_struggle_phase = struggle_persia_phase_unrest } } + struggle:persian_struggle = { change_struggle_phase = { struggle_phase = struggle_persia_ending_phase_concession } } + } + else_if = { + limit = { struggle:persian_struggle = { is_struggle_phase = struggle_persia_phase_stabilisation } } + struggle:persian_struggle = { change_struggle_phase = { struggle_phase = struggle_persia_phase_unrest with_transition = yes } } + } + } + option = { # Go backwards in the struggle flow + name = default_retreat + trigger = { exists = struggle:persian_struggle } + + if = { + limit = { struggle:persian_struggle = { is_struggle_phase = struggle_persia_phase_unrest } } + struggle:persian_struggle = { change_struggle_phase = { struggle_phase = struggle_persia_phase_stabilisation } } + } + } + option = { name = EXIT_TO_DESKTOP } # Exit event without doing anything +} + +fp3_struggle.9983 = { # Create Persian Empire Test + hidden = yes + orphan = yes + immediate = { + create_title_and_vassal_change = { + type = created + save_scope_as = change + } + title:e_persia = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } +} + +fp3_struggle.9984 = { # Ending simulator - Allows you to end the struggle in a clean way, works better/is safer than commands + type = character_event + window = fullscreen_event + title = ENDING_DECISION_AVAILABLE + desc = ENDING_DECISION_BUTTON_LABEL_MULTIPLE + orphan = yes + theme = realm + override_background = { reference = fp3_fullscreen_strength } + override_sound = { reference = "event:/DLC/FP2/SFX/UI/fp2_struggle_ui_intro_animate" } + + widgets = { + widget = { + gui = "event_window_widget_struggle_info" + container = "dynamic_content_widget" + controller = struggle_info + setup_scope = { struggle:persian_struggle = { save_scope_as = struggle } } + } + } + + immediate = { + # Save Sunni caliph or previous one as scope:struggle_liege + fp3_save_sunni_caliph_or_previous_effect = yes + } + + option = { # Concession + name = struggle_persia_ending_phase_concession + save_scope_value_as = { + name = ending_to_simulate + value = flag:concession + } + trigger_event = fp3_struggle.9985 + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + + option = { # Assertion (Strengthen) + name = struggle_persia_ending_assertion + save_scope_value_as = { + name = ending_to_simulate + value = flag:strength + } + trigger_event = fp3_struggle.9985 + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + option = { # Sunni Caliphate + name = struggle_persia_ending_foundation_decision_option_shia + save_scope_value_as = { + name = ending_to_simulate + value = flag:sunni + } + trigger_event = fp3_struggle.9985 + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + option = { # Consume/Vassalize + name = struggle_persia_ending_foundation_decision_option_vassalize + save_scope_value_as = { + name = ending_to_simulate + value = flag:vassal + } + trigger_event = fp3_struggle.9985 + clicksound = "event:/DLC/FP3/SFX/UI/Notifications/Toasts/struggle_end_positive" + } + + option = { name = EXIT_TO_DESKTOP } +} + +fp3_struggle.9985 = { # Simulator Follow-up (keeps it hidden and clean to prevent QA panic) + hidden = yes + immediate = { + struggle:persian_struggle = { + # Ensure we are in the correct position to fire the ending + if = { + limit = { + scope:ending_to_simulate = flag:strength + is_struggle_phase = struggle_persia_phase_unrest + } + change_struggle_phase = { struggle_phase = struggle_persia_phase_stabilisation } + } + else_if = { + limit = { + OR = { + scope:ending_to_simulate = flag:sunni + scope:ending_to_simulate = flag:vassal + } + is_struggle_phase = struggle_persia_phase_stabilisation + } + change_struggle_phase = { struggle_phase = struggle_persia_phase_unrest } + } + } + # Cases for firing the correct phase + switch = { + trigger = scope:ending_to_simulate + flag:concession = { trigger_event = fp3_struggle.0081 } + flag:sunni = { trigger_event = fp3_struggle.0095 } + flag:vassal = { trigger_event = fp3_struggle.0100 } + flag:strength = { trigger_event = fp3_struggle.0071 } + + fallback = { + assert_if = { + limit = { always = yes } + text = "FP3 ENDING SIMULATION DEBUG TOOL ERROR: NO VALID scope:ending_to_simulate STATE!" + } + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_tax_collector_events_ola.txt b/N3OW/events/dlc/fp3/fp3_tax_collector_events_ola.txt new file mode 100644 index 00000000..779a8541 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_tax_collector_events_ola.txt @@ -0,0 +1,1416 @@ +namespace = fp3_clan + +########EVENT INDEX############ +#fp3_clan.8008 - Bleeding them Dry, by Ola Jentzsch +#fp3_clan.8009 - Popular with the People, by Ola Jentzsch +#fp3_clan.8010 - Competent Qadis / More Magistrates, by Ola Jentzsch +#fp3_clan.8011 - A Proper Paymaster, by Ola Jentzsch +#fp3_clan.8012 - Auspicious Avarice, by Ola Jentzsch +#fp3_clan.8013 - The Burden of Tax Farming, by Ola Jentzsch + + +###########fp3_clan.8008 - Bleeding them Dry, by Ola Jentzsch############### +scripted_trigger tax_collector_8008_trigger = { + is_available_ai_adult = yes + tax_collector_aptitude = { + target = clan_tax_slot + value >= 4 + } + ai_honor <= low_positive_ai_value +} + +scripted_trigger house_unity_8008_member_trigger = { + is_available_ai_adult = yes + is_vassal_of = root + opinion = { + target = root + value <= 75 + } + reverse_opinion = { + target = scope:$SCOPE$ + value < 0 + } +} + +fp3_clan.8008 = { + type = character_event + title = fp3_clan.8008.t + desc = fp3_clan.8008.desc + theme = intrigue_intimidation_focus + + left_portrait = { + character = root + animation = personality_cynical + triggered_animation = { + trigger = { + OR = { + has_trait = ambitious + has_trait = sadistic + has_trait = greedy + } + } + animation = personality_greedy + } + } + right_portrait = { + character = scope:ambitious_tax_collector + animation = chancellor + triggered_animation = { + trigger = { ai_greed >= high_positive_ai_value } + animation = personality_dishonorable + } + } + lower_left_portrait = { + character = scope:beleaguered_clan_member + } + + override_background = { reference = corridor_night } + + trigger = { + has_fp3_dlc_trigger = yes + is_available_healthy_adult = yes + + any_vassal = { #checking that it would be beneficial to gain the Extort Subjects decision + highest_held_title_tier >= tier_county + } + + any_tax_collector = { + tax_collector_8008_trigger = yes + save_temporary_scope_as = tax_collector_temp + } + + house = { + any_house_unity_member = { + house_unity_8008_member_trigger = { SCOPE = tax_collector_temp } + } + } + } + + cooldown = { years = 10 } + + immediate = { + random_tax_collector = { + limit = { + tax_collector_8008_trigger = yes + } + save_scope_as = ambitious_tax_collector + } + + house = { + random_house_unity_member = { + limit = { + house_unity_8008_member_trigger = { SCOPE = ambitious_tax_collector } + } + save_scope_as = beleaguered_clan_member + } + } + } + + option = { + name = fp3_clan.8008.a + + add_tyranny = medium_tyranny_value + + add_character_modifier = { + modifier = fp3_justification_for_taxation_modifier + years = 20 + } + + if = { + limit = { + NOR = { + has_perk = it_is_my_domain_perk + has_lifestyle = stewardship_lifestyle + } + } + custom_tooltip = unlock_extortion.tt + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:beleaguered_clan_member + VALUE = minor_unity_loss + DESC = clan_unity_extorted_vassal.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:ambitious_tax_collector = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + ambitious = minor_stress_impact_loss + just = medium_stress_impact_gain + honest = medium_stress_impact_gain + generous = medium_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 0.5 + ai_honor = -0.7 + ai_compassion = -0.2 + } + } + } + + option = { + name = fp3_clan.8008.b + + scope:beleaguered_clan_member = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + add_opinion = { + target = root + modifier = extorted_me_opinion + } + } + + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:beleaguered_clan_member + VALUE = minor_unity_loss + DESC = clan_unity_extorted_vassal.desc + REVERSE_NON_HOUSE_TARGET = no + } + + scope:ambitious_tax_collector = { + add_opinion = { + target = root + modifier = trusted_me_opinion + opinion = 10 + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + just = minor_stress_impact_gain + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.8 + ai_energy = 0.3 + ai_honor = -0.4 + ai_compassion = -0.7 + } + } + } + + option = { + name = fp3_clan.8008.c + + scope:ambitious_tax_collector = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + stress_impact = { + content = minor_stress_impact_loss + greedy = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.8 + ai_energy = 0.3 + ai_honor = -0.4 + ai_compassion = -0.7 + } + } + } +} + +#############fp3_clan.8009 - Popular with the People, by Ola Jentzsch############ +scripted_trigger fp3_clan_8009_province_trigger = { + has_holding_type = city_holding + barony = { + is_under_holy_order_lease = no + holder = { fp3_clan_suitable_holder_trigger = yes } + } +} + +scripted_trigger fp3_clan_suitable_holder_trigger = { + stewardship >= average_skill_rating + NOR = { + has_trait = sadistic + has_trait = honest + has_trait = content + has_trait = lazy + has_trait = arrogant + has_trait = callous + has_relation_friend = root + has_relation_lover = root + is_close_family_of = root + + } +} + +scripted_trigger tax_collector_8009_trigger = { + is_available_ai_adult = yes + tax_collector_aptitude = { + target = clan_tax_slot + value >= 2 + } + OR = { + ai_honor <= low_positive_ai_value + ai_compassion < low_positive_ai_value + ai_greed >= medium_positive_ai_value + } +} + +fp3_clan.8009 = { + type = character_event + title = fp3_clan.8009.t + desc = fp3_clan.8009.desc + theme = realm + + left_portrait = { + character = root + animation = boredom + triggered_animation = { + trigger = { + OR = { + has_trait = vengeful + has_trait = paranoid + has_trait = sadistic + } + } + animation = personality_vengeful + } + } + right_portrait = { + character = scope:righteous_tax_collector + animation = reading + } + lower_right_portrait = { + character = scope:corrupt_mayor + } + + trigger = { + has_fp3_dlc_trigger = yes + is_available_healthy_adult = yes + + any_tax_collector = { + tax_collector_8009_trigger = yes + save_temporary_scope_as = tax_collector_temp + } + + any_held_county = { any_county_province = { fp3_clan_8009_province_trigger = yes } } + } + + cooldown = { years = 20 } + + immediate = { + random_tax_collector = { + limit = { + tax_collector_8009_trigger = yes + } + save_scope_as = righteous_tax_collector + } + + random_held_county = { + limit = { + any_county_province = { fp3_clan_8009_province_trigger = yes } + } + save_scope_as = fawazil_county + + random_county_province = { + limit = { fp3_clan_8009_province_trigger = yes } + barony = { + save_scope_as = fawazil_barony + + holder = { + save_scope_as = corrupt_mayor + } + } + } + } + + hidden_effect = { + scope:corrupt_mayor = { + add_gold = major_gold_value #this is the corruption money + add_gold = major_gold_value + } + } + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = eccentric + } + desc = fp3_clan.8009.a.eccentric + } + desc = fp3_clan.8009.a + } + } + + } + + scope:corrupt_mayor = { + pay_short_term_gold = { + target = root + gold = scope:corrupt_mayor.gold + } + death = { + death_reason = death_crucified + killer = root + } + } + + scope:fawazil_county = { + add_county_modifier = { + modifier = fp3_locals_infuriated_county_modifier + years = 8 + } + } + + stress_impact = { + sadistic = major_stress_impact_loss + vengeful = major_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 0.9 + ai_honor = -0.5 + ai_compassion = -1 + } + } + } + + option = { + name = fp3_clan.8009.b + + scope:corrupt_mayor = { banish = yes } + + scope:fawazil_county = { + add_county_modifier = { + modifier = fp3_locals_intimidated_county_modifier + years = 4 + } + } + + stress_impact = { + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.6 + ai_greed = 0.5 + ai_rationality = 0.4 + ai_compassion = -0.5 + } + } + } + + option = { + name = fp3_clan.8009.c + + add_character_modifier = { + modifier = fp3_looking_the_other_way_modifier + years = 6 + } + + stress_impact = { + base = medium_stress_impact_loss + shy = major_stress_impact_loss + vengeful = major_stress_impact_gain + wrathful = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_boldness = -0.7 + ai_rationality = 0.6 + ai_compassion = 0.5 + } + } + } +} + +################fp3_clan.8010 - Competent Qadis / More Magistrates, by Ola Jentzsch################# +scripted_trigger fp3_suitable_magistrate_courtier_trigger = { + save_temporary_scope_as = temp_magistrate + is_available_ai_adult = yes + any_child = { count < 1 } + NOT = { is_of_major_or_minor_interest_trigger = { CHARACTER = root } } + can_be_clergy_due_to_gender_trigger = yes + OR = { + learning >= high_skill_rating + stewardship >= high_skill_rating + } + scope:temp_magistrate != scope:$SCOPE$ +} + +scripted_trigger tax_collector_8010_trigger = { + is_available_ai_adult = yes + tax_collector_aptitude = { + target = clan_tax_slot + value >= 1 + } + tax_collector_aptitude = { #since this would make the modifier redundant + target = clan_tax_slot + value < 4 + } +} + +fp3_clan.8010 = { #More Magistrates + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + has_religion = religion:islam_religion + } + desc = fp3_clan.8010_muslim.t + } + desc = fp3_clan.8010.t + } + } + desc = { + desc = fp3_clan.8010.desc_beginning + first_valid = { + triggered_desc = { + trigger = { + has_religion = religion:islam_religion + } + desc = fp3_clan.8010_muslim_version + } + desc = fp3_clan.8010_non_muslim_version + } + } + theme = corruption + + left_portrait = { + character = scope:competent_tax_collector + animation = stress + triggered_animation = { + trigger = { ai_vengefulness >= low_positive_ai_value } + animation = anger + } + } + right_portrait = { + character = root + animation = personality_rational + triggered_animation = { + trigger = { + OR = { + has_trait = lazy + has_trait = content + has_trait = greedy + has_trait = callous + } + } + animation = dismissal + } + } + + lower_left_portrait = { character = scope:capable_magistrate_candidate } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed = yes + is_available_healthy_adult = yes + + any_tax_collector = { + tax_collector_8010_trigger = yes + save_temporary_scope_as = competent_tax_collector_temp + } + } + + cooldown = { years = 10 } + + immediate = { + random_tax_collector = { + limit = { + tax_collector_8010_trigger = yes + } + save_scope_as = competent_tax_collector + } + + if = { + limit = { + any_courtier = { + fp3_suitable_magistrate_courtier_trigger = { SCOPE = competent_tax_collector } + } + } + random_courtier = { + limit = { + fp3_suitable_magistrate_courtier_trigger = { SCOPE = competent_tax_collector } + } + save_scope_as = capable_magistrate_candidate + } + } + } + + option = { + name = fp3_clan.8010.a + flavor = tax_farming_capable_courtier_flavor + + trigger = { + exists = scope:capable_magistrate_candidate + } + + remove_courtier_or_guest = scope:capable_magistrate_candidate + + scope:competent_tax_collector = { + add_opinion = { + target = root + modifier = slightly_disappointed_opinion + opinion = -10 + } + add_character_modifier = { + modifier = fp3_capable_magistrates_modifier + years = 25 + } + custom_tooltip = increase_aptitude.tt + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_sociability = 0.7 + ai_greed = 0.2 + } + } + } + + option = { + name = fp3_clan.8010.b + + remove_treasury_or_gold = major_treasury_or_gold_value + + scope:competent_tax_collector = { + add_opinion = { + target = root + modifier = trusted_me_opinion + opinion = 20 + } + add_character_modifier = { + modifier = fp3_capable_magistrates_modifier + years = 25 + } + custom_tooltip = increase_aptitude.tt + } + + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.6 + } + } + } + + option = { + name = fp3_clan.8010.c + + scope:competent_tax_collector = { + add_opinion = { + target = root + modifier = fp3_resentful_opinion + opinion = -15 + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_rationality = -0.6 + ai_energy = -0.3 + } + } + } +} + +##################fp3_clan.8011 - A Proper Paymaster, by Ola Jentzsch########################### +scripted_trigger fp3_suitable_extra_tax_collector_competence_traits_trigger = { + is_available_ai_adult = yes + NOT = { has_trait = content } + OR = { + tax_collector_aptitude = { + target = clan_tax_slot + value >= 4 + } + AND = { + tax_collector_aptitude = { + target = clan_tax_slot + value >= 3 + } + OR = { + has_trait = ambitious + has_trait = diligent + has_trait = organizer + has_trait = overseer + has_trait = administrator + martial >= high_skill_rating + } + } + } +} + +fp3_clan.8011 = { #A Proper Paymaster + type = character_event + title = fp3_clan.8011.t + desc = fp3_clan.8011.desc + theme = stewardship_wealth_focus + + left_portrait = { + character = scope:competent_tax_collector + animation = personality_greedy + triggered_animation = { + trigger = { ai_boldness >= low_positive_ai_value } + animation = personality_honorable + } + } + right_portrait = { + character = root + animation = personality_content + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = ambitious + has_trait = diligent + has_trait = brave + } + } + animation = dismissal + } + } + + lower_left_portrait = { character = scope:concerned_marshal } + + override_background = { reference = army_camp } + + trigger = { + has_fp3_dlc_trigger = yes + is_available_healthy_adult = yes + + number_of_maa_regiments >= 1 + + exists = cp:councillor_marshal + + any_tax_collector = { + fp3_suitable_extra_tax_collector_competence_traits_trigger = yes + NOT = { + this = root.cp:councillor_marshal + } + } + } + + cooldown = { years = 10 } + + immediate = { + random_tax_collector = { + limit = { + fp3_suitable_extra_tax_collector_competence_traits_trigger = yes + } + save_scope_as = competent_tax_collector + } + + cp:councillor_marshal = { save_scope_as = concerned_marshal } + } + + option = { + name = fp3_clan.8011.a + + add_character_modifier = { + modifier = fp3_delegated_payments_modifier + years = 25 + } + + scope:competent_tax_collector = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + add_character_modifier = { + modifier = fp3_army_influence_modifier + years = 25 + } + } + + scope:concerned_marshal = { + add_opinion = { + target = root + modifier = fp3_meddling_in_my_privileges_opinion + opinion = -30 + } + if = { + limit = { + NOT = { has_relation_rival = scope:competent_tax_collector } + } + set_relation_rival = { + target = scope:competent_tax_collector + reason = rival_over_position + } + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + content = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.3 + ai_greed = 0.7 + ai_energy = -0.4 + } + } + } + + option = { + name = fp3_clan.8011.b + + duel = { + skill = diplomacy + value = average_skill_rating + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 40 + min = -40 + } + + modifier = { + add = 50 + scope:concerned_marshal = { + OR = { + has_trait = trusting + has_trait = humble + has_trait = content + } + } + } + + modifier = { + add = -50 + scope:concerned_marshal = { + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = ambitious + } + } + } + + modifier = { + add = -50 + scope:competent_tax_collector = { + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = ambitious + } + } + } + + modifier = { + add = 50 + scope:concerned_marshal = { + OR = { + has_trait = humble + has_trait = trusting + has_trait = loyal + } + } + } + + desc = fp3_clan.8011.b.success + send_interface_toast = { + title = fp3_clan.8011.b.success.tt + left_icon = root + + add_character_modifier = { + modifier = fp3_delegated_payments_modifier + years = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8011.b.failure + send_interface_toast = { + title = fp3_clan.8011.b.failure.tt + left_icon = root + + add_character_modifier = { + modifier = fp3_messy_payments_modifier + years = 25 + } + + scope:concerned_marshal = { + add_opinion = { + target = root + modifier = fp3_meddling_in_my_privileges_opinion + opinion = -30 + } + if = { + limit = { + NOT = { has_relation_rival = scope:competent_tax_collector } + } + set_relation_rival = { + target = scope:competent_tax_collector + reason = rival_over_position + } + } + } + scope:competent_tax_collector = { + add_opinion = { + target = root + modifier = fp3_frustrated_opinion + opinion = -10 + } + } + } + } + } + + stress_impact = { + trusting = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.8 + ai_honor = 0.8 + ai_vengefulness = -0.4 + } + } + } + + option = { + name = fp3_clan.8011.c + + scope:competent_tax_collector = { + add_opinion = { + target = root + modifier = fp3_resentful_opinion + opinion = -15 + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_compassion = 0.2 + } + } + } +} + +##############fp3_clan.8012 - Auspicious Avarice, by Ola Jentzsch################### +scripted_trigger tax_collector_8012_trigger = { + tax_collector_aptitude = { + target = clan_tax_slot + value >= 3 + } + is_available_ai_adult = yes + ai_honor < medium_positive_ai_value +} + +scripted_trigger vassal_check_8012_trigger = { + has_any_good_relationship_with_root_trigger = no + is_ai = yes + reverse_opinion = { + target = scope:$SCOPE$ + value < 25 + } +} + +fp3_clan.8012 = { + type = character_event + title = fp3_clan.8012.t + desc = fp3_clan.8012.desc + theme = stewardship_wealth_focus + + left_portrait = { + character = root + animation = personality_compassionate + triggered_animation = { + trigger = { + OR = { + has_trait = ambitious + has_trait = sadistic + has_trait = greedy + } + } + animation = personality_dishonorable + } + } + right_portrait = { + character = scope:greedy_tax_collector + animation = personality_greedy + triggered_animation = { + trigger = { + OR = { + ai_greed >= high_positive_ai_value + ai_honor < low_positive_ai_value + } + } + animation = schadenfreude + } + } + lower_left_portrait = { + character = scope:extorted_vassal + } + + trigger = { + has_fp3_dlc_trigger = yes + is_available_healthy_adult = yes + + any_tax_collector = { + tax_collector_8012_trigger = yes + save_temporary_scope_as = greedy_tax_collector_temp + any_tax_collector_vassal = { + vassal_check_8012_trigger = { SCOPE = greedy_tax_collector_temp } + } + } + } + + cooldown = { years = 10 } + + immediate = { + random_tax_collector = { + limit = { + tax_collector_8012_trigger = yes + save_temporary_scope_as = greedy_tax_collector_temp + any_tax_collector_vassal = { + vassal_check_8012_trigger = { SCOPE = greedy_tax_collector_temp } + } + } + save_scope_as = greedy_tax_collector + random_tax_collector_vassal = { + limit = { + vassal_check_8012_trigger = { SCOPE = greedy_tax_collector_temp } + } + save_scope_as = extorted_vassal + } + } + + hidden_effect = { + scope:extorted_vassal = { + pay_short_term_gold = { + target = scope:greedy_tax_collector + gold = medium_gold_value + } + } + } + + save_scope_value_as = { + name = vassal_medium_gold_halved + value = { + value = scope:extorted_vassal.medium_gold_value + divide = 2 + } + } + } + + option = { + name = fp3_clan.8012.a + + scope:greedy_tax_collector = { + pay_short_term_gold = { + target = root + gold = scope:extorted_vassal.medium_gold_value + } + } + + scope:extorted_vassal = { + add_opinion = { + target = root + modifier = extorted_me_opinion + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -0.4 + ai_honor = -0.4 + } + } + } + + option = { + name = fp3_clan.8012.b + + add_piety = medium_piety_gain + + scope:greedy_tax_collector = { + remove_short_term_gold = scope:extorted_vassal.medium_gold_value + } + + stress_impact = { + zealous = minor_stress_impact_loss + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 1 + ai_rationality = 0.6 + } + } + } + + option = { + name = fp3_clan.8012.c + + add_prestige = minor_prestige_gain + + scope:greedy_tax_collector = { + pay_short_term_gold = { + target = scope:extorted_vassal + gold = scope:vassal_medium_gold_halved + } + } + scope:greedy_tax_collector = { + pay_short_term_gold = { + target = root + gold = scope:vassal_medium_gold_halved + } + } + + scope:extorted_vassal = { + add_opinion = { + target = root + modifier = fp3_frustrated_opinion + opinion = -10 + } + } + + stress_impact = { + generous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + vengeful = minor_stress_impact_gain + greedy = minor_stress_impact_gain + + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_vengefulness = -0.5 + ai_compassion = 0.5 + ai_rationality = 0.8 + } + } + } +} + +############fp3_clan.8013 - The Burden of Tax Farming, by Ola Jentzsch######### +scripted_trigger tax_collector_8013_trigger = { + tax_collector_aptitude = { + target = clan_tax_slot + value >= 2 + } + is_available_ai_adult = yes + has_any_bad_relationship_with_root_trigger = no +} + +fp3_clan.8013 = { + type = character_event + title = fp3_clan.8013.t + desc = fp3_clan.8013.desc + theme = learning_scholarship_focus + + left_portrait = { + character = root + animation = personality_forgiving + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + has_trait = vengeful + has_trait = wrathful + } + } + animation = personality_cynical + } + } + right_portrait = { + character = scope:stressed_tax_collector + animation = boredom + triggered_animation = { + trigger = { + ai_energy >= low_positive_ai_value + } + animation = stress + } + } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed = yes + is_available = yes + is_healthy = yes + age > 10 + + any_tax_collector = { + tax_collector_8013_trigger = yes + } + } + + cooldown = { years = 10 } + + immediate = { + random_tax_collector = { + limit = { + tax_collector_8013_trigger = yes + } + save_scope_as = stressed_tax_collector + } + + scope:stressed_tax_collector = { + add_stress = major_stress_gain + } + } + + option = { # Assuage tax collector's stress + name = fp3_clan.8013.a + + duel = { + skill = stewardship + target = scope:stressed_tax_collector + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + max = 40 + min = -40 + } + + modifier = { + add = 10 + scope:stressed_tax_collector = { + OR = { + has_trait = diligent + has_trait = ambitious + has_trait = patient + has_trait = trusting + } + } + } + + modifier = { + add = -10 + scope:stressed_tax_collector = { + OR = { + has_trait = lazy + has_trait = paranoid + has_trait = arrogant + } + } + } + + modifier = { + add = -10 + scope:stressed_tax_collector = { + opinion = { + target = root + value <= 25 + } + } + } + + desc = fp3_clan.8013.a.success + send_interface_toast = { + title = fp3_clan.8013.a.success.tt + left_icon = root + + if = { + limit = { + NOT = { has_relation_friend = scope:stressed_tax_collector } + } + progress_towards_friend_effect = { + CHARACTER = scope:stressed_tax_collector + REASON = friend_reassurance + OPINION = 25 + } + } + + scope:stressed_tax_collector = { + add_learning_skill = 1 + add_stewardship_skill = 1 + add_stress = medium_stress_impact_loss + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + max = 40 + min = -40 + } + + desc = fp3_clan.8013.a.failure + send_interface_toast = { + title = fp3_clan.8013.a.failure.tt + left_icon = root + + scope:stressed_tax_collector = { + add_character_modifier = { + modifier = fp3_cutting_corners_modifier + years = 10 + } + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_loss + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_energy = 0.3 + ai_sociability = 0.7 + ai_compassion = 0.8 + } + } + } + + option = { # Threaten tax collector with violence + name = fp3_clan.8013.b + + trigger = { + scope:stressed_tax_collector = { + NOT = { has_trait = brave } # Brave tax collectors won't be intimidated + } + } + + scope:stressed_tax_collector = { + add_stress = major_stress_gain + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + add_learning_skill = 1 + add_stewardship_skill = 1 + } + + stress_impact = { + wrathful = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + calm = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 0.4 + ai_sociability = -0.6 + ai_compassion = -0.7 + } + } + } + + option = { #Just move on + name = fp3_clan.8013.c + + stress_impact = { + compassionate = medium_stress_impact_gain + diligent = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = -0.5 + ai_sociability = -1 + ai_vengefulness = 0.3 + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_tax_collector_flavor_events.txt b/N3OW/events/dlc/fp3/fp3_tax_collector_flavor_events.txt new file mode 100644 index 00000000..92e8990d --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_tax_collector_flavor_events.txt @@ -0,0 +1,1060 @@ +namespace = fp3_clan + +# FP3: Additional Tax Collector Flavor Events +# by Chad Uhl + +##################################################################### +# Worth more than Gold? # +# Tax Collector learns of a secret held by one of their taxees # +# by Chad Uhl # +##################################################################### +fp3_clan.1000 = { + type = character_event + title = fp3_clan.1000.t + desc = fp3_clan.1000.desc + theme = realm + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:target_tax_collector + animation = personality_dishonorable + } + lower_center_portrait = scope:secret_holder + + trigger = { + has_fp3_dlc_trigger = yes + is_valid_for_narrow_yearly_events = yes + # Do any of their taxed vassals have a secret that you don't know about? + any_tax_collector = { + save_temporary_scope_as = temp_tax_collector + tax_slot = { + any_tax_slot_vassal = { + # Don't let the tax collector tell on themself + this != scope:temp_tax_collector + # Ensure they have a secret that ROOT doesn't already know + any_secret = { + NOT = { is_known_by = root } + } + } + } + } + } + + immediate = { + random_tax_collector = { + limit = { + save_temporary_scope_as = temp_tax_collector + tax_slot = { + any_tax_slot_vassal = { + # Don't let the tax collector tell on themself + this != scope:temp_tax_collector + # Ensure they have a secret that ROOT doesn't already know + any_secret = { + NOT = { is_known_by = root } + } + } + } + } + weight = { + base = 1 + modifier = { # Base tax collector weighting + add = preferred_tax_collector_modifier + } + modifier = { # Diligent or Ambitious tax collectors are more likely + add = 10 + OR = { + has_trait = diligent + has_trait = ambitious + } + } + modifier = { # Being patient is also useful + add = 5 + has_trait = patient + } + modifier = { # And so is being stubborn + add = 5 + has_trait = stubborn + } + modifier = { # And so is being deceitful + add = 5 + has_trait = deceitful + } + } + save_scope_as = target_tax_collector + tax_slot = { + random_tax_slot_vassal = { + limit = { + any_secret = { + NOT = { is_known_by = root } + } + this != scope:target_tax_collector + } + save_scope_as = secret_holder + random_secret = { + limit = { + NOT = { is_known_by = root } + } + save_scope_as = target_secret + reveal_to = root + hidden_effect = { reveal_to = scope:target_tax_collector } + } + } + } + } + } + + option = { # Some coin for your troubles + name = fp3_clan.1000.a + trigger = { + short_term_gold > minor_gold_value + } + show_as_unavailable = { + short_term_gold < minor_gold_value + } + pay_short_term_gold = { + target = scope:target_tax_collector + gold = minor_gold_value + } + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = grateful_opinion + opinion = 30 + } + + ai_chance = { + base = 30 + } + + stress_impact = { + #paranoid = medium_stress_impact_loss + } + } + + option = { # take this artifact + name = fp3_clan.1000.b + trigger = { + any_character_artifact = { } + } + show_as_unavailable = { + any_character_artifact = { + count < 1 + } + } + + random_character_artifact = { + save_scope_as = target_artifact + set_owner = scope:target_tax_collector + add_artifact_history = { + type = given + actor = root + recipient = scope:target_tax_collector + } + } + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = grateful_opinion + opinion = 40 + } + + ai_chance = { + base = 30 + } + + stress_impact = { + #paranoid = medium_stress_impact_loss + } + } + + option = { # Wow thanks for this tasty info + name = fp3_clan.1000.c + reverse_add_opinion = { + target = scope:target_tax_collector + # labelled spouse, but is generic and can work in this situation + modifier = spouse_praised_me_opinion + } + + ai_chance = { + base = 30 + } + + stress_impact = { + paranoid = medium_stress_impact_loss + } + } +} + +##################################################################### +# GetHerHis Cup Runneth Over # +# Tax Collector is embezzling money # +# by Chad Uhl # +##################################################################### +fp3_clan.1010 = { + type = character_event + title = fp3_clan.1010.t + desc = fp3_clan.1010.desc + theme = realm + + left_portrait = { + character = scope:steward + animation = thinking + } + right_portrait = { + character = scope:target_tax_collector + animation = shame + } + + trigger = { + has_fp3_dlc_trigger = yes + is_valid_for_narrow_yearly_events = yes + # Check that tax collector is not trustworthy + exists = cp:councillor_steward + any_tax_collector = { + NOT = { this = root.cp:councillor_steward } + root = { + NOT = { has_imprisonment_reason = prev } + } + } + } + + cooldown = { years = 10 } + + immediate = { + cp:councillor_steward = { save_scope_as = steward } + random_tax_collector = { + limit = { + this != scope:steward + } + weight = { + base = 1 + modifier = { # Base tax collector weighting + add = preferred_tax_collector_modifier + } + modifier = { # Deceitful or Ambitious tax collectors are more likely + add = 10 + OR = { + has_trait = deceitful + has_trait = ambitious + } + } + modifier = { # And so is being stubborn + add = 5 + has_trait = stubborn + } + } + save_scope_as = target_tax_collector + } + # Give valid imprisonment reason + add_opinion = { + target = scope:target_tax_collector + modifier = embezzled_opinion + } + # Determine how much money they embezzled + set_variable = { + name = embezzled_gold + value = { + value = 10 + multiply = root.primary_title.tier + # Mult the number of vassals they have in that tax slot + multiply = { + value = 1 + scope:target_tax_collector.tax_slot = { + every_tax_slot_vassal = { + add = 1 + } + } + divide = 2 + min = 1 + } + } + } + } + + option = { # Demand your money back + name = fp3_clan.1010.a + # Skill challenge + duel = { + skills = { stewardship diplomacy } + target = scope:target_tax_collector + # Success: you get your money back + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp3_clan.1010.a.success + send_interface_toast = { + title = fp3_clan.1010.a.success + left_icon = root + right_icon = scope:target_tax_collector + # Apply success effects + # you get the gold; wahoo + add_treasury_or_gold = root.var:embezzled_gold + } + } + # Failure: lower opinion from tax collector + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp3_clan.1010.a.failure + send_interface_toast = { + title = fp3_clan.1010.a.failure + left_icon = root + right_icon = scope:target_tax_collector + # Apply failure effects + # Lower opinion to affect tax collector aptitude + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = was_scolded_opinion + } + } + } + } + + ai_chance = { + base = 33 + modifier = { + has_trait = greedy + add = 50 + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + } + + option = { # Opportunity plus instinct equals profit + name = fp3_clan.1010.b + flavor = fp3_clan.1010.b.flavor + # Opinion gain to make the tax collector better at their job + reverse_add_opinion = { + modifier = grateful_opinion + opinion = 35 + target = scope:target_tax_collector + } + add_character_modifier = { + modifier = fp3_cunning_tax_collectors + years = 30 + } + + ai_chance = { + base = 33 + modifier = { + has_trait = generous + add = 50 + } + } + } + + option = { # Don't let it happen again + name = fp3_clan.1010.c + # Lower opinion to affect tax collector aptitude + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = whipped_me_opinion + } + add_dread = medium_dread_gain + + ai_chance = { + base = 33 + modifier = { + OR = { + has_trait = sadistic + has_trait = wrathful + has_trait = vengeful + } + add = 50 + } + modifier = { + OR = { + has_trait = calm + has_trait = content + has_trait = generous + has_trait = forgiving + has_trait = compassionate + } + factor = 0 + } + modifier = { + dread >= 50 + add = -30 + } + } + + stress_impact = { + calm = minor_stress_impact_gain + content = minor_stress_impact_gain + generous = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + sadistic = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + } + } + + after = { + # Variable cleanup + remove_variable = embezzled_gold + } +} + +##################################################################### +# Practical Learning # +# Your tax collector improves skill on the job # +# by Chad Uhl # +##################################################################### +fp3_clan.1020 = { + type = character_event + title = fp3_clan.1020.t + desc = { + desc = fp3_clan.1020.desc + first_valid = { + triggered_desc = { + trigger = { var:skill_to_increase = flag:stewardship } + desc = fp3_clan.1020.stewardship + } + triggered_desc = { + trigger = { var:skill_to_increase = flag:intrigue } + desc = fp3_clan.1020.intrigue + } + triggered_desc = { + trigger = { var:skill_to_increase = flag:diplomacy } + desc = fp3_clan.1020.diplomacy + } + } + desc = fp3_clan.1020.outro + } + theme = realm + + left_portrait = { + character = scope:steward + animation = personality_content + } + right_portrait = { + character = scope:target_tax_collector + animation = happiness + } + + cooldown = { years = 5 } + + trigger = { + has_fp3_dlc_trigger = yes + is_valid_for_narrow_yearly_events = yes + exists = cp:councillor_steward + employs_tax_collector = yes + any_tax_collector = { + NOT = { this = root.cp:councillor_steward } + } + } + + immediate = { + cp:councillor_steward = { save_scope_as = steward } + random_tax_collector = { + limit = { this != scope:steward } + weight = { + base = 1 + modifier = { # Base tax collector weighting + add = preferred_tax_collector_modifier + } + modifier = { + add = 10 + has_trait = diligent + } + modifier = { + add = 10 + has_trait = ambitious + } + modifier = { + add = 5 + has_trait = stubborn + } + } + save_scope_as = target_tax_collector + } + random_list = { + 1 = { + set_variable = { + name = skill_to_increase + value = flag:stewardship + } + } + 1 = { + set_variable = { + name = skill_to_increase + value = flag:intrigue + } + } + 1 = { + set_variable = { + name = skill_to_increase + value = flag:diplomacy + } + } + } + } + + option = { # Well done! + name = fp3_clan.1020.a + reverse_add_opinion = { + modifier = spouse_praised_me_opinion + target = scope:target_tax_collector + } + scope:target_tax_collector = { increase_tax_collector_skill = yes } + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = compassionate + has_trait = generous + has_trait = gregarious + has_trait = humble + has_trait = just + } + add = 50 + } + modifier = { + OR = { + has_trait = arrogant + has_trait = callous + } + factor = 0 + } + } + + stress_impact = { + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + generous = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + } + + option = { # Teach the others your skills + name = fp3_clan.1020.b + trigger = { + any_tax_collector = { + count >= 2 + } + } + scope:target_tax_collector = { increase_tax_collector_skill = yes } + every_tax_collector = { + custom = fp3_clan.1020.every_tax_collector + limit = { + this != scope:target_tax_collector + } + random = { + chance = 30 + increase_tax_collector_skill = yes + root = { + add_to_variable_list = { + name = improved_tax_collectors + target = prev + } + } + } + } + hidden_effect = { + if = { # If any tax collectors were improved, send a toast + limit = { + any_in_list = { + variable = improved_tax_collectors + count >= 1 + } + } + every_in_list = { + variable = improved_tax_collectors + root = { + if = { + limit = { + NOT = { has_variable = num_improved_tax_collectors } + } + set_variable = { + name = num_improved_tax_collectors + value = 0 + } + } + change_variable = { + name = num_improved_tax_collectors + add = 1 + } + } + } + send_interface_toast = { + title = fp3_clan.1020.b.improved_tax_collectors + left_icon = scope:target_tax_collector + custom_tooltip = fp3_clan.1020.b.improved_tax_collectors.desc + } + } + else = { + send_interface_toast = { + title = fp3_clan.1020.b.none_improved + left_icon = scope:target_tax_collector + custom_tooltip = fp3_clan.1020.b.none_improved.desc + } + } + } + + ai_chance = { + base = 40 + } + } + + option = { # Deny recognition + name = fp3_clan.1020.c + scope:target_tax_collector = { increase_tax_collector_skill = yes } + reverse_add_opinion = { + modifier = neglected_opinion + target = scope:target_tax_collector + opinion = -10 + } + add_prestige = medium_prestige_gain + + ai_chance = { + base = 30 + modifier = { + OR = { + has_trait = callous + has_trait = arrogant + } + add = 50 + } + modifier = { + OR = { + has_trait = compassionate + has_trait = generous + has_trait = gregarious + has_trait = humble + has_trait = just + } + factor = 0 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + } + + after = { + remove_variable = skill_to_increase + remove_variable = improved_tax_collectors + if = { + limit = { exists = var:num_improved_tax_collectors } + remove_variable = num_improved_tax_collectors + } + } +} + +##################################################################### +# Tax Dispute # +# Tax collector in conflict with vassal, you can choose sides # +# by Chad Uhl # +##################################################################### +scripted_trigger is_valid_vassal_1030_trigger = { + is_available_ai_adult = yes + # we wanna dunk on them, not their diarch + has_active_diarchy = no +} + +fp3_clan.1030 = { + type = character_event + title = fp3_clan.1030.t + desc = fp3_clan.1030.desc + theme = realm + + left_portrait = { + character = scope:target_taxed_vassal + animation = anger + } + right_portrait = { + character = scope:target_tax_collector + animation = disapproval + } + + trigger = { + has_fp3_dlc_trigger = yes + is_valid_for_narrow_yearly_events = yes + # ensure we have a proper vassal to pull in + any_tax_collector = { + save_temporary_scope_as = temp_tax_collector + tax_slot = { + any_tax_slot_vassal = { + is_valid_vassal_1030_trigger = yes + faith = { + this != scope:temp_tax_collector.faith + faith_hostility_level = { + target = scope:temp_tax_collector.faith + value > faith_fully_accepted_level + } + } + } + } + } + } + + immediate = { + random_tax_collector = { + limit = { + save_temporary_scope_as = temp_tax_collector + tax_slot = { + any_tax_slot_vassal = { + is_valid_vassal_1030_trigger = yes + faith = { + this != scope:temp_tax_collector.faith + faith_hostility_level = { + target = scope:temp_tax_collector.faith + value > faith_fully_accepted_level + } + } + } + } + } + save_scope_as = target_tax_collector + tax_slot = { + random_tax_slot_vassal = { + limit = { + is_valid_vassal_1030_trigger = yes + faith = { + this != scope:target_tax_collector.faith + faith_hostility_level = { + target = scope:target_tax_collector.faith + value > faith_fully_accepted_level + } + } + } + weight = { # Grab the tax slot vassal with the worst stewardship + base = 1 + modifier = { + add = { + value = stewardship + multiply = -1 + } + } + } + save_scope_as = target_taxed_vassal + } + } + } + } + + option = { # Side with the vassal + name = fp3_clan.1030.a + fire_tax_collector = scope:target_tax_collector + reverse_add_opinion = { + target = scope:target_taxed_vassal + modifier = feast_sided_with_me_in_my_fight_opinion + } + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = feast_sided_against_me_in_my_fight_opinion + } + if = { # add a favor hook if we can + limit = { + can_add_hook = { + target = scope:target_taxed_vassal + type = favor_hook + } + } + add_hook = { + target = scope:target_taxed_vassal + type = favor_hook + years = 3 + } + } + add_character_modifier = { + modifier = fp3_sided_with_different_faith_vassal_tax_dispute + years = 10 + } + scope:target_taxed_vassal.faith = { + change_fervor = { + # Since this event is fired repeatedly, the miniscule value is halved + value = { + value = miniscule_fervor_gain + divide = 2 + } + desc = tax_collector_fired_on_religious_grounds + } + } + + ai_chance = { + base = 50 + modifier = { + root.faith = scope:target_taxed_vassal.faith + add = 50 + } + } + + stress_impact = { + base = minor_stress_impact_gain + } + } + + option = { # Side with the tax collector + name = fp3_clan.1030.b + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = feast_sided_with_me_in_my_fight_opinion + } + reverse_add_opinion = { + target = scope:target_taxed_vassal + modifier = feast_sided_against_me_in_my_fight_opinion + } + if = { # add a favor hook if we can + limit = { + can_add_hook = { + target = scope:target_tax_collector + type = favor_hook + } + } + add_hook = { + target = scope:target_tax_collector + type = favor_hook + years = 3 + } + } + add_character_modifier = { + modifier = fp3_sided_with_tax_collector_tax_dispute + years = 10 + } + + ai_chance = { + base = 50 + } + } + + option = { # Resolve it yourselves + name = fp3_clan.1030.c + reverse_add_opinion = { + target = scope:target_taxed_vassal + modifier = neglected_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = neglected_opinion + opinion = -10 + } + + ai_chance = { + base = 10 + modifier = { + has_trait = lazy + add = 100 + } + } + + stress_impact = { + base = minor_stress_impact_loss + lazy = medium_stress_impact_loss + } + } +} + +##################################################################### +# Mismanaged Land # +# Tax collector makes you aware of someone mismanaging their lands # +# by Chad Uhl # +##################################################################### +fp3_clan.1040 = { + type = character_event + title = fp3_clan.1040.t + desc = fp3_clan.1040.desc + theme = realm + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:target_tax_collector + animation = happiness + } + lower_center_portrait = scope:target_taxed_vassal + + trigger = { + has_fp3_dlc_trigger = yes + is_valid_for_narrow_yearly_events = yes + # ensure we have a proper vassal to pull in + any_tax_collector = { + tax_slot = { + any_tax_slot_vassal = { + is_valid_vassal_1030_trigger = yes + } + } + } + } + + cooldown = { years = 10 } + + immediate = { + random_tax_collector = { + limit = { + tax_slot = { + any_tax_slot_vassal = { + is_valid_vassal_1030_trigger = yes + } + } + } + save_scope_as = target_tax_collector + tax_slot = { + random_tax_slot_vassal = { + limit = { is_valid_vassal_1030_trigger = yes } + weight = { # Grab the tax slot vassal with the worst stewardship + base = 1 + modifier = { + add = { + value = stewardship + multiply = -1 + } + } + } + save_scope_as = target_taxed_vassal + } + } + } + } + + option = { # Educate everyone on your next round + name = fp3_clan.1040.a + add_character_modifier = { + modifier = fp3_tax_collector_become_teacher + years = 10 + } + + ai_chance = { + base = 60 + } + } + + option = { # I'll go help them myself + name = fp3_clan.1040.b + # Skill challenge + duel = { + skill = stewardship + value = { + value = 0 + if = { # easier if you have the stewardship lifestyle selected + limit = { has_lifestyle = stewardship_lifestyle } + add = medium_skill_rating + } + else = { + add = high_skill_rating + } + } + # Success: they improve their skill and you get some money/xp + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = fp3_clan.1040.b.success + send_interface_toast = { + title = fp3_clan.1040.b.success + left_icon = scope:target_tax_collector + right_icon = scope:target_taxed_vassal + # Apply success effects + add_treasury_or_gold = medium_treasury_or_gold_value + scope:target_taxed_vassal = { add_stewardship_skill = 1 } + if = { + limit = { + has_lifestyle = stewardship_lifestyle + } + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = respect_opinion + opinion = 15 + } + } + } + # Failure: lower opinion from tax collector + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = fp3_clan.1040.b.failure + send_interface_toast = { + title = fp3_clan.1040.b.failure + left_icon = scope:target_tax_collector + right_icon = scope:target_taxed_vassal + # Apply failure effects + if = { + limit = { + has_lifestyle = stewardship_lifestyle + } + add_stewardship_lifestyle_xp = minor_lifestyle_xp + } + reverse_add_opinion = { + target = scope:target_tax_collector + modifier = disappointed_opinion + opinion = -15 + } + } + } + } + ai_chance = { + base = 0 + } + } + + option = { # Perhaps a physical reminder of my authority is needed + name = fp3_clan.1040.c + reverse_add_opinion = { + modifier = whipped_me_opinion + target = scope:target_taxed_vassal + } + add_dread = medium_dread_gain + + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = sadistic + has_trait = wrathful + has_trait = vengeful + } + add = 50 + } + modifier = { + OR = { + has_trait = calm + has_trait = content + has_trait = generous + has_trait = forgiving + has_trait = compassionate + } + factor = 0 + } + modifier = { + dread >= 50 + add = -30 + } + } + + stress_impact = { + calm = minor_stress_impact_gain + content = minor_stress_impact_gain + generous = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + sadistic = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_yearly_events_eren.txt b/N3OW/events/dlc/fp3/fp3_yearly_events_eren.txt new file mode 100644 index 00000000..592aec0a --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_yearly_events_eren.txt @@ -0,0 +1,3131 @@ +namespace = fp3_yearly + +# Daylight Censors (The Drunkenness of Ali Nushtgin) +# Go out drunk/high in broad daylight and risk being caught by your liege's censors? +fp3_yearly.2000 = { + type = character_event + title = fp3_yearly.2000.t + desc = { + triggered_desc = { + trigger = { exists = scope:out_late_drinking } + desc = fp3_yearly.2000.desc_drinking + } + triggered_desc = { + trigger = { exists = scope:out_late_hash } + desc = fp3_yearly.2000.desc_hashish + } + desc = fp3_yearly.2000.desc_warning + } + theme = crown + override_background = { + reference = alley_day + } + left_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:cautious_vassal + animation = worry + } + cooldown = { years = 10 } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed_or_landless_administrative = yes + OR = { + has_trait = drunkard + has_trait = hashishiyah + } + liege ?= { + # You have at least one fellow vassal who would partake in alcohol/hashish with you (at least in moderation) + any_vassal = { + is_ai = yes + NOR = { + this = root + has_trait = zealous + } + } + # Faith must condemn drunkard/hashishiyah + faith = { + religion = religion:islam_religion + NOR = { + trait_is_virtue = drunkard + trait_is_virtue = hashishiyah + } + } + # Liege should not be a hypocrite + NOR = { + has_trait = drunkard + has_trait = hashishiyah + } + # Liege hasn't had the follow-up event in the last 5 years + NOT = { has_character_flag = had_event_fp3_yearly_2001 } + } + } + + immediate = { + # Are we out late drinking or hashishing? + random_list = { + 1 = { + trigger = { + has_trait = drunkard + NOT = { faith = { trait_is_virtue = drunkard } } + } + save_scope_value_as = { name = out_late_drinking value = yes } + } + 1 = { + trigger = { + has_trait = hashishiyah + NOT = { faith = { trait_is_virtue = hashishiyah } } + } + save_scope_value_as = { name = out_late_hash value = yes } + } + } + liege = { + save_scope_as = prudish_liege + random_vassal = { + limit = { + NOR = { + this = root + has_trait = zealous + } + } + save_scope_as = cautious_vassal + } + } + add_stress = minor_stress_impact_loss + } + + option = { # Stay inside, be cautious + name = fp3_yearly.2000.a + add_prestige = minor_prestige_loss + stress_impact = { + arrogant = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { ai_boldness = -0.5 } + } + } + + option = { # Risk going out + name = fp3_yearly.2000.b + flavor = fp3_yearly.2000.b_flavor + if = { + limit = { scope:prudish_liege = { is_ai = yes } } + random_list = { + 50 = { # You get away with it + show_chance = no + desc = fp3_yearly.2000.b_success + send_interface_toast = { + title = fp3_yearly.2000.b_success + left_icon = root + } + } + 50 = { # You get caught and flogged + show_chance = no + desc = fp3_yearly.2000.b_failure + send_interface_toast = { + type = event_toast_effect_bad + title = fp3_yearly.2000.b_failure + left_icon = root + increase_wounds_effect = { REASON = flogged_by_censors } + } + hidden_effect = { + add_opinion = { + modifier = fp3_flogged_me + target = scope:prudish_liege + } + } + } + } + } + # If liege is player, then trigger event for them to decide what to do with this uppity vassal + else = { + show_as_tooltip = { + random_list = { + # This is a tooltip-only version of the above to communicate the possible consequences of this option + 1 = { + show_chance = no + desc = fp3_yearly.2000.b_success + } + 1 = { + show_chance = no + desc = fp3_yearly.2000.b_failure + increase_wounds_effect = { REASON = flogged_by_censors } + } + } + } + save_scope_as = intoxicated + scope:prudish_liege = { trigger_event = fp3_yearly.2001 } + } + stress_impact = { + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { ai_boldness = 0.5 } + # This option is more interesting for players, so make AI attempt it more often if the liege is a player + modifier = { + scope:prudish_liege = { is_ai = no } + add = 100 + } + } + } +} + +scripted_trigger fp3_yearly_2001_is_valid_druggie = { + is_available_ai_adult = yes + is_of_major_interest_to_root_trigger = yes + OR = { + has_trait = hashishiyah + has_trait = drunkard + } + NOT = { has_trait = craven } +} + +# Public Intoxication +# Your vassal/courtier/family is drunk in broad daylight, have them flogged or no? +fp3_yearly.2001 = { + type = character_event + title = fp3_yearly.2001.t + desc = { + desc = fp3_yearly.2001.desc_intro + triggered_desc = { + trigger = { exists = scope:out_late_drinking } + desc = fp3_yearly.2001.desc_drinking + } + triggered_desc = { + trigger = { exists = scope:out_late_hash } + desc = fp3_yearly.2001.desc_hashish + } + desc = fp3_yearly.2001.desc_outro + } + theme = crown + override_background = { + reference = alley_day + } + left_portrait = { + character = scope:intoxicated + animation = laugh + } + + trigger = { + has_fp3_dlc_trigger = yes + is_landed_or_landless_administrative = yes + # This event can be fired from either the yearly pulse or fp3_yearly.2000 + # If the former is true, then the offending druggie does not yet exist and we need to find one + OR = { + exists = scope:intoxicated + AND = { + NOT = { has_character_flag = had_event_fp3_yearly_2001 } + religion = religion:islam_religion + NOR = { + has_trait = drunkard + has_trait = hashishiyah + } + OR = { + any_vassal = { fp3_yearly_2001_is_valid_druggie = yes } + any_courtier_or_guest = { fp3_yearly_2001_is_valid_druggie = yes } + any_consort = { fp3_yearly_2001_is_valid_druggie = yes } + } + } + } + } + + immediate = { + save_scope_as = prudish_liege + if = { + limit = { NOT = { exists = scope:intoxicated } } + # 10 year cooldown if fired from yearly pulse + add_character_flag = { + flag = had_event_fp3_yearly_2001 + years = 10 + } + every_vassal = { + limit = { fp3_yearly_2001_is_valid_druggie = yes } + add_to_temporary_list = valid_druggies + } + every_courtier_or_guest = { + limit = { fp3_yearly_2001_is_valid_druggie = yes } + add_to_temporary_list = valid_druggies + } + every_consort = { + limit = { fp3_yearly_2001_is_valid_druggie = yes } + add_to_temporary_list = valid_druggies + } + random_in_list = { + list = valid_druggies + save_scope_as = intoxicated + } + random_list = { + 1 = { + trigger = { + scope:intoxicated = { + has_trait = drunkard + NOT = { faith = { trait_is_virtue = drunkard } } + } + } + save_scope_value_as = { name = out_late_drinking value = yes } + } + 1 = { + trigger = { + scope:intoxicated = { + has_trait = hashishiyah + NOT = { faith = { trait_is_virtue = hashishiyah } } + } + } + save_scope_value_as = { name = out_late_hash value = yes } + } + } + } + } + + option = { # Flog them + name = fp3_yearly.2001.a + scope:intoxicated = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp3_yearly.2000.b_failure + left_icon = root + increase_wounds_effect = { REASON = flogged_by_censors } + } + } + add_piety = minor_piety_gain + reverse_add_opinion = { + target = scope:intoxicated + modifier = fp3_flogged_me + } + if = { + limit = { has_relation_friend = scope:intoxicated } + remove_relation_friend = scope:intoxicated + } + stress_impact = { + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { ai_zeal = 0.5 } + } + } + + option = { # Ignore them + name = fp3_yearly.2001.b + add_piety = medium_piety_loss + scope:intoxicated = { + send_interface_toast = { + title = fp3_yearly.2000.b_success + left_icon = root + } + } + stress_impact = { + zealous = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { ai_energy = -0.5 } + } + } +} + +scripted_effect fp3_yearly_2010_create_baker_effect = { + create_character = { + age = { 35 50 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + faith = root.capital_province.faith + culture = scope:bakers_county.culture + # Personality Traits + trait = greedy + random_traits_list = { + count = 2 + brave = {} + craven = {} + wrathful = {} + lustful = {} + ambitious = {} + diligent = {} + stubborn = {} + vengeful = {} + deceitful = {} + arrogant = {} + arbitrary = {} + impatient = {} + gluttonous = {} + } + random_traits_list = { + count = 1 + education_diplomacy_2 = {} + education_stewardship_2 = {} + education_stewardship_3 = {} + education_stewardship_4 = {} + education_learning_1 = {} + education_learning_2 = {} + } + # Flavor Traits + trait = administrator + random_traits_list = { + count = { 0 2 } + gout_ridden = {} + leper = {} + lovers_pox = {} + pneumonic = {} + dwarf = {} + giant = {} + hunchbacked = {} + weak = {} + clubfooted = {} + lisping = {} + stuttering = {} + wheezing = {} + albino = {} + scaly = {} + spindly = {} + maimed = {} + one_eyed = {} + one_legged = {} + disfigured = {} + blind = {} + } + random_traits = yes + diplomacy = { 8 13 } + martial = { 6 10 } + stewardship = { 8 13 } + intrigue = { 8 13 } + learning = { 13 18 } + prowess = { 3 8 } + after_creation = { + random_list = { + 50 = { + # Character is of average weight, nothing happens + } + 25 = { + change_current_weight = 25 + } + 25 = { + change_current_weight = 75 + } + } + add_character_flag = peasant_outfit + } + save_scope_as = greedy_baker + } + +} + +# Maunds of Wheat (The Bakers of Ghaznain) +# Your royal baker is hoarding bread, how shall you deal with them? +fp3_yearly.2010 = { + type = court_event + title = fp3_yearly.2010.t + desc = fp3_yearly.2010.desc + theme = court + cooldown = { years = 5 } + court_scene = { + button_position_character = root + roles = { + scope:greedy_baker = { + group = event_group + } + root = { + group = event_group + animation = personality_rational + } + scope:random_courtier = { + group = event_group + animation = beg + } + } + } + + trigger = { + has_fp3_dlc_trigger = yes + has_royal_court = yes + has_court_event_flag = no + is_available = yes + government_has_flag = government_is_clan + any_sub_realm_county = { + NOR = { + has_county_modifier = fp3_generous_bakers_modifier + has_county_modifier = fp3_wheat_shortage_modifier + } + } + any_courtier = { + is_available_ai_adult = yes + has_court_event_flag = no + } + } + + immediate = { + court_event_character_flag_effect = yes + random_courtier = { + limit = { + is_available_ai_adult = yes + has_court_event_flag = no + } + save_scope_as = random_courtier + court_event_character_flag_effect = yes + } + random_sub_realm_county = { + save_scope_as = bakers_county + } + fp3_yearly_2010_create_baker_effect = yes + scope:greedy_baker = { court_event_character_flag_effect = yes } + } + + option = { # Trample to death + name = { + text = { + desc = fp3_yearly.2010.a + first_valid = { + triggered_desc = { + trigger = { culture = { has_innovation = innovation_elephantry } } + desc = fp3_yearly.2010.a_elephants + } + triggered_desc = { + trigger = { culture = { has_innovation = innovation_elephantry } } + desc = fp3_yearly.2010.a_camels + } + desc = fp3_yearly.2010.a_horses + } + } + } + flavor = fp3_yearly.2010.a.tt + stress_impact = { + greedy = minor_stress_impact_gain + just = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + scope:greedy_baker = { + death = { + death_reason = death_trampled + killer = root + } + } + add_prestige = minor_prestige_loss + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:bakers_county = { + add_county_modifier = { + modifier = fp3_generous_bakers_modifier + years = 15 + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + factor = 0 + } + } + } + + option = { # Recruit + name = fp3_yearly.2010.b + stress_impact = { + just = minor_stress_impact_gain + zealous = minor_stress_impact_gain + arbitrary = minor_stress_impact_loss + } + add_courtier = scope:greedy_baker + scope:bakers_county = { + add_county_modifier = { + modifier = fp3_wheat_shortage_modifier + years = 10 + } + } + ai_chance = { + base = 10 + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + option = { # Take the extra money + name = fp3_yearly.2010.c + add_treasury_or_gold = medium_treasury_or_gold_value + stress_impact = { + just = medium_stress_impact_gain + generous = medium_stress_impact_gain + zealous = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + scope:bakers_county = { + add_county_modifier = { + modifier = fp3_wheat_shortage_modifier + years = 10 + } + } + ai_chance = { + base = 10 + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = generous + factor = 0 + } + } + } + + after = { + clear_court_event_participation = yes + scope:greedy_baker = { clear_court_event_participation = yes } + scope:random_courtier = { clear_court_event_participation = yes } + } +} + +# Maunds of Wheat (Non-Royal Court Version) +fp3_yearly.2011 = { + type = character_event + title = fp3_yearly.2010.t + desc = fp3_yearly.2010.desc + theme = crown + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:random_courtier + animation = beg + } + lower_left_portrait = scope:greedy_baker + cooldown = { years = 10 } + + trigger = { + has_fp3_dlc_trigger = yes + government_has_flag = government_is_clan + highest_held_title_tier >= tier_kingdom + any_courtier = { + is_available_ai_adult = yes + } + any_sub_realm_county = { + NOR = { + has_county_modifier = fp3_generous_bakers_modifier + has_county_modifier = fp3_wheat_shortage_modifier + } + } + } + + immediate = { + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = random_courtier + } + random_sub_realm_county = { + save_scope_as = bakers_county + } + fp3_yearly_2010_create_baker_effect = yes + } + + option = { # Trample to death + name = { + text = { + desc = fp3_yearly.2010.a + first_valid = { + triggered_desc = { + trigger = { culture = { has_innovation = innovation_elephantry } } + desc = fp3_yearly.2010.a_elephants + } + triggered_desc = { + trigger = { culture = { has_innovation = innovation_elephantry } } + desc = fp3_yearly.2010.a_camels + } + desc = fp3_yearly.2010.a_horses + } + } + } + flavor = fp3_yearly.2010.a.tt + stress_impact = { + greedy = minor_stress_impact_gain + just = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + scope:greedy_baker = { + death = { death_reason = death_trampled } + } + add_prestige = minor_prestige_loss + remove_treasury_or_gold = minor_treasury_or_gold_value + scope:bakers_county = { + add_county_modifier = { + modifier = fp3_generous_bakers_modifier + years = 15 + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + factor = 0 + } + } + } + + option = { # Recruit + name = fp3_yearly.2010.b + add_courtier = scope:greedy_baker + scope:bakers_county = { + add_county_modifier = { + modifier = fp3_wheat_shortage_modifier + years = 10 + } + } + stress_impact = { + just = minor_stress_impact_gain + zealous = minor_stress_impact_gain + arbitrary = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + option = { # Take the extra money + name = fp3_yearly.2010.c + add_treasury_or_gold = major_treasury_or_gold_value + stress_impact = { + just = medium_stress_impact_gain + generous = medium_stress_impact_gain + zealous = minor_stress_impact_gain + greedy = minor_stress_impact_loss + } + scope:bakers_county = { + add_county_modifier = { + modifier = fp3_wheat_shortage_modifier + years = 10 + } + } + ai_chance = { + base = 10 + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = generous + factor = 0 + } + } + } +} + +# This tax collector is guilty of at least one vice condemned of public officials in the Quran +scripted_trigger fp3_yearly_2020_is_valid_tax_collector = { + is_available_ai_adult = yes + OR = { + AND = { + has_trait = greedy + faith = { + NOR = { + trait_is_virtue = greedy + trait_is_sin = generous + } + } + } + AND = { + has_trait = arbitrary + faith = { + NOR = { + trait_is_virtue = arbitrary + trait_is_sin = just + } + } + } + AND = { + has_trait = cynical + faith = { + NOR = { + trait_is_virtue = cynical + trait_is_sin = zealous + } + } + } + AND = { + has_trait = contrite + NOT = { faith = { trait_is_virtue = contrite } } + } + } +} + +# Set the Scale: Vassal Version +# The tax collector in charge of you is corrupt, shall you petition to your liege to have them removed? +fp3_yearly.2020 = { + type = character_event + title = fp3_yearly.2020.t + desc = { + desc = fp3_yearly.2020.desc_intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:tax_collector_is_greedy } + desc = fp3_yearly.2020.desc_greedy + } + triggered_desc = { + trigger = { exists = scope:tax_collector_is_arbitrary } + desc = fp3_yearly.2020.desc_arbitrary + } + triggered_desc = { + trigger = { exists = scope:tax_collector_is_cynical } + desc = fp3_yearly.2020.desc_cynical + } + triggered_desc = { + trigger = { exists = scope:tax_collector_is_contrite } + desc = fp3_yearly.2020.desc_contrite + } + } + desc = fp3_yearly.2020.desc_outro + } + theme = stewardship + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:sinful_tax_collector + animation = shock + } + lower_left_portrait = scope:liege + + trigger = { + is_landed = yes + has_religion = religion:islam_religion + piety_level > low_negative_piety_level + liege ?= { + has_religion = religion:islam_religion + employs_tax_collector = yes + any_tax_collector = { + any_tax_collector_vassal = { this = root } + fp3_yearly_2020_is_valid_tax_collector = yes + } + # Liege has not been bothered about this tax collector in the last 5 years + NOT = { has_character_flag = had_event_fp3_yearly_2021 } + } + } + + # This event is more likely to trigger if you are your liege's steward (because the effects are more interesting) + weight_multiplier = { + modifier = { + add = 0.5 + has_council_position = councillor_steward + } + } + + immediate = { + liege = { + save_scope_as = liege + add_character_flag = { + flag = had_event_fp3_yearly_2021 + years = 5 + } + random_tax_collector = { + limit = { + any_tax_collector_vassal = { this = root } + fp3_yearly_2020_is_valid_tax_collector = yes + } + save_scope_as = sinful_tax_collector + # Choose which flaw to criticize in this tax collector + random_list = { + 1 = { + trigger = { + has_trait = greedy + NOT = { faith = { trait_is_virtue = greedy } } + } + save_scope_value_as = { + name = tax_collector_is_greedy + value = yes + } + } + 1 = { + trigger = { + has_trait = arbitrary + NOT = { faith = { trait_is_virtue = arbitrary } } + } + save_scope_value_as = { + name = tax_collector_is_arbitrary + value = yes + } + } + 1 = { + trigger = { + has_trait = cynical + NOT = { faith = { trait_is_virtue = cynical } } + } + save_scope_value_as = { + name = tax_collector_is_cynical + value = yes + } + } + 1 = { + trigger = { + has_trait = contrite + NOT = { faith = { trait_is_virtue = contrite } } + } + save_scope_value_as = { + name = tax_collector_is_contrite + value = yes + } + } + } + } + } + } + + option = { # Petition to have them removed + name = fp3_yearly.2020.a + reverse_add_opinion = { + target = scope:sinful_tax_collector + modifier = fp3_denounced_me + } + if = { #If Liege is AI we can fire the tax collector here + limit = { scope:liege = { is_ai = yes } } + progress_towards_rival_effect = { + CHARACTER = scope:sinful_tax_collector + REASON = rival_tried_to_remove_tax_collector + OPINION = 0 + } + duel = { + skill = learning + value = scope:liege.learning + + 7 = { # Tax collector is removed forever + desc = fp3_yearly.2020.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 0.25 + } + send_interface_toast = { + type = event_toast_effect_good + title = fp3_yearly.2020.a_success + left_icon = root + right_icon = scope:sinful_tax_collector + add_piety = medium_piety_gain + scope:liege = { fire_tax_collector = scope:sinful_tax_collector } + scope:sinful_tax_collector = { + add_character_modifier = fp3_incapable_tax_collector_modifier + } + } + } + 3 = { # Tax collector starts problems with you + desc = fp3_yearly.2020.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.25 + } + send_interface_toast = { + type = event_toast_effect_bad + title = fp3_yearly.2020.a_failure + left_icon = root + right_icon = scope:sinful_tax_collector + if = { + limit = { has_council_position = councillor_steward } + custom_tooltip = fp3_yearly.2020.a_failure.tt + } + } + if = { + limit = { + has_council_position = councillor_steward + # Don't give the liege two stories of the same type + scope:liege = { NOT = { any_owned_story = { type = story_cycle_tax_rivalry } } } + } + # Create the tax rivalry story, if applicable + scope:liege = { + set_variable = { + name = story_steward + value = root + days = 1 + } + set_variable = { + name = story_tax_collector + value = scope:sinful_tax_collector + days = 1 + } + create_tax_rivalry_story_effect = yes + } + } + } + } + } + else = { #If Liege is not AI this is resolved in an event for liege + show_as_tooltip = { + # The actual progress effect will happen in fp3_yearly.2021 + # This is so that the liege's tooltip accurately reflects on the depth of rivalry + progress_towards_rival_effect = { + CHARACTER = scope:sinful_tax_collector + REASON = rival_tried_to_remove_tax_collector + OPINION = 0 + } + random_list = { + 1 = { + show_chance = no + desc = fp3_yearly.2020.a_success + fire_tax_collector = scope:sinful_tax_collector + scope:sinful_tax_collector = { + add_character_modifier = fp3_incapable_tax_collector_modifier + } + } + 1 = { + show_chance = no + desc = fp3_yearly.2020.a_failure + custom_tooltip = fp3_yearly.2020.a_failure.tt + } + } + } + save_scope_as = denouncing_taxpayer + scope:liege = { trigger_event = fp3_yearly.2021 } + } + stress_impact = { + shy = minor_stress_impact_gain + generous = minor_stress_impact_gain + craven = minor_stress_impact_gain + just = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_zeal = 0.25 + ai_greed = 0.5 + } + } + } + + option = { # Publicly expose them (causes their learning to tank, meaning they have less aptitude and you will owe fewer taxes to your liege) + name = fp3_yearly.2020.b + reverse_add_opinion = { + target = scope:sinful_tax_collector + modifier = fp3_denounced_me + } + progress_towards_rival_effect = { + CHARACTER = scope:sinful_tax_collector + REASON = rival_tried_to_remove_tax_collector + OPINION = 0 + } + # Tank the collector's aptitude and inform the liege + save_scope_as = denouncing_taxpayer + add_piety = minor_piety_gain + liege = { + send_interface_message = { + type = event_tax_collector_bad_with_text + title = fp3_yearly.2020.b.t + desc = fp3_yearly.2020.b.desc + scope:sinful_tax_collector = { + add_character_modifier = { + modifier = fp3_impious_tax_collector_modifier + years = 30 + } + } + left_icon = scope:sinful_tax_collector + right_icon = scope:denouncing_taxpayer + } + } + stress_impact = { + shy = medium_stress_impact_gain + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + + option = { # Pray for their soul (opt-out) + name = fp3_yearly.2020.c + add_piety = minor_piety_gain + stress_impact = { + greedy = medium_stress_impact_gain + just = minor_stress_impact_gain + zealous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + lazy = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + has_trait = greedy + factor = 0 + } + modifier = { + has_trait = zealous + factor = 0 + } + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = arrogant + factor = 0 + } + } + } +} + +# Set the Scale: Liege Version +# One of your tax collectors is corrupt and your vassal is demanding you fire them +fp3_yearly.2021 = { + type = character_event + title = fp3_yearly.2020.t + desc = { + desc = fp3_yearly.2021.desc_intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:tax_collector_is_greedy } + desc = fp3_yearly.2021.desc_greedy + } + triggered_desc = { + trigger = { exists = scope:tax_collector_is_arbitrary } + desc = fp3_yearly.2021.desc_arbitrary + } + triggered_desc = { + trigger = { exists = scope:tax_collector_is_cynical } + desc = fp3_yearly.2021.desc_cynical + } + triggered_desc = { + trigger = { exists = scope:tax_collector_is_contrite } + desc = fp3_yearly.2021.desc_contrite + } + } + desc = fp3_yearly.2021.desc_outro + } + theme = stewardship + + + left_portrait = { + character = scope:denouncing_taxpayer + animation = anger + } + right_portrait = { + character = scope:sinful_tax_collector + animation = shame + } + + cooldown = { years = 5 } + + trigger = { + has_religion = religion:islam_religion + employs_tax_collector = yes + any_tax_collector = { + any_tax_collector_vassal = { + has_religion = religion:islam_religion + piety_level > low_negative_piety_level + is_available_adult = yes + trigger_if = { + limit = { NOT = { exists = scope:denouncing_taxpayer } } # If this event isn't a redirect from fp3_yearly.2020, then the featured taxpayer must be an ai + is_ai = yes + NOT = { has_trait = shy } # B/c shy vassals are unlikely to take the denounce option in fp3_yearly.2020.a + } + } + fp3_yearly_2020_is_valid_tax_collector = yes + } + } + + immediate = { + if = { + limit = { NOT = { exists = scope:sinful_tax_collector } } + random_tax_collector = { + limit = { + any_tax_collector_vassal = { + has_religion = religion:islam_religion + piety_level > low_negative_piety_level + is_available_adult = yes + trigger_if = { + limit = { NOT = { exists = scope:denouncing_taxpayer } } # If this event isn't a redirect from fp3_yearly.2020, then the featured taxpayer must be an ai + is_ai = yes + NOT = { has_trait = shy } # B/c shy vassals are unlikely to take the denounce option in fp3_yearly.2020.a + } + } + fp3_yearly_2020_is_valid_tax_collector = yes + } + save_scope_as = sinful_tax_collector + # Choose which flaw to criticize in this tax collector + random_list = { + 1 = { + trigger = { + has_trait = greedy + NOT = { faith = { trait_is_virtue = greedy } } + } + save_scope_value_as = { + name = tax_collector_is_greedy + value = yes + } + } + 1 = { + trigger = { + has_trait = arbitrary + NOT = { faith = { trait_is_virtue = arbitrary } } + } + save_scope_value_as = { + name = tax_collector_is_arbitrary + value = yes + } + } + 1 = { + trigger = { + has_trait = cynical + NOT = { faith = { trait_is_virtue = cynical } } + } + save_scope_value_as = { + name = tax_collector_is_cynical + value = yes + } + } + 1 = { + trigger = { + has_trait = contrite + NOT = { faith = { trait_is_virtue = contrite } } + } + save_scope_value_as = { + name = tax_collector_is_contrite + value = yes + } + } + } + if = { + limit = { NOT = { exists = scope:denouncing_taxpayer } } + random_tax_collector_vassal = { + limit = { + is_available_ai_adult = yes + has_religion = religion:islam_religion + piety_level > low_negative_piety_level + NOT = { has_trait = shy } + } + # More likely to choose a zealous denouncer + weight = { + base = 1 + ai_value_modifier = { + ai_zeal = 0.1 + } + } + save_scope_as = denouncing_taxpayer + } + } + } + } + scope:denouncing_taxpayer = { + assign_quirk_effect = yes + } + scope:denouncing_taxpayer = { + progress_towards_rival_effect = { + CHARACTER = scope:sinful_tax_collector + REASON = rival_tried_to_remove_tax_collector + OPINION = 0 + } + } + } + + option = { # Fire the tax collector + name = fp3_yearly.2021.a + add_piety = minor_piety_gain + fire_tax_collector = scope:sinful_tax_collector + scope:sinful_tax_collector = { + add_character_modifier = fp3_incapable_tax_collector_modifier + } + scope:denouncing_taxpayer = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + # If this is a follow-up from fp3_yearly.2020, then send that player a toast + if = { + limit = { is_ai = no } + send_interface_toast = { + type = event_toast_effect_good + title = fp3_yearly.2020.a_success + left_icon = root + right_icon = scope:sinful_tax_collector + } + } + } + if = { + limit = { #Complainer is a house member - collector is not + exists = scope:denouncing_taxpayer.house + scope:denouncing_taxpayer.house = house + trigger_if = { + limit = { + exists = scope:sinful_tax_collector.house + } + scope:sinful_tax_collector.house != house + } + } + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:denouncing_taxpayer + VALUE = minor_unity_gain + DESC = clan_unity_tax_collector_fired_on_request.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + else_if = { + limit = { #Complainer is not a clan member but the tax collector is + exists = scope:sinful_tax_collector.house + scope:sinful_tax_collector.house = house + trigger_if = { + limit = { + exists = scope:denouncing_taxpayer.house + } + scope:denouncing_taxpayer.house != house + } + } + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:sinful_tax_collector + VALUE = minor_unity_loss + DESC = clan_unity_tax_collector_fired.desc + REVERSE_NON_HOUSE_TARGET = no + } + } #If neither is of your house, or if both are we don't adjust unity. + + stress_impact = { + greedy = medium_stress_impact_gain + callous = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + just = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + factor = 0 + } + modifier = { + has_trait = arrogant + factor = 0 + } + modifier = { + has_trait = callous + factor = 0 + } + } + } + + option = { # Ignore + name = fp3_yearly.2021.b + add_piety = medium_piety_loss + scope:denouncing_taxpayer = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + if = { + limit = { is_ai = no } + send_interface_toast = { + type = event_toast_effect_bad + title = fp3_yearly.2020.a_failure + left_icon = root + right_icon = scope:sinful_tax_collector + custom_tooltip = fp3_yearly.2020.a_failure.tt + } + } + } + # Create the tax rivalry story if the denouncer is your steward + if = { + limit = { + scope:denouncing_taxpayer = { has_council_position = councillor_steward } + # Don't give yourself two stories of the same type + NOT = { any_owned_story = { type = story_cycle_tax_rivalry } } + } + set_variable = { + name = story_steward + value = scope:denouncing_taxpayer + days = 30 + } + set_variable = { + name = story_tax_collector + value = scope:sinful_tax_collector + days = 30 + } + create_tax_rivalry_story_effect = yes + } + if = { + limit = { #Complainer is a house member - collector is not + exists = scope:denouncing_taxpayer.house + scope:denouncing_taxpayer.house = house + trigger_if = { + limit = { + exists = scope:sinful_tax_collector.house + } + scope:sinful_tax_collector.house != house + } + } + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:denouncing_taxpayer + VALUE = minor_unity_loss + DESC = clan_unity_ignore_tax_collector_complaint.desc + REVERSE_NON_HOUSE_TARGET = no + } + } + else_if = { + limit = { #Complainer is not a clan member but the tax collector is + exists = scope:sinful_tax_collector.house + scope:sinful_tax_collector.house = house + trigger_if = { + limit = { + exists = scope:denouncing_taxpayer.house + } + scope:denouncing_taxpayer.house != house + } + } + add_clan_unity_interaction_effect = { + CHARACTER = root + TARGET = scope:sinful_tax_collector + VALUE = minor_unity_gain + DESC = clan_unity_protected_tax_collector_against_complaint.desc + REVERSE_NON_HOUSE_TARGET = no + } + } #If neither is of your house, or if both are we don't adjust unity. + + stress_impact = { + just = medium_stress_impact_gain + zealous = minor_stress_impact_gain + arrogant = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } +} + +# A Beautiful Rule (The Ugliness of Sultan Mahmud) +# You are ugly, but your courtier suggests your beautiful actions are more important to your rule +#Triggers shortly after succession +fp3_yearly.2030 = { + type = character_event + title = fp3_yearly.2030.t + desc = { + desc = fp3_yearly.2030.desc_intro + # Look in the mirror at your "ugly" feature + first_valid = { + triggered_desc = { + trigger = { has_character_flag = fp3_yearly_2030_beauty_bad } + desc = fp3_yearly.2030.desc_beauty_bad + } + triggered_desc = { + trigger = { has_character_flag = fp3_yearly_2030_spindly } + desc = fp3_yearly.2030.desc_spindly + } + triggered_desc = { + trigger = { has_character_flag = fp3_yearly_2030_disfigured } + desc = fp3_yearly.2030.desc_disfigured + } + triggered_desc = { + trigger = { has_character_flag = fp3_yearly_2030_scaly } + desc = fp3_yearly.2030.desc_scaly + } + triggered_desc = { + trigger = { has_character_flag = fp3_yearly_2030_albino } + desc = fp3_yearly.2030.desc_albino + } + triggered_desc = { + trigger = { has_character_flag = fp3_yearly_2030_hunchbacked } + desc = fp3_yearly.2030.desc_hunchbacked + } + triggered_desc = { + trigger = { has_character_flag = fp3_yearly_2030_inbred } + desc = fp3_yearly.2030.desc_inbred + } + } + desc = fp3_yearly.2030.desc_outro + } + theme = crown + override_background = { + reference = sitting_room + } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:reassuring_courtier + animation = personality_compassionate + } + + cooldown = { years = 100 } + + trigger = { + has_fp3_dlc_trigger = yes + is_available_adult = yes + is_landed = yes + OR = { + has_trait = beauty_bad + has_trait = spindly + has_trait = disfigured + has_trait = scaly + has_trait = albino + has_trait = hunchbacked + has_trait = inbred + } + NOR = { + has_trait = callous + has_trait = sadistic + has_trait = beauty_good + } + faith = { + trait_is_virtue = generous + } + } + + immediate = { + # Figure out which ugliness we will pick at + random_list = { + 1 = { + trigger = { has_trait = beauty_bad } + add_character_flag = { + flag = fp3_yearly_2030_beauty_bad + days = 1 + } + } + 1 = { + trigger = { has_trait = spindly } + add_character_flag = { + flag = fp3_yearly_2030_spindly + days = 1 + } + } + 1 = { + trigger = { has_trait = disfigured } + add_character_flag = { + flag = fp3_yearly_2030_disfigured + days = 1 + } + } + 1 = { + trigger = { has_trait = scaly } + add_character_flag = { + flag = fp3_yearly_2030_scaly + days = 1 + } + } + 1 = { + trigger = { has_trait = albino } + add_character_flag = { + flag = fp3_yearly_2030_albino + days = 1 + } + } + 1 = { + trigger = { has_trait = hunchbacked } + add_character_flag = { + flag = fp3_yearly_2030_hunchbacked + days = 1 + } + } + 1 = { + trigger = { has_trait = inbred } + add_character_flag = { + flag = fp3_yearly_2030_inbred + days = 1 + } + } + } + # Figure out which courtier should reassure us + # If we have a lady in waiting, then use her + if = { + limit = { + employs_court_position = lady_in_waiting_court_position + is_available_ai_adult = yes + has_contagious_deadly_disease_trigger = no + } + random_court_position_holder = { + type = lady_in_waiting_court_position + save_scope_as = reassuring_courtier + } + } + # Otherwise, pick court jester + else_if = { + limit = { + employs_court_position = court_jester_court_position + is_available_ai_adult = yes + has_contagious_deadly_disease_trigger = no + } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = reassuring_courtier + } + } + # Otherwise, pick some (weighted) rando + else = { + random_courtier = { + limit = { + is_available_ai_adult = yes + has_contagious_deadly_disease_trigger = no + } + weight = { + base = 100 + opinion_modifier = { + opinion_target = root + } + modifier = { + has_trait = zealous + add = 50 + } + modifier = { + has_trait = cynical + add = -50 + } + modifier = { + has_trait = generous + add = 50 + } + modifier = { + has_trait = greedy + add = -50 + } + } + save_scope_as = reassuring_courtier + } + } + } + + + option = { # Act generously (even if it is instrumental and not in your nature) + name = fp3_yearly.2030.a + trigger = { + NOT = { has_trait = generous } + } + remove_short_term_gold = medium_gold_value + add_character_modifier = { + modifier = generous_beauty + years = 10 + } + stress_impact = { + greedy = major_stress_impact_gain + arrogant = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + callous = minor_stress_impact_gain + temperate = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { # Actions will speak louder than words + name = fp3_yearly.2030.d + add_prestige = minor_prestige_value + stress_impact = { + base = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + impatient = minor_stress_impact_gain + temperate = minor_stress_impact_loss + trusting = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { # Bask in your generosity + name = fp3_yearly.2030.b + trigger = { + has_trait = generous + } + trait = generous + add_prestige = medium_prestige_gain + give_nickname = nick_the_beautiful_generous + remove_short_term_gold = medium_gold_value + add_character_modifier = { + modifier = generous_beauty + years = 10 + } + stress_impact = { + generous = major_stress_impact_loss + arrogant = minor_stress_impact_loss + temperate = minor_stress_impact_loss + deceitful = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Gain dread + name = fp3_yearly.2030.c + add_dread = medium_dread_gain + scope:reassuring_courtier = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + imprison_character_effect = { #We kill the messenger, so to speak + TARGET = scope:reassuring_courtier + IMPRISONER = root + } + add_character_modifier = { + modifier = dreaded_beauty + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = minor_stress_impact_gain + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + humble = minor_stress_impact_gain + generous = minor_stress_impact_gain + deceitful = minor_stress_impact_loss + callous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + has_trait = compassionate + factor = 0 + } + modifier = { + has_trait = content + factor = 0 + } + modifier = { + has_trait = just + factor = 0 + } + modifier = { + has_trait = humble + factor = 0 + } + } + } +} + +# Checks whether any of the character's provinces recognize the caliph as their HOF +scripted_trigger fp3_yearly_2040_attackers_provinces_respect_caliph = { + any_held_title = { + title_tier = county + faith.religious_head = root + } +} + +# All counties that respect the caliph as their HOF get a massive levy size penalty +# NB: Scope:caliph needs to be set before this effect is called +scripted_effect fp3_yearly_2040_religious_desertion_effect = { + every_held_county = { + limit = { faith.religious_head = scope:caliph } + add_county_modifier = { + modifier = fp3_religious_desertion_modifier + years = 5 + } + } +} + +# Commander of the Faithful (The Army of Ya'qub ibn Laith) +# As the Caliph, if someone is warring you and has counties that obey you as their HOF, then you have the option of pleading with their army to stand down +fp3_yearly.2040 = { + type = character_event + title = fp3_yearly.2040.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + any_character_war = { + primary_attacker = { faith.religion = religion:islam_religion } + } + } + desc = fp3_yearly.2040.desc_attacker_is_muslim + } + desc = fp3_yearly.2040.desc_attacker_is_not_muslim + } + } + theme = martial + override_background = { + reference = terrain_scope + } + left_portrait = { + character = scope:infidel + animation = war_attacker + } + cooldown = { years = 5 } + + trigger = { + has_fp3_dlc_trigger = yes + # Below triggers are similar to is_available_adult but without is_in_army + is_adult = yes + is_alive = yes + exists = location + is_imprisoned = no + has_contagious_deadly_disease_trigger = no + NOT = { has_trait = incapable } + NOT = { has_variable = gone_adventuring } + NOT = { has_character_flag = planning_an_activity } + faith.religion = religion:islam_religion + is_at_war_as_defender = yes + any_character_war = { + primary_defender = root + primary_attacker = { + exists = location + fp3_yearly_2040_attackers_provinces_respect_caliph = yes + } + } + } + + immediate = { + save_scope_as = caliph + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { save_scope_as = imam } + } + random_character_war = { + limit = { + primary_defender = root + primary_attacker = { + exists = location + fp3_yearly_2040_attackers_provinces_respect_caliph = yes + } + } + primary_attacker = { + save_scope_as = infidel + location = { save_scope_as = background_terrain_scope } # For event_bg + } + } + } + + option = { # Make a plea + name = fp3_yearly.2040.a + flavor = fp3_yearly.2040.a.flavor + duel = { + skill = learning + target = scope:infidel + + 70 = { # Shouldn't be too difficult to succeed + desc = fp3_yearly.2040.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -55 + max = 35 + } + # More pious caliphs should be able to succeed more easily + modifier = { + add = { + value = piety_level + subtract = 1 + } + } + modifier = { + add = { + value = num_virtuous_traits + } + } + scope:infidel = { + # If the attacker is a player, notify them of the penalty they just suffered + if = { + limit = { is_ai = no } + trigger_event = fp3_yearly.2041 + show_as_tooltip = { fp3_yearly_2040_religious_desertion_effect = yes } # tt only, the actual effect happens in fp3_yearly.2041 + } + else = { + fp3_yearly_2040_religious_desertion_effect = yes + } + } + send_interface_toast = { + type = event_toast_effect_good + title = fp3_yearly.2040.a_success + left_icon = scope:infidel + reverse_add_opinion = { + target = scope:infidel + modifier = fp3_sabotaged_me + } + } + } + 30 = { + desc = fp3_yearly.2040.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -35 + max = 55 + } + modifier = { + add = { + value = piety_level + subtract = 1 + multiply = -1 + } + } + modifier = { + add = { + value = num_sinful_traits + } + } + send_interface_toast = { + type = event_toast_effect_bad + title = fp3_yearly.2040.a_failure + left_icon = root + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = piteously_cut_down } + } + } + } + stress_impact = { + craven = major_stress_impact_gain + shy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 0.5 + } + # Add only negative % chance due to shyness + modifier = { + add = { + value = ai_sociability + multiply = -1 + max = 0 + } + } + # Is the caliph's or imam's learning higher? + compare_modifier = { + target = scope:imam + value = learning + multiplier = -5 + } + } + } + + option = { # Have your imam make a plea. Ignores your own learning/piety + name = fp3_yearly.2040.b + flavor = fp3_yearly.2040.b.flavor + trigger = { exists = scope:imam } + scope:imam = { + duel = { + skill = learning + target = scope:infidel + + 60 = { # Harder for your imam to succeed + desc = fp3_yearly.2040.b_success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -55 + max = 35 + } + scope:infidel = { + # If the attacker is a player, notify them of this huge penalty + if = { + limit = { is_ai = no } + trigger_event = fp3_yearly.2041 + show_as_tooltip = { fp3_yearly_2040_religious_desertion_effect = yes } # tt only, the actual effect happens in fp3_yearly.2041 + } + else = { + fp3_yearly_2040_religious_desertion_effect = yes + } + } + scope:caliph = { + send_interface_toast = { + type = event_toast_effect_good + title = fp3_yearly.2040.b_success + left_icon = scope:infidel + reverse_add_opinion = { + target = scope:infidel + modifier = fp3_sabotaged_me + } + } + } + } + 40 = { # Is killed + desc = fp3_yearly.2040.b_failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -35 + max = 55 + } + scope:caliph = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp3_yearly.2040.b_failure + left_icon = scope:imam + scope:imam = { death = { death_reason = death_piteously_cut_down } } + } + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_vengefulness = 0.5 + } + # Is the caliph's or imam's learning higher? + compare_modifier = { + target = scope:imam + value = learning + multiplier = 5 + } + } + } + + option = { # Do nothing + name = fp3_yearly.2040.c + stress_impact = { + brave = major_stress_impact_gain + vengeful = minor_stress_impact_gain + wrathful = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 0 # Should be low, we want the AI to take the other two options + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_energy = -1 + } + } + } +} + +# Commander of the Faithful: Attacker Version +# The Caliph has asked your armies to stand down and they complied! +fp3_yearly.2041 = { + type = character_event + title = fp3_yearly.2040.t + desc = { + first_valid = { + triggered_desc = { + # You do not respect the caliph + trigger = { + OR = { + has_trait = cynical + faith.religious_head != scope:caliph + } + } + desc = fp3_yearly.2041.desc_cynical + } + desc = fp3_yearly.2041.desc_fallback + } + } + theme = martial + override_background = { + reference = terrain_scope + } + left_portrait = { + character = scope:caliph + animation = war_defender + } + + immediate = { + fp3_yearly_2040_religious_desertion_effect = yes + scope:caliph.location = { save_scope_as = background_terrain_scope } + } + + option = { # Curse them! + name = fp3_yearly.2041.a + } +} + +# Futuwaa Lodges: Check if root has any valid members of futuwaa lodges. If so, trigger ongoing_futuwaa_lodges_events +fp3_yearly.2050 = { + hidden = yes + + immediate = { + every_courtier = { + limit = { fp3_is_valid_futuwaa_member = { SPONSOR = root } } + add_to_list = futuwaa_members + } + house ?= { + every_house_member = { + limit = { + fp3_is_valid_futuwaa_member = { SPONSOR = root } + NOT = { is_courtier_of = root } + } + add_to_list = futuwaa_members + } + } + if = { + limit = { any_in_list = { list = futuwaa_members } } + trigger_event = { on_action = ongoing_futuwaa_lodges_events } + } + } +} + +# Futuwaa Lodges: Prowess skill increased +fp3_yearly.2051 = { + hidden = yes + + # This event is more likely to trigger if you have more futuwaa members + weight_multiplier = { + base = 1 + modifier = { + add = { + value = list_size:futuwaa_members + subtract = 1 + } + } + } + + immediate = { + random_in_list = { + list = futuwaa_members + weight = { + base = 1 + # Unskilled members are more likely to have their stats improved + modifier = { + add = { + value = prowess + multiply = -0.1 + } + } + # Virtuous members are more likely to benefit + modifier = { + add = { + value = num_virtuous_traits + subtract = num_sinful_traits + } + } + # Martial members are more likely to... you get the idea + modifier = { + OR = { + has_focus = education_martial + has_education_martial_trigger = yes + } + add = 2 + } + # AI energy (Diligent, lazy, etc.) + modifier = { + ai_energy <= high_negative_ai_value + add = -2 + } + modifier = { + ai_energy >= high_positive_ai_value + add = 2 + } + } + save_scope_as = improved_youth + } + send_interface_message = { + type = event_martial_good + title = fp3_yearly.2050.t + left_icon = scope:improved_youth + scope:improved_youth = { add_prowess_skill = 2 } + } + } +} + +# Futuwaa Lodges: Martial skill increased (martial focus only) +fp3_yearly.2052 = { + hidden = yes + + trigger = { + any_in_list = { + list = futuwaa_members + OR = { + has_focus = education_martial + has_education_martial_trigger = yes + } + } + } + + # This event is more likely to trigger if you have more futuwaa members + weight_multiplier = { + base = 1 + modifier = { + add = { + value = list_size:futuwaa_members + subtract = 1 + } + } + } + + immediate = { + random_in_list = { + list = futuwaa_members + weight = { + base = 1 + # Unskilled members are more likely to have their stats improved + modifier = { + add = { + value = martial + multiply = -0.1 + } + } + # Virtuous members are more likely to benefit + modifier = { + add = { + value = num_virtuous_traits + subtract = num_sinful_traits + } + } + # AI energy (Diligent, lazy, etc.) + modifier = { + ai_energy <= high_negative_ai_value + add = -2 + } + modifier = { + ai_energy >= high_positive_ai_value + add = 2 + } + } + save_scope_as = improved_youth + } + send_interface_message = { + type = event_martial_good + title = fp3_yearly.2050.t + left_icon = scope:improved_youth + scope:improved_youth = { add_martial_skill = 2 } + } + } +} + +# Futuwaa Lodges: Virtuous trait added +fp3_yearly.2053 = { + hidden = yes + + trigger = { + any_in_list = { + list = futuwaa_members + number_of_personality_traits < childhood_personality_trait_gain_limit + } + } + + # This event is more likely to trigger if you have more futuwaa members + weight_multiplier = { + base = 1 + modifier = { + add = { + value = list_size:futuwaa_members + subtract = 1 + } + } + } + + immediate = { + random_in_list = { + list = futuwaa_members + weight = { + base = 1 + # More zealous members are more likely to benefit (and vice versa) + modifier = { + add = { + value = ai_zeal + divide = 100 + } + } + } + save_scope_as = improved_youth + } + # Choose a random virtue to give the youth + # I know... there is no better way to do this + random_list = { + # Brave + 1 = { + trigger = { + faith = { trait_is_virtue = brave } + scope:improved_youth = { + NOR = { + has_trait = brave + has_trait = craven + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:brave + } + } + # Craven + 1 = { + trigger = { + faith = { trait_is_virtue = craven } + scope:improved_youth = { + NOR = { + has_trait = brave + has_trait = craven + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:craven + } + } + # Calm + 1 = { + trigger = { + faith = { trait_is_virtue = calm } + scope:improved_youth = { + NOR = { + has_trait = calm + has_trait = wrathful + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:calm + } + } + # Wrathful + 1 = { + trigger = { + faith = { trait_is_virtue = wrathful } + scope:improved_youth = { + NOR = { + has_trait = calm + has_trait = wrathful + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:wrathful + } + } + # Chaste + 1 = { + trigger = { + faith = { trait_is_virtue = chaste } + scope:improved_youth = { + NOR = { + has_trait = chaste + has_trait = lustful + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:chaste + } + } + # Lustful + 1 = { + trigger = { + faith = { trait_is_virtue = lustful } + scope:improved_youth = { + NOR = { + has_trait = chaste + has_trait = lustful + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:lustful + } + } + # Content + 1 = { + trigger = { + faith = { trait_is_virtue = content } + scope:improved_youth = { + NOR = { + has_trait = content + has_trait = ambitious + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:content + } + } + # Ambitious + 1 = { + trigger = { + faith = { trait_is_virtue = ambitious } + scope:improved_youth = { + NOR = { + has_trait = content + has_trait = ambitious + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:ambitious + } + } + # Diligent + 1 = { + trigger = { + faith = { trait_is_virtue = diligent } + scope:improved_youth = { + NOR = { + has_trait = diligent + has_trait = lazy + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:diligent + } + } + # Lazy + 1 = { + trigger = { + faith = { trait_is_virtue = lazy } + scope:improved_youth = { + NOR = { + has_trait = diligent + has_trait = lazy + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:lazy + } + } + # Fickle + 1 = { + trigger = { + faith = { trait_is_virtue = fickle } + scope:improved_youth = { + NOR = { + has_trait = fickle + has_trait = stubborn + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:fickle + } + } + # Stubborn + 1 = { + trigger = { + faith = { trait_is_virtue = stubborn } + scope:improved_youth = { + NOR = { + has_trait = fickle + has_trait = stubborn + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:stubborn + } + } + # Forgiving + 1 = { + trigger = { + faith = { trait_is_virtue = forgiving } + scope:improved_youth = { + NOR = { + has_trait = forgiving + has_trait = vengeful + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:forgiving + } + } + # Vengeful + 1 = { + trigger = { + faith = { trait_is_virtue = vengeful } + scope:improved_youth = { + NOR = { + has_trait = forgiving + has_trait = vengeful + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:vengeful + } + } + # Generous + 1 = { + trigger = { + faith = { trait_is_virtue = generous } + scope:improved_youth = { + NOR = { + has_trait = generous + has_trait = greedy + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:generous + } + } + # Greedy + 1 = { + trigger = { + faith = { trait_is_virtue = greedy } + scope:improved_youth = { + NOR = { + has_trait = generous + has_trait = greedy + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:greedy + } + } + # Gregarious + 1 = { + trigger = { + faith = { trait_is_virtue = gregarious } + scope:improved_youth = { + NOR = { + has_trait = gregarious + has_trait = shy + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:gregarious + } + } + # Shy + 1 = { + trigger = { + faith = { trait_is_virtue = shy } + scope:improved_youth = { + NOR = { + has_trait = gregarious + has_trait = shy + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:shy + } + } + # Honest + 1 = { + trigger = { + faith = { trait_is_virtue = honest } + scope:improved_youth = { + NOR = { + has_trait = honest + has_trait = deceitful + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:honest + } + } + # Deceitful + 1 = { + trigger = { + faith = { trait_is_virtue = deceitful } + scope:improved_youth = { + NOR = { + has_trait = honest + has_trait = deceitful + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:deceitful + } + } + # Humble + 1 = { + trigger = { + faith = { trait_is_virtue = humble } + scope:improved_youth = { + NOR = { + has_trait = humble + has_trait = arrogant + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:humble + } + } + # Arrogant + 1 = { + trigger = { + faith = { trait_is_virtue = arrogant } + scope:improved_youth = { + NOR = { + has_trait = humble + has_trait = arrogant + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:arrogant + } + } + # Just + 1 = { + trigger = { + faith = { trait_is_virtue = just } + scope:improved_youth = { + NOR = { + has_trait = just + has_trait = arbitrary + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:just + } + } + # Arbitrary + 1 = { + trigger = { + faith = { trait_is_virtue = arbitrary } + scope:improved_youth = { + NOR = { + has_trait = just + has_trait = arbitrary + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:arbitrary + } + } + # Patient + 1 = { + trigger = { + faith = { trait_is_virtue = patient } + scope:improved_youth = { + NOR = { + has_trait = patient + has_trait = impatient + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:patient + } + } + # Impatient + 1 = { + trigger = { + faith = { trait_is_virtue = impatient } + scope:improved_youth = { + NOR = { + has_trait = patient + has_trait = impatient + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:impatient + } + } + # Temperate + 1 = { + trigger = { + faith = { trait_is_virtue = temperate } + scope:improved_youth = { + NOR = { + has_trait = temperate + has_trait = gluttonous + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:temperate + } + } + # Gluttonous + 1 = { + trigger = { + faith = { trait_is_virtue = gluttonous } + scope:improved_youth = { + NOR = { + has_trait = temperate + has_trait = gluttonous + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:gluttonous + } + } + # Trusting + 1 = { + trigger = { + faith = { trait_is_virtue = trusting } + scope:improved_youth = { + NOR = { + has_trait = trusting + has_trait = paranoid + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:trusting + } + } + # Paranoid + 1 = { + trigger = { + faith = { trait_is_virtue = paranoid } + scope:improved_youth = { + NOR = { + has_trait = trusting + has_trait = paranoid + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:paranoid + } + } + # Zealous + 1 = { + trigger = { + faith = { trait_is_virtue = zealous } + scope:improved_youth = { + NOR = { + has_trait = zealous + has_trait = cynical + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:zealous + } + } + # Cynical + 1 = { + trigger = { + faith = { trait_is_virtue = cynical } + scope:improved_youth = { + NOR = { + has_trait = zealous + has_trait = cynical + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:cynical + } + } + # Compassionate + 1 = { + trigger = { + faith = { trait_is_virtue = compassionate } + scope:improved_youth = { + NOR = { + has_trait = compassionate + has_trait = callous + has_trait = sadistic + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:compassionate + } + } + # Callous + 1 = { + trigger = { + faith = { trait_is_virtue = callous } + scope:improved_youth = { + NOR = { + has_trait = compassionate + has_trait = callous + has_trait = sadistic + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:callous + } + } + # Sadistic + 1 = { + trigger = { + faith = { trait_is_virtue = sadistic } + scope:improved_youth = { + NOR = { + has_trait = compassionate + has_trait = callous + has_trait = sadistic + } + } + } + save_scope_value_as = { + name = virtuous_trait + value = flag:sadistic + } + } + } + send_interface_message = { + type = event_martial_good + title = fp3_yearly.2050.t + left_icon = scope:improved_youth + scope:improved_youth = { + if = { + limit = { scope:virtuous_trait = flag:brave } + add_trait = brave + } + if = { + limit = { scope:virtuous_trait = flag:craven } + add_trait = craven + } + if = { + limit = { scope:virtuous_trait = flag:calm } + add_trait = calm + } + if = { + limit = { scope:virtuous_trait = flag:wrathful } + add_trait = wrathful + } + if = { + limit = { scope:virtuous_trait = flag:chaste } + add_trait = chaste + } + if = { + limit = { scope:virtuous_trait = flag:lustful } + add_trait = lustful + } + if = { + limit = { scope:virtuous_trait = flag:content } + add_trait = content + } + if = { + limit = { scope:virtuous_trait = flag:ambitious } + add_trait = ambitious + } + if = { + limit = { scope:virtuous_trait = flag:diligent } + add_trait = diligent + } + if = { + limit = { scope:virtuous_trait = flag:lazy } + add_trait = lazy + } + if = { + limit = { scope:virtuous_trait = flag:fickle } + add_trait = fickle + } + if = { + limit = { scope:virtuous_trait = flag:stubborn } + add_trait = stubborn + } + if = { + limit = { scope:virtuous_trait = flag:forgiving } + add_trait = forgiving + } + if = { + limit = { scope:virtuous_trait = flag:vengeful } + add_trait = vengeful + } + if = { + limit = { scope:virtuous_trait = flag:generous } + add_trait = generous + } + if = { + limit = { scope:virtuous_trait = flag:greedy } + add_trait = greedy + } + if = { + limit = { scope:virtuous_trait = flag:gregarious } + add_trait = gregarious + } + if = { + limit = { scope:virtuous_trait = flag:shy } + add_trait = shy + } + if = { + limit = { scope:virtuous_trait = flag:honest } + add_trait = honest + } + if = { + limit = { scope:virtuous_trait = flag:deceitful } + add_trait = deceitful + } + if = { + limit = { scope:virtuous_trait = flag:humble } + add_trait = humble + } + if = { + limit = { scope:virtuous_trait = flag:arrogant } + add_trait = arrogant + } + if = { + limit = { scope:virtuous_trait = flag:just } + add_trait = just + } + if = { + limit = { scope:virtuous_trait = flag:arbitrary } + add_trait = arbitrary + } + if = { + limit = { scope:virtuous_trait = flag:patient } + add_trait = patient + } + if = { + limit = { scope:virtuous_trait = flag:impatient } + add_trait = impatient + } + if = { + limit = { scope:virtuous_trait = flag:temperate } + add_trait = temperate + } + if = { + limit = { scope:virtuous_trait = flag:gluttonous } + add_trait = gluttonous + } + if = { + limit = { scope:virtuous_trait = flag:trusting } + add_trait = trusting + } + if = { + limit = { scope:virtuous_trait = flag:paranoid } + add_trait = paranoid + } + if = { + limit = { scope:virtuous_trait = flag:zealous } + add_trait = zealous + } + if = { + limit = { scope:virtuous_trait = flag:cynical } + add_trait = cynical + } + if = { + limit = { scope:virtuous_trait = flag:compassionate } + add_trait = compassionate + } + if = { + limit = { scope:virtuous_trait = flag:callous } + add_trait = callous + } + if = { + limit = { scope:virtuous_trait = flag:sadistic } + add_trait = sadistic + } + } + } + } +} + +# Madrasas: Check if root has any valid members of madrasas. If so, trigger ongoing_madrasas_events +fp3_yearly.2060 = { + hidden = yes + + immediate = { + every_courtier = { + limit = { fp3_is_valid_madrasa_pupil = { SPONSOR = root } } + add_to_list = madrasa_pupils + } + house ?= { + every_house_member = { + limit = { + fp3_is_valid_madrasa_pupil = { SPONSOR = root } + NOT = { is_courtier_of = root } + } + add_to_list = madrasa_pupils + } + } + + if = { + limit = { any_in_list = { list = madrasa_pupils } } + trigger_event = { on_action = ongoing_madrasas_events } + } + } +} + +# Madrasas: Learning skill increased +fp3_yearly.2061 = { + hidden = yes + + # This event is more likely to trigger if you have more madrasa pupils + weight_multiplier = { + base = 1 + modifier = { + add = { + value = list_size:madrasa_pupils + subtract = 1 + } + } + } + + immediate = { + random_in_list = { + list = madrasa_pupils + weight = { + base = 1 + # Skilled members are more likely to have their stats improved + modifier = { + add = { + value = learning + multiply = 0.1 + } + } + # Learning education members are more likely to gain more learning + modifier = { + has_focus = education_learning + add = 2 + } + # AI energy (Diligent, lazy, etc.) + modifier = { + ai_energy <= high_negative_ai_value + add = -2 + } + modifier = { + ai_energy >= high_positive_ai_value + add = 2 + } + } + save_scope_as = improved_youth + } + send_interface_message = { + type = event_learning_good + title = { + first_valid = { + # Call them madrasas if our capital is advanced enough + triggered_desc = { + trigger = { + capital_county ?= { + development_level >= bad_development_level + } + } + desc = fp3_yearly.2060.t_madrasas + } + # Otherwise just say that the youth are being educated in houses of worship + desc = fp3_yearly.2060.t_houses_of_worship + } + } + left_icon = scope:improved_youth + scope:improved_youth = { add_learning_skill = 2 } + } + } +} + +# Madrasas: Physician experience gain +fp3_yearly.2062 = { + hidden = yes + + # This event is more likely to trigger if you have more futuwaa members + weight_multiplier = { + base = 1 + modifier = { + add = { + value = list_size:madrasa_pupils + subtract = 1 + } + } + } + + immediate = { + random_in_list = { + list = madrasa_pupils + weight = { + base = 1 + # Members w/high learning are more likely to gain physician experience + modifier = { + add = { + value = learning + multiply = 0.1 + } + } + # AI energy (Diligent, lazy, etc.) + modifier = { + ai_energy <= high_negative_ai_value + add = -2 + } + modifier = { + ai_energy >= high_positive_ai_value + add = 2 + } + } + save_scope_as = improved_youth + } + send_interface_message = { + type = event_learning_good + # "Madrasas" vs "Schooling in Mosques" + title = { + first_valid = { + # Call them madrasas if our capital is advanced enough + triggered_desc = { + trigger = { + capital_county ?= { + development_level >= bad_development_level + } + } + desc = fp3_yearly.2060.t_madrasas + } + # Otherwise just say that the youth are being educated in houses of worship + desc = fp3_yearly.2060.t_houses_of_worship + } + } + left_icon = scope:improved_youth + scope:improved_youth = { + if = { + limit = { has_trait = lifestyle_physician } + add_trait_xp = { + trait = lifestyle_physician + value = { + integer_range = { + min = 5 + max = 10 + } + } + } + } + else = { add_trait = lifestyle_physician } + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_yearly_events_hugo.txt b/N3OW/events/dlc/fp3/fp3_yearly_events_hugo.txt new file mode 100644 index 00000000..6ae8aa81 --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_yearly_events_hugo.txt @@ -0,0 +1,286 @@ +namespace = fp3_h_yearly + +################################### +# You have pissed off your ulema and you're a drunkard +# By Hugo Cortell +# Rewritten by Henrik Lohmander +################################### +fp3_h_yearly.0001 = { + type = character_event + title = fp3_h_yearly.0001.t + desc = { + triggered_desc = { + trigger = { always = yes } + desc = fp3_h_yearly.0001.desc.main + } + } + theme = feast_activity + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = drink_goblet + } + right_portrait = { + character = scope:ulema_member + animation = disapproval + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + + modifier = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { has_trait = drunkard } + factor = 0.4 + } + modifier = { + any_character_struggle = { + is_struggle_type = persian_struggle + } + add = 0.5 + } + modifier = { + has_trait = fp3_struggle_supporter + add = -0.5 + } + modifier = { + has_trait = fp3_struggle_detractor + add = 0.5 + } + } + + trigger = { + has_fp3_dlc_trigger = yes + has_trait = drunkard + NOT = { has_character_modifier = ulema_displeased_drinking } + exists = cp:councillor_court_chaplain + NOT = { + has_hook = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + is_ai = yes + faith = { trait_is_sin = drunkard } + trigger_if = { + limit = { exists = house } + house != root.house + } + NOT = { + has_trait = lifestyle_mystic + } + OR = { + opinion = { # They will not do this unless they have reason to dislike you + target = root + value < -25 + } + has_relation_rival = root + } + } + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = ulema_member } + save_scope_as = actor + scope:ulema_member = { save_scope_as = recipient } + } + + option = { #Deflection (They are a drunkard too) Look who is talking! + name = fp3_h_yearly.0001.a + trigger = { scope:ulema_member = { has_trait = drunkard } } + + #No duel, this deflection always succeeds. + + stress_impact = { + craven = minor_stress_gain + deceitful = minor_stress_loss + callous = minor_stress_loss + } + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:ulema_member + modifier = ignored_concerns + } + } + + option = { #Deflection - Argue that drinking is healthy to the human spirit + name = fp3_h_yearly.0001.b + trigger = { + OR = { + has_trait = scholar + has_trait = theologian + has_trait = whole_of_body + has_trait = lifestyle_physician + has_trait = lifestyle_poet + faith = { trait_is_virtue = drunkard } + } + } + + + reverse_add_opinion = { + target = scope:ulema_member + modifier = ignored_concerns + } + + duel = { + desc = fp3_h_yearly.0001.b.desc + skill = learning + target = scope:annoying_clergy + + 35 = { #Success + desc = fp3_h_yearly.0001.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_good + title = fp3_h_yearly.0001.b.success + left_icon = root + add_prestige = minor_prestige_gain + } + } + 65 = { + desc = fp3_h_yearly.0001.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = fp3_h_yearly.0001.b.failure + left_icon = root + add_piety = medium_piety_loss + add_character_modifier = { + modifier = ulema_displeased_drinking + years = 10 + } + } + } + } + + stress_impact = { + honest = minor_stress_gain + humble = minor_stress_gain + callous = minor_stress_loss + deceitful = minor_stress_loss + } + } + + option = { # You do not get to speak to me in this way! + name = fp3_h_yearly.0001.e + + add_dread = medium_dread_gain + imprison_court_chaplain_consequences_effect = yes + imprison_character_effect = { + TARGET = scope:recipient + IMPRISONER = scope:actor + } + + stress_impact = { + just = medium_stress_gain + zealous = medium_stress_gain + deceitful = minor_stress_loss + callous = minor_stress_loss + } + } + + option = { #Bribery - Offer a generous donation + name = fp3_h_yearly.0001.c + trigger = { NOT = { scope:ulema_member = { has_trait = drunkard } } } #If you can deflect we don't show this option + custom_tooltip = fp3_h_yearly.0001.c.tt + pay_short_term_gold = { + target = scope:ulema_member + gold = medium_gold_value + } + random_list = { + 75 = { + modifier = { + scope:ulema_member = { + has_trait = greedy + } + factor = 2 + } + modifier = { + scope:ulema_member = { + has_trait = deceitful + } + factor = 2 + } + modifier = { + scope:ulema_member = { + has_trait = ambitious + } + factor = 2 + } + desc = fp3_h_yearly.0001.c.success + send_interface_toast = { + title = fp3_h_yearly.0001.c.success + left_icon = root + add_prestige = minor_prestige_gain + } + } + 25 = { + modifier = { + scope:ulema_member = { + has_trait = zealous + } + factor = 2 + } + modifier = { + scope:ulema_member = { + has_trait = honest + } + factor = 2 + } + modifier = { + scope:ulema_member = { + has_trait = just + } + factor = 2 + } + desc = fp3_h_yearly.0001.c.failure + send_interface_toast = { + title = fp3_h_yearly.0001.c.failure + left_icon = root + add_piety = medium_piety_loss + add_character_modifier = { + modifier = ulema_displeased_drinking + years = 10 + } + reverse_add_opinion = { + target = scope:ulema_member + modifier = ignored_concerns + } + } + } + } + + + stress_impact = { + just = medium_stress_gain + greedy = minor_stress_gain + honest = minor_stress_gain + callous = minor_stress_loss + deceitful = minor_stress_loss + } + } + + option = { # There is nothing I can do! + name = fp3_h_yearly.0001.d + + add_piety = minor_piety_loss + add_character_modifier = { + modifier = ulema_displeased_drinking + years = 5 + } + stress_impact = { + arrogant = minor_stress_gain + deceitful = minor_stress_gain + drunkard = minor_stress_gain + honest = minor_stress_loss + } + } + +} diff --git a/N3OW/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt b/N3OW/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt new file mode 100644 index 00000000..68643afb --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_yearly_events_ola_batch_1.txt @@ -0,0 +1,4027 @@ +namespace = fp3_yearly + +########EVENT INDEX############ +#fp3_yearly.8000 - Ghazi Gone Bad, by Ola Jentzsch +#fp3_yearly.8001 - Frontier Fortress Benefactor, by Ola Jentzsch +#fp3_yearly.8002 - Faith at the Frontier, by Ola Jentzsch +#fp3_yearly.8003 - Exotic Espand, by Ola Jentzsch +#fp3_yearly.8004 - The Frontier Beckons, by Ola Jentzsch + #fp3_yearly.8005 - Hidden Event, sets up duel + #fp3_yearly.8006 - Hidden Event, in case duel is invalidated + #fp3_yearly.8007 - Persian Parenting (follow-up-event) + #fp3_yearly.8008 - An Ignominous Defeat (follow-up-event) +#fp3_yearly.8009 - Caliphal Concerns, by Ola Jentzsch +#fp3_yearly.8010 - The Abode of War, by Ola Jentzsch + #fp3_yearly.8011 - Hidden Event, sets up stuff + #fp3_yearly.8012 - Promise Fulfilled (follow-up-event) + #fp3_yearly.8013 - Caliphal Dissapointment (follow-up-event) +#fp3_yearly.8014 - Secrets of the Teapot, by Ola Jentzsch +#fp3_yearly.8016 - Forgotten Runestones, by Ola Jentzsch + #fp3_yearly.8017 - Hyrcanian Havoc, by Ola Jentzsch +#fp3_yearly.8018 - Heavenly Horses, by Ola Jentzsch + + +################################## +# Ghazi Gone Bad +# By Ola Jentzsch +################################### +scripted_trigger fp3_yearly.8000_province_trigger = { #this is needed to get the loc right - we want a city! + has_holding_type = city_holding + barony = { + is_capital_barony = no + } +} + +fp3_yearly.8000 = { #Ghazi Gone Bad + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { has_religion = religion:islam_religion } + desc = fp3_yearly.8000.t + } + desc = fp3_yearly_non_islamic.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { has_religion = religion:islam_religion } + desc = fp3_yearly.8000.desc_opening + } + desc = fp3_yearly.8000.desc_unislamic_opening + } + random_valid = { + desc = fp3_yearly.8000_dancing_girl.desc + desc = fp3_yearly.8000_bath_inspector.desc + desc = fp3_yearly.8000_townsfolk.desc + } + desc = fp3_yearly.8000.desc + } + + theme = skull + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:raging_ghazi + animation = prisondungeon + } + lower_left_portrait = { + character = scope:righteous_marshal + } + + override_background = { reference = dungeon } + + + trigger = { + has_fp3_dlc_trigger = yes + is_ruler = yes + any_held_county = { + any_county_province = { + geographical_region = dlc_fp3_greater_persian_frontier_regions + fp3_yearly.8000_province_trigger = yes + } + } + + faith = { + NOR = { + has_doctrine_parameter = unreformed # Unreformed Pagans cannot Holy War + has_doctrine_parameter = holy_wars_forbidden # Pacifists cannot Holy War + } + } + exists = cp:councillor_marshal + + cp:councillor_marshal = { + is_available_ai_adult = yes + NOR = { #so that his personality makes sense for the story + has_trait = zealous + has_trait = arbitrary + has_trait = callous + has_trait = faith_warrior + } + } + + any_culture_global = { fp3_warrior_culture_trigger = yes } #failsafe to prevent funky errors + } + + cooldown = { + years = 10 + } + + immediate = { + + random_culture_global = { + limit = { fp3_warrior_culture_trigger = yes } + save_scope_as = warmonger_culture + } + + random_held_county = { + limit = { + any_county_province = { fp3_yearly.8000_province_trigger = yes } + } + save_scope_as = murder_county #for the modifier + } + + scope:murder_county = { + random_county_province = { + limit = { fp3_yearly.8000_province_trigger = yes } + barony = { save_scope_as = murder_barony } #for use in loc + } + } + + scope:murder_county = { + add_county_modifier = { + modifier = fp3_brutal_predations_county_modifier + years = 10 + } + } + + cp:councillor_marshal = { save_scope_as = righteous_marshal } + + create_character = { + template = fp3_raging_ghazi_character + location = root.capital_province + culture = root.culture + save_scope_as = raging_ghazi + } + } + + option = { #I too have walked the holy path, go in peace + name = fp3_yearly.8000.a + flavor = fp3_yearly.8000.flavor.a.tt + + trigger = { + OR = { + has_trait = faith_warrior + has_trait = holy_warrior + has_trait = crusader_king + has_trait = pilgrim + is_ai = yes #we want to encourage the AI to do this, rather than keep the ghazi around, thus we allow this option more easily for the AI + } + } + + add_piety = medium_piety_gain + + scope:raging_ghazi = { silent_disappearance_effect = yes } + + stress_impact = { + zealous = medium_stress_impact_loss + trusting = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + just = minor_stress_impact_gain + } + + ai_chance = { #zealous AI prefer this option + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_zeal = 1 + ai_honor = -1 + ai_rationality = -0.5 + } + } + } + + option = { #I have a nice new prison cell just for you! + name = fp3_yearly.8000.b + flavor = fp3_yearly.8000.flavor.b.tt + + add_dread = minor_dread_gain + + scope:raging_ghazi = { #the ghazi gets to languish in a dungeon + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + scope:murder_county = { + remove_county_modifier = fp3_brutal_predations_county_modifier + } + + stress_impact = { + just = medium_stress_impact_loss + vengeful = minor_stress_impact_loss + zealous = medium_stress_impact_gain + callous = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { #just and compassionate AI go for this option + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_zeal = -1 + } + } + } + + option = { #I could use a man of your talents + name = fp3_yearly.8000.c + + add_courtier = scope:raging_ghazi + + scope:raging_ghazi = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + + add_hook = { + target = scope:raging_ghazi + type = favor_hook + } + + scope:righteous_marshal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + greedy = minor_stress_impact_loss + just = major_stress_impact_gain + paranoid = minor_stress_impact_gain + } + + ai_chance = { #greedy / opportunistic AI go for this option, but more rarely than the others, since we don't want to spam Persia with this character + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_greed = 1 + ai_rationality = 0.5 + ai_compassion = -1 + ai_honor = -1 + } + } + } + after = { + scope:raging_ghazi = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger fp3_yearly.8001_outlying_province_trigger = { + squared_distance = { + target = root.capital_province + value > squared_distance_medium + } +} + +fp3_yearly.8001 = { #Frontier Fortress Benefactor + type = character_event + title = fp3_yearly.8001.t + desc = fp3_yearly.8001.desc + theme = martial + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:concerned_councillor + animation = personality_bold + } + + trigger = { + has_fp3_dlc_trigger = yes + is_ruler = yes + any_held_county = { + any_county_province = { + fp3_yearly.8001_outlying_province_trigger = yes + } + } + + is_healthy = yes #the councillor's request wouldn't make much sense otherwise + + root.capital_province = { geographical_region = world_persian_empire } #so that this inside-to-outside worldview makes sense + + faith = { + NOT = { + has_doctrine_parameter = unreformed # Unreformed Pagans don't need frontier fortresses, generally speaking + } + } + + OR = { #Either could make sense, may as well make it as flexible as possible + exists = cp:councillor_steward + exists = cp:councillor_marshal + } + } + + cooldown = { + years = 50 + } + + immediate = { + random_held_county = { + limit = { + any_county_province = { + fp3_yearly.8001_outlying_province_trigger = yes + } + } + weight = { + modifier = { + factor = 100 + any_county_province = { + geographical_region = dlc_fp3_greater_persian_frontier_regions + } + } + } + save_scope_as = frontier_fort_county + } + + if = { + limit = { exists = cp:councillor_marshal } + cp:councillor_marshal = { save_scope_as = concerned_councillor } + } + else = { cp:councillor_steward = { save_scope_as = concerned_councillor } } + + if = { + limit = { + any_spouse = { + AND = { + is_available_healthy_ai_adult = yes + is_landed = no + } + NOR = { + has_trait = arrogant + has_trait = craven + has_trait = lazy + has_trait = shy + has_trait = content + has_trait = pregnant + } + } + } + random_spouse = { save_scope_as = dutiful_spouse } + } + } + + option = { #Of course I shall go! + name = fp3_yearly.8001.a + + scope:frontier_fort_county = { + add_county_modifier = { + modifier = fp3_boosted_frontier_morale_county_modifier + years = 15 + } + } + + add_character_modifier = { + modifier = fp3_visited_the_frontier_modifier + years = 5 + } + + remove_treasury_or_gold = minor_treasury_or_gold_value #gotta pay for travel expenses! + + stress_impact = { + diligent = medium_stress_impact_loss + brave = minor_stress_impact_loss + humble = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + shy = minor_stress_impact_gain + content = miniscule_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { #dutiful/diligent AI prefer this option + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_honor = 1 + ai_zeal = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { #Send your wife/husband instead + name = fp3_yearly.8001.b + flavor = fp3_yearly.8001.flavor.b.tt + + trigger = { + exists = scope:dutiful_spouse + NOT = { + dummy_female = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:concerned_councillor } + } + } + scope:concerned_councillor = { #checking that they can be a misogynist/misandrist in this matter + NOR = { + faith = { has_doctrine = doctrine_gender_equal } + culture = { has_cultural_parameter = has_access_to_shieldmaidens } + } + } + } + + scope:concerned_councillor = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + scope:dutiful_spouse = { + if = { + limit = { + OR = { #checking that (s)he would appreciate this opportunity + has_trait = diligent + has_trait = ambitious + has_trait = brave + has_trait = adventurer + has_trait = shieldmaiden + has_martial_lifestyle_trait_trigger = yes + has_lifestyle = martial_lifestyle + martial >= high_skill_rating + has_stewardship_lifestyle_trait_trigger = yes + has_lifestyle = stewardship_lifestyle + stewardship >= high_skill_rating + } + } + add_opinion = { + target = root + modifier = spouse_trusted_me_opinion + } + } + else = { #otherwise, (s)he doesn't wanna go to the frontier + add_opinion = { + target = root + modifier = fp3_sent_me_to_the_frontier_opinion + } + } + } + + scope:dutiful_spouse = { + duel = { + skill = martial + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = delegated_fortress_inspection_toast.success + left_icon = scope:dutiful_spouse + + scope:frontier_fort_county = { + add_county_modifier = { + modifier = fp3_boosted_frontier_morale_county_modifier + years = 15 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = delegated_fortress_inspection_toast.failure + left_icon = scope:tension_councillor + + scope:frontier_fort_county = { + add_county_modifier = { + modifier = fp3_low_frontier_morale_county_modifier + years = 10 + } + } + } + } + } + } + } + + scope:dutiful_spouse = { + add_character_modifier = { + modifier = fp3_visited_the_frontier_modifier + years = 5 + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + craven = minor_stress_impact_loss + cynical = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { #craven but sociable AI prefer this option + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = 0.5 + ai_sociability = 1 + } + } + } + + option = { #Make vague promises + name = fp3_yearly.8001.c + flavor = fp3_yearly.8001.flavor.c.tt + + duel = { #this duel is root trying to appease the councillor + skill = diplomacy + value = medium_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = 15 + has_trait = deceitful + } + modifier = { + add = 40 + scope:concerned_councillor = { + has_trait = trusting + } + } + modifier = { + add = 20 + scope:concerned_councillor = { + OR = { + has_trait = craven + has_trait = patient + } + } + } + send_interface_toast = { + title = convincing_councillor_toast.success + left_icon = root + right_icon = scope:concerned_councillor + + scope:concerned_councillor = { + add_opinion = { + target = root + modifier = trusting_liege_opinion + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + modifier = { + add = 20 + has_trait = honest + } + modifier = { + add = 10 + has_trait = brave + } + send_interface_toast = { + title = convincing_councillor_toast.failure + left_icon = root + right_icon = scope:concerned_councillor + + scope:concerned_councillor = { + add_opinion = { + target = root + modifier = weak_excuses + } + } + } + } + } + + random = { + chance = 33 + scope:frontier_fort_county = { + add_county_modifier = { + modifier = fp3_low_frontier_morale_county_modifier + years = 10 + } + } + } + + stress_impact = { + lazy = minor_stress_impact_loss + craven = major_stress_impact_loss + content = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + diligent = medium_stress_impact_gain + honest = medium_stress_impact_gain + + } + + ai_chance = { #craven but energetic AI prefer this option + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_rationality = 0.5 + ai_energy = 1 + } + } + } + + option = { #Refuse + name = fp3_yearly.8001.d + + random = { + chance = 50 + scope:frontier_fort_county = { + add_county_modifier = { + modifier = fp3_low_frontier_morale_county_modifier + years = 10 + } + } + } + + stress_impact = { + lazy = major_stress_impact_loss + craven = medium_stress_impact_loss + content = minor_stress_impact_loss + diligent = medium_stress_impact_gain + brave = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + + ai_chance = { #lazy, craven AI prefer this option + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_energy = -1 + } + } + } +} + +############ +scripted_trigger fp3_yearly.8002_zealous_vassal_or_spouse_trigger = { + AND = { + faith = root.faith + is_available_healthy_ai_adult = yes + OR = { + has_trait = zealous + has_trait = faith_warrior + has_trait = crusader_king + has_trait = order_member + } + } +} + +fp3_yearly.8002 = { #Faith at the Frontier + type = character_event + title = fp3_yearly.8002.t + desc = fp3_yearly.8002.desc + theme = faith + + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:concerned_person + animation = worry + } + + trigger = { + has_fp3_dlc_trigger = yes + age >= 12 + is_ruler = yes + any_held_county = { + any_county_province = { + fp3_yearly.8001_outlying_province_trigger = yes + } + } + + root.capital_province = { geographical_region = world_persian_empire } #so that this inside-to-outside worldview makes sense + + faith = { #so that the plot makes sense + NOR = { + has_doctrine_parameter = unreformed # Unreformed Pagans don't need frontier fortresses, generally speaking + has_doctrine = doctrine_pluralism_pluralistic + } + } + + OR = { #Either could make sense, may as well make it as flexible as possible + any_spouse = { + fp3_yearly.8002_zealous_vassal_or_spouse_trigger = yes + } + any_powerful_vassal = { + fp3_yearly.8002_zealous_vassal_or_spouse_trigger = yes + } + exists = cp:councillor_court_chaplain + } + } + + cooldown = { + years = 50 + } + + immediate = { #finding a nice location for the event + random_held_county = { + limit = { + any_county_province = { + fp3_yearly.8001_outlying_province_trigger = yes + } + } + weight = { + modifier = { + factor = 100 + any_county_province = { + geographical_region = dlc_fp3_greater_persian_frontier_regions + } + } + } + save_scope_as = frontier_fort_county + } + + scope:frontier_fort_county = { + add_county_modifier = { + modifier = fp3_frontier_heresy_county_modifier + years = 40 + } + } + + if = { + limit = { current_year >= 1050 } + faith.religion = { + random_faith = { #here we're setting up a nice heresy for the event + limit = { #some faiths didn't exist in the early period, and were extinct by the latter + this != root.faith + fervor > medium_fervor_value + OR = { + this = faith:nizari + this = faith:zayidi + this = faith:qarmatian + this = faith:zurvanism + this = faith:khurramism + this = faith:nestorian + this = faith:manichean + this = faith:mahayana + } + } + alternative_limit = { #just a failsafe to avoid errors + this != root.faith + } + save_scope_as = regional_heresy + } + } + } + else = { + faith.religion = { + random_faith = { #here we're setting up a nice heresy for the event + limit = { #some faiths didn't exist in the early period + this != root.faith + fervor > medium_fervor_value + OR = { + this = faith:azariqa + this = faith:mutazila + this = faith:ghulat + this = faith:zayidi + this = faith:zurvanism + this = faith:khurramism + this = faith:mazdakism + this = faith:nestorian + this = faith:manichean #the "Arch-Heresy" according to Cambridge History of Iran ^_^ + this = faith:zun_pagan + this = faith:mahayana + } + } + alternative_limit = { #just a failsafe to avoid errors + this != root.faith + } + save_scope_as = regional_heresy + } + } + } + + if = { + limit = { + any_spouse = { + fp3_yearly.8002_zealous_vassal_or_spouse_trigger = yes + } + } + random_spouse = { + limit = { + fp3_yearly.8002_zealous_vassal_or_spouse_trigger = yes + } + save_scope_as = concerned_person + } + } + else_if = { + limit = { + any_powerful_vassal = { fp3_yearly.8002_zealous_vassal_or_spouse_trigger = yes + } + } + random_powerful_vassal = { + limit = { + fp3_yearly.8002_zealous_vassal_or_spouse_trigger = yes + } + save_scope_as = concerned_person + } + } + else = { + cp:councillor_court_chaplain = { save_scope_as = concerned_person } + } + } + + option = { #Burn them all and let God sort them out + name = fp3_yearly.8002.a + + trigger = { + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = paranoid + has_trait = faith_warrior + has_trait = crusader_king + dread >= high_dread + } + } + + add_dread = major_dread_gain + + scope:concerned_person = { + if = { + limit = { + OR = { #if the concerned person has a... certain personality, they appreciate this + has_trait = sadistic + has_trait = callous + has_trait = paranoid + has_trait = vengeful + } + } + add_opinion = { + target = root + opinion = 20 + modifier = fp3_admires_resolve_opinion + } + } + else = { + add_opinion = { #but otherwise, they're kinda shocked + target = root + opinion = -20 + modifier = fp3_mildly_terrified_opinion + } + } + } + + scope:frontier_fort_county = { + add_county_modifier = { + modifier = fp3_garrison_decimated_county_modifier + years = 10 + } + } + + + random_list = { + 75 = { + custom_tooltip = fp3_county_pacified.tt + scope:frontier_fort_county = { + remove_county_modifier = fp3_frontier_heresy_county_modifier + } + } + 25 = { + custom_tooltip = fp3_county_galvanized.tt + scope:frontier_fort_county = { + set_county_faith = scope:regional_heresy + } + } + } + + stress_impact = { + sadistic = major_stress_impact_loss + callous = medium_stress_impact_loss + wrathful = minor_stress_impact_loss + zealous = minor_stress_impact_loss + greedy = minor_stress_impact_loss + compassionate = massive_stress_impact_gain + just = major_stress_impact_gain + + + } + + ai_chance = { #cruel, zealous AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 1 + ai_compassion = -1 + ai_honor = -0.5 + ai_rationality = -0.5 + } + } + } + + option = { #Join their faith + name = fp3_yearly.8002.b + + trigger = { + OR = { + has_trait = cynical + has_trait = fickle + has_trait = humble + has_trait = depressed + has_trait = lunatic + has_trait = possessed + has_trait = lifestyle_mystic + stress_level >= 3 + } + NOT = { + has_trait = zealous + } + } + + add_piety = medium_piety_loss + set_character_faith_with_conversion = scope:regional_heresy + + scope:frontier_fort_county = { + add_county_modifier = { + modifier = tensions_eased_province_modifier + years = 20 + } + } + + scope:concerned_person = { + add_opinion = { + target = root + modifier = perplexed_opinion + opinion = -20 + } + } + + stress_impact = { + cynical = major_stress_impact_loss + humble = medium_stress_impact_loss + brave = minor_stress_impact_loss + fickle = minor_stress_impact_loss + content = medium_stress_impact_gain + craven = medium_stress_impact_gain + + } + + ai_chance = { #bold, cynical AI prefer this option + base = 40 #so that the AI is less likely to take this option + ai_value_modifier = { + ai_boldness = 0.7 + ai_energy = 0.5 + ai_rationality = 0.7 + ai_zeal = -1 + } + } + } + + option = { #Send them to preach + name = fp3_yearly.8002.c + + scope:concerned_person = { + if = { + limit = { + OR = { #if the concerned person has a... certain personality, or is very able to perform the task, they're okay with this + has_trait = dull + has_trait = intellect_bad + has_trait = diligent + learning >= good_skill_level + } + } + add_opinion = { + target = root + opinion = 10 + modifier = trusted_me_opinion + } + } + else = { + add_opinion = { #but otherwise, they see it for what it is; a mild insult + target = root + opinion = -10 + modifier = unfair_expectations_opinion + } + } + } + + scope:concerned_person = { + add_character_modifier = { + modifier = fp3_visited_the_frontier_modifier + years = 5 + } + } + + scope:concerned_person = { + duel = { + skill = learning + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = dealing_with_soldier_heresy_toast.success + left_icon = scope:concerned_person + + custom_tooltip = fp3_county_converted.tt + scope:frontier_fort_county = { + remove_county_modifier = fp3_frontier_heresy_county_modifier + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = dealing_with_soldier_heresy_toast.failure + left_icon = scope:concerned_person + + custom_tooltip = fp3_county_galvanized.tt + scope:frontier_fort_county = { + set_county_faith = scope:regional_heresy + } + if = { + limit = { + NOT = { + scope:concerned_person = { has_trait = depressed } + } + } + random = { + chance = 10 + scope:concerned_person = { add_trait = depressed_1 } + } + } + } + } + } + } + } + + stress_impact = { + lazy = major_stress_impact_loss + shy = minor_stress_impact_loss + trusting = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + brave = minor_stress_impact_loss + zealous = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + diligent = medium_stress_impact_gain + } + + ai_chance = { #hands-off/rational AI prefer this option + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_rationality = 0.5 + ai_zeal = 0.2 + ai_energy = -0.5 + } + } + } + + option = { #We should wait and see how the situation develops + name = fp3_yearly.8002.d + + random_list = { + 50 = { + send_interface_toast = { + title = frontier_heresy_eased + left_icon = scope:root + + scope:frontier_fort_county = { + add_county_modifier = { + modifier = tensions_eased_province_modifier + years = 20 + } + } + } + } + 50 = { + send_interface_toast = { + title = frontier_heresy_mega_outbreak + left_icon = scope:root + + scope:frontier_fort_county = { set_county_faith = scope:regional_heresy } + } + } + } + + scope:concerned_person = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + + stress_impact = { + patient = medium_stress_impact_loss + calm = minor_stress_impact_loss + cynical = minor_stress_impact_loss + content = minor_stress_impact_loss + wrathful = minor_stress_impact_gain + zealous = massive_stress_impact_gain + paranoid = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + ai_chance = { #passive or compassionate AI prefer this optio + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 0.5 + ai_zeal = -1 + ai_vengefulness = -0.5 + } + } + } +} + +#######Exotic Espand, by Ola Jentzsch##### + +scripted_trigger fp3_yearly_8003_far_away_mountain_trigger = { + county_has_province_with_terrain = { + terrain = mountains + terrain = desert_mountains + } + squared_distance = { + target = root.capital_province + value > squared_distance_large + } +} + + +fp3_yearly.8003 = { #Exotic Espand + type = character_event + title = fp3_yearly.8003.t + desc = fp3_yearly.8003.desc + theme = mental_health + + left_portrait = { + character = scope:superstitious_consort + animation = paranoia + } + right_portrait = { + character = root + animation = personality_rational + } + + lower_left_portrait = { character = scope:cruel_consort } + lower_right_portrait = { character = scope:quest_chaplain } + + trigger = { #the wonders of harem intrigues! + + has_fp3_dlc_trigger = yes + is_ruler = yes + + root.capital_province = { + OR = { + geographical_region = world_persian_empire + geographical_region = world_steppe_tarim + } + } + + any_county_in_region = { + region = world_persian_empire + region = world_steppe_tarim + region = world_himalaya + region = world_middle_east_arabia + fp3_yearly_8003_far_away_mountain_trigger = yes + } + + any_consort = { + NOT = { + has_trait = cynical + has_trait = lifestyle_herbalist + learning >= good_skill_level + } + is_courtier = yes + is_available_adult = yes + save_temporary_scope_as = consort_1 + } + + any_consort = { + this != scope:consort_1 + is_available_adult = yes + is_courtier = yes + opinion = { + target = scope:consort_1 + value < 0 + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + + random_consort = { + limit = { + NOT = { + has_trait = cynical + has_trait = lifestyle_herbalist + learning >= good_skill_level + } + is_available_adult = yes + is_courtier = yes + save_temporary_scope_as = consort_1_temp + root = { + any_consort = { + this != scope:consort_1_temp + is_available_adult = yes + is_courtier = yes + opinion = { + target = scope:consort_1_temp + value < 0 + } + } + } + } + save_scope_as = superstitious_consort + } + random_consort = { + limit = { + this != scope:superstitious_consort + is_available_adult = yes + is_courtier = yes + opinion = { + target = scope:superstitious_consort + value < 0 + } + } + save_scope_as = cruel_consort + } + + random_county_in_region = { + region = world_persian_empire + region = world_steppe_tarim + region = world_himalaya + region = world_middle_east_arabia + limit = { fp3_yearly_8003_far_away_mountain_trigger = yes } + save_scope_as = espad_mountain_province #this is only used for loc + } + + scope:superstitious_consort = { + add_character_modifier = { + modifier = fp3_jinx_modifier + years = 10 + } + } + + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_healthy_ai_adult = yes } + } + cp:councillor_court_chaplain = { save_scope_as = quest_chaplain } + } + } + + option = { #Trust in God, not your superstition + name = fp3_yearly.8003.a + + trigger = { + faith = { + OR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + } + } + + add_piety = minor_piety_gain + + scope:superstitious_consort = { #if (s)he loves you or is forgiving, (s)he takes this less hard + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + has_trait = forgiving + } + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + else = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -40 + } + } + } + + scope:cruel_consort = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + callous = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { #cruel or zealous AI prefers this option + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.5 + ai_compassion = -1 + } + } + } + + option = { #Cost what it may, I will send for it + name = fp3_yearly.8003.b + + scope:superstitious_consort = { + if = { + limit = { + OR = { + has_relation_lover = root + has_relation_soulmate = root + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + else = { + custom_tooltip = fp3_closer_to_love.tt + hidden_effect = { + root = { + progress_towards_lover_effect = { + CHARACTER = scope:superstitious_consort + REASON = lover_gave_fine_seeds # Naming conv. DLC_progress_towards_reason_TYPE_NAME. This will avoid dupes and conflicts. -h + OPINION = 20 + } + } + } + } + } + + scope:cruel_consort = { + add_opinion = { + target = scope:superstitious_consort + modifier = envy_opinion + opinion = -20 + } + } + + scope:cruel_consort = { + add_opinion = { + target = root + modifier = fp3_resentful_opinion + opinion = -20 + } + } + + remove_short_term_gold = medium_gold_value #this will be expensive! + + random = { + chance = 75 + scope:superstitious_consort = { + remove_character_modifier = fp3_jinx_modifier + } + } + + stress_impact = { + generous = major_stress_impact_loss + compassionate = minor_stress_impact_loss + diligent = minor_stress_impact_loss + zealous = minor_stress_impact_loss + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + cynical = miniscule_stress_impact_gain + temperate = miniscule_stress_impact_gain + } + + ai_chance = { #compassionate, energetic, non-frugal AI prefers this option + base = 100 + ai_value_modifier = { + ai_compassion = 0.7 + ai_energy = 0.7 + ai_greed = -1 + } + } + } + + option = { #I can send my court chaplain, (s)he is very capable + name = fp3_yearly.8003.c + + + trigger = { exists = scope:quest_chaplain } + + scope:quest_chaplain = { + if = { + limit = { + OR = { #if the chaplain is adventurous or a nature specialist, or thinks very highly of the consort, (s)he appreciates the task + has_trait = brave + has_trait = adventurer + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = diligent + opinion = { + target = scope:superstitious_consort + value > 50 + } + } + } + add_opinion = { + target = root + opinion = 10 + modifier = trusted_me_opinion + } + } + else = { + add_opinion = { #but otherwise, don't really wanna go + target = root + modifier = fp3_sent_me_to_the_frontier_opinion + } + } + } + + scope:quest_chaplain = { + add_character_modifier = { + modifier = fp3_visited_the_frontier_modifier + years = 5 + } + } + + scope:quest_chaplain = { + duel = { + skill = learning + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = questing_for_espand_toast.success + left_icon = scope:quest_chaplain + right_icon = scope:superstitious_consort + + custom_tooltip = fp3_espand_found.tt + scope:superstitious_consort = { + remove_character_modifier = fp3_jinx_modifier + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = questing_for_espand_toast.failure + left_icon = scope:quest_chaplain + right_icon = scope:superstitious_consort + + custom_tooltip = fp3_espand_unfound.tt + scope:quest_chaplain = { + add_character_modifier = { + modifier = exhausted_modifier + years = 10 + } + } + if = { + limit = { + NOT = { + scope:superstitious_consort = { has_trait = depressed } + } + } + random = { + chance = 20 + scope:superstitious_consort = { add_trait = depressed_1 } + } + } + } + } + } + } + } + + stress_impact = { + lazy = medium_stress_impact_loss + greedy = minor_stress_impact_loss + trusting = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + diligent = medium_stress_impact_gain + } + + ai_chance = { #compassionate but frugal AI prefer this option + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = 0.5 + ai_greed = -1 + ai_energy = -0.5 + } + } + } + + option = { #Can't you pick normal espand like everyone else? + name = fp3_yearly.8003.d + + scope:superstitious_consort = { #if (s)he has particular traits, (s)he takes this very hard + if = { + limit = { + OR = { + has_trait = craven + has_trait = paranoid + has_trait = vengeful + has_trait = lifestyle_mystic + has_trait = arrogant + has_trait = greedy + has_trait = stubborn + has_trait = wrathful + } + } + add_opinion = { + target = root + modifier = mocked_me_in_time_of_need + } + } + else = { + add_opinion = { + target = root + modifier = fp3_ignored_me_in_time_of_need_opinion + } + } + } + + scope:cruel_consort = { + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + callous = minor_stress_impact_loss + temperate = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + + ai_chance = { #cynical and frugal AI prefers this option + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -1 + ai_compassion = -0.5 + } + } + } +} + + +####The Frontier's Call, by Ola Jentzsch#### + +scripted_trigger fp3_suitable_child_to_leave = { + is_physically_able_adult = yes + is_courtier_of = root + age < 40 + is_concubine = no + OR = { #checking that they're the venturesome type + has_trait = brave + has_trait = impatient + has_trait = lifestyle_hunter + has_trait = education_martial + has_lifestyle = martial_lifestyle + has_martial_lifestyle_trait_trigger = yes + martial >= high_skill_rating + prowess >= high_skill_rating + } + NOR = { #and that their cravings aren't already satisfied + has_trait = faith_warrior + has_trait = pilgrim + has_trait = adventurer + has_trait = viking + has_trait = content + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } #and that them wanting to go on adventure wouldn't be preposterous in your culture +} + +scripted_trigger fp3_suitable_relation_for_child = { + NOT = { this = $CHAR$ } + age >= 10 + OR = { + is_close_family_of = $CHAR$ + is_spouse_of = $CHAR$ + is_concubine_of = $CHAR$ + is_great_grandparent_of = $CHAR$ + has_relation_friend = $CHAR$ + has_relation_lover = $CHAR$ + AND = { + betrothed = $CHAR$ + age >= 14 + } + } + NOR = { + has_trait = brave + has_trait = callous + has_trait = arrogant + } + opinion = { + target = $CHAR$ + value > 15 + } +} + +scripted_effect fp3_child_leaves_effect = { + move_to_pool_at = scope:far_frontier + scope:parent = { + if = { + limit = { + has_hook = scope:fp3_child_to_leave + } + remove_hook = { + target = scope:fp3_child_to_leave + } + } + } + add_character_modifier = { + modifier = fp3_call_of_the_wild_modifier + years = 25 + } +} + +fp3_yearly.8004 = { #The Frontier Beckons + type = character_event + title = fp3_yearly.8004.t + desc = fp3_yearly.8004.desc + theme = family + left_portrait = { + character = scope:fp3_child_to_leave + animation = personality_bold + } + right_portrait = { + character = scope:worried_relation + animation = grief + } + override_background = { reference = market_east } + + trigger = { + + #DLC check. + has_fp3_dlc_trigger = yes + + is_available = yes + + root.capital_province = { geographical_region = world_persian_empire } + + NAND = { #because this event is a Persian variant of an FP1 event, it's better that both cannot trigger for vikings + has_fp1_dlc_trigger = yes + culture = { has_cultural_pillar = heritage_north_germanic } + } + + any_child = { + fp3_suitable_child_to_leave = yes + save_temporary_scope_as = fp3_child_to_leave_temp + } + + any_courtier_or_guest = { + fp3_suitable_relation_for_child = { CHAR = scope:fp3_child_to_leave_temp } + } + + any_independent_ruler = { + NOT = { + target_is_liege_or_above = root + } + in_diplomatic_range = root + any_realm_province = { + geographical_region = dlc_fp3_greater_persian_frontier_regions + save_temporary_scope_as = place + } + } + scope:place = { + squared_distance = { + target = root.capital_county + value >= squared_distance_large + } + } + } + + cooldown = { years = 10 } + + immediate = { + + save_scope_as = parent + + random_child = { + limit = { + fp3_suitable_child_to_leave = yes + has_personality_dominant_trigger = yes + is_primary_heir_of = root + } + alternative_limit = { + fp3_suitable_child_to_leave = yes + has_personality_dominant_trigger = yes + } + alternative_limit = { + fp3_suitable_child_to_leave = yes + } + save_scope_as = fp3_child_to_leave + } + + random_courtier_or_guest = { #weighting for the most suitable person! + limit = { + fp3_suitable_relation_for_child = { CHAR = scope:fp3_child_to_leave } + } + save_scope_as = worried_relation + } + + random_independent_ruler = { + limit = { + NOT = { + target_is_liege_or_above = root + } + in_diplomatic_range = root + any_realm_province = { + geographical_region = dlc_fp3_greater_persian_frontier_regions + save_temporary_scope_as = place + } + scope:place = { + squared_distance = { + target = root.capital_county + value >= squared_distance_large + } + } + } + random_realm_province = { + limit = { + geographical_region = dlc_fp3_greater_persian_frontier_regions + save_temporary_scope_as = place + scope:place = { + squared_distance = { + target = root.capital_county + value >= squared_distance_large + } + } + } + save_scope_as = far_frontier + } + } + } + + option = { # Fight them to make them stay + name = fp3_yearly.8004.a + + trigger = { + culture = { + OR = { + has_cultural_tradition = tradition_futuwaa + has_cultural_tradition = tradition_fp1_performative_honour + has_cultural_tradition = tradition_warrior_culture + } + } + can_start_single_combat_trigger = yes + scope:fp3_child_to_leave = { + can_start_single_combat_trigger = yes + } + } + custom_tooltip = fp3_yearly.8004.a.tt + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:parent + SC_ATTACKER = scope:parent + SC_DEFENDER = scope:fp3_child_to_leave + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = fp3_yearly.8005 + INVALIDATION_EVENT = fp3_yearly.8006 + } + + stress_impact = { + craven = major_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = medium_stress_impact_gain + temperate = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + + modifier = { + factor = 2 + prowess > scope:fp3_child_to_leave.prowess + } + + modifier = { + factor = 0.1 + ai_compassion >= medium_positive_ai_value + } + + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = forgiving + has_trait = calm + } + } + } + } + + option = { # Appeal to their better nature + name = fp3_yearly.8004.b + + stress_impact = { + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = medium_stress_impact_gain + fickle = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + scope:worried_relation = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + duel = { + skill = diplomacy + value = scope:fp3_child_to_leave.diplomacy + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = fp3_yearly.8004.b.success + send_interface_toast = { + title = fp3_yearly.8004.b.success + left_icon = scope:fp3_child_to_leave + + + add_prestige = medium_prestige_gain + + scope:fp3_child_to_leave = { + custom_tooltip = fp1_yearly.2000.b.tt #reuse from FP1 to save translation + add_character_modifier = { + modifier = fp3_dutiful_scion_modifier + years = 25 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fp3_yearly.8004.b.failure + send_interface_toast = { + title = fp3_yearly.8004.b.failure + left_icon = scope:fp3_child_to_leave + + add_prestige = major_prestige_loss + + scope:fp3_child_to_leave = { + fp3_child_leaves_effect = yes + } + scope:worried_relation = { + add_character_modifier = { + modifier = fp3_worried_sick_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 2 + diplomacy > scope:fp3_child_to_leave.diplomacy + } + + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = forgiving + has_trait = calm + } + } + } + } + + option = { # Treathen to disinherit + name = fp3_yearly.8004.c + flavor = fp3_yearly.8004.c.flavor + + stress_impact = { + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = medium_stress_impact_gain + fickle = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + duel = { + skill = intrigue + value = scope:fp3_child_to_leave.intrigue + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + desc = fp3_yearly.8004.b.success + send_interface_toast = { + title = fp3_yearly.8004.b.success + left_icon = scope:fp3_child_to_leave + + + add_prestige = medium_prestige_gain + + scope:fp3_child_to_leave = { + custom_tooltip = fp1_yearly.2000.b.tt #reuse from FP1 to save translation + add_character_modifier = { + modifier = fp3_dutiful_scion_modifier + years = 25 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + desc = fp3_yearly.8004.b.failure + send_interface_toast = { + title = fp3_yearly.8004.b.failure + left_icon = scope:fp3_child_to_leave + + add_prestige = major_prestige_loss + + + scope:fp3_child_to_leave = { + fp3_child_leaves_effect = yes + add_trait = disinherited + } + progress_towards_rival_effect = { + CHARACTER = scope:fp3_child_to_leave + REASON = rival_left_for_frontier + OPINION = -25 + } + scope:worried_relation = { + add_character_modifier = { + modifier = fp3_worried_sick_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 2 + intrigue > scope:fp3_child_to_leave.intrigue + } + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = craven + has_trait = forgiving + } + } + } + } + + option = { # Go in peace, my son/daughter + name = fp3_yearly.8004.d + + scope:fp3_child_to_leave = { + fp3_child_leaves_effect = yes + } + + if = { + limit = { + has_hook = scope:fp3_child_to_leave + } + remove_hook = { + target = scope:fp3_child_to_leave + } + } + + scope:fp3_child_to_leave = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + + scope:worried_relation = { + add_opinion = { + target = root + modifier = fp3_dismayed_opinion + } + add_character_modifier = { + modifier = fp3_worried_sick_modifier + years = 5 + } + } + + stress_impact = { + compassionate = medium_stress_impact_loss + patient = medium_stress_impact_loss + calm = minor_stress_impact_loss + content = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + wrathful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { #passive or compassionate AI prefer this optio + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_honor = 0.5 + ai_zeal = -1 + ai_vengefulness = -0.5 + } + } + } +} + +############Minor events triggered by the duel in fp3_yearly.8004.a############# + +#Hidden event, to set up the result of the duel +fp3_yearly.8005 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:parent = scope:sc_victor + } + trigger_event = { id = fp3_yearly.8007 days = 1 } + } + else = { + trigger_event = { id = fp3_yearly.8008 days = 1 } + } + } +} + +#Hidden event; the bout became invalidated, inform affected parties. +fp3_yearly.8006 = { + hidden = yes + + immediate = { + # Inform both parties that the duel has invalidated. + scope:parent = { + send_interface_toast = { + title = fp1_yearly.2000.trigger_failure #reused from an fp1 event, so we can save some translation resources + left_icon = scope:fp3_child_to_leave + } + } + } +} + +# Beat child in combat +fp3_yearly.8007 = { + type = character_event + title = fp3_yearly.8007.t + desc = fp3_yearly.8007.desc + theme = family + left_portrait = { + character = scope:fp3_child_to_leave + animation = pain + } + right_portrait = { + character = root + animation = aggressive_sword + } + override_background = { reference = courtyard } + + trigger = { + + } + + immediate = { + + } + + option = { # I will not be found wanting + name = fp3_yearly.8007.a + + add_piety = medium_piety_gain + + scope:fp3_child_to_leave = { + add_character_modifier = { + modifier = fp3_dutiful_scion_modifier + years = 25 + } + } + + ai_chance = { + base = 100 + } + } + + option = { # # Good. I have real responsibilities for you. + name = fp3_yearly.8007.b + + add_prestige = medium_prestige_gain + + scope:fp3_child_to_leave = { + add_character_modifier = { + modifier = fp3_dutiful_scion_modifier + years = 25 + } + } + + ai_chance = { + base = 100 + } + } + + option = { #And now you must marry! + name = fp3_yearly.8007.c + + trigger = { + scope:fp3_child_to_leave = { + AND = { + is_married = no + is_betrothed = no + } + } + } + + root.dynasty = { add_dynasty_prestige = minor_dynasty_prestige_value } + + scope:fp3_child_to_leave = { + add_character_modifier = { + modifier = fp3_marriage_material_modifier + years = 10 + } + } + + ai_chance = { + base = 100 + } + } +} + +# Beaten by child in combat +fp3_yearly.8008 = { + type = character_event + title = fp3_yearly.8008.t + desc = fp3_yearly.8008.desc + theme = family + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:fp3_child_to_leave + animation = aggressive_sword + } + override_background = { reference = courtyard } + + trigger = { + + } + + immediate = { + + } + + option = { # My child I can lose, but my gold... + name = fp3_yearly.8008.a + + trigger = { + has_trait = greedy + } + + pay_short_term_gold = { + target = scope:fp3_child_to_leave + gold = minor_gold_value + } + + add_stress = medium_stress_impact_gain + + scope:fp3_child_to_leave = { + fp3_child_leaves_effect = yes + if = { + limit = { + NOT = { has_trait = lifestyle_blademaster } + } + add_trait = lifestyle_blademaster + } + } + + ai_chance = { + base = 100 + } + } + + option = { # It would have been better to be a eunuch... + name = fp3_yearly.8008.b + + trigger = { + is_female = no + is_eunuch_trigger = no + } + + pay_short_term_gold = { + target = scope:fp3_child_to_leave + gold = minor_gold_value + } + + add_prestige = medium_prestige_loss + + scope:fp3_child_to_leave = { + fp3_child_leaves_effect = yes + if = { + limit = { + NOT = { has_trait = lifestyle_blademaster } + } + add_trait = lifestyle_blademaster + } + } + + ai_chance = { + base = 100 + } + } + + option = { # Fate will bring us together again, you will see. + name = fp3_yearly.8008.c + + pay_short_term_gold = { + target = scope:fp3_child_to_leave + gold = minor_gold_value + } + + add_prestige = medium_prestige_loss + + scope:fp3_child_to_leave = { + fp3_child_leaves_effect = yes + if = { + limit = { + NOT = { has_trait = lifestyle_blademaster } + } + add_trait = lifestyle_blademaster + } + } + + ai_chance = { + base = 100 + } + } +} + +#############################Duel events end############################ +######################################################################### + +#########Caliphal Concerns, by Ola Jentzsch################ +scripted_trigger fp3_yearly.8009_frontier_heresy_trigger = { + any_county_province = { geographical_region = dlc_fp3_eastern_persian_frontier_regions } + faith = { save_temporary_scope_as = compare_faith } + root.faith.religious_head = { + faith = { + faith_hostility_level = { target = scope:compare_faith value > faith_astray_level } + } + } +} + +scripted_trigger fp3_yearly.8009_root_and_hof_faith_comparison_trigger = { + faith = { save_temporary_scope_as = compare_faith } + root = { + faith = { + faith_hostility_level = { target = scope:compare_faith value <= faith_astray_level } + } + } +} + + +fp3_yearly.8009 = { + type = character_event + title = fp3_yearly.8009.t + desc = { + desc = fp3_yearly.8009.desc_beginning + first_valid = { + triggered_desc = { + trigger = { + root.faith.religious_head = { + OR = { + has_religion = religion:islam_religion + has_religion = religion:judaism_religion + } + } + } + desc = fp3_yearly.8009.desc_muslim_or_jewish_insult_ending + } + desc = fp3_yearly.8009.desc_other_insult_ending + } + } + theme = faith + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = personality_rational + triggered_animation = { + trigger = { + OR = { + has_trait = vengeful + has_trait = wrathful + dread >= 50 + tyranny >= 50 + } + } + animation = personality_vengeful + } + } + right_portrait = { + character = scope:hof_emissary + animation = chancellor + } + + lower_left_portrait = { character = scope:righteous_caliph } + lower_right_portrait = { character = scope:loyal_chaplain } + + trigger = { + has_fp3_dlc_trigger = yes + + faith.religious_head != root + + exists = root.faith.religious_head + + root.faith.religious_head = { + is_ai = yes + fp3_yearly.8009_root_and_hof_faith_comparison_trigger = yes + faith = { + NOR = { + has_doctrine_parameter = unreformed + has_doctrine_parameter = witchcraft_accepted + has_doctrine = doctrine_pluralism_pluralistic + has_doctrine = tenet_carnal_exaltation + } + } + } + + any_held_county = { + fp3_yearly.8009_frontier_heresy_trigger = yes + save_temporary_scope_as = heretic_county + } + } + + cooldown = { years = 25 } + + immediate = { + + random_held_county = { + limit = { fp3_yearly.8009_frontier_heresy_trigger = yes } + save_scope_as = very_heretic_county + } + + if = { #this is a false safe due to the funkyness of the location system + limit = { + exists = root.faith.religious_head.location + } + root.faith.religious_head.location = { + save_scope_as = caliphal_location + } + } + else_if = { + limit = { + exists = root.faith.religious_head.primary_title.title_capital_county.title_province + } + root.faith.religious_head.primary_title.title_capital_county.title_province = { + save_scope_as = caliphal_location + } + } + else = { + random_province = { + save_scope_as = caliphal_location + } + } + + root.faith.religious_head = { save_scope_as = righteous_caliph } + + create_character = { #this is the head of faith's emissary + age = { 25 75 } + location = root.capital_province + faith = root.faith.religious_head.faith + gender_female_chance = root_faith_dominant_gender_female_chance #could be female, if given the right context. + trait = diplomat + template = priest_character_template + save_scope_as = hof_emissary #this saves him as a scope so we can get nice effects to bounce off him! + } + + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { is_available_healthy_ai_adult = yes } + } + cp:councillor_court_chaplain = { save_scope_as = loyal_chaplain } + } + } + + option = { #I shall stamp this heresy out + name = fp3_yearly.8009.a + + add_dread = medium_dread_gain + + add_character_modifier = { + modifier = fp3_fearsome_example_modifier + years = 20 + } + + scope:righteous_caliph = { + if = { + limit = { + OR = { #if the HoF has a... certain personality, they appreciate this + has_trait = sadistic + has_trait = callous + has_trait = paranoid + has_trait = vengeful + } + } + add_opinion = { + target = root + opinion = 30 + modifier = fp3_admires_resolve_opinion + } + root = { add_piety = minor_piety_gain } + } + else = { + add_opinion = { #but otherwise, they're kinda shocked + target = root + opinion = -10 + modifier = fp3_went_too_far_opinion + } + } + } + + random_list = { + 70 = { + send_interface_toast = { + title = fp3_gross_persecutions_toast + scope:very_heretic_county = { + add_county_modifier = { + modifier = fp3_gross_persecutions_county_modifier + years = 10 + } + } + } + } + 30 = { + send_interface_toast = { + title = fp3_galvanized_heretics_toast + scope:very_heretic_county = { + add_county_modifier = { + modifier = fp3_galvanized_heretics_county_modifier + years = 30 + } + } + } + } + } + + stress_impact = { + sadistic = major_stress_impact_loss + callous = medium_stress_impact_loss + wrathful = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = massive_stress_impact_gain + just = major_stress_impact_gain + } + + ai_chance = { #cruel, zealous AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_vengefulness = 1 + ai_boldness = 0.5 + ai_compassion = -1 + ai_honor = -0.5 + ai_rationality = -0.5 + } + } + } + + option = { #I shall convert them in the proper language + name = fp3_yearly.8009.b + flavor = fp3_yearly.8009.qurans.flavor + + trigger = { #checking if the province and root is non-arabic and the caliph arabic + + scope:very_heretic_county.culture = { + NOT = { has_cultural_pillar = language_arabic } + } + + culture = { + NOT = { has_cultural_pillar = language_arabic } + } + + root.faith.religious_head = { + culture = { has_cultural_pillar = language_arabic } + } + } + + add_piety = medium_piety_gain + + remove_treasury_or_gold = medium_treasury_or_gold_value + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + + add_character_modifier = { + modifier = fp3_promoting_arabic_modifier + years = 20 + } + + + if = { + limit = { is_ai = no } #just so this doesn't get out of hand + culture = { + change_cultural_acceptance = { + target = scope:righteous_caliph.culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_arabic_books + } + } + } + + stress_impact = { + humble = minor_stress_impact_loss + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + } + + ai_chance = { #loyal AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_honor = 0.5 + } + + modifier = { + factor = 2 + OR = { + has_trait = humble + has_trait = trusting + knows_language_of_culture = scope:righteous_caliph.culture + } + } + } + } + + + option = { #My court chaplain can handle this + name = fp3_yearly.8009.c + + trigger = { + + exists = scope:loyal_chaplain + } + + add_piety = medium_piety_gain + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + scope:loyal_chaplain = { + add_character_modifier = { + modifier = fp3_visited_the_frontier_modifier + years = 5 + } + } + + scope:loyal_chaplain = { + duel = { + skill = learning + value = high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = dealing_with_frontier_heresy_toast.success + left_icon = scope:loyal_chaplain + + custom_tooltip = fp3_county_listened.tt + scope:very_heretic_county = { + add_county_modifier = { + modifier = fp3_conversion_curious_county_modifier + years = 20 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = dealing_with_frontier_heresy_toast.failure + left_icon = scope:loyal_chaplain + + custom_tooltip = fp3_county_unfazed.tt + scope:very_heretic_county = { + add_county_modifier = { + modifier = fp3_frontier_heresy_county_modifier + years = 20 + } + } + } + } + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + diligent = medium_stress_impact_gain + } + + ai_chance = { #zealous but frugal AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = 0.5 + ai_greed = -1 + ai_energy = -0.5 + } + } + } + + option = { #I'm busy with other things + name = fp3_yearly.8009.d + + add_piety = medium_piety_loss + + add_stress = medium_stress_loss + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + stress_impact = { + content = medium_stress_impact_loss + cynical = minor_stress_impact_loss + lazy = minor_stress_impact_loss + zealous = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + + ai_chance = { #lazy or cynical AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = 0.5 + ai_boldness = -0.5 + ai_energy = -0.5 + } + } + } +} + +#########Abode of War, by Ola Jentzsch################ +scripted_trigger fp3_yearly.8010_super_evil_pagan_heretic_neighboring_ruler_trigger = { + is_ai = yes + OR = { + top_liege = this + top_liege = { is_ai = yes } + } + NOT = { + is_allied_to = root + is_vassal_of = root + has_truce = root + has_religion = root.faith.religious_head.religion + } +} + +fp3_yearly.8010 = { + type = character_event + title = fp3_yearly.8010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root.faith.religious_head = { has_religion = religion:islam_religion } + } + desc = fp3_yearly.8010.desc_muslim + } + desc = fp3_yearly.8010.desc_not_muslim + } + } + theme = war + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:righteous_caliph + animation = personality_dishonorable + } + + lower_left_portrait = { character = scope:pagan_ruler } + + trigger = { + has_fp3_dlc_trigger = yes + + faith.religious_head != root + + exists = root.faith.religious_head + + root.faith.religious_head = { + is_available_healthy_ai_adult = yes + fp3_yearly.8009_root_and_hof_faith_comparison_trigger = yes # sanity check + NOR = { + has_trait = content + has_trait = forgiving + has_trait = compassionate + has_trait = just + } + faith = { + NOR = { + has_doctrine_parameter = unreformed + has_doctrine = doctrine_pluralism_pluralistic + has_doctrine_parameter = holy_wars_forbidden # Pacifists cannot Holy War + } + } + } + + root.capital_province = { geographical_region = world_persian_empire } # so that this inside-to-outside worldview makes sense + + is_ruler = yes + + any_held_county = { + any_county_province = { + geographical_region = dlc_fp3_eastern_persian_frontier_regions # so that you have a suitable frontier region + } + } + + any_character_to_title_neighboring_county = { + holder = { + fp3_yearly.8010_super_evil_pagan_heretic_neighboring_ruler_trigger = yes + } + } + } + + cooldown = { years = 50 } + + immediate = { + root.faith.religious_head = { save_scope_as = righteous_caliph } + + random_character_to_title_neighboring_county = { + limit = { holder = { fp3_yearly.8010_super_evil_pagan_heretic_neighboring_ruler_trigger = yes } } + save_scope_as = pagan_county + } + + scope:pagan_county.holder = { save_scope_as = pagan_ruler } + } + + option = { # So be it! + name = fp3_yearly.8010.a + + add_piety = medium_piety_gain + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = 30 + modifier = pleased_opinion + } + } + + scope:pagan_ruler = { + add_opinion = { + target = root + modifier = warmonger_opinion + } + } + + add_unpressed_claim = scope:pagan_county + custom_tooltip = fp3_yearly.8010_warmonger.tt + + spawn_army = { + men_at_arms = { + type = mubarizun + stacks = 1 + } + men_at_arms = { + type = horse_archers + stacks = 1 + } + levies = 300 + location = root.capital_province + war_keep_on_attacker_victory = yes + save_scope_as = new_army + name = ghazi_event_troops + } + + hidden_effect = { #this sets up the "Five year deadline" + trigger_event = { + id = fp3_yearly.8011 + years = 5 + } + } + + stress_impact = { + brave = medium_stress_impact_loss + wrathful = minor_stress_impact_loss + zealous = minor_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + content = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + craven = major_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { #zealous and bold AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + ai_compassion = -0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Give me funds instead of troops, and I'll see what I can do + name = fp3_yearly.8010.b + + trigger = { + OR = { + stewardship >= high_skill_rating + has_stewardship_lifestyle_trait_trigger = yes + } + } + + add_piety = minor_piety_gain + + add_treasury_or_gold = medium_treasury_or_gold_value + + add_unpressed_claim = scope:pagan_county + custom_tooltip = fp3_yearly.8010_warmonger.tt + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = -10 + modifier = annoyed_opinion + } + } + + scope:pagan_ruler = { + add_opinion = { + target = root + modifier = warmonger_opinion + } + } + + hidden_effect = { #this sets up the "Five year deadline" + trigger_event = { + id = fp3_yearly.8011 + years = 5 + } + } + + stress_impact = { + brave = minor_stress_impact_loss + greedy = minor_stress_impact_loss + content = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + craven = major_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { #greedy AI prefer this option + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_greed = 1 + ai_compassion = -0.5 + ai_rationality = -0.5 + } + } + } + + option = { # Surely, my lord, this is not the right time for war? + name = fp3_yearly.8010.c + + duel = { + skill = diplomacy + value = high_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + root = { + send_interface_toast = { + title = convincing_the_caliph_toast.success + left_icon = scope:righteous_caliph + + custom_tooltip = fp3_caliph_convinced.tt + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = 30 + modifier = fp3_convincing_argument_opinion + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = convincing_the_caliph_toast.failure + left_icon = scope:righteous_caliph + + custom_tooltip = fp3_caliph_unconvinced.tt + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + add_character_modifier = { + modifier = fp3_refused_the_caliph_modifier + years = 10 + } + } + } + } + } + + scope:pagan_ruler = { + add_opinion = { + target = root + opinion = 10 + modifier = relieved_opinion + } + } + + stress_impact = { + compassionate = major_stress_impact_loss + craven = minor_stress_impact_loss + patient = minor_stress_impact_loss + ambitious = minor_stress_impact_gain + brave = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + + ai_chance = { #compassionate, energetic AI prefer this option + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_energy = 0.5 + ai_zeal = -0.8 + ai_boldness = -0.3 + } + } + } + + option = { # No thanks + name = fp3_yearly.8010.d + + add_character_modifier = { + modifier = fp3_refused_the_caliph_modifier + years = 10 + } + + scope:righteous_caliph = { + add_opinion = { + target = root + opinion = -30 + modifier = angry_opinion + } + } + + scope:pagan_ruler = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + + stress_impact = { + content = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + cynical = minor_stress_impact_loss + brave = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + + ai_chance = { #benevolent and tolerant AI prefer this option + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = 0.7 + ai_vengefulness = -0.5 + ai_zeal = -1 + } + } + } +} + +fp3_yearly.8011 = { #this sets up the HoF's response to your actions + hidden = yes + + immediate = { + if = { # Caliph dies + limit = { + OR = { + NOT = { exists = scope:righteous_caliph } + scope:righteous_caliph = { is_alive = no } + } + } + send_interface_message = { + type = event_martial_bad_with_text + title = fp3_caliph_dead.title + desc = fp3_caliph_dead.desc + } + } + else_if = { # You capture the region + limit = { scope:pagan_county.holder.top_liege = root.top_liege } + trigger_event = fp3_yearly.8012 + } + else = { trigger_event = fp3_yearly.8013 } # You fail + } +} + +fp3_yearly.8012 = { # Promise Fulfilled (follow-up-event) + type = character_event + title = fp3_yearly.8012.t + desc = fp3_yearly.8012.desc + theme = war + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = personality_content + } + right_portrait = { + character = scope:righteous_caliph + animation = happiness + } + + option = { + name = fp3_yearly.8012.a + + add_piety = minor_piety_gain + + hidden_effect = { + random = { + chance = 10 + send_interface_toast = { + left_icon = scope:righteous_caliph + right_icon = root + title = become_faith_warrior.toast + + if = { + limit = { + NOT = { has_trait = faith_warrior } + } + add_trait = faith_warrior + } + } + } + } + } +} + +fp3_yearly.8013 = { # Caliphal Dissapointment (follow-up-event) + type = character_event + title = fp3_yearly.8013.t + desc = fp3_yearly.8013.desc + theme = war + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:righteous_caliph + animation = anger + } + + option = { + name = fp3_yearly.8013.a + + add_piety = minor_piety_loss + + scope:righteous_caliph = { + add_opinion = { + target = root + modifier = broke_promise + } + } + } + + option = { + name = fp3_yearly.8013.b + + add_piety = medium_piety_loss + add_prestige = minor_prestige_gain + + scope:righteous_caliph = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -40 + } + } + } +} + +################################### +# Secrets of the Teapot, by Ola Jentzsch, idea by Elena Zenko +################################### + +scripted_trigger fp3_opportunistic_drunkard_trigger = { + faith = { trait_is_sin = drunkard } + has_trait = deceitful + OR = { + has_trait = drunkard + has_trait = gregarious + has_trait = gluttonous + has_trait = lifestyle_reveler + } +} + +fp3_yearly.8014 = { + type = character_event + title = fp3_yearly.8014.t + desc = fp3_yearly.8014.desc + theme = faith + + left_portrait = { + character = scope:smart_courtier + animation = happiness + } + + right_portrait = { + character = root + animation = scheme + } + + trigger = { + has_fp3_dlc_trigger = yes + + root.capital_province = { geographical_region = world_persian_empire } + + faith = { trait_is_sin = drunkard } + + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + } + + OR = { + any_spouse = { fp3_opportunistic_drunkard_trigger = yes } + any_courtier_or_guest = { fp3_opportunistic_drunkard_trigger = yes } + any_powerful_vassal = { fp3_opportunistic_drunkard_trigger = yes } + } + } + + cooldown = { years = 10 } + + immediate = { + + if = { + limit = { + any_spouse = { + fp3_opportunistic_drunkard_trigger = yes + } + } + random_spouse = { + limit = { + fp3_opportunistic_drunkard_trigger = yes + } + save_scope_as = smart_courtier + } + } + else_if = { + limit = { + any_powerful_vassal = { fp3_opportunistic_drunkard_trigger = yes + } + } + random_powerful_vassal = { + limit = { + fp3_opportunistic_drunkard_trigger = yes + } + save_scope_as = smart_courtier + } + } + else_if = { + limit = { + any_courtier_or_guest = { fp3_opportunistic_drunkard_trigger = yes + } + } + random_courtier_or_guest = { + limit = { + fp3_opportunistic_drunkard_trigger = yes + } + save_scope_as = smart_courtier + } + } + + hidden_effect = { + scope:smart_courtier = { + add_character_modifier = { + modifier = fp3_teapot_alcoholism_modifier + years = 20 + } + } + } + } + + option = { #Very good idea! + name = fp3_yearly.8014.a + + add_piety = medium_piety_loss + + scope:smart_courtier = { + add_opinion = { + target = root + opinion = 20 + modifier = took_my_advice_opinion + } + } + + add_character_modifier = { + modifier = fp3_teapot_alcoholism_modifier + } + + + ai_chance = { #deceitful or gluttonous goes for this option + base = 10 + ai_value_modifier = { + ai_rationality = 0.8 + ai_greed = 0.5 + ai_honor = -0.5 + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + drunkard = medium_stress_impact_loss + gregarious = minor_stress_impact_loss + gluttonous = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + honest = medium_stress_impact_gain + temperate = minor_stress_impact_gain + zealous = medium_stress_impact_gain + } + } + + option = { #Men I can deceive, but not God + name = fp3_yearly.8014.b + + add_piety = medium_piety_gain + + scope:smart_courtier = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + + ai_chance = { #cautious, honorable, moderately zealous AI goes for this option + base = 10 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = -0.5 + ai_zeal = 0.5 + } + } + + stress_impact = { + just = minor_stress_impact_loss + honest = minor_stress_impact_loss + temperate = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + drunkard = medium_stress_impact_gain + } + } + + option = { #I should not do this, and nor will you. + name = fp3_yearly.8014.c + flavor = f3_yearly.8014_forbidding_teapot_alcohol_flavor + + trigger = { is_ruler = yes } + + add_piety = major_piety_gain + + scope:smart_courtier = { + add_opinion = { + target = root + opinion = -20 + modifier = fp3_killjoy_opinion + } + remove_character_modifier = fp3_teapot_alcoholism_modifier + } + + ai_chance = { #zealous AI goes for this option + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = 0.5 + ai_vengefulness = 0.5 + ai_greed = -1 + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + just = minor_stress_impact_loss + honest = minor_stress_impact_loss + temperate = minor_stress_impact_loss + craven = minor_stress_impact_gain + cynical = minor_stress_impact_gain + shy = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + drunkard = medium_stress_impact_gain + } + } +} + +#########Forgotten Runestones, by Ola Jentzsch###### +scripted_trigger fp3_not_norse_trigger = { + NOR = { + culture = { has_cultural_pillar = heritage_north_germanic } + culture = { has_cultural_tradition = tradition_fp1_northern_stories } + has_religion = religion:germanic_religion + } +} + +scripted_trigger fp3_intolerant_vassal_trigger = { + is_ai = yes + OR = { + has_trait = zealous + has_trait = arrogant + has_trait = wrathful + has_trait = irritable + } + NOR = { + has_trait = cynical + has_trait = forgiving + } +} + +fp3_yearly.8016 = { + type = character_event + title = fp3_yearly.8016.t + desc = fp3_yearly.8016.desc + theme = realm + + override_background = { reference = fp1_runestone } + + left_portrait = { + character = root + animation = personality_cynical + } + + right_portrait = { + character = scope:hyrcanian_vassal + animation = personality_vengeful + } + + trigger = { + + #Standard scope sanity checks + has_fp3_dlc_trigger = yes + + root.capital_province = { + OR = { + geographical_region = world_persian_empire + geographical_region = world_steppe_tarim + } + } + + #This event is a bit unique, so we don't want it to fire more than once in a playthrough + is_ai = no + NOT = { exists = global_var:has_had_runestone_event } + + #The important parts + + #is_available_at_peace_adult = yes #so it makes sense to be in Daylam + + fp3_not_norse_trigger = yes + + any_powerful_vassal = { + any_held_county = { + title_province = { + geographical_region = world_daylam + } + } + fp3_not_norse_trigger = yes + fp3_intolerant_vassal_trigger = yes + } + } + + immediate = { + + set_global_variable = has_had_runestone_event + + random_powerful_vassal = { + limit = { + any_held_county = { + title_province = { + geographical_region = world_daylam + } + } + fp3_not_norse_trigger = yes + fp3_intolerant_vassal_trigger = yes + } + save_scope_as = hyrcanian_vassal + } + + scope:hyrcanian_vassal = { + random_held_county = { + limit = { + title_province = { + geographical_region = world_daylam + } + } + save_scope_as = runestone_county + } + } + + scope:runestone_county = { + add_county_modifier = { + modifier = fp3_forgotten_runestones_county_modifier + years = 200 + } + } + + root.capital_county = { + save_scope_as = new_runestone_county + } + } + + option = { #Very well, let us destroy them. + name = fp3_yearly.8016.a + + + scope:hyrcanian_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + scope:runestone_county = { + remove_county_modifier = fp3_forgotten_runestones_county_modifier + } + + scope:runestone_county = { + add_county_modifier = { + modifier = fp3_dismayed_daylamites_county_modifier + years = 30 + } + } + + hidden_effect = { + if = { + limit = { current_year < 1050 } + random = { + chance = 20 + trigger_event = { + id = fp3_yearly.8017 #easter egg, fans wanted events to build on eachother + years = { 5 15 } + } + } + } + } + + stress_impact = { + irritable = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + zealous = minor_stress_impact_loss + calm = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + } + + option = { #No, you shall leave them be forever. + name = fp3_yearly.8016.b + + scope:hyrcanian_vassal = { + add_opinion = { + target = root + opinion = -20 + modifier = angry_opinion + } + } + + stress_impact = { + cynical = minor_stress_impact_loss + scholar = minor_stress_impact_loss + craven = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + trusting = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } + + option = { #Drag them to my capital + name = fp3_yearly.8016.c + + duel = { + skill = diplomacy + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + send_interface_toast = { + title = convincing_the_hyrcanian_vassal_toast.success + left_icon = scope:hyrcanian_vassal + + custom_tooltip = fp3_hyrcanian_vassal_convinced.tt + scope:hyrcanian_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + send_interface_toast = { + title = convincing_the_hyrcanian_vassal_toast.failure + left_icon = scope:hyrcanian_vassal + + custom_tooltip = fp3_hyrcanian_vassal_unconvinced.tt + scope:hyrcanian_vassal = { + add_opinion = { + target = root + opinion = -20 + modifier = fp3_suspicious_motives_opinion + } + } + } + } + } + } + + scope:runestone_county = { + remove_county_modifier = fp3_forgotten_runestones_county_modifier + } + + scope:runestone_county = { + add_county_modifier = { + modifier = fp3_dismayed_daylamites_county_modifier + years = 30 + } + } + + scope:new_runestone_county = { + add_county_modifier = { + modifier = fp3_forgotten_runestones_county_modifier + years = 200 + } + } + + hidden_effect = { + if = { + limit = { current_year < 1050 } + random = { + chance = 20 + trigger_event = { + id = fp3_yearly.8017 #easter egg, fans wanted events to build on eachother + years = { 5 15 } + } + } + } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + diligent = minor_stress_impact_loss + trusting = minor_stress_impact_gain + zealous = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + } +} + +###Hyrcanian Havoc by Ola Jentzsch (easter egg event, will only trigger rarely) +fp3_yearly.8017 = { + type = character_event + title = fp3_yearly.8017.t + desc = fp3_yearly.8017.desc + theme = battle + override_background = { + reference = burning_building + } + left_portrait = { + character = scope:raider + animation = aggressive_axe + } + right_portrait = { + character = scope:hyrcanian_vassal + animation = fear + triggered_animation = { + trigger = { + ai_vengefulness >= medium_positive_ai_value + ai_boldness > high_negative_ai_value + } + animation = rage + } + } + + trigger = { + + exists = global_var:has_had_runestone_event + + exists = scope:hyrcanian_vassal + + scope:hyrcanian_vassal = { + any_held_county = { this = scope:runestone_county } + } + } + + immediate = { + + create_character = { + template = fp1_jomsviking_bigwig + location = scope:hyrcanian_vassal.capital_province + save_scope_as = raider + } + + + scope:raider = { + add_character_flag = single_combat_duel_armor + } + + scope:hyrcanian_vassal = { + maimed_in_battle_effect = yes + } + + scope:runestone_county = { + random_county_province = { + limit = { is_county_capital = yes } + save_scope_as = runestone_province + } + } + + scope:runestone_province = { + add_province_modifier = { + modifier = recently_looted_modifier + years = 10 + } + } + } + + #Oh no! + option = { + name = fp3_yearly.8017.a + add_prestige = miniscule_prestige_loss + } + + #Send some restitution + option = { + name = fp3_yearly.8017.b + + pay_short_term_gold = { + target = scope:runestone_county.holder + gold = medium_gold_value + } + scope:runestone_county.holder = { + add_opinion = { + target = liege + modifier = grateful_opinion + opinion = 20 + } + } + stress_impact = { greedy = medium_stress_impact_gain } + } + + #This is a bad open...maybe I'd better return those stones... + option = { + name = fp3_yearly.8017.c + + trigger = { + scope:new_runestone_county = { + has_county_modifier = fp3_forgotten_runestones_county_modifier + } + } + + scope:new_runestone_county = { + remove_county_modifier = fp3_forgotten_runestones_county_modifier + } + + scope:runestone_county = { + add_county_modifier = { + modifier = fp3_forgotten_runestones_county_modifier + years = 200 + } + } + + stress_impact = { + craven = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + zealous = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + brave = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + } + + after = { + scope:raider = { + remove_character_flag = single_combat_duel_armor + } + } +} + +###Heavenly Horses by Ola Jentzsch############ +fp3_yearly.8018 = { + type = character_event + title = fp3_yearly.8018.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:horse_enthusiast = { is_eunuch_trigger = yes } + } + desc = fp3_yearly.8018.desc_eunuch + } + desc = fp3_yearly.8018.desc_grand_old_lady + } + } + theme = martial_chivalry_focus + left_portrait = { + character = scope:horse_enthusiast + animation = admiration + triggered_animation = { + trigger = { + ai_sociability >= medium_positive_ai_value + ai_boldness >= medium_positive_ai_value + } + animation = flirtation + } + } + right_portrait = { + character = root + animation = disapproval + } + + override_background = { + reference = wilderness_mountains + } + + trigger = { + + has_fp3_dlc_trigger = yes + + any_owned_story = { type = story_cycle_martial_lifestyle_warhorse } + + any_held_county = { + any_county_province = { + geographical_region = world_transoxiana + } + } + + NOT = { + culture = culture:han + } + + gold < 0 + } + + + immediate = { + + random_list = { + 50 = { + create_character = { + template = fp3_chinese_grand_old_lady + location = root.capital_province + save_scope_as = horse_enthusiast + } + } + 50 = { + create_character = { + template = fp3_chinese_eunuch_envoy + location = root.capital_province + save_scope_as = horse_enthusiast + } + } + } + + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + save_scope_as = warhorse_story + } + } + + + #Sell the horse + option = { + name = fp3_yearly.8018.a + + show_as_tooltip = { + remove_horse_story_modifiers_effect = yes + } + scope:warhorse_story = { + hidden_effect = { end_story = yes } + } + + add_gold = massive_gold_value + + stress_impact = { + ambitious = medium_stress_impact_gain + arrogant = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + temperate = minor_stress_impact_loss + } + + ai_chance = { #pragmatic, desperate AI goes for this option + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = -0.5 + ai_compassion = -0.5 + } + } + } + + #Refuse + option = { + name = fp3_yearly.8018.b + + stress_impact = { + stubborn = minor_stress_impact_loss + content = minor_stress_impact_loss + } + + ai_chance = { #horse-loving AI refuse this + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_boldness = 0.5 + ai_energy = 0.5 + ai_sociability = 0.5 + } + } + } + + #If it's the arrogant lady, insult her + option = { + name = fp3_yearly.8018.c + + trigger = { + scope:horse_enthusiast = { + is_female = yes + } + } + + add_character_modifier = { + modifier = fp3_insulted_chinese_noble_modifier + years = 20 + } + + stress_impact = { + calm = medium_stress_impact_gain + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + arrogant = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + irritable = medium_stress_impact_loss + } + + ai_chance = { #angry AI pick this option + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 0.7 + } + } + } + + after = { + + hidden_effect = { + scope:horse_enthusiast = { + move_to_pool = yes + silent_disappearance_effect = yes + } + } + } +} diff --git a/N3OW/events/dlc/fp3/fp3_yearly_frontier_chains.txt b/N3OW/events/dlc/fp3/fp3_yearly_frontier_chains.txt new file mode 100644 index 00000000..a902d3cd --- /dev/null +++ b/N3OW/events/dlc/fp3/fp3_yearly_frontier_chains.txt @@ -0,0 +1,824 @@ +namespace = fp3_yearly + +scripted_trigger not_steppe_nomad_trigger = { + culture = { + NOR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + has_cultural_tradition = tradition_horse_lords + } + } +} + +scripted_trigger suitable_nomad_settling_province_trigger = { + has_holding_type = castle_holding + barony = { + is_under_holy_order_lease = no + #is_capital_barony = no + } +} + + +fp3_yearly.8888 = { #Nomads story cycle + type = character_event + title = fp3_yearly.8888.t + desc = fp3_yearly.8888.desc + theme = vassal + left_portrait = { + character = scope:upset_vassal + animation = anger + } + right_portrait = { + character = root + animation = personality_rational + triggered_animation = { + trigger = { + diplomacy >= decent_skill_rating + } + animation = personality_honorable + } + } + lower_left_portrait = { + character = scope:possibly_capable_marshal + } + lower_right_portrait = { + character = scope:turkic_leader + } + + trigger = { + + #standard checks + has_fp3_dlc_trigger = yes + root.capital_province = { geographical_region = world_persian_empire } + is_available_at_peace_adult = yes + + #event fluff triggers + not_steppe_nomad_trigger = yes + + NOT = { has_character_flag = had_turkic_tribe_story } #since this event starts the story + + exists = cp:councillor_marshal + + cp:councillor_marshal = { + NOT = { has_trait = craven } + is_ai = yes + } + + any_vassal = { + not_steppe_nomad_trigger = yes + is_ai = yes + NOT = { + this = root.cp:councillor_marshal + } + any_held_county = { + any_county_province = { + geographical_region = dlc_fp3_eastern_persian_frontier_regions + NOT = { terrain = steppe } + } + } + } + + any_held_county = { any_county_province = { suitable_nomad_settling_province_trigger = yes } } + } + + cooldown = { years = 50 } + + immediate = { + + random_vassal = { + limit = { + not_steppe_nomad_trigger = yes + is_ai = yes + NOT = { + this = root.cp:councillor_marshal + } + any_held_county = { + any_county_province = { + geographical_region = dlc_fp3_eastern_persian_frontier_regions + NOT = { terrain = steppe } + } + } + } + save_scope_as = upset_vassal + random_held_county = { + limit = { + any_county_province = { + geographical_region = dlc_fp3_eastern_persian_frontier_regions + NOT = { terrain = steppe } + } + } + save_scope_as = nomads_county + } + } + + random_held_county = { + limit = { + any_county_province = { suitable_nomad_settling_province_trigger = yes } + } + save_scope_as = nomads_new_county #for use in the claim the former_master might get + } + + scope:nomads_new_county = { + random_county_province = { + limit = { suitable_nomad_settling_province_trigger = yes } + barony = { save_scope_as = nomads_barony } + } + } + + cp:councillor_marshal = { save_scope_as = possibly_capable_marshal } + + scope:nomads_county = { + add_county_modifier = { + modifier = fp3_nomad_friction_county_modifier + years = 50 + } + } + + create_character = { + location = root.capital_province + template = fp3_turko-mongol_leader + save_scope_as = turkic_leader + } + } + + option = { + name = fp3_yearly.8888.a + + duel = { + skill = diplomacy + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + custom_tooltip = fp3_treating_with_turks.success.tt + trigger_event = { + id = fp3_yearly.8889 + days = { 2 3 } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + + custom_tooltip = fp3_treating_with_turks.failure.tt + send_interface_toast = { + title = fp3_treating_with_turks_toast.failure + left_icon = root + } + } + } + + scope:upset_vassal = { + if = { + limit = { + OR = { #if he's diplomatically minded, he'll appreciate this + has_trait = forgiving + has_trait = trusting + has_trait = compassionate + has_diplomacy_lifestyle_trait_trigger = yes + } + } + add_opinion = { + target = root + opinion = 20 + modifier = respect_opinion + } + } + else = { + add_opinion = { #but otherwise, they're not on board + target = root + opinion = -10 + modifier = fp3_treats_with_barbarians_opinion + } + } + } + + scope:possibly_capable_marshal = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + stress_impact = { + craven = medium_stress_impact_gain + lazy = medium_stress_impact_gain + shy = medium_stress_impact_gain + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_boldness = 1 + ai_compassion = 0.5 + } + } + } + + option = { + name = fp3_yearly.8888.b + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = grateful_opinion + } + } + + scope:possibly_capable_marshal = { + add_opinion = { + target = root + opinion = 10 + modifier = trusted_me_opinion + } + } + + scope:possibly_capable_marshal = { + duel = { + skill = martial + value = average_skill_rating + + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + root = { + custom_tooltip = fp3_fighting_turks.success.tt + trigger_event = { + id = fp3_yearly.8890 + days = { 2 3 } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + root = { + custom_tooltip = fp3_fighting_turks.failure.tt + send_interface_toast = { + title = fp3_fighting_turks_toast.failure + left_icon = scope:possibly_capable_marshal + } + } + } + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { #Ignore the issue + name = fp3_yearly.8888.c + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = -20 + modifier = angry_opinion + } + } + + scope:possibly_capable_marshal = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +fp3_yearly.8889 = { #Nomads story cycle + type = character_event + title = fp3_yearly.8889.t + desc = fp3_yearly.8889.desc + theme = vassal + left_portrait = { + character = scope:turkic_leader + animation = disapproval + } + right_portrait = { + character = root + animation = drink_goblet + triggered_animation = { + trigger = { + diplomacy >= decent_skill_rating + NOR = { + has_trait = callous + has_trait = wrathful + has_trait = vengeful + } + } + animation = personality_compassionate + } + } + lower_left_portrait = { + character = scope:upset_vassal + } + + override_background = { reference = wilderness } + + trigger = { + + #standard checks + is_available_adult = yes + + #event not breaking sanity triggers + exists = scope:upset_vassal + scope:upset_vassal = { is_alive = yes } + + exists = scope:turkic_leader + scope:turkic_leader = { is_alive = yes } + + exists = scope:nomads_county + + exists = scope:nomads_new_county + } + + option = { + name = fp3_yearly.8889.a + + + if = { + limit = { + scope:upset_vassal = { + NOT = { + has_relation_rival = root + has_relation_nemesis = root + } + } + } + root = { + progress_towards_rival_effect = { + CHARACTER = scope:upset_vassal + REASON = rival_let_hostile_nomads_roam_free + OPINION = -20 + } + } + } + else = { + scope:upset_vassal = { + add_opinion = { + target = root + opinion = -40 + modifier = hate_opinion + } + } + } + + add_courtier = scope:turkic_leader + + spawn_army = { + men_at_arms = { + type = horse_archers + stacks = 1 + } + location = root.capital_province + war_keep_on_attacker_victory = yes + uses_supply = yes + inheritable = no + save_scope_as = horsemen_army + name = turkic_tribal_event_troops + } + + #This is needed to make the story cycle able to pick up the scopes + set_variable = { + name = turkic_leader + value = scope:turkic_leader + } + set_variable = { + name = upset_vassal + value = scope:upset_vassal + } + set_variable = { + name = nomads_county + value = scope:nomads_county + } + set_variable = { + name = nomads_new_county + value = scope:nomads_new_county + } + + create_story = turkic_tribe_story + + stress_impact = { + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.4 + ai_boldness = 0.7 + ai_vengefulness = 0.3 + } + } + } + + option = { + name = fp3_yearly.8889.b + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = -10 + modifier = disappointed_opinion + } + } + + add_courtier = scope:turkic_leader + + spawn_army = { + men_at_arms = { + type = horse_archers + stacks = 1 + } + location = root.capital_province + war_keep_on_attacker_victory = yes + uses_supply = yes + inheritable = no + save_scope_as = horsemen_army + name = turkic_tribal_event_troops + } + + #This is needed to make the story cycle able to pick up the scopes + set_variable = { + name = turkic_leader + value = scope:turkic_leader + } + set_variable = { + name = upset_vassal + value = scope:upset_vassal + } + set_variable = { + name = nomads_county + value = scope:nomads_county + } + set_variable = { + name = nomads_new_county + value = scope:nomads_new_county + } + + create_story = turkic_tribe_story + + scope:nomads_county = { + remove_county_modifier = fp3_nomad_friction_county_modifier + } + + scope:nomads_new_county = { + add_county_modifier = { + modifier = fp3_nomad_friction_county_modifier + years = 30 + } + } + + stress_impact = { + generous = medium_stress_impact_loss + content = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.6 + ai_boldness = 1 + ai_compassion = 0.2 + } + } + } + + option = { #no deal + name = fp3_yearly.8889.c + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + stress_impact = { + ambitious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_vengefulness = 0.5 + } + } + } +} + + + + +fp3_yearly.8890 = { #Nomads story cycle + type = character_event + title = fp3_yearly.8890.t + desc = { + desc = fp3_yearly.8890.desc_beginning + first_valid = { + triggered_desc = { + trigger = { + scope:upset_vassal = { + AND = { + ai_compassion < medium_positive_ai_value + ai_vengefulness > medium_positive_ai_value + } + } + } + desc = fp3_yearly.8890_brutal_demands + } + desc = fp3_yearly.8890_nonbrutal_demands + } + desc = fp3_yearly.8890.desc_ending + } + + + theme = vassal + left_portrait = { + character = scope:turkic_leader + animation = prisonhouse + } + right_portrait = { + character = root + animation = personality_rational + triggered_animation = { + trigger = { + diplomacy < high_skill_rating + NOR = { + has_trait = compassionate + has_trait = forgiving + has_trait = just + } + } + animation = personality_callous + } + } + lower_left_portrait = { + character = scope:upset_vassal + } + + lower_right_portrait = { + character = scope:possibly_capable_marshal + } + + trigger = { + + #standard checks + is_available_adult = yes + + #event not breaking sanity triggers + exists = scope:upset_vassal + scope:upset_vassal = { is_alive = yes } + + exists = scope:turkic_leader + scope:turkic_leader = { is_alive = yes } + + exists = scope:nomads_county + + exists = scope:nomads_new_county + } + + option = { + name = fp3_yearly.8890.a + + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = -15 + modifier = fp3_suspicious_motives_opinion + } + } + + add_courtier = scope:turkic_leader + + add_hook = { + type = indebted_hook + target = scope:turkic_leader + } + + spawn_army = { + men_at_arms = { + type = horse_archers + stacks = 1 + } + location = root.capital_province + war_keep_on_attacker_victory = yes + uses_supply = yes + inheritable = no + save_scope_as = horsemen_army + name = turkic_tribal_event_troops + } + + #This is needed to make the story cycle able to pick up the scopes + set_variable = { + name = turkic_leader + value = scope:turkic_leader + } + set_variable = { + name = upset_vassal + value = scope:upset_vassal + } + set_variable = { + name = nomads_county + value = scope:nomads_county + } + set_variable = { + name = nomads_new_county + value = scope:nomads_new_county + } + + create_story = turkic_tribe_story + + scope:nomads_county = { + remove_county_modifier = fp3_nomad_friction_county_modifier + } + + scope:nomads_new_county = { + add_county_modifier = { + modifier = fp3_nomad_friction_county_modifier + years = 30 + } + } + + stress_impact = { + content = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = 0.5 + } + } + } + + option = { #execute the nomad leader + name = fp3_yearly.8890.b + + add_dread = medium_dread_gain + + scope:upset_vassal = { + if = { + limit = { + AND = { #if they're cruel, he'll enjoy this + ai_compassion < 0 + ai_vengefulness > medium_positive_ai_value + } + } + add_opinion = { + target = root + opinion = 30 + modifier = fp3_very_very_pleased_opinion + } + } + else = { + add_opinion = { #but otherwise, they're not on board + target = root + opinion = -10 + modifier = fp3_went_too_far_opinion + } + } + } + + + scope:turkic_leader = { + death = { + death_reason = death_execution + killer = root + } + } + + random_list = { + 50 = { + send_interface_toast = { + title = nomad_friction_gone.tt + left_icon = root + + scope:nomads_county = { remove_county_modifier = fp3_nomad_friction_county_modifier } + } + } + 50 = { + send_interface_toast = { + title = nomad_friction_active.tt + left_icon = root + + scope:nomads_county = { + add_county_modifier = { + modifier = fp3_vengeful_nomads_county_modifier + years = 10 + } + } + } + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + arbitrary = medium_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_compassion = -1 + } + } + } + + option = { + name = fp3_yearly.8890.c + + add_dread = minor_dread_gain + + scope:turkic_leader = { + hard_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + scope:upset_vassal = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + + random = { + chance = 75 + send_interface_toast = { + title = nomad_friction_gone.tt + left_icon = root + + scope:nomads_county = { remove_county_modifier = fp3_nomad_friction_county_modifier } + } + } + + + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + arbitrary = minor_stress_impact_loss + cynical = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_rationality = 1 + ai_compassion = -0.5 + } + } + } +} diff --git a/N3OW/events/dlc/mpo/court_astrologer_events.txt b/N3OW/events/dlc/mpo/court_astrologer_events.txt new file mode 100644 index 00000000..9b2b2d15 --- /dev/null +++ b/N3OW/events/dlc/mpo/court_astrologer_events.txt @@ -0,0 +1,307 @@ +namespace = court_astrologer_events + +#Triggered by the "Consult the Skies" decision +court_astrologer_events.0001 = { + type = character_event + title = court_astrologer_events.0001.t + desc = court_astrologer_events.0001.desc + theme = faith + override_effect_2d = { + reference = legend_glow + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = beg + } + triggered_animation = { + trigger = { + OR = { + has_trait = craven + has_trait = paranoid + } + } + animation = worry + } + triggered_animation = { + trigger = { + OR = { + has_trait = cynical + has_trait = arrogant + } + } + animation = boredom + } + animation = prayer + } + right_portrait = { + character = scope:astrologer + animation = holding_staff + } + + immediate = { + random_courtier = { + limit = { has_court_position = court_astrologer_court_position } + save_scope_as = astrologer + } + } + + option = { # Tell me about my love life + name = court_astrologer_events.0001.a + random_list = { + 50 = { + desc = court_astrologer_events.0001.a.success + send_interface_toast = { + title = court_astrologer_events.0001.a.success + left_icon = root + custom_tooltip = court_astrologer_events.0001.a.success.tt + if = { + limit = { + culture ?= { has_cultural_pillar = ethos_spiritual } + } + add_character_modifier = { + modifier = mpo_divination_love_spiritual_modifier + years = 5 + } + } + else = { + add_character_modifier = { + modifier = mpo_divination_love_modifier + years = 5 + } + } + } + } + 50 = { + desc = court_astrologer_events.0001.a.failure + send_interface_toast = { + title = court_astrologer_events.0001.a.failure + left_icon = root + add_stress = minor_stress_loss + } + } + } + stress_impact = { + paranoid = miniscule_stress_impact_gain + cynical = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Tell me about war + name = court_astrologer_events.0001.b + random_list = { + 50 = { + desc = court_astrologer_events.0001.b.success + send_interface_toast = { + title = court_astrologer_events.0001.b.success + left_icon = root + if = { + limit = { + culture ?= { has_cultural_pillar = ethos_spiritual } + } + add_character_modifier = { + modifier = mpo_divination_war_spiritual_modifier + years = 5 + } + } + else = { + add_character_modifier = { + modifier = mpo_divination_war_modifier + years = 5 + } + } + } + } + 50 = { + desc = court_astrologer_events.0001.a.failure + send_interface_toast = { + title = court_astrologer_events.0001.a.failure + left_icon = root + add_stress = minor_stress_loss + } + } + } + stress_impact = { + paranoid = miniscule_stress_impact_gain + cynical = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Just tell me about life + name = court_astrologer_events.0001.c + random_list = { + 50 = { + desc = court_astrologer_events.0001.c.success + send_interface_toast = { + title = court_astrologer_events.0001.c.success + left_icon = root + if = { + limit = { + culture ?= { has_cultural_pillar = ethos_spiritual } + } + add_character_modifier = { + modifier = mpo_divination_life_spiritual_modifier + years = 5 + } + } + else = { + add_character_modifier = { + modifier = mpo_divination_life_modifier + years = 5 + } + } + } + } + 50 = { + desc = court_astrologer_events.0001.a.failure + send_interface_toast = { + title = court_astrologer_events.0001.a.failure + left_icon = root + add_stress = minor_stress_loss + } + } + } + stress_impact = { + paranoid = miniscule_stress_impact_gain + cynical = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Actually, not right now + name = court_astrologer_events.0001.d + remove_decision_cooldown = mpo_divination_decision + ai_chance = { + base = 0 + } + } +} + +# Migration Suggestion +scripted_trigger court_astrologer_events_0002_neighbour_trigger = { + government_has_flag = government_is_nomadic + current_domain_fertility >= root.current_domain_fertility + is_independent_ruler = yes +} + +court_astrologer_events.0002 = { + type = character_event + title = court_astrologer_events.0002.t + desc = { + desc = court_astrologer_events.0002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + location.county.county_fertility <= bad_county_fertility_level + } + desc = court_astrologer_events.0002.desc.bad + } + desc = court_astrologer_events.0002.desc.meh + } + desc = court_astrologer_events.0002.desc.outro + } + theme = nomads + override_background = { reference = mpo_steppe_evening } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:astrologer + animation = holding_staff + } + lower_center_portrait = scope:target_realm_owner + cooldown = { years = 5 } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available = yes + employs_court_position = court_astrologer_court_position + court_position:court_astrologer_court_position = { is_available = yes } + any_neighboring_realm_same_rank_owner = { + court_astrologer_events_0002_neighbour_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + current_domain_fertility <= bad_county_fertility_level + factor = 2 + } + } + + immediate = { + court_position:court_astrologer_court_position = { + save_scope_as = astrologer + get_quirk_character_effect = yes + } + ordered_neighboring_realm_same_rank_owner = { + limit = { + court_astrologer_events_0002_neighbour_trigger = yes + } + order_by = current_domain_fertility + save_scope_as = target_realm_owner + primary_title = { save_scope_as = target_realm } + } + } + + option = { # Sounds like a great idea + name = court_astrologer_events.0002.a + custom_tooltip = court_astrologer_events.0002.a.tt + set_variable = { + name = astrologer_desired_area + value = scope:target_realm + years = 5 + } + stress_impact = { + paranoid = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Thank you for your feedback + name = court_astrologer_events.0002.b + scope:astrologer = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # I'm good + name = court_astrologer_events.0002.c + add_prestige = minor_prestige_gain + stress_impact = { + paranoid = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_events_anna.txt b/N3OW/events/dlc/mpo/mpo_events_anna.txt new file mode 100644 index 00000000..d261835a --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_events_anna.txt @@ -0,0 +1,988 @@ +namespace = mpo_events_anna +################################################## +# Anna's Events for MPO + +#Train Them Young - teach a child how to ride a horse +mpo_events_anna.0001 = { + type = character_event + title = mpo_events_anna.0001.t + desc = mpo_events_anna.0001.desc + theme = nomads + left_portrait = { + character = scope:pushy_adult + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:child + animation = clutching_ball + } + cooldown = { years = 20 } + + trigger = { + has_mpo_dlc_trigger = yes + is_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + any_child = { + is_available_child = yes + location = root.location + age >= 5 + } + any_courtier = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + random_child = { + limit = { + is_available_child = yes + location = root.location + age >= 5 + } + save_scope_as = child + } + + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = pushy_adult + } + } + + #Put the child on the horse + option = { + name = mpo_events_anna.0001.a + flavor = mpo_events_anna.0001.a.tt + random_list = { + 70 = { + desc = mpo_events_anna.0001.a.toast.good + send_interface_toast = { + type = event_toast_effect_good + title = mpo_events_anna.0001.a.toast.good + left_icon = scope:child + right_icon = root + scope:child = { add_learning_lifestyle_xp = medium_lifestyle_experience } + } + } + 20 = { + desc = mpo_events_anna.0001.a.toast.neutral + send_interface_toast = { + type = event_toast_effect_neutral + title = mpo_events_anna.0001.a.toast.neutral + left_icon = scope:child + right_icon = root + scope:child = { add_stress = miniscule_stress_gain } + } + } + 10 = { + desc = mpo_events_anna.0001.a.toast.bad + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_events_anna.0001.a.toast.bad + left_icon = scope:child + right_icon = root + scope:child = { increase_wounds_effect = { REASON = fall } + } + } + } + } + + reverse_add_opinion = { + target = scope:pushy_adult + modifier = respect_opinion + opinion = 10 + } + + stress_impact = { + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + } + } + + #Ride together with the child on the horse + option = { + name = mpo_events_anna.0001.b + + reverse_add_opinion = { + target = scope:child + modifier = kindness_opinion + opinion = 20 + } + + add_prestige = minor_prestige_loss + + stress_impact = { + callous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = 1 + } + } + } + + #Refuse their request + option = { + name = mpo_events_anna.0001.c + + reverse_add_opinion = { + target = scope:pushy_adult + modifier = disrespect_opinion + opinion = -10 + } + + stress_impact = { + craven = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + brave = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_boldness = -1 + } + } + } +} + +#Stories from the Past - choose a story to be told +mpo_events_anna.0005 = { + type = character_event + title = mpo_events_anna.0005.t + desc = mpo_events_anna.0005.desc + theme = nomads + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:storyteller + animation = storyteller + } + override_background = mpo_campfire_steppe + + cooldown = { years = 20 } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_child = yes + age >= 5 + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + any_courtier = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = storyteller + } + } + + #Fantastical creatures + option = { + name = mpo_events_anna.0005.a + flavor = mpo_events_anna.0005.a.tt + + add_character_modifier = { + modifier = mpo_storyteller_fantastical_creatures_modifier + years = 5 + } + + stress_impact = { + eccentric = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_energy = 1 + } + } + } + + #Humorous tales + option = { + name = mpo_events_anna.0005.b + flavor = mpo_events_anna.0005.b.tt + + add_character_modifier = { + modifier = mpo_storyteller_humorous_tales_modifier + years = 5 + } + + add_stress = minor_stress_loss + + stress_impact = { + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + #Heroic triumphs + option = { + name = mpo_events_anna.0005.c + flavor = mpo_events_anna.0005.c.tt + + add_character_modifier = { + modifier = mpo_storyteller_heroic_triumphs_modifier + years = 5 + } + + stress_impact = { + wrathful = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_boldness = 1 + } + } + } +} + +#Whistle Like an Arrow - being taught how to whistle as a child +mpo_events_anna.0010 = { + type = character_event + title = mpo_events_anna.0010.t + desc = mpo_events_anna.0010.desc + theme = nomads + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:whistler + animation = storyteller + } + + cooldown = { years = 10 } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_child = yes + age >= 5 + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + OR = { + any_relation = { + type = guardian + location = root.location + is_available = yes + } + any_parent = { + location = root.location + is_available = yes + } + } + } + + immediate = { + if = { + limit = { + any_relation = { + type = guardian + location = root.location + is_available = yes + } + } + random_relation = { + type = guardian + limit = { + location = root.location + is_available = yes + } + save_scope_as = whistler + } + } + else_if = { + limit = { + any_parent = { + location = root.location + is_available = yes + } + } + random_parent = { + limit = { + location = root.location + is_available = yes + } + save_scope_as = whistler + } + } + } + + option = { + name = mpo_events_anna.0010.a + custom_tooltip = mpo_events_anna.0010.a.tt.learning + duel = { + skill = learning + value = mediocre_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + #This takes the whistlers learning skill into account, using their skills to teach the child of how to whistle + multiplier = { add = scope:whistler.learning multiply = 0.5 } + min = -39 + } + desc = mpo_events_anna.0010.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = mpo_events_anna.0010.a.tt.success + left_icon = root + right_icon = scope:whistler + add_learning_lifestyle_xp = medium_lifestyle_experience + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = { add = scope:whistler.learning multiply = -0.5 } + min = -39 + } + desc = mpo_events_anna.0010.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_events_anna.0010.a.tt.failure + left_icon = root + right_icon = scope:whistler + add_character_modifier = { + modifier = mpo_whistling_is_difficult_modifier + years = 5 + } + } + } + } + + stress_impact = { + pensive = minor_stress_impact_loss + bossy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_sociability = 1 + } + } + } + + option = { + name = mpo_events_anna.0010.b + + add_prestige = miniscule_prestige_gain + + reverse_add_opinion = { + target = scope:whistler + modifier = disappointed_opinion + opinion = -5 + } + + stress_impact = { + bossy = minor_stress_impact_loss + pensive = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_sociability = -1 + } + } + } +} + +#A Morsel of Meat - choose the fate of a fawn stuck in a trap +mpo_events_anna.0015 = { + type = character_event + title = mpo_events_anna.0015.t + desc = mpo_events_anna.0015.desc + theme = travel + left_portrait = { + character = root + animation = personality_dishonorable + } + right_portrait = { + character = scope:sceptic + animation = personality_cynical + } + + cooldown = { years = 10 } + + trigger = { + has_mpo_dlc_trigger = yes + is_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_landless_adventurer + NOT = { + culture = { has_cultural_tradition = tradition_vegetarianism } + } + is_available_travelling = yes + domicile = { + provisions <= medium_provisions_value + } + current_travel_plan = { + any_entourage_character = { + is_available_allow_travelling = yes + } + } + } + + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + is_available_allow_travelling = yes + } + save_scope_as = sceptic + } + } + } + + #Steal the prey, kill it for provisions + option = { + name = mpo_events_anna.0015.a + + domicile = { + change_provisions = minor_provisions_gain + } + + add_prestige = minor_prestige_loss + + stress_impact = { + humble = minor_stress_impact_gain + arrogant = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + } + } + } + + #Convince the entourage that it is your trap you laid out + option = { + name = mpo_events_anna.0015.b + + duel = { + skill = intrigue + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + domicile = { + change_provisions = minor_provisions_gain + } + add_character_modifier = { + modifier = mpo_sufficient_liar_modifier + years = 5 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + add_prestige = minor_prestige_loss + add_stress = medium_stress_gain + } + } + + stress_impact = { + honest = minor_stress_impact_gain + deceitful = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_greed = 1 + ai_boldness = 1 + } + } + } + + #Release the animal + option = { + name = mpo_events_anna.0015.c + + add_character_modifier = { + modifier = mpo_trapped_fawn_modifier + years = 5 + } + + add_prestige = miniscule_prestige_loss + + stress_impact = { + callous = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_rationality = 1 + } + } + } + + #It isn't your trap, leave it be + option = { + name = mpo_events_anna.0015.d + + add_prestige = miniscule_prestige_gain + + stress_impact = { + arbitrary = minor_stress_impact_gain + just = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + } + } + } +} + +#Race Against Time - encounter a wounded messenger +mpo_events_anna.0020 = { + type = character_event + title = mpo_events_anna.0020.t + desc = mpo_events_anna.0020.desc + theme = travel + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:messenger + animation = loss_1 + } + + cooldown = { years = 20 } + + trigger = { + has_mpo_dlc_trigger = yes + is_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + is_independent_ruler = no + is_available_travelling = yes + } + + immediate = { + create_character = { + template = wounded_messenger_character_template + location = root.location + culture = this.culture + faith = this.faith + save_scope_as = messenger + + after_creation = { + scope:messenger = { + increase_wounds_effect = { REASON = battle } + } + } + } + + #This is to make sure that the Trait Wounded is being cured by the root (player) in option A + save_scope_as = physician + } + + #Treat the messengers wounds + option = { + name = mpo_events_anna.0020.a + + current_travel_plan = { + delay_travel_plan = { days = 14 } + } + + custom_tooltip = mpo_events_anna.0020.war_impact.tt + + hidden_effect = { + liege = { + add_character_modifier = { + modifier = mpo_messenger_negative_liege_modifier + years = 10 + } + } + } + + duel = { + skill = learning + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + add = 10 + } + modifier = { + root = { + has_trait = lifestyle_herbalist + } + add = 10 + } + + send_interface_toast = { + type = event_toast_effect_good + title = mpo_events_anna.0020.a.toast.good + left_icon = scope:messenger + right_icon = root + scope:messenger = { + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + } + current_travel_plan = { add_companion = scope:messenger } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:messenger + opinion = 10 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_events_anna.0020.a.toast.bad + left_icon = scope:messenger + right_icon = root + } + scope:messenger = { + death = { + death_reason = death_wounds + } + } + } + } + + stress_impact = { + cynical = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + + #Deliver the message + option = { + name = mpo_events_anna.0020.b + + current_travel_plan = { + delay_travel_plan = { days = 21 } + } + + scope:messenger = { + death = { + death_reason = death_wounds + } + } + + custom_tooltip = mpo_events_anna.0020.war_impact.tt + + duel = { + skill = prowess + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + any_owned_story = { + story_type = story_cycle_martial_lifestyle_warhorse + } + add = 10 + } + + send_interface_toast = { + type = event_toast_effect_good + title = mpo_events_anna.0020.b.toast.good + left_icon = root + + add_hook = { + target = liege + type = favor_hook + } + } + + hidden_effect = { + liege = { + add_character_modifier = { + modifier = mpo_messenger_positive_liege_modifier + years = 10 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_events_anna.0020.b.toast.bad + left_icon = root + hidden_effect = { + liege = { + add_character_modifier = { + modifier = mpo_messenger_negative_liege_modifier + years = 10 + } + } + } + } + } + } + + stress_impact = { + brave = minor_stress_impact_loss + diligent = minor_stress_impact_loss + craven = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + + #How can they be trusted? + option = { + name = mpo_events_anna.0020.c + + flavor = mpo_events_anna.0020.c_flavor + + hidden_effect = { + liege = { + add_character_modifier = { + modifier = mpo_messenger_negative_liege_modifier + years = 10 + } + } + } + + add_gold = { 5 15 } + + scope:messenger = { + death = { + death_reason = death_wounds + } + } + + custom_tooltip = mpo_events_anna.0020.war_impact.tt + + current_travel_plan = { + every_entourage_character = { + limit = { + has_trait = trusting + } + add_opinion = { + modifier = cruelty_opinion + target = root + opinion = -10 + } + } + } + + stress_impact = { + trusting = minor_stress_impact_gain + paranoid = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +#Familiar Tunes - encounter with a performer +mpo_events_anna.0025 = { + type = character_event + title = mpo_events_anna.0025.t + desc = mpo_events_anna.0025.desc + theme = travel + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:throat_singer + animation = lute_active + } + + cooldown = { years = 10 } + + trigger = { + has_mpo_dlc_trigger = yes + is_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + is_available_travelling = yes + } + + immediate = { + create_character = { + template = throat_singer_character_template + location = root.location + culture = this.culture + faith = this.faith + save_scope_as = throat_singer + } + } + + option = { + name = mpo_events_anna.0025.a + + duel = { + skill = learning + value = low_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_events_anna.0025.a.toast.success + send_interface_toast = { + type = event_toast_effect_good + title = mpo_events_anna.0025.a.toast.success + left_icon = root + right_icon = scope:throat_singer + add_character_modifier = { + modifier = mpo_inspiring_tunes_modifier + years = 5 + } + add_learning_lifestyle_xp = medium_lifestyle_experience + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_events_anna.0025.a.toast.failure + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_events_anna.0025.a.toast.failure + left_icon = root + right_icon = scope:throat_singer + add_prestige = miniscule_prestige_loss + } + } + } + + stress_impact = { + calm = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_energy = 1 + ai_sociability = 1 + } + } + } + + option = { + name = mpo_events_anna.0025.b + + add_stress = medium_stress_loss + + stress_impact = { + calm = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 1 + ai_sociability = 1 + } + } + } + after = { + scope:throat_singer = { + silent_disappearance_ai_effect = yes + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_events_ariana.txt b/N3OW/events/dlc/mpo/mpo_events_ariana.txt new file mode 100644 index 00000000..7d6efb84 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_events_ariana.txt @@ -0,0 +1,4812 @@ +namespace = mpo_events_ariana +################################################## +# Ariana's Events for MPO + +# Nest Sighting - You spot a nest, and decide if you would like to capture the eaglets in it +mpo_events_ariana.0001 = { + type = character_event + title = mpo_events_ariana.0001.t + desc = { + desc = mpo_events_ariana.0001.desc + first_valid = { + triggered_desc = { # Had an eagle before, and doesn't have one now + trigger = { + has_variable = had_eagle_story + NOT = { has_eagle_trigger = yes } + } + desc = mpo_events_ariana.0001.desc_had_story + } + triggered_desc = { # Has one now + trigger = { + has_eagle_trigger = yes + } + desc = mpo_events_ariana.0001.desc_has_eagle + } + desc = mpo_events_ariana.0001.desc_ending + } + } + + theme = nomads + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 10 + current_season_trigger = { SEASON = spring } + } + } + + left_portrait = { + character = root + animation = admiration + } + + trigger = { + has_mpo_dlc_trigger = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + is_available_adult = yes + NOT = { current_season_trigger = { SEASON = winter } } + } + + immediate = { + if = { + limit = { + is_ai = no # So AI don't spam add modifiers + } + if = { + limit = { # Your observant eagle helps you here + location.county = { NOT = { has_county_modifier = hunt_sighting_legendary_modifier } } + has_eagle_trigger = yes + var:eagle_personality_trait_2 ?= flag:observant + } + location.county = { + hunt_create_sighting_effect = { + TYPE = legendary + ANIMAL = flag:deer + OWNER = root + } + } + } + else_if = { + limit = { + location.county = { NOT = { has_county_modifier = hunt_sighting_falconry_modifier } } + } + location.county = { + random_county_province = { + save_scope_as = falconry_province + } + hunt_activity_falconry_game_effect = { PROVINCE = scope:falconry_province } + hunt_create_sighting_effect = { + TYPE = falconry + ANIMAL = var:animal_type + OWNER = root + } + } + } + } + } + + + option = { # Standard capture method + name = mpo_events_ariana.0001.a + duel = { + skill = prowess + value = decent_skill_rating + desc = mpo_events_ariana.0001.a_tt + 70 = { + desc = mpo_events_ariana.0001.a_win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -69 + } + modifier = { + factor = 1.2 + has_trait = lifestyle_hunter + } + save_scope_value_as = { + name = eagle_capture_method + value = flag:standard + } + hidden_effect = { + random = { + chance = 30 # Get both eaglets + add_character_flag = { + flag = mpo_events_ariana.0001.both_eaglets + days = 10 + } + } + } + show_as_tooltip = { + add_prestige = medium_prestige_gain + add_trait_xp = { + trait = lifestyle_hunter + track = falconer + value = 10 + } + } + custom_tooltip = mpo_events_ariana.0001.a_win_desc + trigger_event = { + id = mpo_events_ariana.0002 + } + } + 30 = { + desc = travel_events_mpo.0001_lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + send_interface_toast = { + type = event_toast_effect_bad + title = travel_events_mpo.0001_lose + left_icon = root + add_prestige = minor_prestige_loss + random_list = { + 50 = { + show_chance = no + desc = mpo_events_ariana.0001.a_lose_ok + } + 50 = { + show_chance = no + desc = mpo_events_ariana.0001.a_lose_bad + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + } + + } + } + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_energy = 0.7 + } + modifier = { + has_trait = lifestyle_hunter + add = 5 + } + modifier = { + has_trait = brave + add = 5 + } + modifier = { + has_trait = compassionate + add = 5 + } + } + } + + option = { # Lure the eaglets + name = mpo_events_ariana.0001.b + trigger = { + learning >= 10 + } + show_as_unavailable = { + always = yes + } + save_scope_value_as = { + name = eagle_capture_method + value = flag:lure + } + hidden_effect = { + random_list = { + 50 = { } + 30 = { # Get both eaglets + modifier = { add = learning } + add_character_flag = { + flag = mpo_events_ariana.0001.both_eaglets + days = 10 + } + } + } + } + show_as_tooltip = { + add_prestige = medium_prestige_gain + add_trait_xp = { + trait = lifestyle_hunter + track = falconer + value = 10 + } + } + custom_tooltip = mpo_events_ariana.0001.b_win_desc + + trigger_event = { + id = mpo_events_ariana.0002 + } + + ai_chance = { + base = 15 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + has_trait = shrewd + factor = 1.3 + } + modifier = { + has_trait = lifestyle_hunter + add = 5 + } + modifier = { + has_trait = craven + add = 5 + } + } + } + + option = { # Observe them + name = mpo_events_ariana.0001.c + stress_impact = { + base = minor_stress_impact_loss + } + add_character_modifier = { + modifier = mpo_daydreaming_birds_modifier + years = 5 + } + + ai_chance = { + base = 10 + modifier = { + has_trait = compassionate + add = 5 + } + modifier = { + has_trait = calm + add = 5 + } + modifier = { + has_trait = content + add = 10 + } + } + } +} + +scripted_effect mpo_events_ariana_002_gift_effect = { + save_scope_as = target + root = { + send_interface_toast = { + type = event_toast_effect_good + title = court_ongoing.1030.d.success + left_icon = root + right_icon = scope:target + scope:target = { + save_scope_value_as = { + name = eagle_capture_method + value = flag:gift + } + start_eagle_story_cycle_effect = yes + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + } + } +} + +# Nest Sighting follow up - You've captured the eaglets, now what? +mpo_events_ariana.0002 = { + type = character_event + title = mpo_events_ariana.0001.t + desc = { + desc = mpo_events_ariana.0002.desc_intro + first_valid = { # Describing the capture + triggered_desc = { + trigger = { + scope:eagle_capture_method = flag:standard + } + desc = mpo_events_ariana.0002.desc_standard + } + triggered_desc = { + trigger = { + scope:eagle_capture_method = flag:lure + } + desc = mpo_events_ariana.0002.desc_lure + } + } + first_valid = { # If the result is one or both + triggered_desc = { + trigger = { + scope:eagle_capture_method = flag:standard + has_character_flag = mpo_events_ariana.0001.both_eaglets + } + desc = mpo_events_ariana.0002.desc_both_standard + } + triggered_desc = { + trigger = { + scope:eagle_capture_method = flag:standard + } + desc = mpo_events_ariana.0002.desc_one_standard + } + triggered_desc = { + trigger = { + scope:eagle_capture_method = flag:lure + has_character_flag = mpo_events_ariana.0001.both_eaglets + } + desc = mpo_events_ariana.0002.desc_both_lure + } + triggered_desc = { + trigger = { + scope:eagle_capture_method = flag:lure + } + desc = mpo_events_ariana.0002.desc_one_lure + } + } + } + + theme = nomads + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + trigger = { + exists = scope:eagle_first_recipient + scope:eagle_first_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + character = scope:eagle_first_recipient + animation = admiration + } + + lower_center_portrait = { + trigger = { + exists = scope:eagle_second_recipient + scope:eagle_second_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + character = scope:eagle_second_recipient + } + + trigger = { + has_mpo_dlc_trigger = yes + exists = scope:eagle_capture_method + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + } + + immediate = { + add_prestige = medium_prestige_gain + if = { + limit = { + NOT = { + has_trait = lifestyle_hunter + } + } + add_trait = lifestyle_hunter + } + add_trait_xp = { + trait = lifestyle_hunter + track = falconer + value = 10 + } + + # Looking for possible recipients + # A romantic relation + if = { # Find your main spouse first if you have one + limit = { + exists = primary_spouse + primary_spouse = { + NOT = { has_eagle_trigger = yes } + } + } + primary_spouse = { save_scope_as = eagle_first_recipient } + } + else_if = { # Maybe a concubine instead + limit = { + any_consort = { + NOT = { has_eagle_trigger = yes } + } + } + random_consort = { + limit = { + NOT = { has_eagle_trigger = yes } + } + save_scope_as = eagle_first_recipient + } + } + else_if = { # Maybe a lover + limit = { + any_relation = { + type = lover + NOT = { has_eagle_trigger = yes } + } + } + random_relation = { + type = lover + limit = { + NOT = { has_eagle_trigger = yes } + } + save_scope_as = eagle_first_recipient + } + } + # Do I have a child or ward old enough to care for an eagle? + if = { + limit = { + any_child = { + age >= 13 + is_courtier_of = root + NOT = { has_eagle_trigger = yes } + } + } + random_child = { + limit = { + age >= 13 + is_courtier_of = root + NOT = { has_eagle_trigger = yes } + } + if = { + limit = { + exists = scope:eagle_first_recipient + } + save_scope_as = eagle_second_recipient + } + else = { + save_scope_as = eagle_first_recipient + } + } + } + else_if = { + limit = { + any_relation = { + type = ward + age >= 13 + NOT = { has_eagle_trigger = yes } + } + } + random_relation = { + type = ward + limit = { + age >= 13 + NOT = { has_eagle_trigger = yes } + } + if = { + limit = { + exists = scope:eagle_first_recipient + } + save_scope_as = eagle_second_recipient + } + else = { + save_scope_as = eagle_first_recipient + } + } + } + if = { + limit = { + NOT = { exists = scope:eagle_second_recipient } # If we already have a second recipient by now, we don't need to find another + } + if = { # Maybe a friend + limit = { + any_relation = { + type = friend + age >= 13 + NOT = { has_eagle_trigger = yes } + } + } + random_relation = { + type = friend + limit = { + age >= 13 + NOT = { has_eagle_trigger = yes } + } + if = { + limit = { + exists = scope:eagle_first_recipient + } + save_scope_as = eagle_second_recipient + } + else = { + save_scope_as = eagle_first_recipient + } + } + } + # Or a hunt guy? + if = { + limit = { + exists = court_position:master_of_hunt_court_position + } + court_position:master_of_hunt_court_position = { + if = { + limit = { + exists = scope:eagle_first_recipient + } + save_scope_as = eagle_second_recipient + } + else = { + save_scope_as = eagle_first_recipient + } + } + } + else_if = { + limit = { + exists = court_position:huntperson_camp_officer + } + court_position:huntperson_camp_officer = { + if = { + limit = { + exists = scope:eagle_first_recipient + } + save_scope_as = eagle_second_recipient + } + else = { + save_scope_as = eagle_first_recipient + } + } + } + } + } + + + option = { # Keep the one for yourself + name = mpo_events_ariana.0002.a + trigger = { + NOT = { has_character_flag = mpo_events_ariana.0001.both_eaglets } + NOT = { has_eagle_trigger = yes } # You don't have an eagle + } + start_eagle_story_cycle_effect = yes + + ai_chance = { + base = 200 + } + } + + option = { # Give the one to your first recipient + name = mpo_events_ariana.0002.b + trigger = { + exists = scope:eagle_first_recipient + NOT = { has_character_flag = mpo_events_ariana.0001.both_eaglets } + scope:eagle_first_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + + scope:eagle_first_recipient = { + save_scope_as = target + mpo_events_ariana_002_gift_effect = yes + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { # They already like you + add = 50 + scope:eagle_first_recipient = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:eagle_first_recipient + } + } + modifier = { + add = 25 + any_relation = { + type = friend + this = scope:eagle_first_recipient + } + } + } + } + + option = { # Keep one for yourself, and give the other to your first recipient + name = mpo_events_ariana.0002.b_two + trigger = { + exists = scope:eagle_first_recipient + has_character_flag = mpo_events_ariana.0001.both_eaglets + NOT = { has_eagle_trigger = yes } # You don't have an eagle + scope:eagle_first_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + start_eagle_story_cycle_effect = yes + scope:eagle_first_recipient = { + save_scope_as = target + mpo_events_ariana_002_gift_effect = yes + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { # They already like you + add = 50 + scope:eagle_first_recipient = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:eagle_first_recipient + } + } + modifier = { + add = 25 + any_relation = { + type = friend + this = scope:eagle_first_recipient + } + } + } + } + + option = { # Give the one to your second recipient + name = mpo_events_ariana.0002.c + trigger = { + exists = scope:eagle_second_recipient + NOT = { has_character_flag = mpo_events_ariana.0001.both_eaglets } + scope:eagle_second_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + scope:eagle_second_recipient = { + save_scope_as = target + mpo_events_ariana_002_gift_effect = yes + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { # They already like you + add = 50 + scope:eagle_second_recipient = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:eagle_second_recipient + } + } + modifier = { + add = 25 + any_relation = { + type = friend + this = scope:eagle_second_recipient + } + } + } + } + + option = { # Keep one for yourself, and give the other to your second recipient + name = mpo_events_ariana.0002.c_two + trigger = { + exists = scope:eagle_second_recipient + has_character_flag = mpo_events_ariana.0001.both_eaglets + NOT = { has_eagle_trigger = yes } # You don't have an eagle + scope:eagle_second_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + start_eagle_story_cycle_effect = yes + scope:eagle_second_recipient = { + save_scope_as = target + mpo_events_ariana_002_gift_effect = yes + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + modifier = { # They already like you + add = 50 + scope:eagle_second_recipient = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:eagle_second_recipient + } + } + modifier = { + add = 25 + any_relation = { + type = friend + this = scope:eagle_second_recipient + } + } + } + } + + option = { # Give to each recipient + name = mpo_events_ariana.0002.d + trigger = { + exists = scope:eagle_first_recipient + exists = scope:eagle_second_recipient + has_character_flag = mpo_events_ariana.0001.both_eaglets + scope:eagle_second_recipient = { + NOT = { has_eagle_trigger = yes } + } + scope:eagle_first_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + scope:eagle_first_recipient = { + save_scope_as = target + mpo_events_ariana_002_gift_effect = yes + } + scope:eagle_second_recipient = { + save_scope_as = target + mpo_events_ariana_002_gift_effect = yes + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 2 + ai_honor = 1 + } + modifier = { + add = 50 + scope:eagle_first_recipient = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + modifier = { + add = 50 + scope:eagle_second_recipient = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:eagle_first_recipient + } + } + modifier = { + add = 25 + any_relation = { + type = friend + this = scope:eagle_first_recipient + } + } + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:eagle_second_recipient + } + } + modifier = { + add = 25 + any_relation = { + type = friend + this = scope:eagle_second_recipient + } + } + } + } + + option = { # Keep one, sell one + name = mpo_events_ariana.0002.e + trigger = { + has_character_flag = mpo_events_ariana.0001.both_eaglets + NOT = { has_eagle_trigger = yes } # You don't have an eagle + } + send_interface_toast = { + title = mpo_events_ariana.0002.e_tt + type = event_toast_effect_good + left_icon = root + start_eagle_story_cycle_effect = yes + add_short_term_gold = medium_gold_value + if = { + limit = { + exists = scope:eagle_first_recipient + scope:eagle_first_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + reverse_add_opinion = { + target = scope:eagle_first_recipient + modifier = disappointed_opinion + opinion = -10 + } + } + if = { + limit = { + exists = scope:eagle_second_recipient + scope:eagle_second_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + reverse_add_opinion = { + target = scope:eagle_second_recipient + modifier = disappointed_opinion + opinion = -10 + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + add = 50 + scope:eagle_first_recipient ?= { + opinion = { + target = root + value <= low_positive_opinion + } + } + } + modifier = { + add = 50 + scope:eagle_second_recipient ?= { + opinion = { + target = root + value <= low_positive_opinion + } + } + } + } + } + + option = { # Give one to first recipient, sell one (only if you have one already) + name = mpo_events_ariana.0002.e_sell_first + trigger = { + has_character_flag = mpo_events_ariana.0001.both_eaglets + exists = scope:eagle_first_recipient + has_eagle_trigger = yes + scope:eagle_first_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + scope:eagle_first_recipient = { + save_scope_as = target + mpo_events_ariana_002_gift_effect = yes + } + custom_tooltip = mpo_events_ariana.0002.e_tt + add_short_term_gold = medium_gold_value + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = 0.8 + } + modifier = { + add = 50 + scope:eagle_first_recipient = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:eagle_first_recipient + } + } + modifier = { + add = 25 + any_relation = { + type = friend + this = scope:eagle_first_recipient + } + } + } + } + + option = { # Give one to second recipient, sell one (only if you have one already) + name = mpo_events_ariana.0002.e_sell_second + trigger = { + has_character_flag = mpo_events_ariana.0001.both_eaglets + exists = scope:eagle_second_recipient + has_eagle_trigger = yes + scope:eagle_second_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + scope:eagle_second_recipient = { + save_scope_as = target + mpo_events_ariana_002_gift_effect = yes + } + custom_tooltip = mpo_events_ariana.0002.e_tt + add_short_term_gold = medium_gold_value + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = 0.8 + } + modifier = { + add = 50 + scope:eagle_second_recipient = { + opinion = { + target = root + value >= low_positive_opinion + } + } + } + modifier = { + add = 50 + any_relation = { + type = lover + this = scope:eagle_second_recipient + } + } + modifier = { + add = 25 + any_relation = { + type = friend + this = scope:eagle_second_recipient + } + } + } + } + + option = { # Sell the one (or both) + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = mpo_events_ariana.0001.both_eaglets + } + desc = mpo_events_ariana.0002.f_two + } + desc = mpo_events_ariana.0002.f_one + } + } + } + + + if = { + limit = { + has_character_flag = mpo_events_ariana.0001.both_eaglets + } + send_interface_toast = { + title = mpo_events_ariana.0002.f_tt_two + type = event_toast_effect_good + add_short_term_gold = major_gold_value + if = { + limit = { + exists = scope:eagle_first_recipient + scope:eagle_first_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + reverse_add_opinion = { + target = scope:eagle_first_recipient + modifier = disappointed_opinion + opinion = -15 + } + } + if = { + limit = { + exists = scope:eagle_second_recipient + scope:eagle_second_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + reverse_add_opinion = { + target = scope:eagle_second_recipient + modifier = disappointed_opinion + opinion = -15 + } + } + left_icon = root + } + + } + else = { + send_interface_toast = { + title = mpo_events_ariana.0002.f_tt + type = event_toast_effect_good + add_short_term_gold = medium_gold_value + if = { + limit = { + exists = scope:eagle_first_recipient + scope:eagle_first_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + reverse_add_opinion = { + target = scope:eagle_first_recipient + modifier = disappointed_opinion + opinion = -15 + } + } + if = { + limit = { + exists = scope:eagle_second_recipient + scope:eagle_second_recipient = { + NOT = { has_eagle_trigger = yes } + } + } + reverse_add_opinion = { + target = scope:eagle_second_recipient + modifier = disappointed_opinion + opinion = -15 + } + } + left_icon = root + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + add = 50 + scope:eagle_second_recipient ?= { + opinion = { + target = root + value <= low_positive_opinion + } + } + } + modifier = { + add = 50 + scope:eagle_first_recipient ?= { + opinion = { + target = root + value <= low_positive_opinion + } + } + } + } + } +} + +# The Fire Inside - Your heir wants to convert to a different faith in your realm +mpo_events_ariana.0010 = { + type = character_event + title = mpo_events_ariana.0010.t + + desc = { + desc = mpo_events_ariana.0010.desc + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = mpo_events_ariana.0010.desc_zealous + } + } + + theme = faith + override_background = { reference = throne_room } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = zealous } + animation = disapproval + } + animation = personality_rational + } + + right_portrait = { + character = scope:converting_heir + animation = worry + } + + cooldown = { years = 50 } + + weight_multiplier = { + base = 1 + modifier = { + add = 10 + scope:converting_heir = { has_trait = fickle } + } + } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + exists = scope:converting_heir + scope:converting_heir = { + NOT = { has_trait = zealous } + faith = scope:old_faith + is_available_adult = yes + } + exists = scope:new_faith + } + + immediate = { + player_heir ?= { save_scope_as = converting_heir } + + faith = { save_scope_as = old_faith } + + every_sub_realm_county = { + limit = { + NOR = { + faith = scope:old_faith + faith = scope:converting_heir.faith + } + } + save_scope_as = possible_faith_county + root = { + add_to_variable_list = { + name = possible_faiths + target = scope:possible_faith_county.faith + } + } + } + + # Find a faith to convert to + ordered_in_list = { + variable = possible_faiths + order_by = { + value = 0 + # Do not convert to a Righteous faith + if = { + limit = { + faith_hostility_level = { + target = scope:old_faith + value = faith_fully_accepted_level + } + } + add = -1 + } + else_if = { + limit = { + faith_hostility_level = { + target = scope:old_faith + value = faith_astray_level + } + } + add = 3 + } + else_if = { + limit = { + faith_hostility_level = { + target = scope:old_faith + value = faith_hostile_level + } + } + add = 2 + } + else_if = { + limit = { + faith_hostility_level = { + target = scope:old_faith + value = faith_evil_level + } + } + add = 1 + } + } + save_scope_as = new_faith + } + } + + option = { # Accept the conversion + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = mpo_events_ariana.0010.a_zealous + } + desc = mpo_events_ariana.0010.a + } + } + } + + scope:converting_heir = { + set_character_faith = scope:new_faith + } + + set_character_faith = scope:new_faith + stress_impact = { + zealous = major_stress_impact_gain + eccentric = minor_stress_impact_loss + cynical = minor_stress_impact_loss + stubborn = medium_stress_impact_gain + } + scope:converting_heir = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.1 + ai_zeal = -1.5 + } + modifier = { + factor = 1 + scope:old_faith = { + faith_hostility_level = { + target = scope:new_faith + value >= faith_astray_level + } + } + } + modifier = { + factor = 0.5 + scope:old_faith = { + faith_hostility_level = { + target = scope:new_faith + value = faith_hostile_level + } + } + } + modifier = { + factor = 0.25 + scope:old_faith = { + faith_hostility_level = { + target = scope:new_faith + value = faith_evil_level + } + } + } + } + } + + option = { # Accept it, but secretly continue to practice the old faith + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = mpo_events_ariana.0010.b_zealous + } + desc = mpo_events_ariana.0010.b + } + } + } + + trigger = { + NOT = { any_secret = { secret_type = secret_crypto_religionist } } + untrustworthy_trigger = yes + } + + scope:converting_heir = { + set_character_faith = scope:new_faith + } + + custom_tooltip = mpo_events_ariana.0010.b.tt + + hidden_effect = { + set_character_faith = scope:new_faith + } + show_as_tooltip = { + add_secret = { + type = secret_crypto_religionist + } + } + stress_impact = { + honest = medium_stress_impact_gain + zealous = minor_stress_impact_gain + deceitful = minor_stress_impact_loss + } + scope:converting_heir = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + + hidden_effect = { + make_character_crypto_religionist_effect = { CRYPTO_RELIGION = scope:old_faith } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + ai_honor = -1 + } + } + } + + option = { # Reject the conversion + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = mpo_events_ariana.0010.c_zealous + } + triggered_desc = { + trigger = { + has_trait = cynical + } + desc = mpo_events_ariana.0010.c_cynical + } + desc = mpo_events_ariana.0010.c + } + } + } + + add_piety = medium_piety_gain + + hidden_effect = { + if = { + limit = { + NOT = { has_trait = zealous } + } + add_piety = medium_piety_gain + scope:converting_heir = { + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -25 + } + } + } + else = { + add_piety = medium_piety_gain + scope:converting_heir = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + } + + scope:converting_heir = { + set_character_faith = scope:new_faith + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = 1 + } + } + } + + option = { + name = mpo_events_ariana.0010.d + trigger = { + has_trait = zealous + } + custom_tooltip = mpo_events_ariana.0010.d_tt + duel = { + skill = learning + target = scope:converting_heir + 60 = { + desc = mpo_events_ariana.0010.d_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -59 + } + send_interface_toast = { + title = mpo_events_ariana.0010.d_success + type = event_toast_effect_good + left_icon = root + right_icon = scope:converting_heir + add_piety = major_piety_gain + } + } + 40 = { + desc = mpo_events_ariana.0010.d_failure + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = 39 + } + send_interface_toast = { + title = mpo_events_ariana.0010.d_failure + type = event_toast_effect_bad + left_icon = root + right_icon = scope:converting_heir + scope:converting_heir = { + set_character_faith = scope:new_faith + } + add_stress = minor_stress_gain + } + } + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = 1 + } + modifier = { + factor = 1.5 + highest_skill = learning + } + modifier = { + factor = 0.5 + learning <= scope:converting_heir.learning + } + } + } + + after = { + clear_variable_list = possible_faiths + } +} + +scripted_trigger is_valid_spouse_mpo_events_ariana_0020 = { + probably_superstitious = yes + is_available_adult = yes + culture = root.culture +} + +scripted_trigger is_valid_councillor_mpo_events_ariana_0020 = { + NOT = { culture = root.culture } + culture = { + cultural_acceptance = { target = root.culture value <= 75 } + } +} + +# Untrustworthy - A spouse is suspicious of a councillor that has a different culture +mpo_events_ariana.0020 = { + type = character_event + title = mpo_events_ariana.0020.t + desc = { + desc = mpo_events_ariana.0020.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:sus_councillor = { is_kurultai_trigger = yes } + } + desc = mpo_events_ariana.0020.desc_marshal + } + triggered_desc = { + trigger = { + scope:sus_councillor = { has_council_position = councillor_spymaster } + } + desc = mpo_events_ariana.0020.desc_spymaster + } + } + desc = mpo_events_ariana.0020.desc_end + } + + theme = court + override_background = { reference = study } + + left_portrait = { + character = root + animation = disbelief + } + + right_portrait = { + character = scope:worried_spouse + animation = worry + } + + lower_center_portrait = scope:sus_councillor + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.5 + scope:worried_spouse ?= { has_personality_levelheaded_trigger = yes } + } + } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + any_spouse = { is_valid_spouse_mpo_events_ariana_0020 = yes } + any_councillor = { is_valid_councillor_mpo_events_ariana_0020 = yes } + } + + immediate = { + random_spouse = { + limit = { + is_valid_spouse_mpo_events_ariana_0020 = yes + } + save_scope_as = worried_spouse + } + random_councillor = { + limit = { + is_valid_councillor_mpo_events_ariana_0020 = yes + } + save_scope_as = sus_councillor + } + scope:sus_councillor.culture = { + save_scope_as = councillor_culture + } + } + + option = { # No worries, they'll be gone + name = mpo_events_ariana.0020.a + fire_councillor = scope:sus_councillor + show_as_tooltip = { + scope:sus_councillor = { + add_opinion = { + target = root + modifier = fired_from_council_opinion + opinion = -20 + } + } + } + scope:worried_spouse = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + culture = { + change_cultural_acceptance = { + target = scope:councillor_culture + value = low_negative_culture_acceptance + desc = cultural_acceptance_gain_event + } + } + custom_tooltip = mpo_events_ariana.0020.a_tt + hidden_effect = { + every_vassal = { + limit = { + culture = scope:councillor_culture + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } + + stress_impact = { + honest = minor_stress_impact_gain + paranoid = medium_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_honor = 0.5 + } + modifier = { + factor = 1.5 + has_trait = paranoid + } + opinion_modifier = { opinion_target = scope:worried_spouse multiplier = 1.5 } + opinion_modifier = { opinion_target = scope:sus_councillor multiplier = 0.5 } + } + } + + option = { # I suppose I can be more careful + name = mpo_events_ariana.0020.b + scope:worried_spouse = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + add_character_modifier = { + modifier = cultural_suspicion_modifier + years = 5 + } + + stress_impact = { + paranoid = minor_stress_impact_loss + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 1.5 + has_trait = paranoid + } + opinion_modifier = { opinion_target = scope:worried_spouse multiplier = 1.5 } + } + } + + option = { # They're fine... + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:worried_spouse = { has_trait = paranoid } + } + desc = mpo_events_ariana.0020.c_paranoid + } + desc = mpo_events_ariana.0020.c + } + } + } + add_prestige = minor_prestige_gain + scope:worried_spouse = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + scope:sus_councillor = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + culture = { + change_cultural_acceptance = { + target = scope:councillor_culture + value = low_positive_culture_acceptance + desc = cultural_acceptance_gain_event + } + } + custom_tooltip = mpo_events_ariana.0020.c_tt + hidden_effect = { + every_vassal = { + limit = { + culture = scope:councillor_culture + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + } + + stress_impact = { + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 1.5 + has_personality_levelheaded_trigger = yes + } + opinion_modifier = { opinion_target = scope:worried_spouse multiplier = 0.5 } + modifier = { + factor = 1.3 + scope:worried_spouse = { has_trait = paranoid } + } + } + } +} + +# Forbidden Drinks - Someone is selling sus drinks at your feast +mpo_events_ariana.0030 = { + type = activity_event + title = mpo_events_ariana.0030.t + desc = mpo_events_ariana.0030.desc + + theme = feast_activity + + left_portrait = { + character = root + animation = stress + } + + lower_center_portrait = scope:bartender + + right_portrait = { + character = scope:spymaster + animation = disapproval + } + + cooldown = { years = 15 } + + trigger = { + has_mpo_dlc_trigger = yes + is_adult = yes + is_landed = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + involved_activity = { + any_attending_character = { + is_lowborn = yes + is_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + involved_activity = { + has_activity_option = { + category = special_type + option = feast_type_tsagaan_sar + } + } + } + } + + immediate = { + if = { + limit = { + involved_activity = { + any_attending_character = { + is_lowborn = no + NOT = { this = root } + has_council_position = councillor_spymaster + } + } + } + cp:councillor_spymaster = { + save_scope_as = spymaster + } + } + else = { + involved_activity = { + ordered_attending_character = { + limit = { + is_lowborn = no + NOT = { this = root } + } + order_by = intrigue + save_scope_as = spymaster + } + } + } + involved_activity = { + random_attending_character = { + limit = { + is_lowborn = yes + NOT = { this = root } + } + save_scope_as = bartender + } + } + } + + option = { # Ok go to jail + name = mpo_events_ariana.0030.jail + custom_tooltip = mpo_events_ariana.0030.jail_effect + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:bartender + IMPRISONER = root + } + + add_dread = minor_dread_gain + + stress_impact = { + just = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + custom_tooltip = { + text = mpo_events_ariana.0030.jail_tt + involved_activity = { + every_attending_character = { + limit = { + is_lowborn = no + NOT = { this = root } + } + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + } + modifier = { + has_trait = gregarious + factor = 0.5 + } + } + } + + option = { # Don't care + name = mpo_events_ariana.0030.ignore + custom_tooltip = mpo_events_ariana.0030.ignore_effect + + location.county = { + add_county_modifier = { + modifier = buzzed_peasants_county_modifier + years = 3 + } + } + + scope:bartender = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + + custom_tooltip = { + text = mpo_events_ariana.0030.ignore_tt + involved_activity = { + every_attending_character = { + limit = { + is_lowborn = no + NOT = { this = root } + } + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + } + } + + custom_tooltip = { + text = mpo_events_ariana.0030.ignore_tt_lowborn + involved_activity = { + every_attending_character = { + limit = { + is_lowborn = yes + } + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + has_trait = gregarious + factor = 1 + } + } + } + + option = { # Let them go, but only if you get some of the cut + name = mpo_events_ariana.0030.greedy + trigger = { + has_trait = greedy + } + custom_tooltip = mpo_events_ariana.0030.greedy_tt + + add_stress = medium_stress_loss + add_short_term_gold = minor_gold_value + add_character_modifier = { + modifier = kumi_tax_modifier + years = 2 + } + + scope:bartender = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -5 + } + } + + scope:spymaster = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} + +scripted_trigger is_valid_lover_mpo_events_ariana_0040 = { + is_ai = yes + is_adult = yes + NOR = { + is_spouse_of = root + has_relation_lover = root + has_trait = celibate + is_eunuch_trigger = yes + } + OR = { + is_sibling_of = root + has_relation_rival = root + } + is_attracted_to_gender_of = root + root = { is_attracted_to_gender_of = prev } +} + + +# Unmasked - You flirt with an masked person at an event +mpo_events_ariana.0040 = { + type = activity_event + title = { + first_valid = { + triggered_desc = { + trigger = { + involved_activity = { has_activity_type = activity_feast } + } + desc = mpo_events_ariana.0040.title_feast + } + triggered_desc = { + trigger = { + involved_activity = { has_activity_type = activity_wedding } + } + desc = mpo_events_ariana.0040.title_wedding + } + triggered_desc = { + trigger = { + involved_activity = { has_activity_type = activity_camp_party } + } + desc = mpo_events_ariana.0040.title_camp_party + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + involved_activity = { has_activity_type = activity_feast } + involved_activity = { has_activity_type = activity_wedding } + } + } + desc = mpo_events_ariana.0040.desc_wedding_feast + } + triggered_desc = { + trigger = { + involved_activity = { has_activity_type = activity_camp_party } + } + desc = mpo_events_ariana.0040.desc_camp_party + } + } + } + + theme = love + override_background = { + trigger = { + OR = { + involved_activity ?= { has_activity_type = activity_feast } + involved_activity ?= { has_activity_type = activity_wedding } + } + } + reference = corridor_night + } + override_background = { + trigger = { + involved_activity ?= { has_activity_type = activity_camp_party } + } + reference = bp1_bonfire + } + + left_portrait = { + character = root + animation = flirtation + } + + right_portrait = { + trigger = { + exists = scope:talker + } + character = scope:talker + animation = happiness + } + + cooldown = { years = 50 } + + trigger = { + has_mpo_dlc_trigger = yes + is_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + involved_activity ?= { + any_attending_character = { + is_valid_lover_mpo_events_ariana_0040 = yes + } + } + OR = { + involved_activity ?= { has_activity_type = activity_feast } + involved_activity ?= { has_activity_type = activity_wedding } + involved_activity ?= { has_activity_type = activity_camp_party } + } + NOT = { + has_trait = celibate + is_eunuch_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.3 + num_of_relation_lover > 1 + } + modifier = { + add = 0.5 + has_trait = rakish + } + modifier = { + add = 1 + has_trait = lustful + } + modifier = { + add = -0.5 + any_spouse = { + reverse_opinion = { + target = root + value >= 60 + } + } + } + modifier = { + add = -0.4 + any_spouse = { + reverse_has_opinion_modifier = { + target = root + modifier = love_opinion + } + } + } + } + + immediate = { + involved_activity = { save_scope_as = activity } + involved_activity = { + every_attending_character = { + limit = { + is_valid_lover_mpo_events_ariana_0040 = yes + } + save_scope_as = possible_lover + root = { + add_to_variable_list = { + name = possible_lovers + target = scope:possible_lover + } + } + if = { + limit = { + involved_activity = { + any_attending_character = { is_spouse_of = scope:possible_lover } + } + } + involved_activity = { + every_attending_character = { + limit = { is_spouse_of = scope:possible_lover } + save_scope_as = possible_lover_spouse + root = { + add_to_variable_list = { + name = possible_lovers + target = scope:possible_lover_spouse + } + } + } + } + } + } + } + # Find a person + ordered_in_list = { + variable = possible_lovers + order_by = { + value = 1 + add = intrigue + if = { + limit = { + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = this + } + } + add = 10 + } + if = { + limit = { + has_trait = beauty_good + } + add = 5 + } + if = { + limit = { + has_trait = intellect_good + } + add = 5 + } + if = { + limit = { + any_spouse = { + count = 0 + } + } + add = 3 + } + if = { + limit = { + OR = { + has_trait = lustful + has_trait = rakish + } + } + add = 5 + } + } + save_scope_as = masked_guest + } + clear_variable_list = possible_lovers + if = { + limit = { + involved_activity = { has_activity_type = activity_camp_party } + exists = scope:masked_guest + } + involved_activity = { + random_attending_character = { + limit = { + NOT = { this = root } + NOT = { this = scope:masked_guest } + } + save_scope_as = talker + } + } + } + } + + option = { + name = mpo_events_ariana.0040.a + + custom_tooltip = mpo_events_ariana.0040.a_tt + trigger_event = mpo_events_ariana.0041 + + stress_impact = { + base = minor_stress_impact_loss + lustful = minor_stress_impact_loss + chaste = medium_stress_impact_gain + } + } + + option = { + name = mpo_events_ariana.0040.b + trigger = { + OR = { + has_trait = chaste + has_trait = shy + } + } + add_prestige = miniscule_prestige_loss + + stress_impact = { + base = minor_stress_impact_loss + } + } +} + +# Unmasked follow up - You find out who the masked person was +mpo_events_ariana.0041 = { + type = activity_event + title = mpo_events_ariana.0041.title + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + involved_activity = { has_activity_type = activity_feast } + involved_activity = { has_activity_type = activity_wedding } + } + } + desc = mpo_events_ariana.0041.desc_wedding_feast + } + triggered_desc = { + trigger = { + involved_activity = { has_activity_type = activity_camp_party } + } + desc = mpo_events_ariana.0041.desc_camp_party + } + } + desc = mpo_events_ariana.0041.desc_middle + first_valid = { + triggered_desc = { + trigger = { + has_relation_rival = scope:masked_guest + } + desc = mpo_events_ariana.0041.desc_rival + } + triggered_desc = { + trigger = { + OR = { + is_sibling_of = scope:masked_guest + is_child_of = scope:masked_guest + scope:masked_guest = { is_child_of = root } + } + } + desc = mpo_events_ariana.0041.desc_family + } + triggered_desc = { + trigger = { + scope:masked_guest = { + any_spouse = { + OR = { + is_sibling_of = scope:masked_guest + is_child_of = scope:masked_guest + scope:masked_guest = { is_child_of = root } + } + } + } + } + desc = mpo_events_ariana.0041.desc_family_spouse + } + triggered_desc = { + trigger = { + scope:masked_guest = { + any_spouse = { + has_relation_rival = root + } + } + } + desc = mpo_events_ariana.0041.desc_rival_spouse + } + } + desc = mpo_events_ariana.0041.desc_outro + triggered_desc = { + trigger = { + OR = { + is_sibling_of = scope:masked_guest + is_child_of = scope:masked_guest + scope:masked_guest = { is_child_of = root } + } + } + desc = mpo_events_ariana.0041.desc_family_outro + } + } + + theme = love + override_background = { + trigger = { + OR = { + involved_activity ?= { has_activity_type = activity_feast } + involved_activity ?= { has_activity_type = activity_wedding } + } + } + reference = bedchamber + } + override_background = { + trigger = { + involved_activity ?= { has_activity_type = activity_camp_party } + } + reference = bp1_bonfire + } + + left_portrait = { + character = root + animation = shock + } + + lower_left_portrait = { + trigger = { + exists = primary_spouse + primary_spouse = { has_relation_lover = root } + } + character = primary_spouse + } + + lower_center_portrait = { + trigger = { exists = scope:masked_guest_spouse } + character = scope:masked_guest_spouse + } + + right_portrait = { + character = scope:masked_guest + animation = flirtation + } + + immediate = { + if = { + limit = { + scope:masked_guest = { + any_spouse = { + is_sibling_of = root + } + } + } + scope:masked_guest = { + random_spouse = { + limit = { is_sibling_of = root } + save_scope_as = masked_guest_spouse + } + } + } + else_if = { + limit = { + scope:masked_guest = { + any_spouse = { + has_relation_rival = root + } + } + } + scope:masked_guest = { + random_spouse = { + limit = { has_relation_rival = root } + save_scope_as = masked_guest_spouse + } + } + } + } + + # Sleep with them anyways + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + is_sibling_of = scope:masked_guest + is_child_of = scope:masked_guest + scope:masked_guest = { is_child_of = root } + } + } + desc = mpo_events_ariana.0041.a_family + } + triggered_desc = { + trigger = { + has_relation_rival = scope:masked_guest + } + desc = mpo_events_ariana.0041.a_rival + } + triggered_desc = { + trigger = { + scope:masked_guest = { + any_spouse = { + has_relation_rival = root + } + } + } + desc = mpo_events_ariana.0041.a_rival_spouse + } + desc = mpo_events_ariana.0041.a + } + } + } + trigger = { + is_attracted_to_gender_of = scope:masked_guest + scope:masked_guest = { is_attracted_to_gender_of = root } + } + had_sex_with_effect = { + CHARACTER = scope:masked_guest + PREGNANCY_CHANCE = pregnancy_chance + } + if = { + limit = { + has_trait = lustful + root.faith = { trait_is_virtue = lustful } + } + add_piety = minor_piety_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_boldness = 0.75 + } + modifier = { + factor = 1.2 + OR = { + has_trait = lustful + has_trait = rakish + } + } + modifier = { + factor = 1.1 + scope:masked_guest = { + any_spouse = { + has_relation_rival = root + } + } + } + modifier = { + factor = 0.8 + has_relation_rival = scope:masked_guest + } + modifier = { + factor = 0.1 + OR = { + is_sibling_of = scope:masked_guest + is_child_of = scope:masked_guest + scope:masked_guest = { is_child_of = root } + } + } + modifier = { + factor = 0.75 + scope:masked_guest = { + any_spouse = { + OR = { + is_sibling_of = root + is_child_of = root + root = { is_child_of = prev } + } + } + } + } + modifier = { + factor = 0.5 + OR = { + scope:activity.var:spouse_2_var ?= root + scope:activity.special_guest:spouse_1 ?= root + } + } + } + } + + # Become lovers + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + is_sibling_of = scope:masked_guest + is_child_of = scope:masked_guest + scope:masked_guest = { is_child_of = root } + } + } + desc = mpo_events_ariana.0041.b_family + } + triggered_desc = { + trigger = { + has_relation_rival = scope:masked_guest + } + desc = mpo_events_ariana.0041.b_rival + } + triggered_desc = { + trigger = { + scope:masked_guest = { + any_spouse = { + has_relation_rival = root + } + } + } + desc = mpo_events_ariana.0041.b_rival_spouse + } + desc = mpo_events_ariana.0041.b + } + } + } + trigger = { + is_attracted_to_gender_of = scope:masked_guest + scope:masked_guest = { is_attracted_to_gender_of = root } + } + had_sex_with_effect = { + CHARACTER = scope:masked_guest + PREGNANCY_CHANCE = pregnancy_chance + } + progress_towards_lover_effect = { + CHARACTER = scope:masked_guest + REASON = lover_masked_activity + OPINION = 0 + } + if = { + limit = { + has_trait = lustful + root.faith = { trait_is_virtue = lustful } + } + add_piety = minor_piety_gain + } + ai_chance = { + base = 60 + ai_value_modifier = { + ai_honor = -0.25 + ai_boldness = 1 + ai_greed = 0.1 + } + modifier = { + factor = 1.2 + OR = { + has_trait = lustful + has_trait = rakish + } + } + modifier = { + factor = 1.1 + scope:masked_guest = { + any_spouse = { + has_relation_rival = root + } + } + } + modifier = { + factor = 0.7 + has_relation_rival = scope:masked_guest + } + modifier = { + factor = 0.1 + OR = { + is_sibling_of = scope:masked_guest + is_child_of = scope:masked_guest + scope:masked_guest = { is_child_of = root } + } + } + modifier = { + factor = 0.5 + scope:masked_guest = { + any_spouse = { + OR = { + is_sibling_of = root + is_child_of = root + root = { is_child_of = prev } + } + } + } + } + modifier = { + factor = 0.5 + OR = { + scope:activity.var:spouse_2_var ?= root + scope:activity.special_guest:spouse_1 ?= root + } + } + } + } + + # Reject them + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + is_sibling_of = scope:masked_guest + is_child_of = scope:masked_guest + scope:masked_guest = { is_child_of = root } + } + } + desc = mpo_events_ariana.0041.c_family + } + triggered_desc = { + trigger = { + has_relation_rival = scope:masked_guest + } + desc = mpo_events_ariana.0041.c_rival + } + triggered_desc = { + trigger = { + exists = primary_spouse + primary_spouse = { has_relation_lover = root } + } + desc = mpo_events_ariana.0041.c_spouse + } + triggered_desc = { + trigger = { + scope:masked_guest = { + any_spouse = { + OR = { + is_sibling_of = root + is_child_of = root + is_parent_of = root + } + } + } + } + desc = mpo_events_ariana.0041.c_family_spouse + } + desc = mpo_events_ariana.0041.c + } + } + } + custom_tooltip = mpo_events_ariana.0041.c_tt + + reverse_add_opinion = { + target = scope:masked_guest + modifier = hurt_opinion + opinion = -20 + } + + if = { + limit = { + OR = { + AND = { + any_spouse = { + count > 0 + } + trait_is_shunned_or_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = root + } + } + trait_is_shunned_or_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = fornicator + GENDER_CHARACTER = root + } + } + } + add_piety = minor_piety_gain + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 1 + } + modifier = { + factor = 1.5 + has_relation_rival = scope:masked_guest + } + modifier = { + factor = 1.5 + OR = { + is_sibling_of = root + is_child_of = root + is_parent_of = root + } + } + modifier = { + factor = 1.2 + scope:masked_guest = { + any_spouse = { + OR = { + is_sibling_of = root + is_child_of = root + is_parent_of = root + } + } + } + } + } + } + + # Reject them, but stop being rivals + option = { + name = mpo_events_ariana.0041.d + trigger = { + has_relation_rival = scope:masked_guest + } + custom_tooltip = mpo_events_ariana.0041.d_tt + duel = { + skill = intrigue + target = scope:masked_guest + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -59 + } + send_interface_toast = { + title = mpo_events_ariana.0041.d_success + type = event_toast_effect_good + left_icon = root + right_icon = scope:masked_guest + remove_relation_rival = scope:masked_guest + + if = { + limit = { + OR = { + AND = { + any_spouse = { + count > 0 + } + trait_is_shunned_or_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = adulterer + GENDER_CHARACTER = root + } + } + trait_is_shunned_or_criminal_in_faith_trigger = { + FAITH = faith + TRAIT = fornicator + GENDER_CHARACTER = root + } + } + } + if = { + limit = { + has_trait = forgiving + faith = { trait_is_virtue = forgiving } + } + add_piety = medium_piety_gain + } + else = { + add_piety = minor_piety_gain + } + } + + add_prestige = minor_prestige_gain + + stress_impact = { + base = minor_stress_impact_loss + forgiving = medium_stress_impact_loss + vengeful = medium_stress_impact_gain + } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = 39 + } + + send_interface_toast = { + title = mpo_events_ariana.0041.d_failure + type = event_toast_effect_bad + left_icon = root + right_icon = scope:masked_guest + stress_impact = { + base = miniscule_stress_impact_gain + } + } + } + } + + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = -0.5 + } + modifier = { + factor = 1.2 + OR = { + is_sibling_of = root + is_child_of = root + is_parent_of = root + } + } + modifier = { + factor = 1.2 + scope:masked_guest = { + any_spouse = { + OR = { + is_sibling_of = root + is_child_of = root + is_parent_of = root + } + } + } + } + } + } +} + +scripted_effect mpo_events_ariana_0050_lose_effect = { + add_prestige = major_prestige_loss + custom_tooltip = mpo_events_ariana_0050_lose_effect_tt + dynasty = { + add_dynasty_modifier = { + modifier = criminal_family_dynasty_modifier + years = 10 + } + } + hidden_effect = { + every_held_title = { + limit = { + is_landless_type_title = no + tier > tier_barony + } + add_to_list = target_titles + } + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + add_claim_on_loss = yes + } + every_in_list = { + list = target_titles + change_title_holder_include_vassals = { + holder = scope:criminal_family.primary_heir + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } + if = { + limit = { + is_valid_for_laampdom = yes + scope:criminal_family.ep3_laamp_chance_score_value >= 8 + } + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = root + } + add_trait_xp = { + trait = gallowsbait + track = thief + value = 10 + } + } + scope:criminal_family = { + add_stress = major_stress_gain + } +} + +scripted_effect mpo_events_ariana_0050_win_effect = { + add_hook = { + target = scope:criminal_family + type = loyalty_hook + } + dynasty = { add_dynasty_prestige = medium_dynasty_prestige_value } + scope:criminal_family = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } +} + +scripted_trigger is_valid_family_mpo_events_ariana_0050 = { + is_landed = yes + is_available_adult = yes + dynasty = root.dynasty + exists = primary_heir + highest_held_title_tier <= tier_duchy + is_ai = yes + OR = { + has_trait = avaricious + has_trait = deceitful + has_trait = schemer + has_trait = greedy + has_trait = ambitious + } +} + +# Branded - A family member is caught in a scandal +mpo_events_ariana.0050 = { + type = character_event + title = mpo_events_ariana.0050.t + desc = mpo_events_ariana.0050.desc + + theme = realm + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:criminal_family + animation = beg + } + + cooldown = { years = 50 } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + any_close_or_extended_family_member = { + is_valid_family_mpo_events_ariana_0050 = yes + } + } + + immediate = { + random_close_or_extended_family_member = { + limit = { + is_valid_family_mpo_events_ariana_0050 = yes + } + save_scope_as = criminal_family + } + } + + option = { + name = mpo_events_ariana.0050.a + trigger = { + short_term_gold >= massive_gold_value + } + show_as_unavailable = { + always = yes + } + custom_tooltip = mpo_events_ariana.0050.a_tt + remove_short_term_gold = massive_gold_value + add_prestige = medium_prestige_gain + mpo_events_ariana_0050_win_effect = yes + stress_impact = { + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + compassionate = medium_stress_impact_loss + just = minor_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + short_term_gold < massive_gold_value + } + desc = mpo_events_ariana.0050.b_broke + } + desc = mpo_events_ariana.0050.b + } + } + } + add_prestige = medium_prestige_loss + scope:criminal_family = { + mpo_events_ariana_0050_lose_effect = yes + } + stress_impact = { + callous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + } + opinion_modifier = { + opinion_target = scope:criminal_family + multiplier = -2 + } + } + } + + option = { + name = mpo_events_ariana.0050.c + trigger = { + diplomacy >= high_skill_rating + } + show_as_unavailable = { + always = yes + } + custom_tooltip = mpo_events_ariana.0050.c_tt + duel = { + skill = diplomacy + value = high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_events_ariana.0050.win + send_interface_toast = { + title = mpo_events_ariana.0050.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:criminal_family + mpo_events_ariana_0050_win_effect = yes + stress_impact = { + compassionate = medium_stress_impact_loss + just = minor_stress_impact_loss + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_events_ariana.0050.lose + send_interface_toast = { + title = mpo_events_ariana.0050.lose + type = event_toast_effect_bad + left_icon = root + right_icon = scope:criminal_family + add_prestige = medium_prestige_loss + scope:criminal_family = { + mpo_events_ariana_0050_lose_effect = yes + } + stress_impact = { + callous = medium_stress_impact_loss + } + } + } + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_compassion = -1 + } + opinion_modifier = { + opinion_target = scope:criminal_family + multiplier = -2 + } + } + } +} + +scripted_trigger is_valid_child_mpo_events_ariana_0060 = { + age > 4 + age <= 14 + is_available = yes + is_ai = yes + is_courtier_of = root +} +scripted_effect mpo_events_ariana_0060_lose_effect = { + send_interface_toast = { + title = mpo_events_ariana.0010.failure + type = event_toast_effect_bad + left_icon = root + right_icon = scope:appropriate_child + random = { + chance = 10 + increase_wounds_effect = { REASON = fall } + } + scope:appropriate_child = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } +} +scripted_effect mpo_events_ariana_0060_win_effect = { + custom_tooltip = mpo_events_ariana.0060.success_tt + add_prestige = miniscule_prestige_gain + trigger_event = mpo_events_ariana.0070 +} + +# Treasure Nest - A child comes to you saying they found treasure in an eagle's nest +mpo_events_ariana.0060 = { + type = character_event + title = mpo_events_ariana.0060.t + desc = mpo_events_ariana.0060.desc + + theme = court + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:appropriate_child + animation = storyteller + } + + cooldown = { years = 15 } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + OR = { + any_close_family_member = { is_valid_child_mpo_events_ariana_0060 = yes } + any_relation = { type = ward is_valid_child_mpo_events_ariana_0060 = yes } + any_warden_hostage = { opinion = { target = root value >= low_negative_opinion } is_valid_child_mpo_events_ariana_0060 = yes } + } + } + + immediate = { + if = { + limit = { + any_close_family_member = { + is_valid_child_mpo_events_ariana_0060 = yes + } + } + random_close_family_member = { + #A child you care about + limit = { + opinion = { + target = root + value >= low_positive_opinion + } + is_valid_child_mpo_events_ariana_0060 = yes + } + #Otherwise pick whoever + alternative_limit = { is_valid_child_mpo_events_ariana_0060 = yes } + save_scope_as = appropriate_child + } + } + else_if = { + limit = { + any_relation = { + type = ward + is_valid_child_mpo_events_ariana_0060 = yes + } + } + random_relation = { + type = ward + #A child you care about + limit = { + opinion = { + target = root + value >= low_positive_opinion + } + is_valid_child_mpo_events_ariana_0060 = yes + } + #Otherwise pick whoever + alternative_limit = { is_valid_child_mpo_events_ariana_0060 = yes } + save_scope_as = appropriate_child + } + } + else_if = { + limit = { + any_warden_hostage = { + opinion = { + target = root + value >= low_negative_opinion + } + is_valid_child_mpo_events_ariana_0060 = yes + } + } + random_warden_hostage = { + limit = { + opinion = { + target = root + value >= low_negative_opinion + } + is_valid_child_mpo_events_ariana_0060 = yes + } + save_scope_as = appropriate_child + } + } + add_short_term_gold = 5 + } + + # Climb to the nest + option = { + name = mpo_events_ariana.0060.a + duel = { + skill = prowess + value = decent_skill_rating + desc = mpo_events_ariana.0060.a_tt + 60 = { + desc = mpo_events_ariana.0060.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -59 + } + mpo_events_ariana_0060_win_effect = yes + } + 40 = { + desc = mpo_events_ariana.0010.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + mpo_events_ariana_0060_lose_effect = yes + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = 0.1 + } + modifier = { + factor = 1.5 + prowess > intrigue + } + } + } + + # Sneak to the nest + option = { + name = mpo_events_ariana.0060.b + duel = { + skill = intrigue + value = decent_skill_rating + desc = mpo_events_ariana.0060.b_tt + 60 = { + desc = mpo_events_ariana.0060.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -59 + } + mpo_events_ariana_0060_win_effect = yes + } + 40 = { + desc = mpo_events_ariana.0010.b_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + mpo_events_ariana_0060_lose_effect = yes + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_greed = 0.1 + } + modifier = { + factor = 1.5 + intrigue > prowess + } + } + } + + # That's nice dear + option = { + name = mpo_events_ariana.0060.d + scope:appropriate_child = { + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -15 + } + } + stress_impact = { + lazy = minor_stress_impact_loss + craven = minor_stress_impact_loss + } + ai_chance = { + base = 75 + opinion_modifier = { + opinion_target = scope:appropriate_child + multiplier = -1 + } + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +mpo_events_ariana.0070 = { + type = character_event + title = mpo_events_ariana.0060.t + desc = mpo_events_ariana.0070.desc + + theme = court + override_background = { reference = terrain } + + left_portrait = { + character = root + animation = hunting_falcon + } + + right_portrait = { + character = scope:appropriate_child + animation = happiness + } + + immediate = { + add_character_flag = used_in_mpo_events_ariana_0070 + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = root + GRAB_ALL_TRINKETS = no + HISTORY_TYPE = discovered + } + if = { + limit = { exists = scope:new_trinket } + scope:new_trinket = { + save_scope_as = newly_created_artifact + } + } + } + + # Take the sachel + option = { + name = mpo_events_ariana.0070.a + random_list = { + desc = mpo_events_ariana.0070.a_tt + 20 = { + desc = mpo_events_ariana.0070.a_trinket + trigger = { + exists = scope:newly_created_artifact + } + send_interface_toast = { + title = mpo_events_ariana.0070.a_trinket + type = event_toast_effect_good + left_icon = root + scope:newly_created_artifact = { set_owner = root } + add_short_term_gold = 15 + } + } + 30 = { + desc = mpo_events_ariana.0070.a_good + send_interface_toast = { + title = mpo_events_ariana.0070.a_good + type = event_toast_effect_good + left_icon = root + add_short_term_gold = 50 + } + } + 15 = { + desc = mpo_events_ariana.0070.a_great + send_interface_toast = { + title = mpo_events_ariana.0070.a_great + type = event_toast_effect_good + left_icon = root + add_short_term_gold = 100 + } + } + 5 = { + desc = mpo_events_ariana.0070.a_none + send_interface_toast = { + title = mpo_events_ariana.0070.a_none + type = event_toast_effect_bad + left_icon = root + } + hidden_effect = { + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + } + + stress_impact = { + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Take the eagle + option = { + name = mpo_events_ariana.0070.b + + trigger = { + OR = { + has_eagle_trigger = no + scope:appropriate_child = { has_eagle_trigger = no } + } + } + if = { + limit = { + has_eagle_trigger = no + } + custom_tooltip = mpo_events_ariana.0070.b_self + start_eagle_story_cycle_effect = yes + } + else_if = { + limit = { + scope:appropriate_child = { has_eagle_trigger = no } + } + custom_tooltip = mpo_events_ariana.0070.b_child + scope:appropriate_child = { start_eagle_story_cycle_effect = yes } + scope:appropriate_child = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + # Give the sachel to bro + option = { + name = mpo_events_ariana.0070.c + random_list = { + desc = mpo_events_ariana.0070.c_tt + 20 = { + desc = mpo_events_ariana.0070.a_trinket + trigger = { + exists = scope:newly_created_artifact + } + send_interface_toast = { + title = mpo_events_ariana.0070.a_trinket + type = event_toast_effect_good + left_icon = root + right_icon = scope:appropriate_child + scope:newly_created_artifact = { set_owner = root } + scope:appropriate_child = { add_short_term_gold = 15 } + } + } + 30 = { + desc = mpo_events_ariana.0070.a_good + send_interface_toast = { + title = mpo_events_ariana.0070.a_good + type = event_toast_effect_good + left_icon = root + right_icon = scope:appropriate_child + add_short_term_gold = 25 + scope:appropriate_child = { add_short_term_gold = 25 } + } + } + 15 = { + desc = mpo_events_ariana.0070.a_great + send_interface_toast = { + title = mpo_events_ariana.0070.a_great + type = event_toast_effect_good + left_icon = root + right_icon = scope:appropriate_child + add_short_term_gold = 50 + scope:appropriate_child = { add_short_term_gold = 50 } + } + } + 5 = { + desc = mpo_events_ariana.0070.a_none + custom_tooltip = mpo_events_ariana.0070.c_none_tt + send_interface_toast = { + title = mpo_events_ariana.0070.a_none + type = event_toast_effect_bad + left_icon = root + right_icon = scope:appropriate_child + pay_short_term_gold = { + gold = 5 + target = scope:appropriate_child + } + } + hidden_effect = { + stress_impact = { + greedy = minor_stress_impact_gain + } + } + } + } + + scope:appropriate_child = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + generous = major_stress_impact_loss + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_greed = -1 + } + opinion_modifier = { + opinion_target = scope:appropriate_child + multiplier = 2 + } + } + } + + # Leave it be + option = { + name = mpo_events_ariana.0070.d + + add_piety = minor_piety_gain + + scope:appropriate_child = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + + stress_impact = { + temperate = minor_stress_impact_loss + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.1 + ai_greed = -1 + } + modifier = { + factor = 1.5 + has_trait = temperate + } + } + } + + after = { + remove_character_flag = used_in_mpo_events_ariana_0070 + } +} + +# Someone tells you about a magical tree +mpo_events_ariana.0080 = { + type = character_event + title = mpo_events_ariana.0080.t + desc = mpo_events_ariana.0080.desc + + theme = nomads + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:tree_lover + animation = storyteller + } + + cooldown = { years = 25 } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + location = { geographical_region = world_steppe } + government_has_flag = government_is_nomadic + any_courtier = { + is_available_healthy_ai_adult = yes + } + any_county_in_region = { + region = world_steppe + NOR = { + holder ?= root + holder.liege ?= root + holder.top_liege ?= root + } + squared_distance = { + target = root.capital_county + value >= squared_distance_medium + } + squared_distance = { + target = root.capital_county + value < squared_distance_almost_massive + } + any_county_province = { + OR = { + terrain = forest + terrain = taiga + } + } + } + } + + immediate = { + ordered_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + order_by = learning + save_scope_as = tree_lover + } + random_county_in_region = { + region = world_steppe + limit = { + NOR = { + holder ?= root + holder.liege ?= root + holder.top_liege ?= root + } + squared_distance = { + target = root.capital_county + value >= squared_distance_medium + } + squared_distance = { + target = root.capital_county + value < squared_distance_almost_massive + } + any_county_province = { + OR = { + terrain = forest + terrain = taiga + } + } + } + random_county_province = { + limit = { + OR = { + terrain = forest + terrain = taiga + } + } + save_scope_as = tree_barony + } + } + } + + # ok you can go + option = { + name = mpo_events_ariana.0080.a + + + custom_tooltip = mpo_events_ariana.0080.a_tt + save_scope_value_as = { + name = tree_method + value = flag:tree_guy + } + + pay_short_term_gold = { + gold = major_gold_value + target = scope:tree_lover + } + + scope:tree_lover = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + + trigger_event = { + id = mpo_events_ariana.0081 + days = { 30 90 } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 150 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = -0.1 + } + modifier = { + factor = 1.25 + scope:tree_lover.learning >= root.learning + } + modifier = { + gold <= massive_gold_value + factor = 0 + } + } + } + + # ill go + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = arrogant + } + desc = mpo_events_ariana.0080.b_arrogant + } + desc = mpo_events_ariana.0080.b + } + } + } + trigger = { + learning >= high_skill_rating + } + show_as_unavailable = { + always = yes + } + + custom_tooltip = mpo_events_ariana.0080.b_tt + save_scope_value_as = { + name = tree_method + value = flag:self + } + + start_travel_plan = { + destination = scope:tree_barony + on_arrival_event = mpo_events_ariana.0081 + } + + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = 0.5 + } + modifier = { + factor = 2 + has_trait = arrogant + } + } + } + + # who cares + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + probably_superstitious = yes + } + desc = mpo_events_ariana.0080.c_sus + } + desc = mpo_events_ariana.0080.c + } + } + } + flavor = mpo_events_ariana.0080.c_flavor + + stress_impact = { + base = minor_stress_impact_loss + cynical = minor_stress_impact_loss + } + + scope:tree_lover = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + + ai_chance = { + base = 50 + modifier = { + factor = 1.5 + probably_superstitious = yes + } + modifier = { + factor = 1.5 + has_trait = cynical + } + } + } +} + +# The magical tree is brought to you or you find it +mpo_events_ariana.0081 = { + type = character_event + title = mpo_events_ariana.0080.t + desc = { + triggered_desc = { + trigger = { + scope:tree_method = flag:self + } + desc = mpo_events_ariana.0081.desc_self + } + triggered_desc = { + trigger = { + scope:tree_method = flag:tree_guy + scope:tree_lover = { is_alive = yes } + } + desc = mpo_events_ariana.0081.desc_guy + } + triggered_desc = { + trigger = { + scope:tree_method = flag:tree_guy + scope:tree_lover = { is_alive = no } + } + desc = mpo_events_ariana.0081.desc_dead + } + triggered_desc = { + trigger = { + scope:tree_method = flag:tree_guy + scope:tree_lover = { is_alive = yes } + } + desc = mpo_events_ariana.0081.desc + } + desc = mpo_events_ariana.0081.desc_outro + } + + theme = realm + override_background = { + trigger = { + scope:tree_method = flag:tree_guy + } + reference = courtyard + } + override_background = { + trigger = { + scope:tree_method = flag:self + } + reference = terrain + } + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + trigger = { + scope:tree_method = flag:tree_guy + } + character = scope:tree_giver + animation = storyteller + } + + lower_center_portrait = { + trigger = { + scope:tree_lover = { is_alive = no } + } + character = scope:tree_lover + } + + immediate = { + # If the guy is dead for whatever reason we need to find a new one + if = { + limit = { + scope:tree_lover = { is_alive = yes } + } + scope:tree_lover = { save_scope_as = tree_giver } + } + else = { + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = tree_giver + } + } + } + + # Wish for Fertility + option = { + name = mpo_events_ariana.0081.a + + duel = { + skill = learning + value = decent_skill_rating + desc = mpo_events_ariana.0081.wish + 70 = { + desc = mpo_events_ariana.0081.success + modifier = { + factor = 1.5 + scope:tree_method = flag:tree_guy + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -69 + } + send_interface_toast = { + title = mpo_events_ariana.0081.success + type = event_toast_effect_good + left_icon = root + add_character_modifier = { + modifier = mpo_magical_tree_fertility_modifier + years = 10 + } + } + } + 30 = { + desc = mpo_events_ariana.0081.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + send_interface_toast = { + title = mpo_events_ariana.0081.failure + type = event_toast_effect_neutral + left_icon = root + add_character_modifier = { + modifier = mpo_magical_tree_modifier + years = 10 + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = lustful + } + } + } + + # Wish for Power + option = { + name = mpo_events_ariana.0081.b + + duel = { + skill = learning + value = decent_skill_rating + desc = mpo_events_ariana.0081.wish + 70 = { + desc = mpo_events_ariana.0081.success + modifier = { + factor = 1.5 + scope:tree_method = flag:tree_guy + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -69 + } + send_interface_toast = { + title = mpo_events_ariana.0081.success + type = event_toast_effect_good + left_icon = root + if = { + limit = { + domicile ?= { herd <= max_herd } + } + domicile ?= { + change_herd = medium_herd_gain + } + } + else = { + add_prestige = medium_prestige_gain + } + add_character_modifier = { + modifier = mpo_magical_tree_power_modifier + years = 10 + } + } + } + 30 = { + desc = mpo_events_ariana.0081.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + send_interface_toast = { + title = mpo_events_ariana.0081.failure + type = event_toast_effect_neutral + left_icon = root + add_character_modifier = { + modifier = mpo_magical_tree_modifier + years = 10 + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait = wrathful + } + } + } + + # Wish for Wisdom + option = { + name = mpo_events_ariana.0081.c + + duel = { + skill = learning + value = decent_skill_rating + desc = mpo_events_ariana.0081.wish + 70 = { + desc = mpo_events_ariana.0081.success + modifier = { + factor = 1.5 + scope:tree_method = flag:tree_guy + } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -69 + } + send_interface_toast = { + title = mpo_events_ariana.0081.success + type = event_toast_effect_good + left_icon = root + add_character_modifier = { + modifier = mpo_magical_tree_wisdom_modifier + years = 10 + } + } + } + 30 = { + desc = mpo_events_ariana.0081.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + send_interface_toast = { + title = mpo_events_ariana.0081.failure + type = event_toast_effect_neutral + left_icon = root + add_character_modifier = { + modifier = mpo_magical_tree_modifier + years = 10 + } + } + } + } + + ai_chance = { + base = 100 + } + } +} + +scripted_trigger is_valid_family_mpo_events_ariana_0090 = { + is_available = yes + is_adult = no + age >= 8 # Can't be too young + number_of_personality_traits < personality_trait_limit + NAND = { + OR = { + has_trait = content + has_trait = ambitious + } + OR = { + has_trait = lazy + has_trait = diligent + } + } + NOT = { + has_character_modifier = mpo_destined_leader_modifier + } +} + +# Your child wants to be a herder when they grow up +mpo_events_ariana.0090 = { + type = character_event + title = mpo_events_ariana.0090.t + desc = { + desc = mpo_events_ariana.0090.desc + first_valid = { + triggered_desc = { + trigger = { + scope:child = { age >= 12 } + } + desc = mpo_events_ariana.0090.desc_older + } + desc = mpo_events_ariana.0090.desc_younger + } + } + theme = nomads + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:child + animation = holding_staff + } + + cooldown = { years = 10 } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + government_has_flag = government_is_nomadic + any_child = { + is_valid_family_mpo_events_ariana_0090 = yes + } + } + + immediate = { + random_child = { + limit = { + is_valid_family_mpo_events_ariana_0090 = yes + } + weight = { + base = 1 + modifier = { + factor = 2 + OR = { + has_trait = shy + has_trait = craven + } + } + } + save_scope_as = child + } + } + + # I'll show you their life before you decide + option = { + name = mpo_events_ariana.0090.c + trigger = { + scope:child = { age >= 10 } + OR = { + has_trait = callous + has_trait = peasant_leader + has_trait = diligent + } + } + + reverse_add_opinion = { + target = scope:child + modifier = annoyed_opinion + opinion = -10 + } + + stress_impact = { + callous = minor_stress_impact_loss + } + + random_list = { + desc = mpo_events_ariana.0090.c_duel + 50 = { + desc = mpo_events_ariana.0090.c_1 + send_interface_toast = { + title = mpo_events_ariana.0090.c_1 + type = event_toast_effect_good + left_icon = root + right_icon = scope:child + scope:child = { add_trait_force_tooltip = diligent } + } + } + 50 = { + desc = mpo_events_ariana.0090.c_2 + send_interface_toast = { + title = mpo_events_ariana.0090.c_2 + type = event_toast_effect_good + left_icon = root + right_icon = scope:child + scope:child = { add_prowess_skill = 2 } + } + } + } + + ai_chance = { + base = 75 + modifier = { + factor = 1.5 + has_trait = diligent + } + } + } + + # That's nice dear + option = { + name = mpo_events_ariana.0090.a + flavor = mpo_events_ariana.0090.a_flavor + + reverse_add_opinion = { + target = scope:child + modifier = grateful_opinion + opinion = 15 + } + + scope:child = { + add_trait = content + add_character_modifier = { + modifier = mpo_child_herder_modifier + years = 15 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + content = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + modifier = { + factor = 1.5 + has_trait = lazy + } + modifier = { + scope:child.age <= 12 + factor = 1.5 + } + } + } + + # You're destined for more + option = { + name = mpo_events_ariana.0090.b + + reverse_add_opinion = { + target = scope:child + modifier = disappointed_opinion + opinion = -15 + } + + random = { + chance = 50 + scope:child = { add_trait = ambitious } + } + + stress_impact = { + ambitious = minor_stress_impact_loss + content = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = humble + } + } + modifier = { + factor = 1.5 + has_trait = ambitious + } + } + } +} + +scripted_trigger is_valid_family_mpo_events_ariana_0100 = { + is_available = yes + age >= 14 + OR = { + is_courtier_of = root + is_vassal_or_below_of = root + } + OR = { + prowess >= decent_skill_rating + martial >= decent_skill_rating + } + NOR = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_eunuch_trigger = yes + has_trait = disinherited + has_trait = devoted + has_trait = order_member + has_trait = bastard + } + dynasty = root.dynasty + NOT = { root.primary_heir ?= this } +} + +# A non-marital gender relative is beasting people +mpo_events_ariana.0100 = { + type = character_event + title = mpo_events_ariana.0100.t + desc = mpo_events_ariana.0100.desc + + theme = nomads + + override_background = { reference = mpo_camp_steppe } + + left_portrait = { + character = root + animation = admiration + } + + right_portrait = { + character = scope:warrior + animation = wrestling_victory + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 10 + OR = { + NOT = { exists = primary_heir } + primary_heir ?= { + NOT = { dynasty = root.dynasty } + } + } + } + } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + government_has_flag = government_is_nomadic + NOT = { exists = designated_heir } + any_child = { + is_valid_family_mpo_events_ariana_0100 = yes + } + } + + immediate = { + random_child = { + limit = { + is_valid_family_mpo_events_ariana_0100 = yes + } + save_scope_as = warrior + add_character_flag = wear_armor + } + } + + option = { + name = mpo_events_ariana.0100.a + + add_prestige = medium_prestige_loss + add_legitimacy = minor_legitimacy_loss + + if = { + limit = { + exists = primary_heir + } + reverse_add_opinion = { + target = primary_heir + modifier = angry_opinion + opinion = -30 + } + } + + set_designated_heir = scope:warrior + + reverse_add_opinion = { + target = scope:warrior + modifier = grateful_opinion + opinion = 30 + } + + every_vassal = { + limit = { has_vassal_stance = parochial } + custom = every_parochial_vassal + add_opinion = { + modifier = disapproval_opinion + target = root + opinion = -15 + } + } + + if = { + limit = { + scope:warrior = { is_wrong_gender_in_faith_trigger = { FAITH = root.faith } } + } + every_vassal = { + limit = { has_vassal_stance = zealot } + custom = every_zealot_vassal + add_opinion = { + modifier = disapproval_opinion + target = root + opinion = -15 + } + } + } + + scope:warrior = { + add_prestige = minor_prestige_gain + add_character_modifier = mpo_destined_leader_modifier + set_knight_status = default + } + + stress_impact = { + base = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + trusting = minor_stress_impact_loss + stubborn = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + opinion_modifier = { opinion_target = scope:warrior multiplier = 2 } + modifier = { + factor = 0 + has_trait = stubborn + } + } + } + + option = { + name = mpo_events_ariana.0100.b + + if = { + limit = { + scope:warrior = { is_wrong_gender_in_faith_trigger = { FAITH = root.faith } } + } + every_vassal = { + limit = { has_vassal_stance = zealot } + custom = every_zealot_vassal + add_opinion = { + modifier = disapproval_opinion + target = root + opinion = -15 + } + } + } + + scope:warrior = { + add_prestige = miniscule_prestige_gain + add_character_modifier = ignores_gender_army_rules + set_knight_status = default + } + + if = { + limit = { + scope:warrior = { NOT = { has_trait = craven } } + } + reverse_add_opinion = { + target = scope:warrior + modifier = grateful_opinion + opinion = 15 + } + } + + ai_chance = { + base = 50 + opinion_modifier = { opinion_target = scope:warrior multiplier = 2 } + } + } + + option = { + name = mpo_events_ariana.0100.c + trigger = { + has_dlc_feature = reform_culture + } + + add_character_modifier = { + modifier = mpo_diverse_warriors_modifier + years = 10 + } + + stress_impact = { + ambitious = minor_stress_impact_loss + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = 1 + } + modifier = { + factor = 2 + culture.culture_head = root + } + } + } + + option = { + name = mpo_events_ariana.0100.d + + if = { + limit = { + scope:warrior = { is_wrong_gender_in_faith_trigger = { FAITH = root.faith } } + } + add_piety = minor_piety_gain + } + + reverse_add_opinion = { + target = scope:warrior + modifier = disappointed_opinion + opinion = -15 + } + + stress_impact = { + callous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + stubborn = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + opinion_modifier = { opinion_target = scope:warrior multiplier = -1 } + } + } + + after = { + scope:warrior = { remove_character_flag = wear_armor } + } +} + +scripted_trigger is_valid_county_0110 = { + uses_county_fertility = yes + is_landless_type_title = no + NOT = { this = root.capital_county } + OR = { + county_fertility > root.capital_county.county_fertility + county_opinion > root.capital_county.county_opinion + } +} + +# Your court astrologer wants you to move your capital +mpo_events_ariana.0110 = { + type = character_event + title = mpo_events_ariana.0110.t + desc = { + desc = mpo_events_ariana.0110.desc + random_valid = { + triggered_desc = { + trigger = { + scope:current_capital = { county_fertility <= 25 } + } + desc = mpo_events_ariana.0110.desc_fertility + } + triggered_desc = { + trigger = { + scope:current_capital = { county_opinion < 0 } + } + desc = mpo_events_ariana.0110.desc_opinion + } + } + desc = mpo_events_ariana.0110.desc_ending + } + + theme = nomads + + override_background = { reference = mpo_camp_steppe } + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:astrologer + animation = storyteller + } + + cooldown = { years = 25 } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + government_has_flag = government_is_nomadic + employs_court_position = court_astrologer_court_position + capital_county ?= { + OR = { + county_fertility <= 25 + county_opinion < 0 + } + } + any_held_title = { + tier = tier_county + is_valid_county_0110 = yes + } + } + + immediate = { + random_courtier = { + limit = { + has_court_position = court_astrologer_court_position + } + save_scope_as = astrologer + } + capital_county = { + save_scope_as = current_capital + } + random_held_title = { + limit = { + tier = tier_county + is_valid_county_0110 = yes + } + save_scope_as = new_capital + } + } + + option = { + name = mpo_events_ariana.0110.a + primary_title = { set_capital_county = scope:new_capital } + set_realm_capital = scope:new_capital + hidden_effect = { domicile = { move_domicile = scope:new_capital.title_province } } + + add_piety = minor_piety_gain + + reverse_add_opinion = { + target = scope:astrologer + modifier = pleased_opinion + opinion = 15 + } + + stress_impact = { + loyal = minor_stress_impact_loss + trusting = minor_stress_impact_loss + paranoid = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = mpo_events_ariana.0111 + days = { 30 90 } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arbitrary + has_trait = cynical + } + } + modifier = { + factor = 2 + OR = { + has_trait = trusting + has_trait = loyal + } + } + opinion_modifier = { opinion_target = scope:astrologer multiplier = 2 } + } + } + + option = { + name = mpo_events_ariana.0110.b + + reverse_add_opinion = { + target = scope:astrologer + modifier = disappointed_opinion + opinion = -15 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + } + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = cynical + } + desc = mpo_events_ariana.0110.c_cynical + } + desc = mpo_events_ariana.0110.c + } + } + } + + add_piety = minor_piety_loss + + stress_impact = { + zealous = minor_stress_impact_gain + cynical = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + } + + revoke_court_position = { + recipient = scope:astrologer + court_position = court_astrologer_court_position + } + + add_character_modifier = { + modifier = mpo_home_sweet_home_modifier + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + } + modifier = { + factor = 2 + OR = { + has_trait = paranoid + has_trait = arbitrary + } + } + opinion_modifier = { opinion_target = scope:astrologer multiplier = -2 } + } + } +} + +mpo_events_ariana.0111 = { + type = character_event + title = mpo_events_ariana.0111.t + desc = mpo_events_ariana.0111.desc + + theme = nomads + + override_background = { reference = mpo_camp_steppe } + + left_portrait = { + character = root + animation = admiration + } + + right_portrait = { + character = scope:astrologer + animation = happiness + } + + option = { + name = mpo_events_ariana.0111.a + add_prestige = minor_prestige_gain + scope:new_capital = { change_county_fertility = major_county_fertility_gain } + scope:astrologer = { + add_learning_skill = 1 + } + } +} \ No newline at end of file diff --git a/N3OW/events/dlc/mpo/mpo_events_tova.txt b/N3OW/events/dlc/mpo/mpo_events_tova.txt new file mode 100644 index 00000000..b0bbf73a --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_events_tova.txt @@ -0,0 +1,1870 @@ +namespace = mpo_events_tova + +mpo_events_tova.0001 = { #Child expects gift after long journey + type = character_event + title = mpo_events_tova.0001.t + desc = mpo_events_tova.0001.desc + + theme = nomads + override_background = { + trigger = { + is_landed = yes + } + reference = corridor_day + } + override_background = { + trigger = { + is_landed = no + } + reference = bp1_bonfire + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + root = { + OR = { + has_trait = cynical + has_trait = callous + } + } + } + animation = personality_cynical + } + animation = shame + } + + right_portrait = { + character = scope:demanding_relation + animation = admiration + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available = yes + } + + option = { #Increase Wanderer Lifestyle Experience by telling the child of your travels. + name = mpo_events_tova.0001.a + + duel = { + skill = learning + target = scope:demanding_relation + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0001.a.tt.success + add_wanderer_lifestyle_xp = medium_lifestyle_experience + send_interface_toast = { + title = mpo_events_tova.0001.a.tt.success + left_icon = root + right_icon = scope:demanding_relation + reverse_add_opinion = { + target = scope:demanding_relation + modifier = pleased_opinion + opinion = 25 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0001.a.tt.failure + send_interface_toast = { + title = mpo_events_tova.0001.a.tt.failure + left_icon = scope:demanding_relation + reverse_add_opinion = { + target = scope:demanding_relation + modifier = insult_opinion + opinion = -25 + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + } + } + + option = { #Purchase child a gift. + name = mpo_events_tova.0001.b + + hidden_effect = { + create_artifact = { + name = gifted_toy_name + description = gifted_toy_desc + modifier = artifact_learning_1_modifier + type = miscellaneous + visuals = pocket_toy + save_scope_as = wanderer_toy + } + } + + remove_short_term_gold = tiny_gold_value + reverse_add_opinion = { + target = scope:demanding_relation + modifier = pleased_opinion + opinion = 15 + } + + send_interface_toast = { + title = mpo_events_tova.0001.b.equipped_tt + left_icon = scope:demanding_relation + right_icon = scope:wanderer_toy + scope:wanderer_toy = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_owner = { + target = scope:demanding_relation + history = { + location = root.capital_province + actor = root + recipient = scope:demanding_relation + type = given + } + } + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { + gold <= medium_gold_value + factor = 0 + } + } + } + + option = { #Gift false relic. + name = mpo_events_tova.0001.c + + duel = { + skill = intrigue + target = scope:demanding_relation + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0001.c.tt.success + send_interface_toast = { + title = mpo_events_tova.0001.c.tt.success + left_icon = scope:demanding_relation + reverse_add_opinion = { + target = scope:demanding_relation + modifier = pleased_opinion + opinion = 25 + } + scope:demanding_relation = { + if = { + limit = { + OR = { + has_trait = trusting + has_trait = compassionate + has_trait = honest + number_of_personality_traits < childhood_personality_trait_gain_limit + } + } + add_diplomacy_skill = 1 + add_intrigue_skill = -1 + } + else = { + random_list = { + 3 = { + add_trait = trusting + } + 3 = { + add_trait = compassionate + } + 3 = { + add_trait = honest + } + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0001.c.tt.failure + send_interface_toast = { + title = mpo_events_tova.0001.c.tt.failure + left_icon = scope:demanding_relation + reverse_add_opinion = { + target = scope:demanding_relation + modifier = insult_opinion + opinion = -25 + } + scope:demanding_relation = { + if = { + limit = { + OR = { + has_trait = paranoid + has_trait = shy + has_trait = craven + number_of_personality_traits < childhood_personality_trait_gain_limit + } + } + add_diplomacy_skill = -1 + add_intrigue_skill = 1 + } + else = { + random_list = { + 3 = { + add_trait = paranoid + } + 3 = { + add_trait = shy + } + 3 = { + add_trait = craven + } + } + } + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + just = minor_stress_impact_gain + honest = minor_stress_impact_gain + craven = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + } + } + } +} + +#Check for province that could be interesting for a Monument Expedition. +scripted_trigger tova_events_2_province_requirements = { + NOT = { + culture = root.culture + } + has_special_building = yes + NOR = { + has_building_or_higher = generic_copper_mines_01 + has_building_or_higher = generic_silver_mines_01 + has_building_or_higher = generic_gold_mines_01 + has_building_with_flag = special_mine + } + "squared_distance(root.location)" <= squared_distance_monstrous +} + +mpo_events_tova.0002 = { #Hear musician playing unrecognized song about distant home. + type = character_event + title = mpo_events_tova.0002.t + desc = mpo_events_tova.0002.desc + + theme = nomads + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:musician + animation = alto_flute_active + } + + override_background = { + trigger = { + is_landed = yes + } + reference = corridor_day + } + + override_background = { + trigger = { + is_landed = no + } + reference = bp1_bonfire + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available = yes + any_special_building_province = { + tova_events_2_province_requirements = yes + } + } + + immediate = { + random_special_building_province = { + limit = { + tova_events_2_province_requirements = yes + } + save_scope_as = journey_province + } + if = { + limit = { + any_pool_character = { + province = scope:journey_province + NOT = { + culture = scope:journey_province.county.culture + } + is_available_ai_adult = yes + } + } + random_pool_character = { + province = scope:journey_province + limit = { + NOT = { + culture = scope:journey_province.county.culture + } + is_available_ai_adult = yes + } + save_scope_as = musician + } + } + else = { + create_character = { + template = poet_template + location = root.location + culture = scope:journey_province.county.culture + save_scope_as = musician + } + } + } + + option = { #Talk to musician to discover POI and improve cultural acceptance. + name = mpo_events_tova.0002.a + custom_tooltip = mpo_events_tova.0002.a.tt + + add_to_variable_list = { + name = extra_journey_target + target = scope:journey_province + } + culture = { + change_cultural_acceptance = { + target = scope:journey_province.county.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_enjoyed_music + } + } + stress_impact = { + ambitious = minor_stress_impact_loss + shy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_compassion = 1 + } + } + } + + option = { #Recruit musician over shared love of music. + name = mpo_events_tova.0002.b + flavor = mpo_events_tova.0002.b.flavor + + duel = { + skill = learning + target = scope:musician + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0002.b.tt.success + send_interface_toast = { + title = mpo_events_tova.0002.b.tt.success + left_icon = scope:musician + add_courtier = scope:musician + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0002.b.tt.failure + send_interface_toast = { + title = mpo_events_tova.0002.b.tt.failure + left_icon = scope:musician + add_prestige = minor_prestige_loss + } + } + } + } + + option = { #Rest and reduce stress. + name = mpo_events_tova.0002.c + + if = { + limit = { + has_trait = impatient + } + add_stress = miniscule_stress_loss + } + else_if = { + limit = { + has_trait = lazy + } + add_stress = medium_stress_loss + } + else = { + add_stress = minor_stress_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_greed = -1 + } + } + } +} + +mpo_events_tova.0003 = { #Peasants mock ruler and face deadly consequences. + type = character_event + title = mpo_events_tova.0003.t + desc = mpo_events_tova.0003.desc + + theme = migration + + override_background = { reference = ep2_hunt_foggy_forest } + + override_effect_2d = { + reference = fog + } + + cooldown = { years = 20 } + + left_portrait = { + character = scope:peasant_actor_eldest + animation = prisonhouse + } + right_portrait = { + character = scope:stray_executioner + animation = menacing + } + lower_left_portrait = { + character = scope:peasant_actor_middle + } + lower_right_portrait = { + character = scope:peasant_actor_youngest + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_travelling_adult = yes + is_landed = yes + is_ai = no + is_location_valid_for_travel_event_on_land = yes + location = { + has_holding = yes + terrain = forest + } + exists = location.county.holder + location.county.holder = { is_ai = yes } + NOR = { + this = location.county.holder + is_liege_or_above_of = location.county.holder + } + } + + immediate = { + location = { + save_scope_as = unruly_province + } + location.county.holder = { + save_scope_as = unruly_province_owner + } + create_character = { + template = new_warrior_character + location = root.location + culture = scope:unruly_province.culture + faith = scope:unruly_province.faith + gender = male + save_scope_as = stray_executioner + } + create_character = { + template = peasant_character + location = root.location + culture = scope:unruly_province.culture + faith = scope:unruly_province.faith + gender = female + age = 57 + save_scope_as = actor_mother + } + hidden_effect = { + scope:actor_mother ?= { + silent_disappearance_effect = yes + } + } + create_character = { + template = peasant_character + location = root.location + culture = scope:unruly_province.culture + faith = scope:unruly_province.faith + gender = male + age = 63 + save_scope_as = actor_father + } + hidden_effect = { + scope:actor_father ?= { + silent_disappearance_effect = yes + } + } + create_character = { + template = bp1_doppelganger_template + location = root.location + culture = scope:unruly_province.culture + faith = scope:unruly_province.faith + mother = scope:actor_mother + father = scope:actor_father + random_traits = yes + gender = male + age = 31 + save_scope_as = peasant_actor_eldest + } + hidden_effect = { + scope:peasant_actor_eldest = { + copy_inheritable_appearance_from = scope:unruly_province_owner + } + } + create_character = { + template = peasant_character + location = root.location + culture = scope:unruly_province.culture + faith = scope:unruly_province.faith + mother = scope:actor_mother + father = scope:actor_father + random_traits = yes + gender = male + age = 28 + save_scope_as = peasant_actor_middle + } + create_character = { + template = peasant_character + location = root.location + culture = scope:unruly_province.culture + faith = scope:unruly_province.faith + mother = scope:actor_mother + father = scope:actor_father + random_traits = yes + gender = male + age = 27 + save_scope_as = peasant_actor_youngest + } + } + + option = { #Actually, the actors are mine and I want them back. + name = mpo_events_tova.0003.a + custom_tooltip = mpo_events_tova.0003.a.tt + + duel = { + skill = intrigue + target = scope:stray_executioner + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0003.a.tt.success + send_interface_toast = { + title = mpo_events_tova.0003.a.tt.success + add_courtier = scope:peasant_actor_eldest + add_courtier = scope:peasant_actor_middle + add_courtier = scope:peasant_actor_youngest + root = { + add_character_modifier = { + modifier = charlatan_inspiration + years = 5 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0003.a.tt.failure + send_interface_toast = { + title = mpo_events_tova.0003.a.tt.failure + left_icon = scope:unruly_province_owner + reverse_add_opinion = { + target = scope:unruly_province_owner + modifier = insult_opinion + opinion = -25 + } + scope:peasant_actor_eldest = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + scope:peasant_actor_middle = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + scope:peasant_actor_youngest = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + } + } + } + } + + option = { #Convince the executioner to spare the prisoners' lives. + name = mpo_events_tova.0003.b + custom_tooltip = mpo_events_tova.0003.b.tt + + duel = { + skill = diplomacy + target = scope:stray_executioner + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0003.b.tt.success + send_interface_toast = { + title = mpo_events_tova.0003.b.tt.success + left_icon = scope:unruly_province_owner + add_prestige = medium_prestige_gain + add_piety = medium_piety_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0003.b.tt.failure + send_interface_toast = { + title = mpo_events_tova.0003.b.tt.failure + left_icon = scope:unruly_province_owner + reverse_add_opinion = { + target = scope:unruly_province_owner + modifier = insult_opinion + opinion = -25 + } + scope:peasant_actor_eldest = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + scope:peasant_actor_middle = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + scope:peasant_actor_youngest = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + } + } + } + } + + option = { #I have places to be. + name = mpo_events_tova.0003.c + + scope:peasant_actor_eldest = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + scope:peasant_actor_middle = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + scope:peasant_actor_youngest = { + death = { + death_reason = death_execution + killer = scope:stray_executioner + } + } + + current_travel_plan = { + add_travel_plan_modifier = travel_speed_actor + } + + if = { + limit = { + root.faith = { + religion_tag = christianity_religion + } + has_trait = zealous + } + add_stress = medium_stress_loss + } + else_if = { + limit = { + NOT = { + has_trait = sadistic + has_trait = vengeful + has_trait = compassionate + } + } + add_stress = medium_stress_gain + } + else = { + stress_impact = { + sadistic = minor_stress_impact_loss + vengeful = minor_stress_impact_loss + compassionate = major_stress_impact_gain + } + } + } + after = { + scope:stray_executioner = { + silent_disappearance_effect = yes + } + } +} + +mpo_events_tova.0004 = { #Rank Disloyalty + type = character_event + title = mpo_events_tova.0004.t + desc = mpo_events_tova.0004.desc + + theme = migration + + override_background = { + reference = bp1_bonfire + } + cooldown = { years = 20 } + + left_portrait = { + character = root + animation = anger + } + + right_portrait = { + character = scope:maa_leader + animation = drink + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_travelling_adult = yes + is_landed = yes + is_ai = no + is_location_valid_for_travel_event_on_land = yes + exists = location.county.holder + location.county.holder = root + location = { + has_stationed_regiment = yes + } + location.county = { + county_opinion <= -10 + } + } + + immediate = { + location = { + save_scope_as = maa_province + } + create_character = { + template = new_warrior_character + location = root.location + culture = root.culture + faith = root.faith + trait = drunkard + gender = male + save_scope_as = maa_leader + } + } + + option = { #Stricter rations will teach them dicipline. + name = mpo_events_tova.0004.a + flavor = mpo_events_tova.0004.a.flavor + custom_tooltip = mpo_events_tova.0004.a.tt + + add_short_term_gold = medium_gold_value + + scope:maa_province = { + add_province_modifier = { + modifier = sold_provisions + years = 5 + } + } + + stress_impact = { + greedy = medium_stress_impact_loss + } + + hidden_effect = { + random = { + chance = 15 + trigger_event = { + ID = mpo_events_tova.0006 + days = { 2 3 } + } + } + } + } + option = { #I will have the leader's head. + name = mpo_events_tova.0004.b + custom_tooltip = mpo_events_tova.0004.b.tt + + scope:maa_province = { + add_province_modifier = { + modifier = diminished_regiment + years = 5 + } + } + add_character_modifier = { + modifier = reluctant_recruits + years = 5 + } + + if = { + limit = { + OR = { + has_trait = sadistic + has_trait = vengeful + has_trait = wrathful + } + } + add_stress = medium_stress_loss + } + else_if = { + limit = { + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = calm + } + } + add_stress = medium_stress_gain + } + else = { + add_stress = minor_stress_gain + } + } + option = { #I will pay for better provisions. + name = mpo_events_tova.0004.c + + remove_treasury_or_gold = medium_treasury_or_gold_value + + add_character_modifier = { + modifier = celebrated_leader + years = 5 + } + + stress_impact = { + greedy = medium_stress_impact_gain + generous = medium_stress_impact_loss + } + ai_chance = { + base = 1 + modifier = { + treasury_or_gold <= major_treasury_or_gold_value + factor = 0 + } + } + } + after = { + scope:maa_leader = { + silent_disappearance_effect = yes + } + } +} + +mpo_events_tova.0005 = { #Happy Soldiers + title = mpo_events_tova.0005.t + desc = mpo_events_tova.0005.desc + type = character_event + + theme = migration + + override_background = { reference = bp1_bonfire } + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:maa_happy_leader + animation = drink + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_travelling_adult = yes + is_landed = yes + is_ai = no + is_location_valid_for_travel_event_on_land = yes + days_of_continuous_peace = 365 + exists = location.county.holder + location.county.holder = root + location = { + has_stationed_regiment = yes + } + location.county = { + county_opinion >= 10 + } + } + + immediate = { + location = { + save_scope_as = maa_happy_province + } + create_character = { + template = new_warrior_character + location = root.location + culture = root.culture + faith = root.faith + gender = male + save_scope_as = maa_happy_leader + } + } + + option = { #Whip the lazy bums into shape + name = mpo_events_tova.0005.a + + scope:maa_happy_province = { + add_province_modifier = { + modifier = whipped_soldiers + years = 5 + } + } + + stress_impact = { + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + } + + option = { #Dicipline them for not being vigilant. + name = mpo_events_tova.0005.b + + add_character_modifier = { + modifier = alert_soldiers + years = 5 + } + stress_impact = { + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + } + + option = { #Take their happiness and kind words to heart. + name = mpo_events_tova.0005.c + + stress_impact = { + base = major_stress_loss + paranoid = minor_stress_impact_gain + } + } +} + +mpo_events_tova.0006 = { #Just Desserts + opening = mpo_events_tova.0006.t + desc = mpo_events_tova.0006.desc + type = letter_event + + sender = scope:sender + + immediate = { + if = { + limit = { + exists = cp:councillor_steward + } + cp:councillor_steward = { + save_scope_as = sender + } + } + else_if = { + limit = { + exists = cp:councillor_marshal + } + cp:councillor_marshal = { + save_scope_as = sender + } + } + else_if = { + limit = { + exists = cp:councillor_chancellor + } + cp:councillor_chancellor = { + save_scope_as = sender + } + } + } + + trigger = { + OR = { + exists = cp:councillor_steward + exists = cp:councillor_marshal + exists = cp:councillor_chancellor + } + } + + option = { #Hunger makes men desperate, it seems. + name = mpo_events_tova.0006.a + + scope:maa_province.county = { + change_development_level = -2 + } + } +} + +mpo_events_tova.0025 = { # You are invited to a knucklebone shooting game + type = character_event + title = mpo_events_tova.0025.t + desc = mpo_events_tova.0025.desc + + theme = nomads + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = interested + } + + right_portrait = { + character = scope:challenger_anda + animation = hero_flex + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + is_available_adult = yes + any_courtier = { + has_relation_blood_brother = root + is_available_ai_adult = yes + } + } + + immediate = { + random_courtier = { + limit = { + has_relation_blood_brother = root + is_available_ai_adult = yes + } + save_scope_as = challenger_anda + } + } + + option = { # I will outsmart them all! + name = mpo_events_tova.0025.a + duel = { + skill = intrigue + target = scope:challenger_anda + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0025.a.tt.success + send_interface_toast = { + title = mpo_events_tova.0025.a.tt.success + left_icon = root + right_icon = scope:challenger_anda + reverse_add_opinion = { + target = scope:challenger_anda + modifier = impressed_opinion + opinion = 25 + } + add_character_modifier = { + modifier = mpo_sharp_wits_modifier + years = 10 + } + stress_impact = { + deceitful = minor_stress_loss + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0025.a.tt.failure + send_interface_toast = { + title = mpo_events_tova.0025.a.tt.failure + left_icon = root + reverse_add_opinion = { + target = scope:challenger_anda + modifier = disappointed_opinion + opinion = -25 + } + add_prestige = minor_prestige_loss + stress_impact = { + just = minor_stress_gain + honest = minor_stress_gain + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -2 + ai_compassion = -1 + ai_rationality = -1 + ai_boldness = -1 + } + } + } + + option = { # I will crush my opponents' tokens! + name = mpo_events_tova.0025.b + duel = { + skill = prowess + target = scope:challenger_anda + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0025.b.tt.success + send_interface_toast = { + title = mpo_events_tova.0025.b.tt.success + left_icon = root + right_icon = scope:challenger_anda + reverse_add_opinion = { + target = scope:challenger_anda + modifier = impressed_opinion + opinion = 25 + } + add_character_modifier = { + modifier = mpo_thunder_knuckles_modifier + years = 10 + } + stress_impact = { + ambitious = medium_stress_impact_loss + + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_events_tova.0025.b.tt.failure + send_interface_toast = { + title = mpo_events_tova.0025.b.tt.failure + left_icon = scope:challenger_anda + reverse_add_opinion = { + target = scope:challenger_anda + modifier = disappointed_opinion + opinion = -25 + } + add_prestige = minor_prestige_loss + stress_impact = { + brave = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_sociability = 0.5 + } + modifier = { + OR = { + has_trait = lazy + has_trait = craven + } + factor = 0 + } + } + } + + option = { # Nah + name = mpo_events_tova.0025.c + ai_chance = { + base = 100 + modifier = { + has_trait = lazy + factor = 20 + } + } + } +} + +mpo_events_tova.0030 = { # No astrologer? Someone comes to you with a vision + type = character_event + title = mpo_events_tova.0030.t + desc = { + desc = mpo_events_tova.0030.desc + random_valid = { + desc = mpo_events_tova.0030.desc_red + desc = mpo_events_tova.0030.desc_white + desc = mpo_events_tova.0030.desc_green + } + desc = mpo_events_tova.0030.desc_outro + } + + theme = nomads + override_background = { reference = mpo_steppe_evening } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = interested + } + + right_portrait = { + character = scope:visionary + animation = personality_zealous + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + NOT = { + employs_court_position = court_astrologer_court_position + } + any_courtier_or_guest = { + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + can_be_employed_as = court_astrologer_court_position + } + + } + + immediate = { + ordered_courtier = { + limit = { + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + can_be_employed_as = court_astrologer_court_position + } + order_by = { + value = learning + if = { + limit = { has_trait = lifestyle_mystic } + add = 2 + } + } + if = { + limit = { + NOT = { has_trait = lifestyle_mystic } + } + add_trait = lifestyle_mystic + } + else = { + add_learning_skill = 2 + } + save_scope_as = visionary + } + } + + option = { # You are truly blessed with special talents! + name = mpo_events_tova.0030.a + add_hook = { + target = scope:visionary + type = obligation_hook + } + custom_tooltip = obligation_hook_tt + court_position_grant_effect = { + EMPLOYER = root + POS = court_astrologer + CANDIDATE = scope:visionary + } + reverse_add_opinion = { + target = scope:visionary + modifier = grateful_opinion + opinion = 30 + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_zeal = 1 + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + option = { # The heavens must favor me and my deeds + name = mpo_events_tova.0030.b + if = { + limit = { + has_focus_martial = yes + } + add_character_modifier = { + modifier = mpo_heavens_favor_martial_modifier + years = 10 + } + } + else_if = { + limit = { + has_focus_intrigue = yes + } + add_character_modifier = { + modifier = mpo_heavens_favor_modifier + years = 10 + } + } + else_if = { + limit = { + has_focus_diplomacy = yes + } + add_character_modifier = { + modifier = mpo_heavens_favor_diplo_modifier + years = 10 + } + } + else = { + add_legitimacy = medium_legitimacy_gain + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_greed = -1 + } + } + } + + option = { # What a story! + name = mpo_events_tova.0030.c + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +mpo_events_tova.0035 = { # Anda comes to you with marital concerns + type = character_event + title = mpo_events_tova.0035.t + desc = mpo_events_tova.0035.desc + + theme = nomads + override_background = { reference = mpo_tent_interior_mongol } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = shock + } + + right_portrait = { + character = scope:distressed_anda + animation = worry + } + + lower_right_portrait = { + character = scope:pregnant_woman + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_courtier = { + has_relation_blood_brother = root + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + is_married = yes + is_male = yes + is_attracted_to_women = yes + primary_spouse = { + can_have_children = yes + is_available_ai = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 3 + any_courtier = { + has_relation_blood_brother = root + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + is_married = yes + is_male = yes + is_attracted_to_women = yes + primary_spouse = { + is_pregnant = yes + } + } + } + modifier = { + add = -0.5 + any_courtier = { + has_relation_blood_brother = root + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + is_married = yes + is_male = yes + is_attracted_to_women = yes + primary_spouse = { + is_pregnant = no + } + } + } + } + + immediate = { + random_courtier = { + limit = { + has_relation_blood_brother = root + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + is_married = yes + is_male = yes + is_attracted_to_women = yes + primary_spouse = { + can_have_children = yes + is_available_ai = yes + } + } + save_scope_as = distressed_anda + } + scope:distressed_anda = { + primary_spouse = { + save_scope_as = pregnant_woman + } + } + hidden_effect = { + scope:pregnant_woman = { + if = { + limit = { + NOT = { + has_trait = pregnant + } + } + make_pregnant = { father = scope:distressed_anda } + } + } + } + } + + option = { # Rejoice! The heavens sent you a child. + name = mpo_events_tova.0035.a + custom_tooltip = mpo_events_tova.0035.a.tt + add_piety = medium_piety_gain + reverse_add_opinion = { + target = scope:pregnant_woman + modifier = grateful_opinion + opinion = 30 + } + hidden_effect = { + random = { + chance = 33 + scope:pregnant_woman = { + add_character_flag = blessed_baby + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { # Blatant lies! + name = mpo_events_tova.0035.b + scope:distressed_anda = { + divorce_effect = { + DIVORCER = scope:distressed_anda + DIVORCEE = scope:pregnant_woman + } + random = { + chance = 33 + if = { + limit = { + NOT = { + has_trait = shrewd + } + } + add_trait = shrewd + } + else = { add_intrigue_skill = 2 } + } + } + reverse_add_opinion = { + target = scope:distressed_anda + modifier = grateful_opinion + opinion = 30 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + } + modifier = { + has_trait = compassionate + factor = 0 + } + } + } + + option = { # That is the funniest thing I ever heard! + name = mpo_events_tova.0035.c + stress_impact = { + base = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + reverse_add_opinion = { + target = scope:distressed_anda + modifier = insulted_opinion + opinion = -30 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + } + } + } +} + +mpo_events_tova.0045 = { # Anda comes bearing gifts + type = character_event + title = mpo_events_tova.0045.t + desc = { + desc = mpo_events_tova.0045.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:knucklebone_gift } + desc = mpo_events_tova.0045.desc_knucklebone + } + triggered_desc = { + trigger = { exists = scope:herd_gift } + desc = mpo_events_tova.0045.desc_herd + } + desc = mpo_events_tova.0045.desc_axe + } + } + + theme = nomads + override_background = { reference = mpo_campfire_steppe } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:generous_anda + triggered_animation = { + trigger = { + exists = scope:knucklebone_gift + } + animation = steward + } + triggered_animation = { + trigger = { + exists = scope:herd_gift + } + animation = admiration + } + animation = marshal_axe + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + culture = { + OR = { + has_cultural_pillar = heritage_mongolic + has_cultural_pillar = heritage_turkic + } + } + is_available_adult = yes + any_courtier = { + has_relation_blood_brother = root + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + } + NOT = { + AND = { + has_character_flag = knucklebone_gift + has_character_flag = herd_gift + has_character_flag = axe_gift + } + } + } + + immediate = { + random_courtier = { + limit = { + has_relation_blood_brother = root + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + } + save_scope_as = generous_anda + } + random_list = { + 3 = { + trigger = { + NOT = { + has_character_flag = knucklebone_gift + } + } + hidden_effect = { + create_artifact = { + name = gifted_bone_name + description = gifted_bone_desc + modifier = artifact_monthly_prestige_3_modifier + type = miscellaneous + visuals = pocket_pouch + save_scope_as = gift + } + } + add_character_flag = knucklebone_gift + save_scope_as = knucklebone_gift + } + 3 = { + trigger = { + NOT = { + has_character_flag = herd_gift + domicile = { + herd >= major_herd_value + } + } + } + add_character_flag = herd_gift + save_scope_as = herd_gift + } + 3 = { + trigger = { + NOT = { + has_character_flag = axe_gift + } + } + hidden_effect = { + create_artifact = { + name = gifted_axe_name + description = gifted_axe_desc + modifier = artifact_prowess_3_modifier + type = axe + visuals = axe + save_scope_as = gift + } + } + add_character_flag = axe_gift + } + } + } + + option = { # I will treasure this gift. + name = mpo_events_tova.0045.a + if = { + limit = { + exists = scope:gift + } + send_interface_toast = { + title = mpo_events_tova.0045.a.equipped_tt + left_icon = root + right_icon = scope:gift + scope:gift = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_owner = { + target = root + history = { + location = root.capital_province + actor = scope:generous_anda + recipient = root + type = given + } + } + } + } + } + else = { + domicile ?= { change_herd = medium_herd_gain } + } + + stress_impact = { + greedy = medium_stress_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # Your friendship is the only gift I need. + name = mpo_events_tova.0045.b + if = { + limit = { + exists = scope:gift + } + send_interface_toast = { + title = mpo_events_tova.0045.a.equipped_tt + left_icon = scope:generous_anda + right_icon = scope:gift + scope:gift = { + set_variable = { + name = suppress_artifact_notifications + value = yes + days = 1 + } + set_owner = { + target = scope:generous_anda + history = { + location = root.capital_province + actor = scope:generous_anda + recipient = scope:generous_anda + type = given + } + } + } + } + } + reverse_add_opinion = { + target = scope:generous_anda + modifier = grateful_opinion + opinion = 30 + } + + stress_impact = { + base = medium_stress_impact_loss + greedy = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_sociability = 0.5 + } + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_flavor_events_settled.txt b/N3OW/events/dlc/mpo/mpo_flavor_events_settled.txt new file mode 100644 index 00000000..ce2551ef --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_flavor_events_settled.txt @@ -0,0 +1,453 @@ +namespace = mpo_flavor_events_settled + +# mpo_flavor_events_settled.0001 - You hear of a Havsarsan Zud +# mpo_flavor_events_settled.0010 - Horse Lord at your door + +####################### +# You hear of a Havsarsan Zud +####################### +mpo_flavor_events_settled.0001 = { + type = character_event + title = mpo_flavor_events_settled.0001.t + desc = mpo_flavor_events_settled.0001.desc + theme = nomads + override_background = { reference = ep3_city_gate } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + OR = { + has_trait = brave + has_trait = arrogant + } + } + animation = dismissal + } + animation = worry + } + right_portrait = { + character = scope:nomad + animation = horse_exhausted + camera = camera_event_horse_right + } + widget = { + gui = "event_window_widget_vfx_snowstorm" + container = "foreground_shader_vfx_container" + } + cooldown = { years = 10 } + + trigger = { + has_mpo_dlc_trigger = yes + NOT = { government_has_flag = government_is_nomadic } + OR = { + any_character_situation = { # You are a settled ruler in the Great Steppe + any_participant_group = { + participant_group_type = settled_rulers + participant_group_has_character = root + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + any_sub_realm_county = { # You are neighbouring the Great Steppe + any_neighboring_county = { + holder != root + any_county_situation = { + situation:the_great_steppe ?= this + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + } + } + } + } + } + } + + immediate = { + if = { + limit = { + any_neighboring_top_liege_realm_owner = { + government_has_flag = government_is_nomadic + } + } + random_neighboring_top_liege_realm_owner = { + limit = { government_has_flag = government_is_nomadic } + save_scope_as = nomad_lord + } + } + else = { + random_ruler = { + limit = { + in_diplomatic_range = root + government_has_flag = government_is_nomadic + } + save_scope_as = nomad_lord + } + } + create_character = { + location = root.location + template = nomadic_hunter_template + faith = scope:nomad_lord.faith + culture = scope:nomad_lord.culture + save_scope_as = nomad + } + scope:nomad = { add_trait = nomadic_philosophy } + } + + option = { # Get out + name = mpo_flavor_events_settled.0001.aa + reason = faith + add_internal_flag = special + trigger = { + faith = { + trait_is_virtue = callous + } + } + add_piety = medium_piety_gain + stress_impact = { + callous = major_stress_impact_loss + generous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + has_trait = callous + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = paranoid + } + } + } + } + + option = { # Let's prepare + name = mpo_flavor_events_settled.0001.a + remove_short_term_gold = medium_gold_value + every_sub_realm_county = { + limit = { holder = root } + add_county_modifier = { + modifier = mpo_settled_preparations_war_county_modifier + years = 15 + } + } + stress_impact = { + wrathful = medium_stress_impact_loss + brave = medium_stress_impact_loss + craven = medium_stress_impact_gain + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = wrathful + has_trait = brave + } + factor = 0 + } + modifier = { + OR = { + short_term_gold <= major_gold_value + has_trait = greedy + has_trait = avaricious + has_trait = craven + } + factor = 0 + } + } + } + + option = { # We should focus on building + name = mpo_flavor_events_settled.0001.b + every_sub_realm_county = { + limit = { holder = root } + add_county_modifier = { + modifier = mpo_settled_preparations_building_county_modifier + years = 10 + } + } + stress_impact = { + compassionate = major_stress_impact_loss + greedy = medium_stress_impact_gain + avaricious = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # Recruit this guy + name = mpo_flavor_events_settled.0001.c + trigger = { + NOT = { + faith = { + trait_is_virtue = callous + } + } + } + add_courtier = scope:nomad + if = { + limit = { + faith = { trait_is_virtue = compassionate } + } + add_piety = major_piety_gain + } + else = { + add_piety = medium_piety_gain + } + stress_impact = { + compassionate = major_stress_impact_loss + callous = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { + custom_tooltip = mpo_flavor_events_settled.0001.tt + if = { + limit = { is_ai = yes } + scope:nomad = { silent_disappearance_effect = yes } + } + } +} + +####################### +# Horse Lord at your door +####################### +scripted_trigger mpo_flavor_events_settled_0010_valid_nomad_lord_trigger = { + government_has_flag = government_is_nomadic + NOR = { + is_close_family_of = root + is_vassal_of = root + is_tributary_of = root + this = root.liege + this = root.suzerain + } + any_character_situation = { + situation:the_great_steppe ?= this + } +} + +mpo_flavor_events_settled.0010 = { + type = character_event + title = mpo_flavor_events_settled.0010.t + desc = mpo_flavor_events_settled.0010.desc + theme = nomads + override_background = { reference = ep3_city_gate } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:nomad + animation = horse_conversing_left + camera = camera_event_horse_right + } + lower_right_portrait = scope:nomad_lord + cooldown = { years = 10 } + + trigger = { + has_mpo_dlc_trigger = yes + NOT = { government_has_flag = government_is_nomadic } + any_neighboring_top_liege_realm_owner = { + mpo_flavor_events_settled_0010_valid_nomad_lord_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_neighboring_top_liege_realm_owner = { + government_has_flag = government_is_nomadic + highest_held_title_tier >= tier_kingdom + } + factor = 2 + } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { + limit = { mpo_flavor_events_settled_0010_valid_nomad_lord_trigger = yes } + weight = { + base = 1 + modifier = { + highest_held_title_tier >= tier_kingdom + add = 5 + } + } + save_scope_as = nomad_lord + } + create_character = { + location = root.location + template = nomadic_commander_template + faith = scope:nomad_lord.faith + culture = scope:nomad_lord.culture + save_scope_as = nomad + } + hidden_effect = { + scope:nomad = { add_trait = nomadic_philosophy } + scope:nomad_lord = { add_courtier = scope:nomad } + } + } + + option = { # Pay tribute + name = mpo_flavor_events_settled.0010.a + trigger = { + OR = { + scope:nomad_lord.primary_title.tier > root.primary_title.tier + scope:nomad_lord.current_military_strength > root.current_military_strength + } + } + start_tributary_interaction_effect = { + TRIBUTARY = root + SUZERAIN = scope:nomad_lord + } + scope:nomad_lord = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 25 + } + } + add_prestige = medium_prestige_gain + stress_impact = { + vengeful = major_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 0 + } + } + + option = { # Pay to get truce + name = mpo_flavor_events_settled.0010.b + trigger = { + NOR = { + scope:nomad_lord.primary_title.tier > root.primary_title.tier + scope:nomad_lord.current_military_strength > root.current_military_strength + } + } + if = { + limit = { + has_perk = defensive_measures_perk + } + custom_tooltip = mpo_flavor_events_settled.0010.b_perk_tt + pay_short_term_gold = { + target = scope:nomad_lord + gold = root.purchase_truce_interaction_small_sum + } + add_truce_both_ways = { + character = scope:nomad_lord + days = purchase_truce_interaction_truce_days_medium_value + name = TRUCE_PURCHASED + } + } + else = { + pay_short_term_gold = { + target = scope:nomad_lord + gold = root.purchase_truce_interaction_medium_sum + } + add_truce_both_ways = { + character = scope:nomad_lord + days = purchase_truce_interaction_truce_days_medium_value + name = TRUCE_PURCHASED + } + } + stress_impact = { + brave = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + OR = { + has_trait = content + has_trait = craven + } + factor = 2 + } + modifier = { + OR = { + has_trait = brave + has_trait = ambitious + has_trait = arrogant + has_trait = greedy + gold <= root.purchase_truce_interaction_major_sum + } + factor = 0 + } + } + } + + option = { # Offend them + name = mpo_flavor_events_settled.0010.c + add_dread = medium_dread_value + scope:nomad_lord = { + progress_towards_rival_effect = { + CHARACTER = root + OPINION = -40 + REASON = rival_disrespected_envoy + } + } + stress_impact = { + callous = major_stress_impact_loss + craven = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 150 + has_trait = callous + current_military_strength > scope:nomad_lord.current_military_strength + } + } + } + + option = { # Let's just be friends + name = mpo_flavor_events_settled.0010.d + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + scope:nomad_lord = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + stress_impact = { + gregarious = medium_stress_impact_loss + } + ai_chance = { + base = 200 + } + } + + after = { + if = { + limit = { is_ai = yes } + scope:nomad = { silent_disappearance_effect = yes } + } + } +} \ No newline at end of file diff --git a/N3OW/events/dlc/mpo/mpo_interactions_events.txt b/N3OW/events/dlc/mpo/mpo_interactions_events.txt new file mode 100644 index 00000000..e66e03d5 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_interactions_events.txt @@ -0,0 +1,1120 @@ +namespace = mpo_interactions_events + +# # # OFFER CONFEDERATION # # # + +#Handles effects of offer confederation and assigns events +mpo_interactions_events.0001 = { + hidden = yes + + trigger = { + scope:actor = { + is_ruler = yes + is_landed = yes + } + scope:recipient = { + is_ruler = yes + is_landed = yes + } + } + + immediate = { + #Confederation doesn't exist and actor is becoming liege + if = { + limit = { + scope:actor = { + is_confederation_member = no + } + } + scope:actor = { + #create culturally-named duchy title if you both have same culture + if = { + limit = { + culture = { + this = scope:recipient.culture + } + NOT = { + any_confederation = { + has_variable = confederation_culture + var:confederation_culture = scope:actor.culture + } + } + } + create_confederation = { + name = CONFEDERATION_CULTURE_NAME + } + scope:new_confederation = { + set_variable = { + name = confederation_culture + value = scope:actor.culture + } + + } + } + #Duchy title fallback + else = { + #You two are in the same duchy, name it after that + if = { + limit = { + exists = scope:recipient.capital_county + capital_county.duchy = { + any_de_jure_county = { + this = scope:recipient.capital_county + } + } + } + capital_county = { + duchy = { + save_scope_as = capital_duchy + } + } + } + #You are a duke, name it after your duchy + else_if = { + limit = { + primary_title = { + tier = tier_duchy + any_de_jure_county = { + holder = scope:recipient + } + } + } + primary_title = { + save_scope_as = capital_duchy + } + } + #Name after your capital duchy + else = { + capital_county = { + duchy = { + save_scope_as = capital_duchy + } + } + } + create_confederation = { + name = CONFEDERATION_DUCHY_NAME + } + } + scope:recipient = { + save_scope_as = other_confederate + } + trigger_event = { + id = mpo_interactions_events.0002 + days = 1 + } + } + scope:new_confederation = { + add_confederation_member = scope:recipient + } + } + #Confederation already exists + else = { + scope:actor.confederation = { + add_confederation_member = scope:recipient + } + #letter event + scope:actor = { + trigger_event = { + id = mpo_interactions_events.0003 + days = 1 + } + } + } + #Vassal event + scope:actor = { + save_scope_as = other_confederate + } + scope:recipient = { + trigger_event = { + id = mpo_interactions_events.0002 + days = 1 + } + } + } +} + +#Confederation event +mpo_interactions_events.0002 = { + type = character_event + theme = vassal + title = mpo_interactions_events.0002.t + desc = { + desc = mpo_interactions_events.0002.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:new_confederation + } + desc = mpo_interactions_events.0002.desc_new + } + desc = mpo_interactions_events.0002.desc_joining + } + } + override_background = { + reference = bp1_bonfire + } + override_effect_2d = { + reference = smoke + } + left_portrait = { + character = root + animation = marshal_dagger + camera = camera_event_very_left + } + right_portrait = { + character = scope:other_confederate + animation = marshal_dagger + camera = camera_event_very_right + } + immediate = { + confederation = { + save_scope_as = confederation + } + if = { + limit = { + exists = scope:new_confederation + } + custom_tooltip = new_confederation_created_tt + } + else = { + custom_tooltip = joined_confederation_tt + } + custom_tooltip = confederation_defensive_wars_tt + custom_tooltip = unlock_leave_confederation_interaction_tt + show_as_tooltip = { + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = mpo_confederation_member_modifier + years = 5 + } + capital_county ?= { + change_county_fertility = major_county_fertility_level_gain + } + } + } + custom_tooltip = confederation_raiding_attacking_tt + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_restrictions_warning_tt + } + else = { + custom_tooltip = confederation_restrictions_tribe_warning_tt + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + custom_tooltip = confederation_migrating_leaving_warning_tt + } + } + #Accept + option = { + name = mpo_interactions_events.0002.a + } +} + +#Confederation acceptance letter event +mpo_interactions_events.0003 = { + type = letter_event + sender = scope:recipient + opening = { + desc = mpo_interactions_events.0003.opening + } + desc = mpo_interactions_events.0003.desc + + immediate = { + confederation = { + save_scope_as = confederation + } + custom_tooltip = recipient_joined_confederation_tt + } + + #Accept + option = { + name = mpo_interactions_events.0003.a + } +} + +#Confderation rejection letter event +mpo_interactions_events.0004 = { + type = letter_event + sender = scope:recipient + opening = { + desc = mpo_interactions_events.0004.opening + } + desc = { + desc = mpo_interactions_events.0004.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:asking_to_join + } + desc = mpo_interactions_events.0004.desc_join + } + desc = mpo_interactions_events.0004.desc_offer + } + } + + #Accept + option = { + name = mpo_interactions_events.0004.a + } +} + +# # # TEACH COMMANDER TRAITS # # # + +# Ward's Martial Drill - Success Event +mpo_interactions_events.0101 = { + type = character_event + title = mpo_interactions_events.0101.t + desc = { + desc = mpo_interactions_events.0101.desc_intro + first_valid = { + triggered_desc = { + trigger = { scope:target_trait = trait:logistician } + desc = mpo_interactions_events.0101.desc_logistician + } + triggered_desc = { + trigger = { scope:target_trait = trait:military_engineer } + desc = mpo_interactions_events.0101.desc_military_engineer + } + triggered_desc = { + trigger = { scope:target_trait = trait:aggressive_attacker } + desc = mpo_interactions_events.0101.desc_aggressive_attacker + } + triggered_desc = { + trigger = { scope:target_trait = trait:unyielding_defender } + desc = mpo_interactions_events.0101.desc_unyielding_defender + } + triggered_desc = { + trigger = { scope:target_trait = trait:forder } + desc = mpo_interactions_events.0101.desc_forder + } + triggered_desc = { + trigger = { scope:target_trait = trait:flexible_leader } + desc = mpo_interactions_events.0101.desc_flexible_leader + } + triggered_desc = { + trigger = { scope:target_trait = trait:desert_warrior } + desc = mpo_interactions_events.0101.desc_desert_warrior + } + triggered_desc = { + trigger = { scope:target_trait = trait:jungle_stalker } + desc = mpo_interactions_events.0101.desc_jungle_stalker + } + triggered_desc = { + trigger = { scope:target_trait = trait:reaver } + desc = mpo_interactions_events.0101.desc_reaver + } + triggered_desc = { + trigger = { scope:target_trait = trait:reckless } + desc = mpo_interactions_events.0101.desc_reckless + } + triggered_desc = { + trigger = { scope:target_trait = trait:holy_warrior } + desc = mpo_interactions_events.0101.desc_holy_warrior + } + triggered_desc = { + trigger = { scope:target_trait = trait:open_terrain_expert } + desc = mpo_interactions_events.0101.desc_open_terrain_expert + } + triggered_desc = { + trigger = { scope:target_trait = trait:rough_terrain_expert} + desc = mpo_interactions_events.0101.desc_rough_terrain_expert + } + triggered_desc = { + trigger = { scope:target_trait = trait:forest_fighter } + desc = mpo_interactions_events.0101.desc_forest_fighter + } + triggered_desc = { + trigger = { scope:target_trait = trait:cautious_leader } + desc = mpo_interactions_events.0101.desc_cautious_leader + } + triggered_desc = { + trigger = { scope:target_trait = trait:organizer } + desc = mpo_interactions_events.0101.desc_organizer + } + triggered_desc = { + trigger = { scope:target_trait = trait:winter_soldier } + desc = mpo_interactions_events.0101.desc_winter_soldier + } + } + } + theme = martial + override_background = { + trigger = { scope:target_trait = trait:open_terrain_expert } + reference = wilderness_steppe + } + override_background = { + trigger = { scope:target_trait = trait:rough_terrain_expert } + reference = wilderness_mountains + } + override_background = { + trigger = { scope:target_trait = trait:jungle_stalker } + reference = wilderness_jungle + } + override_background = { + trigger = { scope:target_trait = trait:winter_soldier } + reference = ep2_hunt_snowy_forest + } + override_background = { + trigger = { scope:target_trait = trait:desert_warrior } + reference = wilderness_desert + } + override_background = { + trigger = { scope:target_trait = trait:forest_fighter } + reference = wilderness_forest + } + override_background = { + trigger = { + OR = { + scope:target_trait = trait:reckless + scope:target_trait = trait:forder + } + } + reference = ep2_travel_bridge + } + override_background = { + reference = army_camp + } + widget = { + is_shown = { + location = { has_winter_trigger = yes } + scope:target_trait = trait:winter_soldier + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:recipient + animation = wooden_sword_coup_degrace + } + + trigger = { + exists = scope:target_trait + } + + immediate = { + } + + option = { + name = mpo_interactions_events.0101.a + flavor = mpo_interactions_events.0101.a.flavor + add_opinion = { + target = scope:recipient + modifier = pleased_opinion + opinion = 20 + } + scope:recipient = { + add_trait = scope:target_trait + add_opinion = { + target = root + modifier = admiration_opinion + opinion = 20 + } + } + if = { + limit = { + scope:recipient = { + any_parent = { + NOT = { this = root } + is_ai = no + } + } + } + scope:recipient = { + every_parent = { + limit = { + NOT = { this = root } + is_ai = no + } + send_interface_message = { + type = event_childhood_good_text + title = guardian_influenced_commander + desc = guardian_influenced_commander_desc + left_icon = scope:recipient + right_icon = scope:actor + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + } + } +} + +# Ward's Martial Drill - Failure Event +mpo_interactions_events.0102 = { + type = character_event + title = mpo_interactions_events.0102.t + desc = { + desc = mpo_interactions_events.0102.desc_intro + first_valid = { + triggered_desc = { + trigger = { scope:target_trait = trait:logistician } + desc = mpo_interactions_events.0102.desc_logistician + } + triggered_desc = { + trigger = { scope:target_trait = trait:military_engineer } + desc = mpo_interactions_events.0102.desc_military_engineer + } + triggered_desc = { + trigger = { scope:target_trait = trait:aggressive_attacker } + desc = mpo_interactions_events.0102.desc_aggressive_attacker + } + triggered_desc = { + trigger = { scope:target_trait = trait:unyielding_defender } + desc = mpo_interactions_events.0102.desc_unyielding_defender + } + triggered_desc = { + trigger = { scope:target_trait = trait:forder } + desc = mpo_interactions_events.0102.desc_forder + } + triggered_desc = { + trigger = { scope:target_trait = trait:flexible_leader } + desc = mpo_interactions_events.0102.desc_flexible_leader + } + triggered_desc = { + trigger = { scope:target_trait = trait:desert_warrior } + desc = mpo_interactions_events.0102.desc_desert_warrior + } + triggered_desc = { + trigger = { scope:target_trait = trait:jungle_stalker } + desc = mpo_interactions_events.0102.desc_jungle_stalker + } + triggered_desc = { + trigger = { scope:target_trait = trait:reaver } + desc = mpo_interactions_events.0102.desc_reaver + } + triggered_desc = { + trigger = { scope:target_trait = trait:reckless } + desc = mpo_interactions_events.0102.desc_reckless + } + triggered_desc = { + trigger = { scope:target_trait = trait:holy_warrior } + desc = mpo_interactions_events.0102.desc_holy_warrior + } + triggered_desc = { + trigger = { scope:target_trait = trait:open_terrain_expert } + desc = mpo_interactions_events.0102.desc_open_terrain_expert + } + triggered_desc = { + trigger = { scope:target_trait = trait:rough_terrain_expert} + desc = mpo_interactions_events.0102.desc_rough_terrain_expert + } + triggered_desc = { + trigger = { scope:target_trait = trait:forest_fighter } + desc = mpo_interactions_events.0102.desc_forest_fighter + } + triggered_desc = { + trigger = { scope:target_trait = trait:cautious_leader } + desc = mpo_interactions_events.0102.desc_cautious_leader + } + triggered_desc = { + trigger = { scope:target_trait = trait:organizer } + desc = mpo_interactions_events.0102.desc_organizer + } + triggered_desc = { + trigger = { scope:target_trait = trait:winter_soldier } + desc = mpo_interactions_events.0102.desc_winter_soldier + } + } + } + theme = martial + override_background = { + trigger = { scope:target_trait = trait:open_terrain_expert } + reference = wilderness_steppe + } + override_background = { + trigger = { scope:target_trait = trait:rough_terrain_expert } + reference = wilderness_mountains + } + override_background = { + trigger = { scope:target_trait = trait:jungle_stalker } + reference = wilderness_jungle + } + override_background = { + trigger = { scope:target_trait = trait:winter_soldier } + reference = ep2_hunt_snowy_forest + } + override_background = { + trigger = { scope:target_trait = trait:desert_warrior } + reference = wilderness_desert + } + override_background = { + trigger = { scope:target_trait = trait:forest_fighter } + reference = wilderness_forest + } + override_background = { + trigger = { scope:target_trait = trait:reckless } + reference = ep2_travel_bridge + } + override_background = { + reference = army_camp + } + + widget = { + is_shown = { + location = { has_winter_trigger = yes } + scope:target_trait = trait:winter_soldier + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + left_portrait = { + character = root + animation = menacing_wooden_sword + } + right_portrait = { + character = scope:recipient + animation = wooden_sword_yield_start + } + + option = { + name = mpo_interactions_events.0102.a + flavor = mpo_interactions_events.0102.a.flavor + scope:recipient = { + add_opinion = { + target = root + modifier = confused_opinion + opinion = -20 + } + } + add_opinion = { + target = scope:recipient + modifier = disappointed_opinion + opinion = -20 + } + if = { + limit = { + scope:recipient = { + any_parent = { + NOT = { this = root } + is_ai = no + } + } + } + scope:recipient = { + every_parent = { + limit = { + NOT = { this = root } + is_ai = no + } + send_interface_message = { + type = event_childhood_bad_text + title = guardian_influenced_commander_fail + desc = guardian_influenced_commander_fail_desc + left_icon = scope:recipient + right_icon = scope:actor + } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + } + } + + #force it + option = { + name = mpo_interactions_events.0102.b + flavor = mpo_interactions_events.0102.b.flavor + add_dread = 5 + add_prestige = medium_prestige_loss + scope:recipient = { + add_trait = scope:target_trait + add_opinion = { + target = root + modifier = confused_opinion + opinion = -40 + } + add_stress = medium_stress_impact_gain + } + if = { + limit = { + scope:recipient = { + any_parent = { + NOT = { this = root } + is_ai = no + } + } + } + scope:recipient = { + every_parent = { + limit = { + NOT = { this = root } + is_ai = no + } + send_interface_message = { + type = event_childhood_good_text + title = guardian_influenced_commander + desc = guardian_influenced_commander_desc + left_icon = scope:recipient + right_icon = scope:actor + } + } + } + } + stress_impact = { + base = medium_stress_impact_gain + } + + ai_chance = { + base = 0 #ai shouldn't inflate the trait count, so no access to forcing it through + } + } +} + +#Blood brother acceptance event for actor +mpo_interactions_events.0006 = { + type = character_event + theme = alliance + title = mpo_interactions_events.0006.t + desc = { + desc = mpo_interactions_events.0006.desc_intro + first_valid = { + triggered_desc = { + trigger = { + culture = { + has_cultural_pillar = heritage_mongolic + } + } + desc = mpo_interactions_events.0006.desc_anda + } + desc = mpo_interactions_events.0006.desc_no_anda + } + desc = mpo_interactions_events.0006.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:shared_foe + } + desc = mpo_interactions_events.0006.desc_shared_foe + } + triggered_desc = { + trigger = { + always = scope:memories_together + } + desc = mpo_interactions_events.0006.desc_memories + } + triggered_desc = { + trigger = { + always = scope:war_allies + } + desc = mpo_interactions_events.0006.desc_war_allies + } + desc = mpo_interactions_events.0006.desc_outro + } + } + override_background = { + trigger = { + government_has_flag = government_is_nomadic + } + reference = mpo_campfire_steppe + } + override_background = { + trigger = { + NOT = { government_has_flag = government_is_nomadic } + location = { + OR = { + terrain = desert + terrain = drylands + terrain = oasis + terrain = floodplains + terrain = desert_mountains + } + } + } + reference = ce1_legendary_oasis + } + override_background = { + trigger = { + #NOT = { government_has_flag = government_is_nomadic } + location = { + NOR = { + terrain = desert + terrain = drylands + terrain = oasis + terrain = floodplains + terrain = desert_mountains + } + NAND = { + location_has_harsh_winter_trigger = yes + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + } + reference = ce1_legendary_spring + } + override_background = { + trigger = { + #NOT = { government_has_flag = government_is_nomadic } + location = { + NOR = { + terrain = desert + terrain = drylands + terrain = oasis + terrain = floodplains + terrain = desert_mountains + } + location_has_harsh_winter_trigger = yes + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + reference = sitting_room + } + + left_portrait = { + character = root + animation = hunting_knife_start + } + right_portrait = { + character = scope:blood_bro + animation = celebrate_dagger + } + lower_right_portrait = scope:shared_foe + + #Show the right tooltip based on who this is + immediate = { + if = { + limit = { + this = scope:actor + } + mpo_blood_brother_tooltip_actor_effect = yes + } + else = { + mpo_blood_brother_tooltip_recipient_effect = yes + } + if = { + limit = { + scope:blood_bro = { + mpo_blood_brother_august_trigger = { OTHER_BROTHER = root } + } + } + scope:blood_bro = { + add_character_flag = august_blood_brother + } + } + if = { + limit = { + scope:blood_bro = { + mpo_blood_brother_warrior_trigger = { OTHER_BROTHER = root } + } + } + scope:blood_bro = { + add_character_flag = warrior_blood_brother + } + } + if = { + limit = { + scope:blood_bro = { + mpo_blood_brother_clever_trigger = yes + } + } + scope:blood_bro = { + add_character_flag = clever_blood_brother + } + } + if = { + limit = { + scope:blood_bro = { + mpo_blood_brother_loving_trigger = yes + } + } + scope:blood_bro = { + add_character_flag = loving_blood_brother + } + } + } + #My blood brother will help me destroy our common foe + option = { + trigger = { + exists = scope:shared_foe + } + name = mpo_interactions_events.0006.a + flavor = mpo_interactions_events.0006.a.flavor + add_internal_flag = special + add_character_modifier = blood_brother_foe_modifier + custom_tooltip = blood_brother_foe_modifier_cb_reduction + custom_tooltip = blood_brother_modifier_lasts_tt + set_variable = { + name = blood_brother_foe + value = scope:shared_foe + } + + stress_impact = { + vengeful = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + forgiving = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + modifier = { + add = -50 + OR = { + has_trait = compassionate + has_trait = forgiving + has_trait = content + } + } + } + } + #My blood brother is higher-ranked and influential + option = { + trigger = { + scope:blood_bro = { + has_character_flag = august_blood_brother + } + } + name = mpo_interactions_events.0006.b + add_internal_flag = special + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = blood_brother_august_nomadic_modifier + } + } + else = { + add_character_modifier = { + modifier = blood_brother_august_modifier + } + } + custom_tooltip = blood_brother_modifier_lasts_tt + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_energy = 1 + } + } + } + #My blood brother is a powerful defender and dread warrior + option = { + trigger = { + scope:blood_bro = { + has_character_flag = warrior_blood_brother + } + } + name = mpo_interactions_events.0006.c + add_internal_flag = special + + add_character_modifier = { + modifier = blood_brother_warrior_modifier + } + custom_tooltip = blood_brother_modifier_lasts_tt + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_zeal = 1 + } + } + } + #My blood brother is clever and intelligent + option = { + trigger = { + scope:blood_bro = { + has_character_flag = clever_blood_brother + } + } + name = mpo_interactions_events.0006.d + add_internal_flag = special + if = { + limit = { + government_has_flag = government_is_nomadic + } + add_character_modifier = { + modifier = blood_brother_clever_nomadic_modifier + } + } + else = { + add_character_modifier = { + modifier = blood_brother_clever_modifier + } + } + + custom_tooltip = blood_brother_modifier_lasts_tt + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + #My blood brother is loving and beloved + option = { + trigger = { + scope:blood_bro = { + has_character_flag = loving_blood_brother + } + } + name = mpo_interactions_events.0006.e + add_internal_flag = special + + add_character_modifier = { + modifier = blood_brother_loving_modifier + } + custom_tooltip = blood_brother_modifier_lasts_tt + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_energy = -1 + } + } + } + #My blood brother is just some guy, but he cool + option = { + trigger = { + scope:blood_bro = { + NOR = { + has_character_flag = warrior_blood_brother + has_character_flag = august_blood_brother + has_character_flag = loving_blood_brother + has_character_flag = clever_blood_brother + } + } + } + name = mpo_interactions_events.0006.f + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_vengefulness = -1 + } + } + } + after = { + scope:blood_bro = { + remove_character_flag = warrior_blood_brother + remove_character_flag = august_blood_brother + remove_character_flag = loving_blood_brother + remove_character_flag = clever_blood_brother + } + } +} + +# Pledge Tribute - Accepted +mpo_interactions_events.0010 = { + type = letter_event + sender = scope:recipient + opening = { + desc = mpo_interactions_events.0010.opening + } + desc = mpo_interactions_events.0010.desc + + #Nice + option = { + name = mpo_interactions_events.0010.a + break_subject_contract_and_establish_tributary_effect = { SUZERAIN = scope:recipient TRIBUTARY = scope:actor } + } +} + +# Pledge Tribute - Denied +mpo_interactions_events.0011 = { + type = letter_event + sender = scope:recipient + opening = { + desc = mpo_interactions_events.0011.opening + } + desc = mpo_interactions_events.0011.desc + + #Ay + option = { + name = mpo_interactions_events.0011.a + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = annoyed_opinion + opinion = -15 + } + } + } +} + +# Herd Gift Sent +mpo_interactions_events.0020 = { + type = letter_event + opening = { + desc = char_interaction.0030.opening # Positive greeting + } + desc = mpo_interactions_events.0020.desc + + sender = scope:actor + + option = { + name = mpo_interactions_events.0020.a + + show_as_tooltip = { + scope:actor = { + pay_herd = { + target = scope:recipient + value = domicile.herd_gift_value + } + } + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = sent_herd_opinion + opinion = 20 + } + } + } + } +} + +#Confederation acceptance letter event +mpo_interactions_events.0030 = { + type = letter_event + sender = scope:recipient + opening = { + desc = mpo_interactions_events.0030.opening + } + desc = mpo_interactions_events.0030.desc + + immediate = { + scope:recipient.confederation = { + save_scope_as = confederation + } + scope:confederation = { + add_confederation_member = scope:actor + } + } + + #Accept + option = { + name = mpo_interactions_events.0030.a + } +} diff --git a/N3OW/events/dlc/mpo/mpo_jamukha_flavor_events.txt b/N3OW/events/dlc/mpo/mpo_jamukha_flavor_events.txt new file mode 100644 index 00000000..a38a4e50 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_jamukha_flavor_events.txt @@ -0,0 +1,450 @@ +namespace = mpo_jamukha_flavor + +####################### +# Become Blood Brothers with Temujin +####################### + +mpo_jamukha_flavor.0001 = { + type = character_event + title = mpo_jamukha_flavor.0001.t + desc = mpo_jamukha_flavor.0001.desc + theme = nomads + override_background = { + reference = mpo_campfire_steppe + } + left_portrait = { + character = root + animation = happiness + camera = camera_event_very_left + } + right_portrait = { + character = scope:temujin + animation = inspect_weapon + } + + trigger = { + scope:temujin = { + is_alive = yes + NOR = { + has_relation_blood_brother = root + has_relation_rival = root + } + } + is_alive = yes + } + + immediate = { + play_music_cue = "mx_cue_touching_moment" + scope:temujin = { + save_scope_as = blood_bro + } + } + + option = { # Yay + name = mpo_jamukha_flavor.0001.a + name = mpo_jamukha_flavor.0001.a.tt + scope:temujin = { + set_relation_blood_brother = { + target = scope:jamukha + reason = blood_brother_temujin_jamukha + } + } + + if = { + limit = { + NOR = { + has_character_flag = had_warhorse_story + any_owned_story = { + story_type = story_cycle_martial_lifestyle_warhorse + exists = var:story_cycle_horse_name + } + } + scope:jamukha = { + NOR = { + has_character_flag = had_warhorse_story + any_owned_story = { + story_type = story_cycle_martial_lifestyle_warhorse + exists = var:story_cycle_horse_name + } + } + } + } + custom_tooltip = temujin_warhorse_jamukha_tt + custom_tooltip = jamukha_warhorse_jamukha_tt + hidden_effect = { + start_warhorse_story_cycle_effect = yes + scope:temujin = { + start_warhorse_story_cycle_effect = yes + } + } + } + custom_tooltip = blood_brother_gains_hook_tt + custom_tooltip = blood_brother_gains_hook_other_tt + + add_character_modifier = blood_brother_warrior_modifier + scope:temujin = { + add_character_modifier = blood_brother_warrior_modifier + } + + stress_impact = { + gregarious = medium_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # Not a chance + name = mpo_jamukha_flavor.0001.b + add_dread = minor_dread_gain + add_prestige = minor_prestige_gain + scope:temujin = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -25 + } + } + stress_impact = { + base = minor_stress_impact_gain + callous = medium_stress_impact_loss + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 0 + } + } +} + +####################### +# You consider breaking free from Temujin +####################### + +scripted_effect mpo_jamukha_flavor_0010_jamukha_leaving_effect = { + if = { + limit = { is_vassal_of = scope:temujin } + 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 + } + else = { + end_tributary = yes + } + add_truce_both_ways = { + character = scope:temujin + years = 5 + name = temujin_jamukha_truce + } + if = { + limit = { + current_military_strength < scope:temujin.current_military_strength + } + domicile ?= { + change_herd = { + value = scope:temujin.domicile.herd + multiply = 0.5 + } + } + } + if = { + limit = { + exists = scope:togrul + } + show_as_tooltip = { + custom_tooltip = negotiate_togrul_alliance_effect_tooltip + create_alliance = { + target = scope:togrul + allied_through_owner = root + allied_through_target = scope:togrul + } + scope:togrul = { + add_opinion = { + target = scope:jamukha + modifier = event_negotiated_alliance_opinion + } + } + } + } + custom_tooltip = jamukha_temujin_response_warning_tt +} + +scripted_trigger mpo_jamukha_flavor_0010_togrul_trigger = { + is_ai = yes + is_at_war = no + is_alive = yes + is_ruler = yes + NOR = { + is_at_war_with = root + has_relation_rival = root + is_vassal_of = scope:temujin + } + in_diplomatic_range = root + NOT = { + government_has_flag = government_is_herder + } +} + +mpo_jamukha_flavor.0010 = { + type = character_event + title = mpo_jamukha_flavor.0010.t + desc = { + desc = mpo_jamukha_flavor.0010.desc + triggered_desc = { + trigger = { + exists = scope:togrul + } + desc = mpo_jamukha_flavor.0010.desc_togrul + } + } + theme = nomads + override_background = { + reference = mpo_steppe_evening + } + left_portrait = { + character = root + animation = war_attacker + camera = camera_event_very_left + } + right_portrait = { + character = scope:temujin + animation = dismissal + camera = camera_event_very_right + } + lower_right_portrait = scope:togrul + + trigger = { + character:125501 = { + has_variable = had_mpo_temujin_flavor_0001 + } + is_alive = yes + is_ruler = yes + character:125501 = { + is_alive = yes + is_available = yes + } + OR = { + is_vassal_of = character:125501 + is_tributary_of = character:125501 + } + NOT = { + is_at_war_with = character:125501 + } + } + + immediate = { + save_scope_as = jamukha + character:125501 = { + save_scope_as = temujin + } + if = { + limit = { + character:303211 = { + mpo_jamukha_flavor_0010_togrul_trigger = yes + } + } + character:303211 = { + save_scope_as = togrul + } + } + else_if = { + limit = { + character:303211.house ?= { + any_house_member = { + mpo_jamukha_flavor_0010_togrul_trigger = yes + } + } + } + character:303211.house ?= { + ordered_house_member = { + order_by = current_military_strength + limit = { + mpo_jamukha_flavor_0010_togrul_trigger = yes + } + save_scope_as = togrul + } + } + } + else = { + capital_county.empire ?= { + ordered_de_jure_county_holder = { + order_by = current_military_strength + limit = { + highest_held_title_tier <= tier_duchy + mpo_jamukha_flavor_0010_togrul_trigger = yes + } + save_scope_as = togrul + } + } + } + } + + #I want to leave Temujin and take Togrul as an ally + option = { + name = mpo_jamukha_flavor.0010.a + show_as_tooltip = { + mpo_jamukha_flavor_0010_jamukha_leaving_effect = yes + } + scope:temujin = { + trigger_event = mpo_temujin_flavor.0010 + add_opinion = { + target = root + modifier = betrayal_opinion + opinion = -40 + } + } + ai_chance = { + base = 100 + } + } + + #I want to stay with Temujin and be friends forever + option = { + name = mpo_jamukha_flavor.0010.b + add_character_modifier = { + modifier = jamukha_chose_loyalty_modifier + years = 5 + } + scope:temujin = { + add_opinion = { + target = root + modifier = loyalty_opinion + opinion = 30 + } + } + stress_impact = { + base = miniscule_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + + on_trigger_fail = { # Jamukha becomes your rival anyways if you've migrated away + if = { + limit = { + is_independent_ruler = yes + NOT = { is_tributary_of = scope:temujin } + } + hidden_effect = { + scope:temujin = { + trigger_event = { + days = { 360 420 } + id = mpo_temujin_flavor.0020 + } + } + } + } + } +} + +####################### +# Temujin becomes your rival -- now you must kill him +####################### + +mpo_jamukha_flavor.0020 = { + type = character_event + title = mpo_jamukha_flavor.0020.t + desc = mpo_jamukha_flavor.0020.desc + theme = nomads + override_background = { + reference = mpo_campfire_steppe + } + left_portrait = { + character = root + animation = threatening + camera = camera_event_very_left + } + right_portrait = { + character = scope:temujin + animation = aggressive_sword + outfit_tags = { nightgown } + camera = camera_event_very_right + } + window = scheme_successful_event_no_text + + immediate = { + play_music_cue = "mx_cue_murder" + custom_tooltip = jamukha_temujin_no_more_positive_tt + custom_tooltip = jamukha_temujin_rivals_tt + custom_tooltip = mpo_temujin_flavor.0020.cb.tt + if = { + limit = { + current_military_strength < scope:temujin.current_military_strength + } + domicile ?= { + change_herd = { + value = scope:temujin.domicile.herd + multiply = 1.5 + } + } + add_prestige = major_prestige_gain # For MAA maintenance, mainly + custom_tooltip = jamukha_gain_from_defectors_tt + } + } + + option = { # You who I once called brother + name = mpo_jamukha_flavor.0020.a + reason = blood_brother + add_internal_flag = special + trigger = { has_character_flag = was_temujins_bro } + custom_tooltip = { + text = mpo_jamukha_flavor.0020.a_war_win + set_variable = temujin_jamukha_war_var + } + add_character_modifier = { + modifier = temujin_jamukha_war_modifier + years = 5 + } + stress_impact = { + base = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Murderrrrrrr + name = mpo_jamukha_flavor.0020.b + custom_tooltip = { + text = mpo_jamukha_flavor.0020.b_murder + set_variable = { + name = temujin_jamukha_murder_var + value = scope:temujin + } + } + stress_impact = { + deceitful = massive_stress_impact_loss + sadistic = massive_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + + option = { # I'm going to crush your skull + name = mpo_jamukha_flavor.0020.c + trigger = { + NOT = { has_relation_blood_brother = scope:jamukha } + } + add_character_modifier = { + modifier = temujin_jamukha_war_smaller_modifier + years = 5 + } + stress_impact = { + wrathful = massive_stress_impact_loss + vengeful = massive_stress_impact_loss + } + ai_chance = { + base = 100 + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_migration_contract_events.txt b/N3OW/events/dlc/mpo/mpo_migration_contract_events.txt new file mode 100644 index 00000000..71740273 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_migration_contract_events.txt @@ -0,0 +1,1585 @@ +namespace = mpo_contract_events + +############################# +# Migration Contract Events +############################# +### Disagreeable Herders +# Start +mpo_contract_events.0001 = { + type = character_event + hidden = yes + + trigger = { + mpo_settlement_issue_trigger = { NUMBER = 1 } + } + + immediate = { + mpo_settlement_issue_own_lands_effect = { + NUMBER = 1 + TIER = 1 + } + } +} + +# Reset +mpo_contract_events.0003 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 1 + ID = 0001 + } + } +} + +# Event +mpo_contract_events.0005 = { + type = character_event + title = mpo_contract_events.0005.t + desc = mpo_contract_events.0005.desc + theme = nomads + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:herder_character + animation = debating + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_1 + } + } + + immediate = { + scope:task_contract.task_contract_location = { + save_scope_as = task_location + } + create_character = { + template = herder_character + faith = scope:task_contract.task_contract_location.faith + culture = scope:task_contract.task_contract_location.culture + location = scope:task_contract.task_contract_location + save_scope_as = herder_character + after_creation = { + remove_character_flag = peasant_outfit + } + } + } + + option = { + name = mpo_contract_events.0005.a + + duel = { + skills = { diplomacy martial } + value = 15 + 50 = { + desc = mpo_contract_events.0005.a.impressed + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0005.a.impressed + domicile = { + change_herd = minor_herd_value_static + } + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + } + } + 50 = { + desc = mpo_contract_events.0005.a.unimpressed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0005.a.unimpressed + scope:task_contract.task_contract_location.county = { + change_county_fertility = tiny_county_fertility_level_loss + } + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0005.b + scope:task_contract.task_contract_location.county = { + change_county_fertility = tiny_county_fertility_level_gain + } + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + remove_short_term_gold = tiny_gold_value + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0005.c + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + + ai_chance = { + base = 1 + } + } + + after = { + settlement_issue_after_completing_effect = yes + scope:herder_character = { + silent_disappearance_ai_effect = yes + } + } +} + +### The Wild Herd +# Start +mpo_contract_events.0011 = { + type = character_event + hidden = yes + + trigger = { + mpo_settlement_issue_trigger = { NUMBER = 2 } + } + + immediate = { + mpo_settlement_issue_own_lands_effect = { + NUMBER = 2 + TIER = 1 + } + } +} + +# Reset +mpo_contract_events.0013 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 2 + ID = 0011 + } + } +} + +# Event +mpo_contract_events.0015 = { + type = character_event + title = mpo_contract_events.0015.t + desc = mpo_contract_events.0015.desc + theme = nomads + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = survey + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_2 + } + } + + option = { + name = mpo_contract_events.0015.a + duel = { + skill = martial + value = 15 + 50 = { + desc = mpo_contract_events.0015.a.successful + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0015.a.successful + domicile = { + change_herd = minor_herd_value_static + } + } + } + 50 = { + desc = mpo_contract_events.0015.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0015.a.failure + domicile = { + change_herd = miniscule_herd_value_static + } + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0015.b + add_character_modifier = { + modifier = mpo_si_slaughtered_for_a_feast + years = 3 + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0015.c + add_gold = minor_gold_value + + ai_chance = { + base = 1 + } + } + + after = { + settlement_issue_after_completing_effect = yes + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + } +} + +### Contentious Grazelands +# Start +mpo_contract_events.0021 = { + type = character_event + hidden = yes + + trigger = { + any_knight = { + count >= 2 + is_landed = no + } + any_held_county = { + is_landless_type_title = no + exists = title_province + county_control < 90 + NOT = { has_county_modifier = ongoing_settlement_contract } + } + NOT = { + any_task_contract = { + has_task_contract_type = nomadic_migration_contract_3 + } + } + } + + immediate = { + mpo_settlement_issue_own_lands_effect = { + NUMBER = 3 + TIER = 1 + } + } +} + +# Reset +mpo_contract_events.0023 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 3 + ID = 0021 + } + } +} + +# Event +mpo_contract_events.0025 = { + type = character_event + title = mpo_contract_events.0025.t + desc = mpo_contract_events.0025.desc + theme = nomads + left_portrait = { + character = root + animation = boredom + } + + right_portrait = { + character = scope:task_contract.task_contract_employer + animation = debating + } + + lower_left_portrait = scope:knight_2 + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_3 + } + } + + immediate = { + random_knight = { + limit = { + NOT = { this = scope:task_contract.task_contract_employer } + is_landed = no + is_ai = yes + } + save_scope_as = knight_2 + } + } + + option = { + name = mpo_contract_events.0025.a + scope:task_contract.task_contract_location.county = { change_county_control = 25 } + scope:task_contract.task_contract_employer = { + add_opinion = { + opinion = 15 + modifier = friendliness_opinion + target = root + } + } + scope:knight_2 = { + add_opinion = { + opinion = -15 + modifier = disappointed_opinion + target = root + } + } + + ai_chance = { + base = 1 + } + } + + option = { + name = mpo_contract_events.0025.b + scope:task_contract.task_contract_location.county = { change_county_control = 25 } + scope:knight_2 = { + add_opinion = { + opinion = 15 + modifier = friendliness_opinion + target = root + } + } + scope:task_contract.task_contract_employer = { + add_opinion = { + opinion = -15 + modifier = disappointed_opinion + target = root + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0025.c + domicile = { change_herd = settlement_issue_herd_reward } + + ai_chance = { + base = 0 + } + } + + after = { settlement_issue_after_completing_effect = yes } +} + +### A Lack of Tools +# Start +mpo_contract_events.0031 = { + type = character_event + hidden = yes + + trigger = { + mpo_settlement_issue_trigger = { NUMBER = 4 } + } + + immediate = { + mpo_settlement_issue_own_lands_effect = { + NUMBER = 4 + TIER = 1 + } + } +} + +# Reset +mpo_contract_events.0033 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 4 + ID = 0031 + } + } +} + +scripted_effect mpo_contract_event_35_remove_modifier_effect = { + if = { + limit = { + has_character_modifier = mpo_si_lacking_tools_3 + } + remove_character_modifier = mpo_si_lacking_tools_3 + } + else_if = { + limit = { + has_character_modifier = mpo_si_lacking_tools_2 + } + remove_character_modifier = mpo_si_lacking_tools_2 + } + else_if = { + limit = { + has_character_modifier = mpo_si_lacking_tools + } + remove_character_modifier = mpo_si_lacking_tools + } +} + +# Event +mpo_contract_events.0035 = { + type = character_event + title = mpo_contract_events.0035.t + desc = mpo_contract_events.0035.desc + theme = nomads + left_portrait = { + character = root + animation = thinking + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_4 + } + } + + option = { + name = mpo_contract_events.0035.a + trigger = { + domicile ?= { + has_domicile_building_or_higher = trade_yurt_01 + } + } + reason = trade_yurt + + add_prestige = minor_prestige_gain + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + + mpo_contract_event_35_remove_modifier_effect = yes + + ai_chance = { + base = 5 + } + } + + option = { + name = mpo_contract_events.0035.b + trigger = { + domicile ?= { + NOT = { has_domicile_building_or_higher = trade_yurt_01 } + } + } + show_as_unavailable = { + always = yes + } + + remove_short_term_gold = minor_gold_value + + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + + mpo_contract_event_35_remove_modifier_effect = yes + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0035.c + trigger = { + domicile ?= { + NOT = { has_domicile_building_or_higher = trade_yurt_01 } + } + } + show_as_unavailable = { + always = yes + } + + add_prestige = medium_prestige_loss + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + + mpo_contract_event_35_remove_modifier_effect = yes + + ai_chance = { + base = 1 + } + } + + option = { + name = mpo_contract_events.0035.d + trigger = { + domicile ?= { + NOT = { has_domicile_building_or_higher = trade_yurt_01 } + } + } + show_as_unavailable = { + always = yes + } + + if = { + limit = { + has_character_modifier = mpo_si_lacking_tools_3 + } + add_character_modifier = { + modifier = mpo_si_lacking_tools_3 + years = 30 + } + add_prestige = minor_prestige_loss + } + else_if = { + limit = { + has_character_modifier = mpo_si_lacking_tools_2 + } + hidden_effect = { remove_character_modifier = mpo_si_lacking_tools_2 } + add_character_modifier = { + modifier = mpo_si_lacking_tools_3 + years = 20 + } + } + else_if = { + limit = { + has_character_modifier = mpo_si_lacking_tools + } + hidden_effect = { remove_character_modifier = mpo_si_lacking_tools } + add_character_modifier = { + modifier = mpo_si_lacking_tools_2 + years = 20 + } + } + else = { + add_character_modifier = { + modifier = mpo_si_lacking_tools + years = 20 + } + } + } + + after = { + settlement_issue_after_completing_effect = yes + } +} + +### Fragmentation of the Tribe +# Start +mpo_contract_events.0041 = { + type = character_event + hidden = yes + + trigger = { + domain_size > 1 + any_knight = { + count >= 1 + } + any_held_county = { + is_landless_type_title = no + exists = title_province + county_control < 90 + NOR = { + this.title_province = root.capital_province + has_county_modifier = ongoing_settlement_contract + } + } + NOT = { + any_task_contract = { + has_task_contract_type = nomadic_migration_contract_5 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 5 + domain_limit_available < 0 + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:contract_province } + } + random_held_county = { + limit = { + is_landless_type_title = no + exists = title_province + county_control < 90 + NOR = { + this.title_province = root.capital_province + has_county_modifier = ongoing_settlement_contract + } + } + title_province = { save_scope_as = contract_province } + } + } + + if = { + limit = { + NOT = { exists = scope:new_employer } + } + random_knight = { + limit = { + is_landed = no + is_ai = yes + } + alternative_limit = { is_ai = yes } + save_scope_as = new_employer + } + } + + create_task_contract = { + task_contract_type = nomadic_migration_contract_5 + task_contract_tier = 1 + location = scope:contract_province + task_contract_employer = scope:new_employer + } + } +} + +# Reset +mpo_contract_events.0043 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 5 + ID = 0041 + } + } +} + +# Event +mpo_contract_events.0045 = { + type = character_event + title = mpo_contract_events.0045.t + desc = mpo_contract_events.0045.desc + theme = nomads + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:new_chieftain + animation = debating + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_5 + } + } + + immediate = { + create_character = { + template = nomadic_chieftain_character + gender_female_chance = root_soldier_female_chance + employer = root + save_scope_as = new_chieftain + } + } + + option = { + name = mpo_contract_events.0045.a + + duel = { + skill = diplomacy + target = scope:new_chieftain + 50 = { + desc = mpo_contract_events.0045.a.successful + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0045.a.successful + add_prestige = medium_prestige_gain + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + } + } + 50 = { + desc = mpo_contract_events.0045.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0045.a.failure + scope:task_contract.task_contract_location.county = { + change_county_control = -25 + } + } + } + } + + ai_chance = { + base = 1 + } + } + + option = { + name = mpo_contract_events.0045.b + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + scope:task_contract.task_contract_location.county = { + change_title_holder = { + holder = scope:new_chieftain + change = scope:change + } + } + + resolve_title_and_vassal_change = scope:change + + scope:new_chieftain = { + add_opinion = { + modifier = obedience_opinion + target = root + years = 15 + } + } + + scope:task_contract.task_contract_location.county = { + change_county_control = 100 + hidden_effect = { set_county_culture = scope:new_chieftain.culture } + } + + domicile = { + change_herd = minor_herd_value_static + } + + add_character_modifier = { + modifier = mpo_si_accepting_cultures + years = 10 + } + + custom_tooltip = mpo_contract_events.0045.b.tt + hidden_effect = { + if = { + limit = { + scope:new_chieftain = { + is_landed = yes + can_diverge_excluding_cost = yes + } + } + scope:new_chieftain = { + create_divergent_culture_with_side_effects_excluding_cost = yes + } + scope:task_contract.task_contract_location.county = { + set_county_culture = scope:new_chieftain.culture + } + } + } + + ai_chance = { + base = 0 # Too many irritating small divergences + } + } + + option = { + name = mpo_contract_events.0045.c + + remove_short_term_gold = minor_gold_value + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + + ai_chance = { + base = 1 + } + } + + option = { + name = mpo_contract_events.0045.d + + scope:task_contract.task_contract_location.county = { + change_county_control = -10 + } + + ai_chance = { + base = 0 + } + } + + after = { + settlement_issue_after_completing_effect = yes + scope:new_chieftain = { + if = { + limit = { + is_ruler = no + } + silent_disappearance_ai_effect = yes + } + } + } +} + +### Poisonous Lands +# Start +mpo_contract_events.0051 = { + type = character_event + hidden = yes + + trigger = { + mpo_settlement_issue_trigger = { NUMBER = 6 } + } + + immediate = { + mpo_settlement_issue_own_lands_effect = { + NUMBER = 6 + TIER = 1 + } + } +} + +# Reset +mpo_contract_events.0053 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 6 + ID = 0051 + } + } +} + +# Event +mpo_contract_events.0055 = { + type = character_event + title = mpo_contract_events.0055.t + desc = mpo_contract_events.0055.desc + theme = nomads + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = survey + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_6 + } + } + + option = { + name = mpo_contract_events.0055.a + + duel = { + skill = learning + value = 8 + 50 = { + desc = mpo_contract_events.0055.a.successful + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0055.a.successful + add_prestige = minor_prestige_gain + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + } + } + 50 = { + desc = mpo_contract_events.0055.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0055.a.failure + domicile ?= { + change_herd = { + subtract = medium_herd_value_static + } + } + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0055.b + + remove_short_term_gold = minor_gold_value + + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0055.c + + domicile ?= { + change_herd = { + subtract = minor_herd_value_static + } + } + + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + + add_character_modifier = { + modifier = mpo_si_slaughtered_animals + } + + ai_chance = { + base = 1 + } + } + + after = { + settlement_issue_after_completing_effect = yes + } +} + +### Troublesome Neighbors +# Start +mpo_contract_events.0061 = { + type = character_event + hidden = yes + + trigger = { + any_knight = { + count >= 1 + } + any_held_county = { + is_landless_type_title = no + exists = title_province + county_control < 90 + NOT = { has_county_modifier = ongoing_settlement_contract } + any_neighboring_county = { + NOT = { holder.top_liege ?= root.top_liege } + } + } + NOT = { + any_task_contract = { + has_task_contract_type = nomadic_migration_contract_7 + } + } + } + + immediate = { + mpo_settlement_issue_own_lands_effect = { + NUMBER = 7 + TIER = 1 + } + } +} + +# Reset +mpo_contract_events.0063 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 7 + ID = 0061 + } + } +} + +# Event +mpo_contract_events.0065 = { + type = character_event + title = mpo_contract_events.0065.t + desc = mpo_contract_events.0065.desc + theme = nomads + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:neighbor_leader + animation = anger + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_7 + } + } + + immediate = { + scope:task_contract.task_contract_location.county = { + random_neighboring_county = { + limit = { + NOT = { holder.top_liege = root.top_liege } + } + holder = { save_scope_as = neighbor_leader } + } + } + } + + option = { + name = mpo_contract_events.0065.a + + duel = { + skills = { diplomacy martial } + target = scope:neighbor_leader + 50 = { + desc = mpo_contract_events.0065.a.successful + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0065.a.successful + domicile ?= { + change_herd = minor_herd_value_static + } + } + } + 50 = { + desc = mpo_contract_events.0065.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_toast = { + title = mpo_contract_events.0065.a.failure + scope:neighbor_leader = { + add_opinion = { + opinion = -15 + modifier = disgusted_opinion + target = root + } + } + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0065.b + + domicile ?= { + change_herd = { + integer_range = { + min = minor_herd_value_static + max = medium_herd_value_static + } + } + } + + scope:neighbor_leader = { + add_opinion = { + modifier = upset_opinion + target = root + opinion = -20 + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0065.c + + ai_chance = { + base = 1 + } + } + + after = { + settlement_issue_after_completing_effect = yes + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + } +} + +### The Leftovers +# Start +mpo_contract_events.0071 = { + type = character_event + hidden = yes + + trigger = { + mpo_settlement_issue_trigger = { NUMBER = 8 } + } + + immediate = { + mpo_settlement_issue_own_lands_effect = { + NUMBER = 8 + TIER = 1 + } + } +} + +# Reset +mpo_contract_events.0073 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 8 + ID = 0071 + } + } +} + +# Event +mpo_contract_events.0075 = { + type = character_event + title = mpo_contract_events.0075.t + desc = mpo_contract_events.0075.desc + override_background = { reference = wilderness } + theme = nomads + left_portrait = { + character = root + animation = horse_surveying + camera = camera_event_horse_right_forward + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_8 + } + } + + immediate = { + random_realm_province = { + limit = { + county = scope:task_contract.task_contract_location.county + } + save_scope_as = barony_location + } + } + + option = { + name = mpo_contract_events.0075.a + + domicile ?= { + change_herd = minor_herd_value_static + } + + ai_chance = { + base = 1 + } + } + + option = { + name = mpo_contract_events.0075.b + + scope:task_contract.task_contract_location.county = { + change_county_fertility = tiny_county_fertility_level_gain + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0075.c + + add_gold = minor_gold_value + + ai_chance = { + base = 0 + } + } + + after = { + settlement_issue_after_completing_effect = yes + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + } +} + +### Drawing Lines +# Start +mpo_contract_events.0081 = { + type = character_event + hidden = yes + + trigger = { + any_knight = { + count >= 1 + } + any_held_county = { + is_landless_type_title = no + exists = title_province + county_control < 90 + NOT = { has_county_modifier = ongoing_settlement_contract } + any_neighboring_county = { + holder = root + } + } + NOT = { + any_task_contract = { + has_task_contract_type = nomadic_migration_contract_9 + } + } + } + + immediate = { + mpo_settlement_issue_own_lands_effect = { + NUMBER = 9 + TIER = 1 + } + } +} + +# Reset +mpo_contract_events.0083 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 9 + ID = 0081 + } + } +} + +# Event +mpo_contract_events.0085 = { + type = character_event + title = mpo_contract_events.0085.t + desc = mpo_contract_events.0085.desc + theme = nomads + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:task_contract.task_contract_employer + animation = debating + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_9 + } + } + + immediate = { + scope:task_contract.task_contract_location.county = { + random_neighboring_county = { + limit = { + holder = root + } + save_scope_as = other_county + } + } + } + + option = { + name = mpo_contract_events.0085.a + + scope:task_contract.task_contract_location.county = { + change_county_fertility = tiny_county_fertility_level_gain + change_county_control = 25 + } + scope:other_county = { + add_county_modifier = { + modifier = mpo_si_spurned_tribe + years = 10 + } + } + + ai_chance = { + base = 1 + } + } + + option = { + name = mpo_contract_events.0085.b + + scope:other_county = { + change_county_fertility = tiny_county_fertility_level_gain + change_county_control = 25 + } + scope:task_contract.task_contract_location.county = { + add_county_modifier = { + modifier = mpo_si_spurned_tribe + years = 10 + } + } + + ai_chance = { + base = 0 + } + } + + after = { + settlement_issue_after_completing_effect = yes + } +} + +### The Old Tribe +# Start +mpo_contract_events.0091 = { + type = character_event + hidden = yes + + trigger = { + any_knight = { + count >= 1 + } + any_held_county = { + is_landless_type_title = no + exists = title_province + county_control < 90 + has_variable = migration_previous_culture + NOR = { + var:migration_previous_culture ?= root.culture + has_county_modifier = ongoing_settlement_contract + } + var:migration_previous_culture = { + any_tradition = { + save_temporary_scope_as = culture_trigger_scope + OR = { + NOT = { has_tradition_category = regional } + NOT = { + root.culture = { + any_tradition = { + this = scope:culture_trigger_scope + } + } + } + } + } + } + } + NOT = { + any_task_contract = { + has_task_contract_type = nomadic_migration_contract_10 + } + } + } + + immediate = { + if = { + limit = { + NOT = { exists = scope:contract_province } + } + random_held_county = { + limit = { + is_landless_type_title = no + exists = title_province + county_control < 90 + has_variable = migration_previous_culture + NOT = { has_county_modifier = ongoing_settlement_contract } + } + title_province = { save_scope_as = contract_province } + } + } + + if = { + limit = { + NOT = { exists = scope:new_employer } + } + random_knight = { + limit = { + is_landed = no + is_ai = yes + } + alternative_limit = { is_ai = yes } + save_scope_as = new_employer + } + } + + create_task_contract = { + task_contract_type = nomadic_migration_contract_10 + task_contract_tier = 1 + location = scope:contract_province + task_contract_employer = scope:new_employer + } + } +} + +# Reset +mpo_contract_events.0093 = { + type = character_event + hidden = yes + + immediate = { + mpo_settlement_issue_reset_effect = { + NUMBER = 10 + ID = 0091 + } + } +} + +# Event +mpo_contract_events.0095 = { + type = character_event + title = mpo_contract_events.0095.t + desc = mpo_contract_events.0095.desc + theme = nomads + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:new_chieftain + animation = debating + } + + trigger = { + any_character_active_contract = { + has_task_contract_type = nomadic_migration_contract_10 + } + } + + immediate = { + scope:task_contract.task_contract_location.county.var:migration_previous_culture = { + save_scope_as = previous_culture + } + create_character = { + template = nomadic_chieftain_character + gender_female_chance = root_soldier_female_chance + location = scope:task_contract.task_contract_location + culture = scope:previous_culture + save_scope_as = new_chieftain + } + } + + option = { + name = mpo_contract_events.0095.a + + scope:previous_culture = { + change_cultural_acceptance = { + target = root.culture + value = 5 + desc = cultural_acceptance_gain_event + } + every_tradition = { + limit = { + save_temporary_scope_as = culture_trigger_scope + root = { can_embrace_tradition = prev } + NOT = { + root.culture = { + any_tradition = { + this = scope:culture_trigger_scope + } + } + } + } + inspired_by_tradition_effect = { CHARACTER = root } + } + } + + scope:task_contract.task_contract_location.county = { + add_county_modifier = { + modifier = mpo_si_old_tribe + years = 10 + } + } + + add_courtier = scope:new_chieftain + scope:new_chieftain = { + add_opinion = { + modifier = obedience_opinion + target = root + years = 10 + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = mpo_contract_events.0095.b + + add_dread = minor_dread_gain + + ai_chance = { + base = 1 + } + } + + after = { + settlement_issue_after_completing_effect = yes + scope:task_contract.task_contract_location.county = { + change_county_control = 25 + } + domicile ?= { + change_herd = { + value = minor_herd_value_static + divide = 2 + } + } + scope:new_chieftain = { + silent_disappearance_ai_effect = yes + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_migration_events.txt b/N3OW/events/dlc/mpo/mpo_migration_events.txt new file mode 100644 index 00000000..200dcf55 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_migration_events.txt @@ -0,0 +1,4573 @@ +namespace = migration_events + +############################ +## Mechanical Migration Events +## 0001-0099 +############################ + +# migration_events.0001 - Arrival at Migration destination, title transfer + +# Arrival at Migration destination, title transfer +migration_events.0001 = { + type = character_event + title = migration_events.0001.t + desc = { + first_valid = { # Season + triggered_desc = { + trigger = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_severe_drought_season + situation_sub_region_has_county = root.location.county + } + } + } + desc = migration_events.0001.desc.drought + } + triggered_desc = { + trigger = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_white_zud_season + situation_sub_region_has_county = root.location.county + } + } + } + desc = migration_events.0001.desc.white_zud + } + triggered_desc = { + trigger = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = root.location.county + } + } + } + desc = migration_events.0001.desc.havsarsan_zud + } + triggered_desc = { + trigger = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = root.location.county + } + } + } + desc = migration_events.0001.desc.blessing + } + desc = migration_events.0001.desc.intro + } + first_valid = { # Relationship + triggered_desc = { + trigger = { + has_variable = migrating_into_tributary_var + } + desc = migration_events.0001.desc.tributary + } + triggered_desc = { + trigger = { + scope:recipient = { government_has_flag = government_is_herder } + } + desc = migration_events.0001.desc.herder + } + triggered_desc = { + trigger = { + scope:recipient = { + OR = { + is_obedient_to = root + has_any_good_relationship_with_root_trigger = yes + } + } + } + desc = migration_events.0001.desc.nomad_obedient + } + triggered_desc = { + trigger = { + scope:recipient = { + has_any_bad_relationship_with_root_trigger = yes + } + } + desc = migration_events.0001.desc.nomad_angry + } + desc = migration_events.0001.desc.nomad + } + first_valid = { # Fertility + triggered_desc = { + trigger = { + location.county.county_fertility >= good_county_fertility_level + } + desc = migration_events.0001.desc.good + } + triggered_desc = { + trigger = { + location.county.county_fertility <= bad_county_fertility_level + } + desc = migration_events.0001.desc.bad + } + desc = migration_events.0001.desc.meh + } + } + theme = migration + override_background = { + trigger = { + OR = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_white_zud_season + situation_sub_region_has_county = root.location.county + } + } + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = root.location.county + } + } + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = root.location.county + } + } + } + } + reference = bp3_steppe_winter + } + override_background = { + trigger = { + NOR = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_white_zud_season + situation_sub_region_has_county = root.location.county + } + } + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = root.location.county + } + } + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = root.location.county + } + } + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = root.location.county + } + } + } + } + reference = mpo_steppe_evening + } + widgets = { + widget = { + is_shown = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = root.location.county + } + } + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + widget = { + is_shown = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = root.location.county + } + } + } + gui = "event_window_widget_vfx_snowstorm" + container = "foreground_shader_vfx_container" + } + } + left_portrait = { + character = scope:actor + animation = horse_archer_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + scope:recipient = { government_has_flag = government_is_herder } + } + animation = shepherd_with_sheep + } + triggered_animation = { + trigger = { + scope:recipient = { has_any_bad_relationship_with_root_trigger = yes } + } + animation = personality_callous + } + animation = throne_room_bow_1 + camera = camera_event_right_away + } + lower_right_portrait = { + trigger = { exists = scope:overlord } + character = scope:overlord + } + + immediate = { + remove_variable = migration_title + if = { + limit = { + has_variable = migrating_into_tributary_var + } + var:migrating_into_tributary_var = { + save_scope_as = overlord + } + save_scope_as = new_tributary # For the toasts to overlord + } + if = { + limit = { + NOT = { exists = scope:recipient } + } + hidden_effect = { + create_character = { + template = herder_character + faith = root.location.county.faith + culture = root.location.county.culture + location = root.location + save_scope_as = recipient + after_creation = { + remove_character_flag = peasant_outfit + add_to_list = government_change + add_character_flag = created + } + } + } + } + } + + option = { # If you're moving to a Tributary's land we ask you to become a Tributary yourself - Accept + name = migration_events.0001.aaa + trigger = { + has_variable = migrating_into_tributary_var + } + start_tributary_interaction_effect = { + TRIBUTARY = root + SUZERAIN = scope:overlord + } + hidden_effect = { + scope:overlord = { + send_interface_toast = { + left_icon = scope:new_tributary + title = msg_tributary_toast + custom_tooltip = msg_tributary_toast_tt + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # If you're moving to a Tributary's land we ask you to become a Tributary yourself - Refuse + name = migration_events.0001.aa + trigger = { + has_variable = migrating_into_tributary_var + } + scope:overlord = { + custom_tooltip = { + text = migration_events.0001.aa.cb_tt + if = { + limit = { + NOT = { # You don't already have a Retaliation CB on this guy + is_target_in_variable_list = { + name = retaliation_cb_var_list + target = root + } + } + } + add_to_variable_list = { + name = retaliation_cb_var_list + target = root + years = 5 + } + } + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -50 + } + hidden_effect = { + scope:overlord = { + send_interface_toast = { + left_icon = scope:new_tributary + title = msg_tributary_toast_bad + custom_tooltip = msg_tributary_toast_bad_tt + } + } + } + } + ai_chance = { # AI normally doesn't refuse + base = 10 + modifier = { # Unless... + OR = { + has_trait = ambitious + has_trait = arrogant + } + NOT = { has_trait = craven } + add = 25 + } + modifier = { + current_military_strength >= scope:overlord.current_military_strength + add = 125 + } + } + } + + option = { # Special option if your Astrologer wanted you to come here + name = migration_events.0001.a + add_internal_flag = special + trigger = { + var:astrologer_desired_area ?= root.primary_title + NOT = { has_variable = migrating_into_tributary_var } + } + custom_tooltip = migration_events.0001.a.tt + add_character_modifier = { + modifier = astrologer_desired_area_modifier + years = 5 + } + ai_chance = { + base = 100 + } + } + + option = { + name = migration_events.0001.b + trigger = { + NOR = { + var:astrologer_desired_area ?= root.primary_title + has_variable = migrating_into_tributary_var + } + } + ai_chance = { + base = 100 + } + } + + after = { + remove_variable = migrating_into_tributary_var + scope:recipient = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Arrival at Migration destination through war, triggered if you're moving into a Tributary's lands +migration_events.0002 = { + type = character_event + title = migration_events.0002.t + desc = { + desc = migration_events.0002.desc.intro + first_valid = { + triggered_desc = { + trigger = { + higher_or_equal_dominance_trigger = { + FIRST_TARGET = root + SECOND_TARGET = scope:overlord + } + } + desc = migration_events.0002.desc.high_dominance + } + desc = migration_events.0002.desc + } + } + theme = migration + override_background = { + trigger = { + OR = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_white_zud_season + situation_sub_region_has_county = root.location.county + } + } + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = root.location.county + } + } + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = root.location.county + } + } + } + } + reference = bp3_steppe_winter + } + widgets = { + widget = { + is_shown = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = root.location.county + } + } + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + widget = { + is_shown = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = root.location.county + } + } + } + gui = "event_window_widget_vfx_snowstorm" + container = "foreground_shader_vfx_container" + } + } + left_portrait = { + character = scope:actor + animation = horse_archer_aggressive + camera = camera_event_horse_left + } + lower_right_portrait = { + trigger = { exists = scope:overlord } + character = scope:overlord + } + + immediate = { + var:migrating_into_tributary_war_var = { + save_scope_as = overlord + } + save_scope_as = new_tributary # For the toasts to overlord + } + + option = { # Accept + name = migration_events.0002.a + trigger = { + higher_dominance_trigger = { + FIRST_TARGET = scope:overlord + SECOND_TARGET = root + } + } + start_tributary_interaction_effect = { + TRIBUTARY = root + SUZERAIN = scope:overlord + } + hidden_effect = { + scope:overlord = { + send_interface_toast = { + left_icon = scope:new_tributary + title = msg_tributary_toast + custom_tooltip = msg_tributary_toast_tt + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Refuse + name = { + trigger = { + higher_dominance_trigger = { + FIRST_TARGET = scope:overlord + SECOND_TARGET = root + } + } + text = migration_events.0002.b + } + name = { + trigger = { + higher_or_equal_dominance_trigger = { + FIRST_TARGET = root + SECOND_TARGET = scope:overlord + } + } + text = migration_events.0002.b.alt + } + if = { + limit = { + higher_or_equal_dominance_trigger = { + FIRST_TARGET = root + SECOND_TARGET = scope:overlord + } + } + add_legitimacy = medium_legitimacy_gain + } + scope:overlord = { + custom_tooltip = { + text = migration_events.0001.aa.cb_tt + if = { + limit = { + NOT = { # You don't already have a Retaliation CB on this guy + is_target_in_variable_list = { + name = retaliation_cb_var_list + target = root + } + } + } + add_to_variable_list = { + name = retaliation_cb_var_list + target = root + years = 5 + } + } + } + add_opinion = { + target = root + modifier = angry_opinion + opinion = -50 + } + hidden_effect = { + scope:overlord = { + send_interface_toast = { + left_icon = scope:new_tributary + title = msg_tributary_toast_bad + custom_tooltip = msg_tributary_toast_bad_tt + } + } + } + } + ai_chance = { # AI normally doesn't refuse + base = 10 + modifier = { # Unless... + OR = { + has_trait = ambitious + has_trait = arrogant + } + NOT = { has_trait = craven } + add = 120 + } + } + } + + after = { + remove_variable = migrating_into_tributary_war_var + } +} + +scripted_trigger migration_events_1000_local_ruler_trigger = { + NOR = { + this = root + is_allied_to = root + has_truce = root + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + is_liege_or_above_of = root + is_vassal_or_below_of = root + } + OR = { + NOT = { + capital_county ?= root.location.county + } + highest_held_title_tier <= tier_duchy + } + gold >= 0 + NOT = { + has_character_flag = migration_events_1000_victim_flag + } + #If they're present and able to defend, should be weak + trigger_if = { + limit = { + government_has_flag = government_is_nomadic + capital_county ?= root.location.county + } + domicile.herd <= root.domicile.herd + } +} + +###################### +#Migration flavor events +#1000-1999 +# by Jason Cantalini +###################### + +#There's some good hunting and plundering to be had here... +migration_events.1000 = { + type = character_event + title = migration_events.1000.t + desc = { + desc = migration_events.1000.desc + first_valid = { + triggered_desc = { + trigger = { + scope:local_ruler.capital_county ?= root.location.county + } + desc = migration_events.1000.desc.ruler_present + } + desc = migration_events.1000.desc.ruler_away + } + desc = migration_events.1000.desc_outro + } + theme = migration + override_background = { + reference = terrain + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:local_rep + animation = war_defender + } + lower_right_portrait = scope:local_overlord + + trigger = { + age >= 10 + is_migrating = yes + has_mpo_dlc_trigger = yes + location.county = { + uses_county_fertility = yes + } + OR = { + #Holder has lots of gold + AND = { + location.county = { + uses_county_fertility = yes + county_fertility >= 40 + } + location.county.holder = { + gold >= 200 + } + } + #Location is very fertile + location.county = { + county_fertility >= 70 + } + } + location.county.holder = { + migration_events_1000_local_ruler_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + location.county.holder = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + modifier = { + add = 1 + location.county.holder = { + gold > 500 + } + } + modifier = { + add = 1 + location.county = { + county_fertility >= 95 + } + } + } + + cooldown = { + years = 5 + } + + immediate = { + location.county = { + save_scope_as = location_county + } + location.county.holder = { + save_scope_as = local_ruler + add_character_flag = { + flag = migration_events_1000_victim_flag + years = 5 + } + } + #Put in ruler if they are low tier + if = { + limit = { + scope:location_county = scope:local_ruler.capital_county + scope:local_ruler = { + location.county = scope:location_county + NOR = { + is_incapable = yes + has_trait = infirm + age <= 8 + } + } + } + scope:local_ruler = { + save_scope_as = local_rep + } + } + if = { + limit = { + NOT = { + exists = scope:local_rep + } + } + scope:local_ruler = { + random_councillor = { + limit = { + NOT = { + is_spouse_of = root + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:local_ruler } + } + save_scope_as = local_rep + } + save_scope_as = local_overlord + } + } + if = { + limit = { + NOT = { + exists = scope:local_rep + } + } + scope:local_ruler = { + random_knight = { + save_scope_as = local_rep + } + save_scope_as = local_overlord + } + } + if = { + limit = { + NOT = { + exists = scope:local_rep + } + } + scope:local_ruler = { + random_courtier = { + limit = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:local_ruler } + is_adult = yes + basic_is_available_ai = yes + } + save_scope_as = local_rep + } + save_scope_as = local_overlord + } + } + } + #We can hunt for pelts too! + option = { + trigger = { + has_trait = lifestyle_hunter + NOT = { + location = { + terrain = desert + } + } + } + name = migration_events.1000.a + flavor = migration_events.1000.a.flavor + + add_trait_xp = { + trait = lifestyle_hunter + value = medium_trait_xp + track = hunter + } + add_trait_xp = { + trait = lifestyle_hunter + value = medium_trait_xp + track = falconer + } + mpo_dominance_scaled_minor_gold_gain = yes + reverse_add_opinion = { + modifier = angry_opinion + target = scope:local_ruler + opinion = -20 + } + stress_impact = { + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_energy = 1 + } + modifier = { + factor = 0.5 + scope:local_ruler = { + government_has_flag = government_is_nomadic + domicile.herd > root.domicile.herd + } + } + modifier = { + factor = 0 + has_trait = lazy + } + } + } + #I'm not leaving these people to their riches + option = { + trigger = { + OR = { + scope:local_ruler = { + is_ai = yes + } + is_ai = no + } + } + name = migration_events.1000.b + flavor = migration_events.1000.b.flavor + scope:local_ruler = { + if = { + limit = { + treasury_or_gold >= minor_treasury_or_gold_value + } + pay_treasury_or_gold = { + target = root + value = minor_treasury_or_gold_value + } + } + } + if = { + limit = { + scope:local_ruler = { + government_has_flag = government_is_herder + } + } + domicile = { + change_herd = miniscule_herd_gain + } + reverse_add_opinion = { + target = scope:local_ruler + modifier = angry_opinion + opinion = -40 + } + } + else = { + scope:local_ruler = { + pay_herd = { + target = root + value = domicile.minor_herd_value + } + progress_towards_rival_effect = { + REASON = rival_raided_me + CHARACTER = root + OPINION = -40 + } + } + } + scope:location_county = { + change_county_control = minor_county_control_loss + } + stress_impact = { + greedy = miniscule_stress_impact_loss + fickle = miniscule_stress_impact_loss + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = 0.5 + ai_honor = -0.5 + } + modifier = { + factor = 1.5 + scope:local_ruler = { + government_has_flag = government_is_herder + } + } + modifier = { + factor = 0.25 + scope:local_ruler = { + government_has_flag = government_is_nomadic + domicile.herd > root.domicile.herd + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = generous + has_trait = craven + } + } + } + } + #Let the animals graze a while; lets grab some horses + option = { + name = migration_events.1000.c + + domicile = { + change_herd = medium_herd_gain + } + reverse_add_opinion = { + modifier = angry_opinion + target = scope:local_ruler + opinion = -20 + } + current_travel_plan = { + delay_travel_plan = { days = 30 } + } + stress_impact = { + content = miniscule_stress_impact_loss + impatient = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_greed = 0.5 + } + modifier = { + factor = 0.5 + scope:local_ruler = { + government_has_flag = government_is_nomadic + domicile.herd > root.domicile.herd + } + } + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = humble + } + } + } + } + #Better to just keep moving + option = { + name = migration_events.1000.d + scope:local_ruler = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 20 + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.5 + } + modifier = { + factor = 1.5 + scope:local_ruler = { + government_has_flag = government_is_nomadic + domicile.herd > root.domicile.herd + } + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } +} + +scripted_trigger migration_events_1010_deserves_rest_trigger = { + OR = { + has_trait = wounded_2 + has_trait = wounded_3 + health <= poor_health + has_trait = maimed + has_trait = infirm + } +} + +#Wife wants you to get into the great yurt +migration_events.1010 = { + type = character_event + title = migration_events.1010.t + desc = migration_events.1010.desc + theme = migration + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:spouse + animation = flirtation_left + } + cooldown = { years = 5 } + + trigger = { + is_married = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_migrating = yes + has_mpo_dlc_trigger = yes + NOT = { + has_realm_law = nomadic_authority_1 + } + is_available_travelling_adult = yes + NOR = { + has_trait = infirm + has_character_modifier = obese_modifier + } + primary_spouse ?= { + is_available_allow_travelling = yes + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + opinion = { + target = root + value > 0 + } + NOT = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + migration_events_1010_deserves_rest_trigger = yes + has_trait = wounded_1 + } + } + modifier = { + add = 1 + primary_spouse ?= { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + } + } + } + + immediate = { + location.county = { + save_scope_as = location_county + } + primary_spouse = { + save_scope_as = spouse + } + } + #Yeah... I need that anyway + option = { + trigger = { + OR = { + migration_events_1010_deserves_rest_trigger = yes + has_trait = wounded_1 + } + } + name = migration_events.1010.a + random_list = { + 10 = { + trigger = { + has_trait = wounded_1 + } + remove_trait = wounded_1 + } + 10 = { + trigger = { + has_trait = wounded_2 + } + remove_trait = wounded_2 + } + 10 = { + trigger = { + has_trait = wounded_3 + } + remove_trait = wounded_3 + } + 10 = { + trigger = { + has_trait = ill + } + remove_trait = ill + } + 10 = { + trigger = { + has_trait = pneumonic + } + remove_trait = pneumonic + } + 10 = { + add_character_modifier = { + modifier = nomadic_comforts_modifier + years = 5 + } + } + } + + stress_impact = { + base = minor_stress_impact_loss + craven = miniscule_stress_impact_loss + paranoid = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { + factor = 0.5 + has_trait = diligent + } + } + } + #Yeah of course, I love you wife + option = { + trigger = { + OR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse } + scope:spouse = { + opinion = { + target = root + value >= 80 + } + } + has_trait = gregarious + has_trait = compassionate + has_trait = lustful + has_trait = generous + } + is_attracted_to_gender_of = scope:spouse + scope:spouse = { + is_attracted_to_gender_of = root + NOR = { + has_trait = celibate + has_trait = chaste + } + } + NOR = { + has_trait = celibate + } + } + add_internal_flag = special + name = migration_events.1010.b + if = { + limit = { + scope:spouse = { + is_obedient_to = root + } + } + reverse_add_opinion = { + target = scope:spouse + modifier = love_opinion + opinion = 40 + } + } + else = { + scope:spouse = { + add_opinion = { + modifier = obedience_opinion + target = root + } + } + } + + had_sex_with_effect = { + CHARACTER = scope:spouse + PREGNANCY_CHANCE = pregnancy_chance + } + if = { + limit = { + has_relation_lover = scope:spouse + NOT = { + has_relation_soulmate = scope:spouse + } + } + set_relation_soulmate = { + target = scope:spouse + reason = lover_made_love_on_yurt_wagon + } + } + else = { + progress_towards_lover_effect = { + REASON = lover_made_love_on_yurt_wagon + CHARACTER = scope:spouse + OPINION = 0 + } + } + + stress_impact = { + lustful = miniscule_stress_impact_gain + chaste = medium_stress_impact_gain + humble = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_honor = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = humble + has_trait = just + } + } + } + } + #I need to be seen riding with my men + option = { + name = migration_events.1010.c + + if = { + limit = { + migration_events_1010_deserves_rest_trigger = yes + health < fine_health + } + add_legitimacy = minor_legitimacy_gain + every_knight = { + custom = custom.every_knight + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + base = medium_stress_impact_gain + lazy = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + fickle = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + else = { + add_legitimacy = miniscule_legitimacy_gain + every_knight = { + custom = custom.every_knight + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + stress_impact = { + base = miniscule_stress_impact_gain + lazy = medium_stress_impact_gain + arbitrary = minor_stress_impact_gain + fickle = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_energy = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = arbitrary + has_trait = fickle + has_trait = arrogant + } + } + } + } + #It does sound comfy... + option = { + name = migration_events.1010.d + flavor = migration_events.1010.d.flavor + if = { + limit = { + any_consort = { + NOT = { + this = scope:spouse + } + } + } + every_consort = { + custom = custom.every_consort + scope:spouse = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + } + } + else = { + scope:spouse = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + if = { + limit = { + migration_events_1010_deserves_rest_trigger = no + health < fine_health + } + add_prestige = miniscule_prestige_loss + } + + + stress_impact = { + base = minor_stress_impact_loss + lazy = miniscule_stress_impact_loss + content = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + humble = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_energy = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = just + } + } + } + } +} + +scripted_trigger migration_events_1020_valid_aspirant_trigger = { + NOR = { + is_primary_heir_of = root + is_player_heir_of = root + is_heir_of = root + has_trait = loyal + is_obedient_to = root + has_dread_level_towards = { + target = root + level >= 2 + } + } + is_adult = yes + is_courtier_of = root + is_imprisoned = no + is_healthy = yes + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + ai_boldness >= 0 + ai_energy >= 0 + ai_compassion < medium_positive_ai_value + health >= fine_health +} + +scripted_trigger migration_events_1020_very_eager_trigger = { + OR = { + AND = { + ai_boldness > medium_positive_ai_value + ai_energy > medium_positive_ai_value + } + opinion = { + target = root + value < -60 + } + NOT = { is_obedient_to = root } + } + NOT = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + migration_events_1020_valid_aspirant_trigger = yes +} + +scripted_effect migration_events_1020_pay_minor_herd_effect = { + if = { + limit = { + OR = { + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_4 + } + } + } + else_if = { + limit = { + has_realm_law = nomadic_authority_3 + } + } + else_if = { + limit = { + has_realm_law = nomadic_authority_2 + } + } + else = { + + } +} + +#Family member wants to take land from local herder +migration_events.1020 = { + type = character_event + title = migration_events.1020.t + desc = migration_events.1020.desc + theme = migration + override_background = { + reference = terrain + } + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left_forward + } + right_portrait = { + character = scope:aspirant + animation = horse_surveying + camera = camera_event_horse_right_forward + } + lower_right_portrait = scope:herder + lower_left_portrait = scope:herder_liege + + trigger = { + age >= 6 + is_migrating = yes + has_mpo_dlc_trigger = yes + highest_held_title_tier >= tier_county + is_available_allow_travelling = yes + + #location is takeable herder county + location.county.holder = { + government_has_flag = government_is_herder + OR = { + is_independent_ruler = yes + liege = { + OR = { + is_ai = yes + this = root + } + NOR = { + is_at_war_with = root + is_causing_raid_hostility_towards = root + root = { + is_causing_raid_hostility_towards = prev + } + } + } + } + } + location.county = { + NOT = { + any_county_province = { + OR = { + is_raided = yes + is_occupied = yes + } + } + } + } + + #valid breakoff ruler + OR = { + any_child = { + migration_events_1020_valid_aspirant_trigger = yes + } + any_sibling = { + migration_events_1020_valid_aspirant_trigger = yes + } + dynasty ?= { + any_dynasty_member = { + migration_events_1020_valid_aspirant_trigger = yes + } + } + } + #A bit weird if you are great khan and your relatives are begging for some sheep + NOT = { + has_realm_law = nomadic_authority_5 + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + any_child = { + migration_events_1020_very_eager_trigger = yes + } + any_sibling = { + migration_events_1020_very_eager_trigger = yes + } + dynasty ?= { + any_dynasty_member = { + migration_events_1020_very_eager_trigger = yes + } + } + } + } + modifier = { + add = -1 + has_realm_law = nomadic_authority_4 + } + } + + cooldown = { + years = 5 + } + + immediate = { + location.county = { + save_scope_as = location_county + holder = { + save_scope_as = herder + if = { + limit = { + is_independent_ruler = no + } + liege = { + save_scope_as = herder_liege + } + } + } + } + if = { + limit = { + exists = dynasty + } + dynasty = { + ordered_dynasty_member = { + order_by = age + limit = { + migration_events_1020_valid_aspirant_trigger = yes + } + save_scope_as = aspirant + } + } + } + if = { + limit = { + NOT = { + exists = scope:aspirant + } + } + ordered_sibling = { + order_by = age + limit = { + migration_events_1020_valid_aspirant_trigger = yes + } + save_scope_as = aspirant + } + } + if = { + limit = { + NOT = { + exists = scope:aspirant + } + } + ordered_child = { + order_by = age + limit = { + migration_events_1020_valid_aspirant_trigger = yes + } + save_scope_as = aspirant + } + } + random_knight = { + limit = { + is_landed = no + is_councillor = no + has_any_court_position = no + NOR = { + is_spouse_of = root + is_heir_of = root + this = scope:aspirant + } + is_available_allow_travelling = yes + is_acclaimed = no + is_accolade_successor = no + } + save_scope_as = knight_1 + } + random_knight = { + limit = { + is_landed = no + is_councillor = no + has_any_court_position = no + NOR = { + is_spouse_of = root + is_heir_of = root + this = scope:aspirant + this = scope:knight_1 + } + is_available_allow_travelling = yes + is_acclaimed = no + is_accolade_successor = no + } + save_scope_as = knight_2 + } + save_scope_as = root_scope + } + #Yes, as my tributary of course! + option = { + trigger = { + NOT = { + exists = scope:herder_liege + } + OR = { + has_realm_law = nomadic_authority_2 + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + add_internal_flag = special + name = migration_events.1020.a + + add_prestige = minor_prestige_gain + + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + scope:location_county = { + change_title_holder = { + holder = scope:aspirant + change = scope:change + } + } + scope:aspirant = { + add_opinion = { + target = root + modifier = helpful_opinion + opinion = 20 + } + } + resolve_title_and_vassal_change = scope:change + scope:aspirant = { + change_government = nomad_government + add_courtier = scope:herder + scope:herder = { + pay_short_term_gold = { + target = scope:aspirant + gold = current_gold_value + } + } + start_tributary_interaction_effect = { + TRIBUTARY = scope:aspirant + SUZERAIN = root + } + } + pay_herd = { + target = scope:aspirant + value = domicile.minor_herd_value + } + + stress_impact = { + generous = medium_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + has_trait = compassionate + } + } + } + } + #I will establish you here properly + option = { + trigger = { + culture = scope:aspirant.culture + domicile = { + herd >= major_herd_value + } + } + name = migration_events.1020.b + flavor = migration_events.1020.b.flavor + + dynasty ?= { + add_dynasty_prestige = miniscule_dynasty_prestige_gain + + } + + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + scope:location_county = { + change_title_holder = { + holder = scope:aspirant + change = scope:change + } + } + scope:aspirant = { + add_opinion = { + target = root + modifier = helpful_opinion + opinion = 60 + } + progress_towards_friend_effect = { + REASON = friend_granted_title + CHARACTER = root + OPINION = 0 + } + if = { + limit = { + exists = scope:herder_liege + } + change_liege = { + liege = scope:herder_liege + change = scope:change + } + } + } + resolve_title_and_vassal_change = scope:change + scope:aspirant = { + change_government = nomad_government + } + scope:aspirant = { + add_prestige = medium_prestige_gain + } + scope:location_county = { + if = { + limit = { + NOT = { + culture = scope:aspirant.culture + } + } + set_county_culture = scope:aspirant.culture + } + if = { + limit = { + NOT = { + faith = scope:aspirant.faith + } + } + set_county_faith = scope:aspirant.faith + } + } + scope:aspirant = { + add_courtier = scope:herder + scope:herder = { + pay_short_term_gold = { + target = scope:aspirant + gold = current_gold_value + } + } + if = { + limit = { + exists = scope:knight_1 + } + add_courtier = scope:knight_1 + scope:knight_1 = { + every_spouse = { + limit = { + is_imprisoned = no + is_courtier_of = root + } + scope:aspirant = { + add_courtier = prev + } + } + hidden_effect = { + every_child = { + limit = { + is_imprisoned = no + is_courtier_of = root + is_adult = no + } + scope:aspirant = { + add_courtier = prev + } + } + } + } + } + if = { + limit = { + exists = scope:knight_2 + } + add_courtier = scope:knight_2 + scope:knight_2 = { + every_spouse = { + limit = { + is_imprisoned = no + is_courtier_of = root + } + scope:aspirant = { + add_courtier = prev + } + } + hidden_effect = { + every_child = { + limit = { + is_imprisoned = no + is_courtier_of = root + is_adult = no + } + scope:aspirant = { + add_courtier = prev + } + } + } + } + } + } + pay_herd = { + target = scope:aspirant + value = domicile.major_herd_value + } + add_prestige = medium_prestige_loss + + if = { + limit = { + scope:herder_liege ?= { + NOT = { + this = root + } + } + } + scope:herder_liege = { + reverse_add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -30 + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -0.5 + ai_compassion = 0.5 + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + #Good luck kid + option = { + name = migration_events.1020.c + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = no + } + scope:location_county = { + change_title_holder = { + holder = scope:aspirant + change = scope:change + } + } + scope:aspirant = { + add_opinion = { + target = root + modifier = helpful_opinion + opinion = 30 + } + if = { + limit = { + exists = scope:herder_liege + } + change_liege = { + liege = scope:herder_liege + change = scope:change + } + } + } + resolve_title_and_vassal_change = scope:change + scope:aspirant = { + change_government = nomad_government + add_courtier = scope:herder + scope:herder = { + pay_short_term_gold = { + target = scope:aspirant + gold = current_gold_value + } + } + } + pay_herd = { + target = scope:aspirant + value = domicile.minor_herd_value + } + + if = { + limit = { + scope:herder_liege ?= { + NOT = { + this = root + } + } + } + scope:herder_liege = { + reverse_add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -30 + } + } + } + + stress_impact = { + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_greed = 0.5 + } + } + } + #No, remain with your people + option = { + name = migration_events.1020.d + + if = { + limit = { + OR = { + has_trait = wrathful + has_trait = sadistic + has_trait = vengeful + has_trait = paranoid + has_trait = torturer + has_trait = overseer + has_trait = greatest_of_khans + has_trait = irritable + } + } + add_dread = miniscule_dread_gain + } + scope:aspirant = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + + stress_impact = { + generous = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = trusting + } + } + } + } +} + +#Your animals are hungry +migration_events.1030 = { + type = character_event + title = migration_events.1030.t + desc = migration_events.1030.desc + theme = migration + override_background = { + reference = mpo_steppe_evening + } + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_left + } + lower_right_portrait = scope:local_ruler + + trigger = { + age >= 6 + is_migrating = yes + has_mpo_dlc_trigger = yes + highest_held_title_tier >= tier_county + is_available_allow_travelling = yes + location.county.holder = { + is_ai = yes + NOR = { + has_relation_rival = root + has_relation_nemesis = root + is_at_war_with = root + } + } + location.county = { + uses_county_fertility = yes + NOT = { + any_county_province = { + OR = { + is_raided = yes + is_occupied = yes + } + } + } + county_fertility <= 40 + } + domicile = { + herd >= major_herd_value + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + modifier = { + add = 1 + location.county = { + county_fertility <= 10 + } + } + modifier = { + add = 1 + location.county = { + county_fertility <= 20 + } + } + } + + cooldown = { + years = 5 + } + + immediate = { + location.county = { + save_scope_as = location_county + holder = { + save_scope_as = local_ruler + } + } + } + #The local ruler WILL provide good pasture + option = { + trigger = { + dread >= 50 + OR = { + scope:local_ruler = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + has_realm_law = nomadic_authority_5 + AND = { + has_realm_law = nomadic_authority_4 + scope:local_ruler = { + OR = { + has_realm_law = nomadic_authority_2 + has_realm_law = nomadic_authority_1 + } + } + } + AND = { + has_realm_law = nomadic_authority_3 + scope:local_ruler = { + has_realm_law = nomadic_authority_1 + } + } + } + } + name = migration_events.1030.a + + add_dread = minor_dread_gain + + reverse_add_opinion = { + modifier = threatened_opinion + target = scope:local_ruler + opinion = -20 + } + current_travel_plan = { + delay_travel_plan = { days = 10 } + } + + stress_impact = { + arrogant = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + just = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 300 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = just + has_trait = humble + } + } + } + } + #Sell the animals to the local ruler + option = { + trigger = { + diplomacy > high_skill_rating + trigger_if = { + limit = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + scope:local_ruler.gold >= root.monumental_gold_value + } + trigger_if = { + limit = { + has_realm_law = nomadic_authority_3 + } + scope:local_ruler.gold >= root.massive_gold_value + } + trigger_if = { + limit = { + has_realm_law = nomadic_authority_2 + } + scope:local_ruler.gold >= root.major_gold_value + } + trigger_if = { + limit = { + has_realm_law = nomadic_authority_1 + } + scope:local_ruler.gold >= root.medium_gold_value + } + } + name = migration_events.1030.b + flavor = migration_events.1030.b.flavor + + if = { + limit = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + scope:local_ruler = { + pay_treasury_or_gold = { + target = root + value = root.monumental_treasury_or_gold_value + } + } + } + if = { + limit = { + has_realm_law = nomadic_authority_3 + } + scope:local_ruler = { + pay_treasury_or_gold = { + target = root + value = root.massive_treasury_or_gold_value + } + } + } + if = { + limit = { + has_realm_law = nomadic_authority_2 + } + scope:local_ruler = { + pay_treasury_or_gold = { + target = root + value = root.major_treasury_or_gold_value + } + } + } + if = { + limit = { + has_realm_law = nomadic_authority_1 + } + scope:local_ruler = { + pay_treasury_or_gold = { + target = root + value = root.medium_treasury_or_gold_value + } + } + } + + pay_herd = { + target = scope:local_ruler + value = domicile.medium_herd_value + } + reverse_add_opinion = { + modifier = pleased_opinion + target = scope:local_ruler + opinion = 20 + } + + stress_impact = { + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + generous = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_greed = 0.5 + ai_honor = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = honest + has_trait = just + has_trait = generous + } + } + } + } + #Slaughter the animals and have a feast + option = { + name = migration_events.1030.c + flavor = migration_events.1030.c.flavor + + if = { + limit = { + has_trait = lifestyle_reveler + } + add_trait_xp = { + trait = lifestyle_reveler + value = 10 + } + } + add_prestige = medium_prestige_gain + every_courtier = { + custom = custom.every_courtier + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 20 + } + } + domicile = { + change_herd = major_herd_loss + } + + stress_impact = { + gluttonous = minor_stress_impact_loss + generous = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + temperate = minor_stress_impact_gain + stubborn = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = -0.5 + } + modifier = { + factor = 0 + has_trait = temperate + } + } + } + #We need to search for somewhere they can graze + option = { + name = migration_events.1030.d + + duel = { + skill = stewardship + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_realm_law = nomadic_authority_1 + add = 20 + } + modifier = { + has_realm_law = nomadic_authority_2 + add = 10 + } + desc = migration_events.1030.d.success + send_interface_toast = { + type = event_toast_effect_good + title = migration_events.1030.d.success + left_icon = root + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + } + else = { + add_trait_xp = { + trait = lifestyle_traveler + track = danger + value = small_lifestyle_random_xp_mid + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + OR = { + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_4 + } + add = 20 + } + desc = migration_events.1030.d.failure + send_interface_toast = { + type = event_toast_effect_bad + title = migration_events.1030.d.failure + left_icon = root + + domicile = { + change_herd = medium_herd_loss + } + } + } + } + current_travel_plan = { + delay_travel_plan = { days = 20 } + } + + stress_impact = { + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + } + modifier = { + factor = 0 + has_trait = impatient + } + } + } +} + +#Local ruler offers you traditional hospitality and a gift +migration_events.1040 = { + type = character_event + title = migration_events.1040.t + desc = { + desc = migration_events.1040.desc + first_valid = { + triggered_desc = { + trigger = { + root.current_location = { + OR = { + terrain = taiga + terrain = forest + terrain = jungle + terrain = wetlands + } + } + } + desc = migration_events.1040.furs + } + triggered_desc = { + trigger = { + root.current_location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + } + desc = migration_events.1040.camels + } + triggered_desc = { + trigger = { + root.current_location = { + OR = { + terrain = hills + terrain = mountains + terrain = drylands + } + } + } + desc = migration_events.1040.wool + } + desc = migration_events.1040.horses + } + } + theme = migration + override_background = { + reference = mpo_camp_steppe + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:local_ruler + animation = throne_room_bow_1 + } + + trigger = { + age >= 10 + is_migrating = yes + has_mpo_dlc_trigger = yes + location.county = { + NOT = { + any_county_province = { + OR = { + is_raided = yes + is_occupied = yes + } + } + } + } + location.county.holder = { + NOT = { this = root } + age >= 12 + basic_is_available_ai = yes + mpo_lower_nomad_authority_trigger = { CHARACTER = root } + OR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + } + NOR = { + has_character_flag = migration_events_1040_giver_flag + is_at_war_with = root + is_causing_raid_hostility_towards = root + root = { + is_causing_raid_hostility_towards = prev + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + ai_greed <= low_positive_ai_value + OR = { + opinion = { + target = root + value >= -20 + } + has_dread_level_towards = { + target = root + level >= 1 + } + } + } + } + + weight_multiplier = { + base = 2 + modifier = { + add = -1 + location.county.holder = { + opinion = { + target = root + value <= 0 + } + } + } + modifier = { + add = 1 + location.county.holder = { + opinion = { + target = root + value >= 70 + } + } + } + modifier = { + add = 1 + location.county.holder = { + is_vassal_or_below_of = root + } + } + modifier = { + add = 1 + location.county.holder = { + is_allied_to = root + } + } + modifier = { + add = 1 + location.county.holder = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + } + + cooldown = { + years = 5 + } + + immediate = { + location.county = { + save_scope_as = location_county + } + location.county.holder = { + save_scope_as = local_ruler + add_character_flag = { + flag = migration_events_1040_giver_flag + years = 1 + } + } + } + #That's all...? + option = { + trigger = { + OR = { + has_realm_law = nomadic_authority_5 + AND = { + has_realm_law = nomadic_authority_4 + scope:local_ruler = { + NOT = { has_realm_law = nomadic_authority_4 } + } + } + AND = { + has_realm_law = nomadic_authority_3 + scope:local_ruler = { + NOT = { has_realm_law = nomadic_authority_3 } + } + } + } + OR = { + has_trait = avaricious + has_trait = conqueror + has_trait = greatest_of_khans + is_gurkhan = yes + scope:local_ruler = { + has_dread_level_towards = { + target = root + level >= 2 + } + } + } + } + name = migration_events.1040.a + add_internal_flag = special + + add_prestige = minor_prestige_gain + scope:local_ruler = { + pay_herd = { + target = root + value = domicile.medium_herd_value + } + } + scope:local_ruler = { + add_opinion = { + target = root + modifier = humiliated_opinion + opinion = -50 + } + progress_towards_rival_effect = { + REASON = rival_extorted_me_for_gifts + CHARACTER = root + OPINION = 0 + } + } + stress_impact = { + base = minor_stress_impact_loss + greedy = miniscule_stress_impact_loss + temperate = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + humble = miniscule_stress_impact_gain + generous = major_stress_impact_gain + compassionate = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = compassionate + has_trait = content + } + } + } + } + #We can trade gifts! + option = { + trigger = { + domicile = { + herd >= minor_herd_value + } + } + name = migration_events.1040.b + + #Cultural acceptance gain + if = { + limit = { + NOT = { + culture = scope:local_ruler.culture + } + OR = { + root.culture = { + culture_head = root + } + scope:local_ruler.culture = { + culture_head = scope:local_ruler + } + } + } + culture = { + change_cultural_acceptance = { + target = scope:local_ruler.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_meal_of_hospitality + } + } + } + else_if = { + limit = { + NOT = { + culture = scope:local_ruler.culture + } + #These rulers should be at least a little significant + NOT = { + has_realm_law = nomadic_authority_1 + } + is_ai = no + } + culture = { + change_cultural_acceptance = { + target = scope:local_ruler.culture + value = miniscule_cultural_acceptance_gain + desc = cultural_acceptance_meal_of_hospitality + } + } + } + scope:local_ruler = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + stress_impact = { + base = minor_stress_impact_loss + gluttonous = miniscule_stress_impact_loss + generous = miniscule_stress_impact_loss + temperate = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + paranoid = miniscule_stress_impact_gain + greedy = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 1 + ai_greed = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = callous + has_trait = sadistic + AND = { + OR = { + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_4 + } + scope:local_ruler = { + has_realm_law = nomadic_authority_1 + } + } + } + } + } + } + #We have no time to dawdle + option = { + name = migration_events.1040.c + add_character_modifier = { + modifier = mpo_refusing_diplomatic_stops_modifier + months = 6 + } + reverse_add_opinion = { + target = scope:local_ruler + modifier = spurned_gift_opinion + opinion = -25 + } + if = { + limit = { + is_ai = no + } + scope:local_ruler = { + add_prestige = minor_prestige_loss + } + } + stress_impact = { + impatient = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + gluttonous = medium_stress_impact_gain + humble = minor_stress_impact_gain + patient = minor_stress_impact_gain + lazy = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = -1 + ai_energy = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = gluttonous + has_trait = humble + has_trait = patient + + } + } + } + } + #Yeah, thanks + option = { + name = migration_events.1040.d + + scope:local_ruler = { + pay_herd = { + target = root + value = domicile.miniscule_herd_value + } + } + stress_impact = { + base = minor_stress_impact_loss + gluttonous = miniscule_stress_impact_loss + temperate = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + paranoid = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + ai_greed = 1 + } + } + } +} + +#Your warriors overrun a local settlement and offer you spoils +migration_events.1050 = { + type = character_event + title = migration_events.1050.t + desc = migration_events.1050.desc + theme = migration + override_background = { + reference = mpo_campfire_steppe + } + left_portrait = { + character = root + animation = personality_dishonorable + } + right_portrait = { + character = scope:warrior + animation = random_weapon_celebrate + } + lower_right_portrait = scope:local_ruler + + trigger = { + age >= 6 + is_migrating = yes + has_mpo_dlc_trigger = yes + location.county = { + NOT = { + any_county_province = { + OR = { + is_raided = yes + is_occupied = yes + } + } + } + } + location.county.holder = { + NOR = { + has_character_flag = migration_events_1050_raided_flag + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + is_tributary_of = root + root = { + is_tributary_of = prev + } + is_vassal_or_below_of = root + root = { + is_vassal_or_below_of = prev + } + is_allied_to = root + house ?= root.house + has_truce = root + } + } + any_courtier = { + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + basic_is_available_ai = yes + } + } + + weight_multiplier = { + base = 2 + modifier = { + add = -1 + location.county.holder = { + opinion = { + target = root + value >= 60 + } + } + } + modifier = { + add = -1 + location.county.holder = { + culture = root.culture + } + } + modifier = { + add = 1 + location.county.holder = { + OR = { + is_at_war_with = root + is_causing_raid_hostility_towards = root + root = { + is_causing_raid_hostility_towards = prev + } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + } + } + + cooldown = { + years = 5 + } + + immediate = { + + location.county = { + save_scope_as = location_county + } + location.county.holder = { + save_scope_as = local_ruler + add_character_flag = { + flag = migration_events_1050_raided_flag + years = 1 + } + } + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + hidden_effect = { + scope:local_ruler = { + random_list = { + 45 = { + save_scope_value_as = { + name = quality + value = 5 + } + save_scope_value_as = { + name = wealth + value = 5 + } + } + 45 = { + save_scope_value_as = { + name = quality + value = 10 + } + save_scope_value_as = { + name = wealth + value = 10 + } + } + 5 = { + save_scope_value_as = { + name = quality + value = 20 + } + save_scope_value_as = { + name = wealth + value = 20 + } + } + 5 = { + save_scope_value_as = { + name = quality + value = 30 + } + save_scope_value_as = { + name = wealth + value = 30 + } + } + 5 = { + trigger = { + scope:local_ruler = { + highest_held_title_tier >= tier_kingdom + } + } + save_scope_value_as = { + name = quality + value = 40 + } + save_scope_value_as = { + name = wealth + value = 40 + } + } + 5 = { + trigger = { + scope:local_ruler = { + highest_held_title_tier >= tier_empire + } + } + save_scope_value_as = { + name = quality + value = 50 + } + save_scope_value_as = { + name = wealth + value = 50 + } + } + } + clear_saved_scope = root + save_scope_as = root + random_list = { + 1 = { + create_artifact_bow_effect = { OWNER = scope:local_ruler CREATOR = scope:dummy_gender SET_BOW_TYPE = flag:artifact_bow_type_composite } + } + 1 = { + create_artifact_necklace_effect = { OWNER = scope:local_ruler SMITH = scope:dummy_gender } + } + 1 = { + create_artifact_armor_effect = { + OWNER = scope:local_ruler + CREATOR = scope:dummy_gender + SET_ARMOR_TYPE = flag:no + } + } + 1 = { + create_artifact_animal_hide_effect = { + OWNER = scope:local_ruler + HUNTER = scope:local_ruler + LEGENDARY = no + ANIMAL = flag:none + } + } + 1 = { + create_artifact_weapon_effect = { + OWNER = scope:local_ruler + CREATOR = scope:dummy_gender + SET_WEAPON_TYPE = flag:no + } + } + 1 = { + create_artifact_ring_effect = { + OWNER = scope:local_ruler + SMITH = scope:dummy_gender + } + } + 1 = { + create_artifact_bowl_effect = { + OWNER = scope:local_ruler + SMITH = scope:dummy_gender + } + } + 1 = { + create_artifact_brooch_effect = { + OWNER = scope:local_ruler + SMITH = scope:dummy_gender + } + } + } + } + } + clear_saved_scope = root + save_scope_as = root + + random_knight = { + limit = { + is_acclaimed = yes + is_courtier_of = root + } + save_scope_as = warrior + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + random_knight = { + limit = { + is_courtier_of = root + } + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + random_courtier = { + limit = { + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + basic_is_available_ai = yes + } + save_scope_as = warrior + } + } + scope:warrior = { + add_character_flag = need_military_outfit + } + scope:local_ruler = { + add_opinion = { + target = root + opinion = -25 + modifier = raided_me_opinion + } + #Steal from AI if root is player + if = { + limit = { + root = { + is_ai = no + } + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + pay_herd = { + target = root + value = root.domicile.minor_herd_value + } + } + else = { + root.domicile = { + change_herd = minor_herd_gain + } + } + pay_short_term_gold = { + target = root + gold = root.minor_gold_value + } + root.location.county = { + change_county_control = minor_county_control_loss + } + } + #Simply gain resources if not + else = { + root = { + domicile = { + change_herd = minor_herd_gain + } + add_gold = minor_gold_value + } + } + } + } + #You're a bold captain, warrior, and deserve acknowledgement + option = { + trigger = { + OR = { + has_trait = gallant + has_trait = strategist + has_trait = education_martial_prowess_2 + has_trait = education_martial_prowess_3 + has_trait = education_martial_prowess_4 + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + } + } + name = migration_events.1050.a + + scope:newly_created_artifact = { + add_artifact_history = { + location = root.location + actor = scope:local_ruler + recipient = scope:warrior + type = stolen + } + set_owner = scope:warrior + } + if = { + limit = { + scope:warrior = { + is_acclaimed = yes + } + } + scope:warrior.accolade = { + add_glory = minor_glory_gain + } + scope:warrior = { + add_martial_skill = 1 + } + } + else_if = { + limit = { + scope:warrior = { + NOT = { + has_trait = reaver + } + } + } + scope:warrior = { + add_trait = reaver + add_martial_skill = 1 + } + } + else = { + scope:warrior = { + add_martial_skill = 1 + add_prowess_skill = 1 + } + } + if = { + limit = { + scope:warrior = { + NOT = { is_obedient_to = root } + } + } + scope:warrior = { + add_opinion = { + modifier = obedience_opinion + target = root + } + } + } + else_if = { + limit = { + scope:warrior = { + NOT = { + has_trait = disloyal + } + } + } + scope:warrior = { + add_trait = loyal + } + } + + stress_impact = { + greedy = miniscule_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_honor = 1 + } + modifier = { + factor = 0 + OR = { + + } + } + } + } + #BURN AND DESPOIL AS WE GO + option = { + trigger = { + NOT = { + has_realm_law = nomadic_authority_1 + } + OR = { + has_trait = sadistic + has_trait = greedy + has_trait = wrathful + has_trait = arbitrary + has_trait = avaricious + has_trait = torturer + has_trait = conqueror + has_trait = greatest_of_khans + has_trait = overseer + has_trait = viking + } + } + name = migration_events.1050.b + + #Gain gold and herd every time you travel into a new province + if = { + limit = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_3 + culture = { + culture_head = root + } + } + } + custom_tooltip = migration_raiding_effect_tt + } + else = { + custom_tooltip = migration_raiding_effect_no_culture_tt + } + scope:newly_created_artifact = { + add_artifact_history = { + location = root.location + actor = scope:local_ruler + recipient = root + type = stolen + } + set_owner = root + } + + add_character_flag = { + flag = migration_raiding_flag + years = 1 + } + add_dread = minor_dread_gain + + stress_impact = { + compassionate = minor_stress_impact_gain + craven = minor_stress_impact_gain + just = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_boldness = 1 + ai_compassion = -1 + ai_greed = 1 + } + modifier = { + factor = 0.5 + has_realm_law = nomadic_authority_3 + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = craven + has_trait = compassionate + has_trait = just + has_trait = paranoid + } + } + } + } + #This was cruel, and all loot should be returned to the survivors + option = { + trigger = { + OR = { + has_trait = just + has_trait = compassionate + has_trait = generous + has_trait = forgiving + has_trait = trusting + has_trait = humble + has_trait = diplomat + has_trait = education_diplomacy_3 + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + } + } + name = migration_events.1050.c + + hidden_effect = { + destroy_artifact = scope:newly_created_artifact + } + #Increase culture acceptance + if = { + limit = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_3 + culture = { + culture_head = root + } + } + NOT = { + culture = scope:local_ruler.culture + } + } + culture = { + change_cultural_acceptance = { + target = scope:local_ruler.culture + value = minor_cultural_acceptance_gain + desc = cultural_acceptance_recompense_for_raiding + } + } + + } + else = { + add_piety = medium_piety_gain + } + scope:local_ruler = { + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 50 + } + } + location.county = { + change_county_control = minor_county_control_gain + } + remove_short_term_gold = minor_gold_value + domicile = { + change_herd = minor_herd_loss + } + + stress_impact = { + greedy = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + vengeful = miniscule_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + ai_greed = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arbitrary + has_trait = arrogant + has_trait = sadistic + has_trait = callous + } + } + } + } + #Distribute my share among my men + option = { + name = migration_events.1050.d + + scope:newly_created_artifact = { + add_artifact_history = { + location = root.location + actor = scope:local_ruler + recipient = scope:warrior + type = stolen + } + set_owner = scope:warrior + } + + remove_short_term_gold = minor_gold_value + domicile = { + change_herd = minor_herd_loss + } + if = { + limit = { + any_knight = { + NOT = { + this = scope:warrior + } + } + } + every_knight = { + custom = custom.every_knight + if = { + limit = { + root = { has_realm_law = nomadic_authority_1 } + } + add_opinion = { + target = root + opinion = 25 + modifier = loyalty_opinion + } + add_prowess_skill = 1 + } + else_if = { + limit = { + root = { has_realm_law = nomadic_authority_2 } + } + add_opinion = { + target = root + opinion = 20 + modifier = loyalty_opinion + } + add_prowess_skill = 1 + } + else_if = { + limit = { + root = { has_realm_law = nomadic_authority_3 } + } + add_opinion = { + target = root + opinion = 15 + modifier = loyalty_opinion + } + add_stress = minor_stress_impact_loss + } + else = { + add_opinion = { + target = root + opinion = 10 + modifier = loyalty_opinion + } + add_stress = minor_stress_impact_loss + } + } + } + else = { + scope:warrior = { + if = { + limit = { + root = { has_realm_law = nomadic_authority_1 } + } + add_prowess_skill = 1 + } + else_if = { + limit = { + root = { has_realm_law = nomadic_authority_2 } + } + add_prowess_skill = 1 + } + else_if = { + limit = { + root = { has_realm_law = nomadic_authority_3 } + } + add_stress = minor_stress_impact_loss + } + else = { + add_stress = minor_stress_impact_loss + } + } + } + + if = { + limit = { + any_knight = { + NOT = { is_obedient_to = root } + } + } + random_knight = { + limit = { NOT = { is_obedient_to = root } } + add_opinion = { + modifier = obedience_opinion + target = root + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_honor = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arrogant + } + } + } + } + #I will take my share + option = { + name = migration_events.1050.e + + #Gain artifact + + scope:newly_created_artifact = { + add_artifact_history = { + location = root.location + actor = scope:local_ruler + recipient = root + type = stolen + } + set_owner = root + } + + stress_impact = { + generous = minor_stress_impact_gain + humble = minor_stress_impact_gain + just = miniscule_stress_impact_gain + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + } + } + } + } + after = { + scope:warrior = { + remove_character_flag = need_military_outfit + } + } +} + +migration_events.1051 = { + hidden = yes + + immediate = { + location = { + save_scope_as = raided_settlement + } + send_interface_message = { + type = event_raiding_good_with_text + title = migration_events.1051_title + desc = migration_events.1051_tooltip + left_icon = scope:local_ruler + + if = { + limit = { + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + add_gold = medium_gold_value + } + if = { + limit = { + OR = { + has_realm_law = nomadic_authority_3 + has_realm_law = nomadic_authority_2 + } + } + add_gold = minor_gold_value + } + if = { + limit = { + has_realm_law = nomadic_authority_1 + } + add_gold = miniscule_gold_value + } + domicile = { + change_herd = miniscule_herd_gain + } + #Decrease culture acceptance and opinion wherever you go + reverse_add_opinion = { + opinion = -20 + modifier = raided_me_opinion + target = scope:local_ruler + } + if = { + limit = { + NOT = { + culture = scope:local_ruler.culture + } + OR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_3 + culture = { + culture_head = root + } + } + } + culture = { + change_cultural_acceptance = { + target = scope:local_ruler.culture + value = miniscule_cultural_acceptance_loss + desc = cultural_acceptance_raiding_migrators + } + } + } + if = { + limit = { + scope:local_ruler = { + is_ai = yes + } + } + location.county = { + change_county_control = miniscule_county_control_loss + } + } + } + } +} + +#It's tough going getting through the local terrain. Your young warriors are frustrated and want to ride ahead to the destination +migration_events.1060 = { + type = character_event + title = migration_events.1060.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root = { + location_has_harsh_winter_trigger = yes + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + desc = migration_events.1060.desc_winter + } + triggered_desc = { + trigger = { + root.location = { + terrain = desert + } + } + desc = migration_events.1060.desc_desert + } + triggered_desc = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + } + } + desc = migration_events.1060.desc_forest + } + triggered_desc = { + trigger = { + root.location = { + terrain = wetlands + } + } + desc = migration_events.1060.desc_wetlands + } + desc = migration_events.1060.desc_hilly + } + desc = migration_events.1060.desc + } + theme = migration + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_very_left + } + right_portrait = { + character = scope:warrior + animation = horse_surveying + camera = camera_event_horse_right_facing_left + } + + trigger = { + age >= 10 + is_migrating = yes + has_mpo_dlc_trigger = yes + location = { + OR = { + terrain = desert_mountains + terrain = mountains + terrain = hills + terrain = desert + terrain = forest + terrain = wetlands + terrain = taiga + AND = { + has_province_modifier = winter_harsh_modifier + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + } + any_courtier = { + is_adult = yes + age < 50 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + basic_is_available_ai = yes + ai_energy >= 0 + } + current_travel_plan = { + final_destination_province.county = { + NOT = { + has_county_modifier = mpo_migration_prepared_home_modifier + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + location = { + OR = { + terrain = desert_mountains + terrain = mountains + terrain = desert + terrain = wetlands + } + } + } + } + + cooldown = { + years = 5 + } + + immediate = { + location.county = { + save_scope_as = location_county + } + location = { + save_scope_as = root_location + } + location.county.holder = { + save_scope_as = local_ruler + add_character_flag = { + flag = migration_events_1040_giver_flag + years = 1 + } + } + if = { + limit = { + primary_heir = { + is_courtier_of = root + is_adult = yes + age < 50 + basic_is_available_ai = yes + ai_energy >= low_negative_ai_value + } + } + primary_heir = { + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + exists = house + } + random_close_family_member = { + limit = { + is_courtier_of = root + is_adult = yes + age < 50 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + basic_is_available_ai = yes + ai_energy >= low_negative_ai_value + } + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + exists = house + } + random_councillor = { + limit = { + is_courtier_of = root + is_adult = yes + age < 50 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + basic_is_available_ai = yes + ai_energy >= 0 + } + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + exists = house + } + house = { + random_house_member = { + limit = { + is_knight_of = root + is_courtier_of = root + is_adult = yes + age < 50 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + basic_is_available_ai = yes + ai_energy >= 0 + } + save_scope_as = warrior + } + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + random_knight = { + limit = { + age < 50 + basic_is_available_ai = yes + ai_energy >= 0 + } + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + random_courtier = { + limit = { + is_adult = yes + age < 50 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + basic_is_available_ai = yes + ai_energy >= 0 + } + save_scope_as = warrior + } + } + domicile = { + change_herd = miniscule_herd_loss + } + current_travel_plan = { + final_destination_province.county = { + save_scope_as = destination + } + } + } + #Come with me, I'll find us an easier route + option = { + trigger = { + OR = { + has_trait = lifestyle_traveler + has_trait = organizer + has_trait = logistician + AND = { + location = { + OR = { + terrain = hills + terrain = mountains + terrain = wetlands + } + } + has_trait = rough_terrain_expert + } + AND = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + has_trait = desert_warrior + } + AND = { + location = { + OR = { + terrain = forest + terrain = taiga + } + } + has_trait = forest_fighter + } + AND = { + location_has_harsh_winter_trigger = yes + has_trait = winter_soldier + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + } + name = migration_events.1060.a + + duel = { + skills = { martial stewardship } + value = medium_skill_rating + + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + modifier = { + add = 30 + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + } + modifier = { + add = 30 + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 100 + } + } + modifier = { + add = 30 + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + } + modifier = { + add = 30 + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 100 + } + } + modifier = { + add = 15 + OR = { + has_trait = organizer + has_trait = logistician + AND = { + location = { + OR = { + terrain = hills + terrain = mountains + terrain = wetlands + } + } + has_trait = rough_terrain_expert + } + AND = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + has_trait = desert_warrior + } + AND = { + location = { + OR = { + terrain = forest + terrain = taiga + } + } + has_trait = forest_fighter + } + AND = { + location_has_harsh_winter_trigger = yes + has_trait = winter_soldier + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + } + modifier = { + add = 30 + OR = { + AND = { + has_trait = organizer + has_trait_xp = { + trait = organizer + value >= 50 + } + } + AND = { + has_trait = logistician + has_trait_xp = { + trait = logistician + value >= 50 + } + } + AND = { + location = { + OR = { + terrain = hills + terrain = mountains + terrain = wetlands + } + } + AND = { + has_trait = rough_terrain_expert + has_trait_xp = { + trait = rough_terrain_expert + value >= 50 + } + } + } + AND = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + AND = { + has_trait = desert_warrior + has_trait_xp = { + trait = desert_warrior + value >= 50 + } + } + } + AND = { + location = { + OR = { + terrain = forest + terrain = taiga + } + } + AND = { + has_trait = forest_fighter + has_trait_xp = { + trait = forest_fighter + value >= 50 + } + } + } + AND = { + location_has_harsh_winter_trigger = yes + AND = { + has_trait = winter_soldier + has_trait_xp = { + trait = winter_soldier + value >= 50 + } + } + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + } + modifier = { + add = 30 + OR = { + AND = { + has_trait = organizer + has_trait_xp = { + trait = organizer + value >= 100 + } + } + AND = { + has_trait = logistician + has_trait_xp = { + trait = logistician + value >= 100 + } + } + AND = { + location = { + OR = { + terrain = hills + terrain = mountains + terrain = wetlands + } + } + AND = { + has_trait = rough_terrain_expert + has_trait_xp = { + trait = rough_terrain_expert + value >= 100 + } + } + } + AND = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + AND = { + has_trait = desert_warrior + has_trait_xp = { + trait = desert_warrior + value >= 100 + } + } + } + AND = { + location = { + OR = { + terrain = forest + terrain = taiga + } + } + AND = { + has_trait = forest_fighter + has_trait_xp = { + trait = forest_fighter + value >= 100 + } + } + } + AND = { + location_has_harsh_winter_trigger = yes + AND = { + has_trait = winter_soldier + has_trait_xp = { + trait = winter_soldier + value >= 100 + } + } + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + } + desc = mpo_migration_events.1060.a.success + send_interface_toast = { + type = event_toast_effect_good + title = mpo_migration_events.1060.a.success + left_icon = root + + if = { + limit = { + AND = { + location = { + OR = { + terrain = hills + terrain = mountains + terrain = wetlands + } + } + has_trait = rough_terrain_expert + } + } + add_trait_xp = { + trait = rough_terrain_expert + value = 33 + } + } + else_if = { + limit = { + AND = { + location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + has_trait = desert_warrior + } + } + add_trait_xp = { + trait = desert_warrior + value = 33 + } + } + else_if = { + limit = { + AND = { + location = { + OR = { + terrain = forest + terrain = taiga + } + } + has_trait = forest_fighter + } + } + add_trait_xp = { + trait = forest_fighter + value = 33 + } + } + else_if = { + limit = { + AND = { + location_has_harsh_winter_trigger = yes + has_trait = winter_soldier + OR = { + current_month >= 11 + current_month <= 4 + } + } + } + add_trait_xp = { + trait = winter_soldier + value = 33 + } + } + else_if = { + limit = { + has_trait = organizer + } + add_trait_xp = { + trait = organizer + value = 33 + } + } + else_if = { + limit = { + has_trait = logistician + } + add_trait_xp = { + trait = logistician + value = 33 + } + } + else_if = { + limit = { + has_trait = lifestyle_traveler + } + add_trait_xp = { + trait = lifestyle_traveler + track = danger + value = 15 + } + } + add_character_modifier = { + modifier = mpo_found_paths_for_herds_modifier + months = 6 + } + reverse_add_opinion = { + modifier = impressed_opinion + target = scope:warrior + opinion = 15 + } + + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + modifier = { + add = 20 + health < fine_health + } + modifier = { + add = 20 + health < poor_health + } + modifier = { + add = 20 + NOR = { + knows_language_of_culture = root.location.county.culture + is_allied_to = root.location.county.holder + has_any_good_relationship_with_character_trigger = { CHARACTER = root.location.county.holder } + is_liege_or_above_of = root.location.county.holder + is_vassal_of = root.location.county.holder + } + } + desc = mpo_migration_events.1060.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_migration_events.1060.a.failure + left_icon = root + + add_stress = miniscule_stress_impact_gain + domicile = { + change_herd = minor_herd_loss + } + current_travel_plan = { + delay_travel_plan = { days = 15 } + } + } + } + } + + + stress_impact = { + trusting = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + modifier = { + add = 50 + stewardship >= high_skill_rating + } + modifier = { + add = 50 + martial >= high_skill_rating + } + modifier = { + add = 50 + stewardship >= extremely_high_skill_rating + } + modifier = { + add = 50 + martial >= extremely_high_skill_rating + } + modifier = { + add = -50 + stewardship < medium_skill_rating + } + modifier = { + add = -50 + martial < medium_skill_rating + } + modifier = { + add = -50 + stewardship <= low_skill_rating + } + modifier = { + add = -50 + martial <= low_skill_rating + } + modifier = { + add = -50 + health < poor_health + } + modifier = { + add = 50 + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = danger + value >= 50 + } + } + modifier = { + add = 50 + has_trait = lifestyle_traveler + has_trait_xp = { + trait = lifestyle_traveler + track = travel + value >= 50 + } + } + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = content + } + } + } + } + #You can ride ahead, but scout out our destination and prepare it well + option = { + name = migration_events.1060.b + + if = { + limit = { + scope:warrior = { + NOT = { is_obedient_to = root } + } + } + scope:warrior = { + add_stress = medium_stress_loss + } + } + else = { + scope:warrior = { + add_opinion = { + modifier = obedience_opinion + target = root + } + } + } + scope:warrior = { + if = { + limit = { + OR = { + has_trait = education_martial_1 + has_trait = education_martial_2 + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + } + } + add_martial_lifestyle_xp = medium_lifestyle_xp + } + else_if = { + limit = { + OR = { + has_trait = education_stewardship_1 + has_trait = education_stewardship_2 + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + } + } + add_stewardship_lifestyle_xp = medium_lifestyle_xp + } + else = { + add_prestige = medium_prestige_gain + } + } + scope:destination = { + add_county_modifier = { + modifier = mpo_migration_prepared_home_modifier + years = 5 + } + } + add_character_modifier = { + modifier = mpo_migrating_without_labor_modifier + months = 6 + } + + stress_impact = { + craven = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + impatient = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = stubborn + has_trait = impatient + has_trait = paranoid + } + } + } + } + #You remain with us. There's hard labor to do + option = { + name = migration_events.1060.c + + scope:warrior = { + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + } + else = { + add_trait_xp = { + trait = lifestyle_traveler + track = danger + value = 20 + } + } + add_stress = miniscule_stress_gain + } + reverse_add_opinion = { + modifier = refusal_opinion + target = scope:warrior + opinion = -20 + } + + + stress_impact = { + fickle = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = fickle + has_trait = arbitrary + has_trait = trusting + } + } + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_migration_travel_events.txt b/N3OW/events/dlc/mpo/mpo_migration_travel_events.txt new file mode 100644 index 00000000..2e174e3e --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_migration_travel_events.txt @@ -0,0 +1,1322 @@ +namespace = mpo_migration_travel_events + +# A ruler in the county you're in offers you some herd to help you on your way +mpo_migration_travel_events.0001 = { + type = character_event + title = mpo_migration_travel_events.0001.t + desc = mpo_migration_travel_events.0001.desc + theme = migration + + left_portrait = { + character = root + animation = personality_honorable + } + + right_portrait = { + character = scope:messenger + animation = shepherd_with_sheep + } + + lower_center_portrait = scope:ruler + + cooldown = { years = 25 } + + immediate = { + location.county.holder = { save_scope_as = ruler } + scope:ruler = { + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = messenger + } + } + } + + trigger = { + is_migrating = yes + domicile ?= { + herd <= twenty_percent_herd_value + } + location.county.holder = { + NOR = { + this = root + has_hook = root + has_trait = greedy + has_trait = callous + } + has_good_opinion_of_root_trigger = yes + is_available_ai_adult = yes + any_courtier = { + is_available_adult = yes + } + } + } + + # Take it + option = { + name = mpo_migration_travel_events.0001.a + scope:ruler = { + pay_herd = { + target = root + value = domicile.medium_herd_value + } + add_hook = { + target = root + type = favor_hook + } + } + hidden_effect = { + add_opinion = { + modifier = grateful_opinion + target = scope:ruler + opinion = 15 + } + } + + stress_impact = { + paranoid = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 2 + domicile = { herd <= domicile.ten_percent_herd_value } + } + modifier = { + factor = 1.5 + domicile = { herd <= domicile.twenty_percent_herd_value } + } + modifier = { + factor = 0 + has_trait = paranoid + } + ai_value_modifier = { + ai_greed = 1 + } + } + } + + # Decline + option = { + name = mpo_migration_travel_events.0001.b + + scope:ruler = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + } + + stress_impact = { + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = arrogant + } + } + } +} + +# An old vassal and a new vassal urge you to give them some herd +mpo_migration_travel_events.0010 = { + type = character_event + title = mpo_migration_travel_events.0010.t + desc = mpo_migration_travel_events.0010.desc + theme = migration + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:messenger + animation = beg + } + + lower_left_portrait = scope:vassal_1 + lower_right_portrait = scope:vassal_2 + + cooldown = { years = 10 } + + immediate = { + random_courtier = { + limit = { + is_adult = yes + } + save_scope_as = messenger + } + random_vassal = { + limit = { + government_has_flag = government_is_nomadic + domicile ?= { herd < max_herd } + } + save_scope_as = vassal_1 + } + var:migration_title.holder = { + random_vassal = { + limit = { + government_has_flag = government_is_nomadic + domicile ?= { herd < max_herd } + } + save_scope_as = vassal_2 + } + } + } + + trigger = { + is_migrating = yes + has_variable = migration_title + domicile ?= { + herd > max_herd + } + any_courtier = { count >=1 } + any_vassal = { count >= 1 government_has_flag = government_is_nomadic domicile ?= { herd < max_herd } } + var:migration_title.holder = { any_vassal = { count >= 1 government_has_flag = government_is_nomadic domicile ?= { herd < max_herd } } } + } + + # Give to vassal 1 + option = { + name = mpo_migration_travel_events.0010.a + + pay_herd = { + target = scope:vassal_1 + value = domicile.excess_herd_value + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:vassal_1 + opinion = excess_herd_opinion_value + } + + custom_tooltip = no_longer_herd_limit_tt + + stress_impact = { + generous = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + opinion_modifier = { + opinion_target = scope:vassal_1 + multiplier = 1 + } + } + } + + # Give to vassal 2 + option = { + name = mpo_migration_travel_events.0010.b + + pay_herd = { + target = scope:vassal_2 + value = domicile.excess_herd_value + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:vassal_2 + opinion = excess_herd_opinion_value + } + + custom_tooltip = no_longer_herd_limit_tt + + stress_impact = { + generous = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + opinion_modifier = { + opinion_target = scope:vassal_2 + multiplier = 1 + } + } + } + + # Give to none + option = { + name = mpo_migration_travel_events.0010.c + + domicile = { + change_herd = root.excess_herd_value_negative + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:vassal_2 + opinion = -15 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:vassal_1 + opinion = -15 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:messenger + opinion = -5 + } + + custom_tooltip = no_longer_herd_limit_tt + + stress_impact = { + callous = minor_stress_impact_loss + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } + + option = { + name = mpo_migration_travel_events.0010.d + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:vassal_2 + opinion = -5 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:vassal_1 + opinion = -5 + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:messenger + opinion = -5 + } + + stress_impact = { + greedy = medium_stress_impact_loss + diligent = minor_stress_impact_gain + } + + add_character_modifier = { + modifier = nomad_keep_herd_modifier + years = 5 + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + factor = 0 + has_trait = diligent + } + } + } +} + +# The county you're migrating to has low fertility +mpo_migration_travel_events.0020 = { + type = character_event + title = mpo_migration_travel_events.0020.t + desc = mpo_migration_travel_events.0020.desc + theme = migration + + left_portrait = { + character = root + animation = worry + } + + lower_center_portrait = { + trigger = { + exists = scope:astrologer + } + character = scope:astrologer + } + + trigger = { + is_migrating = yes + has_variable = migration_title + var:migration_title ?= { + tier = tier_county + county_fertility <= bad_county_fertility_level + } + } + + cooldown = { years = 15 } + + immediate = { + if = { + limit = { + employs_court_position = court_astrologer_court_position + } + random_courtier = { + limit = { + has_court_position = court_astrologer_court_position + } + save_scope_as = astrologer + } + } + var:migration_title = { save_scope_as = target_title } + } + + option = { + name = mpo_migration_travel_events.0020.a + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + } + } + + option = { + name = mpo_migration_travel_events.0020.c + trigger = { + domicile = { herd >= major_herd_value } + } + show_as_unavailable = { always = yes } + + domicile = { + change_herd = major_herd_loss + } + + var:migration_title = { + change_county_fertility = minor_county_fertility_level_gain + } + + ai_chance = { + base = 25 + } + } + + option = { + name = mpo_migration_travel_events.0020.d + trigger = { + employs_court_position = court_astrologer_court_position + } + show_as_unavailable = { always = yes } + scope:astrologer = { + duel = { + desc = mpo_migration_travel_events.0020.d_tt + skill = learning + value = very_high_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_migration_travel_events.0020.win + root = { + send_interface_toast = { + title = mpo_migration_travel_events.0020.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:astrologer + var:migration_title = { + change_county_fertility = major_county_fertility_level_gain + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_migration_travel_events.0020.lose + root = { + send_interface_toast = { + title = mpo_migration_travel_events.0020.lose + type = event_toast_effect_bad + left_icon = root + right_icon = scope:astrologer + stress_impact = { + base = minor_stress_impact_gain + } + } + } + } + } + } + + ai_chance = { + base = 75 + } + } +} + +# Danger! A sickness effecting the herd +mpo_migration_travel_events.0030 = { + type = character_event + title = mpo_migration_travel_events.0030.t + desc = mpo_migration_travel_events.0030.desc + theme = migration + + left_portrait = { + character = root + animation = worry + } + + right_portrait = { + character = scope:messenger + animation = jockey_idle + camera = camera_event_horse_right + } + + cooldown = { years = 5 } + + trigger = { + is_migrating = yes + NOT = { domicile ?= { herd <= twenty_percent_herd_value } } + } + + immediate = { + traveler_danger_xp_effect = { + MIN = 3 + MAX = 7 + } + domicile = { + change_herd = minor_herd_loss + } + random_courtier = { + limit = { + is_adult = yes + } + save_scope_as = messenger + } + current_travel_plan = { delay_travel_plan = { days = 30 } } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 1.5 + domicile ?= { herd >= max_herd } + } + } + + # Lose more herd + option = { + name = mpo_migration_travel_events.0030.a + domicile = { + change_herd = medium_herd_loss + } + stress_impact = { + base = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + callous = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + # Consult a local shepherd + option = { + name = mpo_migration_travel_events.0030.b + trigger = { + short_term_gold >= medium_gold_value + } + show_as_unavailable = { always = yes } + remove_short_term_gold = medium_gold_value + random_list = { + 50 = { + show_chance = no + desc = mpo_migration_travel_events.0030.b_good + send_interface_toast = { + title = mpo_migration_travel_events.0030.b_good + type = event_toast_effect_good + left_icon = root + right_icon = scope:messenger + } + } + 50 = { + show_chance = no + desc = mpo_migration_travel_events.0030.b_bad + send_interface_toast = { + title = mpo_migration_travel_events.0030.b_bad + type = event_toast_effect_bad + left_icon = root + right_icon = scope:messenger + current_travel_plan = { + add_travel_plan_modifier = nomad_slow_horses_modifier + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 1 + ai_greed = -0.75 + } + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + gold <= major_gold_value + factor = 0 + } + } + } + + # Ignore it + option = { + name = mpo_migration_travel_events.0030.c + + random_list = { + 10 = { + show_chance = no + desc = mpo_migration_travel_events.0030.c_none + send_interface_toast = { + title = mpo_migration_travel_events.0030.c_none + type = event_toast_effect_neutral + left_icon = root + right_icon = scope:messenger + add_character_modifier = { + modifier = nomad_weak_herd_modifier + years = 2 + } + } + } + 30 = { + show_chance = no + desc = mpo_migration_travel_events.0030.c_medium + send_interface_toast = { + title = mpo_migration_travel_events.0030.c_medium + type = event_toast_effect_bad + left_icon = root + right_icon = scope:messenger + domicile = { + change_herd = miniscule_herd_loss + } + } + } + 40 = { + show_chance = no + desc = mpo_migration_travel_events.0030.c_major + send_interface_toast = { + title = mpo_migration_travel_events.0030.c_major + type = event_toast_effect_bad + left_icon = root + right_icon = scope:messenger + domicile = { + change_herd = minor_herd_loss + } + } + } + 20 = { + show_chance = no + desc = mpo_migration_travel_events.0030.c_massive + send_interface_toast = { + title = mpo_migration_travel_events.0030.c_massive + type = event_toast_effect_bad + left_icon = root + right_icon = scope:messenger + domicile = { + change_herd = medium_herd_loss + } + } + } + } + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:messenger + opinion = -15 + } + + current_travel_plan = { delay_travel_plan = { days = 90 } } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + modifier = { + factor = 0.5 + domicile ?= { herd <= forty_percent_herd_value } + } + modifier = { + factor = 2 + domicile ?= { herd >= max_herd } + } + } + } +} + +# You have to cross a river with your herd +mpo_migration_travel_events.0040 = { + type = character_event + title = mpo_migration_travel_events.0040.t + desc = mpo_migration_travel_events.0040.desc + theme = migration + + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_right + } + + cooldown = { years = 5 } + + trigger = { + is_migrating = yes + location = { + OR = { + is_riverside_province = yes + is_river_province = yes + } + } + } + + immediate = { + location.county = { save_scope_as = county } + } + + override_background = { + reference = bp3_riverside + } + + # Bum rush it + option = { + name = mpo_migration_travel_events.0040.a + duel = { + desc = mpo_migration_travel_events.0040.a_tt + skill = prowess + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_migration_travel_events.0040.win + send_interface_toast = { + title = mpo_migration_travel_events.0040.win + type = event_toast_effect_good + left_icon = root + if = { + limit = { + NOT = { has_trait = lifestyle_traveler } + } + add_trait = lifestyle_traveler + } + traveler_travel_xp_effect = { + MIN = 3 + MAX = 7 + } + } + if = { + limit = { + NOR = { + has_trait = brave + has_trait = craven + } + } + random = { + chance = 5 + add_trait = brave + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_migration_travel_events.0040.lose + root = { + send_interface_toast = { + title = mpo_migration_travel_events.0040.lose + type = event_toast_effect_bad + left_icon = root + domicile = { + change_herd = medium_herd_loss + } + } + } + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + modifier = { + factor = 0 + has_trait = craven + } + } + } + + # Build a raft + option = { + name = mpo_migration_travel_events.0040.b + trigger = { + short_term_gold >= minor_gold_value + } + show_as_unavailable = { always = yes } + flavor = mpo_migration_travel_events.0040.b_flavor + remove_short_term_gold = minor_gold_value + + stress_impact = { + base = miniscule_stress_impact_loss + greedy = miniscule_stress_impact_gain + } + + current_travel_plan = { delay_travel_plan = { days = 15 } } + + stress_impact = { + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + gold <= medium_gold_value + factor = 0 + } + } + } + + # Look for a ford + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + desc = mpo_migration_travel_events.0040.c_christian + } + desc = mpo_migration_travel_events.0040.c + } + } + } + + current_travel_plan = { delay_travel_plan = { days = 60 } } + + stress_impact = { + lazy = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -1 + } + } + } +} + +scripted_trigger is_eligible_courtier_0050 = { + is_adult = yes + is_ai = yes + NOR = { + is_consort_of = root + is_close_family_of = root + } +} + +scripted_trigger is_eligible_local_0050 = { + is_adult = yes + is_ai = yes + exists = liege + liege ?= { NOT = { this = root } } +} + +# A courtier falls in love with a local and wants to stay +mpo_migration_travel_events.0050 = { + type = character_event + title = mpo_migration_travel_events.0050.t + desc = mpo_migration_travel_events.0050.desc + theme = migration + override_background = { + reference = mpo_camp_steppe + } + + left_portrait = { + character = root + animation = shock + } + + right_portrait = { + character = scope:courtier + animation = storyteller + } + + lower_center_portrait = scope:local + + cooldown = { years = 15 } + + + trigger = { + is_migrating = yes + any_courtier = { + is_eligible_courtier_0050 = yes + save_temporary_scope_as = courtier_temp + } + location = { + any_character_in_location = { + is_eligible_local_0050 = yes + can_set_relation_lover_trigger = { CHARACTER = scope:courtier_temp } + is_similar_age_trigger = { CHARACTER = scope:courtier_temp } + } + } + } + + immediate = { + random_courtier = { + limit = { + is_eligible_courtier_0050 = yes + } + weight = { + base = 10 + modifier = { # Someone we actually care about + add = 15 + OR = { + has_any_court_position = yes + is_councillor = yes + } + } + modifier = { + add = -25 + has_trait = chaste + } + modifier = { + add = 25 + has_trait = lustful + } + modifier = { + add = 100 + has_relation_lover = root + } + } + save_scope_as = courtier + } + location = { + random_character_in_location = { + limit = { + is_eligible_local_0050 = yes + can_set_relation_lover_trigger = { CHARACTER = scope:courtier } + is_similar_age_trigger = { CHARACTER = scope:courtier } + } + weight = { + base = 10 + modifier = { + add = 25 + might_cheat_on_every_partner_trigger = yes + } + } + save_scope_as = local + } + } + hidden_effect = { + scope:courtier = { + set_relation_lover = scope:local + random_secret = { + limit = { + secret_type = secret_lover + secret_target = scope:local + } + save_scope_as = secret + } + } + } + scope:secret = { reveal_to = root } + } + + # Okay, farewell + option = { + name = mpo_migration_travel_events.0050.a + remove_courtier_or_guest = scope:courtier + scope:local.liege = { + add_courtier = scope:courtier + } + + stress_impact = { + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 75 + modifier = { + factor = 0.5 + scope:courtier = { + OR = { + is_councillor = yes + has_any_court_position = yes + } + } + } + modifier = { + factor = 0 + has_relation_lover = scope:courtier + } + } + } + + # No, stay + option = { + name = mpo_migration_travel_events.0050.b + + reverse_add_opinion = { + modifier = disappointed_opinion + target = scope:courtier + opinion = -20 + } + + stress_impact = { + callous = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + modifier = { + factor = 2 + scope:courtier = { + OR = { + is_councillor = yes + has_any_court_position = yes + } + } + } + ai_value_modifier = { + ai_compassion = -1 + } + } + } + + # Be with me instead + option = { + name = mpo_migration_travel_events.0050.c + trigger = { + has_trait = lustful + can_set_relation_lover_trigger = { CHARACTER = scope:courtier } + is_similar_age_trigger = { CHARACTER = scope:courtier } + } + + duel = { + desc = mpo_migration_travel_events.0050.c_tt + skill = intrigue + value = decent_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + desc = mpo_migration_travel_events.0050.win + send_interface_toast = { + title = mpo_migration_travel_events.0050.win + type = event_toast_effect_good + left_icon = root + right_icon = scope:courtier + scope:courtier = { remove_relation_lover = scope:local } + set_relation_lover = scope:courtier + } + stress_impact = { + base = minor_stress_impact_loss + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + desc = mpo_migration_travel_events.0050.lose + root = { + send_interface_toast = { + title = mpo_migration_travel_events.0050.lose + type = event_toast_effect_bad + left_icon = root + reverse_add_opinion = { + modifier = disgusted_opinion + target = scope:courtier + opinion = -10 + } + remove_courtier_or_guest = scope:courtier + scope:local.liege = { + add_courtier = scope:courtier + } + } + } + } + } + + ai_chance = { + base = 75 + } + } + + # How could you betray me? + option = { + name = mpo_migration_travel_events.0050.d + trigger = { + has_relation_lover = scope:courtier + } + + remove_relation_lover = scope:courtier + + rightfully_imprison_character_effect = { + TARGET = scope:courtier + IMPRISONER = root + } + + stress_impact = { + callous = medium_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + } + } +} + +# Danger! A horse goes mad and might trample a courtier +mpo_migration_travel_events.0060 = { + type = character_event + title = mpo_migration_travel_events.0060.t + desc = mpo_migration_travel_events.0060.desc + theme = migration + + left_portrait = { + character = root + animation = stress + } + + lower_center_portrait = scope:courtier + + trigger = { + is_migrating = yes + any_courtier = { count >= 4 } + } + + immediate = { + traveler_danger_xp_effect = { + MIN = 3 + MAX = 7 + } + random_courtier = { + weight = { + base = 10 + modifier = { # Someone we actually care about + add = 10 + OR = { + has_any_court_position = yes + is_councillor = yes + } + } + } + save_scope_as = courtier + } + } + + cooldown = { years = 5 } + + # Put it down + option = { + name = mpo_migration_travel_events.0060.a + custom_tooltip = mpo_migration_travel_events.0060.a_tt + + domicile = { + change_herd = miniscule_herd_loss + } + + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:courtier + opinion = 10 + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 1 + } + opinion_modifier = { + opinion_target = scope:courtier + multiplier = 2 + } + } + } + + # Try to calm the horse + option = { + name = mpo_migration_travel_events.0060.b + duel = { + desc = mpo_migration_travel_events.0060.tt + skill = diplomacy + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_migration_travel_events.0060.win + send_interface_toast = { + title = mpo_migration_travel_events.0060.win + type = event_toast_effect_good + left_icon = root + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:courtier + opinion = 10 + } + add_prestige = minor_prestige_gain + } + if = { + limit = { + NOR = { + has_trait = brave + has_trait = craven + } + } + random = { + chance = 5 + add_trait = brave + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_migration_travel_events.0060.lose + send_interface_toast = { + title = mpo_migration_travel_events.0060.lose + type = event_toast_effect_bad + left_icon = root + scope:courtier = { + increase_wounds_effect = { REASON = trampled_by_horse } + } + } + } + } + + stress_impact = { + craven = minor_stress_impact_gain + brave = minor_stress_impact_loss + } + + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + + # Let the courtier die + option = { + name = mpo_migration_travel_events.0060.c + + random_list = { + 50 = { + show_chance = no + desc = mpo_migration_travel_events.0060.people + send_interface_toast = { + title = mpo_migration_travel_events.0060.people + type = event_toast_effect_bad + left_icon = root + scope:courtier = { + increase_wounds_effect = { REASON = trampled_by_horse } + } + custom_tooltip = { + text = mpo_migration_travel_events.0060.people_tt + random = { + chance = 75 + random_courtier = { + limit = { + is_adult = yes + NOT = { this = scope:courtier } + } + save_scope_as = courtier_2 + increase_wounds_effect = { REASON = trampled_by_horse } + } + } + } + } + } + 30 = {} + } + + stress_impact = { + compassionate = minor_stress_impact_gain + callous = minor_stress_impact_loss + lazy = minor_stress_impact_loss + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + } + opinion_modifier = { + opinion_target = scope:courtier + multiplier = -2 + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_nomad_events_1.txt b/N3OW/events/dlc/mpo/mpo_nomad_events_1.txt new file mode 100644 index 00000000..6770b7a0 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_nomad_events_1.txt @@ -0,0 +1,8980 @@ +namespace = mpo_nomad_events + +############################ +## Nomadic flavor events +## 0001-0099 +## By Jason Cantalini +############################ + +mpo_nomad_events.1001 = { + hidden = yes + immediate = { + var:beheaded_warrior = { + save_scope_as = beheaded_warrior + } + var:beheaded_warrior_foe = { + save_scope_as = beheaded_warrior_foe + } + var:beheaded_warrior_location = { + save_scope_as = beheaded_warrior_location + } + if = { + limit = { + has_variable = beheaded_warrior_accolade + exists = var:beheaded_warrior_accolade + } + var:beheaded_warrior_accolade = { + save_scope_as = beheaded_warrior_accolade + } + } + #ROOT might be in army camp and knight would be more appropriate + random_courtier = { + limit = { + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + OR = { + is_available = yes + AND = { + is_in_army = yes + root = { + is_in_army = yes + } + } + } + } + save_scope_as = head_bearer + } + if = { + limit = { + NOT = { + exists = scope:head_bearer + } + } + random_vassal = { + limit = { + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + OR = { + is_available = yes + AND = { + is_in_army = yes + root = { + is_in_army = yes + } + } + } + } + save_scope_as = head_bearer + } + } + if = { + limit = { + NOT = { + exists = scope:head_bearer + } + } + random_courtier = { + limit = { + is_adult = yes + OR = { + is_available = yes + AND = { + is_in_army = yes + root = { + is_in_army = yes + } + } + } + } + save_scope_as = head_bearer + } + } + if = { + limit = { + NOT = { + exists = scope:head_bearer + } + } + random_pool_guest = { + limit = { + is_adult = yes + is_available = yes + } + save_scope_as = head_bearer + } + } + if = { + limit = { + NOT = { + exists = scope:head_bearer + } + exists = root.capital_province + } + random_pool_character = { + province = root.capital_province + limit = { + is_adult = yes + is_available = yes + } + save_scope_as = head_bearer + } + } + #Save family member to send the head to + if = { + limit = { + scope:beheaded_warrior = { + exists = house + } + } + scope:beheaded_warrior = { + ordered_parent = { + order_by = max_military_strength + limit = { + is_ai = yes + is_ruler = yes + highest_held_title_tier >= tier_county + NOT = { + this = root + } + } + save_scope_as = beheaded_relative + } + if = { + limit = { + NOT = { + exists = scope:beheaded_relative + } + } + ordered_child = { + order_by = max_military_strength + limit = { + is_ai = yes + is_ruler = yes + highest_held_title_tier >= tier_county + NOT = { + this = root + } + } + save_scope_as = beheaded_relative + } + } + if = { + limit = { + NOT = { + exists = scope:beheaded_relative + } + } + ordered_sibling = { + order_by = max_military_strength + limit = { + is_ai = yes + is_ruler = yes + highest_held_title_tier >= tier_county + NOR = { + this = root + scope:beheaded_warrior = { + is_close_family_of = root + } + } + } + save_scope_as = beheaded_relative + } + } + if = { + limit = { + NOT = { + exists = scope:beheaded_relative + } + exists = scope:beheaded_warrior.house.house_head + scope:beheaded_warrior.house.house_head = { + NOR = { + this = scope:beheaded_warrior + this = root + } + } + } + house = { + house_head = { + save_scope_as = beheaded_relative + } + } + } + } + } + #Create an artifact based on rank of dead person + mpo_beheaded_warrior_artifact_creation_effect = yes + trigger_event = mpo_nomad_events.1000 + } +} + +#One of your dead baghaturs' heads is recovered +mpo_nomad_events.1000 = { + type = character_event + theme = battle + title = mpo_nomad_events.1000.t + desc = { + #Triggered desc based on whether you're in an army + first_valid = { + triggered_desc = { + trigger = { + is_in_army = yes + } + desc = mpo_nomad_events.1000.army_camp + } + desc = mpo_nomad_events.1000.capital + } + #Triggered desc based on relation + first_valid = { + triggered_desc = { + trigger = { + scope:beheaded_warrior = { + is_close_family_of = root + } + } + desc = mpo_nomad_events.1000.family + } + triggered_desc = { + trigger = { + has_variable = beheaded_warrior_powerful_vassal + } + desc = mpo_nomad_events.1000.vassal + } + triggered_desc = { + trigger = { + has_variable = beheaded_warrior_councillor + } + desc = mpo_nomad_events.1000.councillor + } + desc = mpo_nomad_events.1000.generic_knight + } + desc = mpo_nomad_events.1000.desc + } + override_background = { + trigger = { + is_in_army = no + } + reference = courtyard + } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:beheaded_warrior = { + OR = { + is_consort_of = root + is_close_family_of = root + } + } + } + animation = grief + } + triggered_animation = { + trigger = { + scope:beheaded_warrior = { + NOR = { + is_consort_of = root + is_close_family_of = root + } + } + } + animation = sadness + } + } + right_portrait = { + character = scope:head_bearer + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + artifact = { + target = scope:head_artifact + position = lower_center_portrait + } + immediate = { + if = { + limit = { + exists = scope:beheaded_warrior.house + } + scope:beheaded_warrior = { + house = { + add_house_artifact_claim = scope:head_artifact + } + } + } + } + #Keep the head + option = { + name = mpo_nomad_events.1000.a + flavor = mpo_nomad_events.1000.a.flavor + + custom_tooltip = keep_warrior_head_tt + + stress_impact = { + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + } + } + } + #Send it to its people + option = { + trigger = { + exists = scope:beheaded_relative + } + name = mpo_nomad_events.1000.b + scope:beheaded_relative = { + #Gains the artifact + scope:head_artifact = { + set_owner = { + target = scope:beheaded_relative + history = { + location = root.capital_province + actor = root + recipient = scope:beheaded_relative + type = given + } + } + } + } + if = { + limit = { + can_add_hook = { + target = scope:beheaded_relative + type = favor_hook + } + } + add_hook = { + type = favor_hook + target = scope:beheaded_relative + } + } + + scope:beheaded_warrior = { + every_close_family_member = { + custom = custom.every_beheaded_family + limit = { + NOR = { + this = root + this = scope:beheaded_relative + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_greed = -0.5 + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + #The glory of the accolade grows + option = { + 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 + } + } + } + #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 + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + custom_tooltip = beheaded_accolade_successor_tt + trigger_event = { + id = accolade.0006 + } + destroy_artifact = scope:head_artifact + } + stress_impact = { + content = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_vengefulness = 1 + } + modifier = { + factor = 0 + has_trait = eccentric + } + } + } + #Bury this head with honors + option = { + name = mpo_nomad_events.1000.d + + if = { + limit = { + mpo_important_beheaded_warrior_trigger = yes + } + capital_county = { + add_county_modifier = { + modifier = mpo_noble_warriors_grave_modifier + years = 10 + } + } + } + else = { + capital_county = { + add_county_modifier = { + modifier = mpo_warriors_grave_modifier + years = 10 + } + } + } + add_piety = minor_piety_gain + + destroy_artifact = scope:head_artifact + stress_impact = { + eccentric = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_rationality = 0.5 + } + modifier = { + factor = 0 + has_trait = eccentric + } + } + } + after = { + remove_variable = beheaded_warrior + remove_variable = beheaded_warrior_foe + remove_variable = beheaded_warrior_councillor + remove_variable = beheaded_warrior_powerful_vassal + remove_variable = beheaded_warrior_accolade + remove_variable = beheaded_warrior_location + } +} + +#Hidden ruler's head artifact creation event +mpo_nomad_events.1010 = { + hidden = yes + immediate = { + #Create head artifact + if = { + limit = { + OR = { + has_character_flag = execution_head_illustrious_flag + has_character_flag = execution_head_famed_flag + } + } + mpo_execution_head_artifact_creation_effect = yes + } + trigger_event = mpo_nomad_events.1011 + } +} + +scripted_effect remove_execution_head_flags_effect = { + scope:executioner = { + remove_character_flag = execution_head_famed_flag + remove_character_flag = execution_head_illustrious_flag + remove_character_flag = execution_head_warscore_flag + remove_character_flag = execution_head_vassalization_flag + remove_character_flag = execution_head_prestige_flag + remove_character_flag = execution_head_obedience_flag + remove_character_flag = execution_head_hook_flag + } +} + +scripted_effect mpo_nomad_events_1011_heir_resents_effect = { + if = { + limit = { + tier_difference = { + target = scope:executioner + value <= 1 + } + tier_difference = { + target = scope:executioner + value >= -1 + } + house.house_head = { + this = scope:headless_heir + } + NOT = { + scope:executioner = { + exists = house + house = scope:headless_heir.house + } + } + scope:executioner = { + exists = house + house.house_head = { + this = scope:executioner + } + } + valid_for_feud_events_with_target_trigger = { TARGET = scope:executioner } + } + house_feud_start_effect = { + # Feuding House Head + ACTOR = scope:headless_heir + # Target House Head + TARGET = scope:executioner + # Feud Reason + REASON = head_killed + # House Member attacker if relevant + ATTACKER = scope:executioner + # House Member victim if relevant + VICTIM = scope:victim + } + } + else = { + if = { + limit = { + NOT = { + has_relation_rival = scope:executioner + } + } + set_relation_rival = { + target = scope:executioner + reason = rival_sent_predecessors_head + } + } + else = { + progress_towards_rival_effect = { + REASON = rival_sent_predecessors_head + CHARACTER = scope:executioner + OPINION = default_rival_opinion + } + } + if = { + limit = { + NAND = { + scope:headless_heir = { + has_variable = severed_head_cb_revenge + var:severed_head_cb_revenge = { + this = scope:executioner + } + } + } + } + scope:headless_heir = { + custom_tooltip = severed_head_cb_revenge_tt + set_variable = { + name = severed_head_cb_revenge + value = scope:headless_heir + } + } + } + } +} +scripted_effect mpo_nomad_events_1011_heir_cowed_effect = { + if = { + limit = { + has_character_flag = execution_head_warscore_flag + } + custom_tooltip = peace_acceptance_head_scare_tt + set_variable = { + name = peace_acceptance_head_scare + value = scope:headless_heir + years = 20 + } + } + else_if = { + limit = { + has_character_flag = execution_head_vassalization_flag + } + custom_tooltip = severed_head_vassalization_tt + set_variable = { + name = severed_head_vassalization + value = scope:headless_heir + years = 20 + } + } + else_if = { + limit = { + has_character_flag = execution_head_prestige_flag + } + #Lots of prestige for much higher tier + if = { + limit = { + tier_difference = { + target = scope:headless_heir + value <= -3 + } + } + add_prestige = monumental_prestige_gain + } + else_if = { + limit = { + tier_difference = { + target = scope:headless_heir + value <= -2 + } + } + add_prestige = massive_prestige_gain + } + #Good prestige for higher tier + else_if = { + limit = { + tier_difference = { + target = scope:headless_heir + value <= -1 + } + } + add_prestige = major_prestige_gain + } + #Some prestige + else = { + add_prestige = medium_prestige_gain + } + } + else_if = { + limit = { + has_character_flag = execution_head_obedience_flag + scope:headless_heir = { obedience_target = root } + } + scope:headless_heir = { + add_opinion = { + modifier = obedience_opinion + target = root + } + } + } + else = { + add_hook = { + type = threat_hook + target = scope:headless_heir + } + } +} + +scripted_trigger mpo_nomad_events_1011_heir_unafraid_trigger = { + scope:headless_heir.top_liege = { + current_military_strength > scope:executioner.current_military_strength + tier_difference = { + target = scope:executioner + value >= -1 + } + } + scope:headless_heir = { + NOT = { + has_dread_level_towards = { + target = scope:executioner + level >= 1 + } + } + } +} + +#You have taken the head of a ruler prisoner +mpo_nomad_events.1011 = { + type = character_event + theme = death + title = mpo_nomad_events.1011.t + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:victim = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = vengeful + has_trait = wrathful + has_trait = sadistic + has_trait = cynical + } + NOR = { + has_trait = craven + has_trait = paranoid + has_trait = forgiving + } + } + } + desc = mpo_nomad_events.1011.desc_execution_spite + } + triggered_desc = { + trigger = { + scope:victim = { + OR = { + has_trait = ambitious + has_trait = craven + has_trait = paranoid + has_trait = deceitful + has_trait = greedy + has_trait = fickle + has_trait = arbitrary + } + NOR = { + has_trait = content + has_trait = calm + has_trait = humble + has_trait = zealous + } + } + } + desc = mpo_nomad_events.1011.desc_execution_beg + } + triggered_desc = { + trigger = { + scope:victim = { + NOT = { + has_trait = cynical + } + } + } + desc = mpo_nomad_events.1011.desc_execution_pray + } + triggered_desc = { + trigger = { + OR = { + AND = { + exists = scope:court_executioner + scope:court_executioner = { + prowess < decent_skill_rating + } + } + scope:victim = { + has_trait = cynical + } + } + } + desc = mpo_nomad_events.1011.desc_bad_execution + } + } + desc = mpo_nomad_events.1011.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:headless_heir + } + desc = mpo_nomad_events.1011.desc_send_head + } + desc = mpo_nomad_events.1011.desc_cant_send + } + triggered_desc = { + trigger = { + exists = scope:head_artifact + } + desc = mpo_nomad_events.1011.desc_keep_head + } + } + override_background = { + trigger = { + NOR = { + is_in_army = yes + is_travelling = yes + } + } + reference = dungeon + } + override_background = { + trigger = { + OR = { + is_in_army = yes + is_travelling = yes + } + } + reference = army_camp + } + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:court_executioner + animation = celebrate_sword + camera = camera_event_right_forward + hide_info = yes + } + artifact = { + target = scope:head_artifact + position = lower_left_portrait + } + lower_center_portrait = scope:victim + lower_right_portrait = scope:headless_heir + immediate = { + if = { + limit = { + exists = court_position:executioner_court_position + court_position:executioner_court_position = { + is_available_allow_travelling = yes + } + } + court_position:executioner_court_position = { + save_scope_as = court_executioner + } + } + else_if = { + limit = { + any_knight = { + OR = { + is_available_allow_travelling = yes + AND = { + is_in_army = yes + root = { + is_in_army = yes + } + } + } + is_ruler = no + } + } + ordered_knight = { + order_by = prowess + limit = { + OR = { + is_available_allow_travelling = yes + AND = { + is_in_army = yes + root = { + is_in_army = yes + } + } + } + is_ruler = no + } + save_scope_as = court_executioner + } + } + else_if = { + limit = { + any_courtier = { + NOT = { + is_close_family_of = root + } + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_available_allow_travelling = yes + } + } + ordered_courtier = { + order_by = prowess + limit = { + NOT = { + is_close_family_of = root + } + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_available_allow_travelling = yes + } + save_scope_as = court_executioner + } + } + #Setting up house feud that might happen + if = { + limit = { + exists = scope:headless_heir + tier_difference = { + target = scope:executioner + value <= 1 + } + house.house_head = { + this = scope:headless_heir + } + NOT = { + scope:executioner = { + exists = house + house = scope:headless_heir.house + house.house_head = { + this = scope:executioner + } + } + } + valid_for_feud_events_with_target_trigger = { TARGET = scope:executioner } + } + scope:headless_heir = { + save_ongoing_house_relation_effect = { TARGET = scope:executioner } + } + } + } + #Keep the head + option = { + trigger = { + exists = scope:head_artifact + } + name = mpo_nomad_events.1011.a + flavor = mpo_nomad_events.1011.a.flavor + custom_tooltip = keep_warrior_head_tt + #NOTIFY HEIR THAT HEAD ARTIFACT WAS CREATED AND THEY HAVE CLAIM + if = { + limit = { + exists = scope:victim.house + exists = scope:headless_heir.house + scope:victim.house = { + this = scope:headless_heir.house + } + } + scope:headless_heir = { + house = { + add_house_artifact_claim = scope:head_artifact + } + } + } + remove_execution_head_flags_effect = yes + ai_chance = { + base = 500 + ai_value_modifier = { + ai_zeal = 0.5 + ai_honor = 0.5 + } + modifier = { + has_character_flag = execution_head_illustrious_flag + add = 500 + } + modifier = { + all_inventory_artifact_slots = full + add = -800 + } + } + } + + #Send the head - but it might cause rivalry + option = { + trigger = { + exists = scope:headless_heir + } + name = mpo_nomad_events.1011.b + flavor = mpo_nomad_events.1011.b.flavor + + add_dread = miniscule_dread_gain + #Random chance calculation used for AI (they get no event) + if = { + limit = { + scope:headless_heir = { + is_ai = yes + } + } + random_list = { + #they are cowed + 50 = { + desc = mpo_nomad_events.1011.b.success + modifier = { + is_gurkhan = yes + add = 20 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value <= -1 + } + } + add = 20 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value <= -2 + } + } + add = 20 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value <= -3 + } + } + add = 20 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value <= -1 + } + } + add = 20 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value <= -2 + } + } + add = 20 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value <= -3 + } + } + add = 20 + } + modifier = { + scope:headless_heir = { + current_military_strength < root.current_military_strength + } + add = 30 + } + modifier = { + scope:headless_heir = { + max_military_strength < root.max_military_strength + } + add = 30 + } + modifier = { + scope:headless_heir.top_liege = { + current_military_strength < root.top_liege.current_military_strength + } + add = 30 + } + modifier = { + scope:headless_heir.top_liege = { + max_military_strength < root.top_liege.max_military_strength + } + add = 30 + } + #Has unrelated wars to deal with + modifier = { + scope:headless_heir = { + any_character_war = { + NOT = { + any_war_participant = { + this = root + } + } + } + } + add = 20 + } + #Root holds family hostage + modifier = { + scope:headless_heir = { + any_close_family_member = { + is_imprisoned_by = root + } + } + add = 15 + } + modifier = { + scope:headless_heir = { + exists = player_heir + player_heir = { + is_imprisoned_by = root + } + } + add = 30 + } + modifier = { + scope:headless_heir = { + age <= 12 + } + add = 25 + } + modifier = { + scope:headless_heir = { + legitimacy_level <= 0 + } + add = 20 + } + modifier = { + has_trait = conqueror + add = 40 + } + modifier = { + has_trait = greatest_of_khans + add = 40 + } + modifier = { + scope:headless_heir = { + gold < 0 + } + add = 15 + } + modifier = { + scope:headless_heir = { + has_dread_level_towards = { + target = scope:executioner + level >= 1 + } + } + factor = 5 + } + modifier = { + scope:headless_heir = { + has_dread_level_towards = { + target = scope:executioner + level >= 2 + } + } + factor = 10 + } + modifier = { + scope:headless_heir = { + ai_vengefulness <= low_negative_ai_value + } + add = 40 + } + modifier = { + scope:headless_heir = { + ai_vengefulness <= high_negative_ai_value + } + add = 80 + } + modifier = { + scope:headless_heir = { + ai_boldness <= low_negative_ai_value + } + add = 15 + } + modifier = { + scope:headless_heir = { + ai_boldness <= high_negative_ai_value + } + add = 30 + } + modifier = { + scope:headless_heir = { + ai_honor <= low_negative_ai_value + } + add = 20 + } + modifier = { + scope:headless_heir = { + ai_honor <= high_negative_ai_value + } + add = 40 + } + modifier = { + scope:headless_heir = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + add = -20 + } + hidden_effect = { + scope:headless_heir = { + #Prestige option does nothing to this char, add malus + if = { + limit = { + scope:executioner = { has_character_flag = execution_head_prestige_flag } + } + if = { + limit = { + tier_difference = { + target = scope:executioner + value <= -2 + } + } + add_prestige = massive_prestige_loss + } + else_if = { + limit = { + tier_difference = { + target = scope:executioner + value <= -1 + } + } + add_prestige = major_prestige_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + if = { + limit = { + mpo_keep_prisoners_heads_trigger = yes + exists = scope:victim.house + } + scope:victim.house = { + every_house_member = { + custom = custom.every_house_member + limit = { + NOR = { + this = scope:headless_heir + this = scope:executioner + } + } + add_opinion = { + modifier = sullied_our_house_opinion + target = scope:headless_heir + opinion = -20 + } + } + } + } + create_character_memory = { + type = sent_predecessors_head_memory + participants = { + executioner = scope:executioner + victim = scope:victim + } + } + + add_character_flag = { + flag = head_recipient_just_takes_it + days = 30 + } + } + } + show_as_tooltip = { + mpo_nomad_events_1011_heir_cowed_effect = yes + } + } + #they swear revenge + 50 = { + desc = mpo_nomad_events.1011.b.fail + modifier = { + scope:headless_heir = { + is_gurkhan = yes + } + add = 20 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value >= 1 + } + } + add = 20 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value >= 2 + } + } + add = 20 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value >= 3 + } + } + add = 20 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value >= 1 + } + } + add = 20 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value >= 2 + } + } + add = 20 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value >= 3 + } + } + add = 20 + } + modifier = { + scope:headless_heir = { + current_military_strength > root.current_military_strength + } + add = 30 + } + modifier = { + scope:headless_heir = { + max_military_strength > root.max_military_strength + } + add = 30 + } + modifier = { + scope:headless_heir.top_liege = { + current_military_strength > root.top_liege.current_military_strength + } + add = 30 + } + modifier = { + scope:headless_heir.top_liege = { + max_military_strength > root.top_liege.max_military_strength + } + add = 30 + } + modifier = { + scope:headless_heir = { + legitimacy_level >= 4 + } + add = 20 + } + modifier = { + scope:headless_heir = { + has_trait = conqueror + } + add = 60 + } + modifier = { + scope:headless_heir = { + has_trait = greatest_of_khans + } + add = 60 + } + modifier = { + scope:headless_heir = { + ai_vengefulness >= low_positive_ai_value + } + add = 40 + } + modifier = { + scope:headless_heir = { + ai_vengefulness >= high_positive_ai_value + } + add = 80 + } + modifier = { + scope:headless_heir = { + ai_boldness >= low_positive_ai_value + } + add = 15 + } + modifier = { + scope:headless_heir = { + ai_boldness >= high_positive_ai_value + } + add = 30 + } + modifier = { + scope:headless_heir = { + ai_honor >= low_positive_ai_value + } + add = 20 + } + modifier = { + scope:headless_heir = { + ai_honor >= high_positive_ai_value + } + add = 40 + } + modifier = { + scope:headless_heir = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + add = 20 + } + show_as_tooltip = { + scope:headless_heir = { + mpo_nomad_events_1011_heir_resents_effect = yes + } + } + } + } + #Receive letter event with response + trigger_event = { + id = mpo_nomad_events.1013 + days = 3 + } + } + #Players get event and will choose for themselves + else = { + custom_description_no_bullet = { + text = headless_heir_ignores_challenge_tt + } + show_as_tooltip = { + mpo_nomad_events_1011_heir_cowed_effect = yes + } + + custom_description_no_bullet = { + text = headless_heir_rises_to_challenge_tt + } + show_as_tooltip = { + scope:headless_heir = { + mpo_nomad_events_1011_heir_resents_effect = yes + } + } + + if = { + limit = { + scope:headless_heir.top_liege = { + current_military_strength > scope:executioner.current_military_strength + tier_difference = { + target = scope:executioner + value >= -1 + } + } + } + custom_tooltip = headless_heir_high_tier_warning_tt + } + scope:headless_heir = { + trigger_event = { + id = mpo_nomad_events.1012 + days = 1 + } + } + } + + if = { + limit = { + scope:headless_heir = { + max_military_strength > root.max_military_strength + } + } + stress_impact = { + craven = major_stress_impact_gain + compassionate = medium_stress_impact_gain + content = medium_stress_impact_gain + } + } + stress_impact = { + craven = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_boldness = 1 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value >= 1 + } + } + add = -15 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value >= 2 + } + } + add = -15 + } + modifier = { + scope:headless_heir = { + tier_difference = { + target = root + value >= 3 + } + } + add = -15 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value >= 1 + } + } + add = -15 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value >= 2 + } + } + add = -15 + } + modifier = { + scope:headless_heir.top_liege = { + tier_difference = { + target = root.top_liege + value >= 3 + } + } + add = -15 + } + modifier = { + scope:headless_heir = { + current_military_strength > root.current_military_strength + } + add = -25 + } + modifier = { + scope:headless_heir = { + max_military_strength > root.max_military_strength + } + add = -25 + } + modifier = { + scope:headless_heir.top_liege = { + current_military_strength > root.top_liege.current_military_strength + } + add = -25 + } + modifier = { + scope:headless_heir.top_liege = { + max_military_strength > root.top_liege.max_military_strength + } + add = -25 + } + modifier = { + scope:headless_heir = { + legitimacy_level >= 4 + } + add = -15 + } + modifier = { + scope:headless_heir = { + has_trait = conqueror + } + add = -50 + } + modifier = { + scope:headless_heir = { + has_trait = greatest_of_khans + } + add = -50 + } + modifier = { + scope:headless_heir = { + ai_vengefulness >= low_positive_ai_value + } + add = -30 + } + modifier = { + scope:headless_heir = { + ai_vengefulness >= high_positive_ai_value + } + add = -60 + } + modifier = { + scope:headless_heir = { + ai_boldness >= low_positive_ai_value + } + add = -15 + } + modifier = { + scope:headless_heir = { + ai_boldness >= high_positive_ai_value + } + add = -30 + } + modifier = { + scope:headless_heir = { + ai_honor >= low_positive_ai_value + } + add = -20 + } + modifier = { + scope:headless_heir = { + ai_honor >= high_positive_ai_value + } + add = -40 + } + modifier = { + scope:headless_heir = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + } + add = -20 + } + modifier = { + scope:headless_heir = { + has_dread_level_towards = { + target = scope:executioner + level >= 1 + } + } + add = 200 + } + modifier = { + scope:headless_heir = { + has_dread_level_towards = { + target = scope:executioner + level >= 2 + } + } + add = 400 + } + modifier = { + OR = { + has_trait = compassionate + has_trait = content + } + add = -50 + } + modifier = { + OR = { + has_trait = craven + has_trait = compassionate + has_trait = content + } + scope:headless_heir = { + max_military_strength > root.max_military_strength + } + factor = 0 + } + } + } + #Don't want to send or keep head + option = { + name = mpo_nomad_events.1011.c + + remove_execution_head_flags_effect = yes + ai_chance = { + base = 100 + } + } + after = { + # Clear up flags + scope:headless_heir = { + if = { + limit = { + has_character_flag = house_feud_too_young_heir + } + remove_character_flag = house_feud_too_young_heir + } + } + } +} + +#You receive the severed head of your executed predecessor (mirror event) +mpo_nomad_events.1012 = { + type = character_event + theme = death + title = mpo_nomad_events.1012.t + desc = mpo_nomad_events.1012.desc + override_background = { + trigger = { + NOR = { + is_in_army = yes + is_travelling = yes + } + } + reference = throne_room + } + override_background = { + trigger = { + OR = { + is_in_army = yes + is_travelling = yes + } + } + reference = bp1_bonfire + } + left_portrait = { + character = root + animation = wailing + camera = camera_event_left_away_3_4 + } + lower_right_portrait = scope:executioner + lower_left_portrait = scope:victim + + immediate = { + create_character_memory = { + type = sent_predecessors_head_memory + participants = { + executioner = scope:executioner + victim = scope:victim + } + } + } + + #My predecessor was a great man: the most important thing is his head being honored + option = { + trigger = { + OR = { + has_trait = lifestyle_mystic + has_trait = theologian + has_trait = zealous + AND = { + has_trait = pilgrim + has_trait_xp = { + trait = pilgrim + value >= 50 + } + } + has_trait = devoted + } + OR = { + faith.religion = faith:tengri_pagan.religion + has_trait = nomadic_philosophy + government_has_flag = government_is_nomadic + } + } + name = mpo_nomad_events.1012.a + flavor = mpo_nomad_events.1012.a_flavor + show_as_tooltip = { + scope:executioner = { + mpo_nomad_events_1011_heir_cowed_effect = yes + } + } + if = { + limit = { + scope:victim = { + highest_held_title_tier >= tier_kingdom + } + } + add_piety = major_piety_gain + } + else_if = { + limit = { + scope:victim = { + highest_held_title_tier >= tier_duchy + } + } + add_piety = medium_piety_gain + } + else = { + add_piety = minor_piety_gain + } + #Prestige option does nothing to this char, add malus + if = { + limit = { + scope:executioner = { has_character_flag = execution_head_prestige_flag } + } + if = { + limit = { + tier_difference = { + target = scope:executioner + value <= -2 + } + } + add_prestige = major_prestige_loss + } + else_if = { + limit = { + tier_difference = { + target = scope:executioner + value <= -1 + } + } + add_prestige = medium_prestige_loss + } + else = { + add_prestige = minor_prestige_loss + } + } + + add_character_flag = { + flag = head_recipient_just_takes_it + days = 30 + } + if = { + limit = { + mpo_nomad_events_1011_heir_unafraid_trigger = yes + } + stress_impact = { + base = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + calm = miniscule_stress_impact_loss + vengeful = major_stress_impact_gain + wrathful = major_stress_impact_gain + just = major_stress_impact_gain + stubborn = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + brave = major_stress_impact_gain + } + } + else = { + stress_impact = { + base = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + calm = miniscule_stress_impact_loss + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + just = minor_stress_impact_gain + stubborn = miniscule_stress_impact_gain + sadistic = miniscule_stress_impact_gain + brave = minor_stress_impact_gain + } + } + } + #VENDETTA! VENDETTA! + option = { + name = mpo_nomad_events.1012.b + flavor = mpo_nomad_events.1012.b_flavor + show_as_tooltip = { + mpo_nomad_events_1011_heir_resents_effect = yes + } + if = { + limit = { + mpo_nomad_events_1011_heir_unafraid_trigger = yes + } + stress_impact = { + craven = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + compassionate = miniscule_stress_impact_gain + humble = miniscule_stress_impact_gain + content = miniscule_stress_impact_gain + } + } + else = { + stress_impact = { + craven = major_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + } + } + } + #Yeah uh... this is gross and humiliating + option = { + name = mpo_nomad_events.1012.c + show_as_tooltip = { + scope:executioner = { + mpo_nomad_events_1011_heir_cowed_effect = yes + } + } + #Prestige option does nothing to this char, add malus + if = { + limit = { + scope:executioner = { has_character_flag = execution_head_prestige_flag } + } + if = { + limit = { + tier_difference = { + target = scope:executioner + value <= -2 + } + } + add_prestige = massive_prestige_loss + } + else_if = { + limit = { + tier_difference = { + target = scope:executioner + value <= -1 + } + } + add_prestige = major_prestige_loss + } + else = { + add_prestige = medium_prestige_loss + } + } + if = { + limit = { + mpo_keep_prisoners_heads_trigger = yes + exists = scope:victim.house + } + scope:victim.house = { + every_house_member = { + custom = custom.every_house_member + limit = { + NOR = { + this = scope:headless_heir + this = scope:executioner + } + } + add_opinion = { + modifier = sullied_our_house_opinion + target = scope:headless_heir + opinion = -20 + } + } + } + } + + add_character_flag = { + flag = head_recipient_just_takes_it + days = 30 + } + if = { + limit = { + mpo_nomad_events_1011_heir_unafraid_trigger = yes + } + stress_impact = { + vengeful = major_stress_impact_gain + wrathful = major_stress_impact_gain + just = major_stress_impact_gain + stubborn = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + brave = major_stress_impact_gain + } + } + else = { + stress_impact = { + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + just = minor_stress_impact_gain + stubborn = miniscule_stress_impact_gain + sadistic = miniscule_stress_impact_gain + brave = minor_stress_impact_gain + } + } + } + after = { + scope:executioner = { + trigger_event = mpo_nomad_events.1013 + } + } +} + +mpo_nomad_events.1013 = { + type = letter_event + opening = { + desc = mpo_nomad_events.1013 + } + desc = { + first_valid = { + #Non-nomad desc + triggered_desc = { + trigger = { + scope:headless_heir = { + has_character_flag = head_recipient_just_takes_it + mpo_keep_prisoners_heads_trigger = no + } + } + desc = mpo_nomad_events.1013.desc_takes_it_sedentary + } + triggered_desc = { + trigger = { + scope:headless_heir = { + has_character_flag = head_recipient_just_takes_it + } + } + desc = mpo_nomad_events.1013.desc_takes_it + } + desc = mpo_nomad_events.1013.desc_angeee + } + } + sender = scope:headless_heir + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_alive = yes + is_ruler = yes + NOT = { + is_imprisoned_by = scope:headless_heir + } + scope:headless_heir = { + is_alive = yes + is_ruler = yes + NOT = { + is_imprisoned_by = root + } + } + } + on_trigger_fail = { + if = { + limit = { + scope:headless_heir = { + has_character_flag = head_recipient_just_takes_it + } + } + scope:headless_heir = { + remove_character_flag = head_recipient_just_takes_it + } + } + scope:executioner = { + remove_execution_head_flags_effect = yes + } + } + immediate = { + #Apply effect of whatever they chose + if = { + limit = { + scope:headless_heir = { + has_character_flag = head_recipient_just_takes_it + } + } + mpo_nomad_events_1011_heir_cowed_effect = yes + } + else = { + scope:headless_heir = { + mpo_nomad_events_1011_heir_resents_effect = yes + } + } + } + + option = { + name = { + trigger = { + scope:headless_heir = { + has_character_flag = head_recipient_just_takes_it + } + } + text = mpo_nomad_events.1013.a.cowed + } + name = { + trigger = { + scope:headless_heir = { + NOT = { has_character_flag = head_recipient_just_takes_it } + } + } + text = mpo_nomad_events.1013.a.revenge + } + } + after = { + if = { + limit = { + scope:headless_heir = { + has_character_flag = head_recipient_just_takes_it + } + } + scope:headless_heir = { + remove_character_flag = head_recipient_just_takes_it + } + } + scope:executioner = { + remove_execution_head_flags_effect = yes + } + } +} + +scripted_trigger mpo_nomad_events_1011_rowdy_boy_trigger = { + is_adult = yes + is_courtier_of = root + is_imprisoned = no + is_healthy = yes + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + OR = { + AND = { + ai_boldness > 0 + ai_energy > 0 + } + AND = { + opinion = { + target = root + value <= -30 + } + ai_boldness >= medium_negative_ai_value + ai_energy >= medium_negative_ai_value + } + } + NOR = { + has_trait = loyal + is_primary_heir_of = root + is_player_heir_of = root + is_obedient_to = root + has_dread_level_towards = { + target = root + level >= 2 + } + } + trigger_if = { + limit = { + has_variable = mpo_nomad_events_1020_liege + } + var:mpo_nomad_events_1020_liege = { + NOT = { + this = root + } + } + } +} + +scripted_trigger mpo_nomad_events_1011_rowdiest_trigger = { + OR = { + AND = { + ai_boldness > medium_positive_ai_value + ai_energy > medium_positive_ai_value + } + opinion = { + target = root + value < -60 + } + } + NOT = { + has_dread_level_towards = { + target = root + level >= 1 + } + } + mpo_nomad_events_1011_rowdy_boy_trigger = yes +} + +scripted_trigger mpo_nomad_events_1011_defecting_courtier_trigger = { + save_temporary_scope_as = potential_defector + is_adult = yes + is_courtier_of = root + is_acclaimed = no + is_imprisoned = no + ai_boldness > medium_negative_ai_value + ai_energy > medium_negative_ai_value + NOR = { + is_in_list = defectors + this = scope:rowdy_boy + is_councillor_of = root + is_consort_of = root + has_trait = loyal + is_primary_heir_of = root + is_player_heir_of = root + any_spouse = { + OR = { + is_councillor_of = root + AND = { + is_courtier_of = root + has_any_court_position = yes + } + is_primary_heir_of = root + is_player_heir_of = root + is_acclaimed = yes + } + } + has_any_court_position = yes + } + opinion = { + target = root + value <= 60 + } + opinion = { + target = scope:rowdy_boy + value >= -40 + } +} + +#Your adult family members want to break off and lead their own band +mpo_nomad_events.1020 = { + type = character_event + theme = nomads + title = mpo_nomad_events.1020.t + desc = mpo_nomad_events.1020.desc + override_background = { + reference = relaxing_room + } + left_portrait = { + character = root + animation = hunting_knife_start + } + right_portrait = { + character = scope:rowdy_boy + animation = war_attacker + camera = camera_event_very_right + } + + cooldown = { + years = 5 + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + OR = { + has_realm_law = nomadic_authority_1 + has_realm_law = nomadic_authority_2 + has_realm_law = nomadic_authority_3 + } + is_at_war = no + has_raised_armies = no + highest_held_title_tier >= tier_county + is_available = yes + is_healthy = yes + OR = { + any_child = { + mpo_nomad_events_1011_rowdy_boy_trigger = yes + } + any_sibling = { + mpo_nomad_events_1011_rowdy_boy_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + has_realm_law = nomadic_authority_1 + } + modifier = { + add = 2 + has_realm_law = nomadic_authority_2 + } + modifier = { + add = 2 + domicile ?= { + herd >= max_herd + } + } + + #weight up if family member very much wants to leave + modifier = { + add = 3 + OR = { + any_child = { + mpo_nomad_events_1011_rowdiest_trigger = yes + } + any_sibling = { + mpo_nomad_events_1011_rowdiest_trigger = yes + } + } + } + modifier = { + add = 1 + legitimacy_level < 1 + } + modifier = { + add = -1 + legitimacy_level >= 5 + } + #Weight up/down culturally + modifier = { + add = 1 + culture = { + has_cultural_pillar = ethos_bellicose + } + } + modifier = { + add = -1 + culture = { + has_cultural_pillar = ethos_communal + } + } + #Very likely to happen after a succession leaves someone landless + modifier = { + add = 2 + primary_title = { + title_held_years < 5 + } + } + modifier = { + add = 1 + has_variable = recently_lost_wars + } + min = 1 + } + + immediate = { + random_sibling = { + limit = { + mpo_nomad_events_1011_rowdiest_trigger = yes + } + save_scope_as = rowdy_boy + } + if = { + limit = { + NOT = { + exists = scope:rowdy_boy + } + } + random_child = { + limit = { + mpo_nomad_events_1011_rowdiest_trigger = yes + } + save_scope_as = rowdy_boy + } + } + if = { + limit = { + NOT = { + exists = scope:rowdy_boy + } + } + random_sibling = { + limit = { + mpo_nomad_events_1011_rowdy_boy_trigger = yes + } + save_scope_as = rowdy_boy + } + } + if = { + limit = { + NOT = { + exists = scope:rowdy_boy + } + } + random_child = { + limit = { + mpo_nomad_events_1011_rowdy_boy_trigger = yes + } + save_scope_as = rowdy_boy + } + } + #Make list of defectors + scope:rowdy_boy = { + every_consort = { + limit = { + is_ruler = no + } + add_to_list = defectors + } + every_child = { + limit = { + is_ruler = no + } + add_to_list = defectors + } + } + random_courtier = { + limit = { + mpo_nomad_events_1011_defecting_courtier_trigger = yes + } + add_to_list = defectors + } + random_courtier = { + limit = { + mpo_nomad_events_1011_defecting_courtier_trigger = yes + } + add_to_list = defectors + } + random_courtier = { + limit = { + mpo_nomad_events_1011_defecting_courtier_trigger = yes + } + add_to_list = defectors + } + #Add all the kids and spouses of defectors + every_in_list = { + list = defectors + every_child = { + limit = { + save_temporary_scope_as = potential_defector + is_courtier_of = root + is_acclaimed = no + is_imprisoned = no + NOR = { + this = scope:rowdy_boy + is_councillor_of = root + is_consort_of = root + is_primary_heir_of = root + is_player_heir_of = root + any_spouse ?= { + save_temporary_scope_as = potential_defector_spouse + is_councillor_of = root + } + any_spouse ?= { + OR = { + is_primary_heir_of = root + is_player_heir_of = root + } + } + any_spouse ?= { + is_acclaimed = yes + } + root = { + any_court_position_holder = { + this = scope:potential_defector + } + } + root = { + any_court_position_holder = { + this ?= scope:potential_defector_spouse + } + } + } + } + add_to_list = defectors + every_spouse = { + limit = { + save_temporary_scope_as = potential_defector + is_courtier_of = root + is_acclaimed = no + is_imprisoned = no + NOR = { + this = scope:rowdy_boy + is_councillor_of = root + is_consort_of = root + is_primary_heir_of = root + is_player_heir_of = root + root = { + any_court_position_holder = { + this = scope:potential_defector + } + } + } + } + add_to_list = defectors + } + every_child = { + limit = { + save_temporary_scope_as = potential_defector + is_courtier_of = root + is_acclaimed = no + is_imprisoned = no + NOR = { + this = scope:rowdy_boy + is_councillor_of = root + is_consort_of = root + is_primary_heir_of = root + is_player_heir_of = root + root = { + any_court_position_holder = { + this = scope:potential_defector + } + } + } + } + add_to_list = defectors + } + } + every_spouse = { + limit = { + NOR = { + this = scope:rowdy_boy + this = root + } + } + add_to_list = defectors + } + } + #Save title if possible + if = { + limit = { + any_held_title = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = root.primary_title + duchy = { + this = root.capital_county.duchy + } + } + } + } + random_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = root.primary_title + duchy = { + this = root.capital_county.duchy + } + } + } + save_scope_as = rowdy_title + } + } + else_if = { + limit = { + any_held_title = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = root.primary_title + } + } + } + random_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + NOR = { + this = root.capital_county + this = root.primary_title + } + } + save_scope_as = rowdy_title + } + } + save_scope_as = root_scope + scope:rowdy_boy = { + set_variable = { + name = mpo_nomad_events_1020_liege + value = root + years = 25 + } + } + } + + #Great Khan/Conqueror better forbidding option + option = { + name = mpo_nomad_events.1020.a + trigger = { + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_realm_law = nomadic_authority_5 + } + } + add_legitimacy = minor_legitimacy_gain + scope:rowdy_boy = { + add_opinion = { + modifier = humiliated_opinion + target = root + opinion = -30 + } + } + stress_impact = { + generous = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 400 + ai_value_modifier = { + ai_compassion = -1 + ai_greed = 1 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value >= 80 + } + add = -50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < 0 + } + add = -25 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -50 + } + add = 50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -75 + } + add = 100 + } + modifier = { + OR = { + has_trait = compassionate + has_trait = humble + } + add = -100 + } + modifier = { + has_trait = generous + factor = 0 + } + } + } + + #Kill him + option = { + name = mpo_nomad_events.1020.b + trigger = { + is_adult = yes + is_incapable = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + scope:rowdy_boy = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + OR = { + AND = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value > 0 + } + } + has_trait = berserker + has_trait = gallant + has_trait = lifestyle_blademaster + has_trait = shieldmaiden + has_trait = brave + has_trait = wrathful + has_trait = callous + has_trait = sadistic + has_trait = vengeful + has_trait = arrogant + has_trait = arbitrary + has_trait = paranoid + has_trait = fickle + has_trait = stubborn + has_trait = just + has_trait = ambitious + } + } + add_internal_flag = dangerous + custom_tooltip = mpo_nomad_events.1020_duel_tt + add_character_flag = { + flag = duelling_defecting_family_flag + months = 6 + } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:rowdy_boy + FATALITY = always + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = mpo_nomad_events.1021 + INVALIDATION_EVENT = perk_interaction.0102 + } + if = { + limit = { + has_relation_blood_brother = scope:rowdy_boy + } + add_stress = major_stress_impact_gain + remove_relation_blood_brother = scope:rowdy_boy + } + if = { + limit = { + has_relation_friend = scope:rowdy_boy + } + add_stress = medium_stress_impact_gain + remove_relation_friend = scope:rowdy_boy + } + if = { + limit = { + has_relation_best_friend = scope:rowdy_boy + } + add_stress = major_stress_impact_gain + remove_relation_best_friend = scope:rowdy_boy + } + if = { + limit = { + has_relation_soulmate = scope:rowdy_boy + } + add_stress = major_stress_impact_gain + remove_relation_soulmate = scope:rowdy_boy + } + house = { + every_house_member = { + limit = { + NOT = { + this = root + } + } + custom = custom.every_house_member + add_opinion = { + target = root + modifier = attacked_family_opinion + opinion = -25 + } + } + } + + stress_impact = { + forgiving = major_stress_impact_gain + generous = major_stress_impact_gain + craven = major_stress_impact_gain + compassionate = major_stress_impact_gain + trusting = medium_stress_impact_gain + humble = minor_stress_impact_gain + loyal = medium_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value >= 80 + } + add = -50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < 0 + } + add = -25 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -50 + } + add = 50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -75 + } + add = 100 + } + modifier = { + prowess > scope:rowdy_boy.prowess + add = 25 + } + modifier = { + prowess >= high_skill_rating + scope:rowdy_boy.prowess <= average_skill_rating + add = 50 + } + modifier = { + prowess >= very_high_skill_rating + scope:rowdy_boy.prowess <= average_skill_rating + add = 50 + } + modifier = { + prowess >= decent_skill_rating + scope:rowdy_boy.prowess <= low_skill_rating + add = 50 + } + modifier = { + prowess >= extremely_high_skill_rating + scope:rowdy_boy.prowess <= high_skill_rating + add = 50 + } + modifier = { + prowess < scope:rowdy_boy.prowess + add = -25 + } + modifier = { + scope:rowdy_boy.prowess >= high_skill_rating + prowess <= average_skill_rating + add = -50 + } + modifier = { + scope:rowdy_boy.prowess >= very_high_skill_rating + prowess <= average_skill_rating + add = -50 + } + modifier = { + scope:rowdy_boy.prowess >= decent_skill_rating + prowess <= low_skill_rating + add = -50 + } + modifier = { + scope:rowdy_boy.prowess >= extremely_high_skill_rating + prowess <= high_skill_rating + add = -50 + } + modifier = { + has_trait = humble + add = -100 + } + modifier = { + trait_is_criminal_in_faith_trigger = { FAITH = root.faith 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 } + } + add = 50 + } + modifier = { + OR = { + has_trait = generous + has_trait = forgiving + has_trait = compassionate + has_trait = trusting + has_trait = loyal + has_trait = craven + } + factor = 0 + } + } + } + + #Make them a landed vassal + option = { + name = mpo_nomad_events.1020.c + flavor = mpo_nomad_events.1020.c.flavor + trigger = { + exists = scope:rowdy_title + highest_held_title_tier > tier_county + } + add_internal_flag = special + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + if = { + limit = { + domain_size >= 6 + } + add_legitimacy = miniscule_legitimacy_gain + } + else_if = { + limit = { + domain_size >= 4 + } + add_legitimacy = minor_legitimacy_gain + } + else_if = { + limit = { + domain_size >= 3 + } + add_legitimacy = medium_legitimacy_gain + } + else = { + add_legitimacy = major_legitimacy_gain + } + + scope:rowdy_title = { + change_title_holder = { + holder = scope:rowdy_boy + change = scope:change + } + } + scope:rowdy_boy = { + add_opinion = { + target = root + modifier = received_title_county + opinion = 40 + } + progress_towards_friend_effect = { + REASON = friend_granted_title + CHARACTER = root + OPINION = 0 + } + add_opinion = { + modifier = obedience_opinion + target = root + } + } + resolve_title_and_vassal_change = scope:change + + if = { + limit = { + highest_held_title_tier <= tier_duchy + } + pay_herd = { + target = scope:rowdy_boy + value = domicile.twenty_percent_current_herd_value + } + } + else_if = { + limit = { + highest_held_title_tier <= tier_kingdom + } + pay_herd = { + target = scope:rowdy_boy + value = domicile.fifteen_percent_current_herd_value + } + } + else = { + pay_herd = { + target = scope:rowdy_boy + value = domicile.ten_percent_current_herd_value + } + } + + stress_impact = { + greedy = major_stress_impact_gain + ambitious = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_vengefulness = -0.5 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value >= 50 + } + add = 25 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value >= 80 + } + add = 50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < 0 + } + add = 25 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -50 + } + add = -50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -75 + } + add = -100 + } + modifier = { + domain_limit_available <= 0 + add = 100 + } + modifier = { + domain_limit_available >= 2 + add = -50 + } + modifier = { + domain_size >= 6 + add = 100 + } + modifier = { + domain_size <= 3 + add = -100 + } + modifier = { + OR = { + has_trait = paranoid + has_trait = ambitious + has_trait = vengeful + } + add = -100 + } + modifier = { + OR = { + has_trait = greedy + gold < medium_gold_value + domain_size <= 2 + } + factor = 0 + } + } + } + + #Let them go + option = { + name = mpo_nomad_events.1020.d + flavor = mpo_nomad_events.1020.d.flavor + if = { + limit = { + any_maa_regiment = { + maa_size >= 12 + } + } + scope:rowdy_boy = { + add_prestige = massive_prestige_gain + } + dynasty = { + add_dynasty_prestige = massive_dynasty_prestige_gain + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size >= 8 + } + } + scope:rowdy_boy = { + add_prestige = major_prestige_gain + } + dynasty = { + add_dynasty_prestige = major_dynasty_prestige_gain + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size >= 4 + } + } + scope:rowdy_boy = { + add_prestige = medium_prestige_gain + } + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + } + else = { + scope:rowdy_boy = { + add_prestige = minor_prestige_gain + } + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + } + + remove_courtier_or_guest = scope:rowdy_boy + scope:rowdy_boy = { + save_scope_as = holder + create_nomad_title = { + name = nomad_title_name + holder = scope:rowdy_boy + government = nomad_government + save_scope_as = new_nomad_title + } + change_government = nomad_government + + progress_towards_friend_effect = { + REASON = friend_granted_following + CHARACTER = root + OPINION = 0 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 60 + } + if = { + limit = { + any_in_list = { + list = defectors + is_courtier_of = root + } + } + hidden_effect = { + every_in_list = { + list = defectors + limit = { + is_courtier_of = root + } + scope:rowdy_boy = { + add_courtier = prev + } + set_variable = { + name = nomad_defector_var + value = root + years = 5 + } + } + } + if = { + limit = { + any_in_list = { + list = defectors + OR = { + is_child_of = scope:rowdy_boy + is_spouse_of = scope:rowdy_boy + } + is_courtier_of = scope:rowdy_boy + } + } + custom_tooltip = nomad_defector_family_tt + } + if = { + limit = { + any_in_list = { + list = defectors + NOR = { + is_child_of = scope:rowdy_boy + is_spouse_of = scope:rowdy_boy + } + is_courtier_of = root + } + } + custom_tooltip = nomad_defector_gain_all_courtiers_tt + } + } + create_character_memory = { + type = defected_from_kin_memory + participants = { + kin = root + } + } + } + if = { + limit = { + highest_held_title_tier <= tier_duchy + } + pay_herd = { + target = scope:rowdy_boy + value = domicile.twenty_percent_current_herd_value + } + } + else_if = { + limit = { + highest_held_title_tier <= tier_kingdom + } + pay_herd = { + target = scope:rowdy_boy + value = domicile.fifteen_percent_current_herd_value + } + } + else = { + pay_herd = { + target = scope:rowdy_boy + value = domicile.ten_percent_current_herd_value + } + } + if = { + limit = { + any_maa_regiment = { + maa_size > 12 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 12 + } + change_maa_regiment_size = { + size = -6 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 6 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 10 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 10 + } + change_maa_regiment_size = { + size = -5 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 5 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 8 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 8 + } + change_maa_regiment_size = { + size = -4 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 4 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 6 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 6 + } + change_maa_regiment_size = { + size = -3 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 3 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 4 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 4 + } + change_maa_regiment_size = { + size = -2 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 2 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 2 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 2 + } + change_maa_regiment_size = { + size = -1 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 1 + } + } + } + } + stress_impact = { + greedy = major_stress_impact_gain + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_greed = -1 + ai_vengefulness = -0.5 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value >= 50 + } + add = 25 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value >= 80 + } + add = 50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < 0 + } + add = 25 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -50 + } + add = -50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -75 + } + add = -100 + } + modifier = { + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = ambitious + gold <= major_gold_value + } + factor = 0 + } + } + } + + #Try to convince them to stay + option = { + name = mpo_nomad_events.1020.e + trigger = { + NOR = { + has_trait = conqueror + has_trait = greatest_of_khans + has_realm_law = nomadic_authority_5 + has_realm_law = nomadic_authority_4 + } + } + duel = { + skills = { diplomacy intrigue } + target = scope:rowdy_boy + #You talk him down + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + legitimacy_level >= 5 + add = 10 + } + modifier = { + legitimacy_level >= 4 + add = 10 + } + modifier = { + scope:rowdy_boy = { + opinion = { + target = root + value >= 75 + } + } + add = 25 + } + desc = mpo_nomad_events.1020.e.success + send_interface_toast = { + title = mpo_nomad_events.1020.e.success + left_icon = scope:rowdy_boy + + if = { + limit = { + has_lifestyle = diplomacy_lifestyle + } + add_diplomacy_lifestyle_xp = major_lifestyle_xp + } + else_if = { + limit = { + has_lifestyle = intrigue_lifestyle + } + add_intrigue_lifestyle_xp = major_lifestyle_xp + } + else = { + add_legitimacy = minor_legitimacy_gain + scope:rowdy_boy = { + add_opinion = { + target = root + modifier = pacified_opinion + opinion = 30 + } + } + } + scope:rowdy_boy = { + add_opinion = { + modifier = obedience_opinion + target = root + } + } + } + } + #He and his supporters sneak off + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + scope:rowdy_boy = { + mpo_nomad_events_1011_rowdiest_trigger = yes + } + add = 50 + } + modifier = { + legitimacy_level < 1 + add = 10 + } + modifier = { + legitimacy_level <= 1 + add = 10 + } + modifier = { + legitimacy_level <= 2 + add = 10 + } + modifier = { + scope:rowdy_boy = { + opinion = { + target = root + value <= -25 + } + } + add = 25 + } + desc = mpo_nomad_events.1020.e.failure + send_interface_toast = { + title = mpo_nomad_events.1020.e.failure + left_icon = scope:rowdy_boy + + scope:rowdy_boy = { + save_scope_as = holder + create_nomad_title = { + name = nomad_title_name + holder = scope:rowdy_boy + government = nomad_government + save_scope_as = new_nomad_title + } + change_government = nomad_government + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -30 + } + set_variable = { + name = nomad_defector_var + value = root + years = 5 + } + if = { + limit = { + any_in_list = { + list = defectors + is_courtier_of = root + } + } + hidden_effect = { + every_in_list = { + list = defectors + limit = { + is_courtier_of = root + } + scope:rowdy_boy = { + add_courtier = prev + } + set_variable = { + name = nomad_defector_var + value = root + years = 5 + } + } + } + if = { + limit = { + any_in_list = { + list = defectors + OR = { + is_child_of = scope:rowdy_boy + is_spouse_of = scope:rowdy_boy + } + is_courtier_of = scope:rowdy_boy + } + } + custom_tooltip = nomad_defector_family_tt + } + if = { + limit = { + any_in_list = { + list = defectors + NOR = { + is_child_of = scope:rowdy_boy + is_spouse_of = scope:rowdy_boy + } + is_courtier_of = root + } + } + custom_tooltip = nomad_defector_gain_all_courtiers_tt + } + } + custom_tooltip = nomad_defector_family_wont_come_back_tt + create_character_memory = { + type = defected_from_kin_memory + participants = { + kin = root + } + } + + } + if = { + limit = { + highest_held_title_tier <= tier_duchy + } + pay_herd = { + target = scope:rowdy_boy + value = domicile.ten_percent_current_herd_value + } + } + else = { + pay_herd = { + target = scope:rowdy_boy + value = domicile.five_percent_current_herd_value + } + } + if = { + limit = { + any_maa_regiment = { + maa_size > 15 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 15 + } + change_maa_regiment_size = { + size = -6 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 6 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 12 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 12 + } + change_maa_regiment_size = { + size = -5 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 5 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 10 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 10 + } + change_maa_regiment_size = { + size = -4 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 4 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 8 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 8 + } + change_maa_regiment_size = { + size = -3 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 3 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 6 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 6 + } + change_maa_regiment_size = { + size = -2 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 2 + } + } + } + } + else_if = { + limit = { + any_maa_regiment = { + maa_size > 4 + } + } + ordered_maa_regiment = { + order_by = maa_size + limit = { + maa_size > 4 + } + change_maa_regiment_size = { + size = -1 + reinforce = yes + } + scope:rowdy_boy = { + create_maa_regiment = { + type_of = prev + size = 1 + } + } + } + } + } + } + } + stress_impact = { + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 0 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + AND = { + diplomacy > scope:rowdy_boy.diplomacy + intrigue > scope:rowdy_boy.intrigue + } + add = 25 + } + modifier = { + OR = { + AND = { + diplomacy >= high_skill_rating + intrigue >= high_skill_rating + } + diplomacy > extremely_high_skill_rating + intrigue > extremely_high_skill_rating + } + add = 25 + } + modifier = { + scope:rowdy_boy = { + OR = { + AND = { + diplomacy < average_skill_rating + intrigue < average_skill_rating + } + diplomacy <= low_skill_rating + intrigue <= low_skill_rating + } + } + add = 25 + } + modifier = { + AND = { + diplomacy < scope:rowdy_boy.diplomacy + intrigue < scope:rowdy_boy.intrigue + } + add = -25 + } + modifier = { + scope:rowdy_boy = { + OR = { + AND = { + diplomacy >= high_skill_rating + intrigue >= high_skill_rating + } + diplomacy > extremely_high_skill_rating + intrigue > extremely_high_skill_rating + } + } + add = -25 + } + modifier = { + OR = { + AND = { + diplomacy < average_skill_rating + intrigue < average_skill_rating + } + diplomacy <= low_skill_rating + intrigue <= low_skill_rating + } + add = -25 + } + modifier = { + diplomacy < high_skill_rating + intrigue < high_skill_rating + scope:rowdy_boy = { + diplomacy >= low_skill_rating + intrigue >= low_skill_rating + } + add = -25 + } + modifier = { + scope:rowdy_boy = { + mpo_nomad_events_1011_rowdiest_trigger = yes + } + add = -50 + } + modifier = { + legitimacy_level < 1 + add = -10 + } + modifier = { + legitimacy_level <= 1 + add = -10 + } + modifier = { + legitimacy_level <= 2 + add = -10 + } + modifier = { + scope:rowdy_boy = { + opinion = { + target = root + value <= -25 + } + } + add = -25 + } + modifier = { + legitimacy_level >= 5 + add = 10 + } + modifier = { + legitimacy_level >= 4 + add = 10 + } + modifier = { + scope:rowdy_boy = { + opinion = { + target = root + value >= 75 + } + } + add = 25 + } + } + } + #Send them alone into exile + option = { + name = mpo_nomad_events.1020.f + flavor = mpo_nomad_events.1020.f.flavor + + add_dread = minor_dread_gain + create_character_memory = { + type = exiled_kin_memory + participants = { + exile = scope:rowdy_boy + } + } + scope:rowdy_boy = { + progress_towards_rival_effect = { + REASON = rival_banished_kin + CHARACTER = root + OPINION = 0 + } + add_opinion = { + modifier = banished_me + target = root + opinion = -40 + } + set_variable = { + name = nomad_defector_var + value = root + years = 5 + } + create_character_memory = { + type = exiled_by_kin_memory + participants = { + banisher = root + } + } + } + remove_courtier_or_guest = scope:rowdy_boy + hidden_effect = { + every_in_list = { + list = defectors + limit = { + OR = { + is_child_of = scope:rowdy_boy + is_spouse_of = scope:rowdy_boy + } + } + if = { + limit = { + OR = { + is_courtier_of = root + is_pool_guest_of = root + } + } + root = { + remove_courtier_or_guest = prev + } + } + set_variable = { + name = nomad_defector_var + value = root + years = 5 + } + } + } + if = { + limit = { + any_in_list = { + list = defectors + OR = { + is_child_of = scope:rowdy_boy + is_spouse_of = scope:rowdy_boy + } + } + } + custom_tooltip = nomad_defector_family_tt + custom_tooltip = nomad_defector_family_wont_come_back_tt + } + else = { + custom_tooltip = nomad_defector_wont_come_back_tt + } + #Move exiles from root's capital + hidden_effect = { + if = { + limit = { + any_neighboring_and_across_water_top_liege_realm_owner = { + exists = capital_province + } + } + random_neighboring_and_across_water_top_liege_realm_owner = { + limit = { + exists = capital_province + } + capital_province = { + save_scope_as = exile_destination + } + } + scope:rowdy_boy = { + move_to_pool_at = scope:exile_destination + } + every_in_list = { + list = defectors + limit = { + OR = { + is_child_of = scope:rowdy_boy + is_spouse_of = scope:rowdy_boy + } + } + move_to_pool_at = scope:exile_destination + } + } + scope:rowdy_boy = { + if = { + limit = { + can_start_scheme = { + type = murder + target_character = root + } + } + random_list = { + 1 = { + } + 2 = { + modifier = { + has_relation_rival = root + factor = 5 + } + start_scheme = { + type = murder + target_character = root + } + } + } + } + } + } + stress_impact = { + forgiving = major_stress_impact_gain + generous = major_stress_impact_gain + compassionate = medium_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value >= 80 + } + add = -50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < 0 + } + add = -25 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -50 + } + add = 50 + } + modifier = { + opinion = { + target = scope:rowdy_boy + value < -75 + } + add = 100 + } + modifier = { + OR = { + has_trait = forgiving + has_trait = generous + has_trait = compassionate + has_trait = trusting + } + factor = 0 + } + } + } +} + +mpo_nomad_events.1021 = { + hidden = yes + immediate = { + if = { + limit = { + scope:sc_attacker = { + is_alive = yes + } + } + scope:sc_attacker = { + remove_character_flag = single_combat_stripped_to_waist + } + } + if = { + limit = { + scope:sc_defender = { + is_alive = yes + } + } + scope:sc_defender = { + remove_character_flag = single_combat_stripped_to_waist + } + } + + + if = { + limit = { + this = scope:sc_attacker + } + trigger_event = mpo_nomad_events.1022 + } + } +} + +mpo_nomad_events.1022 = { + type = character_event + window = duel_event + title = mpo_nomad_events.1022.t + desc = mpo_nomad_events.1022.desc + theme = death + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:rowdy_boy + } + override_background = { + reference = terrain_scope + } + + immediate = { + remove_character_flag = duelling_defecting_family_flag + } + + option = { + name = mpo_nomad_events.1022.a + if = { + limit = { + scope:rowdy_boy = { + prowess < high_skill_rating + } + } + add_prestige = medium_prestige_gain + add_dread = medium_dread_gain + } + else = { + add_prestige = major_prestige_gain + add_dread = major_dread_gain + } + add_prowess_skill = 1 + + add_character_modifier = { + modifier = mpo_quelled_family_dissent_modifier + years = 10 + } + stress_impact = { + base = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + } +} + +scripted_trigger mpo_nomad_events_1030_child_trigger = { + is_available = yes + age < 16 + age >= 3 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + NOT = { + has_character_flag = had_mpo_nomad_events_1030 + } + is_courtier_of = root + is_hostage = no +} + +#Which manly art do you want your son to practice? +mpo_nomad_events.1030 = { + type = character_event + title = mpo_nomad_events.1030.t + desc = { + desc = mpo_nomad_events.1030.desc + first_valid = { + triggered_desc = { + trigger = { + culture = { + has_cultural_pillar = language_mongolic + } + } + desc = mpo_nomad_events.1030.desc_mongolic + } + desc = mpo_nomad_events.1030.desc_non_mongolic + } + desc = mpo_nomad_events.1030.desc.outro + } + theme = nomads + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = hunting_shortbow_rest_arrow_default + camera = camera_event_left_forward + } + right_portrait = { + character = scope:child + animation = clutching_ball + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available = yes + any_child = { + mpo_nomad_events_1030_child_trigger = yes + } + } + + cooldown = { + years = 3 + } + + immediate = { + save_scope_as = root_scope + add_character_flag = need_military_outfit + #Choose primary_heir if possible + if = { + limit = { + any_child = { + is_primary_heir_of = root + mpo_nomad_events_1030_child_trigger = yes + } + } + random_child = { + limit = { + is_primary_heir_of = root + mpo_nomad_events_1030_child_trigger = yes + } + save_scope_as = child + } + } + if = { + limit = { + NOT = { + exists = scope:child + } + } + random_child = { + limit = { + mpo_nomad_events_1030_child_trigger = yes + } + save_scope_as = child + } + } + + scope:child = { + add_character_flag = { + flag = had_mpo_nomad_events_1030 + years = 15 + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_child = { + is_primary_heir_of = root + mpo_nomad_events_1030_child_trigger = yes + } + add = 2 + } + } + + #Him? I need practice! + option = { + name = mpo_nomad_events.1030.a + flavor = mpo_nomad_events.1030.a.flavor + trigger = { + OR = { + has_trait = tourney_participant + has_trait = lifestyle_blademaster + has_trait = education_martial_prowess_1 + has_trait = education_martial_prowess_2 + has_trait = education_martial_prowess_3 + has_trait = education_martial_prowess_4 + has_trait = berserker + has_trait = shieldmaiden + has_trait = gallant + has_trait = athletic + has_trait = impatient + has_trait = arrogant + has_trait = ambitious + has_trait = diligent + } + } + #Not specialized + if = { + limit = { + OR = { + NOT = { + has_trait = tourney_participant + } + NOR = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 30 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 30 + } + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 30 + } + } + AND = { + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 30 + } + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 30 + } + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 30 + } + } + } + } + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = 10 + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = 10 + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = 10 + } + } + if = { + limit = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = foot + value >= 30 + } + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = 15 + } + } + if = { + limit = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 30 + } + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = 15 + } + } + if = { + limit = { + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + track = bow + value >= 30 + } + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = 15 + } + } + + stress_impact = { + base = { + add = miniscule_stress_impact_gain + multiply = 0.5 + } + compassionate = miniscule_stress_impact_gain + generous = miniscule_stress_impact_gain + humble = miniscule_stress_impact_gain + lazy = medium_stress_impact_gain + content = medium_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_energy = 1 + ai_compassion = -0.5 + } + modifier = { + add = -100 + OR = { + has_trait = compassionate + has_trait = generous + } + } + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = content + } + } + } + } + #Wrestling + option = { + name = mpo_nomad_events.1030.b + scope:child = { + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = foot + value = 50 + } + random = { + chance = { + value = 5 + if = { + limit = { + has_trait = rowdy + } + add = 5 + } + if = { + limit = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = sadistic + has_trait = callous + has_trait = fickle + has_trait = brave + } + } + add = 5 + } + } + add_trait = strong + } + } + stress_impact = { + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_boldness = 0.5 + } + modifier = { + add = 75 + scope:child = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = sadistic + has_trait = callous + has_trait = fickle + has_trait = brave + has_trait = rowdy + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = paranoid + } + } + } + } + #Bow + option = { + name = mpo_nomad_events.1030.c + flavor = mpo_nomad_events.1030.c.flavor + scope:child = { + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = 50 + } + random = { + chance = { + value = 10 + if = { + limit = { + has_trait = pensive + } + add = 10 + } + if = { + limit = { + OR = { + has_trait = patient + has_trait = calm + has_trait = temperate + has_trait = chaste + has_trait = paranoid + has_trait = content + } + } + add = 5 + } + } + add_trait = lifestyle_hunter + } + } + stress_impact = { + wrathful = miniscule_stress_impact_gain + impatient = miniscule_stress_impact_gain + } + ai_chance = { + base = 75 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { + add = 75 + scope:child = { + OR = { + has_trait = patient + has_trait = calm + has_trait = temperate + has_trait = chaste + has_trait = paranoid + has_trait = content + has_trait = pensive + } + } + } + modifier = { + add = -100 + OR = { + has_trait = wrathful + has_trait = impatient + } + } + } + } + #Riding + option = { + name = mpo_nomad_events.1030.d + flavor = mpo_nomad_events.1030.d.flavor + scope:child = { + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = 50 + } + random = { + chance = { + value = 10 + if = { + limit = { + has_trait = bossy + } + add = 10 + } + if = { + limit = { + OR = { + has_trait = compassionate + has_trait = trusting + has_trait = forgiving + has_trait = stubborn + has_trait = diligent + has_trait = generous + } + } + add = 5 + } + } + add_trait = lifestyle_traveler + } + } + stress_impact = { + sadistic = miniscule_stress_impact_gain + callous = miniscule_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { + add = 75 + scope:child = { + OR = { + has_trait = bossy + has_trait = compassionate + has_trait = trusting + has_trait = forgiving + has_trait = stubborn + has_trait = diligent + has_trait = generous + } + } + } + modifier = { + add = -100 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + after = { + remove_character_flag = need_military_outfit + } +} + +#You just won an overrunning invasion war +mpo_nomad_events.1040 = { + type = character_event + title = mpo_nomad_events.1040.t + desc = { + desc = mpo_nomad_events.1040.desc + #TRIGGERED DESC FOR GOVERNMENT TYPE GAINED + first_valid = { + triggered_desc = { + trigger = { + government_has_flag = government_is_tribal + } + desc = mpo_nomad_events.1040.desc_tribal + } + triggered_desc = { + trigger = { + government_has_flag = government_is_clan + } + desc = mpo_nomad_events.1040.desc_clan + } + desc = mpo_nomad_events.1040.desc_feudal + } + } + theme = war + override_background = { + reference = terrain_settlement + } + override_effect_2d = { + reference = legend_glow + } + left_portrait = { + character = root + animation = survey + } + right_portrait = { + character = scope:warrior + animation = horse_archer_idle + camera = camera_event_horse_right + } + lower_right_portrait = scope:defender + + immediate = { + save_scope_as = root_scope + add_character_flag = need_military_outfit + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_soldier } + #Save a warrior character just to look cool + ordered_knight = { + order_by = prowess + limit = { + is_imprisoned = no + is_physically_able_adult = yes + culture = root.culture + } + save_scope_as = warrior + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + ordered_knight = { + order_by = prowess + limit = { + is_imprisoned = no + is_physically_able_adult = yes + } + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + ordered_courtier = { + order_by = prowess + limit = { + is_physically_able_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_available = yes + culture = root.culture + } + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + ordered_courtier = { + order_by = prowess + limit = { + is_physically_able_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_available = yes + } + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + ordered_pool_guest = { + order_by = prowess + limit = { + is_physically_able_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_available = yes + culture = root.culture + } + save_scope_as = warrior + } + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + random_pool_guest = { + limit = { + is_physically_able_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + is_available = yes + } + save_scope_as = warrior + } + } + scope:warrior = { + add_character_flag = need_military_outfit + } + #Want to mention main vassals + ordered_vassal = { + order_by = highest_held_title_tier + limit = { + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + } + save_scope_as = vassal_1 + primary_title = { + save_scope_as = vassal_1_title + } + } + if = { + limit = { + exists = scope:vassal_1 + any_vassal = { + NOT = { + this = scope:vassal_1 + } + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + } + } + ordered_vassal = { + order_by = highest_held_title_tier + limit = { + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + NOT = { + this = scope:vassal_1 + } + } + save_scope_as = vassal_2 + primary_title = { + save_scope_as = vassal_2_title + } + } + } + if = { + limit = { + exists = scope:vassal_2 + any_vassal = { + NOR = { + this = scope:vassal_1 + this = scope:vassal_2 + } + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + } + } + ordered_vassal = { + order_by = highest_held_title_tier + limit = { + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + NOR = { + this = scope:vassal_1 + this = scope:vassal_2 + } + } + save_scope_as = vassal_3 + primary_title = { + save_scope_as = vassal_3_title + } + } + } + if = { + limit = { + exists = scope:vassal_3 + any_vassal = { + NOR = { + this = scope:vassal_1 + this = scope:vassal_2 + this = scope:vassal_3 + } + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + } + } + ordered_vassal = { + order_by = highest_held_title_tier + limit = { + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + NOR = { + this = scope:vassal_1 + this = scope:vassal_2 + this = scope:vassal_3 + } + } + save_scope_as = vassal_4 + primary_title = { + save_scope_as = vassal_4_title + } + } + } + if = { + limit = { + exists = scope:vassal_4 + any_vassal = { + NOR = { + this = scope:vassal_1 + this = scope:vassal_2 + this = scope:vassal_3 + this = scope:vassal_4 + } + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + } + } + ordered_vassal = { + order_by = highest_held_title_tier + limit = { + highest_held_title_tier >= tier_county + primary_title.kingdom = scope:target + NOR = { + this = scope:vassal_1 + this = scope:vassal_2 + this = scope:vassal_3 + this = scope:vassal_4 + } + } + save_scope_as = vassal_5 + primary_title = { + save_scope_as = vassal_5_title + } + } + } + capital_county = { + save_scope_as = capital_county + } + primary_title = { + save_scope_as = primary_title + } + custom_tooltip = overrunning_set_primary_title_tt + custom_tooltip = overrunning_set_capital_tt + if = { + limit = { + exists = scope:vassal_1 + } + custom_tooltip = overrunning_vassal_1_tt + } + if = { + limit = { + exists = scope:vassal_2 + } + custom_tooltip = overrunning_vassal_2_tt + } + if = { + limit = { + exists = scope:vassal_3 + } + custom_tooltip = overrunning_vassal_3_tt + } + if = { + limit = { + exists = scope:vassal_4 + } + custom_tooltip = overrunning_vassal_4_tt + } + + if = { + limit = { + exists = scope:vassal_5 + } + custom_tooltip = overrunning_vassal_5_tt + } + } + option = { + name = mpo_nomad_events.1040.a + } + after = { + remove_character_flag = need_military_outfit + scope:warrior = { + remove_character_flag = need_military_outfit + } + } +} + +scripted_trigger mpo_nomad_events_1050_herder_trigger = { + government_has_flag = government_is_herder + NOT = { is_tributary_of = root } + highest_held_title_tier = tier_county + capital_county = { + county_fertility >= minor_county_fertility_value + } + NOT = { + is_vassal_of = root + + } +} + +#Your herds are encroaching on grazing lands of neighboring herders +mpo_nomad_events.1050 = { + type = character_event + title = mpo_nomad_events.1050.t + desc = mpo_nomad_events.1050.desc + theme = nomads + override_background = { + reference = mpo_camp_steppe + } + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:herder + triggered_animation = { + trigger = { + root = { + highest_held_title_tier >= tier_kingdom + } + } + animation = throne_room_bow_1 + } + triggered_animation = { + trigger = { + root = { + highest_held_title_tier < tier_kingdom + } + } + animation = shepherd_with_sheep + } + camera = camera_event_very_right + } + + trigger = { + age > 8 + is_available = yes + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + any_sub_realm_county = { + holder = root + county_fertility < 100 + is_landless_type_title = no + any_neighboring_county = { + holder = { + mpo_nomad_events_1050_herder_trigger = yes + } + } + } + } + + cooldown = { + years = 5 + } + + immediate = { + random_sub_realm_county = { + limit = { + holder = root + county_fertility < 100 + is_landless_type_title = no + any_neighboring_county = { + holder = { + mpo_nomad_events_1050_herder_trigger = yes + } + } + } + save_scope_as = domain_county + random_neighboring_county = { + limit = { + holder = { + mpo_nomad_events_1050_herder_trigger = yes + } + } + save_scope_as = herder_county + holder = { + save_scope_as = herder + } + } + } + every_sub_realm_county = { + limit = { + holder = root + county_fertility < 100 + is_landless_type_title = no + any_neighboring_county = { + holder = { + mpo_nomad_events_1050_herder_trigger = yes + } + } + } + every_neighboring_county = { + limit = { + holder = { + mpo_nomad_events_1050_herder_trigger = yes + } + } + holder = { + add_to_list = herder_list + } + } + } + } + #All my neighbors are weaker than me... I can do this wherever I want + option = { + trigger = { + any_in_list = { + list = herder_list + count >= 2 + } + OR = { + has_trait = conqueror + has_trait = greatest_of_khans + is_gurkhan = yes + } + } + name = mpo_nomad_events.1050.a + add_internal_flag = special + capital_county = { + change_county_fertility = herder_list_county_fertility_value + } + every_in_list = { + custom = custom.every_neighboring_herder + list = herder_list + custom_tooltip = capital_county_loses_fertility_tt + hidden_effect = { + capital_county = { + change_county_fertility = medium_county_fertility_loss + } + } + } + if = { + limit = { + any_in_list = { + list = herder_list + count >= 4 + } + } + if = { + limit = { + highest_held_title_tier >= tier_kingdom + } + add_tyranny = minor_tyranny_gain + } + else = { + add_piety = medium_piety_loss + } + } + else = { + add_piety = minor_piety_loss + } + stress_impact = { + greedy = miniscule_stress_impact_loss + compassionate = medium_stress_impact_gain + generous = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 300 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + } + } + } + } + #It showed courage to stand up for yourself. Become my honored vassal + option = { + trigger = { + highest_held_title_tier >= tier_duchy + domicile = { + herd > medium_herd_value + } + scope:herder = { + is_independent_ruler = yes + is_at_war = no + OR = { + AND = { + root = { + faith_dominant_gender_male_or_equal = yes + } + is_male = yes + } + AND = { + root = { + faith_dominant_gender_female_or_equal = yes + } + is_female = yes + } + } + NOR = { + has_trait = deceitful + has_trait = craven + } + } + OR = { + piety_level >= high_piety_level + has_trait = loyal + has_trait = just + has_trait = honest + has_trait = compassionate + has_trait = trusting + has_trait = forgiving + has_trait = generous + } + } + name = mpo_nomad_events.1050.b + flavor = mpo_nomad_events.1050.b.flavor + + scope:herder = { + create_title_and_vassal_change = { + type = granted + save_scope_as = change + add_claim_on_loss = no + } + change_liege = { + liege = root + change = scope:change + } + resolve_title_and_vassal_change = scope:change + add_prestige = medium_prestige_gain + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 80 + } + save_scope_as = holder + hidden_effect = { + every_held_title = { + limit = { + tier = tier_county + } + if = { + limit = { + title_province = { + has_holding_type = herder_holding + } + } + title_province = { + set_holding_type = nomad_holding + } + } + } + } + change_government = nomad_government + domicile = { + change_herd = medium_herd_gain + } + } + pay_herd = { + target = scope:herder + value = domicile.medium_herd_value + } + + stress_impact = { + generous = minor_stress_impact_loss + arrogant = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + greedy = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 1 + ai_energy = 0.5 + ai_compassion = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = paranoid + has_trait = vengeful + } + } + } + } + #I will not be respected if I do not respect the rights of others + option = { + name = mpo_nomad_events.1050.c + flavor = mpo_nomad_events.1050.c.flavor + add_piety = medium_piety_gain + add_prestige = minor_prestige_gain + domicile = { + change_herd = minor_herd_loss + } + stress_impact = { + greedy = minor_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arbitrary + } + } + } + } + #I am stronger. My animals go where they like + option = { + name = mpo_nomad_events.1050.d + scope:domain_county = { + change_county_fertility = medium_county_fertility_gain + } + custom_tooltip = herder_county_loses_fertility_tt + hidden_effect = { + scope:herder.capital_county = { + change_county_fertility = medium_county_fertility_loss + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + generous = medium_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + } + } + } + } +} + +#You can make money trading with neighboring non-nomads +mpo_nomad_events.1060 = { + type = character_event + title = mpo_nomad_events.1060.t + desc = mpo_nomad_events.1060.desc + theme = nomads + override_background = { + reference = market + } + left_portrait = { + character = root + animation = horse_archer_idle + camera = camera_event_horse_left_forward + } + right_portrait = { + character = scope:advisor + animation = betting + } + lower_right_portrait = scope:neighbor.top_liege + + trigger = { + age >= 12 + is_available = yes + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + any_sub_realm_county = { + holder = root + any_neighboring_county = { + any_county_province = { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + } + } + holder = { + is_ai = yes + NOT = { + is_at_war_with = root + } + } + holder.liege ?= { + NOT = { + is_at_war_with = root + } + } + holder.top_liege = { + NOT = { + is_at_war_with = root + } + } + } + } + highest_held_title_tier < tier_kingdom + } + + cooldown = { + years = 10 + } + + immediate = { + random_sub_realm_county = { + limit = { + holder = root + any_neighboring_county = { + any_county_province = { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + } + } + holder = { + is_ai = yes + NOT = { + is_at_war_with = root + } + } + holder.liege ?= { + NOT = { + is_at_war_with = root + } + } + holder.top_liege = { + NOT = { + is_at_war_with = root + } + } + } + } + random_neighboring_county = { + limit = { + any_county_province = { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + } + } + holder.liege ?= { + NOT = { + is_at_war_with = root + } + } + holder = { + is_ai = yes + NOT = { + is_at_war_with = root + } + } + holder.top_liege = { + NOT = { + is_at_war_with = root + } + } + } + save_scope_as = neighbor_county + holder = { save_scope_as = neighbor } + culture = { + save_scope_as = county_culture + } + random_county_province = { + limit = { + OR = { + has_holding_type = castle_holding + has_holding_type = city_holding + } + } + save_scope_as = neighbor_province + } + + } + } + scope:neighbor = { + save_scope_as = bg_override_char + } + random_councillor = { + limit = { + is_landed = no + is_available_ai_adult = yes + NOT = { + has_council_position = councillor_court_chaplain + } + } + save_scope_as = advisor + } + if = { + limit = { + NOT = { + exists = scope:advisor + } + } + random_knight = { + limit = { + is_available_ai_adult = yes + is_landed = no + } + save_scope_as = advisor + } + } + if = { + limit = { + NOT = { + exists = scope:advisor + } + } + random_courtier = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = advisor + } + } + if = { + limit = { + NOT = { + exists = scope:advisor + } + } + random_pool_guest = { + limit = { + is_available_ai_adult = yes + } + save_scope_as = advisor + } + } + } + #High stewardship option + option = { + trigger = { + stewardship >= very_high_skill_rating + } + name = mpo_nomad_events.1060.a + flavor = mpo_nomad_events.1060.a.flavor + add_character_modifier = { + modifier = nomad_trading_mastery_modifier + years = 10 + } + add_gold = medium_gold_value + domicile = { + change_herd = miniscule_herd_loss + } + stress_impact = { + greedy = miniscule_stress_impact_loss + diligent = minor_stress_impact_loss + ambitious = miniscule_stress_impact_loss + } + ai_chance = { + base = 400 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + ai_rationality = 1 + } + } + } + #No trade, only raid! + option = { + name = mpo_nomad_events.1060.b + flavor = mpo_nomad_events.1060.b.flavor + duel = { + skill = prowess + value = medium_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_nomad_events.1060.b.success + send_interface_toast = { + type = event_toast_effect_good + title = mpo_nomad_events.1060.b.success + left_icon = scope:neighbor + add_gold = major_gold_value + scope:neighbor_county = { + change_development_progress_with_overflow = medium_development_progress_loss + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_nomad_events.1060.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_nomad_events.1060.b.failure + left_icon = scope:neighbor + increase_wounds_effect = { REASON = fight } + } + } + } + scope:neighbor.top_liege = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + stress_impact = { + impatient = miniscule_stress_impact_loss + craven = medium_stress_impact_gain + calm = minor_stress_impact_gain + patient = minor_stress_impact_gain + content = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_rationality = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = calm + has_trait = patient + } + } + } + } + #We've got goods to sell + option = { + name = mpo_nomad_events.1060.c + flavor = mpo_nomad_events.1060.c.flavor + add_character_modifier = { + modifier = nomad_trading_partners_modifier + years = 10 + } + add_gold = medium_gold_value + domicile = { + change_herd = minor_herd_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.5 + ai_rationality = 1 + } + } + } +} + +#You wake up with only your horse +mpo_nomad_events.1070 = { + type = character_event + title = mpo_nomad_events.1070.t + desc = { + desc = mpo_nomad_events.1070.desc_intro + first_valid = { + triggered_desc = { + trigger = { + any_owned_story = { + story_type = story_cycle_martial_lifestyle_warhorse + exists = var:story_cycle_horse_name + } + } + desc = mpo_nomad_events.1070.desc_has_horse + } + desc = mpo_nomad_events.1070.desc_new_horse + } + desc = mpo_nomad_events.1070.desc + first_valid = { + triggered_desc = { + trigger = { + has_trait = lifestyle_mystic + } + desc = mpo_nomad_events.1070.desc_spiritual + } + triggered_desc = { + trigger = { + OR = { + has_trait = eccentric + has_trait = lunatic + has_trait = possessed + } + } + desc = mpo_nomad_events.1070.desc_mental_thing + } + desc = mpo_nomad_events.1070.desc_new_drunk + } + } + theme = nomads + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_extreme_closeup_left + hide_info = yes + } + + trigger = { + age >= 12 + is_available = yes + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + highest_held_title_tier < tier_empire + OR = { + #Is young and foolish + age <= 25 + #Is a mess + has_trait = drunkard + has_trait = lifestyle_reveler + has_trait = hashishiyah + #Is a little mentally off + has_trait = eccentric + has_trait = lunatic + has_trait = possessed + has_trait = lifestyle_mystic + } + NOT = { + has_trait = temperate + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 3 + OR = { + has_trait = drunkard + has_trait = lifestyle_reveler + has_trait = hashishiyah + has_trait = lunatic + has_trait = possessed + } + } + modifier = { + add = 0.5 + OR = { + ai_energy >= medium_positive_ai_value + ai_rationality >= medium_positive_ai_value + ai_boldness >= medium_positive_ai_value + ai_sociability >= medium_positive_ai_value + } + } + modifier = { + add = -0.5 + OR = { + ai_energy <= medium_negative_ai_value + ai_rationality <= medium_negative_ai_value + ai_boldness <= medium_negative_ai_value + ai_sociability <= medium_negative_ai_value + } + } + #Syncretic nomads weren't strict about rules like those forbidding alcohol, but still should be accounted for + modifier = { + factor = -0.5 + faith_forbids_alcohol_trigger = no + } + } + + cooldown = { + years = 10 + } + + immediate = { + } + + #I love you, horse + #Starts horse story cycle? + option = { + name = mpo_nomad_events.1070.a + trigger = { + NOR = { + has_character_flag = had_warhorse_story + any_owned_story = { + story_type = story_cycle_martial_lifestyle_warhorse + exists = var:story_cycle_horse_name + } + } + NOR = { + has_trait = sadistic + has_trait = arbitrary + has_trait = fickle + has_trait = callous + } + } + custom_tooltip = begin_warhorse_story_tt + start_warhorse_story_cycle_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_sociability = 1 + } + } + } + + #I must cease this horrible immature behavior... + option = { + trigger = { + OR = { + has_trait = drunkard + has_trait = hashishiyah + } + } + name = mpo_nomad_events.1070.b + if = { + limit = { + has_trait = drunkard + } + random = { + chance = 70 + remove_trait = drunkard + } + } + else = { + random = { + chance = 70 + remove_trait = hashishiyah + } + } + stress_impact = { + base = minor_stress_impact_gain + temperate = minor_stress_impact_loss + content = medium_stress_impact_gain + gluttonous = minor_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_energy = 1 + ai_rationality = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = gluttonous + has_trait = fickle + AND = { + stress > 90 + stress < 100 + } + } + } + } + } + + #HighGod brought me here + option = { + trigger = { + OR = { + has_trait = zealous + has_trait = lifestyle_mystic + has_trait = devoted + } + } + name = mpo_nomad_events.1070.c + flavor = mpo_nomad_events.1070.c.flavor + if = { + limit = { + NOT = { + has_trait = lifestyle_mystic + } + } + add_trait = lifestyle_mystic + } + else = { + add_trait_xp = { + trait = lifestyle_mystic + value = small_lifestyle_random_xp_mid + } + } + add_piety = minor_piety_gain + stress_impact = { + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_zeal = 2 + } + modifier = { + factor = 0 + has_trait = cynical + } + } + } + + #I can find my way home + option = { + name = mpo_nomad_events.1070.d + flavor = mpo_nomad_events.1070.d.flavor + duel = { + skills = { learning prowess } + value = medium_skill_rating + # You find your way back easily + 55 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + # Always give _some_ chance. + min = -49 + } + desc = mpo_nomad_events.1070.d.success + send_interface_toast = { + type = event_toast_effect_good + title = mpo_nomad_events.1070.d.success + left_icon = root + if = { + limit = { + NOT = { + has_trait = lifestyle_traveler + } + } + add_trait = lifestyle_traveler + } + else = { + add_trait_xp = { + trait = lifestyle_traveler + track = danger + value = 15 + } + } + } + } + # You get horribly lost over multiple days + 45 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + # Limit how low the off-chance can go. + min = -49 + } + desc = mpo_nomad_events.1070.d.failure + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_nomad_events.1070.d.failure + left_icon = root + if = { + limit = { + NOT = { has_trait = ill } + } + show_as_tooltip = { add_trait = ill } + hidden_effect = { + contract_disease_effect = { + DISEASE = ill + TREATMENT_EVENT = no + } + } + } + else_if = { + limit = { + NOT = { has_trait = pneumonic } + } + random = { + chance = { + value = 40 + add = { + value = health + multiply = -1.5 + } + } + show_as_tooltip = { add_trait = pneumonic } + hidden_effect = { + contract_disease_effect = { + DISEASE = pneumonic + TREATMENT_EVENT = no + } + } + } + } + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + lazy = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + ai_boldness = 1 + } + modifier = { + factor = 0.5 + OR = { + has_trait = humble + has_trait = lazy + has_trait = trusting + prowess < average_skill_rating + learning < average_skill_rating + AND = { + prowess <= decent_skill_rating + learning <= decent_skill_rating + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = lazy + has_trait = trusting + prowess < low_skill_rating + learning < low_skill_rating + AND = { + prowess < average_skill_rating + learning < average_skill_rating + } + } + } + } + } + + #Horse can always be relied on to get me home + option = { + name = mpo_nomad_events.1070.e + + add_character_modifier = { + modifier = nomad_alone_in_adversity_modifier + years = 5 + } + stress_impact = { + cynical = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + ai_compassion = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = arrogant + has_trait = paranoid + has_trait = impatient + } + } + } + } +} + +scripted_trigger mpo_nomad_events_1080_neighbor_trigger = { + age >= 12 + government_has_flag = government_is_nomadic + NOR = { + this = root + is_vassal_or_below_of = root + root = { + is_vassal_or_below_of = prev + } + } + is_available_ai_adult = yes + is_travelling = no + NOR = { + exists = involved_activity + is_at_war_with = root + AND = { + is_causing_raid_hostility_towards = root + has_raised_armies = yes + } + } + highest_held_title_tier <= tier_duchy + exists = capital_county + NOT = { + has_character_flag = had_mpo_nomad_events_1080 + } +} + +#You meet a neighbor's search party in your lands +mpo_nomad_events.1080 = { + type = character_event + title = mpo_nomad_events.1080.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + highest_held_title_tier > scope:neighbor_ruler.highest_held_title_tier + } + desc = mpo_nomad_events.1080.desc_high_intro + } + desc = mpo_nomad_events.1080.desc_low_intro + } + desc = mpo_nomad_events.1080.desc_1 + first_valid = { + triggered_desc = { + trigger = { + scope:escaped_warrior = { + has_trait = murderer + } + } + desc = crime_murderer + } + triggered_desc = { + trigger = { + scope:escaped_warrior = { + has_trait = witch + } + } + desc = crime_witch + } + triggered_desc = { + trigger = { + scope:escaped_warrior = { + has_trait = cannibal + } + } + desc = crime_cannibal + } + triggered_desc = { + trigger = { + scope:escaped_warrior = { + OR = { + has_trait = deviant + has_trait = incestuous + } + } + } + desc = crime_deviant + } + triggered_desc = { + trigger = { + scope:escaped_warrior = { + OR = { + has_trait = kinslayer_1 + has_trait = kinslayer_2 + has_trait = kinslayer_3 + } + } + } + desc = crime_kinslayer + } + triggered_desc = { + trigger = { + scope:escaped_warrior = { + has_trait = fornicator + } + } + desc = crime_fornicator + } + triggered_desc = { + trigger = { + scope:escaped_warrior = { + has_trait = adulterer + } + } + desc = crime_adulterer + } + triggered_desc = { + trigger = { + scope:escaped_warrior = { + has_trait = sodomite + } + } + desc = crime_sodomite + } + desc = mpo_nomad_events.1080.criminal + } + desc = mpo_nomad_events.1080.desc_2 + } + theme = nomads + override_background = { + reference = mpo_steppe_evening + } + left_portrait = { + character = root + animation = horse_archer_idle + camera = camera_event_horse_left_forward + } + right_portrait = { + character = scope:neighbor_ruler + animation = horse_conversing_left + camera = camera_event_horse_right + } + lower_right_portrait = scope:escaped_warrior + + trigger = { + age >= 10 + is_available = yes + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_landed = yes + capital_county = { + NOT = { + any_county_province = { + OR = { + is_raided = yes + is_occupied = yes + } + } + } + + any_neighboring_county = { + holder = { + mpo_nomad_events_1080_neighbor_trigger = yes + } + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + add_character_flag = need_military_outfit + capital_county = { + random_neighboring_county = { + limit = { + holder = { + mpo_nomad_events_1080_neighbor_trigger = yes + } + } + save_scope_as = neighbor_county + holder = { + save_scope_as = neighbor_ruler + #For female chance scripted effect + save_scope_as = value_target + add_character_flag = need_military_outfit + add_character_flag = { + flag = had_mpo_nomad_events_1080 + years = 10 + } + + } + } + } + create_character = { + template = new_warrior_character + dynasty = none + location = root.location + culture = scope:neighbor_county.culture + faith = scope:neighbor_county.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = escaped_warrior + } + scope:escaped_warrior = { + random_list = { + 1 = { + trigger = { + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = scope:neighbor_ruler.faith GENDER_CHARACTER = scope:escaped_warrior } + } + add_trait = witch + } + 1 = { + add_trait = cannibal + } + 1 = { + trigger = { + trait_is_criminal_in_faith_trigger = { 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 } + } + 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 } + } + 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 } + } + add_trait = kinslayer_3 + } + 3 = { + trigger = { + trait_is_criminal_in_faith_trigger = { 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 } + } + add_trait = fornicator + } + 3 = { + trigger = { + trait_is_criminal_in_faith_trigger = { 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 } + } + add_trait = sodomite + } + 3 = { + trigger = { + has_dlc_feature = landless_playable + } + add_trait = gallowsbait + add_trait_xp = { + trait = gallowsbait + track = bandit + value = { 10 50 } + } + } + 3 = { + trigger = { + has_dlc_feature = landless_playable + } + add_trait = gallowsbait + add_trait_xp = { + trait = gallowsbait + track = trickster + value = { 10 50 } + } + } + 3 = { + trigger = { + has_dlc_feature = landless_playable + } + add_trait = gallowsbait + add_trait_xp = { + trait = gallowsbait + track = thief + value = { 10 50 } + } + } + 3 = { + trigger = { + has_dlc_feature = landless_playable + } + add_trait = gallowsbait + add_trait_xp = { + trait = gallowsbait + track = marauder + value = { 10 50 } + } + } + 3 = { + add_trait = disloyal + } + 5 = { + add_trait = murderer + } + } + } + } + + #If he can elude you... sounds like a good man to have + option = { + name = mpo_nomad_events.1080.a + flavor = mpo_nomad_events.1080.a.flavor + trigger = { + OR = { + has_trait = ambitious + has_trait = arbitrary + has_trait = greedy + has_trait = fickle + has_trait = gallowsbait + has_trait = forgiving + has_trait = schemer + has_trait = callous + has_trait = sadistic + has_trait = deceitful + has_trait = compassionate + has_trait = generous + } + } + add_courtier = scope:escaped_warrior + scope:escaped_warrior = { + add_opinion = { + target = root + modifier = was_spared + opinion = 50 + } + } + if = { + limit = { + scope:escaped_warrior = { + NOT = { is_obedient_to = root } + } + } + scope:escaped_warrior = { + add_opinion = { + modifier = obedience_opinion + target = root + } + } + } + consume_all_criminal_reasons_effect = { + LIEGE = root + CRIMINAL = scope:escaped_warrior + } + scope:neighbor_ruler = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + stress_impact = { + just = major_stress_impact_gain + zealous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + #Chase off these unwelcome guests in a hail of arrows + option = { + name = mpo_nomad_events.1080.b + flavor = mpo_nomad_events.1080.b.flavor + + #Your knights gain bow skill + if = { + limit = { + has_dlc_feature = tours_and_tournaments + } + if = { + limit = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_medium_value + } + } + every_knight = { + custom = custom.every_knight + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + hidden_effect = { + add_trait = tourney_participant + } + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + else = { + add_martial_lifestyle_xp = minor_lifestyle_xp + add_dread = minor_dread_gain + } + scope:neighbor_ruler = { + progress_towards_rival_effect = { + REASON = rival_chased_off_with_arrows + CHARACTER = root + OPINION = -30 + } + } + random = { + chance = { + value = 50 + if = { + limit = { + martial >= medium_skill_rating + } + add = 5 + } + if = { + limit = { + prowess >= medium_skill_rating + } + add = 5 + } + if = { + limit = { + martial >= high_skill_rating + } + add = 5 + } + if = { + limit = { + prowess >= high_skill_rating + } + add = 5 + } + if = { + limit = { + martial > extremely_high_skill_rating + } + add = 5 + } + if = { + limit = { + prowess > extremely_high_skill_rating + } + add = 5 + } + if = { + limit = { + number_of_knights >= 10 + + } + add = 10 + } + if = { + limit = { + number_of_knights >= 14 + } + add = 10 + } + if = { + limit = { + scope:neighbor_ruler = { + martial >= medium_skill_rating + } + } + add = -5 + } + if = { + limit = { + scope:neighbor_ruler = { + prowess >= medium_skill_rating + } + } + add = -5 + } + if = { + limit = { + scope:neighbor_ruler = { + martial >= high_skill_rating + } + } + add = -5 + } + if = { + limit = { + scope:neighbor_ruler = { + prowess >= high_skill_rating + } + } + add = -5 + } + if = { + limit = { + scope:neighbor_ruler = { + martial > extremely_high_skill_rating + } + } + add = -5 + } + if = { + limit = { + scope:neighbor_ruler = { + prowess > extremely_high_skill_rating + } + } + add = -5 + } + if = { + limit = { + scope:neighbor_ruler = { + number_of_knights >= 10 + } + + } + add = -10 + } + if = { + limit = { + scope:neighbor_ruler = { + number_of_knights >= 14 + } + } + add = -10 + } + } + scope:neighbor_ruler = { + increase_wounds_effect = { REASON = fight } + } + } + stress_impact = { + trusting = medium_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 150 + ai_value_modifier = { + ai_sociability = -0.5 + ai_honor = 0.5 + ai_boldness = -0.5 + ai_compassion = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = humble + has_trait = compassionate + } + } + } + } + #We will ride the fugitive down for you + option = { + name = mpo_nomad_events.1080.c + + #Your knights gain horse skill + if = { + limit = { + has_dlc_feature = tours_and_tournaments + } + if = { + limit = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + every_knight = { + custom = custom.every_knight + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + hidden_effect = { + add_trait = tourney_participant + } + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = tournament_hastiludes_xp_gain_medium_value + } + } + } + else = { + capital_county = { + add_county_modifier = { + modifier = ranged_and_searched_modifier + years = 5 + } + } + } + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:neighbor_ruler + opinion = 20 + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:escaped_warrior + IMPRISONER = scope:neighbor_ruler + } + stress_impact = { + forgiving = minor_stress_impact_gain + arbitrary = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_vengefulness = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = arbitrary + has_trait = forgiving + } + } + } + } + after = { + scope:escaped_warrior = { + silent_disappearance_ai_effect = yes + } + scope:neighbor_ruler = { + remove_character_flag = need_military_outfit + } + remove_character_flag = need_military_outfit + } +} +#Nomadic father/brother's wife marrying event +mpo_nomad_events.1090 = { + hidden = yes + trigger = { + has_mpo_dlc_trigger = yes + mpo_valid_dead_husband_trigger = yes + } + immediate = { + save_scope_as = dead_husband + primary_spouse = { + save_scope_as = widow + } + if = { + limit = { + primary_heir ?= { + OR = { + is_sibling_of = root + is_child_of = root + } + mpo_valid_widow_marrier_trigger = yes + } + } + primary_heir = { + trigger_event = { + id = mpo_nomad_events.1091 + days = 6 + } + } + } + else_if = { + limit = { + any_sibling = { + mpo_valid_widow_marrier_trigger = yes + } + } + ordered_sibling = { + order_by = age + limit = { + mpo_valid_widow_marrier_trigger = yes + } + trigger_event = { + id = mpo_nomad_events.1091 + days = 6 + } + } + } + else = { + ordered_child = { + order_by = age + limit = { + mpo_valid_widow_marrier_trigger = yes + } + trigger_event = { + id = mpo_nomad_events.1091 + days = 6 + } + } + } + } +} + +scripted_trigger mpo_nomad_events_widow_relative_trigger = { + is_ruler = yes + highest_held_title_tier >= tier_county + NOR = { + is_at_war_with = root + is_allied_to = root + AND = { + exists = liege + liege = { + is_vassal_of = root + } + } + } + is_ai = yes + NOT = { + this = root + } +} + +#You marry a family widow +mpo_nomad_events.1091 = { + type = character_event + title = mpo_nomad_events.1091.t + desc = { + desc = mpo_nomad_events.1091.desc + first_valid = { + triggered_desc = { + trigger = { + allowed_more_spouses = yes + } + desc = mpo_nomad_events.1091.desc.marry + } + desc = mpo_nomad_events.1091.desc.concubine + } + } + theme = nomads + override_background = { + reference = mpo_campfire_steppe + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:widow + animation = grief + } + lower_right_portrait = scope:dead_husband + lower_left_portrait = scope:widow_relative + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + scope:widow = { + is_married = no + is_betrothed = no + is_alive = yes + is_imprisoned = no + is_ai = yes + is_incapable = no + has_contagious_deadly_disease_trigger = no + NOR = { + has_trait = celibate + has_trait = devoted + } + } + #Is root a valid marrier still? + OR = { + has_trait = nomadic_philosophy + culture = { + has_cultural_pillar = heritage_mongolic + } + culture = { + has_cultural_pillar = heritage_turkic + } + faith.religion = faith:tengri_pagan.religion + } + #Can have multiple wives or concubines + faith = { + OR = { + has_doctrine = doctrine_polygamy + has_doctrine = doctrine_concubines + } + } + is_male = yes + is_adult = yes + NOR = { + has_trait = celibate + has_trait = eunuch + has_trait = devoted + } + #Has a free slot for a wife or concubine + OR = { + allowed_more_spouses = yes + allowed_more_concubines = yes + } + #Can marry the widow + NOT = { + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:widow } + } + is_imprisoned = no + } + + immediate = { + scope:widow = { + if = { + limit = { + OR = { + any_parent = { + mpo_nomad_events_widow_relative_trigger = yes + } + any_sibling = { + mpo_nomad_events_widow_relative_trigger = yes + } + any_child = { + mpo_nomad_events_widow_relative_trigger = yes + } + } + } + ordered_parent = { + order_by = max_military_strength + limit = { + mpo_nomad_events_widow_relative_trigger = yes + } + save_scope_as = widow_relative + } + if = { + limit = { + NOT = { + exists = scope:widow_relative + } + } + ordered_child = { + order_by = max_military_strength + limit = { + mpo_nomad_events_widow_relative_trigger = yes + } + save_scope_as = widow_relative + } + } + if = { + limit = { + NOT = { + exists = scope:widow_relative + } + } + ordered_sibling = { + order_by = max_military_strength + limit = { + mpo_nomad_events_widow_relative_trigger = yes + } + save_scope_as = widow_relative + } + } + } + } + } + + #OH BABY I'VE BEEN WAITING FOR THIS + option = { + trigger = { + is_attracted_to_gender_of = scope:widow + NOT = { + has_trait = celibate + } + scope:widow = { + is_attracted_to_gender_of = root + } + OR = { + has_trait = lustful + has_trait = seducer + is_deviant_trigger = yes + has_relation_lover = scope:widow + has_relation_soulmate = scope:widow + has_relation_crush = scope:widow + any_scheme = { + scheme_type = courting + scheme_target_character = scope:widow + } + any_scheme = { + scheme_type = seduce + scheme_target_character = scope:widow + } + AND = { + opinion = { + target = scope:widow + value >= 100 + } + reverse_opinion = { + target = scope:widow + value >= 100 + } + } + scope:widow = { + attraction > low_positive_attraction + } + } + } + name = mpo_nomad_events.1091.a + flavor = mpo_nomad_events.1091.a.flavor + add_internal_flag = special + if = { + limit = { + OR = { + has_relation_soulmate = scope:widow + has_relation_lover = scope:widow + has_relation_best_friend = scope:widow + } + } + add_stress = medium_stress_impact_loss + } + else_if = { + limit = { + has_relation_friend = scope:widow + } + add_stress = minor_stress_impact_loss + } + if = { + limit = { + allowed_more_spouses = yes + } + marry = scope:widow + custom_tooltip = family_widow_cant_divorce_tt + scope:widow = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 40 + } + } + scope:widow = { + add_character_modifier = { + modifier = inspired_in_wifely_duties_modifier + years = 20 + } + } + if = { + limit = { + exists = scope:widow_relative + } + scope:widow_relative = { + save_scope_as = recipient + } + custom_tooltip = negotiate_alliance_effect_tooltip + create_alliance = { + target = scope:widow_relative + allied_through_owner = root + allied_through_target = scope:widow + } + } + } + else = { + make_concubine = scope:widow + custom_tooltip = family_widow_cant_dismiss_tt + scope:widow = { + add_opinion = { + target = root + modifier = romance_opinion + opinion = 15 + } + } + scope:widow = { + add_character_modifier = { + modifier = concubine_lavished_attention_modifier + years = 10 + } + } + create_character_memory = { + type = took_kins_widow_concubine_memory + participants = { + dead_husband = scope:dead_husband + widow = scope:widow + } + } + scope:widow = { + create_character_memory = { + type = widow_taken_concubine_memory + participants = { + dead_husband = scope:dead_husband + new_husband = root + } + } + } + } + set_variable = { + name = family_widow_forbidden_divorce + value = scope:widow + years = 10 + } + custom_tooltip = family_widow_seduce_romance_bonus_tt + stress_impact = { + lustful = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_loss + chaste = major_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.5 + } + modifier = { + factor = 2 + OR = { + scope:widow = { + attraction >= medium_positive_attraction + } + AND = { + opinion = { + target = scope:widow + value >= 100 + } + reverse_opinion = { + target = scope:widow + value >= 100 + } + } + has_relation_soulmate = scope:widow + has_trait = lustful + } + } + modifier = { + factor = 0.5 + OR = { + #Widow is old, root isn't + AND = { + age < 40 + scope:widow = { + age >= 40 + } + } + AND = { + age < 50 + scope:widow = { + age >= 50 + } + } + AND = { + age < 25 + scope:widow = { + age >= 30 + } + } + } + NOT = { + is_deviant_trigger = yes + } + } + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = calm + } + } + } + } + + #A prestigious and powerful connection we must keep + option = { + trigger = { + exists = scope:widow_relative + allowed_more_spouses = yes + scope:widow_relative = { + is_vassal_of = root + } + } + name = mpo_nomad_events.1091.b + flavor = mpo_nomad_events.1091.b.flavor + + marry = scope:widow + custom_tooltip = family_widow_cant_divorce_tt + if = { + limit = { + scope:widow_relative.highest_held_title_tier <= tier_county + } + add_legitimacy = minor_legitimacy_gain + } + else = { + add_legitimacy = medium_legitimacy_gain + } + if = { + limit = { + exists = scope:widow_relative + } + scope:widow_relative = { + save_scope_as = recipient + } + custom_tooltip = negotiate_alliance_effect_tooltip + create_alliance = { + target = scope:widow_relative + allied_through_owner = root + allied_through_target = scope:widow + } + } + + reverse_add_opinion = { + modifier = loyalty_opinion + target = scope:widow_relative + opinion = 30 + } + + set_variable = { + name = family_widow_forbidden_divorce + value = scope:widow + years = 10 + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_greed = -0.5 + } + modifier = { + factor = 2 + legitimacy_level <= 1 + } + modifier = { + factor = 2 + legitimacy_level <= 0 + } + modifier = { + factor = 0.25 + scope:widow_relative = { + NOT = { is_powerful_vassal_of = root } + } + } + } + } + + #I guess I'll take his stuff... all his stuff + option = { + name = mpo_nomad_events.1091.c + + if = { + limit = { + allowed_more_concubines = yes + } + make_concubine = scope:widow + custom_tooltip = family_widow_cant_dismiss_tt + create_character_memory = { + type = took_kins_widow_concubine_memory + participants = { + dead_husband = scope:dead_husband + widow = scope:widow + } + } + scope:widow = { + create_character_memory = { + type = widow_taken_concubine_memory + participants = { + dead_husband = scope:dead_husband + new_husband = root + } + } + } + } + else = { + marry = scope:widow + custom_tooltip = family_widow_cant_divorce_tt + if = { + limit = { + exists = scope:widow_relative + } + scope:widow_relative = { + save_scope_as = recipient + } + custom_tooltip = negotiate_alliance_effect_tooltip + create_alliance = { + target = scope:widow_relative + allied_through_owner = root + allied_through_target = scope:widow + } + } + } + set_variable = { + name = family_widow_forbidden_divorce + value = scope:widow + years = 10 + } + if = { + limit = { + highest_held_title_tier > scope:dead_husband.highest_held_title_tier + } + add_gold = minor_gold_value + domicile = { + change_herd = minor_herd_gain + } + } + else_if = { + limit = { + highest_held_title_tier = scope:dead_husband.highest_held_title_tier + } + add_gold = minor_gold_value + domicile = { + change_herd = medium_herd_gain + } + } + else = { + add_gold = medium_gold_value + domicile = { + change_herd = medium_herd_gain + } + } + + + stress_impact = { + generous = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + modifier = { + add = 50 + allowed_more_spouses = yes + } + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = humble + } + } + } + } + #Our family will always cherish its women + option = { + name = mpo_nomad_events.1091.d + if = { + limit = { + allowed_more_spouses = yes + } + marry = scope:widow + custom_tooltip = family_widow_cant_divorce_tt + if = { + limit = { + exists = scope:widow_relative + } + scope:widow_relative = { + save_scope_as = recipient + } + custom_tooltip = negotiate_alliance_effect_tooltip + create_alliance = { + target = scope:widow_relative + allied_through_owner = root + allied_through_target = scope:widow + } + } + } + else = { + make_concubine = scope:widow + custom_tooltip = family_widow_cant_dismiss_tt + create_character_memory = { + type = took_kins_widow_concubine_memory + participants = { + dead_husband = scope:dead_husband + widow = scope:widow + } + } + scope:widow = { + create_character_memory = { + type = widow_taken_concubine_memory + participants = { + dead_husband = scope:dead_husband + new_husband = root + } + } + } + } + set_variable = { + name = family_widow_forbidden_divorce + value = scope:widow + years = 10 + } + + if = { + limit = { + highest_held_title_tier > scope:dead_husband.highest_held_title_tier + } + if = { + limit = { + house ?= { + house_head = root + } + allowed_more_spouses = yes + } + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + } + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + highest_held_title_tier = scope:dead_husband.highest_held_title_tier + } + if = { + limit = { + house ?= { + house_head = root + } + allowed_more_spouses = yes + } + dynasty = { + add_dynasty_prestige = minor_dynasty_prestige_gain + } + } + add_prestige = medium_prestige_gain + } + else = { + if = { + limit = { + house ?= { + house_head = root + } + allowed_more_spouses = yes + } + dynasty = { + add_dynasty_prestige = miniscule_dynasty_prestige_gain + } + } + add_prestige = major_prestige_gain + } + every_close_or_extended_family_member = { + custom = custom.every_close_or_extended_family_member + limit = { + NOT = { + this = root + } + } + add_opinion = { + target = root + modifier = trust_opinion + opinion = 10 + } + } + + stress_impact = { + arbitrary = medium_stress_impact_gain + fickle = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + modifier = { + factor = 0 + OR = { + has_trait = arbitrary + has_trait = fickle + } + } + } + } + #Nah, I'm good + option = { + name = mpo_nomad_events.1091.e + + if = { + limit = { + scope:dead_husband.highest_held_title_tier > root.highest_held_title_tier + } + add_legitimacy = minor_legitimacy_loss + } + else_if = { + limit = { + scope:dead_husband.highest_held_title_tier = root.highest_held_title_tier + } + add_legitimacy = miniscule_legitimacy_loss + } + + + if = { + limit = { + allowed_more_spouses = yes + exists = scope:widow_relative + } + reverse_add_opinion = { + modifier = disrespect_opinion + target = scope:widow_relative + opinion = -40 + } + scope:widow = { + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -40 + } + } + every_close_family_member = { + custom = custom.every_close_family_member + limit = { + NOR = { + this = root + this = scope:widow + this = scope:widow_relative + } + } + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -20 + } + } + } + else = { + if = { + limit = { + exists = scope:widow_relative + } + reverse_add_opinion = { + modifier = disrespect_opinion + target = scope:widow_relative + opinion = -20 + } + } + scope:widow = { + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -20 + } + } + every_close_family_member = { + custom = custom.every_close_family_member + limit = { + NOR = { + this = root + this = scope:widow + AND = { + exists = scope:widow_relative + this = scope:widow_relative + } + } + } + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -10 + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + generous = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -1 + } + modifier = { + add = 50 + scope:widow = { + age >= 30 + } + } + modifier = { + add = 100 + scope:widow = { + age >= 40 + } + } + modifier = { + add = 100 + scope:widow = { + age >= 50 + } + } + modifier = { + add = -25 + scope:widow = { + age <= 25 + } + } + modifier = { + add = -50 + scope:widow = { + OR = { + has_trait = intellect_good_3 + has_trait = intellect_good_2 + has_trait = beauty_good_3 + has_trait = beauty_good_2 + has_trait = physique_good_3 + has_trait = physique_good_2 + } + } + } + modifier = { + add = 50 + scope:widow = { + OR = { + has_trait = intellect_bad_1 + has_trait = intellect_bad_2 + has_trait = intellect_bad_3 + has_trait = beauty_bad_1 + has_trait = beauty_bad_2 + has_trait = beauty_bad_3 + } + } + } + modifier = { + add = 50 + scope:widow = { + OR = { + has_trait = intellect_bad_3 + has_trait = beauty_bad_3 + } + } + } + + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = generous + has_trait = just + } + } + } + } +} + +scripted_trigger mpo_nomad_events_1100_camel_terrain_trigger = { + root.capital_province = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + } + } +} + +scripted_trigger mpo_nomad_events_1100_sheep_terrain_trigger = { + root.capital_province = { + OR = { + terrain = mountains + terrain = hills + terrain = drylands + } + } +} + +scripted_trigger mpo_nomad_events_1100_hunting_terrain_trigger = { + root.capital_province = { + OR = { + terrain = forest + terrain = taiga + terrain = wetlands + terrain = jungle + } + } +} + +scripted_trigger mpo_nomad_events_1100_horse_terrain_trigger = { + root.capital_province = { + OR = { + terrain = plains + terrain = steppe + terrain = floodplains + } + } +} + +scripted_trigger mpo_nomad_events_1100_laborer_trigger = { + is_available_ai_adult = yes + is_adult = yes + NOR = { + is_close_family_of = root + is_concubine_of = root + is_spouse_of = root + is_councillor_of = root + any_spouse = { + exists = root.house + house ?= root.house + } + } + is_knight = no + is_lowborn = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } +} + + +#Local terrain is good for certain type of animal +mpo_nomad_events.1100 = { + type = character_event + title = mpo_nomad_events.1100.t + desc = { + desc = mpo_nomad_events.1100.desc + first_valid = { + triggered_desc = { + trigger = { + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + desc = mpo_nomad_events.1100.desc.camel + } + triggered_desc = { + trigger = { + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + desc = mpo_nomad_events.1100.desc.sheep + } + triggered_desc = { + trigger = { + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + desc = mpo_nomad_events.1100.desc.hunting + } + desc = mpo_nomad_events.1100.desc.horses + } + } + theme = nomads + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:laborer + animation = survey_staff + camera = camera_event_right_forward + } + + trigger = { + age >= 4 + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_landed = yes + is_available = yes + capital_county = { + county_fertility >= 30 + county_fertility < 100 + NOT = { + any_county_province = { + OR = { + is_raided = yes + is_occupied = yes + } + } + } + } + OR = { + mpo_nomad_events_1100_camel_terrain_trigger = yes + mpo_nomad_events_1100_sheep_terrain_trigger = yes + mpo_nomad_events_1100_hunting_terrain_trigger = yes + mpo_nomad_events_1100_horse_terrain_trigger = yes + } + #Might feel weird if it's super snowy and wintery + OR = { + current_month < 11 + current_month > 2 + } + is_at_war = no + } + + cooldown = { + years = 10 + } + + immediate = { + capital_province = { + save_scope_as = capital_province + } + random_courtier = { + limit = { + mpo_nomad_events_1100_laborer_trigger = yes + } + save_scope_as = laborer + } + if = { + limit = { + NOT = { + exists = scope:laborer + } + } + random_pool_guest = { + limit = { + mpo_nomad_events_1100_laborer_trigger = yes + } + save_scope_as = laborer + } + } + if = { + limit = { + NOT = { + exists = scope:laborer + } + } + random_pool_character = { + province = root.capital_province + limit = { + mpo_nomad_events_1100_laborer_trigger = yes + } + save_scope_as = laborer + } + } + hidden_effect = { + if = { + limit = { + highest_held_title_tier >= tier_duchy + OR = { + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = architect + has_trait = administrator + has_trait = avaricious + } + } + if = { + limit = { + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + every_sub_realm_county = { + limit = { + any_county_province = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = oasis + } + } + } + add_to_list = realm_suitable_terrains + } + } + if = { + limit = { + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + every_sub_realm_county = { + limit = { + any_county_province = { + OR = { + terrain = mountains + terrain = hills + terrain = drylands + } + } + } + add_to_list = realm_suitable_terrains + } + } + if = { + limit = { + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + every_sub_realm_county = { + limit = { + any_county_province = { + OR = { + terrain = forest + terrain = taiga + terrain = wetlands + terrain = jungle + } + } + } + add_to_list = realm_suitable_terrains + } + } + else = { + every_sub_realm_county = { + limit = { + any_county_province = { + OR = { + terrain = steppe + terrain = plains + terrain = floodplains + } + } + } + add_to_list = realm_suitable_terrains + } + } + + } + } + } + + #Stewardship option + option = { + trigger = { + highest_held_title_tier >= tier_duchy + OR = { + has_trait = education_stewardship_3 + has_trait = education_stewardship_4 + has_trait = education_stewardship_5 + has_trait = architect + has_trait = administrator + has_trait = avaricious + } + } + name = mpo_nomad_events.1100.a + flavor = mpo_nomad_events.1100.a.flavor + if = { + limit = { + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + add_character_modifier = { + modifier = specialized_herds_modifier_camel + years = 10 + } + every_in_list = { + custom = custom.every_camel_terrain_county_tt + list = realm_suitable_terrains + custom_tooltip = major_county_fertility_gain_tt + hidden_effect = { + change_county_fertility = major_county_fertility_gain + } + } + } + else_if = { + limit = { + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + add_character_modifier = { + modifier = specialized_herds_modifier_sheep + years = 10 + } + every_in_list = { + custom = custom.every_sheep_terrain_county_tt + list = realm_suitable_terrains + custom_tooltip = medium_county_fertility_gain_tt + hidden_effect = { + change_county_fertility = medium_county_fertility_gain + } + } + } + else_if = { + limit = { + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + add_character_modifier = { + modifier = specialized_herds_modifier_hunting + years = 10 + } + every_in_list = { + custom = custom.every_hunting_terrain_county_tt + list = realm_suitable_terrains + custom_tooltip = medium_county_fertility_gain_tt + hidden_effect = { + change_county_fertility = medium_county_fertility_gain + } + } + } + else = { + add_character_modifier = { + modifier = specialized_herds_modifier_horses + years = 10 + } + every_in_list = { + custom = custom.every_horse_terrain_county_tt + list = realm_suitable_terrains + custom_tooltip = medium_county_fertility_gain_tt + hidden_effect = { + change_county_fertility = medium_county_fertility_gain + } + } + } + add_stewardship_lifestyle_xp = medium_lifestyle_xp + + + domicile = { + change_herd = medium_herd_loss + } + stress_impact = { + impatient = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_rationality = 0.5 + ai_energy = 0.5 + } + modifier = { + factor = 0.5 + NOT = { + has_lifestyle = stewardship_lifestyle + } + } + #Culture matches terrain + modifier = { + factor = 2 + OR = { + AND = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomad_events_1100_horse_terrain_trigger = yes + } + AND = { + mpo_nomads_hunting_culture_trigger = yes + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + AND = { + mpo_nomads_sheep_culture_trigger = yes + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + AND = { + mpo_nomads_camel_culture_trigger = yes + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + } + } + #Culture doesn't match terrain, but matches a different one + modifier = { + factor = 0.5 + NOR = { + AND = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomad_events_1100_horse_terrain_trigger = yes + } + AND = { + mpo_nomads_hunting_culture_trigger = yes + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + AND = { + mpo_nomads_sheep_culture_trigger = yes + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + AND = { + mpo_nomads_camel_culture_trigger = yes + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + } + OR = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomads_camel_culture_trigger = yes + mpo_nomads_sheep_culture_trigger = yes + mpo_nomads_hunting_culture_trigger = yes + } + } + modifier = { + factor = 0 + OR = { + has_trait = impatient + has_trait = lazy + domicile = { + herd < massive_herd_value + } + } + } + } + } + + #Eh I don't like it here + option = { + name = mpo_nomad_events.1100.b + + add_character_modifier = { + modifier = mpo_restless_for_migration_modifier + years = 2 + } + capital_county = { + change_county_fertility = medium_county_fertility_loss + } + + stress_impact = { + content = medium_stress_impact_gain + calm = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_rationality = -0.5 + } + #Culture matches terrain + modifier = { + factor = 0.5 + OR = { + AND = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomad_events_1100_horse_terrain_trigger = yes + } + AND = { + mpo_nomads_hunting_culture_trigger = yes + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + AND = { + mpo_nomads_sheep_culture_trigger = yes + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + AND = { + mpo_nomads_camel_culture_trigger = yes + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + } + } + #Culture doesn't match terrain, but matches a different one + modifier = { + factor = 2 + NOR = { + AND = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomad_events_1100_horse_terrain_trigger = yes + } + AND = { + mpo_nomads_hunting_culture_trigger = yes + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + AND = { + mpo_nomads_sheep_culture_trigger = yes + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + AND = { + mpo_nomads_camel_culture_trigger = yes + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + } + OR = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomads_camel_culture_trigger = yes + mpo_nomads_sheep_culture_trigger = yes + mpo_nomads_hunting_culture_trigger = yes + } + } + modifier = { + factor = 0 + OR = { + has_trait = content + has_trait = calm + has_trait = patient + } + } + } + } + + #We shall exploit this land to the fullest! + option = { + name = { + trigger = { + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + text = mpo_nomad_events.1100.c.camel + } + name = { + trigger = { + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + text = mpo_nomad_events.1100.c.sheep + } + name = { + trigger = { + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + text = mpo_nomad_events.1100.c.hunting + } + name = { + trigger = { + mpo_nomad_events_1100_horse_terrain_trigger = yes + } + text = mpo_nomad_events.1100.c.horse + } + + capital_county = { + change_county_fertility = medium_county_fertility_gain + } + #Camels flourishing + if = { + limit = { + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + add_character_modifier = { + modifier = mpo_bountiful_camels_modifier + years = 10 + } + } + #Sheep flourishing + else_if = { + limit = { + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + custom_tooltip = mpo_bountiful_sheep_cheaper_feasts_tt + add_character_modifier = { + modifier = mpo_bountiful_sheep_modifier + years = 10 + desc = mpo_bountiful_sheep_cheaper_feasts.desc + } + } + #Hunting is great + else_if = { + limit = { + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + custom_tooltip = mpo_bountiful_hunting_cheaper_hunts_tt + hidden_effect = { + add_character_modifier = { + modifier = mpo_bountiful_hunting_modifier + years = 10 + desc = mpo_bountiful_hunting_cheaper_hunts_desc + } + } + #Hunts are improved + if = { + limit = { + NOT = { + has_trait = lifestyle_hunter + } + } + random = { + chance = 60 + add_trait = lifestyle_hunter + } + } + else_if = { + limit = { + has_trait = lifestyle_hunter + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + add_trait_xp = { + trait = lifestyle_hunter + value = minor_trait_xp + track = falconer + } + add_trait_xp = { + trait = lifestyle_hunter + value = minor_trait_xp + track = hunter + } + } + else = { + add_trait_xp = { + trait = lifestyle_hunter + value = medium_trait_xp + track = falconer + } + } + } + #Horses flourishing + else = { + #Herd and cavalry modifier + add_character_modifier = { + modifier = mpo_bountiful_horses_modifier + years = 10 + } + } + stress_impact = { + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + #Culture matches terrain + modifier = { + factor = 2 + OR = { + AND = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomad_events_1100_horse_terrain_trigger = yes + } + AND = { + mpo_nomads_hunting_culture_trigger = yes + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + AND = { + mpo_nomads_sheep_culture_trigger = yes + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + AND = { + mpo_nomads_camel_culture_trigger = yes + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + } + } + #Culture doesn't match terrain, but matches a different one + modifier = { + factor = 0.5 + NOR = { + AND = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomad_events_1100_horse_terrain_trigger = yes + } + AND = { + mpo_nomads_hunting_culture_trigger = yes + mpo_nomad_events_1100_hunting_terrain_trigger = yes + } + AND = { + mpo_nomads_sheep_culture_trigger = yes + mpo_nomad_events_1100_sheep_terrain_trigger = yes + } + AND = { + mpo_nomads_camel_culture_trigger = yes + mpo_nomad_events_1100_camel_terrain_trigger = yes + } + } + OR = { + mpo_nomads_horse_culture_trigger = yes + mpo_nomads_camel_culture_trigger = yes + mpo_nomads_sheep_culture_trigger = yes + mpo_nomads_hunting_culture_trigger = yes + } + } + modifier = { + factor = 0 + has_trait = stubborn + } + } + } +} + +scripted_trigger mpo_nomad_events_1110_fishing_culture_trigger = { + culture = { + OR = { + has_cultural_tradition = tradition_fp1_coastal_warriors + has_cultural_tradition = tradition_maritime_mercantilism + has_cultural_tradition = tradition_polders + has_cultural_tradition = tradition_wetlanders + has_cultural_tradition = tradition_fishermen + has_cultural_tradition = tradition_seafaring + has_cultural_tradition = tradition_fp1_coastal_warriors + has_cultural_tradition = tradition_practiced_pirates + } + } +} + +scripted_trigger mpo_nomad_events_1110_char_trigger = { + is_available_ai_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } +} + +#Your capital is next to a lake where locals fish +mpo_nomad_events.1110 = { + type = character_event + title = mpo_nomad_events.1110.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root.capital_county = { + is_riverside_county = yes + NOR = { + is_coastal_county = yes + is_lakeside_county = yes + } + } + } + desc = mpo_nomad_events.1110.desc_river + } + triggered_desc = { + trigger = { + root.capital_county = { + is_coastal_county = yes + } + } + desc = mpo_nomad_events.1110.desc_sea + } + desc = mpo_nomad_events.1110.desc_lake + } + desc = mpo_nomad_events.1110.desc + } + theme = nomads + override_background = { + trigger = { + root.capital_county = { + OR = { + is_coastal_county = yes + is_lakeside_county = yes + } + } + } + reference = bp3_coast + } + override_background = { + trigger = { + root.capital_county = { + is_riverside_county = yes + NOR = { + is_coastal_county = yes + is_lakeside_county = yes + } + } + } + reference = bp3_riverside + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + mpo_nomad_events_1110_fishing_culture_trigger = yes + } + animation = jockey_victory + } + triggered_animation = { + trigger = { + mpo_nomad_events_1110_fishing_culture_trigger = no + } + animation = horse_archer_idle + } + camera = camera_event_horse_left_forward + } + right_portrait = { + character = scope:laborer + animation = throne_room_cheer_2 + camera = camera_event_right_pointing_left + } + + trigger = { + age >= 10 + government_has_flag = government_is_nomadic + is_landed = yes + has_mpo_dlc_trigger = yes + is_available = yes + capital_county = { + NOT = { + any_county_province = { + OR = { + is_raided = yes + is_occupied = yes + } + } + } + OR = { + is_coastal_county = yes + is_riverside_county = yes + is_lakeside_county = yes + } + } + #Might feel weird if it's super snowy and wintery + OR = { + current_month < 11 + current_month > 2 + } + is_at_war = no + } + + cooldown = { + years = 10 + } + + immediate = { + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + capital_province = { + save_scope_as = capital_province + } + random_courtier = { + limit = { + mpo_nomad_events_1110_char_trigger = yes + } + save_scope_as = laborer + } + if = { + limit = { + NOT = { + exists = scope:laborer + } + } + random_pool_guest = { + limit = { + mpo_nomad_events_1110_char_trigger = yes + } + save_scope_as = laborer + } + } + if = { + limit = { + NOT = { + exists = scope:laborer + } + } + random_pool_character = { + province = root.capital_province + limit = { + mpo_nomad_events_1110_char_trigger = yes + } + save_scope_as = laborer + } + } + every_held_county = { + limit = { + is_landless_type_title = no + OR = { + is_coastal_county = yes + is_riverside_county = yes + is_lakeside_county = yes + } + } + add_to_list = fishing_counties + } + } + #Special unlock + option = { + trigger = { + mpo_nomad_events_1110_fishing_culture_trigger = yes + } + name = { + trigger = { + NOT = { + domicile = { + has_domicile_building_or_higher = fishing_yurt_01 + } + } + } + text = mpo_nomad_events.1110.a + } + name = { + trigger = { + domicile = { + has_domicile_building_or_higher = fishing_yurt_01 + } + } + text = mpo_nomad_events.1110.a_repeat + } + add_internal_flag = special + custom_tooltip = maritime_tradition_unlock_tt + + every_in_list = { + custom = custom.every_fishing_county_tt + list = fishing_counties + custom_tooltip = major_county_fertility_gain_tt + hidden_effect = { + change_county_fertility = major_county_fertility_gain + } + } + if = { + limit = { + NOR = { + has_character_flag = nomad_unlocked_fishing_yurt_flag + domicile = { + has_domicile_building_or_higher = fishing_yurt_01 + } + } + } + add_character_flag = nomad_unlocked_fishing_yurt_flag + custom_tooltip = nomad_unlocked_fishing_yurt_flag_tt + } + else_if = { + limit = { + domicile = { + has_domicile_building_or_higher = fishing_yurt_01 + } + } + add_gold = fishing_counties_gold_value + custom_tooltip = fishing_counties_gold_scaling + } + + stress_impact = { + } + ai_chance = { + base = 300 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + #i'll drown the man who gets off his horse to fish + option = { + name = mpo_nomad_events.1110.b + + add_prestige = minor_prestige_gain + domicile = { + change_herd = minor_herd_gain + } + every_in_list = { + custom = custom.every_fishing_county_tt + list = fishing_counties + custom_tooltip = minor_county_fertility_loss_tt + hidden_effect = { + change_county_fertility = minor_county_fertility_loss + } + } + stress_impact = { + stubborn = miniscule_stress_impact_loss + calm = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = humble + } + } + } + } + #Cool, let's rake in the fish + option = { + name = mpo_nomad_events.1110.c + add_gold = fishing_counties_gold_value + custom_tooltip = fishing_counties_gold_scaling + every_in_list = { + custom = custom.every_fishing_county_tt + list = fishing_counties + custom_tooltip = minor_county_fertility_gain_tt + hidden_effect = { + change_county_fertility = minor_county_fertility_gain + } + } + stress_impact = { + stubborn = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_zeal = -0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = stubborn + has_trait = arrogant + } + } + } + } +} + +scripted_trigger mpo_nomad_events_1120_warrior_trigger = { + is_available_ai_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } +} + +#Wolves threaten the animals +mpo_nomad_events.1120 = { + type = character_event + title = mpo_nomad_events.1120.t + desc = mpo_nomad_events.1120.desc + theme = nomads + override_background = { + reference = mpo_steppe_evening + } + left_portrait = { + character = root + animation = horse_sword_shield + camera = camera_event_horse_very_left + } + right_portrait = { + character = scope:warrior + animation = jockey_gallop + camera = camera_event_horse_right_facing_left + } + + trigger = { + age >= 10 + government_has_flag = government_is_nomadic + is_landed = yes + has_mpo_dlc_trigger = yes + is_available = yes + capital_county = { + NOT = { + any_county_province = { + OR = { + is_raided = yes + is_occupied = yes + } + } + } + AND = { + exists = root.location.county + this = root.location.county + } + } + is_at_war = no + is_pregnant = no + NOT = { + has_trait = infirm + } + + OR = { + current_month >= 10 + current_month <= 3 + } + location_has_harsh_winter_trigger = yes + } + + weight_multiplier = { + base = 1 + modifier = { + add = 3 + any_character_situation = { + 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 + } + } + } + } + } + + cooldown = { + years = 10 + } + + immediate = { + capital_province = { + save_scope_as = capital_province + } + capital_county = { + save_scope_as = capital_county + } + random_knight = { + limit = { + mpo_nomad_events_1120_warrior_trigger = yes + } + save_scope_as = warrior + } + if = { + limit = { + NOT = { + exists = scope:warrior + } + } + random_courtier = { + limit = { + mpo_nomad_events_1120_warrior_trigger = yes + } + save_scope_as = warrior + } + } + } + #I have more than enough riders to deal with this... + option = { + name = mpo_nomad_events.1120.a + flavor = mpo_nomad_events.1120.a.flavor + trigger = { + OR = { + domicile = { + herd > monumental_herd_value_static + } + max_military_strength >= 4000 + } + } + add_internal_flag = special + + root.capital_county = { + change_county_fertility = minor_county_fertility_gain + } + + stress_impact = { + humble = miniscule_stress_impact_gain + } + ai_chance = { + base = 200 + ai_value_modifier = { + ai_energy = -0.5 + } + modifier = { + factor = 0 + has_trait = humble + } + } + } + + #Ride swiftly + option = { + name = mpo_nomad_events.1120.b + + duel = { + skill = prowess + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + modifier = { + add = 15 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 10 + track = horse + } + } + modifier = { + add = 30 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 30 + track = horse + } + } + modifier = { + add = 15 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 50 + track = horse + } + } + modifier = { + add = 30 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 65 + track = horse + } + } + modifier = { + add = 15 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 85 + track = horse + } + } + modifier = { + add = 50 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 100 + track = horse + } + } + desc = mpo_nomad_events.1120.b.success + send_interface_toast = { + type = event_toast_effect_good + title = mpo_nomad_events.1120.b.success + left_icon = root + + if = { + limit = { + has_dlc_feature = tours_and_tournaments + } + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = horse + value = 10 + } + } + add_prestige = minor_prestige_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + desc = mpo_nomad_events.1120.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_nomad_events.1120.b.failure + domicile = { + change_herd = minor_herd_loss + } + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = lazy + } + } + } + } + #Arrows! Arrows! + option = { + name = mpo_nomad_events.1120.c + + duel = { + skill = martial + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -49 + } + modifier = { + add = 15 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 10 + track = bow + } + } + modifier = { + add = 30 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 30 + track = bow + } + } + modifier = { + add = 15 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 50 + track = bow + } + } + modifier = { + add = 30 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 65 + track = bow + } + } + modifier = { + add = 15 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 85 + track = bow + } + } + modifier = { + add = 50 + has_trait = tourney_participant + has_trait_xp = { + trait = tourney_participant + value >= 100 + track = bow + } + } + desc = mpo_nomad_events.1120.c.success + send_interface_toast = { + type = event_toast_effect_good + title = mpo_nomad_events.1120.c.success + left_icon = root + + if = { + limit = { + has_dlc_feature = tours_and_tournaments + } + if = { + limit = { + NOT = { + has_trait = tourney_participant + } + } + add_trait = tourney_participant + } + add_trait_xp = { + trait = tourney_participant + track = bow + value = 10 + } + } + add_gold = minor_gold_value + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -49 + } + desc = mpo_nomad_events.1120.c.failure + send_interface_toast = { + type = event_toast_effect_bad + title = mpo_nomad_events.1120.c.failure + left_icon = root + domicile = { + change_herd = minor_herd_loss + } + } + } + } + stress_impact = { + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + ai_energy = 0.5 + } + modifier = { + factor = 0 + has_trait = patient + } + } + } + + #So what? A few sick animals die. The wolves deserve this + option = { + name = mpo_nomad_events.1120.d + flavor = mpo_nomad_events.1120.d.flavor + + add_piety = medium_piety_gain + domicile = { + change_herd = minor_herd_loss + } + stress_impact = { + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_vengefulness = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = vengeful + has_trait = wrathful + } + } + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_nomads_blood_brothers_windy.txt b/N3OW/events/dlc/mpo/mpo_nomads_blood_brothers_windy.txt new file mode 100644 index 00000000..a2280995 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_nomads_blood_brothers_windy.txt @@ -0,0 +1,131 @@ +namespace = mpo_bb_events + +############################ +## Nomadic blood brother events +## 0001-0099 +## By Alexander Windahl +############################ + +mpo_bb_events.0001 = { + type = character_event + title = mpo_bb_events.0001.t + desc = mpo_bb_events.0001.desc + theme = nomads + cooldown = { years = 15 } + + left_portrait = { + character = root + animation = stayback + } + + right_portrait = { + character = scope:my_blood_brother + animation = aggressive_unarmed + } + + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_ally = { + has_relation_blood_brother = root + is_available_ai_adult = yes + } + } + + immediate = { + random_ally = { + limit = { + has_relation_blood_brother = root + is_available_ai_adult = yes + } + save_scope_as = my_blood_brother + } + } + + option = { + ai_chance = { + base = 100 + } + name = mpo_bb_events.0001.a + + duel = { + skill = prowess + target = scope:my_blood_brother + # You win + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = mpo_bb_events.0001.a.tt_success + send_interface_toast = { + title = mpo_bb_events.0001.a.tt_success + left_icon = scope:my_blood_brother + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:my_blood_brother + modifier = impressed_opinion + opinion = 30 + } + } + } + # You lose + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = mpo_bb_events.0001.a.tt_failure + send_interface_toast = { + title = mpo_bb_events.0001.a.tt_failure + left_icon = scope:my_blood_brother + add_prestige = miniscule_prestige_loss + reverse_add_opinion = { + target = scope:my_blood_brother + modifier = amused_opinion + opinion = 10 + } + } + } + } + } + + option = { + ai_chance = { + base = 100 + } + name = mpo_bb_events.0001.b + add_dread = minor_dread_loss + + reverse_add_opinion = { + target = scope:my_blood_brother + modifier = softening_disposition_opinion + opinion = 5 + } + } + + option = { + ai_chance = { + base = 100 + } + name = mpo_bb_events.0001.c + add_dread = minor_dread_gain + + + stress_impact = { + callous = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + eccentric = miniscule_stress_impact_loss + } + + reverse_add_opinion = { + target = scope:my_blood_brother + modifier = angry_opinion + opinion = -30 + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_nomads_flavour_events.txt b/N3OW/events/dlc/mpo/mpo_nomads_flavour_events.txt new file mode 100644 index 00000000..d51abc96 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_nomads_flavour_events.txt @@ -0,0 +1,5743 @@ +namespace = nomad_events + +## Veronica Pazos +## Ill-Advised event chain - nomad_events.0001-0099 +## Not My Flock - nomad_events.0100 +## Cornered - nomad_events.0110 +## Evening Ride - nomad_events.0120 +## A Good Deal - nomad_events.0130 +## Far From Home - nomad_events.0140 +## One More Drink - nomad_events.0150 +## A Nice Word - nomad_events.0160 +## Dreaded One - nomad_events.0170 +## The Weakest Link - nomad_events.0180 +## Back When - nomad_events.0190 +## In My Dreams - nomad_events.0200 +## Nothing but Roots - nomad_events.0210 +## Weak Is the Arm - nomad_events.0220 +## Homesick - nomad_events.0230 +## Unexpected Guests - nomad_events.0240 +## Man of God - nomad_events.0250 + +############################ +## Ill-Advised +## 0001-0099 +############################ + +# nomad_events.0001 - Your Councillor is too good at their job, someone is jealous +# nomad_events.0002 - Achmach comes back to you - why did you fire me? +# nomad_events.0003 - Second courtier complains about Achmach +# nomad_events.0004 - Letter event - Achmach thanks you for trusting/rehiring him +# nomad_events.0005 - Letter event - Someone warns you about a plot at court +# nomad_events.0006 - Interrogation event - Ask Achmach and the courtiers if they know something +# nomad_events.0007 - You see Achmach doing something sus at night +# nomad_events.0008 - You discover what he was doing -- He was trying to protect you! +# nomad_events.0009 - You discover what he was doing -- He was trying to murder you! +# nomad_events.0010 - You fail to discover what he was doing -- Someone tries to murder you! + +# Your Councillor is too good at their job, someone is jealous +scripted_trigger is_valid_nomad_events_0001_councillor = { + is_courtier_or_knight_of_root = yes #someone that is not just going to leave your camp + is_ruler = no #ditto + kurultai_is_skilled_trigger = { EMPLOYER = root } + NOR = { + 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 = { + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + NOR = { + has_trait = compassionate + has_trait = content + has_trait = humble + } +} + +scripted_effect fire_achmach_effect = { + fire_councillor = scope:achmach_scope + custom_tooltip = achmach_firing_tt + scope:achmach_scope = { + block_hiring_councillor_effect = { COURT_OWNER = root } + } + if = { + limit = { + has_relation_potential_lover = scope:achmach_scope + } + remove_relation_potential_lover = scope:achmach_scope + } + if = { + limit = { + has_relation_lover = scope:achmach_scope + } + remove_relation_lover = scope:achmach_scope + } + if = { + limit = { + has_relation_soulmate = scope:achmach_scope + } + remove_relation_soulmate = scope:achmach_scope + } + if = { + limit = { + has_relation_potential_friend = scope:achmach_scope + } + remove_relation_potential_friend = scope:achmach_scope + } + if = { + limit = { + has_relation_friend = scope:achmach_scope + } + remove_relation_friend = scope:achmach_scope + } + if = { + limit = { + has_relation_best_friend = scope:achmach_scope + } + remove_relation_best_friend = scope:achmach_scope + } +} + +nomad_events.0001 = { + type = character_event + title = nomad_events.0001.t + desc = nomad_events.0001.desc + theme = intrigue + override_background = { reference = mpo_campfire_steppe } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + has_trait = arrogant + } + } + animation = dismissal + } + animation = worry + } + right_portrait = { + character = scope:jealous_courtier + animation = anger + } + lower_center_portrait = scope:achmach_scope + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + exists = situation:the_great_steppe + any_character_situation = { + this = situation:the_great_steppe + } + NOT = { has_variable = had_ill_advised_event_chain_var } + is_available_adult = yes + any_councillor = { + is_valid_nomad_events_0001_councillor = yes + save_temporary_scope_as = achmach_scope_temp + } + any_courtier = { + is_valid_nomad_events_0001_courtier = yes + NOT = { this = scope:achmach_scope_temp } + opinion = { + target = scope:achmach_scope_temp + value <= 50 + } + } + } + + immediate = { + set_variable = had_ill_advised_event_chain_var + random_councillor = { + limit = { + is_valid_nomad_events_0001_councillor = yes + } + weight = { + base = 1 + modifier = { + factor = 2 + intrigue >= high_skill_rating + } + modifier = { + add = 1 + OR = { + has_trait = deceitful + has_trait = disloyal + has_trait = ambitious + } + } + } + save_scope_as = achmach_scope + } + scope:achmach_scope = { + switch = { + trigger = has_council_position + councillor_spymaster = { + scope:achmach_scope = { + set_variable = { + name = council_position_var + value = flag:spymaster + } + } + } + councillor_kurultai_1 = { + scope:achmach_scope = { + set_variable = { + name = council_position_var + value = flag:kurultai_1 + } + } + } + councillor_kurultai_2 = { + scope:achmach_scope = { + set_variable = { + name = council_position_var + value = flag:kurultai_2 + } + } + } + councillor_kurultai_3 = { + scope:achmach_scope = { + set_variable = { + name = council_position_var + value = flag:kurultai_3 + } + } + } + councillor_kurultai_4 = { + scope:achmach_scope = { + set_variable = { + name = council_position_var + value = flag:kurultai_4 + } + } + } + } + } + random_courtier = { + limit = { + is_valid_nomad_events_0001_courtier = yes + NOT = { this = scope:achmach_scope } + opinion = { + target = scope:achmach_scope + value <= 50 + } + } + weight = { + base = 1 + modifier = { + factor = 2 + is_councillor_of = root + } + modifier = { + add = 5 + OR = { + has_trait = callous + has_trait = wrathful + has_trait = ambitious + } + } + } + save_scope_as = jealous_courtier + } + # Are they going to be guilty during this event chain? Randomize for replaybility + random_list = { + 60 = { + modifier = { + scope:achmach_scope = { + is_obedient_to = root + } + add = 15 + } + modifier = { + scope:achmach_scope = { + has_any_good_relationship_with_root_trigger = yes + } + add = 15 + } + modifier = { + scope:achmach_scope = { + OR = { + has_trait = honest + has_trait = loyal + has_trait = content + has_trait = humble + } + } + add = 10 + } + scope:achmach_scope = { + set_variable = { + name = achmach_loyalty + value = flag:yes + } + } + } + 40 = { + modifier = { + scope:achmach_scope = { + is_obedient_to = root + } + add = 15 + } + modifier = { + scope:achmach_scope = { + has_any_bad_relationship_with_root_trigger = yes + } + add = 15 + } + modifier = { + scope:achmach_scope = { + OR = { + has_trait = deceitful + has_trait = ambitious + has_trait = disloyal + } + } + add = 10 + } + scope:achmach_scope = { + set_variable = { + name = achmach_loyalty + value = flag:no + } + } + } + } + hidden_effect = { + scope:jealous_courtier = { + set_relation_grudge = { + target = scope:achmach_scope + reason = grudge_too_good + } + } + } + } + + option = { # You're right, I'm firing them + name = nomad_events.0001.a + fire_achmach_effect = yes + scope:jealous_courtier = { + if = { + limit = { is_councillor_of = root } + councillor_increase_relevant_skill_effect = yes + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + hidden_effect = { + trigger_event = { + id = nomad_events.0002 + days = { 25 30 } + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + trusting = major_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 2 + } + modifier = { + OR = { + has_trait = trusting + has_trait = gregarious + } + factor = 0 + } + } + } + + option = { # You're clearly just jealous + name = nomad_events.0001.b + scope:jealous_courtier = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + hidden_effect = { + trigger_event = { + id = nomad_events.0003 + days = { 25 30 } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 0 + } + modifier = { + has_trait = trusting + factor = 2 + } + } + } +} + +# Achmach comes back to you - why did you fire me? +scripted_effect nomad_events_0002_rehire_achmach_effect = { + scope:achmach_scope = { + remove_variable ?= block_hire_councillor + switch = { + trigger = var:council_position_var + flag:spymaster = { + root = { + assign_councillor_type = { + type = councillor_spymaster + remove_existing_councillor = yes + target = scope:achmach_scope + } + } + } + flag:kurultai_1 = { + root = { + assign_councillor_type = { + type = councillor_kurultai_1 + remove_existing_councillor = yes + target = scope:achmach_scope + } + } + } + flag:kurultai_2 = { + root = { + assign_councillor_type = { + type = councillor_kurultai_2 + remove_existing_councillor = yes + target = scope:achmach_scope + } + } + } + flag:kurultai_3 = { + root = { + assign_councillor_type = { + type = councillor_kurultai_3 + remove_existing_councillor = yes + target = scope:achmach_scope + } + } + } + flag:kurultai_4 = { + root = { + assign_councillor_type = { + type = councillor_kurultai_4 + remove_existing_councillor = yes + target = scope:achmach_scope + } + } + } + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } +} + +nomad_events.0002 = { + type = character_event + title = nomad_events.0002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:achmach_scope = { + OR = { + has_trait = humble + has_trait = calm + has_trait = content + has_trait = deceitful + has_trait = temperate + } + } + } + desc = nomad_events.0002.desc.calm + } + triggered_desc = { + trigger = { + scope:achmach_scope = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = callous + has_trait = vengeful + } + } + } + desc = nomad_events.0002.desc.angry + } + desc = nomad_events.0002.desc.fallback + } + desc = nomad_events.0002.desc.outro + } + theme = intrigue + override_background = { reference = mpo_campfire_steppe } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + } + } + animation = stunned + } + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + has_trait = callous + } + } + animation = dismissal + } + animation = worry + } + right_portrait = { + character = scope:achmach_scope + triggered_animation = { + trigger = { + OR = { + has_trait = humble + has_trait = content + has_trait = deceitful + has_trait = temperate + } + } + animation = disappointed + } + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = callous + has_trait = vengeful + } + } + animation = anger + } + animation = disbelief + } + lower_center_portrait = { + trigger = { scope:jealous_courtier = { is_courtier_or_knight_of_root = yes } } + character = scope:jealous_courtier + } + + trigger = { + # Achmach is still around + scope:achmach_scope = { + is_courtier_or_knight_of_root = yes + } + NOT = { has_variable = had_nomad_events_0002_var } + } + + immediate = { + set_variable = had_nomad_events_0002_var + } + + option = { #Rehire him + name = nomad_events.0002.a + #Rehire them to the position they had earlier + nomad_events_0002_rehire_achmach_effect = yes + if = { + limit = { + scope:jealous_courtier = { is_courtier_or_knight_of_root = yes } + } + scope:jealous_courtier = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -10 + } + } + } + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = nomad_events.0003 + days = { 25 30 } + } + } + } + hidden_effect = { + trigger_event = { + id = nomad_events.0004 + days = { 12 15 } + } + } + set_variable = rehired_achmach_var + stress_impact = { + paranoid = medium_stress_impact_gain + trusting = medium_stress_impact_loss + forgiving = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 0 + } + modifier = { + OR = { + has_trait = trusting + has_trait = forgiving + } + factor = 2 + } + } + } + + option = { # Go away + name = nomad_events.0002.b + scope:achmach_scope = { + progress_towards_rival_effect = { + CHARACTER = root + OPINION = -30 + REASON = rival_fired_from_council + } + } + hidden_effect = { + trigger_event = { + id = nomad_events.0005 + days = { 25 30 } + } + } + stress_impact = { + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = forgiving + factor = 0 + } + } + } +} + +# Another courtier accuses Achmach of the same +scripted_trigger is_valid_nomad_events_0003_courtier = { + is_available_ai_adult = yes + NOT = { + this = scope:achmach_scope + } + NOT = { has_any_good_relationship_with_character_trigger = { CHARACTER = scope:achmach_scope } } + trigger_if = { + limit = { + scope:jealous_courtier = { is_courtier_or_knight_of_root = yes } + } + NOT = { this = scope:jealous_courtier } + } +} + +nomad_events.0003 = { + type = character_event + title = nomad_events.0003.t + desc = { + desc = nomad_events.0003.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_variable = rehired_achmach_var + } + desc = nomad_events.0003.desc.rehired + } + desc = nomad_events.0003.desc.not_rehired + } + desc = nomad_events.0003.desc.outro + } + theme = intrigue + override_background = { reference = mpo_campfire_steppe } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + has_trait = arrogant + has_trait = callous + has_trait = lustful + has_trait = rakish + } + } + animation = laugh + } + animation = stunned + } + right_portrait = { + character = scope:jealous_courtier_2 + animation = anger + } + lower_center_portrait = scope:achmach_scope + + trigger = { + # Achmach is still around + scope:achmach_scope = { + is_courtier_or_knight_of_root = yes + } + any_courtier_or_guest = { + is_valid_nomad_events_0003_courtier = yes + } + NOT = { has_variable = had_nomad_events_0003_var } + } + + immediate = { + set_variable = had_nomad_events_0003_var + random_courtier_or_guest = { + limit = { is_valid_nomad_events_0003_courtier = yes } + weight = { + base = 1 + modifier = { + factor = 2 + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:achmach_scope } + } + modifier = { + add = 5 + OR = { + has_trait = callous + has_trait = wrathful + has_trait = ambitious + } + } + } + save_scope_as = jealous_courtier_2 + } + dummy_attracted_gender_effect = { TARGET = scope:achmach_scope } + hidden_effect = { + if = { + limit = { + scope:jealous_courtier_2 = { + can_set_relation_grudge_trigger = { CHARACTER = scope:achmach_scope } + } + } + scope:jealous_courtier_2 = { + set_relation_grudge = { + target = scope:achmach_scope + reason = grudge_too_good + } + } + } + } + } + + option = { # I would also flee to their arms + name = nomad_events.0003.a + add_internal_flag = special + trigger = { + NOT = { has_relation_lover = scope:achmach_scope } + is_attracted_to_gender_of = scope:achmach_scope + scope:achmach_scope = { + is_attracted_to_gender_of = root + } + can_start_scheme = { + type = seduce + target_character = scope:achmach_scope + } + } + start_scheme = { + type = seduce + target_character = scope:achmach_scope + } + custom_tooltip = nomad_events_0003_a_tt + random_scheme = { + limit = { + scheme_type = seduce + scheme_target_character = scope:achmach_scope + } + add_scheme_progress = 5 + add_scheme_modifier = { + type = extra_success_chance_modifier + } + } + stress_impact = { + lustful = massive_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + might_cheat_on_every_partner_trigger = yes + has_lustful_adjacent_trait_trigger = yes + factor = 2 + } + } + } + + option = { # Ayo, this is getting out of hand + name = nomad_events.0003.b + custom_tooltip = nomad_events_0003_b_tt + add_dread = minor_dread_loss + add_character_modifier = { + modifier = mpo_assertion_modifier + years = 5 + } + fire_achmach_effect = yes + scope:jealous_courtier_2 = { + if = { + limit = { is_councillor_of = root } + councillor_increase_relevant_skill_effect = yes + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + hidden_effect = { + trigger_event = { + id = nomad_events.0002 + days = { 12 20 } + } + } + stress_impact = { + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = trusting + factor = 0 + } + } + } + + option = { # Nonsense, I trust this person + name = nomad_events.0003.c + add_legitimacy_effect = { LEGITIMACY = minor_legitimacy_loss } + scope:jealous_courtier_2 = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -15 + } + } + hidden_effect = { + trigger_event = { + id = nomad_events.0004 + days = { 12 20 } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 0 + } + } + } + + after = { + hidden_effect = { + trigger_event = { + id = nomad_events.0005 + days = { 25 30 } + } + } + } +} + +# Letter event - Achmach thanks you for trusting/rehiring him +nomad_events.0004 = { + type = letter_event + opening = { + desc = nomad_events.0004.opening + } + desc = nomad_events.0004.desc + sender = scope:achmach_scope + + trigger = { + # Achmach is still around + scope:achmach_scope = { + is_courtier_or_knight_of_root = yes + } + NOT = { + has_variable = had_nomad_events_0004_var + } + } + + immediate = { + set_variable = had_nomad_events_0004_var + } + + option = { # So nice of them + name = nomad_events.0004.a + add_gold = minor_gold_value + hidden_effect = { + trigger_event = { + id = nomad_events.0005 + days = { 25 30 } + } + } + } +} + +# Letter event - Someone warns you about a plot at court +nomad_events.0005 = { + type = character_event + window = anonymous_letter_event + title = debug.0002.t + desc = nomad_events.0005.desc + theme = intrigue + + trigger = { + # Achmach is still around + scope:achmach_scope = { + is_courtier_or_knight_of_root = yes + } + NOT = { has_variable = had_nomad_events_0005_var } + } + + immediate = { + set_variable = had_nomad_events_0005_var + scope:achmach_scope ?= { save_scope_as = achmach_scope } + scope:jealous_courtier ?= { save_scope_as = jealous_courtier } + scope:jealous_courtier_2 ?= { save_scope_as = jealous_courtier_2 } + } + + option = { # Damn, that's bad + name = nomad_events.0005.a + if = { + limit = { + exists = scope:jealous_courtier_2 + } + custom_tooltip = nomad_events_0005_tt + } + else = { + custom_tooltip = nomad_events_0005_tt_only_one + } + set_variable = can_interrogate_var + # This triggers a Current Situation advice, and the Interrogate Scheme + if = { + limit = { + scope:achmach_scope = { is_alive = yes } + } + scope:achmach_scope = { + add_to_variable_list = { + name = valid_to_interrogate_var + target = root + } + } + } + if = { + limit = { + scope:jealous_courtier = { is_alive = yes } + } + scope:jealous_courtier = { + set_variable = jealous_courtier_var + add_to_variable_list = { + name = valid_to_interrogate_var + target = root + } + } + } + if = { + limit = { + exists = scope:jealous_courtier_2 + scope:jealous_courtier_2 = { is_alive = yes } + } + scope:jealous_courtier_2 = { + add_to_variable_list = { + name = valid_to_interrogate_var + target = root + } + } + } + stress_impact = { + base = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + +# Interrogation event - Ask Achmach and the courtiers if they know something +nomad_events.0006 = { + type = character_event + title = nomad_events.0006.t + desc = { + first_valid = { + triggered_desc = { + trigger = { # Are they the Achmach character? + scope:recipient = { has_variable = achmach_loyalty } + } + desc = nomad_events.0006.desc.achmach + } + triggered_desc = { + trigger = { + scope:recipient = { has_variable = jealous_courtier_var } + } + desc = nomad_events.0006.desc.courtier + } + desc = nomad_events.0006.desc.courtier_2 + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = forgiving + has_trait = calm + has_trait = craven + } + } + desc = nomad_events.0006.desc.calm + } + desc = nomad_events.0006.desc.fallback + } + first_valid = { + triggered_desc = { + trigger = { # Are they the Achmach character? + scope:recipient = { has_variable = achmach_loyalty } + } + desc = nomad_events.0006.desc.achmach_outro + } + triggered_desc = { + trigger = { + scope:recipient = { has_variable = jealous_courtier_var } + } + desc = nomad_events.0006.desc.courtier_outro + } + desc = nomad_events.0006.desc.courtier_outro_2 + } + } + theme = intrigue + override_background = { reference = mpo_tent_interior_mongol } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = trusting + has_trait = compassionate + has_trait = forgiving + } + } + animation = interested + } + animation = disapproval + } + right_portrait = { + character = scope:recipient + triggered_animation = { + trigger = { + scope:recipient = { has_variable = achmach_loyalty } + } + animation = schadenfreude + } + animation = shock + } + + immediate = { + scope:recipient = { + remove_list_variable = { + name = valid_to_interrogate_var + target = root + } + assign_quirk_effect = yes + } + if = { + limit = { + scope:recipient = { has_variable = achmach_loyalty } + } + scope:recipient = { save_scope_as = achmach_scope } + } + else = { + random_courtier_or_guest = { + limit = { has_variable = achmach_loyalty } + save_scope_as = achmach_scope + } + } + } + + option = { # If you are a torturer you can use that + name = nomad_events.0006.a + trigger = { + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + add_intrigue_lifestyle_xp = minor_lifestyle_xp + add_dread = major_dread_gain + set_nickname_effect = { NICKNAME = nick_the_flayer } + scope:recipient = { + progress_towards_rival_effect = { + CHARACTER = root + OPINION = -30 + REASON = rival_tortured_me + } + } + stress_impact = { + torturer = major_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = torturer + factor = 2 + } + modifier = { + has_trait = compassionate + factor = 0 + } + } + } + + option = { # If you are a witch/mystic you can identify this as black magic + name = nomad_events.0006.b + trigger = { + OR = { + has_trait = witch + has_trait = lifestyle_mystic + } + } + add_learning_lifestyle_xp = minor_lifestyle_xp + + stress_impact = { + witch = medium_stress_impact_loss + lifestyle_mystic = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = witch + has_trait = lifestyle_mystic + } + factor = 0 + } + } + } + + option = { # Find out if the courtier is nervous about something + name = nomad_events.0006.b + trigger = { + scope:recipient = { + NOT = { has_variable = achmach_loyalty } + } + } + duel = { + skills = { diplomacy intrigue } + target = scope:recipient + 50 = { # If you succeed you notice why they're nervous (they actually saw Achmach, or they are just jealous) + desc = nomad_events.0006.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + scope:achmach_scope = { + switch = { + trigger = var:achmach_loyalty + flag:yes = { + custom_tooltip = nomad_events_0006_c_success_info + root = { + hidden_effect = { + send_interface_toast = { + title = nomad_events.0006.c.success + right_icon = scope:recipient + custom_tooltip = nomad_events_0006_c_success_loyal + } + } + } + } + flag:no = { + custom_tooltip = nomad_events_0006_c_success_info + root = { + hidden_effect = { + send_interface_toast = { + title = nomad_events.0006.c.success + right_icon = scope:recipient + custom_tooltip = nomad_events_0006_c_success_disloyal + } + } + } + } + } + } + } + 50 = { + desc = nomad_events.0006.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = nomad_events.0006.c.failure + right_icon = scope:achmach_scope + add_stress = minor_stress_gain + } + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 2 + } + modifier = { + has_trait = trusting + factor = 0 + } + } + } + + option = { # Achmach offers to kill your enemies + name = nomad_events.0006.d + trigger = { + scope:recipient = { has_variable = achmach_loyalty } + } + custom_tooltip = nomad_events_0006_d_tt + set_variable = achmach_murder_help_var + scope:achmach_scope = { + set_variable = achmach_murder_help_councillor_var + } + stress_impact = { + ambitious = medium_stress_impact_loss + deceitful = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = ambitious + has_trait = deceitful + } + factor = 2 + } + modifier = { + has_trait = compassionate + factor = 0 + } + } + } + + option = { # Imprison them + name = nomad_events.0006.e + add_dread = medium_dread_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:recipient + IMPRISONER = root + } + if = { + limit = { + scope:recipient = { has_variable = achmach_loyalty } + } + scope:achmach_scope = { + set_variable = imprisoned_var + } + } + stress_impact = { + vengeful = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = trusting + } + factor = 0 + } + modifier = { + has_trait = vengeful + factor = 2 + } + } + } + + option = { # Let them be + name = nomad_events.0006.f + add_dread = minor_dread_loss + add_piety = minor_piety_gain + scope:recipient = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + stress_impact = { + vengeful = medium_stress_impact_gain + trusting = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = trusting + factor = 2 + } + modifier = { + has_trait = vengeful + factor = 0 + } + } + } + + after = { + if = { # We send this after interrogating Achmach + limit = { + scope:recipient = { has_variable = achmach_loyalty } + } + hidden_effect = { + trigger_event = { + id = nomad_events.0007 + days = { 25 30 } + } + } + } + } +} + +# You see Achmach do something sus at night +scripted_effect achmach_discover_nature_ritual_effect = { + scope:achmach_scope = { + switch = { + trigger = var:achmach_loyalty + flag:yes = { + custom_tooltip = nomad_events_0007_b_success_info + root = { + trigger_event = nomad_events.0008 + } + } + flag:no = { + custom_tooltip = nomad_events_0007_b_success_info + root = { + trigger_event = nomad_events.0009 + } + } + } + } +} + +nomad_events.0007 = { + type = character_event + title = nomad_events.0007.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:achmach_scope = { + has_variable = imprisoned_var + } + } + desc = nomad_events.0007.desc.imprisoned + } + desc = nomad_events.0007.desc.fallback + } + desc = nomad_events.0007.desc.outro + } + theme = intrigue + override_background = { reference = mpo_campfire_steppe } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = brave + has_trait = vengeful + } + } + animation = anger + } + animation = shock + } + right_portrait = { + character = scope:achmach_scope + camera = camera_event_center + override_imprisonment_visuals = yes + animation = throne_room_kneel_1 + } + + trigger = { + # Achmach is still around + scope:achmach_scope = { + is_courtier_or_knight_of_root = yes + } + } + + immediate = { + play_music_cue = "mx_cue_murder" + } + + option = { # Everyone is scheming against me! + name = nomad_events.0007.aa + trigger = { + has_trait = paranoid + } + if = { + limit = { + NOT = { has_perk = prepared_for_anything_perk } + } + add_perk = prepared_for_anything_perk + } + else = { + add_intrigue_lifestyle_perk_points = 1 + } + hidden_effect = { + trigger_event = { + id = nomad_events.0010 + days = { 2 3 } + } + } + stress_impact = { + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 2 + } + } + } + + option = { # Wait, I know what you're doing + name = nomad_events.0007.a + trigger = { + OR = { + has_trait = witch + has_trait = lifestyle_mystic + } + } + add_learning_lifestyle_xp = medium_lifestyle_xp + achmach_discover_nature_ritual_effect = yes + stress_impact = { + witch = medium_stress_impact_loss + lifestyle_mystic = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = witch + has_trait = lifestyle_mystic + } + factor = 2 + } + } + } + + option = { # What are you doing + name = nomad_events.0007.b + duel = { + skill = learning + target = scope:achmach_scope + 50 = { + desc = nomad_events.0007.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + achmach_discover_nature_ritual_effect = yes + } + 50 = { + desc = nomad_events.0007.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = nomad_events.0007.b.failure + right_icon = scope:achmach_scope + add_stress = minor_stress_gain + } + hidden_effect = { + trigger_event = { + id = nomad_events.0010 + days = { 2 3 } + } + } + } + } + stress_impact = { + trusting = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = trusting + factor = 2 + } + } + } + + option = { # Intimidate them + name = nomad_events.0007.c + duel = { + skill = prowess + target = scope:achmach_scope + 50 = { + desc = nomad_events.0007.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + achmach_discover_nature_ritual_effect = yes + } + 50 = { + desc = nomad_events.0007.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = nomad_events.0007.b.failure + right_icon = scope:achmach_scope + add_stress = minor_stress_gain + } + hidden_effect = { + trigger_event = { + id = nomad_events.0010 + days = { 2 3 } + } + } + } + } + stress_impact = { + wrathful = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = wrathful + has_trait = vengeful + } + factor = 2 + } + modifier = { + has_trait = craven + factor = 0 + } + } + } +} + +# Happy ending - Achmach was praying for your safety +scripted_effect nomad_events_magic_amulet_creation_effect = { + hidden_effect_new_object = { + create_artifact = { + name = magic_amulet + description = magic_amulet_desc + type = miscellaneous + visuals = antlers + modifier = artifact_stress_gain_7_modifier + modifier = artifact_magic_amulet_modifier + save_scope_as = newly_created_artifact + wealth = 70 + quality = 70 + max_durability = 100 + creator = scope:achmach_scope + } + } +} + +nomad_events.0008 = { + type = character_event + title = nomad_events.0008.t + desc = nomad_events.0008.desc + theme = intrigue + override_background = { reference = mpo_campfire_steppe } + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:achmach_scope + animation = obsequious_bow + override_imprisonment_visuals = yes + } + artifact = { + target = scope:newly_created_artifact + position = lower_right_portrait + } + + immediate = { + scope:achmach_scope = { + assign_quirk_effect = yes + nomad_events_magic_amulet_creation_effect = yes + } + add_stress = medium_stress_loss # No one is trying to kill you + } + + option = { # If you don't have the same faith, switch + name = nomad_events.0008.a + trigger = { + NOT = { faith = scope:achmach_scope.faith } + } + set_character_faith_with_conversion = scope:achmach_scope.faith + add_piety = medium_piety_gain + ai_chance = { + base = 0 #AI should never choose this + } + } + + option = { # Get the amulet + name = nomad_events.0008.b + custom_tooltip = nomad_events_0008_b_tt + scope:newly_created_artifact = { + set_owner = root + set_variable = magic_amulet_var + } + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 2 + } + modifier = { + has_trait = cynical + factor = 0 + } + } + } + + option = { # Urge them to get even better + name = nomad_events.0008.c + scope:achmach_scope = { + if = { + limit = { is_councillor_of = root } + councillor_increase_relevant_skill_five_points_effect = yes + } + else = { + add_random_five_skill_points_effect = yes + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + add_prestige = medium_prestige_gain + stress_impact = { + ambitious = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = ambitious + factor = 2 + } + } + } +} + +# Bittersweet ending - You discover he was being disloyal +scripted_effect nomad_events_0009_imprison_effect = { + if = { #if they're not imprisoned yet, imprison them + limit = { + scope:achmach_scope = { is_imprisoned = no } + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:achmach_scope + IMPRISONER = root + } + } +} + +nomad_events.0009 = { + type = character_event + title = nomad_events.0009.t + desc = nomad_events.0009.desc + theme = intrigue + override_background = { reference = mpo_campfire_steppe } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = brave + has_trait = vengeful + } + } + animation = rage + } + animation = anger + } + right_portrait = { + character = scope:achmach_scope + animation = shock + override_imprisonment_visuals = yes + } + artifact = { + target = scope:newly_created_artifact + position = lower_right_portrait + } + + immediate = { + scope:achmach_scope = { + assign_quirk_effect = yes + nomad_events_magic_amulet_creation_effect = yes + } + } + + option = { # Kill them on the spot + name = nomad_events.0009.a + add_dread = major_dread_gain + unknown_murder_effect = { + VICTIM = scope:achmach_scope + MURDERER = root + REASON = death_murder + } + stress_impact = { + wrathful = major_stress_impact_loss + sadistic = major_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = wrathful + has_trait = sadistic + } + factor = 2 + } + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + } + } + + option = { # Steal their amulet + name = { + trigger = { + scope:achmach_scope = { + is_imprisoned = yes + } + } + text = nomad_events.0009.b_imprisoned + } + name = { + text = nomad_events.0009.b + } + custom_tooltip = nomad_events_0008_b_tt + scope:newly_created_artifact = { + set_owner = root + set_variable = magic_amulet_var + } + nomad_events_0009_imprison_effect = yes + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = zealous + factor = 2 + } + modifier = { + has_trait = cynical + factor = 0 + } + } + } + + option = { # You'll be prepared now + name = nomad_events.0009.c + add_character_modifier = mpo_eyes_everywhere_modifier # Permanent + stress_impact = { + paranoid = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + factor = 2 + } + } + } +} + +# Complicated feelings ending - Someone tries to murder you! +scripted_effect nomad_events_0010_imprison_effect = { + if = { #if they're not imprisoned yet, imprison them + limit = { + scope:dueling_enemy = { is_imprisoned = no } + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:dueling_enemy + IMPRISONER = root + } + } + add_dread = medium_dread_gain + add_character_modifier = { + modifier = mpo_imprisoned_assassin_modifier + years = 5 + } +} + +nomad_events.0010 = { + type = character_event + title = nomad_events.0010.t + desc = { + desc = nomad_events.0010.desc.intro + first_valid = { + triggered_desc = { + trigger = { # Someone else was trying to murder you + scope:achmach_scope.var:achmach_loyalty = flag:yes + } + desc = nomad_events.0010.desc.loyal + } + desc = nomad_events.0010.desc.disloyal # It's Acmach! + } + } + theme = intrigue + override_background = { reference = mpo_tent_interior_mongol } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + animation = rage + } + animation = shock + } + right_portrait = { + character = scope:achmach_scope + triggered_animation = { + trigger = { + scope:achmach_scope.var:achmach_loyalty = flag:yes + } + animation = aggressive_dagger + } + animation = assassin + override_imprisonment_visuals = yes + } + lower_center_portrait = { + trigger = { + exists = scope:assassin + } + character = scope:assassin + } + + immediate = { + play_music_cue = "mx_cue_murder" + if = { + limit = { + scope:achmach_scope.var:achmach_loyalty = flag:yes + } + create_character = { + template = mercenary + dynasty = none + location = root.capital_province + gender_female_chance = root_soldier_female_chance + faith = root.location.faith + culture = root.location.culture + save_scope_as = assassin + } + } + if = { + limit = { + exists = scope:assassin + } + scope:assassin = { save_scope_as = dueling_enemy } + } + else = { + scope:achmach_scope = { save_scope_as = dueling_enemy } + } + } + + option = { # If you are a torturer you're gonna have fun + name = nomad_events.0010.aaa + trigger = { + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + add_internal_flag = special + add_intrigue_lifestyle_xp = medium_lifestyle_xp + add_dread = major_dread_gain + unknown_murder_effect = { + VICTIM = scope:dueling_enemy + MURDERER = root + REASON = death_murder + } + stress_impact = { + torturer = massive_stress_impact_loss + wrathful = massive_stress_impact_loss + sadistic = major_stress_impact_loss + calm = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = torturer + has_trait = wrathful + has_trait = sadistic + } + factor = 2 + } + modifier = { + OR = { + has_trait = calm + has_trait = compassionate + } + factor = 0 + } + } + } + + option = { # If you are craven you can run with all your might + name = nomad_events.0010.aa + trigger = { + has_trait = craven + } + custom_tooltip = nomad_events_0010_aa_tt + nomad_events_0010_imprison_effect = yes + } + + option = { # Encourage Achmach to take the hit for you + name = nomad_events.0010.a + trigger = { + scope:achmach_scope.var:achmach_loyalty = flag:yes + } + scope:achmach_scope = { + duel = { + skill = prowess + target = scope:assassin + 50 = { # They kill the assassin + desc = nomad_events.0010.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = nomad_events.0010.a.success + right_icon = scope:assassin + left_icon = scope:achmach_scope + unknown_murder_effect = { + VICTIM = scope:assassin + MURDERER = scope:achmach_scope + REASON = death_murder + } + } + } + 50 = { # The assassin wounds them + desc = nomad_events.0010.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = nomad_events.0010.a.failure + right_icon = scope:achmach_scope + scope:achmach_scope = { + increase_wounds_effect = { REASON = attacked } + } + } + } + } + } + stress_impact = { + craven = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = craven + factor = 2 + } + } + } + + option = { # You call for guards + name = nomad_events.0010.b + duel = { + skill = diplomacy + target = scope:dueling_enemy + 50 = { # You imprison the assassin + desc = nomad_events.0010.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = nomad_events.0010.b.success + left_icon = root + right_icon = scope:dueling_enemy + nomad_events_0010_imprison_effect = yes + } + } + 50 = { # The assassin wounds you + desc = nomad_events.0010.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = nomad_events.0010.b.failure + left_icon = root + increase_wounds_effect = { REASON = attacked } + } + } + } + stress_impact = { + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = wrathful + factor = 2 + } + } + } + + option = { # Try to defend yourself + name = { + trigger = { + scope:dueling_enemy = { is_imprisoned = yes } + } + text = nomad_events.0010.c_imprisoned + } + name = { + text = nomad_events.0010.c + } + duel = { + skill = prowess + target = scope:dueling_enemy + 50 = { # You kill the assassin + desc = nomad_events.0010.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = nomad_events.0010.c.success + left_icon = root + right_icon = scope:dueling_enemy + unknown_murder_effect = { + VICTIM = scope:dueling_enemy + MURDERER = root + REASON = death_murder + } + } + } + 50 = { # The assassin wounds you + desc = nomad_events.0010.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = nomad_events.0010.c.failure + left_icon = root + increase_wounds_effect = { REASON = attacked } + nomad_events_0010_imprison_effect = yes + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = craven + factor = 0 + } + } + } +} + +############################ +## Not My Flock +## 0100 +############################ + +scripted_trigger nomad_events_0100_valid_enemies = { + is_available_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + government_has_flag = government_is_nomadic + exists = domicile +} + +scripted_effect nomad_events_0100_dislike_effect = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = $VALUE$ + } +} + +scripted_effect nomad_events_0100_friend_effect = { + progress_towards_friend_effect = { + REASON = friend_supported_in_herd_dispute + CHARACTER = $CHARACTER$ + OPINION = default_friend_opinion + } +} + +nomad_events.0100 = { + type = character_event + title = nomad_events.0100.t + desc = nomad_events.0100.desc + theme = nomads + cooldown = { years = 5 } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = deceitful } + animation = schadenfreude + } + animation = worry + } + right_portrait = { + character = scope:vassal_1 + animation = anger + } + lower_center_portrait = { + character = scope:vassal_2 + } + + trigger = { + has_mpo_dlc_trigger = yes + is_available_adult = yes + any_vassal = { + nomad_events_0100_valid_enemies = yes + count >= 2 + } + } + + immediate = { + random_vassal = { + limit = { nomad_events_0100_valid_enemies = yes } + save_scope_as = vassal_1 + } + random_vassal = { + limit = { + nomad_events_0100_valid_enemies = yes + NOT = { this = scope:vassal_1 } + } + weight = { + base = 1 + modifier = { + add = 10 + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:vassal_1 } + } + modifier = { + add = 5 + number_of_opposing_personality_traits = { + target = scope:vassal_1 + value >= 1 + } + } + } + save_scope_as = vassal_2 + } + hidden_effect = { + scope:vassal_1.domicile ?= { + if = { + limit = { + herd <= root.domicile.minor_herd_gain + } + change_herd = root.domicile.minor_herd_gain + } + } + } + scope:vassal_1 = { + pay_herd = { + target = scope:vassal_2 + value = root.domicile.minor_herd_gain + } + } + } + + option = { # Don't you mean _my_ flock + name = nomad_events.0100.aa + trigger = { + has_trait = deceitful + } + scope:vassal_2 = { + pay_herd = { + target = scope:vassal_2 + value = root.domicile.minor_herd_gain + } + } + stress_impact = { + craven = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = craven + factor = 2 + } + } + } + + option = { # Support vassal_1 + name = nomad_events.0100.a + nomad_events_0100_friend_effect = { CHARACTER = scope:vassal_1 } + scope:vassal_2 = { + nomad_events_0100_dislike_effect = { VALUE = -20 } + pay_herd = { + target = scope:vassal_2 + value = root.domicile.minor_herd_gain + } + } + ai_chance = { + base = 100 + modifier = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:vassal_1 } + factor = 2 + } + } + } + + option = { # Support vassal_2 + name = nomad_events.0100.b + nomad_events_0100_friend_effect = { CHARACTER = scope:vassal_2 } + scope:vassal_1 = { + nomad_events_0100_dislike_effect = { VALUE = -20 } + } + ai_chance = { + base = 100 + modifier = { + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:vassal_1 } + factor = 2 + } + } + } + + option = { # You are both wrong + name = nomad_events.0100.c + scope:vassal_1 = { + nomad_events_0100_dislike_effect = { VALUE = -10 } + } + scope:vassal_2 = { + nomad_events_0100_dislike_effect = { VALUE = -10 } + } + add_dread = minor_dread_gain + stress_impact = { + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = gregarious + factor = 0 + } + } + } +} + +############################ +## Cornered +## 0110 +############################ + +nomad_events.0110 = { + type = character_event + title = nomad_events.0110.t + desc = nomad_events.0110.desc + theme = nomads + override_background = { reference = bp3_steppe_winter } + widget = { + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = craven } + animation = shock + } + animation = anger + } + right_portrait = { + character = scope:victim + animation = sick # They are shivering + } + artifact = { + trigger = { + exists = scope:newly_created_artifact + } + position = lower_center_portrait + target = scope:newly_created_artifact + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + location = { + OR = { + has_winter_trigger = yes + geographical_region = ghw_region_siberia + } + } + any_courtier = { + is_available_ai = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 3 + situation:the_great_steppe = { + 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 + } + } + } + } + } + + immediate = { + random_courtier = { + weight = { + base = 1 + modifier = { + is_child_of = root + is_adult = no + age >= 5 + add = 10 + } + modifier = { + is_adult = no + add = 5 + } + } + save_scope_as = victim + } + if = { + limit = { has_trait = craven } + hidden_effect_new_object = { + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:wolf + } + } + } + } + + option = { # Call your men + name = nomad_events.0110.a + trigger = { + has_trait = craven + } + scope:newly_created_artifact = { set_owner = root } + stress_impact = { + craven = medium_stress_impact_loss + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = craven + factor = 2 + } + modifier = { + has_trait = brave + factor = 0 + } + } + } + + option = { # Fight the beast + name = nomad_events.0110.b + duel = { + value = decent_skill_rating + skill = prowess + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + modifier = { + tier_difference = { target = root value >= 1 } + add = 10 + } + desc = nomad_events.0110.b.success + send_interface_toast = { + title = nomad_events.0110.b.success + left_icon = root + add_dread = medium_dread_gain + add_prowess_skill = 1 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + modifier = { + tier_difference = { target = root value >= 1 } + add = 10 + } + desc = nomad_events.0110.b.failure + send_interface_toast = { + title = nomad_events.0110.b.failure + left_icon = root + increase_wounds_no_death_effect = { REASON = wild_animal } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + + } + } + + option = { # Tell them to run away + name = nomad_events.0110.c + scope:victim = { + increase_wounds_no_death_effect = { REASON = wild_animal } + random = { + chance = 10 + send_interface_toast = { + title = nomad_events.0110.c.success + left_icon = scope:victim + scope:victim = { add_trait = athletic } + } + } + } + stress_impact = { + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = brave + factor = 0 + } + } + } +} + +############################ +## Evening Ride +## 0120 +############################ + +scripted_effect nomad_events_0120_improve_relationship_effect = { + switch = { + trigger = var:relationship + flag:child = { + scope:companion = { + add_prowess_skill = 1 + } + } + flag:spouse = { + if = { + limit = { can_set_relation_lover_trigger = { CHARACTER = scope:companion } } + set_relation_lover = { + target = scope:companion + reason = lover_evening_ride + } + } + else = { + scope:companion = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 25 + } + } + } + } + flag:friend = { + progress_towards_friend_effect = { + REASON = friend_evening_ride + CHARACTER = scope:companion + OPINION = default_friend_opinion + } + } + } +} + +nomad_events.0120 = { + type = character_event + title = nomad_events.0120.t + desc = nomad_events.0120.desc + theme = nomads + override_background = { reference = mpo_steppe_evening } + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left + } + right_portrait = { + character = scope:companion + animation = horse_surveying + camera = camera_event_horse_left + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_courtier = { + is_available_ai = yes + age >= 13 + } + } + + immediate = { + random_courtier = { + weight = { + base = 1 + modifier = { + is_child_of = root + is_adult = no + add = 10 + } + modifier = { + is_spouse_of = root + add = 10 + } + } + save_scope_as = companion + } + if = { + limit = { + scope:companion = { + is_child_of = root + } + } + set_variable = { + name = relationship + value = flag:child + } + } + else_if = { + limit = { + scope:companion = { + is_spouse_of = root + } + } + set_variable = { + name = relationship + value = flag:spouse + } + } + else = { + set_variable = { + name = relationship + value = flag:friend + } + } + } + + option = { # If this is romantic you can smash + name = nomad_events.0120.a + trigger = { + var:relationship = flag:spouse + } + reason = spouse + had_sex_with_effect = { + CHARACTER = scope:companion + PREGNANCY_CHANCE = pregnancy_chance + } + stress_impact = { + base = medium_stress_impact_loss + chaste = major_stress_impact_gain + celibate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = lustful + factor = 2 + } + modifier = { + OR = { + has_trait = chaste + has_trait = celibate + } + factor = 0 + } + } + } + + option = { # Talk to them + name = nomad_events.0120.b + nomad_events_0120_improve_relationship_effect = yes + stress_impact = { + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = ambitious + factor = 0 + } + } + } + + option = { # Focus on training + name = nomad_events.0120.c + add_martial_lifestyle_xp = medium_lifestyle_xp #Enough that you care even if you're not Martial + if = { + limit = { + var:relationship = flag:spouse + } + stress_impact = { + lustful = medium_stress_impact_gain + } + } + ai_chance = { + base = 100 + modifier = { + has_trait = lustful + var:relationship = flag:spouse + factor = 0 + } + } + } +} + +############################ +## A Good Deal +## 0130 +############################ + +scripted_trigger nomad_events_0130_valid_merchant = { + is_available_ai_adult = yes + stewardship >= decent_skill_rating +} + +nomad_events.0130 = { + type = character_event + title = nomad_events.0130.t + desc = nomad_events.0130.desc + theme = nomads + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = horse_archer_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:merchant + animation = shepherd_with_sheep + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + domicile = { herd < max_herd } # You are not at your Herd limit + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + nomad_events_0130_valid_merchant = yes + } + } + random_pool_character = { + province = root.location + limit = { nomad_events_0130_valid_merchant = yes } + save_scope_as = merchant + } + } + else = { + create_character = { + location = root.location + template = merchant_template + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + faith = location.faith + culture = location.culture + save_scope_as = merchant + } + } + } + + option = { # Intimidate them + name = nomad_events.0130.a + trigger = { + dread >= major_dread_value + } + domicile = { + change_herd = medium_herd_gain + } + stress_impact = { + wrathful = medium_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = wrathful + factor = 2 + } + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + } + } + + option = { # Invite them to court + name = nomad_events.0130.b + pay_short_term_gold = { + target = scope:merchant + gold = minor_gold_value + } + add_courtier = scope:merchant + stress_impact = { + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = wrathful + gold <= medium_gold_value + } + factor = 0 + } + } + } + + option = { # Buy herd + name = nomad_events.0130.c + pay_short_term_gold = { + target = scope:merchant + gold = minor_gold_value + } + domicile = { + change_herd = medium_herd_gain + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = greedy + gold <= medium_gold_value + } + factor = 0 + } + } + } + + option = { # I'm good + name = nomad_events.0130.d + ai_chance = { + base = 100 + } + } +} + +############################ +## Far From Home +## 0140 +############################ + +scripted_trigger nomad_events_0140_valid_merchant = { + is_available_ai_adult = yes + faith = { + NOR = { + this = root.faith + this = root.location.county.faith + } + } + NOT = { has_variable = had_nomad_events_0140_var } +} + +nomad_events.0140 = { + type = character_event + title = nomad_events.0140.t + desc = nomad_events.0140.desc + theme = nomads + override_background = { reference = mpo_campfire_steppe } + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = horse_archer_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:merchant + animation = shepherd_with_sheep + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + } + + weight_multiplier = { + base = 1 + modifier = { + any_pool_character = { + province = root.location + nomad_events_0140_valid_merchant = yes + } + factor = 2 + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + nomad_events_0140_valid_merchant = yes + } + } + random_pool_character = { + province = root.location + limit = { nomad_events_0140_valid_merchant = yes } + save_scope_as = merchant + } + } + else = { + random_list = { + 10 = { + modifier = { + location = { geographical_region = world_steppe_west } + add = 25 + } + create_character = { + location = root.location + template = merchant_template + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + faith = faith:ashari + culture = culture:bolghar + save_scope_as = merchant + } + } + 10 = { + modifier = { + location = { geographical_region = world_steppe_east } + add = 25 + } + create_character = { + location = root.location + template = merchant_template + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + faith = faith:nestorian + culture = culture:kerait + save_scope_as = merchant + } + } + 10 = { + modifier = { + location = { geographical_region = world_steppe_east } + add = 25 + } + create_character = { + location = root.location + template = merchant_template + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + faith = faith:vajrayana + culture = culture:uyghur + save_scope_as = merchant + } + } + 10 = { + modifier = { + location = { geographical_region = world_steppe_central } + add = 25 + } + create_character = { + location = root.location + template = merchant_template + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + faith = faith:maturidi + culture = culture:turkish + save_scope_as = merchant + } + } + 1 = { # Fallback, rare + create_character = { + location = root.location + template = merchant_template + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + faith = faith:catholic + culture = culture:italian + save_scope_as = merchant + } + } + } + } + scope:merchant = { + set_variable = had_nomad_events_0140_var + faith = { save_scope_as = target_faith } + } + } + + option = { # Get Faith discount + name = nomad_events.0140.a + trigger = { + NOT = { faith = scope:merchant.faith } + } + custom_tooltip = nomad_events.0140.a.tt + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:target_faith + } + stress_impact = { + wrathful = medium_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { # AI should never pick this + base = 0 + modifier = { + has_trait = cynical + add = 50 + } + } + } + + option = { # Invite them to stay + name = nomad_events.0140.b + add_piety = minor_piety_gain + add_courtier = scope:merchant + stress_impact = { + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = wrathful + factor = 0 + } + } + } + + option = { # Tell them to go away + name = nomad_events.0140.c + add_dread = minor_dread_gain + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + factor = 0 + } + } + } +} + +############################ +## One More Drink +## 0150 +############################ + +scripted_trigger nomad_events_0150_valid_companion = { + is_available_ai_adult = yes + drinks_alcohol_trigger = yes + can_set_relation_friend_trigger = { CHARACTER = root } + age <= 50 +} + +nomad_events.0150 = { + type = character_event + title = nomad_events.0150.t + desc = nomad_events.0150.desc + theme = nomads + override_background = { reference = mpo_campfire_steppe } + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = drink + } + right_portrait = { + character = scope:companion + animation = toast + } + lower_center_portrait = { + trigger = { exists = scope:rival } + character = scope:rival + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + culture = { + OR = { + has_cultural_pillar = heritage_turkic + has_cultural_pillar = heritage_mongolic + } + } + drinks_alcohol_trigger = yes + any_courtier = { + nomad_events_0150_valid_companion = yes + } + } + + immediate = { + random_courtier = { + limit = { + nomad_events_0150_valid_companion = yes + } + weight = { # Someone you care about + base = 1 + modifier = { + has_court_position = court_astrologer_court_position + add = 5 + } + modifier = { + is_knight_of = root + add = 2 + } + } + save_scope_as = companion + } + if = { + limit = { + num_of_relation_rival >= 1 + NOT = { has_relation_rival = scope:companion } + } + random_relation = { + type = rival + save_scope_as = rival + } + } + } + + option = { # If you hate someone, shit talk them + name = nomad_events.0150.a + trigger = { + num_of_relation_rival >= 1 + NOT = { has_relation_rival = scope:companion } + } + add_internal_flag = special + custom_tooltip = nomad_events.0150.a.tt # Not using the reason because this is not because _they_ are your rival + scope:companion = { # They find this funny + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + scope:rival = { + add_prestige = minor_prestige_loss + } + stress_impact = { + base = major_stress_impact_loss + } + ai_chance = { # AI should never pick this + base = 0 + } + } + + option = { # I love you, man + name = nomad_events.0150.b + set_relation_friend = { + target = scope:companion + reason = friend_drank_together + } + stress_impact = { + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = wrathful + factor = 0 + } + } + } + + option = { # I love drinkiiiiiiiiiiing + name = nomad_events.0150.c + add_prestige = minor_prestige_gain + stress_impact = { + base = medium_stress_impact_loss + drunkard = major_stress_impact_loss + temperate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = greedy + factor = 0 + } + } + } +} + +############################ +## A Nice Word +## 0160 +############################ + +scripted_trigger nomad_events_0160_valid_spouse = { + is_available_healthy_ai_adult = yes + NOR = { # To avoid narrative dissonance + has_variable = had_nomad_events_1070_var + has_variable = had_nomad_events_0220_var + } +} + +nomad_events.0160 = { + type = character_event + title = nomad_events.0160.t + desc = { + desc = nomad_events.0160.desc.intro + first_valid = { + triggered_desc = { + trigger = { var:admiration = flag:dread } + desc = nomad_events.0160.desc.dread + } + triggered_desc = { + trigger = { var:admiration = flag:prowess } + desc = nomad_events.0160.desc.prowess + } + triggered_desc = { + trigger = { var:admiration = flag:lover } + desc = nomad_events.0160.desc.lover + } + triggered_desc = { + trigger = { var:admiration = flag:brave } + desc = nomad_events.0160.desc.brave + } + triggered_desc = { + trigger = { var:admiration = flag:generic } + desc = nomad_events.0160.desc.generic + } + } + desc = nomad_events.0160.desc.outro + } + theme = nomads + override_background = { reference = mpo_tent_interior_mongol } + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = love + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:spouse + animation = admiration + outfit_tags = { nightgown } + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_spouse = { + nomad_events_0160_valid_spouse = yes + save_temporary_scope_as = spouse_temp + } + # Have you done anything cool? + OR = { + dread >= major_dread_value + prowess >= high_skill_rating + has_relation_lover = scope:spouse_temp + has_trait = brave + AND = { # Or they just support you because they like you + has_any_good_relationship_with_character_trigger = { CHARACTER = scope:spouse_temp } + scope:spouse_temp = { + NOT = { has_trait = callous } + } + } + } + } + + immediate = { + random_spouse = { + limit = { + nomad_events_0160_valid_spouse = yes + } + weight = { + base = 1 + modifier = { + this = root.primary_spouse + add = 5 + } + } + set_variable = had_nomad_events_1060_var # Forever -- to avoid dissonance with the next event + save_scope_as = spouse + } + random_list = { + 5 = { + trigger = { + dread >= major_dread_value + } + set_variable = { + name = admiration + value = flag:dread + } + } + 5 = { + trigger = { + prowess >= high_skill_rating + } + set_variable = { + name = admiration + value = flag:prowess + } + } + 5 = { + trigger = { + has_relation_lover = scope:spouse + } + set_variable = { + name = admiration + value = flag:lover + } + } + 5 = { + trigger = { + has_trait = brave + } + set_variable = { + name = admiration + value = flag:brave + } + } + 1 = { + set_variable = { + name = admiration + value = flag:generic + } + } + } + } + + option = { # Let's leave the past behind + name = nomad_events.0160.a + reason = rival + trigger = { + has_relation_rival = scope:spouse + } + remove_relation_rival = scope:spouse + stress_impact = { + base = major_stress_impact_loss + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # I love you too + name = nomad_events.0160.b + trigger = { + NOT = { has_relation_rival = scope:spouse } + } + if = { + limit = { + can_set_relation_lover_trigger = { CHARACTER = scope:spouse } + } + set_relation_lover = { + target = scope:spouse + reason = lover_admirable_thing + } + } + else = { + scope:spouse = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 25 + } + } + } + stress_impact = { + base = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = wrathful + factor = 0 + } + } + } + + option = { # Thanks, bestie + name = nomad_events.0160.c + add_prestige = minor_prestige_gain + stress_impact = { + arrogant = major_stress_impact_loss + humble = major_stress_impact_gain + shy = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = arrogant + factor = 2 + } + modifier = { + OR = { + has_trait = humble + has_trait = shy + } + factor = 0 + } + } + } + + after = { + remove_variable = admiration + } +} + +############################ +## Dreaded One +## 0170 +############################ + +scripted_trigger is_valid_nomad_events_0170_spouse = { + is_available_healthy_ai_adult = yes + NOR = { # To avoid narrative dissonance + has_variable = had_nomad_events_1060_var + has_variable = had_nomad_events_0220_var + } + NOR = { + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + NOT = { dread >= minor_dread_value } # In case they are landed +} + +nomad_events.0170 = { + type = character_event + title = nomad_events.0170.t + desc = nomad_events.0170.desc + theme = nomads + override_background = { reference = mpo_tent_interior_mongol } + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + } + animation = dismissal + } + animation = worry + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:spouse + animation = fear + outfit_tags = { nightgown } + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + dread >= major_dread_value + any_spouse = { + is_valid_nomad_events_0170_spouse = yes + } + } + + immediate = { + random_spouse = { + limit = { + is_valid_nomad_events_0170_spouse = yes + } + weight = { + base = 1 + modifier = { + this = root.primary_spouse + add = 5 + } + } + set_variable = had_nomad_events_1070_var + save_scope_as = spouse + } + } + + option = { # Do you think me weak? + name = nomad_events.0170.a + trigger = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + } + if = { # If you are not max out we give you some dread + limit = { + NOT = { dread = 100 } + } + add_dread = major_dread_gain + } + give_nickname = nick_the_dreadful + add_character_modifier = { + modifier = dread_spouse_modifier + years = 10 + } + if = { + limit = { + scope:spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_very_bad_fertility = scope:spouse + } + else = { + scope:spouse = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -50 + } + } + } + stress_impact = { + base = major_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + modifier = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + factor = 2 + } + } + } + + option = { # You're right + name = nomad_events.0170.b + add_dread = massive_dread_loss + add_piety = minor_piety_gain + if = { + limit = { + scope:spouse = { has_any_fertility_relationship_with_root_trigger = no } + } + set_relation_wedding_good_fertility = scope:spouse + } + else = { + scope:spouse = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 25 + } + } + } + stress_impact = { + compassionate = medium_stress_impact_loss + calm = medium_stress_impact_loss + wrathful = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 2 + } + modifier = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + + option = { # Nonsense + name = nomad_events.0170.c + add_prestige = minor_prestige_gain + scope:spouse = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -25 + } + } + stress_impact = { + callous = medium_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + } + } +} + +############################ +## The Weakest Link +## 0180 +############################ + +scripted_trigger is_valid_nomad_events_0180_child = { + OR = { + AND = { + is_adult = yes + prowess <= mediocre_skill_rating + } + AND = { + is_adult = no + age >= 10 + prowess <= low_skill_rating + } + } +} + +scripted_trigger is_valid_nomad_events_0180_rival = { + is_available_healthy_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + NOT = { is_parent_of = $CHILD$ } # Let's double check this + NOT = { has_trait = compassionate } +} + +nomad_events.0180 = { + type = character_event + title = nomad_events.0180.t + desc = nomad_events.0180.desc + theme = nomads + override_background = { reference = mpo_campfire_steppe } + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = vengeful + } + } + animation = anger + } + animation = stress + } + right_portrait = { + character = scope:rival + animation = laugh + camera = camera_event_left_away_3_4_far + } + lower_left_portrait = scope:child + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_child = { + is_valid_nomad_events_0180_child = yes + save_temporary_scope_as = child_temp + } + any_courtier = { + is_valid_nomad_events_0180_rival = { CHILD = scope:child_temp } + } + } + + immediate = { + random_child = { + limit = { + is_valid_nomad_events_0180_child = yes + } + weight = { + base = 1 + modifier = { + add = 5 + is_primary_heir_of = root + } + } + save_scope_as = child + } + random_courtier_or_guest = { + limit = { + is_valid_nomad_events_0180_rival = { CHILD = scope:child } + } + weight = { + base = 1 + modifier = { + add = 5 + has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:child } + } + modifier = { + add = 3 + has_any_bad_relationship_with_root_trigger = yes + } + } + save_scope_as = rival + } + } + + option = { # What did you just say + name = nomad_events.0180.a + trigger = { + has_personality_malicious_trigger = yes + } + add_dread = medium_dread_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:rival + IMPRISONER = root + } + stress_impact = { + arbitrary = medium_stress_impact_loss + callous = major_stress_impact_loss + sadistic = major_stress_impact_loss + vengeful = major_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + modifier = { + OR = { + has_trait = vengeful + has_trait = callous + has_trait = sadistic + has_trait = arbitrary + } + factor = 2 + } + } + } + + option = { # Checks out + name = nomad_events.0180.b + scope:child = { + add_stress = massive_stress_impact_gain + add_prowess_skill = 2 + } + + stress_impact = { + base = major_stress_impact_gain + } + ai_chance = { + base = 0 # AI shouldn't send themselves into a stress break + modifier = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = ambitious + } + NOT = { has_trait = compassionate } + add = 50 # Unless... + } + } + } + + option = { # Whatever + name = nomad_events.0180.c + add_prestige = minor_prestige_loss + scope:child = { + add_opinion = { + target = root + modifier = kindness_opinion + opinion = 10 + } + } + stress_impact = { + callous = medium_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + } + } +} + +############################ +## Back When +## 0190 +############################ + +scripted_trigger nomad_events_0190_valid_memory = { + has_memory_category = positive + NOT = { has_memory_category = private } + NOT = { has_memory_category = birth } + memory_age_years >= 5 # not something recent + any_memory_participant = { + is_physically_able_adult = yes + is_courtier_or_knight_of_root = yes + } +} + +scripted_effect nomad_events_0190_friendship_effect = { + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_friend = { + reason = friend_cute_memory + target = scope:friend + } + } + else_if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { + reason = friend_cute_memory + target = scope:friend + } + } + else = { + progress_towards_friend_effect = { + REASON = friend_cute_memory + CHARACTER = scope:friend + OPINION = default_friend_opinion + } + } +} + +nomad_events.0190 = { + type = character_event + title = nomad_events.0190.t + desc = nomad_events.0190.desc + theme = nomads + override_background = { reference = mpo_steppe_evening } + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = horse_archer_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:friend + animation = horse_conversing_left + camera = camera_event_horse_right + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_memory = { + nomad_events_0190_valid_memory = yes + } + } + + immediate = { + random_memory = { + limit = { + nomad_events_0190_valid_memory = yes + } + save_scope_as = memory + random_memory_participant = { + save_scope_as = friend + } + } + } + + option = { # I love you, bestie + name = nomad_events.0190.a + trigger = { + has_trait = gregarious + } + nomad_events_0190_friendship_effect = yes + stress_impact = { + base = major_stress_impact_loss + callous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = callous + factor = 0 + } + modifier = { + OR = { + has_trait = gregarious + has_trait = compassionate + has_trait = loyal + } + factor = 2 + } + } + } + + option = { # This is a pivotal moment in my life + name = nomad_events.0190.b + trigger = { + has_trait = shy + } + nomad_events_0190_friendship_effect = yes + stress_impact = { + base = major_stress_impact_loss + callous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = callous + factor = 0 + } + modifier = { + OR = { + has_trait = shy + has_trait = compassionate + has_trait = loyal + } + factor = 2 + } + } + } + + option = { # I feel happy + name = nomad_events.0190.c + add_character_modifier = { + modifier = mpo_good_memory_modifier + years = 5 + } + stress_impact = { + base = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + callous = major_stress_impact_gain + ambitious = major_stress_impact_gain + disloyal = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = callous + has_trait = ambitious + has_trait = disloyal + has_trait = arrogant + } + factor = 0 + } + } + } + + option = { # Everyone should know how cool we are + name = nomad_events.0190.d + add_prestige = minor_prestige_gain + stress_impact = { + arrogant = medium_stress_impact_loss + ambitious = medium_stress_impact_loss + disloyal = medium_stress_impact_loss + callous = medium_stress_impact_loss + gregarious = major_stress_impact_gain + shy = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = arrogant + has_trait = ambitious + has_trait = callous + has_trait = disloyal + } + factor = 2 + } + modifier = { + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = shy + has_trait = loyal + } + factor = 0 + } + } + } +} + +############################ +## In My Dreams +## 0200 +############################ + +scripted_trigger nomad_events_0200_valid_courtier = { + is_available_healthy_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no +} + +scripted_effect nomad_events_0200_learning_effect = { + scope:courtier = { + add_learning_skill = 1 + } + add_learning_lifestyle_xp = medium_lifestyle_xp +} + +nomad_events.0200 = { + type = character_event + title = nomad_events.0200.t + desc = { + desc = nomad_events.0200.desc.intro + first_valid = { + triggered_desc = { + trigger = { var:dream = flag:good } + desc = nomad_events.0200.desc.good + } + desc = nomad_events.0200.desc.bad + } + desc = nomad_events.0200.desc.outro + } + theme = nomads + override_background = { reference = mpo_campfire_steppe } + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = drink + } + right_portrait = { + character = scope:courtier + animation = storyteller + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_courtier = { + nomad_events_0200_valid_courtier = yes + } + } + + immediate = { + ordered_courtier = { + limit = { nomad_events_0200_valid_courtier = yes } + order_by = { + value = learning + if = { + limit = { has_court_position = court_astrologer_court_position } + add = 5 + } + if = { + limit = { has_trait = lifestyle_mystic } + add = 2 + } + if = { + limit = { has_trait = lunatic } + add = 2 + } + } + save_scope_as = courtier + } + random_list = { + 1 = { + set_variable = { + name = dream + value = flag:good + } + } + 1 = { + set_variable = { + name = dream + value = flag:bad + } + } + } + } + + option = { # I don't believe in this stuff + name = nomad_events.0200.a + trigger = { + has_trait = cynical + } + add_character_modifier = { + modifier = mpo_no_omens_modifier + years = 10 + } + stress_impact = { + base = major_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + modifier = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = sadistic + } + factor = 2 + } + } + } + + option = { # That's neat + name = nomad_events.0200.b + trigger = { + var:dream = flag:good + } + nomad_events_0200_learning_effect = yes + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = ambitious + } + factor = 2 + } + } + } + + option = { # We must endure + name = nomad_events.0200.c + trigger = { + var:dream = flag:bad + } + nomad_events_0200_learning_effect = yes + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = wrathful + has_trait = callous + has_trait = ambitious + } + factor = 2 + } + } + } + + option = { # Let's pray + name = nomad_events.0200.d + add_piety = minor_piety_gain + stress_impact = { + callous = medium_stress_impact_loss + compassionate = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + } + } + + after = { + remove_variable = dream + } +} + +############################ +## Nothing but Roots +## 0210 +############################ + +scripted_trigger nomad_events_0210_valid_child = { + age <= 15 + age >= 5 # So they can speak properly +} + +nomad_events.0210 = { + type = character_event + title = nomad_events.0210.t + desc = { + desc = nomad_events.0210.desc.intro + first_valid = { + triggered_desc = { + trigger = { var:family_var = flag:spouse } + desc = nomad_events.0210.desc.spouse + } + desc = nomad_events.0210.desc.child + } + } + theme = nomads + cooldown = { years = 10 } + override_effect_2d = { + reference = rain + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = arrogant + } + animation = dismissal + } + animation = worry + } + right_portrait = { + character = scope:family + animation = sadness + } + lower_center_portrait = scope:courtier + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + OR = { + domicile ?= { + herd <= minor_herd_value + } + } + situation:the_great_steppe = { + NOR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_abundant_grazing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_warm_nights_season + situation_sub_region_has_county = root.capital_county + } + } + } + OR = { + any_spouse = { + is_available_healthy_ai_adult = yes + } + any_child = { + nomad_events_0210_valid_child = yes + } + } + } + + immediate = { + random_list = { + 1 = { + trigger = { + any_spouse = { is_available_healthy_ai_adult = yes } + } + random_spouse = { + limit = { is_available_healthy_ai_adult = yes } + weight = { + base = 1 + modifier = { + this = root.primary_spouse + add = 5 + } + } + save_scope_as = family + } + set_variable = { + name = family_var + value = flag:spouse + } + } + 2 = { # Sadder if it's your child + trigger = { + any_child = { nomad_events_0210_valid_child = yes } + } + random_child = { + limit = { nomad_events_0210_valid_child = yes } + save_scope_as = family + } + set_variable = { + name = family_var + value = flag:child + } + } + } + hidden_effect = { + scope:family = { + change_current_weight = -50 + } + } + if = { + limit = { + any_courtier_or_guest = { + is_available_healthy_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + } + } + ordered_courtier_or_guest = { + limit = { + is_available_healthy_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no + } + order_by = { + value = current_weight + if = { + limit = { has_trait = gluttonous } + add = 1 + } + if = { + limit = { has_trait = comfort_eater } + add = 1 + } + } + save_scope_as = courtier + } + } + } + + option = { # Eat a courtier + name = nomad_events.0210.aa + trigger = { + is_cannibal_trigger = yes + exists = scope:courtier + } + scope:courtier = { + death = { death_reason = death_mysterious } + } + change_current_weight = 25 + stress_impact = { + cannibal = massive_stress_impact_loss + } + ai_chance = { + base = 0 + modifier = { + has_trait = cannibal + add = 100 + } + } + } + + option = { # I can take care of this myself + name = nomad_events.0210.a + trigger = { + has_trait = arrogant + } + add_dread = medium_dread_gain + stress_impact = { + arrogant = medium_stress_impact_loss + calm = major_stress_impact_gain + compassionate = massive_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = calm + } + factor = 0 + } + modifier = { + has_trait = arrogant + factor = 2 + } + } + } + + option = { # I hate to see you like that + name = { + trigger = { + var:family_var = flag:child + } + text = nomad_events.0210.b.child + } + name = { + trigger = { + var:family_var = flag:spouse + } + text = nomad_events.0210.b.spouse + } + progress_towards_friend_effect = { + REASON = friend_offered_roots + CHARACTER = scope:family + OPINION = default_friend_opinion + } + stress_impact = { + compassionate = medium_stress_impact_loss + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 2 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = arrogant + } + add = -50 + } + } + } + + option = { # Thank you + name = nomad_events.0210.c + custom_tooltip = nomad_events_0210_c_tt + set_variable = { + name = nomad_events_0210_herd_var + years = 5 + } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + after = { + remove_variable = family_var + } +} + +############################ +## Weak Is the Arm +## 0220 +############################ + +scripted_trigger nomad_events_0220_valid_spouse = { + is_available_healthy_ai_adult = yes + NOR = { + has_trait = compassionate + has_trait = patient + has_trait = content + has_trait = forgiving + } + NOR = { + has_variable = had_nomad_events_1060_var + has_variable = had_nomad_events_1070_var + } +} + +nomad_events.0220 = { + type = character_event + title = nomad_events.0220.t + desc = nomad_events.0220.desc + theme = nomads + override_background = { reference = mpo_tent_interior_mongol } + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = craven + has_trait = compassionate + } + } + animation = sadness + } + triggered_animation = { + trigger = { + OR = { + has_trait = wrathful + has_trait = arrogant + has_trait = vengeful + has_trait = callous + } + } + animation = anger + } + animation = worry + } + right_portrait = { + character = scope:spouse + animation = dismissal + outfit_tags = { nightgown } + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + OR = { + prowess <= low_skill_rating + AND = { + dread <= 10 + prowess <= mediocre_skill_rating + } + } + any_spouse = { + nomad_events_0220_valid_spouse = yes + } + } + + immediate = { + random_spouse = { + limit = { nomad_events_0220_valid_spouse = yes } + weight = { + base = 1 + modifier = { + this = root.primary_spouse + add = 5 + } + } + set_variable = had_nomad_events_0220_var + save_scope_as = spouse + } + } + + option = { # You're right + name = nomad_events.0220.a + trigger = { + has_trait = craven + } + remove_trait = craven + random_list = { + 1 = { add_trait = fickle } + 1 = { add_trait = arbitrary } + } + scope:spouse = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + stress_impact = { + base = massive_stress_impact_gain + } + ai_chance = { + base = 0 # AI shouldn't give itself a stress break + modifier = { # Unless... (intentional that it requires two traits) + has_trait = ambitious + has_trait = arrogant + add = 100 + } + } + } + + option = { # I will train as hard as I can + name = nomad_events.0220.b + add_prowess_skill = 1 + scope:spouse = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + stress_impact = { + base = major_stress_impact_gain + arrogant = medium_stress_impact_loss + callous = medium_stress_impact_loss + ambitious = major_stress_impact_loss + } + ai_chance = { + base = 0 # Reduce AI sending itself on stress breaks + modifier = { + OR = { + has_trait = arrogant + has_trait = callous + has_trait = ambitious + } + add = 20 + } + } + } + + option = { # This is just who I am + name = nomad_events.0220.c + bp2_lifestyle_xp_gain_per_type_effect = { VALUE = medium } + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } +} + +############################ +## Homesick +## 0230 +############################ + +scripted_trigger nomad_events_0230_valid_spouse = { + is_available_healthy_ai_adult = yes + NOT = { has_trait = callous } + NAND = { + culture = root.culture + culture = location.culture + } + NOT = { has_variable = had_nomad_events_0230_var } +} + +nomad_events.0230 = { + type = character_event + title = nomad_events.0230.t + desc = nomad_events.0230.desc + theme = nomads + override_background = { reference = mpo_tent_interior_mongol } + cooldown = { years = 25 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = dismissal + } + animation = worry + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:spouse + animation = sadness + outfit_tags = { nightgown } + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_spouse = { + nomad_events_0230_valid_spouse = yes + } + } + + immediate = { + random_spouse = { + limit = { nomad_events_0230_valid_spouse = yes } + weight = { + base = 1 + # Someone that you can romance + modifier = { + NOT = { has_relation_lover = root } + can_set_relation_lover_trigger = { CHARACTER = root } + add = 5 + } + modifier = { + this = root.primary_spouse + add = 2 + } + } + set_variable = had_nomad_events_0230_var + save_scope_as = spouse + } + } + + option = { # I miss my culture too + name = nomad_events.0230.a + reason = culture + trigger = { + NOT = { culture = root.location.culture } + } + set_relation_lover = { + target = scope:spouse + reason = lover_homesick_comfort + } + had_sex_with_effect = { + CHARACTER = scope:spouse + PREGNANCY_CHANCE = pregnancy_chance + } + stress_impact = { + compassionate = major_stress_impact_loss + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 2 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + + option = { # Comfort them + name = nomad_events.0230.b + progress_towards_lover_effect = { + REASON = lover_homesick_comfort + CHARACTER = scope:spouse + OPINION = 25 + } + stress_impact = { + compassionate = medium_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 2 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + + option = { # Grow up + name = nomad_events.0230.c + scope:spouse = { + add_character_modifier = { + modifier = mpo_hardened_modifier # Forever + } + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 0 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 2 + } + } + } +} + +############################ +## Unexpected Guests +## 0240 +############################ + +scripted_trigger nomad_events_0240_valid_courtier = { + is_available_healthy_ai_adult = yes + is_close_family_or_spouse_of_root_trigger = no +} + +nomad_events.0240 = { + type = character_event + title = nomad_events.0240.t + desc = nomad_events.0240.desc + theme = nomads + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:courtier + animation = standing_horse + } + lower_center_portrait = scope:ruler + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + any_neighboring_top_liege_realm_owner = { + government_has_flag = government_is_nomadic + } + any_courtier_or_guest = { + nomad_events_0240_valid_courtier = yes + } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { + limit = { government_has_flag = government_is_nomadic } + weight = { # Let's make it interesting + base = 1 + modifier = { + has_relation_rival = root + add = 5 + } + } + save_scope_as = ruler + } + random_courtier = { + limit = { nomad_events_0240_valid_courtier = yes } + save_scope_as = courtier + } + } + + option = { # Secret option if you are rivals + name = nomad_events.0240.a + reason = rival + trigger = { + has_relation_rival = scope:ruler + } + add_dread = medium_dread_gain + domicile = { + change_herd = { + value = medium_herd_gain + subtract = 1 # Funny + } + } + scope:ruler = { + house_feud_start_effect = { + # Feuding House Head + ACTOR = scope:ruler + # Target House Head + TARGET = root + # Feud Reason + REASON = stolen_herd + # House Member attacker if relevant + ATTACKER = root + # House Member victim if relevant + VICTIM = scope:ruler + } + } + stress_impact = { + compassionate = major_stress_impact_loss + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 2 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + + option = { # Return it + name = nomad_events.0240.b + if = { + limit = { + has_relation_rival = scope:ruler + } + remove_relation_rival = scope:ruler + } + add_character_modifier = { + modifier = mpo_honorable_ruler + years = 10 + } + progress_towards_friend_effect = { + REASON = friend_returned_herd + CHARACTER = scope:ruler + OPINION = default_friend_opinion + } + stress_impact = { + compassionate = medium_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 2 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 0 + } + } + } + + option = { # Let's keep it + name = nomad_events.0240.c + domicile = { + change_herd = medium_herd_gain + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 0 + } + modifier = { + OR = { + has_trait = callous + has_trait = sadistic + } + factor = 2 + } + } + } +} + +############################ +## Man of God +## 0250 +############################ + +scripted_trigger nomad_events_0250_valid_priest = { + is_available_ai_adult = yes + faith = { + NOR = { + this = root.faith + this = root.location.county.faith + has_doctrine_parameter = unreformed + this = faith:rabbinism + } + } + trigger_if = { + limit = { + faith = { has_doctrine_parameter = clergy_must_be_male } + } + is_male = yes + } + trigger_else = { + is_male = no + } + NOT = { has_variable = had_nomad_events_0250_var } + NOT = { has_trait = cynical } + learning >= 8 +} + +nomad_events.0250 = { + type = character_event + title = nomad_events.0250.t + desc = nomad_events.0250.desc + theme = nomads + override_background = { reference = mpo_campfire_steppe } + cooldown = { years = 25 } + + left_portrait = { + character = root + animation = drink + } + right_portrait = { + character = scope:priest + animation = holding_staff + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + } + + weight_multiplier = { + base = 1 + modifier = { + any_pool_character = { + province = root.location + nomad_events_0250_valid_priest = yes + } + factor = 2 + } + modifier = { + faith = { has_doctrine_parameter = unreformed } + current_year > 1065 + factor = 2 + } + modifier = { + faith = { has_doctrine_parameter = unreformed } + current_year > 1150 + factor = 2 + } + } + + immediate = { + if = { + limit = { + any_pool_character = { + province = root.location + nomad_events_0250_valid_priest = yes + } + } + random_pool_character = { + province = root.location + limit = { + nomad_events_0250_valid_priest = yes + } + weight = { + base = 1 + modifier = { + has_trait = zealous + add = 5 + } + } + save_scope_as = priest + } + } + else_if = { + limit = { + any_neighboring_top_liege_realm_owner = { + NOR = { + faith = root.faith + faith = { has_doctrine_parameter = unreformed } + } + } + } + random_neighboring_top_liege_realm_owner = { + limit = { + NOR = { + faith = root.faith + faith = { has_doctrine_parameter = unreformed } + } + } + save_scope_as = neighboring_ruler + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = scope:neighboring_ruler.faith + culture = scope:neighboring_ruler.culture + save_scope_as = priest + } + scope:priest = { + save_scope_as = created_priest + } + } + else = { + random_list = { + 10 = { + trigger = { + NOT = { faith = faith:ashari } + NOT = { any_character_situation = { this = situation:game_rule_extra_nomads_sami } } + } + modifier = { + location = { geographical_region = world_steppe_west } + add = 25 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:ashari + culture = culture:bolghar + save_scope_as = priest + } + } + 10 = { + trigger = { + NOT = { faith = faith:kabarism } + any_character_situation = { this = situation:the_great_steppe } + } + modifier = { + location = { geographical_region = world_steppe_west } + add = 5 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:kabarism + culture = culture:khazar + save_scope_as = priest + } + } + 10 = { + trigger = { + NOT = { faith = faith:nestorian } + any_character_situation = { this = situation:the_great_steppe } + } + modifier = { + location = { geographical_region = world_steppe_east } + add = 25 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:nestorian + culture = culture:kerait + save_scope_as = priest + } + } + 10 = { + trigger = { + NOT = { faith = faith:vajrayana } + any_character_situation = { this = situation:the_great_steppe } + } + modifier = { + location = { geographical_region = world_steppe_east } + add = 25 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:vajrayana + culture = culture:uyghur + save_scope_as = priest + } + } + 10 = { + trigger = { + NOT = { faith = faith:manichean } + any_character_situation = { this = situation:the_great_steppe } + } + modifier = { + location = { geographical_region = world_steppe_east } + add = 25 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:manichean + culture = culture:uyghur + save_scope_as = priest + } + } + 10 = { + trigger = { + location = { geographical_region = world_steppe_east } + NOT = { faith = faith:zhengyi } + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:zhengyi + culture = culture:uyghur + save_scope_as = priest + } + } + 10 = { + trigger = { + NOT = { faith = faith:maturidi } + NOT = { any_character_situation = { this = situation:game_rule_extra_nomads_sami } } + } + modifier = { + location = { geographical_region = world_steppe_central } + add = 25 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:maturidi + culture = culture:turkish + save_scope_as = priest + } + } + 10 = { + trigger = { + NOT = { faith = faith:alevi } + any_character_situation = { this = situation:the_great_steppe } + } + modifier = { + location = { geographical_region = world_steppe_central } + add = 15 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:alevi + culture = culture:turkish + save_scope_as = priest + } + } + 10 = { + trigger = { + NOT = { faith = faith:ismaili } + NOT = { any_character_situation = { this = situation:game_rule_extra_nomads_sami } } + } + modifier = { + location = { geographical_region = world_steppe_central } + add = 5 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:ismaili + culture = culture:persian + save_scope_as = priest + } + } + 1 = { # Fallback, rare + trigger = { + NOT = { faith = faith:catholic } + } + modifier = { + any_character_situation = { this = situation:game_rule_extra_nomads_sami } + add = 5000 + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = faith:catholic + culture = culture:italian + save_scope_as = priest + } + } + } + scope:priest = { + save_scope_as = created_priest + } + } + scope:priest = { + set_variable = had_nomad_events_0250_var + } + } + + option = { # Convert + name = nomad_events.0250.a + set_character_faith = scope:priest.faith + domicile = { set_domicile_faith = scope:priest.faith } + add_character_modifier = chosen_by_the_heavens_modifier + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + } + set_county_faith = scope:priest.faith + } + add_piety_level = 1 + stress_impact = { + zealous = massive_stress_impact_gain + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 20 + modifier = { + any_character_situation = { this = situation:the_great_steppe } + OR = { + scope:priest.faith = faith:orthodox + scope:priest.religion = religion:hinduism_religion + } + add = -30 + } + modifier = { + highest_held_title_tier >= tier_kingdom + faith = { + has_doctrine_parameter = unreformed + } + factor = 4 + } + modifier = { + current_year > 1065 + factor = 2 + } + modifier = { + current_year > 1150 + factor = 2 + } + modifier = { + scope:priest.faith = { has_doctrine_parameter = unreformed } + factor = 0 + } + modifier = { # Non-steppe regions are stickier and convert less freely + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + any_character_situation = { + OR = { + this = situation:game_rule_extra_nomads_arabs + this = situation:game_rule_extra_nomads_sahel + this = situation:game_rule_extra_nomads_horn + this = situation:game_rule_extra_nomads_sami + this = situation:game_rule_extra_nomads_tibet + } + } + factor = 0 + } + modifier = { + has_trait = zealous + factor = 0 + } + } + } + + option = { # Invite them to stay + name = nomad_events.0250.b + add_courtier = scope:priest + add_hook = { + type = obligation_hook + target = scope:priest + } + custom_tooltip = obligation_hook_tt + stress_impact = { + compassionate = medium_stress_impact_loss + gregarious = medium_stress_impact_loss + shy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = shy + has_trait = paranoid + has_trait = callous + } + factor = 0 + } + modifier = { + OR = { + has_trait = compassionate + has_trait = gregarious + } + factor = 2 + } + } + } + + option = { # Tell them to go away + name = nomad_events.0250.c + add_piety = minor_piety_gain + stress_impact = { + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + shy = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + callous = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = gregarious + } + factor = 0 + } + modifier = { + OR = { + has_trait = shy + has_trait = callous + has_trait = paranoid + } + factor = 2 + } + } + } + + after = { + if = { + limit = { + scope:priest = { + NOT = { + is_courtier_of = root + } + } + } + hidden_effect = { + if = { + limit = { + is_ai = no + exists = scope:created_priest + } + scope:priest = { move_to_pool = yes } + } + else = { + scope:priest = { + death = { death_reason = death_mysterious } + } + } + } + } + } +} + +############################ +## Religious Matters +## 0260 +############################ + +scripted_trigger nomad_events_0260_ruler_trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + NOR = { + government_has_flag = government_is_nomadic + government_has_flag = government_is_herder + culture = root.culture + culture = root.capital_county.culture + faith = root.faith + faith = root.capital_county.faith + faith = { + has_doctrine_parameter = unreformed + } + } + highest_held_title_tier >= tier_kingdom + capital_province = { + squared_distance = { + target = root.capital_province + value <= squared_distance_massive + } + } +} + +nomad_events.0260 = { + type = character_event + title = nomad_events.0260.t + desc = nomad_events.0260.desc + theme = nomads + override_background = { reference = throne_room } + cooldown = { years = 25 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = zealous } + animation = anger + } + triggered_animation = { + trigger = { + OR = { + has_trait = sadistic + has_trait = torturer + has_trait = cynical + } + } + animation = dismissal + } + animation = interested + } + right_portrait = { + character = scope:priest + animation = obsequious_bow + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + is_landed = yes + any_ruler = { nomad_events_0260_ruler_trigger = yes } + } + + weight_multiplier = { + base = 1 + modifier = { # Tier instead of Dominance because people outside of the Steppe don't care for that + faith = { has_doctrine_parameter = unreformed } + highest_held_title_tier >= tier_kingdom + factor = 3 + } + modifier = { + faith = { has_doctrine_parameter = unreformed } + current_year > 1065 + factor = 2 + } + modifier = { + faith = { has_doctrine_parameter = unreformed } + current_year > 1150 + factor = 2 + } + modifier = { + is_ai = yes + NOT = { + faith = { + has_doctrine_parameter = unreformed + } + } + factor = 0.1 + } + } + + immediate = { + random_ruler = { + limit = { nomad_events_0260_ruler_trigger = yes } + weight = { + base = 1 + modifier = { # Catholics already end up in the Steppe + faith = faith:catholic + add = -250 + } + modifier = { # Hindus shouldn't end up in the Steppe + religion = religion:hinduism_religion + add = -100 + } + } + save_scope_as = other_ruler + primary_title = { save_scope_as = distant_realm } + } + create_character = { + location = root.location + template = priest_character_template + gender_female_chance = root_faith_clergy_gender_female_chance + faith = scope:other_ruler.faith + culture = scope:other_ruler.culture + save_scope_as = priest + } + hidden_effect = { + scope:other_ruler = { add_courtier = scope:priest } + } + } + + option = { # Imprison them + name = nomad_events.0260.a + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + } + add_dread = medium_dread_gain + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:priest + IMPRISONER = root + } + stress_impact = { + sadistic = major_stress_impact_loss + callous = major_stress_impact_loss + torturer = major_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + has_trait = compassionate + factor = 0 + } + modifier = { + OR = { + has_trait = sadistic + has_trait = callous + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_intimidation_focus } + } + factor = 2 + } + } + } + + option = { # Convert + name = nomad_events.0260.b + set_character_faith = scope:priest.faith + domicile = { set_domicile_faith = scope:priest.faith } + add_character_modifier = chosen_by_the_heavens_modifier + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + } + set_county_faith = scope:priest.faith + } + add_courtier = scope:priest + add_piety_level = 1 + stress_impact = { + zealous = massive_stress_impact_gain + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + any_character_situation = { this = situation:the_great_steppe } + OR = { + scope:priest.faith = faith:orthodox + scope:priest.religion = religion:hinduism_religion + } + add = -30 + } + modifier = { + highest_held_title_tier >= tier_kingdom + faith = { + has_doctrine_parameter = unreformed + } + factor = 4 + } + modifier = { + current_year > 1065 + factor = 2 + } + modifier = { + current_year > 1150 + factor = 2 + } + modifier = { + has_trait = zealous + factor = 0 + } + modifier = { + scope:priest.faith = faith:catholic + any_character_situation = { + OR = { + this = situation:the_great_steppe + this = situation:game_rule_extra_nomads_sahel + this = situation:game_rule_extra_nomads_horn + this = situation:game_rule_extra_nomads_arabs + } + } + factor = 0 + } + modifier = { # Non-steppe regions are stickier and convert less freely + faith = { + NOT = { has_doctrine_parameter = unreformed } + } + any_character_situation = { + OR = { + this = situation:game_rule_extra_nomads_arabs + this = situation:game_rule_extra_nomads_sahel + this = situation:game_rule_extra_nomads_horn + this = situation:game_rule_extra_nomads_sami + this = situation:game_rule_extra_nomads_tibet + } + } + factor = 0 + } + } + } + + option = { # It's time to de-bate! + name = nomad_events.0260.c + duel = { + skill = learning + target = scope:priest + 10 = { # They are mega convinced + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = nomad_events.0260.c.tt.crit_success + send_interface_toast = { + title = nomad_events.0260.c.tt.crit_success + left_icon = scope:priest + add_learning_skill = 1 + add_learning_lifestyle_xp = major_lifestyle_xp + } + } + 40 = { # They are convinced + desc = nomad_events.0260.c.tt.success + send_interface_toast = { + title = nomad_events.0260.c.tt.success + left_icon = scope:priest + add_learning_lifestyle_xp = medium_lifestyle_xp + } + } + 40 = { # _You_ are convinced + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = nomad_events.0260.c.tt.failure + send_interface_toast = { + title = nomad_events.0260.c.tt.failure + left_icon = scope:priest + add_learning_lifestyle_xp = medium_lifestyle_xp + add_prestige = minor_piety_loss # Everyone saw you suck + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + stubborn = medium_stress_impact_loss + zealous = major_stress_impact_loss + theologian = major_stress_impact_loss + scholar = major_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + has_trait = cynical + factor = 0 + } + modifier = { + OR = { + has_trait = stubborn + has_trait = zealous + has_trait = theologian + has_trait = scholar + } + factor = 2 + } + } + } + + option = { # Just go away + name = nomad_events.0260.d + add_dread = minor_dread_gain + stress_impact = { + compassionate = major_stress_impact_gain + gregarious = major_stress_impact_gain + shy = medium_stress_impact_loss + callous = medium_stress_impact_loss + paranoid = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = compassionate + has_trait = gregarious + } + factor = 0 + } + modifier = { + OR = { + has_trait = shy + has_trait = callous + has_trait = paranoid + } + factor = 2 + } + } + } + + after = { + hidden_effect = { + if = { + limit = { + is_ai = yes + NOT = { + scope:priest = { + is_courtier_of = root + } + } + } + scope:priest = { + death = { death_reason = death_mysterious } + } + } + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_nomads_flavour_events_oltner.txt b/N3OW/events/dlc/mpo/mpo_nomads_flavour_events_oltner.txt new file mode 100644 index 00000000..d4170ed4 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_nomads_flavour_events_oltner.txt @@ -0,0 +1,1043 @@ +namespace = nomad_events_oltner + +# Hunt sighting in your lands +# Bird sighting in your lands +# Dangerous Hunt sighting in your lands +# Zud - Dangerous animals eat your herd +# Good season! Animals aplenty. +# You are offered a skilled Master of the Chase from a tributary +# Given a falcon from a vassal/tributary + +nomad_events_oltner.0001 = { # Hunt sighting in your lands + type = character_event + title = nomad_events_oltner.0001.t + desc = nomad_events_oltner.0001.desc + theme = hunting + left_portrait = { + character = root + animation = horse_archer_idle + camera = camera_event_horse_right + } + cooldown = { years = 3 } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + is_at_war = no + is_landed = yes + any_sub_realm_county = { + count >= 2 + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + } + + immediate = { + hidden_effect = { + every_sub_realm_county = { + limit = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + add_to_list = sighting_counties + } + random_in_list = { + list = sighting_counties + limit = { hunt_activity_recent_hunt_sighting_trigger = no } + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + save_scope_as = sighting_county_1 + random_county_province = { + weight = { + base = 1 + hunt_activity_sighting_terrain_modifier = yes + hunt_activity_sighting_building_modifier = { PROVINCE = this } + hunt_activity_game_building_modifier = { PROVINCE = this } + } + save_scope_as = sighting_province_1 + } + } + random_in_list = { + list = sighting_counties + limit = { + hunt_activity_recent_hunt_sighting_trigger = no + this != scope:sighting_county_1 + } + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + save_scope_as = sighting_county_2 + random_county_province = { + weight = { + base = 1 + hunt_activity_sighting_terrain_modifier = yes + hunt_activity_sighting_building_modifier = { PROVINCE = this } + hunt_activity_game_building_modifier = { PROVINCE = this } + } + save_scope_as = sighting_province_2 + } + } + scope:sighting_county_1 = { + hunt_activity_standard_game_effect = { PROVINCE = scope:sighting_province_1 HUNTER = root } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = standard + ANIMAL = var:animal_type + OWNER = root + } + } + scope:sighting_county_2 = { + hunt_activity_dangerous_game_effect = { PROVINCE = scope:sighting_province_2 } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = dangerous + ANIMAL = var:animal_type + OWNER = root + } + } + } + } + + option = { # First sighting + name = nomad_events_oltner.0001.a + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_standard_modifier + } + } + hidden_effect = { + scope:sighting_county_2 = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + } + } + ai_chance = { + base = 100 + } + } + + option = { # Second sighting + name = nomad_events_oltner.0001.b + scope:sighting_county_2 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_dangerous_modifier + } + } + hidden_effect = { + scope:sighting_county_1 = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + } + } + ai_chance = { + base = 100 + } + } + + option = { # Ignore + name = nomad_events_oltner.0001.c + add_prestige = minor_prestige_gain + hidden_effect = { + scope:sighting_county_1 = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + } + scope:sighting_county_2 = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + } + } + ai_chance = { + base = 0 + } + } + + after = { + if = { + limit = { + is_ai = yes + is_at_war = no + } + ai_attempt_to_host_activity = activity_hunt + } + } +} + +nomad_events_oltner.0002 = { # Bird sighting in your lands + type = character_event + title = nomad_events_oltner.0002.t + desc = nomad_events_oltner.0002.desc + theme = hunting + left_portrait = { + character = root + animation = horse_archer_aggressive + camera = camera_event_horse_right + } + + cooldown = { years = 3 } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + # Falconry DLC feature + has_dlc_feature = tours_and_tournaments + is_available_adult = yes + is_at_war = no + is_landed = yes + any_sub_realm_county = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + } + + immediate = { + hidden_effect = { + random_sub_realm_county = { + limit = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + save_scope_as = sighting_county_1 + random_county_province = { + weight = { + base = 1 + hunt_activity_sighting_terrain_modifier = yes + hunt_activity_sighting_building_modifier = { PROVINCE = this } + hunt_activity_game_building_modifier = { PROVINCE = this } + } + save_scope_as = sighting_province_1 + } + } + scope:sighting_county_1 = { + hunt_activity_falconry_game_effect = { PROVINCE = scope:sighting_province_1 } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = falconry + ANIMAL = var:animal_type + OWNER = root + } + } + } + } + + option = { # Birds spotted + name = nomad_events_oltner.0002.a + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_falconry_modifier + } + } + ai_chance = { + base = 100 + } + } + + option = { # Rather hunt land prey + name = nomad_events_oltner.0002.b + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_standard_modifier + } + } + hidden_effect = { + scope:sighting_county_1 = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + hunt_activity_standard_game_effect = { PROVINCE = scope:sighting_province_1 HUNTER = root } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = standard + ANIMAL = var:animal_type + OWNER = root + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Ignore + name = nomad_events_oltner.0002.c + add_prestige = minor_prestige_gain + hidden_effect = { + scope:sighting_county_1 = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + } + } + ai_chance = { + base = 0 + } + } + + after = { + if = { + limit = { + is_ai = yes + is_at_war = no + } + ai_attempt_to_host_activity = activity_hunt + } + } +} + +nomad_events_oltner.0003 = { # Danger sighting in your lands + type = character_event + title = nomad_events_oltner.0003.t + desc = nomad_events_oltner.0003.desc + theme = hunting + left_portrait = { + character = root + animation = horse_archer_aggressive + camera = camera_event_horse_right + } + + cooldown = { years = 3 } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + is_at_war = no + is_landed = yes + any_sub_realm_county = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + any_maa_regiment = { + } + } + + immediate = { + hidden_effect = { + random_sub_realm_county = { + limit = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + save_scope_as = sighting_county_1 + random_county_province = { + weight = { + base = 1 + hunt_activity_sighting_terrain_modifier = yes + hunt_activity_sighting_building_modifier = { PROVINCE = this } + hunt_activity_game_building_modifier = { PROVINCE = this } + } + save_scope_as = sighting_province_1 + } + } + scope:sighting_county_1 = { + hunt_activity_dangerous_game_effect = { PROVINCE = scope:sighting_province_1 } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = dangerous + ANIMAL = var:animal_type + OWNER = root + } + } + } + domicile = { + change_herd = { + value = -21 + } + } + random_maa_regiment = { + save_scope_as = maa_regiment + } + } + + option = { # Go after them + name = nomad_events_oltner.0003.a + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_dangerous_modifier + } + } + stress_impact = { + brave = minor_stress_impact_loss + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Send troops to kill the wolf pack + name = nomad_events_oltner.0003.b + add_prestige = medium_prestige_gain + scope:maa_regiment = { + change_maa_troops_count = { + value = { + value = this.maa_current_troops_count + multiply = -0.1 + } + } + } + scope:sighting_county_1 = { + show_as_tooltip = { + remove_county_modifier = hunt_sighting_dangerous_modifier + } + } + hidden_effect = { + scope:sighting_county_1 = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + } + } + ai_chance = { + base = 100 + } + } + + option = { # Ignore + name = nomad_events_oltner.0003.c + add_piety = minor_piety_gain + scope:sighting_county_1 = { + show_as_tooltip = { + remove_county_modifier = hunt_sighting_dangerous_modifier + } + } + stress_impact = { + brave = medium_stress_impact_gain + craven = minor_stress_impact_loss + } + hidden_effect = { + scope:sighting_county_1 = { + hunt_remove_sighting_effect = yes + remove_variable = recent_sighting + } + } + ai_chance = { + base = 0 + } + } + + after = { + if = { + limit = { + is_ai = yes + is_at_war = no + } + ai_attempt_to_host_activity = activity_hunt + } + } +} + +nomad_events_oltner.0004 = { # Zud - Dangerous animals eat your herd + type = character_event + title = nomad_events_oltner.0004.t + desc = nomad_events_oltner.0004.desc + theme = hunting + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_right + } + + widgets = { + widget = { + is_shown = { + any_character_situation = { + 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 + } + } + } + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + widget = { + is_shown = { + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_cold_zud_season + situation_sub_region_has_county = root.capital_county + } + } + } + gui = "event_window_widget_vfx_snowstorm" + container = "foreground_shader_vfx_container" + } + } + + cooldown = { years = 3 } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + is_at_war = no + is_landed = yes + any_sub_realm_county = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + any_character_situation = { + OR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_havsarsan_zud_season + situation_sub_region_has_county = root.capital_county + } + 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 + } + } + } + } + + immediate = { + hidden_effect = { + random_sub_realm_county = { + limit = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + save_scope_as = sighting_county_1 + random_county_province = { + weight = { + base = 1 + hunt_activity_sighting_terrain_modifier = yes + hunt_activity_sighting_building_modifier = { PROVINCE = this } + hunt_activity_game_building_modifier = { PROVINCE = this } + } + save_scope_as = sighting_province_1 + } + } + scope:sighting_county_1 = { + hunt_activity_dangerous_game_effect = { PROVINCE = scope:sighting_province_1 } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = dangerous + ANIMAL = var:animal_type + OWNER = root + } + } + } + random_character_situation = { + limit = { + any_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + random_participant_group = { + limit = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + participant_group_sub_region = { save_scope_as = my_subregion } + } + } + } + + option = { # Go after them + name = nomad_events_oltner.0004.a + add_prowess_skill = 2 + domicile = { + change_herd = minor_herd_loss + } + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_dangerous_modifier + } + } + ai_chance = { + base = 100 + } + } + + option = { # Go after them + name = nomad_events_oltner.0004.b + add_stewardship_skill = 1 + domicile = { + change_herd = medium_herd_loss + } + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_dangerous_modifier + } + } + ai_chance = { + base = 100 + } + } + + after = { + if = { + limit = { + is_ai = yes + is_at_war = no + } + ai_attempt_to_host_activity = activity_hunt + } + } +} + +nomad_events_oltner.0005 = { # Good season! Animals aplenty. + type = character_event + title = nomad_events_oltner.0005.t + desc = nomad_events_oltner.0005.desc + theme = hunting + left_portrait = { + character = root + animation = horse_archer_idle + camera = camera_event_horse_right + } + + cooldown = { years = 3 } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + is_at_war = no + is_landed = yes + any_sub_realm_county = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + any_character_situation = { + OR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_abundant_grazing_season + situation_sub_region_has_county = root.location.county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_warm_nights_season + situation_sub_region_has_county = root.location.county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = root.location.county + + } + } + } + } + + immediate = { + hidden_effect = { + random_sub_realm_county = { + limit = { + hunt_activity_recent_hunt_sighting_trigger = no + is_landless_type_title = no + } + weight = { + base = 1 + hunt_activity_sighting_county_modifier = yes + } + save_scope_as = sighting_county_1 + random_county_province = { + weight = { + base = 1 + hunt_activity_sighting_terrain_modifier = yes + hunt_activity_sighting_building_modifier = { PROVINCE = this } + hunt_activity_game_building_modifier = { PROVINCE = this } + } + save_scope_as = sighting_province_1 + } + } + } + random_character_situation = { + limit = { + any_participant_group = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + } + random_participant_group = { + limit = { + participant_group_type = nomad_rulers_capital + participant_group_has_character = root + } + participant_group_sub_region = { save_scope_as = my_subregion } + } + } + } + + option = { # Dangerous game + name = nomad_events_oltner.0005.a + add_prowess_skill = 1 + + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_dangerous_modifier + } + } + hidden_effect = { + scope:sighting_county_1 = { + hunt_activity_dangerous_game_effect = { PROVINCE = scope:sighting_province_1 } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = dangerous + ANIMAL = var:animal_type + OWNER = root + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Regular game + name = nomad_events_oltner.0005.b + add_piety = medium_piety_gain + + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_standard_modifier + } + } + hidden_effect = { + scope:sighting_county_1 = { + hunt_activity_standard_game_effect = { PROVINCE = scope:sighting_province_1 HUNTER = root } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = standard + ANIMAL = var:animal_type + OWNER = root + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Birb + name = nomad_events_oltner.0005.c + add_prestige = medium_prestige_gain + + scope:sighting_county_1 = { + show_as_tooltip = { + add_county_modifier = hunt_sighting_falconry_modifier + } + } + hidden_effect = { + scope:sighting_county_1 = { + hunt_activity_falconry_game_effect = { PROVINCE = scope:sighting_province_1 } + # Create new sighting + hunt_create_sighting_effect = { + TYPE = falconry + ANIMAL = var:animal_type + OWNER = root + } + } + } + ai_chance = { + base = 100 + } + } + + after = { + if = { + limit = { + is_ai = yes + is_at_war = no + } + ai_attempt_to_host_activity = activity_hunt + } + } +} + +nomad_events_oltner.0006 = { # You are offered a skilled Master of the Chase from a tributary + type = character_event + title = nomad_events_oltner.0006.t + desc = nomad_events_oltner.0006.desc + theme = nomads + left_portrait = { + character = scope:offered_master_of_the_hunt + animation = hunting_knife_start + } + right_portrait = { + character = scope:generous_tributary + animation = obsequious_bow + } + + cooldown = { years = 5 } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + is_at_war = no + is_landed = yes + is_valid_to_hire_court_position_type = master_of_hunt_court_position + OR = { + NOT = { employs_court_position = master_of_hunt_court_position } + court_position:master_of_hunt_court_position ?= { + aptitude = { + court_position = master_of_hunt_court_position + value < 4 + } + } + } + any_tributary = { + is_available_ai_adult = yes + is_at_war = no + NOT = { has_relation_rival = root } + any_courtier = { + is_available_healthy_ai_adult = yes + master_of_hunt_validity_trigger = { EMPLOYER = root } + NOR = { + is_close_or_extended_family_of = root + is_close_family_of = prev + has_relation_rival = root + has_court_position = court_astrologer_court_position + } + aptitude = { + court_position = master_of_hunt_court_position + value >= 4 + } + } + } + } + + immediate = { + random_tributary = { + limit = { + is_available_adult = yes + is_at_war = no + NOT = { has_relation_rival = root } + any_courtier = { + is_available_healthy_ai_adult = yes + master_of_hunt_validity_trigger = { EMPLOYER = root } + NOR = { + is_close_or_extended_family_of = root + is_close_family_of = prev + has_relation_rival = root + has_court_position = court_astrologer_court_position + } + aptitude = { + court_position = master_of_hunt_court_position + value >= 4 + } + } + } + save_scope_as = generous_tributary + random_courtier = { + limit = { + is_available_healthy_ai_adult = yes + master_of_hunt_validity_trigger = { EMPLOYER = root } + NOR = { + is_close_or_extended_family_of = root + is_close_family_of = prev + has_relation_rival = root + has_court_position = court_astrologer_court_position + } + aptitude = { + court_position = master_of_hunt_court_position + value >= 4 + } + } + save_scope_as = offered_master_of_the_hunt + hidden_effect = { + assign_random_nickname_effect = yes + } + } + } + } + + option = { # Accept + name = nomad_events_oltner.0006.a + + court_position_grant_effect = { POS = master_of_hunt CANDIDATE = scope:offered_master_of_the_hunt EMPLOYER = root } + + reverse_add_opinion = { + target = scope:offered_master_of_the_hunt + modifier = loyal_servant + } + + stress_impact = { + arrogant = minor_stress_loss + ambitious = minor_stress_loss + paranoid = minor_stress_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # Accept and reward + name = nomad_events_oltner.0006.b + + pay_short_term_gold = { + target = scope:generous_tributary + gold = minor_gold_value + } + + reverse_add_opinion = { + target = scope:generous_tributary + modifier = obedience_opinion + } + + court_position_grant_effect = { POS = master_of_hunt CANDIDATE = scope:offered_master_of_the_hunt EMPLOYER = root } + + reverse_add_opinion = { + target = scope:offered_master_of_the_hunt + modifier = loyal_servant + } + + stress_impact = { + arrogant = minor_stress_loss + ambitious = minor_stress_loss + paranoid = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + gold < major_gold_value + } + } + } + + option = { # Deny + name = nomad_events_oltner.0006.c + + reverse_add_opinion = { + target = scope:generous_tributary + modifier = respect_opinion + opinion = 15 + } + + stress_impact = { + paranoid = minor_stress_loss + } + + ai_chance = { + base = 0 + } + } + + after = { + if = { + limit = { + is_ai = yes + is_at_war = no + } + ai_attempt_to_host_activity = activity_hunt + } + } +} + +nomad_events_oltner.0007 = { # You are offered a falcon from a tributary + type = character_event + title = nomad_events_oltner.0007.t + desc = nomad_events_oltner.0007.desc + theme = nomads + left_portrait = { + character = root + animation = hunting_knife_start + } + right_portrait = { + character = scope:generous_tributary + animation = hunting_falcon + } + + cooldown = { years = 10 } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available_adult = yes + is_at_war = no + is_landed = yes + NOT = { + has_character_modifier = peregrine_falcon + } + any_tributary = { + is_available_ai_adult = yes + is_at_war = no + NOT = { has_relation_rival = root } + } + } + + immediate = { + random_tributary = { + limit = { + is_available_ai_adult = yes + is_at_war = no + NOT = { has_relation_rival = root } + } + save_scope_as = generous_tributary + capital_county = { save_scope_as = tribute_capital_county } + capital_province = { save_scope_as = tribute_capital } + } + } + + option = { # Accept + name = nomad_events_oltner.0007.a + + add_character_modifier = { + modifier = peregrine_falcon + years = 7 + } + + stress_impact = { + arrogant = minor_stress_loss + ambitious = minor_stress_loss + } + + ai_chance = { + base = 100 + } + } + + option = { # Accept and reward + name = nomad_events_oltner.0007.b + + reverse_add_opinion = { + target = scope:generous_tributary + modifier = respect_opinion + opinion = 15 + } + + ai_chance = { + base = 0 + } + } + + after = { + if = { + limit = { + is_ai = yes + is_at_war = no + } + ai_attempt_to_host_activity = activity_hunt + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_nomads_season_events.txt b/N3OW/events/dlc/mpo/mpo_nomads_season_events.txt new file mode 100644 index 00000000..cc68cd47 --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_nomads_season_events.txt @@ -0,0 +1,856 @@ +namespace = mpo_nomads_season_events + +mpo_nomads_season_events.0001 = { # Riding the Storm + type = character_event + title = mpo_nomads_season_events.0001.t + desc = mpo_nomads_season_events.0001.desc + + theme = nomads + + override_background = { reference = mpo_steppe_evening } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = scheme + } + + right_portrait = { + character = scope:storm_chaser + animation = marshal_random_weapon + } + + lower_right_portrait = { + character = scope:raid_target + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available = yes + any_character_situation = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_severe_drought_season + situation_sub_region_has_county = root.capital_county + } + } + any_councillor = { + is_kurultai_trigger = yes + is_available = yes + } + any_neighboring_top_liege_realm_owner = { + is_ai = yes + NOR = { + is_at_war_with = root + is_allied_to = root + has_truce = root + has_relation_friend = root + has_relation_best_friend = root + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = -0.5 + is_ai = yes + } + } + + immediate = { + random_councillor = { + limit = { + is_kurultai_trigger = yes + is_available = yes + } + save_scope_as = storm_chaser + } + random_neighboring_top_liege_realm_owner = { + limit = { + is_ai = yes + NOR = { + is_at_war_with = root + is_allied_to = root + has_truce = root + has_relation_friend = root + has_relation_best_friend = root + } + } + save_scope_as = raid_target + } + scope:raid_target = { + capital_county = { + save_scope_as = raid_county + } + } + } + + option = { # Tomorrow, we ride! + name = mpo_nomads_season_events.0001.a + scope:raid_target = { + pay_herd = { + target = root + value = scope:raid_target.domicile.medium_herd_value + } + add_opinion = { + target = root + modifier = stole_my_herd + } + } + add_dread = medium_dread_gain + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:raid_target } + } + progress_towards_rival_effect = { + REASON = stole_my_herd + CHARACTER = scope:raid_target + OPINION = 0 + } + } + stress_impact = { + lazy = minor_stress_impact_gain + content = minor_stress_impact_gain + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = lazy + has_trait = content + has_trait = just + } + add = -50 + } + ai_value_modifier = { + ai_honor = -1 + } + } + } + + option = { # We must see to our own shelter. + name = mpo_nomads_season_events.0001.b + + root.capital_county = { + add_county_modifier = { + modifier = mpo_storm_shelter_modifier + years = 5 + } + } + + stress_impact = { + vengeful = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = vengeful + has_trait = sadistic + } + add = -50 + } + ai_value_modifier = { + ai_honor = 1 + } + } + } +} + +mpo_nomads_season_events.0005 = { # Hungry vassal + type = character_event + title = mpo_nomads_season_events.0005.t + desc = mpo_nomads_season_events.0005.desc + + theme = nomads + + override_background = { reference = mpo_tent_interior_mongol } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = shame + } + + right_portrait = { + character = scope:hungry_neighbour + animation = obsequious_bow + } + + trigger = { + government_has_flag = government_is_nomadic + has_mpo_dlc_trigger = yes + is_available = yes + any_character_situation = { + NOR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_abundant_grazing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_warm_nights_season + situation_sub_region_has_county = root.capital_county + } + } + } + any_vassal = { + is_available_ai = yes + NOT = { + has_opinion_modifier = { + modifier = obedience_opinion + target = root + } + } + domicile ?= { + herd < minor_herd_value + } + } + } + + immediate = { + random_vassal = { + limit = { + is_available_ai = yes + NOT = { + has_opinion_modifier = { + modifier = obedience_opinion + target = root + } + } + domicile ?= { + herd < minor_herd_value + } + } + save_scope_as = hungry_neighbour + } + } + + option = { # Give herd + name = mpo_nomads_season_events.0005.a + + pay_herd = { + target = scope:hungry_neighbour + value = domicile.minor_herd_value + } + send_interface_toast = { + type = event_toast_effect_good + title = mpo_demand_obedience_interaction_toast + left_icon = scope:hungry_neighbour + scope:hungry_neighbour = { + add_opinion = { + target = root + modifier = obedience_opinion + } + } + } + scope:hungry_neighbour = { + add_character_flag = given_herd + } + + stress_impact = { + compassionate = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + domicile ?= { + herd < medium_herd_value + } + has_trait = paranoid + has_trait = greedy + } + } + modifier = { + factor = 20 + has_trait = compassionate + } + ai_value_modifier = { + ai_sociability = 1 + ai_greed = -1 + } + } + } + + option = { # Arrange trade + name = mpo_nomads_season_events.0005.b + trigger = { + scope:hungry_neighbour = { + gold > root.medium_gold_value + } + } + pay_herd = { + target = scope:hungry_neighbour + value = domicile.minor_herd_value + } + scope:hungry_neighbour = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + modifier = { + factor = 0 + domicile ?= { + herd < medium_herd_value + } + } + } + } + + option = { # I think not! + name = mpo_nomads_season_events.0005.c + reverse_add_opinion = { + target = scope:hungry_neighbour + modifier = insulted_opinion + opinion = -15 + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_sociability = -1 + ai_greed = -1 + } + } + } +} + +mpo_nomads_season_events.0010 = { # Your vassal offers herd during a season of bounty + type = character_event + title = mpo_nomads_season_events.0010.t + desc = { + desc = mpo_nomads_season_events.0010.desc + first_valid = { + triggered_desc = { + trigger = { + scope:rich_neighbour = { has_character_flag = given_herd } + } + desc = mpo_nomads_season_events.0010.desc_offered_herd + } + desc = mpo_nomads_season_events.0010.desc_fallback + } + } + + theme = nomads + + override_background = { reference = mpo_tent_interior_mongol } + + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = cynical + } + animation = personality_cynical + } + triggered_animation = { + trigger = { + scope:rich_neighbour = { has_character_flag = given_herd } + } + animation = flirtation + } + animation = personality_greedy + } + + right_portrait = { + character = scope:rich_neighbour + triggered_animation = { + trigger = { + scope:rich_neighbour = { has_character_flag = given_herd } + } + animation = obsequious_bow + } + animation = steward + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available = yes + any_character_situation = { + OR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_abundant_grazing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_warm_nights_season + situation_sub_region_has_county = root.capital_county + } + } + } + any_vassal = { + is_available_ai = yes + trigger_if = { + limit = { + NOT = { has_character_flag = given_herd } + } + NOR = { + is_councillor_of = root + has_relation_blood_brother = root + has_relation_friend = root + has_relation_best_friend = root + } + } + domicile ?= { + herd > minor_herd_value + } + } + } + + immediate = { + random_vassal = { + limit = { + is_available_ai = yes + trigger_if = { + limit = { + NOT = { has_character_flag = given_herd } + } + NOR = { + is_councillor_of = root + has_relation_blood_brother = root + has_relation_friend = root + has_relation_best_friend = root + } + } + domicile ?= { + herd > minor_herd_value + } + } + save_scope_as = rich_neighbour + } + } + + option = { # Yes, I will buy herd from you. + name = mpo_nomads_season_events.0010.a + trigger = { + NOT = { + scope:rich_neighbour = { + has_character_flag = given_herd + } + } + } + pay_short_term_gold = { + target = scope:rich_neighbour + gold = medium_gold_value + } + scope:rich_neighbour = { + pay_herd = { + target = root + value = scope:rich_neighbour.domicile.minor_herd_value + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + modifier = { + factor = 50 + domicile ?= { + herd < minor_herd_value + } + } + modifier = { + gold <= major_gold_value + factor = 0 + } + } + } + + option = { # Forget the herd, I want you as my bro! + name = mpo_nomads_season_events.0010.c + trigger = { + scope:rich_neighbour = { + has_character_flag = given_herd + } + can_set_relation_blood_brother_trigger = { CHARACTER = scope:rich_neighbour } + } + add_internal_flag = special + reason = gave_herd + + set_relation_blood_brother = { + reason = sworn_blood_brother + target = scope:rich_neighbour + } + + stress_impact = { + paranoid = medium_stress_impact_gain + gregarious = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + factor = 0 + has_trait = paranoid + } + modifier = { + add = 50 + has_trait = gregarious + } + } + } + + option = { # Free herd? Yes please! + name = mpo_nomads_season_events.0010.b + trigger = { + scope:rich_neighbour = { + has_character_flag = given_herd + } + } + scope:rich_neighbour = { + pay_herd = { + target = root + value = scope:rich_neighbour.domicile.medium_herd_value + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { # Give me your herd, or your head! + name = mpo_nomads_season_events.0010.d + trigger = { + NOT = { + scope:rich_neighbour = { + has_character_flag = given_herd + } + } + is_ai = no + } + duel = { + skill = prowess + target = scope:rich_neighbour + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_nomads_season_events.0010.d.tt.success + scope:rich_neighbour = { + pay_herd = { + target = root + value = scope:rich_neighbour.domicile.medium_herd_value + } + increase_wounds_effect = { REASON = fight } + } + send_interface_toast = { + title = mpo_nomads_season_events.0010.d.tt.success + left_icon = root + right_icon = scope:rich_neighbour + scope:rich_neighbour = { + add_opinion = { + target = root + modifier = stole_my_herd + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_nomads_season_events.0010.d.tt.failure + add_prestige = minor_prestige_loss + send_interface_toast = { + title = mpo_nomads_season_events.0010.d.tt.failure + left_icon = scope:rich_neighbour + reverse_add_opinion = { + target = scope:rich_neighbour + modifier = insult_opinion + opinion = -25 + } + } + } + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:rich_neighbour } + } + progress_towards_rival_effect = { + REASON = stole_my_herd + CHARACTER = scope:rich_neighbour + OPINION = 0 + } + } + stress_impact = { + just = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 1 + } + modifier = { + factor = 0 + has_trait = just + } + modifier = { + factor = 50 + prowess > mediocre_skill_rating + } + } + } + option = { # I have no need to trade. + name = mpo_nomads_season_events.0010.e + trigger = { + NOT = { + scope:rich_neighbour = { + has_character_flag = given_herd + } + } + } + reverse_add_opinion = { + target = scope:rich_neighbour + modifier = insulted_opinion + opinion = -15 + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_greed = 1 + } + } + } + after = { + scope:rich_neighbour = { + if = { + limit = { + has_character_flag = given_herd + } + remove_character_flag = given_herd + } + } + } +} + +mpo_nomads_season_events.0015 = { # Two Kurultai members fight over food + type = character_event + title = mpo_nomads_season_events.0015.t + desc = mpo_nomads_season_events.0015.desc + + theme = nomads + + override_background = { reference = mpo_campfire_steppe } + + cooldown = { years = 10 } + + left_portrait = { + character = scope:kurultai_1 + animation = war_attacker + } + + right_portrait = { + character = scope:kurultai_2 + animation = aggressive_unarmed + } + + trigger = { + has_mpo_dlc_trigger = yes + government_has_flag = government_is_nomadic + is_available = yes + any_character_situation = { + NOR = { + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_abundant_grazing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_sky_blessing_season + situation_sub_region_has_county = root.capital_county + } + any_situation_sub_region = { + sub_region_current_phase = situation_steppe_warm_nights_season + situation_sub_region_has_county = root.capital_county + } + } + } + OR = { + domicile ?= { + herd <= minor_herd_value + } + } + any_councillor = { + count >= 2 + is_kurultai_trigger = yes + is_available_ai = yes + NOT = { is_spouse_of = root } + } + } + + immediate = { + random_councillor = { + limit = { + is_kurultai_trigger = yes + is_available_ai = yes + NOT = { is_spouse_of = root } + } + save_scope_as = kurultai_1 + } + random_councillor = { + limit = { + is_kurultai_trigger = yes + is_available_ai = yes + NOT = { + this = scope:kurultai_1 + is_spouse_of = root + } + } + save_scope_as = kurultai_2 + } + } + + option = { # Do not cry over spilled kumis. + name = mpo_nomads_season_events.0015.a + reverse_add_opinion = { + target = scope:kurultai_1 + modifier = grateful_opinion + opinion = 30 + } + add_prestige = minor_prestige_loss + stress_impact = { + calm = medium_stress_impact_loss + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 20 + has_trait = calm + } + modifier = { + factor = 0 + has_trait = wrathful + } + } + } + + option = { # Go on, fight! Entertain the rest of us. + name = mpo_nomads_season_events.0015.b + reverse_add_opinion = { + target = scope:kurultai_2 + modifier = grateful_opinion + opinion = 30 + } + scope:kurultai_2 = { + duel = { + skill = prowess + target = scope:kurultai_1 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_nomads_season_events.0015.b.tt.success + scope:kurultai_1 = { + add_trait = wounded_1 + } + send_interface_toast = { + title = mpo_nomads_season_events.0015.b.tt.success + left_icon = scope:kurultai_1 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_nomads_season_events.0015.b.tt.failure + scope:kurultai_2 = { + add_trait = wounded_1 + } + send_interface_toast = { + title = mpo_nomads_season_events.0015.b.tt.failure + left_icon = scope:kurultai_2 + } + } + } + } + + stress_impact = { + wrathful = medium_stress_impact_loss + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 20 + has_trait = wrathful + } + modifier = { + factor = 0 + has_trait = calm + } + } + } + + option = { # Let it go, both of you. + name = mpo_nomads_season_events.0015.c + reverse_add_opinion = { + target = scope:kurultai_1 + modifier = disappointed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:kurultai_2 + modifier = disappointed_opinion + opinion = -15 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} diff --git a/N3OW/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt b/N3OW/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt new file mode 100644 index 00000000..5b57020b --- /dev/null +++ b/N3OW/events/dlc/mpo/mpo_story_cycle_temujin_flavor_events.txt @@ -0,0 +1,835 @@ +namespace = mpo_temujin_flavor + +# mpo_temujin_flavor.0001 - Become Blood Brothers with Jamukha +# mpo_temujin_flavor.0010 - Jamukha stops being your vassal +# mpo_temujin_flavor.0020 - Jamukha becomes your rival +# mpo_temujin_flavor.0030 - Borte announces she's pregnant + +####################### +# Become Blood Brothers with Jamukha +####################### + +mpo_temujin_flavor.0001 = { + type = character_event + title = mpo_temujin_flavor.0001.t + desc = mpo_temujin_flavor.0001.desc + theme = nomads + override_background = { + reference = mpo_campfire_steppe + } + left_portrait = { + character = root + animation = aggressive_dagger + } + right_portrait = { + character = scope:jamukha + animation = celebrate_dagger + } + + trigger = { + NOR = { + has_variable = had_mpo_temujin_flavor_0001 + has_variable = had_mpo_temujin_flavor_0010 + has_variable = had_mpo_temujin_flavor_0020 + } + is_physically_able = yes + character:mpo_mongol_1 = { + is_alive = yes + is_physically_able = yes + NOR = { + has_relation_blood_brother = root + has_relation_rival = root + } + } + } + + immediate = { + play_music_cue = "mx_cue_touching_moment" + set_variable = had_mpo_temujin_flavor_0001 + character:mpo_mongol_1 = { + save_scope_as = jamukha + save_scope_as = blood_bro + } + } + + option = { # Yay + name = mpo_temujin_flavor.0001.a + + if = { + limit = { + NOR = { + has_character_flag = had_warhorse_story + any_owned_story = { + story_type = story_cycle_martial_lifestyle_warhorse + exists = var:story_cycle_horse_name + } + } + scope:jamukha = { + NOR = { + has_character_flag = had_warhorse_story + any_owned_story = { + story_type = story_cycle_martial_lifestyle_warhorse + exists = var:story_cycle_horse_name + } + } + } + } + custom_tooltip = temujin_warhorse_tt + custom_tooltip = jamukha_warhorse_tt + if = { + limit = { + scope:jamukha = { + is_ai = yes + } + } + hidden_effect = { + start_warhorse_story_cycle_effect = yes + } + } + if = { + limit = { + scope:jamukha = { + is_ai = yes + } + } + hidden_effect = { + scope:jamukha = { + start_warhorse_story_cycle_effect = yes + } + } + } + } + if = { + limit = { + scope:jamukha = { + is_ai = yes + } + } + set_relation_blood_brother = { + target = scope:jamukha + reason = blood_brother_temujin_jamukha + } + add_character_modifier = blood_brother_warrior_modifier + scope:jamukha = { + add_character_modifier = blood_brother_warrior_modifier + } + } + else = { + custom_tooltip = jamukha_choose_blood_brother_tt + save_scope_as = temujin + scope:jamukha = { + trigger_event = mpo_jamukha_flavor.0001 + } + show_as_tooltip = { + add_character_modifier = blood_brother_warrior_modifier + scope:jamukha = { + add_character_modifier = blood_brother_warrior_modifier + } + } + } + custom_tooltip = blood_brother_gains_hook_tt + custom_tooltip = blood_brother_gains_hook_other_tt + + stress_impact = { + gregarious = medium_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # Not a chance + name = mpo_temujin_flavor.0001.b + add_dread = minor_dread_gain + add_prestige = minor_prestige_gain + set_variable = rejected_jamukha_var + scope:jamukha = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -25 + } + } + stress_impact = { + base = minor_stress_impact_gain + callous = medium_stress_impact_loss + gregarious = medium_stress_impact_gain + } + + ai_chance = { + base = 0 + } + } + + after = { + hidden_effect = { + scope:jamukha = { + trigger_event = { + days = { 180 360 } + id = mpo_jamukha_flavor.0010 + } + } + + } + } +} + +####################### +# Jamukha stops being your vassal +####################### + +scripted_effect mpo_temujin_flavor_0010_jamukha_leaving_effect = { + if = { + limit = { scope:jamukha = { is_vassal_of = root } } + scope:jamukha = { + 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 + } + } + else = { + scope:jamukha = { end_tributary = yes } + } + add_truce_both_ways = { + character = scope:jamukha + years = 5 + name = temujin_jamukha_truce + } + hidden_effect = { # This will put him closer to Temujin + scope:jamukha = { + if = { + limit = { + current_military_strength < scope:temujin.current_military_strength + } + domicile ?= { + change_herd = { + value = scope:temujin.domicile.herd + multiply = 0.5 + } + } + } + } + } + if = { + limit = { + exists = scope:togrul + } + scope:jamukha = { + custom_tooltip = negotiate_togrul_alliance_effect_tooltip + create_alliance = { + target = scope:togrul + allied_through_owner = scope:jamukha + allied_through_target = scope:togrul + } + hidden_effect = { + scope:togrul = { + add_opinion = { + target = scope:jamukha + modifier = event_negotiated_alliance_opinion + } + } + } + } + } +} + +mpo_temujin_flavor.0010 = { + type = character_event + title = mpo_temujin_flavor.0010.t + desc = { + desc = mpo_temujin_flavor.0010.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_variable = rejected_jamukha_var } + desc = mpo_temujin_flavor.0010.desc.rejected + } + triggered_desc = { + trigger = { has_relation_blood_brother = scope:jamukha } + desc = mpo_temujin_flavor.0010.desc.blood_brothers + } + desc = mpo_temujin_flavor.0010.desc.fallback + } + } + theme = nomads + override_background = { + reference = mpo_campfire_steppe + } + left_portrait = { + character = root + animation = personality_vengeful + } + right_portrait = { + character = scope:jamukha + animation = schadenfreude + } + lower_right_portrait = scope:togrul + + trigger = { + has_variable = had_mpo_temujin_flavor_0001 + NOR = { + has_variable = had_mpo_temujin_flavor_0010 + has_variable = had_mpo_temujin_flavor_0020 + } + is_alive = yes + is_ruler = yes + character:mpo_mongol_1 = { + is_alive = yes + OR = { + is_vassal_of = root + is_tributary_of = root + } + } + } + + immediate = { + set_variable = { + name = had_mpo_temujin_flavor_0010 + value = character:mpo_mongol_1 + } + character:mpo_mongol_1 = { + save_scope_as = jamukha + } + mpo_temujin_flavor_0010_jamukha_leaving_effect = yes + } + + option = { # I will kill you + name = mpo_temujin_flavor.0010.aa + trigger = { dread >= 100 } + if = { + limit = { + has_relation_blood_brother = scope:jamukha + } + custom_tooltip = { + text = mpo_temujin_flavor.0010.aa_remove_blood_brother + remove_relation_blood_brother = scope:jamukha + } + } + scope:jamukha = { + add_dread = major_dread_loss + add_prestige = medium_prestige_loss + } + every_vassal = { + limit = { + has_vassal_stance = belligerent + is_obedient = no + } + custom = every_belligerent_vassal + add_opinion = { + modifier = obedience_opinion + target = root + } + } + every_courtier = { + limit = { + is_obedient = no + NOR = { + has_trait = brave + has_trait = compassionate + } + } + custom = every_non_brave_compassionate_courtier + add_opinion = { + modifier = obedience_opinion + target = root + } + } + stress_impact = { + gregarious = medium_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # Look at this clown + name = mpo_temujin_flavor.0010.a + duel = { + skill = diplomacy + target = scope:jamukha + 50 = { # Your people are impressed + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = mpo_temujin_flavor.0010.a.tt.success + send_interface_toast = { + title = mpo_temujin_flavor.0010.a.tt.success + left_icon = root + right_icon = scope:jamukha + add_prestige = medium_prestige_gain + scope:jamukha = { add_prestige = medium_prestige_loss } + } + } + 50 = { # No one is impressed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = mpo_temujin_flavor.0010.a.tt.failure + send_interface_toast = { + title = mpo_temujin_flavor.0010.a.tt.failure + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + gregarious = medium_stress_impact_loss + callous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # Try to force him to stay + name = mpo_temujin_flavor.0010.b + add_dread = minor_dread_gain + scope:jamukha = { + add_opinion = { + target = root + modifier = hurt_opinion + opinion = -30 + } + } + stress_impact = { + callous = medium_stress_impact_loss + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Let him go + name = mpo_temujin_flavor.0010.c + scope:jamukha = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + stress_impact = { + generous = medium_stress_impact_loss + callous = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { + hidden_effect = { + trigger_event = { + days = { 360 420 } + id = mpo_temujin_flavor.0020 + } + } + } +} + +####################### +# Jamukha becomes your rival -- now you must kill him +####################### + +mpo_temujin_flavor.0020 = { + type = character_event + title = mpo_temujin_flavor.0020.t + desc = { + desc = mpo_temujin_flavor.0020.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_relation_blood_brother = scope:jamukha } + desc = mpo_temujin_flavor.0020.desc.blood_brothers + } + triggered_desc = { + trigger = { has_relation_friend = scope:jamukha } + desc = mpo_temujin_flavor.0020.desc.friend + } + triggered_desc = { + trigger = { has_relation_rival = scope:jamukha } + desc = mpo_temujin_flavor.0020.desc.rival + } + desc = mpo_temujin_flavor.0020.desc.fallback + } + desc = mpo_temujin_flavor.0020.desc.outro + } + theme = nomads + override_background = { + reference = mpo_campfire_steppe + } + left_portrait = { + character = root + animation = anger + outfit_tags = { nightgown } + camera = camera_event_very_left + } + right_portrait = { + character = scope:jamukha + animation = horse_conversing_left + camera = camera_event_horse_right + } + window = scheme_successful_event_no_text + + trigger = { + NOT = { has_variable = had_mpo_temujin_flavor_0020 } + OR = { + has_variable = had_mpo_temujin_flavor_0010 + AND = { + NOT = { has_variable = had_mpo_temujin_flavor_0010 } + character:mpo_mongol_1 = { + NOR = { + is_vassal_of = root + is_tributary = root + } + } + } + } + is_alive = yes + is_ruler = yes + character:mpo_mongol_1 = { + is_alive = yes + in_diplomatic_range = root + is_ruler = yes + } + } + + immediate = { + save_scope_as = temujin + play_music_cue = "mx_cue_murder" + set_variable = { + name = had_mpo_temujin_flavor_0020 + value = character:mpo_mongol_1 + } + character:mpo_mongol_1 = { + save_scope_as = jamukha + } + if = { + limit = { + current_military_strength < scope:jamukha.current_military_strength + } + domicile ?= { + change_herd = { + value = scope:jamukha.domicile.herd + multiply = 1.5 + } + } + add_prestige = major_prestige_gain # For MAA maintenance, mainly + custom_tooltip = temujin_gain_from_defectors_tt + } + if = { + limit = { + has_relation_blood_brother = scope:jamukha + } + scope:jamukha = { + add_character_flag = { + flag = was_temujins_bro + years = 30 + } + } + } + } + + option = { # You who I once called brother + name = mpo_temujin_flavor.0020.a + reason = blood_brother + add_internal_flag = special + trigger = { has_relation_blood_brother = scope:jamukha } + custom_tooltip = { + text = mpo_temujin_flavor.0020.a_war_win + set_variable = temujin_jamukha_war_var + } + add_character_modifier = { + modifier = temujin_jamukha_war_modifier + years = 5 + } + stress_impact = { + base = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { # Murderrrrrrr + name = mpo_temujin_flavor.0020.b + custom_tooltip = { + text = mpo_temujin_flavor.0020.b_murder + set_variable = { + name = temujin_jamukha_murder_var + value = scope:jamukha + } + } + stress_impact = { + deceitful = massive_stress_impact_loss + sadistic = massive_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + + option = { # I'm going to crush your skull + name = mpo_temujin_flavor.0020.c + trigger = { + NOT = { has_relation_blood_brother = scope:jamukha } + } + add_character_modifier = { + modifier = temujin_jamukha_war_smaller_modifier + years = 5 + } + stress_impact = { + wrathful = massive_stress_impact_loss + vengeful = massive_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + after = { + if = { # Remove hooks + limit = { + scope:jamukha = { + has_hook = root + } + } + scope:jamukha = { remove_hook = { target = root } } + } + if = { + limit = { + has_hook = scope:jamukha + } + remove_hook = { target = scope:jamukha } + } + if = { # Remove Truce + limit = { + any_truce_target = { this = scope:jamukha } + } + cancel_truce_both_ways = scope:jamukha + } + custom_tooltip = mpo_temujin_flavor.0020.jamukha_gok_requirement + if = { + limit = { has_relation_blood_brother = scope:jamukha } + custom_tooltip = { + text = mpo_temujin_flavor.0010.aa_remove_blood_brother + remove_relation_blood_brother = scope:jamukha + } + } + else_if = { + limit = { has_relation_friend = scope:jamukha } + custom_tooltip = { + text = mpo_temujin_flavor.0020.remove_friend + remove_relation_friend = scope:jamukha + } + } + if = { + limit = { NOT = { has_relation_rival = scope:jamukha } } + set_relation_rival = { + target = scope:jamukha + reason = rival_temujin_jamukha + } + } + else_if = { + limit = { has_relation_rival = scope:jamukha } + set_relation_nemesis = { + target = scope:jamukha + reason = rival_temujin_jamukha + } + } + else = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -100 + } + } + custom_tooltip = { + text = mpo_temujin_flavor.0020.cb.tt + add_to_variable_list = { + name = retaliation_cb_var_list + target = scope:jamukha + } + scope:jamukha = { + add_to_variable_list = { + name = retaliation_cb_var_list + target = root + } + } + } + scope:jamukha = { + trigger_event = mpo_jamukha_flavor.0020 + } + } +} + +####################### +# Borte announces she's pregnant +####################### +mpo_temujin_flavor.0030 = { + type = character_event + title = mpo_temujin_flavor.0030.t + desc = mpo_temujin_flavor.0030.desc + theme = pregnancy + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:borte + animation = worry + } + lower_right_portrait = scope:mergid + + trigger = { + NOT = { has_variable = had_mpo_temujin_flavor_0030 } # To make sure it triggers even if you migrate straight away and lose the event time window + character:172004 = { + is_alive = yes + is_spouse_of = root + is_pregnant = no + } + any_neighboring_top_liege_realm_owner = { + NOT = { has_relation_rival = root } + } + } + + immediate = { + play_music_cue = "mx_cue_personal_negative" + set_variable = had_mpo_temujin_flavor_0030 + character:172004 = { + save_scope_as = borte + } + if = { + limit = { + character:303116 = { + is_alive = yes + NOT = { has_relation_rival = root } + } + } + character:303116 = { + save_scope_as = mergid + } + } + else_if = { + limit = { + any_ruler = { + dynasty = dynasty:2001144 + NOT = { has_relation_rival = root } + } + } + random_ruler = { + limit = { + dynasty = dynasty:2001144 + NOT = { has_relation_rival = root } + } + save_scope_as = mergid + } + } + else = { + random_neighboring_top_liege_realm_owner = { + limit = { NOT = { has_relation_rival = root } } + save_scope_as = mergid + } + } + scope:borte = { + custom_tooltip = mpo_temujin_flavor.0030.pregnancy_tt + hidden_effect = { + make_pregnant = { + father = scope:mergid + } + } + set_variable = borte_first_child_var + } + } + + option = { # I hate those guys + name = mpo_temujin_flavor.0030.a + set_relation_rival = { + target = scope:mergid + reason = rival_temujin_mergid + } + custom_tooltip = { + text = mpo_temujin_flavor.0030.a.tt + add_to_variable_list = { + name = retaliation_cb_var_list + target = scope:mergid + } + } + add_dread = medium_dread_gain + stress_impact = { + vengeful = major_stress_impact_loss + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 0 # To prevent AI Temüjin from being murdered immediately + } + } + + option = { # Let's forget about that, you are more important + name = mpo_temujin_flavor.0030.b + if = { + limit = { + NOT = { has_relation_lover = scope:borte } + } + set_relation_lover = { + target = scope:borte + reason = lover_temujin_borte + } + } + else = { + scope:borte = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + set_relation_wedding_very_good_fertility = scope:borte + stress_impact = { + compassionate = major_stress_impact_loss + vengeful = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + option = { # I could not care less + name = mpo_temujin_flavor.0030.c + scope:borte = { + add_opinion = { + target = root + modifier = upset_opinion + opinion = -25 + } + } + stress_impact = { + callous = major_stress_impact_loss + compassionate = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + ai_chance = { + base = 0 + } + } +} + diff --git a/N3OW/events/easteregg_events.txt b/N3OW/events/easteregg_events.txt new file mode 100644 index 00000000..ddecd9bb --- /dev/null +++ b/N3OW/events/easteregg_events.txt @@ -0,0 +1,61 @@ +namespace = easteregg_event + +################################################## +# #Vanity Events +# 0001 - 10002 Charna and Jakub duel +################################################## + +# Secret event to decide who should have the rock. +easteregg_event.0001 = { + hidden = yes + scope = none + + trigger = { + game_start_date <= 1070.1.1 + exists = character:easteregg_jakub_potapczyk + exists = character:easteregg_charna_frostwhisper + } + + immediate = { + character:easteregg_jakub_potapczyk = { + configure_start_single_combat_effect = { + SC_INITIATOR = character:easteregg_jakub_potapczyk + SC_ATTACKER = character:easteregg_jakub_potapczyk + SC_DEFENDER = character:easteregg_charna_frostwhisper + FATALITY = no + FIXED = no + LOCALE = terrain_scope + INVALIDATION_EVENT = single_combat.1006 + OUTPUT_EVENT = easteregg_event.0002 + } + } + } +} + +easteregg_event.0002 = { + hidden = yes + + immediate = { + # If Jakub wins, he takes back his beloved rock. Charna will not forget that. + if = { + limit = { scope:sc_victor = character:easteregg_jakub_potapczyk } + scope:sc_victor = { + add_character_modifier = prison_pet_stone_modifier + set_relation_rival = { + target = scope:sc_loser + reason = rival_rock + } + } + scope:sc_loser = {remove_character_modifier = prison_pet_stone_modifier} + } + # Otherwise, Charna won, and Jakub will never, ever forgive her. + else = { + scope:sc_victor = { + set_relation_rival = { + target = scope:sc_loser + reason = rival_rock + } + } + } + } +} diff --git a/N3OW/events/error_suppression_events.txt b/N3OW/events/error_suppression_events.txt new file mode 100644 index 00000000..4b77f69d --- /dev/null +++ b/N3OW/events/error_suppression_events.txt @@ -0,0 +1,198 @@ +#Events for error suppression. Please make sure we don't need these. + +namespace = error_suppression + +#Show relation event +error_suppression.0001 = { + hidden = yes + orphan = yes + + trigger = { + is_married = yes + } + + option = { + name = OK_BUTTON + + add_character_modifier = { + modifier = matilda_of_canossa_modifier + } + add_character_modifier = { + modifier = ep3_master_todor_modifier + } + add_character_modifier = { + modifier = police_chief_of_baghdad_modifier + } + add_character_modifier = { + modifier = guiscard_modifier + } + + + # "Variable 'has_scripted_appearance' is used but is never set" + # It's used in history, but we read the history after we check for these unused variable errors. + add_character_flag = easteregg + add_character_flag = has_scripted_appearance + add_character_flag = has_scripted_weight + add_character_flag = has_scripted_clothes + add_character_flag = no_headgear + add_character_flag = no_drunkard_visual + add_character_flag = lady_in_shadows + + if = { limit = { + # "Variable 'has_scripted_appearance' is set but is never used" + # In no-graphics we never read the portrait script that uses these flags, so then the above fix causes issues. + has_character_flag = easteregg + has_character_flag = has_scripted_appearance + has_character_flag = has_scripted_weight + has_character_flag = has_scripted_clothes + has_character_flag = no_headgear + has_character_flag = no_drunkard_visual + has_character_flag = lady_in_shadows + is_target_in_variable_list = { + name = artifact_rewards + target = root + } + is_target_in_variable_list = { + name = trait_rewards + target = root + } + exists = var:reichskrone + exists = var:pope_hat + has_variable = show_historical_gui + has_variable = nerge_activity + + title:e_japan = { + has_variable = administrative_ui_special_title + } + title:e_goryeo = { + has_variable = administrative_ui_special_title + } + scope:poem_tune = flag:riverside_city + scope:poem_tune = flag:spring_in_the_han_palace + scope:poem_tune = flag:winds_between_pine_trees + scope:poem_tune = flag:memories_of_the_past_at_red_cliff + scope:poem_tune = flag:my_wrath_bristles_through_my_helmet + scope:poem_tune = flag:thinking_of_the_past_at_beigu_pavilion + scope:poem_tune = flag:dream_song + scope:poem_tune = flag:as_in_a_dream + scope:poem_tune = flag:immortal_by_the_river + scope:poem_tune = flag:longing_for_qin_e + scope:poem_tune = flag:new_chrysanthemum_flowers + scope:poem_tune = flag:poluomen_son + scope:poem_tune = flag:pouring_out_deep_emotions + scope:poem_tune = flag:rain_hits_a_bell + scope:poem_tune = flag:spring_in_the_tower_of_jade + scope:poem_tune = flag:drunk_in_the_fairyland + scope:poem_tune = flag:anxiety_of_a_beauty + scope:poem_tune = flag:writing_of_my_sorrow + scope:poem_tune = flag:sad_remembrance + scope:poem_tune = flag:on_the_advent_of_spring + scope:poem_tune = flag:silk_washing_stream + scope:poem_tune = flag:at_an_inn_in_xinshi + scope:poem_tune = flag:on_red_lotus_petals + scope:poem_tune = flag:pusa_man + scope:poem_tune = flag:a_quiet_night + scope:poem_tune = flag:huanxi_sand + scope:poem_tune = flag:overlapping_golden_light_of_small_hills + scope:poem_tune = flag:the_road_is_difficult + scope:poem_tune = flag:phoenix_hairpin + scope:poem_tune = flag:boating_on_tai_lake + scope:poem_tune = flag:prelude_to_the_water_song + scope:poem_tune = flag:rambling_young_man + scope:poem_tune = flag:king_of_lanling + scope:poem_tune = flag:washing_creek_sands + scope:poem_tune = flag:magnolia_blossoms + scope:poem_tune = flag:petals_falling_in_the_river + scope:poem_tune = flag:my_way_passed_ancient_tombs + scope:poem_tune = flag:dreaming_of_the_south_side_of_the_river + scope:poem_tune = flag:beautiful_barbarian + scope:poem_tune = flag:missing_the_emperors_hometown + scope:poem_tune = flag:daoist_priestess + scope:poem_tune = flag:a_bushel_of_pearls + scope:poem_tune = flag:bodhisattva_barbarian + scope:poem_tune = flag:clear_and_even_music + scope:poem_tune = flag:lost_battle + scope:poem_tune = flag:beauty_yu + 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 + scope:poem_tune = flag:mountain_hawthorn + scope:poem_tune = flag:the_song_of_tangduo + scope:poetry_theme = flag:love + scope:poetry_theme = flag:nature + scope:poetry_theme = flag:longing + scope:poetry_theme = flag:separation + scope:poetry_theme = flag:sadness_and_pain + scope:poetry_theme = flag:philosophy + scope:poetry_theme = flag:mythological_events + scope:poetry_theme = flag:daily_chores + scope:poetry_theme = flag:historical_events + } } + } +} +# EP1 achievement variable erroring from not being used outside of ep1_achievements.txt +error_suppression.0002 = { + hidden = yes + orphan = yes + + trigger = { + any_character_artifact = { + exists = var:last_person_to_steal + } + } + + option = { + name = OK_BUTTON + } +} +# Memory events to make sure they appear in the right order chronologically +error_suppression.0003 = { + hidden = yes + + immediate = { + create_character_memory = { + type = imprisoned_other + + participants = { + imprisoned = scope:prisoner_memory + } + } + } + + option = { + name = OK_BUTTON + } +} + +#Suppression of legend properties +error_suppression.0004 = { + hidden = yes + orphan = yes + + trigger = { + var:dummy ?= flag:kumari_kandam + var:dummy ?= flag:prester_john_kingdom + var:dummy ?= flag:china + var:dummy ?= flag:bald_mountain + var:dummy ?= flag:olympus + var:dummy ?= flag:beyul + var:dummy ?= flag:hindustan + var:dummy ?= flag:irum + var:dummy ?= flag:atlantis + var:dummy ?= flag:himavanta + var:dummy ?= flag:mahishmati + var:dummy ?= flag:albion + } + + option = { + name = OK_BUTTON + set_variable = { + name = dummy + value = 1 + } + } +} diff --git a/N3OW/events/game_rule_events.txt b/N3OW/events/game_rule_events.txt new file mode 100644 index 00000000..9ac955ac --- /dev/null +++ b/N3OW/events/game_rule_events.txt @@ -0,0 +1,7421 @@ +namespace = game_rule + +# Generated families - 1001 +# Gender equality - 1010 + +scripted_trigger de_jure_liege_title_to_destroy = { + tier > tier_county + is_titular = no + is_landless_type_title = no + is_head_of_faith = no + save_temporary_scope_as = de_jure_liege_title + + NOT = { + ROOT = { + any_sub_realm_title = { + tier = tier_county + target_is_de_jure_liege_or_above = scope:de_jure_liege_title + } + } + } + + NAND = { + has_game_rule = on_limited_de_jure_requirement + holder = { + is_ai = no + } + this = holder.primary_title + } +} + +game_rule.1 = { # De Jure Requirement + hidden = yes + + trigger = { + NOT = { has_game_rule = off_de_jure_requirement } + any_held_title = { + de_jure_liege_title_to_destroy = yes + } + } + + immediate = { + # Notification + random_held_title = { + limit = { + de_jure_liege_title_to_destroy = yes + } + save_scope_as = title_to_destroy + } + send_interface_message = { + type = event_title_bad + title = de_jure_requirement_title + desc = de_jure_requirement_desc + + left_icon = scope:title_to_destroy + + destroy_title = scope:title_to_destroy + add_pressed_claim = scope:title_to_destroy + } + } +} + + +###################### +# GENERATED FAMILIES # +###################### + +scripted_trigger only_ai_if_ai_only_trigger = { + trigger_if = { + limit = { has_game_rule = on_generate_families_ai_only } + is_ai = yes + } + trigger_else = { + always = yes + } +} + + +game_rule.1000 = { + scope = none + hidden = yes + orphan = yes + + trigger = { + OR = { + has_game_rule = on_generate_families + has_game_rule = on_generate_families_ai_only + } + } + + immediate = { + every_independent_ruler = { + if = { + limit = { only_ai_if_ai_only_trigger = yes } + trigger_event = game_rule.1001 + } + every_vassal_or_below = { + limit = { only_ai_if_ai_only_trigger = yes } + trigger_event = game_rule.1001 + } + } + } +} + +game_rule.1001 = { #by Mathilda Bjarnehed + type = character_event + hidden = yes + + trigger = { + is_from_ruler_designer = no # Do not modify the family of somoene from the ruler designer + #Is in need of family + NOT = { + exists = player_heir + } + #Allowed to get family + NOT = { # Otherwise historical characters sometimes generate inappropriate children + any_child = { + always = yes + } + } + is_eunuch_trigger = no + NOT = { has_trait = celibate } + NOT = { has_trait_with_flag = can_not_marry } + age >= 17 #Because you need ~1 year of pregnancy + is_playable_character = yes + primary_title = { + is_mercenary_company = no + 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 + } + } + + + immediate = { + if = { + limit = { faith = { has_doctrine_parameter = marriage_event } } + add_character_flag = ignore_marriage_event + } + save_scope_as = location_scope + game_rule_create_spouse_and_children = { CHARACTER = root LOCATION = scope:location_scope } + + #In case your children are very old + if = { + limit = { + age >= 55 + } + every_child = { + limit = { + age >= 35 + } + save_scope_as = childless_heir + game_rule_create_spouse_and_children = { CHARACTER = scope:childless_heir LOCATION = scope:location_scope } + + #In case your grandchildren are very old + every_child = { + limit = { + age >= 35 + } + save_scope_as = childless_heir + game_rule_create_spouse_and_children = { CHARACTER = scope:childless_heir LOCATION = scope:location_scope } + + #In case your great-grandchildren are very old + every_child = { + limit = { + age >= 35 + } + save_scope_as = childless_heir + game_rule_create_spouse_and_children = { CHARACTER = scope:childless_heir LOCATION = scope:location_scope } + } + } + } + } + # Error suppression. + if = { + limit = { always = no } + add_character_flag = do_not_generate_starting_family + } + } +} + +######################## +# EXCLAVE INDEPENDENCE # +######################## + +game_rule.2 = { # Exclave Independence, on death + hidden = yes + + trigger = { + exclave_independence_trigger = yes + } + + immediate = { + + if = { # None + limit = { + has_game_rule = off_exclave_independence + } + } + else_if = { # Delay for AI if at war, skip if player at war + limit = { + is_at_war = yes + } + if = { + limit = { + is_ai = yes + primary_heir ?= { + is_ai = yes + NOT = { + has_character_flag = delayed_cleanse + } + } + } + primary_heir = { + add_character_flag = { + flag = delayed_cleanse + } + } + } + } + else = { + game_rule_exclave_independence_effect = yes + } + } +} + +game_rule.3 = { # Exclave Independence, on war end + hidden = yes + + trigger = { + exclave_independence_trigger = yes + } + + immediate = { + if = { # None + limit = { + has_game_rule = off_exclave_independence + } + } + else_if = { # Only the last war should trigger the independence + limit = { + is_at_war = yes + } + } + else = { + game_rule_exclave_independence_effect = yes + } + } +} + +scripted_trigger weak_empire = { + tier = tier_empire + is_titular = no + is_landless_type_title = no + is_head_of_faith = no + NOT = { # Need to own 20% of De Jure counties + any_in_de_jure_hierarchy = { + filter = { + tier = tier_county + } + continue = { + tier > tier_county + } + OR = { + holder = root + holder = { + target_is_liege_or_above = root + } + } + percent >= 0.20 + } + } +} + +game_rule.4 = { # Empire Obscurity Game Rule + type = character_event + title = game_rule.4.t + desc = game_rule.4.desc + theme = realm + left_portrait = { + character = root + animation = grief + } + + cooldown = { years = 25 } + + trigger = { + has_game_rule = on_empire_obscurity_requirement + is_landed_or_landless_administrative = yes + is_at_war = no + primary_title.tier >= tier_empire + any_held_title = { + weak_empire = yes + } + NOR = { + government_allows = administrative # Byzantium should survive when small + government_has_flag = government_is_nomadic # Nomads can have very 'small' empires where most of it is tributaries + government_has_flag = government_is_mandala # Mandalas don't need as much dejure land for titles + } + } + + immediate = { + random_held_title = { + limit = { + weak_empire = yes + } + save_scope_as = falling_empire + } + } + + option = { # No! I just need time! + name = game_rule.4.a + + add_prestige = -2000 + add_prestige_experience = -2000 + + ai_chance = { + base = 0 + } + } + + option = { # Farewell, dear empire... + name = game_rule.4.b + + destroy_title = scope:falling_empire + add_pressed_claim = scope:falling_empire + + ai_chance = { + base = 100 + } + } +} + +####################### +# HUNGARIAN MIGRATION # +####################### + +game_rule.1011 = { + scope = none + hidden = yes + + trigger = { + game_start_date <= 867.1.1 + } + + immediate = { + #launch_historical + if = { + limit = { has_game_rule = launch_historical } + trigger_event = { + id = game_rule.1012 + months = { 360 480 } + } + } + #launch_immediate + if = { + limit = { has_game_rule = launch_immediate } + character:159137 = { + add_character_flag = undertaking_hungarian_migration + start_war = { + cb = hungarian_migration_cb + target = character:70382 + target_title = title:k_hungary + } + } + } + #launch_random + if = { + limit = { has_game_rule = launch_random } + trigger_event = { + id = game_rule.1012 + months = { 60 480 } + } + } + #launch_off: just do nothing. + } +} + +game_rule.1012 = { + scope = none + hidden = yes + + trigger = { + #The Migration hasn't already been attempted. + NOT = { + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:flag_launched_hungarian_migration + } + } + #No player is in a position to be angling for this. + NOT = { + any_player = { + culture = culture:mogyer + OR = { + #Independent Mogyers are valid launchers. + top_liege = this + #... But notable vassals not beneath other Mogyers may also be eyeing it up. + AND = { + top_liege != this + liege = { + NOT = { culture = culture:mogyer } + highest_held_title_tier = tier_kingdom + } + } + } + } + } + #There must be a suitable Eastern European Mogyer ruler around. + any_county_in_region = { + region = world_europe_east + holder = { hungarian_migration_valid_ai_mogyer_ruler_trigger = yes } + } + #Pannonia must have a valid ruler to declare war on: someone with at least a duchy-ish sized chunk of the land, and who isn't a fellow Mogyer. + any_county_in_region = { + region = custom_hungary + holder = { + hungarian_migration_valid_pannonian_target_trigger = { COUNT = 6 } + } + } + } + + #If the event fails, check again in a year or so, till the last available date for the decision has passed. + on_trigger_fail = { + if = { + limit = { + current_date <= 910.1.1 + #Don't just rerun the check forever if an attempt has already been made, of course. + NOT = { + is_target_in_global_variable_list = { + name = unavailable_unique_decisions + target = flag:flag_launched_hungarian_migration + } + } + } + trigger_event = { + id = game_rule.1012 + days = 365 + } + } + } + + immediate = { + #Designate a Hungarian attacker. + random_county_in_region = { + region = world_europe_east + #Prefer higher tier non-emperor characters wherever possible. + limit = { + holder = { + highest_held_title_tier = tier_kingdom + hungarian_migration_valid_ai_mogyer_ruler_trigger = yes + } + } + alternative_limit = { + holder = { + highest_held_title_tier = tier_duchy + hungarian_migration_valid_ai_mogyer_ruler_trigger = yes + } + } + alternative_limit = { + holder = { + highest_held_title_tier = tier_county + hungarian_migration_valid_ai_mogyer_ruler_trigger = yes + } + } + holder = { save_scope_as = hungarian_conqueror } + } + #... And a Pannonian defender. + ##Order these by rough size. + if = { + limit = { + any_county_in_region = { + region = custom_hungary + holder = { + hungarian_migration_valid_pannonian_target_trigger = { COUNT = 18 } + } + } + } + random_county_in_region = { + region = custom_hungary + limit = { + holder = { + any_held_county = { + title_province = { geographical_region = custom_hungary } + } + hungarian_migration_valid_pannonian_target_trigger = { COUNT = 18 } + } + } + holder.top_liege = { save_scope_as = pannonian_defender } + } + } + else_if = { + limit = { + any_county_in_region = { + region = custom_hungary + holder = { + hungarian_migration_valid_pannonian_target_trigger = { COUNT = 12 } + } + } + } + random_county_in_region = { + region = custom_hungary + limit = { + holder = { + any_held_county = { + title_province = { geographical_region = custom_hungary } + } + hungarian_migration_valid_pannonian_target_trigger = { COUNT = 12 } + } + } + holder.top_liege = { save_scope_as = pannonian_defender } + } + } + else_if = { + limit = { + any_county_in_region = { + region = custom_hungary + holder = { + hungarian_migration_valid_pannonian_target_trigger = { COUNT = 6 } + } + } + } + random_county_in_region = { + region = custom_hungary + limit = { + holder = { + any_held_county = { + title_province = { geographical_region = custom_hungary } + } + hungarian_migration_valid_pannonian_target_trigger = { COUNT = 6 } + } + } + holder.top_liege = { save_scope_as = pannonian_defender } + } + } + ##And just a fallback, in case something goes wrong elsewhere. + else = { + random_county_in_region = { + region = custom_hungary + limit = { + holder = { + hungarian_migration_valid_pannonian_target_trigger = { COUNT = 6 } + } + } + holder.top_liege = { save_scope_as = pannonian_defender } + } + } + #And sort notifications & setup. + scope:hungarian_conqueror = { + #Send the information event so that notifications are delivered correctly. + trigger_event = east_europe.0141 + #Now, declare war using the pre-scripted flow. + add_character_flag = undertaking_hungarian_migration + start_war = { + cb = hungarian_migration_cb + target = scope:pannonian_defender + target_title = title:k_hungary + } + } + } +} + +################################# +# NORMAN CONQUEST DETERMINATION # +################################# + +scripted_effect game_rule_1021_process_endings_guts_effect = { + # Damage the armies. + scope:army = { + location = { + every_army_in_location = { + if = { + limit = { army_owner = scope:winner } + deplete_army_by_percentage = 0.5 + } + else_if = { + limit = { army_owner = scope:loser } + deplete_army_by_percentage = 0.95 + } + } + # Register our first battle. + if = { + limit = { + NOT = { exists = global_var:conquest_first_battle } + } + scope:winner = { + trigger_event = { + id = game_rule.1022 + delayed = yes + } + } + } + } + } + # End the war. + end_war = $WINNER$ + # Pretend that we're gonna kill our losers, as we can't _actually_ kill them here due to the war just invalidating (and don't want to kill them beforehand or title transfer'll happen and screw a bunch of stuff). + show_as_tooltip = { + every_in_list = { + list = kill_list + death = { + death_reason = death_battle + killer = scope:winner + } + } + } +} + +scripted_effect game_rule_1021_process_endings_effect = { + scope:char_1 = { + random_character_war = { + limit = { using_cb = $CB$ } + # Register our scopes. + primary_$WINNER$ = { save_scope_as = winner } + primary_$LOSER$ = { save_scope_as = loser } + save_scope_as = war + scope:new_location = { + every_army_in_location = { + if = { + limit = { army_owner = scope:loser } + # Note our commanders for execution after the war's over. + involved_combat_side = { + every_side_commander = { add_to_list = kill_list } + } + } + } + } + # Trigger the events after we've sorted our scopes so that we can use them there too. + scope:loser = { trigger_event = $LOSER_EVENT$ } + scope:winner = { trigger_event = $WINNER_EVENT$ } + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = $WINNER$ } + } + } + } + # Now we can kill scope:loser — if appropriate. + scope:winner = { + every_in_list = { + list = kill_list + death = { + death_reason = death_battle + killer = scope:winner + } + } + } +} + +# Figure out whether we should fire a conclusion event during the Conquest. +game_rule.1021 = { + hidden = yes + + trigger = { + exists = global_var:deterministic_conquest_of_england_1066 + NAND = { + exists = global_var:norwegian_invasion_cb_concluded + exists = global_var:norman_conquest_cb_concluded + } + OR = { + has_game_rule = historicity_norman_conquest_determined_harold + has_game_rule = historicity_norman_conquest_determined_harald + game_rule_rig_norman_conquest_for_hereward_trigger = yes + has_game_rule = historicity_norman_conquest_determined_edgar + has_game_rule = historicity_norman_conquest_determined_margaret + has_game_rule = historicity_norman_conquest_determined_aelfwine + has_game_rule = historicity_norman_conquest_determined_svend + has_game_rule = historicity_norman_conquest_determined_cadoc + } + any_character_war = { + OR = { + using_cb = norman_conquest_cb + using_cb = norwegian_invasion_cb + } + } + } + + immediate = { + # We do this in the immediate because uhhh... it was _not_ liking being in the trigger for some reason. + scope:army.involved_combat_side ?= { + side_primary_participant = { save_scope_as = char_1 } + enemy_side.side_primary_participant = { + if = { + limit = { + any_character_war = { + OR = { + using_cb = norman_conquest_cb + using_cb = norwegian_invasion_cb + } + } + } + save_scope_as = char_2 + } + } + } + if = { + limit = { + exists = scope:char_1 + exists = scope:char_2 + } + # Double check what narrative we'd use. + scope:new_location = { + # Historical settings. + ## Stamford Bridge. + if = { + limit = { this = province:1588 } + save_scope_value_as = { + name = locale + value = flag:stamford_bridge + } + } + ## Hastings. + else_if = { + limit = { this = province:1509 } + save_scope_value_as = { + name = locale + value = flag:hastings + } + } + # Likely mechanical spots. + ## Dover. + else_if = { + limit = { this = province:1502 } + save_scope_value_as = { + name = locale + value = flag:dover + } + } + ## Isle of Wight. + else_if = { + limit = { this = province:1549 } + save_scope_value_as = { + name = locale + value = flag:isle_of_wight + } + } + # Cities/places of interest by priority order. + ## Forest of Dean. + ### Yes, this belongs at the top. + else_if = { + limit = { this = province:1580 } + save_scope_value_as = { + name = locale + value = flag:forest_of_dean + } + } + ## London. + else_if = { + limit = { this = province:1527 } + save_scope_value_as = { + name = locale + value = flag:london + } + } + ## Winchester. + else_if = { + limit = { this = province:1544 } + save_scope_value_as = { + name = locale + value = flag:winchester + } + } + ## York. + else_if = { + limit = { this = province:1595 } + save_scope_value_as = { + name = locale + value = flag:york + } + } + ## Lincoln. + else_if = { + limit = { this = province:1583 } + save_scope_value_as = { + name = locale + value = flag:lincoln + } + } + ## Oxford. + else_if = { + limit = { this = province:1558 } + save_scope_value_as = { + name = locale + value = flag:oxford + } + } + ## Cirencester. + else_if = { + limit = { this = province:1582 } + save_scope_value_as = { + name = locale + value = flag:cirencester + } + } + ## Guildford. + else_if = { + limit = { this = province:1511 } + save_scope_value_as = { + name = locale + value = flag:guildford + } + } + ## Lindisfarne. + else_if = { + limit = { this = province:1610 } + save_scope_value_as = { + name = locale + value = flag:lindisfarne + } + } + ## Land's End. + else_if = { + limit = { this = province:1575 } + save_scope_value_as = { + name = locale + value = flag:lands_end + } + } + ## Stonehenge. Because you're a memelord. + else_if = { + limit = { this = province:1561 } + save_scope_value_as = { + name = locale + value = flag:stonehenge + } + } + ## Southwark. + else_if = { + limit = { this = province:1526 } + save_scope_value_as = { + name = locale + value = flag:southwark + } + } + # Places outside England. + ## Scotland. + else_if = { + limit = { + county = { + any_this_title_or_de_jure_above = { this = title:k_scotland } + } + } + save_scope_value_as = { + name = locale + value = flag:scotland + } + } + ## Wales. + else_if = { + limit = { + county = { + any_this_title_or_de_jure_above = { this = title:k_wales } + } + } + save_scope_value_as = { + name = locale + value = flag:wales + } + } + ## Norway. + else_if = { + limit = { + county = { + any_this_title_or_de_jure_above = { this = title:k_norway } + } + } + save_scope_value_as = { + name = locale + value = flag:norway + } + } + ## Normandy. + else_if = { + limit = { + county = { + any_this_title_or_de_jure_above = { this = title:d_normandy } + } + } + save_scope_value_as = { + name = locale + value = flag:normandy + } + } + ## France. + else_if = { + limit = { + county = { + any_this_title_or_de_jure_above = { this = title:k_france } + } + } + save_scope_value_as = { + name = locale + value = flag:france + } + } + # Generic terrain/situations. + ## Riverside. + else_if = { + limit = { is_riverside_province = yes } + save_scope_value_as = { + name = locale + value = flag:riverside + } + } + ## Coastal. + else_if = { + limit = { is_coastal = yes } + save_scope_value_as = { + name = locale + value = flag:coastal + } + } + ## Forest. + else_if = { + limit = { terrain = forest } + save_scope_value_as = { + name = locale + value = flag:forest + } + } + ## Plains. + else_if = { + limit = { terrain = plains } + save_scope_value_as = { + name = locale + value = flag:plains + } + } + ## Farmlands. + else_if = { + limit = { terrain = farmlands } + save_scope_value_as = { + name = locale + value = flag:farmlands + } + } + ## Wetlands. + else_if = { + limit = { terrain = wetlands } + save_scope_value_as = { + name = locale + value = flag:wetlands + } + } + ## Hills. + else_if = { + limit = { terrain = hills } + save_scope_value_as = { + name = locale + value = flag:hills + } + } + # Fallback. + else = { + save_scope_value_as = { + name = locale + value = flag:fallback + } + } + } + # Now fire our actual events. + if = { + limit = { has_game_rule = historicity_norman_conquest_determined_harold } + # Harold beats Harald. + trigger_event = game_rule.1031 + # Harold beats William. + trigger_event = game_rule.1032 + } + else_if = { + limit = { has_game_rule = historicity_norman_conquest_determined_harald } + # Harold beats William. + trigger_event = game_rule.1032 + # Harald beats Harold. + trigger_event = game_rule.1041 + # Harald beats William. + trigger_event = game_rule.1042 + } + else_if = { + limit = { game_rule_rig_norman_conquest_for_hereward_trigger = yes } + # Harold beats Harald. + trigger_event = game_rule.1031 + # William beats Harold. + trigger_event = game_rule.1051 + # William beats Harald. + trigger_event = game_rule.1052 + } + else_if = { + limit = { has_game_rule = historicity_norman_conquest_determined_edgar } + save_scope_value_as = { + name = witengamot_choice + value = flag:edgar + } + # Harold beats Harald (but dies if last war). + trigger_event = game_rule.1061 + # Harold beats William (but dies if last war). + trigger_event = game_rule.1062 + } + else_if = { + limit = { has_game_rule = historicity_norman_conquest_determined_margaret } + save_scope_value_as = { + name = witengamot_choice + value = flag:margaret + } + # Harold beats Harald (but dies if last war). + trigger_event = game_rule.1061 + # Harold beats William (but dies if last war). + trigger_event = game_rule.1062 + } + else_if = { + limit = { has_game_rule = historicity_norman_conquest_determined_aelfwine } + save_scope_value_as = { + name = witengamot_choice + value = flag:aelfwine + } + # Harold beats Harald (but dies if last war). + trigger_event = game_rule.1061 + # Harold beats William (but dies if last war). + trigger_event = game_rule.1062 + } + else_if = { + limit = { has_game_rule = historicity_norman_conquest_determined_svend } + save_scope_value_as = { + name = witengamot_choice + value = flag:svend + } + # Harold beats Harald (but dies if last war). + trigger_event = game_rule.1061 + # Harold beats William (but dies if last war). + trigger_event = game_rule.1062 + } + else_if = { + limit = { has_game_rule = historicity_norman_conquest_determined_cadoc } + save_scope_value_as = { + name = witengamot_choice + value = flag:cadoc + } + # Harold beats Harald (but dies if last war). + trigger_event = game_rule.1061 + # Harold beats William (but dies if last war). + trigger_event = game_rule.1062 + } + } + } +} + +# Launder our battle registration so that we don't call the first battle of X "the Second Battle of X". +game_rule.1022 = { + hidden = yes + + immediate = { + set_global_variable = { + name = conquest_first_battle + value = scope:new_location + } + } +} + +scripted_trigger game_rule_1031_valid_participants_trigger = { + scope:char_1 = { + any_character_war = { + using_cb = $CB$ + OR = { + primary_defender = scope:char_1 + primary_defender = scope:char_2 + } + OR = { + primary_attacker = scope:char_1 + primary_attacker = scope:char_2 + } + } + } +} + +# Harold beats Harald. +game_rule.1031 = { + hidden = yes + + trigger = { + game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb } + } + + immediate = { + game_rule_1021_process_endings_effect = { + WINNER = defender + LOSER = attacker + WINNER_EVENT = game_rule.1101 + LOSER_EVENT = game_rule.1102 + CB = norwegian_invasion_cb + } + } +} +# Harold beats William. +game_rule.1032 = { + hidden = yes + + trigger = { + game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb } + } + + immediate = { + game_rule_1021_process_endings_effect = { + WINNER = defender + LOSER = attacker + WINNER_EVENT = game_rule.1103 + LOSER_EVENT = game_rule.1104 + CB = norman_conquest_cb + } + } +} +# Harald beats Harold. +game_rule.1041 = { + hidden = yes + + trigger = { + game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb } + } + + immediate = { + game_rule_1021_process_endings_effect = { + WINNER = attacker + LOSER = defender + WINNER_EVENT = game_rule.1111 + LOSER_EVENT = game_rule.1112 + CB = norwegian_invasion_cb + } + } +} +# Harald beats William. +game_rule.1042 = { + hidden = yes + + trigger = { + OR = { + game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb } + game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb } + } + } + + immediate = { + # If we're not in the Norwegian invasion at all, then that means that Harald is king. + if = { + limit = { + NOR = { + scope:char_1 = { + any_character_war = { using_cb = norwegian_invasion_cb } + } + scope:char_2 = { + any_character_war = { using_cb = norwegian_invasion_cb } + } + } + } + game_rule_1021_process_endings_effect = { + WINNER = defender + LOSER = attacker + WINNER_EVENT = game_rule.1113 + LOSER_EVENT = game_rule.1114 + CB = norman_conquest_cb + } + } + # Otherwise, it means William is king. + else = { + game_rule_1021_process_endings_effect = { + WINNER = attacker + LOSER = defender + WINNER_EVENT = game_rule.1113 + LOSER_EVENT = game_rule.1114 + CB = norwegian_invasion_cb + } + } + } +} +# William beats Harold. +game_rule.1051 = { + hidden = yes + + trigger = { + game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb } + } + + immediate = { + game_rule_1021_process_endings_effect = { + WINNER = attacker + LOSER = defender + WINNER_EVENT = game_rule.1121 + LOSER_EVENT = game_rule.1122 + CB = norman_conquest_cb + } + } +} +# William beats Harald. +game_rule.1052 = { + hidden = yes + + trigger = { + OR = { + game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb } + game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb } + } + } + + immediate = { + # If we're not in the Norman invasion at all, then that means that William is king. + if = { + limit = { + NOR = { + scope:char_1 = { + any_character_war = { using_cb = norman_conquest_cb } + } + scope:char_2 = { + any_character_war = { using_cb = norman_conquest_cb } + } + } + } + game_rule_1021_process_endings_effect = { + WINNER = defender + LOSER = attacker + WINNER_EVENT = game_rule.1123 + LOSER_EVENT = game_rule.1124 + CB = norwegian_invasion_cb + } + } + # Otherwise, it means Harald is king. + else = { + game_rule_1021_process_endings_effect = { + WINNER = attacker + LOSER = defender + WINNER_EVENT = game_rule.1123 + LOSER_EVENT = game_rule.1124 + CB = norman_conquest_cb + } + } + } +} +# Harold beats Harald (but dies if last war). +game_rule.1061 = { + hidden = yes + + trigger = { + game_rule_1031_valid_participants_trigger = { CB = norwegian_invasion_cb } + } + + immediate = { + game_rule_1021_process_endings_effect = { + WINNER = defender + LOSER = attacker + WINNER_EVENT = game_rule.1131 + LOSER_EVENT = game_rule.1132 + CB = norwegian_invasion_cb + } + } +} +# Harold beats William (but dies if last war). +game_rule.1062 = { + hidden = yes + + trigger = { + game_rule_1031_valid_participants_trigger = { CB = norman_conquest_cb } + } + + immediate = { + game_rule_1021_process_endings_effect = { + WINNER = defender + LOSER = attacker + WINNER_EVENT = game_rule.1133 + LOSER_EVENT = game_rule.1134 + CB = norman_conquest_cb + } + } +} + +################################################## +# England Wins the Conquest +# by Ewan Cowhig Croft +# 1101 - 1110 +################################################## + +scripted_effect game_rule_1101_register_presence_effect = { + if = { + limit = { + location = scope:new_location + is_commanding_army = yes + } + save_scope_value_as = { + name = is_commanding + value = yes + } + } +} + +# Harold beats Harald (winner pov). +game_rule.1101 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1101.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = game_rule.1101.desc.outro.present + } + desc = game_rule.1101.desc.outro.absent + } + } + } + theme = war + left_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1101.a + + add_prestige = 250 + + # No stress, no AI. + } +} + +# Harold beats Harald (loser pov). +game_rule.1102 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1102.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + desc = game_rule.1102.desc.outro.alive + } + desc = game_rule.1102.desc.outro.dead + } + } + } + theme = war + left_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + right_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1102.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + add_prestige = -250 + + # No stress, no AI. + } + + option = { + name = game_rule.1102.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +# Harold beats William (winner pov). +game_rule.1103 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1103.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = game_rule.1103.desc.outro.present + } + desc = game_rule.1103.desc.outro.absent + } + } + } + theme = war + left_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1103.a + + add_prestige = 250 + + # No stress, no AI. + } +} + +# Harold beats William (loser pov). +game_rule.1104 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1104.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + desc = game_rule.1104.desc.outro.alive + } + desc = game_rule.1104.desc.outro.dead + } + } + } + theme = war + left_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + right_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1104.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + add_prestige = -250 + + # No stress, no AI. + } + + option = { + name = game_rule.1104.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +################################################## +# Norway Wins the Conquest +# by Ewan Cowhig Croft +# 1111 - 1120 +################################################## + +# Harald beats Harold (winner pov). +game_rule.1111 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1111.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = game_rule.1111.desc.outro.present + } + desc = game_rule.1111.desc.outro.absent + } + } + } + theme = war + left_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = attacker } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1111.a + + add_prestige = 250 + + # No stress, no AI. + } +} + +# Harald beats Harold (loser pov). +game_rule.1112 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1112.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + desc = game_rule.1112.desc.outro.alive + } + desc = game_rule.1112.desc.outro.dead + } + } + } + theme = war + left_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + right_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = attacker } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1112.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + add_prestige = -250 + + # No stress, no AI. + } + + option = { + name = game_rule.1112.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +scripted_effect game_rule_1113_harald_beats_william_tooltip_effect = { + # Illustrate our ending (applied in the effect that triggers this event). + scope:war = { + # Either Harald has England and is defending... + if = { + limit = { + scope:winner = { has_title = title:k_england } + } + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + # ... or he doesn't and is attacking. + else = { + game_rule_1021_process_endings_guts_effect = { WINNER = attacker } + } + } +} + +# Harald beats William (winner pov). +game_rule.1113 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1113.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = game_rule.1113.desc.outro.present + } + desc = game_rule.1113.desc.outro.absent + } + } + } + theme = war + left_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { game_rule_1113_harald_beats_william_tooltip_effect = yes } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1113.a + + add_prestige = 250 + + # No stress, no AI. + } +} + +# Harald beats William (loser pov). +game_rule.1114 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1114.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + desc = game_rule.1114.desc.outro.alive + } + desc = game_rule.1114.desc.outro.dead + } + } + } + theme = war + left_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + right_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { game_rule_1113_harald_beats_william_tooltip_effect = yes } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1114.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + add_prestige = -250 + + # No stress, no AI. + } + + option = { + name = game_rule.1114.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +################################################## +# Normandy Wins the Conquest +# by Ewan Cowhig Croft +# 1121 - 1130 +################################################## + +# William beats Harold (winner pov). +game_rule.1121 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1121.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = game_rule.1121.desc.outro.present + } + desc = game_rule.1121.desc.outro.absent + } + } + } + theme = war + left_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = attacker } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1121.a + + add_prestige = 250 + + # No stress, no AI. + } +} + +# William beats Harold (loser pov). +game_rule.1122 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1122.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + desc = game_rule.1122.desc.outro.alive + } + desc = game_rule.1122.desc.outro.dead + } + } + } + theme = war + left_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + right_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = attacker } + } + } + game_rule_1101_register_presence_effect = yes + # If Harold is dead by this point, take one of his eyes. + if = { + limit = { + scope:loser = { is_in_list = kill_list } + } + add_trait = one_eyed + } + } + + option = { + name = game_rule.1122.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + add_prestige = -250 + + # No stress, no AI. + } + + option = { + name = game_rule.1122.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +scripted_effect game_rule_1123_william_beats_harald_tooltip_effect = { + # Illustrate our ending (applied in the effect that triggers this event). + scope:war = { + # Either William has England and is defending... + if = { + limit = { + scope:winner = { has_title = title:k_england } + } + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + # ... or he doesn't and is attacking. + else = { + game_rule_1021_process_endings_guts_effect = { WINNER = attacker } + } + } +} + +# William beats Harald (winner pov). +game_rule.1123 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1123.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = game_rule.1123.desc.outro.present + } + desc = game_rule.1123.desc.outro.absent + } + } + } + theme = war + left_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { game_rule_1123_william_beats_harald_tooltip_effect = yes } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1123.a + + add_prestige = 250 + + # No stress, no AI. + } +} + +# William beats Harald (loser pov). +game_rule.1124 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1124.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + desc = game_rule.1124.desc.outro.alive + } + desc = game_rule.1124.desc.outro.dead + } + } + } + theme = war + left_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + right_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { game_rule_1123_william_beats_harald_tooltip_effect = yes } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1124.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + add_prestige = -250 + + # No stress, no AI. + } + + option = { + name = game_rule.1124.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +################################################## +# Niche Candidate Wins the Conquest +# by Ewan Cowhig Croft +# 1131 - 1150 +################################################## + +scripted_effect game_rule_1131_usurp_england_effect = { + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + } + # Compile our lists. + title:k_england = { + add_to_list = titles_to_transfer + every_dejure_vassal_title_holder = { + limit = { + liege = title:k_england.holder + this != scope:elect + } + add_to_list = vassals_to_transfer + } + title:c_middlesex = { + if = { + limit = { holder.top_liege = title:k_england.holder } + add_to_list = titles_to_transfer + } + } + } + # Transfer titles. + every_in_list = { + list = titles_to_transfer + change_title_holder = { + holder = scope:elect + change = scope:change + } + } + # Transfer vassals. + every_in_list = { + list = vassals_to_transfer + change_liege = { + liege = scope:elect + change = scope:change + } + # Plus, stabilise the realm by making everyone calm down after the chaos of the abortive conquest. + hidden_effect = { + if = { + limit = { + NOR = { + this = scope:jiltee + is_close_family_of = scope:jiltee + is_consort_of = scope:jiltee + } + } + add_opinion = { + target = scope:elect + modifier = relieved_opinion + opinion = 50 + } + } + } + } + resolve_title_and_vassal_change = scope:change +} + +scripted_effect game_rule_1131_rig_english_election_effect = { + # First, we're gonna want a holding title for our history. + hidden_effect = { + create_dynamic_title = { + tier = kingdom + name = k_england + adj = k_england_adj + } + scope:new_title = { + copy_title_history = title:k_england + set_coa = k_england + } + } + # Right, now kill our incumbent k_england.holder. + ## On the battlefield if we can. + if = { + limit = { scope:army.army_commander = scope:winner } + death = { death_reason = death_battle } + # Plus easily register how for loc. + save_scope_value_as = { + name = death_locale + value = flag:battlefield + } + } + ## Elsewise, off it. + else = { + death = { death_reason = death_heart_attack } + # Plus easily register how for loc. + save_scope_value_as = { + name = death_locale + value = flag:home + } + } + # Now we need to rig the election appropriately. + ## First, select our lucky winner. + switch = { + trigger = scope:witengamot_choice + flag:margaret = { + character:113 = { save_scope_as = elect } + } + flag:edgar = { + character:112 = { save_scope_as = elect } + } + flag:svend = { + character:101515 = { save_scope_as = elect } + } + flag:aelfwine = { + character:161260 = { save_scope_as = elect } + } + flag:cadoc = { + character:161281 = { save_scope_as = elect } + } + } + ## Then save our loser (mostly for convenience). + title:k_england.holder = { save_scope_as = jiltee } + ## And fire off our concluding events — if it'd make sense. + if = { + limit = { + scope:elect = { + NOT = { is_in_list = kill_list } + } + scope:elect != scope:jiltee + } + # Quietly erase our incumbent from the holders roll. + hidden_effect = { + title:k_england = { copy_title_history = scope:new_title } + } + # We launder this by a day because otherwise inheritance gets... finnicky. + scope:elect = { + trigger_event = { + id = game_rule.1143 + days = 1 + } + } + } +} + +# Harold beats Harald (but dies if last war) (winner pov). +game_rule.1131 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1101.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:is_commanding + NOT = { exists = scope:other_war_remains } + } + desc = game_rule.1131.desc.conquest_finished.die_battlefield + } + triggered_desc = { + trigger = { + NOT = { exists = scope:other_war_remains } + } + desc = game_rule.1131.desc.conquest_finished.die_home + } + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = game_rule.1101.desc.outro.present + } + desc = game_rule.1101.desc.outro.absent + } + } + } + theme = war + left_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + } + game_rule_1101_register_presence_effect = yes + # If no opposing side war, then we're gonna launch into our council sequence. + if = { + limit = { + NOT = { + any_character_war = { using_cb = norman_conquest_cb } + } + } + game_rule_1131_rig_english_election_effect = yes + } + else = { + save_scope_value_as = { + name = other_war_remains + value = yes + } + } + } + + option = { + name = game_rule.1131.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + # No stress, no AI. + } + + option = { + name = game_rule.1131.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +# Harold beats Harald (but dies if last war) (loser pov). +game_rule.1132 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1102.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + desc = game_rule.1102.desc.outro.alive + } + desc = game_rule.1102.desc.outro.dead + } + } + } + theme = war + left_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + right_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1132.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + add_prestige = -250 + + # No stress, no AI. + } + + option = { + name = game_rule.1132.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +# Harold beats William (but dies if last war) (winner pov). +game_rule.1133 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1103.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:is_commanding + NOT = { exists = scope:other_war_remains } + } + desc = game_rule.1133.desc.conquest_finished.die_battlefield + } + triggered_desc = { + trigger = { + NOT = { exists = scope:other_war_remains } + } + desc = game_rule.1133.desc.conquest_finished.die_home + } + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = game_rule.1103.desc.outro.present + } + desc = game_rule.1103.desc.outro.absent + } + } + } + theme = war + left_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + } + game_rule_1101_register_presence_effect = yes + # If no opposing side war, then we're gonna launch into our council sequence. + if = { + limit = { + NOT = { + any_character_war = { using_cb = norwegian_invasion_cb } + } + } + game_rule_1131_rig_english_election_effect = yes + } + else = { + save_scope_value_as = { + name = other_war_remains + value = yes + } + } + } + + option = { + name = game_rule.1133.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + # No stress, no AI. + } + + option = { + name = game_rule.1133.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +# Harold beats William (but dies if last war) (loser pov). +game_rule.1134 = { + type = character_event + title = { + # Is this the first or second notable battle here? + first_valid = { + triggered_desc = { + trigger = { global_var:conquest_first_battle ?= scope:new_location } + desc = game_rule.1101.t.boilerplate.battle_2 + } + desc = game_rule.1101.t.boilerplate.battle_1 + } + # Now, what do we call the location? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.t.boilerplate.location.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.t.boilerplate.location.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.t.boilerplate.location.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.t.boilerplate.location.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.t.boilerplate.location.stonehenge + } + # Whatever the province is called. + desc = game_rule.1101.t.boilerplate.location.fallback + } + } + desc = { + # Who's fighting who? + desc = game_rule.1104.desc.opposing_army + # Where are we clashing? + first_valid = { + triggered_desc = { + trigger = { scope:locale = flag:stamford_bridge } + desc = game_rule.1101.desc.stamford_bridge + } + triggered_desc = { + trigger = { scope:locale = flag:hastings } + desc = game_rule.1101.desc.hastings + } + triggered_desc = { + trigger = { scope:locale = flag:dover } + desc = game_rule.1101.desc.dover + } + triggered_desc = { + trigger = { scope:locale = flag:isle_of_wight } + desc = game_rule.1101.desc.isle_of_wight + } + triggered_desc = { + trigger = { scope:locale = flag:forest_of_dean } + desc = game_rule.1101.desc.forest_of_dean + } + triggered_desc = { + trigger = { scope:locale = flag:london } + desc = game_rule.1101.desc.london + } + triggered_desc = { + trigger = { scope:locale = flag:winchester } + desc = game_rule.1101.desc.winchester + } + triggered_desc = { + trigger = { scope:locale = flag:york } + desc = game_rule.1101.desc.york + } + triggered_desc = { + trigger = { scope:locale = flag:lincoln } + desc = game_rule.1101.desc.lincoln + } + triggered_desc = { + trigger = { scope:locale = flag:oxford } + desc = game_rule.1101.desc.oxford + } + triggered_desc = { + trigger = { scope:locale = flag:cirencester } + desc = game_rule.1101.desc.cirencester + } + triggered_desc = { + trigger = { scope:locale = flag:guildford } + desc = game_rule.1101.desc.guildford + } + triggered_desc = { + trigger = { scope:locale = flag:lindisfarne } + desc = game_rule.1101.desc.lindisfarne + } + triggered_desc = { + trigger = { scope:locale = flag:lands_end } + desc = game_rule.1101.desc.lands_end + } + triggered_desc = { + trigger = { scope:locale = flag:stonehenge } + desc = game_rule.1101.desc.stonehenge + } + triggered_desc = { + trigger = { scope:locale = flag:southwark } + desc = game_rule.1101.desc.southwark + } + triggered_desc = { + trigger = { scope:locale = flag:scotland } + desc = game_rule.1101.desc.scotland + } + triggered_desc = { + trigger = { scope:locale = flag:wales } + desc = game_rule.1101.desc.wales + } + triggered_desc = { + trigger = { scope:locale = flag:norway } + desc = game_rule.1101.desc.norway + } + triggered_desc = { + trigger = { scope:locale = flag:normandy } + desc = game_rule.1101.desc.normandy + } + triggered_desc = { + trigger = { scope:locale = flag:france } + desc = game_rule.1101.desc.france + } + triggered_desc = { + trigger = { scope:locale = flag:riverside } + desc = game_rule.1101.desc.riverside + } + triggered_desc = { + trigger = { scope:locale = flag:coastal } + desc = game_rule.1101.desc.coastal + } + triggered_desc = { + trigger = { scope:locale = flag:forest } + desc = game_rule.1101.desc.forest + } + triggered_desc = { + trigger = { scope:locale = flag:plains } + desc = game_rule.1101.desc.plains + } + triggered_desc = { + trigger = { scope:locale = flag:farmlands } + desc = game_rule.1101.desc.farmlands + } + triggered_desc = { + trigger = { scope:locale = flag:wetlands } + desc = game_rule.1101.desc.wetlands + } + triggered_desc = { + trigger = { scope:locale = flag:hills } + desc = game_rule.1101.desc.hills + } + triggered_desc = { + trigger = { scope:locale = flag:fallback } + desc = game_rule.1101.desc.fallback + } + } + # Are we there in person? + first_valid = { + triggered_desc = { + trigger = { exists = scope:is_commanding } + desc = { + desc = game_rule.1101.desc.combat.commander + desc = double_line_break + first_valid = { + triggered_desc = { + trigger = { + scope:locale = flag:stamford_bridge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stamford_bridge + } + triggered_desc = { + trigger = { + scope:locale = flag:hastings + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.hastings + } + triggered_desc = { + trigger = { + scope:locale = flag:dover + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.dover + } + triggered_desc = { + trigger = { + scope:locale = flag:isle_of_wight + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.isle_of_wight + } + triggered_desc = { + trigger = { + scope:locale = flag:forest_of_dean + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.forest_of_dean + } + triggered_desc = { + trigger = { + scope:locale = flag:london + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.london + } + triggered_desc = { + trigger = { + scope:locale = flag:cirencester + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.cirencester + } + triggered_desc = { + trigger = { + scope:locale = flag:guildford + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.guildford + } + triggered_desc = { + trigger = { + scope:locale = flag:lindisfarne + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lindisfarne + } + triggered_desc = { + trigger = { + scope:locale = flag:lands_end + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.lands_end + } + triggered_desc = { + trigger = { + scope:locale = flag:stonehenge + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.stonehenge + } + triggered_desc = { + trigger = { + scope:locale = flag:southwark + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.southwark + } + triggered_desc = { + trigger = { + scope:locale = flag:riverside + NOT = { global_var:conquest_first_battle ?= scope:new_location } + } + desc = game_rule.1101.desc.combat.locale.riverside + } + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.present.1 + desc = game_rule.1101.desc.combat.random.present.2 + desc = game_rule.1101.desc.combat.random.present.3 + } + } + } + } + } + desc = { + desc = game_rule.1101.desc.combat.not_present + desc = double_line_break + desc = { + random_valid = { + desc = game_rule.1101.desc.combat.random.absent.1 + desc = game_rule.1101.desc.combat.random.absent.2 + desc = game_rule.1101.desc.combat.random.absent.3 + } + } + } + } + # Finish up. + desc = double_line_break + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + desc = game_rule.1104.desc.outro.alive + } + desc = game_rule.1104.desc.outro.dead + } + } + } + theme = war + left_portrait = { + character = scope:loser + triggered_animation = { + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + animation = random_weapon_yield + } + triggered_animation = { + trigger = { + scope:loser = { is_in_list = kill_list } + } + animation = map_fear + } + } + right_portrait = { + character = scope:winner + scripted_animation = duel_celebrate + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { + scope:war = { + game_rule_1021_process_endings_guts_effect = { WINNER = defender } + } + } + game_rule_1101_register_presence_effect = yes + } + + option = { + name = game_rule.1134.a + trigger = { + scope:loser = { + NOT = { is_in_list = kill_list } + } + } + + add_prestige = -250 + + # No stress, no AI. + } + + option = { + name = game_rule.1134.b + trigger = { + scope:loser = { is_in_list = kill_list } + } + + # No stress, no AI. + } +} + +# Elect receives England. +game_rule.1141 = { + type = character_event + title = game_rule.1141.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:death_locale = flag:battlefield } + desc = game_rule.1141.intro.battlefield + } + triggered_desc = { + trigger = { scope:death_locale = flag:home } + desc = game_rule.1141.intro.home + } + } + first_valid = { + triggered_desc = { + trigger = { scope:witengamot_choice = flag:margaret } + desc = game_rule.1141.choice.margaret + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:edgar } + desc = game_rule.1141.choice.edgar + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:svend } + desc = game_rule.1141.choice.svend + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:aelfwine } + desc = game_rule.1141.choice.aelfwine + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:cadoc } + desc = game_rule.1141.choice.cadoc + } + } + } + theme = war + left_portrait = { + character = scope:elect + triggered_animation = { + trigger = { this = character:161260 } + animation = stress + } + triggered_animation = { + trigger = { this = character:101515 } + animation = personality_bold + } + animation = shock + } + right_portrait = { + character = scope:jiltee + animation = rage + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { game_rule_1131_usurp_england_effect = yes } + } + + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:witengamot_choice = flag:margaret } + desc = game_rule.1141.a.margaret + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:edgar } + desc = game_rule.1141.a.edgar + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:svend } + desc = game_rule.1141.a.svend + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:aelfwine } + desc = game_rule.1141.a.aelfwine + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:cadoc } + desc = game_rule.1141.a.cadoc + } + } + } + } + + add_prestige = 500 + + # No stress, no AI. + } +} + +# Jiltee is told of how things suck for them. +game_rule.1142 = { + type = character_event + title = game_rule.1142.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:death_locale = flag:battlefield } + desc = game_rule.1142.intro.battlefield + } + triggered_desc = { + trigger = { scope:death_locale = flag:home } + desc = game_rule.1142.intro.home + } + } + desc = game_rule.1142.choice.preamble + first_valid = { + triggered_desc = { + trigger = { scope:witengamot_choice = flag:margaret } + desc = game_rule.1142.choice.margaret + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:edgar } + desc = game_rule.1142.choice.edgar + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:svend } + desc = game_rule.1142.choice.svend + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:aelfwine } + desc = game_rule.1142.choice.aelfwine + } + triggered_desc = { + trigger = { scope:witengamot_choice = flag:cadoc } + desc = game_rule.1142.choice.cadoc + } + } + desc = game_rule.1142.outro + } + theme = war + left_portrait = { + character = scope:jiltee + animation = rage + } + right_portrait = { + character = scope:elect + triggered_animation = { + trigger = { this = character:161260 } + animation = stress + } + triggered_animation = { + trigger = { this = character:101515 } + animation = personality_bold + } + animation = shock + } + override_background = { reference = battlefield } + + immediate = { + # Illustrate our ending (applied in the effect that triggers this event). + show_as_tooltip = { game_rule_1131_usurp_england_effect = yes } + add_prestige = -250 + } + + # Outrage. + option = { + name = game_rule.1142.a + + add_opinion = { + target = scope:elect + modifier = usurped_title + opinion = -75 + } + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:elect } + } + set_relation_rival = { + target = scope:elect + reason = rival_usurper + } + } + reverse_add_opinion = { + target = scope:elect + modifier = respect_opinion + opinion = -50 + } + + # No stress, no AI. + } + + # Let things be. + option = { + name = game_rule.1142.b + trigger = { is_ai = no } + + reverse_add_opinion = { + target = scope:elect + modifier = grateful_opinion + opinion = 50 + } + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:elect } + } + set_relation_potential_friend = scope:elect + } + + # No stress, no AI. + } + + # Warg into them. + option = { + name = game_rule.1142.c + trigger = { + is_ai = no + scope:elect = { is_ai = yes } + } + + set_player_character = scope:elect + trigger_event = { + id = game_rule.1143 + days = 1 + } + + # No stress, no AI. + } +} + +# Delayed election rigging. +game_rule.1143 = { + hidden = yes + + immediate = { + scope:elect = { trigger_event = game_rule.1141 } + scope:jiltee = { trigger_event = game_rule.1142 } + hidden_effect = { game_rule_1131_usurp_england_effect = yes } + } +} + +################################################## +# Teleport Conquest Armies +# by Ewan Cowhig Croft +# 1151 - 1160 +################################################## + +scripted_trigger game_rule_1151_war_using_valid_cb_trigger = { + any_character_war = { + OR = { + using_cb = norman_conquest_cb + using_cb = norwegian_invasion_cb + } + } +} + +scripted_trigger game_rule_1151_no_player_vision_on_wars_trigger = { + any_player = { + count = all + NOR = { + game_rule_1151_war_using_valid_cb_trigger = yes + any_liege_or_above = { game_rule_1151_war_using_valid_cb_trigger = yes } + any_war_enemy = { game_rule_1151_war_using_valid_cb_trigger = yes } + domicile ?= { + domicile_location.county ?= { + holder = { + OR = { + game_rule_1151_war_using_valid_cb_trigger = yes + any_liege_or_above = { game_rule_1151_war_using_valid_cb_trigger = yes } + } + } + } + } + any_army = { + location = { + county ?= { + holder = { game_rule_1151_war_using_valid_cb_trigger = yes } + } + } + } + } + } +} + +# Stamford Bridge teleport. +game_rule.1151 = { + hidden = yes + scope = none + + trigger = { + game_rule_1151_no_player_vision_on_wars_trigger = yes + title:k_england.holder = { + any_character_war = { using_cb = norwegian_invasion_cb } + } + } + + immediate = { + title:k_england.holder = { + save_scope_as = england + random_character_war = { + limit = { using_cb = norwegian_invasion_cb } + primary_attacker = { save_scope_as = norway } + } + } + scope:norway = { + ordered_army = { + order_by = army_size + assign_commander = scope:norway + set_army_location = province:1588 + } + } + scope:england = { + ordered_army = { + order_by = army_size + assign_commander = scope:england + set_army_location = province:1588 + } + } + } +} + +# Hastings teleport. +game_rule.1152 = { + hidden = yes + scope = none + + trigger = { + game_rule_1151_no_player_vision_on_wars_trigger = yes + title:k_england.holder = { + any_character_war = { using_cb = norman_conquest_cb } + } + } + + immediate = { + title:k_england.holder = { + save_scope_as = england + random_character_war = { + limit = { using_cb = norman_conquest_cb } + primary_attacker = { save_scope_as = normandy } + } + } + scope:normandy = { + ordered_army = { + order_by = army_size + assign_commander = scope:normandy + set_army_location = province:1509 + } + } + scope:england = { + ordered_army = { + order_by = army_size + assign_commander = scope:england + set_army_location = province:1509 + } + } + } +} diff --git a/N3OW/events/global_religion_events.txt b/N3OW/events/global_religion_events.txt new file mode 100644 index 00000000..1a786bc9 --- /dev/null +++ b/N3OW/events/global_religion_events.txt @@ -0,0 +1,1328 @@ +namespace = global_religion + + +#When a pagan (ai) domain is ready to feudalize, a reformed neighbor they're on good terms with should attempt to convert them, or they should have a chance to spontaneously convert + + +######################################################################### +# Pagan reformed by neighbor or spontaneously # +# by Linnéa Thimrén # +# global_religion.0001-0009 # +######################################################################### + + +global_religion.0001 = { + hidden = yes + + immediate = { + random_list = { + 7 = { + trigger = { + any_neighboring_top_liege_realm_owner = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + modifier = { + add = 1 + any_neighboring_top_liege_realm_owner = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + OR = { + government_has_flag = government_is_clan + government_has_flag = government_is_feudal + } + } + } + modifier = { #Give Muslim faiths a boost in Africa + add = 4 + capital_province = { + geographical_region = world_africa + } + any_neighboring_top_liege_realm_owner = { + faith.religion = religion:islam_religion + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + random_neighboring_top_liege_realm_owner = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + OR = { + government_has_flag = government_is_clan + government_has_flag = government_is_feudal + } + } + alternative_limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + save_scope_as = actor #for the effect to work properly + } + } + 5 = { + trigger = { + any_consort = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + NOR = { + has_relation_potential_rival = root + has_relation_rival = root + } + } + } + random_consort = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + NOR = { + has_relation_potential_rival = root + has_relation_rival = root + } + } + save_scope_as = actor #for the effect to work properly + } + } + 5 = { + trigger = { + any_relation = { + type = soulmate + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + random_relation = { + type = soulmate + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + save_scope_as = actor #for the effect to work properly + } + } + 2 = { + trigger = { + any_relation = { + type = friend + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + modifier = { + add = 2 + any_relation = { + type = friend + faith = { NOT = { has_doctrine_parameter = unreformed } } + has_relation_best_friend = root + } + } + random_relation = { + type = friend + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + has_relation_best_friend = root + } + alternative_limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + save_scope_as = actor #for the effect to work properly + } + } + 2 = { + trigger = { + any_relation = { + type = lover + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + modifier = { + add = 2 + any_relation = { + type = lover + faith = { NOT = { has_doctrine_parameter = unreformed } } + has_relation_best_friend = root + } + } + random_relation = { + type = lover + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + has_relation_best_friend = root + } + alternative_limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + save_scope_as = actor #for the effect to work properly + } + } + 2 = { + trigger = { + any_councillor = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + } + modifier = { + add = 2 + any_councillor = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + has_relation_best_friend = root + } + } + random_councillor = { + limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + has_relation_best_friend = root + } + alternative_limit = { + faith = { NOT = { has_doctrine_parameter = unreformed } } + } + save_scope_as = actor #for the effect to work properly + } + } + #Geographical regions to also push extra for + 2 = { + trigger = { #Russia - orthodox + capital_province = { + geographical_region = ghw_region_russia + } + exists = faith:orthodox + faith:orthodox = { + exists = religious_head + } + } + faith:orthodox = { + religious_head = { + save_scope_as = actor #for the effect to work properly + } + } + } + 2 = { + trigger = { #Scandinavia - catholic + capital_province = { + geographical_region = ghw_region_scandinavia + } + exists = faith:catholic + faith:catholic = { + exists = religious_head + } + } + faith:catholic = { + religious_head = { + save_scope_as = actor #for the effect to work properly + } + } + } + 100 = { + modifier = { # A parallel system for africans lowers the need for this + add = 50 + faith = { + has_doctrine = west_african_unreformed_faith_doctrine + } + } + modifier = { # Historically held out for a long time + add = 150 + faith.religion = religion:baltic_religion + } + modifier = { # Less susceptible + add = 50 + faith.religion = faith:finnish_pagan.religion + } + modifier = { # The mongols are (mostly) busy + add = 150 + mpo_has_gok_mongol_empire_trigger = yes + } + modifier = { + add = -40 + current_date >= 868.1.1 + } + modifier = { + add = -15 + current_date >= 900.1.1 + } + modifier = { + add = -25 + current_date >= 950.1.1 + } + modifier = { + add = -10 + current_date >= 1000.1.1 + } + modifier = { #100 % that something happens if it can + add = -10 + current_date >= 1100.1.1 + } + } + } + + if = { + limit = { + exists = scope:actor + } + save_scope_as = recipient #for the effect to work properly + + every_vassal = { + limit = { + faith = root.faith + } + + demand_conversion_interaction_effect = yes + + if = { #If you converted to a neighboring faith your government and capital county also converts + limit = { + root = { + any_neighboring_top_liege_realm_owner = { + this = scope:recipient + } + } + NAND = { # The Steppes convert, but stay tribal + capital_province ?= { geographical_region = world_steppe } + } + } + if = { + limit = { + faith = { religion_tag = islam_religion } + } + change_government = clan_government + } + else = { change_government = feudal_government } + capital_county = { + set_county_faith = prev.faith + } + } + } + + demand_conversion_interaction_effect = yes + + if = { #If you converted to a neighboring faith your government and capital county also converts + limit = { + any_neighboring_top_liege_realm_owner = { + this = scope:recipient + } + NAND = { # The Steppes convert, but stay tribal + capital_province ?= { geographical_region = world_steppe } + } + } + if = { + limit = { + faith = { religion_tag = islam_religion } + } + change_government = clan_government + } + else = { change_government = feudal_government } + capital_county = { + set_county_faith = root.faith + } + } + } + } +} + +# Events for expelled faith development to relocate +global_religion.1000 = { + type = character_event + title = global_religion.1000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:seeking_same_faith_counties + scope:target_faith_associated_county_faith != scope:target_faith + } + desc = global_religion.1000.desc_same_faith_counties_alt + } + triggered_desc = { + trigger = { + exists = scope:seeking_same_faith_counties + } + desc = global_religion.1000.desc_same_faith_counties + } + triggered_desc = { + trigger = { + scope:target_faith_associated_county_faith = scope:target_faith + } + desc = global_religion.1000.desc_any_counties_alt + } + desc = global_religion.1000.desc_any_counties + } + } + theme = faith + + left_portrait = { + character = root + animation = wedding_priest + camera = camera_event_very_left + } + + right_portrait = { + character = scope:local_character + animation = holding_staff + camera = camera_event_very_right_far + } + + immediate = { + hidden_effect_new_object = { + scope:target_faith = { + var:associated_culture = { + save_scope_as = target_faith_associated_culture + } + var:associated_county = { + save_scope_as = target_faith_associated_county + faith = { save_scope_as = target_faith_associated_county_faith } + } + } + save_scope_value_as = { + name = initial_available_development + value = scope:target_faith.var:converted_development + } + + # Save same-faith Counties if that's what we're looking for, they can be all over the place + if = { + limit = { + exists = scope:seeking_same_faith_counties + } + random_sub_realm_county = { + limit = { + faith = scope:target_faith + } + save_scope_as = initial_county_target + add_to_list = counties_to_move_in_to + set_variable = { + name = county_development_to_get + value = { + value = development_level + divide = 10 + floor = yes + add = 1 + max = scope:initial_available_development + min = 1 + } + } + save_scope_value_as = { + name = remaining_converted_development + value = { + value = scope:initial_available_development + subtract = var:county_development_to_get + } + } + } + while = { + count = { + add = root.primary_title.tier + if = { + limit = { + root.primary_title.tier <= tier_duchy + } + add = -1 + min = 1 + } + } + limit = { + scope:remaining_converted_development > 0 + } + random_sub_realm_county = { + limit = { + faith = scope:target_faith + NOT = { + is_in_list = counties_to_move_in_to + } + } + add_to_list = counties_to_move_in_to + set_variable = { + name = county_development_to_get + value = { + value = development_level + divide = 10 + floor = yes + add = 1 + max = scope:remaining_converted_development + min = 1 + } + } + save_scope_value_as = { + name = remaining_converted_development + value = { + value = scope:remaining_converted_development + subtract = var:county_development_to_get + } + } + } + } + } + + # Otherwise save a cluster of connected same-faith Counties + else = { + random_sub_realm_county = { + limit = { + faith = root.faith + NOT = { + is_target_in_variable_list = { + name = faiths_converted_in_the_county + target = scope:target_faith + } + } + trigger_if = { + limit = { + root = { + is_ai = yes + } + } + holder = { + is_ai = yes + } + } + } + weight = { + base = 1 + modifier = { + add = 25 + NOT = { + any_neighboring_county = { + OR = { + this = root.capital_county + any_neighboring_county = { + this = root.capital_county + } + } + } + } + } + } + save_scope_as = initial_county_target + add_to_list = counties_to_move_in_to + set_variable = { + name = county_development_to_get + value = { + value = development_level + divide = 10 + floor = yes + add = 1 + max = scope:initial_available_development + min = 1 + } + } + save_scope_value_as = { + name = remaining_converted_development + value = { + value = scope:initial_available_development + subtract = var:county_development_to_get + } + } + } + while = { + count = root.primary_title.tier + limit = { + scope:remaining_converted_development > 0 + } + random_sub_realm_county = { + limit = { + faith = root.faith + NOT = { + is_target_in_variable_list = { + name = faiths_converted_in_the_county + target = scope:target_faith + } + } + trigger_if = { + limit = { + root = { + is_ai = yes + } + } + holder = { + is_ai = yes + } + } + any_neighboring_county = { + is_in_list = counties_to_move_in_to + } + NOT = { + is_in_list = counties_to_move_in_to + } + } + weight = { + base = 1 + modifier = { + add = 25 + NOT = { + any_neighboring_county = { + OR = { + this = root.capital_county + any_neighboring_county = { + this = root.capital_county + } + } + } + } + } + modifier = { + add = 0 + add = { + every_neighboring_county = { + limit = { + is_in_list = counties_to_move_in_to + } + add = 10 + } + } + } + } + add_to_list = counties_to_move_in_to + set_variable = { + name = county_development_to_get + value = { + value = development_level + divide = 10 + floor = yes + add = 1 + max = scope:remaining_converted_development + min = 1 + } + } + save_scope_value_as = { + name = remaining_converted_development + value = { + value = scope:remaining_converted_development + subtract = var:county_development_to_get + } + } + } + } + } + create_character = { + template = pool_repopulate_learning + faith = scope:target_faith + culture = scope:target_faith_associated_culture + location = root.capital_province + gender_female_chance = { + if = { + limit = { scope:target_faith = { has_doctrine = doctrine_gender_male_dominated } } + add = 0 + } + else_if = { + limit = { scope:target_faith = { has_doctrine = doctrine_gender_female_dominated } } + add = 100 + } + else = { + add = 50 + } + } + save_scope_as = local_character + } + scope:local_character = { + add_trait = lifestyle_mystic + set_variable = { + name = loc_number + value = { + add = { + every_in_list = { + list = counties_to_move_in_to + add = var:county_development_to_get + } + } + multiply = 1000 + } + } + if = { # Error suppression + limit = { + var:loc_number = var:loc_number + } + } + } + } + } + + option = { + name = global_religion.1000.serenity_aspect + reason = serenity_aspect + trigger = { + house ?= { has_house_power_parameter = aspect_of_serenity } + } + add_courtier = scope:local_character + + capital_county = { + if = { + limit = { + faith != scope:target_faith + } + faith = { + if = { + limit = { + OR = { + NOT = { has_variable = associated_county } + AND = { + has_variable = converted_development + var:converted_development <= 0 + } + } + } + set_variable = { + name = associated_county + value = scope:county + } + } + if = { + limit = { + OR = { + NOT = { has_variable = associated_culture } + AND = { + has_variable = converted_development + var:converted_development <= 0 + } + } + } + set_variable = { + name = associated_culture + value = scope:county.culture + } + } + if = { + limit = { + NOT = { has_variable = converted_development } + } + set_variable = { + name = converted_development + value = { + every_in_list = { + list = counties_to_move_in_to + add = { + add = var:county_development_to_get + divide = 2 + min = 1 + } + } + } + } + } + else = { + change_variable = { + name = converted_development + add = { + every_in_list = { + list = counties_to_move_in_to + add = { + add = var:county_development_to_get + divide = 2 + min = 1 + } + } + } + } + } + } + } + if = { + limit = { + root.faith != scope:target_faith + faith != scope:target_faith + } + set_county_faith = scope:target_faith + } + change_development_level = { + value = { + every_in_list = { + list = counties_to_move_in_to + add = { + add = var:county_development_to_get + divide = 2 + min = 1 + } + } + } + } + change_county_control = { + value = { + every_in_list = { + list = counties_to_move_in_to + add = { + add = var:county_development_to_get + divide = 2 + min = 1 + } + } + } + multiply = -5 + } + } + + if = { + limit = { + culture != scope:target_faith_associated_culture + } + culture = { + change_cultural_acceptance = { + target = scope:target_faith_associated_culture + value = { + value = scope:initial_available_development + subtract = scope:remaining_converted_development + } + desc = cultural_acceptance_gain_event + } + } + } + + scope:target_faith = { + change_variable = { + name = converted_development + subtract = { + every_in_list = { + list = counties_to_move_in_to + add = var:county_development_to_get + divide = 3 + min = 1 + } + } + } + } + + if = { + limit = { + is_ai = no + } + add_achievement_global_variable_effect = { + VARIABLE = achieved_ep4_20_promised_land_achievement + VALUE = yes + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = global_religion.1000.violent + trigger = { + NOT = { exists = scope:from_decision } + NOT = { house = { has_house_power_parameter = aspect_of_serenity } } + OR = { + has_trait = callous + has_trait = sadistic + has_trait = greedy + has_trait = arbitrary + } + } + trait = callous + trait = sadistic + trait = greedy + trait = arbitrary + + add_gold = { + value = { + value = scope:initial_available_development + multiply = 15 + } + } + + if = { + limit = { + culture != scope:target_faith_associated_culture + } + culture = { + change_cultural_acceptance = { + target = scope:target_faith_associated_culture + value = { + value = scope:initial_available_development + subtract = scope:remaining_converted_development + multiply = -0.5 + } + desc = cultural_acceptance_gain_event + } + } + } + + scope:target_faith = { + change_variable = { + name = converted_development + subtract = 1 + } + } + + stress_impact = { + generous = massive_stress_impact_gain + compassionate = massive_stress_impact_gain + humble = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + modifier = { + OR = { + has_trait = generous + has_trait = compassionate + has_trait = humble + has_trait = just + } + factor = 0 + } + } + } + + option = { + name = global_religion.1000.special + add_internal_flag = dangerous + trigger = { + faith != scope:target_faith + faith.religious_head != root + } + show_as_tooltip = { + set_character_faith_with_conversion = scope:target_faith + } + add_courtier = scope:local_character + if = { + limit = { + OR = { + faith = { has_doctrine_parameter = unreformed } + government_has_flag = government_is_nomadic + } + } + add_piety = major_piety_gain + } + else_if = { + limit = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + scope:target_faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + add_piety = minor_piety_gain + } + else = { + add_piety_level = -2 + } + hidden_effect = { + set_character_faith_with_conversion = scope:target_faith + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + domicile ?= { + change_herd = { + value = 0 + every_in_list = { + list = counties_to_move_in_to + add = var:county_development_to_get + } + multiply = 250 + } + if = { + limit = { + domicile_faith != scope:target_faith + } + set_domicile_faith = scope:target_faith + } + } + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + faith = root.faith + } + set_county_faith = scope:target_faith + } + } + else = { + every_in_list = { + list = counties_to_move_in_to + change_development_level = var:county_development_to_get + set_county_faith = scope:target_faith + change_county_control = { + value = var:county_development_to_get + multiply = -5 + } + } + } + + if = { + limit = { + culture != scope:target_faith_associated_culture + } + culture = { + change_cultural_acceptance = { + target = scope:target_faith_associated_culture + value = { + value = scope:initial_available_development + subtract = scope:remaining_converted_development + } + desc = cultural_acceptance_gain_event + } + } + } + + scope:target_faith = { + change_variable = { + name = converted_development + subtract = { + every_in_list = { + list = counties_to_move_in_to + add = var:county_development_to_get + } + } + } + } + + stress_impact = { + zealous = massive_stress_impact_gain + } + + if = { + limit = { + is_ai = no + } + add_achievement_global_variable_effect = { + VARIABLE = achieved_ep4_20_promised_land_achievement + VALUE = yes + } + } + + ai_chance = { + base = 0 + modifier = { + current_year >= 1000 + faith = { + has_doctrine_parameter = unreformed + NOT = { religion_tag = baltic_religion } + } + add = 10 + } + modifier = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + scope:target_faith = { has_doctrine = doctrine_pluralism_pluralistic } + + OR = { + faith.religion = scope:target_faith.religion + AND = { + faith.religion = { is_in_family = rf_eastern } + scope:target_faith.religion = { is_in_family = rf_eastern } + } + AND = { + faith.religion = { is_in_family = rf_sinitic } + scope:target_faith.religion = { is_in_family = rf_sinitic } + } + } + + add = 10 + } + modifier = { + has_trait = zealous + factor = 0 + } + modifier = { + has_trait = eccentric + add = 1 + } + modifier = { + faith.religion = { is_in_family = rf_abrahamic } + NOT = { + scope:target_faith.religion = { is_in_family = rf_abrahamic } + } + factor = 0 + } + modifier = { + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + NOT = { + scope:target_faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + factor = 0 + } + modifier = { + faith = { has_doctrine = muhammad_succession_shia_doctrine } + NOT = { + scope:target_faith = { has_doctrine = muhammad_succession_shia_doctrine } + } + factor = 0 + } + modifier = { + faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } + NOT = { + scope:target_faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } + } + factor = 0 + } + modifier = { + faith = { has_doctrine = muhammad_succession_zandaqa_doctrine } + NOT = { + scope:target_faith = { has_doctrine = muhammad_succession_zandaqa_doctrine } + } + factor = 0 + } + modifier = { + exists = scope:from_decision + factor = 0 + } + } + } + + option = { + name = global_religion.1000.a + add_courtier = scope:local_character + if = { + limit = { + exists = scope:seeking_same_faith_counties + } + if = { + limit = { + government_has_flag = government_is_nomadic + } + domicile ?= { + change_herd = { + value = 0 + every_in_list = { + list = counties_to_move_in_to + add = var:county_development_to_get + } + multiply = 250 + } + } + } + else = { + every_in_list = { + list = counties_to_move_in_to + change_development_level = var:county_development_to_get + change_county_control = { + value = var:county_development_to_get + multiply = -5 + } + } + } + } + else = { + if = { + limit = { + government_has_flag = government_is_nomadic + } + domicile ?= { + change_herd = { + value = 0 + every_in_list = { + list = counties_to_move_in_to + add = var:county_development_to_get + } + multiply = 250 + } + if = { + limit = { + domicile_faith != scope:target_faith + } + set_domicile_faith = scope:target_faith + } + } + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + faith = root.faith + } + set_county_faith = scope:target_faith + } + } + else = { + every_in_list = { + list = counties_to_move_in_to + change_development_level = { + value = var:county_development_to_get + if = { + limit = { + culture = { + has_cultural_parameter = development_gain_from_religious_exiles_is_doubled + } + } + multiply = 2 + } + } + set_county_faith = scope:target_faith + change_county_control = { + value = var:county_development_to_get + multiply = -5 + } + } + } + } + + if = { + limit = { + culture != scope:target_faith_associated_culture + } + culture = { + change_cultural_acceptance = { + target = scope:target_faith_associated_culture + value = { + value = scope:initial_available_development + subtract = scope:remaining_converted_development + } + desc = cultural_acceptance_gain_event + } + } + } + + scope:target_faith = { + change_variable = { + name = converted_development + subtract = { + every_in_list = { + list = counties_to_move_in_to + add = var:county_development_to_get + } + } + } + } + + if = { + limit = { + is_ai = no + } + add_achievement_global_variable_effect = { + VARIABLE = achieved_ep4_20_promised_land_achievement + VALUE = yes + } + } + + ai_chance = { + base = 0 + modifier = { + faith = scope:target_faith + add = 5000 + } + modifier = { + current_year >= 1000 + faith = { + has_doctrine_parameter = unreformed + NOT = { religion_tag = baltic_religion } + } + add = 10 + } + modifier = { + faith.religion = { is_in_family = rf_eastern } + scope:target_faith.religion = { is_in_family = rf_eastern } + add = 1000 + } + modifier = { + faith.religion = { is_in_family = rf_sinitic } + scope:target_faith.religion = { is_in_family = rf_sinitic } + add = 1000 + } + modifier = { + culture = { has_cultural_pillar = heritage_chinese } + scope:target_faith.religion = { is_in_family = rf_sinitic } + add = 1000 + } + modifier = { + highest_held_title_tier >= tier_kingdom + OR = { + has_perk = open_minded_perk + has_trait = compassionate + has_trait = humble + } + is_open_to_inviting_other_faiths_trigger = yes + faith.religion = { is_in_family = rf_eastern } + scope:target_faith = { num_county_followers < 5 } + add = 1000 + } + modifier = { + is_open_to_inviting_other_faiths_trigger = yes + scope:target_faith = { faith_is_open_minded_trigger = yes } + add = 10 + } + modifier = { + faith.religion = { is_in_family = rf_abrahamic } + NOT = { + scope:target_faith.religion = { is_in_family = rf_abrahamic } + } + factor = 0 + } + modifier = { + faith = { has_doctrine = muhammad_succession_sunni_doctrine } + NOT = { + scope:target_faith = { has_doctrine = muhammad_succession_sunni_doctrine } + } + factor = 0 + } + modifier = { + faith = { has_doctrine = muhammad_succession_shia_doctrine } + NOT = { + scope:target_faith = { has_doctrine = muhammad_succession_shia_doctrine } + } + factor = 0 + } + modifier = { + faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } + NOT = { + scope:target_faith = { has_doctrine = muhammad_succession_muhakkima_doctrine } + } + factor = 0 + } + modifier = { + faith = { has_doctrine = muhammad_succession_zandaqa_doctrine } + NOT = { + scope:target_faith = { has_doctrine = muhammad_succession_zandaqa_doctrine } + } + factor = 0 + } + modifier = { + faith != scope:target_faith + any_sub_realm_county = { + count < { + value = { + every_in_list = { + list = counties_to_move_in_to + add = 2 + } + } + } + faith = root.faith + } + factor = 0 + } + modifier = { + has_trait = eccentric + add = 5 + } + modifier = { + exists = scope:from_decision + add = 5 + } + } + } + + option = { + name = global_religion.1000.b + if = { + limit = { + exists = scope:from_decision + } + } + else = { + if = { + limit = { + faith != scope:target_faith + } + add_piety = { + value = { + value = scope:initial_available_development + subtract = scope:remaining_converted_development + multiply = 100 + divide = 2 + } + } + } + else = { + add_prestige = { + value = { + value = scope:initial_available_development + subtract = scope:remaining_converted_development + multiply = 100 + divide = 2 + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + exists = scope:from_decision + factor = 0 + } + } + } + + after = { + every_in_list = { + list = counties_to_move_in_to + remove_variable = county_development_to_get + } + scope:local_character = { + silent_disappearance_ai_effect = yes + } + } +} diff --git a/N3OW/events/harm_events.txt b/N3OW/events/harm_events.txt new file mode 100644 index 00000000..48a06d7a --- /dev/null +++ b/N3OW/events/harm_events.txt @@ -0,0 +1,9668 @@ +@army_commander_vulnerable_to_health_problems_value = good_health +@court_medic_able_to_help_value = very_high_skill_rating +@random_harm_standard_skill_check_value = very_high_skill_rating +@random_harm_easy_skill_check_value = mediocre_skill_rating + +namespace = harm + +################################################## +# #Responsive Incapability Events +# 0001 - 0010 Ailing with Age - You're growing old and your health is ailing. +# 0011 - 0020 Broken by Battle - You take brain damage during a battle. +# +# #Random Incapability Events +# 0501 - 0510 Best in Breed - Inbreeding has left you increasingly vapid and feeble-minded. +# 0511 - 0520 A Little Tumble - You fall from your horse/camel/elephant/donkey. +# 0521 - 0530 Gurgling & Grasping - Whilst at sea, you fall overboard and drown long enough to endanger your brain. +# 0531 - 0540 The World Slipping - Struck down by a stroke. +# 0541 - 0550 Chilled to the Bones - Crippling arthritis, chiefly in colder regions, can hurt the elderly. +# 0551 - 0560 A Thud & A Snap - A child falls from a tree. +# 0561 - 0570 The Descent - An old person falls down some stairs. +# 0571 - 0580 A Trip During Training - A fighting ruler is whacked on the bonce whilst training. +# 0581 - 0590 Slippery when Wet - Slipping getting out of the tub. +# 0591 - 0600 Death from Above - A peasant's falling pot leaves you incapable. +# 0601 - 0610 What's the Harm? - Children playing goes horribly wrong. +# 0611 - 0620 Dizzying Heights - As a cripplingly feeble character, stand up way, way too fast. +# 0621 - 0630 A Jolly Good Time - Drunken shenanigans. +# 0631 - 0640 A Rollicking Good Time - Heart attack whilst vigorously bonking. +# 0641 - 0650 Some Slight Swelling - Dropsy renders you bed-ridden. +# +# #Random Death Events +# 1001 - 1010 Choke On It - Choking at a feast. +# 1011 - 1020 Ride or Die - Something spooks your horse and it goes flying out of control. +# 1021 - 1030 Finger-Licking Good - Eating too much exotic food. +# 1031 - 1040 A Clogged Throat - Quinsy-induced choking. +# 1041 - 1050 Probably Safe - Fall into a body of water. +# 1051 - 1060 Flickering Flames - A small fire gets out of hand. +# 1061 - 1070 A Moderate Tumble - Falling out of a window whilst admiring the view. +# 1071 - 1080 Crimes of Passion - A scuffle between two rivals sees you accidentally stabbed. +# 1081 - 1090 Storm's Wrath - Death in a storm, due to a lightning hit/being crushed by a falling tree/twatted by a falling rock/catching a terminal chill. +# 1091 - 1100 Aching Minds - Struck down by an aneurysm. +# 1101 - 1110 Street Safety - Run over by a rider/run-away cart. +# 1111 - 1120 People's Justice - Stabbed by a servant in your capital that hates you. +# +# #Random Death Battle Events +# 2001 - 2010 Camp Fever - Terrible siege conditions cause you strife. +# 2011 - 2020 Marching Malaise - Terrible marching conditions are problematic. +# 2021 - 2030 So... Cold... - Frostbite claims you. +# 2031 - 2040 So... Hot... - Heat-stroke claims you. +# 2041 - 2050 For the Realm - Aggrieved soldiers at war too long assassinate you. +# 2051 - 2060 Starvation - Complications due to starvation from lack of supply. +# 2061 - 2070 Harried Each Step - Retreating from battle and caught by enemy soldiers. +# 2071 - 2080 A Disastrous Victory - Pursuing too far ahead in battle and caught by enemy soldiers. +################################################## + + + + + + + + + + +################################################## +# MISC SCRIPTED TRIGGERS & EFFECTS + +# Can this dynasty/house get another random horrific accident? +## Note: this only applies to the foreboding events. If a family is unlucky enough to roll two foreboding events in a row before the next one hits, well, that's only gonna reset their cooldown. +scripted_trigger harm_0000_not_on_dynastic_cooldown_trigger = { + # Are we a player? + trigger_if = { + limit = { is_ai = no } + NOT = { + # We structure it like this so that the variable registers as used by the game, avoiding the need for an error suppression event. + dynasty ?= { has_variable = player_random_harm_cooldown } + } + } + # No? Ok, then try our house. + trigger_if = { + limit = { + is_ai = yes + exists = house + } + NOT = { + # We structure it like this so that the variable registers as used by the game, avoiding the need for an error suppression event. + house ?= { has_variable = ai_random_harm_cooldown} + } + } +} + +# Apply appropriate cooldowns so that we don't repeatedly kill/incapacitate the same people. +scripted_effect harm_0000_apply_dynastic_cooldowns_effect = { + # Are we a player? + if = { + limit = { is_ai = no } + # Right, then we want to set a cooldown on our dynasty. + dynasty = { + set_variable = { + name = player_random_harm_cooldown + value = yes + years = 50 + } + } + } + else_if = { + limit = { exists = house } + house = { + set_variable = { + name = ai_random_harm_cooldown + value = yes + years = 30 + } + } + } +} + +# Grab our court physician and apply the correct scope _if_ we wouldn't be better off treating ourselves. +scripted_effect harm_0000_grab_available_court_physician_effect = { + if = { + limit = { + # Check to see if we'd be better of treating ourselves. + $PERSONAL_SKILL$ < @random_harm_standard_skill_check_value + # Else, try to grab the physician. + any_court_position_holder = { + type = court_physician_court_position + is_available_adult = yes + location = root.location + } + } + random_court_position_holder = { + type = court_physician_court_position + limit = { + is_available_adult = yes + location = root.location + } + save_scope_as = medic + } + } +} + +# Run the chance of a court physician saving us if we're at risk of becoming incapable. +scripted_effect harm_0000_physic_rescue_chance_incapable_effect = { + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_medium_odd_success_value } + desc = harm.0000.tt.incapable.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0000.tt.incapable.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_medium_odd_failure_value } + desc = harm.0000.tt.incapable.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0000.tt.incapable.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Having someone to call on for this type of thing offloads the "what do I do?!" panic. + stress_impact = { + base = minor_stress_impact_gain + calm = minor_stress_impact_loss + } +} + +# Run the chance of a court physician saving us if we're at risk of death. +scripted_effect harm_0000_physic_rescue_chance_death_effect = { + random_list = { + # You live. + 0 = { + modifier = { add = harm_event_random_list_medium_odd_success_value } + desc = harm.0000.tt.death.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0000.tt.death.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You die. + 0 = { + modifier = { add = harm_event_random_list_medium_odd_failure_value } + desc = harm.0000.tt.death.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0000.tt.death.failure + left_icon = root + death = { death_reason = $DEATH_REASON$ } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Having someone to call on for this type of thing offloads the "what do I do?!" panic. + stress_impact = { + base = minor_stress_impact_gain + calm = minor_stress_impact_loss + } +} + + + + + + + + + + + +################################################## +# RESPONSIVE INCAPABILITY EVENTS + +################################################## +# Ailing with Age +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +scripted_trigger harm_0001_general_requirements_trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Mustn't _already_ have a trait granting you this. + is_incapable = no + # Health checks. + age_ranked_health_vulnerability_threshold_trigger = yes +} + +scripted_effect harm_0001_age_gracefully_or_stress_loss_effect = { + if = { + limit = { + NOT = { has_character_modifier = aging_gracefully_modifier } + } + add_character_modifier = aging_gracefully_modifier + } + else = { add_stress = medium_stress_loss } +} + +# You're growing old and your health is ailing. +harm.0001 = { + type = character_event + title = harm.0001.t + desc = harm.0001.desc + theme = physical_health + left_portrait = { + character = root + animation = sick + outfit_tags = { nightgown } + } + override_background = { reference = bedchamber } + + # See you next time... + cooldown = { years = 10 } + + trigger = { + # Must've had the foreshadowing events. + has_character_flag = had_event_harm_0002 + has_character_flag = had_event_harm_0003 + # Then our general reqs. + harm_0001_general_requirements_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Weight up a bit for infirm characters. + modifier = { + add = 0.25 + has_trait = infirm + } + } + + immediate = { play_music_cue = "mx_cue_stress" } + + # I'll be around for donkey's years yet, I'm sure. + option = { + name = harm.0001.a + + duel = { + skill = prowess + value = very_high_skill_rating + # Your body is healthy, your mind is clear. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + # Always give _some_ chance. + min = -39 + } + desc = harm.0001.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0001.a.tt.success + left_icon = root + harm_0001_age_gracefully_or_stress_loss_effect = yes + } + } + # You're not as fit as you thought you were. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + # Limit how low the off-chance can go. + min = -19 + } + desc = harm.0001.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0001.a.tt.failure + left_icon = root + # Upgrade our incapability. + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_due_to_age } + } + } + } + + stress_impact = { + brave = miniscule_stress_impact_loss + craven = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_boldness = 1 + ai_energy = 1 + } + } + } + + # Perhaps I could live a little cleaner... + option = { + name = harm.0001.b + + duel = { + skill = learning + value = very_high_skill_rating + # You make a few necessary changes. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + # Always give _some_ chance. + min = -39 + } + desc = harm.0001.b.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0001.b.tt.success + left_icon = root + harm_0001_age_gracefully_or_stress_loss_effect = yes + } + } + # Nothing stops the march of time. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + # Limit how low the off-chance can go. + min = -19 + } + desc = harm.0001.b.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0001.b.tt.failure + left_icon = root + # Upgrade our incapability. + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_due_to_age } + } + } + } + + stress_impact = { + patient = miniscule_stress_impact_loss + impatient = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_rationality = 1 + ai_zeal = 0.5 + } + } + } + + # Stubborn: I'll go when I'm good and ready, DeathDeityName, not before. + option = { + name = harm.0001.c + trigger = { has_trait = stubborn } + trait = stubborn + + # Stubborness & will alone keep you going. + add_stress = major_stress_gain + + # We're just awarding stress directly here, so no stress impact. + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I'm not the youth I once was. + option = { + name = harm.0001.d + + # Welp, you've got some kinda chance. + random_list = { + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0001.d.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0001.d.tt.success + left_icon = root + harm_0001_age_gracefully_or_stress_loss_effect = yes + } + } + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0001.d.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0001.d.tt.failure + left_icon = root + # Upgrade our incapability. + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_due_to_age } + } + } + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + humble = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 1 + ai_value_modifier = { + ai_rationality = 0.25 + ai_energy = -0.5 + ai_boldness = -0.5 + } + } + } +} + +# Your mind fogs. +harm.0002 = { + type = character_event + title = harm.0002.t + desc = harm.0002.desc + theme = physical_health + left_portrait = { + character = root + animation = paranoia + } + override_background = { reference = bedchamber } + + trigger = { + NOT = { has_character_flag = had_event_harm_0002 } + harm_0001_general_requirements_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Weight up a bit for infirm characters. + modifier = { + add = 0.25 + has_trait = infirm + } + } + + immediate = { + # Flag this event as taken for .0001. + add_character_flag = had_event_harm_0002 + } + + # What was I thinking about? + option = { + name = harm.0002.a + flavor = harm.0002.a.tt + + # No effects, this event is just foreshadowing. + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } +} + +# Your bones creak. +harm.0003 = { + type = character_event + title = harm.0003.t + desc = { + desc = harm.0003.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_trait = blind } + desc = harm.0003.desc.blind + } + desc = harm.0003.desc.sighted + } + desc = harm.0003.desc.outro + } + theme = physical_health + left_portrait = { + character = root + animation = worry + } + override_background = { reference = bedchamber } + + trigger = { + NOT = { has_character_flag = had_event_harm_0003 } + harm_0001_general_requirements_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Weight up a bit for infirm characters. + modifier = { + add = 0.25 + has_trait = infirm + } + } + + immediate = { + # Flag this event as taken for .0001. + add_character_flag = had_event_harm_0003 + } + + # Gah, do everyone's joints #EMP creak#! like this? + option = { + name = harm.0003.a + flavor = harm.0003.a.tt + + # No effects, this is just foreshadowing. + + stress_impact = { + base = medium_stress_impact_gain + stubborn = minor_stress_impact_loss + } + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } +} + +################################################## +# Broken by Battle +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +scripted_trigger harm_0011_valid_emergency_medic_trigger = { + OR = { + # Court physician is with the army. + has_court_position = court_physician_court_position + # Any knight with the physician trait is with the army. + has_trait = lifestyle_physician + # Any character with obscenely high learning will also do. + learning >= 26 + } + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root.side_commander } + } +} + +# You take brain damage during a battle. +harm.0011 = { + type = character_event + title = harm.0011.t + desc = { + desc = harm.0011.desc.default_body + first_valid = { + triggered_desc = { + trigger = { exists = scope:medic } + desc = harm.0011.desc.medic_present + } + desc = harm.0011.desc.no_medic + } + } + theme = physical_health + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:medic + animation = shock + } + override_background = { reference = battlefield } + + # Trigger taken care of in harm.0012. + + # Weight_multiplier taken care of in harm.0012, too. + + # Harm.0012 is where it's all happening, basically. + + immediate = { play_music_cue = "mx_cue_stress" } + + # I'm fine! I-I'm fine... + option = { + name = harm.0011.a + + random_list = { + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0011.a.tt.success + # You recover, given time. + send_interface_toast = { + type = event_toast_effect_good + title = harm.0011.a.tt.success + left_icon = root + # Natural proclivity saves you. + random_list = { + 50 = { + desc = harm.0011.a.tt.success.bone + add_character_modifier = { + modifier = thick_skulled_modifier + years = 20 + } + } + 50 = { + desc = harm.0011.a.tt.success.brain + add_character_modifier = { + modifier = strong_willed_modifier + years = 20 + } + } + } + } + } + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0011.a.tt.failure + # But you were not fine. + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0011.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_due_to_battle_concussion } + # We have to do this weird double-scoping due to some kind of dark pact with Code, else things won't work. + scope:new_memory = { save_scope_as = battle_memory } + scope:battle_memory = { + set_variable = { + name = battle_location + value = scope:battle_location + } + } + } + } + } + + stress_impact = { base = major_stress_impact_gain } + ai_chance = { + # AI should only pick this option if there's not a chance to call for a medic. + base = 1 + } + } + + # Scope:medic. Please. My #EMP head.#! + option = { + name = harm.0011.b + trigger = { exists = scope:medic } + + # Scope:medic battles to save your thinker. + scope:medic = { + duel = { + skill = learning + value = very_high_skill_rating + # With HerHis aid, you pull through. + 0 = { + modifier = { add = harm_event_random_list_medium_odd_success_value } + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = harm.0011.b.tt.success + root = { + send_interface_toast = { + type = event_toast_effect_good + title = harm.0011.b.tt.success + left_icon = root + right_icon = scope:medic + # Clearly you were well-fortified. + random_list = { + 0 = { + modifier = { add = harm_event_random_list_medium_odd_success_value } + desc = harm.0011.a.tt.success.bone + add_character_modifier = { + modifier = thick_skulled_modifier + years = 20 + } + } + 0 = { + modifier = { add = harm_event_random_list_medium_odd_failure_value } + desc = harm.0011.a.tt.success.brain + add_character_modifier = { + modifier = strong_willed_modifier + years = 20 + } + } + } + # Good start to a friendship. + progress_towards_friend_effect = { + REASON = friend_emergency_surgery + CHARACTER = scope:medic + OPINION = 0 + } + } + } + } + # HerHis best just wasn't good enough. + 0 = { + modifier = { add = harm_event_random_list_medium_odd_failure_value } + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + # Without recent or prolonged experience on behalf of your physic, your odds are much worse. + modifier = { + add = 25 + NOR = { + has_trait = lifestyle_physician + has_court_position = court_physician_court_position + } + } + desc = harm.0011.b.tt.failure + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0011.b.tt.failure + left_icon = root + right_icon = scope:medic + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_due_to_battle_concussion } + # We have to do this weird double-scoping due to some kind of dark pact with Code, else things won't work. + scope:new_memory = { save_scope_as = battle_memory } + scope:battle_memory = { + set_variable = { + name = battle_location + value = scope:battle_location + } + } + # And uhhh, you're not happy. + add_opinion = { + target = scope:medic + modifier = botched_my_treatment_crime_opinion + } + } + } + } + } + } + + stress_impact = { + base = major_stress_impact_gain + trusting = minor_stress_impact_loss + stubborn = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + # AI should be picking this if it's available. + base = 1000 + } + } +} + +scripted_trigger harm_0012_valid_commander_trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Mustn't _already_ have a trait granting you this. + is_incapable = no +} + +# Setup event for harm.0011. +# Due to mechanical constraints, currently only fires for the leaders on either side. +harm.0012 = { + hidden = yes + scope = combat_side + + trigger = { + side_commander ?= { harm_0012_valid_commander_trigger = yes } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + ## We have to be a bit weird checking this one: there's not an easy way to weight the chance of the event by any commander potentially fulfilling the event, so we weight by a random valid one. + modifier = { + add = side_commander.harm_game_rule_likelihood_value + exists = side_commander + } + # We deliberately weight only a _little_ bit for prowess - you've got a retinue and we still want bad luck to strike, so a mild rebate is all you get. + modifier = { + add = -0.25 + side_commander ?= { + OR = { + prowess >= extremely_high_skill_rating + has_trait = lifestyle_blademaster + } + } + } + } + + immediate = { + # Grab our location. + combat.location = { save_scope_as = battle_location } + # Try to grab a physician, if there's one available. + if = { + limit = { + any_side_knight = { harm_0011_valid_emergency_medic_trigger = yes } + } + # Pick out the appropriate knights. + every_side_knight = { + limit = { harm_0011_valid_emergency_medic_trigger = yes } + add_to_list = potential_medics_list + } + # Then grab someone at random - medics are likely to be busy, so we don't just grab the best one. + random_in_list = { + list = potential_medics_list + weight = { + base = 0 + # You're important, so there's more likelihood of better medics being rushed to you. + modifier = { add = learning } + # But we weight down if they're not part of your army. + modifier = { + factor = 0.5 + NOT = { knight_army = root.side_commander.commanding_army } + } + } + save_scope_as = medic + } + } + # Then we fire the next event. + side_commander = { trigger_event = harm.0011 } + } +} + + + + + + + + + + + +################################################## +# RANDOM INCAPABILITY EVENTS + +################################################## +# Best in Breed +# by Ewan Cowhig Croft +# 0501 - 0510 +################################################## + +# Inbreeding has left you increasingly vapid and feeble-minded. +harm.0501 = { + type = character_event + title = harm.0501.t + desc = harm.0501.desc + theme = physical_health + left_portrait = { + character = root + animation = pain + } + override_background = { reference = courtyard } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0501 } + has_character_flag = had_event_harm_0502 + # We don't recheck your inbreeding situation because your genetic heritage can't have changed and you already have a character flag indicating you went through this once, so there's no need. + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Weight up if you're _already_ inbred. + modifier = { + add = 0.5 + has_trait = inbred + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0501 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # If you weren't obviously inbred before, you are now. + if = { + limit = { + NOT = { has_trait = inbred } + } + add_trait = inbred + } + } + + # Where... where am I? + option = { + name = harm.0501.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0501.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0501.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0501.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0501.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # I can #EMP control myself#!. + option = { + name = harm.0501.b + trigger = { has_trait = whole_of_body } + trait = whole_of_body + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # My mind is sharper than this. + option = { + name = harm.0501.c + trigger = { learning >= @random_harm_standard_skill_check_value } + skill = learning + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0501.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0501.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0501.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0501.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0502 = { + type = character_event + title = harm.0502.t + desc = harm.0502.desc + theme = physical_health + left_portrait = { + character = root + animation = pain + } + override_background = { reference = courtyard } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0502 } + # Right, let's check your inbreeding situation. + ## First, we filter out creepy pure-blooded types, because they're homozygous and thus aren't affected by these things. + NOT = { has_trait = pure_blooded } + ## Now, let's check what the immediate inbreeding situation is like and grab some scopes. + ### First, you need both parents or we'll get errors. + any_parent = { count >= 2 } + ### Right, now let's check for recent inbreeding and get those parents saved up. + any_parent = { save_temporary_scope_as = char_temp_1 } + any_parent = { + this != scope:char_temp_1 + is_close_or_extended_family_of = scope:char_temp_1 + save_temporary_scope_as = char_temp_2 + } + ## Then we want to make sure you've got all six parents'n'grandparents available so we can iterate through them. + ### Check they're there. + scope:char_temp_1 = { + any_parent = { count >= 2 } + } + scope:char_temp_2 = { + any_parent = { count >= 2 } + } + ### Then grab the scopes so we don't constantly reiterate for them. + scope:char_temp_1 = { + any_parent = { save_temporary_scope_as = char_temp_3 } + any_parent = { + this != scope:char_temp_3 + save_temporary_scope_as = char_temp_4 + } + } + scope:char_temp_2 = { + any_parent = { save_temporary_scope_as = char_temp_5 } + any_parent = { + this != scope:char_temp_5 + save_temporary_scope_as = char_temp_6 + } + } + ## Sweet, we've got this far, so check what our degrees of incest are. + OR = { + # We'll take an extra generation of close kin on either grandparental side. + scope:char_temp_3 = { is_close_family_of = scope:char_temp_4 } + scope:char_temp_5 = { is_close_family_of = scope:char_temp_6 } + # Alternatively, if all of your grandparents were vaguely related to their partner, that works too. + AND = { + scope:char_temp_3 = { is_close_or_extended_family_of = scope:char_temp_4 } + scope:char_temp_5 = { is_close_or_extended_family_of = scope:char_temp_5 } + } + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Weight up if you're _already_ inbred. + modifier = { + add = 0.5 + has_trait = inbred + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0502 + } + + # What strange malady is this? + option = { + name = harm.0502.a + + # Foreshadow. + custom_tooltip = harm.0502.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0501 + years = { 2 4 } + } + } + } + } +} + +################################################## +# A Little Tumble +# by Ewan Cowhig Croft +# 0511 - 0520 +################################################## + +scripted_trigger harm_0511_rides_horses_trigger = { + OR = { + # Either you're not a tribe. + NOT = { government_has_flag = government_is_tribal } + # Or you have Horse Lords. + mpo_can_recruit_nomad_maa_trigger = yes + culture = { culture_has_archer_cavalry_maa = yes } + has_trait = nomadic_philosophy + } +} + +# You fall from your horse/camel/elephant/donkey. +harm.0511 = { + type = character_event + title = harm.0511.t + desc = harm.0511.desc + theme = physical_health + left_portrait = { + character = root + animation = loss_1 + } + override_background = { reference = wilderness } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0511 } + has_character_flag = had_event_harm_0512 + # Are we expected to ride a horse regularly? + harm_0511_rides_horses_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0511 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # Wait, n-! + option = { + name = harm.0511.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0511.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0511.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0511.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0511.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Duck and roll. + option = { + name = harm.0511.b + trigger = { + OR = { + has_trait = brave + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 75 + } + } + } + trait = brave + trait = tourney_participant + trait = lifestyle_hunter + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Take it on the shoulder. + option = { + name = harm.0511.c + trigger = { martial >= @random_harm_standard_skill_check_value } + skill = martial + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0511.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0511.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0511.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0511.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0512 = { + type = character_event + title = harm.0512.t + desc = harm.0512.desc + theme = physical_health + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left + } + override_background = { reference = wilderness } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0512 } + # Are we expected to ride a horse regularly? + harm_0511_rides_horses_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0512 + } + + # Heh, not letting #EMP that#! happen again. + option = { + name = harm.0512.a + + # Foreshadow. + custom_tooltip = harm.0512.a.tt + + stress_impact = { base = medium_stress_impact_loss } + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0511 + years = { 2 4 } + } + } + } + } +} + +################################################## +# Gurgling & Grasping +# by Ewan Cowhig Croft +# 0521 - 0530 +################################################## + +scripted_trigger harm_0521_has_waterside_capital_trigger = { + location = { + OR = { + is_sea_province = yes + # Now we check for county so that your capital barony doesn't have to be literally _on_ the sea. + county ?= { + OR = { + is_coastal_county = yes + is_riverside_county = yes + } + } + } + } +} + +scripted_trigger harm_0521_cultural_tradition_encourages_swimming_trigger = { + culture = { + OR = { + has_cultural_parameter = next_level_trade_ports + has_cultural_parameter = maritime_mercantilism_coastal_holdings + has_cultural_parameter = trade_ports_stationed_maa_bonus + has_cultural_parameter = trade_ports_enabled_for_tribals + has_cultural_parameter = coastal_holdings_give_defensive_bonus + has_cultural_parameter = trade_ports_give_control_growth + has_cultural_parameter = trade_ports_give_levies + } + } +} + +# Whilst at sea, you fall overboard and drown long enough to endanger your brain. +harm.0521 = { + type = character_event + title = harm.0521.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + location = { is_sea_province = yes } + } + desc = harm.0521.desc.sea + } + triggered_desc = { + trigger = { + location.county = { is_riverside_county = yes } + } + desc = harm.0521.desc.river + } + desc = harm.0521.desc.coastal + } + desc = harm.0521.desc.outro + } + theme = physical_health + left_portrait = { + character = root + animation = fear + } + override_background = { reference = fp1_ocean } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0521 } + has_character_flag = had_event_harm_0522 + # Do we have an opportunity to drown? + harm_0521_has_waterside_capital_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0521 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # A rope, a net, a plank, something! + option = { + name = harm.0521.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0521.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0521.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0521.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0521.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Break for the surface! + option = { + name = harm.0521.b + trigger = { + OR = { + # Strong swimmers. + has_trait = athletic + # Not their first time falling overboard. + AND = { + has_trait = viking + can_raid_across_water_trigger = yes + } + # Has some cultural affinity for the water. + harm_0521_cultural_tradition_encourages_swimming_trigger = yes + } + } + trait = athletic + trait = viking + if = { + limit = { harm_0521_cultural_tradition_encourages_swimming_trigger = yes } + custom_tooltip = harm.0521.b.tt.unlocked_by_cultrad + } + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Swim, #EMP swim#!! + option = { + name = harm.0521.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0521.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0521.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0521.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0521.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0522 = { + type = character_event + title = harm.0522.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + location = { is_sea_province = yes } + } + desc = harm.0522.desc.sea + } + triggered_desc = { + trigger = { + location.county = { is_riverside_county = yes } + } + desc = harm.0522.desc.river + } + desc = harm.0522.desc.coastal + } + desc = harm.0522.desc.outro + } + theme = physical_health + left_portrait = { + character = root + animation = admiration + } + override_background = { reference = fp1_ocean } + + trigger = { + # Standard checks. + is_available_adult_or_is_commanding = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0522 } + # Do we have an opportunity to drown? + harm_0521_has_waterside_capital_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0522 + } + + # The water is almost hypnotic... + option = { + name = harm.0522.a + + # Foreshadow. + custom_tooltip = harm.0522.a.tt + + stress_impact = { base = medium_stress_impact_loss } + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0521 + years = { 2 4 } + } + } + } + } +} + +################################################## +# The World Slipping +# by Ewan Cowhig Croft +# 0531 - 0540 +################################################## + +# Struck down by a stroke. +harm.0531 = { + type = character_event + title = harm.0531.t + desc = harm.0531.desc + theme = physical_health + left_portrait = { + character = root + animation = pain + } + lower_right_portrait = scope:medic + override_background = { reference = sitting_room } + + trigger = { + # Standard checks. + is_available_adult = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0531 } + has_character_flag = had_event_harm_0532 + # Are you at a health risk? + OR = { + # Due to blood pressure... + potential_victim_of_apoplexy_trigger = yes + # ... or just age. + age_ranked_health_vulnerability_threshold_trigger = yes + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + potential_victim_of_apoplexy_trigger = yes + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0531 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Try to grab our court physician. + harm_0000_grab_available_court_physician_effect = { PERSONAL_SKILL = learning } + } + + # My mind is... on #EMP fire#!... + option = { + name = harm.0531.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0531.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0531.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0531.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0531.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # I know myself, and this will pass. + option = { + name = harm.0531.b + trigger = { has_trait = whole_of_body } + trait = whole_of_body + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Call for your physic. + option = { + name = harm.0000.tt.physician + trigger = { + exists = scope:medic + scope:medic.learning >= @court_medic_able_to_help_value + } + show_as_unavailable = { scope:medic.learning < @court_medic_able_to_help_value } + + # Random roll & stress handled in this effect. + harm_0000_physic_rescue_chance_incapable_effect = yes + + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 10 + } + } + + # HealthGodName, give me strength. + option = { + name = harm.0531.c + trigger = { learning >= @random_harm_standard_skill_check_value } + skill = learning + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0531.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0531.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0531.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0531.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0532 = { + type = character_event + title = harm.0532.t + desc = harm.0532.desc + theme = physical_health + left_portrait = { + character = root + animation = stress + } + override_background = { reference = sitting_room } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0532 } + # Are you at a health risk? + OR = { + # Due to blood pressure... + potential_victim_of_apoplexy_trigger = yes + # ... or just age. + age_ranked_health_vulnerability_threshold_trigger = yes + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + potential_victim_of_apoplexy_trigger = yes + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0532 + } + + # These infernal headaches, will they never cease? + option = { + name = harm.0532.a + + # Foreshadow. + custom_tooltip = harm.0532.a.tt + + stress_impact = { base = medium_stress_impact_gain } + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0531 + years = { 2 4 } + } + } + } + } +} + +################################################## +# Chilled to the Bones +# by Ewan Cowhig Croft +# 0541 - 0550 +################################################## + +# Is the winter here bad enough to hurt someone of your age? +scripted_trigger harm_0541_bad_winter_trigger = { + OR = { + AND = { + OR = { + # Adults. + age >= 55 + # Young children. + child_not_teen_trigger = yes + } + location = { has_province_modifier = winter_harsh_modifier } + } + AND = { + OR = { + # Adults. + age >= 65 + # Very young children. + child_is_infant_trigger = yes + } + location = { has_province_modifier = winter_normal_modifier } + } + } + # Now check our health. + trigger_if = { + limit = { is_adult = yes } + age_ranked_health_vulnerability_threshold_trigger = yes + } + trigger_else = { health <= medium_health } +} + +# Are you paying enough in court amenity costs to have people who'd notice and help whilst there's still time? +scripted_trigger harm_0541_saved_by_court_amenities_trigger = { + has_royal_court = yes + # We'll take either lodgings or servants. + OR = { + amenity_level = { + target = court_lodging_standards + value >= 3 + } + amenity_level = { + target = court_servants + value >= 3 + } + } +} + +# Crippling arthritis, chiefly in colder regions, can hurt the elderly whilst the young freeze to death. +harm.0541 = { + type = character_event + title = harm.0541.t + desc = { + first_valid = { + triggered_desc = { + trigger = { child_is_infant_trigger = yes } + desc = harm.0541.desc.baby + } + desc = harm.0541.desc.fallback + } + } + theme = physical_health + left_portrait = { + character = root + animation = pain + outfit_tags = { nightgown } + } + override_background = { reference = bedchamber } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0541 } + ## Exemption here so that babies can still freeze to death every now and then. + OR = { + has_character_flag = had_event_harm_0542 + child_is_infant_trigger = yes + } + # Check winter + age stuff. + harm_0541_bad_winter_trigger = yes + # Lastly, are you paying other people to deal with this who should notice? + harm_0541_saved_by_court_amenities_trigger = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # If your body is poorly set up, then you're more accutely vulnerable. + modifier = { + add = 0.25 + has_weak_physical_health_traits_trigger = yes + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0541 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # ... + option = { + name = harm.0541.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0541.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0541.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0541.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0541.a.tt.failure + left_icon = root + # Infants are at extra risk. + if = { + limit = { child_is_infant_trigger = yes } + death = { death_reason = death_froze } + log_harm_event_death_as_variable_effect = yes + } + # Though everyone else isn't having a _great_ time. + else = { + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # I've faced worse than this. + option = { + name = harm.0541.b + trigger = { + OR = { + has_trait = winter_soldier + has_trait = stubborn + } + } + trait = winter_soldier + trait = stubborn + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I will not be laid low by #EMP frost#!! + option = { + name = harm.0541.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0541.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0541.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0541.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0541.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0542 = { + type = character_event + title = harm.0542.t + desc = { + first_valid = { + triggered_desc = { + trigger = { child_is_infant_trigger = yes } + desc = harm.0542.desc.baby + } + desc = harm.0542.desc.fallback + } + } + theme = physical_health + left_portrait = { + character = root + animation = stress + outfit_tags = { nightgown } + } + override_background = { reference = bedchamber } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0542 } + # Check winter + age stuff. + harm_0541_bad_winter_trigger = yes + # Lastly, are you paying other people to deal with this who should notice? + harm_0541_saved_by_court_amenities_trigger = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # If your body is poorly set up, then you're more accutely vulnerable. + modifier = { + add = 0.25 + has_weak_physical_health_traits_trigger = yes + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0542 + } + + # I so wish it were warmer... + option = { + name = harm.0542.a + + # Foreshadow. + custom_tooltip = harm.0542.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0541 + years = { 2 4 } + } + } + } + } +} + +################################################## +# A Thud & A Snap +# by Ewan Cowhig Croft +# 0551 - 0560 +################################################## + +scripted_trigger harm_0551_child_might_be_outside_trigger = { + # Must have sufficient health that they're outside. + health >= medium_health + has_short_disease_trigger = no + NOT = { has_trait_with_flag = debilitating_illness } +} + +scripted_trigger harm_0551_child_location_has_trees_trigger = { + location = { + OR = { + terrain = drylands + terrain = farmlands + terrain = floodplains + terrain = forest + terrain = hills + terrain = jungle + terrain = mountains + terrain = oasis + terrain = plains + terrain = taiga + terrain = wetlands + } + } +} + +# A child falls from a tree. +harm.0551 = { + type = character_event + title = harm.0551.t + desc = harm.0551.desc + theme = physical_health + left_portrait = { + character = root + animation = fear + } + override_background = { reference = wilderness } + + trigger = { + # Standard checks. + is_available = yes + child_not_infant_trigger = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0551 } + has_character_flag = had_event_harm_0552 + # Do we have trees to climb? + harm_0551_child_location_has_trees_trigger = yes + # Would this child actually attempt this? + harm_0551_child_might_be_outside_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = rowdy + has_trait = brave + } + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0551 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # Just... gotta be careful... + option = { + name = harm.0551.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0551.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0551.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0551.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0551.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Help. Help! HELP! + option = { + name = harm.0551.b + trigger = { + OR = { + has_trait = craven + has_trait = pensive + } + } + trait = craven + trait = pensive + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # How hard can it be? + option = { + name = harm.0551.c + trigger = { prowess >= @random_harm_easy_skill_check_value } + skill = prowess + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0551.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0551.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0551.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0551.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0552 = { + type = character_event + title = harm.0552.t + desc = harm.0552.desc + theme = physical_health + left_portrait = { + character = root + animation = happiness + } + override_background = { reference = wilderness } + + trigger = { + # Standard checks. + is_available = yes + child_not_infant_trigger = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0552 } + # Do we have trees to climb? + harm_0551_child_location_has_trees_trigger = yes + # Would this child actually attempt this? + harm_0551_child_might_be_outside_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = rowdy + has_trait = brave + } + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0552 + } + + # What fun! + option = { + name = harm.0552.a + + # Foreshadow. + custom_tooltip = harm.0552.a.tt + + stress_impact = { base = medium_stress_impact_loss } + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0551 + years = { 2 4 } + } + } + } + } +} + +################################################## +# The Descent +# by Ewan Cowhig Croft +# 0561 - 0570 +################################################## + +# An old person falls down some stairs. +harm.0561 = { + type = character_event + title = harm.0561.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_government = landless_adventurer_government } + desc = harm.0561.desc_adventurer + } + desc = harm.0561.desc + } + } + theme = physical_health + left_portrait = { + character = root + animation = fear + } + override_background = { reference = corridor_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0561 } + has_character_flag = had_event_harm_0562 + # Health checks. + age_ranked_health_vulnerability_threshold_trigger = yes + # Do you have lots of stairs to walk down? + location_has_multi_story_buildings_trigger = { LOCATION = root.location } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0561 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # Oh — wait — NOO- + option = { + name = harm.0561.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0561.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0561.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0561.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0561.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # One foot in front of the other, stay calm. + option = { + name = harm.0561.b + trigger = { + OR = { + has_trait = diligent + has_trait = patient + } + } + trait = diligent + trait = patient + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # They're just #EMP stairs#!. + option = { + name = { + trigger = { is_landless_adventurer = no } + text = harm.0561.c + } + name = { + trigger = { has_government = landless_adventurer_government } + text = harm.0561.c.adventurer + } + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0561.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0561.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0561.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0561.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0562 = { + type = character_event + title = harm.0562.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_government = landless_adventurer_government } + desc = harm.0562.desc_adventurer + } + desc = harm.0562.desc + } + } + theme = physical_health + left_portrait = { + character = root + animation = worry + } + override_background = { reference = corridor_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0562 } + # Health checks. + age_ranked_health_vulnerability_threshold_trigger = yes + # Do you have lots of stairs to walk down? + location_has_multi_story_buildings_trigger = { LOCATION = root.location } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0562 + } + + # Troubling. + option = { + name = harm.0562.a + + # Foreshadow. + custom_tooltip = harm.0562.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0561 + years = { 2 4 } + } + } + } + } +} + +################################################## +# A Trip During Training +# by Ewan Cowhig Croft +# 0571 - 0580 +################################################## + +scripted_trigger harm_0571_suitable_sparring_partner_trigger = { + prowess <= root.prowess + calc_true_if = { + amount >= 3 + # People who suck as knights are dangerous to fight with. + prowess <= low_skill_rating + # If you're quite skilled and they're quite bad, then their thinking is lateral enough to pose a bit of a risk. + AND = { + root.prowess >= very_high_skill_rating + prowess <= mediocre_skill_rating + } + # Various traits make you less predictable or more furiously uncontrolled. + has_trait = wrathful + has_trait = deceitful + has_trait = ambitious + has_trait = arbitrary + has_trait = cynical + has_trait = callous + has_trait = sadistic + has_trait = stubborn + has_trait = vengeful + # Plus never rule out malice. + opinion = { + target = root + value <= high_negative_opinion + } + } +} + +# A fighting ruler is whacked on the bonce whilst training. +harm.0571 = { + type = character_event + title = harm.0571.t + desc = harm.0571.desc + theme = physical_health + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:sparring_partner + animation = aggressive_sword + } + override_background = { reference = courtyard } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0571 } + has_character_flag = had_event_harm_0572 + # Craven and lazy characters generally won't be in this situation. + NOR = { + has_trait = craven + has_trait = lazy + } + # Must be expected to train. + NOT = { has_trait = blind } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + # And you need someone who's over-eager. + any_knight = { harm_0571_suitable_sparring_partner_trigger = yes } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = brave + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0571 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Is our last guy still valid? + if = { + limit = { + OR = { + NOT = { exists = scope:sparring_partner } + scope:sparring_partner ?= { harm_0571_suitable_sparring_partner_trigger = no } + } + } + # Ok, if they're not, grab a new one. + ordered_knight = { + limit = { harm_0571_suitable_sparring_partner_trigger = yes } + # Get our worst knight. + order_by = { + value = prowess + multiply = -1 + } + save_scope_as = sparring_partner + } + } + } + + # By TricksterGodName, you fool, that was my head! + option = { + name = harm.0571.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0571.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0571.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0571.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0571.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Barely a scratch. + option = { + name = harm.0571.b + trigger = { has_trait = stubborn } + trait = stubborn + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Breath — it could be worse. + option = { + name = harm.0571.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0571.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0571.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0571.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0571.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0572 = { + type = character_event + title = harm.0572.t + desc = harm.0572.desc + theme = physical_health + left_portrait = { + character = root + animation = sword_yield_start + } + right_portrait = { + character = scope:sparring_partner + animation = aggressive_sword + } + override_background = { reference = courtyard } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0572 } + # Craven and lazy characters generally won't be in this situation. + NOR = { + has_trait = craven + has_trait = lazy + } + # Must be expected to train. + NOT = { has_trait = blind } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + # And you need someone who's over-eager. + any_knight = { harm_0571_suitable_sparring_partner_trigger = yes } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = brave + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0572 + # Save a sparring partner. + ordered_knight = { + limit = { harm_0571_suitable_sparring_partner_trigger = yes } + # Get our worst knight. + order_by = { + value = prowess + multiply = -1 + } + save_scope_as = sparring_partner + } + } + + # Be careful, you lout! + option = { + name = harm.0572.a + + # Foreshadow. + custom_tooltip = harm.0572.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0571 + years = { 2 4 } + } + } + } + } +} + +################################################## +# Slippery when Wet +# by Ewan Cowhig Croft +# 0581 - 0590 +################################################## + +# Slipping getting out of the tub. +harm.0581 = { + type = character_event + title = harm.0581.t + desc = harm.0581.desc + theme = physical_health + left_portrait = { + character = root + animation = shock + } + override_background = { reference = relaxing_room } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0581 } + has_character_flag = had_event_harm_0582 + # Medieval mores being what they were, some characters are just never going to have a private bath. + NOT = { has_trait = gregarious } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Some characters are more likely to take baths. + modifier = { + add = 0.25 + OR = { + has_trait = lazy + has_perk = wash_your_hands_perk + has_character_modifier = fp1_bathing_health_modifier + has_character_modifier = fp1_bathing_attraction_modifier + } + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0581 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + add_character_flag = { + flag = is_naked + days = 30 + } + } + + # Wait, FateGodName, n— + option = { + name = harm.0581.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0581.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0581.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0581.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0581.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Take it slow, take it safe. + option = { + name = harm.0581.b + trigger = { + OR = { + has_trait = diligent + has_trait = craven + has_trait = patient + } + } + trait = diligent + trait = craven + trait = patient + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + after = { + remove_character_flag = is_naked + } +} + +# Attached foreboding event. +harm.0582 = { + type = character_event + title = harm.0582.t + desc = harm.0582.desc + theme = physical_health + left_portrait = { + character = root + animation = personality_bold + } + override_background = { reference = relaxing_room } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0582 } + # Medieval mores being what they were, some characters are just never going to have a private bath. + NOT = { has_trait = gregarious } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Some characters are more likely to take baths. + modifier = { + add = 0.25 + OR = { + has_trait = lazy + has_perk = wash_your_hands_perk + has_character_modifier = fp1_bathing_health_modifier + has_character_modifier = fp1_bathing_attraction_modifier + } + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0582 + add_character_flag = { + flag = is_naked + days = 30 + } + } + + # I should be more careful, I suppose. + option = { + name = harm.0582.a + + # Foreshadow. + custom_tooltip = harm.0582.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0581 + years = { 2 4 } + } + } + } + remove_character_flag = is_naked + } +} + +################################################## +# Death from Above +# by Ewan Cowhig Croft +# 0591 - 0600 +################################################## + +scripted_trigger harm_0591_likely_to_go_to_town_trigger = { + # Shy'n'lazy characters don't bother going out. + NOR = { + has_trait = shy + has_trait = lazy + # Humble characters _do_ go out, but the tone is narratively inconsistent for them, so we avoid it. + has_trait = humble + } +} + +# A peasant's falling pot leaves you incapable. +harm.0591 = { + type = character_event + title = harm.0591.t + desc = harm.0591.desc + theme = physical_health + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left + } + override_background = { reference = alley_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0591 } + has_character_flag = had_event_harm_0592 + # Would they be out for this? + harm_0591_likely_to_go_to_town_trigger = yes + # Town + location = { + OR = { + has_holding_type = city_holding + has_holding_type = castle_holding + has_holding_type = church_holding + } + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = gregarious + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0591 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # Throw yourself to the side. + option = { + name = harm.0591.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0591.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0591.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0591.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0591.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # #EMP Am I never safe?!!#! + option = { + name = harm.0591.b + flavor = harm.0591.b.tt + trigger = { + OR = { + has_trait = craven + has_trait = paranoid + } + } + trait = craven + trait = paranoid + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + # Paranoid characters get reduced stress loss so that they don't get nuts just for taking their opt-out. + paranoid = major_stress_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I'm already moving. + option = { + name = harm.0591.c + trigger = { intrigue >= @random_harm_standard_skill_check_value } + skill = intrigue + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0591.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0591.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0591.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0591.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0592 = { + type = character_event + title = harm.0592.t + desc = harm.0592.desc + theme = physical_health + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_left + } + override_background = { reference = alley_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0592 } + # Would they be out for this? + harm_0591_likely_to_go_to_town_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = gregarious + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0592 + } + + # These #EMP peasants#!. + option = { + name = harm.0592.a + + # Foreshadow. + custom_tooltip = harm.0592.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0591 + years = { 2 4 } + } + } + } + } +} + +################################################## +# What's the Harm? +# by Ewan Cowhig Croft +# 0601 - 0610 +################################################## + +scripted_trigger harm_0601_valid_playmate_trigger = { + is_available = yes + child_not_infant_trigger = yes + # Must be within certain bounds. + ## Not too young. + age >= { + value = root.age + add = -5 + } + ## Not too old. + age <= { + value = root.age + add = 5 + } + NOR = { + has_trait = pensive + has_trait = craven + has_trait = compassionate + } + opinion = { + target = root + value >= 1 + } +} + +scripted_effect harm_0601_grab_valid_playmate_effect = { + random_courtier = { + limit = { + harm_0601_valid_playmate_trigger = yes + OR = { + has_trait = callous + has_trait = sadistic + has_trait = wrathful + } + } + alternative_limit = { + harm_0601_valid_playmate_trigger = yes + has_trait = rowdy + } + alternative_limit = { harm_0601_valid_playmate_trigger = yes } + save_scope_as = playmate + } +} + +# Children playing goes horribly wrong. +harm.0601 = { + type = character_event + title = harm.0601.t + desc = harm.0601.desc + theme = physical_health + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:playmate + animation = fear + } + override_background = { reference = corridor_day } + + trigger = { + # Standard checks. + is_available = yes + child_not_infant_trigger = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0601 } + has_character_flag = had_event_harm_0602 + # Some traits stop this happening. + NOR = { + # Craven children give up earlier and are thus safe. + has_trait = craven + # Paranoid children fear some trick earlier, and are thus also safe. + has_trait = paranoid + } + # And someone to play rough with. + any_courtier = { harm_0601_valid_playmate_trigger = yes } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = rowdy + has_trait = brave + } + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0601 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Pick a new playmate if our old one isn't valid. + if = { + limit = { + OR = { + NOT = { exists = scope:playmate } + scope:playmate ?= { harm_0601_valid_playmate_trigger = no } + } + } + harm_0601_grab_valid_playmate_effect = yes + } + } + + # I... don't feel so good... + option = { + name = harm.0601.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0601.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0601.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0601.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0601.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } +} + +# Attached foreboding event. +harm.0602 = { + type = character_event + title = harm.0602.t + desc = harm.0602.desc + theme = physical_health + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:playmate + animation = happiness + } + override_background = { reference = corridor_day } + + trigger = { + # Standard checks. + is_available = yes + child_not_infant_trigger = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0602 } + # Some traits stop this happening. + NOR = { + # Craven children give up earlier and are thus safe. + has_trait = craven + # Paranoid children fear some trick earlier, and are thus also safe. + has_trait = paranoid + } + # And someone to play rough with. + any_courtier = { harm_0601_valid_playmate_trigger = yes } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = rowdy + has_trait = brave + } + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0602 + # Grab a playmate. + harm_0601_grab_valid_playmate_effect = yes + } + + # This is a great idea! + option = { + name = harm.0602.a + + # Foreshadow. + custom_tooltip = harm.0602.a.tt + # If relevant, let's set up a potential friendship. + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:playmate } + } + set_relation_potential_friend = scope:playmate + } + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0601 + years = { 2 4 } + } + } + } + } +} + +################################################## +# Dizzying Heights +# by Ewan Cowhig Croft +# 0611 - 0620 +################################################## + +# As a cripplingly feeble character, stand up way, way too fast. +## The term is orthostatic hypotension, and yes, if you're in poor health, it can and will absolutely killed you. +harm.0611 = { + type = character_event + title = harm.0611.t + desc = { + desc = harm.0611.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_trait = blind } + desc = harm.0611.desc.blind + } + desc = harm.0611.desc.fallback + } + } + theme = physical_health + left_portrait = { + character = root + animation = fear + } + lower_right_portrait = scope:medic + override_background = { reference = sitting_room } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0611 } + has_character_flag = had_event_harm_0612 + # Does this type of thing pose a danger to you? + OR = { + has_weak_physical_health_traits_trigger = yes + age_ranked_health_vulnerability_threshold_trigger = yes + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0611 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Try to grab our court physician. + harm_0000_grab_available_court_physician_effect = { PERSONAL_SKILL = learning } + } + + # Wait.. wha... my... + option = { + name = harm.0611.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0611.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0611.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0611.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0611.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Grit your teeth against the rush. + option = { + name = harm.0611.b + trigger = { has_trait = whole_of_body } + trait = whole_of_body + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Call for your physic. + option = { + name = harm.0000.tt.physician + trigger = { + exists = scope:medic + scope:medic.learning >= @court_medic_able_to_help_value + } + show_as_unavailable = { scope:medic.learning < @court_medic_able_to_help_value } + + # Random roll & stress handled in this effect. + harm_0000_physic_rescue_chance_incapable_effect = yes + + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 10 + } + } + + # Focus. Clarity. #EMP Focus#!. + option = { + name = harm.0611.c + trigger = { learning >= @random_harm_standard_skill_check_value } + skill = learning + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0611.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0611.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0611.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0611.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0612 = { + type = character_event + title = harm.0612.t + desc = harm.0612.desc + theme = physical_health + left_portrait = { + character = root + animation = worry + } + override_background = { reference = sitting_room } + + trigger = { + # Standard checks. + is_available_adult = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + NOT = { has_character_flag = had_event_harm_0612 } + # Does this type of thing pose a danger to you? + OR = { + has_weak_physical_health_traits_trigger = yes + age_ranked_health_vulnerability_threshold_trigger = yes + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0612 + } + + # I'm still dizzy. + option = { + name = harm.0612.a + + # Foreshadow. + custom_tooltip = harm.0612.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0611 + years = { 2 4 } + } + } + } + } +} + +################################################## +# A Jolly Good Time +# by Ewan Cowhig Croft +# 0621 - 0630 +################################################## + +scripted_trigger harm_0621_alcohol_problem_trigger = { + OR = { + has_trait = drunkard + AND = { + has_trait_xp = { + trait = lifestyle_reveler + value >= 50 + } + drinks_alcohol_trigger = yes + } + } +} + +scripted_trigger harm_0621_social_drinker_trigger = { + NOR = { + has_trait = shy + has_trait = reclusive + } +} + +# Drunken shenanigans. +harm.0621 = { + type = character_event + title = harm.0621.t + desc = harm.0621.desc + theme = physical_health + left_portrait = { + character = root + animation = fear + } + override_background = { + trigger = { harm_0621_social_drinker_trigger = yes } + reference = tavern + } + override_background = { + trigger = { harm_0621_social_drinker_trigger = no } + reference = bedchamber + } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0621 } + has_character_flag = had_event_harm_0622 + # Must have something of an alcohol problem. + harm_0621_alcohol_problem_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0621 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # *HIC*... *hic*... ... + option = { + name = harm.0621.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0621.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0621.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0621.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0621.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Hehe, guess I'm gonna feel that in the morning. + option = { + name = harm.0621.b + trigger = { + OR = { + has_trait = stubborn + has_trait = gregarious + } + } + trait = stubborn + trait = gregarious + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Ooph, my head. That was a bad one, eh? + option = { + name = harm.0621.c + trigger = { diplomacy >= @random_harm_standard_skill_check_value } + skill = diplomacy + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0621.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0621.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0621.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0621.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0622 = { + type = character_event + title = harm.0622.t + desc = harm.0622.desc + theme = physical_health + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOR = { + location.culture ?= { has_graphical_india_culture_group_trigger = yes } + location.culture ?= { has_graphical_mena_culture_group_trigger = yes } + location.culture ?= { has_building_gfx = iranian_building_gfx } + location.culture ?= { has_graphical_african_culture_group_trigger = yes } + location.culture ?= { has_graphical_steppe_culture_group_trigger = yes } + } + harm_0621_social_drinker_trigger = yes + } + animation = drink + } + animation = drink_goblet + } + override_background = { + trigger = { harm_0621_social_drinker_trigger = yes } + reference = tavern + } + override_background = { + trigger = { harm_0621_social_drinker_trigger = no } + reference = bedchamber + } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0622 } + # Must have some an alcohol problem. + harm_0621_alcohol_problem_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0622 + } + + # Life is good. + option = { + name = harm.0622.a + + # Foreshadow. + custom_tooltip = harm.0622.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0621 + years = { 2 4 } + } + } + } + } +} + +################################################## +# A Rollicking Good Time +# by Ewan Cowhig Croft +# 0631 - 0640 +################################################## + +# A few people get auto-filtered immediately. +scripted_trigger harm_0631_bonk_pre_filter_enthusiasm_trigger = { + NOR = { + # Asexual characters can still enjoy sex but are less likely to be doing it enough to be in this situation. + has_sexuality = asexual + # Likewise for chaste characters. + has_trait = chaste + # Celibate characters aren't having sex _at all_. + has_trait = celibate + # Some characters are too obsessed with work. + AND = { + has_trait = ambitious + has_trait = diligent + OR = { + AND = { + is_ruler = yes + stress_level >= 1 + } + is_councillor = yes + has_any_court_position = yes + } + } + # Zealous characters might be religious compelled not to engage in sex for pleasure. + AND = { + has_trait = zealous + faith = { + OR = { + trait_is_virtue = chaste + trait_is_sin = lustful + trait_is_sin = deviant + } + } + } + # Eunuchs omitted - they absolutely can still have sex. + ## Quite a lot of it, according to various sources, and depending on the method of castration, it could even still be penetrative. + } +} + +# Do you have a partner who might be able to ride you into the proverbial ground? +scripted_trigger harm_0631_bonk_partner_trigger = { + location = root.location + is_ai = yes + # Filter out a few folks before we start. + harm_0631_bonk_pre_filter_enthusiasm_trigger = yes + # The sex has to be really rather vigorous to induce this in you. + OR = { + # Always give their all. + has_trait = deviant + has_trait = lustful + has_relation_soulmate = root + # Selfless lovers. + AND = { + has_trait = compassionate + ai_energy >= very_high_positive_ai_value + } + # Selfish lovers but you're into it. + AND = { + OR = { + has_trait = sadistic + has_trait = callous + } + root = { has_trait = flagellant } + } + # Religious compulsion. + AND = { + faith = { + OR = { + trait_is_virtue = lustful + trait_is_virtue = deviant + trait_is_sin = chaste + } + } + has_trait = zealous + } + # Last but by no means least, dramatically different relative ages! + age <= root.vigorous_sex_age_difference_value + } + # Either you've got a fantastic connection or you've got an. Ahem. Positively-manifesting negative feedback loop. + OR = { + # Loves you. + opinion = { + target = root + value >= very_high_positive_opinion + } + # Hates you. + opinion = { + target = root + value <= very_high_negative_opinion + } + } +} + +# Would we be engaging in enthusiastic sex on the regular? +scripted_trigger harm_0631_bonk_enthusiast_trigger = { + # Knock out some folks. + harm_0631_bonk_pre_filter_enthusiasm_trigger = yes + # And you've got to enjoy/prioritise a healthy sex life. + OR = { + # If your health is low enough, this can happen at any time. + AND = { + age <= 49 + health <= medium_health + OR = { + # Naturally. + has_trait = deviant + has_trait = lustful + # When you've got plenty of time on your hands... + has_trait = lazy + has_trait = content + # Hormones ablaze. + AND = { + is_adult = yes + age <= 30 + } + # Might suffer from heart conditions. + potential_victim_of_apoplexy_trigger = yes + } + } + # Otherwise, it's more of an age concern. + age_ranked_health_vulnerability_threshold_trigger = yes + } + # Must have a sufficiently vigorous lover available. + OR = { + any_consort = { harm_0631_bonk_partner_trigger = yes } + any_relation = { + type = lover + harm_0631_bonk_partner_trigger = yes + } + } +} + +scripted_effect harm_grab_suitable_partner_effect = { + every_consort = { + limit = { harm_0631_bonk_partner_trigger = yes } + add_to_list = bonkable_bartners + } + every_relation = { + type = lover + limit = { harm_0631_bonk_partner_trigger = yes } + add_to_list = bonkable_bartners + } + random_in_list = { + list = bonkable_bartners + save_scope_as = bonker + } +} + +scripted_effect harm_0631_process_partner_stress_effect = { + # Do they have any affection for you? + if = { + limit = { + opinion = { + target = root + value >= 1 + } + } + # Cool, are they your soulmate? + if = { + limit = { has_relation_soulmate = root } + # Yes we put in a manual number to make it larger than monumental. + ## This would probably destroy you as a person. + add_stress = 250 + } + # If not, apply some stress without going overboard. + else = { add_stress = major_stress_gain } + } +} + +# Heart attack whilst vigorously bonking. +harm.0631 = { + type = character_event + title = harm.0631.t + desc = harm.0631.desc + theme = physical_health + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bonker + animation = shock + } + override_background = { reference = bedchamber } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0631 } + has_character_flag = had_event_harm_0632 + # Check that we've got a partner who might cause us some strife. + harm_0631_bonk_enthusiast_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = lustful + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0631 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Do we need a fresh bonk buddy or is the old one still good? + if = { + limit = { + OR = { + NOT = { exists = scope:bonker } + scope:bonker ?= { harm_0631_bonk_enthusiast_trigger = no } + } + } + harm_grab_suitable_partner_effect = yes + } + # And bonk away. + had_sex_with_effect = { + CHARACTER = scope:bonker + PREGNANCY_CHANCE = pregnancy_chance + } + add_character_flag = { + flag = is_naked + days = 30 + } + scope:bonker = { + add_character_flag = { + flag = is_naked + days = 30 + } + } + } + + # Wait — I can't — my chest! + option = { + name = harm.0631.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0631.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0631.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0631.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0631.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + # Plus your partner probably isn't happy. + scope:bonker = { harm_0631_process_partner_stress_effect = yes } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # N-no you don't, heart, not #EMP now#!... + option = { + name = harm.0631.b + trigger = { has_trait = stubborn } + trait = stubborn + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I just need to ride this out. + ## Ahem. + option = { + name = harm.0631.c + trigger = { intrigue >= @random_harm_standard_skill_check_value } + skill = intrigue + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0631.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0631.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0631.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0631.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + # Plus your partner probably isn't happy. + scope:bonker = { harm_0631_process_partner_stress_effect = yes } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } + after = { + remove_character_flag = is_naked + scope:bonker = { + remove_character_flag = is_naked + } + } +} + +# Attached foreboding event. +harm.0632 = { + type = character_event + title = harm.0632.t + desc = harm.0632.desc + theme = physical_health + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:bonker + animation = admiration + } + override_background = { reference = bedchamber } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0632 } + # Check that we've got a partner who might cause us some strife. + harm_0631_bonk_enthusiast_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = lustful + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0632 + # Grab us a bonk-buddy. + harm_grab_suitable_partner_effect = yes + # And bonk away. + had_sex_with_effect = { + CHARACTER = scope:bonker + PREGNANCY_CHANCE = pregnancy_chance + } + add_character_flag = is_naked + scope:bonker = { + add_character_flag = is_naked + } + } + + # Scope:lover makes me feel so #EMP alive#!. + option = { + name = harm.0632.a + + # Foreshadow. + custom_tooltip = harm.0632.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0631 + years = { 2 4 } + } + } + } + remove_character_flag = is_naked + scope:bonker = { + remove_character_flag = is_naked + } + } +} + +################################################## +# Some Slight Swelling +# by Ewan Cowhig Croft +# 0641 - 0650 +################################################## + +scripted_trigger harm_0641_saved_by_court_amenities_trigger = { + has_royal_court = yes + # Good food'll keep you out of this. + amenity_level = { + target = court_food_quality + value >= 3 + } +} + +# Dropsy renders you bed-ridden. +harm.0641 = { + type = character_event + title = harm.0641.t + desc = harm.0641.desc + theme = physical_health + left_portrait = { + character = root + animation = pain + } + lower_right_portrait = scope:medic + override_background = { reference = bedchamber } + + trigger = { + # Standard checks. + is_available_adult = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0641 } + has_character_flag = had_event_harm_0642 + # Some characters just won't have this problem. + NOR = { + has_trait = gluttonous + has_trait = comfort_eater + } + # Make sure we wouldn't be saved by our court amenities. + harm_0641_saved_by_court_amenities_trigger = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = temperate + has_trait = inappetetic + } + } + } + + immediate = { + # We don't want to see this event twice. + add_character_flag = had_event_harm_0641 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Try to grab our court physician. + harm_0000_grab_available_court_physician_effect = { PERSONAL_SKILL = learning } + } + + # What is... wrong with me... + option = { + name = harm.0641.a + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.0641.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0641.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.0641.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0641.a.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # This will pass. + option = { + name = harm.0641.b + trigger = { has_trait = whole_of_body } + trait = whole_of_body + + custom_tooltip = harm.0000.tt.no_permanent_damage + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Call for your physic. + option = { + name = harm.0000.tt.physician + trigger = { + exists = scope:medic + scope:medic.learning >= @court_medic_able_to_help_value + } + show_as_unavailable = { scope:medic.learning < @court_medic_able_to_help_value } + + # Random roll & stress handled in this effect. + harm_0000_physic_rescue_chance_incapable_effect = yes + + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 10 + } + } + + # Surely this must be treatable? + option = { + name = harm.0641.c + trigger = { learning >= @random_harm_standard_skill_check_value } + skill = learning + + random_list = { + # You aren't permanently hurt. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.0641.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.0641.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.no_permanent_damage + } + } + # The experience leaves you feeble. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.0641.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.0641.c.tt.failure + left_icon = root + upgrade_infirm_to_incapable_effect = yes + create_character_memory = { type = became_incapable_generic } + } + } + } + + # Always gain stress from skill tests. + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.0642 = { + type = character_event + title = harm.0642.t + desc = harm.0642.desc + theme = physical_health + left_portrait = { + character = root + animation = worry + } + override_background = { reference = bedchamber } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_0642 } + # Some characters just won't have this problem. + NOR = { + has_trait = gluttonous + has_trait = comfort_eater + } + # Make sure we wouldn't be saved by our court amenities. + harm_0641_saved_by_court_amenities_trigger = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = temperate + has_trait = inappetetic + } + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_0642 + } + + # Aggh, that's a little tender. + option = { + name = harm.0642.a + + # Foreshadow. + custom_tooltip = harm.0642.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.0641 + years = { 2 4 } + } + } + } + } +} + + + + + + + + + + + +################################################## +# RANDOM DEATH EVENTS + +################################################## +# Choke On It +# by Ewan Cowhig Croft +# 1001 - 1010 +################################################## + +# Choking at a feast. +harm.1001 = { + type = character_event + title = harm.1001.t + desc = harm.1001.desc + theme = skull + left_portrait = { + character = root + animation = poison + } + override_background = { reference = feast } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1001 } + has_character_flag = had_event_harm_1002 + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = gluttonous + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1001 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # Try to cough it out. + option = { + name = harm.1001.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1001.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1001.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1001.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1001.a.tt.failure + left_icon = root + death = { death_reason = death_choked } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Calm, breath. + option = { + name = harm.1001.b + trigger = { has_trait = temperate } + trait = temperate + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Thump at your chest and lungs. + option = { + name = harm.1001.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1001.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1001.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1001.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1001.c.tt.failure + left_icon = root + death = { death_reason = death_choked } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1002 = { + type = character_event + title = harm.1002.t + desc = harm.1002.desc + theme = physical_health + left_portrait = { + character = root + animation = personality_greedy + } + override_background = { reference = feast } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1002 } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = gluttonous + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1002 + } + + # I'm really enjoying food lately. + option = { + name = harm.1002.a + + # Foreshadow. + custom_tooltip = harm.1002.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1001 + years = { 3 8 } + } + } + } + } +} + +################################################## +# Ride or Die +# by Ewan Cowhig Croft +# 1011 - 1020 +################################################## + +# Something spooks your horse and it goes flying out of control. +harm.1011 = { + type = character_event + title = harm.1011.t + desc = harm.1011.desc + theme = skull + left_portrait = { + character = root + animation = jockey_gallop + camera = camera_event_horse_left + } + override_background = { reference = wilderness } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1011 } + has_character_flag = had_event_harm_1012 + harm_0511_rides_horses_trigger = yes + # Some characters will never go riding for pleasure. + NOT = { has_trait = lazy } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = diligent + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1011 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # Hang on for dear life. + option = { + name = harm.1011.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1011.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1011.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1011.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1011.a.tt.failure + left_icon = root + death = { death_reason = death_horse_riding_accident } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Head down, cling hard. + option = { + name = harm.1011.b + trigger = { + OR = { + has_trait = craven + has_trait_xp = { + trait = tourney_participant + track = horse + value >= 75 + } + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= 75 + } + } + } + trait = craven + trait = tourney_participant + trait = lifestyle_hunter + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # This isn't your first spooked horse. + option = { + name = harm.1011.c + trigger = { martial >= @random_harm_standard_skill_check_value } + skill = martial + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1011.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1011.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1011.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1011.c.tt.failure + left_icon = root + death = { death_reason = death_horse_riding_accident } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1012 = { + type = character_event + title = harm.1012.t + desc = harm.1012.desc + theme = physical_health + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_left + } + override_background = { reference = wilderness } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1012 } + harm_0511_rides_horses_trigger = yes + # Some characters will never go riding for pleasure. + NOT = { has_trait = lazy } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = diligent + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1012 + } + + # Whoah there, girl, calm down... + option = { + name = harm.1012.a + + # Foreshadow. + custom_tooltip = harm.1012.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1011 + years = { 3 8 } + } + } + } + } +} + +################################################## +# Finger-Licking Good +# by Ewan Cowhig Croft +# 1021 - 1030 +################################################## + +scripted_trigger harm_1021_saved_by_court_amenities_trigger = { + trigger_if = { + limit = { has_royal_court = yes } + # Bad food'll keep you out of this. + amenity_level = { + target = court_food_quality + # So if you _aren't_ paying for decent food, you have no worries of sudden stomach upsets because you're enjoying it so much. + ## Just a drab, dreary existence. + value >= 3 + } + } +} + +# Eating too much exotic food. +harm.1021 = { + type = character_event + title = harm.1021.t + desc = harm.1021.desc + theme = skull + left_portrait = { + character = root + animation = poison + } + lower_right_portrait = scope:medic + override_background = { reference = feast } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1021 } + has_character_flag = had_event_harm_1022 + # Some characters can avoid this entirely. + harm_1021_saved_by_court_amenities_trigger = yes + NOT = { has_trait = inappetetic } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = gluttonous + has_trait = gout_ridden + } + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1021 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Try to grab our court physician. + harm_0000_grab_available_court_physician_effect = { PERSONAL_SKILL = stewardship } + } + + # I... don't feel so good... + option = { + name = harm.1021.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1021.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1021.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1021.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1021.a.tt.failure + left_icon = root + death = { death_reason = death_tumultuous_guts } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Bring me cool water — I need to lie down. Now. + option = { + name = harm.1021.b + trigger = { has_trait = temperate } + trait = temperate + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Call for your physic. + option = { + name = harm.0000.tt.physician + trigger = { + exists = scope:medic + scope:medic.learning >= @court_medic_able_to_help_value + } + show_as_unavailable = { scope:medic.learning < @court_medic_able_to_help_value } + + # Random roll & stress handled in this effect. + harm_0000_physic_rescue_chance_death_effect = { DEATH_REASON = death_tumultuous_guts } + + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 10 + } + } + + # We must have some kind of medicine in stock for this! + option = { + name = harm.1021.c + trigger = { stewardship >= @random_harm_standard_skill_check_value } + skill = stewardship + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1021.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1021.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1021.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1021.c.tt.failure + left_icon = root + death = { death_reason = death_tumultuous_guts } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1022 = { + type = character_event + title = harm.1022.t + desc = harm.1022.desc + theme = physical_health + left_portrait = { + character = root + animation = worry + } + override_background = { reference = feast } + + trigger = { + # Standard checks. + is_available_adult = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1022 } + # Some characters can avoid this entirely. + harm_1021_saved_by_court_amenities_trigger = yes + NOT = { has_trait = inappetetic } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = gluttonous + has_trait = gout_ridden + } + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1022 + } + + # I'm glad that passed quickly. + option = { + name = harm.1022.a + + # Foreshadow. + custom_tooltip = harm.1022.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1021 + years = { 3 8 } + } + } + } + } +} + +################################################## +# A Clogged Throat +# by Ewan Cowhig Croft +# 1031 - 1040 +################################################## + +# Quinsy-induced choking. +harm.1031 = { + type = character_event + title = harm.1031.t + desc = harm.1031.desc + theme = skull + left_portrait = { + character = root + animation = poison + } + lower_right_portrait = scope:medic + override_background = { reference = bedchamber } + + trigger = { + # Standard checks. + is_available_adult = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1031 } + has_character_flag = had_event_harm_1032 + # Must be below a certain level of health to suffer from this. + health <= medium_health + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = -0.75 + has_perk = wash_your_hands_perk + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1031 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Try to grab our court physician. + harm_0000_grab_available_court_physician_effect = { PERSONAL_SKILL = learning } + } + + # Can't... breath... + option = { + name = harm.1031.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1031.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1031.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1031.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1031.a.tt.failure + left_icon = root + death = { death_reason = death_choked_pus } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # I just need to control my breathing till I can find a physic. + option = { + name = harm.1031.b + trigger = { has_trait = whole_of_body } + trait = whole_of_body + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Call for your physic. + option = { + name = harm.0000.tt.physician + trigger = { + exists = scope:medic + scope:medic.learning >= @court_medic_able_to_help_value + } + show_as_unavailable = { scope:medic.learning < @court_medic_able_to_help_value } + + # Random roll & stress handled in this effect. + harm_0000_physic_rescue_chance_death_effect = { DEATH_REASON = death_choked_pus } + + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 10 + } + } + + # Calm. Small breaths. To the physician. + option = { + name = harm.1031.c + trigger = { learning >= @random_harm_standard_skill_check_value } + skill = learning + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1031.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1031.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1031.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1031.c.tt.failure + left_icon = root + death = { death_reason = death_choked_pus } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1032 = { + type = character_event + title = harm.1032.t + desc = harm.1032.desc + theme = physical_health + left_portrait = { + character = root + animation = worry + } + override_background = { reference = bedchamber } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1032 } + # Must be below a certain level of health to suffer from this. + health <= medium_health + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = -0.75 + has_perk = wash_your_hands_perk + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1032 + } + + # These things usually pass. + option = { + name = harm.1032.a + + # Foreshadow. + custom_tooltip = harm.1032.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1031 + years = { 3 8 } + } + } + } + } +} + +################################################## +# Probably Safe +# by Ewan Cowhig Croft +# 1041 - 1050 +################################################## + +# Which characters wouldn't find themselves in this situation? +scripted_trigger harm_1041_characters_to_exclude_trigger = { + NOR = { + # Paranoid characters wouldn't be caught in this situation + has_trait = paranoid + # Whilst gregarious characters wouldn't be caught _alone_. + has_trait = gregarious + # Lazy characters don't like rides. + has_trait = lazy + # And blind characters, though capable of great independence, probably aren't going to dismiss their guards like this. + has_trait = blind + } +} + +# Fall into a body of water. +harm.1041 = { + type = character_event + title = harm.1041.t + desc = harm.1041.desc + theme = skull + left_portrait = { + character = root + animation = fear + } + override_background = { reference = wilderness } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1041 } + has_character_flag = had_event_harm_1042 + # Some characters wouldn't have this happen. + harm_1041_characters_to_exclude_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = brave + has_trait = athletic + } + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1041 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + add_character_flag = is_naked + } + + # Try to come to your senses. + option = { + name = harm.1041.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1041.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1041.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1041.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1041.a.tt.failure + left_icon = root + death = { death_reason = death_drowned } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Fight-or-flight selects _flight_. + option = { + name = harm.1041.b + trigger = { has_trait = craven } + trait = craven + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + after = { + if = { + limit = { + is_alive = yes + } + remove_character_flag = is_naked + } + } +} + +# Attached foreboding event. +harm.1042 = { + type = character_event + title = harm.1042.t + desc = harm.1042.desc + theme = physical_health + left_portrait = { + character = root + animation = personality_bold + } + override_background = { reference = wilderness } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1042 } + # Some characters wouldn't have this happen. + harm_1041_characters_to_exclude_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = brave + has_trait = athletic + } + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1042 + } + + # A nice spot, this. + option = { + name = harm.1042.a + + # Foreshadow. + custom_tooltip = harm.1042.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1041 + years = { 3 8 } + } + } + } + } +} + +################################################## +# Flickering Flames +# by Ewan Cowhig Croft +# 1051 - 1060 +################################################## + +# A small fire gets out of hand. +harm.1051 = { + type = character_event + title = harm.1051.t + desc = harm.1051.desc + theme = skull + left_portrait = { + character = root + animation = fear + outfit_tags = { nightgown } + } + override_background = { reference = sitting_room } + widget = { + gui = "event_window_widget_vfx_conclusion_smoke" + container = "background_shader_vfx_container" + } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1051 } + has_character_flag = had_event_harm_1052 + # Paranoid & diligent characters wouldn't be caught in this situation. + NOR = { + has_trait = paranoid + has_trait = diligent + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = brave + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1051 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # The only way out is through! + option = { + name = harm.1051.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1051.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1051.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1051.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1051.a.tt.failure + left_icon = root + death = { death_reason = death_burned } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # That way, that's the fastest route out! + option = { + name = harm.1051.b + trigger = { has_trait = craven } + trait = craven + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } +} + +# Attached foreboding event. +harm.1052 = { + type = character_event + title = harm.1052.t + desc = harm.1052.desc + theme = physical_health + left_portrait = { + character = root + animation = worry + outfit_tags = { nightgown } + } + override_background = { reference = sitting_room } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1052 } + # Paranoid & diligent characters wouldn't be caught in this situation. + NOR = { + has_trait = paranoid + has_trait = diligent + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = brave + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1052 + } + + # I must be more careful about these candles... + option = { + name = harm.1052.a + + # Foreshadow. + custom_tooltip = harm.1052.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1051 + years = { 3 8 } + } + } + } + } +} + +################################################## +# A Moderate Tumble +# by Ewan Cowhig Croft +# 1061 - 1070 +################################################## + +# Some characters would never take this risk or else have no reason to. +scripted_trigger harm_1061_admires_window_view_trigger = { + NOR = { + has_trait = paranoid + has_trait = blind + # Doesn't appreciate beauty. + has_trait = callous + } +} + +# Falling out of a window whilst admiring the view. +harm.1061 = { + type = character_event + title = harm.1061.t + desc = harm.1061.desc + theme = skull + left_portrait = { + character = root + animation = fear + } + override_background = { reference = bedchamber } + + trigger = { + # No multi-story tents + is_landless_adventurer = no + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1061 } + has_character_flag = had_event_harm_1062 + # Can't be tribal, must have enough development that you've got a tall building. + location_has_multi_story_buildings_trigger = { LOCATION = location } + # Some characters would never take this risk or else have no reason to. + harm_1061_admires_window_view_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = brave + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1061 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # Grab for the window frame. + option = { + name = harm.1061.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1061.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1061.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1061.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1061.a.tt.failure + left_icon = root + death = { death_reason = death_fell_bedchamber } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # grab-grab-grab-GRAB! + option = { + name = harm.1061.b + trigger = { has_trait = craven } + trait = craven + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Rely on your quick reflexes. + option = { + name = harm.1061.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1061.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1061.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1061.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1061.c.tt.failure + left_icon = root + death = { death_reason = death_fell_bedchamber } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1062 = { + type = character_event + title = harm.1062.t + desc = harm.1062.desc + theme = physical_health + left_portrait = { + character = root + animation = happiness + } + override_background = { reference = bedchamber } + + trigger = { + # No multi-story tents + is_landless_adventurer = no + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1062 } + # Can't be tribal, must have enough development that you've got a tall building. + location_has_multi_story_buildings_trigger = { LOCATION = location } + # Some characters would never take this risk or else have no reason to. + harm_1061_admires_window_view_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = lazy + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1062 + } + + # What a lovely view! + option = { + name = harm.1062.a + + # Foreshadow. + custom_tooltip = harm.1062.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1061 + years = { 3 8 } + } + } + } + } +} + +################################################## +# Crimes of Passion +# by Ewan Cowhig Croft +# 1071 - 1080 +################################################## + +# Do we have two courtiers who might stab each other? +scripted_trigger harm_1071_rival_courtiers_trigger = { + NOT = { has_trait = forgiving } + any_relation = { + type = rival + NOT = { has_trait = forgiving } + is_courtier_of = root + } +} + +# Grab two appropriate courtiers. +scripted_effect harm_1071_grab_rival_courtiers_effect = { + # Grab our courtiers. + random_courtier = { + limit = { + has_trait = vengeful + harm_1071_rival_courtiers_trigger = yes + } + alternative_limit = { harm_1071_rival_courtiers_trigger = yes } + save_scope_as = killer + random_relation = { + type = rival + limit = { + has_trait = vengeful + harm_1071_rival_courtiers_trigger = yes + } + alternative_limit = { harm_1071_rival_courtiers_trigger = yes } + save_scope_as = other + } + } +} + +# A scuffle between two rivals sees you accidentally stabbed. +harm.1071 = { + type = character_event + title = harm.1071.t + desc = harm.1071.desc + theme = skull + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:killer + animation = assassin + } + lower_right_portrait = scope:other + override_background = { reference = corridor_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1071 } + has_character_flag = had_event_harm_1072 + # Must have suitable courtiers. + any_courtier = { + harm_1071_rival_courtiers_trigger = yes + } + # Paranoid characters wouldn't be caught in this situation. + NOT = { has_trait = paranoid } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_royal_court = yes + OR = { + has_court_type = court_warlike + has_court_type = court_intrigue + has_court_type = court_tribal + has_court_type = court_nomadic + } + } + modifier = { + add = -0.75 + has_royal_court = yes + OR = { + has_court_type = court_diplomatic + has_court_type = court_scholarly + } + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1071 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Process stabby courtiers. + ## If our old ones aren't still good, then we need to set up new ones. + if = { + limit = { + OR = { + NOR = { + exists = scope:killer + exists = scope:other + } + NOT = { + scope:killer ?= { + is_alive = yes + is_imprisoned = no + is_courtier_of = root + harm_1071_rival_courtiers_trigger = yes + } + scope:other ?= { + is_alive = yes + is_imprisoned = no + is_courtier_of = root + harm_1071_rival_courtiers_trigger = yes + } + } + } + } + harm_1071_grab_rival_courtiers_effect = yes + } + } + + # Dodge the knife. + option = { + name = harm.1071.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1071.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1071.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1071.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1071.a.tt.failure + left_icon = root + death = { + death_reason = death_courtier_mistakenly_stabbed + killer = scope:killer + } + log_harm_event_death_as_variable_effect = yes + # Do some stealthy stuff to keep the toast neat whilst propagating out consequences. + hidden_effect = { + scope:killer = { + add_trait = murderer + add_kinslayer_trait_or_nothing_effect = { VICTIM = root } + } + } + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Easily duck aside from the blade. + option = { + name = harm.1071.b + trigger = { + OR = { + has_trait = brave + has_trait = lifestyle_blademaster + } + } + trait = brave + trait = lifestyle_blademaster + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Rely on your reflexes. + option = { + name = harm.1071.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1071.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1071.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1071.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1071.c.tt.failure + left_icon = root + death = { + death_reason = death_courtier_mistakenly_stabbed + killer = scope:killer + } + log_harm_event_death_as_variable_effect = yes + # Do some stealthy stuff to keep the toast neat whilst propagating out consequences. + hidden_effect = { + scope:killer = { + add_trait = murderer + add_kinslayer_trait_or_nothing_effect = { VICTIM = root } + } + } + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } + + after = { + if = { + limit = { + scope:killer = { + is_alive = yes + liege ?= { is_alive = yes } + } + } + # Yeahhhh. Yeah you're goin' down for this'un. + rightfully_imprison_character_effect = { + TARGET = scope:killer + IMPRISONER = scope:killer.liege + } + } + } +} + +# Attached foreboding event. +harm.1072 = { + type = character_event + title = harm.1072.t + desc = harm.1072.desc + theme = physical_health + left_portrait = { + character = scope:killer + animation = rage + } + right_portrait = { + character = scope:other + animation = dismissal + } + override_background = { reference = corridor_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1072 } + # Must have suitable courtiers. + any_courtier = { + harm_1071_rival_courtiers_trigger = yes + } + # Paranoid characters wouldn't be caught in this situation. + NOT = { has_trait = paranoid } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_royal_court = yes + OR = { + has_court_type = court_warlike + has_court_type = court_intrigue + has_court_type = court_tribal + has_court_type = court_nomadic + } + } + modifier = { + add = -0.75 + has_royal_court = yes + OR = { + has_court_type = court_diplomatic + has_court_type = court_scholarly + } + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1072 + # Set up our courtiers. + harm_1071_grab_rival_courtiers_effect = yes + } + + # Just another exciting day at court, eh? + option = { + name = harm.1072.a + + # Foreshadow. + custom_tooltip = harm.1072.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1071 + years = { 3 8 } + } + } + } + } +} + +################################################## +# Storm's Wrath +# by Ewan Cowhig Croft +# 1081 - 1090 +################################################## + +scripted_trigger harm_1081_normal_storms_trigger = { + location = { + OR = { + terrain = drylands + terrain = farmlands + terrain = floodplains + terrain = forest + terrain = hills + terrain = jungle + terrain = mountains + terrain = plains + terrain = taiga + terrain = wetlands + terrain = steppe + } + } +} + +# Death in a storm, due to a lightning hit/being crushed by a falling tree/twatted by a falling rock/catching a terminal chill. +harm.1081 = { + type = character_event + title = harm.1081.t + desc = harm.1081.desc + theme = skull + left_portrait = { + character = root + animation = jockey_gallop + camera = camera_event_horse_left + } + override_background = { reference = wilderness } + widget = { + gui = "event_window_widget_vfx_lightning_storm" + container = "foreground_shader_vfx_container" + } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1081 } + has_character_flag = had_event_harm_1082 + # Paranoid characters wouldn't be caught in this situation. + NOT = { has_trait = paranoid } + # Check to see if we're likely to have to deal with such storms. + ## Not that you _don't_ get storms in the desert, but it's more difficult to frame. + harm_1081_normal_storms_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = brave + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1081 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # If we ride hard enough, we can reach home. + option = { + name = harm.1081.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1081.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1081.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1081.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1081.a.tt.failure + left_icon = root + death = { death_reason = death_violent_storm } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # There, that hollow, we can shelter there! + option = { + name = harm.1081.b + trigger = { has_trait = craven } + trait = craven + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I — I think I might have a hide-away near hear? + option = { + name = harm.1081.c + trigger = { intrigue >= @random_harm_standard_skill_check_value } + skill = intrigue + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1081.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1081.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1081.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1081.c.tt.failure + left_icon = root + death = { death_reason = death_violent_storm } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1082 = { + type = character_event + title = harm.1082.t + desc = harm.1082.desc + theme = physical_health + left_portrait = { + character = root + animation = survey + } + override_background = { reference = wilderness } + widget = { + gui = "event_window_widget_vfx_rainy_fog" + container = "foreground_shader_vfx_container" + } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1082 } + # Paranoid characters wouldn't be caught in this situation. + NOT = { has_trait = paranoid } + # Check to see if we're likely to have to deal with such storms. + ## Not that you _don't_ get storms in the desert, but it's more difficult to frame. + harm_1081_normal_storms_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = brave + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1082 + } + + # I hope FateGodName isn't signalling something... + option = { + name = harm.1082.a + + # Foreshadow. + custom_tooltip = harm.1082.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1082 + years = { 2 8 } + } + } + } + } +} + +################################################## +# Aching Minds +# by Ewan Cowhig Croft +# 1091 - 1100 +################################################## + +# Struck down by an aneurysm. +harm.1091 = { + type = character_event + title = harm.1091.t + desc = harm.1091.desc + theme = skull + left_portrait = { + character = root + animation = pain + } + lower_right_portrait = scope:medic + override_background = { reference = study } + + trigger = { + # Standard checks. + is_available_adult = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1091 } + has_character_flag = had_event_harm_1092 + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + potential_victim_of_apoplexy_trigger = yes + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1091 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Try to grab our court physician. + harm_0000_grab_available_court_physician_effect = { PERSONAL_SKILL = diplomacy } + } + + # #EMP My mind?!#!. + ## Obligatory "There's no one else here". + ### 2015/08/30. + option = { + name = harm.1091.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1091.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1091.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1091.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1091.a.tt.failure + left_icon = root + death = { death_reason = death_apoplexy } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # I. Will. Endure. + option = { + name = harm.1091.b + trigger = { + OR = { + has_trait = calm + has_trait = stubborn + } + } + trait = calm + trait = stubborn + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Call for your physic. + option = { + name = harm.0000.tt.physician + trigger = { + exists = scope:medic + scope:medic.learning >= @court_medic_able_to_help_value + } + show_as_unavailable = { scope:medic.learning < @court_medic_able_to_help_value } + + # Random roll & stress handled in this effect. + harm_0000_physic_rescue_chance_death_effect = { DEATH_REASON = death_apoplexy } + + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 10 + } + } + + # Clarity, clarity, I need #EMP clarity#!. + option = { + name = harm.1091.c + trigger = { diplomacy >= @random_harm_standard_skill_check_value } + skill = diplomacy + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1091.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1091.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1091.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1091.c.tt.failure + left_icon = root + death = { death_reason = death_apoplexy } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1092 = { + type = character_event + title = harm.1092.t + desc = { + desc = harm.1092.desc.intro + first_valid = { + triggered_desc = { + trigger = { has_trait = blind } + desc = harm.1092.desc.blind + } + desc = harm.1092.desc.fallback + } + } + theme = physical_health + left_portrait = { + character = root + animation = worry + } + override_background = { reference = study } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1092 } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + potential_victim_of_apoplexy_trigger = yes + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1092 + } + + # Uggh, my head... + option = { + name = harm.1092.a + + # Foreshadow. + custom_tooltip = harm.1092.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1091 + years = { 3 8 } + } + } + } + } +} + +################################################## +# Street Safety +# by Ewan Cowhig Croft +# 1101 - 1110 +################################################## + +# Run over by a rider/run-away cart. +harm.1101 = { + type = character_event + title = harm.1101.t + desc = harm.1101.desc + theme = skull + left_portrait = { + character = root + animation = fear + } + override_background = { reference = alley_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1101 } + has_character_flag = had_event_harm_1102 + # Neither Paranoid characters nor Reclusive ones would be caught in this situation. + NOR = { + has_trait = paranoid + has_trait = reclusive + } + # And some danger of fast-moving carts. + location_has_fast_traffic_trigger = { LOCATION = root.location } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = gregarious + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1101 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + } + + # Jump backwards. + option = { + name = harm.1101.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1101.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1101.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1101.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1101.a.tt.failure + left_icon = root + death = { death_reason = death_run_over_cart } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Leap backwards with all your might. + option = { + name = harm.1101.b + trigger = { + OR = { + has_trait = shy + has_trait = craven + } + } + trait = shy + trait = craven + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Throw yourself forwards. + option = { + name = harm.1101.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1101.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1101.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1101.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1101.c.tt.failure + left_icon = root + death = { death_reason = death_run_over_cart } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1102 = { + type = character_event + title = harm.1102.t + desc = harm.1102.desc + theme = physical_health + left_portrait = { + character = root + animation = personality_bold + } + override_background = { reference = alley_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1102 } + # Neither Paranoid characters nor Reclusive ones would be caught in this situation. + NOR = { + has_trait = paranoid + has_trait = reclusive + } + # And some danger of fast-moving carts. + location_has_fast_traffic_trigger = { LOCATION = root.location } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + has_trait = gregarious + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1102 + } + + # The commoners do need to see their GetTitleAsName. + option = { + name = harm.1102.a + + # Foreshadow. + custom_tooltip = harm.1102.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1101 + years = { 3 8 } + } + } + } + } +} + +################################################## +# People's Justice +# by Ewan Cowhig Croft +# 1111 - 1120 +################################################## + +scripted_trigger harm_1111_capital_hates_you_trigger = { capital_county.county_opinion <= -80 } + +scripted_trigger harm_1111_saved_by_court_amenities_trigger = { + trigger_if = { + limit = { has_royal_court = yes } + # Must have enough servants for one to slip through unnoticed. + amenity_level = { + target = court_servants + value >= 3 + } + } +} + +# Some characters wouldn't be caught near people like this. +scripted_trigger harm_1111_traits_filter_trigger = { + NOR = { + # Doesn't take risks. + has_trait = paranoid + # Is never near people. + has_trait = reclusive + has_trait = shy + # Narrative taste. + has_trait = pregnant + } +} + +# Stabbed by a servant in your capital that hates you. +harm.1111 = { + type = character_event + title = harm.1111.t + desc = harm.1111.desc + theme = skull + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:killer + animation = assassin + outfit_tags = { beggar_rags } + } + override_background = { reference = corridor_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1111 } + has_character_flag = had_event_harm_1112 + # Must be landed for this'un... + is_landed_or_landless_administrative = yes + # ... because your capital _really_ does not like you. + harm_1111_capital_hates_you_trigger = yes + # Must have enough servants for this to be a potential problem. + harm_1111_saved_by_court_amenities_trigger = yes + # Some characters wouldn't be caught near people like this. + harm_1111_traits_filter_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = arbitrary + has_trait = trusting + } + } + } + + immediate = { + # Flag this event so the same character can't get it again. + add_character_flag = had_event_harm_1111 + # Give a little protection against spam. + harm_0000_apply_dynastic_cooldowns_effect = yes + # Stab root. + increase_wounds_no_death_effect = { REASON = fight } + # Create our killer. + create_character = { + age = { 25 45 } + culture = root.capital_county.culture + faith = root.capital_county.faith + dynasty = none + gender_female_chance = 50 + # Traits. + ## Education. + random_traits_list = { + count = 1 + education_diplomacy_1 = {} + education_martial_1 = {} + education_stewardship_1 = {} + education_intrigue_1 = {} + education_learning_1 = {} + } + ## Personality. + trait = vengeful + trait = brave + ## Plus a little bit of variety is nice. + random_traits_list = { + count = 1 + stubborn = {} + impatient = {} + humble = {} + wrathful = {} + } + # Skills. + intrigue = { + min_template_decent_skill + max_template_decent_skill + } + prowess = { + min_template_decent_skill + max_template_decent_skill + } + employer = root + save_scope_as = killer + } + # Alright, welcome to the world, scope:killer! + ## Now you die. + scope:killer = { + death = { death_reason = death_slaughtered_by_guards } + log_harm_event_death_as_variable_effect = yes + } + } + + # Gah, I am undone! + option = { + name = harm.1111.a + trigger = { + NOR = { + has_trait = stubborn + dread >= 50 + } + } + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.1111.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1111.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.1111.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1111.a.tt.failure + left_icon = root + death = { + death_reason = death_murder + killer = scope:killer + } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # It'll take more than that to kill #EMP me#!. + option = { + name = harm.1111.b + trigger = { has_trait = stubborn } + trait = stubborn + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # #EMP Another#! assassin? Pathetic! + option = { + name = harm.1111.c + trigger = { dread >= 50 } + custom_tooltip = harm.1111.c.tt.dread + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.1111.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.1111.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.1111.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.1111.c.tt.failure + left_icon = root + death = { death_reason = death_choked } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +# Attached foreboding event. +harm.1112 = { + type = character_event + title = harm.1112.t + desc = harm.1112.desc + theme = physical_health + left_portrait = { + character = root + animation = dismissal + } + override_background = { reference = corridor_day } + + trigger = { + # Standard checks. + is_available_adult = yes + # Harm filter checks. + NOT = { has_character_flag = had_event_harm_1112 } + # Must be landed for this'un... + is_landed_or_landless_administrative = yes + # ... because your capital _really_ does not like you. + harm_1111_capital_hates_you_trigger = yes + # Must have enough servants for this to be a potential problem. + harm_1111_saved_by_court_amenities_trigger = yes + # Some characters wouldn't be caught near people like this. + harm_1111_traits_filter_trigger = yes + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Plus some other factors apply. + modifier = { + add = 0.25 + OR = { + has_trait = arbitrary + has_trait = trusting + } + } + } + + immediate = { + # Flag this event as taken for the follow-up. + add_character_flag = had_event_harm_1112 + } + + # As long as they know their place. + option = { + name = harm.1112.a + + # Foreshadow. + custom_tooltip = harm.1112.a.tt + + # No stress. Yet. + ai_chance = { + # Only one option, so what we do is unimportant. + base = 1 + } + } + + after = { + # Random chance of immediately skipping on to the following event in a few years. + hidden_effect = { + random = { + chance = 50 + trigger_event = { + id = harm.1111 + years = { 3 8 } + } + } + } + } +} + + + + + + + + + + + +################################################## +# RANDOM DEATH BATTLE EVENTS + +################################################## +# Camp Fever +# by Ewan Cowhig Croft +# 2001 - 2010 +################################################## + +# Terrible siege conditions cause you strife. +harm.2001 = { + type = character_event + title = harm.2001.t + desc = harm.2001.desc + theme = skull + left_portrait = { + character = root + animation = sick + } + override_background = { reference = battlefield } + + cooldown = { years = 30 } + + trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Army checks. + commanding_army = { + # Gotta be at a siege. + is_army_in_siege = yes + # But _not_ currently fighting, as that'll mess the narrative up. + is_army_in_combat = no + } + NOR = { + health >= @army_commander_vulnerable_to_health_problems_value + has_trait = logistician + has_trait = military_engineer + } + commander_in_terrain_specialisation = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Characters in poor health shouldn't campaign. + ## Medium health + modifier = { + add = 0.25 + health <= medium_health + } + ## Fine health (which is somehow lower than medium) + modifier = { + add = 0.25 + health <= fine_health + } + ## Poor health + modifier = { + add = 0.25 + health <= poor_health + } + # Some characters do better on campaign. + ## Martially educated characters are better able to cope with these harsh realities. + modifier = { + add = -0.45 + has_trait = education_martial + } + ## Stubborn characters will stomach all manner of pains. + modifier = { + add = -0.5 + has_trait = stubborn + } + } + + # My — my guts... eurgh... + option = { + name = harm.2001.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.2001.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2001.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.2001.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2001.a.tt.failure + left_icon = root + death = { death_reason = death_camp_fever } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # I will not end here. + option = { + name = harm.2001.b + trigger = { has_trait = whole_of_body } + trait = whole_of_body + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I know what I need. Get me... get me... + option = { + name = harm.2001.c + trigger = { learning >= @random_harm_standard_skill_check_value } + skill = learning + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.2001.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2001.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.2001.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2001.c.tt.failure + left_icon = root + death = { death_reason = death_camp_fever } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +################################################## +# Marching Malaise +# by Ewan Cowhig Croft +# 2011 - 2020 +################################################## + +# Terrible marching conditions are problematic. +harm.2011 = { + type = character_event + title = harm.2011.t + desc = harm.2011.desc + theme = skull + left_portrait = { + character = root + animation = sick + } + override_background = { reference = wilderness } + + cooldown = { years = 30 } + + trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Army checks. + commanding_army = { + # Army must be mobile. + army_is_moving = yes + is_army_in_combat = no + } + NOR = { + health >= @army_commander_vulnerable_to_health_problems_value + has_trait = logistician + has_trait = organizer + } + commander_in_terrain_specialisation = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Characters in poor health shouldn't campaign. + ## Medium health + modifier = { + add = 0.25 + health <= medium_health + } + ## Fine health (which is somehow lower than medium) + modifier = { + add = 0.25 + health <= fine_health + } + ## Poor health + modifier = { + add = 0.25 + health <= poor_health + } + # Some characters do better on campaign. + ## Martially educated characters are better able to cope with these harsh realities. + modifier = { + add = -0.45 + has_trait = education_martial + } + ## Stubborn characters will stomach all manner of pains. + modifier = { + add = -0.5 + has_trait = stubborn + } + } + + # Why is... what is... + option = { + name = harm.2011.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.2011.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2011.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.2011.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2011.a.tt.failure + left_icon = root + death = { death_reason = death_march_malaise } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # My soldiers suffer only what I can suffer. + option = { + name = harm.2011.b + trigger = { + OR = { + has_trait = diligent + has_trait = athletic + has_trait = stubborn + } + # Some characters can't motivate themselves in this fashion. + NOR = { + has_trait = callous + has_trait = sadistic + } + } + trait = diligent + trait = athletic + trait = stubborn + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I've endured worse, surely? + option = { + name = harm.2011.c + trigger = { + OR = { + martial >= very_high_skill_rating + prowess >= extremely_high_skill_rating + } + } + skill = martial + skill = prowess + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.2011.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2011.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.2011.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2011.c.tt.failure + left_icon = root + death = { death_reason = death_march_malaise } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +################################################## +# So... Cold... +# by Ewan Cowhig Croft +# 2021 - 2030 +################################################## + +# Frostbite claims you. +harm.2021 = { + type = character_event + title = harm.2021.t + desc = harm.2021.desc + theme = skull + left_portrait = { + character = root + animation = sick + } + override_background = { reference = ep2_hunt_snowy_forest } + widget = { + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + cooldown = { years = 30 } + + trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Winter checks. + location_has_harsh_winter_trigger = yes + # Exempt some peoples. + NOR = { + health >= @army_commander_vulnerable_to_health_problems_value + has_trait = winter_soldier + # Winter soldier bonuses. + culture = { has_cultural_parameter = winter_trait_bonuses } + } + commander_in_terrain_specialisation = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Characters in poor health shouldn't campaign. + ## Medium health or harsh winter + modifier = { + add = 0.25 + health <= medium_health + location = { has_province_modifier = winter_harsh_modifier } + } + ## Fine health (which is somehow lower than medium) or normal winter + modifier = { + add = 0.25 + health <= fine_health + location = { + OR = { + has_province_modifier = winter_harsh_modifier + has_province_modifier = winter_normal_modifier + } + } + } + ## Poor health or mild winter + modifier = { + add = 0.25 + health <= poor_health + location = { + OR = { + has_province_modifier = winter_harsh_modifier + has_province_modifier = winter_normal_modifier + has_province_modifier = winter_mild_modifier + } + } + } + # Some characters do better on campaign. + ## Martially educated characters are better able to cope with these harsh realities. + modifier = { + add = -0.45 + has_trait = education_martial + } + ## Stubborn characters will stomach all manner of pains. + modifier = { + add = -0.5 + has_trait = stubborn + } + } + + # ... + option = { + name = harm.2021.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.2021.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2021.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.2021.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2021.a.tt.failure + left_icon = root + death = { death_reason = death_froze } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # I. Have. A higher. Destiny. + option = { + name = harm.2021.b + trigger = { has_trait = ambitious } + trait = ambitious + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I. Will not. End. + option = { + name = harm.2021.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.2021.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2021.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.2021.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2021.c.tt.failure + left_icon = root + death = { death_reason = death_froze } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +################################################## +# So... Hot... +# by Ewan Cowhig Croft +# 2031 - 2040 +################################################## + +# Heat-stroke claims you. +harm.2031 = { + type = character_event + title = harm.2031.t + desc = harm.2031.desc + theme = skull + left_portrait = { + character = root + animation = stress + } + override_background = { reference = wilderness } + + cooldown = { years = 30 } + + trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Medicine checks. + character_can_easily_self_treat_trigger = no + # Terrain checks. + tropical_seasons_trigger = { LOCATION = root.location } + NOT = { + is_nice_season_to_be_outside_trigger = { LOCATION = root.location } + } + # Exempt some peoples. + NOR = { + health >= @army_commander_vulnerable_to_health_problems_value + # Desert cultural bonuses. + culture = { has_cultural_parameter = desert_warrior_trait_is_better } + # *sigh* And SOME people are just too into the sun. + faith = { has_doctrine_parameter = trial_by_sun_active } + } + commander_in_terrain_specialisation = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Characters in poor health shouldn't campaign. + ## Medium health + modifier = { + add = 0.25 + health <= medium_health + } + ## Fine health (which is somehow lower than medium) + modifier = { + add = 0.25 + health <= fine_health + } + ## Poor health + modifier = { + add = 0.25 + health <= poor_health + } + # Some characters do better on campaign. + ## Martially educated characters are better able to cope with these harsh realities. + modifier = { + add = -0.45 + has_trait = education_martial + } + ## Stubborn characters will stomach all manner of pains. + modifier = { + add = -0.5 + has_trait = stubborn + } + # Are we not in the desert? If not, reduce _markedly. + modifier = { + factor = 0.25 + location = { + NOR = { + terrain = desert + terrain = desert_mountains + } + } + } + } + + # Is DeathGodName calling for me? + option = { + name = harm.2031.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.2031.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2031.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.2031.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2031.a.tt.failure + left_icon = root + death = { death_reason = death_heatstroke } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # I. Have. A higher. Destiny. + option = { + name = harm.2031.b + trigger = { has_trait = ambitious } + trait = ambitious + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I am not DeathGodNamePossessive's fool. + option = { + name = harm.2031.c + trigger = { prowess >= @random_harm_standard_skill_check_value } + skill = prowess + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.2031.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2031.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.2031.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2031.c.tt.failure + left_icon = root + death = { death_reason = death_heatstroke } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +################################################## +# For the Realm +# by Ewan Cowhig Croft +# 2041 - 2050 +################################################## + +# Aggrieved soldiers at war too long assassinate you. +harm.2041 = { + type = character_event + title = harm.2041.t + desc = harm.2041.desc + theme = skull + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:killer + animation = aggressive_sword + } + override_background = { reference = bp1_bonfire } + + cooldown = { years = 30 } + + trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Requires you to be landed so we know where to pull the soldier from. + is_landed_or_landless_administrative = yes + # Army checks. + NOT = { + faith = { has_doctrine_parameter = warmonger } + } + days_of_continuous_war >= 9125 + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Some characters aren't popular with soldiers. + modifier = { + add = 0.5 + OR = { + has_trait = shy + has_trait = wrathful + has_trait = impatient + has_trait = callous + has_trait = sadistic + has_trait = irritable + } + } + # And some characters can persuade their soldiers through thick'n'thin. + modifier = { + add = -0.75 + OR = { + has_trait = gregarious + has_trait = calm + has_trait = patient + has_trait = compassionate + } + } + } + + immediate = { + # Generate a suitable soldier to use. + create_character = { + template = retired_mercenary + location = root.location + culture = root.capital_county.culture + faith = root.capital_county.faith + gender_female_chance = root_soldier_female_chance + dynasty = none + save_scope_as = killer + } + } + + # Traitors! TRAITORS! + option = { + name = harm.2041.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.2041.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2041.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.2041.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2041.a.tt.failure + left_icon = root + death = { death_reason = death_assassinated_by_soldiers } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # Only five? Have at thee, milksops! + option = { + name = harm.2041.b + trigger = { has_trait = lifestyle_blademaster } + trait = lifestyle_blademaster + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # I'll make you bleed! + option = { + name = harm.2041.c + trigger = { + OR = { + prowess >= very_high_skill_rating + has_trait = berserker + has_trait = shieldmaiden + } + } + skill = prowess + trait = berserker + trait = shieldmaiden + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.2041.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2041.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.2041.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2041.c.tt.failure + left_icon = root + death = { death_reason = death_assassinated_by_soldiers } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +################################################## +# Starvation +# by Ewan Cowhig Croft +# 2051 - 2060 +################################################## + +# Complications due to starvation from lack of supply. +harm.2051 = { + type = character_event + title = harm.2051.t + desc = harm.2051.desc + theme = skull + left_portrait = { + character = root + animation = sick + } + override_background = { reference = wilderness } + + cooldown = { years = 30 } + + trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Army checks. + # TIT-44620 + always = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Characters in poor health shouldn't campaign. + ## Medium health + modifier = { + add = 0.25 + health <= medium_health + } + ## Fine health (which is somehow lower than medium) + modifier = { + add = 0.25 + health <= fine_health + } + ## Poor health + modifier = { + add = 0.25 + health <= poor_health + } + # Some characters do better on campaign. + ## Martially educated characters are better able to cope with these harsh realities. + modifier = { + add = -0.45 + has_trait = education_martial + } + ## Stubborn characters will stomach all manner of pains. + modifier = { + add = -0.5 + has_trait = stubborn + } + } + + # My skin... like paper... + option = { + name = harm.2051.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.2051.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2051.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.2051.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2051.a.tt.failure + left_icon = root + death = { death_reason = death_starved } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # The situation is still salvageable. + option = { + name = harm.2051.b + trigger = { + OR = { + has_trait = logistician + AND = { + has_trait = desert_warrior + location = { + OR = { + terrain = desert + terrain = desert_mountains + } + } + } + AND = { + has_trait = jungle_stalker + location = { terrain = jungle } + } + AND = { + has_trait = open_terrain_expert + location = { + OR = { + terrain = drylands + terrain = farmlands + terrain = plains + terrain = steppe + } + } + } + AND = { + has_trait = rough_terrain_expert + location = { + OR = { + terrain = hills + terrain = mountains + terrain = wetlands + terrain = desert_mountains + } + } + } + AND = { + has_trait = forest_fighter + location = { + OR = { + terrain = forest + terrain = taiga + } + } + } + AND = { + has_trait = winter_soldier + location_has_winter_trigger = yes + } + } + } + trait = logistician + trait = desert_warrior + trait = jungle_stalker + trait = open_terrain_expert + trait = rough_terrain_expert + trait = forest_fighter + trait = winter_soldier + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # We have reserves, we _must_ have reserves! + option = { + name = harm.2051.c + trigger = { stewardship >= @random_harm_standard_skill_check_value } + skill = stewardship + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.2051.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2051.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.2051.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2051.c.tt.failure + left_icon = root + death = { death_reason = death_starved } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +################################################## +# Harried Each Step +# by Ewan Cowhig Croft +# 2061 - 2070 +################################################## + +# Retreating from battle and caught by enemy soldiers. +harm.2061 = { + type = character_event + title = harm.2061.t + desc = harm.2061.desc + theme = skull + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:killer + animation = aggressive_spear + hide_info = yes + } + override_background = { reference = battlefield } + + cooldown = { years = 30 } + + trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Army checks. + commanding_army = { is_army_in_combat = yes } + # TIT-44621 + always = no + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Maybe you like forward charges. + modifier = { + add = 0.25 + OR = { + has_trait = brave + has_trait = reckless + has_trait = unyielding_defender + } + } + # Maybe you don't. + modifier = { + add = -0.75 + OR = { + has_trait = craven + # Focused on coordination. + has_trait = logistician + } + } + } + + immediate = { + # Generate a suitable soldier to use. + # TIT-44621 + } + + # Get away from me, you bastards! + option = { + name = harm.2061.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.2061.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2061.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.2061.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2061.a.tt.failure + left_icon = root + death = { death_reason = death_cut_off_by_enemy_troops_defensive } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # FLEE! + option = { + name = harm.2061.b + trigger = { has_trait = craven } + trait = craven + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Blast the horn, the TitleAsName requires aid! + option = { + name = harm.2061.c + trigger = { martial >= @random_harm_standard_skill_check_value } + skill = martial + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.2061.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2061.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.2061.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2061.c.tt.failure + left_icon = root + death = { death_reason = death_cut_off_by_enemy_troops_defensive } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } +} + +################################################## +# A Disastrous Victory +# by Ewan Cowhig Croft +# 2071 - 2080 +################################################## + +# Pursuing too far ahead in battle and caught by enemy soldiers. +harm.2071 = { + type = character_event + title = harm.2071.t + desc = harm.2071.desc + theme = skull + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:killer + animation = aggressive_spear + hide_info = yes + } + override_background = { reference = battlefield } + + cooldown = { years = 30 } + + trigger = { + # Standard checks. + harm_game_rule_enablement_trigger = yes + # Army checks. + commanding_army = { + is_army_in_combat = yes + involved_combat_side = { + OR = { + is_combat_side_pursuing = yes + enemy_side = { is_combat_side_retreating = yes } + } + } + exists = enemy_side.side_primary_participant + } + } + + weight_multiplier = { + base = 0 + + # Add the weightings. + modifier = { add = harm_game_rule_likelihood_value } + # Maybe you like forward charges. + modifier = { + add = 0.25 + OR = { + has_trait = brave + has_trait = reckless + has_trait = aggressive_attacker + } + } + # Maybe you don't. + modifier = { + add = -0.75 + OR = { + has_trait = craven + # Focused on coordination. + has_trait = logistician + } + } + } + + immediate = { + # Generate a suitable soldier to use. + commanding_army.involved_combat_side.enemy_side.side_primary_participant = { save_scope_as = actor } + create_character = { + gender_female_chance = actor_soldier_female_chance + location = root.location + template = new_warrior_character + faith = scope:actor.faith + culture = scope:actor.culture + save_scope_as = killer + } + scope:killer = { add_character_flag = wear_armor } + } + + # You'll not claim me, DeathGodName! + option = { + name = harm.2071.a + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_low_odd_success_value } + desc = harm.2071.a.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2071.a.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_low_odd_failure_value } + desc = harm.2071.a.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2071.a.tt.failure + left_icon = root + death = { death_reason = death_cut_off_by_enemy_troops_offensive } + log_harm_event_death_as_variable_effect = yes + } + } + } + + if = { + limit = { is_alive = yes } + stress_impact = { + base = medium_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # Unless they've got a special option, the AI should always choose this. + base = 1 + } + } + + # FLEE! + option = { + name = harm.2071.b + trigger = { has_trait = craven } + trait = craven + + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + + # Always gain stress from trait opt-outs. + stress_impact = { + base = massive_stress_impact_gain + calm = minor_stress_impact_loss + } + ai_chance = { + # The AI should essentially always take this option. + base = 1000 + } + } + + # Rally! Rally to the TitleAsName! + option = { + name = harm.2071.c + trigger = { martial >= @random_harm_standard_skill_check_value } + skill = martial + + random_list = { + # You survive. + 0 = { + modifier = { add = harm_event_random_list_high_odd_success_value } + desc = harm.2071.c.tt.success + send_interface_toast = { + type = event_toast_effect_good + title = harm.2071.c.tt.success + left_icon = root + custom_tooltip = harm.0000.tt.spared_for_now + log_harm_event_spared_as_variable_effect = yes + } + } + # You perish. + 0 = { + modifier = { add = harm_event_random_list_high_odd_failure_value } + desc = harm.2071.c.tt.failure + send_interface_toast = { + type = event_toast_effect_bad + title = harm.2071.c.tt.failure + left_icon = root + death = { death_reason = death_cut_off_by_enemy_troops_offensive } + log_harm_event_death_as_variable_effect = yes + } + } + } + + # Always gain stress from skill tests. + if = { + limit = { is_alive = yes } + stress_impact = { + base = major_stress_impact_gain + calm = minor_stress_impact_loss + } + } + ai_chance = { + # The AI should take this option if a better one isn't available. + base = 100 + } + } + + after = { + hidden_effect = { + scope:killer = { + death = { death_reason = death_vanished } + } + } + } +} + + + + + + + + + + + +################################################## +# RESPONSIVE INCAPABILITY EVENTS + +################################################## +# Various Maintenance Events +# by Ewan Cowhig Croft +# 9501 - 9550 +################################################## + +# Maintenance event fire the on_action containing the randoms.. +harm.9501 = { + hidden = yes + trigger = { + # Standard checks. + is_ruler = yes + harm_0000_not_on_dynastic_cooldown_trigger = yes + harm_game_rule_enablement_trigger = yes + # Mustn't _already_ have a trait rendering you senseless. + is_incapable = no + } + + immediate = { + trigger_event = { on_action = harm_events_pulse } + } +} diff --git a/N3OW/events/health_events.txt b/N3OW/events/health_events.txt new file mode 100644 index 00000000..400a9af7 --- /dev/null +++ b/N3OW/events/health_events.txt @@ -0,0 +1,12008 @@ +#Events managing health concerns + +namespace = health + +#WOUNDED EVENTS: by Linnéa Thimrén and Petter Vilberg +# 0001-0099: Recovery events +# 0101-0199: Becoming wounded +# 0201-0299: Infection/gangrene + +#DISEASE EVENTS: by Mathilda Bjarnehed +# 1001-1099: Contract disease +# 1101-1199: Recover from diseases +# 1201-1299: Contagion handling events +# 2001-2099: STD events +# 2101-2199: Contagious disease at court +# 2201-2299: Important character has dangerous disease events + +#COURT PHYSICIAN RECRUITMENT by Mathilda Bjarnehed +# 3001-3009: Recruit physician event +# 3010 : Invalidate physician + +#COURT PHYSICIAN DISEASE EVENTS: by Mathilda Bjarnehed, Milla Isaksson, and Linnéa Thimrén +# 3100-3199: Disease treatment +# 3201-3299: Punishment for mistreating important people + +#COURT PHYSICIAN WOUND EVENTS: by Linnéa Thimrén +# 4000 Wound treatment + +#COMMIT SUICIDE EVENTS: by Linnéa Thimrén +# 6000 How will you do it? + +#INFIRM EVENTS: by Bianca Savazzi +# 7000 You've become infirm +# 7100 You become depressed while infirm + +#PULSE MANAGEMENT: +# 9998-9999: Pulse management + + + +################## +################## +# WOUNDED EVENTS # +################## +################## + +################## +# RECOVERY EVENTS +################## + +#Recover from being Wounded +health.0001 = { + hidden = yes + + trigger = { + has_trait = wounded_1 + } + + weight_multiplier = { + base = 1 + compare_modifier = { + value = age + multiplier = -0.01 + min = -0.9 + } + compare_modifier = { + value = stress + offset = -25 + multiplier = -0.005 + } + modifier = { + add = -0.3 + has_character_modifier = infected_wound_modifier + } + modifier = { + add = 1 + court_physician_available_trigger = yes + } + } + + immediate = { + if = { + limit = { has_character_modifier = infected_wound_modifier } + remove_character_modifier = infected_wound_modifier + + if = { + limit = { NOT = { has_trait = scarred } } + add_character_flag = will_get_scar + } + } + else_if = { + limit = { NOT = { has_trait = scarred } } + random = { + chance = 40 + add_character_flag = will_get_scar + } + } + send_interface_toast = { + type = event_court_physician_good + title = health.0001.desc + + remove_trait = wounded_1 + + if = { + limit = { has_character_flag = will_get_scar } + add_trait = scarred + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 25 + } + } + } + remove_character_flag = will_get_scar + } + } + } +} + + +#Recover from being severely injured +health.0002 = { + type = character_event + title = health.0002.t + desc = health.0002.desc + theme = recovery + left_portrait = { + character = root + animation = sick + } + + trigger = { + has_trait = wounded_2 + } + + weight_multiplier = { + base = 1 + compare_modifier = { + value = age + multiplier = -0.01 + min = -0.9 + } + compare_modifier = { + value = stress + offset = -25 + multiplier = -0.005 + } + modifier = { + add = -0.2 + has_character_modifier = infected_wound_modifier + } + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + random = { + chance = 20 + add_character_flag = will_get_scar #This flag is checked when wounded_1 heals + } + } + if = { + limit = { has_character_modifier = infected_wound_modifier } + random = { + chance = 50 + remove_character_modifier = infected_wound_modifier + } + } + show_as_tooltip = { remove_trait_force_tooltip = wounded_2 } + change_trait_rank = { + trait = wounded + rank = -1 + max = 1 + } + } + + option = { + name = health.0002.a + } +} + + +#Recover from being near death +health.0003 = { + type = character_event + title = health.0003.t + desc = health.0003.desc + theme = recovery + left_portrait = { + character = root + animation = severelywounded + } + + trigger = { + has_trait_rank = { + trait = wounded + rank > 2 + } + } + + weight_multiplier = { + base = 1 + compare_modifier = { + value = age + multiplier = -0.01 + min = -0.9 + } + compare_modifier = { + value = stress + offset = -25 + multiplier = -0.005 + } + modifier = { + add = -0.2 + has_character_modifier = infected_wound_modifier + } + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + random = { + chance = 20 + add_character_flag = will_get_scar #This flag is checked when wounded_1 heals + } + } + if = { + limit = { has_character_modifier = infected_wound_modifier } + random = { + chance = 50 + remove_character_modifier = infected_wound_modifier + } + } + show_as_tooltip = { remove_trait_force_tooltip = wounded_3 } + change_trait_rank = { + trait = wounded + rank = -1 + } + } + + option = { + name = health.0003.a + } +} + + +#Recover from your wound being infected +health.0004 = { + type = character_event + title = health.0004.t + desc = health.0004.desc + theme = recovery + left_portrait = { + character = root + animation = sick + } + + trigger = { + has_character_modifier = infected_wound_modifier + NOT = { is_in_prison_type = dungeon } #Special dungeon event for this. + } + + weight_multiplier = { + base = 1 + compare_modifier = { + value = age + multiplier = -0.01 + min = -0.9 + } + compare_modifier = { + value = stress + offset = -25 + multiplier = -0.005 + } + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + remove_character_modifier = infected_wound_modifier + add_character_flag = { + flag = recently_recovered_from_infection + days = 730 + } + } + + option = { + name = health.0004.a + } +} + + +################## +# BECOME WOUNDED +################## + +#Wounded 1 - Successful treatment +health.0100 = { + hidden = yes + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + + if = { + limit = { exists = scope:court_physician } + send_interface_toast = { + type = event_court_physician_good + left_icon = scope:court_physician + title = health.wounded_1_success + + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + } + } + } +} + +#Wounded 1 - Failed treatment +health.0101 = { + hidden = yes + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + + if = { + limit = { exists = scope:court_physician } + + send_interface_message = { + type = event_court_physician_bad + left_icon = scope:court_physician + title = health.wounded_1_failure + + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = failure } + } + } + } +} + +#Wounded 2 +scripted_trigger health_event_is_worried_trigger = { + OR = { + ai_compassion >= medium_positive_ai_value + dread_modified_ai_boldness = { + dreaded_character = $CHARACTER$ + value <= medium_negative_ai_value + } + has_relation_friend = $CHARACTER$ + has_relation_lover = $CHARACTER$ + opinion = { + target = $CHARACTER$ + value >= high_positive_opinion + } + } + $CHARACTER$.health < fine_health +} + +health.0102 = { + type = character_event + title = health.0102.t + desc = { + desc = health.0102.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.0102.court_physician.desc + } + } + theme = healthcare + + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = severelywounded + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_scope_as = sick_character + save_court_physician_as_effect = { SCOPE_NAME = physician } + show_as_tooltip = { + add_trait_force_tooltip = wounded_2 + } + } + + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.0102.a + if = { + limit = { + exists = liege + liege != root + } + liege = { trigger_event = health.4000 } + } + ai_chance = { base = 1 } + } + + ###PHYSICAIN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.a + safe_wound_treatment_effect = yes + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.b + risky_wound_treatment_effect = yes + ai_chance = { base = 1 } + } + + #No treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.d + no_disease_treatment_effect = yes + ai_chance = { base = 0 } + } +} + +#Wounded 3 +health.0104 = { + type = character_event + title = health.0104.t + desc = { + desc = health.0104.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.0104.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = severelywounded + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_scope_as = sick_character + save_court_physician_as_effect = { SCOPE_NAME = physician } + show_as_tooltip = { + add_trait_force_tooltip = wounded_3 + } + } + + ###NON-PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.0104.a + if = { + limit = { + exists = liege + liege != root + } + liege = { trigger_event = health.4000 } + } + ai_chance = { base = 1 } + } + + ###PHYSICIAN OPTIONS### + + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.a + safe_wound_treatment_effect = yes + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.b + risky_wound_treatment_effect = yes + ai_chance = { base = 1 } + } + + #No treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.d + no_disease_treatment_effect = yes + ai_chance = { base = 0 } + } +} + + + +####################### +# INFECTION/GANGERENE +####################### + +#Your wound becomes infected, notification or event? +health.0201 = { + hidden = yes + + trigger = { + has_trait_rank = { + trait = wounded + rank >= 1 + } + } + + immediate = { + save_scope_as = sick_character + if = { + limit = { + has_recent_wound_treatment_trigger = yes + } + #Notification message if you're already being treated for wounds + send_interface_toast = { + type = event_court_physician_bad + title = health.0201.desc + left_icon = scope:physician + + add_character_modifier = { + modifier = infected_wound_modifier + } + } + } + else = { + #A "real" event if you're not receiving treatment + trigger_event = health.0202 + } + + #Extra fun: gangrene! + random = { + chance = 10 + trigger_event = { + id = health.0203 + days = { 60 90 } + } + } + } +} + +#Your wounds have become infected! +health.0202 = { + type = character_event + title = health.0202.t + desc = { + first_valid = { + triggered_desc = { + trigger = { probably_unintelligent_trigger = yes } + desc = health.0202.unintelligent + } + desc = health.0202.desc + } + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.0202.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = wounded_3 } + animation = severelywounded + } + animation = sick + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + trigger = { + has_trait_rank = { + trait = wounded + rank > 0 + } + NOT = { has_character_modifier = infected_wound_modifier } + NOT = { has_character_flag = recently_recovered_from_infection } + NOT = { is_in_prison_type = dungeon } #Special dungeon event for this. + } + + weight_multiplier = { + base = 1 + compare_modifier = { + value = stress + offset = -25 + multiplier = -0.005 + } + modifier = { + add = 0.5 + has_trait_rank = { + trait = wounded + rank > 1 + } + } + modifier = { + add = 0.5 + has_trait_rank = { + trait = wounded + rank > 2 + } + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + add_character_modifier = { + modifier = infected_wound_modifier + } + } + + ###NO PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.0202.a + if = { + limit = { + exists = liege + liege != root + } + liege = { trigger_event = health.4000 } + } + ai_chance = { base = 1 } + } + + #PHYSICIAN OPTIONS + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.a + safe_wound_treatment_effect = yes + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.b + risky_wound_treatment_effect = yes + ai_chance = { base = 1 } + } + + #No treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.d + no_disease_treatment_effect = yes + ai_chance = { base = 0 } + } + + +} + +#Gangrene! Event or notification? +health.0203 = { + hidden = yes + + trigger = { + has_character_modifier = infected_wound_modifier + } + + immediate = { + save_scope_as = sick_character + if = { + limit = { + has_recent_wound_treatment_trigger = yes + } + #Notification message if you're already being treated for wounds + send_interface_toast = { + type = event_court_physician_bad + title = health.0203.desc + left_icon = scope:physician + remove_character_modifier = infected_wound_modifier + add_character_modifier = gangrene_modifier + } + } + else = { + #A "real" event if you're not receiving treatment + trigger_event = health.0204 + } + } +} + +#You've contracted gangrene! +health.0204 = { + type = character_event + title = health.0204.t + desc = { + desc = health.0204.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.0204.court_physician.desc + } + } + + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + trigger = { + has_trait_rank = { + trait = wounded + rank > 0 + } + NOT = { has_character_modifier = gangrene_modifier } + } + + weight_multiplier = { + base = 0.5 + compare_modifier = { + value = stress + offset = -25 + multiplier = -0.005 + } + modifier = { + add = 0.5 + has_trait_rank = { + trait = wounded + rank > 1 + } + } + modifier = { + add = 0.5 + has_trait_rank = { + trait = wounded + rank > 2 + } + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + add_character_modifier = { + modifier = gangrene_modifier + } + remove_character_modifier = infected_wound_modifier + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.0202.a + if = { + limit = { + exists = liege + liege != root + } + liege = { trigger_event = health.4000 } + } + ai_chance = { base = 1 } + } + + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.a + safe_wound_treatment_effect = yes + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.b + risky_wound_treatment_effect = yes + ai_chance = { base = 1 } + } + + #No treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + } + name = health.3101.d + no_disease_treatment_effect = yes + ai_chance = { base = 0 } + } + + +} + + +################## +################## +# DISEASE EVENTS # +################## +################## + +############################## +# CONTRACTING DISEASE EVENTS # Mathilda Bjarnehed & Veronica Pazos +############################## +#For outbreaks, contagion and scripted effects + +#You become ill +health.1001 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + involved_activity ?= { has_activity_type = activity_pilgrimage } + } + desc = pilgrimage.0041.t + } + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1001.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + involved_activity ?= { has_activity_type = activity_pilgrimage } + } + desc = pilgrimage.0041.desc + } + triggered_desc = { + trigger = { + trigger_if = { + limit = { exists = involved_activity } + NOT = { + involved_activity = { has_activity_type = activity_pilgrimage } + } + } + trigger_else = { always = yes } + } + desc = health.1001.desc + } + } + first_valid = { + triggered_desc = { + trigger = { + court_physician_available_trigger = no + } + desc = health.1001.nophysician.desc + } + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + } + desc = health.1001.court_physician.desc + } + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling = no } + reference = bedchamber + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + trigger = { + can_contract_disease_trigger = { DISEASE = ill } + } + + weight_multiplier = { + base = 1 + + modifier = { + is_adult = no + factor = 1.5 + } + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + # Difficulty and Game Rules make the generic 'Ill' slightly more common + modifier = { # Difficulty + is_ai = no + has_game_rule = easy_difficulty + factor = 1.1 + } + modifier = { + is_ai = no + has_game_rule = very_easy_difficulty + factor = 1.5 + } + modifier = { + is_ai = yes + has_game_rule = easy_difficulty + any_parent = { + is_ai = no + } + factor = 1.1 + } + modifier = { + is_ai = no + has_game_rule = very_easy_difficulty + any_parent = { + is_ai = no + } + factor = 1.5 + } + modifier = { # Game Rule + has_game_rule = fewer_minor_disease_frequency + factor = 1.2 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } #Adds the trait, sends event "health.2201" to those who care if health is brought too low + } + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + # can't hire a court physician while you're traveling + is_travelling = no + NOT = { exists = scope:physician } + is_playable_character = yes + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1001.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + name = { + trigger = { + involved_activity ?= { has_activity_type = activity_pilgrimage } + } + text = pilgrimage.0041.b + } + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan = { + travel_plan_owner = root + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + #Go back home, damnit + if = { + limit = { + involved_activity ?= { has_activity_type = activity_pilgrimage } + } + #Removed in the on_travel_plan_complete on_action + set_variable = { + name = pilgrimage_invalidated_illness + value = involved_activity.activity_location + } + } + #current_travel_plan = { cancel_travel_plan = yes } + ai_chance = { # Adventurers never cancel + base = 1 + modifier = { + has_government = landless_adventurer_government + factor = 0 + } + } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + involved_activity ?= { has_activity_type = activity_pilgrimage } + } + desc = pilgrimage.0041.a + } + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + involved_activity ?= { has_activity_type = activity_pilgrimage } + } + custom_tooltip = pilgrimage.0041.a.tt + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + if = { + limit = { + has_global_variable = tutorial_completed + } + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } + ai_chance = { base = 0 } + } + +} + + +#You become pneumonic +health.1002 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1002.t + } + } + desc = { + desc = health.1002.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1002.court_physician.desc + } + } + + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:physician + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = pneumonic } + } + + weight_multiplier = { + base = 1 + + modifier = { + has_trait = ill + factor = 35 + } + modifier = { + is_adult = no + factor = 2 + } + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = pneumonic TREATMENT_EVENT = no } #Adds the trait (and removes ill if present), sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1002.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } +} + + +#You become gout-ridden +health.1003 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1003.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + court_owner = { exists = yes } + root.court_owner = root + court_owner = { + has_royal_court = yes + amenity_level = { target = court_food_quality value >= 3 } + } + is_travelling = no + } + desc = health.1003.court_amenities_gout.desc + } + desc = health.1003.desc + } + + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1003.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = gout_ridden } + } + + weight_multiplier = { + base = 1 + + modifier = { + age < 60 + factor = 0.5 + } + modifier = { + age < 50 + factor = 0.5 + } + modifier = { + age < 40 + factor = 0.5 + } + modifier = { + health >= good_health + factor = 0.5 + } + modifier = { + has_trait = temperate + factor = 0.8 + } + modifier = { + has_character_modifier = obese_modifier + factor = 1.5 + } + modifier = { + any_parent = { + has_trait = gout_ridden + } + factor = 1.5 + } + modifier = { + current_weight > 50 + factor = 1.1 + } + modifier = { + current_weight > 80 + factor = 1.1 + } + modifier = { + court_owner ?= { + has_royal_court = yes + amenity_level = { target = court_food_quality value = 3 } + } + factor = 1.1 + } + modifier = { + court_owner ?= { + has_royal_court = yes + amenity_level = { target = court_food_quality value = 4 } + } + factor = 1.3 + } + modifier = { + court_owner ?= { + has_royal_court = yes + amenity_level = { target = court_food_quality value = 5 } + } + factor = 1.5 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = gout_ridden TREATMENT_EVENT = no } #Adds the trait, sends event "health.2201" to those who care if health is brought too low + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1003.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } +} + + +#You become leper +health.1004 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1004.t + } + } + desc = { + desc = health.1004.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1004.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = shame + } + right_portrait = { + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = leper } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = leper TREATMENT_EVENT = no } #Adds the trait, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1004.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } +} + + +#You contract typhus +health.1005 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1005.t + } + } + desc = { + desc = health.1005.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1005.court_physician.desc + } + } + + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = typhus } + } + + weight_multiplier = { + base = 1 + + modifier = { + is_commanding_army = yes + is_knight = yes + factor = 7 + } + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = typhus TREATMENT_EVENT = no } #Adds the trait, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1005.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } +} + + +#You contract consumption +health.1006 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1006.t + } + } + desc = { + desc = health.1006.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1006.court_physician.desc + } + } + + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = consumption } + } + + weight_multiplier = { + base = 1 + + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + modifier = { + is_adult = no + factor = 1.3 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = consumption TREATMENT_EVENT = no } #Adds the trait, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1006.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } +} + + +#You develop cancer +health.1007 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1007.t + } + } + desc = { + desc = health.1007.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1007.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = cancer } + } + + weight_multiplier = { + base = 1 + + modifier = { #Children almost never have it + age < 25 + factor = 0.1 + } + modifier = { #Very uncommon before 30 + age >= 25 + age < 35 + factor = 0.3 + } + modifier = { #Increasingly common after 55 + is_male = yes + age > 55 #Males have a higher risk later in life + factor = 3 + } + modifier = { #Increasingly common after 55 + age >= 55 + is_female = yes + factor = 2 + } + modifier = { #Increasingly common after 65 + age >= 60 + factor = 2 + } + modifier = { #Increasingly common after 70 + age >= 70 + factor = 2 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = cancer TREATMENT_EVENT = no } #Adds the trait, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1007.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } +} + + +#You contract lover's pox +health.1008 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1008.t + } + } + desc = health.1008.desc + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + + left_portrait = { + character = root + animation = anger + } + right_portrait = scope:infecting_partner + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = lovers_pox } + } + + weight_multiplier = { + base = 1 + + modifier = { #Shouldn't appear randomly for player characters, children, celibate characters etc. + OR = { + is_ai = no + any_spouse = { + is_ai = no + } + any_relation = { + type = lover + is_ai = no + } + is_adult = no + has_trait = celibate + has_sexuality = asexual + } + factor = 0 + } + modifier = { + has_trait = lustful + factor = 3 + } + modifier = { + has_trait = chaste + factor = 0.2 + } + modifier = { + has_trait = seducer + factor = 2 + } + modifier = { + has_trait = lifestyle_reveler + factor = 1.5 + } + } + + immediate = { + contract_disease_effect = { DISEASE = lovers_pox TREATMENT_EVENT = no } #Adds the trait, sends event "health.2001" to sexual partners, sends event "health.2201" to those who care if health is brought too low + } + + #Note: no treatment for lover's pox + + option = { + name = { + trigger = { exists = scope:infecting_partner } + text = health.1008.partner.a + } + name = { + trigger = { NOT = { exists = scope:infecting_partner } } + text = health.1008.no_partner.a + } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ### TRAVEL - TRUDGE ON + option = { + name = health.travel.option.continue + trigger = { + is_travelling = yes + } + ai_chance = { base = 1 } + } +} + +#Infection with Great Pox. Will give early great pox hidden as lover's pox, unless you already have lover's pox +health.1009 = { + hidden = yes + + trigger = { + can_contract_disease_trigger = { DISEASE = great_pox } + NOR = { + has_trait = early_great_pox + has_trait = great_pox + } + } + + weight_multiplier = { + base = 1 + + modifier = { #Shouldn't appear randomly for player characters, children, celibate characters etc. + OR = { + is_ai = no + any_spouse = { + is_ai = no + } + any_relation = { + type = lover + is_ai = no + } + is_adult = no + has_trait = celibate + has_sexuality = asexual + } + factor = 0 + } + modifier = { + has_trait = lustful + factor = 3 + } + modifier = { + has_trait = chaste + factor = 0.2 + } + modifier = { + has_trait = seducer + factor = 2 + } + modifier = { + has_trait = lifestyle_reveler + factor = 1.5 + } + } + + immediate = { + if = { + limit = { NOT = { has_trait = lovers_pox } } + trigger_event = health.1012 #early_great_pox + } + else = { + add_trait = early_great_pox #so it will be upgraded + trigger_event = health.1013 #great_pox + } + } +} + + +#You contract great pox (hidden as lover's pox) +health.1012 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1008.t + } + } + desc = health.1008.desc + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = anger + } + right_portrait = scope:infecting_partner + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = great_pox } + NOR = { + has_trait = early_great_pox + has_trait = great_pox + has_trait = lovers_pox + } + } + + immediate = { + contract_disease_effect = { DISEASE = great_pox TREATMENT_EVENT = no } #Adds the trait early_great_pox, great pox reveal event "health.1013" will be sent in 60-150 days, sends event "health.2001" to sexual partners, sends event "health.2201" to those who care if health is brought too low + } + + #Note: no treatment yet, because it appears to be lover's pox + + option = { + name = { + trigger = { exists = scope:infecting_partner } + text = health.1008.partner.a + } + name = { + trigger = { NOT = { exists = scope:infecting_partner } } + text = health.1008.no_partner.a + } + + hidden_effect = { + trigger_event = { + id = health.1013 #Reveals the true disease + days = { 60 150 } + } + } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ### TRAVEL - TRUDGE ON + option = { + name = health.travel.option.continue + trigger = { + is_travelling = yes + } + ai_chance = { base = 1 } + } +} + +#"Lover's pox" progresses to Great Pox +health.1013 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1013.t + } + } + desc = { + desc = health.1013.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1013.court_physician.desc + } + } + + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = great_pox } + has_trait = early_great_pox + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = great_pox TREATMENT_EVENT = no } #Adds the trait and removes early_great_pox/lovers_pox, sends event "health.2002" to sexual partners, sends event "health.2201" to those who care + + hidden_effect = { + trigger_event = { + id = health.1014 + days = { 1825 5475 } + } + } + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = { + trigger = { exists = scope:infecting_partner } + text = health.1013.partner.a + } + name = { + trigger = { NOT = { exists = scope:infecting_partner } } + text = health.1013.no_partner.a + } + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } +} + + +#Great pox leads to lunacy +health.1014 = { + type = character_event + title = health.1014.t + desc = health.1014.desc + theme = mental_health + left_portrait = { + character = root + animation = paranoia + } + + trigger = { + has_trait = great_pox + NOT = { has_trait = lunatic } + } + + immediate = { + add_trait = lunatic_1 + } + + option = { + name = health.1014.a + } +} + +#You contract smallpox +health.1010 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1010.t + } + } + desc = { + desc = health.1010.desc + first_valid = { + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1010.court_physician.desc + } + desc = health.1010.end.desc + } + } + + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = smallpox } + } + + weight_multiplier = { + base = 1 + + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + modifier = { + is_adult = no + factor = 1.5 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = smallpox TREATMENT_EVENT = no } #Adds the trait, sends event "health.2101" about contagious disease to liege/host/imprisoner, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + court_physician_available_trigger = no + is_ruler = yes + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1010.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } +} + +#You contract bubonic plague +health.1011 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1011.t + } + } + desc = { + desc = health.1011.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1011.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = fear + } + right_portrait = { + trigger = { + root != scope:physician + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = bubonic_plague } + } + + weight_multiplier = { + base = 1 + + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + modifier = { + is_adult = no + factor = 1.5 + } + modifier = { + current_date < 1346.1.1 + factor = 0 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = bubonic_plague TREATMENT_EVENT = no } #Adds the trait, sends event "health.2101" about contagious disease to liege/host/imprisoner, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_imprisoned = no + is_travelling = no + } + name = health.3101.e + find_court_physician_effect = yes + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + } + name = health.1011.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } + + #You're going to rot away in prison most likely + option = { + trigger = { + is_imprisoned = yes + } + name = health.3101.f + } +} + +#You contract measles +health.1015 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1015.t + } + } + desc = { + desc = health.1015.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1015.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + root != scope:physician + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = measles } + } + + weight_multiplier = { + base = 1 + + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + modifier = { + is_adult = no + factor = 1.5 + } + modifier = { + current_date < 1346.1.1 + factor = 0 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = measles TREATMENT_EVENT = no } #Adds the trait, sends event "health.2101" about contagious disease to liege/host/imprisoner, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_imprisoned = no + is_travelling = no + } + name = { + trigger = { + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + text = health.3101.e + } + name = { + trigger = { + OR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + text = health.3101.e.already_looking + } + if = { + limit = { + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + find_court_physician_effect = yes + } + else = { + custom_tooltip = health_3101_already_looking_tt + } + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + name = health.1015.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } + + #You're going to rot away in prison most likely + option = { + trigger = { + is_imprisoned = yes + } + name = health.3101.f + } +} + +#You contract dysentery +health.1016 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1016.t + } + } + desc = { + desc = health.1016.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1016.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + trigger = { + root != scope:physician + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = idle + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = dysentery } + } + + weight_multiplier = { + base = 1 + + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + modifier = { + is_adult = no + factor = 1.5 + } + modifier = { + current_date < 1346.1.1 + factor = 0 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = dysentery TREATMENT_EVENT = no } #Adds the trait, sends event "health.2101" about contagious disease to liege/host/imprisoner, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_imprisoned = no + is_travelling = no + } + name = { + trigger = { + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + text = health.3101.e + } + name = { + trigger = { + OR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + text = health.3101.e.already_looking + } + if = { + limit = { + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + find_court_physician_effect = yes + } + else = { + custom_tooltip = health_3101_already_looking_tt + } + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + name = health.1016.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } + + #You're going to rot away in prison most likely + option = { + trigger = { + is_imprisoned = yes + } + name = health.3101.f + } +} + +#You contract ergotism +health.1017 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.t + } + desc = health.1017.t + } + } + desc = { + desc = health.1017.desc + triggered_desc = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + } + desc = health.1017.court_physician.desc + } + } + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = fear + } + right_portrait = { + trigger = { + root != scope:physician + trigger_if = { + limit = { is_travelling = yes } + current_travel_plan = { + any_entourage_character = { + has_court_position = court_physician_court_position + } + } + } + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = worry + } + + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + + trigger = { + can_contract_disease_trigger = { DISEASE = ergotism } + } + + weight_multiplier = { + base = 1 + + modifier = { + health <= fine_health + factor = 1.1 + } + modifier = { + health <= poor_health + factor = 1.1 + } + modifier = { + is_adult = no + factor = 1.5 + } + modifier = { + current_date < 1346.1.1 + factor = 0 + } + } + + immediate = { + play_music_cue = "mx_cue_illness" + save_court_physician_as_effect = { SCOPE_NAME = physician } + contract_disease_effect = { DISEASE = ergotism TREATMENT_EVENT = no } #Adds the trait, sends event "health.2101" about contagious disease to liege/host/imprisoner, sends event "health.2201" to those who care + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + NOT = { exists = scope:physician } + is_playable_character = yes + is_imprisoned = no + is_travelling = no + } + name = { + trigger = { + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + text = health.3101.e + } + name = { + trigger = { + OR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + text = health.3101.e.already_looking + } + if = { + limit = { + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + find_court_physician_effect = yes + } + else = { + custom_tooltip = health_3101_already_looking_tt + } + ai_chance = { base = 5 } + } + + #OK + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = yes + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + name = health.1017.a + ai_chance = { base = 1 } + } + ### TRAVEL- GO HOME + option = { + name = health.travel.option.home + flavor = health.travel.option.home.flavor + trigger = { + is_travelling = yes + current_travel_plan ={ + travel_plan_owner = root + can_cancel = yes + } + involved_activity ?= { + NOR = { + has_activity_type = activity_tour + is_required_special_guest = root + } + } + } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + ai_chance = { base = 1 } + } + ###COURT PHYSICIAN OPTIONS### + #Safe treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky treatment + option = { + trigger = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic treatment + option = { + trigger = { + court_physician_available_trigger = yes + liege_picks_treatment_trigger = no + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { is_travelling = yes } + desc = health.travel.option.continue + } + desc = health.3101.d + } + } + } + if = { + limit = { + exists = scope:physician + liege_picks_treatment_trigger = no + court_physician_available_when_traveling_trigger = yes + } + no_disease_treatment_effect = yes + } + ai_chance = { base = 0 } + } + + #You're going to rot away in prison most likely + option = { + trigger = { + is_imprisoned = yes + } + name = health.3101.f + } +} + +########################### +# DISEASE RECOVERY EVENTS # Mathilda Bjarnehed & Veronica Pazos +########################### +#For recovery pulses and scripted effects + +#Recover from ill +health.1101 = { + type = character_event + title = health.1101.t + desc = health.1101.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = ill + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = ill } #Removes the trait, sends event "health.2202" to those who care + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1101.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = ill + } + } +} + +#Recover from pneumonic +health.1102 = { + type = character_event + title = health.1102.t + desc = health.1102.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = pneumonic + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = pneumonic } #Removes the trait, sends event "health.2202" to those who care + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1102.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = pneumonic + } + } +} + +#Recover from gout_ridden +health.1103 = { + type = character_event + title = health.1103.t + desc = health.1103.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = gout_ridden + } + + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = gout_ridden } #Removes the trait, sends event "health.2202" to those who care + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1103.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = gout_ridden + } + } +} + +#Recover from leper (currently not possible) + +#Recover from typhus +health.1105 = { + type = character_event + title = health.1105.t + desc = health.1105.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = typhus + } + + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = typhus } #Removes the trait, sends event "health.2202" to those who care + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1105.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = typhus + } + } +} + +#Recover from consumption +health.1106 = { + type = character_event + title = health.1106.t + desc = health.1106.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = consumption + } + + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = consumption } #Removes the trait, sends event "health.2202" to those who care + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1106.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = consumption + } + } +} + +#Recover from cancer +health.1107 = { + type = character_event + title = health.1107.t + desc = health.1107.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = cancer + } + + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = cancer } #Removes the trait, sends event "health.2202" to those who care + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1107.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = cancer + } + } +} + +#Recover from lovers_pox (currently not possible) + +#Recover from great_pox +health.1109 = { + type = character_event + title = health.1109.t + desc = health.1109.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = great_pox + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = great_pox } #Removes the trait, sends event "health.2202" to those who care & sexual partners + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1109.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = great_pox + } + } +} + +#Recover from smallpox +health.1110 = { + type = character_event + title = health.1110.t + desc = health.1110.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = smallpox + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = smallpox } #Removes the trait, sends event "health.2202" to those who care & liege/host/imprisoner, adds immunity flag + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1110.a + custom_tooltip = health.1110.a.tt + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = smallpox + } + } + + after = { + random = { + chance = 10 + add_trait = scarred + add_trait_xp = { + trait = scarred + value = { + integer_range = { + min = 5 + max = 15 + } + } + } + } + } +} + +#Recover from bubonic_plague +health.1111 = { + type = character_event + title = health.1111.t + desc = health.1111.desc + theme = recovery + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = bubonic_plague + } + + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = bubonic_plague } #Removes the trait, sends event "health.2202" to those who care & liege/host/imprisoner, adds immunity flag + remove_disease_treatment_effect = yes + if = { + limit = { is_ai = no } + add_achievement_global_variable_effect = { + VARIABLE = ce1_not_today_achievement_unlocked + VALUE = yes + } + } + } + } + + option = { + name = health.1111.a + custom_tooltip = health.1111.a.tt + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = bubonic_plague + } + } +} + +#Recover from measles +health.1112 = { + type = character_event + title = health.1112.t + desc = health.1112.desc + theme = recovery + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = measles + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = measles } #Removes the trait, sends event "health.2202" to those who care & liege/host/imprisoner, adds immunity flag + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1112.a + custom_tooltip = health.1112.a.tt + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = measles + } + } + + after = { + random = { + chance = 5 + add_trait = blind + } + } +} + +#Recover from dysentery +health.1113 = { + type = character_event + title = health.1113.t + desc = health.1113.desc + theme = recovery + left_portrait = { + character = root + animation = personality_content + } + + trigger = { + has_trait = dysentery + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = dysentery } #Removes the trait, sends event "health.2202" to those who care & liege/host/imprisoner, adds immunity flag + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1113.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = dysentery + } + } +} + +#Recover from ergotism/holy fire +health.1114 = { + type = character_event + title = health.1114.t + desc = health.1114.desc + theme = recovery + left_portrait = { + character = root + animation = happiness + } + + trigger = { + has_trait = ergotism + } + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + hidden_effect = { + recover_from_disease_effect = { DISEASE = ergotism } #Removes the trait, sends event "health.2202" to those who care & liege/host/imprisoner, adds immunity flag + remove_disease_treatment_effect = yes + } + } + + option = { + name = health.1114.a + show_as_tooltip = { #show the trait actually shows up in the tooltip + remove_trait_force_tooltip = ergotism + } + } +} + + +#################### +# STDs CONTAGION EVENTS # Mathilda Bjarnehed +#################### + +#Lover's pox contagion +health.1200 = { + hidden = yes + + trigger = { + has_trait = lovers_pox + } + + immediate = { + + if = { + limit = { #Children, celibate characters, rejected_from_marriage_bed_modifier characters and characters without partners (or with sick partners) won't spread the disease + OR = { + is_adult = no + has_trait = celibate + has_character_modifier = rejected_from_marriage_bed_modifier + NOR = { + is_married = yes + any_consort = { NOT = { has_trait = lovers_pox } } + any_relation = { type = lover NOT = { has_trait = lovers_pox } } + } + } + } + #Let's just check back with them in ~5 years + trigger_event = { + id = health.1200 + days = { 1800 2200 } + } + } + else = { #But everyone else infects a partner + save_scope_as = infecting_partner + + every_relation = { + type = lover + limit = { + NOT = { has_trait = lovers_pox } + } + add_to_temporary_list = potential_contagion_victims + } + every_consort = { + limit = { + NOT = { has_trait = lovers_pox } + } + add_to_temporary_list = potential_contagion_victims + } + random_in_list = { + list = potential_contagion_victims + weight = { + base = 100 + modifier = { + add = -50 + has_perk = wash_your_hands_perk + } + } + contract_lovers_pox_from = { PARTNER = root } + } + + #New chance of contagion in a while (time frame depends on traits) + if = { + limit = { #Quick + OR = { + has_trait = lustful + has_trait = seducer + has_trait = lifestyle_reveler + } + } + trigger_event = { + id = health.1200 + days = { 250 700 } + } + } + else_if = { #Slow + limit = { has_trait = chaste } + trigger_event = { + id = health.1200 + days = { 3000 10000 } + } + } + else = { #Regular + trigger_event = { + id = health.1200 + days = { 700 2500 } + } + } + } + } +} + +#Great Pox contagion +health.1201 = { + hidden = yes + + trigger = { + OR = { + has_trait = early_great_pox + has_trait = great_pox + } + } + + immediate = { + if = { + limit = { #Children, celibate characters, rejected_from_marriage_bed_modifier characters and characters without partners (or with sick partners) won't spread the disease + OR = { + is_adult = no + has_trait = celibate + has_character_modifier = rejected_from_marriage_bed_modifier + NOR = { + is_married = yes + any_consort = { can_contract_disease_trigger = { DISEASE = great_pox } } + any_relation = { type = lover can_contract_disease_trigger = { DISEASE = great_pox } } + } + } + } + #Let's just check back with them in ~3 years + trigger_event = { + id = health.1201 + days = { 1000 1200 } + } + } + else = { #But everyone else infects a partner + save_scope_as = infecting_partner + + every_relation = { + type = lover + limit = { + can_contract_disease_trigger = { DISEASE = great_pox } + } + add_to_temporary_list = potential_contagion_victims + } + every_consort = { + limit = { + can_contract_disease_trigger = { DISEASE = great_pox } + } + add_to_temporary_list = potential_contagion_victims + } + random_in_list = { + list = potential_contagion_victims + weight = { + base = 100 + modifier = { + add = -50 + has_perk = wash_your_hands_perk + } + } + contract_great_pox_from = { PARTNER = root } + } + + #New chance of contagion in a while (time frame depends on traits) + if = { + limit = { #Quick + OR = { + has_trait = lustful + has_trait = seducer + has_trait = lifestyle_reveler + } + } + trigger_event = { + id = health.1201 + days = { 350 1000 } + } + } + else_if = { #Slow + limit = { has_trait = chaste } + trigger_event = { + id = health.1201 + days = { 3000 10000 } + } + } + else = { #Regular + trigger_event = { + id = health.1201 + days = { 1000 3000 } + } + } + } + } +} + +#Smallpox contagion +health.1202 = { + hidden = yes + + trigger = { + has_trait = smallpox + } + + immediate = { + save_scope_as = disease_spreader + + save_health_court_owner_effect = { SCOPE_NAME = contagion_court_owner } + + if = { + limit = { exists = scope:contagion_court_owner } + + scope:contagion_court_owner = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + + #Add everyone in the same court (ruler, prisoners, guests) and friendly scheme targets/owners to list + create_contagion_list_effect = { SICK_CHARACTER = root CONTAGION_COURT_OWNER = scope:contagion_court_owner } + + random_list = { + 20 = { #Contagion successful + random_in_list = { + list = contagion_list + weight = { + base = 75 + modifier = { #Proximity increases likelihood of contagion + is_imprisoned = yes + root = { is_imprisoned = yes } + add = 125 + } + modifier = { #Proximity increases likelihood of contagion + is_imprisoned = no + root = { is_imprisoned = no } + add = 125 + } + modifier = { + add = -50 + has_perk = wash_your_hands_perk + } + modifier = { + add = -50 + AND = { + OR = { + liege ?= { + any_court_position_holder ?= { + type = wet_nurse_court_position + NOT = { has_trait = smallpox } + has_relation_nursed_child = root + } + } + root = { + any_court_position_holder ?= { + type = wet_nurse_court_position + NOT = { has_trait = smallpox } + has_relation_nursed_child = root + } + } + } + root = { is_adult = no } + } + } + } + contract_disease_notify_effect = { DISEASE = smallpox } + } + } + 0 = { #Contagion prevented by physician + modifier = { + has_good_disease_treatment_trigger = yes + add = 80 + } + #No contagion this time! + } + } + } + + #Next contagion + trigger_event = { + id = health.1202 + days = { smallpox_contagion_min smallpox_contagion_max } + } + } +} + +#Bubonic plague contagion +health.1203 = { + hidden = yes + + trigger = { + has_trait = bubonic_plague + } + + immediate = { + save_scope_as = disease_spreader + + save_health_court_owner_effect = { SCOPE_NAME = contagion_court_owner } + + if = { + limit = { exists = scope:contagion_court_owner } + + scope:contagion_court_owner = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + + #Add everyone in the same court (ruler, prisoners, guests) and friendly scheme targets/owners to list + create_contagion_list_effect = { SICK_CHARACTER = root CONTAGION_COURT_OWNER = scope:contagion_court_owner } + + + random_list = { + 20 = { #Contagion successful + random_in_list = { + list = contagion_list + weight = { + base = 100 + modifier = { #Proximity increases likelihood of contagion + is_imprisoned = yes + root = { is_imprisoned = yes } + add = 100 + } + modifier = { #Proximity increases likelihood of contagion + is_imprisoned = no + root = { is_imprisoned = no } + add = 100 + } + modifier = { + add = -50 + has_perk = wash_your_hands_perk + } + modifier = { + add = -50 + AND = { + OR = { + liege ?= { + any_court_position_holder ?= { + type = wet_nurse_court_position + NOT = { has_trait = bubonic_plague } + has_relation_nursed_child = root + } + } + root = { + any_court_position_holder ?= { + type = wet_nurse_court_position + NOT = { has_trait = bubonic_plague } + has_relation_nursed_child = root + } + } + } + root = { is_adult = no } + } + } + } + contract_disease_notify_effect = { DISEASE = bubonic_plague } + } + } + 0 = { #Contagion prevented by physician + modifier = { + has_good_disease_treatment_trigger = yes + add = 80 + } + #No contagion this time! + } + } + } + + #Next contagion + trigger_event = { + id = health.1203 + days = { bubonic_plague_contagion_min bubonic_plague_contagion_max } + } + } +} + + + +####################################### +# SEXUAL PARTNER CONTRACTS STD EVENTS # Mathilda Bjarnehed +####################################### + + +#Sexual partner has lover's pox / early great pox +scripted_trigger health_2001_std_from_you_trigger = { + OR = { + has_std_trigger = yes + #Has recently had the disease + has_character_flag = contraction_cooldown_great_pox + } +} + +health.2001 = { + type = character_event + title = health.2001.t + desc = { + desc = health.2001.start.desc + first_valid = { + triggered_desc = { + trigger = { has_std_trigger = no } + desc = health.2001.not_sick.desc + } + triggered_desc = { + trigger = { + health_2001_std_from_you_trigger = yes + } + desc = health.2001.sick.desc + } + } + } + theme = seduction + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + override_icon = { + trigger = { has_relation_soulmate = scope:std_partner } + reference = "gfx/interface/icons/event_types/type_love.dds" + } + override_icon = { + trigger = { is_spouse_of = scope:std_partner } + reference = "gfx/interface/icons/event_types/type_marriage.dds" + } + override_background = { + reference = bedchamber + } + left_portrait = { + character = scope:std_partner + animation = shame + } + + trigger = { + is_playable_character = yes + } + + immediate = { + save_scope_as = other_partner + scope:std_partner = { + show_as_tooltip = { add_trait_force_tooltip = lovers_pox } + } + if = { + limit = { + is_spouse_of = scope:std_partner + has_std_trigger = no + } + scope:std_partner = { + set_variable = { + name = std_from_unfaithfulness_against + value = root + years = 15 + } + } + } + } + + #Force celibacy + option = { + trigger = { + any_consort = { this = scope:std_partner } + } + name = { + trigger = { has_std_trigger = no } + text = health.2001.a.not_sick + } + name = { + trigger = { health_2001_std_from_you_trigger = yes } + text = health.2001.a.sick + } + + show_as_tooltip = { #Actually happens in 2003 + if = { + limit = { has_relation_lover = scope:std_partner } + remove_relation_lover = scope:std_partner + } + scope:std_partner = { + add_character_modifier = { + modifier = rejected_from_marriage_bed_modifier + } + } + reverse_add_opinion = { + target = scope:std_partner + modifier = refusal_opinion + opinion = -20 + } + } + + hidden_effect = { + scope:std_partner = { + trigger_event = health.2003 + } + } + + stress_impact = { + compassionate = medium_stress_gain + lustful = minor_stress_gain + forgiving = minor_stress_gain + } + + ai_chance = { + base = 300 + + ai_value_modifier = { + ai_vengefulness = medium_chance_impact_positive_ai_value #200 if positive vengefulness is "high" + ai_compassion = high_chance_impact_negative_ai_value #400 if negative compassion is "high" + } + opinion_modifier = { + opinion_target = scope:std_partner + multiplier = -5 + } + modifier = { + has_trait = paranoid + add = 100 + } + } + } + + #Break up + option = { + trigger = { + NOT = { any_consort = { this = scope:std_partner } } + has_relation_lover = scope:std_partner + } + name = { + trigger = { has_std_trigger = no } + text = health.2001.c.not_sick + } + name = { + trigger = { health_2001_std_from_you_trigger = yes } + text = health.2001.c.sick + } + + show_as_tooltip = { #Really happens in 2003 + remove_relation_lover = scope:std_partner + reverse_add_opinion = { + target = scope:std_partner + modifier = refusal_opinion + opinion = -20 + } + } + + hidden_effect = { + scope:std_partner = { + trigger_event = health.2003 + } + } + + stress_impact = { + compassionate = medium_stress_gain + lustful = minor_stress_gain + forgiving = minor_stress_gain + } + + ai_chance = { + base = 400 + + ai_value_modifier = { + ai_vengefulness = medium_chance_impact_positive_ai_value #200 if positive vengefulness is "high" + ai_compassion = high_chance_impact_negative_ai_value #400 if negative compassion is "high" + } + opinion_modifier = { + opinion_target = scope:std_partner + multiplier = -5 + } + modifier = { + has_trait = paranoid + add = 100 + } + } + } + + #Forgive + option = { + name = { + trigger = { has_std_trigger = no } + text = health.2001.d.not_sick + } + name = { + trigger = { health_2001_std_from_you_trigger = yes } + text = health.2001.d.sick + } + if = { + limit = { + health_2001_std_from_you_trigger = yes + } + custom_tooltip = health.2001.c.tt_sick + } + else = { + custom_tooltip = health.2001.c.tt + } + + stress_impact = { + paranoid = major_stress_gain + vengeful = medium_stress_gain + } + + ai_chance = { + base = 150 + } + } +} + +#It turns out the blisters were actually Great Pox! +health.2002 = { + type = character_event + title = health.2002.t + desc = { + desc = health.2002.start.desc + triggered_desc = { + trigger = { has_trait = early_great_pox } + desc = health.2002.early_great_pox.desc + } + } + theme = seduction + override_icon = { + trigger = { has_relation_soulmate = scope:std_partner } + reference = "gfx/interface/icons/event_types/type_love.dds" + } + override_icon = { + trigger = { is_spouse_of = scope:std_partner } + reference = "gfx/interface/icons/event_types/type_marriage.dds" + } + left_portrait = { + character = scope:std_partner + animation = shame + } + + trigger = { + is_playable_character = yes + } + + immediate = { + play_music_cue = "mx_cue_stress" + save_scope_as = other_partner + scope:std_partner = { + show_as_tooltip = { add_trait_force_tooltip = great_pox } + } + } + + #Force celibacy + option = { + trigger = { #Non-rejected consort + any_consort = { this = scope:std_partner } + NOT = { scope:std_partner = { has_character_modifier = rejected_from_marriage_bed_modifier } } + } + name = { + trigger = { has_std_trigger = no } + text = health.2002.a.not_sick + } + name = { + trigger = { has_std_trigger = yes } + text = health.2002.a.sick + } + + + show_as_tooltip = { #Actually happens in 2003 + if = { + limit = { has_relation_lover = scope:std_partner } + remove_relation_lover = scope:std_partner + } + scope:std_partner = { + add_character_modifier = { + modifier = rejected_from_marriage_bed_modifier + } + } + reverse_add_opinion = { + target = scope:std_partner + modifier = refusal_opinion + opinion = -20 + } + } + + hidden_effect = { + scope:std_partner = { + trigger_event = health.2003 + } + } + + stress_impact = { + compassionate = minor_stress_gain + lustful = minor_stress_gain + forgiving = minor_stress_gain + } + + ai_chance = { + base = 300 + + ai_value_modifier = { + ai_vengefulness = medium_chance_impact_positive_ai_value #200 if positive vengefulness is "high" + ai_compassion = high_chance_impact_negative_ai_value #400 if negative compassion is "high" + } + opinion_modifier = { + opinion_target = scope:std_partner + multiplier = -5 + } + modifier = { + has_trait = paranoid + add = 100 + } + } + } + + #Break up + option = { + trigger = { #Lover + NOT = { any_consort = { this = scope:std_partner } } + has_relation_lover = scope:std_partner + } + name = { + trigger = { has_std_trigger = no } + text = health.2002.b.not_sick + } + name = { + trigger = { health_2001_std_from_you_trigger = yes } + text = health.2002.b.sick + } + + show_as_tooltip = { #Really happens in 2003 + remove_relation_lover = scope:std_partner + reverse_add_opinion = { + target = scope:std_partner + modifier = refusal_opinion + opinion = -20 + } + } + + hidden_effect = { + scope:std_partner = { + trigger_event = health.2003 + } + } + + stress_impact = { + compassionate = minor_stress_gain + lustful = minor_stress_gain + forgiving = minor_stress_gain + } + + ai_chance = { + base = 400 + + ai_value_modifier = { + ai_vengefulness = medium_chance_impact_positive_ai_value #200 if positive vengefulness is "high" + ai_compassion = high_chance_impact_negative_ai_value #400 if negative compassion is "high" + } + opinion_modifier = { + opinion_target = scope:std_partner + multiplier = -5 + } + modifier = { + has_trait = paranoid + add = 100 + } + } + } + + #Still forgive + option = { + trigger = { + OR = { + AND = { # Lover + NOT = { any_consort = { this = scope:std_partner } } + has_relation_lover = scope:std_partner + } + AND = { # Non-rejected consort + any_consort = { this = scope:std_partner } + NOT = { scope:std_partner = { has_character_modifier = rejected_from_marriage_bed_modifier } } + } + } + } + name = health.2002.c + custom_tooltip = health.2001.c.tt + + stress_impact = { + paranoid = major_stress_gain + vengeful = major_stress_gain + } + + ai_chance = { + base = 50 + } + } + + #Already rejected, phew + option = { + trigger = { #Rejected consort + any_consort = { this = scope:std_partner } + scope:std_partner = { has_character_modifier = rejected_from_marriage_bed_modifier } + } + name = { + trigger = { has_std_trigger = no } + text = health.2002.d.not_sick + } + name = { + trigger = { health_2001_std_from_you_trigger = yes } + text = health.2002.d.sick + } + } + + after = { + hidden_effect = { #Treatments handled separatley + if = { + limit = { root_picks_treatment_for_sick_character_trigger = yes } + trigger_event = { + id = health.3102 #I decide + days = { 5 10 } + } + } + } + } +} + +#Dumped/rejected from marriage bed because of STD +health.2003 = { + type = character_event + title = health.2003.t + desc = { + desc = health.2003.start.desc + first_valid = { + triggered_desc = { + trigger = { any_consort = { this = scope:other_partner } } + desc = health.2003.consort.desc + } + triggered_desc = { + trigger = { NOT = { any_consort = { this = scope:other_partner } } } + desc = health.2003.lover.desc + } + } + } + theme = seduction + override_icon = { + trigger = { has_relation_soulmate = scope:std_partner } + reference = "gfx/interface/icons/event_types/type_love.dds" + } + override_icon = { + trigger = { is_spouse_of = scope:std_partner } + reference = "gfx/interface/icons/event_types/type_marriage.dds" + } + left_portrait = { + character = scope:other_partner + animation = disgust + } + + immediate = { + play_music_cue = "mx_cue_prison" + } + + option = { + name = health.2003.a + + if = { + limit = { + has_relation_lover = scope:other_partner + } + remove_relation_lover = scope:other_partner + } + if = { + limit = { + any_consort = { this = scope:other_partner } + } + add_character_modifier = { + modifier = rejected_from_marriage_bed_modifier + } + } + reverse_add_opinion = { + target = scope:other_partner + modifier = refusal_opinion + opinion = -20 + } + } +} + +############################### +# CONTAGIOUS DISEASE AT COURT # Mathilda Bjarnehed +############################### + +#Courtier/guest/prisoner has contagious disease +health.2101 = { + type = character_event + title = health.2101.t + orphan = yes + desc = { + first_valid = { + triggered_desc = { #Smallpox outbreak! + trigger = { + scope:disease_type = flag:smallpox + } + desc = health.2101.smallpox_outbreak.desc + } + triggered_desc = { #Smallpox spreads + trigger = { + scope:disease_type = flag:smallpox + } + desc = health.2101.smallpox_spreads.desc + } + triggered_desc = { #Bubonic plague outbreak! + trigger = { + scope:disease_type = flag:bubonic_plague + } + desc = health.2101.bubonic_plague_outbreak.desc + } + triggered_desc = { #Bubonic plague spreads + trigger = { + scope:disease_type = flag:bubonic_plague + } + desc = health.2101.bubonic_plague_spreads.desc + } + triggered_desc = { #Typhus outbreak! + trigger = { + scope:disease_type = flag:typhus + } + desc = health.2101.typhus_outbreak.desc + } + triggered_desc = { #Typhus spreads + trigger = { + scope:disease_type = flag:typhus + } + desc = health.2101.typhus_spreads.desc + } + triggered_desc = { #Consumption outbreak! + trigger = { + scope:disease_type = flag:consumption + } + desc = health.2101.consumption_outbreak.desc + } + triggered_desc = { #Consumption spreads + trigger = { + scope:disease_type = flag:consumption + } + desc = health.2101.consumption_spreads.desc + } + triggered_desc = { #Measles outbreak! + trigger = { + scope:disease_type = flag:measles + } + desc = health.2101.measles_outbreak.desc + } + triggered_desc = { #Measles spreads + trigger = { + scope:disease_type = flag:measles + } + desc = health.2101.measles_spreads.desc + } + triggered_desc = { #Dysentery outbreak! + trigger = { + scope:disease_type = flag:dysentery + } + desc = health.2101.dysentery_outbreak.desc + } + triggered_desc = { #Dysentery spreads + trigger = { + scope:disease_type = flag:dysentery + } + desc = health.2101.dysentery_spreads.desc + } + triggered_desc = { #Ergotism outbreak! + trigger = { + scope:disease_type = flag:ergotism + } + desc = health.2101.ergotism_outbreak.desc + } + triggered_desc = { #Ergotism spreads + trigger = { + scope:disease_type = flag:ergotism + } + desc = health.2101.ergotism_spreads.desc + } + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + is_spouse_of = scope:sick_character + is_child_of = scope:sick_character + is_parent_of = scope:sick_character + AND = { + exists = scope:sick_character + player_heir = scope:sick_character + } + } + } + desc = health.2101.imporant.desc #It's someone important + } + triggered_desc = { + trigger = { scope:sick_character = { is_imprisoned = yes } } + desc = health.2101.prisoner.desc #It's a prisoner + } + desc = health.2101.courtier_or_guest.desc #It's a courtier/guest + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + AND = { + scope:disease_type = flag:smallpox + has_character_flag = disease_immunity_smallpox + } + AND = { + scope:disease_type = flag:bubonic_plague + has_character_flag = disease_immunity_bubonic_plague + } + } + } + desc = health.2101.immune.desc #I'm immune + } + desc = health.2101.not_immune.desc #I'm not immune + } + triggered_desc = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = scope:physician + } + desc = health.2201.court_physician.desc_sick_physician + } + desc = health.2201.court_physician.desc + } + } + } + } + theme = healthcare + override_background = { + trigger = { scope:sick_character ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:sick_character + animation = sick + } + right_portrait = { + trigger = { scope:sick_character != scope:physician } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + animation = personality_rational + } + + immediate = { + play_music_cue = "mx_cue_illness" + #Show physician portrait if you're picking the sick character's treatment + hidden_effect = { + if = { + limit = { + root_picks_treatment_for_sick_character_trigger = yes + } + save_court_physician_as_effect = { SCOPE_NAME = physician } + } + } + scope:sick_character.location ?= { save_scope_as = background_terrain_scope } + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + court_physician_available_trigger = no + } + name = health.3101.e + + name = { + trigger = { scope:sick_character = scope:physician } + text = health.3101.e_sick_physician + } + find_court_physician_effect = yes + ai_chance = { base = 100 } + } + + #Isolate them and hope for the best (generic option) + option = { + trigger = { + NAND = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + } + name = health.2101.a + if = { + limit = { court_physician_available_trigger = no } + custom_tooltip = health.2101.a.tt + } + ai_chance = { base = 10 } + } + + ###COURT PHYSICIAN OPTIONS### + #Safe + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = health.3102.a + safe_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = health.3102.b + risky_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + scope:physician = { has_trait = lifestyle_mystic } + } + name = { + trigger = { scope:sick_character = scope:physician } + text = health.3102.c_sick_physician + } + name = health.3102.c + mystic_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = health.3102.d + deny_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 0 } + } + + #Let them pick + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = yes } + scope:sick_character != scope:physician + } + } + text = health.3102.e_adult + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = no } + scope:sick_character = scope:physician + } + } + text = health.3102.e_child + } + scope:sick_character = { pick_own_disease_treatment_effect = yes } + ai_chance = { base = 0 } + } + + #Release them + option = { + trigger = { + scope:sick_character = { + is_imprisoned = yes + NOT = { is_courtier_of = root } + } + root_picks_treatment_for_sick_character_trigger = no + } + name = health.2101.c + scope:sick_character = { release_from_prison = yes } + } +} + +#There is no longer an outbreak! (send by story) +health.2102 = { #by Mathilda Bjarnehed + type = character_event + title = health.2102.t + orphan = yes + desc = { + desc = health.2102.start1.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:disease_type + scope:disease_type = flag:smallpox + } + desc = health.2102.smallpox.desc + } + triggered_desc = { + trigger = { + exists = scope:disease_type + scope:disease_type = flag:bubonic_plague + } + desc = health.2102.bubonic_plague.desc + } + } + desc = health.2102.start2.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:physician } + desc = health.2102.physician.desc + } + desc = health.2102.no_physician.desc + } + #Extra bits about specific people dying + first_valid = { + triggered_desc = { + desc = health.2102.2_victims.desc + } + triggered_desc = { + desc = health.2102.1_victim.desc + } + triggered_desc = { + desc = health.2102.root_victim.desc + } + } + } + theme = recovery + left_portrait = scope:left_portrait + right_portrait = scope:right_portrait + + immediate = { + play_music_cue = "mx_cue_peace_ensues" + } + + option = { + } +} + +#################################### +# SOMEONE IMPORTANT TO YOU IS SICK # Mathilda Bjarnehed +#################################### + +#Someone important to you is sick. If you're their liege and you have a court physician, you may chose their treatment. +#Triggered by the contract_disease_effect +health.2201 = { + type = character_event + title = health.2201.t + desc = { + desc = health.2201.start.desc + triggered_desc = { + trigger = { scope:disease_type = flag:ill } + desc = disease_ill_article + } + first_valid = { #Disease type + triggered_desc = { + trigger = { scope:disease_type = flag:ill } + desc = disease_ill + } + triggered_desc = { + trigger = { scope:disease_type = flag:pneumonic } + desc = disease_pneumonic + } + triggered_desc = { + trigger = { scope:disease_type = flag:gout_ridden } + desc = disease_gout_ridden + } + triggered_desc = { + trigger = { scope:disease_type = flag:leper } + desc = disease_leper + } + triggered_desc = { + trigger = { scope:disease_type = flag:typhus } + desc = disease_typhus + } + triggered_desc = { + trigger = { scope:disease_type = flag:consumption } + desc = disease_consumption + } + triggered_desc = { + trigger = { scope:disease_type = flag:cancer } + desc = disease_cancer + } + triggered_desc = { + trigger = { scope:disease_type = flag:lovers_pox } + desc = disease_lovers_pox + } + triggered_desc = { + trigger = { scope:disease_type = flag:great_pox } + desc = disease_great_pox + } + triggered_desc = { + trigger = { scope:disease_type = flag:smallpox } + desc = disease_smallpox + } + triggered_desc = { + trigger = { scope:disease_type = flag:bubonic_plague } + desc = disease_bubonic_plague + } + triggered_desc = { + trigger = { scope:disease_type = flag:measles } + desc = disease_measles + } + triggered_desc = { + trigger = { scope:disease_type = flag:dysentery } + desc = disease_dysentery + } + triggered_desc = { + trigger = { scope:disease_type = flag:ergotism } + desc = disease_ergotism + } + desc = missing_illness + } + first_valid = { + triggered_desc = { #Normally not bad, now worried + trigger = { + OR = { + scope:disease_type = flag:ill + scope:disease_type = flag:gout_ridden + scope:disease_type = flag:lovers_pox + scope:disease_type = flag:early_great_pox + } + } + desc = health.2201.minor_disease.desc + } + triggered_desc = { #Leprosy + trigger = { scope:disease_type = flag:leper } + desc = health.2201.leprosy.desc + } + triggered_desc = { #Lethal + trigger = { + OR = { + scope:disease_type = flag:cancer + scope:disease_type = flag:bubonic_plague + } + } + desc = health.2201.lethal_disease.desc + } + desc = health.2201.major_disease.desc #Ther rest, dangerous stuff but with a ~50%+ chance of survival + } + triggered_desc = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = scope:physician + } + desc = health.2201.court_physician.desc_sick_physician + } + desc = health.2201.court_physician.desc + } + } + } + } + theme = healthcare + override_background = { + trigger = { scope:sick_character ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_background = { + trigger = { scope:sick_character ?= { is_travelling = no } } + reference = bedchamber + } + left_portrait = { + character = scope:sick_character + animation = sick + } + #Show physician portrait if you're picking the sick character's treatment + right_portrait = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + scope:sick_character != scope:physician + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + animation = personality_rational + } + + trigger = { + scope:sick_character = { + is_alive = yes + trigger_if = { + limit = { is_imprisoned = yes } + is_imprisoned_by = root + } + } + } + + immediate = { + show_as_tooltip = { + if = { + limit = { scope:disease_type = flag:ill } + scope:sick_character = { add_trait_force_tooltip = ill } + } + else_if = { + limit = { scope:disease_type = flag:pneumonic } + scope:sick_character = { add_trait_force_tooltip = pneumonic } + } + if = { + limit = { scope:disease_type = flag:leper } + scope:sick_character = { add_trait_force_tooltip = leper } + } + else_if = { + limit = { scope:disease_type = flag:typhus } + scope:sick_character = { add_trait_force_tooltip = typhus } + } + if = { + limit = { scope:disease_type = flag:consumption } + scope:sick_character = { add_trait_force_tooltip = consumption } + } + else_if = { + limit = { scope:disease_type = flag:cancer } + scope:sick_character = { add_trait_force_tooltip = cancer } + } + if = { + limit = { scope:disease_type = flag:lovers_pox } + scope:sick_character = { add_trait_force_tooltip = lovers_pox } + } + else_if = { + limit = { scope:disease_type = flag:early_great_pox } + scope:sick_character = { add_trait_force_tooltip = early_great_pox } + } + if = { + limit = { scope:disease_type = flag:great_pox } + scope:sick_character = { add_trait_force_tooltip = great_pox } + } + else_if = { + limit = { scope:disease_type = flag:smallpox } + scope:sick_character = { add_trait_force_tooltip = smallpox } + } + if = { + limit = { scope:disease_type = flag:bubonic_plague } + scope:sick_character = { add_trait_force_tooltip = bubonic_plague } + } + else_if = { + limit = { scope:disease_type = flag:measles } + scope:sick_character = { add_trait_force_tooltip = measles } + } + else_if = { + limit = { scope:disease_type = flag:dysentery } + scope:sick_character = { add_trait_force_tooltip = dysentery } + } + else_if = { + limit = { scope:disease_type = flag:ergotism } + scope:sick_character = { add_trait_force_tooltip = ergotism } + } + } + + save_court_physician_as_effect = { SCOPE_NAME = physician } + scope:sick_character.location ?= { save_scope_as = background_terrain_scope } + } + + ###COURT PHYSICIAN OPTIONS### + #Safe + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = health.3102.a + safe_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = health.3102.b + risky_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + scope:physician = { has_trait = lifestyle_mystic } + } + name = { + trigger = { scope:sick_character = scope:physician } + text = health.3102.c_sick_physician + } + name = health.3102.c + mystic_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = health.3102.d + deny_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 0 } + } + + #Let them pick + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = yes } + scope:sick_character != scope:physician + } + } + text = health.3102.e_adult + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = no } + scope:sick_character = scope:physician + } + } + text = health.3102.e_child + } + scope:sick_character = { pick_own_disease_treatment_effect = yes } + ai_chance = { base = 0 } + } + + ###NO COURT PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + court_physician_available_trigger = no + root_picks_treatment_for_sick_character_trigger = yes + } + name = { + trigger = { + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + text = health.3101.e + } + name = { + trigger = { + OR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + text = health.3101.e.already_looking + } + if = { + limit = { + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + find_court_physician_effect = yes + } + else = { + custom_tooltip = health_3101_already_looking_tt + } + ai_chance = { base = 1 } + } + + #Nothing to do + option = { + trigger = { + NAND = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + NOR = { + has_character_flag = seeking_epidemic_treatment + has_character_flag = searching_for_physician + } + } + name = health.2201.a + ai_chance = { base = 10 } + } +} + +scripted_trigger health_2202_happy_recovery_trigger = { + OR = { + has_relation_lover = scope:sick_character + has_relation_friend = scope:sick_character + has_relation_best_friend = scope:sick_character + has_relation_soulmate = scope:sick_character + AND = { + scope:sick_character = { + opinion = { + target = root + value > 0 + } + is_of_major_interest_to_root_trigger = yes + } + } + } +} + +scripted_trigger health_2202_angry_recovery_trigger = { + OR = { + has_relation_rival = scope:sick_character + has_relation_nemesis = scope:sick_character + scope:sick_character = { + opinion = { + target = root + value < -35 + } + } + } +} + +scripted_trigger health_2202_contagious_recovery_trigger = { + OR = { + any_courtier_or_guest = { this = scope:sick_character } + any_prisoner = { this = scope:sick_character } + } + OR = { + scope:disease_type = flag:smallpox + scope:disease_type = flag:bubonic_plague + } +} + + +########################################################## +# SOMEONE IMPORTANT/CONTAGIOUS/STD PARTNER HAS RECOVERED # By Mathilda Bjarnehed & Veronica Pazos +########################################################## + +health.2202 = { + type = character_event + title = health.2202.t + desc = { + desc = health.2202.desc + triggered_desc = { + trigger = { scope:disease_type = flag:ill } + desc = disease_ill_article + } + first_valid = { #Disease type + triggered_desc = { + trigger = { scope:disease_type = flag:ill } + desc = disease_ill + } + triggered_desc = { + trigger = { scope:disease_type = flag:pneumonic } + desc = disease_pneumonic + } + triggered_desc = { + trigger = { scope:disease_type = flag:gout_ridden } + desc = disease_gout_ridden + } + triggered_desc = { + trigger = { scope:disease_type = flag:leper } + desc = disease_leper + } + triggered_desc = { + trigger = { scope:disease_type = flag:typhus } + desc = disease_typhus + } + triggered_desc = { + trigger = { scope:disease_type = flag:consumption } + desc = disease_consumption + } + triggered_desc = { + trigger = { scope:disease_type = flag:cancer } + desc = disease_cancer + } + triggered_desc = { + trigger = { scope:disease_type = flag:lovers_pox } + desc = disease_lovers_pox + } + triggered_desc = { + trigger = { scope:disease_type = flag:great_pox } + desc = disease_great_pox + } + triggered_desc = { + trigger = { scope:disease_type = flag:smallpox } + desc = disease_smallpox + } + triggered_desc = { + trigger = { scope:disease_type = flag:bubonic_plague } + desc = disease_bubonic_plague + } + triggered_desc = { + trigger = { scope:disease_type = flag:measles } + desc = disease_measles + } + triggered_desc = { + trigger = { scope:disease_type = flag:ergotism } + desc = disease_ergotism + } + triggered_desc = { + trigger = { scope:disease_type = flag:dysentery } + desc = disease_dysentery + } + desc = missing_illness + } + first_valid = { #Are you happy about this? + triggered_desc = { + trigger = { + health_2202_happy_recovery_trigger = yes + } + desc = health.2202.desc.happy + } + triggered_desc = { + trigger = { + health_2202_happy_recovery_trigger = no + health_2202_angry_recovery_trigger = yes + } + desc = health.2202.desc.angry + } + triggered_desc = { + trigger = { + health_2202_happy_recovery_trigger = no + health_2202_angry_recovery_trigger = no + health_2202_contagious_recovery_trigger = yes + } + desc = health.2202.desc.relieved + } + triggered_desc = { + trigger = { + health_2202_happy_recovery_trigger = no + health_2202_angry_recovery_trigger = no + health_2202_contagious_recovery_trigger = no + } + desc = health.2202.desc.neutral + } + } + } + theme = recovery + override_background = { reference = relaxing_room } + left_portrait = { + character = root + triggered_animation = { + trigger = { + health_2202_happy_recovery_trigger = no + health_2202_angry_recovery_trigger = yes + } + animation = rage + } + animation = personality_compassionate + } + right_portrait = { + character = scope:sick_character + animation = happiness + } + + trigger = { + scope:sick_character = { is_alive = yes } + } + + immediate = { + show_as_tooltip = { + if = { + limit = { scope:disease_type = flag:ill } + scope:sick_character = { remove_trait_force_tooltip = ill } + } + else_if = { + limit = { scope:disease_type = flag:pneumonic } + scope:sick_character = { remove_trait_force_tooltip = pneumonic } + } + if = { + limit = { scope:disease_type = flag:leper } + scope:sick_character = { remove_trait_force_tooltip = leper } + } + else_if = { + limit = { scope:disease_type = flag:typhus } + scope:sick_character = { remove_trait_force_tooltip = typhus } + } + if = { + limit = { scope:disease_type = flag:consumption } + scope:sick_character = { remove_trait_force_tooltip = consumption } + } + else_if = { + limit = { scope:disease_type = flag:cancer } + scope:sick_character = { remove_trait_force_tooltip = cancer } + } + if = { + limit = { scope:disease_type = flag:lovers_pox } + scope:sick_character = { remove_trait_force_tooltip = lovers_pox } + } + else_if = { + limit = { scope:disease_type = flag:early_great_pox } + scope:sick_character = { remove_trait_force_tooltip = early_great_pox } + } + if = { + limit = { scope:disease_type = flag:great_pox } + scope:sick_character = { remove_trait_force_tooltip = great_pox } + } + else_if = { + limit = { scope:disease_type = flag:smallpox } + scope:sick_character = { remove_trait_force_tooltip = smallpox } + } + if = { + limit = { scope:disease_type = flag:bubonic_plague } + scope:sick_character = { remove_trait_force_tooltip = bubonic_plague } + } + else_if = { + limit = { scope:disease_type = flag:measles } + scope:sick_character = { remove_trait_force_tooltip = measles } + } + else_if = { + limit = { scope:disease_type = flag:dysentery } + scope:sick_character = { remove_trait_force_tooltip = dysentery } + } + else_if = { + limit = { scope:disease_type = flag:ergotism } + scope:sick_character = { remove_trait_force_tooltip = ergotism } + } + } + } + + option = { + name = { #So happy! + trigger = { health_2202_happy_recovery_trigger = yes } + text = health.2202.a.happy + } + + name = { #So angry! + trigger = { + health_2202_happy_recovery_trigger = no + health_2202_angry_recovery_trigger = yes + } + text = health.2202.a.angry + } + + name = { #So relieved! + trigger = { + health_2202_happy_recovery_trigger = no + health_2202_angry_recovery_trigger = no + health_2202_contagious_recovery_trigger = yes + } + text = health.2202.a.relieved + } + + name = { #So neutral... + trigger = { + health_2202_happy_recovery_trigger = no + health_2202_angry_recovery_trigger = no + health_2202_contagious_recovery_trigger = no + } + text = health.2202.a.neutral + } + + if = { + limit = { + OR = { + scope:disease_type = flag:lovers_pox + scope:disease_type = flag:early_great_pox + scope:disease_type = flag:great_pox + } + scope:sick_character = { + has_std_trigger = no + has_character_modifier = rejected_from_marriage_bed_modifier + } + } + scope:sick_character = { + remove_character_modifier = rejected_from_marriage_bed_modifier + } + } + } +} + +########################## +########################## +# COURT PHYSICIAN EVENTS # +########################## +########################## + + +######################## +# PICK COURT PHYSICIAN # +######################## + +scripted_trigger health_3001_physician_basic_requirements_trigger = { + is_adult = yes + is_imprisoned = no + is_alive = yes # Because apparently there can be dead characters in the pool (remove when fixed) + is_claimant = no # We don't want recruiting physicians to be a cheap way of getting claimants + learning >= low_skill_rating +} + +scripted_trigger health_3001_excellent_skill_physician_trigger = { + health_3001_physician_basic_requirements_trigger = yes + learning >= high_skill_rating # 15 +} + +scripted_trigger health_3001_high_skill_physician_trigger = { + health_3001_physician_basic_requirements_trigger = yes + #Empire/kingdom + trigger_if = { + limit = { + root = { highest_held_title_tier >= tier_kingdom } + } + learning <= very_high_skill_rating # 18 + learning >= decent_skill_rating # 12 + } + #Duchy/county + trigger_else = { + learning <= high_skill_rating # 15 + learning >= medium_skill_rating # 10 + } +} + +scripted_trigger health_3001_low_skill_physician_trigger = { + health_3001_physician_basic_requirements_trigger = yes + # Save mystics for mystic option + NOT = { has_trait = lifestyle_mystic } + #Empire/kingdom + trigger_if = { + limit = { + root = { highest_held_title_tier >= tier_kingdom } + } + learning <= decent_skill_rating # 12 + learning >= mediocre_skill_rating # 8 + } + #Duchy/county + trigger_else = { + learning <= medium_skill_rating # 10 + learning >= low_skill_rating # 5 + } +} + +scripted_trigger health_3001_low_skill_physician_light_trigger = { + health_3001_physician_basic_requirements_trigger = yes + learning >= medium_skill_rating # 10 +} + +scripted_trigger health_3001_mystic_physician_trigger = { + health_3001_physician_basic_requirements_trigger = yes + + #For this one, we add mystic trait if they don't have it if their learning isn't awesome + #Must be suitable mystic + has_trait = lifestyle_mystic + #Empire/kingdom + trigger_if = { + limit = { + root = { highest_held_title_tier >= tier_kingdom } + } + learning >= decent_skill_rating # 12 + NAND = { + has_trait = lifestyle_physician + NOT = { has_trait = lifestyle_mystic } + } + } + #Duchy/county + trigger_else = { + NOR = { + learning > high_skill_rating # 15 + AND = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + } + has_trait = lifestyle_physician + } + learning >= mediocre_skill_rating # 8 + } +} + +#Ruler picking court physician +health.3001 = { + type = character_event + title = { + triggered_desc = { + trigger = { exists = scope:disease_type } + desc = health.3001.disease.t + } + desc = health.3001.t + } + desc = { + first_valid = { + triggered_desc = { + trigger = { has_character_flag = already_sick } + desc = health.3001.already_sick.desc + } + triggered_desc = { + trigger = { has_character_flag = health_3001_hire_physician_decision_text } + desc = health.3001.decision.desc + } + desc = health.3001.fallback_reason.desc + } + } + theme = healthcare + left_portrait = { + character = scope:high_skill_option + animation = physician + } + lower_left_portrait = scope:mystic_option + right_portrait = { + character = scope:low_skill_option + animation = personality_rational + } + lower_right_portrait = scope:excellent_skill_option + + trigger = { #If I lost it before I got this event, I shouldn't get a physician + exists = capital_province + } + + immediate = { + hidden_effect = { + #Find some appropriate options + + if = { #Performance heavy option finding is only for players + limit = { is_ai = no } + + #EXCELLENT SKILL CHARACTER (for learned rulers) + if = { + limit = { + OR = { + has_learning_lifestyle_trait_trigger = yes + learning >= high_skill_rating + } + } + random_pool_character = { + province = capital_province + limit = { + health_3001_excellent_skill_physician_trigger = yes + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + } + alternative_limit = { + health_3001_excellent_skill_physician_trigger = yes + has_trait = lifestyle_physician + } + alternative_limit = { health_3001_excellent_skill_physician_trigger = yes } + weight = { + base = 1 + modifier = { + faith = root.faith + factor = 10 + } + modifier = { + has_trait = lifestyle_mystic + factor = 10 + } + modifier = { + has_trait = lifestyle_herbalist + factor = 10 + } + } + save_scope_as = excellent_skill_option + # Good doctor trait + if = { + limit = { + NOT = { has_trait = lifestyle_physician } + } + add_trait = lifestyle_physician + } + if = { + limit = { + NOT = { + has_trait_xp = { + trait = lifestyle_physician + value >= 10 + } + } + } + add_trait_xp = { + trait = lifestyle_physician + value = { + integer_range = { + min = medium_lifestyle_random_xp_low + max = medium_lifestyle_random_xp_high + } + } + } + } + } + #Backup excellent generation + if = { + limit = { NOT = { exists = scope:excellent_skill_option } } + create_character = { + location = root.capital_province + template = physician_excellent_character_template + save_scope_as = excellent_skill_option + } + } + + # Ensure some medical knowledge + scope:excellent_skill_option ?= { + if = { + limit = { + NOT = { has_trait = lifestyle_physician } + } + add_trait = lifestyle_physician + add_trait_xp = { + trait = lifestyle_physician + value = { + medium_lifestyle_random_xp_high + 100 + } + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_physician + value <= 55 + } + } + add_trait_xp = { + trait = lifestyle_physician + value = { + medium_lifestyle_random_xp_low + 45 + } + } + } + # Bonus herbalist trait chance + random = { + chance = 66 + modifier = { + culture = { has_cultural_parameter = herbalist_traits_more_common } + factor = 2 + } + if = { + limit = { + NOT = { has_trait = lifestyle_herbalist } + } + add_trait = lifestyle_herbalist + } + } + } + } + + #HIGH-SKILL CHARACTER + random_pool_character = { + province = capital_province + limit = { + health_3001_high_skill_physician_trigger = yes + has_trait = lifestyle_physician + NOT = { scope:excellent_skill_option ?= this } + } + alternative_limit = { + health_3001_high_skill_physician_trigger = yes + NOT = { scope:excellent_skill_option ?= this } + } + weight = { + base = 1 + modifier = { + faith = root.faith + factor = 10 + } + modifier = { + has_trait = lifestyle_mystic + factor = 10 + } + modifier = { + has_trait = lifestyle_herbalist + factor = 10 + } + } + save_scope_as = high_skill_option + } + + #Backup high generation + if = { + limit = { NOT = { exists = scope:high_skill_option } } + create_character = { + location = root.capital_province + template = physician_high_character_template + save_scope_as = high_skill_option + } + } + + # Ensure some medical knowledge + scope:high_skill_option ?= { + if = { + limit = { + NOT = { has_trait = lifestyle_physician } + } + add_trait = lifestyle_physician + add_trait_xp = { + trait = lifestyle_physician + value = { + medium_lifestyle_random_xp_low + medium_lifestyle_random_xp_high + } + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_physician + value <= 30 + } + } + add_trait_xp = { + trait = lifestyle_physician + value = { + small_lifestyle_random_xp_low + small_lifestyle_random_xp_high + } + } + } + # Bonus herbalist trait chance + random = { + chance = 33 + modifier = { + culture = { has_cultural_parameter = herbalist_traits_more_common } + factor = 2 + } + if = { + limit = { + NOT = { has_trait = lifestyle_herbalist } + } + add_trait = lifestyle_herbalist + } + } + } + + #LOW-MEDIUM-SKILL CHARACTER + random_pool_character = { + province = root.capital_province + limit = { + health_3001_low_skill_physician_trigger = yes + has_trait = lifestyle_physician + NOT = { scope:excellent_skill_option ?= this } + NOT = { scope:high_skill_option ?= this } + } + alternative_limit = { + health_3001_low_skill_physician_trigger = yes + NOT = { scope:excellent_skill_option ?= this } + NOT = { scope:high_skill_option ?= this } + } + weight = { + base = 1 + modifier = { + faith = root.faith + factor = 10 + } + } + save_scope_as = low_skill_option + } + + #MYSTIC CHARACTER (optional, only if available in pool) + random_pool_character = { + province = root.capital_province + limit = { + health_3001_mystic_physician_trigger = yes + has_trait = lifestyle_physician + NOT = { scope:excellent_skill_option ?= this } + NOT = { scope:high_skill_option ?= this } + NOT = { scope:low_skill_option ?= this } + } + alternative_limit = { + health_3001_mystic_physician_trigger = yes + NOT = { scope:excellent_skill_option ?= this } + NOT = { scope:high_skill_option ?= this } + NOT = { scope:low_skill_option ?= this } + } + weight = { + base = 1 + modifier = { + has_trait = lifestyle_mystic + factor = 100 + } + modifier = { + faith = root.faith + factor = 10 + } + modifier = { + culture = { has_cultural_parameter = mystic_trait_gives_bonuses } + factor = 10 + } + } + save_scope_as = mystic_option + #Set mystic trait if skill is too low + while = { + limit = { + #Empire/kingdom + trigger_if = { + limit = { + root = { highest_held_title_tier >= tier_kingdom } + } + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value <= 60 + } + } + #Duchy/county + trigger_else = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value <= 30 + } + } + } + ai_mystic_lifestyle_rank_up_effect = yes + } + } + } + else = { #Ai get someone simple + random_pool_character = { + province = root.capital_province + limit = { health_3001_low_skill_physician_light_trigger = yes } + weight = { + base = 1 + modifier = { + faith = root.faith + factor = 10 + } + } + save_scope_as = low_skill_option + } + } + + #Backup low generation + if = { + limit = { NOT = { exists = scope:low_skill_option } } + create_character = { + location = root.capital_province + template = physician_low_character_template + save_scope_as = low_skill_option + } + } + + # Ensure some medical knowledge + scope:low_skill_option ?= { + if = { + limit = { + NOT = { has_trait = lifestyle_physician } + } + random = { + chance = 50 + add_trait = lifestyle_physician + add_trait_xp = { + trait = lifestyle_physician + value = { + small_lifestyle_random_xp_low + small_lifestyle_random_xp_high + } + } + } + } + else_if = { + limit = { + has_trait_xp = { + trait = lifestyle_physician + value <= 5 + } + } + add_trait_xp = { + trait = lifestyle_physician + value = { + small_lifestyle_random_xp_low + small_lifestyle_random_xp_high + } + } + } + # Bonus herbalist trait chance + random = { + chance = 10 + modifier = { + culture = { has_cultural_parameter = herbalist_traits_more_common } + factor = 2 + } + if = { + limit = { + NOT = { has_trait = lifestyle_herbalist } + } + add_trait = lifestyle_herbalist + } + } + } + } + } + + #Amazing skill + option = { + trigger = { + exists = scope:excellent_skill_option + is_playable_character = yes #extra check to make sure they haven't lost their status + } + name = health.3001.e + trait = scholar + skill = learning + + custom_tooltip = health.3001.e.aptitude + pay_treasury_or_gold = { + target = scope:excellent_skill_option + value = high_skill_court_physician_cost + } + custom_tooltip = health.3001.a.tt + + set_court_physician_effect = { + EMPLOYER = root + PHYSICIAN = scope:excellent_skill_option + } + + ai_chance = { + factor = 500 + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + + #High skill + option = { + trigger = { + is_playable_character = yes #extra check to make sure they haven't lost their status + exists = scope:high_skill_option #Doesn't exists for AI + } + name = health.3001.a + + custom_tooltip = health.3001.a.aptitude + pay_treasury_or_gold = { + target = scope:high_skill_option + value = high_skill_court_physician_cost + } + custom_tooltip = health.3001.a.tt + + set_court_physician_effect = { + EMPLOYER = root + PHYSICIAN = scope:high_skill_option + } + + ai_chance = { + factor = 100 + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + } + } + + #Low + option = { + trigger = { + is_playable_character = yes #extra check to make sure they haven't lost their status + } + name = health.3001.b + + custom_tooltip = health.3001.b.aptitude + if = { + limit = { + OR = { + is_ai = no + short_term_gold >= low_skill_court_physician_cost #Because AI would never have enough money and everyone would die + } + } + pay_treasury_or_gold = { + target = scope:low_skill_option + value = low_skill_court_physician_cost + } + } + custom_tooltip = health.3001.a.tt + + set_court_physician_effect = { + EMPLOYER = root + PHYSICIAN = scope:low_skill_option + } + + ai_chance = { + factor = 100 + } + } + + #Mystic + option = { + trigger = { + exists = scope:mystic_option + is_playable_character = yes #extra check to make sure they haven't lost their status + } + name = health.3001.c + + custom_tooltip = health.3001.c.aptitude + pay_treasury_or_gold = { + target = scope:mystic_option + value = low_skill_court_physician_cost + } + custom_tooltip = health.3001.a.tt + add_piety = medium_piety_loss + + set_court_physician_effect = { + EMPLOYER = root + PHYSICIAN = scope:mystic_option + } + + stress_impact = { + zealous = minor_stress_impact_gain + } + + hidden_effect = { + scope:mystic_option = { + if = { + limit = { + NOR = { + any_secret = { type = secret_witch } + has_trait = witch + } + } + random = { + chance = 5 + modifier = { + factor = 0 + ai_zeal >= medium_positive_ai_value + } + modifier = { + factor = 2 + ai_zeal <= high_negative_ai_value #high and not medium because mystic traits already remove some ai_zeal + } + give_witch_secret_or_trait_effect = yes + } + } + } + } + + ai_chance = { + factor = 30 + modifier = { + short_term_gold < minor_gold_value + factor = 0 + } + ai_value_modifier = { + ai_zeal = tiny_chance_impact_negative_ai_value + max = 20 + } + } + } + + #None... + option = { + name = { + trigger = { + NOR = { + exists = scope:mystic_option + exists = scope:excellent_skill_option + } + } + text = health.3001.d.two + } + name = { + trigger = { + OR = { + exists = scope:mystic_option + exists = scope:excellent_skill_option + } + } + text = health.3001.d.more + } + custom_tooltip = health.3001.d.tt + + ai_chance = { + factor = 1 + } + } + + after = { + hidden_effect = { + if = { + limit = { + has_character_flag = seeking_epidemic_treatment + exists = court_position:court_physician_court_position + } + court_position:court_physician_court_position = { save_scope_as = physician } + trigger_event = { + id = physician_epidemic_events.1020 + days = 3 + } + } + } + + remove_character_flag = health_3001_hire_physician_decision_text + } +} + + +##################### +# DISEASE TREATMENT # by Mathilda Bjarnehed & additional texts by Milla Isaksson +##################### + +#Who should decide about my treatment? +health.3100 = { + hidden = yes + + trigger = { + has_treatable_disease_trigger = yes + has_recent_treatment_trigger = no + court_physician_available_trigger = yes + } + + immediate = { + set_worst_disease_effect = yes + save_scope_as = sick_character + decide_who_picks_disease_treatment_effect = yes #Sends health.3101 to me or 3102 to liege + } + + on_trigger_fail = { + #No disease/no physician: do nothing (if we hire a new physician, they will treat everyone upon being hired) + #Has a disease but treatment is still active? Try again + if = { + limit = { + has_treatable_disease_trigger = yes + has_recent_treatment_trigger = yes #Only difference + court_physician_available_trigger = yes + } + trigger_event = { id = health.3100 years = 1 } + } + } +} + +#I pick my treatment (court physician was recently hired OR treating after last treatment ran out OR liege let me pick for myself) +health.3101 = { + type = character_event + title = health.3101.t + desc = { + desc = health.3101.start.desc + first_valid = { #Disease type + triggered_desc = { + trigger = { scope:disease_type = flag:ill } + desc = disease_ill + } + triggered_desc = { + trigger = { scope:disease_type = flag:pneumonic } + desc = disease_pneumonic + } + triggered_desc = { + trigger = { scope:disease_type = flag:gout_ridden } + desc = disease_gout_ridden + } + triggered_desc = { + trigger = { scope:disease_type = flag:leper } + desc = disease_leper + } + triggered_desc = { + trigger = { scope:disease_type = flag:typhus } + desc = disease_typhus + } + triggered_desc = { + trigger = { scope:disease_type = flag:consumption } + desc = disease_consumption + } + triggered_desc = { + trigger = { scope:disease_type = flag:cancer } + desc = disease_cancer + } + triggered_desc = { + trigger = { scope:disease_type = flag:lovers_pox } + desc = disease_lovers_pox + } + triggered_desc = { + trigger = { scope:disease_type = flag:great_pox } + desc = disease_great_pox + } + triggered_desc = { + trigger = { scope:disease_type = flag:smallpox } + desc = disease_smallpox + } + triggered_desc = { + trigger = { scope:disease_type = flag:bubonic_plague } + desc = disease_bubonic_plague + } + triggered_desc = { + trigger = { scope:disease_type = flag:measles } + desc = disease_measles + } + triggered_desc = { + trigger = { scope:disease_type = flag:ergotism } + desc = disease_ergotism + } + triggered_desc = { + trigger = { scope:disease_type = flag:dysentery } + desc = disease_dysentery + } + desc = missing_illness + } + random_valid = { + triggered_desc = { + trigger = { + OR = { + OR = { + scope:disease_type = flag:ill + health >= death_chance_starts_health + } + scope:physician = { + NOR = { + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + } + } + } + desc = health.3101.safe_recommendation.desc + } + triggered_desc = { + trigger = { + OR = { + health < death_chance_starts_health + scope:physician = { + NOR = { + has_trait = lifestyle_physician + has_trait = lifestyle_mystic + } + } + } + NOT = { has_trait = lifestyle_mystic } + } + desc = health.3101.risky_recommendation.desc + } + triggered_desc = { + trigger = { + scope:physician = { has_trait = lifestyle_mystic } + } + desc = health.3101.mystic_recommendation.desc + } + } + desc = health.3101.end.desc + } + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = bubonic_plague + has_trait = dysentery + } + } + animation = sick_stomach + } + triggered_animation = { + trigger = { + OR = { + has_trait = typhus + has_trait = measles + } + } + animation = shiver + } + triggered_animation = { + trigger = { + OR = { + has_trait = smallpox + has_trait = ill + has_trait = consumption + } + } + animation = cough + } + animation = worry + } + + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = physician + } + + trigger = { + has_treatable_disease_trigger = yes + court_physician_available_trigger = yes + } + + weight_multiplier = { + base = 1 + } + + immediate = { + hidden_effect = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + set_worst_disease_effect = yes + } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + } + + #Safe + option = { + name = health.3101.a + safe_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky + option = { + name = health.3101.b + risky_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic + option = { + trigger = { + scope:physician = { has_trait = lifestyle_mystic } + } + name = health.3101.c + mystic_disease_treatment_effect = { PATIENT = root TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = health.3101.d + no_disease_treatment_effect = yes + ai_chance = { base = 0 } + } +} + +#Important courtier sick: I pick treatment for them (court physician was recently hired OR treating after last treatment ran out) +health.3102 = { + type = character_event + title = health.3102.t + desc = { + desc = health.3102.preamble + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = scope:physician + } + desc = health.3102.start.desc_sick_physician + } + desc = health.3102.start.desc + } + first_valid = { #Disease type + triggered_desc = { + trigger = { scope:disease_type = flag:ill } + desc = disease_ill + } + triggered_desc = { + trigger = { scope:disease_type = flag:pneumonic } + desc = disease_pneumonic + } + triggered_desc = { + trigger = { scope:disease_type = flag:gout_ridden } + desc = disease_gout_ridden + } + triggered_desc = { + trigger = { scope:disease_type = flag:leper } + desc = disease_leper + } + triggered_desc = { + trigger = { scope:disease_type = flag:typhus } + desc = disease_typhus + } + triggered_desc = { + trigger = { scope:disease_type = flag:consumption } + desc = disease_consumption + } + triggered_desc = { + trigger = { scope:disease_type = flag:cancer } + desc = disease_cancer + } + triggered_desc = { + trigger = { scope:disease_type = flag:lovers_pox } + desc = disease_lovers_pox + } + triggered_desc = { + trigger = { scope:disease_type = flag:great_pox } + desc = disease_great_pox + } + triggered_desc = { + trigger = { scope:disease_type = flag:smallpox } + desc = disease_smallpox + } + triggered_desc = { + trigger = { scope:disease_type = flag:bubonic_plague } + desc = disease_bubonic_plague + } + triggered_desc = { + trigger = { scope:disease_type = flag:measles } + desc = disease_measles + } + triggered_desc = { + trigger = { scope:disease_type = flag:ergotism } + desc = disease_ergotism + } + triggered_desc = { + trigger = { scope:disease_type = flag:dysentery } + desc = disease_dysentery + } + desc = missing_illness + } + desc = health.3102.treatment + } + theme = healthcare + override_background = { + trigger = { scope:sick_character ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:sick_character + animation = sick + } + right_portrait = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + scope:sick_character != scope:physician + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + animation = physician + } + + trigger = { + scope:sick_character = { + has_treatable_disease_trigger = yes + is_alive = yes + } + court_physician_available_trigger = yes + } + + weight_multiplier = { + base = 1 + } + + immediate = { + hidden_effect = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + scope:sick_character = { set_worst_disease_effect = yes } + } + scope:sick_character.location ?= { save_scope_as = background_terrain_scope } + } + + #Safe + option = { + name = health.3102.a + safe_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 10 } + } + + #Risky + option = { + name = health.3102.b + risky_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Mystic + option = { + trigger = { + scope:physician = { has_trait = lifestyle_mystic } + } + name = { + trigger = { scope:sick_character = scope:physician } + text = health.3102.c_sick_physician + } + name = health.3102.c + mystic_disease_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { + base = 0.5 + modifier = { + add = -0.5 + ai_zeal >= 0 + } + } + } + + #No treatment + option = { + name = health.3102.d + deny_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Let them pick + option = { + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = yes } + scope:sick_character != scope:physician + } + } + text = health.3102.e_adult + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = no } + scope:sick_character = scope:physician + } + } + text = health.3102.e_child + } + scope:sick_character = { pick_own_disease_treatment_effect = yes } + ai_chance = { base = 0 } + } +} + + +#SAFE TREATMENT: SUCCESS +health.3103 = { + type = character_event + title = health.3103.t + desc = { + #Treatment type + random_valid = { + desc = health.safe_treatment.1.desc + triggered_desc = { + trigger = { NOT = { has_trait = temperate } } + desc = health.safe_treatment.2.desc + } + desc = health.safe_treatment.3.desc + desc = health.safe_treatment.4.desc + desc = health.safe_treatment.5.desc + triggered_desc = { + trigger = { ai_zeal > 0 } + desc = health.safe_treatment.6.desc + } + triggered_desc = { + trigger = { ai_zeal > 0 } + desc = health.safe_treatment.7.desc + } + desc = health.safe_treatment.8.desc + desc = health.safe_treatment.9.desc + desc = health.safe_treatment.10.desc + desc = health.safe_treatment.11.desc + desc = health.safe_treatment.12.desc + desc = health.safe_treatment.13.desc + desc = health.safe_treatment.14.desc + desc = health.safe_treatment.15.desc + desc = health.safe_treatment.16.desc + desc = health.safe_treatment.17.desc + desc = health.safe_treatment.18.desc + } + desc = health.3103.end.desc + } + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + OR = { + opinion = { + target = root + value >= high_positive_opinion + } + ai_compassion >= medium_positive_compassion + } + } + animation = happiness + } + animation = physician + } + + immediate = { + #Adds modifiers, sends return visit event in 1-5 years, shows a tooltip if physician ranked up + disease_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + + #Message for close relatives + inform_liege_about_disease_treatment_effect = { TREATMENT = safe OUTCOME = success } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + } + + option = { + name = health.3103.a + } + + after = { + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } +} + +#SAFE TREATMENT: FAILURE +scripted_trigger health_failed_physician_fears_trigger = { + scope:physician = { + dread_modified_ai_boldness = { + dreaded_character = root + value <= medium_negative_ai_value + } + } +} + +health.3104 = { + type = character_event + title = health.3104.t + desc = { + #Treatment type + random_valid = { + desc = health.safe_treatment.1.desc + triggered_desc = { + trigger = { NOT = { has_trait = temperate } } + desc = health.safe_treatment.2.desc + } + desc = health.safe_treatment.3.desc + desc = health.safe_treatment.4.desc + desc = health.safe_treatment.5.desc + triggered_desc = { + trigger = { ai_zeal > 0 } + desc = health.safe_treatment.6.desc + } + triggered_desc = { + trigger = { ai_zeal > 0 } + desc = health.safe_treatment.7.desc + } + desc = health.safe_treatment.8.desc + desc = health.safe_treatment.9.desc + desc = health.safe_treatment.10.desc + desc = health.safe_treatment.11.desc + desc = health.safe_treatment.12.desc + desc = health.safe_treatment.13.desc + desc = health.safe_treatment.14.desc + desc = health.safe_treatment.15.desc + desc = health.safe_treatment.16.desc + desc = health.safe_treatment.17.desc + desc = health.safe_treatment.18.desc + } + desc = health.3104.end.desc + } + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_failed_physician_fears_trigger = yes + } + animation = fear + } + animation = shame + } + + immediate = { + #Adds modifiers, sends return visit event in 1-5 years, shows a tooltip if physician ranked up + disease_treatment_results_effect = { TREATMENT = safe OUTCOME = failure } + + #Message for close relatives + inform_liege_about_disease_treatment_effect = { TREATMENT = safe OUTCOME = failure } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + } + + #Ok... + option = { + name = health.3104.a + ai_chance = { + factor = 40 + } + } + + #Imprison! + option = { + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:physician = { is_imprisoned = no } + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = arbitrary + has_trait = paranoid + has_trait = sadistic + has_trait = callous + } + } + trait = wrathful + trait = vengeful + trait = arbitrary + trait = paranoid + trait = sadistic + trait = callous + + name = health.3107.d + + imprison_physician_effect = yes + + ai_chance = { + factor = 30 #Can go up to ~80 for lowest compassion characters and becomes 0 for characters with medium positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #Execute! + option = { + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = arbitrary + has_trait = paranoid + has_trait = sadistic + has_trait = callous + } + } + trait = wrathful + trait = vengeful + trait = arbitrary + trait = paranoid + trait = sadistic + trait = callous + + name = health.3107.e + + execute_physician_effect = yes + + ai_chance = { + factor = 15 #Can go up to ~65 for lowest compassion characters and becomes 0 for characters with low positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + after = { + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } +} + +#RISKY TREATMENT: CRITICAL SUCCESS +scripted_trigger health_successful_physician_happy_for_trigger = { + scope:physician = { + OR = { + opinion = { + target = $CHARACTER$ + value >= high_positive_opinion + } + ai_compassion >= medium_positive_compassion + } + + } +} + +health.3105 = { + type = character_event + title = health.3105.t + desc = { + #Treatment type + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.3.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.6.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.7.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.8.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.9.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:eye + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:amputation } + desc = health.risky_treatment_amputation.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:disfigurement } + desc = health.risky_treatment_disfigurement.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:eye } + desc = health.risky_treatment_eye.1.desc + } + } + desc = health.3105.end.desc + } + + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_successful_physician_happy_for_trigger = { CHARACTER = root } + } + animation = happiness + } + animation = physician + } + + trigger = { + NOT = { scope:disease_type = flag:leper } #blocked in risky_disease_treatment_effect too + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + + #Removes traits, removes body part if the treatment strategy demands it, shows a tooltip if physician ranked up + disease_treatment_results_effect = { TREATMENT = risky OUTCOME = critical_success } + + #Message for close relatives + inform_liege_about_disease_treatment_effect = { TREATMENT = risky OUTCOME = critical_success } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + if = { + limit = { + is_ai = no + scope:disease_type = flag:bubonic_plague + } + add_achievement_global_variable_effect = { + VARIABLE = ce1_not_today_achievement_unlocked + VALUE = yes + } + } + } + + #I am healed! + option = { + name = health.3105.a + } + + after = { + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } +} + +#RISKY TREATMENT: REGULAR SUCCESS +health.3106 = { + type = character_event + title = health.3106.t + desc = { + #Treatment type + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.3.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.6.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.7.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.8.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.9.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:eye + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:amputation } + desc = health.risky_treatment_amputation.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:disfigurement } + desc = health.risky_treatment_disfigurement.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:eye } + desc = health.risky_treatment_eye.1.desc + } + } + desc = health.3106.end.desc + } + + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_successful_physician_happy_for_trigger = { CHARACTER = root } + } + animation = personality_content + } + animation = physician + } + + immediate = { + #Adds modifiers, removes body part if the treatment strategy demands it, sends return visit event in 1-5 years, shows a tooltip if physician ranked up + disease_treatment_results_effect = { TREATMENT = risky OUTCOME = success } + + #Message for close relatives + inform_liege_about_disease_treatment_effect = { TREATMENT = risky OUTCOME = success } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + if = { + limit = { + is_ai = no + scope:disease_type = flag:bubonic_plague + } + add_achievement_global_variable_effect = { + VARIABLE = ce1_not_today_achievement_unlocked + VALUE = yes + } + } + } + + #I feel better! + option = { + name = health.3106.a + } + + after = { + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } +} + +#RISKY TREATMENT: FAILURE +health.3107 = { + type = character_event + title = health.3107.t + desc = { + #Treatment type + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.3.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.6.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.7.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.8.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.risky_treatment_medicine.9.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:eye + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:amputation } + desc = health.risky_treatment_amputation.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:disfigurement } + desc = health.risky_treatment_disfigurement.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:eye } + desc = health.risky_treatment_eye.1.desc + } + } + first_valid = { + triggered_desc = { #Will die right now + trigger = { has_character_flag = die_risky_treatment } + desc = health.3107.death.desc + } + desc = health.3107.end.desc + } + } + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_icon = { + trigger = { has_character_flag = die_risky_treatment } + reference = "gfx/interface/icons/event_types/type_illness.dds" + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_failed_physician_fears_trigger = yes + } + animation = fear + } + animation = shame + } + + trigger = { #They might have died before this is triggered + is_alive = yes + } + + immediate = { + if = { + limit = { has_character_flag = die_risky_treatment } + play_music_cue = "mx_cue_death" + } + else = { + play_music_cue = "mx_cue_illness" + } + #Adds modifiers, removes body part if the treatment strategy demands it, sends return visit event in 1-5 years (unless died), shows a tooltip if physician ranked up + disease_treatment_results_effect = { TREATMENT = risky OUTCOME = failure } + + #Set my opinion here (if forgive/chastise, it is later downgraded to non-crime opinion) + hidden_effect = { add_failed_treatment_of_me_opinions_effect = yes } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + } + + #I'm dying + option = { + trigger = { has_character_flag = die_risky_treatment } + name = health.3107.a + + #Message for close relatives, or punishment event if relative is your liege + inform_liege_about_disease_treatment_effect = { TREATMENT = risky OUTCOME = death } + + death = { + death_reason = death_treatment + killer = scope:physician + } + } + + #Chastise + option = { + trigger = { + NOT = { has_character_flag = die_risky_treatment } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.b + + chastise_physician_effect = yes + inform_liege_about_disease_treatment_effect = { TREATMENT = risky OUTCOME = failure } #Messages my relatives + + ai_chance = { + factor = 30 + modifier = { + scope:physician = { has_character_modifier = chastised_physician_modifier } + add = -20 + } + } + } + + #Forgive + option = { + trigger = { + NOT = { has_character_flag = die_risky_treatment } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.c + + forgive_physician_effect = yes + inform_liege_about_disease_treatment_effect = { TREATMENT = risky OUTCOME = failure } #Messages my relatives + + ai_chance = { + factor = 20 + ai_value_modifier = { + max = 80 + ai_compassion = tiny_chance_impact_positive_ai_value #+50 for max compassionate, -50 for max uncompassionate + ai_vengefulness = low_chance_impact_negative_ai_value #-100 for max vengeful, +100 for max forgiving + } + } + } + + #Imprison! + option = { + trigger = { + NOT = { has_character_flag = die_risky_treatment } + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:physician = { is_imprisoned = no } + } + name = health.3107.d + + imprison_physician_effect = yes + inform_liege_about_disease_treatment_effect = { TREATMENT = risky OUTCOME = failure } #Messages my relatives + + ai_chance = { + factor = 30 #Can go up to ~80 for lowest compassion characters and becomes 0 for characters with medium positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #Execute! + option = { + trigger = { + NOT = { has_character_flag = die_risky_treatment } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.e + + execute_physician_effect = yes + inform_liege_about_disease_treatment_effect = { TREATMENT = risky OUTCOME = failure } #Messages my relatives + + ai_chance = { + factor = 15 #Can go up to ~65 for lowest compassion characters and becomes 0 for characters with low positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #OK (I am not liege and can't punish) + option = { + trigger = { + NOR = { + has_character_flag = die_risky_treatment + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + } + + #Message for close relatives, or punishment event if relative is your liege + inform_liege_about_disease_treatment_effect = { TREATMENT = risky OUTCOME = failure } + } + + after = { + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } +} + + +#MYSTIC TREATMENT: CRITICAL SUCCESS +health.3108 = { + type = character_event + title = health.3108.t + desc = { + first_valid = { + #First, the special outcomes that need their own text + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult_cannibal } + desc = health.mystic_treatment_occult.cannibal.desc + } + triggered_desc = { + trigger = { + var:treatment_strategy = flag:occult_deviant + } + desc = health.mystic_treatment_occult.deviant.desc + } + #If not, take anything + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.3.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.3.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.6.desc + } + } + } + desc = health.3108.end.desc + } + + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { health_successful_physician_happy_for_trigger = { CHARACTER = root } } + animation = happiness + } + animation = physician + } + + trigger = { + NOT = { scope:disease_type = flag:leper } #blocked in mystic_disease_treatment_effect too + } + + immediate = { + play_music_cue = "mx_cue_positive_effect" + + #Removes traits, removes body part if the treatment strategy demands it, shows a tooltip if physician ranked up + disease_treatment_results_effect = { TREATMENT = mystic OUTCOME = critical_success } + + #Message for close relatives + inform_liege_about_disease_treatment_effect = { TREATMENT = mystic OUTCOME = critical_success } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + } + + #I am healed! + option = { + name = health.3108.a + + } + + after = { + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } +} + +#MYSTIC TREATMENT: SUCCESS +health.3109 = { + type = character_event + title = health.3109.t + desc = { + first_valid = { + #First, the special outcomes that need their own text + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult_cannibal } + desc = health.mystic_treatment_occult.cannibal.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult_deviant } + desc = health.mystic_treatment_occult.deviant.desc + } + #If not, take anything + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.3.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.3.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.6.desc + } + } + } + desc = health.3109.end.desc + } + + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { health_successful_physician_happy_for_trigger = { CHARACTER = root } } + animation = happiness + } + animation = physician + } + + immediate = { + #Removes traits, removes body part if the treatment strategy demands it, shows a tooltip if physician ranked up + disease_treatment_results_effect = { TREATMENT = mystic OUTCOME = success } + + #Message for close relatives + inform_liege_about_disease_treatment_effect = { TREATMENT = mystic OUTCOME = success } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + } + + #I am healed! + option = { + name = health.3109.a + + } + + after = { + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } +} + + +#MYSTIC TREATMENT: FAILURE +health.3110 = { + type = character_event + title = health.3110.t + desc = { + first_valid = { + #First, the special outcomes that need their own text + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult_cannibal } + desc = health.mystic_treatment_occult.cannibal.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult_deviant } + desc = health.mystic_treatment_occult.deviant.desc + } + #If not, take anything + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.3.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:occult } + desc = health.mystic_treatment_occult.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.2.desc + } +# triggered_desc = { +# trigger = { var:treatment_strategy = flag:questionable } +# desc = health.mystic_treatment_questionable.3.desc +# } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.4.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.5.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:questionable } + desc = health.mystic_treatment_questionable.6.desc + } + } + } + desc = health.3110.end.desc + } + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_failed_physician_fears_trigger = yes + } + animation = fear + } + animation = shame + } + + immediate = { + #Adds traits/secrets, sends return visit event in 1-5 years (unless died), shows a tooltip if physician ranked up + disease_treatment_results_effect = { TREATMENT = mystic OUTCOME = failure } + + #Set my opinion here (if forgive/chastise, it is later downgraded to non-crime opinion) + hidden_effect = { add_failed_treatment_of_me_opinions_effect = yes } + + #Message for close relatives, or punishment event if relative is your liege + inform_liege_about_disease_treatment_effect = { TREATMENT = mystic OUTCOME = failure } + scope:physician.location ?= { save_scope_as = background_terrain_scope } + } + + #Chastise + option = { + trigger = { + NOT = { has_character_flag = die_risky_treatment } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.b + + chastise_physician_effect = yes + + ai_chance = { + factor = 30 + modifier = { + scope:physician = { has_character_modifier = chastised_physician_modifier } + add = -20 + } + } + } + + #Forgive + option = { + trigger = { + NOT = { has_character_flag = die_risky_treatment } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.c + + forgive_physician_effect = yes + + ai_chance = { + factor = 20 + ai_value_modifier = { + max = 80 + ai_compassion = tiny_chance_impact_positive_ai_value #+50 for max compassionate, -50 for max uncompassionate + ai_vengefulness = low_chance_impact_negative_ai_value #-100 for max vengeful, +100 for max forgiving + } + } + } + + #Imprison! + option = { + trigger = { + NOT = { has_character_flag = die_risky_treatment } + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:physician = { is_imprisoned = no } + } + name = health.3107.d + + imprison_physician_effect = yes + + ai_chance = { + factor = 30 #Can go up to ~80 for lowest compassion characters and becomes 0 for characters with medium positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #Execute! + option = { + trigger = { + NOT = { has_character_flag = die_risky_treatment } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.e + + execute_physician_effect = yes + + ai_chance = { + factor = 15 #Can go up to ~65 for lowest compassion characters and becomes 0 for characters with low positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #OK (I am not liege and can't punish) + option = { + trigger = { + NOR = { + has_character_flag = die_risky_treatment + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + } + } + + after = { + hidden_effect = { + if = { + limit = { + has_global_variable = tutorial_completed + } + add_character_flag = force_court_positions_tutorial + } + } + } +} + + +########################################### +# FAILED TREATMENT FOR IMPORTANT COURTIER # by Mathilda Bjarnehed and Linnéa Thimrén +########################################### + +#Failed risky treatment +health.3200 = { + type = character_event + title = health.3107.t + desc = { + first_valid = { + triggered_desc = { #Dead! + trigger = { scope:outcome = flag:death } + desc = health.3200.death.desc + } + desc = { + random_valid = { + triggered_desc = { + trigger = { + scope:physician = scope:sick_character + } + desc = health.3200.failure.desc_3 + } + desc = health.3200.failure.desc_2 + desc = health.3200.failure.desc + } + } + } + triggered_desc = { + trigger = { scope:sick_character != scope:physician } + desc = health.3200.end.desc + } + } + theme = healthcare + override_background = { + trigger = { scope:sick_character ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + override_icon = { + trigger = { scope:outcome = flag:death } + reference = "gfx/interface/icons/event_types/type_illness.dds" + } + left_portrait = { + character = scope:sick_character + animation = sick + } + right_portrait = { + trigger = { scope:sick_character != scope:physician } + character = scope:physician + triggered_animation = { + trigger = { + health_failed_physician_fears_trigger = yes + } + animation = fear + } + animation = shame + } + + + immediate = { + scope:sick_character.location ?= { save_scope_as = background_terrain_scope } + if = { + limit = { NOT = { scope:outcome = flag:death } } + if = { + limit = { scope:disease_or_wound = flag:disease } + disease_treatment_result_tooltip_effect = { TREATMENT = risky OUTCOME = failure } + } + else_if = { + limit = { scope:disease_or_wound = flag:wound } + wound_treatment_result_tooltip_effect = { TREATMENT = risky OUTCOME = failure } + } + } + else = { + show_as_tooltip = { + play_music_cue = "mx_cue_death" + scope:sick_character = { + death = { + death_reason = death_treatment + killer = scope:physician + } + } + } + } + } + + #Chastise + option = { + name = health.3107.b + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:sick_character != scope:physician + } + + chastise_physician_effect = yes + + ai_chance = { + factor = 30 + modifier = { + scope:physician = { has_character_modifier = chastised_physician_modifier } + add = -20 + } + } + } + + #Forgive + option = { + name = health.3107.c + trigger = { scope:sick_character != scope:physician } + + forgive_physician_effect = yes + + ai_chance = { + factor = 20 + ai_value_modifier = { + max = 80 + ai_compassion = tiny_chance_impact_positive_ai_value #+50 for max compassionate, -50 for max uncompassionate + ai_vengefulness = low_chance_impact_negative_ai_value #-100 for max vengeful, +100 for max forgiving + } + } + } + + #Imprison! + option = { + name = health.3107.d + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:physician = { is_imprisoned = no } + scope:sick_character != scope:physician + } + + imprison_physician_effect = yes + + ai_chance = { + factor = 30 #Can go up to ~80 for lowest compassion characters and becomes 0 for characters with medium positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #Execute! + option = { + name = health.3107.e + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:sick_character != scope:physician + } + + execute_physician_effect = yes + + ai_chance = { + factor = 15 #Can go up to ~65 for lowest compassion characters and becomes 0 for characters with low positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #They treated themselves... + option = { + name = health.3107.f + trigger = { + scope:sick_character = scope:physician + } + + chastise_physician_effect = yes + + ai_chance = { #Will be only option available if it's available + base = 100 + } + } +} + +#Failed mystic treatment +health.3201 = { + type = character_event + title = health.3107.t + desc = { + desc = health.3201.desc + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = { + var:treatment_strategy = flag:occult + var:treatment_strategy = flag:occult_cannibal + var:treatment_strategy = flag:occult_deviant + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = scope:physician + } + desc = health.3201.occult.desc_sick_physician + } + desc = health.3201.occult.desc + } + } + } + desc = health.3201.questionable.desc + } + } + theme = healthcare + override_background = { + trigger = { scope:sick_character ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:sick_character + animation = stress + } + right_portrait = { + trigger = { scope:sick_character != scope:physician } + character = scope:physician + triggered_animation = { + trigger = { + health_failed_physician_fears_trigger = yes + } + animation = fear + } + animation = shame + } + + immediate = { + scope:sick_character.location ?= { save_scope_as = background_terrain_scope } + disease_treatment_result_tooltip_effect = { TREATMENT = risky OUTCOME = failure } + } + + #Chastise + option = { + name = health.3107.b + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + + chastise_physician_effect = yes + + ai_chance = { + factor = 30 + modifier = { + scope:physician = { has_character_modifier = chastised_physician_modifier } + add = -20 + } + } + } + + #Forgive + option = { + name = health.3201.c + trigger = { scope:sick_character != scope:physician } + + forgive_physician_effect = yes + + ai_chance = { + factor = 20 + ai_value_modifier = { + max = 80 + ai_compassion = tiny_chance_impact_positive_ai_value #+50 for max compassionate, -50 for max uncompassionate + ai_vengefulness = low_chance_impact_negative_ai_value #-100 for max vengeful, +100 for max forgiving + } + } + } + + #Imprison! + option = { + name = health.3107.d + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:physician = { is_imprisoned = no } + scope:sick_character != scope:physician + } + + imprison_physician_effect = yes + + ai_chance = { + factor = 30 #Can go up to ~80 for lowest compassion characters and becomes 0 for characters with medium positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #Execute! + option = { + name = health.3107.e + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:sick_character != scope:physician + } + + execute_physician_effect = yes + + ai_chance = { + factor = 15 #Can go up to ~65 for lowest compassion characters and becomes 0 for characters with low positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #They treated themselves... + option = { + name = health.3107.f + trigger = { + scope:sick_character = scope:physician + } + + chastise_physician_effect = yes + + ai_chance = { #Will be only option available if it's available + base = 100 + } + } +} + + + + + + +################### +# WOUND TREATMENT # by Linnéa Thimrén +################### + +#Who should decide about my treatment? +health.4999 = { + hidden = yes + + trigger = { + has_wounds_trigger = yes + has_recent_wound_treatment_trigger = no + court_physician_available_trigger = yes + } + + immediate = { + save_scope_as = sick_character + decide_who_picks_wound_treatment_effect = yes #Sends health.4001 to me or 4002 to liege + } + + on_trigger_fail = { + #No wound/no physician: do nothing (if we hire a new physician, they will treat everyone upon being hired) + #Has a wound but treatment is still active? Try again + if = { + limit = { + has_wounds_trigger = yes + has_recent_wound_treatment_trigger = yes #The only difference + court_physician_available_trigger = yes + } + trigger_event = { id = health.4999 years = 1 } + } + } +} + +#Someone important to you is wounded. If you're their liege and you have a court physician, you may chose their treatment. +health.4000 = { + type = character_event + title = health.4000.t + desc = { + desc = health.4000.start.desc + first_valid = { + triggered_desc = { #Gangrene + trigger = { + scope:sick_character = { + has_character_modifier = gangrene_modifier + } + } + desc = health.4000.gangrene.desc + } + triggered_desc = { #Close to death + trigger = { + scope:sick_character = { + has_trait_rank = { + trait = wounded + rank = 3 + } + } + } + desc = health.4000.close_to_death_wounded.desc + } + triggered_desc = { #Infection + trigger = { + scope:sick_character = { + has_character_modifier = infected_wound_modifier + } + } + desc = health.4000.infected_wound.desc + } + triggered_desc = { #wounded lvl 2 + trigger = { + scope:sick_character = { + has_trait_rank = { + trait = wounded + rank = 2 + } + } + } + desc = health.4000.very_wounded.desc + } + desc = health.4000.wounded.desc #Wounded lvl 1 + } + triggered_desc = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = scope:physician + } + desc = health.2201.court_physician.desc_sick_physician + } + desc = health.2201.court_physician.desc + } + } + } + } + theme = healthcare + override_background = { + trigger = { scope:sick_character ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:sick_character + triggered_animation = { + trigger = { has_trait = wounded_1 } + animation = sick + } + animation = severelywounded + } + #Show physician portrait if you're picking the sick character's treatment + right_portrait = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + scope:sick_character != scope:physician + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + animation = physician + } + + trigger = { + scope:sick_character = { is_alive = yes } + } + + immediate = { + scope:sick_character.location ?= { save_scope_as = background_terrain_scope } + show_as_tooltip = { + if = { + limit = { + scope:sick_character = { + has_trait = wounded_3 + } + } + scope:sick_character = { add_trait_force_tooltip = wounded_3 } + } + else_if = { + limit = { + scope:sick_character = { + has_trait = wounded_2 + } + } + scope:sick_character = { add_trait_force_tooltip = wounded_2 } + } + else_if = { + limit = { + scope:sick_character = { + has_trait = wounded_1 + } + } + scope:sick_character = { add_trait_force_tooltip = wounded_1 } + } + if = { + limit = { + scope:sick_character = { + has_character_modifier = infected_wound_modifier + } + } + scope:sick_character = { + add_character_modifier = { + modifier = infected_wound_modifier + } + } + } + if = { + limit = { + scope:sick_character = { + has_character_modifier = gangrene_modifier + } + } + scope:sick_character = { + add_character_modifier = { + modifier = gangrene_modifier + } + } + } + } + } + + ###PHYSICIAN OPTIONS### + #Safe + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + NOT = { scope:sick_character = { has_character_modifier = gangrene_modifier } } #not available if they have gangrene + } + name = health.3102.a + scope:sick_character = { safe_wound_treatment_effect = yes } + ai_chance = { base = 10 } + } + + #Risky + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = health.3102.b + scope:sick_character = { risky_wound_treatment_effect = yes } + ai_chance = { base = 1 } + } + + #No treatment + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + name = health.3102.d + deny_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 0 } + } + + #Let them pick + option = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + NOT = { scope:sick_character = { has_character_modifier = gangrene_modifier } } #not available if they have gangrene + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = yes } + scope:sick_character != scope:physician + } + } + text = health.3102.e_adult + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = no } + scope:sick_character = scope:physician + } + } + text = health.3102.e_child + } + scope:sick_character = { pick_own_wound_treatment_effect = yes } + ai_chance = { base = 0 } + } + + ###NO PHYSICIAN OPTIONS### + #Find physician + option = { + trigger = { + court_physician_available_trigger = no + root_picks_treatment_for_sick_character_trigger = yes + } + name = health.3101.e + find_court_physician_effect = yes #This will trigger 4001 (they decide treatment) or 4002 (liege decides treatment) further down the line in which the patient's wound will actually be treated + ai_chance = { base = 1 } + } + + #Nothing to do + option = { + trigger = { + NAND = { + root_picks_treatment_for_sick_character_trigger = yes + court_physician_available_trigger = yes + } + } + name = health.4000.a + ai_chance = { base = 10 } + } +} + + + +#I decide my treatment +health.4001 = { + type = character_event + title = health.3101.t + desc = { + desc = health.4001.start.desc + random_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:sick_character = { + has_character_modifier = gangrene_modifier + } + } + OR = { + scope:sick_character = { + OR = { + has_trait_rank = { + trait = wounded + rank <= 2 + } + health >= death_chance_starts_health + } + } + scope:physician = { + has_trait = lifestyle_physician + } + } + } + desc = health.4001.safe_recommendation.desc + } + triggered_desc = { + trigger = { + OR = { + scope:sick_character = { + OR = { + has_character_modifier = gangrene_modifier + health < death_chance_starts_health + } + } + scope:physician = { + NOT = { has_trait = lifestyle_physician } + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = { + has_character_modifier = gangrene_modifier + } + } + desc = health.4001.gangrene.desc + } + triggered_desc = { + trigger = { + scope:sick_character = { + has_character_modifier = infected_wound_modifier + } + } + desc = health.4001.infection.desc + } + desc = health.4001.risky_recommendation.desc + } + } + } + } + desc = health.3101.end.desc + } + + theme = healthcare + override_background = { + trigger = { is_travelling = yes } + reference = terrain + } + left_portrait = { + character = scope:sick_character + triggered_animation = { + trigger = { has_trait = wounded_1 } + animation = sick + } + animation = severelywounded + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = root } } } + animation = worry + } + triggered_animation = { + trigger = { scope:physician = { ai_rationality >= 0 } } #Don't look rational if you're not + animation = personality_rational + } + animation = physician + } + + trigger = { + court_physician_available_trigger = yes + } + + immediate = { + hidden_effect = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + #Are wounds infected? Gangrene?? + } + } + + #Safe + option = { + name = health.3101.a + trigger = { + NOT = { scope:sick_character = { has_character_modifier = gangrene_modifier } } #not available if they have gangrene + } + scope:sick_character = { safe_wound_treatment_effect = yes } + ai_chance = { base = 10 } + } + + #Risky + option = { + name = health.3101.b + scope:sick_character = { risky_wound_treatment_effect = yes } + ai_chance = { base = 1 } + } + + #No treatment + option = { + name = health.3101.d + ai_chance = { base = 1 } + } +} + +#I have now hired a court physician, and an important courtier is wounded: time to decide their treatment +health.4002 = { + type = character_event + title = health.4000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = scope:physician + } + desc = health.4002.start.desc_sick_physician + } + desc = health.4002.start.desc + } + random_valid = { + triggered_desc = { + trigger = { + NOT = { + scope:sick_character = { + has_character_modifier = gangrene_modifier + } + } + OR = { + scope:sick_character = { + OR = { + has_trait_rank = { + trait = wounded + rank <= 2 + } + health >= death_chance_starts_health + } + } + scope:physician = { + has_trait = lifestyle_physician + } + } + } + desc = health.4001.safe_recommendation.desc + } + triggered_desc = { + trigger = { + OR = { + OR = { + has_character_modifier = gangrene_modifier + health < death_chance_starts_health + } + scope:physician = { + NOT = { has_trait = lifestyle_physician } + } + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sick_character = { + has_character_modifier = gangrene_modifier + } + } + desc = health.4001.gangrene.desc + } + triggered_desc = { + trigger = { + scope:sick_character = { + has_character_modifier = infected_wound_modifier + } + } + desc = health.4001.infection.desc + } + desc = health.4001.risky_recommendation.desc + } + } + } + } + desc = health.3101.end.desc + } + theme = healthcare + override_background = { + trigger = { scope:sick_character ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:sick_character + triggered_animation = { + trigger = { has_trait = wounded_1 } + animation = sick + } + animation = severelywounded + } + #Show physician portrait if you're picking the sick character's treatment + right_portrait = { + trigger = { + root_picks_treatment_for_sick_character_trigger = yes + scope:sick_character != scope:physician + } + character = scope:physician + triggered_animation = { + trigger = { scope:physician = { health_event_is_worried_trigger = { CHARACTER = scope:sick_character } } } + animation = worry + } + animation = physician + } + + trigger = { + court_physician_available_trigger = yes + scope:sick_character = { is_alive = yes } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:sick_character.location ?= { save_scope_as = background_terrain_scope } + hidden_effect = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + #Are wounds infected? Gangrene?? + } + } + + #Safe + option = { + name = health.3101.a + trigger = { + NOT = { scope:sick_character = { has_character_modifier = gangrene_modifier } } #not available if they have gangrene + } + scope:sick_character = { safe_wound_treatment_effect = yes } + ai_chance = { base = 10 } + } + + #Risky + option = { + name = health.3101.b + scope:sick_character = { risky_wound_treatment_effect = yes } + ai_chance = { base = 1 } + } + + #No treatment + option = { + name = health.3102.d + deny_treatment_effect = { PATIENT = scope:sick_character TREATMENT_PICKER = root } + ai_chance = { base = 1 } + } + + #Let them pick + option = { + trigger = { + NOT = { scope:sick_character = { has_character_modifier = gangrene_modifier } } #not available if they have gangrene + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = yes } + scope:sick_character != scope:physician + } + } + text = health.3102.e_adult + } + name = { + trigger = { + OR = { + scope:sick_character = { is_adult = no } + scope:sick_character = scope:physician + } + } + text = health.3102.e_child + } + scope:sick_character = { pick_own_wound_treatment_effect = yes } + ai_chance = { base = 0 } + } +} + + +#Safe treatment - success! +health.4101 = { + type = character_event + title = health.4101.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:infection + } + desc = health.4101.desc_infection + } + desc = health.4101.desc_1 + desc = health.4101.desc_2 + } + desc = health.4101.desc_end + } + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { health_successful_physician_happy_for_trigger = { CHARACTER = root } } + animation = happiness + } + animation = physician + } + + immediate = { + scope:physician.location ?= { save_scope_as = background_terrain_scope } + #Currently no message to liege because liege never picks wound treatment and safe success is not noteworthy + + #Adds modifiers, sends return visit event in 1 years, shows a tooltip if physician ranked up + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = success } + + } + + option = { + name = health.4101.a + } +} + +#safe treatment - failure! +health.4102 = { + type = character_event + title = health.4102.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:infection + } + desc = { + random_valid = { + desc = health.4102.desc_infection + desc = health.4101.desc_infection + } + } + } + desc = health.4101.desc_2 + } + desc = health.4102.desc_end + } + + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_failed_physician_fears_trigger = yes + } + animation = fear + } + animation = shame + } + + immediate = { + scope:physician.location ?= { save_scope_as = background_terrain_scope } + #Currently no message to liege because liege never picks wound treatment and safe failure is not noteworthy + + #Adds modifiers, sends return visit event in 1 year, shows a tooltip if physician ranked up + wound_treatment_results_effect = { TREATMENT = safe OUTCOME = failure } + + } + + #Ok... + option = { + name = health.4102.a + ai_chance = { + factor = 40 + } + } + + #Imprison! + option = { + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:physician = { is_imprisoned = no } + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = arbitrary + has_trait = paranoid + has_trait = sadistic + has_trait = callous + } + } + trait = wrathful + trait = vengeful + trait = arbitrary + trait = paranoid + trait = sadistic + trait = callous + + name = health.3107.d + + imprison_physician_effect = yes + + ai_chance = { + factor = 30 #Can go up to ~80 for lowest compassion characters and becomes 0 for characters with medium positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #Execute! + option = { + trigger = { + can_punish_court_physician = { PHYSICIAN = scope:physician } + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = arbitrary + has_trait = paranoid + has_trait = sadistic + has_trait = callous + } + } + trait = wrathful + trait = vengeful + trait = arbitrary + trait = paranoid + trait = sadistic + trait = callous + + name = health.3107.e + + execute_physician_effect = yes + + ai_chance = { + factor = 15 #Can go up to ~65 for lowest compassion characters and becomes 0 for characters with low positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } +} + + + +#Risky treatment - Critical success +health.4103 = { + type = character_event + title = health.4103.t + desc = { + #Treatment type + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.4103.risky_treatment_medicine.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:eye + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:amputation } + desc = health.risky_treatment_amputation.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:disfigurement } + desc = health.4103.risky_treatment_disfigurement.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:eye } + desc = health.risky_treatment_eye.1.desc + } + } + desc = health.4103.end.desc + } + + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_successful_physician_happy_for_trigger = { CHARACTER = root } + } + animation = happiness + } + animation = physician + } + + immediate = { + scope:physician.location ?= { save_scope_as = background_terrain_scope } + #Removes traits, removes body part if the treatment strategy demands it, shows a tooltip if physician ranked up + wound_treatment_results_effect = { TREATMENT = risky OUTCOME = critical_success } + + #Currently no message to liege because liege never picks wound treatment and critical risky success is not noteworthy + } + + #I am healed! + option = { + name = health.3105.a + } +} + +#Risky treatment - Normal success +health.4104 = { + type = character_event + title = health.4104.t + desc = { + #Treatment type + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.4103.risky_treatment_medicine.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:eye + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:amputation } + desc = health.risky_treatment_amputation.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:disfigurement } + desc = health.4103.risky_treatment_disfigurement.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:eye } + desc = health.risky_treatment_eye.1.desc + } + } + desc = health.4104.end.desc + } + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_successful_physician_happy_for_trigger = { CHARACTER = root } + } + animation = happiness + } + animation = physician + } + + immediate = { + scope:physician.location ?= { save_scope_as = background_terrain_scope } + #Adds modifiers, removes body part if the treatment strategy demands it, sends return visit event in 1 years, shows a tooltip if physician ranked up + wound_treatment_results_effect = { TREATMENT = risky OUTCOME = success } + + #Currently no message to liege because liege never picks wound treatment and risky success is not noteworthy + } + + #I feel better! + option = { + name = health.3106.a + } +} + +#Risky treatment - Failure +health.4105 = { + type = character_event + title = health.4105.t + desc = { + #Treatment type + random_valid = { + triggered_desc = { + trigger = { var:treatment_strategy = flag:medicine } + desc = health.4103.risky_treatment_medicine.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.1.desc + } + triggered_desc = { + trigger = { + OR = { + var:treatment_strategy = flag:amputation + var:treatment_strategy = flag:disfigurement + var:treatment_strategy = flag:eye + var:treatment_strategy = flag:castration + } + } + desc = health.risky_treatment_surgery.2.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:amputation } + desc = health.risky_treatment_amputation.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:disfigurement } + desc = health.4103.risky_treatment_disfigurement.1.desc + } + triggered_desc = { + trigger = { var:treatment_strategy = flag:eye } + desc = health.risky_treatment_eye.1.desc + } + } + desc = health.4105.end.desc + } + theme = healthcare + override_background = { + trigger = { scope:physician ?= { is_travelling = yes } exists = scope:background_terrain_scope } + reference = terrain_scope + } + left_portrait = { + character = scope:physician + triggered_animation = { + trigger = { + health_failed_physician_fears_trigger = yes + } + animation = fear + } + animation = shame + } + + immediate = { + scope:physician.location ?= { save_scope_as = background_terrain_scope } + #Adds modifiers, removes body part if the treatment strategy demands it, sends return visit event in 1 years (unless died), shows a tooltip if physician ranked up + wound_treatment_results_effect = { TREATMENT = risky OUTCOME = failure } + + #Set my opinion here (if forgive/chastise, it is later downgraded to non-crime opinion) + hidden_effect = { add_failed_treatment_of_me_opinions_effect = yes } + } + + #I'm dying + option = { + trigger = { has_character_flag = die_surgery } + name = health.3107.a + + #Message for close relatives, or punishment event if relative is your liege + inform_liege_about_wound_treatment_effect = { TREATMENT = risky OUTCOME = death } + + death = { + death_reason = death_treatment + killer = scope:physician + } + } + + #Chastise + option = { + trigger = { + NOT = { has_character_flag = die_surgery } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.b + + chastise_physician_effect = yes + inform_liege_about_wound_treatment_effect = { TREATMENT = risky OUTCOME = failure } #Messages my relatives + + ai_chance = { + factor = 30 + modifier = { + scope:physician = { has_character_modifier = chastised_physician_modifier } + add = -20 + } + } + } + + #Forgive + option = { + trigger = { + NOT = { has_character_flag = die_surgery } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.c + + forgive_physician_effect = yes + inform_liege_about_wound_treatment_effect = { TREATMENT = risky OUTCOME = failure } #Messages my relatives + + ai_chance = { + factor = 20 + ai_value_modifier = { + max = 80 + ai_compassion = tiny_chance_impact_positive_ai_value #+50 for max compassionate, -50 for max uncompassionate + ai_vengefulness = low_chance_impact_negative_ai_value #-100 for max vengeful, +100 for max forgiving + } + } + } + + #Imprison! + option = { + trigger = { + NOT = { has_character_flag = die_surgery } + can_punish_court_physician = { PHYSICIAN = scope:physician } + scope:physician = { is_imprisoned = no } + } + name = health.3107.d + + imprison_physician_effect = yes + inform_liege_about_wound_treatment_effect = { TREATMENT = risky OUTCOME = failure } #Messages my relatives + + ai_chance = { + factor = 30 #Can go up to ~80 for lowest compassion characters and becomes 0 for characters with medium positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #Execute! + option = { + trigger = { + NOT = { has_character_flag = die_surgery } + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + name = health.3107.e + + execute_physician_effect = yes + inform_liege_about_wound_treatment_effect = { TREATMENT = risky OUTCOME = failure } #Messages my relatives + + ai_chance = { + factor = 15 #Can go up to ~65 for lowest compassion characters and becomes 0 for characters with low positive compassion + ai_value_modifier = { + ai_compassion = tiny_chance_impact_negative_ai_value + } + } + } + + #OK (I am not liege and can't punish) + option = { + trigger = { + NOR = { + has_character_flag = die_surgery + can_punish_court_physician = { PHYSICIAN = scope:physician } + } + } + name = health.4102.a + + #Message for close relatives, or punishment event if relative is your liege + inform_liege_about_wound_treatment_effect = { TREATMENT = risky OUTCOME = failure } + } +} + + + +################### +################### +# WEIGHT EVENTS # +################### +################### +# by Linnéa Thimrén + +#To increase weight more rapidly, and steadily, when taking the gain_weight_decision +health.5004 = { + hidden = yes + + trigger = { + has_character_modifier = gaining_weight_modifier # Will continue to trigger until you take the decision to stop + } + + immediate = { + change_current_weight = 5 + trigger_event = { + id = health.5004 + days = 180 + } + } +} + +#To reduce weight more rapidly, and steadily, when taking the lose_weight_decision +health.5005 = { + hidden = yes + + trigger = { + has_character_modifier = losing_weight_modifier # Will continue to trigger until you take the decision to stop + } + + immediate = { + change_current_weight = -5 + trigger_event = { + id = health.5005 + days = 90 + } + } +} + + + +###################### +###################### +# SUICIDE EVENTS # +###################### +###################### +#We have tried to treat suicide as respectfully as possible while still modeling it to work as a game mechanic. Research has been conducted on medieval views and methods of suicide, and any opinions expressed through this chain is a reflection of those values, not the developers. If you have thoughts about suicide, please reach out to people around you, or to a helpline. People will surprise you with how much they care. + + +#How will you do it? +#by Linnéa Thimrén +health.6001 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6001.desc_opening + first_valid = { + triggered_desc = { + trigger = { + has_trait = depressed + } + desc = health.6001.desc_depression + } + triggered_desc = { + trigger = { + OR = { + has_trait = cancer + has_trait = leper + has_trait = great_pox + } + } + desc = health.6001.desc_sickness + } + triggered_desc = { + trigger = { + has_trait = lunatic + } + desc = health.6001.desc_lunacy + } + triggered_desc = { + trigger = { + has_character_flag = make_suicide_available + } + desc = health.6001.desc_loss + } + triggered_desc = { + trigger = { + stress >= very_high_stress + } + desc = health.6001.desc_stress + } + } + desc = health.6001.desc_ending + } + theme = death + left_portrait = { + character = root + animation = sick + } + + trigger = { + NOT = { has_trait = incapable } + } + + option = { #Fall + name = { + trigger = { + OR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + has_government = landless_adventurer_government + } + } + text = health.6001.a_tribal + } + name = { + trigger = { + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + has_government = landless_adventurer_government + } + } + text = health.6001.a + } + custom_tooltip = health.6001.warning + save_scope_value_as = { + name = fall + value = yes + } + } + + option = { #Poison + name = health.6001.b + custom_tooltip = health.6001.warning + save_scope_value_as = { + name = poison + value = yes + } + } + + option = { #Knife + name = health.6001.c + custom_tooltip = health.6001.warning + save_scope_value_as = { + name = knife + value = yes + } + } + + option = { #Back out + name = health.6001.d + custom_tooltip = health.6001.d_tt + } + + after = { + if = { + limit = { + OR = { + exists = scope:fall + exists = scope:poison + exists = scope:knife + } + } + hidden_effect = { + random_list = { + 90 = { #Someone tries to intervene + trigger_event = { + id = health.6002 + days = { 3 5 } + } + } + 0 = { #You go straight to the attempt + modifier = { #You are not well-liked + add = 5 + dread >= medium_dread + } + modifier = { #You are seriously not well-liked + add = 10 + dread >= high_dread + } + modifier = { #You are not liked by people close to you + add = 20 + any_close_family_member = { + NOT = { is_spouse_of = root } + OR = { + AND = { + ai_compassion > 0 + opinion = { + target = root + value <= -20 + } + } + AND = { + ai_compassion < 0 + opinion = { + target = root + value <= 0 + } + } + } + } + any_spouse = { + OR = { + AND = { + ai_compassion > 0 + opinion = { + target = root + value <= -20 + } + } + AND = { + ai_compassion < 0 + opinion = { + target = root + value <= 0 + } + } + } + } + } + if = { + limit = { + exists = scope:fall + } + trigger_event = { + id = health.6003 + days = { 3 5 } + } + } + else_if = { + limit = { + exists = scope:poison + } + trigger_event = { + id = health.6006 + days = { 3 5 } + } + } + else = { + trigger_event = { + id = health.6009 + days = { 3 5 } + } + } + } + } + } + } + } +} + +#Intervention +#by Linnéa Thimrén +health.6002 = { + type = character_event + title = health.6001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:fall + } + desc = health.6002.desc_fall + } + triggered_desc = { + trigger = { + exists = scope:poison + } + desc = health.6002.desc_poison + } + triggered_desc = { + trigger = { + exists = scope:knife + } + desc = health.6002.desc_knife + } + } + desc = health.6002.desc_ending + } + theme = death + override_background = { + trigger = { + has_government = landless_adventurer_government + } + reference = wilderness + } + override_background = { + trigger = { + is_landless_adventurer = no + } + reference = corridor_day + } + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:friendly_person + animation = shock + } + + immediate = { + if = { + limit = { + any_spouse = { + opinion = { + target = root + value >= 0 + } + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + any_scheme = { + type = murder + scheme_target_character = root + } + } + is_ai = yes + } + } + every_spouse = { + limit = { + opinion = { + target = root + value >= 0 + } + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + any_scheme = { + type = murder + scheme_target_character = root + } + } + is_ai = yes + } + add_to_list = possiple_people_to_intervene + } + } + if = { + limit = { + any_close_family_member = { + opinion = { + target = root + value >= 0 + } + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + any_scheme = { + type = murder + scheme_target_character = root + } + } + is_ai = yes + is_adult = yes + } + } + every_close_family_member = { + limit = { + opinion = { + target = root + value >= 0 + } + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + any_scheme = { + type = murder + scheme_target_character = root + } + } + is_ai = yes + is_adult = yes + } + add_to_list = possiple_people_to_intervene + } + } + if = { + limit = { + any_relation = { + type = friend + count >= 1 + is_ai = yes + opinion = { + target = root + value >= 10 + } + } + } + every_relation = { + type = friend + limit = { + is_ai = yes + opinion = { + target = root + value >= 10 + } + } + add_to_list = possiple_people_to_intervene + } + } + if = { + limit = { + any_relation = { + type = potential_friend + count >= 1 + is_ai = yes + opinion = { + target = root + value >= 10 + } + } + } + every_relation = { + type = potential_friend + limit = { + is_ai = yes + opinion = { + target = root + value >= 10 + } + } + add_to_list = possiple_people_to_intervene + } + } + if = { + limit = { + any_relation = { + type = lover + count >= 1 + is_ai = yes + opinion = { + target = root + value >= 10 + } + } + } + every_relation = { + type = lover + limit = { + is_ai = yes + opinion = { + target = root + value >= 10 + } + } + add_to_list = possiple_people_to_intervene + } + } + + if = { + limit = { + any_in_list = { + list = possiple_people_to_intervene + count >= 1 + } + } + random_in_list = { + list = possiple_people_to_intervene + weight = { + base = 1 + modifier = { + add = { + value = ai_compassion + multiply = 0.5 + } + } + opinion_modifier = { + opinion_target = root + multiplier = 1 + } + modifier = { + add = 2 + is_in_the_same_court_as = root + } + } + save_scope_as = friendly_person + } + } + else = { + create_character = { + template = merchant_template + location = root.capital_province + trait = compassionate + save_scope_as = friendly_person + } + } + } + + option = { #I'm still going for it + name = health.6002.a + show_as_tooltip = { + random_list = { + 50 = { + show_chance = no + desc = health.6002.a_success + committed_suicide_effect = yes + } + 50 = { + show_chance = no + desc = health.6002.a_failure + attempted_suicide_effect = yes + } + } + } + #To trigger the failure/success events + if = { + limit = { + exists = scope:fall + } + trigger_event = health.6003 + } + else_if = { + limit = { + exists = scope:poison + } + trigger_event = health.6006 + } + else = { + trigger_event = health.6009 + } + } + + option = { #Back out + name = health.6002.b + custom_tooltip = health.6001.d_tt + scope:friendly_person = { + add_opinion = { + modifier = relieved_opinion + target = root + opinion = 10 + } + hidden_effect = { + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = root } + } + set_relation_potential_friend = root + } + root = { + random = { #Check up event + chance = 500 + trigger_event = { + id = health.6100 + days = { 365 730 } + } + } + } + } + } + } +} + +#Fall - attempt +#by Linnéa Thimrén +health.6003 = { + hidden = yes + + immediate = { + random_list = { + 50 = { + trigger_event = health.6004 + } + 50 = { + trigger_event = health.6005 + } + } + } +} + +#Fall - Success +#by Linnéa Thimrén +health.6004 = { + type = character_event + title = health.6001.t + desc = health.6004.desc + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:friendly_person + animation = shock + } + override_background = { + trigger = { + has_government = landless_adventurer_government + } + reference = wilderness + } + override_background = { + trigger = { + is_landless_adventurer = no + } + reference = corridor_day + } + + option = { + name = health.6004.a + } + + immediate = { + committed_suicide_effect = yes + } +} + +#Fall - Failure +#by Linnéa Thimrén +health.6005 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6005.desc + desc = health.6005.desc_ending + } + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:friendly_person + animation = shock + } + override_background = { + trigger = { + has_government = landless_adventurer_government + } + reference = wilderness + } + override_background = { + trigger = { + is_landless_adventurer = no + } + reference = corridor_day + } + + immediate = { + attempted_suicide_effect = yes + } + + option = { + name = health.6005.a + hidden_effect = { + if = { + limit = { + exists = scope:friendly_person + } + random = { #Check up event + chance = 50 + trigger_event = { + id = health.6100 + days = { 365 730 } + } + } + } + } + } +} + + +#Poison - attempt +#by Linnéa Thimrén +health.6006 = { + hidden = yes + + immediate = { + random_list = { + 50 = { + trigger_event = health.6007 + } + 50 = { + trigger_event = health.6008 + } + } + } +} + +#Poison - Success +#by Linnéa Thimrén +health.6007 = { + type = character_event + title = health.6001.t + desc = health.6007.desc + theme = death + left_portrait = { + character = root + animation = sick + } + + option = { + name = health.6004.a + } + + immediate = { + committed_suicide_effect = yes + } +} + +#Poison - Failure +#by Linnéa Thimrén +health.6008 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6008.desc + desc = health.6005.desc_ending + } + theme = death + left_portrait = { + character = root + animation = sick + } + + immediate = { + attempted_suicide_effect = yes + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + option = { + name = health.6005.a + hidden_effect = { + if = { + limit = { + exists = scope:friendly_person + } + random = { #Check up event + chance = 50 + trigger_event = { + id = health.6100 + days = { 365 730 } + } + } + } + } + } +} + +#Knife - attempt +#by Linnéa Thimrén +health.6009 = { + hidden = yes + + immediate = { + random_list = { + 50 = { + trigger_event = health.6010 + } + 50 = { + trigger_event = health.6011 + } + } + } +} + +#Knife - Success +#by Linnéa Thimrén +health.6010 = { + type = character_event + title = health.6001.t + desc = health.6010.desc + theme = death + left_portrait = { + character = root + animation = sick + } + + option = { + name = health.6004.a + } + + immediate = { + committed_suicide_effect = yes + } +} + +#Knife - Failure +#by Linnéa Thimrén +health.6011 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6011.desc + desc = health.6005.desc_ending + } + theme = death + left_portrait = { + character = root + animation = sick + } + + immediate = { + attempted_suicide_effect = yes + } + + option = { + name = health.6005.a + hidden_effect = { + if = { + limit = { + exists = scope:friendly_person + } + random = { #Check up event + chance = 50 + trigger_event = { + id = health.6100 + days = { 182 500 } + } + } + } + } + } +} + +#Friendly person checks up on you +health.6100 = { + type = character_event + title = health.6001.t + desc = health.6100.desc + theme = friendly + left_portrait = { + character = scope:friendly_person + animation = personality_compassionate + } + + trigger = { + scope:friendly_person = { + is_alive = yes + is_ai = yes + } + } + + option = { #Thank you for asking + name = health.6100.a + progress_towards_friend_effect = { + CHARACTER = scope:friendly_person + REASON = friend_checked_on_health + OPINION = 0 + } + scope:friendly_person = { + add_opinion = { + modifier = relieved_opinion + target = root + opinion = 5 + } + } + } + + option = { #It's no concern of yours. + name = health.6100.b + scope:friendly_person = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = -10 + } + } + } +} + + + +#Incapable +#by Linnéa Thimrén +health.6200 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6200.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:close_person + } + desc = health.6200.desc_close_person + } + desc = health.6200.desc + } + } + theme = death + left_portrait = root + right_portrait = scope:close_person + + trigger = { + has_trait = incapable + } + + immediate = { + save_scope_as = incapable_person + #To save a person close to you + if = { + limit = { + any_spouse = { + is_in_the_same_court_as = root + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + } + every_spouse = { + limit = { + is_in_the_same_court_as = root + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + add_to_list = possiple_close_person + } + } + if = { + limit = { + any_close_family_member = { + is_in_the_same_court_as = root + is_adult = yes + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + } + every_close_family_member = { + limit = { + is_in_the_same_court_as = root + is_adult = yes + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + add_to_list = possiple_close_person + } + } + if = { + limit = { + any_relation = { + type = friend + count >= 1 + is_in_the_same_court_as = root + } + } + every_relation = { + type = friend + limit = { + is_in_the_same_court_as = root + } + add_to_list = possiple_close_person + } + } + if = { + limit = { + any_relation = { + type = potential_friend + count >= 1 + is_in_the_same_court_as = root + } + } + every_relation = { + type = potential_friend + limit = { + is_in_the_same_court_as = root + } + add_to_list = possiple_close_person + } + } + if = { + limit = { + any_relation = { + type = lover + count >= 1 + is_in_the_same_court_as = root + } + } + every_relation = { + type = lover + limit = { + is_in_the_same_court_as = root + } + add_to_list = possiple_close_person + } + } + + if = { + limit = { + any_in_list = { + list = possiple_close_person + count >= 1 + } + } + random_in_list = { + list = possiple_close_person + weight = { + base = 1 + modifier = { + add = { + value = ai_compassion + multiply = 0.25 + } + } + opinion_modifier = { + opinion_target = root + multiplier = 1 + } + modifier = { + add = 2 + is_in_the_same_court_as = root + } + } + save_scope_as = close_person + } + } + } + + option = { #I will ask a person close to me + name = health.6200.a + trigger = { + exists = scope:close_person + } + show_as_tooltip = { + random_list = { + 50 = { + desc = health.6200.a_success + show_chance = no + death = { + death_reason = death_mysterious + } + } + 50 = { + desc = health.6200.a_failure + show_chance = no + custom_tooltip = health.6200.a_failure_tt + } + } + } + scope:close_person = { + trigger_event = { + id = health.6203 + days = { 3 7 } + } + } + } + + option = { #I will ask a servant + name = { + trigger = { + exists = scope:close_person + } + text = health.6200.b + } + name = { + trigger = { + NOT = { exists = scope:close_person } + } + text = health.6200.b_2 + } + show_as_tooltip = { + random_list = { + 50 = { + desc = health.6200.b_success + show_chance = no + death = { + death_reason = death_mysterious + } + } + 50 = { + desc = health.6200.b_failure + show_chance = no + custom_tooltip = health.6200.a_failure_tt + } + } + } + trigger_event = { + id = health.6207 + days = { 3 7 } + } + } + + option = { #Back out + name = health.6001.d + custom_tooltip = health.6001.d_tt + } +} + +#Someone close to you asks you to kill them +health.6203 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6203.desc + first_valid = { + triggered_desc = { + trigger = { + any_scheme = { + type = murder + scheme_target_character = scope:incapable_person + } + } + desc = health.6203.desc_murder + } + } + } + theme = death + left_portrait = { + character = scope:incapable_person + animation = sick + } + + option = { #Agree + name = health.6203.a + show_as_tooltip = { + scope:incapable_person = { + death = { + death_reason = death_mysterious + } + } + } + hidden_effect = { + if = { + limit = { #If they're ai they might not be able to go through with it even when agreeing + is_ai = yes + } + random_list = { + 90 = { #They do it + modifier = { + add = 100 + any_scheme = { #They have a murder scheme against you + type = murder + scheme_target_character = scope:incapable_person + } + } + scope:incapable_person = { + trigger_event = { + id = health.6204 + days = { 3 7 } + } + } + } + 10 = { #Chance that ai might not be able to go through with it + modifier = { + add = { + value = ai_compassion + multiply = 0.5 + } + } + scope:incapable_person = { + trigger_event = { + id = health.6205 + days = { 3 7 } + } + } + } + } + } + else = { #If it's a player they do it + scope:incapable_person = { + trigger_event = { + id = health.6204 + days = { 3 7 } + } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_compassion_target_modifier = { VALUE = 25 } + ai_vengefulness_target_modifier = { VALUE = 50 } + modifier = { #They have a murder scheme against you + add = 100 + any_scheme = { + type = murder + scheme_target_character = scope:incapable_person + } + } + } + } + + option = { #No! + name = health.6203.b + scope:incapable_person = { + add_opinion = { + modifier = refusal_opinion + target = scope:close_person + opinion = -15 + } + trigger_event = health.6206 + } + ai_chance = { + base = 50 + modifier = { + add = { + value = ai_compassion + multiply = 0.25 + } + } + modifier = { + add = 20 + piety_level >= medium_piety_level + } + modifier = { + add = 50 + piety_level >= high_piety_level + } + modifier = { + add = 50 + has_trait = craven + } + modifier = { + add = 50 + has_trait = zealous + } + } + } +} + +#They help you +health.6204 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6204.desc_opening + random_valid = { + desc = health.6204.desc_1 + desc = health.6204.desc_2 + } + } + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:close_person + animation = worry + } + + trigger = { + scope:close_person = { is_alive = yes } + } + + on_trigger_fail = { + trigger_event = health.6210 + } + + immediate = { + death = { + death_reason = death_mysterious + } + } + + option = { + name = health.6204.a + } +} + +#They cannot go though with it +health.6205 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6204.desc_opening + random_valid = { + desc = health.6205.desc_1 + desc = health.6205.desc_2 + } + } + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:close_person + animation = grief + } + + trigger = { + scope:close_person = { is_alive = yes } + } + + on_trigger_fail = { + trigger_event = health.6210 + } + + option = { + name = health.6205.a + } +} + +#They will not help you +health.6206 = { + type = character_event + title = health.6001.t + desc = health.6206.desc + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:close_person + animation = grief + } + + trigger = { + scope:close_person = { is_alive = yes } + } + + on_trigger_fail = { + trigger_event = health.6210 + } + + option = { + name = health.6205.a + } +} + + +#You ask a servant +health.6207 = { + type = character_event + title = health.6001.t + desc = health.6207.desc + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:servant + animation = worry + } + + immediate = { + create_character = { + save_scope_as = servant + employer = root + template = servant_character + gender_female_chance = root_faith_dominant_gender_adjusted_female_chance + } + } + + option = { #You ask them + name = health.6207.a + show_as_tooltip = { + random_list = { + 50 = { + desc = health.6207.a_success + show_chance = no + death = { + death_reason = death_mysterious + } + } + 50 = { + desc = health.6207.a_failure + show_chance = no + custom_tooltip = health.6200.a_failure_tt + } + } + } + hidden_effect = { + random_list = { + 75 = { #Servant says yes + modifier = { + add = 100 + has_trait = sadistic + } + modifier = { + add = 75 + has_trait = callous + } + trigger_event = { + id = health.6208 + days = { 3 7 } + } + } + 10 = { #Servant says yes but can't do it + modifier = { + add = { + value = ai_compassion + multiply = 0.5 + } + } + modifier = { + add = 75 + has_trait = compassionate + } + save_scope_value_as = { + name = refusal + value = yes + } + trigger_event = { + id = health.6209 + days = { 3 7 } + } + } + 10 = { #Servant says no + modifier = { + add = { + value = ai_compassion + multiply = 0.5 + } + } + modifier = { + add = 50 + has_trait = compassionate + } + trigger_event = { + id = health.6209 + days = { 3 7 } + } + } + } + } + } + + option = { #Back out + name = health.6001.d + custom_tooltip = health.6001.d_tt + } +} + +#Servant says yes +health.6208 = { + type = character_event + title = health.6001.t + desc = { + desc = health.6204.desc_opening + random_valid = { + desc = health.6204.desc_1 + desc = health.6204.desc_2 + } + } + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:servant + animation = worry + } + + trigger = { + scope:servant = { is_alive = yes } + } + + on_trigger_fail = { + trigger_event = health.6210 + } + + immediate = { + scope:servant = { #To be able to reuse descs + save_scope_as = close_person + } + death = { + death_reason = death_mysterious + } + } + + option = { + name = health.6204.a + } +} + +#Servant says no or can't do it +health.6209 = { + type = character_event + title = health.6001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { #They try to, but can't do it + exists = scope:refusal + } + desc = { + desc = health.6209.desc_refusal + random_valid = { + desc = health.6205.desc_1 + desc = health.6205.desc_2 + } + } + } + desc = health.6209.desc + } + } + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:servant + animation = shock + } + + trigger = { + scope:servant = { is_alive = yes } + } + + on_trigger_fail = { + trigger_event = health.6210 + } + + option = { + name = health.6205.a + } +} + +#Close person or servant died (oh cruel fate) +health.6210 = { + type = character_event + title = health.6001.t + desc = health.6210.desc + theme = death + left_portrait = { + character = root + animation = sick + } + right_portrait = scope:close_person + + immediate = { + if = { #To make it the same scope for ease of work + limit = { + exists = scope:servant + } + scope:servant = { + save_scope_as = close_person + } + } + } + + option = { + name = health.6210.a + remove_decision_cooldown = commit_suicide_decision + } +} + + +################## +# INFIRM EVENTS +################## + +# You have become infirm +health.7000 = { + type = character_event + title = health.7000.t + + desc = { + first_valid = { + triggered_desc = { + trigger = { + age <= 40 + } + desc = health.7000.desc_collapse + } + desc = health.7000.desc + } + desc = health.7000.desc_closing + } + + left_portrait = { + character = root + animation = sick + } + theme = physical_health + + trigger = { + NOT = { has_trait = infirm } + OR = { + age >= 50 + 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 + factor = 0 + } + modifier = { + health >= fine_health + factor = 0.8 + } + 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 = { + has_trait = athletic + factor = 0.8 + } + 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 + } + modifier = { + has_trait = cancer + factor = 3 + } + modifier = { + faith = { has_doctrine_parameter = less_likely_to_become_infirm } + factor = 0.5 + } + } + + option = { + name = { + trigger = { has_trait = lazy } + text = health.7000.a.lazy + } + name = { + text = health.7000.a + } + + add_trait = infirm + + stress_impact = { + lazy = minor_stress_loss + diligent = medium_stress_gain + } + } +} + +# What day is it? You become depressed while infirm +health.7100 = { + type = character_event + title = health.7000.t + + desc = health.7100.desc + + left_portrait = { + character = root + animation = sick + } + theme = physical_health + + trigger = { + OR = { + has_trait = infirm + has_trait = incapable + } + NOR = { + has_trait = depressed + has_character_flag = had_event_health_7100 + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0 + ai_energy >= medium_positive_energy + } + modifier = { + factor = 1.2 + ai_energy <= low_positive_energy + } + modifier = { + factor = 2 + ai_energy <= low_negative_energy + } + modifier = { + factor = 3 + ai_energy <= medium_negative_energy + } + modifier = { + factor = 4 + ai_energy <= high_negative_energy + } + } + + immediate = { + add_character_flag = had_event_health_7100 + } + + option = { + name = health.7100.a + + add_trait = depressed_1 + } +} + diff --git a/N3OW/events/historical_character_events.txt b/N3OW/events/historical_character_events.txt new file mode 100644 index 00000000..af534e3b --- /dev/null +++ b/N3OW/events/historical_character_events.txt @@ -0,0 +1,440 @@ + +namespace = historical_char_creation_events + +historical_char_creation_events.1 = { + type = character_event + title = historical_char_creation_events.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:historical_character = { + has_variable = alternative_origin_courtier + } + } + desc = historical_char_creation_events_alternative.desc + } + desc = historical_char_creation_events.desc + } + } + theme = friendly + override_effect_2d = legend_glow + + override_background = { + trigger = { + scope:historical_character.faith = faith:norse_pagan + } + reference = fp1_runestone_circle + } + + override_background = { + trigger = { + scope:historical_character = { has_variable = alternative_origin_courtier } + } + reference = throne_room + } + + override_background = { + trigger = { + scope:historical_character = { + has_trait = lifestyle_poet + } + } + reference = relaxing_room + } + + override_background = { + trigger = { + scope:historical_character = { + OR = { + has_trait = eunuch_1 + has_trait = beardless_eunuch + } + } + } + reference = relaxing_room + } + + override_background = { + trigger = { + scope:birth_location.title_province = { + is_coastal = yes + } + scope:historical_character = { + has_trait = adventurer + } + } + reference = docks + } + + override_background = { + trigger = { + scope:historical_character = { + has_trait = adventurer + } + } + reference = terrain_scope + } + + override_background = { + trigger = { + scope:historical_character = { + religion = scope:birth_location.religion + OR = { + has_trait = devoted + has_trait = theologian + } + } + } + reference = holy_site_generic_scope + } + + override_background = { + trigger = { + scope:historical_character = { + OR = { + has_trait = scholar + has_trait = administrator + } + } + } + reference = bp2_university_scope + } + + override_background = { + trigger = { + scope:historical_character = { + OR = { + has_education_martial_trigger = yes + has_trait = gallant + has_trait = strategist + } + } + } + reference = courtyard + } + + override_background = { + trigger = { + scope:birth_location.title_province = { has_holding = yes } + } + reference = market_scope + } + + override_background = { + reference = terrain_scope + } + + right_portrait = { + character = scope:historical_character_2 + animation = flirtation_left + } + + left_portrait = { + character = scope:historical_character + triggered_animation = { + trigger = { + exists = scope:historical_character_2 + } + animation = admiration + } + triggered_animation = { + trigger = { + has_variable = hodja + } + animation = laugh + } + triggered_animation = { + trigger = { + OR = { + has_variable = takezaki_suenaga + has_variable = sakata_kintoki + } + } + animation = hasso_no_kamae + } + triggered_animation = { + trigger = { + OR = { + has_variable = yue_fei + has_variable = wen_tianxiang + has_variable = pham_ngu_lao + } + } + animation = relaxed_spear + } + triggered_animation = { + trigger = { + has_trait = diplomat + } + animation = chancellor + } + triggered_animation = { + trigger = { + OR = { + has_trait = eunuch_1 + has_trait = beardless_eunuch + } + has_education_intrigue_trigger = yes + } + animation = scheme + } + triggered_animation = { + trigger = { + OR = { + has_trait = eunuch_1 + has_trait = beardless_eunuch + } + } + animation = obsequious_bow + } + triggered_animation = { + trigger = { + OR = { + has_trait = berserker + has_trait = gallant + has_trait = strategist + } + } + animation = inspect_weapon + } + triggered_animation = { + trigger = { + OR = { + has_trait = organizer + has_trait = lifestyle_traveler + has_trait = architect + has_trait = adventurer + } + } + animation = survey + } + triggered_animation = { + trigger = { + has_trait = possessed_1 + } + animation = eccentric + } + triggered_animation = { + trigger = { + has_trait = lifestyle_poet + OR = { + has_trait = theologian + has_trait = scholar + } + } + animation = happy_teacher + } + triggered_animation = { + trigger = { + has_character_flag = murasaki + } + animation = fanning_coyly + } + triggered_animation = { + trigger = { + has_trait = lifestyle_poet + } + animation = storyteller + } + triggered_animation = { + trigger = { + has_trait = lifestyle_mystic + } + animation = personality_zealous + } + triggered_animation = { + trigger = { + has_trait = lifestyle_physician + } + animation = physician + } + triggered_animation = { + trigger = { + has_education_martial_trigger = yes + } + animation = sword_coup_degrace + } + triggered_animation = { + trigger = { + has_education_stewardship_trigger = yes + } + animation = steward + } + triggered_animation = { + trigger = { + has_variable = legendary_author + } + animation = writing + } + triggered_animation = { + trigger = { + has_trait = devoted + } + animation = prayer + } + animation = writing + } + + immediate = { + scope:birth_location = { + save_scope_as = background_terrain_scope + title_province = { save_scope_as = background_market_scope } + title_province = { save_scope_as = background_university_scope } + } + scope:historical_character.location = { save_scope_as = holy_site_scope } + } + + option = { + name = historical_char_creation_events.1.a + add_internal_flag = dangerous + + trigger = { + has_ep3_dlc_trigger = yes + } + flavor = danger_dynasty_abandon_tt + if = { + limit = { + is_ai = no + } + add_achievement_global_variable_effect = { + VARIABLE = finished_historically_inaccurate_achievement + VALUE = yes + } + } + scope:historical_character = { + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = root + } + } + set_player_character = scope:historical_character + + hidden_effect = { + scope:historical_character = { + populate_location_with_contracts_effect = { + AREA_CHAR = scope:historical_character + AMOUNT = 3 + } + if = { + limit = { + exists = scope:historical_character_2 + } + add_courtier = scope:historical_character_2 + } + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = historical_char_creation_events.1.b + + custom_tooltip = obligation_hook_tt + add_courtier = scope:historical_character + add_hook = { + type = obligation_hook + target = scope:historical_character + } + + if = { + limit = { + exists = scope:historical_character_2 + } + add_courtier = scope:historical_character_2 + add_hook = { + type = obligation_hook + target = scope:historical_character_2 + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = historical_char_creation_events.1.c + flavor = will_wander_tt + + add_prestige = minor_prestige_gain + + if = { + limit = { + has_ep3_dlc_trigger = yes + exists = scope:explorer + } + scope:historical_character = { + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = root + } + } + } + else_if = { + limit = { + has_ep3_dlc_trigger = yes + is_ai = yes + } + random = { + chance = 15 + scope:historical_character = { + create_landless_adventurer_title_effect = { + REASON = flag:voluntary + FLAVOR_CHAR = root + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + add = 150 + scope:historical_character.culture = { + has_cultural_parameter = much_more_likely_to_be_laamps + } + } + modifier = { + add = 50 + scope:historical_character.culture = { + has_cultural_parameter = more_likely_to_be_laamps + } + } + } + } + + after = { + remove_character_flag = need_military_outfit + } +} + +# Major religious inspiration outcome +historical_char_creation_events.2 = { + type = character_event + title = historical_char_creation_events.2.t + desc = historical_char_creation_events.2.desc + theme = faith + override_effect_2d = legend_glow + left_portrait = { + character = scope:inspiration_owner + animation = personality_zealous + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + } + + option = { + name = historical_char_creation_events.2.a + add_character_flag = major_religious_inspiration + add_character_modifier = { + modifier = religious_reformer_modifier + } + custom_tooltip = mass_conversion_tt + } +} + diff --git a/N3OW/events/jester_stress_relief_events.txt b/N3OW/events/jester_stress_relief_events.txt new file mode 100644 index 00000000..4033c49e --- /dev/null +++ b/N3OW/events/jester_stress_relief_events.txt @@ -0,0 +1,1982 @@ +namespace = jester + +jester.100 = { # My Rival Fool, Covered in Stool + type = character_event + title = jester.100.t + desc = jester.100.desc + theme = friendly + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:jester + animation = rage + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + any_court_position_holder = { + type = court_jester_court_position + has_relation_rival = root + } + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + scope:jester = { + add_character_modifier = { + modifier = covered_in_feces + years = 10 + } + } + } + + option = { + name = jester.100.a + + stress_impact = { + base = major_stress_impact_loss + vengeful = major_stress_impact_loss + compassionate = minor_stress_impact_gain + } + } +} + +jester.200 = { # Laughter is the Best Medicine + type = character_event + title = jester.200.t + desc = jester.200.desc + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:jester + animation = storyteller + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + } + + option = { + name = jester.200.a + + stress_impact = { + base = -20 + diligent = 19 + } + random = { + chance = 1 + death = { + death_reason = death_laughter + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = diligent + } + } + } + + option = { + name = jester.200.b + + stress_impact = { + base = miniscule_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + } + } + } +} + +jester.300 = { # Masterful Juggling + type = character_event + title = jester.300.t + desc = { + desc = jester.300.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:child_to_juggle + } + desc = jester.300.desc_child + } + desc = SCOPE_EMPTY + } + desc = jester.300.desc_2 + } + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = throne_room_applaud_1 + } + right_portrait = { + character = scope:jester + animation = throne_room_cheer_2 + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + NOR = { + has_trait = infirm + has_trait = maimed + has_trait = one_legged + has_trait = gout_ridden + has_trait = blind + has_trait = physique_bad + has_trait = weak + } + } + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + if = { + limit = { + any_courtier_or_guest = { + age <= 2 + } + } + random_courtier_or_guest = { + limit = { + age <= 2 + } + save_scope_as = child_to_juggle + } + } + } + + option = { + name = jester.300.a + + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.300.b + trigger = { + exists = scope:child_to_juggle + } + + stress_impact = { + base = medium_stress_impact_gain + sadistic = massive_stress_impact_loss + } + rightfully_imprison_character_effect = { + TARGET = scope:jester + IMPRISONER = root + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + NOT = { + has_trait = sadistic + } + } + } + } +} + +jester.400 = { # A Flatulist and a Gentleman + type = character_event + title = jester.400.t + desc = jester.400.desc + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:jester + animation = storyteller + } + + cooldown = { years = 50 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + any_court_position_holder = { + type = court_jester_court_position + NOT = { + has_trait = blind + } + } + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + # Roll for theme. + select_poem_theme_random_effect = yes + # Set up a subject gender. + select_poem_subject_gender_effect = { + SUBJECT = flag:no + SUBJECT_TARGET = root + } + } + } + + option = { + name = jester.400.a + + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 75 + } + } + + option = { + name = jester.400.b + + stress_impact = { + base = miniscule_stress_impact_loss + } + add_character_modifier = { + modifier = aspiring_flatulist + years = 10 + } + ai_chance = { + base = 25 + } + } +} + +jester.500 = { # Clothes Thief + type = character_event + title = jester.500.t + desc = jester.500.desc + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = scope:courtier + animation = aggressive_axe + } + right_portrait = { + character = scope:jester + animation = laugh + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 5 + } + } + } + + trigger = { + NOT = { + faith = { + has_doctrine = tenet_natural_primitivism #Nakedness is not a notable thing + } + } + any_courtier_or_guest = { + is_available_ai_adult = yes + age >= 18 + NOT = { + has_court_position = court_jester_court_position + } + } + } + + immediate = { + save_scope_as = you + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + age >= 18 + NOT = { + has_court_position = court_jester_court_position + } + } + weight = { + base = 1 + modifier = { + add = 10 + is_of_minor_interest_to_root_trigger = yes + } + modifier = { + add = 100 + sex_same_as = scope:jester + } + modifier = { + add = 100 + has_relation_rival = root + } + } + save_scope_as = courtier + add_character_modifier = { + modifier = diplomacy_majesty_4090_no_raiment_modifier + years = 5 + } + progress_towards_rival_effect = { + REASON = rival_clothes_stolen + CHARACTER = scope:jester + OPINION = 0 + } + } + } + + option = { + name = jester.500.a + + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 75 + } + } + + option = { + name = jester.500.b + + stress_impact = { + base = miniscule_stress_impact_loss + } + scope:jester = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -5 + } + } + scope:courtier = { + remove_character_modifier = diplomacy_majesty_4090_no_raiment_modifier + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + ai_chance = { + base = 25 + } + } +} + +jester.600 = { # Food Fight + type = character_event + title = jester.600.t + desc = jester.600.desc + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = scope:courtier + animation = disgust + } + right_portrait = { + character = scope:jester + animation = wrestling_victory + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + any_courtier_or_guest = { + is_available_ai_adult = yes + NOT = { + has_court_position = court_jester_court_position + } + } + any_court_position_holder = { + type = court_jester_court_position + NOT = { + has_trait = blind + } + } + } + + immediate = { + save_scope_as = you + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOT = { + has_court_position = court_jester_court_position + } + } + weight = { + base = 1 + modifier = { + add = 10 + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = courtier + } + } + + option = { + name = jester.600.a + + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.600.b + + stress_impact = { + base = miniscule_stress_impact_loss + } + scope:courtier = { + progress_towards_friend_effect = { + CHARACTER = root + REASON = friend_helped_after_food_fight + OPINION = 0 + } + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.600.c + trigger = { + scope:jester = { + NOT = { + has_relation_rival = scope:courtier + } + } + } + + stress_impact = { + base = medium_stress_impact_gain + sadistic = massive_stress_impact_loss + } + scope:jester = { + increase_wounds_effect = { REASON = fight } + } + scope:courtier = { + set_relation_rival = { + target = scope:jester + reason = rival_food_fight + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + NOT = { + has_trait = sadistic + } + } + } + } +} + +jester.700 = { # Sunday Roast + type = character_event + title = jester.700.t + desc = jester.700.desc + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = scope:courtier + animation = pain + } + right_portrait = { + character = scope:jester + animation = debating + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + any_courtier_or_guest = { + is_available_ai_adult = yes + NOR = { + has_court_position = court_jester_court_position + is_close_family_of = root + is_consort_of = root + } + } + } + + immediate = { + save_scope_as = you + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + random_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + NOR = { + has_court_position = court_jester_court_position + is_close_family_of = root + is_consort_of = root + } + } + weight = { + base = 1 + modifier = { + add = 10 + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = courtier + scope:courtier = { + add_prestige = medium_prestige_loss + } + } + } + + option = { + name = jester.700.a + + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.700.b + + stress_impact = { + base = miniscule_stress_impact_loss + } + scope:courtier = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 10 + } + } + ai_chance = { + base = 100 + } + } +} + +jester.800 = { # Slapstick + type = character_event + title = jester.800.t + desc = { + desc = jester.800.desc + random_valid = { + triggered_desc = { + trigger = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = sculpture + } + } + desc = fall_into_sculpture + } + triggered_desc = { + trigger = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = sculpture + } + } + desc = somersault_into_sculpture + } + triggered_desc = { + trigger = { + any_character_artifact = { + artifact_slot_type = primary_armament + } + } + desc = weapon_pratfall + } + triggered_desc = { + trigger = { + any_character_artifact = { + artifact_slot_type = primary_armament + } + } + desc = weapon_plummet + } + desc = faceplant + desc = walk_into_wall + desc = forceful_tumble + } + desc = jester.800.desc_2 + random_valid = { + triggered_desc = { + trigger = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = sculpture + } + } + desc = fall_into_sculpture + } + triggered_desc = { + trigger = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = sculpture + } + } + desc = somersault_into_sculpture + } + triggered_desc = { + trigger = { + any_character_artifact = { + artifact_slot_type = primary_armament + } + } + desc = weapon_pratfall + } + triggered_desc = { + trigger = { + any_character_artifact = { + artifact_slot_type = primary_armament + } + } + desc = weapon_plummet + } + desc = faceplant + desc = walk_into_wall + desc = forceful_tumble + } + desc = jester.800.desc_3 + random_valid = { + triggered_desc = { + trigger = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = sculpture + } + } + desc = fall_into_sculpture + } + triggered_desc = { + trigger = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = sculpture + } + } + desc = somersault_into_sculpture + } + triggered_desc = { + trigger = { + any_character_artifact = { + artifact_slot_type = primary_armament + } + } + desc = weapon_pratfall + } + triggered_desc = { + trigger = { + any_character_artifact = { + artifact_slot_type = primary_armament + } + } + desc = weapon_plummet + } + desc = faceplant + desc = walk_into_wall + desc = forceful_tumble + } + desc = jester.800.desc_4 + } + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = laugh + } + right_portrait = { + character = scope:jester + animation = wrestling_yield_start + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + if = { + limit = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = sculpture + } + } + random_character_artifact = { + limit = { + is_equipped = yes + artifact_slot_type = sculpture + } + save_scope_as = furniture_to_crash_into + } + } + if = { + limit = { + any_character_artifact = { + artifact_slot_type = primary_armament + } + } + random_character_artifact = { + limit = { + artifact_slot_type = primary_armament + } + save_scope_as = weapon_pratfall + } + } + } + + option = { + name = jester.800.a + + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.800.b + + stress_impact = { + base = miniscule_stress_impact_loss + compassionate = major_stress_impact_gain + sadistic = massive_stress_impact_loss + } + + scope:jester = { + add_opinion = { + target = root + modifier = scared_opinion + opinion = -25 + } + increase_wounds_effect = { REASON = fall } + hidden_effect = { + random = { + chance = 25 + increase_wounds_effect = { REASON = fall } + } + } + } + + if = { + limit = { + exists = scope:furniture_to_crash_into + } + scope:furniture_to_crash_into = { + add_durability = -5 + } + } + + if = { + limit = { + exists = scope:weapon_pratfall + } + scope:weapon_pratfall = { + add_durability = -5 + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + NOT = { + has_trait = sadistic + } + } + } + } +} + +jester.900 = { # Several Fools in One Coat + type = character_event + title = jester.900.t + desc = { + desc = jester.900.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:cat_story + } + desc = jester.900.cat + } + triggered_desc = { + trigger = { + exists = scope:dog_story + } + desc = jester.900.dog + } + triggered_desc = { + trigger = { + exists = scope:bird + } + desc = jester.900.bird + } + triggered_desc = { + trigger = { + exists = scope:eagle_story + } + desc = jester.900.eagle + } + } + } + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:jester + animation = ecstasy + } + + cooldown = { years = 50 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + + random_list = { + 30 = { # A bird of some sort + save_scope_value_as = { + name = bird + value = yes + } + } + 10 = { # An eagle + trigger = { + location = { geographical_region = world_steppe } + NOR = { + has_eagle_trigger = yes + has_character_modifier = eagle_story_modifier + } + } + save_scope_value_as = { + name = eagle_story + value = yes + } + } + 10 = { # A catto + trigger = { + NOR = { + any_owned_story = { type = story_cycle_pet_cat } + has_character_modifier = cat_story_modifier + } + } + save_scope_value_as = { + name = cat_story + value = yes + } + } + 10 = { # A pupperoni + trigger = { + NOR = { + any_owned_story = { type = story_cycle_pet_dog } + has_character_modifier = dog_story_modifier + } + } + save_scope_value_as = { + name = dog_story + value = yes + } + } + } + } + + option = { + name = jester.900.a + + trigger = { + exists = scope:cat_story + } + + start_cat_story_cycle_effect = yes + + stress_impact = { + base = minor_stress_impact_loss + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.900.b + + trigger = { + exists = scope:dog_story + } + + start_dog_story_cycle_effect = yes + + stress_impact = { + base = miniscule_stress_impact_loss + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.900.c + + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.900.d + + trigger = { + exists = scope:eagle_story + } + + save_scope_value_as = { + name = eagle_capture_method + value = flag:gift + } + + start_eagle_story_cycle_effect = yes + + stress_impact = { + base = miniscule_stress_impact_loss + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +jester.1000 = { # A Good Story + type = character_event + title = jester.1000.t + desc = jester.1000.desc + theme = friendly + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:jester + animation = page_flipping + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + any_court_position_holder = { + type = court_jester_court_position + NOT = { + has_trait = blind + } + } + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + + if = { + limit = { + any_character_artifact = { + artifact_slot_type = book + } + } + random_character_artifact = { + limit = { + artifact_slot_type = book + } + save_scope_as = my_book + } + } + + set_random_entertainment_text_effect = yes + } + + option = { + name = jester.1000.c + flavor = jester.1000.c_flavor + + trigger = { + exists = scope:my_book + } + + add_character_modifier = { + modifier = reinvigorating_reading_modifier + years = 10 + } + + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.1000.a + + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.1000.b + + progress_towards_friend_effect = { + CHARACTER = scope:jester + OPINION = 10 + REASON = friend_showed_personal_interest + } + stress_impact = { + base = minor_stress_impact_loss + sadistic = massive_stress_impact_gain + callous = major_stress_impact_gain + arbitrary = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = arbitrary + has_trait = arrogant + } + } + } + } +} + +jester.1100 = { # The *artifact name* Ghost + type = character_event + title = jester.1100.t + desc = jester.1100.desc + theme = friendly + override_background = { reference = corridor_night } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = craven + } + animation = fear + } + triggered_animation = { + trigger = { + NOT = { has_trait = craven } + } + animation = shock + } + } + right_portrait = { + character = scope:jester + animation = happiness + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 5 + } + } + } + + trigger = { + any_character_artifact = { + is_equipped = yes + OR = { + has_variable = cabinet + has_variable = big_chest + } + } + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + if = { + limit = { + any_character_artifact = { + is_equipped = yes + OR = { + has_variable = cabinet + has_variable = big_chest + } + } + } + random_character_artifact = { + limit = { + is_equipped = yes + OR = { + has_variable = cabinet + has_variable = big_chest + } + } + save_scope_as = hiding_place + } + } + } + + option = { + name = jester.1100.a + + trigger = { + NOT = { + has_trait = craven + } + } + + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { + name = jester.1100.b + + trigger = { + NOT = { + has_trait = craven + } + } + + add_character_modifier = { + modifier = suspicious_of_furniture + years = 10 + } + + stress_impact = { + base = miniscule_stress_impact_loss + trusting = major_stress_impact_gain + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = trusting + } + } + } + + option = { + name = jester.1100.c + + trigger = { + has_trait = craven + } + trait = craven + + random = { + chance = { + value = 0 + add = age + divide = 10 + floor = yes + min = 1 + } + death = { + death_reason = death_heart_attack + } + } + + add_opinion = { + target = scope:jester + modifier = treachery_opinion + opinion = -20 + } + + stress_impact = { + base = major_stress_impact_gain + } + } + + option = { + name = jester.1100.d + flavor = jester.1100.d_flavor + + trigger = { + NOT = { + has_trait = craven + } + } + + scope:jester = { + death = { + killer = root + death_reason = death_nailed_in_cabinet + } + } + + scope:hiding_place = { + add_durability = -10 + set_variable = { + name = ghost_cabinet + years = 50 + } + } + + stress_impact = { + base = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + sadistic = -160 + callous = -80 + paranoid = -80 + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + NOR = { + has_trait = sadistic + has_trait = callous + has_trait = paranoid + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } +} + +scripted_trigger valid_secret_holder = { + is_available_ai_adult = yes + NOT = { + has_court_position = court_jester_court_position + } + any_secret = { + NOT = { + is_known_by = root # Won't reveal a secret to you which you already know. + } + } +} + +scripted_trigger generic_vassal = { + is_available_ai_adult = yes + is_married = yes + primary_spouse = { + is_ai = yes + } + NOT = { + has_court_position = court_jester_court_position + } +} + +jester.1200 = { # The Rumor Mill + type = character_event + title = jester.1200.t + desc = jester.1200.desc + theme = friendly + override_background = { reference = throne_room } + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:jester + animation = throne_room_conversation_2 + } + lower_left_portrait = scope:vassal_1 + lower_center_portrait = scope:vassal_2 + lower_right_portrait = scope:secret_holder + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 1 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 2 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 3 + } + } + modifier = { + add = 0.25 + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + } + } + } + + trigger = { + any_court_position_holder = { + type = court_jester_court_position + aptitude:court_jester_court_position >= 4 + NOR = { + has_trait = shy + has_relation_rival = root + opinion = { + target = root + value <= -30 + } + } + save_temporary_scope_as = jester_check + } + any_vassal = { + count >= 3 + generic_vassal = yes + } + OR = { + any_vassal = { + valid_secret_holder = yes + } + any_courtier_or_guest = { + valid_secret_holder = yes + } + } + } + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + every_vassal = { + limit = { + valid_secret_holder = yes + } + add_to_list = potential_secret_holders + } + every_courtier_or_guest = { + limit = { + valid_secret_holder = yes + } + add_to_list = potential_secret_holders + } + random_in_list = { + list = potential_secret_holders + weight = { + base = 1 + modifier = { + add = 10 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 5 + is_of_minor_interest_to_root_trigger = yes + } + } + save_scope_as = secret_holder + hidden_effect = { + if = { + limit = { + any_secret = { + NOT = { + is_known_by = scope:jester + } + } + } + every_secret = { + limit = { + NOT = { + is_known_by = scope:jester + } + } + reveal_to = scope:jester + } + } + } + } + random_vassal = { + limit = { + generic_vassal = yes + this != scope:secret_holder + } + save_scope_as = vassal_1 + hidden_effect = { + add_character_modifier = { + modifier = licentious_01_modifier + years = 3 + } + } + } + random_vassal = { + limit = { + generic_vassal = yes + NOR = { + this = scope:secret_holder + this = scope:vassal_1 + } + } + save_scope_as = vassal_2 + hidden_effect = { + primary_spouse = { + save_scope_as = vassal_2_spouse + progress_towards_rival_effect = { + REASON = rival_spousal_gossip + CHARACTER = scope:vassal_2 + OPINION = default_rival_opinion + } + } + } + } + } + + option = { + name = jester.1200.a + + stress_impact = { + base = medium_stress_impact_loss + } + ai_chance = { + base = 100 + } + } + + option = { + name = jester.1200.b + + scope:secret_holder = { + every_secret = { + limit = { + NOT = { + is_known_by = root + } + } + reveal_to = root + } + } + + stress_impact = { + base = miniscule_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } +} + +jester.1300 = { # Generic Stress Loss Feed Message + type = character_event + hidden = yes + + immediate = { + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = jester + } + send_interface_message = { + type = event_stress_good + title = jester.1300.notification + + left_icon = scope:jester + + add_stress = minor_stress_impact_loss + } + } +} + +jester.1400 = { # Courtier Stress Loss Feed Message + type = character_event + hidden = yes + + trigger = { + scope:jester_from_task ?= { + has_court_position = court_jester_court_position + } + scope:first_de_stress_target ?= { + is_physically_able = yes + is_courtier_of = root + } + } + + immediate = { + send_interface_message = { + type = secondary_character_stress_good + title = jester.1400.notification + + left_icon = scope:jester_from_task + right_icon = scope:first_de_stress_target + + scope:first_de_stress_target = { + add_stress = medium_stress_impact_loss + } + } + } +} + +jester.1410 = { # Courtier Stress Loss Feed Message, 2nd scope + type = character_event + hidden = yes + + trigger = { + scope:jester_from_task ?= { + has_court_position = court_jester_court_position + } + scope:second_de_stress_target ?= { + is_physically_able = yes + is_courtier_of = root + } + } + + immediate = { + send_interface_message = { + type = secondary_character_stress_good + title = jester.1410.notification + + left_icon = scope:jester_from_task + right_icon = scope:second_de_stress_target + + scope:second_de_stress_target = { + add_stress = medium_stress_impact_loss + } + } + } +} diff --git a/N3OW/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt b/N3OW/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt new file mode 100644 index 00000000..12b0f47e --- /dev/null +++ b/N3OW/events/lifestyles/scholarship_lifestyle/learning_medicine_events.txt @@ -0,0 +1,4447 @@ + +namespace = learning_medicine +namespace = learning_medicine_special +################################################## + +# Learning Medicine Lifestyle events + + # 2001 - Become Herbalist, by Mathilda Bjarnehed + # 2010 - Improve court Physician, by Mathilda Bjarnehed + # 2020 - Fertility treatment, by Mathilda Bjarnehed + # 2030 - Healthy coping mechanism: becoming a confider, by Mathilda Bjarnehed + # 2040 - Healthy coping mechanism: journaller or athletic, by Mathilda Bjarnehed + # 2050 - Helping healing hand (medicine friend), by Mathilda Bjarnehed + # 2110 - A vassal (or your liege) wants to eat some hashish while visiting your capital, by Ewan Cowhig Croft + +#Special Learning Medicine Lifestyle events + # 1001 - Study Cadavers, by Linnéa Thimrén + # 2100 - You consume a hallucinogenic fish, by Ewan Cowhig Croft + +################################################## + + +################################################## +# Become a herbalist +# by Mathilda Bjarnehed +################################################## + +scripted_trigger learning_medicine_2001_basic_herbalist_trigger = { + has_trait = lifestyle_herbalist + is_available_ai = yes + is_adult = yes +} + +scripted_trigger learning_medicine_2001_pool_herbalist_trigger = { + learning_medicine_2001_basic_herbalist_trigger = yes + guest_allowed_to_arrive_trigger = { HOST = root } +} + +learning_medicine.2001 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:herbalist = { is_pool_character = yes } } + desc = learning_medicine.2001.pool.desc + } + desc = learning_medicine.2001.no_pool.desc + } + triggered_desc = { + trigger = { exists = scope:chaplain_hates_herbs } + desc = learning_medicine.2001.chaplain_hates_herbs.desc + } + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:herbalist + animation = physician + } + lower_right_portrait = scope:chaplain_hates_herbs + + trigger = { + exists = root.capital_province + OR = { + learning >= high_skill_rating + culture = { has_cultural_parameter = herbalist_traits_more_common } + } + NOR = { + has_character_flag = had_event_learning_medicine_2001 + has_trait = lifestyle_herbalist + } + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + any_courtier_or_guest = { learning_medicine_2001_basic_herbalist_trigger = yes } + any_relation = { type = friend learning_medicine_2001_basic_herbalist_trigger = yes } + } + add = 0.75 + } + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_medicine_2001 + years = 5 + } + #Pick a herbalist + #Friends get extra chance by not being merged with court/pool and witches are weighted for/are prioritized + random_list = { + 3 = { #Friends + trigger = { any_relation = { type = friend learning_medicine_2001_basic_herbalist_trigger = yes } } + modifier = { + any_relation = { + type = friend + learning_medicine_2001_basic_herbalist_trigger = yes + is_witch_trigger = yes + } + factor = 3 + } + random_relation = { + type = friend + limit = { + learning_medicine_2001_basic_herbalist_trigger = yes + is_witch_trigger = yes + } + alternative_limit = { learning_medicine_2001_basic_herbalist_trigger = yes } + save_scope_as = herbalist + } + } + 2 = { #Courtiers + trigger = { any_courtier_or_guest = { learning_medicine_2001_basic_herbalist_trigger = yes } } + modifier = { + any_courtier_or_guest = { + learning_medicine_2001_basic_herbalist_trigger = yes + is_witch_trigger = yes + } + factor = 3 + } + random_courtier_or_guest = { + limit = { + learning_medicine_2001_basic_herbalist_trigger = yes + is_witch_trigger = yes + } + alternative_limit = { learning_medicine_2001_basic_herbalist_trigger = yes } + save_scope_as = herbalist + } + } + 1 = { #Pool characters + trigger = { + any_pool_character = { + province = root.capital_province + learning_medicine_2001_pool_herbalist_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { learning_medicine_2001_pool_herbalist_trigger = yes } + weight = { #Pool characters don't get witch prio, only witch weight, or it will be super easy to find a witch (probably) + base = 1 + modifier = { + factor = 3 + is_witch_trigger = yes + } + } + save_scope_as = herbalist + } + } + } + + #No one there? Make one + if = { + limit = { NOT = { exists = scope:herbalist } } + save_scope_as = created_char + random_list = { + 90 = { #Make a regular herbalist + create_character = { + location = root.capital_province + faith = root.faith + culture = root.culture + template = witchy_template + save_scope_as = herbalist + } + } + 10 = { #Make a witch + modifier = { + root = { is_ai = no } + add = 20 + } + create_witch_effect = { WHO = root } + scope:created_witch = { save_scope_as = herbalist } + } + } + } + + #Give a flower to someone option? + if = { + limit = { + any_scheme = { + OR = { + scheme_type = seduce + scheme_type = courting + } + } + } + random_scheme = { + limit = { + OR = { + scheme_type = seduce + scheme_type = courting + } + } + scheme_target_character = { save_scope_as = flower_receiver } + } + } + else_if = { + limit = { any_relation = { type = soulmate always = yes } } + random_relation = { type = soulmate save_scope_as = flower_receiver } + } + else_if = { + limit = { exists = primary_spouse } + primary_spouse = { save_scope_as = flower_receiver } + } + + #Would the court chaplain disagree? + random_learning_councillor = { + limit = { + NOR = { + has_trait = lifestyle_herbalist + faith = { has_doctrine_parameter = witchcraft_accepted } + ai_zeal <= high_negative_ai_value + } + } + save_scope_as = chaplain_hates_herbs + } + } + + + #Learn herbalism + option = { + name = learning_medicine.2001.a + + add_trait = lifestyle_herbalist + + if = { + limit = { exists = scope:chaplain_hates_herbs } + reverse_add_opinion = { + target = scope:chaplain_hates_herbs + modifier = impious_opinion + opinion = -20 + } + } + + if = { + limit = { + NOR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + #Chance to become witch + hidden_effect = { + random_list = { + #Yes + 30 = { + trigger_event = { + id = learning_medicine.2002 + days = { 7 14 } + } + modifier = { + add = 30 + OR = { + # Driven to look for deeper meanings to things (Regardless of if they're there or not) + has_trait = ambitious + has_trait = paranoid + } + } + } + #No + 70 = { + modifier = { + scope:herbalist = { is_witch_trigger = yes } + add = -70 + } + modifier = { + add = 50 + OR = { + # Unwilling to see the truth... + has_trait = zealous + has_trait = trusting + # ...or unable to see the truth. + has_trait = dull + has_trait = intellect_bad + } + } + } + } + } + } + + #Pool character becomes guest + if = { + limit = { scope:herbalist = { is_pool_character = yes } } + add_visiting_courtier = scope:herbalist + } + } + + #Arrange a garden + option = { + name = learning_medicine.2001.c + add_piety = medium_piety_value + #Pool character becomes guest + if = { + limit = { scope:herbalist = { is_pool_character = yes } } + add_visiting_courtier = scope:herbalist + } + } + + #Help me pick a bouqet + option = { + trigger = { + exists = scope:flower_receiver + } + name = learning_medicine.2001.b + #Scheme modifier or opinion bonus + if = { + limit = { + any_scheme = { + OR = { + scheme_type = seduce + scheme_type = courting + } + scheme_target_character = scope:flower_receiver + } + } + random_scheme = { + limit = { + OR = { + scheme_type = seduce + scheme_type = courting + } + scheme_target_character = scope:flower_receiver + } + add_scheme_modifier = { + type = seduce_and_courting_fragrant_flowers_modifier + } + } + } + else = { + reverse_add_opinion = { + target = scope:flower_receiver + modifier = romance_opinion + opinion = 20 + } + } + + #Pool character becomes guest + if = { + limit = { scope:herbalist = { is_pool_character = yes } } + add_visiting_courtier = scope:herbalist + } + } + + #Condemn + option = { + name = { + trigger = { NOT = { exists = scope:chaplain_hates_herbs } } + text = learning_medicine.2001.d + } + name = { + trigger = { exists = scope:chaplain_hates_herbs } + text = learning_medicine.2001.d.chaplain_hates_herbs + } + + zealous_progression_effect = yes + + reverse_add_opinion = { + target = scope:herbalist + modifier = insulted_opinion + opinion = -15 + } + + if = { + limit = { exists = scope:chaplain_hates_herbs } + reverse_add_opinion = { + target = scope:chaplain_hates_herbs + modifier = pious_opinion + opinion = 25 + } + } + + } + + after = { + add_learning_lifestyle_xp = minor_lifestyle_xp + if = { + limit = { + exists = scope:created_char + } + scope:herbalist = { + silent_disappearance_ai_effect = yes + } + } + } +} + +#Become a witch? +learning_medicine.2002 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2001.t + desc = { + desc = learning_medicine.2002.start.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:chaplain_hates_herbs + any_learning_councillor = { this = scope:chaplain_hates_herbs } + } + desc = learning_medicine.2002.chaplain_hates_herbs.desc + } + triggered_desc = { + trigger = { + faith = { NOT = { has_doctrine_parameter = witchcraft_accepted } } + } + desc = learning_medicine.2002.not_witchcraft_accepted.desc + } + desc = learning_medicine.2002.witchcraft_accepted.desc + } + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = page_flipping + } + right_portrait = { + character = scope:herbalist + animation = physician + } + + trigger = { + scope:herbalist = { + basic_is_available_ai = yes + OR = { + has_relation_friend = root + is_courtier_of = root + is_foreign_court_or_pool_guest_of = root + } + } + } + + #Ask to be made witch + option = { + name = learning_medicine.2002.a + + random_list = { + 1 = { #Become a witch + show_chance = no + desc = learning_medicine.2002.a.success.t + modifier = { + scope:herbalist = { is_witch_trigger = no } + add = -1 + } + show_as_tooltip = { give_witch_secret_or_trait_effect = yes } + trigger_event = learning_medicine.2003 + } + 1 = { #They're not actually a witch + show_chance = no + desc = learning_medicine.2002.a.failure.t + trigger = { #If we know that she is a witch, don't even bother showing failure + scope:herbalist = { + NOR = { + has_trait = witch + any_secret = { + type = secret_witch + is_known_by = root + } + } + } + } + modifier = { + scope:herbalist = { is_witch_trigger = yes } + add = -1 + } + send_interface_toast = { + title = learning_medicine.2002.a.failure.t + left_icon = scope:herbalist + if = { + limit = { scope:herbalist = { faith = { NOT = { has_doctrine_parameter = witchcraft_accepted } } } } + reverse_add_opinion = { + target = scope:herbalist + modifier = impious_opinion + opinion = -15 + } + + if = { + limit = { faith = { NOT = { has_doctrine_parameter = witchcraft_accepted } } } + add_piety = minor_piety_loss + } + } + } + } + } + } + + #Investigate + option = { + trigger = { + intrigue >= mediocre_skill_rating + scope:herbalist = { + NOR = { + has_trait = witch + any_secret = { + type = secret_witch + is_known_by = root + } + } + } + } + skill = intrigue + name = learning_medicine.2002.b + + duel = { + skill = intrigue + target = scope:herbalist + 20 = { #TRUTH + desc = learning_medicine.2002.b.success.t + compare_modifier = { + value = scope:duel_value + } + custom_tooltip = learning_medicine.2002.b.success.tt + + hidden_effect = { + if = { + limit = { scope:herbalist = { is_witch_trigger = yes } } + send_interface_toast = { + title = learning_medicine.2002.b.success.witch.t + left_icon = scope:herbalist + add_learning_lifestyle_xp = minor_lifestyle_xp + scope:herbalist = { + random_secret = { + type = secret_witch + reveal_to = root + } + } + } + } + else = { + send_interface_toast = { + title = learning_medicine.2002.b.success.no_witch.t + left_icon = scope:herbalist + desc = learning_medicine.2002.b.success.no_witch.desc + add_learning_lifestyle_xp = minor_lifestyle_xp + } + } + } + } + 10 = { #INCONCLUSIVE + desc = learning_medicine.2002.b.inconclusive.t + compare_modifier = { + value = scope:duel_value + multiplier = -0.2 + } + send_interface_toast = { + title = learning_medicine.2002.b.inconclusive.t + left_icon = scope:herbalist + desc = learning_medicine.2002.b.inconclusive.desc + } + } + 10 = { #CAUGHT + desc = learning_medicine.2002.b.failure.t + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = learning_medicine.2002.b.failure.t + left_icon = scope:herbalist + reverse_add_opinion = { + target = scope:herbalist + modifier = disappointed_opinion + opinion = -20 + } + } + } + } + } + + #Let it go + option = { + name = learning_medicine.2002.c + + add_character_modifier = { + modifier = diligent_student + years = 5 + } + + reverse_add_opinion = { + target = scope:herbalist + modifier = respect_opinion + opinion = 15 + } + } +} + +#You become a cool witch! +learning_medicine.2003 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2001.t + desc = learning_medicine.2003.desc + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + character = scope:herbalist + animation = eccentric + } + + immediate = { + play_music_cue = "mx_cue_murder" + scope:herbalist = { + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = root } + } + reveal_to = root + } + } + } + + option = { + name = learning_medicine.2003.a + give_witch_secret_or_trait_effect = yes + } +} + + +################################################## +# Improve the skills of your court physician +# by Mathilda Bjarnehed +################################################## +learning_medicine.2010 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2010.t + desc = { + desc = learning_medicine.2010.start.desc + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + is_valid_for_east_asian_events_trigger = no + NOR = { + has_culture = culture:greek + scope:court_physician = { has_culture = culture:greek } + } + } + desc = learning_medicine.2010.galen.desc + } + triggered_desc = { + trigger = { + is_valid_for_east_asian_events_trigger = no + NOR = { + has_culture = culture:greek + scope:court_physician = { has_culture = culture:greek } + } + } + desc = learning_medicine.2010.hippocrates.desc + } + triggered_desc = { + trigger = { + is_valid_for_east_asian_events_trigger = no + NOR = { + has_culture = culture:greek + scope:court_physician = { has_culture = culture:greek } + } + } + desc = learning_medicine.2010.herophilus.desc + } + triggered_desc = { + trigger = { + OR = { + is_valid_for_east_asian_events_trigger = yes # Culture is Japanese, Chinese or Korean + scope:court_physician = { is_valid_for_east_asian_events_trigger = yes } + } + NOR = { + culture = { has_cultural_pillar = heritage_chinese } + scope:court_physician.culture = { has_cultural_pillar = heritage_chinese } + } + } + desc = learning_medicine.2010.bianque.desc + } + triggered_desc = { + trigger = { + OR = { + culture = { has_cultural_pillar = heritage_chinese } + scope:court_physician.culture = { has_cultural_pillar = heritage_chinese } + } + } + desc = learning_medicine.2010.sun_simiao.desc + } + triggered_desc = { + trigger = { + OR = { + culture = { has_cultural_pillar = heritage_chinese } + scope:court_physician.culture = { has_cultural_pillar = heritage_chinese } + } + } + desc = learning_medicine.2010.zhan_zhongjing.desc + } + triggered_desc = { + trigger = { + OR = { + location = { geographical_region = world_asia } + is_valid_for_east_asian_events_trigger = yes # Culture is Japanese, Chinese or Korean + scope:court_physician.culture = { is_valid_for_east_asian_events_trigger = yes } + } + } + desc = learning_medicine.2010.hua_tuo.desc + } + triggered_desc = { + trigger = { + current_date >= 984.1.1 + OR = { + culture = { has_cultural_pillar = heritage_japonic } + scope:court_physician.culture = { has_cultural_pillar = heritage_japonic } + } + } + desc = learning_medicine.2010.tamba_yasuyori.desc + } + triggered_desc = { + trigger = { + current_date >= 1120.1.1 + location = { + geographical_region = world_europe + } + } + desc = learning_medicine.2010.hildegard.desc + } + triggered_desc = { + trigger = { + current_date >= 1316.12.30 + location = { + geographical_region = world_europe + } + } + desc = learning_medicine.2010.mundinus.desc + } + triggered_desc = { + trigger = { + NOR = { + culture = { has_cultural_pillar = heritage_arabic } + scope:court_physician = { culture = { has_cultural_pillar = heritage_arabic } } + faith = { religion_tag = islam_religion } + scope:court_physician.faith = { religion_tag = islam_religion } + } + current_date >= 1225.1.1 + } + desc = learning_medicine.2010.avicenna.desc + } + triggered_desc = { + trigger = { + NOR = { + has_culture = culture:italian + scope:court_physician = { has_culture = culture:italian } + } + current_date >= 1150.1.1 + } + desc = learning_medicine.2010.trota.desc + } + } + desc = learning_medicine.2010.fallback.desc + } + desc = learning_medicine.2010.end.desc + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:court_physician + animation = stressed_teacher + } + + trigger = { + court_physician_available_trigger = yes + NOT = { has_character_flag = had_event_learning_medicine_2010 } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = court_physician } + add_character_flag = { + flag = had_event_learning_medicine_2010 + years = 5 + } + } + + #Help out + option = { + name = learning_medicine.2010.a + duel = { + skill = learning + value = mediocre_skill_rating + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + desc = learning_medicine.2010.a.success.desc + send_interface_toast = { + title = learning_medicine.2010.a.success.desc + left_icon = scope:court_physician + scope:court_physician = { + add_learning_skill = 2 + } + add_learning_lifestyle_xp = major_lifestyle_xp + } + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = learning_medicine.2010.a.failure.desc + send_interface_toast = { + title = learning_medicine.2010.a.failure.desc + left_icon = scope:court_physician + reverse_add_opinion = { + target = scope:court_physician + modifier = disappointed_opinion + opinion = -10 + } + } + } + } + cynical_progression_effect = yes + } + + #These books are bad, I know better ones + option = { + name = learning_medicine.2010.b + add_learning_lifestyle_xp = minor_lifestyle_xp + remove_short_term_gold = minor_gold_value + + scope:court_physician = { + physician_lifestyle_rank_up_effect = yes + } + } + + #You should look to the holy text instead! + option = { + name = learning_medicine.2010.c + add_learning_lifestyle_xp = minor_lifestyle_xp + add_piety = medium_piety_value + if = { + limit = { + scope:court_physician = { ai_zeal >= low_positive_ai_value } + faith = scope:court_physician.faith + } + reverse_add_opinion = { + target = scope:court_physician + modifier = pious_opinion + opinion = 15 + } + } + else = { + reverse_add_opinion = { + target = scope:court_physician + modifier = disappointed_opinion + opinion = -10 + } + } + + zealous_progression_effect = yes + } +} + + +################################################## +# Fertility treatment +# by Mathilda Bjarnehed +################################################## + +scripted_trigger learning_medicine_2020_can_have_child_trigger = { + trigger_if = { + limit = { is_male = yes } + is_visibly_fertile = yes + fertility >= 0.1 + } + trigger_if = { + limit = { is_female = yes } + is_visibly_fertile = yes + fertility >= 0.1 + is_pregnant = no + } + NOT = { + has_court_position = court_physician_court_position + } +} + +learning_medicine.2020 = { + hidden = yes + + trigger = { + learning_medicine_2020_can_have_child_trigger = yes + any_spouse = { + learning_medicine_2020_can_have_child_trigger = yes #Also checking that they are in fact not the court physician + } + NAND = { + any_child = { + character_gender_can_inherit_from_trigger = { CHARACTER = root } + count >= 4 + } + player_heir.dynasty = root.dynasty + } + NOT = { has_character_flag = had_event_learning_medicine_2020 } + } + + weight_multiplier = { + base = 1 + + #Age + modifier = { + add = { + value = age + subtract = 30 #An age where you could start to worry + multiply = 0.06 #45 years = 1 + min = -1 + max = 1.5 + } + } + + #Fertility + modifier = { + add = { + add = 1 #100% fertility + subtract = { + add = fertility + add = primary_spouse.fertility + divide = 2 #To get the average fertility + } + #Now we have the inverted fertility, the lower the fertility, the higher the remaining number is + subtract = medium_fertility #So high fertility equals negative modifier + } + } + + #Number of children + modifier = { + add = { + every_child = { + if = { + limit = { character_gender_can_inherit_from_trigger = { CHARACTER = root } } + add = -0.25 + } + else = { + add = -0.1 + } + } + } + } + + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + save_court_physician_as_effect = { SCOPE_NAME = physician } + + if = { + limit = { exists = scope:physician } + save_scope_value_as = { + name = new_physician + value = no + } + trigger_event = learning_medicine.2022 + } + else_if = { + limit = { + can_employ_court_position_type = court_physician_court_position + } + save_scope_value_as = { + name = new_physician + value = yes + } + trigger_event = learning_medicine.2021 + } + + add_character_flag = { + flag = had_event_learning_medicine_2020 + years = 10 + } + } +} + + +#You have no physician but this person wants to help you with fertility issues! +learning_medicine.2021 = { #by Mathilda Bjarnehed + type = letter_event + opening = learning_medicine.2021.t + desc = learning_medicine.2021.desc + sender = scope:physician + + immediate = { + random_pool_character = { + province = root.capital_province + limit = { learning >= medium_skill_rating } + weight = { + base = 1 + modifier = { + add = { + value = learning + subtract = medium_skill_rating + } + } + } + save_scope_as = physician + } + if = { + limit = { NOT = { exists = scope:physician } } + create_character = { + template = pool_repopulate_learning + gender_female_chance = 50 + location = root.capital_province + save_scope_as = physician + } + } + } + + #Yes I want your services + option = { + name = learning_medicine.2021.a + pay_treasury_or_gold = { + value = high_skill_court_physician_cost + target = scope:physician + } + set_court_physician_effect = { + EMPLOYER = root + PHYSICIAN = scope:physician + } + custom_tooltip = learning_medicine.2021.a.tt + trigger_event = { + id = learning_medicine.2022 + days = { 7 10 } + } + } + + #Maybe there is something else you can help me with + option = { + name = learning_medicine.2021.b + custom_tooltip = learning_medicine.2021.b.tt + pay_treasury_or_gold = { + value = low_skill_court_physician_cost + target = scope:physician + } + set_court_physician_effect = { + EMPLOYER = root + PHYSICIAN = scope:physician + } + } + + #Nah thanks + option = { + name = learning_medicine.2021.c + add_prestige = miniscule_prestige_gain + } +} + +#Physician offers you to try different methods +scripted_trigger learning_medicine_2022_valid_physician_trigger = { + exists = scope:physician + root = { + any_court_position_holder = { + type = court_physician_court_position + this = scope:physician + } + } +} + +learning_medicine.2022 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2022.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:new_physician = no } + desc = learning_medicine.2022.old_physician.desc + } + triggered_desc = { + trigger = { scope:new_physician = yes } + desc = learning_medicine.2022.new_physician.desc + } + } + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = stunned + } + right_portrait = { + character = scope:physician + animation = physician + } + lower_right_portrait = scope:spouse + + trigger = { + learning_medicine_2022_valid_physician_trigger = yes + any_spouse = { learning_medicine_2020_can_have_child_trigger = yes } + } + + immediate = { + #pick a spouse + random_spouse = { + limit = { + learning_medicine_2020_can_have_child_trigger = yes + this = root.primary_spouse + } + alternative_limit = { + learning_medicine_2020_can_have_child_trigger = yes + } + save_scope_as = spouse + if = { + limit = { is_female = yes } + save_scope_as = woman + } + else = { + save_scope_as = man + } + } + if = { + limit = { is_female = yes } + save_scope_as = woman + } + else = { + save_scope_as = man + } + } + + #Something safe + option = { + name = learning_medicine.2022.b + + random_list = { + 85 = { + modifier = { + add = { + value = scope:physician.learning + subtract = average_skill_rating + multiply = 5 + } + } + desc = learning_medicine.2022.b.success + send_interface_toast = { + title = learning_medicine.2022.b.success + left_icon = scope:physician + right_icon = scope:spouse + add_character_modifier = { + modifier = successful_fertility_treatment + years = 10 + } + scope:spouse = { + add_character_modifier = { + modifier = successful_fertility_treatment + years = 10 + } + } + } + } + 15 = { + modifier = { + add = { + value = scope:physician.learning + subtract = average_skill_rating + multiply = -1 + min = -10 + } + } + desc = learning_medicine.2022.b.failure + send_interface_toast = { + title = learning_medicine.2022.b.failure + left_icon = scope:physician + right_icon = scope:spouse + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + scope:spouse = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + } + } + } + } + } + + #Something new + option = { + name = learning_medicine.2022.a + + random_list = { + desc = outcome_in_a_few_days + 55 = { #Good outcome + modifier = { + add = { + value = scope:physician.learning + subtract = average_skill_rating + multiply = 5 + } + } + desc = learning_medicine.2022.a.success + show_as_tooltip = { + add_character_modifier = { + modifier = very_successful_fertility_treatment + years = 10 + } + scope:spouse = { + add_character_modifier = { + modifier = very_successful_fertility_treatment + years = 10 + } + } + } + trigger_event = { + id = learning_medicine.2023 + days = { 3 7 } + } + } + 30 = { #Strange outcome + modifier = { + scope:physician = { + OR = { + has_trait = lifestyle_mystic + ai_honor <= medium_negative_ai_value + } + } + add = 20 + } + trigger = { + is_ai = no + scope:spouse = { might_cheat_on_every_partner_trigger = yes } + scope:physician = { might_cheat_on_every_partner_trigger = yes } + } + desc = learning_medicine.2022.a.unexpected + custom_tooltip = learning_medicine.2022.a.unexpected.tt + hidden_effect = { + random_list = { + 30 = { #Did the court physician have sex with my spouse...? + trigger = { + scope:spouse = { is_female = yes } + scope:physician = { + is_male = yes + learning_medicine_2020_can_have_child_trigger = yes + } + } + modifier = { + add = { + value = scope:physician.ai_honor + divide = high_negative_ai_value + multiply = 30 + } + } + hidden_effect = { + scope:spouse = { + random_list = { + 80 = { + had_sex_with_effect = { #Use effect because we want possibility of suspicion + CHARACTER = scope:physician + PREGNANCY_CHANCE = 100 + } + } + 20 = { + make_pregnant = { + father = root + } + } + } + } + } + trigger_event = { + id = learning_medicine.2025 + days = { 30 40 } + } + } + 70 = { #Regular side effects (good outcome + additional effects) + save_scope_value_as = { + name = side_effects + value = yes + } + trigger_event = { + id = learning_medicine.2023 #The good outcome + days = { 3 7 } + } + } + } + } + } + 15 = { # Bad outcome + modifier = { + add = { + value = scope:physician.learning + subtract = average_skill_rating + multiply = -1 + min = -10 + } + } + desc = learning_medicine.2022.a.failure + trigger_event = { + id = learning_medicine.2024 + days = { 3 7 } + } + show_as_tooltip = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + scope:spouse = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + } + } + } + } + } + + + + #Actually, I just want some... tricks + option = { + name = learning_medicine.2022.c + + reverse_add_opinion = { + target = scope:spouse + modifier = romance_opinion + opinion = 25 + } + } + + #Nah thanks + option = { + trigger = { scope:new_physician = no } + name = learning_medicine.2021.c + add_prestige = miniscule_prestige_gain + } +} + +scripted_trigger learning_medicine_2023_continue_chain_trigger = { + learning_medicine_2022_valid_physician_trigger = yes + exists = scope:spouse + scope:spouse = { + is_alive = yes + is_consort_of = root + } +} + +scripted_trigger learning_medicine_2023_random_foreign_ruler_trigger = { + is_landed = yes + is_ai = yes + NOT = { in_diplomatic_range = root } + might_cheat_on_every_partner_trigger = yes +} + +scripted_trigger learning_medicine_2023_random_family_member_trigger = { + is_male = yes + is_ai = yes + learning_medicine_2020_can_have_child_trigger = yes + might_cheat_on_every_partner_trigger = yes + save_temporary_scope_as = incest_relative + NOR = { + has_trait = chaste + guaranteed_under_20_incest_rejection_trigger = { + TARGET = scope:incest_relative + SEDUCER = scope:spouse + } + guaranteed_under_20_incest_rejection_trigger = { + TARGET = scope:spouse + SEDUCER = scope:incest_relative + } + } +} + +#Risky option: It went great! +learning_medicine.2023 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2022.t + desc = { + random_valid = { + desc = { + desc = learning_medicine.2023.urine.desc + desc = learning_medicine.2023.unpleasant_end.desc + } + desc = { + desc = learning_medicine.2023.pig_testicles.desc + desc = learning_medicine.2023.pig_testicles_end.desc + } + desc = { + desc = learning_medicine.2023.udder.desc + desc = learning_medicine.2023.unpleasant_end.desc + } + desc = { + desc = learning_medicine.2023.milk_bath.desc + desc = learning_medicine.2023.milk_bath_end.desc + } + desc = { + desc = learning_medicine.2023.female_orgasm.start.desc + first_valid = { + triggered_desc = { + trigger = { is_female = yes } + desc = learning_medicine.2023.female_orgasm.female.desc + } + triggered_desc = { + trigger = { is_male = yes } + desc = learning_medicine.2023.female_orgasm.male.desc + } + } + } + } + desc = learning_medicine.2023.end.desc + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:physician + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + lower_right_portrait = scope:spouse + + trigger = { + learning_medicine_2023_continue_chain_trigger = yes + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + hidden_effect = { + if = { + limit = { + scope:woman = { is_pregnant = no } #We could have gotten pregnant while waiting + } + if = { + limit = { exists = scope:side_effects } + + random_list = { + 10 = { #Far away pregnancy + trigger = { + scope:spouse = { + is_female = yes + might_cheat_on_every_partner_trigger = yes + } + any_independent_ruler = { learning_medicine_2023_random_foreign_ruler_trigger = yes } + } + random_independent_ruler = { + limit = { learning_medicine_2023_random_foreign_ruler_trigger = yes } + weight = { + base = 1 + modifier = { + add = 1000 + capital_province = { + squared_distance = { + target = root.capital_province + value >= squared_distance_monstrous + } + } + } + } + save_scope_as = foreign_ruler + create_character = { + location = root.capital_province + template_character = scope:foreign_ruler + gender = male + age = { 15 35 } + save_scope_as = foreign_father + } + } + scope:spouse = { + had_sex_with_effect = { + CHARACTER = scope:foreign_father + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + 15 = { #Incest pregnancy + trigger = { + scope:spouse = { + is_female = yes + NOT = { has_trait = chaste } + might_cheat_on_every_partner_trigger = yes + any_close_family_member = { learning_medicine_2023_random_family_member_trigger = yes } + } + } + scope:spouse = { + random_close_family_member = { + limit = { learning_medicine_2023_random_family_member_trigger = yes } + save_scope_as = incest_father + } + had_sex_with_effect = { #Use effect because we want possibility of suspicion + CHARACTER = scope:incest_father + PREGNANCY_CHANCE = 100 + } + } + } + 30 = { #Unexpected trait + scope:woman = { + add_character_flag = { + flag = medicine_learning_fertility_treamtent_unexpected_trait + years = 1 + } + make_pregnant = { + father = scope:man + } + } + } + 45 = { #Twins + scope:woman = { + make_pregnant = { + father = scope:man + number_of_children = 2 + } + } + } + } + } + else = { #Just regular pregnancy roll + random = { + chance = 50 + scope:woman = { + had_sex_with_effect = { + CHARACTER = scope:man + PREGNANCY_CHANCE = pregnancy_chance + } + } + } + } + } + + location = { save_scope_as = location } + } + } + + option = { + name = learning_medicine.2023.a + + add_character_modifier = { + modifier = very_successful_fertility_treatment + years = 10 + } + reverse_add_opinion = { + modifier = romance_opinion + target = scope:spouse + opinion = 15 + } + scope:spouse = { + add_character_modifier = { + modifier = very_successful_fertility_treatment + years = 10 + } + } + } +} + + +#Risky option: It went awful! +learning_medicine.2024 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2022.t + desc = { + random_valid = { + desc = learning_medicine.2023.urine.desc + desc = learning_medicine.2023.pig_testicles.desc + desc = learning_medicine.2023.udder.desc + desc = learning_medicine.2023.milk_bath.desc + } + desc = learning_medicine.2024.end.desc + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = sick_stomach + } + right_portrait = { + character = scope:physician + animation = worry + } + lower_right_portrait = scope:spouse + + trigger = { + learning_medicine_2023_continue_chain_trigger = yes + } + + immediate = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + scope:spouse = { + add_character_modifier = { + modifier = botched_fertility_treatment + years = 5 + } + } + location = { save_scope_as = location } + } + + #Forgive + option = { + name = learning_medicine.2024.a + + reverse_add_opinion = { + target = scope:physician + modifier = grateful_opinion + opinion = 10 + } + + stress_impact = { + wrathful = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_compassion_target_modifier = { VALUE = 50 } + ai_vengefulness_target_modifier = { VALUE = -50 } + } + } + + #Imprison + option = { + name = learning_medicine.2024.b + + imprison_physician_effect = yes + + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 30 + ai_compassion_target_modifier = { VALUE = -30 } + ai_vengefulness_target_modifier = { VALUE = 100 } + } + } +} + + +#Risky option: My spouse is pregnant but nothing was done...? +learning_medicine.2025 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2022.t + desc = { + desc = learning_medicine.2025.start.desc + first_valid = { + triggered_desc = { + trigger = { scope:physician.faith = { fertilitygod_is_active_trigger = yes } } + desc = learning_medicine.2025.fertilitygod.desc + } + desc = learning_medicine.2025.the_universe.desc + } + desc = learning_medicine.2025.end.desc + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:physician + animation = happiness + } + lower_right_portrait = scope:spouse + + trigger = { + learning_medicine_2023_continue_chain_trigger = yes + } + + #Ok + option = { + name = learning_medicine.2025.b + + stress_impact = { + paranoid = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = paranoid + add = -90 + } + } + } + + option = { #Confront spouse! + name = learning_medicine.2025.a + custom_tooltip = learning_medicine.2025.a.tt + + add_character_flag = confront_spouse + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + after = { + hidden_effect = { + if = { + limit = { has_character_flag = confront_spouse } + remove_character_flag = confront_spouse + scope:spouse = { save_scope_as = lover_spouse } + save_scope_as = spouse + scope:lover_spouse = { + trigger_event = { + id = adultery.0003 + } + } + } + } + } +} + +####################################### +# Healthy coping mechanism: becoming a confider +# by Mathilda Bjarnehed +####################################### + +scripted_trigger leaning_medicine_2030_potential_confider_friend_trigger = { + opinion = { + target = root + value >= low_positive_opinion + } + target_is_liege_or_above = root.top_liege + basic_is_available_ai = yes + is_adult = yes + NOT = { has_relation_rival = root } +} + +scripted_effect medicine_2030_confider_chance_effect = { + random = { + chance = 40 + modifier = { + has_relation_friend = $FRIEND$ + add = 25 + } + modifier = { + add = { + value = ai_honor + divide = high_positive_ai_value + multiply = 40 + max = 40 + min = -20 + } + } + + + send_interface_toast = { + title = learning_medicine.2030.a.message + add_trait = confider + scope:confider_target = { + if = { + limit = { has_relation_friend = root } + if = { + limit = { + has_relation_best_friend = root + } + add_relation_flag = { + target = root + relation = best_friend + flag = has_been_confided_in + } + } + else = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + } + } + add_stress = medium_stress_loss + } + } +} + +learning_medicine.2030 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2030.t + desc = learning_medicine.2030.desc + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:confider_target + animation = personality_compassionate + } + lower_right_portrait = scope:confider_target_2 + + trigger = { + NOR = { + has_trait = confider + has_character_flag = had_event_learning_medicine_2030 + } + get_characters_of_major_interest_trigger = { LISTNAME = confider_list } + any_in_list = { + list = confider_list + leaning_medicine_2030_potential_confider_friend_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = stress + divide = extremely_high_stress + multiply = 2 + subtract = 0.5 + max = 1 #Will end up with a modifier between -0.5 at 0 stress and 1 at upper third of stress scale + } + } + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_medicine_2030 + years = 10 + } + + #Build confider list + get_characters_of_major_interest_effect = { LISTNAME = confider_list } + + #OPTION 1 alternatives: + # Alt 1: Medicine friend helps you out (guaranteed confider) + # Alt 2: Confide in list character (random chance of confider) + + #Do I have a medicine friend? if so, alt 1 + random_relation = { + type = friend + limit = { + basic_is_available_ai = yes + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + save_scope_as = confider_target + save_scope_value_as = { + name = option_1 + value = flag:medicine_friend_guaranteed + } + } + + #No medicine friend? pick someone in list for alt 2 + if = { + limit = { NOT = { exists = scope:option_1 } } + + #Find someone to confide in (OPTION 1) + random_in_list = { + list = confider_list + limit = { + leaning_medicine_2030_potential_confider_friend_trigger = yes + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + alternative_limit = { leaning_medicine_2030_potential_confider_friend_trigger = yes } + weight = { + base = 1 + modifier = { + OR = { + is_close_family_of = root + is_powerful_vassal = yes + } + add = 5 + } + modifier = { + has_relation_potential_friend = root + add = 10 + } + compatibility_modifier = { + compatibility_target = root + min = -20 + max = 20 + multiplier = 1 + } + modifier = { + any_secret = { + NOT = { is_known_by = root } + } + add = 20 + } + } + save_scope_as = confider_target + save_scope_value_as = { + name = option_1 + value = flag:list_character_random + } + } + } + + + #OPTION 2 alternatives: + # Alt 1: Confide in list character (random chance of confider), if option 1 is medicine friend or I have no secret to trade + # Alt 2: Secret trade with random list character (guaranteed confider) + + + #Alt 1: Confide in list character + if = { + limit = { + OR = { + scope:option_1 = flag:medicine_friend_guaranteed + NOT = { + any_secret = { + is_known_by = scope:confider_target + } + } + } + } + + random_in_list = { + list = confider_list + limit = { + this != scope:confider_target + leaning_medicine_2030_potential_confider_friend_trigger = yes + NOT = { has_relation_friend = root } #Because there is no friend benefit on this option + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + alternative_limit = { + this != scope:confider_target + NOT = { has_relation_friend = root } #Because there is no friend benefit on this option + leaning_medicine_2030_potential_confider_friend_trigger = yes + } + weight = { + base = 1 + modifier = { + OR = { + is_close_family_of = root + is_powerful_vassal = yes + } + add = 5 + } + modifier = { + has_relation_potential_friend = root + add = 10 + } + compatibility_modifier = { + compatibility_target = root + min = -20 + max = 20 + multiplier = 1 + } + } + save_scope_as = confider_target_2 + save_scope_value_as = { + name = option_2 + value = flag:list_character_random + } + } + } + ## Alt 2: Secret trade with random list character + else = { + #Find one of my secrets + random_secret = { + limit = { + is_shunned_for = root + NOT = { is_known_by = scope:confider_target } + } + alternative_limit = { + NOT = { is_known_by = scope:confider_target } + } + save_scope_as = root_secret + } + + #Try to find one of their secrets for the trade + scope:confider_target = { + if = { + limit = { NOT = { any_secret = { NOT = { is_known_by = root } } } } + give_random_likely_secret_effect = yes + } + + random_secret = { + limit = { + is_blackmailable_secret_trigger = { + PARTICIPANT = scope:confider_target + BLACKMAILER = root + } + NOT = { is_known_by = root } + } + alternative_limit = { + NOT = { is_known_by = root } + } + save_scope_as = confider_target_secret + } + } + + save_scope_value_as = { + name = option_2 + value = flag:secret_trading_guaranteed + } + } + } + + #OPTION 1 + + #Medicine friend helps you + option = { + trigger = { scope:option_1 = flag:medicine_friend_guaranteed } + name = learning_medicine.2030.a + + add_trait = confider + + scope:confider_target = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + + stress_impact = { + base = major_stress_loss + deceitful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + } + + #Regular confide in target 1 + option = { + trigger = { scope:option_1 = flag:list_character_random } + name = learning_medicine.2030.a + + #Become friends or potential friend + progress_towards_friend_effect = { + CHARACTER = scope:confider_target + REASON = friend_free_therapy + OPINION = default_friend_opinion + } + + #Might become confider + medicine_2030_confider_chance_effect = { FRIEND = scope:confider_target } + + #Save them as a confidant if they became your friend + if = { + limit = { + has_relation_friend = scope:confider_target + } + scope:confider_target = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_boldness_target_modifier = { VALUE = 30 } + ai_honor_target_modifier = { VALUE = 100 } + } + } + + #OPTION 2 + + #Regular confide in target 2 + option = { + trigger = { + exists = scope:option_2 + scope:option_2 = flag:list_character_random + } + name = learning_medicine.2030.b + + #Become friends or potential friend + progress_towards_friend_effect = { + CHARACTER = scope:confider_target_2 + REASON = friend_free_therapy + OPINION = default_friend_opinion + } + + #Might become confider + medicine_2030_confider_chance_effect = { FRIEND = scope:confider_target_2 } + + #Save them as a confidant if they became your friend + if = { + limit = { + has_relation_friend = scope:confider_target + } + scope:confider_target = { + if = { + limit = { + has_relation_best_friend = root + } + add_relation_flag = { + target = root + relation = best_friend + flag = has_been_confided_in + } + } + else = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + } + } + + stress_impact = { + deceitful = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_boldness_target_modifier = { VALUE = 30 } + ai_honor_target_modifier = { VALUE = 100 } + } + } + + #Trader secrets with target 1 + option = { + trigger = { + exists = scope:option_2 + scope:option_2 = flag:secret_trading_guaranteed + exists = scope:root_secret + } + name = learning_medicine.2030.c + + #Secret trading + scope:root_secret = { + reveal_to = scope:confider_target + } + custom_tooltip = learning_medicine.2030.c.tt + if = { + limit = { exists = scope:confider_target } + hidden_effect = { + send_interface_toast = { + title = learning_medicine.2030.c.message + left_icon = scope:confider_target + scope:confider_target_secret = { + reveal_to = root + } + } + } + } + + #Set friendship, add trait and lose stress + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:confider_target } + } + set_relation_friend = { reason = friend_confiding_each_other target = scope:confider_target } + } + + add_trait = confider + + scope:confider_target = { + add_relation_flag = { + target = root + relation = friend + flag = has_been_confided_in + } + } + + stress_impact = { + base = medium_stress_loss + deceitful = major_stress_impact_gain + paranoid = major_stress_impact_gain + shy = medium_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_boldness_target_modifier = { VALUE = 15 } + ai_honor_target_modifier = { VALUE = 30 } + } + } + + #OPTION 3 (fallback) + + #Keep secrets close to chest + option = { + name = learning_medicine.2030.d + + add_character_modifier = { + modifier = guarded_modifier + years = 15 + } + + stress_impact = { + honest = minor_stress_impact_gain + trusting = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_boldness_target_modifier = { VALUE = -30 } + ai_honor_target_modifier = { VALUE = -50 } + } + } +} + + + +################################################ +# Healthy coping mechanism: journaller or athletic +# by Mathilda Bjarnehed +################################################ + +learning_medicine.2040 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2040.t + desc = { + desc = learning_medicine.2040.start.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:friend_help + scope:friend_help = flag:athletic + } + desc = learning_medicine.2040.athletic_friend.desc + } + triggered_desc = { + trigger = { + exists = scope:friend_help + scope:friend_help = flag:journaller + } + desc = learning_medicine.2040.journaller_friend.desc + } + desc = learning_medicine.2040.no_friend.desc + } + } + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:friend + triggered_animation = { + trigger = { scope:friend_help ?= flag:journaller } + animation = writing + } + triggered_animation = { + trigger = { scope:friend_help ?= flag:athletic } + animation = hero_flex + } + animation = personality_compassionate + trigger = { + exists = scope:friend + } + } + + trigger = { + NOR = { + has_traits_that_negate_athletic_trigger = yes #Are we already athletic or does any of our traits contradict athletic? + has_trait = journaller + has_character_flag = had_event_learning_medicine_2040 + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = stress + divide = extremely_high_stress + multiply = 2 + subtract = 0.5 + max = 1 #Will end up with a modifier between -0.5 at 0 stress and 1 at upper third of stress scale + } + } + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_medicine_2040 + flag = had_event_learning_medicine_2040 + flag = had_event_learning_medicine_2040 + years = 10 + } + + #Grab a medicine friend if we have one and randomize what they can help you with + random_relation = { + type = friend + limit = { + basic_is_available_ai = yes + OR = { + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + has_trait = athletic + has_trait = journaller + } + } + save_scope_as = friend + random_list = { + 100 = { #Athletic + modifier = { + add = { + value = prowess + subtract = average_skill_rating + multiply = 10 + } + } + modifier = { + add = { + value = ai_energy + divide = high_positive_ai_value + multiply = 50 + } + } + modifier = { + factor = 0 + has_trait = journaller + } + save_scope_value_as = { + name = friend_help + value = flag:athletic + } + if = { + limit = { + NOT = { has_trait = athletic } + } + add_trait = athletic + } + } + 100 = { #Journaller + modifier = { + add = { + value = learning + subtract = average_skill_rating + multiply = 10 + } + } + modifier = { + add = { + value = ai_energy + divide = high_positive_ai_value + multiply = -30 + } + } + modifier = { + has_trait = shy + add = 30 + } + modifier = { + factor = 0 + has_trait = athletic + } + save_scope_value_as = { + name = friend_help + value = flag:journaller + } + if = { + limit = { + NOT = { has_trait = journaller } + } + add_trait = journaller + } + } + } + } + } + + #FRIEND HELP OPTIONS + + #Friend helps with athletic + option = { + trigger = { + exists = scope:friend_help + scope:friend_help = flag:athletic + } + name = learning_medicine.2040.a + + add_trait = athletic + + stress_impact = { + base = medium_stress_loss + lazy = minor_stress_impact_gain + } + } + + #Friend helps with journaller + option = { + trigger = { + exists = scope:friend_help + scope:friend_help = flag:journaller + } + name = learning_medicine.2040.b + + add_trait = journaller + + stress_impact = { + base = medium_stress_loss + dull = minor_stress_impact_gain + intellect_bad_1 = minor_stress_impact_gain + intellect_bad_2 = minor_stress_impact_gain + intellect_bad_3 = minor_stress_impact_gain + } + } + + + #REGULAR OPTIONS + + #Athletic + option = { + trigger = { + has_traits_that_negate_athletic_trigger = no #Fail-safe in case the event gets triggered somehow + OR = { + NOT = { exists = scope:friend_help } + trigger_if = { + limit = { + exists = scope:friend_help + } + NOT = { scope:friend_help = flag:athletic } + } + } + } + name = learning_medicine.2040.c + + random_list = { + 50 = { + desc = learning_medicine.2030.c.trait + send_interface_toast = { + title = learning_medicine.2030.c.trait + add_trait = athletic + stress_impact = { + base = minor_stress_loss + } + } + } + 50 = { + desc = learning_medicine.2030.c.modifier + send_interface_toast = { + title = learning_medicine.2030.c.modifier + add_character_modifier = { + modifier = exercise_modifier + years = 15 + } + } + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + } + } + + #Journaller + option = { + trigger = { + OR = { + NOT = { exists = scope:friend_help } + trigger_if = { + limit = { + exists = scope:friend_help + } + NOT = { scope:friend_help = flag:journaller } + } + } + } + name = learning_medicine.2040.d + + random_list = { + 50 = { + desc = learning_medicine.2030.d.trait + send_interface_toast = { + title = learning_medicine.2030.d.trait + add_trait = journaller + stress_impact = { + base = minor_stress_loss + } + } + } + 50 = { + desc = learning_medicine.2030.d.modifier + send_interface_toast = { + title = learning_medicine.2030.d.modifier + add_character_modifier = { + modifier = wide_vocabulary_modifier + years = 15 + } + } + } + } + + stress_impact = { + dull = minor_stress_impact_gain + intellect_bad_1 = minor_stress_impact_gain + intellect_bad_2 = minor_stress_impact_gain + intellect_bad_3 = minor_stress_impact_gain + } + } + + + #OPT OUT + option = { + name = learning_medicine.2040.e + + stress_impact = { + base = medium_stress_loss + diligent = minor_stress_impact_gain + } + } +} + + +######################################################### +# Helping healing hand (medicine friend) +# by Mathilda Bjarnehed +########################################################## + +learning_medicine.2050 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2050.start.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:physician } + desc = learning_medicine.2050.physician.desc + } + desc = learning_medicine.2050.no_physician.desc + } + desc = learning_medicine.2050.end.desc + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:soldier + animation = shiver + } + lower_right_portrait = scope:helper + + trigger = { + NOT = { + has_character_flag = had_event_learning_medicine_2050 + } + is_playable_character = yes + exists = root.capital_province.culture + number_of_maa_regiments >= 1 + } + + weight_multiplier = { + base = 1 + modifier = { + OR = { + any_knight = { prowess < average_skill_rating } + number_of_knights < max_number_of_knights + } + add = 0.5 + } + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + play_music_cue = "mx_cue_stress" + add_character_flag = { + flag = had_event_learning_medicine_2050 + years = 10 + } + #Find a helper (potential friend) + if = { + limit = { + NOT = { + any_relation = { + type = friend + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + } + } + potential_lifestyle_friend_saving_effect = { FOCUS = learning_medicine_focus SCOPE_NAME = helper } + } + else = { + random_relation = { + type = friend + limit = { + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_medicine_focus } + } + save_scope_as = helper + } + } + + #Create a soldier + create_character = { + location = root.capital_province + culture = root.capital_province.culture + faith = root.capital_province.faith + template = pool_repopulate_prowess + save_scope_as = soldier + trait = wounded_2 + } + + #Grab physician for loc + if = { + limit = { + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + this != scope:helper + is_physically_able = yes + } + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = physician + } + } + } + + #Accept help + option = { + name = learning_medicine.2050.a + + if = { + limit = { + has_relation_friend = scope:helper + } + show_as_tooltip = { medicine_2050_a_success_effect = yes } + trigger_event = learning_medicine.2051 + } + else = { + duel = { + skill = learning + value = average_skill_rating + 60 = { + desc = learning_medicine.2050.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = { + value = scope:helper.learning + subtract = average_skill_rating + multiply = 2 + min = 10 #Guaranteed help + } + } + show_as_tooltip = { medicine_2050_a_success_effect = yes } + trigger_event = learning_medicine.2051 + } + 40 = { + desc = learning_medicine.2050.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + modifier = { + add = { + value = scope:helper.learning + subtract = average_skill_rating + multiply = -2 + max = 0 #They shouldn't make this worse + } + } + show_as_tooltip = { medicine_2050_a_failure_effect = yes } + trigger_event = learning_medicine.2052 + } + } + } + + stress_impact = { + arrogant = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + #Do it yourself + option = { + name = learning_medicine.2050.b + + reverse_add_opinion = { + target = scope:helper + modifier = insult_opinion + opinion = -10 + } + + duel = { + skill = learning + value = average_skill_rating + 60 = { + desc = learning_medicine.2050.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + show_as_tooltip = { medicine_2050_b_success_effect = yes } + trigger_event = learning_medicine.2053 + } + 40 = { + desc = learning_medicine.2050.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + show_as_tooltip = { medicine_2050_b_failure_effect = yes } + trigger_event = learning_medicine.2054 + } + } + + stress_impact = { + humble = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } + + #Let them die + option = { + name = learning_medicine.2050.c + add_dread = medium_dread_gain + + + stress_impact = { + base = medium_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = medium_stress_impact_gain + just = minor_stress_impact_gain + sadistic = major_stress_impact_loss + callous = medium_stress_impact_loss + vengeful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + + if = { + limit = { + scope:helper = { ai_compassion >= low_negative_ai_value } + } + reverse_add_opinion = { + target = scope:helper + modifier = cruelty_opinion + opinion = -20 + } + progress_towards_rival_effect = { + REASON = rival_let_soldier_die + CHARACTER = scope:helper + OPINION = 0 + } + } + + scope:soldier = { + death = { + death_reason = death_wounds + } + } + + ai_chance = { + base = 20 + ai_compassion_target_modifier = { VALUE = -100 } + ai_vengefulness_target_modifier = { VALUE = 50 } + } + } + after = { + scope:soldier = { + silent_disappearance_ai_effect = yes + } + scope:helper = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +#We saved soldier together! +learning_medicine.2051 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2051.start_our.desc + desc = learning_medicine.2051.start.desc + desc = learning_medicine.2051.middle.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:helper.highest_held_title_tier >= root.highest_held_title_tier + is_spouse_of = scope:helper + is_close_family_of = scope:helper + } + } + desc = learning_medicine.2051.my_ladylord.desc + } + desc = learning_medicine.2051.firstname.desc + } + desc = learning_medicine.2051.end.desc + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:soldier + animation = admiration + } + lower_right_portrait = scope:helper + + immediate = { + medicine_2050_a_success_effect = yes + } + + option = { + name = learning_medicine.2051.a + } +} + + +#We lost the soldier together... +learning_medicine.2052 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2051.start_our.desc + desc = learning_medicine.2051.start.desc + desc = learning_medicine.2052.middle.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:helper.highest_held_title_tier >= root.highest_held_title_tier + is_spouse_of = scope:helper + is_close_family_of = scope:helper + } + } + desc = learning_medicine.2051.my_ladylord.desc + } + desc = learning_medicine.2051.firstname.desc + } + desc = learning_medicine.2052.end.desc + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:soldier + animation = dead + } + lower_right_portrait = scope:helper + + immediate = { + medicine_2050_a_failure_effect = yes + } + + #Accept comfort + option = { + name = learning_medicine.2052.a + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:helper } + } + progress_towards_friend_effect = { + CHARACTER = scope:helper + OPINION = 20 + REASON = friend_reassurance + } + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + } + + #Be proud + option = { + name = learning_medicine.2052.b + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:helper + modifier = insulted_opinion + opinion = -5 + } + + stress_impact = { + humble = minor_stress_impact_gain + } + } +} + +#I saved the soldier! +learning_medicine.2053 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2053.start_my.desc + desc = learning_medicine.2051.start.desc + desc = learning_medicine.2053.desc + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:soldier + animation = admiration + } + + immediate = { + medicine_2050_b_success_effect = yes + } + + option = { + name = learning_medicine.2053.a + } +} + +#I lost the soldier... +learning_medicine.2054 = { #by Mathilda Bjarnehed + type = character_event + title = learning_medicine.2050.t + desc = { + desc = learning_medicine.2053.start_my.desc + desc = learning_medicine.2051.start.desc + desc = learning_medicine.2054.desc + first_valid = { + triggered_desc = { + trigger = { + scope:helper = { + OR = { + ai_vengefulness >= medium_positive_ai_value + ai_compassion <= 0 + } + } + } + desc = learning_medicine.2054.disgust.desc + } + desc = learning_medicine.2054.pity.desc + } + } + + theme = learning_medicine_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:soldier + animation = dead + } + + immediate = { + medicine_2050_b_failure_effect = yes + } + + option = { + name = learning_medicine.2054.a + } +} + + +################################################## +# Tea and Cakes +# by Ewan Cowhig Croft +# 2110 +################################################## + +scripted_trigger learning_medicine_2110_valid_hashish_vassal_or_liege = { + is_available_ai_adult = yes + NOR = { + has_trait = zealous + has_trait = temperate + } + OR = { + AND = { + highest_held_title_tier = tier_barony + is_powerful_vassal_of = root + } + highest_held_title_tier >= tier_county + } +} + +# A vassal (or your liege) wants to eat some hashish while visiting your capital. +# by Ewan Cowhig Croft +learning_medicine_special.2110 = { + type = character_event + title = learning_medicine.2110.t + desc = { + desc = learning_medicine.2110.desc #Preamble. + first_valid = { + triggered_desc = { #Oh, hey, I like that guy. + trigger = { scope:hashish_relation = flag:positive } + desc = learning_medicine.2110.desc_good_terms + } + triggered_desc = { #What is this bastard doing in my city? + trigger = { scope:hashish_relation = flag:negative } + desc = learning_medicine.2110.desc_bad_terms + } + triggered_desc = { #Yes. You. Person who I have met at some point. + trigger = { scope:hashish_relation = flag:neutral } + desc = learning_medicine.2110.desc_neutral_terms + } + } + } + theme = learning_medicine_focus + override_background = { + reference = bp1_crossroads_inn + } + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:hashish_vassal_or_liege + animation = toast_goblet + } + + trigger = { + is_at_war = no + NOT = { has_character_flag = had_event_learning_medicine_2110 } + any_vassal = { learning_medicine_2110_valid_hashish_vassal_or_liege = yes } + root.capital_province = { + NOR = { + geographical_region = world_europe + geographical_region = world_asia + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_medicine_2110 + days = 1825 + } + every_vassal = { + limit = { learning_medicine_2110_valid_hashish_vassal_or_liege = yes } + add_to_list = potential_hashish_vassal_or_liege_list + } + root.liege = { + if = { + limit = { + learning_medicine_2110_valid_hashish_vassal_or_liege = yes + top_liege != this + } + add_to_list = potential_hashish_vassal_or_liege_list + } + } + random_in_list = { + list = potential_hashish_vassal_or_liege_list + weight = { + base = 1 + modifier = { #Powerful vassals are interesting characters. + add = 30 + is_powerful_vassal_of = root + } + modifier = { #Vassals who aren't on the council likely have more tense relations, so major non-councillors are a good pick. + add = 30 + AND = { + highest_held_title_tier >= tier_barony + NOT = { is_councillor_of = root } + } + } + modifier = { #What an excellent way to get over a rivalry! + add = 20 + OR = { + has_relation_potential_rival = root + has_relation_rival = root + } + } + modifier = { #Also good for dealing with factions. + add = 20 + AND = { + this != root.liege + OR = { + is_a_faction_leader = yes + is_a_faction_member = yes + } + } + } + modifier = { + add = 20 + this = root.liege + } + modifier = { #Plus weight up a little for gluttons and gloriers of gluttony. + add = 10 + OR = { + has_trait = gluttonous + faith = { trait_is_virtue = gluttonous } + } + } + modifier = { #We just like meeting interesting people, to be honest. + add = 5 + martial >= high_skill_rating + } + modifier = { + add = 5 + intrigue >= high_skill_rating + } + modifier = { + add = 5 + diplomacy >= high_skill_rating + } + modifier = { #Except barons. Barons suck. + add = -20 + highest_held_title_tier = tier_barony + } + } + save_scope_as = hashish_vassal_or_liege + } + scope:hashish_vassal_or_liege = { + if = { + limit = { + OR = { + has_relation_friend = root + has_relation_potential_friend = root + AND = { + NOR = { + has_relation_rival = root + has_relation_potential_rival = root + } + opinion = { + target = root + value >= medium_positive_opinion + } + } + } + } + save_scope_value_as = { + name = hashish_relation + value = flag:positive + } + } + else_if = { + limit = { + OR = { + has_relation_rival = root + has_relation_potential_rival = root + AND = { + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + } + opinion = { + target = root + value <= medium_negative_opinion + } + } + } + } + save_scope_value_as = { + name = hashish_relation + value = flag:negative + } + } + else = { + save_scope_value_as = { + name = hashish_relation + value = flag:neutral + } + } + } + root.capital_province = { save_scope_as = capital } + } + + option = { #You politely, but firmly, turn them down. + name = { + text = learning_medicine.2110.a.good_terms + trigger = { scope:hashish_relation = flag:positive } + } + name = { + text = learning_medicine.2110.a.bad_terms + trigger = { scope:hashish_relation = flag:negative } + } + name = { + text = learning_medicine.2110.a.neutral_terms + trigger = { scope:hashish_relation = flag:neutral } + } + scope:hashish_vassal_or_liege = { + add_opinion = { + modifier = insult_opinion + opinion = -25 + target = root + } + } + if = { #Muslims receive additional piety due to their religion's prohibitions on intoxicants. + limit = { + faith = { religion_tag = islam_religion } + } + add_piety = medium_piety_gain + } + else_if = { #If your faith hates such things, you get a little piety. + limit = { + faith = { trait_is_sin = gluttonous } + } + add_piety = minor_piety_gain + } + else_if = { #Unless they like them, in which case you confuse and annoy people. + limit = { + faith = { trait_is_virtue = gluttonous } + } + add_piety = minor_piety_loss + } + else = { add_prestige = miniscule_prestige_gain } #Otherwise you're just a bit of a neutral kill-joy, I guess. + stress_impact = { + gregarious = minor_stress_impact_gain + hashishiyah = medium_stress_impact_gain + shy = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.25 #Who the hell just turns up on my doorstep and expects me to go out? Rude. + ai_sociability = -0.5 + } + modifier = { + add = 40 + has_trait = shy + } + modifier = { + add = 30 + has_trait = temperate + } + modifier = { + add = -20 + has_trait = gregarious + } + modifier = { + add = -20 + has_trait = gluttonous + } + modifier = { + add = -30 + has_trait = hashishiyah + } + } + } + option = { #The two of you have a mellow evening of hashishery. + name = { + text = learning_medicine.2110.b.good_terms + trigger = { scope:hashish_relation = flag:positive } + } + name = { + text = learning_medicine.2110.b.bad_terms + trigger = { scope:hashish_relation = flag:negative } + } + name = { + text = learning_medicine.2110.b.neutral_terms + trigger = { scope:hashish_relation = flag:neutral } + } + flavor = learning_medicine.2110.b.flavour + scope:hashish_vassal_or_liege = { + if = { #Rivalries are overcome! + limit = { has_relation_rival = root } + remove_relation_rival = root + add_opinion = { + modifier = friendliness_opinion + opinion = 20 + target = root + } + } + else_if = { #Potential foeships are nipped in the bud. So to speak. + limit = { has_relation_potential_rival = root } + remove_relation_potential_rival = root + add_opinion = { + modifier = friendliness_opinion + opinion = 20 + target = root + } + } + } + progress_towards_friend_effect = { #Make some friends! + CHARACTER = scope:hashish_vassal_or_liege + OPINION = 30 + REASON = friend_got_high_together + } + add_character_modifier = { + modifier = cosmic_insights_modifier + days = 3650 + } + stress_impact = { + temperate = medium_stress_impact_gain + shy = minor_stress_impact_gain + hashishiyah = major_stress_impact_loss + } + if = { + limit = { + faith = { + OR = { + religion_tag = islam_religion + trait_is_sin = gluttonous + } + } + } + stress_impact = { zealous = minor_stress_impact_gain } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.5 + ai_vengefulness = -0.25 + } + modifier = { + add = 30 + has_trait = hashishiyah + } + modifier = { + add = 20 + has_trait = gluttonous + } + modifier = { + add = 10 + has_trait = gregarious + } + modifier = { + add = -20 + has_trait = temperate + } + modifier = { + add = 20 + has_trait = shy + } + } + } + option = { #You and your vassal have it large. + name = { + text = learning_medicine.2110.c.good_terms + trigger = { scope:hashish_relation = flag:positive } + } + name = { + text = learning_medicine.2110.c.bad_terms + trigger = { scope:hashish_relation = flag:negative } + } + name = { + text = learning_medicine.2110.c.neutral_terms + trigger = { scope:hashish_relation = flag:neutral } + } + duel = { + skill = learning + target = scope:hashish_vassal_or_liege + 50 = { #You steer the conversation to favour you. + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_medicine.2110.c.tt_success + send_interface_toast = { + title = learning_medicine.2110.c.tt_success + left_icon = scope:hashish_vassal_or_liege + if = { + limit = { + can_add_hook = { + target = scope:hashish_vassal_or_liege + type = manipulation_hook + } + } + add_hook = { + type = manipulation_hook + target = scope:hashish_vassal_or_liege + } + add_prestige = medium_prestige_gain + } + else = { add_prestige = major_prestige_gain } + scope:hashish_vassal_or_liege = { + add_opinion = { + modifier = friendliness_opinion + opinion = 40 + target = root + } + } + } + } + 50 = { #Your vassal manages to dominate the discussion. + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_medicine.2110.c.tt_fail + send_interface_toast = { + title = learning_medicine.2110.c.tt_fail + left_icon = scope:hashish_vassal_or_liege + scope:hashish_vassal_or_liege = { + if = { + limit = { + can_add_hook = { + target = root + type = manipulation_hook + } + } + add_hook = { + type = manipulation_hook + target = root + } + add_prestige = medium_prestige_gain + } + else = { add_prestige = major_prestige_gain } + add_opinion = { + modifier = friendliness_opinion + opinion = 30 + target = root + } + } + } + } + } + stress_impact = { + temperate = major_stress_impact_gain + shy = medium_stress_impact_gain + hashishiyah = major_stress_impact_loss + } + if = { + limit = { + faith = { + OR = { + religion_tag = islam_religion + trait_is_sin = gluttonous + } + } + } + stress_impact = { zealous = medium_stress_impact_gain } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.75 + ai_vengefulness = -0.5 + } + modifier = { + add = 40 + has_trait = hashishiyah + } + modifier = { + add = 30 + has_trait = gluttonous + } + modifier = { + add = 15 + has_trait = gregarious + } + modifier = { + add = -30 + has_trait = shy + } + modifier = { + add = -40 + has_trait = temperate + } + } + } +} + +######################################################################################### +################# SPECIAL EVENTS ######################################################## +######################################################################################### + + + +################################################## +# Study human cadavers +# by Linnéa Thimrén and Flavio Verna +################################################## + +learning_medicine_special.1001 = { + type = character_event + title = learning_medicine_special.1001.t + desc = learning_medicine_special.1001.desc + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = page_flipping + } + + trigger = { + OR = { + has_focus = learning_medicine_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + NOT = { has_character_flag = had_learning_medicine_special_1001_this_lifetime } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1.5 + has_trait = sadistic + } + modifier = { + add = 1.75 + has_trait = callous + } + } + + immediate = { + add_character_flag = { + flag = is_in_learning_special_event + days = 200 + } + add_character_flag = had_learning_medicine_special_1001_this_lifetime + } + option = { #Proceed. + name = learning_medicine_special.1001.a + custom_tooltip = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_medicine_special.1002 + days = { 3 7 } + } + ai_chance = { + base = 75 + } + } + + option = { #nah + name = learning_medicine_special.1001.b + add_piety = medium_piety_gain + remove_character_flag = is_in_learning_special_event + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.4 + ai_compassion = 0.4 + } + } + } +} + +#First botched autopsy, need more bodies. +learning_medicine_special.1002 = { + type = character_event + title = learning_medicine_special.1001.t + desc = learning_medicine_special.1002.desc + + theme = learning_medicine_focus + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:scoped_physician + animation = interested + } + immediate = { + if = { + limit = { + court_physician_available_trigger = yes + } + save_court_physician_as_effect = { SCOPE_NAME = scoped_physician } + } + + if = { + limit = { + exists = capital_county + } + capital_county = { + save_scope_as = scoped_capital + + } + } + } + option = { #Ask Court Physician to provide more bodies. + name = learning_medicine_special.1002.a + trigger = { + exists = scope:scoped_physician + } + duel = { + skill = diplomacy + target = scope:scoped_physician + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -14 + } + opinion_modifier = { #their opinion of you matters + who = scope:scoped_physician + opinion_target = root + multiplier = 0.25 + } + desc = learning_medicine_special.1002.a.good + show_as_tooltip = {add_learning_lifestyle_xp = minor_lifestyle_xp } + trigger_event = { + id = learning_medicine_special.1003 + days = { 7 14 } + } + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -14 + } + desc = learning_medicine_special.1002.a.bad + show_as_tooltip = { + scope:scoped_physician = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = -20 + } + } + } + trigger_event = { + id = learning_medicine_special.1004 + days = { 7 14 } + } + } + } + ai_chance = { + base = 50 + opinion_modifier = { #their opinion of you matters + who = scope:scoped_physician + opinion_target = root + multiplier = 0.4 + } + } + } + + option = { #Find bodies through other means... + name = learning_medicine_special.1002.b + trigger_event = { + id = learning_medicine_special.1103 + days = { 3 7 } + } + if = { + limit = { + exists = scope:scoped_capital + scope:scoped_capital.holder = root + } + scope:scoped_capital = { + add_county_modifier = { + modifier = tomb_defiler_modifier + years = 10 + } + } + } + add_learning_lifestyle_xp = minor_lifestyle_xp + stress_impact = { + base = medium_stress_impact_gain + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + } + ai_chance = { + base = 75 + } + } + + option = { #Back out + name = learning_medicine_special.1002.c + add_piety = minor_piety_gain + add_learning_lifestyle_xp = minor_lifestyle_xp + remove_character_flag = is_in_learning_special_event + ai_chance = { + base = 0 + } + } +} + +#Court Physician (or ruler) provides bodies. +learning_medicine_special.1003 = { + type = character_event + title = learning_medicine_special.1001.t + desc = { + desc = learning_medicine_special.1003.desc_physician + desc = learning_medicine_special.1003.desc_ending + } + theme = learning_medicine_focus + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:scoped_physician + animation = sick + } + + trigger = { + scope:scoped_physician = { + is_available_ai_adult = yes + } + } + + on_trigger_fail = { + trigger_event = learning_medicine_special.1004 + } + + immediate = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + option = { + name = learning_medicine_special.1003.a + duel = { + skill = learning + value = 12 + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + desc = learning_medicine_special.1003.a.good + show_as_tooltip = { add_learning_lifestyle_perk_points = 1 } + trigger_event = { + id = learning_medicine_special.1005 + days = { 7 14 } + } + } + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = learning_medicine_special.1003.a.bad + show_as_tooltip = { + if = { + limit = { + has_trait = ill + } + death = { + death_reason = death_ill + } + } + else = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { + NOT = { has_game_rule = epidemic_frequency_disabled } + } + random = { + chance = 10 + scope:scoped_capital ?= { + title_province = { + create_epidemic_outbreak = { + type = dysentery + intensity = minor + } + } + } + } + } + } + trigger_event = { + id = learning_medicine_special.1006 + days = { 7 14 } + } + } + } + } + option = { #Stop working. + name = learning_medicine_special.1003.b + add_learning_lifestyle_xp = medium_lifestyle_xp + remove_character_flag = is_in_learning_special_event + } +} + +#Gained bodies in some other fashion +learning_medicine_special.1103 = { + type = character_event + title = learning_medicine_special.1001.t + desc = { + desc = learning_medicine_special.1003.desc_fallback + desc = learning_medicine_special.1003.desc_ending + } + theme = learning_medicine_focus + left_portrait = { + character = root + animation = worry + } + + immediate = { + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + option = { + name = learning_medicine_special.1003.a + duel = { + skill = learning + value = high_skill_rating + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -14 + } + desc = learning_medicine_special.1003.a.good + show_as_tooltip = { add_learning_lifestyle_perk_points = 1 } + trigger_event = { + id = learning_medicine_special.1005 + days = { 7 14 } + } + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -14 + } + desc = learning_medicine_special.1003.a.bad + show_as_tooltip = { + if = { + limit = { + has_trait = ill + } + death = { + death_reason = death_ill + } + } + else = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { + NOT = { has_game_rule = epidemic_frequency_disabled } + } + random = { + chance = 10 + scope:scoped_capital ?= { + title_province = { + create_epidemic_outbreak = { + type = dysentery + intensity = minor + } + } + } + } + } + } + trigger_event = { + id = learning_medicine_special.1006 + days = { 7 14 } + } + } + } + } + option = { #Stop working. + name = learning_medicine_special.1003.b + add_learning_lifestyle_xp = medium_lifestyle_xp + remove_character_flag = is_in_learning_special_event + } +} + + +#Court Physician disapproves +learning_medicine_special.1004 = { + type = character_event + title = learning_medicine_special.1001.t + desc = { + triggered_desc = { + trigger = { + scope:scoped_physician = { is_available_ai_adult = yes } + } + desc = learning_medicine_special.1004.desc + } + triggered_desc = { + trigger = { + scope:scoped_physician = { is_available_ai_adult = no } + } + desc = learning_medicine_special.1004.unavailable.desc + } + } + theme = learning_medicine_focus + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:scoped_physician + animation = anger + } + + option = { + name = { + trigger = { + scope:scoped_physician = { is_available_ai_adult = yes } + } + text = learning_medicine_special.1004.a + } + name = { + trigger = { + scope:scoped_physician = { is_available_ai_adult = no } + } + text = learning_medicine_special.1004.unavailable.a + } + + if = { + limit = { + scope:scoped_physician = { is_available_ai_adult = yes } + } + scope:scoped_physician = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = -20 + } + } + } + else = { + custom_tooltip = learning_medicine_special.1004.unavailable.tt + } + + remove_character_flag = is_in_learning_special_event + } +} + +#No sickness! +learning_medicine_special.1005 = { + type = character_event + title = learning_medicine_special.1001.t + desc = learning_medicine_special.1005.desc + theme = learning_medicine_focus + left_portrait = { + character = root + animation = eccentric + } + + option = { + name = learning_medicine_special.1005.a + add_learning_lifestyle_perk_points = 1 + remove_character_flag = is_in_learning_special_event + } +} + +#Sickness +learning_medicine_special.1006 = { + type = character_event + title = learning_medicine_special.1001.t + desc = { + desc = learning_medicine_special.1006.desc_opening + first_valid = { + triggered_desc = { + trigger = { + has_trait = ill + } + desc = learning_medicine_special.1006.desc_death + } + desc = learning_medicine_special.1006.desc + } + } + theme = learning_medicine_focus + left_portrait = { + character = root + animation = sick + } + + immediate = { + random = { + chance = 10 + scope:scoped_capital ?= { + title_province = { + create_epidemic_outbreak = { + type = dysentery + intensity = minor + } + } + } + } + } + + option = { + name = learning_medicine_special.1006.a + if = { + limit = { + has_trait = ill + } + death = { + death_reason = death_ill + } + } + else = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + add_learning_lifestyle_xp = medium_lifestyle_xp + } + if = { + limit = { is_alive = yes } + remove_character_flag = is_in_learning_special_event + } + } +} + + +################################################## +# #A Most Miraculous Fish +# by Ewan Cowhig Croft +# #2100 +################################################## + +scripted_trigger learning_medicine_special_2100_broad_dreamfish_range = { + is_coastal = yes + OR = { + geographical_region = world_europe_west_britannia + geographical_region = world_europe_west_francia + geographical_region = world_europe_west_iberia + geographical_region = world_europe_south + geographical_region = world_asia_minor + geographical_region = world_middle_east_jerusalem + geographical_region = world_africa_north + geographical_region = world_africa_west + } +} + +# You consume a hallucinogenic fish. +# by Ewan Cowhig Croft +learning_medicine_special.2100 = { + type = character_event + title = learning_medicine_special.2100.t + desc = learning_medicine_special.2100.desc + theme = learning_medicine_focus + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:fish_alchemist + animation = scheme + } + + trigger = { + is_ai = no + is_at_war = no + house ?= { + NOT = { has_variable = had_event_learning_medicine_special_2100 } + } + OR = { + any_directly_owned_province = { learning_medicine_special_2100_broad_dreamfish_range = yes } + domicile ?= { + domicile_location = { + learning_medicine_special_2100_broad_dreamfish_range = yes + } + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + house ?= { + set_variable = { + name = had_event_learning_medicine_special_2100 + value = yes + days = 36500 + } + } + random_directly_owned_province = { + limit = { learning_medicine_special_2100_broad_dreamfish_range = yes } + save_scope_as = hallucinogenic_fish_locale + } + if = { + limit = { + NOT = { exists = scope:hallucinogenic_fish_locale } + } + domicile ?= { + domicile_location = { + save_scope_as = hallucinogenic_fish_locale + } + } + } + scope:hallucinogenic_fish_locale.county = { save_scope_as = hallucinogenic_fish_county }#For loc. + create_character = { + age = { 25 70 } + gender_female_chance = 50 + trait = deceitful + random_traits_list = { + count = 1 + education_diplomacy_1 = {} + education_martial_1 = {} + education_stewardship_1 = {} + education_intrigue_1 = {} + education_learning_1 = {} + } + trait = lifestyle_herbalist + random_traits_list = { + count = 1 + ambitious = {} + gregarious = {} + impatient = {} + lustful = {} + wrathful = {} + compassionate = {} + callous = {} + stubborn = {} + vengeful = {} + } + random_traits = no + employer = root + faith = scope:hallucinogenic_fish_locale.faith + culture = scope:hallucinogenic_fish_locale.culture + intrigue = 10 + learning = 10 + dynasty = none + save_scope_as = fish_alchemist + } + scope:fish_alchemist ?= { give_witch_secret_or_trait_effect = yes } + } + + option = { #Eat the hallucinogenic fish. + name = learning_medicine_special.2100.a + random_list = { + 40 = { #You seem some radical angels and such. + desc = learning_medicine_special.2100.a.tt_success + send_interface_toast = { + title = learning_medicine_special.2100.a.tt_success + left_icon = scope:fish_alchemist + add_character_modifier = { + modifier = hallucinogenic_visions_uplifting_modifier + days = 7300 + } + random_secret = { + type = secret_non_believer + remove_secret = yes + } + } + modifier = { + add = 30 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + } + 60 = { #The devil tries to rip your heart out through your kneecaps. + desc = learning_medicine_special.2100.a.tt_failure + send_interface_toast = { + title = learning_medicine_special.2100.a.tt_failure + left_icon = scope:fish_alchemist + add_character_modifier = { + modifier = hallucinogenic_visions_terrifying_modifier + days = 7300 + } + random_secret = { + type = secret_non_believer + remove_secret = yes + } + } + modifier = { + add = -30 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { ai_boldness = 0.5 } + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_shunned } + } + ai_zeal = -0.25 + } + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + ai_zeal = -0.50 + } + modifier = { + add = 20 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + modifier = { + add = -20 + has_trait = craven + } + modifier = { + add = -20 + has_trait = temperate + } + } + } + option = { #You MUST teach me this ritual! + name = learning_medicine_special.2100.b + duel = { + skill = learning + target = scope:fish_alchemist + 60 = { #The alchemist teaches you where to catch the right fish and how to prepare them. + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_medicine_special.2100.b.tt_success + send_interface_toast = { + title = learning_medicine_special.2100.b.tt_success + left_icon = scope:fish_alchemist + if = { + limit = { number_of_lifestyle_traits = 0 } + add_trait = lifestyle_herbalist + } + add_learning_skill = 5 + if = { + limit = { + NOT = { + any_secret = { type = secret_witch } + } + } + give_witch_secret_or_trait_effect = yes + } + custom_tooltip = learning_medicine_special.2100.b.tt_success.tt + hidden_effect = { + scope:fish_alchemist = { + add_opinion = { + target = root + modifier = loyal_servant + } + set_relation_potential_friend = root + } + } + } + } + 40 = { #The alchemist is having none of your tomfoolery, and flees the court, causing a scandal. + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_medicine_special.2100.b.tt_fail + send_interface_toast = { + title = learning_medicine_special.2100.b.tt_fail + left_icon = scope:fish_alchemist + add_character_modifier = { + modifier = associates_with_strange_peasants_modifier + days = 3650 + } + if = { + limit = { has_any_nickname = no } + give_nickname = nick_the_fishy + } + custom_tooltip = learning_medicine_special.2100.b.tt_failure.tt + hidden_effect = { + scope:fish_alchemist = { + move_to_pool = yes + add_opinion = { + modifier = spell_thief_attempted_opinion + target = root + } + set_relation_potential_rival = root + } + } + } + } + } + if = { + limit = { + faith = { + OR = { + has_doctrine_parameter = witchcraft_shunned + has_doctrine_parameter = witchcraft_illegal + } + } + } + stress_impact = { zealous = medium_stress_impact_gain } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.25 + ai_greed = 0.25 + } + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_shunned } + } + ai_zeal = -0.50 + } + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + ai_zeal = -0.75 + } + modifier = { + add = 20 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + modifier = { + add = -20 + trigger = { + faith = { + OR = { + has_doctrine_parameter = witchcraft_shunned + has_doctrine_parameter = witchcraft_illegal + } + } + } + has_trait = zealous + } + } + } + option = { #Suffer not the witch to live. + name = learning_medicine_special.2100.c + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + add_piety = major_piety_gain + custom_tooltip = learning_medicine_special.2100.c.tt + hidden_effect = { + scope:fish_alchemist = { + death = { + death_reason = death_burned_witch + killer = root + } + } + } + stress_impact = { compassionate = medium_stress_impact_gain } + ai_chance = { + base = 50 + ai_value_modifier = { + trigger = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + ai_zeal = 0.75 + } + modifier = { + add = -20 + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_mystic + has_trait = witch + any_secret = { type = secret_witch } + } + } + modifier = { + add = -30 + has_trait = compassionate + } + modifier = { + add = 20 + has_trait = callous + } + modifier = { + add = 30 + has_trait = sadistic + } + } + } + option = { #Magic or no, get this commoner out of my good [faith] court. + name = learning_medicine_special.2100.d + if = { + limit = { + faith = { has_doctrine_parameter = witchcraft_shunned } + } + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + faith = { has_doctrine_parameter = witchcraft_illegal } + } + add_prestige = medium_prestige_gain + } + add_character_modifier = { + modifier = aloof_from_the_commoners_modifier + days = 3650 + } + custom_tooltip = learning_medicine_special.2100.d.tt + hidden_effect = { + scope:fish_alchemist = { + move_to_pool = yes + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -30 + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = -0.25 + } + } + } +} diff --git a/N3OW/events/lifestyles/scholarship_lifestyle/learning_scholarship_events.txt b/N3OW/events/lifestyles/scholarship_lifestyle/learning_scholarship_events.txt new file mode 100644 index 00000000..094403ab --- /dev/null +++ b/N3OW/events/lifestyles/scholarship_lifestyle/learning_scholarship_events.txt @@ -0,0 +1,4559 @@ +namespace = learning_scholarship + +namespace = learning_scholarship_special + +################################################## + +# Learning Scholarship Lifestyle events + + # 1101 - Learn to Read + # 1201 - Automaton + # 1401 - Reading Stone + # 3001 - Brass Orb Experiments + # 4000 - Dear God, go outside + # 5000-5007 - Bibliomancy + # 6000 - The Man of Few Letters + +#Special Learning Scholarship Lifestyle events + + # 2001 - Translate Great Work + # 3001 - Lead to Gold + +################################################## + +################################################## +# Learn to read +# by Linnéa Thimrén +################################################## +learning_scholarship.1101 = { + type = character_event + title = learning_scholarship.1101.t + desc = learning_scholarship.1101.desc + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:bishop + animation = happy_teacher + } + + trigger = { + NOT = { + has_character_flag = had_event_learning_scholarship_1101 + } + learning < mediocre_skill_rating #triggers if you need a boost + OR = { + AND = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_ai = yes + } + } + AND = { + has_government = landless_adventurer_government + any_court_position_holder = { + learning > high_skill_rating + } + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_scholarship_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_scholarship_1101 + years = 5 + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + else = { + random_court_position_holder = { + limit = { + learning > high_skill_rating + } + save_scope_as = bishop + } + } + } + + option = { #Accept help + name = learning_scholarship.1101.a + add_learning_skill = 1 + add_stress = minor_stress_gain + add_learning_lifestyle_xp = miniscule_lifestyle_xp + if = { + limit = { + exists = scope:bishop + } + add_opinion = { + target = scope:bishop + modifier = grateful_opinion + opinion = 20 + } + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_compassion = 0.5 + ai_rationality = 0.25 + } + } + } + + option = { #nah + name = learning_scholarship.1101.b + add_prestige = medium_prestige_gain + add_stress = minor_stress_loss + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = arrogant + } + } + } +} + + +################################################## +# Automaton +# by Linnéa Thimrén & Mathilda Bjarnehed +################################################## +scripted_trigger learning_scholarship_1201_friendly_ruler_trigger = { + is_adult = yes + basic_is_available_ai = yes + NOR = { + is_at_war_with = root + government_has_flag = government_is_tribal + } + is_landed = yes + exists = capital_province + capital_province.culture = { has_innovation = innovation_guilds } #Highly Advanced mechanical bird should not come from an underdeveloped tribe. + OR = { + highest_held_title_tier >= tier_kingdom + AND = { + learning >= high_skill_rating + highest_held_title_tier >= tier_duchy + } + } + opinion = { + target = root + value >= neutral_opinion + } +} + +learning_scholarship.1201 = { + type = character_event + title = learning_scholarship.1201.t + desc = learning_scholarship.1201.desc + + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:bird_sender + animation = happiness + } + + trigger = { + NOT = { + has_character_flag = had_event_learning_scholarship_1201 + } + OR = { + AND = { + top_liege = this + any_neighboring_and_across_water_top_liege_realm_owner = { + learning_scholarship_1201_friendly_ruler_trigger = yes + } + } + any_vassal = { + learning_scholarship_1201_friendly_ruler_trigger = yes + } + AND = { + exists = liege + liege != root + liege = { learning_scholarship_1201_friendly_ruler_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + top_liege = this + any_neighboring_and_across_water_top_liege_realm_owner = { + learning_scholarship_1201_friendly_ruler_trigger = yes + opinion = { + target = root + value >= medium_positive_opinion + } + } + } + upweight_for_focus_modifier = { FOCUS = learning_scholarship_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_scholarship_1201 + years = 5 + } + #Pick someone who sent the bird + if = { + limit = { + top_liege = this + } + every_neighboring_and_across_water_top_liege_realm_owner = { + limit = { learning_scholarship_1201_friendly_ruler_trigger = yes } + add_to_list = bird_senders + } + } + every_vassal = { + limit = { learning_scholarship_1201_friendly_ruler_trigger = yes } + add_to_list = bird_senders + } + if = { + limit = { + exists = liege + liege != root + liege = { learning_scholarship_1201_friendly_ruler_trigger = yes } + } + liege = { add_to_list = bird_senders } + } + random_in_list = { + list = bird_senders + weight = { + base = 0 + opinion_modifier = { + opinion_target = root + } + } + save_scope_as = bird_sender + } + } + + option = { #have it sing in your halls + name = learning_scholarship.1201.b + + add_character_modifier = { + modifier = scholarship_bird_automaton_modifier + years = 15 + } + reverse_add_opinion = { + target = scope:bird_sender + modifier = pleased_opinion + opinion = 20 + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.5 + ai_energy = 0.25 + } + } + } + + option = { #sell + name = learning_scholarship.1201.a + add_gold = medium_gold_value + + reverse_add_opinion = { + target = scope:bird_sender + modifier = angry_opinion + opinion = -20 + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } + + + option = { #take apart and study! + name = learning_scholarship.1201.c + add_character_modifier = { + modifier = scholarship_bird_dissection_modifier + years = 15 + } + add_learning_lifestyle_xp = medium_lifestyle_xp + + random_list = { + 20 = { #They like your inquisitiveness + modifier = { + #At decent learning, x6 (60% chance) + #At high learning, x15 (~80% chance) + scope:bird_sender.learning >= medium_skill_rating + factor = { + value = scope:bird_sender.learning + subtract = medium_skill_rating + multiply = 3 + } + } + show_chance = no + desc = learning_scholarship.1201.c.success + send_interface_toast = { + left_icon = scope:bird_sender + title = learning_scholarship.1201.c.success + reverse_add_opinion = { + target = scope:bird_sender + modifier = respect_opinion + opinion = 20 + } + } + hidden_effect = { + progress_towards_friend_effect = { + CHARACTER = scope:bird_sender + OPINION = 0 + REASON = friend_curiosity_mech_bird + } + } + } + 80 = { #They are offended + desc = learning_scholarship.1201.c.failure + show_chance = no + send_interface_toast = { + left_icon = scope:bird_sender + title = learning_scholarship.1201.c.failure + reverse_add_opinion = { + target = scope:bird_sender + modifier = angry_opinion + opinion = -20 + } + } + } + } + + ai_chance = { + base = 100 + } + } +} + +################################################## +# Acquire a reading stone +# by Linnéa Thimrén +################################################## +learning_scholarship.1401 = { + type = character_event + title = learning_scholarship.1401.t + desc = learning_scholarship.1401.desc + + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = reading + } + right_portrait = { + character = scope:bishop + animation = interested + } + + trigger = { + NOR = { + has_character_flag = had_event_learning_scholarship_1401 + has_trait = blind + } + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + + weight_multiplier = { + base = 0.25 + modifier = { + # Becomes increasingly common as characters get older. + # Additional 1.75 weight at 35 years of age (x2 as likely as normal event) + # Average age for people needing reading glasses is 40-45 in real life. + add = { + value = age + multiply = 0.05 + } + } + upweight_for_focus_modifier = { FOCUS = learning_scholarship_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_scholarship_1401 + years = 10 + } + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + NOT = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + } + + option = { #Ask Chaplain for help + name = learning_scholarship.1401.c + trigger = { + exists = scope:bishop + } + add_learning_lifestyle_xp = major_lifestyle_xp + scope:bishop = { + if = { + limit = { + can_add_hook = { + target = root + type = favor_hook + } + } + add_hook = { + target = root + type = favor_hook + } + } + } + ai_chance = { + base = 75 + } + } + + option = { #Get a reading stone + name = learning_scholarship.1401.a + remove_short_term_gold = medium_gold_value + add_learning_lifestyle_xp = major_lifestyle_xp + if = { + limit = { + NOT = { government_has_flag = government_is_nomadic } + } + add_character_flag = has_reading_glasses + } + ai_chance = { + base = 5 + } + } + + option = { #Sell all writing that's too small + name = learning_scholarship.1401.b + add_gold = medium_gold_value + add_stress = minor_stress_loss + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } +} + + +################################################## +# Scientific Experiments +# by Petter Vilberg +################################################## +#Brass orbs and candles +learning_scholarship.3001 = { + type = character_event + title = learning_scholarship.3001.t + desc = learning_scholarship.3001.desc + + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = manic + } + right_portrait = { + character = scope:chaplain + animation = worry + } + + trigger = { + NOT = { has_character_flag = had_event_learning_scholarship_3001 } + religion_has_angels_trigger = yes + OR = { + exists = cp:councillor_court_chaplain + AND = { + has_government = landless_adventurer_government + any_court_position_holder = { + learning > high_skill_rating + } + } + } + } + + weight_multiplier = { + base = 1 + downweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_scholarship_3001 + years = 5 + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + } + } + else = { + random_court_position_holder = { + limit = { + learning > high_skill_rating + } + save_scope_as = chaplain + } + } + } + + option = { + name = learning_scholarship.3001.c + duel = { + skill = learning + target = scope:chaplain + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -14 + } + desc = learning_scholarship.3001.c.tt1 + send_interface_toast = { + title = learning_scholarship.3001.c.toast.tt1 + add_learning_lifestyle_xp = medium_lifestyle_xp + } + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -14 + } + desc = learning_scholarship.3001.c.tt2 + send_interface_toast = { + title = learning_scholarship.3001.c.toast.tt2 + scope:chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -5 + } + } + } + } + } + } + + option = { + name = learning_scholarship.3001.a + add_learning_lifestyle_xp = minor_lifestyle_xp + scope:chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -25 + } + } + cynical_progression_effect = yes + } + + option = { + name = learning_scholarship.3001.b + add_learning_lifestyle_xp = miniscule_lifestyle_xp + scope:chaplain = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 20 + } + } + zealous_progression_effect = yes + } +} + +################################################################################################################################ +################################################################################################################################ + +################################################## +# Translate a Great Work +# by Petter Vilberg +################################################## +learning_scholarship_special.2001 = { + type = character_event + title = learning_scholarship_special.2001.t + desc = learning_scholarship_special.2001.desc + + left_portrait = { + character = root + animation = page_flipping + } + theme = learning_scholarship_focus + + trigger = { + is_ai = no #Limit the amount of story cycles for AI + OR = { + has_focus = learning_scholarship_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + NOT = { has_character_flag = had_learning_scholarship_special_2001_this_lifetime } + NOT = { has_character_flag = had_book_translation_story } + any_courtier = { #Requires a scribe + count >= 1 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = is_in_learning_special_event + days = 365 + } + add_character_flag = had_learning_scholarship_special_2001_this_lifetime + + pick_translation_book_effect = { + OPTION = option_1 + } + pick_translation_book_effect = { + OPTION = option_2 + } + } + + option = { + name = learning_scholarship_special.2001.regula_pastoralis + trigger = { + OR = { + scope:option_1 = flag:regula_pastoralis + scope:option_2 = flag:regula_pastoralis + } + } + set_up_translation_story_effect = { + BOOK = regula_pastoralis + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.physica_elementa + trigger = { + OR = { + scope:option_1 = flag:physica_elementa + scope:option_2 = flag:physica_elementa + } + } + set_up_translation_story_effect = { + BOOK = physica_elementa + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.almagest + trigger = { + OR = { + scope:option_1 = flag:almagest + scope:option_2 = flag:almagest + } + } + set_up_translation_story_effect = { + BOOK = almagest + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.elements + trigger = { + OR = { + scope:option_1 = flag:elements + scope:option_2 = flag:elements + } + } + set_up_translation_story_effect = { + BOOK = elements + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.corpus_hermeticus + trigger = { + OR = { + scope:option_1 = flag:corpus_hermeticus + scope:option_2 = flag:corpus_hermeticus + } + } + set_up_translation_story_effect = { + BOOK = corpus_hermeticus + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.treatises_of_hippocrates + trigger = { + OR = { + scope:option_1 = flag:treatises_of_hippocrates + scope:option_2 = flag:treatises_of_hippocrates + } + } + set_up_translation_story_effect = { + BOOK = treatises_of_hippocrates + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.peri_psyches + trigger = { + OR = { + scope:option_1 = flag:peri_psyches + scope:option_2 = flag:peri_psyches + } + } + set_up_translation_story_effect = { + BOOK = peri_psyches + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.kategoriai + trigger = { + OR = { + scope:option_1 = flag:kategoriai + scope:option_2 = flag:kategoriai + } + } + set_up_translation_story_effect = { + BOOK = kategoriai + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.avesta + trigger = { + OR = { + scope:option_1 = flag:avesta + scope:option_2 = flag:avesta + } + } + set_up_translation_story_effect = { + BOOK = avesta + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.de_oratore + trigger = { + OR = { + scope:option_1 = flag:de_oratore + scope:option_2 = flag:de_oratore + } + } + set_up_translation_story_effect = { + BOOK = de_oratore + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.book_of_arda_viraf + trigger = { + OR = { + scope:option_1 = flag:book_of_arda_viraf + scope:option_2 = flag:book_of_arda_viraf + } + } + set_up_translation_story_effect = { + BOOK = book_of_arda_viraf + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.upanishads + trigger = { + OR = { + scope:option_1 = flag:upanishads + scope:option_2 = flag:upanishads + } + } + set_up_translation_story_effect = { + BOOK = upanishads + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.rigveda + trigger = { + OR = { + scope:option_1 = flag:rigveda + scope:option_2 = flag:rigveda + } + } + set_up_translation_story_effect = { + BOOK = rigveda + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.book_of_balances + trigger = { + OR = { + scope:option_1 = flag:book_of_balances + scope:option_2 = flag:book_of_balances + } + } + set_up_translation_story_effect = { + BOOK = book_of_balances + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.secret_of_secrets + trigger = { + OR = { + scope:option_1 = flag:secret_of_secrets + scope:option_2 = flag:secret_of_secrets + } + } + set_up_translation_story_effect = { + BOOK = secret_of_secrets + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.court_of_agriculture + trigger = { + OR = { + scope:option_1 = flag:court_of_agriculture + scope:option_2 = flag:court_of_agriculture + } + } + set_up_translation_story_effect = { + BOOK = court_of_agriculture + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.lanterns_of_wisdom + trigger = { + OR = { + scope:option_1 = flag:lanterns_of_wisdom + scope:option_2 = flag:lanterns_of_wisdom + } + } + set_up_translation_story_effect = { + BOOK = lanterns_of_wisdom + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.shahnameh + trigger = { + OR = { + scope:option_1 = flag:shahnameh + scope:option_2 = flag:shahnameh + } + } + set_up_translation_story_effect = { + BOOK = shahnameh + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.arithmetica + trigger = { + OR = { + scope:option_1 = flag:arithmetica + scope:option_2 = flag:arithmetica + } + } + set_up_translation_story_effect = { + BOOK = arithmetica + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.pali_canon + trigger = { + OR = { + scope:option_1 = flag:pali_canon + scope:option_2 = flag:pali_canon + } + } + set_up_translation_story_effect = { + BOOK = pali_canon + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.the_norse_sagas + trigger = { + OR = { + scope:option_1 = flag:the_norse_sagas + scope:option_2 = flag:the_norse_sagas + } + } + set_up_translation_story_effect = { + BOOK = the_norse_sagas + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.family_history + trigger = { + OR = { + scope:option_1 = flag:family_history + scope:option_2 = flag:family_history + } + } + set_up_translation_story_effect = { + BOOK = family_history + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.ancient_myths + trigger = { + OR = { + scope:option_1 = flag:ancient_myths + scope:option_2 = flag:ancient_myths + } + } + set_up_translation_story_effect = { + BOOK = ancient_myths + } + custom_tooltip = learning_lifestyle_rank_up_indication + } + + option = { + name = learning_scholarship_special.2001.decline + stress_impact = { + base = minor_stress_loss + } + remove_character_flag = is_in_learning_special_event + } +} + +#Confusing passage +learning_scholarship_special.2011 = { + type = character_event + title = learning_scholarship_special.2001.t + desc = learning_scholarship_special.2011.desc + + left_portrait = { + character = root + animation = stressed_teacher + } + theme = learning_scholarship_focus + + trigger = { + NOR = { + exists = scope:story.var:had_learning_scholarship_special_2011 + is_imprisoned = yes + has_trait = incapable + } + } + + immediate = { + scope:story = { + set_variable = { + name = had_learning_scholarship_special_2011 + value = yes + } + } + } + + option = { #My interpretation is better + name = learning_scholarship_special.2011.a + duel = { + skill = learning + value = average_skill_rating + + 20 = { + desc = learning_scholarship_special.2011.a.success + compare_modifier = { + value = scope:duel_value + } + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + send_interface_toast = { + title = book_translation_toast.more_good + left_icon = root + add_prestige = medium_prestige_gain + } + } + 20 = { + desc = learning_scholarship_special.2011.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + custom_tooltip = book_translation_tooltip.unchanged + send_interface_toast = { + title = book_translation_toast.unchanged + left_icon = root + add_prestige = minor_prestige_gain + } + } + } + cynical_progression_effect = yes + } + + option = { #Let's stay true to the text + name = learning_scholarship_special.2011.b + add_piety = medium_piety_gain + learning_scholarship_special_2011_somewhat_improve_translation_effect = yes + zealous_progression_effect = yes + } + + option = { #Oh, the meaning is obvious + name = learning_scholarship_special.2011.c + trigger = { + has_trait = scholar + } + trait = scholar + add_prestige = minor_prestige_gain + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + } + + option = { #Oh, the meaning is obvious + name = learning_scholarship_special.2011.c + trigger = { + NOT = { has_trait = scholar } + learning >= very_high_skill_rating + } + skill = learning + add_prestige = minor_prestige_gain + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + } +} + +#Realm Priest offers help +learning_scholarship_special.2012 = { + type = character_event + title = learning_scholarship_special.2001.t + desc = learning_scholarship_special.2012.desc + + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = reading + } + right_portrait = { + character = scope:realm_priest + animation = happy_teacher + } + + trigger = { + OR = { + AND = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_ai = yes + } + } + employs_court_position = camp_priest_camp_officer + } + NOR = { + exists = scope:story.var:had_learning_scholarship_special_2012 + is_imprisoned = yes + has_trait = incapable + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + cp:councillor_court_chaplain = { + opinion = { + target = root + value < 30 + } + } + } + } + + immediate = { + scope:story = { + set_variable = { + name = had_learning_scholarship_special_2012 + value = yes + } + } + cp:councillor_court_chaplain ?= { + save_scope_as = realm_priest + } + if = { + limit = { + NOT = { exists = scope:realm_priest } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = realm_priest + } + } + } + + option = { + name = learning_scholarship_special.2012.a + scope:realm_priest = { + duel = { + skill = learning + value = average_skill_rating + 20 = { + desc = learning_scholarship_special.2012.a.success + compare_modifier = { + value = scope:duel_value + } + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + send_interface_toast = { + title = book_translation_toast.more_good + left_icon = scope:realm_priest + add_learning_lifestyle_xp = minor_lifestyle_xp + } + } + 20 = { + desc = learning_scholarship_special.2012.a.failure + compare_modifier = { + value = scope:duel_value + } + learning_scholarship_special_2011_somewhat_improve_translation_effect = yes + send_interface_toast = { + title = book_translation_toast.less_good + left_icon = scope:realm_priest + } + } + } + } + } + + option = { + name = learning_scholarship_special.2012.b + scope:realm_priest = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + add_prestige = minor_prestige_loss + learning_scholarship_special_2011_somewhat_improve_translation_effect = yes + } + + option = { + name = learning_scholarship_special.2012.c + trigger = { + has_relation_friend = scope:realm_priest + } + custom_tooltip = learning_scholarship_special.2012.c.friendship_tooltip + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + scope:realm_priest = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = low_positive_opinion + } + } + } +} + +#Sudden Insight +learning_scholarship_special.2013 = { + type = character_event + title = learning_scholarship_special.2001.t + desc = learning_scholarship_special.2013.desc + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = happy_teacher + } + + trigger = { + NOR = { + exists = scope:story.var:had_learning_scholarship_special_translation_quality_event + is_imprisoned = yes + has_trait = incapable + } + } + + immediate = { + scope:story = { + set_variable = { + name = had_learning_scholarship_special_translation_quality_event + value = yes + } + } + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + add_learning_lifestyle_xp = minor_lifestyle_xp + } + + option = { #Unlike ReligiousText... + name = learning_scholarship_special.2013.a + cynical_progression_effect = yes + add_prestige = medium_prestige_gain + + } + + option = { #As evident from the will of HighGod... + name = learning_scholarship_special.2013.b + zealous_progression_effect = yes + add_piety = medium_piety_gain + } +} + +#The Book is Boring +learning_scholarship_special.2014 = { + type = character_event + title = learning_scholarship_special.2001.t + desc = learning_scholarship_special.2014.desc + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = eyeroll + } + + trigger = { + NOR = { + exists = scope:story.var:had_learning_scholarship_special_translation_quality_event + is_imprisoned = yes + has_trait = incapable + } + } + + immediate = { + scope:story = { + set_variable = { + name = had_learning_scholarship_special_translation_quality_event + value = yes + } + } + } + + option = { #I'll still get it done! + name = learning_scholarship_special.2014.a + add_stress = medium_stress_gain + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + } + + option = { #My scribes can work overtime + name = learning_scholarship_special.2014.b + remove_short_term_gold = 2 + learning_scholarship_special_2011_somewhat_improve_translation_effect = yes + } + + option = { #Take a break + name = learning_scholarship_special.2014.c + add_stress = medium_stress_loss + custom_tooltip = book_translation_tooltip.unchanged + } +} + +#Working long into the night +learning_scholarship_special.2015 = { + type = character_event + title = learning_scholarship_special.2001.t + desc = learning_scholarship_special.2015.desc + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = page_flipping + } + right_portrait = { + character = scope:realm_priest + animation = worry + } + + trigger = { + NOR = { + exists = scope:story.var:had_learning_scholarship_special_2015 + is_imprisoned = yes + has_trait = incapable + } + } + + immediate = { + scope:story = { + set_variable = { + name = had_learning_scholarship_special_2015 + value = yes + } + } + } + + option = { # Let's keep going + name = learning_scholarship_special.2015.a + # Note: This option is intentionally worse in almost all situations + learning_scholarship_special_2011_somewhat_improve_translation_effect = yes + speed_up_translation_effect = yes + add_learning_lifestyle_xp = minor_lifestyle_xp + add_stress = minor_stress_gain + } + + option = { # Get some rest + name = learning_scholarship_special.2015.b + add_learning_lifestyle_xp = miniscule_lifestyle_xp + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + } + + option = { # Scribes can work while I sleep + name = learning_scholarship_special.2015.c + custom_tooltip = book_translation_tooltip.unchanged + add_stress = medium_stress_loss + } +} + +# Scribe makes unapproved changes +learning_scholarship_special.2016 = { + type = character_event + title = learning_scholarship_special.2001.t + desc = learning_scholarship_special.2016.desc + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = stressed_teacher + } + + trigger = { + NOR = { + exists = scope:story.var:had_learning_scholarship_special_2016 + is_imprisoned = yes + has_trait = incapable + } + } + + immediate = { + scope:story = { + set_variable = { + name = had_learning_scholarship_special_2016 + value = yes + } + } + } + + option = { # Get out of here! + name = learning_scholarship_special.2016.a + learning_scholarship_special_2011_somewhat_improve_translation_effect = yes + add_prestige = minor_prestige_loss + } + + option = { # The rest of you better learn from this + name = learning_scholarship_special.2016.b + flavor = learning_scholarship_special.2016.b.flavor + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + add_character_modifier = { + modifier = terrified_courtiers_modifier + years = 5 + } + } + + option = { # These are pretty good, actually + name = learning_scholarship_special.2016.c + learning_scholarship_special_2011_somewhat_improve_translation_effect = yes + speed_up_translation_effect = yes + } +} + +# Tired from constant work +learning_scholarship_special.2017 = { + type = character_event + title = learning_scholarship_special.2001.t + desc = learning_scholarship_special.2017.desc + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = sadness + } + + trigger = { + NOR = { + exists = scope:story.var:had_learning_scholarship_special_2017 + is_imprisoned = yes + has_trait = incapable + } + } + + immediate = { + scope:story = { + set_variable = { + name = had_learning_scholarship_special_2017 + value = yes + } + } + } + + option = { # I can do a few more events- I mean pages, at least + name = learning_scholarship_special.2017.a + add_stress = medium_stress_gain + learning_scholarship_special_2011_significantly_improve_translation_effect = yes + } + + option = { # I will seclude myself with prayer and focus + name = learning_scholarship_special.2017.b + add_prestige = medium_prestige_gain + learning_scholarship_special_2011_somewhat_improve_translation_effect = yes + } + + option = { # I'd rather do something else + name = learning_scholarship_special.2017.c + add_stress = minor_stress_loss + custom_tooltip = book_translation_tooltip.unchanged + } +} + + +# Good outcome of the translation +learning_scholarship_special.2097 = { + type = character_event + title = learning_scholarship_special.2097.t + desc = { + desc = learning_scholarship_special.2097.opening + desc = learning_scholarship_special.2097.conclusion + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = happiness + } + + option = { + name = learning_scholarship_special.2097.a + add_character_modifier = { + modifier = book_translation_excellent_modifier + years = 10 + } + add_learning_lifestyle_perk_points = 1 + } + + after = { + remove_character_modifier = book_translation_ongoing_modifier + hidden_effect = { + scope:story = { + end_story = yes + } + } + } +} + + +# Bad outcome of the translation +learning_scholarship_special.2098 = { + type = character_event + title = learning_scholarship_special.2098.t + desc = { + desc = learning_scholarship_special.2098.opening + desc = learning_scholarship_special.2098.conclusion + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = happiness + } + + option = { + name = learning_scholarship_special.2098.a + add_character_modifier = { + modifier = book_translation_mediocre_modifier + years = 10 + } + add_learning_lifestyle_perk_points = 1 + } + + after = { + remove_character_modifier = book_translation_ongoing_modifier + hidden_effect = { + scope:story = { + end_story = yes + } + } + } +} + +### Great Work Translation - END + +################################################## +# Lead to Gold # +# by Sean Hughes and Linnéa Thimrén # +# 3001-3005 # +################################################## + +# Could these scribbles in this book actually be useful information? +learning_scholarship_special.3001 = { + type = character_event + title = learning_scholarship_special.3001.t + desc = { + desc = learning_scholarship_special.3001.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:alchemist + } + desc = learning_scholarship_special.3001.desc_alchemist + } + desc = learning_scholarship_special.3001.desc + } + desc = learning_scholarship_special.3001.desc_ending + } + theme = learning_scholarship_focus + left_portrait = { + character = root + triggered_animation = { + trigger = { exists = scope:alchemist } + animation = eccentric + } + animation = page_flipping + } + right_portrait = { + trigger = { exists = scope:alchemist } + character = scope:alchemist + animation = page_flipping + } + + trigger = { + OR = { + has_focus = learning_scholarship_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + NOT = { has_character_flag = had_learning_scholarship_special_3001_this_lifetime } + } + + weight_multiplier = { + base = 1 + modifier = { # A bit more likely to trigger if we are currently sponsoring an alchemist + add = 0.25 + any_sponsored_inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { is_available_ai_adult = yes } + } + } + modifier = { # A lot more likely to trigger if we are currently sponsoring an alchemist that's looking into gold + add = 4 + any_sponsored_inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { + is_available_ai_adult = yes + exists = var:artifact_alchemy_type_metal_subtype + var:artifact_alchemy_type_metal_subtype = flag:gold + } + } + } + } + + immediate = { + add_character_flag = { + flag = is_in_learning_special_event + days = 200 + } + add_character_flag = had_learning_scholarship_special_3001_this_lifetime + + # Let's save the alchemist we're sponsoring! + if = { + limit = { + any_sponsored_inspiration = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { is_available_ai_adult = yes } + } + } + random_sponsored_inspiration = { + limit = { + has_inspiration_type = alchemy_inspiration + inspiration_owner = { is_available_ai_adult = yes } + } + inspiration_owner = { + save_scope_as = alchemist + } + } + } + } + + # Option A: Attempt the experiment! + option = { + name = learning_scholarship_special.3001.a + custom_tooltip = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_scholarship_special.3002 + days = { 5 9 } + } + + if = { + limit = { + faith = { + OR = { + NOT = { has_doctrine_parameter = witchcraft_accepted } + trait_is_sin = greedy + } + } + } + stress_impact = { + # Non-trusting characters find this notion to be absurd. + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + + # If greed is a sin, this path is also stressful for zealous characters. + zealous = minor_stress_impact_gain + } + } + else = { + stress_impact = { + # Non-trusting characters find this notion to be absurd. + cynical = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + } + ai_chance = { + base = 33 + + ai_value_modifier = { + ai_greed = 500 + ai_zeal = -200 + ai_rationality = -100 + } + } + } + + # Option B: Cynical Opt-Out (it really is a silly idea, even if it technically works) + option = { + name = learning_scholarship_special.3001.b + add_character_modifier = { + modifier = logical_thinking_modifier + years = 5 + } + cynical_progression_effect = yes + + + stress_impact = { + eccentric = medium_stress_impact_gain + greedy = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 33 + + ai_value_modifier = { + ai_zeal = -100 + ai_rationality = 200 + } + } + } + + # Option C-1: Zealous Opt-Out (requires Greedy to be a sin) + option = { + trigger = { + faith = { + trait_is_sin = greedy + } + } + name = learning_scholarship_special.3001.c + + add_piety = medium_piety_gain + zealous_progression_effect = yes + + stress_impact = { + eccentric = medium_stress_impact_gain + cynical = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 33 + + ai_value_modifier = { + ai_zeal = 200 + } + } + } + + # Option C-2: Zealous Opt-Out (requires Witchcraft to be shunned or criminal) + option = { + trigger = { + faith = { + NOR = { + has_doctrine_parameter = witchcraft_accepted + trait_is_sin = greedy + } + } + } + name = learning_scholarship_special.3001.d + + add_piety = medium_piety_gain + zealous_progression_effect = yes + + stress_impact = { + greedy = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 33 + + ai_value_modifier = { + ai_zeal = 200 + } + } + } +} + + +# Okay, so how do we get our lead? +# scripted trigger to make sure the alchemist is still available (if we're using them) +scripted_trigger learning_scholarship_special_3001_alchemist_available_trigger = { + exists = scope:alchemist + scope:alchemist = { + is_alive = yes + is_available_ai_adult = yes + } +} + +learning_scholarship_special.3002 = { + type = character_event + title = learning_scholarship_special.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:alchemist + } + desc = learning_scholarship_special.3002.desc_alchemist + } + desc = learning_scholarship_special.3002.desc + } + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = physician + } + right_portrait = { + trigger = { exists = scope:alchemist } + character = scope:alchemist + animation = page_flipping + } + + trigger = { + NOR = { + is_imprisoned = yes + has_trait = incapable + } + } + on_trigger_fail = { + trigger_event = learning_scholarship_special.3099 + } + + immediate = { + if = { #If the alchemist is no longer around we clear them out + limit = { + learning_scholarship_special_3001_alchemist_available_trigger = no + } + clear_saved_scope = alchemist + } + } + + # Option A: Buy it! The safer choice. + option = { + trigger = { + OR = { + is_ai = no + short_term_gold > medium_gold_value + } + } + name = learning_scholarship_special.3002.a + remove_short_term_gold = medium_gold_value + custom_tooltip = learning_scholarship_special.3002.tt + trigger_event = { + id = learning_scholarship_special.3003 + days = { 11 17 } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_greed = -200 + ai_rationality = 200 + } + } + } + + # Option B: Make it ourselves! Risk of gaining long-term lead poisoning, but low-Learning characters will earn a base Learning increase. + option = { + name = { + trigger = { NOT = { exists = scope:alchemist } } + text = learning_scholarship_special.3002.b + } + name = { + trigger = { exists = scope:alchemist } + text = learning_scholarship_special.3002.b_alchemist + } + + stress_impact = { + lazy = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + + if = { + limit = { + learning < high_skill_rating + } + add_learning_skill = 1 + } + + if = { + limit = { + exists = scope:alchemist + scope:alchemist = { learning < high_skill_rating } + } + scope:alchemist = { add_learning_skill = 1 } + } + + # Since the learning skill might be different if they get +1, we don't/can't want to reveal the exact event outcomes & their probabilities to the player + show_as_tooltip = { + duel = { + skill = learning + value = 0 + 1 = { + desc = learning_scholarship_special.3002.a.success + show_chance = no + add_learning_lifestyle_xp = medium_lifestyle_xp + } + 1 = { + desc = learning_scholarship_special.3002.a.failure + show_chance = no + add_character_modifier = { + modifier = chronic_headaches_modifier + years = 20 + } + add_learning_lifestyle_xp = miniscule_lifestyle_xp + } + } + } + + # Real dueal logic here + hidden_effect = { + duel = { + skill = learning + value = medium_skill_rating + 50 = { + desc = learning_scholarship_special.3002.a.success + send_interface_toast = { + title = learning_scholarship_special.3002.a.success + left_icon = root + custom_tooltip = learning_scholarship_special.3002.tt + add_learning_lifestyle_xp = medium_lifestyle_xp + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -10 + min = -49 + } + desc = learning_scholarship_special.3002.a.failure + send_interface_toast = { + title = learning_scholarship_special.3002.a.failure + left_icon = root + add_character_modifier = { + modifier = chronic_headaches_modifier + years = 20 + } + custom_tooltip = learning_scholarship_special.3002.tt + add_learning_lifestyle_xp = miniscule_lifestyle_xp + } + } + } + trigger_event = { + id = learning_scholarship_special.3003 + days = { 7 11 } + } + } + + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_energy = -100 + ai_boldness = 100 + ai_greed = 200 + } + } + } + + # Option C: On second thought maybe experimenting with lead is a bad idea? + option = { + name = learning_scholarship_special.3002.c + add_learning_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 0 + } + } +} + +# Lead obtained, now we need to get some seaweed... +learning_scholarship_special.3003 = { + type = character_event + title = learning_scholarship_special.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:alchemist + } + desc = learning_scholarship_special.3003.desc_alchemist + } + desc = learning_scholarship_special.3003.desc + } + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = physician + } + right_portrait = { + trigger = { exists = scope:alchemist } + character = scope:alchemist + animation = page_flipping + } + + trigger = { + NOR = { + is_imprisoned = yes + has_trait = incapable + } + } + on_trigger_fail = { + trigger_event = learning_scholarship_special.3099 + } + + immediate = { + if = { #If the alchemist is no longer around we clear them out + limit = { + learning_scholarship_special_3001_alchemist_available_trigger = no + } + clear_saved_scope = alchemist + } + } + + # Option A: Buy it! Again! + option = { + trigger = { + OR = { + is_ai = no + short_term_gold > medium_gold_value + } + } + name = learning_scholarship_special.3003.a + remove_short_term_gold = medium_gold_value + custom_tooltip = learning_scholarship_special.3003.tt + trigger_event = { + id = learning_scholarship_special.3004 + days = { 11 17 } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_greed = -200 + ai_rationality = 100 + } + } + } + + # Option B: Demand it from your vassals. They will do it, but think you a bit daft... + option = { + name = learning_scholarship_special.3003.b + add_prestige = medium_prestige_loss + custom_tooltip = learning_scholarship_special.3003.tt + trigger_event = { + id = learning_scholarship_special.3004 + days = { 21 28 } + } + + stress_impact = { + humble = minor_stress_impact_gain + just = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + + ai_value_modifier = { + ai_boldness = 200 + ai_rationality = -100 + } + } + } + + # Option C: Opt-Out. Just use the lead you acquired in the previous event to make sweetened wine. + option = { + name = learning_scholarship_special.3003.c + add_gold = minor_gold_value + add_prestige = minor_prestige_gain + add_learning_lifestyle_xp = minor_lifestyle_xp + + stress_impact = { + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 0 + } + } +} + +# Reagents obtained, time to experiment! +learning_scholarship_special.3004 = { + type = character_event + title = learning_scholarship_special.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:alchemist + } + desc = learning_scholarship_special.3004.desc_alchemist + } + desc = learning_scholarship_special.3004.desc + } + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = eccentric + } + right_portrait = { + trigger = { exists = scope:alchemist } + character = scope:alchemist + animation = interested + } + + trigger = { + NOR = { + is_imprisoned = yes + has_trait = incapable + } + } + on_trigger_fail = { + trigger_event = learning_scholarship_special.3099 + } + + immediate = { + if = { #If the alchemist is no longer around we clear them out + limit = { + learning_scholarship_special_3001_alchemist_available_trigger = no + } + clear_saved_scope = alchemist + } + } + + # Option A: Begin the experiment! + option = { + name = learning_scholarship_special.3004.a + + # We don't want to reveal the exact event outcomes & their probabilities to the player, so we will show this fake duel to them instead. + show_as_tooltip = { + duel = { + skill = learning + value = 0 + desc = outcome_in_a_few_days + 1 = { + desc = learning_scholarship_special.3004.a.success + show_chance = no + custom_tooltip = learning_scholarship_special.3004.a.success.tt + add_learning_lifestyle_perk_points = 1 + if = { + limit = { exists = scope:alchemist } + scope:alchemist = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } + 1 = { + desc = learning_scholarship_special.3004.a.failure + show_chance = no + custom_tooltip = learning_scholarship_special.3004.a.failure.tt + add_learning_lifestyle_xp = minor_lifestyle_xp + } + } + } + + # The real event outcome logic happens here. + hidden_effect = { + duel = { + skill = learning + value = medium_skill_rating + # Low chance of getting a critical success, growing to ~50% at 15 skill. + 01 = { + compare_modifier = { + value = scope:duel_value + multiplier = 20 + } + trigger_event = { + id = learning_scholarship_special.3005 + days = { 3 5 } + } + } + # Above average chance of getting a success, which very slowly shrinks to ~45% at 15 skill. + 59 = { + desc = learning_scholarship_special.3005.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + trigger_event = { + id = learning_scholarship_special.3006 + days = { 3 5 } + } + } + # Below average chance of failing, which rapidly shrinks to 0% at 18 skill. + 40 = { + desc = learning_scholarship_special.3005.failure + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + trigger_event = { + id = learning_scholarship_special.3007 + days = { 3 5 } + } + } + } + } + + ai_chance = { + base = 100 + } + } + + # Option B: Final chance for opt-out. + option = { + name = learning_scholarship_special.3004.b + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = logical_thinking_modifier + years = 10 + } + + ai_chance = { + base = 0 + } + } +} + +# Critical Success! Knowledge, Wealth, Glory... all mine! +learning_scholarship_special.3005 = { + type = character_event + title = learning_scholarship_special.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:alchemist + } + desc = learning_scholarship_special.3005.desc_alchemist + } + desc = learning_scholarship_special.3005.desc + } + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + trigger = { exists = scope:alchemist } + character = scope:alchemist + animation = dancing + } + + trigger = { + NOR = { + is_imprisoned = yes + has_trait = incapable + } + } + on_trigger_fail = { + trigger_event = learning_scholarship_special.3099 + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + if = { #If the alchemist is no longer around we clear them out + limit = { + learning_scholarship_special_3001_alchemist_available_trigger = no + } + clear_saved_scope = alchemist + } + } + + option = { + name = { + trigger = { NOT = { exists = scope:alchemist } } + text = learning_scholarship_special.3005.a + } + name = { + trigger = { exists = scope:alchemist } + text = learning_scholarship_special.3005.a_alchemist + } + add_learning_lifestyle_perk_points = 1 + add_gold = medium_gold_value + add_prestige = major_prestige_gain + if = { + limit = { exists = scope:alchemist } + scope:alchemist = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } +} + +# Success. Rank up + some gold gain. +learning_scholarship_special.3006 = { + type = character_event + title = learning_scholarship_special.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:alchemist + } + desc = learning_scholarship_special.3006.desc_alchemist + } + desc = learning_scholarship_special.3006.desc + } + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = ecstasy + } + right_portrait = { + trigger = { exists = scope:alchemist } + character = scope:alchemist + animation = dancing + } + + trigger = { + NOR = { + is_imprisoned = yes + has_trait = incapable + } + } + on_trigger_fail = { + trigger_event = learning_scholarship_special.3099 + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + if = { #If the alchemist is no longer around we clear them out + limit = { + learning_scholarship_special_3001_alchemist_available_trigger = no + } + clear_saved_scope = alchemist + } + } + + option = { + name = learning_scholarship_special.3006.a + add_learning_lifestyle_perk_points = 1 + add_gold = minor_gold_value + if = { + limit = { exists = scope:alchemist } + scope:alchemist = { + change_artifact_quality_effect = { AMOUNT = 2 } + } + } + } +} + +# Failure. No rank-up, but character is compensated with small province tax boost. +learning_scholarship_special.3007 = { + type = character_event + title = learning_scholarship_special.3001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:alchemist + } + desc = learning_scholarship_special.3007.desc_alchemist + } + desc = learning_scholarship_special.3007.desc + } + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = stunned + } + right_portrait = { + trigger = { exists = scope:alchemist } + character = scope:alchemist + animation = shame + } + + trigger = { + NOR = { + is_imprisoned = yes + has_trait = incapable + } + } + on_trigger_fail = { + trigger_event = learning_scholarship_special.3099 + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + if = { #If the alchemist is no longer around we clear them out + limit = { + learning_scholarship_special_3001_alchemist_available_trigger = no + } + clear_saved_scope = alchemist + } + } + + option = { + name = learning_scholarship_special.3007.a + add_learning_lifestyle_xp = medium_lifestyle_xp + if = { + limit = { + exists = capital_province + } + capital_province = { + county = { + add_county_modifier = { + modifier = rich_fertilizer_modifier + years = 3 + } + } + } + } + } +} + +learning_scholarship_special.3099 = { + hidden = yes + + immediate = { + if = { + limit = { + is_imprisoned = yes + } + send_interface_toast = { + title = learning_scholarship_special.3099.termination.toast + custom_tooltip = learning_scholarship_special.3099.termination.desc.prison + } + } + else = { + send_interface_toast = { + title = learning_scholarship_special.3099.termination.toast + custom_tooltip = learning_scholarship_special.3099.termination.desc.incapable + } + } + } +} + +################## +# 4000 - Dear God, go outside. By Isabella Welch +################## + +learning_scholarship.4000 = { + type = character_event + title = learning_scholarship.4000.t + desc = learning_scholarship.4000.desc + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = page_flipping + } + right_portrait = { + character = scope:spouse_uninterested_in_study + animation = stayback + } + lower_left_portrait = { + character = scope:child_educated + } + override_background = { + reference = corridor_night + } + + trigger = { + NOR = { + has_government = celestial_government + has_character_flag = has_had_learning_scholarship_4000 + has_trait = celibate + } + OR = { + has_focus = learning_scholarship_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + is_married = yes + any_spouse = { + NOR = { + has_trait_rank = { + trait = education_learning + rank >= 1 + } + has_trait = intellect_good + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = has_had_learning_scholarship_4000 + years = 5 + } + if = { + limit = { + any_child = { + has_focus = education_learning + has_relation_guardian = root + is_child_of = root + } + } + random_child = { + limit = { + has_focus = education_learning + has_relation_guardian = root + is_child_of = root + } + save_scope_as = child_educated + } + } + random_spouse = { + weight = { + base = 1 + compare_modifier = { + value = learning + multiplier = -0.5 + } + } + save_scope_as = spouse_uninterested_in_study + } + if = { + limit = { + any_courtier_or_guest = { + can_set_relation_lover_trigger = { + CHARACTER = scope:spouse_uninterested_in_study + } + } + } + random_courtier_or_guest = { + limit = { + can_set_relation_lover_trigger = { + CHARACTER = scope:spouse_uninterested_in_study + } + } + save_scope_as = potential_new_spouse_lover + } + } + } + + option = { + name = learning_scholarship.4000.a + add_character_modifier = { + modifier = alluring_confidence + years = 1 + } + scope:spouse_uninterested_in_study = { + add_opinion = { + target = root + opinion = 20 + modifier = grateful_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + } + } + } + + option = { + name = learning_scholarship.4000.b + trigger = { + NOT = { exists = scope:child_educated } + } + scope:spouse_uninterested_in_study = { + add_learning_skill = 2 + add_opinion = { + target = root + opinion = -20 + modifier = insulted_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } + + option = { + name = learning_scholarship.4000.c + trigger = { + exists = scope:child_educated + } + scope:child_educated = { + add_learning_skill = 2 + add_opinion = { + target = root + opinion = 20 + modifier = supportive_parent + } + } + if = { + limit = { + scope:spouse_uninterested_in_study = { + NOT = { is_parent_of = scope:child_educated } + } + } + custom_tooltip = learning_scholarship.4000.c.tt + scope:spouse_uninterested_in_study = { + add_opinion = { + target = root + opinion = -15 + modifier = weak_opinion + } + } + } + add_character_modifier = { + modifier = busy_tutoring_modifier + years = 5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 2 + } + } + } + + option = { + name = learning_scholarship.4000.d + add_character_modifier = { + modifier = focused_reading_modifier + years = 5 + } + add_learning_lifestyle_xp = medium_lifestyle_xp + scope:spouse_uninterested_in_study = { + add_opinion = { + target = root + opinion = -40 + modifier = weak_opinion + } + hidden_effect = { + if = { + limit = { exists = scope:potential_new_spouse_lover } + set_relation_lover = { reason = lover_bored_lover target = scope:potential_new_spouse_lover involved_character = root } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + } + } + } +} + + +################################################## +# Bibliomancy # +# by Chad Uhl # +# 5000-5007 # +################################################## + +scripted_effect create_bibliomancy_book_effect = { + scope:merchant_mystic = { + trigger_event = learning_scholarship.5007 + } +} + +learning_scholarship.5000 = { + type = character_event + title = learning_scholarship.5000.t + desc = learning_scholarship.5000.desc + theme = learning_scholarship_focus + override_background = { + reference = market + } + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:merchant_mystic + animation = beg + } + + trigger = { + # Haven't had the event before + NOT = { has_character_flag = had_event_bibliomancy_5000 } + has_focus = learning_scholarship_focus + + # You practice Bibliomancy + faith = { religion_tag = christianity_religion } + + # Need to ensure that a powerful vassal exists for a later event + any_vassal = { + is_available_ai_adult = yes + is_powerful_vassal = yes + NOR = { + has_secret_relation_lover = root + has_relation_lover = root + has_relation_soulmate = root + has_relation_friend = root + has_relation_best_friend = root + } + } + } + + weight_multiplier = { + base = 1 + + #Aimed at players livin that Scholarship Lifestyle + upweight_for_focus_modifier = { FOCUS = learning_scholarship_focus } + + #Bonus points if you're a ~~mystic~~ + modifier = { + has_trait = lifestyle_mystic + add = 1 + } + } + + immediate = { + root = { save_scope_as = bibliomancy_main_character } + add_character_flag = had_event_bibliomancy_5000 + + # Keeps track of how many times player fails skill checks or opts out. Higher value = more likely to get the paranoid trait at the end. + set_variable = { + name = paranoia_level_var + value = 0 + } + + # Create a mystic character + hidden_effect = { + #Pick a suitable culture for the wandering mystic + random_ruler = { + # Prefer religion with mystical tenets + limit = { + is_within_diplo_range = { CHARACTER = root } + faith = { + has_doctrine = tenet_esotericism + } + } + # Fallback to just choose some nearby culture + alternative_limit = { + is_within_diplo_range = { CHARACTER = root } + } + culture = { + save_scope_as = mystic_culture + } + faith = { + save_scope_as = mystic_faith + } + } + + # Create mystic character + create_character = { + template = default_mystic_character + location = root.location + faith = scope:mystic_faith + culture = scope:mystic_culture + gender_female_chance = 50 + save_scope_as = merchant_mystic + } + add_visiting_courtier = scope:merchant_mystic + } + } + + option = { # Option A: Buy the Book + name = learning_scholarship.5000.a + + # Effect + remove_short_term_gold = medium_gold_value + custom_tooltip = bibliomancy_book_purchased + create_bibliomancy_book_effect = yes + + ai_chance = { + base = 25 + modifier = { + add = 100 + has_trait = lifestyle_mystic + } + ai_value_modifier = { + ai_zeal = medium_chance_impact_positive_ai_value + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + content = minor_stress_impact_gain + } + } + + option = { # Option B: Haggle the price + name = learning_scholarship.5000.b + + # Effect + duel = { + skill = diplomacy + value = 10 + 15 = { + desc = learning_scholarship.5000.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = learning_scholarship.5000.b.success + left_icon = root + right_icon = scope:merchant_mystic + remove_short_term_gold = minor_gold_value + } + } + 20 = { + desc = learning_scholarship.5000.b.failure + send_interface_toast = { + title = learning_scholarship.5000.b.failure + left_icon = root + right_icon = scope:merchant_mystic + remove_short_term_gold = medium_gold_value + add_prestige = minor_prestige_loss + } + } + } + + create_bibliomancy_book_effect = yes + custom_tooltip = bibliomancy_book_purchased + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = high_chance_impact_positive_ai_value + } + } + + stress_impact = { + honest = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + } + + option = { # Option C: Take it by force + name = learning_scholarship.5000.c + + # Effect + add_dread = minor_dread_gain + stress_impact = { + base = minor_stress_impact_gain + just = medium_stress_impact_gain + } + + create_bibliomancy_book_effect = yes + custom_tooltip = bibliomancy_book_purchased + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_boldness = low_chance_impact_positive_ai_value + } + } + } + + option = { # Option D: Nope + name = learning_scholarship.5000.d + add_prestige = minor_prestige_gain + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = low_chance_impact_negative_ai_value + ai_boldness = low_chance_impact_negative_ai_value + ai_greed = low_chance_impact_negative_ai_value + ai_energy = high_chance_impact_negative_ai_value + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + calm = minor_stress_impact_gain + temperate = minor_stress_impact_gain + } + } +} + +learning_scholarship.5001 = { + type = character_event + title = learning_scholarship.5001.t + desc = learning_scholarship.5001.desc + + left_portrait = { + character = root + animation = worry + } + theme = learning_scholarship_focus + artifact = { + target = scope:sacred_text + position = lower_center_portrait + trigger = { exists = scope:sacred_text } + } + + trigger = { + # Make sure the character has scope:sacred_text + exists = scope:sacred_text + scope:sacred_text = { + artifact_owner = root + } + } + + immediate = { + scope:merchant_mystic = { silent_disappearance_effect = yes } + } + + option = { # Perform Bibliomancy + name = learning_scholarship.5001.a + + custom_tooltip = learning_lifestyle_rank_up_indication + trigger_event = learning_scholarship.5002 + + ai_chance = { + base = 50 + modifier = { + add = 100 + has_trait = lifestyle_mystic + } + ai_value_modifier = { + ai_energy = medium_chance_impact_positive_ai_value + ai_zeal = medium_chance_impact_positive_ai_value + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + content = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + } + + option = { # Do not perform Bibliomancy + name = learning_scholarship.5001.b + + #if faith has Righteous doctrine + if = { + limit = { + ROOT.faith = { + has_doctrine = doctrine_pluralism_righteous + } + } + add_piety = minor_piety_value + } + + stress_impact = { + base = minor_stress_loss + lifestyle_mystic = minor_stress_impact_gain + zealous = medium_stress_impact_gain + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = medium_chance_impact_negative_ai_value + ai_zeal = medium_chance_impact_negative_ai_value + ai_rationality = medium_chance_impact_negative_ai_value + } + } + } +} + +learning_scholarship.5002 = { # A Fateful Reading - Fear is the mind-killer! + + type = character_event + title = learning_scholarship.5002.t + desc = learning_scholarship.5002.desc + + left_portrait = { + character = root + animation = worry + } + theme = learning_scholarship_focus + artifact = { + target = scope:sacred_text + position = lower_center_portrait + trigger = { exists = scope:sacred_text } + } + + immediate = { + if = { + limit = { + employs_court_position = antiquarian_court_position + any_court_position_holder = { + type = antiquarian_court_position + } + } + random_court_position_holder = { + type = antiquarian_court_position + save_scope_as = antiquarian + } + } + } + + option = { # Option A: Easy Interpretation + name = learning_scholarship.5002.a + + add_learning_lifestyle_xp = minor_lifestyle_xp + + stress_impact = { + scholar = minor_stress_impact_gain + } + + trigger_event = { + id = learning_scholarship.5003 + days = 5 + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = medium_chance_impact_negative_ai_value + ai_energy = medium_chance_impact_negative_ai_value + ai_boldness = high_chance_impact_positive_ai_value + ai_zeal = low_chance_impact_positive_ai_value + } + } + + stress_impact = { + diligent = minor_stress_impact_gain + paranoid = minor_stress_impact_gain + } + } + + option = { # Option B: Learning Skill Challenge + name = learning_scholarship.5002.b + + # Learning Skill Challenge + duel = { + skill = learning + value = 10 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_scholarship.5002.b.success + send_interface_toast = { + type = event_toast_effect_good + title = learning_scholarship.5002.b.success + left_icon = root + + #Effect + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = focused_reading_modifier + years = 3 + } + #Gain a prestige bonus for doing this yourself. + add_prestige = minor_prestige_gain + + trigger_event = { + id = learning_scholarship.5005 + days = 5 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_scholarship.5002.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = learning_scholarship.5002.b.failure + left_icon = root + + #Effect + change_variable = { name = paranoia_level_var add = 1 } + add_learning_lifestyle_xp = minor_lifestyle_xp + add_character_modifier = { + modifier = bibliomancy_tense_modifier + years = 2 + } + + trigger_event = { + id = learning_scholarship.5004 + days = 5 + } + } + + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = medium_chance_impact_positive_ai_value + ai_energy = medium_chance_impact_positive_ai_value + ai_zeal = medium_chance_impact_positive_ai_value + } + } + + } + + option = { # Option C: Disregard - Opt out + name = learning_scholarship.5002.c + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_loss + scholar = medium_stress_impact_gain + theologian = medium_stress_impact_gain + lifestyle_mystic = medium_stress_impact_gain + } + + change_variable = { name = paranoia_level_var add = 1 } + custom_tooltip = learning_scholarship_paranoid_trait_possible + trigger_event = { + id = learning_scholarship.5006 + days = 20 + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = high_chance_impact_negative_ai_value + ai_energy = high_chance_impact_negative_ai_value + ai_zeal = high_chance_impact_negative_ai_value + } + } + } + + option = { # Option D: Antiquarian Specialist Option + name = learning_scholarship.5002.d + + trigger = { + employs_court_position = antiquarian_court_position + } + + # Learning Skill Challenge, made easier + scope:antiquarian = { + duel = { + skill = learning + value = 10 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_scholarship.5002.b.success + root = { + send_interface_toast = { + type = event_toast_effect_good + title = learning_scholarship.5002.b.success + left_icon = root + + #Effect + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = focused_reading_modifier + years = 1 + } + trigger_event = { + id = learning_scholarship.5005 + days = 5 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_scholarship.5002.b.failure + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = learning_scholarship.5002.b.failure + left_icon = root + + #Effect + add_learning_lifestyle_xp = minor_lifestyle_xp + change_variable = { name = paranoia_level_var add = 1 } + trigger_event = { + id = learning_scholarship.5004 + days = 1 + } + } + } + } + } + } + + if = { + limit = { + can_set_relation_potential_friend_trigger = { CHARACTER = scope:antiquarian } + } + set_relation_potential_friend = scope:antiquarian + } + + ai_chance = { + base = 25 + ai_value_modifier = { + ai_rationality = medium_chance_impact_positive_ai_value + ai_energy = medium_chance_impact_positive_ai_value + ai_zeal = medium_chance_impact_positive_ai_value + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } +} + +learning_scholarship.5003 = { # A Simple Reading + type = character_event + title = learning_scholarship.5003.t + desc = learning_scholarship.5003.desc + + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:bibliomancy_antagonist + animation = personality_bold + } + + theme = court + + weight_multiplier = { + base = 1 + } + + # Check that powerful vassal exists at the beginning + trigger = { + any_vassal = { + is_available_ai_adult = yes + is_powerful_vassal = yes + NOR = { + has_secret_relation_lover = root + has_relation_lover = root + has_relation_soulmate = root + has_relation_friend = root + has_relation_best_friend = root + } + } + } + + immediate = { + random_vassal = { + # Calling all vassals who dislike me + limit = { + is_available_ai_adult = yes + is_powerful_vassal = yes + NOR = { + has_secret_relation_lover = root + has_relation_lover = root + has_relation_soulmate = root + has_relation_friend = root + has_relation_best_friend = root + } + opinion = { + target = root + value <= 0 + } + } + # Fallback to any vassal that is available + alternative_limit = { + is_available_ai_adult = yes + is_powerful_vassal = yes + NOR = { + has_secret_relation_lover = root + has_relation_lover = root + has_relation_soulmate = root + has_relation_friend = root + has_relation_best_friend = root + } + } + save_scope_as = bibliomancy_antagonist + } + + } + + option = { # Option A: Debate the Vassal + name = learning_scholarship.5003.a + custom_tooltip = learning_scholarship.5003.a.tt + + duel = { + skill = learning + target = scope:bibliomancy_antagonist + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_scholarship.5003.a.success + send_interface_toast = { + type = event_toast_effect_good + title = learning_scholarship.5003.a.success + left_icon = root + + #Effect + add_learning_lifestyle_xp = medium_lifestyle_xp + add_prestige = minor_prestige_gain + } + trigger_event = { + id = learning_scholarship.5005 + days = 5 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_scholarship.5003.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = learning_scholarship.5003.a.failure + left_icon = root + + add_learning_lifestyle_xp = minor_lifestyle_xp + every_vassal = { + custom = learning_scholarship.5003.vassal.tt + add_opinion = { + modifier = thinks_liege_incapable_opinion + target = root + } + } + } + } + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_energy = low_chance_impact_positive_ai_value + ai_boldness = high_chance_impact_positive_ai_value + } + } + + stress_impact = { + shy = medium_stress_impact_gain + craven = minor_stress_impact_gain + } + } + + option = { # Option B: Make formal overtures (Diplomacy Challenge) + name = learning_scholarship.5003.b + + custom_tooltip = learning_scholarship.5003.b.tt + # Diplomacy Skill Challenge + duel = { + skill = diplomacy + target = scope:bibliomancy_antagonist + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_scholarship.5003.b.success + send_interface_toast = { + type = event_toast_effect_good + title = learning_scholarship.5003.b.success + left_icon = root + + #Effect + add_learning_lifestyle_xp = medium_lifestyle_xp + + #Gain a prestige bonus for doing this yourself. + add_prestige = minor_prestige_gain + } + trigger_event = { + id = learning_scholarship.5005 + days = 5 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_scholarship.5003.b.failure + send_interface_toast = { + type = event_toast_effect_bad + title = learning_scholarship.5003.b.failure + left_icon = root + + add_learning_lifestyle_xp = minor_lifestyle_xp + add_prestige = medium_prestige_loss + } + } + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_energy = low_chance_impact_positive_ai_value + ai_rationality = high_chance_impact_positive_ai_value + } + } + + stress_impact = { + stubborn = minor_stress_impact_gain + impatient = minor_stress_impact_gain + callous = minor_stress_impact_gain + } + } + + option = { # Option C: Give him a hook and be done with it + name = learning_scholarship.5003.c + + # Vassal gains hook on you to renegotiate contract later + scope:bibliomancy_antagonist = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = root + } + } + add_hook = { + type = favor_hook + target = root + } + } + } + + ai_chance = { + base = 33 + ai_value_modifier = { + ai_energy = high_chance_impact_negative_ai_value + ai_boldness = medium_chance_impact_negative_ai_value + ai_honor = low_chance_impact_negative_ai_value + } + } + + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + } + } +} + + +learning_scholarship.5004 = { # Skill Challenge Failure + type = character_event + title = learning_scholarship.5004.t + desc = learning_scholarship.5004.desc + + left_portrait = cp:councillor_court_chaplain + right_portrait = scope:target_courtier + theme = learning_scholarship_focus + + trigger = { + OR = { + exists = cp:councillor_court_chaplain + employs_court_position = camp_priest_camp_officer + } + } + + immediate = { + # Save chaplain scope + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = court_chaplain + } + } + else = { + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = court_chaplain + } + + } + # Pick a courtier with high learning who isn't the chaplain + ordered_courtier = { + limit = { + is_available_ai_adult = yes + this != scope:court_chaplain + } + order_by = learning + max = 1 + + save_scope_as = target_courtier + } + + } + + option = { # Option A: Ask Chaplain for help + name = learning_scholarship.5004.a + + # Learning Skill Challenge + + scope:court_chaplain = { + duel = { + skill = learning + value = 8 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_scholarship.5004.a.success + root = { + send_interface_toast = { + type = event_toast_effect_good + title = learning_scholarship.5004.a.success + left_icon = scope:court_chaplain + + #Effect + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = focused_reading_modifier + years = 3 + } + trigger_event = { + id = learning_scholarship.5005 + days = 5 + } + } + } + } + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_scholarship.5004.a.failure + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = learning_scholarship.5004.a.failure + left_icon = scope:court_chaplain + + #Effect + add_prestige = minor_prestige_loss + change_variable = { + name = paranoia_level_var + add = 1 + } + trigger_event = { + id = learning_scholarship.5006 + days = 15 + } + } + } + } + } + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + } + + ai_chance = { + base = 45 + ai_value_modifier = { + ai_honor = low_chance_impact_negative_ai_value + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + + option = { # Option B: Ask Courtier for help + + + name = learning_scholarship.5004.b + + trigger = { + exists = scope:target_courtier + } + + # Learning Skill Challenge + scope:target_courtier = { + duel = { + skill = learning + value = 8 + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = learning_scholarship.5004.b.success + + root = { + send_interface_toast = { + type = event_toast_effect_good + title = learning_scholarship.5004.b.success + left_icon = scope:target_courtier + + #Effect + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = focused_reading_modifier + years = 3 + } + trigger_event = { + id = learning_scholarship.5005 + days = 5 + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = learning_scholarship.5004.b.failure + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = learning_scholarship.5004.b.failure + left_icon = scope:target_courtier + + #Effect + add_prestige = minor_prestige_loss + change_variable = { + name = paranoia_level_var + add = 1 + } + trigger_event = { + id = learning_scholarship.5006 + days = 15 + } + } + } + } + } + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 15 + } + } + + ai_chance = { + base = 45 + ai_value_modifier = { + ai_honor = low_chance_impact_negative_ai_value + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + } + + option = { # Give up + name = learning_scholarship.5004.c + + add_stress = minor_stress_loss + change_variable = { name = paranoia_level_var add = 2 } + + trigger_event = { + id = learning_scholarship.5006 + days = 15 + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_energy = high_chance_impact_negative_ai_value + ai_rationality = medium_chance_impact_negative_ai_value + } + } + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_loss + scholar = medium_stress_impact_gain + theologian = medium_stress_impact_gain + lifestyle_mystic = medium_stress_impact_gain + } + } +} + +learning_scholarship.5005 = { # Skill Challenge Success + type = character_event + title = learning_scholarship.5005.t + desc = learning_scholarship.5005.desc + + left_portrait = { + character = root + animation = personality_bold + } + theme = learning_scholarship_focus + + option = { + name = learning_scholarship.5005.a + add_learning_lifestyle_perk_points = 1 + } +} + +learning_scholarship.5006 = { # Ultimate Failure + type = character_event + title = learning_scholarship.5006.t + desc = learning_scholarship.5006.desc + + left_portrait = { + character = root + animation = paranoia + } + theme = learning_scholarship_focus + + option = { # Chance to pick up paranoid trait + name = learning_scholarship.5006.a + if = { + limit = { + has_character_modifier = bibliomancy_tense_modifier + } + remove_character_modifier = bibliomancy_tense_modifier + } + add_character_modifier = { + modifier = bibliomancy_fearful_modifier + years = 5 + } + if = { + limit = { + NOT = { has_trait = paranoid } + var:paranoia_level_var > 1 + } + add_trait = paranoid + custom_tooltip = learning_scholarship_paranoid_trait.tt + } + } +} + +learning_scholarship.5007 = { # Create the book artifact in merchant's scope and transfer to the player + type = character_event + hidden = yes + + immediate = { + # Check if bibliomancy_main_character has a royal court or notification + if = { + limit = { + scope:bibliomancy_main_character = { + has_royal_court = no + } + } + save_temporary_scope_value_as = { + name = should_be_trinket + value = yes + } + } + # Create the book + random_dummy_gender_effect = yes + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:learning + SET_TOPIC = flag:no + } + scope:newly_created_artifact = { + set_owner = scope:bibliomancy_main_character + save_scope_as = sacred_text + } + scope:bibliomancy_main_character = { + # Let the player know they received the book + send_interface_toast = { + title = learning_scholarship_sacred_artifact_obtained + left_icon = scope:bibliomancy_main_character + right_icon = scope:sacred_text + show_as_tooltip = { + scope:sacred_text = { set_owner = scope:bibliomancy_main_character } + } + } + trigger_event = { + id = learning_scholarship.5001 + days = 5 + } + } + } +} + +# END Bibliomancy 5000-5007 + +################################################## +# The Man of Few Letters # +# by Jason Cantalini # +# 6000 # +################################################## + +scripted_trigger learning_scholarship_6000_illiterate_trigger = { + is_powerful_vassal = yes + is_ai = yes + is_adult = yes + is_imprisoned = no + is_incapable = no + NOR = { + has_trait = bubonic_plague + has_trait = smallpox + } + trigger_if = { + limit = { + government_has_flag = government_is_tribal + } + learning <= 14 + } + trigger_else = { + learning <= 6 + } + any_courtier = { is_available_ai_adult = yes } + NOT = { has_relation_rival = root } + NOT = { has_character_flag = had_event_born_to_lead_not_to_read_6000 } +} + +learning_scholarship.6000 = { + type = character_event + title = learning_scholarship.6000.t + desc = { + desc = learning_scholarship.6000.desc + # Illiterate character is frustrated by different reading based on character + triggered_desc = { + trigger = { + scope:illiterate = { + OR = { + has_trait = arrogant + has_trait = impatient + has_trait = lazy + has_trait = stubborn + } + NOR = { + has_trait = cynical + has_trait = fickle + has_trait = wrathful + has_trait = arbitrary + } + + } + } + desc = learning_scholarship.6000.willing_pupil + } + triggered_desc = { + trigger = { + faith = { religion_tag = christianity_religion } + scope:illiterate = { + OR = { + has_trait = cynical + has_trait = fickle + has_trait = wrathful + has_trait = arbitrary + } + NOR = { + has_trait = arrogant + has_trait = impatient + has_trait = lazy + has_trait = stubborn + } + } + } + desc = learning_scholarship.6000.holy_book_insult + } + triggered_desc = { + trigger = { + scope:illiterate = { + OR = { + has_trait = arrogant + has_trait = impatient + has_trait = lazy + has_trait = stubborn + } + OR = { + has_trait = cynical + has_trait = fickle + has_trait = wrathful + has_trait = arbitrary + } + } + } + desc = learning_scholarship.6000.poetry_insult + } + triggered_desc = { + trigger = { + scope:illiterate = { + NOR = { + has_trait = arrogant + has_trait = impatient + has_trait = lazy + has_trait = cynical + has_trait = fickle + has_trait = wrathful + has_trait = stubborn + has_trait = arbitrary + } + } + } + desc = learning_scholarship.6000.very_willing_pupil + } + } + theme = learning_scholarship_focus + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:teacher + animation = personality_forgiving + } + lower_center_portrait = scope:illiterate + + cooldown = { + years = 5 + } + + trigger = { + has_focus = learning_scholarship_focus + NOT = { has_character_flag = is_in_learning_special_event } + learning > low_skill_rating + is_available_adult = yes + is_landed = yes + # Literacy wasn't expected in many tribal contexts + NOR = { + government_has_flag = government_is_tribal + government_has_flag = government_is_nomadic + } + + # Must have a suitably illiterate vassal + any_vassal = { + learning_scholarship_6000_illiterate_trigger = yes + } + } + + immediate = { + # Who needs to know what words do? + random_vassal = { + limit = { + learning_scholarship_6000_illiterate_trigger = yes + } + save_scope_as = illiterate + } + + # The vassal doesn't need to learn to read twice + scope:illiterate = { + add_character_flag = had_event_born_to_lead_not_to_read_6000 + } + # Who is trying to teach words? + if = { + limit = { + scope:illiterate = { employs_court_position = court_tutor_court_position } + scope:illiterate = { + any_court_position_holder = { + type = court_tutor_court_position + is_available_ai = yes + } + } + } + scope:illiterate = { + random_court_position_holder = { + type = court_tutor_court_position + limit = { + is_available_ai = yes + } + save_scope_as = teacher + } + } + } + else_if = { + limit = { + scope:illiterate = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai = yes + } + } + } + scope:illiterate = { + cp:councillor_court_chaplain = { + save_scope_as = teacher + } + } + } + else = { + scope:illiterate = { + random_courtier = { + limit = { + is_available_ai_adult = yes + } + weight = { + base = 1 + modifier = { + add = { + value = learning + multiply = 4 + } + } + } + save_scope_as = teacher + } + } + } + } + + #One of the following options appear based on a councillor position the illiterate holds + option = { + trigger = { + scope:illiterate = root.cp:councillor_chancellor + } + name = learning_scholarship.6000.a + add_learning_lifestyle_xp = minor_lifestyle_experience + scope:illiterate = { + add_diplomacy_skill = 1 + add_learning_skill = 1 + } + stress_impact = { + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -25 + has_trait = content + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + ai_sociability = 0.5 + } + } + } + + option = { + trigger = { + scope:illiterate = root.cp:councillor_spymaster + } + name = learning_scholarship.6000.b + add_learning_lifestyle_xp = minor_lifestyle_experience + scope:illiterate = { + add_intrigue_skill = 1 + add_learning_skill = 1 + } + stress_impact = { + honest = medium_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -25 + has_trait = content + } + ai_value_modifier = { + ai_honor = -1 + ai_compassion = -0.75 + ai_vengefulness = 0.5 + } + } + } + + option = { + trigger = { + scope:illiterate = root.cp:councillor_marshal + } + name = learning_scholarship.6000.c + add_learning_lifestyle_xp = minor_lifestyle_experience + scope:illiterate = { + add_martial_skill = 1 + add_learning_skill = 1 + } + stress_impact = { + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -25 + has_trait = content + } + ai_value_modifier = { + ai_energy = 0.25 + ai_boldness = 0.25 + } + } + } + + option = { + trigger = { + scope:illiterate = root.cp:councillor_steward + } + name = learning_scholarship.6000.d + add_learning_lifestyle_xp = minor_lifestyle_experience + scope:illiterate = { + add_stewardship_skill = 1 + add_learning_skill = 1 + } + stress_impact = { + arbitrary = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -50 + has_trait = content + } + ai_value_modifier = { + ai_energy = 0.25 + ai_zeal = 1 + ai_honor = 1 + } + } + } + + option = { + trigger = { + scope:illiterate = root.cp:councillor_court_chaplain + } + name = learning_scholarship.6000.e + add_learning_lifestyle_xp = minor_lifestyle_experience + scope:illiterate = { + add_learning_skill = 2 + } + stress_impact = { + cynical = medium_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -50 + has_trait = content + } + ai_value_modifier = { + ai_energy = 0.5 + ai_zeal = 1 + } + } + } + + option = { + name = learning_scholarship.6000.f + flavor = learning_scholarship.6000.f.tt + duel = { + skill = learning + value = average_skill_rating + 55 = { + desc = learning_scholarship.6000.f.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + send_interface_toast = { + title = learning_scholarship.6000.f.success + left_icon = root + right_icon = scope:illiterate + add_learning_lifestyle_xp = medium_lifestyle_experience + scope:illiterate = { + add_learning_skill = 1 + } + } + create_character_memory = { + type = reading_aid + participants = { + illiterate = scope:illiterate + } + } + } + 45 = { + desc = learning_scholarship.6000.f.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + send_interface_toast = { + title = learning_scholarship.6000.f.failure + left_icon = root + right_icon = scope:illiterate + add_prestige = minor_prestige_loss + scope:illiterate = { + add_opinion = { + target = root + modifier = annoyed_opinion + opinion = -10 + } + } + } + } + } + stress_impact = { + journaller = minor_stress_impact_loss + lazy = major_stress_impact_gain + humble = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + add = 25 + has_trait = journaller + } + modifier = { + add = 25 + learning >= medium_skill_rating + } + modifier = { + add = 50 + learning >= high_skill_rating + } + modifier = { + add = -100 + has_trait = lazy + } + modifier = { + add = -25 + has_trait = humble + } + ai_value_modifier = { + ai_sociability = 0.75 + ai_energy = 0.5 + ai_compassion = 0.25 + } + } + } + + #The following option changes along with the loc which describes illiterate's response to reading + #if the illiterate is a lazy pupil + option = { + name = learning_scholarship.6000.g + trigger = { + scope:illiterate = { + OR = { + has_trait = arrogant + has_trait = impatient + has_trait = lazy + has_trait = stubborn + } + NOR = { + has_trait = cynical + has_trait = fickle + has_trait = wrathful + has_trait = arbitrary + } + } + } + flavor = learning_scholarship.6000.g.tt + progress_towards_friend_effect = { + CHARACTER = scope:illiterate + OPINION = 30 + REASON = friend_supported_illiterate + } + create_character_memory = { + type = supported_illiterate + participants = { + illiterate = scope:illiterate + } + } + stress_impact = { + patient = major_stress_impact_gain + diligent = medium_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = -15 + has_trait = stubborn + } + modifier = { + add = -50 + has_trait = patient + } + modifier = { + add = -25 + has_trait = diligent + } + ai_value_modifier = { + ai_rationality = -0.25 + ai_energy = -0.25 + ai_boldness = -0.5 + ai_compassion = 0.25 + } + } + } + + #if the illiterate was frustrated about the holy book + option = { + name = learning_scholarship.6000.h + trigger = { + scope:illiterate = { + OR = { + has_trait = cynical + has_trait = fickle + has_trait = wrathful + has_trait = arbitrary + } + NOR = { + has_trait = arrogant + has_trait = impatient + has_trait = lazy + has_trait = stubborn + } + } + } + flavor = learning_scholarship.6000.h.tt + custom_tooltip = learning_scholarship.6000.non_believer + add_piety = minor_piety_gain + progress_towards_rival_effect = { + REASON = rival_holy_book + CHARACTER = scope:illiterate + OPINION = default_rival_opinion + } + if = { + limit = { + scope:illiterate = { + NOT = { any_secret = { type = secret_non_believer } } + } + } + hidden_effect = { + scope:illiterate = { + add_secret = { + type = secret_non_believer + } + } + } + } + scope:illiterate = { + random_secret = { + type = secret_non_believer + reveal_to = root + } + } + stress_impact = { + forgiving = major_stress_impact_gain + cynical = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + add = -25 + has_trait = cynical + } + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -0.5 + ai_honor = -1 + ai_zeal = 1 + } + } + } + + #if the illiterate raged at reading poetry + option = { + name = learning_scholarship.6000.i + trigger = { + scope:illiterate = { + OR = { + has_trait = arrogant + has_trait = impatient + has_trait = lazy + has_trait = stubborn + } + OR = { + has_trait = cynical + has_trait = fickle + has_trait = wrathful + has_trait = arbitrary + } + } + } + flavor = learning_scholarship.6000.i.tt + if = { + limit = { + scope:illiterate = { + culture = root.culture + } + } + add_character_modifier = { + modifier = court_of_poetry_modifier + years = 2 + } + if = { + limit = { + has_royal_court = no + } + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + has_royal_court = yes + has_dlc_feature = royal_court + } + change_current_court_grandeur = minor_court_grandeur_gain + } + } + else = { + add_character_modifier = { + modifier = court_of_poetry_modifier + years = 2 + } + scope:illiterate.culture = { + change_cultural_acceptance = { + target = root.culture + value = miniscule_positive_culture_acceptance + desc = cultural_acceptance_gain_hold_court_event_outcome + } + } + } + stress_impact = { + cynical = major_stress_impact_gain + impatient = medium_stress_impact_gain + callous = minor_stress_impact_gain + shy = minor_stress_impact_gain + + } + ai_chance = { + base = 20 + modifier = { + add = -25 + has_trait = cynical + } + modifier = { + add = -25 + has_trait = callous + } + ai_value_modifier = { + ai_zeal = 0.25 + ai_compassion = 0.5 + ai_vengefulness = -0.25 + ai_honor = 0.5 + ai_sociability = 0.75 + } + } + } +#if the illiterate actually wants help + option = { + name = learning_scholarship.6000.j + trigger = { + scope:illiterate = { + NOR = { + has_trait = arrogant + has_trait = impatient + has_trait = lazy + has_trait = cynical + has_trait = fickle + has_trait = wrathful + has_trait = stubborn + has_trait = arbitrary + } + } + } + flavor = learning_scholarship.6000.j.tt + add_character_modifier = { + modifier = beauty_of_language_modifier + years = 10 + } + stress_impact = { + content = minor_stress_impact_loss + lazy = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + calm = minor_stress_impact_loss + ambitious = massive_stress_impact_gain + cynical = major_stress_impact_gain + impatient = major_stress_impact_gain + arrogant = major_stress_impact_gain + diligent = major_stress_impact_gain + } + scope:illiterate = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + ai_chance = { + base = 20 + modifier = { + add = -100 + has_trait = ambitious + } + modifier = { + add = -50 + has_trait = cynical + } + modifier = { + add = -25 + has_trait = impatient + } + modifier = { + add = -25 + has_trait = arrogant + } + modifier = { + add = -25 + has_trait = diligent + } + ai_value_modifier = { + ai_boldness = -0.5 + ai_energy = -0.5 + ai_compassion = 0.25 + } + } + } + + option = { + name = learning_scholarship.6000.k + flavor = learning_scholarship.6000.k.tt + add_prestige = minor_prestige_gain + scope:illiterate = { + add_prestige = minor_prestige_loss + } + + progress_towards_rival_effect = { + REASON = rival_holy_book_illiterate + CHARACTER = scope:illiterate + OPINION = 0 + } + scope:illiterate = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -25 + } + } + if = { + limit = { + any_vassal = { + learning > decent_skill_rating + NOT = { + has_trait = compassionate + } + } + } + every_vassal = { + custom = high_learning_custom + limit = { + learning > decent_skill_rating + NOT = { + has_trait = compassionate + } + } + add_opinion = { + modifier = respect_opinion + target = root + opinion = 20 + } + } + } + create_character_memory = { + type = humiliated_illiterate + participants = { + illiterate = scope:illiterate + } + } + stress_impact = { + irritable = medium_stress_impact_loss + humble = medium_stress_impact_gain + patient = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + trusting = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + ai_chance = { + base = 15 + ai_value_modifier = { + ai_zeal = 0.25 + ai_boldness = 0.75 + ai_compassion = -1 + ai_honor = -0.5 + } + } + } +} diff --git a/N3OW/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt b/N3OW/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt new file mode 100644 index 00000000..5df5a5b8 --- /dev/null +++ b/N3OW/events/lifestyles/scholarship_lifestyle/learning_theology_events.txt @@ -0,0 +1,3946 @@ +namespace = learning_theology + +namespace = learning_theology_special + +################################################## + +# Learning Theology Lifestyle events + + # 1301 - Realm Priest Needs Books, by Linnéa Thimrén + # 2020 - Flatter Bishop, by Mathilda Bjarnehed + # 3002 - Age of the World + # 3003 - The Number of Spheres + # 3011 - Worship in the same church (theology friend), by Linnéa Thimrén + # 3021 - Send fan mail to religious head, by Linnéa Thimrén + # 3031 - Deal with province of different faith, by Linnéa Thimrén + # 3051 - Passion Play drama, by James Beaumont + +#Special Learning Theology Lifestyle events + + # 1001 - Finding old text + # 1101 - Traveling Rabbi + +################################################## + +################################################## +# Your realm priest asks for books +# by Linnéa Thimrén +################################################## +learning_theology.1301 = { + type = character_event + title = learning_theology.1301.t + desc = { + desc = learning_theology.1301.desc_opening + first_valid = { + triggered_desc = { + trigger = { + faith = { religion_tag = christianity_religion } + } + desc = learning_theology.1301.desc_regula_pastoralis + } + desc = learning_theology.1301.desc + } + desc = learning_theology.1301.desc_ending + } + theme = learning_theology_focus + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:bishop + animation = beg + } + + trigger = { + NOT = { + has_character_flag = had_event_learning_theology_1301 + } + exists = cp:councillor_court_chaplain + can_add_hook = { + type = favor_hook + target = cp:councillor_court_chaplain + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_1301 + years = 5 + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + + option = { #Give the book to the scholar + name = learning_theology.1301.a + remove_short_term_gold = medium_gold_value + add_learning_lifestyle_xp = miniscule_lifestyle_xp + add_hook = { + target = scope:bishop + type = favor_hook + } + ai_chance = { + base = 50 + } + } + + option = { #Take the book for yourself + name = learning_theology.1301.b + remove_short_term_gold = medium_gold_value + add_learning_lifestyle_xp = minor_lifestyle_xp + add_learning_skill = 1 + scope:bishop = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + ai_chance = { + base = 50 + } + } + + option = { #nah + name = learning_theology.1301.c + scope:bishop = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -10 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = 0.5 + } + } + } +} + + +################################################## +# Flatter your court chaplain with some bible verses +# by Mathilda Bjarnehed +################################################## + +learning_theology.2020 = { #by Mathilda Bjarnehed + type = character_event + title = learning_theology.2020.t + desc = learning_theology.2020.desc + + theme = learning_theology_focus + left_portrait = { + character = root + animation = page_flipping + } + right_portrait = { + character = scope:court_chaplain + animation = personality_callous + } + + trigger = { + root.religion = { is_in_family = rf_abrahamic } + any_learning_councillor = { + is_available_ai = yes + } + faith = { #Matches learning_theology_2020_randomize_virtue_options_effect, to make sure you can get at least 1 option + calc_true_if = { + amount >= 2 + trait_is_virtue = brave + trait_is_virtue = just + trait_is_virtue = temperate + trait_is_virtue = chaste + trait_is_virtue = compassionate + trait_is_virtue = honest + trait_is_virtue = forgiving + trait_is_virtue = wrathful + trait_is_virtue = vengeful + trait_is_virtue = content + trait_is_virtue = patient + trait_is_virtue = calm + trait_is_virtue = humble + trait_is_virtue = diligent + trait_is_virtue = generous + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + random_learning_councillor = { + save_scope_as = court_chaplain + } + + #Randomize virtue texts (try to get 3) + learning_theology_2020_randomize_virtue_options_effect = yes + learning_theology_2020_randomize_virtue_options_effect = yes + if = { + limit = { learning >= high_skill_rating } + learning_theology_2020_randomize_virtue_options_effect = yes + } + else = { + learning_theology_2020_randomize_bad_virtue_options_effect = yes + } + } + + # brave + option = { + trigger = { has_character_flag = virtue_brave } + name = learning_theology.2020.brave + save_scope_value_as = { name = virtue_choice value = flag:brave } + } + + # just + option = { + trigger = { has_character_flag = virtue_just } + name = learning_theology.2020.just + save_scope_value_as = { name = virtue_choice value = flag:just } + } + + # temperate + option = { + trigger = { has_character_flag = virtue_temperate } + name = learning_theology.2020.temperate + save_scope_value_as = { name = virtue_choice value = flag:temperate } + } + + # chaste + option = { + trigger = { has_character_flag = virtue_chaste } + name = learning_theology.2020.chaste + save_scope_value_as = { name = virtue_choice value = flag:chaste } + } + + # compassionate + option = { + trigger = { has_character_flag = virtue_compassionate } + name = learning_theology.2020.compassionate + save_scope_value_as = { name = virtue_choice value = flag:compassionate } + } + + # honest + option = { + trigger = { has_character_flag = virtue_honest } + name = learning_theology.2020.honest + save_scope_value_as = { name = virtue_choice value = flag:honest } + } + + + # forgiving + option = { + trigger = { has_character_flag = virtue_forgiving } + name = learning_theology.2020.forgiving + save_scope_value_as = { name = virtue_choice value = flag:forgiving } + } + + + # wrathful + option = { + trigger = { has_character_flag = virtue_wrathful } + name = learning_theology.2020.wrathful + save_scope_value_as = { name = virtue_choice value = flag:wrathful } + } + + + # vengeful + option = { + trigger = { has_character_flag = virtue_vengeful } + name = learning_theology.2020.vengeful + save_scope_value_as = { name = virtue_choice value = flag:vengeful } + } + + # content + option = { + trigger = { has_character_flag = virtue_content } + name = learning_theology.2020.content + save_scope_value_as = { name = virtue_choice value = flag:content } + } + + # patient + option = { + trigger = { has_character_flag = virtue_patient } + name = learning_theology.2020.patient + save_scope_value_as = { name = virtue_choice value = flag:patient } + } + + # calm + option = { + trigger = { has_character_flag = virtue_calm } + name = learning_theology.2020.calm + save_scope_value_as = { name = virtue_choice value = flag:calm } + } + + # humble + option = { + trigger = { has_character_flag = virtue_humble } + name = learning_theology.2020.humble + save_scope_value_as = { name = virtue_choice value = flag:humble } + } + + # diligent + option = { + trigger = { has_character_flag = virtue_diligent } + name = learning_theology.2020.diligent + save_scope_value_as = { name = virtue_choice value = flag:diligent } + } + + # generous + option = { + trigger = { has_character_flag = virtue_generous } + name = learning_theology.2020.generous + save_scope_value_as = { name = virtue_choice value = flag:generous } + } + + # greedy + option = { + trigger = { has_character_flag = virtue_greedy } + name = learning_theology.2020.greedy + save_scope_value_as = { name = virtue_choice value = flag:greedy } + } + + # lustful + option = { + trigger = { has_character_flag = virtue_lustful } + name = learning_theology.2020.lustful + save_scope_value_as = { name = virtue_choice value = flag:lustful } + } + + # ambitious + option = { + trigger = { has_character_flag = virtue_ambitious } + name = learning_theology.2020.ambitious + save_scope_value_as = { name = virtue_choice value = flag:ambitious } + } + + # gluttonous + option = { + trigger = { has_character_flag = virtue_gluttonous } + name = learning_theology.2020.gluttonous + save_scope_value_as = { name = virtue_choice value = flag:gluttonous } + } + + + after = { + learning_theology_2020_tooltip_effect = yes + hidden_effect = { + #(These effects must match learning_theology_2020_tooltip_effect) + if = { + limit = { exists = scope:virtue_choice } + + #HIDDEN SUPERBAD OUTCOME + if = { + limit = { + #That's not a virtue! + OR = { + AND = { + faith = { NOT = { trait_is_virtue = brave } } + scope:virtue_choice = flag:brave + } + AND = { + faith = { NOT = { trait_is_virtue = just } } + scope:virtue_choice = flag:just + } + AND = { + faith = { NOT = { trait_is_virtue = temperate } } + scope:virtue_choice = flag:temperate + } + AND = { + faith = { NOT = { trait_is_virtue = chaste } } + scope:virtue_choice = flag:chaste + } + AND = { + faith = { NOT = { trait_is_virtue = compassionate } } + scope:virtue_choice = flag:compassionate + } + AND = { + faith = { NOT = { trait_is_virtue = honest } } + scope:virtue_choice = flag:honest + } + AND = { + faith = { NOT = { trait_is_virtue = forgiving } } + scope:virtue_choice = flag:forgiving + } + AND = { + faith = { NOT = { trait_is_virtue = wrathful } } + scope:virtue_choice = flag:wrathful + } + AND = { + faith = { NOT = { trait_is_virtue = vengeful } } + scope:virtue_choice = flag:vengeful + } + AND = { + faith = { NOT = { trait_is_virtue = content } } + scope:virtue_choice = flag:content + } + AND = { + faith = { NOT = { trait_is_virtue = patient } } + scope:virtue_choice = flag:patient + } + AND = { + faith = { NOT = { trait_is_virtue = calm } } + scope:virtue_choice = flag:calm + } + AND = { + faith = { NOT = { trait_is_virtue = humble } } + scope:virtue_choice = flag:humble + } + AND = { + faith = { NOT = { trait_is_virtue = diligent } } + scope:virtue_choice = flag:diligent + } + AND = { + faith = { NOT = { trait_is_virtue = generous } } + scope:virtue_choice = flag:generous + } + AND = { + faith = { NOT = { trait_is_virtue = greedy } } + scope:virtue_choice = flag:greedy + } + AND = { + faith = { NOT = { trait_is_virtue = lustful } } + scope:virtue_choice = flag:lustful + } + AND = { + faith = { NOT = { trait_is_virtue = ambitious } } + scope:virtue_choice = flag:ambitious + } + AND = { + faith = { NOT = { trait_is_virtue = gluttonous } } + scope:virtue_choice = flag:gluttonous + } + } + } + trigger_event = { + id = learning_theology.2021 + days = 2 + } + } + else_if = { + limit = { + OR = { + #They have the trait + AND = { + scope:court_chaplain = { has_trait = brave } + scope:virtue_choice = flag:brave + } + AND = { + scope:court_chaplain = { has_trait = just } + scope:virtue_choice = flag:just + } + AND = { + scope:court_chaplain = { has_trait = temperate } + scope:virtue_choice = flag:temperate + } + AND = { + scope:court_chaplain = { has_trait = chaste } + scope:virtue_choice = flag:chaste + } + AND = { + scope:court_chaplain = { has_trait = compassionate } + scope:virtue_choice = flag:compassionate + } + AND = { + scope:court_chaplain = { has_trait = honest } + scope:virtue_choice = flag:honest + } + AND = { + scope:court_chaplain = { has_trait = forgiving } + scope:virtue_choice = flag:forgiving + } + AND = { + scope:court_chaplain = { has_trait = wrathful } + scope:virtue_choice = flag:wrathful + } + AND = { + scope:court_chaplain = { has_trait = vengeful } + scope:virtue_choice = flag:vengeful + } + AND = { + scope:court_chaplain = { has_trait = content } + scope:virtue_choice = flag:content + } + AND = { + scope:court_chaplain = { has_trait = patient } + scope:virtue_choice = flag:patient + } + AND = { + scope:court_chaplain = { has_trait = calm } + scope:virtue_choice = flag:calm + } + AND = { + scope:court_chaplain = { has_trait = humble } + scope:virtue_choice = flag:humble + } + AND = { + scope:court_chaplain = { has_trait = diligent } + scope:virtue_choice = flag:diligent + } + AND = { + scope:court_chaplain = { has_trait = generous } + scope:virtue_choice = flag:generous + } + #Matching ai value + AND = { + scope:court_chaplain = { ai_boldness >= medium_positive_ai_value } + OR = { + scope:virtue_choice = flag:brave + scope:virtue_choice = flag:wrathful + } + } + AND = { + scope:court_chaplain = { ai_honor >= medium_positive_ai_value } + OR = { + scope:virtue_choice = flag:just + scope:virtue_choice = flag:honest + } + } + AND = { + scope:court_chaplain = { ai_greed <= medium_negative_ai_value } + OR = { + scope:virtue_choice = flag:temperate + scope:virtue_choice = flag:chaste + scope:virtue_choice = flag:content + scope:virtue_choice = flag:humble + scope:virtue_choice = flag:generous + } + } + AND = { + scope:court_chaplain = { ai_compassion >= medium_positive_ai_value } + OR = { + scope:virtue_choice = flag:compassionate + scope:virtue_choice = flag:generous + } + } + AND = { + scope:court_chaplain = { ai_vengefulness <= medium_negative_ai_value } + scope:virtue_choice = flag:forgiving + } + AND = { + scope:court_chaplain = { ai_vengefulness >= medium_positive_ai_value } + scope:virtue_choice = flag:vengeful + } + AND = { + scope:court_chaplain = { ai_energy <= medium_negative_ai_value } + OR = { + scope:virtue_choice = flag:content + scope:virtue_choice = flag:patient + scope:virtue_choice = flag:humble + } + } + AND = { + scope:court_chaplain = { ai_rationality <= medium_negative_ai_value } + OR = { + scope:virtue_choice = flag:patient + scope:virtue_choice = flag:calm + } + } + AND = { + scope:court_chaplain = { ai_boldness <= medium_negative_ai_value } + scope:virtue_choice = flag:calm + } + AND = { + scope:court_chaplain = { ai_energy >= medium_positive_ai_value } + OR = { + scope:virtue_choice = flag:brave + scope:virtue_choice = flag:diligent + } + } + } + } + send_interface_toast = { + title = learning_theology.2020.success.desc + left_icon = scope:court_chaplain + add_piety = medium_piety_gain + add_learning_lifestyle_xp = minor_lifestyle_xp + reverse_add_opinion = { + target = scope:court_chaplain + modifier = kindness_opinion + opinion = 30 + } + } + } + #BAD OUTCOME + else_if = { + limit = { + #They have the opposite trait + OR = { + AND = { + scope:court_chaplain = { has_trait = craven } + scope:virtue_choice = flag:brave + } + AND = { + scope:court_chaplain = { has_trait = arbitrary } + scope:virtue_choice = flag:just + } + AND = { + scope:court_chaplain = { has_trait = gluttonous } + scope:virtue_choice = flag:temperate + } + AND = { + scope:court_chaplain = { has_trait = lustful } + scope:virtue_choice = flag:chaste + } + AND = { + scope:court_chaplain = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + scope:virtue_choice = flag:compassionate + } + AND = { + scope:court_chaplain = { has_trait = deceitful } + scope:virtue_choice = flag:honest + } + AND = { + scope:court_chaplain = { has_trait = vengeful } + scope:virtue_choice = flag:forgiving + } + AND = { + scope:court_chaplain = { has_trait = calm } + scope:virtue_choice = flag:wrathful + } + AND = { + scope:court_chaplain = { has_trait = forgiving } + scope:virtue_choice = flag:vengeful + } + AND = { + scope:court_chaplain = { has_trait = ambitious } + scope:virtue_choice = flag:content + } + AND = { + scope:court_chaplain = { has_trait = impatient } + scope:virtue_choice = flag:patient + } + AND = { + scope:court_chaplain = { has_trait = wrathful } + scope:virtue_choice = flag:calm + } + AND = { + scope:court_chaplain = { has_trait = arrogant } + scope:virtue_choice = flag:humble + } + AND = { + scope:court_chaplain = { has_trait = lazy } + scope:virtue_choice = flag:diligent + } + AND = { + scope:court_chaplain = { has_trait = greedy } + scope:virtue_choice = flag:generous + } + } + } + send_interface_toast = { + title = learning_theology.2020.failure.desc + left_icon = scope:court_chaplain + reverse_add_opinion = { + target = scope:court_chaplain + modifier = insulted_opinion + opinion = -15 + } + } + } + #NEUTRAL OUTCOME + else = { + send_interface_toast = { + title = learning_theology.2020.neutral.desc + left_icon = scope:court_chaplain + add_piety = medium_piety_gain + } + } + } + } + remove_character_flag = virtue_brave + remove_character_flag = virtue_just + remove_character_flag = virtue_temperate + remove_character_flag = virtue_chaste + remove_character_flag = virtue_compassionate + remove_character_flag = virtue_honest + remove_character_flag = virtue_forgiving + remove_character_flag = virtue_wrathful + remove_character_flag = virtue_vengeful + remove_character_flag = virtue_content + remove_character_flag = virtue_patient + remove_character_flag = virtue_calm + remove_character_flag = virtue_humble + remove_character_flag = virtue_diligent + remove_character_flag = virtue_generous + remove_character_flag = virtue_greedy + remove_character_flag = virtue_lustful + remove_character_flag = virtue_ambitious + remove_character_flag = virtue_gluttonous + } +} + +#What, that's not even a virtue! +learning_theology.2021 = { #by Mathilda Bjarnehed + type = character_event + title = learning_theology.2020.t + desc = learning_theology.2021.desc + + theme = learning_theology_focus + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:court_chaplain + animation = personality_vengeful + } + + + option = { + name = learning_theology.2021.a + + reverse_add_opinion = { + target = scope:court_chaplain + modifier = impious_opinion + opinion = -15 + } + add_piety = minor_piety_loss + } +} + +#Determine the age of the world +# by Petter Vilberg +learning_theology.3002 = { + type = character_event + title = learning_theology.3002.t + desc = learning_theology.3002.desc + + theme = learning_theology_focus + left_portrait = { + character = root + animation = page_flipping + } + right_portrait = { + character = scope:chaplain + animation = disapproval + } + + trigger = { + NOT = { has_character_flag = had_event_learning_theology_3002 } + faith = { + OR = { + religion = religion:hinduism_religion + religion = religion:buddhism_religion + religion = religion:jainism_religion + religion = religion:zoroastrianism_religion + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:islam_religion + } + } + OR = { + exists = cp:councillor_court_chaplain + employs_court_position = camp_priest_camp_officer + } + } + + weight_multiplier = { + base = 1 + downweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3002 + years = 20 + } + cp:councillor_court_chaplain ?= { + save_scope_as = chaplain + } + if = { + limit = { + NOT = { exists = scope:chaplain } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = chaplain + } + } + } + + option = { #People deserve to know the truth! + name = learning_theology.3002.a + add_learning_lifestyle_xp = minor_lifestyle_xp + add_prestige = medium_prestige_gain + add_piety = minor_piety_loss + scope:chaplain = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -15 + } + } + cynical_progression_effect = yes + } + + option = { #The church knows best + name = learning_theology.3002.b + add_learning_lifestyle_xp = miniscule_lifestyle_xp + add_piety = major_piety_gain + add_prestige = minor_prestige_loss + zealous_progression_effect = yes + scope:chaplain = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + + option = { + name = learning_theology.3002.c + add_learning_lifestyle_xp = medium_lifestyle_xp + } +} + +#Determine the number of spheres in the heavens +# by Petter Vilberg +learning_theology.3003 = { + type = character_event + title = learning_theology.3003.t + desc = learning_theology.3003.desc + + theme = learning_theology_focus + left_portrait = { + character = root + animation = survey + } + right_portrait = { + character = scope:chaplain + animation = disapproval + } + + trigger = { + root.religion = { is_in_family = rf_abrahamic } + NOT = { has_character_flag = had_event_learning_theology_3003 } + NOR = { + has_character_modifier = scholarship_astrological_insights_modifier + has_character_modifier = scholarship_down_to_earth_modifier + } + OR = { + exists = cp:councillor_court_chaplain + employs_court_position = camp_priest_camp_officer + } + } + + weight_multiplier = { + base = 1 + downweight_for_focus_modifier = { FOCUS = learning_medicine_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3003 + years = 5 + } + cp:councillor_court_chaplain ?= { + save_scope_as = chaplain + } + if = { + limit = { + NOT = { exists = scope:chaplain } + } + random_court_position_holder = { + type = camp_priest_camp_officer + save_scope_as = chaplain + } + } + } + + option = { #Answers about the world lie in the heavens + name = learning_theology.3003.a + add_learning_lifestyle_xp = minor_lifestyle_xp + add_character_modifier = { + modifier = scholarship_astrological_insights_modifier + years = 10 + } + scope:chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -10 + } + } + cynical_progression_effect = yes + } + + option = { #Focus on earthly matters + name = learning_theology.3003.b + add_learning_lifestyle_xp = miniscule_lifestyle_xp + add_piety = major_piety_gain + add_character_modifier = { + modifier = scholarship_down_to_earth_modifier + years = 10 + } + scope:chaplain = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 15 + } + } + zealous_progression_effect = yes + } +} + + +################################################## +# Worship in the same church (theology friend) +# by Linnéa Thimrén +################################################## + +scripted_trigger learning_theology_3011_building_trigger = { + faith = root.faith + OR = { #To check that you CAN build the next lvl of the building + AND = { + root.culture = { + has_innovation = innovation_manorialism + } + has_building = temple_01 + } + AND = { + root.culture = { + has_innovation = innovation_windmills + } + has_building = temple_02 + } + AND = { + root.culture = { + has_innovation = innovation_cranes + } + has_building = temple_03 + } + } +} + +learning_theology.3011 = { + type = character_event + title = learning_theology.3011.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_relation_friend = scope:believer + } + desc = learning_theology.3011.desc_friend + } + desc = learning_theology.3011.desc + } + desc = learning_theology.3011.ending + } + + theme = learning_theology_focus + left_portrait = { + character = root + animation = stunned + } + right_portrait = { + character = scope:believer + animation = debating + } + + trigger = { + is_ai = no # Develops the world a tad too fast + NOT = { + has_character_flag = had_event_learning_theology_3011 + } + OR = { + any_realm_province = { + learning_theology_3011_building_trigger = yes + } + domicile ?= { + domicile_location = { + learning_theology_3011_building_trigger = yes + } + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3011 + years = 5 + } + + random_realm_province = { + limit = { + learning_theology_3011_building_trigger = yes + } + weight = { #More likely if it's your province + base = 100 + modifier = { + add = 200 + province_owner = root + } + modifier = { + add = 500 + this = root.capital_province + } + } + save_scope_as = temple_county + } + if = { + limit = { + NOT = { exists = scope:temple_county } + } + domicile ?= { + domicile_location = { + save_scope_as = temple_county + } + } + } + + #Find a believer (potential friend) + if = { + limit = { + NOT = { + any_relation = { + type = friend + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_theology_focus } + } + } + } + potential_lifestyle_friend_saving_effect = { FOCUS = learning_theology_focus SCOPE_NAME = believer } + } + else = { + random_relation = { + type = friend + limit = { + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_theology_focus } + } + save_scope_as = believer + } + } + } + + option = { #Convince them to invest in the church + name = { + trigger = { has_relation_friend = scope:believer } + text = learning_theology.3011.a_friend + } + name = { + trigger = { NOT = { has_relation_friend = scope:believer } } + text = learning_theology.3011.a + } + if = { + limit = { + has_relation_friend = scope:believer + } + theology_3011_a_success_effect = yes + } + else = { + duel = { + skill = learning + value = 10 + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + add = { + value = scope:believer.learning + subtract = average_skill_rating + multiply = 2 + min = 10 #Guaranteed help + } + } + desc = learning_theology.3011.a.success + send_interface_toast = { + title = learning_theology.3011.a.success + left_icon = scope:believer + theology_3011_a_success_effect = yes + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + modifier = { + add = { + value = scope:believer.learning + subtract = average_skill_rating + multiply = -2 + max = 0 #They shouldn't make this worse + } + } + desc = learning_theology.3011.a.failure + send_interface_toast = { + title = learning_theology.3011.a.failure + left_icon = scope:believer + theology_3011_a_failure_effect = yes + } + } + } + } + ai_chance = { + base = 50 + } + } + + option = { #nah + name = learning_theology.3011.b + add_gold = minor_gold_value + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 2 + } + } + } + + after = { + scope:believer = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + + +################################################## +# Send fan mail to religious head +# by Linnéa Thimrén +################################################## + +learning_theology.3021 = { + type = character_event + title = learning_theology.3021.t + desc = { + desc = learning_theology.3021.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.desc_friend + } + desc = learning_theology.3021.desc + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + faith = { + religion_tag = christianity_religion + } + } + desc = learning_theology.3021.desc_christian + } + desc = learning_theology.3021.desc_other + } + } + } + + theme = learning_theology_focus + left_portrait = { + character = root + animation = writing + } + right_portrait = { + character = scope:compliment_receiver + animation = personality_zealous + } + lower_right_portrait = scope:believer + + trigger = { + NOT = { + has_character_flag = had_event_learning_theology_3021 + } + exists = faith.religious_head + faith.religious_head = { + this != root + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3021 + years = 5 + } + + #Do I have a friend? + if = { + limit = { + any_relation = { + type = friend + this != faith.religious_head + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_theology_focus } + } + } + random_relation = { + type = friend + limit = { + this != faith.religious_head + lifestyle_friend_trigger = { CHARACTER = root FOCUS = learning_theology_focus } + } + save_scope_as = believer + } + } + + faith.religious_head = { + save_scope_as = compliment_receiver + } + + if = { + limit = { #Only give a good option if you have a friend! + exists = scope:believer + } + randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:compliment_receiver } + } + else = { + #Randomize 3 compliment types + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:compliment_receiver } + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:compliment_receiver } + randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:compliment_receiver } + } + } + + #Compassionate + option = { + trigger = { has_character_flag = available_compliment_compassionate } + name = diplomacy_majesty.0004.compassionate + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = compassionate COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #bold + option = { + trigger = { has_character_flag = available_compliment_bold } + name = diplomacy_majesty.0004.bold + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = bold COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #honorable + option = { + trigger = { has_character_flag = available_compliment_honorable } + name = diplomacy_majesty.0004.honorable + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = honorable COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #greed + option = { + trigger = { has_character_flag = available_compliment_greedy } + name = diplomacy_majesty.0004.greed + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = greed COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #rational + option = { + trigger = { has_character_flag = available_compliment_rational } + name = diplomacy_majesty.0004.rational + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = rational COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #zealous + option = { + trigger = { has_character_flag = available_compliment_zealous } + name = diplomacy_majesty.0004.zealous + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = zealous COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #energetic + option = { + trigger = { has_character_flag = available_compliment_energetic } + name = diplomacy_majesty.0004.energetic + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = energetic COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #forgiving + option = { + trigger = { has_character_flag = available_compliment_forgiving } + name = diplomacy_majesty.0004.forgiving + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = forgiving COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #beautiful + option = { + trigger = { has_character_flag = available_compliment_beautiful } + name = diplomacy_majesty.0004.beautiful + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = beautiful COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #strong + option = { + trigger = { has_character_flag = available_compliment_strong } + name = diplomacy_majesty.0004.strong + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = strong COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #extroverted + option = { + trigger = { has_character_flag = available_compliment_extroverted } + name = diplomacy_majesty.0004.extroverted + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = extroverted COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + #dominant + option = { + trigger = { has_character_flag = available_compliment_dominant } + name = diplomacy_majesty.0004.dominant + flavor = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:believer + } + desc = learning_theology.3021.success.tt + } + desc = diplomacy_majesty.0004.compliment.tt #Explanation of what outcome is based on + } + } + + hidden_effect = { + scope:compliment_receiver = { evaluate_compliment_effect = { COMPLIMENT_TYPE = dominant COMPLIMENT_GIVER = root } } + } + learning_theology_3021_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + ai_chance = { + base = 50 + } + } + + option = { #Nah + name = learning_theology.3021.b + add_piety = medium_piety_gain + ai_chance = { + base = 25 + ai_value_modifier = { + ai_greed = 0.75 + } + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 10 + } + } + } + + after = { + clear_available_compliments_effect = yes + } +} + + +#It was well received! +learning_theology.3022 = { + type = letter_event + opening = { + desc = learning_theology.3022.opening + } + desc = learning_theology.3022.desc + sender = scope:compliment_receiver + + immediate = { + save_scope_as = letter_receiver + if = { + limit = { + scope:compliment_receiver = { is_alive = yes } + } + theology_3021_a_success_effect = yes + } + hidden_effect = { + if = { + limit = { + has_royal_court = yes + NOT = { + has_character_flag = got_scroll_artifact + } + } + scope:compliment_receiver = { + create_artifact_pedestal_religious_head_letter_effect = { OWNER = scope:compliment_receiver } + } + add_character_flag = { + flag = got_scroll_artifact + years = 30 + } + } + } + } + + option = { + name = learning_theology.3022.a + if = { + limit = { + exists = scope:newly_created_artifact + } + scope:newly_created_artifact = { + set_owner = root + } + } + } +} + + +#It fell flat +learning_theology.3023 = { + type = letter_event + opening = { + desc = learning_theology.3023.opening + } + desc = learning_theology.3023.desc + sender = scope:compliment_receiver + + immediate = { + add_diplomacy_lifestyle_xp = minor_lifestyle_xp + } + + option = { + name = learning_theology.3023.a + } +} + +#It was not well received +learning_theology.3024 = { + type = letter_event + opening = { + desc = learning_theology.3024.opening + } + desc = learning_theology.3024.desc + sender = scope:compliment_receiver + + immediate = { + if = { + limit = { + scope:compliment_receiver = { is_alive = yes } + } + theology_3021_a_failure_effect = yes + } + } + + option = { + name = learning_theology.3024.a + } +} + + +################################################## +# Deal with province of different faith +# by Linnéa Thimrén +################################################## +scripted_trigger learning_theology_3031_province_trigger = { + religion != root.religion + faith = { + faith_hostility_level = { + target = root.faith + value >= faith_hostile_level + } + } +} + +learning_theology.3031 = { + type = character_event + title = learning_theology.3031.t + desc = { + desc = learning_theology.3031.desc_opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:bishop + } + desc = learning_theology.3031.desc_bishop + } + desc = learning_theology.3031.desc + } + } + + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:bishop + animation = dismissal + trigger = { exists = scope:bishop } + } + + trigger = { + NOT = { + has_character_flag = had_event_learning_theology_3031 + } + any_sub_realm_county = { + learning_theology_3031_province_trigger = yes + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3031 + years = 5 + } + random_sub_realm_county = { + limit = { + learning_theology_3031_province_trigger = yes + } + save_scope_as = county + } + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + } + + option = { #Leave them be + name = learning_theology.3031.a + scope:county = { + add_county_modifier = { + modifier = modifier_religious_understanding_modifier + years = 25 + } + } + if = { + limit = { + exists = scope:bishop + } + scope:bishop = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -5 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.75 + } + } + } + + option = { #Force conversion + name = { + text = { + first_valid = { + # Praying is part of faith + triggered_desc = { + trigger = { religion != religion:confucianism_religion } + desc = learning_theology.3031.b + } + # They're Confucian + desc = learning_theology.3031.b_confucian + } + } + } + if = { + limit = { + exists = root.cp:councillor_court_chaplain + root.cp:councillor_court_chaplain = { + is_performing_council_task = task_conversion + } + scope:county = { + is_target_of_council_task = task_conversion + } + } + custom_tooltip = learning_theology.3031.b_tt + } + else = { + custom_tooltip = learning_theology.3031.b_tt2 + } + scope:county = { + set_variable = { + name = learning_encouraged_conversion + years = 30 + } + } + if = { + limit = { + exists = scope:bishop + } + scope:bishop = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 10 + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.75 + } + } + } +} + + +################################# +# Study Mysticism - Chain +# by Petter Vilberg +################################# +learning_theology.3041 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3041.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_cynical + } + + trigger = { + NOT = { has_trait = lifestyle_mystic } + NOT = { + has_character_flag = had_event_learning_theology_3041 + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3041 + years = 10 + } + } + + option = { # Some practical experience would be useful... + name = learning_theology.3041.a + custom_tooltip = learning_theology.3041.a.tt + trigger_event = { + id = learning_theology.3042 + days = 10 + } + ai_chance = { + base = 50 + } + } + + option = { # Dive deeper into the books + name = learning_theology.3041.b + custom_tooltip = learning_theology.3041.b.tt + trigger_event = { + id = learning_theology.3044 + days = 10 + } + ai_chance = { + base = 50 + } + } +} + +# Practical experiments +learning_theology.3042 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3042.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = delirium + } + + option = { # This is what I have been looking for + name = learning_theology.3042.a + custom_tooltip = learning_theology.3042.a.tt + hidden_effect = { + random_list = { + 80 = { + trigger_event = { + id = learning_theology.3043 + days = 10 + } + } + 20 = { + trigger_event = { + id = learning_theology.3045 + days = 10 + } + } + } + } + ai_chance = { + base = 100 + } + } + + option = { # Worth noting down for the future + name = learning_theology.3042.b + add_learning_lifestyle_xp = medium_lifestyle_xp + ai_chance = { + base = 0 + } + } +} + +# Results +learning_theology.3043 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3043.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_content + } + + option = { # This is what I have been looking for + name = learning_theology.3043.a + add_trait = lifestyle_mystic + stress_impact = { + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + option = { # I feel nothing, but it's very relaxing + name = learning_theology.3043.b + add_stress = major_stress_loss + add_character_modifier = { + modifier = introspective_rest_modifier + years = 5 + } + stress_impact = { + diligent = medium_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 0 + compare_modifier = { + value = stress + } + } + } +} + +# Theoretical study of Mysticism +learning_theology.3044 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3044.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = happiness + } + + option = { # This is what I have been looking for + name = learning_theology.3044.a + add_learning_skill = 1 + add_learning_lifestyle_perk_points = 1 + ai_chance = { + base = 80 + } + } + + option = { # No, I want the trait after all + name = learning_theology.3044.b + custom_tooltip = learning_theology.3041.b.tt + trigger_event = { + id = learning_theology.3042 + days = 10 + } + ai_chance = { + base = 20 + } + } +} + +# Things go a little wrong +learning_theology.3045 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3045.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_cynical + } + + option = { # I have to recapture the feeling! + name = learning_theology.3045.a + add_learning_lifestyle_xp = medium_lifestyle_xp + add_character_modifier = { + modifier = theology_dangerous_habits_modifier + years = 5 + } + hidden_effect = { + random = { + chance = 30 + trigger_event = { + id = learning_theology.3046 + days = { 365 730 } + } + } + } + } + + option = { # A little prayer to make up for it + name = learning_theology.3045.b + trigger = { + OR = { + has_trait = zealous + has_trait = fickle + has_trait = diligent + } + } + trait = zealous + trait = fickle + trait = diligent + add_piety = medium_piety_gain + stress_impact = { + stubborn = medium_stress_impact_gain + } + } +} + +# Chance to finally figure it out +learning_theology.3046 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3046.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_cynical + } + + trigger = { + NOR = { + has_trait = lifestyle_mystic + has_trait = lunatic + } + is_available = yes + has_character_modifier = theology_dangerous_habits_modifier + } + + option = { # Let's see where it leads + name = learning_theology.3046.a + random_list = { + 70 = { + desc = learning_theology.3046.a.success + compare_modifier = { + value = learning + multiplier = 2 + } + custom_tooltip = learning_theology.3046.a.success.tt + trigger_event = { + id = learning_theology.3043 + days = 5 + } + } + 30 = { + desc = learning_theology.3046.a.failure + custom_tooltip = learning_theology.3046.a.failure.tt + hidden_effect = { + trigger_event = { + id = learning_theology.3047 + days = 5 + } + } + } + } + ai_chance = { + base = 100 + modifier = { + add = 500 + has_trait = stubborn + } + } + } + + option = { # It is time to give up + name = learning_theology.3046.b + add_stress = medium_stress_loss + ai_chance = { + base = 100 + modifier = { + add = 300 + has_trait = fickle + } + } + } + + after = { + remove_character_modifier = theology_dangerous_habits_modifier + } +} + + +# Your quest drives you mad +learning_theology.3047 = { + type = character_event + title = learning_theology.3041.t + desc = learning_theology.3047.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = manic + } + + trigger = { + NOT = { + has_trait = lunatic + } + } + + option = { # This is what I have been looking for + name = learning_theology.3047.a + add_trait = lunatic_1 + } +} + + + +### END Mysticism chain + +################################# +# Passion Play drama - Chain +# by James Beaumont +################################# +# Should I go see the play? +learning_theology.3051 = { + type = character_event + title = learning_theology.3051.t + desc = { + desc = learning_theology.3051.desc.intro + random_valid = { + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = passion_flag + } + } + desc = learning_theology.3051.desc.passion + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = nights_flag + } + } + desc = learning_theology.3051.desc.arabian_nights + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = inferno_flag + } + } + desc = learning_theology.3051.desc.inferno + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = ravenway_flag + } + } + desc = learning_theology.3051.desc.my_immortal + } + } + desc = learning_theology.3051.desc.outro + } + theme = learning_theology_focus + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:passion_playwright + animation = personality_honorable + } + + trigger = { + NOT = { + has_character_flag = had_event_learning_theology_3051 + } + root.religion = { is_in_family = rf_abrahamic } + any_pool_character = { + province = root.capital_province + # Standard sanity check + is_available_ai_adult = yes + # Character doesn't still have any lingering flags from a previous event + NOT = { has_character_flag = has_been_passion_playwright_flag } + # Character is at least your religion + religion = root.religion + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = learning_theology_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_learning_theology_3051 + years = 10 + } + random_pool_character = { + province = capital_province + limit = { + # Standard sanity check + is_available_ai_adult = yes + # Character doesn't still have any lingering flags from a previous event + NOT = { has_character_flag = has_been_passion_playwright_flag } + # Character is at least your religion + religion = root.religion + } + weight = { + base = 1 + modifier = { # Faith is the same as Root + faith = root.faith + add = 20 + } + modifier = { # Characters of this gender generally take part in religious activities + can_be_clergy_due_to_gender_trigger = yes + add = 20 + } + modifier = { # Likes religion + has_trait = zealous + add = 5 + } + modifier = { # Good at writing + has_trait = lifestyle_poet + add = 2 + } + modifier = { + has_trait = journaller + add = 2 + } + } + add_character_flag = { + flag = has_been_passion_playwright_flag + years = 5 + } + save_scope_as = passion_playwright + random_list = { + 99 = { + random_list = { + 10 = { + # For loc + add_character_flag = { + flag = passion_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = nights_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = inferno_flag + years = 5 + } + } + } + } + 1 = { + add_character_flag = { + flag = ravenway_flag + years = 5 + } + random_list = { + 10 = { + # For loc + add_character_flag = { + flag = trait_intellect_good_1_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_intellect_good_2_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_intellect_good_3_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_physique_good_1_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_physique_good_2_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_physique_good_3_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_fecund_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_pure_blooded_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_beauty_good_1_flag + years = 5 + } + } + 10 = { + trigger = { + is_attracted_to_women = yes + } + add_character_flag = { + flag = trait_beauty_good_2_female_flag + years = 5 + } + } + 10 = { + trigger = { + is_attracted_to_men = yes + } + add_character_flag = { + flag = trait_beauty_good_2_male_flag + years = 5 + } + } + 10 = { + add_character_flag = { + flag = trait_beauty_good_3_flag + years = 5 + } + } + } + } + } + } + } + + option = { # Let's go see it + name = learning_theology.3051.a + custom_tooltip = { + text = learning_lifestyle_experience_gain_indication + if = { + limit = { + scope:passion_playwright = { + has_character_flag = ravenway_flag + } + } + trigger_event = { + id = learning_theology.3053 + days = 10 + } + } + else = { + trigger_event = { + id = learning_theology.3052 + days = 10 + } + } + } + ai_chance = { + base = 50 + } + } + + option = { # Nah, I don't want this one + name = learning_theology.3051.b + stress_impact = { + gregarious = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 0 + } + } +} + +# Normal outcome +learning_theology.3052 = { + type = character_event + title = { + random_valid = { + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = passion_flag + } + } + desc = learning_theology.3051.passion + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = nights_flag + } + } + desc = learning_theology.3051.arabian_nights + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = inferno_flag + } + } + desc = learning_theology.3051.inferno + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + has_character_flag = ravenway_flag + } + } + desc = learning_theology.3051.my_immortal + } + } + } + trigger = { + scope:passion_playwright = { + is_alive = yes + } + } + desc = learning_theology.3052.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:passion_playwright + animation = personality_honorable + } + + option = { # Teach me your ways! + name = learning_theology.3052.a + pay_short_term_gold = { + target = scope:passion_playwright + gold = minor_gold_value + } + add_piety = minor_piety_gain + add_learning_lifestyle_xp = minor_lifestyle_xp + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = 2 + ai_compassion = 2 + } + } + } + + option = { # Nah, I can write it better + name = learning_theology.3052.b + custom_tooltip = { + text = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_theology.3054 + days = 10 + } + } + show_as_tooltip = { + duel = { + skill = learning + target = scope:passion_playwright + } + } + stress_impact = { + journaller = minor_stress_impact_loss # You find writing relaxing + arrogant = minor_stress_impact_loss + content = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 2 + ai_sociability = 2 + } + } + } +} + +# My Immortal outcome +learning_theology.3053 = { + type = character_event + title = learning_theology.3051.desc.my_immortal + desc = learning_theology.3053.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:passion_playwright + animation = flirtation_left + } + trigger = { + scope:passion_playwright = { + is_alive = yes + } + } + + option = { # Boo! + name = learning_theology.3053.a + add_piety = minor_piety_gain + stress_impact = { + deviant = medium_stress_impact_gain + lustful = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + option = { # I'll do it better + name = learning_theology.3053.b + custom_tooltip = { + text = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_theology.3054 + days = 10 + } + } + show_as_tooltip = { + duel = { + skill = learning + target = scope:passion_playwright + } + } + stress_impact = { + journaller = minor_stress_impact_loss # You find writing relaxing + arrogant = minor_stress_impact_loss + content = minor_stress_impact_gain + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + option = { # I liked the horny fanfiction + trigger = { + OR = { + has_trait = deviant + has_trait = lustful + } + } + name = learning_theology.3053.c + add_piety = minor_piety_loss + add_courtier = scope:passion_playwright + set_relation_friend = { reason = friend_passion_play target = scope:passion_playwright } + stress_impact = { + deviant = minor_stress_impact_loss + lustful = minor_stress_impact_loss + chaste = minor_stress_impact_gain + } + ai_chance = { # This is for player memes + base = 0 + } + } +} + +scripted_trigger 3054_suitable_actor_trigger = { + NOT = { this = scope:passion_playwright } + is_available_ai_adult = yes +} + +# Deciding on a lead actor +learning_theology.3054 = { + type = character_event + title = learning_theology.3054.t + desc = { + desc = learning_theology.3054.desc.intro + random_valid = { + triggered_desc = { + trigger = { + scope:passion_playwright = { + NOT = { has_character_flag = passion_flag } + } + } + desc = learning_theology.3051.passion + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + NOT = { has_character_flag = nights_flag } + } + } + desc = learning_theology.3051.arabian_nights + } + triggered_desc = { + trigger = { + scope:passion_playwright = { + NOT = { has_character_flag = inferno_flag } + } + } + desc = learning_theology.3051.inferno + } + } + desc = learning_theology.3054.desc.outro + } + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_honorable + } + lower_left_portrait = { + character = scope:family_actor + } + lower_center_portrait = { + character = scope:random_actor + } + lower_right_portrait = { + character = scope:passion_playwright + } + + + immediate = { + hidden_effect = { + duel = { + skill = learning + target = scope:passion_playwright + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + add_character_flag = { + flag = superior_passion_play_flag + years = 5 + } + } + } + # Your writing was not as good as the Playwright + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + add_character_flag = { + flag = inferior_passion_play_flag + years = 5 + } + } + } + } + random_courtier_or_guest = { + limit = { + 3054_suitable_actor_trigger = yes + is_close_family_of = root + } + weight = { + base = 1 + modifier = { # Faith is the same as Root + faith = root.faith + add = 20 + } + modifier = { # Characters of this gender generally take part in religious activities + can_be_clergy_due_to_gender_trigger = yes + add = 20 + } + modifier = { # Likes religion + has_trait = zealous + add = 5 + } + modifier = { # Good at writing + has_trait = gregarious + add = 2 + } + modifier = { + has_trait = ambitious + add = 2 + } + } + save_scope_as = family_actor + } + random_courtier_or_guest = { + limit = { + 3054_suitable_actor_trigger = yes + NOT = { is_close_family_of = root } + } + weight = { + base = 1 + modifier = { # Faith is the same as Root + faith = root.faith + add = 20 + } + modifier = { # Characters of this gender generally take part in religious activities + can_be_clergy_due_to_gender_trigger = yes + add = 20 + } + modifier = { # Likes religion + has_trait = zealous + add = 5 + } + modifier = { # Good at writing + has_trait = gregarious + add = 2 + } + modifier = { + has_trait = ambitious + add = 2 + } + } + save_scope_as = random_actor + } + } + } + + option = { # Myself, of course! + name = learning_theology.3054.a + show_as_tooltip = { + duel = { + skill = diplomacy + target = scope:passion_playwright + } + } + custom_tooltip = { + text = learning_theology.3054.a.tt + save_scope_as = lead_actor + } + + stress_impact = { + shy = medium_stress_impact_gain + humble = medium_stress_impact_gain + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 2 + ai_sociability = 2 + } + modifier = { + add = 20 + # I am a good actor + root.diplomacy >= scope:passion_playwright.diplomacy + } + modifier = { + factor = 0.5 + # I'm a bad actor + root.diplomacy < scope:passion_playwright.diplomacy + } + } + } + + option = { # My close family member + name = learning_theology.3054.b + trigger = { + exists = scope:family_actor + } + show_as_tooltip = { + duel = { + skill = diplomacy + target = scope:passion_playwright + } + } + custom_tooltip = { + text = learning_theology.3054.b.tt + scope:family_actor = { save_scope_as = lead_actor } + } + reverse_add_opinion = { + modifier = flattered_opinion + opinion = 15 + target = scope:family_actor + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + family_first = minor_stress_impact_loss + } + ai_chance = { + base = 50 + modifier = { + factor = 2 + has_trait = family_first + } + modifier = { + add = 50 + # I am a bad actor + root.diplomacy < scope:passion_playwright.diplomacy + # My family member is a good actor + scope:family_actor.diplomacy >= scope:passion_playwright.diplomacy + } + } + } + + option = { # Random dude + name = learning_theology.3054.c + trigger = { + exists = scope:random_actor + } + show_as_tooltip = { + duel = { + skill = diplomacy + target = scope:passion_playwright + } + } + custom_tooltip = { + text = learning_theology.3054.c.tt + scope:random_actor = { save_scope_as = lead_actor } + } + reverse_add_opinion = { + modifier = flattered_opinion + opinion = 15 + target = scope:random_actor + } + if = { + limit = { + scope:random_actor = { NOT = { is_courtier_of = root } } + } + pay_short_term_gold = { + target = scope:random_actor + gold = minor_gold_value + } + add_courtier = scope:random_actor + } + stress_impact = { + arrogant = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + } + ai_chance = { + base = 20 + modifier = { + add = 80 + # I am a bad actor + root.diplomacy < scope:passion_playwright.diplomacy + # My family member is a bad actor + exists = scope:family_actor + scope:family_actor.diplomacy < scope:passion_playwright.diplomacy + # This random courtier is a good actor + scope:random_actor.diplomacy >= scope:passion_playwright.diplomacy + } + } + } + + after = { + trigger_event = { + id = learning_theology.3055 + days = 10 + } + } +} + +# Final outcome +learning_theology.3055 = { + type = character_event + title = learning_theology.3055.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + } + desc = learning_theology.3055.desc.intro.hired_actor + } + desc = learning_theology.3055.desc.intro.solo + } + first_valid = { + #Hired, victory + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + has_character_flag = superior_passion_play_flag + has_character_flag = superior_acting_flag + } + desc = learning_theology.3055.desc.victory.hired_actor + } + #Hired, defeat writing + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + has_character_flag = inferior_passion_play_flag + has_character_flag = superior_acting_flag + } + desc = learning_theology.3055.desc.defeat_writing.hired_actor + } + #Hired, defeat acting + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + has_character_flag = inferior_acting_flag + } + desc = learning_theology.3055.desc.defeat_acting.hired_actor + } + #Solo, win + triggered_desc = { + trigger = { + has_character_flag = superior_passion_play_flag + has_character_flag = superior_acting_flag + } + desc = learning_theology.3055.desc.victory.solo + } + #Solo, defeat writing + triggered_desc = { + trigger = { + has_character_flag = inferior_passion_play_flag + has_character_flag = superior_acting_flag + } + desc = learning_theology.3055.desc.defeat_writing.solo + } + #Solo, defeat acting + triggered_desc = { + trigger = { + has_character_flag = inferior_acting_flag + } + desc = learning_theology.3055.desc.defeat_acting.solo + } + } + first_valid = { + #Victory + triggered_desc = { + trigger = { + has_character_flag = superior_acting_flag + has_character_flag = superior_passion_play_flag + } + desc = learning_theology.3055.desc.victory_outro + } + #Hired, defeat + triggered_desc = { + trigger = { + NOT = { scope:lead_actor = root } + OR = { + has_character_flag = inferior_acting_flag + has_character_flag = inferior_passion_play_flag + } + } + desc = learning_theology.3055.desc.defeat_outro.hired_actor + } + #Defeat + triggered_desc = { + trigger = { + OR = { + has_character_flag = inferior_acting_flag + has_character_flag = inferior_passion_play_flag + } + } + desc = learning_theology.3055.desc.defeat_outro.solo + } + } + } + theme = learning_theology_focus + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_character_flag = superior_acting_flag + has_character_flag = superior_passion_play_flag + } + animation = happiness + } + triggered_animation = { + trigger = { + scope:lead_actor != root + has_character_flag = inferior_acting_flag + } + animation = anger + } + animation = disbelief + } + right_portrait = { + trigger = { + NOT = { scope:lead_actor = root } + } + character = scope:lead_actor + triggered_animation = { + trigger = { + root = { + OR = { + has_character_flag = inferior_acting_flag + has_character_flag = inferior_passion_play_flag + } + } + } + animation = shame + } + animation = storyteller + } + lower_right_portrait = { + character = scope:passion_playwright + } + + immediate = { + hidden_effect = { + scope:lead_actor = { + duel = { + skill = diplomacy + target = scope:passion_playwright + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + root = { + add_character_flag = { + flag = superior_acting_flag + years = 5 + } + } + } + # Your writing was not as good as the Playwright + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + root = { + add_character_flag = { + flag = inferior_acting_flag + years = 5 + } + } + } + } + } + } + } + + option = { # I made the better play + trigger = { + root = { + has_character_flag = superior_passion_play_flag + has_character_flag = superior_acting_flag + } + } + name = learning_theology.3055.a + add_learning_lifestyle_perk_points = 1 + add_piety = medium_piety_gain + # Give prestige for + if = { + limit = { + scope:lead_actor = root + } + add_prestige = medium_prestige_gain + } + else = { + add_prestige = minor_prestige_gain + } + ai_chance = { + base = 50 + } + } + + option = { # I failed at making a better play + name = learning_theology.3055.b + trigger = { + root = { + OR = { + has_character_flag = inferior_passion_play_flag + has_character_flag = inferior_acting_flag + } + } + } + add_piety = minor_piety_loss + add_stress = medium_stress_impact_gain + ai_chance = { + base = 50 + } + } + + after = { + root = { + if = { + limit = { + has_character_flag = superior_passion_play_flag + } + remove_character_flag = superior_passion_play_flag + } + if = { + limit = { + has_character_flag = superior_acting_flag + } + remove_character_flag = superior_acting_flag + } + if = { + limit = { + has_character_flag = inferior_passion_play_flag + } + remove_character_flag = inferior_passion_play_flag + } + if = { + limit = { + has_character_flag = inferior_acting_flag + } + remove_character_flag = inferior_acting_flag + } + } + } +} + + +################################################################################################################################ +################################################################################################################################ + +################################################## +# Find old text +# by Linnéa Thimrén & Flavio Verna +################################################## + +learning_theology_special.1001 = { + type = character_event + title = learning_theology_special.1001.t + desc = learning_theology_special.1001.desc + theme = learning_theology_focus + left_portrait = { + character = root + animation = stressed_teacher + } + right_portrait = { + character = scope:portrait + animation = thinking + trigger = { + exists = scope:portrait + scope:portrait != root + } + } + + trigger = { + is_ai = no + OR = { + has_focus = learning_theology_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + NOT = { has_character_flag = had_learning_theology_special_1001_this_lifetime } + faith = { + NOR = { + exists = var:variable_changed_doctrine_learning_theology_special_1001 + has_doctrine_parameter = unreformed + } + } + OR = { + exists = cp:councillor_court_chaplain + AND = { + exists = faith.religious_head + root = faith.religious_head + } + AND = { + exists = faith.religious_head + exists = faith.religious_head.liege + faith.religious_head.liege = root + } + } + OR = { + has_trait = scholar + learning >= very_high_skill_rating + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + faith = { fervor < medium_fervor_value } + } + modifier = { + add = -0.5 + NOR = { + AND = { + exists = faith.religious_head + root = faith.religious_head + } + AND = { + exists = faith.religious_head + exists = faith.religious_head.liege + faith.religious_head.liege = root + faith.religious_head = { is_ai = yes } + } + } + } + } + + immediate = { + add_character_flag = had_learning_theology_special_1001_this_lifetime + if = { + limit = { + exists = faith.religious_head + root = faith.religious_head + } + faith.religious_head = { + save_scope_as = player_pope + save_scope_as = portrait #For portrait + } + } + else_if = { + limit = { + exists = faith.religious_head + exists = faith.religious_head.liege + faith.religious_head.liege = root + faith.religious_head = { is_ai = yes } + } + faith.religious_head = { + save_scope_as = vassal_pope + save_scope_as = portrait #For portrait + } + save_scope_as = pope_liege + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + save_scope_as = portrait #For portrait + } + } + hidden_effect = { #To randomize the doctrine that's changed + random_list = { + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_adultery_women_accepted } } + } + save_scope_value_as = { + name = female_adultery_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_adultery_men_accepted } } + } + save_scope_value_as = { + name = male_adultery_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_homosexuality_accepted } } + } + save_scope_value_as = { + name = homosexuality_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_kinslaying_accepted } } + } + save_scope_value_as = { + name = kinslyaing_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine_parameter = witchcraft_accepted } } + } + save_scope_value_as = { + name = witchcraft_doctrine + value = yes + } + } + 10 = { + trigger = { + NOT = { faith = { has_doctrine = doctrine_consanguinity_unrestricted } } + } + save_scope_value_as = { + name = consanguinity_doctrine + value = yes + } + } + } + } + } + option = { #Player Religious Head decides to incorporate doctrine. + name = learning_theology_special.1001.d + trigger = { + exists = scope:player_pope + faith = { fervor >= medium_fervor_value } + } + duel = { + skill = learning + value = extremely_high_skill_rating + 10 = { + desc = learning_theology_special.1001.d.success + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + show_as_tooltip = { + learning_theology_special_1001_doctrine_effect = yes + add_learning_lifestyle_perk_points = 1 + } + trigger_event = learning_theology_special.1002 + } + 20 = { + desc = learning_theology_special.1001.d.failure + send_interface_toast = { + title = learning_theology_special.1001.d.failure.toast + left_icon = root + add_learning_lifestyle_xp = minor_lifestyle_xp + add_piety = major_piety_loss + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + option = { #Player petitions vassal religious head to integrate doctrine. + name = learning_theology_special.1001.e + trigger = { + exists = scope:vassal_pope + faith = { fervor >= medium_fervor_value } + } + duel = { + skill = learning + target = scope:vassal_pope + 1 = { + desc = learning_theology_special.1001.e.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + opinion_modifier = { # Opinion Factor + who = scope:vassal_pope + opinion_target = root + multiplier = 0.25 + } + show_as_tooltip = { + learning_theology_special_1001_doctrine_effect = yes + add_learning_lifestyle_perk_points = 1 + } + trigger_event = learning_theology_special.1002 + } + 50 = { + desc = learning_theology_special.1001.e.failure + send_interface_toast = { + title = learning_theology_special.1001.e.failure.toast + left_icon = scope:vassal_pope + add_learning_lifestyle_xp = minor_lifestyle_xp + add_piety = major_piety_loss + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 0 + } + } + + option = { #Share findings with Court Chaplain. + name = learning_theology_special.1001.a + trigger = { + exists = scope:bishop + } + scope:bishop = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = 15 + } + } + random_list = { + desc = learning_theology_special.1001.a.desc + 100 = { + desc = learning_theology_special.1001.a.success + show_chance = no + modifier = { + add = { + value = scope:bishop.ai_zeal + } + } + send_interface_toast = { + title = learning_theology_special.1001.a.success.toast + add_learning_lifestyle_perk_points = 1 + } + } + 100 = { + desc = learning_theology_special.1001.a.failure + show_chance = no + modifier = { #Make this instant success + scope:bishop.ai_zeal >= low_positive_ai_value + add = -1000 + } + modifier = { + add = { + value = scope:bishop.ai_zeal + multiply = -1 + } + } + send_interface_toast = { + title = learning_theology_special.1001.a.failure.toast + left_icon = scope:bishop + add_learning_lifestyle_xp = miniscule_lifestyle_xp + add_piety = minor_piety_gain + } + } + } + + stress_impact = { + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + option = { #Study in private. + name = learning_theology_special.1001.b + add_learning_lifestyle_xp = medium_lifestyle_xp + add_piety = minor_piety_loss + stress_impact = { + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + } + } + } + + option = { #Burn. + name = learning_theology_special.1001.c + add_piety = medium_piety_gain + zealous_progression_effect = yes + stress_impact = { + zealous = medium_stress_impact_loss + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1.5 + } + } + } +} + +#Player successfully changed the faith's doctrine. +learning_theology_special.1002 = { + type = character_event + title = learning_theology_special.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:player_pope + } + desc = learning_theology_special.1002.a.desc + } + triggered_desc = { + trigger = { + exists = scope:vassal_pope + } + desc = learning_theology_special.1002.b.desc + } + } + } + theme = learning_theology_focus + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:portrait + animation = disapproval + trigger = { + exists = scope:portrait + scope:portrait != root + } + } + + immediate = { + learning_theology_special_1001_doctrine_effect = yes + add_learning_lifestyle_perk_points = 1 + + } + option = { # + name = learning_theology_special.1002.a + every_player = { + limit = { + NOR = { + this = root + this = scope:vassal_pope + } + faith = root.faith + } + trigger_event = learning_theology_special.1003 + } + } +} + +#Other players notified of the doctrinal change. +learning_theology_special.1003 = { + type = character_event + title = learning_theology_special.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:player_pope + } + desc = learning_theology_special.1003.a.desc + } + triggered_desc = { + trigger = { + exists = scope:vassal_pope + } + desc = learning_theology_special.1003.b.desc + } + } + } + theme = learning_theology_focus + + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:portrait + animation = personality_zealous + trigger = { + exists = scope:portrait + scope:portrait != root + } + } + + immediate = { + show_as_tooltip = { + learning_theology_special_1001_doctrine_effect = yes + } + } + option = { + name = learning_theology_special.1003.a + } +} + +################################################## +# Learned scholar come to your court +# by Linnéa Thimrén +################################################## + +scripted_trigger learning_theology_special_1101_rabbi_trigger = { + faith = faith:rabbinism + OR = { + has_trait = education_learning_2 + has_trait = education_learning_3 + has_trait = education_learning_4 + } + learning >= medium_skill_rating + can_be_clergy_due_to_gender_trigger = yes +} + +learning_theology_special.1101 = { + type = character_event + title = learning_theology_special.1101.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = flag_learning_theology_2020_historical + } + desc = learning_theology_special.1101.desc + } + desc = learning_theology_special.1101.desc.fallback + } + } + + theme = learning_theology_focus + override_background = { + reference = throne_room + } + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:scholar + animation = writing + } + + trigger = { + OR = { + has_focus = learning_theology_focus + has_focus = learning_adventurer_focus + has_realm_law = camp_purpose_scholars + } + NOT = { has_character_flag = had_learning_theology_special_1101_this_lifetime } + is_playable_character = yes + faith = { + OR = { + religion_tag = judaism_religion + religion_tag = christianity_religion + religion_tag = dualism_religion + religion_tag = islam_religion + } + } + } + + immediate = { + add_character_flag = { + flag = is_in_learning_special_event + days = 200 + } + add_character_flag = had_learning_theology_special_1101_this_lifetime + + if = { #If Rashi could have been alive we create him (for players!) + limit = { + game_start_date >= 1040.1.1 + game_start_date <= 1105.1.1 + is_ai = no + NOT = { #Only spawns once. + is_target_in_global_variable_list = { + name = special_character_list + target = flag:flag_theology_1101_shlomo_yitzchaki + } + } + } + create_character = { + location = root.capital_province + template = scholar_character + faith = faith:rabbinism + culture = culture:french + trait = scholar + trait = diligent + name = "Shlomo Yitzchaki" + gender = male + save_scope_as = scholar + } + save_scope_value_as = { + name = rashi + value = yes + } + add_to_global_variable_list = { + name = special_character_list + target = flag:flag_theology_1101_shlomo_yitzchaki + } + add_character_flag = flag_learning_theology_2020_historical + } + else_if = { + limit = { + exists = root.capital_province + any_pool_character = { + province = root.capital_province + learning_theology_special_1101_rabbi_trigger = yes + } + } + random_pool_character = { + province = root.capital_province + limit = { learning_theology_special_1101_rabbi_trigger = yes } + save_scope_as = scholar + } + save_scope_value_as = { + name = rashi + value = no + } + } + else = { + create_character = { + location = root.capital_province + template = scholar_character + faith = root.faith + culture = root.culture + gender_female_chance = { + if = { + limit = { faith:rabbinism = { has_doctrine_parameter = clergy_must_be_male } } + value = 0 + } + else_if = { + limit = { faith:rabbinism = { has_doctrine_parameter = clergy_must_be_female } } + value = 100 + } + else = { + value = 50 + } + } + save_scope_as = scholar + after_creation = { + add_character_flag = created + } + } + save_scope_value_as = { + name = rashi + value = no + } + } + } + + option = { # Let's write commentaries! + name = learning_theology_special.1101.a + custom_tooltip = learning_lifestyle_rank_up_indication + trigger_event = { + id = learning_theology_special.1102 + days = { 14 21 } + } + add_visiting_courtier = scope:scholar + if = { + limit = { + root.faith = { + faith_hostility_level = { + target = scope:scholar.faith + value >= faith_hostile_level + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + } + } + ai_chance = { + base = 75 + } + } + + option = { #nah + name = learning_theology_special.1101.b + cynical_progression_effect = yes + add_character_modifier = { + modifier = focused_modifier + years = 10 + } + remove_character_flag = is_in_learning_special_event + ai_chance = { + base = 0 + } + } + + option = { #heretic!! + name = learning_theology_special.1101.c + trigger = { + root.faith = { + faith_hostility_level = { + target = scope:scholar.faith + value >= faith_hostile_level + } + } + } + zealous_progression_effect = yes + add_piety = major_piety_gain + scope:scholar = { + add_opinion = { + modifier = disappointed_opinion + opinion = -15 + target = root + } + } + remove_character_flag = is_in_learning_special_event + ai_chance = { + base = 25 + ai_value_modifier = { + ai_zeal = 0.75 + } + } + } + + after = { + remove_character_flag = flag_learning_theology_2020_historical + scope:scholar = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +#Writing commentaries - publish one or do more? +learning_theology_special.1102 = { + type = character_event + title = learning_theology_special.1101.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:scholar + } + desc = learning_theology_special.1102.desc + } + desc = learning_theology_special.1102.desc_dead + } + desc = learning_theology_special.1102.desc_ending + } + + theme = learning_theology_focus + left_portrait = { + character = root + animation = writing + } + right_portrait = { + character = scope:scholar + animation = happy_teacher + } + + option = { #Give credit to scholar + trigger = { + scope:scholar = { is_alive = yes } + } + name = learning_theology_special.1102.c + + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = scope:scholar } + } + set_relation_friend = { reason = friend_bible_commentary target = scope:scholar } + } + + random_list = { + desc = learning_theology_special.1102.c.rl_desc + 100 = { + desc = learning_theology_special.1102.c.success + show_chance = no + modifier = { + add = { + value = scope:scholar.ai_honor + } + } + + send_interface_toast = { + title = learning_theology_special.1102.c.success.toast + left_icon = scope:scholar + add_learning_lifestyle_perk_points = 1 + } + } + 100 = { + desc = learning_theology_special.1102.c.failure + show_chance = no + modifier = { #Make this instant success + scope:scholar.ai_honor >= low_positive_ai_value + add = -1000 + } + modifier = { + add = { + value = scope:scholar.ai_honor + multiply = -1 + } + } + send_interface_toast = { + title = learning_theology_special.1102.c.failure.toast + left_icon = scope:scholar + add_learning_lifestyle_xp = minor_lifestyle_xp + } + } + } + + ai_chance = { + base = 200 + } + } + + option = { #"Publish" and claim prestige + trigger = { + scope:scholar = { is_alive = yes } + } + name = learning_theology_special.1102.b + + set_relation_rival = { + target = scope:scholar + reason = rival_academic_dispute + } + scope:scholar = { select_and_move_to_pool_effect = yes } + + duel = { + skill = intrigue + target = scope:scholar + 60 = { + desc = learning_theology_special.1102.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 4 + } + add_learning_lifestyle_perk_points = 1 + add_prestige = medium_prestige_gain + + } + 40 = { + desc = learning_theology_special.1102.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + add_learning_lifestyle_xp = minor_lifestyle_xp + add_prestige = medium_prestige_loss + } + } + ai_chance = { + base = 25 + modifier = { + factor = 2.5 + OR = { + has_trait = ambitious + has_trait = arrogant + } + } + } + } + + option = { #Cop-out if the scholar has died + name = learning_theology_special.1102.d + trigger = { + scope:scholar = { + is_alive = no + } + } + add_learning_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 200 + } + } + + after = { + remove_character_flag = is_in_learning_special_event + } +} + diff --git a/N3OW/events/lifestyles/warfare_lifestyle/historical_commander_trait_events.txt b/N3OW/events/lifestyles/warfare_lifestyle/historical_commander_trait_events.txt new file mode 100644 index 00000000..b8bb32cd --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/historical_commander_trait_events.txt @@ -0,0 +1,884 @@ +#These events serve as an alternate way of gaining commander traits, by learning about historical battles. +namespace = historical_commander_trait + +################################################## +# Hannibal Bacar +# by Sean Hughes +# 0001 +################################################## + +historical_commander_trait.0001 = { + type = character_event + title = historical_commander_trait.0001.t + desc = historical_commander_trait.0001.desc + theme = war + left_portrait = { + character = root + animation = reading + } + trigger = { + NOR = { + has_character_flag = being_taught_commander_trait + has_character_flag = had_historical_commander_trait_event_0001 + culture = { + has_graphical_east_asia_culture_group_trigger = yes + } + } + number_of_commander_traits < 3 + + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_historical_commander_trait_event_0001 + } + } + + option = { + name = historical_commander_trait.0001.a + trigger = { NOT = { has_trait = aggressive_attacker } } + add_trait = aggressive_attacker + stress_impact = { + compassionate = minor_stress_impact_gain + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + patient = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.25 + ai_energy = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.2 + ai_compassion = -0.5 + } + } + } + + option = { + name = historical_commander_trait.0001.b + trigger = { NOT = { has_trait = logistician } } + add_trait = logistician + stress_impact = { + impatient = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.25 + ai_greed = -0.5 + } + } + } + + option = { + name = historical_commander_trait.0001.c + trigger = { NOT = { has_trait = flexible_leader } } + add_trait = flexible_leader + stress_impact = { + impatient = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.25 + ai_greed = -0.5 + } + } + } + + + option = { + name = historical_commander_trait.0001.d + name = { + trigger = { + has_trait = compassionate + has_trait = forgiving + } + text = historical_commander_trait.0001.d.good + } + custom_tooltip = historical_commander_trait.reject.tt + add_martial_lifestyle_xp = minor_lifestyle_xp + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = -0.5 + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + } + } +} + +################################################## +# Julius Caesar +# by Sean Hughes +# 0002 +################################################## + +historical_commander_trait.0002 = { + type = character_event + title = historical_commander_trait.0002.t + desc = historical_commander_trait.0002.desc + theme = war + left_portrait = { + character = root + animation = reading + } + + trigger = { + NOR = { + has_character_flag = being_taught_commander_trait + has_character_flag = had_historical_commander_trait_event_0002 + culture = { + has_graphical_east_asia_culture_group_trigger = yes + } + } + number_of_commander_traits < 3 + + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_historical_commander_trait_event_0002 + } + } + + option = { + name = historical_commander_trait.0002.a + trigger = { NOT = { has_trait = military_engineer } } + add_trait = military_engineer + stress_impact = { + eccentric = minor_stress_impact_gain + lazy = minor_stress_impact_gain + patient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = -0.5 + ai_vengefulness = -0.5 + ai_rationality = 0.5 + } + } + } + + option = { + name = historical_commander_trait.0002.b + trigger = { NOT = { has_trait = unyielding_defender } } + add_trait = unyielding_defender + stress_impact = { + impatient = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_energy = -0.5 + ai_greed = -0.5 + } + } + } + + option = { + name = historical_commander_trait.0002.c + trigger = { NOT = { has_trait = reckless } } + add_trait = reckless + stress_impact = { + eccentric = minor_stress_impact_loss + diligent = minor_stress_impact_gain + patient = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + ai_boldness = 0.5 + ai_greed = 0.5 + } + } + } + + option = { + name = historical_commander_trait.0002.d + custom_tooltip = historical_commander_trait.reject.tt + + add_martial_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 1 + } + } + } +} + +################################################## +# Alexander the Great +# by Sean Hughes +# 0003 +################################################## + +historical_commander_trait.0003 = { + type = character_event + title = historical_commander_trait.0003.t + desc = historical_commander_trait.0003.desc + theme = war + left_portrait = { + character = root + animation = reading + } + + trigger = { + NOR = { + has_character_flag = being_taught_commander_trait + has_character_flag = had_historical_commander_trait_event_0003 + culture = { + has_graphical_east_asia_culture_group_trigger = yes + } + } + number_of_commander_traits < 3 + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_historical_commander_trait_event_0003 + } + } + + option = { + name = historical_commander_trait.0003.a + trigger = { NOT = { has_trait = forder } } + add_trait = forder + stress_impact = { + lazy = minor_stress_impact_gain + patient = minor_stress_impact_gain + + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { + name = historical_commander_trait.0003.b + trigger = { NOT = { has_trait = military_engineer } } + add_trait = military_engineer + stress_impact = { + lazy = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.25 + ai_greed = -0.5 + } + } + } + + option = { + name = historical_commander_trait.0003.c + trigger = { NOT = { has_trait = reaver } } + add_trait = reaver + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = 0.5 + ai_greed = 2 + } + } + } + + option = { + name = historical_commander_trait.0003.d + custom_tooltip = historical_commander_trait.reject.tt + add_martial_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + } + } +} + +################################################## +# Constantine +# by Sean Hughes +# 0004 +################################################## + +historical_commander_trait.0004 = { + type = character_event + title = historical_commander_trait.0004.t + desc = historical_commander_trait.0004.desc + theme = war + left_portrait = { + character = root + animation = reading + } + + trigger = { + NOR = { + has_character_flag = being_taught_commander_trait + has_character_flag = had_historical_commander_trait_event_0004 + } + number_of_commander_traits < 3 + + OR = { + faith = faith:catholic + faith = faith:orthodox + } + } + + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_historical_commander_trait_event_0004 + } + } + + + option = { + name = historical_commander_trait.0004.a + trigger = { NOT = { has_trait = holy_warrior } } + add_trait = holy_warrior + stress_impact = { + cynical = minor_stress_impact_gain + craven = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + ai_honor = 1 + ai_boldness = 0.5 + } + } + } + + option = { + name = historical_commander_trait.0004.b + trigger = { NOT = { has_trait = forder } } + add_trait = forder + stress_impact = { + patient = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 0.5 + ai_greed = 0.5 + } + } + } + + option = { + name = historical_commander_trait.0004.c + trigger = { NOT = { has_trait = flexible_leader } } + add_trait = flexible_leader + stress_impact = { + impatient = minor_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_energy = 0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = historical_commander_trait.0004.d + custom_tooltip = historical_commander_trait.reject.tt + add_martial_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_boldness = -0.5 + ai_honor = -0.5 + ai_vengefulness = 0.5 + } + } + } +} + + +################################################## +# Khalid ibn al-Walid +# by Sean Hughes +# 0004 +################################################## + +historical_commander_trait.0005 = { + type = character_event + title = historical_commander_trait.0005.t + desc = historical_commander_trait.0005.desc + theme = war + left_portrait = { + character = root + animation = reading + } + + trigger = { + NOR = { + has_character_flag = being_taught_commander_trait + has_character_flag = had_historical_commander_trait_event_0005 + } + number_of_commander_traits < 3 + + faith = { + religion_tag = islam_religion + } + + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_historical_commander_trait_event_0005 + } + } + + option = { + name = historical_commander_trait.0005.a + trigger = { NOT = { has_trait = holy_warrior } } + add_trait = holy_warrior + stress_impact = { + cynical = minor_stress_impact_gain + craven = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 2 + ai_honor = 1 + ai_boldness = 0.5 + } + } + } + + option = { + name = historical_commander_trait.0005.b + trigger = { NOT = { has_trait = unyielding_defender } } + add_trait = unyielding_defender + stress_impact = { + wrathful = medium_stress_impact_gain + impatient = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + ai_vengefulness = -1 + } + } + } + + option = { + name = historical_commander_trait.0005.c + trigger = { NOT = { has_trait = logistician } } + add_trait = logistician + stress_impact = { + impatient = minor_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1.25 + ai_boldness = -0.75 + } + } + } + + option = { + name = historical_commander_trait.0005.d + custom_tooltip = historical_commander_trait.reject.tt + add_martial_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_boldness = -0.5 + ai_honor = -0.5 + } + } + } +} + +################################################## +# Bilge Khagan +# by Naslund +# 0006 +################################################## + +historical_commander_trait.0006 = { + type = character_event + title = historical_commander_trait.0006.t + desc = historical_commander_trait.0006.desc + theme = war + override_background = { reference = mpo_camp_steppe } + left_portrait = { + character = root + animation = thinking + } + + trigger = { + NOR = { + has_character_flag = being_taught_commander_trait + has_character_flag = had_historical_commander_trait_event_0006 + } + number_of_commander_traits < 3 + has_government = nomad_government + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_historical_commander_trait_event_0006 + } + } + + option = { + name = historical_commander_trait.0006.a + trigger = { NOT = { has_trait = unyielding_defender } } + add_trait = unyielding_defender + stress_impact = { + wrathful = medium_stress_impact_gain + impatient = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_honor = 1 + ai_vengefulness = -1 + } + } + } + + option = { + name = historical_commander_trait.0006.b + trigger = { NOT = { has_trait = logistician } } + add_trait = logistician + stress_impact = { + impatient = minor_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1.25 + ai_boldness = -0.75 + } + } + } + + option = { + name = historical_commander_trait.0006.c + trigger = { NOT = { has_trait = flexible_leader } } + add_trait = flexible_leader + stress_impact = { + impatient = minor_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 2 + ai_energy = 0.5 + ai_boldness = -0.5 + } + } + } + + option = { + name = historical_commander_trait.0006.d + custom_tooltip = historical_commander_trait.reject.tt + add_martial_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_boldness = -0.5 + ai_honor = -0.5 + } + } + } +} + +################################################## +# Sun Tzu +# 0007 +################################################## + +historical_commander_trait.0007 = { + type = character_event + title = historical_commander_trait.0007.t + desc = historical_commander_trait.0007.desc + theme = war + left_portrait = { + character = root + animation = reading + } + override_background = { reference = study } + + + trigger = { + NOR = { + has_character_flag = being_taught_commander_trait + has_character_flag = had_historical_commander_trait_event_0007 + } + culture = { + has_graphical_east_asia_culture_group_trigger = yes + } + number_of_commander_traits < 3 + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_historical_commander_trait_event_0007 + } + } + + option = { + name = historical_commander_trait.0007.a + trigger = { NOT = { has_trait = logistician } } + add_trait = logistician + stress_impact = { + lazy = minor_stress_impact_gain + patient = minor_stress_impact_gain + + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { + name = historical_commander_trait.0007.b + trigger = { NOT = { has_trait = cautious_leader } } + add_trait = cautious_leader + stress_impact = { + lazy = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.25 + ai_greed = -0.5 + } + } + } + + option = { + name = historical_commander_trait.0007.c + trigger = { NOT = { has_trait = flexible_leader } } + add_trait = flexible_leader + stress_impact = { + generous = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_energy = 0.5 + ai_greed = 2 + } + } + } + + option = { + name = historical_commander_trait.0007.d + custom_tooltip = historical_commander_trait.reject.tt + add_martial_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_boldness = 0.5 + ai_vengefulness = 0.5 + } + } + } +} diff --git a/N3OW/events/lifestyles/warfare_lifestyle/learn_commander_trait_events.txt b/N3OW/events/lifestyles/warfare_lifestyle/learn_commander_trait_events.txt new file mode 100644 index 00000000..6ba565fc --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/learn_commander_trait_events.txt @@ -0,0 +1,2771 @@ +#Events for learning Commander Traits from a character +# by Petter Vilberg + +namespace = learn_commander_trait + + +#AI event for granting characters random commander traits +learn_commander_trait.0001 = { + hidden = yes + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + number_of_commander_traits < 3 + is_available_adult = yes + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 0.25 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.25 + number_of_commander_traits > 1 + } + } + + immediate = { + give_random_commander_trait_effect = yes + } +} + + +#Choose whether to become aggressive_attacker, unyielding_defender or flexible_leader +learn_commander_trait.0002 = { + type = character_event + title = learn_commander_trait.0002.t + desc = learn_commander_trait.0002.desc + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + number_of_commander_traits < 3 + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + } + + option = { + name = learn_commander_trait.0002.a + trigger = { NOT = { has_trait = aggressive_attacker } } + add_trait = aggressive_attacker + stress_impact = { + calm = minor_stress_impact_gain + lazy = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + patient = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.25 + ai_energy = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.2 + ai_compassion = -0.5 + } + } + } + + option = { + name = learn_commander_trait.0002.b + trigger = { NOT = { has_trait = unyielding_defender } } + add_trait = unyielding_defender + stress_impact = { + arrogant = minor_stress_impact_gain + fickle = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.25 + ai_boldness = -0.2 + ai_rationality = 0.2 + ai_honor = 0.2 + } + } + } + + option = { + name = learn_commander_trait.0002.c + trigger = { NOT = { has_trait = flexible_leader } } + add_trait = flexible_leader + stress_impact = { + stubborn = medium_stress_impact_gain + content = minor_stress_impact_gain + impatient = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_boldness = 0.5 + ai_vengefulness = -0.5 + } + } + } +} + +#Choose whether to become a Logistician, a Military Engineer, or forder +learn_commander_trait.0003 = { + type = character_event + title = learn_commander_trait.0003.t + desc = learn_commander_trait.0003.desc + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + number_of_commander_traits < 3 + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + } + + option = { + name = learn_commander_trait.0003.a + trigger = { NOT = { has_trait = logistician } } + add_trait = logistician + stress_impact = { + impatient = minor_stress_impact_gain + greedy = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_energy = 0.25 + ai_greed = -0.5 + } + } + } + + option = { + name = learn_commander_trait.0003.b + trigger = { NOT = { has_trait = military_engineer } } + add_trait = military_engineer + stress_impact = { + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.25 + ai_greed = 0.5 + ai_boldness = -0.25 + } + } + } + + option = { + name = learn_commander_trait.0003.c + trigger = { NOT = { has_trait = forder } } + add_trait = forder + stress_impact = { + eccentric = minor_stress_impact_loss + patient = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + ai_rationality = -0.25 + } + } + } +} + +#Choose whether to become Reckless or a Reaver +learn_commander_trait.0004 = { + type = character_event + title = learn_commander_trait.0004.t + desc = learn_commander_trait.0004.desc + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + number_of_commander_traits < 3 + OR = { + NOT = { has_trait = reckless } + NOT = { has_trait = reaver } + } + } + + weight_multiplier = { + base = 1 + compare_modifier = { + factor = martial + multiplier = 0.1 + max = 2 + } + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + } + + option = { #Reckless + name = learn_commander_trait.0004.b + trigger = { NOT = { has_trait = reckless } } + add_trait = reckless + stress_impact = { + eccentric = minor_stress_impact_loss + calm = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + ai_zeal = 0.5 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + } + } + + option = { #Reaver + name = learn_commander_trait.0004.c + trigger = { NOT = { has_trait = reaver } } + add_trait = reaver + stress_impact = { + generous = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_honor = -0.25 + ai_boldness = 0.5 + ai_energy = 0.5 + } + } + } +} + + +#Become a Holy Warrior +learn_commander_trait.0006 = { + type = character_event + title = learn_commander_trait.0006.t + desc = learn_commander_trait.0006.desc + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + NOT = { has_trait = holy_warrior } + number_of_commander_traits < 3 + NOT = { has_trait = cynical } + piety > 0 + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 5 + has_trait = zealous + } + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + } + + option = { + name = learn_commander_trait.0006.a + add_trait = holy_warrior + } +} + +#Become a Desert Warrior +learn_commander_trait.0007 = { + type = character_event + title = learn_commander_trait.0007.t + desc = learn_commander_trait.0007.desc + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + NOT = { has_trait = desert_warrior } + number_of_commander_traits < 3 + any_directly_owned_province = { + terrain = desert + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + capital_province = { + terrain = desert + } + } + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 1.5 + any_directly_owned_province = { + count > 3 + terrain = desert + } + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + } + + option = { + name = learn_commander_trait.0007.a + add_trait = desert_warrior + } +} + +#Become a Jungle Stalker +learn_commander_trait.0008 = { + type = character_event + title = learn_commander_trait.0008.t + desc = learn_commander_trait.0008.desc + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + NOT = { has_trait = jungle_stalker } + number_of_commander_traits < 3 + any_directly_owned_province = { + terrain = jungle + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + capital_province = { + terrain = jungle + } + } + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 1.5 + any_directly_owned_province = { + count > 3 + terrain = jungle + } + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + } + + option = { + name = learn_commander_trait.0008.a + add_trait = jungle_stalker + } +} + +#Become a Winter Soldier +learn_commander_trait.0009 = { + type = character_event + title = learn_commander_trait.0009.t + desc = learn_commander_trait.0009.desc + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + NOT = { has_trait = winter_soldier } + number_of_commander_traits < 3 + any_directly_owned_province = { + OR = { + terrain = taiga + geographical_region = world_tibet + geographical_region = world_europe_north + geographical_region = world_europe_east + geographical_region = world_steppe + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + capital_province = { + terrain = taiga + } + } + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 1.5 + any_directly_owned_province = { + count > 3 + terrain = taiga + } + } + modifier = { + factor = 0.3 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.3 + number_of_commander_traits > 1 + } + } + + option = { + name = learn_commander_trait.0009.a + add_trait = winter_soldier + } +} + + +################## +# Commander Trait Teaching/Learning Chain +# 1000-1999 +# by Petter Vilberg +################## +#NOTE: All last two digits (xx03, xx21, etc.) should refer to the same trait. + +learn_commander_trait.1000 = { + type = character_event + hidden = yes + + trigger = { + NOT = { has_character_flag = being_taught_commander_trait } + number_of_commander_traits < commander_trait_limit + #Check for a suitable teacher + OR = { + any_vassal = { + is_available_adult = yes + opinion = { + target = root + value > 10 + } + #has_trait = education_martial + root = { + character_has_commander_trait_scope_does_not = prev + } + } + any_courtier = { + is_available_adult = yes + opinion = { + target = root + value > 10 + } + #has_trait = education_martial + root = { + character_has_commander_trait_scope_does_not = prev + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + culture = { has_cultural_parameter = commanders_likelier_to_gain_commander_traits } + } + modifier = { + factor = 0.5 + number_of_commander_traits > 0 + } + modifier = { + factor = 0.5 + number_of_commander_traits > 1 + } + } + + immediate = { + #Find an AI Vassal or Commander who has a CT you don't + random_vassal = { + limit = { + is_available_adult = yes + opinion = { + target = root + value > 10 + } + root = { + character_has_commander_trait_scope_does_not = prev + } + } + weight = { + base = 1 + modifier = { + add = 4 + has_trait = education_martial + } + } + save_scope_as = teacher + } + if = { + limit = { + NOT = { exists = scope:teacher } + } + random_courtier = { + limit = { + is_available_adult = yes + opinion = { + target = root + value > 10 + } + #has_trait = education_martial + root = { + character_has_commander_trait_scope_does_not = prev + } + } + save_scope_as = teacher + } + } + if = { + limit = { root = { is_ai = no } } + scope:teacher = { #Make sure they have a quirk to refer to. + assign_quirk_effect = yes + } + } + add_character_flag = { + flag = being_taught_commander_trait + days = 1825 + } + randomize_commander_trait_to_be_taught_effect = yes + if = { + limit = { + has_variable = commander_trait_being_taught + } + trigger_event = { + on_action = learn_commander_trait_offer + } + } + } +} + + +############## +#TRAIT CHAINS +############## + + +#Logistician +############## + +#Training offer +learn_commander_trait.1101 = { + type = character_event + title = learn_commander_trait.01.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.1101.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:logistician + is_imprisoned = no + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final Test +learn_commander_trait.1201 = { + type = character_event + title = learn_commander_trait.01.t + desc = learn_commander_trait.1201.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:logistician + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + +#Success +learn_commander_trait.1301 = { + type = character_event + title = learn_commander_trait.01.t + desc = learn_commander_trait.1301.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:logistician + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + +#Failure +learn_commander_trait.1401 = { + type = character_event + title = learn_commander_trait.01.t + desc = learn_commander_trait.1401.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:logistician + } + + immediate = { + + } + + option = { #I will try again! + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { #I give up + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + + + + +#Military Engineer +################## + +#Training offer +learn_commander_trait.1102 = { + type = character_event + title = learn_commander_trait.02.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.1102.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:military_engineer + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1202 = { + type = character_event + title = learn_commander_trait.02.t + desc = learn_commander_trait.1202.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:military_engineer + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1302 = { + type = character_event + title = learn_commander_trait.02.t + desc = learn_commander_trait.1302.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:military_engineer + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1402 = { + type = character_event + title = learn_commander_trait.02.t + desc = learn_commander_trait.1402.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:military_engineer + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + + + + +#aggressive_attacker +################## + +#Training offer +learn_commander_trait.1103 = { + type = character_event + title = learn_commander_trait.03.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:aggressive_attacker + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1203 = { + type = character_event + title = learn_commander_trait.03.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:aggressive_attacker + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1303 = { + type = character_event + title = learn_commander_trait.03.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:aggressive_attacker + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1403 = { + type = character_event + title = learn_commander_trait.03.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:aggressive_attacker + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + + +#unyielding_defender +################## + +#Training offer +learn_commander_trait.1104 = { + type = character_event + title = learn_commander_trait.04.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:unyielding_defender + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1204 = { + type = character_event + title = learn_commander_trait.04.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:unyielding_defender + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1304 = { + type = character_event + title = learn_commander_trait.04.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:unyielding_defender + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1404 = { + type = character_event + title = learn_commander_trait.04.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:unyielding_defender + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + + + + + + +#forder +################## + +#Training offer +learn_commander_trait.1105 = { + type = character_event + title = learn_commander_trait.05.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:forder + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1205 = { + type = character_event + title = learn_commander_trait.05.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:forder + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1305 = { + type = character_event + title = learn_commander_trait.05.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:forder + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1405 = { + type = character_event + title = learn_commander_trait.05.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:forder + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + + + + + + + +#flexible_leader +################## + +#Training offer +learn_commander_trait.1106 = { + type = character_event + title = learn_commander_trait.06.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:flexible_leader + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1206 = { + type = character_event + title = learn_commander_trait.06.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:flexible_leader + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1306 = { + type = character_event + title = learn_commander_trait.06.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:flexible_leader + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1406 = { + type = character_event + title = learn_commander_trait.06.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:flexible_leader + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + + + + + + +#desert_warrior +################## + +#Training offer +learn_commander_trait.1107 = { + type = character_event + title = learn_commander_trait.07.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:desert_warrior + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1207 = { + type = character_event + title = learn_commander_trait.07.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:desert_warrior + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1307 = { + type = character_event + title = learn_commander_trait.07.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:desert_warrior + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1407 = { + type = character_event + title = learn_commander_trait.07.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:desert_warrior + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + + + + +#jungle_stalker +################## + +#Training offer +learn_commander_trait.1108 = { + type = character_event + title = learn_commander_trait.08.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:jungle_stalker + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1208 = { + type = character_event + title = learn_commander_trait.08.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:jungle_stalker + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1308 = { + type = character_event + title = learn_commander_trait.08.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:jungle_stalker + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1408 = { + type = character_event + title = learn_commander_trait.08.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:jungle_stalker + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + +#winter_soldier +################## + +#Training offer +learn_commander_trait.1109 = { + type = character_event + title = learn_commander_trait.09.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:winter_soldier + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1209 = { + type = character_event + title = learn_commander_trait.09.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:winter_soldier + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1309 = { + type = character_event + title = learn_commander_trait.09.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:winter_soldier + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1409 = { + type = character_event + title = learn_commander_trait.09.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:winter_soldier + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + +#reaver +################## + +#Training offer +learn_commander_trait.1110 = { + type = character_event + title = learn_commander_trait.10.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:reaver + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1210 = { + type = character_event + title = learn_commander_trait.10.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:reaver + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1310 = { + type = character_event + title = learn_commander_trait.10.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:reaver + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1410 = { + type = character_event + title = learn_commander_trait.10.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:reaver + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + +#reckless +################## + +#Training offer +learn_commander_trait.1112 = { + type = character_event + title = learn_commander_trait.12.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:reckless + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1212 = { + type = character_event + title = learn_commander_trait.12.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:reckless + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1312 = { + type = character_event + title = learn_commander_trait.12.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:reckless + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1412 = { + type = character_event + title = learn_commander_trait.12.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:reckless + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + + + + + +#holy_warrior +################## + +#Training offer +learn_commander_trait.1113 = { + type = character_event + title = learn_commander_trait.13.t + desc = { + desc = learn_commander_trait.11.opening + desc = learn_commander_trait.11.desc + } + theme = war + left_portrait = { + character = root + animation = inspect_weapon + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:holy_warrior + } + + weight_multiplier = { + base = 1 + } + + option = { #Please teach me + name = learn_commander_trait.11.a + commander_trait_teaching_setup_effect = yes + custom_tooltip = learn_commander_trait.11.martial_tt + } + + option = { #No, I already know enough + name = learn_commander_trait.11.b + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + custom_tooltip = learn_commander_trait.11.b.tt + } +} + +#Final test +learn_commander_trait.1213 = { + type = character_event + title = learn_commander_trait.13.t + desc = learn_commander_trait.12.desc + theme = war + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + has_variable = commander_trait_being_taught + var:commander_trait_being_taught = flag:holy_warrior + } + + option = { + name = learn_commander_trait.12.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #Back out + name = learn_commander_trait.12.b + stress_impact = { + base = minor_stress_gain + } + giving_up_on_commander_trait_training_effect = yes + } +} + + +#Success +learn_commander_trait.1313 = { + type = character_event + title = learn_commander_trait.13.t + desc = learn_commander_trait.13.desc + theme = war + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:teacher + animation = happy_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:holy_warrior + } + + option = { + name = learn_commander_trait.13.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + + +#Failure +learn_commander_trait.1413 = { + type = character_event + title = learn_commander_trait.13.t + desc = learn_commander_trait.14.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = stressed_teacher + } + + trigger = { + var:commander_trait_being_taught = flag:holy_warrior + } + + immediate = { + + } + + option = { + name = learn_commander_trait.14.a + custom_tooltip = learn_commander_trait.14.a.tt + trigger_event = { + on_action = learn_commander_trait_test + days = { 50 600 } + } + } + + option = { + name = learn_commander_trait.14.b + custom_tooltip = learn_commander_trait.14.b.tt + giving_up_on_commander_trait_training_effect = yes + } +} + + +###### +# The Teacher has died or been imprisoned +##### + +#Final Test +learn_commander_trait.1291 = { + type = character_event + title = learn_commander_trait.91.t + desc = learn_commander_trait.1291.desc + theme = war + left_portrait = { + character = root + animation = sadness + } + right_portrait = { + character = scope:teacher + animation = dead + } + + trigger = { + scope:teacher = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + } + + option = { + name = learn_commander_trait.1291.a + learn_commander_trait_final_test_duel_effect = yes + } + + option = { #No, there's no point + name = learn_commander_trait.1291.b + custom_tooltip = learn_commander_trait.giving_up_tt + if = { + limit = { + NOT = { + exists = scope:long_term_mentor + } + scope:teacher = { is_alive = yes } + has_relation_mentor = scope:teacher + } + remove_relation_mentor = scope:teacher + } + remove_character_flag = being_taught_commander_trait + remove_variable = commander_trait_being_taught + } +} + + +#Success +learn_commander_trait.1391 = { + type = character_event + title = learn_commander_trait.91.t + desc = learn_commander_trait.1391.desc + theme = war + left_portrait = { + character = root + animation = wedding_happy_cry + } + right_portrait = { + character = scope:teacher + animation = dead + } + + trigger = { + scope:teacher = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + } + + option = { + name = learn_commander_trait.1391.a + learn_commander_trait_success_effect = yes + } + + after = { + if = { + limit = { + exists = var:commander_trait_being_taught + } + remove_variable = commander_trait_being_taught + } + if = { + limit = { + has_character_flag = being_taught_commander_trait + } + remove_character_flag = being_taught_commander_trait + } + } +} + +#Failure +learn_commander_trait.1491 = { + type = character_event + title = learn_commander_trait.91.t + desc = learn_commander_trait.1491.desc + theme = war + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:teacher + animation = dead + } + + trigger = { + scope:teacher = { + OR = { + is_alive = no + is_imprisoned = yes + } + } + } + + option = { + name = learn_commander_trait.1491.a + remove_variable = commander_trait_being_taught + remove_character_flag = being_taught_commander_trait + if = { + limit = { + scope:teacher = { + is_alive = yes + } + has_relation_mentor = scope:teacher + NOT = { + exists = scope:long_term_mentor + } + } + remove_relation_mentor = scope:teacher + } + stress_impact = { + arrogant = minor_stress_impact_gain + } + } +} diff --git a/N3OW/events/lifestyles/warfare_lifestyle/martial_authority_events.txt b/N3OW/events/lifestyles/warfare_lifestyle/martial_authority_events.txt new file mode 100644 index 00000000..50b94ea5 --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/martial_authority_events.txt @@ -0,0 +1,2590 @@ +#Events for authority lifestyle focus + + +################################################## + +#AUTHORITY REGULAR EVENTS + # 1031 - Mercenaries are being misbehaving at an inn, by Linnéa Thimrén + # 2040-2042 - Fight between my soldiers (Diplomacy skill challenge), Sean Hughes + # 2050-2057 - An Extra Hand: Find a right-hand (wo)man, Sean Hughes + # 3000 - Displaying/Teaching Authority to Someone, by Milla Isaksson + +#AUTHORITY SPECIAL EVENTS + # 1100-1104 - Soldier and Officer Fighting, by Mathilda Bjarnehed + # 1501-1504 - Deal with Deserters, by Linnéa Thimrén + +################################################## + +############################# +# AUTHORITY: REGULAR EVENTS # +############################# + +namespace = martial_authority + +################################################## +# Mercenaries are being misbehaving at an inn + # by Linnéa Thimrén +################################################## + +martial_authority.1031 = { + type = character_event + title = martial_authority.1031.t + desc = martial_authority.1031.desc + theme = martial_authority_focus + override_background = { + reference = tavern + } + + left_portrait = { + character = root + animation = disapproval + } + + right_portrait = { + character = scope:scoped_mercenary + animation = drink + } + + trigger = { + has_lifestyle = martial_lifestyle + NOT = { has_character_flag = had_mercenary_disruption_event } + is_ruler = yes + is_landed = yes + exists = capital_county + any_independent_ruler = { + government_has_flag = government_is_mercenary + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = martial_authority_focus } + } + + immediate = { + play_music_cue = "mx_cue_meadandwine" + add_character_flag = { + flag = had_mercenary_disruption_event + days = 3650 + } + capital_county = { + save_scope_as = county_to_save + } + random_independent_ruler = { + limit = { + government_has_flag = government_is_mercenary + culture = root.culture + } + alternative_limit = { + government_has_flag = government_is_mercenary + faith = root.faith + } + alternative_limit = { + government_has_flag = government_is_mercenary + } + save_scope_as = scoped_mercenary + } + } + + option = { + name = martial_authority.1031.a + trigger = { + OR = { + is_ai = no + short_term_gold >= major_gold_value_check + } + } + + ai_chance = { + base = 50 + modifier = { + add = 20 + OR = { + has_trait = generous + has_trait = craven + has_trait = shy + } + } + } + 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 = { + name = martial_authority.1031.b + scope:county_to_save = { + add_county_modifier = { + modifier = warfare_expunged_bandits_modifier + years = 10 + } + } + ai_chance = { + base = 50 + modifier = { + add = 20 + OR = { + has_trait = just + has_trait = greedy + } + } + } + add_martial_lifestyle_xp = minor_lifestyle_xp + stress_impact = { + just = minor_stress_impact_gain + } + } + option = { + name = martial_authority.1031.c + trigger = { + prowess >= high_skill_rating + } + skill = prowess + scope:county_to_save = { + add_county_modifier = { + modifier = warfare_expunged_bandits_modifier + years = 10 + } + } + if = { + limit = { + OR = { + has_trait = sadistic + has_trait = wrathful + } + } + add_dread = medium_dread_gain + } + else_if = { + limit = { + NOR = { + has_trait = sadistic + has_trait = wrathful + } + } + add_character_modifier = { + modifier = respected_by_mercenaries + } + } + ai_chance = { + base = 50 + modifier = { + add = 30 + OR = { + has_trait = brave + has_trait = wrathful + has_trait = sadistic + has_trait = vengeful + } + } + } + add_martial_lifestyle_xp = medium_lifestyle_xp + stress_impact = { + calm = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + } +} + +################################################## +# Internal Dispute (Diplomacy Skill Challenge) +# by Sean Hughes +# 2040-2042 +################################################## + +#Find a courtier who would fight in your army. +scripted_trigger martial_authority_2040_first_trigger = { + is_ai = yes + is_available_healthy_adult = yes + + age <= 35 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this } + + save_temporary_scope_as = first + + root = { + any_knight = { + martial_authority_2040_second_trigger = yes + } + } +} + +#Find another courtier who is disliked by the first one. +scripted_trigger martial_authority_2040_second_trigger = { + is_ai = yes + is_available_healthy_adult = yes + + age <= 40 + + this != scope:first + reverse_opinion = { + target = scope:first + value <= neutral_opinion + } +} + +martial_authority.2040 = { + type = character_event + title = martial_authority.2040.t + desc = martial_authority.2040.desc + theme = martial_authority_focus + override_background = { + reference = army_camp + } + + left_portrait = { + character = scope:first + animation = anger + } + right_portrait = { + character = scope:second + animation = rage + } + + trigger = { + NOT = { has_character_flag = had_event_martial_authority_2040 } #Can only happen once every 5 years. + + #Only trigger if we've been at war for at least a few days. + days_of_continuous_war >= 5 + is_available_adult_or_is_commanding = yes + + any_knight = { + martial_authority_2040_first_trigger = yes + } + any_knight = { + martial_authority_2040_second_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { #-1 at 5 diplomacy, 0 at 10 diplomacy, 1 at 15 diplomacy etc. + value = diplomacy + subtract = medium_skill_rating + multiply = 0.2 + } + } + upweight_for_focus_modifier = { FOCUS = martial_authority_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_authority_2040 + days = 1825 + } + + random_knight = { + limit = { + martial_authority_2040_first_trigger = yes + } + save_scope_as = first + } + random_knight = { + limit = { + martial_authority_2040_second_trigger = yes + } + if = { + limit = { root = { is_ai = no } } + assign_quirk_effect = yes + } + save_scope_as = second + } + } + + #Attempt to get the men to calm down and work together + option = { + name = martial_authority.2040.a + duel = { + skill = diplomacy + value = 10 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = martial_authority.2040.a.success + trigger_event = martial_authority.2041 #The men calm down. + show_as_tooltip = { + add_prestige = medium_prestige_gain + add_martial_lifestyle_xp = medium_lifestyle_xp + reverse_add_opinion = { + target = scope:first + modifier = respect_opinion + opinion = low_positive_opinion + } + reverse_add_opinion = { + target = scope:second + modifier = respect_opinion + opinion = low_positive_opinion + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = martial_authority.2040.a.failure + trigger_event = martial_authority.2042 #A brawl breaks out! + show_as_tooltip = { + add_prestige = minor_prestige_loss + } + custom_tooltip = martial_authority.2040.a.failure.tt + } + } + stress_impact = { + shy = medium_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 100 + ai_compassion = 100 + } + # Rational characters know when they have a good chance of winning the duel + compare_modifier = { + trigger = { + ai_rationality >= 10 + } + value = { + value = diplomacy + add = -10 + } + multiplier = 1000 # -10,000 at 0 Stewardship, +0 at 10 Stewardship, +10,000 at 20 Stewardship + } + } + } + + #Have the soldiers whipped + option = { + name = martial_authority.2040.b + add_dread = medium_dread_gain + scope:first = { + increase_wounds_effect = { REASON = whipping } + add_opinion = { + target = root + modifier = angry_opinion + opinion = low_negative_opinion + } + } + scope:second = { + increase_wounds_effect = { REASON = whipping } + add_opinion = { + target = root + modifier = angry_opinion + opinion = low_negative_opinion + } + } + add_martial_lifestyle_xp = minor_lifestyle_xp + stress_impact = { + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -100 + ai_vengefulness = 100 + ai_compassion = -200 + } + } + } + + #Leave the men to their petty quarrel + option = { + name = { + text = martial_authority.2040.c + trigger = { + NOR = { + has_trait = hashishiyah + has_trait = drunkard + } + } + } + name = { + text = martial_authority.2040.c.hashishiyah + trigger = { has_trait = hashishiyah } + } + name = { + text = martial_authority.2040.c.drunkard + trigger = { has_trait = drunkard } + } + add_prestige = miniscule_prestige_loss + + if = { + limit = { + OR = { + has_trait = hashishiyah + has_trait = drunkard + } + } + add_stress = medium_stress_impact_loss + } + else = { + stress_impact = { + diligent = minor_stress_impact_gain + just = minor_stress_impact_gain + reclusive = minor_stress_impact_loss + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -100 + ai_energy = -100 + } + } + } +} + +#Men calm down +martial_authority.2041 = { + type = character_event + title = martial_authority.2041.t + desc = martial_authority.2041.desc + theme = martial_authority_focus + override_background = { + reference = army_camp + } + + left_portrait = { + character = scope:first + animation = shame + } + right_portrait = { + character = scope:second + animation = worry + } + + option = { + name = martial_authority.2041.a + add_prestige = medium_prestige_gain + reverse_add_opinion = { + target = scope:first + modifier = respect_opinion + opinion = low_positive_opinion + } + reverse_add_opinion = { + target = scope:second + modifier = respect_opinion + opinion = low_positive_opinion + } + add_martial_lifestyle_xp = medium_lifestyle_xp + } +} + +#Brawl breaks out! +martial_authority.2042 = { + type = character_event + title = martial_authority.2042.t + desc = martial_authority.2042.desc + theme = martial_authority_focus + override_background = { + reference = army_camp + } + + left_portrait = { + character = scope:first + animation = anger + } + right_portrait = { + character = scope:second + animation = rage + } + + immediate = { + play_music_cue = "mx_cue_combat_3" + } + + option = { + name = martial_authority.2042.a + duel = { + skill = prowess + value = 15 + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -49 + } + desc = martial_authority.2042.a.success + send_interface_toast = { + type = event_toast_effect_good + title = martial_authority.2042.a.success + left_icon = root + add_prestige = medium_prestige_gain + add_martial_lifestyle_xp = medium_lifestyle_xp + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -4 + min = -49 + } + desc = martial_authority.2042.a.failure + send_interface_toast = { + type = event_toast_effect_bad + title = martial_authority.2042.a.failure + left_icon = root + increase_wounds_effect = { REASON = fight } + add_martial_lifestyle_xp = miniscule_lifestyle_xp + } + } + } + + stress_impact = { + #Rare opportunity for certain character types to 'blow off some steam' and lose stress here, at risk of wounds. + eccentric = medium_stress_loss + wrathful = medium_stress_loss + vengeful = medium_stress_loss + sadistic = medium_stress_loss + + #Most characters won't want to do this, though. + craven = major_stress_impact_gain + calm = medium_stress_impact_gain + patient = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 100 + ai_vengefulness = 100 + ai_energy = 100 + ai_rationality = -100 + } + # Rational characters know when they have a good chance of winning the duel + compare_modifier = { + trigger = { + ai_rationality >= 10 + } + value = { + value = prowess + add = -15 + } + multiplier = 1500 # -22,500 at 0 Prowess, +0 at 15 Prowess, +7,500 at 20 Prowess + } + } + } + + option = { + name = martial_authority.2042.b + add_prestige = minor_prestige_loss + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 100 + ai_rationality = 100 + } + } + } +} + +################################################## +# An Extra Hand: Find a right-hand (wo)man +# by Sean Hughes +# 2050 - 2057 +################################################## + +scripted_trigger martial_authority_2050_can_be_right_hand_person_trigger = { + is_available_ai_adult = yes + # Must not be the kind of person to ignore/defy your will. + NOT = { + has_trait = greedy + has_trait = ambitious + has_trait = lazy + has_trait = arbitrary + } + opinion = { + target = root + value >= -15 + } + + # Not a baron; they're too insignificant! + NOT = { + highest_held_title_tier = 1 + } + + # Not your marshal (since they appear elsewhere in the event). + NOR = { + is_councillor_of = root + has_council_position = councillor_marshal + } + + # Not somebody else's right-hand person. + NOT = { has_variable = is_right_hand_person_of } +} + +# Gain a Right-Hand Person +martial_authority.2050 = { + type = character_event + title = martial_authority.2050.t + desc = { + desc = martial_authority.2050.desc.opening + first_valid = { + triggered_desc = { + trigger = { + scope:right_hand_person = { + is_vassal_of = root + is_landed = yes + } + } + desc = martial_authority.2050.desc.vassal + } + triggered_desc = { + trigger = { + scope:right_hand_person = { + is_knight_of = root + } + } + desc = martial_authority.2050.desc.knight + } + desc = martial_authority.2050.desc.courtier + } + desc = martial_authority.2050.desc.ending + } + theme = martial_authority_focus + + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:right_hand_person + animation = personality_bold + } + lower_right_portrait = scope:marshal + + trigger = { + # Restricted to Authority and Adventurer lifestyle, because it's not really sensible for Chivalry or Strategy + OR = { + has_focus = martial_authority_focus + has_focus = martial_adventurer_focus + } + NOT = { has_variable = right_hand_person } # Does not already have a right-hand person. + NOT = { has_character_flag = had_event_martial_authority_2050 } #Can only happen once every 5 years. + + # A valid character to become our right-hand person must exist. + OR = { + any_vassal = { + martial_authority_2050_can_be_right_hand_person_trigger = yes + } + any_knight = { + martial_authority_2050_can_be_right_hand_person_trigger = yes + } + any_courtier = { + martial_authority_2050_can_be_right_hand_person_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_martial_authority_2050 + years = 5 + } + + every_vassal = { + limit = { + martial_authority_2050_can_be_right_hand_person_trigger = yes + } + add_to_temporary_list = potential_right_hand_people + } + every_knight = { + limit = { + martial_authority_2050_can_be_right_hand_person_trigger = yes + } + add_to_temporary_list = potential_right_hand_people + } + every_courtier = { + limit = { + martial_authority_2050_can_be_right_hand_person_trigger = yes + } + add_to_temporary_list = potential_right_hand_people + } + + ordered_in_list = { + list = potential_right_hand_people + + order_by = { + value = { + + add = 1 + + # More likely to pick somebody who has some amount of standing in your realm... + if = { + limit = { + is_vassal_of = root + } + add = 15 + add = { + add = highest_held_title_tier + multiply = 2 + } + } + else_if = { + limit = { + is_knight_of = root + } + add = 10 + } + + # ...but less likely to pick somebody who is already very important. + if = { + limit = { + OR = { + is_councillor_of = root + is_consort_of = root + is_player_heir_of = root + } + } + add = -25 + } + else_if = { + limit = { + OR = { + is_powerful_vassal_of = root + is_player_heir_of = root + } + } + add = -10 + } + + # More likely to pick someone who has respect for the 'rule of law' + if = { + limit = { has_trait = just } + add = 10 + } + if = { + limit = { has_trait = content } + add = 5 + } + if = { + limit = { has_trait = diligent } + add = 5 + } + if = { + limit = { has_trait = arrogant } + add = -5 + } + if = { + limit = { has_trait = fickle } + add = -5 + } + + # More likely to pick someone who is friendly to you. + if = { + limit = { + opinion = { + target = root + value >= 10 + } + } + add = 10 + } + if = { + limit = { + opinion = { + target = root + value >= 25 + } + } + add = 5 + } + + # But not too friendly, otherwise the event is kind of inconsequential. + if = { + limit = { + opinion = { + target = root + value >= 80 + } + } + add = -10 + } + + # Trait compatibility has a large impact on who gets picked. + add = { + add = 0 + if = { + limit = { + trait_compatibility = { + target = root + value >= high_positive_trait_compatibility + } + } + add = 50 + } + else_if = { + limit = { + trait_compatibility = { + target = root + value >= medium_positive_trait_compatibility + } + } + add = 35 + } + else_if = { + limit = { + trait_compatibility = { + target = root + value >= low_positive_trait_compatibility + } + } + add = 15 + } + else_if = { + limit = { + trait_compatibility = { + target = root + value >= low_negative_trait_compatibility + } + } + add = -10 + } + else = { + add = -30 + } + + # Attraction Multiplier + if = { + limit = { + root = { is_attracted_to_gender_of = prev } + is_attracted_to_gender_of = root + } + multiply = 1.5 + } + } + + # Slightly more likely to pick someone close to you in age. + if = { + limit = { + age < age_compared_to_root_plus_ten + age > age_compared_to_root_minus_ten + } + add = 5 + } + } + } + save_scope_as = right_hand_person + } + + # Save variables (for localization and death events). + set_variable = { + name = right_hand_person + value = scope:right_hand_person + } + scope:right_hand_person = { + set_variable = { + name = is_right_hand_person_of + value = root + } + } + + # Save other relevant scopes. + if = { + limit = { + exists = cp:councillor_marshal + } + cp:councillor_marshal = { + save_scope_as = marshal + } + } + } + + option = { + name = martial_authority.2050.a + + # Gain semi-permanent character modifier (until RHP is unable or unwilling to continue serving you). + send_interface_toast = { + title = martial_authority.2050.toast.title + left_icon = scope:right_hand_person + add_character_modifier = { + modifier = martial_authority_2050_right_hand_person_modifier + } + } + + # Mutual Opinion Increase with RHM. + scope:right_hand_person = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 10 + } + } + hidden_effect = { + add_opinion = { + modifier = pleased_opinion + target = scope:right_hand_person + opinion = 10 + } + if = { + limit = { + NOT = { has_relation_potential_friend = scope:right_hand_person} + } + set_relation_potential_friend = scope:right_hand_person + } + } + primary_title = { #Scope change here to avoid tooltip grouping. + custom_tooltip = martial_authority.2050.a.tt + } + + stress_impact = { + shy = medium_stress_gain + paranoid = medium_stress_gain + } + + trigger_event = { + id = martial_authority.2051 + years = { 2 3 } + } + } + + option = { + name = martial_authority.2050.b + trigger = { + exists = scope:marshal + } + + # Larger Mutual opinion increase with Marshal. + scope:marshal = { + add_opinion = { + modifier = trust_opinion + target = root + opinion = 20 + } + } + hidden_effect = { + add_opinion = { + modifier = trust_opinion + target = scope:marshal + opinion = 20 + } + } + + # Remove unused event variables + remove_variable = right_hand_person + scope:right_hand_person = { + remove_variable = is_right_hand_person_of + } + } + + option = { + name = martial_authority.2050.c + + # Gain large amount of Prestige at the cost of Stress. + add_prestige = major_prestige_gain + stress_impact = { + base = medium_stress_gain + diligent = minor_stress_loss + lazy = major_stress_gain + humble = minor_stress_gain + } + + # Remove unused event variables + remove_variable = right_hand_person + scope:right_hand_person = { + remove_variable = is_right_hand_person_of + } + } +} + +# Become friends with your Right-Hand Person. +martial_authority.2051 = { + type = character_event + title = martial_authority.2051.t + desc = martial_authority.2051.desc + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:right_hand_person + animation = admiration + } + theme = martial_authority_focus + + trigger = { + exists = var:right_hand_person + var:right_hand_person = { + is_alive = yes + is_imprisoned = no + opinion = { + target = root + value >= 15 + } + } + can_set_relation_friend_trigger = { CHARACTER = var:right_hand_person } + NOR = { + has_relation_lover = var:right_hand_person + has_relation_soulmate = var:right_hand_person + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + # Transition right-hand person variable into an event scope. + var:right_hand_person = { + save_scope_as = right_hand_person + } + } + + option = { + name = martial_authority.2051.a + set_relation_friend = { reason = friend_right_hand_man target = scope:right_hand_person } + } + + option = { + name = martial_authority.2051.b + trigger = { + can_set_relation_lover_trigger = { CHARACTER = var:right_hand_person } + } + + set_relation_lover = { reason = lover_right_hand target = scope:right_hand_person } + } + + option = { + name = martial_authority.2051.c + add_prestige = minor_prestige_gain + scope:right_hand_person = { + add_opinion = { + modifier = respect_opinion + target = root + opinion = 10 + } + } + } +} + + +# Right-Hand Person Imprisoned (by you) +martial_authority.2052 = { + hidden = yes + + trigger = { + exists = var:right_hand_person + var:right_hand_person = { + is_alive = yes + is_imprisoned = yes + exists = var:is_right_hand_person_of + } + scope:imprisoner = var:right_hand_person.var:is_right_hand_person_of + } + + immediate = { + var:right_hand_person.var:is_right_hand_person_of = { + send_interface_message = { + type = event_prison_neutral + title = martial_authority.2052.message + left_icon = var:right_hand_person + remove_character_modifier = martial_authority_2050_right_hand_person_modifier + } + } + } +} + +# Right-Hand Person Imprisoned (by someone else) +martial_authority.2053 = { + hidden = yes + + trigger = { + exists = var:right_hand_person + var:right_hand_person = { + is_alive = yes + is_imprisoned = yes + exists = var:is_right_hand_person_of + var:is_right_hand_person_of = { + is_alive = yes + } + } + NOT = { scope:imprisoner = var:right_hand_person.var:is_right_hand_person_of } + } + + immediate = { + var:right_hand_person.var:is_right_hand_person_of = { + send_interface_message = { + type = event_prison_neutral + title = martial_authority.2053.toast + left_icon = var:right_hand_person + remove_character_modifier = martial_authority_2050_right_hand_person_modifier + } + } + } +} + +# Right-Hand Person Released from Prison +martial_authority.2054 = { + hidden = yes + + trigger = { + exists = var:is_right_hand_person_of + var:is_right_hand_person_of = { + is_alive = yes + } + } + + immediate = { + var:is_right_hand_person_of = { + var:right_hand_person = { save_scope_as = right_hand_person } + send_interface_message = { + type = event_prison_neutral + title = martial_authority.2054.toast + left_icon = scope:right_hand_person + add_character_modifier = { + modifier = martial_authority_2050_right_hand_person_modifier + } + } + } + } +} + +# Right-Hand Person Dies +martial_authority.2055 = { + hidden = yes + trigger = { + exists = var:is_right_hand_person_of + } + + immediate = { + var:is_right_hand_person_of = { + send_interface_message = { + type = event_generic_neutral + title = martial_authority.2056.message + left_icon = root + remove_character_modifier = martial_authority_2050_right_hand_person_modifier + } + + hidden_effect = { + remove_variable = right_hand_person + } + } + } +} + +# Right-Hand Person Leaves Service +martial_authority.2056 = { + hidden = yes + orphan = yes + trigger = { + exists = var:right_hand_person + var:right_hand_person = { + is_alive = yes + } + } + + immediate = { + remove_character_modifier = martial_authority_2050_right_hand_person_modifier + + scope:right_hand_person = { + remove_variable = is_right_hand_person_of + } + remove_variable = right_hand_person + } +} + +# I Die (Cleans up variables on Right-Hand Person) +martial_authority.2057 = { + hidden = yes + trigger = { + exists = var:right_hand_person + } + immediate = { + var:right_hand_person = { + remove_variable = is_right_hand_person_of + } + } +} + +################################################################################################################################ +################################################################################################################################ + +############################# +# AUTHORITY: SPECIAL EVENTS # +############################# + +namespace = martial_authority_special + +############################## +# Soldier & Officer fighting # by Mathilda Bjarnehed +############################## + +martial_authority_special.1100 = { + type = character_event + title = martial_authority_special.1100.t + desc = { + desc = martial_authority_special.1100.start.desc + random_valid = { + desc = martial_authority_special.1100.heavy_infantry.desc + desc = martial_authority_special.1100.cavalry.desc + desc = martial_authority_special.1100.archer.desc + desc = martial_authority_special.1100.skirmisher.desc + desc = martial_authority_special.1100.pikemen.desc + } + desc = martial_authority_special.1100.end.desc + } + + theme = martial_authority_focus + override_background = { + reference = alley_night + } + + left_portrait = { + character = root + animation = scheme + outfit_tags = { military_outfit } + } + right_portrait = { + character = scope:officer + animation = anger + outfit_tags = { military_outfit } + } + + trigger = { + NOT = { + location = { geographical_region = world_asia_china } + } + OR = { + has_focus = martial_authority_focus + has_focus = martial_adventurer_focus + } + NOT = { has_character_flag = had_event_martial_authority_special_1100 } + num_of_relation_soldier_friend = 0 + any_knight = { + basic_is_available_ai = yes + ai_compassion <= low_positive_ai_value + } + OR = { + exists = capital_province + exists = location + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + hidden_effect = { + add_character_flag = { + flag = is_in_martial_special_event + days = 200 + } + add_character_flag = had_event_martial_authority_special_1100 + #Pick an officer + random_knight = { + limit = { + basic_is_available_ai = yes + ai_compassion <= low_positive_ai_value + } + weight = { + base = 1 + modifier = { + add = { + value = ai_compassion + multiply = -2 + if = { + limit = { ai_compassion <= medium_negative_ai_value } + multiply = 3 + } + } + } + modifier = { + add = { + value = ai_boldness + multiply = 1 + } + } + } + save_scope_as = officer + } + #Create a hidden soldier + if = { + limit = { + exists = root.capital_province + } + create_character = { + gender_female_chance = root_soldier_female_chance + location = root.capital_province + template = soldier_friend_character + save_scope_as = soldier_friend + dynasty = generate + } + } + else = { + create_character = { + gender_female_chance = root_soldier_female_chance + location = root.location + template = soldier_friend_character + save_scope_as = soldier_friend + dynasty = generate + } + } + } + } + + #Defend the soldier (fist fight) + option = { + name = martial_authority_special.1100.a + + duel = { + skill = prowess + target = scope:officer + 7 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -14 + } + desc = martial_authority_special.1100.a.success.tt + + show_as_tooltip = { + add_martial_lifestyle_perk_points = 1 + } + trigger_event = martial_authority_special.1101 + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.7 + min = -9 + } + desc = martial_authority_special.1100.a.failure.tt + trigger_event = martial_authority_special.1102 + show_as_tooltip = { + martial_authority_special_1100_a_failure_effect = yes + } + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + craven = medium_stress_impact_gain + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_boldness_target_modifier = { VALUE = 50 } + ai_compassion_target_modifier = { VALUE = 50 } + modifier = { + factor = 0 + has_trait_rank = { + trait = wounded + rank >= 3 + } + } + } + } + + #Inspiring speech + option = { + name = martial_authority_special.1100.b + trigger = { diplomacy >= high_skill_rating } + skill = diplomacy + show_as_tooltip = { + add_martial_lifestyle_perk_points = 1 + } + reverse_add_opinion = { + target = scope:officer + modifier = respect_opinion + opinion = low_positive_opinion + } + + trigger_event = martial_authority_special.1103 + + ai_chance = { + base = 100 + ai_compassion_target_modifier = { VALUE = 50 } + } + + stress_impact = { + shy = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + } + + #Punish them both + option = { + name = martial_authority_special.1100.c + + add_dread = medium_dread_gain + + scope:officer = { + increase_wounds_no_death_effect = { REASON = beaten } + + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = low_negative_opinion + } + } + + hidden_effect = { + remove_character_flag = is_in_martial_special_event + } + + scope:soldier_friend = { + silent_disappearance_ai_effect = yes + } + + ai_chance = { + base = 50 + ai_compassion_target_modifier = { VALUE = -100 } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + } + } + + #Claim the idea as your own + option = { + name = martial_authority_special.1100.d + + add_character_modifier = { + modifier = innovative_strategy_modifier + years = 15 + } + + hidden_effect = { + remove_character_flag = is_in_martial_special_event + } + + scope:soldier_friend = { + silent_disappearance_ai_effect = yes + } + + stress_impact = { + honest = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_honor_target_modifier = { VALUE = -60 } + ai_compassion_target_modifier = { VALUE = -40 } + } + } +} + +#You won the duel +martial_authority_special.1101 = { + type = character_event + title = martial_authority_special.1100.t + desc = { + desc = martial_authority_special.1101.desc + desc = martial_authority_special.1101.end.desc + } + + theme = martial_authority_focus + override_background = { + reference = alley_night + } + + left_portrait = { + character = root + animation = war_over_win + outfit_tags = { military_outfit } + } + right_portrait = { + character = scope:officer + animation = shame + outfit_tags = { military_outfit } + } + lower_left_portrait = { + character = scope:soldier_friend + outfit_tags = { military_outfit } + } + + immediate = { + martial_authority_special_1100_soldier_friend_effects_effect = yes + } + + #Use their strategy + option = { + name = martial_authority_special.1101.a + add_character_modifier = { + modifier = innovative_strategy_modifier + years = 15 + } + add_martial_lifestyle_xp = medium_lifestyle_xp + } + + #Talk it over + option = { + name = martial_authority_special.1101.b + add_martial_lifestyle_perk_points = 1 + } + + after = { + hidden_effect = { + remove_character_flag = is_in_martial_special_event + } + scope:soldier_friend = { + silent_disappearance_ai_effect = yes + } + } +} + +#Duel lost +martial_authority_special.1102 = { + type = character_event + title = martial_authority_special.1100.t + desc = martial_authority_special.1102.desc + + theme = martial_authority_focus + override_background = { + reference = alley_night + } + + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:officer + animation = dismissal + outfit_tags = { military_outfit } + } + + immediate = { + martial_authority_special_1100_a_failure_effect = yes + } + + option = { + name = martial_authority_special.1102.a + add_character_modifier = { + modifier = fought_a_seasoned_warrior + days = 1825 + } + add_martial_lifestyle_xp = minor_lifestyle_xp + } + + after = { + hidden_effect = { + remove_character_flag = is_in_martial_special_event + } + scope:soldier_friend = { + silent_disappearance_ai_effect = yes + } + } +} + +#Your speech worked +martial_authority_special.1103 = { + type = character_event + title = martial_authority_special.1100.t + desc = { + desc = martial_authority_special.1103.desc + desc = martial_authority_special.1101.end.desc + } + theme = martial_authority_focus + override_background = { + reference = alley_night + } + + left_portrait = { + character = root + animation = toast + } + right_portrait = { + character = scope:soldier_friend + animation = happiness + outfit_tags = { military_outfit } + } + lower_right_portrait = { + character = scope:officer + outfit_tags = { military_outfit } + } + + immediate = { + martial_authority_special_1100_soldier_friend_effects_effect = yes + } + + #Use their strategy + option = { + name = martial_authority_special.1101.a + add_character_modifier = { + modifier = innovative_strategy_modifier + years = 15 + } + add_martial_lifestyle_xp = medium_lifestyle_xp + } + + #Talk it over + option = { + name = martial_authority_special.1101.b + add_martial_lifestyle_perk_points = 1 + } + + after = { + hidden_effect = { + remove_character_flag = is_in_martial_special_event + } + scope:soldier_friend = { + silent_disappearance_ai_effect = yes + } + } +} + +###################### +# Deserting Soldier # by Linnéa Thimrén, rewritten by Arkadiusz Majewski +###################### + +#Your knight wants to desert because of a PTSD +martial_authority_special.1501 = { + type = character_event + title = martial_authority_special.1501.t + desc = { + desc = martial_authority_special.1501.desc + first_valid = { + triggered_desc = { + trigger = { scope:desertion_reason = flag:raid } + desc = martial_authority_special.1501.desc_raid + } + desc = martial_authority_special.1501.desc_battle + } + desc = martial_authority_special.1501.desc_outro + } + + theme = martial_authority_focus + override_background = { + reference = ce1_funeral_pyre + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = worry + outfit_tags = { military_outfit } + } + right_portrait = { + character = scope:deserting_soldier + animation = delirium + outfit_tags = { military_outfit } + } + + trigger = { + NOT = { has_character_flag = is_in_martial_special_event } + OR = { + has_focus = martial_authority_focus + has_focus = martial_adventurer_focus + } + OR = { + any_relation = { + type = soldier_friend + save_temporary_scope_as = deserting_soldier_temp + } + any_courtier_or_guest = { + NOT = { this = root } + is_ai = yes + is_adult = yes + is_knight_of = root + save_temporary_scope_as = deserting_soldier_temp + } + } + OR = { + location = { + has_province_modifier = recently_looted_modifier + } + any_memory = { + has_memory_type = battle_lost_memory + var:battle_location = root.location + memory_age_years < 1 + } + scope:deserting_soldier_temp = { + any_memory = { + has_memory_type = battle_lost_memory + var:battle_location = root.location + memory_age_years < 1 + } + } + } + } + + immediate = { + location = { + save_scope_as = ravaged_place + } + if = { + limit = { + location = { + has_province_modifier = recently_looted_modifier + } + } + save_scope_value_as = { + name = desertion_reason + value = flag:raid + } + } + else = { + save_scope_value_as = { + name = desertion_reason + value = flag:battle + } + } + if = { + limit = { + any_relation = { + type = soldier_friend + is_councillor = no + } + } + hidden_effect = { + random = { + chance = 25 + random_relation = { + type = soldier_friend + save_scope_as = deserting_soldier # Oh no, your soldier_friend is among the deserters! + } + } + } + } + if = { + limit = { + NOT = { exists = scope:deserting_soldier } + } + ordered_courtier_or_guest = { + order_by = ai_honor + limit = { + trigger_if = { + limit = { + scope:desertion_reason = flag:battle + } + any_memory = { + has_memory_type = battle_lost_memory + var:battle_location = location + memory_age_years < 1 + } + } + this != root + is_ai = yes + is_adult = yes + is_knight_of = root + } + save_scope_as = deserting_soldier + } + } + } + + option = { + name = martial_authority_special.1501.a + flavor = martial_authority_special.1501.a_tt + duel = { + skill = martial + target = scope:deserting_soldier + 20 = { + desc = martial_authority_special.1501.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = 1 + } + send_interface_toast = { + type = event_toast_effect_bad + title = martial_authority_special.1501.a.success + left_icon = scope:deserting_soldier + right_icon = root + add_martial_lifestyle_perk_points = 1 + scope:deserting_soldier = { + add_opinion = { + modifier = comforted_opinion + opinion = 15 + target = root + years = 5 + } + } + } + } + 20 = { + desc = martial_authority_special.1501.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.25 + min = -4 + } + send_interface_toast = { + type = event_toast_effect_bad + title = martial_authority_special.1501.a.failure + left_icon = scope:deserting_soldier + right_icon = root + add_character_modifier = { + modifier = decreased_levies_modifier + days = 1825 + } + scope:deserting_soldier = { + add_opinion = { + modifier = doubted_me + opinion = -30 + target = root + } + } + } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + #I allievate you from responsibilites + option = { + name = martial_authority_special.1501.b + scope:deserting_soldier = { + set_knight_status = forbid + add_opinion = { + modifier = helped_me_in_time_of_need + opinion = 30 + target = root + years = 5 + } + hidden_effect = { # removes soldier_friend and adds them as a friend so that they will not be used in future warfare events + remove_relation_soldier_friend = root + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = root } + } + set_relation_friend = { reason = friend_spared target = root } + } + } + } + if = { + limit = { + can_add_hook = { + type = obligation_hook + target = scope:deserting_soldier + } + } + add_hook = { + type = obligation_hook + target = scope:deserting_soldier + } + add_stress = minor_stress_loss + } + else = { + add_stress = medium_stress_loss + } + stress_impact = { + compassionate = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = 100 + has_trait = compassionate + } + } + } + + #snap out of it + option = { + name = martial_authority_special.1501.c + add_martial_lifestyle_xp = minor_lifestyle_xp + scope:deserting_soldier = { + add_opinion = { + modifier = let_me_down_opinion + opinion = -15 + target = root + } + hidden_effect = { # removes soldier_friend and adds them as a friend so that they will not be used in future warfare events + remove_relation_soldier_friend = root + if = { + limit = { + can_set_relation_friend_trigger = { CHARACTER = root } + } + set_relation_friend = { reason = friend_spared target = root } + } + } + } + ai_chance = { + base = 10 + } + } +} + +########################################################################## +# Displaying/Teaching Authority to Someone (Find a way to impress someone) +########################################################################## +# by Milla Isaksson +##################### + +scripted_trigger martial_authority_special_friend_trigger = { + OR = { + AND = { + OR = { + has_trait = overseer + AND = { + exists = root.var:right_hand_person + this = root.var:right_hand_person + } + } + is_available_ai_adult = yes + } + AND = { + is_child_of = root + age >= 10 + is_available_ai = yes + } + } +} + +martial_authority_special.3000 = { + type = character_event + title = martial_authority_special.3000.t + desc = martial_authority_special.3000.desc + + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:martial_authority_friend + animation = inspect_weapon + } + theme = martial_authority_focus + + trigger = { + NOT = { has_character_flag = had_event_martial_authority_3000 } #Can only happen once every 5 years + OR = { + any_vassal = { + martial_authority_special_friend_trigger = yes + } + any_knight = { + martial_authority_special_friend_trigger = yes + } + any_courtier_or_guest = { + martial_authority_special_friend_trigger = yes + } + } + + exists = capital_province + } + + immediate = { + add_character_flag = { + flag = had_event_martial_authority_3000 + days = 1825 + } + + if = { + limit = { + NOT = { + any_relation = { + type = friend + is_available = yes + lifestyle_friend_trigger = { CHARACTER = root FOCUS = martial_authority_focus } + } + } + } + potential_lifestyle_friend_saving_effect = { FOCUS = martial_authority_focus SCOPE_NAME = martial_authority_friend } + + } + else = { + random_relation = { + type = friend + limit = { + is_available = yes + lifestyle_friend_trigger = { CHARACTER = root FOCUS = martial_authority_focus } + exists = root.var:right_hand_person + this = root.var:right_hand_person + } + alternative_limit = { + is_available = yes + lifestyle_friend_trigger = { CHARACTER = root FOCUS = martial_authority_focus } + } + save_scope_as = martial_authority_friend + } + } + } + + option = { # Talk about the importance of communication + name = martial_authority_special.3000.a + + add_martial_lifestyle_xp = minor_lifestyle_xp + + reverse_add_opinion = { + target = scope:martial_authority_friend + modifier = respect_opinion + opinion = low_positive_opinion + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + } + modifier = { + factor = 1.5 + has_trait_extroverted_trigger = yes + } + } + } + + option = { # Take a walk among your soldiers + name = martial_authority_special.3000.b + + add_martial_lifestyle_xp = minor_lifestyle_xp + + if = { + limit = { + has_government = landless_adventurer_government + } + add_character_modifier = { + modifier = ep3_loyal_troops_raid_modifier + years = 2 + } + } + else = { + capital_province = { + add_province_modifier = { modifier = respected_figurehead years = 2 } + } + } + ai_chance = { + base = 100 + modifier = { + factor = 1.5 + has_trait_benevolent_trigger = yes + } + } + } + + after = { + scope:martial_authority_friend = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + + + +### Innovate with weaponry ### +### martial_authority 4000 - 4005 ### +### by Nick Meredith ### + +#Find a tool in an armoury +martial_authority.4000 = { + type = character_event + title = martial_authority.4000.t + desc = martial_authority.4000.desc + theme = martial_authority_focus + + cooldown = { years = 10 } + + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = boredom + } + + trigger = { + has_lifestyle = martial_lifestyle + is_ruler = yes + is_landed = yes + has_dlc_feature = royal_court + any_held_title = { + title_tier = county + title_province = { + OR = { + terrain = farmlands + terrain = plains + terrain = floodplains + terrain = oasis + } + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = martial_authority_focus } + } + + #Take a look at the weapon + option = { + name = martial_authority.4000.a + + custom_tooltip = { + text = martial_authority.4000.a.tt + } + + trigger_event = { + id = martial_authority.4001 + days = { 3 10 } + } + } + + #Discard option + option = { + name = martial_authority.4000.b + + custom_tooltip = { + text = martial_authority.4000.b.tt + } + + stress_impact = { + lazy = miniscule_stress_impact_loss + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + } + } +} + + +#Choose what you want to turn the tool into +martial_authority.4001 = { + type = character_event + title = martial_authority.4001.t + desc = martial_authority.4001.desc + theme = martial_authority_focus + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = personality_honorable + } + + immediate = { #Make a blacksmith for the next event in the chain + create_character = { + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + trait = diligent #it has a blacksmith's hammer! + random_traits = yes + dynasty = none + employer = root + save_scope_as = blacksmith + } + } + + #Repurpose into a dagger + option = { + name = martial_authority.4001.a + flavor = martial_authority.4001.a.tt + + random_list = { + 75 = { + trigger_event = { + id = martial_authority.4002 + days = { 7 21 } + } + + modifier = { + add = -2 + has_trait = lazy + } + + modifier = { + add = 2 + has_trait = diligent + } + + modifier = { + add = 5 + learning > 10 + } + + modifier = { + add = 5 + martial > 10 + } + + modifier = { + add = 10 + has_trait = intellect_good + } + + modifier = { + add = 30 + prowess > 15 + } + + modifier = { + add = 50 + has_trait = lifestyle_blademaster + } + + custom_tooltip = { + text = martial_authority_4001.dagger.tt + } + } + + 25 = { + send_interface_toast = { + title = martial_authority.4001.b.failure + left_icon = root + } + + custom_tooltip = { + text = martial_authority_4001.fail.tt + } + } + } + + ai_chance = { + base = 100 + } + } + + #Repurpose into a halberd + option = { + name = martial_authority.4001.b + flavor = martial_authority.4001.b.tt + + random_list = { + 50 = { + trigger_event = { + id = martial_authority.4003 + days = { 7 21 } + } + + modifier = { + add = -2 + has_trait = lazy + } + + modifier = { + add = 2 + has_trait = diligent + } + + modifier = { + add = 2 + learning > 10 + } + + modifier = { + add = 2 + martial > 10 + } + + modifier = { + add = 5 + has_trait = intellect_good + } + + modifier = { + add = 20 + prowess > 15 + } + + modifier = { + add = 40 + has_trait = lifestyle_blademaster + } + + custom_tooltip = martial_authority_4001.halberd.tt + } + + 50 = { + send_interface_toast = { + title = martial_authority.4001.b.failure + left_icon = root + custom_tooltip = martial_authority_4001.fail.tt + } + } + } + + ai_chance = { + base = 100 + } + } + + #Keep it as-is + option = { + name = martial_authority.4001.c + flavor = martial_authority.4001.c.tt + + custom_tooltip = martial_authority_4001.billhook.tt + + trigger_event = { + id = martial_authority.4004 + days = { 7 21 } + } + + ai_chance = { + base = 100 + } + } +} + +#You've made an improvised dagger! +martial_authority.4002 = { + type = character_event + title = martial_authority.4002.t + desc = martial_authority.4002.desc + theme = martial_authority_focus + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = personality_honorable + } + + right_portrait = { + character = scope:blacksmith + animation = personality_content + } + + #Collect artifact + option = { + name = martial_authority.4002.a + + trigger = { + NOT = { + has_character_flag = improvised_dagger + } + } + + create_artifact = { + name = improvised_dagger + description = improvised_dagger_desc + type = dagger + visuals = dagger + modifier = artifact_prowess_1_modifier + save_scope_as = improvised_dagger + } + + add_martial_lifestyle_xp = medium_lifestyle_xp + + hidden_effect = { + scope:improvised_dagger = { + set_max_durability = 25 + set_artifact_rarity_common = yes + flag_as_trash_artifact = yes + } + } + + add_character_flag = { + flag = improvised_dagger + years = 5 + } + + ai_chance = { + base = 100 + } + } + + #Second option if you've already had this event + option = { + name = martial_authority.4002.b + + add_martial_lifestyle_xp = medium_lifestyle_xp + + add_character_modifier = { + modifier = repurposed_billhook_dagger + years = 5 + } + + ai_chance = { + base = 100 + } + } + + after = { + scope:blacksmith = { + silent_disappearance_effect = yes + } + } +} + +#You've made an improvised halberd! +martial_authority.4003 = { + type = character_event + title = martial_authority.4003.t + desc = martial_authority.4003.desc + theme = martial_authority_focus + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = personality_honorable + } + + right_portrait = { + character = scope:blacksmith + animation = personality_content + } + + #Collect rewards + option = { + name = martial_authority.4003.a + + trigger = { + NOT = { + has_character_flag = improvised_halberd + } + } + + create_artifact = { + name = improvised_halberd + description = improvised_halberd_desc + type = spear + visuals = spear + modifier = artifact_prowess_1_modifier + save_scope_as = improvised_halberd + } + + add_martial_lifestyle_xp = medium_lifestyle_xp + + hidden_effect = { + scope:improvised_halberd = { + set_max_durability = 25 + set_artifact_rarity_common = yes + flag_as_trash_artifact = yes + } + } + + add_character_flag = { + flag = improvised_halberd + years = 5 + } + + ai_chance = { + base = 100 + } + } + + #Second option if you've already had this event + option = { + name = martial_authority.4003.b + + add_martial_lifestyle_xp = medium_lifestyle_xp + + add_character_modifier = { + modifier = repurposed_billhook_halberd + years = 5 + } + + ai_chance = { + base = 100 + } + } + + after = { + scope:blacksmith = { + silent_disappearance_effect = yes + } + } +} + +#You've 'made' a billhook! +martial_authority.4004 = { + type = character_event + title = martial_authority.4004.t + desc = martial_authority.4004.desc + theme = martial_authority_focus + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = personality_honorable + } + + right_portrait = { + character = scope:blacksmith + animation = personality_content + } + + #Collect rewards + option = { + name = martial_authority.4004.a + + trigger = { + NOT = { + has_character_flag = improvised_billhook + } + } + + add_martial_lifestyle_xp = medium_lifestyle_xp + + create_artifact = { + name = improvised_billhook + description = improvised_billhook_desc + type = dagger + visuals = dagger + modifier = artifact_prowess_1_modifier + modifier = artifact_levy_reinforcement_rate_1_modifier + modifier = artifact_monthly_prestige_penalty_modifier + save_scope_as = improvised_billhook + } + + hidden_effect = { + scope:improvised_billhook = { + set_max_durability = 25 + set_artifact_rarity_common = yes + flag_as_trash_artifact = yes + } + } + + add_character_flag = { + flag = improvised_billhook + years = 5 + } + + ai_chance = { + base = 100 + } + } + + #Second option if you've already had this event + option = { + name = martial_authority.4004.b + + add_martial_lifestyle_xp = medium_lifestyle_xp + + add_character_modifier = { + modifier = repurposed_billhook_billhook + years = 5 + } + + ai_chance = { + base = 100 + } + } + + after = { + scope:blacksmith = { + silent_disappearance_effect = yes + } + } +} diff --git a/N3OW/events/lifestyles/warfare_lifestyle/martial_authority_events_2.txt b/N3OW/events/lifestyles/warfare_lifestyle/martial_authority_events_2.txt new file mode 100644 index 00000000..686d70f5 --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/martial_authority_events_2.txt @@ -0,0 +1,697 @@ +namespace = martial_authority + +################################################## + +#Martial Authority Lifestyle events + + # 5000 - You visit some baronies or go partying. + # 8000 - Your child joins a tourney +################################################## + +################################################## +# Touring the Backwaters +# by Ewan Cowhig Croft +# 5000 +################################################## + +scripted_trigger martial_authority_5000_minor_barons = { + is_available = yes + highest_held_title_tier = tier_barony + is_powerful_vassal = no +} + +scripted_trigger martial_authority_5000_powerful_vassal = { + is_available = yes + is_at_war = no + NOT = { has_relation_rival = root } +} + +#You visit some baronies or go partying with an important vassal. + #by Ewan Cowhig Croft +martial_authority.5000 = { + type = character_event + title = martial_authority.5000.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + faith = { religion_tag = christianity_religion } + faith = { religion_tag = dualism_religion } + faith = { religion_tag = islam_religion } + faith = { religion_tag = hellenism_religion } + faith = { religion_tag = judaism_religion } + faith = { religion_tag = zoroastrianism_religion } + faith = { religion_tag = zunism_religion } + faith = { religion_tag = hinduism_religion } + } + } + desc = martial_authority.5000.authoritative_religion.desc + } + desc = martial_authority.5000.relaxed_religion.desc + } + } + theme = martial_authority_focus + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:party_vassal + animation = beg + } + lower_left_portrait = scope:baron_1 + lower_center_portrait = scope:baron_2 + lower_right_portrait = scope:baron_3 + + trigger = { + is_at_war = no + NOT = { has_character_flag = had_event_martial_control_5000 } + any_vassal = { + martial_authority_5000_minor_barons = yes + save_temporary_scope_as = tmp_baron_1 + } + any_vassal = { + martial_authority_5000_minor_barons = yes + primary_title.county != scope:tmp_baron_1.primary_title.county + save_temporary_scope_as = tmp_baron_2 + } + any_vassal = { + martial_authority_5000_minor_barons = yes + NOR = { + primary_title.county = scope:tmp_baron_1.primary_title.county + primary_title.county = scope:tmp_baron_2.primary_title.county + } + } + any_powerful_vassal = { martial_authority_5000_powerful_vassal = yes } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = martial_authority_focus } + downweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + downweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_control_5000 + days = 1825 + } + every_vassal = { + limit = {martial_authority_5000_minor_barons = yes } + add_to_list = baron_initial_list + } + random_in_list = { + list = baron_initial_list + limit = { primary_title.county.county_control < full_county_control } + alternative_limit = { always = yes } + weight = { + base = 1 + modifier = { + add = { + value = 120 + subtract = primary_title.county.county_control + } + } + } + save_scope_as = baron_1 + scope:baron_1 = { + primary_title.county = { save_scope_as = baron_1_lands } + } + add_to_list = baron_final_list + } + random_in_list = { + list = baron_initial_list + limit = { + NOR = { + this = scope:baron_1 + primary_title.county = scope:baron_1.primary_title.county + } + primary_title.county.county_control < full_county_control + } + alternative_limit = { + this != scope:baron_1 + } + weight = { + base = 1 + modifier = { + add = { + value = 120 + subtract = primary_title.county.county_control + } + } + } + save_scope_as = baron_2 + scope:baron_2 = { + primary_title.county = { save_scope_as = baron_2_lands } + } + add_to_list = baron_final_list + } + random_in_list = { + list = baron_initial_list + limit = { + NOR = { + this = scope:baron_1 + primary_title.county = scope:baron_1.primary_title.county + this = scope:baron_2 + primary_title.county = scope:baron_2.primary_title.county + } + primary_title.county.county_control < full_county_control + } + alternative_limit = { + NOR = { + this = scope:baron_1 + this = scope:baron_2 + } + } + weight = { + base = 1 + modifier = { + add = { + value = 120 + subtract = primary_title.county.county_control + } + } + } + save_scope_as = baron_3 + scope:baron_3 = { + primary_title.county = { save_scope_as = baron_3_lands } + } + add_to_list = baron_final_list + } + random_powerful_vassal = { + limit = { + martial_authority_5000_powerful_vassal = yes + has_relation_potential_friend = root + NOR = { + this = scope:baron_1 + this = scope:baron_2 + this = scope:baron_3 + } + } + alternative_limit = { + martial_authority_5000_powerful_vassal = yes + NOR = { + this = scope:baron_1 + this = scope:baron_2 + this = scope:baron_3 + } + } + save_scope_as = party_vassal + } + } + + option = { + name = martial_authority.5000.a + every_in_list = { + list = baron_final_list + custom = martial_authority.5000.a.characters_baron_final_list + add_opinion = { + modifier = pleased_opinion + opinion = 30 + target = root + } + } + #Effects separated for purely aesthetic reasons. + every_in_list = { + list = baron_final_list + custom = martial_authority.5000.a.land_baron_final_list + primary_title.county = { + change_county_control = 30 + add_county_modifier = { + modifier = authority_central_control_modifier + years = 15 + } + } + } + stress_impact = { lazy = medium_stress_impact_gain } + ai_chance = { + base = 100 + ai_energy_target_modifier = { VALUE = 100 } + ai_honor_target_modifier = { VALUE = 50 } + } + } + option = { + name = martial_authority.5000.b + progress_towards_friend_effect = { + CHARACTER = scope:party_vassal + OPINION = 0 + REASON = friend_attended_party + } + scope:party_vassal = { + add_opinion = { + modifier = pleased_opinion + opinion = 20 + target = root + } + } + every_in_list = { + list = baron_final_list + custom = martial_authority.5000.a.characters_baron_final_list + add_opinion = { + modifier = insult_opinion + opinion = -30 + target = root + } + } + stress_impact = { + shy = medium_stress_impact_gain + temperate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_energy_target_modifier = { VALUE = -100 } + ai_honor_target_modifier = { VALUE = -50 } + } + } +} + +################################################## +# Child Tourney +# by Isabella Welch +# 8000 +################################################## + +martial_authority.8000 = { + type = character_event + title = martial_authority.8000.t + desc = martial_authority.8000.desc + theme = martial_authority_focus + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = player_heir + animation = personality_bold + } + override_background = { + reference = army_camp + } + + trigger = { + NOR = { + has_character_flag = had_event_martial_authority_8000 + has_dlc_feature = tours_and_tournaments + } + exists = player_heir + root = { is_parent_of = player_heir } + player_heir = { + age > 4 + age < 13 + NOR = { + has_trait = humble + has_trait = shy + has_trait = craven + has_trait = compassionate + has_trait = disfigured + has_trait = one_legged + has_trait = incapable + AND = { + has_trait = brave + has_trait = arrogant + has_trait = wrathful + } + } + is_ai = yes + number_of_personality_traits < personality_trait_limit + } + any_knight = { + count > 2 + is_ai = yes + } + exists = cp:councillor_marshal + cp:councillor_marshal = { + is_ai = yes + is_available = yes + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + root = { + add_character_flag = had_event_martial_authority_8000 + } + cp:councillor_marshal = { + save_scope_as = marshal + } + player_heir = { + save_scope_as = fighting_child + } + } + + option = { #Order your warriors to pull their punches + name = martial_authority.8000.a + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + ai_boldness = 2 + } + } + random_list = { + 60 = { + scope:fighting_child = { + random_list = { + 10 = { + trigger = { NOT = { has_trait = brave} } + root = { + send_interface_toast = { + left_icon = scope:fighting_child + title = martial_authority_child_trait_gain + scope:fighting_child = { add_trait = brave } + } + } + #hidden_effect = { + # root = { + # send_interface_toast = { + # left_icon = scope:fighting_child + # title = martial_authority_child_t#rait_gain# + # show_as_t#ooltip = { scope:#fighting_#child = { add_tra#it = #brave } }# + # }# + # } + #} + #add_trait = brave + } + 10 = { + trigger = { NOT = { has_trait = arrogant } } + root = { + send_interface_toast = { + left_icon = scope:fighting_child + title = martial_authority_child_trait_gain + scope:fighting_child = { add_trait = arrogant } + } + } + } + 10 = { + trigger = { NOT = { has_trait = wrathful } } + root = { + send_interface_toast = { + left_icon = scope:fighting_child + title = martial_authority_child_trait_gain + scope:fighting_child = { add_trait = wrathful } + } + } + } + } + } + } + 40 = { + desc = martial_authority.8000.tt + custom_tooltip = martial_authority.8000.a.tt + trigger_event = { + id = martial_authority.8100 + days = { 3 4 } + } + } + } + } + + option = { + name = martial_authority.8000.b + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -2 + ai_boldness = 2 + } + } + random_list = { + 10 = { + desc = martial_authority.8000.tt + modifier = { + factor = 2 + scope:fighting_child = { + has_trait = brave + } + } + scope:fighting_child = { + add_martial_skill = 2 + } + trigger_event = { + id = martial_authority.8100 + days = { 3 4 } + } + } + 30 = { + desc = martial_authority.8000.tt.failure + modifier = { + factor = 2 + scope:fighting_child = { + OR = { + has_trait = clubfooted + has_trait = hunchbacked + has_trait = dwarf + has_trait = incapable + has_trait = blind + has_trait = one_eyed + has_trait = disfigured + } + } + } + scope:fighting_child = { + custom_tooltip = martial_authority.8000_injury + hidden_effect = { + random_list = { + 10 = { + trigger = { NOT = { has_trait = one_eyed } } + add_trait = one_eyed + hidden_effect = { + root = { + send_interface_toast = { + left_icon = scope:fighting_child + title = martial_authority_one_eyed_child_title + custom_tooltip = martial_authority_one_eyed_child + } + } + } + } + + 10 = { + trigger = { NOT = { has_trait = disfigured } } + add_trait = disfigured + hidden_effect = { + root = { + send_interface_toast = { + left_icon = scope:fighting_child + title = martial_authority_disfigured_child_title + custom_tooltip = martial_authority_disfigured_child + } + } + } + } + } + } + } + } + 30 = { + desc = martial_authority.8000.tt.failure + custom_tooltip = martial_authority_unremarkable_child + hidden_effect = { + send_interface_toast = { + left_icon = scope:fighting_child + title = martial_authority_unremarkable_child_title + custom_tooltip = martial_authority_unremarkable_child + } + } + } + } + } + option = { + name = martial_authority.8000.c + trigger = { + scope:fighting_child = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + } + scope:fighting_child = { + add_opinion = { + target = root + opinion = -15 + modifier = neglected_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + option = { + name = martial_authority.8000.d + trigger = { + scope:fighting_child = { NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } } + } + scope:fighting_child = { + add_opinion = { + target = root + opinion = -15 + modifier = neglected_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +martial_authority.8100 = { # Your heir kills one of your knights + type = character_event + title = martial_authority.8000.t + desc = martial_authority.8100.desc + theme = martial_authority_focus + left_portrait = { + character = scope:marshal + animation = worry + } + right_portrait = { + character = scope:fighting_child + animation = happiness + } + lower_left_portrait = { + character = scope:murdered_knight + } + override_background = { + reference = army_camp + } + trigger = { + any_knight = { + is_available = yes + is_ai = yes + this != scope:marshal + } + scope:marshal = { is_available = yes } + scope:fighting_child = { is_available = yes } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_knight = { + limit = { + is_available = yes + is_ai = yes + this != scope:marshal + } + weight = { + base = 1 + modifier = { + add = 8 + prowess <15 + } + modifier = { + add = 20 + prowess <10 + } + } + save_scope_as = murdered_knight + } + player_heir = { + add_trait = lifestyle_blademaster + if = { + limit = { + NOR = { + has_trait = wrathful + has_trait = sadistic + } + } + add_stress = major_stress_gain + } + } + scope:murdered_knight = { + death = { + killer = scope:fighting_child + death_reason = death_duel + } + } + every_knight = { + custom = custom.every_knight + add_opinion = { + target = scope:fighting_child + opinion = -40 + modifier = hate_opinion + } + } + scope:marshal = { + add_opinion = { + target = scope:fighting_child + opinion = -40 + modifier = hate_opinion + } + } + } + + option = { #Good work! + name = martial_authority.8100.a + add_dread = medium_dread_gain + scope:fighting_child = { + add_opinion = { + target = root + opinion = 30 + modifier = supportive_parent + } + } + scope:marshal = { + add_opinion = { + target = root + opinion = -10 + modifier = insult_opinion + } + } + every_knight = { + custom = custom.every_knight + add_opinion = { + target = root + opinion = -20 + modifier = insult_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + } + } + } + + option = { #Good god! + name = martial_authority.8100.c + add_dread = medium_dread_loss + scope:marshal = { + add_opinion = { + target = root + opinion = 5 + modifier = respect_opinion + } + } + every_knight = { + custom = custom.every_knight + add_opinion = { + target = root + opinion = 5 + modifier = respect_opinion + } + } + scope:fighting_child = { + add_opinion = { + target = root + opinion = -15 + modifier = insult_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 3 + } + } + } +} diff --git a/N3OW/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt b/N3OW/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt new file mode 100644 index 00000000..6a9b71a8 --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/martial_chivalry_events.txt @@ -0,0 +1,4562 @@ +#Events for chivalry lifestyle focus + +#CHIVALRY REGULAR EVENTS + # 0001 - A practice duel gone terribly wrong, Peter Vilberg + # 0002-0007 - Horse Riding Accident, by Petter Vilberg + # 0010 - Train with your signature weapon, by Linnéa Thimrén + # 1011-1012 - Find an old castle, by Linnéa Thimrén + # 1021 - Stress triggers bad battle practice + # 2010 - Practice duel (Prowess skill challenge), Petter Vilberg + # 3000-3005 - Vassal struggling to train new recruits, Sean Hughes + # 4000 - A Ride at Midnight, by Jason Cantalini + # 4000-4001/5000? - (FP2) A Bard For A King By Hugo Cortell + # 5000 - Rumors about you sleeping with your liege's spouse, Veronica Pazos + # 6000-6003 - You find an abandoned church, Veronica Pazos + +#CHIVALRY SPECIAL EVENTS + # 1201-1204 - Mounted Warrior Practice, by Petter Vilberg + # 1601-1699 - Train a warhorse, by Linnéa Thimrén + + +############################ +# CHIVALRY: REGULAR EVENTS # +############################ + +namespace = martial_chivalry + +#A practice duel gone terribly wrong + #by Petter Vilberg +martial_chivalry.0001 = { + type = character_event + title = martial_chivalry.0001.t + desc = { + desc = martial_chivalry.0001.opening + first_valid = { + triggered_desc = { + trigger = { + prowess < scope:duel_opponent.prowess + } + desc = martial_chivalry.0001.hard_fight + } + triggered_desc = { + desc = martial_chivalry.0001.easy_fight + } + } + desc = martial_chivalry.0001.conclusion + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + + left_portrait = { + character = root + animation = celebrate_wooden_sword + } + right_portrait = { + character = scope:duel_opponent + animation = wrestling_yield_start + } + + trigger = { + NOT = { has_character_flag = had_duel_gone_wrong_event } + } + + weight_multiplier = { + base = 1 + modifier = { #More likely to occur if the character has a little Dread + add = 1 + dread > 10 + } + modifier = { #More likely if you are into duels + add = 2 + has_trait = lifestyle_blademaster + } + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + add_character_flag = { + flag = had_duel_gone_wrong_event + days = 3650 + } + hidden_effect = { + create_character = { + location = root.capital_province + save_scope_as = duel_opponent + trait = brave + trait = wrathful + culture = root.culture + faith = root.faith + gender_female_chance = root_soldier_female_chance + prowess = 15 + } + } + } + + option = { #This person could serve me well! + name = martial_chivalry.0001.a + add_courtier = scope:duel_opponent + reverse_add_opinion = { + modifier = duel_mutual_respect_opinion + target = scope:duel_opponent + } + add_opinion = { + modifier = duel_mutual_respect_opinion + target = scope:duel_opponent + } + stress_impact = { + sadistic = minor_stress_impact_gain + paranoid = major_stress_impact_gain + vengeful = medium_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.25 + ai_vengefulness = -1 + ai_rationality = 0.5 + } + } + } + + option = { #Lecture them on honor + name = martial_chivalry.0001.b + add_prestige = medium_prestige_gain + add_piety = medium_piety_gain + stress_impact = { + sadistic = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + paranoid = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 2 + ai_compassion = 1 + ai_energy = -0.25 + ai_boldness = -0.25 + } + } + } + + option = { #Kill them + name = martial_chivalry.0001.c + scope:duel_opponent = { + death = { + death_reason = death_duel + killer = root + } + } + add_dread = medium_dread_gain + stress_impact = { + forgiving = major_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + ai_rationality = -0.25 + ai_zeal = 0.25 + ai_energy = 0.25 + } + } + } + + after = { + hidden_effect = { add_focus_progress = standard_lifestyle_focus_progress } + scope:duel_opponent = { + silent_disappearance_ai_effect = yes + } + } +} + + +#Horse Riding Accident + #by Petter Vilberg +martial_chivalry.0002 = { + type = character_event + title = martial_chivalry.0002.t + desc = martial_chivalry.0002.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = jockey_gallop + camera = camera_event_horse_left + } + + trigger = { + NOT = { has_character_flag = had_horseriding_accident_event } + } + + weight_multiplier = { + base = 1 + #Less and less likely the more hurt you already are. + modifier = { + add = -0.5 + has_trait_rank = { + trait = wounded + rank = 1 + } + } + modifier = { + add = -0.8 + has_trait_rank = { + trait = wounded + rank = 1 + } + } + modifier = { + add = -1 + has_trait_rank = { + trait = wounded + rank = 3 + } + } + modifier = { #You really shouldn't go riding if you're wounded, but if you insist, my lord. + add = 0.5 + has_trait = wounded + has_trait = stubborn + } + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + add_character_flag = { + flag = had_horseriding_accident_event + days = 3650 + } + } + + option = { #Try to stay on the horse! + name = martial_chivalry.0002.a + duel = { + skill = prowess + value = high_skill_rating + 20 = { + desc = martial_chivalry.0002.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -19 + } + show_as_tooltip = { + add_martial_lifestyle_xp = medium_lifestyle_experience + add_character_modifier = { + modifier = improved_horse_mastery_modifier + days = 3650 + } + } + hidden_effect = { + trigger_event = martial_chivalry.0003 #Gain an improved horse mastery modifier + } + } + 20 = { + desc = martial_chivalry.0002.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -19 + } + show_as_tooltip = { + increase_wounds_effect = { + REASON = horse_riding_accident + } + } + hidden_effect = { + trigger_event = { #Things don't go well + on_action = horse_riding_accident_outcome + } + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -50 + has_trait_rank = { + trait = wounded + rank >= 2 + } + } + ai_value_modifier = { + ai_boldness = 0.5 + ai_energy = 0.5 + } + } + } + + option = { #Make for a safe - if humble - landing + name = martial_chivalry.0002.b + add_prestige = miniscule_prestige_loss + stress_impact = { + arrogant = minor_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 50 + } + } +} + + +#You successfully rein in the horse and stay atop! +martial_chivalry.0003 = { + type = character_event + title = martial_chivalry.0003.t + desc = martial_chivalry.0003.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = jockey_walk + camera = camera_event_horse_left + } + + + immediate = { + add_character_modifier = { + modifier = improved_horse_mastery_modifier + days = 3650 + } + + #Chance at starting the warhorse story? + hidden_effect = { + random = { + chance = 25 + compare_modifier = { + value = prowess + multiplier = 2 + } + save_scope_value_as = { + name = warhorse + value = yes + } + } + } + } + + option = { #I made it! + name = martial_chivalry.0003.a + add_martial_lifestyle_xp = medium_lifestyle_experience + + ai_chance = { + base = 50 + } + } + + option = { #I made it! Start warhorse story + name = martial_chivalry.0003.b + trigger = { + exists = scope:warhorse + NOR = { + has_character_flag = had_event_martial_chivalry_special_1601 + has_character_flag = had_warhorse_story + } + } + add_martial_lifestyle_xp = medium_lifestyle_experience + + start_warhorse_story_cycle_effect = yes + + stress_impact = { + base = minor_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + } + } +} + +#You fall to the ground, hurting yourself a little +martial_chivalry.0004 = { + type = character_event + title = martial_chivalry.0004.t + desc = martial_chivalry.0004.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = scope:duel_opponent + animation = pain + } + + trigger = { + NOT = { + has_trait_rank = { + trait = wounded + rank > 0 + } + } + } + + immediate = { + increase_wounds_effect = { + REASON = horse_riding_accident + } + } + + option = { #Damn horse! + name = martial_chivalry.0004.a + } +} + +#You fall to the ground, hurting yourself severely +martial_chivalry.0005 = { + type = character_event + title = martial_chivalry.0005.t + desc = martial_chivalry.0005.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = scope:duel_opponent + animation = pain + } + + + trigger = { + has_trait_rank = { + trait = wounded + rank = 1 + } + } + + immediate = { + increase_wounds_effect = { + REASON = horse_riding_accident + } + } + + option = { #Damn horse! + name = martial_chivalry.0005.a + } +} + +#You fall to the ground, nearly killing yourself +martial_chivalry.0006 = { + type = character_event + title = martial_chivalry.0006.t + desc = martial_chivalry.0006.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = scope:duel_opponent + animation = pain + } + + + trigger = { + has_trait_rank = { + trait = wounded + rank = 2 + } + } + + immediate = { + increase_wounds_effect = { + REASON = horse_riding_accident + } + } + + option = { #Damn horse! + name = martial_chivalry.0006.a + } +} + +#You fall to the ground, dying +martial_chivalry.0007 = { + type = character_event + title = martial_chivalry.0007.t + desc = martial_chivalry.0007.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = scope:duel_opponent + animation = pain + } + + trigger = { + has_trait_rank = { + trait = wounded + rank = 3 + } + } + + option = { #Damn horse, for real this time!! + name = martial_chivalry.0007.a + increase_wounds_effect = { + REASON = horse_riding_accident + } + } +} + + +#Train with your signature weapon + #by Linnéa Thimrén +martial_chivalry.0010 = { + type = character_event + title = martial_chivalry.0010.t + desc = martial_chivalry.0010.desc + + theme = martial_chivalry_focus + override_background = { + reference = armory + } + left_portrait = { + character = root + animation = personality_cynical + } + + artifact = { # To display the artifact in the event-window + target = root.var:signature_weapon_scope + position = lower_center_portrait + trigger = { exists = root.var:signature_weapon_scope } + } + + trigger = { + NOT = { has_character_flag = had_event_martial_chivalry_0010 } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_chivalry_0010 + days = 3650 + } + set_signature_weapon_effect = yes + } + + option = { + name = martial_chivalry.0010.a + hidden_effect = { add_focus_progress = standard_lifestyle_focus_progress } + add_character_modifier = { + modifier = respected_expertise + } + + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait_rank = { + trait = wounded + rank >= 2 + } + } + } + } + + option = { + name = martial_chivalry.0010.b + hidden_effect = { add_focus_progress = standard_lifestyle_focus_progress } + random_list = { + 70 = { + desc = martial_chivalry.0010.b.tt1 + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.0010.b.tt1 + left_icon = root + add_prestige = minor_prestige_gain + add_martial_lifestyle_xp = medium_lifestyle_experience + } + } + 30 = { + desc = martial_chivalry.0010.b.tt2 + send_interface_toast = { + type = event_toast_effect_bad + title = martial_chivalry.0010.b.tt2 + left_icon = root + increase_wounds_effect = { REASON = training_accident } + add_martial_lifestyle_xp = minor_lifestyle_experience + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.25 + } + } + } +} + + +#Find an old castle, rt craven/at brave/prowess/gold or stress + #by Linnéa Thimrén + +martial_chivalry.1011 = { + type = character_event + title = martial_chivalry.1011.t + desc = martial_chivalry.1011.desc + + theme = martial_chivalry_focus + override_background = { + reference = terrain + } + left_portrait = { + character = root + animation = survey + } + + trigger = { + NOT = { has_character_flag = had_haunted_castle_event } + + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + hidden_effect = { + get_quirk_character_effect = yes + } + add_character_flag = { + flag = had_haunted_castle_event + days = 3650 + } + } + + option = { + name = martial_chivalry.1011.a + stress_impact = { + craven = minor_stress_impact_gain + } + custom_tooltip = martial_chivalry.1011.a.tt + trigger_event = { + id = martial_chivalry.1012 + } + ai_chance = { + base = 50 + modifier = { + factor = 0.5 + has_trait = brave + } + } + } + + option = { + name = martial_chivalry.1011.b + add_character_modifier = { + modifier = hightened_troop_morale_modifier + days = 3650 + } + ai_chance = { + base = 50 + modifier = { + factor = 0.5 + has_trait = craven + } + } + } +} + +#You went inside, search cellar or upper floors? +martial_chivalry.1012 = { + type = character_event + title = martial_chivalry.1012.t + desc = martial_chivalry.1012.desc + + theme = martial_chivalry_focus + override_background = { + reference = corridor_night + } + left_portrait = { + character = root + animation = personality_cynical + } + + option = { + name = martial_chivalry.1012.a + ai_chance = { + base = 50 + modifier = { + factor = 0.5 + has_trait = greedy + } + } + duel = { + skill = stewardship + value = average_skill_rating + + 50 = { + desc = martial_chivalry.1012.a.success + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.1012.a.success + left_icon = root + add_gold = major_gold_value + } + } + 50 = { + desc = martial_chivalry.1012.a.failure + + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = martial_chivalry.1012.a.failure + left_icon = root + add_gold = minor_gold_value + } + } + } + } + + option = { + name = martial_chivalry.1012.b + ai_chance = { + base = 50 + modifier = { + factor = 0.5 + has_trait = brave + } + } + random_list = { + 50 = { + desc = martial_chivalry.1012.b.success + + compare_modifier = { + value = ai_boldness + multiplier = 0.5 + min = -49 + } + + if = { + limit = { + AND = { + is_ai = no #no ai should be able to gain brave- to keep the type of characters in the game diverse + stress <= 25 + NOT = { has_trait = brave } + number_of_personality_traits <= 3 + } + } + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.1012.b.success + left_icon = root + add_trait_force_tooltip = brave + } + } + else_if = { + limit = { + OR = { + number_of_personality_traits = 4 + is_ai = yes + stress > 25 + has_trait = brave + } + } + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.1012.b.success + left_icon = root + add_character_modifier = { + modifier = faced_my_fears + years = 10 + } + } + } + } + 50 = { + desc = martial_chivalry.1012.b.tt1 + + compare_modifier = { + value = ai_boldness + multiplier = -0.5 + min = -49 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = martial_chivalry.1012.b.failure + left_icon = root + add_dread = medium_dread_loss + stress_impact = { + base = medium_stress_gain + } + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + } + } +} + +#Stress triggers bad battle practice + #by Linnéa Thimrén +martial_chivalry.1021 = { + type = character_event + title = martial_chivalry.1021.t + desc = martial_chivalry.1021.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + scripted_animation = duel_wield_weapon + } + + trigger = { + is_available_healthy_adult = yes + stress > 60 + NOT = { has_character_flag = had_stressful_battle_event } + } + + weight_multiplier = { + base = 1 + compare_modifier = { + target = root + value = stress + multiplier = 0.01 # 1.4 total @ 100 Stress, 3.4 total @ 300 Stress. + offset = -60 + } + modifier = { + factor = 0.5 + has_trait_rank = { + trait = wounded + rank = 1 + } + } + modifier = { + factor = 0.2 + has_trait_rank = { + trait = wounded + rank = 2 + } + } + modifier = { + factor = 0 + has_trait_rank = { + trait = wounded + rank = 3 + } + } + modifier = { + add = 0.5 + has_trait = wounded + has_trait = stubborn + } + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + add_character_flag = { + flag = had_stressful_battle_event + days = 3650 + } + add_character_flag = { + flag = single_combat_duel_armor + days = 30 # just in case + } + } + + option = { + name = martial_chivalry.1021.b + add_martial_lifestyle_xp = medium_lifestyle_experience + stress_impact = { + craven = minor_stress_impact_gain + } + + duel = { + skill = prowess + value = average_skill_rating + + 50 = { + desc = martial_chivalry.1021.b.success + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -19 + } + + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.1021.b.success + left_icon = root + add_character_modifier = { + modifier = respected_vigor + years = 5 + } + } + } + 20 = { + desc = martial_chivalry.1021.b.failure + + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -19 + } + compare_modifier = { + value = stress + multiplier = 0.5 # +30 at 60 Stress; +150 at 300 Stress + } + + send_interface_toast = { + type = event_toast_effect_bad + title = martial_chivalry.1021.b.failure + left_icon = root + increase_wounds_effect = { REASON = training_accident } + } + } + } + + ai_chance = { + base = 50 + modifier = { + add = 20 + OR = { + has_trait = brave + has_trait = aggressive_attacker + } + } + } + } + + option = { + name = martial_chivalry.1021.a + stress_impact = { + base = medium_stress_impact_loss + craven = minor_stress_impact_loss + brave = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + ai_chance = { + base = 50 + } + } + + after = { remove_character_flag = single_combat_duel_armor } +} + +#Practice duel + #by Petter Vilberg +#Someone challenges you +martial_chivalry.2010 = { + type = character_event + title = martial_chivalry.2010.t + desc = { + desc = martial_chivalry.2010.start.desc + first_valid = { + triggered_desc = { + trigger = { + reverse_opinion = { + target = scope:challenger + value >= 0 + } + } + desc = martial_chivalry.2010.like.desc + } + desc = martial_chivalry.2010.dislike.desc + } + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + scripted_animation = duel_wield_weapon + outfit_tags = { military_outfit } + } + right_portrait = { + character = scope:challenger + animation = personality_bold + outfit_tags = { military_outfit } + } + + trigger = { + NOT = { has_character_flag = had_event_martial_chivalry_2010 } + NOT = { + has_trait_rank = { + trait = wounded + rank > 1 + } + } + OR = { + any_relation = { + type = soldier_friend + is_available_healthy_ai_adult = yes + } + any_knight = { + is_available_healthy_ai_adult = yes + } + any_relation = { type = rival + target_is_liege_or_above = root + is_available_healthy_ai_adult = yes + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = -0.5 + has_trait_rank = { + trait = wounded + rank = 1 + } + } + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_chivalry_2010 + years = 5 + } + hidden_effect = { + random_list = { + 40 = { + trigger = { + any_relation = { + type = soldier_friend + is_available_healthy_ai_adult = yes + } + } + random_relation = { type = soldier_friend + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = challenger + } + } + 30 = { + trigger = { + any_knight = { + is_available_healthy_ai_adult = yes + } + } + random_knight = { + limit = { + is_available_healthy_ai_adult = yes + } + save_scope_as = challenger + } + } + 30 = { + trigger = { + any_relation = { type = rival + is_available_healthy_ai_adult = yes + OR = { + is_knight_of = root + is_knight_of = root.liege + target_is_liege_or_above = root + } + } + } + random_relation = { + type = rival + limit = { + is_available_healthy_ai_adult = yes + OR = { + is_knight_of = root + is_knight_of = root.liege + target_is_liege_or_above = root + } + } + save_scope_as = challenger + } + } + } + + scope:challenger = { set_signature_weapon_effect = yes } + set_signature_weapon_effect = yes + } + } + + option = { #Accept challenge + name = martial_chivalry.2010.a + + duel = { + skill = prowess + target = scope:challenger + 20 = { #You have the advantage + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -19 + } + desc = martial_chivalry.2010.a.success.tt + trigger_event = martial_chivalry.2011 + show_as_tooltip = { + add_martial_lifestyle_xp = medium_lifestyle_experience + add_character_modifier = { + modifier = won_practice_duel + years = 5 + } + } + } + 20 = { #They have the advantage (they are nice), mutually exclusive with other failure + trigger = { + reverse_opinion = { + target = scope:challenger + value >= 0 + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -19 + } + show_as_tooltip = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + trigger_event = martial_chivalry.2012 #They're nice about their advantage + desc = martial_chivalry.2010.a.failure1.tt + } + 20 = { #They have the advantage (they are an ass), mutually exclusive with other failure + trigger = { + reverse_opinion = { + target = scope:challenger + value < 0 + } + } + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -19 + } + desc = martial_chivalry.2010.a.failure2.tt + trigger_event = martial_chivalry.2013 #They're an ass about their advantage + show_as_tooltip = { + increase_wounds_effect = { REASON = training_accident } + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 75 + + modifier = { + has_trait = brave + add = 75 + } + } + } + + option = { #Decline challenge + name = martial_chivalry.2010.b + + if = { + limit = { + reverse_opinion = { + target = scope:challenger + value < 0 + } + } + add_prestige = minor_prestige_loss + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + } + else = { + add_prestige = miniscule_prestige_loss + stress_impact = { + brave = medium_stress_impact_gain + } + } + scope:challenger = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -10 + } + } + + ai_chance = { + base = 25 + + modifier = { + has_trait = lazy + add = 50 + } + modifier = { + has_trait = craven + add = 100 + } + modifier = { + has_trait = wounded + add = 200 + } + } + } +} + +#You gained the upper hand in the mock duel +martial_chivalry.2011 = { + type = character_event + title = martial_chivalry.2011.t + desc = { + desc = martial_chivalry.2011.start.desc + desc = martial_chivalry.2011.end.desc + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:challenger + animation = fear + } + + immediate = { + show_as_tooltip = { + add_martial_lifestyle_xp = medium_lifestyle_experience + add_character_modifier = { + modifier = won_practice_duel + years = 5 + } + } + } + + option = { #You end the duel gracefully + name = martial_chivalry.2011.a + + add_prestige = minor_prestige_gain + reverse_add_opinion = { + target = scope:challenger + modifier = honorable_duelist + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.25 + } + } + } + + option = { #You humiliate them + name = martial_chivalry.2011.b + + add_dread = minor_dread_gain + + scope:challenger = { + increase_wounds_effect = { REASON = training_accident } + add_opinion = { + target = root + modifier = dishonorable_duelist + } + add_prestige = medium_prestige_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.25 + } + } + } +} + +#The challenger gains the upper hand in the mock duel +martial_chivalry.2012 = { + type = character_event + title = martial_chivalry.2012.t + desc = { + desc = martial_chivalry.2011.start.desc + desc = martial_chivalry.2012.end.desc + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = wrestling_yield_start + } + right_portrait = { + character = scope:challenger + scripted_animation = duel_celebrate + } + + immediate = { + add_martial_lifestyle_xp = minor_lifestyle_experience + } + + option = { #Yield + name = martial_chivalry.2012.a + + reverse_add_opinion = { + target = scope:challenger + modifier = honorable_duelist + } + + stress_impact = { + brave = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + } + + ai_chance = { + base = 75 + } + } + + option = { #Keep fighting + name = martial_chivalry.2012.b + + duel = { + skill = prowess + target = scope:challenger + 10 = { #You win + compare_modifier = { + value = scope:duel_value + multiplier = 1 + min = -9 + } + desc = martial_chivalry.2010.a.success.tt + trigger_event = martial_chivalry.2014 + show_as_tooltip = { + add_martial_lifestyle_xp = medium_lifestyle_experience + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = won_practice_duel + years = 5 + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -19 + } + desc = martial_chivalry.2010.a.failure2.tt + trigger_event = martial_chivalry.2015 + show_as_tooltip = { + increase_wounds_effect = { REASON = training_accident } + add_prestige = medium_prestige_loss + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + } + + ai_chance = { + base = 25 + } + } +} + +#The challenger gains the upper hand in the practice duel and they're being an ass about it! +martial_chivalry.2013 = { + type = character_event + title = martial_chivalry.2013.t + desc = { + desc = martial_chivalry.2011.start.desc + desc = martial_chivalry.2013.end.desc + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = wrestling_yield_start + } + right_portrait = { + character = scope:challenger + scripted_animation = duel_celebrate + } + + option = { + name = martial_chivalry.2013.a + + increase_wounds_effect = { REASON = training_accident } + add_prestige = medium_prestige_loss + add_opinion = { + target = scope:challenger + modifier = dishonorable_duelist + } + } +} + +#You won the duel, what a miracle! +martial_chivalry.2014 = { + type = character_event + title = martial_chivalry.2014.t + desc = martial_chivalry.2014.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:challenger + animation = wrestling_yield_start + } + + option = { + name = martial_chivalry.2014.a + + add_martial_lifestyle_xp = medium_lifestyle_experience + add_prestige = minor_prestige_gain + add_character_modifier = { + modifier = won_practice_duel + years = 5 + } + + } +} + +#You make a fool of yourself... +martial_chivalry.2015 = { + type = character_event + title = martial_chivalry.2015.t + desc = martial_chivalry.2015.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:challenger + scripted_animation = duel_celebrate + } + + option = { + name = martial_chivalry.2015.a + + increase_wounds_effect = { REASON = training_accident } + add_prestige = medium_prestige_loss + } +} + + +################################################################ +# "A Bard For A King" By Hugo Cortell +# Originally an FP2 event, but reworked into martial lifestyle +# 5000 - 5000 +################################################################ +martial_chivalry.5100 = { + type = character_event + title = fp2_struggle.2023.t + desc = fp2_struggle.2023.desc + theme = martial_chivalry_focus # prev. friendly + override_background = { reference = army_camp } + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:fp2_2023_enemy_knight + animation = ecstasy + } + lower_right_portrait = scope:fp2_2023_foreign_king + + trigger = { + has_fp2_dlc_trigger = yes # Part of FP2 DLC + any_neighboring_top_liege_realm_owner = { + this != ROOT + any_knight = { + is_available_ai_adult = yes + is_landed = no + } + } + } + + immediate = { + add_character_flag = single_combat_duel_armor # Visuals + random_neighboring_top_liege_realm_owner = { + limit = { + this != ROOT + any_knight = { + is_available_ai_adult = yes + is_landed = no + } + } + save_scope_as = fp2_2023_foreign_king + random_knight = { + limit = { + is_available_ai_adult = yes + is_landed = no + } + save_scope_as = fp2_2023_enemy_knight + } + } + } + + option = { # Fool! Do you know who you are speaking to? + name = fp2_struggle.2023.a.a + flavor = fp2_struggle.2023.a.desc + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2023.a.a + left_icon = root + right_icon = scope:fp2_2023_enemy_knight + + reverse_add_opinion = { + target = scope:fp2_2023_enemy_knight + modifier = refusal_opinion + opinion = -30 + } + add_prestige = minor_prestige_gain + add_dread = minor_dread_gain + } + + remove_character_flag = single_combat_duel_armor + } + + option = { # I will write mocking poetry against your liege + name = fp2_struggle.2023.b + flavor = fp2_struggle.2023.b.desc + + duel = { + skill = learning + value = scope:fp2_2023_enemy_knight.learning + + 10 = { # Failure Outcome + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + modifier = { + add = 20 + has_trait = lifestyle_poet + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2023.b.b + left_icon = root + + add_dread = medium_dread_loss + remove_short_term_gold = minor_gold_value + } + } + 10 = { # Success Outcome + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + modifier = { + add = 20 + has_trait = lifestyle_poet + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2023.b.a + left_icon = root + + add_prestige = minor_prestige_gain + scope:fp2_2023_foreign_king = { + add_prestige = minor_prestige_loss + add_dread = minor_dread_loss + } + } + } + } + + remove_character_flag = single_combat_duel_armor + } + + option = { # Fight me! (mandatory stabbing option) + name = fp2_struggle.2023.c + flavor = fp2_struggle.2023.c.desc + + custom_tooltip = engage_in_single_combat # removed start_bout_interaction due to it involving board games too + custom_tooltip = fp2_struggle.2023.c.exptooltip + root = { save_scope_as = fp2_2023_root_in_duel } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = scope:fp2_2023_enemy_knight + SC_DEFENDER = root + FATALITY = no + FIXED = no + LOCALE = army_camp + OUTPUT_EVENT = martial_chivalry.5101 + INVALIDATION_EVENT = martial_chivalry.5101 + } + } + + option = { # Drink up! + name = fp2_struggle.2023.d + + if = { # If the player's faith forbids drinking, notify the player to ensure they are not confused about why the cost is there + limit = { religion = religion:islam_religion } + custom_tooltip = action_considered_haram_warning + add_piety = medium_piety_loss + } + + duel = { + skill = prowess + value = scope:fp2_2023_enemy_knight.prowess + + 10 = { # Failure Outcome + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + } + modifier = { + add = -35 + scope:fp2_2023_enemy_knight = { has_trait = drunkard } + } + modifier = { + add = -15 + scope:fp2_2023_enemy_knight = { has_trait = gregarious } + } + modifier = { + add = -10 + scope:fp2_2023_enemy_knight = { has_trait = gluttonous } + } + + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2023.d.a + left_icon = root + + add_prestige = medium_prestige_loss + remove_short_term_gold = minor_gold_value + hidden_effect = { + if = { + limit = { + has_any_nickname = no + has_trait = drunkard + } + random = { + chance = 45 + give_nickname = nick_the_drunkard # A drunk who cannot hold their ale will be made mockery of, good sire! + } + } + } + } + } + 10 = { # Success Outcome + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + } + modifier = { + add = 35 + has_trait = drunkard + } + modifier = { + add = 15 + has_trait = gregarious + } + modifier = { + add = 10 + has_trait = gluttonous + } + + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2023.d.b + left_icon = root + + reverse_add_opinion = { + target = scope:fp2_2023_enemy_knight + modifier = respect_opinion + opinion = 30 + } + add_prestige = medium_prestige_gain + } + } + } + + remove_character_flag = single_combat_duel_armor + } + + after = { add_martial_lifestyle_xp = minor_lifestyle_experience } # Removed remove_character_flag = single_combat_duel_armor due to issues with duel +} + +martial_chivalry.5101 = { + hidden = yes + immediate = { + if = { + limit = { scope:sc_victor = root } + send_interface_toast = { + type = event_toast_effect_good + title = fp2_struggle.2023.c.a + right_icon = root + + add_prestige = medium_prestige_gain + hidden_effect = { add_martial_lifestyle_xp = minor_lifestyle_experience } # We are adding an extra [minor] EXP, but already gave [minor] in the after + show_as_tooltip = { + add_martial_lifestyle_xp = { # So, to make the numbers add up on the UI, we show a [minor] + the extra [minor], even though we only add one [minor] here + value = minor_lifestyle_experience + add = minor_lifestyle_experience + } + } + } + } + else = { + send_interface_toast = { + type = event_toast_effect_bad + title = fp2_struggle.2023.c.b + right_icon = root + + add_prestige = minor_prestige_loss + remove_short_term_gold = minor_gold_value + show_as_tooltip = { add_martial_lifestyle_xp = minor_lifestyle_experience } # Showing the one you gained before in the after + } + } + + remove_character_flag = single_combat_duel_armor + } +} + + +################################################## +# Poor Commander +# by Sean Hughes +# 3000-3005 +################################################## + +scripted_trigger martial_chivalry_3000_is_valid_commander_trigger = { + can_be_combatant_based_on_gender_trigger = {ARMY_OWNER = root} + is_available_healthy_adult = yes + is_landed = yes + martial <= 9 + any_liege_or_above = { + this = root + } +} + +martial_chivalry.3000 = { + type = character_event + title = martial_chivalry.3000.t + desc = { + desc = martial_chivalry.3000.desc #Standard introduction text for all characters + first_valid = { + triggered_desc = { #Conclusion flavor text for Compassionate characters. + trigger = { has_trait = compassionate } + desc = martial_chivalry.3000.desc.compassionate + } + triggered_desc = { #Conclusion flavor text for Callous characters. + trigger = { has_trait = callous } + desc = martial_chivalry.3000.desc.callous + } + desc = martial_chivalry.3000.desc.fallback #Standard conclusion text for other characters. + } + } + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = compassionate } + animation = personality_compassionate + } + triggered_animation = { + trigger = { has_trait = callous } + animation = disgust + } + animation = disapproval + } + right_portrait = { + character = scope:bad_commander + animation = stress + } + + trigger = { + NOT = { has_character_flag = had_event_martial_chivalry_3000 } #Can only happen once every 5 years. + OR = { + any_vassal = { + martial_chivalry_3000_is_valid_commander_trigger = yes + } + player_heir ?= { + martial_chivalry_3000_is_valid_commander_trigger = yes + } + any_child = { + martial_chivalry_3000_is_valid_commander_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + + modifier = { + add = 0.5 + player_heir ?= { + martial_chivalry_3000_is_valid_commander_trigger = yes + } + } + + modifier = { + add = 0.3 + any_vassal = { + is_powerful_vassal_of = root + martial_chivalry_3000_is_valid_commander_trigger = yes + } + } + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_chivalry_3000 + days = 1825 + } + + save_scope_as = my_liege + + every_child = { + limit = { + martial_chivalry_3000_is_valid_commander_trigger = yes + } + add_to_list = potential_important_people + } + every_heir = { + limit = { + martial_chivalry_3000_is_valid_commander_trigger = yes + } + add_to_list = potential_important_people + } + every_vassal = { + limit = { + martial_chivalry_3000_is_valid_commander_trigger = yes + } + add_to_list = potential_important_people + } + + random_in_list = { + list = potential_important_people + + weight = { + #Because the event can only fire on bad commanders, we need to make sure the event prefers firing on characters the player actually cares about. + base = 10 + modifier = { + is_player_heir_of = root + factor = 10 + } + modifier = { + is_child_of = root + factor = 10 + } + modifier = { + is_powerful_vassal = yes + factor = 5 + } + compare_modifier = { + value = highest_held_title_tier + multiplier = 2 + } + + #Even if the commander is bad, it would be nice if they weren't completely terrible. + compare_modifier = { + value = martial + multiplier = 5 + } + } + save_scope_as = bad_commander + } + } + + + + #Give advice(wanted or not) to the poor commander. + option = { + name = martial_chivalry.3000.b + + add_martial_lifestyle_xp = medium_lifestyle_experience + + #This list is purely to create an informational tooltip for the player; all the actual effects happen in the follow-up events. + random_list = { + desc = martial_chivalry.3000.b.attempt + 1 = { + desc = martial_chivalry.3000.b.tt.s + show_chance = no + show_as_tooltip = { + scope:bad_commander = { + if = { + limit = {martial <= 4} + add_martial_skill = 3 + } + else_if = { + limit = {martial <= 7} + add_martial_skill = 2 + } + else = { + add_martial_skill = 1 + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + } + 1 = { + desc = martial_chivalry.3000.b.tt.f + show_chance = no + show_as_tooltip = { + scope:bad_commander = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + } + } + } + + #Commander responds to advice given. + scope:bad_commander = { + trigger_event = { id = martial_chivalry.3002 days = 3 } + } + + stress_impact = { + shy = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + humble = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + ai_boldness = 0.5 + } + } + } + + #Ignore the poor commander's mediocrity, befriend him instead. + option = { + name = martial_chivalry.3000.c + + show_as_tooltip = { + progress_towards_friend_effect = { + CHARACTER = scope:bad_commander + OPINION = 20 + REASON = friend_encouraged_growth + } + } + + scope:bad_commander = { + hidden_effect = { root = { save_scope_as = my_liege } } + trigger_event = { id = martial_chivalry.3005 days = 3 } + } + + stress_impact = { + shy = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -1 + ai_compassion = 1 + } + } + } + + #Berate the poor commander for his failure. + option = { + name = martial_chivalry.3000.a + + add_dread = minor_dread_gain + + #Only add opinion of other character if we are an AI(As player opinion has no effect). + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:bad_commander + modifier = disappointed_opinion + opinion = -20 + } + } + reverse_add_opinion = { + target = scope:bad_commander + modifier = angry_opinion + opinion = -20 + } + + scope:bad_commander = { + show_as_tooltip = { + add_prestige = medium_prestige_loss + } + + trigger_event = { id = martial_chivalry.3001 days = 3 } + } + + stress_impact = { + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = minor_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -1 + } + } + } +} + +#Bad commander responds to being berrated. +martial_chivalry.3001 = { + type = character_event + title = martial_chivalry.3001.t + desc = { + desc = martial_chivalry.3000.response.desc + desc = martial_chivalry.3001.desc + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = shame + } + right_portrait = { + character = scope:my_liege + animation = anger + } + + immediate = { + show_as_tooltip = { + #Only add opinion of other character if we are an AI(As player opinion has no effect). + scope:my_liege = { + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + } + + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:my_liege + modifier = angry_opinion + opinion = -20 + } + } + + } + #Prestige loss always happens(your liege watched you fail). + add_prestige = medium_prestige_loss + } + + #Punish own troops for Dread. + option = { + name = martial_chivalry.3001.a + add_dread = minor_dread_gain + + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + patient = medium_stress_impact_gain + just = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 100 + ai_compassion = -100 + ai_honor = -100 + } + } + } + + #Use failure as reason to work harder. + option = { + name = martial_chivalry.3001.b + add_character_modifier = { + modifier = warfare_motivated_instructor_modifier + days = 365 + } + + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + content = medium_stress_impact_gain + wrathful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 100 + ai_boldness = 100 + ai_greed = 100 + ai_honor = 200 + } + } + } + + #Accept that you are just a bad commander. + option = { + name = martial_chivalry.3001.c + + stress_impact = { + base = minor_stress_impact_gain + arrogant = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -100 + ai_boldness = -100 + } + } + } +} + +#Bad commander responds to advice given. +martial_chivalry.3002 = { + type = character_event + title = martial_chivalry.3002.t + desc = { + desc = martial_chivalry.3000.response.desc + desc = martial_chivalry.3002.desc + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = interested_left + } + right_portrait = { + character = scope:my_liege + animation = debating + } + + trigger = { + scope:my_liege = { + is_alive = yes + } + } + + #Accept advice gratefully. + option = { + name = martial_chivalry.3002.a + if = { + limit = { martial <= 4 } + add_martial_skill = 3 + save_scope_value_as = { + name = martial_increase + value = 3 + } + } + else_if = { + limit = { martial <= 7 } + add_martial_skill = 2 + save_scope_value_as = { + name = martial_increase + value = 2 + } + } + else = { + add_martial_skill = 1 + save_scope_value_as = { + name = martial_increase + value = 1 + } + } + + #Only add opinion of other character if we are an AI(As player opinion has no effect). + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:my_liege + modifier = grateful_opinion + opinion = low_positive_opinion + } + } + reverse_add_opinion = { + target = scope:my_liege + modifier = pleased_opinion + opinion = low_positive_opinion + } + + scope:my_liege = { + trigger_event = { id = martial_chivalry.3003 days = 1 } + } + + stress_impact = { + arrogant = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + lazy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 100 + ai_rationality = 200 + ai_vengefulness = -100 + ai_energy = 100 + } + } + } + + #Rudly reject advice! + option = { + name = martial_chivalry.3002.b + add_dread = minor_dread_gain + + #Only add opinion of other character if we are an AI(As player opinion has no effect). + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:my_liege + modifier = angry_opinion + opinion = -10 + } + } + reverse_add_opinion = { + target = scope:my_liege + modifier = disappointed_opinion + opinion = -10 + } + + scope:my_liege = { + trigger_event = { id = martial_chivalry.3004 days = 1 } + } + + stress_impact = { + eccentric = medium_stress_impact_loss + diligent = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -200 + ai_vengefulness = 200 + ai_energy = -100 + } + } + } +} + +#Original character hears about the bad commander accepting his advice. +martial_chivalry.3003 = { + type = character_event + title = martial_chivalry.3003.t + desc = { + desc = martial_chivalry.3003.desc.1 + desc = martial_chivalry.3003.desc.2 + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:bad_commander + animation = personality_bold + } + + immediate = { + show_as_tooltip = { + scope:bad_commander = { + if = { + limit = { + scope:martial_increase = 3 + } + add_martial_skill = 3 + } + else_if = { + limit = { + scope:martial_increase = 2 + } + add_martial_skill = 2 + } + else = { + add_martial_skill = 1 + } + } + reverse_add_opinion = { + target = scope:bad_commander + modifier = pleased_opinion + opinion = 20 + } + } + } + + option = { + name = martial_chivalry.3003.a + } +} + +#Original character hears about the bad commander rejecting his advice. +martial_chivalry.3004 = { + type = character_event + title = martial_chivalry.3004.t + desc = martial_chivalry.3004.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = disappointed + } + right_portrait = { + character = scope:bad_commander + animation = anger + } + + immediate = { + show_as_tooltip = { + #Only add opinion of other character if we are an AI(As player opinion has no effect). + if = { + limit = { + is_ai = yes + } + add_opinion = { + target = scope:bad_commander + modifier = angry_opinion + opinion = -10 + } + } + reverse_add_opinion = { + target = scope:bad_commander + modifier = angry_opinion + opinion = -10 + } + } + } + + option = { + name = martial_chivalry.3004.a + } +} + +#Bad commander hears about how nice his liege was to ignore his failure. +martial_chivalry.3005 = { + type = character_event + title = martial_chivalry.3005.t + desc = { + desc = martial_chivalry.3000.response.desc + desc = martial_chivalry.3005.desc + } + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:my_liege + animation = personality_compassionate + } + + immediate = { + progress_towards_friend_effect = { + CHARACTER = scope:my_liege + OPINION = 20 + REASON = friend_encouraged_growth + } + } + + option = { + name = martial_chivalry.3005.a + + add_opinion = { + target = scope:my_liege + modifier = friendliness_opinion + opinion = 20 + } + add_stress = minor_stress_loss + } +} + +################################################## +# A Ride At Midnight +# by Jason Cantalini +################################################## + +scripted_trigger martial_chivalry_4000_raiding_neighbor_trigger = { + highest_held_title_tier >= tier_county + can_raid_trigger = yes + is_ai = yes + NOR = { + this = root + target_is_liege_or_above = root + target_is_vassal_or_below = root + is_allied_to = root + } +} + +martial_chivalry.4000 = { + type = character_event + title = martial_chivalry.4000.t + desc = { + desc = martial_chivalry.4000.desc + # ROOT personality affects the last little bit of the desc + triggered_desc = { + trigger = { + root = { + OR = { + has_trait = lazy + has_trait = craven + has_trait = hashishiyah + has_trait = calm + } + } + } + desc = martial_chivalry.4000.sleepy + } + triggered_desc = { + trigger = { + root = { + NOR = { + has_trait = lazy + has_trait = craven + has_trait = hashishiyah + has_trait = calm + } + } + } + desc = martial_chivalry.4000.angry + } + } + theme = martial_chivalry_focus + left_portrait = { + character = root + animation = anger + } + lower_right_portrait = { + character = scope:raiders + } + cooldown = { + years = 5 + } + + trigger = { + has_focus = martial_chivalry_focus + NOT = { has_character_flag = is_in_martial_special_event } + is_available_healthy_adult = yes + is_landed = yes + highest_held_title_tier <= tier_duchy + highest_held_title_tier > tier_barony + any_knight = { + is_available_ai_adult = yes + } + #All the riding doesn't feel appropriate for a lot of Scandinavia + NOT = { + capital_province = { + geographical_region = ghw_region_scandinavia + } + } + trigger_if = { + limit = { top_liege != this } + any_neighboring_realm_same_rank_owner = { + martial_chivalry_4000_raiding_neighbor_trigger = yes + } + } + trigger_else = { + any_neighboring_top_liege_realm_owner = { + martial_chivalry_4000_raiding_neighbor_trigger = yes + } + } + } + + immediate = { + play_music_cue = "mx_cue_combat_2" + # Who are you riding out with? + root = { add_to_list = your_warriors } + every_knight = { + limit = { + is_available_ai_adult = yes + } + add_to_list = your_warriors + } + # Grab a suitable neighbour + if = { + limit = { + top_liege != this + any_neighboring_realm_same_rank_owner = { + martial_chivalry_4000_raiding_neighbor_trigger = yes + } + } + random_neighboring_realm_same_rank_owner = { + limit = { + martial_chivalry_4000_raiding_neighbor_trigger = yes + } + save_scope_as = raiders + } + } + else = { + random_neighboring_top_liege_realm_owner = { + limit = { + martial_chivalry_4000_raiding_neighbor_trigger = yes + } + save_scope_as = raiders + } + } + } + + option = { + name = martial_chivalry.4000.a + flavor = martial_chivalry_special.4000.a.tt + # Martial challenge as you try to outmaneuvre the thieves + duel = { + skill = martial + value = average_skill_rating + # You get them to flee + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + desc = martial_chivalry_special.4000.a.tt_success + send_interface_toast = { + title = martial_chivalry_special.4000.a.tt_success + left_icon = root + add_martial_lifestyle_xp = medium_lifestyle_experience + add_prestige = minor_prestige_gain + } + } + # You and your knights are beaten + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + desc = martial_chivalry_special.4000.a.tt_failure + hidden_effect = { + random_in_list = { + list = your_warriors + weight = { + base = 1 + modifier = { + add = { + value = prowess + multiply = -2 + } + } + } + increase_wounds_no_death_effect = { REASON = fight } + save_scope_as = wounded + } + } + send_interface_toast = { + title = martial_chivalry_special.4000.a.tt_failure + left_icon = root + custom_tooltip = martial_chivalry_special.4000.a.tt_failure_2 + add_prestige = medium_prestige_loss + capital_county = { + change_county_control = medium_county_control_loss + } + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + } + hidden_effect = { + scope:raiders = { + add_gold = minor_gold_value + add_prestige = minor_prestige_gain + } + } + } + } + stress_impact = { + lazy = major_stress_impact_gain + craven = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.50 + ai_energy = 0.50 + ai_rationality = 0.25 + } + compare_modifier = { + target = root + value = martial + multiplier = 1.5 + } + modifier = { + has_trait = impatient + add = -75 + } + modifier = { + has_trait = lazy + add = -50 + } + modifier = { + has_trait = craven + add = -50 + } + } + } + option = { + name = martial_chivalry.4000.b + flavor = martial_chivalry_special.4000.b.tt + # Prowess challenge as you attack the thieves' leader + duel = { + skill = prowess + value = average_skill_rating + # You slay the insolent boy! + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.1 + } + desc = martial_chivalry_special.4000.b.tt_success + send_interface_toast = { + title = martial_chivalry_special.4000.b.tt_success + left_icon = root + add_martial_lifestyle_xp = medium_lifestyle_experience + add_prestige = medium_prestige_gain + add_dread = medium_dread_gain + scope:raiders = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:raiders } + } + set_relation_potential_rival = scope:raiders + } + create_character_memory = { + type = slew_rustlers + participants = { + sent_rustlers = scope:raiders + } + } + stress_impact = { + vengeful = minor_stress_impact_loss + } + } + } + # You were over-confident + 35 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.1 + min = -33 + } + desc = martial_chivalry_special.4000.b.tt_failure + send_interface_toast = { + title = martial_chivalry_special.4000.b.tt_failure + left_icon = root + increase_wounds_no_death_effect = { REASON = fight } + add_prestige = medium_prestige_loss + capital_county = { + change_county_control = medium_county_control_loss + } + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + } + hidden_effect = { + scope:raiders = { + add_gold = minor_gold_value + add_prestige = minor_prestige_gain + } + } + } + # You get yourself beaten, trampled and humiliated + 5 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.1 + min = -3 + } + desc = martial_chivalry_special.4000.b.tt_critical_failure + add_internal_flag = dangerous + send_interface_toast = { + title = martial_chivalry_special.4000.b.tt_critical_failure + left_icon = root + custom_tooltip = martial_chivalry_special.4000.b.tt_critical_failure_2 + add_prestige = major_prestige_loss + capital_county = { + change_county_control = medium_county_control_loss + } + hidden_effect = { maimed_in_battle_effect = yes } + stress_impact = { + arrogant = major_stress_impact_gain + vengeful = medium_stress_impact_gain + } + } + hidden_effect = { + scope:raiders = { + add_gold = minor_gold_value + add_prestige = minor_prestige_gain + } + } + create_character_memory = { + type = humiliated_by_rustlers + participants = { + sent_rustlers = scope:raiders + } + } + } + } + stress_impact = { + irritable = minor_stress_impact_loss + craven = massive_stress_impact_gain + lazy = massive_stress_impact_gain + forgiving = major_stress_impact_gain + compassionate = major_stress_impact_gain + patient = medium_stress_impact_gain + humble = medium_stress_impact_gain + calm = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 1 + ai_compassion = -0.75 + ai_energy = 0.75 + } + modifier = { + add = -100 + has_trait_rank = { + trait = wounded + rank >= 2 + } + } + modifier = { + has_trait = craven + add = -100 + } + modifier = { + has_trait = arrogant + add = 25 + } + modifier = { + has_trait = irritable + add = 25 + } + modifier = { + has_trait = lazy + add = -100 + } + compare_modifier = { + target = root + value = prowess + multiplier = 1.5 + } + } + } + option = { + name = martial_chivalry.4000.c + flavor = martial_chivalry_special.4000.c.tt + capital_county = { + add_county_modifier = { + modifier = martial_chivalry_stolen_livestock_modifier + years = 5 + } + } + add_prestige = minor_prestige_loss + hidden_effect = { + scope:raiders = { + add_gold = tiny_gold_value + add_prestige = minor_prestige_gain + } + } + stress_impact = { + lazy = minor_stress_impact_loss + impatient = massive_stress_impact_gain + wrathful = massive_stress_impact_gain + vengeful = massive_stress_impact_gain + diligent = major_stress_impact_gain + brave = medium_stress_impact_gain + stubborn = medium_stress_impact_gain + } + ai_chance = { + base = 60 + ai_value_modifier = { + ai_vengefulness = -1 + ai_energy = -1 + ai_boldness = -0.50 + ai_honor = -0.25 + } + modifier = { + has_trait = wrathful + add = -75 + } + modifier = { + has_trait = diligent + add = -50 + } + modifier = { + has_trait = brave + add = -50 + } + modifier = { + has_trait = impatient + add = -50 + } + } + } +} + +################################################## +# Unfounded Rumors +# by Veronica Pazos +# 5000 +################################################## + +scripted_trigger martial_chivalry_5000_is_valid_spouse_trigger = { + is_available_ai_adult = yes + is_attracted_to_gender_of = root + top_liege != this + NOR = { + has_trait = chaste + has_trait = celibate + } + save_temporary_scope_as = spouse_trigger + root = { + is_attracted_to_gender_of = scope:spouse_trigger + } +} + +scripted_trigger martial_chivalry_5000_is_valid_liege_trigger = { + is_available_ai_adult = yes + is_landed = yes + is_married = yes + any_spouse = { + martial_chivalry_5000_is_valid_spouse_trigger = yes + } +} + +martial_chivalry.5000 = { + type = character_event + title = martial_chivalry.5000.t + desc = { + desc = martial_chivalry.5000.intro #Standard introduction text for all characters + first_valid = { + triggered_desc = { #Flavor text for Lustful characters + trigger = { has_trait = lustful } + desc = martial_chivalry.5000.desc.lustful + } + triggered_desc = { #Flavor text for Honest/Chaste characters + trigger = { + OR = { + has_trait = honest + has_trait = chaste + has_trait = celibate + } + } + desc = martial_chivalry.5000.desc.honest_chaste + } + desc = martial_chivalry.5000.desc.fallback #Standard flavor text for other characters + } + desc = martial_chivalry.5000.desc.outro + } + + theme = martial_chivalry_focus + cooldown = { years = 5 } + override_background = { + reference = corridor_night + } + + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = lustful } + animation = happiness + } + animation = stress + } + + right_portrait = { + character = scope:spymaster + animation = worry + } + lower_right_portrait = scope:spouse + + trigger = { + NOT = { has_character_flag = had_event_martial_chivalry_5000 } #adjusts cooldown for this specific character + is_available_healthy_adult = yes + is_landed = yes + has_lifestyle = martial_lifestyle + top_liege != this #you actually have a lieges + accepts_adultery_without_penalty_trigger = no + liege = { #your liege and their spouse meet the conditions + martial_chivalry_5000_is_valid_liege_trigger = yes + any_spouse = { + martial_chivalry_5000_is_valid_spouse_trigger = yes + } + any_powerful_vassal = { #at least one relevant vassal dislikes you a bit + opinion = { + target = root + value <= -10 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { #much more likely to happen if you go around trying to seduce people + add = 1 + has_trait = lustful + } + modifier = { #more likely to happen if someone really dislikes you + add = 0.5 + any_powerful_vassal = { + opinion = { + target = root + value <= -20 + } + } + } + modifier = { #more likely to happen if you have a competent spymaster that finds out about the rumors + add = 0.3 + exists = cp:councillor_spymaster + cp:councillor_spymaster = { + NOT = { is_spouse_of = root } + intrigue >= medium_skill_rating + } + } + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_chivalry_5000 + days = 3650 + } + liege = { + save_scope_as = my_liege + random_spouse = { + limit = { + martial_chivalry_5000_is_valid_spouse_trigger = yes + } + save_scope_as = spouse + } + random_powerful_vassal = { + limit = { + opinion = { + target = root + value <= -10 + } + } + save_scope_as = rumor_spreader + } + } + if = { #someone finds out about these rumors + limit = { + exists = cp:councillor_spymaster + cp:councillor_spymaster = { this != scope:spouse } + } + cp:councillor_spymaster = { save_scope_as = spymaster } + } + else = { + ordered_vassal = { + limit = { + this != scope:spouse + } + order_by = intrigue + save_scope_as = spymaster + } + } + } + + #Deny the rumors immediately + option = { + name = martial_chivalry.5000.a + duel = { + skill = intrigue + target = scope:rumor_spreader + 50 = { + desc = martial_chivalry.5000.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + add_martial_lifestyle_xp = medium_lifestyle_experience #you're being gallant + reverse_add_opinion = { + target = liege + modifier = pleased_opinion + opinion = 10 + } + } + 50 = { + desc = martial_chivalry.5000.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + add_prestige = medium_prestige_loss + reverse_add_opinion = { + target = liege + modifier = suspicion_opinion + opinion = -20 + } + } + } + stress_impact = { + base = medium_stress_impact_gain + honest = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_compassion = 1 + } + } + } + + #Ignore the rumors + option = { + name = martial_chivalry.5000.b + add_prestige = minor_prestige_loss #your reputation is damaged + stress_impact = { + arrogant = medium_stress_impact_gain + honest = medium_stress_impact_gain + chaste = medium_stress_impact_gain + celibate = medium_stress_impact_gain + } + + ai_chance = { + base = 80 + ai_value_modifier = { + ai_compassion = 0.5 + ai_vengefulness = -0.5 + ai_honor = -1 + } + } + } + + #Go talk to your liege yourself + option = { + name = martial_chivalry.5000.c + duel = { + skills = { diplomacy intrigue } + target = scope:my_liege + 50 = { + desc = martial_chivalry.5000.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + reverse_add_opinion = { + target = liege + modifier = pleased_opinion + opinion = 20 + } + reverse_add_opinion = { + target = scope:spouse + modifier = grateful_opinion + opinion = 10 + } + } + 50 = { + desc = martial_chivalry.5000.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + reverse_add_opinion = { + target = liege + modifier = suspicion_opinion + opinion = -30 + } + } + } + stress_impact = { + base = minor_stress_impact_gain + shy = major_stress_impact_gain + craven = major_stress_impact_gain + } + + ai_chance = { + base = 80 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = -0.5 + } + } + } + + #Use the rumors in your favor + option = { + name = martial_chivalry.5000.d + trigger = { + has_trait = lustful + } + flavor = martial_chivalry.5000.d.tt + custom_tooltip = martial_chivalry.5000.d.tt.warning + add_martial_lifestyle_xp = major_lifestyle_experience #you're being _extremely_ gallant (courtly love) + every_scheme = { #you drop everything to pursue her + limit = { + OR = { + scheme_type = befriend + scheme_type = sway + scheme_type = seduce + scheme_type = courting + scheme_type = elope + scheme_type = murder + scheme_type = abduct + scheme_type = claim_throne + scheme_type = fabricate_hook + scheme_type = convert_to_witchcraft + } + } + end_scheme = yes + } + start_scheme = { + target_character = scope:spouse + type = seduce + } + stress_impact = { + honest = major_stress_impact_gain + chaste = major_stress_impact_gain + celibate = major_stress_impact_gain + } + ai_chance = { + base = 200 #high weight since it only triggers if you have the lustful trait + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 1 + ai_compassion = -0.5 + ai_honor = -1 + } + } + } +} + +################################################## +# The Church in the Woods +# by Veronica Pazos +# 6000-6003 +################################################## + +martial_chivalry.6000 = { + type = character_event + title = martial_chivalry.6000.t + desc = martial_chivalry.6000.desc + + theme = martial_chivalry_focus + cooldown = { years = 10 } + override_background = { + reference = terrain + } + left_portrait = { + character = root + animation = shock + } + + trigger = { + NOT = { has_character_flag = had_event_martial_chivalry_6000 } + is_available_healthy_adult = yes + OR = { + AND = { + has_government = landless_adventurer_government + capital_province = { + is_wooded_trigger = yes + } + } + any_sub_realm_county = { + any_county_province = { + is_wooded_trigger = yes + } + } + } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = martial_chivalry_focus } + } + + immediate = { + add_character_flag = had_event_martial_chivalry_6000 #we stop the event from happening to the same character + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + save_scope_as = bishop + } + } + random_sub_realm_county = { + limit = { + any_county_province = { + is_wooded_trigger = yes + } + } + save_scope_as = church_county + random_county_province = { + limit = { is_wooded_trigger = yes } + save_scope_as = church_province #necessary for cool custom loc + } + } + } + + option = { #explore it + name = martial_chivalry.6000.a + custom_tooltip = martial_chivalry.6000.a.tt + stress_impact = { + craven = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + hidden_effect = { + random_list = { + 10 = { #you find a "monster" + trigger_event = martial_chivalry.6001 + modifier = { + factor = 0.3 + prowess >= high_skill_rating + } + } + 10 = { #you find an artifact + trigger_event = martial_chivalry.6002 + modifier = { + factor = 0.3 + OR = { + has_trait = scholar + has_trait = education_learning_3 + has_trait = education_learning_4 + has_trait = education_learning_5 + } + } + } + 5 = { #you find a fair maiden/lad + trigger_event = martial_chivalry.6003 + modifier = { + factor = 1 + OR = { + has_focus = martial_chivalry_focus + has_trait = gallant + } + } + } + } + } + ai_chance = { + base = 50 + modifier = { + factor = 0.5 + has_trait = brave + } + modifier = { + factor = 0.5 + has_focus = martial_chivalry_focus + } + } + } + + option = { #inform the bishop + name = martial_chivalry.6000.b + trigger = { + exists = cp:councillor_court_chaplain + } + add_piety = minor_piety_gain + scope:bishop = { + add_opinion = { + target = ROOT + modifier = trust_opinion + opinion = 20 + } + } + stress_impact = { + brave = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 1.5 + has_trait = zealous + } + } + } + + option = { #leave + name = martial_chivalry.6000.c + if = { + limit = { + is_landed = yes + } + scope:church_county = { + add_county_modifier = { + modifier = ignored_church_modifier + years = 5 + } + } + } + stress_impact = { + craven = minor_stress_impact_loss + brave = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0.5 + has_trait = craven + } + } + } +} + +# You find a "monster" +martial_chivalry.6001 = { + type = character_event + title = martial_chivalry.6001.t + desc = martial_chivalry.6001.desc + + theme = martial_chivalry_focus + override_background = { + reference = temple + } + left_portrait = { + character = root + animation = rage + } + + immediate = { + select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + + option = { #fight! + name = martial_chivalry.6001.a + duel = { + skill = prowess + value = medium_skill_rating + 60 = { + desc = martial_chivalry.6001.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + if = { + limit = { + NOT = { has_trait = forest_fighter } + number_of_commander_traits < commander_trait_limit + } + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.6001.a_success_toast + left_icon = root + add_trait = forest_fighter + } + } + else = { + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.6001.a_success_toast + left_icon = root + add_martial_lifestyle_xp = major_lifestyle_experience + } + } + } + 40 = { + desc = martial_chivalry.6001.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = martial_chivalry.6001.a_failure_toast + left_icon = root + add_martial_lifestyle_xp = medium_lifestyle_experience + increase_wounds_effect = { REASON = wild_animal } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + brave = minor_stress_impact_loss + lazy = medium_stress_impact_gain + weak = medium_stress_impact_gain + physique_bad_2 = medium_stress_impact_gain + physique_bad_3 = major_stress_impact_gain + craven = major_stress_impact_gain + } + } + + option = { #flee + name = martial_chivalry.6001.b + duel = { + skill = intrigue + value = low_skill_rating + 50 = { + desc = martial_chivalry.6001.b_success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + modifier = { + has_trait = athletic + factor = 2 + } + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.6001.b_success_toast + left_icon = root + add_martial_lifestyle_xp = medium_lifestyle_experience + } + } + 50 = { + desc = martial_chivalry.6001.b_failure + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = martial_chivalry.6001.b_failure_toast + left_icon = root + add_martial_lifestyle_xp = minor_lifestyle_experience + increase_wounds_effect = { REASON = wild_animal } + } + } + } + stress_impact = { + base = minor_stress_impact_gain + brave = medium_stress_impact_gain + clubfooted = medium_stress_impact_gain + wheezing = medium_stress_impact_gain + } + } +} + +# You find an artifact +martial_chivalry.6002 = { + type = character_event + title = martial_chivalry.6002.t + desc = martial_chivalry.6002.desc + + theme = martial_chivalry_focus + override_background = { + reference = temple + } + left_portrait = { + character = root + animation = admiration + } + artifact = { + target = scope:church_artifact_scope + position = lower_center_portrait + } + + immediate = { + random_list = { + 50 = { + if = { + limit = { artifacts_use_indian_books_trigger = yes } + create_artifact = { + name = church_artifact_book + description = church_artifact_book_desc + type = journal + visuals = indian_book + modifier = artifact_prowess_1_modifier + modifier = artifact_monthly_piety_gain_per_knight_add_3_modifier + save_scope_as = church_artifact_scope + } + } + else = { + create_artifact = { + name = church_artifact_book + description = church_artifact_book_desc + type = journal + visuals = book + modifier = artifact_prowess_1_modifier + modifier = artifact_monthly_piety_gain_per_knight_add_3_modifier + save_scope_as = church_artifact_scope + } + } + set_variable = church_artifact_book_var + } + 25 = { + create_artifact = { + name = church_artifact_sword + description = church_artifact_sword_desc + type = sword + visuals = sword + modifier = artifact_monthly_piety_gain_per_knight_add_1_modifier + modifier = artifact_prowess_2_modifier + save_scope_as = church_artifact_scope + } + set_variable = church_artifact_sword_var + } + 25 = { + create_artifact = { + name = church_artifact_dagger + description = church_artifact_dagger_desc + type = dagger + visuals = dagger + modifier = artifact_monthly_piety_gain_per_knight_add_2_modifier + modifier = artifact_intrigue_1_modifier + save_scope_as = church_artifact_scope + } + set_variable = church_artifact_dagger_var + } + } + } + + option = { #mine! mine! + name = martial_chivalry.6002.a + if = { + limit = { + OR = { + has_variable = church_artifact_sword_var + has_variable = church_artifact_dagger_var + } + } + add_martial_lifestyle_xp = minor_lifestyle_experience + } + stress_impact = { + generous = medium_stress_impact_gain + } + } + + option = { #study it + name = martial_chivalry.6002.book + custom_tooltip = martial_chivalry.6002.book_tt + trigger = { + has_variable = church_artifact_book_var + } + add_martial_lifestyle_xp = major_lifestyle_experience + stress_impact = { + dull = medium_stress_impact_gain + intellect_bad_1 = medium_stress_impact_gain + intellect_bad_2 = medium_stress_impact_gain + intellect_bad_3 = major_stress_impact_gain + } + } + + option = { #give it to bishop + name = martial_chivalry.6002.b + trigger = { + exists = scope:bishop + scope:bishop = { can_equip_artifact = scope:church_artifact_scope } + } + scope:church_artifact_scope = { + set_owner = scope:bishop + equip_artifact_to_owner_replace = yes + } + add_piety = minor_piety_gain + add_martial_lifestyle_xp = medium_lifestyle_experience + } + + option = { #burn it! + name = martial_chivalry.6002.c + trigger = { + faith = { + has_doctrine = tenet_aniconism + } + } + add_martial_lifestyle_xp = medium_lifestyle_experience + add_piety = medium_piety_gain + } + + after = { + remove_variable = church_artifact_book_var + } +} + +# You find a fair maiden/lad +martial_chivalry.6003 = { + type = character_event + title = martial_chivalry.6003.t + desc = { + desc = martial_chivalry.6003.desc_intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = disfigured + has_trait = beauty_bad + } + } + desc = martial_chivalry.6003.desc_ugly + } + triggered_desc = { + trigger = { + NOR = { + has_trait = disfigured + has_trait = beauty_bad + } + } + desc = martial_chivalry.6003.desc_pretty + } + } + } + + theme = martial_chivalry_focus + override_background = { + reference = temple + } + left_portrait = { + character = root + animation = admiration + } + + immediate = { + dummy_attracted_gender_effect = { TARGET = root } + } + + option = { #help them + name = martial_chivalry.6003.a + duel = { + skill = learning + value = medium_skill_rating + 50 = { + desc = martial_chivalry.6003.a_success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + modifier = { + OR = { + has_trait = forest_fighter + has_trait = jungle_stalker + } + add = 500 + } + modifier = { + OR = { + has_trait = physique_good + has_trait = strong + } + add = 100 + } + send_interface_toast = { + type = event_toast_effect_good + title = martial_chivalry.6003.a_success + left_icon = root + add_martial_lifestyle_xp = major_lifestyle_experience #so gallant! + } + } + 50 = { + desc = martial_chivalry.6003.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + send_interface_toast = { + type = event_toast_effect_bad + title = martial_chivalry.6003.a_failure + left_icon = root + increase_wounds_no_death_effect = { REASON = lost_in_the_forest } + add_martial_lifestyle_xp = minor_lifestyle_experience #you tried + } + } + } + if = { + limit = { + OR = { + has_trait = disfigured + has_trait = beauty_bad + } + } + stress_impact = { + disfigured = medium_stress_impact_gain + beauty_bad_3 = medium_stress_impact_gain + beauty_bad_1 = minor_stress_impact_gain + beauty_bad_2 = minor_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + } + + option = { #ignore + name = martial_chivalry.6003.b + trigger = { + NOR = { + has_trait = zealous + has_trait = lunatic + has_trait = paranoid + has_trait = disfigured + has_trait = beauty_bad + } + } + add_martial_lifestyle_xp = medium_lifestyle_experience + stress_impact = { + craven = minor_stress_impact_loss + trusting = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + brave = medium_stress_impact_gain + gallant = major_stress_impact_gain + } + } + + option = { #a ghost! + name = martial_chivalry.6003.c + trigger = { + OR = { #not adding the ugly traits because you will still think they're a ghost + has_trait = zealous + has_trait = intellect_bad + has_trait = paranoid + } + } + add_piety = medium_piety_gain + stress_impact = { + base = medium_stress_impact_gain + brave = minor_stress_impact_gain + } + } + + option = { #they refuse your help + name = martial_chivalry.6003.d + flavor = martial_chivalry.6003.d_tt + trigger = { + OR = { + has_trait = disfigured + has_trait = beauty_bad + } + } + add_martial_lifestyle_xp = medium_lifestyle_experience + stress_impact = { + base = medium_stress_impact_loss + } + } +} + +############################ +# CHIVALRY: SPECIAL EVENTS # +############################ + +namespace = martial_chivalry_special + + +################################### +# Mounted Warrior Practice Battle # by Petter Vilberg +################################### + +#Watch your knights in mock battle before the stablemaster brings out the horses +martial_chivalry_special.1201 = { + type = character_event + title = martial_chivalry_special.1201.t + desc = martial_chivalry_special.1201.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = interested + } + + trigger = { + OR = { + has_focus = martial_chivalry_focus + AND = { + has_lifestyle = martial_lifestyle + any_maa_regiment = { + OR = { + is_unit_type = light_cavalry + is_unit_type = heavy_cavalry + } + } + } + } + NOT = { has_character_flag = had_event_martial_chivalry_special_1201 } + NOT = { has_character_flag = is_in_martial_special_event } + any_knight = { + is_available_adult = yes + } + } + + immediate = { + add_character_flag = { + flag = is_in_martial_special_event + days = 200 + } + add_character_flag = had_event_martial_chivalry_special_1201 + random_courtier = { + limit = { martial > 9 } + save_scope_as = soldier + } + random_knight = { + limit = { + is_available_adult = yes + } + + weight = { + base = 0 + compare_modifier = { + value = martial + } + compare_modifier = { + factor = martial + } + } + save_scope_as = soldier + } + } + + option = { #Head out for a ride + name = martial_chivalry_special.1201.a + custom_tooltip = martial_lifestyle_perk_indication + hidden_effect = { + trigger_event = { + id = martial_chivalry_special.1202 + days = { 1 5 } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.25 + } + } + } + + option = { #Run the quintain + name = martial_chivalry_special.1201.b + add_character_modifier = { + modifier = mounted_warrior_practice_modifier + days = 1825 + } + remove_character_flag = is_in_martial_special_event + ai_chance = { + base = 50 + modifier = { + add = -50 + has_trait_rank = { + trait = wounded + rank >= 1 + } + } + } + } +} + + +#Planning a charge with your cavalry +martial_chivalry_special.1202 = { + type = character_event + title = martial_chivalry_special.1202.t + desc = martial_chivalry_special.1202.desc + + theme = martial_chivalry_focus + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + right_portrait = { + character = scope:soldier + animation = jockey_idle + camera = camera_event_horse_left + } + + option = { + name = martial_chivalry_special.1202.a + hidden_effect = { + trigger_event = martial_chivalry_special.1203 + } + show_as_tooltip = { + add_martial_lifestyle_perk_points = 1 + } + ai_chance = { + base = 50 + } + } + + option = { + name = martial_chivalry_special.1202.b + duel = { + skill = prowess + value = medium_skill_rating + 20 = { + desc = martial_chivalry_special.1202.b_success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + show_as_tooltip = { + if = { + limit = { + NOT = { has_trait = aggressive_attacker } + number_of_commander_traits < commander_trait_limit + } + add_trait = aggressive_attacker + } + else = { + add_character_modifier = { + modifier = cavalry_charge_exercise_modifier + days = 3650 + } + } + } + hidden_effect = { + trigger_event = martial_chivalry_special.1204 + } + } + 10 = { + desc = martial_chivalry_special.1202.b_failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + type = event_toast_effect_bad + title = martial_chivalry_special.1202.b_failure + left_icon = root + increase_wounds_effect = { REASON = horse_riding_accident } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 25 + NOT = { has_trait = aggressive_attacker } + number_of_commander_traits < commander_trait_limit + } + } + } +} + + + +#Deft maneuvering - you rank up +martial_chivalry_special.1203 = { + type = character_event + title = martial_chivalry_special.1203.t + desc = martial_chivalry_special.1203.desc + + theme = martial_chivalry_focus + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = jockey_gallop + camera = camera_event_horse_left + } + + immediate = { + add_martial_lifestyle_perk_points = 1 + } + + option = { + name = martial_chivalry_special.1203.a + } + + after = { + remove_character_flag = is_in_martial_special_event + } +} + + +#Vicious charge - You improve your cavalry's attack ability +martial_chivalry_special.1204 = { + type = character_event + title = martial_chivalry_special.1204.t + desc = martial_chivalry_special.1204.desc + + theme = martial_chivalry_focus + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = jockey_gallop + camera = camera_event_horse_left + } + + immediate = { + set_signature_weapon_effect = yes + if = { + limit = { + NOT = { has_trait = aggressive_attacker } + number_of_commander_traits < commander_trait_limit + } + add_trait = aggressive_attacker + } + else = { + add_character_modifier = { + modifier = cavalry_charge_exercise_modifier + days = 3650 + } + } + } + + option = { + name = martial_chivalry_special.1204.a + } + + after = { + remove_character_flag = is_in_martial_special_event + } +} + + +################################# +# Train a warhorse, by Linnéa Thimrén +################################# +martial_chivalry_special.1601 = { + type = character_event + title = martial_chivalry_special.1601.t + desc = martial_chivalry_special.1601.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = interested_left + } + + trigger = { + OR = { + has_focus = martial_chivalry_focus + domicile ?= { + has_domicile_building = baggage_train_ample_steeds + } + } + NOR = { + has_character_flag = had_event_martial_chivalry_special_1601 + has_character_flag = had_warhorse_story + } + } + + immediate = { + add_character_flag = { + flag = is_in_martial_special_event + days = 200 + } + add_character_flag = had_event_martial_chivalry_special_1601 + random_dummy_gender_effect = yes #for horse gender + if = { + limit = { + has_royal_court = yes + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = master_of_horse_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = m_horse + } + save_scope_as = horse_owner # in part of the chain, the Master of the horse will become root, so I need to find the same liege + } + } + + option = { #I'll do my best! + name = martial_chivalry_special.1601.a + custom_tooltip = martial_lifestyle_perk_indication + custom_tooltip = martial_chivalry_special.1601.a.tt + trigger_event = { + id = martial_chivalry_special.1603 + days = { 7 10 } + } + ai_chance = { + base = 100 + } + } + + option = { #Call the Master of Horse + name = martial_chivalry_special.1601.d + trigger = { + exists = scope:m_horse + } + scope:m_horse = { + trigger_event = { + id = martial_chivalry_special.1603 + } + } + custom_tooltip = martial_chivalry_special.1601.d.tt + ai_chance = { + base = 100 + } + } + + option = { #Opt out gold + name = martial_chivalry_special.1601.b + add_gold = medium_gold_value + ai_chance = { + base = 0 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } + + option = { #Opt out modifier + name = martial_chivalry_special.1601.c + trigger = { + NOT = { + exists = scope:m_horse + } + } + + add_character_modifier = { + modifier = warfare_stablemaster_tamed_wild_horse_modifier + years = 15 + } + + ai_chance = { + base = 20 + ai_energy_target_modifier = { VALUE = -50 } + } + } +} + + + + +#How will you try to tame the horse? +martial_chivalry_special.1603 = { + type = character_event + title = martial_chivalry_special.1601.t + desc = martial_chivalry_special.1603.desc + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = personality_bold + } + + option = { #Direct approach - prowess/boldness + name = martial_chivalry_special.1603.a + flavor = martial_chivalry_special.1603.a.tt + + hidden_effect = { + random_list = { + 10 = { + #"Guaranteed" success + modifier = { + OR = { + prowess >= very_high_skill_rating + has_trait = brave + } + add = 100 + } + #Success increase + modifier = { + add = { + value = prowess + subtract = average_skill_rating + multiply = 2 #10 at high skill + } + } + modifier = { + add = { + value = ai_boldness + divide = high_positive_ai_value + multiply = 10 #10 at high positive value + } + } + save_scope_value_as = { + name = success + value = yes + } + } + 5 = { } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.75 + } + compare_modifier = { + target = root + value = martial + multiplier = 1.5 + } + } + } + + option = { #Get it to trust you - diplomacy/compassion + name = martial_chivalry_special.1603.b + flavor = martial_chivalry_special.1603.b.tt + hidden_effect = { + random_list = { + 10 = { + #"Guaranteed" success + modifier = { + OR = { + diplomacy >= very_high_skill_rating + has_trait = compassionate + } + add = 100 + } + #Success increase + modifier = { + add = { + value = diplomacy + subtract = average_skill_rating + multiply = 2 #10 at high skill + } + } + modifier = { + add = { + value = ai_compassion + divide = high_positive_ai_value + multiply = 10 #10 at high positive value + } + } + save_scope_value_as = { + name = success + value = yes + } + } + 5 = { } + } + } + ai_chance = { + base = 50 + compare_modifier = { + target = root + value = diplomacy + multiplier = 2 + } + compare_modifier = { + target = root + value = intrigue + multiplier = 1 + } + } + } + + option = { #Bribe it - intrigue/generosity + name = martial_chivalry_special.1603.c + flavor = martial_chivalry_special.1603.c.tt + hidden_effect = { + random_list = { + 10 = { + #"Guaranteed" success + modifier = { + OR = { + intrigue >= very_high_skill_rating + has_trait = generous + } + add = 1000 + } + #Success increase + modifier = { + add = { + value = intrigue + subtract = average_skill_rating + multiply = 2 #10 at high skill + } + } + modifier = { + add = { + value = ai_greed + divide = high_negative_ai_value + multiply = 10 #10 at high negative value + } + } + save_scope_value_as = { + name = success + value = yes + } + } + 5 = { } + } + } + ai_chance = { + base = 50 + compare_modifier = { + target = root + value = stewardship + multiplier = 2 + } + compare_modifier = { + target = root + value = intrigue + multiplier = 1 + } + } + } + + after = { + trigger_event = { + id = martial_chivalry_special.1604 + days = { 3 5 } + } + } +} + +#How did it go? Opportunity to start the warhorse story if you did well! +martial_chivalry_special.1604 = { + type = character_event + title = martial_chivalry_special.1601.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:success + } + desc = martial_chivalry_special.1604.desc_success + } + desc = martial_chivalry_special.1604.desc_failure + } + } + + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + trigger = { NOT = { exists = scope:success } } + animation = shame + } + #it should be the left portrait again, but we can't have triggered cameras or 2 left portraits + right_portrait = { + character = root + trigger = { exists = scope:success } + animation = jockey_victory + camera = camera_event_horse_left + } + + option = { + name = martial_chivalry_special.1604.a + trigger = { + exists = scope:success + trigger_if = { + limit = { + exists = scope:m_horse + } + scope:m_horse != root + } + } + + start_warhorse_story_cycle_effect = yes + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + if = { + limit = { scope:dummy_gender = { is_female = yes } } + assign_horse_gender_effect = { GENDER = female } + } + else = { + assign_horse_gender_effect = { GENDER = male } + } + } + add_martial_lifestyle_perk_points = 1 + + ai_chance = { + base = 100 + } + } + + option = { + name = martial_chivalry_special.1604.a_2 + trigger = { + exists = scope:success + trigger_if = { + limit = { + exists = scope:m_horse + } + NOT = { + scope:m_horse = { + this = root + } + } + } + } + + add_character_modifier = { + modifier = warfare_tamer_of_horses_modifier + years = 10 + } + + add_martial_lifestyle_perk_points = 1 + + ai_chance = { + base = 0 + } + } + + option = { + name = martial_chivalry_special.1604.c + trigger = { + exists = scope:success + exists = scope:m_horse + scope:m_horse = { + this = root + } + } + ai_chance = { + base = 100 + } + scope:horse_owner = { + random_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + if = { + limit = { scope:dummy_gender = { is_female = yes } } + assign_horse_gender_effect = { GENDER = female } + } + else = { + assign_horse_gender_effect = { GENDER = male } + } + } + send_interface_message = { + type = event_martial_text_good + left_icon = root + title = martial_chivalry_special.1604.t + desc = martial_chivalry_special.1604.succcess + start_warhorse_story_cycle_effect = yes + } + } + add_martial_lifestyle_perk_points = 1 + } + + option = { + name = martial_chivalry_special.1604.b + trigger = { + NOT = { exists = scope:success } + } + add_character_modifier = { + modifier = warfare_almost_tamed_wild_horse_modifier + years = 5 + } + + add_stress = minor_stress_gain + + if = { + limit = { + exists = scope:horse_owner + exists = scope:m_horse + scope:m_horse = { + this = root + } + } + scope:horse_owner = { + send_interface_message = { + type = event_martial_bad_with_text + left_icon = root + title = martial_chivalry_special.1604.t.2 + desc = martial_chivalry_special.1604.failure + } + } + } + + ai_chance = { + base = 100 + } + } + + after = { + if = { + limit = { + has_character_flag = is_in_martial_special_event + } + remove_character_flag = is_in_martial_special_event + } + if = { + limit = { + exists = scope:horse_owner + scope:horse_owner = { has_character_flag = is_in_martial_special_event } + } + scope:horse_owner = { remove_character_flag = is_in_martial_special_event } + } + } +} diff --git a/N3OW/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt b/N3OW/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt new file mode 100644 index 00000000..370a3da4 --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/martial_strategy_events.txt @@ -0,0 +1,3768 @@ +#Events for strategy lifestyle focus + +#STRATEGY REGULAR EVENTS + # 1051 - Well-known commander, by Sean Hughes + # 2000 - Translate old texts (Learning skill challenge), Mathilda Bjarnehed + # 2020-2022 - Developing cunning/manipulative tactics (Intrigue skill challenge), Sean Hughes + # 2030-2032 - Logistics and securing provisions (Stewardship skill challenge), Sean Hughes + # 3010-3014 - Decide between two vassal's proposed strategies for a war, Sean Hughes + +#STRATEGY SPECIAL EVENTS + # 1301-1399 - Storm Your Own Castle, by Linnéa Thimrén + # 1401-1499 - March gone awry, by Petter Vilberg + + +############################ +# STRATEGY: REGULAR EVENTS # +############################ + +namespace = martial_strategy + +################################################## +# General Gossip +# by Sean Hughes +# 1051 +################################################## + +martial_strategy.1051 = { + type = character_event + title = martial_strategy.1051.t + desc = martial_strategy.1051.desc + theme = martial_strategy_focus + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = inspect_weapon + } + + trigger = { + #Character must be experienced strategist + OR = { + has_trait = strategist + has_trait = gallant + } + + #Character needs at least two event options available to get this + calc_true_if = { + amount >= 2 + has_trait = brave + has_trait = wrathful + has_trait = sadistic + has_trait = zealous + OR = { + has_trait = patient + AND = { + has_trait = calm + NOT = { has_trait = impatient} + } + } + OR = { + has_trait = callous + AND = { + has_trait = ambitious + NOR = { + has_trait = impatient + has_trait = sadistic + } + } + } + } + #Only once per character. + NOT = { + has_character_flag = had_event_martial_strategy_1051 + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = { #-1 at 5 martial, 0 at 10 martial, 1 at 15 martial etc. + value = martial + subtract = medium_skill_rating + multiply = 0.2 + } + } + + #More available event options make a more interesting event, so we increase the chance of this occuring. + modifier = { + has_trait = brave + add = 0.2 + } + modifier = { + has_trait = wrathful + add = 0.2 + } + modifier = { + has_trait = zealous + add = 0.2 + } + modifier = { + has_trait = calm + add = 0.2 + } + modifier = { + has_trait = callous + add = 0.2 + } + modifier = { + has_trait = patient + add = 0.2 + } + modifier = { + has_trait = ambitious + add = 0.2 + } + modifier = { + has_trait = sadistic + add = 0.5 # Sadistic modifies 2 options, so it's weighted heavier than the others. + } + + modifier = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + factor = 0.2 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_strategy_1051 + years = 5 + } + } + + #Option A: Gain prestige for simply being good at what you do. + option = { + #Special option text if Humble. + name = { + trigger = { has_trait = humble } + text = martial_strategy.1051.a.humble + } + name = { + trigger = { NOT = { has_trait = humble }} + text = martial_strategy.1051.a + } + + #Being Humble or Arrogant is in-line with this option's flavor text. + trait = humble + trait = arrogant + + #Lesser effect for being Humble, since this event is all about bolstering your reputation. + if = { + limit = { + has_trait = humble + } + add_prestige = minor_prestige_gain + } + else_if = { + limit = { + has_trait = arrogant + } + set_nickname_effect = { NICKNAME = nick_the_imperious } + add_prestige = major_prestige_gain + } + else = { + add_prestige = medium_prestige_gain + } + } + + #Option B: Gain a defensive character modifier for being Brave/Unyielding Defender. + option = { + #Special option text if you are Unyielding Defender. + name = { + trigger = { NOT = { has_trait = unyielding_defender }} + text = martial_strategy.1051.b.brave + } + name = { + trigger = { + has_trait = unyielding_defender + } + text = martial_strategy.1051.b.stalwart + } + + #Must be Brave for this option to appear. + trigger = { + has_trait = brave + } + trait = brave + trait = unyielding_defender + + if = { + #If we're Unyielding Defender, we gain a special nickname as well as gaining the modifier for an extended duration. + limit = { + has_trait = unyielding_defender + } + set_nickname_effect = { NICKNAME = nick_the_stalwart } + add_character_modifier = { + modifier = warfare_unshakable_reputation_modifier + years = 20 + } + } + else = { + #Otherwise gain a normal nickname and standard duration modifier + set_nickname_effect = { NICKNAME = nick_the_brave } + add_character_modifier = { + modifier = warfare_unshakable_reputation_modifier + years = 10 + } + } + + } + + #Option C: Gain an offensive character modifier for being Wrathful/Sadistic/Aggressive Attacker. + option = { + #If we're Sadistic, we get special event text for this choice. + name = { + trigger = { has_trait = sadistic } + text = martial_strategy.1051.c.feareater + } + name = { + trigger = { NOT = { has_trait = sadistic }} + text = martial_strategy.1051.c.wrathful + } + + #Must be Wrathful and not Craven for this option to appear. + trigger = { + has_trait = wrathful + + NOT = { has_trait = craven } + } + trait = wrathful + trait = sadistic + + if = { + #If we're also Sadistic, we get a special nickname and as well as gaining the modifier for an extended duration. + limit = { + has_trait = sadistic + } + set_nickname_effect = { NICKNAME = nick_feareater } + + add_character_modifier = { + modifier = warfare_ferocious_reputation_modifier + years = 20 + } + } + else = { + #Otherwise, we get a different nickname and the modifier for a normal duration. + set_nickname_effect = { NICKNAME = nick_the_fury } + + add_character_modifier = { + modifier = warfare_ferocious_reputation_modifier + years = 10 + } + } + } + + #Option D: Gain piety, or lose piety to gain dread for being Zealous/Sadistic + option = { + #Option text dependant on what comination of traits you have. + name = { + trigger = { + has_trait = zealous + NOT = { has_trait = sadistic } + } + text = martial_strategy.1051.d.zealous + } + name = { + trigger = { + has_trait = sadistic + has_trait = zealous + } + text = martial_strategy.1051.d.zealoussadistic + } + name = { + trigger = { + has_trait = sadistic + NOT = { has_trait = zealous } + } + text = martial_strategy.1051.d.sadistic + } + + #Must have at least one of these two traits. + trigger = { + OR = { + has_trait = zealous + has_trait = sadistic + } + } + trait = sadistic + trait = zealous + + + if = { + #If both Sadistic and Zealous, we gain both Piety and Dread as well as a special nickname. + limit = { + has_trait = sadistic + has_trait = zealous + } + + set_nickname_effect = { NICKNAME = nick_the_merciless } + + add_piety = major_piety_gain + add_dread = major_dread_gain + } + else_if = { + #If Sadistic, we lose some Piety but gain Dread. + limit = { + has_trait = sadistic + } + + set_nickname_effect = { NICKNAME = nick_the_merciless } + + add_piety = miniscule_piety_loss + add_dread = major_dread_gain + } + else = { + #If only Zealous, we can some Piety. + set_nickname_effect = { NICKNAME = nick_the_holy } + add_piety = major_piety_gain + } + } + + option = { + name = martial_strategy.1051.e.patient + trigger = { + OR = { + has_trait = patient + AND = { + has_trait = calm + NOT = { has_trait = impatient } + } + } + } + trait = patient + trait = calm + + set_nickname_effect = { NICKNAME = nick_the_hawk } + add_prestige = medium_prestige_gain + add_stress = medium_stress_loss + } + + option = { + name = martial_strategy.1051.f.ambitious + trigger = { + OR = { + has_trait = callous + AND = { + has_trait = ambitious + NOR = { + has_trait = sadistic + has_trait = compassionate + } + } + } + } + trait = callous + trait = ambitious + + set_nickname_effect = { NICKNAME = nick_the_unrelenting } + add_prestige = medium_prestige_gain + add_dread = minor_dread_gain + } +} + + +#Texts on old battles + #by Mathilda Bjarnehed +#Read an old scroll or a newer tome? +martial_strategy.2000 = { + type = character_event + title = martial_strategy.2000.t + desc = { + desc = martial_strategy.2000.start.desc + random_valid = { + triggered_desc = { + trigger = { + game_start_date >= 1066.10.15 + location = { geographical_region = world_europe } + } + desc = martial_strategy.2000.hastings.desc + } + triggered_desc = { + trigger = { + location = { + NOR = { + geographical_region = world_india + geographical_region = world_steppe + } + } + NOT = { faith = { religion_tag = islam_religion } } + } + desc = martial_strategy.2000.tours.desc + } + triggered_desc = { + trigger = { + location = { + NOR = { + geographical_region = world_india + geographical_region = world_steppe + } + } + faith = { religion_tag = islam_religion } + } + desc = martial_strategy.2000.palaceofthemartyrs.desc #(tours but arabic name!) + } + triggered_desc = { + trigger = { + location = { + NOR = { + geographical_region = world_india + geographical_region = world_steppe + } + } + } + desc = martial_strategy.2000.catalaunianplains.desc #Not India/plains + } + desc = martial_strategy.2000.constantinople.desc + triggered_desc = { + trigger = { + location = { + NOR = { + geographical_region = world_europe + geographical_region = world_africa + } + } + } + desc = martial_strategy.2000.vapati.desc + } + } + desc = martial_strategy.2000.end.desc + } + theme = martial_strategy_focus + override_background = { + reference = study + } + + left_portrait = { + character = root + animation = page_flipping + } + + trigger = { + NOR = { + has_character_flag = had_event_martial_strategy_2000 + has_character_modifier = studied_the_battle_of_gaixia + has_character_modifier = studied_the_battle_of_red_cliffs + has_character_modifier = studied_the_battle_of_thermopylae + has_character_modifier = studied_the_battle_of_teutoburg_forest + has_character_modifier = studied_an_old_battle + has_character_modifier = studying_ancient_texts + } + NOT = { has_character_modifier = studied_an_old_battle } + } + + + weight_multiplier = { + base = 1 + modifier = { + add = { #-1 at 5 learning, 0 at 10 learning, 1 at 15 learning etc. + value = learning + subtract = medium_skill_rating + multiply = 0.2 + } + } + modifier = { #Because the modifiers are awesome when you're commanding + is_at_war = yes + add = 1 + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_strategy_2000 + days = 1825 + } + } + + #Just read the new one + option = { + name = martial_strategy.2000.a + + add_character_modifier = { + modifier = studied_an_old_battle + years = 10 + } + + stress_impact = { + diligent = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + has_trait = diligent + add = -90 + } + modifier = { + add = { + value = learning + subtract = 10 + multiply = -10 + } + } + } + } + + #Try to translate the old book + option = { + name = martial_strategy.2000.b + duel = { + skill = learning + value = medium_skill_rating + desc = outcome_in_a_few_days + 60 = { + desc = martial_strategy.2000.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + show_as_tooltip = { + add_martial_lifestyle_xp = medium_lifestyle_experience #Must match in 2000, 2001 and 2002 + } + custom_tooltip = martial_strategy.2000.b.success.tt + trigger_event = { id = martial_strategy.2001 days = 5 } #You uncover old knowledge! + + } + 40 = { + desc = martial_strategy.2000.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + custom_tooltip = martial_strategy.2000.b.failure.tt + trigger_event = { id = martial_strategy.2002 days = 5 } #You fail to read the text + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + impatient = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + OR = { + has_trait = lazy + has_trait = impatient + } + add = -90 + } + modifier = { + add = { + value = learning + subtract = 10 + multiply = 10 + } + } + } + } +} + +#You translated the book and gained ancient knowledge! +martial_strategy.2001 = { + type = character_event + title = martial_strategy.2000.t + desc = { + desc = martial_strategy.2001.start.desc + random_valid = { + triggered_desc = { + trigger = { var:ancient_battle = flag:gaixia } + desc = martial_strategy.2001.gaixia.desc + } + triggered_desc = { + trigger = { var:ancient_battle = flag:red_cliffs } + desc = martial_strategy.2001.red_cliffs.desc + } + triggered_desc = { + trigger = { var:ancient_battle = flag:thermopylae } + desc = martial_strategy.2001.thermopylae.desc + } + triggered_desc = { + trigger = { var:ancient_battle = flag:teutoburg_forest } + desc = martial_strategy.2001.teutoburg_forest.desc + } + #triggered_desc = { + # trigger = { var:ancient_battle = flag:cannae } + # desc = martial_strategy.2001.cannae.desc + #} + #triggered_desc = { + # trigger = { var:ancient_battle = flag:gaugamela } + # desc = martial_strategy.2001.gaugamela.desc + #} + } + } + theme = martial_strategy_focus + override_background = { + reference = study + } + + left_portrait = { + character = root + animation = happy_teacher + } + + immediate = { + hidden_effect = { + #Which battle did you read about? + random_list = { + 1 = { + modifier = { + factor = 0 + has_character_modifier = studied_the_battle_of_gaixia + } + set_variable = { name = ancient_battle value = flag:gaixia } + } + 1 = { + modifier = { + factor = 0 + has_character_modifier = studied_the_battle_of_red_cliffs + } + set_variable = { name = ancient_battle value = flag:red_cliffs } + } + 1 = { + modifier = { + factor = 0 + has_character_modifier = studied_the_battle_of_thermopylae + } + set_variable = { name = ancient_battle value = flag:thermopylae } + } + 1 = { + modifier = { + factor = 0 + has_character_modifier = studied_the_battle_of_teutoburg_forest + } + set_variable = { name = ancient_battle value = flag:teutoburg_forest } + } + #1 = { set_variable = { name = ancient_battle value = flag:cannae } } + #1 = { set_variable = { name = ancient_battle value = flag:gaugamela } } + } + } + } + + option = { #I must try this out! + name = martial_strategy.2001.a + + + if = { + limit = { var:ancient_battle = flag:gaixia } + add_character_modifier = { + modifier = studied_the_battle_of_gaixia + years = 20 + } + } + if = { + limit = { var:ancient_battle = flag:red_cliffs } + add_character_modifier = { + modifier = studied_the_battle_of_red_cliffs + years = 20 + } + } + if = { + limit = { var:ancient_battle = flag:thermopylae } + add_character_modifier = { + modifier = studied_the_battle_of_thermopylae + years = 20 + } + } + if = { + limit = { var:ancient_battle = flag:teutoburg_forest } + add_character_modifier = { + modifier = studied_the_battle_of_teutoburg_forest + years = 20 + } + } + add_martial_lifestyle_xp = medium_lifestyle_experience #Must match in 2000, 2001 and 2002 + } + + option = { #So interesting, books are great! + name = martial_strategy.2001.b + + add_character_modifier = { + modifier = studying_ancient_texts + years = 20 + } + add_martial_lifestyle_xp = medium_lifestyle_experience #Must match in 2000, 2001 and 2002 + } + + after = { + hidden_effect = { + remove_variable = ancient_battle + } + } +} + +#You failed to translate the book... bummer! +martial_strategy.2002 = { + type = character_event + title = martial_strategy.2000.t + desc = martial_strategy.2002.desc + theme = martial_strategy_focus + override_background = { + reference = study + } + + left_portrait = { + character = root + animation = stressed_teacher + } + + #Keep going + option = { + name = martial_strategy.2002.a + + stress_impact = { #Should mirror the stress in the toast above + base = medium_stress_gain + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + + duel = { + skill = learning + value = medium_skill_rating + desc = outcome_in_a_few_days + 90 = { + desc = martial_strategy.2000.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + show_as_tooltip = { + add_martial_lifestyle_xp = medium_lifestyle_experience #Must match in 2000, 2001 and 2002 + } + custom_tooltip = martial_strategy.2000.b.success.tt + trigger_event = { id = martial_strategy.2001 days = 5 } #You uncover old knowledge! + + } + 10 = { + desc = martial_strategy.2000.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_bad + title = martial_strategy.2000.b.failure + left_icon = root + show_as_tooltip = { + stress_impact = { + base = medium_stress_gain + lazy = medium_stress_impact_gain + } + } + } + } + } + } + + + ai_chance = { + base = 0 + } + } + + #Give up + option = { + name = martial_strategy.2002.b + + ai_chance = { + base = 100 + } + } +} + + +################################################## +# Manipulative Tactics (Intrigue Skill Challenge) +# by Sean Hughes +# 2020-2022 +################################################## + +martial_strategy.2020 = { + type = character_event + title = martial_strategy.2020.t + desc = { + desc = martial_strategy.2020.opening + first_valid = { + triggered_desc = { #Text for characters who have the Deceitful trait. + trigger = { has_trait = deceitful } + desc = martial_strategy.2020.desc.deceitful + } + triggered_desc = { #Text for characters who already have a good martial education. + trigger = { + OR = { + has_trait = education_martial_3 + has_trait = education_martial_4 + has_trait = education_martial_5 + } + } + desc = martial_strategy.2020.desc.martial + } + triggered_desc = { #Text for characters who have the Ambitious trait. + trigger = { has_trait = ambitious } + desc = martial_strategy.2020.desc.ambitious + } + desc = martial_strategy.2020.desc #Generic text lines for characters who don't meet any special conditions. + } + } + theme = martial_strategy_focus + + left_portrait = { + character = root + animation = personality_callous + } + + trigger = { + has_lifestyle = martial_lifestyle + + NOR = { + #Event can only happen once every 5 years. + has_character_flag = had_event_martial_strategy_2020 + has_character_modifier = warfare_cunning_gambit_succeeded_modifier + has_character_modifier = warfare_hit_and_run_tactics_modifier + has_character_modifier = warfare_terrain_advantage_modifier + } + #you have to have at least a couple of retinues to do "war games" + maa_regiments_count > 1 + } + + + weight_multiplier = { + base = 1 + modifier = { + add = { #-1 at 5 intrigue, 0 at 10 intrigue, 1 at 15 intrigue etc. + value = intrigue + subtract = medium_skill_rating + multiply = 0.2 + } + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_strategy_2020 + days = 1825 + } + } + + #Attempt a cunning maneuver. High risk, high reward option. + option = { + name = martial_strategy.2020.a + + duel = { + skill = intrigue + value = 10 + + desc = outcome_in_a_few_days + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + trigger_event = { id = martial_strategy.2021 days = 5 } #Your soldiers pull off the maneuver. + desc = martial_strategy.2020.a.success + show_as_tooltip = { + add_martial_lifestyle_xp = medium_lifestyle_experience + add_character_modifier = { + modifier = warfare_cunning_gambit_succeeded_modifier + years = 5 + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + trigger_event = { id = martial_strategy.2022 days = 5 } #Your soldiers' line collapses. + desc = martial_strategy.2020.a.failure + show_as_tooltip = { + add_prestige = minor_prestige_loss + set_nickname_effect = { NICKNAME = nick_the_foolish } + } + + } + } + + stress_impact = { + honest = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -200 + ai_boldness = 100 + ai_energy = 50 + } + + # Rational characters know when they have a good chance of winning the duel + compare_modifier = { + trigger = { + ai_rationality >= 10 + } + value = { + value = intrigue + add = -10 + } + multiplier = 1000 # -10,000 at 0 Stewardship, +0 at 10 Stewardship, +10,000 at 20 Stewardship + } + } + } + + #Focus on hit-and-run tactics. Guaranteed low-impact modifier reward. + option = { + name = martial_strategy.2020.b + + add_character_modifier = { + modifier = warfare_hit_and_run_tactics_modifier + years = 5 + } + + stress_impact = { + honest = minor_stress_impact_gain + brave = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -100 + ai_energy = -50 + ai_boldness = -50 + } + } + } + + #Reject these dirty tactics. No benefit apart from avoiding stress. + option = { + name = { + text = martial_strategy.2020.d + } + name = { + trigger = { has_trait = brave } + text = martial_strategy.2020.d.brave + } + flavor = martial_strategy.2020.d.flavor + + stress_impact = { + base = minor_stress_impact_loss + schemer = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + ambitious = medium_stress_impact_gain + brave = minor_stress_impact_loss + just = minor_stress_impact_loss + honest = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 300 + } + } + } +} + +#Cunning maneuver succeeds. +martial_strategy.2021 = { + type = character_event + title = martial_strategy.2021.t + desc = { + desc = martial_strategy.2020.desc.opening + desc = martial_strategy.2021.desc + } + theme = martial_strategy_focus + + left_portrait = { + character = root + animation = war_over_win + } + + option = { + name = martial_strategy.2021.a + + add_martial_lifestyle_xp = medium_lifestyle_experience + add_character_modifier = { #Bonus hard casualties in combat + modifier = warfare_cunning_gambit_succeeded_modifier + years = 5 + } + } +} + +#Cunning maneuver fails. +martial_strategy.2022 = { + type = character_event + title = martial_strategy.2022.t + desc = { + desc = martial_strategy.2020.desc.opening + desc = martial_strategy.2022.desc + } + theme = martial_strategy_focus + + left_portrait = { + character = root + animation = war_over_loss + } + + option = { #Return to using more conventional tactics + name = martial_strategy.2022.b + add_prestige = minor_prestige_loss + if = { + limit = { + is_ai = no + } + set_nickname_effect = { NICKNAME = nick_the_foolish } + } + else = { + random = { + chance = 15 + set_nickname_effect = { NICKNAME = nick_the_foolish } + } + } + } +} + + +################################################## +# Support The Troops (Stewardship Skill Challenge) +# by Sean Hughes +# 2030-2032 +################################################## + + +martial_strategy.2030 = { + type = character_event + title = martial_strategy.2030.t + desc = { + first_valid = { + triggered_desc = { #Text for characters who have the Diligent trait. + trigger = { has_trait = diligent } + desc = martial_strategy.2030.desc.diligent + } + triggered_desc = { #Text for characters who have the Ambitious trait. + trigger = { has_trait = ambitious } + desc = martial_strategy.2030.desc.ambitious + } + desc = martial_strategy.2030.desc.fallback #Text lines for characters who don't meet any special conditions. + } + desc = martial_strategy.2030.desc.end + } + theme = martial_strategy_focus + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = reading + } + + trigger = { + has_lifestyle = martial_lifestyle + + NOR = { + #Event can only happen once every 5 years. + has_character_flag = had_event_martial_strategy_2030 + has_character_modifier = warfare_well_provisioned_troops_modifier + has_character_modifier = warfare_troops_lacking_provisions_modifier + } + } + + + weight_multiplier = { + base = 1 + modifier = { + add = { #-1 at 5 stewardship, 0 at 10 stewardship, 1 at 15 stewardship etc. + value = stewardship + subtract = medium_skill_rating + multiply = 0.2 + } + } + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_strategy_2030 + days = 1825 + } + } + + #Work on creating a network of merchants to supply your men. + option = { + name = martial_strategy.2030.a + + + duel = { + skill = stewardship + value = 10 + + desc = outcome_in_a_few_days + + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = martial_strategy.2030.a.success.tt + trigger_event = { id = martial_strategy.2031 days = 5 } #Your soldiers pull off the maneuver. + show_as_tooltip = { + add_character_modifier = { + modifier = warfare_well_provisioned_troops_modifier + years = 5 + } + add_martial_lifestyle_xp = medium_lifestyle_experience + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = martial_strategy.2030.a.failure.tt + trigger_event = { id = martial_strategy.2032 days = 5 } #Your soldiers' line collapses. + show_as_tooltip = { + add_character_modifier = { + modifier = warfare_troops_lacking_provisions_modifier + years = 5 + } + } + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + impatient = medium_stress_impact_gain + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 100 + ai_greed = 100 + ai_energy = 50 + } + + # Rational characters know when they have a good chance of winning the duel + compare_modifier = { + trigger = { + ai_rationality >= 10 + } + value = { + value = stewardship + add = -10 + } + multiplier = 1000 # -10,000 at 0 Stewardship, +0 at 10 Stewardship, +10,000 at 20 Stewardship + } + } + } + + #Pay a bunch of money for the supplies. + option = { + name = martial_strategy.2030.b + + trigger = { + OR = { + short_term_gold >= medium_gold_value_check + is_ai = no + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + add_character_modifier = { + modifier = warfare_well_provisioned_troops_modifier + years = 5 + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -50 + ai_greed = -150 + } + } + } + + #Just let your men loot and pillage for their supplies. + option = { + name = martial_strategy.2030.c + + add_character_modifier = { + modifier = warfare_accustomed_to_foraging_modifier + years = 5 + } + + stress_impact = { + generous = medium_stress_impact_gain + diligent = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -100 + ai_compassion = -100 + ai_greed = 100 + ai_energy = -50 + } + } + } +} + +#Merchant network successfully established. +martial_strategy.2031 = { + type = character_event + title = martial_strategy.2031.t + desc = martial_strategy.2031.desc + theme = martial_strategy_focus + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = steward + } + + immediate = { + add_martial_lifestyle_xp = medium_lifestyle_experience + } + + option = { #Bonus to supply limit/reduced maintence costs. + name = martial_strategy.2031.a + + add_character_modifier = { + modifier = warfare_well_provisioned_troops_modifier + years = 5 + } + + + stress_impact = { + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + option = { #Benefit via raw cash. + name = martial_strategy.2031.b + add_gold = medium_gold_value + + stress_impact = { + generous = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_honor = -0.5 + } + } + } +} + +#Scammed by untrustworthy merchants +martial_strategy.2032 = { + type = character_event + title = martial_strategy.2032.t + desc = martial_strategy.2032.desc + theme = martial_strategy_focus + override_background = { + reference = armory + } + + left_portrait = { + character = root + animation = disappointed + } + + immediate = { + add_character_modifier = { + modifier = warfare_troops_lacking_provisions_modifier + years = 5 + } + } + + option = { + name = { + text = martial_strategy.2032.a + } + name = { + trigger = { + OR = { + has_trait = forgiving + has_trait = compassionate + has_trait = humble + } + } + text = martial_strategy.2032.a.forgiving + } + } +} + +################################################## +# Discussion of Strategy +# by Sean Hughes +# 3010-3014 +################################################## + +#Triggers for determining which strategy each commander wants to use. +scripted_trigger martial_strategy_3010_wrathful_trigger = { + OR = { #Favors direct attacks + has_trait = wrathful + has_trait = impatient + has_trait = vengeful + has_trait = sadistic + has_trait = aggressive_attacker + } +} + +scripted_trigger martial_strategy_3010_greedy_trigger = { + OR = {#Favors pillaging + has_trait = greedy + has_trait = gluttonous + has_trait = reaver + } +} + +scripted_trigger martial_strategy_3010_patient_trigger = { + OR = {#Favors fighting defensively + has_trait = patient + has_trait = humble + has_trait = calm + has_trait = military_engineer + has_trait = unyielding_defender + } +} + +scripted_trigger martial_strategy_3010_craven_trigger = { + #Wants to avoid fighting as much as possible. + OR = { + has_trait = craven + has_trait = shy + } +} + +scripted_trigger martial_strategy_3010_flexible_trigger = { + OR = {#Favors a more flexible strategy + has_trait = fickle + has_trait = logistician + has_trait = flexible_leader + } +} + +scripted_trigger martial_strategy_patient_commander_trigger = { + OR = { + martial_strategy_3010_patient_trigger = yes #Basic personality check requirement + martial_strategy_3010_craven_trigger = yes #Special personality option + martial_strategy_3010_flexible_trigger = yes #Special personality option + } + NOR = { + has_trait = wrathful + has_trait = impatient + } + + martial_strategy_3010_valid_commander = yes +} + +scripted_trigger martial_strategy_impatient_commander_trigger = { + OR = { + martial_strategy_3010_wrathful_trigger = yes #Basic personality check requirement + martial_strategy_3010_greedy_trigger = yes #Special personality option + } + NOR = { + has_trait = patient + has_trait = calm + } + martial_strategy_3010_valid_commander = yes +} + +scripted_trigger martial_strategy_3010_valid_commander = { + can_be_combatant_based_on_gender_trigger = {ARMY_OWNER = root} + is_alive = yes + is_imprisoned = no + NOT = { is_at_war_with = root } + has_contagious_deadly_disease_trigger = no +} + +scripted_effect add_impatient_commanders_modifier_effect = { + if = { limit = { scope:impatient_commander = { martial_strategy_3010_greedy_trigger = yes} } + add_character_modifier = { modifier = warfare_greedy_strategy_modifier days = 1825} + } + else = { + add_character_modifier = { modifier = warfare_wrathful_strategy_modifier days = 1825} + } +} + +scripted_effect add_patient_commanders_modifier_effect = { + if = { limit = { scope:patient_commander = { martial_strategy_3010_craven_trigger = yes} } + add_character_modifier = { modifier = warfare_craven_strategy_modifier days = 1825} + } + else_if = { limit = { scope:patient_commander = { martial_strategy_3010_flexible_trigger = yes} } + add_character_modifier = { modifier = warfare_flexible_strategy_modifier days = 1825} + } + else = { + add_character_modifier = { modifier = warfare_patient_strategy_modifier days = 1825} + } +} + +martial_strategy.3010 = { + type = character_event + title = martial_strategy.3010.t + desc = { + desc = martial_strategy.3010.desc.start + first_valid = { + triggered_desc = { + trigger = { scope:impatient_commander = { martial_strategy_3010_greedy_trigger = yes} } + desc = martial_strategy.3010.desc.greedy + } + desc = martial_strategy.3010.desc.wrathful + } + desc = martial_strategy.3010.desc.middle + first_valid = { + triggered_desc = { + trigger = { scope:patient_commander = { martial_strategy_3010_craven_trigger = yes } } + desc = martial_strategy.3010.desc.craven + } + triggered_desc = { + trigger = { scope:patient_commander = { martial_strategy_3010_flexible_trigger = yes } } + desc = martial_strategy.3010.desc.flexible + } + desc = martial_strategy.3010.desc.patient + } + desc = martial_strategy.3010.desc.end + } + theme = martial_strategy_focus + + left_portrait = scope:impatient_commander + right_portrait = scope:patient_commander + + trigger = { + is_at_war = yes + is_available_adult_or_is_commanding = yes + + NOT = { has_character_flag = had_event_martial_strategy_3010 } #Can only happen once every 5 years. + + any_knight = { + martial_strategy_patient_commander_trigger = yes + save_temporary_scope_as = vassal_1 + } + any_knight = { + martial_strategy_impatient_commander_trigger = yes + this != scope:vassal_1 + } + } + + weight_multiplier = { + base = 2 #Because this is only available while at war, but it's nice to get it then + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_strategy_3010 + years = 10 + } + + #Get our first commander for the meeting. + random_knight = { + limit = { + #We want to get two commanders with relatively opposed viewpoints. + martial_strategy_impatient_commander_trigger = yes + save_temporary_scope_as = impatient_commander + root = { + any_knight = { + martial_strategy_patient_commander_trigger = yes + this != scope:impatient_commander + } + } + } + weight = { + base = 1 + #Higher-tier vassals are more likely to be part of the strategy meeting, due to their power and/or assumed stake in the war. + compare_modifier = { + value = highest_held_title_tier + multiplier = 5 + } + + #High martial chatacters are much more likely to sit in on the meeting. + compare_modifier = { + value = martial + multiplier = 30 + } + + #Your powerful vassals get their own stacking modifier on top of everything else. + modifier = { + is_powerful_vassal = yes + factor = 10 + } + + # If they're actually commanding your army, they're much, much more likely to be chosen! + modifier = { + is_commanding_army = yes + factor = 50 + } + } + save_scope_as = impatient_commander + + } + + #Get our second commander for the meeting. + random_knight = { + limit = { + #We want to get two commanders with relatively opposed viewpoints. + martial_strategy_patient_commander_trigger = yes + this != scope:impatient_commander + } + + weight = { + base = 1 + #Higher-tier vassals are more likely to be part of the strategy meeting, due to their power and/or assumed stake in the war. + compare_modifier = { + value = highest_held_title_tier + multiplier = 5 + } + + #High martial chatacters are more likely to sit in on the meeting. + compare_modifier = { + value = martial + multiplier = 30 + } + + #Your powerful vassals get their own stacking modifier on top of everything else. + modifier = { + is_powerful_vassal = yes + factor = 10 + } + + # If they're actually commanding your army, they're much, much more likely to be chosen! + modifier = { + is_commanding_army = yes + factor = 50 + } + } + save_scope_as = patient_commander + } + } + + #High martial skill lets you fuse the two strategies together. + option = { + name = martial_strategy.3010.o_martial + trigger = { + martial >= 18 + } + + skill = martial + + #Everyone gets both strategies! + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + trigger_event = martial_strategy.3014 + } + + scope:patient_commander = { + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + trigger_event = martial_strategy.3014 + } + + ai_chance = { + base = 1000 + ai_value_modifier = { + ai_rationality = 200 + ai_energy = 100 + } + } + } + + #Pick the more aggressive option. + option = { + name = martial_strategy.3010.a + + # Share impatient strategy with commander. + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + trigger_event = martial_strategy.3011 + + #Impatient commander is happy you picked him. + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + add_impatient_commanders_modifier_effect = yes + scope:patient_commander = { + trigger_event = martial_strategy.3012 + + #Patient commander is upset you dismissed his plan.. + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -50 + ai_greed = 100 + } + } + + } + + #Pick the more defensive option. + option = { + name = martial_strategy.3010.b + + # Share patient strategy with commander. + scope:patient_commander = { + add_patient_commanders_modifier_effect = yes + trigger_event = martial_strategy.3011 + + #Patient commander is happy you picked him. + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + add_patient_commanders_modifier_effect = yes + scope:impatient_commander = { + trigger_event = martial_strategy.3012 + + #Impatient commander is upset you dismissed his plan.. + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 50 + ai_greed = -100 + } + } + } + + #Each commander gets to employ their own strategy. + option = { + name = martial_strategy.3010.c + + #Impatient commander gets their own strategy as a modifier. + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + trigger_event = martial_strategy.3013 + + #Pleased that you let them do their own thing. + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + + #Patient commander gets their own strategy as a modifer. + scope:patient_commander = { + add_patient_commanders_modifier_effect = yes + trigger_event = martial_strategy.3013 + + #Pleased that you let them do their own thing. + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 10 + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 100 + ai_greed = -100 + } + } + } +} + +#The commander whose strategy got picked is informed of their liege's decision. +martial_strategy.3011 = { + type = character_event + title = martial_strategy.3011.t + desc = { + desc = martial_strategy.3010.desc.response.start + desc = martial_strategy.3011.desc + } + theme = martial_strategy_focus + + left_portrait = scope:my_liege + right_portrait = scope:other_commander + + immediate = { + + liege = { + save_scope_as = my_liege + } + + scope:impatient_commander = { + if = { + limit = { + this = root + } + scope:patient_commander = { + save_scope_as = other_commander + } + + show_as_tooltip = { + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + add_opinion = { + target = scope:my_liege + modifier = pleased_opinion + opinion = 20 + } + } + scope:patient_commander = { + add_impatient_commanders_modifier_effect = yes + save_scope_as = other_commander + } + scope:my_liege = { + add_impatient_commanders_modifier_effect = yes + } + } + } + else = { + scope:impatient_commander = { + save_scope_as = other_commander + } + + show_as_tooltip = { + scope:patient_commander = { + add_patient_commanders_modifier_effect = yes + add_opinion = { + target = scope:my_liege + modifier = pleased_opinion + opinion = 20 + } + } + scope:impatient_commander = { + add_patient_commanders_modifier_effect = yes + } + scope:my_liege = { + add_patient_commanders_modifier_effect = yes + } + } + } + } + } + + option = { + name = { + text = martial_strategy.3011.a + } + name = { + trigger = { + opinion = { + target = scope:my_liege + value <= -10 + } + } + text = martial_strategy.3011.a.disapprove + } + } +} + +#The commander whose strategy got rejected is informed of their liege's decision. +martial_strategy.3012 = { + type = character_event + title = martial_strategy.3012.t + desc = { + desc = martial_strategy.3010.desc.response.start + desc = martial_strategy.3012.desc + } + theme = martial_strategy_focus + + left_portrait = scope:my_liege + right_portrait = scope:other_commander + + immediate = { + + liege = { + save_scope_as = my_liege + } + + scope:impatient_commander = { + if = { + limit = { + this = root + } + scope:patient_commander = { + save_scope_as = other_commander + } + + show_as_tooltip = { + scope:impatient_commander = { + add_patient_commanders_modifier_effect = yes + } + scope:patient_commander = { + add_patient_commanders_modifier_effect = yes + } + scope:my_liege = { + add_patient_commanders_modifier_effect = yes + } + } + } + else = { + scope:impatient_commander = { + save_scope_as = other_commander + } + show_as_tooltip = { + scope:patient_commander = { + add_impatient_commanders_modifier_effect = yes + } + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + } + scope:my_liege = { + add_impatient_commanders_modifier_effect = yes + } + } + } + } + } + + option = { + name = { + text = martial_strategy.3012.a + } + name = { + trigger = { + opinion = { + target = scope:my_liege + value <= -10 + } + } + text = martial_strategy.3012.a.disapprove + } + } +} + +#The commanders are both informed that their liege is letting them do what they want. +martial_strategy.3013 = { + type = character_event + title = martial_strategy.3013.t + desc = { + desc = martial_strategy.3010.desc.response.start + desc = martial_strategy.3013.desc + } + theme = martial_strategy_focus + + left_portrait = scope:my_liege + right_portrait = scope:other_commander + + immediate = { + + liege = { + save_scope_as = my_liege + } + + scope:impatient_commander = { + if = { + limit = { + this = root + } + scope:patient_commander = { + save_scope_as = other_commander + } + + show_as_tooltip = { + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + } + scope:patient_commander = { + add_patient_commanders_modifier_effect = yes + } + } + } + else = { + scope:impatient_commander = { + save_scope_as = other_commander + } + show_as_tooltip = { + scope:patient_commander = { + add_patient_commanders_modifier_effect = yes + } + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + } + } + } + } + } + + option = { + name = martial_strategy.3013.a + } +} + +#The commanders are both informed that their liege took each of their strategies and fused them together! +martial_strategy.3014 = { + type = character_event + title = martial_strategy.3014.t + desc = { + desc = martial_strategy.3010.desc.response.start + desc = martial_strategy.3014.desc + } + theme = martial_strategy_focus + + left_portrait = scope:my_liege + right_portrait = scope:other_commander + + immediate = { + + liege = { + save_scope_as = my_liege + } + + scope:impatient_commander = { + if = { + limit = { + this = root + } + scope:patient_commander = { + save_scope_as = other_commander + } + + show_as_tooltip = { + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + } + scope:patient_commander = { + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + } + scope:my_liege = { + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + } + } + } + else = { + scope:impatient_commander = { + save_scope_as = other_commander + } + show_as_tooltip = { + scope:patient_commander = { + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + } + scope:impatient_commander = { + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + } + scope:my_liege = { + add_impatient_commanders_modifier_effect = yes + add_patient_commanders_modifier_effect = yes + } + } + } + } + } + + option = { + name = { + text = martial_strategy.3014.a + } + name = { + trigger = { + opinion = { + target = scope:my_liege + value <= -10 + } + } + text = martial_strategy.3014.a.disapprove + } + } +} + + +############################ +# STRATEGY: SPECIAL EVENTS # +############################ + +namespace = martial_strategy_special + +######################### +# Storm Your Own Castle # by Linnéa Thimrén +######################### + +scripted_trigger martial_strategy_special_1301_defender_trigger = { + is_available_healthy_ai_adult = yes + this != root + OR = { + has_lifestyle = martial_lifestyle + is_knight = yes + has_council_position = councillor_marshal + } +} + +#Will you practice castle-taking or look at defenses? +martial_strategy_special.1301 = { + type = character_event + title = martial_strategy_special.1301.t + desc = martial_strategy_special.1301.desc + + left_portrait = root # I've gone ahead and updated most animations now that we have weapons - Hugo + right_portrait = scope:siege_proposer + theme = martial_strategy_focus + override_background = { + reference = courtyard + } + + trigger = { + has_focus = martial_strategy_focus + exists = capital_county + NOT = { has_character_flag = had_event_martial_strategy_special_1301 } + OR = { + AND = { + exists = cp:councillor_marshal + cp:councillor_marshal = { martial_strategy_special_1301_defender_trigger = yes } + } + any_knight = { + martial_strategy_special_1301_defender_trigger = yes + } + any_relation = { + type = friend + martial_strategy_special_1301_defender_trigger = yes + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + + hidden_effect = { + add_character_flag = had_event_martial_strategy_special_1301 + add_character_flag = { + flag = is_in_martial_special_event + days = 200 + } + + #Save defender + if = { + limit = { + exists = cp:councillor_marshal + cp:councillor_marshal = { martial_strategy_special_1301_defender_trigger = yes } + } + cp:councillor_marshal = { add_to_list = possible_defenders } + } + every_knight = { + limit = { martial_strategy_special_1301_defender_trigger = yes } + add_to_list = possible_defenders + } + every_relation = { + type = friend + limit = { martial_strategy_special_1301_defender_trigger = yes } + add_to_list = possible_defenders + } + random_in_list = { + list = possible_defenders + weight = { + base = 1 + modifier = { + has_relation_friend = root + add = 4 + } + modifier = { + has_council_position = councillor_marshal + add = 3 + } + } + save_scope_as = siege_proposer + if = { + limit = { + root = { is_ai = no } + } + get_quirk_character_effect = yes + } + } + } + } + + #let's go + option = { + name = martial_strategy_special.1301.b + flavor = martial_strategy_special.1301.b.tt + trigger_event = { + id = martial_strategy_special.1302 + days = { 3 7 } + } + reverse_add_opinion = { + target = scope:siege_proposer + modifier = pleased_opinion + opinion = 10 + } + custom_tooltip = martial_lifestyle_perk_indication + } + + #nah thanks + option = { + name = martial_strategy_special.1301.a + capital_county.title_province = { + add_province_modifier = { + modifier = increased_castle_defense + days = 3650 + } + } + } + +} + +#Let the game begin! Storm the gate or climb the walls? +martial_strategy_special.1302 = { + type = character_event + title = martial_strategy_special.1302.t + desc = martial_strategy_special.1302.desc + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:siege_proposer + animation = throne_room_one_handed_passive_1 + } + theme = martial_strategy_focus + override_background = { + reference = courtyard + } + + immediate = { + set_variable = { + name = storm_castle_points #to keep track of how you're doing + value = 0 + days = 800 + } + set_variable = { + name = storm_castle_step + value = 1 + days = 800 + } + + #Setting a commander trait option + random_list = { + 1 = { + trigger = { has_trait = military_engineer } + save_scope_value_as = { + name = special_commander_option + value = flag:military_engineer + } + } + 1 = { + trigger = { has_trait = flexible_leader } + save_scope_value_as = { + name = special_commander_option + value = flag:flexible_leader + } + } + } + } + + option = { #Special option! militarty_engineer <- LÅT STÅ + trigger = { + exists = scope:special_commander_option + scope:special_commander_option = flag:military_engineer + } + trait = military_engineer + name = martial_strategy_special.1302.c + + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + + trigger_event = { + id = martial_strategy_special.1303 + days = { 3 7 } + } + + ai_chance = { + base = 1000 + } + } + + option = { #Special option! flexible_leader + trigger = { + exists = scope:special_commander_option + scope:special_commander_option = flag:flexible_leader + } + trait = flexible_leader + name = martial_strategy_special.1302.d + + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + + trigger_event = { + id = martial_strategy_special.1303 + days = { 3 7 } + } + + ai_chance = { + base = 1000 + } + } + + option = { #A riskier option that gives a higher reward + name = martial_strategy_special.1302.a + flavor = martial_strategy_special.13.a.tt + + add_martial_lifestyle_xp = minor_lifestyle_experience + + duel = { + skill = prowess + value = average_skill_level + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -59 + } + desc = martial_strategy_special.1302.a.tt1 + + send_interface_toast = { + type = event_toast_effect_good + title = martial_strategy_special.1302.a.tt1 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -39 + } + desc = martial_strategy_special.1302.a.tt2 + send_interface_toast = { + type = event_toast_effect_bad + title = martial_strategy_special.1302.a.tt2 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.poorly + change_variable = { + name = storm_castle_points + add = -1 + } + } + } + } + stress_impact = { + patient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = brave + has_trait = impatient + has_trait = aggressive_attacker + has_trait = reckless + } + } + } + trigger_event = { + id = martial_strategy_special.1303 + days = { 3 7 } + } + } + + option = { #A safer option that doesn't pay off as well + name = martial_strategy_special.1302.b + flavor = martial_strategy_special.13.b.tt + custom_tooltip = martial_strategy_special.storm_castle.well + change_variable = { + name = storm_castle_points + add = 1 + } + stress_impact = { + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = craven + has_trait = patient + } + } + } + trigger_event = { + id = martial_strategy_special.1304 + days = { 3 7 } + } + } +} + +#Fighting up stairs +martial_strategy_special.1303 = { + type = character_event + title = martial_strategy_special.1303.t + desc = { + desc = martial_strategy_special.1303.desc + triggered_desc = { + trigger = { var:storm_castle_step = 3 } #This is the last points event + desc = { + first_valid = { + triggered_desc = { + trigger = { var:storm_castle_points >= 3 } + desc = martial_strategy_1303.winning + } + desc = martial_strategy_1303.losing + } + } + } + } + left_portrait = { + character = root + animation = aggressive_sword + } + theme = martial_strategy_focus + override_background = { + reference = corridor_day + } + + + trigger = { + exists = var:storm_castle_points #If it runs out in MP, kill the event + } + + immediate = { + change_variable = { + name = storm_castle_step + add = 1 + } + + #Setting a commander trait option + random_list = { + 1 = { + trigger = { has_trait = organizer } + save_scope_value_as = { + name = special_commander_option + value = flag:organizer + } + } + 1 = { + trigger = { has_trait = cautious_leader } + save_scope_value_as = { + name = special_commander_option + value = flag:cautious_leader + } + } + 1 = { + trigger = { has_trait = reckless } + save_scope_value_as = { + name = special_commander_option + value = flag:reckless + } + } + } + } + + option = { #Special option! organizer + trigger = { + exists = scope:special_commander_option + scope:special_commander_option = flag:organizer + } + trait = organizer + name = martial_strategy_special.1303.c + + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + + ai_chance = { + base = 1000 + } + } + + option = { #Special option! cautious_leader + trigger = { + exists = scope:special_commander_option + scope:special_commander_option = flag:cautious_leader + } + trait = cautious_leader + name = martial_strategy_special.1303.d + + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + + ai_chance = { + base = 1000 + } + } + + option = { #Special option! reckless + trigger = { + exists = scope:special_commander_option + scope:special_commander_option = flag:reckless + } + trait = reckless + name = martial_strategy_special.1303.e + + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + + ai_chance = { + base = 1000 + } + } + + option = { + name = martial_strategy_special.1303.a + flavor = martial_strategy_special.13.a.tt + add_martial_lifestyle_xp = minor_lifestyle_experience + duel = { + skill = diplomacy + value = average_skill_level + + 60 = { + desc = martial_strategy_special.1303.a.tt1 + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -59 + } + + send_interface_toast = { + type = event_toast_effect_good + title = martial_strategy_special.1303.a.tt1 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + } + } + 40 = { + desc = martial_strategy_special.1303.a.tt2 + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -39 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = martial_strategy_special.1303.a.tt2 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.poorly + change_variable = { + name = storm_castle_points + add = -1 + } + } + } + } + stress_impact = { + craven = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = brave + has_trait = impatient + has_trait = aggressive_attacker + has_trait = reckless + } + } + } + } + + option = { + name = martial_strategy_special.1303.b + flavor = martial_strategy_special.13.b.tt + random_list = { + 90 = { + modifier = { + add = 30 + OR = { + has_trait = diligent + has_trait = patient + } + } + desc = martial_strategy_special.1303.b.tt1 + send_interface_toast = { + type = event_toast_effect_good + title = martial_strategy_special.1303.b.tt1 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.well + change_variable = { + name = storm_castle_points + add = 1 + } + } + } + 10 = { + modifier = { + add = 5 + has_trait = impatient + } + desc = martial_strategy_special.1303.b.tt2 + send_interface_toast = { + type = event_toast_effect_bad + title = martial_strategy_special.1303.b.tt2 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.poorly + change_variable = { + name = storm_castle_points + add = -1 + } + } + } + } + stress_impact = { + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = diligent + has_trait = patient + has_trait = flexible_leader + } + } + } + } + + #Protect them with your body + option = { + trigger = { #I don't have any of the cool commander options + trigger_if = { + limit = { + exists = scope:special_commander_option + } + NOR = { + scope:special_commander_option = flag:organizer + scope:special_commander_option = flag:cautious_leader + scope:special_commander_option = flag:reckless + } + } + } + name = martial_strategy_special.1303.f + + custom_tooltip = martial_strategy_special.storm_castle.very_well + + random = { + chance = { + value = 50 + subtract = { + value = prowess + multiply = 2 + } + } + increase_wounds_no_death_effect = { REASON = fight } + } + stress_impact = { + base = medium_stress_impact_gain + brave = sub_medium_stress_impact_loss + craven = medium_stress_impact_gain + } + + change_variable = { + name = storm_castle_points + add = 2 + } + } + + after = { + if = { + limit = { var:storm_castle_step = 2 } + trigger_event = { + id = martial_strategy_special.1304 + days = { 3 7 } + } + } + else = { + trigger_event = { + id = martial_strategy_special.1399 + days = { 3 7 } + } + } + } +} + +#Fighting on battlement +martial_strategy_special.1304 = { + type = character_event + title = martial_strategy_special.1304.t + desc = { + desc = martial_strategy_special.1304.desc + triggered_desc = { + trigger = { var:storm_castle_step = 3 } #This is the last points event + desc = { + first_valid = { + triggered_desc = { + trigger = { var:storm_castle_points >= 3 } + desc = martial_strategy_1303.winning + } + desc = martial_strategy_1303.losing + } + } + } + } + left_portrait = { + character = root + animation = aggressive_spear + } + theme = martial_strategy_focus + override_background = { + reference = courtyard + } + + trigger = { + exists = var:storm_castle_points #If it runs out in MP, kill the event + } + + immediate = { + change_variable = { + name = storm_castle_step + add = 1 + } + + #Setting a commander trait option + random_list = { + 1 = { + trigger = { has_trait = aggressive_attacker } + save_scope_value_as = { + name = special_commander_option + value = flag:aggressive_attacker + } + } + 1 = { + trigger = { has_trait = unyielding_defender } + save_scope_value_as = { + name = special_commander_option + value = flag:unyielding_defender + } + } + } + } + + option = { #Special option! aggressive_attacker + trigger = { + exists = scope:special_commander_option + scope:special_commander_option = flag:aggressive_attacker + } + trait = aggressive_attacker + name = martial_strategy_special.1304.c + + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + + ai_chance = { + base = 1000 + } + } + + option = { #Special option! unyielding_defender + trigger = { + exists = scope:special_commander_option + scope:special_commander_option = flag:unyielding_defender + } + trait = unyielding_defender + name = martial_strategy_special.1304.d + + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + + ai_chance = { + base = 1000 + } + } + + option = { #Risky + name = martial_strategy_special.1304.a + flavor = martial_strategy_special.13.a.tt + add_martial_lifestyle_xp = minor_lifestyle_experience + duel = { + skill = martial + value = average_skill_level + + 60 = { + desc = martial_strategy_special.1304.a.tt1 + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + min = -59 + } + + send_interface_toast = { + type = event_toast_effect_good + title = martial_strategy_special.1304.a.tt1 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + } + } + 40 = { + desc = martial_strategy_special.1304.a.tt2 + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + min = -39 + } + + send_interface_toast = { + type = event_toast_effect_bad + title = martial_strategy_special.1304.a.tt2 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.poorly + change_variable = { + name = storm_castle_points + add = -1 + } + } + } + } + stress_impact = { + patient = minor_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = brave + has_trait = impatient + has_trait = aggressive_attacker + has_trait = reckless + } + } + } + } + + option = { #Safe + name = martial_strategy_special.1304.b + flavor = martial_strategy_special.13.b.tt + random_list = { + 90 = { + desc = martial_strategy_special.1304.b.tt1 + send_interface_toast = { + type = event_toast_effect_good + title = martial_strategy_special.1304.b.tt1 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.well + change_variable = { + name = storm_castle_points + add = 1 + } + } + } + 10 = { + modifier = { + add = 20 + has_trait = impatient + } + desc = martial_strategy_special.1304.b.tt2 + send_interface_toast = { + type = event_toast_effect_bad + title = martial_strategy_special.1304.b.tt2 + left_icon = root + custom_tooltip = martial_strategy_special.storm_castle.poorly + change_variable = { + name = storm_castle_points + add = -1 + } + } + } + } + stress_impact = { + impatient = minor_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = patient + has_trait = diligent + has_trait = unyielding_defender + } + } + } + } + + + #Hurt them for reals! + option = { + trigger = { #I don't have any of the cool commander options + trigger_if = { + limit = { + exists = scope:special_commander_option + } + NOR = { + scope:special_commander_option = flag:unyielding_defender + scope:special_commander_option = flag:aggressive_attacker + } + } + } + name = martial_strategy_special.1304.f + + add_tyranny = minor_tyranny_gain + add_dread = minor_dread_gain + + custom_tooltip = martial_strategy_special.storm_castle.very_well + change_variable = { + name = storm_castle_points + add = 2 + } + + random_knight = { + increase_wounds_no_death_effect = { REASON = fight } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + just = minor_stress_impact_gain + + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 0 + } + } + + after = { + if = { + limit = { var:storm_castle_step = 2 } + trigger_event = { + id = martial_strategy_special.1303 + days = { 3 7 } + } + } + else = { + trigger_event = { + id = martial_strategy_special.1399 + days = { 3 7 } + } + } + } +} + +#END +martial_strategy_special.1399 = { + type = character_event + title = martial_strategy_special.1399.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + var:storm_castle_points >= 3 + } + desc = martial_strategy_special.1399.desc_win + } + desc = martial_strategy_special.1399.desc_loose + } + desc = martial_strategy_special.1399.desc + first_valid = { + triggered_desc = { + trigger = { + var:storm_castle_points >= 3 + } + desc = martial_strategy_special.1399.desc_win2 + } + triggered_desc = { + desc = martial_strategy_special.1399.desc_loose2 + } + } + } + left_portrait = { + character = root + triggered_animation = { + trigger = { var:storm_castle_points >= 3 } + animation = celebrate_sword + } + animation = throne_room_one_handed_passive_1 + } + right_portrait = { + character = scope:siege_proposer + triggered_animation = { + trigger = { root = { var:storm_castle_points >= 3 } } + animation = admiration + } + animation = celebrate_spear + } + theme = martial_strategy_focus + override_background = { + reference = courtyard + } + + trigger = { + exists = var:storm_castle_points #If it runs out in MP, kill the event + } + + option = { + name = martial_strategy_special.1399.a + trigger = { + var:storm_castle_points > 3 + } + add_martial_lifestyle_perk_points = 1 + if = { + limit = { + exists = capital_county + } + capital_county.title_province = { + add_province_modifier = { + modifier = minor_increased_castle_defense + days = 3650 + } + } + } + } + + option = { + name = martial_strategy_special.1399.b + trigger = { + var:storm_castle_points <= 3 + } + if = { + limit = { exists = capital_county } + capital_county = { + add_county_modifier = { + modifier = minor_increased_castle_defense + days = 3650 + } + } + } + } + after = { + remove_character_flag = is_in_martial_special_event + remove_variable = storm_castle_points + remove_variable = storm_castle_step + } +} + + + +################################# +# MARCH GONE AWRY, by Petter Vilberg +# 1400 - 1499 +################################# +#Structure explanation: +# 1401 sets up the loop +# Every successive event needs to: +# The immediate must mark the event as having been used, and block itself from happening again in this cycle +# An option with a cost must fire the search_for_troops_event_selection event selection +# Giving up should route the player to the failure event (1499) +# Eventually, an increasing random weight will send the character to the success event (1498) +# Each event should have a "free" option that continues the chain, unlocked by traits or other conditions + + +scripted_effect martial_strategy_special_1401_give_up_effect = { + custom_tooltip = martial_strategy_special.1401.give_up + stress_impact = { + base = medium_stress_impact_loss + diligent = minor_stress_impact_gain + stubborn = minor_stress_impact_gain + lazy = minor_stress_impact_loss + fickle = minor_stress_impact_loss + } + hidden_effect = { + trigger_event = { + id = martial_strategy_special.1499 + days = 3 + } + } +} + +#Setup +martial_strategy_special.1401 = { + type = character_event + title = martial_strategy_special.1401.t + desc = { + desc = martial_strategy_special.1401.opening + first_valid = { + triggered_desc = { + trigger = { + exists = scope:commander + } + desc = martial_strategy_special.1401.commander + } + desc = martial_strategy_special.1401.officer_fallback + } + desc = martial_strategy_special.1401.end + } + theme = martial_strategy_focus + left_portrait = { + character = root + animation = boredom + } + right_portrait = scope:commander + + trigger = { + has_focus = martial_strategy_focus + is_landed = yes + NOT = { has_character_flag = had_event_martial_strategy_special_1401 } + any_knight = { basic_is_available_ai = yes } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = is_in_martial_special_event + days = 100 + } + add_character_flag = had_event_martial_strategy_special_1401 + random_knight = { + limit = { basic_is_available_ai = yes } + save_scope_as = commander + } #Done here to guarantee it is applied, no matter the outcome + capital_barony = { + save_scope_as = capital + } + } + + option = { #Start looping towards ranking up + name = martial_strategy_special.1401.a + flavor = martial_strategy_special.1401.a.tt + hidden_effect = { + set_variable = { + name = search_for_troops_event_count + value = 0 + days = 365 + } + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + custom_tooltip = martial_lifestyle_perk_indication + ai_chance = { + base = 100 + } + } + + option = { #No thanks. + name = martial_strategy_special.1401.b + + scope:commander = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + remove_character_flag = is_in_martial_special_event + + ai_chance = { + base = 0 + } + } +} + + +#Soldiers are hanging out in a local tavern +martial_strategy_special.1402 = { + type = character_event + title = martial_strategy_special.1402.t + desc = martial_strategy_special.1402.desc + theme = martial_strategy_focus + override_background = { + reference = bp1_crossroads_inn + } + left_portrait = { + character = root + animation = stress + } + + trigger = { + NOT = { + has_character_flag = had_event_1402 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_1402 + days = 365 + } + change_variable = { + name = search_for_troops_event_count + add = 1 + } + } + + option = { #Pay for the tavern to throw them out + name = martial_strategy_special.1402.a + flavor = martial_strategy_special.1402.a.tt + remove_short_term_gold = minor_gold_value + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + add = 30 + has_trait = generous + } + modifier = { + add = -80 + short_term_gold < minor_gold_value_check + } + } + } + + option = { #Have a drink with them, and feast until they come with! + name = martial_strategy_special.1402.b + flavor = martial_strategy_special.1402.b.tt + add_prestige = minor_prestige_loss + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + temperate = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.75 + } + } + } + + option = { #Give up + name = martial_strategy_special.1402.c + martial_strategy_special_1401_give_up_effect = yes + ai_chance = { + base = 1 + } + } + + option = { #I can convince them! + name = martial_strategy_special.1402.d + flavor =martial_strategy_special.1402.d.tt + trigger = { + OR = { + has_trait = gregarious + has_diplomacy_lifestyle_trait_trigger = yes + } + } + trait = gregarious + trait = diplomat + trait = family_first + trait = august + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + } +} + + +#Soldiers have run out of water and are camped by a lake +martial_strategy_special.1403 = { + type = character_event + title = martial_strategy_special.1403.t + desc = martial_strategy_special.1403.desc + theme = martial_strategy_focus + left_portrait = root + + + trigger = { + NOT = { + has_character_flag = had_event_1403 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_1403 + days = 365 + } + change_variable = { + name = search_for_troops_event_count + add = 1 + } + } + + option = { #Have your knights carry water + name = martial_strategy_special.1403.a + flavor = martial_strategy_special.1403.a.tt + add_prestige = minor_prestige_loss + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.5 + } + modifier = { + add = -100 + has_trait = arrogant + } + } + } + + option = { #Have them march home + name = martial_strategy_special.1403.b + flavor = martial_strategy_special.1403.b.tt + if = { + limit = { exists = capital_county } + capital_county = { + add_county_modifier = { + modifier = martial_strategy_reduced_capital_levy_modifier + years = 5 + } + } + } + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + diligent = minor_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1 + ai_rationality = -0.5 + } + } + } + + option = { #Give up + name = martial_strategy_special.1403.c + martial_strategy_special_1401_give_up_effect = yes + ai_chance = { + base = 1 + } + } + + option = { #I think I can come up with a solution for this... + name = martial_strategy_special.1403.d + flavor = martial_strategy_special.1403.d.tt + trigger = { + OR = { + has_trait = logistician + has_trait = military_engineer + } + } + trait = logistician + trait = military_engineer + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + lazy = minor_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 1000 + } + } +} + + +#A knight has taken it upon themselves to continue training +martial_strategy_special.1404 = { + type = character_event + title = martial_strategy_special.1404.t + desc = martial_strategy_special.1404.desc + theme = martial_strategy_focus + left_portrait = root + right_portrait = scope:knight + lower_right_portrait = scope:soldier_friend + + trigger = { + NOT = { + has_character_flag = had_event_1404 + } + any_knight = { + is_available_ai = yes + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_1404 + days = 365 + } + change_variable = { + name = search_for_troops_event_count + add = 1 + } + if = { + limit = { any_relation = { type = soldier_friend } } + random_relation = { + type = soldier_friend + save_scope_as = soldier_friend + } + } + random_knight = { + limit = { + is_available_ai = yes + } + save_scope_as = knight + } + } + + option = { # I am the real commander here! + name = martial_strategy_special.1404.a + flavor = martial_strategy_special.1404.a.tt + + scope:knight = { + add_opinion = { + modifier = insult_opinion + target = root + opinion = -20 + } + } + + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + humble = minor_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = -0.25 + ai_rationality = 0.25 + } + } + } + + option = { # We will drill until they get it right! + name = martial_strategy_special.1404.b + flavor = martial_strategy_special.1404.b.tt + + add_character_modifier = { + modifier = upset_troops_modifier + days = 1825 + } + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + forgiving = minor_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.25 + ai_vengefulness = 1 + } + } + } + + option = { #Give up + name = martial_strategy_special.1404.c + martial_strategy_special_1401_give_up_effect = yes + ai_chance = { + base = 1 + } + } + + option = { #My soldier friend can handle this instead of the sergeant + name = martial_strategy_special.1404.d + flavor = martial_strategy_special.1404.d.tt + + trigger = { + any_relation = { type = soldier_friend } + } + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 1000 + } + } +} + + +#The troops have started listening to a local preacher +martial_strategy_special.1405 = { + type = character_event + title = martial_strategy_special.1405.t + desc = martial_strategy_special.1405.desc + left_portrait = root + right_portrait = { + character = scope:zealot + animation = personality_zealous + } + theme = martial_strategy_focus + + trigger = { + NOT = { + has_character_flag = had_event_1405 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_1405 + days = 365 + } + change_variable = { + name = search_for_troops_event_count + add = 1 + } + create_character = { + location = scope:capital.title_province + gender_female_chance = root_faith_clergy_gender_female_chance + age = { 16 60 } + culture = root.culture + faith = root.faith + trait = zealous + random_traits_list = { + count = 2 + calm = {} + brave = {} + gregarious = {} + ambitious = {} + stubborn = {} + arrogant = {} + } + save_scope_as = zealot + } + } + + option = { #Emphasise that I am the ruler chosen by HIGH GOD + name = martial_strategy_special.1405.a + flavor = martial_strategy_special.1405.a.tt + + add_prestige = medium_prestige_gain + add_character_modifier = { + modifier = martial_strategy_claimed_divine_right_modifier + years = 5 + } + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + hidden_effect = { + scope:zealot = { + death = { + death_reason = death_disappearance + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + option = { #Have the preacher sent away + name = martial_strategy_special.1405.b + flavor = martial_strategy_special.1405.b.tt + + scope:zealot = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + add_piety = minor_piety_loss + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + stress_impact = { + zealous = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_boldness = 0.5 + } + } + } + + option = { #Give up + name = martial_strategy_special.1405.c + martial_strategy_special_1401_give_up_effect = yes + ai_chance = { + base = 1 + } + + hidden_effect = { + scope:zealot = { + death = { + death_reason = death_disappearance + } + } + } + } + + option = { #Convince the preacher to side with you + name = martial_strategy_special.1405.d + flavor = martial_strategy_special.1405.d.tt + + trigger = { + OR = { + has_trait = zealous + has_trait = holy_warrior + } + } + trait = holy_warrior + trait = zealous + + add_courtier = scope:zealot + hidden_effect = { + trigger_event = { + on_action = search_for_troops_event_selection + days = { 5 15 } + } + } + custom_tooltip = martial_strategy_special.1401.continue_search_tooltip + ai_chance = { + base = 1000 + } + } + + after = { + scope:zealot = { + silent_disappearance_ai_effect = yes + } + } +} + + +#Successful Conclusion! +martial_strategy_special.1498 = { + type = character_event + title = martial_strategy_special.1498.t + desc = martial_strategy_special.1498.desc + + theme = martial_strategy_focus + left_portrait = root + + trigger = { + var:search_for_troops_event_count > 1 + } + + weight_multiplier = { #Increase the likelihood of succeeding for every event that has fired. + base = 1 + modifier = { + add = 1 + var:search_for_troops_event_count > 2 + } + modifier = { + add = 1 + var:search_for_troops_event_count > 3 + } + } + + immediate = { + hidden_effect = { + remove_character_flag = had_event_1402 + remove_character_flag = had_event_1403 + remove_character_flag = had_event_1404 + remove_character_flag = had_event_1405 + } + } + + option = { + name = martial_strategy_special.1498.a + add_martial_lifestyle_perk_points = 1 + } + + after = { + hidden_effect = { + remove_variable = search_for_troops_event_count + } + } +} + +#Failed Conclusion +martial_strategy_special.1499 = { + type = character_event + title = martial_strategy_special.1499.t + desc = martial_strategy_special.1499.desc + theme = martial_strategy_focus + left_portrait = root + + + immediate = { + hidden_effect = { + remove_character_flag = had_event_1402 + remove_character_flag = had_event_1403 + remove_character_flag = had_event_1404 + remove_character_flag = had_event_1405 + } + } + + option = { + name = martial_strategy_special.1499.a + add_character_modifier = { + modifier = self_sufficient_troops_modifier + days = 1825 + } + } + + after = { + hidden_effect = { + remove_variable = search_for_troops_event_count + } + } +} diff --git a/N3OW/events/lifestyles/warfare_lifestyle/martial_strategy_events_2.txt b/N3OW/events/lifestyles/warfare_lifestyle/martial_strategy_events_2.txt new file mode 100644 index 00000000..a18a7c2f --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/martial_strategy_events_2.txt @@ -0,0 +1,729 @@ +namespace = martial_strategy + +################################################## + +#Martial Strategy Lifestyle events + + # 4000 - You visit some baronies or go partying. + # 4010 - Rebuild the walls of a lesser domain county. + # 7000 - Why do we keep always charging in a straight line? + +################################################## + +################################################## +# Stocking the Stores +# by Ewan Cowhig Croft +# 4000 +################################################## + +#A bumper harvest lets you either eat richly or heavily-stock the stores of your capital. +martial_strategy.4000 = { #by Ewan Cowhig Croft + type = character_event + title = martial_strategy.4000.t + desc = martial_strategy.4000.desc + theme = martial_strategy_focus + override_background = { + reference = feast + } + left_portrait = { + character = root + animation = drink_goblet + } + + trigger = { + is_at_war = no + is_landed = yes + NOT = { has_character_flag = had_event_martial_strategy_4000 } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + upweight_for_focus_modifier = { FOCUS = stewardship_domain_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_strategy_4000 + days = 1825 + } + capital_county = { + county = { save_scope_as = harvest_county } + } + } + + option = { + name = martial_strategy.4000.a + capital_county = { + add_county_modifier = { + modifier = strategy_stocked_larders_modifier + years = 15 + } + } + stress_impact = { gluttonous = medium_stress_impact_gain } + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = -75 } + ai_rationality_target_modifier = { VALUE = 75 } + } + } + option = { + name = martial_strategy.4000.b + capital_county = { + add_county_modifier = { + modifier = strategy_emptied_larders_modifier + years = 15 + } + } + stress_impact = { + temperate = medium_stress_impact_gain + gluttonous = minor_stress_impact_loss + } + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = -50 } + ai_rationality_target_modifier = { VALUE = 100 } + } + } + option = { + name = martial_strategy.4000.c + scope:harvest_county = { + add_county_modifier = { + modifier = strategy_fed_peasants_larders_modifier + years = 15 + } + add_county_modifier = { + modifier = strategy_emptied_larders_modifier + years = 15 + } + } + stress_impact = { + callous = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = 100 } + ai_rationality_target_modifier = { VALUE = -50 } + } + } + option = { + name = martial_strategy.4000.d + trigger = { + OR = { + has_trait = cannibal + has_trait = lunatic + has_trait = sadistic + any_secret = { type = secret_cannibal } + faith = { has_doctrine_parameter = cannibalism_legal } + } + } + trait = cannibal + trait = lunatic_1 + trait = lunatic_genetic + trait = sadistic + capital_county = { + add_county_modifier = { + modifier = strategy_human_meat_larders_modifier + years = 15 + } + add_county_modifier = { + modifier = strategy_entirely_unrelated_disappearances_modifier + years = 15 + } + } + if = { + limit = { + faith = { has_doctrine_parameter = cannibalism_legal } + } + add_piety = major_piety_gain #Cannibalistic faiths are pretty in to this whole idea. + } + else = { + add_piety = { #Non-cannibalistic faiths tend to look down on mass-cannibalism. + value = major_piety_loss + subtract = medium_piety_value + } + } + if = { + limit = { + NOT = { has_trait = cannibal } + } + give_cannibal_secret_or_trait_effect = yes + } + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + } + if = { + limit = { + NOR = { + has_trait = compassionate + has_trait = just + } + } + add_stress = major_stress_loss + } + ai_chance = { + base = 100 + ai_compassion_target_modifier = { VALUE = -75 } + ai_rationality_target_modifier = { VALUE = -75 } + } + } +} + +################################################## +# The Walls of [Title County Capital] +# by Ewan Cowhig Croft +# 4010 +################################################## + +scripted_trigger martial_strategy_4010_trigger_evaluation = { + this != province_owner.capital_province + is_county_capital = yes +} + +#Rebuild the walls of a lesser domain county, or let them crumble. +martial_strategy.4010 = { #by Ewan Cowhig Croft + type = character_event + title = martial_strategy.4010.t + desc = martial_strategy.4010.desc + theme = martial_strategy_focus + override_background = { + reference = study + } + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:r_architect + animation = interested + } + + trigger = { + is_at_war = no + NOT = { has_character_flag = had_event_martial_strategy_4010 } + any_directly_owned_province = { martial_strategy_4010_trigger_evaluation = yes } + NOT = { government_has_flag = government_is_nomadic } + } + + weight_multiplier = { + base = 1 + upweight_for_focus_modifier = { FOCUS = martial_strategy_focus } + } + + immediate = { + add_character_flag = { + flag = had_event_martial_strategy_4010 + days = 1825 + } + random_directly_owned_province = { + limit = { + county.county_control < full_county_control + martial_strategy_4010_trigger_evaluation = yes + } + alternative_limit = { + always = yes + martial_strategy_4010_trigger_evaluation = yes + } + weight = { + base = 1 + modifier = { + add = { + value = 120 + subtract = county.county_control + } + } + } + county = { save_scope_as = crumbling_county } + barony = { save_scope_as = crumbling_holding } + } + if = { + limit = { + has_royal_court = yes + employs_court_position = royal_architect_court_position + any_court_position_holder = { + type = royal_architect_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = royal_architect_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = r_architect + } + } + } + + option = { + name = martial_strategy.4010.a + trigger = { + trigger_if = { + limit = { is_ai = yes } + short_term_gold >= major_gold_value + } + } + scope:crumbling_county = { + add_county_modifier = { + modifier = strategy_paid_for_walls_modifier + years = 20 + } + } + remove_treasury_or_gold = medium_treasury_or_gold_value + add_stewardship_lifestyle_xp = minor_lifestyle_xp + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = -100 } + ai_compassion_target_modifier = { VALUE = 100 } + } + } + option = { + name = martial_strategy.4010.b + trigger = { + OR = { + has_ep1_court_positions_dlc_trigger = no + NOT = { exists = scope:r_architect } + } + } + duel = { + skill = stewardship + value = high_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.0 + } + desc = martial_strategy.4010.b.tt_crit_success + send_interface_toast = { + title = martial_strategy.4010.b.tt_crit_success + left_icon = scope:crumbling_county + scope:crumbling_county = { + add_county_modifier = { + modifier = strategy_successfully_supervised_walls_modifier + years = 100 + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.2 + } + desc = martial_strategy.4010.b.tt_success + send_interface_toast = { + title = martial_strategy.4010.b.tt_success + left_icon = scope:crumbling_county + scope:crumbling_county = { + add_county_modifier = { + modifier = strategy_successfully_supervised_walls_modifier + years = 20 + } + } + } + } + 10 = { + desc = martial_strategy.4010.b.tt_botch + send_interface_toast = { + title = martial_strategy.4010.b.tt_botch + left_icon = scope:crumbling_county + scope:crumbling_county = { + add_county_modifier = { + modifier = strategy_botched_supervised_walls_modifier + years = 20 + } + } + } + } + } + if = { + limit = { + NOT = { has_trait = architect } + } + add_stress = medium_stress_gain + } + add_martial_lifestyle_xp = medium_lifestyle_xp + stress_impact = { architect = medium_stress_impact_loss } + ai_chance = { + base = 100 + ai_energy_target_modifier = { VALUE = 100 } + # Rational characters reasonably estimate their own skill level here. + modifier = { + trigger = { + ai_rationality >= low_positive_ai_value + } + add = { + value = stewardship + add = -10 + multiply = 10 # -100 at 0 Stewardship, +0 at 10 Stewardship, +100 at 20 Stewardship. + } + } + } + } + + option = { + name = martial_strategy.4010.d + trigger = { + exists = scope:r_architect + } + scope:r_architect = { + duel = { + skill = stewardship + value = high_skill_rating + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.0 + } + desc = martial_strategy.4010.d.tt_crit_success + send_interface_toast = { + title = martial_strategy.4010.d.tt_crit_success + left_icon = scope:crumbling_county + scope:crumbling_county = { + add_county_modifier = { + modifier = strategy_successfully_supervised_walls_modifier + years = 100 + } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.2 + } + desc = martial_strategy.4010.d.tt_success + send_interface_toast = { + title = martial_strategy.4010.d.tt_success + left_icon = scope:crumbling_county + scope:crumbling_county = { + add_county_modifier = { + modifier = strategy_successfully_supervised_walls_modifier + years = 20 + } + } + } + } + 5 = { + desc = martial_strategy.4010.d.tt_botch + send_interface_toast = { + title = martial_strategy.4010.d.tt_botch + left_icon = scope:crumbling_county + scope:crumbling_county = { + add_county_modifier = { + modifier = strategy_botched_supervised_walls_modifier + years = 20 + } + } + } + } + } + } + ai_chance = { + base = 100 + } + } + + option = { + name = martial_strategy.4010.c + scope:crumbling_county = { + add_county_modifier = { + modifier = strategy_let_walls_crumble_modifier + years = 20 + } + } + add_gold = medium_gold_value + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = 100 } + ai_vengefulness_target_modifier = { VALUE = 100 } + } + } +} + +namespace = martial_strategy + + +# Tactics? +# By Isabella Welch + +scripted_trigger has_war_elephants = { + "number_maa_regiments_of_type(war_elephant)" > 0 +} + +scripted_trigger has_heavy_cavalry = { + number_maa_regiments_of_base_type = { + type = heavy_cavalry + value > 0 + } +} + +martial_strategy.7000 = { + type = character_event + title = martial_strategy.7000.t + desc = { + desc = martial_strategy.7000.desc_opening + first_valid = { + triggered_desc = { + trigger = { + has_war_elephants = yes + } + desc = martial_strategy.7000.desc_elephantry + } + desc = martial_strategy.7000.desc_cavalry + } + + desc = martial_strategy.7000.desc_middle + + first_valid = { + triggered_desc = { + trigger = { + has_war_elephants = yes + } + desc = martial_strategy.7000.desc_war_elephant + } + desc = martial_strategy.7000.desc_armored_horse + } + desc = martial_strategy.7000.desc_cont + } + theme = martial_strategy_focus + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:worried_knight + animation = worry + } + trigger = { + any_knight = { + is_alive = yes + NOT = { has_trait = brave } + } + OR = { + has_heavy_cavalry = yes + has_war_elephants = yes + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_knight = { + limit = { NOT = { has_trait = brave } } + weight = { + base = 1 + modifier = { + add = 8 + prowess >= high_skill_rating + } + modifier = { + factor = 4 + is_powerful_vassal = yes + } + } + save_scope_as = worried_knight + } + } + + + option = { + name = martial_strategy.7000.a + trigger = { + NOT = { + has_trait = sadistic + } + } + scope:worried_knight = { + if = { + limit = { + is_landed = yes + } + add_opinion = { + target = root + opinion = -10 + modifier = insulted_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -20 + modifier = insulted_opinion + } + } + } + add_dread = 10 + add_martial_lifestyle_xp = medium_lifestyle_xp + ai_chance = { + base = 100 + } + } + + option = { + trigger = { + NOR = { + has_trait = strategist + has_trait_rank = { + trait = education_martial + rank >= 2 + } + "number_maa_regiments_of_type(war_elephant)" > 0 + } + } + name = martial_strategy.7000.b + add_martial_lifestyle_xp = medium_lifestyle_xp + scope:worried_knight = { + add_opinion = { + target = root + opinion = -15 + modifier = scared_opinion + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + } + } + add_prestige = minor_prestige_gain + } + option = { + trigger = { + has_war_elephants = yes + NOR = { + has_trait = strategist + has_trait_rank = { + trait = education_martial + rank >= 2 + } + } + } + name = martial_strategy.7000.c + add_martial_lifestyle_xp = medium_lifestyle_xp + scope:worried_knight = { + if = { + limit = { + is_landed = yes + } + add_opinion = { + target = root + opinion = -20 + modifier = scared_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -40 + modifier = scared_opinion + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 3 + } + } + add_prestige = minor_prestige_gain + } + + option = { + trigger = { + OR = { + has_trait = strategist + has_trait_rank = { + trait = education_martial + rank >= 2 + } + } + } + add_prestige = medium_prestige_gain + trait = strategist + trait = education_martial_5 + trait = education_martial_4 + trait = education_martial_3 + name = martial_strategy.7000.d + add_character_modifier = { + modifier = crushing_charge_modifier + years = 10 + } + add_martial_lifestyle_xp = major_lifestyle_xp + scope:worried_knight = { + if = { + limit = { + is_landed = yes + } + add_opinion = { + target = root + opinion = -20 + modifier = annoyed_opinion + } + } + else = { + add_opinion = { + target = root + opinion = -40 + modifier = annoyed_opinion + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 5 + } + } + } + + option = { + name = martial_strategy.7000.e + add_prestige = minor_prestige_loss + scope:worried_knight = { + if = { + limit = { + is_landed = yes + } + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + else = { + add_opinion = { + target = root + opinion = 40 + modifier = pleased_opinion + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -3 + } + } + } + option = { + name = martial_strategy.7000.f + trigger = { + has_trait = sadistic + } + trait = sadistic + scope:worried_knight = { + add_opinion = { + target = root + opinion = -40 + modifier = hate_opinion + } + increase_wounds_effect = { REASON = crushed } + } + stress_impact = { + sadistic = minor_stress_loss + } + } +} diff --git a/N3OW/events/lifestyles/warfare_lifestyle/warhorse_events.txt b/N3OW/events/lifestyles/warfare_lifestyle/warhorse_events.txt new file mode 100644 index 00000000..7461ef88 --- /dev/null +++ b/N3OW/events/lifestyles/warfare_lifestyle/warhorse_events.txt @@ -0,0 +1,1578 @@ + +namespace = warhorse + + +########################################### +# Name your warhorse +# by Linnéa Thimrén +# warhorse.0001 - Name your warhorse! Choose category +# warhorse.0002 - Historical name +# warhorse.0003 - Mythological name +# warhorse.0004 - Common name +# +# Other events for your warhorse +# by Linnéa Thimrén +# warhorse.1001 - Buy new gear for your horse +# warhorse.1101 - Stress reduction or prowess +# warhorse.1201 - Your horse is sick! Pay gold or risk its death +# warhorse.1301 - Another horse-enthusiast compliments your horse +# warhorse.1401 - Your horse is cursed +# +# Breed your warhorse +# by Linnéa Thimrén +# 8001 - You trusted steed is getting old, you should consider breeding! (25-30 years) +########################################### + +########################################### +# Name your warhorse +# 0001-0999 +########################################### + +#Name your warhorse +warhorse.0001 = { + type = character_event + title = warhorse.0001.t + desc = warhorse.0001.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + + option = { #Historical name + name = warhorse.0001.a + trigger_event = warhorse.0002 + } + + option = { #Mythological name + name = warhorse.0001.b + trigger_event = warhorse.0003 + } + + option = { #Common name + name = warhorse.0001.c + trigger_event = warhorse.0004 + } + + after = { + if = { + limit = { + scope:story = { exists = var:story_cycle_horse_name } + } + remove_character_flag = is_in_naming_event + } + } +} + +scripted_trigger warhorse_0002_steppe_trigger = { + OR = { + culture = { + has_cultural_pillar = heritage_mongolic + } + culture = { + has_cultural_pillar = heritage_turkic + } + faith.religion = faith:tengri_pagan.religion + } +} + +#Historical name +warhorse.0002 = { + type = character_event + title = warhorse.0001.t + desc = warhorse.0002.desc + theme = martial_chivalry_focus + override_background = { + reference = market + } + left_portrait = { + character = root + animation = jockey_wave + camera = camera_event_horse_left + } + + option = { + name = warhorse.0002.a + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + OR = { + faith = faith:catholic + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe } + } + culture = { + has_cultural_pillar = heritage_frankish + } + culture = { + has_cultural_pillar = heritage_central_germanic + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #King Charlemagne's warhorse in The Song of Roland + name = story_cycle_horse_name + value = flag:tencendur + } + } + } + } + + option = { + name = warhorse.0002.c + trigger = { + OR = { + faith.religion = religion:hellenism_religion + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_south } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_west } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_middle_east_jerusalem } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_asia_minor } + } + culture = { + has_cultural_pillar = heritage_latin + } + culture = { + has_cultural_pillar = heritage_byzantine + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #The cursed horse of Gnaeus Seius + name = story_cycle_horse_name + value = flag:seianian + } + } + } + } + + option = { + name = warhorse.0002.d + trigger = { + faith.religion = religion:islam_religion + } + hidden_effect = { + scope:story= { + set_variable = { #The horse of Husayn ibn Ali + name = story_cycle_horse_name + value = flag:zuljanah + } + } + } + } + + option = { + name = warhorse.0002.e + trigger = { + OR = { + culture = { + has_cultural_pillar = heritage_chinese + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { OR = { + geographical_region = world_tibet + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #The warlord Lü Bu's horse + name = story_cycle_horse_name + value = flag:red_hare + } + } + } + } + + option = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + OR = { + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_west } + } + culture = { + has_cultural_pillar = heritage_frankish + } + culture = { + has_cultural_pillar = heritage_central_germanic + } + culture = { + has_cultural_pillar = heritage_latin + } + culture = { + has_cultural_pillar = heritage_brythonic + } + culture = { + has_cultural_pillar = heritage_iberian + } + culture = { + has_cultural_pillar = heritage_west_germanic + } + } + } + name = warhorse.0002.f + hidden_effect = { + scope:story= { + set_variable = { # The horse of Roland, general under Charlemagne + name = story_cycle_horse_name + value = flag:veillantif + } + } + } + } + + option = { + trigger = { + OR = { + faith.religion = religion:hellenism_religion + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_south } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe_west } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_middle_east_jerusalem } + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_asia_minor } + } + culture = { + has_cultural_pillar = heritage_latin + } + culture = { + has_cultural_pillar = heritage_byzantine + } + } + } + name = warhorse.0002.g + hidden_effect = { + scope:story= { + set_variable = { # The favorite horse of Emperor Caligula + name = story_cycle_horse_name + value = flag:incitatus + } + } + } + } + #Moved to "historical" horses because close enough? And needs more steppe horses + option = { + name = warhorse.0003.aranjagaan + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #Jangar's mount in the Epic of Jangar + name = story_cycle_horse_name + value = flag:aranjagaan + } + } + } + } + option = { + name = warhorse.0003.aranzhale + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #Another of Jangar's horses in the Epic of Jangar + name = story_cycle_horse_name + value = flag:aranzhale + } + } + } + } + option = { + name = warhorse.0003.oyomaa + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #Mengen Shigshirge's mount in the Epic of Jangar + name = story_cycle_horse_name + value = flag:oyomaa + } + } + } + } + option = { + name = warhorse.0003.rakhsh + trigger = { + current_date > 1000 + OR = { + culture = { + has_cultural_pillar = heritage_iranian + } + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_middle_east_persia } + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #From the Persian national epic Shahnameh + name = story_cycle_horse_name + value = flag:rakhsh + } + } + } + } + + #Moved to end for use as fallback + option = { + trigger = { + warhorse_0002_steppe_trigger = no + } + name = warhorse.0002.b + hidden_effect = { + scope:story= { + set_variable = { #Alexander the Great's horse + name = story_cycle_horse_name + value = flag:bucephalus + } + } + } + } + + option = { + name = warhorse.0002.go_back + trigger_event = warhorse.0001 + } + + after = { + if = { + limit = { + scope:story = { exists = var:story_cycle_horse_name } + } + remove_character_flag = is_in_naming_event + } + } +} + +#Mythological +warhorse.0003 = { + type = character_event + title = warhorse.0001.t + desc = warhorse.0003.desc + theme = martial_chivalry_focus + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = jockey_gallop + camera = camera_event_horse_very_left + } + + option = { + name = warhorse.0003.khiimori + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #The Wind Horse in Mongolic syncretic spirituality + name = story_cycle_horse_name + value = flag:khiimori + } + } + } + } + option = { + name = warhorse.0003.tulpar + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #A winged Turkic horse + name = story_cycle_horse_name + value = flag:tulpar + } + } + } + } + option = { + name = warhorse.0003.rlung_rta + trigger = { + OR = { + faith = faith:lamaism + culture = { + has_cultural_pillar = heritage_tibetan + } + } + } + hidden_effect = { + scope:story= { + set_variable = { #The Wind Horse in Tibetan Buddhism + name = story_cycle_horse_name + value = flag:rlung_rta + } + } + } + } + option = { + name = warhorse.0003.jonon_khar + trigger = { + warhorse_0002_steppe_trigger = yes + } + hidden_effect = { + scope:story= { + set_variable = { #The origin story of the horsehead fiddle, a flying horse + name = story_cycle_horse_name + value = flag:jonon_khar + } + } + } + } + option = { + name = warhorse.0003.llamrei + trigger = { + trigger_if = { + limit = { is_landed = yes } + capital_province = { geographical_region = world_europe } + } + trigger_else_if = { + limit = { exists = location } + location = { geographical_region = world_europe } + } + trigger_else = { always = yes } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of King Arthur + name = story_cycle_horse_name + value = flag:llamrei + } + } + } + } + + option = { + name = warhorse.0003.sleipnir + trigger = { + faith = { religion_tag = germanic_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Oden + name = story_cycle_horse_name + value = flag:sleipnir + } + } + } + } + + option = { + name = warhorse.0003.uchchaihshravas + trigger = { + faith = { religion_tag = hinduism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Surya (and Bali) + name = story_cycle_horse_name + value = flag:uchchaihshravas + } + } + } + } + + option = { + name = warhorse.0003.dadhi_kra + trigger = { + faith = { religion_tag = hinduism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Personification of the morning Sun + name = story_cycle_horse_name + value = flag:dadhi_kra + } + } + } + } + + option = { + name = warhorse.0003.devadatta + trigger = { + faith = { religion_tag = hinduism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Kalki + name = story_cycle_horse_name + value = flag:devadatta + } + } + } + } + + option = { + name = warhorse.0003.keshi + trigger = { + faith = { religion_tag = hinduism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Kalki + name = story_cycle_horse_name + value = flag:keshi + } + } + } + } + + option = { + name = warhorse.0003.kanthaka + trigger = { + faith = { religion_tag = buddhism_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of Siddhartha + name = story_cycle_horse_name + value = flag:kanthaka + } + } + } + } + + option = { + name = warhorse.0003.haizum + trigger = { + faith = { religion_tag = islam_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of the archangel Gabriel (Jibril) + name = story_cycle_horse_name + value = flag:haizum + } + } + } + } + + option = { + name = warhorse.0003.buraq + trigger = { + faith = { religion_tag = islam_religion } + } + hidden_effect = { + scope:story= { + set_variable = { #Horse of certain prophets + name = story_cycle_horse_name + value = flag:buraq + } + } + } + } + + option = { + name = warhorse.0003.burko + trigger = { + culture = { has_cultural_pillar = heritage_east_slavic } + } + hidden_effect = { + scope:story= { + set_variable = { #Magical horse in Russian folklore + name = story_cycle_horse_name + value = flag:burko + } + } + } + } + + option = { + trigger = { + warhorse_0002_steppe_trigger = no + } + name = warhorse.0003.balius + hidden_effect = { + scope:story= { + set_variable = { #Horse of Achilles + name = story_cycle_horse_name + value = flag:balius + } + } + } + } + + option = { + trigger = { + warhorse_0002_steppe_trigger = no + } + name = warhorse.0003.xanthos + hidden_effect = { + scope:story= { + set_variable = { #Horse of Achilles + name = story_cycle_horse_name + value = flag:xanthos + } + } + } + } + + option = { + trigger = { + warhorse_0002_steppe_trigger = no + } + name = warhorse.0003.boreas + hidden_effect = { + scope:story= { + set_variable = { #God of the north wind + name = story_cycle_horse_name + value = flag:boreas + } + } + } + } + + option = { + name = warhorse.0002.go_back + trigger_event = warhorse.0001 + } + + after = { + if = { + limit = { + scope:story = { exists = var:story_cycle_horse_name } + } + remove_character_flag = is_in_naming_event + } + } +} + +#Common +warhorse.0004 = { + type = character_event + title = warhorse.0001.t + desc = warhorse.0004.desc + theme = martial_chivalry_focus + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_extreme_closeup_left + } + + option = { + name = warhorse.0004.a + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:charger + } + } + } + } + + option = { + trigger = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + name = warhorse.0004.b + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:abbot + } + } + } + } + + option = { + name = warhorse.0004.c + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:prancer + } + } + } + } + option = { + name = warhorse.0004.courser + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:courser + } + } + } + } + + option = { + name = warhorse.0004.d + trigger = { + has_trait = lunatic + } + hidden_effect = { + scope:story= { + set_variable = { + name = story_cycle_horse_name + value = flag:glitterhoof + } + } + } + } + + option = { + name = warhorse.0002.go_back + trigger_event = warhorse.0001 + } + + after = { + if = { + limit = { + scope:story = { exists = var:story_cycle_horse_name } + } + remove_character_flag = is_in_naming_event + } + } +} + + +########################################### +# Other events for your warhorse +# 1001-1999 +########################################### + +#Pay gold to get a better modifier +#Buy new gear for your horse +warhorse.1001 = { + type = character_event + title = warhorse.1001.t + desc = warhorse.1001.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + + trigger = { + NOT = { + has_character_flag = had_warhorse_1001_event + root.var:warhorse_modifier_level >= 2 #Update if we add more levels later + } + minor_gold_value_trigger = yes + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1001_event + days = 1825 + } + if = { + limit = { + has_royal_court = yes + employs_court_position = master_of_horse_court_position + any_court_position_holder = { + type = master_of_horse_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = master_of_horse_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = m_horse + } + } + } + + option = { #Strength + name = warhorse.1001.a + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:strength + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + ai_chance = { + base = 50 + } + } + + option = { #Agility + name = warhorse.1001.b + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:agility + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + ai_chance = { + base = 50 + } + } + + option = { #Endurance + name = warhorse.1001.c + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:endurance + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + ai_chance = { + base = 50 + } + } + + option = { #Fierceness + name = warhorse.1001.d + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:fierceness + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + ai_chance = { + base = 50 + } + } + + option = { #Master of Horse + name = warhorse.1001.f + trigger = { + exists = scope:m_horse + } + custom_tooltip = warhorse.1001.f.tt + scope:m_horse = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + hidden_effect = { + random_list = { + 50 = { # nothing happens + modifier = { + scope:m_horse.aptitude:master_of_horse_court_position = 4 + factor = 0.1 + } + modifier = { + scope:m_horse.aptitude:master_of_horse_court_position = 3 + factor = 0.2 + } + modifier = { + scope:m_horse.aptitude:master_of_horse_court_position = 2 + factor = 0.3 + } + modifier = { + scope:m_horse.aptitude:master_of_horse_court_position = 1 + factor = 0.5 + } + send_interface_toast = { + title = warhorse.1001.f.failure + left_icon = scope:m_horse + custom_tooltip = warhorse.1001.f.failure.tt + } + } + 5 = { #Your master of the horse makes your horse better + save_scope_value_as = { + name = horse_skill_to_level + value = flag:strength + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + } + 5 = { #Your master of the horse makes your horse better + save_scope_value_as = { + name = horse_skill_to_level + value = flag:agility + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + } + 5 = { #Your master of the horse makes your horse better + save_scope_value_as = { + name = horse_skill_to_level + value = flag:endurance + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + } + 5 = { #Your master of the horse makes your horse better + save_scope_value_as = { + name = horse_skill_to_level + value = flag:fierceness + } + trigger_event = { + id = warhorse.1002 + days = { 7 9 } + } + } + } + } + ai_chance = { + base = 70 + } + } + + option = { #Nah + name = warhorse.1001.e + custom_tooltip = warhorse.1001.e.tt + ai_chance = { + base = 0 + ai_value_modifier = { + ai_greed = 0.75 + } + } + } +} + +#My horse is cooler now! +warhorse.1002 = { + type = character_event + title = warhorse.1001.t + desc = warhorse.1002.desc + theme = martial_chivalry_focus + override_background = { + reference = terrain + } + left_portrait = { + character = root + animation = jockey_victory + camera = camera_event_horse_left + } + + immediate = { + level_horse_modifier_effect = yes + } + + option = { + name = warhorse.1002.a + } +} + +#Stress reduction or prowess +warhorse.1101 = { + type = character_event + title = warhorse.1101.t + desc = warhorse.1101.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + + trigger = { + NOT = { has_character_flag = had_warhorse_1101_event } + stress > medium_stress_gain + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + stress > 75 + } + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1101_event + days = 1825 + } + } + + option = { #Practice cool battle stuff + name = warhorse.1101.a + add_character_modifier = { + modifier = horse_practice_modifier + years = 5 + } + stress_impact = { + base = minor_stress_gain + diligent = medium_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = 0.5 + } + } + } + + option = { #Ride leisurely + name = warhorse.1101.b + stress_impact = { + base = medium_stress_loss + lazy = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + + +#Your horse is sick! Pay gold or risk its death (end of story) +warhorse.1201 = { + type = character_event + title = warhorse.1201.t + desc = warhorse.1201.desc + theme = martial_chivalry_focus + override_background = { + reference = alley_night + } + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_very_left + } + override_effect_2d = { + reference = rain + } + + trigger = { + NOT = { has_character_flag = had_warhorse_1201_event } + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1201_event + days = 1825 + } + } + + option = { #I'll pay whatever! + name = warhorse.1201.a + remove_short_term_gold = minor_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.75 + } + } + } + + option = { #no + name = warhorse.1201.b + random_list = { + 50 = { + desc = warhorse.1201.b_good + show_chance = no + custom_tooltip = warhorse.1201.b.tt + send_interface_toast = { + title = warhorse.1201.b_good + } + } + 50 = { + desc = warhorse.1201.b_bad + show_chance = no + send_interface_toast = { + title = warhorse.1201.b_bad + show_as_tooltip = { remove_horse_story_modifiers_effect = yes } + } + scope:story = { + hidden_effect = { end_story = yes } + } + } + } + stress_impact = { + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.25 + ai_greed = 0.25 + } + } + } +} + + +#Another horse-enthusiast compliments your horse +warhorse.1301 = { + type = character_event + title = warhorse.1301.t + desc = warhorse.1301.desc + theme = martial_chivalry_focus + override_background = { + reference = garden + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + right_portrait = { + character = scope:horse_vassal + animation = admiration + camera = camera_event_very_right + } + + trigger = { + NOT = { has_character_flag = had_warhorse_1301_event } + any_vassal = { + is_available_healthy_ai_adult = yes + OR = { + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + has_lifestyle = martial_lifestyle + has_court_position = master_of_horse_court_position + } + } + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1301_event + days = 1825 + } + random_vassal = { + limit = { + is_available_healthy_ai_adult = yes + is_powerful_vassal = yes + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + } + alternative_limit = { + is_available_healthy_ai_adult = yes + has_court_position = master_of_horse_court_position + } + alternative_limit = { + is_available_healthy_ai_adult = yes + is_powerful_vassal = yes + has_lifestyle = martial_lifestyle + } + alternative_limit = { + is_available_healthy_ai_adult = yes + any_owned_story = { + type = story_cycle_martial_lifestyle_warhorse + } + } + alternative_limit = { + is_available_healthy_ai_adult = yes + has_lifestyle = martial_lifestyle + } + save_scope_as = horse_vassal + } + } + + option = { #Let them ride + name = warhorse.1301.a + reverse_add_opinion = { + target = scope:horse_vassal + modifier = friendliness_opinion + opinion = 20 + } + if = { + limit = { #They can't handle the horse + has_character_modifier = horse_fierceness_modifier + scope:horse_vassal = { + prowess < medium_skill_rating + } + } + random = { + chance = 50 + scope:horse_vassal = { + increase_wounds_effect = { REASON = horse_riding_accident } + } + } + custom_tooltip = warhorse.1301.a.tt + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + + } + } + + option = { #Don't let them ride + name = warhorse.1301.b + add_prestige = medium_prestige_gain + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.25 + ai_greed = 0.25 + } + + } + } +} + + +################ +#Your horse is cursed +################ + +#They give you the chills +warhorse.1401 = { + type = character_event + title = warhorse.1401.t + desc = warhorse.1401.desc + theme = martial_chivalry_focus + override_background = { + reference = bp1_bonfire + } + left_portrait = { + character = root + animation = jockey_idle + camera = camera_event_horse_extreme_closeup_left + } + + trigger = { + NOT = { has_character_flag = had_warhorse_1401_event } + scope:story = { + exists = var:story_cycle_horse_name + var:story_cycle_horse_name = flag:seianian + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_warhorse_1401_event + days = 1825 + } + } + + option = { + name = warhorse.1401.a + custom_tooltip = warhorse.1401.a.tt + trigger_event = { + id = warhorse.1402 + days = { 30 60 } + } + } + + option = { + name = warhorse.1401.b + show_as_tooltip = { + remove_horse_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + stress_impact = { + base = minor_stress_loss + } + } +} + +#The horse has injured you +warhorse.1402 = { + type = character_event + title = warhorse.1401.t + desc = warhorse.1402.desc + theme = martial_chivalry_focus + override_background = { + reference = army_camp + } + left_portrait = { + character = root + animation = horse_exhausted + camera = camera_event_horse_left_forward + } + + immediate = { + add_character_modifier = { + modifier = cursed_horse_modifier + years = 5 + } + } + + option = { + name = warhorse.1402.a + random = { + chance = 25 + show_as_tooltip = { + death = { + death_reason = death_horse_riding_accident + } + } + trigger_event = { + id = warhorse.1499 + days = { 30 60 } + } + } + } + + option = { + name = warhorse.1402.b + show_as_tooltip = { + remove_horse_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + } +} + +#The horse kills you... +warhorse.1499 = { + type = character_event + title = warhorse.1401.t + desc = warhorse.1499.desc + theme = martial_chivalry_focus + override_effect_2d = { + reference = rain + trigger = { + location = { + has_winter_trigger = no + graphical_wilderness_desert_trigger = no + } + } + } + override_background = { + reference = wilderness + } + left_portrait = { + character = root + animation = throne_room_kneel_1 + } + + option = { + name = warhorse.1499.a + death = { + death_reason = death_horse_riding_accident + } + } +} + + +########################################### +# Breed your warhorse +# 8001-8999 +########################################### + +#You trusted steed is getting old, you should consider breeding! (25-30 years) +warhorse.8001 = { + type = character_event + title = warhorse.8001.t + desc = warhorse.8001.desc + theme = martial_chivalry_focus + override_background = { + reference = garden + } + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_left + } + + immediate = { + + } + + option = { #Strength + name = warhorse.8001.a + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:strength + } + trigger_event = { #A new horse is born! + id = warhorse.8002 + days = { 30 60 } + } + ai_chance = { + base = 10 + } + } + + option = { #Agility + name = warhorse.8001.b + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:agility + } + trigger_event = { #A new horse is born! + id = warhorse.8002 + days = { 30 60 } + } + ai_chance = { + base = 10 + } + } + + option = { #Endurance + name = warhorse.8001.c + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:endurance + } + trigger_event = { #A new horse is born! + id = warhorse.8002 + days = { 30 60 } + } + ai_chance = { + base = 10 + } + } + + option = { #Fierceness + name = warhorse.8001.d + remove_short_term_gold = minor_gold_value + save_scope_value_as = { + name = horse_skill_to_level + value = flag:fierceness + } + trigger_event = { #A new horse is born! + id = warhorse.8002 + days = { 30 60 } + } + ai_chance = { + base = 10 + } + } + + option = { #Nah + name = warhorse.8001.e + trigger_event = { #Horse dies + id = warhorse.8003 + days = { 30 60 } + } + ai_chance = { + base = 0 + } + } +} + +#A new horse is born! +warhorse.8002 = { + type = character_event + title = warhorse.8002.t + desc = warhorse.8002.desc + theme = martial_chivalry_focus + override_background = { + reference = courtyard + } + left_portrait = { + character = root + animation = personality_compassionate + } + + immediate = { + level_horse_modifier_effect = yes + } + + option = { + name = warhorse.8002.a + } + + after = { + scope:story = { #To start over with the new horse + remove_variable = story_cycle_horse_name + remove_variable = horse_gender + assign_horse_gender_effect = { GENDER = random } + } + } +} + +#Horse dies +warhorse.8003 = { + type = character_event + title = warhorse.8001.t + desc = warhorse.8003.desc + theme = martial_chivalry_focus + override_background = { + reference = garden + } + left_portrait = { + character = root + animation = sadness + } + + immediate = { + + } + + option = { + name = warhorse.8003.a + show_as_tooltip = { + remove_horse_story_modifiers_effect = yes + } + scope:story = { + hidden_effect = { end_story = yes } + } + } +} diff --git a/N3OW/events/marriage_effect_events.txt b/N3OW/events/marriage_effect_events.txt new file mode 100644 index 00000000..c9c99388 --- /dev/null +++ b/N3OW/events/marriage_effect_events.txt @@ -0,0 +1,1126 @@ +#################### +# MARRIAGE EFFECT EVENTS +#################### + +namespace = marriage_effect + +#MOTHER - Bastard secret is removed if you marry the right person +marriage_effect.0001 = { + type = character_event + title = marriage_effect.0001.t + desc = { + first_valid = { + triggered_desc = { #Multiple illegitimate children now legitimate + trigger = { + OR = { + AND = { + AND = { + is_pregnant = yes + pregnancy_real_father = { this = scope:new_spouse } + } + exists = scope:illegitimate_child + } + exists = scope:illegitimate_child_2 + } + } + desc = marriage_effect.0001.desc.multiple + } + triggered_desc = { + trigger = { exists = scope:illegitimate_child } + desc = marriage_effect.0001.desc.child + } + triggered_desc = { + trigger = { + pregnancy_real_father = { this = scope:new_spouse } + } + desc = marriage_effect.0001.desc.pregnancy + } + } + } + theme = marriage + left_portrait = { + character = scope:new_spouse + animation = happiness + } + lower_left_portrait = scope:illegitimate_child #Only appears if child is already born + lower_center_portrait = scope:illegitimate_child_2 #Only appears if there are multiple bastards already born + + trigger = { + is_female = yes + OR = { + AND = { + OR = { + has_character_flag = unmarried_bastard_pregnancy + has_character_flag = bastard_pregnancy + } + pregnancy_real_father = { this = scope:spouse } + } + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { + real_father ?= { + any_spouse = { this = ROOT } + this = scope:spouse #To make sure it is the new spouse + } + } + } + } + } + + on_trigger_fail = { #If the mother isn't the "major" party in the marriage we need to trigger this for her + if = { + limit = { + scope:spouse = { + is_female = yes + OR = { + AND = { + OR = { + has_character_flag = unmarried_bastard_pregnancy + has_character_flag = bastard_pregnancy + } + pregnancy_real_father = { this = root } + } + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { + real_father ?= { + this = root #To make sure it is the new spouse + } + } + } + } + } + } + save_scope_as = spouse_scope + scope:spouse = { + scope:spouse_scope = { + save_scope_as = spouse + } + trigger_event = marriage_effect.0001 + } + } + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_marriage } + save_scope_as = real_mother + if = { + limit = { + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { + real_father = { + any_spouse = { this = ROOT } + this = scope:spouse #To make sure it is the new spouse + } + } + } + } + random_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { + real_father = { + any_spouse = { this = ROOT } + this = scope:spouse #To make sure it is the new spouse + } + } + } + secret_target = { + real_father = { + save_scope_as = new_spouse + } + } + } + } + else ={ + pregnancy_real_father = { save_scope_as = new_spouse } + remove_variable = dead_spouse #To make sure the new spouse is set as father + } + + + if = { + limit = { + exists = var:dead_spouse + } + var:dead_spouse ={ + save_scope_as = dead_father + } + } + + #Marks all the children whose corresponding secret should be cleared + every_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { real_father = { this = scope:new_spouse } } + } + secret_target = { + add_character_flag = clear_bastard_secret + save_scope_as = illegitimate_child #Save for portrait and desc + hidden_effect = { + if = { + limit = { + root = { exists = scope:dead_father } + } + set_father = scope:dead_father + } + else = { + set_father = scope:new_spouse + } + } + } + } + + random_child = { #If there is another child, save it as an event target + limit = { + has_character_flag = clear_bastard_secret + this != scope:illegitimate_child + } + save_scope_as = illegitimate_child_2 + hidden_effect = { + if = { + limit = { + root = { exists = scope:dead_father } + } + set_father = scope:dead_father + } + else_if = { + limit = { + root = { + NOT = { + exists = scope:dead_father + } + } + } + set_father = scope:new_spouse + } + } + } + + if = { #To trigger an event for the real_father if he is a secret_knower + limit = { + OR ={ + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { + real_father = { this = scope:new_spouse } + } + any_secret_knower = { + this = scope:new_spouse + } + } + has_character_flag = unmarried_bastard_pregnancy + has_character_flag = bastard_pregnancy + } + } + scope:new_spouse = { + trigger_event = marriage_effect.0002 + } + } + #To inform all secret knowers + random_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { + real_father = { this = scope:new_spouse } + } + } + every_secret_knower = { + limit = { + NOR = { + this = scope:new_spouse + this = root + } + } + trigger_event = marriage_effect.0003 + } + } + + #If it's a pregnancy then unmark it as a bastard pregnancy + if = { + limit = { + has_character_flag = unmarried_bastard_pregnancy + } + remove_character_flag = unmarried_bastard_pregnancy + } + if = { + limit = { + has_character_flag = bastard_pregnancy + } + remove_character_flag = bastard_pregnancy + } + } + + option = { + name = marriage_effect.0001.a + + stress_impact = { + base = medium_stress_loss + } + + every_secret = { + limit = { + OR = { + secret_target ?= { has_character_flag = clear_bastard_secret } + ROOT = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + } + } + } + remove_secret = yes + } + every_child = { + remove_character_flag = clear_bastard_secret + } + } +} + + + + + +#FATHER - notification event if you marry the mother and knows the secret +marriage_effect.0002 = { + type = character_event + title = marriage_effect.0001.t + desc = { + first_valid = { + triggered_desc = { #Multiple illegitimate children now legitimate + trigger = { + exists = scope:illegitimate_child + exists = scope:illegitimate_child_2 + } + desc = marriage_effect.0002.desc.multiple + } + triggered_desc = { + trigger = { exists = scope:illegitimate_child } + desc = marriage_effect.0002.desc.child + } + triggered_desc = { + trigger = { + scope:real_mother = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + OR = { + has_character_flag = pregnancy_real_father_knows + has_character_flag = pregnancy_real_father_of_bastard_is_known_flag + } + } + } + desc = marriage_effect.0002.desc.pregnancy + } + triggered_desc = { + trigger = { + scope:real_mother = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + } + } + desc = marriage_effect.0002.desc.pregnancy_not_knowing + } + } + } + theme = marriage + right_portrait = { + character = scope:real_mother + animation = happiness + } + left_portrait = { + character = scope:new_spouse + animation = personality_compassionate + } + lower_left_portrait = scope:illegitimate_child #Only appears if child is already born + lower_center_portrait = scope:illegitimate_child_2 #Only appears if there are multiple bastards already born + + trigger = { + is_male = yes + any_spouse = { + this = scope:real_mother + } + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_marriage } + #Marks all the children whose corresponding secret should be cleared + scope:new_spouse = { + every_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { + real_father = { this = scope:new_spouse } + mother = { this = scope:real_mother } + } + } + secret_target = { + add_character_flag = saved_child + save_scope_as = illegitimate_child #Save for portrait and desc + } + } + } + + random_child = { #If there is another child, save it as an event target + limit = { + has_character_flag = saved_child + this != scope:illegitimate_child + } + save_scope_as = illegitimate_child_2 + } + } + + option = { + name = { + trigger = { + scope:real_mother = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + NOR = { + has_character_flag = pregnancy_real_father_knows + has_character_flag = pregnancy_real_father_of_bastard_is_known_flag + } + } + } + text = marriage_effect.0001.a_not_knowing + } + name = { + trigger = { always = yes } + text = marriage_effect.0001.a + } + + #To block other events on the subject + scope:real_mother = { + add_character_flag = { + flag = pregnancy_real_father_knows + months = 9 + } + } + + stress_impact = { + base = medium_stress_loss + } + } +} + + +#Notification event for every other secret knower +marriage_effect.0003 = { + type = character_event + title = marriage_effect.0001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:real_mother = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + } + } + desc = marriage_effect.0003.desc.pregnancy + } + triggered_desc = { #Multiple illegitimate children now legitimate + trigger = { + exists = scope:illegitimate_child + exists = scope:illegitimate_child_2 + } + desc = marriage_effect.0003.desc.multiple + } + triggered_desc = { + trigger = { exists = scope:illegitimate_child } + desc = marriage_effect.0003.desc + } + } + } + theme = marriage + right_portrait = { + character = scope:real_mother + animation = happiness + } + left_portrait = { + character = scope:new_spouse + animation = personality_compassionate + } + lower_left_portrait = scope:illegitimate_child #Only appears if child is already born + lower_center_portrait = scope:illegitimate_child_2 #Only appears if there are multiple bastards already born + + immediate = { play_music_cue_once = { TRACK = mx_cue_marriage } } + + option = { + name = marriage_effect.0001.a + } +} + + +#MOTHER - Bastard secret is removed if you become the concubine of the right person +marriage_effect.0011 = { + type = character_event + title = marriage_effect.0001.t + desc = { + first_valid = { + triggered_desc = { #Multiple illegitimate children now legitimate + trigger = { + OR = { + AND = { + AND = { + is_pregnant = yes + pregnancy_real_father = { this = scope:new_spouse } + } + exists = scope:illegitimate_child + } + exists = scope:illegitimate_child_2 + } + } + desc = marriage_effect.0011.desc.multiple + } + triggered_desc = { + trigger = { exists = scope:illegitimate_child } + desc = marriage_effect.0011.desc.child + } + triggered_desc = { + trigger = { + pregnancy_real_father = { this = scope:new_spouse } + } + desc = marriage_effect.0011.desc.pregnancy + } + } + } + theme = marriage + left_portrait = { + character = scope:new_spouse + animation = happiness + } + lower_left_portrait = scope:illegitimate_child #Only appears if child is already born + lower_center_portrait = scope:illegitimate_child_2 #Only appears if there are multiple bastards already born + + trigger = { + is_female = yes + OR = { + AND = { + OR = { + has_character_flag = unmarried_bastard_pregnancy + has_character_flag = bastard_pregnancy + } + pregnancy_real_father = { this = scope:consort } + } + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { + real_father ?= { + any_consort = { this = ROOT } + this = scope:consort #To make sure it is the new partner + } + } + } + } + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_marriage } + save_scope_as = real_mother + if = { + limit = { + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { + real_father = { + any_spouse = { this = ROOT } + this = scope:consort #To make sure it is the new partner + } + } + } + } + random_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { + real_father = { + any_spouse = { this = ROOT } + this = scope:consort #To make sure it is the new partner + } + } + } + secret_target = { + real_father = { + save_scope_as = new_spouse + } + } + } + } + else ={ + pregnancy_real_father = { save_scope_as = new_spouse } + remove_variable = dead_spouse #To make sure the new spouse is set as father + } + + if = { + limit = { + exists = var:dead_spouse + } + var:dead_spouse ={ + save_scope_as = dead_father + } + } + + #Marks all the children whose corresponding secret should be cleared + every_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { real_father = { this = scope:new_spouse } } + } + secret_target = { + add_character_flag = clear_bastard_secret + save_scope_as = illegitimate_child #Save for portrait and desc + hidden_effect = { + if = { + limit = { + root = { exists = scope:dead_father } + } + set_father = scope:dead_father + } + else = { + set_father = scope:new_spouse + } + } + } + } + + random_child = { #If there is another child, save it as an event target + limit = { + has_character_flag = clear_bastard_secret + this != scope:illegitimate_child + } + save_scope_as = illegitimate_child_2 + hidden_effect = { + if = { + limit = { + root = { exists = scope:dead_father } + } + set_father = scope:dead_father + } + else_if = { + limit = { + root = { + NOT = { + exists = scope:dead_father + } + } + } + set_father = scope:new_spouse + } + } + } + + if = { #To trigger an event for the real_father if he is a secret_knower + limit = { + OR ={ + any_secret = { + type = secret_unmarried_illegitimate_child + secret_target = { + real_father = { this = scope:new_spouse } + } + any_secret_knower = { + this = scope:new_spouse + } + } + has_character_flag = unmarried_bastard_pregnancy + has_character_flag = bastard_pregnancy + } + } + scope:new_spouse = { + trigger_event = marriage_effect.0012 + } + } + + #To inform all secret knowers + random_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { + real_father = { this = scope:new_spouse } + } + } + every_secret_knower = { + limit = { + NOR = { + this = scope:new_spouse + this = root + } + } + trigger_event = marriage_effect.0013 + } + } + + #If it's a pregnancy then unmark it as a bastard pregnancy + if = { + limit = { + has_character_flag = unmarried_bastard_pregnancy + } + remove_character_flag = unmarried_bastard_pregnancy + } + if = { + limit = { + has_character_flag = bastard_pregnancy + } + remove_character_flag = bastard_pregnancy + } + } + + option = { + name = marriage_effect.0001.a + + stress_impact = { + base = medium_stress_loss + } + + every_secret = { + limit = { + exists = secret_target + OR = { + secret_target = { has_character_flag = clear_bastard_secret } + ROOT = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + } + } + } + remove_secret = yes + } + every_child = { + remove_character_flag = clear_bastard_secret + } + } +} + + +#FATHER - Concubine - notification event if you marry the mother and knows the secret (basically a copy of marriage_effect.0002) +marriage_effect.0012 = { + type = character_event + title = marriage_effect.0001.t + desc = { + first_valid = { + triggered_desc = { #Multiple illegitimate children now legitimate + trigger = { + exists = scope:illegitimate_child + exists = scope:illegitimate_child_2 + } + desc = marriage_effect.0012.desc.multiple + } + triggered_desc = { + trigger = { exists = scope:illegitimate_child } + desc = marriage_effect.0012.desc.child + } + triggered_desc = { + trigger = { + scope:real_mother = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + OR = { + has_character_flag = pregnancy_real_father_knows + has_character_flag = pregnancy_real_father_of_bastard_is_known_flag + } + } + } + desc = marriage_effect.0012.desc.pregnancy + } + triggered_desc = { + trigger = { + scope:real_mother = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + } + } + desc = marriage_effect.0012.desc.pregnancy_not_knowing + } + } + } + theme = marriage + right_portrait = { + character = scope:real_mother + animation = happiness + } + left_portrait = { + character = scope:new_spouse + animation = personality_compassionate + } + lower_left_portrait = scope:illegitimate_child #Only appears if child is already born + lower_center_portrait = scope:illegitimate_child_2 #Only appears if there are multiple bastards already born + + trigger = { + is_male = yes + any_consort = { + this = scope:real_mother + } + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_marriage } + #Marks all the children whose corresponding secret should be cleared + scope:new_spouse = { + every_secret = { + type = secret_unmarried_illegitimate_child + limit = { + secret_target = { + real_father = { this = scope:new_spouse } + mother = { this = scope:real_mother } + } + } + secret_target = { + add_character_flag = saved_child + save_scope_as = illegitimate_child #Save for portrait and desc + } + } + } + + random_child = { #If there is another child, save it as an event target + limit = { + has_character_flag = saved_child + this != scope:illegitimate_child + } + save_scope_as = illegitimate_child_2 + } + } + + option = { + name = { + trigger = { + scope:real_mother = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + NOR = { + has_character_flag = pregnancy_real_father_knows + has_character_flag = pregnancy_real_father_of_bastard_is_known_flag + } + } + } + text = marriage_effect.0001.a_not_knowing + } + name = { + trigger = { always = yes } + text = marriage_effect.0001.a + } + + #To block other events on the subject + scope:real_mother = { + add_character_flag = { + flag = pregnancy_real_father_knows + months = 9 + } + } + + stress_impact = { + base = medium_stress_loss + } + } +} + + +#Concubine - Notification event for every other secret knower (basically a copy of marriage_effect.0003) +marriage_effect.0013 = { + type = character_event + title = marriage_effect.0001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:real_mother = { + is_pregnant = yes + pregnancy_real_father = { + this = scope:new_spouse + } + } + } + desc = marriage_effect.0013.desc.pregnancy + } + triggered_desc = { #Multiple illegitimate children now legitimate + trigger = { + exists = scope:illegitimate_child + exists = scope:illegitimate_child_2 + } + desc = marriage_effect.0013.desc.multiple + } + triggered_desc = { + trigger = { exists = scope:illegitimate_child } + desc = marriage_effect.0013.desc + } + } + } + theme = marriage + right_portrait = { + character = scope:real_mother + animation = happiness + } + left_portrait = { + character = scope:new_spouse + animation = personality_compassionate + } + lower_left_portrait = scope:illegitimate_child #Only appears if child is already born + lower_center_portrait = scope:illegitimate_child_2 #Only appears if there are multiple bastards already born + + immediate = { play_music_cue_once = { TRACK = mx_cue_marriage } } + + option = { + name = marriage_effect.0001.a + } +} + + + +#If you marry your lover - root +marriage_effect.1001 = { + type = character_event + title = marriage_effect.1001.t + desc = marriage_effect.1001.desc + theme = marriage + left_portrait = { + character = scope:spouse + animation = happiness + } + + trigger = { + any_relation = { + type = lover + this = scope:spouse + } + # We don't want regular events concerning weddings to popup outside the wedding activity + OR = { + NOT = { exists = involved_activity } + involved_activity = { + NOT = { has_activity_type = activity_wedding } + } + } + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_marriage } + #If the marriage was set via event, configure scopes for the description correctly. + if = { + limit = { + NOT = { exists = scope:spouse } + } + random_relation = { + type = lover + limit = { is_spouse_of = root } + save_scope_as = spouse + } + } + } + + option = { + name = marriage_effect.1001.a + save_scope_as = spouse_2 + + scope:spouse = { + trigger_event = marriage_effect.1002 + } + } +} + +#If you marry your lover - spouse +marriage_effect.1002 = { + type = character_event + title = marriage_effect.1001.t + desc = marriage_effect.1002.desc + theme = marriage + left_portrait = { + character = scope:spouse_2 + animation = happiness + } + + immediate = { play_music_cue_once = { TRACK = mx_cue_marriage } } + + option = { + name = marriage_effect.1002.a + + } +} + +# Monogamous wedding event +marriage_effect.2001 = { + type = character_event + title = marriage_effect.2001.t + override_background = { reference = ep2_wedding_ceremony } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:new_spouse = { + is_imprisoned = yes + } + } + desc = marriage_effect.2001.desc.start_prison + } + triggered_desc = { + trigger = { + faith = { + has_doctrine_parameter = divine_marriage_piety_gain_active + } + scope:new_spouse = { + is_close_family_of = root + } + } + desc = marriage_effect.2001.desc.start_divine_marriage + } + desc = marriage_effect.2001.desc.start_normal + } + desc = marriage_effect.2001.desc.end + } + theme = marriage + left_portrait = { + character = root + triggered_animation = { + trigger = { + scope:new_spouse = { + is_imprisoned = yes + } + } + animation = shame + } + triggered_animation = { + trigger = { always = yes } + animation = happiness + } + } + right_portrait = { + character = scope:new_spouse + triggered_animation = { + trigger = { is_imprisoned = yes } + animation = shame + } + triggered_animation = { + trigger = { always = yes } + animation = flirtation_left + } + } + + trigger = { + # Only rulers are important enough for people to care about their marriage. + is_ruler = yes + + # Is not a LAAMP + is_landed_or_landless_administrative = yes + + # Only monogamous faiths care enough about a single marriage for the event. + faith = { + has_doctrine_parameter = marriage_event + } + + # Only a character's first spouse counts. + NOT ={ + any_spouse = { + even_if_dead = yes + this != scope:spouse + } + } + + # Spouse also needs to be alive + scope:spouse = { + is_alive = yes + } + + # If a family was previously generated for us, don't fire the marriage event (we were presumably married before the game started). + # This flag is also used for divorce cases + NOT = { has_character_flag = ignore_marriage_event } + + # We don't want regular events concerning weddings to popup outside the wedding activity + OR = { + NOT = { exists = involved_activity } + involved_activity = { + NOT = { has_activity_type = activity_wedding } + } + } + } + + immediate = { + play_music_cue_once = { TRACK = mx_cue_marriage } + scope:spouse = { + save_scope_as = new_spouse + } + } + + option = { + name = marriage_effect.2001.a + add_treasury_or_gold = major_treasury_or_gold_value + } + + option = { + name = marriage_effect.2001.b + add_prestige = major_prestige_value + } + + after = { + if = { + limit = { + faith = { + has_doctrine_parameter = divine_marriage_piety_gain_active + } + scope:new_spouse = { + is_close_family_of = root + } + } + add_piety = massive_piety_value + } + save_scope_as = spouse_scope + scope:spouse = { + scope:spouse_scope = { + save_scope_as = spouse + } + trigger_event = marriage_effect.0001 + } + + hidden_effect = { + # To disable prestige & gold remarrying exploit + add_character_flag = ignore_marriage_event + } + } +} + + +#Your spouse that you loved divorced you +marriage_effect.3001 = { + hidden = yes + + trigger = { + opinion = { + target = scope:spouse_2 + value >= 30 + } + OR = { + has_relation_lover = scope:spouse_2 + has_opinion_modifier = { + modifier = love_opinion + target = scope:spouse_2 + } + opinion = { + target = scope:spouse_2 + value >= 60 + } + } + } + + immediate = { + add_character_flag = { + flag = make_suicide_available + years = 10 + } + set_variable = { + name = messy_divorce + value = yes + } + } +} diff --git a/N3OW/events/misc_events.txt b/N3OW/events/misc_events.txt new file mode 100644 index 00000000..f27ceef4 --- /dev/null +++ b/N3OW/events/misc_events.txt @@ -0,0 +1,17 @@ +namespace = misc + +misc.0001 = { + hidden = yes + + trigger = { + is_ai = no + exists = global_var:rags_to_riches_to_rags_to_riches_first_empire + } + + immediate = { + add_achievement_global_variable_effect = { + VARIABLE = rags_to_riches_to_rags_to_riches_adventurer + VALUE = yes + } + } +} diff --git a/N3OW/events/mpo_chaotic_kurultai_succession.txt b/N3OW/events/mpo_chaotic_kurultai_succession.txt new file mode 100644 index 00000000..3de86ea5 --- /dev/null +++ b/N3OW/events/mpo_chaotic_kurultai_succession.txt @@ -0,0 +1,3146 @@ +namespace = mpo_chaotic_kurultai_succession + +scripted_trigger disobedient_kurultai_member_trigger = { + is_physically_able_ai_adult = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + has_trait = loyal + } +} + +mpo_chaotic_kurultai_succession.0001 = { # Siblings become your rivals + type = character_event + title = mpo_chaotic_kurultai_succession.0001.t + theme = raid + override_background = { reference = mpo_steppe_evening } + override_effect_2d = { + reference = rain + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0001.desc + triggered_desc = { + trigger = { + exists = scope:sibling_rival_2 + } + desc = mpo_chaotic_kurultai_succession.0001.desc_addition + } + } + + left_portrait = { + character = scope:sibling_rival_1 + animation = hunting_knife_start + } + right_portrait = { + character = scope:sibling_rival_2 + animation = spymaster + camera = camera_event_left + } + + trigger = { + any_sibling = { + is_physically_able_ai = yes + age >= 12 + can_set_relation_rival_trigger = { CHARACTER = root } + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_relation_rival = root + has_trait = craven + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_sibling = { + limit = { + is_physically_able_ai = yes + age >= 12 + can_set_relation_rival_trigger = { CHARACTER = root } + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_relation_rival = root + has_trait = craven + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + save_scope_as = sibling_rival_1 + } + random_sibling = { + limit = { + is_physically_able_ai = yes + age >= 12 + NOR = { + has_relation_friend = root + has_relation_rival = root + has_trait = craven + has_trait = content + this = scope:sibling_rival_1 + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + save_scope_as = sibling_rival_2 + } + scope:sibling_rival_1 = { + set_relation_rival = { + target = root + reason = rival_kurultai_succession + } + } + scope:sibling_rival_2 ?= { + set_relation_rival = { + target = root + reason = rival_kurultai_succession + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0001.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0002 = { # Sibling seizes tributary lands and leaves + type = character_event + title = mpo_chaotic_kurultai_succession.0002.t + theme = raid + override_background = { reference = mpo_steppe_evening } + override_effect_2d = { + reference = smoke + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0002.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0002.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0002.desc_end + } + + left_portrait = { + character = scope:sibling_rival_1 + triggered_animation = { + trigger = { + NOT = { exists = scope:backing_kurultai } + } + animation = horse_surveying + } + animation = horse_conversing_right + camera = camera_event_horse_left + } + right_portrait = { + character = scope:backing_kurultai + animation = horse_conversing_left + camera = camera_event_horse_right + } + + lower_right_portrait = scope:tributary_usurped + + trigger = { + any_tributary = { + is_ai = yes + exists = dynasty + dynasty != root.dynasty + government_has_flag = government_is_nomadic + domicile.herd < root.domicile.herd + is_landed = yes + save_temporary_scope_as = tributary_test + } + any_sibling = { + is_physically_able_ai_adult = yes + is_ruler = no + is_courtier_of = root + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = craven + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + save_temporary_scope_as = sibling_test + } + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_tributary = { + limit = { + is_ai = yes + exists = dynasty + dynasty != root.dynasty + government_has_flag = government_is_nomadic + domicile.herd < root.domicile.herd + is_landed = yes + } + save_scope_as = tributary_usurped + } + random_sibling = { + limit = { + is_physically_able_ai_adult = yes + is_ruler = no + is_courtier_of = root + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = craven + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + save_scope_as = sibling_rival_1 + add_character_flag = { + flag = domicile_culture_and_faith_check + days = 1 + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + is_physically_able_ai_adult = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + has_trait = loyal + this = scope:sibling_rival_1 + this = scope:tributary_usurped + } + } + save_scope_as = backing_kurultai + } + hidden_effect = { + create_title_and_vassal_change = { + type = usurped + save_scope_as = change + add_claim_on_loss = yes + } + scope:tributary_usurped = { + every_held_title = { + limit = { + tier >= tier_county + is_landless_type_title = no + } + change_title_holder = { + holder = scope:sibling_rival_1 + change = scope:change + } + } + every_vassal = { + change_liege = { + LIEGE = scope:sibling_rival_1 + CHANGE = scope:change + } + } + } + resolve_title_and_vassal_change = scope:change + scope:tributary_usurped = { + every_tributary = { + save_scope_as = current_tributary + start_tributary_interaction_effect = { + TRIBUTARY = scope:current_tributary + SUZERAIN = scope:sibling_rival_1 + } + } + } + scope:sibling_rival_1 = { + 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 + upgrade_random_yurt_external_building_effect = yes + } + } + } + custom_tooltip = sibling_usurped_tributary_lands_tt + scope:sibling_rival_1 = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + add_opinion = { + target = root + modifier = weak_opinion + opinion = -35 + } + } + scope:tributary_usurped = { + end_tributary = yes + pay_herd = { target = scope:sibling_rival_1 value = scope:tributary_usurped.domicile.herd } + hidden_effect = { + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:sibling_rival_1 } + } + set_relation_potential_rival = root + } + add_opinion = { + target = scope:sibling_rival_1 + modifier = usurped_title + opinion = -50 + } + } + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -25 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0002.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0003 = { # Tributary leaves + type = character_event + title = mpo_chaotic_kurultai_succession.0003.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0003.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0003.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0003.desc_end + } + + left_portrait = { + character = scope:tributary_leaving + animation = dismissal + } + right_portrait = { + character = scope:backing_kurultai + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + + trigger = { + any_tributary = { + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + } + } + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_tributary = { + limit = { + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + } + } + save_scope_as = tributary_leaving + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:tributary_leaving = { + end_tributary = yes + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + add_opinion = { + target = root + modifier = weak_opinion + opinion = -100 + } + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -25 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0003.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0004 = { # County Control loss + type = character_event + title = mpo_chaotic_kurultai_succession.0004.t + theme = raid + override_background = { reference = mpo_raid_burning_asian } + override_effect_2d = { + reference = smoke + } + + left_portrait = { + character = scope:raider + animation = sword_coup_degrace + hide_info = yes + } + right_portrait = { + character = scope:backing_kurultai + animation = menacing + camera = camera_event_left + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0004.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0004.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0004.desc_end + } + + trigger = { + any_held_title = { + tier = tier_county + is_landless_type_title = no + county_control > 0 + } + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_pool_character = { + province = root.location + limit = { is_physically_able_ai = yes } + save_scope_as = raider + } + every_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + county_control > 0 + } + change_county_control = { + value = { + integer_range = { + min = -50 + max = -5 + } + } + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:backing_kurultai ?= { + add_gold = { + value = { + integer_range = { + min = 10 + max = 100 + } + } + } + add_opinion = { + target = root + modifier = weak_opinion + opinion = -25 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0004.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0005 = { # Loss of Prestige Level + type = character_event + title = mpo_chaotic_kurultai_succession.0005.t + theme = raid + override_effect_2d = { + reference = rain + } + + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:backing_kurultai + animation = laugh + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0005.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0005.desc_addition + } + } + + trigger = { + prestige_level > 0 + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + add_prestige_level = -1 + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -25 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0005.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0006 = { # 10% of Herd defects to Neighboring realm + type = character_event + title = mpo_chaotic_kurultai_succession.0006.t + theme = raid + override_background = { reference = mpo_campfire_steppe } + override_effect_2d = { + reference = rain + } + + left_portrait = { + character = scope:rustler + animation = betting + } + right_portrait = { + character = scope:backing_kurultai + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0006.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0006.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0006.desc_end + } + + trigger = { + domicile.herd >= 1000 + any_land_neighboring_realm_with_tributaries_owner = { + is_physically_able_ai_adult = yes + government_has_flag = government_is_nomadic + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + } + } + + immediate = { + save_scope_as = ruler_rustled + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_land_neighboring_realm_with_tributaries_owner = { + limit = { + is_physically_able_ai_adult = yes + government_has_flag = government_is_nomadic + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + } + save_scope_as = rustler + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -25 + } + } + save_scope_value_as = { + name = herd_transfer_value + value = { + add = root.domicile.herd + divide = 10 + } + } + show_as_tooltip = { + pay_herd = { + target = scope:rustler + value = scope:herd_transfer_value + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0006.a + ai_chance = { + base = 100 + } + } + + after = { + scope:rustler = { + trigger_event = mpo_chaotic_kurultai_succession.1006 + } + } +} + +mpo_chaotic_kurultai_succession.1006 = { # Response event + type = character_event + title = mpo_chaotic_kurultai_succession.1006.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:backing_kurultai + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + lower_right_portrait = scope:ruler_rustled + + desc = { + desc = mpo_chaotic_kurultai_succession.1006.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.1006.desc_addition + } + } + + trigger = { + } + + immediate = { + } + + option = { + name = mpo_chaotic_kurultai_succession.1006.a + scope:ruler_rustled = { + pay_herd = { + target = scope:rustler + value = scope:herd_transfer_value + } + } + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1006.b + scope:ruler_rustled = { + send_interface_toast = { + type = event_toast_effect_good + title = mpo_chaotic_kurultai_succession.1006.b.title + left_icon = scope:rustler + custom_tooltip = mpo_chaotic_kurultai_succession.1006.b.tt + add_opinion = { + target = scope:rustler + modifier = grateful_opinion + opinion = 50 + } + if = { + limit = { + NOT = { this = scope:rustler } + can_set_relation_potential_friend_trigger = { CHARACTER = scope:rustler } + } + set_relation_potential_friend = scope:rustler + } + } + } + ai_chance = { + base = 0 + } + } +} + +scripted_trigger is_great_courtier_trigger = { + is_physically_able_ai_adult = yes + NOR = { + is_in_list = obedient_kurultai + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + has_trait = loyal + has_trait = content + is_child_of = root + is_grandchild_of = root + is_great_grandchild_of = root + is_consort_of = root + is_heir_of = root + AND = { + is_female = yes + patrilinear_marriage = yes + } + AND = { + is_male = yes + matrilinear_marriage = yes + } + is_diarch = yes + is_designated_diarch = yes + } + OR = { + AND = { + is_knight = yes + prowess >= 16 + } + has_any_court_position = yes + martial >= monumentally_high_skill_rating + sum_of_all_skills_value >= sum_of_all_skills_threshold_good + martial >= monumentally_high_skill_rating + aptitude:master_of_hunt_court_position >= 4 + aptitude:keeper_of_the_horses_court_position >= 4 + aptitude:boyan_court_position >= 4 + aptitude:siege_engineer_court_position >= 4 + aptitude:yurtchi_court_position >= 4 + aptitude:cherbi_court_position >= 4 + aptitude:yeke_jarquchi_court_position >= 4 + aptitude:foreign_emissary_court_position >= 4 + aptitude:court_physician_court_position >= 4 + } +} + +mpo_chaotic_kurultai_succession.0007 = { # Good Courtiers defect to Neighbor + type = character_event + title = mpo_chaotic_kurultai_succession.0007.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + left_portrait = { + character = scope:courtier_stealer + animation = schadenfreude + } + right_portrait = { + character = scope:backing_kurultai + animation = go_to_your_room + camera = camera_event_left + } + lower_right_portrait = scope:courtier_1 + lower_center_portrait = scope:courtier_2 + lower_left_portrait = scope:courtier_3 + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0007.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0007.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0007.desc_end + } + + trigger = { + any_land_neighboring_realm_with_tributaries_owner = { + is_physically_able_ai_adult = yes + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + } + any_courtier = { + count >= 3 + is_great_courtier_trigger = yes + } + } + + immediate = { + save_scope_as = ruler_rustled + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_land_neighboring_realm_with_tributaries_owner = { + limit = { + is_physically_able_ai_adult = yes + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + } + save_scope_as = courtier_stealer + } + random_courtier = { + limit = { + is_great_courtier_trigger = yes + } + save_scope_as = courtier_1 + } + random_courtier = { + limit = { + is_great_courtier_trigger = yes + NOT = { + this = scope:courtier_1 + } + } + save_scope_as = courtier_2 + } + random_courtier = { + limit = { + is_great_courtier_trigger = yes + NOR = { + this = scope:courtier_1 + this = scope:courtier_2 + } + } + save_scope_as = courtier_3 + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -25 + } + } + scope:courtier_stealer = { + add_courtier = scope:courtier_1 + add_courtier = scope:courtier_2 + add_courtier = scope:courtier_3 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0007.a + ai_chance = { + base = 100 + } + } + + after = { + scope:courtier_stealer = { + trigger_event = mpo_chaotic_kurultai_succession.1007 + } + } +} + +mpo_chaotic_kurultai_succession.1007 = { # Response event + type = character_event + title = mpo_chaotic_kurultai_succession.1007.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:backing_kurultai + animation = debating + } + lower_right_portrait = scope:courtier_1 + lower_center_portrait = scope:courtier_2 + lower_left_portrait = scope:courtier_3 + + desc = { + desc = mpo_chaotic_kurultai_succession.1007.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.1007.desc_addition + } + } + + trigger = { + } + + immediate = { + show_as_tooltip = { + add_courtier = scope:courtier_1 + add_courtier = scope:courtier_2 + add_courtier = scope:courtier_3 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1007.a + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1007.b + scope:ruler_rustled = { + send_interface_toast = { + type = event_toast_effect_good + title = mpo_chaotic_kurultai_succession.1007.b.title + left_icon = scope:courtier_stealer + scope:ruler_rustled = { + add_courtier = scope:courtier_1 + add_courtier = scope:courtier_2 + add_courtier = scope:courtier_3 + } + add_opinion = { + target = scope:courtier_stealer + modifier = grateful_opinion + opinion = 50 + } + if = { + limit = { + NOT = { this = scope:courtier_stealer } + can_set_relation_potential_friend_trigger = { CHARACTER = scope:courtier_stealer } + } + set_relation_potential_friend = scope:courtier_stealer + } + } + } + ai_chance = { + base = 0 + } + } +} + +mpo_chaotic_kurultai_succession.0008 = { # MaA Regiment defects to neighbor + type = character_event + title = mpo_chaotic_kurultai_succession.0008.t + theme = raid + override_background = { reference = mpo_hunt_steppe } + + left_portrait = { + character = scope:maa_stealer + animation = horse_archer_idle + camera = camera_event_horse_left + } + right_portrait = { + character = scope:backing_kurultai + animation = horse_archer_aggressive + camera = camera_event_horse_left + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0008.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0008.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0008.desc_end + } + + trigger = { + any_land_neighboring_realm_with_tributaries_owner = { + is_physically_able_ai_adult = yes + is_landed = yes + maa_regiments_count < maa_regiments_max_count + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + NOT = { + government_has_flag = government_is_herder + } + } + any_maa_regiment = { + maa_current_troops_count >= maa_max_troops_count + is_raised = no + NOT = { + is_unit_type = siege_weapon + } + } + } + + immediate = { + save_scope_as = ruler_rustled + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_land_neighboring_realm_with_tributaries_owner = { + limit = { + is_physically_able_ai_adult = yes + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + NOT = { + government_has_flag = government_is_herder + } + } + save_scope_as = maa_stealer + } + random_maa_regiment = { + limit = { + maa_current_troops_count >= maa_max_troops_count + is_raised = no + NOT = { + is_unit_type = siege_weapon + } + } + save_scope_as = defecting_maa + } + save_scope_value_as = { + name = maa_size_scope + value = scope:defecting_maa.maa_size + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -25 + } + } + custom_tooltip = regiment_destroyed_tt + } + + option = { + name = mpo_chaotic_kurultai_succession.0008.a + ai_chance = { + base = 100 + } + } + + after = { + scope:maa_stealer = { + trigger_event = mpo_chaotic_kurultai_succession.1008 + } + } +} + +mpo_chaotic_kurultai_succession.1008 = { # Response event + type = character_event + title = mpo_chaotic_kurultai_succession.1008.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + left_portrait = { + character = root + animation = marshal_random_weapon + } + right_portrait = { + character = scope:backing_kurultai + animation = bow_idle + } + lower_right_portrait = scope:ruler_rustled + + desc = { + desc = mpo_chaotic_kurultai_succession.1008.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.1008.desc_addition + } + } + + trigger = { + } + + immediate = { + } + + option = { + name = mpo_chaotic_kurultai_succession.1008.a + create_maa_regiment = { + type_of = scope:defecting_maa + check_can_recruit = no + size = 1 + } + custom_tooltip = chaos_upgrade_maa_tt + hidden_effect = { + while = { + random_maa_regiment = { + limit = { + can_upgrade_maa = yes + } + change_maa_regiment_size = 1 + } + count = scope:maa_size_scope + } + scope:ruler_rustled = { + scope:defecting_maa = { + destroy_maa_regiment = yes + } + } + } + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1008.b + scope:ruler_rustled = { + send_interface_toast = { + type = event_toast_effect_good + title = mpo_chaotic_kurultai_succession.1008.b.title + left_icon = scope:maa_stealer + add_opinion = { + target = scope:maa_stealer + modifier = grateful_opinion + opinion = 50 + } + if = { + limit = { + NOT = { this = scope:maa_stealer } + can_set_relation_potential_friend_trigger = { CHARACTER = scope:maa_stealer } + } + set_relation_potential_friend = scope:maa_stealer + } + } + } + ai_chance = { + base = 0 + } + } +} + +mpo_chaotic_kurultai_succession.0009 = { # Some Gold divided by Siblings + type = character_event + title = mpo_chaotic_kurultai_succession.0009.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + triggered_desc = { + trigger = { + exists = scope:sibling_rival_2 + } + desc = mpo_chaotic_kurultai_succession.0009.desc + } + triggered_desc = { + trigger = { + NOT = { exists = scope:sibling_rival_2 } + } + desc = mpo_chaotic_kurultai_succession.0009.desc_addition + } + triggered_desc = { + trigger = { + exists = scope:sibling_rival_2 + } + desc = mpo_chaotic_kurultai_succession.0009.desc_addition2 + } + triggered_desc = { + trigger = { + exists = scope:sibling_rival_3 + } + desc = mpo_chaotic_kurultai_succession.0009.desc_addition3 + } + triggered_desc = { + trigger = { + exists = scope:sibling_rival_4 + } + desc = mpo_chaotic_kurultai_succession.0009.desc_addition4 + } + triggered_desc = { + trigger = { + exists = scope:sibling_rival_5 + } + desc = mpo_chaotic_kurultai_succession.0009.desc_addition5 + } + triggered_desc = { + trigger = { + exists = scope:sibling_rival_2 + } + desc = mpo_chaotic_kurultai_succession.0009.desc_end + } + } + + left_portrait = { + character = scope:sibling_rival_1 + animation = bribing + } + right_portrait = { + character = scope:sibling_rival_2 + animation = steward + } + lower_left_portrait = scope:sibling_rival_3 + lower_center_portrait = scope:sibling_rival_4 + lower_right_portrait = scope:sibling_rival_5 + + trigger = { + gold >= 100 + gold >= medium_gold_value + any_sibling = { + is_physically_able_ai = yes + age >= 12 + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_sibling = { + limit = { + is_physically_able_ai = yes + age >= 12 + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + save_scope_as = sibling_rival_1 + add_to_list = sibling_gold + } + random_sibling = { + limit = { + is_physically_able_ai = yes + age >= 12 + NOR = { + has_relation_friend = root + has_relation_rival = root + has_trait = craven + has_trait = content + this = scope:sibling_rival_1 + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + save_scope_as = sibling_rival_2 + add_to_list = sibling_gold + } + random_sibling = { + limit = { + is_physically_able_ai = yes + age >= 12 + NOR = { + has_relation_friend = root + has_relation_rival = root + has_trait = craven + has_trait = content + this = scope:sibling_rival_1 + this = scope:sibling_rival_2 + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + save_scope_as = sibling_rival_3 + add_to_list = sibling_gold + } + random_sibling = { + limit = { + is_physically_able_ai = yes + age >= 12 + NOR = { + has_relation_friend = root + has_relation_rival = root + has_trait = craven + has_trait = content + this = scope:sibling_rival_1 + this = scope:sibling_rival_2 + this = scope:sibling_rival_3 + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + save_scope_as = sibling_rival_4 + add_to_list = sibling_gold + } + random_sibling = { + limit = { + is_physically_able_ai = yes + age >= 12 + NOR = { + has_relation_friend = root + has_relation_rival = root + has_trait = craven + has_trait = content + this = scope:sibling_rival_1 + this = scope:sibling_rival_2 + this = scope:sibling_rival_3 + this = scope:sibling_rival_4 + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + save_scope_as = sibling_rival_5 + add_to_list = sibling_gold + } + save_scope_value_as = { + name = sibling_gold_sum + value = { + add = root.gold + subtract = { + value = root.minor_gold_value + divide = 2 + min = 50 + } + divide = list_size:sibling_gold + } + } + every_in_list = { + list = sibling_gold + root = { + pay_treasury_or_gold = { + target = prev + value = scope:sibling_gold_sum + } + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0009.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0010 = { # Legitimacy -500 + type = character_event + title = mpo_chaotic_kurultai_succession.0010.t + theme = raid + override_background = { reference = mpo_campfire_steppe } + override_effect_2d = { + reference = rain + } + + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:backing_kurultai + animation = laugh + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0010.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0010.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0010.desc_end + } + + trigger = { + has_legitimacy = yes + legitimacy > 0 + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + add_legitimacy = -500 + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -50 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0010.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0011 = { # 20% of Herd defects to Neighboring realm + type = character_event + title = mpo_chaotic_kurultai_succession.0011.t + theme = raid + override_background = { reference = mpo_campfire_steppe } + override_effect_2d = { + reference = rain + } + + left_portrait = { + character = scope:rustler + animation = manic + } + right_portrait = { + character = scope:backing_kurultai + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0011.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0011.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0011.desc_end + } + + trigger = { + domicile.herd >= 1000 + any_land_neighboring_realm_with_tributaries_owner = { + is_physically_able_ai_adult = yes + government_has_flag = government_is_nomadic + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + } + } + + immediate = { + save_scope_as = ruler_rustled + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_land_neighboring_realm_with_tributaries_owner = { + limit = { + is_physically_able_ai_adult = yes + government_has_flag = government_is_nomadic + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + } + save_scope_as = rustler + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -25 + } + } + save_scope_value_as = { + name = herd_transfer_value + value = { + add = root.domicile.herd + divide = 5 + } + } + show_as_tooltip = { + pay_herd = { + target = scope:rustler + value = scope:herd_transfer_value + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0011.a + ai_chance = { + base = 100 + } + } + + after = { + scope:rustler = { + trigger_event = mpo_chaotic_kurultai_succession.1006 + } + } +} + +mpo_chaotic_kurultai_succession.0012 = { # 50% Realm Split + type = character_event + title = mpo_chaotic_kurultai_succession.0012.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0012.desc + } + + left_portrait = { + character = scope:sibling_rival_1 + animation = jockey_victory + camera = camera_event_horse_left + } + + trigger = { + OR = { + any_in_list = { + list = disobedient_kurultai + is_physically_able_ai_adult = yes + highest_held_title_tier <= tier_duchy + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + any_sibling = { + is_physically_able_ai_adult = yes + highest_held_title_tier <= tier_duchy + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + } + highest_held_title_tier >= tier_kingdom + top_liege = root + primary_title = { + any_in_de_jure_hierarchy = { + count >= 20 + tier = tier_county + holder.top_liege ?= root + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_held_title = { + has_variable = guaranteed_disastrous_succession + } + factor = 0.1 + } + } + + immediate = { + hidden_effect = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + every_sibling = { + limit = { + is_physically_able_ai_adult = yes + highest_held_title_tier <= tier_duchy + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + add_to_list = potential_khans + } + every_in_list = { + list = disobedient_kurultai + limit = { + is_physically_able_ai_adult = yes + highest_held_title_tier <= tier_duchy + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + add_to_list = potential_khans + } + random_in_list = { + list = potential_khans + weight = { + base = 1 + modifier = { + add = 100 + is_landed = no + } + } + save_scope_as = sibling_rival_1 + add_character_flag = { + flag = domicile_culture_and_faith_check + days = 1 + } + # The thing below ensures that they are landless if they had land, without breaking realms + nomadic_heir_cleanup_realm_effect = { CLEANUP_SCOPE_CHAR = scope:sibling_rival_1 } + } + nomadic_realm_split_effect = { + ORIGINAL_REALM_HOLDER = root + NEW_RULER = scope:sibling_rival_1 + SPLIT_VALUE = 0.5 + } + scope:sibling_rival_1 = { + if = { + limit = { + has_realm_law = nomadic_authority_1 + } + remove_realm_law = nomadic_authority_1 + } + else_if = { + limit = { + has_realm_law = nomadic_authority_2 + } + remove_realm_law = nomadic_authority_2 + } + if = { + limit = { + NOR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + add_realm_law_skip_effects = nomadic_authority_3 + } + } + } + custom_tooltip = sibling_tool_50_percent_tt + pay_treasury_or_gold = { + target = scope:sibling_rival_1 + value = { + add = root.gold + multiply = 0.5 + } + } + pay_herd = { + target = scope:sibling_rival_1 + value = { + add = root.domicile.herd + multiply = 0.5 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0012.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0013 = { # 20% Realm Split + type = character_event + title = mpo_chaotic_kurultai_succession.0013.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0013.desc + } + + left_portrait = { + character = scope:sibling_rival_1 + animation = horse_archer_idle + camera = camera_event_horse_right + } + + trigger = { + NOT = { + has_character_flag = mongol_successor_flag + } + OR = { + any_in_list = { + list = disobedient_kurultai + is_physically_able_ai_adult = yes + highest_held_title_tier <= tier_duchy + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + any_sibling = { + is_physically_able_ai_adult = yes + highest_held_title_tier <= tier_duchy + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + } + highest_held_title_tier >= tier_kingdom + top_liege = root + primary_title = { + any_in_de_jure_hierarchy = { + count >= 20 + tier = tier_county + holder.top_liege ?= root + } + } + } + + immediate = { + hidden_effect = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + every_sibling = { + limit = { + is_physically_able_ai_adult = yes + highest_held_title_tier <= tier_duchy + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + add_to_list = potential_khans + } + every_in_list = { + list = disobedient_kurultai + limit = { + is_physically_able_ai_adult = yes + highest_held_title_tier <= tier_duchy + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = generous + has_trait = content + } + OR = { + AND = { + is_male = yes + faith_dominant_gender_male_or_equal = yes + } + AND = { + is_female = yes + faith_dominant_gender_female_or_equal = yes + } + } + } + add_to_list = potential_khans + } + random_in_list = { + list = potential_khans + weight = { + base = 1 + modifier = { + add = 100 + is_landed = no + } + } + save_scope_as = sibling_rival_1 + add_character_flag = { + flag = domicile_culture_and_faith_check + days = 1 + } + # The thing below ensures that they are landless if they had land, without breaking realms + nomadic_heir_cleanup_realm_effect = { CLEANUP_SCOPE_CHAR = scope:sibling_rival_1 } + } + nomadic_realm_split_effect = { + ORIGINAL_REALM_HOLDER = root + NEW_RULER = scope:sibling_rival_1 + SPLIT_VALUE = 0.2 + } + scope:sibling_rival_1 = { + if = { + limit = { + has_realm_law = nomadic_authority_1 + } + remove_realm_law = nomadic_authority_1 + } + else_if = { + limit = { + has_realm_law = nomadic_authority_2 + } + remove_realm_law = nomadic_authority_2 + } + if = { + limit = { + NOR = { + has_realm_law = nomadic_authority_4 + has_realm_law = nomadic_authority_5 + } + } + add_realm_law_skip_effects = nomadic_authority_3 + } + } + } + custom_tooltip = sibling_tool_20_percent_tt + pay_treasury_or_gold = { + target = scope:sibling_rival_1 + value = { + add = root.gold + multiply = 0.2 + } + } + pay_herd = { + target = scope:sibling_rival_1 + value = { + add = root.domicile.herd + multiply = 0.2 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0013.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0014 = { # Extreme kurultai disapproval: shatter realm + type = character_event + title = mpo_chaotic_kurultai_succession.0014.t + theme = raid + override_background = { reference = mpo_raid_burning_asian } + override_effect_2d = { + reference = smoke + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + triggered_desc = { + trigger = { + exists = scope:kurultai_1 + } + desc = mpo_chaotic_kurultai_succession.0014.desc + } + triggered_desc = { + trigger = { + NOT = { exists = scope:kurultai_1 } + } + desc = mpo_chaotic_kurultai_succession.0014.desc_alt + } + } + + left_portrait = { + character = scope:kurultai_1 + animation = manic + } + + right_portrait = { + character = scope:kurultai_2 + animation = rage + } + + lower_left_portrait = scope:kurultai_3 + lower_center_portrait = scope:kurultai_4 + lower_right_portrait = scope:kurultai_5 + + trigger = { + #Stop breakup during Mongol breakup + NOT = { + has_character_flag = mongol_successor_flag + } + #This is happening to newly made titles + exists = primary_title.previous_holder + OR = { + any_in_list = { + list = disobedient_kurultai + count >= 4 + is_physically_able_ai_adult = yes + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = calm + } + } + "list_size(obedient_kurultai)" <= 0 + } + highest_held_title_tier >= tier_kingdom + top_liege = root + } + #This is the worst one, right? Well... there ya go + weight_multiplier = { + base = 1 + modifier = { + any_held_title = { + has_variable = guaranteed_disastrous_succession + } + factor = 100 + } + } + + immediate = { + every_held_title = { + limit = { + has_variable = guaranteed_disastrous_succession + } + remove_variable = guaranteed_disastrous_succession + } + custom_tooltip = title_chaos_dissolved_tt + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + is_physically_able_ai_adult = yes + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = calm + } + } + save_scope_as = kurultai_1 + add_opinion = { + target = root + modifier = weak_opinion + opinion = -50 + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + is_physically_able_ai_adult = yes + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = calm + this = scope:kurultai_1 + } + } + save_scope_as = kurultai_2 + add_opinion = { + target = root + modifier = weak_opinion + opinion = -50 + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + is_physically_able_ai_adult = yes + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = calm + this = scope:kurultai_1 + this = scope:kurultai_2 + } + } + save_scope_as = kurultai_3 + add_opinion = { + target = root + modifier = weak_opinion + opinion = -50 + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + is_physically_able_ai_adult = yes + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = calm + this = scope:kurultai_1 + this = scope:kurultai_2 + this = scope:kurultai_3 + } + } + save_scope_as = kurultai_4 + add_opinion = { + target = root + modifier = weak_opinion + opinion = -50 + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + is_physically_able_ai_adult = yes + NOR = { + has_relation_friend = root + has_relation_potential_friend = root + has_trait = calm + this = scope:kurultai_1 + this = scope:kurultai_2 + this = scope:kurultai_3 + this = scope:kurultai_4 + } + } + save_scope_as = kurultai_5 + add_opinion = { + target = root + modifier = weak_opinion + opinion = -50 + } + } + hidden_effect = { + create_title_and_vassal_change = { + type = independency + save_scope_as = change + add_claim_on_loss = no + } + + every_vassal = { + change_liege_or_become_independent = { + CHANGE = scope:change + VASSAL = this + } + } + + every_vassal = { + limit = { is_ai = no } + send_interface_toast = { + type = event_faction_neutral_text + title = liege_primary_title_dissolution + desc = liege_primary_title_chaos_desc + left_icon = root + } + } + + resolve_title_and_vassal_change = scope:change + + every_held_title = { + limit = { + tier >= tier_kingdom + } + add_to_temporary_list = titles_to_destroy + } + + every_in_list = { + list = titles_to_destroy + holder = { + destroy_title = prev + } + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0014.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0015 = { # 40% of Herd defects to Neighboring realm + type = character_event + title = mpo_chaotic_kurultai_succession.0015.t + theme = raid + override_background = { reference = mpo_campfire_steppe } + override_effect_2d = { + reference = rain + } + + left_portrait = { + character = scope:rustler + animation = eccentric + } + right_portrait = { + character = scope:backing_kurultai + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0015.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0015.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0015.desc_end + } + + trigger = { + domicile.herd >= 1000 + any_land_neighboring_realm_with_tributaries_owner = { + is_physically_able_ai_adult = yes + government_has_flag = government_is_nomadic + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + any_held_title = { + has_variable = guaranteed_disastrous_succession + } + factor = 0.1 + } + } + + immediate = { + save_scope_as = ruler_rustled + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_land_neighboring_realm_with_tributaries_owner = { + limit = { + is_physically_able_ai_adult = yes + government_has_flag = government_is_nomadic + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_lover = root + } + } + save_scope_as = rustler + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -50 + } + } + save_scope_value_as = { + name = herd_transfer_value + value = { + add = root.domicile.herd + multiply = 0.4 + } + } + show_as_tooltip = { + pay_herd = { + target = scope:rustler + value = scope:herd_transfer_value + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0015.a + ai_chance = { + base = 100 + } + } + + after = { + scope:rustler = { + trigger_event = mpo_chaotic_kurultai_succession.1006 + } + } +} + +mpo_chaotic_kurultai_succession.0016 = { # 3 Tributaries leave + type = character_event + title = mpo_chaotic_kurultai_succession.0016.t + theme = raid + override_background = { reference = mpo_steppe_evening } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0016.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0016.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0016.desc_end + } + + left_portrait = { + character = scope:tributary_leaving + animation = eyeroll + } + right_portrait = { + character = scope:backing_kurultai + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + lower_left_portrait = scope:tributary_leaving2 + lower_right_portrait = scope:tributary_leaving3 + + trigger = { + any_tributary = { + count >= 3 + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + } + } + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_tributary = { + limit = { + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + } + } + save_scope_as = tributary_leaving + } + random_tributary = { + limit = { + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + this = scope:tributary_leaving + } + } + save_scope_as = tributary_leaving2 + } + random_tributary = { + limit = { + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + this = scope:tributary_leaving + this = scope:tributary_leaving2 + } + } + save_scope_as = tributary_leaving3 + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:tributary_leaving = { + end_tributary = yes + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + add_opinion = { + target = root + modifier = weak_opinion + opinion = -100 + } + } + scope:tributary_leaving2 = { + end_tributary = yes + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + add_opinion = { + target = root + modifier = weak_opinion + opinion = -100 + } + } + scope:tributary_leaving3 = { + end_tributary = yes + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + add_opinion = { + target = root + modifier = weak_opinion + opinion = -100 + } + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -35 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0016.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.0017 = { # All Tributaries leave + type = character_event + title = mpo_chaotic_kurultai_succession.0017.t + theme = raid + override_background = { reference = mpo_steppe_evening } + override_effect_2d = { + reference = rain + } + + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:dead_parent + } + desc = chaotic_kurultai_intro_1 + } + desc = chaotic_kurultai_intro_2 + } + desc = mpo_chaotic_kurultai_succession.0017.desc + triggered_desc = { + trigger = { + exists = scope:backing_kurultai + } + desc = mpo_chaotic_kurultai_succession.0017.desc_addition + } + desc = mpo_chaotic_kurultai_succession.0017.desc_end + } + + left_portrait = { + character = scope:tributary_leaving + animation = threatening + } + right_portrait = { + character = scope:backing_kurultai + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + + trigger = { + any_tributary = { + count >= 5 + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + primary_title = { + has_variable = guaranteed_disastrous_succession + } + factor = 0.1 + } + } + + immediate = { + primary_title.previous_holder = { + if = { + limit = { + is_alive = no + } + save_scope_as = dead_parent + } + } + random_tributary = { + limit = { + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + } + } + save_scope_as = tributary_leaving + } + every_tributary = { + limit = { + is_physically_able_ai_adult = yes + NOT = { + government_has_flag = government_is_herder + } + is_landed = yes + NOR = { + is_obedient_to = root + has_relation_friend = root + has_relation_potential_friend = root + has_relation_lover = root + has_trait = craven + has_trait = content + has_trait = loyal + this = scope:tributary_leaving + } + } + end_tributary = yes + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + add_opinion = { + target = root + modifier = weak_opinion + opinion = -100 + } + } + random_in_list = { + list = disobedient_kurultai + limit = { + disobedient_kurultai_member_trigger = yes + } + save_scope_as = backing_kurultai + } + scope:tributary_leaving = { + end_tributary = yes + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = root } + } + set_relation_potential_rival = root + } + add_opinion = { + target = root + modifier = weak_opinion + opinion = -100 + } + } + scope:backing_kurultai ?= { + add_opinion = { + target = root + modifier = weak_opinion + opinion = -50 + } + } + } + + option = { + name = mpo_chaotic_kurultai_succession.0017.a + ai_chance = { + base = 100 + } + } +} + +mpo_chaotic_kurultai_succession.1000 = { # Choose successor Khanate + type = character_event + title = mpo_chaotic_kurultai_succession.1000.t + theme = raid + override_background = { reference = mpo_steppe_evening } + override_effect_2d = { + reference = rain + } + + desc = mpo_chaotic_kurultai_succession.1000.desc + + left_portrait = { + character = root + animation = standing_horse + camera = camera_event_standing_with_horse_right + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.a + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.b + trigger = { + exists = scope:ilkhanate_ruler + scope:ilkhanate_ruler != root + } + set_player_character = scope:ilkhanate_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.c + trigger = { + exists = scope:red_horde_ruler + scope:red_horde_ruler != root + } + set_player_character = scope:red_horde_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.d + trigger = { + exists = scope:white_horde_ruler + scope:white_horde_ruler != root + } + set_player_character = scope:white_horde_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.e + trigger = { + exists = scope:aarlud_khanate_ruler + scope:aarlud_khanate_ruler != root + } + set_player_character = scope:aarlud_khanate_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.f + trigger = { + exists = scope:togskol_khanate_ruler + scope:togskol_khanate_ruler != root + } + set_player_character = scope:togskol_khanate_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.g + trigger = { + exists = scope:baruun_khanate_ruler + scope:baruun_khanate_ruler != root + } + set_player_character = scope:baruun_khanate_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.h + trigger = { + exists = scope:golden_horde_ruler + scope:golden_horde_ruler != root + } + set_player_character = scope:golden_horde_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.i + trigger = { + exists = scope:chagatai_ruler + scope:chagatai_ruler != root + } + set_player_character = scope:chagatai_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.j + trigger = { + exists = scope:great_yuan_ruler + scope:great_yuan_ruler != root + } + set_player_character = scope:great_yuan_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.k + trigger = { + exists = scope:blue_horde_ruler + scope:blue_horde_ruler != root + } + set_player_character = scope:blue_horde_ruler + ai_chance = { + base = 100 + } + } + + option = { + name = mpo_chaotic_kurultai_succession.1000.l + trigger = { + exists = scope:omnod_dalai_khanate_ruler + scope:omnod_dalai_khanate_ruler != root + } + set_player_character = scope:omnod_dalai_khanate_ruler + ai_chance = { + base = 100 + } + } +} diff --git a/N3OW/events/mpo_flavor_events.txt b/N3OW/events/mpo_flavor_events.txt new file mode 100644 index 00000000..669d0fd2 --- /dev/null +++ b/N3OW/events/mpo_flavor_events.txt @@ -0,0 +1,58 @@ +namespace = mpo_special_flavor_events + +mpo_special_flavor_events.0001 = { + type = character_event + theme = nomads + + title = mpo_special_flavor_events.0001.t + desc = mpo_special_flavor_events.0001.desc + + override_background = { + reference = bp3_coast + } + + right_portrait = { + character = root + animation = personality_forgiving + } + + trigger = { + location = { + is_coastal = yes + } + government_has_flag = government_is_nomadic + OR = { + is_ai = no + AND = { + primary_title.tier >= tier_kingdom + is_independent_ruler = yes + } + } + NOT = { + has_character_flag = mpo_nomad_saw_the_sea + } + culture = { + is_target_in_global_variable_list = { + name = fully_landlocked_nomad_cultures + target = this + } + } + } + + immediate = { + add_character_flag = mpo_nomad_saw_the_sea + } + + option = { #cool + name = mpo_special_flavor_events.0001.a + + stress_impact = { + base = medium_stress_impact_loss + shy = major_stress_impact_loss + paranoid = major_stress_impact_loss + calm = major_stress_impact_loss + content = major_stress_impact_loss + patient = major_stress_impact_loss + } + } +} \ No newline at end of file diff --git a/N3OW/events/mpo_misc.txt b/N3OW/events/mpo_misc.txt new file mode 100644 index 00000000..c5c4ce4a --- /dev/null +++ b/N3OW/events/mpo_misc.txt @@ -0,0 +1,539 @@ +namespace = mpo_misc + +scripted_effect leave_behind_heritage_culture_effect = { + # First, check if there's a previous culture who used to be here. We want them first. + # It's immersive to see previous cultures come back, but we don't want accidental erasure of Mongolic/Turkic heritage. + # So we only care about the previous culture if it shares the 'core heritage' of the Steppe Region they're in. + # Mongolic heritage in the east, turkic in the center and west, etc. + if = { + limit = { + scope:old_capital_county.var:migration_previous_culture ?= { + has_same_culture_heritage = $CULTURE$ + } + } + scope:old_capital_county.holder = { + set_culture = scope:old_capital_county.var:migration_previous_culture + } + # If cultures are large, divergent cultures are more interesting and immersive than mega-blobs. + scope:old_capital_county.var:migration_previous_culture = { + if = { + limit = { + any_culture_county = { count >= 20 } + } + save_scope_as = large_divergence_chance + } + } + } + else_if = { + limit = { + scope:old_holder.domicile.domicile_culture ?= { + has_same_culture_heritage = $CULTURE$ + } + } + scope:old_capital_county.holder = { + set_culture = scope:old_holder.domicile.domicile_culture + } + # If cultures are large, divergent cultures are more interesting and immersive than mega-blobs. + scope:old_holder.domicile.domicile_culture = { + if = { + limit = { + any_culture_county = { count >= 20 } + } + save_scope_as = large_divergence_chance + } + } + } + else = { + scope:old_capital_county.holder = { + set_culture = $CULTURE$ + } + $CULTURE$ = { + if = { + limit = { + any_culture_county = { count >= 20 } + } + save_scope_as = large_divergence_chance + } + else = { + save_scope_as = small_divergence_chance + } + } + } +} + +mpo_misc.0001 = { + type = character_event + hidden = yes + + trigger = { + scope:old_capital_county.holder = { + government_has_flag = government_is_herder + } + } + + immediate = { + # Eastern Steppe: Mongolic Heritage (Mongol) + if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_steppe_east + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:mongol } + } + # Western Siberian Steppe: Turkic Heritage (Kirghiz) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = dlc_mpo_steppe_central_siberia_addon + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:kirghiz } + } + # Central Steppe North: Turkic Heritage (Kipchak) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_steppe_central + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:kipchak } + } + # Central Steppe South: Turkic Heritage (Oghuz) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = heritage_area_turkestan + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:turkish } + } + # Kirghiz 1066 Eastern Steppe Homelands: Turkic Heritage (Kirghiz) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = kirghiz_homelands + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:kirghiz } + } + # Eastern Siberian Steppe: Mongol Heritage (Buryat) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = dlc_mpo_steppe_east_buryatia_addon + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:buryat } + } + # Perm: Ugro Permian Heritage (Permian) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = heritage_area_perm + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:komi } + } + # Sibir: Ugro Permian Heritage (Ostyak) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = dlc_mpo_steppe_siberia_further_expansion + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:khanty } + } + # Khorasan: Iranian Heritage (Tajik) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_khorasan + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:tajik } + } + # Persia: Iranian Heritage (Tajik) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = dlc_mpo_steppe_persia_expansion + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:tajik } + } + # Nubia: East African Heritage (Beja) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = nubia_nomad_area + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:beja } + } + # Horn of Africa: Horn African Heritage (Somali) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = horn_of_africa_nomad_area + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:somali } + } + # Volga Bulgaria: Turkic Heritage (Bolghar) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = heritage_area_volga_bulgaria + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:bolghar } + } + # Pontic Steppe: Turkic Heritage (Cuman) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = heritage_area_pontic_steppe + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:cuman } + } + # Balkans: Turkic Heritage (Pecheneg) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = custom_eastern_balkans + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:pecheneg } + } + # Balkans: Turkic Heritage (Bolghar) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = ghw_region_northern_russia + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:bolghar } + } + # Poland: Turkic Heritage (Cuman) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = ghw_region_poland + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:cuman } + } + # Southern Russia: Turkic Heritage (Cuman) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = ghw_region_southern_russia + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:cuman } + } + # Northern Russia: Turkic Heritage (Bolghar) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = ghw_region_southern_russia + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:bolghar } + } + # Baltic: Turkic Heritage (Bolghar) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = ghw_region_baltic + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:bolghar } + } + # Hungary: Magyar Heritage (Mogyer) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = custom_hungary + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:mogyer } + } + # Tarim Basin: Turkic Heritage (Uyghur) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_steppe_tarim + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:uyghur } + } + # Africa: Berber Heritage (Butr) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_africa + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:butr } + } + # Scandinavia: Sami Heritage (Sami) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_europe_north + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:sami } + } + # Middle East: Arab Heritage (Bedouin) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_middle_east + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:bedouin } + } + # Horn of Africa: Somali Heritage (Somali) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = horn_of_africa_nomad_area + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:somali } + } + # Nubia: Beja Heritage (Beja) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = nubia_nomad_area + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:beja } + } + # Karelia: Balto-Finnic Heritage (Karelian) + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = karelia_nomad_area + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:karelian } + } + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_asia_shiwei_steppe + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:shiwei } + } + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = world_asia_khitan_steppe + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:khitan } + } + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = dlc_mpo_steppe_east_buryatia_addon + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:buryat } + } + else_if = { + limit = { + scope:old_capital_county.title_province = { + geographical_region = dlc_mpo_steppe_east_andong_addon + } + } + leave_behind_heritage_culture_effect = { CULTURE = culture:jurchen } + } + # Everything Else: Turkic Heritage (Oghuz) + else = { + leave_behind_heritage_culture_effect = { CULTURE = culture:turkish } + } + # Divergences are interesting, and the steppe is the perfect place for them. + # But avoid tiny, tiny divergences of less than 3 Counties. + if = { + limit = { + exists = scope:large_divergence_chance + any_in_list = { + list = old_held_titles + count >= 3 + } + } + random = { + chance = 0 #50 - disabled for now until we know if it feels good + scope:old_capital_county.holder = { + add_character_flag = suppress_culture_notifications_and_achievements + create_divergent_culture = yes + remove_character_flag = suppress_culture_notifications_and_achievements + } + } + } + else_if = { + limit = { + exists = scope:small_divergence_chance + any_in_list = { + list = old_held_titles + count >= 3 + } + } + random = { + chance = 0 #10 - disabled for now until we know if it feels good + scope:old_capital_county.holder = { + add_character_flag = suppress_culture_notifications_and_achievements + create_divergent_culture = yes + remove_character_flag = suppress_culture_notifications_and_achievements + } + } + } + every_in_list = { + list = old_held_titles + limit = { + NOT = { culture = scope:old_capital_county.holder.culture } + } + set_county_culture = scope:old_capital_county.holder.culture + if = { + limit = { + holder ?= { + government_has_flag = government_is_herder + } + } + holder = { + set_culture = scope:old_capital_county.holder.culture + } + } + } + } +} + +mpo_misc.0002 = { + scope = none + hidden = yes + orphan = yes + + trigger = { + has_mpo_dlc_trigger = yes + } + + immediate = { + every_independent_ruler = { + if = { + limit = { + is_ai = yes + government_has_flag = government_is_nomadic + is_at_war = no + save_temporary_scope_as = nomad_capital_ruler + primary_title.tier = tier_county + domain_size > domain_limit + this = top_liege + any_held_title = { + tier = tier_county + is_landless_type_title = no + this != scope:nomad_capital_ruler.capital_county + OR = { + any_neighboring_county = { + holder.top_liege != scope:nomad_capital_ruler.top_liege + } + is_coastal_county = yes + } + } + } + save_scope_as = nomad_capital_ruler + random_held_title = { + limit = { + tier = tier_county + is_landless_type_title = no + this != scope:nomad_capital_ruler.capital_county + OR = { + any_neighboring_county = { + holder.top_liege != scope:nomad_capital_ruler.top_liege + } + is_coastal_county = yes + } + NOT = { + any_neighboring_county = { + this = scope:nomad_capital_ruler.capital_county + } + } + } + alternative_limit = { + tier = tier_county + is_landless_type_title = no + this != scope:nomad_capital_ruler.capital_county + OR = { + any_neighboring_county = { + holder.top_liege != scope:nomad_capital_ruler.top_liege + } + is_coastal_county = yes + } + } + weight = { + base = 100 + modifier = { #Less likely to pick someone you actively dislike + add = { + value = county_fertility + multiply = -1 + } + uses_county_fertility = yes + } + } + save_scope_as = title_to_abandon + } + create_character = { + template = herder_character + dynasty = none + location = scope:nomad_capital_ruler.location + save_scope_as = new_herder + } + scope:title_to_abandon = { + 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 + if = { + limit = { + title_province = { + has_holding_type = nomad_holding + } + } + title_province = { + set_holding_type = herder_holding + } + } + } + scope:new_herder = { + change_government = herder_government + every_held_title = { + limit = { + is_landless_type_title = yes + } + scope:new_herder = { destroy_title = prev } + } + } + start_tributary_interaction_effect = { + TRIBUTARY = scope:new_herder + SUZERAIN = scope:nomad_capital_ruler + } + scope:nomad_capital_ruler = { + add_prestige = minor_prestige_loss + } + } + } + } +} diff --git a/N3OW/events/pregnancy_events.txt b/N3OW/events/pregnancy_events.txt new file mode 100644 index 00000000..6b988614 --- /dev/null +++ b/N3OW/events/pregnancy_events.txt @@ -0,0 +1,1735 @@ +#Events for pregnancy on actions + +namespace = pregnancy + + + +# This event is always called on pregnancy start. Determines if the pregnancy will continue smoothly, if it will continue with complications, or be terminated prematurely. +#If either the birth goes smoothly, the mother grows sick, or the child grows sick, it will trigger the ordinary birth event (birth.0001). Otherwise a custom event will be triggered. + +# by Linnéa Thimrén +pregnancy.0001 = { + hidden = yes + immediate = { + #PREGNANCY COMPLICATION CALCULATIONS & FLAG-SETTING + random_list = { + 200 = { #All goes smoothly! + #Less likely if health is bad + modifier = { + health <= fine_health + add = -10 + } + modifier = { + health <= poor_health + add = -15 + } + + #More kids means less risk of complications! + modifier = { + add = 5 + any_child = { + even_if_dead = yes + count >= 2 + } + } + modifier = { + add = 5 + any_child = { + even_if_dead = yes + count >= 4 + } + } + + #More likely if you have sacred childbirth + modifier = { + factor = 2 # Religious doctrine focusing on providing a sanitary birthing chamber and supplies should have a substantial impact on birth complications. + faith = { + has_doctrine_parameter = safer_childbirths_active + } + } + #More likely if the Dynasty has the Kin legacy + modifier = { + factor = 1.5 # So too should constant care of pregnant/birthing mothers. + has_dynasty = yes + dynasty = { + has_dynasty_perk = kin_legacy_3 + } + } + + add_character_flag = { + flag = birth_will_go_smoothly + days = 270 + } + } + 10 = { #Pregnancy ends prematurely + trigger_event = { + id = pregnancy.2101 + days = { 80 120 } + } + } + 3 = { #Child dies during delivery (this triggers when the birth "should" have gone down, since we don't want to create the baby) + trigger_event = { + id = birth.3001 + days = { 180 200 } + } + } + 2 = { #Mother dies + modifier = { #to keep players from dying excessively + add = -2 + is_ai = no + } + add_character_flag = { #Flags blocks other birth events + flag = birth_mother_will_die + days = 270 + } + } + 2 = { #Mother and child dies (this triggers when the birth "should" have gone down, since we don't want to create the baby) + modifier = { #to keep players from dying excessively + add = -2 + is_ai = no + } + trigger_event = { + id = birth.3021 + days = { 180 200 } + } + } + 10 = { #Sickly child (all other events happen as usual) + modifier = { + factor = 0.5 # Religious doctrine focusing on providing a sanitary birthing chamber and supplies should have a substantial impact on birth complications. + faith = { + has_doctrine_parameter = healthier_children_active + } + } + add_character_flag = { #Flags blocks other birth events + flag = birth_child_will_become_sickly + days = 270 + } + } + 5 = { #Ill mother (all other events happen as usual) + modifier = { #to keep players from dying excessively + add = -4 + is_ai = no + } + add_character_flag = { #Flags blocks other birth events + flag = birth_mother_will_become_ill + days = 270 + } + } + } + } +} + + + +##################################### +# Ordinary "I'm pregnant" events! +#################################### + +# for the mother +pregnancy.1001 = { + title = pregnancy.1001.t + desc = pregnancy.1001.d + theme = pregnancy + override_background = { reference = bedchamber } + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:real_father + triggered_animation = { + trigger = { has_any_bad_relationship_with_character_trigger = { CHARACTER = root } } + animation = stress + } + animation = happiness + } + + trigger = { + NOT = { has_variable = borte_first_child_var } + any_consort = { + this = scope:real_father + } + } + + immediate = { + play_music_cue = "mx_cue_succession" + add_trait = pregnant + scope:real_father = { + if = { + limit = { accepts_adultery_without_penalty_trigger = no } + pregnancy_spouse_suspicion_chance_effect = yes + } + } + } + + option = { + name = pregnancy.1001.a + } +} + +#for the father if it's the first child or the first dynastic heir (assumed biological father) +pregnancy.1002 = { + title = pregnancy.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + this = character:125501 # You are Temüjin + scope:mother = { has_variable = borte_first_child_var } + } + desc = pregnancy.1002.d.borte + } + desc = pregnancy.1002.d + } + } + theme = pregnancy + override_background = { reference = bedchamber } + left_portrait = { + character = scope:mother + triggered_animation = { + trigger = { + scope:mother = { has_variable = borte_first_child_var } + } + animation = worry + } + animation = love + } + right_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + AND = { + scope:mother = { has_variable = borte_first_child_var } + this = character:125501 + } + } + } + animation = stress + } + animation = happiness + } + + immediate = { + play_music_cue = "mx_cue_succession" + } + + option = { + name = { + trigger = { + scope:mother = { has_variable = borte_first_child_var } + } + text = pregnancy.1002.a.borte + } + name = { + trigger = { + NOT = { + scope:mother = { has_variable = borte_first_child_var } + } + } + text = pregnancy.1002.a + } + show_as_tooltip = { + scope:mother = { + add_trait_force_tooltip = pregnant + } + } + } +} + +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 = { + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:ex_spouse = { + is_alive = no + } + } + desc = pregnancy.1101.t.dead + } + desc = pregnancy.1101.t.divorced + } + } + desc = { + desc = pregnancy.1101.desc.start + first_valid = { + triggered_desc = { + trigger = { + scope:ex_spouse = { + is_alive = no + } + } + desc = pregnancy.1101.desc.dead + } + desc = pregnancy.1101.desc.divorced + + } + desc = pregnancy.1101.desc.end + } + theme = pregnancy + override_background = { reference = bedchamber } + left_portrait = { + character = root + } + right_portrait = scope:ex_spouse + + trigger = { + # Event is only valid if our former spouse (dead or divorced) is both the real and assumed father (e.g., it was a legitimate pregnancy when the child was conceived). + former_consort_was_father = yes + } + + immediate = { + play_music_cue = "mx_cue_succession" + add_trait = pregnant + scope:father = { + save_scope_as = ex_spouse + } + } + + option = { + name = { + trigger = { + scope:ex_spouse = { + is_alive = yes + } + } + text = pregnancy.1101.a.divorced + } + name = { + trigger = { + scope:ex_spouse = { + is_alive = no + } + } + text = pregnancy.1101.a.dead + } + + # Notify spouses about the pregnancy. + every_spouse = { + trigger_event = pregnancy.1102 + } + # Notify the father if alive. + scope:ex_spouse = { + if = { + limit = { + is_alive = yes + } + trigger_event = pregnancy.1103 + } + } + } +} + +# For the mother's husband (not father) to explain why their spouse is pregnant and that it is okay. +pregnancy.1102 = { + title = pregnancy.1102.t + desc = pregnancy.1102.desc + theme = pregnancy + override_background = { reference = bedchamber } + left_portrait = { + character = scope:mother + } + right_portrait = { + character = scope:ex_spouse + triggered_animation = { + trigger = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } } + animation = stress + } + animation = happiness + } + + + option = { + name = pregnancy.1102.a + show_as_tooltip = { + scope:mother = { + add_trait_force_tooltip = pregnant + } + } + } +} + + +# For the father, explaining that their ex-wife will bear them a new child soon. +pregnancy.1103 = { + type = letter_event + opening = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + any_former_concubine = { this = scope:mother } + any_former_concubinist = { this = scope:mother } + } + } + desc = pregnancy.1103.opening_concubine + } + desc = pregnancy.1103.opening + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + any_former_concubine = { this = scope:mother } + any_former_concubinist = { this = scope:mother } + } + } + desc = pregnancy.1103.desc_concubine + } + desc = pregnancy.1103.desc + } + } + sender = scope:mother + + option = { + name = pregnancy.1103.a + show_as_tooltip = { + scope:mother = { + add_trait_force_tooltip = pregnant + } + } + } +} + +########################### +# Bastard pregnancies +########################### + +#Unmarried mother pregnant with child +pregnancy.2001 = { + title = pregnancy.2001.t + desc = { + desc = pregnancy.2001.opening + first_valid = { + triggered_desc = { + trigger = { + scope:real_father = { is_married = yes } + } + desc = pregnancy.2001.father_is_married + } + desc = pregnancy.2001.father_is_unmarried + } + } + theme = pregnancy + override_background = { reference = bedchamber } + left_portrait = { + character = root + } + right_portrait = { + character = scope:real_father + triggered_animation = { + trigger = { has_any_bad_relationship_with_character_trigger = { CHARACTER = scope:mother } } + animation = stress + } + animation = happiness + } + + trigger = { + is_pregnant = yes # Fix to prevent pipeline failures on account of set_num_pregnancy_children being used on an unpregnant character + 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 + } + } + + immediate = { + play_music_cue = "mx_cue_succession" + hidden_effect = { + set_num_pregnancy_children = 1 + add_character_flag = { + flag = unmarried_bastard_pregnancy + months = 9 + } + } + unmarried_mother_pregnancy_effect = yes + } + + option = { #Publicly name the father! + name = pregnancy.2001.a + bastardy_pregnancy_announcement_effect = yes + hidden_effect = { + expose_lover_secret_or_run_consequence_effect = { + TARGET = scope:real_father + EXPOSER = scope:mother + } + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_honor = 0.5 + ai_boldness = 0.5 + ai_compassion = 0.25 + } + compare_modifier = { + value = ai_vengefulness + trigger = { + opinion = { + target = scope:real_father + value < 0 + } + ai_vengefulness > 0 + } + } + } + } + + option = { #Only tell the real_father + name = pregnancy.2001.b + trigger = { + scope:real_father = { is_alive = yes } + } + hidden_effect = { + add_character_flag = { #Add flag to determine what should happen in adultery.1101 + flag = planning_to_confess_to_real_father + days = 22 + } + } + if = { + limit = { + any_owned_story = { + type = story_peasant_affair + var:peasant_character = { + this = scope:real_father + } + } + } + add_character_flag = is_looking_for_peasant #To take the story_peasant_affair to the next step + add_character_flag = peasant_affair_already_looking + custom_tooltip = search_for_real_father_tt + } + else = { + custom_tooltip = reveal_illegitimate_pregnancy_to_real_father_tt + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 1 + ai_rationality = 0.5 + } + modifier = { # Never hide the truth in faiths with the Polyamory tenet. + factor = 0 + accepts_adultery_without_penalty_trigger = yes + } + } + } + + option = { #Keep it secret! + name = pregnancy.2001.c + flavor = pregnancy.2001.c.tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { # Never hide the truth in faiths with the Polyamory tenet. + factor = 0 + accepts_adultery_without_penalty_trigger = yes + } + } + } + + option = { #Attempt to terminate the pregnancy + name = pregnancy.2001.d + pregnancy_termination_attempt_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { # Never hide the truth in faiths with the Polyamory tenet. + factor = 0 + accepts_adultery_without_penalty_trigger = yes + } + } + } +} + +#Married woman pregnant with a bastard child +pregnancy.2002 = { + type = character_event + title = pregnancy.2002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { accepts_adultery_without_penalty_trigger = yes } + desc = pregnancy.2002.desc.polyamorous + } + desc = pregnancy.2002.desc + } + } + theme = pregnancy + left_portrait = { + character = root + animation = worry + } + right_portrait = scope:father + lower_center_portrait = scope:real_father + + trigger = { + # If we are married and/or have concubines, but the real father is not one of them, it's a bastard! + 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 + } + } + + immediate = { + play_music_cue = "mx_cue_succession" + # If we got pregnant before our marriage, there will be no assumed father set. However, we need one for the event logic to work correctly. + # Since this is a pretty rare edge case, we just go ahead and set the assumed father to a current living spouse. + if = { + limit = { + NOT = { exists = pregnancy_assumed_father } + } + random_consort = { + save_scope_as = assumed_father + } + hidden_effect = { + set_pregnancy_assumed_father = scope:assumed_father + } + } + + save_scope_as = mother + hidden_effect = { + set_num_pregnancy_children = 1 + if = { + limit = { + exists = primary_partner + } + primary_partner = { + save_scope_as = spouse + } + } + else = { + random_consort = { + save_scope_as = spouse + } + } + add_character_flag = { + flag = bastard_pregnancy + months = 9 + } + } + } + + option = { #Confess + name = { + trigger = { accepts_adultery_without_penalty_trigger = no } + text = pregnancy.2002.a + } + name = { + trigger = { accepts_adultery_without_penalty_trigger = yes } + text = pregnancy.2001.a + } + married_mother_pregnancy_effect = yes + add_fornicator_trait_or_nothing_effect = yes + bastardy_pregnancy_announcement_effect = yes + if = { + limit = { accepts_adultery_without_penalty_trigger = no } + expose_lover_secret_or_run_consequence_effect = { + TARGET = scope:real_father + EXPOSER = scope:mother + } + } + ai_chance = { + base = 0 + modifier = { # Never hide the truth in faiths with the Polyamory tenet. + add = 100 + accepts_adultery_without_penalty_trigger = yes + } + } + } + + option = { #Tell the real father + name = pregnancy.2002.b + trigger = { + NOT = { + exists = primary_partner + } + } + if = { + limit = { + any_owned_story = { + type = story_peasant_affair + var:peasant_character = { + this = scope:real_father + } + } + } + add_character_flag = is_looking_for_peasant #To take the story_peasant_affair to the next step + add_character_flag = peasant_affair_already_looking + custom_tooltip = search_for_real_father_tt + } + else = { + custom_tooltip = reveal_illegitimate_pregnancy_to_real_father_tt + } + add_character_flag = { #Add flag to determine what should happen in adultery.1101 + flag = planning_to_confess_to_real_father + days = 22 + } + married_mother_pregnancy_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 1 + ai_rationality = 0.5 + } + modifier = { # Never hide the truth in faiths with the Polyamory tenet. + factor = 0 + accepts_adultery_without_penalty_trigger = yes + } + } + stress_impact = { + honest = medium_stress_impact_gain + } + } + + option = { #Keep it secret! + name = pregnancy.2002.c + custom_tooltip = pregnancy.2002.c.tt + married_mother_pregnancy_effect = yes + stress_impact = { + honest = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + modifier = { # Never hide the truth in faiths with the Polyamory tenet. + factor = 0 + accepts_adultery_without_penalty_trigger = yes + } + } + } + + option = { #Attempt to get rid of the child + name = pregnancy.2002.d + pregnancy_termination_attempt_effect = yes + + ai_chance = { + base = 0 + } + } +} + + +################ +# Attempted Termination Chain +# 2003 - 2007 +############### +#Successful attempt, no side effects +pregnancy.2003 = { + type = character_event + title = pregnancy.2003.t + desc = { + random_valid = { + desc = pregnancy.2003.desc_no_notice + desc = pregnancy.2003.desc_pain + } + } + theme = pregnancy + left_portrait = { + character = root + animation = happiness + } + + immediate = { + end_pregnancy = yes + pregnancy_cleanup_effect = yes + } + + option = { #It is for the best + name = pregnancy.2003.a + } +} + +#Successful attempt, fall ill +pregnancy.2004 = { + type = character_event + title = pregnancy.2004.t + desc = pregnancy.2004.desc + theme = pregnancy + left_portrait = { + character = root + animation = personality_cynical + } + + immediate = { + end_pregnancy = yes + add_trait_force_tooltip = ill + pregnancy_cleanup_effect = yes + } + + option = { #It was what had to be done + name = pregnancy.2004.a + } +} + +#Failed attempt, no side effects +pregnancy.2005 = { + type = character_event + title = pregnancy.2005.t + desc = pregnancy.2005.desc + theme = pregnancy + left_portrait = { + character = root + animation = sadness + } + + immediate = { + if = { + limit = { + is_married = no + } + #unmarried_mother_pregnancy_effect = yes + } + else = { + married_mother_pregnancy_effect = yes + } + } + + option = { #I had to try + name = pregnancy.2005.a + } +} + +#Die +pregnancy.2007 = { + type = character_event + title = pregnancy.2007.t + desc = pregnancy.2007.desc + theme = pregnancy + left_portrait = { + character = root + animation = grief + } + + immediate = { + play_music_cue = "mx_cue_murder" + } + + option = { #It was what had to be done + name = pregnancy.2007.a + death = { + death_reason = death_attempted_treatment + } + } +} + + +################ +# Same-sex +# 250 - 2059 +############### + +# Pregnant while all mother's consorts are women +# by Linnéa Thimrén +pregnancy.2050 = { + title = pregnancy.2050.t + desc = { + first_valid = { + triggered_desc = { + trigger = { accepts_adultery_without_penalty_trigger = yes } + desc = pregnancy.2050.desc.polyamorous + } + desc = pregnancy.2050.desc + } + } + theme = pregnancy + left_portrait = scope:real_father + right_portrait = scope:spouse + + 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 } + } + + # 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 + } + } + + immediate = { + play_music_cue = "mx_cue_succession" + + save_scope_as = mother + hidden_effect = { + set_num_pregnancy_children = 1 + if = { + limit = { + exists = primary_partner + } + primary_partner = { + save_scope_as = spouse + } + } + else = { + random_consort = { + save_scope_as = spouse + } + } + add_character_flag = { + flag = bastard_pregnancy + months = 9 + } + } + + # People will know you've been unfaithful, obviously + add_fornicator_trait_or_nothing_effect = yes + } + + option = { #Confess (for now this is the only option since you cannot deny that you've slept with someone else) + name = { + trigger = { accepts_adultery_without_penalty_trigger = no } + text = pregnancy.2002.a + } + name = { + trigger = { accepts_adultery_without_penalty_trigger = yes } + text = pregnancy.2001.a + } + married_mother_pregnancy_effect = yes + bastardy_pregnancy_announcement_effect = yes + expose_lover_secret_or_run_consequence_effect = { + TARGET = scope:real_father + EXPOSER = scope:mother + } + ai_chance = { + base = 100 + } + } +} + + + +#################### +# Pregnancy ended prematurely (naturally) +# by Linnéa Thimrén +################### +pregnancy.2101 = { + type = character_event + title = pregnancy.2101.t + desc = { + random_valid = { + first_valid = { + triggered_desc = { + trigger = { + any_child = { + even_if_dead = yes + count >= 1 + } + } + desc = pregnancy.2101.desc_other_children + } + desc = pregnancy.2101.desc_pain + } + desc = pregnancy.2101.desc + } + } + theme = pregnancy + left_portrait = { + character = root + animation = personality_cynical + } + + trigger = { + is_pregnant = yes + } + + immediate = { + if = { + limit = { + exists = primary_partner + } + primary_partner = { + save_scope_as = spouse + } + } + create_character_memory = { + type = child_premature + participants = { mother = root } + } + hidden_effect = { + end_pregnancy = yes + pregnancy_cleanup_effect = yes + } + } + + option = { + name = pregnancy.2101.a + + #To tell spouse + if = { + limit = { + exists = scope:spouse + } + scope:spouse = { trigger_event = pregnancy.2102 } + } + + #To tell real_father if they're not your spouse and they know of the pregnancy + if = { + limit = { + exists = scope:spouse + NOT = { + scope:spouse = scope:real_father + has_character_flag = pregnancy_real_father_knows + } + } + scope:real_father = { trigger_event = pregnancy.2102 } + } + } +} + +#Pregnancy ended prematurely - for father +pregnancy.2102 = { + type = character_event + title = pregnancy.2101.t + desc = pregnancy.2102.desc + theme = pregnancy + right_portrait = { + character = scope:mother + animation = personality_cynical + } + + immediate = { + create_character_memory = { + type = child_premature + participants = { mother = scope:mother } + } + } + + option = { + name = pregnancy.2102.a + } +} + + +############### +#3000: Events for the real father +###################### + +#real_father suspects they are the father +#Can be triggered if the mother tries to keep fatherhood hidden from real_father in pregnancy.2002 or 2003 +pregnancy.3001 = { + type = character_event + title = pregnancy.3001.t + desc = { + desc = pregnancy.3001.opening + first_valid = { + triggered_desc = { + trigger = { + scope:mother = { any_relation = { type = lover this = root } } + has_opinion_modifier = { + modifier = love_opinion + target = scope:mother + } + } + desc = pregnancy.3001.lovers_love + } + triggered_desc = { + trigger = { + scope:mother = { any_relation = { type = lover this = root } } + } + desc = pregnancy.3001.lovers_not_love + } + desc = pregnancy.3001.not_lovers + } + } + theme = pregnancy + left_portrait = scope:mother + + trigger = { + scope:mother = { + is_pregnant = yes + NOR = { + any_owned_story = { + exists = var:peasant_character + var:peasant_character = { this = root } + } + has_character_flag = pregnancy_real_father_knows + } + } + + #Safety block for spouses that are also lovers, since this event is for bastard fathers + NOT = { is_consort_of = scope:mother } + } + + + option = { #I must confront her about it! + name = pregnancy.3001.a + custom_tooltip = pregnancy.3001.a.tt + hidden_effect = { + save_scope_as = real_father_inquirer + scope:mother = { + trigger_event = { + id = pregnancy.5001 + days = { 3 5 } + } + } + } + } + + option = { #Could it be... + name = pregnancy.3001.b + custom_tooltip = pregnancy.3001.b.tt + } +} + + +#Mother chooses to tell the real father in pregnancy.2002 +pregnancy.3002 = { + type = character_event + title = pregnancy.3002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { any_relation = { type = lover this = scope:mother }} + desc = pregnancy.3002.lovers + } + desc = pregnancy.3002.not_lovers + } + triggered_desc = { + trigger = { exists = scope:spouse } + } + } + theme = pregnancy + left_portrait = scope:mother + + trigger = { + scope:mother = { + is_pregnant = yes + } + } + + immediate = { + play_music_cue = "mx_cue_succession" + } + + option = { #What will become of the child + name = pregnancy.3002.a + trigger = { + has_opinion_modifier = { + modifier = love_opinion + target = scope:mother + } + } + exclusive = yes + custom_tooltip = pregnancy.3002.a.tt + scope:mother = { + add_character_flag = { + flag = pregnancy_real_father_knows + months = 9 + } + } + } + + option = { #What will become of the child + name = { + trigger = { + OR = { + any_child = { + OR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = wild_oat + } + } + any_known_secret = { + OR = { + secret_type = secret_disputed_heritage + secret_type = secret_unmarried_illegitimate_child + } + exists = secret_target + exists = secret_target.real_father + secret_target = { + real_father = root + } + } + } + } + text = pregnancy.3002.b.not_again + } + name = { + text = pregnancy.3002.b + } + custom_tooltip = pregnancy.3002.a.tt + scope:mother = { + add_character_flag = { + flag = pregnancy_real_father_knows + months = 9 + } + } + } + + option = { #The whole world must know the truth + name = pregnancy.3002.c + trigger = { + is_married = no + } + save_scope_value_as = { + name = real_father_revealing + value = yes + } + bastardy_pregnancy_announcement_effect = yes + } +} + + + +#Unmarried mother comes to unmarried father +pregnancy.3003 = { + type = character_event + title = pregnancy.3003.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + faith = { + has_doctrine_parameter = bastards_none + } + } + desc = pregnancy.3003.desc_no_bastards + } + desc = pregnancy.3003.desc + } + } + theme = pregnancy + left_portrait = scope:mother + + trigger = { + scope:mother = { + is_pregnant = yes + } + } + + immediate = { + play_music_cue = "mx_cue_succession" + scope:mother = { + add_character_flag = { + flag = pregnancy_real_father_knows + months = 9 + } + } + if = { + limit = { + is_ai = no + } + add_character_flag = { + flag = tutorial_reactive_advice_bastards + } + } + } + + option = { #This must be kept secret! + name = pregnancy.3003.a + custom_tooltip = pregnancy.3003.a.tt + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } + + option = { #The whole world must know! + name = pregnancy.3003.b + bastardy_pregnancy_announcement_effect = yes + ai_chance = { + base = 25 + } + } +} + + +#Unmarried mother comes to married father +pregnancy.3004 = { + type = character_event + title = pregnancy.3004.t + desc = pregnancy.3004.desc + theme = pregnancy + left_portrait = scope:mother + lower_right_portrait = scope:spouse + + trigger = { + scope:mother = { + is_pregnant = yes + } + } + + immediate = { + play_music_cue = "mx_cue_succession" + #The real father knows now + scope:mother = { + add_character_flag = { + flag = pregnancy_real_father_knows + months = 9 + } + } + #For portrait and desc purposes + primary_spouse = { + save_scope_as = spouse + } + show_as_tooltip = { + scope:mother = { add_trait_force_tooltip = pregnant } + } + } + + option = { #This must be kept secret! + name = pregnancy.3004.a + } +} + +#5000: Follow-ups +#The child's real_father suspects, confronts mother about it. +#Fired by the real_father choosing to press the mother in pregnancy.3001 +pregnancy.5001 = { + type = character_event + title = pregnancy.5001.t + desc = { + desc = pregnancy.5001.desc + first_valid = { + triggered_desc = { + trigger = { scope:real_father = scope:real_father_inquirer } + desc = pregnancy.5001.real_father + } + desc = pregnancy.5001.not_father + } + } + theme = pregnancy + left_portrait = { + character = scope:real_father_inquirer + animation = worry + } + right_portrait = { + trigger = { + scope:spouse != scope:real_father_inquirer + } + character = scope:spouse + } + + trigger = { + scope:mother = { + is_pregnant = yes + } + } + + option = { #It is true! + name = pregnancy.5001.a + trigger = { + scope:real_father_inquirer = scope:real_father + } + custom_tooltip = reveal_illegitimate_pregnancy_to_real_father_tt + ai_chance = { + base = 100 + } + scope:real_father = { + trigger_event = { + id = pregnancy.5002 #The truth is revealed to them + days = { 3 5 } + } + } + } + + option = { #Insist real_father is wrong + name = pregnancy.5001.b + trigger = { scope:real_father_inquirer != scope:real_father } + fallback = yes # Only show if they are not the father + ai_chance = { + base = 100 + } + scope:real_father = { + trigger_event = { + id = pregnancy.5003 #Denial + days = { 3 5 } + } + } + } +} + + +#Mother confesses that root is the real_father, sharing the secret with them +pregnancy.5002 = { + type = character_event + title = pregnancy.5002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_opinion_modifier = { + modifier = love_opinion + target = scope:mother + } + } + desc = pregnancy.5002.love + } + desc = pregnancy.5002.not_love + } + } + theme = pregnancy + left_portrait = scope:mother + + trigger = { + scope:mother = { + is_pregnant = yes + } + } + + immediate = { + hidden_effect = { + scope:mother = { + add_character_flag = { + flag = pregnancy_real_father_knows + months = 9 + } + } + } + if = { + limit = { + is_ai = no + } + add_character_flag = { + flag = tutorial_reactive_advice_bastards + } + } + } + + option = { #Ah, what will become of our child? + name = pregnancy.5002.a + custom_tooltip = pregnancy.3003.a.tt + } + + option = { + name = pregnancy.5002.b + expose_lover_secret_or_run_consequence_effect = { + TARGET = scope:mother + EXPOSER = root + } + bastardy_pregnancy_announcement_effect = yes + } +} + + +#Mother keeps insisting the child is not root's +pregnancy.5003 = { + type = character_event + title = pregnancy.5003.t + desc = pregnancy.5003.desc + theme = pregnancy + left_portrait = { + character = scope:mother + animation = personality_callous + } + + option = { #Are they really telling the truth? + name = pregnancy.5003.a + } +} + + + +######################## +# Someone publicly announces the child is theirs +# 6000 +######################## + +### 6000 - 6099: Mother announces +#Mother announces the child - and the real father +pregnancy.6001 = { + type = character_event + title = pregnancy.6001.t + desc = pregnancy.6001.desc + theme = pregnancy + left_portrait = { + character = scope:mother + animation = personality_callous + } + right_portrait = scope:real_father + + option = { + name = pregnancy.6001.a + custom_tooltip = pregnancy_announcement_my_child_will_be_a_bastard + } +} + + +#Mother announces child father - event for real father +pregnancy.6002 = { + type = character_event + title = pregnancy.6002.t + desc = { + desc = pregnancy.6002.desc + triggered_desc = { + trigger = { + exists = scope:spouse + scope:spouse = { accepts_adultery_without_penalty_trigger = no } + } + desc = pregnancy.6002.married + } + triggered_desc = { + trigger = { + is_married = no + opinion = { + target = scope:mother + value <= 0 + } + } + desc = pregnancy.6002.unmarried_unsympathetic + } + triggered_desc = { + trigger = { + is_married = no + opinion = { + target = scope:mother + value > 0 + } + } + desc = pregnancy.6002.unmarried_sympathetic + } + } + + theme = pregnancy + left_portrait = scope:mother + right_portrait = { + character = scope:spouse + animation = disapproval + } + + immediate = { + if = { + limit = { + primary_partner ?= { accepts_adultery_without_penalty_trigger = no } + } + primary_partner = { + save_scope_as = spouse + } + } + else = { + random_consort = { + limit = { accepts_adultery_without_penalty_trigger = no } + save_scope_as = spouse + } + } + } + + option = { + name = pregnancy.6002.a + trigger = { is_married = no } + } + + after = { + custom_tooltip = pregnancy_announcement_the_child_will_be_a_bastard_real_father + } +} + + +#Mother announces child father - event for spouse of mother +pregnancy.6003 = { + type = character_event + title = pregnancy.6003.t + desc = pregnancy.6003.desc + theme = pregnancy + left_portrait = scope:mother + lower_left_portrait = scope:real_father + + immediate = { + play_music_cue = "mx_cue_prison" + } + + option = { + name = pregnancy.6003.a + custom_tooltip = pregnancy_announcement_the_child_will_be_a_bastard + } +} + + +#Mother announces child father - event for family of mother +pregnancy.6004 = { + type = character_event + title = pregnancy.6004.t + desc = { + desc = pregnancy.6004.desc + first_valid = { + triggered_desc = { + trigger = { + scope:mother = { + is_close_family_trigger = { + CHARACTER = scope:real_father + } + } + trait_is_criminal_in_faith_trigger = { TRAIT = incestuous FAITH = root.faith GENDER_CHARACTER = scope:mother } + } + desc = pregnancy.6004.incest + } + triggered_desc = { + trigger = { + exists = scope:spouse + } + desc = pregnancy.6004.mother_married + } + desc = pregnancy.6004.mother_unmarried + } + } + theme = pregnancy + left_portrait = scope:mother + lower_left_portrait = scope:real_father + + immediate = { + play_music_cue = "mx_cue_prison" + scope:mother = { + if = { + limit = { exists = primary_partner } + primary_partner = { + save_scope_as = spouse + } + } + } + } + + option = { + name = pregnancy.6004.a + custom_tooltip = pregnancy_announcement_the_child_will_be_a_bastard + } +} + + + +#Mother announces child father - event for spouse of real_father +pregnancy.6005 = { + type = character_event + title = pregnancy.6005.t + desc = pregnancy.6005.desc + theme = pregnancy + left_portrait = scope:real_father + right_portrait = scope:mother + + immediate = { + play_music_cue = "mx_cue_prison" + } + + option = { + name = pregnancy.6005.a + custom_tooltip = pregnancy_announcement_the_child_will_be_a_bastard + } +} + + + +#Mother announces child father - event for family of real_father +pregnancy.6006 = { + type = character_event + title = pregnancy.6006.t + desc = { + desc = pregnancy.6006.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:spouse + } + desc = pregnancy.6006.real_father_married + } + desc = pregnancy.6006.real_father_unmarried + } + } + theme = pregnancy + left_portrait = scope:mother + lower_left_portrait = scope:real_father + lower_center_portrait = scope:spouse + override_background = { + reference = dungeon + trigger = { + scope:mother = { is_imprisoned = yes } + } + } + + immediate = { + play_music_cue = "mx_cue_prison" + scope:real_father = { + if = { + limit = { exists = primary_partner } + primary_partner = { + save_scope_as = spouse + } + } + } + } + + option = { + name = pregnancy.6006.a + } +} + + +#Mother announces child father - event for real_father +pregnancy.6999 = { + type = character_event + title = pregnancy.6999.t + desc = pregnancy.6999.desc + theme = pregnancy + left_portrait = scope:mother + right_portrait = scope:real_father + + option = { + name = pregnancy.6999.a + custom_tooltip = pregnancy_announcement_the_child_will_be_a_bastard + } +} diff --git a/N3OW/events/realm_maintenance_events.txt b/N3OW/events/realm_maintenance_events.txt new file mode 100644 index 00000000..870a4d05 --- /dev/null +++ b/N3OW/events/realm_maintenance_events.txt @@ -0,0 +1,423 @@ +#Realm Maintenance events + +namespace = realm_maintenance + + + +#Gain county corruption +realm_maintenance.0002 = { + hidden = yes + + trigger = { + scope:county = { + immune_to_county_corruption_trigger = no + } + #Holder still needs to be the same + scope:county.holder = scope:corruption_holder + } + + immediate = { + scope:county = { + set_variable = { + name = corruption_event_happening + days = 1 + } + add_random_county_corruption_in_debt_effect = yes + } + } +} + +#Gain county corruption +realm_maintenance.0003 = { + hidden = yes + + trigger = { + scope:county = { + county_control < low_county_control_limit + immune_to_county_corruption_trigger = no + } + #Holder still needs to be the same + scope:county.holder = scope:corruption_holder + } + + immediate = { + scope:county = { + set_variable = { + name = corruption_event_happening + days = 1 + } + add_random_county_corruption_low_control_effect = yes + } + } +} + + +#Remove county corruption +realm_maintenance.0004 = { + hidden = yes + + trigger = { + scope:county = { + county_control > high_county_control_limit + has_county_corruption_trigger = yes + } + #Holder still needs to be the same + scope:county.holder = scope:corruption_holder + } + + immediate = { + scope:county = { + set_variable = { + name = corruption_event_happening + days = 1 + } + remove_random_county_corruption_modifier_effect = yes + } + } +} + +# I have gained new vassals (inform them with toasts)! +realm_maintenance.1000 = { + hidden = yes + + trigger = { + has_any_landed_title_trigger = yes + } + + immediate = { + save_scope_as = new_liege + + scope:vassal = { + if = { + limit = { + # Only players care about notifications + is_ai = no + + # Don't send a notification if a player just died and their heir is replacing them under the same liege. + trigger_if = { + limit = { + exists = scope:old_liege + scope:transfer_type = flag:inheritance + } + NOT = { + scope:old_liege = { + is_alive = no + top_liege != this + liege = scope:new_liege + } + } + } + } + trigger_event = realm_maintenance.1001 + } + # Petition liege invalidation + if = { + limit = { + exists = var:petition_liege_scope + NOT = { var:petition_liege_scope = scope:new_liege } + } + trigger_event = { on_action = petition_liege_travel_planner_exit } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + } + # Pay homage invalidation + if = { + limit = { + exists = var:homage_liege_scope + NOT = { var:homage_liege_scope = scope:new_liege } + } + trigger_event = { on_action = pay_homage_travel_planner_exit } + current_travel_plan ?= { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + } + # Bow Before Liege invalidation + if = { + limit = { + exists = var:pledge_loyalty_to_liege_scope + NOT = { var:pledge_loyalty_to_liege_scope = scope:new_liege } + } + trigger_event = { on_action = pledge_loyalty_to_liege_travel_planner_exit } + current_travel_plan = { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + } + } + } +} + +# I have a new liege toast! +scripted_effect send_new_liege_toast_effect = { + if = { + limit = { + scope:new_liege = { tgp_is_ceremonial_regent_trigger = yes } # Not 'actual' ruler + } + send_interface_toast = { + type = msg_liege_changed + title = realm_maintenance.1001.t.ceremonial_regent + left_icon = scope:new_liege + right_icon = scope:old_liege + custom_tooltip = realm_maintenance.1001.$TRANSFER_TYPE$ + } + } + else = { + send_interface_toast = { + type = msg_liege_changed + title = realm_maintenance.1001.t + left_icon = scope:new_liege + right_icon = scope:old_liege + custom_tooltip = realm_maintenance.1001.$TRANSFER_TYPE$ + } + } +} + +realm_maintenance.1001 = { + hidden = yes + + immediate = { + if = { + limit = { always = no } + send_new_liege_toast_effect = { TRANSFER_TYPE = conquest } + } + else_if = { + limit = { scope:transfer_type = flag:conquest_holy_war } + send_new_liege_toast_effect = { TRANSFER_TYPE = conquest_holy_war } + } + else_if = { + limit = { scope:transfer_type = flag:conquest_claim } + send_new_liege_toast_effect = { TRANSFER_TYPE = conquest_claim } + } + else_if = { + limit = { scope:transfer_type = flag:conquest_populist } + send_new_liege_toast_effect = { TRANSFER_TYPE = conquest_populist } + } + else_if = { + limit = { scope:transfer_type = flag:inheritance } + send_new_liege_toast_effect = { TRANSFER_TYPE = inheritance } + } + else_if = { + limit = { scope:transfer_type = flag:abdication } + send_new_liege_toast_effect = { TRANSFER_TYPE = abdication } + } + else_if = { + limit = { scope:transfer_type = flag:destroyed } + send_new_liege_toast_effect = { TRANSFER_TYPE = destroyed } + } + else_if = { + limit = { scope:transfer_type = flag:created } + send_new_liege_toast_effect = { TRANSFER_TYPE = created } + } + else_if = { + limit = { scope:transfer_type = flag:usurped } + send_new_liege_toast_effect = { TRANSFER_TYPE = usurped } + } + else_if = { + limit = { scope:transfer_type = flag:granted } + send_new_liege_toast_effect = { TRANSFER_TYPE = granted } + } + else_if = { + limit = { scope:transfer_type = flag:revoked } + send_new_liege_toast_effect = { TRANSFER_TYPE = revoked } + } + else_if = { + limit = { scope:transfer_type = flag:election } + send_new_liege_toast_effect = { TRANSFER_TYPE = election } + } + else_if = { + limit = { scope:transfer_type = flag:independency } + send_new_liege_toast_effect = { TRANSFER_TYPE = independency } + } + else_if = { + limit = { scope:transfer_type = flag:returned } + send_new_liege_toast_effect = { TRANSFER_TYPE = returned } + } + else_if = { + limit = { scope:transfer_type = flag:leased_out } + send_new_liege_toast_effect = { TRANSFER_TYPE = leased_out } + } + else_if = { + limit = { scope:transfer_type = flag:lease_revoked } + send_new_liege_toast_effect = { TRANSFER_TYPE = lease_revoked } + } + else_if = { + limit = { scope:transfer_type = flag:faction_demand } + send_new_liege_toast_effect = { TRANSFER_TYPE = faction_demand } + } + else_if = { + limit = { scope:transfer_type = flag:swear_fealty } + send_new_liege_toast_effect = { TRANSFER_TYPE = swear_fealty } + } + else_if = { + limit = { scope:transfer_type = flag:appointment } + send_new_liege_toast_effect = { TRANSFER_TYPE = appointment } + } + else_if = { + limit = { scope:transfer_type = flag:appointment_succession } + send_new_liege_toast_effect = { TRANSFER_TYPE = appointment_succession } + } + else_if = { + limit = { scope:transfer_type = flag:stepped_down } + send_new_liege_toast_effect = { TRANSFER_TYPE = stepped_down } + } + else = { + send_new_liege_toast_effect = { TRANSFER_TYPE = error } + } + } +} + + +# You just inherited an Emperor title!! +# by Linnéa Thimrén +realm_maintenance.2001 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { tgp_is_ceremonial_regent_trigger = yes } + desc = realm_maintenance.2001.t_ceremonial_regent + } + desc = realm_maintenance.2001.t + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:murder + } + desc = realm_maintenance.2001.desc_murdered + } + triggered_desc = { + trigger = { + scope:previous_holder = { is_alive = no } + } + desc = realm_maintenance.2001.desc_dead + } + desc = realm_maintenance.2001.desc_alive + } + first_valid = { + triggered_desc = { + trigger = { tgp_is_ceremonial_regent_trigger = yes } + desc = realm_maintenance.2001.desc_ceremonial_regent + } + desc = realm_maintenance.2001.desc + } + } + theme = crown + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:murder + } + animation = schadenfreude + } + triggered_animation = { + trigger = { always = yes } + animation = personality_bold + } + } + right_portrait = { + character = primary_title.var:administrative_ui_special_title.holder + animation = holding_hu + trigger = { + NOT = { this = root } + } + } + lower_right_portrait = scope:previous_holder + cooldown = { days = 1 } + + trigger = { + scope:title.tier = tier_empire + primary_title = scope:title + exists = scope:previous_holder + NOT = { #You don't already have an empire tier title + any_held_title = { + title_tier = empire + this != scope:title + } + } + NAND = { + scope:title = title:e_japan + exists = top_liege.primary_title.var:administrative_ui_special_title + has_title = top_liege.primary_title.var:administrative_ui_special_title + } + } + + immediate = { + if = { + limit = { + has_ach_dlc_trigger = yes + } + coronation_reset_realm_law_effect = yes #we need to reset the crown laws immediately, not wait for the next tick + } + add_character_flag = had_coronation_prompt + assign_quirk_effect = yes + if = { + limit = { + OR = { + any_secret = { + type = secret_murder + secret_target = scope:previous_holder + } + scope:previous_holder = { + is_alive = no + killer ?= root + } + } + } + save_scope_value_as = { + name = murder + value = yes + } + } + show_as_tooltip = { + get_title = scope:title + } + } + + option = { + name = { + text = realm_maintenance.2001.a + trigger = { tgp_is_ceremonial_regent_trigger = no } + } + name = { + text = realm_maintenance.2001.a.ceremonial_regent + trigger = { tgp_is_ceremonial_regent_trigger = yes } + } + + if = { + limit = { + has_ach_dlc_trigger = yes + has_realm_law = uncrowned + tgp_is_ceremonial_regent_trigger = no + NOT = { has_character_flag = had_coronation_prompt } + } + if = { + limit = { + coronation_has_proper_artifact_trigger = yes + } + custom_tooltip = fund_inspiration.1001.b.coronation_ready + open_view_data = { + view = activity_list_detail_host_window + data = activity_type:activity_coronation + player = root + } + } + else = { + custom_tooltip = court_maintenance.0011.coronation.tooltip + create_proper_coronation_artifact = yes + } + } + } +} diff --git a/N3OW/events/religion_events/faith_conversion_events.txt b/N3OW/events/religion_events/faith_conversion_events.txt new file mode 100644 index 00000000..1e664db2 --- /dev/null +++ b/N3OW/events/religion_events/faith_conversion_events.txt @@ -0,0 +1,469 @@ +namespace = faith_conversion + + + + +# Fired when you convert to a new faith. Convert capital county. +faith_conversion.0001 = { + hidden = yes + + trigger = { + is_landed = yes + primary_title.tier > tier_barony + exists = capital_county + exists = scope:old_faith + capital_county.faith = scope:old_faith + } + + immediate = { + capital_county = { set_county_faith = root.faith } + } +} + +# Fired when you convert to a new faith. Remove obsolete character modifiers. +faith_conversion.0002 = { + hidden = yes + + immediate = { + if = { + limit = { + faith.religion != scope:old_faith.religion + } + remove_trait = pilgrim + } + if = { + limit = { + NOR = { + has_character_flag = converted_by_heresy_0010_event + has_character_flag = converted_by_heresy_0011_event + has_character_flag = converted_by_heresy_decision + has_character_flag = new_heresiarch + } + } + remove_trait = heresiarch + } + remove_trait = excommunicated + remove_character_modifier = recent_excommunication + remove_character_modifier = excommunication_recently_lifted + remove_character_modifier = vow_of_poverty_modifier + remove_character_modifier = temporal_condemnation_modifier + remove_character_modifier = ultimate_blasphemer_modifier + remove_character_modifier = defiant_high_king_conversion_boost_modifier + remove_character_modifier = defiant_high_queen_conversion_boost_modifier + remove_character_modifier = fp1_jomsvikings_caused_faith_crisis_modifier + remove_character_modifier = fp2_opportunistic_schismatic_modifier + remove_character_modifier = fp2_friend_of_the_old_ways_modifier + remove_character_modifier = bp2_yearly_0641_hof_modifier + remove_character_modifier = bp2_yearly_0641_realm_priest_modifier + remove_character_modifier = next_free_ho_hire_modifier + # If you championed the old ways but then reform regardless, get booted down to friend. + if = { + limit = { + faith.religion = scope:old_faith.religion + has_character_modifier = fp2_champion_of_the_old_ways_modifier + } + remove_character_modifier = fp2_champion_of_the_old_ways_modifier + add_character_modifier = fp2_friend_of_the_old_ways_modifier + } + else = { remove_character_modifier = fp2_champion_of_the_old_ways_modifier } + # Reset patron deities. + if = { + limit = { + faith = { + OR = { + has_doctrine = tenet_bhakti + religion != scope:old_faith.religion + } + } + } + remove_character_modifier = bhakti_hinduism_ganga + remove_character_modifier = bhakti_hinduism_saraswati + remove_character_modifier = bhakti_hinduism_kali + remove_character_modifier = bhakti_hinduism_kubera + remove_character_modifier = bhakti_vaishnavism_lakishmi + remove_character_modifier = bhakti_vaishnavism_jagganath + remove_character_modifier = bhakti_vaishnavism_hayagriva + remove_character_modifier = bhakti_shaivism_parvati + remove_character_modifier = bhakti_shaivism_virabhadra + remove_character_modifier = bhakti_shaivism_munishwarar + remove_character_modifier = bhakti_shaivism_dakshinamoorthy + remove_character_modifier = bhakti_smartism_ganesha + remove_character_modifier = bhakti_smartism_vishnu + remove_character_modifier = bhakti_smartism_shiva + remove_character_modifier = bhakti_germanic_generic_odin + remove_character_modifier = bhakti_germanic_not_danish_ullr + remove_character_modifier = bhakti_germanic_danish_tyr + remove_character_modifier = bhakti_germanic_generic_thor + remove_character_modifier = bhakti_germanic_generic_freyr + } + # No Friday prayer shenanigans unless you're involved in the Sunni caliphal drama. + ## Friday prayers would absolutely happen for others but these modifiers are currently tied heavily to the struggle. + ## Remove insubordination if you leave Islam. + if = { + limit = { + NOT = { faith.religion = religion:islam_religion } + } + remove_character_modifier = fp3_name_read_in_friday_prayer_modifier + } + ## Remove subordination. + ### Special use-case because you might convert faith within the various ones that consider the caliph to be their HoF, in which case it'd stay. + if = { + limit = { + faith.religious_head_title ?= { + NOT = { this = title:d_sunni } + } + } + remove_character_modifier = fp3_displayed_pious_submission_to_caliph_modifier + } + bastard_to_wild_oat_conversion_effect = yes + } +} + + +scripted_trigger faith_conversion_0003_valid_character = { + faith = scope:old_faith + is_alive = yes + is_ai = yes +} + +# Fired when you convert to a new faith. Convert close family. +faith_conversion.0003 = { + hidden = yes + + immediate = { + every_spouse = { + limit = { + faith_conversion_0003_valid_character = yes + is_landed = no + } + set_character_faith = root.faith + } + + every_child = { + limit = { + faith_conversion_0003_valid_character = yes + target_is_liege_or_above = root #If they have travelled outside of your realm/control, they will not be converted. + # Children are converted regardless of Landed status, assuming they are Landed within your realm. + } + set_character_faith_with_conversion = root.faith #Also converts their spouse, children, and parents if applicable. + } + + if = { + limit = { + exists = mother + } + mother = { + if = { + limit = { + faith_conversion_0003_valid_character = yes + target_is_liege_or_above = root #If they have travelled outside of your realm/control, they will not be converted. + is_landed = no #If inside your realm but landed, follow normal vassal conversion rules. + } + set_character_faith = root.faith + } + } + } + + if = { + limit = { + exists = father + } + father = { + if = { + limit = { + faith_conversion_0003_valid_character = yes + target_is_liege_or_above = root #If they have travelled outside of your realm/control, they will not be converted. + is_landed = no #If inside your realm but landed, follow normal vassal conversion rules. + } + set_character_faith = root.faith + } + } + } + } +} + +faith_conversion.0004 = { + hidden = yes + + trigger = { + government_has_flag = government_is_theocracy + is_landed = yes + faith = { + has_doctrine = doctrine_theocracy_lay_clergy + } + } + + immediate = { + if = { + limit = { + OR = { + culture = { has_cultural_pillar = heritage_arabic } + culture = { has_cultural_pillar = heritage_iranian } + culture = { has_cultural_pillar = heritage_turkic } + } + } + change_government = clan_government + } + else = { + change_government = feudal_government + } + } +} + +# For softening opinion penalties, e.g., I believed in monogamous faith but was in a polygamous marriage, but now I've been converted to polygamous faith. +faith_conversion.0005 = { + hidden = yes + + trigger = { + any_consort = { } + } + + immediate = { + every_consort = { + save_scope_as = this_consort + root = { + update_active_consort_opinion_effect = { PARTNER = scope:this_consort } + } + } + } +} + +faith_conversion.1001 = { + type = character_event + title = faith_conversion.1001.t + desc = { + desc = faith_conversion.1001.start + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + faith = { has_doctrine = tenet_carnal_exaltation } + is_male = yes + } + desc = faith_conversion.1001.desc.zealous.carnal_male + } + triggered_desc = { + trigger = { + has_trait = zealous + faith = { has_doctrine = tenet_carnal_exaltation } + is_female = yes + } + desc = faith_conversion.1001.desc.zealous.carnal_female + } + triggered_desc = { + trigger = { has_trait = zealous } + desc = faith_conversion.1001.desc.zealous + } + triggered_desc = { + trigger = { has_trait = cynical } + desc = faith_conversion.1001.desc.cynical + } + triggered_desc = { + trigger = { faith = { has_doctrine_parameter = reincarnation_events_active } } + desc = faith_conversion.1001.desc.reincarnation + } + triggered_desc = { + trigger = { has_trait = compassionate } + desc = faith_conversion.1001.desc.compassionate + } + desc = faith_conversion.1001.desc + } + first_valid = { + triggered_desc = { + trigger = { has_government = landless_adventurer_government } + desc = faith_conversion.1001.end.is_landless_adventurer + } + triggered_desc = { + trigger = { + top_liege != this + liege = { + faith != root.faith + } + } + desc = faith_conversion.1001.end.is_vassal.convert_away + } + triggered_desc = { + trigger = { + top_liege != this + liege = { + faith = root.faith + } + } + desc = faith_conversion.1001.end.is_vassal.convert_to + } + triggered_desc = { + trigger = { + any_vassal = { + percent < 0.5 + faith = root.faith + } + } + desc = faith_conversion.1001.end.is_top_liege.convert_away + } + triggered_desc = { + trigger = { + any_vassal = { + percent >= 0.5 + faith = root.faith + } + } + desc = faith_conversion.1001.end.is_top_liege.convert_to + } + + } + } + theme = faith + left_portrait = { + character = root + animation = prayer + } + right_portrait = { + character = scope:template_priest + animation = wedding_priest + } + + trigger = { + is_ai = no # Since the event is narrative-only, there's no need to generate a temporary priest character only to kill them with no other effects for AI rulers. + } + + immediate = { + faith = { + save_scope_as = new_faith + } + liege ?= { + save_scope_as = my_liege + } + primary_title = { + save_scope_as = my_title + } + dynasty = { + save_scope_as = my_dynasty + } + + create_character = { + template = priest_character_template + location = root.capital_province + save_scope_as = template_priest + } + # If necessary, make them celibate. + hidden_effect = { + if = { + limit = { + NOT = { + scope:new_faith = { has_doctrine_parameter = clergy_can_marry } # scoping directly to the character was firing null character errors + } + } + scope:template_priest = { + add_trait = devoted + } + } + } + + #Dummy check to avoid errors since the flag is only checked in portrait modifiers otherwise + if = { + limit = { + has_character_flag = need_priest_outfit + } + #Please dress properly! + } + if = { + limit = { + scope:template_priest = { should_be_naked_trigger = yes } + } + scope:template_priest = { + add_character_flag = is_naked + } + } + else = { + scope:template_priest = { + add_character_flag = need_priest_outfit + } + } + } + + option = { + name = faith_conversion.1001.a + } + + option = { + name = faith_conversion.1001.b + # Gain scope:template priest as a courtier & earmark them for future friendship. + add_courtier = scope:template_priest + reverse_add_opinion = { + target = scope:template_priest + modifier = pious_opinion + opinion = 50 + } + set_relation_potential_friend = scope:template_priest + } + + after = { + hidden_effect = { + if = { + limit = { + this != scope:template_priest.host + } + scope:template_priest = { + death = { + death_reason = death_disappearance + } + } + } + } + if = { + limit = { + scope:template_priest ?= { + has_character_flag = is_naked + } + } + scope:template_priest = { + remove_character_flag = is_naked + } + } + + + add_character_flag = { + flag = recent_convert + years = 20 + } + } +} + +faith_conversion.1002 = { + hidden = yes + + immediate = { + # If it's desirable to delay this event (e.g., due to decision) a little, do so. + if = { + limit = { has_character_flag = delay_player_faith_conversion_notification_event } + trigger_event = { + id = faith_conversion.1001 + days = 7 + } + } + # Otherwise, just send it. + else = { trigger_event = faith_conversion.1001 } + } +} + +faith_conversion.1101 = { + hidden = yes + + immediate = { + every_vassal = { + limit = { + is_ai = no + } + send_interface_toast = { + title = faith_conversion.1101.toast + left_icon = root + + show_as_tooltip = { + root = { + set_character_faith = faith + } + } + } + } + } +} diff --git a/N3OW/events/religion_events/faith_creation_events.txt b/N3OW/events/religion_events/faith_creation_events.txt new file mode 100644 index 00000000..c365d379 --- /dev/null +++ b/N3OW/events/religion_events/faith_creation_events.txt @@ -0,0 +1,668 @@ +namespace = faith_creation + +# Fired when you make a faith. Temporal rel head setup +faith_creation.0001 = { + hidden = yes + + trigger = { + faith = { + has_doctrine = doctrine_temporal_head + can_create_temporal_head_of_faith_title_trigger = yes + } + } + + immediate = { + set_up_dynamic_temporal_hof_title_effect = { NEW_HOLDER = root } + } +} + +# Fired when you make a faith. Spiritual rel head setup +faith_creation.0002 = { + hidden = yes + + trigger = { + faith = { + has_doctrine = doctrine_spiritual_head + can_create_spiritual_head_of_faith_title_trigger = yes + } + + } + + immediate = { + set_up_dynamic_spiritual_hof_title_effect = { CREATOR = root } + } +} + +# Fired when you make a faith. Flags faith as being player-created for future heresies. +faith_creation.0003 = { + hidden = yes + + trigger = { + is_ai = no + } + + immediate = { + if = { + limit = { is_ai = no } + faith = { + set_variable = { + name = player_created_faith + value = yes + } + } + } + # Set original faith this one was based on + faith = { + if = { + limit = { exists = scope:old_faith.var:foundational_faith } + set_variable = { + name = foundational_faith + value = scope:old_faith.var:foundational_faith + } + } + else = { + set_variable = { + name = foundational_faith + value = scope:old_faith + } + } + } + } +} + +# Temporal Head of Faith re-creation event +faith_creation.0011 = { + hidden = yes + + trigger = { + faith = { + has_doctrine = doctrine_temporal_head + can_create_temporal_head_of_faith_title_trigger = yes + + # Title must exist but be uncreated. + exists = religious_head_title + NOT = { exists = religious_head_title.holder } + } + } + + immediate = { + faith = { + religious_head_title = { + save_scope_as = my_hof_title + } + } + + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + scope:my_hof_title = { + change_title_holder = { + holder = root + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:my_hof_title = { + add_title_law = temporal_head_of_faith_succession_law + } + } +} + +# Spiritual Head of Faith re-creation event +faith_creation.0012 = { + hidden = yes + + trigger = { + faith = { + has_doctrine = doctrine_spiritual_head + can_create_spiritual_head_of_faith_title_trigger = yes + + # Title must exist but be uncreated. + exists = religious_head_title + NOT = { exists = religious_head_title.holder } + } + } + + immediate = { + faith = { + religious_head_title = { + save_scope_as = my_hof_title + } + } + + if = { + limit = { + any_theocratic_vassal = { + faith = root.faith + } + } + ordered_theocratic_vassal = { + limit = { + faith = root.faith + } + order_by = head_of_faith_selection_weight + save_scope_as = new_religious_head + } + } + else = { + create_character = { + location = root.capital_province + age = { 30 50 } + gender_female_chance = root_faith_clergy_gender_female_chance + trait = education_learning_4 + faith = root.faith + culture = root.culture + learning = { 14 22 } + save_scope_as = new_religious_head + } + } + + create_title_and_vassal_change = { + type = created + save_scope_as = change + add_claim_on_loss = no + } + scope:my_hof_title = { + change_title_holder = { + holder = scope:new_religious_head + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + } +} + +# Fired when a new Faith is created by a player, or when a Pagan faith is reformed. Fired off an informative event for all players. +faith_creation.1000 = { + hidden = yes + + immediate = { + save_scope_as = reformer + faith = { + save_scope_as = reformed_faith + } + if = { + limit = { + faith = { + exists = religious_head + } + } + faith = { + religious_head = { + save_scope_as = reformed_hof + } + } + } + + if = { + limit = { + exists = scope:old_faith.religious_head + } + scope:old_faith = { + religious_head = { + save_scope_as = old_hof + } + } + } + + every_player = { + trigger_event = { + id = faith_creation.1001 + days = 1 + } + } + } +} + +faith_creation.1001 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:old_faith = { + has_doctrine_parameter = unreformed + } + } + desc = faith_creation.1001.t.reformation + } + desc = faith_creation.1001.t.schism + } + } + desc = { + #Introduction to the faith's reformation/schism: + first_valid = { + # I am reforming a pagan faith for the first time. + triggered_desc = { + trigger = { + scope:old_faith = { + has_doctrine_parameter = unreformed + root = scope:reformer + } + } + desc = faith_creation.1001.desc.reformation.personal + } + # I am splitting off a new faith from an existing one. + triggered_desc = { + trigger = { + scope:old_faith = { + root = scope:reformer + } + } + desc = faith_creation.1001.desc.schism.personal + } + # Someone else is reforming a pagan faith for the first time. + triggered_desc = { + trigger = { + scope:old_faith = { + has_doctrine_parameter = unreformed + } + } + desc = faith_creation.1001.desc.reformation + } + # Someone else is splitting off a new faith from an existing one. + desc = faith_creation.1001.desc.schism + } + + #State the new faith's external outlook: + first_valid = { + #Faith is aggressive (Great Holy Wars are allowed): + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine_parameter = great_holy_wars_active + has_doctrine_parameter = great_holy_wars_active_if_reformed + } + } + } + desc = faith_creation.1001.desc.outlook.ghw + } + #Faith is pacifist: + triggered_desc = { + trigger = { + scope:reformed_faith = { + has_doctrine_parameter = pacifist_opinion_active + } + } + desc = faith_creation.1001.desc.outlook.pacifism + } + #Faith is 'dogmatic' (fundamentalist, or at least not pluralist but has certain strict doctrinal tenets) + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = doctrine_pluralism_fundamentalist + AND = { + has_doctrine = doctrine_pluralism_righteous + OR = { + has_doctrine = tenet_religious_legal_pronouncements + has_doctrine = tenet_literalism + has_doctrine = tenet_legalism + } + } + } + } + } + desc = faith_creation.1001.desc.outlook.dogmatic + } + #Faith is 'cosmopolitan' (pluralistic, or at least not fundamentalist but has certain syncretic tenets) + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = doctrine_pluralism_pluralistic + AND = { + has_doctrine = doctrine_pluralism_righteous + OR = { + has_doctrine = tenet_eastern_syncretism + has_doctrine = tenet_christian_syncretism + has_doctrine = tenet_islamic_syncretism + has_doctrine = tenet_jewish_syncretism + has_doctrine = tenet_unreformed_syncretism + has_doctrine = tenet_tax_nonbelievers + has_doctrine = special_doctrine_jizya + has_doctrine = tenet_adaptive + } + } + } + } + } + desc = faith_creation.1001.desc.outlook.accepting + } + desc = faith_creation.1001.desc.outlook.fallback + } + + #State the new faith's most important and/or distinctive belief: + first_valid = { + #Human Sacrifice + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = tenet_human_sacrifice + has_doctrine = tenet_ritual_cannibalism + } + } + } + desc = faith_creation.1001.desc.belief.sacrifice + } + #Indulgent + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = tenet_carnal_exaltation + has_doctrine = tenet_hedonistic + } + } + } + desc = faith_creation.1001.desc.belief.indulgent + } + #Incest + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = tenet_divine_marriage + has_doctrine = doctrine_consanguinity_unrestricted + } + } + } + desc = faith_creation.1001.desc.belief.incest + } + #Aniconism + triggered_desc = { + trigger = { + scope:reformed_faith = { + has_doctrine = tenet_aniconism + } + } + desc = faith_creation.1001.desc.belief.aniconism + } + #Ascetic + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = tenet_monasticism + has_doctrine = tenet_vows_of_poverty + has_doctrine = tenet_mendicant_preachers + has_doctrine = tenet_gnosticism + has_doctrine = tenet_inner_journey + has_doctrine = tenet_asceticism + } + } + } + desc = faith_creation.1001.desc.belief.ascetic + } + #Spirits + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = tenet_ancestor_worship + has_doctrine = tenet_adorcism + } + } + } + desc = faith_creation.1001.desc.belief.spirits + } + #Superstition + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = tenet_astrology + has_doctrine = tenet_sacred_childbirth + has_doctrine = tenet_esotericism + has_doctrine = tenet_mystical_birthright + } + } + } + desc = faith_creation.1001.desc.belief.superstition + } + #Nature + triggered_desc = { + trigger = { + scope:reformed_faith = { + has_doctrine = tenet_sanctity_of_nature + } + } + desc = faith_creation.1001.desc.belief.nature + } + #Community + triggered_desc = { + trigger = { + scope:reformed_faith = { + has_doctrine = tenet_communal_identity + } + } + desc = faith_creation.1001.desc.belief.community + } + desc = faith_creation.1001.desc.belief.fallback + } + + #Conclude with the new faith's religious leadership form. + first_valid = { + #Temporal Head and I am it! + triggered_desc = { + trigger = { + scope:reformed_faith = { + has_doctrine = doctrine_temporal_head + religious_head ?= root + } + } + desc = faith_creation.1001.desc.temporal.personal + } + #Temporal Head and it is someone else... + triggered_desc = { + trigger = { + scope:reformed_faith = { + has_doctrine = doctrine_temporal_head + exists = religious_head + } + } + desc = faith_creation.1001.desc.temporal + } + #Spiritual Head + triggered_desc = { + trigger = { + scope:reformed_faith = { + has_doctrine = doctrine_spiritual_head + exists = religious_head + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:reformed_faith.religious_head = scope:old_hof } # Prevents the old pope from being labeled as new + desc = faith_creation.1001.desc.spiritual.sameold + } + desc = faith_creation.1001.desc.spiritual + } + } + } + #No Head + triggered_desc = { + trigger = { + scope:reformed_faith = { + has_doctrine = doctrine_no_head + } + } + desc = faith_creation.1001.desc.no_head + } + triggered_desc = { + trigger = { + scope:reformed_faith = { + OR = { + has_doctrine = doctrine_temporal_head + has_doctrine = doctrine_spiritual_head + } + NOT = { exists = religious_head } + } + } + desc = faith_creation.1001.desc.no_holy_sites + } + } + } + + left_portrait = { + character = scope:reformer + } + right_portrait = { + trigger = { + scope:reformed_hof != scope:reformer + } + character = scope:reformed_hof + animation = personality_zealous + } + theme = faith + override_background = { + reference = temple_scope + } + + immediate = { + scope:reformer = { + save_scope_as = background_temple_scope + } + play_music_cue = "mx_cue_epic_sacral_moment" + } + + option = { + name = faith_creation.1001.o.getreaction + } +} + + +# Notification event for when you create a Head of Faith. +faith_creation.1010 = { + type = character_event + title = faith_creation.1010.t + desc = { + desc = faith_creation.1010.desc.start + first_valid = { + # I am the new temporal HoF! + triggered_desc = { + trigger = { + scope:faith = { + has_doctrine = doctrine_temporal_head + religious_head = root + } + } + desc = faith_creation.1010.desc.temporal.personal + } + # Some other person is the new temporal HoF! + triggered_desc = { + trigger = { + scope:faith = { + has_doctrine = doctrine_temporal_head + } + } + desc = faith_creation.1010.desc.temporal + } + # No wait we like spiritual HoFs instead! + triggered_desc = { + trigger = { + scope:faith = { + has_doctrine = doctrine_spiritual_head + } + } + desc = faith_creation.1010.desc.spiritual + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:faith = { + has_doctrine = doctrine_temporal_head + religious_head = root + } + } + desc = faith_creation.1010.desc.end.personal + } + desc = faith_creation.1010.desc.end + } + } + left_portrait = { + character = scope:HoF + animation = personality_zealous + } + theme = faith + override_background = { + reference = temple_scope + } + + trigger = { + exists = scope:faith.religious_head + } + + immediate = { + play_music_cue = "mx_cue_epic_sacral_moment" + + scope:faith = { + religious_head = { + save_scope_as = HoF + save_scope_as = background_temple_scope + } + show_as_tooltip = { + change_fervor = { + value = major_fervor_gain + desc = fervor_gain_recreated_hof + } + } + } + } + + option = { + name = faith_creation.1010.a + + if = { + limit = { + root = scope:reformer + scope:faith = { + has_doctrine = doctrine_spiritual_head + } + } + scope:HoF = { + add_opinion = { + modifier = grateful_opinion + target = scope:reformer + opinion = 30 + } + } + } + } +} + +faith_creation.1011 = { + hidden = yes + + trigger = { + exists = scope:faith.religious_head + # Limit range, so Irish players don't hear about Zhengyi religious developments + OR = { + scope:faith.religious_head.top_liege = root.top_liege # Same realm + faith = scope:faith.religion # Same religion + culture = scope:faith.religious_head.culture # Same culture + in_diplomatic_range = scope:faith.religious_head # Fallback, actually in diplomatic range + } + } + + immediate = { + scope:faith = { + religious_head = { + save_scope_as = HoF + } + } + + send_interface_message = { + type = event_hof_established + left_icon = scope:HoF + title = faith_creation.1011.message.title + desc = faith_creation.1011.message.desc + } + } +} diff --git a/N3OW/events/religion_events/false_conversion_events.txt b/N3OW/events/religion_events/false_conversion_events.txt new file mode 100644 index 00000000..799ba9ab --- /dev/null +++ b/N3OW/events/religion_events/false_conversion_events.txt @@ -0,0 +1,1486 @@ +namespace = false_conversion + +################################################## +#False Conversion CB events + + #0001-0003 - Flag characters & counties that might be falsely converted. + #0020 - Revoke false conversion decision events. + #0030-0031 - Encourage false conversion admittance decision events. + +################################################## + +################################################## +# General Maintenance +# by Ewan Cowhig Croft +# 0001-0002 +################################################## + +# Flag characters that might be falsely converted. +# by Ewan Cowhig Croft +# false_conversion.0001 = { +# hidden = yes + +# trigger = { +# scope:old_faith = { has_doctrine_parameter = sanctioned_false_conversion } +# NOR = { +# any_secret = { type = secret_crypto_religionist } +# has_variable = forbid_crypto_reconversion +# } +# } + +# immediate = { +# set_variable = { +# name = false_convert +# value = scope:old_faith +# } +# } +# } + +# Flag counties that might be falsely converted. +# by Ewan Cowhig Croft +false_conversion.0002 = { + hidden = yes + scope = landed_title + + trigger = { + scope:old_faith = { has_doctrine_parameter = sanctioned_false_conversion } + NOR = { + has_variable = false_convert + has_variable = forbid_crypto_reconversion + } + } + + immediate = { + make_county_crypto_religionists_effect = { FAITH = scope:old_faith } + } +} + +# Cleanup counties that have been reconverting. +# by Ewan Cowhig Croft +false_conversion.0003 = { + hidden = yes + scope = landed_title + + trigger = { + has_county_modifier = relieved_cryptos_modifier + } + + immediate = { + remove_county_modifier = relieved_cryptos_modifier + } +} + +################################################## +# Revoke False Conversion Decision Events +# by Ewan Cowhig Croft +# 0020-0021 +################################################## + +# Crypto-Faithism +# by Ewan Cowhig Croft +false_conversion.0020 = { + type = character_event + title = false_conversion.0020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_government = landless_adventurer_government } + desc = false_conversion.0020.desc_landless + } + desc = false_conversion.0020.desc + } + } + theme = faith + left_portrait = root + weight_multiplier = { + base = 1 + } + immediate = { + secret_faith = { save_scope_as = old_faith } # For loc. + faith = { save_scope_as = current_faith } # For loc. + } + # You return to your original faith. Huzzah for secret cults! + option = { + name = false_conversion.0020.a + trigger = { is_landed_or_landless_administrative = yes } + set_character_faith_with_conversion = secret_faith + remove_character_secret_faith = yes + if = { #If independent, also grab any counties in your realm that still have crypto-religious communities. + limit = { + top_liege = this + any_sub_realm_county = { + has_variable = false_convert + var:false_convert = root.faith + faith != root.faith #Discount them if they've already been switched by the conversion action. + } + } + set_variable = { #Log how many counties switch. + name = num_false_converts_counties + value = 0 + } + every_sub_realm_county = { + limit = { + has_variable = false_convert + var:false_convert = root.faith + faith != root.faith #Discount them if they've already been switched by the conversion action. + } + set_county_faith = var:false_convert #Everyone likes practicing their faith in the open! + remove_county_modifier = false_convert_modifier + add_county_modifier = { + modifier = relieved_cryptos_modifier + years = 25 + } + root = { #Adjust logging for each valid county. + change_variable = { + name = num_false_converts_counties + add = 1 + } + } + remove_variable = false_convert #Cleanup the variable when we're done. + } + send_interface_message = { #Alert the user if any counties have switched. + type = event_religious_neutral_text + title = event_false_converts.t + desc = event_false_converts_counties_only.desc + } + } + # Deduct piety, but only if faith doesn't sanction false conversions + if = { + limit = { + faith = { + NOT = { has_doctrine_parameter = sanctioned_false_conversion } + } + } + add_piety = major_piety_loss + } + if = { + limit = { top_liege != this } + liege = { + send_interface_message = { + type = event_religious_neutral_text + title = event_false_convert_my_vassal.t + desc = event_false_convert_interface.desc + right_icon = root + } + } + } + every_vassal = { + send_interface_message = { + type = event_religious_neutral_text + title = event_false_convert_my_liege.t + desc = event_false_convert_interface.desc + right_icon = root + } + } + # Fp3 Struggle Catalyst + if = { + limit = { + highest_held_title_tier >= tier_county + faith.religion = religion:islam_religion + any_character_struggle = { + involvement = involved + phase_has_catalyst = catalyst_revealed_secret_faith_islam + } + } + every_character_struggle = { + involvement = involved + limit = { + phase_has_catalyst = catalyst_revealed_secret_faith_islam + } + activate_struggle_catalyst = { + catalyst = catalyst_revealed_secret_faith_islam + character = root + } + } + } + else_if = { + limit = { + highest_held_title_tier >= tier_county + NOT = { faith.religion = religion:islam_religion } + any_character_struggle = { + involvement = involved + phase_has_catalyst = catalyst_revealed_secret_faith_non_islam + } + } + every_character_struggle = { + involvement = involved + limit = { + phase_has_catalyst = catalyst_revealed_secret_faith_non_islam + } + activate_struggle_catalyst = { + catalyst = catalyst_revealed_secret_faith_non_islam + character = root + } + } + } + + stress_impact = { + zealous = medium_stress_impact_gain #Damn it, I was passionate about my openly-practiced faith! + cynical = medium_stress_impact_gain #Damn it, they're all basically the same! Probably! + } + ai_chance = { + base = 60 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.25 + } + modifier = { + has_trait = zealous #Must not stress self. + factor = 0 + } + modifier = { + has_trait = cynical #Must. Not. Stress. Self + factor = 0 + } + } + } + #Landless convertee + option = { + name = false_conversion.0020.c + trigger = { has_government = landless_adventurer_government } + set_character_faith_with_conversion = secret_faith + remove_character_secret_faith = yes + # Deduct piety, but only if faith doesn't sanction false conversions + if = { + limit = { + faith = { + NOT = { has_doctrine_parameter = sanctioned_false_conversion } + } + } + add_piety = major_piety_loss + } + stress_impact = { + zealous = medium_stress_impact_gain #Damn it, I was passionate about my openly-practiced faith! + cynical = medium_stress_impact_gain #Damn it, they're all basically the same! Probably! + } + ai_chance = { + base = 60 + ai_value_modifier = { + ai_zeal = 0.5 + ai_boldness = 0.25 + } + modifier = { + has_trait = zealous #Must not stress self. + factor = 0 + } + modifier = { + has_trait = cynical #Must. Not. Stress. Self + factor = 0 + } + } + } + # On seconds thoughts... + option = { + name = false_conversion.0020.b + + if = { # Return cost when backing out + limit = { scope:decision_piety_cost > 0 } + add_piety = scope:decision_piety_cost + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_zeal = -0.25 + ai_boldness = -0.25 + } + modifier = { + add = 20 + has_trait = lazy #Efffforrrtttt. + } + } + } +} + +################################################## +# Encourage False Conversion Admittance Decision Events +# by Ewan Cowhig Croft +# 0030-0031 +################################################## + +# You encourage crypto-religionists in your realm to return to openly practicing their faiths. +# by Ewan Cowhig Croft +false_conversion.0030 = { + type = character_event + title = false_conversion.0030.t + desc = { + desc = false_conversion.0030.desc_start + first_valid = { + triggered_desc = { + trigger = { + has_variable = false_convert + } + desc = false_conversion.0030.desc_has_secret_faith + } + triggered_desc = { + trigger = { + faith = { + has_doctrine = doctrine_pluralism_pluralistic + } + } + desc = false_conversion.0030.desc_no_secret_faith + } + desc = false_conversion.0030.desc_no_secret_faith_not_pluralist + } + desc = false_conversion.0030.desc_end + } + + theme = faith + left_portrait = root + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { + exists = secret_faith + } + secret_faith = { save_scope_as = old_faith } # For loc. + } + set_variable = { #Initialise counting for the number of landed converts. + name = num_false_converts_vassal + value = 0 + } + set_variable = { #Initialise counting for the number of landless converts. + name = num_false_converts_landless + value = 0 + } + set_variable = { #Log how many counties switch. + name = num_false_converts_counties + value = 0 + } + if = { #If pluralistic, look at any hidden faiths. + limit = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + every_vassal = { + limit = { #Providing they are equal-to-or-less in hostility. + is_ai = yes + exists = secret_faith + NOR = { #And not super-committed to their public religion. + has_trait = zealous + this = faith.religious_head + } + save_temporary_scope_as = current_character + root.faith = { #Public conversion must be advantageous, or at least not harmful. + faith_hostility_level_comparison = { + scope:current_character.secret_faith <= scope:current_character.faith + } + } + OR = { #The vassals should either be trusting, or else have an iron-clad reason to believe the amnesty. + NOR = { + has_trait = deceitful + has_trait = paranoid + } + secret_faith = root.faith + } + } + add_to_list = converting_vassals_list + root = { + change_variable = { + name = num_false_converts_vassal + add = 1 + } + } + } + every_courtier_or_guest = { #Grab courtiers and such too. + limit = { + is_ai = yes + exists = secret_faith + NOT = { has_trait = zealous } + save_temporary_scope_as = current_character + root.faith = { + faith_hostility_level_comparison = { + secret_faith <= scope:current_character.faith + } + } + OR = { + NOR = { + has_trait = deceitful + has_trait = paranoid + } + secret_faith = root.faith + } + } + add_to_list = converting_landless_list + root = { + change_variable = { + name = num_false_converts_landless + add = 1 + } + } + } + if = { #If independent, also grab any counties in your realm that still have crypto-religious communities. + limit = { + top_liege = this + any_sub_realm_county = { + has_variable = false_convert + } + } + every_sub_realm_county = { + limit = { + has_variable = false_convert + save_temporary_scope_as = current_county + root.faith = { + faith_hostility_level_comparison = { + scope:current_county.var:false_convert <= scope:current_county.faith + } + } + } + add_to_list = converting_counties_list + root = { #Adjust logging for each valid county. + change_variable = { + name = num_false_converts_counties + add = 1 + } + } + } + } + } + else = { #Otherwise, only check for within your own faith. Crypto-religionists don't want to come out of hiding for just anybody. + every_vassal = { + if = { + limit = { + any_secret = { type = secret_crypto_religionist } + } + random_secret = { + type = secret_crypto_religionist + save_scope_as = convert_crypto_secret + } + } + limit = { + is_ai = yes + exists = secret_faith + NOR = { + has_trait = zealous + this = faith.religious_head + } + secret_faith = root.faith + } + add_to_list = converting_vassals_list + root = { + change_variable = { + name = num_false_converts_vassal + add = 1 + } + } + } + every_courtier_or_guest = { #And any courtiers or hangers-on. + if = { + limit = { + any_secret = { type = secret_crypto_religionist } + } + random_secret = { + type = secret_crypto_religionist + save_scope_as = convert_crypto_secret + } + } + limit = { + is_ai = yes + exists =secret_faith + NOT = { has_trait = zealous } + secret_faith = root.faith + } + add_to_list = converting_landless_list + root = { + change_variable = { + name = num_false_converts_landless + add = 1 + } + } + } + every_sub_realm_county = { + limit = { + has_variable = false_convert + var:false_convert = root.faith + faith != root.faith #Discount them if they've already been switched by the conversion action. + } + set_county_faith = var:false_convert + remove_county_modifier = false_convert_modifier + add_county_modifier = { + modifier = relieved_cryptos_modifier + years = 25 + } + root = { #Adjust logging for each valid county. + change_variable = { + name = num_false_converts_counties + add = 1 + } + } + remove_variable = false_convert #Cleanup the variable when we're done. + } + } + } + + option = { #Tell everyone to just be honest about their faith. + name = false_conversion.0030.a + custom_tooltip = false_conversion.0030.a.tt + hidden_effect = { + every_in_list = { #Convert the vassals. + list = converting_vassals_list + set_character_faith_with_conversion = secret_faith + remove_character_secret_faith = yes + save_temporary_scope_as = reconverter + every_vassal = { #Notify your vassals' vassals of the change. + send_interface_message = { + type = event_religious_neutral_text + title = event_false_convert_my_vassal.t + desc = event_false_convert_interface.desc + right_icon = scope:reconverter + } + } + add_opinion = { #Huzzah! I can go to church! + modifier = religious_freedom_opinion + target = root + } + } + every_in_list = { #And the dregs. + list = converting_landless_list + set_character_faith_with_conversion = secret_faith + remove_character_secret_faith = yes + add_opinion = { #Huzzah! I can go to church! Shame I don't own any! + modifier = religious_freedom_opinion + target = root + } + } + if = { #If independent, also grab any counties in your realm that still have crypto-religious communities. + limit = { top_liege = this } + every_in_list = { + list = converting_counties_list + set_county_faith = var:false_convert + add_county_modifier = { #Everyone likes practicing their faith in the open! + modifier = relieved_cryptos_modifier + years = 25 + } + remove_variable = false_convert #Cleanup the variable when we're done. + } + } + if = { #Include counties in the message if there are any. + limit = { var:num_false_converts_counties >= 1 } + send_interface_message = { + type = event_religious_neutral_text + title = event_false_converts.t + desc = event_false_converts_plus_counties.desc + } + } + if = { #Else, just talk about vassals and landless characters. + limit = { var:num_false_converts_counties <= 0 } + send_interface_message = { + type = event_religious_neutral_text + title = event_false_converts.t + desc = event_false_converts_without_counties.desc + } + } + if = { #Under pluralist lieges, tell suitable players that their liege is offering amnesty. + limit = { + faith = { has_doctrine = doctrine_pluralism_pluralistic } + } + every_vassal = { + limit = { + is_ai = no + any_secret = { type = secret_crypto_religionist } + } + trigger_event = false_conversion.0031 + } + } + else = { #Under non-pluralist lieges, tell suitable players that their liege is offering amnesty. + every_vassal = { + limit = { + is_ai = no + secret_faith ?= root.faith + } + trigger_event = false_conversion.0031 + } + } + } + # Piety loss, but not if has false conversion sanction tenet + if = { + limit = { + faith = { + NOT = { has_doctrine = tenet_false_conversion_sanction } + } + } + add_piety = major_piety_loss + } + stress_impact = { + honest = minor_stress_impact_loss + trusting = minor_stress_impact_loss + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_compassion = 0.5 #Everyone should be open with each other. + } + modifier = { + add = 20 + has_trait = honest #Honesty is the best policy. + } + modifier = { + add = 20 + has_trait = trusting #Trust people to trust your word. + } + } + } + option = { #Let's let sleeping sectarian conflicts lie. + name = { + text = false_conversion.0030.b_no_secret_faith + trigger = { + NOT = { + any_secret = { type = secret_crypto_religionist } + } + } + } + name = { + text = false_conversion.0030.b_has_secret_faith + trigger = { + any_secret = { type = secret_crypto_religionist } + } + } + ai_chance = { + base = 60 + ai_value_modifier = { + ai_boldness = -0.25 + } + } + } + +} + +# Your liege is trying to promulgate freedom of worship. +# by Ewan Cowhig Croft +false_conversion.0031 = { + type = character_event + title = false_conversion.0031.t + desc = false_conversion.0031.desc + + theme = faith + override_background = { + reference = temple_scope + } + left_portrait = root.liege + + weight_multiplier = { + base = 1 + } + + immediate = { + root.liege = { + save_scope_as = background_temple_scope + } + secret_faith = { save_scope_as = old_faith } + } + + option = { #I hop on board the faith-train to Conversion City. + name = false_conversion.0031.a + set_character_faith_with_conversion = scope:old_faith + liege = { + send_interface_message = { + type = event_religious_neutral_text + title = event_false_convert_my_vassal.t + desc = event_false_convert_interface.desc + right_icon = root + } + } + every_vassal = { + send_interface_message = { + type = event_religious_neutral_text + title = event_false_convert_my_vassal.t + desc = event_false_convert_interface.desc + right_icon = root + } + } + add_opinion = { #Huzzah! I can go to church! + modifier = religious_freedom_opinion + target = root + } + stress_impact = { + zealous = medium_stress_impact_gain + cynical = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + honest = medium_stress_impact_loss + trusting = medium_stress_impact_loss + + } + ai_chance = { + base = 0 #Player-only event. + } + } + option = { #I know how this goes: I'll keep my private faith private. + name = false_conversion.0031.b + stress_impact = { + honest = medium_stress_impact_gain + trusting = medium_stress_impact_gain + deceitful = medium_stress_impact_loss + } + ai_chance = { + base = 100 #Player-only event. + } + } +} + +########################################################################### +# Conversion request events +# Decide to refuse the request, agree, or agree and keep a secret religion +########################################################################### + +# Decide what type of false conversion event to fire +false_conversion.0900 = { + hidden = yes + + immediate = { + grab_spouses_and_family_to_convert_effect = yes + # If the recipient already has a crypto religion, then just convert them and the family without any fuss + if = { + limit = { + any_secret = { type = secret_crypto_religionist } + } + convert_family_to_faith_effect = { + FALSE_CONVERSION = no + FORCED = yes + } + } + # Otherwise give them a choice + else = { + if = { + limit = { + is_married = yes + is_imprisoned = no + primary_spouse = { + is_imprisoned = no + is_ai = yes + } + # Spouse cannot suggest to keep a faith they weren't following as a secret faith + primary_spouse.faith = root.faith + } + trigger_event = false_conversion.1010 + } + else = { + trigger_event = false_conversion.1000 + } + } + } +} + + +# Default conversion event for if you have no spouse or are imprisoned +false_conversion.1000 = { + type = character_event + title = false_conversion.1000.t + desc = { + desc = false_conversion.1000.desc_intro + triggered_desc = { + trigger = { + any_in_list = { + list = spouses_and_family_to_convert + count > 1 + } + } + desc = false_conversion.1000.desc_has_family + } + desc = false_conversion.1000.desc_convert + first_valid = { + # If a hook is being used, then lament this blackmail + triggered_desc = { + trigger = { exists = scope:forcibly_converted } + desc = false_conversion.1000.desc_forced + } + desc = false_conversion.1000.desc_voluntary + } + first_valid = { + triggered_desc = { + trigger = { ai_boldness > low_positive_ai_value } + desc = false_conversion.1000.desc_forced + } + desc = false_conversion.1000.desc_cowardly + } + desc = false_conversion.1000.desc_outro + } + override_background = { + trigger = { scope:recipient = { is_imprisoned = yes } } + reference = dungeon + } + theme = faith + left_portrait = root + + option = { # Accept conversion + name = false_conversion.1000.a + convert_family_to_faith_effect = { + FALSE_CONVERSION = no + FORCED = yes + } + ai_chance = { + base = 25 + } + } + + option = { # Keep old faith as a secret + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = sanctioned_false_conversion } + any_in_list = { + list = spouses_and_family_to_convert + count > 1 + } + } + desc = false_conversion.1000.b_sanctioned_plural + } + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = sanctioned_false_conversion } + } + desc = false_conversion.1000.b_sanctioned_single + } + triggered_desc = { + trigger = { + any_in_list = { + list = spouses_and_family_to_convert + faith = root.faith + count > 1 + } + } + desc = false_conversion.1000.b_plural + } + desc = false_conversion.1000.b_single + } + } + } + trigger = { + #faith = { has_doctrine_parameter = sanctioned_false_conversion } + # Don't override old secret faiths + NOR = { + any_secret = { type = secret_crypto_religionist } + has_variable = forbid_crypto_reconversion + } + } + convert_family_to_faith_effect = { + FALSE_CONVERSION = yes + FORCED = yes + } + ai_chance = { + base = 0 + religion_adopt_secret_faith_modifier = { + TARGET = root + FORCED = yes + FAITH = root.faith + } + } + } +} + +# If your whole family is being asked to convert, consult with spouse +false_conversion.1010 = { + type = character_event + title = false_conversion.1000.t + desc = { + desc = false_conversion.1000.desc_intro + first_valid = { + triggered_desc = { + trigger = { + any_in_list = { + list = spouses_and_family_to_convert + count > 2 + } + } + desc = false_conversion.1000.desc_has_family + } + desc = false_conversion.1010.desc_has_no_family + } + desc = false_conversion.1000.desc_convert + desc = false_conversion.1010.desc_spouse_intro + # Spouse's reaction: + first_valid = { + triggered_desc = { + trigger = { exists = scope:spouse_wants_secret_faith } + desc = false_conversion.1010.desc_spouse_advises_secrecy + } + triggered_desc = { + trigger = { + exists = scope:spouse_wants_to_convert + scope:spouse = { has_trait = cynical } + } + desc = false_conversion.1010.desc_spouse_advises_conversion_cynical + } + triggered_desc = { + trigger = { exists = scope:spouse_wants_to_convert } + desc = false_conversion.1010.desc_spouse_advises_conversion_neutral + } + } + desc = false_conversion.1010.desc_outro_demure + triggered_desc = { + trigger = { + opinion = { + target = scope:spouse + value >= 10 + } + } + desc = false_conversion.1010.desc_spouse_liked + } + triggered_desc = { + trigger = { + opinion = { + target = scope:spouse + value <= -40 + } + } + desc = false_conversion.1010.desc_spouse_disliked + } + desc = false_conversion.1010.desc_outro_wife_husband + } + theme = faith + left_portrait = root + right_portrait = primary_spouse + + immediate = { + primary_spouse = { + save_scope_as = spouse + } + # Determine whether spouse wants to convert + random_list = { + 100 = { + save_scope_value_as = { + name = spouse_wants_to_convert + value = yes + } + } + 0 = { + religion_adopt_secret_faith_modifier = { + TARGET = root + FORCED = yes + FAITH = root.faith + } + save_scope_value_as = { + name = spouse_wants_secret_faith + value = yes + } + } + } + } + + option = { # Accept conversion + name = false_conversion.1000.a + convert_family_to_faith_effect = { + FALSE_CONVERSION = no + FORCED = yes + } + if = { + limit = { exists = scope:spouse_wants_to_convert } + reverse_add_opinion = { + target = primary_spouse + modifier = pleased_opinion + opinion = 20 + } + } + else = { + reverse_add_opinion = { + target = primary_spouse + modifier = disappointed_opinion + opinion = -20 + } + } + ai_chance = { + base = 25 + } + } + + option = { # Keep old faith as a secret + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + faith = { has_doctrine_parameter = sanctioned_false_conversion } + } + desc = false_conversion.1000.b_sanctioned_plural + } + desc = false_conversion.1000.b_plural + } + } + } + convert_family_to_faith_effect = { + FALSE_CONVERSION = yes + FORCED = yes + } + if = { + limit = { exists = scope:spouse_wants_secret_faith } + reverse_add_opinion = { + target = primary_spouse + modifier = pleased_opinion + opinion = 20 + } + } + else = { + reverse_add_opinion = { + target = primary_spouse + modifier = disappointed_opinion + opinion = -20 + } + } + ai_chance = { + base = 0 + religion_adopt_secret_faith_modifier = { + TARGET = root + FORCED = yes + FAITH = root.faith + } + } + } +} + +# Secret-Faith Yearlies +# ===================== +## A Moment of Weakness +## Someone close to you is in pain, attempt to convert them to your crypto-religion as a coping method? +scripted_trigger false_conversion_2000_is_vulnerable_trigger = { + NOT = { exists = secret_faith } + age >= 12 # For narrative purposes + is_available = yes + OR = { + stress_level >= 1 + AND = { + has_character_modifier = stress_frozen_grief + # We need memories in order to grab who died that we're sad about + any_memory = { + OR = { + has_memory_type = friend_died + has_memory_type = best_friend_died + has_memory_type = lover_died + has_memory_type = soulmate_died + has_memory_type = relative_died + has_memory_type = spouse_died + has_memory_type = dog_died + } + } + } + has_trait = depressed_1 + } +} + +# Converts a target and ameliorates their grief/stress/depression +scripted_effect false_conversion_2000_convert = { + # Buff relation + if = { + limit = { scope:crypto_opportunist = { has_character_flag = false_conversion_2000_grief } } + scope:vulnerable_relation = { remove_character_modifier = stress_frozen_grief } + scope:crypto_opportunist = { remove_character_flag = false_conversion_2000_grief } + } + else_if = { + limit = { scope:crypto_opportunist = { has_character_flag = false_conversion_2000_depression } } + scope:vulnerable_relation = { add_character_modifier = fp3_higher_purpose_modifier } + } + else_if = { + limit = { scope:crypto_opportunist = { has_character_flag = false_conversion_2000_stress } } + scope:vulnerable_relation = { add_stress = major_stress_impact_loss } + } + send_interface_toast = { + title = false_conversion.2000.a_success + left_icon = scope:vulnerable_relation + scope:crypto_opportunist = { + random_secret = { + type = secret_crypto_religionist + # This is necessary for spread_crypto_religion_to_target_effect + save_scope_as = owner_crypto_secret + } + spread_crypto_religion_to_target_effect = { TARGET = scope:vulnerable_relation } + } + } +} + +## A Moment of Weakness +## Take advantage of your target's grief to push your religion +false_conversion.2000 = { + type = character_event + title = false_conversion.2000.t + desc = { + desc = false_conversion.2000.desc_intro + first_valid = { + triggered_desc = { + trigger = { has_character_flag = false_conversion_2000_grief } + desc = false_conversion.2000.desc_descriptor_grief + } + triggered_desc = { + trigger = { has_character_flag = false_conversion_2000_depression } + desc = false_conversion.2000.desc_descriptor_depression + } + triggered_desc = { + trigger = { has_character_flag = false_conversion_2000_stress } + desc = false_conversion.2000.desc_descriptor_stress + } + } + desc = false_conversion.2000.desc_bridge + first_valid = { + triggered_desc = { + trigger = { has_character_flag = false_conversion_2000_grief } + desc = false_conversion.2000.desc_quote_grief + } + triggered_desc = { + trigger = { has_character_flag = false_conversion_2000_depression } + desc = false_conversion.2000.desc_quote_depression + } + triggered_desc = { + trigger = { has_character_flag = false_conversion_2000_stress } + desc = false_conversion.2000.desc_quote_stress + } + } + desc = false_conversion.2000.desc_outro + } + left_portrait = { + character = scope:vulnerable_relation + animation = grief + } + theme = faith + override_background = { reference = corridor_night } + cooldown = { years = 1 } + + # Only target the vulnerable + trigger = { + # Runs through most characters covered by get_characters_of_interest_effect + # Yup, it's necessary to do it like this. Sorry. + exists = secret_faith + OR = { + any_close_or_extended_family_member = { false_conversion_2000_is_vulnerable_trigger = yes } + any_powerful_vassal = { false_conversion_2000_is_vulnerable_trigger = yes } + any_consort = { false_conversion_2000_is_vulnerable_trigger = yes } + any_concubine = { false_conversion_2000_is_vulnerable_trigger = yes } + any_normal_councillor = { false_conversion_2000_is_vulnerable_trigger = yes } + any_ally = { false_conversion_2000_is_vulnerable_trigger = yes } + betrothed ?= { false_conversion_2000_is_vulnerable_trigger = yes } + # I hate my life + trigger_if = { + limit = { + exists = liege + is_powerful_vassal = yes + } + liege = { false_conversion_2000_is_vulnerable_trigger = yes } + } + + trigger_if = { + limit = { is_ai = no } + OR = { + any_relation = { + type = lover + false_conversion_2000_is_vulnerable_trigger = yes + } + any_relation = { + type = ward + false_conversion_2000_is_vulnerable_trigger = yes + } + any_relation = { + type = friend + false_conversion_2000_is_vulnerable_trigger = yes + } + # Skipping courtiers because minor_interest_skilled_courtiers_trigger requires a list as input + trigger_if = { + limit = { + age >= 12 + } + any_relation = { + type = guardian + false_conversion_2000_is_vulnerable_trigger = yes + } + } + } + } + any_knight = { false_conversion_2000_is_vulnerable_trigger = yes } + } + } + + immediate = { + save_scope_as = crypto_opportunist + save_scope_as = owner # For spread_crypto_religion_to_target_effect + get_characters_of_interest_effect = { LISTNAME = vulnerable_relations } + # Prioritize characters of high interest before those of low interest + random_in_list = { + list = vulnerable_relations + limit = { + is_of_major_interest_to_root_trigger = yes + false_conversion_2000_is_vulnerable_trigger = yes + } + save_scope_as = vulnerable_relation + } + # If we weren't able to find anyone of major interest, then any ol' minor relation will do + if = { + limit = { NOT = { exists = scope:vulnerable_relation } } + random_in_list = { + list = vulnerable_relations + limit = { false_conversion_2000_is_vulnerable_trigger = yes } + save_scope_as = vulnerable_relation + } + } + # Also for the effect + scope:vulnerable_relation = { save_scope_as = target } + # Determine which weakness we will capitalize on + # Rarer conditions first for more visibility + if = { + limit = { + scope:vulnerable_relation = { + AND = { + has_character_modifier = stress_frozen_grief + OR = { + has_memory_type = friend_died + has_memory_type = best_friend_died + has_memory_type = lover_died + has_memory_type = soulmate_died + has_memory_type = relative_died + has_memory_type = spouse_died + has_memory_type = dog_died + } + } + } + } + add_character_flag = { + flag = false_conversion_2000_grief + } + # Grab the most recent person who died that the relation remembers. Hopefully they actually care about them. + ordered_memory = { + limit = { + OR = { + has_memory_type = friend_died + has_memory_type = best_friend_died + has_memory_type = lover_died + has_memory_type = soulmate_died + has_memory_type = relative_died + has_memory_type = spouse_died + has_memory_type = dog_died + } + } + order_by = memory_creation_date + random_memory_participant = { + limit = { this != root } + save_scope_as = deceased_character + } + } + } + else_if = { + limit = { scope:vulnerable_relation = { has_trait = depressed_1 } } + add_character_flag = { + flag = false_conversion_2000_depression + days = 1 + } + } + else = { + add_character_flag = { + flag = false_conversion_2000_stress + days = 1 + } + } + } + + option = { # Glory to Ohrmazd + name = false_conversion.2000.a + if = { + # If relation is a player, then let them decide whether to accept the your secret faith + limit = { scope:vulnerable_relation = { is_ai = no } } + scope:vulnerable_relation = { trigger_event = false_conversion.2001 } + custom_tooltip = false_conversion.2000.a_flavor + } + else = { + duel = { + skill = learning + target = scope:vulnerable_relation + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + desc = false_conversion.2000.a_success + opinion_modifier = { + who = scope:vulnerable_relation + opinion_target = scope:crypto_opportunist + multiplier = 0.1 + } + # Convert the relation and take away (some of) their pain + false_conversion_2000_convert = yes + } + 50 = { # Relation declines + desc = false_conversion.2000.a_failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + opinion_modifier = { + who = scope:vulnerable_relation + opinion_target = scope:crypto_opportunist + multiplier = -0.1 + } + send_interface_toast = { + title = false_conversion.2000.a_failure + left_icon = scope:vulnerable_relation + reverse_add_opinion = { + target = scope:vulnerable_relation + modifier = fp2_questioned_my_faith_opinion + } + } + } + } + } + stress_impact = { + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = 0.1 + ai_compassion = -0.2 + ai_honor = -0.1 + ai_rationality = 0.1 + ai_sociability = -0.1 + ai_zeal = 0.2 + } + } + } + + option = { # Just comfort them instead + name = false_conversion.2000.b + reverse_add_opinion = { + target = scope:vulnerable_relation + modifier = comforted_opinion + } + stress_impact = { + compassionate = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_boldness = -0.1 + ai_compassion = 0.2 + ai_honor = 0.1 + ai_rationality = -0.1 + ai_sociability = 0.1 + ai_zeal = -0.2 + } + } + } +} + +## My Time of Need +## Convert to someone's crypto-faith and ameliorate your grief/stress/depression +false_conversion.2001 = { + type = character_event + title = false_conversion.2001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:crypto_opportunist = { has_character_flag = false_conversion_2000_grief } } + desc = false_conversion.2001.desc_grief + } + triggered_desc = { + trigger = { scope:crypto_opportunist = { has_character_flag = false_conversion_2000_depression } } + desc = false_conversion.2001.desc_depression + } + triggered_desc = { + trigger = { scope:crypto_opportunist = { has_character_flag = false_conversion_2000_stress } } + desc = false_conversion.2001.desc_stress + } + } + desc = false_conversion.2001.desc_outro + } + theme = faith + override_background = { reference = corridor_night } + left_portrait = scope:crypto_opportunist + + option = { # Convert + name = false_conversion.2001.a + false_conversion_2000_convert = yes + stress_impact = { + honest = major_stress_impact_gain + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + # No AI chance as AI should never encounter this event + } + + option = { # Refuse + name = false_conversion.2001.b + flavor = false_conversion.2001.b_flavor + } +} + +# Bonus event: Avoid a holy war by converting to the aggressor's religion +# TO-DO + +# Your secret religion has been exposed, do you openly convert to it or abandon it? +false_conversion.8000 = { + type = character_event + title = false_conversion.8000.t + desc = { + desc = false_conversion.8000.desc_intro + first_valid = { + triggered_desc = { + trigger = { exists = scope:disapproving_chaplain } + desc = false_conversion.8000.desc_disapproving_chaplain + } + triggered_desc = { + trigger = { exists = scope:silent_chaplain } + desc = false_conversion.8000.desc_silent_chaplain + } + } + desc = false_conversion.8000.desc_outro + } + theme = secret + left_portrait = root + right_portrait = scope:secret_exposer + + trigger = { + root != scope:secret_exposer + } + + immediate = { + save_scope_as = owner + # Have the realm priest chastise you unless they also practice the same secret religion + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + secret_faith ?= root.secret_faith + } + } + cp:councillor_court_chaplain = { save_scope_as = silent_chaplain } + } + else_if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { save_scope_as = disapproving_chaplain } + } + secret_exposed_owner_effects_effect = { SECRET = scope:secret POV = root } + secret_exposed_owner_opinion_effects_effect = yes + play_music_cue = "mx_cue_secret" + } + + option = { # Abandon secret faith + name = false_conversion.8000.a + add_piety = medium_piety_loss + add_piety_level = -1 + + stress_impact = { + zealous = major_stress_impact_gain + content = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + } + ai_chance = { + base = 5 + } + } + + option = { # Convert back to secret faith + name = false_conversion.8000.b + set_character_faith_with_conversion = secret_faith + remove_character_secret_faith = yes + + stress_impact = { + cynical = minor_stress_impact_gain + zealous = medium_stress_impact_loss + honest = minor_stress_impact_loss + } + ai_chance = { + base = 5 + } + } +} diff --git a/N3OW/events/religion_events/fervor_events.txt b/N3OW/events/religion_events/fervor_events.txt new file mode 100644 index 00000000..f55e8e2b --- /dev/null +++ b/N3OW/events/religion_events/fervor_events.txt @@ -0,0 +1,1938 @@ +namespace = fervor + +######################### +# Sinful Priest Scandal # +# by Sean Hughes # +# 1001-1002 # +######################### + +# Trigger for checking if a character has the privliages + reponsibilities of a priest of their faith. +scripted_trigger is_capable_priest = { + is_capable_adult_ai = yes + is_imprisoned = no + NOT = { + has_trait = excommunicated + } + faith.religious_head != this # Head of Faith gets checked separately. + OR = { + AND = { # All Faiths: Must be the Head of Faith, if one exists. + exists = faith.religious_head + this = faith.religious_head + } + AND = {# All Faiths: Must be a Theocracy. + government_has_flag = government_is_theocracy + is_landed = yes + } + trigger_if = { # Theocratic Faiths: Must be a Bishop + limit = { faith = { has_doctrine_parameter = theocracy_temple_lease } } + has_council_position = councillor_court_chaplain + } + trigger_if = { # Lay Clergy Faiths: Must personally hold a Temple. + limit = { faith = { has_doctrine_parameter = theocracy_temple_ownership } } + any_held_title = { + title_tier = barony + title_province ?= { + has_holding_type = church_holding + } + } + } + } +} + +# Used to find a sinful theocrat who could be the target of a scandal. +scripted_trigger valid_scandal_target = { + faith = root + num_sinful_traits >= 1 + is_capable_priest = yes +} + +# Used to determine an appropriate scandal for the sinful theocrat to be caught doing. +scripted_trigger theocrat_has_sin = { + scope:sinful_theocrat = { + has_trait = $SIN$ + faith = { trait_is_sin = $SIN$ } + } +} + +fervor.1001 = { + hidden = yes + scope = faith + + trigger = { + num_county_followers > 0 + OR = { # Must have a valid sinful theocrat. + AND = { # Sinful Head of Faith + religious_head ?= { + is_capable_adult_ai = yes + num_sinful_traits >= 1 + } + } + AND = { # Sinful Theocratic Ruler + any_theocratic_ruler = { + valid_scandal_target = yes + } + } + trigger_if = { # Theocracy: Sinful Bishop + limit = { + has_doctrine_parameter = theocracy_temple_lease + } + any_faith_ruler = { + cp:councillor_court_chaplain ?= { valid_scandal_target = yes } + } + } + trigger_if = { # Lay Clergy: Sinful Temple Holder + limit = { + has_doctrine_parameter = theocracy_temple_ownership + } + any_faith_ruler = { + valid_scandal_target = yes + any_held_title = { + title_tier = barony + title_province ?= { has_holding_type = church_holding } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + num_county_followers >= 300 + } + modifier = { + add = 1.67 + num_county_followers >= 200 + } + modifier = { + add = 1.33 + num_county_followers >= 100 + } + modifier = { + add = 1.00 + num_county_followers >= 50 + } + modifier = { + add = 0.67 + num_county_followers >= 25 + } + modifier = { + add = 0.33 + num_county_followers >= 10 + } + modifier = { + add = 1.5 + religious_head ?= { + num_sinful_traits >= 2 + } + } + modifier = { + add = 1.5 + religious_head ?= { + num_sinful_traits >= 3 + } + } + } + + immediate = { + # Pick a suitable theocrat to be the target of our scandal. + random_list = { + 20 = { # Religious Head + trigger = { + religious_head ?= { + num_sinful_traits >= 1 + valid_scandal_target = yes + } + } + + compare_modifier = { + value = religious_head.num_sinful_traits + multiplier = 20 + } + compare_modifier = { + value = religious_head.num_virtuous_traits + multiplier = -20 + } + + modifier = { + add = 10 + religious_head = { + has_strong_religious_conviction_trigger = no + } + } + + religious_head = { + save_scope_as = sinful_theocrat + } + } + 60 = { # Theocratic Ruler + trigger = { + any_theocratic_ruler = { + valid_scandal_target = yes + } + } + random_theocratic_ruler = { + limit = { + valid_scandal_target = yes + highest_held_title_tier >= 3 + } + alternative_limit = { + valid_scandal_target = yes + highest_held_title_tier >= 2 + } + alternative_limit = { + valid_scandal_target = yes + highest_held_title_tier >= 1 + } + + weight = { + base = 1 + + compare_modifier = { + value = num_sinful_traits + multiplier = 50 + } + compare_modifier = { + value = num_virtuous_traits + multiplier = -50 + } + modifier = { + add = 25 + has_strong_religious_conviction_trigger = no + } + modifier = { + add = 50 + is_powerful_vassal = yes + } + modifier = { + add = 75 + top_liege = this + } + modifier = { + add = 25 + any_liege_or_above = { + is_ai = no + } + } + modifier = { + add = 25 + any_player = { + culture = prev.culture + } + } + } + save_scope_as = sinful_theocrat + } + } + 60 = { + trigger = { # Theocracy: Sinful Bishop + has_doctrine_parameter = theocracy_temple_lease + any_faith_ruler = { + cp:councillor_court_chaplain ?= { valid_scandal_target = yes } + } + } + random_faith_ruler = { + limit = { + cp:councillor_court_chaplain ?= { valid_scandal_target = yes } + highest_held_title_tier >= tier_duchy + } + alternative_limit = { + cp:councillor_court_chaplain ?= { valid_scandal_target = yes } + highest_held_title_tier >= tier_county + } + alternative_limit = { + cp:councillor_court_chaplain ?= { valid_scandal_target = yes } + highest_held_title_tier >= tier_barony + } + + weight = { + base = 1 + + compare_modifier = { + value = cp:councillor_court_chaplain.num_sinful_traits + multiplier = 50 + } + compare_modifier = { + value = cp:councillor_court_chaplain.num_virtuous_traits + multiplier = -50 + } + modifier = { + add = 25 + cp:councillor_court_chaplain = { + has_strong_religious_conviction_trigger = no + } + } + modifier = { + add = 50 + cp:councillor_court_chaplain = { + is_powerful_vassal = yes + } + } + modifier = { + add = 25 + any_liege_or_above = { + is_ai = no + } + } + modifier = { + add = 25 + any_player = { + culture = prev.culture + } + } + } + cp:councillor_court_chaplain = { + save_scope_as = sinful_theocrat + } + } + } + 60 = { # Lay Clergy: Sinful Temple Holder + trigger = { + has_doctrine_parameter = theocracy_temple_ownership + any_faith_ruler = { + valid_scandal_target = yes + any_held_title = { + title_tier = barony + title_province ?= { has_holding_type = church_holding } + } + } + } + random_faith_ruler = { + limit = { + valid_scandal_target = yes + any_held_title = { + title_tier = barony + title_province ?= { + has_holding_type = church_holding + } + } + highest_held_title_tier >= tier_duchy + } + alternative_limit = { + valid_scandal_target = yes + any_held_title = { + title_tier = barony + title_province ?= { + has_holding_type = church_holding + } + } + highest_held_title_tier >= tier_county + } + alternative_limit = { + valid_scandal_target = yes + any_held_title = { + title_tier = barony + title_province ?= { + has_holding_type = church_holding + } + } + highest_held_title_tier >= tier_barony + } + + weight = { + base = 1 + + compare_modifier = { + value = num_sinful_traits + multiplier = 50 + } + compare_modifier = { + value = num_virtuous_traits + multiplier = -50 + } + modifier = { + add = 25 + has_strong_religious_conviction_trigger = no + } + modifier = { + add = 50 + is_powerful_vassal = yes + } + modifier = { + add = 75 + top_liege = this + } + modifier = { + add = 25 + any_liege_or_above = { + is_ai = no + } + } + modifier = { + add = 25 + any_player = { + culture = prev.culture + } + } + } + save_scope_as = sinful_theocrat + } + } + } + + # Pick an appropriate scandal for our sinful theocrat, based on their personality. + if = { + limit = { + exists = scope:sinful_theocrat + } + hidden_effect = { # Just collapse this - it's very long and not very interesting! + if = { + limit = { theocrat_has_sin = { SIN = lustful } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_lustful } + } + else_if = { + limit = { theocrat_has_sin = { SIN = chaste } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_chaste } + } + else_if = { + limit = { theocrat_has_sin = { SIN = gluttonous } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_gluttonous } + } + else_if = { + limit = { theocrat_has_sin = { SIN = temperate } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_temperate } + } + else_if = { + limit = { theocrat_has_sin = { SIN = greedy } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_greedy } + } + else_if = { + limit = { theocrat_has_sin = { SIN = generous } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_generous } + } + else_if = { + limit = { theocrat_has_sin = { SIN = lazy } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_lazy } + } + else_if = { + limit = { theocrat_has_sin = { SIN = diligent } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_diligent } + } + else_if = { + limit = { theocrat_has_sin = { SIN = wrathful } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_wrathful } + } + else_if = { + limit = { theocrat_has_sin = { SIN = calm } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_calm } + } + else_if = { + limit = { theocrat_has_sin = { SIN = patient } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_patient } + } + else_if = { + limit = { theocrat_has_sin = { SIN = impatient } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_impatient } + } + else_if = { + limit = { theocrat_has_sin = { SIN = arrogant } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_arrogant } + } + else_if = { + limit = { theocrat_has_sin = { SIN = humble } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_humble } + } + else_if = { + limit = { theocrat_has_sin = { SIN = deceitful } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_deceitful } + } + else_if = { + limit = { theocrat_has_sin = { SIN = honest } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_honest } + } + else_if = { + limit = { theocrat_has_sin = { SIN = craven } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_craven } + } + else_if = { + limit = { theocrat_has_sin = { SIN = brave } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_brave } + } + else_if = { + limit = { theocrat_has_sin = { SIN = shy } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_shy } + } + else_if = { + limit = { theocrat_has_sin = { SIN = gregarious } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_gregarious } + } + else_if = { + limit = { theocrat_has_sin = { SIN = ambitious } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_ambitious } + } + else_if = { + limit = { theocrat_has_sin = { SIN = content } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_content } + } + else_if = { + limit = { theocrat_has_sin = { SIN = arbitrary } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_arbitrary } + } + else_if = { + limit = { theocrat_has_sin = { SIN = just } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_just } + } + else_if = { + limit = { theocrat_has_sin = { SIN = cynical } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_cynical } + } + else_if = { + limit = { theocrat_has_sin = { SIN = zealous } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_zealous } + } + else_if = { + limit = { theocrat_has_sin = { SIN = paranoid } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_paranoid } + } + else_if = { + limit = { theocrat_has_sin = { SIN = trusting } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_trusting } + } + else_if = { + limit = { theocrat_has_sin = { SIN = compassionate } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_compassionate } + } + else_if = { + limit = { theocrat_has_sin = { SIN = callous } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_callous } + } + else_if = { + limit = { theocrat_has_sin = { SIN = sadistic } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_sadistic } + } + else_if = { + limit = { theocrat_has_sin = { SIN = stubborn } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_stubborn } + } + else_if = { + limit = { theocrat_has_sin = { SIN = fickle } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_fickle } + } + else_if = { + limit = { theocrat_has_sin = { SIN = vengeful } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_vengeful } + } + else_if = { + limit = { theocrat_has_sin = { SIN = forgiving } } + save_scope_value_as = { name = scandal_type value = flag:fervor_1001_forgiving } + } + } + + # Scandal target always loses 1 piety level, regardless of who they are. + scope:sinful_theocrat = { + add_piety_level = -1 + + # Dummies may be called in localization depending on the nature of the sin. + random_dummy_gender_servant_effect = yes + random_dummy_gender_clergy_effect = yes + } + + # If the Head of Faith is the sinful theocrat, it will be more impactful than for a random theocrat. + if = { + limit = { + exists = religious_head + exists = scope:sinful_theocrat + religious_head = scope:sinful_theocrat + } + change_fervor = { + value = -20 + desc = fervor_loss_scandalous_hof + } + + # Due to the importance of the scandal all players will get an event. + every_player = { + limit = { + faith = root + NOR = { + this = scope:sinful_theocrat + top_overlord ?= { + primary_title = title:h_china + government_has_flag = government_has_merit + faith = { has_doctrine_parameter = theocracy_temple_ownership } + } + } + } + trigger_event = fervor.1002 + } + } + # Otherwise, how we handle the scandal will depend on each player's relationship to the chosen theocrat. + else_if = { + limit = { + exists = scope:sinful_theocrat + } + + change_fervor = { + value = -10 + desc = fervor_loss_scandalous_priest + } + + every_player = { + limit = { + faith = root + NOR = { + this = scope:sinful_theocrat + top_overlord ?= { + primary_title = title:h_china + government_has_flag = government_has_merit + faith = { has_doctrine_parameter = theocracy_temple_ownership } + } + } + } + if = { # If the sinful theocrat is somebody that a player will personally care about, send them a full event. + limit = { + OR = { + any_vassal = { + this = scope:sinful_theocrat + } + liege ?= scope:sinful_theocrat + + AND = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = scope:sinful_theocrat + } + any_spouse = { + this = scope:sinful_theocrat + } + any_relation = { + type = friend + this = scope:sinful_theocrat + } + any_relation = { + type = lover + this = scope:sinful_theocrat + } + any_relation = { + type = rival + this = scope:sinful_theocrat + } + any_close_family_member = { + this = scope:sinful_theocrat + } + } + } + trigger_event = fervor.1002 + } + # Otherwise, players will only only get to know about this through the fervor log entry. + } + } + + set_variable = { + name = recent_fervor_event + value = yes + days = 1460 # 4 year cooldown (plus a 1 year MTTH ~= occurs once per 5 years) + } + } # Close 'exists = scope:sinful_theocrat' + } +} + +####################################### +# Players notified of scandal (event) # +####################################### + +fervor.1002 = { + type = character_event + title = fervor.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { faith.religious_head = scope:sinful_theocrat } + desc = fervor.1002.desc.start_hof + } + desc = fervor.1002.desc.start + } + first_valid = { + random_valid = { + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_lustful } + desc = fervor.1002.desc.lustful + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_chaste } + desc = fervor.1002.desc.chaste + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_gluttonous } + desc = fervor.1002.desc.gluttonous + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_temperate } + desc = fervor.1002.desc.temperate + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_greedy } + desc = fervor.1002.desc.greedy + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_generous } + desc = fervor.1002.desc.generous + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_lazy } + desc = fervor.1002.desc.lazy + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_diligent } + desc = fervor.1002.desc.diligent + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_wrathful } + desc = fervor.1002.desc.wrathful + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_calm } + desc = fervor.1002.desc.calm + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_patient } + desc = fervor.1002.desc.patient + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_impatient } + desc = fervor.1002.desc.impatient + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_arrogant } + desc = fervor.1002.desc.arrogant + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_humble } + desc = fervor.1002.desc.humble + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_deceitful } + desc = fervor.1002.desc.deceitful + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_honest } + desc = fervor.1002.desc.honest + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_craven } + desc = fervor.1002.desc.craven + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_brave } + desc = fervor.1002.desc.brave + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_shy } + desc = fervor.1002.desc.shy + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_gregarious } + desc = fervor.1002.desc.gregarious + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_ambitious } + desc = fervor.1002.desc.ambitious + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_content } + desc = fervor.1002.desc.content + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_arbitrary } + desc = fervor.1002.desc.arbitrary + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_just } + desc = fervor.1002.desc.just + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_cynical } + desc = fervor.1002.desc.cynical + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_zealous } + desc = fervor.1002.desc.zealous + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_paranoid } + desc = fervor.1002.desc.paranoid + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_trusting } + desc = fervor.1002.desc.trusting + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_compassionate } + desc = fervor.1002.desc.compassionate + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_callous } + desc = fervor.1002.desc.callous + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_sadistic } + desc = fervor.1002.desc.sadistic + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_stubborn } + desc = fervor.1002.desc.stubborn + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_fickle } + desc = fervor.1002.desc.fickle + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_vengeful } + desc = fervor.1002.desc.vengeful + } + triggered_desc = { + trigger = { scope:scandal_type = flag:fervor_1001_forgiving } + desc = fervor.1002.desc.forgiving + } + } + desc = fervor.1002.desc.fallback + } + first_valid = { + triggered_desc = { + trigger = { faith.religious_head = scope:sinful_theocrat } + desc = fervor.1002.desc.end_hof + } + desc = fervor.1002.desc.end + } + } + theme = faith + override_background = { + trigger = { + scope:scandal_type = flag:fervor_1001_sadistic + } + reference = dungeon + } + override_background = { + trigger = { + scope:scandal_type = flag:fervor_1001_gluttonous + } + reference = feast + } + override_background = { + trigger = { + scope:scandal_type = flag:fervor_1001_deceitful + } + reference = study + } + + + left_portrait = { + character = scope:sinful_theocrat + animation = shame + triggered_animation = { + trigger = { + OR = { + has_trait = arrogant + ai_vengefulness >= medium_positive_ai_value + ai_rationality <= high_negative_ai_value + } + NOR = { + scope:scandal_type = flag:fervor_1001_sadistic + scope:scandal_type = flag:fervor_1001_deceitful + } + } + animation = anger + } + triggered_animation = { + trigger = { + scope:scandal_type = flag:fervor_1001_sadistic + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + scope:scandal_type = flag:fervor_1001_deceitful + } + animation = scheme + } + } + + immediate = { + + # Save any necessary scopes we may need for localization. + if = { + limit = { + scope:sinful_theocrat = { + is_ruler = yes + } + } + primary_title = { save_scope_as = scoped_primary_title } + } + if = { + limit = { + scope:sinful_theocrat = { + is_ruler = no + } + } + liege.primary_title = { save_scope_as = scoped_primary_title } + } + + # These effects already happened in the previous event, but we also need to notify players about the impact. + if = { + limit = { + exists = faith.religious_head + faith.religious_head = scope:sinful_theocrat + } + show_as_tooltip = { + faith = { + change_fervor = { + value = -20 + desc = fervor_loss_scandalous_hof + } + } + } + } + else = { + show_as_tooltip = { + faith = { + change_fervor = { + value = -10 + desc = fervor_loss_scandalous_priest + } + } + } + } + show_as_tooltip = { + scope:sinful_theocrat = { + add_piety_level = -1 + } + } + } + + # Option 1: Condemn the theocrat for their sins! + option = { + name = fervor.1002.b + + add_piety = medium_piety_gain + reverse_add_opinion = { + modifier = angry_opinion + target = scope:sinful_theocrat + opinion = -30 + } + + if = { + # Condemning someone who is known to hold grudges might not be the wisest course of action... + limit = { + scope:scandal_type = flag:fervor_1001_vengeful + } + scope:sinful_theocrat = { + set_relation_rival = { + target = root + reason = rival_called_out_sin + } + } + } + + stress_impact = { + cynical = minor_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + } + + # Option 2: Defend the theocrat publically, taking a prestige/piety hit for a substantial relations boost. + option = { + name = fervor.1002.c + add_prestige = medium_prestige_loss + add_piety = medium_piety_loss + reverse_add_opinion = { + modifier = grateful_opinion + target = scope:sinful_theocrat + opinion = 30 + } + + stress_impact = { + zealous = medium_stress_impact_gain + craven = medium_stress_impact_gain + shy = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + } + + # Option 3: Take no action + option = { + name = fervor.1002.d + + stress_impact = { + base = minor_stress_impact_gain + just = medium_stress_impact_gain + brave = minor_stress_impact_gain + impatient = minor_stress_impact_gain + wrathful = minor_stress_impact_gain + } + } +} + +######################### +# Exalted Priest # +# by Flavio # +# 2001-2002 # +######################### + +#A theocrat has been very virtuous: Hidden ping on the Faith itself. + +scripted_trigger suitable_theocrat_fervor_2001_trigger = { + faith = root + num_virtuous_traits >= 1 + is_capable_priest = yes +} + +# Used to determine an appropriate exaltation for the virtuous theocrat to exemplify. +scripted_trigger theocrat_has_virtue = { + scope:virtuous_theocrat = { + has_trait = $VIRTUE$ + faith = { trait_is_virtue = $VIRTUE$ } + } +} + +fervor.2001 = { + hidden = yes + scope = faith + + trigger = { + num_county_followers > 0 # Must be on the map. + OR = { + religious_head ?= { + is_capable_adult_ai = yes + num_virtuous_traits >= 1 + } + any_theocratic_ruler = { + faith = root + suitable_theocrat_fervor_2001_trigger = yes + } + trigger_if = { # Theocracy: Sinful Bishop + limit = { + has_doctrine_parameter = theocracy_temple_lease + } + any_faith_ruler = { + cp:councillor_court_chaplain ?= { suitable_theocrat_fervor_2001_trigger = yes } + } + } + trigger_if = { # Lay Clergy: Sinful Temple Holder + limit = { + has_doctrine_parameter = theocracy_temple_ownership + } + any_faith_ruler = { + suitable_theocrat_fervor_2001_trigger = yes + any_held_title = { + title_tier = barony + title_province ?= { has_holding_type = church_holding } + } + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.33 + num_county_followers < 300 + } + modifier = { + add = 0.67 + num_county_followers < 200 + } + modifier = { + add = 1.00 + num_county_followers < 100 + } + modifier = { + add = 1.33 + num_county_followers < 50 + } + modifier = { + add = 1.67 + num_county_followers < 25 + } + modifier = { + add = 2.00 + num_county_followers < 10 + } + modifier = { + add = 1.5 + religious_head ?= { + num_virtuous_traits >= 2 + piety_level >= medium_piety_level + } + } + modifier = { + add = 1.5 + religious_head ?= { + num_virtuous_traits >= 3 + piety_level >= high_piety_level + } + } + } + + immediate = { + random_list = { #Pick either Religious Head (if any), powerful theocrat (if not lay clergy), or powerful ruler (if lay clergy) + 10 = { # Virtuous Head of Faith + trigger = { + religious_head ?= { + num_virtuous_traits >= 1 + } + } + modifier = { + add = -15 + religious_head = { + OR = { + has_trait = excommunicated + has_trait = cynical + } + } + } + modifier = { + add = 15 + religious_head = { + num_virtuous_traits >= 2 + piety_level >= medium_piety_level + } + } + modifier = { + add = 15 + religious_head = { + num_virtuous_traits >= 3 + piety_level >= high_piety_level + } + } + modifier = { + add = 15 + religious_head = { + has_strong_religious_conviction_trigger = yes + } + } + modifier = { + add = -15 + religious_head = { + num_sinful_traits >= 1 + piety_level >= high_piety_level + } + } + modifier = { + add = -15 + religious_head = { + num_sinful_traits >= 2 + piety_level >= high_piety_level + } + } + religious_head = { + save_scope_as = virtuous_theocrat + add_piety = major_piety_gain + } + } + 40 = { # Virtuous Theocracy-Government Ruler + trigger = { + any_theocratic_ruler = { + faith = root + suitable_theocrat_fervor_2001_trigger = yes + faith.religious_head != this + } + } + random_theocratic_ruler = { + limit = { + highest_held_title_tier >= 2 + suitable_theocrat_fervor_2001_trigger = yes + NOT = { has_trait = cynical } + } + alternative_limit = { + suitable_theocrat_fervor_2001_trigger = yes + NOT = { has_trait = cynical } + } + alternative_limit = { + suitable_theocrat_fervor_2001_trigger = yes + } + weight = { + base = 100 + + modifier = { + add = -20 + num_sinful_traits >= 1 + } + modifier = { + add = -20 + num_sinful_traits >= 2 + } + modifier = { + add = 15 + has_strong_religious_conviction_trigger = yes + } + modifier = { + add = 10 + highest_held_title_tier >= 3 + } + modifier = { + add = 10 + highest_held_title_tier >= 4 + } + modifier = { + add = 20 + num_virtuous_traits >= 2 + } + modifier = { + add = 20 + num_virtuous_traits >= 3 + } + modifier = { + add = 20 + num_virtuous_traits >= 4 + } + modifier = { + add = 25 + piety_level >= high_piety_level + } + modifier = { + add = 50 + is_powerful_vassal = yes + } + modifier = { + add = 75 + top_liege = this + } + modifier = { + add = 25 + any_liege_or_above = { + is_ai = no + } + } + modifier = { + add = 25 + any_player = { + culture = prev.culture + } + } + } + save_scope_as = virtuous_theocrat + add_piety = major_piety_gain + } + } + 40 = { # Theocracy: Virtuous Bishop + trigger = { + has_doctrine_parameter = theocracy_temple_lease + any_faith_ruler = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + suitable_theocrat_fervor_2001_trigger = yes + } + } + } + random_faith_ruler = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + suitable_theocrat_fervor_2001_trigger = yes + } + highest_held_title_tier >= tier_duchy + } + alternative_limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + suitable_theocrat_fervor_2001_trigger = yes + } + highest_held_title_tier >= tier_county + } + alternative_limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + suitable_theocrat_fervor_2001_trigger = yes + } + highest_held_title_tier >= tier_barony + } + + weight = { + base = 1 + + compare_modifier = { + value = cp:councillor_court_chaplain.num_virtuous_traits + multiplier = 50 + } + compare_modifier = { + value = cp:councillor_court_chaplain.num_sinful_traits + multiplier = -50 + } + + modifier = { + add = 25 + cp:councillor_court_chaplain = { + has_strong_religious_conviction_trigger = no + } + } + modifier = { + add = 50 + cp:councillor_court_chaplain = { + is_powerful_vassal = yes + } + } + modifier = { + add = 25 + any_liege_or_above = { + is_ai = no + } + } + modifier = { + add = 25 + any_player = { + culture = prev.culture + } + } + } + + cp:councillor_court_chaplain = { + save_scope_as = virtuous_theocrat + } + } + } + 40 = { # Lay Clergy: Any Virtuous Ruler with a Temple Holding + trigger = { + has_doctrine_parameter = theocracy_temple_ownership + any_faith_ruler = { + suitable_theocrat_fervor_2001_trigger = yes + any_held_title = { + title_tier = barony + title_province ?= { + has_holding_type = church_holding + } + } + } + } + random_faith_ruler = { + limit = { + suitable_theocrat_fervor_2001_trigger = yes + highest_held_title_tier >= 2 + NOT = { has_trait = cynical } + } + alternative_limit = { + suitable_theocrat_fervor_2001_trigger = yes + NOT = { has_trait = cynical } + } + alternative_limit = { + suitable_theocrat_fervor_2001_trigger = yes + } + weight = { + base = 100 + + modifier = { + add = -20 + num_sinful_traits >= 1 + } + modifier = { + add = -20 + num_sinful_traits >= 2 + } + modifier = { + add = 15 + has_strong_religious_conviction_trigger = yes + } + modifier = { + add = 10 + highest_held_title_tier >= tier_duchy + } + modifier = { + add = 10 + highest_held_title_tier >= tier_kingdom + } + modifier = { + add = 20 + num_virtuous_traits >= 2 + } + modifier = { + add = 20 + num_virtuous_traits >= 3 + } + modifier = { + add = 20 + num_virtuous_traits >= 4 + } + modifier = { + add = 25 + piety_level >= high_piety_level + } + modifier = { + add = 50 + is_powerful_vassal = yes + } + modifier = { + add = 75 + top_liege = this + } + modifier = { + add = 25 + any_liege_or_above = { + is_ai = no + } + } + modifier = { + add = 25 + any_player = { + culture = prev.culture + } + } + } + save_scope_as = virtuous_theocrat + } + } + } + if = { + limit = { + exists = scope:virtuous_theocrat + } + # Pick an appropriate exaltation for our virtuous theocrat, based on their personality. + hidden_effect = { # Just collapse this - it's very long and not very interesting! + if = { + limit = { theocrat_has_virtue = { VIRTUE = lustful } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_lustful } + } + else_if = { + limit = { + OR = { + theocrat_has_virtue = { VIRTUE = chaste } + theocrat_has_virtue = { VIRTUE = celibate } + } + } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_chaste } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = gluttonous } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_gluttonous } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = temperate } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_temperate } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = greedy } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_greedy } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = generous } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_generous } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = lazy } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_lazy } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = diligent } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_diligent } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = wrathful } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_wrathful } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = calm } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_calm } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = patient } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_patient } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = impatient } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_impatient } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = arrogant } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_arrogant } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = humble } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_humble } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = deceitful } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_deceitful } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = honest } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_honest } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = craven } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_craven } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = brave } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_brave } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = shy } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_shy } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = gregarious } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_gregarious } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = ambitious } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_ambitious } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = content } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_content } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = arbitrary } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_arbitrary } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = just } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_just } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = cynical } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_cynical } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = zealous } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_zealous } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = paranoid } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_paranoid } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = trusting } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_trusting } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = compassionate } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_compassionate } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = callous } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_callous } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = sadistic } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_sadistic } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = stubborn } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_stubborn } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = fickle } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_fickle } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = vengeful } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_vengeful } + } + else_if = { + limit = { theocrat_has_virtue = { VIRTUE = forgiving } } + save_scope_value_as = { name = exaltation_type value = flag:fervor_2001_forgiving } + } + } + + change_fervor = { + value = 10 + desc = fervor_gain_virtous_priest + } + + every_player = { + limit = { + faith = root + } + if = { + limit = { + this != scope:virtuous_theocrat + OR = { + any_vassal = { + this = scope:virtuous_theocrat + } + liege ?= scope:virtuous_theocrat + + AND = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = scope:virtuous_theocrat + } + any_spouse = { + this = scope:virtuous_theocrat + } + any_relation = { + type = friend + this = scope:virtuous_theocrat + } + any_relation = { + type = lover + this = scope:virtuous_theocrat + } + any_relation = { + type = rival + this = scope:virtuous_theocrat + } + any_close_family_member = { + this = scope:virtuous_theocrat + } + } + } + trigger_event = fervor.2002 + } + #Otherwise only noted in the fervor log + } + } + set_variable = { + name = recent_fervor_event + value = yes + days = 1460 # 4 year cooldown (plus a 1 year MTTH ~= occurs once per 5 years) + } + } +} + +#Players notified of event. +fervor.2002 = { + type = character_event + title = fervor.2002.t + desc = { + first_valid = { + random_valid = { + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_lustful + } + desc = fervor.2002.desc.lustful + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_chaste + } + desc = fervor.2002.desc.chaste + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_gluttonous + } + desc = fervor.2002.desc.gluttonous + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_temperate + } + desc = fervor.2002.desc.temperate + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_greedy + } + desc = fervor.2002.desc.greedy + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_generous + scope:virtuous_theocrat != faith.religious_head + } + desc = fervor.2002.desc.generous + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_generous + scope:virtuous_theocrat = faith.religious_head + } + desc = fervor.2002.desc.generous.pope + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_lazy + } + desc = fervor.2002.desc.lazy + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_diligent + } + desc = fervor.2002.desc.diligent + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat != faith.religious_head + OR = { + scope:exaltation_type = flag:fervor_2001_wrathful + scope:exaltation_type = flag:fervor_2001_vengeful + } + } + desc = fervor.2002.desc.wrathful + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat = faith.religious_head + OR = { + scope:exaltation_type = flag:fervor_2001_wrathful + scope:exaltation_type = flag:fervor_2001_vengeful + } + } + desc = fervor.2002.desc.wrathful.pope + } + triggered_desc = { + trigger = { + OR = { + scope:exaltation_type = flag:fervor_2001_calm + scope:exaltation_type = flag:fervor_2001_patient + } + } + desc = fervor.2002.desc.calm + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat != faith.religious_head + scope:exaltation_type = flag:fervor_2001_impatient + } + desc = fervor.2002.desc.impatient + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat = faith.religious_head + scope:exaltation_type = flag:fervor_2001_impatient + } + desc = fervor.2002.desc.impatient.pope + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_arrogant + } + desc = fervor.2002.desc.arrogant + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_humble + } + desc = fervor.2002.desc.humble + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_deceitful + } + desc = fervor.2002.desc.deceitful + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat != faith.religious_head + scope:exaltation_type = flag:fervor_2001_honest + } + desc = fervor.2002.desc.honest + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat = faith.religious_head + scope:exaltation_type = flag:fervor_2001_honest + } + desc = fervor.2002.desc.honest.pope + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_craven + } + desc = fervor.2002.desc.craven + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_brave + } + desc = fervor.2002.desc.brave + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_shy + } + desc = fervor.2002.desc.shy + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat != faith.religious_head + scope:exaltation_type = flag:fervor_2001_gregarious + } + desc = fervor.2002.desc.gregarious + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat = faith.religious_head + scope:exaltation_type = flag:fervor_2001_gregarious + } + desc = fervor.2002.desc.gregarious.pope + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_ambitious + } + desc = fervor.2002.desc.ambitious + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_content + } + desc = fervor.2002.desc.content + } + triggered_desc = { + trigger = { + OR = { + scope:exaltation_type = flag:fervor_2001_arbitrary + scope:exaltation_type = flag:fervor_2001_fickle + } + } + desc = fervor.2002.desc.arbitrary + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_just + } + desc = fervor.2002.desc.just + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_cynical + } + desc = fervor.2002.desc.cynical + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat != faith.religious_head + OR = { + scope:exaltation_type = flag:fervor_2001_zealous + scope:exaltation_type = flag:fervor_2001_stubborn + } + } + desc = fervor.2002.desc.zealous + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat = faith.religious_head + OR = { + scope:exaltation_type = flag:fervor_2001_zealous + scope:exaltation_type = flag:fervor_2001_stubborn + } + } + desc = fervor.2002.desc.zealous.pope + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_paranoid + } + desc = fervor.2002.desc.paranoid + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_trusting + } + desc = fervor.2002.desc.trusting + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_compassionate + } + desc = fervor.2002.desc.compassionate + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_callous + } + desc = fervor.2002.desc.callous + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat != faith.religious_head + scope:exaltation_type = flag:fervor_2001_sadistic + } + desc = fervor.2002.desc.sadistic + } + triggered_desc = { + trigger = { + scope:virtuous_theocrat = faith.religious_head + scope:exaltation_type = flag:fervor_2001_sadistic + } + desc = fervor.2002.desc.sadistic.pope + } + triggered_desc = { + trigger = { + scope:exaltation_type = flag:fervor_2001_forgiving + } + desc = fervor.2002.desc.forgiving + } + } + desc = fervor.2002.desc.fallback + } + } + theme = faith + override_background = { + trigger = { + scope:exaltation_type = flag:fervor_2001_sadistic + } + reference = dungeon + } + override_background = { + trigger = { + scope:exaltation_type = flag:fervor_2001_gluttonous + } + reference = feast + } + override_background = { + trigger = { + scope:exaltation_type = flag:fervor_2001_deceitful + } + reference = study + } + + left_portrait = { + character = scope:virtuous_theocrat + triggered_animation = { + trigger = { + scope:exaltation_type = flag:fervor_1001_sadistic + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + scope:exaltation_type = flag:fervor_1001_deceitful + } + animation = scheme + } + } + + immediate = { + if = { + limit = { + scope:virtuous_theocrat = { + is_ruler = yes + } + } + primary_title = { save_scope_as = scoped_primary_title } + } + if = { + limit = { + scope:virtuous_theocrat = { + is_ruler = no + } + } + liege.primary_title = { save_scope_as = scoped_primary_title } + } + show_as_tooltip = { + faith = { + change_fervor = { + value = 10 + desc = fervor_gain_virtous_priest + } + } + } + } + option = { # + name = { + trigger = { has_strong_religious_conviction_trigger = yes } + text = fervor.2001.a.a + } + name = { + trigger = { + has_strong_religious_conviction_trigger = no + NOT = { has_trait = cynical } + } + text = fervor.2001.a.b + } + name = { + trigger = { + has_strong_religious_conviction_trigger = no + has_trait = cynical + } + text = fervor.2001.a.c + } + } +} diff --git a/N3OW/events/religion_events/great_holy_war_events.txt b/N3OW/events/religion_events/great_holy_war_events.txt new file mode 100644 index 00000000..bc02708c --- /dev/null +++ b/N3OW/events/religion_events/great_holy_war_events.txt @@ -0,0 +1,4662 @@ +namespace = great_holy_war + +### Great Holy Wars Events +# by Flavio Verna +# updated by Ewan Cowhig Croft +# 0001 - A Great Holy War is declared. +# 0003 - Players informed of the start of the preparation phase of a GHW. +# 0004 - Sponsor selects a new target Kingdom. +# 0010 - A Faith unlocks GHWs for its Religion. +# 0015 - Excommunication is lifted for joining a GHW. +# 0016 - Sponsor admonishes ruler for unpledging from a GHW. +# 0017 - Confirm unpledging. +# 0018 - Confirm pledging. +# 0020 - AI rulers pledge to Undirected GHW. +# 0092 - AI rulers pledge to Directed GHW. +# 0090 - Holy Orders pledging to GHW. +# 0021 - AI rulers counterpledge to Undirected GHW. +# 0093 - AI rulers counterpledge to Directed GHW. +# 0091 - Holy Orders counterpledging to GHW. +# 0022, 0023 - The Pope calls out unpledged player. +# 0024 - Dead Recipient is replaced. +# 0025 - Converted Recipient is replaced. +# 0026, 0027 - A Beneficiary is selected for pledged AI rulers. +# 0028 - Resetting a Beneficiary upon death. +# 0029 - Resetting a Beneficiary upon conversion. +# 0030 - Resetting a Beneficiary due to illness, excommunication, inheritance or celibacy vow. +# 0040 - Player donates money to the GHW War Chest. +# 0050 - GHW preparation phase starts (defender). +# 0051 - GHW was declared. +# 0052 - GHW was won. +# 0053 - GHW was lost. +# 0055 - GHW failed to start. +# 0060 - Crusader trait gained. +# 0058 - Crusader trait lost. +# 0061 - Beneficiaries rewarded upon GHW victory. +# 0080 - GHW sponsor is replaced upon death. +# 0081, 0082 - Player redirected GHW during preparation phase. + +# The Sponsor declares a Great Holy War +great_holy_war.0001 = { + hidden = yes + scope = faith + + trigger = { + has_doctrine = doctrine_spiritual_head + save_temporary_scope_as = the_faith + exists = religious_head + NOR = { + exists = great_holy_war + exists = var:variable_ghw_cooldown + religion = { exists = var:variable_first_ghw_cooldown } # Do not event spam after Crusades have been just unlocked. + } + religious_head = { is_imprisoned = no } + religion = { exists = var:variable_ghw_unlocked } #Activated by event for every religion. + suitable_faith_for_undirected_ghw_trigger = yes #Right combinations of Doctrines to have GHWs. And a valid target exists + } + + immediate = { + save_scope_as = the_faith + + #Determine Sponsor. + religious_head = { save_scope_as = ghw_sponsor } + determine_ghw_target_effect = { FAITH = scope:the_faith } + + # Launch the preparation phase + start_great_holy_war = { + target_character = scope:target_character + target_title = scope:target_kingdom + delay = { 365 545 } + } + scope:target_character.faith = { save_scope_as = target_faith } #Used for counterpledges. + + great_holy_war = { + set_war_declarer = scope:ghw_sponsor + if = { + limit = { is_directed_ghw = no } + undirected_ghw_recipient_selection_effect = yes + } + } + if = { + limit = { scope:ghw_sponsor.gold > 0 } + great_holy_war = { + change_war_chest_gold = { + value = scope:ghw_sponsor.gold + divide = 2 + max = 5000 + } + } + scope:ghw_sponsor = { + remove_short_term_gold = { + value = gold + divide = 2 + max = 5000 + } + } + } + great_holy_war = { + pledge_attacker = scope:ghw_sponsor + set_variable = { + name = redirect_cost + value = 500 + } + } + #If no Claimant or Title Holder is available to be the Papal choice and the Crusade has not proceeded far enough to have a favorite beneficiary, select a fallback Recipient so that the CB's tooltip does not appear incomplete. + if = { #Random Courtier in the Pope's court. + limit = { + NOT = { exists = scope:the_faith.great_holy_war.ghw_title_recipient } + exists = scope:ghw_sponsor + exists = scope:the_faith.great_holy_war + scope:ghw_sponsor = { + any_courtier = { + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + } + } + scope:ghw_sponsor = { + random_courtier = { + alternative_limit = { + scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } + is_male = yes + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + alternative_limit = { + scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } + is_female = yes + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + limit = { + is_adult = yes + is_ai = yes + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + } + faith = scope:the_faith + } + save_scope_as = fallback_recipient + add_character_flag = flag_is_ghw_fallback_recipient + } + } + } + else_if = { #Else Generate a fallback recipient. + limit = { + NOT = { exists = scope:the_faith.great_holy_war.ghw_title_recipient } + } + create_character = { + location = scope:ghw_sponsor.capital_province + template = new_commander_character + faith = scope:the_faith + culture = scope:ghw_sponsor.culture + save_scope_as = fallback_recipient + gender_female_chance = { + if = { + limit = { + scope:the_faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + scope:the_faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { + add = 50 + } + } + } + scope:fallback_recipient = { add_character_flag = flag_is_ghw_fallback_recipient } + } + great_holy_war = { + set_variable = { + name = var_fallback_recipient + value = scope:fallback_recipient + } + } + + every_player = { #Inform players + limit = { + faith = scope:the_faith + highest_held_title_tier >= tier_county + this != scope:ghw_sponsor + } + trigger_event = great_holy_war.0003 #Send event immediately for player, then delay it for all the AIs. + } + every_player = { #Inform defending players + limit = { + OR = { + faith = scope:target_faith #All infidels. + any_liege_or_above = { + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + AND = { + faith != scope:the_faith + scope:the_faith.great_holy_war = { has_pledged_defender = prev } + } + } + } + trigger_event = great_holy_war.0050 + } + + #Attackers Pledge to the Crusade. (AI only) + every_faith_ruler = { + limit = { + is_ai = yes + is_landed = yes + highest_held_title_tier >= tier_county + NOR = { + this = scope:ghw_sponsor + root.great_holy_war = { has_pledged_attacker = prev } + target_is_liege_or_above = scope:target_character + } + } + trigger_event = { + #AI pledging. There is a chance the AI might pledge after the Crusade starts, but it's a lot less likely. + id = great_holy_war.0020 + days = { 50 450 } + } + } + every_faith_holy_order = { + trigger_event = { + #Holy orders always join + id = great_holy_war.0090 + days = { 30 60 } + } + } + + #Defenders Pledge to the Crusade. (AI only) + scope:target_character = { + religion = { + every_faith = { + every_faith_ruler = { + limit = { + is_ai = yes + is_landed = yes + highest_held_title_tier >= tier_county + NOT = { + root.great_holy_war = { has_pledged_defender = prev } + } + } + trigger_event = { + #AI counterpledging. Unlike attackers, defenders should be selected much faster during the preparation phase and then stop. + id = great_holy_war.0021 + days = { 25 150 } + } + } + } + } + faith = { + every_faith_holy_order = { + trigger_event = { + # Holy orders always join + id = great_holy_war.0091 + days = { 30 60 } + } + } + } + } + #EP3 Redirected Crusade setup event + great_holy_war = { + if = { + limit = { + has_ep3_dlc_trigger = yes + scope:the_faith = { this = faith:catholic } + ep3_frankokratia_ghw_trigger = yes + ep3_frankokratia_financier_exists_trigger = yes + } + #start with player + if = { + limit = { + any_player = { + ep3_frankokratia_story_owner_trigger = yes + } + } + random_player = { + limit = { + ep3_frankokratia_story_owner_trigger = yes + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + #Next, ai with a closely related claimant who will accept + else_if = { + limit = { + scope:the_faith = { + any_faith_playable_ruler = { + ep3_frankokratia_story_owner_trigger = yes + ep3_frankokratia_will_start_trigger = yes + save_temporary_scope_as = char_temp + + #Thorough check for close relation claimants + OR = { + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + } + #In laws of family in court/realm + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_transiting_relative_trigger = yes + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + } + #Spouse claimant + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + #Spouse's close family in realm/court + any_spouse = { + ep3_frankokratia_transiting_relative_trigger = yes + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_claimant_trigger = yes + } + } + #friends + any_relation = { + type = friend + ep3_frankokratia_claimant_trigger = yes + } + #soulmates + any_relation = { + type = soulmate + ep3_frankokratia_claimant_trigger = yes + } + } + } + } + } + scope:the_faith = { + ordered_faith_playable_ruler = { + order_by = { + value = 0 + add = current_military_strength + } + limit = { + ep3_frankokratia_story_owner_trigger = yes + ep3_frankokratia_will_start_trigger = yes + save_temporary_scope_as = char_temp + + #Thorough check for close relation claimants + OR = { + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + } + #In laws of family in court/realm + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_transiting_relative_trigger = yes + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + } + #Spouse claimant + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + #Spouse's close family in realm/court + any_spouse = { + ep3_frankokratia_transiting_relative_trigger = yes + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_claimant_trigger = yes + } + } + #friends + any_relation = { + type = friend + ep3_frankokratia_claimant_trigger = yes + } + #soulmates + any_relation = { + type = soulmate + ep3_frankokratia_claimant_trigger = yes + } + } + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + } + #Someone with looser relation to claimant who will accept + else_if = { + limit = { + scope:the_faith = { + any_faith_playable_ruler = { + ep3_frankokratia_story_owner_trigger = yes + ep3_frankokratia_will_start_trigger = yes + } + } + } + scope:the_faith = { + ordered_faith_playable_ruler = { + order_by = { + value = 0 + add = current_military_strength + } + limit = { + ep3_frankokratia_story_owner_trigger = yes + ep3_frankokratia_will_start_trigger = yes + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + } + #Next, ai with a closely related claimant who might not accept + else_if = { + limit = { + scope:the_faith = { + any_faith_playable_ruler = { + ep3_frankokratia_story_owner_trigger = yes + save_temporary_scope_as = char_temp + + #Thorough check for close relation claimants + OR = { + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + } + #In laws of family in court/realm + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_transiting_relative_trigger = yes + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + } + #Spouse claimant + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + #Spouse's close family in realm/court + any_spouse = { + ep3_frankokratia_transiting_relative_trigger = yes + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_claimant_trigger = yes + } + } + #friends + any_relation = { + type = friend + ep3_frankokratia_claimant_trigger = yes + } + #soulmates + any_relation = { + type = soulmate + ep3_frankokratia_claimant_trigger = yes + } + } + } + } + } + scope:the_faith = { + ordered_faith_playable_ruler = { + order_by = { + value = 0 + add = current_military_strength + } + limit = { + ep3_frankokratia_story_owner_trigger = yes + save_temporary_scope_as = char_temp + + #Thorough check for close relation claimants + OR = { + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + } + #In laws of family in court/realm + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_transiting_relative_trigger = yes + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + } + #Spouse claimant + any_spouse = { + ep3_frankokratia_claimant_trigger = yes + } + #Spouse's close family in realm/court + any_spouse = { + ep3_frankokratia_transiting_relative_trigger = yes + any_close_family_member = { + OR = { + is_courtier_of = prev + is_vassal_of = prev + } + ep3_frankokratia_claimant_trigger = yes + } + } + #friends + any_relation = { + type = friend + ep3_frankokratia_claimant_trigger = yes + } + #soulmates + any_relation = { + type = soulmate + ep3_frankokratia_claimant_trigger = yes + } + } + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + } + #Someone with looser relation to claimant who might not accept + else_if = { + limit = { + scope:the_faith = { + any_faith_playable_ruler = { + ep3_frankokratia_story_owner_trigger = yes + } + } + } + scope:the_faith = { + ordered_faith_playable_ruler = { + order_by = { + value = 0 + add = current_military_strength + } + limit = { + ep3_frankokratia_story_owner_trigger = yes + } + trigger_event = { + id = ep3_frankokratia_events.0001 + days = 20 + } + } + } + } + } + } + if = { + limit = { + NOT = { + exists = global_var:cath_crusade_1 + } + scope:the_faith = { this = faith:catholic } + } + set_global_variable = { + name = cath_crusade_1 + value = 1 + } + } + else_if = { + limit = { + scope:the_faith = { this = faith:catholic } + } + change_global_variable = { + name = cath_crusade_1 + add = 1 + } + } + } +} + +# The preparation for the next Great Holy War begins. Faithful assemble. +great_holy_war.0003 = { + title = great_holy_war.0003.title + desc = { + first_valid = { + #Catholic flavour + triggered_desc = { + desc = great_holy_war.0003.catholic.desc + trigger = { scope:the_faith = faith:catholic } + } + #Everyone else + desc = great_holy_war.0003.fallback.desc + } + } + theme = faith + override_background = { + reference = temple_scope + } + left_portrait = scope:ghw_sponsor + + immediate = { + scope:ghw_sponsor = { + save_scope_as = background_temple_scope + } + play_music_cue = "mx_cue_general_crusade_event_2" + + set_variable = { + name = ghw_pledge_amount + value = great_holy_war_pledge_amount + } + set_variable = { + name = half_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 0.5 + } + } + } + + option = { + name = great_holy_war.0003.a + trigger = { + root.faith = scope:the_faith + NOR = { + exists = scope:the_faith.great_holy_war.ghw_war + #Religious head should never unpledge: + this = scope:the_faith.great_holy_war.ghw_war_declarer + has_character_flag = ghw_unpledging_cooldown #Safety event. + #Do not pledge against your own liege: + any_liege_or_above = { this = scope:the_faith.great_holy_war.ghw_target_character } + } + OR = { #Either be independent, or all lieges above you MUST be of the same Faith declaring the war to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + NOT = { + any_liege_or_above = { + faith != scope:the_faith + } + } + } + } + custom_tooltip = great_holy_war.0003.a.tt + if = { + limit = { + NOT = { + scope:the_faith.great_holy_war = { has_pledged_attacker = root } + } + } + pledge_ghw_piety_gain_effect = yes + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + custom_tooltip = great_holy_war.0003.a.lifted_excommunication + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + } + scope:the_faith.great_holy_war = { + hidden_effect = { pledge_attacker = root } + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + + ai_chance = { + base = 10 + modifier = { + factor = 0.5 + top_liege != this + } + modifier = { + factor = 0.5 + highest_held_title_tier = tier_county + } + modifier = { + factor = 5 + highest_held_title_tier >= tier_kingdom + } + modifier = { #Excommunicated characters like getting rid of the trait. + factor = 2 + has_trait = excommunicated + } + } + } + + option = { + name = great_holy_war.0003.b + add_piety = root.var:half_great_holy_war_pledge_amount + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + remove_short_term_gold = var:ghw_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = var:ghw_pledge_amount + } + scope:the_faith.great_holy_war = { + change_war_chest_gold = root.var:ghw_pledge_amount + } + if = { + limit = { + NOT = { has_character_flag = ghw_pledged_gold } + is_ai = no + } + add_character_flag = { #Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 7300 + } + } + ai_chance = { + base = 10 + } + } + + option = { + name = great_holy_war.0003.c + ai_chance = { + base = 0 + } + } + + after = { + remove_variable = ghw_pledge_amount + } +} + +# Rel head selects new target +great_holy_war.0004 = { + hidden = yes + scope = ghw + + immediate = { + faith = { save_scope_as = the_faith } + + determine_ghw_target_effect = { FAITH = scope:the_faith } + + set_great_holy_war_target = { target_title = scope:target_kingdom target_character = scope:target_character } + if = { + limit = { exists = var:last_redirector } + change_variable = { + name = redirect_cost + divide = 2 + } + var:last_redirector = { add_piety = root.var:redirect_cost } + remove_variable = last_redirector + } + } +} + +# War is launched +great_holy_war.0005 = { + hidden = yes + scope = ghw + + immediate = { + if = { + limit = { + any_pledged_attacker = { + primary_title = { is_head_of_faith = yes } + faith = faith:catholic + } + exists = global_var:byz_claimant_champion + global_var:byz_claimant_champion = { + is_alive = yes + is_ruler = yes + any_owned_story = { + type = frankokratia_story + } + } + exists = title:e_byzantium.holder + } + #Check claimant isn't dead, invalidate if they are + if = { + limit = { + global_var:byz_claimant_champion = { + any_owned_story = { + type = frankokratia_story + var:byz_claimant = { is_alive = no } + } + } + } + global_var:byz_claimant_champion = { + random_owned_story = { + type = frankokratia_story + every_in_list = { + variable = frankokratia_leaders + limit = { + is_ai = no + } + trigger_event = ep3_frankokratia_events.0005 + } + } + } + } + else = { + ep3_frankokratia_remove_pledged_attackers_effect = yes + } + } + + start_ghw_war = undirected_great_holy_war + divide_war_chest = { + fraction = 0.2 + prestige = no + gold = no + } + } +} + +#Unlocking Holy Wars. (on later dates Crusades and Jihads start already unlocked from Character History) +#Hidden check event, fired on_faith pulse. + +scripted_trigger great_holy_war_0010_jerusalem_reason_trigger = { + title:c_jerusalem.holder.top_liege = { + faith.religion != scope:awakening_faith.religion + } +} + +scripted_trigger great_holy_war_0010_rome_reason_trigger = { + title:c_roma.holder.top_liege = { + faith.religion != scope:awakening_faith.religion + } +} + +scripted_trigger great_holy_war_0010_byzantion_reason_trigger = { + OR = { + trigger_if = { # Byzantine Empire + limit = { exists = title:e_byzantium.holder } # Make sure a holder exists beforehand + title:e_byzantium.holder.religion = { + NOT = { + this = religion:christianity_religion + } + } + } + title:c_byzantion.holder.top_liege.religion = { # Constantinople + NOT = { + this = religion:christianity_religion + } + } + title:c_paphlagonia.holder.top_liege.religion = { # Ankyra + NOT = { + this = religion:christianity_religion + } + } + title:c_attica.holder.top_liege.religion = { # Athens + NOT = { + this = religion:christianity_religion + } + } + title:c_korinthos.holder.top_liege.religion = { # Corinth + NOT = { + this = religion:christianity_religion + } + } + } +} + +scripted_trigger great_holy_war_0010_europe_reason_trigger = { + OR = { + title:c_venaissin.holder.top_liege.religion = { # Provence + NOT = { + this = religion:christianity_religion + } + } + title:c_toulouse.holder.top_liege.religion = { # Toulouse + NOT = { + this = religion:christianity_religion + } + } + title:c_ile_de_france.holder.top_liege.religion = { # Paris + NOT = { + this = religion:christianity_religion + } + } + title:c_cologne.holder.top_liege.religion = { # Cologne + NOT = { + this = religion:christianity_religion + } + } + title:c_halberstadt.holder.top_liege.religion = { # Halberstadt + NOT = { + this = religion:christianity_religion + } + } + } +} + +scripted_trigger great_holy_war_0010_mecca_reason_trigger = { + title:c_mecca.holder.top_liege = { + faith.religion != scope:awakening_faith.religion + } +} + +scripted_trigger great_holy_war_0010_centre_reason_trigger = { + OR = { + title:c_baghdad.holder.top_liege.religion = { # Baghdad + NOT = { + this = religion:christianity_religion + } + } + title:c_damascus.holder.top_liege.religion = { # Damascus + NOT = { + this = religion:christianity_religion + } + } + title:c_cairo.holder.top_liege.religion = { # Cairo + NOT = { + this = religion:christianity_religion + } + } + } +} + +scripted_trigger great_holy_war_0010_africa_reason_trigger = { + OR = { + title:c_marrakesh.holder.top_liege.religion = { # Marrakesh + NOT = { + this = religion:christianity_religion + } + } + title:c_tunis.holder.top_liege.religion = { # Tunis + NOT = { + this = religion:christianity_religion + } + } + title:c_algier.holder.top_liege.religion = { # Algier + NOT = { + this = religion:christianity_religion + } + } + } +} + +great_holy_war.0010 = { + hidden = yes + scope = faith + + trigger = { + suitable_faith_for_any_ghw_trigger = yes # Faith must have right Doctrines. + NOR = { + religion = { exists = var:variable_ghw_unlocked } + has_global_variable = variable_ghw_global_unlocking_cooldown + } + religious_head ?= { is_imprisoned = no } + num_county_followers >= 35 # Faith must have at least SOME legitimacy. + OR = { + AND = { # Historical setup. + title:c_jerusalem.holder = { + faith.religion != root.religion + } + current_date >= 1095.1.1 + faith:catholic = root + } + AND = { # Historical setup. + great_holy_war_0010_byzantion_reason_trigger = yes + current_date >= 1000.1.1 + faith:catholic = root + } + AND = { # Historical setup. + great_holy_war_0010_europe_reason_trigger = yes + current_date >= 800.1.1 + faith:catholic = root + } + AND = { # Historical setup. + title:c_roma.holder.top_liege = { + faith.religion != root.religion + } + faith:catholic = root + } + current_date >= 1100.1.1 # Free for all after Historical years + AND = { # Any Faith is seriously under attack. + any_holy_site = { + holder.top_liege = { + faith.religion != root.religion + } + count >= 2 + } + current_date >= 800.1.1 + } + AND = { # I learned it from you! - Muslims second. + religion:christianity_religion = { + exists = var:variable_ghw_unlocked + } + religion:islam_religion = root.religion + any_holy_site = { + holder.top_liege = { + faith.religion != root.religion + } + count >= 1 + } + } + AND = { # And we learned it from you! - Everyone else last. + religion:christianity_religion = { + exists = var:variable_ghw_unlocked + } + religion:islam_religion = { + exists = var:variable_ghw_unlocked + } + any_holy_site = { + holder.top_liege = { + faith.religion != root.religion + } + count >= 1 + } + NOR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:islam_religion + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { # Historical push for local Christian control. + add = 2 + title:c_jerusalem.holder = { + NOT = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + } + current_date >= 1095.1.1 + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + } + modifier = { # Historical push for overall Islamic control. + add = 2 + title:c_jerusalem.holder.top_liege = { + NOT = { faith.religion = religion:islam_religion } + } + current_date >= 1095.1.1 + root.religion = religion:islam_religion + } + } + + immediate = { + set_global_variable = { + name = variable_ghw_global_unlocking_cooldown # Slow Down cascade of Religious Heads unlocking Crusades all over the place, trying to outplay ach other. + value = yes + days = 3650 + } + religion = { + set_variable = { + name = variable_first_ghw_cooldown # Wait at least a couple of months before firing the first Crusade after this event. + value = yes + days = 120 + } + } + save_scope_as = awakening_faith + if = { + limit = { + exists = religious_head + } + religious_head = { save_scope_as = ghw_first_sponsor } + } + else = { + random_theocratic_ruler = { + limit = { faith = root } + save_scope_as = ghw_first_sponsor + } + } + if = { # Fallback + limit = { + NOT = { + exists = scope:ghw_first_sponsor + } + } + random_ruler = { + limit = { faith = root } + save_scope_as = ghw_first_sponsor + } + } + religion = { + set_variable = { + name = variable_ghw_unlocked # Crusades + value = yes + } + } + every_player = { + trigger_event = great_holy_war.0011 # Flavor fluff for various Faiths. + } + } +} + +#Flavor Fluff. +great_holy_war.0011 = { + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + } + desc = great_holy_war.0011.christian.t + } + triggered_desc = { + trigger = { + scope:awakening_faith.religion = religion:islam_religion + } + desc = great_holy_war.0011.muslim.t + } + triggered_desc = { #Pagan Polytheists + trigger = { + scope:awakening_faith.religion = { + is_in_family = rf_pagan + } + } + desc = great_holy_war.0011.pagans.t + } + desc = great_holy_war.0011.fallback.t + } + } + desc = { + first_valid = { + #Christian Flavor + triggered_desc = { #Catholic Crusades, because of Rome. + trigger = { + scope:awakening_faith = faith:catholic + exists = scope:ghw_first_sponsor + great_holy_war_0010_rome_reason_trigger = yes + } + desc = great_holy_war.0011.catholic.rome.desc + } + triggered_desc = { #Christian Crusades, because of fall of Europe. + trigger = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + exists = scope:ghw_first_sponsor + great_holy_war_0010_europe_reason_trigger = yes + } + desc = great_holy_war.0011.christian.europe.desc + } + triggered_desc = { #Christian Crusades, because of fall of Byzantium. + trigger = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + exists = scope:ghw_first_sponsor + great_holy_war_0010_byzantion_reason_trigger = yes + } + desc = great_holy_war.0011.christian.byzantion.desc + } + triggered_desc = { #Catholic Crusades, because of Jerusalem. + trigger = { + scope:awakening_faith = faith:catholic + exists = scope:ghw_first_sponsor + great_holy_war_0010_jerusalem_reason_trigger = yes + } + desc = great_holy_war.0011.catholic.jerusalem.desc + } + triggered_desc = { #Christian Crusades, fallback. + trigger = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + } + desc = great_holy_war.0011.christian.fallback.desc + } + + #Muslim Flavor + triggered_desc = { #Jihads, because of Mecca. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + exists = scope:ghw_first_sponsor + great_holy_war_0010_mecca_reason_trigger = yes + } + desc = great_holy_war.0011.muslim.mecca.desc + } + triggered_desc = { #Jihads, because of Jerusalem. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + exists = scope:ghw_first_sponsor + great_holy_war_0010_mecca_reason_trigger = yes + } + desc = great_holy_war.0011.muslim.jerusalem.desc + } + triggered_desc = { #Jihads, because of Arabia/Egypt. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + exists = scope:ghw_first_sponsor + great_holy_war_0010_centre_reason_trigger = yes + } + desc = great_holy_war.0011.muslim.arabia.desc + } + triggered_desc = { #Jihads, because of Africa. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + exists = scope:ghw_first_sponsor + great_holy_war_0010_africa_reason_trigger = yes + } + desc = great_holy_war.0011.muslim.africa.desc + } + triggered_desc = { #Jihads, fallback. + trigger = { + scope:awakening_faith.religion = religion:islam_religion + } + desc = great_holy_war.0011.muslim.fallback.desc + } + #Generic Flavor + triggered_desc = { #Generic, with Head. + trigger = { + NOR = { + scope:awakening_faith.religion = religion:islam_religion + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + } + exists = scope:ghw_first_sponsor + } + desc = great_holy_war.0011.generic.fallback.head.desc + } + desc = great_holy_war.0011.generic.fallback.desc + } + first_valid = { #Ending, favorable or not, depending on receiver. + triggered_desc = { # Crusades are good! + trigger = { + OR = { + faith = scope:awakening_faith + faith = { + faith_hostility_level = { + target = scope:awakening_faith + value < faith_hostile_level + } + } + } + faith.religion != scope:awakening_faith.religion + } + desc = great_holy_war.0011.generic.ending.positive + } + triggered_desc = { # Crusades are bad! + trigger = { + NOR = { + faith = scope:awakening_faith + faith.religion = scope:awakening_faith.religion + faith = { + faith_hostility_level = { + target = scope:awakening_faith + value < faith_hostile_level + } + } + } + } + desc = great_holy_war.0011.generic.ending.negative + } + triggered_desc = { # Co-religionists. + trigger = { + faith.religion = scope:awakening_faith.religion + faith != scope:awakening_faith + exists = faith.religious_head + } + desc = great_holy_war.0011.generic.ending.coreligionist.head + } + triggered_desc = { # Co-religionists (no Head). + trigger = { + faith.religion = scope:awakening_faith.religion + faith != scope:awakening_faith + NOT = { exists = faith.religious_head } + } + desc = great_holy_war.0011.generic.ending.coreligionist.autonomous + } + } + } + theme = faith + override_background = { + reference = temple_scope + } + left_portrait = { + character = scope:ghw_first_sponsor + triggered_animation = { + trigger = { + scope:awakening_faith = { + has_doctrine = doctrine_temporal_head + } + } + animation = marshal + } + animation = personality_zealous + } + + immediate = { + scope:ghw_first_sponsor = { + save_scope_as = background_temple_scope + } + play_music_cue = "mx_cue_epic_sacral_moment" + + if = { #Localisation use only + limit = { + faith.religion = scope:awakening_faith.religion + faith != scope:awakening_faith + exists = faith.religious_head + } + faith.religious_head = { + save_scope_as = other_pope + } + } + } + + option = { #God's will + name = great_holy_war.0011.a + trigger = { + root.faith = scope:awakening_faith + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + } + } + option = { #Allahu Akhbar + name = great_holy_war.0011.b + trigger = { + root.faith = scope:awakening_faith + scope:awakening_faith.religion = religion:islam_religion + } + } + option = { #PaganGodName is with us. + name = great_holy_war.0011.c + trigger = { + root.faith = scope:awakening_faith + NOR = { + OR = { scope:awakening_faith.religion = religion:eastern_orthodox_religion scope:awakening_faith.religion = religion:catholic_religion scope:awakening_faith.religion = religion:protestant_religion } + scope:awakening_faith.religion = religion:islam_religion + } + } + } + option = { #Infidels incoming. + name = great_holy_war.0011.d + trigger = { + root.faith != scope:awakening_faith + root.faith = { + faith_hostility_level = { + target = scope:awakening_faith + value >= faith_hostile_level + } + } + } + } + option = { #Good luck, I suppose... + name = great_holy_war.0011.e + trigger = { + NOR = { + root.faith = scope:awakening_faith + root.faith = { + faith_hostility_level = { + target = scope:awakening_faith + value >= faith_hostile_level + } + } + } + } + } + after = { + custom_tooltip = great_holy_war.0011.tooltip.effect + } +} + +#Excommunication lifted for joining the Crusade. +great_holy_war.0015 = { + type = letter_event + opening = { + desc = great_holy_war.0015.opening + } + desc = great_holy_war.0015.desc + sender = { + character = scope:scoped_pope + animation = happiness + } + + trigger = { + faith.great_holy_war = { + has_pledged_attacker = root + } + has_trait = excommunicated + } + + immediate = { + if = { #If Pope died in the meantime. + limit = { + OR = { + NOT = { + exists = faith.great_holy_war.ghw_war_declarer + } + NOT = { + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + remove_trait = excommunicated + add_character_modifier = { + modifier = excommunication_recently_lifted + years = 10 + } + } + + option = { + name = great_holy_war.0015.a + trigger = { has_trait = cynical } + } + option = { + name = great_holy_war.0015.b + trigger = { + NOT = { has_trait = cynical } + } + } +} + +#Pope upset because ruler unpledged. +great_holy_war.0016 = { + type = letter_event + opening = { + desc = great_holy_war.0015.opening + } + desc = { + first_valid = { #Light Punishment + triggered_desc = { + trigger = { + has_character_flag = ghw_light_punishment + } + desc = great_holy_war.0016.desc.a + } + } + first_valid = { #Harsh Punishment + triggered_desc = { + trigger = { + has_character_flag = ghw_harsh_punishment + } + desc = great_holy_war.0016.desc.b + } + } + first_valid = { #Excommunication Punishment + triggered_desc = { + trigger = { + has_character_flag = ghw_excommunication + } + desc = great_holy_war.0016.desc.c + } + } + } + sender = { + character = scope:scoped_pope + animation = anger + } + + trigger = { + NOT = { + faith.great_holy_war = { + has_pledged_attacker = root + } + } + is_landless_adventurer = no + } + + immediate = { + hidden_effect = { + if = { #If Pope died in the meantime. + limit = { + OR = { + NOT = { + exists = faith.great_holy_war.ghw_war_declarer + } + NOT = { + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + random_list = { + 40 = { + opinion_modifier = { + who = scope:scoped_pope + opinion_target = root + } + modifier = { + factor = 2 + highest_held_title_tier = tier_county + } + add_character_flag = { + flag = ghw_light_punishment + days = 500 + } + } + 30 = { + modifier = { + factor = 1.25 + highest_held_title_tier >= tier_duchy + } + add_character_flag = { + flag = ghw_harsh_punishment + days = 500 + } + } + 30 = { #Excommunication available only if target already not excommunicated and religion allows it. + trigger = { + NOT = { has_trait = excommunicated } + faith = { has_doctrine_parameter = excommunication_active } + highest_held_title_tier >= tier_kingdom + } + modifier = { #Fool me once... + factor = 2 + has_character_modifier = excommunication_recently_lifted + } + modifier = { + factor = 2 + highest_held_title_tier >= tier_empire + } + add_character_flag = { + flag = ghw_excommunication + days = 500 + } + } + } + } + } + + option = { + name = great_holy_war.0016.a + trigger = { has_trait = cynical } + } + option = { + name = great_holy_war.0016.b + trigger = { + NOT = { has_trait = cynical } + } + } + after = { + if = { + limit = { has_character_flag = ghw_light_punishment } + scope:scoped_pope = { + add_opinion = { + target = root + modifier = unpledged_from_ghw_opinion + opinion = -25 + } + } + } + if = { + limit = { has_character_flag = ghw_harsh_punishment } + add_piety = medium_piety_loss + scope:scoped_pope = { + add_opinion = { + target = root + modifier = unpledged_from_ghw_opinion + opinion = -35 + } + } + if = { + limit = { + any_theocratic_vassal = { faith = root.faith } + } + every_theocratic_vassal = { + custom = great_holy_war.0016.custom + limit = { faith = root.faith } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -35 + } + } + } + if = { + limit = { exists = cp:councillor_court_chaplain } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -35 + } + } + } + if = { + limit = { has_character_flag = ghw_excommunication } + add_excommunication_actual_effect = yes + if = { + limit = { has_character_modifier = excommunication_recently_lifted } + hidden_effect = { remove_character_modifier = excommunication_recently_lifted } + } + scope:scoped_pope = { + add_opinion = { + target = root + modifier = unpledged_from_ghw_opinion + opinion = -40 + } + } + } + remove_character_flag = ghw_light_punishment + remove_character_flag = ghw_harsh_punishment + remove_character_flag = ghw_excommunication + stress_impact = { + zealous = medium_stress_impact_gain + } + } +} + +#Confirmation to unpledge. +great_holy_war.0017 = { + title = great_holy_war.0017.title + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:scoped_pope = { faith = faith:catholic } + } + desc = great_holy_war.0017.desc.a + } + triggered_desc = { + trigger = { + NOT = { + scope:scoped_pope = { faith = faith:catholic } + } + } + desc = great_holy_war.0017.desc.b + } + } + } + theme = faith + left_portrait = scope:scoped_pope + + immediate = { + if = { + limit = { + NOR = { + exists = faith.great_holy_war.ghw_war_declarer + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + add_character_flag = { + flag = ghw_unpledging_cooldown + days = 500 + } + } + + option = { + name = great_holy_war.0017.a + if = { + limit = { #Stop from doing it if the player opens the Crusade Interface and joins from there. + scope:great_holy_war = { has_pledged_attacker = root } + } + root.faith.great_holy_war = { + unpledge_attacker = root + unpledge_ghw_war_chest_prestige_effect = yes + unpledge_ghw_war_chest_piety_effect = yes + } + } + #Piety price + pledge_ghw_piety_loss_effect = yes + add_piety_level = -1 + #Set Cooldown + set_variable = { + name = variable_ghw_unpledged_cooldown + value = yes + days = 60 + } + #Religious Head is upset + trigger_event = { + id = great_holy_war.0016 + days = 37 + } + remove_character_flag = ghw_unpledging_cooldown + add_character_flag = { #Used to check whether the Pope will harass for more later. + flag = ghw_unpledged_once + days = 550 + } + } + option = { + name = great_holy_war.0017.b + remove_character_flag = ghw_unpledging_cooldown + } +} + +#Confirmation to pledge. +great_holy_war.0018 = { + title = great_holy_war.0003.title + desc = great_holy_war.0018.desc + theme = faith + left_portrait = scope:scoped_pope + + immediate = { + if = { + limit = { + OR = { + NOT = { + exists = faith.great_holy_war.ghw_war_declarer + } + NOT = { + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + add_character_flag = { + flag = ghw_unpledging_cooldown + days = 500 + } + } + + option = { + name = great_holy_war.0018.a + faith.great_holy_war = { + pledge_attacker = root + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + #Piety bonus + root = { + pledge_ghw_piety_gain_effect = yes + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine = tenet_communion } + } + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + } + remove_character_flag = ghw_unpledging_cooldown + } + option = { + name = great_holy_war.0018.b + remove_character_flag = ghw_unpledging_cooldown + } +} + +# AI hidden event to pledge to a Great Holy War during the preparation phase. +# Event is fired when the Pope calls for the Crusade. +# Requires a the_faith scope, defined by event. +great_holy_war.0020 = { + hidden = yes + + trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + is_at_war = no + is_imprisoned = no + highest_held_title_tier >= tier_county + NOT = { has_trait = incapable } + ai_zeal >= 0 + root.faith = scope:the_faith + NOT = { target_is_liege_or_above = scope:target_character } + scope:the_faith = { # Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_attacker = root } + } + } + } + + immediate = { + scope:the_faith.great_holy_war = { + set_variable = { + name = triple_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 3 + } + } + set_variable = { + name = double_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 2 + } + } + set_variable = { + name = one_and_a_half_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 1.5 + } + } + set_variable = { + name = half_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 0.5 + } + } + set_variable = { + name = quarter_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 0.25 + } + } + } + random_list = { + 25 = { # Pledge. + trigger = { + OR = { # Either be independent, or have no liege above you of the defending Faith, to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + any_liege_or_above = { + count = all + faith != scope:target_faith + } + } + } + scope:the_faith.great_holy_war = { + pledge_attacker = root + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + pledge_ghw_piety_gain_effect = yes + # Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + if = { + limit = { is_ai = yes } + trigger_event = { id = great_holy_war.0026 } # Set Beneficiary automatically. + } + } + 75 = { # Do not pledge. + random = { # When not pledging, there is still a chance that the AI will donate money. + chance = 35 + modifier = { + factor = 0.75 + has_trait = greedy + } + modifier = { + factor = 1.5 + has_trait = generous + } + modifier = { + factor = 0.25 + has_trait = cynical + } + modifier = { + factor = 1.75 + has_trait = zealous + } + modifier = { + factor = 1.75 + short_term_gold >= root.great_holy_war_pledge_amount + } + ai_value_modifier = { # Raw Zeal + ai_zeal = 1.0 + } + scope:the_faith.great_holy_war = { + change_war_chest_gold = { + value = root.great_holy_war_pledge_amount + multiply = 0.5 + } + } + } + + modifier = { # More pledging happening at start of preparation phase. + factor = 0.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch > 200 } + } + modifier = { # Less pledging happening after. + factor = 1.5 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch < 150 } + } + modifier = { # Less pledging happening after. + factor = 1.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch < 100 } + } + modifier = { # Less pledging happening after. + factor = 1.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch < 70 } + } + modifier = { # More likely if war is close by. + factor = 0.85 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 150000 } + } + } + } + modifier = { # More likely if war is close by. + factor = 0.9 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 1500000 } # Roughly Rome to Portugal + } + } + } + modifier = { # Less likely if war is far away. + factor = 1.5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2000000 } + } + } + } + modifier = { # Just too darn far away... + factor = 1.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2500000 } + } + } + } + modifier = { # Much less likely to happen if the war has started. + factor = 0.25 + exists = scope:the_faith.great_holy_war.ghw_war + } + modifier = { # Don't get too crowded now. + factor = 2 + scope:the_faith.great_holy_war = { ghw_attackers_strength > ghw_defenders_strength } + } + modifier = { # Don't get too crowded now. + factor = 1.85 + scope:the_faith.great_holy_war = { ghw_attackers_strength > var:triple_defenders_strength } + } + modifier = { # Don't get too crowded now. + factor = 1.75 + scope:the_faith.great_holy_war = { ghw_attackers_strength > var:double_defenders_strength } + } + modifier = { # Don't get too crowded now. + factor = 1.5 + scope:the_faith.great_holy_war = { ghw_attackers_strength > var:one_and_a_half_of_defenders_strength } + } + modifier = { # Try to prevent the Crusade from failing before even starting. (Less strength than defenders) + factor = 0.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_attackers_strength < ghw_defenders_strength } + } + modifier = { # Try to prevent the Crusade from failing before even starting. (Less than half of the defenders' strength) + factor = 0.5 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_attackers_strength < var:half_of_defenders_strength } + } + modifier = { # Try to prevent the Crusade from failing before even starting. (Less than quarter of the defenders' strength) + factor = 0.35 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_attackers_strength < var:quarter_of_defenders_strength } + } + modifier = { # Slightly more likely to join when fighting for a Holy Site. + factor = 0.85 + scope:target_kingdom = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + } + modifier = { # Hoping for forgiveness + factor = 0.8 + has_trait = excommunicated + } + ai_value_modifier = { # Raw Zeal + ai_zeal = -1.0 + } + modifier = { # Basic traits + factor = 2 + has_trait = cynical + } + modifier = { # Basic traits + factor = 0.5 + has_trait = zealous + } + modifier = { # Tier + factor = 0.75 + highest_held_title_tier = tier_kingdom + } + modifier = { # Tier + factor = 0.5 + highest_held_title_tier = tier_empire + } + } + } + } +} + +#AI hidden event to pledge to a Directed Great Holy War. +#Event is fired on_declaration. +#Requires a the_faith scope, defined in the cb. +great_holy_war.0092 = { + hidden = yes + + trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + is_at_war = no + is_imprisoned = no + highest_held_title_tier >= tier_county + NOT = { has_trait = incapable } + ai_zeal >= 0 + root.faith = scope:the_faith + NOT = { target_is_liege_or_above = scope:ghw_defender } #scope:target_character isn't created in the holy war decision where this event is called + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_attacker = root } + } + } + } + + immediate = { + scope:the_faith.great_holy_war = { + set_variable = { + name = triple_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 3 + } + } + set_variable = { + name = double_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 2 + } + } + set_variable = { + name = one_and_a_half_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 1.5 + } + } + set_variable = { + name = half_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 0.5 + } + } + set_variable = { + name = quarter_of_defenders_strength + value = { + value = ghw_defenders_strength + multiply = 0.25 + } + } + } + random_list = { + 35 = { #Pledge. + trigger = { + OR = { # Either be independent, or have no liege above you of the defending Faith, to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + any_liege_or_above = { + count = all + faith != scope:target_faith + } + } + } + scope:the_faith.great_holy_war = { + pledge_attacker = root + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + if = { + limit = { is_ai = yes } + trigger_event = { + id = great_holy_war.0026 #Set Beneficiary automatically. + } + } + } + 65 = { #Do not pledge. + + random = { #When not pledging, there is still a chance that the AI will donate money. + chance = 35 + modifier = { + factor = 0.75 + has_trait = greedy + } + modifier = { + factor = 1.5 + has_trait = generous + } + modifier = { + factor = 0.25 + has_trait = cynical + } + modifier = { + factor = 1.75 + has_trait = zealous + } + modifier = { + factor = 1.75 + short_term_gold >= root.great_holy_war_pledge_amount + } + ai_value_modifier = { #Raw Zeal + ai_zeal = 1.0 + } + scope:the_faith.great_holy_war = { + change_war_chest_gold = root.great_holy_war_pledge_amount + } + } + modifier = { #More likely if war is close by. + factor = 0.85 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 150000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.9 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 1500000 } # Roughly Rome to Portugal + } + } + } + modifier = { #Less likely if war is far away. + factor = 2 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2000000 } + } + } + } + modifier = { #Just too darn far away... + factor = 5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2500000 } + } + } + } + modifier = { #Slightly more likely to join when fighting for a Holy Site. + factor = 0.85 + scope:target_kingdom = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:the_faith + } + } + } + ai_value_modifier = { #Raw Zeal + ai_zeal = -1.0 + } + modifier = { #Basic traits + factor = 2 + has_trait = cynical + } + modifier = { #Basic traits + factor = 0.5 + has_trait = zealous + } + modifier = { #Tier + factor = 0.75 + highest_held_title_tier = tier_kingdom + } + modifier = { #Tier + factor = 0.5 + highest_held_title_tier = tier_empire + } + } + } + } +} + +#AI hidden event to have a holy order pledge to a Great Holy War during the preparation phase. +#Event is fired when the Pope calls for the Crusade. +#Requires a the_faith scope, defined by event. +great_holy_war.0090 = { + hidden = yes + scope = holy_order + + trigger = { + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_attacker = root.leader } + } + } + } + + immediate = { + scope:the_faith = { + great_holy_war = { + pledge_attacker = root.leader + } + } + } +} + +#AI hidden event to counterpledge to a Great Holy War during the preparation phase. +#Event is fired when the Pope calls for the Crusade and when the target Kingdom is switched. +#Requires a target_faith scope, defined by event. +#Requires a the_faith scope, defined by event. +great_holy_war.0021 = { + hidden = yes + + trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + is_at_war = no + is_imprisoned = no + highest_held_title_tier >= tier_county + NOT = { has_trait = incapable } + root.faith = scope:the_faith.great_holy_war.ghw_target_character.faith + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_defender = root } + } + NOT = { exists = great_holy_war.ghw_war } #Must not have started already, only in preparation phase. + } + } + + immediate = { + scope:the_faith.great_holy_war = { + set_variable = { + name = triple_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 3 + } + } + set_variable = { + name = double_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 2 + } + } + set_variable = { + name = one_and_a_half_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 1.5 + } + } + set_variable = { + name = half_of_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 0.5 + } + } + set_variable = { + name = quarter_of_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 0.25 + } + } + } + random_list = { + 15 = { #Pledge. + trigger = { + OR = { # Either be independent, or have no liege above you of the attacking Faith, to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + any_liege_or_above = { + count = all + faith != scope:the_faith + } + } + } + scope:the_faith.great_holy_war = { pledge_defender = root } + } + 85 = { #Do not pledge. + modifier = { #More pledging happening at start of preparation phase. + factor = 0.75 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch > 200 } + } + modifier = { #Less pledging happening after. + factor = 1.5 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { days_until_ghw_launch < 100 } + } + modifier = { #More likely if war is close by. + factor = 0.5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 25000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 50000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.8 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 800000 } # Roughly Rome to Portugal + } + } + } + modifier = { #Less likely if war is close by. + factor = 1.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 1000000 } + } + } + } + modifier = { #Less likely if war is close by. + factor = 1.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 1500000 } + } + } + } + modifier = { #Less likely if war is close by. + factor = 2 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2000000 } + } + } + } + modifier = { #Just too darn far away... + factor = 2.5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2500000 } + } + } + } + modifier = { #Much less likely to happen if the war has started. + factor = 1.75 + exists = scope:the_faith.great_holy_war.ghw_war + } + modifier = { #Don't get too crowded now. + factor = 1.5 + scope:the_faith.great_holy_war = { ghw_defenders_strength > ghw_attackers_strength } + } + modifier = { #Don't get too crowded now. + factor = 1.5 + scope:the_faith.great_holy_war = { ghw_defenders_strength > var:triple_attackers_strength } + } + modifier = { #Don't get too crowded now. + factor = 1.5 + scope:the_faith.great_holy_war = { ghw_defenders_strength > var:double_attackers_strength } + } + modifier = { #Don't get too crowded now. + factor = 1.25 + scope:the_faith.great_holy_war = { ghw_defenders_strength > var:one_and_a_half_attackers_strength } + } + modifier = { #Try to balance. + factor = 0.35 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_defenders_strength < var:half_of_attackers_strength } + } + modifier = { #Try to balance. + factor = 0.25 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_defenders_strength < var:quarter_of_attackers_strength } + } + modifier = { #Slightly more likely to join when fighting for a Holy Site. + factor = 0.75 + scope:target_kingdom = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:target_faith + } + } + } + ai_value_modifier = { #Raw Zeal + ai_zeal = -1.0 + } + modifier = { #Basic traits + factor = 2 + has_trait = cynical + } + modifier = { #Basic traits + factor = 0.5 + has_trait = zealous + } + modifier = { #Tier + factor = 0.75 + highest_held_title_tier = tier_kingdom + } + modifier = { #Tier + factor = 0.5 + highest_held_title_tier = tier_empire + } + } + } + } +} + +#AI hidden event to counterpledge to a Directed Great Holy War. +#Event is fired on_declaration. +#Requires a target_faith scope, defined in the cb. +#Requires a the_faith scope, defined in the cb. +great_holy_war.0093 = { + hidden = yes + + trigger = { + is_ai = yes + is_ruler = yes + is_landed = yes + is_at_war = no + is_imprisoned = no + highest_held_title_tier >= tier_county + NOT = { has_trait = incapable } + root.faith = scope:target_faith + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_defender = root } + } + } + } + + immediate = { + scope:the_faith.great_holy_war = { + set_variable = { + name = triple_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 3 + } + } + set_variable = { + name = double_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 2 + } + } + set_variable = { + name = one_and_a_half_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 1.5 + } + } + set_variable = { + name = half_of_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 0.5 + } + } + set_variable = { + name = quarter_of_attackers_strength + value = { + value = ghw_attackers_strength + multiply = 0.25 + } + } + } + random_list = { + 30 = { #Pledge. + trigger = { + OR = { # Either be independent, or have no liege above you of the attacking Faith, to avoid messy situations of vassals and lieges fighting against each other. + top_liege = this + any_liege_or_above = { + count = all + faith != scope:the_faith + } + } + } + scope:the_faith.great_holy_war = { pledge_defender = root } + } + 70 = { #Do not pledge. + modifier = { #More likely if war is close by. + factor = 0.5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 25000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.75 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 50000 } + } + } + } + modifier = { #More likely if war is close by. + factor = 0.8 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value < 800000 } # Roughly Rome to Portugal + } + } + } + modifier = { #Less likely if war is close by. + factor = 2 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 1000000 } + } + } + } + modifier = { #Less likely if war is close by. + factor = 5 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 1500000 } + } + } + } + modifier = { #Less likely if war is close by. + factor = 6 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2000000 } + } + } + } + modifier = { #Just too darn far away... + factor = 10 + scope:target_kingdom = { + capital_vassal.capital_vassal = { + squared_distance = { target = root.capital_county value > 2500000 } + } + } + } + modifier = { #Try to balance. + factor = 0.35 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_defenders_strength < var:half_of_attackers_strength } + } + modifier = { #Try to balance. + factor = 0.25 + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + scope:the_faith.great_holy_war = { ghw_defenders_strength < var:quarter_of_attackers_strength } + } + modifier = { #Slightly more likely to join when fighting for a Holy Site. + factor = 0.75 + scope:target_kingdom = { + any_in_de_jure_hierarchy = { + tier = tier_barony + continue = { tier > tier_barony } + is_holy_site_of = scope:target_faith + } + } + } + ai_value_modifier = { #Raw Zeal + ai_zeal = -1.0 + } + modifier = { #Basic traits + factor = 2 + has_trait = cynical + } + modifier = { #Basic traits + factor = 0.5 + has_trait = zealous + } + modifier = { #Tier + factor = 0.75 + highest_held_title_tier = tier_kingdom + } + modifier = { #Tier + factor = 0.5 + highest_held_title_tier = tier_empire + } + } + } + } +} + +#AI hidden event to have a holy order counterpledge to a Great Holy War during the preparation phase. +#Event is fired when the Pope calls for the Crusade and when the target Kingdom is switched. +#Requires a the_faith scope, defined by event. +great_holy_war.0091 = { + hidden = yes + scope = holy_order + + trigger = { + scope:the_faith = { #Crusade still exists + great_holy_war ?= { + NOT = { has_pledged_defender = root.leader } + } + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } #Must not have started already, only in preparation phase. + } + } + + immediate = { + scope:the_faith.great_holy_war = { + pledge_defender = root.leader + } + } +} + + +great_holy_war.0022 = { + hidden = yes + scope = faith + + trigger = { + exists = great_holy_war + NOT = { exists = great_holy_war.ghw_war } + great_holy_war = { days_until_ghw_launch <= 200 } + great_holy_war = { days_until_ghw_launch >= 150 } + save_temporary_scope_as = the_faith + any_player = { + ghw_pope_annoyed_at_lack_of_participation_trigger = yes + ghw_pope_annoyed_at_lack_of_participation_tier_trigger = yes + NOT = { has_character_flag = ghw_pope_poking } + is_landless_adventurer = no + } + } + + immediate = { + save_scope_as = the_faith + + if = { + limit = { exists = great_holy_war.ghw_target_character } + great_holy_war.ghw_target_character = { save_scope_as = target_character } + } + every_player = { + limit = { + ghw_pope_annoyed_at_lack_of_participation_trigger = yes + ghw_pope_annoyed_at_lack_of_participation_tier_trigger = yes + NOT = { has_character_flag = ghw_pope_poking } + is_landless_adventurer = no + } + trigger_event = { + id = great_holy_war.0023 + days = { 25 50 } + } + } + } +} + +#Actual event letter to players. +great_holy_war.0023 = { + type = letter_event + opening = { desc = great_holy_war.0015.opening } + desc = { + first_valid = { #Regular letter + triggered_desc = { + trigger = { + NOT = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + desc = great_holy_war.0023.desc + } + } + first_valid = { #Hooked player + triggered_desc = { + trigger = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + desc = great_holy_war.0023.desc.hooked + } + } + } + sender = scope:scoped_pope + + trigger = { + NOT = { exists = scope:the_faith.great_holy_war.ghw_war } + ghw_pope_annoyed_at_lack_of_participation_trigger = yes + ghw_pope_annoyed_at_lack_of_participation_tier_trigger = yes + is_landless_adventurer = no + } + + immediate = { + if = { #If the Pope died in the meantime. + limit = { + NOR = { + exists = scope:the_faith.great_holy_war.ghw_war_declarer + scope:the_faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + scope:the_faith = { ghw_set_new_war_declarer_effect = yes } + } + scope:the_faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + add_character_flag = { #Do not fire again. + flag = ghw_pope_poking + days = 200 + } + set_variable = { + name = ghw_pledge_amount + value = great_holy_war_pledge_amount + } + set_variable = { + name = half_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 0.5 + } + } + } + + option = { + name = { + trigger = { + NOT = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + text = great_holy_war.0003.a + } + name = { + trigger = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + text = great_holy_war.0003.a.hooked + } + trigger = { + ghw_pope_annoyed_at_lack_of_participation_trigger = yes + } + if = { + limit = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + scope:scoped_pope = { + use_hook = root + } + add_character_flag = { + flag = variable_ghw_papal_hooked_pledge + days = 500 + } + } + if = { + limit = { + NOT = { + scope:the_faith.great_holy_war = { has_pledged_attacker = root } + } + } + pledge_ghw_piety_gain_effect = yes + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + custom_tooltip = great_holy_war.0003.a.lifted_excommunication + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + scope:the_faith.great_holy_war = { + pledge_attacker = root + pledge_ghw_war_chest_prestige_effect = yes + pledge_ghw_war_chest_piety_effect = yes + } + } + stress_impact = { + cynical = minor_stress_impact_gain + zealous = minor_stress_impact_loss + } + + ai_chance = { + base = 10 + modifier = { + factor = 0.5 + top_liege != this + } + modifier = { + factor = 0.5 + highest_held_title_tier = tier_county + } + modifier = { + factor = 0.1 + top_liege != this + highest_held_title_tier <= tier_county + } + modifier = { + factor = 5 + highest_held_title_tier >= tier_kingdom + } + } + } + + option = { + name = great_holy_war.0003.b + trigger = { + NOT = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + add_piety = root.var:half_great_holy_war_pledge_amount + #Excommunication lifted. + if = { + limit = { + has_trait = excommunicated + faith = { has_doctrine_parameter = excommunication_active } + } + trigger_event = { + id = great_holy_war.0015 + days = 37 + } + } + remove_short_term_gold = var:ghw_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = var:ghw_pledge_amount + } + scope:the_faith.great_holy_war = { + change_war_chest_gold = root.var:ghw_pledge_amount + } + if = { + limit = { + NOT = { has_character_flag = ghw_pledged_gold } + } + add_character_flag = { #Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 550 + } + } + stress_impact = { + cynical = minor_stress_impact_gain + greedy = minor_stress_impact_gain + generous = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + option = { + name = great_holy_war.0023.c + #But I'm already fighting infidels in another war! + trigger = { + is_at_war = yes + NOR = { + any_war_enemy = { faith = scope:the_faith } + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + ai_chance = { + base = 0 + } + } + option = { #No excuses. + name = great_holy_war.0023.d + trigger = { + OR = { + is_at_war = no + NOT = { + any_war_enemy = { + faith != scope:the_faith + } + } + } + NOT = { + scope:scoped_pope = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + } + #Piety price + pledge_ghw_piety_loss_effect = yes + add_piety_level = -1 + #Set Cooldown + set_variable = { + name = variable_ghw_unpledged_cooldown + value = yes + days = 60 + } + #Religious Head is upset + trigger_event = { + id = great_holy_war.0016 + days = 37 + } + stress_impact = { + zealous = minor_stress_impact_gain + cynical = minor_stress_impact_loss + } + ai_chance = { + base = 0 + } + } + after = { + remove_variable = ghw_pledge_amount + } +} + +#On_death: of Recipient, pick another one. +great_holy_war.0024 = { + hidden = yes + scope = character + + trigger = { + exists = faith.great_holy_war + faith.great_holy_war.ghw_designated_winner = root + } + + immediate = { + save_scope_as = former_recipient + faith.great_holy_war = { + faith = { save_scope_as = the_faith } + ghw_target_title = { save_scope_as = target_kingdom } + if = { #If Pope died in the meantime. + limit = { + NOR = { + exists = scope:the_faith.great_holy_war.ghw_war_declarer + scope:the_faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + scope:the_faith = { ghw_set_new_war_declarer_effect = yes } + } + scope:the_faith.great_holy_war.ghw_war_declarer = { save_scope_as = ghw_sponsor } + #Check and set sponsor if needed. + undirected_ghw_recipient_selection_on_death_effect = yes + } + every_player = { + limit = { + scope:the_faith.great_holy_war = { + OR = { + has_pledged_attacker = prev + has_pledged_defender = prev + } + } + } + if = { + limit = { exists = scope:ghw_claimant } + send_interface_toast = { + type = event_toast_effect_bad + left_icon = scope:former_recipient + right_icon = scope:ghw_claimant + title = great_holy_war.0024.dead.recipient.title + custom_tooltip = great_holy_war.0024.dead.recipient.replaced + } + } + else = { + send_interface_toast = { + type = event_toast_effect_bad + left_icon = scope:former_recipient + title = great_holy_war.0024.dead.recipient.title + custom_tooltip = great_holy_war.0024.dead.recipient.open + } + } + } + } +} + +#on_character_faith_change: of Recipient, pick another one. +great_holy_war.0025 = { + hidden = yes + scope = character + + trigger = { + exists = scope:old_faith.great_holy_war + scope:old_faith.great_holy_war.ghw_designated_winner = root + } + + immediate = { + scope:old_faith.great_holy_war = { + faith = { save_scope_as = the_faith } + ghw_target_title = { save_scope_as = target_kingdom } + if = { #If Pope died in the meantime. + limit = { + OR = { + NOT = { + exists = scope:the_faith.great_holy_war.ghw_war_declarer + } + NOT = { + scope:the_faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + } + scope:the_faith = { ghw_set_new_war_declarer_effect = yes } + } + scope:the_faith.great_holy_war.ghw_war_declarer = { save_scope_as = ghw_sponsor } + #Check and set sponsor if needed. + undirected_ghw_recipient_selection_effect = yes + } + } +} + +#select Beneficiary for the AI automatically. Fired when it joins from great_holy_war.0020. +scripted_trigger great_holy_war_0026_valid_beneficiary_trigger = { + NOR = { + has_trait = excommunicated + has_trait = incapable + has_trait = devoted + has_trait_with_flag = debilitating_illness + } + faith = root.faith + is_adult = yes + is_ruler = no + any_heir_title = { count = 0 } #Not heir to anything + OR = { #Either not married, or not married to a ruler. + is_married = no + NOT = { + any_spouse = { + is_ruler = yes + } + } + } +} + +great_holy_war.0026 = { + hidden = yes + scope = character + + trigger = { + exists = faith.great_holy_war + faith.great_holy_war = { + has_pledged_attacker = root + } + } + + immediate = { + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { #If potential new beneficiary exists, pick one. + is_lowborn = no + dynasty = { + any_dynasty_member = { + great_holy_war_0026_valid_beneficiary_trigger = yes + } + } + } + dynasty = { + random_dynasty_member = { + limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + is_close_family_or_spouse_of_root_trigger = yes + age <= 40 + NOT = { has_relation_rival = root } + is_married = no + culture = root.culture + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + is_close_family_or_spouse_of_root_trigger = yes + age <= 40 + NOT = { has_relation_rival = root } + is_married = no + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + is_close_family_or_spouse_of_root_trigger = yes + age <= 40 + NOT = { has_relation_rival = root } + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + age <= 40 + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + OR = { + AND = { + is_male = yes + faith = { has_doctrine = doctrine_gender_male_dominated } + } + AND = { + is_female = yes + faith = { has_doctrine = doctrine_gender_female_dominated } + } + NOR = { + faith = { has_doctrine = doctrine_gender_male_dominated } + faith = { has_doctrine = doctrine_gender_female_dominated } + } + } + } + alternative_limit = { + great_holy_war_0026_valid_beneficiary_trigger = yes + } + weight = { + base = 1 + opinion_modifier = { # Nepotism + opinion_target = this + who = root + } + modifier = { # More likely to send a soldier into enemy territory. + add = 25 + has_trait = education_martial + } + modifier = { # Skill + add = 15 + OR = { + diplomacy >= 12 + martial >= 12 + stewardship >= 12 + intrigue >= 12 + learning >= 12 + } + } + modifier = { #Zeal + add = 5 + has_strong_religious_conviction_trigger = yes + } + modifier = { #Virtues + add = 2 + num_virtuous_traits >= 2 + } + } + save_scope_as = scoped_beneficiary + } + } + set_beneficiary = scope:scoped_beneficiary + } + else = { #Else reset. + reset_beneficiary = yes + } + } +} + +#Same as above, but fired on death of a participant of a ghw, with different scopes. +great_holy_war.0027 = { + hidden = yes + scope = character + + trigger = { + exists = scope:great_holy_war + exists = scope:replacement.faith.great_holy_war + } + + immediate = { + scope:replacement = { + if = { + limit = { + NOT = { + scope:great_holy_war = { has_pledged_attacker = prev } + } + } + scope:great_holy_war = { pledge_attacker = prev } + } + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { is_ai = yes } + trigger_event = { + id = great_holy_war.0026 + days = 2 + } + } + } + } +} + +#Resetting beneficiary when he becomes invalid for the spot, for whatever reason. +#On_death. +great_holy_war.0028 = { + hidden = yes + scope = character + + trigger = { + exists = faith.great_holy_war + faith.great_holy_war = { + any_pledged_attacker = { + ghw_beneficiary ?= root + } + } + } + + immediate = { + faith.great_holy_war = { + every_pledged_attacker = { + limit = { + ghw_beneficiary ?= root + } + ghw_beneficiary = { save_scope_as = former_beneficiary } + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { is_ai = no } #Send notification to player. + send_interface_toast = { + left_icon = root + title = great_holy_war.0028.dead.beneficiary_title + custom_tooltip = great_holy_war.0028.dead.beneficiary + } + } + else = { + trigger_event = { + id = great_holy_war.0026 + days = 2 + } + } + } + } + } +} + +#On_character_faith_change. +great_holy_war.0029 = { + hidden = yes + scope = character + + trigger = { + exists = scope:old_faith.great_holy_war + scope:old_faith.great_holy_war = { + any_pledged_attacker = { + ghw_beneficiary ?= root + } + } + } + + immediate = { + scope:old_faith.great_holy_war = { + every_pledged_attacker = { + limit = { + ghw_beneficiary ?= root + } + ghw_beneficiary = { save_scope_as = former_beneficiary } + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { is_ai = no } #Send notification to player. + send_interface_toast = { + left_icon = root + title = great_holy_war.0029.invalid.beneficiary_title + custom_tooltip = great_holy_war.0029.converted.beneficiary + } + } + else = { + trigger_event = { + id = great_holy_war.0026 + days = 2 + } + } + } + } + } +} + +#All other conditions checked on_faith_monthly. + +#If sick +#If incapable +#If monk/nun +#If Excommunicated +#If ruler +#If heir + +great_holy_war.0030 = { + hidden = yes + scope = faith + + trigger = { + great_holy_war ?= { + any_pledged_attacker = { #If beneficiary has become invalid in the meantime, for whatever reason. + ghw_beneficiary ?= { + OR = { + has_trait = incapable + has_trait = excommunicated + has_trait = devoted + has_trait_with_flag = debilitating_illness + is_ruler = yes + any_heir_title = { } #Shouldn't be heir to anything + } + } + } + } + } + + immediate = { + great_holy_war = { + every_pledged_attacker = { + limit = { + ghw_beneficiary ?= { + OR = { + has_trait = incapable + has_trait = excommunicated + has_trait = devoted + has_trait_with_flag = debilitating_illness + AND = { + is_ruler = yes + NOT = { government_has_flag = government_is_landless_adventurer } + } + any_heir_title = { } #Shouldn't be heir to anything + } + } + } + ghw_beneficiary = { + save_scope_as = former_beneficiary + } + reset_beneficiary = yes #Reset by default, then, if also an AI, reassign automatically. + if = { + limit = { + is_ai = no #Send notification to player. + scope:former_beneficiary = { + OR = { + has_trait = incapable + has_trait = excommunicated + has_trait = devoted + has_trait_with_flag = debilitating_illness + is_ruler = yes + any_heir_title = { } #Shouldn't be heir to anything + } + } + } + send_interface_toast = { + type = event_toast_effect_bad + left_icon = root + title = great_holy_war.0029.invalid.beneficiary_title + scope:former_beneficiary = { + if = { + limit = { has_trait = incapable } + custom_tooltip = great_holy_war.0030.incapable.beneficiary + } + else_if = { + limit = { has_trait = excommunicated } + custom_tooltip = great_holy_war.0030.excommunicated.beneficiary + } + else_if = { + limit = { has_trait = devoted } + custom_tooltip = great_holy_war.0030.devoted.beneficiary + } + else_if = { + limit = { has_trait_with_flag = debilitating_illness } + custom_tooltip = great_holy_war.0030.sick.beneficiary + } + else_if = { + limit = { is_ruler = yes } + custom_tooltip = great_holy_war.0030.ruler.beneficiary + } + else_if = { + limit = { any_heir_title = { } } #Shouldn't be heir to anything + custom_tooltip = great_holy_war.0030.heir.beneficiary + } + } + } + } + else_if = { + limit = { is_ai = yes } + trigger_event = { + id = great_holy_war.0026 + days = 2 + } + } + } + } + } +} + +# Player wishes to give money to the Crusade. +great_holy_war.0040 = { + type = character_event + title = great_holy_war.0003.title + desc = great_holy_war.0040.desc + theme = faith + left_portrait = root + + immediate = { + add_character_flag = { # Do not spam button. + flag = ghw_pledging_gold + days = 550 + } + set_variable = { + name = double_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 2 + } + } + set_variable = { + name = triple_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 3 + } + } + + #Set halves of above to give as Piety. + + set_variable = { + name = half_great_holy_war_pledge_amount + value = { + value = root.great_holy_war_pledge_amount + multiply = 0.5 + } + } + set_variable = { + name = half_of_triple_great_holy_war_pledge_amount + value = { + value = root.var:triple_great_holy_war_pledge_amount + multiply = 0.5 + } + } + + if = { + limit = { + NOR = { + exists = faith.great_holy_war.ghw_war_declarer + faith.great_holy_war.ghw_war_declarer = { is_alive = yes } + } + } + faith = { ghw_set_new_war_declarer_effect = yes } + } + root.faith.great_holy_war.ghw_war_declarer = { save_scope_as = scoped_pope } + } + + option = { # Big donation. + name = great_holy_war.0040.a + trigger = { gold >= var:triple_great_holy_war_pledge_amount } + add_piety = var:half_of_triple_great_holy_war_pledge_amount + remove_short_term_gold = var:triple_great_holy_war_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = var:triple_great_holy_war_pledge_amount + } + scope:great_holy_war = { + change_war_chest_gold = root.var:triple_great_holy_war_pledge_amount + } + scope:scoped_pope = { + add_opinion = { + target = root + modifier = donated_ghw_money_2 + } + } + add_character_flag = { # Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 7300 + } + stress_impact = { + cynical = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + option = { # Medium donation. + name = great_holy_war.0040.b + trigger = { gold >= var:double_great_holy_war_pledge_amount } + add_piety = root.great_holy_war_pledge_amount + remove_short_term_gold = var:double_great_holy_war_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = var:double_great_holy_war_pledge_amount + } + + scope:great_holy_war = { change_war_chest_gold = root.var:double_great_holy_war_pledge_amount } + scope:scoped_pope = { + add_opinion = { + target = root + modifier = donated_ghw_money_1 + } + } + add_character_flag = { # Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 7300 + } + stress_impact = { + cynical = minor_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + option = { # Small donation. + name = great_holy_war.0040.c + trigger = { gold >= great_holy_war_pledge_amount } + add_piety = var:half_great_holy_war_pledge_amount + remove_short_term_gold = great_holy_war_pledge_amount + set_variable = { + name = ghw_war_chest_donated_sum + value = great_holy_war_pledge_amount + } + scope:great_holy_war = { + change_war_chest_gold = root.great_holy_war_pledge_amount + } + add_character_flag = { # Used to check whether the Pope will harass for more later. + flag = ghw_pledged_gold + days = 7300 + } + } + + option = { #Never mind... + name = great_holy_war.0040.d + } + after = { + remove_character_flag = ghw_pledging_gold + remove_variable = double_great_holy_war_pledge_amount + remove_variable = triple_great_holy_war_pledge_amount + remove_variable = half_great_holy_war_pledge_amount + remove_variable = half_of_triple_great_holy_war_pledge_amount + } +} + +#great_holy_war.0050 Crusade preparation phase starts (defender) (fired from great_holy_war.0001) +#great_holy_war.0051 Crusade is declared (attackers/defenders) (fired from cb) +#great_holy_war.0052 crusade was won (attackers/defenders/bystanders) (fired from cb) +#great_holy_war.0053 crusade was lost (attackers/defenders/bystanders) (fired from cb) +#great_holy_war.0055 crusade failed to start (attackers/defenders/bystanders) (fired from on_great_holy_war_invalidation) + +#Rulers of target faith are informed of the start of the preparation phase of the GHW against them. +great_holy_war.0050 = { + title = great_holy_war.0050.title + desc = { + desc = great_holy_war.0050.base.desc + first_valid = { + #Defender. + triggered_desc = { + desc = great_holy_war.0050.defender.desc + trigger = { + scope:target_character = root + } + } + #Everybody else. + triggered_desc = { + desc = great_holy_war.0050.others.desc + trigger = { + scope:target_character != root + } + } + } + } + left_portrait = { + character = scope:ghw_sponsor + animation = war_attacker + } + lower_right_portrait = scope:target_character + + theme = faith + override_background = { + reference = armory + } + + immediate = { + scope:ghw_sponsor = { + save_scope_as = background_temple_scope + } + play_music_cue = "mx_cue_combat_2" + } + + option = { + name = great_holy_war.0050.a + } +} + +#On_declaration of the GHW. +great_holy_war.0051 = { + title = great_holy_war.0050.title + desc = { + first_valid = { + #Catholic Flavor - Attackers + triggered_desc = { + trigger = { + scope:attacker.faith.great_holy_war = { + has_pledged_attacker = root + } + scope:the_faith = faith:catholic + } + desc = great_holy_war.0051.catholic.attackers.desc + } + #Everybody else's flavor - Attackers. + triggered_desc = { + trigger = { + scope:attacker.faith.great_holy_war = { + has_pledged_attacker = root + } + NOT = { scope:the_faith = faith:catholic } + } + desc = great_holy_war.0051.generic.attackers.desc + } + #Everybody else's flavor - Defenders. + triggered_desc = { + trigger = { + scope:attacker.faith.great_holy_war = { + has_pledged_defender = root + } + } + desc = great_holy_war.0051.generic.defenders.desc + } + } + } + + theme = faith + override_background = { reference = temple } + + left_portrait = { + character = scope:ghw_sponsor + animation = war_attacker + } + lower_right_portrait = { + character = scope:ghw_defender + animation = war_defender + } + + immediate = { + show_as_tooltip = { + scope:attacker.faith.great_holy_war = { + divide_war_chest = { fraction = 0.2 } + } + } + play_music_cue = "mx_cue_combat_3" + } + + option = { + name = great_holy_war.0011.a + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + OR = { root.faith.religion = religion:eastern_orthodox_religion root.faith.religion = religion:catholic_religion root.faith.religion = religion:protestant_religion } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.b + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + root.faith.religion = religion:islam_religion + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.c + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + NOR = { + OR = { root.faith.religion = religion:eastern_orthodox_religion root.faith.religion = religion:catholic_religion root.faith.religion = religion:protestant_religion } + root.faith.religion = religion:islam_religion + } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.d + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } +} + +#On_declaration of the GHW. +great_holy_war.0071 = { + title = great_holy_war.0050.title + desc = { + first_valid = { + #Everybody else's flavor - Attackers. + triggered_desc = { + trigger = { + OR = { + faith = scope:attacker.faith + is_vassal_of = scope:attacker + } + } + desc = great_holy_war.0071.generic.attackers.desc + } + #Everybody else's flavor - Defenders. + triggered_desc = { + trigger = { + OR = { + faith = scope:defender.faith + is_vassal_of = scope:defender + } + } + desc = great_holy_war.0071.generic.defenders.desc + } + } + } + theme = faith + override_background = { + reference = armory + } + right_portrait = { + character = scope:ghw_sponsor + animation = war_attacker + } + left_portrait = { + character = scope:ghw_defender + animation = war_defender + } + + + option = { #Join directed GHW as attacker. + name = great_holy_war.0011.directed.a + trigger = { + is_ai = no + is_at_war = no + faith = scope:attacker.faith + NOR = { + this = scope:attacker + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + scope:attacker.faith.great_holy_war = { pledge_attacker = root } + } + + option = { #Join directed GHW as defender. + name = great_holy_war.0011.directed.b + trigger = { + is_ai = no + is_at_war = no + faith = scope:defender.faith + NOR = { + this = scope:defender + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + scope:attacker.faith.great_holy_war = { pledge_defender = root } + } + + option = { + name = great_holy_war.0011.a + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + OR = { root.faith.religion = religion:eastern_orthodox_religion root.faith.religion = religion:catholic_religion root.faith.religion = religion:protestant_religion } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.b + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + root.faith.religion = religion:islam_religion + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.c + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_attacker = root } + NOR = { + OR = { root.faith.religion = religion:eastern_orthodox_religion root.faith.religion = religion:catholic_religion root.faith.religion = religion:protestant_religion } + root.faith.religion = religion:islam_religion + } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0011.d + trigger = { + scope:attacker.faith.great_holy_war = { has_pledged_defender = root } + } + + custom_tooltip = great_holy_war.0051.generic.start.tt + } + option = { + name = great_holy_war.0050.a + trigger = { + scope:attacker.faith != root.faith + } + fallback = yes + + custom_tooltip = great_holy_war.0051.generic.start.tt + } +} + +#The Crusade was successful. +great_holy_war.0052 = { + title = { + first_valid = { #Title for winners/bystanders + triggered_desc = { + trigger = { + scope:ghw_defender.faith.religion != root.faith.religion + } + desc = great_holy_war.0052.title.winners + } + } + first_valid = { #Title for losers + triggered_desc = { + trigger = { scope:ghw_defender.faith.religion = root.faith.religion } + desc = great_holy_war.0052.title.losers + } + } + } + desc = { + first_valid = { + #Everybody else's flavor - Attackers. + triggered_desc = { + trigger = { scope:attacker.faith = root.faith } + desc = great_holy_war.0052.generic.attackers.desc + } + #Everybody else's flavor - Defenders. + triggered_desc = { + trigger = { scope:ghw_defender.faith.religion = root.faith.religion } + desc = great_holy_war.0052.generic.defenders.desc + } + #Other players. + triggered_desc = { + trigger = { + NOR = { + scope:attacker.faith = root.faith + scope:ghw_defender.faith.religion = root.faith.religion + } + } + desc = great_holy_war.0052.generic.outsiders.desc + } + } + } + theme = faith + override_background = { + reference = battlefield + } + left_portrait = { + character = scope:title_recipient + animation = war_over_win + } + right_portrait = { + character = scope:ghw_defender + animation = shame + } + + immediate = { + play_music_cue = "mx_cue_general_crusade_event_3" + if = { + limit = { + has_trait = faith_warrior + save_temporary_scope_as = char_temp + scope:attacker.faith.great_holy_war = { + any_pledged_attacker = { this = scope:char_temp } + } + } + absolve_crusaders_of_gallowsbait_effect = yes + } + } + + option = { + name = great_holy_war.0052.a + trigger = { scope:attacker.faith = root.faith } + } + + option = { + name = great_holy_war.0052.b + trigger = { scope:ghw_defender.faith = root.faith } + } + + option = { + name = great_holy_war.0052.c + trigger = { + NOR = { + scope:attacker.faith = root.faith + scope:ghw_defender.faith = root.faith + } + } + } + + after = { remove_variable = ghw_war_chest_donated_sum } +} + +#The Crusade failed. +great_holy_war.0053 = { + title = great_holy_war.0053.title + desc = { + first_valid = { + #Everybody else's flavor - Attackers. + triggered_desc = { + trigger = { scope:attacker.faith = root.faith } + desc = great_holy_war.0053.generic.attackers.desc + } + #Everybody else's flavor - Defenders. + triggered_desc = { + trigger = { scope:ghw_defender.faith.religion = root.faith.religion } + desc = great_holy_war.0053.generic.defenders.desc + } + #Other players. + triggered_desc = { + trigger = { + NOR = { + scope:attacker.faith = root.faith + scope:ghw_defender.faith.religion = root.faith.religion + } + } + desc = great_holy_war.0053.generic.outsiders.desc + } + } + } + theme = faith + override_background = { + reference = battlefield + } + left_portrait = { + character = scope:ghw_sponsor + animation = shame + } + right_portrait = { + character = scope:ghw_defender + animation = war_over_win + } + + immediate = { + play_music_cue = "mx_cue_general_crusade_event_3" + } + + option = { + name = great_holy_war.0053.a + trigger = { scope:attacker.faith = root.faith } + } + + option = { + name = great_holy_war.0053.b + trigger = { scope:ghw_defender.faith.religion = root.faith.religion } + } + + option = { + name = great_holy_war.0052.c + trigger = { + NOR = { + scope:attacker.faith = root.faith + scope:ghw_defender.faith.religion = root.faith.religion + } + } + } + + after = { remove_variable = ghw_war_chest_donated_sum } +} + +#on_great_holy_war_invalidation: Crusade has been invalidated before starting. +great_holy_war.0055 = { + hidden = yes + scope = ghw + + immediate = { + save_scope_as = the_ghw + + #Loc keys for localisation fluff. + ghw_target_character = { save_scope_as = ghw_defender } + faith = { + religious_head = { save_scope_as = ghw_sponsor } + save_scope_as = the_faith + change_fervor = { + value = -10 + desc = fervor_loss_crusade_invalid + } + set_variable = { + name = variable_ghw_cooldown + value = yes + years = 30 + } + } + every_player = { + limit = { + OR = { + faith = scope:ghw_sponsor.faith + faith = scope:ghw_defender.faith + } + } + trigger_event = great_holy_war.0056 + } + } +} + +great_holy_war.0056 = { + title = great_holy_war.0056.title + desc = great_holy_war.0056.desc + theme = faith + override_background = { + reference = battlefield + } + right_portrait = { + character = scope:ghw_sponsor + animation = shame + } + left_portrait = { + character = scope:ghw_defender + animation = war_over_win + } + + + option = { + name = great_holy_war.0056.a + trigger = { scope:ghw_sponsor.faith = root.faith } + + if = { + limit = { has_variable = ghw_war_chest_donated_sum } + add_gold = var:ghw_war_chest_donated_sum + remove_variable = ghw_war_chest_donated_sum + } + } + + option = { + name = great_holy_war.0056.b + trigger = { scope:ghw_defender.faith = root.faith } + } + option = { + name = great_holy_war.0056.c + trigger = { + NOR = { + scope:ghw_sponsor.faith = root.faith + scope:ghw_defender.faith = root.faith + } + } + } +} + +#Crusader trait gained during GHW. +#Fired on_army_enter_province +#Hidden first event fires for the owner of the army. +#root = owner of the army +#scope:army = the army itself. +great_holy_war.0060 = { + hidden = yes + + trigger = { + exists = root.faith.great_holy_war + OR = { #Either army owner or one of his lieges is involved in a GHW. + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_attacker = root + } + any_liege_or_above = { + faith = root.faith + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_attacker = root + } + } + } + scope:army = { + exists = army_commander + location = { save_temporary_scope_as = current_location } + army_commander = { + NOR = { + has_trait = crusader_king + has_trait = faith_warrior + } + } + } + root.faith.great_holy_war.ghw_target_title = { #The dejure Kingdom targeted by the GHW + any_in_de_jure_hierarchy = { + tier = tier_barony + title_province = { this = scope:current_location } #Any province within it. + holder ?= { #The province's owner must also be part of the GHW on the opposite side. + OR = { + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_defender = prev + } + any_liege_or_above = { + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_defender = prev + } + } + } + } + } + } + } + + immediate = { + scope:army.location = { save_scope_as = current_location } + faith = { save_scope_as = the_faith } + faith.great_holy_war = { save_scope_as = scoped_ghw } + faith.great_holy_war.ghw_target_title = { save_scope_as = target_kingdom } + scope:army = { + army_commander = { trigger_event = great_holy_war.0057 } + army_owner = { + every_knight = { + limit = { + location = scope:current_location + } + trigger_event = great_holy_war.0057 + } + } + } + } +} + +great_holy_war.0057 = { + title = great_holy_war.0057.title + desc = { + first_valid = { + triggered_desc = { #Crusaders + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + desc = great_holy_war.0057.crusader.desc + } + triggered_desc = { #Muslims + trigger = { faith.religion = religion:islam_religion } + desc = great_holy_war.0057.mujahid.desc + } + triggered_desc = { #Everybody else + trigger = { + NOR = { + OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } + faith.religion = religion:islam_religion + } + } + desc = great_holy_war.0057.generic.outsiders.desc + } + } + } + theme = faith + override_background = { + reference = wilderness_scope + } + left_portrait = { + character = root + animation = marshal_shield + } + + trigger = { + root.faith = scope:the_faith + exists = faith.great_holy_war + NOR = { + has_trait = crusader_king + has_trait = faith_warrior + } + OR = { + is_commanding_army = yes + is_knight = yes + } + } + + immediate = { + location = { save_scope_as = background_wilderness_scope } + } + + option = { + name = great_holy_war.0057.a + add_trait = faith_warrior + hidden_effect = { #Punish player sneakery. + trigger_event = { + id = great_holy_war.0058 + days = { 15 60 } + } + } + } +} + +#Character is no longer in the Holy Land fighting infidels, not even a few weeks after getting the trait! +great_holy_war.0058 = { + title = great_holy_war.0058.title + desc = great_holy_war.0058.base.desc + theme = faith + left_portrait = { + character = root + animation = shame + } + + trigger = { + exists = faith.great_holy_war #GHW must still be ongoing. + has_trait = faith_warrior + is_commanding_army = no #Should have stayed in command. + is_knight = no + is_imprisoned = no #Don't penalise captured faith_warriors. + NOR = { + has_trait = incapable + has_trait_with_flag = debilitating_illness + } + OR = { #Character or liege must still be at war, obviously. + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_attacker = root + } + any_liege_or_above = { + faith = root.faith + any_character_war = { + OR = { + using_cb = undirected_great_holy_war + using_cb = directed_great_holy_war + } + is_attacker = root + } + } + } + } + + + option = { + name = great_holy_war.0058.a + if = { + limit = { is_ai = no } #Punish player more. + add_piety = major_piety_loss + } + if = { + limit = { has_trait = faith_warrior } + remove_trait = faith_warrior + } + } +} + +#on_character_faith_change: check if the character has changed Religion, in which case the Crusader trait should be cleared. +great_holy_war.0059 = { + hidden = yes + scope = character + + trigger = { + OR = { + has_trait = crusader_king + has_trait = faith_warrior + } + } + + immediate = { + if = { + limit = { + has_trait = crusader_king + } + remove_trait = crusader_king + } + else_if = { + limit = { + has_trait = faith_warrior + } + remove_trait = faith_warrior + } + } +} + +#great_holy_war.0060 Taken for hidden event. + + +#Event firing for all existing Beneficiaries on_victory to give proper modifiers to their dynasty/House. +great_holy_war.0061 = { + hidden = yes + scope = character + + trigger = { + is_alive = yes + is_landed = yes #Must have received land in the Crusade. + } + + immediate = { + save_scope_as = scoped_beneficiary + dynasty = { + add_dynasty_modifier = { + modifier = dynasty_beneficiary_won_ghw + years = 30 + } + every_dynasty_member = { + limit = { is_ai = no } + send_interface_message = { + type = event_great_holy_war_good_message + title = great_holy_war.0061.title + desc = great_holy_war.0061.notification + left_icon = scope:scoped_beneficiary.primary_title + right_icon = scope:scoped_beneficiary + } + } + } + if = { + limit = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + house = { + add_house_modifier = { + modifier = house_beneficiary_won_ghw_crusade + years = 30 + } + } + } + else_if = { + limit = { faith.religion = religion:islam_religion } + house = { + add_house_modifier = { + modifier = house_beneficiary_won_ghw_jihad + years = 30 + } + } + } + else = { + house = { + add_house_modifier = { + modifier = house_beneficiary_won_ghw + years = 30 + } + } + } + # Plus if we're gallowsbait, remove most/all of it — accounting for some weirdnesses from laamps. + if = { + limit = { + NOR = { + has_trait = crusader_king + save_temporary_scope_as = char_temp + scope:attacker.faith.great_holy_war = { + any_pledged_attacker = { this = scope:char_temp } + } + } + } + absolve_crusaders_of_gallowsbait_effect = yes + } + } +} + +great_holy_war.0070 = { + title = great_holy_war.0070.title + desc = great_holy_war.0070.base.desc + theme = faith + override_background = { + reference = throne_room_scope + } + + left_portrait = { + character = scope:title_recipient + animation = ecstasy + } + + trigger = { is_ai = no } + + immediate = { + scope:title_recipient = { + save_scope_as = background_throne_room_scope + } + } + + option = { + name = great_holy_war.0070.a + set_player_character = scope:title_recipient + } + option = { name = great_holy_war.0070.b } +} + +#0071 taken for directed GHW notification. + +#on_death: of ghw_sponsor, pick a new one immediately. +great_holy_war.0080 = { + hidden = yes + scope = character + + trigger = { + exists = faith.great_holy_war + root = faith.great_holy_war.ghw_war_declarer + } + + immediate = { + faith = { + save_scope_as = the_faith + ghw_set_new_war_declarer_effect = yes + } + } +} + +#Player redirected GHW during preparation phase. (old defenders) +great_holy_war.0081 = { + title = great_holy_war.0081.title + desc = great_holy_war.0081.desc + theme = faith + right_portrait = { + character = scope:actor + animation = scheme + } + left_portrait = scope:second_recipient + lower_left_portrait = scope:recipient + + + option = { name = great_holy_war.0081.a } +} + +#Player redirected GHW during preparation phase. (new defenders) +great_holy_war.0082 = { + title = great_holy_war.0081.title + desc = great_holy_war.0082.desc + theme = faith + right_portrait = { + character = scope:actor + animation = scheme + } + left_portrait = scope:second_recipient + lower_left_portrait = scope:recipient + + option = { name = great_holy_war.0082.a } +} + +#On_death event to reset GHW fallback recipient. +great_holy_war.0083 = { + hidden = yes + + trigger = { + exists = faith.great_holy_war + has_character_flag = flag_is_ghw_fallback_recipient + } + + immediate = { + faith.great_holy_war = { remove_variable = var_fallback_recipient } + if = { + limit = { exists = faith.great_holy_war.ghw_war_declarer.capital_province } + faith.great_holy_war.ghw_war_declarer = { save_scope_as = fallback_host } + } + else_if = { + limit = { + NOT = { exists = faith.great_holy_war.ghw_war_declarer.capital_province } + } + random_ruler = { + limit = { + is_landed = yes + faith = root.faith + highest_held_title_tier > 1 + } + save_scope_as = fallback_host + } + } + #Generate a fallback recipient. + create_character = { + location = scope:fallback_host.capital_province + template = new_commander_character + faith = root.faith + culture = root.culture + save_scope_as = fallback_recipient + gender_female_chance = { + if = { + limit = { + root.faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + root.faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { add = 50 } + } + } + scope:fallback_recipient = { + add_character_flag = flag_is_ghw_fallback_recipient + } + root.faith.great_holy_war = { + set_variable = { + name = var_fallback_recipient + value = scope:fallback_recipient + } + } + } +} + +#On_faith_conversion event to reset GHW fallback recipient. +great_holy_war.0084 = { + hidden = yes + + trigger = { + exists = scope:old_faith.great_holy_war + has_character_flag = flag_is_ghw_fallback_recipient + } + + immediate = { + scope:old_faith.great_holy_war = { remove_variable = var_fallback_recipient } + if = { + limit = { exists = scope:old_faith.great_holy_war.ghw_war_declarer.capital_province } + scope:old_faith.great_holy_war.ghw_war_declarer = { save_scope_as = fallback_host } + } + else_if = { + limit = { + NOT = { exists = scope:old_faith.great_holy_war.ghw_war_declarer.capital_province } + } + scope:old_faith = { + random_faith_ruler = { + limit = { + is_landed = yes + highest_held_title_tier > tier_barony + } + save_scope_as = fallback_host + } + } + + } + #Generate a fallback recipient. + create_character = { + location = scope:fallback_host.capital_province + template = new_commander_character + faith = scope:old_faith + culture = root.culture + save_scope_as = fallback_recipient + gender_female_chance = { + if = { + limit = { + root.faith = { has_doctrine = doctrine_gender_male_dominated } + } + add = 0 + } + else_if = { + limit = { + root.faith = { has_doctrine = doctrine_gender_female_dominated } + } + add = 100 + } + else = { add = 50 } + } + } + scope:fallback_recipient = { add_character_flag = flag_is_ghw_fallback_recipient } + scope:old_faith.great_holy_war = { + set_variable = { + name = var_fallback_recipient + value = scope:fallback_recipient + } + } + } +} + +#On_faith_conversion: clear all vassals of the old faith who may be pledged to a GHW. +great_holy_war.0085 = { + hidden = yes + + trigger = { + exists = scope:old_faith.great_holy_war + NOT = { exists = scope:old_faith.great_holy_war.ghw_war } + any_vassal = { + faith = scope:old_faith + faith.great_holy_war = { has_pledged_attacker = prev } + } + } + + immediate = { + save_scope_as = converter + every_vassal = { + limit = { + faith = scope:old_faith + faith.great_holy_war = { has_pledged_attacker = prev } + } + send_interface_toast = { + type = event_toast_effect_bad + right_icon = this + left_icon = scope:converter + title = great_holy_war.0085.toast + faith.great_holy_war = { + unpledge_attacker = prev + unpledge_ghw_war_chest_prestige_effect = yes + unpledge_ghw_war_chest_piety_effect = yes + } + } + } + } +} diff --git a/N3OW/events/religion_events/head_of_faith_events.txt b/N3OW/events/religion_events/head_of_faith_events.txt new file mode 100644 index 00000000..09eb6509 --- /dev/null +++ b/N3OW/events/religion_events/head_of_faith_events.txt @@ -0,0 +1,756 @@ +namespace = head_of_faith + +################################################## +# #Islamic Caliphate Configuration +# 0001 - 0010 Heirs of the Prophet - Sunnis decide which caliph they consider most appropriate. +# 0011 - 0020 Heirs of the Prophet - Shias decide which caliph they consider most appropriate. +# 0021 - 0030 Heirs of the Prophet - Muhakkimas decide which caliph they consider most appropriate. +# 0031 - 0040 Heirs of the Prophet - Zandaqas decide which caliph they consider most appropriate. +# +################################################## + + + + + + + + + + +################################################## +# ISLAMIC CALIPHATE CONFIGURATION + +scripted_trigger valid_prior_caliph_available_trigger = { + faith = { has_doctrine = muhammad_succession_$MS_TYPE$_doctrine } + scope:old_faith = { + # Uses a temporal faith... + has_doctrine = doctrine_temporal_head + # ... with a current holder... + exists = religious_head_title.holder + # ... that follows the correct succession of the Prophet. + has_doctrine = muhammad_succession_$MS_TYPE$_doctrine + # Plus make sure this isn't either of the major orthodoxies. + religious_head_title = { + NOR = { + this = title:d_sunni + this = title:d_shiite + } + } + } +} + +scripted_effect grab_existing_caliph_effect = { + if = { + limit = { exists = $TITLE_PATH$.holder } + $TITLE_PATH$ = { save_scope_as = $DENOMINATION$_title } + $TITLE_PATH$.holder = { save_scope_as = $DENOMINATION$_caliph } + } +} + +scripted_effect set_default_caliph_effect = { + faith = { + # Default to scope:old_title, if it exists. + if = { + limit = { exists = scope:old_title } + set_religious_head_title = scope:old_title + } + # Otherwise, try to pick the correct orthodoxy. + else_if = { + limit = { + has_doctrine = muhammad_succession_sunni_doctrine + exists = scope:sunni_title + } + set_religious_head_title = scope:sunni_title + } + else_if = { + limit = { + has_doctrine = muhammad_succession_shia_doctrine + exists = scope:shia_title + } + set_religious_head_title = scope:shia_title + } + } +} + +scripted_effect set_religious_head_title_to_and_gain_hook_effect = { + # First, we set the new religious head. + faith = { set_religious_head_title = $NEW_RELIGIOUS_HEAD_TITLE$ } + # Next, if possible, we give a hook on the new religious head. + if = { + limit = { + NOT = { has_hook = $NEW_RELIGIOUS_HEAD_TITLE$.holder } + } + $NEW_RELIGIOUS_HEAD_TITLE$.holder = { + send_interface_toast = { + title = head_of_faith.0000.new_faith_submitted_for_hook + left_icon = root + root = { + add_hook = { + type = indebted_hook + target = $NEW_RELIGIOUS_HEAD_TITLE$.holder + } + } + } + } + } + # And always give a little opinion of them. + reverse_add_opinion = { + target = $NEW_RELIGIOUS_HEAD_TITLE$.holder + modifier = repentant_opinion + opinion = 25 + } +} + +scripted_effect set_religious_head_title_to_and_give_hook_effect = { + # First, we set the new religious head. + faith = { set_religious_head_title = $NEW_RELIGIOUS_HEAD_TITLE$ } + # Next, if possible, we give a hook on the new religious head. + if = { + limit = { + NOT = { has_hook = $NEW_RELIGIOUS_HEAD_TITLE$.holder } + } + $NEW_RELIGIOUS_HEAD_TITLE$.holder = { + send_interface_toast = { + title = head_of_faith.0000.new_faith_submitted_for_hook + left_icon = prev + add_hook = { + type = indebted_hook + target = prev + } + } + } + } + # And always give a little opinion of them. + reverse_add_opinion = { + target = $NEW_RELIGIOUS_HEAD_TITLE$.holder + modifier = repentant_opinion + opinion = 25 + } +} + + +scripted_effect set_religious_head_title_to_&_gain_flag_effect = { + # First, we set the new religious head. + faith = { set_religious_head_title = $NEW_RELIGIOUS_HEAD_TITLE$ } + # Next, some piety. + add_piety = major_piety_gain + # Plus, we flag it that this character will likely try for independence later. + add_character_flag = wishes_to_schism_caliphate_flag + custom_tooltip = head_of_faith.0000.wishes_to_schism_caliphate_flag_added + # And always give a little opinion of them. + reverse_add_opinion = { + target = $NEW_RELIGIOUS_HEAD_TITLE$.holder + modifier = repentant_opinion + opinion = 25 + } +} + +################################################## +# Heirs of the Prophet - Sunni +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# A temporal Sunni reformer decides their HoF. +head_of_faith.0001 = { + type = character_event + title = head_of_faith.0001.t + desc = head_of_faith.0001.desc + theme = faith + left_portrait = { + character = root + animation = personality_rational + } + lower_left_portrait = scope:sunni_caliph + lower_center_portrait = { + character = scope:old_caliph + trigger = { + valid_prior_caliph_available_trigger = { MS_TYPE = sunni } + } + } + + cooldown = { years = 10 } + + trigger = { + # Requires either a prior caliphate or a Shia one to exist. + OR = { + exists = title:d_sunni.holder + AND = { + exists = scope:old_faith.religious_head_title.holder + valid_prior_caliph_available_trigger = { MS_TYPE = sunni } + } + } + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + # Grab caliphs. + grab_existing_caliph_effect = { + TITLE_PATH = title:d_sunni + DENOMINATION = sunni + } + grab_existing_caliph_effect = { + TITLE_PATH = scope:old_faith.religious_head_title + DENOMINATION = old + } + # And sort defaults. + set_default_caliph_effect = yes + } + + # Realign with Sunni orthodoxy. + option = { + name = head_of_faith.0001.a + trigger = { exists = scope:sunni_caliph } + + # Set up the new HoF. + set_religious_head_title_to_and_gain_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:sunni_title } + + # No stress for faith-guiding. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:sunni_caliph + multiplier = 5 + } + } + } + + # Follow scope:old_faith's caliph. + option = { + name = head_of_faith.0001.b + trigger = { + exists = scope:old_caliph + valid_prior_caliph_available_trigger = { MS_TYPE = sunni } + } + + # Set up the new HoF. + set_religious_head_title_to_and_gain_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:old_title } + + # No stress for faith-guiding. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = 5 + } + } + } + + # Scope:sunni_caliph has our _present_ loyalties. + option = { + name = head_of_faith.0001.c + trigger = { exists = scope:sunni_caliph } + + # Set up the new HoF. + set_religious_head_title_to_&_gain_flag_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:sunni_title } + + # No stress for faith-guiding. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_zeal = 1 + } + opinion_modifier = { + opinion_target = scope:sunni_caliph + multiplier = -2 + } + } + + } + + # We shall follow scope:old_faith... for now... + option = { + name = head_of_faith.0001.d + trigger = { + exists = scope:old_caliph + valid_prior_caliph_available_trigger = { MS_TYPE = sunni } + } + + # Set up the new HoF. + set_religious_head_title_to_&_gain_flag_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:old_title } + + # No stress for faith-guiding. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_zeal = 1 + } + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = -2 + } + } + } + + # No option for striking out on your own immediately; you have a decision for that, or could've taken a different succession doctrine. +} + +################################################## +# Heirs of the Prophet - Shia +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# A temporal Shia reformer decides their HoF. +head_of_faith.0011 = { + type = character_event + title = head_of_faith.0011.t + desc = head_of_faith.0011.desc + theme = faith + left_portrait = { + character = root + animation = personality_rational + } + lower_center_portrait = { + character = scope:old_caliph + trigger = { + valid_prior_caliph_available_trigger = { MS_TYPE = shia } + } + } + lower_right_portrait = scope:shia_caliph + + cooldown = { years = 10 } + + trigger = { + # Requires either a prior caliphate or a Shia one to exist. + OR = { + exists = title:d_shiite.holder + AND = { + exists = scope:old_faith.religious_head_title.holder + valid_prior_caliph_available_trigger = { MS_TYPE = shia } + } + } + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + # Grab caliphs. + grab_existing_caliph_effect = { + TITLE_PATH = title:d_shiite + DENOMINATION = shia + } + grab_existing_caliph_effect = { + TITLE_PATH = scope:old_faith.religious_head_title + DENOMINATION = old + } + # And sort defaults. + set_default_caliph_effect = yes + } + + # Realign with Shia orthodoxy. + option = { + name = head_of_faith.0011.a + trigger = { exists = scope:shia_caliph } + + # Set up the new HoF. + set_religious_head_title_to_and_gain_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:shia_title } + + # No stress for faith-guiding. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:shia_caliph + multiplier = 5 + } + } + } + + # Follow scope:old_faith's caliph. + option = { + name = head_of_faith.0011.c + trigger = { + exists = scope:old_caliph + valid_prior_caliph_available_trigger = { MS_TYPE = shia } + } + + # Set up the new HoF. + set_religious_head_title_to_and_gain_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:old_title } + + # No stress for faith-guiding. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = 5 + } + } + } + + # Scope:shia_caliph has our _present_ loyalties. + option = { + name = head_of_faith.0011.b + trigger = { exists = scope:shia_caliph } + + # Set up the new HoF. + set_religious_head_title_to_&_gain_flag_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:shia_title } + + # No stress for faith-guiding. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_zeal = 1 + } + opinion_modifier = { + opinion_target = scope:shia_caliph + multiplier = -2 + } + } + } + + # We shall follow scope:old_faith... for now... + option = { + name = head_of_faith.0011.d + trigger = { + exists = scope:old_caliph + valid_prior_caliph_available_trigger = { MS_TYPE = shia } + } + + # Set up the new HoF. + set_religious_head_title_to_&_gain_flag_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:old_title } + + # No stress for faith-guiding. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_zeal = 1 + } + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = -2 + } + } + } + + # No option for striking out on your own immediately; you have a decision for that, or could've taken a different succession doctrine. +} + +################################################## +# Heirs of the Prophet - Muhakkima +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## + +# A temporal Muhakkima reformer decides their HoF. +head_of_faith.0021 = { + type = character_event + title = head_of_faith.0021.t + desc = head_of_faith.0021.desc + theme = faith + left_portrait = { + character = root + animation = personality_rational + } + lower_center_portrait = { + character = scope:old_caliph + trigger = { + valid_prior_caliph_available_trigger = { MS_TYPE = muhakkima } + } + } + + cooldown = { years = 10 } + + trigger = { + # Requires an old religious head to exist in some form. + exists = scope:old_faith.religious_head_title.holder + valid_prior_caliph_available_trigger = { MS_TYPE = muhakkima } + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + # Grab the relevant caliph. + grab_existing_caliph_effect = { + TITLE_PATH = scope:old_faith.religious_head_title + DENOMINATION = old + } + # And sort defaults. + set_default_caliph_effect = yes + } + + # Go our own way. + option = { + name = head_of_faith.0021.a + + # Another splinter faith enters the ring. + faith = { remove_religious_head_title = yes } + # Nice chunk of piety for asserting your independence. + add_piety = major_piety_gain + + # No stress for faith-guiding. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = -2 + } + } + } + + # Follow scope:old_faith's caliph. + option = { + name = head_of_faith.0021.b + + # Set up the new HoF. + set_religious_head_title_to_and_gain_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:old_title } + + # No stress for faith-guiding. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = 5 + } + } + } +} + +################################################## +# Heirs of the Prophet - Zandaqa +# by Ewan Cowhig Croft +# 0001 - 0010 +################################################## +scripted_effect decide_if_worthy_of_consideration_for_new_hof_effect = { + if = { + limit = { faith = { has_doctrine = muhammad_succession_zandaqa_doctrine } } # Check if Zandaqa (in case this gets expanded in the future for outside the Zandaqa) + + if = { + limit = { has_strong_hook = scope:pledge_target } + use_hook = scope:pledge_target + set_religious_head_title_to_and_give_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:pledge_target.faith.religious_head_title } + } + else = { + show_as_tooltip = { + random_list = { + 100 = { # You get Rejected + show_chance = no + desc = head_of_faith.0031.b.rejection + custom_tooltip = head_of_faith.0031.rejection.outcome + faith = { remove_religious_head_title = yes } + } + 100 = { # Set up the new HoF. + show_chance = no + desc = head_of_faith.0031.b.acceptance + set_religious_head_title_to_and_give_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:pledge_target.faith.religious_head_title } + } + } + } + } + + if = { + limit = { is_developer_testing_trigger = yes } + custom_tooltip = debug_generic_option_shortened_trigger_can_disable # Actually the opposite + scope:pledge_target = { + trigger_event = { + id = head_of_faith.0032 + days = 2 + } + } + } + else = { scope:pledge_target = { trigger_event = head_of_faith.0032 } } + } + else = { set_religious_head_title_to_and_give_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:pledge_target.faith.religious_head_title } } +} + +# A temporal Zandaqa reformer decides their HoF. +head_of_faith.0031 = { + type = character_event + title = head_of_faith.0031.t + desc = head_of_faith.0031.desc + theme = faith + left_portrait = { + character = root + animation = personality_rational + } + lower_left_portrait = scope:sunni_caliph + lower_center_portrait = { + character = scope:old_caliph + trigger = { + valid_prior_caliph_available_trigger = { MS_TYPE = zandaqa } + } + } + lower_right_portrait = scope:shia_caliph + + cooldown = { years = 10 } + + trigger = { + # Requires any one caliphate to be around. + OR = { + exists = title:d_sunni.holder + exists = title:d_shiite.holder + AND = { + exists = scope:old_faith.religious_head_title.holder + valid_prior_caliph_available_trigger = { MS_TYPE = zandaqa } + } + } + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + # Grab caliphs. + grab_existing_caliph_effect = { + TITLE_PATH = title:d_sunni + DENOMINATION = sunni + } + grab_existing_caliph_effect = { + TITLE_PATH = title:d_shiite + DENOMINATION = shia + } + grab_existing_caliph_effect = { + TITLE_PATH = scope:old_faith.religious_head_title + DENOMINATION = old + } + # And sort defaults. + set_default_caliph_effect = yes + + save_scope_as = pledgeing_individual + } + + # Go our own way. + option = { + name = head_of_faith.0031.a + + # Another splinter faith enters the ring. + faith = { remove_religious_head_title = yes } + # Nice chunk of piety for asserting your independence. + add_piety = major_piety_gain + + # No stress for faith-guiding. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 1 + ai_vengefulness = 0.5 + } + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = -2 + } + } + } + + # Realign with Sunni orthodoxy. + option = { + name = head_of_faith.0031.b + trigger = { exists = scope:sunni_caliph } + + scope:sunni_caliph = { save_scope_as = pledge_target } + decide_if_worthy_of_consideration_for_new_hof_effect = yes + + # No stress for faith-guiding. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:sunni_caliph + multiplier = 5 + } + } + } + + # Realign with Shia orthodoxy. + option = { + name = head_of_faith.0031.c + trigger = { exists = scope:shia_caliph } + + scope:shia_caliph = { save_scope_as = pledge_target } + decide_if_worthy_of_consideration_for_new_hof_effect = yes + + # No stress for faith-guiding. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:shia_caliph + multiplier = 5 + } + } + } + + # Follow scope:old_faith's caliph. + option = { + name = head_of_faith.0031.d + trigger = { + exists = scope:old_caliph + valid_prior_caliph_available_trigger = { MS_TYPE = zandaqa } + } + + scope:old_caliph = { save_scope_as = pledge_target } + decide_if_worthy_of_consideration_for_new_hof_effect = yes + + # No stress for faith-guiding. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = 5 + } + } + } +} + +head_of_faith.0032 = { + type = letter_event + sender = scope:pledgeing_individual + opening = head_of_faith.0032.t + desc = head_of_faith.0032.desc + + option = { # Yes, I will be your head + name = head_of_faith.0032.a + add_piety = medium_piety_gain + + scope:pledgeing_individual = { + send_interface_message = { + type = event_religious_good + title = head_of_faith.0032.notif.a + right_icon = scope:pledge_target + + set_religious_head_title_to_and_give_hook_effect = { NEW_RELIGIOUS_HEAD_TITLE = scope:pledge_target.faith.religious_head_title } + } + } + + ai_chance = { # This should be a rare outcome (HOFs are usually more zealous than rational, so it should help balance it) + base = 100 + ai_value_modifier = { + ai_compassion = 0.05 + ai_greed = 0.1 + ai_rationality = 0.5 # Rational HOFs wish to expand their influence + ai_sociability = 0.05 + ai_zeal = -0.5 # Faithful HOFs dislike the Zandaqa + } + opinion_modifier = { # Opinion plays into it (no need to check with friendship, since you *should* have good op of your friends. Otherwise they are not really your friends!) + who = root + opinion_target = scope:pledgeing_individual + multiplier = 0.2 + } + } + } + + option = { # No, go away I don't want to be your hof + name = head_of_faith.0032.b + add_piety = medium_piety_loss + + trigger = { NOT = { scope:pledgeing_individual = { has_strong_hook = scope:pledge_target } } } + show_as_unavailable = { always = yes } + + + scope:pledgeing_individual = { + send_interface_message = { + type = event_religious_bad + title = head_of_faith.0032.notif.b + right_icon = scope:pledge_target + + faith = { remove_religious_head_title = yes } + } + } + + ai_chance = { base = 100 } + } +} diff --git a/N3OW/events/religion_events/heresy_events.txt b/N3OW/events/religion_events/heresy_events.txt new file mode 100644 index 00000000..34b1edce --- /dev/null +++ b/N3OW/events/religion_events/heresy_events.txt @@ -0,0 +1,1355 @@ +namespace = heresy + +################################## +# Heresy Outbreak (Non-Eastern) # +# by Sean Hughes # +# 0001 - 0004 # +################################## + +scripted_trigger nearby_county_of_faith = { + any_in_list = { + list = neaby_same_religion_counties + faith = prev + } +} + +heresy.0001 = { + hidden = yes + scope = faith + + trigger = { + OR = { + NOT = { has_doctrine = eastern_hostility_doctrine } + has_doctrine = heresy_hostility_doctrine #Zoroastrians also get heresies, despite being Eastern. + } + } + + immediate = { + #Look for a valid Duke of this Faith to be our heresiarch. + random_faith_ruler = { + #Prefer Dukes with only 1 or 2 Duchies. + limit = { + is_valid_heresiarch = yes + highest_held_title_tier = tier_duchy + any_held_title = { + title_tier = duchy + count < 3 #Limit the influence of Mega-Dukes + is_landless_type_title = no + is_noble_family_title = no + } + } + #Then accept any valid Duke. + alternative_limit = { + is_valid_heresiarch = yes + highest_held_title_tier = tier_duchy + } + #If no Dukes exist, accept a Count. + alternative_limit = { + is_valid_heresiarch = yes + } + + weight = { + base = 100 + + modifier = { + add = 100 + is_powerful_vassal = yes + } + modifier = { + add = 75 + top_liege = this + } + modifier = { + add = 50 + is_a_faction_member = yes + } + + modifier = { + factor = 10 + has_game_rule = strict_regional_heresy + trigger_if = { + limit = { + faith = faith:catholic + } + capital_county = { + title_province = { + OR = { + geographical_region = world_europe_west_britannia # Lollard + geographical_region = world_europe_west_francia # Cathar + geographical_region = world_europe_south_italy # Walddensian + } + } + } + } + trigger_if = { + limit = { + faith = faith:orthodox + } + capital_county = { + title_province = { + OR = { + geographical_region = world_asia_minor # Paulician + geographical_region = custom_k_thessalonika # Iconoclast + geographical_region = world_europe_south_east # Bogomils + } + } + } + } + } + } + + save_scope_as = heretic_ruler + primary_title = { + save_scope_as = heretic_title + } + capital_county = { + save_scope_as = heretic_capital + } + } + + + #Once we have a heresiarch, look for a valid heretical faith to them to convert to. + if = { + limit = { + exists = scope:heretic_ruler + } + + #Save a list of provinces in our religion group (we will be reusing this a lot for distance checks). + every_province = { + limit = { + is_county_capital = yes + faith.religion = root.religion + squared_distance = { + target = scope:heretic_capital + value < squared_distance_medium + } + } + add_to_list = neaby_same_religion_counties + } + + # Compile a list of possible heresies to convert to. + religion = { + every_faith = { + limit = { + NOT = { invalid_for_heresy_events = yes } + } + add_to_list = potential_heresies + } + if = { + # Abrahamics also get bonus dualistic heresies + limit = { + is_in_family = rf_abrahamic + } + if = { + limit = { + this = religion:christianity_religion + } + faith:mandeaism = { + add_to_list = potential_heresies + } + faith:priscillianism = { + add_to_list = potential_heresies + } + faith:cainitism = { + add_to_list = potential_heresies + } + + } + else_if = { + limit = { + this = religion:islam_religion + } + faith:manichean = { + add_to_list = potential_heresies + } + faith:sabianism = { + add_to_list = potential_heresies + } + faith:valentinianism = { + add_to_list = potential_heresies + } + } + else_if = { + limit = { + this = religion:judaism_religion + } + faith:conversos = { + add_to_list = potential_heresies + } + faith:sethianism = { + add_to_list = potential_heresies + } + } + } + } + + #We want to pick certain faiths to be our heresy over others, assuming they are valid. + random_in_list = { + list = potential_heresies + + #Priority 1: Any nearby player-created faith. + limit = { + has_variable = player_created_faith + num_county_followers > 0 + is_valid_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + nearby_county_of_faith = yes + } + # Priority 2: Any nearby 'preferred heresy' faith. + alternative_limit = { + num_county_followers > 0 + is_preferred_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + nearby_county_of_faith = yes + } + # Priority 2.5: For the 'strict' game rule, only use preferred heresies. + alternative_limit = { + has_game_rule = strict_regional_heresy + is_preferred_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + } + # Priority 3: Any valid faith. + alternative_limit = { + is_valid_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + } + # Priority 4: Any faith. + alternative_limit = { + always = yes + } + + weight = { + base = 50 + + # Preferred heresies get another bonus. + modifier = { + factor = 5 + is_preferred_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + } + # More likely to pick Faiths that don't currently exist. + modifier = { + factor = 3 + num_county_followers = 0 + } + modifier = { + has_game_rule = strict_regional_heresy + NOT = { + is_preferred_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + } + factor = 0 + } + + # Certain Faiths should be much more rare in general. + # Uncommon Faiths + modifier = { + factor = 0.5 + OR = { + #Dualist + this = faith:mandeaism + this = faith:sabianism + } + } + #Rare Faiths + modifier = { + factor = 0.1 + OR = { + this = faith:sethianism + this = faith:priscillianism + this = faith:cainitism + } + } + + # Lollards more likely in England. + modifier = { + factor = regional_heresy_factor + this = faith:lollard + scope:heretic_capital = { + title_province = { + OR = { + geographical_region = custom_netherlands + geographical_region = world_europe_west_britannia + } + } + } + } + # Cathars more likely in France + modifier = { + factor = regional_heresy_factor + this = faith:cathar + scope:heretic_capital = { + title_province = { + geographical_region = world_europe_west_francia + } + } + } + # Waldensians more likely in Italy/South Germany + modifier = { + factor = regional_heresy_factor + this = faith:waldensian + scope:heretic_capital = { + title_province = { + OR = { + geographical_region = world_europe_south_italy + geographical_region = custom_germany + geographical_region = custom_bavaria + } + } + } + } + + # Paulicians more likely in Anatolia + modifier = { + factor = regional_heresy_factor + this = faith:paulician + scope:heretic_capital = { + title_province = { + geographical_region = world_asia_minor + } + } + } + # Iconoclasts more likely in Constantinople + modifier = { + factor = regional_heresy_factor + this = faith:iconoclast + scope:heretic_capital = { + title_province = { + geographical_region = custom_k_thessalonika + } + } + } + # Bogomils more likely in West ERE + modifier = { + factor = regional_heresy_factor + this = faith:bogomilist + scope:heretic_capital = { + title_province = { + geographical_region = world_europe_south_east + } + } + } + # Nestorian more likely in the East + modifier = { + factor = regional_heresy_factor + this = faith:nestorian + scope:heretic_capital = { + title_province = { + OR = { + geographical_region = world_india + geographical_region = world_middle_east + + } + } + } + } + # Priscillianism more likely in Egypt or Iberia + modifier = { + factor = regional_heresy_factor + this = faith:priscillianism + scope:heretic_capital = { + title_province = { + OR = { + geographical_region = world_africa_north_east + geographical_region = world_europe_west_iberia + } + } + } + } + + # FP3 - Khurramism more likely in Iran + modifier = { + factor = regional_heresy_factor + this = faith:khurramism + scope:heretic_capital = { + title_province = { + geographical_region = world_middle_east_persia + } + } + } + # FP3 - Behafaridism more likely in Iran + modifier = { + factor = regional_heresy_factor + this = faith:zurvanism #Behafaridism + scope:heretic_capital = { + title_province = { + geographical_region = world_middle_east_persia + } + } + } + # FP3 - The "arch heresy", aka Mazdakism more likely in Iran + modifier = { + factor = regional_heresy_factor + this = faith:mazdakism + scope:heretic_capital = { + title_province = { + geographical_region = world_middle_east_persia + } + } + } + # FP3 - Manicheanism more likely in Iran + modifier = { + factor = regional_heresy_factor + this = faith:manichean + scope:heretic_capital = { + title_province = { + geographical_region = world_middle_east_persia + } + } + } + } + + save_scope_as = heretic_faith + } + + #Trigger the heresy event for all rulers of the same Faith. + if = { + limit = { + exists = scope:heretic_faith + } + + save_scope_as = origin_faith + + #Determine roughly how many Counties we expext to flip to the heretical Faith. + random_list = { + 20 = { + modifier = { + add = 20 + fervor > 30 + } + set_variable = { + name = heresy_power + value = 10 + } + } + 55 = { + set_variable = { + name = heresy_power + value = 15 + } + } + 20 = { + modifier = { + add = 30 + fervor <= 20 + } + set_variable = { + name = heresy_power + value = 20 + } + } + 5 = { + modifier = { + add = 45 + fervor <= 10 + } + + set_variable = { + name = heresy_power + value = 25 + } + } + } + + # Modify heresy power for pluralist/fundamentalist + if = { + limit = { + has_doctrine_parameter = pluralism_pluralistic_resistant_to_heresy + } + change_variable = { + name = heresy_power + multiply = hostility_multiplier_pluralism + } + } + else_if = { + limit = { + has_doctrine_parameter = pluralism_fundamentalist_vulnerable_to_heresy + } + change_variable = { + name = heresy_power + multiply = hostility_multiplier_fundamentalist + } + } + + # Changes to another religion have reduced heresy power + if = { + limit = { + scope:origin_faith.religion != scope:heretic_faith.religion + } + change_variable = { + name = heresy_power + multiply = 0.5 + } + } + + #Flag the heretic faith as the parent faith's active heresy for the next 10 years. + set_variable = { + name = current_heresy + value = scope:heretic_faith + days = 3650 + } + + #Trigger the heresy outbreak event. + scope:heretic_ruler = { + trigger_event = { + id = heresy.0010 + days = 3 + } + } + } + } + } +} + +################################## +# Heresy Outbreak (Eastern) # +# by Sean Hughes # +# 0005 # +################################## + +heresy.0005 = { + hidden = yes + scope = faith + + trigger = { + has_doctrine = eastern_hostility_doctrine + NOT = { has_doctrine = heresy_hostility_doctrine } #Exclude Zoroastrians + } + + immediate = { + #Look for a valid Duke of this Faith to be our heresiarch. + random_faith_ruler = { + #Prefer Dukes with only 1 or 2 Duchies. + limit = { + faith = root + highest_held_title_tier = tier_duchy + any_held_title = { + title_tier = duchy + count < 3 #Limit the influence of Mega-Dukes + } + is_capable_adult_ai = yes + is_landed = yes + exists = capital_county + NOT = { has_trait = heresiarch } + no_heretical_hof_faith_trigger = yes + } + #Then accept any valid Duke. + alternative_limit = { + faith = root + highest_held_title_tier = tier_duchy + is_capable_adult_ai = yes + is_landed = yes + exists = capital_county + NOT = { has_trait = heresiarch } + no_heretical_hof_faith_trigger = yes + } + #If no Dukes exist, accept a Count. + alternative_limit = { + faith = root + highest_held_title_tier = tier_county + is_capable_adult_ai = yes + is_landed = yes + exists = capital_county + NOT = { has_trait = heresiarch } + no_heretical_hof_faith_trigger = yes + } + + weight = { + base = 100 + + modifier = { + add = 100 + is_powerful_vassal = yes + } + modifier = { + add = 75 + top_liege = this + } + modifier = { + add = 50 + is_a_faction_member = yes + } + } + + save_scope_as = heretic_ruler + primary_title = { + save_scope_as = heretic_title + } + capital_county = { + save_scope_as = heretic_capital + } + } + + + #Once we have a heresiarch, look for a valid heretical faith to them to convert to. + if = { + limit = { + exists = scope:heretic_ruler + } + + #Religions + faith:theravada.religion = { #Buddhism + add_to_list = eastern_religions + } + faith:manichean.religion = { #Hinduism + add_to_list = eastern_religions + } + faith:vaishnavism.religion = { #Jainism + add_to_list = eastern_religions + } + faith:digambara.religion = { #Dualism + add_to_list = eastern_religions + } + + every_in_list = { + list = eastern_religions + every_faith = { + add_to_list = eastern_faiths + } + } + + #Save a list of provinces in our religion group (we will be reusing this a lot for distance checks). + every_province = { + limit = { + is_county_capital = yes + faith.religion = { is_in_list = eastern_religions } + squared_distance = { + target = scope:heretic_capital + value < squared_distance_medium + } + } + add_to_list = neaby_same_religion_counties + } + + + #We want to pick certain faiths to be our heresy over others, assuming they are valid. + random_in_list = { + list = eastern_faiths + #Priority 1: Any nearby Eastern faith. + limit = { + num_county_followers > 0 + is_valid_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + nearby_county_of_faith = yes + } + #Priority 2: Any non-existing Eastern Faith + alternative_limit = { + num_county_followers = 0 + is_preferred_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + } + #Priority 3: Any far-away Eastern Faith + alternative_limit = { + is_valid_heresy = { + ORIGIN_FAITH = root + HERETICAL_FAITH = this + } + #No distance check here to save on perf (if we reach this point it's already not nearby) + } + + weight = { + base = 100 + + #Much more likely to select smaller Faiths as our heresy, to prevent them from becomming extinct (or prevent any other Faith from becoming too large). + modifier = { + add = 800 #1000 weight + num_county_followers <= 3 + } + modifier = { + add = 100 #200 weight + num_county_followers <= 6 + } + modifier = { + add = -20 #80 weight + num_county_followers > 9 + } + modifier = { + add = -30 #50 weight + num_county_followers > 12 + } + modifier = { + add = -40 #10 weight + num_county_followers > 15 + } + + #More likely to flip to a different branch of current religion than switching to a different religion. + modifier = { + factor = 10 + root.religion = this.religion + } + + #Certain Faiths are much more likely to appear/spread than others, due to popularity/obscurity. + #Common Faiths + modifier = { + factor = 1 + OR = { + #Buddhist + this = faith:theravada + this = faith:mahayana + this = faith:vajrayana + + #Hindu + this = faith:vaishnavism + this = faith:smartism + this = faith:srikula_shaktism + + #Jain + this = faith:digambara + this = faith:svetambara + + #Dualist + this = faith:manichean + } + } + + #Uncommon Faiths + modifier = { + factor = 0.5 + OR = { + #Hindu + this = faith:advaitism + this = faith:krishnaism + this = faith:kalikula_shaktism + + #Jain + this = faith:yapaniya + + #Dualist + this = faith:mandeaism + this = faith:sabianism + } + } + + #Rare Faiths + modifier = { + factor = 0.1 + OR = { + #Dualist + this = faith:valentinianism + this = faith:sethianism + this = faith:priscillianism + this = faith:cainitism + } + } + } + save_scope_as = heretic_faith + } + + + #Trigger the heresy event for all rulers of the same Faith. + if = { + limit = { + exists = scope:heretic_faith + } + + save_scope_as = origin_faith + + #Determine roughly how many Counties we expext to flip to the heretical Faith. + random_list = { + 20 = { + modifier = { + add = 20 + fervor > 30 + } + set_variable = { + name = heresy_power + value = 10 + } + } + 55 = { + set_variable = { + name = heresy_power + value = 15 + } + } + 20 = { + modifier = { + add = 30 + fervor <= 20 + } + set_variable = { + name = heresy_power + value = 20 + } + } + 5 = { + modifier = { + add = 45 + fervor <= 10 + } + + set_variable = { + name = heresy_power + value = 25 + } + } + } + + # Modify heresy power for pluralist/fundamentalist + if = { + limit = { + has_doctrine_parameter = pluralism_pluralistic_resistant_to_heresy + } + change_variable = { + name = heresy_power + multiply = hostility_multiplier_pluralism + } + } + else_if = { + limit = { + has_doctrine_parameter = pluralism_fundamentalist_vulnerable_to_heresy + } + change_variable = { + name = heresy_power + multiply = hostility_multiplier_fundamentalist + } + } + + #Flag the heretic faith as the parent faith's active heresy for the next 10 years. + set_variable = { + name = current_heresy + value = scope:heretic_faith + days = 3650 + } + + #Trigger the heresy outbreak event. + scope:heretic_ruler = { + trigger_event = { + id = heresy.0010 + days = 3 + } + } + } + } + } +} + + +################## +# New Major Heresy +# by Sean Hughes +# 0010 +################## + +heresy.0010 = { + type = character_event + title = heresy.0010.t + desc = { + desc = heresy.0010.desc + first_valid = { + triggered_desc = { + trigger = { + always = no + #has_variable = dead_heresy + } + desc = heresy.0010.desc.resurgent + } + triggered_desc = { + trigger = { + exists = scope:is_new_heresy + } + desc = heresy.0010.desc.nonexistant + } + desc = heresy.0010.desc.exists + } + } + left_portrait = { + character = scope:heretic_ruler + animation = prayer + } + major = yes + theme = faith + + trigger = { + scope:origin_faith = { + var:heresy_power > 0 + } + } + + major_trigger = { + OR = { + faith = scope:origin_faith + faith = scope:heretic_faith + } + } + + immediate = { + play_music_cue = "mx_cue_sacredrite" + + if = { + limit = { + scope:heretic_faith = { + num_county_followers = 0 + } + } + save_scope_value_as = { + name = is_new_heresy + value = yes + } + } + + #Consume heresy power to fuel this conversion. + scope:origin_faith = { + if = { + limit = { + scope:heretic_ruler = { + highest_held_title_tier >= 3 + } + } + #If we're a Duke, consume more heresy power. + change_variable = { + name = heresy_power + subtract = 3 + } + } + else = { + #Otherwise only consume a little heresy power. + change_variable = { + name = heresy_power + subtract = 1 + } + } + } + + scope:heretic_ruler = { + #Convert this character to the new heresy. + set_character_faith_with_conversion = scope:heretic_faith + #Heresy-using faiths become heresiarchs. + if = { + limit = { + faith = { + OR = { + NOT = { has_doctrine = eastern_hostility_doctrine } + has_doctrine = heresy_hostility_doctrine #Zoroastrians also get heresies, despite being Eastern. + } + } + } + add_heresiarch_trait_effect = yes + } + + #Kick off the follow-up events in the heresy chain. + trigger_event = { + id = heresy.0011 + days = { 4 7 } + } + + #Convert most miscellaneous courtiers & guests they have to the same heresy. + every_courtier_or_guest = { + limit = { + faith = scope:origin_faith + NOR = { + has_trait = zealous + this = this.faith.religious_head + } + is_available_ai = yes + } + set_character_faith = scope:heretic_faith + + hidden_effect = { + add_character_flag = { + flag = converted_by_heresy_0010_event + years = 15 + } + } + } + + hidden_effect = { + add_character_flag = { + flag = converted_by_heresy_0010_event + years = 15 + } + } + } + + #Send notifications to everyone who might care about the conversion. + every_player = { + limit = { + NOR = { + #These characters already get the full event. + faith = scope:origin_faith + faith = scope:heretic_faith + } + OR = { + #Everyone in the same Realm is notified. + top_liege ?= scope:heretic_ruler.top_liege + #If we're physically close to the character, we also get notified. + capital_county = { + squared_distance = { + target = scope:heretic_capital + value < squared_distance_medium + } + } + } + } + + send_interface_message = { + type = event_heresy_outbreak_neutral + title = heresy.0010.notification.title + custom_tooltip = heresy.0010.notification + + left_icon = scope:heretic_ruler + } + } + + #Fervor adjustments to prevent multiple heresy flip-flopping. + scope:heretic_faith = { + change_fervor = { + value = 100 + desc = fervor_gain_new_heresy + } + } + scope:origin_faith = { + change_fervor = { + value = heretical_defector_fervor_gain + desc = fervor_gain_defector_heresy + } + } + } + + option = { + name = { + trigger = { + this.faith = scope:origin_faith + scope:origin_faith = { + faith_hostility_level = { + target = scope:heretic_faith + value > 1 + } + } + exists = scope:is_new_heresy + } + text = heresy.0010.a.new_heresy + } + name = { + trigger = { + this.faith = scope:origin_faith + scope:origin_faith = { + faith_hostility_level = { + target = scope:heretic_faith + value > 1 + } + } + NOT = { exists = scope:is_new_heresy } + } + text = heresy.0010.a.existing_heresy + } + name = { + trigger = { + this.faith = { + faith_hostility_level = { + target = scope:heretic_faith + value = 1 + } + } + } + text = heresy.0010.a.astray_faith + } + name = { + trigger = { + this.faith = scope:heretic_faith + } + text = heresy.0010.a.same_faith + } + custom_tooltip = heresy.0010.tt.custom + } + + option = { + name = heresy.0010.b + trigger = { + is_ai = no + this.faith != scope:heretic_faith + } + custom_tooltip = heresy.0010.tt.custom + + #Convert to the new heresy. + set_character_faith_with_conversion = scope:heretic_faith + add_piety = major_piety_loss + + add_internal_flag = dangerous + } +} + +################## +# Major Heresy Spreads +# by Sean Hughes +# 0011 +################## +scripted_trigger no_heretical_hof_faith_0011_trigger = { #Head of Faith shouldn't convert. + OR = { + NOT = { + exists = scope:origin_faith.religious_head + } + AND = { + exists = scope:origin_faith.religious_head + this != scope:origin_faith.religious_head + } + } +} +heresy.0011 = { + hidden = yes + + trigger = { + scope:origin_faith = { + var:heresy_power > 0 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + clear_saved_scope = convert_ruler + scope:origin_faith = { + random_faith_ruler = { + limit = { + highest_held_title_tier > tier_barony #No Barons, they're inconsequential. + highest_held_title_tier < tier_kingdom #No AI Kings/Emperors, they're too powerful. + is_landed = yes + exists = capital_county + is_capable_adult_ai = yes + no_heretical_hof_faith_0011_trigger = yes + recently_converted_faith_trigger = no # As amusing as it may be, rulers shouldn't 'flip-flop' between Faiths, so we need to enforce a cooldown on heresy conversions. + } + + weight = { + base = 1000 # 100% weight + + #Rulers of counties close to the Heresiarch's are more likely to join their Heresy. + modifier = { + add = -900 # 10% weight + capital_county = { + squared_distance = { + target = scope:heretic_capital + value > squared_distance_small + } + } + } + modifier = { + add = -90 # 1% weight + capital_county = { + squared_distance = { + target = scope:heretic_capital + value > squared_distance_medium + } + } + } + modifier = { + add = -10 # 0% weight (fallback only) + capital_county = { + squared_distance = { + target = scope:heretic_capital + value > squared_distance_large + } + } + } + + #Rulers of the same(or similar) culture are more likely to join Heresies. + modifier = { + factor = 3 + culture = { has_same_culture_heritage = scope:heretic_ruler.culture } + } + modifier = { + factor = 4 + has_same_culture_as = scope:heretic_ruler + } + + #Counts are less likely to join a heresy than a Duke (though it's still possible if they're nearby) + modifier = { + factor = 0.25 + highest_held_title_tier = 2 + } + } + + save_scope_as = convert_ruler + primary_title = { + save_scope_as = convert_title + } + capital_county = { + save_scope_as = convert_capital + } + } + } + + if = { + limit = { + exists = scope:convert_ruler + } + hidden_effect = { + add_character_flag = { + flag = converted_by_heresy_0011_event + years = 15 + } + } + + #Consume heresy power to fuel this conversion. + scope:origin_faith = { + if = { + limit = { + scope:heretic_ruler = { + highest_held_title_tier >= tier_duchy + } + } + #If we're a Duke, consume more heresy power. + change_variable = { + name = heresy_power + subtract = 3 + } + } + else = { + #Otherwise only consume a little heresy power. + change_variable = { + name = heresy_power + subtract = 1 + } + } + } + + scope:convert_ruler = { + set_character_faith_with_conversion = scope:heretic_faith + + #Trigger the next heresy conversion event in the chain. + trigger_event = { + id = heresy.0011 + days = { 7 14 } + } + } + + #Send notifications to everyone who might care about the conversion + every_player = { + limit = { + OR = { + #Everyone in the same Realm is notified. + top_liege ?= scope:convert_ruler.top_liege + AND = { + #If convert is Duke or above, all same-faith charatcers (on both sides) are notified. + OR = { + faith = scope:origin_faith + faith = scope:heretic_faith + } + scope:convert_ruler = { + highest_held_title_tier >= tier_duchy + } + } + #If we're physically close to the character, we also get notified. + AND = { + capital_county ?= { + squared_distance = { + target = scope:convert_capital + value < squared_distance_medium + } + } + } + } + } + + # Save our faith's scope for localization purposes. + this = { + save_scope_as = me + faith = { + save_scope_as = my_faith + } + } + + # If the ruler converted to our faith, send a 'good' notification. + if = { + limit = { + scope:my_faith = scope:heretic_faith + } + send_interface_message = { + type = event_heresy_outbreak_good + title = heresy.0011.notification.same_faith + left_icon = scope:convert_ruler + show_as_tooltip = { + scope:convert_ruler = { + set_character_faith = scope:heretic_faith + } + } + } + } + # If the ruler converted to a faith we consider heretical, send a special notification. + else_if = { + limit = { + scope:my_faith = scope:origin_faith + scope:my_faith = { + faith_hostility_level = { + target = scope:heretic_faith + value >= 1 + } + } + } + if = { + # If the heretics are in our realm, send a 'bad' notification, as it's an immediate problem we have to deal with. + limit = { + top_liege = { + any_vassal_or_below = { + this = scope:convert_ruler + } + } + } + send_interface_message = { + type = event_heresy_outbreak_bad + title = heresy.0011.notification.heresy + left_icon = scope:convert_ruler + show_as_tooltip = { + scope:convert_ruler = { + set_character_faith = scope:heretic_faith + } + } + } + } + # If the heretics are simply elsewhere in the world, send a 'neutral' notificiation, as they are not an immediate concern (and this may even present an opportunity). + else = { + send_interface_message = { + type = event_heresy_outbreak_neutral + title = heresy.0011.notification.heresy + left_icon = scope:convert_ruler + show_as_tooltip = { + scope:convert_ruler = { + set_character_faith = scope:heretic_faith + } + } + } + } + } + # If we don't care that much about the faith the ruler converted to/from, send a 'neutral' notification. + else = { + send_interface_message = { + type = event_heresy_outbreak_neutral + title = heresy.0011.notification.other + left_icon = scope:convert_ruler + show_as_tooltip = { + scope:convert_ruler = { + set_character_faith = scope:heretic_faith + } + } + } + } + } + + #Fervor adjustments to prevent multiple heresy flip-flopping. + scope:origin_faith = { + change_fervor = { + value = heretical_defector_fervor_gain + desc = fervor_gain_defector_heresy + } + } + } + } +} diff --git a/N3OW/events/religion_events/holy_order_events.txt b/N3OW/events/religion_events/holy_order_events.txt new file mode 100644 index 00000000..c44bbb9d --- /dev/null +++ b/N3OW/events/religion_events/holy_order_events.txt @@ -0,0 +1,1865 @@ + +namespace = holy_order + +# Holy Order land management events: +# 1000+ + +# Holy Order character events: +# 2000+ + + +#Send character to a Holy Order +#by Linnéa Thimrén +holy_order.0001 = { + type = character_event + title = holy_order.0001.t + desc = { + desc = holy_order.0001.desc_opening + first_valid = { + triggered_desc = { + trigger = { + has_any_relation_trigger = { CHARACTER = scope:recipient } + } + desc = holy_order.0001.desc_relation + } + desc = holy_order.0001.desc + } + } + theme = faith + override_background = { + reference = courtyard + } + left_portrait = scope:recipient + + immediate = { + #Save holy order(s) scope + scope:actor.faith = { + random_faith_holy_order = { + limit = { + leader = { NOT = { has_relation_rival = scope:recipient } } + } + weight = { + base = 1 + modifier = { + add = 1 + holy_order_patron = root + } + } + leader = { + save_scope_as = grandmaster_1 + } + save_scope_as = holy_order_1 + } + if = { + limit = { + any_faith_holy_order = { + leader = { NOT = { has_relation_rival = scope:recipient } } + this != scope:holy_order_1 + } + } + random_faith_holy_order = { + limit = { + leader = { NOT = { has_relation_rival = scope:recipient } } + this != scope:holy_order_1 + } + leader = { + save_scope_as = grandmaster_2 + } + save_scope_as = holy_order_2 + } + } + if = { + limit = { + any_faith_holy_order = { + leader = { NOT = { has_relation_rival = scope:recipient } } + NOR = { + this = scope:holy_order_1 + this = scope:holy_order_2 + } + } + } + random_faith_holy_order = { + limit = { + leader = { NOT = { has_relation_rival = scope:recipient } } + NOR = { + this = scope:holy_order_1 + this = scope:holy_order_2 + } + } + leader = { + save_scope_as = grandmaster_3 + } + save_scope_as = holy_order_3 + } + } + if = { + limit = { + any_faith_holy_order = { + leader = { NOT = { has_relation_rival = scope:recipient } } + NOR = { + this = scope:holy_order_1 + this = scope:holy_order_2 + this = scope:holy_order_3 + } + } + } + random_faith_holy_order = { + limit = { + leader = { NOT = { has_relation_rival = scope:recipient } } + NOR = { + this = scope:holy_order_1 + this = scope:holy_order_2 + this = scope:holy_order_3 + } + } + leader = { + save_scope_as = grandmaster_4 + } + save_scope_as = holy_order_4 + } #this should be enough since it's VERY unlikely that you have this many holy orders lying around + } + } + } + + option = { + name = holy_order.0001.a + send_child_to_holy_order_effect = { + GRANDMASTER = grandmaster_1 + } + } + + option = { + name = holy_order.0001.b + trigger = { exists = scope:holy_order_2 } + send_child_to_holy_order_effect = { + GRANDMASTER = grandmaster_2 + } + } + + option = { + name = holy_order.0001.c + trigger = { exists = scope:holy_order_3 } + send_child_to_holy_order_effect = { + GRANDMASTER = grandmaster_3 + } + } + + option = { + name = holy_order.0001.d + trigger = { exists = scope:holy_order_4 } + send_child_to_holy_order_effect = { + GRANDMASTER = grandmaster_4 + } + } + + option = { + name = holy_order.0001.e + } +} + +#Acceptance to clergy +#by Linnéa Thimrén +holy_order.0002 = { + type = letter_event + opening = { + desc = char_interaction.0001.opening + } + desc = holy_order.0002.desc + + sender = scope:recipient + + immediate = { + send_child_to_clergy_effect = yes + } + + option = { #Send them on their way + name = holy_order.0002.a + } +} + + + +#A member of a Holy Order has a random chance of gaining the pilgrim trait since non-landed characters can't go on a pilgrimage +#by Linnéa Thimrén +holy_order.0100 = { + hidden = yes + + trigger = { #Is a member of a holy order + NOT = { has_trait = pilgrim } + has_trait = order_member + faith = { + any_faith_holy_order = { #Your faith must have a Holy Order + leader = { + this = root.liege + } + } + } + } + + immediate = { + add_trait = pilgrim + } +} + + +#You get a loan from a Holy Order +#by Linnéa Thimrén +holy_order.0200 = { + type = letter_event + opening = { + first_valid = { + triggered_desc = { + trigger = { + piety_level < 1 + } + desc = char_interaction.0001.opening_low_piety + } + desc = holy_order.0200.desc_opening + } + } + desc = holy_order.0200.desc + sender = scope:recipient + + option = { + name = holy_order.0200.a + show_as_tooltip = { + scope:recipient = { + pay_treasury_or_gold = { + target = root + value = root.holy_order_gold_value + } + } + } + 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 + } + } + } + + option = { #Your piety level is too low :( sinner! + name = holy_order.0200.b + trigger = { + piety_level < 1 + } + show_as_unavailable = { piety_level < 1 } + } +} + +#To handle inheritance of loans in a Holy Order +#by Linnéa Thimrén +holy_order.0201 = { + hidden = yes + + immediate = { + remove_variable = loan_holder + 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 + } + } + } +} + +#To increment years +#by Linnéa Thimrén +holy_order.0206 = { + hidden = yes + + trigger = { + exists = var:owes_me_money + exists = var:years_since_loan + } + + immediate = { + change_variable = { + name = years_since_loan + add = 1 + } + } +} + +scripted_trigger holy_order_request_child_trigger = { + is_courtier_of = root + NOT = { has_trait = devoted } + is_adult = yes + has_education_martial_trigger = yes + can_be_warrior_trigger = { ARMY_OWNER = root } +} + +#Holy order demands payment +#by Linnéa Thimrén +holy_order.0202 = { + type = letter_event + opening = { + desc = char_interaction.0001.opening + } + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:asked_for_time + } + desc = holy_order.0202.second_time + } + desc = holy_order.0202.opening + } + desc = holy_order.0202.desc + } + sender = scope:recipient + + trigger = { + has_character_flag = borrow_from_holy_order + exists = var:loan_holder + var:loan_holder = { + exists = var:years_since_loan + var:years_since_loan >= 10 + } + } + + immediate = { + var:loan_holder = { + save_scope_as = recipient + } + faith = { + random_faith_holy_order = { + limit = { + leader = { + this = scope:recipient + } + } + save_scope_as = holy_order + } + } + } + + option = { #Pay back + name = holy_order.0202.a + trigger = { + can_execute_decision = repay_loan_decision + } + show_as_unavailable = { NOT = { can_execute_decision = repay_loan_decision } } + flavor = { #To get warning if you don't have enough money + triggered_desc = { + trigger = { + NOT = { can_execute_decision = repay_loan_decision } + } + desc = holy_order.0202.a._not.tt + } + } + show_as_tooltip = { + pay_treasury_or_gold = { + value = var:loan_amount_owed + target = scope:recipient + } + } + execute_decision = repay_loan_decision + } + + option = { #Pretty please give me more time? + name = { + trigger = { + faith = { religion_tag = christianity_religion } + } + text = holy_order.0202.b_christian + } + name = { + trigger = { + NOT = { faith = { religion_tag = christianity_religion } } + } + text = holy_order.0202.b + } + trigger = { + piety_level >= 3 + } + show_as_unavailable = { piety_level < 3 } + custom_tooltip = holy_order.0202.b.tt + save_scope_value_as = { + name = asked_for_time + value = yes + } + trigger_event = { + id = holy_order.0202 + years = 5 + } + } + + option = { #no + name = holy_order.0202.c + flavor = holy_order.0202.c.tt + } + + option = { #no + name = holy_order.0202.d + if = { + limit = { + exists = faith.religious_head + } + faith.religious_head = { + add_opinion = { + modifier = not_repay_loan_opinion + target = root + } + } + } + scope:recipient = { + add_opinion = { + modifier = not_repay_loan_opinion + target = root + } + } + if = { #are we still of the same faith? + limit = { + scope:recipient.faith = root.faith + } + add_piety_level = -1 + } + remove_character_flag = borrow_from_holy_order + } + + after = { #Consequences for not paying back + hidden_effect = { + random_list = { + 50 = { + trigger = { + NOT = { exists = scope:asked_for_time } + any_held_title = { + title_tier = barony + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + trigger_event = { #They ask for a castle + id = holy_order.0203 + days = { 30 90 } + } + } + 50 = { + trigger = { #Has a fitting child + NOT = { exists = scope:asked_for_time } + any_child = { + holy_order_request_child_trigger = yes + } + } + trigger_event = { #They ask for a child + id = holy_order.0204 + days = { 30 90 } + } + } + } + } + } +} + +#Holy Order demands castle +#by Linnéa Thimrén +holy_order.0203 = { + type = letter_event + opening = { + desc = char_interaction.0001.opening + } + desc = holy_order.0203.desc + sender = scope:recipient + + trigger = { + has_character_flag = borrow_from_holy_order + any_held_title = { + title_tier = barony + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + + on_trigger_fail = { #If no available children exists now + if = { + limit = { + has_character_flag = borrow_from_holy_order + any_child = { + holy_order_request_child_trigger = yes + } + } + trigger_event = holy_order.0204 + } + else = { #No options left at all + trigger_event = holy_order.0205 + } + } + + immediate = { + random_held_title = { + title_tier = barony + limit = { + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + save_scope_as = province + } + } + + option = { + name = holy_order.0203.a + custom_tooltip = holy_order.0204.a.tt + remove_character_flag = borrow_from_holy_order + scope:province = { + lease_out_to = scope:holy_order + } + } + + option = { #refuse + name = holy_order.0203.b + if = { + limit = { + exists = scope:recipient.faith.religious_head + } + scope:recipient.faith.religious_head = { + add_opinion = { + modifier = not_repay_loan_opinion + target = root + } + } + } + scope:recipient = { + add_opinion = { + modifier = not_repay_loan_opinion + target = root + } + } + + if = { #are we still of the same faith? + limit = { + scope:recipient.faith = root.faith + } + add_piety_level = -1 + remove_character_flag = borrow_from_holy_order + } + } +} + +#Holy Order demands child +#by Linnéa Thimrén +holy_order.0204 = { + type = letter_event + opening = { + desc = char_interaction.0001.opening + } + desc = holy_order.0204.desc + sender = scope:recipient + + trigger = { + has_character_flag = borrow_from_holy_order + any_child = { + holy_order_request_child_trigger = yes + } + } + + on_trigger_fail = { #If no available children exists now + if = { + limit = { + has_character_flag = borrow_from_holy_order + any_held_title = { + title_tier = barony + barony_is_valid_for_holy_order_lease_trigger = { CHARACTER = root } + } + } + trigger_event = holy_order.0203 + } + else = { #No options left at all + trigger_event = holy_order.0205 + } + } + + immediate = { + random_child = { + limit = { + holy_order_request_child_trigger = yes + } + save_scope_as = child + } + } + + option = { + name = holy_order.0204.a + custom_tooltip = holy_order.0204.a.tt + remove_character_flag = borrow_from_holy_order + scope:child = { + add_trait = order_member + add_piety_level = 1 + if = { # Ensure that your child is of the correct faith to join the holy order. + limit = { + faith != scope:recipient.faith + } + set_character_faith = scope:recipient.faith + } + } + scope:recipient = { + add_courtier = scope:child + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + add_piety = medium_piety_gain + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + } + + option = { #refuse + name = holy_order.0203.b + scope:recipient.faith.religious_head = { + add_opinion = { + modifier = not_repay_loan_opinion + target = root + } + } + scope:recipient = { + add_opinion = { + modifier = not_repay_loan_opinion + target = root + } + } + if = { #are we still of the same faith? + limit = { + scope:recipient.faith = root.faith + } + add_piety_level = -1 + remove_character_flag = borrow_from_holy_order + } + } +} + +#No options available, send punishment event +holy_order.0205 = { + type = letter_event + opening = { + desc = char_interaction.0001.opening + } + desc = holy_order.0205.desc + sender = scope:recipient + + option = { + name = holy_order.0205.a + if = { + limit = { + exists = faith.religious_head + } + faith.religious_head = { + add_opinion = { + modifier = not_repay_loan_opinion + target = root + } + } + } + scope:recipient = { + add_opinion = { + modifier = not_repay_loan_opinion + target = root + } + } + add_piety_level = -1 + remove_character_flag = borrow_from_holy_order + } +} + + + + +#Holy order looks for someone to ask for land from +# by Petter Vilberg +holy_order.1000 = { + hidden = yes + scope = faith + + trigger = { + any_faith_holy_order = { + holy_order_1000_holy_order_trigger = yes + } + any_faith_ruler = { + holy_order_1000_request_target_trigger = yes + } + } + + weight_multiplier = { + base = 1 + #Reduced chance if there are no HOs under the soft threshold: + modifier = { + add = -0.8 + NOT = { + any_faith_holy_order = { + holy_order_1000_holy_order_trigger = yes + num_leased_titles < holy_order_barony_number_soft_threshold + } + } + } + } + + immediate = { + random_faith_holy_order = { + limit = { + holy_order_1000_holy_order_trigger = yes + } + weight = { + base = 1 + modifier = { #HO is already past the soft threshold + add = -0.9 + num_leased_titles >= holy_order_barony_number_soft_threshold + } + #More likely to pick Holy Orders that don't have a lot of territory + compare_modifier = { + value = num_leased_titles + multiplier = -0.05 + } + } + save_scope_as = holy_order + leader = { + save_scope_as = grandmaster + } + } + random_ruler = { + limit = { + holy_order_1000_request_target_trigger = yes + } + weight = { + base = 1 + + #More likely to ask their patron for more land + modifier = { + add = 5 + this = scope:holy_order.holy_order_patron + } + #Less likely to ask you the more you're already providing HOs: + modifier = { + add = -0.1 + any_held_title = { + is_under_holy_order_lease = yes + count >= 1 + } + } + modifier = { + add = -0.2 + any_held_title = { + is_under_holy_order_lease = yes + count > 1 + } + } + modifier = { + add = -0.3 + any_held_title = { + is_under_holy_order_lease = yes + count > 3 + } + } + modifier = { + add = -0.3 + any_held_title = { + is_under_holy_order_lease = yes + count > 5 + } + } + } + save_scope_as = request_target + random_sub_realm_barony = { + limit = { + holy_order_1000_target_barony_trigger = { CHARACTER = scope:request_target } + } + weight = { + base = 1 + #Way more likely to choose from the target's personal domain: + modifier = { + add = -0.8 + holder != scope:request_target + } + } + save_scope_as = target_barony + } + } + + if = { + #Chance of "discarding" a holy order's request if it's too big + limit = { + scope:holy_order = { + num_leased_titles >= holy_order_barony_number_soft_threshold + } + } + random = { + chance = 50 + save_scope_value_as = { + name = cancel_event + value = yes + } + scope:holy_order.title = { + set_variable = { + name = discarded_for_being_too_big + value = yes + years = 5 + } + } + } + } + + if = { + limit = { + NOT = { + exists = scope:cancel_event + } + } + + scope:request_target = { + trigger_event = holy_order.1001 + } + } + } +} + + +#Holy Order requests a Barony for Gold +holy_order.1001 = { + type = letter_event + opening = { + desc = holy_order_letter.opening + } + desc = { + desc = holy_order.1001.intro + desc = holy_order.1001.end + } + sender = scope:grandmaster + + immediate = { + save_scope_as = ruler + add_character_flag = { + flag = holy_order_recently_requested_land + years = 3 + } + if = { + limit = { + any_sub_realm_barony = { + holy_order_1000_target_barony_trigger = { CHARACTER = root } + this != scope:target_barony + holy_order_barony_value_calculation <= scope:target_barony.holy_order_barony_value_calculation + } + } + random_sub_realm_barony = { + limit = { + holy_order_1000_target_barony_trigger = { CHARACTER = root } + this != scope:target_barony + holy_order_barony_value_calculation <= scope:target_barony.holy_order_barony_value_calculation + } + weight = { + base = 1 + # Jomsvikings prefer to ask for coastal locations if they can. + modifier = { + add = 1000 + exists = global_var:jomsvikings_title + scope:grandmaster.primary_title = global_var:jomsvikings_title + this.title_province = { is_coastal = yes } + } + } + save_scope_as = alternative_barony + } + } + } + + option = { + name = holy_order.1001.a + trigger = { + # fixing rare edge case where a character has become a baron/unlanded and would attempt to give away their last title + is_landed = yes + highest_held_title_tier > tier_barony + # fixing rare edge case where a title is leased out twice + scope:target_barony = { is_leased_out = no } + } + + add_treasury_or_gold = scope:target_barony.holy_order_barony_value_calculation + + scope:target_barony = { + if = { #To make sure the effect works properly we have to have the title when we lease it out + limit = { + holder != root + } + root = { get_title = prev } + } + lease_out_to = scope:holy_order + } + scope:grandmaster = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 25 + } + } + hidden_effect = { + scope:holy_order.title = { + set_variable = { + name = received_new_land + value = yes + years = 3 + } + } + add_character_flag = { + flag = holy_order_recently_received_land + years = 10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_zeal = 1 + } + } + } + + option = { + name = holy_order.1001.b + trigger = { + exists = scope:alternative_barony + } + + add_treasury_or_gold = scope:alternative_barony.holy_order_barony_value_calculation + + scope:alternative_barony = { + if = { #To make sure the effect works properly we have to have the title when we lease it out + limit = { + holder != root + } + root = { get_title = prev } + } + lease_out_to = scope:holy_order + } + scope:grandmaster = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + hidden_effect = { + scope:holy_order.title = { + set_variable = { + name = received_new_land + value = yes + years = 3 + } + } + add_character_flag = { + flag = holy_order_recently_received_land + years = 10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.8 + ai_zeal = 0.5 + } + } + } + + option = { + name = holy_order.1001.c + scope:grandmaster = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:grandmaster + multiplier = -0.9 + } + } + } +} + + + +######### +# Holy Order Character Events +# 2000+ +######### + +########## +# Child wishes to join Holy Order +# by Petter Vilberg +######### +scripted_trigger holy_order_2001_candidate_trigger = { + is_available_ai_adult = yes + is_ruler = no + #Not very likely to inherit a lot + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value > 2 + } + } + } + faith = root.faith + OR = { + is_courtier_of = root + AND = { + root = { is_ai = no } + court_owner ?= { is_ai = yes } + } + } + is_married = no + NOT = { + exists = betrothed + } + NOT = { has_character_flag = holy_order_member_requested_return_home } + NOT = { + has_relation_rival = scope:holy_order.leader + } + can_be_warrior_trigger = { ARMY_OWNER = root } +} + +scripted_trigger holy_order_2001_holy_order_trigger = { + always = yes +} + +holy_order.2001 = { + type = character_event + title = holy_order.2001.t + desc = holy_order.2001.desc + left_portrait = scope:child + lower_right_portrait = scope:grandmaster + theme = faith + override_background = { + reference = sitting_room + } + + trigger = { + NOT = { has_character_flag = had_event_holy_order_2001 } + faith = { + any_faith_holy_order = { + holy_order_2001_holy_order_trigger = yes + save_temporary_scope_as = holy_order + } + } + any_child = { + holy_order_2001_candidate_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + faith = { + any_faith_holy_order = { + holy_order_2001_holy_order_trigger = yes + save_temporary_scope_as = holy_order + } + } + any_child = { + holy_order_2001_candidate_trigger = yes + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value > 4 + } + } + } + } + } + modifier = { + add = -0.5 + any_child = { + count < 4 + } + } + modifier = { + add = 0.5 + faith = { + any_faith_holy_order = { + holy_order_2001_holy_order_trigger = yes + save_temporary_scope_as = holy_order + } + } + any_child = { + holy_order_2001_candidate_trigger = yes + has_trait = zealous + } + } + } + + immediate = { + add_character_flag = { + flag = had_event_holy_order_2001 + years = 5 + } + faith = { + random_faith_holy_order = { + limit = { + holy_order_2001_holy_order_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 1 + holy_order_patron = root + } + } + save_scope_as = holy_order + leader = { + save_scope_as = grandmaster + } + } + } + random_child = { + limit = { + holy_order_2001_candidate_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 1 + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value >= 4 + } + } + } + } + modifier = { + add = 0.5 + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value >= 5 + } + } + } + } + modifier = { + add = 1 + has_trait = zealous + } + modifier = { + add = 0.25 + has_trait = education_martial + } + } + save_scope_as = child + } + } + + #Yes, go + option = { + name = holy_order.2001.a + scope:child = { + add_trait = order_member + add_piety_level = 1 + if = { # Ensure that your child is of the correct faith to join the holy order (if they convert between frames it causes issues otherwise) + limit = { + faith != scope:grandmaster.faith + } + set_character_faith = scope:grandmaster.faith + } + } + scope:grandmaster = { + add_courtier = scope:child + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + add_piety = medium_piety_gain + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + } + + #I have other plans for you + option = { + name = holy_order.2001.b + scope:child = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -10 + } + } + } +} + +####### +# Sibling wants to join a Holy Order +# by Petter Vilberg +####### +# Note: Intentionally almost identical to holy_order.2001 + +holy_order.2002 = { + type = character_event + title = holy_order.2001.t + desc = holy_order.2002.desc + left_portrait = scope:sibling + lower_right_portrait = scope:grandmaster + theme = faith + override_background = { + reference = sitting_room + } + + trigger = { + NOT = { has_character_flag = had_event_holy_order_2002 } + faith = { + any_faith_holy_order = { + holy_order_2001_holy_order_trigger = yes + save_temporary_scope_as = holy_order + } + } + any_sibling = { + holy_order_2001_candidate_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + faith = { + any_faith_holy_order = { + holy_order_2001_holy_order_trigger = yes + save_temporary_scope_as = holy_order + } + } + any_sibling = { + holy_order_2001_candidate_trigger = yes + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value > 4 + } + } + } + } + } + modifier = { + add = 0.5 + faith = { + any_faith_holy_order = { + holy_order_2001_holy_order_trigger = yes + save_temporary_scope_as = holy_order + } + } + any_sibling = { + holy_order_2001_candidate_trigger = yes + has_trait = zealous + } + } + } + + immediate = { + add_character_flag = { + flag = had_event_holy_order_2002 + years = 5 + } + faith = { + random_faith_holy_order = { + limit = { + holy_order_2001_holy_order_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 1 + holy_order_patron = root + } + } + save_scope_as = holy_order + leader = { + save_scope_as = grandmaster + } + } + } + random_sibling = { + limit = { + holy_order_2001_candidate_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 1 + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value >= 4 + } + } + } + } + modifier = { + add = 0.5 + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value >= 5 + } + } + } + } + modifier = { + add = 1 + has_trait = zealous + } + modifier = { + add = 0.25 + has_trait = education_martial + } + } + save_scope_as = sibling + } + } + + #Yes, go + option = { + name = holy_order.2002.a + scope:sibling = { + add_trait = order_member + add_piety_level = 1 + if = { # Ensure that your child is of the correct faith to join the holy order (if they convert between frames it causes issues otherwise) + limit = { + faith != scope:grandmaster.faith + } + set_character_faith = scope:grandmaster.faith + } + } + scope:grandmaster = { + add_courtier = scope:sibling + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 20 + } + } + add_piety = medium_piety_gain + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + } + + #I have other plans for you + option = { + name = holy_order.2002.b + scope:sibling = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -20 + } + } + } +} + + + +################# +# Holy Order suggests you send them a child +# by Petter Vilberg +################# + +scripted_trigger holy_order_2003_candidate_trigger = { + is_adult = no + age < 15 + age > 7 + is_available = yes + is_ruler = no + is_ai = yes + #Not very likely to inherit a lot + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value > 2 + } + } + } + faith = root.faith + OR = { + is_courtier_of = root + AND = { + root = { is_ai = no } + court_owner = { is_ai = yes } + } + } + NOT = { has_character_flag = holy_order_member_requested_return_home } + trigger_if = { + limit = { + root = { is_ai = yes } + court_owner = { is_ai = no } + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = court_owner } + } + trigger_else = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } +} + +scripted_trigger holy_order_2003_holy_order_trigger = { + leader = { + NOT = { has_relation_rival = root } + } +} + +holy_order.2003 = { + type = letter_event + opening = holy_order.2003.opening + desc = holy_order.2003.desc + sender = scope:grandmaster + + trigger = { + NOT = { has_character_flag = had_holy_order_2003 } + is_landed_or_landless_administrative = yes + any_child = { + holy_order_2003_candidate_trigger = yes + } + faith = { + any_faith_holy_order = { + holy_order_2003_holy_order_trigger = yes + } + } + } + + immediate = { + add_character_flag = { + flag = had_holy_order_2003 + years = 10 + } + random_child = { + limit = { + holy_order_2003_candidate_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 1 + OR = { + NOT = { is_heir_of = root } + root.primary_title = { + place_in_line_of_succession = { + target = prev + value > 3 + } + } + } + } + modifier = { + add = 0.5 + has_focus = education_martial + } + modifier = { + add = 0.5 + has_trait = rowdy + } + } + save_scope_as = child + } + faith = { + random_faith_holy_order = { + limit = { + holy_order_2003_holy_order_trigger = yes + } + save_scope_as = holy_order_scope + leader = { + save_scope_as = grandmaster + } + } + } + if = { + limit = { + any_child = { + holy_order_2003_candidate_trigger = yes + this != scope:child + } + } + random_child = { + limit = { + holy_order_2003_candidate_trigger = yes + this != scope:child + } + save_scope_as = alternative_child + } + } + } + + #Send them away + option = { + name = holy_order.2003.a + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + add_piety = major_piety_gain + hidden_effect = { + scope:child = { + add_trait = order_member + if = { + limit = { + NOR = { + has_focus = education_martial + has_focus = education_learning + } + } + set_focus = education_martial + } + add_piety_level = 1 + if = { # Ensure that your child is of the correct faith to join the holy order (if they convert between frames it causes issues otherwise) + limit = { + faith != scope:grandmaster.faith + } + set_character_faith = scope:grandmaster.faith + } + } + } + custom_tooltip = holy_order.2003.child_joins_order + scope:grandmaster = { + hidden_effect = { + add_courtier = scope:child + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + + #Send an alternative candidate + option = { + name = holy_order.2003.b + trigger = { + exists = scope:alternative_child + } + dynasty = { + add_dynasty_prestige = medium_dynasty_prestige_gain + } + add_piety = major_piety_gain + hidden_effect = { + scope:alternative_child = { + add_trait = order_member + add_piety_level = 1 + if = { + limit = { + NOR = { + has_focus = education_martial + has_focus = education_learning + } + } + set_focus = education_martial + } + if = { # Ensure that your child is of the correct faith to join the holy order (if they convert between frames it causes issues otherwise) + limit = { + faith != scope:grandmaster.faith + } + set_character_faith = scope:grandmaster.faith + } + } + } + custom_tooltip = holy_order.2003.alternative_child_joins_order + scope:grandmaster = { + hidden_effect = { + add_courtier = scope:alternative_child + } + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 30 + } + } + } + + #No + option = { + name = holy_order.2003.c + scope:grandmaster = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + } +} + + + +############# +# Child returns to pick up the mantle +# by Petter Vilberg +############# + +scripted_trigger holy_order_2004_child_trigger = { + has_trait = order_member + is_ai = yes + is_adult = yes + NOT = { + has_character_flag = holy_order_member_requested_return_home + } +} + +holy_order.2004 = { + type = letter_event + opening = holy_order.2004.opening + desc = holy_order.2004.desc + sender = scope:child + + trigger = { + any_child = { + holy_order_2004_child_trigger = yes + } + OR = { + AND = { + #Must have either single-heir succession & no heir... + has_realm_law_flag = advanced_succession_law + NOT = { exists = player_heir } + } + AND = { + #... Or partition & just the one. + has_realm_law_flag = partition_succession_law + any_heir = { + is_child_of = root + count < 2 + } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 2 + is_ai = no + } + } + + immediate = { + random_child = { + limit = { + holy_order_2004_child_trigger = yes + } + save_scope_as = child + add_character_flag = holy_order_member_requested_return_home + court_owner = { + save_scope_as = grandmaster + } + } + } + + #Welcome home + option = { + name = holy_order.2004.a + if = { + limit = { + scope:child = { + NOT = { + is_courtier_of = prev + } + } + } + add_courtier = scope:child + } + scope:child = { + remove_trait = order_member + add_character_modifier = { + modifier = holy_order_experience_modifier + } + } + ai_chance = { + base = 100 + } + } + + #There is no place for you here + option = { + name = holy_order.2004.b + scope:child = { + add_opinion = { + target = root + modifier = refusal_opinion + opinion = -40 + } + } + ai_chance = { + base = 10 + } + } +} + + + +############### +# A - Possibly Undesirable - Child Returns Home +# by Petter Vilberg +############### + +scripted_trigger holy_order_2005_child_trigger = { + has_trait = order_member + is_adult = yes + is_ai = yes + NOT = { + has_character_flag = holy_order_member_requested_return_home + } + num_sinful_traits > 0 +} + + +holy_order.2005 = { + type = character_event + title = holy_order.2005.t + desc = holy_order.2005.desc + + theme = faith + override_background = { + reference = throne_room + } + left_portrait = scope:child + lower_right_portrait = scope:grandmaster + + trigger = { + NOT = { has_character_flag = had_holy_order_2005 } + any_child = { + holy_order_2005_child_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_child = { + holy_order_2005_child_trigger = yes + calc_true_if = { + amount >= 2 + martial < average_skill_rating + intrigue < average_skill_rating + diplomacy < average_skill_rating + stewardship < average_skill_rating + learning < average_skill_rating + } + } + } + modifier = { + add = 1 + any_child = { + holy_order_2005_child_trigger = yes + calc_true_if = { + amount >= 3 + martial < average_skill_rating + intrigue < average_skill_rating + diplomacy < average_skill_rating + stewardship < average_skill_rating + learning < average_skill_rating + } + } + } + modifier = { + add = 1 + any_child = { + holy_order_2005_child_trigger = yes + martial < average_skill_rating + intrigue < average_skill_rating + diplomacy < average_skill_rating + stewardship < average_skill_rating + learning < average_skill_rating + } + } + } + + immediate = { + add_character_flag = { + flag = had_holy_order_2005 + years = 15 + } + random_child = { + limit = { + holy_order_2005_child_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 3 + calc_true_if = { + amount = 3 + martial < average_skill_rating + intrigue < average_skill_rating + diplomacy < average_skill_rating + stewardship < average_skill_rating + learning < average_skill_rating + } + } + modifier = { + add = 5 + calc_true_if = { + amount = 4 + martial < average_skill_rating + intrigue < average_skill_rating + diplomacy < average_skill_rating + stewardship < average_skill_rating + learning < average_skill_rating + } + } + modifier = { + add = 10 + martial < average_skill_rating + intrigue < average_skill_rating + diplomacy < average_skill_rating + stewardship < average_skill_rating + learning < average_skill_rating + } + } + save_scope_as = child + add_character_flag = holy_order_member_requested_return_home + court_owner = { + save_scope_as = grandmaster + } + } + } + + #Uh-oh + option = { + name = holy_order.2005.a + add_courtier = scope:child + scope:child = { + remove_trait = order_member + add_character_modifier = { + modifier = holy_order_experience_modifier + } + } + } +} diff --git a/N3OW/events/religion_events/human_sacrifice_events.txt b/N3OW/events/religion_events/human_sacrifice_events.txt new file mode 100644 index 00000000..9d8bbdae --- /dev/null +++ b/N3OW/events/religion_events/human_sacrifice_events.txt @@ -0,0 +1,231 @@ +namespace = human_sacrifice + +################################################## +#Flowery War CB events + + #0001 - Fail to sacrifice suitable victims by the time limit. + #0002 - A victim died before they could be sacrificed. + #0003 - A victim was released rather than be sacrificed. + +################################################## + +################################################## +# Thirsting Gods +# by Ewan Cowhig Croft +# 0001 +################################################## + +# You have disappointed your deities by not sacrificing marked captives. +# by Ewan Cowhig Croft +human_sacrifice.0001 = { + type = character_event + title = human_sacrifice.0001.t + desc = human_sacrifice.0001.desc + theme = faith + left_portrait = { + character = root + animation = shame + } + + trigger = { + faith = { has_doctrine_parameter = human_sacrifice_active } + any_prisoner = { has_character_modifier = designated_human_sacrifice_modifier } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + every_prisoner = { + limit = { has_character_modifier = designated_human_sacrifice_modifier } + add_to_list = designated_sacrifices_list + } + save_scope_value_as = { + name = designated_sacrifice_count + value = { + value = 0 + every_in_list = { + list = designated_sacrifices_list + add = 1 + } + } + } + } + + option = { #Immediately sacrifice the remainder to try and make amends. + name = human_sacrifice.0001.a + every_prisoner = { + limit = { has_character_modifier = designated_human_sacrifice_modifier } + death = { + death_reason = death_sacrificed_to_gods + killer = root + } + } + add_piety = { + value = miniscule_piety_gain + multiply = scope:designated_sacrifice_count + } + add_character_modifier = { + modifier = human_sacrifice_coward_modifier + years = 10 + } + stress_impact = { + callous = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + zealous = major_stress_impact_loss + compassionate = medium_stress_impact_gain + cynical = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + modifier = { + add = 10 + has_trait = callous + } + modifier = { + add = 20 + has_trait = sadistic + } + modifier = { + add = 30 + has_trait = zealous + } + modifier = { + add = -20 + has_trait = compassionate + } + modifier = { + add = -30 + has_trait = cynical + } + } + } + option = { #Accept the loss of piety with dignity. + name = human_sacrifice.0001.b + add_piety = { + value = medium_piety_loss + multiply = scope:designated_sacrifice_count + } + stress_impact = { zealous = medium_stress_impact_gain } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + ai_energy = -0.25 + } + modifier = { + add = -30 + has_trait = zealous + } + } + } + option = { #Internally decry the barbarism of your faith. + name = human_sacrifice.0001.c + if = { + limit = { + NOT = { + any_secret = { type = secret_non_believer } + } + } + give_non_believer_secret_effect = yes + } + else = { add_prestige = minor_prestige_gain } + stress_impact = { + compassionate = medium_stress_impact_loss + cynical = major_stress_impact_loss + callous = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + ai_zeal = -0.5 + } + modifier = { + add = 20 + has_trait = compassionate + } + modifier = { + add = 30 + has_trait = cynical + } + modifier = { + add = -10 + has_trait = callous + } + modifier = { + add = -20 + has_trait = sadistic + } + modifier = { + add = -30 + has_trait = zealous + } + } + } +} + +# A marked captive has died without being sacrificed. +# by Ewan Cowhig Croft +#human_sacrifice.0002 = { + #hidden = yes + # + #trigger = { + #has_character_modifier = designated_human_sacrifice_modifier + #imprisoner = { + #faith = { has_doctrine_parameter = human_sacrifice_active } + #} + #} + # + #immediate = { + #save_scope_as = dead_designated_sacrifice + #imprisoner = { + #send_interface_message = { + #type = event_religious_bad_with_text + #title = designated_sacrifice_died.t + #desc = designated_sacrifice_died.desc + #right_icon = scope:dead_designated_sacrifice + #add_piety = minor_piety_loss + #} + #} + #} +#} + +# A marked captive has been released without being sacrificed. +# by Ewan Cowhig Croft +human_sacrifice.0003 = { + hidden = yes + + trigger = { + has_character_modifier = designated_human_sacrifice_modifier + scope:imprisoner = { + faith = { has_doctrine_parameter = human_sacrifice_active } + } + } + + immediate = { + save_scope_as = released_designated_sacrifice + scope:imprisoner = { + if = { + limit = { + scope:released_designated_sacrifice = { is_alive = yes } + } + send_interface_message = { + type = event_religious_bad_with_text + title = designated_sacrifice_release.t + desc = designated_sacrifice_released.desc + right_icon = scope:released_designated_sacrifice + add_piety = medium_piety_loss + } + } + } + remove_character_modifier = designated_human_sacrifice_modifier + } +} diff --git a/N3OW/events/religion_events/jewish_events.txt b/N3OW/events/religion_events/jewish_events.txt new file mode 100644 index 00000000..735faea0 --- /dev/null +++ b/N3OW/events/religion_events/jewish_events.txt @@ -0,0 +1,115 @@ +namespace = jewish_events + +### Rabbinic priesthood wants to become monogamous + +jewish_events.0001 = { + type = character_event + title = jewish_events.0001.t + desc = jewish_events.0001.desc + theme = learning + + left_portrait = { + character = root + animation = personality_bold + } + + option = { #Just accept it + name = jewish_events.0001.a + show_as_tooltip = { + root.faith = { + remove_doctrine = doctrine_polygamy + add_doctrine = doctrine_monogamy + } + } + ai_chance = { + base = 100 + } + } + + option = { #Refuse to change + name = jewish_events.0001.b + trigger = { + this = root.culture.culture_head + root.culture = { + NOT = { has_cultural_tradition = tradition_polygamous } + } + } + add_piety = major_piety_loss + show_as_tooltip = { + root.faith = { + remove_doctrine = doctrine_polygamy + add_doctrine = doctrine_monogamy + } + } + root.culture = { + if = { + limit = { + has_cultural_tradition = tradition_monogamous + } + remove_culture_tradition = tradition_monogamous + } + if = { + limit = { + has_cultural_tradition = tradition_concubines + } + remove_culture_tradition = tradition_concubines + } + add_culture_tradition = tradition_polygamous + } + } + + option = { #Refuse to change but also you're powerful enough to supercede the priesthood + name = jewish_events.0001.c + trigger = { + exists = root.faith.religious_head + root.faith.religious_head = { is_vassal_or_below_of = root } + } + add_piety_level = -1 + reverse_add_opinion = { + target = root.faith.religious_head + modifier = insulted_opinion + opinion = -75 + } + root.faith = { + set_variable = { + name = rabbinicism_rejected_monogamy + value = yes + } + } + } + + after = { + add_character_flag = had_event_jewish_events_0001 + if = { + limit = { + NOT = { root.faith = { has_variable = rabbinicism_rejected_monogamy } } + } + if = { + limit = { + root.faith = { has_doctrine = doctrine_polygamy } + } + root.faith = { + set_variable = { + name = rabbinicism_accepted_monogamy + value = yes + } + remove_doctrine = doctrine_polygamy + add_doctrine = doctrine_monogamy + } + } + if = { + limit = { + exists = root.faith.religious_head + root.faith.religious_head = { is_vassal_or_below_of = root } + } + every_player = { + limit = { + faith = root.faith + NOT = { has_character_flag = had_event_jewish_events_0001 } + } + trigger_event = jewish_events.0001 + } + } + } + } +} \ No newline at end of file diff --git a/N3OW/events/religion_events/local_shrine_events.txt b/N3OW/events/religion_events/local_shrine_events.txt new file mode 100644 index 00000000..90b61da0 --- /dev/null +++ b/N3OW/events/religion_events/local_shrine_events.txt @@ -0,0 +1,795 @@ +######################## +# Rites in Local Shrine +######################## +namespace = local_rites +#shrine_location = Where we perform the rites (AKA the destination) + +scripted_trigger has_two_local_shrine_options_trigger = { + # Stops after we've found 2 good places for a sacrifice (don't want to overload the player). + calc_true_if = { + amount >= 2 + exists = scope:hills_location + exists = scope:mountains_location + exists = scope:temple_holding_location + exists = scope:forest_location + exists = scope:point_of_interest_location + exists = scope:mount_tai_location + } +} + +scripted_effect local_shrine_at_location_effect = { + set_variable = { + name = shrine_location + value = scope:$SHRINE$_location + } + scope:$SHRINE$_location = { #to show the location name in the difficulty custom tooltip + save_scope_as = tooltip_loc + } + start_travel_plan = { + destination = var:shrine_location + on_travel_planner_cancel_event = local_rites.10 + on_arrival_event = local_rites.2 + on_arrival_destinations = all_but_last + } + add_character_modifier = { + modifier = visit_local_shrine_modifier + days = local_shrine_duration + } + add_character_flag = { + flag = local_shrine_rite + years = 1 #This is a fallback, it is also cleared at location + } +} + +# If the player exits the travel planning UI, this event fires reseting the decision cooldown and removing variables +local_rites.10 = { + hidden = yes + trigger = { + OR = { + exists = var:shrine_location + has_character_flag = local_shrine_rite + } + } + immediate = { + current_travel_plan ?= { cancel_travel_plan = yes } + remove_decision_cooldown = visit_local_shrine_decision + remove_variable = shrine_location + remove_character_flag = local_shrine_rite + } +} + +local_rites.1 = { + type = character_event + title = local_rites.1.t + desc = local_rites.1.desc + theme = faith + + override_background = { + reference = throne_room + } + + left_portrait = { + character = root + animation = personality_rational + } + + immediate = { + # Stop characters from planning multiple activities at once. + add_character_flag = { + flag = planning_an_activity + days = 30 + } + + capital_barony.title_province = { + save_scope_as = capital_location + } + + # Pick out possible locations + # First any Special Building Shrines + # If I am the Emperor of China I go to Mount Tai + if = { + limit = { + #I am the emperor + has_title = title:h_china + #My dynasty did not perform this sacrifice before + dynasty = { + NOT = { has_variable = fengshan_performed } + } + #The Cycle is stable + OR = { + situation:dynastic_cycle = { + situation_current_phase = situation_dynastic_cycle_phase_stability_expansion + } + situation:dynastic_cycle = { + situation_current_phase = situation_dynastic_cycle_phase_stability_advancement + } + } + title:b_xuchang = { + this != root.capital_barony + holder.top_liege = root + } + } + title:b_xuchang = { + title_province = { save_scope_as = mount_tai_location } + } + } + # Everyone else + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + title_province = { save_scope_as = point_of_interest_location } + } + } + #Now we look for Mountains + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + trigger_if = { + limit = { exists = scope:point_of_interest_location } + title_province != scope:point_of_interest_location + } + title_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + title_province = { save_scope_as = mountains_location } + } + } + #Now we look for any Temple Holding + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + trigger_if = { + limit = { exists = scope:point_of_interest_location } + title_province != scope:point_of_interest_location + } + title_province = { + has_holding_type = church_holding + } + } + title_province = { save_scope_as = temple_holding_location } + } + } + #Now we look for Hills + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + trigger_if = { + limit = { exists = scope:point_of_interest_location } + title_province != scope:point_of_interest_location + } + title_province = { + OR = { + terrain = hills + terrain = terraced_hills + } + } + } + title_province = { save_scope_as = hills_location } + } + } + #Any Forests? + if = { + limit = { + has_two_local_shrine_options_trigger = no + } + random_sub_realm_barony = { + limit = { + this != root.capital_barony + trigger_if = { + limit = { exists = scope:point_of_interest_location } + title_province != scope:point_of_interest_location + } + title_province = { + OR = { + terrain = forest + terrain = taiga + } + } + } + title_province = { save_scope_as = forest_location } + } + } + #If we found nothing we look to the top realm + if = { + limit = { + NOT = { exists = scope:point_of_interest_location } #Because this is the one we try to save. + has_two_local_shrine_options_trigger = no + } + top_liege = { + random_sub_realm_barony = { + limit = { + this != root.capital_barony + this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + alternative_limit = { + this != root.capital_barony + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + title_province = { save_scope_as = point_of_interest_location } + } + } + } + #We also try this a second time for landless vassals. + if = { + limit = { + has_two_local_shrine_options_trigger = no + NOT = { exists = scope:point_of_interest_location } + } + top_liege = { + random_sub_realm_barony = { + limit = { + this != root.capital_barony + this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + alternative_limit = { + this != root.capital_barony + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + title_province = { save_scope_as = point_of_interest_location } + } + } + } + #And last but not least we try to save one for adventurers + if = { + limit = { + has_two_local_shrine_options_trigger = no + NOT = { exists = scope:point_of_interest_location } + exists = location.county + } + location.county.holder.top_liege = { + random_sub_realm_barony = { + limit = { + this != root.capital_barony + this.kingdom = root.capital_barony.kingdom #If possible we should keep close to where we started + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + alternative_limit = { + this != root.capital_barony + title_province = { + has_building_with_flag = travel_point_of_interest_religious + } + } + title_province = { save_scope_as = point_of_interest_location } + } + } + } + } + + # Option 1: Rituals at home - Low Impact + option = { #This option does not set the flag for being unavailable + name = local_rites.1.home + set_variable = { + name = shrine_location + value = scope:capital_location + } + add_character_modifier = { + modifier = visit_local_shrine_modifier + days = local_shrine_duration + } + scope:capital_location = { #to show the location name in the difficulty custom tooltip + save_scope_as = tooltip_loc + } + custom_tooltip = local_rites.1.home.tt + trigger_event = local_rites.3 #When you sacrifice at home this is instant. + } + + # I am the Emperor Headed for Mt Tai + option = { + trigger = { + exists = scope:mount_tai_location + scope:mount_tai_location.barony = title:b_xuchang + } + name = local_rites.1.mount_tai + local_shrine_at_location_effect = { SHRINE = mount_tai } + custom_tooltip = local_rites.1.fengshan.tt + } + # Visit Famous Shrine - High Impact, High Offering Expectation + option = { + trigger = { exists = scope:point_of_interest_location } + name = local_rites.1.major_shrine + local_shrine_at_location_effect = { SHRINE = point_of_interest } + custom_tooltip = local_rites.1.major_shrine.tt + } + + # Shrine in the hills. Medium Impact + option = { + trigger = { exists = scope:hills_location } + name = local_rites.1.hills + local_shrine_at_location_effect = { SHRINE = hills } + } + + # Shrine in the forest. Medium Impact + option = { + trigger = { exists = scope:forest_location } + name = local_rites.1.forest + local_shrine_at_location_effect = { SHRINE = forest } + } + + # Shrine in the mountains. Medium Impact + option = { + trigger = { exists = scope:mountains_location } + name = local_rites.1.mountains + local_shrine_at_location_effect = { SHRINE = mountains } + } + + # Shrine in the temple holding - High Impact, High Offerings. + option = { + trigger = { exists = scope:temple_holding_location } + name = local_rites.1.temple_holding + local_shrine_at_location_effect = { SHRINE = temple_holding } + custom_tooltip = local_rites.1.major_shrine.tt + } + + # Option 3: Opt-out + option = { + name = local_shrine.optout + flavor = local_shrine.optout.flavor + + ai_chance = { + base = 0 + } + + remove_decision_cooldown = visit_local_shrine_decision + } + + after = { + remove_character_flag = planning_an_activity + trigger_event = local_rites.5 + } +} + +local_rites.5 = { + hidden = yes + immediate = { + hidden_effect = { + random_courtier = { #We want to bring a priest if we can, if not we still want at least one character. + limit = { + is_adult = yes + is_clergy = yes + is_diarch = no + is_travelling = no + } + alternative_limit = { + is_adult = yes + is_diarch = no + is_travelling = no + } + save_scope_as = companion + } + root.current_travel_plan ?= { + add_companion = scope:companion + } + } + } +} + +local_rites.2 = { + hidden = yes + immediate = { + send_interface_toast = { + title = local_rites.2.toast + left_icon = root + current_travel_plan = { + delay_travel_plan = { days = local_shrine_duration } + } + } + trigger_event = { + id = local_rites.3 + days = local_shrine_duration + } + } +} + +local_rites.3 = { #Destination - Making a Sacrifice + type = character_event + title = { + first_valid = { + triggered_desc = { + trigger = { + has_title = title:h_china + var:shrine_location.barony = title:b_xuchang + } + desc = local_rites.3.t.fengshan #Fang Shan + } + triggered_desc = { + trigger = { + OR = { + OR = { + faith = { is_in_family = rf_sinitic } + faith = faith:pundarika + faith = faith:mantrayana + faith = faith:dhyana + faith = faith:sukhavati + faith = faith:avatamsaka + faith = faith:maitreya + faith = faith:vinaya + faith = faith:yogacara + faith = faith:acharya + } + } + } + desc = local_rites.3.t #Sacrificing to Heaven + } + desc = local_rites.3.fallback.t #More Generic Version + } + } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:at_home = yes } + desc = local_rites.3.desc_at_home + } + triggered_desc = { + trigger = { + has_title = title:h_china + var:shrine_location.barony = title:b_xuchang + } + desc = local_rites.3.desc_mt_tai_huangdi + } + triggered_desc = { + trigger = { + var:shrine_location = { + has_building_with_flag = travel_point_of_interest_religious + } + } + desc = local_rites.3.desc_important_shrine + } + triggered_desc = { + trigger = { + var:shrine_location = { + has_holding_type = church_holding + } + } + desc = local_rites.3.desc_holding_shrine + } + triggered_desc = { + trigger = { + var:shrine_location = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + desc = local_rites.3.desc_mountain_shrine + } + triggered_desc = { + trigger = { + var:shrine_location = { + OR = { + terrain = forest + terrain = taiga + } + } + } + desc = local_rites.3.desc_forest_shrine + } + triggered_desc = { + trigger = { + var:shrine_location = { + terrain = hills + } + } + desc = local_rites.3.desc_hills_shrine + } + } + triggered_desc = { + trigger = { + has_trait = cynical + } + desc = local_rites.3.desc_cynical + } + } + theme = faith + override_background = { #Fengshan + trigger = { + has_title = title:h_china + var:shrine_location.barony = title:b_xuchang + } + reference = mpo_steppe_evening + } + override_background = { + trigger = { scope:at_home = yes } + reference = tgp_temple_asia + } + override_background = { + trigger = { + scope:at_home = no + scope:shrine_location = { + OR = { + has_building_with_flag = travel_point_of_interest_religious + has_holding_type = church_holding + } + } + } + reference = tgp_holysite_asia + } + override_background = { + trigger = { + scope:at_home = no + scope:shrine_location = { + NOR = { + has_building_with_flag = travel_point_of_interest_religious + has_holding_type = church_holding + } + } + } + reference = wilderness_scope + } + left_portrait = { + character = root + animation = personality_zealous + } + right_portrait = { + character = scope:companion + animation = pondering + } + + immediate = { + + if = { #First we try to get a travel companion + limit = { + current_travel_plan ?= { + any_entourage_character = { + NOT = { this = root } + is_adult = yes + } + } + } + current_travel_plan ?= { + random_entourage_character = { + limit = { + NOT = { this = root } + is_clergy = yes + is_adult = yes + } + alternative_limit = { + NOT = { this = root } + is_adult = yes + } + save_scope_as = companion + } + } + } + else_if = { #If you are travelling without adult companions we get a courtier/follower. + limit = { + any_courtier = { + is_adult = yes + } + } + random_courtier = { + limit = { + is_adult = yes + is_clergy = yes + } + alternative_limit = { + is_adult = yes + } + save_scope_as = companion + } + } + else = { #Your court is somehow also empty. If we get here it is going to be a bit weird. But we shouldn't. + random_pool_character = { + province = root.location + limit = { + is_adult = yes + } + save_scope_as = companion + } + } + + if = { + limit = { + NOT = { + exists = var:shrine_location + } + } + set_variable = { + name = shrine_location + value = root.location + } + } + var:shrine_location = { + save_scope_as = shrine_location + save_scope_as = background_wilderness_scope + } + + # Are we at home? + if = { + limit = { + exists = capital_province + scope:shrine_location = root.capital_province + } + save_scope_value_as = { + name = at_home + value = yes + } + } + else = { + save_scope_value_as = { + name = at_home + value = no + } + } + + #Are we at Mt Tai? Am I the Emperor? + if = { + limit = { + has_title = title:h_china + var:shrine_location.barony = title:b_xuchang + } + hidden_effect = { + dynasty = { set_variable = fengshan_performed } + } + } + } + + option = { + name = fengshan_option + trigger = { + has_title = title:h_china + var:shrine_location.barony = title:b_xuchang + } + add_treasury = { + value = major_treasury_value + multiply = -1 + } + add_prestige = massive_prestige_loss + add_legitimacy = massive_legitimacy_gain + add_piety = major_piety_gain + } + option = { + name = local_rites.3.pay_gold + trigger = { + scope:at_home = no + NOR = { + has_title = title:h_china + var:shrine_location.barony = title:b_xuchang + } + } + #Pay Gold - Get Piety + switch = { + trigger = exists + scope:hills_location = { + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_gain + } + scope:mountains_location = { + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_gain + } + scope:temple_holding_location = { + remove_short_term_gold = medium_gold_value + add_piety = major_piety_gain + } + scope:forest_location = { + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_gain + } + scope:shrine_location = { + remove_short_term_gold = medium_gold_value + add_piety = major_piety_gain + } + } + } + option = { + name = local_rites.3.pay_prestige + trigger = { + scope:at_home = no + NOR = { + has_title = title:h_china + var:shrine_location.barony = title:b_xuchang + } + } + #Pay Prestige - Get Piety + switch = { + trigger = exists + scope:hills_location = { + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + } + scope:mountains_location = { + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + } + scope:temple_holding_location = { + add_prestige = medium_prestige_loss + add_piety = major_piety_gain + } + scope:forest_location = { + add_prestige = minor_prestige_loss + add_piety = medium_piety_gain + } + scope:shrine_location = { + add_prestige = medium_prestige_loss + add_piety = major_piety_gain + } + } + } + option = { + name = local_rites.3.pay_at_home #So be it + trigger = { + scope:at_home = yes + } + #Pay A little Gold - Get Piety + remove_short_term_gold = miniscule_gold_value + add_piety = minor_piety_gain + remove_character_flag = local_shrine_rite + } + + after = { + stress_impact = { #Not the main purpose of the trip but the ritual comes with some stress relief + base = minor_stress_impact_loss + zealous = minor_stress_impact_loss + cynical = minor_stress_impact_gain + } + + # Run the clean-up event. + if = { + limit = { + scope:at_home = no + } + trigger_event = { + id = local_rites.1000 + days = 30 + } + } + else = { + remove_variable = shrine_location + } + } +} + +local_rites.1000 = { + hidden = yes + immediate = { + send_interface_toast = { + title = religious_decision.0291.toast + left_icon = root + current_travel_plan ?= { + if = { + limit = { is_paused = yes } + resume_travel_plan = yes + } + } + } + remove_variable = shrine_location + remove_character_flag = local_shrine_rite + } +} diff --git a/N3OW/events/religion_events/religious_decision_events.txt b/N3OW/events/religion_events/religious_decision_events.txt new file mode 100644 index 00000000..9ebab0f0 --- /dev/null +++ b/N3OW/events/religion_events/religious_decision_events.txt @@ -0,0 +1,3028 @@ +namespace = religious_decision + +######################### +# Seek Aid of Spirits # +# by Sean Hughes # +# 0001-0009 # +######################### + + +religious_decision.0001 = { + type = character_event + title = religious_decision.0001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { has_government = landless_adventurer_government } + desc = religious_decision.0001.desc_landless + } + desc = religious_decision.0001.desc + } + } + theme = faith + override_background = { reference = fp3_cave } + left_portrait = { + character = root + triggered_animation = { + trigger = { + NOT = { exists = scope:realm_priest } + } + animation = personality_zealous + } + triggered_animation = { + trigger = { + NOT = { has_trait = cynical } + } + animation = disbelief + } + animation = personality_coward + } + right_portrait = { + trigger = { exists = scope:realm_priest } + character = scope:realm_priest + animation = personality_zealous + } + trigger = { + NOT = { has_character_flag = flag_sought_aid_of_spirits } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { + save_scope_as = realm_priest + } + } + } + + option = { + trigger = { + OR = { + is_ai = no + short_term_gold > major_gold_value + } + } + name = religious_decision.0001.a + remove_short_term_gold = major_gold_value + custom_tooltip = religious_decision.0001.a.tt.1 + custom_tooltip = religious_decision.0001.a.tt.2 + save_scope_value_as = { + name = offering + value = flag:expensive + } + stress_impact = { + greedy = medium_stress_gain + cynical = medium_stress_gain + } + trigger_event = { + id = religious_decision.0002 + days = { 2 3 } + } + ai_chance = { + base = 0 + + ai_value_modifier = { + ai_zeal = 10 + ai_greed = -10 + } + } + } + + option = { + trigger = { + OR = { + is_ai = no + short_term_gold > minor_gold_value + } + } + name = religious_decision.0001.b + remove_short_term_gold = minor_gold_value + custom_tooltip = religious_decision.0001.b.tt + save_scope_value_as = { + name = offering + value = flag:traditional + } + trigger_event = { + id = religious_decision.0002 + days = { 2 3 } + } + ai_chance = { + base = 100 + } + } + + option = { + name = religious_decision.0001.c + custom_tooltip = religious_decision.0001.c.tt + save_scope_value_as = { + name = offering + value = flag:none + } + stress_impact = { + generous = medium_stress_gain + humble = medium_stress_gain + } + trigger_event = { + id = religious_decision.0002 + days = { 2 3 } + } + + ai_chance = { + base = 0 + + ai_value_modifier = { + ai_boldness = 5 + ai_greed = 5 + ai_zeal = -10 + } + + modifier = { + add = 980 + has_trait = arrogant + } + } + } + + option = { + name = religious_decision.0001.d + flavor = religious_decision.0001.d.flavor + remove_character_flag = flag_sought_aid_of_spirits + ai_chance = { + base = 0 + } + } +} + +religious_decision.0002 = { + type = character_event + title = religious_decision.0002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:realm_priest + scope:offering = flag:none + } + desc = religious_decision.0002.desc.start_no_offering + } + triggered_desc = { + trigger = { scope:offering = flag:none } + desc = religious_decision.0002.desc.start_no_offering_alone + } + triggered_desc = { + trigger = { exists = scope:realm_priest } + desc = religious_decision.0002.desc.start_offering + } + desc = religious_decision.0002.desc.start_offering_alone + } + first_valid = { + triggered_desc = { + trigger = { exists = scope:realm_priest } + desc = religious_decision.0002.desc + } + desc = religious_decision.0002.desc_alone + } + first_valid = { + triggered_desc = { + trigger = { + scope:outcome = flag:no_effect + } + desc = religious_decision.0002.desc.end_no_change + } + desc = religious_decision.0002.desc.end_changed + } + } + theme = faith + override_background = { reference = fp3_cave } + left_portrait = { + character = root + triggered_animation = { + trigger = { scope:outcome = flag:shrewd } + animation = personality_rational + } + triggered_animation = { + trigger = { + OR = { + scope:outcome = flag:strong + scope:outcome = flag:wind_spirit + scope:outcome = flag:water_spirit + scope:outcome = flag:tree_spirit + scope:outcome = flag:bush_spirit + scope:outcome = flag:rock_spirit + } + } + animation = ecstasy + } + triggered_animation = { + trigger = { + OR = { + scope:outcome = flag:possessed + scope:outcome = flag:impotent + } + } + animation = paranoia + } + triggered_animation = { + trigger = { scope:outcome = flag:ill } + animation = sick + } + triggered_animation = { + trigger = { scope:outcome = flag:infirm } + animation = personality_irrational + } + animation = disbelief + } + right_portrait = { + trigger = { exists = scope:realm_priest } + character = scope:realm_priest + animation = personality_zealous + } + + trigger = { + trigger_if = { + limit = { exists = scope:realm_priest } + scope:realm_priest = { is_available_adult = yes } + } + } + # Refund the player's money if the ritual fails for some reason. + on_trigger_fail = { + if = { + limit = { + scope:offering = flag:expensive + } + add_gold = major_gold_value + } + else_if = { + limit = { + scope:offering = flag:traditional + } + add_gold = minor_gold_value + } + } + immediate = { + # Character cannot take this decision again for 5 years. + add_character_flag = { + flag = flag_sought_aid_of_spirits + years = 5 + } + # Determine what the impact of the ritual will be. + if = { + #Realm Priest, don't fail me now + limit = { exists = scope:realm_priest } + random_list = { + # Positive Effect + 40 = { # Maximum ~85% chance of a good effect (Expensive offering nullifies no outcome; 60 weight good vs. 10 weight bad) + compare_modifier = { + value = { + value = scope:realm_priest.learning + subtract = 10 + } + } + modifier = { + add = 10 + scope:realm_priest = { has_trait = lifestyle_mystic } + } + random_list = { + # Permanent Skill Boost + 10 = { + # Minimum chance of ~0%. Maximum chance of ~40% (Miracle Worker RP with 20 Learning and an Expensive Offering) + compare_modifier = { + value = { + value = scope:realm_priest.learning + subtract = 10 + } + } + modifier = { + add = 10 + scope:realm_priest = { has_trait = lifestyle_mystic } + } + modifier = { + add = 10 + scope:realm_priest = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 50 + } + } + } + modifier = { + add = 10 + scope:realm_priest = { + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + } + } + modifier = { + add = 40 + scope:offering = flag:expensive + } + trigger = { + NAND = { + has_trait = shrewd + has_trait_rank = { + trait = intellect_bad + rank > 0 + } + has_trait = strong + has_trait_rank = { + trait = physique_bad + rank > 0 + } + } + } + random_list = { + 50 = { + trigger = { + NOR = { + has_trait = shrewd + has_trait_rank = { + trait = intellect_bad + rank > 0 + } + } + } + save_scope_value_as = { + name = outcome + value = flag:shrewd + } + } + 50 = { + trigger = { + NOR = { + has_trait = strong + has_trait_rank = { + trait = physique_bad + rank > 0 + } + } + } + save_scope_value_as = { + name = outcome + value = flag:strong + } + } + } + } + # Temporary Skill Boost + 90 = { + random_list = { + 20 = { + save_scope_value_as = { + name = outcome + value = flag:wind_spirit + } + } + 20 = { + save_scope_value_as = { + name = outcome + value = flag:water_spirit + } + } + 20 = { + save_scope_value_as = { + name = outcome + value = flag:bush_spirit + } + } + 20 = { + save_scope_value_as = { + name = outcome + value = flag:rock_spirit + } + } + 20 = { + save_scope_value_as = { + name = outcome + value = flag:tree_spirit + } + } + } + } + } + } + # No Effect + 40 = { + # Offering modifiers only effect the 'None' chance. + modifier = { # 0% chance with expensive offering. + add = -40 + scope:offering = flag:expensive + } + modifier = { # 40% chance with standard offering. + add = 0 + scope:offering = flag:traditional + } + modifier = { # 66% chance with no offering. + add = 80 + scope:offering = flag:none + NOT = { has_trait = arrogant } + } + + # Since the effects of the ritual could be explained through belief alone (placebo effect), a character's skepticism influences if they receive a bonus or not. + modifier = { # Cynical characters less likely to believe in the ritual. + add = 40 + has_trait = cynical + } + modifier = { # Zealous characters more likely to believe in the ritual. + add = -20 + has_trait = zealous + } + save_scope_value_as = { + name = outcome + value = flag:no_effect + } + } + # Negative Effect + 20 = { + modifier = { + add = 20 + scope:offering = flag:none + } + compare_modifier = { + value = { + value = 10 + subtract = scope:realm_priest.learning + min = -10 + } + } + random_list = { + 25 = { + trigger = { NOT = { has_trait = possessed } } + modifier = { + add = 100 + scope:offering = flag:expensive + } + save_scope_value_as = { + name = outcome + value = flag:possessed + } + } + 25 = { + trigger = { NOT = { has_trait = impotent } } + save_scope_value_as = { + name = outcome + value = flag:impotent + } + } + 25 = { + trigger = { can_contract_disease_trigger = { DISEASE = ill } } + save_scope_value_as = { + name = outcome + value = flag:ill + } + } + 25 = { + trigger = { NOT = { has_trait = infirm } } + save_scope_value_as = { + name = outcome + value = flag:infirm + } + } + } + } + } + } + #... we're on our own + else = { + random_list = { + # Positive Effect + 40 = { # Maximum ~85% chance of a good effect (Expensive offering nullifies no outcome; 60 weight good vs. 10 weight bad) + compare_modifier = { + value = { + value = learning + subtract = 10 + } + } + modifier = { + add = 10 + has_trait = lifestyle_mystic + } + random_list = { + # Permanent Skill Boost + 10 = { + # Minimum chance of ~0%. Maximum chance of ~40% (Miracle Worker RP with 20 Learning and an Expensive Offering) + compare_modifier = { + value = { + value = learning + subtract = 10 + } + } + modifier = { + add = 10 + has_trait = lifestyle_mystic + } + modifier = { + add = 10 + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 50 + } + } + modifier = { + add = 10 + has_trait = lifestyle_mystic + has_trait_xp = { + trait = lifestyle_mystic + value >= 100 + } + } + modifier = { + add = 40 + scope:offering = flag:expensive + } + trigger = { + NAND = { + has_trait = shrewd + has_trait_rank = { + trait = intellect_bad + rank > 0 + } + has_trait = strong + has_trait_rank = { + trait = physique_bad + rank > 0 + } + } + } + random_list = { + 50 = { + trigger = { + NOR = { + has_trait = shrewd + has_trait_rank = { + trait = intellect_bad + rank > 0 + } + } + } + save_scope_value_as = { + name = outcome + value = flag:shrewd + } + } + 50 = { + trigger = { + NOR = { + has_trait = strong + has_trait_rank = { + trait = physique_bad + rank > 0 + } + } + } + save_scope_value_as = { + name = outcome + value = flag:strong + } + } + } + } + # Temporary Skill Boost + 90 = { + random_list = { + 20 = { + save_scope_value_as = { + name = outcome + value = flag:wind_spirit + } + } + 20 = { + save_scope_value_as = { + name = outcome + value = flag:water_spirit + } + } + 20 = { + save_scope_value_as = { + name = outcome + value = flag:bush_spirit + } + } + 20 = { + save_scope_value_as = { + name = outcome + value = flag:rock_spirit + } + } + 20 = { + save_scope_value_as = { + name = outcome + value = flag:tree_spirit + } + } + } + } + } + } + # No Effect + 40 = { + # Offering modifiers only effect the 'None' chance. + modifier = { # 0% chance with expensive offering. + add = -40 + scope:offering = flag:expensive + } + modifier = { # 40% chance with standard offering. + add = 0 + scope:offering = flag:traditional + } + modifier = { # 66% chance with no offering. + add = 80 + scope:offering = flag:none + NOT = { has_trait = arrogant } + } + + # Since the effects of the ritual could be explained through belief alone (placebo effect), a character's skepticism influences if they receive a bonus or not. + modifier = { # Cynical characters less likely to believe in the ritual. + add = 40 + has_trait = cynical + } + modifier = { # Zealous characters more likely to believe in the ritual. + add = -20 + has_trait = zealous + } + save_scope_value_as = { + name = outcome + value = flag:no_effect + } + } + # Negative Effect + 20 = { + modifier = { + add = 20 + scope:offering = flag:none + } + compare_modifier = { + value = { + value = 10 + subtract = learning + min = -10 + } + } + random_list = { + 25 = { + trigger = { NOT = { has_trait = possessed } } + modifier = { + add = 100 + scope:offering = flag:expensive + } + save_scope_value_as = { + name = outcome + value = flag:possessed + } + } + 25 = { + trigger = { NOT = { has_trait = impotent } } + save_scope_value_as = { + name = outcome + value = flag:impotent + } + } + 25 = { + trigger = { can_contract_disease_trigger = { DISEASE = ill } } + save_scope_value_as = { + name = outcome + value = flag:ill + } + } + 25 = { + trigger = { NOT = { has_trait = infirm } } + save_scope_value_as = { + name = outcome + value = flag:infirm + } + } + } + } + } + } + + # If we failed to set the outcome flag, set it now. + if = { + limit = { + NOT = { exists = scope:outcome } + } + save_scope_value_as = { + name = outcome + value = flag:no_effect + } + } + } + + option = { + # Custom name text based on ritual outcome. + name = { + trigger = { scope:outcome = flag:shrewd } + text = religious_decision.0002.shrewd + } + name = { + trigger = { scope:outcome = flag:strong } + text = religious_decision.0002.strong + } + name = { + trigger = { + OR = { + scope:outcome = flag:wind_spirit + scope:outcome = flag:water_spirit + scope:outcome = flag:rock_spirit + scope:outcome = flag:bush_spirit + scope:outcome = flag:tree_spirit + } + } + text = religious_decision.0002.good + } + name = { + trigger = { + OR = { + scope:outcome = flag:ill + scope:outcome = flag:impotent + scope:outcome = flag:infirm + } + } + text = religious_decision.0002.bad + } + name = { + trigger = { scope:outcome = flag:possessed } + text = religious_decision.0002.possessed + } + name = { + trigger = { + scope:outcome = flag:no_effect + has_trait = zealous + } + text = religious_decision.0002.no_change.zealous + } + name = { + trigger = { + scope:outcome = flag:no_effect + NOT = { has_trait = zealous } + } + text = religious_decision.0002.no_change + } + + # Apply the actual outcome effects: + # Good Outcomes + if = { + limit = { scope:outcome = flag:shrewd } + if = { + limit = { has_trait = dull } + remove_trait = dull + } + else = { + add_trait = shrewd + } + } + else_if = { + limit = { scope:outcome = flag:strong } + if = { + limit = { has_trait = weak } + remove_trait = weak + } + else = { + add_trait = strong + } + } + else_if = { + limit = { scope:outcome = flag:wind_spirit } + add_character_modifier = { + modifier = wind_spirit_blessing + years = 20 + } + } + else_if = { + limit = { scope:outcome = flag:water_spirit } + add_character_modifier = { + modifier = water_spirit_blessing + years = 20 + } + } + else_if = { + limit = { scope:outcome = flag:tree_spirit } + add_character_modifier = { + modifier = tree_spirit_blessing + years = 20 + } + } + else_if = { + limit = { scope:outcome = flag:bush_spirit } + add_character_modifier = { + modifier = bush_spirit_blessing + years = 20 + } + } + else_if = { + limit = { scope:outcome = flag:rock_spirit } + add_character_modifier = { + modifier = rock_spirit_blessing + years = 20 + } + } + # Bad Outcomes + else_if = { + limit = { scope:outcome = flag:possessed } + add_trait = possessed_1 + } + else_if = { + limit = { scope:outcome = flag:impotent } + add_trait = impotent + } + else_if = { + limit = { scope:outcome = flag:ill } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + else_if = { + limit = { scope:outcome = flag:infirm } + add_trait = infirm + } + } +} + +######################### +# Select Personal God # +# by Sean Hughes # +# 0101-0120 # +######################### + +religious_decision.0101 = { + type = character_event + title = religious_decision.0101.t + desc = { + desc = religious_decision.0101.desc.start + first_valid = { + triggered_desc = { + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:vaishnavism } + } + } + desc = religious_decision.0101.desc.vaishnavism + } + triggered_desc = { + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + } + } + desc = religious_decision.0101.desc.shaivism + } + triggered_desc = { + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:smartism } + } + } + desc = religious_decision.0101.desc.smartism + } + desc = religious_decision.0101.desc.generic + } + desc = religious_decision.0101.desc.end + } + theme = faith + left_portrait = { + character = root + animation = personality_rational + } + + # 'Generic' Hinduism + option = { + name = religious_decision.0101.ganga + trigger = { + NOR = { + # vaishnavism includes this one + faith = { + OR = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:smartism } + } + } + has_character_modifier = bhakti_hinduism_ganga + } + } + set_bhakti_effect = { BHAKTI = bhakti_hinduism_ganga } + } + + option = { + name = religious_decision.0101.saraswati + trigger = { + NOR = { + faith = { + OR = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:vaishnavism } + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:smartism } + } + } + has_character_modifier = bhakti_hinduism_saraswati + } + } + set_bhakti_effect = { BHAKTI = bhakti_hinduism_saraswati } + } + + option = { + name = religious_decision.0101.kali + trigger = { + NOR = { + faith = { + OR = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:vaishnavism } + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:smartism } + } + } + has_character_modifier = bhakti_hinduism_kali + } + } + set_bhakti_effect = { BHAKTI = bhakti_hinduism_kali } + } + + option = { + name = religious_decision.0101.kubera + trigger = { + NOR = { + faith = { + OR = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:vaishnavism } + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + } + } + # smartism includes this one + has_character_modifier = bhakti_hinduism_kubera + } + } + set_bhakti_effect = { BHAKTI = bhakti_hinduism_kubera } + } + + # Vaishnavism + option = { + name = religious_decision.0101.lakishmi + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:vaishnavism } + } + NOT = { has_character_modifier = bhakti_vaishnavism_lakishmi } + } + set_bhakti_effect = { BHAKTI = bhakti_vaishnavism_lakishmi } + } + + option = { + name = religious_decision.0101.jagganath + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:vaishnavism } + } + NOT = { has_character_modifier = bhakti_vaishnavism_jagganath } + } + set_bhakti_effect = { BHAKTI = bhakti_vaishnavism_jagganath } + } + + option = { + name = religious_decision.0101.hayagriva + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:vaishnavism } + } + NOT = { has_character_modifier = bhakti_vaishnavism_hayagriva } + } + set_bhakti_effect = { BHAKTI = bhakti_vaishnavism_hayagriva } + } + + # Shaivism + option = { + name = religious_decision.0101.parvati + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + } + NOT = { has_character_modifier = bhakti_shaivism_parvati } + } + set_bhakti_effect = { BHAKTI = bhakti_shaivism_parvati } + } + + option = { + name = religious_decision.0101.virabhadra + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + } + NOT = { has_character_modifier = bhakti_shaivism_virabhadra } + } + set_bhakti_effect = { BHAKTI = bhakti_shaivism_virabhadra } + } + + option = { + name = religious_decision.0101.munishwarar + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + } + NOT = { has_character_modifier = bhakti_shaivism_munishwarar } + } + set_bhakti_effect = { BHAKTI = bhakti_shaivism_munishwarar } + } + + option = { + name = religious_decision.0101.dakshinamoorthy + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:shaivism } + } + NOT = { has_character_modifier = bhakti_shaivism_dakshinamoorthy } + } + set_bhakti_effect = { BHAKTI = bhakti_shaivism_dakshinamoorthy } + } + + # Smartism + option = { + name = religious_decision.0101.ganesha + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:smartism } + } + NOT = { has_character_modifier = bhakti_smartism_ganesha } + } + set_bhakti_effect = { BHAKTI = bhakti_smartism_ganesha } + } + + option = { + name = religious_decision.0101.vishnu + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:smartism } + } + NOT = { has_character_modifier = bhakti_smartism_vishnu } + } + set_bhakti_effect = { BHAKTI = bhakti_smartism_vishnu } + } + + option = { + name = religious_decision.0101.shiva + trigger = { + faith = { + portrait_religious_faith_or_foundational_trigger = { FAITH = faith:smartism } + } + NOT = { has_character_modifier = bhakti_smartism_shiva } + } + set_bhakti_effect = { BHAKTI = bhakti_smartism_shiva } + } + + # Opt-Out + option = { + name = religious_decision.0101.optout + flavor = religious_decision.0101.flavor + + ai_chance = { + base = 0 + } + } +} + +religious_decision.0102 = { + type = character_event + title = religious_decision.0102.t + desc = religious_decision.0102.desc + theme = faith + left_portrait = { + character = root + animation = personality_rational + } + + # Odin + option = { + name = religious_decision.0102.odin + trigger = { + NOT = { has_character_modifier = bhakti_germanic_generic_odin } + } + set_bhakti_effect = { BHAKTI = bhakti_germanic_generic_odin } + } + + # Ullr + option = { + name = religious_decision.0102.ullr + trigger = { + is_vaguely_danish_bhakti_trigger = no + NOT = { has_character_modifier = bhakti_germanic_not_danish_ullr } + } + set_bhakti_effect = { BHAKTI = bhakti_germanic_not_danish_ullr } + } + + # Tyr + option = { + name = religious_decision.0102.tyr + trigger = { + is_vaguely_danish_bhakti_trigger = yes + NOT = { has_character_modifier = bhakti_germanic_danish_tyr } + } + set_bhakti_effect = { BHAKTI = bhakti_germanic_danish_tyr } + } + + # Thor + option = { + name = religious_decision.0102.thor + trigger = { + NOT = { has_character_modifier = bhakti_germanic_generic_thor } + } + set_bhakti_effect = { BHAKTI = bhakti_germanic_generic_thor } + } + + # Freyr + option = { + name = religious_decision.0102.freyr + trigger = { + NOT = { has_character_modifier = bhakti_germanic_generic_freyr } + } + set_bhakti_effect = { BHAKTI = bhakti_germanic_generic_freyr } + } + + # Opt-Out + option = { + name = religious_decision.0102.optout + flavor = religious_decision.0102.flavor + + ai_chance = { + base = 0 + } + } +} + +######################### +# Meditate in Seclusion # +# by Sean Hughes # +# 0201-0299 # +######################### + +# If the player exits the travel planning UI, this event fires reseting the decision cooldown and removing variables +religious_decision.0200 = { + hidden = yes + trigger = { + OR = { + exists = var:meditation_location + has_character_flag = meditation_character_flag + } + } + immediate = { + current_travel_plan ?= { + if = { + limit = { can_cancel = yes } + cancel_travel_plan = yes + } + } + remove_decision_cooldown = meditate_in_seclusion_decision + remove_variable = meditation_location + remove_character_flag = meditation_character_flag + } +} + +scripted_trigger religious_decision_0201_can_meditate_in_terrain_trigger = { + religious_decision_0201_has_two_meditation_options_trigger = no + any_sub_realm_barony = { + this != root.capital_barony + title_province = { + terrain = $TERRAIN$ + } + } +} + +scripted_trigger religious_decision_0201_has_two_meditation_options_trigger = { + # Stops after we've found 2 good places for meditation (don't want to overload the player). + calc_true_if = { + amount >= 2 + has_character_flag = meditation_option_plains + has_character_flag = meditation_option_hills + has_character_flag = meditation_option_steppe + has_character_flag = meditation_option_forest + has_character_flag = meditation_option_drylands + has_character_flag = meditation_option_mountains + has_character_flag = meditation_option_wetlands + has_character_flag = meditation_option_jungle + has_character_flag = meditation_option_desert + } +} + +scripted_effect save_meditation_option_effect = { + add_character_flag = meditation_option_$TERRAIN$ + random_sub_realm_barony = { + limit = { + this != root.capital_barony + title_province = { + terrain = $TERRAIN$ + } + } + title_province = { save_scope_as = $TERRAIN$_location } + } +} + +scripted_effect meditate_at_location_effect = { + set_variable = { + name = meditation_location + value = scope:$TERRAIN$_location + } + scope:$TERRAIN$_location = { #to show the location name in the difficulty custom tooltip + save_scope_as = tooltip_loc + } + start_travel_plan = { + destination = var:meditation_location + on_travel_planner_cancel_event = religious_decision.0200 + on_arrival_event = religious_decision.0210 + on_arrival_destinations = all_but_last + } + add_character_modifier = { + modifier = meditating_in_seclusion_modifier + days = meditation_duration + } + add_character_flag = meditation_character_flag +} + +religious_decision.0201 = { + type = character_event + title = religious_decision.0201.t + desc = religious_decision.0201.desc + theme = faith + + override_background = { + reference = throne_room + } + + left_portrait = { + character = root + animation = personality_rational + } + + immediate = { + # Stop characters from planning multiple activities at once. + add_character_flag = { + flag = planning_an_activity + days = 30 + } + + # Save the character's capital scope for meditation + capital_barony.title_province = { + save_scope_as = capital_location + } + + # Generate options for meditation based on terrain in character's realm. + if = { + limit = { + religious_decision_0201_has_two_meditation_options_trigger = no + any_sub_realm_barony = { + this != root.capital_barony + title_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + } + add_character_flag = meditation_option_mountains + random_sub_realm_barony = { + limit = { + this != root.capital_barony + title_province = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + title_province = { save_scope_as = mountains_location } + } + } + if = { + limit = { religious_decision_0201_can_meditate_in_terrain_trigger = {TERRAIN = steppe}} + save_meditation_option_effect = { TERRAIN = steppe } + } + if = { + limit = { + religious_decision_0201_has_two_meditation_options_trigger = no + any_sub_realm_barony = { + this != root.capital_barony + title_province = { + OR = { + terrain = forest + terrain = taiga + } + } + } + } + add_character_flag = meditation_option_forest + random_sub_realm_barony = { + limit = { + this != root.capital_barony + title_province = { + OR = { + terrain = forest + terrain = taiga + } + } + } + title_province = { save_scope_as = forest_location } + } + } + if = { + limit = { religious_decision_0201_can_meditate_in_terrain_trigger = {TERRAIN = desert}} + save_meditation_option_effect = { TERRAIN = desert } + } + if = { + limit = { religious_decision_0201_can_meditate_in_terrain_trigger = {TERRAIN = hills}} + save_meditation_option_effect = { TERRAIN = hills } + } + if = { + limit = { religious_decision_0201_can_meditate_in_terrain_trigger = {TERRAIN = drylands}} + save_meditation_option_effect = { TERRAIN = drylands } + } + if = { + limit = { religious_decision_0201_can_meditate_in_terrain_trigger = {TERRAIN = plains}} + save_meditation_option_effect = { TERRAIN = plains } + } + if = { + limit = { religious_decision_0201_can_meditate_in_terrain_trigger = {TERRAIN = jungle}} + save_meditation_option_effect = { TERRAIN = jungle } + } + if = { + limit = { religious_decision_0201_can_meditate_in_terrain_trigger = {TERRAIN = wetlands}} + save_meditation_option_effect = { TERRAIN = wetlands } + } + } + + # Option 1: Meditate at home. Lowest risk, lowest reward. + option = { + name = religious_decision.0201.home + set_variable = { + name = meditation_location + value = scope:capital_location + } + add_character_flag = meditation_character_flag + add_character_modifier = { + modifier = meditating_in_seclusion_modifier + days = meditation_duration + } + scope:capital_location = { #to show the location name in the difficulty custom tooltip + save_scope_as = tooltip_loc + } + custom_tooltip = religious_decision.0201.difficulty.easy + trigger_event = { + id = religious_decision.0211 + days = meditation_duration + } + } + + # Option 2-A: Meditate in the plains. Low risk, low reward. + option = { + trigger = { has_character_flag = meditation_option_plains } + name = religious_decision.0201.plains + meditate_at_location_effect = { TERRAIN = plains } + custom_tooltip = religious_decision.0201.difficulty.easy + custom_tooltip = religious_decision.0201.stress + } + + # Option 2-B: Meditate in the hills. Low risk, low reward. + option = { + trigger = { has_character_flag = meditation_option_hills } + name = religious_decision.0201.hills + meditate_at_location_effect = { TERRAIN = hills } + custom_tooltip = religious_decision.0201.difficulty.easy + custom_tooltip = religious_decision.0201.learning + } + + # Option 2-C: Meditate in the steppe. Low risk, medium reward. + option = { + trigger = { has_character_flag = meditation_option_steppe } + name = religious_decision.0201.steppe + meditate_at_location_effect = { TERRAIN = steppe } + custom_tooltip = religious_decision.0201.difficulty.easy + custom_tooltip = religious_decision.0201.trait + } + + # Option 2-D: Meditate in the forest. Medium risk, medium reward. + option = { + trigger = { has_character_flag = meditation_option_forest } + name = religious_decision.0201.forest + meditate_at_location_effect = { TERRAIN = forest } + custom_tooltip = religious_decision.0201.difficulty.medium + custom_tooltip = religious_decision.0201.stress + } + + # Option 2-E: Meditate in the drylands. Medium risk, medium reward. + option = { + trigger = { has_character_flag = meditation_option_drylands } + name = religious_decision.0201.drylands + meditate_at_location_effect = { TERRAIN = drylands } + custom_tooltip = religious_decision.0201.difficulty.medium + custom_tooltip = religious_decision.0201.learning + } + + # Option 2-F: Meditate in the mountains. High risk, high reward. + option = { + trigger = { has_character_flag = meditation_option_mountains } + name = religious_decision.0201.mountains + meditate_at_location_effect = { TERRAIN = mountains } + custom_tooltip = religious_decision.0201.difficulty.hard + custom_tooltip = religious_decision.0201.stress + custom_tooltip = religious_decision.0201.trait + } + + # Option 2-G: Meditate in the desert. High risik, high reward. + option = { + trigger = { has_character_flag = meditation_option_desert } + name = religious_decision.0201.desert + meditate_at_location_effect = { TERRAIN = desert } + custom_tooltip = religious_decision.0201.difficulty.hard + custom_tooltip = religious_decision.0201.learning + } + + # Option 2-H: Meditate in the swamp. High risk, low reward. + option = { + trigger = { has_character_flag = meditation_option_wetlands } + name = religious_decision.0201.wetlands + meditate_at_location_effect = { TERRAIN = wetlands } + custom_tooltip = religious_decision.0201.difficulty.hard + } + + # Option 2-I: Meditate in the jugnle. High risk, low reward. + option = { + trigger = { has_character_flag = meditation_option_jungle } + name = religious_decision.0201.jungle + meditate_at_location_effect = { TERRAIN = jungle } + custom_tooltip = religious_decision.0201.difficulty.hard + } + + # Option 3: Opt-out + option = { + name = religious_decision.0201.optout + flavor = religious_decision.0201.optout.flavor + + ai_chance = { + base = 0 + } + + remove_decision_cooldown = meditate_in_seclusion_decision + } + + after = { + remove_character_flag = meditation_option_plains + remove_character_flag = meditation_option_hills + remove_character_flag = meditation_option_steppe + remove_character_flag = meditation_option_forest + remove_character_flag = meditation_option_drylands + remove_character_flag = meditation_option_mountains + remove_character_flag = meditation_option_wetlands + remove_character_flag = meditation_option_jungle + remove_character_flag = meditation_option_desert + remove_character_flag = planning_an_activity + } +} + +scripted_effect improve_meditation_skill = { + if = { + limit = { + has_variable = meditation_experience + } + change_variable = { + name = meditation_experience + add = 1 + } + } + else = { + set_variable = { + name = meditation_experience + value = 1 + } + } + custom_tooltip = religious_decision.0211.experience +} + +religious_decision.0210 = { + hidden = yes + immediate = { + send_interface_toast = { + title = religious_decision.0210.toast + left_icon = root + current_travel_plan = { + delay_travel_plan = { days = meditation_duration } + } + } + trigger_event = { + id = religious_decision.0211 + days = meditation_duration + } + } +} + +religious_decision.0211 = { + type = character_event + title = religious_decision.0211.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:at_home = yes } + desc = religious_decision.0211.desc.beginning.home + } + triggered_desc = { + trigger = { + var:meditation_location = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + desc = religious_decision.0211.desc.beginning.mountains + } + triggered_desc = { + trigger = { + var:meditation_location = { + OR = { + terrain = forest + terrain = taiga + } + } + } + desc = religious_decision.0211.desc.beginning.forest + } + triggered_desc = { + trigger = {var:meditation_location = { terrain = plains }} + desc = religious_decision.0211.desc.beginning.plains + } + triggered_desc = { + trigger = {var:meditation_location = { terrain = hills }} + desc = religious_decision.0211.desc.beginning.hills + } + triggered_desc = { + trigger = {var:meditation_location = { terrain = steppe }} + desc = religious_decision.0211.desc.beginning.steppe + } + triggered_desc = { + trigger = {var:meditation_location = { terrain = drylands }} + desc = religious_decision.0211.desc.beginning.drylands + } + triggered_desc = { + trigger = {var:meditation_location = { terrain = wetlands }} + desc = religious_decision.0211.desc.beginning.wetlands + } + triggered_desc = { + trigger = {var:meditation_location = { terrain = jungle }} + desc = religious_decision.0211.desc.beginning.jungle + } + triggered_desc = { + trigger = {var:meditation_location = { terrain = desert }} + desc = religious_decision.0211.desc.beginning.desert + } + } + first_valid = { + triggered_desc = { + trigger = { has_character_flag = meditation_minor_stress_loss } + desc = religious_decision.0211.desc.result.minor_stress + } + triggered_desc = { + trigger = { has_character_flag = meditation_medium_stress_loss } + desc = religious_decision.0211.desc.result.medium_stress + } + triggered_desc = { + trigger = { has_character_flag = meditation_major_stress_loss } + desc = religious_decision.0211.desc.result.major_stress + } + triggered_desc = { + trigger = { has_character_flag = meditation_reflection } + desc = religious_decision.0211.desc.result.reflection + } + triggered_desc = { + trigger = { has_character_flag = meditation_fugue } + desc = religious_decision.0211.desc.result.fugue + } + triggered_desc = { + trigger = { has_character_flag = meditation_epiphany } + desc = religious_decision.0211.desc.result.epiphany + } + triggered_desc = { + trigger = { has_character_flag = meditation_impatient } + desc = religious_decision.0211.desc.result.impatient + } + triggered_desc = { + trigger = { has_character_flag = meditation_secret } + desc = religious_decision.0211.desc.result.secret + } + triggered_desc = { + trigger = { has_character_flag = meditation_hungry } + desc = religious_decision.0211.desc.result.hungry + } + triggered_desc = { + trigger = { has_character_flag = meditation_thirsty } + desc = religious_decision.0211.desc.result.thirsty + } + triggered_desc = { + trigger = { has_character_flag = meditation_headache } + desc = religious_decision.0211.desc.result.headache + } + triggered_desc = { + trigger = { has_character_flag = meditation_distraction } + desc = religious_decision.0211.desc.result.distraction + } + } + } + theme = faith + override_background = { + trigger = { scope:at_home = yes } + reference = sitting_room + } + override_background = { + trigger = { scope:at_home = no } + reference = wilderness_scope + } + override_background = { + trigger = { has_character_flag = meditation_thirsty } + reference = bp1_crossroads_inn + } + left_portrait = root + + immediate = { + if = { + limit = { + NOT = { + exists = var:meditation_location + } + } + set_variable = { + name = meditation_location + value = root.location + } + } + var:meditation_location = { + save_scope_as = meditation_location + save_scope_as = background_wilderness_scope + } + + # Check if we are meditating in our capital (will be checked frequently when determining outcomes). + if = { + limit = { + exists = capital_province + scope:meditation_location = root.capital_province + } + save_scope_value_as = { + name = at_home + value = yes + } + } + else = { + save_scope_value_as = { + name = at_home + value = no + } + } + + # Determine what the outcome of the meditation journey will be. + random_list = { + # Positive Outcomes + 80 = { + # Double positive chance for meditating at home (though the benefits will be small). + modifier = { + add = 80 + trigger = { scope:at_home = yes } + } + + random_list = { + # Stress Reduction + 60 = { + modifier = { + add = 40 + scope:meditation_location = { + OR = { + terrain = mountains + terrain = desert_mountains + terrain = forest + terrain = taiga + } + } + } + + random_list = { + # Lower stress loss when meditating at home. + 100 = { + trigger = { scope:at_home = yes } + add_character_flag = meditation_minor_stress_loss + } + + # Higher stress loss when meditating in the wilderness + 66 = { + trigger = { scope:at_home = no } + add_character_flag = meditation_medium_stress_loss + } + 33 = { + trigger = { scope:at_home = no } + modifier = { + add = 121 + scope:meditation_location = { + OR = { + terrain = desert_mountains + terrain = mountains + } + } + } + add_character_flag = meditation_major_stress_loss + } + } + } + # Replace Negative Trait + 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 + } + } + + # Greater chance when meditating in one of these terrains. + modifier = { + add = 75 + scope:meditation_location = { + terrain = steppe + } + } + modifier = { + add = 150 + scope:meditation_location = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + add_character_flag = meditation_reflection + } + # Gain Learning + 20 = { + trigger = { + scope:at_home = no + } + modifier = { + add = 50 + scope:meditation_location = { + terrain = hills + } + } + add_character_flag = meditation_epiphany + } + # Gain extra Learning + 50 = { + trigger = { + scope:at_home = no + # Only in hot regions. + scope:meditation_location = { + OR = { + terrain = desert + terrain = drylands + } + } + } + modifier = { + add = 100 + scope:meditation_location = { + terrain = desert + } + } + add_character_flag = meditation_fugue + } + } + } + # Negative Outcomes + 20 = { + # Location modifiers. + modifier = { # Failure increases from 20% to 25%. Still relatively easy. + add = 7 # Total 27 + scope:at_home = no + } + modifier = { # Failure increases from 25% to 40%. Moderate difficulty. + add = 26 # Total 53 + scope:at_home = no + scope:meditation_location = { + OR = { + terrain = forest + terrain = taiga + terrain = drylands + } + } + } + modifier = { # Failure increases from 25% to 60%. Hard difficulty. + add = 93 # Total 120 + scope:at_home = no + scope:meditation_location = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = mountains + terrain = wetlands + terrain = jungle + } + } + } + + # Positive Personality Modifiers. + modifier = { + factor = 0.86 + has_trait = patient + } + modifier = { + factor = 0.90 + has_trait = calm + } + modifier = { + factor = 0.92 + has_trait = temperate + } + + # Negative Personality Modifiers. + modifier = { + factor = 1.13 + has_trait = impatient + } + modifier = { + factor = 1.10 + has_trait = gluttonous + } + modifier = { + factor = 1.08 + has_trait = wrathful + } + + # Reduces failure chance by 10 points per previous successful meditation. + modifier = { + add = { + subtract = var:meditation_experience + multiply = 10 + } + has_variable = meditation_experience + } + + random_list = { + 25 = { + trigger = { NOT = { has_trait = patient } } + modifier = { + add = 50 + var:meditation_location = { + terrain = wetlands + } + } + modifier = { + add = 75 + has_trait = impatient + } + add_character_flag = meditation_impatient + } + 25 = { + trigger = { + any_secret = { } + } + modifier = { + add = 75 + any_secret = { + is_criminal_for = root + } + } + add_character_flag = meditation_secret + } + 75 = { + trigger = { + scope:meditation_location = { + terrain = jungle + } + } + add_character_flag = meditation_distraction + } + 25 = { + modifier = { + add = -20 + has_trait = temperate + } + modifier = { + add = 75 + has_trait = gluttonous + } + add_character_flag = meditation_hungry + } + 100 = { + trigger = { + scope:meditation_location = { + OR = { + terrain = desert + terrain = drylands + } + } + } + add_character_flag = meditation_thirsty + } + 100 = { + trigger = { + scope:meditation_location = { + OR = { + terrain = mountains + terrain = desert_mountains + } + } + } + add_character_flag = meditation_headache + } + } + } + } + } + + option = { + name = { + trigger = { + OR = { + has_character_flag = meditation_epiphany + has_character_flag = meditation_fugue + has_character_flag = meditation_major_stress_loss + } + } + text = religious_decision.0211.a.critical_success + } + name = { + trigger = { + OR = { + has_character_flag = meditation_reflection + has_character_flag = meditation_medium_stress_loss + has_character_flag = meditation_minor_stress_loss + } + } + text = religious_decision.0211.a.success + } + name = { + trigger = { + OR = { + has_character_flag = meditation_secret + has_character_flag = meditation_impatient + has_character_flag = meditation_hungry + has_character_flag = meditation_thirsty + has_character_flag = meditation_distraction + has_character_flag = meditation_headache + } + } + text = religious_decision.0211.a.failure + } + if = { + limit = { has_character_flag = meditation_minor_stress_loss } + add_stress = minor_stress_loss + improve_meditation_skill = yes + } + else_if = { + limit = { has_character_flag = meditation_medium_stress_loss } + add_stress = medium_stress_loss + improve_meditation_skill = yes + } + else_if = { + limit = { has_character_flag = meditation_major_stress_loss } + add_stress = major_stress_loss + improve_meditation_skill = yes + } + 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 + } + } + improve_meditation_skill = yes + } + else_if = { + limit = { has_character_flag = meditation_fugue } + add_learning_skill = 2 + improve_meditation_skill = yes + } + else_if = { + limit = { has_character_flag = meditation_epiphany } + add_learning_skill = 1 + improve_meditation_skill = yes + } + else_if = { + limit = { has_character_flag = meditation_impatient } + add_stress = minor_stress_gain + } + else_if = { + limit = { has_character_flag = meditation_secret } + add_stress = minor_stress_gain + } + else_if = { + limit = { has_character_flag = meditation_hungry } + add_stress = minor_stress_gain + } + else_if = { + limit = { has_character_flag = meditation_thirsty } + add_stress = minor_stress_gain + } + else_if = { + limit = { has_character_flag = meditation_headache } + add_stress = minor_stress_gain + } + else_if = { + limit = { has_character_flag = meditation_distraction } + add_stress = minor_stress_gain + } + } + + after = { + # Remove character + remove_character_flag = meditation_secret + remove_character_flag = meditation_impatient + remove_character_flag = meditation_epiphany + remove_character_flag = meditation_fugue + remove_character_flag = meditation_reflection + remove_character_flag = meditation_major_stress_loss + remove_character_flag = meditation_medium_stress_loss + remove_character_flag = meditation_minor_stress_loss + + # Run the clean-up event. + trigger_event = { + id = religious_decision.0291 + days = 30 + } + } +} + +religious_decision.0291 = { + hidden = yes + immediate = { + send_interface_toast = { + title = religious_decision.0291.toast + left_icon = root + current_travel_plan ?= { + if = { + limit = { is_paused = yes } + resume_travel_plan = yes + } + } + } + remove_variable = meditation_location + remove_character_flag = meditation_character_flag + } +} + +######################### +# Sky Burials # +# by Sean Hughes # +# 0301-0302 # +######################### + +religious_decision.0301 = { + hidden = yes + + # Faiths with Sky Burial need to have this character saved as a variable on their successor. + trigger = { + exists = player_heir + faith = { + has_doctrine_parameter = sky_burials_active + } + } + + immediate = { + player_heir = { + if = { + limit = { + faith = root.faith + OR = { + is_child_of = root + is_grandchild_of = root + is_great_grandchild_of = root + } + } + set_variable = { + name = ancestor_to_bury + value = root + years = 5 + } + } + } + } +} + +religious_decision.0302 = { + type = character_event + title = religious_decision.0302.t + desc = { + triggered_desc = { + trigger = { + NOR = { + religion = religion:zoroastrianism_religion + religion = religion:zunism_religion + } + } + desc = religious_decision.0302.desc.wilderness + } + triggered_desc = { + trigger = { + OR = { + religion = religion:zoroastrianism_religion + religion = religion:zunism_religion + } + } + desc = religious_decision.0302.desc.zoroastrian + } + } + theme = faith + override_background = { + trigger = { + NOR = { + religion = religion:zoroastrianism_religion + religion = religion:zunism_religion + } + } + reference = wilderness + } + override_background = { + trigger = { + OR = { + religion = religion:zoroastrianism_religion + religion = religion:zunism_religion + } + } + reference = temple + } + + left_portrait = { + character = var:ancestor_to_bury + } + + immediate = { + add_piety = major_piety_value + if = { + limit = { + any_vassal = { + faith = { + has_doctrine_parameter = sky_burials_active + } + } + } + every_vassal = { + limit = { + faith = { + has_doctrine_parameter = sky_burials_active + } + } + custom = give_sky_burial_vassals + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + } + + option = { + name = religious_decision.0302.a + } + + after = { + remove_variable = ancestor_to_bury + } +} + +################################# +# Raise Runestone Maintenance # +# by Linnéa Thimrén # +# 0311 # +################################# + +religious_decision.0311 = { + hidden = yes + + # Faiths that can raise a runestone need to have this character saved as a variable on their successor. + trigger = { + player_heir ?= { + is_close_family_of = root + is_alive = yes + } + dynasty = player_heir.dynasty + # Has access to a valid method of raising runestones. + fp1_can_raise_stele_trigger = yes + } + + immediate = { + player_heir = { + set_variable = { + name = ancestor_to_bury + value = root + years = 5 + } + } + } +} + +#New holder of the county with a runestone +religious_decision.0312 = { + hidden = yes + orphan = yes + + trigger = { + scope:title = { + exists = var:ancestor_to_bury + } + dynasty != scope:previous_holder.dynasty #We only have to change something if the new holder is of a different dynasty + # Use expanded version if we have FP1. + has_fp1_dlc_trigger = no + } + + immediate = { + if = { + limit = { + scope:title = { + NOT = { var:ancestor_to_bury.dynasty = root.dynasty } + } + } + scope:title = { + remove_county_modifier = county_raised_runestone_modifier + remove_variable = ancestor_to_bury + } + } + } +} + + +######################### +# Divine the Stars # +# by Sean Hughes # +# 0401 # +######################### + +religious_decision.0401 = { + type = character_event + title = religious_decision.0401.t + desc = { + desc = religious_decision.0401.desc.beginning + first_valid = { + triggered_desc = { + trigger = { + scope:divination_outcome = flag:great_battle + } + desc = religious_decision.0401.desc.great_battle + } + triggered_desc = { + trigger = { + scope:divination_outcome = flag:new_friends + } + desc = religious_decision.0401.desc.new_friends + } + triggered_desc = { + trigger = { + scope:divination_outcome = flag:hard_work + } + desc = religious_decision.0401.desc.hard_work + } + triggered_desc = { + trigger = { + scope:divination_outcome = flag:betrayal + } + desc = religious_decision.0401.desc.betrayal + } + triggered_desc = { + trigger = { + scope:divination_outcome = flag:new_beginnings + } + desc = religious_decision.0401.desc.new_beginnings + } + } + } + theme = faith + override_background = { + trigger = { is_landless_adventurer = no } + reference = corridor_night + } + override_background = { + trigger = { has_government = landless_adventurer_government } + reference = bp1_bonfire + } + left_portrait = root + + immediate = { + random_list = { + 20 = { + save_scope_value_as = { + name = divination_outcome + value = flag:great_battle + } + } + 20 = { + save_scope_value_as = { + name = divination_outcome + value = flag:new_friends + } + } + 20 = { + save_scope_value_as = { + name = divination_outcome + value = flag:hard_work + } + } + 20 = { + save_scope_value_as = { + name = divination_outcome + value = flag:betrayal + } + } + 20 = { + save_scope_value_as = { + name = divination_outcome + value = flag:new_beginnings + } + } + } + } + + option = { + name = religious_decision.0401.a + + if = { + limit = { + scope:divination_outcome = flag:great_battle + } + add_character_modifier = { + modifier = astrology_great_battle + years = 10 + } + } + else_if = { + limit = { + scope:divination_outcome = flag:new_friends + } + add_character_modifier = { + modifier = astrology_new_friends + years = 10 + } + } + else_if = { + limit = { + scope:divination_outcome = flag:hard_work + } + add_character_modifier = { + modifier = astrology_hard_work + years = 10 + } + } + else_if = { + limit = { + scope:divination_outcome = flag:betrayal + } + add_character_modifier = { + modifier = astrology_betrayal + years = 10 + } + } + else_if = { + limit = { + scope:divination_outcome = flag:new_beginnings + } + add_character_modifier = { + modifier = astrology_new_beginnings + years = 10 + } + } + + # Remove the blocking flag. + remove_character_flag = divining_the_stars + } +} + + +######################### +# Reforming Kabarism # +# by James Beaumont # +# 0501-0502 # +######################### + +religious_decision.0501 = { + type = character_event + title = religious_decision.0501.t + desc = { + desc = religious_decision.0501.desc + } + theme = faith + override_background = { + reference = temple_generic + } + left_portrait = root + right_portrait = root.faith.religious_head + + immediate = { + save_scope_as = khazar_khan + } + + option = { + name = religious_decision.0501.a + trigger = { + OR = { + NOT = { exists = scope:bwow_chosen_people } + scope:bwow_chosen_people = no + } + OR = { + NOT = { exists = scope:bwow_esotericism } + scope:bwow_esotericism = no + } + OR = { + NOT = { exists = scope:bwow_fundementalist } + scope:bwow_fundementalist = no + } + } + root.faith = { remove_doctrine = unreformed_faith_doctrine } + custom_description_no_bullet = { + text = can_never_reform_kuzarism_tt + subject = root + } + root.faith.religious_head = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -40 + } + } + every_vassal = { + custom = religious_decision.0501.jewish.tt + limit = { + has_religion = religion:judaism_religion + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + every_vassal = { + custom = religious_decision.0501.nonjewish.tt + limit = { + NOT = { has_religion = religion:judaism_religion } + } + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 30 + } + } + stress_impact = { + zealous = major_stress_impact_gain + cynical = minor_stress_impact_loss + } + } + + option = { + name = religious_decision.0501.d + trigger = { + scope:bwow_chosen_people ?= yes + } + root.faith = { break_with_old_ways_become_chosen_people = yes } + every_vassal = { + custom = religious_decision.0501.diff_culture.tt + limit = { + culture != root.culture + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + hidden_effect = { + every_ruler = { + limit = { + this != root + OR = { + is_vassal_of = root + has_faith = faith:kabarism + } + } + trigger_event = religious_decision.0502 + } + } + ai_chance = { + base = 100 + } + stress_impact = { + zealous = minor_stress_impact_loss + } + } + + option = { + name = religious_decision.0501.b + trigger = { + scope:bwow_esotericism ?= yes + } + root.faith = { break_with_old_ways_become_righteous = yes } + every_vassal = { + custom = religious_decision.0501.nonjewish.tt + limit = { + NOT = { has_religion = religion:judaism_religion } + } + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + } + hidden_effect = { + every_ruler = { + limit = { + this != root + OR = { + is_vassal_of = root + has_faith = faith:kabarism + } + } + trigger_event = religious_decision.0502 + } + } + ai_chance = { + base = 100 + } + stress_impact = { + zealous = minor_stress_impact_loss + } + } + + option = { + name = religious_decision.0501.c + trigger = { + scope:bwow_fundementalist ?= yes + } + root.faith = { break_with_old_ways_become_fundamentalist = yes } + every_vassal = { + custom = religious_decision.0501.nonjewish.tt + limit = { + NOT = { has_religion = religion:judaism_religion } + } + add_opinion = { + target = root + modifier = scared_opinion + opinion = -25 + } + } + every_vassal = { + limit = { + has_religion = religion:judaism_religion + } + custom = religious_decision.0501.jewish.tt + add_opinion = { + target = root + modifier = respect_opinion + opinion = 20 + } + } + hidden_effect = { + every_ruler = { + limit = { + this != root + OR = { + is_vassal_of = root + has_faith = faith:kabarism + } + } + trigger_event = religious_decision.0502 + } + } + stress_impact = { + zealous = major_stress_impact_loss + gregarious = minor_stress_impact_gain + } + } +} + +#Event notifying vassals and Kabarites of the changes +religious_decision.0502 = { + type = character_event + title = religious_decision.0502.t + desc = { + desc = religious_decision.0502.desc.intro + desc = religious_decision.0502.desc.body + triggered_desc = { + trigger = { + scope:khazar_khan.faith = { + NOT = { + has_doctrine = doctrine_pluralism_fundamentalist + } + } + } + desc = religious_decision.0502.desc.righteous + } + triggered_desc = { + trigger = { + scope:khazar_khan.faith = { + has_doctrine = doctrine_pluralism_fundamentalist + } + } + desc = religious_decision.0502.desc.fundamentalist + } + } + theme = faith + override_background = { + reference = temple_generic + } + left_portrait = scope:khazar_khan + right_portrait = root + + option = { + name = religious_decision.0502.a + trigger = { + NOT = { has_faith = faith:kabarism } + scope:khazar_khan.faith = { + NOT = { + has_doctrine = doctrine_pluralism_fundamentalist + } + } + } + ai_chance = { + base = 10 + } + show_as_tooltip = { + scope:khazar_khan.faith = { + break_with_old_ways_become_righteous = yes + } + } + } + + option = { + name = religious_decision.0502.a + trigger = { + NOT = { has_faith = faith:kabarism } + scope:khazar_khan.faith = { has_doctrine = doctrine_pluralism_fundamentalist } + } + show_as_tooltip = { + scope:khazar_khan.faith = { + break_with_old_ways_become_fundamentalist = yes + } + } + } + + option = { + name = religious_decision.0502.b + trigger = { + has_faith = faith:kabarism + scope:khazar_khan.faith = { + NOT = { + has_doctrine = doctrine_pluralism_fundamentalist + } + } + } + ai_chance = { + base = 10 + } + show_as_tooltip = { + scope:khazar_khan.faith = { + break_with_old_ways_become_righteous = yes + } + } + } + + option = { + name = religious_decision.0502.b + trigger = { + has_faith = faith:kabarism + scope:khazar_khan.faith = { has_doctrine = doctrine_pluralism_fundamentalist } + } + show_as_tooltip = { + scope:khazar_khan.faith = { + break_with_old_ways_become_fundamentalist = yes + } + } + } +} + +######################### +# Adopt Hebrew Language # +# by James Beaumont # +# 0503 # +######################### + +#Event notifying vassals and Kabarites of the changes +religious_decision.0503 = { + type = character_event + title = religious_decision.0503.t + desc = religious_decision.0503.desc + theme = faith + override_background = { + reference = temple_generic + } + left_portrait = scope:hebrew_language_adopter_scope + + option = { # Ah heck yeah + name = { + trigger = { root.faith.religion = religion:judaism_religion } + text = religious_decision.0503.a.jewish + } + name = religious_decision.0503.a.non_jewish + custom_tooltip = switch_to_israelite_language_tt + } + + option = { # Ah heck no + trigger = { + NOT = { root.faith.religion = religion:judaism_religion } + this != scope:hebrew_language_adopter_scope + exists = scope:target_other_culture + } + name = religious_decision.0503.b + create_divergent_culture = yes + custom_tooltip = { + text = switch_to_original_language_tt + root.culture = { + set_language_from = scope:target_other_culture + } + } + } +} + +############################# +# Schisming the Caliphate # +# by Ewan Cowhig Croft # +# 0601 - 0610 # +############################# + +scripted_effect religious_decision_0601_count_converts_effect = { + if = { + limit = { exists = var:schismed_caliphate_major_ruler_converted_count } + custom_tooltip = religious_decision.0601.tt.some_rulers_converted_away + } + else = { custom_tooltip = religious_decision.0601.tt.all_rulers_stayed } +} + +# Scope:founder's POV - you're the new caliph! +religious_decision.0601 = { + type = character_event + title = religious_decision.0601.t + desc = religious_decision.0601.desc + theme = faith + left_portrait = { + character = scope:founder + animation = personality_bold + } + right_portrait = { + character = scope:old_caliph + animation = fear + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + # Execute the actual effects. + appoint_a_righteous_caliph_scripted_effect = yes + } + + # This is a heavy burden I now bear... + option = { + name = religious_decision.0601.a + + # Inform scope:founder how many, if any, folks rejected their coup. + religious_decision_0601_count_converts_effect = yes + + # No stress impact, choice is narrative. + ai_chance = { + # AI chance is irrelevant, as the options are cosmetic. + base = 100 + } + } + + # Hah, take *that* scope:old_caliph! + option = { + name = religious_decision.0601.b + + # Inform scope:founder how many, if any, folks rejected their coup. + religious_decision_0601_count_converts_effect = yes + + # No stress impact, choice is narrative. + ai_chance = { + # AI chance is irrelevant, as the options are cosmetic. + base = 100 + } + } + + after = { + # Clean up the variable count, if required. + if = { + limit = { exists = var:schismed_caliphate_major_ruler_converted_count } + remove_variable = schismed_caliphate_major_ruler_converted_count + } + } +} + +# Co-faithist POV - uhhh, there's a new HoF in town? +religious_decision.0602 = { + type = character_event + title = religious_decision.0602.t + desc = religious_decision.0602.desc + theme = faith + left_portrait = { + character = scope:founder + animation = personality_zealous + } + right_portrait = { + character = scope:old_caliph + animation = rage + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + # Plus grab the current faith for loc. + faith = { save_scope_as = current_faith } + # Show the effects of the schism. + show_as_tooltip = { + scope:founder = { appoint_a_righteous_caliph_scripted_effect = yes } + } + } + + # Scope:founder shall lead us to PositiveAfterLife! + option = { + name = religious_decision.0602.a + + custom_tooltip = religious_decision.0602.a.tt + + # No stress impact, as zealous and cynical could come down on either side here. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:founder + multiplier = 5 + } + # Distant caliphs are less respected. + modifier = { + add = 100 + NOT = { in_diplomatic_range = scope:old_caliph } + } + } + } + + # Never: my loyalty to scope:old_caliph outweighs my loyalty to scope:current_faith! + option = { + name = religious_decision.0602.b + # We're not fussed about much, but very young kids don't really get a choice in this. + trigger = { age >= 8 } + + # Convert to scope:old_caliph's faith. + set_character_faith_with_conversion = scope:old_caliph.faith + # Make a note that a major character chose to convert rather than toe the line. + scope:founder = { + if = { + limit = { + NOT = { exists = var:schismed_caliphate_major_ruler_converted_count } + } + set_variable = { + name = schismed_caliphate_major_ruler_converted_count + value = 1 + } + } + else = { + change_variable = { + name = schismed_caliphate_major_ruler_converted_count + add = 1 + } + } + } + + # No stress impact, as zealous and cynical could come down on either side here. + ai_chance = { + base = 0 + opinion_modifier = { + opinion_target = scope:old_caliph + multiplier = 5 + } + # Caliphs within writing distance are more respected. + modifier = { + add = 100 + in_diplomatic_range = scope:old_caliph + } + # Heirs to scope:founder won't voluntarily disinherit themselves unless they're zealous. + modifier = { + factor = 0 + NOT = { has_trait = zealous } + any_heir_title = { holder = scope:founder } + } + } + } + + # People seem desperate for a true leader... + option = { + name = religious_decision.0602.c + trigger = { is_ai = no } + + # It becomes cheaper to make your own faith for a while. + add_character_modifier = { + modifier = fp2_opportunistic_schismatic_modifier + years = 25 + } + + # No stress impact, as zealous and cynical could come down on either side here. + ai_chance = { + # AI chance irrelevant, since the AI doesn't use the relevant feature. + base = 100 + } + } +} + +# Other POV - bit dramatic, mate. +religious_decision.0603 = { + type = character_event + title = religious_decision.0603.t + desc = religious_decision.0603.desc + theme = faith + left_portrait = { + character = scope:founder + animation = personality_zealous + } + right_portrait = { + character = scope:old_caliph + animation = rage + } + + immediate = { + play_music_cue = "mx_cue_faith_conversion" + # Show the effects of the schism. + show_as_tooltip = { + scope:founder = { appoint_a_righteous_caliph_scripted_effect = yes } + } + } + + # Scope:old_caliph's POV - Fiend! Cur! Blasphemer! + option = { + name = religious_decision.0603.a + trigger = { this = scope:old_caliph } + + # No stress impact, choice is narrative. + ai_chance = { + # AI chance is irrelevant, since the choice is narrative. + base = 100 + } + } + + # Other co-religionist's POV - Scope:old_caliph cannot keep HerHis house in order... + option = { + name = religious_decision.0603.b + trigger = { + this != scope:old_caliph + religion = religion:islam_religion + } + + # No stress impact, choice is narrative. + ai_chance = { + # AI chance is irrelevant, since the choice is narrative. + base = 100 + } + } + + # Neighbouring Ruler POV: Ha! What high drama! + option = { + name = religious_decision.0603.c + trigger = { + NOT = { religion = religion:islam_religion } + } + + # No stress impact, choice is narrative. + ai_chance = { + # AI chance is irrelevant, since the choice is narrative. + base = 100 + } + } +} diff --git a/N3OW/events/religion_events/religious_interaction_events.txt b/N3OW/events/religion_events/religious_interaction_events.txt new file mode 100644 index 00000000..04af3450 --- /dev/null +++ b/N3OW/events/religion_events/religious_interaction_events.txt @@ -0,0 +1,2824 @@ +namespace = religious_interaction + +religious_interaction.1 = { # Faith head divorce event (divorce_character_rel_head interaction) + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = { + desc = religious_interaction.1.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:secondary_recipient = { exposed_cheating_on_spouse_trigger = { SPOUSE = scope:actor } } + scope:secondary_recipient = { + any_relation = { + type = lover + NOR = { + this = scope:actor + this = scope:recipient + } + NOT = { has_secret_relation_lover = scope:secondary_recipient } + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } + } + } + } + } + desc = religious_interaction.1.adultery + } + triggered_desc = { + trigger = { + scope:actor = { + OR = { + is_close_or_extended_family_of = scope:secondary_recipient + is_cousin_of = scope:secondary_recipient + dynasty = scope:secondary_recipient.dynasty + } + } + } + desc = religious_interaction.1.consanguinity + } + triggered_desc = { + trigger = { + scope:secondary_recipient = { is_eunuch_trigger = yes } + } + desc = religious_interaction.1.eunuch + } + triggered_desc = { + trigger = { + scope:secondary_recipient.faith != scope:actor.faith + } + desc = religious_interaction.1.different_faith + } + desc = religious_interaction.1.fallback + } + } + sender = scope:recipient + + option = { + name = religious_interaction.1.a + scope:actor = { + divorce_effect = { + DIVORCER = scope:actor + DIVORCEE = scope:secondary_recipient + } + } + + hidden_effect = { # Notify the one being divorced + scope:secondary_recipient = { + send_interface_toast = { + title = X_DIVORCED_ME + left_icon = scope:recipient + right_icon = scope:actor + #custom_tooltip = X_DIVORCED_ME_DESC + } + } + } + } +} + +religious_interaction.2 = { # House Head divorce event (divorce_character_house_head interaction) + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = { + desc = religious_interaction.2.desc + first_valid = { + triggered_desc = { + trigger = { + scope:secondary_recipient = { exposed_cheating_on_spouse_trigger = { SPOUSE = scope:actor } } + } + desc = religious_interaction.2.adultery + } + triggered_desc = { + trigger = { + scope:actor = { + fertility > 0.1 + } + scope:secondary_recipient = { + fertility < 0.1 + is_eunuch_trigger = no + NOR = { + any_child = { + is_child_of = scope:actor + } + } + } + } + desc = religious_interaction.2.infertility + } + triggered_desc = { + trigger = { + scope:secondary_recipient = { is_eunuch_trigger = yes } + } + desc = religious_interaction.1.eunuch + } + triggered_desc = { + trigger = { + scope:secondary_recipient.faith != scope:actor.faith + } + desc = religious_interaction.1.different_faith + } + desc = religious_interaction.1.fallback + } + } + sender = scope:recipient + + immediate = { + show_as_tooltip = { + if = { + limit = { always = scope:divorce_hook } + scope:actor = { + use_hook = scope:recipient + } + } + scope:actor = { + add_piety = { subtract = divorce_cost } + } + } + scope:actor = { + divorce_effect = { + DIVORCER = scope:actor + DIVORCEE = scope:secondary_recipient + } + } + + hidden_effect = { # Notify the one being divorced + scope:secondary_recipient = { + send_interface_toast = { + title = X_DIVORCED_ME + left_icon = scope:recipient + right_icon = scope:actor + #custom_tooltip = X_DIVORCED_ME_DESC + } + } + } + } + + option = { + name = religious_interaction.1.a + } +} + +religious_interaction.3 = { # Ask for Gold accepted letter event (hof_ask_for_gold interaction) + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = { + desc = religious_interaction.3.desc + first_valid = { + triggered_desc = { + trigger = { + scope:actor = { + is_at_war = yes + any_character_war = { + is_defender = scope:actor + using_holy_war_cb_trigger = yes + } + } + } + desc = religious_interaction.3.defensive_war + } + triggered_desc = { + trigger = { + scope:actor = { + is_at_war = yes + any_character_war = { + is_attacker = scope:actor + OR = { + using_holy_war_cb_trigger = yes + using_cb = excommunication_war + } + } + } + } + desc = religious_interaction.2.offensive_war + } + desc = religious_interaction.3.fallback + } + } + sender = scope:recipient + + immediate = { + scope:actor = { + if = { + limit = { + scope:actor = { + is_at_war = yes + any_character_war = { + is_defender = scope:actor + using_holy_war_cb_trigger = yes + } + } + } + random_character_war = { + limit = { + is_defender = scope:actor + using_holy_war_cb_trigger = yes + } + primary_attacker = { + save_scope_as = war_target + } + } + } + else_if = { + limit = { + scope:actor = { + is_at_war = yes + any_character_war = { + is_attacker = scope:actor + OR = { + using_holy_war_cb_trigger = yes + using_cb = excommunication_war + } + } + } + } + random_character_war = { + limit = { + is_attacker = scope:actor + OR = { + using_holy_war_cb_trigger = yes + using_cb = excommunication_war + } + } + primary_defender = { + save_scope_as = war_target + } + } + } + } + show_as_tooltip = { hof_ask_for_gold_interaction_effect = yes } + } + + option = { + name = { + trigger = { + scope:actor = { + NOT = { has_trait = generous } + } + } + text = religious_interaction.3.a + } + name = { + trigger = { + scope:actor = { + is_at_war = yes + } + } + text = religious_interaction.3.b + } + name = religious_interaction.3.c + name = { + trigger = { + scope:actor = { + has_trait = greedy + } + } + text = religious_interaction.3.d + } + } +} + +religious_interaction.32 = { # Ask for Gold rejection letter event (hof_ask_for_gold interaction) + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.32.desc + sender = scope:recipient + + option = { + name = religious_interaction.32.a + } +} + +religious_interaction.4 = { # Ask for Claim accepted letter event (hof_ask_for_claim interaction) + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = { + desc = religious_interaction.4.desc + first_valid = { + triggered_desc = { + trigger = { + scope:secondary_recipient = { + is_adult = no + } + scope:actor = { + is_adult = yes + } + } + desc = religious_interaction.4.child + } + triggered_desc = { + trigger = { + scope:secondary_recipient = { + is_adult = yes + is_female = yes + } + scope:actor = { + is_adult = yes + is_female = no + faith = { + has_doctrine = doctrine_gender_male_dominated + } + } + } + desc = religious_interaction.4.they_are_female + } + triggered_desc = { + trigger = { + scope:secondary_recipient = { + is_adult = yes + is_female = no + } + scope:actor = { + is_adult = yes + is_female = yes + faith = { + has_doctrine = doctrine_gender_female_dominated + } + } + } + desc = religious_interaction.4.they_are_male + } + desc = religious_interaction.4.fallback + } + } + sender = scope:recipient + + immediate = { + show_as_tooltip = { hof_ask_for_claim_interaction_effect = yes } + } + + option = { + name = religious_interaction.4.a + } +} + +religious_interaction.42 = { # Ask for Claim rejection letter event (hof_ask_for_claim interaction) + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.42.desc + sender = scope:recipient + + option = { + name = religious_interaction.42.a + } +} + +religious_interaction.5 = { + type = letter_event + opening = religious_interaction.1.opening + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:secondary_recipient = { + is_adult = no + } + scope:actor = { + is_adult = yes + } + } + desc = religious_interaction.5.child + } + triggered_desc = { + trigger = { + scope:secondary_recipient = { + is_adult = yes + is_female = yes + } + scope:actor = { + is_adult = yes + is_female = no + faith = { + has_doctrine = doctrine_gender_male_dominated + } + } + } + desc = religious_interaction.5.they_are_female + } + triggered_desc = { + trigger = { + scope:secondary_recipient = { + is_adult = yes + is_female = no + } + scope:actor = { + is_adult = yes + is_female = yes + faith = { + has_doctrine = doctrine_gender_female_dominated + } + } + } + desc = religious_interaction.5.they_are_male + } + desc = religious_interaction.5.fallback + } + desc = religious_interaction.5.outro + } + sender = { + character = scope:recipient + animation = personality_vengeful + } + + option = { + name = religious_interaction.5.a + show_as_tooltip = { + scope:actor = { add_pressed_claim = scope:target } + } + } +} + + +religious_interaction.6 = { # Faith head divorce event via Dynast (divorce_character_rel_head interaction) + type = letter_event + opening = { + desc = religious_interaction.6.opening + } + desc = { + desc = religious_interaction.6.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:secondary_recipient = { exposed_cheating_on_spouse_trigger = { SPOUSE = scope:secondary_actor } } + scope:secondary_recipient = { + any_relation = { + type = lover + NOR = { + this = scope:secondary_actor + this = scope:recipient + } + NOT = { has_secret_relation_lover = scope:secondary_recipient } + relation_with_character_is_incestuous_in_my_faith_trigger = { CHARACTER = scope:secondary_recipient } + } + } + } + } + desc = religious_interaction.6.adultery + } + triggered_desc = { + trigger = { + scope:secondary_actor = { + OR = { + is_close_or_extended_family_of = scope:secondary_recipient + is_cousin_of = scope:secondary_recipient + dynasty = scope:secondary_recipient.dynasty + } + } + } + desc = religious_interaction.6.consanguinity + } + triggered_desc = { + trigger = { + scope:secondary_recipient = { is_eunuch_trigger = yes } + } + desc = religious_interaction.6.eunuch + } + triggered_desc = { + trigger = { + scope:secondary_recipient.faith != scope:secondary_actor.faith + } + desc = religious_interaction.6.different_faith + } + desc = religious_interaction.6.fallback + } + } + sender = scope:recipient + + option = { + name = religious_interaction.6.a + scope:secondary_actor = { + divorce_effect = { + DIVORCER = scope:secondary_actor + DIVORCEE = scope:secondary_recipient + } + } + + hidden_effect = { # Notify the one being divorced + scope:secondary_recipient = { + send_interface_toast = { + title = X_DIVORCED_ME + left_icon = scope:recipient + right_icon = scope:secondary_actor + #custom_tooltip = X_DIVORCED_ME_DESC + } + } + } + } +} + +######################### +# Temporal Condemnation # +# by Petter Vilberg # +# 1001 # +######################### + +#Religious Legal Pronouncements +religious_interaction.1001 = { + type = character_event + orphan = yes + title = { + first_valid = { + triggered_desc = { + trigger = { + faith = { + religion_tag = islam_religion + } + } + desc = religious_interaction.1001.t.fatwa + } + triggered_desc = { + trigger = { } + desc = religious_interaction.1001.t + } + } + } + desc = religious_interaction.1001.desc + theme = faith + left_portrait = { + character = scope:actor + animation = dismissal + } + + immediate = { + reverse_add_opinion = { + target = scope:actor + modifier = temporal_condemnation_opinion + years = 10 + } + add_character_modifier = { + modifier = temporal_condemnation_modifier + years = 15 + } + } + + option = { + name = religious_interaction.1001.a + add_opinion = { + target = scope:actor + modifier = temporal_condemnation_condemned_me_opinion + } + custom_tooltip = religious_interaction.1001.a.revoke_tt + } +} + +##################### +# Seek Indulgences # +# by Sean Hughes # +# 1010-1011 # +##################### + +#Seek Indulgences Accepted +religious_interaction.1010 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.1010 + sender = { + character = scope:recipient + animation = happiness + } + + immediate = { + show_as_tooltip = { + seek_indulgences_interaction_effect = yes + } + } + + option = { + name = religious_interaction.1000.positive + } +} + +#Seek Indulgences Rejected +religious_interaction.1011 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.1011 + sender = scope:recipient + + option = { + name = religious_interaction.1000.negative + } +} + +##################### +# Excommunucation # +# by Sean Hughes # +# 1020-1025 # +##################### + +#Excommunicated (Requested by another Ruler) +religious_interaction.1020 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = { + desc = religious_interaction.1020 + desc = religious_interaction.1021 + } + sender = { + character = scope:recipient + animation = schadenfreude + } + + immediate = { add_excommunication_tooltip_only_effect = yes } + + option = { + name = religious_interaction.1000.strong_negative + } +} + +#Excommunicated (Pope's own initiative) +religious_interaction.1021 = { + type = letter_event + orphan = yes + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.1021 + sender = { + character = scope:recipient + animation = anger + } + + immediate = { add_excommunication_tooltip_only_effect = yes } + + option = { + name = religious_interaction.1000.strong_negative + } +} + +#Excommunication Requester informed the Pope accepted their request. +religious_interaction.1022 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.1022 + sender = scope:recipient + + immediate = { + scope:secondary_recipient = { add_excommunication_tooltip_only_effect = yes } + } + option = { + name = religious_interaction.1000.positive + } +} + + +#Excommuniation Requester informed the Pope denied their request. +religious_interaction.1023 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.1023 + sender = { + character = scope:recipient + animation = dismissal + } + + option = { + name = religious_interaction.1000.negative + } +} + +#Pope lifts Excommunication. +religious_interaction.1024 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.1024 + sender = { + character = scope:recipient + animation = personality_zealous + } + + immediate = { + show_as_tooltip = { + declaration_of_repentance_interaction_effect = yes + } + } + + option = { + name = religious_interaction.1024.positive + } +} + +#Pope refuses to lift Excommunication. +religious_interaction.1025 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.1025 + sender = { + character = scope:recipient + animation = dismissal + } + + option = { + name = religious_interaction.1000.strong_negative + } +} + +##################### +# Take The Vows # +# by Sean Hughes # +# 1030-1031 # +##################### + +#Take Vows Rejected +religious_interaction.1031 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.1031 + sender = { + character = scope:recipient + animation = dismissal + } + + immediate = { + show_as_tooltip = { + scope:recipient = { + add_opinion = { + target = scope:actor + modifier = asked_me_to_take_vows_opinion + years = 5 + } + } + } + } + + option = { + name = religious_interaction.1000.strong_negative + } +} + + + +##################### +# Demand Conversion # +# # +# # +##################### + +#Accepts conversion +religious_interaction.2002 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.2002.desc + sender = scope:recipient + + immediate = { + if = { + limit = { + has_government = landless_adventurer_government + } + show_as_tooltip = { demand_conversion_interaction_effect = yes } + } + else = { + show_as_tooltip = { demand_conversion_vassal_ruler_interaction_effect = yes } + } + } + + option = { + name = religious_interaction.2002.a + if = { + limit = { + has_government = landless_adventurer_government + scope:recipient.highest_held_title_tier >= tier_barony + } + faith = { + change_fervor = { + value = { + add = 1 + multiply = scope:recipient.highest_held_title_tier + } + desc = imperial_capital_sacked_fervor_gain + } + } + add_prestige = { + value = 200 + multiply = scope:recipient.highest_held_title_tier + if = { + limit = { + scope:recipient.highest_held_title_tier >= tier_kingdom + } + multiply = 2 + } + } + } + } +} + + +#Refuses conversion +religious_interaction.2003 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = { + desc = religious_interaction.2003.desc + triggered_desc = { + trigger = { exists = scope:hooking_out_of_conversion } + desc = religious_interaction.2003.hooking_out + } + } + sender = { + character = scope:recipient + animation = dismissal + } + + immediate = { + if = { + limit = { + has_government = landless_adventurer_government + } + scope:recipient = { + #Negative opinions + add_opinion = { + modifier = unwanted_religious_conversion_opinion + target = scope:actor + } + if = { + limit = { + top_liege != this + liege ?= { + faith != scope:actor.faith + } + } + liege = { + add_opinion = { + modifier = religious_rebel_opinion + target = scope:actor + } + } + } + } + } + else = { + hidden_effect = { + if = { + limit = { + exists = scope:recipient.capital_county + scope:recipient.capital_county.faith = scope:recipient.faith + } + save_scope_value_as = { + name = convert_capital + value = yes + } + } + } + scope:recipient = { + add_opinion = { + modifier = demanded_my_conversion_opinion + target = root + opinion = -10 + } + } + if = { + limit = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + scope:recipient = { + has_strong_usable_hook = root + } + } + save_scope_value_as = { + name = hooking_out_of_conversion + value = yes + } + } + } + # If appropriate, give 'em piety. + scope:recipient = { give_piety_for_clinging_to_state_faith_effect = yes } + } + + #It's not illegal + option = { + name = religious_interaction.2003.a + trigger = { + NOT = { exists = scope:hooking_out_of_conversion } + NOT = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + } + if = { + limit = { + is_landless_adventurer = no + } + hidden_effect = { + add_opinion = { + target = scope:recipient + modifier = resisted_conversion_opinion + years = 15 + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_zeal = -0.5 + } + } + } + + #It's a Crime + option = { + name = religious_interaction.2003.b + trigger = { + NOT = { exists = scope:hooking_out_of_conversion } + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + if = { + limit = { + is_landless_adventurer = no + } + add_opinion = { + target = scope:recipient + modifier = illegal_resisted_conversion_opinion + years = 10 + } + } + ai_chance = { + base = 100 + } + } + + #It's a Crime, but the target has a Hook on you + option = { + name = religious_interaction.2003.c + trigger = { + exists = scope:hooking_out_of_conversion + } + exclusive = yes + scope:recipient = { + use_hook = root + } + hidden_effect = { + add_opinion = { + target = scope:recipient + modifier = resisted_conversion_opinion + years = 20 + } + } + ai_chance = { + base = 100 + } + } + + #Use a Hook to force it through + option = { + name = religious_interaction.2003.d + trigger = { + NOT = { exists = scope:hooking_out_of_conversion } + NOT = { has_government = landless_adventurer_government } + has_usable_hook = scope:recipient + } + use_hook = scope:recipient + + demand_conversion_interaction_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + + + +#They ask for Gold +religious_interaction.2011 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.2011.desc + sender = scope:recipient + + immediate = { + hidden_effect = { + if = { + limit = { + exists = scope:recipient.capital_county + scope:recipient.capital_county.faith = scope:recipient.faith + } + save_scope_value_as = { + name = convert_capital + value = yes + } + } + } + scope:recipient = { + add_opinion = { + modifier = demanded_my_conversion_opinion + target = root + opinion = -10 + } + } + } + + #Accept + option = { + name = religious_interaction.2011.a + pay_short_term_gold = { + target = scope:recipient + gold = demand_conversion_bribe_size + } + + demand_conversion_interaction_effect = yes + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + ai_zeal = 0.5 + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + short_term_gold <= major_gold_value + has_variable = conqueror + ai_should_focus_on_building_in_their_capital = yes + } + } + } + } + + #Refuse + option = { + name = religious_interaction.2011.b + if = { + # show player opinion change if it gives imprisonment reason + limit = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + add_opinion = { + target = scope:recipient + modifier = illegal_resisted_conversion_opinion + years = 15 + } + } + else = { + hidden_effect = { + add_opinion = { + target = scope:recipient + modifier = resisted_conversion_opinion + years = 15 + } + } + } + + ai_chance = { + base = 10 + modifier = { + add = 100 + gold < demand_conversion_bribe_size + } + } + } + + #Use a Hook to force it through + option = { + name = religious_interaction.2011.c + trigger = { + has_strong_usable_hook = scope:recipient + } + use_hook = scope:recipient + + demand_conversion_interaction_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + + +#They ask for a Favor +religious_interaction.2012 = { + type = letter_event + opening = { + desc = religious_interaction.1.opening + } + desc = religious_interaction.2012.desc + sender = scope:recipient + + immediate = { + hidden_effect = { + if = { + limit = { + exists = scope:recipient.capital_county + scope:recipient.capital_county.faith = scope:recipient.faith + } + save_scope_value_as = { + name = convert_capital + value = yes + } + } + } + scope:recipient = { + add_opinion = { + modifier = demanded_my_conversion_opinion + target = root + opinion = -10 + } + } + } + + #Accept + option = { + name = religious_interaction.2012.a + scope:recipient = { + if = { # Check that they don't already have a hook on root + limit = { + NOT = { + has_hook_of_type = { + target = root + type = favor_hook + } + } + } + add_hook = { + target = root + type = favor_hook + } + } + } + demand_conversion_interaction_effect = yes + + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + #Refuse + option = { + name = religious_interaction.2012.b + if = { + # show player opinion change if it gives imprisonment reason + limit = { + refusing_conversion_is_crime_trigger = { + CHARACTER = scope:recipient + } + } + add_opinion = { + target = scope:recipient + modifier = illegal_resisted_conversion_opinion + years = 15 + } + } + else = { + hidden_effect = { + add_opinion = { + target = scope:recipient + modifier = resisted_conversion_opinion + years = 15 + } + } + } + + ai_chance = { + base = 10 + } + } + + #Use a Hook to force it through + option = { + name = religious_interaction.2012.c + trigger = { + has_strong_usable_hook = scope:recipient + } + use_hook = scope:recipient + demand_conversion_interaction_effect = yes + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } +} + +#demand_conversion_player_ruler_interaction auto accept +religious_interaction.2021 = { + type = letter_event + opening = { + desc = religious_interaction.2021.opening + } + desc = religious_interaction.2021.desc + sender = scope:actor + + immediate = { + show_as_tooltip = { + scope:actor = { + use_hook = scope:recipient + } + } + if = { + limit = { + faith = capital_county.faith + } + save_scope_value_as = { + name = convert_capital + value = yes + } + } + show_as_tooltip = { demand_conversion_interaction_effect = yes } + } + + option = { + name = religious_interaction.2021.a + } +} + + + + +############################################################# +# SUN TRIAL # +# # +# originally by # +# Mathilda Bjarnehed # +# # +# reworked and made approximately 80% more ridiculous by # +# Nick Meredith # +############################################################# + +#I have been left in the sun to die! +religious_interaction.2100 = { + type = character_event + title = religious_interaction.2100.t + desc = { + desc = religious_interaction.2100.desc + first_valid = { + triggered_desc = { #Hostile + trigger = { + scope:capital = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + terrain = mountains + terrain = steppe + } + } + } + desc = religious_interaction.2100.deschostile + } + triggered_desc = { #Waterlogged + trigger = { + scope:capital = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + } + desc = religious_interaction.2100.descwaterlogged + } + triggered_desc = { #Forest + trigger = { + scope:capital = { + OR = { + terrain = forest + terrain = jungle + terrain = taiga + } + } + } + desc = religious_interaction.2100.descforest + } + triggered_desc = { #Pleasant + trigger = { + scope:capital = { + OR = { + terrain = farmlands + terrain = hills + terrain = plains + } + } + } + desc = religious_interaction.2100.descpleasant + } + triggered_desc = { #Oasis + trigger = { + scope:capital = { + terrain = oasis + } + } + desc = religious_interaction.2100.descoasis + } + } + first_valid = { + triggered_desc = { #default + trigger = { + scope:capital = { + NOT = { + terrain = oasis + } + } + } + desc = religious_interaction.2100.middledefault + } + triggered_desc = { #Oasis + trigger = { + scope:capital = { + terrain = oasis + } + } + desc = religious_interaction.2100.middleoasis + } + } + first_valid = { + triggered_desc = { #Waterlogged + trigger = { + scope:capital = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + } + desc = religious_interaction.2100.endwaterlogged + } + triggered_desc = { #Pleasant + trigger = { + scope:capital = { + OR = { + terrain = farmlands + terrain = hills + terrain = plains + } + } + } + desc = religious_interaction.2100.endpleasant + } + triggered_desc = { #Forest + trigger = { + scope:capital = { + OR = { + terrain = forest + terrain = taiga + terrain = jungle + } + } + } + desc = religious_interaction.2100.endforest + } + triggered_desc = { #Oasis + trigger = { + scope:capital = { + terrain = oasis + } + } + desc = religious_interaction.2100.endoasis + } + } + } + theme = death + override_background = { + trigger = { + scope:capital = { + terrain = desert_mountains + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = plains + } + } + reference = plains + } + override_background = { + trigger = { + scope:capital = { + terrain = hills + } + } + reference = hills + } + override_background = { + trigger = { + scope:capital = { + OR = { + terrain = wetlands + terrain = floodplains + } + } + } + reference = wilderness_wetlands + } + override_background = { + trigger = { + scope:capital = { + terrain = drylands + } + } + reference = drylands + } + override_background = { + trigger = { + scope:capital = { + terrain = oasis + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = farmlands + } + } + reference = farmland + } + override_background = { + trigger = { + scope:capital = { + NOR = { + terrain = desert_mountains + terrain = farmlands + terrain = oasis + terrain = drylands + terrain = wetlands + terrain = floodplains + terrain = plains + } + } + } + reference = wilderness_scope + } + left_portrait = { + character = root + animation = prisondungeon + override_imprisonment_visuals = yes + } + right_portrait = { + character = scope:imprisoner + animation = personality_zealous + } + + immediate = { + scope:imprisoner = { + capital_province = { + save_scope_as = capital + } + } + } + + #What will happen...? + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + scope:capital = { + OR = { + terrain = farmlands + terrain = hills + terrain = plains + terrain = floodplains + terrain = wetlands + terrain = oasis + terrain = forest + terrain = jungle + terrain = taiga + } + } + } + desc = religious_interaction.2100.a.confused + } + triggered_desc = { + trigger = { + faith = { + has_doctrine = tenet_sun_worship + } + } + desc = religious_interaction.2100.a.believer + } + triggered_desc = { + trigger = { + NOT = { + faith = { + has_doctrine = tenet_sun_worship + } + } + } + desc = religious_interaction.2100.a.unbeliever + } + } + } + } + + random_list = { + desc = outcome_in_a_few_days + 50 = { #they are freed and super cool! + + sun_trial_survival_modifier = yes + + desc = religious_interaction.2100.a.success + show_as_tooltip = { sun_trial_survival_effect = yes } + trigger_event = { + id = religious_interaction.2101 + days = 3 + } + scope:imprisoner = { + trigger_event = { + id = religious_interaction.2102 + days = 3 + } + } + } + 50 = { #they die without consequences! + + sun_trial_death_modifier = yes + + desc = religious_interaction.2100.a.failure + show_as_tooltip = { sun_trial_death_effect = yes } + trigger_event = { + id = religious_interaction.2103 + days = 3 + } + scope:imprisoner = { + trigger_event = { + id = religious_interaction.2104 + days = 3 + } + } + } + } + } +} + +#I have survived! +religious_interaction.2101 = { + type = character_event + title = religious_interaction.2101.t + desc = { + first_valid = { + triggered_desc = { #Pleasant + trigger = { + scope:capital = { + OR = { + terrain = farmlands + terrain = hills + terrain = plains + terrain = floodplains + terrain = wetlands + terrain = forest + terrain = jungle + terrain = taiga + } + } + } + desc = religious_interaction.2101.desc.pleasant + } + triggered_desc = { #Oasis + trigger = { + scope:capital = { + terrain = oasis + } + } + desc = religious_interaction.2101.desc.oasis + } + triggered_desc = { #Regular + trigger = { + scope:capital = { + NOR = { + terrain = oasis + terrain = farmlands + terrain = hills + terrain = plains + terrain = floodplains + terrain = wetlands + terrain = forest + terrain = jungle + terrain = taiga + } + } + } + desc = religious_interaction.2101.start.desc + desc = religious_interaction.2101.end.desc + } + } + } + theme = dungeon + left_portrait = { + character = root + animation = happiness + override_imprisonment_visuals = yes + } + right_portrait = { + character = scope:imprisoner + animation = anger + } + override_background = { + trigger = { + scope:capital = { + terrain = desert_mountains + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = plains + } + } + reference = plains + } + override_background = { + trigger = { + scope:capital = { + terrain = hills + } + } + reference = hills + } + override_background = { + trigger = { + scope:capital = { + OR = { + terrain = wetlands + terrain = floodplains + } + } + } + reference = wilderness_wetlands + } + override_background = { + trigger = { + scope:capital = { + terrain = drylands + } + } + reference = drylands + } + override_background = { + trigger = { + scope:capital = { + terrain = oasis + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = farmlands + } + } + reference = farmland + } + override_background = { + trigger = { + scope:capital = { + NOR = { + terrain = desert_mountains + terrain = farmlands + terrain = oasis + terrain = drylands + terrain = wetlands + terrain = floodplains + terrain = plains + } + } + } + reference = wilderness_scope + } + immediate = { + scope:imprisoner = { + capital_province = { + save_scope_as = capital + } + } + } + + option = { + name = religious_interaction.2101.a + sun_trial_survival_effect = yes + } +} + +#They survived... +religious_interaction.2102 = { + type = character_event + title = religious_interaction.2100.t + desc = { + first_valid = { + triggered_desc = { #Pleasant + trigger = { + scope:capital = { + OR = { + terrain = farmlands + terrain = hills + terrain = plains + terrain = floodplains + terrain = wetlands + terrain = forest + terrain = jungle + terrain = taiga + } + } + } + desc = religious_interaction.2101.desc.pleasant + } + triggered_desc = { #Oasis + trigger = { + scope:capital = { + terrain = oasis + } + } + desc = religious_interaction.2101.desc.oasis + } + triggered_desc = { #Noasis + trigger = { + scope:capital = { + NOT = { + terrain = oasis + } + } + } + desc = religious_interaction.2102.desc + } + } + } + theme = dungeon + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:prisoner + animation = happiness + override_imprisonment_visuals = yes + } + override_background = { + trigger = { + scope:capital = { + terrain = desert_mountains + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = plains + } + } + reference = plains + } + override_background = { + trigger = { + scope:capital = { + terrain = hills + } + } + reference = hills + } + override_background = { + trigger = { + scope:capital = { + OR = { + terrain = wetlands + terrain = floodplains + } + } + } + reference = wilderness_wetlands + } + override_background = { + trigger = { + scope:capital = { + terrain = drylands + } + } + reference = drylands + } + override_background = { + trigger = { + scope:capital = { + terrain = oasis + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = farmlands + } + } + reference = farmland + } + override_background = { + trigger = { + scope:capital = { + NOR = { + terrain = desert_mountains + terrain = farmlands + terrain = oasis + terrain = drylands + terrain = wetlands + terrain = floodplains + terrain = plains + } + } + } + reference = wilderness_scope + } + immediate = { + show_as_tooltip = { + sun_trial_interaction_piety_effect = yes + } + capital_province = { + save_scope_as = capital + } + } + + #Okay then + option = { + name = religious_interaction.2102.a + + sun_trial_survival_effect = yes + ai_chance = { + base = 100 + } + } + + #They look dead to me? + option = { + trigger = { scope:prisoner = { is_ai = yes } } + name = religious_interaction.2102.b + flavor = religious_interaction.2102.b.tt + + duel = { + skill = intrigue + value = average_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + desc = religious_interaction.2102.b.success + unknown_murder_effect = { + VICTIM = scope:prisoner + MURDERER = scope:imprisoner + REASON = death_sun_trial + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + desc = religious_interaction.2102.b.failure + known_murder_effect = { + VICTIM = scope:prisoner + MURDERER = scope:imprisoner + EXPOSER = scope:imprisoner + } + } + } + + ai_chance = { + base = 10 + ai_honor_target_modifier = { VALUE = -100 } + ai_boldness_target_modifier = { VALUE = 30 } + ai_vengefulness_target_modifier = { VALUE = 50 } + ai_zeal_target_modifier = { VALUE = -100 } + } + } +} + +#I have died... +religious_interaction.2103 = { + type = character_event + title = religious_interaction.2100.t + desc = { + first_valid = { + triggered_desc = { #Pleasant + trigger = { + scope:capital = { + OR = { + terrain = farmlands + terrain = hills + terrain = plains + terrain = forest + terrain = jungle + terrain = taiga + } + } + } + desc = religious_interaction.2103.desc.pleasant + } + triggered_desc = { #Wetlands + trigger = { + scope:capital = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + } + desc = religious_interaction.2103.desc.waterlogged + } + triggered_desc = { #Oasis + trigger = { + scope:capital = { + terrain = oasis + } + } + desc = religious_interaction.2103.desc.oasis + } + triggered_desc = { #Regular + trigger = { + scope:capital = { + NOR = { + terrain = oasis + terrain = farmlands + terrain = hills + terrain = plains + terrain = floodplains + terrain = wetlands + terrain = forest + terrain = jungle + terrain = taiga + } + } + } + desc = { + desc = religious_interaction.2101.start.desc + desc = religious_interaction.2103.end.desc + } + } + } + } + theme = dungeon + left_portrait = { + character = root + animation = prisondungeon + override_imprisonment_visuals = yes + } + override_background = { + trigger = { + scope:capital = { + terrain = desert_mountains + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = plains + } + } + reference = plains + } + override_background = { + trigger = { + scope:capital = { + terrain = hills + } + } + reference = hills + } + override_background = { + trigger = { + scope:capital = { + OR = { + terrain = wetlands + terrain = floodplains + } + } + } + reference = wilderness_wetlands + } + override_background = { + trigger = { + scope:capital = { + terrain = drylands + } + } + reference = drylands + } + override_background = { + trigger = { + scope:capital = { + terrain = oasis + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = farmlands + } + } + reference = farmland + } + override_background = { + trigger = { + scope:capital = { + NOR = { + terrain = desert_mountains + terrain = farmlands + terrain = oasis + terrain = drylands + terrain = wetlands + terrain = floodplains + terrain = plains + } + } + } + reference = wilderness_scope + } + + immediate = { + scope:imprisoner = { + capital_province = { + save_scope_as = capital + } + } + } + + option = { #Die of exposure + name = religious_interaction.2103.a + + trigger = { + scope:capital = { + NOR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + } + } + } + sun_trial_death_effect = yes + } + + option = { #Drown + name = religious_interaction.2103.b + + trigger = { + scope:capital = { + OR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + } + } + } + sun_trial_death_effect = yes + } +} + +#They died! +religious_interaction.2104 = { + type = character_event + title = religious_interaction.2100.t + desc = { + first_valid = { + triggered_desc = { #Drowned + trigger = { + scope:capital = { + OR = { + terrain = floodplains + terrain = wetlands + } + } + } + desc = religious_interaction.2104.desc.drowned + } + triggered_desc = { #Drowned + trigger = { + scope:capital = { + terrain = oasis + } + } + desc = religious_interaction.2104.desc.oasisdrowned + } + triggered_desc = { #Regular death + trigger = { + scope:capital = { + NOR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + } + } + } + desc = religious_interaction.2104.desc + } + } + } + theme = dungeon + left_portrait = { + character = root + animation = happiness + } + right_portrait = { + character = scope:prisoner + animation = prisondungeon + override_imprisonment_visuals = yes + } + override_background = { + trigger = { + scope:capital = { + terrain = desert_mountains + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = plains + } + } + reference = plains + } + override_background = { + trigger = { + scope:capital = { + terrain = hills + } + } + reference = hills + } + override_background = { + trigger = { + scope:capital = { + OR = { + terrain = wetlands + terrain = floodplains + } + } + } + reference = wilderness_wetlands + } + override_background = { + trigger = { + scope:capital = { + terrain = drylands + } + } + reference = drylands + } + override_background = { + trigger = { + scope:capital = { + terrain = oasis + } + } + reference = wilderness_desert + } + override_background = { + trigger = { + scope:capital = { + terrain = farmlands + } + } + reference = farmland + } + override_background = { + trigger = { + scope:capital = { + NOR = { + terrain = desert_mountains + terrain = farmlands + terrain = oasis + terrain = drylands + terrain = wetlands + terrain = floodplains + terrain = plains + } + } + } + reference = wilderness_scope + } + immediate = { + sun_trial_interaction_piety_effect = yes + sun_trial_death_effect = yes + capital_province = { + save_scope_as = capital + } + } + + #Okay then + option = { + name = religious_interaction.2102.a + + trigger = { + scope:capital = { + NOR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + } + } + } + } + + #Uhh, sure? + option = { + name = religious_interaction.2104.b.drowned + + trigger = { + scope:capital = { + OR = { + terrain = floodplains + terrain = wetlands + terrain = oasis + } + } + } + + add_character_modifier = { + modifier = sun_trial_suspicious_modifier + years = 25 + } + } +} + + +######################### +# Literalist Debate # +# by Ewan Cowhig Croft # +# 2400 # +######################### + +# The challenge to debate is issued! +# by Ewan Cowhig Croft +religious_interaction.2400 = { + type = character_event + title = religious_interaction.2400.t + desc = religious_interaction.2400.desc + theme = faith + override_background = { + reference = council_chamber + } + left_portrait = scope:actor + + immediate = { + capital_province = { #For loc. + barony = { save_scope_as = debate_locale } + } + } + + #I accept the challenge. + option = { + name = religious_interaction.2400.a + duel = { + skill = learning + target = scope:actor + 50 = { #Defender wins the toss. + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + add = { + value = scope:recipient.num_virtuous_traits + multiply = 5 + } + } + modifier = { + add = { + value = scope:recipient.num_sinful_traits + multiply = -5 + } + } + modifier = { + add = { + value = scope:actor.num_virtuous_traits + multiply = -5 + } + } + modifier = { + add = { + value = scope:actor.num_sinful_traits + multiply = 5 + } + } + desc = religious_interaction.2400.a.tt_success + hidden_effect = { + random_list = { + 1490 = { + scope:actor = { + add_character_flag = { + flag = debate_lost + years = 1 + } + trigger_event = { + id = religious_interaction.2401 + days = 7 + } + } + scope:recipient = { + add_character_flag = { + flag = debate_won + years = 1 + } + trigger_event = { + id = religious_interaction.2402 + days = 7 + } + } + } + 10 = { + trigger = { + scope:actor = { + is_ai = yes + age >= 35 + } + } + compare_modifier = { + target = scope:recipient + value = learning + } + compare_modifier = { + target = scope:actor + value = learning + multiplier = -1 + } + compare_modifier = { + target = scope:actor + value = age + offset = -40 + multiplier = 0.5 + } + compare_modifier = { + target = scope:actor + value = stress + multiplier = 0.2 + } + scope:actor = { + save_scope_as = victim + } + scope:recipient = { + trigger_event = { + id = religious_interaction.2403 + days = 7 + } + } + } + } + } + } + 50 = { #Attacker wins the toss. + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + modifier = { + add = { + value = scope:recipient.num_virtuous_traits + multiply = -5 + } + } + modifier = { + add = { + value = scope:recipient.num_sinful_traits + multiply = 5 + } + } + modifier = { + add = { + value = scope:actor.num_virtuous_traits + multiply = 5 + } + } + modifier = { + add = { + value = scope:actor.num_sinful_traits + multiply = -5 + } + } + desc = religious_interaction.2400.a.tt_fail + hidden_effect = { + random_list = { + 1490 = { + scope:actor = { + add_character_flag = { + flag = debate_won + years = 1 + } + trigger_event = { + id = religious_interaction.2401 + days = 7 + } + } + scope:recipient = { + add_character_flag = { + flag = debate_lost + years = 1 + } + trigger_event = { + id = religious_interaction.2402 + days = 7 + } + } + } + 10 = { + trigger = { + scope:recipient = { + is_ai = yes + age >= 35 + } + } + compare_modifier = { + target = scope:actor + value = learning + } + compare_modifier = { + target = scope:recipient + value = learning + multiplier = -1 + } + compare_modifier = { + target = scope:recipient + value = age + offset = -40 + multiplier = 0.5 + } + compare_modifier = { + target = scope:recipient + value = stress + multiplier = 0.2 + } + scope:recipient = { + save_scope_as = victim + } + scope:actor = { + trigger_event = { + id = religious_interaction.2403 + days = 7 + } + } + } + } + } + } + } + #No stress, as AI is forced to pick this. + ai_chance = { #The AI always pick this. + base = 100 + } + } + + #I have better things to do. + option = { + name = religious_interaction.2400.b + trigger = { is_ai = no } #Only players may opt out. + add_piety = medium_piety_loss + custom_tooltip = religious_interaction.2400.b.tt + hidden_effect = { + scope:actor = { + send_interface_toast = { + title = religious_interaction.2400.b_turned_down + left_icon = scope:recipient + } + add_piety = medium_piety_gain + remove_character_modifier = used_literalist_debate_modifier + } + } + stress_impact = { zealous = minor_stress_impact_gain } + ai_chance = { #Unavailable to the AI. + base = 0 + } + } +} + +# #Debate results: aggressor / actor +# by Ewan Cowhig Croft +religious_interaction.2401 = { + type = character_event + title = religious_interaction.2400.t + desc = { + desc = religious_interaction.2401.desc_intro + first_valid = { + triggered_desc = { + trigger = { has_character_flag = debate_won } + desc = religious_interaction.2401.desc_won + } + desc = religious_interaction.2401.desc_lost + } + } + theme = faith + override_background = { + reference = council_chamber + } + left_portrait = scope:recipient + + #The result. + option = { + name = { + trigger = { has_character_flag = debate_won } + text = religious_interaction.2401.a_won + } + name = { + trigger = { has_character_flag = debate_lost } + text = religious_interaction.2401.a_lost + } + if = { + limit = { has_character_flag = debate_won } + add_piety = major_piety_gain + reverse_add_opinion = { + target = scope:recipient + modifier = literalist_debate_loser_opinion + } + } + else_if = { + limit = { has_character_flag = debate_lost } + add_piety = major_piety_loss + reverse_add_opinion = { + target = scope:recipient + modifier = literalist_debate_victor_opinion + } + } + stress_impact = { cynical = medium_stress_impact_gain } + ai_chance = { #No other options available. + base = 100 + } + } +} + +# #Debate results: defender / recipient +# by Ewan Cowhig Croft +religious_interaction.2402 = { + type = character_event + title = religious_interaction.2400.t + desc = { + desc = religious_interaction.2401.desc_intro + first_valid = { + triggered_desc = { + trigger = { has_character_flag = debate_won} + desc = religious_interaction.2402.desc_won + } + desc = religious_interaction.2402.desc_lost + } + } + theme = faith + override_background = { + reference = council_chamber + } + left_portrait = scope:actor + + #The result. + option = { + name = { + trigger = { has_character_flag = debate_won } + text = religious_interaction.2401.a_won + } + name = { + trigger = { has_character_flag = debate_lost } + text = religious_interaction.2401.a_lost + } + if = { + limit = { has_character_flag = debate_won} + add_piety = major_piety_gain + reverse_add_opinion = { + target = scope:actor + modifier = literalist_debate_loser_opinion + } + } + else_if = { + limit = { has_character_flag = debate_lost } + add_piety = major_piety_loss + reverse_add_opinion = { + target = scope:actor + modifier = literalist_debate_victor_opinion + } + } + #No stress, as the AI is forced to get here. + ai_chance = { #No other options available. + base = 100 + } + } +} + +################################ +# Things go really bad for the defender +# by Petter Vilberg +################################ +religious_interaction.2403 = { + type = character_event + title = religious_interaction.2400.t + desc = { + desc = religious_interaction.2401.desc_intro + desc = religious_interaction.2403.desc + first_valid = { + random_valid = { + triggered_desc = { + trigger = { scope:victim = { is_male = yes } } + desc = religious_interaction.2403.conclusion_man + } + triggered_desc = { + trigger = { scope:victim = { is_male = no } } + desc = religious_interaction.2403.conclusion_woman + } + triggered_desc = { + desc = religious_interaction.2403.conclusion_either + } + } + } + } + theme = faith + override_background = { + reference = council_chamber + } + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:victim + animation = pain + } + + option = { + name = religious_interaction.2403.a + name = { + trigger = { ai_compassion <= medium_negative_ai_value } + text = religious_interaction.2403.a.low_compassion + } + name = { + trigger = { has_trait = stubborn } + text = religious_interaction.2403.a.stubborn + } + name = { + trigger = { has_trait = zealous } + text = religious_interaction.2403.a.zealous + } + trait = zealous + custom_tooltip = religious_interaction.2403.a.tt + hidden_effect = { + scope:victim = { + death = { + killer = root + death_reason = death_literalist_debate + } + } + } + } +} + +religious_interaction.2500 = { + type = letter_event + opening = char_interaction.0001.opening + desc = religious_interaction.2500.desc + sender = scope:recipient + + immediate = { + show_as_tooltip = { convert_at_war_interaction_effect = yes } + } + + option = { + name = religious_interaction.2500.a + } +} + +religious_interaction.2501 = { + type = letter_event + opening = char_interaction.0001.opening + desc = religious_interaction.2501.desc + sender = scope:recipient + + option = { + name = religious_interaction.1000.negative + add_piety_level = -1 + stress_impact = { zealous = major_stress_impact_gain } + } +} + +######################### +# Exaltation of Pain tenet +######################### + +religious_interaction.2600 = { + type = character_event + title = religious_interaction.2600.t + desc = { + first_valid = { + #Are we the recipient? + triggered_desc = { + trigger = { root = scope:recipient } + desc = religious_interaction.2600.desc.recipient + } + #Else we're the actor + desc = religious_interaction.2600.desc.actor + } + } + theme = faith + override_background = { reference = temple } + left_portrait = { + character = root + triggered_animation = { + trigger = { scope:other_character = scope:actor } + animation = interested + } + animation = flirtation + } + right_portrait = { + character = scope:other_character + triggered_animation = { + trigger = { scope:other_character = scope:recipient } + animation = interested_left + } + animation = flirtation_left + } + immediate = { + if = { + limit = { root = scope:recipient } + scope:actor = { save_scope_as = other_character } + } + else = { + scope:recipient = { save_scope_as = other_character } + } + scope:recipient = { + add_character_flag = { + flag = involved_in_revel_in_pain_recently + years = 3 + } + } + } + #This is happening, I guess + option = { + name = religious_interaction.2600.a + revel_in_pain_effect = yes + revel_in_pain_opinion_effect = yes + } +} + +religious_interaction.2610 = { + type = letter_event + opening = char_interaction.0001.opening + desc = religious_interaction.2610.desc + sender = scope:recipient + + immediate = { + scope:recipient = { + add_character_flag = { + flag = involved_in_revel_in_pain_recently + years = 3 + } + } + } + + option = { + name = religious_interaction.2610.a + } +} diff --git a/N3OW/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt b/N3OW/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt new file mode 100644 index 00000000..25fac7cd --- /dev/null +++ b/N3OW/events/scheme_events/court_scheme/court_scheme_ongoing_events.txt @@ -0,0 +1,5518 @@ + + +namespace = court_ongoing + + +# ONGOING MANAGEMENT +# court_ongoing.0001 - Generic "player target opted out"-event + +# START EVENTS +# court_ongoing.0500 - + +# ONGOING EVENTS +# court_ongoing.1000 - Someone farted! +# court_ongoing.1010 - Defend their honor through duel or diplomacy +# court_ongoing.1020 - Fetch gift +# court_ongoing.1022 - Gift: Wolf pelt +# court_ongoing.1030 - Gift: cat or dog or eagle +# court_ongoing.1040 - Gift: necklace +# court_ongoing.1050 - Gift: flower +# court_ongoing.1100 - Compliment poem +# court_ongoing.1110 - Dealing with competition +# court_ongoing.1120 - Boring party guest +# court_ongoing.1200 - Extreme request + + + +###################### +# ONGOING MANAGEMENT # +###################### + +#Generic "player target opted out"-event +court_ongoing.0001 = { #by Linnéa Thimrén + type = character_event + title = court_ongoing.0001.t + desc = court_ongoing.0001.desc + + theme = romance_scheme + left_portrait = scope:target + + option = { + name = court_ongoing.0001.a + + scope:scheme = { end_scheme = yes } + } +} + + +################ +# START EVENTS # +################ + +#Pick a method +scripted_effect court_ongoing_0501_option_randomizer_effect = { + random_list = { + 10 = { #Song + trigger = { + NOR = { + has_character_flag = court_start_song + #Nothing shunned/criminal, as song text is public and explicitly about love + court_love_is_shunned_or_criminal_trigger = yes + } + } + modifier = { + add = { + value = diplomacy + multiply = 10 + } + } + add_character_flag = court_start_song + } + 10 = { #Sneaky love letter + trigger = { NOT = { has_character_flag = court_start_sneaky_love_letter } } + modifier = { + add = { + value = intrigue + multiply = 10 + } + } + add_character_flag = court_start_sneaky_love_letter + } + 10 = { #Poem love letter + trigger = { NOT = { has_character_flag = court_start_poem_love_letter } } + modifier = { + add = { + value = learning + multiply = 10 + } + } + add_character_flag = court_start_poem_love_letter + } + 10 = { #Sparring + trigger = { + NOT = { has_character_flag = court_start_sparring } + can_be_warrior_trigger = { ARMY_OWNER = root } + } + modifier = { + add = { + value = prowess + multiply = 10 + } + } + add_character_flag = court_start_sparring + } + } +} + +court_ongoing.0501 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.0501.t + desc = court_ongoing.0501.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:target + animation = personality_compassionate + camera = camera_event_right_forward + } + + cooldown = { years = 1 } + + trigger = { + OR = { + scope:owner = { is_ai = no } + scope:target = { is_ai = no } + } + } + + immediate = { + #Randomize options + court_ongoing_0501_option_randomizer_effect = yes + court_ongoing_0501_option_randomizer_effect = yes + court_ongoing_0501_option_randomizer_effect = yes + } + + #Song + option = { + trigger = { has_character_flag = court_start_song } + name = court_ongoing.0501.a + custom_tooltip = court_ongoing.0501.tt + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_song + } + + ai_chance = { + base = 1 + modifier = { + add = { value = diplomacy } + } + } + } + + #sneaky love letter + option = { + trigger = { has_character_flag = court_start_sneaky_love_letter } + name = court_ongoing.0501.b + custom_tooltip = court_ongoing.0501.tt + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_sneaky_love_letter + } + + ai_chance = { + base = 1 + modifier = { + add = { value = intrigue } + } + } + } + + #poem love letter + option = { + trigger = { has_character_flag = court_start_poem_love_letter } + name = court_ongoing.0501.c + custom_tooltip = court_ongoing.0501.tt + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_poem_love_letter + } + ai_chance = { + base = 1 + modifier = { + add = { value = learning } + } + } + } + + #drill + option = { + trigger = { has_character_flag = court_start_sparring } + name = court_ongoing.0501.d + custom_tooltip = court_ongoing.0501.tt + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_sparring + } + ai_chance = { + base = 1 + modifier = { + add = { value = prowess } + } + } + } + + #go with the flow + option = { + name = court_ongoing.0501.x + custom_tooltip = court_ongoing.0501.tt + + hidden_effect = { + random_list = { + 1 = { + trigger = { #Nothing shunned/criminal, as song text is public and explicitly about love + court_love_is_shunned_or_criminal_trigger = no + } + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_song + } + } + 1 = { + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_sneaky_love_letter + } + } + 1 = { + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_poem_love_letter + } + } + 1 = { + save_scope_value_as = { + name = starting_event_flavor + value = flag:court_start_sparring + } + } + } + } + } + + after = { + remove_character_flag = court_start_song + remove_character_flag = court_start_sneaky_love_letter + remove_character_flag = court_start_poem_love_letter + remove_character_flag = court_start_sparring + if = { + limit = { + exists = scope:starting_event_flavor + scope:starting_event_flavor = flag:court_start_poem_love_letter + } + scope:target = { trigger_event = court_ongoing.0512 } + } + else = { + scope:target = { trigger_event = court_ongoing.0502 } + } + } +} + + + +#Start narrative event for target (for everything but love poem) +court_ongoing.0502 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.0502.t + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_song } + desc = { + desc = court_ongoing.court_start_song.start.0502.desc + first_valid = { + triggered_desc = { + trigger = { scope:owner.diplomacy < mediocre_skill_rating } + desc = court_ongoing.court_start_song.bad.0502.desc + } + desc = court_ongoing.court_start_song.good.0502.desc + } + } + } + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_sneaky_love_letter } + desc = { + desc = court_ongoing.court_start_sneaky_love_letter.start.0502.desc + first_valid = { + triggered_desc = { + trigger = { is_close_or_extended_family_of = scope:owner } + desc = court_ongoing.court_start_sneaky_love_letter.relative.0502.desc + } + desc = court_ongoing.court_start_sneaky_love_letter.compliment.0502.desc + } + desc = court_ongoing.court_start_sneaky_love_letter.end.0502.desc + } + } + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_sparring } + desc = { + desc = court_ongoing.court_start_sparring.start.0502.desc + first_valid = { + triggered_desc = { + trigger = { scope:owner.prowess < mediocre_skill_rating } + desc = court_ongoing.court_start_sparring.bad.0502.desc + } + triggered_desc = { + trigger = { scope:owner.prowess < high_skill_rating } + desc = court_ongoing.court_start_sparring.good.0502.desc + } + desc = court_ongoing.court_start_sparring.great.0502.desc + } + desc = court_ongoing.court_start_sparring.end.0502.desc + } + } + } + } + + theme = romance_scheme + override_background = { + trigger = { is_travelling = yes } + reference = terrain_travel + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_sparring } + reference = courtyard + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_sneaky_love_letter } + reference = sitting_room + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_song } + reference = garden + } + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { + OR = { + scope:starting_event_flavor = flag:court_start_song + scope:starting_event_flavor = flag:court_start_sparring + } + } + animation = flirtation + } + triggered_animation = { + trigger = { always = yes } + animation = idle + } + } + + trigger = { + exists = scope:scheme + scope:scheme = { + scheme_type = courting + } + } + + immediate = { + #Stuff for the desc + if = { + limit = { scope:starting_event_flavor = flag:court_start_sparring } + scope:owner = { set_signature_weapon_effect = yes } + } + } + + #How delightful! Yes please + option = { + name = court_ongoing.0502.a + custom_tooltip = court_ongoing.0502.a.tt + + # If you already have a soulmate, they get very mad + every_relation = { + type = soulmate + limit = { soulmate_relation_is_exclusive_trigger = yes } + add_opinion = { + modifier = betrayed_our_promise + target = root + } + } + + ai_chance = { + base = 100 + + incest_acceptance_modifier = { #Factor between 1 and 0 + SEDUCER = scope:owner + TARGET = scope:target + } + modifier = { + num_of_relation_soulmate = 1 + factor = { + value = 0 + add = { + value = ai_honor + multiply = -0.005 # 0.5 at -100 + } + add = { + value = ai_compassion + multiply = -0.005 # 0.5 at -100 + } + if = { + limit = { + has_trait = lustful + } + add = 0.2 + } + min = 0 + max = 1 + } + } + + modifier = { + has_relation_lover = scope:owner + add = 1000 + } + } + } + + #Ew, no! + option = { + name = { + trigger = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + text = court_ongoing.0502.b.incest + } + name = { + trigger = { NOT = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } } + text = court_ongoing.0502.b + } + + save_scope_value_as = { + name = hard_court_reject + value = yes + } + + show_as_tooltip = { + scope:scheme = { end_scheme = yes } + } + + ai_chance = { + base = 0 + + modifier = { + is_close_or_extended_family_of = scope:owner + add = 50 + } + modifier = { + relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + add = 200 + } + modifier = { + relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + add = 200 + } + modifier = { + has_relation_rival = scope:owner + add = 200 + } + modifier = { + has_relation_lover = scope:owner + factor = 0.01 + } + } + } + + after = { + scope:owner = { trigger_event = court_ongoing.0503 } + } +} + + +#Start narrative event for target (love poem) +court_ongoing.0512 = { + type = letter_event + opening = court_ongoing.1101.t + desc = court_ongoing.court_start_poem_love_letter.0502.desc + sender = { + character = scope:owner + animation = flirtation + } + + immediate = { + scope:owner = { love_letter_calculation_effect = yes } + } + + + #How delightful! Yes please + option = { + name = court_ongoing.0502.a + custom_tooltip = court_ongoing.0502.a.tt + + ai_chance = { + base = 100 + + incest_acceptance_modifier = { #Factor between 1 and 0 + SEDUCER = scope:owner + TARGET = scope:target + } + modifier = { + num_of_relation_soulmate = 1 + factor = { + value = 0 + add = { + value = ai_honor + multiply = -0.005 # 0.5 at -100 + } + add = { + value = ai_compassion + multiply = -0.005 # 0.5 at -100 + } + if = { + limit = { + has_trait = lustful + } + add = 0.2 + } + min = 0 + max = 1 + } + } + + modifier = { + has_relation_lover = scope:owner + add = 1000 + } + } + } + + #Ew, no! + option = { + name = { + trigger = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + text = court_ongoing.0502.b.incest + } + name = { + trigger = { NOT = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } } + text = court_ongoing.0502.b + } + + save_scope_value_as = { + name = hard_court_reject + value = yes + } + + show_as_tooltip = { + scope:scheme = { end_scheme = yes } + } + + ai_chance = { + base = 0 + + modifier = { + relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + add = { + if = { + limit = { sexually_liberal_trigger = yes } + value = 200 + } + else = { + value = 500 + } + } + } + modifier = { + relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } + add = 200 + } + modifier = { + has_relation_rival = scope:owner + add = 200 + } + modifier = { + has_relation_lover = scope:owner + factor = 0.01 + } + } + } + + after = { + scope:owner = { trigger_event = court_ongoing.0503 } + } +} + +#Start narrative event for owner +court_ongoing.0503 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.0501.t + desc = { + first_valid = { + #SONG + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_song } + desc = { + desc = court_ongoing.court_start_song.intro.0503.desc + first_valid = { + triggered_desc = { + trigger = { #Sodomy reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.public_sodomy_rejection.0503.desc + } + triggered_desc = { + trigger = { #Incest reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.public_incest_rejection.0503.desc + } + triggered_desc = { + trigger = { #Regular reject + exists = scope:hard_court_reject + } + desc = court_ongoing.public_regular_rejection.0503.desc + } + desc = court_ongoing.court_start_song.success.0503.desc + } + } + } + #SNEAKY LOVE LETTER + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_sneaky_love_letter } + desc = { + desc = court_ongoing.court_start_sneaky_love_letter.intro.0503.desc + first_valid = { + triggered_desc = { + trigger = { #Sodomy reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.written_sodomy_rejection.0503.desc + } + triggered_desc = { + trigger = { #Incest reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.written_incest_rejection.0503.desc + } + triggered_desc = { + trigger = { #Regular reject + exists = scope:hard_court_reject + } + desc = court_ongoing.written_regular_rejection.0503.desc + } + desc = court_ongoing.court_start_sneaky_love_letter.success.0503.desc + } + } + } + #LOVE POEM + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_poem_love_letter } + desc = { + desc = court_ongoing.court_start_poem_love_letter.intro.0503.desc + first_valid = { + triggered_desc = { + trigger = { #Sodomy reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.written_sodomy_rejection.0503.desc + } + triggered_desc = { + trigger = { #Incest reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.written_incest_rejection.0503.desc + } + triggered_desc = { + trigger = { #Regular reject + exists = scope:hard_court_reject + } + desc = court_ongoing.written_regular_rejection.0503.desc + } + desc = court_ongoing.court_start_sneaky_love_letter.success.0503.desc + } + } + } + #DRILL + triggered_desc = { + trigger = { scope:starting_event_flavor = flag:court_start_sparring } + desc = { + first_valid = { + triggered_desc = { + trigger = { location = scope:target.location } + desc = court_ongoing.court_start_sparring.same_locaton_intro.0503.desc + } + desc = court_ongoing.court_start_sparring.other_locaton_intro.0503.desc + } + first_valid = { + triggered_desc = { + trigger = { #Sodomy reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_sodomy_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.public_sodomy_rejection.0503.desc + } + triggered_desc = { + trigger = { #Incest reject + exists = scope:hard_court_reject + scope:target = { relation_with_character_is_incestuous_in_my_or_lieges_faith_trigger = { CHARACTER = scope:owner } } + NOT = { scope:owner = { has_relation_lover = scope:target } } + NOT = { scope:owner = { is_spouse_of = scope:target } } + } + desc = court_ongoing.public_incest_rejection.0503.desc + } + triggered_desc = { + trigger = { #Regular reject + exists = scope:hard_court_reject + } + desc = court_ongoing.public_regular_rejection.0503.desc + } + desc = court_ongoing.court_start_sparring.success.0503.desc + } + } + } + } + } + + theme = romance_scheme + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_sparring } + reference = courtyard + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_sneaky_love_letter } + reference = sitting_room + } + override_background = { + trigger = { scope:starting_event_flavor = flag:court_start_song } + reference = garden + } + left_portrait = { + character = root + animation = storyteller + } + right_portrait = { + character = scope:target + animation = admiration + } + + immediate = { + scope:target.location = { save_scope_as = target_location } + #Stuff for the desc + if = { + limit = { scope:starting_event_flavor = flag:court_start_sparring } + random_dummy_gender_soldier_effect = { SCOPE_NAME = sparring_soldier } + } + } + + option = { + trigger = { NOT = { exists = scope:hard_court_reject } } + name = court_ongoing.0503.a + custom_tooltip = court_ongoing.0503.a.tt + + } + + option = { + trigger = { exists = scope:hard_court_reject } + name = court_ongoing.0503.b + + end_court_scheme_effect = { OUTCOME = failure_hard REASON = saved_from_wolf } + } + + after = { + if = { + limit = { + scope:starting_event_flavor = flag:court_start_poem_love_letter + } + remove_variable = love_letter_quality + } + } +} + + +################## +# ONGOING EVENTS # +################## + +#################################### +###SAVE TARGET FROM FART SHAME <3### +#################################### +#court_ongoing.1000 = { #by Mathilda Bjarnehed +# type = character_event +# title = court_ongoing.1000.t +# desc = court_ongoing.1000.desc +# +# theme = romance_scheme +# left_portrait = scope:target +# right_portrait = scope:scapegoat +# widget = { +# gui = "event_window_widget_scheme" +# container = "custom_widgets_container" +# } +# +# trigger = { +# exists = scope:target.court_owner +# # Account for landless court owners. +# scope:target.court_owner = { is_landed = yes } +# NOT = { +# scope:scheme = { +# has_scheme_modifier = courting_kindness_modifier +# } +# } +# } +# +# weight_multiplier = { +# base = 1 +# modifier = { +# exists = scope:scheme.var:court_milestone_event +# add = { #0 at milestone 1, -0.45 at milestone 2, -0.9 at milestone 3 +# value = scope:scheme.var:court_milestone_event +# multiply = -0.45 +# add = 0.45 +# } +# } +# } +# +# immediate = { +# #Savin' some scopes +# scope:target = { +# if = { +# limit = { is_ruler = no } +# court_owner = { save_scope_as = scapegoat } +# } +# else_if = { +# limit = { exists = primary_spouse } +# primary_spouse = { save_scope_as = scapegoat } +# } +# +# court_owner.capital_province = { save_scope_as = location } +# } +# } +# +# #It was me! +# option = { +# name = court_ongoing.1000.a +# +# add_prestige = medium_prestige_loss +# +# random_list = { +# 67 = { +# desc = court_ongoing.1000.a.success +# send_interface_toast = { +# left_icon = scope:target +# title = court_ongoing.1000.a.success +# reverse_add_opinion = { +# target = scope:target +# modifier = grateful_opinion +# opinion = 15 +# } +# scope:scheme = { +# add_scheme_modifier = { +# type = courting_kindness_modifier +# } +# } +# } +# } +# 33 = { +# desc = court_ongoing.1000.a.failure +# send_interface_toast = { +# left_icon = scope:target +# title = court_ongoing.1000.a.failure +# reverse_add_opinion = { +# target = scope:target +# modifier = disgusted_opinion +# opinion = -10 +# } +# } +# } +# } +# +# stress_impact = { +# craven = minor_stress_impact_gain +# gregarious = minor_stress_impact_gain +# arrogant = minor_stress_impact_gain +# shy = minor_stress_impact_gain +# } +# } +# +# #It was this other dude! +# option = { +# trigger = { +# exists = scope:scapegoat +# this != scope:scapegoat +# } +# name = court_ongoing.1000.b +# +# reverse_add_opinion = { +# target = scope:target +# modifier = amused_opinion +# opinion = 15 +# } +# reverse_add_opinion = { +# target = scope:scapegoat +# modifier = insulted_opinion +# opinion = -15 +# } +# +# stress_impact = { +# compassionate = minor_stress_impact_gain +# honest = minor_stress_impact_gain +# } +# } +# +# #Don't do anything +# option = { +# name = court_ongoing.1000.c +# +# stress_impact = { +# brave = minor_stress_impact_gain +# compassionate = minor_stress_impact_gain +# deceitful = minor_stress_impact_gain +# } +# } +#} + + +###DEFEND THEIR HONOR### +scripted_trigger court_ongoing_1010_insulter_trigger = { + save_temporary_scope_as = potential_insulter + basic_is_available_ai = yes + is_adult = yes + exists = liege + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:potential_insulter.liege } + this != scope:target + OR = { + opinion = { + target = scope:target + value <= neutral_opinion + } + AND = { + opinion = { + target = scope:target + value <= low_positive_opinion + } + number_of_opposing_traits = { + target = scope:target + value >= 1 + } + } + } +} + +court_ongoing.1010 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1010.t + desc = court_ongoing.1010.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:insulter + animation = manic + } + lower_right_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + cooldown = { years = 1 } + + trigger = { + NOR = { + has_trait_rank = { + trait = wounded + rank >= 2 + } + scope:scheme = { + has_scheme_modifier = courting_act_of_heroism_modifier + } + } + scope:target = { + OR = { + AND = { + court_owner ?= { + OR = { + any_courtier = { court_ongoing_1010_insulter_trigger = yes } + any_vassal = { court_ongoing_1010_insulter_trigger = yes } + } + } + } + any_relation = { type = rival court_ongoing_1010_insulter_trigger = yes } + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:scheme.var:court_milestone_event = 1 + add = -0.75 + } + } + + immediate = { + scope:target = { + if = { + limit = { root = { is_ai = no } } + assign_quirk_effect = yes + } + court_owner = { + every_vassal = { + limit = { court_ongoing_1010_insulter_trigger = yes } + add_to_list = insulter_list + } + every_courtier = { + limit = { court_ongoing_1010_insulter_trigger = yes } + add_to_list = insulter_list + } + } + every_relation = { type = rival + limit = { court_ongoing_1010_insulter_trigger = yes } + add_to_list = insulter_list + } + + random_in_list = { + list = insulter_list + weight = { + base = 1 + modifier = { + is_ruler = yes + add = 10 + } + ai_value_modifier = { + ai_compassion = { #20 for high negative compassion, -20 for high positive compassion + value = high_negative_ai_value_inverse + multiply = 20 + } + } + opinion_modifier = { + opinion_target = scope:target + multiplier = -0.3 + } + } + save_scope_as = insulter + } + } + } + + + #Duel them! + option = { + name = court_ongoing.1010.a + + reverse_add_opinion = { + target = scope:insulter + modifier = angry_opinion + opinion = -20 + } + + duel = { + skill = prowess + target = scope:insulter + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.1 + } + desc = court_ongoing.1010.a.success + show_as_tooltip = { court_ongoing_1010_good_duel_outcome_effect = yes } + trigger_event = { + days = 1 + id = court_ongoing.1011 + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.1 + } + desc = court_ongoing.1010.a.failure + send_interface_toast = { + title = court_ongoing.1010.a.failure + left_icon = scope:insulter + right_icon = scope:target + + add_prestige = medium_prestige_loss + increase_wounds_no_death_effect = { REASON = duel } + reverse_add_opinion = { + target = scope:target + modifier = pity_opinion + opinion = 15 + } + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + lazy = minor_stress_impact_gain + calm = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + + ai_boldness_target_modifier = { VALUE = 40 } + ai_energy_target_modifier = { VALUE = 20 } + ai_vengefulness_target_modifier = { VALUE = 20 } + } + } + + #Convince them to apologize + option = { + name = court_ongoing.1010.b + + duel = { + skill = diplomacy + target = scope:insulter + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.1 + } + desc = court_ongoing.1010.b.success + send_interface_toast = { + title = court_ongoing.1010.b.success + left_icon = scope:insulter + right_icon = scope:target + + reverse_add_opinion = { + target = scope:target + modifier = grateful_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:insulter + modifier = respect_opinion + opinion = 15 + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.1 + } + desc = court_ongoing.1010.b.failure + send_interface_toast = { + title = court_ongoing.1010.b.failure + left_icon = scope:insulter + right_icon = scope:target + + reverse_add_opinion = { + target = scope:insulter + modifier = refusal_opinion + opinion = -15 + } + } + } + } + + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_compassion_target_modifier = { VALUE = 30 } + ai_vengefulness_target_modifier = { VALUE = -30 } + ai_boldness_target_modifier = { VALUE = -30 } + } + } + + #Say a kind word + option = { + name = court_ongoing.1010.c + + reverse_add_opinion = { + target = scope:target + modifier = kindness_opinion + opinion = 15 + } + + stress_impact = { + wrathful = medium_stress_impact_gain + vengeful = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + } + + ai_chance = { + base = 50 + + ai_compassion_target_modifier = { VALUE = 50 } + ai_vengefulness_target_modifier = { VALUE = -30 } + ai_boldness_target_modifier = { VALUE = -50 } + } + } +} + +#You won the duel! Go you! +court_ongoing.1011 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1010.t + desc = court_ongoing.1011.desc + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = personality_honorable + } + right_portrait = { + character = scope:target + animation = flirtation_left + } + lower_right_portrait = scope:insulter + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + option = { + name = court_ongoing.1011.a + court_ongoing_1010_good_duel_outcome_effect = yes + } +} + + + +###FETCH GIFT### +scripted_trigger court_ongoing_1020_necklace_owner_trigger = { + sex_same_as = scope:target + basic_is_available_ai = yes + NOR = { + is_spouse_of = scope:target + this = scope:target + this = scope:owner + } +} + +scripted_effect court_ongoing_1020_save_necklace_owner_effect = { + scope:target = { + if = { + limit = { exists = liege } + liege = { + every_spouse = { + limit = { court_ongoing_1020_necklace_owner_trigger = yes } + add_to_temporary_list = necklace_owner_list + } + every_powerful_vassal = { + if = { + limit = { court_ongoing_1020_necklace_owner_trigger = yes } + add_to_temporary_list = necklace_owner_list + } + every_spouse = { + limit = { court_ongoing_1020_necklace_owner_trigger = yes } + add_to_temporary_list = necklace_owner_list + } + } + } + random_in_list = { + list = necklace_owner_list + save_scope_as = necklace_owner + } + } + } +} + +scripted_trigger court_ongoing_1020_necklace_option_trigger = { + exists = scope:target.liege + scope:target.liege = { + OR = { + any_spouse = { + court_ongoing_1020_necklace_owner_trigger = yes + } + any_powerful_vassal = { + OR = { + court_ongoing_1020_necklace_owner_trigger = yes + any_spouse = { court_ongoing_1020_necklace_owner_trigger = yes } + } + } + } + } +} + +court_ongoing.1020 = { + hidden = yes + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:scheme.var:court_milestone_event >= 3 + add = -0.75 + } + } + + immediate = { + #Lets a player target chose gift or randomizes one for ai targets + if = { + limit = { scope:target = { is_ai = no } } + scope:target = { trigger_event = court_ongoing.1021 } + } + else = { + random_list = { + #Wolf pelt + 2 = { + trigger = { + scope:target = { NOT = { has_character_flag = court_ongoing_wolf_pelt_flag } } + #Target will not request a pregnant woman to go hunting unless they allow women to be combatants + OR = { + NOT = { has_trait = pregnant } + AND = { + has_trait = pregnant + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:target } + } + } + } + trigger_event = court_ongoing.1022 + scope:target = { add_character_flag = court_ongoing_wolf_pelt_flag } + } + #Cat or dog or eagle + 1 = { + trigger = { + scope:target = { + NOR = { + has_character_modifier = cat_story_modifier + has_character_modifier = dog_story_modifier + AND = { + has_character_modifier = eagle_story_modifier + location = { geographical_region = world_steppe } + } + } + } + } + trigger_event = court_ongoing.1030 + } + #Necklace + 3 = { #Higher to compensate for trigger + trigger = { + court_ongoing_1020_necklace_option_trigger = yes + scope:target = { NOT = { has_character_flag = court_ongoing_necklace_flag } } + } + trigger_event = court_ongoing.1040 + scope:target = { add_character_flag = court_ongoing_necklace_flag } + } + #Orchid + 2 = { + trigger = { scope:target = { NOT = { has_character_flag = court_ongoing_orchid_flag } } } + trigger_event = court_ongoing.1050 + scope:target = { add_character_flag = court_ongoing_orchid_flag } + } + } + } + } +} + + + +#Player target picks gift +scripted_effect court_ongoing_1021_save_gift_option_effect = { + random_list = { + 10 = { #Wolf pelt + trigger = { + NOR = { + has_character_flag = court_ongoing_wolf_pelt_flag + exists = scope:court_ongoing_1021_wolf_pelt_option + } + #Cannot request a pregnant woman to go hunting unless the target's faith allow women to be combatants + OR = { + scope:owner = { NOT = { has_trait = pregnant } } + + scope:owner = { + AND = { + has_trait = pregnant + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = scope:target } + } + } + } + } + save_scope_value_as = { + name = court_ongoing_1021_wolf_pelt_option + value = yes + } + } + 2 = { #Cat/dog/eagle + trigger = { + NOR = { + any_owned_story = { + type = story_cycle_pet_cat + } + any_owned_story = { + type = story_cycle_pet_dog + } + AND = { + any_owned_story = { + story_type = story_cycle_pet_eagle + } + location = { geographical_region = world_steppe } + } + exists = scope:court_ongoing_1021_cat_dog_option + } + } + save_scope_value_as = { + name = court_ongoing_1021_cat_dog_option + value = yes + } + } + 10 = { #Necklace + trigger = { + NOR = { + has_character_flag = court_ongoing_necklace_flag + exists = scope:court_ongoing_1021_necklace_gift_option + } + court_ongoing_1020_necklace_option_trigger = yes + } + save_scope_value_as = { + name = court_ongoing_1021_necklace_gift_option + value = yes + } + court_ongoing_1020_save_necklace_owner_effect = yes + } + 10 = { #Orchid + trigger = { + NOR = { + has_character_flag = court_ongoing_orchid_flag + exists = scope:court_ongoing_1021_orchid_option + } + } + save_scope_value_as = { + name = court_ongoing_1021_orchid_option + value = yes + } + } + } +} + +court_ongoing.1021 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1021.desc + theme = romance_scheme + left_portrait = { + character = scope:target + animation = flirtation_left + } + right_portrait = { + character = scope:owner + animation = beg + } + cooldown = { years = 1 } + + immediate = { + #What gift can you ask for (set 3 options) + court_ongoing_1021_save_gift_option_effect = yes + court_ongoing_1021_save_gift_option_effect = yes + court_ongoing_1021_save_gift_option_effect = yes + } + + #Wolf pelt + option = { + name = court_ongoing.1021.a + trigger = { exists = scope:court_ongoing_1021_wolf_pelt_option } + + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = court_ongoing.1021.wolf_pelt.success + court_ongoing_fetch_gift_modifier_effect = { GIFT = wolf_pelt } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.wolf_pelt.failure + } + } + } + + hidden_effect = { + scope:owner = { trigger_event = court_ongoing.1022 } + } + } + + #Cat/dog/eagle + option = { + trigger = { exists = scope:court_ongoing_1021_cat_dog_option } + name = court_ongoing.1021.b + + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = court_ongoing.1021.cat_pet.success + show_as_tooltip = { court_ongoing_1030_cat_modifier_effect = yes } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.dog_pet.success + show_as_tooltip = { court_ongoing_1030_dog_modifier_effect = yes } + } + 1 = { + show_chance = no + trigger = { + location = { geographical_region = world_steppe } + } + desc = court_ongoing.1021.eagle_pet.success + show_as_tooltip = { court_ongoing_1030_eagle_modifier_effect = yes } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.pet.failure + } + } + } + + hidden_effect = { + scope:owner = { trigger_event = court_ongoing.1030 } + } + } + + #Necklace + option = { + trigger = { exists = scope:court_ongoing_1021_necklace_gift_option } + name = court_ongoing.1021.c + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = court_ongoing.1021.necklace.success + + court_ongoing_fetch_gift_modifier_effect = { GIFT = necklace } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.necklace.failure + } + } + } + hidden_effect = { + scope:owner = { trigger_event = court_ongoing.1040 } + } + } + + #Orchid + option = { + trigger = { exists = scope:court_ongoing_1021_orchid_option } + name = court_ongoing.1021.d + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = court_ongoing.1021.orchid.success + + court_ongoing_fetch_gift_modifier_effect = { GIFT = orchid } + } + 1 = { + show_chance = no + desc = court_ongoing.1021.orchid.failure + } + } + } + hidden_effect = { + scope:owner = { trigger_event = court_ongoing.1050 } + } + } + + #Stop pestering me! + option = { + name = court_ongoing.1021.x + + show_as_tooltip = { scope:scheme = { end_scheme = yes } } + scope:owner = { trigger_event = court_ongoing.0001 } + } +} + +###GIFT: WOLF PELT### +court_ongoing.1022 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1022.t + desc = { + desc = court_ongoing.1022.start.desc + desc = court_ongoing.1022.end.desc + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = personality_callous + } + lower_left_portrait = { + trigger = { + exists = scope:master_of_hunt + } + character = scope:master_of_hunt + } + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + } + + immediate = { + #Save Master of the Hunt + if = { + limit = { + employs_court_position = master_of_hunt_court_position + any_court_position_holder = { + type = master_of_hunt_court_position + is_physically_able = yes + } + } + random_court_position_holder = { + type = master_of_hunt_court_position + limit = { is_physically_able = yes } + save_scope_as = master_of_hunt + } + } + + } + + #Hunt down a wolf + option = { + name = court_ongoing.1022.a + + duel = { + skill = prowess + value = medium_skill_rating + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.1 + } + modifier = { + has_trait = lifestyle_hunter + add = 2 + } + desc = court_ongoing.1022.a.success + send_interface_toast = { + title = court_ongoing.1022.a.success + left_icon = scope:target + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = success } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -0.1 + } + desc = court_ongoing.1022.a.failure + send_interface_toast = { + title = court_ongoing.1022.a.failure + left_icon = scope:target + + add_prestige = minor_prestige_loss + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = failure } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_honor_target_modifier = { VALUE = 40 } + ai_boldness_target_modifier = { VALUE = 40 } + ai_energy_target_modifier = { VALUE = 20 } + ai_vengefulness_target_modifier = { VALUE = 20 } + } + } + + #Kill a dog in the kennels + option = { + trigger = { + OR = { + intrigue >= decent_skill_rating + has_trait = deceitful + } + } + skill = intrigue + trait = deceitful + name = court_ongoing.1022.b + + duel = { + skill = intrigue + target = scope:target + 30 = { #You trick them + compare_modifier = { + value = scope:duel_value + multiplier = 0.1 + } + desc = court_ongoing.1022.b.success + send_interface_toast = { + title = court_ongoing.1022.b.success + left_icon = scope:target + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = success } + } + 20 = { #They know what you did + compare_modifier = { + value = scope:duel_value + multiplier = -0.1 + } + desc = court_ongoing.1022.b.failure + + show_as_tooltip = { + reverse_add_opinion = { + modifier = suspicion_opinion + target = scope:target + opinion = -10 + } + } + + hidden_effect = { + random_list = { + 85 = { + send_interface_toast = { + title = court_ongoing.1022.b.failure + left_icon = scope:target + + reverse_add_opinion = { + modifier = suspicion_opinion + target = scope:target + opinion = -10 + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = failure } + } + 15 = { + modifier = { + scope:target = { ai_compassion >= 0 } + add = { + value = scope:target.ai_compassion + multiply = 2 + } + } + scope:target = { + trigger_event = { + id = court_ongoing.1023 + days = 3 + } + } + } + } + } + + } + } + + stress_impact = { + honest = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_honor_target_modifier = { VALUE = -100 } + ai_energy_target_modifier = { VALUE = -20 } + ai_compassion_target_modifier = { VALUE = -50 } + } + } + + + #Buy a pelt + option = { + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + NOT = { exists = scope:master_of_hunt } + } + name = court_ongoing.1022.c + + remove_short_term_gold = minor_gold_value + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + + stress_impact = { + honest = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = success } + + ai_chance = { + base = 100 + + ai_greed_target_modifier = { VALUE = -80 } + ai_energy_target_modifier = { VALUE = -20 } + ai_honor_target_modifier = { VALUE = -20 } + } + } + + #Buy a pelt; Master of the Hunt version + option = { + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + exists = scope:master_of_hunt + } + name = court_ongoing.1022.c.master_of_hunt + + scope:master_of_hunt = { + duel = { + skill = martial + value = average_skill_rating + 30 = { + desc = court_ongoing.1022.c.master_of_hunt.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + root = { + send_interface_toast = { + title = court_ongoing.1022.c.master_of_hunt.success + left_icon = scope:target + right_icon = scope:master_of_hunt + + custom_tooltip = court_ongoing.1022.c.master_of_hunt.success.tt + } + } + } + 20 = { + desc = court_ongoing.1022.c.master_of_hunt.failure + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + root = { + send_interface_toast = { + title = court_ongoing.1022.c.master_of_hunt.failure + left_icon = scope:target + right_icon = scope:master_of_hunt + + remove_short_term_gold = minor_gold_value + } + } + } + } + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + + stress_impact = { + honest = minor_stress_impact_gain + greedy = minor_stress_impact_gain + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = success } + + ai_chance = { + base = 100 + + ai_greed_target_modifier = { VALUE = -80 } + ai_energy_target_modifier = { VALUE = -20 } + ai_honor_target_modifier = { VALUE = -20 } + } + } + + #Asking too much + option = { + name = court_ongoing.1022.d + + stress_impact = { + brave = minor_stress_impact_gain + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = wolf_pelt OUTCOME = failure } + + ai_chance = { + base = 50 + } + } +} + +#Owner killed target's favorite dog (target perspective) +court_ongoing.1023 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1023.desc + + theme = romance_scheme + override_background = { reference = ep2_dog_kennels } + left_portrait = { + character = scope:target + animation = shock + } + right_portrait = { + character = scope:owner + animation = happiness + } + + immediate = { + random_dummy_gender_effect = yes + scope:dummy_gender = { save_scope_as = dog_gender } + random_dummy_gender_soldier_effect = { SCOPE_NAME = dummy_gender } + } + + #Forgive + option = { + name = court_ongoing.1023.a + } + + #End scheme + option = { + trigger = { is_ai = no } + name = court_ongoing.1023.b + + show_as_tooltip = { + scope:scheme = { end_scheme = yes } + } + save_temporary_scope_as = scheme_ended + } + + after = { + scope:owner = { trigger_event = court_ongoing.1024 } + } +} + +#Owner killed target's favorite dog (owner perspective) +court_ongoing.1024 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1022.t + desc = court_ongoing.1024.desc + + theme = romance_scheme + left_portrait = { + character = scope:target + animation = grief + } + right_portrait = { + character = scope:owner + animation = shame + } + + + #Forgive + option = { + name = court_ongoing.1024.a + + if = { + limit = { exists = scope:scheme_ended } + scope:scheme = { end_scheme = yes } + } + + reverse_add_opinion = { + modifier = angry_opinion + target = scope:target + opinion = -25 + } + } +} + +###GIFT: PET### +scripted_trigger court_ongoing_1030_cat_lover = { + OR = { + ai_compassion >= high_positive_ai_value + ai_rationality >= high_positive_ai_value + ai_zeal <= high_negative_ai_value + has_trait = intellect_good + has_trait = shrewd + has_trait_introverted_trigger = yes + has_trait_submissive_trigger = yes + } +} + +scripted_trigger court_ongoing_1030_dog_lover = { + OR = { + ai_compassion >= high_positive_ai_value + ai_energy >= high_positive_ai_value + ai_boldness >= high_positive_ai_value + ai_honor >= high_positive_ai_value + has_trait = intellect_bad + has_trait = dull + has_trait_extroverted_trigger = yes + has_trait_dominant_trigger = yes + } +} + + +court_ongoing.1030 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1030.t + desc = { + desc = court_ongoing.1030.desc + triggered_desc = { + trigger = { + location = { + geographical_region = world_steppe + } + } + desc = court_ongoing.1030.desc.eagle + } + } + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = personality_callous + } + cooldown = { years = 1 } + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + } + + immediate = { + scope:target.location = { save_scope_as = location } + } + + #Cat + option = { + name = court_ongoing.1030.a + + show_as_tooltip = { + random_list = { + 1 = { + desc = court_ongoing.1030.a.success + show_chance = no + + show_as_tooltip = { + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + scope:target = { + court_ongoing_1030_cat_modifier_effect = yes + } + } + } + 1 = { + desc = court_ongoing.1030.a.failure + show_chance = no + show_as_tooltip = { + court_ongoing_1030_failure_effect = yes + } + } + } + } + + hidden_effect = { + scope:target = { + trigger_event = { + id = court_ongoing.1032 + days = 2 + } + } + } + + ai_chance = { + base = 100 + modifier = { + scope:target = { court_ongoing_1030_cat_lover = yes } + add = 50 + } + } + } + + #Dog + option = { + name = court_ongoing.1030.b + + show_as_tooltip = { + random_list = { + 1 = { + desc = court_ongoing.1030.b.success + show_chance = no + + show_as_tooltip = { + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + scope:target = { + court_ongoing_1030_dog_modifier_effect = yes + } + } + } + 1 = { + desc = court_ongoing.1030.b.failure + show_chance = no + show_as_tooltip = { + court_ongoing_1030_failure_effect = yes + } + } + } + } + + hidden_effect = { + scope:target = { + trigger_event = { + id = court_ongoing.1031 + days = 2 + } + } + } + + ai_chance = { + base = 100 + modifier = { + scope:target = { court_ongoing_1030_dog_lover = yes } + add = 50 + } + } + } + + #Eagle + option = { + name = court_ongoing.1030.d + trigger = { + location = { + geographical_region = world_steppe + } + } + show_as_tooltip = { + random_list = { + 1 = { + desc = court_ongoing.1030.d.success + show_chance = no + + show_as_tooltip = { + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + scope:target = { + court_ongoing_1030_eagle_modifier_effect = yes + } + } + } + 1 = { + desc = court_ongoing.1030.d.failure + show_chance = no + show_as_tooltip = { + court_ongoing_1030_failure_effect = yes + } + } + } + } + + hidden_effect = { + scope:target = { + trigger_event = { + id = court_ongoing.1033 + days = 2 + } + } + } + + ai_chance = { + base = 100 + } + } + + #Me! + option = { + name = court_ongoing.1030.c + + reverse_add_opinion = { + target = scope:target + modifier = pleased_opinion + opinion = 10 + } + + hidden_effect = { + scope:target = { + send_interface_toast = { + title = court_ongoing.1021.pet.failure + left_icon = scope:owner + } + } + } + + ai_chance = { + base = 0 + } + } +} + +#Target gets offered a dog +court_ongoing.1031 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1031.start.desc + + theme = romance_scheme + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = happiness + } + + #yes dog! + option = { + name = court_ongoing.1031.a + + court_ongoing_1030_dog_modifier_effect = yes + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.b.success + left_icon = scope:target + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + show_as_tooltip = { scope:target = { court_ongoing_1030_dog_modifier_effect = yes } } + } + } + } + + ai_chance = { + base = 50 + + ai_compassion_target_modifier = { VALUE = 50 } + ai_energy_target_modifier = { VALUE = 50 } + ai_boldness_target_modifier = { VALUE = 50 } + ai_honor_target_modifier = { VALUE = 20 } + + } + } + + #Yeah, that's gonna be a no for me, dawg + option = { + name = court_ongoing.1031.b + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.b.failure + left_icon = scope:target + court_ongoing_1030_failure_effect = yes + } + } + } + + ai_chance = { + base = 50 + + modifier = { + court_ongoing_1030_dog_lover = yes + add = -1000 + } + } + } +} + +#Target gets offered a cat +court_ongoing.1032 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1032.desc + + theme = romance_scheme + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = happiness + } + + immediate = { + assign_cat_eye_color_effect = { COLOR = random } + } + + #yes cat! + option = { + name = court_ongoing.1031.a + + court_ongoing_1030_cat_modifier_effect = yes + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.a.success + left_icon = scope:target + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + show_as_tooltip = { scope:target = { court_ongoing_1030_cat_modifier_effect = yes } } + } + } + } + + ai_chance = { + base = 50 + + ai_compassion_target_modifier = { VALUE = 50 } + ai_zeal_target_modifier = { VALUE = -50 } + ai_rationality_target_modifier = { VALUE = 50 } + ai_honor_target_modifier = { VALUE = -20 } + + } + } + + #no cat, because I'm an awful human being + option = { + name = court_ongoing.1031.b + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.a.failure + left_icon = scope:target + court_ongoing_1030_failure_effect = yes + } + } + } + + ai_chance = { + base = 50 + + modifier = { + court_ongoing_1030_cat_lover = yes + add = -1000 + } + } + } + after = { + remove_variable = cat_eye_color + } +} + + +#Target gets offered an eagle +court_ongoing.1033 = { #by Ariana Tranumn + type = character_event + title = court_ongoing.1021.t + desc = court_ongoing.1033.desc + + theme = romance_scheme + + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = happiness + } + + option = { + name = court_ongoing.1031.a + + court_ongoing_1030_eagle_modifier_effect = yes + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.d.success + left_icon = scope:target + scope:scheme = { add_scheme_modifier = { type = courting_gift_modifier } } + show_as_tooltip = { scope:target = { court_ongoing_1030_eagle_modifier_effect = yes } } + } + } + } + + ai_chance = { + base = 50 + + ai_compassion_target_modifier = { VALUE = 50 } + ai_zeal_target_modifier = { VALUE = -50 } + ai_rationality_target_modifier = { VALUE = 50 } + ai_honor_target_modifier = { VALUE = -20 } + modifier = { + has_trait = lifestyle_hunter + add = 50 + } + } + } + + option = { + name = court_ongoing.1031.b + + hidden_effect = { + scope:owner = { + send_interface_toast = { + title = court_ongoing.1030.d.failure + left_icon = scope:target + court_ongoing_1030_failure_effect = yes + } + } + } + + ai_chance = { + base = 50 + } + } +} + +###GIFT:NECKLACE## +court_ongoing.1040 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1040.t + desc = { + desc = court_ongoing.1022.start.desc + desc = court_ongoing.1040.end.desc + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = personality_callous + } + lower_right_portrait = scope:necklace_owner + cooldown = { years = 1 } + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + } + + immediate = { + if = { + limit = { NOT = { exists = scope:necklace_owner } } + court_ongoing_1020_save_necklace_owner_effect = yes + } + } + + #Buy + option = { + name = court_ongoing.1040.a + trigger = { + OR = { + is_ai = no + short_term_gold >= minor_gold_value + } + } + + remove_short_term_gold = minor_gold_value + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = success } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = -90 } + } + } + + #Offer favor + option = { + trigger = { + NOT = { scope:necklace_owner = { has_hook = root } } + } + name = court_ongoing.1040.b + + scope:necklace_owner = { + add_hook = { + target = root + type = favor_hook + } + } + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = success } + + stress_impact = { + paranoid = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 70 + ai_honor_target_modifier = { VALUE = 40 } + } + } + + #Steal + option = { + name = court_ongoing.1040.c + + duel = { + target = scope:necklace_owner + skill = intrigue + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -40 + } + desc = court_ongoing.1040.c.success + send_interface_toast = { + title = court_ongoing.1040.c.success + left_icon = scope:target + right_icon = scope:necklace_owner + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = success } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -4 + min = -40 + } + desc = court_ongoing.1040.c.failure + send_interface_toast = { + title = court_ongoing.1040.c.failure + left_icon = scope:target + right_icon = scope:necklace_owner + reverse_add_opinion = { + target = scope:necklace_owner + modifier = angry_opinion + opinion = -20 + } + if = { + limit = { + exists = scope:necklace_owner.primary_spouse + this != scope:necklace_owner.primary_spouse + scope:necklace_owner.primary_spouse = { is_ruler = yes } + } + reverse_add_opinion = { + target = scope:necklace_owner.primary_spouse + modifier = angry_opinion + opinion = -20 + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = failure } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + honest = medium_stress_impact_gain + generous = minor_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_honor_target_modifier = { VALUE = -80 } + ai_compassion_target_modifier = { VALUE = -80 } + } + } + + #Never mind... + option = { + name = court_ongoing.1040.d + + reverse_add_opinion = { + target = scope:target + modifier = pleased_opinion + opinion = 5 + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = necklace OUTCOME = failure } + ai_chance = { + base = 50 + } + } +} + + +### GIFT: FLOWER ### +court_ongoing.1050 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1050.t + desc = { + desc = court_ongoing.1050.start.desc + first_valid = { + triggered_desc = { + trigger = { + scope:target_host.faith = { + OR = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:buddhism_religion + religion = religion:hinduism_religion + religion = religion:jainism_religion + } + } + } + desc = court_ongoing.1050.monastery.desc + } + desc = court_ongoing.1050.temple.desc + } + } + theme = romance_scheme + override_background = { + reference = garden + } + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = flirtation + } + lower_right_portrait = scope:helpful_friend + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + cooldown = { years = 1 } + + trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_gift_modifier + } + } + exists = scope:target.location + } + + + immediate = { + # Location & host + scope:target.location = { save_scope_as = target_location } + if = { + limit = { exists = scope:target.host } + scope:target.host = { save_scope_as = target_host } + } + else = { + scope:target.location.province_owner = { save_scope_as = target_host } + } + + # Where is the bloom from? + if = { + limit = { root = { is_ai = no } } #Only needed for text and a bit costly so only players + random_independent_ruler = { + limit = { + highest_held_title_tier >= tier_kingdom + NOT = { in_diplomatic_range = scope:target } + } + alternative_limit = { + highest_held_title_tier >= tier_kingdom + } + primary_title = { save_scope_as = orchid_origin } + } + } + + # Where does it grow? + scope:target_host = { + random_sub_realm_barony = { + limit = { + title_province = { + faith = scope:target_host.faith + has_holding_type = church_holding + } + } + alternative_limit = { + title_province = { faith = scope:target_host.faith } + } + title_province = { save_scope_as = orchid_location } + } + } + + # Do you have a better friend? + random_relation = { + type = friend + limit = { + has_trait = lifestyle_herbalist + basic_is_available_ai = yes + this != scope:target + } + alternative_limit = { + basic_is_available_ai = yes + prowess > root.prowess + this != scope:target + } + save_scope_as = helpful_friend + } + } + + # Buy + option = { + name = court_ongoing.1050.a + + remove_short_term_gold = minor_gold_value + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_greed_target_modifier = { VALUE = -90 } + modifier = { + is_ai = yes + short_term_gold <= minor_gold_value + add = -200 + } + } + } + + # Adventure + option = { + name = court_ongoing.1050.b + + stress_impact = { + craven = major_stress_impact_gain + lazy = medium_stress_impact_gain + } + + duel = { + skill = prowess + value = average_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -55 + } + desc = court_ongoing.1050.b.success + send_interface_toast = { + title = court_ongoing.1050.b.success + left_icon = scope:target + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + add_prestige = medium_prestige_gain + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -25 + } + desc = court_ongoing.1050.b.soft_failure + send_interface_toast = { + title = court_ongoing.1050.b.soft_failure + left_icon = scope:target + add_stress = minor_stress_gain + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -9 + } + desc = court_ongoing.1050.b.hard_failure + send_interface_toast = { + title = court_ongoing.1050.b.hard_failure + left_icon = scope:target + increase_wounds_effect = { REASON = fall } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + } + } + } + } + + # Friend adventure + option = { + trigger = { + exists = scope:helpful_friend + scope:helpful_friend = { NOT = { has_trait = lifestyle_herbalist } } + } + name = court_ongoing.1050.b.friend + custom_tooltip = court_ongoing.1050.b.friend.f + add_internal_flag = special + + scope:helpful_friend = { + duel = { + skill = prowess + value = average_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 4 + min = -50 + } + desc = court_ongoing.1050.b.friend.success + root = { + send_interface_toast = { + title = court_ongoing.1050.b.friend.success + left_icon = scope:helpful_friend + right_icon = scope:target + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + } + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2 + min = -20 + } + desc = court_ongoing.1050.b.friend.soft_failure + root = { + send_interface_toast = { + title = court_ongoing.1050.b.friend.soft_failure + left_icon = scope:helpful_friend + right_icon = scope:target + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + } + } + } + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -1 + } + desc = court_ongoing.1050.b.friend.hard_failure + root = { + send_interface_toast = { + title = court_ongoing.1050.b.friend.hard_failure + left_icon = scope:helpful_friend + right_icon = scope:target + scope:helpful_friend = { increase_wounds_effect = { REASON = fall } } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + } + } + } + } + } + + ai_chance = { + base = 100 + } + } + + # Grow it yourself + option = { + name = court_ongoing.1050.c + trigger = { + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + } + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + } + + # Friend can grow it + option = { + name = court_ongoing.1050.b.friend + trigger = { + exists = scope:helpful_friend + scope:helpful_friend = { + OR = { + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + } + } + } + custom_tooltip = court_ongoing.1050.c.friend.f + + scope:scheme = { + add_scheme_modifier = { + type = courting_gift_modifier + } + } + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = success } + } + + + # No thanks (coward) + option = { + name = court_ongoing.1050.d + trigger = { + has_trait = craven + diplomacy < decent_skill_rating + } + trait = craven + + reverse_add_opinion = { + target = scope:target + modifier = weak_opinion + opinion = -5 + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + + ai_chance = { + base = 100 + } + } + + # No thanks (compliment) + option = { + name = court_ongoing.1050.e + trigger = { diplomacy >= decent_skill_rating } + skill = diplomacy + + reverse_add_opinion = { + target = scope:target + modifier = pleased_opinion + opinion = 10 + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + + ai_chance = { + base = 100 + } + } + + # No thanks (regular) + option = { + name = court_ongoing.1050.f + trigger = { + NOR = { + has_trait = craven + diplomacy >= decent_skill_rating + } + } + + court_ongoing_fetch_gift_target_outcome_effect = { GIFT = orchid OUTCOME = failure } + + ai_chance = { + base = 50 + } + } +} + + +### COMPLIMENT POEM ### + +#What compliment should I use... +court_ongoing.1100 = { + type = character_event + title = court_ongoing.1100.t + desc = court_ongoing.1100.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = writing + } + right_portrait = { + character = scope:target + animation = flirtation + } + cooldown = { years = 1 } + + trigger = { + scope:target = { + can_receieve_good_available_compliment_trigger = yes + } + NOT = { + scope:scheme = { + has_scheme_modifier = courting_charm_modifier + } + } + } + + weight_multiplier = { + base = 1 + modifier = { + scope:scheme.var:court_milestone_event >= 3 + add = -0.75 + } + } + + immediate = { + hidden_effect = { + #Randomize 3 compliment types + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target } + randomize_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target } + randomize_good_available_compliment_effect = { COMPLIMENT_RECEIVER = scope:target } + } + } + + #Compassionate + option = { + trigger = { has_character_flag = available_compliment_compassionate } + name = court_ongoing.1100.compassionate + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = compassionate COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #bold + option = { + trigger = { has_character_flag = available_compliment_bold } + name = court_ongoing.1100.bold + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = bold COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #honorable + option = { + trigger = { has_character_flag = available_compliment_honorable } + name = court_ongoing.1100.honorable + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = honorable COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #greed + option = { + trigger = { has_character_flag = available_compliment_greedy } + name = court_ongoing.1100.greed + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = greed COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #rational + option = { + trigger = { has_character_flag = available_compliment_rational } + name = court_ongoing.1100.rational + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = rational COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #zealous + option = { + trigger = { has_character_flag = available_compliment_zealous } + name = court_ongoing.1100.zealous + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = zealous COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #energetic + option = { + trigger = { has_character_flag = available_compliment_energetic } + name = court_ongoing.1100.energetic + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = energetic COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #forgiving + option = { + trigger = { has_character_flag = available_compliment_forgiving } + name = court_ongoing.1100.forgiving + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = forgiving COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #beautiful + option = { + trigger = { has_character_flag = available_compliment_beautiful } + name = court_ongoing.1100.beautiful + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = beautiful COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #strong + option = { + trigger = { has_character_flag = available_compliment_strong } + name = court_ongoing.1100.strong + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = strong COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #extroverted + option = { + trigger = { has_character_flag = available_compliment_extroverted } + name = court_ongoing.1100.extroverted + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = extroverted COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #dominant + option = { + trigger = { has_character_flag = available_compliment_dominant } + name = court_ongoing.1100.dominant + flavor = court_ongoing.1100.compliment.tt #Explanation of what outcome is based on + + hidden_effect = { + scope:target = { evaluate_compliment_effect = { COMPLIMENT_TYPE = dominant COMPLIMENT_GIVER = root } } + } + court_ongoing_1100_outcome_effect = yes #Mus be in every options but fallback for tooltip reasons + } + + #No thanks + option = { + name = court_ongoing.1100.fallback + } + + after = { + clear_available_compliments_effect = yes + compliment_to_love_letter_effect = yes + } +} + +#Target responds to poem +court_ongoing.1101 = { #by Mathilda Bjarnehed + type = letter_event + opening = court_ongoing.1101.t + desc = court_ongoing.1101.desc + sender = scope:owner + + trigger = { + exists = scope:scheme + } + + #I like + option = { + name = { + trigger = { scope:compliment_outcome = flag:good } + text = court_ongoing.1101.a.good + } + name = { + trigger = { NOT = { scope:compliment_outcome = flag:good } } + text = court_ongoing.1101.a.bad + } + + set_variable = { + name = love_letter_quality + value = 4 + days = 150 + } + + scope:owner = { + add_opinion = { + target = scope:target + modifier = romance_opinion + opinion = 15 + } + trigger_event = court_ongoing.1102 + } + + ai_chance = { + base = 0 + modifier = { + scope:compliment_outcome = flag:good + add = 100 + } + } + } + + #Neutral (ai only) + option = { + trigger = { is_ai = yes } + + scope:owner = { + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1100.neutral.tt + } + } + + ai_chance = { + base = 0 + modifier = { + scope:compliment_outcome = flag:neutral + add = 100 + } + } + } + + #I dislike + option = { + name = { + trigger = { scope:compliment_outcome = flag:good } + text = court_ongoing.1101.c.good + } + name = { + trigger = { NOT = { scope:compliment_outcome = flag:good } } + text = court_ongoing.1101.c.bad + } + + set_variable = { + name = love_letter_quality + value = 1 + days = 150 + } + + scope:owner = { + add_opinion = { + target = scope:target + modifier = disappointed_opinion + opinion = -10 + } + trigger_event = court_ongoing.1103 + } + + ai_chance = { + base = 0 + modifier = { + scope:compliment_outcome = flag:bad + add = 100 + } + } + } + + after = { + scope:owner = { + compliment_to_love_letter_cleanup_effect = yes + } + } +} + +#I get a response, target liked the poem! +court_ongoing.1102 = { #by Mathilda Bjarnehed + type = letter_event + opening = court_ongoing.1102.t + desc = court_ongoing.1102.desc + sender = scope:target + + trigger = { + exists = scope:scheme + } + + option = { + name = court_ongoing.1102.a + scope:scheme = { + add_scheme_modifier = { + type = courting_charm_modifier + } + } + } + + after = { + scope:target = { + compliment_to_love_letter_cleanup_effect = yes + } + } +} + + +#I get a response, disliked the poem... :( +court_ongoing.1103 = { #by Mathilda Bjarnehed + type = letter_event + opening = court_ongoing.1103.t + desc = court_ongoing.1102.desc + sender = scope:target + + trigger = { + exists = scope:scheme + } + + option = { + name = court_ongoing.1103.a + reverse_add_opinion = { + target = scope:target + modifier = insult_opinion + opinion = -10 + } + } + + after = { + scope:target = { + compliment_to_love_letter_cleanup_effect = yes + } + } +} + + + +################################### +# Dealing with competition +# by Mathilda Bjarnehed +################################### + +scripted_trigger court_ongoing_1110_can_court_target_trigger = { + is_adult = yes + this != scope:owner + this != scope:target + basic_is_available_ai = yes + save_temporary_scope_as = can_court + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:can_court + CHARACTER_2 = scope:target + } + opinion = { + target = scope:target + value >= 0 + } + reverse_opinion = { + target = scope:target + value >= 0 + } + NOR = { + is_close_or_extended_family_of = scope:target + is_consort_of = scope:target + has_relation_lover = scope:target + } +} + +#Outcome effects +scripted_effect court_ongoing_1110_remove_competitor_effect = { + scope:scheme = { + remove_scheme_modifier = court_competitor_modifier + } + scope:target = { + hidden_effect = { + if = { + limit = { has_relation_potential_lover = scope:competitor } + remove_relation_potential_lover = scope:competitor + } + } + } +} + +scripted_effect court_ongoing_1110_duel_success_effect = { + court_ongoing_1110_remove_competitor_effect = yes + add_prestige = medium_prestige_gain +} + +scripted_effect court_ongoing_1110_duel_failure_effect = { + add_prestige = minor_prestige_loss + custom_tooltip = court_ongoing_1110.competitor_remains.tt +} + +scripted_effect court_ongoing_1110_poison_success_effect = { + court_ongoing_1110_remove_competitor_effect = yes + add_intrigue_lifestyle_perk_points = 1 + scope:competitor = { + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } +} + +scripted_effect court_ongoing_1110_poison_failure_effect = { + custom_tooltip = court_ongoing_1110.competitor_remains.tt + reverse_add_opinion = { + target = scope:target + modifier = disappointed_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:competitor + modifier = suspicion_opinion + opinion = -20 + } +} + +scripted_effect court_ongoing_1110_poison_murder_effect = { + court_ongoing_1110_remove_competitor_effect = yes + unknown_murder_effect = { + MURDERER = scope:owner + VICTIM = scope:competitor + REASON = death_murder + } +} + +# What to do about competitor? +court_ongoing.1110 = { + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1110.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:competitor + animation = disapproval + } + lower_right_portrait = scope:target + + cooldown = { years = 1 } + + trigger = { + OR = { + any_relation = { + type = rival + court_ongoing_1110_can_court_target_trigger = yes + } + AND = { + exists = scope:target.court_owner #The recipient or their liege if unlanded + scope:target.court_owner = { + OR = { + any_knight = { court_ongoing_1110_can_court_target_trigger = yes } + any_vassal = { court_ongoing_1110_can_court_target_trigger = yes } + } + } + } + scope:target = { + any_relation = { + type = potential_lover + court_ongoing_1110_can_court_target_trigger = yes + } + } + } + } + + immediate = { + #If I have a rival(s), add them to list + if = { + limit = { + any_relation = { + type = rival + court_ongoing_1110_can_court_target_trigger = yes + } + } + every_relation = { + type = rival + limit = { court_ongoing_1110_can_court_target_trigger = yes } + add_to_list = competitors_list + } + } + #Else, add knights/vassals of recipient/host + potential lovers + else = { + if = { + limit = { + exists = scope:target.court_owner #The recipient or their liege if unlanded + } + scope:target.court_owner = { + every_knight = { + limit = { court_ongoing_1110_can_court_target_trigger = yes } + add_to_list = competitors_list + } + every_vassal = { + limit = { court_ongoing_1110_can_court_target_trigger = yes } + add_to_list = competitors_list + } + } + } + scope:target = { + every_relation = { + type = potential_lover + limit = { court_ongoing_1110_can_court_target_trigger = yes } + add_to_list = competitors_list + } + } + } + + #Randomize from list + random_in_list = { + list = competitors_list + weight = { + base = 5 + modifier = { + add = { + value = attraction + divide = medium_positive_attraction + multiply = 20 + } + } + modifier = { + add = { + value = ai_sociability + multiply = 0.2 + } + } + modifier = { + has_trait = lustful + add = 20 + } + modifier = { + OR = { + has_focus_or_focus_trait_trigger = { FOCUS = intrigue_temptation_focus } + has_focus_or_focus_trait_trigger = { FOCUS = martial_chivalry_focus } + } + add = 20 + } + opinion_modifier = { + opinion_target = scope:owner + multiplier = -0.3 + } + opinion_modifier = { + opinion_target = scope:target + multiplier = 0.5 + } + } + save_scope_as = competitor + } + + scope:scheme = { + add_scheme_modifier = { + type = court_competitor_modifier + } + } + hidden_effect = { + if = { + limit = { + scope:target = { might_cheat_on_every_partner_trigger = yes } + scope:competitor = { might_cheat_on_every_partner_trigger = yes } + } + scope:target = { + progress_towards_lover_effect = { + CHARACTER = scope:competitor + REASON = lover_followed_around + OPINION = 0 + } + } + } + } + } + + #Duel + option = { + name = court_ongoing.1110.a + trigger = { + OR = { + AND = { + exists = liege + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = liege } + } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + + duel = { + skill = prowess + target = scope:competitor + 60 = { + desc = court_ongoing.1110.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + modifier = { + add = { + value = ai_boldness + divide = high_positive_ai_value + multiply = 20 + } + } + show_as_tooltip = { court_ongoing_1110_duel_success_effect = yes } + save_scope_value_as = { + name = competitor_outcome + value = flag:duel_success + } + } + 40 = { + desc = court_ongoing.1110.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + modifier = { + add = { + value = scope:competitor.ai_boldness + divide = high_positive_ai_value + multiply = 20 + } + } + show_as_tooltip = { court_ongoing_1110_duel_failure_effect = yes } + save_scope_value_as = { + name = competitor_outcome + value = flag:duel_failure + } + } + } + + stress_impact = { + craven = medium_stress_impact_gain + calm = minor_stress_impact_gain + deceitful = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 2 + ai_energy = 1 + ai_honor = 2 + } + } + } + + + #Poision + option = { + name = court_ongoing.1110.b + + duel = { + skill = intrigue + target = scope:competitor + 60 = { + desc = court_ongoing.1110.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + show_as_tooltip = { court_ongoing_1110_poison_success_effect = yes } + save_scope_value_as = { + name = competitor_outcome + value = flag:poison_success + } + } + 35 = { + desc = court_ongoing.1110.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + modifier = { + scope:competitor = { has_trait = paranoid } + } + show_as_tooltip = { court_ongoing_1110_poison_failure_effect = yes } + save_scope_value_as = { + name = competitor_outcome + value = flag:poison_failure + } + } + 5 = { + desc = court_ongoing.1110.b.murder + trigger = { root = { is_ai = no } } # Only available for players + show_as_tooltip = { court_ongoing_1110_poison_murder_effect = yes } + trigger_event = court_ongoing.1116 + } + } + + stress_impact = { + compassionate = medium_stress_impact_gain + honest = medium_stress_impact_gain + just = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -2 + ai_honor = -2 + } + } + } + + #Pay off + option = { + trigger = { + OR = { + is_ai = no + short_term_gold >= tiny_gold_value + } + } + name = court_ongoing.1110.c + + pay_short_term_gold = { + target = scope:competitor + gold = tiny_gold_value + } + + random_list = { + 90 = { #Success + desc = court_ongoing.1110.c.success + modifier = { + scope:competitor.ai_greed > 0 + add = { + value = scope:competitor.ai_greed + divide = high_positive_ai_value + multiply = 20 + } + } + modifier = { + scope:competitor.ai_honor < 0 + add = { + value = scope:competitor.ai_honor + divide = high_negative_ai_value + multiply = 20 + } + } + send_interface_toast = { + title = court_ongoing.1110.c.success + left_icon = scope:competitor + right_icon = scope:target + court_ongoing_1110_remove_competitor_effect = yes + } + } + 10 = { #Failure + min = 5 + desc = court_ongoing.1110.c.failure + modifier = { + scope:competitor.ai_honor > 0 + add = { + value = scope:competitor.ai_honor + divide = high_positive_ai_value + multiply = 5 + } + } + modifier = { + scope:competitor.ai_greed < 0 + add = { + value = scope:competitor.ai_greed + divide = high_negative_ai_value + multiply = 5 + } + } + send_interface_toast = { + title = court_ongoing.1110.c.failure + left_icon = scope:competitor + right_icon = scope:target + reverse_add_opinion = { + target = scope:target + modifier = disappointed_opinion + opinion = -10 + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + honest = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -1 + ai_honor = -1 + ai_energy = -1 + } + } + } + + after = { + if = { + limit = { exists = scope:competitor_outcome } + scope:target = { + trigger_event = court_ongoing.1111 + } + } + } +} + + +#Recipient perspective on outcome +court_ongoing.1111 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1111.t + desc = { + desc = court_ongoing.1111.start.desc + first_valid = { + triggered_desc = { + trigger = { scope:competitor_outcome = flag:duel_success } + desc = court_ongoing.1111.duel_success.desc + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:duel_failure } + desc = court_ongoing.1111.duel_failure.desc + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_success } + desc = court_ongoing.1111.poison_success.desc + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_failure } + desc = court_ongoing.1111.poison_failure.desc + } + } + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:poison_success + } + } + animation = personality_bold + } + triggered_animation = { + trigger = { scope:competitor_outcome = flag:duel_failure } + animation = pain + } + triggered_animation = { + trigger = { always = yes } + animation = idle + } + } + right_portrait = { + character = scope:competitor + triggered_animation = { + trigger = { scope:competitor_outcome = flag:duel_success } + animation = pain + } + triggered_animation = { + trigger = { scope:competitor_outcome = flag:duel_failure } + animation = personality_bold + } + triggered_animation = { + trigger = { scope:competitor_outcome = flag:poison_success } + animation = shame + } + triggered_animation = { + trigger = { always = yes } + animation = idle + } + } + + trigger = { + exists = scope:scheme + } + + #Target did well/should keep trying + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:poison_success + } + } + desc = court_ongoing.1111.a.success + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:duel_failure } + desc = court_ongoing.1111.a.duel_failure + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_failure } + desc = court_ongoing.1111.a.poison_failure + } + } + } + } + + reverse_add_opinion = { + target = scope:owner + modifier = romance_opinion + opinion = 20 + } + + scope:owner = { + if = { + limit = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:duel_failure + } + } + trigger_event = court_ongoing.1112 #Duel success + } + else = { + trigger_event = court_ongoing.1114 #Poison success + } + } + + ai_chance = { + base = 0 + modifier = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:poison_success + } + add = 100 + } + } + } + + #I'm not impressed + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_success } + desc = court_ongoing.1111.b.poison_success + } + triggered_desc = { + trigger = { scope:competitor_outcome = flag:poison_failure } + desc = court_ongoing.1111.b.poison_failure + } + desc = court_ongoing.1111.b + } + } + } + + scope:owner = { + if = { + limit = { + OR = { + scope:competitor_outcome = flag:duel_success + scope:competitor_outcome = flag:duel_failure + } + } + trigger_event = court_ongoing.1113 #Duel failure + } + else = { + trigger_event = court_ongoing.1115 #Poison failure + } + } + + ai_chance = { + base = 0 + modifier = { + OR = { + scope:competitor_outcome = flag:duel_failure + scope:competitor_outcome = flag:poison_failure + } + add = 100 + } + } + } + + #I prefer competitor! (ends scheme, player only) + option = { + trigger = { is_ai = no } + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { scope:competitor_outcome = flag:duel_failure } + desc = court_ongoing.1111.c.duel_failure + } + desc = court_ongoing.1111.c + } + } + } + + reverse_add_opinion = { + target = scope:competitor + modifier = romance_opinion + opinion = 20 + } + + show_as_tooltip = { scope:scheme = { end_scheme = yes } } + scope:owner = { trigger_event = court_ongoing.0001 } + } + + #be gone, both of you! (ends scheme, player only) + option = { + trigger = { is_ai = no } + name = court_ongoing.1111.d + + show_as_tooltip = { scope:scheme = { end_scheme = yes } } + scope:owner = { trigger_event = court_ongoing.0001 } + } +} + + +#Duel success for owner +court_ongoing.1112 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1112.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:competitor + animation = pain + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + option = { + name = court_ongoing.1112.a + court_ongoing_1110_duel_success_effect = yes + } +} + +#Duel failure for owner +court_ongoing.1113 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1113.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:competitor + animation = personality_bold + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + #OK... + option = { + name = court_ongoing.1113.a + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + #Rivalry! + option = { + trigger = { + NOT = { has_relation_rival = scope:competitor } + } + name = court_ongoing.1113.b + set_relation_rival = { + target = scope:competitor + reason = rival_duel_vengeance + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 5 + } + } + } + + after = { + court_ongoing_1110_duel_failure_effect = yes + } +} + +#Poison success for owner +court_ongoing.1114 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1114.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:competitor + animation = sick + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + option = { + name = court_ongoing.1114.a + court_ongoing_1110_poison_success_effect = yes + } +} + +#Poison failure for owner +court_ongoing.1115 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1115.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:competitor + animation = dismissal + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + #OK... + option = { + name = court_ongoing.1115.a + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + } + } + } + + #Rivalry! + option = { + trigger = { + NOT = { has_relation_rival = scope:competitor } + } + name = court_ongoing.1113.b + + set_relation_rival = { + target = scope:competitor + reason = rival_poison_vengeance + } + + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 5 + } + } + } + + after = { + court_ongoing_1110_poison_failure_effect = yes + } +} + +#Poison murder for owner +court_ongoing.1116 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1110.t + desc = court_ongoing.1116.desc + + theme = romance_scheme + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:competitor + animation = dead + } + lower_right_portrait = scope:target + + trigger = { + exists = scope:scheme + } + + immediate = { court_ongoing_1110_poison_murder_effect = yes } + + option = { + name = court_ongoing.1116.a + } +} + + + + +############################## +# Boring party guest +# by Mathilda Bjarnehed +############################## + +scripted_trigger court_ongoing_1120_unpleasant_guest_trigger = { + basic_is_available_ai = yes + NOR = { + has_relation_friend = root + has_relation_lover = root + opinion = { + target = root + value > low_positive_opinion + } + } + NOR = { + this = scope:owner + this = scope:target + } +} + +court_ongoing.1120 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1120.t + desc = court_ongoing.1120.desc + theme = romance_scheme + override_background = { + reference = throne_room_scope + } + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:unpleasant_guest + animation = wedding_drunk + } + lower_right_portrait = scope:target + + cooldown = { years = 1 } + + trigger = { + trigger_if = { + limit = { exists = scope:target.host } + scope:target.host = { save_temporary_scope_as = target_host_temp } + } + trigger_else_if = { + limit = { + exists = scope:target.location.province_owner + } + scope:target.location.province_owner = { save_temporary_scope_as = target_host_temp } + } + trigger_else = { always = no } + scope:target_host_temp.top_liege ?= { + OR = { + court_ongoing_1120_unpleasant_guest_trigger = yes + any_vassal_or_below = { court_ongoing_1120_unpleasant_guest_trigger = yes } + } + } + } + + immediate = { + # Location & host + scope:target.location = { save_scope_as = target_location } + if = { + limit = { exists = scope:target.host } + scope:target.host = { save_scope_as = target_host } + } + else = { + scope:target.location.province_owner = { save_scope_as = target_host } + } + + # Save all potential guests + scope:target_host = { + save_scope_as = background_throne_room_scope + + # Host themselves + if = { + limit = { court_ongoing_1120_unpleasant_guest_trigger = yes } + add_to_list = important_guests + } + + # Host's liege + if = { + limit = { + top_liege != this + liege = { court_ongoing_1120_unpleasant_guest_trigger = yes } + } + liege = { add_to_list = important_guests } + } + + # Host's powerful vassals + every_powerful_vassal = { + limit = { court_ongoing_1120_unpleasant_guest_trigger = yes } + add_to_list = important_guests + } + } + # Your powerful vassals, if same realm + every_powerful_vassal = { + limit = { + top_liege = scope:target_host.top_liege + court_ongoing_1120_unpleasant_guest_trigger = yes + } + add_to_list = important_guests + } + + # Pick a guest + random_in_list = { + list = important_guests + limit = { + OR = { + is_powerful_vassal_of = root + AND = { + exists = root.liege + this = root.liege + } + highest_held_title_tier >= root.highest_held_title_tier + } + } + alternative_limit = { always = yes } + weight = { + base = 10 + modifier = { + add = { + value = ai_compassion + add = ai_rationality + add = ai_honor + multiply = -1 + } + } + compatibility_modifier = { + who = scope:target + compatibility_target = this + multiplier = -2 + } + compatibility_modifier = { + who = root + compatibility_target = this + multiplier = -2 + } + opinion_modifier = { + who = root + opinion_target = this + multiplier = -1 + } + modifier = { + add = { + value = diplomacy + subtract = high_skill_rating + multiply = -5 + } + } + } + save_scope_as = unpleasant_guest + } + + if = { + limit = { NOT = { exists = scope:unpleasant_guest } } + # Still no guest? Look further + scope:target_host.top_liege = { + random_vassal_or_below = { + limit = { court_ongoing_1120_unpleasant_guest_trigger = yes } + weight = { + base = 10 + modifier = { + add = { + value = ai_compassion + add = ai_rationality + add = ai_honor + multiply = -1 + } + } + modifier = { + add = { + value = diplomacy + subtract = high_skill_rating + multiply = -5 + } + } + } + save_scope_as = unpleasant_guest + } + } + # The top liege might be the only possible candidate + if = { + limit = { NOT = { exists = scope:unpleasant_guest } } + if = { + limit = { scope:target_host.top_liege = { court_ongoing_1120_unpleasant_guest_trigger = yes } } + scope:target_host.top_liege = { save_scope_as = unpleasant_guest } + } + } + } + } + + # Subterfuge distraction + option = { + name = court_ongoing.1120.a + skill = intrigue + trigger = { + intrigue >= high_skill_rating + intrigue > scope:unpleasant_guest.intrigue + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_kindness_modifier + } + } + + scope:target = { + save_scope_value_as = { + name = unpleasant_guest_outcome + value = flag:intrigue + } + trigger_event = court_ongoing.1121 + } + + stress_impact = { + honest = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + + ai_chance = { + base = 200 + + ai_value_modifier = { + ai_boldness = 2 + ai_honor = -2 + ai_compassion = 1 + } + } + } + + # Strike up a really nice conversation + option = { + name = court_ongoing.1120.b + skill = diplomacy + trigger = { + diplomacy >= high_skill_rating + diplomacy > scope:unpleasant_guest.diplomacy + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_kindness_modifier + } + } + + scope:target = { + save_scope_value_as = { + name = unpleasant_guest_outcome + value = flag:diplomacy + } + trigger_event = court_ongoing.1121 + } + + stress_impact = { + shy = medium_stress_impact_gain + } + + ai_chance = { + base = 200 + + ai_value_modifier = { + ai_sociability = 2 + ai_boldness = 2 + ai_honor = 1 + ai_compassion = 2 + } + } + } + + # Distract them (boring) + option = { + name = court_ongoing.1120.c + + add_stress = medium_stress_gain + + send_interface_toast = { + title = court_ongoing.1120.a.failure + add_character_modifier = { + modifier = chronic_headaches_modifier + years = 10 + } + } + + scope:scheme = { + add_scheme_modifier = { + type = courting_kindness_modifier + } + } + + scope:target = { + save_scope_value_as = { + name = unpleasant_guest_outcome + value = flag:diplomacy + } + trigger_event = court_ongoing.1121 + } + + stress_impact = { + shy = medium_stress_impact_gain + lazy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_value_modifier = { + ai_compassion = 2 + ai_honor = 1 + ai_energy = 1 + ai_sociability = 2 + } + } + } + + # Insult them + option = { + name = court_ongoing.1120.d + + add_prestige = miniscule_prestige_loss + + reverse_add_opinion = { + target = scope:unpleasant_guest + modifier = insulted_opinion + opinion = -15 + } + + progress_towards_rival_effect = { CHARACTER = scope:unpleasant_guest OPINION = 0 REASON = rival_boring_party_guest } + + scope:scheme = { + add_scheme_modifier = { + type = courting_kindness_modifier + } + } + + scope:target = { + save_scope_value_as = { + name = unpleasant_guest_outcome + value = flag:insult + } + trigger_event = court_ongoing.1121 + } + + stress_impact = { + compassionate = medium_stress_impact_gain + shy = medium_stress_impact_gain + craven = medium_stress_impact_gain + forgiving = minor_stress_impact_gain + calm = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + + ai_value_modifier = { + ai_compassion = -2 + ai_boldness = 2 + ai_honor = -1 + } + } + } + + # Nothing can be done + option = { + trigger = { + NOR = { + AND = { + intrigue >= high_skill_rating + intrigue > scope:unpleasant_guest.intrigue + } + AND = { + diplomacy >= high_skill_rating + diplomacy > scope:unpleasant_guest.diplomacy + } + } + } + name = court_ongoing.1120.e + + ai_chance = { + base = 50 + } + } +} + +# Target outcome event (unpleasant guest) +court_ongoing.1121 = { #by Mathilda Bjarnehed + type = character_event + title = court_ongoing.1121.t + desc = { + desc = court_ongoing.1121.start.desc + first_valid = { + triggered_desc = { + trigger = { scope:unpleasant_guest_outcome = flag:diplomacy } + desc = court_ongoing.1121.diplomacy.desc + } + triggered_desc = { + trigger = { scope:unpleasant_guest_outcome = flag:intrigue } + desc = court_ongoing.1121.intrigue.desc + } + triggered_desc = { + trigger = { scope:unpleasant_guest_outcome = flag:insult } + desc = court_ongoing.1121.insult.desc + } + } + } + theme = romance_scheme + override_background = { + reference = throne_room + } + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:diplomacy } + animation = personality_compassionate + } + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:intrigue } + animation = personality_dishonorable + } + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:insult } + animation = boredom + } + } + right_portrait = { + character = scope:unpleasant_guest + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:intrigue } + animation = worry + } + triggered_animation = { + trigger = { scope:unpleasant_guest_outcome = flag:insult } + animation = disapproval + } + animation = idle + } + + + # Study owner's diplomatic skills + option = { + name = court_ongoing.1121.a + + trigger = { scope:unpleasant_guest_outcome = flag:diplomacy } + + #Stress and opinion + add_stress = minor_stress_gain + + + #Diplomacy experience + random_list = { + 10 = { + modifier = { + add = { + value = scope:owner.diplomacy + subtract = average_skill_rating + multiply = 2 + } + } + desc = court_ongoing.1121.a.critical_success + send_interface_toast = { + left_icon = scope:owner + title = court_ongoing.1121.a.critical_success + add_diplomacy_lifestyle_perk_points = 1 + } + } + 90 = { + desc = court_ongoing.1121.a.success + send_interface_toast = { + left_icon = scope:owner + title = court_ongoing.1121.a.success + add_character_modifier = { + modifier = diplomacy_student_modifier + years = 5 + } + } + } + } + } + + # Study owner's intrigue skills + option = { + trigger = { scope:unpleasant_guest_outcome = flag:intrigue } + name = court_ongoing.1121.b + + #Stress and opinion + add_stress = minor_stress_gain + + + #Diplomacy experience + random_list = { + 10 = { + modifier = { + add = { + value = scope:owner.intrigue + subtract = average_skill_rating + multiply = 2 + } + } + desc = court_ongoing.1121.b.critical_success + send_interface_toast = { + left_icon = scope:owner + title = court_ongoing.1121.b.critical_success + add_intrigue_lifestyle_perk_points = 1 + } + } + 90 = { + desc = court_ongoing.1121.b.success + send_interface_toast = { + left_icon = scope:owner + title = court_ongoing.1121.b.success + add_character_modifier = { + modifier = intrigue_student_modifier + years = 5 + } + } + } + } + } + + + # Join in with owner's insults + option = { + trigger = { scope:unpleasant_guest_outcome = flag:insult } + name = court_ongoing.1121.c + + #Owner opinion + reverse_add_opinion = { + target = scope:owner + modifier = respect_opinion + opinion = 10 + } + + #Unpleasant opinion + random_list = { + 50 = { + modifier = { + scope:unpleasant_guest = { has_trait = honest } + add = 50 + } + modifier = { + scope:unpleasant_guest = { has_trait = humble } + add = 50 + } + desc = court_ongoing.1121.c.success + send_interface_toast = { + left_icon = scope:unpleasant_guest + title = court_ongoing.1121.c.success + reverse_add_opinion = { + target = scope:unpleasant_guest + modifier = respect_opinion + opinion = 10 + } + } + } + 50 = { + desc = court_ongoing.1121.c.failure + modifier = { + scope:unpleasant_guest = { has_trait = arrogant } + add = 50 + } + send_interface_toast = { + left_icon = scope:unpleasant_guest + title = court_ongoing.1121.c.failure + reverse_add_opinion = { + target = scope:unpleasant_guest + modifier = insulted_opinion + opinion = -10 + } + } + } + } + + stress_impact = { + shy = medium_stress_impact_gain + craven = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + } + + # Stay with unpleasant guest + option = { + add_stress = minor_stress_gain + name = court_ongoing.1121.d + + reverse_add_opinion = { + target = scope:unpleasant_guest + modifier = friendliness_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:owner + modifier = disappointed_opinion + opinion = -5 + } + } + + # Get out while you can + option = { + name = court_ongoing.1121.e + add_stress = minor_stress_loss + } +} + + +### EXTREME REQUEST ### +# by Linnéa Thimrén +###################### + +scripted_trigger court_ongoing_1211_trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_devotion + } + } +} + +scripted_trigger court_ongoing_1221_trigger = { + NOT = { + scope:scheme = { + has_scheme_modifier = courting_devotion + } + } +} + +court_ongoing.1200 = { #by Linnéa Thimrén + hidden = yes + + trigger = { + OR = { + court_ongoing_1211_trigger = yes + court_ongoing_1221_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { #more likely to fire later on in the scheme + scope:scheme.var:court_milestone_event < 2 + add = -0.5 + } + } + + immediate = { + if = { + limit = { + scope:target = { is_ai = no } + } + scope:target = { trigger_event = court_ongoing.1201 } + } + else = { + random_list = { + 10 = { + trigger = { court_ongoing_1211_trigger = yes } + trigger_event = { + id = court_ongoing.1211 + days = { 7 9 } + } + } + 10 = { + trigger = { court_ongoing_1221_trigger = yes } + trigger_event = { + id = court_ongoing.1221 + days = { 7 9 } + } + } + } + } + } +} + + +### EXTREME REQUEST - TARGET PLAYER CHOOSE ### + +scripted_effect court_ongoing_1211_a_success_target_effect = { + scope:target = { + add_character_modifier = { + modifier = seduce_rested_modifier + years = 5 + } + } +} + +scripted_effect court_ongoing_1211_a_success_effect = { + court_ongoing_1211_a_success_target_effect = yes + + reverse_add_opinion = { + target = scope:target + modifier = grateful_opinion + opinion = 20 + } + scope:scheme = { + add_scheme_modifier = { + type = courting_devotion + } + } +} + +scripted_effect court_ongoing_1211_failure_target_effect = { + scope:target = { + add_character_modifier = { + modifier = sleep_deprived_modifier + years = 5 + } + } +} + +scripted_effect court_ongoing_1211_a_failure_effect = { + court_ongoing_1211_failure_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = disgusted_opinion + opinion = -10 + } +} + +scripted_effect court_ongoing_1211_b_failure_effect = { + court_ongoing_1211_failure_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = insult_opinion + opinion = -15 + } +} + +scripted_effect court_ongoing_1221_a_success_target_effect = { + scope:target = { + add_prestige = medium_prestige_gain + } +} + +scripted_effect court_ongoing_1221_a_success_effect = { + court_ongoing_1221_a_success_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = grateful_opinion + opinion = 15 + } + scope:scheme = { + add_scheme_modifier = { + type = courting_devotion + } + } +} + +scripted_effect court_ongoing_1221_a_failure_target_effect = { + scope:target = { + add_prestige = minor_prestige_loss + } +} + +scripted_effect court_ongoing_1221_a_failure_effect = { + court_ongoing_1221_a_failure_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = disgusted_opinion + opinion = -10 + } +} + +scripted_effect court_ongoing_1221_b_failure_effect = { + court_ongoing_1221_a_failure_target_effect = yes + reverse_add_opinion = { + target = scope:target + modifier = insult_opinion + opinion = -15 + } +} + +court_ongoing.1201 = { #by Linnéa Thimrén + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1201.desc + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = flirtation + } + + cooldown = { years = 1 } + + #sleep + option = { + trigger = { court_ongoing_1211_trigger = yes } + name = court_ongoing.1201.a + + show_as_tooltip = { + random_list = { + 10 = { + show_chance = no + desc = court_ongoing.1201.a_success + court_ongoing_1211_a_success_target_effect = yes + } + 10 = { + show_chance = no + desc = court_ongoing.1201.a_failure + court_ongoing_1211_failure_target_effect = yes + } + } + } + + scope:owner = { + trigger_event = { + id = court_ongoing.1211 + days = { 7 9 } + } + } + } + + #food + option = { + trigger = { court_ongoing_1221_trigger = yes } + name = court_ongoing.1201.b + + show_as_tooltip = { + random_list = { + 10 = { + show_chance = no + desc = court_ongoing.1201.b_success + court_ongoing_1221_a_success_target_effect = yes + } + 10 = { + show_chance = no + desc = court_ongoing.1201.a_failure + court_ongoing_1221_a_failure_target_effect = yes + } + } + } + + scope:owner = { + trigger_event = { + id = court_ongoing.1221 + days = { 7 9 } + } + } + } + + #I don't want you to do anything + option = { + name = court_ongoing.1201.c + } +} + + +### EXTREME REQUEST - SLEEP ### + +court_ongoing.1211 = { #by Linnéa Thimrén + type = character_event + title = court_ongoing.1211.t + desc = { + desc = court_ongoing.1211.desc_opening + desc = court_ongoing.1211.desc + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = flirtation + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + #I'll do it! + option = { + name = court_ongoing.1211.a + + add_character_modifier = { + modifier = sleep_deprived_modifier + years = 2 + } + + random_list = { + 60 = { + desc = court_ongoing.1211.a.success + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.a.success + + scope:target = { + trigger_event = court_ongoing.1212 + } + + court_ongoing_1211_a_success_effect = yes + } + } + 10 = { + desc = court_ongoing.1211.a.failure + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.a.failure + + scope:target = { + trigger_event = court_ongoing.1213 + } + court_ongoing_1211_a_failure_effect = yes + } + } + } + + stress_impact = { + lazy = medium_stress_impact_gain + } + } + + #Tell them you'll do it (liar!) + option = { + name = court_ongoing.1211.b + flavor = court_ongoing.1211.b.tt + + duel = { + skill = intrigue + target = scope:target + 67 = { + desc = court_ongoing.1211.b.success + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.b.success + + scope:target = { + trigger_event = court_ongoing.1214 + } + court_ongoing_1211_a_success_effect = yes + } + } + 33 = { + desc = court_ongoing.1211.b.failure + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.b.failure + + scope:target = { + trigger_event = court_ongoing.1215 + } + court_ongoing_1211_b_failure_effect = yes + } + } + } + + stress_impact = { + honest = minor_stress_impact_gain + } + } + + #I won't do it! + option = { + name = court_ongoing.1211.c + + reverse_add_opinion = { + target = scope:target + modifier = refusal_opinion + opinion = -5 + } + } +} + +#success - for target +court_ongoing.1212 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1212.desc + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = personality_bold + } + theme = romance_scheme + + option = { + name = court_ongoing.1212.a + show_as_tooltip = { + court_ongoing_1211_a_success_target_effect = yes + } + } +} + +#failure - for target +court_ongoing.1213 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1213.desc + left_portrait = { + character = scope:target + animation = eyeroll + } + right_portrait = { + character = scope:owner + animation = dead + } + theme = romance_scheme + + option = { + name = court_ongoing.1213.a + show_as_tooltip = { + court_ongoing_1211_failure_target_effect = yes + } + } +} + +#trickery success - for target +court_ongoing.1214 = { + type = character_event + title = court_ongoing.1201.t + desc = { + desc = court_ongoing.1212.desc + desc = court_ongoing.1214.desc + } + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = personality_bold + } + theme = romance_scheme + + option = { + name = court_ongoing.1212.a + show_as_tooltip = { + court_ongoing_1211_a_success_target_effect = yes + } + } +} + +#trickery failure - for target +court_ongoing.1215 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1215.desc + left_portrait = { + character = scope:target + animation = eyeroll + } + theme = romance_scheme + + option = { + name = court_ongoing.1215.a + show_as_tooltip = { + court_ongoing_1211_failure_target_effect = yes + } + } +} + + + +### EXTREME REQUEST - FOOD ### + +court_ongoing.1221 = { #by Linnéa Thimrén + type = character_event + title = court_ongoing.1211.t + desc = { + desc = court_ongoing.1211.desc_opening + desc = court_ongoing.1221.desc + } + + theme = romance_scheme + left_portrait = { + character = scope:owner + animation = beg + } + right_portrait = { + character = scope:target + animation = flirtation + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + cooldown = { years = 1 } + + #I'll do it! + option = { + name = court_ongoing.1221.a + add_character_modifier = { + modifier = court_starved_modifier + years = 2 + } + random_list = { + 67 = { + desc = court_ongoing.1221.a.success + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1221.a.success + scope:target = { trigger_event = court_ongoing.1222 } + court_ongoing_1221_a_success_effect = yes + } + } + 33 = { + desc = court_ongoing.1221.a.failure + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1221.a.failure + scope:target = { trigger_event = court_ongoing.1223 } + court_ongoing_1221_a_failure_effect = yes + } + } + } + + stress_impact = { + gluttonous = medium_stress_impact_gain + } + } + + #Tell them you'll do it (liar!) + option = { + name = court_ongoing.1221.b + flavor = court_ongoing.1221.b.tt + + duel = { + skill = intrigue + target = scope:target + 67 = { + desc = court_ongoing.1211.b.success + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.b.success + scope:target = { trigger_event = court_ongoing.1224 } + court_ongoing_1221_a_success_effect = yes + } + } + 33 = { + desc = court_ongoing.1211.b.failure + send_interface_toast = { + left_icon = scope:target + title = court_ongoing.1211.b.failure + scope:target = { trigger_event = court_ongoing.1225 } + court_ongoing_1221_b_failure_effect = yes + } + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + } + } + + stress_impact = { + honest = minor_stress_impact_gain + } + } + + #I won't do it! + option = { + name = court_ongoing.1211.c + + reverse_add_opinion = { + target = scope:target + modifier = refusal_opinion + opinion = -5 + } + } +} + +#success - for target +court_ongoing.1222 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1222.desc + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = sick + } + theme = romance_scheme + + option = { + name = court_ongoing.1222.a + show_as_tooltip = { + court_ongoing_1221_a_success_target_effect = yes + } + } +} + +#failure - for target +court_ongoing.1223 = { + type = character_event + title = court_ongoing.1201.t + desc = { + desc = court_ongoing.1223.desc + desc = court_ongoing.1223.desc_ending + } + left_portrait = { + character = scope:target + animation = eyeroll + } + right_portrait = { + character = scope:owner + animation = wedding_drunk + } + theme = romance_scheme + + option = { + name = court_ongoing.1223.a + show_as_tooltip = { + court_ongoing_1221_a_failure_target_effect = yes + } + } +} + +#trickery success - for target +court_ongoing.1224 = { + type = character_event + title = court_ongoing.1201.t + desc = court_ongoing.1222.desc + left_portrait = { + character = scope:target + animation = love + } + right_portrait = { + character = scope:owner + animation = sick + } + theme = romance_scheme + + option = { + name = court_ongoing.1222.a + show_as_tooltip = { + court_ongoing_1221_a_success_target_effect = yes + } + } +} + +#trickery failure - for target +court_ongoing.1225 = { + type = character_event + title = court_ongoing.1201.t + desc = { + desc = court_ongoing.1225.desc + desc = court_ongoing.1223.desc_ending + } + left_portrait = { + character = scope:target + animation = eyeroll + } + right_portrait = { + character = scope:owner + animation = wedding_drunk + } + theme = romance_scheme + + option = { + name = court_ongoing.1215.a + show_as_tooltip = { + court_ongoing_1221_a_failure_target_effect = yes + } + } +} diff --git a/N3OW/events/scheme_events/governor_contract_events.txt b/N3OW/events/scheme_events/governor_contract_events.txt new file mode 100644 index 00000000..65bc4398 --- /dev/null +++ b/N3OW/events/scheme_events/governor_contract_events.txt @@ -0,0 +1,4516 @@ +########################## +# GOVERNOR CONTRACT EVENTS +########################## +namespace = governor_contract_event + +### Overdue Taxes +# Intro event +governor_contract_event.1000 = { + type = character_event + title = governor_contract_event.1000.t + desc = governor_contract_event.1000.desc + theme = administrative + left_portrait = { + character = root + animation = thinking + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = overdue_taxes + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = tax_destination + } + } + } + + option = { + name = governor_contract_event.1000.a + + custom_tooltip = governor_contract_event.1001.a_tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:tax_destination + ARRIVAL_EVENT = governor_contract_event.1001 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 200 + has_trait = lazy + NOT = { has_trait = greedy } # Greedy always wants more gold, even when lazy. + } + } + } +} + +# Arrival at the village location +governor_contract_event.1001 = { + type = character_event + title = governor_contract_event.1000.t + desc = governor_contract_event.1001.desc + theme = administrative + override_background = { + trigger = { + root.location = { graphical_wilderness_desert_trigger = yes } + } + reference = wilderness_desert + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + NOR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = ep2_hunt_forest_hut + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + OR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = wilderness_forest + } + override_background = { + trigger = { + root.location = { graphical_wilderness_jungle_trigger = yes } + } + reference = wilderness_jungle + } + + override_background = { + trigger = { + root.location = { graphical_wilderness_steppe_trigger = yes } + } + reference = ep2_travel_settlement_steppe + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + holder ?= { mpo_can_recruit_nomad_maa_trigger = yes } + } + } + } + } + reference = ep2_travel_nomad_settlement_desert + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county = { + NOR = { + culture = { culture_has_archer_cavalry_maa = yes } + holder ?= { mpo_can_recruit_nomad_maa_trigger = yes } + } + } + } + } + reference = ep2_travel_settlement_desert + } + override_background = { + trigger = { + root.location = { graphical_hills_trigger = yes } + } + reference = ep2_travel_settlement_hills + } + override_background = { + trigger = { + root.location = { graphical_wilderness_mountains_trigger = yes } + } + reference = ep2_travel_settlement_mountains + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = farmlands + terrain = plains + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_farm + } + left_portrait = { + character = root + animation = disapproval + } + + immediate = { + random_character_active_contract = { + task_contract_type = overdue_taxes + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = tax_destination + } + } + } + + option = { + name = governor_contract_event.1001.a + + duel = { + skill = diplomacy + value = 10 + 60 = { + desc = governor_contract_event.1001.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + save_scope_value_as = { + name = governor_contract_event_1003_diplomacy + value = yes + } + trigger_event = { + id = governor_contract_event.1003 + } + custom_tooltip = governor_contract_event.1001.success + } + 40 = { + desc = governor_contract_event.1001.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + trigger_event = { + id = governor_contract_event.1004 + } + custom_tooltip = governor_contract_event.1001.failure + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_diplomacy + } + modifier = { + factor = 2 + has_trait = patient + } + modifier = { + factor = 2 + has_trait = gregarious + } + modifier = { + factor = 1.5 + has_trait = trusting + } + modifier = { + factor = 1.5 + has_trait = compassionate + } + } + } + + option = { + name = governor_contract_event.1001.b + + duel = { + skill = stewardship + value = 10 + 60 = { + desc = governor_contract_event.1001.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + save_scope_value_as = { + name = governor_contract_event_1003_stewardship + value = yes + } + trigger_event = { + id = governor_contract_event.1003 + } + custom_tooltip = governor_contract_event.1001.success + } + 40 = { + desc = governor_contract_event.1001.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + trigger_event = { + id = governor_contract_event.1004 + } + custom_tooltip = governor_contract_event.1001.failure + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_stewardship + } + modifier = { + factor = 2 + has_trait = greedy + } + modifier = { + factor = 2 + has_trait = diligent + } + modifier = { + factor = 1.5 + has_trait = shy + } + modifier = { + factor = 1.5 + has_trait = paranoid + } + } + } +} + +# Success event +governor_contract_event.1003 = { + type = character_event + title = governor_contract_event.1003.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:governor_contract_event_1003_diplomacy + } + desc = governor_contract_event.1003.desc_diplomacy + } + triggered_desc = { + trigger = { + exists = scope:governor_contract_event_1003_stewardship + } + desc = governor_contract_event.1003.desc_stewardship + } + } + desc = governor_contract_event.1003.desc_outro + } + theme = administrative + left_portrait = { + character = root + animation = thinking + } + override_background = { + trigger = { + root.location = { graphical_wilderness_desert_trigger = yes } + } + reference = wilderness_desert + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + NOR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = ep2_hunt_forest_hut + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + OR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = wilderness_forest + } + override_background = { + trigger = { + root.location = { graphical_wilderness_jungle_trigger = yes } + } + reference = wilderness_jungle + } + + override_background = { + trigger = { + root.location = { graphical_wilderness_steppe_trigger = yes } + } + reference = ep2_travel_settlement_steppe + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county = { + OR = { + culture = { culture_has_archer_cavalry_maa = yes } + holder ?= { mpo_can_recruit_nomad_maa_trigger = yes } + } + } + } + } + reference = ep2_travel_nomad_settlement_desert + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county = { + NOR = { + culture = { culture_has_archer_cavalry_maa = yes } + holder ?= { mpo_can_recruit_nomad_maa_trigger = yes } + } + } + } + } + reference = ep2_travel_settlement_desert + } + override_background = { + trigger = { + root.location = { graphical_hills_trigger = yes } + } + reference = ep2_travel_settlement_hills + } + override_background = { + trigger = { + root.location = { graphical_wilderness_mountains_trigger = yes } + } + reference = ep2_travel_settlement_mountains + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = farmlands + terrain = plains + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_farm + } + + immediate = { + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.1003.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = taxes_governor + } + } + option = { + name = governor_contract_event.1003.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = taxes_paid_in_full + } + } + option = { + name = governor_contract_event.1003.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = taxes_paid_partially + } + } + option = { + name = governor_contract_event.1003.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = taxes_station_troops + } + } + option = { + name = governor_contract_event.1003.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = taxes_assign_administrator + } + } + option = { + name = governor_contract_event.1003.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = taxes_lower_taxes + } + } +} + +# Failure +governor_contract_event.1004 = { + type = character_event + title = governor_contract_event.1004.t + desc = governor_contract_event.1004.desc + theme = administrative + left_portrait = { + character = root + animation = dismissal + } + override_background = { + trigger = { + root.location = { graphical_wilderness_desert_trigger = yes } + } + reference = wilderness_desert + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + NOR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = ep2_hunt_forest_hut + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = forest + terrain = taiga + } + OR = { + geographical_region = world_africa + geographical_region = world_india + geographical_region = world_europe_west_iberia + geographical_region = world_middle_east + } + } + } + reference = wilderness_forest + } + override_background = { + trigger = { + root.location = { graphical_wilderness_jungle_trigger = yes } + } + reference = wilderness_jungle + } + + override_background = { + trigger = { + root.location = { graphical_wilderness_steppe_trigger = yes } + } + reference = ep2_travel_settlement_steppe + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county.culture = { + culture_has_archer_cavalry_maa = yes + } + } + } + reference = ep2_travel_nomad_settlement_desert + } + override_background = { + trigger = { + root.location = { + graphical_wilderness_desert_trigger = yes + county.culture = { + NOT = { culture_has_archer_cavalry_maa = yes } + } + } + } + reference = ep2_travel_settlement_desert + } + override_background = { + trigger = { + root.location = { graphical_hills_trigger = yes } + } + reference = ep2_travel_settlement_hills + } + override_background = { + trigger = { + root.location = { graphical_wilderness_mountains_trigger = yes } + } + reference = ep2_travel_settlement_mountains + } + override_background = { + trigger = { + root.location = { + OR = { + terrain = farmlands + terrain = plains + terrain = floodplains + } + } + } + reference = ep2_travel_settlement_farm + } + + option = { + name = governor_contract_event.1004.a + scope:ongoing_contract ?= { + complete_task_contract = failure_standard + } + } +} + +### Hoarding Mayor +# Intro event +governor_contract_event.1010 = { + type = character_event + title = governor_contract_event.1010.t + desc = governor_contract_event.1010.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = hoarding_mayor + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + + # Save the employer + task_contract_employer = { + save_scope_as = hoarding_mayor + } + } + } + + option = { + name = governor_contract_event.1010.a + + custom_tooltip = governor_contract_event.1010.a_tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:mayor_destination + ARRIVAL_EVENT = governor_contract_event.1011 + } + } +} + +# Arrival at mayor's residence +governor_contract_event.1011 = { + type = character_event + title = governor_contract_event.1010.t + desc = { + desc = governor_contract_event.1011.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:hoarding_mayor = { + OR = { + has_trait = craven + has_trait = shy + } + } + } + desc = governor_contract_event.1011.desc_fear + } + triggered_desc = { + trigger = { + scope:hoarding_mayor = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = greedy + } + } + } + desc = governor_contract_event.1011.desc_upset + } + desc = governor_contract_event.1011.desc_worried + } + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:hoarding_mayor + triggered_animation = { + trigger = { + scope:hoarding_mayor = { + OR = { + has_trait = craven + has_trait = shy + } + } + } + animation = fear + } + triggered_animation = { + trigger = { + scope:hoarding_mayor = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = greedy + } + } + } + animation = anger + } + animation = shock + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = hoarding_mayor + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + + # Save the employer + task_contract_employer = { + save_scope_as = hoarding_mayor + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.1011.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = mayor_governor + } + } + option = { + name = governor_contract_event.1011.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = mayor_claim_gold + } + } + option = { + name = governor_contract_event.1011.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = mayor_invest_in_buildings + } + } + option = { + name = governor_contract_event.1011.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = mayor_hold_festivities + } + } + option = { + name = governor_contract_event.1011.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = mayor_reprimand + } + } + option = { + name = governor_contract_event.1011.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = mayor_hook + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +# Cancel travel plan confirmation - Do you really want to forgoe the contract? +governor_contract_event.1012 = { + type = character_event + title = governor_contract_event.1012.t + desc = governor_contract_event.1012.desc + theme = administrative + left_portrait = { + character = root + animation = thinking + } + + immediate = { + # Save the contract + random_character_active_contract = { + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + + # Save the employer + task_contract_employer ?= { + save_scope_as = contract_employer + } + + # Save your character + task_contract_taker = { + save_scope_as = contract_taker + } + } + } + + option = { # On second thought, let's go! + name = governor_contract_event.1012.a + custom_tooltip = governor_contract_event.1012.a_tt + start_travel_plan = { + destination = scope:ongoing_destination + on_arrival_event = governor_contract_event.1013 + on_travel_planner_cancel_event = governor_contract_event.1012 + on_arrival_destinations = all_but_last + } + } + + option = { # I have more important matters to deal with. + name = governor_contract_event.1012.b + + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } +} + +governor_contract_event.1013 = { + hidden = yes + + immediate = { + scope:ongoing_contract = { + switch = { + trigger = has_task_contract_type + overdue_taxes = { + scope:contract_taker = { trigger_event = governor_contract_event.1001 } + } + hoarding_mayor = { + scope:contract_taker = { trigger_event = governor_contract_event.1011 } + } + rampant_bandits = { + scope:contract_taker = { trigger_event = governor_contract_event.1031 } + } + inept_mayor = { + scope:contract_taker = { trigger_event = governor_contract_event.2011 } + } + raiding_peasants = { + scope:contract_taker = { trigger_event = governor_contract_event.2031 } + } + wild_predators = { + scope:contract_taker = { trigger_event = governor_contract_event.2041 } + } + evil_presence = { + scope:contract_taker = { trigger_event = governor_contract_event.2051 } + } + buried_treasure = { + scope:contract_taker = { trigger_event = governor_contract_event.2071 } + } + public_land = { + scope:contract_taker = { trigger_event = governor_contract_event.2081 } + } + mad_prophet = { + scope:contract_taker = { trigger_event = governor_contract_event.2091 } + } + hungry_times = { + scope:contract_taker = { trigger_event = governor_contract_event.2111 } + } + } + } + } +} + +### Bountiful Harvest +# Intro event +governor_contract_event.1020 = { + type = character_event + title = governor_contract_event.1020.t + desc = governor_contract_event.1020.desc + theme = administrative + override_background = { reference = bp1_wine_cellar } + left_portrait = { + character = root + animation = happiness + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = bountiful_harvest + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.1020.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = harvest_governor + } + } + option = { + name = governor_contract_event.1020.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = harvest_distribute + } + } + option = { + name = governor_contract_event.1020.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = harvest_capital + } + } + option = { + name = governor_contract_event.1020.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = harvest_charity + } + } + option = { + name = governor_contract_event.1020.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = harvest_sell_excess + } + } + option = { + name = governor_contract_event.1020.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = harvest_claim_it_yourself + } + } +} + +### Rampaging Bandits +# Intro event +governor_contract_event.1030 = { + type = character_event + title = governor_contract_event.1030.t + desc = governor_contract_event.1030.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = rampant_bandits + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = bandit_destination + } + } + + show_as_tooltip = { # To make sure the player sees it + scope:bandit_destination.county = { + add_county_modifier = { + modifier = ep3_governance_rampant_bandits + years = 40 + } + } + } + } + + option = { + name = governor_contract_event.1030.a + + custom_tooltip = governor_contract_event.1038.a_tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:bandit_destination + ARRIVAL_EVENT = governor_contract_event.1031 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at bandit camp +governor_contract_event.1031 = { + type = character_event + title = governor_contract_event.1030.t + desc = governor_contract_event.1031.desc + theme = administrative + override_background = { reference = wilderness } + left_portrait = { + character = root + animation = marshal + } + + immediate = { + add_character_flag = need_military_outfit + # Save the contract + random_character_active_contract = { + task_contract_type = rampant_bandits + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = bandit_destination + } + } + + hidden_effect = { + current_travel_plan ?= { + delay_travel_plan = { days = 180 } + } + } + } + + option = { # Overwhelm the bandits! + name = governor_contract_event.1031.a + + random_list = { + 60 = { # Success + trigger_event = { + id = governor_contract_event.1032 + days = 3 + } + custom_tooltip = governor_contract_event.1031.success + + modifier = { + factor = 1.2 + has_trait = brave + } + modifier = { + factor = 1.2 + has_trait = reckless + } + modifier = { + factor = 1.2 + has_trait = aggressive_attacker + } + modifier = { + factor = 1.4 + OR = { + has_trait = zealous + has_trait = holy_warrior + } + scope:bandit_destination.county = { + faith != root.faith + } + } + } + 40 = { # Failure + trigger_event = { + id = governor_contract_event.1033 + days = 3 + } + custom_tooltip = governor_contract_event.1031.failure + + modifier = { + factor = 1.2 + scope:ongoing_contract.task_contract_tier >= define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER + scope:ongoing_contract.task_contract_tier < define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + modifier = { + factor = 1.4 + scope:ongoing_contract.task_contract_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = brave + } + modifier = { + factor = 2 + has_trait = reckless + } + modifier = { + factor = 1.5 + has_trait = aggressive_attacker + } + modifier = { + factor = 1.5 + has_trait = wrathful + } + } + } + + option = { # Let's lay out a tactic before we attack. + name = governor_contract_event.1031.b + + duel = { + skill = martial + value = 10 + 60 = { + desc = governor_contract_event.1031.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + save_scope_value_as = { + name = governor_contract_event_1031_tactical + value = yes + } + trigger_event = { + id = governor_contract_event.1032 + days = 3 + } + custom_tooltip = governor_contract_event.1031.success + } + 40 = { + desc = governor_contract_event.1031.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + trigger_event = { + id = governor_contract_event.1033 + days = 3 + } + custom_tooltip = governor_contract_event.1031.failure + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_martial + } + modifier = { + factor = 2 + has_trait = patient + } + modifier = { + factor = 1.5 + has_trait = ambitious + } + } + } + + option = { # Lure them into a trap. + name = governor_contract_event.1031.c + + duel = { + skill = intrigue + value = 10 + 60 = { + desc = governor_contract_event.1031.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + save_scope_value_as = { + name = governor_contract_event_1031_trap + value = yes + } + trigger_event = { + id = governor_contract_event.1032 + days = 3 + } + custom_tooltip = governor_contract_event.1031.success + } + 40 = { + desc = governor_contract_event.1031.c.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + trigger_event = { + id = governor_contract_event.1033 + days = 3 + } + custom_tooltip = governor_contract_event.1031.failure + } + } + + ai_chance = { + base = 10 + + modifier = { + factor = 2 + has_trait = education_intrigue + } + modifier = { + factor = 2 + has_trait = deceitful + } + modifier = { + factor = 1.5 + has_trait = paranoid + } + modifier = { + factor = 1.5 + has_trait = craven + } + } + } +} + +# Success! +governor_contract_event.1032 = { + type = character_event + title = governor_contract_event.1030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:governor_contract_event_1031_tactical + } + desc = governor_contract_event.1032.desc_tactical + } + triggered_desc = { + trigger = { + exists = scope:governor_contract_event_1031_trap + } + desc = governor_contract_event.1032.desc_trap + } + desc = governor_contract_event.1032.desc_charge + } + desc = governor_contract_event.1032.desc_outro + } + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + triggered_animation = { + trigger = { + exists = scope:governor_contract_event_1031_tactical + } + animation = inspect_weapon + } + triggered_animation = { + trigger = { + exists = scope:governor_contract_event_1031_trap + } + animation = scheme + } + animation = celebrate_sword + camera = camera_event_left_forward + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = rampant_bandits + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = bandit_destination + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + + scope:bandit_destination.county = { + if = { + limit = { + has_county_modifier = ep3_governance_rampant_bandits + } + remove_county_modifier = ep3_governance_rampant_bandits + } + } + } + + option = { # Special governor trait option + name = governor_contract_event.1032.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = bandit_governor + } + } + option = { + name = governor_contract_event.1032.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = bandit_pardon + } + } + option = { + name = governor_contract_event.1032.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = bandit_recruit + } + } + option = { + name = governor_contract_event.1032.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = bandit_payment + } + } + option = { + name = governor_contract_event.1032.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = bandit_execute + } + } + option = { + name = governor_contract_event.1032.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = bandit_gold + } + } + + after = { + hidden_effect = { + #current_travel_plan ?= { resume_travel_plan = yes } + } + current_travel_plan ?= { resume_travel_plan = yes } + remove_character_flag = need_military_outfit + } +} + +# Failure! +governor_contract_event.1033 = { + type = character_event + title = governor_contract_event.1030.t + desc = governor_contract_event.1033.desc + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + animation = debating + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = rampant_bandits + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = bandit_destination + } + } + } + + option = { + name = governor_contract_event.1033.a + + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + current_travel_plan ?= { resume_travel_plan = yes } + } + + after = { + hidden_effect = { + #current_travel_plan ?= { resume_travel_plan = yes } + } + remove_character_flag = need_military_outfit + } +} + +### Discontent Soldiers +# Intro event +governor_contract_event.2000 = { + type = character_event + title = governor_contract_event.2000.t + desc = governor_contract_event.2000.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = discontent_soldiers + save_scope_as = ongoing_contract + } + random_neighboring_and_across_water_realm_same_rank_owner = { + limit = { liege = root.liege } + save_scope_as = other_gov + } + scope:ongoing_contract = { # Save other gov for reward effects + set_variable = { + name = other_gov + value = scope:other_gov + } + } + generate_governance_outcome_effect = { OPTIONS = 5 } + } + + option = { # Special governor trait option + name = governor_contract_event.2000.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = soldiers_land + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2000.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = soldiers_rival + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + } + } + } + option = { + name = governor_contract_event.2000.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = soldiers_break + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + option = { + name = governor_contract_event.2000.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = soldiers_punish + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_greed = 0.5 + } + } + } + option = { + name = governor_contract_event.2000.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = soldiers_pay + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } +} + +### Inept Mayor +# Intro event +governor_contract_event.2010 = { + type = character_event + title = governor_contract_event.2010.t + desc = governor_contract_event.2010.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = inept_mayor + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + + # Save the employer + task_contract_employer = { + save_scope_as = inept_mayor + } + } + } + + option = { + name = governor_contract_event.2010.a + custom_tooltip = governor_contract_event.1010.a_tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:mayor_destination + ARRIVAL_EVENT = governor_contract_event.2011 + } + } +} + +# Arrival at mayor's residence +governor_contract_event.2011 = { + type = character_event + title = governor_contract_event.2010.t + desc = { + desc = governor_contract_event.2011.desc_intro + first_valid = { + triggered_desc = { + trigger = { + scope:inept_mayor = { + OR = { + has_trait = lazy + has_trait = craven + has_trait = loyal + has_trait = contrite + has_trait = honest + } + } + } + desc = governor_contract_event.2011.desc_fear + } + triggered_desc = { + trigger = { + scope:inept_mayor = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = diligent + } + } + } + desc = governor_contract_event.2011.desc_upset + } + desc = governor_contract_event.2011.desc_worried + } + } + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:inept_mayor + triggered_animation = { + trigger = { + scope:inept_mayor = { + OR = { + has_trait = craven + has_trait = shy + } + } + } + animation = fear + } + triggered_animation = { + trigger = { + scope:inept_mayor = { + OR = { + has_trait = brave + has_trait = arrogant + has_trait = greedy + } + } + } + animation = anger + } + animation = shock + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = inept_mayor + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = mayor_destination + } + + # Save the employer + task_contract_employer = { + save_scope_as = inept_mayor + } + } + + generate_governance_outcome_effect = { OPTIONS = 4 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.2011.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = mayor_in_govt + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2011.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = mayor_in_fire + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + option = { + name = governor_contract_event.2011.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = mayor_in_help + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + option = { + name = governor_contract_event.2011.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = mayor_in_punish + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### Provincial Investment +# Intro event +governor_contract_event.2020 = { + type = character_event + title = governor_contract_event.2020.t + desc = governor_contract_event.2020.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = betting + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = prov_investment + save_scope_as = ongoing_contract + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + liege = { save_scope_as = emperor } + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.2020.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = invest_infrastructure + } + add_character_flag = { + flag = admin_invest_infrastructure + days = 5 + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2020.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = invest_church + } + add_character_flag = { + flag = admin_invest_church + days = 5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + option = { + name = governor_contract_event.2020.c + flavor = governor_contract_event.2020.c_tt + trigger = { exists = scope:governance_option_c } + duel = { + skill = intrigue + value = average_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = governor + add = 25 + } + save_scope_value_as = { + name = governor_contract_event_2020_duel + value = flag:invest_monument + } + desc = governor_contract_event.2020.success + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = invest_monument + } + } + add_character_flag = { + flag = admin_invest_monument_success + days = 5 + } + trigger_event = governor_contract_event.2021 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = governor_contract_event.2020.failure + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + add_character_flag = { + flag = admin_invest_monument_fail + days = 5 + } + trigger_event = governor_contract_event.2022 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + ai_boldness = 0.5 + } + } + } + option = { + name = governor_contract_event.2020.d + trigger = { exists = scope:governance_option_d } + duel = { + skill = stewardship + value = average_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = governor + add = 25 + } + save_scope_value_as = { + name = governor_contract_event_2020_duel + value = flag:invest_traders + } + desc = governor_contract_event.2020.success + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = invest_traders + } + } + add_character_flag = { + flag = admin_invest_traders_success + days = 5 + } + trigger_event = governor_contract_event.2021 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = governor_contract_event.2020.failure + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + add_character_flag = { + flag = admin_invest_traders_fail + days = 5 + } + trigger_event = governor_contract_event.2022 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2020.e + trigger = { exists = scope:governance_option_e } + duel = { + skill = martial + value = average_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = governor + add = 25 + } + save_scope_value_as = { + name = governor_contract_event_2020_duel + value = flag:invest_military + } + desc = governor_contract_event.2020.success + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = invest_military + } + } + add_character_flag = { + flag = admin_invest_military_success + days = 5 + } + + trigger_event = governor_contract_event.2021 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = governor_contract_event.2020.failure + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + add_character_flag = { + flag = admin_invest_military_fail + days = 5 + } + + trigger_event = governor_contract_event.2022 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_boldness = 0.5 + } + } + } + option = { + name = governor_contract_event.2020.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = invest_food + } + add_character_flag = { + flag = admin_invest_food + days = 5 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } +} + +#Success +governor_contract_event.2021 = { + type = character_event + title = governor_contract_event.2021.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = admin_invest_infrastructure + } + desc = governor_contract_event.2021.desc_infrastructure + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_church + } + desc = governor_contract_event.2021.desc_church + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_monument_success + } + desc = governor_contract_event.2021.desc_monument + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_traders_success + } + desc = governor_contract_event.2021.desc_traders + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_military_success + } + desc = governor_contract_event.2021.desc_military + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_food + } + desc = governor_contract_event.2021.desc_food + } + } + desc = governor_contract_event.2021.desc + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = personality_bold + } + + option = { + name = governor_contract_event.2021.a + if = { + limit = { + scope:governor_contract_event_2020_duel ?= flag:invest_monument + } + scope:ongoing_contract = { + complete_task_contract = invest_monument + } + } + else_if = { + limit = { + scope:governor_contract_event_2020_duel ?= flag:invest_traders + } + scope:ongoing_contract = { + complete_task_contract = invest_traders + } + } + else_if = { + limit = { + scope:governor_contract_event_2020_duel ?= flag:invest_military + } + scope:ongoing_contract = { + complete_task_contract = invest_military + } + } + } +} + +#Failure +governor_contract_event.2022 = { + type = character_event + title = governor_contract_event.2022.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = admin_invest_monument_fail + } + desc = governor_contract_event.2022.desc_monument + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_traders_fail + } + desc = governor_contract_event.2022.desc_traders + } + triggered_desc = { + trigger = { + has_character_flag = admin_invest_military_fail + } + desc = governor_contract_event.2022.desc_military + } + } + desc = governor_contract_event.2022.desc + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = disapproval + } + + option = { + name = governor_contract_event.2022.a + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } +} + +### Raiding Peasants +# Intro event +governor_contract_event.2030 = { + type = character_event + title = governor_contract_event.2030.t + desc = governor_contract_event.2030.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = raiding_peasants + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + scope:ongoing_destination.county = { + random_neighboring_county = { + limit = { + holder.top_liege = { + this != root.top_liege + } + } + holder.top_liege = { save_scope_as = neighbor } + } + } + } + + option = { + name = governor_contract_event.2030.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2031 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the village +governor_contract_event.2031 = { + type = character_event + title = governor_contract_event.2030.t + desc = governor_contract_event.2031.desc + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + animation = debating + } + right_portrait = { + character = scope:peasant + animation = celebrate_spear + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = raiding_peasants + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + hidden_effect = { + random_pool_character = { + province = root.location + limit = { + has_dynasty = no + martial >= 8 + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = peasant + } + scope:peasant ?= { add_trait = peasant_leader } + if = { + limit = { + NOT = { exists = scope:peasant } + } + create_character = { + template = peasant_faction_leader_template + location = root.location + culture = scope:ongoing_destination.county.culture + faith = scope:ongoing_destination.county.faith + gender_female_chance = root_soldier_female_chance + save_scope_as = peasant + } + if = { + limit = { + is_ai = yes + } + scope:peasant = { add_character_flag = generated } + } + } + } + + generate_governance_outcome_effect = { OPTIONS = 5 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.2031.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:peasant = { add_to_court_and_entourage_only_effect = yes } + if = { + limit = { + maa_regiments_count < maa_regiments_max_count + } + create_maa_regiment = { + type = light_footmen + check_can_recruit = yes + size = 3 + } + } + scope:ongoing_contract = { + complete_task_contract = peasant_enroll + } + scope:peasant = { + remove_character_flag = generated + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2031.b + trigger = { exists = scope:governance_option_b } + scope:peasant = { + death = { death_reason = death_execution killer = root } + } + scope:ongoing_contract = { + complete_task_contract = peasant_punish + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + } + } + option = { + name = governor_contract_event.2031.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = peasant_encourage + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.5 + } + } + } + option = { + name = governor_contract_event.2031.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = peasant_work + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + option = { + name = governor_contract_event.2031.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = peasant_take + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + if = { + limit = { + scope:peasant ?= { has_character_flag = generated } + } + scope:peasant = { silent_disappearance_effect = yes } + } + } + } +} + +### Wild Predators +# Intro event +governor_contract_event.2040 = { + type = character_event + title = governor_contract_event.2040.t + desc = governor_contract_event.2040.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = wild_predators + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + select_local_animal_effect = { TYPE = prowling } + } + + option = { + name = governor_contract_event.2040.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2041 + } + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2041 = { + type = character_event + title = governor_contract_event.2040.t + desc = governor_contract_event.2041.desc + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + animation = personality_bold + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = wild_predators + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.2041.a + flavor = governor_contract_event.2041.a.tt + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = predators_poisoners + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2041.b + trigger = { exists = scope:governance_option_b } + duel = { + skill = prowess + value = decent_skill_rating + 50 = { + desc = governor_contract_event.2041.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + modifier = { + has_trait = lifestyle_hunter + add = 20 + } + modifier = { + has_trait_xp = { + trait = lifestyle_hunter + track = hunter + value >= trait_second_level + } + add = 20 + } + save_scope_value_as = { + name = governor_contract_event_2041_duel + value = flag:predators_hunt + } + trigger_event = governor_contract_event.2042 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = predators_hunt + } + } + } + 50 = { + desc = governor_contract_event.2041.b.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + trigger_event = governor_contract_event.2043 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + increase_wounds_no_death_effect = { REASON = wild_animal } + } + add_character_flag = { + flag = governor_contract_event_2043_wounded + days = 5 + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 1 + } + } + } + option = { + name = governor_contract_event.2041.c + trigger = { exists = scope:governance_option_c } + duel = { + skill = stewardship + value = average_skill_rating + 50 = { + desc = governor_contract_event.2041.c.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2041_duel + value = flag:predators_hunters + } + trigger_event = governor_contract_event.2042 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = predators_hunters + } + } + } + 50 = { + desc = governor_contract_event.2041.c.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + trigger_event = governor_contract_event.2043 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = -0.5 + } + } + } + option = { + name = governor_contract_event.2041.d + trigger = { exists = scope:governance_option_d } + random_list = { + 50 = { + desc = governor_contract_event.2041.d.success + modifier = { + scope:ongoing_destination.county = { + development_level >= medium_development_level + } + add = 10 + } + modifier = { + add = scope:ongoing_destination.holder.prowess + exists = scope:ongoing_destination.holder + } + save_scope_value_as = { + name = governor_contract_event_2041_duel + value = flag:predators_locals + } + trigger_event = governor_contract_event.2042 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = predators_locals + } + } + } + 50 = { + desc = governor_contract_event.2041.d.fail + modifier = { + scope:ongoing_destination.county = { + development_level <= bad_development_level + } + add = 10 + } + trigger_event = governor_contract_event.2043 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -1 + } + } + } + option = { + name = governor_contract_event.2041.e + flavor = governor_contract_event.2041.e.tt + trigger = { exists = scope:governance_option_e } + duel = { + skill = martial + value = decent_skill_rating + 50 = { + desc = governor_contract_event.2041.e.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2041_duel + value = flag:predators_capture + } + trigger_event = governor_contract_event.2042 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = predators_capture + } + } + } + 50 = { + desc = governor_contract_event.2041.e.fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + trigger_event = governor_contract_event.2043 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_rationality = -0.5 + } + } + } + option = { + name = governor_contract_event.2041.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = predators_preys + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = -0.5 + ai_greed = -0.5 + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +#Success +governor_contract_event.2042 = { + type = character_event + title = governor_contract_event.2040.t + desc = governor_contract_event.2042.desc + theme = administrative + override_background = { reference = ep2_hunt_poachers_camp } + left_portrait = { + character = root + animation = personality_bold + } + + option = { + name = governor_contract_event.2042.a + scope:ongoing_contract = { + if = { + limit = { + scope:governor_contract_event_2041_duel ?= flag:predators_hunt + } + complete_task_contract = predators_hunt + } + else_if = { + limit = { + scope:governor_contract_event_2041_duel ?= flag:predators_hunters + } + complete_task_contract = predators_hunters + } + else_if = { + limit = { + scope:governor_contract_event_2041_duel ?= flag:predators_locals + } + complete_task_contract = predators_locals + } + else_if = { + limit = { + scope:governor_contract_event_2041_duel ?= flag:predators_capture + } + complete_task_contract = predators_capture + } + } + } +} + +#Failure +governor_contract_event.2043 = { + type = character_event + title = governor_contract_event.2040.t + desc = governor_contract_event.2043.desc + theme = administrative + override_background = { + trigger = { + has_character_flag = governor_contract_event_2043_wounded + } + reference = wilderness + } + override_background = { + trigger = { + NOT = { has_character_flag = governor_contract_event_2043_wounded } + } + reference = ep2_hunt_poachers_camp + } + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_character_flag = governor_contract_event_2043_wounded + } + animation = stayback + } + triggered_animation = { + trigger = { + NOT = { + has_character_flag = governor_contract_event_2043_wounded + } + } + animation = disapproval + } + } + + option = { + name = governor_contract_event.2043.a + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + if = { + limit = { + has_character_flag = governor_contract_event_2043_wounded + } + increase_wounds_no_death_effect = { REASON = wild_animal } + } + } +} + +### Evil Presence +# Intro event +governor_contract_event.2050 = { + type = character_event + title = governor_contract_event.2050.t + desc = { + desc = governor_contract_event.2050.desc + random_valid = { + desc = governor_contract_event.2051.desc_a + desc = governor_contract_event.2051.desc_b + desc = governor_contract_event.2051.desc_c + desc = governor_contract_event.2051.desc_d + desc = governor_contract_event.2051.desc_e + } + random_valid = { + desc = governor_contract_event.2051.desc_f + desc = governor_contract_event.2051.desc_g + desc = governor_contract_event.2051.desc_h + desc = governor_contract_event.2051.desc_i + } + random_valid = { + desc = governor_contract_event.2051.desc_l + desc = governor_contract_event.2051.desc_m + desc = governor_contract_event.2051.desc_n + desc = governor_contract_event.2051.desc_o + desc = governor_contract_event.2051.desc_p + desc = governor_contract_event.2051.desc_q + } + desc = governor_contract_event.2051.desc_end + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = evil_presence + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + } + + option = { + name = governor_contract_event.2050.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2051 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2051 = { + type = character_event + title = governor_contract_event.2050.t + desc = governor_contract_event.2051.desc + theme = administrative + override_background = { reference = ep2_hunt_foggy_forest } + override_effect_2d = { reference = fog } + left_portrait = { + character = root + animation = worry + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = evil_presence + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + generate_governance_outcome_effect = { OPTIONS = 5 } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + } + + option = { # Special governor trait option + name = governor_contract_event.2051.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = presence_official + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2051.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = presence_exorcize + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + option = { + name = governor_contract_event.2051.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = presence_sorcerer + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_vengefulness = 0.5 + ai_rationality = -0.5 + } + } + } + option = { + name = governor_contract_event.2051.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = presence_local + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -0.5 + ai_sociability = 0.5 + } + } + } + option = { + name = governor_contract_event.2051.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = presence_rationalize + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### Miraculous Healing +# Intro event +governor_contract_event.2060 = { + type = character_event + title = governor_contract_event.2060.t + desc = governor_contract_event.2060.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:scammer + animation = beg + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = miraculous_healing + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + random_pool_character = { + province = scope:ongoing_destination + limit = { + is_adult = yes + OR = { + has_trait = eccentric + has_trait = deceitful + has_trait = zealous + has_trait = lifestyle_mystic + } + intrigue >= 12 + } + save_scope_as = scammer + } + if = { + limit = { + NOT = { exists = scope:scammer } + } + create_character = { + location = root.location + template = scammer_template + save_scope_as = scammer + after_creation = { + add_character_flag = created + } + } + } + generate_governance_outcome_effect = { OPTIONS = 6 } + scope:scammer = { assign_quirk_effect = yes } + } + + option = { # Special governor trait option + name = governor_contract_event.2060.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = healing_example + } + # We blind the scammer as punishment + scope:scammer = { add_trait = blind } + + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2060.b + trigger = { exists = scope:governance_option_b } + scope:scammer = { remove_character_flag = created_character } + add_courtier = scope:scammer + scope:ongoing_contract = { + complete_task_contract = healing_hire + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_honor = -0.5 + } + } + } + option = { + name = governor_contract_event.2060.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = healing_relic + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -0.5 + ai_greed = 0.5 + } + } + } + option = { + name = governor_contract_event.2060.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = healing_fine + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2060.e + trigger = { exists = scope:governance_option_e } + scope:scammer = { remove_character_flag = created_character } + rightfully_imprison_character_effect = { + TARGET = scope:scammer + IMPRISONER = root + } + scope:ongoing_contract = { + complete_task_contract = healing_imprison + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + option = { + name = governor_contract_event.2060.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = healing_faith + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + after = { + scope:scammer = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +### Buried Treasure +# Intro event +governor_contract_event.2070 = { + type = character_event + title = governor_contract_event.2070.t + desc = governor_contract_event.2070.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = buried_treasure + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + } + + option = { + name = governor_contract_event.2070.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2071 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2071 = { + type = character_event + title = governor_contract_event.2070.t + desc = { + desc = governor_contract_event.2071.desc + first_valid = { + triggered_desc = { + trigger = { + liege = { has_title = title:e_byzantium } + } + desc = governor_contract_event.2071.desc.byz + } + desc = governor_contract_event.2071.desc.fallback + } + desc = governor_contract_event.2071.desc.end + } + theme = administrative + override_background = { reference = market } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + animation = acknowledging # anim uses crucifix scepter + } + animation = war_over_tie + } + right_portrait = { + character = scope:peasant + animation = beg + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = buried_treasure + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + + random_pool_character = { + province = scope:ongoing_destination + limit = { + is_adult = yes + has_dynasty = no + } + save_scope_as = peasant + } + if = { + limit = { + NOT = { exists = scope:peasant } + } + create_character = { + location = root.location + template = generic_peasant_character + save_scope_as = peasant + } + if = { + limit = { + is_ai = yes + } + scope:peasant = { add_character_flag = created_character } + } + } + hidden_effect = { + scope:peasant = { add_gold = root.medium_gold_value } + } + generate_governance_outcome_effect = { OPTIONS = 5 } + } + + option = { # Special governor trait option + name = governor_contract_event.2071.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = treasure_invest + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2071.b + trigger = { exists = scope:governance_option_b } + scope:peasant = { + pay_treasury_or_gold = { + target = root + value = root.minor_treasury_or_gold_value + } + } + scope:ongoing_contract = { + complete_task_contract = treasure_tax + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2071.c + trigger = { exists = scope:governance_option_c } + scope:peasant = { + pay_treasury_or_gold = { + target = root + value = root.medium_treasury_or_gold_value + } + } + scope:ongoing_contract = { + complete_task_contract = treasure_commandeer + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_honor = -0.5 + } + } + } + option = { + name = governor_contract_event.2071.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = treasure_acknowledge + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + } + } + } + option = { + name = governor_contract_event.2071.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = treasure_distribute + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + after = { + scope:peasant = { + if = { + limit = { + has_character_flag = created_character + } + silent_disappearance_effect = yes + } + } + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### Public Land +# Intro event +governor_contract_event.2080 = { + type = character_event + title = governor_contract_event.2080.t + desc = governor_contract_event.2080.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + lower_right_portrait = scope:magnate + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = public_land + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + task_contract_employer = { + save_scope_as = magnate + } + } + } + + option = { + name = governor_contract_event.2080.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2081 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2081 = { + type = character_event + title = governor_contract_event.2080.t + desc = governor_contract_event.2081.desc + theme = administrative + override_background = { reference = relaxing_room } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:magnate + animation = beg + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = buried_treasure + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + task_contract_employer = { + save_scope_as = magnate + } + } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + + generate_governance_outcome_effect = { OPTIONS = 5 } + } + + option = { # Special governor trait option + name = governor_contract_event.2081.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:magnate = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -20 + } + } + scope:ongoing_contract = { + complete_task_contract = land_reinstate + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2081.b + trigger = { exists = scope:governance_option_b } + scope:magnate = { + add_opinion = { + target = root + modifier = disrespect_opinion + opinion = -20 + } + } + scope:ongoing_contract = { + complete_task_contract = land_confiscate + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2081.c + trigger = { exists = scope:governance_option_c } + scope:magnate = { + pay_short_term_gold = { + target = root + gold = medium_gold_value + } + } + scope:ongoing_contract = { + complete_task_contract = land_bribe + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.5 + ai_honor = -0.5 + } + } + } + option = { + name = governor_contract_event.2081.d + trigger = { exists = scope:governance_option_d } + add_hook = { + target = scope:magnate + type = favor_hook + } + scope:ongoing_contract = { + complete_task_contract = land_favor + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = 0.5 + } + } + } + option = { + name = governor_contract_event.2081.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = land_people + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### The Mad Prophet +# Intro event +governor_contract_event.2090 = { + type = character_event + title = governor_contract_event.2090.t + desc = governor_contract_event.2090.desc + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = mad_prophet + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + } + + option = { + name = governor_contract_event.2090.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2091 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2091 = { + type = character_event + title = governor_contract_event.2090.t + desc = governor_contract_event.2091.desc + theme = administrative + override_background = { + trigger = { + location.county.culture = { + OR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + location.barony.holder = { + NOT = { government_has_flag = government_is_tribal } + } + } + reference = ep3_city_gate + } + override_background = { + trigger = { + OR = { + location.county.culture = { + NOR = { + has_graphical_mediterranean_culture_group_trigger = yes + has_graphical_mena_culture_group_trigger = yes + has_graphical_african_culture_group_trigger = yes + } + } + location.barony.holder = { + government_has_flag = government_is_tribal + } + } + } + reference = market + } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:prophet + animation = rage + outfit_tags = { beggar_rags } + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = mad_prophet + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + + random_pool_character = { + province = root.location + limit = { + is_adult = yes + has_trait = zealous + learning >= 12 + faith = scope:ongoing_destination.county.faith + } + save_scope_as = prophet + } + if = { + limit = { + NOT = { exists = scope:prophet } + } + create_character = { + location = root.location + template = local_saint_template + faith = root.location.faith + culture = root.location.culture + save_scope_as = prophet + after_creation = { + add_character_flag = created + } + } + } + hidden_effect = { + scope:prophet = { + give_nickname = nick_the_prophet + add_trait = eccentric + } + } + + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.2091.a + flavor = governor_contract_event.2091.a.tt + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = prophet_reassure + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2091.b + trigger = { exists = scope:governance_option_b } + duel = { + skill = martial + value = decent_skill_rating + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2091_duel + value = flag:prophet_persecute + } + trigger_event = governor_contract_event.2092 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = prophet_persecute + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2091_duel + value = flag:prophet_persecute + } + trigger_event = governor_contract_event.2093 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + option = { + name = governor_contract_event.2091.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = prophet_arrest + } + rightfully_imprison_character_less_verbose_effect = { + TARGET = scope:prophet + IMPRISONER = root + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = 0.5 + } + } + } + option = { + name = governor_contract_event.2091.d + trigger = { exists = scope:governance_option_d } + duel = { + skill = learning + target = scope:prophet + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2091_duel + value = flag:prophet_debate + } + trigger_event = governor_contract_event.2092 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = prophet_debate + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + save_scope_value_as = { + name = governor_contract_event_2091_duel + value = flag:prophet_debate + } + trigger_event = governor_contract_event.2093 + show_as_tooltip = { + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + option = { + name = governor_contract_event.2091.e + flavor = governor_contract_event.2091.e.tt + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = prophet_ceremonies + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + } + } + } + option = { + name = governor_contract_event.2091.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = prophet_clergy + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_energy = -0.5 + } + } + } + after = { + hidden_effect = { + if = { + limit = { + NOT = { + exists = scope:governor_contract_event_2091_duel + } + } + current_travel_plan ?= { resume_travel_plan = yes } + } + } + scope:prophet = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +#Success +governor_contract_event.2092 = { + type = character_event + title = governor_contract_event.2090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:governor_contract_event_2091_duel ?= flag:prophet_persecute + } + desc = governor_contract_event.2092.desc_persecute + } + desc = governor_contract_event.2092.desc_debate + } + } + theme = administrative + override_background = { reference = market } + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:prophet + animation = war_over_loss + outfit_tags = { beggar_rags } + } + + option = { + name = governor_contract_event.2092.a + scope:ongoing_contract = { + if = { + limit = { + scope:governor_contract_event_2091_duel ?= flag:prophet_persecute + } + complete_task_contract = prophet_persecute + } + else_if = { + limit = { + scope:governor_contract_event_2091_duel ?= flag:prophet_debate + } + complete_task_contract = prophet_debate + } + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +#Failure +governor_contract_event.2093 = { + type = character_event + title = governor_contract_event.2090.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:governor_contract_event_2091_duel ?= flag:prophet_persecute + } + desc = governor_contract_event.2093.desc_persecute + } + desc = governor_contract_event.2093.desc_debate + } + } + theme = administrative + override_background = { reference = market } + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:prophet + animation = personality_bold + outfit_tags = { beggar_rags } + } + + option = { + name = governor_contract_event.2093.a + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + } + + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + } + } +} + +### Titles for Sale +# Intro event +governor_contract_event.2100 = { + type = character_event + title = governor_contract_event.2100.t + desc = governor_contract_event.2100.desc + theme = administrative + override_background = { reference = holy_site_generic } + left_portrait = { + character = root + triggered_animation = { + trigger = { OR = { faith.religion = religion:eastern_orthodox_religion faith.religion = religion:catholic_religion faith.religion = religion:protestant_religion } } + animation = emotion_thinking_scepter + } + animation = thinking + } + right_portrait = { + character = scope:priest + animation = sadness + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = titles_sale + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + random_pool_character = { + province = root.location + limit = { + is_adult = yes + learning >= 10 + intrigue >= 10 + NOR = { + has_trait = honest + has_trait = generous + has_trait = zealous + } + faith = root.faith + trigger_if = { + limit = { faith = { has_doctrine_parameter = clergy_must_be_male } } + is_female = no + } + trigger_else_if = { + limit = { faith = { has_doctrine_parameter = clergy_must_be_female } } + is_female = yes + } + trigger_else = { always = yes } + } + save_scope_as = priest + add_character_flag = need_priest_outfit + } + if = { + limit = { + NOT = { exists = scope:priest } + } + create_character = { + location = root.location + template = priest_character_template + save_scope_as = priest + } + scope:priest = { add_character_flag = created } + } + generate_governance_outcome_effect = { OPTIONS = 4 } + } + + option = { # Special governor trait option + name = governor_contract_event.2100.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = titles_repay + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2100.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = titles_commandeer + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + option = { + name = governor_contract_event.2100.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = titles_back + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + option = { + name = governor_contract_event.2100.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = titles_bribe + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -1 + } + } + } + after = { + if = { + limit = { + is_ai = yes + scope:priest = { has_character_flag = created } + } + scope:priest = { silent_disappearance_effect = yes } + } + } +} + +### Hungry Times +# Intro event +governor_contract_event.2110 = { + type = character_event + title = governor_contract_event.2110.t + desc = { + desc = governor_contract_event.2110.desc + first_valid = { + triggered_desc = { + trigger = { + any_character_active_contract = { + task_contract_type = hungry_times + task_contract_tier >= define:NTaskContract|HIGH_TASK_CONTRACT_TIER + } + } + desc = governor_contract_event.2110.desc_murder + } + triggered_desc = { + trigger = { + any_character_active_contract = { + task_contract_type = hungry_times + task_contract_tier = define:NTaskContract|MEDIUM_TASK_CONTRACT_TIER + } + } + desc = governor_contract_event.2110.desc_cannibal + } + desc = governor_contract_event.2110.desc_animal + } + } + theme = administrative + override_background = { reference = study } + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = hungry_times + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + } + + option = { + name = governor_contract_event.2110.a + custom_tooltip = governor_contract_event.2030.a.tt + governor_contract_travel_or_progress_effect = { + DESTINATION = scope:ongoing_destination + ARRIVAL_EVENT = governor_contract_event.2111 + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + is_available = no + } + modifier = { + factor = 0.5 + has_trait = lazy + } + } + } + + option = { + name = governor_contract_event.1030.b + scope:ongoing_contract = { + complete_task_contract = failure_standard + } + + ai_chance = { + base = 0 + + modifier = { + add = 100 + is_available = no + } + modifier = { + add = 100 + has_trait = lazy + } + } + } +} + +# Arrival at the place +governor_contract_event.2111 = { + type = character_event + title = governor_contract_event.2110.t + desc = governor_contract_event.2111.desc + theme = administrative + override_background = { reference = market } + left_portrait = { + character = root + animation = disgust + } + right_portrait = { + character = scope:cannibal + animation = prisondungeon + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = hungry_times + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + + hidden_effect = { + current_travel_plan ?= { pause_travel_plan = yes } + } + + random_pool_character = { + province = root.location + limit = { + is_adult = yes + culture = scope:ongoing_destination.county.culture + faith = scope:ongoing_destination.county.faith + has_dynasty = no + } + save_scope_as = cannibal + add_character_flag = peasant_outfit + } + if = { + limit = { + NOT = { exists = scope:cannibal } + } + create_character = { + location = root.location + template = generic_peasant_character + save_scope_as = cannibal + } + scope:cannibal = { add_character_flag = created } + } + + generate_governance_outcome_effect = { OPTIONS = 5 } + } + + option = { # Special governor trait option + name = governor_contract_event.2111.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = hungry_support + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2111.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = hungry_amnesty + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 1 + } + } + } + option = { + name = governor_contract_event.2111.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = hungry_punish + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + option = { + name = governor_contract_event.2111.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = hungry_persecute + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + } + } + } + option = { + name = governor_contract_event.2111.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = hungry_control + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 1 + } + } + } + after = { + hidden_effect = { + current_travel_plan ?= { resume_travel_plan = yes } + scope:cannibal = { + if = { + limit = { + has_character_flag = created + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +### Wartime Measures +# Intro event +governor_contract_event.2120 = { + type = character_event + title = governor_contract_event.2120.t + desc = governor_contract_event.2120.desc + theme = administrative + left_portrait = { + character = root + animation = reading + } + + immediate = { + # Save the contract + random_character_active_contract = { + task_contract_type = wartime_measures + save_scope_as = ongoing_contract + + # Save the location + task_contract_location = { + save_scope_as = ongoing_destination + } + } + generate_governance_outcome_effect = { OPTIONS = 6 } + } + + option = { # Special governor trait option + name = governor_contract_event.2120.a + trigger = { + has_trait = governor # To show that the trait unlocks the option + exists = scope:governance_option_a + } + scope:ongoing_contract = { + complete_task_contract = wartime_support + } + ai_chance = { + base = 200 + } + } + option = { + name = governor_contract_event.2120.b + trigger = { exists = scope:governance_option_b } + scope:ongoing_contract = { + complete_task_contract = wartime_supplies + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_energy = 0.5 + } + } + } + option = { + name = governor_contract_event.2120.c + trigger = { exists = scope:governance_option_c } + scope:ongoing_contract = { + complete_task_contract = wartime_lodgings + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_honor = 0.5 + } + } + } + option = { + name = governor_contract_event.2120.d + trigger = { exists = scope:governance_option_d } + scope:ongoing_contract = { + complete_task_contract = wartime_gold + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + modifier = { + gold <= major_gold_value + factor = 0 + } + } + } + option = { + name = governor_contract_event.2120.e + trigger = { exists = scope:governance_option_e } + scope:ongoing_contract = { + complete_task_contract = wartime_lookouts + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + ai_boldness = -0.5 + } + modifier = { + gold <= medium_gold_value + factor = 0 + } + } + } + option = { + name = governor_contract_event.2120.f + trigger = { exists = scope:governance_option_f } + scope:ongoing_contract = { + complete_task_contract = wartime_compensations + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } +} diff --git a/N3OW/events/scheme_events/mandala_schemes/disbelieve_mandala_scheme_events.txt b/N3OW/events/scheme_events/mandala_schemes/disbelieve_mandala_scheme_events.txt new file mode 100644 index 00000000..aed823d4 --- /dev/null +++ b/N3OW/events/scheme_events/mandala_schemes/disbelieve_mandala_scheme_events.txt @@ -0,0 +1,319 @@ +namespace = disbelieve_mandala_ongoing + +######################################### +# disbelieve_mandala_ongoing.0001 - Agents spread rumours about target's miracles being tricks +# disbelieve_mandala_ongoing.0010 - Plant a fake relic on your target's court +######################################### + +# Agents spread rumours about target's miracles being tricks +disbelieve_mandala_ongoing.0001 = { + type = character_event + title = disbelieve_mandala_ongoing.0001.t + desc = disbelieve_mandala_ongoing.0001.desc + + theme = intrigue + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = frontend_left_idle + } + right_portrait = { + character = scope:agent + animation = scheme + camera = camera_event_right_pointing_right_scheme + } + lower_right_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + trigger = { + is_available_adult = yes + any_scheme = { + type = disbelieve_mandala + any_scheme_agent_character = { is_available_ai_adult = yes } + } + } + + immediate = { + random_scheme = { + type = disbelieve_mandala + save_scope_as = my_scheme + random_scheme_agent_character = { + limit = { is_available_ai_adult = yes } + weight = { + base = 1 + modifier = { add = intrigue } + } + save_scope_as = agent + } + scheme_target_character = { save_scope_as = target } + } + } + + # People believe it + option = { + name = disbelieve_mandala_ongoing.0001.a + scope:agent = { + duel = { + skills = { learning intrigue } + value = decent_skill_rating + 25 = { + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0001.a.crit_success + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0001.a.crit_success + left_icon = scope:agent + right_icon = scope:target + add_piety = medium_piety_gain + scope:my_scheme = { + add_scheme_modifier = { + type = scheme_fake_miracles + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0001.a.success + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0001.a.success + left_icon = scope:agent + right_icon = scope:target + scope:my_scheme = { + add_scheme_modifier = { + type = scheme_fake_miracles + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0001.a.failure + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0001.a.failure + left_icon = scope:agent + right_icon = scope:target + if = { + limit = { + scope:my_scheme = { + NOT = { scheme_breaches >= scheme_breaches_about_to_hit_limit_value } + } + } + custom_tooltip = { + text = disbelieve_mandala_ongoing.0001.a.failure.breach + scope:my_scheme = { add_scheme_breach = 1 } + } + } + else = { add_piety = medium_piety_loss } + play_sound_effect = "event:/DLC/EP3/SFX/Stingers/Scheme_Rework/ep3_mx_sting_schemerework_scheme_suffering_breaches" + } + } + } + } + } + stress_impact = { + arrogant = minor_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = arrogant + scope:agent.learning >= high_skill_rating + scope:agent.intrigue >= high_skill_rating + } + } + } + } + + # Don't take the risk + option = { + name = disbelieve_mandala_ongoing.0001.b + stress_impact = { + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + } + } +} + +# Plant a fake relic on your target's court +disbelieve_mandala_ongoing.0010 = { + type = character_event + title = disbelieve_mandala_ongoing.0010.t + desc = disbelieve_mandala_ongoing.0010.desc + + theme = intrigue + override_background = { reference = study } + cooldown = { years = 5 } + + left_portrait = { + character = root + animation = interested + } + right_portrait = { + character = scope:spymaster + animation = schadenfreude + } + lower_right_portrait = scope:target + artifact = { + position = lower_left_portrait + target = scope:fake_relic + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + trigger = { + is_available_adult = yes + exists = cp:councillor_spymaster + } + + immediate = { + random_scheme = { + type = disbelieve_mandala + save_scope_as = my_scheme + scheme_target_character = { save_scope_as = target } + } + cp:councillor_spymaster = { + assign_quirk_effect = yes + save_scope_as = spymaster + hidden_effect = { + if = { + limit = { OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } } + create_artifact_pedestal_reliquary_christian_effect = { OWNER = scope:spymaster } + } + else_if = { + limit = { religion = religion:islam_religion } + create_artifact_pedestal_reliquary_islam_effect = { OWNER = scope:spymaster } + } + else_if = { + limit = { religion = religion:buddhism_religion } + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = scope:spymaster } + } + else_if = { + limit = { religion = religion:judaism_religion } + create_artifact_pedestal_reliquary_judaism_effect = { OWNER = scope:spymaster } + } + else = { + create_artifact_sculpture_religious_effect = { OWNER = scope:spymaster } + } + scope:newly_created_artifact = { save_scope_as = fake_relic } + } + } + } + + # Do it! + option = { + name = disbelieve_mandala_ongoing.0010.a + scope:spymaster = { + duel = { + skills = { diplomacy intrigue } + value = decent_skill_rating + 60 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0010.a.success + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0010.a.success + left_icon = scope:spymaster + right_icon = scope:target + scope:target = { add_piety = medium_piety_loss } + scope:my_scheme = { + add_scheme_progress = 60 + } + } + } + } + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = disbelieve_mandala_ongoing.0010.a.failure + root = { + send_interface_toast = { + title = disbelieve_mandala_ongoing.0010.a.failure + left_icon = scope:spymaster + right_icon = scope:target + scope:target = { + progress_towards_rival_effect = { + CHARACTER = root + OPINION = -40 + REASON = rival_planted_fake_artifact + } + } + } + } + } + } + } + stress_impact = { + deceitful = minor_stress_impact_loss + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = deceitful + scope:agent.diplomacy >= high_skill_rating + scope:agent.intrigue >= high_skill_rating + } + } + modifier = { + factor = 0 + has_trait = honest + } + } + } + + # Nah + option = { + name = disbelieve_mandala_ongoing.0010.b + stress_impact = { + honest = minor_stress_impact_loss + deceitful = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = deceitful + } + modifier = { + factor = 2 + has_trait = honest + } + } + } +} \ No newline at end of file diff --git a/N3OW/events/scheme_events/sway_scheme/sway_outcome_events.txt b/N3OW/events/scheme_events/sway_scheme/sway_outcome_events.txt new file mode 100644 index 00000000..92f5f051 --- /dev/null +++ b/N3OW/events/scheme_events/sway_scheme/sway_outcome_events.txt @@ -0,0 +1,979 @@ +#Events handling Sway outcomes + +namespace = sway_outcome + +#Note: Outcome events for the Sway scheme are unusual. The default is simply a notification for success or failure + +################################ +# Standard outcomes +# 0000-0999 +################################ + +#Standard success + #by Petter Vilberg +sway_outcome.0001 = { + hidden = yes + + immediate = { + send_interface_message = { + type = sway_good_message + title = sway_sway_success_message + left_icon = scope:target + scope:target = { + if = { + limit = { + is_alive = yes + scope:owner = { is_alive = yes } + } + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = sway_opinion_increase_per_success + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = sway_opinion_increase_per_success + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + } + sway_end_effect = yes + } + } +} + +#Standard failure + #by Petter Vilberg +sway_outcome.0002 = { + hidden = yes + + immediate = { + send_interface_message = { + type = sway_bad_message + title = sway_sway_failed_message + left_icon = scope:target + stress_impact = { + gregarious = minor_stress_impact_gain + } + sway_end_effect = yes + } + } +} + + +################################# +# Positive Outcomes +# 1000-1999 +################################# + +#Diplomacy Duel to get an extra bonus + #by Petter Vilberg +sway_outcome.1001 = { + type = character_event + title = sway_outcome.1001.t + desc = sway_outcome.1001.desc + theme = sway_scheme + left_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { is_travelling_not_at_activity = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling_at_activity = yes } + reference = ep2_activity + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_1001 + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_1001 + years = 5 + } + } + + option = { + name = sway_outcome.1001.a + duel = { + target = scope:target + skill = diplomacy + + 20 = { + compare_modifier = { + value = scope:duel_value + } + desc = sway_outcome.1001.a.success + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1001.a.success + + add_prestige = minor_prestige_gain + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 50 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 50 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = sway_outcome.1001.a.failure + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1001.a.failure + + add_prestige = minor_prestige_loss + } + } + } + sway_end_effect = yes + } + + option = { + name = sway_outcome.1001.b + scope:target = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 30 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + sway_end_effect = yes + } +} + +#Learning Duel to get an extra bonus + #by Petter Vilberg +sway_outcome.1002 = { + type = character_event + title = sway_outcome.1002.t + desc = { + first_valid = { + triggered_desc = { + trigger = { faith = scope:target.faith } + desc = sway_outcome.1002.same_faith + } + desc = sway_outcome.1002.other_faith + } + } + theme = sway_scheme + left_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { scope:target = { is_travelling = yes } } + reference = terrain_travel + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_1002 + } + } + + weight_multiplier = { + base = 0 + compare_modifier = { + value = learning + multiplier = 0.1 + } + modifier = { + add = 2 + scope:target = { + is_landed = yes + government_has_flag = government_is_theocracy + } + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_1002 + years = 5 + } + } + + option = { + name = sway_outcome.1002.a + duel = { + target = scope:target + skill = learning + + 20 = { + compare_modifier = { + value = scope:duel_value + min = -18 + max = 20 + } + desc = sway_outcome.1001.a.success + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1001.a.success + + add_prestige = minor_prestige_gain + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 50 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 50 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + min = -18 + max = 20 + } + desc = sway_outcome.1001.a.failure + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1001.a.failure + + add_prestige = minor_prestige_loss + } + } + } + sway_end_effect = yes + } + + option = { + name = sway_outcome.1002.b + scope:target = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 30 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + sway_end_effect = yes + } +} + + +#They're warming up to me, can I take it further? + #by Linnéa Thimrén +sway_outcome.1003 = { + type = character_event + title = sway_outcome.1003.t + desc = sway_outcome.1003.desc + theme = sway_scheme + left_portrait = scope:target + right_portrait = scope:friend + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { is_travelling_not_at_activity = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling_at_activity = yes } + reference = ep2_activity + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_1003 + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_1003 + years = 5 + } + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 30 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 30 + } + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + if = { + limit = { + any_relation = { + type = friend + diplomacy > root.diplomacy + } + } + random_relation = { + type = friend + limit = { + diplomacy > root.diplomacy + } + save_scope_as = friend + } + } + } + + option = { #Gamble! + name = sway_outcome.1003.a + duel = { + target = scope:target + skill = diplomacy + + 30 = { + compare_modifier = { + value = scope:duel_value + } + desc = sway_outcome.1003.a.success + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1003.a.success + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 20 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 20 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = sway_outcome.1003.a.failure + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1003.a.failure + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = -10 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = -10 + } + } + } + } + } + } + } + + option = { #Gamble! Friend helps you out! + name = sway_outcome.1003.a_friend + trigger = { + exists = scope:friend + } + scope:friend = { + duel = { + target = scope:target + skill = diplomacy + + 40 = { + compare_modifier = { + value = scope:duel_value + } + desc = sway_outcome.1003.a.success + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1003.a.success + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = 15 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 15 + } + } + } + } + } + 20 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + desc = sway_outcome.1003.a.failure + send_interface_toast = { + left_icon = scope:target + title = sway_outcome.1003.a.failure + + scope:target = { + if = { + limit = { + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_vassals_removes_disloyalty + } + } + add_opinion = { + target = scope:owner + modifier = scheme_sway_and_compelled_to_submit_opinion + opinion = -10 + } + } + else = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = -10 + } + } + } + } + } + } + } + } + + option = { #Safe route + name = sway_outcome.1003.b + + } + + after = { + sway_end_effect = yes + } +} + +#A disloyal vassal can be compelled to reconsider during the Anarchy at Samarra Struggle + #by Ola Jentzsch + +sway_outcome.1004 = { + type = character_event + title = sway_outcome.1004.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:target = { + ai_vengefulness >= medium_positive_ai_value + } + } + desc = sway_outcome_grudgingly.1004.desc + } + random_valid = { + desc = sway_outcome_magnanimity.1004.desc + desc = sway_outcome_blessed.1004.desc + triggered_desc = { + trigger = { + scope:target = { + NOR = { + has_trait = stubborn + has_trait = arrogant + has_trait = august + has_trait = callous + } + } + } + desc = sway_outcome_flattery.1004.desc + } + triggered_desc = { + trigger = { + AND = { + scope:target = { + AND = { + OR = { + has_religion = religion:buddhism_religion + has_religion = religion:jainism_religion + has_religion = religion:hinduism_religion + } + ai_zeal >= low_positive_ai_value + } + } + scope:owner = { + OR = { + has_religion = religion:buddhism_religion + has_religion = religion:jainism_religion + has_religion = religion:hinduism_religion + } + } + } + } + desc = sway_outcome_dharmic.1004.desc + } + triggered_desc = { + trigger = { + scope:target = { + has_religion = religion:islam_religion + ai_zeal >= low_positive_ai_value + exists = faith.religious_head + faith.religious_head = { this = root } + } + } + desc = sway_outcome_caliph.1004.desc + } + } + } + } + theme = sway_scheme + left_portrait = { + character = scope:owner + triggered_animation = { + trigger = { + has_trait = callous + has_trait = vengeful + has_trait = sadistic + } + animation = personality_callous + } + animation = personality_bold + } + right_portrait = { + character = scope:target + animation = throne_room_bow_1 + } + + trigger = { + + any_character_struggle = { + is_struggle_type = persian_struggle + has_struggle_phase_parameter = fp3_sway_scheme_more_powerful + } + + scope:target = { + AND = { + is_vassal_of = scope:owner + has_trait = disloyal + } + NOT = { + has_relation_rival = scope:owner + } + } + } + + weight_multiplier = { #more likely to trigger if the target likes you, or has a flexible personality + base = 1 + modifier = { + add = 0.5 + scope:target = { has_trait = fickle } #They're flexible + } + modifier = { + add = 0.5 + scope:target = { has_trait = trusting } #They trust you + } + modifier = { + add = -0.7 + scope:target = { has_trait = stubborn } #They are not prone to change their ways + } + modifier = { + add = -0.3 + scope:target = { has_trait = vengeful } #They are not soon to forgive slights, real or imagined + } + } + + immediate = { + + scope:target = { + add_opinion = { + target = scope:owner + modifier = scheme_sway_opinion + opinion = 20 + } + remove_trait = disloyal + } + scope:owner = { + if = { + limit = { + faith = { has_doctrine_parameter = sway_scheme_piety } + OR = { + liege ?= scope:target + target_is_vassal_or_below = scope:target + } + } + add_piety = minor_piety_gain + } + } + } + + option = { + name = sway_outcome.1004.a + + trigger = { + OR = { + has_trait = vengeful + has_trait = arrogant + has_trait = paranoid + } + } + + scope:scheme = { + end_scheme = yes + } + } + + option = { + name = sway_outcome.1004.b + + trigger = { + NOR = { + has_trait = vengeful + has_trait = arrogant + has_trait = paranoid + } + } + + scope:scheme = { + end_scheme = yes + } + } +} + + +################################# +# Negative Outcomes +# 2000-2999 +################################# + +#Diplomatic misunderstanding + #by Petter Vilberg +sway_outcome.2001 = { + type = character_event + title = sway_outcome.2001.t + desc = { + desc = sway_outcome.2001.opening + first_valid = { + triggered_desc = { + trigger = { + scope:target = { + OR = { + is_of_major_interest_to_root_trigger = yes + is_of_minor_interest_to_root_trigger = yes + } + NOT = { + has_relation_rival = root + } + } + } + desc = sway_outcome.2001.not_interested_relation + } + triggered_desc = { + trigger = { + scope:target = { + possibly_interested_in_character_trigger = { + CHARACTER = root + } + } + } + desc = sway_outcome.2001.not_interested_romantically + } + random_valid = { + desc = sway_outcome.2001.not_interested_horses + desc = sway_outcome.2001.not_interested_toll_exemptions + desc = sway_outcome.2001.not_interested_friend + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + OR = { scope:target.religion = religion:eastern_orthodox_religion scope:target.religion = religion:catholic_religion scope:target.religion = religion:protestant_religion } + } + desc = sway_outcome.2001.not_interested_relics + } + } + } + desc = sway_outcome.2001.end + } + theme = sway_scheme + left_portrait = { + character = scope:target + animation = eyeroll + } + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { is_travelling_not_at_activity = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling_at_activity = yes } + reference = ep2_activity + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_2001 + } + NOR = { + has_relation_lover = scope:target + has_relation_friend = scope:target + any_consort = { + this = scope:target + } + betrothed ?= scope:target + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_2001 + years = 5 + } + } + + option = { + name = sway_outcome.2001.a + scope:target = { + add_opinion = { + target = scope:owner + modifier = sway_blocker_opinion + opinion = -10 + } + } + scope:scheme = { + end_scheme = yes + } + } +} + + +#They think you're plotting against them + #by Linnéa Thimrén +sway_outcome.2002 = { + type = character_event + title = sway_outcome.2002.t + desc = sway_outcome.2002.desc + theme = sway_scheme + left_portrait = scope:target + widget = { + gui = "event_window_widget_scheme" + container = "custom_widgets_container" + } + + override_background = { + trigger = { is_travelling_not_at_activity = yes } + reference = terrain_travel + } + override_background = { + trigger = { is_travelling_at_activity = yes } + reference = ep2_activity + } + + trigger = { + NOT = { + has_character_flag = had_event_sway_outcome_2002 + } + } + + weight_multiplier = { + base = 0.75 + modifier = { + add = 0.75 + has_trait = paranoid + } + } + + immediate = { + add_character_flag = { + flag = had_event_sway_outcome_2002 + years = 5 + } + } + + option = { + name = sway_outcome.2002.a + scope:target = { + add_opinion = { + target = scope:owner + modifier = sway_blocker_opinion + opinion = -10 + } + add_character_modifier = { + modifier = more_vigilant_recistance_modifier + years = 5 + } + } + scope:scheme = { + end_scheme = yes + } + } +} diff --git a/N3OW/events/secret_faith_events.txt b/N3OW/events/secret_faith_events.txt new file mode 100644 index 00000000..690dc39d --- /dev/null +++ b/N3OW/events/secret_faith_events.txt @@ -0,0 +1,246 @@ +################ +# SECRET FAITH EVENTS # +################ + +namespace = secret_faith + +#secret_faith.1001-1999 - Guardian converts ward + +########################## +# GUARDIAN CONVERTS WARD # +########################## + +secret_faith.1001 = { + hidden = yes + + trigger = { + any_relation = { + type = guardian + exists = secret_faith + save_temporary_scope_as = guardian + } + NOR = { + exists = secret_faith + faith = scope:guardian.secret_faith + } + } + + immediate = { + save_scope_as = child + #If guardian and child is AI, immediately convert them + if = { + limit = { + is_ai = yes + any_relation = { + type = guardian + is_ai = yes + has_trait = zealous + } + } + random_relation = { + type = guardian + save_scope_as = guardian + } + child_secret_faith_conversion_success_effect = yes + } + else = { + random_relation = { + type = guardian + trigger_event = secret_faith.1002 + } + } + } +} + +scripted_trigger secret_faith_1002_allow_reveal_outcome_trigger = { + exists = scope:child.liege + scope:guardian = { + this != scope:child.liege + any_secret = { + type = secret_crypto_religionist + OR = { + NOT = { is_known_by = scope:child } + NOT = { is_known_by = scope:child.liege } + } + } + } +} + +#Guardian: convert this child? +secret_faith.1002 = { + type = character_event + title = secret_faith.1002.t + desc = secret_faith.1002.desc + theme = education + left_portrait = scope:child + + #So that we don't abandon our secret_faith inbetween the hidden event and this event triggering + trigger = { + exists = secret_faith + scope:child = { + NOR = { + exists = secret_faith + faith = root.secret_faith + } + } + } + + immediate = { save_scope_as = guardian } + + #Convert them + option = { + name = secret_faith.1002.a + + #Duel if child is AI + if = { + limit = { scope:child = { is_ai = yes } } + duel = { + skill = learning + target = scope:child + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + opinion_modifier = { + who = scope:child + opinion_target = scope:guardian + multiplier = 0.25 + step = 5 + } + modifier = { + scope:child = { has_trait = ambitious } + add = 20 + } + modifier = { + scope:child = { has_trait = curious } + add = 20 + } + desc = child_secret_faith_conversion_success_effect.desc + child_secret_faith_conversion_success_effect = yes + } + 35 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + opinion_modifier = { + who = scope:child + opinion_target = scope:guardian + multiplier = -0.25 + step = 5 + } + modifier = { + scope:child = { has_trait = craven } + add = 30 + } + desc = child_secret_faith_conversion_failure_effect.desc + child_secret_faith_conversion_failure_effect = yes + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + opinion_modifier = { + who = scope:child + opinion_target = scope:guardian + multiplier = -0.25 + step = 5 + } + modifier = { + scope:child = { has_trait = zealous } + add = 150 + } + trigger = { + secret_faith_1002_allow_reveal_outcome_trigger = yes + } + desc = child_secret_faith_conversion_critical_failure_effect.desc + child_secret_faith_conversion_critical_failure_effect = yes + } + } + } + else = { + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = child_secret_faith_conversion_success_effect.desc + child_secret_faith_conversion_success_effect = yes + } + 1 = { + show_chance = no + desc = child_secret_faith_conversion_failure_effect.desc + child_secret_faith_conversion_failure_effect = yes + } + 1 = { + show_chance = no + trigger = { + secret_faith_1002_allow_reveal_outcome_trigger = yes + } + desc = child_secret_faith_conversion_critical_failure_effect.desc + child_secret_faith_conversion_critical_failure_effect = yes + } + } + } + + scope:child = { + trigger_event = secret_faith.1003 + } + } + + ai_chance = { + base = 100 + + ai_boldness_target_modifier = { VALUE = 50 } + } + } + + #Don't risk it + option = { + name = secret_faith.1002.b + + ai_chance = { + base = 0 + + ai_boldness_target_modifier = { VALUE = -100 } + } + } +} + +secret_faith.1003 = { + type = character_event + title = secret_faith.1003.t + desc = secret_faith.1003.desc + theme = education + left_portrait = { + character = scope:guardian + animation = personality_dishonorable + } + + + + #Yes + option = { + name = secret_faith.1003.a + + child_secret_faith_conversion_success_effect = yes + } + + #No... + option = { + name = secret_faith.1003.b + + child_secret_faith_conversion_failure_effect = yes + } + + #I will tell someone! + option = { + trigger = { + secret_faith_1002_allow_reveal_outcome_trigger = yes + } + name = secret_faith.1003.c + + child_secret_faith_conversion_critical_failure_effect = yes + } +} diff --git a/N3OW/events/siege_events.txt b/N3OW/events/siege_events.txt new file mode 100644 index 00000000..8b1c74ee --- /dev/null +++ b/N3OW/events/siege_events.txt @@ -0,0 +1,1368 @@ +#Events for sieges + +namespace = siege + +#0001-0999: Capturing prisoners, by Mathilda Bjarnehed and Sean Hughes +#5001-5999: Assorted events + +######################################### +# CAPTURING PRISONERS # +# 0001-0999 # +# by Mathilda Bjarnehed and Sean Hughes # +######################################### + +#On county capture (all provinces taken), calculate capture using desirable_for_capture_trigger. + +scripted_trigger siege_0001_can_be_captured = { + # Captured characters must be located in the raided barony itself. + location = scope:barony.title_province + + # Reasons to exclude characters from the capture pool: + NOR = { + # If the raiders have defeated the holder's army, but the army has not yet retreated to a different province, shield them from capture by the raid. + exists = commanding_army + exists = knight_army + + # Is imprisoned in the barony stay prisoners (special case, any courtiers/vassals of the raider will get released elsewhere). + is_imprisoned = yes + } +} + +scripted_trigger siege_0001_valid_domicile_trigger = { + OR = { + is_domicile_type = estate + is_domicile_type = japanese_manor + is_domicile_type = east_asian_estate + } + owner = { save_temporary_scope_as = estate_owner_check } + scope:occupant = { + OR = { + any_war_enemy = { this = scope:estate_owner_check } + any_war_enemy = { any_vassal_or_below = { this = scope:estate_owner_check } } + } + } +} + +# Prisoner capture/kill logic, by Mathilda Bjarnehed +siege.0001 = { + hidden = yes + + trigger = { + OR = { + AND = { + scope:county.holder = scope:previous_controller + OR = { + any_war_enemy = { this = scope:previous_controller } + any_war_enemy = { any_vassal_or_below = { this = scope:previous_controller } } + } + } + AND = { + scope:barony.title_province = { + any_province_domicile = { + is_domicile_type = estate + owner = { + save_temporary_scope_as = estate_owner_check + } + } + } + OR = { + any_war_enemy = { this = scope:estate_owner_check } + any_war_enemy = { any_vassal_or_below = { this = scope:estate_owner_check } } + } + } + } + } + + immediate = { + save_scope_as = occupant + scope:barony.holder = { save_scope_as = holder } + scope:barony.title_province = { + random_province_domicile = { + limit = { + siege_0001_valid_domicile_trigger = yes + } + owner ?= { + save_scope_as = estate_owner + } + } + } + + # Depending on if the occupier is an attacker or defender in this war, get the primary attacker/defender of the siege. + scope:war = { + if = { + limit = { + is_attacker = scope:occupant + } + # If occupier is an attacker, the war's primary attacker is also the primary attacker in this siege (the attackers have occupied one of the defender's provinces). + primary_attacker = { + save_scope_as = primary_siege_attacker + } + primary_defender = { + save_scope_as = primary_siege_defender + } + } + else = { + # Otherwise the occupier is a defender, so the primary defender in the war is the primary attacker in the siege (the defenders have occupied one of the attacker's provinces). + primary_defender = { + save_scope_as = primary_siege_attacker + } + primary_attacker = { + save_scope_as = primary_siege_defender + } + } + } + + ###BUILD CAPTURE ATTEMPT LIST### + #Add capture targets from all occupied baronies if it is someone's capital + every_in_list = { + list = occupied_baronies + limit = { + exists = holder + save_temporary_scope_as = list_barony + holder = { capital_barony = { this = scope:list_barony } } + } + holder = { + if = { + limit = { siege_0001_can_be_captured = yes } + add_to_list = capture_attempt_targets + } + every_courtier_or_guest = { + limit = { siege_0001_can_be_captured = yes } + add_to_list = capture_attempt_targets + } + } + } + #Add capture targets from all hostile occupied Estates + every_in_list = { + list = occupied_baronies + limit = { + title_province = { + any_province_domicile = { + siege_0001_valid_domicile_trigger = yes + } + } + } + title_province = { + random_province_domicile = { + limit = { + siege_0001_valid_domicile_trigger = yes + } + owner ?= { + if = { + limit = { siege_0001_can_be_captured = yes } + add_to_list = capture_attempt_targets + } + every_courtier_or_guest = { + limit = { siege_0001_can_be_captured = yes } + add_to_list = capture_attempt_targets + } + } + } + } + } + + ###BUILD SUCCESSFUL CAPTURE LIST### + #Calculate capture success + every_in_list = { + list = capture_attempt_targets + random = { + # Base chance handled in a modifier due to the chance parameter tending to quietly fail to #parse scripted values. + chance = 0 + + # 35 becomes 20 for average intrigue and prowess, can go as low as 5 at very high intrigue and #prowess + modifier = { add = siege_base_capture_chance } + + # Capture Modifiers + compare_modifier = { #Adds -20 for 20 intrigue, adds -10 for 10 intrigue + #target = this + value = intrigue + multiplier = -1 + min = -20 + } + compare_modifier = { #Adds -10 for 20 prowess, -5 for 10 prowess + #target = this + value = prowess + multiplier = -0.5 + min = -15 + } + # Less likely to capture the estate owner themselves + modifier = { + scope:estate_owner ?= this + add = -10 + } + # If there is an estate, Watchtowers and Guardhouses make captures less likely + modifier = { + location = { + any_province_domicile = { + is_domicile_type = estate + has_domicile_parameter = raids_less_likely_to_make_prisoners_1 + } + } + add = -10 + } + modifier = { + location = { + any_province_domicile = { + is_domicile_type = estate + has_domicile_parameter = raids_less_likely_to_make_prisoners_2 + } + } + add = -15 + } + modifier = { + location = { + any_province_domicile = { + is_domicile_type = estate + has_domicile_parameter = raids_less_likely_to_make_prisoners_3 + } + } + add = -20 + } + + # Capture Effects + if = { + limit = { + desirable_for_capture_trigger = yes + NOT = { scope:occupant = { has_variable = rebel_leader_peasants }} + } + add_to_list = captured_targets_effects + } + else = { + add_to_list = killed_targets + } + } + } + + + ### SEND NOTIFICATIONS TO CONCERNED PARTIES ### + + + if = { + limit = { + any_in_list = { + list = captured_targets_effects + count >= 1 + } + } + # Send notification to the county occupier + root = { + trigger_event = siege.0002 + } + + #Send notification to holder (about captures and deaths) + scope:barony.holder = { + if = { + limit = { + save_temporary_scope_as = notification_target + any_in_list = { + list = captured_targets_effects + this != scope:notification_target + } + } + trigger_event = siege.0003 + } + } + scope:estate_owner ?= { + if = { + limit = { + save_temporary_scope_as = notification_target + any_in_list = { + list = captured_targets_effects + this != scope:notification_target + } + } + trigger_event = siege.0003 + } + } + + # Send a message to all other players who may be concerned about the fate of the captured prisoners. + every_player = { + limit = { + NOR = { + this = root + this = scope:barony.holder + } + trigger_if = { + limit = { exists = scope:estate_owner } + this != scope:estate_owner + } + save_temporary_scope_as = notification_target + any_in_list = { + list = captured_targets_effects + has_any_relation_trigger = { CHARACTER = scope:notification_target } + } + } + trigger_event = siege.0004 + } + } + + if = { + limit = { + any_in_list = { + list = killed_targets + count >= 1 + } + } + + #Send notification to holder (about deaths) + scope:barony.holder = { + trigger_event = siege.0013 + } + scope:estate_owner ?= { + trigger_event = siege.0013 + } + + # Send a message to all other players who may be concerned about the fate of the slain prisoners. + every_player = { + limit = { + NOR = { + this = root + this = scope:barony.holder + } + trigger_if = { + limit = { exists = scope:estate_owner } + this != scope:estate_owner + } + + save_temporary_scope_as = notification_target + any_in_list = { + list = killed_targets + has_any_relation_trigger = { CHARACTER = scope:notification_target } + } + } + trigger_event = siege.0014 + } + } + + ### IMPRISON AND KILL EFFECTS ### + every_in_list = { + list = captured_targets_effects + + # Since we sent custom imprisonment events, we want to block the default ones. + hidden_effect = { + add_character_flag = { + flag = block_imprisonment_event + days = 1 + } + } + + prisoner_of_war_capture_effect = { + TARGET = this + IMPRISONER = root + } + + ### IF NECESSARY, SEND TOASTS TO WAR LEADERS ### + + # Check if this prisoner is important enough (worth war score) that it is worth sending a toast about them in the first place. + if = { + limit = { + character_is_potential_valuable_prisoner = yes + } + save_scope_as = valuable_prisoner + + # The imprisoner must be informed that they captured an important hostage. + scope:occupant = { + trigger_event = siege.0005 + } + + # The losing primary participant must be informed that they will/have lost warscore because a hostage was captured. + if = { + limit = { + # But not if they themselves are the prisoner! (they will get an event already upon being imprisoned). + scope:valuable_prisoner != scope:primary_siege_defender + } + scope:primary_siege_defender = { + trigger_event = siege.0006 + } + } + + # If the primary siege attacker is different from the occupier, we also need to send a message to the siege attacker. + if = { + limit = { + scope:occupant != scope:primary_siege_attacker + } + scope:primary_siege_attacker = { + trigger_event = siege.0007 + } + } + } + } + every_in_list = { + list = killed_targets + + death = { + death_reason = death_siege + #killer = root + } + } + } +} + +# Notify county occupier of captured prisoners, by Mathilda Bjarnehed and Sean Hughes +siege.0002 = { + hidden = yes + + immediate = { + + # Initialize the variable we will use to keep track of how many relevant prisoners there are. + set_variable = { + name = num_other_relevant_captured_combatants + value = 0 + } + + # Re-order the combatant list based on who we care about the most. + ordered_in_list = { + list = captured_targets_effects + max = 99 + check_range_bounds = no + + order_by = { + value = captured_combatant_weights_for_root_participant + } + + # Add the prisoners to a new list tailored to be more relevant to this character. + add_to_list = captured_targets_occupant + root = { + change_variable = { + name = num_other_relevant_captured_combatants + add = 1 + } + } + + # The first two prisoners on this list (i.e., the most important people to us) should be have their individual scopes saved for use in portraits & localization. + if = { + limit = { + NOT = { exists = scope:prisoner_1 } + } + save_scope_as = prisoner_1 + } + else_if = { + limit = { + NOT = { exists = scope:prisoner_2 } + } + save_scope_as = prisoner_2 + } + } + + # Decrement the number of relevant captured combatants, to exclude the primary prisoner from the count (for localization). + change_variable = { + name = num_other_relevant_captured_combatants + add = -1 + } + + # Send a message telling us about the prisoners we have captured. + send_interface_message = { + type = event_captured_combatants_good + left_icon = scope:prisoner_1 + right_icon = scope:barony + title = { + first_valid = { + triggered_desc = { #There was only 1 + trigger = { + any_in_list = { + list = captured_targets_occupant + count = 1 + } + } + desc = siege.0002.one_captured.t + } + #There were several + desc = siege.0002.several_captured.t + } + } + desc = { + first_valid = { + triggered_desc = { #There was only 1 + trigger = { + any_in_list = { + list = captured_targets_occupant + count = 1 + } + } + desc = siege.0002.one_captured + } + triggered_desc = { #There was only 2 + trigger = { + any_in_list = { + list = captured_targets_occupant + count = 2 + } + } + desc = siege.0002.two_captured + } + #There were several + desc = siege.0002.several_captured + } + } + tooltip = event_message_effect + + show_as_tooltip = { + every_in_list = { + list = captured_targets_occupant + + save_temporary_scope_as = this_prisoner + root = { + imprison = { + target = scope:this_prisoner + type = house_arrest + } + } + } + } + } + + remove_variable = num_other_relevant_captured_combatants + } +} + +# Notify county holder of captured prisoners, by Mathilda Bjarnehed and Sean Hughes +siege.0003 = { + hidden = yes + + immediate = { + # Initialize the variable we will use to keep track of how many relevant prisoners there are. + set_variable = { + name = num_other_relevant_captured_combatants + value = 0 + } + + # Re-order the combatant list based on who we care about the most. + ordered_in_list = { + list = captured_targets_effects + max = 99 + check_range_bounds = no + + # Do not send a notification about ourselves. + limit = { + this != root + } + + order_by = { + value = captured_combatant_weights_for_root_participant + } + + # Add the prisoners to a new list tailored to be more relevant to this character. + add_to_list = captured_targets_holder + root = { + change_variable = { + name = num_other_relevant_captured_combatants + add = 1 + } + } + + # The first two prisoners on this list (i.e., the most important people to us) should be have their individual scopes saved for use in portraits & localization. + if = { + limit = { + NOT = { exists = scope:prisoner_1 } + } + save_scope_as = prisoner_1 + } + else_if = { + limit = { + NOT = { exists = scope:prisoner_2 } + } + save_scope_as = prisoner_2 + } + } + + # Decrement the number of relevant captured combatants, to exclude the primary prisoner from the count (for localization). + change_variable = { + name = num_other_relevant_captured_combatants + add = -1 + } + + send_interface_message = { + type = event_captured_combatants_bad + left_icon = scope:prisoner_1 + right_icon = scope:barony + title = { + first_valid = { + triggered_desc = { #There was only 1 captured + trigger = { + any_in_list = { + list = captured_targets_holder + count = 1 + } + } + desc = siege.0003.one_captured.t + } + desc = siege.0003.several_captured.t + } + } + desc = { + first_valid = { + triggered_desc = { #There was only 1 captured + trigger = { + any_in_list = { + list = captured_targets_holder + count = 1 + } + } + desc = siege.0003.one_captured + } + triggered_desc = { #There were 2 captured + trigger = { + any_in_list = { + list = captured_targets_holder + count = 2 + } + } + desc = siege.0003.two_captured + } + desc = siege.0003.several_captured + } + desc = siege.0003.end + } + tooltip = event_message_effect + every_in_list = { + list = captured_targets_holder + show_as_tooltip = { + root = { + imprison = { + target = prev + type = dungeon + } + } + } + } + } + + remove_variable = num_other_relevant_captured_combatants + } +} + +# Notify other concerned characters about relevant prisoners, by Sean Hughes +siege.0004 = { + hidden = yes + + immediate = { + # Initialize the variable we will use to keep track of how many relevant prisoners there are. + set_variable = { + name = num_other_relevant_captured_combatants + value = 0 + } + + # Re-order the combatant list based on who we care about the most. + ordered_in_list = { + list = captured_targets_effects + max = 99 + check_range_bounds = no + + limit = { + this != root # Do not send a message about ourselves. + has_any_relation_trigger = { CHARACTER = root } + } + + order_by = { + value = captured_combatant_weights_for_root_participant + } + + # Add the prisoners to a new list tailored to be more relevant to this character. + add_to_list = captured_targets_other + root = { + change_variable = { + name = num_other_relevant_captured_combatants + add = 1 + } + } + + # The first two prisoners on this list (i.e., the most important people to us) should be have their individual scopes saved for use in portraits & localization. + if = { + limit = { + NOT = { exists = scope:prisoner_1 } + } + save_scope_as = prisoner_1 + } + else_if = { + limit = { + NOT = { exists = scope:prisoner_2 } + } + save_scope_as = prisoner_2 + } + } + + # Decrement the number of relevant captured combatants, to exclude the primary prisoner from the count (for localization). + change_variable = { + name = num_other_relevant_captured_combatants + add = -1 + } + + send_interface_message = { + type = event_captured_combatants_bad + left_icon = scope:prisoner_1 + right_icon = scope:barony + title = siege.0004.relation_captured.t + desc = { + first_valid = { + triggered_desc = { #There was only 1 captured + trigger = { + any_in_list = { + list = captured_targets_other + count = 1 + } + } + desc = siege.0004.one_captured + } + triggered_desc = { #There were 2 captured + trigger = { + any_in_list = { + list = captured_targets_other + count = 2 + } + } + desc = siege.0004.two_captured + } + desc = siege.0004.several_captured + } + desc = siege.0004.end + } + tooltip = event_message_effect + every_in_list = { + list = captured_targets_other + show_as_tooltip = { + root = { + imprison = { + target = prev + type = dungeon + } + } + } + } + } + } +} + +# Send a toast to the imprisoner if the person they captured is worth war score. +siege.0005 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:valuable_prisoner = scope:primary_siege_defender + } + send_interface_toast = { + title = siege.1005.pow_toast.t + left_icon = scope:occupier + right_icon = scope:valuable_prisoner + + custom_tooltip = siege.1005.pow_toast.desc.primary + } + } + else = { + send_interface_toast = { + title = siege.1005.pow_toast.t + left_icon = scope:occupier + right_icon = scope:valuable_prisoner + + custom_tooltip = siege.1005.pow_toast.desc + } + } + } +} + +# Send a toast to the primary defender if the person that was captured is worth war score (and is not them). +siege.0006 = { + hidden = yes + + immediate = { + send_interface_toast = { + title = siege.1006.pow_toast.t + left_icon = scope:occupier + right_icon = scope:valuable_prisoner + + custom_tooltip = siege.1006.pow_toast.desc + } + } +} + +# Send a toast to the primary attacker (if different from the imprisoner) that someone was captured who is worth war score. +siege.0007 = { + hidden = yes + + immediate = { + if = { + limit = { + scope:valuable_prisoner = scope:primary_siege_defender + } + send_interface_toast = { + title = siege.1005.pow_toast.t + left_icon = scope:occupier + right_icon = scope:valuable_prisoner + + custom_tooltip = siege.1007.pow_toast.desc.primary + } + } + else = { + send_interface_toast = { + title = siege.1005.pow_toast.t + left_icon = scope:occupier + right_icon = scope:valuable_prisoner + + custom_tooltip = siege.1007.pow_toast.desc + } + } + } +} + + +# Send a message to the holder about any courtiers which were killed in the siege. +siege.0013 = { + hidden = yes + + immediate = { + # Initialize the variable we will use to keep track of how many relevant prisoners there are. + set_variable = { + name = num_other_relevant_slain_combatants + value = 0 + } + + # Re-order the combatant list based on who we care about the most. + ordered_in_list = { + list = killed_targets + max = 99 + check_range_bounds = no + + # Do not send a notification about ourselves. + limit = { + this != root + } + + order_by = { + value = captured_combatant_weights_for_root_participant + } + + # Add the prisoners to a new list tailored to be more relevant to this character. + add_to_list = killed_targets_holder + root = { + change_variable = { + name = num_other_relevant_slain_combatants + add = 1 + } + } + + # The first two prisoners on this list (i.e., the most important people to us) should be have their individual scopes saved for use in portraits & localization. + if = { + limit = { + NOT = { exists = scope:casualty_1 } + } + save_scope_as = casualty_1 + } + else_if = { + limit = { + NOT = { exists = scope:casualty_2 } + } + save_scope_as = casualty_2 + } + } + + # Decrement the number of relevant killed combatants, to exclude the primary prisoner from the count (for localization). + change_variable = { + name = num_other_relevant_slain_combatants + add = -1 + } + + send_interface_message = { + type = event_captured_combatants_bad + left_icon = scope:casualty_1 + right_icon = scope:barony + title = { + first_valid = { + triggered_desc = { #There was only 1 killed + trigger = { + any_in_list = { + list = killed_targets_holder + count = 1 + } + } + desc = siege.0013.one_killed.t + } + desc = siege.0013.several_killed.t + } + } + desc = { + first_valid = { + triggered_desc = { #There was only 1 killed + trigger = { + any_in_list = { + list = killed_targets_holder + count = 1 + } + } + desc = siege.0013.one_killed + } + triggered_desc = { #There were 2 killed + trigger = { + any_in_list = { + list = killed_targets_holder + count = 2 + } + } + desc = siege.0013.two_killed + } + desc = siege.0013.several_killed # 3 or more were killed. + } + desc = siege.0013.end + } + tooltip = event_message_effect + every_in_list = { + list = captured_targets_holder + show_as_tooltip = { + death = { + death_reason = death_siege + } + } + } + } + + remove_variable = num_other_relevant_slain_combatants + } +} + +# Send a message to other concerned parties about courtiers who died in the siege which they cared about. +siege.0014 = { + hidden = yes + + immediate = { + # Initialize the variable we will use to keep track of how many relevant prisoners there are. + set_variable = { + name = num_other_relevant_slain_combatants + value = 0 + } + + # Re-order the combatant list based on who we care about the most. + ordered_in_list = { + list = killed_targets + max = 99 + check_range_bounds = no + + # Do not send a notification about ourselves. + limit = { + this != root + has_any_relation_trigger = { CHARACTER = root } + } + + order_by = { + value = captured_combatant_weights_for_root_participant + } + + # Add the prisoners to a new list tailored to be more relevant to this character. + add_to_list = killed_targets_other + root = { + change_variable = { + name = num_other_relevant_slain_combatants + add = 1 + } + } + + # The first two prisoners on this list (i.e., the most important people to us) should be have their individual scopes saved for use in portraits & localization. + if = { + limit = { + NOT = { exists = scope:casualty_1 } + } + save_scope_as = casualty_1 + } + else_if = { + limit = { + NOT = { exists = scope:casualty_2 } + } + save_scope_as = casualty_2 + } + } + + # Decrement the number of relevant killed combatants, to exclude the primary prisoner from the count (for localization). + change_variable = { + name = num_other_relevant_slain_combatants + add = -1 + } + + send_interface_message = { + type = event_captured_combatants_bad + left_icon = scope:casualty_1 + right_icon = scope:barony + title = { + first_valid = { + triggered_desc = { #There was only 1 killed + trigger = { + any_in_list = { + list = killed_targets_other + count = 1 + } + } + desc = siege.0014.one_killed.t + } + desc = siege.0014.several_killed.t + } + } + desc = { + first_valid = { + triggered_desc = { #There was only 1 killed + trigger = { + any_in_list = { + list = killed_targets_other + count = 1 + } + } + desc = siege.0014.one_killed + } + triggered_desc = { #There were 2 killed + trigger = { + any_in_list = { + list = killed_targets_other + count = 2 + } + } + desc = siege.0014.two_killed + } + desc = siege.0014.several_killed # 3 or more were killed. + } + desc = siege.0014.end + } + tooltip = event_message_effect + every_in_list = { + list = captured_targets_other + show_as_tooltip = { + death = { + death_reason = death_siege + } + } + } + } + + remove_variable = num_other_relevant_slain_combatants + } +} + +scripted_trigger siege_0031_artifact_can_be_stolen = { + exists = this + OR = { + scope:barony.holder = { # If the character is in the province and not leading an army, their stuff is probably valid to steal + location = scope:barony.title_province + NOR = { + exists = commanding_army + exists = knight_army + is_imprisoned = yes + } + } + is_equipped = no + ep1_artifact_is_court_artifact_trigger = yes + } +} + +# Chance to steal an artifact from the holding holder. +siege.0031 = { + hidden = yes + + trigger = { + any_in_list = { + list = occupied_baronies + exists = holder + save_temporary_scope_as = this_barony + holder = { + # Can only steal an artifact if this barony is the holder's capital (where they have their treasury/royal court. + capital_barony = scope:barony + + # Holder also needs to actually possess an artifact to steal. + any_character_artifact = { + exists = this + OR = { + prev = { # If the character is in the province and not leading an army, their stuff is probably valid to steal + location = scope:this_barony.title_province + NOR = { + exists = commanding_army + exists = knight_army + is_imprisoned = yes + } + } + is_equipped = no + ep1_artifact_is_court_artifact_trigger = yes + } + } + } + } + } + + immediate = { + every_in_list = { + list = occupied_baronies + limit = { + exists = holder + save_temporary_scope_as = this_barony + holder = { + # Can only steal an artifact if this barony is the holder's capital (where they have their treasury/royal court. + capital_barony = prev + + # Holder also needs to actually possess an artifact to steal. + any_character_artifact = { + exists = this + OR = { + prev = { # If the character is in the province and not leading an army, their stuff is probably valid to steal + location = scope:this_barony.title_province + NOR = { + exists = commanding_army + exists = knight_army + is_imprisoned = yes + } + } + is_equipped = no + ep1_artifact_is_court_artifact_trigger = yes + } + } + } + } + + save_scope_as = this_barony_2 + + holder = { + random_character_artifact = { + limit = { + exists = this + OR = { + prev = { # If the character is in the province and not leading an army, their stuff is probably valid to steal + location = scope:this_barony_2.title_province + NOR = { + exists = commanding_army + exists = knight_army + is_imprisoned = yes + } + } + is_equipped = no + ep1_artifact_is_court_artifact_trigger = yes + } + } + weight = { + base = 1 + modifier = { + add = 0.5 + OR = { + rarity = illustrious + rarity = famed + rarity = masterwork + } + } + } + save_scope_as = stolen_artifact + } + } + + random_list = { + 30 = { + ep1_chance_stealing_damaging_artifacts_modifier = { TARGET = scope:barony.holder } + # Artifact Stolen + + steal_artifact_in_siege_effect = { + LOCATION = title_province + ATTACKER = root + DEFENDER = holder + ARTIFACT = scope:stolen_artifact + IS_RAID = no + } + } + 30 = { + ep1_chance_stealing_damaging_artifacts_modifier = { TARGET = scope:barony.holder } + modifier = { + add = 1.5 + scope:stolen_artifact = { + rarity = common + } + } + modifier = { + add = 1.5 + scope:stolen_artifact = { + rarity = common + OR = { + AND = { + artifact_slot_type = primary_armament + root = { + any_equipped_character_artifact = { + artifact_slot_type = primary_armament + } + } + } + AND = { + artifact_slot_type = regalia + root = { + any_equipped_character_artifact = { + artifact_slot_type = regalia + } + } + } + AND = { + artifact_slot_type = helmet + root = { + any_equipped_character_artifact = { + artifact_slot_type = helmet + } + } + } + AND = { + artifact_slot_type = armor + root = { + any_equipped_character_artifact = { + artifact_slot_type = armor + } + } + } + AND = { + artifact_slot_type = primary_armament + root = { + any_equipped_character_artifact = { + count >= 4 + artifact_slot_type = miscellaneous + } + } + } + } + } + } + # Artifact Damaged + damage_artifact_in_battle_effect = { + LOCATION = title_province + OWNER = holder + OPPONENT = root + DURABILITY_LOSS = 20 + ARTIFACT = scope:stolen_artifact + IS_DUEL = no + } + } + 20 = { + # Nothing Happens + # Lower the chance of nothing if you have a Master of Spoils Officer + modifier = { + add = { + value = root.court_position:master_of_spoils_camp_officer.aptitude:master_of_spoils_camp_officer + add = 1 + multiply = -2 + } + root = { employs_court_position = master_of_spoils_camp_officer } + } + } + } + } + } +} + +# Sieged Lost Notifications +siege.0101 = { + hidden = yes + + immediate = { + save_scope_as = occupant + + # Inform the owner of the holding that they have lost the siege. + scope:barony.holder = { + if = { + limit = { + this = scope:previous_controller + } + scope:barony.holder = { + trigger_event = siege.0102 + } + + # Notify other characters who may be concerned about the occupation. + every_liege_or_above = { + limit = { + is_at_war_with = scope:occupant + } + trigger_event = siege.0103 + } + } + } + } +} + +# Notification event for the character whose holding was occipied. +siege.0102 = { + hidden = yes + + immediate = { + send_interface_message = { + type = msg_siege_lost_with_text + left_icon = scope:occupant + right_icon = scope:barony + title = siege.0102.title + desc = { + first_valid = { + triggered_desc = { + trigger = { + is_at_war_with = scope:occupant + } + desc = siege.0102.message.foe + } + desc = siege.0102.message.neutral + } + } + } + } +} + +# Notification event for the other characters who may be concerned (just lieges who are fighting the occupier in a war?) +siege.0103 = { + hidden = yes + + immediate = { + send_interface_message = { + type = msg_siege_lost_with_text + left_icon = scope:occupant + right_icon = scope:barony + title = siege.0103.title + desc = siege.0103.message + } + } +} + +######################### +# You find the immured corpse of someone you care about after a siege +######################### +# by Linnéa Thimrén + +siege.1001 = { + hidden = yes + + trigger = { + scope:previous_controller = { + is_ai = yes + any_secret = { + type = secret_murder + secret_target = { save_temporary_scope_as = target_check } + root = { + has_RelationToMe_relation = { CHARACTER = scope:target_check } + } + } + } + scope:barony = { + exists = var:immured + var:immured = scope:target_check + } + } + + immediate = { + scope:previous_controller = { + random_secret = { + type = secret_murder + limit = { + secret_target = { save_temporary_scope_as = target_check } + root = { + has_RelationToMe_relation = { CHARACTER = scope:target_check } + } + scope:barony = { + exists = var:immured + var:immured = scope:target_check + } + } + save_scope_as = secret + secret_target = { + save_scope_as = immured_character + } + } + } + set_variable = { + name = immured_relation + value = scope:immured_character + days = 3 + } + scope:secret = { + reveal_to = root + } + } +} diff --git a/N3OW/events/single_combat_events.txt b/N3OW/events/single_combat_events.txt new file mode 100644 index 00000000..8a8a9739 --- /dev/null +++ b/N3OW/events/single_combat_events.txt @@ -0,0 +1,11831 @@ +namespace = single_combat + +################################################## +# # SINGLE COMBAT EVENTS +# 0001 - 0020 Participant Events +# 0021 - 0030 Round End Events +# 0031 - 0050 Results Events +# 1001 - 1020 Debug Events +# +################################################## + + + + +################################################## +# MISC SCRIPTED TRIGGERS + +# If scope:fatality = flag:default, then will a character die when the duel is concluded? +scripted_trigger fatality_default_will_die_trigger = { + scope:sc_attacker = { + OR = { + #scope:sc_attacker is tribal. + AND = { + is_ruler = yes + government_has_flag = government_is_tribal + } + #scope:sc_attacker has a tribal court_owner. + AND = { + is_ruler = no + exists = court_owner + scope:sc_attacker.court_owner = { government_has_flag = government_is_tribal} + } + #scope:sc_attacker has a tribal host. + AND = { + is_ruler = no + exists = host + scope:sc_attacker.host = { government_has_flag = government_is_tribal } + } + #scope:sc_attacker is isolated & landless, in which case we check scope:sc_defender. + AND = { + is_ruler = no + NOR = { + exists = court_owner + exists = host + } + scope:sc_defender = { + OR = { + #scope:sc_defender is tribal. + AND = { + is_ruler = yes + government_has_flag = government_is_tribal + } + #scope:sc_defender has a tribal court_owner. + AND = { + is_ruler = no + exists = court_owner + scope:sc_defender.court_owner = { government_has_flag = government_is_tribal} + } + #scope:sc_defender has a tribal host. + AND = { + is_ruler = no + exists = host + scope:sc_defender.host = { government_has_flag = government_is_tribal } + } + } + } + } + } + } +} + +# Will the duel end in the death of your opponent for any reason? +scripted_trigger duel_will_end_in_opponent_death_trigger = { + # Hard disable if fatality has been disabled. + NOT = { scope:fatality = flag:no } + OR = { + # The duel has default fatality enabled & validated. + fatality_default_will_die_trigger = yes + # The duel has fatality possible & your opponent is already critically wounded. + OR = { + AND = { + this = scope:sc_attacker + scope:fatality = flag:possible + scope:sc_defender = { has_trait = wounded_3 } + } + AND = { + this = scope:sc_defender + scope:fatality = flag:possible + scope:sc_attacker = { has_trait = wounded_3 } + } + } + # Fatality has been force-enabled. + scope:fatality = flag:always + } +} + +scripted_trigger duel_will_end_in_my_death_trigger = { + # Hard disable if fatality has been disabled. + NOT = { scope:fatality = flag:no } + OR = { + # The duel has default fatality enabled & validated. + fatality_default_will_die_trigger = yes + # The duel has fatality possible & you are already critically wounded. + AND = { + scope:fatality = flag:possible + has_trait = wounded_3 + } + # Fatality has been force-enabled. + scope:fatality = flag:always + } +} + +scripted_trigger house_not_allowed_to_yell_motto_trigger = { + OR = { + NOT = { exists = house } + # Historical + dynasty = dynasty:1055 + house = house:house_british_isles_wessex + # Vanity: because they're long. + dynasty = dynasty:vanity_riedinger + dynasty = dynasty:vanity_kaltsogiannis + # Vanity: because their punctuation screws things up. + dynasty = dynasty:vanity_bjarnehed + dynasty = dynasty:vanity_daflos + dynasty = dynasty:vanity_welch + dynasty = dynasty:vanity_opara + dynasty = dynasty:vanity_beaumont + } +} + +scripted_trigger rocky_locale_trigger = { + OR = { + terrain = hills + terrain = mountains + terrain = desert_mountains + } +} + +################################################## +# GENERAL SCRIPTED EFFECTS + +# Grab a single special move from the list for this character to use this round. +scripted_effect select_special_tier_move_effect = { + #First, we flag that the character now has a special move option. + set_local_variable = { + name = combat_move_special_slot_used_flag + value = yes + } + #Then, we pick which move they get. + random_list = { + # High Secondary Skill moves + ## Reason You Suck Speech + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_reason_you_suck_speech_flag } + diplomacy >= very_high_skill_rating + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:reason_you_suck_speech + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:reason_you_suck_speech + } + } + } + set_local_variable = { + name = combat_move_reason_you_suck_speech_flag + value = yes + } + } + ## Technique from Legend + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_technique_from_legend_flag } + learning >= very_high_skill_rating + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:technique_from_legend + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:technique_from_legend + } + } + } + set_local_variable = { + name = combat_move_technique_from_legend_flag + value = yes + } + } + ## Like a Viper + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_like_a_viper_flag } + intrigue >= very_high_skill_rating + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:like_a_viper + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:like_a_viper + } + } + } + set_local_variable = { + name = combat_move_like_a_viper_flag + value = yes + } + } + ## Pocket Silver + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_pocket_silver_flag } + stewardship >= very_high_skill_rating + short_term_gold >= combat_move_pocket_silver_value + # Move essentially requires two arms, I'm afraid. + NOT = { has_trait = maimed } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:pocket_silver + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:pocket_silver + } + } + } + set_local_variable = { + name = combat_move_pocket_silver_flag + value = yes + } + } + ## Martial Voice + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_martial_voice_flag } + martial >= very_high_skill_rating + # For now, the loc relies on your opponent being noble, so you ironically can't use your peasant-commanding voice on actual peasants. + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker = { + exists = house + NOR = { + has_trait = peasant_leader + government_has_flag = government_is_republic + } + } + } + AND = { + this = scope:sc_attacker + scope:sc_defender = { + exists = house + NOR = { + has_trait = peasant_leader + government_has_flag = government_is_republic + } + } + } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:martial_voice + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:martial_voice + } + } + } + set_local_variable = { + name = combat_move_martial_voice_flag + value = yes + } + } + ## Mocking Boast + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_mocking_boast_flag } + OR = { + AND = { + this = scope:sc_attacker + scope:sc_attacker.prestige_level > scope:sc_defender.prestige_level + # A humble opponent doesn't give two shits. + scope:sc_defender = { + NOT = { has_trait = humble } + } + } + AND = { + this = scope:sc_defender + scope:sc_defender.prestige_level > scope:sc_attacker.prestige_level + # A humble opponent doesn't give two shits. + scope:sc_attacker = { + NOT = { has_trait = humble } + } + } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:mocking_boast + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:mocking_boast + } + } + } + set_local_variable = { + name = combat_move_mocking_boast_flag + value = yes + } + } + # Location-Specific moves + ## Is that a Crocodile?! + 1 = { #Super-rare, pretty much an instant kill. + trigger = { + NOT = { exists = local_var:combat_move_is_that_a_crocodile_flag } + # Must be happening in a wild environment. + scope:locale = flag:terrain_scope + # Can't have already had a crocodile used by either party this duel. + NOT = { exists = scope:had_crocodile } + # Must be in a place that has crocodiles. + single_combat_location_has_crocodilians_trigger = yes + # Duel must be one that would end in fatality. + duel_will_end_in_opponent_death_trigger = yes + } + set_local_variable = { + name = combat_move_is_that_a_crocodile_flag + value = yes + } + # No down-weight for something that's already 0.001%. + } + ## Desert Warrior + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_desert_warrior_flag } + has_trait = desert_warrior + # Must be happening in a wild environment. + scope:locale = flag:terrain_scope + #Both characters being experts cancel each other out. + NAND = { + scope:sc_attacker = { has_trait = desert_warrior } + scope:sc_defender = { has_trait = desert_warrior } + } + scope:sc_defender.location = { + OR = { + terrain = desert + terrain = drylands + terrain = oasis + } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:desert_warrior + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:desert_warrior + } + } + } + set_local_variable = { + name = combat_move_desert_warrior_flag + value = yes + } + } + ## Jungle Stalker + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_jungle_stalker_flag } + has_trait = jungle_stalker + # Must be happening in a wild environment. + scope:locale = flag:terrain_scope + #Both characters being experts cancel each other out. + NAND = { + scope:sc_attacker = { has_trait = jungle_stalker } + scope:sc_defender = { has_trait = jungle_stalker } + } + scope:sc_defender.location = { + terrain = jungle + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:jungle_stalker + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:jungle_stalker + } + } + } + set_local_variable = { + name = combat_move_jungle_stalker_flag + value = yes + } + } + ## Open Terrain Expert + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_open_terrain_expert_flag } + has_trait = open_terrain_expert + # Must be happening in a wild environment. + scope:locale = flag:terrain_scope + #Both characters being experts cancel each other out. + NAND = { + scope:sc_attacker = { has_trait = open_terrain_expert } + scope:sc_defender = { has_trait = open_terrain_expert } + } + scope:sc_defender.location = { + OR = { + terrain = farmlands + terrain = plains + terrain = steppe + } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:open_terrain_expert + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:open_terrain_expert + } + } + } + set_local_variable = { + name = combat_move_open_terrain_expert_flag + value = yes + } + } + ## Rough Terrain Expert + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_rough_terrain_expert_flag } + has_trait = rough_terrain_expert + # Must be happening in a wild environment. + scope:locale = flag:terrain_scope + #Both characters being experts cancel each other out. + NAND = { + scope:sc_attacker = { has_trait = rough_terrain_expert } + scope:sc_defender = { has_trait = rough_terrain_expert } + } + scope:sc_defender.location = { + OR = { + terrain = hills + terrain = mountains + terrain = desert_mountains #Technically a desert, but not for single combat purposes. + terrain = wetlands + } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:rough_terrain_expert + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:rough_terrain_expert + } + } + } + set_local_variable = { + name = combat_move_rough_terrain_expert_flag + value = yes + } + } + ## Forest Fighter + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_forest_fighter_flag } + has_trait = forest_fighter + # Must be happening in a wild environment. + scope:locale = flag:terrain_scope + #Both characters being experts cancel each other out. + NAND = { + scope:sc_attacker = { has_trait = forest_fighter } + scope:sc_defender = { has_trait = forest_fighter } + } + scope:sc_defender.location = { + OR = { + terrain = forest + terrain = taiga + } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:forest_fighter + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:forest_fighter + } + } + } + set_local_variable = { + name = combat_move_forest_fighter_flag + value = yes + } + } + # Trait-Specific moves + ## RAAARGH! + 5000 = { + trigger = { + NOT = { exists = local_var:combat_move_raaargh_flag } + has_trait = berserker + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:raaargh + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:raaargh + } + } + } + set_local_variable = { + name = combat_move_raaargh_flag + value = yes + } + } + ## Hard Grit + 2000 = { + trigger = { + NOT = { exists = local_var:combat_move_hard_grit_flag } + has_trait = shieldmaiden + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:hard_grit + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:hard_grit + } + } + } + set_local_variable = { + name = combat_move_hard_grit_flag + value = yes + } + } + ## Feint & Stab + 2000 = { + trigger = { + NOT = { exists = local_var:combat_move_feint_and_stab_flag } + has_trait = lifestyle_hunter + # Move specifically requires two arms, I'm afraid. + NOT = { has_trait = maimed } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:feint_and_stab + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:feint_and_stab + } + } + } + set_local_variable = { + name = combat_move_feint_and_stab_flag + value = yes + } + } + ## Butchery + 2000 = { + trigger = { + NOT = { exists = local_var:combat_move_butchery_flag } + has_trait = viking + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:butchery + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:butchery + } + } + } + set_local_variable = { + name = combat_move_butchery_flag + value = yes + } + } + ## Stoic Veteran + 2000 = { + trigger = { + NOT = { exists = local_var:combat_move_stoic_veteran_flag } + has_trait = varangian + # Can't use the Varangian trait against the Eastern Roman Emperor, as that's just not cricket. + NOR = { + AND = { + this = scope:sc_defender + scope:sc_attacker = { has_title = title:e_byzantium } + } + AND = { + this = scope:sc_attacker + scope:sc_defender = { has_title = title:e_byzantium } + } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:stoic_veteran + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:stoic_veteran + } + } + } + set_local_variable = { + name = combat_move_stoic_veteran_flag + value = yes + } + } + ## Blade Dance + 2000 = { + trigger = { + NOT = { exists = local_var:combat_move_blade_dance_flag } + has_trait = lifestyle_blademaster + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:blade_dance + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:blade_dance + } + } + } + set_local_variable = { + name = combat_move_blade_dance_flag + value = yes + } + } + ## Wrath of [HighGod] + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_wrath_of_highgod_flag } + has_trait = zealous + faith = { + NOT = { has_doctrine_parameter = holy_wars_forbidden } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:wrath_of_highgod + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:wrath_of_highgod + } + } + } + set_local_variable = { + name = combat_move_wrath_of_highgod_flag + value = yes + } + } + ## Hurt Me Better + 2000 = { + trigger = { + NOT = { exists = local_var:combat_move_hurt_me_better_flag } + OR = { + has_trait = deviant + any_secret = { type = secret_deviant } + } + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:hurt_me_better + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:hurt_me_better + } + } + } + set_local_variable = { + name = combat_move_hurt_me_better_flag + value = yes + } + } + # Misc moves + ## Kick a rock at their shin. + 1 = { #Fallback move; we don't really ever want to see this. + trigger = { + NOT = { exists = local_var:combat_move_special_fallback_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_special_fallback_flag + value = yes + } + # No down-weight for something that's already 0.001%. + } + ## Something to Hide + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_something_to_hide_flag } + OR = { + AND = { + this = scope:sc_attacker + has_usable_hook = scope:sc_defender + } + AND = { + this = scope:sc_defender + has_usable_hook = scope:sc_attacker + } + } + # The single combat cannot be fatal, or this is moot. + duel_will_end_in_opponent_death_trigger = no + # Block special moves twice in a row. + NOR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:something_to_hide + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:something_to_hide + } + } + } + set_local_variable = { + name = combat_move_something_to_hide_flag + value = yes + } + } + } +} + +# Select a single tier 1 combat move from the list. +scripted_effect select_tier_1_move_effect = { + random_list = { + #Ordinary moves. + 70 = { + random_list = { + # Wait and Hope + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_wait_and_hope_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_wait_and_hope_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:wait_and_hope + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:wait_and_hope + } + } + } + } + # Unsure Attack + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_unsure_attack_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_unsure_attack_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:unsure_attack + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:unsure_attack + } + } + } + } + # Enthusiastic Onslaught + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_enthusiastic_onslaught_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_enthusiastic_onslaught_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:enthusiastic_onslaught + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:enthusiastic_onslaught + } + } + } + } + # Hail Mary + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_hail_mary_flag } + #Only valid against an opponent who _truly_ outclasses you. + OR = { + AND = { + this = scope:sc_attacker + prowess_diff = { + target = scope:sc_defender + value <= -10 + } + } + AND = { + this = scope:sc_defender + prowess_diff = { + target = scope:sc_attacker + value <= -10 + } + } + } + } + set_local_variable = { + name = combat_move_hail_mary_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:hail_mary + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:hail_mary + } + } + } + } + # Pocket Sand + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_pocket_sand_flag } + #Only valid against opponents who really won't be able to see it coming a mile away. + OR = { + AND = { + this = scope:sc_attacker + scope:sc_defender.prowess <= medium_scsk + } + AND = { + this = scope:sc_defender + scope:sc_attacker.prowess <= medium_scsk + } + } + # Move essentially requires two arms, I'm afraid. + NOT = { has_trait = maimed } + } + set_local_variable = { + name = combat_move_pocket_sand_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:pocket_sand + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:pocket_sand + } + } + } + } + # Nut 'em + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_nut_em_flag } + #No special requirements. + } + set_local_variable = { + name = combat_move_nut_em_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:nut_em + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:nut_em + } + } + } + } + } + } + #Special moves. + 30 = { + trigger = { + NOT = { exists = local_var:combat_move_special_slot_used_flag } + } + select_special_tier_move_effect = yes + } + } +} + +# Select a single tier 2 combat move from the list. +scripted_effect select_tier_2_move_effect = { + random_list = { + #Ordinary moves. + 70 = { + random_list = { + # Guard + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_guard_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_guard_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:guard + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:guard + } + } + } + } + # Probing Attack + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_probing_attack_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_probing_attack_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:probing_attack + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:probing_attack + } + } + } + } + # Onslaught + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_onslaught_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_onslaught_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:onslaught + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:onslaught + } + } + } + } + # Surprise Attack + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_surprise_attack_flag } + OR = { + AND = { + this = scope:sc_attacker + scope:sc_defender = { + NOT = { has_trait = paranoid } + } + } + AND = { + this = scope:sc_defender + scope:sc_attacker = { + NOT = { has_trait = paranoid } + } + } + } + } + set_local_variable = { + name = combat_move_surprise_attack_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:surprise_attack + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:surprise_attack + } + } + } + } + # Taunt + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_taunt_flag } + OR = { + AND = { + this = scope:sc_attacker + scope:sc_defender = { + is_ai = yes + NOT = { has_trait = calm } + } + } + AND = { + this = scope:sc_defender + scope:sc_attacker = { + is_ai = yes + NOT = { has_trait = calm } + } + } + } + } + set_local_variable = { + name = combat_move_taunt_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:taunt + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:taunt + } + } + } + } + # Put the Boot In + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_put_the_boot_in_flag } + #No special requirements. + } + set_local_variable = { + name = combat_move_put_the_boot_in_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:put_the_boot_in + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:put_the_boot_in + } + } + } + } + } + } + #Special moves. + 30 = { + trigger = { + NOT = { exists = local_var:combat_move_special_slot_used_flag } + } + select_special_tier_move_effect = yes + } + } +} + +# Select a single tier 3 combat move from the list. +scripted_effect select_tier_3_move_effect = { + random_list = { + #Ordinary moves. + 70 = { + random_list = { + # Strict Guard + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_strict_guard_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_strict_guard_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:strict_guard + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:strict_guard + } + } + } + } + # Confident Attack + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_confident_attack_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_confident_attack_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:confident_attack + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:confident_attack + } + } + } + } + # Expert Onslaught + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_expert_onslaught_flag } + #Fallback, always available. + } + set_local_variable = { + name = combat_move_expert_onslaught_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:expert_onslaught + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:expert_onslaught + } + } + } + } + # Attempt Disarm + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_attempt_disarm_flag } + OR = { + AND = { + this = scope:sc_attacker + scope:sc_defender = { + prowess >= decent_scsk + # Blademasters cannot be wrong-footed by a disarmament attempt. + NOT = { has_trait = lifestyle_blademaster } + } + } + AND = { + this = scope:sc_defender + scope:sc_attacker = { + prowess >= decent_scsk + # Blademasters cannot be wrong-footed by a disarmament attempt. + NOT = { has_trait = lifestyle_blademaster } + } + } + } + } + set_local_variable = { + name = combat_move_attempt_disarm_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:attempt_disarm + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:attempt_disarm + } + } + } + } + # Lightning Assault + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_lightning_assault_flag } + scope:sc_defender.var:current_round = 1 + } + set_local_variable = { + name = combat_move_lightning_assault_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:lightning_assault + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:lightning_assault + } + } + } + } + # Tire Opponent + 1000 = { + trigger = { + NOT = { exists = local_var:combat_move_tire_opponent_flag } + #No special requirements. + } + set_local_variable = { + name = combat_move_tire_opponent_flag + value = yes + } + # Weight down repeat moves + modifier = { + add = sce_regular_combat_repeat_down_weight + OR = { + AND = { + exists = scope:sc_defender_last_move + this = scope:sc_defender + scope:sc_defender_last_move = flag:tire_opponent + } + AND = { + exists = scope:sc_attacker_last_move + this = scope:sc_attacker + scope:sc_attacker_last_move = flag:tire_opponent + } + } + } + } + } + } + #Special moves. + 30 = { + trigger = { + NOT = { exists = local_var:combat_move_special_slot_used_flag } + } + select_special_tier_move_effect = yes + } + } +} + +# Determine what tier of moves a character is getting this round, then pick them. +scripted_effect select_combat_options_from_pool_effect = { + # DOCUMENTATION + # First, we look at the single combat skill rating of the combatant, and use this to set tier variables for moves. + ## Only the best and worst combatants get guaranteed tier moves, all best & all worst tier respectively. + ## Second best and second worst have an even 50:50 to get all best/worst tier moves respectively, or to vary one of their move's tier levels by one (e.g., second worst getting x1 tier 2 move and x2 tier 1 moves). + ## Each subsequent step towards the middle of the skill_ratings moves the standard tier ratings by 1. So if mediocre_scsk and below is x3 tier 1 moves by default, then medium_scsk is x2 tier 1 and x1 tier 2 moves by default. + ## Medium, decent, high, and very_high skill_ratings then have a 33:34:33 chance to vary their tier moves down by one, use their default, or go up by one. + ### This gives us an element of randomness, but one that can be gamed within combat encounters by obtaining modifiers, and stacks the odds in favour of skilled warriors without making them the automatic victors every time. + + # MECHANICS + # Roll for tier draws. + ## For the sake of easy tweakability, all tiers include all variables, so each one can be adjusted as needed for balance. + ## low_scsk or below + if = { + limit = { prowess <= low_scsk } + #low_scsk *always* draws x3 tier 1 moves. + set_variable = { + name = tier_1_counter + value = 3 + } + set_variable = { + name = tier_2_counter + value = 0 + } + set_variable = { + name = tier_3_counter + value = 0 + } + } + ## mediocre_scsk or below + else_if = { + limit = { prowess <= mediocre_scsk } + random_list = { + #Bad roll, -1 to tier set. + 50 = { + set_variable = { + name = tier_1_counter + value = 3 + } + set_variable = { + name = tier_2_counter + value = 0 + } + set_variable = { + name = tier_3_counter + value = 0 + } + } + #Average roll, default tier set. + 50 = { + set_variable = { + name = tier_1_counter + value = 2 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 0 + } + } + } + } + ## medium_scsk or below + else_if = { + limit = { prowess <= medium_scsk } + random_list = { + #Bad roll, -1 to tier set. + 33 = { + set_variable = { + name = tier_1_counter + value = 3 + } + set_variable = { + name = tier_2_counter + value = 0 + } + set_variable = { + name = tier_3_counter + value = 0 + } + } + #Average roll, default tier set. + 34 = { + set_variable = { + name = tier_1_counter + value = 2 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 0 + } + } + #Good roll, +1 to tier set. + 33 = { + set_variable = { + name = tier_1_counter + value = 1 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 1 + } + } + } + } + ## decent_scsk or below + else_if = { + limit = { prowess <= decent_scsk } + random_list = { + #Bad roll, -1 to tier set. + 33 = { + set_variable = { + name = tier_1_counter + value = 2 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 0 + } + } + #Average roll, default tier set. + 34 = { + set_variable = { + name = tier_1_counter + value = 1 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 1 + } + } + #Good roll, +1 to tier set. + 33 = { + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 2 + } + set_variable = { + name = tier_3_counter + value = 1 + } + } + } + } + ## high_scsk or below + else_if = { + limit = { prowess <= high_scsk } + random_list = { + #Bad roll, -1 to tier set. + 33 = { + set_variable = { + name = tier_1_counter + value = 1 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 1 + } + } + #Average roll, default tier set. + 34 = { + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 2 + } + set_variable = { + name = tier_3_counter + value = 1 + } + } + #Good roll, +1 to tier set. + 33 = { + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 2 + } + } + } + } + ## very_high_scsk or below + else_if = { + limit = { prowess <= very_high_scsk } + random_list = { + #Bad roll, -1 to tier set. + 33 = { + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 2 + } + set_variable = { + name = tier_3_counter + value = 1 + } + } + #Average roll, default tier set. + 34 = { + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 2 + } + } + #Good roll, +1 to tier set. + 33 = { + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 0 + } + set_variable = { + name = tier_3_counter + value = 3 + } + } + } + } + ## extremely_high_scsk or below + else_if = { + limit = { prowess <= extremely_high_scsk } + random_list = { + #Bad roll, -1 to tier set. + 50 = { + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 1 + } + set_variable = { + name = tier_3_counter + value = 2 + } + } + #Average roll, default tier set. + 50 = { + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 0 + } + set_variable = { + name = tier_3_counter + value = 3 + } + } + } + } + ## more than extremely_high_scsk + else = { + #Better than extremely_high_scsk always draws x3 tier 3 moves. + set_variable = { + name = tier_1_counter + value = 0 + } + set_variable = { + name = tier_2_counter + value = 0 + } + set_variable = { + name = tier_3_counter + value = 3 + } + } + + # DOCUMENTATION + # Next, clear all previous combat flags from the character, & iterate through each tier value up to three times, selecting valid moves from the set. + ## Every time we select a move, we reduce that tier's tier count variable by 1, so the player will only ever have three options available. + ## Each select_tier_[X]_move_effect set incorporates a mix of flat combat moves and special moves triggered by locations, traits, special circumstances, etc. Special moves are available at all tiers, but you can only roll x1 per round. + ## Every tier has at least three ordinary, standard moves that all characters can access, so characters will never not have a full roster of moves. + + # MECHANICS + # Clear previous combat flags. + remove_single_combat_character_local_variables_effect = yes + # Iterate through combat move sets for each tier till we've got a full roster of moves. + ## Tier 1 + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_1_counter + var:tier_1_counter > 0 + } + change_variable = { + name = tier_1_counter + add = -1 + } + select_tier_1_move_effect = yes + } + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_1_counter + var:tier_1_counter > 0 + } + change_variable = { + name = tier_1_counter + add = -1 + } + select_tier_1_move_effect = yes + } + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_1_counter + var:tier_1_counter > 0 + } + change_variable = { + name = tier_1_counter + add = -1 + } + select_tier_1_move_effect = yes + } + ## Tier 2 + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_2_counter + var:tier_2_counter > 0 + } + change_variable = { + name = tier_2_counter + add = -1 + } + select_tier_2_move_effect = yes + } + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_2_counter + var:tier_2_counter > 0 + } + change_variable = { + name = tier_2_counter + add = -1 + } + select_tier_2_move_effect = yes + } + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_2_counter + var:tier_2_counter > 0 + } + change_variable = { + name = tier_2_counter + add = -1 + } + select_tier_2_move_effect = yes + } + ## Tier 3 + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_3_counter + var:tier_3_counter > 0 + } + change_variable = { + name = tier_3_counter + add = -1 + } + select_tier_3_move_effect = yes + } + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_3_counter + var:tier_3_counter > 0 + } + change_variable = { + name = tier_3_counter + add = -1 + } + select_tier_3_move_effect = yes + } + if = { + limit = { + # Check that the variable exists; strictly unnecessary, but stops a false positive clogging the error log. + has_variable = tier_3_counter + var:tier_3_counter > 0 + } + change_variable = { + name = tier_3_counter + add = -1 + } + select_tier_3_move_effect = yes + } +} + +# Determine whether scope:sc_loser will be unharmed, wounded, or killed at the end of a duel. +scripted_effect work_out_wounds_or_death_effect = { + #Fatality:Practice - no wounds, please + if = { + limit = { scope:fatality = flag:practice } + # No extra effect. + } + # Fatality:No = death has been disabled. + if = { + limit = { scope:fatality = flag:no } + scope:sc_loser = { + increase_wounds_no_death_effect = { REASON = duel } + } + } + # Fatality:Possible = death is only possible via wounds. + else_if = { + limit = { scope:fatality = flag:possible } + scope:sc_loser = { + increase_wounds_effect = { REASON = duel } + } + } + # Fatality:Default = death is only possible for non-tribals, and always for tribals, taking scope:sc_attacker as the instigating government. + else_if = { + limit = { scope:fatality = flag:default } + if = { + limit = { fatality_default_will_die_trigger = yes } + scope:sc_loser = { + death = { + killer = scope:sc_victor + death_reason = death_duel + } + } + if = { + limit = { + scope:sc_victor = { + faith = { + has_doctrine = tenet_cranial_trophies + } + } + } + tgp_cranial_trophies_beheading_effect = { + KILLER = scope:sc_victor + DEAD = scope:sc_loser + } + } + } + else = { + scope:sc_loser = { + increase_wounds_effect = { REASON = duel } + } + } + } + # Fatality:Always = losing is always fatal. + else_if = { + limit = { scope:fatality = flag:always } + scope:sc_victor = { + if = { + limit = { + this = scope:sc_attacker + NOT = { has_execute_reason = scope:sc_loser } + } + add_kinslayer_trait_or_nothing_effect = { VICTIM = scope:sc_loser } + } + } + scope:sc_loser = { + death = { + killer = scope:sc_victor + death_reason = death_duel + } + } + if = { + limit = { + scope:sc_victor = { + faith = { + has_doctrine = tenet_cranial_trophies + } + } + } + tgp_cranial_trophies_beheading_effect = { + KILLER = scope:sc_victor + DEAD = scope:sc_loser + } + } + } +} + +# Sort the end of combat rigmarole & clean-up. +scripted_effect finalise_combat_results_effect = { + # Determine if a death rattle is applicable, and if so, set which one. + scope:sc_loser = { + if = { + limit = { duel_will_end_in_my_death_trigger = yes } + # First off, we look to see if scope:sc_loser is prevented from talking. + ## wordless + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + OR = { + scope:sc_attacker_last_move = flag:technique_from_legend + scope:sc_attacker_last_move = flag:hail_mary + scope:sc_attacker_last_move = flag:like_a_viper + } + } + AND = { + this = scope:sc_attacker + OR = { + scope:sc_defender_last_move = flag:onslaught + scope:sc_defender_last_move = flag:strict_guard + scope:sc_defender_last_move = flag:pocket_silver + scope:sc_defender_last_move = flag:blade_dance + } + } + } + } + save_scope_value_as = { + name = death_rattle + value = flag:wordless + } + } + ## muffled + else_if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + OR = { + scope:sc_attacker_last_move = flag:is_that_a_crocodile + AND = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + } + } + AND = { + this = scope:sc_attacker + # Scope:sc_attacker currently only suffers this for the wetlands death. It'll need to be sub-AND'ed as above if any more are added. + scope:sc_defender_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + } + } + save_scope_value_as = { + name = death_rattle + value = flag:muffled + } + } + ## choking + else_if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + OR = { + scope:sc_attacker_last_move = flag:wait_and_hope + scope:sc_attacker_last_move = flag:enthusiastic_onslaught + scope:sc_attacker_last_move = flag:pocket_sand + scope:sc_attacker_last_move = flag:expert_onslaught + scope:sc_attacker_last_move = flag:reason_you_suck_speech + scope:sc_attacker_last_move = flag:pocket_silver + scope:sc_attacker_last_move = flag:raaargh + scope:sc_attacker_last_move = flag:hard_grit + scope:sc_attacker_last_move = flag:butchery + } + } + AND = { + this = scope:sc_attacker + OR = { + scope:sc_defender_last_move = flag:wait_and_hope + scope:sc_defender_last_move = flag:unsure_attack + scope:sc_defender_last_move = flag:pocket_sand + scope:sc_defender_last_move = flag:nut_em + scope:sc_defender_last_move = flag:tire_opponent + scope:sc_defender_last_move = flag:martial_voice + scope:sc_defender_last_move = flag:is_that_a_crocodile + scope:sc_defender_last_move = flag:desert_warrior + scope:sc_defender_last_move = flag:butchery + } + } + } + } + save_scope_value_as = { + name = death_rattle + value = flag:choking + } + } + ## pleading screams + else_if = { + limit = { + # We actually don't use this for scope:sc_defender anywhere at present. + this = scope:sc_attacker + scope:sc_defender_last_move = flag:expert_onslaught + } + save_scope_value_as = { + name = death_rattle + value = flag:pleading_screams + } + } + # Then, we go through possible relations, ordered by importance/rarity. + ## has soulmate + else_if = { + limit = { + any_relation = { + type = soulmate + count >= 1 + this != scope:sc_victor + } + } + random_relation = { + type = soulmate + save_scope_as = sc_loser_soulmate + } + save_scope_value_as = { + name = death_rattle + value = flag:soulmate + } + } + ## has best_friend + else_if = { + limit = { + any_relation = { + type = best_friend + count >= 1 + this != scope:sc_victor + } + } + random_relation = { + type = best_friend + save_scope_as = sc_loser_best_friend + } + save_scope_value_as = { + name = death_rattle + value = flag:best_friend + } + } + ## killed_by_soulmate + else_if = { + limit = { has_relation_soulmate = scope:sc_victor } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_soulmate + } + } + ## killed_by_best_friend + else_if = { + limit = { has_relation_best_friend = scope:sc_victor } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_best_friend + } + } + ## killed_by_nemesis + else_if = { + limit = { has_relation_nemesis = scope:sc_victor } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_nemesis + } + } + ## killed_by_close_or_extended_family + else_if = { + limit = { + any_close_or_extended_family_member = { this = scope:sc_victor } + } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_close_or_extended_family + } + } + ## is sinner + else_if = { + limit = { + num_sinful_traits >= 3 + piety_level <= 0 + } + save_scope_value_as = { + name = death_rattle + value = flag:sinner + } + } + ## is saint + else_if = { + limit = { + num_virtuous_traits >= 3 + piety_level >= 5 + } + save_scope_value_as = { + name = death_rattle + value = flag:saint + } + } + ## is legend + else_if = { + limit = { + prestige_level >= 5 + NOT = { has_trait = humble } + } + save_scope_value_as = { + name = death_rattle + value = flag:legend + } + } + ## killed_by_rival + else_if = { + limit = { has_relation_rival = scope:sc_victor } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_rival + } + } + ## killed_by_friend_or_lover + else_if = { + limit = { + OR = { + has_relation_friend = scope:sc_victor + has_relation_lover = scope:sc_victor + } + } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_friend_or_lover + } + } + ## killed_by_spouse + else_if = { + limit = { + any_spouse = { this = scope:sc_victor } + } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_spouse + } + } + ## killed_by_your_head_of_faith + else_if = { + limit = { faith.religious_head = scope:sc_victor } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_your_head_of_faith + } + } + ## killed_by_another_head_of_faith + else_if = { + limit = { + faith.religious_head != scope:sc_victor + scope:sc_victor.faith.religious_head = scope:sc_victor + } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_another_head_of_faith + } + } + ## killed_by_cultural_head + else_if = { + limit = { culture.culture_head = scope:sc_victor } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_cultural_head + } + } + ## killed_by_house_head + else_if = { + limit = { house.house_head = scope:sc_victor } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_house_head + } + } + ## killed_by_dynasty_head + else_if = { + limit = { dynasty.dynast = scope:sc_victor } + save_scope_value_as = { + name = death_rattle + value = flag:killed_by_dynasty_head + } + } + ## believes in valhalla + else_if = { + limit = { + # Specific to Germanic pagans. + religion = religion:germanic_religion + # And they gotta be warlike. + faith = { + OR = { + has_doctrine_parameter = warmonger + has_doctrine_parameter = conquest_cb_enabled + has_doctrine_parameter = invasion_cb_enabled + has_doctrine_parameter = great_holy_wars_active_if_reformed + has_doctrine_parameter = clergy_can_fight + has_doctrine_parameter = cheaper_holy_wars_active + has_doctrine_parameter = great_holy_wars_active + } + } + } + save_scope_value_as = { + name = death_rattle + value = flag:valhalla + } + } + # Otherwise, we default to the fallback. + ## scream + else = { + save_scope_value_as = { + name = death_rattle + value = flag:scream + } + } + } + } + # Send out results events. + ## We do this before death calculation so that the loser isn't too dead to be told that they've died (if they died). + scope:sc_loser = { trigger_event = single_combat.0031 } + scope:sc_victor = { trigger_event = single_combat.0041 } + # Setup for artifact.4080 + scope:sc_victor = { + if = { + limit = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = primary_armament + NOT = { has_variable = artifact_duel_var } + } + } + random_character_artifact = { + limit = { + is_equipped = yes + artifact_slot_type = primary_armament + NOT = { has_variable = artifact_duel_var } + } + set_variable = { + name = artifact_duel_var + value = 1 + } + } + } + else_if = { + limit = { + any_character_artifact = { + is_equipped = yes + artifact_slot_type = primary_armament + has_variable = artifact_duel_var + } + } + random_character_artifact = { + limit = { + is_equipped = yes + artifact_slot_type = primary_armament + has_variable = artifact_duel_var + } + change_variable = { + name = artifact_duel_var + add = 1 + } + } + } + # Legend seed setup + if = { + limit = { + scope:sc_loser = { + OR = { + highest_held_title_tier >= tier_empire + any_held_title = { is_head_of_faith = yes } + mpo_has_greatest_of_khans_nickname_trigger = yes + } + } + has_dlc_feature = legends + NOT = { has_game_rule = historical_legends_only } + } + create_legend_seed = { + type = heroic + quality = illustrious + chronicle = legendary_battle + properties = { + winner = root + loser = scope:sc_loser + location = root.location + } + } + } + } + # Sort glory allocation. + scope:sc_victor = { + if = { + limit = { + accolade ?= { is_accolade_active = yes } + } + # Glory is relative to the prowess difference between two characters. Beating someone equally matched or better is worth more. + ## Massively outclassed. + if = { + limit = { + prowess_diff = { + target = scope:sc_loser + value <= -20 + } + } + accolade = { add_glory = monumental_glory_gain } + } + ## Majorly outclassed. + else_if = { + limit = { + prowess_diff = { + target = scope:sc_loser + value <= -15 + } + } + accolade = { add_glory = massive_glory_gain } + } + ## Somewhat outclassed. + else_if = { + limit = { + prowess_diff = { + target = scope:sc_loser + value <= -8 + } + } + accolade = { add_glory = major_glory_gain } + } + ## Slightly outclassed. + else_if = { + limit = { + prowess_diff = { + target = scope:sc_loser + value <= -4 + } + } + accolade = { add_glory = medium_glory_gain } + } + ## Evenly matched. + else_if = { + limit = { + prowess_diff = { + target = scope:sc_loser + value <= 0 + } + } + accolade = { add_glory = minor_glory_gain } + } + ## Slightly in your favour. + else_if = { + limit = { + prowess_diff = { + target = scope:sc_loser + value <= 4 + } + } + accolade = { add_glory = minimal_glory_gain } + } + ## Below this, things are too much in your favour and you're not earning glory, you're defending what you already have. + + #Beating your rival means additional glory gain + if = { + limit = { + OR = { + has_relation_rival = scope:sc_loser + has_relation_nemesis = scope:sc_loser + } + } + accolade = { add_glory = minor_glory_gain } + } + } + } + # Calculate wounds/death; we use an effect so that we can show it as a tooltip elsewhere. + work_out_wounds_or_death_effect = yes + # Send the final output event & clean up. + remove_single_combat_info_effect = yes + scope:sc_defender = { + if = { + limit = { is_alive = yes } + remove_variable = engaged_in_single_combat + } + } + scope:sc_attacker = { + if = { + limit = { is_alive = yes } + remove_variable = engaged_in_single_combat + } + } + ## We use the initiator if they're alive... + if = { + limit = { + scope:sc_initiator = { is_alive = yes } + } + scope:sc_initiator = { + trigger_event = { saved_event_id = scope:follow_up_event } + } + } + ## Or otherwise the other person. + ### Doesn't hugely matter, technically, since the output event should be from a neutral scope, but if they're dead then the event won't fire and the chain silently invalidates. + else_if = { + limit = { + scope:sc_defender = { is_alive = yes } + } + scope:sc_defender = { + trigger_event = { saved_event_id = scope:follow_up_event } + } + } + else = { + scope:sc_attacker = { + trigger_event = { saved_event_id = scope:follow_up_event } + } + } +} + +# Determine the current chances for either party to injure themselves _before_ the next move is made. +scripted_effect calculate_injury_risks_effect = { + scope:sc_attacker = { + set_variable = { + name = sc_attacker_injury_risk_check + value = { + value = scope:sc_attacker.var:sc_attacker_injury_risk_score + add = scope:sc_attacker.var:sc_attacker_injury_bonus + } + } + } + scope:sc_defender = { + set_variable = { + name = sc_defender_injury_risk_check + value = { + value = scope:sc_defender.var:sc_defender_injury_risk_score + add = scope:sc_defender.var:sc_defender_injury_bonus + } + } + } +} + +# Determine which of the two parties, if either, is currently closest to winning the single combat via skill. +scripted_effect calculate_success_chances_effect = { + scope:sc_attacker = { + set_variable = { + name = sc_attacker_success_check + value = { + value = scope:sc_attacker.var:sc_attacker_duel_success_score + subtract = scope:sc_defender.var:sc_defender_duel_success_score + } + } + } + scope:sc_defender = { + set_variable = { + name = sc_defender_success_check + value = { + value = scope:sc_defender.var:sc_defender_duel_success_score + subtract = scope:sc_attacker.var:sc_attacker_duel_success_score + } + } + } +} + +################################################## +# COMBAT MOVE SCRIPTED EFFECTS + +# Update the results of the current combat move. +scripted_effect adjust_risk_reward_effect = { + # Adjust scope:sc_attacker's scores if we're looking at them. + if = { + limit = { this = scope:sc_attacker } + change_variable = { + name = sc_attacker_injury_risk_score + add = $INJURY_RISK$ + } + change_variable = { + name = sc_attacker_duel_success_score + add = $DUEL_SUCCESS$ + } + } + + # Adjust scope:sc_defender's scores if we're looking at them. + if = { + limit = { this = scope:sc_defender } + change_variable = { + name = sc_defender_injury_risk_score + add = $INJURY_RISK$ + } + change_variable = { + name = sc_defender_duel_success_score + add = $DUEL_SUCCESS$ + } + } + + # Inform the current scope about how this will impact duel_success_score. + if = { + limit = { $DUEL_SUCCESS$ = duel_success_none } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.duel_success.none.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.duel_success.none } + } + else_if = { + limit = { $DUEL_SUCCESS$ = duel_success_low } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.duel_success.low.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.duel_success.low } + } + else_if = { + limit = { $DUEL_SUCCESS$ = duel_success_medium } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.duel_success.medium.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.duel_success.medium } + } + else_if = { + limit = { $DUEL_SUCCESS$ = duel_success_high } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.duel_success.high.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.duel_success.high } + } + else_if = { + limit = { $DUEL_SUCCESS$ = duel_success_very_high } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.duel_success.very_high.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.duel_success.very_high } + } + + # Aaaand finally tell current scope how this'll impact injury_risk_score. + if = { + limit = { $INJURY_RISK$ = injury_risk_none } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.injury.none.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.injury.none } + } + else_if = { + limit = { $INJURY_RISK$ = injury_risk_low } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.injury.low.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.injury.low } + } + else_if = { + limit = { $INJURY_RISK$ = injury_risk_medium } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.injury.medium.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.injury.medium } + } + else_if = { + limit = { $INJURY_RISK$ = injury_risk_high } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.injury.high.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.injury.high } + } + else_if = { + limit = { $INJURY_RISK$ = injury_risk_very_high } + # If this is a past tense tooltip, refer to scope:my_foe grammatically. + if = { + limit = { this = scope:my_foe } + custom_tooltip = single_combat.0001.injury.very_high.has_happened + } + # Otherwise, we do it from first person. + else = { custom_tooltip = single_combat.0001.injury.very_high } + } +} + +# Add positive prowess character modifiers from the current move. +scripted_effect increment_combat_buffs_effect = { + # Determine what our current level of combat buff is. + ## Hidden effect for easy folding & readability. + hidden_effect = { + if = { + limit = { + NOR = { + has_character_modifier = duel_edge_buff_01_modifier + has_character_modifier = duel_edge_buff_02_modifier + has_character_modifier = duel_edge_buff_03_modifier + has_character_modifier = duel_edge_buff_04_modifier + has_character_modifier = duel_edge_buff_05_modifier + has_character_modifier = duel_edge_buff_06_modifier + has_character_modifier = duel_edge_buff_07_modifier + has_character_modifier = duel_edge_buff_08_modifier + has_character_modifier = duel_edge_buff_09_modifier + has_character_modifier = duel_edge_buff_10_modifier + has_character_modifier = duel_edge_buff_11_modifier + has_character_modifier = duel_edge_buff_12_modifier + has_character_modifier = duel_edge_buff_13_modifier + has_character_modifier = duel_edge_buff_14_modifier + has_character_modifier = duel_edge_buff_15_modifier + has_character_modifier = duel_edge_buff_16_modifier + has_character_modifier = duel_edge_buff_17_modifier + has_character_modifier = duel_edge_buff_18_modifier + has_character_modifier = duel_edge_buff_19_modifier + has_character_modifier = duel_edge_buff_20_modifier + has_character_modifier = duel_edge_buff_21_modifier + has_character_modifier = duel_edge_buff_22_modifier + has_character_modifier = duel_edge_buff_23_modifier + has_character_modifier = duel_edge_buff_24_modifier + has_character_modifier = duel_edge_buff_25_modifier + has_character_modifier = duel_edge_buff_26_modifier + has_character_modifier = duel_edge_buff_27_modifier + has_character_modifier = duel_edge_buff_28_modifier + has_character_modifier = duel_edge_buff_29_modifier + has_character_modifier = duel_edge_buff_30_modifier + } + } + set_local_variable = { + name = current_duel_edge_buff + value = 0 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_01_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 1 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_02_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 2 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_03_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 3 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_04_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 4 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_05_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 5 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_06_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 6 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_07_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 7 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_08_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 8 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_09_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 9 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_10_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 10 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_11_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 11 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_12_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 12 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_13_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 13 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_14_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 14 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_15_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 15 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_16_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 16 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_17_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 17 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_18_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 18 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_19_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 19 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_20_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 20 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_21_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 21 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_22_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 22 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_23_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 23 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_24_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 24 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_25_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 25 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_26_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 26 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_27_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 27 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_28_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 28 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_29_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 29 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_buff_30_modifier } + set_local_variable = { + name = current_duel_edge_buff + value = 30 + } + #Show a tooltip in case the character is overflowing at max buff. + custom_tooltip = single_combat.0001.tt.maximum_buff_reached + } + } + # Grab the amount we want to add and change the combat modifier accordingly. + change_local_variable = { + name = current_duel_edge_buff + add = $BUFF_INCREMENT$ + } + # Remove any existing duel edge buffs. + hidden_effect = { remove_temporary_duel_edge_buff_modifiers_effect = yes } + # Add the buff corresponding to our new level of edge. + if = { + limit = { local_var:current_duel_edge_buff = 1 } + add_character_modifier = duel_edge_buff_01_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 2 } + add_character_modifier = duel_edge_buff_02_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 3 } + add_character_modifier = duel_edge_buff_03_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 4 } + add_character_modifier = duel_edge_buff_04_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 5 } + add_character_modifier = duel_edge_buff_05_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 6 } + add_character_modifier = duel_edge_buff_06_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 7 } + add_character_modifier = duel_edge_buff_07_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 8 } + add_character_modifier = duel_edge_buff_08_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 9 } + add_character_modifier = duel_edge_buff_09_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 10 } + add_character_modifier = duel_edge_buff_10_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 11 } + add_character_modifier = duel_edge_buff_11_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 12 } + add_character_modifier = duel_edge_buff_12_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 13 } + add_character_modifier = duel_edge_buff_13_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 14 } + add_character_modifier = duel_edge_buff_14_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 15 } + add_character_modifier = duel_edge_buff_15_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 16 } + add_character_modifier = duel_edge_buff_16_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 17 } + add_character_modifier = duel_edge_buff_17_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 18 } + add_character_modifier = duel_edge_buff_18_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 19 } + add_character_modifier = duel_edge_buff_19_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 20 } + add_character_modifier = duel_edge_buff_20_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 21 } + add_character_modifier = duel_edge_buff_21_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 22 } + add_character_modifier = duel_edge_buff_22_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 23 } + add_character_modifier = duel_edge_buff_23_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 24 } + add_character_modifier = duel_edge_buff_24_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 25 } + add_character_modifier = duel_edge_buff_25_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 26 } + add_character_modifier = duel_edge_buff_26_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 27 } + add_character_modifier = duel_edge_buff_27_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 28 } + add_character_modifier = duel_edge_buff_28_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff = 29 } + add_character_modifier = duel_edge_buff_29_modifier + } + else_if = { + limit = { local_var:current_duel_edge_buff >= 30 } + add_character_modifier = duel_edge_buff_30_modifier + #Show a tooltip in case the character is overflowing at max buff. + custom_tooltip = single_combat.0001.tt.maximum_buff_reached + } + # Finally, note that the character needs a stats recalc. + add_character_flag = sce_needs_forced_recalc_flag +} + +# Add negative prowess character modifiers from the current move. +scripted_effect increment_combat_debuffs_effect = { + # Determine what our current level of combat buff is. + ## Hidden effect for easy folding & readability. + hidden_effect = { + if = { + limit = { + NOR = { + has_character_modifier = duel_edge_debuff_01_modifier + has_character_modifier = duel_edge_debuff_02_modifier + has_character_modifier = duel_edge_debuff_03_modifier + has_character_modifier = duel_edge_debuff_04_modifier + has_character_modifier = duel_edge_debuff_05_modifier + has_character_modifier = duel_edge_debuff_06_modifier + has_character_modifier = duel_edge_debuff_07_modifier + has_character_modifier = duel_edge_debuff_08_modifier + has_character_modifier = duel_edge_debuff_09_modifier + has_character_modifier = duel_edge_debuff_10_modifier + has_character_modifier = duel_edge_debuff_11_modifier + has_character_modifier = duel_edge_debuff_12_modifier + has_character_modifier = duel_edge_debuff_13_modifier + has_character_modifier = duel_edge_debuff_14_modifier + has_character_modifier = duel_edge_debuff_15_modifier + has_character_modifier = duel_edge_debuff_16_modifier + has_character_modifier = duel_edge_debuff_17_modifier + has_character_modifier = duel_edge_debuff_18_modifier + has_character_modifier = duel_edge_debuff_19_modifier + has_character_modifier = duel_edge_debuff_20_modifier + has_character_modifier = duel_edge_debuff_21_modifier + has_character_modifier = duel_edge_debuff_22_modifier + has_character_modifier = duel_edge_debuff_23_modifier + has_character_modifier = duel_edge_debuff_24_modifier + has_character_modifier = duel_edge_debuff_25_modifier + has_character_modifier = duel_edge_debuff_26_modifier + has_character_modifier = duel_edge_debuff_27_modifier + has_character_modifier = duel_edge_debuff_28_modifier + has_character_modifier = duel_edge_debuff_29_modifier + has_character_modifier = duel_edge_debuff_30_modifier + } + } + set_local_variable = { + name = current_duel_edge_debuff + value = 0 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_01_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 1 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_02_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 2 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_03_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 3 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_04_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 4 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_05_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 5 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_06_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 6 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_07_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 7 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_08_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 8 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_09_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 9 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_10_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 10 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_11_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 11 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_12_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 12 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_13_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 13 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_14_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 14 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_15_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 15 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_16_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 16 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_17_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 17 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_18_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 18 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_19_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 19 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_20_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 20 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_21_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 21 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_22_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 22 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_23_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 23 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_24_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 24 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_25_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 25 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_26_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 26 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_27_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 27 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_28_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 28 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_29_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 29 + } + } + else_if = { + limit = { has_character_modifier = duel_edge_debuff_30_modifier } + set_local_variable = { + name = current_duel_edge_debuff + value = 30 + } + #Show a tooltip in case the character is overflowing at max buff. + custom_tooltip = single_combat.0001.tt.maximum_debuff_reached + } + } + # Grab the amount we want to add and change the combat modifier accordingly. + change_local_variable = { + name = current_duel_edge_debuff + add = $DEBUFF_INCREMENT$ + } + # Remove any existing duel edge buffs. + hidden_effect = { remove_temporary_duel_edge_debuff_modifiers_effect = yes } + # Add the buff corresponding to our new level of edge. + if = { + limit = { local_var:current_duel_edge_debuff = 1 } + add_character_modifier = duel_edge_debuff_01_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 2 } + add_character_modifier = duel_edge_debuff_02_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 3 } + add_character_modifier = duel_edge_debuff_03_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 4 } + add_character_modifier = duel_edge_debuff_04_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 5 } + add_character_modifier = duel_edge_debuff_05_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 6 } + add_character_modifier = duel_edge_debuff_06_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 7 } + add_character_modifier = duel_edge_debuff_07_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 8 } + add_character_modifier = duel_edge_debuff_08_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 9 } + add_character_modifier = duel_edge_debuff_09_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 10 } + add_character_modifier = duel_edge_debuff_10_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 11 } + add_character_modifier = duel_edge_debuff_11_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 12 } + add_character_modifier = duel_edge_debuff_12_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 13 } + add_character_modifier = duel_edge_debuff_13_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 14 } + add_character_modifier = duel_edge_debuff_14_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 15 } + add_character_modifier = duel_edge_debuff_15_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 16 } + add_character_modifier = duel_edge_debuff_16_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 17 } + add_character_modifier = duel_edge_debuff_17_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 18 } + add_character_modifier = duel_edge_debuff_18_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 19 } + add_character_modifier = duel_edge_debuff_19_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 20 } + add_character_modifier = duel_edge_debuff_20_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 21 } + add_character_modifier = duel_edge_debuff_21_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 22 } + add_character_modifier = duel_edge_debuff_22_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 23 } + add_character_modifier = duel_edge_debuff_23_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 24 } + add_character_modifier = duel_edge_debuff_24_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 25 } + add_character_modifier = duel_edge_debuff_25_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 26 } + add_character_modifier = duel_edge_debuff_26_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 27 } + add_character_modifier = duel_edge_debuff_27_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 28 } + add_character_modifier = duel_edge_debuff_28_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff = 29 } + add_character_modifier = duel_edge_debuff_29_modifier + } + else_if = { + limit = { local_var:current_duel_edge_debuff >= 30 } + add_character_modifier = duel_edge_debuff_30_modifier + #Show a tooltip in case the character is overflowing at max buff. + custom_tooltip = single_combat.0001.tt.maximum_debuff_reached + } + # Finally, note that the character needs a stats recalc. + add_character_flag = sce_needs_forced_recalc_flag +} + +# Tier One move effects +scripted_effect combat_move_wait_and_hope_effect = { + #No special effects. + + #Iterate last move for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:wait_and_hope + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:wait_and_hope + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_low + } +} +scripted_effect combat_move_unsure_attack_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:unsure_attack + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:unsure_attack + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_high + DUEL_SUCCESS = duel_success_medium + } +} +scripted_effect combat_move_enthusiastic_onslaught_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:enthusiastic_onslaught + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:enthusiastic_onslaught + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_very_high + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_hail_mary_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:hail_mary + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:hail_mary + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_high + DUEL_SUCCESS = duel_success_very_high + } +} +scripted_effect combat_move_pocket_sand_effect = { + # Your opponent gets grit in their eyes! + ## Scope:sc_attacker first. + if = { + limit = { this = scope:sc_attacker } + scope:sc_defender = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 4 } + } + } + ## Then scope:sc_defender. + if = { + limit = { this = scope:sc_defender } + scope:sc_attacker = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 4 } + } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:pocket_sand + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:pocket_sand + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_none + } +} +scripted_effect combat_move_nut_em_effect = { + # A headbutt to the face often offends. Both parties, really. + scope:sc_attacker = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 4 } + } + scope:sc_defender = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 4 } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:nut_em + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:nut_em + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_high + DUEL_SUCCESS = duel_success_medium + } +} + +# Tier Two move effects +scripted_effect combat_move_guard_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:guard + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:guard + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_low + } +} +scripted_effect combat_move_probing_attack_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:probing_attack + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:probing_attack + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_medium + } +} +scripted_effect combat_move_onslaught_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:onslaught + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:onslaught + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_high + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_surprise_attack_effect = { + #Special effects taken care of in risk-reward section. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:surprise_attack + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:surprise_attack + } + } + + #And adjust risk-reward scores. + if = { + limit = { + OR = { + AND = { + this = scope:sc_attacker + scope:sc_defender = { has_trait = trusting } + } + AND = { + this = scope:sc_defender + scope:sc_attacker = { has_trait = trusting } + } + } + } + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_very_high + } + } + else = { + random_list = { + 33 = { + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_low + } + } + 34 = { + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_medium + } + } + 33 = { + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_high + } + } + } + } +} +scripted_effect combat_move_taunt_effect = { + #Your AI opponent becomes enraged. + if = { + limit = { this = scope:sc_attacker } + scope:sc_defender = { + add_character_modifier = { modifier = combat_move_taunt_modifier } + } + } + if = { + limit = { this = scope:sc_defender } + scope:sc_attacker = { + add_character_modifier = { modifier = combat_move_taunt_modifier } + } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:taunt + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:taunt + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_none + } +} +scripted_effect combat_move_put_the_boot_in_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:put_the_boot_in + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:put_the_boot_in + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_very_high + DUEL_SUCCESS = duel_success_very_high + } +} + +# Tier Three move effects +scripted_effect combat_move_strict_guard_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:strict_guard + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:strict_guard + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_low + } +} +scripted_effect combat_move_confident_attack_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:confident_attack + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:confident_attack + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_medium + } +} +scripted_effect combat_move_expert_onslaught_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:expert_onslaught + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:expert_onslaught + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_attempt_disarm_effect = { + # You attempt to disarm your opponent, making their grip on their weapon shaky. + ## Scope:sc_attacker first. + if = { + limit = { this = scope:sc_attacker } + scope:sc_defender = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 6 } + } + } + ## Then scope:sc_defender. + if = { + limit = { this = scope:sc_defender } + scope:sc_attacker = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 6 } + } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:attempt_disarm + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:attempt_disarm + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_low + } +} +scripted_effect combat_move_lightning_assault_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:lightning_assault + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:lightning_assault + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_high + DUEL_SUCCESS = duel_success_very_high + } +} +scripted_effect combat_move_tire_opponent_effect = { + # Drastically improve your own wound threshold due to relative tiredness. + if = { + limit = { this = scope:sc_attacker } + change_variable = { + name = sc_attacker_injury_risk_score + add = combat_move_wound_threshold_bonus_2 + } + custom_tooltip = single_combat.0001.wound_threshold.medium_bonus.tt + } + if = { + limit = { this = scope:sc_defender } + change_variable = { + name = sc_defender_injury_risk_score + add = combat_move_wound_threshold_bonus_2 + } + custom_tooltip = single_combat.0001.wound_threshold.medium_bonus.tt + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:tire_opponent + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:tire_opponent + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_low + } +} + +# High Secondary Skill move effects +scripted_effect combat_move_reason_you_suck_speech_effect = { + # Explain, at length, why your opponent is a cad & you're rad. + add_prestige = combat_move_reason_you_suck_speech_value + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:reason_you_suck_speech + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:reason_you_suck_speech + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_none + } +} +scripted_effect combat_move_technique_from_legend_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:technique_from_legend + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:technique_from_legend + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_like_a_viper_effect = { + # Drastically reduce your opponent's wound threshold by off-balancing them. + if = { + limit = { this = scope:sc_attacker } + scope:sc_defender = { + change_variable = { + name = sc_defender_injury_risk_score + add = combat_move_wound_threshold_malus_2 + } + } + custom_tooltip = single_combat.0001.wound_threshold.medium_malus.tt + } + if = { + limit = { this = scope:sc_defender } + scope:sc_attacker = { + change_variable = { + name = sc_attacker_injury_risk_score + add = combat_move_wound_threshold_malus_2 + } + } + custom_tooltip = single_combat.0001.wound_threshold.medium_malus.tt + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:like_a_viper + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:like_a_viper + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_pocket_silver_effect = { + # You fling a purse of silver right at your opponent's face. + ## We deliberately don't use pay_short_term_gold, since that'll read weirdly to the player. + if = { + limit = { this = scope:sc_attacker } + remove_short_term_gold = combat_move_pocket_silver_value + scope:sc_defender = { add_gold = combat_move_pocket_silver_value } + } + if = { + limit = { this = scope:sc_defender } + remove_short_term_gold = combat_move_pocket_silver_value + scope:sc_attacker = { add_gold = combat_move_pocket_silver_value } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:pocket_silver + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:pocket_silver + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_medium + } +} +scripted_effect combat_move_martial_voice_effect = { + # You go drill sergeant on your opponent. + ## Scope:sc_attacker first. + if = { + limit = { this = scope:sc_attacker } + scope:sc_defender = { + # Arrogant characters are a bit less susceptible to this. + if = { + limit = { has_trait = arrogant } + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 2 } + } + else = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 4 } + } + } + } + ## Then we look at scope:sc_defender. + else_if = { + limit = { this = scope:sc_defender } + scope:sc_attacker = { + # Arrogant characters are a bit less susceptible to this. + if = { + limit = { has_trait = arrogant } + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 2 } + } + else = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 4 } + } + } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:martial_voice + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:martial_voice + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_none + } +} +scripted_effect combat_move_mocking_boast_effect = { + # Your opponent takes +4 levels of combat debuffs, and some stress. + ## Scope:sc_attacker first. + if = { + limit = { this = scope:sc_attacker } + scope:sc_defender = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 2 } + # Arrogant characters are a bit more susceptible. + if = { + limit = { has_trait = arrogant } + add_stress = medium_stress_gain + } + else = { add_stress = minor_stress_gain } + } + } + ## Then we look at scope:sc_defender. + else_if = { + limit = { this = scope:sc_defender } + scope:sc_attacker = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 2 } + # Arrogant characters are a bit more susceptible. + if = { + limit = { has_trait = arrogant } + add_stress = medium_stress_gain + } + else = { add_stress = minor_stress_gain } + } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:mocking_boast + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:mocking_boast + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_none + } +} + +# Location-Specific move effects +scripted_effect combat_move_is_that_a_crocodile_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:is_that_a_crocodile + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:is_that_a_crocodile + } + } + + # Maximum of one crocodile per fight. + save_scope_value_as = { + name = had_crocodile + value = yes + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_very_high + } +} +scripted_effect combat_move_desert_warrior_effect = { + #Add +2 ranks of combat buff. + increment_combat_buffs_effect = { BUFF_INCREMENT = 2 } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:desert_warrior + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:desert_warrior + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_jungle_stalker_effect = { + #Add +2 ranks of combat buff. + increment_combat_buffs_effect = { BUFF_INCREMENT = 2 } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:jungle_stalker + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:jungle_stalker + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_open_terrain_expert_effect = { + #Add +2 ranks of combat buff. + increment_combat_buffs_effect = { BUFF_INCREMENT = 2 } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:open_terrain_expert + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:open_terrain_expert + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_rough_terrain_expert_effect = { + #Add +2 ranks of combat buff. + increment_combat_buffs_effect = { BUFF_INCREMENT = 2 } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:rough_terrain_expert + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:rough_terrain_expert + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_forest_fighter_effect = { + #Add +2 ranks of combat buff. + increment_combat_buffs_effect = { BUFF_INCREMENT = 2 } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:forest_fighter + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:forest_fighter + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_high + } +} + +# Trait-Specific move effects +scripted_effect combat_move_raaargh_effect = { + #Going berserk is a major stress relief. + add_stress = medium_stress_loss + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:raaargh + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:raaargh + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_very_high + } +} +scripted_effect combat_move_hard_grit_effect = { + #Add +4 ranks of combat buff. + increment_combat_buffs_effect = { BUFF_INCREMENT = 4 } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:hard_grit + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:hard_grit + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_feint_and_stab_effect = { + # Quick-thinking is a habit. + add_character_modifier = { + modifier = combat_move_feint_and_stab_modifier + years = 5 + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:feint_and_stab + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:feint_and_stab + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_butchery_effect = { + # Show people what happens when they mess with you. + add_dread = combat_move_butchery_dread_value + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:butchery + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:butchery + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_high + } +} +scripted_effect combat_move_stoic_veteran_effect = { + # You didn't die in Miklagard, you won't die here, you won't even die soon. + add_character_modifier = { + modifier = combat_move_stoic_veteran_modifier + years = 5 + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:stoic_veteran + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:stoic_veteran + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_medium + } +} +scripted_effect combat_move_blade_dance_effect = { + # Show off your skill with the blade. + add_prestige = combat_move_blade_dance_value + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:blade_dance + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:blade_dance + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_high + } +} +## Not a separate combat move, just an effect inside the subsequent one. +scripted_effect combat_move_wrath_of_highgod_piety_reward_effect = { + # Non-scripted values used to keep the piety amount low; you might take this option several times in one duel, so we don't really want you to be farming piety from it. + + # Righteous faiths give little piety + if = { + limit = { + faith = { + faith_hostility_level = { + target = $MY_FOE$.faith + value = faith_fully_accepted_level + } + } + } + add_piety = 10 + } + # Astray faiths are a bit further from the light + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = $MY_FOE$.faith + value = faith_astray_level + } + } + } + add_piety = 25 + } + # Hostile faiths make HighGod sit up and take notice + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = $MY_FOE$.faith + value = faith_hostile_level + } + } + } + add_piety = 50 + } + # Evil faiths are actually worth writing home about + else_if = { + limit = { + faith = { + faith_hostility_level = { + target = $MY_FOE$.faith + value = faith_evil_level + } + } + } + add_piety = 75 + } +} +scripted_effect combat_move_wrath_of_highgod_effect = { + #Earn piety scaling with how intolerant you are of your opponent. + if = { + limit = { this = scope:sc_attacker } + combat_move_wrath_of_highgod_piety_reward_effect = { MY_FOE = scope:sc_defender } + } + if = { + limit = { this = scope:sc_defender } + combat_move_wrath_of_highgod_piety_reward_effect = { MY_FOE = scope:sc_attacker } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:wrath_of_highgod + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:wrath_of_highgod + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_low + } +} +scripted_effect combat_move_hurt_me_better_effect = { + # Deviant characters can cancel out their wound penalties, or gain a moderate buff otherwise. + if = { + limit = { + # To cancel out wounded, they must have any wounded trait. + has_trait = wounded + # And must not have cancelled it out already. + NOR = { + has_character_modifier = combat_move_hurt_me_better_wounded_1_modifier + has_character_modifier = combat_move_hurt_me_better_wounded_2_modifier + has_character_modifier = combat_move_hurt_me_better_wounded_3_modifier + } + } + if = { + limit = { has_trait = wounded_1 } + add_character_modifier = combat_move_hurt_me_better_wounded_1_modifier + } + else_if = { + limit = { has_trait = wounded_2 } + add_character_modifier = combat_move_hurt_me_better_wounded_2_modifier + } + else_if = { + limit = { has_trait = wounded_3 } + add_character_modifier = combat_move_hurt_me_better_wounded_3_modifier + } + } + else = { + # Otherwise, we just buff their duel edge twice. + increment_combat_buffs_effect = { BUFF_INCREMENT = 2 } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:hurt_me_better + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:hurt_me_better + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_medium + DUEL_SUCCESS = duel_success_medium + } +} + +# Misc move effects +scripted_effect combat_move_special_fallback_effect = { + #No special effects. + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:special_fallback + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:special_fallback + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_low + DUEL_SUCCESS = duel_success_low + } +} +scripted_effect combat_move_something_to_hide_effect = { + # You imply that things might go poorly for your opponent if they don't back down. + ## Scope:sc_attacker first. + if = { + limit = { this = scope:sc_attacker } + # If the hook is strong, then add +8 ranks of combat debuff for your opponent. + if = { + limit = { has_strong_usable_hook = scope:sc_defender } + scope:sc_defender = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 8 } + } + } + # Otherwise, we only add +4 ranks. + else = { + scope:sc_defender = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 4 } + } + } + } + ## Then scope:sc_defender. + if = { + limit = { this = scope:sc_defender } + # If the hook is strong, then add +8 ranks of combat debuff for your opponent. + if = { + limit = { has_strong_usable_hook = scope:sc_attacker } + scope:sc_attacker = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 8 } + } + } + # Otherwise, we only add +4 ranks. + else = { + scope:sc_attacker = { + increment_combat_debuffs_effect = { DEBUFF_INCREMENT = 4 } + } + } + } + + #Change the last move registered for loc purposes. + if = { + limit = { this = scope:sc_attacker } + save_scope_value_as = { + name = sc_attacker_last_move + value = flag:something_to_hide + } + } + if = { + limit = { this = scope:sc_defender } + save_scope_value_as = { + name = sc_defender_last_move + value = flag:something_to_hide + } + } + + #And adjust risk-reward scores. + adjust_risk_reward_effect = { + INJURY_RISK = injury_risk_none + DUEL_SUCCESS = duel_success_none + } +} + +# Artifact damage effect - input slot type, chance for damage to happen at all, and max possible damage as percent of max possible +scripted_effect may_damage_artifact_effect = { + if = { + limit = { + any_equipped_character_artifact = { artifact_slot_type = $TYPE$ } + } + random_equipped_character_artifact = { + limit = { artifact_slot_type = $TYPE$ } + random = { + chance = $CHANCE$ + add_durability = { + value = artifact_max_durability + multiply = { + value = { + integer_range = { + min = 5 + max = $PERCENT$ + } + } + multiply = -0.01 + } + } + } + } + } +} + +################################################## +# SINGLE COMBAT EVENTS + +################################################## +# Participant Events +# by Ewan Cowhig Croft +# 0001 - 0020 +################################################## + +# Standard combat event. +single_combat.0001 = { + type = character_event + window = duel_event + title = { + first_valid = { + triggered_desc = { + trigger = { this = scope:sc_defender } + desc = single_combat.0001.t + } + triggered_desc = { + trigger = { this = scope:sc_attacker } + desc = single_combat.0011.t + } + } + } + desc = { + first_valid = { + #If we're scope:sc_defender, give us defensive descs. + triggered_desc = { + trigger = { this = scope:sc_defender } + desc = { + # First round. + ## We just play an intro spiel. + triggered_desc = { + trigger = { scope:sc_defender.var:current_round = 1 } + desc = single_combat.0001.desc.sc_defender.intro + } + ## Slightly different capstone speeches, depending on how deadly the duel is expected to be. + triggered_desc = { + trigger = { + scope:sc_defender.var:current_round = 1 + duel_will_end_in_opponent_death_trigger = no + } + desc = single_combat.0001.desc.capstone.intro.first_blood + } + triggered_desc = { + trigger = { + scope:sc_defender.var:current_round = 1 + duel_will_end_in_opponent_death_trigger = yes + } + desc = single_combat.0001.desc.capstone.intro.deadly + } + # Scope:sc_defender feedback. + ## So you can see a bit of fairly-static feedback on how your selected combat move went. + triggered_desc = { + trigger = { exists = scope:sc_defender_last_move } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:wait_and_hope + duel_will_end_in_my_death_trigger = yes + NOT = { has_trait = brave } + } + desc = single_combat.0001.desc.my_feedback.wait_and_hope.will_die + } + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:wait_and_hope + OR = { + duel_will_end_in_my_death_trigger = no + has_trait = brave + } + } + desc = single_combat.0001.desc.my_feedback.wait_and_hope.will_live + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:unsure_attack } + desc = single_combat.0001.desc.my_feedback.unsure_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0001.desc.my_feedback.enthusiastic_onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hail_mary } + desc = single_combat.0001.desc.my_feedback.hail_mary + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:pocket_sand } + desc = single_combat.0001.desc.my_feedback.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:nut_em } + desc = single_combat.0001.desc.my_feedback.nut_em + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:guard } + desc = single_combat.0001.desc.my_feedback.guard + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:probing_attack } + desc = single_combat.0001.desc.my_feedback.probing_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:onslaught } + desc = single_combat.0001.desc.my_feedback.onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:surprise_attack } + desc = single_combat.0001.desc.my_feedback.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:taunt } + desc = single_combat.0001.desc.my_feedback.taunt + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:put_the_boot_in } + desc = single_combat.0001.desc.my_feedback.put_the_boot_in + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:strict_guard } + desc = single_combat.0001.desc.my_feedback.strict_guard + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:confident_attack } + desc = single_combat.0001.desc.my_feedback.confident_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:expert_onslaught } + desc = single_combat.0001.desc.my_feedback.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:attempt_disarm } + desc = single_combat.0001.desc.my_feedback.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:lightning_assault } + desc = single_combat.0001.desc.my_feedback.lightning_assault + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:tire_opponent } + desc = single_combat.0001.desc.my_feedback.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:reason_you_suck_speech } + desc = single_combat.0001.desc.my_feedback.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:technique_from_legend } + desc = single_combat.0001.desc.my_feedback.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:like_a_viper } + desc = single_combat.0001.desc.my_feedback.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:pocket_silver } + desc = single_combat.0001.desc.my_feedback.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:martial_voice } + desc = single_combat.0001.desc.my_feedback.martial_voice + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:mocking_boast } + desc = single_combat.0001.desc.my_feedback.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:is_that_a_crocodile } + desc = single_combat.0001.desc.my_feedback.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:desert_warrior } + desc = single_combat.0001.desc.my_feedback.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:jungle_stalker } + desc = single_combat.0001.desc.my_feedback.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:open_terrain_expert } + desc = single_combat.0001.desc.my_feedback.open_terrain_expert + } + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0001.desc.my_feedback.rough_terrain_expert.rocky + } + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0001.desc.my_feedback.rough_terrain_expert.boggy + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:forest_fighter } + desc = single_combat.0001.desc.my_feedback.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:raaargh } + desc = single_combat.0001.desc.my_feedback.raaargh + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hard_grit } + desc = single_combat.0001.desc.my_feedback.hard_grit + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:feint_and_stab } + desc = single_combat.0001.desc.my_feedback.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:butchery } + desc = single_combat.0001.desc.my_feedback.butchery + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:stoic_veteran } + desc = single_combat.0001.desc.my_feedback.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:blade_dance } + desc = single_combat.0001.desc.my_feedback.blade_dance + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:wrath_of_highgod } + desc = single_combat.0001.desc.my_feedback.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hurt_me_better } + desc = single_combat.0001.desc.my_feedback.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:special_fallback } + desc = single_combat.0001.desc.my_feedback.special_fallback + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:something_to_hide } + desc = single_combat.0001.desc.my_feedback.something_to_hide + } + } + } + } + # Scope:sc_attacker responses. + ## What move did your opponent pick, and how does that play out from your POV? + triggered_desc = { + trigger = { exists = scope:sc_attacker_last_move } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0001.desc.opponent_response.wait_and_hope + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0001.desc.opponent_response.unsure_attack + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:enthusiastic_onslaught + scope:sc_attacker = { house_not_allowed_to_yell_motto_trigger = yes } + } + desc = single_combat.0001.desc.opponent_response.enthusiastic_onslaught.banned_house + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:enthusiastic_onslaught + scope:sc_attacker.house = scope:sc_defender.house + } + desc = single_combat.0001.desc.opponent_response.enthusiastic_onslaught.own_house + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:enthusiastic_onslaught + #Otherwise, we can shout the motto. + } + desc = single_combat.0001.desc.opponent_response.enthusiastic_onslaught.motto + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0001.desc.opponent_response.hail_mary + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0001.desc.opponent_response.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0001.desc.opponent_response.nut_em + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0001.desc.opponent_response.guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0001.desc.opponent_response.probing_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0001.desc.opponent_response.onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0001.desc.opponent_response.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0001.desc.opponent_response.taunt + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0001.desc.opponent_response.put_the_boot_in + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0001.desc.opponent_response.strict_guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0001.desc.opponent_response.confident_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0001.desc.opponent_response.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0001.desc.opponent_response.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:lightning_assault } + desc = single_combat.0001.desc.opponent_response.lightning_assault + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0001.desc.opponent_response.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0001.desc.opponent_response.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0001.desc.opponent_response.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0001.desc.opponent_response.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0001.desc.opponent_response.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0001.desc.opponent_response.martial_voice + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0001.desc.opponent_response.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0001.desc.opponent_response.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0001.desc.opponent_response.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0001.desc.opponent_response.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0001.desc.opponent_response.open_terrain_expert + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0001.desc.opponent_response.rough_terrain_expert.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0001.desc.opponent_response.rough_terrain_expert.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0001.desc.opponent_response.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0001.desc.opponent_response.raaargh + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0001.desc.opponent_response.hard_grit + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0001.desc.opponent_response.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0001.desc.opponent_response.butchery + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0001.desc.opponent_response.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0001.desc.opponent_response.blade_dance + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0001.desc.opponent_response.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0001.desc.opponent_response.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0001.desc.opponent_response.special_fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0001.desc.opponent_response.something_to_hide + } + } + } + } + # Duel status updates. + triggered_desc = { + trigger = { scope:sc_defender.var:current_round > 1 } + desc = { + first_valid = { + # Injury updates. + ## For scope:sc_defender. + ### Injury chance very unlikely. + triggered_desc = { + trigger = { sc_defender_injury_check_actual <= single_combat_injury_very_unlikely_value } + desc = single_combat.0001.desc.injury_check.personal.very_unlikely + } + ### Injury chance unlikely. + triggered_desc = { + trigger = { sc_defender_injury_check_actual <= single_combat_injury_unlikely_value } + desc = single_combat.0001.desc.injury_check.personal.unlikely + } + ### Injury chance moderate. + triggered_desc = { + trigger = { sc_defender_injury_check_actual <= single_combat_injury_neutral_value } + desc = single_combat.0001.desc.injury_check.personal.moderate + } + ### Injury chance likely. + triggered_desc = { + trigger = { sc_defender_injury_check_actual <= single_combat_injury_likely_value } + desc = single_combat.0001.desc.injury_check.personal.likely + } + ### Injury chance very likely. + desc = single_combat.0001.desc.injury_check.personal.very_likely + } + first_valid = { + ## For scope:sc_attacker. + ### Injury chance very unlikely. + triggered_desc = { + trigger = { sc_attacker_injury_check_actual <= single_combat_injury_very_unlikely_value } + desc = single_combat.0001.desc.injury_check.opponent.very_unlikely + } + ### Injury chance unlikely. + triggered_desc = { + trigger = { sc_attacker_injury_check_actual <= single_combat_injury_unlikely_value } + desc = single_combat.0001.desc.injury_check.opponent.unlikely + } + ### Injury chance moderate. + triggered_desc = { + trigger = { sc_attacker_injury_check_actual <= single_combat_injury_neutral_value } + desc = single_combat.0001.desc.injury_check.opponent.moderate + } + ### Injury chance likely. + triggered_desc = { + trigger = { sc_attacker_injury_check_actual <= single_combat_injury_likely_value } + desc = single_combat.0001.desc.injury_check.opponent.likely + } + ### Injury chance very likely. + desc = single_combat.0001.desc.injury_check.opponent.very_likely + } + first_valid = { + # Success updates. + ## Victory almost impossible. + triggered_desc = { + trigger = { scope:sc_defender.var:sc_defender_success_check <= single_combat_success_almost_impossible_value } + desc = single_combat.0001.desc.success_check.almost_impossible + } + ## Victory very unlikely. + triggered_desc = { + trigger = { scope:sc_defender.var:sc_defender_success_check <= single_combat_success_very_unlikely_value } + desc = single_combat.0001.desc.success_check.very_unlikely + } + ## Victory unlikely. + triggered_desc = { + trigger = { scope:sc_defender.var:sc_defender_success_check <= single_combat_success_unlikely_value } + desc = single_combat.0001.desc.success_check.unlikely + } + ## Victory in the balance. + triggered_desc = { + trigger = { scope:sc_defender.var:sc_defender_success_check <= single_combat_success_likely_value } + desc = single_combat.0001.desc.success_check.moderate + } + ## Victory likely. + triggered_desc = { + trigger = { scope:sc_defender.var:sc_defender_success_check <= single_combat_success_very_likely_value } + desc = single_combat.0001.desc.success_check.likely + } + ## Victory very likely. + triggered_desc = { + trigger = { scope:sc_defender.var:sc_defender_success_check <= single_combat_success_almost_certain_value } + desc = single_combat.0001.desc.success_check.very_likely + } + ## Victory almost certain. + desc = single_combat.0001.desc.success_check.almost_certain + } + } + } + } + } + #Otherwise, give us the offensive descs. Triggered_desc kept for indenting. + triggered_desc = { + trigger = { this = scope:sc_attacker } + desc = { + # First round. + ## We just play an intro spiel. + triggered_desc = { + trigger = { scope:sc_defender.var:current_round = 1 } + desc = single_combat.0001.desc.sc_attacker.intro + } + ## Slightly different capstone speeches, depending on how deadly the duel is expected to be. + triggered_desc = { + trigger = { + scope:sc_defender.var:current_round = 1 + duel_will_end_in_opponent_death_trigger = no + } + desc = single_combat.0001.desc.capstone.intro.first_blood + } + triggered_desc = { + trigger = { + scope:sc_defender.var:current_round = 1 + duel_will_end_in_opponent_death_trigger = yes + } + desc = single_combat.0001.desc.capstone.intro.deadly + } + triggered_desc = { + trigger = { scope:sc_defender.var:current_round = 1 } + desc = single_combat.0001.desc.sc_attacker.intro.epilogue + } + # Scope:sc_attacker feedback. + ## So you can see a bit of fairly-static feedback on how your selected combat move went. + triggered_desc = { + trigger = { exists = scope:sc_attacker_last_move } + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:wait_and_hope + duel_will_end_in_my_death_trigger = yes + NOT = { has_trait = brave } + } + desc = single_combat.0001.desc.my_feedback.wait_and_hope.will_die + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:wait_and_hope + OR = { + duel_will_end_in_my_death_trigger = no + has_trait = brave + } + } + desc = single_combat.0001.desc.my_feedback.wait_and_hope.will_live + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0001.desc.my_feedback.unsure_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0001.desc.my_feedback.enthusiastic_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0001.desc.my_feedback.hail_mary + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0001.desc.my_feedback.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0001.desc.my_feedback.nut_em + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0001.desc.my_feedback.guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0001.desc.my_feedback.probing_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0001.desc.my_feedback.onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0001.desc.my_feedback.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0001.desc.my_feedback.taunt + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0001.desc.my_feedback.put_the_boot_in + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0001.desc.my_feedback.strict_guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0001.desc.my_feedback.confident_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0001.desc.my_feedback.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0001.desc.my_feedback.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:lightning_assault } + desc = single_combat.0001.desc.my_feedback.lightning_assault + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0001.desc.my_feedback.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0001.desc.my_feedback.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0001.desc.my_feedback.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0001.desc.my_feedback.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0001.desc.my_feedback.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0001.desc.my_feedback.martial_voice + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0001.desc.my_feedback.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0001.desc.my_feedback.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0001.desc.my_feedback.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0001.desc.my_feedback.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0001.desc.my_feedback.open_terrain_expert + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0001.desc.my_feedback.rough_terrain_expert.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0001.desc.my_feedback.rough_terrain_expert.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0001.desc.my_feedback.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0001.desc.my_feedback.raaargh + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0001.desc.my_feedback.hard_grit + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0001.desc.my_feedback.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0001.desc.my_feedback.butchery + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0001.desc.my_feedback.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0001.desc.my_feedback.blade_dance + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0001.desc.my_feedback.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0001.desc.my_feedback.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0001.desc.my_feedback.special_fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0001.desc.my_feedback.something_to_hide + } + } + } + } + # Scope:sc_defender responses. + ## What move did your opponent pick, and how does that play out from your POV? + triggered_desc = { + trigger = { exists = scope:sc_defender_last_move } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:wait_and_hope } + desc = single_combat.0001.desc.opponent_response.wait_and_hope + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:unsure_attack } + desc = single_combat.0001.desc.opponent_response.unsure_attack + } + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:enthusiastic_onslaught + scope:sc_defender = { house_not_allowed_to_yell_motto_trigger = yes } + } + desc = single_combat.0001.desc.opponent_response.enthusiastic_onslaught.banned_house + } + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:enthusiastic_onslaught + scope:sc_defender.house = scope:sc_attacker.house + } + desc = single_combat.0001.desc.opponent_response.enthusiastic_onslaught.own_house + } + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:enthusiastic_onslaught + #Otherwise, we can shout the motto. + } + desc = single_combat.0001.desc.opponent_response.enthusiastic_onslaught.motto + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hail_mary } + desc = single_combat.0001.desc.opponent_response.hail_mary + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:pocket_sand } + desc = single_combat.0001.desc.opponent_response.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:nut_em } + desc = single_combat.0001.desc.opponent_response.nut_em + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:guard } + desc = single_combat.0001.desc.opponent_response.guard + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:probing_attack } + desc = single_combat.0001.desc.opponent_response.probing_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:onslaught } + desc = single_combat.0001.desc.opponent_response.onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:surprise_attack } + desc = single_combat.0001.desc.opponent_response.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:taunt } + desc = single_combat.0001.desc.opponent_response.taunt + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:put_the_boot_in } + desc = single_combat.0001.desc.opponent_response.put_the_boot_in + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:strict_guard } + desc = single_combat.0001.desc.opponent_response.strict_guard + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:confident_attack } + desc = single_combat.0001.desc.opponent_response.confident_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:expert_onslaught } + desc = single_combat.0001.desc.opponent_response.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:attempt_disarm } + desc = single_combat.0001.desc.opponent_response.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:lightning_assault } + desc = single_combat.0001.desc.opponent_response.lightning_assault + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:tire_opponent } + desc = single_combat.0001.desc.opponent_response.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:reason_you_suck_speech } + desc = single_combat.0001.desc.opponent_response.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:technique_from_legend } + desc = single_combat.0001.desc.opponent_response.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:like_a_viper } + desc = single_combat.0001.desc.opponent_response.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:pocket_silver } + desc = single_combat.0001.desc.opponent_response.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:martial_voice } + desc = single_combat.0001.desc.opponent_response.martial_voice + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:mocking_boast } + desc = single_combat.0001.desc.opponent_response.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:is_that_a_crocodile } + desc = single_combat.0001.desc.opponent_response.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:desert_warrior } + desc = single_combat.0001.desc.opponent_response.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:jungle_stalker } + desc = single_combat.0001.desc.opponent_response.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:open_terrain_expert } + desc = single_combat.0001.desc.opponent_response.open_terrain_expert + } + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0001.desc.opponent_response.rough_terrain_expert.rocky + } + triggered_desc = { + trigger = { + scope:sc_defender_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0001.desc.opponent_response.rough_terrain_expert.boggy + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:forest_fighter } + desc = single_combat.0001.desc.opponent_response.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:raaargh } + desc = single_combat.0001.desc.opponent_response.raaargh + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hard_grit } + desc = single_combat.0001.desc.opponent_response.hard_grit + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:feint_and_stab } + desc = single_combat.0001.desc.opponent_response.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:butchery } + desc = single_combat.0001.desc.opponent_response.butchery + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:stoic_veteran } + desc = single_combat.0001.desc.opponent_response.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:blade_dance } + desc = single_combat.0001.desc.opponent_response.blade_dance + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:wrath_of_highgod } + desc = single_combat.0001.desc.opponent_response.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hurt_me_better } + desc = single_combat.0001.desc.opponent_response.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:special_fallback } + desc = single_combat.0001.desc.opponent_response.special_fallback + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:something_to_hide } + desc = single_combat.0001.desc.opponent_response.something_to_hide + } + } + } + } + # Duel status updates. + triggered_desc = { + trigger = { scope:sc_defender.var:current_round > 1 } + desc = { + first_valid = { + # Injury updates. + ## For scope:sc_attacker. + ### Injury chance very unlikely. + triggered_desc = { + trigger = { sc_attacker_injury_check_actual <= single_combat_injury_very_unlikely_value } + desc = single_combat.0001.desc.injury_check.personal.very_unlikely + } + ### Injury chance unlikely. + triggered_desc = { + trigger = { sc_attacker_injury_check_actual <= single_combat_injury_unlikely_value } + desc = single_combat.0001.desc.injury_check.personal.unlikely + } + ### Injury chance moderate. + triggered_desc = { + trigger = { sc_attacker_injury_check_actual <= single_combat_injury_neutral_value } + desc = single_combat.0001.desc.injury_check.personal.moderate + } + ### Injury chance likely. + triggered_desc = { + trigger = { sc_attacker_injury_check_actual <= single_combat_injury_likely_value } + desc = single_combat.0001.desc.injury_check.personal.likely + } + ### Injury chance very likely. + desc = single_combat.0001.desc.injury_check.personal.very_likely + } + first_valid = { + ## For scope:sc_defender. + ### Injury chance very unlikely. + triggered_desc = { + trigger = { sc_defender_injury_check_actual <= single_combat_injury_very_unlikely_value } + desc = single_combat.0001.desc.injury_check.opponent.very_unlikely + } + ### Injury chance unlikely. + triggered_desc = { + trigger = { sc_defender_injury_check_actual <= single_combat_injury_unlikely_value } + desc = single_combat.0001.desc.injury_check.opponent.unlikely + } + ### Injury chance moderate. + triggered_desc = { + trigger = { sc_defender_injury_check_actual <= single_combat_injury_neutral_value } + desc = single_combat.0001.desc.injury_check.opponent.moderate + } + ### Injury chance likely. + triggered_desc = { + trigger = { sc_defender_injury_check_actual <= single_combat_injury_likely_value } + desc = single_combat.0001.desc.injury_check.opponent.likely + } + ### Injury chance very likely. + desc = single_combat.0001.desc.injury_check.opponent.very_likely + } + first_valid = { + # Success updates. + ## Victory almost impossible. + triggered_desc = { + trigger = { scope:sc_attacker.var:sc_attacker_success_check <= single_combat_success_almost_impossible_value } + desc = single_combat.0001.desc.success_check.almost_impossible + } + ## Victory very unlikely. + triggered_desc = { + trigger = { scope:sc_attacker.var:sc_attacker_success_check <= single_combat_success_very_unlikely_value } + desc = single_combat.0001.desc.success_check.very_unlikely + } + ## Victory unlikely. + triggered_desc = { + trigger = { scope:sc_attacker.var:sc_attacker_success_check <= single_combat_success_unlikely_value } + desc = single_combat.0001.desc.success_check.unlikely + } + ## Victory in the balance. + triggered_desc = { + trigger = { scope:sc_attacker.var:sc_attacker_success_check <= single_combat_success_likely_value } + desc = single_combat.0001.desc.success_check.moderate + } + ## Victory likely. + triggered_desc = { + trigger = { scope:sc_attacker.var:sc_attacker_success_check <= single_combat_success_very_likely_value } + desc = single_combat.0001.desc.success_check.likely + } + ## Victory very likely. + triggered_desc = { + trigger = { scope:sc_attacker.var:sc_attacker_success_check <= single_combat_success_almost_certain_value } + desc = single_combat.0001.desc.success_check.very_likely + } + ## Victory almost certain. + desc = single_combat.0001.desc.success_check.almost_certain + } + } + } + } + } + } + } + theme = martial + left_portrait = { + character = scope:myself + triggered_animation = { + trigger = { + portrait_should_wield_sword_trigger = yes + culture = { has_cultural_pillar = heritage_japonic } + } + animation = chudan_no_kamae + } + triggered_animation = { + trigger = { always = yes } + scripted_animation = duel_wield_weapon + } + } + right_portrait = { + character = scope:my_foe + scripted_animation = duel_wield_weapon + } + artifact = { + target = scope:myself.var:signature_weapon_scope + position = lower_left_portrait + trigger = { exists = scope:myself.var:signature_weapon_scope } + } + + artifact = { + target = scope:my_foe.var:signature_weapon_scope + position = lower_right_portrait + trigger = { exists = scope:my_foe.var:signature_weapon_scope } + } + + # Background Logic + override_background = { + trigger = { scope:locale = flag:terrain_scope } + reference = terrain_scope + } + override_background = { + trigger = { scope:locale = flag:battlefield } + reference = battlefield + } + override_background = { + trigger = { scope:locale = flag:alley_night } + reference = alley_night + } + override_background = { + trigger = { scope:locale = flag:alley_day } + reference = alley_day + } + override_background = { + trigger = { scope:locale = flag:temple } + reference = temple + } + override_background = { + trigger = { scope:locale = flag:corridor_night } + reference = corridor_night + } + override_background = { + trigger = { scope:locale = flag:corridor_day } + reference = corridor_day + } + override_background = { + trigger = { scope:locale = flag:courtyard } + reference = courtyard + } + override_background = { + trigger = { scope:locale = flag:dungeon } + reference = dungeon + } + override_background = { + trigger = { scope:locale = flag:docks } + reference = docks + } + override_background = { + trigger = { scope:locale = flag:feast } + reference = feast + } + override_background = { + trigger = { scope:locale = flag:market } + reference = market + } + override_background = { + trigger = { scope:locale = flag:tavern } + reference = tavern + } + override_background = { + trigger = { scope:locale = flag:throne_room } + reference = throne_room + } + override_background = { + trigger = { scope:locale = flag:army_camp } + reference = army_camp + } + override_background = { + trigger = { scope:locale = flag:ep2_travel_bridge } + reference = ep2_travel_bridge + } + + immediate = { + play_music_cue = "mx_cue_combat_stinger" + # Generate combat options. + select_combat_options_from_pool_effect = yes + # Set up portraits for this event, putting the current actor always on the left. + if = { + limit = { this = scope:sc_defender } + scope:sc_defender = { save_scope_as = myself } + scope:sc_attacker = { save_scope_as = my_foe } + } + else = { + scope:sc_attacker = { save_scope_as = myself } + scope:sc_defender = { save_scope_as = my_foe } + } + + # Show opponent's move effect. + if = { + # Check that there's a last move kicking about to look at. + limit = { + OR = { + exists = scope:sc_attacker_last_move + exists = scope:sc_defender_last_move + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:wait_and_hope + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:wait_and_hope + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_wait_and_hope_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:unsure_attack + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:unsure_attack + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_unsure_attack_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:enthusiastic_onslaught + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:enthusiastic_onslaught + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_enthusiastic_onslaught_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:hail_mary + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:hail_mary + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_hail_mary_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:pocket_sand + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:pocket_sand + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_pocket_sand_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:nut_em + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:nut_em + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_nut_em_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:guard + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:guard + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_guard_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:probing_attack + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:probing_attack + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_probing_attack_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:onslaught + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:onslaught + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_onslaught_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:surprise_attack + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:surprise_attack + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_surprise_attack_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:taunt + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:taunt + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_taunt_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:put_the_boot_in + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:put_the_boot_in + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_put_the_boot_in_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:strict_guard + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:strict_guard + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_strict_guard_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:confident_attack + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:confident_attack + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_confident_attack_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:expert_onslaught + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:expert_onslaught + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_expert_onslaught_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:attempt_disarm + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:attempt_disarm + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_attempt_disarm_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:lightning_assault + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:lightning_assault + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_lightning_assault_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:tire_opponent + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:tire_opponent + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_tire_opponent_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:reason_you_suck_speech + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:reason_you_suck_speech + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_reason_you_suck_speech_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:technique_from_legend + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:technique_from_legend + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_technique_from_legend_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:like_a_viper + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:like_a_viper + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_like_a_viper_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:pocket_silver + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:pocket_silver + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_pocket_silver_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:martial_voice + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:martial_voice + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_martial_voice_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:mocking_boast + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:mocking_boast + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_mocking_boast_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:is_that_a_crocodile + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:is_that_a_crocodile + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_is_that_a_crocodile_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:desert_warrior + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:desert_warrior + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_desert_warrior_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:jungle_stalker + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:jungle_stalker + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_jungle_stalker_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:open_terrain_expert + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:open_terrain_expert + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_open_terrain_expert_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:rough_terrain_expert + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:rough_terrain_expert + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_rough_terrain_expert_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:forest_fighter + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:forest_fighter + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_forest_fighter_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:raaargh + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:raaargh + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_raaargh_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:hard_grit + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:hard_grit + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_hard_grit_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:feint_and_stab + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:feint_and_stab + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_feint_and_stab_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:butchery + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:butchery + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_butchery_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:stoic_veteran + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:stoic_veteran + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_stoic_veteran_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:blade_dance + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:blade_dance + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_blade_dance_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:wrath_of_highgod + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:wrath_of_highgod + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_wrath_of_highgod_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:hurt_me_better + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:hurt_me_better + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_hurt_me_better_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:special_fallback + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:special_fallback + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_special_fallback_effect = yes } + } + } + if = { + limit = { + OR = { + AND = { + this = scope:sc_defender + scope:sc_attacker_last_move = flag:something_to_hide + } + AND = { + this = scope:sc_attacker + scope:sc_defender_last_move = flag:something_to_hide + } + } + } + scope:my_foe = { + show_as_tooltip = { combat_move_something_to_hide_effect = yes } + } + } + } + } + + # Stress_impact in the options is deliberately left out of the ai_chance weightings. It's not a huge amount for anyone (typically miniscule for standard moves, minor for special ones), since many of these options can repeat within one combat, and it's no bad thing to have characters come out of duels increasingly stressed. + + #Wait and Hope + option = { + name = single_combat.0001.wait_and_hope + trigger = { exists = local_var:combat_move_wait_and_hope_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.wait_and_hope + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_wait_and_hope_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_wait_and_hope_effect = yes } + } + + stress_impact = { + patient = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_timid_personality_scripted_modifier = yes + } + } + + #Unsure Attack + option = { + name = { + trigger = { scope:fatality = flag:yes } + text = single_combat.0001.unsure_attack + } + name = { + trigger = { scope:fatality = flag:no } + text = single_combat.0001.unsure_attack_non_fatal + } + trigger = { exists = local_var:combat_move_unsure_attack_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.unsure_attack + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_unsure_attack_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_unsure_attack_effect = yes } + } + + # No stress for middle-ground standard options. + ai_chance = { + base = 100 + sce_rational_personality_scripted_modifier = yes + } + } + + #Enthusiastic Onslaught + option = { + # Since we yell the house motto here, we need slight separation between variants. + ## Firstly, if your house is on the banned list, you use a fallback. + name = { + trigger = { house_not_allowed_to_yell_motto_trigger = yes } + text = single_combat.0001.enthusiastic_onslaught.banned_house + } + ## Secondly, if you're fighting another member of your own house, you use a different fallback. + name = { + trigger = { + house_not_allowed_to_yell_motto_trigger = no + scope:sc_attacker.house = scope:sc_defender.house + } + text = single_combat.0001.enthusiastic_onslaught.own_house + } + ## Thirdly, if you're a shouty house who isn't fighting another person from your shouty house, then you use your motto. + name = { + trigger = { + house_not_allowed_to_yell_motto_trigger = no + scope:sc_attacker.house != scope:sc_defender.house + } + text = single_combat.0001.enthusiastic_onslaught.motto + } + trigger = { exists = local_var:combat_move_enthusiastic_onslaught_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.enthusiastic_onslaught + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_enthusiastic_onslaught_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_enthusiastic_onslaught_effect = yes } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + patient = miniscule_stress_impact_gain + calm = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_aggressive_personality_scripted_modifier = yes + } + } + + #Hail Mary + option = { + name = single_combat.0001.hail_mary + trigger = { exists = local_var:combat_move_hail_mary_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.hail_mary + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_hail_mary_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_hail_mary_effect = yes } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + brave = minor_stress_impact_loss + patient = miniscule_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_aggressive_personality_scripted_modifier = yes + } + } + + #Pocket Sand + option = { + name = single_combat.0001.pocket_sand + trigger = { exists = local_var:combat_move_pocket_sand_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.pocket_sand + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_pocket_sand_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_pocket_sand_effect = yes } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + honest = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_timid_personality_scripted_modifier = yes + } + } + + #Nut 'em + option = { + name = single_combat.0001.nut_em + trigger = { exists = local_var:combat_move_nut_em_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.nut_em + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_nut_em_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_nut_em_effect = yes } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + honest = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_aggressive_personality_scripted_modifier = yes + } + } + + #Guard + option = { + name = single_combat.0001.guard + trigger = { exists = local_var:combat_move_guard_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.guard + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_guard_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_guard_effect = yes } + } + + stress_impact = { + patient = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_timid_personality_scripted_modifier = yes + } + } + + #Probing Attack + option = { + name = single_combat.0001.probing_attack + trigger = { exists = local_var:combat_move_probing_attack_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.probing_attack + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_probing_attack_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_probing_attack_effect = yes } + } + + # No stress for middle-ground standard options. + ai_chance = { + base = 100 + sce_rational_personality_scripted_modifier = yes + } + } + + #Onslaught + option = { + name = single_combat.0001.onslaught + trigger = { exists = local_var:combat_move_onslaught_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.onslaught + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_onslaught_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_onslaught_effect = yes } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + patient = miniscule_stress_impact_gain + calm = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_aggressive_personality_scripted_modifier = yes + } + } + + #Surprise Attack + option = { + name = single_combat.0001.surprise_attack + trigger = { exists = local_var:combat_move_surprise_attack_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.surprise_attack + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_surprise_attack_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_surprise_attack_effect = yes } + } + + # No need for stress weighting here; fairly standard tactic that anyone would try. + ai_chance = { + base = 100 + sce_preferred_rational_personality_scripted_modifier = yes + } + } + + #Taunt + option = { + name = single_combat.0001.taunt + trigger = { exists = local_var:combat_move_taunt_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.taunt + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_taunt_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_taunt_effect = yes } + } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_timid_personality_scripted_modifier = yes + } + } + + #Put the Boot In + option = { + name = single_combat.0001.put_the_boot_in + trigger = { exists = local_var:combat_move_put_the_boot_in_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.put_the_boot_in + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_put_the_boot_in_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_put_the_boot_in_effect = yes } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + brave = minor_stress_impact_loss + patient = miniscule_stress_impact_gain + craven = minor_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_aggressive_personality_scripted_modifier = yes + } + } + + #Strict Guard + option = { + name = single_combat.0001.strict_guard + trigger = { exists = local_var:combat_move_strict_guard_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.strict_guard + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_strict_guard_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_strict_guard_effect = yes } + } + + stress_impact = { + patient = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_timid_personality_scripted_modifier = yes + } + } + + #Confident Attack + option = { + name = single_combat.0001.confident_attack + trigger = { exists = local_var:combat_move_confident_attack_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.confident_attack + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_confident_attack_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_confident_attack_effect = yes } + } + + # No stress for middle-ground standard options. + ai_chance = { + base = 100 + sce_rational_personality_scripted_modifier = yes + } + } + + #Expert Onslaught + option = { + name = single_combat.0001.expert_onslaught + trigger = { exists = local_var:combat_move_expert_onslaught_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.expert_onslaught + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_expert_onslaught_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_expert_onslaught_effect = yes } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + wrathful = miniscule_stress_impact_loss + patient = miniscule_stress_impact_gain + calm = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_aggressive_personality_scripted_modifier = yes + } + } + + #Attempt Disarm + option = { + name = single_combat.0001.attempt_disarm + trigger = { exists = local_var:combat_move_attempt_disarm_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.attempt_disarm + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_attempt_disarm_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_attempt_disarm_effect = yes } + } + + stress_impact = { + patient = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + impatient = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_timid_personality_scripted_modifier = yes + } + } + + #Lightning Assault + option = { + name = single_combat.0001.lightning_assault + trigger = { exists = local_var:combat_move_lightning_assault_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.lightning_assault + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_lightning_assault_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_lightning_assault_effect = yes } + } + + stress_impact = { + impatient = miniscule_stress_impact_loss + diligent = miniscule_stress_impact_loss + patient = miniscule_stress_impact_gain + lazy = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_aggressive_personality_scripted_modifier = yes + } + } + + #Tire Opponent + option = { + name = single_combat.0001.tire_opponent + trigger = { exists = local_var:combat_move_tire_opponent_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.tire_opponent + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_tire_opponent_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_tire_opponent_effect = yes } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_rational_personality_scripted_modifier = yes + } + } + + #Reason You Suck Speech + option = { + name = single_combat.0001.reason_you_suck_speech + trigger = { exists = local_var:combat_move_reason_you_suck_speech_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.reason_you_suck_speech + + #Spawn Info + skill = diplomacy + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_reason_you_suck_speech_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_reason_you_suck_speech_effect = yes } + } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_enjoys_arrogant_speeches_scripted_modifier = yes + } + } + + #Technique from Legend + option = { + name = single_combat.0001.technique_from_legend + trigger = { exists = local_var:combat_move_technique_from_legend_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.technique_from_legend + + #Spawn Info + skill = learning + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_technique_from_legend_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_technique_from_legend_effect = yes } + } + + stress_impact = { + brave = minor_stress_impact_loss + trusting = minor_stress_impact_loss # A trusting character *totally* believes the legends are both true and accurate! + craven = minor_stress_impact_gain + paranoid = minor_stress_impact_gain # Whereas a paranoid character is 99% sure they're bullshit, but is hoping against hope anyway. + } + ai_chance = { + base = 100 + sce_shrewd_fighter_scripted_modifier = yes + # Weight up relevant traits: scholar + modifier = { + add = sce_ai_mod_trait_weight_medium + has_trait = scholar + } + # Weight up relevant traits: theologian + modifier = { + add = sce_ai_mod_trait_weight_light + has_trait = theologian + } + } + } + + #Like a Viper + option = { + name = single_combat.0001.like_a_viper + trigger = { exists = local_var:combat_move_like_a_viper_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.like_a_viper + + #Spawn Info + skill = intrigue + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_like_a_viper_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_like_a_viper_effect = yes } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + sce_shrewd_fighter_scripted_modifier = yes + # Weight up relevant traits: schemer + modifier = { + add = sce_ai_mod_trait_weight_heavy + has_trait = schemer + } + # Weight up relevant traits: torturer + modifier = { + add = sce_ai_mod_trait_weight_medium + has_trait = torturer + } + } + } + + #Pocket Silver + option = { + name = single_combat.0001.pocket_silver + trigger = { exists = local_var:combat_move_pocket_silver_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.pocket_silver + + #Spawn Info + skill = stewardship + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_pocket_silver_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_pocket_silver_effect = yes } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + generous = miniscule_stress_impact_loss + honest = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + greedy = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { ai_greed = -0.5 } + # Weight up relevant traits: avaricious + modifier = { + add = sce_ai_mod_trait_down_weight_medium + has_trait = avaricious + } + } + } + + #Martial Voice + option = { + name = single_combat.0001.martial_voice + trigger = { exists = local_var:combat_move_martial_voice_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.martial_voice + + #Spawn Info + skill = martial + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_martial_voice_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_martial_voice_effect = yes } + } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + gregarious = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + shy = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_enjoys_arrogant_speeches_scripted_modifier = yes + # Weight up relevant traits: strategist + modifier = { + add = sce_ai_mod_trait_weight_medium + has_trait = strategist + } + } + } + + #Mocking Boast + option = { + name = single_combat.0001.mocking_boast + trigger = { exists = local_var:combat_move_mocking_boast_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.mocking_boast + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_mocking_boast_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_mocking_boast_effect = yes } + } + + stress_impact = { + callous = miniscule_stress_impact_loss + sadistic = miniscule_stress_impact_loss + arrogant = miniscule_stress_impact_loss + compassionate = miniscule_stress_impact_gain + humble = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_enjoys_arrogant_speeches_scripted_modifier = yes + } + } + + #Is that a Crocodile?! + option = { + name = single_combat.0001.is_that_a_crocodile + trigger = { exists = local_var:combat_move_is_that_a_crocodile_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.is_that_a_crocodile + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_is_that_a_crocodile_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_is_that_a_crocodile_effect = yes } + } + + # Though it might be stressful for your opponent, a crocodile is not stressful for you. + ai_chance = { + base = 300 + # If you get the good option, use the good option. + } + } + + #Desert Warrior + option = { + name = single_combat.0001.desert_warrior + trigger = { exists = local_var:combat_move_desert_warrior_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.desert_warrior + + #Spawn Info + trait = desert_warrior + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_desert_warrior_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_desert_warrior_effect = yes } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_shrewd_fighter_scripted_modifier = yes + } + } + + #Jungle Stalker + option = { + name = single_combat.0001.jungle_stalker + trigger = { exists = local_var:combat_move_jungle_stalker_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.jungle_stalker + + #Spawn Info + trait = jungle_stalker + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_jungle_stalker_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_jungle_stalker_effect = yes } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_shrewd_fighter_scripted_modifier = yes + } + } + + #Open Terrain Expert + option = { + name = single_combat.0001.open_terrain_expert + trigger = { exists = local_var:combat_move_open_terrain_expert_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.open_terrain_expert + + #Spawn Info + trait = open_terrain_expert + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_open_terrain_expert_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_open_terrain_expert_effect = yes } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_shrewd_fighter_scripted_modifier = yes + } + } + + #Rough Terrain Expert + option = { + name = single_combat.0001.rough_terrain_expert + trigger = { exists = local_var:combat_move_rough_terrain_expert_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.rough_terrain_expert + + #Spawn Info + trait = rough_terrain_expert + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_rough_terrain_expert_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_rough_terrain_expert_effect = yes } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_shrewd_fighter_scripted_modifier = yes + } + } + + #Forest Fighter + option = { + name = single_combat.0001.forest_fighter + trigger = { exists = local_var:combat_move_forest_fighter_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.forest_fighter + + #Spawn Info + trait = forest_fighter + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_forest_fighter_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_forest_fighter_effect = yes } + } + + stress_impact = { + diligent = miniscule_stress_impact_loss + calm = miniscule_stress_impact_loss + lazy = miniscule_stress_impact_gain + wrathful = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_shrewd_fighter_scripted_modifier = yes + } + } + + #RAAARGH! + option = { + name = single_combat.0001.raaargh + trigger = { exists = local_var:combat_move_raaargh_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.raaargh + + #Spawn Info + trait = berserker + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_raaargh_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_raaargh_effect = yes } + } + + # No stress for RAAARGH!, as it gives stress loss. + ai_chance = { + base = 100 + sce_preferred_shrewd_fighter_scripted_modifier = yes + } + } + + #Hard Grit + option = { + name = single_combat.0001.hard_grit + trigger = { exists = local_var:combat_move_hard_grit_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.hard_grit + + #Spawn Info + trait = shieldmaiden + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_hard_grit_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_hard_grit_effect = yes } + } + + # Loc here implies stoic professionalism, so doesn't seem fair to apply stress over that. + ai_chance = { + base = 100 + sce_preferred_shrewd_fighter_scripted_modifier = yes + } + } + + #Feint & Stab + option = { + name = single_combat.0001.feint_and_stab + trigger = { exists = local_var:combat_move_feint_and_stab_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.feint_and_stab + + #Spawn Info; use individual traits so that the unlock trait shows in the option UI. + trait = lifestyle_hunter + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_feint_and_stab_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_feint_and_stab_effect = yes } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + honest = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_shrewd_fighter_scripted_modifier = yes + } + } + + #Butchery + option = { + name = single_combat.0001.butchery + trigger = { exists = local_var:combat_move_butchery_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.butchery + + #Spawn Info + trait = viking + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_butchery_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_butchery_effect = yes } + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + sce_preferred_shrewd_fighter_scripted_modifier = yes + } + } + + #Stoic Veteran + option = { + name = { + trigger = { + NOT = { + scope:my_foe = { has_trait = varangian } + } + } + text = single_combat.0001.stoic_veteran.general + } + name = { + trigger = { + scope:my_foe = { has_trait = varangian } + } + text = single_combat.0001.stoic_veteran.other_varangian + } + trigger = { exists = local_var:combat_move_stoic_veteran_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.stoic_veteran + + #Spawn Info + trait = varangian + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_stoic_veteran_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_stoic_veteran_effect = yes } + } + + # Loc here implies stoic professionalism, so doesn't seem fair to apply stress over that. + ai_chance = { + base = 100 + sce_preferred_shrewd_fighter_scripted_modifier = yes + } + } + + #Blade Dance + option = { + name = { + text = single_combat.0001.blade_dance + trigger = { is_landed = yes } + } + name = { + text = single_combat.0001.blade_dance_unlanded + trigger = { is_landed = no } + } + trigger = { exists = local_var:combat_move_blade_dance_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.blade_dance + + #Spawn Info; use individual traits so that the unlock trait shows in the option UI. + trait = lifestyle_blademaster + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_blade_dance_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_blade_dance_effect = yes } + } + + # No appropriate stress loss for blade dance; arguably arrogant, as we portray them as haughty in the loc, but it's a bit mean to both hit the player verbally and mechanically for something that's up for interpretation. + ai_chance = { + base = 100 + sce_preferred_shrewd_fighter_scripted_modifier = yes + } + } + + #Wrath of [HighGod] + option = { + name = single_combat.0001.wrath_of_highgod + trigger = { exists = local_var:combat_move_wrath_of_highgod_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.wrath_of_highgod + + #Spawn Info + trait = zealous + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_wrath_of_highgod_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_wrath_of_highgod_effect = yes } + } + + stress_impact = { + # Takes a bold human to stop fighting entirely and pray, however loudly, in the middle of a duel. + craven = miniscule_stress_impact_loss + brave = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_enjoys_arrogant_speeches_scripted_modifier = yes + } + } + + #Hurt Me Better + option = { + name = single_combat.0001.hurt_me_better + trigger = { exists = local_var:combat_move_hurt_me_better_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.hurt_me_better + + #Spawn Info + trait = deviant + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_hurt_me_better_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_hurt_me_better_effect = yes } + } + + # We draw the line at stress loss/gain for lustful/chaste: we're already being a bit mean to deviant characters here, no need to ramp up the Hellraiser vibes *that* much. + ai_chance = { + base = 100 + sce_shrewd_fighter_scripted_modifier = yes + } + } + + #Special Fallback: kick 'em in the shin + option = { + name = single_combat.0001.special_fallback + trigger = { exists = local_var:combat_move_special_fallback_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.special_fallback + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_special_fallback_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_special_fallback_effect = yes } + } + + # Shins, and the kicking thereof, have no particularly stressful effects on the human psyche. + ai_chance = { + base = 100 + # Errr... I can't even begin to imagine how you'd set AI preferences for this. + } + } + + #Something to Hide + option = { + name = single_combat.0001.something_to_hide + trigger = { exists = local_var:combat_move_something_to_hide_flag } + + #Move clarification + custom_tooltip = single_combat.0001.tt.something_to_hide + + #Move effects + ## First, we show the move's effects with no guff. + show_as_tooltip = { combat_move_something_to_hide_effect = yes } + ## Then, we check to make sure if scope:my_foe is still around to suffer the effects. This prevents errors if they die mid-combat. + if = { + limit = { + scope:my_foe = { is_alive = yes } + } + hidden_effect = { combat_move_something_to_hide_effect = yes } + } + + stress_impact = { + deceitful = miniscule_stress_impact_loss + arbitrary = miniscule_stress_impact_loss + honest = miniscule_stress_impact_gain + just = miniscule_stress_impact_gain + } + ai_chance = { + base = 100 + sce_enjoys_arrogant_speeches_scripted_modifier = yes + # Weight up relevant traits: schemer + modifier = { + add = sce_ai_mod_trait_weight_light + has_trait = schemer + } + } + } + + #Work out the post-event effects. + after = { + # First, see if the next round is still valid. + if = { + limit = { + OR = { + scope:sc_attacker = { is_alive = no } + scope:sc_defender = { is_alive = no } + } + } + # First, clean up assorted things around the duels. + hidden_effect = { remove_single_combat_info_effect = yes } + # Then manually clear the duelling flag. + scope:sc_defender = { + if = { + # Restrict to live characters to prevent errors. + limit = { is_alive = yes } + remove_variable = engaged_in_single_combat + } + } + scope:sc_attacker = { + if = { + # Restrict to live characters to prevent errors. + limit = { is_alive = yes } + remove_variable = engaged_in_single_combat + } + } + # Finally, fire the invalidation cleanup event. + scope:sc_attacker = { + #trigger_event = { saved_event_id = scope:invalidation_event } + trigger_event = single_combat.1006 + } + } + # Otherwise, we can go through the usual flow. + else = { + #If either character has had an edge modifier added, update character skills to account for duel edge stuff. + scope:sc_attacker = { + if = { + limit = { has_character_flag = sce_needs_forced_recalc_flag } + force_character_skill_recalculation = yes + remove_character_flag = sce_needs_forced_recalc_flag + } + } + scope:sc_defender = { + if = { + limit = { has_character_flag = sce_needs_forced_recalc_flag } + force_character_skill_recalculation = yes + remove_character_flag = sce_needs_forced_recalc_flag + } + } + #Calculate injury risks for descs. + calculate_injury_risks_effect = yes + #And success chances. + calculate_success_chances_effect = yes + #If we're scope:sc_defender, send scope:sc_attacker their instance of the event. + if = { + limit = { this = scope:sc_defender } + scope:sc_attacker = { trigger_event = single_combat.0001 } + } + #Otherwise we're scope:sc_attacker, so end the round. + else = { trigger_event = single_combat.0021 } + } + } +} + +################################################## +# Round End Events +# by Ewan Cowhig Croft +# 0021 - 0030 +################################################## + +# Standard round end event. +single_combat.0021 = { + hidden = yes + + immediate = { + # Check what round we're at, and reduce the threshold variables as appropriate if we're in a late enough round. + ## Reduce injury thresholds for both characters. + if = { + limit = { scope:sc_defender.var:current_round = round_injury_bonus_lower } + debug_log = "single combat variable error-check: round_injury_bonus_lower" + debug_log_scopes = yes + change_variable = { + name = sc_attacker_injury_bonus + add = round_injury_adjustment_lower + } + scope:sc_defender = { + change_variable = { + name = sc_defender_injury_bonus + add = round_injury_adjustment_lower + } + } + } + if = { + limit = { scope:sc_defender.var:current_round = round_injury_bonus_lowest } + debug_log = "single combat variable error-check: round_injury_bonus_lowest" + debug_log_scopes = yes + change_variable = { + name = sc_attacker_injury_bonus + add = round_injury_adjustment_lowest + } + scope:sc_defender = { + change_variable = { + name = sc_defender_injury_bonus + add = round_injury_adjustment_lowest + } + } + } + ## Reduce success threshold. + if = { + limit = { scope:sc_defender.var:current_round = round_success_threshold_lower } + debug_log = "single combat variable error-check: round_success_threshold_lower" + debug_log_scopes = yes + scope:sc_defender = { + change_variable = { + name = success_threshold + add = round_success_adjustment_lower + } + } + } + if = { + limit = { scope:sc_defender.var:current_round = round_success_threshold_lowest } + debug_log = "single combat variable error-check: round_success_threshold_lowest" + debug_log_scopes = yes + scope:sc_defender = { + change_variable = { + name = success_threshold + add = round_success_adjustment_lowest + } + } + } + # Check to see if either character has achieved a suitable success score. + calculate_success_chances_effect = yes + ## Check scope:sc_attacker first, seeing if they have more success chance than the minimum threshold for victory. + if = { + limit = { + scope:sc_attacker.var:sc_attacker_success_check >= scope:sc_defender.var:success_threshold + # Excepting things if the match is fixed. + NOT = { scope:fixed = flag:sc_defender } + } + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_attacker = { save_scope_as = sc_victor } + scope:sc_defender = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:skill + } + } + ## Then check scope:sc_defender, performing the same calculation in reverse. + else_if = { + limit = { + scope:sc_defender.var:sc_defender_success_check >= scope:sc_defender.var:success_threshold + # Excepting things if the match is fixed. + NOT = { scope:fixed = flag:sc_attacker } + } + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_defender = { save_scope_as = sc_victor } + scope:sc_attacker = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:skill + } + } + # If we have no victor yet, and we're past the first round, look at injuries. + ## Set up injury risks for this round; we do this regardless, since we look at these to work out injury chances for the desc block. + calculate_injury_risks_effect = yes + if = { + limit = { + NOT = { exists = scope:sc_finished } + scope:sc_defender.var:current_round > 1 + } + # Check scope:sc_attacker to see if they can injure themselves due to having more risk than success. + if = { + limit = { + scope:sc_attacker.var:sc_attacker_injury_risk_check >= scope:sc_attacker.var:sc_attacker_duel_success_score + # Excepting things if the match is fixed. + NOT = { scope:fixed = flag:sc_defender } + } + random = { + chance = { + value = 0 + add = scope:sc_attacker.var:sc_attacker_injury_risk_check + subtract = scope:sc_attacker.var:sc_attacker_duel_success_score + } + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_defender = { save_scope_as = sc_victor } + scope:sc_attacker = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:mistake + } + } + } + # Then check scope:sc_defender in the same fashion. + if = { + limit = { + scope:sc_defender.var:sc_defender_injury_risk_check >= scope:sc_defender.var:sc_defender_duel_success_score + # Excepting things if the match is fixed. + NOT = { scope:fixed = flag:sc_attacker } + } + random = { + chance = { + value = 0 + add = scope:sc_defender.var:sc_defender_injury_risk_check + subtract = scope:sc_defender.var:sc_defender_duel_success_score + } + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_attacker = { save_scope_as = sc_victor } + scope:sc_defender = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:mistake + } + } + } + } + # If we now have a victor, work out the cleanup. + if = { + limit = { exists = scope:sc_finished } + finalise_combat_results_effect = yes + } + # If we don't, and this round is at or over the round_cap_limit, enter into sudden death. + else_if = { + limit = { scope:sc_defender.var:current_round >= round_cap_limit } + # Has the match been fixed? + ## ... for scope:sc_attacker. + if = { + limit = { scope:fixed = flag:sc_attacker } + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_attacker = { save_scope_as = sc_victor } + scope:sc_defender = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:sudden_death + } + } + ## ... for scope:sc_defender. + else_if = { + limit = { scope:fixed = flag:sc_defender } + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_defender = { save_scope_as = sc_victor } + scope:sc_attacker = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:sudden_death + } + } + # If scope:sc_attacker has the highest prowess, then they win. + else_if = { + limit = { scope:sc_attacker.prowess > scope:sc_defender.prowess } + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_attacker = { save_scope_as = sc_victor } + scope:sc_defender = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:sudden_death + } + } + # If scope:sc_defender has the highest prowess, then *they* win. + else_if = { + limit = { scope:sc_defender.prowess > scope:sc_attacker.prowess } + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_defender = { save_scope_as = sc_victor } + scope:sc_attacker = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:sudden_death + } + } + # Otherwise, their prowess must be even, so we do a toss-up. + else = { + random_list = { + #Scope:sc_attacker wins. + 50 = { + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_attacker = { save_scope_as = sc_victor } + scope:sc_defender = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:sudden_death + } + } + #Scope:sc_defender wins. + 50 = { + save_scope_value_as = { + name = sc_finished + value = yes + } + scope:sc_defender = { save_scope_as = sc_victor } + scope:sc_attacker = { save_scope_as = sc_loser } + save_scope_value_as = { + name = victory_type + value = flag:sudden_death + } + } + } + } + #Sort the end of combat. + finalise_combat_results_effect = yes + } + # If we don't, and we've not yet hit the round_cap_limit, increment the round_number & fire off the next round. + else = { + scope:sc_defender = { + # We change the round number right at the end, so that it doesn't mess up any calculations elsewhere. + change_variable = { + name = current_round + add = 1 + } + trigger_event = single_combat.0001 + } + } + } +} + +################################################## +# Results Events +# by Ewan Cowhig Croft +# 0031 - 0050 +################################################## + +scripted_effect sce_loser_end_result_tooltip_effect = { + #Clarify the results. + if = { + limit = { scope:victory_type = flag:skill } + custom_tooltip = single_combat.0031.desc.result.skill + } + else_if = { + limit = { scope:victory_type = flag:mistake } + custom_tooltip = single_combat.0031.desc.result.mistake + } + else_if = { + limit = { scope:victory_type = flag:sudden_death } + custom_tooltip = single_combat.0031.desc.result.sudden_death + } +} + +scripted_effect sce_victor_end_result_tooltip_effect = { + #Clarify the results. + if = { + limit = { scope:victory_type = flag:skill } + custom_tooltip = single_combat.0041.desc.result.skill + } + else_if = { + limit = { scope:victory_type = flag:mistake } + custom_tooltip = single_combat.0041.desc.result.mistake + } + else_if = { + limit = { scope:victory_type = flag:sudden_death } + custom_tooltip = single_combat.0041.desc.result.sudden_death + } +} + +# scope:sc_loser's confirmation event. +single_combat.0031 = { + type = character_event + window = duel_event + title = single_combat.0031.t + desc = { + first_valid = { + # Are we in scope:sc_defender's POV? + triggered_desc = { + trigger = { this = scope:sc_defender } + desc = { + # Our POV tells us that we did X. + triggered_desc = { + #This trigger should always exist, but the desc structure is required for code reasons. + trigger = { always = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:wait_and_hope } + desc = single_combat.0031.desc.sc_defender.wait_and_hope + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:unsure_attack } + desc = single_combat.0031.desc.sc_defender.unsure_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0031.desc.sc_defender.enthusiastic_onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hail_mary } + desc = single_combat.0031.desc.sc_defender.hail_mary + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:pocket_sand } + desc = single_combat.0031.desc.sc_defender.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:nut_em } + desc = single_combat.0031.desc.sc_defender.nut_em + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:guard } + desc = single_combat.0031.desc.sc_defender.guard + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:probing_attack } + desc = single_combat.0031.desc.sc_defender.probing_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:onslaught } + desc = single_combat.0031.desc.sc_defender.onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:surprise_attack } + desc = single_combat.0031.desc.sc_defender.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:taunt } + desc = single_combat.0031.desc.sc_defender.taunt + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:put_the_boot_in } + desc = single_combat.0031.desc.sc_defender.put_the_boot_in + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:strict_guard } + desc = single_combat.0031.desc.sc_defender.strict_guard + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:confident_attack } + desc = single_combat.0031.desc.sc_defender.confident_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:expert_onslaught } + desc = single_combat.0031.desc.sc_defender.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:attempt_disarm } + desc = single_combat.0031.desc.sc_defender.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:tire_opponent } + desc = single_combat.0031.desc.sc_defender.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:reason_you_suck_speech } + desc = single_combat.0031.desc.sc_defender.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:technique_from_legend } + desc = single_combat.0031.desc.sc_defender.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:like_a_viper } + desc = single_combat.0031.desc.sc_defender.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:pocket_silver } + desc = single_combat.0031.desc.sc_defender.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:martial_voice } + desc = single_combat.0031.desc.sc_defender.martial_voice + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:mocking_boast } + desc = single_combat.0031.desc.sc_defender.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:is_that_a_crocodile } + desc = single_combat.0031.desc.sc_defender.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:desert_warrior } + desc = single_combat.0031.desc.sc_defender.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:jungle_stalker } + desc = single_combat.0031.desc.sc_defender.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:open_terrain_expert } + desc = single_combat.0031.desc.sc_defender.open_terrain_expert + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:rough_terrain_expert } + desc = single_combat.0031.desc.sc_defender.rough_terrain_expert + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:forest_fighter } + desc = single_combat.0031.desc.sc_defender.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:raaargh } + desc = single_combat.0031.desc.sc_defender.raaargh + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hard_grit } + desc = single_combat.0031.desc.sc_defender.hard_grit + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:feint_and_stab } + desc = single_combat.0031.desc.sc_defender.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:butchery } + desc = single_combat.0031.desc.sc_defender.butchery + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:stoic_veteran } + desc = single_combat.0031.desc.sc_defender.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:blade_dance } + desc = single_combat.0031.desc.sc_defender.blade_dance + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:wrath_of_highgod } + desc = single_combat.0031.desc.sc_defender.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hurt_me_better } + desc = single_combat.0031.desc.sc_defender.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:special_fallback } + desc = single_combat.0031.desc.sc_defender.special_fallback + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:something_to_hide } + desc = single_combat.0031.desc.sc_defender.something_to_hide + } + } + } + } + # And scope:sc_attacker successfully countered with Y. + triggered_desc = { + #This trigger should always exist, but the desc structure is required for code reasons. + trigger = { always = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0031.desc.opponent_response.wait_and_hope + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0031.desc.opponent_response.unsure_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0031.desc.opponent_response.enthusiastic_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0031.desc.opponent_response.hail_mary + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0031.desc.opponent_response.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0031.desc.opponent_response.nut_em + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0031.desc.opponent_response.guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0031.desc.opponent_response.probing_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0031.desc.opponent_response.onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0031.desc.opponent_response.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0031.desc.opponent_response.taunt + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0031.desc.opponent_response.put_the_boot_in + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0031.desc.opponent_response.strict_guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0031.desc.opponent_response.confident_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0031.desc.opponent_response.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0031.desc.opponent_response.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0031.desc.opponent_response.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0031.desc.opponent_response.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0031.desc.opponent_response.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0031.desc.opponent_response.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0031.desc.opponent_response.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0031.desc.opponent_response.martial_voice + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0031.desc.opponent_response.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0031.desc.opponent_response.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0031.desc.opponent_response.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0031.desc.opponent_response.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0031.desc.opponent_response.open_terrain_expert + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:rough_terrain_expert } + desc = single_combat.0031.desc.opponent_response.rough_terrain_expert + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0031.desc.opponent_response.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0031.desc.opponent_response.raaargh + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0031.desc.opponent_response.hard_grit + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0031.desc.opponent_response.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0031.desc.opponent_response.butchery + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0031.desc.opponent_response.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0031.desc.opponent_response.blade_dance + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0031.desc.opponent_response.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0031.desc.opponent_response.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0031.desc.opponent_response.special_fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0031.desc.opponent_response.something_to_hide + } + } + } + } + # Leading to Z-1: injury. + triggered_desc = { + trigger = { duel_will_end_in_my_death_trigger = no } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0031.desc.opponent_response.wait_and_hope.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0031.desc.opponent_response.unsure_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0031.desc.opponent_response.enthusiastic_onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0031.desc.opponent_response.hail_mary.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0031.desc.opponent_response.pocket_sand.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0031.desc.opponent_response.nut_em.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0031.desc.opponent_response.guard.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0031.desc.opponent_response.probing_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0031.desc.opponent_response.onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0031.desc.opponent_response.surprise_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0031.desc.opponent_response.taunt.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0031.desc.opponent_response.put_the_boot_in.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0031.desc.opponent_response.strict_guard.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0031.desc.opponent_response.confident_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0031.desc.opponent_response.expert_onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0031.desc.opponent_response.attempt_disarm.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0031.desc.opponent_response.tire_opponent.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0031.desc.opponent_response.reason_you_suck_speech.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0031.desc.opponent_response.technique_from_legend.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0031.desc.opponent_response.like_a_viper.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0031.desc.opponent_response.pocket_silver.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0031.desc.opponent_response.martial_voice.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0031.desc.opponent_response.mocking_boast.injury + } + # No need for an is_that_a_crocodile, as it's never just an injury. + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0031.desc.opponent_response.desert_warrior.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0031.desc.opponent_response.jungle_stalker.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0031.desc.opponent_response.open_terrain_expert.injury + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0031.desc.opponent_response.rough_terrain_expert.injury.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0031.desc.opponent_response.rough_terrain_expert.injury.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0031.desc.opponent_response.forest_fighter.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0031.desc.opponent_response.raaargh.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0031.desc.opponent_response.hard_grit.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0031.desc.opponent_response.feint_and_stab.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0031.desc.opponent_response.butchery.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0031.desc.opponent_response.stoic_veteran.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0031.desc.opponent_response.blade_dance.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0031.desc.opponent_response.wrath_of_highgod.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0031.desc.opponent_response.hurt_me_better.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0031.desc.opponent_response.special_fallback.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0031.desc.opponent_response.something_to_hide.injury + } + } + } + } + # Or Z-2: death. + triggered_desc = { + trigger = { duel_will_end_in_my_death_trigger = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0031.desc.opponent_response.wait_and_hope.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0031.desc.opponent_response.unsure_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0031.desc.opponent_response.enthusiastic_onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0031.desc.opponent_response.hail_mary.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0031.desc.opponent_response.pocket_sand.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0031.desc.opponent_response.nut_em.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0031.desc.opponent_response.guard.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0031.desc.opponent_response.probing_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0031.desc.opponent_response.onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0031.desc.opponent_response.surprise_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0031.desc.opponent_response.taunt.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0031.desc.opponent_response.put_the_boot_in.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0031.desc.opponent_response.strict_guard.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0031.desc.opponent_response.confident_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0031.desc.opponent_response.expert_onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0031.desc.opponent_response.attempt_disarm.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0031.desc.opponent_response.tire_opponent.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0031.desc.opponent_response.reason_you_suck_speech.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0031.desc.opponent_response.technique_from_legend.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0031.desc.opponent_response.like_a_viper.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0031.desc.opponent_response.pocket_silver.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0031.desc.opponent_response.martial_voice.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0031.desc.opponent_response.mocking_boast.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0031.desc.opponent_response.is_that_a_crocodile.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0031.desc.opponent_response.desert_warrior.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0031.desc.opponent_response.jungle_stalker.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0031.desc.opponent_response.open_terrain_expert.fatality + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0031.desc.opponent_response.rough_terrain_expert.fatality.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0031.desc.opponent_response.rough_terrain_expert.fatality.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0031.desc.opponent_response.forest_fighter.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0031.desc.opponent_response.raaargh.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0031.desc.opponent_response.hard_grit.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0031.desc.opponent_response.feint_and_stab.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0031.desc.opponent_response.butchery.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0031.desc.opponent_response.stoic_veteran.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0031.desc.opponent_response.blade_dance.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0031.desc.opponent_response.wrath_of_highgod.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0031.desc.opponent_response.hurt_me_better.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0031.desc.opponent_response.special_fallback.fatality + } + # No need for a something_to_hide, as it's never fatal. + } + } + } + } + } + # Or scope:sc_attacker's? + triggered_desc = { + trigger = { this = scope:sc_attacker } + desc = { + # Our POV tells us that we went straight in with Y. + triggered_desc = { + #This trigger should always exist, but the desc structure is required for code reasons. + trigger = { always = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0031.desc.sc_attacker.wait_and_hope + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0031.desc.sc_attacker.unsure_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0031.desc.sc_attacker.enthusiastic_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0031.desc.sc_attacker.hail_mary + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0031.desc.sc_attacker.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0031.desc.sc_attacker.nut_em + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0031.desc.sc_attacker.guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0031.desc.sc_attacker.probing_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0031.desc.sc_attacker.onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0031.desc.sc_attacker.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0031.desc.sc_attacker.taunt + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:put_the_boot_in + has_trait = one_legged + } + desc = single_combat.0031.desc.sc_attacker.put_the_boot_in.peg_leg + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0031.desc.sc_attacker.put_the_boot_in.fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0031.desc.sc_attacker.strict_guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0031.desc.sc_attacker.confident_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0031.desc.sc_attacker.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0031.desc.sc_attacker.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0031.desc.sc_attacker.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0031.desc.sc_attacker.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0031.desc.sc_attacker.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0031.desc.sc_attacker.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0031.desc.sc_attacker.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0031.desc.sc_attacker.martial_voice + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0031.desc.sc_attacker.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0031.desc.sc_attacker.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0031.desc.sc_attacker.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0031.desc.sc_attacker.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0031.desc.sc_attacker.open_terrain_expert + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0031.desc.sc_attacker.rough_terrain_expert.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0031.desc.sc_attacker.rough_terrain_expert.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0031.desc.sc_attacker.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0031.desc.sc_attacker.raaargh + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0031.desc.sc_attacker.hard_grit + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0031.desc.sc_attacker.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0031.desc.sc_attacker.butchery + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0031.desc.sc_attacker.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0031.desc.sc_attacker.blade_dance + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0031.desc.sc_attacker.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0031.desc.sc_attacker.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0031.desc.sc_attacker.special_fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0031.desc.sc_attacker.something_to_hide + } + } + } + } + # Leading to Z-1: injury. + triggered_desc = { + trigger = { duel_will_end_in_my_death_trigger = no } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0031.desc.sc_attacker.wait_and_hope.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0031.desc.sc_attacker.unsure_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0031.desc.sc_attacker.enthusiastic_onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0031.desc.sc_attacker.hail_mary.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0031.desc.sc_attacker.pocket_sand.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0031.desc.sc_attacker.nut_em.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0031.desc.sc_attacker.guard.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0031.desc.sc_attacker.probing_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0031.desc.sc_attacker.onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0031.desc.sc_attacker.surprise_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0031.desc.sc_attacker.taunt.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0031.desc.sc_attacker.put_the_boot_in.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0031.desc.sc_attacker.strict_guard.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0031.desc.sc_attacker.confident_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0031.desc.sc_attacker.expert_onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0031.desc.sc_attacker.attempt_disarm.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0031.desc.sc_attacker.tire_opponent.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0031.desc.sc_attacker.reason_you_suck_speech.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0031.desc.sc_attacker.technique_from_legend.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0031.desc.sc_attacker.like_a_viper.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0031.desc.sc_attacker.pocket_silver.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0031.desc.sc_attacker.martial_voice.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0031.desc.sc_attacker.mocking_boast.injury + } + # No need for an is_that_a_crocodile, as it's never just an injury. + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0031.desc.sc_attacker.desert_warrior.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0031.desc.sc_attacker.jungle_stalker.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0031.desc.sc_attacker.open_terrain_expert.injury + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0031.desc.sc_attacker.rough_terrain_expert.injury.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0031.desc.sc_attacker.rough_terrain_expert.injury.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0031.desc.sc_attacker.forest_fighter.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0031.desc.sc_attacker.raaargh.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0031.desc.sc_attacker.hard_grit.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0031.desc.sc_attacker.feint_and_stab.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0031.desc.sc_attacker.butchery.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0031.desc.sc_attacker.stoic_veteran.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0031.desc.sc_attacker.blade_dance.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0031.desc.sc_attacker.wrath_of_highgod.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0031.desc.sc_attacker.hurt_me_better.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0031.desc.sc_attacker.special_fallback.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0031.desc.sc_attacker.something_to_hide.injury + } + } + } + } + # Or Z-2: death. + triggered_desc = { + trigger = { duel_will_end_in_my_death_trigger = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0031.desc.sc_attacker.wait_and_hope.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0031.desc.sc_attacker.unsure_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0031.desc.sc_attacker.enthusiastic_onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0031.desc.sc_attacker.hail_mary.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0031.desc.sc_attacker.pocket_sand.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0031.desc.sc_attacker.nut_em.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0031.desc.sc_attacker.guard.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0031.desc.sc_attacker.probing_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0031.desc.sc_attacker.onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0031.desc.sc_attacker.surprise_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0031.desc.sc_attacker.taunt.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0031.desc.sc_attacker.put_the_boot_in.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0031.desc.sc_attacker.strict_guard.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0031.desc.sc_attacker.confident_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0031.desc.sc_attacker.expert_onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0031.desc.sc_attacker.attempt_disarm.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0031.desc.sc_attacker.tire_opponent.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0031.desc.sc_attacker.reason_you_suck_speech.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0031.desc.sc_attacker.technique_from_legend.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0031.desc.sc_attacker.like_a_viper.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0031.desc.sc_attacker.pocket_silver.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0031.desc.sc_attacker.martial_voice.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0031.desc.sc_attacker.mocking_boast.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0031.desc.sc_attacker.is_that_a_crocodile.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0031.desc.sc_attacker.desert_warrior.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0031.desc.sc_attacker.jungle_stalker.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0031.desc.sc_attacker.open_terrain_expert.fatality + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0031.desc.sc_attacker.rough_terrain_expert.fatality.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0031.desc.sc_attacker.rough_terrain_expert.fatality.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0031.desc.sc_attacker.forest_fighter.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0031.desc.sc_attacker.raaargh.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0031.desc.sc_attacker.hard_grit.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0031.desc.sc_attacker.feint_and_stab.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0031.desc.sc_attacker.butchery.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0031.desc.sc_attacker.stoic_veteran.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0031.desc.sc_attacker.blade_dance.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0031.desc.sc_attacker.wrath_of_highgod.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0031.desc.sc_attacker.hurt_me_better.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0031.desc.sc_attacker.special_fallback.fatality + } + # No need for a something_to_hide, as it's never fatal. + } + } + } + } + } + } + } + theme = skull + left_portrait = { + character = scope:sc_loser + triggered_animation = { + trigger = { portrait_should_wield_sword_trigger = yes } + animation = sword_yield_start + } + animation = pain + } + right_portrait = { + character = scope:sc_victor + scripted_animation = duel_celebrate + } + # Background Logic + override_background = { + trigger = { scope:locale = flag:terrain_scope } + reference = terrain_scope + } + override_background = { + trigger = { scope:locale = flag:battlefield } + reference = battlefield + } + override_background = { + trigger = { scope:locale = flag:alley_night } + reference = alley_night + } + override_background = { + trigger = { scope:locale = flag:alley_day } + reference = alley_day + } + override_background = { + trigger = { scope:locale = flag:temple } + reference = temple + } + override_background = { + trigger = { scope:locale = flag:corridor_night } + reference = corridor_night + } + override_background = { + trigger = { scope:locale = flag:corridor_day } + reference = corridor_day + } + override_background = { + trigger = { scope:locale = flag:courtyard } + reference = courtyard + } + override_background = { + trigger = { scope:locale = flag:dungeon } + reference = dungeon + } + override_background = { + trigger = { scope:locale = flag:docks } + reference = docks + } + override_background = { + trigger = { scope:locale = flag:feast } + reference = feast + } + override_background = { + trigger = { scope:locale = flag:market } + reference = market + } + override_background = { + trigger = { scope:locale = flag:tavern } + reference = tavern + } + override_background = { + trigger = { scope:locale = flag:throne_room } + reference = throne_room + } + override_background = { + trigger = { scope:locale = flag:army_camp } + reference = army_camp + } + + immediate = { + #Death/wounding enacted elsewhere. + if = { + limit = { duel_will_end_in_my_death_trigger = yes } + show_as_tooltip = { + death = { + killer = scope:sc_victor + death_reason = death_duel + } + } + } + else_if = { + limit = { scope:fatality = flag:practice } + # If we're only practicing, there's no harm done. + custom_tooltip = single_combat.result.tt.practice_no_wounds + } + else = { + show_as_tooltip = { + increase_wounds_no_death_effect = { REASON = duel } + } + } + # Add Tournament Trait XP + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = { 1 3 } + } + } + scope:sc_loser = { + every_vassal = { + limit = { + has_vassal_stance = belligerent + } + add_opinion = { + modifier = liege_lost_duel + target = scope:sc_loser + } + } + } + #Acknowledge loss of temporary combat modifiers. + custom_tooltip = single_combat.result.tt.temporary_modifiers_removed + # Damage equipped artifacts for loser + may_damage_artifact_effect = { + TYPE = primary_armament + CHANCE = 66 # 33% chance of no damage + PERCENT = 15 # 5-15 percent of max durability lost + } + may_damage_artifact_effect = { + TYPE = armor + CHANCE = 66 # 33% chance of no damage + PERCENT = 15 # 5-15 percent of max durability lost + } + #Nomads fighting upstart family members event + if = { + limit = { + scope:sc_loser = { + has_character_flag = duelling_defecting_family_flag + this = scope:sc_attacker + } + } + scope:sc_loser = { + set_designated_heir = scope:sc_victor + remove_character_flag = duelling_defecting_family_flag + } + } + } + + # I die! + option = { + # Standard death-scream. + name = { + trigger = { scope:death_rattle = flag:scream } + text = single_combat.0031.a.scream + } + # Wordless death. + name = { + trigger = { scope:death_rattle = flag:wordless } + text = single_combat.0031.a.wordless + } + # Muffled death. + name = { + trigger = { scope:death_rattle = flag:muffled } + text = single_combat.0031.a.muffled + } + # Choking death. + name = { + trigger = { scope:death_rattle = flag:choking } + text = single_combat.0031.a.choking + } + # Pleading death. + name = { + trigger = { scope:death_rattle = flag:pleading_screams } + text = single_combat.0031.a.pleading + } + # Soulmate death. + name = { + trigger = { scope:death_rattle = flag:soulmate } + text = single_combat.0031.a.soulmate + } + # Sinner death. + name = { + trigger = { scope:death_rattle = flag:sinner } + text = single_combat.0031.a.sinner + } + # Saint death. + name = { + trigger = { scope:death_rattle = flag:saint } + text = single_combat.0031.a.saint + } + # Legend death. + name = { + trigger = { scope:death_rattle = flag:legend } + text = single_combat.0031.a.legend + } + # Valhalla death. + name = { + trigger = { scope:death_rattle = flag:valhalla } + text = single_combat.0031.a.valhalla + } + # Best Friend death. + name = { + trigger = { scope:death_rattle = flag:best_friend } + text = single_combat.0031.a.best_friend + } + # Killed by rival death. + name = { + trigger = { scope:death_rattle = flag:killed_by_rival } + text = single_combat.0031.a.killed_by_rival + } + # Killed by nemesis death. + name = { + trigger = { scope:death_rattle = flag:killed_by_nemesis } + text = single_combat.0031.a.killed_by_nemesis + } + # Killed by spouse death. + name = { + trigger = { scope:death_rattle = flag:killed_by_spouse } + text = single_combat.0031.a.killed_by_spouse + } + # Killed by your HoF death. + name = { + trigger = { scope:death_rattle = flag:killed_by_your_head_of_faith } + text = single_combat.0031.a.killed_by_your_head_of_faith + } + # Killed by another HoF death. + name = { + trigger = { scope:death_rattle = flag:killed_by_another_head_of_faith } + text = single_combat.0031.a.killed_by_another_head_of_faith + } + # Killed by cultural head death. + name = { + trigger = { scope:death_rattle = flag:killed_by_cultural_head } + text = single_combat.0031.a.killed_by_cultural_head + } + # Killed by house head death. + name = { + trigger = { scope:death_rattle = flag:killed_by_house_head } + text = single_combat.0031.a.killed_by_house_head + } + # Killed by dynasty head death. + name = { + trigger = { scope:death_rattle = flag:killed_by_dynasty_head } + text = single_combat.0031.a.killed_by_dynasty_head + } + # Killed by close or extended family death. + name = { + trigger = { scope:death_rattle = flag:killed_by_close_or_extended_family } + text = single_combat.0031.a.killed_by_close_or_extended_family + } + # Killed by friend or lover. + name = { + trigger = { scope:death_rattle = flag:killed_by_friend_or_lover } + text = single_combat.0031.a.killed_by_friend_or_lover + } + # Killed by soulmate. + name = { + trigger = { scope:death_rattle = flag:killed_by_soulmate } + text = single_combat.0031.a.killed_by_soulmate + } + # Killed by best friend. + name = { + trigger = { scope:death_rattle = flag:killed_by_best_friend } + text = single_combat.0031.a.killed_by_best_friend + } + trigger = { duel_will_end_in_my_death_trigger = yes } + + #Confirmation of the duel ending & explanation. + sce_loser_end_result_tooltip_effect = yes + + #No stress for single-option events. + #No AI chance needed for single-option events. + } + + # Yield! Yield! + option = { + name = single_combat.0031.b + trigger = { duel_will_end_in_my_death_trigger = no } + + #Confirmation of the duel ending & explanation. + sce_loser_end_result_tooltip_effect = yes + + #No stress involved, as we don't want to force rivalries out of every duel. + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = -0.75 + ai_energy = -0.25 + } + } + } + + # You will rue the day you messed with scope:sc_loser! + option = { + name = single_combat.0031.c + trigger = { duel_will_end_in_my_death_trigger = no } + + #Confirmation of the duel ending & explanation. + sce_loser_end_result_tooltip_effect = yes + #Aaaaand set-up some rivalry. + if = { + limit = { + NOT = { has_relation_rival = scope:sc_victor } + } + progress_towards_rival_effect = { + REASON = rival_lost_duel + CHARACTER = scope:sc_victor + OPINION = 0 + } + } + # Consolation prize for being a sore loser to a rival. + else = { add_stress = minor_stress_loss } + + stress_impact = { + arrogant = minor_stress_impact_loss + vengeful = medium_stress_impact_loss + humble = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_energy = 0.25 + } + modifier = { #Weight up for stress. + add = 10 + has_trait = arrogant + } + modifier = { #Weight up for stress. + add = 20 + has_trait = vengeful + } + modifier = { #Weight down for stress. + add = -10 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -20 + has_trait = forgiving + } + } + } + + after = { + if = { #If dueled an AI, clear everything + limit = { + scope:sc_victor = { is_ai = yes } + } + single_combat_clean_shirtlessness_effect = { + ATTACKER = scope:sc_loser + DEFENDER = scope:sc_victor + } + } + else_if = { #If both players, clear own only + limit = { is_ai = no } + if = { + limit = { has_character_flag = single_combat_stripped_to_waist } + remove_character_flag = single_combat_stripped_to_waist + } + else_if = { # If a player who dueled a player, clear only own flags + limit = { has_character_flag = single_combat_duel_armor } + remove_character_flag = single_combat_duel_armor + } + } + if = { #If dueled an AI, clear everything + limit = { + scope:sc_victor = { is_ai = yes } + } + single_combat_clean_temp_weapon_effect = { + ATTACKER = scope:sc_loser + DEFENDER = scope:sc_victor + } + } + else_if = { #If both players, clear own only + limit = { is_ai = no } + if = { #check for variables set up in set_temporary_signature_weapon + limit = { + OR = { + has_variable = og_signature_weapon + has_variable = temporary_signature_weapon + } + } + if = { #remove the signature_weapon variable if the character didn't have anything before + limit = { + var:og_signature_weapon = flag:no_signature_weapon_yet + } + remove_variable = signature_weapon + } + else = { #restore the original signature_weapon + set_variable = { + name = signature_weapon + value = var:og_signature_weapon + } + } + #remove all variables set up in set_temporary_signature_weapon + remove_variable = temporary_signature_weapon + remove_variable = og_signature_weapon + } + } + } +} + +# scope:sc_victor's confirmation event. +single_combat.0041 = { + type = character_event + window = duel_event + title = single_combat.0041.t + desc = { + first_valid = { + # Are we in scope:sc_defender's POV? + triggered_desc = { + trigger = { this = scope:sc_defender } + desc = { + # Our POV tells us that we did X. + triggered_desc = { + #This trigger should always exist, but the desc structure is required for code reasons. + trigger = { always = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:wait_and_hope } + desc = single_combat.0041.desc.sc_defender.wait_and_hope + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:unsure_attack } + desc = single_combat.0041.desc.sc_defender.unsure_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0041.desc.sc_defender.enthusiastic_onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hail_mary } + desc = single_combat.0041.desc.sc_defender.hail_mary + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:pocket_sand } + desc = single_combat.0041.desc.sc_defender.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:nut_em } + desc = single_combat.0041.desc.sc_defender.nut_em + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:guard } + desc = single_combat.0041.desc.sc_defender.guard + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:probing_attack } + desc = single_combat.0041.desc.sc_defender.probing_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:onslaught } + desc = single_combat.0041.desc.sc_defender.onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:surprise_attack } + desc = single_combat.0041.desc.sc_defender.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:taunt } + desc = single_combat.0041.desc.sc_defender.taunt + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:put_the_boot_in } + desc = single_combat.0041.desc.sc_defender.put_the_boot_in + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:strict_guard } + desc = single_combat.0041.desc.sc_defender.strict_guard + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:confident_attack } + desc = single_combat.0041.desc.sc_defender.confident_attack + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:expert_onslaught } + desc = single_combat.0041.desc.sc_defender.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:attempt_disarm } + desc = single_combat.0041.desc.sc_defender.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:tire_opponent } + desc = single_combat.0041.desc.sc_defender.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:reason_you_suck_speech } + desc = single_combat.0041.desc.sc_defender.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:technique_from_legend } + desc = single_combat.0041.desc.sc_defender.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:like_a_viper } + desc = single_combat.0041.desc.sc_defender.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:pocket_silver } + desc = single_combat.0041.desc.sc_defender.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:martial_voice } + desc = single_combat.0041.desc.sc_defender.martial_voice + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:mocking_boast } + desc = single_combat.0041.desc.sc_defender.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:is_that_a_crocodile } + desc = single_combat.0041.desc.sc_defender.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:desert_warrior } + desc = single_combat.0041.desc.sc_defender.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:jungle_stalker } + desc = single_combat.0041.desc.sc_defender.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:open_terrain_expert } + desc = single_combat.0041.desc.sc_defender.open_terrain_expert + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:rough_terrain_expert } + desc = single_combat.0041.desc.sc_defender.rough_terrain_expert + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:forest_fighter } + desc = single_combat.0041.desc.sc_defender.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:raaargh } + desc = single_combat.0041.desc.sc_defender.raaargh + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hard_grit } + desc = single_combat.0041.desc.sc_defender.hard_grit + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:feint_and_stab } + desc = single_combat.0041.desc.sc_defender.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:butchery } + desc = single_combat.0041.desc.sc_defender.butchery + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:stoic_veteran } + desc = single_combat.0041.desc.sc_defender.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:blade_dance } + desc = single_combat.0041.desc.sc_defender.blade_dance + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:wrath_of_highgod } + desc = single_combat.0041.desc.sc_defender.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:hurt_me_better } + desc = single_combat.0041.desc.sc_defender.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:special_fallback } + desc = single_combat.0041.desc.sc_defender.special_fallback + } + triggered_desc = { + trigger = { scope:sc_defender_last_move = flag:something_to_hide } + desc = single_combat.0041.desc.sc_defender.something_to_hide + } + } + } + } + # And scope:sc_attacker failed to counter with Y. + triggered_desc = { + #This trigger should always exist, but the desc structure is required for code reasons. + trigger = { always = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0041.desc.opponent_response.wait_and_hope + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0041.desc.opponent_response.unsure_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0041.desc.opponent_response.enthusiastic_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0041.desc.opponent_response.hail_mary + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0041.desc.opponent_response.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0041.desc.opponent_response.nut_em + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0041.desc.opponent_response.guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0041.desc.opponent_response.probing_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0041.desc.opponent_response.onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0041.desc.opponent_response.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0041.desc.opponent_response.taunt + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:put_the_boot_in + has_trait = one_legged + } + desc = single_combat.0041.desc.opponent_response.put_the_boot_in.peg_leg + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0041.desc.opponent_response.put_the_boot_in.fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0041.desc.opponent_response.strict_guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0041.desc.opponent_response.confident_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0041.desc.opponent_response.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0041.desc.opponent_response.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0041.desc.opponent_response.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0041.desc.opponent_response.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0041.desc.opponent_response.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0041.desc.opponent_response.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0041.desc.opponent_response.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0041.desc.opponent_response.martial_voice + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0041.desc.opponent_response.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0041.desc.opponent_response.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0041.desc.opponent_response.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0041.desc.opponent_response.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0041.desc.opponent_response.open_terrain_expert + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0041.desc.opponent_response.rough_terrain_expert.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0041.desc.opponent_response.rough_terrain_expert.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0041.desc.opponent_response.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0041.desc.opponent_response.raaargh + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0041.desc.opponent_response.hard_grit + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0041.desc.opponent_response.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0041.desc.opponent_response.butchery + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0041.desc.opponent_response.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0041.desc.opponent_response.blade_dance + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0041.desc.opponent_response.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0041.desc.opponent_response.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0041.desc.opponent_response.special_fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0041.desc.opponent_response.something_to_hide + } + } + } + } + # Leading to Z-1: injury. + triggered_desc = { + trigger = { duel_will_end_in_opponent_death_trigger = no } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0041.desc.opponent_response.wait_and_hope.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0041.desc.opponent_response.unsure_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0041.desc.opponent_response.enthusiastic_onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0041.desc.opponent_response.hail_mary.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0041.desc.opponent_response.pocket_sand.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0041.desc.opponent_response.nut_em.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0041.desc.opponent_response.guard.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0041.desc.opponent_response.probing_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0041.desc.opponent_response.onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0041.desc.opponent_response.surprise_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0041.desc.opponent_response.taunt.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0041.desc.opponent_response.put_the_boot_in.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0041.desc.opponent_response.strict_guard.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0041.desc.opponent_response.confident_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0041.desc.opponent_response.expert_onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0041.desc.opponent_response.attempt_disarm.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0041.desc.opponent_response.tire_opponent.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0041.desc.opponent_response.reason_you_suck_speech.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0041.desc.opponent_response.technique_from_legend.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0041.desc.opponent_response.like_a_viper.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0041.desc.opponent_response.pocket_silver.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0041.desc.opponent_response.martial_voice.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0041.desc.opponent_response.mocking_boast.injury + } + # No need for an is_that_a_crocodile, as it's never just an injury. + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0041.desc.opponent_response.desert_warrior.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0041.desc.opponent_response.jungle_stalker.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0041.desc.opponent_response.open_terrain_expert.injury + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0041.desc.opponent_response.rough_terrain_expert.injury.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0041.desc.opponent_response.rough_terrain_expert.injury.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0041.desc.opponent_response.forest_fighter.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0041.desc.opponent_response.raaargh.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0041.desc.opponent_response.hard_grit.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0041.desc.opponent_response.feint_and_stab.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0041.desc.opponent_response.butchery.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0041.desc.opponent_response.stoic_veteran.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0041.desc.opponent_response.blade_dance.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0041.desc.opponent_response.wrath_of_highgod.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0041.desc.opponent_response.hurt_me_better.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0041.desc.opponent_response.special_fallback.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0041.desc.opponent_response.something_to_hide.injury + } + } + } + } + # Or Z-2: death. + triggered_desc = { + trigger = { duel_will_end_in_opponent_death_trigger = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0041.desc.opponent_response.wait_and_hope.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0041.desc.opponent_response.unsure_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0041.desc.opponent_response.enthusiastic_onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0041.desc.opponent_response.hail_mary.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0041.desc.opponent_response.pocket_sand.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0041.desc.opponent_response.nut_em.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0041.desc.opponent_response.guard.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0041.desc.opponent_response.probing_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0041.desc.opponent_response.onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0041.desc.opponent_response.surprise_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0041.desc.opponent_response.taunt.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0041.desc.opponent_response.put_the_boot_in.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0041.desc.opponent_response.strict_guard.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0041.desc.opponent_response.confident_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0041.desc.opponent_response.expert_onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0041.desc.opponent_response.attempt_disarm.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0041.desc.opponent_response.tire_opponent.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0041.desc.opponent_response.reason_you_suck_speech.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0041.desc.opponent_response.technique_from_legend.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0041.desc.opponent_response.like_a_viper.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0041.desc.opponent_response.pocket_silver.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0041.desc.opponent_response.martial_voice.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0041.desc.opponent_response.mocking_boast.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0041.desc.opponent_response.is_that_a_crocodile.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0041.desc.opponent_response.desert_warrior.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0041.desc.opponent_response.jungle_stalker.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0041.desc.opponent_response.open_terrain_expert.fatality + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0041.desc.opponent_response.rough_terrain_expert.fatality.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0041.desc.opponent_response.rough_terrain_expert.fatality.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0041.desc.opponent_response.forest_fighter.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0041.desc.opponent_response.raaargh.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0041.desc.opponent_response.hard_grit.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0041.desc.opponent_response.feint_and_stab.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0041.desc.opponent_response.butchery.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0041.desc.opponent_response.stoic_veteran.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0041.desc.opponent_response.blade_dance.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0041.desc.opponent_response.wrath_of_highgod.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0041.desc.opponent_response.hurt_me_better.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0041.desc.opponent_response.special_fallback.fatality + } + # No need for a something_to_hide, as it's never fatal. + } + } + } + } + } + # Or scope:sc_attacker's? + triggered_desc = { + trigger = { this = scope:sc_attacker } + desc = { + # Our POV tells us that we went straight in with Y. + triggered_desc = { + #This trigger should always exist, but the desc structure is required for code reasons. + trigger = { always = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0041.desc.sc_attacker.wait_and_hope + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0041.desc.sc_attacker.unsure_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0041.desc.sc_attacker.enthusiastic_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0041.desc.sc_attacker.hail_mary + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0041.desc.sc_attacker.pocket_sand + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0041.desc.sc_attacker.nut_em + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0041.desc.sc_attacker.guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0041.desc.sc_attacker.probing_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0041.desc.sc_attacker.onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0041.desc.sc_attacker.surprise_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0041.desc.sc_attacker.taunt + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:put_the_boot_in + has_trait = one_legged + } + desc = single_combat.0041.desc.sc_attacker.put_the_boot_in.peg_leg + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0041.desc.sc_attacker.put_the_boot_in.fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0041.desc.sc_attacker.strict_guard + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0041.desc.sc_attacker.confident_attack + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0041.desc.sc_attacker.expert_onslaught + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0041.desc.sc_attacker.attempt_disarm + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0041.desc.sc_attacker.tire_opponent + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0041.desc.sc_attacker.reason_you_suck_speech + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0041.desc.sc_attacker.technique_from_legend + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0041.desc.sc_attacker.like_a_viper + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0041.desc.sc_attacker.pocket_silver + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0041.desc.sc_attacker.martial_voice + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0041.desc.sc_attacker.mocking_boast + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0041.desc.sc_attacker.is_that_a_crocodile + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0041.desc.sc_attacker.desert_warrior + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0041.desc.sc_attacker.jungle_stalker + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0041.desc.sc_attacker.open_terrain_expert + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0041.desc.sc_attacker.rough_terrain_expert.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0041.desc.sc_attacker.rough_terrain_expert.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0041.desc.sc_attacker.forest_fighter + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0041.desc.sc_attacker.raaargh + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0041.desc.sc_attacker.hard_grit + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0041.desc.sc_attacker.feint_and_stab + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0041.desc.sc_attacker.butchery + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0041.desc.sc_attacker.stoic_veteran + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0041.desc.sc_attacker.blade_dance + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0041.desc.sc_attacker.wrath_of_highgod + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0041.desc.sc_attacker.hurt_me_better + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0041.desc.sc_attacker.special_fallback + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0041.desc.sc_attacker.something_to_hide + } + } + } + } + # Leading to Z-1: injury. + triggered_desc = { + trigger = { duel_will_end_in_opponent_death_trigger = no } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0041.desc.sc_attacker.wait_and_hope.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0041.desc.sc_attacker.unsure_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0041.desc.sc_attacker.enthusiastic_onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0041.desc.sc_attacker.hail_mary.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0041.desc.sc_attacker.pocket_sand.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0041.desc.sc_attacker.nut_em.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0041.desc.sc_attacker.guard.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0041.desc.sc_attacker.probing_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0041.desc.sc_attacker.onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0041.desc.sc_attacker.surprise_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0041.desc.sc_attacker.taunt.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0041.desc.sc_attacker.put_the_boot_in.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0041.desc.sc_attacker.strict_guard.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0041.desc.sc_attacker.confident_attack.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0041.desc.sc_attacker.expert_onslaught.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0041.desc.sc_attacker.attempt_disarm.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0041.desc.sc_attacker.tire_opponent.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0041.desc.sc_attacker.reason_you_suck_speech.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0041.desc.sc_attacker.technique_from_legend.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0041.desc.sc_attacker.like_a_viper.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0041.desc.sc_attacker.pocket_silver.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0041.desc.sc_attacker.martial_voice.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0041.desc.sc_attacker.mocking_boast.injury + } + # No need for an is_that_a_crocodile, as it's never just an injury. + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0041.desc.sc_attacker.desert_warrior.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0041.desc.sc_attacker.jungle_stalker.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0041.desc.sc_attacker.open_terrain_expert.injury + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0041.desc.sc_attacker.rough_terrain_expert.injury.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0041.desc.sc_attacker.rough_terrain_expert.injury.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0041.desc.sc_attacker.forest_fighter.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0041.desc.sc_attacker.raaargh.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0041.desc.sc_attacker.hard_grit.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0041.desc.sc_attacker.feint_and_stab.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0041.desc.sc_attacker.butchery.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0041.desc.sc_attacker.stoic_veteran.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0041.desc.sc_attacker.blade_dance.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0041.desc.sc_attacker.wrath_of_highgod.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0041.desc.sc_attacker.hurt_me_better.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0041.desc.sc_attacker.special_fallback.injury + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:something_to_hide } + desc = single_combat.0041.desc.sc_attacker.something_to_hide.injury + } + } + } + } + # Or Z-2: death. + triggered_desc = { + trigger = { duel_will_end_in_opponent_death_trigger = yes } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wait_and_hope } + desc = single_combat.0041.desc.sc_attacker.wait_and_hope.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:unsure_attack } + desc = single_combat.0041.desc.sc_attacker.unsure_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:enthusiastic_onslaught } + desc = single_combat.0041.desc.sc_attacker.enthusiastic_onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hail_mary } + desc = single_combat.0041.desc.sc_attacker.hail_mary.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_sand } + desc = single_combat.0041.desc.sc_attacker.pocket_sand.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:nut_em } + desc = single_combat.0041.desc.sc_attacker.nut_em.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:guard } + desc = single_combat.0041.desc.sc_attacker.guard.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:probing_attack } + desc = single_combat.0041.desc.sc_attacker.probing_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:onslaught } + desc = single_combat.0041.desc.sc_attacker.onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:surprise_attack } + desc = single_combat.0041.desc.sc_attacker.surprise_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:taunt } + desc = single_combat.0041.desc.sc_attacker.taunt.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:put_the_boot_in } + desc = single_combat.0041.desc.sc_attacker.put_the_boot_in.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:strict_guard } + desc = single_combat.0041.desc.sc_attacker.strict_guard.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:confident_attack } + desc = single_combat.0041.desc.sc_attacker.confident_attack.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:expert_onslaught } + desc = single_combat.0041.desc.sc_attacker.expert_onslaught.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:attempt_disarm } + desc = single_combat.0041.desc.sc_attacker.attempt_disarm.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:tire_opponent } + desc = single_combat.0041.desc.sc_attacker.tire_opponent.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:reason_you_suck_speech } + desc = single_combat.0041.desc.sc_attacker.reason_you_suck_speech.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:technique_from_legend } + desc = single_combat.0041.desc.sc_attacker.technique_from_legend.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:like_a_viper } + desc = single_combat.0041.desc.sc_attacker.like_a_viper.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:pocket_silver } + desc = single_combat.0041.desc.sc_attacker.pocket_silver.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:martial_voice } + desc = single_combat.0041.desc.sc_attacker.martial_voice.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:mocking_boast } + desc = single_combat.0041.desc.sc_attacker.mocking_boast.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:is_that_a_crocodile } + desc = single_combat.0041.desc.sc_attacker.is_that_a_crocodile.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:desert_warrior } + desc = single_combat.0041.desc.sc_attacker.desert_warrior.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:jungle_stalker } + desc = single_combat.0041.desc.sc_attacker.jungle_stalker.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:open_terrain_expert } + desc = single_combat.0041.desc.sc_attacker.open_terrain_expert.fatality + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { rocky_locale_trigger = yes } + } + desc = single_combat.0041.desc.sc_attacker.rough_terrain_expert.fatality.rocky + } + triggered_desc = { + trigger = { + scope:sc_attacker_last_move = flag:rough_terrain_expert + scope:sc_defender.location = { terrain = wetlands } + } + desc = single_combat.0041.desc.sc_attacker.rough_terrain_expert.fatality.boggy + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:forest_fighter } + desc = single_combat.0041.desc.sc_attacker.forest_fighter.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:raaargh } + desc = single_combat.0041.desc.sc_attacker.raaargh.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hard_grit } + desc = single_combat.0041.desc.sc_attacker.hard_grit.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:feint_and_stab } + desc = single_combat.0041.desc.sc_attacker.feint_and_stab.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:butchery } + desc = single_combat.0041.desc.sc_attacker.butchery.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:stoic_veteran } + desc = single_combat.0041.desc.sc_attacker.stoic_veteran.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:blade_dance } + desc = single_combat.0041.desc.sc_attacker.blade_dance.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:wrath_of_highgod } + desc = single_combat.0041.desc.sc_attacker.wrath_of_highgod.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:hurt_me_better } + desc = single_combat.0041.desc.sc_attacker.hurt_me_better.fatality + } + triggered_desc = { + trigger = { scope:sc_attacker_last_move = flag:special_fallback } + desc = single_combat.0041.desc.sc_attacker.special_fallback.fatality + } + # No need for a something_to_hide, as it's never fatal. + } + } + } + } + } + } + } + theme = skull + left_portrait = { + character = scope:sc_victor + scripted_animation = duel_celebrate + } + right_portrait = { + character = scope:sc_loser + triggered_animation = { + trigger = { is_alive = no } + animation = loss_1 + } + animation = sword_yield_start + } + # Background Logic + override_background = { + trigger = { scope:locale = flag:terrain_scope } + reference = terrain_scope + } + override_background = { + trigger = { scope:locale = flag:battlefield } + reference = battlefield + } + override_background = { + trigger = { scope:locale = flag:alley_night } + reference = alley_night + } + override_background = { + trigger = { scope:locale = flag:alley_day } + reference = alley_day + } + override_background = { + trigger = { scope:locale = flag:temple } + reference = temple + } + override_background = { + trigger = { scope:locale = flag:corridor_night } + reference = corridor_night + } + override_background = { + trigger = { scope:locale = flag:corridor_day } + reference = corridor_day + } + override_background = { + trigger = { scope:locale = flag:courtyard } + reference = courtyard + } + override_background = { + trigger = { scope:locale = flag:dungeon } + reference = dungeon + } + override_background = { + trigger = { scope:locale = flag:docks } + reference = docks + } + override_background = { + trigger = { scope:locale = flag:feast } + reference = feast + } + override_background = { + trigger = { scope:locale = flag:market } + reference = market + } + override_background = { + trigger = { scope:locale = flag:tavern } + reference = tavern + } + override_background = { + trigger = { scope:locale = flag:throne_room } + reference = throne_room + } + override_background = { + trigger = { scope:locale = flag:army_camp } + reference = army_camp + } + + immediate = { + #Death/wounding enacted elsewhere. + if = { + limit = { + duel_will_end_in_opponent_death_trigger = yes + } + scope:sc_loser = { + show_as_tooltip = { + death = { + killer = scope:sc_victor + death_reason = death_duel + } + } + } + if = { + limit = { + scope:sc_victor.faith = { has_doctrine = tenet_cranial_trophies } + } + show_as_tooltip = { + tgp_cranial_trophies_beheading_effect = { + KILLER = scope:sc_victor + DEAD = scope:sc_loser + } + } + } + } + else_if = { + limit = { scope:fatality = flag:practice } + # If we're only practicing, there's no harm done. + custom_tooltip = single_combat.result.tt.practice_no_wounds + } + else = { + scope:sc_loser = { + show_as_tooltip = { + increase_wounds_no_death_effect = { REASON = duel } + } + } + } + # Add Blademaster Trait XP + if = { + limit = { has_trait = lifestyle_blademaster } + add_trait_xp = { + trait = lifestyle_blademaster + value = lifestyle_blademaster_xp_gain_minor_value + } + } + + # Add Tournament Trait XP + if = { + limit = { has_trait = tourney_participant } + add_trait_xp = { + trait = tourney_participant + track = foot + value = tournament_hastiludes_xp_gain_minor_value + } + } + + scope:sc_victor = { + every_vassal = { + limit = { + has_vassal_stance = belligerent + } + custom = every_belligerent_vassal + add_opinion = { + modifier = liege_won_duel + target = scope:sc_victor + } + } + } + + # Add Hereward killing a Norman XP + if = { + limit = { + has_trait = the_wake + scope:sc_loser = { + culture = culture:norman + } + } + add_trait_xp = { + trait = the_wake + value = { 5 10 } + } + } + # Add Nomadic Legitimacy gain + if = { # Nomads gain Legitimacy from duels + limit = { + has_mpo_dlc_trigger = yes + is_valid_for_nomadic_legitimacy_change = yes + } + add_legitimacy = medium_legitimacy_gain + } + + # Increase the Strength of Ushiwakamaru + if = { + limit = { + OR = { + has_character_modifier = tgp_japan_ushiwakamaru + has_character_modifier = tgp_japan_ushiwakamaru_2 + has_character_modifier = tgp_japan_ushiwakamaru_3 + } + } + change_variable = { + name = ushiwakamaru_duels_won + add = 1 + } + + if = { + limit = { + var:ushiwakamaru_duels_won >= 60 + NOT = { has_character_modifier = tgp_japan_ushiwakamaru_4 } + } + remove_character_modifier = tgp_japan_ushiwakamaru_3 + add_character_modifier = { + modifier = tgp_japan_ushiwakamaru_4 + years = -1 + } + } + else_if = { + limit = { + var:ushiwakamaru_duels_won >= 40 + NOT = { has_character_modifier = tgp_japan_ushiwakamaru_4 } + NOT = { has_character_modifier = tgp_japan_ushiwakamaru_3 } + } + remove_character_modifier = tgp_japan_ushiwakamaru_2 + add_character_modifier = { + modifier = tgp_japan_ushiwakamaru_3 + years = -1 + } + } + else_if = { + limit = { + var:ushiwakamaru_duels_won >= 20 + NOT = { has_character_modifier = tgp_japan_ushiwakamaru_4 } + NOT = { has_character_modifier = tgp_japan_ushiwakamaru_3 } + NOT = { has_character_modifier = tgp_japan_ushiwakamaru_2 } + } + remove_character_modifier = tgp_japan_ushiwakamaru + add_character_modifier = { + modifier = tgp_japan_ushiwakamaru_2 + years = -1 + } + } + } + + # Damage equipped artifacts + may_damage_artifact_effect = { + TYPE = primary_armament + CHANCE = 50 # 50% chance of no damage + PERCENT = 10 # 5-10 percent of max durability lost + } + may_damage_artifact_effect = { + TYPE = armor + CHANCE = 50 # 50% chance of no damage + PERCENT = 10 # 5-10 percent of max durability lost + } + #Acknowledge loss of temporary combat modifiers. + custom_tooltip = single_combat.result.tt.temporary_modifiers_removed + } + + # They died! + option = { + name = single_combat.0041.a + trigger = { duel_will_end_in_opponent_death_trigger = yes } + + #Confirmation of the duel ending & explanation. + sce_victor_end_result_tooltip_effect = yes + + #No stress for single-option events. + #No AI chance needed for single-option events. + } + + # I am victorious! + option = { + name = single_combat.0041.b + trigger = { duel_will_end_in_opponent_death_trigger = no } + + #Confirmation of the duel ending & explanation. + sce_victor_end_result_tooltip_effect = yes + + #No stress for single-option events. + #No AI chance needed for single-option events. + } + + after = { + # Everyone puts their shirts back on. + if = { #If dueled an AI, clear everything + limit = { + scope:sc_loser = { is_ai = yes } + } + single_combat_clean_shirtlessness_effect = { + ATTACKER = scope:sc_loser + DEFENDER = scope:sc_victor + } + } + else_if = { #If both players, clear own only + limit = { is_ai = no } + if = { + limit = { has_character_flag = single_combat_stripped_to_waist } + remove_character_flag = single_combat_stripped_to_waist + } + else_if = { # If a player who dueled a player, clear only own flags + limit = { has_character_flag = single_combat_duel_armor } + remove_character_flag = single_combat_duel_armor + } + } + # Everyone puts their signature weapons back on. + if = { #If dueled an AI, clear everything + limit = { + scope:sc_loser = { is_ai = yes } + } + single_combat_clean_temp_weapon_effect = { + ATTACKER = scope:sc_loser + DEFENDER = scope:sc_victor + } + } + else_if = { #If both players, clear own only + limit = { is_ai = no } + if = { #check for variables set up in set_temporary_signature_weapon + limit = { + OR = { + has_variable = og_signature_weapon + has_variable = temporary_signature_weapon + } + } + if = { #remove the signature_weapon variable if the character didn't have anything before + limit = { + var:og_signature_weapon = flag:no_signature_weapon_yet + } + remove_variable = signature_weapon + } + else = { #restore the original signature_weapon + set_variable = { + name = signature_weapon + value = var:og_signature_weapon + } + } + #remove all variables set up in set_temporary_signature_weapon + remove_variable = temporary_signature_weapon + remove_variable = og_signature_weapon + } + } + } +} + +################################################## +# Test Events +# by Ewan Cowhig Croft +# 1001+ +################################################## + +# Spawn a duel, with a random knight as defender. +single_combat.1001 = { + hidden = yes + orphan = yes + + immediate = { + random_knight = { + limit = { can_start_single_combat_trigger = yes } + save_scope_as = fighter_mc_fighter_chap + } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = root + SC_DEFENDER = scope:fighter_mc_fighter_chap + FATALITY = default + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 #In a real event, this would obviously be a different even to the output. + } + } +} + +# Spawn a duel, with a random knight as attacker. +single_combat.1002 = { + hidden = yes + orphan = yes + + immediate = { + random_knight = { + limit = { can_start_single_combat_trigger = yes } + save_scope_as = fighter_mc_fighter_chap + } + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = scope:fighter_mc_fighter_chap + SC_DEFENDER = root + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 #In a real event, this would obviously be a different even to the output. + } + } +} + +# Error suppression. +single_combat.1003 = { + hidden = yes + orphan = yes + + immediate = { + # Fatality flags + hidden_effect = { + save_scope_value_as = { + name = fatality + value = flag:default + } + save_scope_value_as = { + name = fatality + value = flag:possible + } + save_scope_value_as = { + name = fatality + value = flag:no + } + save_scope_value_as = { + name = fatality + value = flag:always + } + } + # Match fixing flags + hidden_effect = { + save_scope_value_as = { + name = fixed + value = flag:sc_attacker + } + save_scope_value_as = { + name = fixed + value = flag:sc_defender + } + } + if = { + limit = { + scope:fixed = flag:sc_attacker + scope:fixed = flag:sc_defender + } + # Nothing. + } + # Background flags + hidden_effect = { + save_scope_value_as = { + name = locale + value = flag:terrain_scope + } + save_scope_value_as = { + name = locale + value = flag:battlefield + } + save_scope_value_as = { + name = locale + value = flag:alley_night + } + save_scope_value_as = { + name = locale + value = flag:alley_day + } + save_scope_value_as = { + name = locale + value = flag:temple + } + save_scope_value_as = { + name = locale + value = flag:corridor_night + } + save_scope_value_as = { + name = locale + value = flag:corridor_day + } + save_scope_value_as = { + name = locale + value = flag:courtyard + } + save_scope_value_as = { + name = locale + value = flag:dungeon + } + save_scope_value_as = { + name = locale + value = flag:docks + } + save_scope_value_as = { + name = locale + value = flag:feast + } + save_scope_value_as = { + name = locale + value = flag:market + } + save_scope_value_as = { + name = locale + value = flag:tavern + } + save_scope_value_as = { + name = locale + value = flag:throne_room + } + save_scope_value_as = { + name = locale + value = flag:army_camp + } + } + # Victory type flags + if = { + limit = { + scope:victory_type = flag:skill + scope:victory_type = flag:mistake + scope:victory_type = flag:sudden_death + } + #Nothing. + } + } +} + +# Debug event to duel a character. +single_combat.1004 = { + type = character_event + window = duel_event + title = single_combat.1004.t + desc = single_combat.1004.desc + left_portrait = { + character = scope:actor + animation = anger + } + right_portrait = { + character = scope:recipient + animation = fear + } + theme = skull + + # You are the attacker, default + option = { + name = single_combat.1004.a + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:actor + SC_DEFENDER = scope:recipient + FATALITY = default + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 #In a real event, this would obviously be a different even to the output. + } + } + + # You are the defender, default + option = { + name = single_combat.1004.b + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:recipient + SC_DEFENDER = scope:actor + FATALITY = default + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 #In a real event, this would obviously be a different even to the output. + } + } + + # You are the attacker, fatal + option = { + name = single_combat.1004.c + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:actor + SC_DEFENDER = scope:recipient + FATALITY = always + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 #In a real event, this would obviously be a different even to the output. + } + } + + # You are the defender, fatal + option = { + name = single_combat.1004.d + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:recipient + SC_DEFENDER = scope:actor + FATALITY = always + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 #In a real event, this would obviously be a different even to the output. + } + } + + # You are the attack, non-lethal + option = { + name = single_combat.1004.e + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:actor + SC_DEFENDER = scope:recipient + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 #In a real event, this would obviously be a different even to the output. + } + } + + # You are the defender, non-lethal + option = { + name = single_combat.1004.f + + configure_start_single_combat_effect = { + SC_INITIATOR = scope:actor + SC_ATTACKER = scope:recipient + SC_DEFENDER = scope:actor + FATALITY = no + FIXED = no + LOCALE = terrain_scope + OUTPUT_EVENT = single_combat.1006 + INVALIDATION_EVENT = single_combat.1006 #In a real event, this would obviously be a different even to the output. + } + } + + # Actually, never mind + option = { + name = single_combat.1004.g + } + + after = { + single_combat_apply_default_shirtlessness_effect = { + ATTACKER = scope:actor + DEFENDER = scope:recipient + } + } +} + +# Hidden empty event for testing purposes. +single_combat.1006 = { + hidden = yes +} diff --git a/N3OW/events/test_events/debug.txt b/N3OW/events/test_events/debug.txt new file mode 100644 index 00000000..6b5c6134 --- /dev/null +++ b/N3OW/events/test_events/debug.txt @@ -0,0 +1,3442 @@ + +#Debugging events + +namespace = debug + +debug.1 = { # Max Portraits in Event Window + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + content_source = "dlc_006" + override_background = { + reference = temple + } + + left_portrait = { + character = root + animation = dancing + # camera = camera_event_kneeling + } + + right_portrait = { + character = scope:portrait_2 + animation = throne_room_kneel_1 + # camera = camera_event_standing_with_horse_right + } + + center_portrait = { + character = scope:portrait_3 + animation = loss_1 + } + + + lower_right_portrait = scope:portrait_4 + lower_center_portrait = scope:portrait_5 + lower_left_portrait = scope:portrait_6 + + immediate = { + random_ruler = { save_scope_as = portrait_1 } + random_ruler = { save_scope_as = portrait_2 } + random_ruler = { save_scope_as = portrait_3 } + random_ruler = { save_scope_as = portrait_4 } + random_ruler = { save_scope_as = portrait_5 } + random_ruler = { save_scope_as = portrait_6 } + } + + option = { name = LOREM_IPSUM_TITLE } +} + +debug.111 = { # Two Portraits + three Artifacts in Event Window + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + left_portrait = { + character = root + animation = idle + } + right_portrait = { + character = scope:portrait_1 + animation = idle + } + + artifact = { + target = scope:portrait_2 + position = lower_right_portrait + } + + artifact = { + target = scope:portrait_3 + position = lower_center_portrait + } + + artifact = { + target = scope:portrait_4 + position = lower_left_portrait + } + + immediate = { + random_ruler = { + save_scope_as = portrait_1 + } + random_artifact = { + save_scope_as = portrait_2 + } + random_artifact = { + save_scope_as = portrait_3 + } + random_artifact = { + save_scope_as = portrait_4 + } + } + + option = { + name = LOREM_IPSUM_TITLE + } +} + +debug.0002 = { + type = character_event + title = debug.0002.t + desc = debug.0002.desc + theme = default + left_portrait = scope:recipient + + immediate = { + if = { + limit = { is_female = yes } + save_scope_as = mother + scope:recipient = { save_scope_as = father } + } + + else = { + save_scope_as = father + scope:recipient = { save_scope_as = mother } + } + } + + #Normal pregnancy + option = { + name = debug.0002.a + + scope:mother = { + make_pregnant = { + father = scope:father + } + } + } + + #One please + option = { + name = debug.0002.b + + scope:mother = { + make_pregnant = { + father = scope:father + number_of_children = 1 + } + } + } + + #Two please + option = { + name = debug.0002.c + + scope:mother = { + make_pregnant = { + father = scope:father + number_of_children = 2 + } + } + } + + #Three please + option = { + name = debug.0002.d + + scope:mother = { + make_pregnant = { + father = scope:father + number_of_children = 3 + } + } + } + + #Go crazy + option = { + name = debug.0002.e + + scope:mother = { + make_pregnant = { + father = scope:father + number_of_children = 10 + } + } + } +} + +## globally upgrade some holdings for marketing videos and screenshots + +debug.0008 = { + type = character_event + hidden = yes + theme = default + orphan = yes + + immediate = { + every_duchy = { + if = { + limit = { is_titular = no } + title_capital_county = { + every_county_province = { + if = { + limit = { + is_county_capital = yes + NOT = { has_building = curtain_walls_02 } + } + add_building = curtain_walls_02 + } + if = { + limit = { + has_holding_type = castle_holding + NOT = { has_building = castle_02 } + } + add_building = castle_02 + } + else_if = { + limit = { + has_holding_type = church_holding + NOT = { has_building = temple_02 } + } + add_building = temple_03 + } + else_if = { + limit = { + has_holding_type = city_holding + NOT = { has_building = city_02 } + } + add_building = city_03 + } + } + } + } + } + every_kingdom = { + if = { + limit = { is_titular = no } + title_capital_county = { + every_county_province = { + if = { + limit = { + is_county_capital = yes + NOT = { has_building = curtain_walls_03 } + } + add_building = curtain_walls_03 + } + if = { + limit = { + has_holding_type = castle_holding + NOT = { has_building = castle_03 } + } + add_building = castle_03 + } + else_if = { + limit = { + has_holding_type = church_holding + NOT = { has_building = temple_03 } + } + add_building = temple_03 + } + else_if = { + limit = { + has_holding_type = city_holding + NOT = { has_building = city_03 } + } + add_building = city_03 + } + } + } + } + } + every_empire = { + if = { + limit = { is_titular = no } + title_capital_county = { + every_county_province = { + if = { + limit = { + is_county_capital = yes + NOT = { has_building = curtain_walls_08 } + } + add_building = curtain_walls_08 + } + if = { + limit = { + has_holding_type = castle_holding + NOT = { has_building = castle_04 } + } + add_building = castle_04 + } + else_if = { + limit = { + has_holding_type = church_holding + NOT = { has_building = temple_04 } + } + add_building = temple_04 + } + else_if = { + limit = { + has_holding_type = city_holding + NOT = { has_building = city_04 } + } + add_building = city_04 + } + } + } + } + } + } +} + +###################### +# HEALTH DATA EVENTS # +###################### + +# Set variable to collect data on birth +scripted_effect test_2_set_character_disease_data_variable_effect = { + set_variable = { + name = disease_data_character_$DISEASE$_amount + value = 0 + } +} + +# For likelihood of happening, set target values, change the weights of the diseases, et voila +# Calculate for deadliness: seed the world with disease and check how likely people are to die +debug.0010 = { #test.2 + hidden = yes + + trigger = { activate_disease_data_tracking_trigger = yes } + + immediate = { + set_variable = { + name = disease_data_activate_tracking + value = yes + } + + test_2_set_character_disease_data_variable_effect = { DISEASE = ill } + test_2_set_character_disease_data_variable_effect = { DISEASE = pneumonic } + test_2_set_character_disease_data_variable_effect = { DISEASE = gout_ridden } + test_2_set_character_disease_data_variable_effect = { DISEASE = leper } + test_2_set_character_disease_data_variable_effect = { DISEASE = typhus } + test_2_set_character_disease_data_variable_effect = { DISEASE = consumption } + test_2_set_character_disease_data_variable_effect = { DISEASE = cancer } + test_2_set_character_disease_data_variable_effect = { DISEASE = lovers_pox } + test_2_set_character_disease_data_variable_effect = { DISEASE = great_pox } + test_2_set_character_disease_data_variable_effect = { DISEASE = smallpox } + test_2_set_character_disease_data_variable_effect = { DISEASE = bubonic_plague } + test_2_set_character_disease_data_variable_effect = { DISEASE = measles } + test_2_set_character_disease_data_variable_effect = { DISEASE = dysentery } + test_2_set_character_disease_data_variable_effect = { DISEASE = ergotism } + } +} + + +scripted_effect test_3_create_disease_variables_effect = { + set_global_variable = { + name = disease_data_global_$DISEASE$_amount + value = 0 + } + set_global_variable = { + name = disease_data_global_premature_death_$DISEASE$_amount + value = 0 + } +} + +scripted_effect test_3_count_diseases_effect = { + change_global_variable = { + name = disease_data_global_$DISEASE$_amount + add = var:disease_data_character_$DISEASE$_amount + } +} + + +scripted_effect test_3_count_premature_disease_deaths_effect = { + if = { + limit = { death_reason = death_$DISEASE$ } + change_global_variable = { + name = disease_data_global_premature_death_amount + add = 1 + } + change_global_variable = { + name = disease_data_global_premature_death_$DISEASE$_amount + add = 1 + } + } +} + +# Collect data on death +debug.0011 = { #test.3 + hidden = yes + orphan = yes + + trigger = { + activate_disease_data_tracking_trigger = yes + has_variable = disease_data_activate_tracking + } + + immediate = { + if = { + limit = { NOT = { exists = global_var:disease_data_global_character_amount } } + + # All counters + set_global_variable = { + name = disease_data_global_character_amount + value = 0 + } + set_global_variable = { + name = disease_data_global_common_disease_amount + value = 0 + } + set_global_variable = { + name = disease_data_global_serious_disease_amount + value = 0 + } + set_global_variable = { + name = disease_data_global_premature_death_amount + value = 0 + } + + # Disease counters + test_3_create_disease_variables_effect = { DISEASE = ill } + test_3_create_disease_variables_effect = { DISEASE = pneumonic } + test_3_create_disease_variables_effect = { DISEASE = gout_ridden } + test_3_create_disease_variables_effect = { DISEASE = leper } + test_3_create_disease_variables_effect = { DISEASE = typhus } + test_3_create_disease_variables_effect = { DISEASE = consumption } + test_3_create_disease_variables_effect = { DISEASE = cancer } + test_3_create_disease_variables_effect = { DISEASE = lovers_pox } + test_3_create_disease_variables_effect = { DISEASE = great_pox } + test_3_create_disease_variables_effect = { DISEASE = smallpox } + test_3_create_disease_variables_effect = { DISEASE = bubonic_plague } + test_3_create_disease_variables_effect = { DISEASE = measles } + test_3_create_disease_variables_effect = { DISEASE = dysentery } + test_3_create_disease_variables_effect = { DISEASE = ergotism } + } + + + change_global_variable = { + name = disease_data_global_character_amount + add = 1 + } + + # Add to disease counters + test_3_count_diseases_effect = { DISEASE = ill } + test_3_count_diseases_effect = { DISEASE = pneumonic } + test_3_count_diseases_effect = { DISEASE = gout_ridden } + test_3_count_diseases_effect = { DISEASE = leper } + test_3_count_diseases_effect = { DISEASE = typhus } + test_3_count_diseases_effect = { DISEASE = consumption } + test_3_count_diseases_effect = { DISEASE = cancer } + test_3_count_diseases_effect = { DISEASE = lovers_pox } + test_3_count_diseases_effect = { DISEASE = great_pox } + test_3_count_diseases_effect = { DISEASE = smallpox } + test_3_count_diseases_effect = { DISEASE = bubonic_plague } + test_3_count_diseases_effect = { DISEASE = measles } + test_3_count_diseases_effect = { DISEASE = dysentery } + test_3_count_diseases_effect = { DISEASE = ergotism } + + # Had a "common" disease? + if = { + limit = { + OR = { + var:disease_data_character_ill_amount >= 1 + var:disease_data_character_lovers_pox_amount >= 1 + } + } + change_global_variable = { + name = disease_data_global_common_disease_amount + add = 1 + } + } + + # Had a "serious" disease? + if = { + limit = { + OR = { + var:disease_data_character_gout_ridden_amount >= 1 + var:disease_data_character_pneumonic_amount >= 1 + var:disease_data_character_leper_amount >= 1 + var:disease_data_character_typhus_amount >= 1 + var:disease_data_character_consumption_amount >= 1 + var:disease_data_character_cancer_amount >= 1 + var:disease_data_character_great_pox_amount >= 1 + var:disease_data_character_smallpox_amount >= 1 + var:disease_data_character_bubonic_plague_amount >= 1 + var:disease_data_character_measles_amount >= 1 + var:disease_data_character_dysentery_amount >= 1 + var:disease_data_character_ergotism_amount >= 1 + } + } + change_global_variable = { + name = disease_data_global_serious_disease_amount + add = 1 + } + } + + # Premature death data + if = { + limit = { age < 60 } + + save_scope_as = dead + random_independent_ruler = { + trigger_event = { # Death reason isn't set yet, so we send an event to someone else to check + id = debug.0013 + days = 2 + } + } + } + } +} + +# Display the current data +scripted_effect test_4_disease_data_calc_effect = { + set_variable = { + name = disease_data_calc_$DISEASE$_percentage + value = { + value = global_var:disease_data_global_$DISEASE$_amount + divide = global_var:disease_data_global_character_amount + multiply = 100 + } + } + set_variable = { + name = disease_data_calc_$DISEASE$_premature_death_chance + value = { + value = global_var:disease_data_global_premature_death_$DISEASE$_amount + divide = global_var:disease_data_global_$DISEASE$_amount + multiply = 100 + } + } +} + +debug.0012 = { # test.4 + type = character_event + title = test.4.title + desc = test.4.desc + theme = medicine + orphan = yes + override_background = { + reference = temple_generic + } + + immediate = { + ### COPY DATA ### + + #Total character amount + set_variable = { + name = local_copy_disease_data_global_character_amount + value = global_var:disease_data_global_character_amount + } + #Total early death amount + set_variable = { + name = local_copy_disease_data_global_premature_death_amount + value = global_var:disease_data_global_premature_death_amount + } + + + ### ADDITIONAL DATA ### + + #Percentage of early disease deaths + set_variable = { + name = disease_data_calc_premature_disease_death_percentage + value = { + value = global_var:disease_data_global_premature_death_amount + divide = global_var:disease_data_global_character_amount + multiply = 100 + } + } + + #Percentage common disease contraction + set_variable = { + name = disease_data_calc_common_disease_percentage + value = { + value = global_var:disease_data_global_common_disease_amount + divide = global_var:disease_data_global_character_amount + multiply = 100 + } + } + + #Percentage serious disease contraction + set_variable = { + name = disease_data_calc_serious_disease_percentage + value = { + value = global_var:disease_data_global_serious_disease_amount + divide = global_var:disease_data_global_character_amount + multiply = 100 + } + } + + #Disease chances + test_4_disease_data_calc_effect = { DISEASE = ill } + test_4_disease_data_calc_effect = { DISEASE = pneumonic } + test_4_disease_data_calc_effect = { DISEASE = gout_ridden } + test_4_disease_data_calc_effect = { DISEASE = leper } + test_4_disease_data_calc_effect = { DISEASE = typhus } + test_4_disease_data_calc_effect = { DISEASE = consumption } + test_4_disease_data_calc_effect = { DISEASE = cancer } + test_4_disease_data_calc_effect = { DISEASE = lovers_pox } + test_4_disease_data_calc_effect = { DISEASE = great_pox } + test_4_disease_data_calc_effect = { DISEASE = smallpox } + test_4_disease_data_calc_effect = { DISEASE = bubonic_plague } + test_4_disease_data_calc_effect = { DISEASE = measles } + test_4_disease_data_calc_effect = { DISEASE = dysentery } + test_4_disease_data_calc_effect = { DISEASE = ergotism } + + save_scope_value_as = { + name = a_value + value = var:disease_data_calc_common_disease_percentage + } + } + + option = { + if = { # To block error messages.... + limit = { + OR = { + exists = var:local_copy_disease_data_global_character_amount + exists = var:local_copy_disease_data_global_premature_death_amount + exists = var:disease_data_calc_premature_disease_death_percentage + exists = var:disease_data_calc_common_disease_percentage + exists = var:disease_data_calc_serious_disease_percentage + exists = var:disease_data_calc_ill_percentage + exists = var:disease_data_calc_ill_premature_death_chance + exists = var:disease_data_calc_pneumonic_percentage + exists = var:disease_data_calc_pneumonic_premature_death_chance + exists = var:disease_data_calc_gout_ridden_percentage + exists = var:disease_data_calc_gout_ridden_premature_death_chance + exists = var:disease_data_calc_leper_percentage + exists = var:disease_data_calc_leper_premature_death_chance + exists = var:disease_data_calc_typhus_percentage + exists = var:disease_data_calc_typhus_premature_death_chance + exists = var:disease_data_calc_consumption_percentage + exists = var:disease_data_calc_consumption_premature_death_chance + exists = var:disease_data_calc_cancer_percentage + exists = var:disease_data_calc_cancer_premature_death_chance + exists = var:disease_data_calc_lovers_pox_percentage + exists = var:disease_data_calc_lovers_pox_premature_death_chance + exists = var:disease_data_calc_great_pox_percentage + exists = var:disease_data_calc_great_pox_premature_death_chance + exists = var:disease_data_calc_smallpox_percentage + exists = var:disease_data_calc_smallpox_premature_death_chance + exists = var:disease_data_calc_bubonic_plague_percentage + exists = var:disease_data_calc_bubonic_plague_premature_death_chance + exists = var:disease_data_calc_measles_percentage + exists = var:disease_data_calc_measles_premature_death_chance + exists = var:disease_data_calc_dysentery_percentage + exists = var:disease_data_calc_dysentery_premature_death_chance + exists = var:disease_data_calc_ergotism_percentage + exists = var:disease_data_calc_ergotism_premature_death_chance + } + } + } + + debug_log = test.4.desc + } +} + +debug.0013 = { # test.5 + hidden = yes + + immediate = { + scope:dead = { + test_3_count_premature_disease_deaths_effect = { DISEASE = ill } + test_3_count_premature_disease_deaths_effect = { DISEASE = pneumonic } + test_3_count_premature_disease_deaths_effect = { DISEASE = gout_ridden } + test_3_count_premature_disease_deaths_effect = { DISEASE = leper } + test_3_count_premature_disease_deaths_effect = { DISEASE = typhus } + test_3_count_premature_disease_deaths_effect = { DISEASE = consumption } + test_3_count_premature_disease_deaths_effect = { DISEASE = cancer } + #test_3_count_premature_disease_deaths_effect = { DISEASE = lovers_pox } you can't die from lover's pox + test_3_count_premature_disease_deaths_effect = { DISEASE = great_pox } + test_3_count_premature_disease_deaths_effect = { DISEASE = smallpox } + test_3_count_premature_disease_deaths_effect = { DISEASE = bubonic_plague } + test_3_count_premature_disease_deaths_effect = { DISEASE = measles } + test_3_count_premature_disease_deaths_effect = { DISEASE = dysentery } + test_3_count_premature_disease_deaths_effect = { DISEASE = ergotism } + } + } +} + + + +debug.0020 = { + type = character_event + title = debug_test_event_progress_title + desc = debug_test_event_progress_desc + theme = default + orphan = yes + + widget = { + gui = "event_window_widget_event_chain_progress" + container = "custom_widgets_container" + controller = event_chain_progress + } + immediate = { + save_scope_value_as = { # 4 events in this event chain + name = event_chain_length + value = 4 + } + save_scope_value_as = { # Of which we are on the 2nd event + name = event_chain_progress + value = 2 + } + } + + option = { + } +} + +debug.0299 = { + hidden = yes + orphan = yes + + immediate = { + save_scope_as = owner + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = mace + type = regalia_simple + quality = 0 + wealth = 0 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = sword + type = regalia_simple + quality = 20 + wealth = 20 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = dagger + type = regalia_simple + quality = 40 + wealth = 40 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = axe + type = regalia_simple + quality = 60 + wealth = 60 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = hammer + type = regalia_simple + quality = 80 + wealth = 80 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + create_artifact = { + name = debug_test_event_progress_title + description = debug_test_event_progress_title + visuals = spear + type = regalia_simple + quality = 100 + wealth = 100 + modifier = artifact_placeholder_modifier + save_scope_as = newly_created_artifact + } + } +} +debug.0300 = { + hidden = yes + orphan = yes + + immediate = { + save_scope_as = owner + random_character_artifact = { + trigger_event = { + id = artifact.1000 + days = 0 + } + } + } +} + +debug.0301 = { + type = character_event + title = test_artifact_name + desc = artifact_sword_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_sword + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.302 = { + type = character_event + title = test_artifact_name + desc = artifact_dagger_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_dagger + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.303 = { + type = character_event + title = test_artifact_name + desc = artifact_axe_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_axe + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.304 = { + type = character_event + title = test_artifact_name + desc = artifact_hammer_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_hammer + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.305 = { + type = character_event + title = test_artifact_name + desc = artifact_spear_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_spear + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.306 = { + type = character_event + title = test_artifact_name + desc = artifact_mace_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_weapon_effect = { + OWNER = root + CREATOR = root + SET_WEAPON_TYPE = flag:artifact_weapon_type_mace + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.307 = { + type = character_event + title = test_artifact_name + desc = artifact_brooch_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + save_scope_as = owner + create_artifact_brooch_effect = { + OWNER = root + SMITH = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.310 = { + type = character_event + title = artifact_armor_name + desc = artifact_armor_description + theme = stewardship_wealth_focus + override_background = { + reference = wilderness + } + left_portrait = root + orphan = yes + + immediate = { + create_artifact_armor_effect = { + OWNER = root + CREATOR = root + SET_ARMOR_TYPE = flag:no #Decided in the effect based on the variable saved on the inspiration owner + } + + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.311 = { + type = character_event + title = artifact_armor_name + desc = artifact_armor_description + theme = stewardship_wealth_focus + override_background = { + reference = wilderness + } + left_portrait = root + orphan = yes + + immediate = { + create_artifact_armor_effect = { + OWNER = root + CREATOR = root + SET_ARMOR_TYPE = flag:armor_type_lamellar + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.312 = { + type = character_event + title = test_artifact_name + desc = artifact_regalia_description + theme = stewardship_wealth_focus + override_background = { + reference = throne_room + } + #left_portrait = root + orphan = yes + + immediate = { + random_dummy_gender_effect = yes + create_artifact_regalia_effect = { + OWNER = root + SMITH = scope:dummy_gender + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.313 = { + type = character_event + title = test_artifact_name + desc = artifact_chest_description + theme = stewardship_wealth_focus + orphan = yes + + + immediate = { + save_scope_as = owner + title:c_kandy = { title_province = { add_to_list = artifact_material_sources } } + create_artifact_chest_effect = { + OWNER = root + CARPENTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + + +debug.314 = { + type = character_event + title = test_artifact_name + desc = artifact_cabinet_description + theme = stewardship_wealth_focus + orphan = yes + + + immediate = { + create_artifact_cabinet_effect = { + OWNER = root + CARPENTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.315 = { + type = character_event + title = test_artifact_name + desc = artifact_throne_description + theme = stewardship_wealth_focus + orphan = yes + + + immediate = { + save_scope_as = owner + create_artifact_throne_effect = { + OWNER = root + MAKER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + + +debug.316 = { + type = character_event + title = artifact_wall_tapestry_name + desc = artifact_wall_tapestry_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_tapestry_effect = { + OWNER = root + WEAVER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.317 = { + type = character_event + title = test_artifact_name + desc = artifact_crown_description + theme = stewardship_wealth_focus + orphan = yes + + + immediate = { + random_dummy_gender_effect = yes + create_artifact_crown_effect = { + OWNER = root + SMITH = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.318 = { + type = character_event + title = artifact_wall_tapestry_name + desc = artifact_wall_tapestry_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_tapestry_effect = { + OWNER = root + WEAVER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.319 = { + type = character_event + title = artifact_box_small_name + desc = artifact_box_small_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_box_small_effect = { + OWNER = root + CARPENTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.320 = { + type = character_event + title = artifact_box_medium_name + desc = artifact_box_medium_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_box_medium_effect = { + OWNER = root + CARPENTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.321 = { + type = character_event + title = artifact_goblet_name + desc = artifact_goblet_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_goblet_effect = { + OWNER = root + SMITH = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.322 = { + type = character_event + title = debug.322.title + desc = debug.322.desc + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + set_variable = { name = book_artifact_topic value = flag:martial_troop_compositions days = 1 } + set_variable = { name = book_artifact_topic value = flag:martial_military_strategies days = 1 } + set_variable = { name = book_artifact_topic value = flag:martial_ancient_military_campaigns days = 1 } + set_variable = { name = book_artifact_topic value = flag:military days = 1 } + set_variable = { name = book_artifact_topic value = flag:duels days = 1 } + set_variable = { name = book_artifact_topic value = flag:diplomacy_court_politics days = 1 } + set_variable = { name = book_artifact_topic value = flag:diplomacy_court_alliances days = 1 } + set_variable = { name = book_artifact_topic value = flag:cicero days = 1 } + set_variable = { name = book_artifact_topic value = flag:diplomacy_art_of_feasting days = 1 } + set_variable = { name = book_artifact_topic value = flag:hitopadesa days = 1 } + set_variable = { name = book_artifact_topic value = flag:kalila days = 1 } + set_variable = { name = book_artifact_topic value = flag:edda days = 1 } + set_variable = { name = book_artifact_topic value = flag:orkneyinga days = 1 } + set_variable = { name = book_artifact_topic value = flag:jokes days = 1 } + set_variable = { name = book_artifact_topic value = flag:learning_theological_treaties days = 1 } + set_variable = { name = book_artifact_topic value = flag:learning_metaphysical_conundrums days = 1 } + set_variable = { name = book_artifact_topic value = flag:aristotle days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_anatomy days = 1 } + set_variable = { name = book_artifact_topic value = flag:learning_tome_collections days = 1 } + set_variable = { name = book_artifact_topic value = flag:prayers days = 1 } + set_variable = { name = book_artifact_topic value = flag:hours days = 1 } + set_variable = { name = book_artifact_topic value = flag:iliad days = 1 } + set_variable = { name = book_artifact_topic value = flag:mahabharata days = 1 } + set_variable = { name = book_artifact_topic value = flag:mufaddaliyat days = 1 } + set_variable = { name = book_artifact_topic value = flag:stewardship_trade_routes days = 1 } + set_variable = { name = book_artifact_topic value = flag:stewardship_lawmaking days = 1 } + set_variable = { name = book_artifact_topic value = flag:stewardship_best_practices_tax_collectors days = 1 } + set_variable = { name = book_artifact_topic value = flag:digest days = 1 } + set_variable = { name = book_artifact_topic value = flag:architect days = 1 } + set_variable = { name = book_artifact_topic value = flag:speculum days = 1 } + set_variable = { name = book_artifact_topic value = flag:admin days = 1 } + set_variable = { name = book_artifact_topic value = flag:intrigue_poisons days = 1 } + set_variable = { name = book_artifact_topic value = flag:seduction days = 1 } + set_variable = { name = book_artifact_topic value = flag:intrigue_the_art_of_love days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_medicine days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_herbs days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_science days = 1 } + set_variable = { name = book_artifact_topic value = flag:galen days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_witch days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_witch_bible days = 1 } + set_variable = { name = book_artifact_topic value = flag:worship_horned_god days = 1 } + set_variable = { name = book_artifact_topic value = flag:love_sorcery days = 1 } + set_variable = { name = book_artifact_topic value = flag:curse_sorcery days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_cannibal days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_lunatic days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_mystic days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_hunter days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_nature days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_falconry days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_dogs days = 1 } + set_variable = { name = book_artifact_topic value = flag:artifact_book_topic_childhood days = 1 } + set_variable = { name = book_artifact_topic value = flag:science days = 1 } + save_scope_as = honorary_guest + save_scope_as = honorary_guest_regular + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.323 = { + type = character_event + title = artifact_animal_hide_big_name + desc = artifact_animal_hide_big_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + trigger = { + any_realm_province = { + OR = { + terrain = forest + terrain = steppe + terrain = jungle + terrain = taiga + terrain = oasis + } + } + } + + immediate = { + save_scope_value_as = { + name = animal_hide_size + value = flag:big + } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:none + } + random_realm_province = { + limit = { + OR = { + terrain = forest + terrain = steppe + terrain = jungle + terrain = taiga + terrain = oasis + } + } + save_scope_as = location + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.324 = { + type = character_event + title = artifact_animal_hide_medium_name + desc = artifact_animal_hide_medium_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + save_scope_value_as = { + name = animal_hide_size + value = flag:medium + } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:none + } + random_realm_province = { + save_scope_as = location + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.325 = { + type = character_event + title = artifact_small_hide_name + desc = artifact_small_hide_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + save_scope_value_as = { + name = animal_hide_size + value = flag:small + } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:none + } + random_realm_province = { + save_scope_as = location + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.326 = { + type = character_event + title = artifact_wall_banner_name + desc = artifact_wall_banner_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + trigger = { + exists = var:epic_battle_location + exists = var:epic_loser + } + + immediate = { + create_artifact_wall_banner_effect = { OWNER = root CREATOR = root TARGET = root.primary_title } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.327 = { + type = character_event + title = artifact_wall_shield_name + desc = artifact_wall_shield_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + create_artifact_wall_shield_effect = { + OWNER = root + TARGET = root.house + CREATOR = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.328 = { + type = character_event + title = artifact_wall_skull_name + desc = artifact_wall_shield_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + create_artifact_wall_skull_effect = { + OWNER = root + HUNTER = root + LEGENDARY = no + ANIMAL = flag:none + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.329 = { + type = character_event + title = artifact_wall_narwhal_horn_name + desc = artifact_wall_narwhal_horn + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + create_artifact_wall_narwhal_horn_effect = { + OWNER = root + HUNTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +#debug.330 = { +# type = character_event +# title = artifact_wall_rhino_horn_name +# desc = artifact_wall_rhino_horn +# theme = stewardship_wealth_focus +# orphan = yes +# +# immediate = { +# create_artifact_wall_rhino_horn_effect = { OWNER = root } +# } +# +# option = { +# name = debug_test_artifact_cloth_option +# } +#} + +debug.331 = { + type = character_event + title = artifact_sculpture_name + desc = artifact_sculpture_description + theme = stewardship_wealth_focus + orphan = yes + artifact = { + target = scope:newly_created_artifact + position = lower_left_portrait + } + + immediate = { + create_artifact_sculpture_effect = { + OWNER = root + SCULPTER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.332 = { + type = character_event + title = artifact_pedestal_rock_name + desc = artifact_pedestal_rock_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_rock_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.333 = { + type = character_event + title = artifact_pedestal_pouch_name + desc = artifact_pedestal_pouch_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_pouch_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.334 = { + type = character_event + title = artifact_pedestal_scroll_name + desc = artifact_pedestal_scroll_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_scroll_effect = { + OWNER = root + WRITER = root + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.335 = { + type = character_event + title = artifact_pedestal_crucifix_name + desc = artifact_pedestal_crucifix_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_crucifix_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.336 = { + type = character_event + title = artifact_pedestal_cross_name + desc = artifact_pedestal_cross_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_cross_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.337 = { + type = character_event + title = artifact_pedestal_human_skull_name + desc = artifact_pedestal_human_skull_description + theme = stewardship_wealth_focus + orphan = yes + + trigger = { + scope:owner = { + any_killed_character = { } + } + } + + immediate = { + create_artifact_pedestal_human_skull_effect = { OWNER = root DESKULLED = root CREATOR = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.338 = { + type = character_event + title = artifact_pedestal_massive_diamond_name + desc = artifact_pedestal_massive_diamond + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_diamond_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.339 = { + type = character_event + title = artifact_pedestal_gold_nugget_name + desc = artifact_pedestal_gold_nugget + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_gold_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +#debug.340 = { +# type = character_event +# title = artifact_pedestal_mosque_lamp_name +# desc = artifact_pedestal_mosque_lamp +# theme = stewardship_wealth_focus +# orphan = yes +# +# immediate = { +# create_artifact_pedestal_lamp_effect = { OWNER = root } +# } +# +# option = { +# name = debug_test_artifact_cloth_option +# } +#} + + +debug.342 = { + type = character_event + title = artifact_book_title + desc = artifact_book_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + random_dummy_gender_effect = yes + save_scope_as = author + create_artifact_book_effect = { + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:no + SET_TOPIC = flag:no + } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.343 = { + type = character_event + title = artifact_pedestal_reliquary_christian_name + desc = artifact_pedestal_reliquary_christian_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_reliquary_christian_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.344 = { + type = character_event + title = artifact_pedestal_reliquary_islam_name + desc = artifact_pedestal_reliquary_islam_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_reliquary_islam_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.345 = { + type = character_event + title = artifact_pedestal_reliquary_buddhism_name + desc = artifact_pedestal_reliquary_buddhism_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_reliquary_buddhism_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.346 = { + type = character_event + title = artifact_pedestal_reliquary_judaism_name + desc = artifact_pedestal_reliquary_judaism_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_reliquary_judaism_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.347 = { + type = character_event + title = artifact_sculpture_religious_name + desc = artifact_sculpture_religious_description + theme = stewardship_wealth_focus + orphan = yes + + trigger = { + faith = { + NOR = { + has_doctrine = tenet_aniconism + religion = religion:judaism_religion + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + religion = religion:islam_religion + } + } + } + + immediate = { + create_artifact_sculpture_religious_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.348 = { + type = character_event + title = artifact_sculpture_religious_christian_name + desc = artifact_sculpture_religious_christian_description + theme = stewardship_wealth_focus + orphan = yes + + trigger = { + faith = { + NOT = { + has_doctrine = tenet_aniconism + } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + } + + immediate = { + create_artifact_sculpture_religious_christian_effect = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +debug.349 = { + type = character_event + title = artifact_pedestal_reliquary_christian_name + desc = artifact_pedestal_reliquary_christian_description + theme = stewardship_wealth_focus + orphan = yes + + immediate = { + create_artifact_pedestal_christian_relic_effect_hist = { OWNER = root } + create_artifact_pedestal_islamic_relic_effect_hist = { OWNER = root } + create_artifact_pedestal_buddhism_relic_effect_hist = { OWNER = root } + } + + option = { + name = debug_test_artifact_cloth_option + } +} + +# Set relationship +debug.350 = { + type = character_event + title = set_relationship_debug_name + desc = set_relationship_debug_desc + theme = default + left_portrait = scope:recipient + + option = { + name = set_relationship_debug_friend_add + + trigger = { + scope:actor = { + can_set_relation_friend_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_friend = { reason = test_friend_desc target = scope:recipient } + } + } + option = { + name = set_relationship_debug_friend_remove + + trigger = { + scope:actor = { + any_relation = { + type = friend + this = scope:recipient + } + } + + NOT = { + scope:actor = { + any_relation = { + type = best_friend + this = scope:recipient + } + } + } + } + + scope:actor = { + remove_relation_friend = scope:recipient + } + } + option = { + name = set_relationship_debug_best_friend_add + + trigger = { + scope:actor = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_best_friend = scope:recipient + } + } + option = { + name = set_relationship_debug_best_friend_remove + + trigger = { + scope:actor = { + any_relation = { + type = best_friend + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_best_friend = scope:recipient + } + } + option = { + name = set_relationship_debug_lover_add + + trigger = { + scope:actor = { + can_set_relation_lover_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_lover = { reason = test_lover_desc target = scope:recipient } + } + } + option = { + name = set_relationship_debug_lover_remove + + trigger = { + scope:actor = { + any_relation = { + type = lover + this = scope:recipient + } + } + + NOT = { + scope:actor = { + any_relation = { + type = soulmate + this = scope:recipient + } + } + } + } + + scope:actor = { + remove_relation_lover = scope:recipient + } + } + option = { + name = set_relationship_debug_soulmate_add + + trigger = { + scope:actor = { + can_set_relation_soulmate_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_soulmate = { reason = test_soulmate_desc copy_reason = lover target = scope:recipient } + } + } + option = { + name = set_relationship_debug_soulmate_remove + + trigger = { + scope:actor = { + any_relation = { + type = soulmate + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_soulmate = scope:recipient + } + } + option = { + name = set_relationship_debug_childhood_bully_add + + trigger = { + scope:actor = { + can_set_relation_bully_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_bully = scope:recipient + } + } + option = { + name = set_relationship_debug_childhood_bully_remove + + trigger = { + scope:actor = { + any_relation = { + type = bully + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_bully = scope:recipient + } + } + option = { + name = set_relationship_debug_childhood_victim_add + + trigger = { + scope:actor = { + can_set_relation_victim_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_victim = scope:recipient + } + } + option = { + name = set_relationship_debug_childhood_victim_remove + + trigger = { + scope:actor = { + any_relation = { + type = victim + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_victim = scope:recipient + } + } + option = { + name = set_relationship_debug_rival_add + + trigger = { + scope:actor = { + can_set_relation_rival_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_rival = { + target = scope:recipient + reason = rival_debug + } + } + } + option = { + name = set_relationship_debug_rival_remove + + trigger = { + scope:actor = { + any_relation = { + type = rival + this = scope:recipient + } + } + + NOT = { + scope:actor = { + any_relation = { + type = nemesis + this = scope:recipient + } + } + } + } + + scope:actor = { + remove_relation_rival = scope:recipient + } + } + option = { + name = set_relationship_debug_nemesis_add + + trigger = { + scope:actor = { + can_set_relation_nemesis_trigger = { CHARACTER = scope:recipient } + } + } + + scope:actor = { + set_relation_nemesis = { + target = scope:recipient + reason = nemesis_debug + } + } + } + option = { + name = set_relationship_debug_nemesis_remove + + trigger = { + scope:actor = { + any_relation = { + type = nemesis + this = scope:recipient + } + } + } + + scope:actor = { + remove_relation_nemesis = scope:recipient + } + } + option = { + name = set_relationship_debug_nevermind + } +} + +debug.360 = { + type = character_event + title = enter_text_save_in_death_title + desc = enter_text_save_in_death_desc + theme = default + left_portrait = root + orphan = yes + + widget = { + gui = "event_window_widget_enter_text" + container = "dynamic_birth_name" + controller = { + type = text + data = { + key = test_saved_text + default = cat_name_mite + } + } + setup_scope = { + root = { save_scope_as = text_target } + } + } + + option = { + name = enter_text_save_in_death_opt + store_localized_text_in_death = test_saved_text + add_to_global_variable_list = { + name = test_saved_text_character + target = root + } + remove_variable = test_saved_text + death = natural + } +} + +debug.361 = { + type = character_event + title = enter_text_save_in_death_title + desc = enter_text_save_in_death_retreive_desc + theme = default + left_portrait = scope:text_character + orphan = yes + + immediate = { + random_in_global_list = { + variable = test_saved_text_character + save_scope_as = text_character + } + } + + option = { + name = enter_text_save_in_death_retreive_opt + } + option = { + name = enter_text_save_in_death_clear_opt + every_in_global_list = { + variable = test_saved_text_character + remove_localized_text = test_saved_text + } + } +} + +debug.380 = { + type = character_event + hidden = yes + theme = default + orphan = yes + + immediate = { + capital_province = { + set_variable = { + name = random_building_variable + value = 0 + days = 365 + } + } + } +} + +debug.400 = { + type = character_event + title = generate_artifact_with_history_debug_name + desc = generate_artifact_with_history_debug_desc + theme = default + left_portrait = root + right_portrait = scope:recipient + + option = { + name = generate_artifact_with_history_debug_given + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = given + } + } + + option = { + name = generate_artifact_with_history_debug_discovered + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = discovered + } + } + + option = { + name = generate_artifact_with_history_debug_stolen_unknown + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = stolen_unknown + } + } + + option = { + name = generate_artifact_with_history_debug_stolen + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = stolen + } + } + + option = { + name = generate_artifact_with_history_debug_created_unknown + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = created_unknown + } + } + + option = { + name = generate_artifact_with_history_debug_created + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = created + } + } + + option = { + name = generate_artifact_with_history_debug_inherited_unknown + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = inherited_unknown + } + } + + option = { + name = generate_artifact_with_history_debug_inherited + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = inherited + } + } + + option = { + name = generate_artifact_with_history_debug_reforged + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = reforged + } + } + + option = { + name = generate_artifact_with_history_debug_conquest + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = conquest + } + } + + option = { + name = generate_artifact_with_history_debug_taken_in_siege + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = scope:recipient + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = taken_in_siege + } + } + +} + +# Have Sex With Character (only usable via interaction) +debug.410 = { + hidden = yes + immediate = { + send_interface_message = { + type = sway_good_message + title = debug_sex_interaction + left_icon = scope:recipient + right_icon = ROOT # References root instead of scope:actor to verify that root is defined + + had_sex_with_effect = { + CHARACTER = scope:recipient + PREGNANCY_CHANCE = pregnancy_chance + } + } + } +} + +# Convert all of iberia to mozarab & conquer caucasian iberia +debug.411 = { # For usage debugging achievements. Should be a generic command rather than a predefined event. + orphan = yes + hidden = yes + immediate = { + debug_log = "Iberia Converted to Mozarab!" + every_county_in_region = { + region = world_europe_west_iberia + set_county_faith = faith:mozarabic_church + } + + debug_log = "Woosh! Caucasian Iberia is now yours!" + every_county_in_region = { + region = dlc_fp2_caucasian_iberia + create_title_and_vassal_change = { + type = conquest + save_scope_as = change + } + change_title_holder_include_vassals = { + holder = root + change = scope:change + } + resolve_title_and_vassal_change = scope:change + change_county_control = 100 # (Not actually necessary, apparently) + } + } +} + +debug.412 = { # Spawn the CHESS-A-THRON 3000, a perfect creature designed to beat you up at the game of chess + orphan = yes + hidden = yes + immediate = { + create_character = { + age = { 20 32 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + martial = 100 + learning = 100 + intrigue = 100 + + dynasty = none + after_creation = { + add_gold = { minor_gold_value medium_gold_value } + add_prestige = { minor_prestige_gain medium_prestige_gain } + add_piety = { minor_piety_gain medium_piety_gain } + } + + save_scope_as = generated_actor + } + + send_interface_toast = { + type = event_toast_effect_good + title = b_chessy + left_icon = scope:generated_actor + + add_courtier = scope:generated_actor + } + } +} + +# Cycle through duel animations (hardcoded) - but easy to read and expand upon :) +debug.415 = { # You could have a system that checks the scripted animations themselves, but this was made only to test the animations themselves + type = character_event + title = { + desc = TITLE_ANIMATION + desc = CONSTRUCT_BUILDINGS_DETAILS + } + desc = building_type_nalanda_university_desc + + theme = mental_break + left_portrait = { + character = root + + ### DUEL ANIMATIONS + # Axe + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 0 scope:animation_view_celebrations = 0 } + animation = aggressive_axe + } + triggered_animation = { # Celebration animation (Originally designed with an elegant, concatenating design, then I realized the engine did not support it.) + trigger = { scope:animation_cycle = 0 scope:animation_view_celebrations = 1 } + animation = celebrate_axe + } + # Mace + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 1 scope:animation_view_celebrations = 0 } + animation = aggressive_mace + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 1 scope:animation_view_celebrations = 1 } + animation = celebrate_mace + } + # Sword + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 2 scope:animation_view_celebrations = 0 } + animation = aggressive_sword + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 2 scope:animation_view_celebrations = 1 } + animation = celebrate_sword + } + # Dagger + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 3 scope:animation_view_celebrations = 0 } + animation = aggressive_dagger + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 3 scope:animation_view_celebrations = 1 } + animation = celebrate_dagger + } + # Spear + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 4 scope:animation_view_celebrations = 0 } + animation = aggressive_spear + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 4 scope:animation_view_celebrations = 1 } + animation = celebrate_spear + } + # Hammer + triggered_animation = { # Aggressive animation + trigger = { scope:animation_cycle = 5 scope:animation_view_celebrations = 0 } + animation = aggressive_hammer + } + triggered_animation = { # Celebration animation + trigger = { scope:animation_cycle = 5 scope:animation_view_celebrations = 1 } + animation = celebrate_hammer + } + # Fallback + animation = aggressive_sword + } + artifact = { + target = root.var:signature_weapon_scope + position = lower_left_portrait + trigger = { exists = root.var:signature_weapon_scope } + } + + immediate = { + # Create variables used for tracking where in the cycle you are + if = { + limit = { exists = scope:animation_cycle } + if = { + limit = { scope:animation_cycle_action = 1 } + save_scope_value_as = { + name = animation_cycle + value = { + value = scope:animation_cycle + add = 1 + } + } + } + if = { + limit = { scope:animation_cycle_action = 0 } + save_scope_value_as = { + name = animation_cycle + value = { + value = scope:animation_cycle + subtract = 1 + } + } + } + } + else = { + save_scope_value_as = { + name = animation_cycle + value = 0 + } + save_scope_value_as = { + name = animation_view_celebrations + value = 0 + } + } + + # Wrapping support + if = { + limit = { scope:animation_cycle < 0 } # Go from the back to the top + save_scope_value_as = { + name = animation_cycle + value = 5 # Replace this with the highest number in the animation set + } + } + if = { + limit = { scope:animation_cycle > 5 } # Replace this with the highest number in the animation set + save_scope_value_as = { + name = animation_cycle + value = 0 + } + } + } + + option = { # Forward (next anim) + name = dynn_Daflos_motto + + save_scope_value_as = { + name = animation_cycle_action + value = 1 + } + + trigger_event = debug.415 + } + + option = { # Backwards (prev anim) + name = default_retreat + + save_scope_value_as = { + name = animation_cycle_action + value = 0 + } + + trigger_event = debug.415 + } + + option = { # Switch to celebration animations + name = lover.3215.t + trigger = { scope:animation_view_celebrations = 0 } + save_scope_value_as = { + name = animation_view_celebrations + value = 1 + } + save_scope_value_as = { + name = animation_cycle_action + value = 2 # Used to keep still + } + + trigger_event = debug.415 + } + + option = { # Switch back from celebration animations + name = hold_court.8110.t + trigger = { scope:animation_view_celebrations = 1 } + save_scope_value_as = { + name = animation_view_celebrations + value = 0 + } + save_scope_value_as = { + name = animation_cycle_action + value = 2 + } + + trigger_event = debug.415 + } + + option = { name = EXIT_TO_DESKTOP } # Exit debug event +} + +# Debug set up conditions for childhood_education.0004 +debug.418 = { + hidden = yes + immediate = { + debug_log = "Running autotest for childhood_education.0004" + if = { + limit = { + any_relation = { + type = ward + has_any_focus = no + } + } + add_piety = 50000 # Acts as a warning that maintenance events did not run + } + if = { + limit = { # Then, this second time, we give it a new focus to force childhood_education.0004 to trigger + any_relation = { + type = ward + has_focus = education_martial + } + } + random_relation = { # Change focus + type = ward + set_focus = education_diplomacy + } + # (this is the part where the event auto-triggers itself) (or should. All reqs are met but it seems the hook fails) + } + else = { + random_relation = { + type = ward + set_focus = education_martial # Change focus (gives first focus), then call event again + } + trigger_event = debug.418 # Apparently the fact that this event calls itself makes it no longer an orphan, which I find very amusing + } + } +} + +# Family Feud +debug.501 = { # Have another house murder my close family + type = character_event + hidden = yes + orphan = yes + + immediate = { + faith = { + random_faith_playable_ruler = { + limit = { + in_diplomatic_range = root + house != root.house + } + save_scope_as = killer_scope + } + } + random_close_family_member = { + limit = { + is_close_family_of = root + this != root + } + death = { + death_reason = death_duel + killer = scope:killer_scope + } + } + } +} + +debug.502 = { # Have another house kill me + type = character_event + hidden = yes + orphan = yes + + immediate = { + faith = { + random_faith_playable_ruler = { + limit = { + house_feud_valid_feud_target_trigger = yes + } + save_scope_as = killer_scope + } + } + death = { + death_reason = death_duel + killer = scope:killer_scope + } + } +} + +debug.503 = { # Have my house kill a feud target member + type = character_event + hidden = yes + orphan = yes + + trigger = { + house = { + any_house_member = { + is_adult = yes + is_house_head = no + NOT = { this = root } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + any_house_relation = { + has_house_relation_level = feud + any_relation_house = { + NOT = { this = root.house } + any_house_member = { + is_adult = yes + is_house_head = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this.house.house_head } + } + } + } + } + } + + immediate = { + house = { + random_house_member = { + limit = { + is_adult = yes + is_house_head = no + NOT = { this = root } + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = murderer_scope + } + random_house_relation = { + limit = { + has_house_relation_level = feud + any_relation_house = { + NOT = { this = root.house } + any_house_member = { + is_adult = yes + is_house_head = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this.house.house_head } + save_temporary_scope_as = victim_temp + } + } + } + } + } + scope:victim_temp = { + death = { + death_reason = death_duel + killer = scope:murderer_scope + } + } + } +} + +debug.504 = { # Have my house killed by a feud target member + type = character_event + hidden = yes + orphan = yes + + trigger = { + house = { + any_house_member = { + is_adult = yes + this != root + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + any_house_relation = { + has_house_relation_level = feud + any_relation_house = { + NOT = { this = root.house } + any_house_member = { + is_adult = yes + is_house_head = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this.house.house_head } + } + } + } + } + } + + immediate = { + house = { + random_house_member = { + limit = { + is_adult = yes + this != root + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = victim_scope + } + random_house_relation = { + limit = { + has_house_relation_level = feud + any_relation_house = { + NOT = { this = root.house } + any_house_member = { + is_adult = yes + is_house_head = no + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = this.house.house_head } + save_temporary_scope_as = murderer_temp + } + } + } + } + } + scope:victim_scope = { + death = { + death_reason = death_duel + killer = scope:murderer_temp + } + } + } +} + +debug.510 = { # Placeholder debug event - Used to mark the location of placeholders + type = character_event + title = { # My favourite movie of the original triology + desc = d_star_company_adj + desc = game_concept_wars + desc = KEY_KP_MINUS + desc = cat_revenge_modifier + } + desc = { + desc = childhood.7400_mother_dead + desc = double_line_break + desc = RELIGION_LOC_PLACEHOLDER + desc = double_line_break + desc = RELIGION_LOC_PLACEHOLDER + desc = double_line_break + desc = RELIGION_LOC_PLACEHOLDER + desc = double_line_break + desc = RELIGION_LOC_PLACEHOLDER + } + + #orphan = yes + theme = mental_break + left_portrait = root + right_portrait = character:33922 + + option = { name = debug_generic_option } # Dear debug console, quiet please. + option = { name = debug_generic_option trigger = { always = no } trigger_event = debug.510 } +} + +debug.511 = { # Set secret faith for Character + type = character_event + theme = default + orphan = yes + + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + + option = { + name = debug.511.a + + trigger = { + NOT = { exists = root.secret_faith } + } + + root = { + set_character_secret_faith = faith:rabbinism + } + } + + option = { + name = debug.511.b + + trigger = { + exists = root.secret_faith + } + + root = { + remove_character_secret_faith = yes + } + } +} + +debug.512 = { + type = character_event + theme = default + orphan = yes + + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + + option = { + name = debug.512.a + } +} + +debug.513 = { + title = debug_main + desc = debug_main + theme = ep2_video_test + orphan = yes + + option = { + name = debug_main + } +} + +debug.605 = { + type = character_event + title = debug_main + desc = debug_main + theme = default + orphan = yes + + left_portrait = root + + option = { + name = debug_main + stress_impact = { + base = 30 + } + } + option = { + name = debug_main + + trigger = { + dread > 20 + } + } + option = { + name = debug_main + + trigger = { + has_trait = diligent + } + } + option = { + name = debug_main + + trigger = { + martial > 10 + } + } + option = { + name = debug_main + stress_impact = { + base = 30 + } + + trigger = { + dread > 20 + has_trait = diligent + has_trait = brave + martial > 10 + stewardship > 10 + } + } +} + +#steam rich presence test - update this event with your new rich presence text to see it in the desc +debug.700 = { + type = character_event + title = steam_rich_presence_debug_t + desc = steam_rich_presence_debug_desc + theme = realm + orphan = yes + + immediate = { + random_ruler = { + limit = { + has_trait = sayyid + NOR = { + has_trait = fp3_struggle_detractor + has_trait = fp3_struggle_supporter + } + } + save_scope_as = sayyid + } + random_ruler = { + limit = { + has_trait = fp3_struggle_detractor + NOT = { has_trait = fp3_struggle_supporter } + } + save_scope_as = fp3_struggle_detractor + } + random_ruler = { + limit = { + has_trait = fp3_struggle_supporter + NOT = { has_trait = fp3_struggle_detractor } + } + save_scope_as = fp3_struggle_supporter + } + random_ruler = { + limit = { + has_character_modifier = fp3_struggle_caliph_super_suspicious_modifier + } + save_scope_as = sus_caliph + } + random_ruler = { + limit = { + any_character_struggle = { + #involvement = involved + is_struggle_type = persian_struggle + } + } + save_scope_as = persian_struggle + } + random_ruler = { + limit = { + any_character_struggle = { + #involvement = involved + is_struggle_type = iberian_struggle + } + } + save_scope_as = iberian_struggle + } + } + + option = {} +} + +debug.9595 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = PROGRESS_TO_VICTORY_DEBUG + theme = realm + orphan = yes + lower_right_portrait = scope:bottom + lower_left_portrait = scope:top + + immediate = { + involved_activity = { save_scope_as = activity } + scope:activity = { + ordered_attending_character = { + limit = { + trigger_if = { + limit = { activity_tournament_race_contest_trigger = no } + activity_is_valid_tournament_contestant = yes + } + exists = var:contest_aptitude + } + order_by = var:contest_aptitude + save_scope_as = top + } + ordered_attending_character = { + limit = { + trigger_if = { + limit = { activity_tournament_race_contest_trigger = no } + activity_is_valid_tournament_contestant = yes + } + exists = var:contest_aptitude + } + order_by = { + value = 0 + subtract = var:contest_aptitude + } + save_scope_as = bottom + } + } + } + + option = { + name = LOREM_IPSUM_TITLE + } +} + +debug.9600 = { # Event for testing Tax Collector script support + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + lower_left_portrait = scope:tax_collector + lower_right_portrait = scope:tax_collector_vassal + + immediate = { + random_tax_collector = { save_scope_as = tax_collector } + + scope:tax_collector = { + random_tax_collector_vassal = { save_scope_as = tax_collector_vassal } + } + } + + option = { + name = aptitude_terrible + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 1 + } + } + } + + fire_tax_collector = scope:tax_collector + } + + option = { + name = aptitude_poor + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 2 + } + } + } + + fire_tax_collector = scope:tax_collector + } + + option = { + name = aptitude_average + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 3 + } + } + } + + fire_tax_collector = scope:tax_collector + } + + option = { + name = aptitude_good + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 4 + } + } + } + + fire_tax_collector = scope:tax_collector + } + + option = { + name = aptitude_excellent + trigger = { + scope:tax_collector = { + tax_collector_aptitude = { + target = clan_tax_slot + value = 5 + } + } + } + + fire_tax_collector = scope:tax_collector + } +} + + +# Test for maximum usage of everything in activities. +debug.9601 = { + type = activity_event + title = debug_9601.t + desc = debug_9601.desc + theme = feast_activity + left_portrait = { + character = root + animation = hunting_falcon + } + center_portrait = { + character = root + animation = hunting_falcon + } + right_portrait = { + character = root + animation = hunting_falcon + } + lower_left_portrait = root + lower_center_portrait = root + lower_right_portrait = root + orphan = yes + + trigger = { always = no } + + # Ayyy. + option = { name = debug_9601.a } + + # Yo. + option = { name = debug_9601.b } + + # I'm eventing here. + option = { name = debug_9601.c } + + # Come on. + option = { name = debug_9601.d } +} + +debug.9610 = { # Spawn a super tax collector + hidden = yes + orphan = yes + + immediate = { + create_character = { + name = "Super Tax Collector" + age = { 20 32 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + trait = blind + stewardship = 100 + + dynasty = none + after_creation = { add_character_flag = is_guaranteed_excellent_tax_collector } + + save_scope_as = generated_actor + } + + send_interface_message = { + type = event_stewardship_good + title = governance_1053_corrupt_tax_collectors_modifier + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + } + } +} + +debug.9611 = { # Spawn a assassin + hidden = yes + orphan = yes + + immediate = { + create_character = { + name = "Super Assassin" + age = { 20 32 } + location = root.capital_province + gender_female_chance = root_faith_dominant_gender_female_chance + culture = root.culture + faith = root.faith + random_traits = yes + intrigue = 100 + prowess = 100 + trait = schemer + trait = education_intrigue_4 + + dynasty = none + + save_scope_as = generated_actor + } + + send_interface_message = { + type = event_stewardship_good + title = { + desc = d_assassin + desc = motto_greed + } + right_icon = scope:generated_actor + + add_courtier = scope:generated_actor + } + } +} + +debug.9620 = { # Hunt Artifacts + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:hunter + scripted_animation = bow_drawn + } + + artifact = { + target = scope:trinket + position = lower_right_portrait + } + artifact = { + target = scope:skull + position = lower_center_portrait + } + artifact = { + target = scope:hide + position = lower_left_portrait + } + + immediate = { + random_courtier = { save_scope_as = hunter } + hidden_effect = { + random_list = { + 1 = { + hunt_activity_standard_game_effect = { PROVINCE = root.capital_province HUNTER = root } + } + 1 = { + hunt_activity_dangerous_game_effect = { PROVINCE = root.capital_province } + } + } + } + hunt_activity_standard_game_effect = { PROVINCE = root.capital_province HUNTER = root } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = no + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = hide } + if = { + limit = { + can_animal_produce_skull_trigger = { VARIABLE = root.var:animal_type } + } + create_artifact_wall_skull_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = no + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = skull } + } + create_artifact_animal_trinket_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = no + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = trinket } + } + + option = { + name = LOREM_IPSUM_TITLE + } + + after = { remove_variable = animal_type } +} + +debug.9621 = { # Legendary Artifacts + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + left_portrait = { + character = root + animation = happiness + } + + right_portrait = { + character = scope:hunter + scripted_animation = bow_drawn + } + + artifact = { + target = scope:trinket + position = lower_right_portrait + } + artifact = { + target = scope:skull + position = lower_center_portrait + } + artifact = { + target = scope:hide + position = lower_left_portrait + } + + immediate = { + random_courtier = { save_scope_as = hunter } + hidden_effect = { + random_list = { + 1 = { + hunt_activity_standard_game_effect = { PROVINCE = root.capital_province HUNTER = root } + } + 1 = { + hunt_activity_dangerous_game_effect = { PROVINCE = root.capital_province } + } + } + } + hunt_activity_standard_game_effect = { PROVINCE = root.capital_province HUNTER = root } + create_artifact_animal_hide_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = yes + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = hide } + if = { + limit = { + can_animal_produce_skull_trigger = { VARIABLE = root.var:animal_type } + } + create_artifact_wall_skull_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = yes + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = skull } + } + create_artifact_animal_trinket_effect = { + OWNER = root + HUNTER = scope:hunter + LEGENDARY = yes + ANIMAL = root.var:animal_type + } + scope:newly_created_artifact ?= { save_scope_as = trinket } + } + + option = { + name = LOREM_IPSUM_TITLE + } + + after = { remove_variable = animal_type } +} + +# playground for great projects +debug.9622 = { + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + immediate = { + random_realm_province = { + plan_great_project = { + founder = root + great_project_type = great_wall + save_scope_as = new_project + } + } + } + + option = { + name = debug_generic_option + + trigger = { + scope:new_project = { + great_project_construction_phase_is = planned + great_project_type = great_wall + } + } + # if planning new part of great wall add funds out of thin air + # create great project in random province + scope:new_project = { + great_project_founder = { + add_gold = 2000 + } + } + } + + option = { + name = debug_generic_option + + trigger = { + scope:new_project = {not = { + any_contribution = { + contribution_id = logistics + scope:new_project.great_project_founder = { + can_fund_project_contribution = prev + } + } + } } + } + scope:new_project = { + great_project_founder = { + add_prestige = 2000 + } + } + } + + option = { + name = debug_generic_option + + trigger = { + scope:new_project = { + any_contribution = { + contribution_is_required = yes + root = { + # prev = the selected contribution + can_fund_project_contribution = prev + } + } + } + } + + scope:new_project = { + random_contribution = { + limit = { contribution_is_required = yes } + root = { + # prev = the selected contribution + fund_great_project_contribution = { + contribution = prev + } + } + } + } + } +} diff --git a/N3OW/events/test_events/debug_portraits.txt b/N3OW/events/test_events/debug_portraits.txt new file mode 100644 index 00000000..f45ed821 --- /dev/null +++ b/N3OW/events/test_events/debug_portraits.txt @@ -0,0 +1,117 @@ +namespace = debug_portraits + +debug_portraits.1 = { + scope = none + hidden = yes + + immediate = { + character:animation_test_female = { make_unprunable = yes } + character:animation_test_male = { make_unprunable = yes } + character:animation_test_dwarf_female = { make_unprunable = yes } + character:animation_test_dwarf_male = { make_unprunable = yes } + character:animation_test_fat_dwarf_female = { make_unprunable = yes } + character:animation_test_fat_dwarf_male = { make_unprunable = yes } + character:animation_test_female_pregnant = { make_unprunable = yes } + character:animation_test_hunchbacked_female = { make_unprunable = yes } + character:animation_test_hunchbacked_male = { make_unprunable = yes } + character:animation_test_female_child = { make_unprunable = yes } + character:animation_test_male_child = { make_unprunable = yes } + character:animation_test_muscular_female = { make_unprunable = yes } + character:animation_test_muscular_male = { make_unprunable = yes } + } +} + +debug_portraits.2 = { # Max Portraits in Event Window + type = character_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = lighting_test + orphan = yes + + left_portrait = { + character = scope:portrait_1 + animation = wedding_priest + } + + right_portrait = { + character = scope:portrait_2 + animation = wedding_priest + } + + center_portrait = { + character = scope:portrait_3 + animation = wedding_priest + } + + + lower_right_portrait = scope:portrait_4 + lower_center_portrait = scope:portrait_5 + lower_left_portrait = scope:portrait_6 + + immediate = { + random_ruler = { + save_scope_as = portrait_1 + } + random_ruler = { + save_scope_as = portrait_2 + } + random_ruler = { + save_scope_as = portrait_3 + } + random_ruler = { + save_scope_as = portrait_4 + } + random_ruler = { + save_scope_as = portrait_5 + } + random_ruler = { + save_scope_as = portrait_6 + } + } + + option = { + name = LOREM_IPSUM_TITLE + } +} + + +debug_portraits.3 = { + type = activity_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = lighting_test + orphan = yes + + override_background = { + # change me to change the event background (00_event_backgrounds.txt) + reference = activity_feast + } + + left_portrait = { + character = root + animation = personality_honorable + } + center_portrait = { + character = scope:activity_guest1 + animation = personality_rational + } + right_portrait = { + character = scope:activity_guest2 + animation = personality_irrational + } + + immediate = { + involved_activity = { + random_attending_character = { + save_scope_as = activity_guest1 + } + random_attending_character = { + save_scope_as = activity_guest2 + } + } + } + + option = { + name = LOREM_IPSUM_TITLE + } +} \ No newline at end of file diff --git a/N3OW/events/test_events/insult_poetry.txt b/N3OW/events/test_events/insult_poetry.txt new file mode 100644 index 00000000..5db6b6aa --- /dev/null +++ b/N3OW/events/test_events/insult_poetry.txt @@ -0,0 +1,104 @@ +# Insult another character... in rhyme! + +namespace = insult_poetry + + +#Base event structure +insult_poetry.0001 = { + type = character_event + title = insult_poetry.0001.t + orphan = yes + desc = { + triggered_desc = { + trigger = { + scope:actor != scope:recipient + } + desc = insult_poetry.0001.from_other + } + random_valid = { + triggered_desc = { + trigger = { scope:rhyme_group = flag:a } + desc = insult_poetry_line_1_a_01 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:a } + desc = insult_poetry_line_1_a_02 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:b } + desc = insult_poetry_line_1_b_01 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:b } + desc = insult_poetry_line_1_b_02 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:c } + desc = insult_poetry_line_1_c_01 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:c } + desc = insult_poetry_line_1_c_02 + } + } + random_valid = { + triggered_desc = { + trigger = { scope:rhyme_group = flag:a } + desc = insult_poetry_line_2_a_01 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:a } + desc = insult_poetry_line_2_a_02 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:b } + desc = insult_poetry_line_2_b_01 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:b } + desc = insult_poetry_line_2_b_02 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:c } + desc = insult_poetry_line_2_c_01 + } + triggered_desc = { + trigger = { scope:rhyme_group = flag:c } + desc = insult_poetry_line_2_c_02 + } + } + } + theme = learning + left_portrait = { + character = scope:actor + animation = schadenfreude + } + + immediate = { + random_list = { + 1 = { + save_scope_value_as = { + name = rhyme_group + value = flag:a + } + } + 1 = { + save_scope_value_as = { + name = rhyme_group + value = flag:b + } + } + 1 = { + save_scope_value_as = { + name = rhyme_group + value = flag:c + } + } + } + } + + option = { + name = insult_poetry.0001.a + + } +} diff --git a/N3OW/events/test_events/poetry_events.txt b/N3OW/events/test_events/poetry_events.txt new file mode 100644 index 00000000..07d9b2fc --- /dev/null +++ b/N3OW/events/test_events/poetry_events.txt @@ -0,0 +1,317 @@ +# Can we generate sensible poems? +# Probably not, let's try. + +namespace = poetry + +poetry.0001 = { + type = character_event + orphan = yes + desc = { + # First line + random_valid = { + triggered_desc = { + trigger = { + ROOT = { + var:text_set_first_and_second_lines = flag:set_one + } + } + desc = first_line_text_set_1_A + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_first_and_second_lines = flag:set_one + } + } + desc = first_line_text_set_1_B + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_first_and_second_lines = flag:set_two + } + } + desc = first_line_text_set_2_A + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_first_and_second_lines = flag:set_two + } + } + desc = first_line_text_set_2_B + } + } + desc = poetry_line_break + # Second line + random_valid = { + triggered_desc = { + trigger = { + ROOT = { + var:text_set_first_and_second_lines = flag:set_one + } + } + desc = second_line_text_set_1_A + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_first_and_second_lines = flag:set_one + } + } + desc = second_line_text_set_1_B + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_first_and_second_lines = flag:set_two + } + } + desc = second_line_text_set_2_A + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_first_and_second_lines = flag:set_two + } + } + desc = second_line_text_set_2_B + } + } + desc = poetry_line_break + # Third line + random_valid = { + triggered_desc = { + trigger = { + ROOT = { + var:text_set_third_and_fourth_lines = flag:set_one + } + } + desc = third_line_text_set_1_A + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_third_and_fourth_lines = flag:set_one + } + } + desc = third_line_text_set_1_B + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_third_and_fourth_lines = flag:set_two + } + } + desc = third_line_text_set_2_A + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_third_and_fourth_lines = flag:set_two + } + } + desc = third_line_text_set_2_B + } + } + desc = poetry_line_break + # Fourth line + random_valid = { + triggered_desc = { + trigger = { + ROOT = { + var:text_set_third_and_fourth_lines = flag:set_one + } + } + desc = fourth_line_text_set_1_A + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_third_and_fourth_lines = flag:set_one + } + } + desc = fourth_line_text_set_1_B + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_third_and_fourth_lines = flag:set_two + } + } + desc = fourth_line_text_set_2_A + } + triggered_desc = { + trigger = { + ROOT = { + var:text_set_third_and_fourth_lines = flag:set_two + } + } + desc = fourth_line_text_set_2_B + } + } + } + left_portrait = root + theme = learning + + immediate = { + # Roll for first and second line: + random_list = { + 25 = { + root = { + set_variable = { + name = text_set_first_and_second_lines + value = flag:set_one + } + } + } + 25 = { + root = { + set_variable = { + name = text_set_first_and_second_lines + value = flag:set_two + } + } + } + } + + # Roll for third and fourth lines: + random_list = { + 25 = { + root = { + set_variable = { + name = text_set_third_and_fourth_lines + value = flag:set_one + } + } + } + 25 = { + root = { + set_variable = { + name = text_set_third_and_fourth_lines + value = flag:set_two + } + } + } + } + } + + option = { + name = OK_BUTTON + } +} + + +poetry.0002 = { + type = character_event + title = poetry.0002.t + orphan = yes + desc = { + random_valid = { + desc = 0002.blank_verse_line_1_A + desc = 0002.blank_verse_line_1_B + desc = 0002.blank_verse_line_1_C + desc = 0002.blank_verse_line_1_D + } + desc = poetry_line_break + random_valid = { + desc = 0002.blank_verse_line_2_A + desc = 0002.blank_verse_line_2_B + desc = 0002.blank_verse_line_2_C + desc = 0002.blank_verse_line_2_D + } + desc = poetry_line_break + random_valid = { + desc = 0002.blank_verse_line_3_A + desc = 0002.blank_verse_line_3_B + desc = 0002.blank_verse_line_3_C + desc = 0002.blank_verse_line_3_D + } + desc = poetry_line_break + random_valid = { + desc = 0002.blank_verse_line_4_A + desc = 0002.blank_verse_line_4_B + desc = 0002.blank_verse_line_4_C + desc = 0002.blank_verse_line_4_D + } + } + theme = learning + + option = { + name = OK_BUTTON + } +} + + + +# Blank verse with themed words + +# Okay, so this should result in 4 lines, where each line is a relevant theme word. +# Theme word type (specific_noun_one, abstract_noun_one, etc.) is set by which custom('') text is asked for in loc. +# This means that if you want a single line to have the potential to get two different word types, you have to create a new "sub" random_valid choosing between two loc strings with identical text, but which asks for a different custom('') text. +# Poem responsibly. + +poetry.0003 = { + type = character_event + title = poetry.0003.t + orphan = yes + desc = { + triggered_desc = { + trigger = { scope:recipient != scope:actor } + desc = { + desc = 0003.poetry_from + desc = poetry_line_break + desc = poetry_line_break + } + } + random_valid = { + desc = 0003.line_1_A + desc = 0003.line_1_B + #desc = 0003.line_1_C + #desc = 0003.line_1_D + } + desc = poetry_line_break + random_valid = { + desc = 0003.line_2_A + desc = 0003.line_2_B + #desc = 0003.line_2_C + #desc = 0003.line_2_D + } + desc = poetry_line_break + random_valid = { + desc = 0003.line_3_A + desc = 0003.line_3_B + #desc = 0003.line_3_C + #desc = 0003.line_3_D + } + desc = poetry_line_break + random_valid = { + desc = 0003.line_4_A + desc = 0003.line_4_B + #desc = 0003.line_4_C + #desc = 0003.line_4_D + } + } + theme = learning + + immediate = { + random_list = { + 25 = { + set_variable = { + name = poetry_theme + value = flag:nobility + } + } + 25 = { + set_variable = { + name = poetry_theme + value = flag:romance + } + } + } + } + + option = { + name = OK_BUTTON + } +} diff --git a/N3OW/events/test_events/test_activity_events.txt b/N3OW/events/test_events/test_activity_events.txt new file mode 100644 index 00000000..b1ff5775 --- /dev/null +++ b/N3OW/events/test_events/test_activity_events.txt @@ -0,0 +1,207 @@ +namespace = test_activity_events + +test_activity_events.1 = { + type = activity_event + title = test_activity_events.1.t + desc = test_activity_events.1.desc + left_portrait = root + right_portrait = root.primary_heir + + theme = stewardship_wealth_focus + orphan = yes + + widget = { + gui = "event_window_widget_stress" + container = "custom_widgets_container" + } + + immediate = { + save_scope_as = stress_character # For stress widget + add_gold = 1337 + } + + option = { + name = test_activity_events.1.a + primary_heir = { add_prestige = 42 } + } + option = { + name = test_activity_events.1.b + add_piety = 420 + } +} + +test_activity_events.2 = { + type = activity_event + title = debug_main + desc = debug_main + theme = ep2_video_test + orphan = yes + + option = { + name = debug_main + } +} + +test_activity_events.3 = { + type = activity_event + window = activity_locale_fullscreen_event_widget + title = debug_main + desc = debug_main + theme = default + orphan = yes + + option = { + name = debug_main + } +} + +test_activity_events.4 = { # Max Portraits in Event Window + type = activity_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + left_portrait = { + character = scope:portrait_1 + animation = wedding_priest + } + + right_portrait = { + character = scope:portrait_2 + animation = wedding_priest + } + + center_portrait = { + character = scope:portrait_3 + animation = wedding_priest + } + + + lower_right_portrait = scope:portrait_4 + lower_center_portrait = scope:portrait_5 + lower_left_portrait = scope:portrait_6 + + immediate = { + random_ruler = { + save_scope_as = portrait_1 + } + random_ruler = { + save_scope_as = portrait_2 + } + random_ruler = { + save_scope_as = portrait_3 + } + random_ruler = { + save_scope_as = portrait_4 + } + random_ruler = { + save_scope_as = portrait_5 + } + random_ruler = { + save_scope_as = portrait_6 + } + } + + option = { + name = LOREM_IPSUM_TITLE + } + + option = { + name = LOREM_IPSUM_TITLE + } + + option = { + name = LOREM_IPSUM_TITLE + } + + option = { + name = LOREM_IPSUM_TITLE + } +} + +test_activity_events.5 = { # Camera override in event wndow + type = activity_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + theme = realm + orphan = yes + + left_portrait = scope:portrait_1 + + center_portrait = { + character = scope:portrait_3 + camera = camera_event_right + } + + right_portrait = { + character = scope:portrait_2 + camera = camera_event_right + } + + immediate = { + random_ruler = { + save_scope_as = portrait_1 + } + random_ruler = { + save_scope_as = portrait_2 + } + random_ruler = { + save_scope_as = portrait_3 + } + } + + option = { + name = LOREM_IPSUM_TITLE + } +} + +## Test transitions +test_activity_events.10 = { + type = activity_event + title = LOREM_IPSUM_TITLE + desc = LOREM_IPSUM_DESCRIPTION + left_portrait = root + right_portrait = root.primary_heir + theme = tournament_archery_pivotal + window = tournament_fullscreen_pivotal_event_widget + orphan = yes + + override_transition = { + trigger = { + exists = var:progress_to_victory + var:progress_to_victory > 75 + } + reference = debug_test_transition_1 + } + override_transition = { + trigger = { + exists = var:progress_to_victory + var:progress_to_victory <= 75 + var:progress_to_victory > 25 + } + reference = debug_test_transition_2 + } + override_transition = { + trigger = { + exists = var:progress_to_victory + var:progress_to_victory <= 25 + } + reference = debug_test_transition_3 + } + + orphan = yes + + immediate = { + add_gold = 1337 + } + + option = { + name = test_activity_events.1.a + primary_heir = { add_prestige = 42 } + } + option = { + name = test_activity_events.1.b + add_piety = 420 + } +} diff --git a/N3OW/events/test_events/test_court_events.txt b/N3OW/events/test_events/test_court_events.txt new file mode 100644 index 00000000..b363b3e6 --- /dev/null +++ b/N3OW/events/test_events/test_court_events.txt @@ -0,0 +1,167 @@ +namespace = test_court_events + +test_court_events.1 = { + type = court_event + title = test_court_events.1.t + desc = test_court_events.1.desc + left_portrait = root + right_portrait = root.primary_heir + + theme = stewardship_wealth_focus + orphan = yes + + court_scene = { + button_position_character = primary_heir + roles = { + primary_heir = { + group = event_group + } + primary_spouse = { + group = event_group + animation = flirtation + } + } + } + + widget = { + gui = "event_window_widget_stress" + container = "custom_widgets_container" + } + + immediate = { + save_scope_as = stress_character # For stress widget + add_gold = 1337 + } + + option = { + name = test_court_events.1.a + primary_heir = { add_prestige = 42 } + } + option = { + name = test_court_events.1.b + add_piety = 420 + } +} + +test_court_events.2 = { + type = court_event + title = test_court_events.1.t + desc = test_court_events.1.desc + left_portrait = root + right_portrait = root.primary_heir + + theme = stewardship_wealth_focus + orphan = yes + + court_scene = { + button_position_character = scope:person_1 + roles = { + scope:person_1 = event_group + scope:person_2 = event_group + scope:person_3 = event_group + } + } + + immediate = { + random_courtier_or_guest = { + limit = { + not = { + has_variable = in_debug_court_event + } + } + save_scope_as = person_1 + set_variable = in_debug_court_event + } + random_courtier_or_guest = { + limit = { + nor = { + this = scope:person_1 + has_variable = in_debug_court_event + } + } + save_scope_as = person_2 + set_variable = in_debug_court_event + } + random_courtier_or_guest = { + limit = { + nor = { + this = scope:person_1 + this = scope:person_2 + has_variable = in_debug_court_event + } + } + save_scope_as = person_3 + set_variable = in_debug_court_event + } + add_gold = 1337 + } + + option = { + name = test_court_events.1.a + scope:person_1 = { add_prestige = 42 } + } + option = { + name = test_court_events.1.b + add_piety = 420 + } + + after = { + scope:person_1 = { remove_variable = in_debug_court_event } + scope:person_2 = { remove_variable = in_debug_court_event } + scope:person_3 = { remove_variable = in_debug_court_event } + } +} + +test_court_events.3 = { + type = court_event + title = test_court_events.1.t + desc = test_court_events.1.desc + left_portrait = root + right_portrait = root.primary_heir + + theme = stewardship_wealth_focus + orphan = yes + + court_scene = { + button_position_character = primary_heir + roles = { + primary_heir = { + group = event_group + } + primary_spouse = { + group = event_group + animation = flirtation + } + } + } + + widget = { + gui = "event_window_widget_stress" + container = "custom_widgets_container" + } + + immediate = { + save_scope_as = stress_character # For stress widget + add_gold = 1337 + } + + option = { + name = test_court_events.1.a + add_gold = 1337 + add_prestige = 50 + add_piety = 50 + primary_heir = { + add_gold = 1337 + add_prestige = 50 + add_piety = 50 + } + random_list = { + 5 = { + add_dread = 10 + } + 5 = { + primary_heir = { add_dread = 10 } + } + } + } +} diff --git a/N3OW/events/title_events.txt b/N3OW/events/title_events.txt new file mode 100644 index 00000000..da01ce5a --- /dev/null +++ b/N3OW/events/title_events.txt @@ -0,0 +1,535 @@ +######################################### +# TITLE SPECIFIC EVENTS # +######################################### +namespace = title_event + +# 0001-0010: Title name changes, by Emil Tisander +# 0011-0020: Asturias becomes Leon & Castille, by Ewan Cowhig Croft + +######################################### + +# West Francia becomes France when no longer controlled by a Karling +title_event.0001 = { + type = character_event + title = title_event_francia_name_change.title + desc = title_event_francia_name_change.desc + theme = crown + right_portrait = root + + trigger = { + scope:title = { + this = title:k_france + } + NOR = { + dynasty = { this = dynasty:25061 } # Not held by a Karling + any_liege_or_above = { + dynasty = { this = dynasty:25061 } # And does not have a liege that is a Karling + } + has_global_variable = west_francia_renamed + } + } + + immediate = { + title:k_france = { + save_scope_as = francia_title + } + set_global_variable = { + name = west_francia_renamed + value = yes + } + } + + option = { + name = title_event_francia_name_change.a + custom_tooltip = { + text = title_event_francia_name_change.a_tt_1 + + title:k_france = { + reset_title_name = yes # I.e. set_title_name = k_france + } + } + } +} + +# East Francia becomes Germany when no longer controlled by a Karling +title_event.0002 = { + type = character_event + title = title_event_francia_name_change.title + desc = title_event_francia_name_change.desc + theme = crown + right_portrait = root + + trigger = { + scope:title = { + this = title:k_east_francia + } + NOR = { + dynasty = { this = dynasty:25061 } # Not held by a Karling + any_liege_or_above = { + dynasty = { this = dynasty:25061 } # And does not have a liege that is a Karling + } + has_global_variable = east_francia_renamed + } + } + + immediate = { + title:k_east_francia = { + save_scope_as = francia_title + } + set_global_variable = { + name = east_francia_renamed + value = yes + } + } + + option = { + name = title_event_francia_name_change.a + custom_tooltip = { + text = title_event_francia_name_change.a_tt_2 + + title:k_east_francia = { + set_title_name = k_germany + } + } + } +} + +################################################## +# Splitting the Crown +# by Ewan Cowhig Croft +# 0011 - 0020 +################################################## + +# Hidden management event to determine if we need to axe Asturias &, if we do, what notification events to send out afterwards. +title_event.0011 = { + hidden = yes + + trigger = { + scope:title = title:k_castille + title:k_asturias = { + # Leon must be de jure part of Asturias, or else there's no reason to ever stop calling it Asturias. + any_in_de_jure_hierarchy = { this = title:d_leon } + } + } + + immediate = { + # Set up some scopes for easy reference. + title:k_castille = { + save_scope_as = castille + holder = { save_scope_as = castille_char } + } + title:k_asturias = { + save_scope_as = asturias + if = { + limit = { exists = holder } + holder = { save_scope_as = leon_char } + } + } + title:k_leon = { save_scope_as = leon } + ## Plus one for backgrounds; we take this one to get the hilly backdrops of northern Iberia. + province:1815 = { save_scope_as = background_terrain_scope } + # Then fire off relevant notifications to scope:leon_char & scope:castille_char. + ## If Asturias doesn't exist when Leon is created, we just send Castille one. + if = { + limit = { + NOT = { exists = title:k_asturias.holder } + } + scope:castille_char = { trigger_event = title_event.0012 } + } + ## & if Leon & Castille are now held by the same char, they get another. + else_if = { + limit = { scope:leon_char = scope:castille_char } + scope:castille_char = { trigger_event = title_event.0013 } + } + ## Otherwise, we send out the standard two-person configuration. + else = { + scope:leon_char = { trigger_event = title_event.0014 } + scope:castille_char = { trigger_event = title_event.0015 } + } + # Finally, execute the effects. + asturias_becomes_leon_and_castille_effect = yes + } +} + +# There is no Asturian King, but Castille now exists. +title_event.0012 = { + type = character_event + title = title_event.0012.t + desc = title_event.0012.desc + theme = realm + left_portrait = { + character = scope:castille_char + animation = personality_honorable + } + override_background = { reference = terrain_scope } + + immediate = { + show_as_tooltip = { asturias_becomes_leon_and_castille_effect = yes } + } + + # As it should be. + option = { + name = title_event.0012.a + + # No stress needed for a single-option notification event. + ai_chance = { + # No fine tweaking needed for the AI chance on a notification event. + base = 100 + } + } +} + +# The Asturian King is also King of Castille. +title_event.0013 = { + type = character_event + title = title_event.0013.t + desc = title_event.0013.desc + theme = realm + left_portrait = { + character = scope:castille_char + animation = personality_honorable + } + override_background = { reference = terrain_scope } + + immediate = { + show_as_tooltip = { asturias_becomes_leon_and_castille_effect = yes } + } + + # Two crowns are better than one! + option = { + name = title_event.0013.a + + # No stress needed for a single-option notification event. + ai_chance = { + # No fine tweaking needed for the AI chance on a notification event. + base = 100 + } + } +} + +# Leon POV: Asturias becomes Leon. +title_event.0014 = { + type = character_event + title = title_event.0014.t + desc = title_event.0014.desc + theme = realm + left_portrait = { + character = scope:leon_char + animation = anger + } + right_portrait = { + character = scope:castille_char + animation = personality_greedy + } + override_background = { reference = terrain_scope } + + immediate = { + show_as_tooltip = { asturias_becomes_leon_and_castille_effect = yes } + } + + # Splitters! + option = { + name = title_event.0014.a + + # No stress needed for the default option in a notification event. + ai_chance = { + # No fine tweaking needed for the AI chance on a notification event. + base = 100 + } + } + + # We'll get those lands back some day... + option = { + name = title_event.0014.b + # We only want to allow the mechanical effect options as RP-outlets for players. + trigger = { is_ai = no } + + progress_towards_rival_effect = { + REASON = rival_lands_stolen + CHARACTER = scope:castille_char + OPINION = default_rival_opinion + } + + stress_impact = { forgiving = minor_stress_impact_gain } + ai_chance = { + # No fine tweaking needed for the AI chance on a notification event. + base = 100 + } + } + + # Huzzah! A whole _kingdom_ of comrades! + option = { + name = title_event.0014.c + # We only want to allow the mechanical effect options as RP-outlets for players. + trigger = { is_ai = no } + + progress_towards_friend_effect = { + REASON = friend_castille_leon + CHARACTER = scope:castille_char + OPINION = default_friend_opinion + } + + stress_impact = { vengeful = minor_stress_impact_gain } + ai_chance = { + # No fine tweaking needed for the AI chance on a notification event. + base = 100 + } + } +} + +# Castille POV: Asturias becomes Leon. +title_event.0015 = { + type = character_event + title = title_event.0015.t + desc = title_event.0015.desc + theme = realm + left_portrait = { + character = scope:castille_char + animation = happiness + } + right_portrait = { + character = scope:leon_char + animation = anger + } + override_background = { reference = terrain_scope } + + immediate = { + show_as_tooltip = { asturias_becomes_leon_and_castille_effect = yes } + } + + # Power is back where it should always have been. + option = { + name = title_event.0015.a + + # No stress needed for the default option in a notification event. + ai_chance = { + # No fine tweaking needed for the AI chance on a notification event. + base = 100 + } + } + + # Today, Castille. Tomorrow, _Leon_. + option = { + name = title_event.0015.b + # We only want to allow the mechanical effect options as RP-outlets for players. + trigger = { is_ai = no } + scope:leon_char = { + progress_towards_rival_effect = { + REASON = rival_leon_formed + CHARACTER = scope:castille_char + OPINION = default_rival_opinion + } + } + stress_impact = { forgiving = minor_stress_impact_gain } + ai_chance = { + # No fine tweaking needed for the AI chance on a notification event. + base = 100 + } + } + + # We may be divided in rule, but we're united by blood! + option = { + name = title_event.0015.c + # We only want to allow the mechanical effect options as RP-outlets for players. + trigger = { is_ai = no } + scope:leon_char = { + progress_towards_friend_effect = { + REASON = friend_castille_leon + CHARACTER = scope:castille_char + OPINION = default_friend_opinion + } + } + stress_impact = { vengeful = minor_stress_impact_gain } + ai_chance = { + # No fine tweaking needed for the AI chance on a notification event. + base = 100 + } + } +} + +# Ascended Throne memory maintenance +title_event.9900 = { + type = character_event + hidden = yes + cooldown = { days = 1 } + + trigger = { + is_landless_adventurer = no + any_in_list = { variable = new_titles } + } + + immediate = { + if = { + limit = { + is_target_in_variable_list = { + name = new_titles + target = root.primary_title + } + } + primary_title = { save_scope_as = new_primary_title } + } + else = { + ordered_in_list = { + variable = new_titles + order_by = tier + save_scope_as = new_primary_title + } + } + if = { + limit = { exists = scope:new_primary_title.previous_holder } + scope:new_primary_title.previous_holder = { save_scope_as = flavor } + } + else = { save_scope_as = flavor } + create_character_memory = { + type = ascended_throne_memory + + participants = { + flavor_character = scope:flavor + } + } + set_variable = { + name = title_count + value = -1 + } + every_in_list = { + variable = new_titles + save_temporary_scope_as = title_temp + scope:new_memory = { + add_to_variable_list = { + name = new_titles + target = scope:title_temp + } + } + root = { + change_variable = { + name = title_count + add = 1 + } + } + } + scope:new_memory = { + set_variable = { + name = title_count + value = root.var:title_count + } + set_variable = { + name = landed_title + value = scope:new_primary_title + } + set_variable = { + name = reason + value = scope:real_transfer_type + } + #Only children should get childhood memories + if = { + limit = { + root = { is_adult = no } + } + set_variable = childhood_memory + } + # Bonus scopes + if = { + limit = { exists = root.var:ascended_throne_extra } + set_variable = { + name = ascended_throne_extra + value = root.var:ascended_throne_extra + } + root = { remove_variable = ascended_throne_extra } + } + } + clear_variable_list = new_titles + remove_variable = title_count + } +} + +#Lost title memory maintenance +title_event.9901 = { + type = character_event + hidden = yes + cooldown = { days = 1 } + + immediate = { + ordered_in_list = { + variable = lost_titles + order_by = tier + save_scope_as = highest_old_title + } + create_character_memory = { + type = lost_title_memory + + participants = { + new_holder = scope:new_holder + } + } + set_variable = { + name = title_count + value = -1 + } + every_in_list = { + variable = lost_titles + save_temporary_scope_as = title_temp + scope:new_memory = { + add_to_variable_list = { + name = lost_titles + target = scope:title_temp + } + } + root = { + change_variable = { + name = title_count + add = 1 + } + } + } + scope:new_memory = { + set_variable = { + name = title_count + value = root.var:title_count + } + set_variable = { + name = landed_title + value = scope:highest_old_title + } + set_variable = { + name = reason + value = scope:real_transfer_type + } + #Only children should get childhood memories + if = { + limit = { + root = { is_adult = no } + } + set_variable = childhood_memory + } + # Bonus scopes + if = { + limit = { exists = root.var:ascended_throne_extra } + set_variable = { + name = ascended_throne_extra + value = root.var:ascended_throne_extra + } + root = { remove_variable = ascended_throne_extra } + } + } + clear_variable_list = new_titles + remove_variable = title_count + } +} + +# Make sure newbie adventurers aren't locked out of their camp. +title_event.9911 = { + type = character_event + hidden = yes + + trigger = { + government_has_flag = government_is_landless_adventurer + NOR = { + is_commanding_army = yes + exists = involved_activity + is_travelling = yes + is_imprisoned = yes + } + } + + immediate = { set_location_to_default = yes } +} diff --git a/N3OW/events/travel_events/test_events.txt b/N3OW/events/travel_events/test_events.txt new file mode 100644 index 00000000..470c8e6d --- /dev/null +++ b/N3OW/events/travel_events/test_events.txt @@ -0,0 +1,107 @@ +namespace = travel_destinations + +travel_destinations.1000 = { + type = character_event + title = travel_destinations.1000.t + desc = travel_destinations.1000.desc + theme = travel + #override_background = { reference = fp4_legendary_oasis } + orphan = yes + + left_portrait = { + character = root + animation = happiness + } + + #right_portrait = { + # character = scope:local_character + # animation = toast_goblet + #} + + trigger = { + #is_available_travelling_adult = yes + #is_landed = yes + #is_location_valid_for_travel_event_on_land = yes + #location = { + # has_special_building = yes + #} + } + + immediate = { + #mp_delay_travel_plan = { DAYS = 90 } + random_living_character = { save_scope_as = local_character } + random_province = { + limit = { + has_special_building = yes + NOR = { + has_variable = no_province1 + has_building_or_higher = generic_university + has_building_or_higher = hall_of_heroes_01 + has_building_or_higher = hall_of_heroes_02 + has_building_or_higher = hall_of_heroes_03 + has_building_or_higher = hall_of_heroes_04 + has_building_or_higher = hall_of_heroes_05 + has_building_or_higher = special_greenhouse_01 + has_building_or_higher = holy_site_cathedral_01 + has_building_or_higher = holy_site_mosque_01 + has_building_or_higher = holy_site_fire_temple_01 + has_building_or_higher = holy_site_pagan_grand_temple_01 + has_building_or_higher = holy_site_indian_grand_temple_01 + has_building_or_higher = holy_site_other_grand_temple_01 + has_building_or_higher = event_tower_of_silence_01 + # TGP + has_building_or_higher = holy_site_buddhist_grand_temple_01 + has_building_or_higher = holy_site_japanese_temple_01 + has_building_or_higher = holy_site_chinese_temple_01 + has_building_or_higher = holy_site_se_asia_pagan_temple_01 + } + } + set_variable = { + name = no_province1 + years = 1 + } + save_scope_as = location + } + #location = { + # save_scope_as = location + #} + } + + option = { + name = debug + + stress_impact = { + ambitious = minor_stress_impact_loss + lazy = minor_stress_impact_gain + content = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = content + } + } + } + } + + after = { + #mp_resume_travel_plan = yes + #if = { # Cleanup + # limit = { + # root = { + # is_ai = yes + # } + # scope:local_character = { + # has_character_flag = silently_disappear_me + # } + # } + # scope:local_character = { + # silent_disappearance_effect = yes + # } + #} + } +} \ No newline at end of file diff --git a/N3OW/events/travel_events/travel_events_bp3.txt b/N3OW/events/travel_events/travel_events_bp3.txt new file mode 100644 index 00000000..107b3550 --- /dev/null +++ b/N3OW/events/travel_events/travel_events_bp3.txt @@ -0,0 +1,5738 @@ +namespace = travel_events_bp3 + +scripted_trigger bp3_travel_event_default_trigger = { + has_bp3_dlc_trigger = yes + is_location_valid_for_travel_event_on_land = yes + is_available_travelling_adult = yes +} + +scripted_trigger travel_events_bp3_1_character = { + age >= 12 + OR = { + is_child_of = root + is_spouse_of = root + has_friendly_relationship_trigger = { CHARACTER = root } + } +} + +travel_events_bp3.1 = { # Seasons of Change + type = character_event + content_source = dlc_015 + title = travel_events_bp3.1.t + desc = { + desc = travel_events_bp3.1.desc + first_valid = { + triggered_desc = { + trigger = { + current_season_spring = yes + } + desc = travel_events_bp3.1.desc.spring + } + triggered_desc = { + trigger = { + current_season_summer = yes + } + desc = travel_events_bp3.1.desc.summer + } + triggered_desc = { + trigger = { + current_season_autumn = yes + location = { + OR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + desc = travel_events_bp3.1.desc.autumn_desert + } + triggered_desc = { + trigger = { + current_season_autumn = yes + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + desc = travel_events_bp3.1.desc.autumn + } + triggered_desc = { + trigger = { + current_season_winter = yes + location = { + has_winter_trigger = no + } + } + desc = travel_events_bp3.1.desc.winter + } + triggered_desc = { + trigger = { + current_season_winter = yes + location = { + has_winter_trigger = yes + } + } + desc = travel_events_bp3.1.desc.winter_snow + } + triggered_desc = { + trigger = { + current_season_dry_season = yes + } + desc = travel_events_bp3.1.desc.dry_season + } + triggered_desc = { + trigger = { + current_season_rainy_season = yes + } + desc = travel_events_bp3.1.desc.rainy_season + } + } + } + + theme = travel + + override_background = { reference = wilderness } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:friendly_character + animation = survey + } + + override_effect_2d = { + trigger = { + current_season_rainy_season = yes + } + reference = rain + } + + override_effect_2d = { + trigger = { + OR = { + current_season_dry_season = yes + current_season_summer = yes + } + } + reference = legend_glow + } + + widget = { + is_shown = { + current_season_winter = yes + location = { + has_winter_trigger = yes + } + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.1 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + current_travel_plan = { + any_entourage_character = { + travel_events_bp3_1_character = yes + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + travel_events_bp3_1_character = yes + } + save_scope_as = friendly_character + } + } + } + + option = { + name = travel_events_bp3.1.a + scope:friendly_character = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 15 + } + } + current_travel_plan ?= { + delay_travel_plan = { days = 2 } + } + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.1.b + flavor = travel_events_bp3.1.b.flavor + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +travel_events_bp3.5 = { # Caught Outside + type = character_event + content_source = dlc_015 + title = travel_events_bp3.5.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + current_season_winter = yes + } + desc = travel_events_bp3.5.desc.snow + } + triggered_desc = { + trigger = { + current_season_winter = no + } + desc = travel_events_bp3.5.desc.rain + } + } + } + theme = travel + + override_background = { reference = wilderness } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = disappointed + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.5 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + OR = { + AND = { + current_season_winter = yes + location = { + has_winter_trigger = yes + } + } + current_season_rainy_season = yes + AND = { + OR = { + current_season_spring = yes + current_season_autumn = yes + } + location = { + NOR = { + terrain = desert + terrain = desert_mountains + terrain = drylands + } + } + } + } + } + + override_effect_2d = { + trigger = { + current_season_winter = no + } + reference = rain + } + + widget = { + is_shown = { + current_season_winter = yes + } + gui = "event_window_widget_vfx_snow" + container = "foreground_shader_vfx_container" + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + } + + option = { + name = travel_events_bp3.5.a + + stress_impact = { + base = minor_stress_impact_loss + } + + current_travel_plan ?= { + delay_travel_plan = { weeks = 1 } + } + + ai_chance = { + base = 0 + modifier = { + age > 55 + add = 100 + } + } + } + + option = { + name = { + trigger = { + current_season_winter = yes + } + text = travel_events_bp3.5.b.snow + } + name = { + trigger = { + current_season_winter = no + } + text = travel_events_bp3.5.b.rain + } + + if = { + limit = { + NOT = { has_trait = ill } + } + random = { + chance = { + value = 20 + if = { + limit = { + age > 55 + } + add = { + value = age + subtract = 55 + } + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + + custom_tooltip = travel_events_bp3.5.b.tt + + hidden_effect = { + current_travel_plan = { + every_entourage_character = { + limit = { + this != root + } + random = { + chance = { + value = 5 + if = { + limit = { + age > 55 + } + add = { + value = age + subtract = 55 + } + } + } + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = yes } + } + } + } + } + + current_travel_plan ?= { + add_destination_progress = { days = 5 } + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + age > 55 + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +scripted_effect find_holy_site_effect = { + random_county_province = { + limit = { + is_county_capital = yes + barony = { is_holy_site_of = root.faith } + } + alternative_limit = { + barony = { is_holy_site_of = root.faith } + } + save_scope_as = holy_location + } +} + +travel_events_bp3.10 = { # Pilgrims on the Road + type = character_event + content_source = dlc_015 + title = travel_events_bp3.10.t + desc = { + desc = travel_events_bp3.10.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:holy_order_character + } + desc = travel_events_bp3.10.desc.holy_order + } + triggered_desc = { + trigger = { + NOT = { exists = scope:holy_order_character } + } + desc = travel_events_bp3.10.desc.pilgrims + } + } + } + theme = travel + + override_background = { reference = ep3_campfire } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = toast + } + + right_portrait = { + character = scope:pilgrim_character + animation = lantern + hide_info = yes + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.10 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + NOT = { government_has_flag = government_is_celestial } + location.county = { + OR = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + any_neighboring_county = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + location.county = { + find_holy_site_effect = yes + if = { + limit = { + NOT = { exists = scope:holy_location } + } + random_neighboring_county = { + limit = { + any_county_province = { + barony = { is_holy_site_of = root.faith } + } + } + find_holy_site_effect = yes + } + } + } + faith = { + random_faith_holy_order = { + leader = { save_scope_as = grandmaster } + } + } + if = { + limit = { + exists = scope:grandmaster + } + create_character = { + template = soldier_friend_character + culture = scope:grandmaster.culture + faith = scope:grandmaster.faith + location = root.location + + after_creation = { + save_scope_as = holy_order_character + save_scope_as = pilgrim_character + add_character_flag = { + flag = need_military_outfit + } + add_trait = order_member + add_piety_level = 1 + scope:grandmaster = { + add_courtier = prev + } + } + } + } + else = { + create_character = { + template = soldier_friend_character + culture = root.culture + faith = root.faith + gender = root + location = root.location + save_scope_as = pilgrim_character + } + } + } + + option = { + name = travel_events_bp3.10.a + if = { + limit = { + exists = scope:holy_order_character + } + add_piety = minor_piety_gain + add_hook = { + type = favor_hook + target = scope:holy_order_character + } + progress_towards_friend_effect = { + REASON = friend_story_by_fire + CHARACTER = scope:holy_order_character + OPINION = default_friend_opinion + } + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + gregarious = minor_stress_impact_loss + paranoid = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + option = { + name = travel_events_bp3.10.b + trigger = { + current_travel_plan.next_destination_province = scope:holy_location + } + if = { + limit = { + exists = scope:holy_order_character + } + add_piety = medium_piety_gain + current_travel_plan = { + add_travel_plan_modifier = { + modifier = holy_knights_travel_modifier + years = 1 + } + } + } + else = { + current_travel_plan = { + add_travel_plan_modifier = { + modifier = holy_pilgrims_travel_modifier + years = 1 + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + paranoid = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + option = { + name = { + trigger = { + exists = scope:holy_order_character + } + text = travel_events_bp3.10.c.holy_order + } + name = { + trigger = { + NOT = { exists = scope:holy_order_character } + } + text = travel_events_bp3.10.c.pilgrims + } + flavor = travel_events_bp3.10.c.flavor + if = { + limit = { + exists = scope:holy_order_character + } + add_piety = medium_piety_loss + add_gold = { + value = { + value = tiny_gold_value + divide = 2 + multiply = scope:holy_order_character.stewardship + } + min = 50 + max = 1000 + } + scope:holy_order_character = { + death = { + death_reason = death_murder + killer = root + } + } + } + else = { + add_piety = major_piety_loss + add_dread = medium_dread_gain + add_gold = minor_gold_value + + hidden_effect = { + scope:pilgrim_character = { + death = { + death_reason = death_murder + killer = root + } + } + } + } + if = { + limit = { + has_government = landless_adventurer_government + NOT = { has_trait = gallowsbait } + } + add_trait = gallowsbait + } + else_if = { + limit = { + has_government = landless_adventurer_government + has_trait = gallowsbait + } + add_trait_xp = { + trait = gallowsbait + track = bandit + value = 5 + } + } + + stress_impact = { + compassionate = medium_stress_gain + greedy = minor_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 5 + OR = { + has_trait = greedy + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { + name = travel_events_bp3.10.d + if = { + limit = { + exists = scope:holy_order_character + } + scope:holy_order_character = { + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -15 + } + } + } + + stress_impact = { + paranoid = minor_stress_impact_loss + gregarious = minor_stress_gain + compassionate = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = compassionate + } + } + modifier = { + factor = 5 + has_trait = paranoid + } + } + } + + after = { + mp_resume_travel_plan = yes + if = { + limit = { + NOT = { exists = scope:holy_order_character } + } + scope:pilgrim_character = { + silent_disappearance_ai_effect = yes + } + } + if = { + limit = { + exists = scope:holy_order_character + } + scope:holy_order_character = { + silent_disappearance_ai_effect = yes + } + } + } +} + +scripted_trigger bard_murderer_trait_trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = murderer + has_trait = schemer + has_trait = torturer + } +} + +scripted_trigger bard_lustful_trait_trigger = { + OR = { + has_trait = lustful + has_trait = adulterer + has_trait = fornicator + has_trait = deviant + } +} + +scripted_trigger bard_gluttonous_trait_trigger = { + OR = { + has_trait = drunkard + has_trait = gluttonous + has_trait = lifestyle_reveler + } +} + +scripted_trigger bard_fool_trait_trigger = { + OR = { + has_trait = lunatic + has_trait = possessed + has_trait = intellect_bad + has_trait = dull + } +} + +scripted_trigger bard_sinful_trait_trigger = { + OR = { + bard_murderer_trait_trigger = yes + bard_lustful_trait_trigger = yes + bard_gluttonous_trait_trigger = yes + bard_fool_trait_trigger = yes + has_trait = craven + } +} + +scripted_effect bard_replace_position_effect = { + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:bard_character + holder = court_position:$POSITION$ + court_position = $POSITION$ + } + remove_character_flag = temporary_court_position_cost_removal +} + +travel_events_bp3.15 = { # The Stories of + type = character_event + content_source = dlc_015 + title = travel_events_bp3.15.t + desc = { + desc = travel_events_bp3.15.desc + random_valid = { + triggered_desc = { + trigger = { + scope:liege = { bard_murderer_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.murderer + } + triggered_desc = { + trigger = { + scope:liege = { bard_lustful_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.lustful.man + } + triggered_desc = { + trigger = { + scope:liege = { bard_lustful_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.lustful.woman + } + triggered_desc = { + trigger = { + scope:liege = { bard_gluttonous_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.gluttonous + } + triggered_desc = { + trigger = { + scope:liege = { bard_fool_trait_trigger = yes } + } + desc = travel_events_bp3.15.desc.fool + } + triggered_desc = { + trigger = { + scope:liege = { has_trait = craven } + } + desc = travel_events_bp3.15.desc.craven + } + } + desc = travel_events_bp3.15.desc.outro + } + theme = travel + + override_background = { reference = wilderness } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = laugh + } + + right_portrait = { + character = scope:bard_character + animation = storyteller + } + + lower_right_portrait = scope:liege + + trigger = { + static_group_filter = { + group = travel_events_bp3.15 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + NOR = { + location.county.holder.top_liege = ROOT + location.county.title_province = { + OR = { + has_holding_type = nomad_holding + has_holding_type = herder_holding + } + } + location.county.holder.top_liege = { + has_title = title:h_china + } + } + location.county.holder.top_liege = { + age > 16 + bard_sinful_trait_trigger = yes + } + } + + immediate = { + location = { save_scope_as = location } + mp_delay_travel_plan = { DAYS = 90 } + location.county.holder.top_liege = { + save_scope_as = liege + } + + create_character = { + template = master_bard_camp_officer_template + culture = location.culture + faith = location.faith + gender = root + location = location + save_scope_as = bard_character + } + } + + option = { + name = travel_events_bp3.15.a + stress_impact = { + base = minor_stress_impact_loss + } + custom_tooltip = travel_events_bp3.15.a.tt + hidden_effect = { + if = { + limit = { + is_ai = no + } + random = { + chance = 33 + scope:liege = { + random_secret = { + expose_secret = root + } + } + } + } + scope:bard_character = { + silent_disappearance_ai_effect = yes + } + } + + ai_chance = { + base = 250 + modifier = { + factor = 5 + has_trait = ambitious + } + } + } + + option = { + name = travel_events_bp3.15.b + trigger = { + OR = { + is_valid_to_hire_court_position_type = court_musician_court_position + is_valid_to_hire_court_position_type = court_jester_court_position + is_valid_to_hire_court_position_type = master_bard_camp_officer + } + } + + show_as_tooltip = { + if = { + limit = { + is_valid_to_hire_court_position_type = court_musician_court_position + } + appoint_court_position = { + recipient = scope:bard_character + court_position = court_musician_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_jester_court_position + } + appoint_court_position = { + recipient = scope:bard_character + court_position = court_jester_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + } + appoint_court_position = { + recipient = scope:bard_character + court_position = master_bard_camp_officer + } + } + } + custom_tooltip = will_have_excellent_aptitude + + hidden_effect = { + scope:bard_character = { add_to_court_and_entourage_effect = yes } + if = { + limit = { + is_valid_to_hire_court_position_type = court_musician_court_position + NOT = { employs_court_position = court_musician_court_position } + } + appoint_court_position = { + recipient = scope:bard_character + court_position = court_musician_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_musician_court_position + employs_court_position = court_musician_court_position + } + bard_replace_position_effect = { POSITION = court_musician_court_position } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_jester_court_position + NOT = { employs_court_position = court_jester_court_position } + } + appoint_court_position = { + recipient = scope:bard_character + court_position = court_jester_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_jester_court_position + employs_court_position = court_jester_court_position + } + bard_replace_position_effect = { POSITION = court_jester_court_position } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + NOT = { employs_court_position = master_bard_camp_officer } + } + appoint_court_position = { + recipient = scope:bard_character + court_position = master_bard_camp_officer + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_bard_camp_officer + employs_court_position = master_bard_camp_officer + } + bard_replace_position_effect = { POSITION = master_bard_camp_officer } + } + } + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.15.c + add_dread = minor_dread_gain + scope:liege = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + scope:bard_character = { + death = { + death_reason = death_murder + killer = root + } + } + + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 10 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + after = { + mp_resume_travel_plan = yes + + scope:bard_character = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger bp3_home_city_trigger = { + has_holding_type = city_holding + free_building_slots > 0 +} + +travel_events_bp3.20 = { # The Guild + type = character_event + content_source = dlc_015 + title = travel_events_bp3.20.t + desc = travel_events_bp3.20.desc + theme = travel + + override_background = { reference = market } + + cooldown = { years = 25 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + animation = debating + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 0.3 + is_ai = yes + } + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.20 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = city_holding + local_guild_trigger = yes + } + any_sub_realm_barony = { + title_province = { bp3_home_city_trigger = yes } + } + OR = { # Check if it is at all feasible that these people have an interest in your lands + location.empire = capital_barony.empire + location.county = { + any_title_to_title_neighboring_and_across_water_empire = { + this = root.capital_barony.empire + } + } + } + highest_held_title_tier < tier_empire + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + location = { + local_guild_effect = yes + } + random_sub_realm_barony = { + limit = { + county = { holder = root } + title_province = { + bp3_home_city_trigger = yes + local_guild_compare_trigger = yes + } + } + alternative_limit = { + title_province = { + bp3_home_city_trigger = yes + local_guild_compare_trigger = yes + } + } + alternative_limit = { + title_province = { + bp3_home_city_trigger = yes + } + } + title_province = { save_scope_as = new_home_province } + } + + create_character = { + template = merchant_template + faith = location.faith + culture = location.culture + gender = root + location = location + save_scope_as = merchant_character + } + } + + option = { + name = travel_events_bp3.20.a + add_gold = 1 + scope:new_home_province = { + if = { + limit = { + local_guild_compare_trigger = yes + } + local_guild_reward_effect = yes + } + else = { + add_random_economic_building_effect = yes + } + } + + stress_impact = { + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = diligent + } + } + } + + option = { + name = travel_events_bp3.20.b + flavor = travel_events_bp3.20.b.tt + add_gold = tiny_gold_value + scope:new_home_province.county = { + change_development_progress_with_overflow = 25 + change_county_control = -25 + } + + stress_impact = { + greedy = minor_stress_impact_loss + arbitrary = minor_stress_impact_loss + just = minor_stress_gain + generous = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = generous + } + } + modifier = { + factor = 5 + OR = { + has_trait = greedy + has_trait = arbitrary + } + } + } + } + + option = { + name = travel_events_bp3.20.c + if = { + limit = { + location.culture != culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + else = { + add_prestige = minor_prestige_gain + } + + stress_impact = { + gregarious = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:merchant_character = { + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.25 = { # The Toils of War + type = character_event + content_source = dlc_015 + title = travel_events_bp3.25.t + desc = { + desc = travel_events_bp3.25.desc + random_valid = { + triggered_desc = { + trigger = { + NOT = { has_trait = sadistic } + } + desc = travel_events_bp3.25.desc.outro + } + triggered_desc = { + trigger = { + has_trait = sadistic + } + desc = travel_events_bp3.25.desc.outro.sadistic + } + } + } + + theme = travel + + override_background = { reference = market } + + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = sadistic + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + NOT = { has_trait = sadistic } + } + animation = sadness + } + } + + right_portrait = { + character = scope:soldier_character + animation = storyteller + hide_info = yes + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.25 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = castle_holding + } + OR = { + location.county.holder = { + days_of_continuous_war > 150 + NOT = { is_at_war_with = root } + } + location.county.holder.top_liege = { + days_of_continuous_war > 150 + NOT = { is_at_war_with = root } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + location.county.holder = { + save_scope_as = liege + random_character_war = { + save_scope_as = ongoing_war + } + if = { + limit = { + NOT = { exists = scope:ongoing_war } + } + top_liege = { + save_scope_as = liege + random_character_war = { + save_scope_as = ongoing_war + } + } + } + } + scope:liege = { + random_war_enemy = { + save_scope_as = opponent + } + } + create_character = { + template = soldier_friend_character + culture = root.location.culture + faith = root.location.faith + gender = root + employer = scope:liege + save_scope_as = soldier_character + } + + save_scope_value_as = { + name = lifestyle_modifier_xp + value = { + integer_range = { + min = 100 max = 500 + } + divide = 10 + ceiling = yes + multiply = 10 + } + } + } + + option = { + name = travel_events_bp3.25.a + add_piety = medium_piety_gain + remove_short_term_gold = tiny_gold_value + if = { + limit = { + location.culture != culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 2 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + compassionate = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = compassionate + } + } + } + + option = { + name = travel_events_bp3.25.b + random_list = { + 25 = { + desc = travel_events_bp3.25.b.insulted + modifier = { + add = { + value = 35 + subtract = root.diplomacy + } + } + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.25.b.insulted + left_icon = root + + add_prestige = medium_prestige_loss + } + } + 25 = { + desc = travel_events_bp3.25.b.stories + modifier = { + add = { + value = 0 + add = root.martial + add = root.prowess + } + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.25.b.stories + left_icon = root + + add_martial_lifestyle_xp = scope:lifestyle_modifier_xp + } + } + 50 = { + desc = travel_events_bp3.25.b.martial + modifier = { + add = { + value = 0 + subtract = root.martial + } + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.25.b.martial + left_icon = root + + add_martial_skill = 1 + } + } + 50 = { + desc = travel_events_bp3.25.b.prowess + modifier = { + add = { + value = 0 + subtract = root.prowess + } + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.25.b.prowess + left_icon = root + + add_prowess_skill = 1 + } + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_gain + shy = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = shy + } + } + modifier = { + factor = 5 + has_trait = brave + } + } + } + + option = { + name = travel_events_bp3.25.c + stress_impact = { + base = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + current_travel_plan ?= { + add_destination_progress = { days = 3 } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = diligent + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.30 = { # The Mercenaries of + type = character_event + content_source = dlc_015 + title = travel_events_bp3.30.t + desc = travel_events_bp3.30.desc + + theme = travel + + override_background = { reference = tavern } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = drink + } + + right_portrait = { + character = scope:soldier_character + animation = toast + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.30 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = castle_holding + } + highest_held_title_tier < tier_empire + maa_regiments_max_count > 0 #This is to ensure we don't fire the event for characters that are not allowed to have MAA at all + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + create_character = { + template = great_mercenary + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + location = root.location + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = need_military_outfit + } + if = { + limit = { NOT = { has_trait = lifestyle_blademaster } } + add_trait = lifestyle_blademaster + } + add_trait_xp = { + trait = lifestyle_blademaster + value = 75 + } + } + } + } + + option = { + name = travel_events_bp3.30.a + remove_short_term_gold = medium_gold_value + spawn_army = { + name = mercenary_army_default + levies = { + value = 200 + multiply = { + min = 1 + value = highest_held_title_tier + } + } + location = root.capital_province + inheritable = no + war_keep_on_attacker_victory = yes + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_education_martial_trigger = yes + } + modifier = { + factor = 5 + OR = { + has_trait = brave + has_trait = ambitious + } + } + } + } + + option = { + name = travel_events_bp3.30.b + trigger = { + NOR = { + is_valid_to_hire_court_position_type = bodyguard_court_position + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + } + remove_short_term_gold = { + value = tiny_gold_value + min = 20 + max = 100 + } + show_as_tooltip = { add_courtier = scope:soldier_character } + hidden_effect = { + scope:soldier_character = { add_to_court_and_entourage_effect = yes } + } + + stress_impact = { + paranoid = medium_stress_gain + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { + name = travel_events_bp3.30.c + trigger = { + OR = { + is_valid_to_hire_court_position_type = bodyguard_court_position + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + } + remove_short_term_gold = { + value = minor_gold_value + min = 20 + max = 100 + } + + show_as_tooltip = { + if = { + limit = { + is_valid_to_hire_court_position_type = bodyguard_court_position + } + appoint_court_position = { + recipient = scope:soldier_character + court_position = bodyguard_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + } + appoint_court_position = { + recipient = scope:soldier_character + court_position = master_of_arms_camp_officer + } + } + } + custom_tooltip = will_have_excellent_aptitude + + scope:soldier_character = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 25 + } + } + + hidden_effect = { + scope:soldier_character = { add_to_court_and_entourage_effect = yes } + if = { + limit = { + is_valid_to_hire_court_position_type = bodyguard_court_position + any_court_position_holder = { + count <= 1 + has_court_position = bodyguard_court_position + } + } + appoint_court_position = { + recipient = scope:soldier_character + court_position = bodyguard_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = bodyguard_court_position + any_court_position_holder = { + count > 1 + has_court_position = bodyguard_court_position + } + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:soldier_character + holder = court_position:bodyguard_court_position + court_position = bodyguard_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + NOT = { employs_court_position = master_of_arms_camp_officer } + } + appoint_court_position = { + recipient = scope:soldier_character + court_position = master_of_arms_camp_officer + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = master_of_arms_camp_officer + employs_court_position = master_of_arms_camp_officer + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:soldier_character + holder = court_position:master_of_arms_camp_officer + court_position = master_of_arms_camp_officer + } + remove_character_flag = temporary_court_position_cost_removal + } + } + + stress_impact = { + paranoid = medium_stress_gain + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { + name = travel_events_bp3.30.d + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 200 + modifier = { + factor = 5 + OR = { + has_trait = shy + has_trait = paranoid + } + } + } + } + + option = { + name = travel_events_bp3.30.e + trigger = { + OR = { + has_trait = callous + has_trait = wrathful + } + } + + add_dread = medium_dread_gain + scope:soldier_character = { + death = { + death_reason = death_murder + killer = root + } + } + + stress_impact = { + callous = minor_stress_impact_loss + wrathful = medium_stress_impact_loss + compassionate = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = callous + has_trait = wrathful + } + } + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + after = { + mp_resume_travel_plan = yes + if = { + limit = { + OR = { + is_ai = yes + scope:soldier_character != root + } + } + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } + } +} + +scripted_trigger travel_event_teachable_kid_trigger = { + is_child_of = root + is_adult = no + age > 6 + has_focus = education_martial +} + +travel_events_bp3.35 = { # The Teacher of Knights + type = character_event + content_source = dlc_015 + title = travel_events_bp3.35.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:kid_character = { is_travel_entourage_character = yes } + } + desc = travel_events_bp3.35.desc.traveling + } + desc = travel_events_bp3.35.desc.home + } + first_valid = { + triggered_desc = { + trigger = { + NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + scope:kid_character = { is_travel_entourage_character = yes } + } + desc = travel_events_bp3.35.outro.non_martial_gender + } + desc = travel_events_bp3.35.outro.martial_gender + } + } + + theme = travel + + override_background = { reference = courtyard } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:soldier_character + animation = marshal_wooden_sword + } + + lower_right_portrait = scope:kid_character + + trigger = { + static_group_filter = { + group = travel_events_bp3.35 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + any_child = { + travel_event_teachable_kid_trigger = yes + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + create_character = { + template = old_knight_teacher + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + location = root.location + save_scope_as = soldier_character + + after_creation = { + add_character_flag = { + flag = roaming_character + flag = need_military_outfit + } + add_trait_xp = { + trait = lifestyle_blademaster + value = 100 + } + add_character_modifier = knight_teacher_modifier + } + } + random_child = { + limit = { + is_travel_entourage_character = yes + travel_event_teachable_kid_trigger = yes + } + alternative_limit = { + travel_event_teachable_kid_trigger = yes + } + save_scope_as = kid_character + } + + save_scope_value_as = { + name = lifestyle_trait_xp + value = lifestyle_blademaster_xp_gain_minor_value + } + } + + option = { + name = { + trigger = { + scope:kid_character = { is_travel_entourage_character = yes } + } + text = travel_events_bp3.35.a.travel + } + name = { + trigger = { + scope:kid_character = { is_travel_entourage_character = no } + } + text = travel_events_bp3.35.a.home + } + if = { + limit = { + scope:kid_character = { is_travel_entourage_character = no } + } + remove_short_term_gold = { + value = minor_gold_value + min = 5 + max = 150 + } + } + + hidden_effect = { + scope:soldier_character = { add_to_court_and_entourage_effect = yes } + } + + scope:soldier_character = { + set_relation_ward = scope:kid_character + custom_tooltip = travel_events_bp3.35.a.tt + } + + stress_impact = { + diligent = minor_stress_impact_loss + paranoid = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = diligent + } + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { + name = { + trigger = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + text = travel_events_bp3.35.b.martial + } + name = { + trigger = { + NOT = { can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } } + } + text = travel_events_bp3.35.b.non_martial + } + if = { + limit = { + has_trait = lifestyle_blademaster + } + add_trait_xp = { + trait = lifestyle_blademaster + value = scope:lifestyle_trait_xp + } + } + duel = { + skill = prowess + target = scope:soldier_character + 50 = { + desc = travel_events_bp3.35.b.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -39 + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.35.b.win + left_icon = root + + add_prestige = minor_prestige_gain + stress_impact = { + base = minor_stress_impact_loss + } + if = { + limit = { + NOT = { has_trait = lifestyle_blademaster } + } + add_trait = lifestyle_blademaster + } + } + } + 50 = { + desc = travel_events_bp3.35.b.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.35.b.lose + left_icon = root + + add_prowess_skill = 1 + } + } + } + + hidden_effect = { + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } + + stress_impact = { + brave = minor_stress_impact_loss + craven = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = brave + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + + option = { + name = { + trigger = { + scope:kid_character = { is_travel_entourage_character = yes } + } + text = travel_events_bp3.35.c.travel + } + name = { + trigger = { + scope:kid_character = { is_travel_entourage_character = no } + } + text = travel_events_bp3.35.c.home + } + stress_impact = { + base = medium_stress_impact_loss + gregarious = minor_stress_impact_loss + } + + hidden_effect = { + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:soldier_character = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger travel_event_decent_combatant_trigger = { + this != root + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + prowess >= 12 +} + +travel_events_bp3.40 = { # The Local Champion + type = character_event + content_source = dlc_015 + title = travel_events_bp3.40.t + desc = { + desc = travel_events_bp3.40.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:challenger_character } + desc = travel_events_bp3.40.outro.challenger + } + desc = travel_events_bp3.40.fallback + } + } + + theme = travel + + override_background = { reference = market } + + cooldown = { years = 10 } + + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = brave + prowess > 12 + } + } + animation = anger + } + triggered_animation = { + trigger = { + OR = { + has_trait = craven + prowess <= 12 + } + } + animation = fear + } + } + + right_portrait = { + character = scope:soldier_character + animation = wrestling_victory + } + + lower_right_portrait = scope:challenger_character + + trigger = { + static_group_filter = { + group = travel_events_bp3.40 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + + OR = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + current_travel_plan = { + any_entourage_character = { + NOT = { this = root } + is_adult = yes + travel_event_decent_combatant_trigger = yes + prowess >= 12 + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + create_character = { + template = wrestler_character + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + location = root.location + save_scope_as = soldier_character + + after_creation = { + add_character_flag = should_be_topless + add_character_flag = no_hat + } + } + + current_travel_plan = { + ordered_entourage_character = { + limit = { + this != root + is_adult = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + prowess >= 12 + } + order_by = prowess + save_scope_as = challenger_character + } + } + } + + option = { + name = travel_events_bp3.40.a + trigger = { + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + + duel = { + skill = prowess + target = scope:soldier_character + 50 = { + desc = travel_events_bp3.40.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -29 + } + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.40.win + left_icon = root + + add_prestige = medium_prestige_gain + add_gold = medium_gold_value + } + } + 50 = { + desc = travel_events_bp3.40.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.40.lose + left_icon = root + + remove_short_term_gold = tiny_gold_value + stress_impact = { + base = minor_stress_gain + ambitious = minor_stress_gain + } + } + } + } + + stress_impact = { + craven = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = brave + has_trait = ambitious + has_trait = greedy + } + prowess > 12 + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + + option = { + name = travel_events_bp3.40.b + trigger = { + exists = scope:challenger_character + } + scope:challenger_character ?= { + duel = { + skill = prowess + target = scope:soldier_character + 50 = { + desc = travel_events_bp3.40.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -29 + } + root = { + show_as_tooltip = { + add_prestige = { + value = medium_prestige_gain + multiply = 0.5 + } + add_gold = { + value = medium_gold_value + multiply = 0.75 + } + scope:challenger_character = { + add_prestige = { + value = medium_prestige_gain + multiply = 0.5 + } + add_gold = { + value = root.medium_gold_value + multiply = 0.25 + } + } + } + hidden_effect = { + send_interface_toast = { + type = event_generic_good + title = travel_events_bp3.40.win + left_icon = root + right_icon = scope:challenger_character + + add_prestige = { + value = medium_prestige_gain + multiply = 0.5 + } + add_gold = { + value = medium_gold_value + multiply = 0.75 + } + hidden_effect = { + scope:challenger_character = { + add_prestige = { + value = medium_prestige_gain + multiply = 0.5 + } + add_gold = { + value = root.medium_gold_value + multiply = 0.25 + } + } + } + } + } + } + } + 50 = { + desc = travel_events_bp3.40.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -29 + } + root = { + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.40.lose + left_icon = root + + remove_short_term_gold = tiny_gold_value + + scope:challenger_character = { + stress_impact = { + base = minor_stress_gain + ambitious = minor_stress_gain + } + } + } + } + } + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = ambitious + has_trait = greedy + } + prowess <= 12 + } + } + } + + option = { + name = travel_events_bp3.40.c + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + } + + after = { + mp_resume_travel_plan = yes + scope:soldier_character = { + remove_character_flag = should_be_topless + remove_character_flag = no_hat + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.45 = { # The Wandering Knight + type = character_event + content_source = dlc_015 + title = travel_events_bp3.45.t + desc = travel_events_bp3.45.desc + + theme = travel + + override_background = { reference = market } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:knight_character + animation = debating + + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.45 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { has_holding_type = castle_holding } + has_government = feudal_government + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + create_character = { + template = wandering_knight_character + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_soldier_female_chance + location = root.location + save_scope_as = knight_character + + after_creation = { + add_character_flag = no_hat + add_character_flag = need_military_outfit + add_prestige = { integer_range = { min = 250 max = 1250 } } + add_piety = { integer_range = { min = 100 max = 500 } } + add_gold = { integer_range = { min = 25 max = 250 } } + } + } + + save_scope_value_as = { + name = piety_chance + value = { integer_range = { min = 10 max = 30 } } + } + + save_scope_value_as = { + name = prestige_chance + value = { integer_range = { min = 10 max = 30 } } + } + } + + option = { + name = travel_events_bp3.45.a + pay_short_term_gold = { + target = scope:knight_character + gold = { + value = tiny_gold_value + divide = 2 + min = 25 + } + } + + scope:knight_character = { + add_to_court_and_entourage_effect = yes + } + + stress_impact = { + paranoid = medium_stress_gain + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + + option = { + name = travel_events_bp3.45.b + flavor = travel_events_bp3.45.b.flavor + remove_short_term_gold = { + value = tiny_gold_value + max = 35 + } + random_list = { + 20 = { + desc = travel_events_bp3.45.diplomacy + modifier = { + add = { + value = 0 + subtract = root.diplomacy + } + } + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.45.diplomacy + left_icon = root + right_icon = scope:knight_character + + add_diplomacy_skill = 1 + } + } + 20 = { + desc = travel_events_bp3.45.prowess + modifier = { + add = { + value = 0 + subtract = root.prowess + } + } + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.45.prowess + left_icon = root + right_icon = scope:knight_character + + add_prowess_skill = 1 + } + } + 0 = { + desc = travel_events_bp3.45.piety + modifier = { + add = scope:piety_chance + } + + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.45.piety + left_icon = root + right_icon = scope:knight_character + + add_piety = minor_piety_gain + } + } + 0 = { + desc = travel_events_bp3.45.prestige + modifier = { + add = scope:prestige_chance + } + + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.45.prestige + left_icon = root + right_icon = scope:knight_character + + add_prestige = minor_prestige_gain + } + } + } + + stress_impact = { + gregarious = minor_stress_impact_loss + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + } + modifier = { + factor = 5 + has_trait = gregarious + } + } + } + + option = { + name = travel_events_bp3.45.c + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + scope:knight_character = { + remove_character_flag = no_hat + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.50 = { # A Band of Two + type = character_event + content_source = dlc_015 + title = travel_events_bp3.50.t + desc = travel_events_bp3.50.desc + + theme = travel + + override_background = { reference = alley_day } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:child_character + animation = happiness + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.50 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { has_holding_type = city_holding } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + create_character = { + template = peasant_child_character + age = { 6 10 } + culture = root.location.culture + faith = root.location.faith + location = root.location + + save_scope_as = child_character + + after_creation = { + create_story = story_cycle_pet_dog + } + } + } + + option = { + name = travel_events_bp3.50.a + + remove_short_term_gold = { + value = tiny_gold_value + divide = 2 + min = 2 + max = 7 + } + add_piety = minor_piety_gain + + add_character_modifier = { + modifier = kind_ruler_modifier + years = 5 + } + + if = { + limit = { + location.culture != culture + } + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 1 + desc = cultural_acceptance_gain_event + } + } + } + + stress_impact = { + generous = medium_stress_impact_loss + greedy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = generous + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { + name = travel_events_bp3.50.b + trigger = { + has_trait = compassionate + } + + add_character_modifier = { + modifier = kind_ruler_modifier + years = 5 + } + + stress_impact = { + compassionate = medium_stress_impact_loss + } + + scope:child_character = { + add_opinion = { + modifier = saviour_opinion + target = root + opinion = 100 + } + } + + show_as_tooltip = { add_courtier = scope:child_character } + hidden_effect = { + scope:child_character = { + add_to_court_and_entourage_effect = yes + remove_character_flag = peasant_outfit + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = compassionate + } + } + } + + option = { + name = travel_events_bp3.50.c + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + + show_as_tooltip = { + add_character_modifier = dog_story_modifier + } + create_story = story_cycle_pet_dog + add_character_modifier = { + modifier = heartless_modifier + years = 5 + } + scope:child_character = { + add_opinion = { + modifier = hate_opinion + target = root + opinion = -200 + } + } + hidden_effect = { + scope:child_character = { + random_owned_story = { + type = story_cycle_pet_dog + end_story = yes + } + } + } + + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = major_stress_gain + generous = medium_stress_gain + } + + ai_chance = { + base = 100 + + modifier = { + factor = 0 + OR = { + has_trait = generous + has_trait = compassionate + } + } + + modifier = { + factor = 5 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { + name = travel_events_bp3.50.d + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + scope:child_character = { + silent_disappearance_ai_effect = yes + } + } +} + +scripted_trigger republic_ruler_check_trigger = { + government_has_flag = government_is_republic + in_diplomatic_range = root + NOT = { is_allied_to = root } +} + +travel_events_bp3.55 = { # Traveling Traders + type = character_event + content_source = dlc_015 + title = travel_events_bp3.55.t + desc = travel_events_bp3.55.desc + + theme = travel + + override_background = { + trigger = { + location = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + } + } + reference = docks + } + + override_background = { + trigger = { + location = { + is_coastal = no + is_riverside_province = no + } + } + reference = market + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + animation = anger + } + + lower_right_portrait = scope:republic_ruler + + trigger = { + static_group_filter = { + group = travel_events_bp3.55 + match = 0.50 + } + is_ai = no + bp3_travel_event_default_trigger = yes + location = { has_holding_type = city_holding } + OR = { + any_independent_ruler = { + republic_ruler_check_trigger = yes + } + faith = { + any_faith_ruler = { + republic_ruler_check_trigger = yes + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + ordered_independent_ruler = { + order_by = current_military_strength + limit = { + republic_ruler_check_trigger = yes + } + position = 0 + save_scope_as = republic_ruler + } + if = { + limit = { + NOT = { exists = scope:republic_ruler } + } + faith = { + ordered_faith_ruler = { + order_by = current_military_strength + limit = { + republic_ruler_check_trigger = yes + } + position = 0 + save_scope_as = republic_ruler + } + } + } + create_character = { + template = merchant_template + faith = scope:republic_ruler.faith + culture = scope:republic_ruler.culture + gender = root + location = location + save_scope_as = merchant_character + + after_creation = { + add_prestige = { integer_range = { min = 25 max = 500 } } + add_piety = { integer_range = { min = 25 max = 250 } } + add_gold = { integer_range = { min = root.medium_gold_value max = root.major_gold_value } } + } + } + save_scope_value_as = { + name = price_for_alliance + value = { + value = scope:republic_ruler.current_military_strength + divide = 10 + } + } + } + + option = { + name = travel_events_bp3.55.a + flavor = travel_events_bp3.55.a.flavor + remove_short_term_gold = scope:price_for_alliance + create_alliance = scope:republic_ruler + custom_tooltip = travel_events_bp3.55.a.tt + scope:republic_ruler = { + add_opinion = { + modifier = event_negotiated_alliance_opinion + target = root + } + } + + stress_impact = { + generous = minor_stress_impact_loss + greedy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = generous + } + modifier = { + factor = 0 + has_trait = greedy + } + } + } + + option = { + name = travel_events_bp3.55.b + flavor = travel_events_bp3.55.b.flavor + duel = { + skill = stewardship + target = scope:merchant_character + + 50 = { + desc = travel_events_bp3.55.b.win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + send_interface_message = { + type = event_generic_good + title = travel_events_bp3.55.b.win + + scope:merchant_character = { + pay_short_term_gold = { + target = root + gold = root.medium_gold_value + } + } + scope:republic_ruler = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -25 + } + } + } + } + 50 = { + desc = travel_events_bp3.55.b.lose + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + send_interface_message = { + type = event_generic_bad + title = travel_events_bp3.55.b.lose + + pay_short_term_gold = { + target = scope:merchant_character + gold = root.minor_gold_value + } + scope:republic_ruler = { + add_opinion = { + modifier = disrespect_opinion + target = root + opinion = -15 + } + } + } + } + } + + stress_impact = { + generous = minor_stress_gain + greedy = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = greedy + } + modifier = { + factor = 0 + has_trait = generous + } + } + } + + option = { + name = travel_events_bp3.55.c + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 300 + } + } + + after = { + mp_resume_travel_plan = yes + hidden_effect = { + scope:merchant_character = { + set_employer = scope:republic_ruler + } + } + } +} + +travel_events_bp3.60 = { # A Small Deal + type = character_event + content_source = dlc_015 + title = travel_events_bp3.60.t + desc = travel_events_bp3.60.desc + + theme = travel + + override_background = { + trigger = { + location = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + } + } + reference = docks + } + + override_background = { + trigger = { + location = { + is_coastal = no + is_riverside_province = no + } + } + reference = market + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + animation = disbelief + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.60 + match = 0.50 + } + is_landed = yes + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = city_holding + this != root.capital_province + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + capital_province = { + set_variable = { + name = extra_building_resources + value = 3 + } + } + + create_character = { + template = merchant_template + faith = root.location.faith + culture = root.location.culture + gender = root + location = location + save_scope_as = merchant_character + + after_creation = { + add_prestige = { integer_range = { min = 25 max = 500 } } + add_piety = { integer_range = { min = 25 max = 250 } } + add_gold = { integer_range = { min = root.medium_gold_value max = root.major_gold_value } } + } + } + } + + option = { + name = travel_events_bp3.60.a + + remove_short_term_gold = { + value = minor_gold_value + min = 25 + max = 500 + } + + capital_province = { + add_province_modifier = travel_extra_building_resources_modifier + } + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.60.b + + remove_short_term_gold = { + value = tiny_gold_value + min = 10 + max = 250 + } + + add_character_modifier = { + modifier = travel_extra_building_resources_character_modifier + years = 5 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.60.c + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + hidden_effect = { + scope:merchant_character = { + silent_disappearance_ai_effect = yes + } + } + } +} + +travel_events_bp3.65 = { # Purse Pursuit + type = character_event + content_source = dlc_015 + title = travel_events_bp3.65.t + desc = travel_events_bp3.65.desc + + theme = travel + + override_background = market + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = shock + } + + right_portrait = { + character = scope:thief_character + animation = betting + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.65 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { has_holding_type = city_holding } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + create_character = { + random_traits = no + age = { 16 20 } + dynasty = none + faith = root.location.faith + culture = root.location.culture + location = root.location + random_traits_list = { + count = 1 + education_intrigue_3 = {} + education_intrigue_4 = {} + } + random_traits_list = { + count = 3 + brave = {} + ambitious = {} + stubborn = {} + vengeful = {} + arrogant = {} + deceitful = {} + stubborn = {} + callous = {} + } + intrigue = { + min_template_decent_skill + max_template_decent_skill + } + gender_female_chance = root_soldier_female_chance + save_scope_as = thief_character + + after_creation = { + add_gold = { integer_range = { min = 5 max = 75 } } + add_piety = { integer_range = { min = -100 max = -25 } } + } + } + + save_scope_value_as = { + name = gold_value + value = { + value = tiny_gold_value + divide = 2 + } + } + + remove_short_term_gold = scope:gold_value + } + + option = { + name = travel_events_bp3.65.a + + show_as_tooltip = { + add_courtier = scope:thief_character + } + + scope:thief_character = { + hidden_effect = { add_to_court_and_entourage_effect = yes } + + add_opinion = { + modifier = respect_opinion + target = root + opinion = 25 + } + } + + stress_impact = { + paranoid = major_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = paranoid + } + } + } + + option = { + name = travel_events_bp3.65.b + + add_dread = minor_dread_gain + + add_gold = { + value = scope:gold_value + add = scope:thief_character.gold + } + + scope:thief_character = { + death = { + death_reason = death_murder + killer = root + } + } + + stress_impact = { + wrathful = medium_stress_impact_loss + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + greedy = minor_stress_impact_loss + compassionate = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 5 + OR = { + has_trait = wrathful + has_trait = callous + has_trait = sadistic + has_trait = greedy + } + } + } + } + + option = { + name = travel_events_bp3.65.c + + add_gold = scope:gold_value + + stress_impact = { + base = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + wrathful = medium_stress_gain + vengeful = medium_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = wrathful + has_trait = vengeful + } + } + modifier = { + factor = 5 + OR = { + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:thief_character = { + silent_disappearance_ai_effect = yes + } + } +} + +travel_events_bp3.70 = { # Festival + type = character_event + content_source = dlc_015 + title = travel_events_bp3.70.t + desc = { + desc = travel_events_bp3.70.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:local_character + } + desc = travel_events_bp3.70.desc.local + } + triggered_desc = { + trigger = { + exists = scope:dancing_partner + } + desc = travel_events_bp3.70.desc.entourage + } + } + desc = travel_events_bp3.70.desc.outro + } + + theme = travel + + override_background = { reference = village_festival } + + cooldown = { years = 50 } + + left_portrait = { + character = root + animation = dancing + } + + right_portrait = { + character = scope:dancing_partner + animation = dancing + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.70 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = city_holding + culture != root.culture + } + NOT = { exists = var:special_culture } + prestige_level >= 4 + NOR = { + has_trait = shy + has_trait = paranoid + } + location.culture = { + NOT = { + any_parent_culture = { this = root.culture } + } + } + culture = { + NOR = { + any_parent_culture = { this = root.location.culture } + has_same_culture_heritage = root.location.culture + } + } + highest_held_title_tier < tier_empire + } + + immediate = { + save_scope_as = root_scope + mp_delay_travel_plan = { DAYS = 90 } + + current_travel_plan = { + random_entourage_character = { + limit = { + OR = { + is_spouse_of = root + is_child_of = root + } + } + save_scope_as = dancing_partner + } + } + + if = { + limit = { + NOT = { exists = scope:dancing_partner } + } + create_character = { + template = merchant_template + age = { 20 25 } + faith = root.location.faith + culture = root.location.culture + opposite_gender = root + location = location + save_scope_as = local_character + save_scope_as = dancing_partner + } + } + + set_variable = { + name = special_culture_tooltip + value = root.location.culture + } + } + + option = { + name = travel_events_bp3.70.a + + reason = prestige_level + + culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 5 + desc = cultural_acceptance_gain_event + } + } + + if = { + limit = { + has_dlc_feature = hybridize_culture + } + custom_tooltip = travel_events_bp3.70.a.cultural_acceptance + custom_tooltip = travel_events_bp3.70.a.counties + + set_variable = { + name = special_culture + value = root.location.culture + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.70.b + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + + remove_variable = special_culture_tooltip + } +} + +travel_events_bp3.75 = { # Dreams Brewing + type = character_event + content_source = dlc_015 + title = travel_events_bp3.75.t + desc = travel_events_bp3.75.desc + + theme = travel + + override_background = { reference = market } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = drink + } + + right_portrait = { + character = scope:brewmaster_character + animation = obsequious_bow + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.75 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + NOT = { has_trait = paranoid } + location = { + has_holding_type = church_holding + } + OR = { + root.culture = { has_cultural_parameter = allows_brewery } + root.faith = { + OR = { + this = faith:catholic + has_doctrine_parameter = allows_brewery + } + } + } + OR = { + any_sub_realm_barony = { + county.holder = root + title_province = { + has_holding_type = city_holding + NOT = { has_building_or_higher = breweries_01 } + } + root.culture = { has_cultural_parameter = allows_brewery } + } + any_sub_realm_barony = { + county.holder = root + title_province = { + has_holding_type = church_holding + NOT = { has_building_or_higher = breweries_01 } + } + root.faith = { + OR = { + has_doctrine_parameter = allows_brewery + this = faith:catholic + } + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + if = { + limit = { + culture = { has_cultural_parameter = allows_brewery } + } + random_sub_realm_barony = { + limit = { + county.holder = root + title_province = { + has_holding_type = city_holding + NOT = { has_building_or_higher = breweries_01 } + } + } + save_scope_as = target_barony + } + } + if = { + limit = { + NOT = { exists = scope:barony } + faith = { + OR = { + has_doctrine_parameter = allows_brewery + this = faith:catholic + } + } + } + random_sub_realm_barony = { + limit = { + county.holder = root + title_province = { + has_holding_type = church_holding + NOT = { has_building_or_higher = breweries_01 } + } + } + save_scope_as = target_barony + } + } + if = { + limit = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + faith = { + OR = { + this = faith:catholic + has_doctrine_parameter = allows_brewery + } + } + } + create_character = { + template = monk_brewer_template + culture = root.location.culture + location = root.location + + save_scope_as = brewmaster_character + } + } + else = { + create_character = { + template = merchant_template + age = { 18 28 } + culture = root.location.culture + faith = root.faith + gender_female_chance = root_faith_clergy_gender_female_chance + + random_traits_list = { + count = 1 + diligent = {} + patient = {} + } + + random_traits_list = { + count = 2 + humble = {} + content = {} + gluttonous = {} + chaste = {} + generous = {} + calm = {} + deceitful = {} + honest = {} + craven = {} + gregarious = {} + arbitrary = {} + just = {} + zealous = {} + trusting = {} + } + + location = root.location + + save_scope_as = brewmaster_character + } + } + } + + option = { + name = travel_events_bp3.75.a + + remove_treasury_or_gold = tiny_treasury_or_gold_value + + scope:target_barony.title_province = { + add_building = breweries_01 + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.75.b + + remove_short_term_gold = minor_gold_value + + scope:target_barony.title_province = { + add_building = breweries_01 + } + + scope:brewmaster_character = { + show_as_tooltip = { set_employer = root } + hidden_effect = { add_to_court_and_entourage_effect = yes } + } + + show_as_tooltip = { + appoint_court_position = { + recipient = scope:brewmaster_character + court_position = court_brewmaster_court_position + } + custom_tooltip = will_have_excellent_aptitude + } + + hidden_effect = { + if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + NOT = { employs_court_position = court_brewmaster_court_position } + } + appoint_court_position = { + recipient = scope:brewmaster_character + court_position = court_brewmaster_court_position + } + } + else_if = { + limit = { + is_valid_to_hire_court_position_type = court_brewmaster_court_position + employs_court_position = court_brewmaster_court_position + } + add_character_flag = temporary_court_position_cost_removal + replace_court_position = { + recipient = scope:brewmaster_character + holder = court_position:court_brewmaster_court_position + court_position = court_brewmaster_court_position + } + remove_character_flag = temporary_court_position_cost_removal + } + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.75.c + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + stress_impact = { + drunkard = medium_stress_impact_loss + } + if = { + limit = { + scope:brewmaster_character.liege != root + } + scope:brewmaster_character = { silent_disappearance_ai_effect = yes } + } + } +} + +scripted_trigger travel_events_monk_child_trigger = { + is_heir_of = root + NOT = { is_primary_heir_of = root } + age > 10 + age <= 25 + is_married = no + OR = { + has_trait = chaste + has_trait = temperate + has_trait = lazy + has_trait = humble + has_trait = diligent + has_trait = calm + has_trait = patient + has_trait = honest + has_trait = craven + has_trait = content + has_trait = zealous + has_trait = compassionate + has_trait = forgiving + has_trait = education_learning + ai_zeal >= 0 + } + NOR = { + has_trait = ambitious + has_trait = cynical + } +} + +travel_events_bp3.80 = { # A Life of Service + type = character_event + content_source = dlc_015 + title = travel_events_bp3.80.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + exists = scope:grandmaster + } + desc = travel_events_bp3.80.desc.holy_order + } + triggered_desc = { + trigger = { + scope:monk_character = { + is_adult = yes + } + } + desc = travel_events_bp3.80.desc.adult + } + triggered_desc = { + trigger = { + scope:monk_character = { + is_adult = no + } + } + desc = travel_events_bp3.80.desc.child + } + } + } + + theme = travel + + override_background = { reference = temple } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:monk_character + animation = debating + } + + lower_right_portrait = scope:grandmaster + lower_left_portrait = { + trigger = { + NOT = { exists = scope:grandmaster } + } + character = root.location.barony.holder + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.80 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = church_holding + faith = root.faith + } + current_travel_plan = { + any_entourage_character = { + travel_events_monk_child_trigger = yes + save_temporary_scope_as = monk_character_temp + } + } + faith = { + OR = { + has_doctrine_parameter = take_vows_active + AND = { + any_faith_holy_order = { } + scope:monk_character_temp = { + is_adult = yes + OR = { + has_trait = education_martial + prowess > 10 + } + } + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + travel_events_monk_child_trigger = yes + } + save_scope_as = monk_character + } + } + if = { + limit = { + scope:monk_character = { + is_adult = yes + OR = { + has_trait = education_martial + prowess > 10 + } + } + } + faith = { + random_faith_holy_order = { + leader = { save_scope_as = grandmaster } + } + } + } + } + + option = { + name = travel_events_bp3.80.a + + scope:monk_character = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 25 + } + } + + if = { + limit = { + exists = scope:grandmaster + } + save_scope_as = actor + scope:monk_character = { + save_scope_as = recipient + send_child_to_holy_order_effect = { GRANDMASTER = grandmaster } + } + } + else = { + scope:monk_character = { + simplified_clergy_effect = { RECIPIENT = scope:monk_character } + } + if = { + limit = { + scope:monk_character = { is_adult = yes } + } + root.location.barony.holder = { + add_courtier = scope:monk_character + } + } + } + + stress_impact = { + zealous = medium_stress_impact_loss + content = minor_stress_impact_loss + cynical = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = cynical + } + modifier = { + factor = 5 + OR = { + has_trait = zealous + has_trait = content + } + } + } + } + + option = { + name = travel_events_bp3.80.b + + scope:monk_character = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -10 + } + } + + stress_impact = { + zealous = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +travel_events_bp3.85 = { # Brewers of Fame + type = character_event + content_source = dlc_015 + title = travel_events_bp3.85.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + root.location = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + has_holding_type = church_holding + } + } + desc = travel_events_bp3.85.desc.monk + } + triggered_desc = { + trigger = { + root.location = { + NAND = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + has_holding_type = church_holding + } + } + } + desc = travel_events_bp3.85.desc + } + } + desc = travel_events_bp3.85.desc.outro + } + + theme = travel + + override_background = { reference = tavern } + + cooldown = { years = 20 } + + left_portrait = { + character = root + animation = drink + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.85 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_building_or_higher = breweries_01 + county.holder = { + NOR = { + this = root + any_liege_or_above = { + this = root + } + } + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + if = { + limit = { + any_held_title = { + title_tier = county + has_variable = brewery_counter_var + } + } + ordered_sub_realm_county = { + order_by = { + value = 10000 + subtract = var:brewery_counter_var + } + limit = { + has_variable = brewery_counter_var + } + position = 0 + save_scope_as = brewery_county + } + } + } + + option = { + name = travel_events_bp3.85.a + trigger = { + exists = scope:brewery_county + brewery_counter_value > 25 + } + + reason = brewery + + custom_tooltip = travel_events_bp3.85.a.tt + + add_prestige = { + value = brewery_counter_value + divide = 25 + floor = yes + multiply = 50 + min = 50 + max = 500 + } + + dynasty = { + add_dynasty_prestige = { + value = brewery_counter_value + divide = 25 + floor = yes + multiply = 5 + min = 5 + max = 50 + } + } + + stress_impact = { + arrogant = minor_stress_impact_loss + humble = minor_stress_gain + } + + ai_chance = { + base = 0 + } + } + + option = { + name = travel_events_bp3.85.b + + remove_short_term_gold = minor_gold_value + + add_character_modifier = { + modifier = popular_beer_character_modifier + years = 5 + } + + stress_impact = { + greedy = minor_stress_gain + generous = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + modifier = { + factor = 5 + has_trait = generous + } + } + } + + option = { + name = travel_events_bp3.85.c + + stress_impact = { + base = minor_stress_impact_loss + content = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = content + } + } + } + + after = { + mp_resume_travel_plan = yes + stress_impact = { + drunkard = minor_stress_impact_loss + } + } +} + +travel_events_bp3.90 = { # Patron of the + type = character_event + content_source = dlc_015 + title = travel_events_bp3.90.t + desc = travel_events_bp3.90.desc + + theme = travel + + override_background = { reference = temple } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:priest_character + animation = obsequious_bow + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.90 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = church_holding + faith = root.faith + county.holder.top_liege = root.top_liege + } + NOR = { + has_character_modifier = church_investment_modifier + has_character_modifier = church_investment_cost_modifier + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + create_character = { + template = simple_priest_character_template + culture = root.location.culture + faith = root.location.faith + gender_female_chance = root_faith_clergy_gender_female_chance + employer = root.location.barony.holder + + save_scope_as = priest_character + } + set_variable = { + name = church_investment_year_var + value = { + value = current_year + subtract = 5 + } + } + save_scope_value_as = { + name = investment_cost + value = { + value = tiny_gold_value + divide = 10 + min = 2 + floor = yes + multiply = 10 + max = 100 + } + } + } + + option = { + name = travel_events_bp3.90.a + flavor = travel_events_bp3.90.a.flavor + + add_character_modifier = church_investment_modifier + add_character_modifier = church_investment_cost_modifier + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.90.b + + remove_short_term_gold = scope:investment_cost + add_piety = { + value = scope:investment_cost + multiply = 2 + } + + ai_chance = { + base = 100 + } + } + + option = { + name = travel_events_bp3.90.c + + current_travel_plan ?= { + add_destination_progress = { days = 2 } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + scope:priest_character ?= { silent_disappearance_ai_effect = yes } + } +} + +scripted_trigger unvisited_holy_site_trigger = { + root = { + OR = { + NOT = { has_variable_list = visited_unique_holy_sites_list } + AND = { + has_variable_list = visited_unique_holy_sites_list + NOT = { + is_target_in_variable_list = { + name = visited_unique_holy_sites_list + target = prev + } + } + } + } + } +} + +travel_events_bp3.95 = { # A Pilgrim's Tale + type = character_event + content_source = dlc_015 + title = travel_events_bp3.95.t + desc = travel_events_bp3.95.desc + + theme = travel + + override_background = { reference = temple } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:pilgrim_character + hide_info = yes + animation = storyteller + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.95 + match = 0.50 + } + is_ai = no + bp3_travel_event_default_trigger = yes + location = { + has_holding_type = church_holding + faith = root.faith + barony = { is_holy_site = no } + } + faith = { + NOT = { has_doctrine = doctrine_pilgrimage_forbidden } + any_holy_site = { + unvisited_holy_site_trigger = yes + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + faith = { + random_holy_site = { + limit = { + unvisited_holy_site_trigger = yes + } + save_scope_as = unvisited_holy_site + } + } + create_character = { + template = merchant_template + faith = root.faith + culture = root.location.culture + gender = root + location = root.location + save_scope_as = pilgrim_character + + after_creation = { + add_piety = { integer_range = { min = 25 max = 250 } } + } + } + } + + option = { + name = travel_events_bp3.95.a + flavor = travel_events_bp3.95.a.flavor + + if = { + limit = { + has_lifestyle = wanderer_lifestyle + } + custom_tooltip = travel_events_bp3.95.a.tt.wanderer + } + else = { + custom_tooltip = travel_events_bp3.95.a.tt + } + + remove_short_term_gold = tiny_gold_value + + add_to_variable_list = { + name = holy_site_dreams + target = scope:unvisited_holy_site + } + + stress_impact = { + zealous = minor_stress_impact_loss + } + } + + option = { + name = travel_events_bp3.95.b + + stress_impact = { + base = minor_stress_impact_loss + } + } + + after = { + mp_resume_travel_plan = yes + scope:pilgrim_character = { silent_disappearance_ai_effect = yes } + } +} + +scripted_trigger bp3_good_relations_trigger = { + is_adult = yes + likes_character_trigger = { CHARACTER = root } + OR = { + is_close_family_of = root + is_spouse_of = root + has_important_relationship_with_character_trigger = { CHARACTER = root } + } +} + +travel_events_bp3.100 = { # Land of Milk and... Fish? + type = character_event + content_source = dlc_015 + title = travel_events_bp3.100.t + desc = travel_events_bp3.100.desc + + theme = travel + + override_background = { + trigger = { + location = { is_coastal = yes } + } + reference = bp3_coast + } + + override_background = { + trigger = { + location = { is_riverside_province = yes } + } + reference = bp3_riverside + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:friend_character + animation = happiness + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.100 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { + OR = { + is_coastal = yes + is_riverside_province = yes + } + } + current_travel_plan = { + any_entourage_character = { + bp3_good_relations_trigger = yes + } + } + OR = { + current_season_spring = yes + current_season_summer = yes + current_season_autumn = yes + current_season_dry_season = yes + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + bp3_good_relations_trigger = yes + } + weight = { + base = 1 + modifier = { + factor = 5 + OR = { + is_spouse_of = root + is_close_family_of = root + } + } + } + save_scope_as = friend_character + } + } + } + + option = { + name = travel_events_bp3.100.a + flavor = travel_events_bp3.100.a.flavor + + progress_towards_friend_effect = { + REASON = friend_fishing_trip + CHARACTER = scope:friend_character + OPINION = default_friend_opinion + } + + domicile ?= { change_provisions = miniscule_provisions_gain } + + stress_impact = { + base = minor_stress_impact_loss + content = minor_stress_impact_loss + lazy = minor_stress_impact_loss + patient = minor_stress_impact_loss + + } + + current_travel_plan ?= { + delay_travel_plan = { days = 3 } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = lazy + has_trait = content + has_trait = patient + } + } + } + } + + option = { + name = travel_events_bp3.100.b + flavor = travel_events_bp3.100.b.flavor + + domicile ?= { change_provisions = minor_provisions_gain } + + stress_impact = { + base = medium_stress_impact_loss + content = minor_stress_impact_loss + lazy = minor_stress_impact_loss + } + + current_travel_plan ?= { + delay_travel_plan = { days = 10 } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = lazy + has_trait = content + } + } + } + } + + option = { + name = travel_events_bp3.100.c + + current_travel_plan ?= { + add_destination_progress = { days = 3 } + } + + stress_impact = { + diligent = minor_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = diligent + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +scripted_effect bp3_skill_learning_duel_effect = { + root = { + duel = { + skill = $SKILL$ + value = 15 + 60 = { + desc = bp3_skill_travel_skill_learn_win + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -59 + } + send_interface_message = { + type = event_generic_good + title = bp3_skill_travel_skill_learn_win + + left_icon = root + right_icon = scope:lifestyle_character + + add_trait = $TRAIT$ + } + } + 40 = { + desc = bp3_skill_travel_skill_learn_fail + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -39 + } + send_interface_message = { + type = event_generic_bad + title = bp3_skill_travel_skill_learn_fail + + left_icon = root + right_icon = scope:lifestyle_character + + stress_impact = { + base = minor_stress_gain + } + } + } + } + } +} + +scripted_trigger bp3_lifestyle_trait_trigger = { + OR = { + has_trait = lifestyle_reveler + has_trait = lifestyle_blademaster + has_trait = lifestyle_hunter + has_trait = lifestyle_mystic + has_trait = lifestyle_physician + has_trait = lifestyle_herbalist + has_trait = lifestyle_gardener + } +} + +travel_events_bp3.105 = { # A Woman/Man of Unusual Skills + type = character_event + content_source = dlc_015 + title = travel_events_bp3.105.t + desc = { + desc = travel_events_bp3.105.desc + first_valid = { + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_reveler } + } + desc = travel_events_bp3.105.desc.reveler + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_blademaster } + } + desc = travel_events_bp3.105.desc.blademaster + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_hunter } + } + desc = travel_events_bp3.105.desc.hunter + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_mystic } + } + desc = travel_events_bp3.105.desc.mystic + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_physician } + } + desc = travel_events_bp3.105.desc.physician + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_herbalist } + } + desc = travel_events_bp3.105.desc.herbalist + } + triggered_desc = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_gardener } + } + desc = travel_events_bp3.105.desc.gardener + } + } + } + + theme = travel + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_reveler } + } + reference = ep3_campfire + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_blademaster } + } + reference = ep3_campfire + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_hunter } + } + reference = terrain_travel + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_mystic } + } + reference = terrain_travel + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_physician } + } + reference = market + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_herbalist } + } + reference = terrain_travel + } + + override_background = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_gardener } + } + reference = garden + } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:lifestyle_character + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_reveler } + } + animation = toast + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_blademaster } + } + animation = inspect_weapon + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_hunter } + } + animation = bow_idle + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_mystic } + } + animation = happy_teacher + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_physician } + } + animation = physician + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_herbalist } + } + animation = storyteller + } + + triggered_animation = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_gardener } + } + animation = survey + } + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.105 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + bp3_lifestyle_trait_trigger = no + current_travel_plan = { + any_entourage_character = { + bp3_lifestyle_trait_trigger = yes + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + + current_travel_plan = { + random_entourage_character = { + limit = { + bp3_lifestyle_trait_trigger = yes + } + save_scope_as = lifestyle_character + } + } + } + + option = { + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_reveler } + } + text = travel_events_bp3.105.a.reveler + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_blademaster } + } + text = travel_events_bp3.105.a.blademaster + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_hunter } + } + text = travel_events_bp3.105.a.hunter + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_mystic } + } + text = travel_events_bp3.105.a.mystic + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_physician } + } + text = travel_events_bp3.105.a.physician + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_herbalist } + } + text = travel_events_bp3.105.a.herbalist + } + name = { + trigger = { + scope:lifestyle_character = { has_trait = lifestyle_gardener } + } + text = travel_events_bp3.105.a.gardener + } + + scope:lifestyle_character = { + switch = { + trigger = has_trait + lifestyle_reveler = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_reveler + SKILL = diplomacy + } + root = { + stress_impact = { + drunkard = minor_stress_impact_loss + content = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + } + } + lifestyle_blademaster = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_blademaster + SKILL = prowess + } + root = { + stress_impact = { + brave = minor_stress_impact_loss + diligent = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + } + } + } + lifestyle_hunter = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_hunter + SKILL = prowess + } + root = { + stress_impact = { + brave = minor_stress_impact_loss + greedy = minor_stress_impact_loss + ambitious = minor_stress_impact_loss + } + } + } + lifestyle_mystic = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_mystic + SKILL = learning + } + root = { + stress_impact = { + patient = minor_stress_impact_loss + eccentric = minor_stress_impact_loss + cynical = minor_stress_impact_loss + } + } + } + lifestyle_physician = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_physician + SKILL = learning + } + root = { + stress_impact = { + patient = minor_stress_impact_loss + compassionate = minor_stress_impact_loss + humble = minor_stress_impact_loss + } + } + } + lifestyle_herbalist = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_herbalist + SKILL = learning + } + root = { + stress_impact = { + patient = minor_stress_impact_loss + calm = minor_stress_impact_loss + content = minor_stress_impact_loss + } + } + } + lifestyle_gardener = { + bp3_skill_learning_duel_effect = { + TRAIT = lifestyle_gardener + SKILL = stewardship + } + root = { + stress_impact = { + patient = minor_stress_impact_loss + calm = minor_stress_impact_loss + diligent = minor_stress_impact_loss + } + } + } + } + } + + ai_chance = { + base = 100 + + modifier = { + factor = 5 + scope:lifestyle_character = { + switch = { + trigger = has_trait + lifestyle_reveler = { + root = { + OR = { + has_trait = drunkard + has_trait = content + has_trait = gregarious + } + } + } + lifestyle_blademaster = { + root = { + OR = { + has_trait = brave + has_trait = diligent + has_trait = ambitious + } + } + } + lifestyle_hunter = { + root = { + OR = { + has_trait = brave + has_trait = greedy + has_trait = ambitious + } + } + } + lifestyle_mystic = { + root = { + OR = { + has_trait = patient + has_trait = eccentric + has_trait = cynical + } + } + } + lifestyle_physician = { + root = { + OR = { + has_trait = patient + has_trait = compassionate + has_trait = humble + } + } + } + lifestyle_herbalist = { + root = { + OR = { + has_trait = patient + has_trait = calm + has_trait = content + } + } + } + lifestyle_gardener = { + root = { + OR = { + has_trait = patient + has_trait = calm + has_trait = diligent + } + } + } + } + } + } + } + } + + option = { + name = travel_events_bp3.105.b + + scope:lifestyle_character = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 15 + } + } + + ai_chance = { + base = 100 + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +travel_events_bp3.110 = { # Heart-to-Heart + type = character_event + content_source = dlc_015 + title = travel_events_bp3.110.t + desc = { + desc = travel_events_bp3.110.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:negative_memory + } + desc = travel_events_bp3.110.desc.negative_memory + } + desc = travel_events_bp3.110.desc.fallback + } + desc = travel_events_bp3.110.desc.outro + } + + theme = travel + + override_background = { reference = ep3_campfire } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = stress + } + + right_portrait = { + character = scope:friend_character + animation = thinking + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.110 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + stress >= 50 + NOR = { + has_trait = paranoid + has_trait = shy + } + current_travel_plan = { + any_entourage_character = { + is_adult = yes + bp3_good_relations_trigger = yes + } + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + random_entourage_character = { + limit = { + is_adult = yes + bp3_good_relations_trigger = yes + } + save_scope_as = friend_character + } + } + random_memory = { + limit = { + has_memory_category = negative + } + save_scope_as = negative_memory + } + } + + option = { + name = travel_events_bp3.110.a + flavor = travel_events_bp3.110.a.flavor + + progress_towards_friend_effect = { + REASON = friend_opened_up + CHARACTER = scope:friend_character + OPINION = default_friend_opinion + } + + stress_impact = { + base = medium_stress_impact_loss + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = gregarious + has_trait = compassionate + } + } + } + } + + option = { + name = travel_events_bp3.110.b + flavor = travel_events_bp3.110.b.flavor + + stress_impact = { + base = major_stress_impact_loss + } + + ai_chance = { + base = 200 + modifier = { + factor = 5 + has_trait = arrogant + } + } + } + + after = { + mp_resume_travel_plan = yes + } +} + +scripted_effect travel_entourage_bp3_effect = { + if = { + limit = { + exists = var:saved_character_number + } + switch = { + trigger = var:saved_character_number + 1 = { prev = { save_scope_as = character_number_1 } } + 2 = { prev = { save_scope_as = character_number_2 } } + 3 = { prev = { save_scope_as = character_number_3 } } + } + change_variable = { name = saved_character_number add = 1 } + } +} + +scripted_effect campfire_friendliness_effect = { + scope:character_number_1 ?= { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = $VALUE$ + } + } + scope:character_number_2 ?= { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = $VALUE$ + } + } + scope:character_number_3 ?= { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = $VALUE$ + } + } +} + +scripted_trigger travel_bp3_relevant_character_trigger = { + likes_character_trigger = { CHARACTER = root } + is_adult = yes + OR = { + is_knight_of = root + is_councillor_of = root + has_any_court_position = yes + is_spouse_of = root + is_close_family_of = root + has_important_relationship_with_character_trigger = { CHARACTER = root } + } +} + +travel_events_bp3.115 = { # Night by the Campfire + type = character_event + content_source = dlc_015 + title = travel_events_bp3.115.t + desc = { + desc = travel_events_bp3.115.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = scope:character_number_3 + } + desc = travel_events_bp3.115.desc.3_characters + } + triggered_desc = { + trigger = { + exists = scope:character_number_2 + } + desc = travel_events_bp3.115.desc.2_characters + } + desc = travel_events_bp3.115.desc.1_character + } + desc = travel_events_bp3.115.desc.outro + } + + theme = travel + + override_background = { reference = ep3_campfire } + + cooldown = { years = 10 } + + left_portrait = { + character = root + animation = laugh + } + + right_portrait = { + character = scope:character_number_1 + animation = storyteller + } + + lower_left_portrait = scope:character_number_2 + lower_right_portrait = scope:character_number_3 + + trigger = { + static_group_filter = { + group = travel_events_bp3.115 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + current_travel_plan = { + any_entourage_character = { + count >= 1 + travel_bp3_relevant_character_trigger = yes + } + } + } + + immediate = { + set_variable = { + name = saved_character_number + value = 1 + } + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan = { + ordered_entourage_character = { + order_by = { + value = "opinion(root)" + if = { + limit = { + is_knight_of = root + } + subtract = 50 + } + if = { + limit = { + OR = { + is_spouse_of = root + is_close_family_of = root + } + } + add = 25 + } + } + limit = { travel_bp3_relevant_character_trigger = yes } + max = 3 + check_range_bounds = no + root = { travel_entourage_bp3_effect = yes } + } + } + } + + option = { + name = travel_events_bp3.115.a + + campfire_friendliness_effect = { VALUE = 5 } + + stress_impact = { + gregarious = minor_stress_impact_loss + honest = minor_stress_impact_loss + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = gregarious + has_trait = honest + } + } + modifier = { + factor = 0 + has_trait = shy + } + } + } + + option = { + name = travel_events_bp3.115.b + + duel = { + skills = { diplomacy intrigue } + value = 20 + 50 = { + desc = travel_events_bp3.115.b.impressed + compare_modifier = { + value = scope:duel_value + multiplier = 1.5 + min = -49 + } + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.115.b.impressed + left_icon = root + right_icon = scope:character_number_1 + + campfire_friendliness_effect = { VALUE = 15 } + } + } + 50 = { + desc = travel_events_bp3.115.b.unimpressed + compare_modifier = { + value = scope:duel_value + multiplier = -1.5 + min = -49 + } + send_interface_toast = { + type = event_generic_bad + title = travel_events_bp3.115.b.unimpressed + left_icon = root + right_icon = scope:character_number_1 + + campfire_friendliness_effect = { VALUE = 2 } + } + } + } + + stress_impact = { + deceitful = minor_stress_impact_loss + honest = minor_stress_gain + shy = minor_stress_gain + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = deceitful + } + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = honest + } + } + } + } + + option = { + name = travel_events_bp3.115.c + + progress_towards_friend_effect = { + REASON = friend_story_by_fire_corresponding + CHARACTER = scope:character_number_1 + OPINION = default_friend_opinion + } + + stress_impact = { + base = minor_stress_impact_loss + } + + ai_chance = { + base = 300 + } + } + + after = { + mp_resume_travel_plan = yes + remove_variable = saved_character_number + } +} + +travel_events_bp3.120 = { # The Wrecked Boat + type = character_event + content_source = dlc_015 + title = travel_events_bp3.120.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + location = { is_coastal = yes } + } + desc = travel_events_bp3.120.desc.intro.coast + } + desc = travel_events_bp3.120.desc.intro.river + } + desc = travel_events_bp3.120.desc + } + + theme = travel + + override_background = { + trigger = { + location = { is_coastal = yes } + } + reference = bp3_coast + } + + override_background = { + reference = bp3_riverside + } + + cooldown = { years = 20 } + + left_portrait = { + character = root + animation = thinking + } + + right_portrait = { + character = scope:merchant_character + animation = severelywounded + } + + trigger = { + static_group_filter = { + group = travel_events_bp3.120 + match = 0.50 + } + bp3_travel_event_default_trigger = yes + location = { is_riverside_province = yes } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + create_character = { + template = merchant_template + location = root.location + faith = root.location.faith + culture = root.location.culture + + after_creation = { + add_gold = { + integer_range = { + min = root.minor_gold_value + max = root.medium_gold_value + } + } + } + + save_scope_as = merchant_character + } + location = { + random_neighboring_province = { + limit = { + is_river_province = yes + } + save_scope_as = river_province + } + } + } + + option = { + name = travel_events_bp3.120.a + + stress_impact = { + base = minor_stress_impact_loss + compassionate = medium_stress_impact_loss + generous = minor_stress_impact_loss + } + + current_travel_plan ?= { delay_travel_plan = { days = 5 } } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = compassionate + has_trait = generous + } + } + } + } + + option = { + name = travel_events_bp3.120.b + + scope:merchant_character = { + pay_short_term_gold = { + target = root + gold = { + value = scope:merchant_character.gold + divide = 2 + } + } + } + + current_travel_plan ?= { delay_travel_plan = { days = 5 } } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + has_trait = greedy + } + } + } + + option = { + name = travel_events_bp3.120.c + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + + add_dread = minor_dread_gain + add_gold = scope:merchant_character.gold + + scope:merchant_character = { + death = { + death_reason = death_murder + killer = root + } + } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = callous + has_trait = sadistic + } + } + } + } + + option = { + name = travel_events_bp3.120.d + + current_travel_plan ?= { add_destination_progress = { days = 3 } } + + ai_chance = { + base = 100 + modifier = { + factor = 5 + OR = { + has_trait = diligent + has_trait = ambitious + } + } + } + } + + after = { + mp_resume_travel_plan = yes + scope:merchant_character = { silent_disappearance_ai_effect = yes } + } +} diff --git a/N3OW/events/travel_events/travel_events_james.txt b/N3OW/events/travel_events/travel_events_james.txt new file mode 100644 index 00000000..d419903a --- /dev/null +++ b/N3OW/events/travel_events/travel_events_james.txt @@ -0,0 +1,7423 @@ +#Generic travel events + +namespace = travel_events + +############################ +## Travel Flavor Events +## 4000-4999 +## by James Beaumont +############################ +# travel_events.4000 # Encounter a mystic on the road +# travel_events.4001 # Encounter an adoring fan +# travel_events.4002 # You determine that the women/men of X region are real pretty +# travel_events.4003 # You encounter vikings at sea +# travel_events.4004 # Fishermen at sea! +# travel_events.4005 # Encounter a caravan of merchants at sea +# travel_events.4006 # A local bird lands on your boat and eats some supplies +# travel_events.4007 # A storm at sea +# travel_events.4008 # Shipwreck! +# travel_events.4012 # You are being followed by a feral child +# travel_events.4015 # Asking for directions from a diff. language character +# travel_events.4016 # You experience heatstroke +# travel_events.4017 # Swords for hire! +# travel_events.4018 # A mendicant preacher! +# travel_events.4019 # You pass by a peasant street food place, demand to sample some +# travel_events.4020 # Strong believers harass your caravan and demand payment +# travel_events.4021 # You witness a human sacrifice! +# travel_events.4022 # You witness some tree worship in a Sanctity of Nature province +# travel_events.4023 # Prester John! You find a same-religion ruler in a faraway land +# travel_events.4028 # You come across a runestone! +# travel_events.4029 # You come across dimwit strung up on a post +# travel_events.4031 # You come across a knight stuck in his armour +# travel_events.4032 # You come across a noble being assaulted by a random animal +# travel_events.4033 # A witch who strangely isn't being burned +# travel_events.4035 # You are a witch and you're being harassed by locals +# travel_events.4036 # Caravaneers want to sell you some cool stuff +# travel_events.4037 # You enter a place that is syncretic with your faith +# travel_events.4038 # You enter a province which your faith is syncretic with +# travel_events.4039 # You enter a ritual hospitality province and are offered a rest +# travel_events.4040 # You meet a xenophile character who wants to learn about your culture + +##################################################################################### + +############################ +## Travel Flavor Events +## 4000-4999 +## by James Beaumont +############################ + +# Encounter a mystic on the road +travel_events.4000 = { + type = character_event + title = travel_events.4000.t + desc = { + desc = travel_events.4000.desc.intro + desc = travel_events.4000.desc.mid.long_to_go + desc = travel_events.4000.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:mystic_scope + animation = scheme + } + cooldown = { years = 30 } + trigger = { + static_group_filter = { + group = travel_events.4000 + match = 0.25 + } + is_available_travelling_adult = yes + is_playable_character = yes + is_travelling = yes + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = default_mystic_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = mystic_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:mystic_scope = { + random_list = { + 50 = {} + 50 = { add_trait = witch } + } + } + } + } + #Get a mystical reading + option = { + name = travel_events.4000.a + remove_short_term_gold = tiny_gold_value + random_list = { + 50 = { + send_interface_toast = { + title = travel.good_reading + left_icon = root + if = { + limit = { + NOT = { has_trait = cynical } + } + add_stress = minor_stress_loss + } + add_character_modifier = { + modifier = positive_roadside_reading_modifier + years = 5 + } + } + } + 50 = { + send_interface_toast = { + title = travel.bad_reading + left_icon = root + add_character_modifier = { + modifier = negative_roadside_reading_modifier + years = 5 + } + } + } + } + stress_impact = { + greedy = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + #They can join us + option = { + trigger = { + OR = { + root.faith = { + NOR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + } + is_witch_trigger = yes + root.faith = { trait_is_virtue = lifestyle_mystic } + NOT = { scope:mystic_scope = { has_trait = witch } } + } + NOR = { + has_trait = zealous + has_trait = wrathful + has_trait = sadistic + has_trait = callous + } + } + name = travel_events.4000.b + add_courtier = scope:mystic_scope + root.current_travel_plan = { + add_companion = scope:mystic_scope + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + stress_impact = { + lifestyle_mystic = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + modifier = { + add = 10 + has_trait = lifestyle_mystic + } + modifier = { + add = -50 + faith = { + OR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + OR = { + NOT = { trait_is_virtue = lifestyle_mystic } + scope:mystic_scope = { has_trait = witch } + } + } + has_trait = zealous + } + modifier = { + add = -50 + OR = { + has_trait = paranoid + has_trait = cynical + } + } + } + } + #Pass them by + option = { + name = travel_events.4000.c + stress_impact = { + paranoid = minor_stress_impact_gain + zealous = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + #Have them burned as a witch! + option = { + name = travel_events.4000.d + trigger = { + root.faith = { + OR = { + has_doctrine_parameter = witchcraft_illegal + has_doctrine_parameter = witchcraft_shunned + } + } + NOT = { is_witch_trigger = yes } + OR = { + NOT = { + root.faith = { trait_is_virtue = lifestyle_mystic } + } + scope:mystic_scope = { has_trait = witch } + } + OR = { + has_trait = zealous + has_trait = wrathful + has_trait = sadistic + has_trait = callous + } + } + scope:mystic_scope = { + death = { + killer = root + death_reason = death_burned_witch + } + } + add_piety = minor_piety_gain + add_dread = minor_dread_gain + stress_impact = { + base = minor_stress_impact_gain + sadistic = medium_stress_impact_loss + zealous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + + after = { + scope:mystic_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Encounter an adoring fan +travel_events.4001 = { + type = character_event + title = travel_events.4001.t + desc = travel_events.4001.desc + theme = travel + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:loyal_fan_scope + animation = admiration + } + cooldown = { years = 50 } + trigger = { + static_group_filter = { + group = travel_events.4001 + match = 0.25 + } + NOR = { + religion = { is_in_family = rf_eastern } + religion = { is_in_family = rf_sinitic } + } + is_available_travelling = yes # Even children were viewed to have been chosen by God and all that + is_landed = yes + is_location_valid_for_travel_event_on_land = yes + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small } + create_character = { + template = loyal_fan_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = loyal_fan_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:loyal_fan_scope = { + add_opinion = { + modifier = loyalty_opinion + years = 50 + target = root + opinion = 100 + } + } + } + } + #Join us, friend! + option = { + name = travel_events.4001.a + add_courtier = scope:loyal_fan_scope + root.current_travel_plan = { + add_companion = scope:loyal_fan_scope + } + stress_impact = { + arrogant = minor_stress_impact_loss + paranoid = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = shy + } + } + } + } + #Pay them to sod off + option = { + name = travel_events.4001.b + remove_short_term_gold = tiny_gold_value + stress_impact = { + generous = minor_stress_impact_loss + profligate = minor_stress_impact_loss + greedy = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + short_term_gold < medium_gold_value + } + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = gregarious + } + } + ai_value_modifier = { + ai_sociability = 1 + } + } + } + # Have them beaten up + option = { + name = travel_events.4001.c + scope:loyal_fan_scope = { + increase_wounds_no_death_effect = { REASON = fight } + } + stress_impact = { + base = minor_stress_impact_gain + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 25 + modifier = { + factor = 2 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = wrathful + has_trait = paranoid + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = gregarious + has_trait = forgiving + } + } + } + } + + after = { + scope:loyal_fan_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You determine that the women/men of X region are real pretty +travel_events.4002 = { + type = character_event + title = travel_events.4002.t + desc = travel_events.4002.desc + theme = travel + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:local_beauty_scope + animation = love + } + cooldown = { years = 20 } + trigger = { + static_group_filter = { + group = travel_events.4002 + match = 0.5 + } + is_available_travelling_adult = yes + is_landed = yes + is_location_valid_for_travel_event_on_land = yes + NOR = { + has_trait = celibate + has_trait = chaste + has_sexuality = asexual + # Not my culture + location.county.culture = root.culture + # Not a culture local to me + location.county.culture = root.capital_county.culture + # I'm not in my own realm + is_liege_or_above_of = location.county.holder + } + } + weight_multiplier = { + base = 1 + modifier = { + involved_activity ?= { + has_activity_type = activity_pilgrimage + } + add = -0.5 + } + modifier = { + NOR = { + has_trait = lustful + has_trait = seducer + has_trait = rakish + } + add = -0.5 + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_very_small } + create_character = { + template = local_beauty_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = local_beauty_scope + after_creation = { + add_character_flag = created + } + } + } + # Take them as your lover + option = { + name = travel_events.4002.a + trigger = { + OR = { + allowed_concubines = no + allowed_more_concubines = no + AND = { + allowed_to_marry_same_sex_trigger = no + sex_same_as = scope:local_beauty_scope + } + } + can_set_relation_lover_trigger = { + CHARACTER = scope:local_beauty_scope + } + } + add_courtier = scope:local_beauty_scope + root.current_travel_plan = { + add_companion = scope:local_beauty_scope + } + set_relation_lover = { + reason = lover_first_sight + target = scope:local_beauty_scope + } + if = { + limit = { + might_cheat_on_every_partner_trigger = no + } + add_stress = medium_stress_gain + } + else = { + stress_impact = { + lustful = medium_stress_impact_loss + rakish = medium_stress_impact_loss + seducer = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + } + ai_chance = { + base = 5 + modifier = { + add = 95 + OR = { + has_trait = lustful + has_trait = rakish + has_trait = seducer + } + } + modifier = { + factor = 0 + might_cheat_on_every_partner_trigger = no + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + # Take them as your concubine + option = { + name = travel_events.4002.b + trigger = { + allowed_concubines = yes + allowed_more_concubines = yes + OR = { + AND = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:local_beauty_scope + } + NOT = { sex_same_as = scope:local_beauty_scope } + } + } + add_courtier = scope:local_beauty_scope + root.current_travel_plan = { + add_companion = scope:local_beauty_scope + } + make_concubine = scope:local_beauty_scope + stress_impact = { + lustful = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + # Take them as your spouse + option = { + name = travel_events.4002.c + trigger = { + allowed_more_spouses = yes + OR = { + AND = { + allowed_to_marry_same_sex_trigger = yes + sex_same_as = scope:local_beauty_scope + } + NOT = { sex_same_as = scope:local_beauty_scope } + } + can_marry_character_trigger = { CHARACTER = scope:local_beauty_scope } + } + add_courtier = scope:local_beauty_scope + root.current_travel_plan = { + add_companion = scope:local_beauty_scope + } + if = { + limit = { + is_male = yes + } + marry = scope:local_beauty_scope + } + else = { marry_matrilineal = scope:local_beauty_scope } + stress_impact = { + eccentric = major_stress_impact_loss + lustful = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + chaste = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = -1 + } + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = chaste + has_trait = shy + } + } + } + } + # Admire from afar + option = { + name = travel_events.4002.d + scope:local_beauty_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + stress_impact = { + lustful = medium_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = rakish + } + } + } + } + after = { + scope:local_beauty_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You encounter vikings at sea +scripted_trigger is_near_vikings_trigger = { + NOT = { + culture = { has_innovation = innovation_longboats } + } + location = { + any_neighboring_province = { + county ?= { #Not at sea, not an impassable + holder = { in_diplomatic_range = root } + is_coastal_county = yes + has_coastal_province = yes + culture = { has_innovation = innovation_longboats } + faith = { has_doctrine_parameter = faith_can_raid } + } + } + } +} +scripted_trigger is_near_berber_pirates_trigger = { + NOT = { + culture = { has_cultural_pillar = heritage_berber } + } + location = { + any_neighboring_province = { + exists = county #Not at sea, not an impassable + county = { + holder = { in_diplomatic_range = root } + is_coastal_county = yes + culture = { has_cultural_pillar = heritage_berber } + } + } + } +} + +travel_events.4003 = { + type = character_event + title = travel_events.4003.t + desc = { + desc = travel_events.4003.desc.intro + first_valid = { + triggered_desc = { + trigger = { + is_near_vikings_trigger = yes + } + desc = travel_events.4003.desc.viking + } + triggered_desc = { + trigger = { + is_near_berber_pirates_trigger = yes + } + desc = travel_events.4003.desc.berber_pirate + } + desc = travel_events.4003.desc.regular_pirate + } + } + theme = travel_danger + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:viking_scope + animation = rage + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { + is_sea_province = yes + any_neighboring_province = { + exists = county #Is this on land and in the landed title structure. + county = { + holder = { in_diplomatic_range = root } + has_coastal_province = yes + culture = { has_innovation = innovation_longboats } + faith = { has_doctrine_parameter = faith_can_raid } + } + } + } + location = { + OR = { + travel_danger_type = { + travel_plan = root.current_travel_plan + terrain = sea + } + travel_danger_type = { + travel_plan = root.current_travel_plan + terrain = coastal_sea + } + } + } + } + weight_multiplier = { + base = 1 + modifier = { + add = 1 + is_near_vikings_trigger = yes + } + modifier = { + add = 1 + is_near_berber_pirates_trigger = yes + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + if = { + limit = { + is_near_vikings_trigger = yes + } + location = { + random_neighboring_province = { + limit = { + exists = county #Not at sea, not an impassable + county = { + holder = { in_diplomatic_range = root } + has_coastal_province = yes + culture = { has_innovation = innovation_longboats } + faith = { has_doctrine_parameter = faith_can_raid } + } + } + county = { + save_scope_as = pirate_county_scope + } + } + } + create_character = { + template = fp1_ms_warrior_character + location = root.location + culture = scope:pirate_county_scope.culture + faith = scope:pirate_county_scope.faith + #Set up the scope + save_scope_as = viking_scope + after_creation = { + add_character_flag = created + } + } + } + else_if = { + limit = { + is_near_berber_pirates_trigger = yes + } + location = { + random_neighboring_province = { + limit = { + exists = county #Not at sea, not an impassable + county = { + holder = { in_diplomatic_range = root } + has_coastal_province = yes + culture = { has_cultural_pillar = heritage_berber } + } + } + county = { + save_scope_as = pirate_county_scope + } + } + } + create_character = { + template = fp1_ms_warrior_character + location = root.location + culture = scope:pirate_county_scope.culture + faith = scope:pirate_county_scope.faith + #Set up the scope + save_scope_as = viking_scope + after_creation = { + add_character_flag = created + } + } + } + else = { + create_character = { + template = fp1_ms_warrior_character + location = root.location + culture = root.culture + faith = root.faith + #Set up the scope + save_scope_as = viking_scope + after_creation = { + add_character_flag = created + } + } + } + location = { + save_scope_as = background_terrain_scope + } + } + # Attempt to fight the vikings + option = { + name = travel_events.4003.a + duel = { + skill = prowess + target = scope:viking_scope + 45 = { # You beat up the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel_events.4003.defeated_vikings + left_icon = scope:viking_scope + add_prestige = medium_prestige_gain + create_character_memory = { + type = won_duel + participants = { + duel_loser = scope:viking_scope + } + } + if = { + limit = { + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + random_list = { + 5 = { + if= { + limit = { + scope:viking_scope.culture = { + has_innovation = innovation_longboats + } + } + give_nickname = nick_northmen_slayer + } + else = { + give_nickname = nick_pirate_slayer + } + } + 95 = {} + } + } + } + } + 45 = { # You get beaten up by the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel_events.4003.defeated_by_vikings + left_icon = scope:viking_scope + increase_wounds_effect = { REASON = fight } + remove_short_term_gold = medium_gold_value + create_character_memory = { + type = lost_duel + participants = { + duel_winner = scope:viking_scope + } + } + } + } + 10 = { # You get beaten up by the viking captain and die + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel_events.4003.defeated_by_vikings + left_icon = scope:viking_scope + death = { + killer = scope:viking_scope + death_reason = death_fight + } + } + } + } + stress_impact = { + calm = medium_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = craven + } + } + } + } + # Attempt to bribe the vikings + option = { + name = travel_events.4003.b + remove_short_term_gold = medium_gold_value + stress_impact = { + greedy = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = wrathful + has_trait = brave + } + } + modifier = { + factor = 0 + short_term_gold < medium_gold_value + } + } + } + # Attempt to outmanuever the vikings + option = { + name = travel_events.4003.c + duel = { + skills = { martial learning } + target = scope:viking_scope + 50 = { # You outmanuever the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + modifier = { + factor = 2 + has_trait = strategist + } + send_interface_toast = { + title = travel_events.4003.defeated_vikings + left_icon = scope:viking_scope + add_prestige = medium_prestige_gain + } + } + 50 = { # You get beaten up by the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + + send_interface_toast = { + title = travel_events.4003.defeated_by_vikings + left_icon = scope:viking_scope + increase_wounds_effect = { REASON = fight } + remove_short_term_gold = medium_gold_value + } + create_character_memory = { + type = lost_duel + participants = { + duel_winner = scope:viking_scope + } + } + } + 5 = { # You get beaten up by the viking captain and die + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + death = { + killer = scope:viking_scope + death_reason = death_fight + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + } + } + } + } + # Attempt to hire the vikings as your personal guard + option = { + name = travel_events.4003.d + duel = { + skills = { diplomacy stewardship } + target = scope:viking_scope + 50 = { # You convince them to join you + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel_events.4003.offer_accepted + left_icon = scope:viking_scope + pay_short_term_gold = { + target = scope:viking_scope + gold = minor_gold_value + } + add_courtier = scope:viking_scope + root.current_travel_plan = { + add_companion = scope:viking_scope + } + } + hidden_effect = { + scope:viking_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 5 + } + } + } + } + 50 = { # You get beaten up by the viking captain + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel_events.4003.offer_refused + left_icon = scope:viking_scope + increase_wounds_effect = { REASON = fight } + remove_short_term_gold = medium_gold_value + } + create_character_memory = { + type = lost_duel + participants = { + duel_winner = scope:viking_scope + } + } + } + 5 = { # You get beaten up by the viking captain and die + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + death = { + killer = scope:viking_scope + death_reason = death_fight + } + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + after = { + scope:viking_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Fishermen at sea! +scripted_trigger is_near_fishermen_trigger = { + location = { + any_neighboring_province = { + exists = county #Not at sea, not an impassable + county = { + culture = { has_cultural_tradition = tradition_fishermen } + } + } + } +} + +travel_events.4004 = { + type = character_event + title = travel_events.4004.t + desc = travel_events.4004.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { + is_sea_province = yes + } + is_near_fishermen_trigger = yes + } + immediate = { + location = { + random_neighboring_province = { + limit = { + exists = county #Not at sea, not an impassable + county.culture = { has_cultural_tradition = tradition_fishermen } + } + county = { + save_scope_as = fishermen_county_scope + } + } + } + create_character = { + template = generic_peasant_character + location = root.location + culture = scope:fishermen_county_scope.culture + faith = scope:fishermen_county_scope.faith + #Set up the scope + save_scope_as = fisherman_scope + after_creation = { + add_character_flag = created + } + } + } + # Negotiate for some food + option = { + name = travel_events.4004.a + remove_short_term_gold = minor_gold_value + current_travel_plan = { + add_travel_plan_modifier = { + modifier = travel_well_fed_travellers + months = 2 + } + } + stress_impact = { + greedy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = arrogant + has_trait = wrathful + } + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + # Attempt to plunder them for food + option = { + name = travel_events.4004.b + duel = { + skill = prowess + target = scope:fisherman_scope + 50 = { # You beat up the fisherman + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + current_travel_plan = { + add_travel_plan_modifier = { + modifier = travel_well_fed_travellers + months = 2 + } + } + } + 50 = { # You get beaten up and mugged by a lowly fisherman + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + increase_wounds_effect = { REASON = fight } + remove_short_term_gold = minor_gold_value + create_character_memory = { + type = lost_duel + participants = { + duel_winner = scope:fisherman_scope + } + } + } + } + stress_impact = { + vengeful = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = vengeful + has_trait = arrogant + has_trait = wrathful + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = generous + } + } + } + } + # Just go by without bothering the fishermen + option = { + name = travel_events.4004.c + stress_impact = { + base = minor_stress_impact_loss + } + ai_chance = { + base = 50 + } + } + after = { + scope:fisherman_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Encounter a caravan of merchants at sea +scripted_trigger nearby_merchant_culture = { + culture = { + OR = { + has_cultural_tradition = tradition_maritime_mercantilism + has_cultural_tradition = tradition_diasporic + } + } +} + +travel_events.4005 = { + type = character_event + title = travel_events.4005.t + desc = travel_events.4005.desc + theme = travel + left_portrait = { + character = root + animation = personality_bold + } + right_portrait = { + character = scope:merchant_character_scope + animation = admiration + } + artifact = { + target = scope:merchant_artifact_scope + position = lower_left_portrait + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { + is_sea_province = yes + any_neighboring_province = { + exists = county #Ie this is not a Sea province or an Impassable, etc + county.holder = { + any_courtier = { + nearby_merchant_culture = yes + } + } + } + } + } + immediate = { + save_scope_as = root_scope + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + hidden_effect = { + location = { + random_neighboring_province = { + limit = { + exists = county #Ie this is not a Sea province or an Impassable, etc + county.holder = { + any_courtier = { + nearby_merchant_culture = yes + } + } + } + county.holder = { + random_courtier = { + limit = { + nearby_merchant_culture = yes + } + save_scope_as = merchant_base_scope + } + } + } + } + create_character = { + template = generic_peasant_character + location = root.location + culture = scope:merchant_base_scope.culture + faith = scope:merchant_base_scope.faith + #Set up the scope + save_scope_as = merchant_character_scope + after_creation = { + add_character_flag = created + } + } + scope:merchant_character_scope = { + random_list = { + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = maritime_trading_handbook + description = maritime_trading_handbook_description + type = journal + visuals = book + modifier = character_travel_speed_1 + modifier = artifact_monthly_stewardship_lifestyle_xp_3_modifier + modifier = artifact_naval_speed_2_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = own_holy_text_mid + description = own_holy_text_mid_description + type = journal + visuals = book + template = holy_book_template + modifier = artifact_monthly_learning_lifestyle_xp_2_modifier + modifier = artifact_monthly_piety_3_modifier + modifier = artifact_learning_per_piety_level_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + scope:merchant_artifact_scope = { + set_variable = { + name = relic_religion + value = root.religion + } + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = merchants_holy_text_mid + description = merchants_holy_text_mid_description + type = journal + visuals = book + template = holy_book_template + modifier = artifact_monthly_learning_lifestyle_xp_2_modifier + modifier = artifact_monthly_piety_3_modifier + modifier = artifact_learning_per_piety_level_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + scope:merchant_artifact_scope = { + set_variable = { + name = relic_religion + value = scope:merchant_character_scope.religion + } + } + } + 5 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = merchants_sword + description = merchants_sword_description + type = sword + visuals = sword + modifier = artifact_prowess_4_modifier + modifier = artifact_monthly_prestige_3_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + } + } + } + } + # Buy the artifact! + option = { + name = travel_events.4005.a + if = { + limit = { + scope:merchant_artifact_scope = { + rarity = famed + } + } + remove_short_term_gold = major_gold_value + } + else = { + remove_short_term_gold = medium_gold_value + } + scope:merchant_artifact_scope = { set_owner = root } + stress_impact = { + generous = medium_stress_impact_loss + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + # Attempt to steal the artifact + option = { + name = travel_events.4005.b + duel = { + skill = intrigue + value = very_high_skill_rating + 50 = { # You beat up the fisherman + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.stole_artifact + left_icon = root + scope:merchant_artifact_scope = { set_owner = root } + } + } + 50 = { # You get caught and exposed as a dirty thief! + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.caught_red_handed + left_icon = root + increase_wounds_no_death_effect = { REASON = fight } + add_prestige = major_prestige_loss + } + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + craven = medium_stress_impact_gain + generous = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = generous + has_trait = craven + } + } + } + } + # Just go by without buying anything + option = { + name = travel_events.4005.c + stress_impact = { + generous = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = generous + } + } + } + after = { + hidden_effect = { + if = { + limit = { + scope:merchant_artifact_scope.artifact_owner != root + } + destroy_artifact = scope:merchant_artifact_scope + } + if = { + limit = { is_ai = yes } + scope:merchant_character_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } + } +} + +# A local bird lands on your boat and eats some supplies +travel_events.4006 = { + type = character_event + title = travel_events.4006.t + desc = travel_events.4006.desc + theme = travel + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:superstituous_caravan_member + animation = fear + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { + is_sea_province = yes + } + current_travel_plan = { + any_entourage_character = { + opinion = { + value <= low_negative_opinion + target = root + } + } + } + } + immediate = { + root.current_travel_plan = { + random_entourage_character = { + limit = { + opinion = { + value <= low_negative_opinion + target = root + } + } + weight = { + base = 1 + # Try to find someone relevant + modifier = { + is_powerful_vassal_of = root + add = 2 + } + modifier = { + is_close_family_of = root + add = 2 + } + modifier = { + this = root.current_travel_plan.travel_leader + add = 10 + } + # Try to find someone who would be upset over this + modifier = { + has_trait = compassionate + add = 1 + } + modifier = { + has_trait = zealous + add = 1 + } + modifier = { + has_trait = cynical + factor = 0.01 + } + } + save_scope_as = superstituous_caravan_member + } + } + } + # Alas, nothing to be done + option = { + name = travel_events.4006.a + current_travel_plan = { + add_travel_plan_modifier = { + modifier = bird_ate_supplies + years = 2 + } + } + change_current_weight = -10 + progress_towards_friend_effect = { + REASON = friend_listened_to_advice + CHARACTER = scope:superstituous_caravan_member + OPINION = default_friend_opinion + } + stress_impact = { + base = minor_stress_impact_gain + vengeful = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = vengeful + has_trait = callous + has_trait = sadistic + } + } + } + } + # Kill the bloody bird! + option = { + name = travel_events.4006.b + progress_towards_rival_effect = { + REASON = rival_belittled_beliefs + CHARACTER = scope:superstituous_caravan_member + OPINION = default_rival_opinion + } + random_list = { + 50 = { + send_interface_toast = { + title = travel.supersititions_abated + left_icon = root + add_stress = minor_stress_loss + current_travel_plan = { + add_travel_plan_modifier = { + modifier = ate_a_bird + years = 2 + } + } + } + } + 50 = { + modifier = { + factor = 0.5 + has_trait = cynical + } + send_interface_toast = { + title = travel.birds_curse + left_icon = root + add_stress = minor_stress_gain + current_travel_plan = { + add_travel_plan_modifier = { + modifier = bird_superstition + years = 2 + } + } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = zealous + } + } + } + } +} + +# A storm at sea +travel_events.4007 = { + type = character_event + title = travel_events.4007.t + desc = travel_events.4007.desc + theme = travel + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = root.current_travel_plan.travel_leader + animation = stress + } + override_background = { reference = fp1_ocean } + cooldown = { months = 1 } + trigger = { + exists = current_travel_plan.travel_leader + NOT = { current_travel_plan.travel_leader = root } + is_available_travelling = yes + is_playable_character = yes + location = { + has_sea_danger_type = { TRAVEL = root.current_travel_plan } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_high } + hidden_effect = { + while = { + count = 5 + current_travel_plan = { + random_entourage_character = { + limit = { + this != root + } + weight = { + base = 1 + # Try to find someone relevant + modifier = { + is_close_family_of = root + add = 1 + } + } + add_to_list = drowning_courtiers_list + } + } + } + } + traveler_danger_xp_effect = { + MIN = 3 + MAX = 7 + } + } + # Trust your guide leader's judgement + option = { + name = travel_events.4007.a + current_travel_plan.travel_leader = { + duel = { + skill = martial + value = high_skill_rating + 50 = { # You manage to navigate the storm + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + custom_tooltip = succesfully_navigate_the_storm_tt + hidden_effect = { + root = { + send_interface_toast = { + title = succesfully_navigate_the_storm_tt + left_icon = root + add_prestige = 10 + } + } + } + } + 40 = { # You mess up and get someone killed + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = drowned } + custom_tooltip = someone_drowns_tt + hidden_effect = { + root = { + send_interface_toast = { + title = someone_drowns_tt + left_icon = root + random_in_list = { + list = drowning_courtiers_list + death = { + death_reason = death_drowned + } + } + } + } + } + } + 10 = { # They mess up a lot and drown a lot of people + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + increase_wounds_effect = { REASON = drowned } + custom_tooltip = some_people_drown_tt + hidden_effect = { + root = { + send_interface_toast = { + title = some_people_drown_tt + left_icon = root + every_in_list = { + list = drowning_courtiers_list + death = { + death_reason = death_drowned + } + } + } + } + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + } + } + } + } + # Take the helm yourself! + option = { + name = travel_events.4007.b + stress_impact = { + arrogant = minor_stress_impact_loss + craven = medium_stress_impact_gain + } + progress_towards_rival_effect = { + REASON = rival_upstaged_at_sea + CHARACTER = root.current_travel_plan.travel_leader + OPINION = default_rival_opinion + } + duel = { + skill = martial + value = high_skill_rating + 50 = { # You manage to navigate the storm + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = succesfully_navigate_the_storm_tt + left_icon = root + add_prestige = medium_prestige_gain + } + } + 40 = { # You mess up and get someone killed + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + custom_tooltip = some_people_drown_tt + hidden_effect = { + send_interface_toast = { + title = some_people_drown_tt + left_icon = root + every_in_list = { + list = drowning_courtiers_list + death = { + death_reason = death_drowned + } + } + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = drowned } + } + } + } + 10 = { # You really mess up and get yourself drowned + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = you_drown_tt + left_icon = root + add_prestige = medium_prestige_loss + death = { + death_reason = death_drowned + } + } + } + } + ai_chance = { + base = 50 + modifier = { + add = 50 + has_trait = arrogant + } + modifier = { + factor = 0 + has_trait = craven + } + } + } + # Follow the experienced sailors to shore + option = { + name = travel_events.4007.c + trigger = { + location = { + any_neighboring_province = { + exists = county #Not at sea, not an impassable + county.culture = { + OR = { + has_cultural_tradition = tradition_seafaring + has_cultural_tradition = tradition_fishermen + } + } + } + } + } + add_prestige = minor_prestige_gain + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + } + } + } + } +} + +# Shipwreck! +travel_events.4008 = { + type = character_event + title = travel_events.4008.t + desc = travel_events.4008.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + override_background = { reference = fp1_ocean } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + location = { is_sea_province = yes } + } + + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + mp_delay_travel_plan = { DAYS = 90 } + } + + # Investigate the wreck + option = { + name = travel_events.4008.a + current_travel_plan = { + delay_travel_plan = { + weeks = 1 + add = yes + } + } + duel = { + skill = intrigue + value = medium_skill_rating + 60 = { # You find something cool + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + add_prestige = medium_prestige_gain + custom_tooltip = find_something_cool_tt + hidden_effect = { + random_list = { + 50 = { # A cool artifact + trigger_event = travel_events.4009 + } + 50 = { # Treasure! + trigger_event = travel_events.4010 + } + 50 = { # A survivor! + trigger = { + location = { + any_neighboring_province = { + is_sea_province = no + has_holding = yes + } + } + } + trigger_event = travel_events.4011 + } + } + } + } + 40 = { # You find nothing + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + custom_tooltip = you_find_nothing_tt + send_interface_toast = { + title = you_find_nothing_tt + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + craven = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = paranoid + } + } + } + } + # Ignore it + option = { + name = travel_events.4008.b + stress_impact = { + arrogant = medium_stress_impact_gain + brave = medium_stress_impact_gain + curious = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = brave + has_trait = curious + } + } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +# Shipwreck, a trinket! +travel_events.4009 = { + type = character_event + title = travel_events.4009.t + desc = travel_events.4009.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + artifact = { + target = scope:new_trinket + position = lower_left_portrait + } + override_background = { reference = fp1_ocean } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + generate_trinket_effect = { + TRINKET_RECEIVER = root + TRINKET_GIVER = root + GRAB_ALL_TRINKETS = yes + HISTORY_TYPE = discovered + } + } + # Cool dude + option = { + name = travel_events.4009.a + } +} + +# Shipwreck, treasure! +travel_events.4010 = { + type = character_event + title = travel_events.4010.t + desc = travel_events.4010.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + override_background = { reference = fp1_ocean } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + } + # Cool dude + option = { + name = travel_events.4010.a + add_gold = minor_gold_value + } +} + +# Shipwreck, a survivor! +travel_events.4011 = { + type = character_event + title = travel_events.4011.t + desc = travel_events.4011.desc + theme = travel + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:castaway_scope + animation = ecstasy + } + override_background = { reference = fp1_ocean } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + root.location = { + random_neighboring_province = { + limit = { + is_sea_province = no + has_holding = yes + } + county = { save_scope_as = nearby_coast_scope } + } + } + create_character = { + template = castaway_character + location = root.location + culture = scope:nearby_coast_scope.culture + faith = scope:nearby_coast_scope.faith + #Set up the scope + save_scope_as = castaway_scope + after_creation = { + add_character_flag = created + } + } + } + # Help them to shore + option = { + name = travel_events.4011.a + add_piety = minor_piety_value + add_gold = minor_gold_value + stress_impact = { + arrogant = minor_stress_impact_gain + callous = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + } + } + # Recruit them to your court + option = { + name = travel_events.4011.b + add_courtier = scope:castaway_scope + root.current_travel_plan = { + add_companion = scope:castaway_scope + } + add_gold = minor_gold_value + stress_impact = { + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + } + # Abandon them there + option = { + name = travel_events.4011.c + stress_impact = { + callous = minor_stress_impact_loss + paranoid = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + just = medium_stress_impact_gain + compassionate = massive_stress_impact_gain + } + } + + after = { + scope:castaway_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You are being followed by a feral child +travel_events.4012 = { + type = character_event + title = travel_events.4012.t + desc = travel_events.4012.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:feral_child_scope + animation = pain + triggered_outfit = { + outfit_tags = { beggar_rags } + } + } + cooldown = { years = 50 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + has_holding = no + county = { development_level <= 5 } + } + trigger_if = { + limit = { + is_ai = yes + } + highest_held_title_tier >= tier_kingdom + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + create_character = { + template = feral_child_template + location = root.location + culture = root.location.county.culture # They should look like a local + faith = root.faith + dynasty = none + #Set up the scope + save_scope_as = feral_child_scope + } + scope:feral_child_scope = { + # Save scope to limit possible animals: big/small/dangerous/harmless/prowling + select_local_animal_effect = { TYPE = prowling } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + hidden_effect = { + scope:feral_child_scope = { + # They are feral, they learned very basic language from your party + if = { + limit = { + culture != root.culture + NOT = { + culture = { + has_same_culture_language = root.culture #Even if the child is from another culture they might speak the same language + } + } + } + set_culture = root.culture + unlearn_language_of_culture = root.location.county.culture + } + else_if = { + limit = { + culture != root.culture + } + set_culture = root.culture #For consistency we will set the culture even if it already speaks the same language. + } + # Give them a cool nickname + give_nickname = nick_son_of_dangerous_animal + } + } + } + # Take them as your ward + option = { + name = travel_events.4012.a + trigger = { + num_of_relation_ward < 2 + } + add_courtier = scope:feral_child_scope + root.current_travel_plan = { + add_companion = scope:feral_child_scope + } + scope:feral_child_scope = { set_relation_guardian = root } + create_character_memory = { + type = feral_child_found_memory + participants = { + feral_child = scope:feral_child_scope + } + } + hidden_effect = { + duel = { + skill = learning + value = very_high_skill_rating + 50 = { # You manage to tame the child + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + trigger_event = { + id = travel_events.4013 + years = 1 + } + } + 50 = { # You fail to tame the child and they return to nature + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + trigger_event = { + id = travel_events.4014 + years = 1 + } + } + } + } + stress_impact = { + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = callous + } + } + } + } + # Ignore them + option = { + name = travel_events.4012.b + add_character_modifier = { + modifier = stalked_by_feral_child_modifier + years = 2 + } + scope:feral_child_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = compassionate + } + } + } + #Have them chased away! + option = { + name = travel_events.4012.c + duel = { + skill = prowess + target = scope:feral_child_scope + 50 = { # You beat up the child + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.beat_feral_child + left_icon = root + add_dread = minor_dread_gain + } + } + 50 = { # You get beaten up by the child + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.beaten_by_feral_child + left_icon = root + add_prestige = medium_prestige_loss + increase_wounds_effect = { REASON = fight } + } + create_character_memory = { + type = attacked_by_feral_child_memory + participants = { + feral_child = scope:feral_child_scope + } + } + } + } + if = { #Can die from the wounds effect above + limit = { scope:feral_child_scope = { is_alive = yes } } + scope:feral_child_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + stress_impact = { + base = medium_stress_impact_gain + sadistic = medium_stress_impact_loss + zealous = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } +} + +# You gain the option to adopt the child +travel_events.4013 = { + type = character_event + title = travel_events.4013.t + desc = travel_events.4013.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:feral_child_scope + animation = personality_rational + } + trigger = { + has_relation_ward = scope:feral_child_scope + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + scope:feral_child_scope = { + if = { + limit = { + has_character_modifier = nonverbal_modifier + } + remove_character_modifier = nonverbal_modifier + } + if = { + limit = { + has_character_modifier = feral_modifier + } + remove_character_modifier = feral_modifier + } + } + create_character_memory = { + type = feral_child_socialised_memory + participants = { + feral_child = scope:feral_child_scope + } + } + } + # Adopt them as your child + option = { + name = travel_events.4013.a + if = { + limit = { + exists = dynasty + dynasty.dynast = root + } + dynasty = { add_dynasty_prestige = major_dynasty_prestige_loss } + } + else = { + add_prestige = massive_prestige_loss + } + if = { + limit = { + is_male = yes + } + scope:feral_child_scope = { set_father = root } + } + else = { + scope:feral_child_scope = { set_mother = root } + } + if = { + limit = { exists = house } + scope:feral_child_scope = { set_house = root.house } + } + set_relation_friend = { + reason = friend_adopted + target = scope:feral_child_scope + } + stress_impact = { + compassionate = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 10 # The AI should really avoid doing this + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = arrogant + has_trait = callous + has_trait = sadistic + } + } + } + } + # Use this to spread word of my good deeds + option = { + name = travel_events.4013.b + add_learning_lifestyle_xp = massive_lifestyle_xp + add_piety = medium_piety_gain + stress_impact = { + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = compassionate + } + } + } + } +} + +# You fail to tame the child +travel_events.4014 = { + type = character_event + title = travel_events.4014.t + desc = travel_events.4014.desc + theme = travel + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:feral_child_scope + animation = grief + } + # Try again + option = { + name = travel_events.4014.a + trigger = { + scope:feral_child_scope = { is_alive = yes } + has_relation_ward = scope:feral_child_scope + } + duel = { + skill = learning + value = very_high_skill_rating + 50 = { # You manage to tame the child + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + trigger_event = { + id = travel_events.4013 + months = 1 + } + } + 50 = { # You fail to tame the child and they return to nature + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + custom_tooltip = child_returns_to_nature_tt + create_character_memory = { + type = feral_child_socialised_failed_memory + participants = { + feral_child = scope:feral_child_scope + } + } + scope:feral_child_scope = { + silent_disappearance_effect = yes + } + } + } + stress_impact = { + compassionate = medium_stress_impact_loss + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 10 # The AI should really avoid doing this + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = wrathful + has_trait = impatient + } + } + } + } + # Accept your loss and move on + option = { + name = travel_events.4014.b + custom_tooltip = child_returns_to_nature_tt + create_character_memory = { + type = feral_child_socialised_failed_memory + participants = { + feral_child = scope:feral_child_scope + } + } + if = { + limit = { + scope:feral_child_scope = { is_alive = yes } + } + scope:feral_child_scope = { + silent_disappearance_effect = yes + } + } + stress_impact = { + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + arrogant = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = patient + has_trait = humble + has_trait = compassionate + has_trait = arrogant + } + } + } + } +} + +# Asking for directions from a diff. language character +travel_events.4015 = { + type = character_event + title = travel_events.4015.t + desc = travel_events.4015.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:travel_leader_scope + animation = stress + } + cooldown = { years = 20 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + exists = current_travel_plan.travel_leader + current_travel_plan.travel_leader = { + NOT = { knows_language_of_culture = root.location.county.culture } + } + NOT = { culture = { has_same_culture_language = root.location.county.culture } } + } + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + current_travel_plan.travel_leader = { save_scope_as = travel_leader_scope } + } + # Attempt to interpret the instructions + option = { + name = travel_events.4015.a + trigger = { + NOT = { knows_language_of_culture = location.county.culture } + } + duel = { + skills = { diplomacy learning } + value = medium_skill_rating + 60 = { # You succesfully interpret the instructions + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.interpreted_instructions + left_icon = root + add_prestige = minor_prestige_gain + current_travel_plan = { + add_destination_progress = { days = 7 } + } + } + } + 40 = { # You mess up and get lost + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.got_lost + left_icon = root + current_travel_plan = { + delay_travel_plan = { + weeks = 1 + add = yes + } + } + } + } + } + } + # You speak the language and interpret the instructions + option = { + name = travel_events.4015.b + trigger = { + knows_language_of_culture = location.county.culture + } + add_prestige = minor_prestige_gain + current_travel_plan = { + add_destination_progress = { days = 7 } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +# You experience heatstroke +scripted_trigger 4016_is_hot_climate_trigger = { + NOT = { terrain = mountains } + NOT = { terrain = taiga } + OR = { + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_africa + geographical_region = world_burma + geographical_region = world_asia_southeast + AND = { + OR = { + is_desert_trigger = yes + terrain = jungle + } + NOR = { + geographical_region = world_steppe + geographical_region = world_tibet + } + } + } +} +scripted_trigger 4016_is_cold_climate_trigger = { # Explicitly looking for places that are *cold*, not merely that they're not hot + OR = { + geographical_region = world_steppe + geographical_region = world_tibet + NOT = { is_desert_trigger = yes } + NOT = { terrain = jungle } + } + OR = { + geographical_region = world_steppe + geographical_region = world_tibet + geographical_region = world_europe_west_britannia + geographical_region = world_europe_west_germania + geographical_region = world_europe_north + terrain = mountains + terrain = taiga + } + NOT = { + geographical_region = world_europe_west_iberia + geographical_region = world_europe_south + geographical_region = world_middle_east + geographical_region = world_india + geographical_region = world_africa + geographical_region = world_burma + } +} + +travel_events.4016 = { + type = character_event + title = travel_events.4016.t + desc = { + desc = travel_events.4016.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root.location = { + is_drylands_or_desert_trigger = yes + } + } + desc = travel_events.4016.desc.mid.dry_heat + } + desc = travel_events.4016.desc.mid.humid_heat + } + desc = travel_events.4016.desc.outro + } + theme = travel_danger + left_portrait = { + character = root + animation = stress + } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + root.location = { + 4016_is_hot_climate_trigger = yes + } + root.capital_province = { + 4016_is_cold_climate_trigger = yes + } + } + + immediate = { + mp_delay_travel_plan = { DAYS = 90 } + } + + # Grit your teeth and keep going + option = { + name = travel_events.4016.a + random_list = { + 50 = { + modifier = { + factor = 2 + OR = { + has_any_illness = yes + has_trait = weak + has_trait = physique_bad + has_trait = spindly + has_trait = wheezing + has_trait = bleeder + } + } + send_interface_toast = { + title = travel.got_heatstroke + left_icon = root + add_character_modifier = { + modifier = heatstroke_modifier + years = 2 + } + add_stress = medium_stress_gain + } + } + 50 = { + modifier = { + factor = 2 + OR = { + has_trait = strong + has_trait = physique_good + has_trait = athletic + } + } + modifier = { + factor = 2 + OR = { + has_trait = desert_warrior + has_trait = jungle_stalker + has_trait = logistician + } + } + send_interface_toast = { + title = travel.found_a_place_to_cool + left_icon = root + add_stress = minor_stress_loss + } + } + } + stress_impact = { + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = patient + has_trait = humble + } + } + } + } + + # Attempt to steal water from your entourage + option = { + name = travel_events.4016.b + duel = { + skill = intrigue + value = medium_skill_rating + 50 = { # You manage to steal water without being caught + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.stole_water + left_icon = root + add_stress = minor_stress_loss + } + } + 50 = { # You get caught stealing water + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.caught_stealing_water + left_icon = root + add_prestige = medium_prestige_loss + root.current_travel_plan = { + every_entourage_character = { + custom = every_entourage_tt + add_opinion = { + modifier = angry_opinion + opinion = -10 + target = root + } + } + } + } + } + } + stress_impact = { + patient = minor_stress_impact_gain + humble = minor_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = patient + has_trait = humble + has_trait = honest + } + } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +# Swords for hire! +travel_events.4017 = { + type = character_event + title = travel_events.4017.t + desc = { + desc = travel_events.4017.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root.location = { + OR = { + geographical_region = world_steppe + county = { culture = { has_cultural_pillar = heritage_turkic } } + county = { culture = { has_cultural_pillar = heritage_mongolic } } + } + county = { culture = { has_cultural_tradition = tradition_horse_lords } } + } + } + desc = travel_events.4017.desc.mid.nomad + } + desc = travel_events.4017.desc.mid.swordsman + } + desc = travel_events.4017.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:warrior_scope + animation = marshal + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + root.location = { + county = { + culture != root.capital_county.culture + culture = { + OR = { + has_cultural_tradition = tradition_swords_for_hire + has_cultural_tradition = tradition_ep3_audacious_cadets + } + } + } + } + } + immediate = { + create_character = { + template = swords_for_hire_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = warrior_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:warrior_scope = { + give_nickname = nick_the_own_culture + add_character_flag = single_combat_duel_armor + } + } + } + # Hire them! + option = { + name = travel_events.4017.a + pay_short_term_gold = { + target = scope:warrior_scope + gold = minor_gold_value + } + add_courtier = scope:warrior_scope + root.current_travel_plan = { + add_companion = scope:warrior_scope + } + hidden_effect = { + scope:warrior_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = greedy + } + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + # Attempt to negotiate for a lower contract + option = { + name = travel_events.4017.b + duel = { + skill = stewardship + value = medium_skill_rating + 50 = { # You manage to haggle the price down + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.haggle_succesful + left_icon = root + pay_short_term_gold = { + target = scope:warrior_scope + gold = tiny_gold_value + } + add_courtier = scope:warrior_scope + root.current_travel_plan = { + add_companion = scope:warrior_scope + } + hidden_effect = { + scope:warrior_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + } + } + } + 50 = { # You fail and they get pissed + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.haggle_failed + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + humble = minor_stress_impact_gain + shy = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = shy + has_trait = generous + } + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + # Use them to get lower mercenary contracts + option = { + name = travel_events.4017.c + trigger = { + has_trait = avaricious + } + add_character_modifier = { + modifier = cheaper_merc_contracts + years = 5 + } + stress_impact = { + craven = minor_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = craven + has_trait = generous + } + } + } + } + + # Move on without hiring their services + option = { + name = travel_events.4017.d + stress_impact = { + brave = minor_stress_impact_gain + generous = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = generous + has_trait = arrogant + } + } + } + } + + after = { + hidden_effect = { + scope:warrior_scope = { + remove_character_flag = single_combat_duel_armor + silent_disappearance_ai_if_created_effect = yes + } + } + } +} + +# A mendicant preacher! +travel_events.4018 = { + type = character_event + title = travel_events.4018.t + desc = { + desc = travel_events.4018.desc.intro + first_valid = { + triggered_desc = { + trigger = { + root.location = { + county = { culture = { has_cultural_tradition = tradition_mendicant_mystics } } + } + } + desc = travel_events.4018.desc.mid.mystic + } + desc = travel_events.4018.desc.mid.preacher + } + desc = travel_events.4018.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:mystic_scope + animation = personality_zealous + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + culture != root.capital_county.culture + faith.religion != root.faith.religion + OR = { + faith = { has_doctrine_parameter = mendicant_preachers_conversion_active } + culture = { has_cultural_tradition = tradition_mendicant_mystics } + } + } + } + } + immediate = { + create_character = { + template = default_mystic_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = mystic_scope + after_creation = { + add_character_flag = created + } + } + } + + # Have them burned + option = { + name = travel_events.4018.d + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + has_trait = zealous + } + } + trait = sadistic + trait = callous + trait = zealous + scope:mystic_scope = { + death = { + killer = root + death_reason = death_burned_witch + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + factor = 100 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + # Debate me in the arena of facts and logic + option = { + name = travel_events.4018.a + duel = { + skill = learning + target = scope:mystic_scope + 50 = { # You win the debate + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 50 = { # You lose the debate + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_prestige = miniscule_prestige_loss + add_courtier = scope:mystic_scope + root.current_travel_plan = { + add_companion = scope:mystic_scope + } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = cynical + } + } + } + } + + # They do make some good points... + option = { + name = travel_events.4018.b + add_piety = major_piety_loss + set_character_faith = scope:mystic_scope.faith + add_courtier = scope:mystic_scope + root.current_travel_plan = { + add_companion = scope:mystic_scope + } + hidden_effect = { + scope:mystic_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + } + stress_impact = { + cynical = medium_stress_impact_loss + zealous = major_stress_impact_gain + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { # The AI should never do this + base = 0 + } + } + + # Pass them by + option = { + name = travel_events.4018.c + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + after = { + scope:mystic_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You pass by a peasant street food place, demand to sample some +travel_events.4019 = { + type = character_event + title = travel_events.4019.t + desc = travel_events.4019.desc + theme = travel + left_portrait = { + character = root + animation = thinking + } + right_portrait = { + character = scope:pompous_courtier + animation = personality_zealous + } + override_background = { reference = market } + cooldown = { years = 20 } + trigger = { + static_group_filter = { + group = travel_events.4019 + match = 0.25 + } + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + has_holding = yes + } + NOT = { + location.culture = { + has_same_culture_heritage = root.culture + } + } + current_travel_plan = { + any_entourage_character = { + is_physically_able_ai_adult = yes + this != root + } + } + } + weight_multiplier = { + base = 1 + # Culinary art is an exceptionally rare cultrad, so I feel for visibility this should just make the event more likely rather than locking it only to culinary artists + modifier = { + add = 10 + location.culture = { + has_cultural_tradition = tradition_culinary_art + } + } + } + immediate = { + current_travel_plan = { + random_entourage_character = { + limit = { + is_physically_able_ai_adult = yes + this != root + } + weight = { + base = 1 + modifier = { + factor = 2 + has_trait = arrogant + } + modifier = { + factor = 0.5 + NOT = { has_trait = humble } + } + } + save_scope_as = pompous_courtier + } + } + } + # I am the Emperor and I want pudding! + option = { + name = travel_events.4019.a + add_prestige = minor_prestige_loss + random_list = { + 60 = { + modifier = { + factor = 2 + root.location.culture = { + has_cultural_tradition = tradition_culinary_art + } + } + send_interface_toast = { + title = travel.good_food + left_icon = root + add_stress = minor_stress_loss + add_character_modifier = { + modifier = good_soup_modifier + years = 2 + } + } + } + 30 = { + send_interface_toast = { + title = travel.bad_food + left_icon = root + add_character_modifier = { + modifier = bad_soup_modifier + years = 2 + } + } + } + 10 = { + send_interface_toast = { + title = travel.food_poisoning + left_icon = root + contract_disease_effect = { DISEASE = ill TREATMENT_EVENT = no } + } + } + } + stress_impact = { + gluttonous = medium_stress_impact_loss + comfort_eater = medium_stress_impact_loss + humble = medium_stress_impact_gain + temperate = medium_stress_impact_gain + inappetetic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = humble + has_trait = inappetetic + } + } + modifier = { + factor = 0 + prestige <= minor_prestige_value + } + } + } + + # Yes we do have better food at home... + option = { + name = travel_events.4019.b + scope:pompous_courtier = { + add_opinion = { + target = root + opinion = 5 + modifier = respect_opinion + } + } + stress_impact = { + inappetetic = minor_stress_impact_loss + temperate = minor_stress_impact_loss + gluttonous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = gluttonous + has_trait = content + } + } + } + } + + # Let's take note of the recipe + option = { + name = travel_events.4019.c + trigger = { + root.location.culture = { + has_cultural_tradition = tradition_culinary_art + } + has_trait = scholar + } + add_character_modifier = { + modifier = exotic_recipe_modifier + years = 5 + } + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = lazy + } + } + } +} + +# Strong believers harass your caravan and demand payment +travel_events.4020 = { + type = character_event + title = travel_events.4020.t + desc = travel_events.4020.desc + theme = travel_danger + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:strong_believer_scope + animation = rage + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + faith.religion != root.faith.religion + culture = { has_cultural_tradition = tradition_zealous_people } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = scholar_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = strong_believer_scope + after_creation = { + add_character_flag = created + } + } + select_local_animal_effect = { TYPE = prowling } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + # Debate me in the arena of facts and logic + option = { + name = travel_events.4020.a + duel = { + skill = learning + target = scope:strong_believer_scope + 50 = { # You manage to haggle the price down + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 50 = { # You fail and they get pissed + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_piety = medium_piety_loss + remove_short_term_gold = minor_gold_value + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = humble + } + } + } + } + + # Pay the tax + option = { + name = travel_events.4020.b + remove_short_term_gold = minor_gold_value + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = medium_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = greedy + has_trait = zealous + } + } + modifier = { + factor = 0 + short_term_gold < minor_gold_value + } + } + } + + # Have them burned + option = { + name = travel_events.4020.c + trigger = { + OR = { + has_trait = sadistic + has_trait = wrathful + has_trait = impatient + has_trait = zealous + } + } + scope:strong_believer_scope = { + death = { + killer = root + death_reason = death_burned_witch + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + zealous = medium_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + } + } + } + } + + after = { + scope:strong_believer_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You witness a human sacrifice! +travel_events.4021 = { + type = character_event + title = travel_events.4021.t + desc = { + desc = travel_events.4021.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + desc = travel_events.4021.desc.mid.sadist + } + desc = travel_events.4021.desc.mid + } + first_valid = { + triggered_desc = { + trigger = { + is_cannibal_trigger = yes + } + desc = travel_events.4021.desc.outro.cannibal + } + triggered_desc = { + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + desc = travel_events.4021.desc.outro.sadist + } + desc = travel_events.4021.desc.outro + } + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = personality_callous + } + animation = disbelief + } + right_portrait = { + character = scope:sacrificed_person_scope + animation = prisondungeon + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + # Human sacrifice should be shocking to you + NOT = { root.faith = { has_doctrine_parameter = human_sacrifice_active } } + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + faith = { has_doctrine_parameter = human_sacrifice_active } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = sacrificed_person_scope + after_creation = { + add_character_flag = created + } + } + if = { + limit = { + root.current_travel_plan = { + any_entourage_character = { + has_relation_rival = root + is_ruler = no + } + } + } + root.current_travel_plan = { + random_entourage_character = { + limit = { + has_relation_rival = root + is_ruler = no + } + save_scope_as = rival_to_sacrifice + } + } + } + scope:sacrificed_person_scope = { + add_character_flag = is_naked + } + } + + # Buy the sacrifice as your servant + option = { + name = travel_events.4021.b + remove_short_term_gold = medium_gold_value + add_courtier = scope:sacrificed_person_scope + root.current_travel_plan = { + add_companion = scope:sacrificed_person_scope + } + scope:sacrificed_person_scope = { + add_opinion = { + modifier = feast_saved_my_life_opinion + target = root + } + } + stress_impact = { + sadistic = medium_stress_impact_gain + callous = medium_stress_impact_gain + greedy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = greedy + has_trait = zealous + has_trait = paranoid + } + } + modifier = { + factor = 0 + short_term_gold <= medium_gold_value + } + } + } + + # Offer up your own sacrifice! + option = { + name = travel_events.4021.c + trigger = { + exists = scope:rival_to_sacrifice + } + add_piety = medium_piety_loss + scope:rival_to_sacrifice = { + death = { + killer = root + death_reason = death_sacrificed_to_foreign_gods + } + } + add_courtier = scope:sacrificed_person_scope + root.current_travel_plan = { + add_companion = scope:sacrificed_person_scope + } + scope:sacrificed_person_scope = { + add_opinion = { + modifier = feast_saved_my_life_opinion + target = root + } + } + stress_impact = { + vengeful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + calm = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + has_trait = forgiving + } + } + } + } + # Just let it happen + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { has_trait = sadistic } + desc = travel_events.4021.a.sadist + } + desc = travel_events.4021.a + } + } + } + scope:sacrificed_person_scope = { + death = { + death_reason = death_sacrificed_to_gods + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = zealous + } + } + } + } + after = { + scope:sacrificed_person_scope ?= { + remove_character_flag = is_naked + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You witness some tree worship in a Sanctity of Nature province +travel_events.4022 = { + type = character_event + title = travel_events.4022.t + desc = travel_events.4022.desc + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + NOT = { faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } } + } + animation = anger + } + triggered_animation = { + trigger = { + has_trait = zealous + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + animation = admiration + } + animation = interested + } + right_portrait = { + character = location.county.holder + animation = dancing + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + faith != root.faith + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + } + # Sit back and watch the ceremony + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + desc = travel_events.4022.a.not_so_different + } + triggered_desc = { + trigger = { + has_trait = zealous + NOT = { faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } } + } + desc = travel_events.4022.a.ignore_heretics + } + desc = travel_events.4022.a + } + } + } + stress_impact = { + sadistic = medium_stress_impact_gain + } + if = { + limit = { + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + add_piety = minor_piety_gain + stress_impact = { + zealous = minor_stress_impact_loss + } + } + else = { + stress_impact = { + zealous = medium_stress_impact_gain + } + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + else = { + random = { + chance = root.learning + add_trait = lifestyle_mystic + } + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + AND = { + has_trait = zealous + NOT = { faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } } + } + } + } + } + } + + # Burn the tree! + option = { + name = travel_events.4022.b + trigger = { + NOT = { faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } } + } + duel = { + skill = prowess + value = medium_skill_rating + 50 = { # You manage to burn the tree without getting beaten up + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.burn_the_tree + left_icon = root + add_piety = medium_piety_gain + location.county.holder = { + if = { + limit = { + faith = root.location.county.faith + } + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + if = { + limit = { + liege ?= { + faith = root.location.county.faith + this != root.location.county.holder + } + } + liege = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + if = { + limit = { + top_liege ?= { + faith = root.location.county.faith + NOR = { + this = root.location.county.holder + this = root.location.county.holder.liege + } + } + } + top_liege = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } + } + } + 50 = { # You are beaten up attempting to burn the tree + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.beaten_by_peasants + left_icon = root + increase_wounds_no_death_effect = { REASON = fight } + add_prestige = medium_prestige_loss + } + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + has_trait = just + has_trait = forgiving + } + } + ai_value_modifier = { + ai_zeal = 1 + } + } + } + + # Join the ceremony + option = { + name = travel_events.4022.c + if = { + limit = { + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + } + add_piety = medium_piety_gain + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + if = { + limit = { + root.location.culture != root.culture + } + root.culture = { + change_cultural_acceptance = { + target = root.location.culture + value = 1 + desc = cultural_acceptance_participated_in_festival + } + } + } + stress_impact = { + curious = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + shy = medium_stress_impact_loss + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + AND = { + faith = { has_doctrine_parameter = believes_in_harmony_with_nature_invisible } + has_trait = zealous + } + } + } + } + } +} + +# Prester John! You find a same-religion ruler in a faraway land +travel_events.4023 = { + type = character_event + title = travel_events.4023.t + desc = { + desc = travel_events.4023.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + scope:prester_john_scope = { is_male = yes } + } + desc = travel_events.4023.desc.mid.john + } + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + scope:prester_john_scope = { is_female = yes } + } + desc = travel_events.4023.desc.mid.joan + } + desc = travel_events.4023.desc.mid + } + desc = travel_events.4023.desc.outro + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = cynical + } + animation = personality_cynical + } + animation = admiration + } + right_portrait = { + character = scope:prester_john_scope + animation = personality_zealous + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_landed = yes + is_location_valid_for_travel_event_on_land = yes + location.county.holder.top_liege ?= { + religion = root.religion + faith != root.faith # This shouldn't happen for Icelandic Catholics visiting Catholic Jerusalem + NOT = { in_diplomatic_range = root } + # They must be "surrounded" by other religions + save_temporary_scope_as = location_top_liege + any_neighboring_top_liege_realm = { + count < 3 + holder = { + religion = scope:location_top_liege.religion + } + } + any_neighboring_top_liege_realm = { + count > 3 + holder = { + religion != scope:location_top_liege.religion + } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + root.location.county.holder.top_liege = { + save_scope_as = prester_john_scope + } + save_scope_as = foreign_visitor + } + # Fanboy out and ask to see "Prester John" + option = { + name = travel_events.4023.a + add_piety = minor_piety_gain + custom_tooltip = john_may_reward_you_tt + scope:prester_john_scope = { + trigger_event = travel_events.4024 + } + stress_impact = { + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = cynical + has_trait = shy + } + } + } + } + # Visit "Prester John" and tell him that it is his duty to spread the faith + option = { + name = travel_events.4023.b + add_piety = medium_piety_gain + if = { + limit = { + NOT = { + has_trait = holy_warrior + } + } + add_trait = holy_warrior + } + hidden_effect = { + scope:prester_john_scope = { + trigger_event = travel_events.4025 + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 2 + OR = { + has_trait = zealous + has_trait = holy_warrior + } + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = cynical + has_trait = shy + } + } + } + } + # They may be [religion], but they are still [faith] heretics! + option = { + name = travel_events.4023.c + trigger = { + faith = { + faith_hostility_level = { + target = root.location.faith + value >= faith_hostile_level + } + } + } + add_piety = minor_piety_gain + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + } + } + } + } + + # That's cool I guess. Moving on + option = { + name = travel_events.4023.d + + stress_impact = { + zealous = medium_stress_impact_gain + curious = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = curious + has_trait = gregarious + } + } + } + } +} + +# Prester John is told of the visitor +travel_events.4024 = { + type = character_event + title = travel_events.4024.t + desc = { + desc = travel_events.4024.desc.intro + desc = travel_events.4024.desc.mid + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:foreign_visitor + animation = admiration + } + cooldown = { years = 10 } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = chaplain_scope } + } + + # Fanboy back! Become friends :) + option = { + name = travel_events.4024.a + add_piety = minor_piety_gain + custom_tooltip = may_become_friends_tt + scope:foreign_visitor = { + trigger_event = travel_events.4026 + } + stress_impact = { + arrogant = medium_stress_impact_gain + cynical = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = cynical + has_trait = shy + } + } + } + } + # They may be [religion], but they are still [faith] heretics! + option = { + name = travel_events.4024.b + trigger = { + # This should be true anyway, but just in case + faith != scope:foreign_visitor.faith + } + show_as_tooltip = { + duel = { + skill = learning + target = scope:foreign_visitor + 50 = { # You win the debate + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 50 = { # You lose the debate + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_piety = minor_piety_loss + add_stress = minor_stress_gain + } + } + } + } + hidden_effect = { + scope:foreign_visitor = { + trigger_event = travel_events.4027 + } + } + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = humble + } + } + } + } + + # Give them your chaplain as a gift + option = { + name = travel_events.4024.c + trigger = { scope:chaplain_scope = { is_landed = no } is_available_allow_travelling = yes } + scope:foreign_visitor = { + send_interface_toast = { + title = travel.gift_from_john + left_icon = scope:foreign_visitor + right_icon = scope:chaplain_scope + add_courtier = scope:chaplain_scope + root.current_travel_plan = { + add_companion = scope:chaplain_scope + } + add_opinion = { + modifier = gift_opinion + opinion = 25 + target = scope:prester_john_scope + } + } + } + stress_impact = { + zealous = minor_stress_impact_loss + arrogant = minor_stress_impact_loss + gregarious = medium_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = just + } + } + } + } + + # That's cool I guess. Moving on + option = { + name = travel_events.4024.d + scope:foreign_visitor = { + send_interface_toast = { + title = travel.turned_away_from_john + left_icon = scope:foreign_visitor + right_icon = scope:prester_john_scope + add_prestige = minor_prestige_loss + add_opinion = { + modifier = insulted_opinion + opinion = -20 + target = scope:prester_john_scope + } + } + } + stress_impact = { + zealous = medium_stress_impact_gain + curious = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = curious + has_trait = gregarious + } + } + } + } +} + +# Prester John encouraged to to take up the sword against heretics +travel_events.4025 = { + type = character_event + title = travel_events.4025.t + desc = { + desc = travel_events.4024.desc.intro + desc = travel_events.4025.desc.mid + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:foreign_visitor + animation = personality_bold + } + cooldown = { years = 10 } + + # Heretic bashing time + option = { + name = travel_events.4025.a + add_trait = holy_warrior + if = { + limit = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + } + if = { + limit = { is_male = yes } + give_nickname = nick_prester_john + } + else = { + give_nickname = nick_prester_joan + } + } + every_neighboring_and_across_water_top_liege_realm = { + custom = travel_events.4025.different_religion_neighbors_and_vassals + limit = { + holder.religion != root.religion + } + holder = { + add_opinion = { + modifier = insult_opinion + opinion = -25 + target = root + } + } + } + #Hidden because the above tooltip should inform you + hidden_effect = { + every_vassal = { + limit = { + religion != root.religion + } + add_opinion = { + modifier = insult_opinion + opinion = -25 + target = root + } + } + } + stress_impact = { + zealous = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + cynical = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = cynical + has_trait = gregarious + } + } + } + } + # No + option = { + name = travel_events.4025.b + scope:foreign_visitor = { + send_interface_toast = { + title = travel.visitor_rejected_me + left_icon = scope:foreign_visitor + right_icon = scope:prester_john_scope + add_opinion = { + modifier = disappointed_opinion + opinion = -25 + target = root + } + } + } + stress_impact = { + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + has_trait = shy + } + } + } +} + +# Prester John wants to be penpals! +travel_events.4026 = { + type = character_event + title = travel_events.4026.t + desc = travel_events.4026.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:prester_john_scope + animation = admiration + } + cooldown = { years = 10 } + + # Fren time + option = { + name = travel_events.4026.a + scope:prester_john_scope = { + send_interface_toast = { + title = travel.became_friends_with_visitor + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + set_relation_friend = { + reason = friend_respected_other_religion + target = scope:foreign_visitor + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = shy + } + } + } + # No frens + option = { + name = travel_events.4026.b + scope:prester_john_scope = { + send_interface_toast = { + title = travel.visitor_rejected_friendship + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_opinion = { + modifier = disappointed_opinion + opinion = -25 + target = root + } + } + } + stress_impact = { + gregarious = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + has_trait = shy + } + } + } +} + +# Prester John wants to debate you +travel_events.4027 = { + type = character_event + title = travel_events.4027.t + desc = travel_events.4027.desc + theme = travel + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:prester_john_scope + animation = anger + } + cooldown = { years = 10 } + + # Debate me bro + option = { + name = travel_events.4027.a + duel = { + skill = learning + target = scope:prester_john_scope + 50 = { # You win the debate + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_piety = medium_piety_gain + } + scope:prester_john_scope = { + send_interface_toast = { + title = travel.debate_lost + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_piety = minor_piety_loss + add_stress = minor_stress_gain + } + } + } + 50 = { # You lose the debate + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_piety = minor_piety_loss + add_stress = minor_stress_gain + scope:prester_john_scope = { + send_interface_toast = { + title = travel.debate_won + left_icon = scope:prester_john_scope + right_icon = scope:foreign_visitor + add_piety = medium_piety_gain + } + } + } + } + } + } +} + +# You come across a runestone! +travel_events.4028 = { + type = character_event + title = travel_events.4028.t + desc = travel_events.4028.desc + theme = travel + left_portrait = { + character = root + camera = camera_event_left_away_3_4 + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = anger + } + animation = survey + } + cooldown = { years = 10 } + override_background = { reference = fp1_runestone } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + # You're not used to Runestones + NOT = { root.culture = { has_cultural_parameter = has_access_to_runestones } } + # This place do be having Runestones tho + location.county.culture = { has_cultural_parameter = has_access_to_runestones } + # You'd be unlikely to understand the written language on the stone + NOT = { knows_language_of_culture = location.county.culture } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + } + # Attempt to read the runestone + option = { + name = travel_events.4028.a + duel = { + skill = learning + value = high_skill_rating + 50 = { # You read the runestone + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.read_runestone + left_icon = root + add_learning_lifestyle_xp = major_lifestyle_xp + } + } + 50 = { # You fail + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.failed_to_read_runestone + left_icon = root + add_prestige = minor_prestige_loss + } + } + } + stress_impact = { + scholar = medium_stress_impact_loss + dull = medium_stress_impact_gain + lazy = medium_stress_impact_gain + zealous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = dull + has_trait = lazy + has_trait = zealous + has_trait = sadistic + } + } + } + } + + # Topple the stone! + option = { + name = travel_events.4028.b + if = { + limit = { faith_is_aniconic_trigger = yes } + add_piety = medium_piety_gain + } + else = { + add_piety = minor_piety_gain + } + stress_impact = { + sadistic = minor_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + craven = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = craven + has_trait = just + has_trait = forgiving + } + } + } + } + + # Just pass by + option = { + name = travel_events.4028.c + stress_impact = { + curious = minor_stress_impact_gain + zealous = minor_stress_impact_gain + sadistic = medium_stress_impact_gain + scholar = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = curious + has_trait = zealous + has_trait = sadistic + has_trait = scholar + } + } + } + } +} + +# You come across dimwit strung up on a post +travel_events.4029 = { + type = character_event + title = travel_events.4029.t + desc = { + desc = travel_events.4029.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = travel_events.4029.desc.mid.christian + } + desc = travel_events.4029.desc.mid + } + desc = travel_events.4029.desc.outro + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = sadistic + } + animation = admiration + } + triggered_animation = { + trigger = { + has_trait = callous + } + animation = personality_rational + } + animation = shock + } + right_portrait = { + character = scope:brainless_character + animation = pain + } + override_background = { reference = battlefield } + cooldown = { years = 30 } + trigger = { + static_group_filter = { + group = wizard_of_oz_group + match = 0.1 + } + is_available_travelling = yes + is_playable_character = yes + root.location = { terrain = farmlands } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + create_character = { + template = brainless_character_template + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = brainless_character + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:brainless_character = { + give_nickname = nick_the_thoughtless + random_list = { + 50 = { + set_to_lowborn = yes + } + 50 = { # They're someone important! + add_gold = 50 + } + } + } + } + } + # Cut them down from there + option = { + name = travel_events.4029.a + custom_tooltip = brainless_may_reward_you_tt + trigger_event = travel_events.4030 + stress_impact = { + compassionate = medium_stress_impact_loss + paranoid = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + arbitrary = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = paranoid + has_trait = callous + has_trait = sadistic + has_trait = arbitrary + } + } + } + } + + # Cut them down.... and imprison them! + option = { + name = travel_events.4029.b + rightfully_imprison_character_effect = { + TARGET = scope:brainless_character + IMPRISONER = root + } + add_piety = minor_piety_gain + stress_impact = { + callous = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + } + } + } + } + + # Just pass by + option = { + name = travel_events.4029.c + scope:brainless_character = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } + after = { + scope:brainless_character = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +travel_events.4030 = { + type = character_event + title = travel_events.4030.t + desc = { + desc = travel_events.4030.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:brainless_character = { + is_lowborn = yes + } + } + desc = travel_events.4030.desc.mid.lowborn + } + desc = travel_events.4030.desc.mid.noble + } + desc = travel_events.4030.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:brainless_character + animation = personality_forgiving + } + cooldown = { years = 10 } + weight_multiplier = { + base = 1 + modifier = { + involved_activity = { + has_activity_type = activity_pilgrimage + } + factor = 0.5 + } + } + # Welcome them to your entourage + option = { + name = travel_events.4030.a + add_courtier = scope:brainless_character + root.current_travel_plan = { + add_companion = scope:brainless_character + } + scope:brainless_character = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + shy = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = shy + has_trait = paranoid + has_trait = greedy + } + } + } + } + + # Take their reward + option = { + name = travel_events.4030.b + if = { + limit = { + scope:brainless_character = { is_lowborn = yes } + } + add_gold = tiny_gold_value + } + else = { + add_gold = minor_gold_value + } + add_hook = { + type = favor_hook + target = scope:brainless_character + } + if = { + limit = { + NOT = { # We currently don't have any doctrines that do this, but good to future-proof + root.faith = { trait_is_virtue = greedy } + } + } + add_piety = minor_piety_loss + } + stress_impact = { + humble = medium_stress_impact_gain + generous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = humble + has_trait = generous + } + } + } + } + + # Let them go without a reward + option = { + name = travel_events.4030.c + add_piety = medium_piety_gain + stress_impact = { + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = greedy + } + } + } + after = { + if = { + limit = { + is_ai = yes + scope:brainless_character = { + is_alive = yes + NOT = { is_courtier_of = root } + } + } + scope:brainless_character = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +# You come across a knight stuck in his armour +travel_events.4031 = { + type = character_event + title = travel_events.4031.t + desc = { + desc = travel_events.4031.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + desc = travel_events.4031.desc.mid.callous + } + desc = travel_events.4031.desc.mid + } + desc = travel_events.4031.desc.outro + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = sadistic + has_trait = callous + } + } + animation = laugh + } + animation = shock + } + right_portrait = { + character = scope:heartless_knight_scope + animation = rage + } + cooldown = { years = 30 } + trigger = { + static_group_filter = { + group = wizard_of_oz_group + match = 0.1 + } + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + is_valid_for_east_asian_events_trigger = no + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = heartless_knight + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = heartless_knight_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:heartless_knight_scope = { + if = { + limit = { root = { is_ai = no } } + give_nickname = nick_the_heartless + } + add_character_flag = single_combat_duel_armor + } + } + } + # Help them unsuit, for a reward + option = { + name = travel_events.4031.a + add_gold = { + value = minor_gold_value + max = 30 + } + add_hook = { + type = favor_hook + target = scope:heartless_knight_scope + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = generous + } + } + } + } + + # Help them unsuit, for their loyalty + option = { + name = travel_events.4031.b + add_courtier = scope:heartless_knight_scope + root.current_travel_plan = { + add_companion = scope:heartless_knight_scope + } + scope:heartless_knight_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + if = { + limit = { + NOT = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = root + } + } + } + custom_tooltip = ignores_gender_army_rules_tt + add_character_modifier = ignores_gender_army_rules + } + } + if = { + limit = { + can_employ_court_position_type = champion_court_position + } + court_position_grant_effect = { + CANDIDATE = scope:heartless_knight_scope + EMPLOYER = root + POS = champion + } + } + else_if = { + limit = { + can_employ_court_position_type = bodyguard_court_position + } + court_position_grant_effect = { + CANDIDATE = scope:heartless_knight_scope + EMPLOYER = root + POS = bodyguard + } + } + stress_impact = { + callous = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + paranoid = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = shy + has_trait = paranoid + has_trait = greedy + } + } + } + } + + # Cackle at them and walk away + option = { + name = travel_events.4031.c + add_prestige = miniscule_prestige_gain + if = { + limit = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + forgiving = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + else = { + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + greedy = medium_stress_impact_gain + } + } + ai_chance = { + base = 0 + modifier = { + add = 100 + OR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = greedy + } + } + } + } + after = { + hidden_effect = { + scope:heartless_knight_scope = { + remove_character_flag = single_combat_duel_armor + silent_disappearance_ai_if_created_effect = yes + } + } + } +} + +# You come across a noble being assaulted by a random animal +travel_events.4032 = { + type = character_event + title = travel_events.4032.t + desc = travel_events.4032.desc + theme = travel + left_portrait = { + character = root + scripted_animation = duel_wield_weapon + } + right_portrait = { + character = scope:cowardly_knight_scope + animation = fear + } + lower_right_portrait = scope:entourage_helper + cooldown = { years = 30 } + trigger = { + static_group_filter = { + group = wizard_of_oz_group + match = 0.1 + } + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + current_travel_plan = { + any_entourage_character = { + this != root + is_ai = yes + is_adult = yes + is_healthy = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_high } + hidden_effect = { + select_local_animal_effect = { TYPE = prowling } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + create_character = { + template = cowardly_knight + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = cowardly_knight_scope + after_creation = { + add_character_flag = created + } + } + scope:cowardly_knight_scope ?= { + give_nickname = nick_the_craven + change_trait_rank = { + trait = wounded + rank = 1 + max = 3 + } + } + current_travel_plan = { + ordered_entourage_character = { + order_by = prowess + limit = { + this != root + is_ai = yes + is_adult = yes + is_healthy = yes + can_be_combatant_based_on_gender_trigger = { ARMY_OWNER = root } + } + save_scope_as = entourage_helper + } + } + } + } + + # Entourage member helps them + option = { + name = travel_events.4032.b + #Lower personal risk, a bit lower reward + scope:entourage_helper = { + duel = { + skill = prowess + value = high_skill_rating + 50 = { # Your companion defeats the lion + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + if = { + limit = { + accolade ?= { is_accolade_active = yes } + } + accolade = { add_glory = minor_glory_gain } + } + root = { + send_interface_toast = { + title = travel.beat_back_lion + left_icon = root + add_prestige = medium_prestige_gain + } + } + } + 50 = { # Your companion is mauled by a lion + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + if = { + limit = { + accolade ?= { is_accolade_active = yes } + } + accolade = { add_glory = minor_glory_gain } + } + send_interface_toast = { + title = travel.mauled_by_animal + left_icon = root + increase_wounds_effect = { REASON = wild_animal } + scope:cowardly_knight_scope = { + death = { + death_reason = death_wild_animal + } + } + } + } + } + } + if = { #Always the pious thing to do, even if you failed. + limit = { has_pious_pilgrimage_type_trigger = yes } + pious_type_option_effect = yes + + } + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + brave = minor_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + has_trait = sadistic + } + modifier = { + add = -25 + has_trait = brave + } + } + } + # Help them yourself + option = { + name = travel_events.4032.a + duel = { + skill = prowess + value = high_skill_rating + 50 = { # You fight back the lion + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.beat_back_lion + left_icon = root + add_prestige = medium_prestige_gain + add_courtier = scope:cowardly_knight_scope + root.current_travel_plan = { + add_companion = scope:cowardly_knight_scope + } + scope:cowardly_knight_scope = { + add_opinion = { + modifier = feast_saved_my_life_opinion + target = root + } + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + if = { + limit = { + NOT = { + can_be_combatant_based_on_gender_trigger = { + ARMY_OWNER = root + } + } + } + custom_tooltip = ignores_gender_army_rules_tt + add_character_modifier = ignores_gender_army_rules + } + } + } + + } + 50 = { # You are mauled by a lion + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.mauled_by_animal + left_icon = root + increase_wounds_effect = { REASON = wild_animal } + scope:cowardly_knight_scope = { + death = { + death_reason = death_wild_animal + } + } + } + } + } + if = { #Always the pious thing to do, even if you failed. + limit = { has_pious_pilgrimage_type_trigger = yes } + pious_type_option_effect = yes + + } + stress_impact = { + craven = major_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 3 + has_trait = brave + } + modifier = { + factor = 0 + OR = { + has_trait = callous + has_trait = sadistic + has_trait = craven + } + } + } + } + + # Just walk away + option = { + name = travel_events.4032.c + scope:cowardly_knight_scope = { + death = { + death_reason = death_wild_animal + } + } + stress_impact = { + callous = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + craven = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + brave = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + add = -50 + NOR = { + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0.25 + OR = { + has_trait = compassionate + has_trait = just + has_trait = brave + } + } + } + } + after = { + scope:cowardly_knight_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# A witch who strangely isn't being burned +travel_events.4033 = { + type = character_event + title = travel_events.4033.t + desc = { + desc = travel_events.4033.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = travel_events.4033.desc.mid.zealous + } + desc = travel_events.4033.desc.mid + } + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = personality_callous + } + animation = personality_rational + } + right_portrait = { + character = scope:witch_scope + animation = personality_compassionate + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_witch_trigger = no + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + faith = { has_doctrine_parameter = witchcraft_accepted } + } + } + OR = { + faith = { has_doctrine_parameter = witchcraft_shunned } + faith = { has_doctrine_parameter = witchcraft_illegal } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = witchy_template + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = witch_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:witch_scope = { + add_trait = witch + } + } + } + # Debate the sinful nature of Witchcraft + option = { + name = travel_events.4033.a + duel = { + skill = learning + target = scope:witch_scope + 5 = { # Critical success: the Witch becomes convinced of their own wickedness and joins you to repent + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + right_icon = scope:witch_scope + add_piety = medium_piety_gain + scope:witch_scope = { + set_character_faith = root.faith + remove_trait = witch + } + add_courtier = scope:witch_scope + root.current_travel_plan = { + add_companion = scope:witch_scope + } + } + } + 45 = { # You convince the peasantry that witchcraft is evil + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 45 = { # You fail to convince them + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_piety = minor_piety_loss + } + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = cynical + has_trait = arrogant + has_trait = impatient + } + } + } + } + + # Teach me to be a Witch! + option = { + name = travel_events.4033.b + trigger = { + NOT = { has_trait = zealous } + OR = { #have a witchy trait + has_trait = cynical + has_trait = deceitful + has_trait = fickle + has_trait = arbitrary + } + } + give_witch_secret_or_trait_effect = yes + add_piety = medium_piety_loss + pay_short_term_gold = { + target = scope:witch_scope + gold = minor_gold_value + } + add_courtier = scope:witch_scope + root.current_travel_plan = { + add_companion = scope:witch_scope + } + set_relation_friend = scope:witch_scope + hidden_effect = { + scope:witch_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:witch_scope.faith + } + } + custom_tooltip = cheaper_to_convert_to_witchy_faith_tt + stress_impact = { + base = medium_stress_impact_gain + cynical = medium_stress_impact_loss + } + ai_chance = { # The AI should never do this + base = 0 + modifier = { # Unless you're cynical/ambitious + add = 50 + has_trait = cynical + } + } + } + + # Pass them by + option = { + name = travel_events.4033.c + stress_impact = { + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + # Have them burned + option = { + name = travel_events.4033.d + trigger = { + NOT = { has_trait = cynical } + } + duel = { + skill = diplomacy + value = medium_skill_rating + 50 = { # You burn the witch + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.burned_witch + left_icon = root + add_piety = medium_piety_gain + scope:witch_scope = { + death = { + killer = root + death_reason = death_burned + } + } + } + hidden_effect = { # Get a cool witchy artifact! + random_list = { + 95 = { + + } + 5 = { + trigger_event = travel_events.4034 + } + } + } + } + 50 = { # You get beaten up by the locals + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.beaten_by_locals + left_icon = root + add_prestige = medium_prestige_loss + } + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + zealous = major_stress_impact_loss + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + calm = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + } + } + } + } + + after = { + scope:witch_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# A witchy artifact in the ashes +travel_events.4034 = { + type = character_event + title = travel_events.4034.t + desc = { + desc = travel_events.4034.desc.intro + first_valid = { + triggered_desc = { + trigger = { + exists = var:artifact_is_bones + } + desc = travel_events.4034.desc.mid.bones + } + desc = travel_events.4034.desc.mid + } + desc = travel_events.4034.desc.outro + } + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + artifact = { + target = scope:witchy_artifact_scope + position = lower_left_portrait + } + override_background = { reference = battlefield } + immediate = { + random_list = { + 10 = { + set_artifact_rarity_famed = yes + create_artifact = { + name = jewelled_slippers + description = jewelled_slippers_description + type = miscellaneous + visuals = small_box + template = witchy_shoes_template + modifier = artifact_monthly_prestige_2_modifier + modifier = artifact_stress_gain_4_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = witchy_artifact_scope + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = witchcraft_book + description = witchcraft_book_description + type = miscellaneous + visuals = book + template = witchy_book_template + modifier = artifact_health_gain_1_modifier + modifier = artifact_learning_per_piety_level_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = witchy_artifact_scope + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = witchy_holy_text_mid + description = witchy_holy_text_mid_description + type = miscellaneous + visuals = book + template = holy_book_template + modifier = artifact_monthly_piety_1_modifier + modifier = artifact_learning_per_piety_level_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = witchy_artifact_scope + } + scope:witchy_artifact_scope = { + set_variable = { + name = relic_religion + value = scope:witch_scope.religion + } + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = immaculate_witchy_bones + description = immaculate_witchy_bones_description + type = miscellaneous + visuals = human_skull + modifier = artifact_dread_gain_mult_2_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = witchy_artifact_scope + } + set_variable = { + name = artifact_is_bones + value = yes + days = 7 + } + } + } + } + # Cool + option = { + name = travel_events.4034.a + } +} + +# You are a witch and you're being harassed by locals +travel_events.4035 = { + type = character_event + title = travel_events.4035.t + desc = { + desc = travel_events.4035.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = zealous + } + desc = travel_events.4035.desc.mid.zealous + } + desc = travel_events.4035.desc.mid + } + desc = travel_events.4035.desc.outro + } + theme = travel + left_portrait = { + character = root + triggered_animation = { + trigger = { + has_trait = zealous + } + animation = personality_callous + } + animation = personality_rational + } + right_portrait = { + character = scope:zealous_priest_scope + animation = personality_compassionate + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_witch_trigger = yes + is_location_valid_for_travel_event_on_land = yes + location = { + county = { + OR = { + faith = { has_doctrine_parameter = witchcraft_shunned } + faith = { has_doctrine_parameter = witchcraft_illegal } + } + } + } + faith = { has_doctrine_parameter = witchcraft_accepted } + } + immediate = { + create_character = { + template = priest_character_template + location = root.location + culture = root.location.county.culture + faith = root.location.county.faith + #Set up the scope + save_scope_as = zealous_priest_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:zealous_priest_scope = { + add_trait = zealous + } + } + } + # Debate the sinful nature of Witchcraft + option = { + name = travel_events.4035.a + duel = { + skill = learning + target = scope:zealous_priest_scope + 5 = { # Critical success: the Witch becomes convinced of their own wickedness and joins you to repent + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + right_icon = scope:zealous_priest_scope + add_piety = medium_piety_gain + scope:zealous_priest_scope = { + set_character_faith = root.faith + add_trait = witch + } + add_courtier = scope:zealous_priest_scope + root.current_travel_plan = { + add_companion = scope:zealous_priest_scope + } + } + } + 45 = { # You convince the peasantry that witchcraft is good actually + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.debate_won + left_icon = root + add_piety = medium_piety_gain + } + } + 45 = { # You fail to convince them + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.debate_lost + left_icon = root + add_piety = minor_piety_loss + add_stress = minor_stress_gain + increase_wounds_effect = { REASON = burned_witch } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + cynical = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + impatient = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = cynical + has_trait = arrogant + has_trait = impatient + } + } + } + } + + # I repent my witchy ways! + option = { + name = travel_events.4035.b + remove_witch_secret_or_trait_effect = yes + add_piety = medium_piety_loss + pay_short_term_gold = { + target = scope:zealous_priest_scope + gold = minor_gold_value + } + add_courtier = scope:zealous_priest_scope + root.current_travel_plan = { + add_companion = scope:zealous_priest_scope + } + set_relation_friend = scope:zealous_priest_scope + hidden_effect = { + scope:zealous_priest_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:zealous_priest_scope.faith + } + } + custom_tooltip = cheaper_to_convert_to_priest_faith_tt + stress_impact = { + base = medium_stress_impact_gain + ambitious = minor_stress_impact_loss + cynical = medium_stress_impact_loss + content = major_stress_impact_gain + zealous = massive_stress_impact_gain + } + ai_chance = { # The AI should never do this + base = 0 + modifier = { # Unless you're cynical/ambitious + add = 50 + OR = { + has_trait = cynical + has_trait = ambitious + } + } + modifier = { # Unless you're cynical/ambitious + factor = 0 + OR = { + has_trait = content + has_trait = zealous + } + } + } + } + + # Run away! + option = { + name = travel_events.4035.c + stress_impact = { + zealous = medium_stress_impact_gain + brave = major_stress_impact_gain + } + ai_chance = { + base = 100 + } + } + + # Fight em + option = { + name = travel_events.4035.d + if = { + limit = { + exists = root.current_travel_plan.travel_leader + } + root.current_travel_plan.travel_leader = { + duel = { + skill = prowess + target = scope:zealous_priest_scope + 50 = { # You beat up the witch hater + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + root = { + send_interface_toast = { + title = travel.beat_zealot + left_icon = root + add_piety = medium_piety_gain + add_prestige = minor_prestige_gain + scope:zealous_priest_scope = { + increase_wounds_effect = { + REASON = fight + } + } + } + } + } + 50 = { # You get beaten up by the locals + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + root = { + send_interface_toast = { + title = travel.beaten_by_locals + left_icon = root + prev = { + increase_wounds_effect = { REASON = fight } + } + add_prestige = medium_prestige_loss + } + } + } + } + } + } + else = { + duel = { + skill = prowess + target = scope:zealous_priest_scope + 50 = { # You beat up the witch hater + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + root = { + send_interface_toast = { + title = travel.beat_zealot + left_icon = root + add_piety = medium_piety_gain + add_prestige = minor_prestige_gain + scope:zealous_priest_scope = { + increase_wounds_effect = { + REASON = fight + } + } + } + } + } + 50 = { # You get beaten up by the locals + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + root = { + send_interface_toast = { + title = travel.beaten_by_locals + left_icon = root + prev = { + increase_wounds_effect = { REASON = fight } + } + add_prestige = medium_prestige_loss + } + } + } + } + } + stress_impact = { + sadistic = medium_stress_impact_loss + callous = medium_stress_impact_loss + zealous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + just = major_stress_impact_gain + calm = major_stress_impact_gain + craven = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = calm + has_trait = craven + } + } + } + } + + after = { + scope:zealous_priest_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# Caravaneers want to sell you some cool stuff +travel_events.4036 = { + type = character_event + title = travel_events.4036.t + desc = travel_events.4036.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:merchant_character_scope + animation = admiration + } + artifact = { + target = scope:merchant_artifact_scope + position = lower_left_portrait + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location.culture = { + has_cultural_tradition = tradition_caravaneers + } + } + immediate = { + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.culture + faith = root.location.faith + #Set up the scope + save_scope_as = merchant_character_scope + after_creation = { + add_character_flag = created + } + } + root.location.kingdom = { save_scope_as = kingdom_scope } + scope:merchant_character_scope = { + hidden_effect = { + add_trait = avaricious + random_list = { + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = mysterious_lamp + description = mysterious_lamp_description + type = goblet + visuals = riches + modifier = artifact_monthly_prestige_2_modifier + modifier = artifact_court_grandeur_baseline_add_5_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + 10 = { + set_artifact_rarity_masterwork = yes + create_artifact = { + name = mysterious_puzzle + description = mysterious_puzzle_description + type = miscellaneous + visuals = small_box + template = mysterious_puzzle_template + modifier = artifact_learn_language_scheme_phase_duration_add_2_modifier + modifier = artifact_learning_per_stress_level_2_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + 5 = { + set_artifact_rarity_famed = yes + create_artifact = { + name = lunchbox + description = lunchbox_description + type = miscellaneous + visuals = small_box + modifier = artifact_negate_health_penalty_add_2_modifier + modifier = artifact_stress_gain_4_modifier + wealth = scope:wealth + quality = scope:quality + save_scope_as = merchant_artifact_scope + } + } + } + } + } + } + # Buy the artifact! + option = { + name = travel_events.4036.a + if = { + limit = { + scope:merchant_artifact_scope = { + rarity = famed + } + } + remove_short_term_gold = major_gold_value + } + else = { + remove_short_term_gold = medium_gold_value + } + scope:merchant_artifact_scope = { set_owner = root } + stress_impact = { + greedy = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = greedy + has_trait = callous + has_trait = sadistic + } + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + # Attempt to steal the artifact + option = { + name = travel_events.4036.b + duel = { + skill = intrigue + value = very_high_skill_rating + 50 = { # You beat up the fisherman + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.stole_artifact + left_icon = root + scope:merchant_artifact_scope = { set_owner = root } + } + } + 50 = { # You get caught and exposed as a dirty thief! + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.caught_red_handed + left_icon = root + increase_wounds_no_death_effect = { REASON = fight } + add_prestige = major_prestige_loss + add_character_modifier = { + modifier = caught_thief_modifier + years = 5 + } + } + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + base = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + craven = medium_stress_impact_gain + generous = major_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + add = 50 + OR = { + has_trait = sadistic + has_trait = callous + } + } + modifier = { + factor = 0 + OR = { + has_trait = compassionate + has_trait = just + has_trait = forgiving + has_trait = generous + has_trait = craven + } + } + } + } + # Haggle the price + option = { + name = travel_events.4036.d + duel = { + skill = stewardship + target = scope:merchant_character_scope + 50 = { # You pay a lower price + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.haggled_for_artifact + left_icon = root + scope:merchant_artifact_scope = { set_owner = root } + if = { + limit = { + scope:merchant_artifact_scope = { + rarity = famed + } + } + remove_short_term_gold = medium_gold_value + } + else = { + remove_short_term_gold = minor_gold_value + } + } + } + 50 = { # You pay a higher price + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.failed_to_haggle + left_icon = root + scope:merchant_artifact_scope = { set_owner = root } + if = { + limit = { + scope:merchant_artifact_scope = { + rarity = famed + } + } + remove_short_term_gold = massive_gold_value + } + else = { + remove_short_term_gold = major_gold_value + } + } + } + } + stress_impact = { + shy = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + honest = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = deceitful + has_trait = honest + } + } + modifier = { + factor = 0 + short_term_gold <= major_gold_value + } + } + } + # Just go by without buying anything + option = { + name = travel_events.4036.c + ai_chance = { + base = 50 + modifier = { + add = 100 + gold <= massive_gold_value + } + } + } + after = { + hidden_effect = { + if = { + limit = { + scope:merchant_artifact_scope.artifact_owner != root + } + destroy_artifact = scope:merchant_artifact_scope + } + scope:merchant_character_scope = { + if = { + limit = { + root = { is_ai = yes } + } + silent_disappearance_effect = yes + } + } + } + } +} + +# You enter a place that is syncretic with your faith +travel_events.4037 = { + type = character_event + title = travel_events.4037.t + desc = travel_events.4037.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:fanboy_character_scope + animation = admiration + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location.faith != root.faith + OR = { + AND = { + religion = { is_in_family = rf_eastern } + location.faith = { has_doctrine_parameter = eastern_syncretic_actor_opinion_active } + } + AND = { + faith = { has_doctrine_parameter = unreformed } + location.faith = { has_doctrine_parameter = unreformed_syncretic_actor_opinion_active } + } + AND = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + location.faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + } + AND = { + religion = religion:islam_religion + location.faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + } + AND = { + religion = religion:judaism_religion + location.faith = { has_doctrine_parameter = jewish_syncretic_actor_opinion_active } + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = generic_peasant_character + location = root.location + culture = root.location.culture + faith = root.location.faith + #Set up the scope + save_scope_as = fanboy_character_scope + after_creation = { + add_character_flag = created + } + } + } + # Ah, let me teach you all about our lord and savior + option = { + name = travel_events.4037.a + duel = { + skill = learning + value = medium_skill_rating + 50 = { # You perform a good cermon + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.good_cermon + left_icon = root + add_piety = medium_piety_gain + } + } + 50 = { # You perform a mediocre cermon + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.bad_cermon + left_icon = root + add_piety = minor_piety_gain + } + } + } + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + shy = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = lazy + has_trait = shy + has_trait = callous + has_trait = sadistic + has_trait = cynical + } + } + } + } + # I'm more interested in hearing about your faith! + option = { + name = travel_events.4037.b + add_courtier = scope:fanboy_character_scope + root.current_travel_plan = { + add_companion = scope:fanboy_character_scope + } + set_relation_friend = { + reason = friend_respected_other_religion + target = scope:fanboy_character_scope + } + hidden_effect = { + scope:fanboy_character_scope = { + add_character_flag = { + flag = blocked_from_leaving + years = 10 + } + } + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:fanboy_character_scope.faith + } + } + custom_tooltip = cheaper_to_convert_to_fanboy_faith_tt + stress_impact = { + shy = medium_stress_impact_gain + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + zealous = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = callous + has_trait = sadistic + has_trait = zealous + has_trait = arrogant + } + } + } + } + # Eww go away, syncretic weirdos + option = { + name = travel_events.4037.c + stress_impact = { + base = medium_stress_impact_gain + zealous = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = compassionate + has_trait = arrogant + } + } + } + } + + after = { + scope:fanboy_character_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} + +# You enter a province which your faith is syncretic with +travel_events.4038 = { + type = character_event + title = travel_events.4038.t + desc = travel_events.4038.desc + theme = travel + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:zealous_priest_scope + animation = admiration + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + location = { + # Make sure this is a church held by a theocratic or lay clergy character + has_holding = yes + has_holding_type = church_holding + barony = { has_wrong_holding_type = no } + # Make sure you don't bother player lay clergy characters + barony.holder = { is_ai = yes } + barony.holder != root + } + OR = { + AND = { + faith = { has_doctrine_parameter = eastern_syncretic_actor_opinion_active } + location.religion = { is_in_family = rf_eastern } + } + AND = { + faith = { has_doctrine_parameter = unreformed_syncretic_actor_opinion_active } + location.faith = { has_doctrine_parameter = unreformed } + } + AND = { + faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + OR = { location.religion = religion:eastern_orthodox_religion location.religion = religion:catholic_religion location.religion = religion:protestant_religion } + } + AND = { + faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + location.religion = religion:islam_religion + } + AND = { + faith = { has_doctrine_parameter = jewish_syncretic_actor_opinion_active } + location.religion = religion:judaism_religion + } + } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + location.barony.holder = { save_scope_as = zealous_priest_scope } + } + # Let me attend a sermon! + option = { + name = travel_events.4038.a + set_relation_friend = { + reason = friend_respected_other_religion + target = scope:zealous_priest_scope + } + hidden_effect = { + set_variable = { + name = discounted_faith_to_convert_to_var + value = scope:zealous_priest_scope.faith + } + } + custom_tooltip = cheaper_to_convert_to_priest_faith_tt + add_learning_lifestyle_xp = minor_lifestyle_xp + if = { + limit = { + has_trait = lifestyle_mystic + } + add_trait_xp = { + trait = lifestyle_mystic + value = lifestyle_mystic_xp_gain_minor_value + } + } + stress_impact = { + shy = medium_stress_impact_gain + lazy = medium_stress_impact_gain + cynical = medium_stress_impact_gain + zealous = medium_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = arrogant + has_trait = lazy + has_trait = cynical + has_trait = zealous + has_trait = arrogant + } + } + } + } + # Perhaps they would be interested in our perspective + option = { + name = travel_events.4038.b + duel = { + skill = learning + target = scope:zealous_priest_scope + 50 = { # You perform a good cermon + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + send_interface_toast = { + title = travel.good_cermon + left_icon = root + add_piety = medium_piety_gain + add_learning_lifestyle_perk_points = 1 + } + } + 50 = { # You perform a mediocre cermon + compare_modifier = { + value = scope:duel_value + multiplier = -0.5 + } + send_interface_toast = { + title = travel.bad_cermon + left_icon = root + add_piety = minor_piety_loss + if = { + limit = { + faith = { has_doctrine_parameter = eastern_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_eastern_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = unreformed_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_pagan_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = christian_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_christian_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = islamic_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_muslim_modifier + years = 5 + } + } + else_if = { + limit = { + faith = { has_doctrine_parameter = jewish_syncretic_actor_opinion_active } + } + add_character_modifier = { + modifier = offended_jewish_modifier + years = 5 + } + } + } + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + lazy = medium_stress_impact_gain + shy = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = lazy + has_trait = shy + } + } + } + } + # Eww go away, weirdos + option = { + name = travel_events.4038.c + stress_impact = { + base = medium_stress_impact_gain + zealous = medium_stress_impact_loss + gregarious = minor_stress_impact_gain + compassionate = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = compassionate + has_trait = arrogant + } + } + } + } +} + +# You enter a ritual hospitality province and are offered a rest +travel_events.4039 = { + type = character_event + title = travel_events.4039.t + desc = travel_events.4039.desc + theme = travel + left_portrait = { + character = root + animation = stress + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + faith = { NOT = { has_doctrine_parameter = host_honored_guests_active } } + location.faith = { has_doctrine_parameter = host_honored_guests_active } + } + + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_medium } + mp_delay_travel_plan = { DAYS = 90 } + } + + # Perhaps a rest for a few days would be nice... + option = { + name = travel_events.4039.a + current_travel_plan = { + delay_travel_plan = { + weeks = 3 + add = yes + } + } + add_stress = medium_stress_loss + add_character_modifier = { + modifier = pampered_by_locals_modifier + years = 5 + } + stress_impact = { + lazy = medium_stress_impact_loss + diligent = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { # The AI should avoid unnecessary delays + factor = 0 + NOT = { has_trait = lazy } + } + } + } + # No, we *must* keep going! + option = { + name = travel_events.4039.b + stress_impact = { + lazy = medium_stress_impact_gain + } + ai_chance = { + base = 50 + modifier = { + factor = 0 + has_trait = lazy + } + } + } + after = { + mp_resume_travel_plan = yes + } +} + +# You meet a xenophile character who wants to learn about your culture +travel_events.4040 = { + type = character_event + title = travel_events.4040.t + desc = travel_events.4040.desc + theme = travel + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:fanboy_character_scope + animation = ecstasy + } + cooldown = { years = 10 } + trigger = { + is_available_travelling = yes + is_playable_character = yes + is_location_valid_for_travel_event_on_land = yes + culture = { NOT = { has_cultural_tradition = tradition_xenophilic } } + location.culture = { has_cultural_tradition = tradition_xenophilic } + NOT = { knows_language_of_culture = root.location.culture } + } + immediate = { + wayfarer_storyteller_fame_effect = { VALUE = roaming_reward_fame_small } + create_character = { + template = loyal_fan_character + location = root.location + culture = root.location.culture + faith = root.location.faith + #Set up the scope + save_scope_as = fanboy_character_scope + after_creation = { + add_character_flag = created + } + } + hidden_effect = { + scope:fanboy_character_scope = { + learn_language_of_culture = root.culture + } + } + } + # My culture *is* kinda great tbh + option = { + name = travel_events.4040.a + add_prestige = minor_prestige_gain + stress_impact = { + arrogant = medium_stress_impact_loss + humble = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + has_trait = humble + } + } + } + # Come, let's learn about each other! + option = { + name = travel_events.4040.b + trigger = { + can_start_scheme = { + type = learn_language + target_character = scope:fanboy_character_scope + } + } + start_scheme = { + type = learn_language + target_character = scope:fanboy_character_scope + } + custom_tooltip = learn_language_with_bonus_tt + hidden_effect = { + random_scheme = { + type = learn_language + limit = { + scheme_target_character = scope:fanboy_character_scope + } + add_scheme_modifier = { type = xenophile_bonus_modifier } + } + } + stress_impact = { + lazy = medium_stress_impact_gain + shy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = shy + has_trait = arrogant + } + } + } + } + after = { + scope:fanboy_character_scope = { + silent_disappearance_ai_if_created_effect = yes + } + } +} diff --git a/N3OW/events/tutorial_events.txt b/N3OW/events/tutorial_events.txt new file mode 100644 index 00000000..53455a28 --- /dev/null +++ b/N3OW/events/tutorial_events.txt @@ -0,0 +1,444 @@ +namespace = tutorial + +# Someone shows up to warn you that another person has fabricated a claim on one of your titles! +# We use this event to teach the player about some of the diplomatic options available in the game. +tutorial.0001 = { + type = character_event + title = tutorial.0001.t + desc = tutorial.0001.desc + theme = diplomacy + override_background = { reference = relaxing_room } + + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:potential_ally + animation = worry + } + lower_center_portrait = { + character = scope:bad_guy + } + trigger = { + has_global_variable = tutorial_completed + any_neighboring_top_liege_realm_owner = { + count > 1 + } + } + + immediate = { + random_neighboring_top_liege_realm_owner = { + save_scope_as = bad_guy + } + random_neighboring_top_liege_realm_owner = { + limit = { + this != scope:bad_guy + } + save_scope_as = potential_ally + } + + scope:bad_guy = { + add_unpressed_claim = title:c_ennis + } + + hidden_effect = { + scope:bad_guy = { + add_trait = drunkard + add_trait = irritable + } + } + } + + option = { # Become friends with the guy plotting against you + + trigger = { + OR = { + has_trait = education_diplomacy_1 + has_trait = education_diplomacy_2 + has_trait = education_diplomacy_3 + has_trait = education_diplomacy_4 + has_trait = education_diplomacy_5 + } + } + + add_internal_flag = special + name = tutorial.0001.a + flavor = tutorial.0001.a_flavor + + if = { + limit = { + NOT = { + any_scheme = { + type = befriend + scheme_target_character = scope:bad_guy + } + } + } + start_scheme = { + target_character = scope:bad_guy + type = befriend + } + } + custom_tooltip = diplomacy_family.2250.b.tt + hidden_effect = { + random_scheme = { + type = befriend + limit = { + scheme_target_character = scope:bad_guy + } + add_scheme_modifier = { + type = tutorial_extra_success_chance_modifier + } + } + start_tutorial_lesson = reactive_advice_tutorial_schemes + } + } + + option = { # Try go get a 'donation' from the guy who warned you about the plotting + name = tutorial.0001.c + flavor = tutorial.0001.c_flavor + + duel = { + skill = diplomacy + target = scope:potential_ally + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + min = 5 + desc = tutorial.0001.c.tt.success + send_interface_toast = { + title = tutorial.0001.c.tt.success + left_icon = scope:potential_ally + add_gold = major_gold_value + } + + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + min = 5 + desc = tutorial.0001.c.tt.failure + send_interface_toast = { + title = tutorial.0001.c.tt.failure + left_icon = scope:potential_ally + reverse_add_opinion = { + target = scope:potential_ally + modifier = insult_opinion + opinion = -35 + } + } + + } + } + } + option = { # Get some Prestige + name = tutorial.0001.b + flavor = tutorial.0001.b_flavor + add_prestige = medium_prestige_gain + } + + + after = { + trigger_event = { + id = health.1001 + months = { 2 3 } + } + trigger_event = { + id = tutorial.0002 + months = { 12 13 } + } + } +} + +tutorial.0002 = { + type = character_event + title = tutorial.0002.t + desc = tutorial.0002.desc + theme = martial + + left_portrait = { + character = root + animation = dismissal + } + right_portrait = { + character = scope:potential_ally + animation = shame + } + lower_center_portrait = { + character = scope:bad_guy + } + trigger = { + has_global_variable = tutorial_completed + } + + option = { + trigger = { + has_trait = impatient + } + start_war = { + casus_belli = "vassalization_cb" + target = scope:bad_guy + } + + add_internal_flag = dangerous + name = tutorial.0002.c + flavor = tutorial.0002.c_flavor + hidden_effect = { + start_tutorial_lesson = reactive_advice_tutorial_war + } + } + + option = { + trigger = { + has_relation_friend = scope:bad_guy + } + add_internal_flag = special + reason = friend + + add_prestige = major_prestige_value + scope:bad_guy = { + add_opinion = { + modifier = friendliness_opinion + target = root + opinion = 20 + } + } + + name = tutorial.0002.b + flavor = tutorial.0002.b_flavor + } + + option = { + name = tutorial.0002.a + flavor = tutorial.0002.a_flavor + + duel = { + skill = diplomacy + target = scope:bad_guy + + # Crit success. + 10 = { + custom_tooltip = tutorial.0002.a.tt + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = tutorial.0002.a.tt.crit_success + send_interface_toast = { + title = tutorial.0002.a.tt.crit_success + left_icon = scope:bad_guy + create_alliance = { + target = scope:bad_guy + allied_through_owner = root + allied_through_target = scope:bad_guy + } + scope:bad_guy = { + add_opinion = { + target = root + modifier = event_negotiated_alliance_opinion + } + } + } + } + + # Success. + 40 = { + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + min = -49 + } + desc = tutorial.0002.a.tt.success + send_interface_toast = { + title = tutorial.0002.a.tt.success + left_icon = scope:bad_guy + add_truce_both_ways = { + character = scope:bad_guy + days = 1825 + name = TRUCE_ENFORCE_TRUCE + result = white_peace + } + } + + } + + # Failure. + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -3.5 + min = -49 + } + desc = tutorial.0002.a.tt.failure + send_interface_toast = { + title = tutorial.0002.a.tt.failure + left_icon = scope:bad_guy + + scope:bad_guy = { + start_war = { + cb = claim_cb + target = root + claimant = scope:bad_guy + target_title = title:c_ennis + } + } + hidden_effect = { + start_tutorial_lesson = reactive_advice_tutorial_war + } + } + + } + } + + } +} + +tutorial.1001 = { + type = character_event + title = tutorial.1001.t + desc = tutorial.1001.desc + theme = ruler_objectives + override_background = { reference = courtyard } + + left_portrait = { + character = root + animation = eccentric + } + right_portrait = { + character = scope:councillor + animation = toast + } + cooldown = { years = 25 } + trigger = { + always = no # TODO[Ruler Objectives]: Make generally available once ready for it + capital_province = { + geographical_region = custom_ireland + } + NOR = { + house = { + has_house_modifier = ruler_objective_region_conquered_modifier + } + has_variable = ruler_objective_councillor + } + } + immediate = { + random_councillor = { + save_scope_as = councillor + } + set_variable = { + name = ruler_objective_councillor + value = scope:councillor + } + #random_geographical_region = { + # limit = { + # save_temporary_scope_as = region_temp + # any_county_in_region = { + # region = scope:region_temp + # this = root.capital_county + # } + # } + # save_scope_as = region + #} + geographical_region:custom_ireland = { + save_scope_as = region + } + } + option = { + name = tutorial.1001.a + reason = ruler_objectives + flavor = opted_into_tutorial_objectives_tt + custom_tooltip = { + text = enable_unify_region_decision_tt + add_character_flag = opted_into_tutorial_objectives + } + set_ruler_objective_decision = unify_region_decision + } + option = { + name = tutorial.1001.b + add_prestige = minor_prestige_gain + } +} + +tutorial.1002 = { + type = character_event + title = tutorial.1002.t + desc = { + desc = tutorial.1002.desc + first_valid = { + triggered_desc = { + trigger = { var:ruler_objective_councillor ?= { is_alive = yes } } + desc = tutorial.1002.desc_alive + } + desc = tutorial.1002.desc_dead + } + } + theme = ruler_objectives + override_background = { reference = throne_room } + + left_portrait = { + character = root + animation = war_over_win + } + right_portrait = { + character = scope:councillor + animation = throne_room_applaud_1 + } + immediate = { + var:ruler_objective_councillor ?= { + save_scope_as = councillor + } + #random_geographical_region = { + # limit = { + # save_temporary_scope_as = region_temp + # any_county_in_region = { + # region = scope:region_temp + # this = root.capital_county + # } + # } + # save_scope_as = region + #} + geographical_region:custom_ireland = { + save_scope_as = region + } + } + option = { + reason = ruler_objectives + name = { + trigger = { + var:ruler_objective_councillor ?= { + is_alive = yes + } + } + text = tutorial.1002.a_councillor + } + name = { + trigger = { + var:ruler_objective_councillor ?= { + is_alive = no + } + } + text = tutorial.1002.a + } + dynasty = { + add_dynasty_prestige = 500 + } + house = { + add_house_modifier = { + modifier = ruler_objective_region_conquered_modifier + years = 100 + } + } + } + after = { + remove_variable = ruler_objective_councillor + } +} + diff --git a/N3OW/events/varangian_events.txt b/N3OW/events/varangian_events.txt new file mode 100644 index 00000000..12931f25 --- /dev/null +++ b/N3OW/events/varangian_events.txt @@ -0,0 +1,1306 @@ +namespace = varangian + +# Events about the Varangian Guard + # varangian.0001 - Find a potential Varangian and fire chain, by Petter Vilberg + # varangian.0002 - Event for the liege of the Varangian candidate, by Petter Vilberg + # varangian.0003 - Emperor gets a new varangian, by Petter Vilberg + # varangian.1001 - Varangian decides to return, by Petter Vilberg + # varangian.1002 - Varangian comes home to liege, by Petter Vilberg + + # Ongoing Varangian events + # varangian.2001 - Become Best Friends with another Varangian, by Petter Vilberg + # varangian.2002 - Become Lover with a fellow Varangian, by Petter Vilberg + # varangian.2003 - Become Friends with a local ruler, by Petter Vilberg + # varangian.2004 - Become Rivals with a local ruler, by Petter Vilberg + # varangian.2005 - Marry your lover, by Petter Vilberg + # varangian.2008 - Get wounded, by Petter Vilberg + # varangian.2011 - Become lover with a local, by Petter Vilberg + # varangian.2012 - Increase Prowess, by Petter Vilberg + # varangian.2013 - Increase Martial, by Petter Vilberg + # varangian.2014 - Increase Learning, by Petter Vilberg + # varangian.2015 - Increase Diplomacy, by Petter Vilberg + # varangian.2016 - Become Brave, by Petter Vilberg + # varangian.2017 - Become Ambitious, by Petter Vilberg + # varangian.2018 - Become Diligent, by Petter Vilberg + +# Evaluate whether the target is valid for varangians +scripted_trigger varangian_0001_available_varangian_trigger = { + can_be_knight_trigger = { + ARMY_OWNER = title:e_byzantium.holder + } + age < 40 + is_married = no + NOR = { + has_character_flag = has_asked_to_be_varangian + has_trait = varangian + } + religion = religion:germanic_religion + NOR = { + faith = { + has_doctrine_parameter = pacifist_opinion_active + } + has_trait = craven + has_truce = title:e_byzantium.holder + is_at_war_with = title:e_byzantium.holder + has_relation_rival = title:e_byzantium.holder + } +} + +varangian.0001 = { + hidden = yes + + trigger = { + religion = religion:germanic_religion + NOR = { + faith = { + has_doctrine_parameter = pacifist_opinion_active + } + has_character_flag = had_recent_varangian_sendoff + } + is_at_war = no + age >= 6 + exists = title:e_byzantium.holder + NOR = { + this = title:e_byzantium.holder + has_truce = title:e_byzantium.holder + is_at_war_with = title:e_byzantium.holder + any_sub_realm_county = { + this = title:c_byzantion + } + has_relation_rival = title:e_byzantium.holder + } + any_courtier = { + varangian_0001_available_varangian_trigger = yes + } + } + + immediate = { + # Find a suitable courtier + random_courtier = { + limit = { + varangian_0001_available_varangian_trigger = yes + } + weight = { + base = 1 + compare_modifier = { + value = martial + multiplier = 0.25 + } + compare_modifier = { + value = prowess + multiplier = 0.5 + } + modifier = { + add = 5 + OR = { + has_trait = brave + has_trait = arrogant + } + } + modifier = { + add = -1 + has_trait = content + } + modifier = { + add = -1 + has_trait = lazy + } + modifier = { + add = -1 + has_trait = craven + } + modifier = { + add = 3 + is_of_major_interest_to_root_trigger = yes + } + modifier = { + add = 2 + is_of_minor_interest_to_root_trigger = yes + } + modifier = { + add = 1 + exists = dynasty + } + # Reduce chances if they seem likely to inherit stuff soon + modifier = { + factor = 0.2 + any_heir_title = { + holder ?= { + this = root + OR = { + age >= 60 + health <= poor_health + } + } + } + } + } + add_character_flag = has_asked_to_be_varangian + save_scope_as = varangian_candidate + } + + title:e_byzantium.holder = { + save_scope_as = emperor + if = { + limit = { capital_county = title:c_byzantion } + set_local_variable = { + name = to_miklagard + value = yes + } + } + } + + # Send event to court owner + trigger_event = varangian.0002 + } +} + + +# Varangian requests permission to leave +varangian.0002 = { + type = character_event + title = varangian.0002.t + desc = { + desc = varangian.0002.opening + first_valid = { + triggered_desc = { + trigger = { exists = local_var:to_miklagard } + desc = varangian.0002.miklagard + } + desc = varangian.0002.elsewhere + } + desc = varangian.0002.end + } + theme = martial + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:varangian_candidate + animation = personality_bold + } + lower_right_portrait = scope:emperor + + immediate = { + add_character_flag = { + flag = had_recent_varangian_sendoff + years = 5 + } + } + + option = { # Approve + name = varangian.0002.a + show_as_tooltip = { + scope:varangian_candidate = { + visit_court_of = scope:emperor + add_trait = varangian + } + } + every_scheme = { + limit = { + any_scheme_agent_character = { this = scope:varangian_candidate } + } + save_scope_as = scheme + scope:varangian_candidate = { forbid_from_scheme = scope:scheme } + } + hidden_effect = { + scope:emperor = { + trigger_event = varangian.0003 + } + } + debug_log = "Someone got sent as a Varangian" + debug_log_scopes = yes + ai_chance = { + base = 100 + } + } + + option = { # Keep them + name = varangian.0002.b + scope:varangian_candidate = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + ai_chance = { + base = 0 + } + } +} + +# Emperor gets a new varangian +varangian.0003 = { + hidden = yes + + immediate = { + send_interface_message = { + type = event_martial_text_good + left_icon = scope:varangian_candidate + title = varangian_arrived.title + desc = varangian_arrived.desc + if = { + limit = { + exists = scope:varangian_candidate.liege + scope:varangian_candidate.liege = { + is_ai = yes + } + } + scope:varangian_candidate = { move_to_pool_at = root.capital_province } + } + add_visiting_courtier = scope:varangian_candidate + scope:varangian_candidate = { + add_trait = varangian + add_character_flag = is_currently_varangian + set_variable = { + name = years_as_varangian + value = 1 # Set to one year ahead of time for the sake of event evaluation + } + trigger_event = { + on_action = varangian_ongoing + days = { 340 380 } + } + } + } + } +} + + +# Return home eventually +scripted_trigger varangian_1001_partner_can_be_brought_home_trigger = { + is_alive = yes + is_landed = no + any_heir_title = { + always = no + } +} + +varangian.1001 = { + hidden = yes + + trigger = { + liege ?= { + OR = { + culture = { has_cultural_pillar = heritage_north_germanic } + dynasty = { has_dynasty_perk = fp1_adventure_legacy_1 } + } + } + var:years_as_varangian > 5 + is_available_ai_adult = yes + has_character_flag = is_currently_varangian + } + + weight_multiplier = { + base = 1 + modifier = { + add = { + value = var:years_as_varangian + subtract = 5 + multiply = 0.25 + } + always = yes + } + } + + immediate = { + if = { + limit = { + exists = var:spouse_from_varangian_guard + var:spouse_from_varangian_guard = { + varangian_1001_partner_can_be_brought_home_trigger = yes + is_consort_of = root + } + } + var:spouse_from_varangian_guard = { + save_scope_as = new_partner + } + } + else_if = { + limit = { + exists = var:lover_from_varangian_guard + var:lover_from_varangian_guard = { + varangian_1001_partner_can_be_brought_home_trigger = yes + has_relation_lover = root + } + } + var:lover_from_varangian_guard = { + save_scope_as = new_partner + } + } + remove_character_flag = is_currently_varangian + save_scope_as = returning_varangian + if = { + limit = { exists = title:e_byzantium.holder } + title:e_byzantium.holder = { + save_scope_as = emperor + } + } + liege = { + trigger_event = varangian.1002 + } + } +} + +# Liege - Varangian returns home +varangian.1002 = { + type = character_event + title = varangian.1002.t + desc = { + desc = varangian.1002.opening + triggered_desc = { + trigger = { + exists = scope:new_partner + } + desc = varangian.1002.new_partner + } + desc = varangian.1002.ending + } + theme = martial + left_portrait = { + character = root + animation = war_over_tie + } + right_portrait = { + character = scope:returning_varangian + animation = personality_bold + } + lower_left_portrait = scope:new_partner + lower_right_portrait = scope:emperor + + immediate = { + scope:returning_varangian = { + scope:emperor.culture = { save_scope_as = advanced_culture } + hidden_effect = { adopt_cultural_fashion_effect = yes } + if = { + limit = { + is_foreign_court_guest = yes + } + return_to_court = yes + } + else_if = { + limit = { + exists = dynasty.dynast.primary_title + } + dynasty.dynast = { + if = { + limit = { + scope:returning_varangian = { + NOT = { + is_courtier_of = prev + } + } + } + add_courtier = scope:returning_varangian + } + } + } + else_if = { + limit = { + exists = dynasty + any_close_family_member = { + is_ai = no + } + } + random_close_family_member = { + limit = { + is_ai = no + } + add_courtier = scope:returning_varangian + } + } + else_if = { + limit = { + any_close_family_member = { + is_ruler = yes + } + } + random_close_family_member = { + limit = { + is_ruler = yes + } + add_courtier = scope:returning_varangian + } + } + else = { + move_to_pool = yes + } + } + hidden_effect = { + if = { + limit = { + exists = scope:new_partner + NOT = { scope:new_partner = { is_courtier_of = root } } + } + scope:returning_varangian.court_owner = { + add_courtier = scope:new_partner + } + } + } + debug_log = "Someone got home from the Varangian Guard" + debug_log_scopes = yes + } + + option = { # Wow + name = varangian.1002.a + scope:returning_varangian = { + add_prestige = medium_prestige_gain + add_gold = medium_gold_value + } + } +} + + +# Return home because of inheritance +# varangian.1003 + +# Liege - Varangian has returned home to be vassal +# varangian.1004 + + +# Become friends with local Varangian +scripted_trigger varangian_2001_varangian_friend_trigger = { + has_character_flag = is_currently_varangian + is_ai = yes + NOR = { + this = root + has_relation_rival = root + has_relation_lover = root + } +} + +varangian.2001 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + # Only if you don't have any friends + any_relation = { + type = best_friend + always = no + } + host ?= { + any_courtier_or_guest = { + varangian_2001_varangian_friend_trigger = yes + } + } + } + + immediate = { + host = { + random_courtier_or_guest = { + limit = { + varangian_2001_varangian_friend_trigger = yes + } + weight = { + base = 1 + opinion_modifier = { + opinion_target = root + multiplier = 0.1 # +10 at 100 + } + modifier = { + add = 10 + OR = { + has_relation_potential_friend = root + has_relation_friend = root + } + } + } + save_scope_as = varangian_friend + } + } + set_relation_best_friend = { reason = best_friend_varangian copy_reason = friend target = scope:varangian_friend } + } +} + +# Become lover with a fellow Varangian +scripted_trigger varangian_2002_varangian_lover_trigger = { + has_character_flag = is_currently_varangian + is_ai = yes + is_adult = yes + save_temporary_scope_as = potential_cheater + OR = { + is_married = no + any_spouse = { + count = all + save_temporary_scope_as = partner + scope:potential_cheater = { might_cheat_on_partner_trigger = { PARTNER = scope:partner } } + } + } + is_attracted_to_gender_of = root + root = { + is_attracted_to_gender_of = prev + } + NOR = { + this = root + has_relation_rival = root + has_relation_lover = root + } + opinion = { + target = root + value > 10 + } + reverse_opinion = { + target = root + value > 0 + } +} + +varangian.2002 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + # Only if you don't have any lovers + any_relation = { + type = lover + always = no + } + host ?= { + any_courtier_or_guest = { + varangian_2002_varangian_lover_trigger = yes + } + } + } + + immediate = { + host = { + random_courtier_or_guest = { + limit = { + varangian_2002_varangian_lover_trigger = yes + } + weight = { + base = 1 + opinion_modifier = { + opinion_target = root + multiplier = 0.1 # +10 at 100 + } + modifier = { + add = 10 + has_relation_potential_lover = root + } + } + save_scope_as = varangian_lover + } + } + set_relation_lover = { reason = lover_varangian_lover target = scope:varangian_lover } + set_variable = { + name = lover_from_varangian_guard + value = scope:varangian_lover + } + } +} + +# Become friends with local ruler +scripted_trigger varangian_2003_local_ruler_friend_trigger = { + is_ai = yes + opinion = { + target = root + value > 0 + } + reverse_opinion = { + target = root + value > 0 + } + NOR = { + this = root + has_relation_rival = root + has_relation_lover = root + } +} + +varangian.2003 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + # Only if you don't have any friends + any_relation = { + type = friend + always = no + } + host ?= { + any_vassal = { + varangian_2003_local_ruler_friend_trigger = yes + } + } + } + + immediate = { + host = { + random_vassal = { + limit = { + varangian_2003_local_ruler_friend_trigger = yes + } + weight = { + base = 1 + opinion_modifier = { + opinion_target = root + multiplier = 0.1 # +10 at 100 + } + modifier = { + add = 10 + has_relation_potential_friend = root + } + } + save_scope_as = varangian_friend + } + } + set_relation_friend = { reason = friend_varangian target = scope:varangian_friend } + } +} + +# Become rivals with local ruler +scripted_trigger varangian_2004_local_ruler_rival_trigger = { + is_ai = yes + opinion = { + target = root + value < 0 + } + reverse_opinion = { + target = root + value < 0 + } + NOR = { + this = root + has_relation_friend = root + has_relation_lover = root + } +} + +varangian.2004 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + # Only if you don't have any rival + any_relation = { + type = rival + always = no + } + host ?= { + any_vassal = { + varangian_2004_local_ruler_rival_trigger = yes + } + } + } + + immediate = { + host = { + random_vassal = { + limit = { + varangian_2004_local_ruler_rival_trigger = yes + } + weight = { + base = 1 + opinion_modifier = { + opinion_target = root + multiplier = 0.1 # +10 at 100 + } + modifier = { + add = 10 + has_relation_potential_friend = root + } + } + save_scope_as = varangian_friend + } + } + set_relation_rival = { reason = rival_varangian target = scope:varangian_friend } + } +} + +# Marry Lover +scripted_trigger varangian_2005_lover_to_marry = { + is_ai = yes + is_married = no + can_marry_character_trigger = { + CHARACTER = root + } + OR = { + is_in_the_same_court_as_or_guest = root + top_liege = root.host + AND = { + exists = host + host.top_liege = root.host + } + } +} + +scripted_trigger varangian_2005_should_marry_this_character_matrilineally = { + is_female = yes + OR = { + AND = { + is_landed = yes + $OTHER_CHARACTER$ = { # Not if they are heir to anything + any_heir_title = { + always = no + } + } + } + AND = { + faith = { + has_doctrine = doctrine_gender_female_dominated + } + $OTHER_CHARACTER$ = { + faith = { + OR = { + has_doctrine = doctrine_gender_female_dominated + has_doctrine = doctrine_gender_equal + } + } + } + } + } +} + +varangian.2005 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + is_married = no + any_relation = { + type = lover + varangian_2005_lover_to_marry = yes + NOT = { has_been_promised_grand_wedding = yes } + } + NOT = { has_been_promised_grand_wedding = yes } + } + + immediate = { + random_relation = { + type = lover + limit = { + varangian_2005_lover_to_marry = yes + NOT = { has_been_promised_grand_wedding = yes } + } + save_scope_as = lover_to_marry + } + if = { + limit = { + OR = { + varangian_2005_should_marry_this_character_matrilineally = { OTHER_CHARACTER = scope:lover_to_marry } + scope:lover_to_marry = { + varangian_2005_should_marry_this_character_matrilineally = { OTHER_CHARACTER = root } + } + } + } + marry_matrilineal = scope:lover_to_marry + } + else = { + marry = scope:lover_to_marry + } + set_variable = { + name = spouse_from_varangian_guard + value = scope:lover_to_marry + } + } +} + +# Get Murdered +# varangian.2006 + +# Liege - notification they were murdered + +# Get Wounded +varangian.2008 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + NOR = { + has_trait = wounded + has_character_flag = had_severe_injury_in_varangian_guard + } + } + + immediate = { + add_character_flag = had_severe_injury_in_varangian_guard + random_list = { + 10 = { + increase_wounds_effect = { REASON = fight } + increase_wounds_effect = { REASON = fight } + } + 5 = { + increase_wounds_effect = { REASON = fight } + increase_wounds_effect = { REASON = fight } + increase_wounds_effect = { REASON = fight } + } + 5 = { + trigger = { + NOT = { has_trait = one_eyed } + } + add_trait = one_eyed + } + 5 = { + trigger = { + NOT = { has_trait = one_legged } + } + add_trait = one_legged + } + 2 = { + trigger = { + is_eunuch_trigger = no + NOR = { + is_female = yes + age < 12 + } + } + add_trait = eunuch_1 + } + 2 = { + trigger = { + NOR = { + has_trait = blind + is_male = yes + } + } + add_trait = blind + } + } + } +} + +# Get Killed in battle +# varangian.2009 + +# Liege - notification they were killed +# varangian.2010 + +# Become lover with a local +scripted_trigger varangian_2011_local_lover_trigger = { + is_ai = yes + is_adult = yes + is_attracted_to_gender_of = root + root = { + is_attracted_to_gender_of = prev + } + save_temporary_scope_as = potential_cheater + OR = { + is_married = no + any_spouse = { + count = all + save_temporary_scope_as = partner + scope:potential_cheater = { might_cheat_on_partner_trigger = { PARTNER = scope:partner } } + } + } + NOR = { + this = root + has_relation_rival = root + has_relation_lover = root + } + opinion = { + target = root + value > 10 + } + reverse_opinion = { + target = root + value > 0 + } +} + +varangian.2011 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + exists = host + } + + immediate = { + random_list = { + 10 = { # Find someone suitable + trigger = { + host = { + OR = { + varangian_2011_local_lover_trigger = yes + any_courtier = { + varangian_2011_local_lover_trigger = yes + } + any_vassal = { + varangian_2011_local_lover_trigger = yes + any_courtier = { + varangian_2011_local_lover_trigger = yes + } + } + } + } + } + host = { + if = { + limit = { varangian_2011_local_lover_trigger = yes } + add_to_list = potential_lover + } + every_courtier = { + limit = { varangian_2011_local_lover_trigger = yes } + add_to_list = potential_lover + } + every_vassal = { + if = { + limit = { varangian_2011_local_lover_trigger = yes } + add_to_list = potential_lover + } + every_courtier = { + limit = { varangian_2011_local_lover_trigger = yes } + add_to_list = potential_lover + } + } + } + random_in_list = { + list = potential_lover + weight = { + base = 1 + modifier = { + add = 5 + is_landed = no + } + } + save_scope_as = lover + } + } + 10 = { # Create a beautiful peasant + 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 + employer = root.host + faith = root.host.faith + culture = root.host.culture + + after_creation = { + #Sometimes adjust sexuality to create compatibility with root + if = { + limit = { + root = { is_attracted_to_gender_of = prev } + NOT = { is_attracted_to_gender_of = root } + } + set_sexuality = bisexual + } + } + + save_scope_as = lover + } + } + 10 = { # Create a noble + create_character = { + template = pool_repopulate_spouse + 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 + employer = root.host + faith = root.host.faith + culture = root.host.culture + dynasty = generate + + after_creation = { + #Sometimes adjust sexuality to create compatibility with root + if = { + limit = { + root = { is_attracted_to_gender_of = prev } + NOT = { is_attracted_to_gender_of = root } + } + set_sexuality = bisexual + } + } + + save_scope_as = lover + } + } + 5 = { # Create a witch + create_character = { + template = witchy_template + 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 + employer = root.host + faith = root.host.faith + culture = root.host.culture + + after_creation = { + #Sometimes adjust sexuality to create compatibility with root + if = { + limit = { + root = { is_attracted_to_gender_of = prev } + NOT = { is_attracted_to_gender_of = root } + } + set_sexuality = bisexual + } + } + + save_scope_as = lover + } + } + 5 = { # Create a witch with a Dynasty + create_character = { + template = witchy_template + 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 + employer = root.host + faith = root.host.faith + culture = root.host.culture + dynasty = generate + + after_creation = { + #Sometimes adjust sexuality to create compatibility with root + if = { + limit = { + root = { is_attracted_to_gender_of = prev } + NOT = { is_attracted_to_gender_of = root } + } + set_sexuality = bisexual + } + } + + save_scope_as = lover + } + } + } + set_relation_lover = { reason = lover_varangian_local target = scope:lover } + } +} + +# Increase Prowess +varangian.2012 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + NOT = { has_character_flag = varangian_recently_increased_prowess } + } + + weight_multiplier = { + base = 1 + compare_modifier = { # Reduce chance for each current Prowess over 15 + value = prowess + multiplier = -0.1 + offset = -15 + trigger = { + prowess > 15 + } + } + } + + immediate = { + add_character_flag = { + flag = varangian_recently_increased_prowess + years = 2 + } + add_prowess_skill = 1 + } +} + +# Increase Martial +varangian.2013 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + NOT = { has_character_flag = varangian_recently_increased_martial } + } + + weight_multiplier = { + base = 1 + compare_modifier = { # Reduce chance for each current martial over 15 + value = martial + multiplier = -0.1 + offset = -15 + trigger = { + martial > 15 + } + } + } + + immediate = { + add_character_flag = { + flag = varangian_recently_increased_martial + years = 2 + } + add_martial_skill = 1 + } +} + +# Increase Learning +varangian.2014 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + NOT = { has_character_flag = varangian_recently_increased_learning } + } + + weight_multiplier = { + base = 1 + compare_modifier = { # Reduce chance for each current learning over 15 + value = learning + multiplier = -0.1 + offset = -15 + trigger = { + learning > 15 + } + } + } + + immediate = { + add_character_flag = { + flag = varangian_recently_increased_learning + years = 2 + } + add_learning_skill = 1 + } +} + +# Increase Diplomacy +varangian.2015 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + NOT = { has_character_flag = varangian_recently_increased_diplomacy } + } + + weight_multiplier = { + base = 1 + compare_modifier = { # Reduce chance for each current diplomacy over 15 + value = diplomacy + multiplier = -0.1 + offset = -15 + trigger = { + diplomacy > 15 + } + } + } + + immediate = { + add_character_flag = { + flag = varangian_recently_increased_diplomacy + years = 2 + } + add_diplomacy_skill = 1 + } +} + +# Become Brave +varangian.2016 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + OR = { + has_trait = craven + has_trait = lazy + has_trait = content + } + NOT = { has_trait = brave } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { has_trait = craven } + remove_trait = craven + } + else_if = { + limit = { has_trait = lazy } + remove_trait = lazy + } + else_if = { + limit = { has_trait = content } + remove_trait = content + } + add_trait = brave + } +} + +# Become Ambitious +varangian.2017 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + OR = { + has_trait = craven + has_trait = lazy + has_trait = content + } + NOT = { has_trait = ambitious } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { has_trait = content } + remove_trait = content + } + else_if = { + limit = { has_trait = lazy } + remove_trait = lazy + } + else_if = { + limit = { has_trait = craven } + remove_trait = craven + } + add_trait = ambitious + } +} + +# Become Diligent +varangian.2018 = { + hidden = yes + + trigger = { + has_character_flag = is_currently_varangian + OR = { + has_trait = craven + has_trait = lazy + has_trait = content + } + NOT = { has_trait = diligent } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { has_trait = lazy } + remove_trait = lazy + } + else_if = { + limit = { has_trait = content } + remove_trait = content + } + else_if = { + limit = { has_trait = craven } + remove_trait = craven + } + add_trait = diligent + } +} + +# Liege: Varangian has died saving the Emeperor's life + # by Petter Vilberg +varangian.3001 = { + type = character_event + title = varangian.3001.t + desc = varangian.3001.desc + theme = murder_scheme + left_portrait = scope:varangian + right_portrait = { + character = scope:emperor + animation = sadness + } + + option = { + name = varangian.3001.a + add_gold = major_gold_value + } +} + +# Emperor: Varangians are great fighters + diff --git a/N3OW/events/witch_events.txt b/N3OW/events/witch_events.txt new file mode 100644 index 00000000..89d2e57c --- /dev/null +++ b/N3OW/events/witch_events.txt @@ -0,0 +1,4189 @@ +################ +# WITCH EVENTS # +################ + +namespace = witch + +#witch.1001-1999 - Guardian coverts ward +#witch.2001-2899 - Convert to witchcraft scheme +#witch.2900-2999 - Reveal as witch interaction +#witch.3001-3999 - Witch ritual activity events +#witch.4001-4999 - Witch ongoing events +# + +########################## +# GUARDIAN CONVERTS WARD # +########################## + +witch.1001 = { #by Mathilda Bjarnehed + hidden = yes + + trigger = { + is_witch_trigger = no + any_relation = { + type = guardian + is_witch_trigger = yes + } + } + + immediate = { + save_scope_as = child + #If coven and child is AI, immediately convert them + if = { + limit = { + is_ai = yes + house ?= { + has_house_modifier = witch_coven + house_head = { is_ai = yes } + } + any_relation = { + type = guardian + is_ai = yes + } + } + child_witch_conversion_success_effect = yes + } + #For non-covens children and player children, send guardian choice event (AI guardians must chose convert for witch coven player children) + else = { + random_relation = { type = guardian trigger_event = witch.1002 } + } + } +} + +scripted_trigger witch_1002_allow_reveal_outcome_trigger = { + exists = scope:child.liege + scope:guardian = { + this != scope:child.liege + any_secret = { + type = secret_witch + OR = { + NOT = { is_known_by = scope:child } + NOT = { is_known_by = scope:child.liege } + } + } + } +} + +#Guardian: covert this child? +witch.1002 = { #by Mathilda Bjarnehed + type = character_event + title = witch.1002.t + desc = witch.1002.desc + theme = witchcraft + override_background = { + reference = study + } + left_portrait = scope:child + + immediate = { save_scope_as = guardian } + + #Convert them + option = { + name = witch.1002.a + + + #Duel if child is AI + if = { + limit = { scope:child = { is_ai = yes } } + duel = { + skill = learning + target = scope:child + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + opinion_modifier = { + who = scope:child + opinion_target = scope:guardian + multiplier = 0.25 + step = 5 + } + modifier = { + scope:child = { has_trait = ambitious } + add = 20 + } + modifier = { + scope:child = { has_trait = curious } + add = 20 + } + desc = child_witch_conversion_success_effect.desc + child_witch_conversion_success_effect = yes + } + 35 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + opinion_modifier = { + who = scope:child + opinion_target = scope:guardian + multiplier = -0.25 + step = 5 + } + modifier = { + scope:child = { has_trait = craven } + add = 30 + } + desc = child_witch_conversion_failure_effect.desc + child_witch_conversion_failure_effect = yes + } + 15 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + opinion_modifier = { + who = scope:child + opinion_target = scope:guardian + multiplier = -0.25 + step = 5 + } + modifier = { + scope:child = { has_trait = zealous } + add = 150 + } + trigger = { + witch_1002_allow_reveal_outcome_trigger = yes + } + desc = child_witch_conversion_critical_failure_effect.desc + child_witch_conversion_critical_failure_effect = yes + } + } + } + else = { + show_as_tooltip = { + random_list = { + 1 = { + show_chance = no + desc = child_witch_conversion_success_effect.desc + child_witch_conversion_success_effect = yes + } + 1 = { + show_chance = no + desc = child_witch_conversion_failure_effect.desc + child_witch_conversion_failure_effect = yes + } + 1 = { + show_chance = no + trigger = { + witch_1002_allow_reveal_outcome_trigger = yes + } + desc = child_witch_conversion_critical_failure_effect.desc + child_witch_conversion_critical_failure_effect = yes + } + } + } + + scope:child = { + trigger_event = witch.1003 + } + } + + ai_chance = { + base = 100 + + ai_boldness_target_modifier = { VALUE = 50 } + #Player children of witch covens should always be asked + modifier = { + scope:child = { + house ?= { has_house_modifier = witch_coven } + is_ai = no + } + add = 1000 + } + } + } + + #Don't risk it + option = { + name = witch.1002.b + + + + ai_chance = { + base = 0 + + ai_boldness_target_modifier = { VALUE = -100 } + + modifier = { + exists = liege + trait_is_criminal_in_faith_trigger = { TRAIT = witch FAITH = liege.faith GENDER_CHARACTER = root } + add = 100 + } + #Player children of witch covens should always be asked + modifier = { + scope:child = { + house ?= { has_house_modifier = witch_coven } + is_ai = no + } + add = -1000 + } + } + } +} + + +#Do I want to become a witch? +witch.1003 = { #by Mathilda Bjarnehed + type = character_event + title = witch.1003.t + desc = witch.1003.desc + theme = witchcraft + override_background = { + reference = study + } + left_portrait = { + character = scope:guardian + animation = personality_dishonorable + } + + + + #Yes + option = { + name = witch.1003.a + + child_witch_conversion_success_effect = yes + } + + #No... + option = { + name = witch.1003.b + + child_witch_conversion_failure_effect = yes + } + + #I will tell someone! + option = { + trigger = { + witch_1002_allow_reveal_outcome_trigger = yes + } + name = witch.1003.c + + child_witch_conversion_critical_failure_effect = yes + } +} + + + +############################################## +######COVERT TO WITCHCRAFT SCHEME EVENTS###### +############################################## + +#Do I want to go ahead with this? +witch.2001 = { #by Mathilda Bjarnehed + type = character_event + title = witch.2001.t + desc = { + 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 } } + desc = witch.2001.secrecy.desc + } + desc = witch.2001.no_secrecy.desc + } + desc = witch.2001.end.desc + } + theme = witchcraft + override_background = { + reference = sitting_room + } + left_portrait = scope:target + + #Yes + option = { + name = witch.2001.a + custom_tooltip = witch.2001.a.tt + + if = { + limit = { scope:target = { is_ai = no } } + scope:target = { + trigger_event = { + id = witch.2002 + days = 3 + } + } + } + else_if = { + limit = { exists = scope:scheme_successful } + trigger_event = { + id = witch.2003 + days = 3 + } + } + else = { + trigger_event = { + on_action = convert_to_witchcraft_failure_outcome + days = 3 + } + } + + ai_chance = { + base = 100 + } + } + + #No + option = { + name = { + trigger = { + use_convert_to_witchcraft_secrecy_trigger = { OWNER = root } + } + text = witch.2001.b1 + } + name = { + trigger = { + use_convert_to_witchcraft_secrecy_trigger = { OWNER = root } + } + text = witch.2001.b2 + } + scope:scheme = { + end_scheme = yes + } + + ai_chance = { + base = 0 + } + } +} + +#Someone is trying to convert me to become a witch (player only) +witch.2002 = { #by Mathilda Bjarnehed + type = character_event + title = witch.2002.t + desc = { + desc = witch.2002.start.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:scheme_discovered } + desc = witch.2002.discovery.desc + } + desc = witch.2002.no_discovery.desc + } + desc = witch.2002.end.desc + } + theme = witchcraft + override_background = { + reference = sitting_room + } + left_portrait = { + character = scope:left_portrait + triggered_animation = { + trigger = { scope:left_portrait = root } + animation = disbelief + } + animation = personality_dishonorable + } + cooldown = { years = 10 } + + immediate = { + if = { + 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 + } + } + } + } + else = { + save_scope_as = left_portrait + } + } + + #Yes I want to be a witch + option = { + name = witch.2002.a + + give_witch_secret_or_trait_effect = yes + + if = { + limit = { + faith = { + NOT = { has_doctrine_parameter = witchcraft_accepted } + } + } + add_piety = medium_piety_loss + } + + scope:owner = { + trigger_event = witch.2003 + } + + stress_impact = { + zealous = massive_stress_impact_gain + craven = medium_stress_impact_gain + } + } + + #No I don't want to be a witch + option = { + name = witch.2002.b + + add_piety = medium_piety_gain + + scope:owner = { + trigger_event = witch.2004 + } + + if = { + limit = { exists = scope:scheme_discovered } + reverse_add_opinion = { + target = scope:owner + modifier = disappointed_opinion + opinion = -15 + } + } + + stress_impact = { + ambitious = minor_stress_impact_gain + } + } + + #Reveal them to the world! + option = { + trigger = { exists = scope:scheme_discovered } + name = witch.2002.c + + add_piety = medium_piety_gain + + reverse_add_opinion = { + target = scope:owner + modifier = hate_opinion + opinion = -30 + } + + scope:owner = { + trigger_event = witch.2005 + } + + stress_impact = { + craven = medium_stress_impact_gain + compassionate = minor_stress_impact_gain + trusting = minor_stress_impact_gain + } + } +} + +#SUCCESS EVENTS +scripted_trigger witch_2003_can_learn_owner_secret = { + save_temporary_scope_as = secret_learner + scope:owner = { + any_secret = { + type = secret_witch + NOT = { is_known_by = scope:secret_learner } + } + } +} + +scripted_trigger witch_2003_unlock_reveal_trigger = { + NOT = { exists = scope:scheme_discovered } + scope:target = { witch_2003_can_learn_owner_secret = yes } +} + + +witch.2003 = { #by Mathilda Bjarnehed + type = character_event + title = witch.2003.t + desc = witch.2003.desc + theme = witchcraft + override_background = { + reference = sitting_room + } + left_portrait = { + character = scope:target + animation = personality_rational + } + immediate = { + scope:target = { + give_witch_secret_or_trait_effect = yes + random_secret = { + type = secret_witch + reveal_to = root + } + } + if = { + limit = { exists = scope:scheme_discovered } + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = scope:target } + } + reveal_to = scope:target + } + + reverse_add_opinion = { + target = scope:target + modifier = grateful_opinion + opinion = 20 + } + } + } + + #Great! + option = { + trigger = { witch_2003_unlock_reveal_trigger = no } + name = witch.2003.a + + scope:scheme = { + end_scheme = yes + } + } + + #Let them know who I am + option = { + trigger = { witch_2003_unlock_reveal_trigger = yes } + name = witch.2003.b + + if = { + limit = { + house ?= { has_house_modifier = witch_coven } + } + custom_tooltip = witch.2003.b.tt + } + + scope:target = { + send_interface_message = { + type = event_witchcraft_good + title = witch.2003.message + left_icon = scope:owner + scope:owner = { + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = scope:target } + } + reveal_to = scope:target + } + } + } + } + + reverse_add_opinion = { + target = scope:target + modifier = grateful_opinion + opinion = 20 + } + + scope:scheme = { + end_scheme = yes + } + + ai_chance = { + base = 100 + + modifier = { + has_trait = honest + add = 50 + } + modifier = { + has_trait = trusting + add = 100 + } + } + } + + #Keep my secret + option = { + trigger = { witch_2003_unlock_reveal_trigger = yes } + name = witch.2003.c + + scope:scheme = { + end_scheme = yes + } + + ai_chance = { + base = 50 + modifier = { + has_trait = paranoid + add = 100 + } + modifier = { + has_trait = craven + add = 50 + } + modifier = { + has_trait = deceitful + add = 50 + } + } + } + + after = { + #Handle discover + if = { + limit = { + exists = scope:scheme_discovered + scope:target = { + is_ai = yes + OR = { + AND = { + is_ruler = no + liege ?= { + witch_2003_can_learn_owner_secret = yes + this != scope:owner + } + } + any_relation = { type = lover witch_2003_can_learn_owner_secret = yes } + any_consort = { witch_2003_can_learn_owner_secret = yes } + any_child = { + age >= 7 + witch_2003_can_learn_owner_secret = yes + } + } + } + } + #Trigger the Overheard-event for the Scheme Owner + trigger_event = witch.2010 + } + } +} + +#Success, but discovered +witch.2010 = { #by Mathilda Bjarnehed + type = character_event + title = witch.2010.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + any_secret = { + type = secret_witch + is_known_by = scope:target + } + } + desc = witch.talk.2010 + } + desc = witch.leave.2010 + } + desc = witch.end.2010 + } + theme = witchcraft + override_background = { + reference = sitting_room + } + left_portrait = { + character = scope:target + animation = personality_rational + } + + immediate = { + hidden_effect = { + scope:target = { + random_list = { + 3 = { + trigger = { + is_ruler = no + liege ?= { + witch_2003_can_learn_owner_secret = yes + this != scope:owner + } + } + liege = { save_scope_as = listener } + } + 5 = { + trigger = { + any_relation = { + type = lover + witch_2003_can_learn_owner_secret = yes + } + } + random_relation = { + type = lover + limit = { witch_2003_can_learn_owner_secret = yes } + save_scope_as = listener + } + } + 5 = { + trigger = { + any_consort = { witch_2003_can_learn_owner_secret = yes } + } + random_consort = { + limit = { witch_2003_can_learn_owner_secret = yes } + save_scope_as = listener + } + } + 1 = { + trigger = { + any_child = { + age >= 7 + witch_2003_can_learn_owner_secret = yes + } + } + random_child = { + limit = { + age >= 7 + witch_2003_can_learn_owner_secret = yes + } + save_scope_as = listener + } + } + } + } + #Let's notify the Listener that they learned the secret + scope:listener = { + send_interface_message = { + type = event_witchcraft_neutral + title = witch.2010.message + left_icon = scope:owner + scope:owner = { + random_secret = { + type = secret_witch + reveal_to = scope:listener + } + } + } + } + } + } + option = { + name = witch.2010.a + custom_tooltip = witch.2010.a.tt + } +} + + +#FAILURE EVENTS + +#They refuse +witch.2004 = { #by Mathilda Bjarnehed + type = character_event + title = witch.2004.t + desc = { + desc = witch.2004.start.desc + first_valid = { + triggered_desc = { + trigger = { exists = scope:scheme_discovered } + desc = witch.2004.discovered.desc + } + desc = witch.2004.not_discovered.desc + } + } + theme = witchcraft + override_background = { + reference = sitting_room + } + left_portrait = { + character = scope:target + animation = anger + } + + immediate = { + if = { + limit = { exists = scope:scheme_discovered } + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = scope:target } + } + reveal_to = scope:target + } + reverse_add_opinion = { + target = scope:target + modifier = impious_opinion + opinion = -20 + } + } + scope:target = { + add_character_flag = { + flag = block_convert_to_witchcraft + days = 7300 + } + } + } + + option = { + name = witch.2004.a + + scope:scheme = { + end_scheme = yes + } + } +} + +#They tell their liege +witch.2005 = { #by Mathilda Bjarnehed + type = character_event + title = witch.2004.t + desc = { + desc = witch.2004.start.desc + desc = witch.2005.end.desc + } + theme = witchcraft + override_background = { + reference = sitting_room + } + left_portrait = { + character = scope:target + animation = anger + } + trigger = { + scope:target = { + exists = liege + is_ruler = no + liege = { this != scope:owner } + } + exists = scope:scheme_discovered + } + + weight_multiplier = { + base = 1 + + ai_value_modifier = { + who = scope:target + ai_zeal = 0.05 + max = 2 + min = -0.5 + } + opinion_modifier = { + who = scope:target + opinion_target = root + multiplier = -0.05 + max = 2 + min = -0.5 + } + } + + + immediate = { + random_secret = { + type = secret_witch + if = { + limit = { NOT = { is_known_by = scope:target } } + reveal_to = scope:target + } + if = { + limit = { NOT = { is_known_by = scope:target.liege } } + reveal_to = scope:target.liege + } + } + scope:target = { + add_character_flag = { + flag = block_convert_to_witchcraft + days = 7300 + } + } + reverse_add_opinion = { + target = scope:target + modifier = impious_opinion + opinion = -20 + } + } + + option = { + name = witch.2005.a + flavor = witch.2005.a.tt + + scope:scheme = { + end_scheme = yes + } + } +} + + +#Target was already a witch! Expose your secrets to each other - for owner +witch.2006 = { #by Linnéa Thimrén + type = character_event + title = witch.2006.t + desc = witch.2006.desc + theme = witchcraft + override_background = { + reference = sitting_room + } + left_portrait = { + character = scope:target + animation = shock + } + + trigger = { #Make sure the secrets are still unknown and that target is alive and kicking + any_scheme = { + type = convert_to_witchcraft + scheme_target_character = scope:target + } + scope:target = { + is_alive = yes + any_secret = { + type = secret_witch + NOT = { any_secret_knower = { this = root } } + } + } + } + + immediate = { + scope:target = { + random_secret = { + type = secret_witch + reveal_to = root + } + trigger_event = witch.2007 + } + random_secret = { + type = secret_witch + reveal_to = scope:target + } + reverse_add_opinion = { + target = scope:target + modifier = respect_opinion + opinion = 20 + } + } + + #Great! + option = { + name = witch.2006.a + } + + after = { + scope:scheme = { + end_scheme = yes + } + } +} + + +#Target was already a witch! Expose your secrets to each other - for target +witch.2007 = { #by Linnéa Thimrén + type = character_event + title = witch.2007.t + desc = witch.2007.desc + theme = witchcraft + override_background = { + reference = sitting_room + } + left_portrait = { + character = scope:owner + animation = shock + } + + trigger = { #Make sure the secrets are still unknown and that target is alive and kicking + scope:owner = { + is_alive = yes + is_witch_trigger = yes + } + } + + immediate = { + show_as_tooltip = { + scope:owner = { + random_secret = { + type = secret_witch + reveal_to = root + } + } + random_secret = { + type = secret_witch + reveal_to = scope:owner + } + } + reverse_add_opinion = { + target = scope:owner + modifier = respect_opinion + opinion = 20 + } + } + + #Great! + option = { + name = witch.2007.a + } +} + +############################### +# REVEAL AS WITCH INTERACTION # +############################### + +witch.2900 = { + type = letter_event + opening = witch.2900.t + desc = witch.2900.desc + sender = scope:actor + orphan = yes + + immediate = { + scope:witch_secret = { reveal_to = root } + hidden_effect = { + if = { + limit = { can_set_relation_potential_friend_trigger = { CHARACTER = scope:actor } } + set_relation_potential_friend = scope:actor + } + } + } + + option = { + name = witch.2900.a + scope:actor = { + trigger_event = { + id = witch.2901 + days = 3 + } + } + } +} + +witch.2901 = { + type = letter_event + opening = witch.2901.t + desc = witch.2901.desc + sender = scope:recipient + + option = { + name = witch.2901.a + } +} + + +######################### +# WITCH RITUAL ACTIVITY # +######################### + +witch.3001 = { + type = letter_event + opening = witch.3001.t + desc = witch.3001.desc + sender = scope:host + orphan = yes # deprecated by new activity system + + immediate = { + scope:activity.activity_host = { save_scope_as = host } + debug_log = invitation_received + } + + #Yes! + option = { + name = witch.3001.a + + play_music_cue = "mx_cue_sacredrite" + accept_activity_invite = scope:activity + reverse_add_opinion = { + target = scope:host + modifier = pleased_opinion + opinion = 10 + } + ai_chance = { + base = 100 + opinion_modifier = { + opinion_target = scope:host + } + } + } + + #No... + option = { + name = witch.3001.b + + decline_activity_invite = scope:activity + reverse_add_opinion = { + target = scope:host + modifier = disappointed_opinion + opinion = -10 + } + ai_chance = { + base = 10 + modifier = { + add = 15 + target_is_liege_or_above = scope:host + } + ai_value_modifier = { + ai_boldness = 0.2 + } + } + } +} + +#No guests came +witch.3002 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3002.t + desc = witch.3002.desc + theme = witchcraft + override_background = { + reference = bp1_bonfire + } + left_portrait = { + character = scope:target + animation = sadness + } + + option = { + name = witch.3002.a + + scope:activity = { + set_variable = activity_invalidated + } + } +} + + +#Uninvited guest +scripted_trigger witch_3003_potential_guest_trigger = { + is_adult = yes + NOR = { + has_RelationToMe_relation = { CHARACTER = root } + any_secret = { + type = secret_witch + is_known_by = root + } + } + faith = scope:inviter.faith + culture = { has_same_culture_heritage = scope:inviter.culture } + is_witch_trigger = yes +} + + +witch.3003 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3003.t + desc = witch.3003.desc + theme = witchcraft + override_background = { + reference = corridor_night + } + left_portrait = scope:inviter + right_portrait = scope:new_guest + + trigger = { + scope:activity = { + any_attending_character = { + this != root + is_adult = yes + } + } + } + + immediate = { + hidden_effect = { + capital_province = { save_scope_as = capital } + + #Find inviter + scope:activity = { + random_attending_character = { + limit = { + NOR = { + is_courtier_of = root + this = root + } + is_ai = yes + is_adult = yes + } + alternative_limit = { + is_ai = yes + is_adult = yes + } + alternative_limit = { is_adult = yes } + save_scope_as = inviter + } + } + + #50% chance of pool character guest, 50% chance of new guest + random = { + chance = 50 + random_pool_character = { + province = capital_province + limit = { + witch_3003_potential_guest_trigger = yes + save_temporary_scope_as = potential_guest + OR = { + AND = { + OR = { + has_trait = beauty_good + has_trait = intellect_good + } + matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:potential_guest CHARACTER_2 = root } + } + has_trait = lifestyle_herbalist + } + } + alternative_limit = { + witch_3003_potential_guest_trigger = yes + } + save_scope_as = new_guest + } + } + + if = { + limit = { + NOT = { exists = scope:new_guest } + } + create_witch_effect = { WHO = root } + scope:created_witch = { + save_scope_as = new_guest + visit_court_of = root + } + } + + #Discover secret + scope:new_guest = { + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = root } + } + reveal_to = root + } + add_character_flag = { + flag = grand_rite_new_guest + days = 30 + } + } + } + } + + #You are very welcome! + option = { + name = witch.3003.a + + scope:new_guest = { + add_to_activity = scope:activity + } + reverse_add_opinion = { + target = scope:new_guest + modifier = grateful_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:inviter + modifier = grateful_opinion + opinion = 15 + } + } + + #Guest of honor! + option = { + name = witch.3003.b + + scope:new_guest = { + add_to_activity = scope:activity + } + reverse_add_opinion = { + target = scope:new_guest + modifier = grateful_opinion + opinion = 30 + } + reverse_add_opinion = { + target = scope:inviter + modifier = envy_opinion + opinion = -10 + } + } + + #Invitations only, sorry + option = { + name = witch.3003.c + + reverse_add_opinion = { + target = scope:new_guest + modifier = disappointed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:inviter + modifier = disappointed_opinion + opinion = -15 + } + } +} + + +#Grand rite choice + +scripted_effect grand_rite_good_outcome = { + scope:activity = { + every_attending_character = { + limit = { this != root } + custom = every_grand_rite_participant + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 20 + } + } + } +} + +scripted_effect grand_rite_poor_outcome = { + scope:activity = { + every_attending_character = { + limit = { this != root } + custom = every_grand_rite_participant + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + add_stress = minor_stress_gain +} + +witch.3010 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3010.t + desc = witch.3010.desc + theme = witchcraft + override_background = { + reference = bp1_bonfire + } + left_portrait = root + + immediate = { + save_scope_as = host + capital_province = { save_scope_as = background_wilderness_scope } + } + + #Read old scroll + option = { + name = witch.3010.a + + duel = { + skill = learning + value = average_skill_rating + 75 = { + desc = witch.3010.a.great + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + save_scope_value_as = { + name = grand_rite_ceremony_outcome + value = flag:great_translation + } + show_as_tooltip = { grand_rite_good_outcome = yes } + } + 25 = { + desc = witch.3010.a.poor + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + min = 10 + save_scope_value_as = { + name = grand_rite_ceremony_outcome + value = flag:poor_translation + } + show_as_tooltip = { grand_rite_poor_outcome = yes } + } + } + } + + #Use some tricks + option = { + name = witch.3010.b + + duel = { + skill = intrigue + value = average_skill_rating + 75 = { + desc = witch.3010.b.great + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + save_scope_value_as = { + name = grand_rite_ceremony_outcome + value = flag:great_tricks + } + show_as_tooltip = { grand_rite_good_outcome = yes } + } + 25 = { + desc = witch.3010.b.poor + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + min = 10 + save_scope_value_as = { + name = grand_rite_ceremony_outcome + value = flag:poor_tricks + } + show_as_tooltip = { grand_rite_poor_outcome = yes } + } + } + + stress_impact = { + honest = minor_stress_impact_gain + } + } + + #Improvise + option = { + name = witch.3010.c + + duel = { + skill = diplomacy + value = average_skill_rating + 75 = { + desc = witch.3010.c.great + compare_modifier = { + value = scope:duel_value + multiplier = 5 + } + save_scope_value_as = { + name = grand_rite_ceremony_outcome + value = flag:great_improvisation + } + show_as_tooltip = { grand_rite_good_outcome = yes } + } + 25 = { + desc = witch.3010.c.poor + compare_modifier = { + value = scope:duel_value + multiplier = -5 + } + min = 10 + save_scope_value_as = { + name = grand_rite_ceremony_outcome + value = flag:poor_improvisation + } + show_as_tooltip = { grand_rite_poor_outcome = yes } + } + } + + stress_impact = { + shy = minor_stress_impact_gain + } + } + + #Have a really nice offering + option = { + trigger = { + is_ai = no + short_term_gold >= medium_gold_value + } + name = witch.3010.d + + remove_short_term_gold = medium_gold_value + + save_scope_value_as = { + name = grand_rite_ceremony_outcome + value = flag:offering + } + + grand_rite_good_outcome = yes + + stress_impact = { + greedy = minor_stress_impact_gain + } + } + + option = { + trigger = { + short_term_gold < medium_gold_value + } + name = witch.3010.e + custom_tooltip = witch.3010.e.tt + + } + + after = { + scope:activity = { + every_attending_character = { + trigger_event = { + id = witch.3014 + } + } + } + } +} + +#Everyone reacts to the grand rite (host and guests) +scripted_trigger witch_3014_can_have_sex_trigger = { + is_adult = yes + NOR = { + has_sexuality = asexual + has_trait = celibate + } + might_cheat_on_every_partner_trigger = yes +} + +scripted_trigger witch_3014_sex_partner_trigger = { + witch_3014_can_have_sex_trigger = yes + this != root + is_ai = yes + save_temporary_scope_as = seduction_target + matching_gender_and_sexuality_trigger = { CHARACTER_1 = scope:seduction_target CHARACTER_2 = root } + might_cheat_on_every_partner_trigger = yes +} + +scripted_trigger witch_3014_loved_sex_partner_trigger = { + witch_3014_sex_partner_trigger = yes + OR = { + has_relation_lover = root + is_consort_of = root + has_relation_soulmate = root + } +} + +scripted_trigger witch_3014_regular_sex_partner_trigger = { + witch_3014_sex_partner_trigger = yes + NOR = { + has_relation_lover = root + has_relation_soulmate = root + is_consort_of = root + } +} + +scripted_effect witch_3017_soulmate_sex_effect = { + reverse_add_opinion = { + target = scope:sex_partner + modifier = love_opinion + opinion = 20 + } + add_stress = major_stress_loss + had_sex_with_effect = { CHARACTER = scope:sex_partner PREGNANCY_CHANCE = 50 } +} + + +witch.3014 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3010.t + desc = { + #host + first_valid = { + triggered_desc = { + trigger = { root = scope:host } + desc = { + first_valid = { + triggered_desc = { + trigger = { scope:grand_rite_ceremony_outcome = flag:great_translation } + desc = witch.3014.host.great_translation.desc + } + triggered_desc = { + trigger = { scope:grand_rite_ceremony_outcome = flag:poor_translation } + desc = witch.3014.host.poor_translation.desc + } + triggered_desc = { + trigger = { scope:grand_rite_ceremony_outcome = flag:great_tricks } + desc = witch.3014.host.great_tricks.desc + } + triggered_desc = { + trigger = { scope:grand_rite_ceremony_outcome = flag:poor_tricks } + desc = witch.3014.host.poor_tricks.desc + } + triggered_desc = { + trigger = { scope:grand_rite_ceremony_outcome = flag:great_improvisation } + desc = witch.3014.host.great_improvisation.desc + } + triggered_desc = { + trigger = { scope:grand_rite_ceremony_outcome = flag:poor_improvisation } + desc = witch.3014.host.poor_improvisation.desc + } + triggered_desc = { + trigger = { scope:grand_rite_ceremony_outcome = flag:offering } + desc = witch.3014.host.offering.desc + } + desc = witch.3014.host.fallback.desc + } + desc = witch.3014.host.end.desc + } + } + #everyone else + desc = { + desc = witch.3014.guest.start.desc + first_valid = { + triggered_desc = { + trigger = { + OR = { + scope:grand_rite_ceremony_outcome = flag:great_translation + scope:grand_rite_ceremony_outcome = flag:great_tricks + scope:grand_rite_ceremony_outcome = flag:great_improvisation + scope:grand_rite_ceremony_outcome = flag:offering + NOT = { exists = scope:grand_rite_ceremony_outcome } + } + } + desc = witch.3014.guest.good.desc + } + triggered_desc = { + trigger = { + OR = { + scope:grand_rite_ceremony_outcome = flag:poor_translation + scope:grand_rite_ceremony_outcome = flag:poor_tricks + scope:grand_rite_ceremony_outcome = flag:poor_improvisation + } + } + desc = witch.3014.guest.bad.desc + } + desc = witch.3014.guest.fallback.desc + } + desc = witch.3014.guest.end.desc + } + } + } + theme = witchcraft + override_background = { + reference = bp1_bonfire + } + left_portrait = scope:left_portrait + right_portrait = scope:right_portrait + lower_left_portrait = scope:lower_left_portrait + lower_center_portrait = scope:lower_center_portrait + lower_right_portrait = scope:lower_right_portrait + + + + immediate = { + #Tell everyone secret about everyone else + hidden_effect = { + scope:activity = { + every_attending_character = { + save_temporary_scope_as = learning_secret + scope:activity = { + every_attending_character = { + random_secret = { + type = secret_witch + limit = { + NOT = { is_known_by = scope:learning_secret } + } + reveal_to = scope:learning_secret + } + } + } + } + } + } + + #Give outcome to host + if = { + limit = { this = scope:host } + + if = { + limit = { + OR = { + scope:grand_rite_ceremony_outcome = flag:great_translation + scope:grand_rite_ceremony_outcome = flag:great_tricks + scope:grand_rite_ceremony_outcome = flag:great_improvisation + scope:grand_rite_ceremony_outcome = flag:offering + } + } + grand_rite_good_outcome = yes + } + else = { + grand_rite_poor_outcome = yes + } + } + + + ###What is available to do?### + scope:activity = { + #Talk to new guest + if = { + limit = { root = scope:host } + scope:activity = { + random_attending_character = { + limit = { has_character_flag = grand_rite_new_guest } + save_scope_as = new_guest + } + } + } + + #Herbalism + random_attending_character = { + limit = { + has_trait = lifestyle_herbalist + NOR = { + trigger_if = { + limit = { exists = scope:new_guest } + this = scope:new_guest + } + this = root + } + } + save_scope_as = herbalist + } + + #Teacher (experience ) + random_attending_character = { + limit = { + NOR = { + trigger_if = { + limit = { exists = scope:new_guest } + this = scope:new_guest + } + trigger_if = { + limit = { exists = scope:herbalist } + this = scope:herbalist + } + this = root + } + trigger_if = { + limit = { highest_skill = diplomacy } + root = { diplomacy_lifestyle_perk_points < max_perk_amount_per_lifestyle } + } + trigger_else_if = { + limit = { highest_skill = martial } + root = { martial_lifestyle_perk_points < max_perk_amount_per_lifestyle } + } + trigger_else_if = { + limit = { highest_skill = stewardship } + root = { stewardship_lifestyle_perk_points < max_perk_amount_per_lifestyle } + } + trigger_else_if = { + limit = { highest_skill = intrigue } + root = { intrigue_lifestyle_perk_points < max_perk_amount_per_lifestyle } + } + trigger_else_if = { + limit = { highest_skill = learning } + root = { learning_lifestyle_perk_points < max_perk_amount_per_lifestyle } + } + trigger_else = { + always = no + } + } + weight = { + base = 0 + modifier = { + add = { + if = { + limit = { highest_skill = diplomacy } + add = diplomacy + } + else_if = { + limit = { highest_skill = martial } + add = martial + } + else_if = { + limit = { highest_skill = stewardship } + add = stewardship + } + else_if = { + limit = { highest_skill = intrigue } + add = intrigue + } + else_if = { + limit = { highest_skill = learning } + add = learning + } + } + } + } + save_scope_as = teacher + } + + #Someone to seduce + if = { + limit = { + root = { + witch_3014_can_have_sex_trigger = yes + } + } + #If you have a soulmate here, only sleep with them (not available if they can't sleep with you for some reason) + if = { + limit = { any_attending_character = { has_relation_soulmate = root } } + random_attending_character = { + limit = { + witch_3014_loved_sex_partner_trigger = yes + has_relation_soulmate = root + } + save_scope_as = sex_partner + } + } + else = { + random_list = { + #Just someone regular + 1 = { + trigger = { + any_attending_character = { + witch_3014_regular_sex_partner_trigger = yes + accepts_incest_with_trigger = { CHARACTER = root } #Skip this one if there's only non-accepting incest options available + } + } + random_attending_character = { + limit = { + witch_3014_regular_sex_partner_trigger = yes + save_temporary_scope_as = sex_partner_check #Saved for weight modifier + } + weight = { + base = 10 + modifier = { + has_trait = seducer + add = 10 + } + modifier = { + has_trait = lustful + add = 10 + } + modifier = { + has_trait = beauty_good + add = 10 + } + modifier = { + has_relation_potential_lover = root + add = 10 + } + incest_acceptance_modifier = { + TARGET = scope:sex_partner_check + SEDUCER = root + } + } + save_scope_as = sex_partner + } + } + 1 = { + trigger = { + any_attending_character = { + witch_3014_loved_sex_partner_trigger = yes + } + } + random_attending_character = { + limit = { + witch_3014_loved_sex_partner_trigger = yes + } + weight = { + base = 1 + modifier = { + is_spouse_of = root + add = 2 + } + } + save_scope_as = sex_partner + } + } + } + } + } + + #Set portraits + if = { + limit = { + exists = scope:herbalist + exists = scope:teacher + exists = scope:new_guest + } + scope:herbalist = { save_scope_as = lower_left_portrait } + scope:teacher = { save_scope_as = lower_center_portrait } + scope:new_guest = { save_scope_as = lower_right_portrait } + } + else_if = { + limit = { + exists = scope:herbalist + exists = scope:teacher + } + scope:herbalist = { save_scope_as = left_portrait } + scope:teacher = { save_scope_as = right_portrait } + } + else_if = { + limit = { + exists = scope:herbalist + exists = scope:new_guest + } + scope:herbalist = { save_scope_as = left_portrait } + scope:new_guest = { save_scope_as = right_portrait } + } + else_if = { + limit = { + exists = scope:teacher + exists = scope:new_guest + } + scope:teacher = { save_scope_as = left_portrait } + scope:new_guest = { save_scope_as = right_portrait } + } + else_if = { + limit = { exists = scope:herbalist } + scope:herbalist = { save_scope_as = left_portrait } + } + else_if = { + limit = { exists = scope:teacher } + scope:teacher = { save_scope_as = left_portrait } + } + else_if = { + limit = { exists = scope:new_guest } + scope:new_guest = { save_scope_as = left_portrait } + } + else = { + save_scope_as = left_portrait + } + } + } + + ###WHAT DO I WANT TO DO?### + + #Herbalism + option = { + trigger = { + exists = scope:herbalist + } + name = witch.3014.a + highlight_portrait = scope:herbalist + + if = { + limit = { NOT = { has_trait = lifestyle_herbalist } } + random_list = { + 40 = { + desc = witch.3014.a.knowledge + send_interface_toast = { + title = witch.3014.a.knowledge + left_icon = scope:herbalist + add_trait = lifestyle_herbalist + } + } + 60 = { + desc = witch.3014.a.inspiration + send_interface_toast = { + title = witch.3014.a.inspiration + left_icon = scope:herbalist + add_character_modifier = { + modifier = seeker_of_knowledge + years = 5 + } + } + } + } + } + else = { + add_character_modifier = { + modifier = seeker_of_knowledge + years = 5 + } + } + + stress_impact = { + lazy = minor_stress_impact_gain + } + } + + #Teacher gives you lifestyle perk point + option = { + trigger = { exists = scope:teacher } + name = { + text = { + desc = witch.3014.b.start + first_valid = { + triggered_desc = { + trigger = { scope:teacher = { highest_skill = diplomacy } } + desc = witch.3014.b.diplomacy + } + triggered_desc = { + trigger = { scope:teacher = { highest_skill = martial } } + desc = witch.3014.b.martial + } + triggered_desc = { + trigger = { scope:teacher = { highest_skill = stewardship } } + desc = witch.3014.b.stewardship + } + triggered_desc = { + trigger = { scope:teacher = { highest_skill = intrigue } } + desc = witch.3014.b.intrigue + } + triggered_desc = { + trigger = { scope:teacher = { highest_skill = learning } } + desc = witch.3014.b.learning + } + } + } + } + highlight_portrait = scope:teacher + + if = { + limit = { scope:teacher = { highest_skill = diplomacy } } + add_diplomacy_lifestyle_perk_points = 1 + } + else_if = { + limit = { scope:teacher = { highest_skill = martial } } + add_martial_lifestyle_perk_points = 1 + } + else_if = { + limit = { scope:teacher = { highest_skill = stewardship } } + add_stewardship_lifestyle_perk_points = 1 + } + else_if = { + limit = { scope:teacher = { highest_skill = intrigue } } + add_intrigue_lifestyle_perk_points = 1 + } + else_if = { + limit = { scope:teacher = { highest_skill = learning } } + add_learning_lifestyle_perk_points = 1 + } + + stress_impact = { + lazy = minor_stress_impact_gain + } + } + + #Seducer (sneak away) + option = { + trigger = { + exists = scope:sex_partner + NOT = { has_relation_soulmate = scope:sex_partner } + is_attracted_to_gender_of = scope:sex_partner + might_cheat_on_every_partner_trigger = yes + } + name = witch.3014.c + custom_tooltip = witch.3014.c.tt + + if = { + limit = { scope:sex_partner = { witch_3014_loved_sex_partner_trigger = yes } } + trigger_event = { + id = witch.3016 + days = 1 + } + } + else = { + trigger_event = { + id = witch.3015 + days = 1 + } + } + + stress_impact = { + chaste = medium_stress_impact_gain + shy = minor_stress_impact_gain + rakish = minor_stress_impact_loss + } + } + + #Seducer (soulmate) + option = { + trigger = { + exists = scope:sex_partner + has_relation_soulmate = scope:sex_partner + } + name = witch.3014.e + highlight_portrait = scope:sex_partner + + trigger_event = { + id = witch.3017 + days = 1 + } + show_as_tooltip = { witch_3017_soulmate_sex_effect = yes } + } + + #Talk with new guest + option = { + trigger = { exists = scope:new_guest } + name = witch.3014.d + highlight_portrait = scope:new_guest + + random_list = { + 35 = { #Becomes friend and joins court + desc = witch.3014.d.move_in + compatibility_modifier = { + who = root + compatibility_target = scope:new_guest + multiplier = 3 + max = 50 + min = -30 + } + send_interface_toast = { + title = witch.3014.d.move_in + left_icon = scope:new_guest + set_relation_friend = { reason = friend_bond_at_ceremony target = scope:new_guest } + add_courtier = scope:new_guest + } + } + 50 = { #Becomes friend + desc = witch.3014.d.friend + compatibility_modifier = { + who = root + compatibility_target = scope:new_guest + multiplier = 2 + max = 35 + min = -35 + } + send_interface_toast = { + title = witch.3014.d.friend + left_icon = scope:new_guest + set_relation_friend = { reason = friend_bond_at_ceremony target = scope:new_guest province = root.location } + } + } + 15 = { + desc = witch.3014.d.enemy + compatibility_modifier = { + who = root + compatibility_target = scope:new_guest + multiplier = -3 + max = 60 + min = -9 + } + modifier = { + OR = { + has_trait = vengeful + has_trait = callous + has_trait = sadistic + has_trait = wrathful + } + add = 15 + } + send_interface_toast = { + title = witch.3014.d.enemy + left_icon = scope:new_guest + set_relation_rival = { + target = scope:new_guest + reason = rival_at_ceremony + } + } + } + } + + stress_impact = { + shy = minor_stress_impact_gain + } + } + + #Relax and indulge + option = { + trigger = { + calc_true_if = { + amount <= 3 + exists = scope:herbalist + exists = scope:teacher + exists = scope:sex_partner + exists = scope:new_guest + } + } + name = witch.3014.f + + stress_impact = { + base = major_stress_loss + gregarious = minor_stress_impact_loss + drunkard = minor_stress_impact_loss + hashishiyah = minor_stress_impact_loss + comfort_eater = minor_stress_impact_loss + } + } +} + + +#Sleep with someone (regular) +witch.3015 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3015.t + desc = { + desc = witch.3015.start.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:new_guest + scope:sex_partner = scope:new_guest + } + desc = witch.3015.new_guest.desc + } + desc = witch.3015.regular.desc + } + desc = witch.3015.end.desc + } + theme = witchcraft + override_background = { + reference = bp1_bonfire + } + left_portrait = { + character = scope:sex_partner + animation = flirtation + } + + #Yes + option = { + name = witch.3015.a + + progress_towards_lover_effect = { + CHARACTER = scope:sex_partner + REASON = lover_witch_sex_partner + OPINION = default_lover_opinion + } + had_sex_with_effect = { CHARACTER = scope:sex_partner PREGNANCY_CHANCE = 50 } + } + + #No + option = { + name = witch.3015.b + custom_tooltip = witch.3015.b.tt + + reverse_add_opinion = { + target = scope:sex_partner + modifier = disappointed_opinion + opinion = -15 + } + } +} + +#Sleep with someone (spouse/lover -> soulmate) +witch.3016 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3016.t + desc = { + desc = witch.3015.start.desc + desc = witch.3016.end.desc + } + theme = witchcraft + override_background = { + reference = bp1_bonfire + } + left_portrait = { + character = scope:sex_partner + animation = love + } + + #Yes + option = { + name = witch.3016.a + + set_relation_soulmate = { reason = soulmate_witch_ceremony copy_reason = lover target = scope:sex_partner } + had_sex_with_effect = { CHARACTER = scope:sex_partner PREGNANCY_CHANCE = 50 } + } + + #No + option = { + name = witch.3016.b + custom_tooltip = witch.3015.b.tt + + reverse_add_opinion = { + target = scope:sex_partner + modifier = disappointed_opinion + opinion = -15 + } + } +} + + +#Sleep with someone (soulmate) +witch.3017 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3016.t + desc = { + desc = witch.3015.start.desc + desc = witch.3017.end.desc + } + theme = witchcraft + override_background = { + reference = bp1_bonfire + } + left_portrait = { + character = scope:sex_partner + animation = love + } + + #Yes + option = { + name = witch.3017.a + witch_3017_soulmate_sex_effect = yes + } + + #No + option = { + name = witch.3017.b + custom_tooltip = witch.3015.b.tt + + reverse_add_opinion = { + target = scope:sex_partner + modifier = disappointed_opinion + opinion = -15 + } + } +} + + +###Grand rite end events## + +#End for host +witch.3098 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3098.t + desc = { + desc = witch.3098.start.desc + desc = witch.3098.end.desc + } + theme = witchcraft + override_background = { + reference = bp1_bonfire + } + left_portrait = root + + immediate = { + capital_province = { save_scope_as = background_wilderness_scope } + } + + option = { + name = witch.3098.a + } +} + +#End for guest +witch.3099 = { #by Mathilda Bjarnehed + type = activity_event + title = witch.3098.t + desc = { + desc = witch.3099.start.desc + desc = witch.3098.end.desc + } + theme = witchcraft + override_background = { + reference = bp1_bonfire + } + left_portrait = root + + option = { + name = witch.3098.a + custom_tooltip = witch.3099.tt + } +} + + + +######################## +# WITCH ONGOING EVENTS # +######################## + +### Court chaplain / other clergy is an idiot ### + +scripted_trigger witch_4001_annoying_clergy_trigger = { + OR = { + has_council_position = councillor_court_chaplain + is_clergy = yes + } + ai_zeal >= medium_negative_ai_value + NOR = { + is_close_family_of = root + has_relation_friend = root + has_relation_lover = root + opinion = { + target = root + value >= medium_positive_opinion + } + any_secret = { + type = secret_non_believer + } + } + is_ai = yes + faith = root.faith +} + +scripted_effect witch_4001_prank_success_effect = { + add_character_modifier = { + modifier = trickster_modifier + years = 10 + } + stress_impact = { + base = medium_stress_impact_loss + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + vengeful = minor_stress_impact_loss + sadistic = medium_stress_impact_loss + deceitful = minor_stress_impact_loss + } + scope:annoying_clergy = { + add_prestige = medium_prestige_loss + } +} + +scripted_effect witch_4001_corruption_success_effect = { + scope:annoying_clergy = { + add_secret = { + type = secret_non_believer + } + random_secret = { + type = secret_non_believer + reveal_to = root + } + custom_tooltip = witch_4001_corruption_success_effect.tt + } +} + +scripted_trigger witch_4001_desc_valid_sin_trigger = { + faith = { trait_is_sin = $TRAIT$ } + NOT = { + scope:annoying_clergy = { has_trait = $TRAIT$ } + } +} + +scripted_trigger witch_4001_desc_prefered_sin_trigger = { + witch_4001_desc_valid_sin_trigger = { TRAIT = $TRAIT$ } + has_trait = $TRAIT$ +} + +scripted_trigger witch_4001_zeal_condition_trigger = { + OR = { + ai_zeal <= high_negative_zeal + AND = { + num_sinful_traits >= 1 + ai_zeal < 0 + } + } +} + +scripted_trigger witch_4001_event_available_trigger = { + NOT = { has_character_flag = event_cooldown_witch_4001 } + OR = { + trigger_if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { witch_4001_annoying_clergy_trigger = yes } + } + trigger_if = { + limit = { is_landed = no } + any_courtier = { + witch_4001_annoying_clergy_trigger = yes + } + } + trigger_else = { + any_vassal = { + witch_4001_annoying_clergy_trigger = yes + } + } + } +} + +witch.4000 = { #Pre-event to ensure witch if sent through trait-specific on-action + hidden = yes + + trigger = { + is_witch_trigger = yes + witch_4001_event_available_trigger = yes + } + + immediate = { + trigger_event = witch.4001 + } +} + +witch.4001 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4001.t + desc = { + desc = witch.4001.start.desc + #Pick a sin + first_valid = { + #A sin that root has + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = forgiving } } + desc = witch.4001.forgiving.desc + } + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = deceitful } } + desc = witch.4001.deceitful.desc + } + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = gluttonous } } + desc = witch.4001.gluttonous.desc + } + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = wrathful } } + desc = witch.4001.wrathful.desc + } + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = greedy } } + desc = witch.4001.greedy.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = arbitrary } } + desc = witch.4001.arbitrary.desc + } + triggered_desc = { + trigger = { + OR = { + witch_4001_desc_prefered_sin_trigger = { TRAIT = sadistic } + witch_4001_desc_prefered_sin_trigger = { TRAIT = callous } + } + } + desc = witch.4001.sadistic.desc + } + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = craven } } + desc = witch.4001.craven.desc + } + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = lustful } } + desc = witch.4001.lustful.desc + } + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = vengeful } } + desc = witch.4001.vengeful.desc + } + triggered_desc = { + trigger = { witch_4001_desc_prefered_sin_trigger = { TRAIT = arrogant } } + desc = witch.4001.arrogant.desc + } + #A sin that root doesn't have + random_valid = { + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = forgiving } } + desc = witch.4001.forgiving.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = deceitful } } + desc = witch.4001.deceitful.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = gluttonous } } + desc = witch.4001.gluttonous.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = wrathful } } + desc = witch.4001.wrathful.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = greedy } } + desc = witch.4001.greedy.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = arbitrary } } + desc = witch.4001.arbitrary.desc + } + triggered_desc = { + trigger = { + OR = { + witch_4001_desc_valid_sin_trigger = { TRAIT = sadistic } + witch_4001_desc_valid_sin_trigger = { TRAIT = callous } + } + } + desc = witch.4001.sadistic.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = craven } } + desc = witch.4001.craven.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = lustful } } + desc = witch.4001.lustful.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = vengeful } } + desc = witch.4001.vengeful.desc + } + triggered_desc = { + trigger = { witch_4001_desc_valid_sin_trigger = { TRAIT = arrogant } } + desc = witch.4001.arrogant.desc + } + } + desc = witch.4001.fallback.desc + } + first_valid = { + triggered_desc = { + trigger = { is_witch_trigger = yes } + desc = witch.4001.witch.desc + } + desc = witch.4001.impious.desc + } + } + theme = faith + override_icon = { + trigger = { is_witch_trigger = yes } + reference = "gfx/interface/icons/event_types/type_medicine.dds" + } + left_portrait = scope:annoying_clergy + + trigger = { + OR = { + witch_4001_zeal_condition_trigger = yes + is_witch_trigger = yes + } + witch_4001_event_available_trigger = yes + } + + weight_multiplier = { + base = 0.2 + modifier = { + is_witch_trigger = yes + add = 0.8 + } + modifier = { + num_sinful_traits >= 1 + add = 0.4 + } + } + + immediate = { + add_character_flag = event_cooldown_witch_4001 + if = { + limit = { + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { witch_4001_annoying_clergy_trigger = yes } + } + cp:councillor_court_chaplain = { add_to_list = annoying_clergy_list } + } + if = { + limit = { is_landed = no } + every_courtier = { + limit = { + NOT = { is_in_list = annoying_clergy_list } + witch_4001_annoying_clergy_trigger = yes + } + add_to_list = annoying_clergy_list + } + } + else = { + every_vassal = { + limit = { + NOT = { is_in_list = annoying_clergy_list } + witch_4001_annoying_clergy_trigger = yes + } + add_to_list = annoying_clergy_list + } + } + + + random_in_list = { + list = annoying_clergy_list + weight = { + base = 30 + modifier = { + OR = { + is_councillor = yes + is_powerful_vassal = yes + } + add = 150 + } + opinion_modifier = { + opinion_target = root + multiplier = -1 + min = -25 + } + modifier = { + add = { + value = ai_zeal + divide = 2 + } + } + } + save_scope_as = annoying_clergy + } + + capital_province = { save_scope_as = capital } + } + + #Make a fool of them + option = { + name = witch.4001.a + flavor = witch.4001.a.tt + + duel = { + skill = intrigue + target = scope:annoying_clergy + desc = outcome_in_a_few_days + + 60 = { + desc = witch.4001.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 3.5 + } + show_as_tooltip = { witch_4001_prank_success_effect = yes } + trigger_event = { + id = witch.4002 + days = 3 + } + } + 40 = { + desc = witch.4001.a.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + send_interface_toast = { + title = witch.4001.a.failure + left_icon = scope:annoying_clergy + reverse_add_opinion = { + target = scope:annoying_clergy + modifier = angry_opinion + opinion = -10 + } + } + } + } + + stress_impact = { + compassionate = minor_stress_impact_gain + honest = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + craven = minor_stress_impact_gain + } + + } + + #Impress them + option = { + name = witch.4001.c + + reverse_add_opinion = { + target = scope:annoying_clergy + modifier = pious_opinion + opinion = 20 + } + add_piety = minor_piety_gain + + stress_impact = { + honest = minor_stress_impact_gain + cynical = minor_stress_impact_gain + } + } + + #Turn them around + option = { + name = witch.4001.b + + duel = { + desc = outcome_in_a_few_weeks + skill = learning + target = scope:annoying_clergy + + 30 = { + desc = witch.4001.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 3 + } + show_as_tooltip = { witch_4001_corruption_success_effect = yes } + + trigger_event = { + id = witch.4003 + days = { 7 14 } + } + } + 20 = { + desc = witch.4001.b.neutral + compare_modifier = { + value = scope:duel_value + multiplier = 1 + } + custom_tooltip = witch.4001.b.neutral.tt + trigger_event = { + id = witch.4004 + days = { 7 14 } + } + } + 50 = { + desc = witch.4001.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -3 + } + trigger_event = { + id = witch.4005 + days = { 7 14 } + } + modifier = { + add = { + value = scope:annoying_clergy.ai_zeal + divide = 2 + } + } + } + } + } +} + + +#You made a fool out of them! +witch.4002 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_witch_trigger = yes } + desc = witch.4002.witch.desc + } + desc = witch.4002.impious.desc + } + first_valid = { + #A sin + triggered_desc = { + trigger = { + faith = { trait_is_sin = gluttonous } + NOT = { scope:annoying_clergy = { has_trait = temperate } } + } + desc = witch.4002.gluttonous.desc + } + triggered_desc = { + trigger = { + OR = { + faith = { trait_is_sin = wrathful } + faith = { trait_is_sin = drunkard } + } + } + desc = witch.4002.wrathful.desc + } + triggered_desc = { + trigger = { + OR = { + faith = { trait_is_sin = sadistic } + faith = { trait_is_sin = callous } + faith = { trait_is_sin = vengeful } + } + NOR = { + NOT = { scope:annoying_clergy = { has_trait = compassionate } } + NOT = { scope:annoying_clergy = { has_trait = forgiving } } + } + exists = scope:vengeful_desc + } + desc = witch.4002.vengeful.desc + } + triggered_desc = { + trigger = { + faith = { trait_is_sin = craven } + NOT = { scope:annoying_clergy = { has_trait = brave } } + } + desc = witch.4002.craven.desc + } + triggered_desc = { + trigger = { + faith = { trait_is_sin = lustful } + exists = scope:lustful_desc + } + desc = witch.4002.lustful.desc + } + triggered_desc = { + trigger = { + faith = { trait_is_sin = arrogant } + NOT = { scope:annoying_clergy = { has_trait = humble } } + } + desc = witch.4002.arrogant.desc + } + #Not sins but it still looks bad + random_valid = { + triggered_desc = { + trigger = { NOT = { scope:annoying_clergy = { has_trait = temperate } } } + desc = witch.4002.gluttonous.desc + } + triggered_desc = { + trigger = { exists = scope:lustful_desc } + desc = witch.4002.lustful.desc + } + triggered_desc = { + trigger = { + NOR = { + NOT = { scope:annoying_clergy = { has_trait = compassionate } } + NOT = { scope:annoying_clergy = { has_trait = forgiving } } + } + exists = scope:vengeful_desc + } + } + triggered_desc = { + trigger = { NOT = { scope:annoying_clergy = { has_trait = humble } } } + desc = witch.4002.arrogant.desc + } + desc = witch.4002.wrathful.desc + } + + } + desc = witch.4002.end.desc + } + theme = faith + override_icon = { + trigger = { is_witch_trigger = yes } + reference = "gfx/interface/icons/event_types/type_medicine.dds" + } + left_portrait = scope:annoying_clergy + + trigger = { + exists = scope:annoying_clergy + } + + immediate = { + witch_4001_prank_success_effect = yes + if = { + limit = { is_ai = no } #This is just for text + random_courtier = { + limit = { + is_adult = yes + NOR = { + this = root + this = scope:annoying_clergy + is_consort_of = scope:annoying_clergy + has_relation_lover = scope:annoying_clergy + } + scope:annoying_clergy = { is_attracted_to_gender_of = prev } + } + save_scope_as = lustful_desc + } + random_courtier = { + limit = { + is_adult = yes + NOR = { + this = root + this = scope:annoying_clergy + } + } + save_scope_as = vengeful_desc + } + scope:annoying_clergy = { + romance_target_gender_effect = { SCOPE_NAME = wrathful_desc } + } + } + } + + option = { + name = witch.4002.a + + } +} + + +#You corrupted them! +witch.4003 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4001.t + desc = witch.4003.desc + theme = faith + override_icon = { + trigger = { is_witch_trigger = yes } + reference = "gfx/interface/icons/event_types/type_medicine.dds" + } + left_portrait = scope:annoying_clergy + + trigger = { + exists = scope:annoying_clergy + } + + immediate = { + witch_4001_corruption_success_effect = yes + + if = { + limit = { + is_witch_trigger = yes + NOT = { scope:annoying_clergy = { is_witch_trigger = yes } } + } + random = { + chance = 30 + save_scope_value_as = { + name = witch_options + value = yes + } + } + } + } + + #Great! + option = { + name = witch.4003.a + + } + + #Yes, make them a witch! + option = { + trigger = { exists = scope:witch_options } + name = witch.4003.b + trait = witch + + scope:annoying_clergy = { + give_witch_secret_or_trait_effect = yes + random_secret = { + type = secret_witch + reveal_to = root + } + } + } + + + #Yes, make them a witch and tell them about me! + option = { + trigger = { + exists = scope:witch_options + any_secret = { + type = secret_witch + NOT = { is_known_by = scope:annoying_clergy } + } + } + name = witch.4003.c + trait = witch + + scope:annoying_clergy = { + give_witch_secret_or_trait_effect = yes + random_secret = { + type = secret_witch + reveal_to = root + } + } + + random_secret = { + type = secret_witch + reveal_to = scope:annoying_clergy + } + + reverse_add_opinion = { + modifier = respect_opinion + opinion = 20 + target = scope:annoying_clergy + } + } +} + +#You're nearly there... +witch.4004 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4001.t + desc = witch.4004.desc + theme = faith + override_icon = { + trigger = { is_witch_trigger = yes } + reference = "gfx/interface/icons/event_types/type_medicine.dds" + } + left_portrait = scope:annoying_clergy + + trigger = { + exists = scope:annoying_clergy + } + + #Keep trying! + option = { + name = witch.4004.a + + stress_impact = { + base = major_stress_impact_gain + diligent = medium_stress_impact_loss + lazy = minor_stress_impact_gain + } + + random_list = { + desc = outcome_in_a_few_days + 85 = { + desc = witch.4001.b.success + show_as_tooltip = { + witch_4001_corruption_success_effect = yes + } + trigger_event = { + id = witch.4003 + days = 3 + } + } + 15 = { + desc = witch.4001.b.failure + trigger_event = { + id = witch.4005 + days = 3 + } + } + } + + + ai_chance = { + base = 50 + } + } + + #Give up + option = { + name = witch.4004.b + + ai_chance = { + base = 50 + } + } +} + +#Corruption failed +witch.4005 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4001.t + desc = witch.4005.desc + theme = faith + override_icon = { + trigger = { is_witch_trigger = yes } + reference = "gfx/interface/icons/event_types/type_medicine.dds" + } + left_portrait = scope:annoying_clergy + + trigger = { + exists = scope:annoying_clergy + } + + option = { + name = witch.4005.a + } +} + + +### PERSONAL WITCH RITUAL ### + +scripted_effect witch_4010_option_effect = { + random_list = { + #DIPLOMACY + 10 = { + trigger = { + NOR = { + exists = scope:confident_diplomat + has_character_modifier = confident_diplomat + } + } + modifier = { + has_lifestyle = diplomacy_lifestyle + add = 30 + } + modifier = { + add = { + value = extremely_high_skill_rating + subtract = diplomacy + multiply = 2 + } + } + save_scope_value_as = { + name = confident_diplomat + value = yes + } + } + + #MARTIAL + 10 = { + trigger = { + NOR = { + exists = scope:confident_strategist + has_character_modifier = confident_strategist + } + } + modifier = { + has_lifestyle = martial_lifestyle + add = 30 + } + modifier = { + add = { + value = extremely_high_skill_rating + subtract = martial + multiply = 2 + } + } + save_scope_value_as = { + name = confident_strategist + value = yes + } + } + + #STEWARDSHIP + 10 = { + trigger = { + NOR = { + exists = scope:confident_organizer + has_character_modifier = confident_organizer + } + } + modifier = { + has_lifestyle = stewardship_lifestyle + add = 30 + } + modifier = { + add = { + value = extremely_high_skill_rating + subtract = stewardship + multiply = 2 + } + } + save_scope_value_as = { + name = confident_organizer + value = yes + } + } + + #INTRIGUE + 10 = { + trigger = { + NOR = { + exists = scope:confident_schemer + has_character_modifier = confident_schemer + } + } + modifier = { + has_lifestyle = intrigue_lifestyle + add = 30 + } + modifier = { + add = { + value = extremely_high_skill_rating + subtract = intrigue + multiply = 2 + } + } + save_scope_value_as = { + name = confident_schemer + value = yes + } + } + + #LEARNING + 10 = { + trigger = { + NOR = { + exists = scope:confident_scholar + has_character_modifier = confident_scholar + } + } + modifier = { + has_lifestyle = learning_lifestyle + add = 30 + } + modifier = { + add = { + value = extremely_high_skill_rating + subtract = learning + multiply = 2 + } + } + save_scope_value_as = { + name = confident_scholar + value = yes + } + } + + #PROWESS + 10 = { + trigger = { + NOR = { + exists = scope:confident_duelist + has_character_modifier = confident_duelist + } + } + modifier = { + has_focus = martial_chivalry_focus + add = 30 + } + modifier = { + add = { + value = extremely_high_skill_rating + subtract = prowess + multiply = 2 + } + } + save_scope_value_as = { + name = confident_duelist + value = yes + } + } + + #ATTRACTION + 20 = { + trigger = { + NOR = { + exists = scope:alluring_confidence + has_character_modifier = alluring_confidence + } + } + modifier = { + OR = { + has_trait = lustful + ai_sociability >= low_positive_ai_value + has_focus = intrigue_temptation_focus + } + add = 50 + } + save_scope_value_as = { + name = alluring_confidence + value = yes + } + } + + #RELAXATION + 20 = { + trigger = { + stress >= low_stress + NOT = { exists = scope:stress } + } + modifier = { + add = { + value = stress + divide = extremely_high_stress + multiply = 80 + } + } + save_scope_value_as = { + name = stress + value = yes + } + } + } +} + + +witch.4010 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4010.t + desc = witch.4010.desc + theme = witchcraft + override_background = { + reference = wilderness + } + left_portrait = root + + trigger = { + NOT = { has_character_flag = event_cooldown_witch_4010 } + is_witch_trigger = yes + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = event_cooldown_witch_4010 + days = 1825 + } + + #3 options + witch_4010_option_effect = yes + witch_4010_option_effect = yes + witch_4010_option_effect = yes + } + + #Ask for love + option = { + trigger = { exists = scope:alluring_confidence } + name = witch.4010.a + + add_character_modifier = { + modifier = alluring_confidence + years = 10 + } + } + + #Ask for diplomacy + option = { + trigger = { exists = scope:confident_diplomat } + name = witch.4010.b + + add_character_modifier = { + modifier = confident_diplomat + years = 10 + } + } + + #Ask for martial + option = { + trigger = { exists = scope:confident_strategist } + name = witch.4010.c + + add_character_modifier = { + modifier = confident_strategist + years = 10 + } + } + + #Ask for stewardship + option = { + trigger = { exists = scope:confident_organizer } + name = witch.4010.d + + add_character_modifier = { + modifier = confident_organizer + years = 10 + } + } + + #Ask for intrigue + option = { + trigger = { exists = scope:confident_schemer } + name = witch.4010.e + + add_character_modifier = { + modifier = confident_schemer + years = 10 + } + } + + #Ask for learning + option = { + trigger = { exists = scope:confident_scholar } + name = witch.4010.f + + add_character_modifier = { + modifier = confident_scholar + years = 10 + } + } + + #Ask for prowess + option = { + trigger = { exists = scope:confident_duelist } + name = witch.4010.g + + add_character_modifier = { + modifier = confident_duelist + years = 10 + } + } + + #Ask for relaxation + option = { + trigger = { exists = scope:stress } + name = witch.4010.h + + add_stress = monumental_stress_loss + } +} + + +######################## +# WITCH FRIEND: PRAYER # +######################## + +scripted_trigger witch_4020_prayer_friend_trigger = { + this != root + potential_witch_friend_trigger = { CHARACTER = root } + NOT = { is_in_list = prayer_witches } + basic_is_available_ai = yes + OR = { + has_relation_potential_friend = root + opinion = { + target = root + value >= low_positive_opinion + } + } +} + +witch.4020 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4020.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:prayer_witch_2 } + desc = witch.4020.two_witches.desc + } + desc = witch.4020.one_witch.desc + } + random_valid = { + desc = witch.4020.full_moon.desc + desc = witch.4020.new_moon.desc + desc = witch.4020.equinox.desc + desc = witch.4020.solstice.desc + } + desc = witch.4020.end.desc + } + theme = witchcraft + override_background = { + reference = wilderness + } + left_portrait = scope:prayer_witch_1 + right_portrait = scope:prayer_witch_2 + + trigger = { + OR = { + any_known_secret = { + secret_owner = { + this != root # Don't include our own secrets! + witch_4020_prayer_friend_trigger = yes + } + } + any_relation = { + type = potential_friend + witch_4020_prayer_friend_trigger = yes + } + any_close_or_extended_family_member = { witch_4020_prayer_friend_trigger = yes } + any_vassal = { witch_4020_prayer_friend_trigger = yes } + any_courtier_or_guest = { witch_4020_prayer_friend_trigger = yes } + any_consort = { witch_4020_prayer_friend_trigger = yes } + } + NOR = { + has_character_modifier = clear_mind_modifier + has_character_flag = event_cooldown_witch_4020 + } + } + + + immediate = { + add_character_flag = { + flag = event_cooldown_witch_4020 + years = 15 + } + every_known_secret = { + limit = { + secret_owner = { + witch_4020_prayer_friend_trigger = yes + this != root + } + } + secret_owner = { add_to_list = prayer_witches } + } + every_relation = { + type = potential_friend + limit = { witch_4020_prayer_friend_trigger = yes } + add_to_list = prayer_witches + } + every_close_or_extended_family_member = { + limit = { witch_4020_prayer_friend_trigger = yes } + add_to_list = prayer_witches + } + every_vassal = { + limit = { witch_4020_prayer_friend_trigger = yes } + add_to_list = prayer_witches + } + every_courtier_or_guest = { + limit = { witch_4020_prayer_friend_trigger = yes } + add_to_list = prayer_witches + } + every_consort = { + limit = { witch_4020_prayer_friend_trigger = yes } + add_to_list = prayer_witches + } + + # Pick two + random_in_list = { + list = prayer_witches + + weight = { + base = 1 + + compatibility_modifier = { + compatibility_target = root + } + opinion_modifier = { + opinion_target = root + } + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.2 + ai_boldness = 0.2 + } + modifier = { + has_relation_potential_friend = root + add = 100 + } + } + save_scope_as = prayer_witch_1 + } + + if = { + limit = { exists = scope:prayer_witch_2 } + random_in_list = { + list = prayer_witches + limit = { this != scope:prayer_witch_1 } + weight = { + base = 1 + + compatibility_modifier = { + compatibility_target = root + } + opinion_modifier = { + opinion_target = root + } + ai_value_modifier = { + ai_sociability = 0.5 + ai_compassion = 0.2 + ai_boldness = 0.2 + } + modifier = { + has_relation_potential_friend = root + add = 100 + } + } + save_scope_as = prayer_witch_2 + } + } + } + + # Pray for prayer_witch_1 + option = { + name = witch.4020.a + + progress_towards_friend_effect = { CHARACTER = scope:prayer_witch_1 REASON = friend_prayed_for_witch OPINION = default_friend_opinion } + scope:prayer_witch_1 = { + add_character_modifier = { + modifier = clear_mind_modifier + years = 10 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = -0.5 + ai_honor = -0.5 + } + opinion_modifier = { + opinion_target = scope:prayer_witch_1 + } + } + } + + # Pray for prayer_witch_2 + option = { + name = witch.4020.b + trigger = { exists = scope:prayer_witch_2 } + + progress_towards_friend_effect = { CHARACTER = scope:prayer_witch_2 REASON = friend_prayed_for_witch OPINION = default_friend_opinion } + scope:prayer_witch_2 = { + add_character_modifier = { + modifier = clear_mind_modifier + years = 10 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + ambitious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_greed = -1 + ai_compassion = -0.5 + ai_honor = -0.5 + } + opinion_modifier = { + opinion_target = scope:prayer_witch_2 + } + } + } + + # Pray for me! + option = { + name = witch.4020.c + + add_character_modifier = { + modifier = clear_mind_modifier + years = 10 + } + + stress_impact = { + base = minor_stress_impact_loss # It's not be be prayed for + generous = minor_stress_impact_gain + shy = minor_stress_impact_gain + craven = minor_stress_impact_gain + content = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 2 + ai_compassion = -1 + ai_honor = -1 + } + } + } +} + + +############# +# RARE BOOK # +############# + +scripted_trigger witch_4030_friend_trigger = { + potential_witch_friend_trigger = { CHARACTER = root } + basic_is_available_ai = yes + is_adult = yes + learning >= decent_skill_rating +} + +scripted_trigger witch_4030_convince_trigger = { + is_witch_trigger = no + is_adult = yes + basic_is_available_ai = yes +} + +scripted_effect witch_4030_convince_success_effect = { + save_scope_as = book_recipient + give_witch_secret_or_trait_effect = yes + random_secret = { + type = secret_witch + reveal_to = root + } + scope:newly_created_artifact = { + set_owner = { + target = scope:book_recipient + history = { + location = root.capital_province + actor = scope:book_holder + recipient = scope:book_recipient + type = given + } + } + } +} + +scripted_effect witch_4030_convince_failure_effect = { + add_character_modifier = { + modifier = on_edge_modifier + years = 10 + } + destroy_artifact = scope:newly_created_artifact +} + +witch.4030 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4030.t + desc = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:witch_friend } + desc = witch.4030.friend.desc + } + desc = witch.4030.no_friend.desc + } + } + theme = witchcraft + override_background = { + reference = study + } + left_portrait = scope:left_portrait + right_portrait = scope:right_portrait + lower_left_portrait = scope:lower_left_portrait + lower_right_portrait = scope:lower_right_portrait + artifact = { + target = scope:newly_created_artifact + position = lower_center_portrait + } + + trigger = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + OR = { + has_lifestyle = diplomacy_lifestyle + has_lifestyle = martial_lifestyle + has_lifestyle = stewardship_lifestyle + has_lifestyle = intrigue_lifestyle + has_lifestyle = learning_lifestyle + } + } + + weight_multiplier = { + base = 1 + + # Friend helping + modifier = { + any_relation = { + type = friend + witch_4030_friend_trigger = yes + } + add = 1 + } + modifier = { + any_relation = { + type = friend + witch_4030_friend_trigger = yes + learning >= high_skill_rating + } + add = 1 + } + + #Your learning + modifier = { + add = { + value = learning + subtract = average_skill_rating + multiply = 0.1 + min = -0.7 + max = 1 + } + } + } + + immediate = { + save_scope_as = book_holder + + #Did a friend help out? Show them :) + random_relation = { + type = friend + limit = { witch_4030_friend_trigger = yes } + weight = { + base = 1 + opinion_modifier = { + opinion_target = root + } + modifier = { + add = { + value = learning + multiply = 5 + } + } + } + save_scope_as = witch_friend + } + + # Who can we convert? Pick two + every_scheme = { + type = convert_to_witchcraft + limit = { + scheme_target_character = { witch_4030_convince_trigger = yes } + } + scheme_target_character = { add_to_list = convince } + } + every_vassal = { + limit = { witch_4030_convince_trigger = yes } + add_to_list = convince + } + every_councillor = { + limit = { witch_4030_convince_trigger = yes } + add_to_list = convince + } + every_spouse = { + limit = { witch_4030_convince_trigger = yes } + add_to_list = convince + } + every_close_or_extended_family_member = { + limit = { witch_4030_convince_trigger = yes } + add_to_list = convince + } + + random_in_list = { + list = convince + limit = { + save_temporary_scope_as = convert_target + root = { + any_scheme = { + type = convert_to_witchcraft + scheme_target_character = scope:convert_target + } + } + } + alternative_limit = { always = yes } + + weight = { + base = 1 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 1 + } + modifier = { + add = { + value = learning + multiply = 5 + } + } + modifier = { + OR = { + is_powerful_vassal_of = root + is_councillor_of = root + AND = { + exists = root.house + root.house = { NOT = { has_house_modifier = witch_coven } } + house ?= root.house + } + } + add = 50 + } + } + save_scope_as = convince_target_1 + } + + if = { + limit = { exists = scope:convince_target_1 } + random_in_list = { + list = convince + limit = { + this != scope:convince_target_1 + } + + weight = { + base = 1 + ai_value_modifier = { + ai_greed = 1 + ai_rationality = 1 + } + modifier = { + add = { + value = learning + multiply = 5 + } + } + modifier = { + OR = { + is_powerful_vassal_of = root + is_councillor_of = root + AND = { + exists = root.house + root.house = { NOT = { has_house_modifier = witch_coven } } + house ?= root.house + } + } + add = 50 + } + } + save_scope_as = convince_target_2 + } + } + + #Save portraits + if = { + limit = { + exists = scope:witch_friend + exists = scope:convince_target_2 + } + scope:witch_friend = { save_scope_as = left_portrait } + scope:convince_target_1 = { save_scope_as = lower_left_portrait } + scope:convince_target_2 = { save_scope_as = lower_right_portrait } + } + else_if = { + limit = { + exists = scope:witch_friend + exists = scope:convince_target_1 + } + scope:witch_friend = { save_scope_as = left_portrait } + scope:convince_target_1 = { save_scope_as = right_portrait } + } + else_if = { + limit = { exists = scope:witch_friend } + scope:witch_friend = { save_scope_as = left_portrait } + } + else_if = { + limit = { + exists = scope:convince_target_1 + exists = scope:convince_target_2 + } + scope:convince_target_1 = { save_scope_as = left_portrait } + scope:convince_target_2 = { save_scope_as = right_portrait } + } + else_if = { + limit = { exists = scope:convince_target_1 } + scope:convince_target_1 = { save_scope_as = left_portrait } + } + set_variable = { + name = book_subject_witch_scope + value = root + } + save_temporary_scope_value_as = { + name = should_be_trinket + value = yes + } + if = { + limit = { exists = scope:witch_friend } + create_artifact_book_effect = { #using effect to ensure that scope:owner is set properly + OWNER = root + CREATOR = scope:witch_friend + SET_SUBJECT = flag:witch + SET_TOPIC = flag:worship_horned_god + } + } + else = { + hidden_effect = { + random_dummy_gender_effect = yes + } + create_artifact_book_effect = { #using effect to ensure that scope:owner is set properly + OWNER = root + CREATOR = scope:dummy_gender + SET_SUBJECT = flag:witch + SET_TOPIC = flag:worship_horned_god + } + } + remove_variable = book_subject_witch_scope + } + + # Study the book for perk together + option = { + name = { + text = { + first_valid = { + triggered_desc = { + trigger = { exists = scope:witch_friend } + desc = witch.4030.friend.a + } + desc = witch.4030.no_friend.a + } + } + } + + + if = { + limit = { has_lifestyle = diplomacy_lifestyle } + add_diplomacy_lifestyle_perk_points = 1 + } + else_if = { + limit = { has_lifestyle = martial_lifestyle } + add_martial_lifestyle_perk_points = 1 + } + else_if = { + limit = { has_lifestyle = stewardship_lifestyle } + add_stewardship_lifestyle_perk_points = 1 + } + else_if = { + limit = { has_lifestyle = intrigue_lifestyle } + add_intrigue_lifestyle_perk_points = 1 + } + else_if = { + limit = { has_lifestyle = learning_lifestyle } + add_learning_lifestyle_perk_points = 1 + } + + if = { + limit = { exists = scope:witch_friend } + scope:witch_friend = { + if = { + limit = { root = { has_lifestyle = diplomacy_lifestyle } } + add_diplomacy_lifestyle_perk_points = 1 + } + else_if = { + limit = { root = { has_lifestyle = martial_lifestyle } } + add_martial_lifestyle_perk_points = 1 + } + else_if = { + limit = { root = { has_lifestyle = stewardship_lifestyle } } + add_stewardship_lifestyle_perk_points = 1 + } + else_if = { + limit = { root = { has_lifestyle = intrigue_lifestyle } } + add_intrigue_lifestyle_perk_points = 1 + } + else_if = { + limit = { root = { has_lifestyle = learning_lifestyle } } + add_learning_lifestyle_perk_points = 1 + } + } + } + else = { + add_stress = medium_stress_gain # No friend means working harder + } + show_as_tooltip = { + scope:newly_created_artifact = { set_owner = root } + } + } + + # Sell it to other witches and share profit + option = { + name = witch.4030.b + + add_gold = medium_gold_value + + if = { + limit = { exists = scope:witch_friend } + scope:witch_friend = { add_gold = root.medium_gold_value } + } + destroy_artifact = scope:newly_created_artifact + + } + + # use it to convince someone (option 1) + option = { + trigger = { exists = scope:convince_target_1 } + name = witch.4030.c + + scope:convince_target_1 = { save_scope_as = convince_target } + + random_list = { + desc = outcome_in_a_few_days + 55 = { + desc = witch.4030.c.success + ai_value_modifier = { + who = scope:convince_target_1 + ai_zeal = -0.5 + ai_greed = 0.5 + ai_rationality = 0.5 + } + modifier = { + add = { + value = scope:convince_target_1.learning + multiply = 2 + } + } + trigger_event = { + id = witch.4031 + days = 3 + } + show_as_tooltip = { scope:convince_target_1 = { witch_4030_convince_success_effect = yes } } + } + 45 = { + desc = witch.4030.c.failure + ai_value_modifier = { + who = scope:convince_target_1 + ai_zeal = 0.25 + ai_greed = -0.25 + ai_rationality = -0.25 + } + trigger_event = { + id = witch.4032 + days = 3 + } + show_as_tooltip = { scope:convince_target_1 = { witch_4030_convince_failure_effect = yes } } + } + } + } + + # use it to convince someone (option 2) + option = { + trigger = { exists = scope:convince_target_2 } + name = witch.4030.d + + scope:convince_target_2 = { save_scope_as = convince_target } + + random_list = { + desc = outcome_in_a_few_days + 55 = { + desc = witch.4030.d.success + ai_value_modifier = { + who = scope:convince_target_2 + ai_zeal = -0.5 + ai_greed = 0.5 + ai_rationality = 0.5 + } + modifier = { + add = { + value = scope:convince_target_2.learning + multiply = 2 + } + } + trigger_event = { + id = witch.4031 + days = 3 + } + show_as_tooltip = { scope:convince_target_2 = { witch_4030_convince_success_effect = yes } } + } + 45 = { + desc = witch.4030.d.failure + ai_value_modifier = { + who = scope:convince_target_2 + ai_zeal = 0.25 + ai_greed = -0.25 + ai_rationality = -0.25 + } + trigger_event = { + id = witch.4032 + days = 3 + } + show_as_tooltip = { scope:convince_target_2 = { witch_4030_convince_failure_effect = yes } } + } + } + } +} + +# Convince success +witch.4031 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4030.t + desc = { + desc = witch.4031.start.desc + desc = witch.4031.end.desc + } + theme = witchcraft + left_portrait = { + character = scope:convince_target + animation = personality_rational + } + + trigger = { + exists = scope:convince_target + scope:convince_target = { is_alive = yes } + } + + + option = { + name = witch.4031.a + scope:convince_target = { witch_4030_convince_success_effect = yes } + } +} + +# Convince failure +witch.4032 = { #by Mathilda Bjarnehed + type = character_event + title = witch.4030.t + desc = { + desc = witch.4031.start.desc + desc = witch.4032.end.desc + } + theme = witchcraft + left_portrait = { + character = scope:convince_target + animation = shock + } + + trigger = { + exists = scope:convince_target + scope:convince_target = { is_alive = yes } + } + + + option = { + name = witch.4032.a + scope:convince_target = { witch_4030_convince_failure_effect = yes } + } +} + + + + diff --git a/N3OW/events/yearly_events/bp1_yearly_james.txt b/N3OW/events/yearly_events/bp1_yearly_james.txt new file mode 100644 index 00000000..379ea4fa --- /dev/null +++ b/N3OW/events/yearly_events/bp1_yearly_james.txt @@ -0,0 +1,8355 @@ +#Events run from the bp1_yearly_pulse on_action +namespace = bp1_yearly + +# List of events in this file: +# +# 9001-9005 Someone ruins your favourite toy +# +# 9007-9015 doppelganger shenanigans +# 9016 Second-in-line wants to fight for the throne (and your attention) +# 9017 Different faith/culture child is feeling insecure +# + +##################################### +# Destroying toy # +# by James Beaumont # +# 9001 # +##################################### + +bp1_yearly.9001 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9001.t + desc = { + desc = bp1_yearly.9001.opening + #What text we display depends on the relationship to the child + first_valid = { + triggered_desc = { + trigger = { + any_relation = { + type = bully + is_available = yes + } + } + desc = bp1_yearly.9001.desc.bully + } + triggered_desc = { + trigger = { + any_relation = { + type = guardian + is_available = yes + } + } + desc = bp1_yearly.9001.desc.mentor + } + } + } + theme = family + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = personality_vengeful + } + + trigger = { + has_dlc_feature = friends_and_foes + NOT = { has_character_flag = had_event_bp1_yearly_9001 } + is_adult = no # Should already be covered, but sanity checks never hurt + NOR = { # Isn't already shy or the opposite + has_trait = shy + has_trait = gregarious + } + OR = { + any_relation = { + type = bully + is_available = yes + } + any_relation = { + type = guardian + is_available = yes + } + } + } + + weight_multiplier = { + base = 1 + + } + + immediate = { + if = { + limit = { + any_relation = { + type = bully + is_available = yes + } + } + random_relation = { # Bullies are slightly rarer, try to get that version of the event if possible + type = bully + limit = { + is_available = yes + } + save_scope_as = bp1_yearly_9001_toy_hater + } + } + else = { + random_relation = { + type = guardian + limit = { + is_available = yes + } + save_scope_as = bp1_yearly_9001_toy_hater + } + } + save_scope_as = bp1_yearly_9001_shy_kid + add_character_flag = had_event_bp1_yearly_9001 + } + + option = { # Throw the toy away with minimal provocation + name = bp1_yearly.9001.a + scope:bp1_yearly_9001_toy_hater = { + progress_towards_rival_effect = { + REASON = rival_threw_away_toy + CHARACTER = scope:bp1_yearly_9001_shy_kid + OPINION = default_rival_opinion + } + } + stress_impact = { + base = minor_stress_impact_gain + pensive = minor_stress_impact_gain + bossy = minor_stress_impact_gain + } + } + + option = { + name = bp1_yearly.9001.b + scope:bp1_yearly_9001_toy_hater = { + trigger_event = { + id = bp1_yearly.9002 + days = 5 + } + } + custom_tooltip = may_lead_to_vengeful + custom_tooltip = may_lead_to_forgiving + custom_tooltip = may_lead_to_shy + } +} + +bp1_yearly.9002 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9001.t + desc = { + desc = bp1_yearly.9002.desc.opening + #What text we display depends on the relationship to the child + first_valid = { + triggered_desc = { + trigger = { + is_adult = no + } + desc = bp1_yearly.9002.desc.bully + } + triggered_desc = { + trigger = { + is_adult = yes + } + desc = bp1_yearly.9002.desc.mentor + } + } + } + theme = family + left_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = personality_vengeful + } + right_portrait = { + character = scope:bp1_yearly_9001_shy_kid + animation = fear + } + + weight_multiplier = { + base = 1 + + } + + option = { # Trash the toy! + name = bp1_yearly.9002.a + if = { + limit = { + OR = { # Leave the trait decision to the kid if the kid is a player or they have no guardian + scope:bp1_yearly_9001_shy_kid = { is_ai = no } + NOT = { + scope:bp1_yearly_9001_shy_kid = { + any_relation = { type = guardian } + } + } + } + } + scope:bp1_yearly_9001_shy_kid = { + trigger_event = { + id = bp1_yearly.9004 # End event, kid can choose to get one of two traits + days = 5 + } + } + } + else_if = { + limit = { # Leave it to the guardian if the current scope is a bully + is_adult = no + } + scope:bp1_yearly_9001_shy_kid = { + random_relation = { + type = guardian + trigger_event = { + id = bp1_yearly.9004 # End event, kid can choose to get one of two traits + days = 5 + } + } + } + } + else = { # Current scope is the guardian + scope:bp1_yearly_9001_shy_kid = { + add_trait = vengeful + create_character_memory = { + type = destroyed_my_toy + participants = { + destroyer = scope:bp1_yearly_9001_toy_hater + } + } + } + } + progress_towards_rival_effect = { + REASON = rival_threw_away_toy + CHARACTER = scope:bp1_yearly_9001_shy_kid + OPINION = default_rival_opinion + } + stress_impact = { + just = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + forgiving = minor_stress_impact_gain + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + option = { # Leave them alone + name = bp1_yearly.9002.b + if = { + limit = { + OR = { # Leave the trait decision to the kid if the kid is a player or they have no guardian + scope:bp1_yearly_9001_shy_kid = { is_ai = no } + NOT = { + scope:bp1_yearly_9001_shy_kid = { + any_relation = { type = guardian } + } + } + } + } + scope:bp1_yearly_9001_shy_kid = { + trigger_event = { + id = bp1_yearly.9003 # End event, kid can choose to get one of two traits + days = 5 + } + } + } + else_if = { + limit = { # Leave it to the guardian if the current scope is a bully + is_adult = no + } + scope:bp1_yearly_9001_shy_kid = { + random_relation = { + type = guardian + trigger_event = { + id = bp1_yearly.9003 # End event, kid can choose to get one of two traits + days = 5 + } + } + } + } + else = { # Current scope is the guardian + scope:bp1_yearly_9001_shy_kid = { + add_trait = shy + } + } + stress_impact = { + diligent = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + bossy = minor_stress_impact_gain + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = sadistic + has_trait = callous + has_trait = vengeful + has_trait = bossy + } + } + } + } + + option = { # Leave them alone, but teach them the importance of forgiveness + name = bp1_yearly.9002.c + trigger = { + scope:bp1_yearly_9001_shy_kid = { is_ai = yes } + is_adult = yes + } + scope:bp1_yearly_9001_shy_kid = { add_trait = forgiving } + stress_impact = { + sadistic = minor_stress_impact_gain + callous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + bossy = minor_stress_impact_gain + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = vengeful + has_trait = bossy + } + } + } + } +} + +bp1_yearly.9003 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9001.t + desc = { + first_valid = { + triggered_desc = { + trigger = { is_adult = no } + desc = bp1_yearly.9003.desc.child + } + triggered_desc = { + trigger = { is_adult = yes } + desc = bp1_yearly.9003.desc.mentor + } + } + } + theme = family + left_portrait = { + character = scope:bp1_yearly_9001_shy_kid + animation = grief + } + right_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = schadenfreude + } + + option = { # I've learned that people are nice sometimes + name = { + trigger = { is_adult = no } + text = bp1_yearly.9003.a.child + } + name = { + trigger = { is_adult = yes } + text = bp1_yearly.9003.a.mentor + } + scope:bp1_yearly_9001_shy_kid = { add_trait = compassionate } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9001_toy_hater + OPINION = 0 + REASON = friend_not_destroy_toy + } + ai_chance = { + base = 10 + } + } + + option = { # I don't need people anymore! + name = { + trigger = { is_adult = no } + text = bp1_yearly.9003.b.child + } + name = { + trigger = { is_adult = no } + text = bp1_yearly.9003.b.mentor + } + scope:bp1_yearly_9001_shy_kid = { add_trait = shy } + ai_chance = { + base = 10 + } + } +} + +bp1_yearly.9004 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9004.t + desc = bp1_yearly.9004.desc + theme = family + left_portrait = { + character = scope:bp1_yearly_9001_shy_kid + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = ecstasy + } + + option = { # I will never forgive them! + name = bp1_yearly.9004.a + scope:bp1_yearly_9001_shy_kid = { + add_trait = vengeful + # Set up follow-up + create_character_memory = { + type = destroyed_my_toy + participants = { + destroyer = scope:bp1_yearly_9001_toy_hater + } + } + } + ai_chance = { + base = 10 + } + } + + option = { # I forgive them for what they did + name = bp1_yearly.9004.b + scope:bp1_yearly_9001_shy_kid = { + add_trait = forgiving + } + stress_impact = { + base = major_stress_impact_gain + bossy = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # I'll never talk to anyone again! + name = bp1_yearly.9004.c + scope:bp1_yearly_9001_shy_kid = { + add_trait = shy + } + stress_impact = { + base = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } +} + +bp1_yearly.9005 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9005.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9001_toy_hater = { + is_imprisoned_by = root + } + } + desc = bp1_yearly.9005.desc.imprisoned + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9001_toy_hater = { + is_foreign_court_or_pool_guest_of = root + } + } + desc = bp1_yearly.9005.desc.guest + } + } + desc = bp1_yearly.9005.desc.outro + } + theme = family + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:bp1_yearly_9001_toy_hater + animation = fear + } + + trigger = { + any_memory = { + memory_type = destroyed_my_toy + memory_participant:destroyer = { + is_available_ai_adult = yes + OR = { + is_imprisoned_by = root + is_foreign_court_or_pool_guest_of = root + } + } + } + NOT = { + any_memory = { + memory_type = avenged_my_toy + } + } + is_available_adult = yes + NOT = { + has_trait = forgiving + } + } + + immediate = { + random_memory = { + memory_type = destroyed_my_toy + save_scope_as = destroyed_toy_memory + memory_participant:destroyer = { save_scope_as = bp1_yearly_9001_toy_hater } + } + } + + option = { # Time for revenge! + name = bp1_yearly.9005.a + scope:bp1_yearly_9001_toy_hater = { + random_list = { + 10 = { add_trait = one_legged } + 10 = { apply_maimed_trait_and_modifier_effect = yes } + 10 = { + modifier = { # I won't go for the eyes if people think it's virtuous + factor = 0.5 + faith = { trait_is_virtue = one_eyed } + } + add_trait = one_eyed + } + } + } + if = { + limit = { + NOT = { + has_relation_rival = scope:bp1_yearly_9001_toy_hater + } + } + set_relation_rival = { + target = scope:bp1_yearly_9001_toy_hater + reason = rival_toy_destruction + } + } + else = { + set_relation_nemesis = { + target = scope:bp1_yearly_9001_toy_hater + reason = rival_toy_destruction + copy_reason = rival + } + } + create_character_memory = { + type = avenged_my_toy + participants = { + destroyer = scope:bp1_yearly_9001_toy_hater + } + } + stress_impact = { + compassionate = major_stress_impact_gain + vengeful = medium_stress_impact_loss + just = minor_stress_impact_gain + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0.5 + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } + + option = { # I will literally become a murderer for this childhood trauma + name = bp1_yearly.9005.b + trigger = { + has_relation_rival = scope:bp1_yearly_9001_toy_hater + scope:bp1_yearly_9001_toy_hater = { + is_imprisoned_by = root + } + } + scope:bp1_yearly_9001_toy_hater = { + death = { + killer = root + death_reason = death_murder + } + } + create_character_memory = { + type = avenged_my_toy + participants = { + destroyer = scope:bp1_yearly_9001_toy_hater + } + } + stress_impact = { + compassionate = major_stress_impact_gain + vengeful = medium_stress_impact_loss + just = major_stress_impact_gain + wrathful = medium_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + NOT = { has_trait = wrathful } + OR = { + has_trait = compassionate + has_trait = just + } + } + } + } + + option = { # Turn the other cheek like a beta + name = bp1_yearly.9005.c + destroy_character_memory = scope:destroyed_toy_memory + stress_impact = { + vengeful = massive_stress_impact_gain + } + ai_chance = { + base = 0 + } + } +} + +############################################ +#### Becoming friends over a common sin #### +############################################ + +scripted_trigger bp1_yearly_9006_both_have_same_sin = { + faith = { trait_is_sin = $SINFUL_TRAIT$ } + $SINFUL_COURTIER$.faith = { trait_is_sin = $SINFUL_TRAIT$ } + has_trait = $SINFUL_TRAIT$ + $SINFUL_COURTIER$ = { has_trait = $SINFUL_TRAIT$ } +} + +# You and a courtier bond over sin +bp1_yearly.9006 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9006.t + desc = { + desc = bp1_yearly.9006.desc.intro + first_valid = { + triggered_desc = { + trigger = { + # You both love sex + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = lustful + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.lustful + } + triggered_desc = { + trigger = { + # You're both closet foodies + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = gluttonous + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.gluttonous + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = vengeful + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.vengeful + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = sadistic + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.sadistic + } + triggered_desc = { + trigger = { + # You're both nerds in a religion of himbos + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = craven + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.craven + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = arbitrary + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.arbitrary + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = deceitful + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.deceitful + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = chaste + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.chaste + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = greedy + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.greedy + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = wrathful + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.wrathful + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = cynical + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.cynical + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = ambitious + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.ambitious + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = shy + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.shy + } + triggered_desc = { + trigger = { + bp1_yearly_9006_both_have_same_sin = { + SINFUL_TRAIT = callous + SINFUL_COURTIER = scope:bp1_yearly_9006_sinful_courtier + } + } + desc = bp1_yearly.9006.desc.callous + } + desc = bp1_yearly.9006.desc.generic + } + desc = bp1_yearly.9006.desc.outro + } + theme = crown + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9006_sinful_courtier + animation = admiration + } + + trigger = { + has_dlc_feature = friends_and_foes + num_sinful_traits >= 1 + is_valid_for_narrow_yearly_events_adult = yes + OR = { + liege= { + any_vassal = { + this != root + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + any_vassal = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + any_courtier = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + } + + immediate = { + if = { + limit = { + has_trait = craven + } + select_local_animal_effect = { TYPE = any } # Save scope to limit possible animals: any/big/small/dangerous/harmless/prowling + } + if = { + limit = { + liege = { + any_vassal = { + this != root + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + } + liege = { + random_vassal = { + limit = { + this != root + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + save_scope_as = bp1_yearly_9006_sinful_courtier + } + } + } + else_if = { + limit = { + any_vassal = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + highest_held_title_tier > 1 # Barons are barely people + has_same_sinful_trait = root + } + } + random_vassal = { + limit = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + highest_held_title_tier > 1 + has_same_sinful_trait = root + } + save_scope_as = bp1_yearly_9006_sinful_courtier + } + } + else_if = { + limit = { + any_vassal = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + random_vassal = { + limit = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + save_scope_as = bp1_yearly_9006_sinful_courtier + } + } + else_if = { + limit = { + any_courtier = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + } + random_courtier = { + limit = { + NOR = { + has_any_good_relationship_with_character_trigger = { CHARACTER = root } + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + has_same_sinful_trait = root + } + save_scope_as = bp1_yearly_9006_sinful_courtier + } + } + } + + option = { + name = bp1_yearly.9006.a + if = { + limit = { + opinion = { + target = scope:bp1_yearly_9006_sinful_courtier + value >= -20 + } + } + set_relation_friend = { reason = friend_bonded_over_sins target = scope:bp1_yearly_9006_sinful_courtier } + } + else = { + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9006_sinful_courtier + OPINION = default_friend_opinion + REASON = friend_bonded_over_sins + } + } + add_piety = medium_piety_loss + stress_impact = { + zealous = massive_stress_impact_gain + paranoid = massive_stress_impact_gain + } + if = { + limit = { + has_trait = shy + scope:bp1_yearly_9006_sinful_courtier = { + NOT = { + has_trait = shy + } + } + } + stress_impact = { + shy = massive_stress_impact_gain + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = paranoid + AND = { + has_trait = shy + scope:bp1_yearly_9006_sinful_courtier = { + NOT = { + has_trait = shy + } + } + } + } + } + } + } + + option = { + name = bp1_yearly.9006.b + add_piety = minor_piety_gain + stress_impact = { + base = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = cynical + has_trait = gregarious + } + } + } + } +} + +############################## +#### doppelganger peasant #### +############################## +# You find the peasant on the street +bp1_yearly.9007 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9007.t + desc = bp1_yearly.9007.desc + theme = crown + override_background = market + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = beg + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { beggar_rags } + } + } + + trigger = { + has_dlc_feature = friends_and_foes + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9007 } + #Disabling the story for landless + is_landless_adventurer = no + is_landless_administrative = no + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = eccentric + } + } + + immediate = { + create_character = { + template = bp1_doppelganger_template + dynasty = none + location = root.capital_province + save_scope_as = bp1_yearly_9007_doppelganger + } + scope:bp1_yearly_9007_doppelganger = { + add_character_flag = blocked_from_leaving + } + } + + option = { # They should join me at court! + trigger = { is_landed = yes } + name = bp1_yearly.9007.a + add_courtier = scope:bp1_yearly_9007_doppelganger + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9007_doppelganger + OPINION = default_friend_opinion + REASON = friend_curiously_similar + } + # Set up follow-up + hidden_effect = { + set_variable = { + name = my_doppelganger + value = scope:bp1_yearly_9007_doppelganger + } + } + create_story = story_doppelganger + random_owned_story = { + type = story_doppelganger + set_variable = { + name = doppelganger_character + value = scope:bp1_yearly_9007_doppelganger + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + eccentric = medium_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + name = bp1_yearly.9007.b + trigger = { + has_trait = sadistic + } + unknown_murder_effect = { VICTIM = scope:bp1_yearly_9007_doppelganger MURDERER = root REASON = death_murder } + stress_impact = { + compassionate = massive_stress_impact_gain + lustful = medium_stress_impact_gain + calm = medium_stress_impact_gain + just = major_stress_impact_gain + arrogant = medium_stress_impact_loss + wrathful = medium_stress_impact_loss + sadistic = medium_stress_impact_loss + vengeful = medium_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + option = { + name = bp1_yearly.9007.c + scope:bp1_yearly_9007_doppelganger = { + silent_disappearance_effect = yes + } + stress_impact = { + eccentric = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + after = { + add_character_flag = had_event_bp1_yearly_9007 + create_character_memory = { + type = found_my_clone + participants = { + doppelganger = scope:bp1_yearly_9007_doppelganger + } + } + } +} + +# The peasant proposes a lifestyle swap for fun +bp1_yearly.9008 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9008.t + desc = bp1_yearly.9008.desc + theme = family + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = ecstasy + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9008 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + NOR = { + has_relation_nemesis = var:my_doppelganger + has_relation_rival = var:my_doppelganger + } + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + } + + option = { # Go ahead with it + name = bp1_yearly.9008.a + set_relation_best_friend = { reason = best_friend_switch_places copy_reason = friend target = scope:bp1_yearly_9007_doppelganger } + add_character_modifier = { + modifier = bp1_living_as_peasant_modifier + years = 5 + } + stress_impact = { + arrogant = massive_stress_impact_gain + ambitious = major_stress_impact_gain + diligent = medium_stress_impact_gain + paranoid = medium_stress_impact_gain + honest = minor_stress_impact_gain + lazy = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Refuse + name = bp1_yearly.9008.b + stress_impact = { + trusting = massive_stress_impact_gain + humble = medium_stress_impact_gain + content = medium_stress_impact_gain + temperate = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + after = { add_character_flag = had_event_bp1_yearly_9008 } +} + +# The doppelganger is found sleeping with your spouse or lover +bp1_yearly.9009 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9009.t + desc = { + desc = bp1_yearly.9009.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9009_lover = { has_trait = lustful } + } + desc = bp1_yearly.9009.desc.lustful + } + desc = bp1_yearly.9009.desc + } + } + theme = family + override_background = { reference = bedchamber } + left_portrait = { + character = scope:bp1_yearly_9009_lover + animation = shock + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = shock + } + lower_left_portrait = { + character = root + animation = shock + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9009 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + OR = { + any_relation = { + type = lover + save_temporary_scope_as = lover_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + NOT = { scope:lover_1_scope = root.var:my_doppelganger } + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:lover_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + any_spouse = { + save_temporary_scope_as = spouse_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + NOT = { scope:spouse_1_scope = root.var:my_doppelganger } + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:spouse_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + } + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + if = { + limit = { + any_relation = { + type = lover + save_temporary_scope_as = lover_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + scope:lover_1_scope != root.var:my_doppelganger + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:lover_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + } + random_relation = { + type = lover + limit = { + save_temporary_scope_as = lover_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + scope:lover_1_scope != root.var:my_doppelganger + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:lover_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + save_scope_as = bp1_yearly_9009_lover + } + } + else = { + random_spouse = { + limit = { + save_temporary_scope_as = spouse_1_scope + is_available_ai_adult = yes + NOT = { has_trait = pregnant } + scope:spouse_1_scope != root.var:my_doppelganger + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = scope:spouse_1_scope + CHARACTER_2 = root.var:my_doppelganger + } + } + save_scope_as = bp1_yearly_9009_lover + } + } + scope:bp1_yearly_9007_doppelganger = { + set_relation_lover = { reason = lover_doppelganger_cucked target = scope:bp1_yearly_9009_lover involved_character = root } + hidden_effect = { + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9009_lover + PREGNANCY_CHANCE = 50 + } + } + } + create_character_memory = { + type = spouse_committed_adultery + participants = { + spouse = scope:bp1_yearly_9009_lover + adulterer = scope:bp1_yearly_9007_doppelganger + } + } + scope:bp1_yearly_9009_lover = { + add_character_flag = is_naked + } + scope:bp1_yearly_9007_doppelganger = { + add_character_flag = is_naked + } + } + + option = { # Break it off with both of them + name = bp1_yearly.9009.a + if = { + limit = { + has_relation_best_friend = scope:bp1_yearly_9007_doppelganger + } + remove_relation_best_friend = scope:bp1_yearly_9007_doppelganger + } + else_if = { + limit = { + has_relation_friend = scope:bp1_yearly_9007_doppelganger + } + remove_relation_friend = scope:bp1_yearly_9007_doppelganger + } + if = { + limit = { + has_relation_lover = scope:bp1_yearly_9007_doppelganger + } + remove_relation_lover = scope:bp1_yearly_9007_doppelganger + } + if = { + limit = { + has_relation_lover = scope:bp1_yearly_9009_lover + } + remove_relation_lover = scope:bp1_yearly_9009_lover + } + progress_towards_rival_effect = { + REASON = rival_slept_with_lover + CHARACTER = scope:bp1_yearly_9007_doppelganger + OPINION = default_rival_opinion + } + progress_towards_rival_effect = { + REASON = rival_slept_with_doppelganger + CHARACTER = scope:bp1_yearly_9009_lover + OPINION = default_rival_opinion + } + stress_impact = { + base = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Have the doppelganger imprisoned + name = bp1_yearly.9009.b + rightfully_imprison_character_effect = { + TARGET = scope:bp1_yearly_9007_doppelganger + IMPRISONER = root + } + stress_impact = { + humble = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Let them be + name = bp1_yearly.9009.c + if = { + limit = { accepts_adultery_without_penalty_trigger = no } + stress_impact = { + base = major_stress_impact_gain + diligent = major_stress_impact_gain + arrogant = massive_stress_impact_gain + } + } + ai_chance = { + base = 10 + } + } + + option = { # Become a polycule + name = bp1_yearly.9009.d + trigger = { + accepts_adultery_without_penalty_trigger = yes + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:bp1_yearly_9007_doppelganger + } + } + set_relation_lover = { reason = lover_my_own_clone_now_neither_of_us_will_be_virgins target = scope:bp1_yearly_9007_doppelganger } + if = { + limit = { + NOT = { + has_relation_lover = scope:bp1_yearly_9009_lover + } + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = scope:bp1_yearly_9009_lover + } + } + set_relation_lover = { reason = lover_doppelganger_threesome target = scope:bp1_yearly_9009_lover involved_character = scope:bp1_yearly_9007_doppelganger } + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9007_doppelganger + PREGNANCY_CHANCE = 0 + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9009_lover + PREGNANCY_CHANCE = 50 + } + stress_impact = { + } + ai_chance = { + base = 10 + } + } + + after = { + add_character_flag = had_event_bp1_yearly_9009 + scope:bp1_yearly_9009_lover = { + remove_character_flag = is_naked + } + scope:bp1_yearly_9007_doppelganger = { + remove_character_flag = is_naked + } + } +} + +# The doppelganger challenges you to a fight, claiming to be the real you +bp1_yearly.9010 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9010.t + desc = { + desc = bp1_yearly.9010.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9007_doppelganger = { drinks_alcohol_trigger = yes } + } + desc = bp1_yearly.9010.desc.drunk + } + desc = bp1_yearly.9010.desc.stoner + } + desc = bp1_yearly.9010.desc.outro + } + theme = family + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = personality_vengeful + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9010 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + NOR = { + has_relation_friend = var:my_doppelganger + has_relation_best_friend = var:my_doppelganger + has_relation_lover = var:my_doppelganger + has_relation_soulmate = var:my_doppelganger + } + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + if = { + limit = { + NOT = { has_relation_nemesis = scope:bp1_yearly_9007_doppelganger } + } + set_relation_nemesis = { + target = scope:bp1_yearly_9007_doppelganger + reason = nemesis_doppelganger + } + } + } + + option = { # Fight them for the throne! + name = bp1_yearly.9010.a + custom_tooltip = bp1_yearly.9010.a_tt + # Scopes for duel fallback + scope:bp1_yearly_9007_doppelganger = { save_scope_as = recipient } + save_scope_as = actor + configure_start_single_combat_effect = { + SC_INITIATOR = root + SC_ATTACKER = scope:bp1_yearly_9007_doppelganger + SC_DEFENDER = root + FATALITY = no + FIXED = no + LOCALE = throne_room + OUTPUT_EVENT = bp1_yearly.9011 + INVALIDATION_EVENT = fp1_tbc.0102 + } + stress_impact = { + craven = medium_stress_impact_gain + wrathful = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = craven + } + } + } + + option = { # Have the doppelganger imprisoned + name = bp1_yearly.9010.b + rightfully_imprison_character_effect = { + TARGET = scope:bp1_yearly_9007_doppelganger + IMPRISONER = root + } + add_trait = disputed_heritage + + random_owned_story = { + type = story_doppelganger + end_story = yes + } + stress_impact = { + brave = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = brave + has_trait = arrogant + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9010 } +} + +# doppelganger duel outcome +bp1_yearly.9011 = { + hidden = yes + immediate = { + # Event for victorious doppelganger + if = { + limit = { + scope:sc_victor = scope:recipient + } + scope:actor = { + trigger_event = { + id = bp1_yearly.9012 + days = 1 + } + } + } + # The real you wins + else = { + trigger_event = { + id = bp1_yearly.9013 + days = 1 + } + } + } +} + +# The doppelganger wins +bp1_yearly.9012 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9012.t + desc = bp1_yearly.9012.desc + theme = crown + left_portrait = { + character = root + animation = pain + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = schadenfreude + } + + trigger = { + exists = var:my_doppelganger + exists = house + } + + immediate = { + every_held_title = { + add_to_list = titles_to_pressed_claim + } + every_claim = { + pressed = yes + add_to_list = titles_to_pressed_claim + } + every_claim = { + pressed = no + add_to_list = titles_to_unpressed_claim + } + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + create_character_memory = { + type = doppelganger_claimed_my_throne + participants = { + doppelganger = scope:bp1_yearly_9007_doppelganger + } + } + } + + option = { # Show the player the outcome + name = bp1_yearly.9012.a + scope:bp1_yearly_9007_doppelganger = { + give_nickname = nick_the_real + change_first_name = { template_character = root } + house ?= { set_house_name_from_house = root.house } + } + every_in_list = { + list = titles_to_pressed_claim + limit = { tier > tier_barony } #No baronies + save_scope_as = title_to_claim + scope:bp1_yearly_9007_doppelganger = { + add_pressed_claim = scope:title_to_claim + } + } + every_in_list = { + list = titles_to_unpressed_claim + save_scope_as = title_to_claim + scope:bp1_yearly_9007_doppelganger = { + add_unpressed_claim = scope:title_to_claim + } + } + add_trait = disputed_heritage + stress_impact = { + } + ai_chance = { + base = 10 + } + } +} + +# You win +bp1_yearly.9013 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9012.t + desc = bp1_yearly.9013.desc + theme = crown + left_portrait = { + character = root + animation = schadenfreude + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = pain + } + + trigger = { + exists = var:my_doppelganger + exists = house + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + create_character_memory = { + type = doppelganger_claimed_my_throne_failed + participants = { + doppelganger = scope:bp1_yearly_9007_doppelganger + } + } + } + + option = { # Good + name = bp1_yearly.9013.a + rightfully_imprison_character_effect = { + TARGET = scope:bp1_yearly_9007_doppelganger + IMPRISONER = root + } + stress_impact = { + } + ai_chance = { + base = 10 + } + } +} + +# You have a romantic encounter with your double +bp1_yearly.9014 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9014.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_relation_lover = scope:bp1_yearly_9007_doppelganger + can_set_relation_soulmate_trigger = { CHARACTER = scope:bp1_yearly_9007_doppelganger } + } + desc = bp1_yearly.9014.desc.soulmate + } + desc = bp1_yearly.9014.desc.lover + } + } + theme = marriage + left_portrait = { + character = root + animation = flirtation_left + } + right_portrait = { + character = scope:bp1_yearly_9007_doppelganger + animation = love + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9010 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + OR = { + NOT = { # Doesn't already have a relation to the doppelganger + has_any_scripted_relation = var:my_doppelganger + } + has_relation_lover = var:my_doppelganger # Become soulmates + has_relation_friend = var:my_doppelganger + } + OR = { + # You are attracted to the same-sex + matching_gender_and_sexuality_trigger = { + CHARACTER_1 = root + CHARACTER_2 = var:my_doppelganger + } + # You love yourself so much it doesn't matter + has_trait = arrogant + } + NOT = { has_character_flag = rejected_advances_bp1_yearly_9014 } # Allows the event to repeat from Lover to Soulmate, but prevents it from repeating for people who opted out + } + + immediate = { + var:my_doppelganger = { save_scope_as = bp1_yearly_9007_doppelganger } + } + + option = { # Embrace these feelings + name = { + trigger = { has_trait = arrogant } + text = bp1_yearly.9014.a.arrogant + } + name = bp1_yearly.9014.a + trigger = { + NOT = { has_relation_soulmate = scope:bp1_yearly_9007_doppelganger } + } + if = { + limit = { + has_relation_lover = scope:bp1_yearly_9007_doppelganger + can_set_relation_soulmate_trigger = { CHARACTER = scope:bp1_yearly_9007_doppelganger } + } + set_relation_soulmate = { reason = soulmate_doppelganger copy_reason = lover target = scope:bp1_yearly_9007_doppelganger } + } + else = { + if = { + limit = { NOT = { has_relation_lover = scope:bp1_yearly_9007_doppelganger } } + set_relation_lover = { reason = lover_my_own_clone_now_neither_of_us_will_be_virgins target = scope:bp1_yearly_9007_doppelganger } + } + } + stress_impact = { + humble = medium_stress_impact_gain + chaste = medium_stress_impact_gain + zealous = medium_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Suppress the feelings + name = bp1_yearly.9014.b + reverse_add_opinion = { + target = scope:bp1_yearly_9007_doppelganger + modifier = hurt_opinion + opinion = -25 + } + add_character_flag = rejected_advances_bp1_yearly_9014 + stress_impact = { + lustful = major_stress_impact_gain + arrogant = massive_stress_impact_gain + } + ai_chance = { + base = 10 + } + } +} + +# Turns out you're long-lost twins +bp1_yearly.9015 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9015.t + desc = bp1_yearly.9015.desc + theme = family + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:bp1_yearly_9015_living_parent + animation = grief + } + + trigger = { + is_valid_for_narrow_yearly_events_adult = yes + exists = house + NOT = { has_character_flag = had_event_bp1_yearly_9015 } + exists = var:my_doppelganger + var:my_doppelganger = { is_available_ai_adult = yes } + any_parent = { + is_available_ai_adult = yes + has_trait = honest + } + } + + + weight_multiplier = { + base = 0.1 # This should be very very rare + modifier = { # Even rarer if it results in incest + factor = 0.1 + var:my_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + NOT = { faith = { has_doctrine_parameter = consanguinity_unrestricted_incest } } + } + } + + immediate = { + random_parent = { + limit = { + is_available_ai_adult = yes + has_trait = honest + } + save_scope_as = bp1_yearly_9015_living_parent + } + var:my_doppelganger = { + save_scope_as = bp1_yearly_9007_doppelganger + set_real_father = root.father + } + if = { + limit = { + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + } + if = { + limit = { + NOR = { + has_trait = incestuous + any_secret = { type = secret_incest } + } + is_adult = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = incestuous + GENDER_CHARACTER = scope:bp1_yearly_9007_doppelganger + FAITH = root.faith + } + } + add_secret = { + type = secret_incest + } + random_secret = { + type = secret_incest + reveal_to = root + reveal_to = scope:bp1_yearly_9015_living_parent + } + } + scope:bp1_yearly_9007_doppelganger = { + if = { + limit = { + NOR = { + has_trait = incestuous + any_secret = { type = secret_incest } + } + is_adult = yes + trait_is_shunned_or_criminal_in_faith_trigger = { + TRAIT = incestuous + GENDER_CHARACTER = root + FAITH = scope:bp1_yearly_9007_doppelganger.faith + } + } + add_secret = { + type = secret_incest + } + random_secret = { + type = secret_incest + reveal_to = root + reveal_to = scope:bp1_yearly_9015_living_parent + } + } + } + } + } + + option = { # Announce the news publicly! + name = bp1_yearly.9015.a + scope:bp1_yearly_9007_doppelganger = { + if = { + limit = { exists = root.father } + set_father = root.father + } + if = { + limit = { exists = root.mother } + set_mother = root.mother + } + if = { + limit = { exists = root.house } + set_house = root.house + } + add_trait = twin + } + add_trait = twin + if = { # My clone is known to be my lover, become incestuous + limit = { + scope:bp1_yearly_9007_doppelganger = { is_consort_of = root } + } + random_secret = { + type = secret_incest + expose_secret = root + } + scope:bp1_yearly_9007_doppelganger = { + random_secret = { + type = secret_incest + expose_secret = root + } + } + } + if = { # Your religion thinks your incest is cool, give piety + limit = { + faith = { has_doctrine_parameter = divine_marriage_piety_gain_active } + OR = { + scope:bp1_yearly_9007_doppelganger = { is_consort_of = root } + NOT = { + sexual_activity_with_partner_is_criminal_in_faith_trigger = { + PARTNER = scope:bp1_yearly_9007_doppelganger + FAITH = root.faith + } + } + } + } + add_piety = major_piety_gain + } + if = { # I'm not having sexual relations with my clone, become friends + limit = { + NOT = { + has_any_scripted_relation = scope:bp1_yearly_9007_doppelganger + scope:bp1_yearly_9007_doppelganger = { is_consort_of = root } + } + } + if = { + limit = { + NOT = { has_relation_friend = scope:bp1_yearly_9007_doppelganger } + } + set_relation_friend = { reason = friend_long_lost_twin target = scope:bp1_yearly_9007_doppelganger } + } + } + else_if = { # We're enemies, move closer to not being enemies + limit = { + NOT = { scope:bp1_yearly_9007_doppelganger = { is_consort_of = root } } + OR = { + has_relation_rival = scope:bp1_yearly_9007_doppelganger + has_relation_nemesis = scope:bp1_yearly_9007_doppelganger + } + } + scope:bp1_yearly_9007_doppelganger = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_curiously_similar + } + } + } + if = { # Stress gain for incest + limit = { + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + } + stress_impact = { + humble = medium_stress_impact_gain + deceitful = medium_stress_impact_gain + chaste = medium_stress_impact_gain + } + if = { + limit = { + NOT = { faith = { has_doctrine_parameter = divine_marriage_piety_gain_active } } + } + stress_impact = { + base = major_stress_impact_gain + zealous = major_stress_impact_gain + } + } + } + else = { # Stress gain for not incest + stress_impact = { + deceitful = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + NOT = { faith = { has_doctrine_parameter = consanguinity_unrestricted_incest } } + } + } + } + + option = { # Suppress information + name = bp1_yearly.9015.b + stress_impact = { + arrogant = major_stress_impact_gain + humble = major_stress_impact_gain + content = major_stress_impact_gain + honest = massive_stress_impact_gain + trusting = massive_stress_impact_gain + } + if = { # Stress gain for incest + limit = { + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + faith = { has_doctrine_parameter = divine_marriage_piety_gain_active } + } + stress_impact = { + zealous = massive_stress_impact_gain + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + scope:bp1_yearly_9007_doppelganger = { + OR = { + is_consort_of = root + has_relation_lover = root + has_relation_soulmate = root + } + } + faith = { has_doctrine_parameter = consanguinity_unrestricted_incest } + } + modifier = { + factor = 0 + has_trait = honest + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9015 } +} + +##################################### +# Uppity heir wants the throne # +# by James Beaumont # +# 9016 # +##################################### +bp1_yearly.9016 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9016.t + desc = { + desc = bp1_yearly.9016.desc.intro + first_valid = { + # Different descs to challenge why they think they deserve the throne more + triggered_desc = { + trigger = { + NOT = { + root.player_heir = { + is_child_of = root + } + } + } + desc = bp1_yearly.9016.desc.not_a_child + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9016_uppity_child = { + NOR = { + has_trait = legitimized_bastard + has_trait = bastard + } + } + root.player_heir = { + OR = { + has_trait = legitimized_bastard + has_trait = bastard + } + } + } + desc = bp1_yearly.9016.desc.bastard + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9016_uppity_child = { + NOR = { + has_trait = child_of_concubine + has_trait = legitimized_bastard + has_trait = bastard + } + } + root.player_heir = { + has_trait = child_of_concubine + } + } + desc = bp1_yearly.9016.desc.child_of_concubine + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9016_uppity_child = { + NOT = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + root.player_heir = { + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + } + desc = bp1_yearly.9016.desc.rival + } + desc = bp1_yearly.9016.desc.fallback + } + desc = bp1_yearly.9016.desc.outro + } + theme = family + override_background = feast + left_portrait = { + character = scope:bp1_yearly_9016_heir + animation = shock + } + right_portrait = { + character = scope:bp1_yearly_9016_uppity_child + animation = rage + } + + trigger = { + has_dlc_feature = friends_and_foes + is_landed = yes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9016 } + exists = root.player_heir + root.player_heir = { + is_available_ai_adult = yes + # Consider if this should only be valid for your offspring or if uncles should be valid as well + } + any_child = { + is_available_ai_adult = yes + this != root.player_heir + # Any of your children dislike or are indifferent to your current heir + NOT = { + has_any_good_relationship_with_character_trigger = { + CHARACTER = root.player_heir + } + } + OR = { + has_trait = ambitious + has_any_bad_relationship_with_character_trigger = { CHARACTER = root.player_heir } + } + root.primary_title = { # They must be close to succession + place_in_line_of_succession = { + target = prev + value <= 4 + } + } + } + } + + + weight_multiplier = { + base = 1 + modifier = { # Less rare if they hate your current heir + factor = 10 + any_child = { + is_available_ai_adult = yes + has_any_bad_relationship_with_character_trigger = { + CHARACTER = root.player_heir + } + } + } + modifier = { # Less rare if they think they could take your current heir in a fight + factor = 2 + any_child = { + is_available_ai_adult = yes + prowess > root.player_heir.prowess + } + } + } + + immediate = { + random_child = { + limit = { + is_available_ai_adult = yes + this != root.player_heir + NOT = { + has_any_good_relationship_with_character_trigger = { + CHARACTER = root.player_heir + } + } + root.primary_title = { # They must be close to succession + place_in_line_of_succession = { + target = prev + value <= 4 + } + } + } + weight = { + modifier = { + factor = 10 + any_child = { + is_available_ai_adult = yes + has_any_bad_relationship_with_character_trigger = { + CHARACTER = root.player_heir + } + } + } + modifier = { + factor = 2 + any_child = { + is_available_ai_adult = yes + prowess > root.player_heir.prowess + } + } + } + progress_towards_rival_effect = { + REASON = rival_heir_wants_throne + CHARACTER = root.player_heir + OPINION = default_rival_opinion + } + save_scope_as = bp1_yearly_9016_uppity_child + } + root.player_heir = { save_scope_as = bp1_yearly_9016_heir } + } + + option = { # Let them fight! + name = bp1_yearly.9016.a + trigger = { + NOT = { + culture ?= { has_cultural_tradition = tradition_mystical_ancestors } + } + } + scope:bp1_yearly_9016_uppity_child = { + progress_towards_rival_effect = { + REASON = rival_heir_wants_throne + CHARACTER = root.player_heir + OPINION = default_rival_opinion + } + duel = { + skill = prowess + target = scope:bp1_yearly_9016_heir + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = 9016_uppity_child_wins + left_icon = root + right_icon = scope:bp1_yearly_9016_uppity_child + set_designated_heir = scope:bp1_yearly_9016_uppity_child + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = 9016_uppity_child_wins + left_icon = root + right_icon = scope:bp1_yearly_9016_heir + scope:bp1_yearly_9016_uppity_child = { + disinherit_effect = { DISINHERITOR = root } + } + } + } + } + } + } + stress_impact = { + arrogant = major_stress_impact_gain + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + craven = major_stress_impact_gain + family_first = massive_stress_impact_gain # I hate it when you guys fight! + } + ai_chance = { + base = 10 + + } + } + + option = { # Send the uppity heir to their room with no supper + name = bp1_yearly.9016.b + scope:bp1_yearly_9016_uppity_child = { + progress_towards_rival_effect = { + REASON = rival_heir_sent_to_bed + CHARACTER = root + OPINION = default_rival_opinion + } + } + stress_impact = { + arbitrary = major_stress_impact_gain + brave = major_stress_impact_gain + honest = massive_stress_impact_gain + family_first = minor_stress_impact_gain + } + } + + after = { add_character_flag = had_event_bp1_yearly_9016 } +} + +################################################# +# Uppity child is insecure about culture # +# by James Beaumont # +# 9017 # +################################################# + +scripted_trigger bp1_yearly_9017_child_is_valid_trigger = { + is_available_ai_adult = yes + OR = { # They feel like they don't belong + culture != root.culture + faith != root.faith + } + root.primary_title = { # They must be relevant at least somewhat + place_in_line_of_succession = { + target = prev + value <= 4 + } + } + OR = { # They must be in your realm + is_courtier_of = root + any_liege_or_above = { this = root } + } +} + +bp1_yearly.9017 = { + type = character_event + content_source = dlc_006 + title = { + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + culture != root.culture + } + } + desc = bp1_yearly.9017.t.culture + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + faith != root.faith + } + } + desc = bp1_yearly.9017.t.faith + } + } + } + desc = { + desc = bp1_yearly.9017.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + culture != root.culture + } + } + desc = bp1_yearly.9017.desc.culture + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + faith != root.faith + } + } + desc = bp1_yearly.9017.desc.faith + } + } + desc = bp1_yearly.9017.desc.outro + } + theme = family + left_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:bp1_yearly_9017_uppity_child + animation = grief + } + + trigger = { + has_dlc_feature = friends_and_foes + is_landed = yes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9017 } + any_child = { + bp1_yearly_9017_child_is_valid_trigger = yes + } + } + + + weight_multiplier = { + base = 1 + modifier = { # More likely if faith is hostile or higher + add = 5 + any_child = { + bp1_yearly_9017_child_is_valid_trigger = yes + faith = { + faith_hostility_level = { + target = root.faith + value >= 2 + } + } + } + } + modifier = { # More likely if cultures don't get along + add = 2 + any_child = { + bp1_yearly_9017_child_is_valid_trigger = yes + culture = { + cultural_acceptance = { + target = root.culture + value <= 25 + } + } + } + } + modifier = { # More likely if cultures *really* don't get along + add = 3 + any_child = { + bp1_yearly_9017_child_is_valid_trigger = yes + culture = { + cultural_acceptance = { + target = root.culture + value <= 5 + } + } + } + } + } + + immediate = { + random_child = { + limit = { + bp1_yearly_9017_child_is_valid_trigger = yes + } + weight = { + modifier = { + factor = 2 + culture != root.culture + faith != root.faith + } + } + save_scope_as = bp1_yearly_9017_uppity_child + } + } + + option = { # We should celebrate our differences! + name = bp1_yearly.9017.a + trigger = { + root.culture != scope:bp1_yearly_9017_uppity_child.culture + } + if = { + limit = { + root.culture != scope:bp1_yearly_9017_uppity_child.culture + } + root.culture = { + change_cultural_acceptance = { + target = scope:bp1_yearly_9017_uppity_child.culture + value = medium_cultural_acceptance_gain + desc = cultural_acceptance_embraced_child + } + } + } + scope:bp1_yearly_9017_uppity_child = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_encouraged_differences + } + } + stress_impact = { + arrogant = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:bp1_yearly_9017_uppity_child.faith + value >= 2 + } + } + } + stress_impact = { + zealous = massive_stress_impact_gain + } + } + ai_chance = { + base = 10 + + } + } + + option = { # We are different, but you're still my daughter/son + name = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + culture != root.culture + } + } + text = bp1_yearly.9017.b.culture + } + name = { + trigger = { + scope:bp1_yearly_9017_uppity_child = { + faith != root.faith + } + } + text = bp1_yearly.9017.b.faith + } + scope:bp1_yearly_9017_uppity_child = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_encouraged_differences + } + } + stress_impact = { + arrogant = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + vengeful = major_stress_impact_gain + } + if = { + limit = { + faith = { + faith_hostility_level = { + target = scope:bp1_yearly_9017_uppity_child.faith + value >= 2 + } + } + } + stress_impact = { + zealous = major_stress_impact_gain + } + } + } + + option = { # The differences are too great, disinherit them + name = bp1_yearly.9017.c + trigger = { + NOT = { + culture ?= { has_cultural_tradition = tradition_mystical_ancestors } + } + } + scope:bp1_yearly_9017_uppity_child = { + disinherit_effect = { DISINHERITOR = root } + } + scope:bp1_yearly_9017_uppity_child = { + progress_towards_rival_effect = { + REASON = rival_was_disinherited + CHARACTER = root + OPINION = default_rival_opinion + } + } + if = { + limit = { + root.culture != scope:bp1_yearly_9017_uppity_child.culture + } + root.culture = { + change_cultural_acceptance = { + target = scope:bp1_yearly_9017_uppity_child.culture + value = medium_cultural_acceptance_loss + desc = cultural_acceptance_rejected_child + } + } + } + stress_impact = { + just = massive_stress_impact_gain + compassionate = massive_stress_impact_gain + forgiving = major_stress_impact_gain + trusting = major_stress_impact_gain + family_first = massive_stress_impact_gain + } + } + + after = { add_character_flag = had_event_bp1_yearly_9017 } +} + +################################################# +# Illegitimate child feels excluded # +# by James Beaumont # +# 9018 # +################################################# + +bp1_yearly.9018 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9018.t + desc = { + desc = bp1_yearly.9018.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9018_illegitimate_child = { + OR = { + has_trait = bastard + has_trait = legitimized_bastard + } + } + } + desc = bp1_yearly.9018.desc.bastard + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9018_illegitimate_child = { + has_trait = child_of_concubine + } + } + desc = bp1_yearly.9018.desc.child_of_concubine + } + } + first_valid = { + triggered_desc = { + trigger = { + NOT = { + has_trait = compassionate + } + OR = { + has_trait = callous + opinion = { + target = scope:bp1_yearly_9018_illegitimate_child + value <= -20 + } + } + } + desc = bp1_yearly.9018.desc.outro.callous + } + desc = bp1_yearly.9018.desc.outro + } + } + theme = family + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9018_illegitimate_child + animation = grief + } + lower_right_portrait = { + character = scope:bp1_yearly_9018_bully + animation = schadenfreude + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9018 } + any_child = { + is_adult = no + age >= 6 + OR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = child_of_concubine + } + save_temporary_scope_as = bastard_scope + } + any_child = { + is_adult = no + age >= 6 + age >= scope:bastard_scope.age + NOR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = child_of_concubine + has_trait = compassionate + has_trait = trusting + } + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_child = { + limit = { + is_adult = no + age >= 6 + OR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = child_of_concubine + } + } + save_scope_as = bp1_yearly_9018_illegitimate_child + } + random_child = { + limit = { + is_adult = no + age >= 6 + NOR = { + has_trait = bastard + has_trait = legitimized_bastard + has_trait = child_of_concubine + has_trait = compassionate + has_trait = trusting + } + } + save_scope_as = bp1_yearly_9018_bully + } + } + + option = { # You two should get along! + name = bp1_yearly.9018.a + scope:bp1_yearly_9018_illegitimate_child = { + root = { save_scope_as = relationship_reason_involved_character } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9018_bully + OPINION = default_friend_opinion + REASON = friend_motivated_by_parent + } + clear_saved_scope = relationship_reason_involved_character + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_good_chats + } + } + scope:bp1_yearly_9018_bully = { + progress_towards_friend_effect = { + CHARACTER = root + OPINION = default_friend_opinion + REASON = friend_good_chats + } + } + stress_impact = { + base = medium_stress_impact_gain + arrogant = major_stress_impact_gain + callous = major_stress_impact_gain + sadistic = major_stress_impact_gain + vengeful = major_stress_impact_gain + family_first = major_stress_impact_loss + } + ai_chance = { + base = 10 + + } + } + + option = { # GetGirlBoys will be GetGirlBoys + name = bp1_yearly.9018.b + scope:bp1_yearly_9018_illegitimate_child = { + set_relation_victim = scope:bp1_yearly_9018_bully + add_opinion = { + target = root + modifier = betrayed_me_opinion + opinion = -25 + } + } + scope:bp1_yearly_9018_bully = { + add_opinion = { + target = root + modifier = love_opinion + opinion = 25 + } + } + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + family_first = major_stress_impact_gain + } + } + + option = { # Let them fight for your compassion + name = bp1_yearly.9018.c + trigger = { + OR = { + has_trait = arbitrary + has_trait = callous + } + NOT = { + culture ?= { has_cultural_tradition = tradition_mystical_ancestors } + } + } + scope:bp1_yearly_9018_illegitimate_child = { + + set_relation_nemesis = { + target = scope:bp1_yearly_9018_bully + involved_character = root + copy_reason = rival + reason = nemesis_fought_for_parents_compassion + } + + duel = { + skill = prowess + target = scope:bp1_yearly_9018_bully + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = 9018_uppity_child_wins + left_icon = root + right_icon = scope:bp1_yearly_9018_illegitimate_child + scope:bp1_yearly_9018_bully = { + disinherit_effect = { DISINHERITOR = root } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = 9018_bully_child_wins + left_icon = root + right_icon = scope:bp1_yearly_9018_bully + scope:bp1_yearly_9018_illegitimate_child = { + disinherit_effect = { DISINHERITOR = root } + } + } + } + } + } + } + stress_impact = { + just = massive_stress_impact_gain + compassionate = massive_stress_impact_gain + forgiving = major_stress_impact_gain + trusting = major_stress_impact_gain + family_first = massive_stress_impact_gain + } + } + + after = { add_character_flag = had_event_bp1_yearly_9018 } +} + +################################################# +# Spouse proposes a gay threesome # +# by James Beaumont # +# 9019 # +################################################# + +scripted_trigger bp1_yearly_9019_spouse_trigger = { + is_available_at_peace_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + OR = { + # Many things can motivate this, desire for children, compassion for your partner's desires, just wanting a threesom, etc. + has_trait = compassionate + has_trait = deceitful + has_trait = lustful + has_trait = ambitious + has_trait = arbitrary + AND = { + faith = { has_doctrine_parameter = homosexuality_accepted } + NOT = { + trait_is_shunned_in_faith_trigger = { + TRAIT = adulterer + FAITH = root.faith + GENDER_CHARACTER = root + } + } + } + } + # Zealous spouses generally shouldn't want to do this if their faith shuns it + NAND = { + OR = { + faith = { has_doctrine_parameter = homosexuality_illegal } + faith = { has_doctrine_parameter = homosexuality_shunned } + } + has_trait = zealous + } +} + +scripted_trigger bp1_yearly_9019_relation_trigger = { + NOR = { + is_close_family_of = root + is_consort_of = root + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + OR = { + AND = { + is_male = yes + root = { is_male = yes } + } + AND = { + is_female = yes + root = { is_female = yes } + } + } + might_cheat_on_every_partner_trigger = yes +} + +scripted_trigger bp1_yearly_9019_courtier_trigger = { + is_adult = yes + NAND = { + OR = { + faith = { has_doctrine_parameter = homosexuality_illegal } + faith = { has_doctrine_parameter = homosexuality_shunned } + } + has_trait = zealous + } + NOR = { + has_trait = chaste + is_close_family_of = root + is_consort_of = root + has_any_bad_relationship_with_character_trigger = { CHARACTER = root } + } + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + OR = { + AND = { + is_male = yes + root = { is_male = yes } + } + AND = { + is_female = yes + root = { is_female = yes } + } + } + might_cheat_on_every_partner_trigger = yes +} + +bp1_yearly.9019 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9019.t + desc = { + first_valid = { + triggered_desc = { + trigger = { + has_sexuality = homosexual + } + desc = bp1_yearly.9019.desc.intro.gay + } + triggered_desc = { + trigger = { + has_sexuality = bisexual + } + desc = bp1_yearly.9019.desc.intro.bi + } + } + desc = bp1_yearly.9019.desc.bridge + first_valid = { + triggered_desc = { + trigger = { + has_sexuality = homosexual + } + desc = bp1_yearly.9019.desc.bridge.gay + } + triggered_desc = { + trigger = { + has_sexuality = bisexual + } + desc = bp1_yearly.9019.desc.bridge.bi + } + } + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9019_spouse = { + has_trait = compassionate + } + } + desc = bp1_yearly.9019.desc.compassionate + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9019_spouse = { + has_trait = lustful + } + } + desc = bp1_yearly.9019.desc.lustful + } + desc = bp1_yearly.9019.desc.cynical + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_relation_lover = scope:bp1_yearly_9019_lover + has_relation_soulmate = scope:bp1_yearly_9019_lover + } + } + desc = bp1_yearly.9019.desc.lover + } + triggered_desc = { + trigger = { + has_relation_friend = scope:bp1_yearly_9019_lover + } + desc = bp1_yearly.9019.desc.friend + } + desc = bp1_yearly.9019.desc.stranger + } + desc = bp1_yearly.9019.desc.outro + } + theme = family + override_background = bedchamber + left_portrait = { + character = scope:bp1_yearly_9019_spouse + animation = personality_compassionate + } + right_portrait = { + character = scope:bp1_yearly_9019_lover + animation = flirtation_left + } + lower_left_portrait = { + character = root + animation = shock + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + OR = { + has_sexuality = homosexual + has_sexuality = bisexual + } + is_eunuch_trigger = no + NOR = { # Can have sex and isn't already pregnant + has_trait = celibate + has_trait = pregnant + } + any_spouse = { bp1_yearly_9019_spouse_trigger = yes } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_spouse = { + limit = { bp1_yearly_9019_spouse_trigger = yes } + save_scope_as = bp1_yearly_9019_spouse + } + # Grab an existing lover if possible + if = { + limit = { + any_relation = { + type = lover + bp1_yearly_9019_relation_trigger = yes + } + } + random_relation = { + type = lover + limit = { bp1_yearly_9019_relation_trigger = yes } + save_scope_as = bp1_yearly_9019_lover + } + } + # Otherwise grab a courtier + else_if = { + limit = { + any_courtier_or_guest = { bp1_yearly_9019_courtier_trigger = yes } + } + random_courtier_or_guest = { + limit = { bp1_yearly_9019_courtier_trigger = yes } + save_scope_as = bp1_yearly_9019_lover + } + } + # Otherwise create a beautiful bisexual + else = { + create_character = { + template = bp1_bisexual_partner_template + location = root.capital_province + save_scope_as = bp1_yearly_9019_lover + } + } + # We're gonna have some monogamous threesomes happenin'. + save_scope_as = ignore_cheating_error_check + scope:bp1_yearly_9019_lover = { + add_character_flag = is_naked + } + } + + option = { # Let's do this thing! + name = bp1_yearly.9019.a + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9019_lover + PREGNANCY_CHANCE = 20 + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9019_spouse + PREGNANCY_CHANCE = 80 + } + hidden_effect = { # Hidden to prevent tooltip errors, also largely implied by the event content + scope:bp1_yearly_9019_lover = { + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9019_spouse + PREGNANCY_CHANCE = 50 + } + } + } + if = { + limit = { + NOT = { + has_relation_lover = scope:bp1_yearly_9019_lover + } + } + set_relation_lover = { reason = lover_threesome_with_spouse target = scope:bp1_yearly_9019_lover involved_character = scope:bp1_yearly_9019_spouse } + } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9019_spouse + OPINION = default_friend_opinion + REASON = friend_deviant_fun + } + create_character_memory = { + type = had_a_threesome_memory + participants = { + partner_1 = scope:bp1_yearly_9019_spouse + partner_2 = scope:bp1_yearly_9019_lover + } + } + stress_impact = { + chaste = major_stress_impact_gain + shy = major_stress_impact_gain + lustful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { # Leave me and my new boyfriend alone! + name = bp1_yearly.9019.b + trigger = { + OR = { + has_trait = callous + has_trait = arbitrary + has_trait = lustful + } + NOT = { + has_relation_lover = scope:bp1_yearly_9019_lover + } + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9019_lover + PREGNANCY_CHANCE = 50 + } + set_relation_lover = { reason = lover_ignored_spouse target = scope:bp1_yearly_9019_lover involved_character = scope:bp1_yearly_9019_spouse } + progress_towards_rival_effect = { + REASON = rival_rejected_marital_bed + CHARACTER = scope:bp1_yearly_9019_spouse + OPINION = default_rival_opinion + } + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + family_first = major_stress_impact_gain + lustful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = family_first + } + } + } + } + + option = { # Refuse the threesom + name = bp1_yearly.9019.c + if = { # Lose piety if in gay-accepting Carnal Exaltation faith + limit = { + faith = { + has_doctrine_parameter = homosexuality_accepted + trait_is_virtue = lustful + } + } + add_piety = minor_piety_loss + } + else = { + add_piety = medium_piety_gain + } + reverse_add_opinion = { + target = scope:bp1_yearly_9019_spouse + modifier = hurt_opinion + opinion = -25 + } + stress_impact = { + lustful = massive_stress_impact_gain + family_first = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = family_first + } + } + modifier = { + factor = 2 + has_trait = chaste + } + modifier = { + factor = 2 + NOT = { faith = { has_doctrine_parameter = homosexuality_accepted } } + has_trait = zealous + } + } + } + after = { + scope:bp1_yearly_9019_lover = { + remove_character_flag = is_naked + } + } +} + +################################################# +# Spouse wants to do something kinky # +# by James Beaumont # +# 9020 # +################################################# + +bp1_yearly.9020 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9020.t + desc = { + desc = bp1_yearly.9020.desc.intro + random_valid = { + desc = bp1_yearly.9020.desc.goat + desc = bp1_yearly.9020.desc.vegetable + desc = bp1_yearly.9020.desc.bondage + desc = bp1_yearly.9020.desc.feet + triggered_desc = { + trigger = { + exists = faith.religious_head + NOT = { + faith.religious_head = root + faith.religious_head = scope:bp1_yearly_9020_spouse + } + } + desc = bp1_yearly.9020.desc.hof + } + } + desc = bp1_yearly.9020.desc.outro + } + theme = family + override_background = bedchamber + left_portrait = { + character = root + animation = shock + } + right_portrait = { + character = scope:bp1_yearly_9020_spouse + animation = flirtation + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + is_eunuch_trigger = no + NOR = { # Can have sex and isn't already pregnant + has_trait = celibate + has_trait = pregnant + } + any_spouse = { + is_available_at_peace_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + is_deviant_trigger = yes + # Zealous spouses generally shouldn't want to do this if their faith shuns it + NAND = { + OR = { + faith = { has_doctrine_parameter = deviancy_illegal } + faith = { has_doctrine_parameter = deviancy_shunned } + } + has_trait = zealous + } + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_spouse = { + limit = { + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + is_deviant_trigger = yes + # Zealous spouses generally shouldn't want to do this if their faith shuns it + NAND = { + OR = { + faith = { has_doctrine_parameter = deviancy_illegal } + faith = { has_doctrine_parameter = deviancy_shunned } + } + has_trait = zealous + } + } + if = { + limit = { + any_secret = { + type = secret_deviant + } + } + random_secret = { + type = secret_deviant + reveal_to = root + save_scope_as = bp1_yearly_9020_spouse_secret + } + } + save_scope_as = bp1_yearly_9020_spouse + } + scope:bp1_yearly_9020_spouse = { + add_character_flag = is_naked + } + } + + option = { # I would do anything for love + name = bp1_yearly.9020.a + give_deviant_secret_or_trait_effect = yes + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9020_spouse + PREGNANCY_CHANCE = 75 + } + progress_towards_lover_effect = { + CHARACTER = scope:bp1_yearly_9020_spouse + REASON = lover_spouse_indulged + OPINION = default_lover_opinion + } + stress_impact = { + chaste = major_stress_impact_gain + shy = major_stress_impact_gain + lustful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { # but I won't do that + name = bp1_yearly.9020.b + reverse_add_opinion = { + target = scope:bp1_yearly_9020_spouse + modifier = disappointed_opinion + opinion = -25 + } + stress_impact = { + lustful = massive_stress_impact_gain + family_first = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = family_first + } + } + modifier = { + factor = 2 + has_trait = chaste + } + } + } + + 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 } + exists = scope:bp1_yearly_9020_spouse_secret + } + scope:bp1_yearly_9020_spouse_secret = { + expose_secret = root + } + progress_towards_rival_effect = { + REASON = rival_accused_of_perversion + CHARACTER = scope:bp1_yearly_9020_spouse + OPINION = default_rival_opinion + } + stress_impact = { + lustful = massive_stress_impact_gain + family_first = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = lustful + has_trait = family_first + } + } + modifier = { + factor = 2 + has_trait = chaste + } + modifier = { + factor = 2 + NOT = { faith = { has_doctrine_parameter = homosexuality_accepted } } + has_trait = zealous + } + } + } + after = { + scope:bp1_yearly_9020_spouse = { + remove_character_flag = is_naked + } + } +} + +################################################# +# Rival spouse is good in the bedroom # +# by James Beaumont # +# 9021 # +################################################# + +bp1_yearly.9021 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9021.t + desc = bp1_yearly.9021.desc + theme = family + override_background = bedchamber + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:bp1_yearly_9021_rival_spouse + animation = rage + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + is_eunuch_trigger = no + NOR = { # Can have sex and isn't already pregnant + has_trait = celibate + has_trait = pregnant + } + any_spouse = { + is_available_at_peace_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + has_relation_rival = root + NOT = { has_relation_lover = root } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_spouse = { + limit = { + is_available_at_peace_ai_adult = yes + is_eunuch_trigger = no + NOR = { + has_trait = chaste + has_trait = celibate + has_trait = pregnant + } + has_relation_rival = root + } + save_scope_as = bp1_yearly_9021_rival_spouse + } + had_sex_with_effect = { + CHARACTER = scope:bp1_yearly_9021_rival_spouse + PREGNANCY_CHANCE = 50 + } + add_character_flag = is_naked + scope:bp1_yearly_9021_rival_spouse = { + add_character_flag = is_naked + } + } + + option = { # We should do that again! + name = bp1_yearly.9021.a + set_relation_lover = { reason = lover_rival_spouse target = scope:bp1_yearly_9021_rival_spouse } + stress_impact = { + base = major_stress_impact_gain + chaste = major_stress_impact_gain + shy = major_stress_impact_gain + lustful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = chaste + has_trait = shy + } + } + } + } + + option = { # Try not to think about it too hard + name = bp1_yearly.9021.b + reverse_add_opinion = { + target = scope:bp1_yearly_9021_rival_spouse + modifier = disappointed_opinion + opinion = -5 + } + stress_impact = { + lustful = massive_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = lustful + } + } + } + after = { + remove_character_flag = is_naked + scope:bp1_yearly_9021_rival_spouse = { + remove_character_flag = is_naked + } + } +} + +################################################# +# Friend holds an intervention # +# by James Beaumont # +# 9022 # +################################################# + +bp1_yearly.9022 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9022.t + desc = { + desc = bp1_yearly.9022.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = hashishiyah + } + desc = bp1_yearly.9022.desc.hashishiyah + } + triggered_desc = { + trigger = { + has_trait = drunkard + } + desc = bp1_yearly.9022.desc.drunkard + } + triggered_desc = { + trigger = { + has_trait = rakish + } + desc = bp1_yearly.9022.desc.rakish + } + triggered_desc = { + trigger = { + has_trait = comfort_eater + } + desc = bp1_yearly.9022.desc.comfort_eater + } + triggered_desc = { + trigger = { + has_trait = inappetetic + } + desc = bp1_yearly.9022.desc.inappetetic + } + triggered_desc = { + trigger = { + has_trait = flagellant + } + desc = bp1_yearly.9022.desc.flagellant + } + triggered_desc = { + trigger = { + has_trait = reclusive + } + desc = bp1_yearly.9022.desc.reclusive + } + } + desc = bp1_yearly.9022.desc.outro + } + theme = family + override_background = bedchamber + left_portrait = { + character = root + animation = paranoia + } + right_portrait = { + character = scope:bp1_yearly_9022_friend + animation = personality_compassionate + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9022 } + OR = { + has_trait = hashishiyah + has_trait = drunkard + has_trait = rakish + has_trait = comfort_eater + has_trait = inappetetic + has_trait = flagellant + has_trait = reclusive + } + any_relation = { + type = friend + is_available_at_peace_ai_adult = yes + OR = { + has_trait = compassionate + ai_compassion >= 50 + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = friend + limit = { + is_available_at_peace_ai_adult = yes + OR = { + has_trait = compassionate + ai_compassion >= 50 + } + } + save_scope_as = bp1_yearly_9022_friend + } + } + + option = { # Attempt to give up your vice + name = bp1_yearly.9022.a + if = { + limit = { NOT = { has_relation_best_friend = scope:bp1_yearly_9022_friend } } + set_relation_best_friend = { reason = best_friend_help_overcome_vice copy_reason = friend target = scope:bp1_yearly_9022_friend } + } + duel = { + skill = diplomacy # A battle of willpower + target = scope:bp1_yearly_9022_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + stress_impact = { + base = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + if = { + limit = { has_trait = hashishiyah } + remove_trait = hashishiyah + } + else_if = { + limit = { has_trait = drunkard } + remove_trait = drunkard + } + else_if = { + limit = { has_trait = rakish } + remove_trait = rakish + } + else_if = { + limit = { has_trait = comfort_eater } + remove_trait = comfort_eater + } + else_if = { + limit = { has_trait = inappetetic } + remove_trait = inappetetic + } + else_if = { + limit = { has_trait = flagellant } + remove_trait = flagellant + } + else_if = { + limit = { has_trait = reclusive } + remove_trait = reclusive + } + create_character_memory = { + type = lost_my_addiction_memory + participants = { + interventioner = scope:bp1_yearly_9022_friend + } + } + stress_impact = { + base = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + } + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = arrogant + } + } + } + + option = { # What is this? Get out! + name = bp1_yearly.9022.b + reverse_add_opinion = { + target = scope:bp1_yearly_9022_friend + modifier = disappointed_opinion + opinion = -25 + } + stress_impact = { + humble = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = humble + } + } + } + + after = { + add_character_flag = had_event_bp1_yearly_9022 + } +} + +################################################# +# You realise you don't speak the same language # +# by James Beaumont # +# 9023 # +################################################# + +bp1_yearly.9023 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9023.t + desc = bp1_yearly.9023.desc + theme = diplomacy + override_background = feast + left_portrait = { + character = root + animation = beg + } + right_portrait = { + character = scope:bp1_yearly_9023_friend + animation = rage + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9023 } + any_relation = { + type = friend + is_available_at_peace_ai_adult = yes + NOT = { knows_language_of_culture = root.culture } + NOT = { root = { knows_language_of_culture = prev.culture } } + NOT = { + any_scheme = { + type = learn_language + } + } + } + NOT = { + any_scheme = { + type = learn_language + } + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = friend + limit = { + is_available_at_peace_ai_adult = yes + NOT = { knows_language_of_culture = root.culture } + NOT = { root = { knows_language_of_culture = prev.culture } } + } + save_scope_as = bp1_yearly_9023_friend + } + set_variable = { + name = wrong_language_friend + value = scope:bp1_yearly_9023_friend + } + } + + option = { # Uhhhh... como te llamas? + name = bp1_yearly.9023.a + duel = { + skill = diplomacy + target = scope:bp1_yearly_9023_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + reverse_add_opinion = { + target = scope:bp1_yearly_9023_friend + modifier = flattered_opinion + opinion = 5 + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + progress_towards_rival_effect = { + REASON = rival_linguistic_mishap + CHARACTER = scope:bp1_yearly_9023_friend + OPINION = default_rival_opinion + } + } + } + stress_impact = { + diligent = major_stress_impact_gain + compassionate = major_stress_impact_gain + gregarious = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = compassionate + has_trait = gregarious + has_trait = shy + } + } + } + } + + option = { # Maybe I should learn their language + name = bp1_yearly.9023.b + start_scheme = { + type = learn_language + target_character = scope:bp1_yearly_9023_friend + } + stress_impact = { + lazy = major_stress_impact_gain + shy = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = lazy + has_trait = shy + } + } + } + } + + option = { # Maybe they should learn my language! + name = bp1_yearly.9023.c + trigger = { + has_trait = lazy + } + duel = { + skill = diplomacy + target = scope:bp1_yearly_9023_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + scope:bp1_yearly_9023_friend = { + start_scheme = { + type = learn_language + target_character = root + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + progress_towards_rival_effect = { + REASON = rival_linguistic_request + CHARACTER = scope:bp1_yearly_9023_friend + OPINION = default_rival_opinion + } + } + } + stress_impact = { + diligent = major_stress_impact_gain + compassionate = major_stress_impact_gain + gregarious = major_stress_impact_gain + just = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 2 + has_trait = lazy + } + } + } + + after = { + add_character_flag = had_event_bp1_yearly_9023 + } +} + +################################################# +# A friend visits you while you're sick # +# by James Beaumont # +# 9024 # +################################################# + +bp1_yearly.9024 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9024.t + desc = bp1_yearly.9024.desc + theme = diplomacy + override_background = feast + left_portrait = { + character = root + animation = sick + } + right_portrait = { + character = scope:bp1_yearly_9024_friend + animation = personality_compassionate + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + has_short_disease_trigger = yes + any_relation = { + type = friend + is_available_at_peace_ai_adult = yes + OR = { + has_trait = compassionate + has_trait = diligent + has_trait = trusting + } + } + NOT = { + has_character_modifier = bp1_sickness_being_doted_on + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = friend + limit = { + is_available_at_peace_ai_adult = yes + OR = { + has_trait = compassionate + has_trait = diligent + has_trait = trusting + } + } + save_scope_as = bp1_yearly_9024_friend + } + } + + option = { # Relax + name = bp1_yearly.9024.a + add_character_modifier = { + modifier = bp1_sickness_being_doted_on + years = 5 + } + if = { + limit = { + NOR = { + has_trait = diligent + has_trait = paranoid + } + } + stress_impact = { + base = major_stress_impact_loss + } + } + stress_impact = { + shy = major_stress_impact_gain + diligent = major_stress_impact_gain + paranoid = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = diligent + has_trait = paranoid + } + } + } + } + + option = { # Tell them to leave you alone + name = bp1_yearly.9024.b + trigger = { + OR = { + has_trait = diligent + has_trait = shy + has_trait = paranoid + } + } + progress_towards_rival_effect = { + REASON = rival_told_to_go_away + CHARACTER = scope:bp1_yearly_9024_friend + OPINION = default_rival_opinion + } + stress_impact = { + trusting = major_stress_impact_gain + lazy = major_stress_impact_gain + gregarious = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = trusting + has_trait = lazy + has_trait = gregarious + has_trait = compassionate + } + } + } + } +} + +################################################# +# You realise you hate your friend # +# by James Beaumont # +# 9025 # +################################################# + +bp1_yearly.9025 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9025.t + desc = bp1_yearly.9025.desc + theme = friendly + left_portrait = { + character = root + animation = disapproval + } + right_portrait = { + character = scope:bp1_yearly_9025_friend + animation = happiness + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + exists = var:wrong_language_friend + has_relation_friend = var:wrong_language_friend + # You now know a common language + OR = { + knows_language_of_culture = var:wrong_language_friend.culture + var:wrong_language_friend = { knows_language_of_culture = root.culture } + } + var:wrong_language_friend = { + is_available_ai_adult = yes + } + # You have a reason to hate them + number_of_opposing_personality_traits = { + target = var:wrong_language_friend + value >= 1 + } + } + + + weight_multiplier = { + base = 1 + } + + immediate = { + var:wrong_language_friend = { + save_scope_as = bp1_yearly_9025_friend + } + } + + option = { # Wow, I hate this guy! + name = bp1_yearly.9025.a + downgrade_to_rival_effect = { + CHARACTER = scope:bp1_yearly_9025_friend + REASON = rival_better_understanding + } + stress_impact = { + gregarious = major_stress_impact_gain + trusting = major_stress_impact_gain + loyal = major_stress_impact_gain + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = trusting + #has_trait = loyal + has_trait = compassionate + } + } + } + } + + option = { # Try to fix the relationship + name = bp1_yearly.9025.b + duel = { + skill = diplomacy + target = scope:bp1_yearly_9025_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9025_friend + OPINION = default_friend_opinion + REASON = friend_fix_relationship_success + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + progress_towards_rival_effect = { + REASON = rival_fix_relationship_fail + CHARACTER = scope:bp1_yearly_9025_friend + OPINION = default_rival_opinion + } + } + } + stress_impact = { + base = major_stress_impact_gain + shy = major_stress_impact_gain + lazy = medium_stress_impact_gain + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = lazy + has_trait = arrogant + } + } + } + } + + after = { remove_variable = wrong_language_friend } +} + +################################################# +# Totally not Marley's ghost # +# by James Beaumont # +# 9026 # +################################################# + +bp1_yearly.9026 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9026.t + desc = { + desc = bp1_yearly.9026.desc.intro + first_valid = { + triggered_desc = { + trigger = { + any_secret = { + type = secret_murder + } + exists = scope:bp1_yearly_9026_murder_victim + } + desc = bp1_yearly.9026.desc.secret_murderer + } + triggered_desc = { + trigger = { + has_trait = murderer + exists = scope:bp1_yearly_9026_murder_victim + } + desc = bp1_yearly.9026.desc.murderer + } + triggered_desc = { + trigger = { exists = scope:bp1_yearly_9026_murder_victim } + desc = bp1_yearly.9026.desc.killer + } + # Traits should be in descending order of severity. These should largely be sins that are very directly harmful to others. Greedy, wrathful, etc should be high while lustful and gluttonous should be low. + # High impact sins + triggered_desc = { + trigger = { + has_trait = greedy + faith = { trait_is_sin = greedy } + } + desc = bp1_yearly.9026.desc.greedy + } + triggered_desc = { + trigger = { + has_trait = wrathful + faith = { trait_is_sin = wrathful } + } + desc = bp1_yearly.9026.desc.wrathful + } + triggered_desc = { + trigger = { + has_trait = torturer + faith = { trait_is_sin = deceitful } # We don't make lifestyle traits sins/virtues so best to check an adjacent trait + } + desc = bp1_yearly.9026.desc.torturer + } + triggered_desc = { + trigger = { + has_trait = arbitrary + faith = { trait_is_sin = arbitrary } + } + desc = bp1_yearly.9026.desc.arbitrary + } + triggered_desc = { # Let's assume callous is basically always bad + trigger = { + has_trait = callous + NOT = { faith = { trait_is_virtue = callous } } + } + desc = bp1_yearly.9026.desc.callous + } + triggered_desc = { # Same for sadistic + trigger = { + has_trait = sadistic + NOT = { faith = { trait_is_virtue = sadistic } } + } + desc = bp1_yearly.9026.desc.sadistic + } + triggered_desc = { + trigger = { + has_trait = vengeful + faith = { trait_is_sin = vengeful } + } + desc = bp1_yearly.9026.desc.vengeful + } + # Medium impact sins + triggered_desc = { + trigger = { + has_trait = deceitful + faith = { trait_is_sin = deceitful } + } + desc = bp1_yearly.9026.desc.deceitful + } + triggered_desc = { + trigger = { + has_trait = impatient + faith = { trait_is_sin = impatient } + } + desc = bp1_yearly.9026.desc.impatient + } + triggered_desc = { + trigger = { + has_trait = arrogant + faith = { trait_is_sin = arrogant } + } + desc = bp1_yearly.9026.desc.arrogant + } + triggered_desc = { + trigger = { + has_trait = craven + faith = { trait_is_sin = craven } + } + desc = bp1_yearly.9026.desc.craven + } + triggered_desc = { + trigger = { + has_trait = ambitious + faith = { trait_is_sin = ambitious } + } + desc = bp1_yearly.9026.desc.ambitious + } + triggered_desc = { + trigger = { + has_trait = lazy + faith = { trait_is_sin = lazy } + } + desc = bp1_yearly.9026.desc.lazy + } + # Low impact sins + triggered_desc = { + trigger = { + has_trait = cynical + faith = { trait_is_sin = cynical } + } + desc = bp1_yearly.9026.desc.cynical + } + triggered_desc = { + trigger = { + has_trait = shy + faith = { trait_is_sin = shy } + } + desc = bp1_yearly.9026.desc.shy + } + triggered_desc = { + trigger = { + has_trait = gluttonous + faith = { trait_is_sin = gluttonous } + } + desc = bp1_yearly.9026.desc.gluttonous + } + triggered_desc = { + trigger = { + has_trait = lustful + faith = { trait_is_sin = lustful } + } + desc = bp1_yearly.9026.desc.lustful + } + triggered_desc = { + trigger = { + has_trait = temperate + faith = { trait_is_sin = temperate } + } + desc = bp1_yearly.9026.desc.temperate + } + triggered_desc = { + trigger = { + has_trait = chaste + faith = { trait_is_sin = chaste } + } + desc = bp1_yearly.9026.desc.chaste + } + triggered_desc = { + trigger = { + has_trait = honest + faith = { trait_is_sin = honest } + } + desc = bp1_yearly.9026.desc.honest + } + desc = bp1_yearly.9026.desc.fallback + } + desc = bp1_yearly.9026.desc.outro + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = lantern + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9026_dead_friend + animation = laugh + animate_if_dead = yes + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_at_peace_adult = yes + NOT = { has_character_flag = had_event_bp1_yearly_9026 } + OR = { + any_killed_character = { } + num_sinful_traits >= 1 + AND = { + has_trait = sadistic + NOT = { faith = { trait_is_virtue = sadistic } } + } + AND = { + has_trait = callous + NOT = { faith = { trait_is_virtue = callous } } + } + } + any_memory = { + memory_type = friend_died + } + } + + immediate = { + if = { + limit = { + any_killed_character = { } + } + if = { + limit = { + any_secret = { + type = secret_murder + } + } + random_secret = { + type = secret_murder + secret_target = { + save_scope_as = bp1_yearly_9026_murder_victim + } + } + } + else_if = { + limit = { + has_trait = murderer + any_killed_character = { + death_reason = death_murder + } + } + random_killed_character = { + limit = { + death_reason = death_murder + } + save_scope_as = bp1_yearly_9026_murder_victim + } + } + else = { + random_killed_character = { + save_scope_as = bp1_yearly_9026_murder_victim + } + } + } + random_memory = { + memory_type = friend_died + limit = { + exists = memory_participant:dead_relation + } + save_scope_as = dead_friend_memory + memory_participant:dead_relation = { save_scope_as = bp1_yearly_9026_dead_friend } + } + create_story = story_being_visited_by_angry_ghosts + random_owned_story = { + type = story_being_visited_by_angry_ghosts + set_variable = { + name = first_ghost + value = scope:bp1_yearly_9026_dead_friend + } + set_variable = { + name = good_deeds + value = 0 + } + save_scope_as = marley_story_cycle_scope + } + create_character_memory = { + type = haunted_by_a_friend_memory + participants = { + dead_relation = scope:bp1_yearly_9026_dead_friend + } + } + } + + option = { # I repent! I repent! + name = bp1_yearly.9026.a + add_piety = medium_piety_gain + bp1_yearly_9026_determine_sin_and_virtue = yes + stress_impact = { + base = major_stress_impact_gain + arrogant = major_stress_impact_gain + cynical = major_stress_impact_gain + zealous = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = cynical + } + } + } + } + + option = { # There's more of gravy than of grave about you! + name = bp1_yearly.9026.b + duel = { + skill = learning + target = scope:bp1_yearly_9026_dead_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + stress_impact = { + cynical = major_stress_impact_loss + } + scope:marley_story_cycle_scope = { end_story = yes } + custom_tooltip = end_marley_ghost_story_tt + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + add_piety = medium_piety_loss + bp1_yearly_9026_determine_sin_and_virtue = yes + } + } + stress_impact = { + base = minor_stress_impact_gain + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + } + } + } + } + + + after = { add_character_flag = had_event_bp1_yearly_9026 } +} + +# Your act of repentance: generosity +bp1_yearly.9027 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9027.t + desc = { + desc = bp1_yearly.9027.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = greedy + faith = { trait_is_sin = greedy } + } + desc = bp1_yearly.9027.desc.greedy + } + desc = bp1_yearly.9027.desc.fallback + } + desc = bp1_yearly.9027.desc.outro + } + theme = stewardship + override_background = market + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:bp1_yearly_9027_peasant_begger + animation = beg + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9026 + NOT = { has_character_flag = had_event_bp1_yearly_9027 } + } + + immediate = { + create_character = { + template = generic_peasant_character + location = root.capital_province + save_scope_as = bp1_yearly_9027_peasant_begger + } + random_owned_story = { + type = story_being_visited_by_angry_ghosts + var:first_ghost = { + save_scope_as = bp1_yearly_9027_dead_friend + } + } + } + + option = { # Stay true to your repentance + name = bp1_yearly.9027.a + remove_short_term_gold = medium_gold_value + add_piety = medium_piety_gain + root.capital_county = { + add_county_modifier = { + modifier = invested_in_province_modifier + years = 5 + } + } + # For determining final event + bp1_increase_good_deeds = yes + stress_impact = { + arrogant = medium_stress_impact_gain + greedy = major_stress_impact_gain + cynical = major_stress_impact_gain + zealous = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + short_term_gold < medium_gold_value + factor = 0 + } + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = greedy + has_trait = cynical + } + } + } + } + + option = { # Take advantage of their desperate situation + name = bp1_yearly.9027.b + trigger = { + OR = { + has_trait = greedy + has_trait = callous + } + } + remove_short_term_gold = minor_gold_value + add_piety = medium_piety_loss + root.capital_county = { + add_county_modifier = { + modifier = exploitative_lord_modifier + years = 5 + } + } + # For determining final event + bp1_decrease_good_deeds = yes + stress_impact = { + just = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = major_stress_impact_gain + generous = massive_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + short_term_gold < minor_gold_value + factor = 0 + } + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = humble + has_trait = generous + } + } + } + } + + option = { # You want HOW much?? + name = bp1_yearly.9027.c + add_piety = medium_piety_loss + stress_impact = { + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + generous = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = just + has_trait = compassionate + has_trait = humble + has_trait = generous + } + } + } + } + + after = { + add_character_flag = had_event_bp1_yearly_9027 + scope:bp1_yearly_9027_peasant_begger = { + silent_disappearance_effect = yes + } + } +} + +# Ghostly visit: rival + +bp1_yearly.9028 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9028.t + desc = { + desc = bp1_yearly.9028.desc.intro + first_valid = { + triggered_desc = { + trigger = { + any_killed_character = { + this = scope:bp1_yearly_9028_dead_rival + } + } + desc = bp1_yearly.9028.desc.murderer + } + desc = bp1_yearly.9028.desc.murderer.fallback + } + first_valid = { + triggered_desc = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = vengeful + } + } + desc = bp1_yearly.9028.desc.callous + } + desc = bp1_yearly.9028.desc.fallback + } + desc = bp1_yearly.9028.desc.outro + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = fear + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9028_dead_rival + animation = anger + animate_if_dead = yes + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9027 + NOT = { has_character_flag = had_event_bp1_yearly_9028 } + OR = { + any_memory = { + memory_type = rival_died + memory_participant:dead_relation = { any_close_or_extended_family_member = { is_alive = yes } } + } + any_memory = { + memory_type = successful_murder + memory_participant:victim = { any_close_or_extended_family_member = { is_alive = yes } } + } + } + any_owned_story = { + type = story_being_visited_by_angry_ghosts + NOT = { exists = var:second_ghost } + } + } + + immediate = { + if = { + limit = { + any_memory = { + memory_type = rival_died + memory_participant:dead_relation = { any_close_or_extended_family_member = { is_alive = yes } } + } + } + random_memory = { + memory_type = rival_died + save_scope_as = dead_rival_memory + memory_participant:dead_relation = { save_scope_as = bp1_yearly_9028_dead_rival } + } + } + else_if = { + limit = { + any_memory = { + memory_type = successful_murder + memory_participant:victim = { any_close_or_extended_family_member = { is_alive = yes } } + } + } + random_memory = { + memory_type = successful_murder + save_scope_as = dead_rival_memory + memory_participant:victim = { save_scope_as = bp1_yearly_9028_dead_rival } + } + } + random_owned_story = { + type = story_being_visited_by_angry_ghosts + set_variable = { + name = second_ghost + value = scope:bp1_yearly_9028_dead_rival + } + } + create_character_memory = { + type = haunted_by_a_rival_memory + participants = { + dead_relation = scope:bp1_yearly_9028_dead_rival + } + } + } + + option = { # I repent! I repent! + name = bp1_yearly.9028.a + add_piety = medium_piety_gain + add_character_flag = had_event_bp1_promised_to_ammend_rivalry + bp1_increase_good_deeds = yes + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + has_trait = cynical + } + } + } + } + + option = { # Not a chance! + name = bp1_yearly.9028.b + bp1_decrease_good_deeds = yes + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9028 } +} + +# Ghostly visit: parent + +bp1_yearly.9029 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9029.t + desc = { + desc = bp1_yearly.9029.desc.intro + first_valid = { + triggered_desc = { + trigger = { + any_sibling = { + any_parent = { this = scope:bp1_yearly_9029_dead_parent } + has_relation_rival = root + } + } + desc = bp1_yearly.9029.desc.rival_sibling + } + triggered_desc = { + trigger = { + any_sibling = { + has_relation_rival = root + } + } + desc = bp1_yearly.9029.desc.rival_sibling_unrelated + } + triggered_desc = { + trigger = { + any_relation = { + type = rival + } + } + desc = bp1_yearly.9029.desc.rival + } + } + desc = bp1_yearly.9029.desc.outro + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = shock + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9029_dead_parent + animation = personality_compassionate + animate_if_dead = yes + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9027 + NOT = { has_character_flag = had_event_bp1_yearly_9029 } + any_parent = { + even_if_dead = yes + is_alive = no + } + any_relation = { + type = rival + } + any_owned_story = { + type = story_being_visited_by_angry_ghosts + NOT = { exists = var:second_ghost } + } + } + + immediate = { + random_parent = { + even_if_dead = yes + limit = { + is_alive = no + } + save_scope_as = bp1_yearly_9029_dead_parent + } + if = { + limit = { + any_sibling = { + any_parent = { this = scope:bp1_yearly_9029_dead_parent } + has_relation_rival = root + } + } + random_sibling = { + limit = { + any_parent = { this = scope:bp1_yearly_9029_dead_parent } + has_relation_rival = root + } + save_scope_as = bp1_yearly_9029_rival + } + } + else_if = { + limit = { + any_sibling = { + has_relation_rival = root + } + } + random_sibling = { + limit = { + has_relation_rival = root + } + save_scope_as = bp1_yearly_9029_rival + } + } + else_if = { + limit = { + any_relation = { + type = rival + } + } + random_relation = { + type = rival + save_scope_as = bp1_yearly_9029_rival + } + } + create_character_memory = { + type = haunted_by_parent_memory + participants = { + dead_relation = scope:bp1_yearly_9029_dead_parent + } + } + } + + option = { # I'll go be nice to my rival + name = bp1_yearly.9029.a + add_piety = medium_piety_gain + random_owned_story = { + type = story_being_visited_by_angry_ghosts + set_variable = { + name = second_ghost + value = scope:bp1_yearly_9029_dead_parent + } + set_variable = { + name = rival_ammends + value = scope:bp1_yearly_9029_rival + } + } + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + + option = { # Not a chance! + name = bp1_yearly.9029.b + random_owned_story = { + type = story_being_visited_by_angry_ghosts + set_variable = { + name = second_ghost + value = scope:bp1_yearly_9029_dead_parent + } + } + bp1_decrease_good_deeds = yes + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9029 } +} + +# Ghostly visit: dead friend again + +bp1_yearly.9030 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9030.t + desc = { + desc = bp1_yearly.9030.desc.intro + first_valid = { + triggered_desc = { + trigger = { + #Check Pilgrimage triggers + is_available_adult = yes + is_at_war = no + is_landed = yes + faith = { + NOT = { has_doctrine_parameter = forbidden_from_pilgrimage } + any_holy_site = { exists = this } + } + #Check if all of your holy sites are on cooldown + trigger_if = { + limit = { + any_memory = { + has_variable = pilgrimage_destination + memory_age_years < 5 + } + } + faith = { + any_holy_site = { + save_temporary_scope_as = site_check + NOT = { + root = { + any_memory = { + has_variable = pilgrimage_destination + memory_age_years < 5 + var:pilgrimage_destination.barony = scope:site_check + } + } + } + add_to_temporary_list = holy_sites_not_on_cooldown + } + } + any_in_list = { + list = holy_sites_not_on_cooldown + count > 0 + } + } + trigger_else = { always = yes } + } + desc = bp1_yearly.9030.desc.pilgrimage + } + desc = bp1_yearly.9030.desc.fallback + } + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = beg + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9026_dead_friend + animation = anger + animate_if_dead = yes + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9027 + NOT = { has_character_flag = had_event_bp1_yearly_9030 } + any_owned_story = { + type = story_being_visited_by_angry_ghosts + NOT = { exists = var:second_ghost } + } + } + + immediate = { + random_owned_story = { + type = story_being_visited_by_angry_ghosts + var:first_ghost = { save_scope_as = bp1_yearly_9026_dead_friend } + set_variable = { + name = second_ghost + value = scope:bp1_yearly_9026_dead_friend + } + } + } + + option = { # I'll go on pilgrimage/become a big charity guy + name = bp1_yearly.9030.a + if = { + limit = { + #Only one modifier for _you_ + NOR = { + has_character_modifier = ghost_pilgrimage_promised_modifier + has_character_modifier = hajj_promised_modifier + has_character_modifier = pilgrimage_promised_modifier + } + #Check Pilgrimage triggers + is_available_adult = yes + is_at_war = no + is_landed = yes + faith = { + NOT = { has_doctrine_parameter = forbidden_from_pilgrimage } + any_holy_site = { exists = this } + } + #Check if all of your holy sites are on cooldown + trigger_if = { + limit = { + any_memory = { + has_variable = pilgrimage_destination + memory_age_years < 5 + } + } + faith = { + any_holy_site = { + save_temporary_scope_as = site_check + NOT = { + root = { + any_memory = { + has_variable = pilgrimage_destination + memory_age_years < 5 + var:pilgrimage_destination.barony = scope:site_check + } + } + } + add_to_temporary_list = holy_sites_not_on_cooldown + } + } + any_in_list = { + list = holy_sites_not_on_cooldown + count > 0 + } + } + trigger_else = { always = yes } + } + custom_tooltip = { + text = bp1_yearly.9030.a.tt_pilgrimage + add_character_modifier = ghost_pilgrimage_promised_modifier + } + } + else = { + add_trait = profligate + remove_short_term_gold = medium_gold_value + add_stress = medium_stress_loss + } + bp1_increase_good_deeds = yes + stress_impact = { + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = minor_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + + option = { # Not a chance! + name = bp1_yearly.9030.b + bp1_decrease_good_deeds = yes + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9030 } +} + +# Redemption: making ammends with rival's family + +bp1_yearly.9031 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9031.t + desc = { + desc = bp1_yearly.9031.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = sadistic + has_trait = torturer + has_trait = flagellant + } + } + } + desc = bp1_yearly.9031.desc.flagellant + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = vengeful + has_trait = just + has_trait = zealous + } + } + } + desc = bp1_yearly.9031.desc.debate + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = lazy + has_trait = arbitrary + } + } + } + desc = bp1_yearly.9031.desc.cleanup + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + has_trait = forgiving + } + } + desc = bp1_yearly.9031.desc.unconditional + } + desc = bp1_yearly.9031.desc.fallback + } + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = beg + } + right_portrait = { + character = scope:bp1_yearly_9031_rival_family + animation = anger + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9028 + any_owned_story = { + type = story_being_visited_by_angry_ghosts + exists = var:second_ghost + var:second_ghost = { + any_close_or_extended_family_member = { } + } + } + has_character_flag = had_event_bp1_promised_to_ammend_rivalry + } + + immediate = { + random_owned_story = { + type = story_being_visited_by_angry_ghosts + var:second_ghost = { + save_scope_as = bp1_yearly_9031_rival + random_close_or_extended_family_member = { + save_scope_as = bp1_yearly_9031_rival_family + } + } + } + } + + option = { # Grit my teeth and apologise + name = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + has_trait = forgiving + } + } + text = bp1_yearly.9031.a.forgiven + } + name = bp1_yearly.9031.a + bp1_increase_good_deeds = yes + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9031_rival_family + OPINION = default_friend_opinion + REASON = friend_forgiven_transgression + } + if = { + limit = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = sadistic + has_trait = torturer + has_trait = flagellant + } + } + } + increase_wounds_effect = { REASON = whipping } + } + else_if = { + limit = { + scope:bp1_yearly_9031_rival_family = { + OR = { + has_trait = vengeful + has_trait = just + has_trait = zealous + } + } + } + duel = { + skill = learning + target = scope:bp1_yearly_9031_rival_family + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + add_piety = medium_piety_gain + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9031_rival_family + OPINION = default_friend_opinion + REASON = friend_debate_win + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + add_piety = medium_piety_loss + } + } + } + else_if = { + limit = { + scope:bp1_yearly_9031_rival_family = { + NOT = { has_trait = forgiving } + } + NOT = { has_trait = humble } + } + add_prestige = medium_prestige_loss + } + stress_impact = { + base = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = medium_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + + option = { # I will not grovel! + name = { + trigger = { + scope:bp1_yearly_9031_rival_family = { + has_trait = forgiving + } + } + text = bp1_yearly.9031.b.forgiven + } + name = bp1_yearly.9031.b + bp1_decrease_good_deeds = yes + progress_towards_rival_effect = { + REASON = rival_not_grovel + CHARACTER = scope:bp1_yearly_9031_rival_family + OPINION = default_rival_opinion + } + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9031 } +} + +# Redemption: making ammends with rival + +bp1_yearly.9032 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9032.t + desc = bp1_yearly.9032.desc + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = beg + } + right_portrait = { + character = scope:bp1_yearly_9032_rival + animation = anger + } + + trigger = { + is_available_at_peace_adult = yes + has_character_flag = had_event_bp1_yearly_9028 + any_owned_story = { + type = story_being_visited_by_angry_ghosts + exists = var:second_ghost + exists = var:rival_ammends + } + } + + immediate = { + random_owned_story = { + type = story_being_visited_by_angry_ghosts + var:rival_ammends = { + save_scope_as = bp1_yearly_9032_rival + } + } + } + + option = { # Grit my teeth and apologise + name = bp1_yearly.9032.a + bp1_increase_good_deeds = yes + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9032_rival + OPINION = default_friend_opinion + REASON = friend_apologise + } + stress_impact = { + base = medium_stress_impact_loss + arrogant = medium_stress_impact_gain + vengeful = major_stress_impact_gain + zealous = minor_stress_impact_loss + forgiving = medium_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = arrogant + has_trait = vengeful + } + } + } + } + + option = { # I will not grovel! + name = bp1_yearly.9032.b + bp1_decrease_good_deeds = yes + progress_towards_rival_effect = { + REASON = rival_not_grovel + CHARACTER = scope:bp1_yearly_9032_rival + OPINION = default_rival_opinion + } + scope:bp1_yearly_9032_rival = { + increase_wounds_effect = { REASON = fight } + } + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = zealous + has_trait = just + has_trait = compassionate + has_trait = forgiving + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9032 } +} + +# Ending event, first ghost tells you how you did + +bp1_yearly.9033 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9033.t + desc = { + desc = bp1_yearly.9033.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:ghost_story_scope = { + var:good_deeds >= 1 + } + } + desc = bp1_yearly.9033.desc.did_well + } + triggered_desc = { + trigger = { + scope:ghost_story_scope = { + var:good_deeds <= 0 + } + } + desc = bp1_yearly.9033.desc.did_bad + } + desc = bp1_yearly.9033.desc.did_okay + } + desc = bp1_yearly.9033.desc.outro + } + theme = skull + override_background = corridor_night + left_portrait = { + character = root + animation = beg + outfit_tags = { nightgown } + } + right_portrait = { + character = scope:bp1_yearly_9026_dead_friend + triggered_animation = { + trigger = { + scope:ghost_story_scope = { + var:good_deeds <= 0 + } + } + animation = anger + } + triggered_animation = { + trigger = { + scope:ghost_story_scope = { + var:good_deeds > 0 + } + } + animation = personality_compassionate + } + animate_if_dead = yes + } + + trigger = { + is_available_at_peace_adult = yes + OR = { + has_character_flag = had_event_bp1_yearly_9030 + has_character_flag = had_event_bp1_yearly_9031 + has_character_flag = had_event_bp1_yearly_9032 + } + any_owned_story = { + type = story_being_visited_by_angry_ghosts + exists = var:second_ghost + } + } + + immediate = { + random_owned_story = { + type = story_being_visited_by_angry_ghosts + save_scope_as = ghost_story_scope + var:first_ghost = { save_scope_as = bp1_yearly_9026_dead_friend } + } + } + + option = { # I did it! + name = bp1_yearly.9033.a + trigger = { + scope:ghost_story_scope = { + var:good_deeds > 0 + } + } + add_piety = medium_piety_gain + + stress_impact = { + base = massive_stress_impact_loss + cynical = medium_stress_impact_gain # Offset if you're cynical; you believe it less + } + } + + option = { # I failed + name = bp1_yearly.9033.b + trigger = { + scope:ghost_story_scope = { + var:good_deeds <= 0 + } + } + add_piety = medium_piety_loss + stress_impact = { + zealous = major_stress_impact_gain + just = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + humble = medium_stress_impact_gain + forgiving = major_stress_impact_gain + } + } + + option = { # I will live every day like it's spooky ghost day! + name = bp1_yearly.9033.c + trigger = { + scope:ghost_story_scope = { + var:good_deeds > 1 + } + } + add_piety = major_piety_gain + if = { + limit = { + any_owned_story = { + type = story_being_visited_by_angry_ghosts + var:trait_to_gain = 1 + } + } + if = { + limit = { has_trait = greedy } + remove_trait = greedy + } + add_trait = generous + } + else_if = { + limit = { + any_owned_story = { + type = story_being_visited_by_angry_ghosts + var:trait_to_gain = 2 + } + } + if = { + limit = { has_trait = vengeful } + remove_trait = vengeful + } + add_trait = forgiving + } + else_if = { + limit = { + any_owned_story = { + type = story_being_visited_by_angry_ghosts + var:trait_to_gain = 3 + } + } + if = { + limit = { has_trait = callous } + remove_trait = callous + } + if = { + limit = { has_trait = sadistic } + remove_trait = sadistic + } + add_trait = compassionate + } + stress_impact = { + base = medium_stress_impact_gain + cynical = medium_stress_impact_gain # Offset if you're cynical; you believe it less + } + } + + after = { scope:ghost_story_scope ?= { end_story = yes } } +} + +# End of ghostly visit chain + +##################################### +# Watery bog witch # +# by James Beaumont # +# 9034 # +##################################### + +bp1_yearly.9034 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9034.t + desc = { + desc = bp1_yearly.9034.desc.intro + #What text we display depends on the relationship to the child + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = giant } + } + desc = bp1_yearly.9034.desc.giant + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = hunchbacked } + } + desc = bp1_yearly.9034.desc.hunchbacked + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = beauty_bad } + } + desc = bp1_yearly.9034.desc.beauty_bad + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = albino } + } + desc = bp1_yearly.9034.desc.albino + } + triggered_desc = { + trigger = { + scope:bp1_yearly_9034_witch = { has_trait = scaly } + } + desc = bp1_yearly.9034.desc.scaly + } + } + desc = bp1_yearly.9034.desc.outro + } + theme = witchcraft + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + lower_left_portrait = { + character = scope:bp1_yearly_9034_friend + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9034_witch + animation = rage + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + is_adult = no + OR = { + any_held_county = { + county_has_province_with_terrain = { terrain = wetlands } + } + location = { terrain = wetlands } + } + any_relation = { + type = friend + is_adult = no + is_available_ai = yes + } + any_relation = { + type = guardian + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + + } + + immediate = { + if = { + limit = { + any_held_county = { + county_has_province_with_terrain = { terrain = wetlands } + } + } + random_held_county = { + limit = { + county_has_province_with_terrain = { terrain = wetlands } + } + random_county_province = { + limit = { terrain = wetlands } + save_scope_as = bp1_yearly_9034_swampy_location + } + } + } + else = { + location = { save_scope_as = bp1_yearly_9034_swampy_location } + } + random_relation = { + type = friend + limit = { + is_adult = no + is_available_ai = yes + } + save_scope_as = bp1_yearly_9034_friend + } + random_relation = { + type = guardian + limit = { + is_available_ai_adult = yes + } + save_scope_as = bp1_yearly_9034_guardian + } + create_character = { + template = witchy_template + random_traits_list = { + count = 1 + giant = {} + hunchbacked = {} + beauty_bad_1 = {} + beauty_bad_2 = {} + beauty_bad_3 = {} + albino = {} + scaly = {} + } + location = scope:bp1_yearly_9034_swampy_location + save_scope_as = bp1_yearly_9034_witch + } + } + + option = { # Run from the horrifying bog witch! + name = bp1_yearly.9034.a + duel = { + skill = prowess + target = scope:bp1_yearly_9034_witch + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + send_interface_toast = { + title = 9034_escaped_witch + left_icon = root + right_icon = scope:bp1_yearly_9034_witch + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -1 + } + send_interface_toast = { + title = 9034_failed_to_escape + left_icon = root + right_icon = scope:bp1_yearly_9034_witch + increase_wounds_no_death_effect = { REASON = duel } + } + } + } + create_character_memory = { + type = chased_by_bog_witch_memory + participants = { + witch = scope:bp1_yearly_9034_witch + } + } + scope:bp1_yearly_9034_witch = { + silent_disappearance_effect = yes + } + stress_impact = { + brave = medium_stress_impact_gain + rowdy = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + } + + option = { # Stand your ground like you're facing down a wolf + name = bp1_yearly.9034.b + custom_tooltip = { + text = bp1_yearly_9034_witchy_goodbad_tt + random_list = { + # The good witch of the bog + 60 = { + modifier = { + factor = 0 + has_trait = wrathful + } + modifier = { + factor = 2 + OR = { + has_trait = honest + has_trait = generous + has_trait = forgiving + has_trait = calm + has_trait = patient + } + } + trigger_event = bp1_yearly.9035 + } + # The wicked witch of the bog + 40 = { + modifier = { + factor = 0 + has_trait = compassionate + } + modifier = { + factor = 0.5 + OR = { + has_trait = honest + has_trait = generous + has_trait = forgiving + has_trait = calm + has_trait = patient + } + } + trigger_event = bp1_yearly.9036 + } + } + } + stress_impact = { + craven = massive_stress_impact_gain + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } +} + +# Good witch event + +bp1_yearly.9035 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9035.t + desc = bp1_yearly.9035.desc + theme = witchcraft + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9034_witch + animation = personality_forgiving + } + + immediate = { + scope:bp1_yearly_9034_witch = { + add_trait = lifestyle_herbalist + } + if = { + limit = { + employs_court_position = court_physician_court_position + } + random_court_position_holder = { + type = court_physician_court_position + save_scope_as = current_physician + } + } + create_character_memory = { + type = met_a_nice_witch_memory + participants = { + witch = scope:bp1_yearly_9034_witch + } + } + } + + option = { # Employ the witch as your physician + name = bp1_yearly.9035.a + add_courtier = scope:bp1_yearly_9034_witch + court_position_grant_effect = { + POS = court_physician + CANDIDATE = scope:bp1_yearly_9034_witch + EMPLOYER = root + } + stress_impact = { + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + OR = { + has_trait = pensive + has_trait = bossy + has_trait = zealous + } + } + modifier = { + factor = 0 + employs_court_position = court_physician_court_position + } + } + } + + option = { # Teach me how to witch + name = bp1_yearly.9035.b + trigger = { # Only players should be able to override their guardian + is_ai = no + } + add_courtier = scope:bp1_yearly_9034_witch + give_witch_secret_or_trait_effect = yes + set_relation_guardian = scope:bp1_yearly_9034_witch + set_relation_friend = { reason = friend_deviant_fun target = scope:bp1_yearly_9034_witch } + stress_impact = { + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + } + + option = { # kbye + name = bp1_yearly.9035.c + scope:bp1_yearly_9034_witch = { + silent_disappearance_effect = yes + } + ai_chance = { + base = 30 + modifier = { + factor = 0 + NOT = { employs_court_position = court_physician_court_position } + } + } + } +} + +# Evil witch event + +bp1_yearly.9036 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9036.t + desc = bp1_yearly.9036.desc + theme = witchcraft + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9034_witch + animation = rage + } + + option = { # Guardian, help me! + name = bp1_yearly.9036.a + scope:bp1_yearly_9034_guardian = { + duel = { + skill = prowess + target = scope:bp1_yearly_9034_witch + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = bp1_yearly.9036.guardian_wins + scope:bp1_yearly_9034_guardian = { + if = { + limit = { + can_add_hook = { + target = root + type = favor_hook + } + } + add_hook = { + target = root + type = favor_hook + } + } + } + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = bp1_yearly.9036.guardian_loses + increase_wounds_effect = { REASON = duel } + } + } + } + } + } + create_character_memory = { + type = assaulted_by_a_witch_memory + participants = { + witch = scope:bp1_yearly_9034_witch + } + } + ai_chance = { + base = 10 + } + } +} + + +##################################### +# Bog mummy # +# by James Beaumont # +# 9037 # +##################################### + +bp1_yearly.9037 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9037.t + desc = bp1_yearly.9037.desc + theme = skull + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9037_corpse + animation = idle + } + lower_left_portrait = scope:bp1_yearly_9037_guardian + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + is_adult = no + NOT = { + has_character_flag = had_event_bp1_yearly_9037 + } + OR = { + any_held_county = { + county_has_province_with_terrain = { terrain = wetlands } + } + location = { terrain = wetlands } + } + any_relation = { + type = guardian + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 1 + + } + + immediate = { + if = { + limit = { + any_held_county = { + county_has_province_with_terrain = { terrain = wetlands } + } + } + random_held_county = { + limit = { + county_has_province_with_terrain = { terrain = wetlands } + } + random_county_province = { + limit = { terrain = wetlands } + save_scope_as = bp1_yearly_9037_swampy_location + } + } + } + else = { + location = { save_scope_as = bp1_yearly_9037_swampy_location } + } + random_relation = { + type = guardian + limit = { + is_available_ai_adult = yes + } + save_scope_as = bp1_yearly_9037_guardian + } + if = { # If the guardian has killed anyone, use their body + limit = { + scope:bp1_yearly_9037_guardian = { + any_secret = { + type = secret_murder + } + } + } + scope:bp1_yearly_9037_guardian = { + random_secret = { + type = secret_murder + save_scope_as = bp1_yearly_9037_guardian_secret + secret_target = { save_scope_as = bp1_yearly_9037_corpse } + } + } + } + else = { # Otherwise make a new body + create_character = { + template = servant_character + location = scope:bp1_yearly_9037_swampy_location + save_scope_as = bp1_yearly_9037_corpse + } + scope:bp1_yearly_9037_corpse = { + death = { death_reason = death_drowned } + } + } + create_character_memory = { + type = found_a_bog_corpse_memory + participants = { + corpse = scope:bp1_yearly_9037_corpse + } + } + } + + option = { # Guardian, I found a body! + name = bp1_yearly.9037.a + custom_tooltip = bp1_yearly.9037.custom + hidden_effect = { + random_list = { + 50 = { + trigger = { + scope:bp1_yearly_9037_guardian = { + any_secret = { + type = secret_murder + } + } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = vengeful } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = honest } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = sadistic } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = callous } + } + trigger_event = bp1_yearly.9038 + } + 50 = { + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = forgiving } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = deceitful } + } + modifier = { + factor = 2 + scope:bp1_yearly_9037_guardian = { has_trait = compassionate } + } + trigger_event = bp1_yearly.9039 + } + } + } + stress_impact = { + craven = massive_stress_impact_gain + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Run away in terror + name = bp1_yearly.9037.b + stress_impact = { + base = 5 + brave = medium_stress_impact_gain + rowdy = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + after = { add_character_flag = had_event_bp1_yearly_9037 } +} + +# Guardian admits they killed someone + +bp1_yearly.9038 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9038.t + desc = { + desc = bp1_yearly.9038.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:bp1_yearly_9037_guardian = { + has_character_flag = bp1_yearly_9037_killer_guardian + } + } + desc = bp1_yearly.9038.desc.killer + } + desc = bp1_yearly.9038.desc.not_killer + } + } + theme = skull + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:bp1_yearly_9037_guardian + animation = rage + } + lower_left_portrait = scope:bp1_yearly_9037_corpse + + weight_multiplier = { + base = 1 + } + + immediate = { + random_list = { + 50 = { + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = vengeful } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = callous } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = sadistic } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = wrathful } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = arbitrary } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = craven } + } + scope:bp1_yearly_9037_guardian = { + add_character_flag = { + flag = bp1_yearly_9037_killer_guardian + years = 1 + } + } + } + 50 = { + modifier = { + factor = 0 + scope:bp1_yearly_9037_guardian = { has_trait = paranoid } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = compassionate } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = forgiving } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = trusting } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = just } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = content } + } + modifier = { + add = 50 + scope:bp1_yearly_9037_guardian = { has_trait = calm } + } + } + } + } + + option = { # Wow, thanks for telling me that. + name = bp1_yearly.9038.a + trigger = { + NOT = { + scope:bp1_yearly_9037_guardian = { + has_character_flag = bp1_yearly_9037_killer_guardian + } + } + } + scope:bp1_yearly_9037_guardian_secret = { + reveal_to = root + } + ai_chance = { + base = 10 + } + } + + option = { # Run! + name = bp1_yearly.9038.b + trigger = { + scope:bp1_yearly_9037_guardian = { + has_character_flag = bp1_yearly_9037_killer_guardian + } + } + scope:bp1_yearly_9037_guardian_secret = { + expose_secret = root + } + add_prestige = minor_prestige_loss + stress_impact = { + brave = medium_stress_impact_gain + trusting = medium_stress_impact_gain + vengeful = medium_stress_impact_gain + wrathful = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Try to throw them in the bog instead + name = bp1_yearly.9038.c + trigger = { + scope:bp1_yearly_9037_guardian = { + has_character_flag = bp1_yearly_9037_killer_guardian + } + } + scope:bp1_yearly_9037_guardian_secret = { + reveal_to = root + } + duel = { + skill = prowess + target = scope:bp1_yearly_9037_guardian + 70 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + send_interface_toast = { + title = 9038_killed_guardian + left_icon = root + right_icon = scope:bp1_yearly_9037_guardian + scope:bp1_yearly_9037_guardian = { + death = { death_reason = death_drowned } + } + create_character_memory = { + type = successful_murder + participants = { + victim = scope:bp1_yearly_9037_guardian + } + } + add_prestige = major_prestige_gain + } + } + 30 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + send_interface_toast = { + title = 9038_guardian_kills_you + left_icon = root + right_icon = scope:bp1_yearly_9037_guardian + unknown_murder_effect = { VICTIM = root MURDERER = scope:bp1_yearly_9037_guardian REASON = death_murder } + } + } + } + stress_impact = { + craven = major_stress_impact_gain + forgiving = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + calm = medium_stress_impact_gain + pensive = medium_stress_impact_gain + rowdy = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } +} + +bp1_yearly.9039 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9039.t + desc = bp1_yearly.9039.desc + theme = skull + override_background = wilderness_wetlands + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:bp1_yearly_9037_guardian + animation = disbelief + } + lower_left_portrait = scope:bp1_yearly_9037_corpse + + option = { # Throw the bones in a box! + name = bp1_yearly.9039.a + create_artifact = { + name = box_of_boggy_bones + description = box_of_boggy_bones_desc + type = miscellaneous + visuals = small_box + modifier = artifact_dread_gain_mult_2_modifier + modifier = artifact_intrigue_per_stress_level_1_modifier + } + ai_chance = { + base = 10 + } + } + + option = { # Spread ghost stories about the bog man + name = bp1_yearly.9039.b + scope:bp1_yearly_9037_swampy_location = { + county = { + add_county_modifier = { + modifier = ghost_stories_modifier + years = 10 + } + } + } + ai_chance = { + base = 10 + } + } +} + + +##################################### +# Haunted by your lover # +# by James Beaumont # +# 9040 # +##################################### + +bp1_yearly.9040 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9040.t + desc = bp1_yearly.9040.desc + theme = seduction + override_background = corridor_night + left_portrait = { + character = root + animation = disbelief + } + right_portrait = { + character = scope:bp1_yearly_9040_dead_lover + animation = flirtation_left + animate_if_dead = yes + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + any_memory = { + OR = { + has_memory_type = lover_died + has_memory_type = soulmate_died + } + } + NOT = { + has_character_flag = had_event_bp1_yearly_9040 + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_memory = { + limit = { + OR = { + has_memory_type = lover_died + has_memory_type = soulmate_died + } + } + memory_participant:dead_relation = { + save_scope_as = bp1_yearly_9040_dead_lover + } + } + } + + option = { # Shag the sexy ghost + name = bp1_yearly.9040.a + add_character_modifier = { + modifier = bp1_indulging_ghost_sex + years = 5 + } + stress_impact = { + base = major_stress_impact_loss + lustful = major_stress_impact_loss + chaste = minor_stress_impact_gain + loyal = minor_stress_impact_gain + } + ai_chance = { + base = 10 + } + } + + option = { # Withhold your desires, save yourself for your new spouse/lover + name = bp1_yearly.9040.b + add_character_modifier = { + modifier = bp1_withholding_ghost_sex + years = 5 + } + stress_impact = { + base = minor_stress_impact_gain + lustful = major_stress_impact_gain + compassionate = medium_stress_impact_gain + chaste = minor_stress_impact_loss + } + ai_chance = { + base = 10 + } + } + + after = { add_character_flag = had_event_bp1_yearly_9040 } +} + +##################################### +# Bonding over a dead parent # +# by James Beaumont # +# 9041 # +##################################### + +bp1_yearly.9041 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9041.t + desc = bp1_yearly.9041.desc + theme = family + override_background = { reference = corridor_day } + left_portrait = { + character = root + animation = personality_compassionate + } + right_portrait = { + character = scope:bp1_yearly_9041_sibling + animation = grief + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + is_adult = no + age >= 6 + NOT = { + has_character_flag = had_event_bp1_yearly_9041 + } + any_sibling = { + is_available_ai = yes + # Check that they have had a potential friendship-building event already, else this will be extremely common + has_relation_potential_friend = root + age >= 6 + any_parent = { + even_if_dead = yes + # Check that they're dead + is_alive = no + # Make sure it's a shared parent + is_parent_of = root + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_sibling = { + limit = { + is_available_ai = yes + has_relation_potential_friend = root + age >= 6 + any_parent = { + even_if_dead = yes + # Check that they're dead + is_alive = no + # Make sure it's a shared parent + is_parent_of = root + } + } + save_scope_as = bp1_yearly_9041_sibling + random_parent = { + even_if_dead = yes + limit = { + # Check that they're dead + is_alive = no + # Make sure it's a shared parent + is_parent_of = root + } + save_scope_as = bp1_yearly_9041_parent + } + } + } + + option = { # Bond and become friends + name = bp1_yearly.9041.a + scope:bp1_yearly_9041_parent = { save_scope_as = relationship_reason_involved_character } + upgrade_to_friend_effect = { + CHARACTER = scope:bp1_yearly_9041_sibling + REASON = generic_familial_bonding + } + stress_impact = { + shy = major_stress_impact_gain + pensive = major_stress_impact_gain + bossy = minor_stress_impact_gain + rowdy = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = shy + has_trait = pensive + has_trait = bossy + has_trait = rowdy + } + } + } + } + + option = { # Make fun of them for crying + name = bp1_yearly.9041.b + if = { + limit = { NOT = { scope:bp1_yearly_9041_sibling = { has_relation_bully = root } } } + scope:bp1_yearly_9041_sibling = { set_relation_bully = root } + } + stress_impact = { + gregarious = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + loyal = medium_stress_impact_gain + curious = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = compassionate + has_trait = forgiving + has_trait = loyal + has_trait = curious + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9041 } +} + +##################################### +# Food that looks like Jesus # +# by James Beaumont # +# 9042 # +##################################### + +bp1_yearly.9042 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9042.t + desc = bp1_yearly.9042.desc + theme = faith + override_background = throne_room + left_portrait = { + character = root + animation = personality_cynical + } + right_portrait = { + character = scope:bp1_yearly_9042_chaplain + animation = ecstasy + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + faith_is_aniconic_trigger = no + NOT = { + has_character_flag = had_event_bp1_yearly_9042 + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + OR = { + learning <= 7 + has_trait = intellect_bad + has_trait = dull + has_trait = trusting + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + cp:councillor_court_chaplain = { save_scope_as = bp1_yearly_9042_chaplain } + } + + option = { # Woah it *does* look like Jesus! + name = bp1_yearly.9042.a + upgrade_to_friend_effect = { + CHARACTER = scope:bp1_yearly_9042_chaplain + REASON = generic_desserts_in_shape_of_jesus + } + scope:bp1_yearly_9042_chaplain = { add_trait = loyal } + create_artifact = { + name = dessert_looks_like_god + description = dessert_looks_like_god_desc + type = miscellaneous + visuals = small_box + modifier = artifact_monthly_piety_1_modifier + modifier = artifact_clergy_opinion_penalty_2_modifier + save_scope_as = jesus_food_scope + } + scope:jesus_food_scope = { + flag_as_trash_artifact = yes + flag_as_unwanted_artifact = yes + } + add_piety = minor_piety_loss + stress_impact = { + zealous = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = zealous + + } + } + } + + option = { # Accuse them of heresy + name = bp1_yearly.9042.b + trigger = { + scope:bp1_yearly_9042_chaplain = { + can_be_fired_from_council_trigger = { COURT_OWNER = root } + } + } + downgrade_to_rival_effect = { + CHARACTER = scope:bp1_yearly_9042_chaplain + REASON = rival_accusations_of_heresy + } + duel = { + skill = learning + target = scope:bp1_yearly_9042_chaplain + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + root = { + send_interface_toast = { + title = 9042_you_win + left_icon = root + right_icon = scope:bp1_yearly_9042_chaplain + fire_councillor = scope:bp1_yearly_9042_chaplain + scope:bp1_yearly_9042_chaplain = { banish = yes } + add_piety = medium_piety_gain + } + } + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + root = { + send_interface_toast = { + title = 9042_you_lose + left_icon = root + right_icon = scope:bp1_yearly_9042_chaplain + add_piety = medium_piety_loss + } + } + } + } + stress_impact = { + gregarious = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = gregarious + has_trait = forgiving + } + } + } + } + + option = { # Eat it + name = bp1_yearly.9042.c + trigger = { + OR = { + has_trait = cynical + has_trait = gluttonous + has_trait = comfort_eater + has_trait = sadistic + } + } + downgrade_to_rival_effect = { + CHARACTER = scope:bp1_yearly_9042_chaplain + REASON = rival_ate_jesus + } + add_character_modifier = { + modifier = full_of_jesus_modifier + years = 5 + } + stress_impact = { + zealous = minor_stress_impact_gain + gluttonous = minor_stress_impact_gain + comfort_eater = minor_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + has_trait = zealous + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9042 } +} + +##################################################### +# The Baby Eating Bishop of County and Kingdom # +# by James Beaumont # +# 9043 # +##################################################### + +bp1_yearly.9043 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9043.t + desc = bp1_yearly.9043.desc + theme = secret + override_background = temple + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9043_chaplain + animation = ecstasy + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + NOT = { + has_character_flag = had_event_bp1_yearly_9043 + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + OR = { + AND = { + is_deviant_trigger = yes + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + 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 + GENDER_CHARACTER = cp:councillor_court_chaplain + } + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + cp:councillor_court_chaplain = { + save_scope_as = bp1_yearly_9043_chaplain + if = { + limit = { + NOT = { + is_cannibal_trigger = yes + } + } + if = { + limit = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = cannibal + GENDER_CHARACTER = cp:councillor_court_chaplain + } + } + add_secret = { + type = secret_cannibal + } + } + else = { + add_trait = cannibal + } + } + if = { + limit = { + NOT = { + is_deviant_trigger = yes + } + } + if = { + limit = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = deviant + GENDER_CHARACTER = cp:councillor_court_chaplain + } + } + add_secret = { + type = secret_deviant + } + } + else = { + add_trait = deviant + } + } + every_secret = { + limit = { + OR = { + secret_type = secret_cannibal + secret_type = secret_deviant + } + } + reveal_to = root + } + } + } + + option = { # Show me your ways + name = bp1_yearly.9043.a + if = { + limit = { + AND = { + OR = { + is_attracted_to_gender_of = scope:bp1_yearly_9043_chaplain + has_perk = unshackled_lust_perk + } + scope:bp1_yearly_9043_chaplain = { + OR = { + is_attracted_to_gender_of = root + has_perk = unshackled_lust_perk + } + } + } + NOT = { has_relation_lover = scope:bp1_yearly_9043_chaplain } + } + set_relation_lover = { reason = lover_induled_in_forbidden_pleasures target = scope:bp1_yearly_9043_chaplain } + } + else = { + upgrade_to_friend_effect = { + CHARACTER = scope:bp1_yearly_9043_chaplain + REASON = generic_ate_a_baby_together + } + } + if = { + limit = { + NOT = { + is_cannibal_trigger = yes + } + } + if = { + limit = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = cannibal + GENDER_CHARACTER = root + } + } + add_secret = { + type = secret_cannibal + } + } + else = { + add_trait = cannibal + } + } + if = { + limit = { + NOT = { + is_deviant_trigger = yes + } + } + if = { + limit = { + trait_is_shunned_or_criminal_in_my_or_lieges_faith_trigger = { + TRAIT = deviant + GENDER_CHARACTER = root + } + } + add_secret = { + type = secret_deviant + } + } + else = { + add_trait = deviant + } + } + stress_impact = { + calm = major_stress_impact_gain + patient = major_stress_impact_gain + brave = major_stress_impact_gain + just = major_stress_impact_gain + trusting = major_stress_impact_gain + paranoid = major_stress_impact_gain + compassionate = major_stress_impact_gain + chaste = major_stress_impact_gain + zealous = major_stress_impact_gain + lustful = major_stress_impact_loss + deviant = massive_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + factor = 0 + OR = { + has_trait = calm + has_trait = patient + has_trait = brave + has_trait = just + has_trait = trusting + has_trait = paranoid + has_trait = compassionate + has_trait = chaste + has_trait = zealous + } + } + } + } + + option = { # Expose them! + name = bp1_yearly.9043.b + downgrade_to_rival_effect = { + CHARACTER = scope:bp1_yearly_9043_chaplain + REASON = rival_ate_baby + } + scope:bp1_yearly_9043_chaplain = { + every_secret = { + limit = { + OR = { + secret_type = secret_cannibal + secret_type = secret_deviant + } + } + expose_secret = root + } + give_nickname = nick_baby_eating + } + stress_impact = { + lustful = medium_stress_impact_gain + deviant = medium_stress_impact_gain + forgiving = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = lustful + has_trait = gregarious + has_trait = forgiving + } + } + modifier = { + add = 100 + OR = { + has_trait = just + has_trait = honest + has_trait = zealous + } + } + } + } + + option = { # Keep it to yourself + name = bp1_yearly.9043.c + stress_impact = { + honest = medium_stress_impact_gain + deviant = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = honest + has_trait = deviant + } + } + } + } + + after = { add_character_flag = had_event_bp1_yearly_9043 } +} + +################################# +# Executing a friend # +# by James Beaumont # +# 9044 # +################################# + +bp1_yearly.9044 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9044.t + desc = { + desc = bp1_yearly.9044.desc + first_valid = { + triggered_desc = { + trigger = { + exists = scope:bp1_yearly_9044_memory_scope + } + desc = bp1_yearly.9044.desc.outro.memory + } + desc = bp1_yearly.9044.desc.outro.no_memory + } + } + theme = skull + override_background = gallows + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = disloyal + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + has_trait = disloyal + } + } + animation = sadness + } + } + right_portrait = { + character = scope:recipient + animation = grief + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { beggar_rags } + } + animate_if_dead = yes + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + } + + weight_multiplier = { + base = 1 + } + + immediate = { + show_as_tooltip = { + execute_prisoner_effect = { + VICTIM = scope:recipient + EXECUTIONER = scope:actor + } + } + if = { + limit = { + any_memory = { + has_memory_category = positive + any_memory_participant = { this = scope:recipient } + NOT = { has_memory_type = became_friends } + } + } + random_memory = { + limit = { + has_memory_category = positive + any_memory_participant = { this = scope:recipient } + NOT = { has_memory_type = became_friends } + } + save_scope_as = bp1_yearly_9044_memory_scope + } + } + } + + option = { # I feel bad about this + name = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + has_trait = disloyal + } + } + text = bp1_yearly.9044.a.indifferent + } + name = bp1_yearly.9044.a.guilty + } +} + +################################# +# Seeing an execution as a child# +# by James Beaumont # +# 9045 # +################################# + +bp1_yearly.9045 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9045.t + desc = { + desc = bp1_yearly.9045.desc.intro + first_valid = { + triggered_desc = { + trigger = { + scope:recipient = { has_strong_religious_conviction_trigger = yes } + } + desc = bp1_yearly.9045.desc.zealous + } + triggered_desc = { + trigger = { + scope:recipient = { has_trait = brave } + } + desc = bp1_yearly.9045.desc.brave + } + desc = bp1_yearly.9045.desc.fallback + } + desc = bp1_yearly.9045.desc.outro + } + theme = skull + override_background = gallows + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + animation = shock + } + } + right_portrait = { + character = scope:recipient + animation = grief + triggered_outfit = { + remove_default_outfit = no + outfit_tags = { beggar_rags } + } + animate_if_dead = yes + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + any_relation = { + is_available_ai_adult = yes + type = guardian + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + show_as_tooltip = { + execute_prisoner_effect = { + VICTIM = scope:recipient + EXECUTIONER = scope:actor + } + } + random_relation = { + type = guardian + save_scope_as = bp1_yearly_9045_guardian + } + add_character_flag = witnessed_execution_flag + + create_character_memory = { + type = was_shown_execution_memory + participants = { + guardian = scope:bp1_yearly_9045_guardian + victim = scope:recipient + } + } + } + + option = { # How do I feel about this? + name = { + trigger = { + has_trait = callous + } + text = bp1_yearly.9045.a.indifferent + } + name = { + trigger = { + has_trait = sadistic + } + text = bp1_yearly.9045.a.sadistic + } + name = bp1_yearly.9045.a.guilty + if = { + limit = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + progress_towards_friend_effect = { + CHARACTER = scope:bp1_yearly_9045_guardian + OPINION = default_friend_opinion + REASON = friend_appreciated_good_entertainment + } + } + else = { + progress_towards_rival_effect = { + REASON = rival_child_saw_execution + CHARACTER = scope:bp1_yearly_9045_guardian + OPINION = default_rival_opinion + } + } + stress_impact = { + calm = major_stress_impact_gain + patient = major_stress_impact_gain + just = major_stress_impact_gain + trusting = major_stress_impact_gain + charming = major_stress_impact_gain + compassionate = major_stress_impact_gain + zealous = major_stress_impact_gain + sadistic = massive_stress_impact_loss + } + } +} + +################################# +# Child poops during baptism # +# by James Beaumont # +# 9046 # +################################# + +bp1_yearly.9046 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9046.t + desc = { + desc = bp1_yearly.9046.desc.intro + first_valid = { + triggered_desc = { + trigger = { + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + } + desc = bp1_yearly.9046.desc.christian + } + desc = bp1_yearly.9046.desc.not_christian + } + desc = bp1_yearly.9046.desc.outro + } + theme = family + override_background = temple + left_portrait = { + character = root + triggered_animation = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + animation = schadenfreude + } + triggered_animation = { + trigger = { + NOR = { + has_trait = callous + has_trait = sadistic + } + } + animation = shock + } + } + right_portrait = { + character = scope:bp1_yearly_9046_chaplain + animation = anger + } + lower_right_portrait = { + character = scope:bp1_yearly_9046_poopy_child + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + any_child = { + age <= 2 + is_available_ai = yes + } + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_ai_adult = yes + } + NOR = { + any_close_family_member = { + even_if_dead = yes + has_nickname = nick_the_dung_named + } + has_nickname = nick_the_dung_named + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_child = { + limit = { + age <= 2 + is_available_ai = yes + } + save_scope_as = bp1_yearly_9046_poopy_child + } + cp:councillor_court_chaplain = { save_scope_as = bp1_yearly_9046_chaplain } + } + + option = { # That's hilarious + name = { + trigger = { + OR = { + has_trait = callous + has_trait = sadistic + } + } + text = bp1_yearly.9046.a.indifferent + } + name = bp1_yearly.9046.a + scope:bp1_yearly_9046_poopy_child = { + give_nickname = nick_the_dung_named + progress_towards_rival_effect = { + REASON = rival_laughed_at_child_pooping + CHARACTER = root + OPINION = default_rival_opinion + } + } + stress_impact = { + calm = minor_stress_impact_gain + patient = minor_stress_impact_gain + just = minor_stress_impact_gain + trusting = minor_stress_impact_gain + charming = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + zealous = minor_stress_impact_gain + family_first = major_stress_impact_gain + sadistic = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = calm + has_trait = patient + has_trait = just + has_trait = trusting + has_trait = charming + has_trait = zealous + } + } + modifier = { + add = 10 + OR = { + has_trait = sadistic + has_trait = callous + } + } + } + } + + option = { # We gotta cover this up + name = bp1_yearly.9046.b + stress_impact = { + base = minor_stress_impact_gain + honest = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = sadistic + has_trait = callous + has_trait = honest + } + } + } + } +} + +######################################### +# Lover wants you to wear their hair # +# by James Beaumont # +# 9047 # +######################################### + +bp1_yearly.9047 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9047.t + desc = bp1_yearly.9047.desc + theme = love + left_portrait = { + character = root + animation = personality_rational + } + right_portrait = { + character = scope:bp1_yearly_9047_lover + animation = flirtation_left + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + any_relation = { + is_available_ai_adult = yes + type = lover + NOR = { + has_trait = loyal + has_trait = disloyal + } + } + OR = { + has_any_nickname = no + has_bad_nickname = yes + } + NOT = { has_character_flag = had_event_bp1_yearly_9047 } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = lover + limit = { + is_available_ai_adult = yes + NOR = { + has_trait = loyal + has_trait = disloyal + } + } + save_scope_as = bp1_yearly_9047_lover + } + add_character_flag = had_event_bp1_yearly_9047 + } + + option = { # Of course I will wear your hair! + name = bp1_yearly.9047.a + if = { + limit = { + is_ai = yes + } + random = { + chance = 10 + if = { + limit = { + scope:bp1_yearly_9047_lover = { is_female = yes } + } + give_nickname = nick_with_the_tress + } + else = { + give_nickname = nick_with_the_lock + } + } + } + else = { + if = { + limit = { + scope:bp1_yearly_9047_lover = { is_female = yes } + } + give_nickname = nick_with_the_tress + } + else = { + give_nickname = nick_with_the_lock + } + } + if = { + limit = { + has_trait = disloyal + } + remove_trait = disloyal + } + else = { + add_trait = loyal + } + scope:bp1_yearly_9047_lover = { + if = { + limit = { + has_trait = disloyal + } + remove_trait = disloyal + } + else = { + add_trait = loyal + } + } + stress_impact = { + humble = medium_stress_impact_gain + disloyal = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = humble + has_trait = disloyal + } + } + } + } + + option = { # What? That's gross + name = bp1_yearly.9047.b + reverse_add_opinion = { + target = scope:bp1_yearly_9047_lover + modifier = hurt_opinion + opinion = -25 + } + stress_impact = { + loyal = major_stress_impact_gain + lustful = major_stress_impact_gain + sadistic = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = loyal + has_trait = lustful + has_trait = sadistic + } + } + } + } +} + +######################################### +# Wrestling a rival # +# by James Beaumont # +# 9048 # +######################################### + +bp1_yearly.9048 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9048.t + desc = bp1_yearly.9048.desc + theme = love + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:bp1_yearly_9048_nemesis + animation = personality_irrational + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available = yes + OR = { # Is interested in war and fighting to some extent + perks_in_martial_lifestyle >= 2 + has_trait = education_martial_prowess + } + any_relation = { + type = nemesis + is_available_ai_adult = yes + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = sadistic + } + } + NOT = { has_character_flag = had_event_bp1_yearly_9048 } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_relation = { + type = nemesis + limit = { + is_available_ai_adult = yes + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = sadistic + } + } + save_scope_as = bp1_yearly_9048_nemesis + } + add_character_flag = had_event_bp1_yearly_9048 + } + + option = { # U wot m8 + name = bp1_yearly.9048.a + if = { + limit = { + root.faith = { trait_is_virtue = brave } + } + add_piety = medium_piety_gain + } + duel = { + skill = prowess + target = scope:bp1_yearly_9048_nemesis + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + add_prestige = medium_prestige_gain + trigger_event = bp1_yearly.9049 + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + send_interface_toast = { + title = 9048_you_lose + left_icon = root + right_icon = scope:bp1_yearly_9048_nemesis + add_prestige = minor_prestige_loss + increase_wounds_no_death_effect = { REASON = duel } + } + } + } + stress_impact = { + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = patient + has_trait = calm + has_trait = craven + } + } + modifier = { + add = 10 + OR = { + has_trait = brave + has_trait = arrogant + } + } + modifier = { + add = 10 + prowess >= scope:bp1_yearly_9048_nemesis.prowess + NOT = { has_trait = craven } + } + } + } + + option = { # Don't hit me! + name = bp1_yearly.9048.b + add_prestige = minor_prestige_loss + if = { + limit = { + root.faith = { trait_is_virtue = brave } + } + add_piety = minor_piety_loss + } + stress_impact = { + brave = major_stress_impact_gain + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = arrogant + } + } + } + } +} + +# Follow-up event, bite a chunk out of them? + +bp1_yearly.9049 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9049.t + desc = bp1_yearly.9049.desc + theme = love + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:bp1_yearly_9048_nemesis + animation = shock + } + + weight_multiplier = { + base = 1 + } + + immediate = { + scope:bp1_yearly_9048_nemesis = { + increase_wounds_no_death_effect = { REASON = duel } + } + } + + option = { # Say goodbye to your flesh + name = bp1_yearly.9049.a + give_nickname = nick_irontooth + scope:bp1_yearly_9048_nemesis = { + increase_wounds_effect = { REASON = duel } + } + stress_impact = { + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + forgiving = massive_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = patient + has_trait = calm + has_trait = craven + has_trait = forgiving + } + } + } + } + + option = { # This rivalry is over + name = bp1_yearly.9049.b + remove_relation_nemesis = scope:bp1_yearly_9048_nemesis + stress_impact = { + brave = major_stress_impact_gain + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = major_stress_impact_gain + forgiving = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = arrogant + } + } + modifier = { + add = 10 + has_trait = forgiving + } + } + } + + option = { # This rivalry is over... forever + name = bp1_yearly.9049.c + trigger = { + has_trait = vengeful + } + scope:bp1_yearly_9048_nemesis = { + death = { + killer = root + death_reason = death_duel + } + } + stress_impact = { + just = major_stress_impact_gain + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + vengeful = major_stress_impact_loss + wrathful = major_stress_impact_loss + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = just + has_trait = patient + has_trait = calm + } + } + } + } +} + +######################################### +# Sharing war stories # +# by James Beaumont # +# 9050 # +######################################### + +bp1_yearly.9050 = { + type = character_event + content_source = dlc_006 + title = bp1_yearly.9050.t + desc = bp1_yearly.9050.desc + theme = martial + left_portrait = { + character = root + animation = rage + } + right_portrait = { + character = scope:bp1_yearly_9050_friend + animation = shock + } + + weight_multiplier = { + base = 1 + } + + trigger = { + has_dlc_feature = friends_and_foes + is_available_adult = yes + any_memory = { + has_memory_category = war + has_memory_category = positive + } + any_relation = { + type = friend + is_available_ai_adult = yes + OR = { + root = { + has_royal_court = yes + has_court_type = court_warlike + } + has_trait = education_martial_prowess + has_trait = education_martial + has_trait = brave + } + any_memory = { + has_memory_category = war + has_memory_category = positive + } + } + NOT = { has_character_flag = had_event_bp1_yearly_9050 } + } + + immediate = { + add_character_flag = had_event_bp1_yearly_9050 + random_memory = { + limit = { + has_memory_category = war + has_memory_category = positive + } + save_scope_as = bp1_yearly_9050_my_memory + } + random_relation = { + type = friend + limit = { + is_available_ai_adult = yes + OR = { + root = { + has_royal_court = yes + has_court_type = court_warlike + } + has_trait = education_martial_prowess + has_trait = education_martial + has_trait = brave + } + any_memory = { + has_memory_category = war + has_memory_category = positive + } + } + save_scope_as = bp1_yearly_9050_friend + random_memory = { + limit = { + has_memory_category = war + has_memory_category = positive + } + save_scope_as = bp1_yearly_9050_friend_memory + } + } + } + + option = { # Hahaha, what a story bp1_yearly_9050_friend + name = bp1_yearly.9050.a + reverse_add_opinion = { + target = scope:bp1_yearly_9050_friend + modifier = flattered_opinion + opinion = 25 + } + stress_impact = { + brave = major_stress_impact_gain + impatient = major_stress_impact_gain + wrathful = major_stress_impact_gain + arrogant = major_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = brave + has_trait = impatient + has_trait = wrathful + has_trait = arrogant + } + } + } + } + + option = { # MY story is clearly better + name = bp1_yearly.9050.b + reverse_add_opinion = { + target = scope:bp1_yearly_9050_friend + modifier = insult_opinion + opinion = -25 + } + duel = { + skill = martial + target = scope:bp1_yearly_9050_friend + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = 2.5 + } + add_prestige = medium_prestige_gain + } + 50 = { + compare_modifier = { + value = scope:duel_value + multiplier = -2.5 + } + add_prestige = medium_prestige_loss + } + } + stress_impact = { + patient = medium_stress_impact_gain + calm = medium_stress_impact_gain + craven = medium_stress_impact_gain + forgiving = massive_stress_impact_gain + loyal = massive_stress_impact_gain + } + ai_chance = { + base = 10 + modifier = { + add = -10 + OR = { + has_trait = patient + has_trait = calm + has_trait = craven + has_trait = forgiving + has_trait = loyal + } + } + } + } +} diff --git a/N3OW/events/yearly_events/court_yearly_events.txt b/N3OW/events/yearly_events/court_yearly_events.txt new file mode 100644 index 00000000..05e6e2d5 --- /dev/null +++ b/N3OW/events/yearly_events/court_yearly_events.txt @@ -0,0 +1,6399 @@ +namespace = court_yearly + +##################################### +# Growing Debauchery # +# by Sean Hughes # +# 1000-1001 # +##################################### + +scripted_trigger court_1000_valid_child = { + is_courtier_of = root + age >= 16 + OR = { + can_be_drunkard = yes + can_be_hashishiyah = yes + can_be_rakish = yes + } + NOR = { + has_trait = drunkard + has_trait = hashishiyah + has_trait = rakish + } +} + +scripted_effect court_1000_gain_debauchery_trait = { + if = { + limit = { scope:debauchery_type = flag:hashishiyah } + add_trait = hashishiyah + } + else_if = { + limit = { scope:debauchery_type = flag:drunkard } + add_trait = drunkard + } + else_if = { + limit = { scope:debauchery_type = flag:rakish } + add_trait = rakish + } +} + +scripted_trigger court_1001_valid_debaucher = { + is_courtier_of = root + age >= 16 + exists = scope:debauchery_type + OR = { + AND = { + scope:debauchery_type = flag:hashishiyah + can_be_hashishiyah = yes + } + AND = { + scope:debauchery_type = flag:drunkard + can_be_drunkard = yes + } + AND = { + scope:debauchery_type = flag:rakish + can_be_rakish = yes + } + } +} + +court_yearly.1000 = { + type = character_event + title = court.1000.t + desc = { + desc = court.1000.desc.opening + first_valid = { + triggered_desc = { + trigger = { scope:debauchery_type = flag:drunkard } + desc = court.1000.desc.drunkard + } + triggered_desc = { + trigger = { scope:debauchery_type = flag:hashishiyah } + desc = court.1000.desc.hashishiyah + } + triggered_desc = { + trigger = { scope:debauchery_type = flag:rakish } + desc = court.1000.desc.rakish + } + } + desc = court.1000.desc.ending + } + theme = court + left_portrait = { + character = root + animation = stress + } + right_portrait = { + character = scope:child + triggered_animation = { + trigger = { + scope:debauchery_type = flag:drunkard + } + animation = drink + } + triggered_animation = { + trigger = { + scope:debauchery_type = flag:hashishiyah + } + animation = personality_irrational + } + triggered_animation = { + trigger = { + scope:debauchery_type = flag:rakish + } + animation = flirtation + } + } + override_background = { + trigger = { + OR = { + scope:debauchery_type = flag:drunkard + scope:debauchery_type = flag:rakish + } + } + reference = tavern + } + override_background = { + trigger = { + scope:debauchery_type = flag:hashishiyah + } + reference = bp1_wine_cellar + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_child = { + court_1000_valid_child = yes + } + NOT = { has_character_flag = court_1000_discouraged_debauchery } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + random_child = { + limit = { + court_1000_valid_child = yes + } + save_scope_as = child + random_list = { + 50 = { + trigger = { can_be_drunkard = yes } + modifier = { + factor = 0.1 + OR = { + faith = { trait_is_sin = drunkard } + religion = religion:islam_religion + } + } + save_scope_value_as = { + name = debauchery_type + value = flag:drunkard + } + } + 40 = { + trigger = { can_be_hashishiyah = yes } + modifier = { + factor = 0.1 + faith = { trait_is_sin = hashishiyah } + } + save_scope_value_as = { + name = debauchery_type + value = flag:hashishiyah + } + } + 10 = { + trigger = { can_be_rakish = yes } + modifier = { + factor = 0.1 + faith = { trait_is_virtue = lustful } + } + save_scope_value_as = { + name = debauchery_type + value = flag:rakish + } + } + } + } + } + + # Option A: Publicly reprimand/humilite your child to make them stop + option = { + name = court.1000.a + scope:child = { + add_prestige_level = -1 + add_opinion = { + modifier = angry_opinion + target = root + opinion = -50 + } + } + custom_tooltip = court.1000.a.tt + hidden_effect = { + add_character_flag = { + flag = court_1000_discouraged_debauchery + years = 30 + } + } + } + + # Option B: Give your child a title or court position to try and keep them occupied + option = { + name = court.1000.b + trigger = { + any_held_title = { + title_tier = county + is_landless_type_title = no + count >= 2 + } + } + + random_held_title = { + title_tier = county + limit = { + is_landless_type_title = no + } + save_scope_as = granted_title + } + + create_title_and_vassal_change = { + type = granted + save_scope_as = change + } + scope:granted_title = { + change_title_holder = { + holder = scope:child + change = scope:change + } + } + resolve_title_and_vassal_change = scope:change + scope:child = { + random_list = { + 50 = { + desc = court.1000.b.success + ai_value_modifier = { + ai_energy = 0.5 + ai_greed = 0.2 + ai_honor = 0.2 + } + add_stewardship_skill = 2 + } + 50 = { + desc = court.1000.b.failure + ai_value_modifier = { + ai_energy = -0.5 + ai_greed = -0.2 + ai_honor = -0.2 + } + court_1000_gain_debauchery_trait = yes + } + } + } + } + + # Option C: Let the behavior continue unpunished, maybe joning in from time to time + option = { + name = court.1000.c + scope:child = { + court_1000_gain_debauchery_trait = yes + add_stress = medium_stress_loss + } + add_stress = medium_stress_loss + custom_tooltip = court.1000.c.tt + + # Other courtiers might be tempted by the unmoderated indulgence of vices + hidden_effect = { + every_courtier = { + limit = { + this != scope:child + court_1001_valid_debaucher = yes + } + random_list = { + 80 = { + # Nothing happens + + } + 20 = { + ai_value_modifier = { + ai_energy = -0.1 + ai_honor = -0.1 + } + modifier = { + add = 140 + OR = { + AND = { + scope:debauchery_type = flag:drunkard + OR = { + has_trait = gluttonous + has_trait = lifestyle_reveler + } + } + AND = { + scope:debauchery_type = flag:hashishiyah + OR = { + has_trait = gluttonous + has_trait = lazy + } + } + AND = { + scope:debauchery_type = flag:rakish + has_trait = lustful + + } + } + } + modifier = { + factor = 0 + OR = { + has_trait = temperate + has_trait = zealous + has_trait = chaste + } + } + + trigger_event = { + id = court_yearly.1001 + days = { 14 60 } + } + } + } + } + } + } +} + +court_yearly.1001 = { + hidden = yes + + trigger = { + # We are still in the same court as the initial debaucher. + has_royal_court = yes + has_dlc_feature = royal_court + scope:child = { + is_courtier_of = root.court_owner + } + # We are not opposed to debauchery + court_1001_valid_debaucher = yes + } + + immediate = { + court_owner = { + if = { + # If we're important to our liege in some way, gain debauchery trait with a notification send to them. + limit = { + is_of_major_interest_trigger = { CHARACTER = root } + } + root = { save_scope_as = courtier } + send_interface_message = { + type = event_generic_neutral + title = court.1001.title + + root = { + court_1000_gain_debauchery_trait = yes + } + } + } + else = { + # Otherwise we silently gain the trait, in order to avoid notification spam. + root = { + court_1000_gain_debauchery_trait = yes + } + } + } + } +} + +##################################### +# Long Arm of the Law # +# by Sean Hughes # +# 1020 # +##################################### + +scripted_trigger court_1020_suitable_guest_trigger = { + # Of suitable age. + age >= 16 + # Lacks the principle award. + save_temporary_scope_as = fugitive_check + NOT = { + root = { has_strong_hook = scope:fugitive_check } + } +} + +scripted_effect court_1020_remove_opinion_from_root_modifier = { + if = { + limit = { + has_opinion_modifier = { + modifier = $OPINION_MODIFIER$ + target = root + } + } + remove_opinion = { + modifier = $OPINION_MODIFIER$ + target = root + } + } +} + +court_yearly.1020 = { + type = letter_event + opening = court.1020.opening + desc = { + desc = court.1020.desc + first_valid = { + triggered_desc = { + trigger = {scope:compensation = flag:forgive_this} + desc = court.1020.desc.forgive_this + } + triggered_desc = { + trigger = {scope:compensation = flag:forgive_all} + desc = court.1020.desc.forgive_all + } + triggered_desc = { + trigger = {scope:compensation = flag:gold} + desc = court.1020.desc.gold + } + triggered_desc = { + trigger = {scope:compensation = flag:opinion} + desc = court.1020.desc.opinion + } + } + } + sender = scope:foreign_ruler + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_pool_guest = { court_1020_suitable_guest_trigger = yes } + any_neighboring_and_across_water_top_liege_realm = { + exists = holder + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + random_pool_guest = { + limit = { court_1020_suitable_guest_trigger = yes } + save_scope_as = fugitive + } + random_neighboring_and_across_water_top_liege_realm = { + holder = { save_scope_as = foreign_ruler } + } + scope:foreign_ruler = { + random_list = { + 33 = { + ai_value_modifier = { + ai_vengefulness = 0.15 + ai_greed = 0.1 + } + if = { + limit = { + root = { is_ai = no } + scope:foreign_ruler = { + OR = { + has_opinion_modifier = { + modifier = hate_opinion + target = root + } + has_opinion_modifier = { + modifier = refusal_opinion + target = root + } + has_opinion_modifier = { + modifier = suspicion_opinion + target = root + } + has_opinion_modifier = { + modifier = disappointed_opinion + target = root + } + has_opinion_modifier = { + modifier = insult_opinion + target = root + } + has_opinion_modifier = { + modifier = angry_opinion + target = root + } + has_opinion_modifier = { + modifier = declared_war + target = root + } + has_opinion_modifier = { + modifier = declared_war_on_son_daughter + target = root + } + } + } + } + save_scope_value_as = { + name = compensation + value = flag:forgive_all + } + } + else = { + save_scope_value_as = { + name = compensation + value = flag:forgive_this + } + } + } + 33 = { + ai_value_modifier = { + ai_greed = -0.3 + } + save_scope_value_as = { + name = compensation + value = flag:gold + } + } + 33 = { + ai_value_modifier = { + ai_compassion = 0.2 + ai_honor = 0.1 + } + if = { + limit = { + root = { is_ai = no } + scope:foreign_ruler = { + OR = { + has_opinion_modifier = { + modifier = hate_opinion + target = root + } + has_opinion_modifier = { + modifier = refusal_opinion + target = root + } + has_opinion_modifier = { + modifier = suspicion_opinion + target = root + } + has_opinion_modifier = { + modifier = disappointed_opinion + target = root + } + has_opinion_modifier = { + modifier = insult_opinion + target = root + } + has_opinion_modifier = { + modifier = angry_opinion + target = root + } + has_opinion_modifier = { + modifier = declared_war + target = root + } + has_opinion_modifier = { + modifier = declared_war_on_son_daughter + target = root + } + } + } + } + save_scope_value_as = { + name = compensation + value = flag:forgive_all + } + } + else = { + save_scope_value_as = { + name = compensation + value = flag:opinion + } + } + } + } + } + } + + # Option A: Agree to the foreign ruler's demand and hand over the fugitive + option = { + name = court.1020.a + + if = { + limit = { + scope:compensation = flag:forgive_all + } + scope:foreign_ruler = { + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = hate_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = refusal_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = suspicion_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = disappointed_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = insult_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = angry_opinion } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = declared_war } + court_1020_remove_opinion_from_root_modifier = { OPINION_MODIFIER = declared_war_on_son_daughter } + } + } + else_if = { + limit = { + scope:compensation = flag:gold + } + scope:foreign_ruler = { + pay_treasury_or_gold = { + target = root + value = minor_treasury_or_gold_value + } + } + } + else_if = { + limit = { + scope:compensation = flag:opinion + } + scope:foreign_ruler = { + add_opinion = { + modifier = pleased_opinion + target = root + opinion = 20 + } + } + } + + rightfully_imprison_character_effect = { + TARGET = scope:fugitive + IMPRISONER = scope:foreign_ruler + } + } + + # Option B: Offer the fugitive your protection, pissing off the foreign ruler + option = { + name = court.1020.b + if = { + limit = { + can_add_hook = { + target = scope:fugitive + type = loyalty_hook + } + } + add_hook = { + type = loyalty_hook + target = scope:fugitive + } + } + scope:foreign_ruler = { + add_opinion = { + modifier = refusal_opinion + target = root + opinion = -30 + } + } + } + + # Option C: Warn the fugitive and let them escape + option = { + name = court.1020.c + scope:fugitive = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 10 + } + select_and_move_to_pool_effect = yes + } + scope:foreign_ruler = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -5 + } + } + } +} + + +################################################## +# Competitive Cronying +# by Ewan Cowhig Croft +# 2001 - 2010 +################################################## + +scripted_trigger court_2001_valid_toadies_available_trigger = { + # Standard checks. + is_available_ai_adult = yes + # Lacks a personality that would actively stop them from toadying: + NOR = { + has_trait = honest + has_trait = arrogant + has_trait = shy + has_trait = content + } + # Isn't immediately related to you. + NOR = { + any_close_or_extended_family_member = { this = root } + any_spouse = { this = root } + } + # And likes you enough to want to suck up to you. + opinion = { + target = root + value >= low_negative_opinion + } +} + +court_yearly.2001 = { + type = character_event + title = court.2001.t + desc = court.2001.desc + theme = court + left_portrait = { + character = scope:crony_a + animation = disapproval + } + right_portrait = { + character = scope:crony_b + animation = dismissal + } + + cooldown = { years = 10 } + + trigger = { + # DLC check. + has_royal_court = yes + has_dlc_feature = royal_court + # Standard checks. + is_available_at_peace_adult = yes + is_landed = yes + # At least two courtiers or guests are suitable toadies. + any_courtier_or_guest = { + count >= 2 + court_2001_valid_toadies_available_trigger = yes + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + # Grab two random toadies. + random_courtier_or_guest = { + limit = { court_2001_valid_toadies_available_trigger = yes } + weight = { + base = 1 + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + opinion_modifier = { + opinion_target = root + # Cap it a bit so we don't always have opinion gain with characters that already love you. + max = 50 + } + } + save_scope_as = crony_a + } + random_courtier_or_guest = { + limit = { + court_2001_valid_toadies_available_trigger = yes + this != scope:crony_a + } + weight = { + base = 1 + is_of_minor_interest_to_weight_up_modifier = { CHARACTER = root } + is_of_major_interest_to_weight_up_modifier = { CHARACTER = root } + } + save_scope_as = crony_b + } + } + + # Honestly, you could both try harder. + option = { + name = court.2001.a + trigger = { + NOT = { has_trait = sadistic } + } + + # Gain opinion with the lackeys as they hard-core focus on sucking up to ye. + reverse_add_opinion = { + target = scope:crony_a + modifier = shamed_me_opinion + opinion = 40 + } + reverse_add_opinion = { + target = scope:crony_b + modifier = shamed_me_opinion + opinion = 40 + } + # Add a little CGV for all these obsequious toadies constantly making a big deal about you. + change_current_court_grandeur = miniscule_court_grandeur_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = 0.25 + ai_compassion = -0.5 + } + } + } + + # Whoever bows lowest gets a shiny coin. + option = { + name = court.2001.a.sadistic + trigger = { has_trait = sadistic } + + # Gain opinion with the lackeys as they hard-core focus on sucking up to ye. + reverse_add_opinion = { + target = scope:crony_a + modifier = shamed_me_opinion + opinion = 60 + } + reverse_add_opinion = { + target = scope:crony_b + modifier = shamed_me_opinion + opinion = 60 + } + # And toss the coin at random. + random_list = { + 50 = { + desc = court.2001.a.sadistic.crony_a_wins + send_interface_toast = { + type = event_toast_effect_neutral + title = court.2001.a.sadistic.crony_a_wins + left_icon = scope:crony_a + pay_short_term_gold = { + target = scope:crony_a + gold = 1 + } + } + } + 50 = { + desc = court.2001.a.sadistic.crony_b_wins + send_interface_toast = { + type = event_toast_effect_neutral + title = court.2001.a.sadistic.crony_b_wins + left_icon = scope:crony_b + pay_short_term_gold = { + target = scope:crony_b + gold = 1 + } + } + } + } + # Add a little CGV for all these obsequious toadies constantly making a big deal about you. + change_current_court_grandeur = minor_court_grandeur_gain + + stress_impact = { + arrogant = miniscule_stress_impact_loss + humble = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 0.5 + ai_greed = 0.25 + ai_compassion = -0.5 + } + } + } + + # These empty platitudes are disgusting! + option = { + name = court.2001.b + + # Gain prestige for renouncing their lackeying. + add_prestige = minor_prestige_gain + # Lose opinion with both. + reverse_add_opinion = { + target = scope:crony_a + modifier = hurt_opinion + opinion = -25 + } + reverse_add_opinion = { + target = scope:crony_b + modifier = hurt_opinion + opinion = -25 + } + + stress_impact = { + humble = miniscule_stress_impact_loss + arrogant = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = -0.25 + ai_sociability = -0.25 + ai_compassion = -0.25 + } + } + } + + # There's one obvious way you haven't tried... + option = { + name = court.2001.c + + # Both pay you cash-monies. + scope:crony_a = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + scope:crony_b = { + pay_short_term_gold = { + target = root + gold = minor_gold_value + } + } + # Both dislike you for the direct demand. + reverse_add_opinion = { + target = scope:crony_a + modifier = respect_opinion + opinion = -35 + } + reverse_add_opinion = { + target = scope:crony_b + modifier = respect_opinion + opinion = -35 + } + + stress_impact = { + greedy = miniscule_stress_impact_loss + generous = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 0.75 + ai_compassion = -0.25 + } + } + } + + # This is beneath me. + option = { + name = court.2001.d + + # Gain some fame for your straight-talking. + add_prestige_experience = medium_prestige_gain + + stress_impact = { + shy = miniscule_stress_impact_loss + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_sociability = -0.5 + } + } + } +} + +######################### +# Scrounger Life # +# by Claudia Baldassi # +# 6040-6041 # +######################### + +scripted_trigger court_6040_has_valid_scrounger_trigger = { + is_adult = yes + NOR = { + is_close_family_of = root + is_councillor_of = root + } + OR = { + has_trait = lazy + has_trait = greedy + has_trait = gluttonous + has_trait = drunkard + has_trait = comfort_eater + has_trait = profligate + has_trait = rakish + has_trait = hashishiyah + } + OR = { + learning >= 8 + diplomacy >= 8 + } +} + +# You have a useless scrounger at court, but if supported long enough, he turns out to be a great poet (might become a Great Person?) # + + +court_yearly.6040 = { + type = character_event + title = court.6040.t + desc = court.6040.desc + theme = court + left_portrait = { + character = scope:scrounger + animation = happiness + } + right_portrait = { + character = root + animation = disapproval + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_courtier_or_guest = { + court_6040_has_valid_scrounger_trigger = yes + } + NOT = { + has_character_flag = court_6040_cooldown + } + } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + add_character_flag = { + flag = court_6040_cooldown + years = 20 + } + random_courtier_or_guest = { + limit = { + court_6040_has_valid_scrounger_trigger = yes + } + save_scope_as = scrounger + } + personality_check_shared_good_ruler_traits_effect = { + CHAR1 = root + CHAR2 = scope:scrounger + STRICT = no + } + set_variable = court_6040_best_looking_var + if = { + limit = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_jester_court_position + limit = { is_available_ai_adult = yes } + save_scope_as = jester + } + } + } + + after = { + remove_variable = court_6040_best_looking_var + } + + # Option A: make them earn their living by making them court jester + option = { + name = court.6040.a + trigger = { + scope:scrounger = { can_be_employed_as = court_jester_court_position } + OR = { + can_employ_court_position_type = court_jester_court_position + exists = scope:jester + } + } + court_position_grant_effect = { POS = court_jester CANDIDATE = scope:scrounger EMPLOYER = root } + change_current_court_grandeur = minor_court_grandeur_gain + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 5 + } + } + ai_chance = { + base = 100 + } + } + + # Option B: tolerate them + option = { + name = court.6040.b + remove_treasury_or_gold = tiny_treasury_or_gold_value + add_prestige = minor_prestige_gain + if = { + limit = { + NOR = { + has_relation_potential_friend = scope:scrounger + has_relation_friend = scope:scrounger + } + can_set_relation_potential_friend_trigger = { CHARACTER = scope:scrounger } + } + set_relation_potential_friend = scope:scrounger + } + else_if = { + limit = { + has_relation_potential_friend = scope:scrounger + can_set_relation_friend_trigger = { CHARACTER = scope:scrounger } + } + set_relation_friend = { reason = friend_amusing_antics target = scope:scrounger } + } + scope:scrounger = { + target_weight_modifier_effect = { + VALUE = 2 + } + } + trigger_event = { + id = court_yearly.6041 + days = 180 + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = 0.5 + ai_sociability = 0.5 + } + modifier = { + treasury_or_gold <= tiny_treasury_or_gold_value + add = -200 + } + } + } + + # Option C: kick them out of court + option = { + name = court.6040.c + remove_courtier_or_guest = { + character = scope:scrounger + } + if = { + limit = { + NOR = { + has_relation_potential_rival = scope:scrounger + has_relation_rival = scope:scrounger + } + can_set_relation_potential_rival_trigger = { CHARACTER = scope:scrounger } + } + set_relation_potential_rival = scope:scrounger + } + else_if = { + limit = { + has_relation_potential_rival = scope:scrounger + can_set_relation_rival_trigger = { CHARACTER = scope:scrounger } + } + set_relation_rival = { + target = scope:scrounger + reason = rival_scrounger_kicked_out_of_court + } + } + add_stress = medium_stress_loss + ai_chance = { + base = 100 + ai_value_modifier = { + ai_compassion = -0.5 + ai_greed = 0.25 + } + } + } +} + +court_yearly.6041 = { + type = character_event + title = court.6040.t + desc = court.6041.desc + theme = court + left_portrait = { + character = root + animation = admiration + } + right_portrait = { + character = scope:scrounger + animation = happiness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + exists = scope:scrounger #checking that they are still alive + scope:scrounger = { is_alive = yes } + } + + immediate = { + #poet trait is required for court poet position + hidden_effect = { + scope:scrounger = { + if = { + limit = { + NOT = { has_trait = lifestyle_poet } + } + add_trait = lifestyle_poet + } + } + } + if = { + limit = { + employs_court_position = court_poet_court_position + any_court_position_holder = { + type = court_poet_court_position + } + } + random_court_position_holder = { + type = court_poet_court_position + save_scope_as = c_poet + } + } + } + + # Option A: + option = { + name = court.6041.a + if = { + limit = { + exists = scope:c_poet + } + revoke_court_position = { + recipient = scope:c_poet + court_position = court_poet_court_position + } + } + employ_character_as_position_in_current_scope_court_effect = { + CHARACTER = scope:scrounger + POSITION = court_poet + } + ai_chance = { + base = 40 + modifier = { + add = 15 + can_employ_court_position_type = court_poet_court_position + } + modifier = { + add = -25 + short_term_gold < minor_gold_value + } + } + } + + # Option B: + option = { + name = court.6041.b + remove_short_term_gold = medium_gold_value + scope:scrounger = { + duel = { + skill = diplomacy + value = average_skill_rating + 50 = { + desc = court.6041.b.failure + compare_modifier = { + value = scope:duel_value + multiplier = -2 + } + root = { + send_interface_toast = { + type = event_toast_effect_bad + title = court.6041.b.failure.tt + left_icon = scope:scrounger + stress_impact = { + ambitious = medium_stress_impact_gain + } + } + } + } + 10 = { + desc = court.6041.b.success + compare_modifier = { + value = scope:duel_value + multiplier = 2 + } + create_inspiration = book_inspiration + custom_tooltip = inspire_interaction_book + root = { + send_interface_toast = { + type = event_toast_effect_good + title = court.6041.b.success.tt + left_icon = scope:scrounger + } + } + } + } + } + + ai_chance = { + base = 40 + modifier = { + add = 15 + OR = { + has_trait = ambitious + has_trait = diligent + } + } + modifier = { + add = -25 + short_term_gold < medium_gold_value + } + } + } + + # Option C: No further investment + option = { + name = court.6041.c + scope:scrounger = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -20 + } + } + + ai_chance = { + base = 50 + modifier = { + add = 15 + has_trait = greedy + } + modifier = { + add = 25 + short_term_gold < medium_gold_value + } + } + } +} + +##################################### +# Lonely Days # +# by Linnéa Thimrén # +##################################### + +#Your Friend is struggling with feeling isolated/lonely due to your official duties, make time for them or find other ways to make them feel better +scripted_trigger court_5001_basic_friend_trigger = { + is_courtier_of = root + is_available_ai = yes +} + +scripted_trigger court_5001_basic_marriage_trigger = { + is_married = no + is_adult = yes + is_betrothed = no + can_marry_trigger = yes + is_concubine = no +} + +court_yearly.5001 = { + type = character_event + title = court.5001.t + desc = court.5001.desc + theme = court + left_portrait = { + character = scope:friend + animation = sadness + } + right_portrait = { + character = scope:match_for_friend + animation = flirtation_left + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_flag = had_event_court_5001 } + any_relation = { + type = friend + court_5001_basic_friend_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 0.25 + any_relation = { #More likely if they have no cool minor titles + type = friend + court_5001_basic_friend_trigger = yes + has_any_court_position = no + } + } + modifier = { + add = 0.25 + any_relation = { #Slightly more likely if you have a pet companion and they don't + type = friend + court_5001_basic_friend_trigger = yes + root = { + has_cat_or_dog_trigger = yes + } + has_cat_or_dog_trigger = no + } + } + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5001 + years = 10 + } + random_relation = { + type = friend + limit = { + court_5001_basic_friend_trigger = yes + } + weight = { + base = 1 + modifier = { + add = -1 + has_any_court_position = yes + } + modifier = { #More likely to pick an unmarried friend + add = 1 + court_5001_basic_marriage_trigger = yes + save_temporary_scope_as = friend_check + root = { + any_courtier = { + this != scope:friend_check + court_5001_basic_marriage_trigger = yes + can_marry_character_trigger = { CHARACTER = scope:friend_check } + scope:friend_check = { is_attracted_to_gender_of = prev } + } + } + } + } + save_scope_as = friend + } + + #Is there anyone for them to marry? + if = { + limit = { + scope:friend = { + court_5001_basic_marriage_trigger = yes + } + any_courtier = { + this != scope:friend + court_5001_basic_marriage_trigger = yes + can_marry_character_trigger = { CHARACTER = scope:friend } + scope:friend = { is_attracted_to_gender_of = prev } + } + } + random_courtier = { + limit = { + this != scope:friend + court_5001_basic_marriage_trigger = yes + can_marry_character_trigger = { CHARACTER = scope:friend } + scope:friend = { is_attracted_to_gender_of = prev } + } + weight = { + base = 1 + opinion_modifier = { + opinion_target = scope:friend + multiplier = 1 + } + modifier = { #More likely if they're openly lovers + add = 10 + has_relation_lover = scope:friend + NOT = { has_secret_relation_lover = scope:friend } + } + modifier = { #Always a plus if your partner is into you + is_attracted_to_gender_of = scope:friend + add = 5 + } + modifier = { #Let's aim for a similar age + OR = { + age < scope:friend.age_plus_10 + age > scope:friend.age_minus_10 + } + add = 2 + } + } + save_scope_as = match_for_friend + } + } + + + #Can you gift them a cat/dog? We check this here so we keep the story used in script consistent even if they have both a cat and a dog + if = { + limit = { + has_cat_or_dog_trigger = yes + scope:friend = { + has_cat_or_dog_trigger = no + } + } + random_owned_story = { + limit = { + OR = { + story_type = story_cycle_pet_dog + story_type = story_cycle_pet_cat + } + } + save_scope_as = story + } + } + + if = { + limit = { + scope:friend = { has_any_court_position = no } + character_can_be_employed_in_a_court_position_trigger = { + CHARACTER = scope:friend + } + } + mark_court_position_for_employment_effect = { + CHARACTER = scope:friend + } + } + } + + option = { #Make time for them + name = court.5001.a + + #Lose some court grandeur. + change_current_court_grandeur = minor_court_grandeur_loss + + scope:friend = { + add_opinion = { + target = root + modifier = friendliness_opinion + opinion = 20 + } + } + if = { + limit = { + can_set_relation_best_friend_trigger = { CHARACTER = scope:friend } + } + set_relation_best_friend = { reason = best_friend_make_time copy_reason = friend target = scope:friend } + } + } + + option = { #Marry them off + name = court.5001.b + trigger = { + exists = scope:match_for_friend + } + scope:friend = { + marry = scope:match_for_friend + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } + + option = { #Gift them your dog/cat + name = { + trigger = { + scope:story = { story_type = story_cycle_pet_dog } + } + text = court.5001.c_dog + } + name = { + trigger = { + scope:story = { story_type = story_cycle_pet_cat } + } + text = court.5001.c_cat + } + trigger = { + exists = scope:story + } + + if = { + limit = { + scope:story = { story_type = story_cycle_pet_dog } + } + transfer_dog_story_cycle_to_effect = { + CHARACTER = scope:friend + STORY = scope:story + } + } + else = { + transfer_cat_story_cycle_to_effect = { + CHARACTER = scope:friend + STORY = scope:story + } + } + + scope:friend = { + if = { + limit = { #"What am I supposed to do with this??" + OR = { + has_personality_malicious_trigger = yes + AND = { + scope:story = { story_type = story_cycle_pet_cat } + has_character_modifier = cat_story_allergy_modifier + } + AND = { + scope:story = { story_type = story_cycle_pet_dog } + faith = { religion_tag = islam_religion } + } + } + } + add_opinion = { + target = root + modifier = dumped_animal_on_me_opinion + } + } + else = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 15 + } + } + } + } + + option = { #Give them a minor title + name = court.5001.d + trigger = { + exists = scope:court_position_to_fill + } + employ_character_as_marked_court_position_effect = { + CHARACTER = scope:friend + POSITION = scope:court_position_to_fill + } + scope:friend = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + } +} + +##################################### +# The Haunting # +# by Linnéa Thimrén # +##################################### + +# Family member died some time ago and is now rumored to haunt the place +court_yearly.5010 = { + type = character_event + title = court.5010.t + desc = court.5010.desc + theme = court + override_background = { + reference = corridor_night + } + left_portrait = { + character = scope:family_member + animation = sadness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + is_ai = no + location = { + exists = var:possible_haunting + var:possible_haunting = { #The place belongs to the family of the deceased + OR = { + any_close_family_member = { + this = root + } + any_spouse = { + this = root + } + is_grandparent_of = root + is_great_grandparent_of = root + } + } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { #More likely if the death was gruesome + add = 0.75 + location = { + var:possible_haunting = { + had_gruesome_death_trigger = yes + } + } + } + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + location = { + var:possible_haunting = { + save_scope_as = family_member + } + remove_variable = possible_haunting + } + } + + option = { #Dismiss their fears and denounce their superstition + name = court.5010.a + trigger = { + faith = { + NOR = { + has_doctrine = tenet_ancestor_worship + has_doctrine = tenet_adorcism + } + } + } + if = { + limit = { + capital_county = { + NOT = { has_county_modifier = county_dismissed_servants_fear_modifier } + } + } + capital_county = { + add_county_modifier = { + modifier = county_dismissed_servants_fear_modifier + days = 3650 + } + } + } + add_piety = minor_piety_gain + } + + option = { #Encourage them to be respectful and leave the ghost be + name = court.5010.b + trigger = { + faith = { + OR = { + has_doctrine = tenet_ancestor_worship + has_doctrine = tenet_adorcism + } + } + } + if = { + limit = { + capital_county = { + NOT = { has_county_modifier = county_dismissed_servants_fear_modifier } + } + } + capital_county = { + add_county_modifier = { + modifier = county_dismissed_servants_fear_modifier + days = 3650 + } + } + } + add_piety = minor_piety_gain + } + + option = { #Hire someone to investigate and banish the ghost + name = court.5010.c + if = { + limit = { + capital_county = { + NOT = { has_county_modifier = county_acknowledged_servants_fear_modifier } + } + } + capital_county = { + add_county_modifier = { + modifier = county_acknowledged_servants_fear_modifier + days = 3650 + } + } + } + remove_short_term_gold = minor_gold_value + if = { + limit = { + exists = cp:councillor_court_chaplain + } + cp:councillor_court_chaplain = { + add_opinion = { + target = root + modifier = impious_opinion + opinion = -20 + } + } + } + } +} + +##################################### +# Pillow Talk # +# by Linnéa Thimrén # +##################################### + +# Your cat has claimed a courtier's bed +court_yearly.5020 = { + type = character_event + title = court.5020.t + desc = court.5020.desc + theme = court + left_portrait = { + character = scope:courtier + animation = anger + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_flag = had_event_court_5020 } + any_owned_story = { + type = story_cycle_pet_cat + } + any_courtier = { + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 0.5 + modifier = { #More likely if you have a (potential)rival to irritate + add = 0.75 + any_courtier = { + OR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + } + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + add_character_flag = { + flag = had_event_court_5020 + years = 10 + } + random_courtier = { + weight = { #More likely if you dislike each other + opinion_modifier = { + opinion_target = root + multiplier = -0.5 + } + modifier = { + add = 5 + OR = { + has_relation_rival = root + has_relation_potential_rival = root + } + } + ai_value_modifier = { + ai_boldness = 0.75 + } + } + save_scope_as = courtier + } + random_owned_story = { + type = story_cycle_pet_cat + save_scope_as = story + } + } + + option = { #It's the cat's pillow now + name = court.5020.a + if = { + limit = { + NOT = { has_relation_rival = scope:courtier } + } + progress_towards_rival_effect = { + REASON = rival_deposed_for_cat + CHARACTER = scope:courtier + OPINION = default_rival_opinion + } + } + else = { + scope:courtier = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -20 + } + } + } + #Might backfire... + hidden_effect = { + scope:courtier = { + if = { + limit = { + ai_vengefulness >= medium_positive_ai_value + } + random = { + chance = 20 + ai_value_modifier = { + ai_vengefulness = 1 + ai_compassion = -0.5 + } + root = { + trigger_event = { + id = court_yearly.5021 + days = { 50 100 } + } + } + } + } + } + } + } + + option = { #I'll handle it + name = court.5020.b + scope:courtier = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + #Might backfire... Cat runs away + hidden_effect = { + random = { + chance = 20 + add_character_flag = cat_is_dying #Just so no other cat-events trigger in the meantime + trigger_event = { + id = pet_animal.0197 + days = { 50 100 } + } + } + } + } +} + +#The courtier killed the cat +court_yearly.5021 = { + type = character_event + title = court.5020.t + desc = { + desc = court.5021.desc + triggered_desc = { #The things we do for bad jokes... + trigger = { + var:story_cycle_cat_name = flag:cat_name_mittens + } + desc = court.5021.desc_mittens + } + } + theme = court + left_portrait = { + character = scope:courtier + animation = happiness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + exists = scope:story + scope:courtier = { + is_alive = yes + is_courtier_of = root + } + } + + immediate = { + show_as_tooltip = { + remove_cat_story_modifiers_effect = yes + } + scope:courtier = { + hidden_effect = { + add_character_modifier = { + modifier = cat_story_fur_mittens_modifier + years = 10 + } + } + } + } + + option = { + name = { + trigger = { + var:story_cycle_cat_name = flag:cat_name_mittens + } + text = court.5021.a_mittens + } + name = { + trigger = { + NOT = { var:story_cycle_cat_name = flag:cat_name_mittens } + } + text = court.5021.a + } + } + + option = { #Throw them in jail! + name = court.5021.b + imprison_character_effect = { + TARGET = scope:courtier + IMPRISONER = root + } + } + + option = { #Give them a similar fate + name = court.5021.c + execute_prisoner_effect = { + VICTIM = scope:courtier + EXECUTIONER = root + } + } + + after = { + scope:story = { + hidden_effect = { end_story = yes } + } + } +} + +##################################### +# The Ballad of the Garlic King # +# by Claudia Baldassi # +# 6030 # +##################################### + +# The adventures of a foolish ruler have become really popular among wandering minstrels. The king of the story looks too much like you for comfort. # + +scripted_trigger court_6030_valid_courtier_trigger = { + is_available_ai_adult = yes + OR = { + has_relation_rival = root + opinion = { + target = root + value < 0 + } + has_trait = intellect_bad + has_trait = dull + } +} + +court_yearly.6030 = { + type = character_event + title = court.6030.t + desc = court.6030.desc + theme = court + left_portrait = { + character = root + animation = anger + } + right_portrait = { + character = scope:6030_courtier + animation = happiness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + highest_held_title_tier >= tier_kingdom + is_adult = yes + NOT = { + has_character_flag = court_6030_cooldown + } + any_courtier_or_guest = { + court_6030_valid_courtier_trigger = yes + } + } + + weight_multiplier = { + base = 0.8 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_diplomatic } + } + + immediate = { + add_character_flag = court_6030_cooldown + random_courtier_or_guest = { + limit = { + court_6030_valid_courtier_trigger = yes + } + save_scope_as = 6030_courtier + } + } + + # Option F: I don't care + option = { + name = court.6030.f + if = { + limit = { + NOT = { + has_trait = reclusive + } + } + add_stress = medium_stress_gain + } + random = { + chance = 15 + if = { + limit = { + is_female = yes + } + give_nickname = nick_garlic_queen + } + else = { + give_nickname = nick_the_garlic + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_energy = -0.5 + ai_sociability = -0.5 + } + modifier = { + has_trait = reclusive + add = 25 + } + } + } + + # Option D: prohibit and arrest + option = { + name = court.6030.d + custom_tooltip = court.6030.d.tt + trigger = { + OR = { + has_trait = wrathful + has_trait = vengeful + has_trait = callous + has_trait = irritable + has_trait = arrogant + } + } + imprison = { + target = scope:6030_courtier + type = dungeon + } + add_prestige = minor_prestige_gain + add_dread = major_dread_gain + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = scared_opinion + opinion = -20 + } + } + stress_impact = { + just = medium_stress_impact_gain + gregarious = medium_stress_impact_gain + shy = medium_stress_impact_gain + craven = medium_stress_impact_gain + humble = medium_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_energy = 0.25 + } + modifier = { + has_trait = just + add = -25 + } + modifier = { + has_trait = gregarious + add = -25 + } + modifier = { + has_trait = shy + add = -25 + } + modifier = { + has_trait = craven + add = -25 + } + modifier = { + has_trait = humble + add = -25 + } + modifier = { + has_trait = compassionate + add = -50 + } + } + } + + # Option A: laugh it off + option = { + name = court.6030.a + trigger = { + OR = { + has_trait = gregarious + has_trait = forgiving + has_trait = humble + } + NOR = { + has_trait = shy + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = craven + has_trait = reclusive + } + } + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = amused_opinion + opinion = 10 + } + } + add_stress = medium_stress_loss + ai_chance = { + base = 100 + ai_value_modifier = { + ai_sociability = 1 + } + } + } + + # Option B: this is so humiliating... + option = { + name = court.6030.b + trigger = { + OR = { + has_trait = shy + has_trait = depressed_1 + has_trait = depressed_genetic + has_trait = craven + has_trait = reclusive + } + NOR = { + has_trait = gregarious + has_trait = forgiving + has_trait = humble + } + } + add_prestige = medium_prestige_loss + random = { + chance = 15 + if = { + limit = { + is_female = yes + } + give_nickname = nick_garlic_queen + } + else = { + give_nickname = nick_the_garlic + } + } + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = amused_opinion + opinion = 15 + } + } + add_stress = medium_stress_gain + ai_chance = { + base = 80 + ai_value_modifier = { + ai_sociability = -1 + } + } + } + + # Option C: lash out at your court + option = { + name = court.6030.c + trigger = { + OR = { + has_trait = wrathful + has_trait = irritable + has_trait = arbitrary + has_trait = vengeful + has_trait = callous + } + } + add_dread = medium_dread_gain + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = scared_opinion + opinion = -10 + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_energy = 0.25 + ai_vengefulness = 0.5 + } + } + } + + # Option E: heads will roll... + option = { + name = court.6030.e + trigger = { + OR = { + has_trait = wrathful + has_trait = sadistic + has_trait = torturer + has_trait = vengeful + has_trait = giant + has_trait = physique_good + has_trait = berserker + } + } + custom_tooltip = court.6030.e.tt + random_list = { + 20 = { + scope:6030_courtier = { + death = { + death_reason = death_beaten + killer = root + } + } + } + 50 = { + scope:6030_courtier = { + increase_wounds_effect = { REASON = beaten } + } + } + 30 = { + progress_towards_rival_effect = { + REASON = rival_punched_for_song + CHARACTER = scope:6030_courtier + OPINION = -30 + } + reverse_add_opinion = { + target = scope:6030_courtier + modifier = scared_opinion + opinion = -50 + } + } + } + every_courtier_or_guest = { + custom = court_6000_all_courtiers_and_guests + add_opinion = { + target = root + modifier = scared_opinion + opinion = -25 + } + } + stress_impact = { + eccentric = medium_stress_impact_loss + shy = major_stress_impact_gain + compassionate = major_stress_impact_gain + patient = major_stress_impact_gain + } + add_dread = major_dread_gain + ai_chance = { + base = 100 + ai_value_modifier = { + ai_vengefulness = 1 + ai_rationality = -0.5 + } + } + } +} + +######################### +# Captured Beast +# by George Luff +######################### + +scripted_trigger court_7100_huntsmaster_trigger = { + has_court_position = master_of_hunt_court_position + is_available_healthy_ai_adult = yes +} + +scripted_effect court_7100_animal_bonus_effect = { + # Gains modifier based on animal + if = { + limit = { + scope:captured_animal = flag:wolf + } + add_character_modifier = { + modifier = exotic_pet_wolf + years = 10 + } + } + else_if = { + limit = { + scope:captured_animal = flag:bear + } + add_character_modifier = { + modifier = exotic_pet_bear + years = 10 + } + } + else_if = { + limit = { + scope:captured_animal = flag:lion + } + add_character_modifier = { + modifier = exotic_pet_lion + years = 10 + } + } + else_if = { + limit = { + scope:captured_animal = flag:tiger + } + add_character_modifier = { + modifier = exotic_pet_tiger + years = 10 + } + } +} + +### Exotic Animal event +court_yearly.7100 = { + type = character_event + title = court.7100.title + desc = court.7100.desc + theme = court + left_portrait = { + character = root + animation = fear + } + right_portrait = { + character = scope:huntmaster + animation = personality_bold + } + + cooldown = { years = 10 } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_warlike } + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + # Has Master of the Hunt employed + any_court_position_holder = { + court_7100_huntsmaster_trigger = yes + } + + # Does not already have an exotic pet + NOR = { + has_character_modifier = exotic_pet_wolf + has_character_modifier = exotic_pet_bear + has_character_modifier = exotic_pet_lion + has_character_modifier = exotic_pet_tiger + } + } + + immediate = { + # Decide on which animal it is + random_list = { + 25 = { # Wolf + save_scope_value_as = { + name = captured_animal + value = flag:wolf + } + } + + 25 = { # Bear + # Not outside of Europe or Asian black bear territory + modifier = { + factor = 0 + location = { + NOR = { + geographical_region = world_europe + geographical_region = world_tibet + geographical_region = world_himalaya + geographical_region = world_burma + geographical_region = world_middle_east_persia + geographical_region = world_asia_china + geographical_region = world_asia_japan + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + save_scope_value_as = { + name = captured_animal + value = flag:bear + } + } + + 25 = { # Lion + # Not outside of Africa + modifier = { + factor = 0 + location = { + NOT = { geographical_region = world_africa } + } + } + save_scope_value_as = { + name = captured_animal + value = flag:lion + } + } + + 25 = { # Tiger + # Not outside of India or Asia + modifier = { + factor = 0 + location = { + NOR = { + geographical_region = world_india + geographical_region = world_tibet + geographical_region = world_himalaya + geographical_region = world_burma + geographical_region = world_asia_china + geographical_region = world_asia_korea + geographical_region = world_asia_southeast + } + } + } + save_scope_value_as = { + name = captured_animal + value = flag:tiger + } + } + } + + # Save the Master of the Hunt in scope + random_court_position_holder = { + limit = { + court_7100_huntsmaster_trigger = yes + } + save_scope_as = huntmaster + } + } + + # Dispose of it immediately! + option = { + name = court.7100.a + custom_tooltip = court.7100.a.tt + + scope:huntmaster = { + add_opinion = { + modifier = rejected_gift_opinion + target = root + opinion = -20 + } + } + + stress_impact = { + brave = medium_stress_impact_gain + } + } + + # I shall keep it as a pet! + option = { + name = court.7100.b + stress_impact = { + craven = medium_stress_impact_gain + } + random = { + chance = 75 + modifier = { + add = { + value = prowess + multiply = -1 + multiply = 2.5 + min = -50 + } + } + increase_wounds_no_death_effect = { REASON = wild_animal } + } + court_7100_animal_bonus_effect = yes + } + + # You can keep it! + option = { + name = court.7100.c + + scope:huntmaster = { + add_opinion = { + modifier = disappointed_opinion + target = root + opinion = -10 + } + random = { + chance = 75 + modifier = { + add = { + value = scope:huntmaster.prowess + multiply = -1 + multiply = 2.5 + min = -50 + } + } + increase_wounds_no_death_effect = { REASON = wild_animal } + } + court_7100_animal_bonus_effect = yes + } + } +} + +######################### +# Loud and Proud +# by George Luff +######################### + +scripted_trigger court_7200_court_musician_trigger = { + has_court_position = court_musician_court_position + is_available_healthy_ai_adult = yes +} + +## Musician won't stop making noise +court_yearly.7200 = { + type = character_event + title = court.7200.title + desc = { + desc = court.7200.intro.desc + first_valid = { + triggered_desc = { + trigger = { + has_character_flag = court_7200_drum + } + desc = court.7200.drum.desc + } + triggered_desc = { + trigger = { + has_character_flag = court_7200_trombone + } + desc = court.7200.trombone.desc + } + triggered_desc = { + trigger = { + has_character_flag = court_7200_pipes + } + desc = court.7200.pipes.desc + } + triggered_desc = { + trigger = { + has_character_flag = court_7200_guitar + } + desc = court.7200.guitar.desc + } + } + desc = court.7200.outro.desc + } + theme = court + left_portrait = { + character = root + animation = worry + } + right_portrait = { + character = scope:loud_musician + animation = happiness + } + + cooldown = { years = 5 } + + weight_multiplier = { + base = 1 + + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + # Employs a Court Musician + any_court_position_holder = { + court_7200_court_musician_trigger = yes + } + } + + immediate = { + # Select court musician + random_court_position_holder = { + limit = { + court_7200_court_musician_trigger = yes + } + save_scope_as = loud_musician + } + random_list = { + 25 = { + add_character_flag = court_7200_drum + } + 25 = { + add_character_flag = court_7200_trombone + } + 25 = { + add_character_flag = court_7200_pipes + } + 25 = { + add_character_flag = court_7200_guitar + } + } + } + + # Persuade the musician to keep to a curfew on the racket + option = { + name = court.7200.a + + stress_impact = { + sadistic = medium_stress_impact_gain + } + + every_courtier_or_guest = { + custom = all_courtiers_and_guests + limit = { + this != scope:loud_musician + } + add_opinion = { + modifier = angry_opinion + target = root + opinion = -10 + } + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 10 + ai_vengefulness = -10 + } + } + } + + # Strip them of their position + option = { + name = court.7200.b + + stress_impact = { + arbitrary = medium_stress_impact_loss + } + + revoke_court_position = { + court_position = court_musician_court_position + recipient = scope:loud_musician + } + + scope:loud_musician = { + add_opinion = { + modifier = angry_opinion + target = root + opinion = -15 + } + } + + add_character_modifier = { + modifier = fired_court_position + years = 5 + } + + every_courtier_or_guest = { + limit = { + this != scope:loud_musician + } + custom = all_courtiers_and_guests + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 25 + } + } + } + + # Just knock it off, okay? + option = { + name = court.7200.c + stress_impact = { + calm = medium_stress_impact_gain + wrathful = medium_stress_impact_loss + } + + scope:loud_musician = { + add_opinion = { + target = root + modifier = cruelty_opinion + opinion = -20 + } + } + every_courtier_or_guest = { + limit = { + this != scope:loud_musician + } + custom = all_courtiers_and_guests + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 15 + } + } + } +} + +# Court event 7030 - Foreign Merchants wish to establish a merchant quarter +court_yearly.7030 = { + type = character_event + title = court.7030.title + desc = court.7030.desc + theme = court + + cooldown = { years = 20 } + left_portrait = { + character = scope:foreign_merchant + animation = personality_rational + } + right_portrait = { + character = scope:steward + animation = disapproval + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + exists = cp:councillor_steward + cp:councillor_steward = { + is_available_ai_adult = yes + } + any_character_to_title_neighboring_and_across_water_county = { + NOT = { + culture = { this = root.culture } + } + } + } + + immediate = { + # Save foreign county as scope + random_character_to_title_neighboring_and_across_water_county = { + limit = { + NOT = { + culture = { this = root.culture } + } + } + save_scope_as = merchant_county + } + + cp:councillor_steward = { + save_scope_as = steward + } + + ## Create Merchant + create_character = { + template = foreign_merchant_template + location = root.capital_province + save_scope_as = foreign_merchant + } + } + + option = { # Establish merchant quarter, cultural acceptance + name = court.7030.a + root.culture = { + change_cultural_acceptance = { + target = scope:foreign_merchant.culture + value = major_cultural_acceptance_gain + desc = cultural_acceptance_foreign_merchants + } + } + + root.capital_county = { + add_county_modifier = { + modifier = foreign_merchant_community + years = 20 + } + } + + stress_impact = { + arrogant = minor_stress_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_sociability = 0.2 + ai_greed = 0.5 + } + + } + } + + option = { # Expand the mercantile district for everyone + name = court.7030.c + trigger = { + capital_county = { + title_province = { + OR = { + AND = { + building_common_tradeport_requirement_terrain = yes + NOT = { has_building = common_tradeport_08 } + } + AND = { + has_building_or_higher = city_01 + NOT = { has_building = guild_halls_08 } + } + } + } + } + } + + remove_treasury_or_gold = medium_treasury_or_gold_value + + if = { + limit = { + root.capital_county = { + title_province = { + building_common_tradeport_requirement_terrain = yes + } + } + } + root.capital_county = { + title_province = { + upgrade_tradeport = yes + } + } + } + else_if = { + limit = { + root.capital_county = { + title_province = { + has_building_or_higher = city_01 + } + } + } + root.capital_county = { + title_province = { + upgrade_guildhall = yes + } + } + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_greed = -0.5 + ai_rationality = 0.2 + } + } + + stress_impact = { + greedy = medium_stress_gain + } + } + + option = { # Ban the foreigners! + name = court.7030.d + custom_tooltip = court.7030.d.tt + add_treasury_or_gold = medium_treasury_or_gold_value + scope:foreign_merchant = { + show_as_tooltip = { + banish = yes + } + silent_disappearance_effect = yes + } + + root.culture = { + change_cultural_acceptance = { + target = scope:foreign_merchant.culture + value = major_cultural_acceptance_loss + desc = cultural_acceptance_foreigners_expelled + } + } + + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = 1 + ai_rationality = -1 + ai_greed = 1 + ai_compassion = -0.5 + } + } + + stress_impact = { + eccentric = minor_stress_impact_loss + generous = medium_stress_impact_gain + compassionate = medium_stress_impact_gain + cynical = minor_stress_impact_gain + } + } +} + +### One of your courtiers has started sitting on a pillar during the day + +scripted_trigger court_7040_ascetic_religion_trigger = { + faith = { + OR = { + religion_tag = christianity_religion + religion_tag = buddhism_religion + religion_tag = jainism_religion + religion_tag = taoism_religion + religion_tag = dualism_religion + has_doctrine = tenet_asceticism + } + } +} + +court_yearly.7040 = { + type = character_event + title = court.7040.title + desc = court.7040.desc + theme = court + + cooldown = { years = 10 } + left_portrait = { + character = root + animation = throne_room_conversation_1 + } + right_portrait = { + character = scope:chaplain + animation = disapproval + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_modifier = court_7040_ascetic_practices } + # Must follow a faith that historically practised asceticism, or possess the asceticism tenet + + root = { court_7040_ascetic_religion_trigger = yes } + # Courtier must be of the same faith as root + + any_courtier = { + ep1_spare_courtier_trigger = yes + faith = root.faith + } + + # We need the court chaplain for narrative purposes + exists = cp:councillor_court_chaplain + cp:councillor_court_chaplain = { + is_available_healthy_ai_adult = yes + } + } + + immediate = { + # Select courtier + random_courtier = { + limit = { + ep1_spare_courtier_trigger = yes + faith = root.faith + } + add_trait = reclusive + save_scope_as = ascetic + } + + # Select the court chaplain + cp:councillor_court_chaplain = { + save_scope_as = chaplain + } + + # Select religious head for option b + if = { + limit = { + faith = { + religious_head ?= { + this != root + } + } + } + faith.religious_head = { + save_scope_as = head_of_faith + } + } + } + + option = { # Send them to the religious head, if they exist + name = court.7040.b + + trigger = { + exists = scope:head_of_faith + exists = scope:head_of_faith.capital_province + } + + remove_courtier_or_guest = { character = scope:ascetic new_location = scope:head_of_faith.capital_province } + + scope:head_of_faith = { + add_opinion = { + modifier = grateful_opinion + target = root + opinion = 25 + } + } + + faith = { + change_fervor = { + value = 5 + desc = fervor_gain_ascetic_example + } + } + + ai_chance = { + base = 40 + ai_value_modifier = { + ai_zeal = 0.4 + ai_compassion = -0.2 + } + } + } + + option = { # Truly a pious individual, their example inspires me! + name = court.7040.c + + add_character_modifier = { + modifier = court_7040_ascetic_practices + years = 10 + } + + stress_impact = { + lazy = minor_stress_gain + cynical = minor_stress_gain + } + ai_chance = { + base = 40 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = 0.5 + ai_honor = 0.5 + } + } + } + + option = { # If you want to live in isolation, do so somewhere else! + name = court.7040.d + + add_piety = minor_piety_loss + + stress_impact = { + zealous = medium_stress_gain + } + + scope:ascetic = { + show_as_tooltip = { + banish = yes + } + silent_disappearance_effect = yes + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -1 + ai_compassion = -1 + ai_honor = -0.5 + ai_vengefulness = 1 + } + } + } + + option = { # Just ignore them, they'll get over it eventually. + name = court.7040.a + + scope:chaplain = { + add_opinion = { + target = root + modifier = ignored_concerns + } + } + + add_piety = minor_piety_loss + + stress_impact = { + zealous = minor_stress_gain + impatient = minor_stress_gain + } + + ai_chance = { + base = 10 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = 1 + ai_compassion = 0.5 + } + } + } +} + +########## Your caravans are attacked by rampaging Christian nobles! + +court_yearly.4350 = { + type = character_event + title = court.4350.t + desc = court.4350.desc + theme = diplomacy_foreign_affairs_focus + lower_left_portrait = { + character = scope:caravan_attacker_liege + } + left_portrait = { + character = root + animation = personality_honorable + } + right_portrait = { + character = scope:concerned_marshal + animation = worry + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_flag = has_had_caravan_islamic_event } + is_at_war = no + religion = religion:islam_religion + any_neighboring_realm_same_rank_owner = { + is_landed = yes + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + in_diplomatic_range = root + liege != root + } + exists = root.cp:councillor_marshal + } + + immediate = { + add_character_flag = { + flag = has_had_caravan_islamic_event + days = 1825 + } + cp:councillor_marshal = { save_scope_as = concerned_marshal } + random_neighboring_realm_same_rank_owner = { + limit = { + is_landed = yes + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + in_diplomatic_range = root + liege != root + } + save_scope_as = caravan_attacker_liege + } + remove_treasury_or_gold = medium_treasury_or_gold_value + } + + option = { + name = court.4350.a + every_courtier_or_guest = { + limit = { + NOT = { has_trait = temperate } + } + custom = all_courtiers_and_guests + add_opinion = { + target = root + modifier = given_luxuries_opinion + opinion = 10 + } + } + scope:caravan_attacker_liege = { + add_opinion = { + target = root + opinion = 40 + modifier = pleased_opinion + } + if = { + limit = { + NOR = { + is_allied_to = root + has_truce = root + } + } + add_truce_both_ways = { + character = root + days = 1825 + name = TRUCE_TRADE_DEAL + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.25 + ai_greed = 0.25 + } + } + } + + option = { + name = court.4350.b + add_dread = medium_dread_gain + add_character_modifier = { + modifier = leading_looting_modifier + days = 1000 + } + add_gold = minor_gold_value + scope:caravan_attacker_liege = { + add_opinion = { + target = root + opinion = -40 + modifier = disappointed_opinion + } + every_vassal = { + custom = all_vassals + add_opinion = { + target = root + opinion = -40 + modifier = disappointed_opinion + } + } + } + scope:caravan_attacker_liege = { + if = { + limit = { + OR = { + is_allied_to = root + has_truce = root + } + } + cancel_truce_both_ways = root + break_alliance = root + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 0.25 + ai_greed = 0.25 + ai_vengefulness = 0.5 + } + } + } + option = { + name = court.4350.c + flavor = court.4350.c.tt + add_dread = minor_dread_gain + add_piety = minor_piety_gain + scope:caravan_attacker_liege = { + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + this.capital_province = { + add_province_modifier = { + modifier = spurned_by_traders + years = 10 + } + } + every_vassal = { + custom = all_vassals + add_opinion = { + target = root + opinion = -20 + modifier = disappointed_opinion + } + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 0.25 + } + } + } +} +### Reversed POV - one of our nobles attacked a trading caravan! +court_yearly.4355 = { + type = character_event + title = court.4355.t + desc = court.4355.desc + theme = diplomacy_foreign_affairs_focus + left_portrait = { + character = scope:reporting_marshal + animation = personality_honorable + } + right_portrait = { + character = scope:caravan_attacker + animation = rage + } + lower_left_portrait = { + character = scope:attacked_liege + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + NOT = { has_character_flag = has_had_caravan_christian_event } + is_at_war = no + OR = { has_religion = religion:eastern_orthodox_religion has_religion = religion:catholic_religion has_religion = religion:protestant_religion } + any_neighboring_realm_same_rank_owner = { + is_landed = yes + religion = religion:islam_religion + in_diplomatic_range = root + liege != root + } + any_powerful_vassal = { + opinion = { + target = root + value <= medium_negative_opinion + } + age > 15 + } + exists = root.cp:councillor_marshal + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = has_had_caravan_christian_event + days = 1825 + } + cp:councillor_marshal = { save_scope_as = reporting_marshal } + random_vassal = { + limit = { + opinion = { + target = root + value < 20 + } + is_imprisoned = no + age > 15 + is_ai = yes + } + weight = { + base = 1 + modifier = { + has_relation_rival = root + factor = 20 + } + modifier = { + factor = 20 + is_powerful_vassal = yes + } + } + save_scope_as = caravan_attacker + } + + random_neighboring_realm_same_rank_owner = { + limit = { + is_landed = yes + religion = religion:islam_religion + in_diplomatic_range = root + } + save_scope_as = attacked_liege + } + } + + option = { + name = court.4355.a + flavor = court.4355.a.tt + every_courtier_or_guest = { + custom = all_courtiers_and_guests + add_opinion = { + target = root + opinion = 10 + modifier = given_luxuries_opinion + } + } + faith.religious_head = { + add_opinion = { + target = root + opinion = 10 + modifier = pious_opinion + } + } + scope:attacked_liege = { + add_opinion = { + target = root + opinion = -40 + modifier = disappointed_opinion + } + } + add_character_modifier = { + modifier = leading_looting_modifier + days = 1000 + } + scope:attacked_liege = { + if = { + limit = { + OR = { + is_allied_to = root + has_truce = root + } + } + cancel_truce_both_ways = root + } + } + capital_province = { + add_province_modifier = { + modifier = spurned_by_traders + years = 10 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } + + option = { + name = court.4355.b + scope:caravan_attacker = { + add_opinion = { + target = root + opinion = -40 + modifier = disappointed_opinion + } + } + scope:attacked_liege = { + add_opinion = { + target = root + opinion = 20 + modifier = respect_opinion + } + if = { + limit = { + NOR = { + is_allied_to = root + has_truce = root + } + } + add_truce_both_ways = { + character = root + days = 1825 + name = TRUCE_TRADE_DEAL + } + } + } + add_diplomacy_lifestyle_xp = major_lifestyle_xp + add_dread = medium_dread_gain + stress_impact = { + sadistic = medium_stress_loss + wrathful = medium_stress_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = -0.5 + } + } + } + + option = { + name = court.4355.c + flavor = court.4355.c.tt + stress_impact = { + arbitrary = medium_stress_loss + craven = medium_stress_loss + } + if = { + limit = { + scope:caravan_attacker = { has_relation_rival = root } + } + scope:caravan_attacker = { remove_relation_rival = root } + } + scope:caravan_attacker = { + add_opinion = { + target = root + opinion = 20 + modifier = pleased_opinion + } + } + capital_province = { + add_province_modifier = { + modifier = spurned_by_traders + years = 10 + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_zeal = 0.5 + } + } + } +} + +court_yearly.4800 = { + type = character_event + title = court.4800.t + desc = court.4800.desc + cooldown = { years = 10 } + theme = court + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + OR = { + any_court_position_holder = { + type = bodyguard_court_position + is_available_ai_adult = yes + } + any_court_position_holder = { + type = akolouthos_court_position + is_available_ai_adult = yes + } + } + + OR = { + AND = { + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + is_available_ai_adult = yes + } + } + AND = { + employs_court_position = keeper_of_swans_court_position + any_court_position_holder = { + type = keeper_of_swans_court_position + is_available_ai_adult = yes + } + } + } + } + left_portrait = { + character = scope:defenestrated_character + animation = flirtation + } + right_portrait = { + character = scope:defenestrating_bodyguard + animation = rage + } + + weight_multiplier = { + base = 1 + } + + immediate = { + if = { + limit = { + employs_court_position = bodyguard_court_position + } + random_court_position_holder = { + type = akolouthos_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = defenestrating_bodyguard + } + } + else = { + random_court_position_holder = { + type = bodyguard_court_position + limit = { + is_available_ai_adult = yes + } + save_scope_as = defenestrating_bodyguard + } + } + + if = { + limit ={ + employs_court_position = court_jester_court_position + any_court_position_holder = { + type = court_jester_court_position + is_available_ai_adult = yes + } + } + random_court_position_holder = { + type = court_jester_court_position + save_scope_as = defenestrated_character + } + } + else = { + random_court_position_holder = { + type = keeper_of_swans_court_position + save_scope_as = defenestrated_character + } + } + } + + option = { + name = court.4800.a + stress_impact = { + compassionate = medium_stress_impact_gain + just = medium_stress_impact_gain + arbitrary = minor_stress_loss + sadistic = minor_stress_loss + } + random_list = { + 10 = { + scope:defenestrated_character = { + increase_wounds_effect = { REASON = defenestration } + apply_maimed_trait_and_modifier_effect = yes + add_opinion = { + target = root + opinion = -20 + modifier = hate_opinion + } + add_opinion = { + target = scope:defenestrating_bodyguard + opinion = -40 + modifier = hate_opinion + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + left_icon = scope:defenestrated_character + title = court.4800.maimed_toast + show_as_tooltip = { + scope:defenestrated_character = { + increase_wounds_effect = { REASON = defenestration } + apply_maimed_trait_and_modifier_effect = yes + } + } + } + } + } + 5 = { + scope:defenestrated_character = { + death = { + death_reason = death_defenestration + killer = scope:defenestrating_bodyguard + } + } + hidden_effect = { + send_interface_toast = { + type = event_toast_effect_neutral + left_icon = scope:defenestrated_character + title = court.4800.death_toast + show_as_tooltip = { + scope:defenestrated_character = { + death = { + death_reason = death_defenestration + killer = scope:defenestrating_bodyguard + } + } + } + } + } + } + } + add_dread = minor_dread_gain + scope:defenestrating_bodyguard = { + add_opinion = { + target = root + opinion = 10 + modifier = respect_opinion + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + ai_boldness = 0.25 + ai_rationality = -0.5 + } + } + } + + option = { + name = court.4800.b + stress_impact = { + compassionate = minor_stress_gain + just = minor_stress_gain + sadistic = miniscule_stress_impact_loss + } + scope:defenestrated_character = { + increase_wounds_effect = { REASON = fight } + add_opinion = { + target = root + opinion = -5 + modifier = scared_opinion + } + add_opinion = { + target = scope:defenestrating_bodyguard + opinion = -25 + modifier = scared_opinion + } + } + scope:defenestrating_bodyguard = { + add_opinion = { + target = root + opinion = 10 + modifier = respect_opinion + } + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.25 + ai_vengefulness = 0.25 + ai_boldness = 0.25 + ai_rationality = -0.25 + } + } + } + + option = { + name = court.4800.c + if = { + limit = { + scope:defenestrating_bodyguard = { + has_court_position = bodyguard_court_position + + } + } + revoke_court_position = { + recipient = scope:defenestrating_bodyguard + court_position = bodyguard_court_position + } + } + else = { + revoke_court_position = { + recipient = scope:defenestrating_bodyguard + court_position = akolouthos_court_position + } + } + reverse_add_opinion = { + target = scope:defenestrated_character + opinion = 30 + modifier = grateful_opinion + } + reverse_add_opinion = { + target = scope:defenestrating_bodyguard + opinion = -30 + modifier = insulted_opinion + } + add_martial_lifestyle_xp = medium_lifestyle_xp + add_prestige = minor_prestige_gain + ai_chance = { + base = 50 + ai_value_modifier = { + ai_rationality = 0.5 + } + } + } +} + +#Rando criminal is spawned based on what your culture considers criminal/shunned +scripted_effect event_0101_spawn_criminal_effect = { + create_character = { + location = root.capital_province + template = generic_peasant_character + faith = root.capital_province.faith #Character is meant to be a random lowborn, should be the local faith/culture rather than ruling class + culture = root.capital_province.culture + save_scope_as = lowborn_criminal + } + scope:lowborn_criminal = { + random_list = { + 10 = { + modifier = { + factor = 0 + root.faith = { has_doctrine_parameter = deviancy_accepted } + } + modifier = { + factor = 0.5 + root.faith = { has_doctrine_parameter = deviancy_shunned } + } + add_trait = deviant + save_scope_value_as = { + name = criminal_trait + value = flag:deviant_trait_flag + } + } + 10 = { + add_trait = murderer + } + 10 = { + modifier = { + factor = 0 + root.faith = { has_doctrine_parameter = witchcraft_accepted } + } + modifier = { + factor = 0.5 + root.faith = { has_doctrine_parameter = witchcraft_shunned } + } + add_trait = witch + save_scope_value_as = { + name = criminal_trait + value = flag:witch_trait_flag + } + } + 10 = { + add_trait = lazy + } + 10 = { #Dumb crimes that aren't trait-specific + + } + } + } + if = { + limit = { + scope:lowborn_criminal = { + has_trait = murderer + } + } + scope:lowborn_criminal = { + random_list = { + 10 = { + add_trait = cannibal + game_rule_create_spouse_and_children = { CHARACTER = scope:lowborn_criminal LOCATION = scope:lowborn_criminal } + every_child = { + add_trait = cannibal + } + every_spouse = { + add_trait = cannibal + } + save_scope_value_as = { + name = criminal_trait + value = flag:cannibal_trait_flag + } + } + 10 = { + add_trait = sadistic + save_scope_value_as = { + name = criminal_trait + value = flag:sadistic_trait_flag + } + } + 10 = { #Holy man murderer + modifier = { + factor = 0 + NOT = { has_allowed_gender_for_clergy = scope:lowborn_criminal } + } + replace_with_learning_trait_effect = yes + add_character_flag = { + flag = need_priest_outfit + } + } + } + } + } + if = { + limit = { + scope:lowborn_criminal = { + has_trait = deviant + } + } + scope:lowborn_criminal = { + random_list = { + 10 = { #Stableboy + add_character_flag = { + flag = stableboy_crime + } + pick_servant_romance_target_effect = yes + } + 10 = { #Kinky + add_character_flag = { + flag = kinky_crime + } + } + 10 = { #Animal lover + add_character_flag = { + flag = beastiality_crime + } + } + } + } + } + if = { + limit = { + scope:lowborn_criminal = { + has_trait = witch + } + } + scope:lowborn_criminal = { + random_list = { + 10 = { #Baby soup + add_character_flag = { + flag = baby_soup_crime + } + } + 10 = { #Evil healer + add_character_flag = { + flag = healer_crime + } + replace_with_learning_trait_effect = yes + add_trait = lifestyle_herbalist + give_nickname = nick_the_angel_of_death + } + 10 = { #Devil worshiper + add_character_flag = { + flag = devil_worship_crime + } + } + } + } + } + scope:lowborn_criminal = { + add_to_list = lowborn_criminal_list + every_child = { + add_to_list = lowborn_criminal_list + } + every_spouse = { + add_to_list = lowborn_criminal_list + } + } +} + +# Rando criminal shows up +court_yearly.0101 = { + type = character_event + title = court.0101.t + desc = { + desc = court.0101.desc.opening + first_valid = { #What the crime was + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + } + } + desc = court.0101.desc.murderer + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + } + } + desc = court.0101.desc.deviant + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + } + } + desc = court.0101.desc.witch + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = lazy + } + } + desc = court.0101.desc.lazy + } + } + random_valid = { #Traitless crimes + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + NOR = { + has_trait = murderer + has_trait = witch + has_trait = deviant + has_trait = lazy + } + } + } + desc = court.0101.desc.thief + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + NOR = { + has_trait = murderer + has_trait = witch + has_trait = deviant + has_trait = lazy + } + } + } + desc = court.0101.desc.sumptuary + } + } + first_valid = { #Details about the crime + #Murderer + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_trait = cannibal + } + } + desc = court.0101.desc.cannibal + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_trait = sadistic + } + } + desc = court.0101.desc.sadistic + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_character_flag = need_priest_outfit + } + } + desc = court.0101.desc.priest + } + #Deviant + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = stableboy_crime + } + } + desc = court.0101.desc.stableboy + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = kinky_crime + } + } + desc = court.0101.desc.kinky + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = beastiality_crime + } + } + desc = court.0101.desc.animals + } + #Witch + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = baby_soup_crime + } + } + desc = court.0101.desc.baby_soup + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = healer_crime + } + } + desc = court.0101.desc.suspicious_healer + } + triggered_desc = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = devil_worship_crime + } + } + desc = court.0101.desc.devil_worshiper + } + } + desc = court.0101.desc.outro + } + + theme = court + left_portrait = { + character = scope:executioner + animation = schadenfreude + } + right_portrait = { + character = scope:lowborn_criminal + animation = fear + } + + + # More likely to trigger if you are a sadistic person + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + has_trait = sadistic + } + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + is_available_at_peace_adult = yes + employs_court_position = executioner_court_position + } + + immediate = { + event_0101_spawn_criminal_effect = yes + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + } + + # Option A: Ironic punishment + option = { + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_trait = cannibal + } + } + text = court.0101.a.cannibal + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_trait = sadistic + } + } + text = court.0101.a.sadistic + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_character_flag = need_priest_outfit + faith = { has_doctrine_parameter = sky_burials_active } + } + } + text = court.0101.a.priest.sky + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = murderer + has_character_flag = need_priest_outfit + } + } + text = court.0101.a.priest + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = stableboy_crime + } + } + text = court.0101.a.stableboy + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = kinky_crime + } + } + text = court.0101.a.kinky + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = beastiality_crime + } + } + text = court.0101.a.animals + } + #Witch + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = baby_soup_crime + } + } + text = court.0101.a.baby_soup + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + has_character_flag = healer_crime + } + } + text = court.0101.a.suspicious_healer + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = witch + } + has_character_flag = devil_worship_crime + } + text = court.0101.a.devil_worshiper + } + name = { + trigger = { + } + text = court.0101.a + } + stress_impact = { + zealous = minor_stress_impact_loss #They are a criminal afterall + vengeful = minor_stress_impact_loss + wrathful = minor_stress_impact_loss + sadistic = major_stress_impact_loss + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + scope:lowborn_criminal = { + every_child = { + limit = { + has_trait = cannibal + } + death = { + killer = root + death_reason = death_torture + } + } + every_spouse = { + limit = { + has_trait = cannibal + } + death = { + killer = root + death_reason = death_torture + } + } + death = { + killer = root + death_reason = death_torture + } + } + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_art_of_torture_punishment + } + } + + #Option C: I like this person, bring them to court! + option = { + trigger = { + OR = { + AND = { + OR = { + has_trait = sadistic + any_secret = { type = secret_murder } + } + scope:criminal_trait ?= flag:sadistic_trait_flag + } + AND = { + OR = { + has_trait = cannibal + any_secret = { type = secret_cannibal } + } + scope:criminal_trait ?= flag:cannibal_trait_flag + } + AND = { + OR = { + has_trait = deviant + any_secret = { type = secret_deviant } + } + scope:criminal_trait ?= flag:deviant_trait_flag + } + AND = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + scope:criminal_trait ?= flag:witch_trait_flag + } + } + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + has_character_flag = beastiality_crime + } + } + text = court.0101.c.beastiality + } + name = { + trigger = { + scope:lowborn_criminal = { + has_trait = deviant + NOT = { has_character_flag = beastiality_crime } + } + } + text = court.0101.c.deviant + } + name = { + trigger = { + scope:lowborn_criminal = { + NOT = { has_trait = deviant } + } + } + text = court.0101.c + } + stress_impact = { + zealous = minor_stress_impact_gain + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain #You wanna see them hurt, even if you are both sadists + witch = minor_stress_impact_loss + deviant = minor_stress_impact_loss #Another pervert for me to have fun with + compassionate = major_stress_impact_loss + forgiving = major_stress_impact_loss + } + every_in_list = { + list = lowborn_criminal_list + root = { + add_courtier = prev + } + } + if = { + limit = { + has_trait = deviant + can_set_relation_lover_trigger = { CHARACTER = scope:lowborn_criminal } + } + set_relation_lover = { reason = lover_deviant target = scope:lowborn_criminal } + } + } + + #Option D: Keep them in the castle prison + option = { + name = court.0101.d + every_in_list = { + list = lowborn_criminal_list + root = { + add_courtier = prev + } + rightfully_imprison_character_effect = { + TARGET = this + IMPRISONER = root + } + } + + } + + #Option B: I don't care + option = { + name = court.0101.b + scope:lowborn_criminal = { + silent_disappearance_effect = yes + every_child = { + silent_disappearance_effect = yes + } + every_spouse = { + silent_disappearance_effect = yes + } + } + } +} + +# Executioner feeling lonely +court_yearly.0102 = { + type = character_event + title = court.0102.t + desc = court.0102.desc + theme = court + left_portrait = { + character = scope:executioner + animation = sadness + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = executioner_court_position + is_available_adult = yes + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + } + } + + # More likely to trigger if the executioner actually likes other humans + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = gregarious + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = compassionate + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = shy + } + } + } + + immediate = { + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + } + + # Option A: Pity the executioner + option = { + name = court.0102.a + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_took_pity + } + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_loss + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + + #Option C: Repremand the executioner for moaning about being lonely + option = { + name = court.0102.c + progress_towards_rival_effect = { + REASON = rival_reprimanded_lonely + CHARACTER = scope:executioner + OPINION = -25 + } + scope:executioner = { + add_stress = minor_stress_gain + } + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + } + } + + #Option B: I don't care + option = { + name = court.0102.b + scope:executioner = { + add_stress = minor_stress_gain + } + stress_impact = { + vengeful = minor_stress_impact_loss + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + +# Executioner selling... items from the prisoners +court_yearly.0103 = { + type = character_event + title = court.0103.t + desc = { + desc = court.0103.desc.opening + random_valid = { #What did the executioner do + desc = court.0103.desc.hair_and_teeth + desc = court.0103.desc.jewelry + triggered_desc = { + trigger = { + scope:executioner = { + NOR = { + has_trait = compassionate + has_trait = content + has_trait = just + AND = { + has_trait = zealous + faith = { + NOT = { + has_doctrine = tenet_ritual_cannibalism + } + } + } + } + } + } + desc = court.0103.desc.meat + } + triggered_desc = { + trigger = { + scope:executioner = { + is_christian_trigger = yes + NOT = { + has_trait = zealous + } + } + } + desc = court.0103.desc.saint_bones + } + } + desc = court.0103.desc.outro + } + theme = court + left_portrait = { + character = scope:executioner + animation = personality_greedy + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = executioner_court_position + is_available_adult = yes + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + NOT = { + has_trait = improvident + } + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = greedy + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = sadistic + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = callous + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = ambitious + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = deceitful + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = honest + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = just + } + } + } + + immediate = { + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + } + + # Option A: Get in on this + option = { + name = court.0103.a + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 15 + } + add_gold = medium_gold_value + add_piety = major_piety_loss + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + greedy = major_stress_impact_loss + compassionate = major_stress_impact_gain + zealous = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1.5 + } + } + } + + #Option B: Repremand the executioner + option = { + name = court.0103.b + rightfully_imprison_character_effect = { + TARGET = scope:executioner + IMPRISONER = root + } + stress_impact = { + greedy = major_stress_impact_gain + just = minor_stress_impact_loss + zealous = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = -0.5 + } + } + } + + #Option C: Don't care + option = { + name = court.0103.c + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 15 + } + stress_impact = { + greedy = major_stress_impact_gain + just = minor_stress_impact_gain + zealous = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + } + } +} + +################################################# +# The executioner events # +# by James Beaumont # +# 0104 - Child into exectution # +# 0106 - Executioner asks how far they can go # +################################################# + +# Executioner talking to a ward about their trade +court_yearly.0104 = { + type = character_event + title = court.0104.t + desc = court.0104.desc + + theme = court + left_portrait = { + character = scope:executioner + animation = happiness + } + right_portrait = { + character = scope:morbid_child + animation = admiration + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = executioner_court_position + any_relation = { + type = ward + NOT = { has_trait = compassionate } + is_available = yes + age >= 5 + } + is_available_adult = yes + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + } + } + + # More likely to trigger if the executioner likes talking to children + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = gregarious + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = trusting + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = patient #You gotta have some real patience to answer some children's questions + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = family_first + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = shy + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = impatient + } + } + } + + immediate = { + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + random_relation = { + type = ward + limit = { + NOT = { has_trait = compassionate } + is_available = yes + age >= 5 + } + save_scope_as = morbid_child + } + } + + # Option A: Join in the conversation + option = { + name = court.0104.a + scope:morbid_child = { + add_trait = sadistic + } + progress_towards_friend_effect = { + CHARACTER = scope:morbid_child + OPINION = default_friend_opinion + REASON = friend_torture_stories + } + reverse_add_opinion = { + target = scope:morbid_child + modifier = grateful_opinion + opinion = 15 + } + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_torture_stories + } + reverse_add_opinion = { + target = scope:executioner + modifier = grateful_opinion + opinion = 15 + } + scope:morbid_child = { + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_torture_stories + } + } + stress_impact = { + sadistic = minor_stress_impact_loss + shy = minor_stress_impact_gain + compassionate = major_stress_impact_gain + gregarious = minor_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + ai_vengefulness = 0.5 + } + modifier = { + factor = 0.5 + scope:morbid_child = { has_trait = sadistic } + } + } + } + + #Option B: Repremand the executioner for talking to your ward + option = { + name = court.0104.b + progress_towards_rival_effect = { + REASON = rival_morbid_child + CHARACTER = scope:morbid_child + OPINION = -25 + } + scope:morbid_child = { + add_stress = minor_stress_gain + } + progress_towards_rival_effect = { + REASON = rival_reprimanded_child + CHARACTER = scope:executioner + OPINION = -25 + } + scope:executioner = { + add_stress = minor_stress_gain + } + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + shy = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = 0.5 + } + modifier = { #The kid is already a sadist + factor = 2 + scope:morbid_child = { has_trait = sadistic } + } + } + } + + #Option C: Pretend you didn't hear + option = { + name = court.0104.c + random_list = { + 50 = {} + 50 = { + scope:morbid_child = { + add_trait = sadistic + } + } + } + scope:morbid_child = { + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_torture_stories + } + } + stress_impact = { + compassionate = minor_stress_impact_gain + gregarious = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -0.5 + } + } + } +} + + +# Executioner asks how far they can go +court_yearly.0106 = { + type = character_event + title = court.0106.t + desc = court.0106.desc + theme = court + left_portrait = { + character = scope:executioner + animation = scheme + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = executioner_court_position + is_available_adult = yes + any_court_position_holder = { + type = executioner_court_position + is_available_ai_adult = yes + } + } + + weight_multiplier = { + base = 0.5 + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = sadistic + } + } + modifier = { + add = 0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = callous + } + } + modifier = { + add = 1.0 + any_prisoner = { has_any_secrets = yes } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = just + } + } + modifier = { + add = -0.5 + any_court_position_holder = { + type = executioner_court_position + has_trait = compassionate + } + } + } + + immediate = { + if = { + limit = { + any_court_position_holder = { + type = executioner_court_position + } + } + random_court_position_holder = { + type = executioner_court_position + save_scope_as = executioner + } + } + } + + # Option A: Go hard on the prisoners + option = { + name = court.0106.a + if = { + limit = { + any_prisoner = { has_any_secrets = yes } + } + random_prisoner = { + random_secret = { + limit = { + NOT = { + any_secret_knower = { + this = root + } + } + } + reveal_to = root + } + } + } + if = { + limit = { + scope:executioner = { + has_trait = sadistic + } + } + scope:executioner = { add_stress = major_stress_impact_loss } + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_shared_opinions_on_punishment + } + } + else_if = { + limit = { + scope:executioner = { + has_trait = compassionate + } + } + scope:executioner = { add_stress = major_stress_impact_gain } + progress_towards_rival_effect = { + REASON = rival_go_hard_on_prisoners + CHARACTER = scope:executioner + OPINION = default_rival_opinion + } + } + stress_impact = { + vengeful = minor_stress_impact_loss + sadistic = minor_stress_impact_loss + callous = minor_stress_impact_loss + compassionate = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_compassion = -1 + ai_vengefulness = 1.5 + } + } + } + + #Option B: Be a little gentle + option = { + name = court.0106.b + if = { + limit = { + scope:executioner = { + has_trait = compassionate + } + } + scope:executioner = { add_stress = major_stress_impact_loss } + progress_towards_friend_effect = { + CHARACTER = scope:executioner + OPINION = default_friend_opinion + REASON = friend_shared_opinions_on_punishment + } + } + else_if = { + limit = { + scope:executioner = { + has_trait = sadistic + } + } + scope:executioner = { add_stress = major_stress_impact_gain } + progress_towards_rival_effect = { + REASON = rival_go_easy_on_prisoners + CHARACTER = scope:executioner + OPINION = default_rival_opinion + } + } + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + compassionate = major_stress_impact_loss + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = 0.5 + ai_vengefulness = -0.5 + } + } + } + + #Option C: Don't care + option = { + name = court.0106.c + if = { + limit = { + any_prisoner = { has_any_secrets = yes } + } + random_list = { + 50 = { + + } + 50 = { + random_prisoner = { + random_secret = { + limit = { + NOT = { + any_secret_knower = { + this = root + } + } + } + reveal_to = root + } + } + } + } + } + stress_impact = { + vengeful = minor_stress_impact_gain + sadistic = minor_stress_impact_gain + compassionate = minor_stress_impact_gain + just = minor_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_honor = -0.5 + ai_vengefulness = -0.5 + } + } + } +} + +# Parent sends you to horny jail +court_yearly.0110 = { + type = character_event + title = court.0110.t + desc = { + desc = court.0110.desc.intro + first_valid = { + triggered_desc = { + trigger = { + has_trait = deviant + } + desc = court.0110.desc.deviant + } + triggered_desc = { + trigger = { + has_trait = lovers_pox + } + desc = court.0110.desc.pox + } + desc = court.0110.desc.notspecial + } + desc = court.0110.desc.outro + } + + theme = court + left_portrait = { + character = scope:parent + animation = worry + } + right_portrait = { + character = cp:councillor_court_chaplain + animation = anger + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_parent = { + exists = yes + is_available_adult = yes + liege = root + is_landed = no + } + 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 + } + OR = { + has_trait = deviant + has_trait = lovers_pox + any_relation = { + type = lover + NOT = { is_consort_of = root } + } + any_relation = { + type = soulmate + NOT = { is_consort_of = root } + } + } + is_eunuch_trigger = no + NOR = { + has_trait = celibate + has_trait = chaste + } + } + + # More likely to trigger if your character is lustful and your parent is chaste + weight_multiplier = { + base = 1 + modifier = { + add = 0.5 + any_parent = { + exists = yes + is_available_adult = yes + liege = root + is_landed = no + has_trait = chaste + } + } + modifier = { + add = 0.5 + cp:councillor_court_chaplain = { + has_trait = chaste + } + } + modifier = { + add = -0.5 + cp:councillor_court_chaplain = { + has_trait = lustful + } + } + modifier = { + add = 0.5 + has_trait = lustful + } + } + + immediate = { + random_parent = { + limit = { + is_alive = yes + is_available_adult = yes + liege = root + is_landed = no + } + save_scope_as = parent + } + cp:councillor_court_chaplain = { + save_scope_as = chaplain + } + } + + # Option A: Imprison your parent and chaplain + option = { + name = court.0110.a + progress_towards_rival_effect = { + REASON = rival_parent_imprisoned + CHARACTER = scope:parent + OPINION = default_rival_opinion + } + progress_towards_rival_effect = { + REASON = rival_parent_imprisoned + CHARACTER = cp:councillor_court_chaplain + OPINION = default_rival_opinion + } + imprison_character_effect = { + TARGET = scope:parent + IMPRISONER = root + } + imprison_character_effect = { + TARGET = cp:councillor_court_chaplain + IMPRISONER = root + } + stress_impact = { + just = major_stress_impact_gain + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + calm = major_stress_impact_gain + } + ai_chance = { + base = 25 + ai_value_modifier = { + ai_vengefulness = 0.5 + ai_honor = -1 + } + } + } + + #Option B: Agree, become celibate + option = { + name = court.0110.b + add_trait = celibate + add_piety = medium_piety_gain + reverse_add_opinion = { + target = cp:councillor_court_chaplain + modifier = impressed_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:parent + modifier = relieved_opinion + opinion = 15 + } + stress_impact = { + vengeful = minor_stress_impact_gain + lustful = major_stress_impact_gain + rakish = massive_stress_impact_gain + stubborn = major_stress_impact_gain + wrathful = major_stress_impact_gain + } + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = -0.5 + ai_zeal = 0.5 + } + modifier = { #Character shouldn't give up sex if they haven't got any children + factor = 0 + any_child = { is_alive = yes count < 1 } + } + modifier = { #More likely to do it if they have a lot of kids + add = 5 + any_child = { is_alive = yes count > 4 } + } + } + } + + #Option C: Refuse and move on + option = { + name = court.0110.c + reverse_add_opinion = { + target = cp:councillor_court_chaplain + modifier = disappointed_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:parent + modifier = disappointed_opinion + opinion = -15 + } + stress_impact = { + } + ai_chance = { + base = 50 + } + } +} + +########################### +# Questionable Concoction # +# by Joe Parkin # +########################### + +scripted_trigger court_8100_physician_trigger = { + is_available_ai_adult = yes + NOT = { government_has_flag = government_is_theocracy } + NOT = { has_trait = devoted } + NAND = { + exists = ROOT.cp:councillor_court_chaplain + THIS = ROOT.cp:councillor_court_chaplain + } +} + +scripted_trigger court_8100_witch_trigger = { + OR = { + has_trait = lifestyle_mystic + has_trait = lifestyle_herbalist + has_trait = witch + any_secret = { type = secret_witch } + } +} + +court_yearly.8100 = { + type = character_event + title = court.8100.t + desc = court.8100.desc + theme = court + cooldown = { years = 10 } + left_portrait = { + character = scope:physician + animation = throne_room_conversation_4 + } + right_portrait = { + character = scope:food_taster + animation = throne_room_conversation_1 + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + employs_court_position = court_physician_court_position + any_court_position_holder = { + type = court_physician_court_position + court_8100_physician_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + any_court_position_holder = { + type = court_physician_court_position + court_8100_physician_trigger = yes + court_8100_witch_trigger = yes + } + } + } + + immediate = { + random_court_position_holder = { + type = court_physician_court_position + limit = { court_8100_physician_trigger = yes } + weight = { + modifier = { + factor = 100 + court_8100_witch_trigger = yes + } + } + save_scope_as = physician + } + if = { + limit = { + employs_court_position = food_taster_court_position + any_court_position_holder = { + type = food_taster_court_position + is_available_ai_adult = yes + THIS != scope:physician + } + } + random_court_position_holder = { + type = food_taster_court_position + limit = { + is_available_ai_adult = yes + THIS != scope:physician + } + save_scope_as = food_taster + } + } + else = { + random_courtier_or_guest = { save_scope_as = food_taster } + } + } + + option = { # Your strongest potion, you say? + name = court.8100.a + stress_impact = { + craven = major_stress_impact_gain # What if I am not strong enough? + humble = medium_stress_impact_gain # I am fine with my strength + content = medium_stress_impact_gain # "" + } + add_prestige = minor_prestige_gain + random_list = { + 1 = { + desc = court.8100.tt.handle_potion + modifier = { factor = scope:physician.learning } + modifier = { + factor = 2 + scope:physician = { has_trait = lifestyle_mystic } + } + modifier = { + factor = 2 + scope:physician = { has_trait = lifestyle_herbalist } + } + modifier = { + factor = 2 + scope:physician = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + } + add_character_modifier = { + modifier = strong_potion_modifier + years = 5 + } + } + 45 = { + desc = court.8100.tt.need_weaker + add_character_modifier = { + modifier = feeling_unwell_modifier + years = 5 + } + stress_impact = { + base = medium_stress_impact_gain + } + } + 1 = { + desc = court.8100.tt.too_strong + modifier = { + factor = 2 + scope:physician = { has_relation_rival = ROOT } + } + modifier = { + factor = 2 + scope:physician = { learning < average_skill_rating } + } + death = { + death_reason = death_strongest_potion + killer = scope:physician + } + add_internal_flag = dangerous + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = craven + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -15 + has_trait = content + } + } + } + + option = { # Try it on my taster first + name = court.8100.b + trigger = { + exists = scope:food_taster + scope:food_taster = { has_court_position = food_taster_court_position } # To check against fallback + } + add_tyranny = minor_tyranny_gain + random_list = { + 1 = { + desc = court.8100.tt.handle_potion + modifier = { factor = scope:physician.learning } + modifier = { + factor = 2 + scope:physician = { has_trait = lifestyle_mystic } + } + modifier = { + factor = 2 + scope:physician = { has_trait = lifestyle_herbalist } + } + modifier = { + factor = 2 + scope:physician = { + OR = { + has_trait = witch + any_secret = { type = secret_witch } + } + } + } + scope:food_taster = { + add_character_modifier = { + modifier = strong_potion_modifier + years = 5 + } + if = { + limit = { + NOT = { has_trait = forgiving } + } + custom_tooltip = court.8100.b.tt_forgiving + add_opinion = { + target = ROOT + modifier = angry_opinion + opinion = -15 + } + } + } + add_character_modifier = { + modifier = strong_potion_modifier + years = 5 + } + } + 45 = { + desc = court.8100.tt.need_weaker + scope:food_taster = { + add_character_modifier = { + modifier = feeling_unwell_modifier + years = 5 + } + add_opinion = { + target = ROOT + modifier = angry_opinion + opinion = -15 + } + } + } + 1 = { + desc = court.8100.tt.too_strong + modifier = { + factor = 2 + scope:physician = { has_relation_rival = ROOT } + } + modifier = { + factor = 2 + scope:physician = { learning < average_skill_rating } + } + scope:food_taster = { + death = { + death_reason = death_strongest_potion + killer = scope:physician + } + } + add_opinion = { + target = scope:physician + modifier = attempted_murder_opinion + } + } + } + stress_impact = { + brave = medium_stress_impact_gain # What if I am not strong enough? + humble = medium_stress_impact_gain # I am fine with my strength + content = medium_stress_impact_gain # "" + compassionate = major_stress_impact_gain # Food tasters are people too + greedy = medium_stress_impact_gain # It's mine, it came to me! + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -2 + ai_energy = 1 + } + modifier = { #Weight down for stress. + add = -15 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -15 + has_trait = humble + } + modifier = { #Weight down for stress. + add = -15 + has_trait = content + } + modifier = { #Weight down for stress. + add = -30 + has_trait = compassionate + } + modifier = { #Weight down for stress. + add = -15 + has_trait = greedy + } + } + } + + option = { # Sacrilege + name = court.8100.c + add_piety = minor_piety_gain + revoke_court_position = { + court_position = court_physician_court_position + recipient = scope:physician + } + reverse_add_opinion = { + target = scope:physician + modifier = angry_opinion + opinion = -15 + } + stress_impact = { + cynical = medium_stress_impact_gain # There is no god + arrogant = medium_stress_impact_gain # I want to be swole + ambitious = medium_stress_impact_gain # "" + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_boldness = -1 + } + modifier = { #Weight down for stress. + add = -30 + has_trait = cynical + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = ambitious + } + } + } + + option = { # I have no need of your potions + name = court.8100.d + add_prestige = miniscule_prestige_loss + reverse_add_opinion = { + target = scope:physician + modifier = insulted_opinion + opinion = -5 + } + stress_impact = { + brave = minor_stress_impact_gain + arrogant = medium_stress_impact_gain # I want to be swole + ambitious = medium_stress_impact_gain # "" + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -2 + ai_greed = -1 + } + modifier = { #Weight down for stress. + add = -5 + has_trait = brave + } + modifier = { #Weight down for stress. + add = -15 + has_trait = arrogant + } + modifier = { #Weight down for stress. + add = -15 + has_trait = ambitious + } + } + } +} + +######################### +# Novel Perspectives # +# by Joe Parkin # +######################### + +scripted_trigger root_faith_compare_doctrine_trigger = { + OR = { + AND = { + faith = { has_doctrine = $DOCTRINE$ } + NOT = { + ROOT.faith = { has_doctrine = $DOCTRINE$ } + } + } + AND = { + ROOT.faith = { has_doctrine = $DOCTRINE$ } + NOT = { + faith = { has_doctrine = $DOCTRINE$ } + } + } + } +} + +scripted_trigger court_8120_zealous_vassal_trigger = { + faith = ROOT.faith + has_trait = zealous + NOR = { + THIS = scope:accuser + THIS = scope:refuter + } +} + +scripted_effect court_8120_convert_vassal_effect = { + if = { + limit = { + any_vassal = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + } + every_vassal = { + limit = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + add_opinion = { + target = ROOT + modifier = pious_opinion + opinion = 10 + } + } + hidden_effect = { + every_courtier_or_guest = { + limit = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + add_opinion = { + target = ROOT + modifier = pious_opinion + opinion = 10 + } + } + } + } + else_if = { + limit = { + any_courtier_or_guest = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + } + every_courtier_or_guest = { + limit = { + court_8120_zealous_vassal_trigger = yes + faith = $FAITH$ + NOT = { THIS = $CONVERTOR$ } + } + add_opinion = { + target = ROOT + modifier = pious_opinion + opinion = 10 + } + } + } +} + +scripted_trigger court_8120_debater_trigger = { + is_available_ai_adult = yes + faith != ROOT.faith + faith = { + faith_hostility_level = { + target = ROOT.faith + value <= faith_hostile_level + } + } + ROOT.faith = { + faith_hostility_level = { + target = PREV.faith + value <= faith_hostile_level + } + } + OR = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_monogamy } # Marriage + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_divorce_disallowed } # Divorce + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_adultery_women_accepted } # Adultery Female + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_adultery_men_accepted } # Adultery Male + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_witchcraft_accepted } # Witchcraft + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_gender_equal } # Equality + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_consanguinity_unrestricted } # Cosanguity + } +} + +court_yearly.8120 = { + type = character_event + title = court.8120.t + desc = { + desc = court.8120.desc.intro + first_valid = { + triggered_desc = { + trigger = { scope:accuser.religion = ROOT.religion } + desc = court.8120.desc.same_religion + } + desc = court.8120.desc.other_religion + } + first_valid = { + # Variables used to find randomly chosen doctrine difference + triggered_desc = { # Marriage + trigger = { var:court_8120_issue = 0 } + desc = court.8120.desc.marriage + } + triggered_desc = { # Divorce + trigger = { var:court_8120_issue = 1 } + desc = court.8120.desc.divorce + } + triggered_desc = { # Adultery + trigger = { var:court_8120_issue = 2 } + desc = court.8120.desc.adultery + } + triggered_desc = { # Witchcraft + trigger = { var:court_8120_issue = 3 } + desc = court.8120.desc.witchcraft + } + triggered_desc = { # Equality + trigger = { var:court_8120_issue = 4 } + desc = court.8120.desc.equality + } + triggered_desc = { # Cosanguity + trigger = { var:court_8120_issue = 5 } + desc = court.8120.desc.cosanguity + } + } + desc = court.8120.desc.outro + } + theme = court + cooldown = { years = 10 } + left_portrait = { + character = scope:accuser + animation = throne_room_conversation_2 + } + right_portrait = { + character = scope:refuter + animation = throne_room_conversation_4 + } + + trigger = { + has_royal_court = yes + has_dlc_feature = royal_court + any_courtier_or_guest = { court_8120_debater_trigger = yes } + trigger_if = { + limit = { + NOT = { exists = cp:councillor_court_chaplain } + } + any_courtier_or_guest = { + is_available_ai_adult = yes + faith = ROOT.faith + } + } + } + + weight_multiplier = { + base = 1 + # Court weightings. + # ep1_weight_up_for_court_type_modifier = { COURT_TYPE = court_scholarly } + } + + immediate = { + # Save 1st debater + ordered_courtier_or_guest = { + limit = { court_8120_debater_trigger = yes } + order_by = learning + random_list = { + 4 = { # Marriage + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_monogamy } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 0 + } + } + if = { # Accuser attacks polygamy + limit = { + faith = { has_doctrine = doctrine_monogamy } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 4 = { # Divorce + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_divorce_disallowed } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 1 + } + } + if = { # Accuser attacks divorce + limit = { + faith = { has_doctrine = doctrine_divorce_disallowed } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 2 = { # Adultery + trigger = { + OR = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_adultery_women_accepted } # 1/2 faiths have this + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_adultery_men_accepted } # 1/2 faiths have this + } + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 2 + } + } + if = { # Accuser attacks adultery + limit = { + NOT = { + faith = { has_doctrine = doctrine_adultery_women_accepted } + } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 4 = { # Witchcraft + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_witchcraft_accepted } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 3 + } + } + if = { # Accuser attacks magic + limit = { + NOT = { + faith = { has_doctrine_parameter = witchcraft_accepted } + } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 2 = { # Equality + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_gender_equal } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 4 + } + } + if = { # Accuser attacks inequality + limit = { + faith = { has_doctrine = doctrine_gender_equal } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + 4 = { # Cosanguity + trigger = { + root_faith_compare_doctrine_trigger = { DOCTRINE = doctrine_consanguinity_unrestricted } # 1/2 faiths have this + } + ROOT = { + set_variable = { # To track which issue was raised + name = court_8120_issue + value = 5 + } + } + if = { # Accuser attacks intermarriage + limit = { + NOT = { + faith = { has_doctrine = doctrine_consanguinity_unrestricted } + } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + } + } + # Save 2nd debater + if = { + limit = { exists = cp:councillor_court_chaplain } + cp:councillor_court_chaplain = { + if = { + limit = { + NOT = { exists = scope:accuser } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + } + else = { + ordered_courtier_or_guest = { + limit = { + is_available_ai_adult = yes + faith = ROOT.faith + } + order_by = learning + if = { + limit = { + NOT = { exists = scope:accuser } + } + save_scope_as = accuser + } + else = { save_scope_as = refuter } + } + } + # Scopes for conversion effects + save_scope_as = character + if = { + limit = { scope:refuter.faith = ROOT.faith } + scope:accuser.faith = { save_scope_as = new_faith } + } + else = { + scope:refuter.faith = { save_scope_as = new_faith } + } + scope:accuser = { assign_quirk_effect = yes } + scope:refuter = { assign_quirk_effect = yes } + } + + option = { # Convert + name = { + text = court.8120.a.accuser + trigger = { scope:refuter.faith = ROOT.faith } + } + name = { + text = court.8120.a.refuter + trigger = { scope:accuser.faith = ROOT.faith } + } + add_piety = massive_piety_loss + if = { + limit = { faith = scope:refuter.faith } + reverse_add_opinion = { + target = scope:refuter + modifier = disappointed_opinion + opinion = -40 + } + reverse_add_opinion = { + target = scope:accuser + modifier = respect_opinion + opinion = 40 + } + court_8120_convert_vassal_effect = { + FAITH = scope:accuser.faith + CONVERTOR = scope:accuser + } + set_character_faith_with_conversion = scope:accuser.faith + } + else = { + reverse_add_opinion = { + target = scope:accuser + modifier = disappointed_opinion + opinion = -40 + } + reverse_add_opinion = { + target = scope:refuter + modifier = respect_opinion + opinion = 40 + } + court_8120_convert_vassal_effect = { + FAITH = scope:refuter.faith + CONVERTOR = scope:refuter + } + set_character_faith_with_conversion = scope:refuter.faith + } + stress_impact = { + zealous = massive_stress_impact_gain + stubborn = medium_stress_impact_gain + lazy = medium_stress_impact_gain + callous = medium_stress_impact_gain + } + ai_chance = { + base = 20 + ai_value_modifier = { + ai_zeal = -1 + ai_energy = 0.5 + ai_rationality = 0.5 + } + modifier = { # Weight down. + add = -100 + THIS = ROOT.faith.religious_head + } + modifier = { # Weight down for stress. + add = -30 + has_trait = zealous + } + modifier = { # Weight down for stress. + add = -15 + has_trait = stubborn + } + modifier = { # Weight down for stress. + add = -15 + has_trait = lazy + } + modifier = { # Weight down for stress. + add = -15 + has_trait = callous + } + } + } + + option = { # Theological kumbaya + name = court.8120.c + trigger = { has_trait = theologian } + reverse_add_opinion = { + target = scope:accuser + modifier = respect_opinion + opinion = 15 + } + reverse_add_opinion = { + target = scope:refuter + modifier = respect_opinion + opinion = 15 + } + stress_impact = { + base = minor_stress_impact_loss + diplomat = minor_stress_impact_loss + cynical = medium_stress_impact_gain + eccentric = minor_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_rationality = 1 + } + modifier = { # Weight up. + add = 15 + has_trait = diplomat + } + modifier = { # Weight down for stress. + add = -15 + has_trait = cynical + } + } + } + + option = { # Defender of the faith + name = court.8120.d + trigger = { has_trait = zealous } + create_artifact = { + name = my_holy_book + description = my_holy_book_description + type = journal + visuals = book + modifier = artifact_monthly_piety_2_modifier + } + if = { + limit = { faith = scope:refuter.faith } + scope:accuser = { select_and_move_to_pool_effect = yes } + reverse_add_opinion = { + target = scope:accuser + modifier = insulted_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:refuter + modifier = pious_opinion + opinion = 15 + } + } + else = { + scope:refuter = { select_and_move_to_pool_effect = yes } + reverse_add_opinion = { + target = scope:refuter + modifier = insulted_opinion + opinion = -15 + } + reverse_add_opinion = { + target = scope:accuser + modifier = pious_opinion + opinion = 15 + } + } + every_vassal = { + limit = { court_8120_zealous_vassal_trigger = yes } # root faith, zealous, not accuser/refuter + custom = court.8120.d.tt + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + hidden_effect = { + every_courtier_or_guest = { + limit = { court_8120_zealous_vassal_trigger = yes } # root faith, zealous, not accuser/refuter + add_opinion = { + target = root + modifier = pious_opinion + opinion = 10 + } + } + } + stress_impact = { + base = minor_stress_impact_loss + lazy = major_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 1 + ai_energy = -1 + } + modifier = { # Weight up. + add = 15 + has_trait = diplomat + } + modifier = { # Weight down for stress. + add = -30 + has_trait = lazy + } + } + } + + option = { # Admonish + name = court.8120.e + if = { + limit = { faith = scope:refuter.faith } + reverse_add_opinion = { + target = scope:accuser + modifier = insulted_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:refuter + modifier = pious_opinion + opinion = 10 + } + progress_towards_rival_effect = { + REASON = rival_refuted_faith + CHARACTER = scope:accuser + OPINION = 0 + } + } + else = { + scope:refuter = { select_and_move_to_pool_effect = yes } + reverse_add_opinion = { + target = scope:refuter + modifier = insulted_opinion + opinion = -10 + } + reverse_add_opinion = { + target = scope:accuser + modifier = pious_opinion + opinion = 10 + } + } + stress_impact = { + cynical = medium_stress_impact_gain + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_compassion = -0.5 + } + modifier = { # Weight down for stress. + add = -15 + has_trait = cynical + } + } + } + + option = { # Dismiss + name = court.8120.f + add_piety = miniscule_piety_gain + reverse_add_opinion = { + target = scope:accuser + modifier = humbled_opinion + opinion = -5 + } + reverse_add_opinion = { + target = scope:refuter + modifier = humbled_opinion + opinion = -5 + } + ai_chance = { + base = 100 + } + } + + after = { remove_variable = court_8120_issue } +} diff --git a/N3OW/events/yearly_events/yearly_events_3.txt b/N3OW/events/yearly_events/yearly_events_3.txt new file mode 100644 index 00000000..c848b43d --- /dev/null +++ b/N3OW/events/yearly_events/yearly_events_3.txt @@ -0,0 +1,3461 @@ + +namespace = yearly + + +####################### +# Dedication to Loyalty +# 3001-3005 +# by Petter Vilberg +####################### + +#Find a vassal who isn't entirely loyal +scripted_trigger yearly_3001_vassal_trigger = { + highest_held_title_tier >= tier_county + OR = { + any_scheme = { + hostile_scheme_trigger = yes + scheme_target_character = root + } + is_a_faction_member = yes + OR = { + opinion = { + target = root + value < 10 + } + has_trait = deceitful + has_trait = fickle + has_trait = ambitious + } + } + is_imprisoned = no + NOR = { + has_trait = content + is_heir_of = root + has_character_modifier = liege_looking_away_modifier + } + is_ai = yes + + #Find either another vassal of the same rank within the same realm as you, or a foreign character of the same rank, or any independent neighbor if you are independent + save_temporary_scope_as = vassal + root = { + trigger_if = { + limit = { top_liege != this } + any_neighboring_realm_same_rank_owner = { yearly_3001_neighbor_trigger = yes } + } + trigger_else = { + any_neighboring_top_liege_realm_owner = { yearly_3001_neighbor_trigger = yes } + } + } +} + +scripted_trigger yearly_3001_possibly_lying_trigger = { + NOR = { + has_trait = honest + has_trait = just + } +} + +scripted_trigger yearly_3001_possibly_truthful_trigger = { + NOT = { has_trait = deceitful } + OR = { + has_trait = honest + opinion = { + target = root + value >= 0 + } + scope:vassal = { + OR = { + any_scheme = { + hostile_scheme_trigger = yes + scheme_target_character = root + } + is_a_faction_member = yes + } + } + } +} + +scripted_trigger yearly_3001_neighbor_trigger = { + OR = { + yearly_3001_possibly_lying_trigger = yes + yearly_3001_possibly_truthful_trigger = yes + } + NOR = { + has_relation_friend = root + has_relation_friend = scope:vassal + } + basic_is_available_ai = yes + #The neighboring ruler has to be within one tier rank of you + save_temporary_scope_value_as = { + name = max_tier + value = { value = root.highest_held_title_tier add = 1 } + } + save_temporary_scope_value_as = { + name = min_tier + value = { value = root.highest_held_title_tier subtract = 1} + } + highest_held_title_tier <= scope:max_tier + highest_held_title_tier >= scope:min_tier +} + +scripted_trigger yearly_3001_vassal_still_available_trigger = { + scope:vassal = { + basic_is_available_ai = yes + is_vassal_of = root + is_ruler = yes + } +} + +#A message from a neighbor +yearly.3001 = { + type = character_event + title = yearly.3001.t + desc = { + desc = yearly.3001.desc + triggered_desc = { + trigger = { + exists = scope:friend + always = scope:friend_guess_truth + } + desc = yearly.3001.friend_backs_neighbor + } + triggered_desc = { + trigger = { + exists = scope:friend + NOT = { always = scope:friend_guess_truth } + } + desc = yearly.3001.friend_backs_vassal + } + } + theme = intrigue + left_portrait = scope:neighbor + lower_left_portrait = scope:friend_backing_neighbor + right_portrait = scope:vassal + lower_right_portrait = scope:friend_backing_vassal + + trigger = { + NOT = { has_character_flag = had_event_yearly_3001 } + is_landed = yes # Requires map location checks + #Find a suitable vassal, also checks for neighbor + any_vassal = { + yearly_3001_vassal_trigger = yes + } + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3001 + years = 10 + } + + #To save the vassal that will be accused + random_vassal = { + limit = { + yearly_3001_vassal_trigger = yes + } + save_scope_as = vassal + } + + #To save the neighbor + if = { + limit = { + top_liege != this + } + random_neighboring_realm_same_rank_owner = { + limit = { yearly_3001_neighbor_trigger = yes } + save_scope_as = neighbor + } + } + else = { + random_neighboring_top_liege_realm_owner = { + limit = { yearly_3001_neighbor_trigger = yes } + save_scope_as = neighbor + } + } + + #Set whether the neighbor is telling the truth or not + random_list = { + 50 = { + trigger = { + scope:neighbor = { + yearly_3001_possibly_truthful_trigger = yes + } + } + save_scope_value_as = { + name = telling_truth + value = yes + } + } + 50 = { + trigger = { + scope:neighbor = { + yearly_3001_possibly_lying_trigger = yes + } + } + save_scope_value_as = { + name = telling_truth + value = no + } + } + } + + #Let a Friend recommend a course of action + if = { + limit = { + any_relation = { + type = best_friend + this != scope:vassal + } + } + random_relation = { + type = best_friend + limit = { + this != scope:vassal + } + save_scope_as = friend + random_list = { + 10 = { + #Friend backs neighbor + modifier = { + add = 50 + exists = scope:telling_truth + } + modifier = { + add = 50 + has_relation_rival = scope:vassal + } + modifier = { + add = 50 + exists = scope:telling_truth + has_trait = intellect_good + } + save_scope_value_as = { + name = friend_guess_truth + value = yes + } + save_scope_as = friend_backing_neighbor + } + 10 = { + #Friend backs vassal + modifier = { + add = 50 + exists = scope:telling_truth + } + modifier = { + add = 50 + has_relation_friend = scope:vassal + } + modifier = { + add = 50 + has_relation_rival = scope:neighbor + } + modifier = { + add = 50 + NOT = { exists = scope:telling_truth } + has_trait = intellect_good + } + save_scope_value_as = { + name = friend_guess_truth + value = no + } + save_scope_as = friend_backing_vassal + } + } + } + } + + # For attempted executions triggering wars: + save_scope_as = actor + scope:vassal = { + save_scope_as = recipient + } + } + + #Confront the vassal in private + option = { + trigger = { + can_add_hook = { + type = threat_hook + target = scope:vassal + } + } + name = yearly.3001.a + show_as_tooltip = { + random_list = { + 1 = { + desc = yearly.3001.true_tt + show_chance = no + add_hook = { + type = threat_hook + target = scope:vassal + } + } + 1 = { + desc = yearly.3001.false_tt + show_chance = no + custom_tooltip = yearly.3001.false_use_tt + } + } + } + hidden_effect = { + if = { + limit = { + always = scope:telling_truth + } + trigger_event = { + id = yearly.3002 + days = { 5 10 } + } + } + else = { + trigger_event = { + id = yearly.3003 + days = { 5 10 } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_rationality = 0.5 + ai_compassion = 0.5 + } + modifier = { + add = 200 + has_trait = shy + } + } + + stress_impact = { + paranoid = medium_stress_impact_gain + } + } + + #Immediately accuse the vassal + option = { + name = yearly.3001.b + show_as_tooltip = { + random_list = { + 1 = { + desc = yearly.3001.true_tt + show_chance = no + add_opinion = { + target = scope:vassal + modifier = plotting_against_liege_opinion + } + } + 1 = { + desc = yearly.3001.false_tt + show_chance = no + add_prestige = major_prestige_loss + } + } + } + hidden_effect = { + if = { + limit = { + always = scope:telling_truth + } + trigger_event = { + id = yearly.3004 + days = { 5 10 } + } + } + else = { + trigger_event = { + id = yearly.3005 + days = { 5 10 } + } + } + } + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = 0.5 + ai_zeal = 0.5 + ai_vengefulness = 0.5 + ai_honor = 0.5 + } + opinion_modifier = { + opinion_target = scope:vassal + multiplier = -1 + } + modifier = { + add = 100 + always = scope:telling_truth + } + } + + stress_impact = { + shy = medium_stress_impact_gain + } + } + + #Denounce the foreign neighbor + # Could give your vassal a boost if the neighbor is telling the truth + option = { + name = yearly.3001.c + add_character_modifier = { + modifier = protected_vassals_honor_modifier + years = 10 + } + scope:neighbor = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -30 + } + } + #Tooltip informs the player of possible bad outcome + show_as_tooltip = { + random_list = { + 1 = { + desc = yearly.3001.c.if_right + show_chance = no + } + 1 = { + desc = yearly.3001.c.if_wrong_tt + show_chance = no + scope:vassal = { + if = { + limit = { + is_a_faction_member = yes + } + joined_faction = { + add_faction_discontent = 20 + } + } + add_character_modifier = { + modifier = liege_looking_away_modifier + years = 5 + } + } + } + } + } + hidden_effect = { + if = { + limit = { + always = scope:telling_truth + } + send_interface_toast = { + title = yearly.3001.vassal_gains_strength + left_icon = scope:vassal + + scope:vassal = { + if = { + limit = { + is_a_faction_member = yes + } + joined_faction = { + add_faction_discontent = 20 + } + } + add_character_modifier = { + modifier = liege_looking_away_modifier + years = 5 + } + } + } + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = 0.5 + ai_honor = 1 + ai_rationality = 0.5 + } + opinion_modifier = { + opinion_target = scope:vassal + } + opinion_modifier = { + opinion_target = scope:neighbor + multiplier = -0.5 + } + modifier = { + add = -100 + ai_diplomacy_stance = { + target = scope:neighbor + stance = threat + } + } + modifier = { + add = -200 + ai_diplomacy_stance = { + target = scope:neighbor + stance = friend + } + } + modifier = { + add = 200 + ai_diplomacy_stance = { + target = scope:neighbor + stance = enemy + } + } + } + } + + #Kill the vassal right away + option = { + name = yearly.3001.d + trigger = { + has_trait = paranoid + } + trait = paranoid + add_internal_flag = dangerous + duel = { + target = scope:vassal + skill = intrigue + 10 = { + compare_modifier = { + value = scope:duel_value + } + add_dread = major_dread_gain + imprison_character_effect = { + TARGET = scope:vassal + IMPRISONER = root + } + } + 10 = { + scope:vassal = { + #If target is count or higher, start war. + if = { + limit = { + is_landed = 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 + } + } + else = { + war_for_imprison_effect = yes + } + } + #If target is a baron or unlanded, have them escape. + else_if = { + limit = { is_landed = yes } + depose_effect = { DEPOSER = root } + } + else = { move_to_pool = yes } + } + } + } + + stress_impact = { + compassionate = major_stress_impact_gain + } + + ai_chance = { + base = 20 + modifier = { + add = 50 + ai_diplomacy_stance = { + target = scope:vassal + stance = threat + } + } + ai_value_modifier = { + ai_vengefulness = 1 + ai_boldness = 1 + } + } + } +} + + +#Confront the Vassal - they admit wrongdoing +yearly.3002 = { + type = character_event + title = yearly.3002.t + desc = yearly.3002.desc + theme = vassal + left_portrait = { + character = scope:vassal + animation = shame + } + + trigger = { + yearly_3001_vassal_still_available_trigger = yes + } + + immediate = { + scope:vassal = { + if = { + limit = { root = { is_ai = no } } + assign_quirk_effect = yes + } + } + } + + #You better do as I say from now on + option = { + name = yearly.3002.a + if = { + limit = { + can_add_hook = { + target = scope:vassal + type = threat_hook + } + } + add_hook = { + target = scope:vassal + type = threat_hook + } + } + else = { + add_prestige = medium_prestige_gain + } + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_compassion = 0.5 + } + } + } + + #Make sure everyone knows how forgiving and benevolent I am + option = { + name = yearly.3002.b + add_character_modifier = { + modifier = yearly_benevolent_forgiveness_modifier + years = 10 + } + if = { + limit = { + tyranny > 0 + } + add_tyranny = -10 + } + scope:vassal = { + add_character_modifier = { + modifier = yearly_close_watch_modifier + years = 5 + } + } + + stress_impact = { + deceitful = minor_stress_impact_gain + callous = medium_stress_impact_gain + vengeful = major_stress_impact_gain + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_rationality = 0.5 + ai_honor = 1 + } + } + } +} + +#Confront the Vassal - they have done nothing +yearly.3003 = { + type = character_event + title = yearly.3003.t + desc = { + desc = yearly.3003.desc + triggered_desc = { + trigger = { + exists = scope:friend + scope:friend.diplomacy >= decent_skill_rating + } + desc = yearly.3003.friend + } + } + left_portrait = { + character = scope:vassal + animation = anger + } + right_portrait = scope:friend + theme = vassal + + trigger = { + yearly_3001_vassal_still_available_trigger = yes + } + + option = { + name = yearly.3003.a + if = { + limit = { + scope:vassal = { + vassal_contract_can_be_modified_trigger = yes + vassal_contract_obligation_level_can_be_decreased = feudal_government_taxes + } + } + scope:vassal = { vassal_contract_decrease_obligation_level = feudal_government_taxes } + } + else = { + pay_short_term_gold = { + target = scope:vassal + gold = root.major_gold_value + } + } + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_boldness = -0.5 + ai_honor = 1 + } + } + } + + option = { + name = yearly.3003.b + scope:vassal = { + add_opinion = { + target = root + modifier = insult_opinion + opinion = -20 + } + } + duel = { + target = scope:vassal + skill = diplomacy + 10 = { + desc = yearly.3003.public_expression_of_gratitude + + send_interface_toast = { + title = yearly.3003.public_expression_of_gratitude + left_icon = scope:vassal + + add_prestige = medium_prestige_loss + } + } + 5 = { + desc = yearly.3003.vassal_loss_of_faith + send_interface_toast = { + title = yearly.3003.vassal_loss_of_faith + left_icon = scope:vassal + + add_character_modifier = { + modifier = vassal_distrust_modifier + years = 10 + } + } + } + } + + stress_impact = { + arrogant = major_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + } + } + } + + option = { + name = yearly.3003.c + trigger = { + exists = scope:friend + } + custom_tooltip = yearly.3003.c.enable + reverse_add_opinion = { + target = scope:vassal + modifier = grateful_opinion + opinion = 15 + } + add_prestige = minor_prestige_gain + + ai_chance = { + base = 500 + } + } +} + +#Expose the Vassal - they admit wrongdoing +yearly.3004 = { + type = character_event + title = yearly.3004.t + desc = yearly.3004.desc + theme = vassal + left_portrait = { + character = scope:vassal + animation = shame + } + + trigger = { + yearly_3001_vassal_still_available_trigger = yes + } + + immediate = { + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = plotting_against_liege_opinion + } + } + } + + #A measure of forgiveness + option = { + name = yearly.3004.a + add_prestige = medium_prestige_gain + scope:vassal = { + if = { + limit = { + vassal_contract_obligation_level_can_be_increased = feudal_government_taxes + } + vassal_contract_increase_obligation_level = feudal_government_taxes + } + } + if = { + limit = { + can_add_hook = { + target = scope:vassal + type = loyalty_hook + } + } + add_hook = { + target = scope:vassal + type = loyalty_hook + } + } + + reverse_add_opinion = { + target = scope:vassal + modifier = grateful_opinion + opinion = 20 + } + hidden_effect = { + remove_opinion = { + target = scope:vassal + modifier = plotting_against_liege_opinion + } + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 0.5 + ai_compassion = 1 + } + } + + stress_impact = { + vengeful = major_stress_impact_gain + paranoid = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + } + + #Imprison them + option = { + name = yearly.3004.b + imprison_character_effect = { + TARGET = scope:vassal + IMPRISONER = root + } + add_prestige = minor_prestige_gain + + stress_impact = { + forgiving = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_rationality = 0.5 + } + } + } + + #Execute them + option = { + name = yearly.3004.c + execute_prisoner_effect = { + VICTIM = scope:vassal + EXECUTIONER = root + } + + stress_impact = { + compassionate = major_stress_impact_gain + forgiving = major_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_vengefulness = 1 + } + modifier = { + add = 100 + has_trait = paranoid + } + } + } +} + +#Expose the Vassal - they have done nothing +yearly.3005 = { + type = character_event + title = yearly.3004.t + desc = yearly.3005.desc + theme = vassal + left_portrait = { + character = scope:vassal + animation = anger + } + + trigger = { + yearly_3001_vassal_still_available_trigger = yes + } + + #Prestige loss + option = { + name = yearly.3005.a + duel = { + skill = diplomacy + value = 10 + 10 = { + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + desc = yearly.3005.a.rousing_speech + send_interface_toast = { + title = yearly.3005.a.rousing_speech + left_icon = scope:vassal + + add_prestige = minor_prestige_loss + reverse_add_opinion = { + target = scope:vassal + modifier = insult_opinion + opinion = -10 + } + } + } + 5 = { + desc = yearly.3005.a.stumbling_apology + send_interface_toast = { + title = yearly.3005.a.stumbling_apology + left_icon = scope:vassal + + add_prestige = major_prestige_loss + reverse_add_opinion = { + target = scope:vassal + modifier = insult_opinion + opinion = -20 + } + } + } + } + + stress_impact = { + callous = medium_stress_impact_gain + sadistic = medium_stress_impact_gain + } + + ai_chance = { + base = 200 + } + } + + #Imprison them anyways + option = { + name = yearly.3005.b + add_dread = medium_dread_gain + imprison_character_effect_ignore_reason = { + TARGET = scope:vassal + IMPRISONER = root + } + + stress_impact = { + forgiving = major_stress_impact_gain + just = major_stress_impact_gain + } + + ai_chance = { + base = 50 + ai_value_modifier = { + ai_boldness = 1 + ai_vengefulness = 0.5 + } + modifier = { + add = 100 + has_trait = paranoid + } + } + } +} + + + + +############################# +# An Impression Twice Made +# +# by Petter Vilberg +############################# + +scripted_trigger yearly_3011_fellow_vassal_trigger = { + is_available_ai_adult = yes + this != root + NOR = { + has_relation_rival = liege + has_relation_rival = root + has_relation_friend = liege + has_relation_friend = root + } + liege = { + opinion = { + target = prev + value < 10 + } + } +} + +scripted_trigger yearly_3011_liege_trigger = { + is_available_ai_adult = yes + opinion = { + target = root + value < 10 + } + any_vassal = { + yearly_3011_fellow_vassal_trigger = yes + } +} + +scripted_trigger yearly_3011_nemesis_trigger = { + is_available_ai_adult = yes +} + +#A fellow vassal comes with a suggestion +yearly.3011 = { + type = character_event + title = yearly.3011.t + desc = yearly.3011.desc + left_portrait = scope:vassal + right_portrait = scope:liege + theme = diplomacy + + trigger = { + NOT = { has_character_flag = had_event_yearly_3011 } + top_liege != this + liege ?= { + yearly_3011_liege_trigger = yes + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3011 + years = 10 + } + liege = { + save_scope_as = liege + random_vassal = { + limit = { + yearly_3011_fellow_vassal_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 3 + has_relation_potential_friend = root + } + modifier = { + add = 1 + has_relation_friend = root + } + } + save_scope_as = vassal + } + } + if = { + limit = { + any_relation = { + type = nemesis + yearly_3011_nemesis_trigger = yes + } + } + random_relation = { + type = nemesis + limit = { + yearly_3011_nemesis_trigger = yes + } + save_scope_as = nemesis + } + } + } + + #I will provide the gold + option = { + name = yearly.3011.a + trigger = { + gold > 0 + } + remove_short_term_gold = medium_gold_value + show_as_tooltip = { + duel = { + skill = stewardship + value = 10 + 10 = { + desc = yearly.3011.a.success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + 10 = { + desc = yearly.3011.a.failure + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + } + } + hidden_effect = { + duel = { + skill = stewardship + value = 10 + 10 = { #Success + compare_modifier = { + value = scope:duel_value + multiplier = 0.5 + } + trigger_event = { + id = yearly.3012 + days = { 5 10 } + } + } + 10 = { #Relative Failure + trigger_event = { + id = yearly.3013 + days = { 5 10 } + } + } + 7 = { #Nemesis-engineered failure + trigger = { + exists = scope:nemesis + } + trigger_event = { + id = yearly.3014 + days = { 5 10 } + } + } + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + compare_modifier = { + value = gold + offset = medium_gold_value + } + ai_value_modifier = { + ai_greed = -1 + } + } + } + + #I will find the entertainment + option = { + name = yearly.3011.b + add_prestige = medium_prestige_loss + show_as_tooltip = { + duel = { + skill = diplomacy + value = 10 + 10 = { + desc = yearly.3011.a.success + compare_modifier = { + value = scope:duel_value + } + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + 10 = { + desc = yearly.3011.a.failure + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + } + } + hidden_effect = { + duel = { + skill = diplomacy + value = 10 + 10 = { #Success + compare_modifier = { + value = scope:duel_value + } + trigger_event = { + id = yearly.3012 + days = { 5 10 } + } + } + 10 = { #Relative Failure + trigger_event = { + id = yearly.3013 + days = { 5 10 } + } + } + 7 = { #Nemesis-engineered failure + trigger = { + exists = scope:nemesis + } + trigger_event = { + id = yearly.3014 + days = { 5 10 } + } + } + } + } + + stress_impact = { + shy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + compare_modifier = { + value = prestige + offset = medium_prestige_value + } + } + } + + #Opt out + option = { + name = yearly.3011.c + add_character_modifier = { + modifier = yearly_improved_impressions_modifier + years = 5 + } + ai_chance = { + base = 25 + } + } + + #We don't need much + option = { + name = yearly.3011.d + trigger = { + OR = { + has_trait = gregarious + has_trait = lifestyle_reveler + } + } + trait = gregarious + trait = lifestyle_reveler + show_as_tooltip = { + duel = { + skill = stewardship + value = 10 + 12 = { + desc = yearly.3011.a.success + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + } + } + 8 = { + desc = yearly.3011.a.failure + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + } + } + } + } + hidden_effect = { + duel = { + skill = stewardship + value = 10 + 12 = { #Success + compare_modifier = { + value = stewardship + offset = average_skill_rating + } + trigger_event = { + id = yearly.3012 + days = { 5 10 } + } + } + 8 = { #Relative Failure + trigger_event = { + id = yearly.3013 + days = { 5 10 } + } + } + 5 = { #Nemesis-engineered failure + trigger = { + exists = scope:nemesis + } + trigger_event = { + id = yearly.3014 + days = { 5 10 } + } + } + } + } + add_character_modifier = { + modifier = yearly_improved_impressions_modifier + years = 3 + } + + ai_chance = { + base = 500 + } + } +} + + + +#Success +yearly.3012 = { + type = character_event + title = yearly.3011.t + desc = yearly.3012.desc + theme = diplomacy + override_background = { + reference = feast + } + left_portrait = { + character = scope:liege + animation = happiness + } + right_portrait = scope:vassal + + trigger = { + scope:liege = { + basic_is_available_ai = yes + } + scope:vassal = { + is_alive = yes + } + } + + immediate = { + hidden_effect = { + if = { + limit = { + NOT = { + has_relation_friend = scope:vassal + } + } + if = { + limit = { + has_relation_potential_friend = scope:vassal + } + random = { + chance = 50 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + else = { + set_relation_potential_friend = scope:vassal + random = { + #Tiny chance that it jumps straight into friendship + chance = 10 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + } + } + } + + option = { + name = yearly.3012.a + trigger = { + exists = scope:gain_friendship + } + exclusive = yes + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + add_opinion = { + target = scope:vassal + modifier = impressed_opinion + opinion = 30 + } + } + set_relation_friend = { reason = friend_feast_for_liege target = scope:vassal involved_character = scope:liege } + } + + option = { + name = yearly.3012.b + scope:liege = { + add_opinion = { + target = root + modifier = impressed_opinion + opinion = 30 + } + add_opinion = { + target = scope:vassal + modifier = impressed_opinion + opinion = 30 + } + } + reverse_add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 15 + } + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 15 + } + } + } +} + + +#Limited Success +yearly.3013 = { + type = character_event + title = yearly.3011.t + desc = yearly.3013.desc + left_portrait = scope:liege + right_portrait = scope:vassal + theme = diplomacy + + trigger = { + scope:liege = { + basic_is_available_ai = yes + } + scope:vassal = { + is_alive = yes + } + } + + immediate = { + hidden_effect = { + if = { + limit = { + NOT = { + has_relation_friend = scope:vassal + } + } + if = { + limit = { + has_relation_potential_friend = scope:vassal + } + random = { + chance = 30 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + else = { + set_relation_potential_friend = scope:vassal + random = { + chance = 5 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + } + } + } + + option = { + name = yearly.3013.a + trigger = { + exists = scope:gain_friendship + } + exclusive = yes + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + add_opinion = { + target = scope:vassal + modifier = pleased_opinion + opinion = 15 + } + } + set_relation_friend = { reason = friend_feast_for_liege target = scope:vassal involved_character = scope:liege } + } + + option = { + name = yearly.3013.b + scope:liege = { + add_opinion = { + target = root + modifier = pleased_opinion + opinion = 15 + } + add_opinion = { + target = scope:vassal + modifier = pleased_opinion + opinion = 15 + } + } + reverse_add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 10 + } + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 10 + } + } + } +} + + +#Failure! +yearly.3014 = { + type = character_event + title = yearly.3011.t + desc = yearly.3014.desc + left_portrait = { + character = scope:liege + animation = dismissal + } + right_portrait = scope:vassal + lower_left_portrait = scope:nemesis + theme = diplomacy + + trigger = { + scope:liege = { + basic_is_available_ai = yes + } + scope:vassal = { + is_alive = yes + } + } + + immediate = { + if = { + limit = { + NOT = { + has_relation_friend = scope:vassal + } + } + if = { + limit = { + has_relation_potential_friend = scope:vassal + } + random = { + chance = 10 + save_scope_value_as = { + name = gain_friendship + value = yes + } + } + } + else = { + hidden_effect = { + set_relation_potential_friend = scope:vassal + } + } + } + } + + option = { + name = yearly.3014.a + trigger = { + exists = scope:gain_friendship + } + exclusive = yes + scope:liege = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + add_opinion = { + target = scope:vassal + modifier = disappointed_opinion + opinion = -10 + } + } + set_relation_friend = { reason = friend_feast_for_liege target = scope:vassal involved_character = scope:liege } + } + + option = { + name = yearly.3014.b + scope:liege = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -10 + } + add_opinion = { + target = scope:vassal + modifier = disappointed_opinion + opinion = -10 + } + } + reverse_add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 5 + } + hidden_effect = { + add_opinion = { + target = scope:vassal + modifier = friendliness_opinion + opinion = 5 + } + } + } +} + + + +#################### +# On Their Deathbed +# by Petter Vilberg +#################### + +scripted_trigger yearly_3021_deathbed_trigger = { + is_ai = yes + health <= death_chance_dying_health + age >= 45 + is_imprisoned = no + OR = { + has_relation_friend = root + court_owner = root + is_close_or_extended_family_of = root + } + reverse_opinion = { + target = root + value > 0 + } + opinion = { + target = root + value > 20 + } +} + + +yearly.3021 = { + type = character_event + title = yearly.3021.t + desc = yearly.3021.desc + theme = death + left_portrait = { + character = scope:deathbed_character + animation = personality_compassionate + } + + trigger = { + is_ai = no + get_characters_of_interest_trigger = { + LISTNAME = characters + } + any_in_list = { + list = characters + yearly_3021_deathbed_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + add = 1 + any_consort = { + yearly_3021_deathbed_trigger = yes + } + } + modifier = { + add = 1 + any_child = { + yearly_3021_deathbed_trigger = yes + } + } + } + + immediate = { + get_characters_of_interest_effect = { + LISTNAME = potential_characters + } + random_in_list = { + list = potential_characters + limit = { + yearly_3021_deathbed_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 2 + is_consort_of = root + } + modifier = { + add = 2 + is_child_of = root + } + } + save_scope_as = deathbed_character + } + play_music_cue = "mx_cue_death" + } + + option = { + name = yearly.3021.a + add_character_flag = { + flag = knows_of_spouse_death_flag + days = 5 + } + scope:deathbed_character = { + death = natural + } + stress_impact = { + base = medium_stress_loss + } + add_piety = medium_piety_gain + } +} + + +################### +# Getting Ahead +# by Petter Vilberg +################### + +scripted_trigger yearly_3031_vassal_trigger = { + is_ai = yes + this != root + highest_held_title_tier = root.highest_held_title_tier + NOR = { + has_relation_rival = root + has_relation_friend = root + has_relation_lover = root + } +} + +scripted_trigger yearly_3031_liege_trigger = { + is_ai = yes + any_vassal = { + yearly_3031_vassal_trigger = yes + } +} + +yearly.3031 = { + type = character_event + title = yearly.3031.t + desc = { + desc = yearly.3031.desc + triggered_desc = { + trigger = { exists = scope:best_friend } + desc = yearly.3031.friend + } + triggered_desc = { + trigger = { exists = scope:nemesis } + desc = yearly.3031.rival + } + } + left_portrait = liege + lower_left_portrait = scope:best_friend + right_portrait = scope:fellow_vassal + lower_right_portrait = scope:nemesis + theme = intrigue + + trigger = { + top_liege != this + is_adult = yes + NOT = { has_character_flag = had_event_yearly_3031 } + NOR = { + has_trait = generous + has_trait = content + } + liege = { + yearly_3031_liege_trigger = yes + } + } + + weight_multiplier = { + base = 1 + modifier = { + factor = 2 + has_trait = ambitious + } + nemesis_event_weight_modifier = yes + best_friend_event_weight_modifier = yes + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3031 + years = 10 + } + liege = { + random_vassal = { + limit = { + yearly_3031_vassal_trigger = yes + } + weight = { + base = 1 + modifier = { + add = 3 + has_relation_potential_rival = root + } + } + save_scope_as = fellow_vassal + } + + capital_barony = { + save_scope_as = capital + } + save_scope_as = liege + } + + if = { + limit = { + has_relation_potential_rival = scope:fellow_vassal + } + save_scope_value_as = { + name = gain_rival + value = yes + } + } + else = { + hidden_effect = { + random = { + chance = 25 + opinion_modifier = { + who = scope:fellow_vassal + opinion_target = root + multiplier = -0.5 + } + + save_scope_value_as = { + name = gain_rival + value = yes + } + } + } + } + + if = { + limit = { + any_relation = { + type = friend + liege ?= root.liege + is_available_ai_adult = yes + } + } + random_relation = { + type = friend + limit = { + liege ?= root.liege + is_available_ai_adult = yes + } + save_scope_as = best_friend + } + } + if = { + limit = { + any_relation = { + type = rival + liege ?= root.liege + is_available_ai_adult = yes + } + } + random_relation = { + type = rival + limit = { + liege ?= root.liege + is_available_ai_adult = yes + } + save_scope_as = nemesis + } + } + } + + #Charm liege's pants off + option = { + name = yearly.3031.a + duel = { + target = scope:fellow_vassal + skill = diplomacy + 5 = { + desc = yearly.3031.a.best_friend_success + trigger = { + exists = scope:best_friend + } + compare_modifier = { + target = scope:best_friend + value = diplomacy + multiplier = 0.25 + } + min = 1 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_prestige = medium_prestige_gain + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.best_friend_success + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_prestige = medium_prestige_gain + + scope:fellow_vassal = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + stress_impact = { + base = minor_stress_gain + } + } + } + } + } + 10 = { + desc = yearly.3031.a.success + compare_modifier = { + value = scope:duel_value + } + min = 2 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_prestige = medium_prestige_gain + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.success + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_prestige = medium_prestige_gain + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + 10 = { + desc = yearly.3031.a.failure + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.failure + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + + 5 = { + desc = yearly.3031.a.nemesis_failure + trigger = { + exists = scope:nemesis + } + compare_modifier = { + target = scope:nemesis + value = diplomacy + multiplier = 0.25 + } + min = 1 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.nemesis_failure + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + } + } + + #Show that you're more pious + option = { + name = yearly.3031.b + duel = { + target = scope:fellow_vassal + skill = learning + 5 = { + desc = yearly.3031.a.best_friend_success + trigger = { + exists = scope:best_friend + } + compare_modifier = { + target = scope:best_friend + value = learning + multiplier = 0.25 + } + min = 1 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_piety = medium_piety_gain + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.best_friend_success + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_piety = medium_piety_gain + + scope:fellow_vassal = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + stress_impact = { + base = minor_stress_gain + } + } + } + } + } + 10 = { + desc = yearly.3031.b.success + compare_modifier = { + value = scope:duel_value + } + min = 2 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_piety = medium_piety_gain + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.b.success + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_piety = medium_piety_gain + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = angry_opinion + opinion = -30 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + 10 = { + desc = yearly.3031.b.failure + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.b.failure + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -15 + } + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + 5 = { + desc = yearly.3031.a.nemesis_failure + trigger = { + exists = scope:nemesis + } + compare_modifier = { + target = scope:nemesis + value = learning + multiplier = 0.25 + } + min = 1 + show_as_tooltip = { + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + + add_piety = medium_piety_loss + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + } + } + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.a.nemesis_failure + left_icon = liege + right_icon = scope:fellow_vassal + + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + + add_piety = medium_piety_loss + + scope:fellow_vassal = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + add_opinion = { + target = root + modifier = respect_opinion + opinion = -15 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = 30 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + } + } + } + } + + #Literally charm liege's pants off + option = { + name = yearly.3031.c + trigger = { + might_cheat_on_every_partner_trigger = yes + scope:liege = { + is_attracted_to_gender_of = root + NOT = { has_trait = chaste } + might_cheat_on_every_partner_trigger = yes + } + attraction >= 10 + } + custom_tooltip = yearly.3031.c.unlock_tt + + show_as_tooltip = { + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + reverse_add_opinion = { + target = liege + modifier = friendliness_opinion + opinion = 20 + } + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + } + } + + custom_tooltip = yearly.3031.c.consequence + + hidden_effect = { + send_interface_toast = { + title = yearly.3031.c.success + left_icon = liege + right_icon = scope:fellow_vassal + + if = { + limit = { + can_add_hook = { + type = favor_hook + target = liege + } + } + add_hook = { + type = favor_hook + target = liege + } + } + + reverse_add_opinion = { + target = liege + modifier = friendliness_opinion + opinion = 20 + } + + + scope:fellow_vassal = { + add_opinion = { + target = root + modifier = respect_opinion + opinion = -20 + } + reverse_add_opinion = { + target = liege + modifier = respect_opinion + opinion = -20 + } + } + + if = { + limit = { + exists = scope:gain_rival + } + liege = { save_scope_as = relationship_reason_involved_character } + progress_towards_rival_effect = { + REASON = rival_competing_for_liege + CHARACTER = scope:fellow_vassal + OPINION = 0 + } + clear_saved_scope = relationship_reason_involved_character + } + else = { + random = { + chance = 60 + if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:fellow_vassal } + } + set_relation_potential_rival = scope:fellow_vassal + } + } + } + } + + #Try to set up a seduction scheme towards root + liege = { + if = { + limit = { + any_scheme = { + type = seduce + NOT = { scheme_target_character = root } + } + } + random_scheme = { + type = seduce + limit = { + NOT = { scheme_target_character = root } + } + end_scheme = yes + } + } + if = { + limit = { + can_start_scheme = { + target_character = root + type = seduce + } + } + start_scheme = { + target_character = root + type = seduce + } + } + } + } + } + + #All vassals should work together + option = { + name = yearly.3031.d + add_character_modifier = { + modifier = yearly_befriending_fellow_vassals_modifier + years = 5 + } + } +} + + + +#################### +# A Good FaithPracticioner +# by Petter Vilberg +#################### + +yearly.3040 = { + type = character_event + title = yearly.3040.t + desc = yearly.3040.desc + left_portrait = root + right_portrait = scope:religious_head + theme = faith + + trigger = { + is_landed = yes # Thematically landed + piety_level >= 2 + NOT = { has_character_flag = had_event_yearly_3040 } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3040 + years = 10 + } + if = { + limit = { + exists = faith.religious_head + faith.religious_head != root + } + faith.religious_head = { save_scope_as = religious_head } + } + play_music_cue = "mx_cue_general_crusade_event_2" + } + + #Spread word of my piety far and wide + option = { + name = yearly.3040.a + add_piety = minor_piety_loss + add_prestige = medium_prestige_gain + } + + #Maybe I have been a little too lenient on the religious authorities... + option = { + name = yearly.3040.b + add_piety = medium_piety_loss + add_treasury_or_gold = medium_treasury_or_gold_value + } + + #The FaithHead must surely appreciate my dedication + option = { + name = yearly.3040.c + trigger = { + exists = scope:religious_head + } + scope:religious_head = { + add_opinion = { + target = root + modifier = pious_opinion + opinion = 30 + } + } + } + + #My religious vassals must appreciate it + option = { + name = yearly.3040.d + trigger = { + NOT = { exists = scope:religious_head } + } + add_character_modifier = { + modifier = yearly_pious_liege_modifier + years = 10 + } + } +} + + +############################## +# Chafing Under Secular Laws +# by Petter Vilberg +############################## +scripted_trigger yearly_3041_religious_vassal = { + is_ai = yes + government_has_flag = government_is_theocracy + faith = root.faith +} + +#Theocracy vassal requests more lenient contract +yearly.3041 = { + type = letter_event + opening = { + desc = yearly.3041.opening + } + desc = yearly.3041.desc + sender = scope:vassal + + trigger = { + NOT = { has_character_flag = had_event_yearly_3041 } + any_vassal = { + yearly_3041_religious_vassal = yes + } + trigger_if = { + limit = { exists = faith.religious_head } + faith.religious_head != root + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3041 + years = 5 + } + random_vassal = { + limit = { + yearly_3041_religious_vassal = yes + } + save_scope_as = vassal + } + if = { + limit = { exists = faith.religious_head } + faith.religious_head = { save_scope_as = religious_head } + } + } + + #Reduce taxes + option = { + name = yearly.3041.a + add_piety = medium_piety_gain + add_character_modifier = { + modifier = yearly_reduced_theocracy_tax_modifier + years = 10 + } + scope:vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 40 + } + } + + stress_impact = { + greedy = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -1 + } + } + } + + #Reduce levies + option = { + name = yearly.3041.b + add_piety = major_piety_gain + add_character_modifier = { + modifier = yearly_reduced_theocracy_levies_modifier + years = 10 + } + scope:vassal = { + add_opinion = { + target = root + modifier = grateful_opinion + opinion = 20 + } + } + + stress_impact = { + greedy = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = -0.5 + } + } + } + + option = { + name = yearly.3041.c + scope:vassal = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -20 + } + } + if = { + limit = { exists = scope:religious_head } + scope:religious_head = { + add_opinion = { + target = root + modifier = disappointed_opinion + opinion = -15 + } + } + } + + stress_impact = { + zealous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_zeal = -1 + ai_rationality = 0.5 + } + } + } +} + + + + +#################### +# By Right +# by Petter Vilberg +#################### + +scripted_trigger yearly_3051_county_trigger = { + tier = tier_county + this != holder.primary_title + NOT = { + root = { + has_claim_on = prev + } + } +} + +scripted_trigger yearly_3051_vassal_trigger = { + opinion = { + target = root + value < 0 + } + OR = { + NOT = { is_close_or_extended_family_of = root } + opinion = { + target = root + value < -40 + } + } + any_held_title = { + yearly_3051_county_trigger = yes + } + NOR = { + has_relation_friend = root + has_relation_lover = root + } + is_ai = yes +} + +yearly.3051 = { + type = character_event + title = yearly.3051.t + desc = yearly.3051.desc + theme = vassal + left_portrait = { + character = scope:councillor + animation = personality_rational + } + right_portrait = { + character = scope:vassal + animation = worry + } + + trigger = { + NOT = { has_character_flag = had_event_yearly_3051 } + any_vassal = { + yearly_3051_vassal_trigger = yes + trigger_if = { + limit = { + exists = root.cp:councillor_steward + } + NOT = { + this = root.cp:councillor_steward + } + } + } + OR = { + AND = { + exists = cp:councillor_steward + cp:councillor_steward = { is_alive = yes } + } + AND = { + exists = cp:councillor_spouse + cp:councillor_spouse = { + is_performing_council_task = task_manage_domain + } + } + } + } + + weight_multiplier = { + base = 1 + } + + immediate = { + add_character_flag = { + flag = had_event_yearly_3051 + years = 10 + } + random_vassal = { + limit = { + yearly_3051_vassal_trigger = yes + NOT = { this = cp:councillor_steward } + } + random_held_title = { + limit = { + yearly_3051_county_trigger = yes + } + save_scope_as = county + } + save_scope_as = vassal + } + if = { + limit = { + exists = cp:councillor_spouse + cp:councillor_spouse = { + is_performing_council_task = task_manage_domain + } + } + cp:councillor_spouse = { + save_scope_as = councillor + } + } + else = { + cp:councillor_steward = { + save_scope_as = councillor + } + } + hidden_effect = { + if = { + limit = { + can_set_relation_rival_trigger = { CHARACTER = scope:vassal } + } + if = { + limit = { + has_relation_potential_rival = scope:vassal + } + save_scope_value_as = { + name = becoming_rivals + value = yes + } + } + else = { + random = { + chance = 20 + save_scope_value_as = { + name = becoming_rivals + value = yes + } + } + } + } + } + } + + option = { + name = yearly.3051.a + add_unpressed_claim = scope:county + reverse_add_opinion = { + target = scope:vassal + modifier = angry_opinion + opinion = -30 + } + if = { + limit = { + OR = { + exists = scope:becoming_rivals + has_relation_potential_rival = scope:vassal + } + can_set_relation_rival_trigger = { CHARACTER = scope:vassal } + } + set_relation_rival = { + target = scope:vassal + reason = rival_confiscated_title + } + } + else_if = { + limit = { + can_set_relation_potential_rival_trigger = { CHARACTER = scope:vassal } + } + hidden_effect = { + set_relation_potential_rival = scope:vassal + } + } + else = { + scope:vassal = { + add_opinion = { + target = root + modifier = hate_opinion + opinion = -20 + } + } + } + + stress_impact = { + generous = medium_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_greed = 1 + ai_boldness = 0.5 + } + } + } + + option = { + name = yearly.3051.b + reverse_add_opinion = { + target = scope:vassal + modifier = grateful_opinion + opinion = 30 + } + + stress_impact = { + greedy = medium_stress_impact_gain + ambitious = minor_stress_impact_gain + } + + ai_chance = { + base = 100 + ai_value_modifier = { + ai_honor = 1 + ai_compassion = 0.5 + } + } + } +} + + + + +################################ +# Cagots +# by Petter Vilberg +################################ +scripted_trigger yearly_3061_county_trigger = { + tier = tier_county + title_province = { + geographical_region = special_cagot_region + } + faith = root.faith +} + +yearly.3061 = { + type = character_event + title = yearly.3061.t + desc = yearly.3061.desc + theme = realm + override_background = { + reference = terrain_scope + } + left_portrait = { + character = root + triggered_animation = { + trigger = { has_trait = zealous } + animation = rage + } + triggered_animation = { + trigger = { + OR = { + has_trait = paranoid + has_trait = craven + } + } + animation = worry + } + triggered_animation = { + trigger = { always = yes } + animation = disapproval + } + } + + trigger = { + is_ai = no + NOT = { exists = global_var:had_cagot_event } + OR = { religion = religion:eastern_orthodox_religion religion = religion:catholic_religion religion = religion:protestant_religion } + any_held_title = { + yearly_3061_county_trigger = yes + } + } + + immediate = { + set_global_variable = { + name = had_cagot_event + value = yes + } + random_held_title = { + limit = { + yearly_3061_county_trigger = yes + } + save_scope_as = county + title_province = { + save_scope_as = background_terrain_scope + } + } + } + + option = { # Levy a tax, but leave them be + name = yearly.3061.a + trigger = { NOT = { has_trait = lunatic } } + show_as_unavailable = { always = yes } + add_treasury_or_gold = medium_treasury_or_gold_value + add_piety = minor_piety_loss + scope:county = { + add_county_modifier = { + modifier = cagots_left_in_peace_modifier + years = 25 + } + } + } + + option = { # Separate them out! + name = yearly.3061.b + flavor = yearly.3061.b.flavor + trigger = { NOT = { has_trait = lunatic } } + show_as_unavailable = { always = yes } + remove_treasury_or_gold = medium_treasury_or_gold_value + add_piety = minor_piety_gain + scope:county = { + add_county_modifier = { + modifier = cagots_separated_modifier + years = 100 + } + } + } + + option = { # Perhaps we could try to live side by side with them? + name = yearly.3061.c + trigger = { has_trait = lunatic } + trait = lunatic_1 + trait = lunatic_genetic + add_prestige = minor_prestige_loss + add_character_modifier = { + modifier = lunatic_accepting_of_others_modifier + years = 10 + } + } + + option = { # Drive them out and seize their possessions! + name = yearly.3061.d + trigger = { has_trait = zealous } + trait = zealous + add_treasury_or_gold = major_treasury_or_gold_value + scope:county = { + change_development_level = -1 + change_county_control = 50 + } + } +} + +##################################### +# The Worst Nightmare of Your Life +# by Petter Vilberg +##################################### +yearly.3071 = { + type = character_event + title = yearly.3071.t + desc = yearly.3071.desc + theme = mental_health + override_background = { + reference = corridor_night + } + left_portrait = { + character = root + animation = fear + } + + trigger = { + is_adult = yes + is_ai = no + NOR = { + exists = global_var:had_yearly_3071_nightmare_event + any_secret = { + type = secret_cannibal + } + has_trait = cannibal + } + } + + immediate = { + set_global_variable = { + name = had_yearly_3071_nightmare_event + value = yes + } + play_music_cue = "mx_cue_stress" + } + + option = { # Pray the nightmares away + name = yearly.3071.a + add_piety = medium_piety_gain + } + + option = { # The flesh seemed delicious + name = yearly.3071.b + give_cannibal_secret_or_trait_effect = yes + } +}